commit 6f7da290413ba713f0cdd9ff1a2a9bb129ef4f6c Author: Linus Torvalds Date: Sun Jul 2 16:07:02 2017 -0700 Linux 4.12 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 401e000ab90d7b81d8ea0735e3ff909548754876 Author: Sylvain 'ythier' Hitier Date: Sun Jul 2 15:21:56 2017 +0200 moduleparam: fix doc: hwparam_irq configures an IRQ Signed-off-by: Sylvain 'ythier' Hitier Signed-off-by: Linus Torvalds include/linux/moduleparam.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79c496816963aa0561868b43c2c950dfeb282639 Merge: 3a61a54 8542363 Author: Linus Torvalds Date: Sun Jul 2 11:53:44 2017 -0700 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fixes from Ralf Baechle: "Here's a final round of fixes for 4.12: - Fix misordered instructions in assembly code making kenel startup via UHB unreliable. - Fix special case of MADDF and MADDF emulation. - Fix alignment issue in address calculation in pm-cps on 64 bit. - Fix IRQ tracing & lockdep when rescheduling - Systems with MAARs require post-DMA cache flushes. The reordering fix and the MADDF/MSUBF fix have sat in linux-next for a number of days. The others haven't propagated from my pull tree to linux-next yet but all have survived manual testing and Imagination's automated test system and there are no pending bug reports" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: Avoid accidental raw backtrace MIPS: Perform post-DMA cache flushes on systems with MAARs MIPS: Fix IRQ tracing & lockdep when rescheduling MIPS: pm-cps: Drop manual cache-line alignment of ready_count MIPS: math-emu: Handle zero accumulator case in MADDF and MSUBF separately MIPS: head: Reorder instructions missing a delay slot commit 3a61a54cd72c93afa3b7246e3ed06f26ed37fde7 Merge: e18aca0 9e25ebf Author: Linus Torvalds Date: Sun Jul 2 10:09:40 2017 -0700 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fix from Russell King: "One final fix for 4.12 - Doug found a boot failure case triggered by requesting a non-even MB vmalloc size" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8685/1: ensure memblock-limit is pmd-aligned commit e18aca0236a2dac4a134ace4685e97ad09d3605b Merge: a527bf6 79298ac Author: Linus Torvalds Date: Sat Jul 1 09:10:17 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "Fixlets for x86: - Prevent kexec crash when KASLR is enabled, which was caused by an address calculation bug - Restore the freeing of PUDs on memory hot remove - Correct a negated pointer check in the intel uncore performance monitoring driver - Plug a memory leak in an error exit path in the RDT code" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/intel_rdt: Fix memory leak on mount failure x86/boot/KASLR: Fix kexec crash due to 'virt_addr' calculation bug x86/boot/KASLR: Add checking for the offset of kernel virtual address randomization perf/x86/intel/uncore: Fix wrong box pointer check x86/mm/hotplug: Fix BUG_ON() after hot-remove by not freeing PUD commit a527bf61404cd36fedd81dc165a03b6f5529092e Merge: 46589d7 e3c2c4f Author: Linus Torvalds Date: Sat Jul 1 08:46:52 2017 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fix from Thomas Gleixner: "The last fix for perf for this cycles: - Prevent a segfault when kernel.kptr_restrict=2 is set by avoiding a null pointer dereference" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf machine: Fix segfault for kernel.kptr_restrict=2 commit 46589d7ab79a4b5f4d3183fafe1c8fb011f82210 Merge: fc93274 1d80df9 Author: Linus Torvalds Date: Sat Jul 1 08:39:13 2017 -0700 Merge tag 'pinctrl-v4.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pinctrl fix from Linus Walleij: "Brian noticed that this regression has not got a proper fix for the entire merge window and consequently we need to revert the offending commit. It's part of the RT-mainstream work, the dance goes like this, two steps forward, one step back. Summary: - A last fix for v4.12, an IRQ problem reported early in the merge window appears not to have been properly fixed, so the offending commit will be reverted and we will find the proper fix for v4.13. Hopefully" * tag 'pinctrl-v4.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip" commit fc93274ab5a455b1e31aea5d2c9e8ba1f699fded Merge: c0a0c7a c06632e Author: Linus Torvalds Date: Sat Jul 1 08:24:54 2017 -0700 Merge tag 'gpio-v4.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull last minute fixes for GPIO from Linus Walleij: - Fix another ACPI problem with broken BIOSes. - Filter out the right GPIO events, making a very user-visible bug go away. * tag 'gpio-v4.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: acpi: Skip _AEI entries without a handler rather then aborting the scan gpiolib: fix filtering out unwanted events commit c0a0c7a4e1200bfea439b9444e6d6b4bede9db23 Merge: fbd57629 9e52b32 Author: Linus Torvalds Date: Fri Jun 30 17:18:57 2017 -0700 Merge tag 'trace-v4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull last-minute tracing fixes from Steven Rostedt: "Two fixes: One is for a crash when using the :mod: trace probe command into stack_trace_filter. This bug was introduced during the last merge window. The other was there forever. It's a small bug that makes it impossible to name a module function for kprobes when the module starts with a digit" * tag 'trace-v4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing/kprobes: Allow to create probe with a module name starting with a digit ftrace: Fix regression with module command in stack_trace_filter commit fbd576295d6f98b20356d1e6efbc8f976b17c8af Author: Zack Weinberg Date: Wed Jun 14 08:14:28 2017 -0700 uapi/linux/a.out.h: don't use deprecated system-specific predefines. uapi/linux/a.out.h uses a number of predefined macros that are deprecated because they're in the application namespace (e.g. '#ifdef linux' instead of '#ifdef __linux__'). This patch either corrects or just removes them if they are not applicable to Linux. The primary reason this is worth bothering to fix, considering how obsolete a.out binary support is, is that the GCC build process considers this such a severe error that it will copy the header into a private directory and change the macro names, which causes future updates to the header to be masked. This header probably doesn't get updated very often anymore, but it is the _only_ uapi header that gets this treatment, so IMHO it is worth patching just to drive that number all the way to zero. Signed-off-by: Zack Weinberg [hch: removed dead conditionals] Signed-off-by: Christoph Hellwig Signed-off-by: Linus Torvalds include/uapi/linux/a.out.h | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) commit dbd1877754338dc98818d200cd25cf398d8b5d9e Author: Jakub Kicinski Date: Wed Jun 28 21:25:48 2017 -0700 hashtable: remove repeated phrase from a comment "in a rcu enabled hashtable" is repeated twice in a comment. Signed-off-by: Jakub Kicinski Signed-off-by: Linus Torvalds include/linux/hashtable.h | 1 - 1 file changed, 1 deletion(-) commit 79298acc4ba097e9ab78644e3e38902d73547c92 Author: Vikas Shivappa Date: Mon Jun 26 11:55:49 2017 -0700 x86/intel_rdt: Fix memory leak on mount failure If mount fails, the kn_info directory is not freed causing memory leak. Add the missing error handling path. Fixes: 4e978d06dedb ("x86/intel_rdt: Add "info" files to resctrl file system") Signed-off-by: Vikas Shivappa Signed-off-by: Thomas Gleixner Cc: ravi.v.shankar@intel.com Cc: tony.luck@intel.com Cc: fenghua.yu@intel.com Cc: peterz@infradead.org Cc: vikas.shivappa@intel.com Cc: andi.kleen@intel.com Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1498503368-20173-3-git-send-email-vikas.shivappa@linux.intel.com arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b4df2e3537bef7d867338063da56b557c50f68f2 Merge: 27ab862 d6bd819 Author: Linus Torvalds Date: Fri Jun 30 10:55:34 2017 -0700 Merge tag 'powerpc-4.12-8' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Hopefully the last two powerpc fixes for 4.12. The CXL one is larger than I'd usually send at rc7, but it fixes new code this cycle, so better to have it working for the release. It was actually sent a few weeks back but got blocked in testing behind another fix that was causing issues. We are still tracking one crash in v4.12-rc7, but only one person has reproduced it and the commit identified by bisect doesn't touch any of the relevant code, so I think it's 50/50 whether that commit is actually the problem or it's some code layout / toolchain issue. Two fixes for code we merged this cycle: - cxl: Fixes for Coherent Accelerator Interface Architecture 2.0 - Avoid miscompilation w/GCC 4.6.3 on 32-bit - don't inline copy_to/from_user() Thanks to Al Viro, Larry Finger, Christophe Lombard" * tag 'powerpc-4.12-8' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/32: Avoid miscompilation w/GCC 4.6.3 - don't inline copy_to/from_user() cxl: Fixes for Coherent Accelerator Interface Architecture 2.0 commit 27ab862a3afdd7a0285b69a7475f8af7bd2434c4 Merge: 4adc6b9 84a21db Author: Linus Torvalds Date: Fri Jun 30 10:37:48 2017 -0700 Merge tag 'iommu-fixes-v4.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: "Two fixes: - A fix for AMD IOMMU interrupt remapping code when IRQs are forwarded directly to KVM guests - Fixed check in the recently merged code to allow tboot with Intel VT-d disabled" * tag 'iommu-fixes-v4.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/amd: Fix interrupt remapping when disable guest_mode iommu/vt-d: Correctly disable Intel IOMMU force on commit 4adc6b9382d5a2c1f39fa44b1e6ff29467e844e5 Merge: 86c3e00 d94815f Author: Linus Torvalds Date: Fri Jun 30 10:30:26 2017 -0700 Merge tag 'sound-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Two last-minute HD-audio fixes" * tag 'sound-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix endless loop of codec configure ALSA: hda - set input_path bitmap to zero after moving it to new place commit 86c3e00afd64a507aef954cd581547f28807e51a Merge: 4d8a991 fbaf94e Author: Linus Torvalds Date: Fri Jun 30 10:22:59 2017 -0700 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: "Fix two bugs in copy-up code. One introduced in 4.11 and one in 4.12-rc" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: don't set origin on broken lower hardlink ovl: copy-up: don't unlock between lookup and link commit 8eabf42ae5237e6b699aeac687b5b629e3537c8d Author: Baoquan He Date: Tue Jun 27 20:39:06 2017 +0800 x86/boot/KASLR: Fix kexec crash due to 'virt_addr' calculation bug Kernel text KASLR is separated into physical address and virtual address randomization. And for virtual address randomization, we only randomiza to get an offset between 16M and KERNEL_IMAGE_SIZE. So the initial value of 'virt_addr' should be LOAD_PHYSICAL_ADDR, but not the original kernel loading address 'output'. The bug will cause kernel boot failure if kernel is loaded at a different position than the address, 16M, which is decided at compiled time. Kexec/kdump is such practical case. To fix it, just assign LOAD_PHYSICAL_ADDR to virt_addr as initial value. Tested-by: Dave Young Signed-off-by: Baoquan He Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 8391c73 ("x86/KASLR: Randomize virtual address separately") Link: http://lkml.kernel.org/r/1498567146-11990-3-git-send-email-bhe@redhat.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/kaslr.c | 3 --- arch/x86/boot/compressed/misc.c | 4 ++-- arch/x86/boot/compressed/misc.h | 2 -- 3 files changed, 2 insertions(+), 7 deletions(-) commit b892cb873ced2af57dc5a018557d128c53ed6ae0 Author: Baoquan He Date: Tue Jun 27 20:39:05 2017 +0800 x86/boot/KASLR: Add checking for the offset of kernel virtual address randomization For kernel text KASLR, the virtual address is confined to area of 1G, [0xffffffff80000000, 0xffffffffc0000000). For the implemenataion of virtual address randomization, we only randomize to get an offset between 16M and 1G, then add this offset to the starting address, 0xffffffff80000000. Here 16M is the offset which is decided at linking stage. So the amount of the local variable 'virt_addr' which respresents the offset plus the kernel output size can not exceed KERNEL_IMAGE_SIZE. Add a debug check for the offset. If out of bounds, print error message and hang there. Suggested-by: Ingo Molnar Signed-off-by: Baoquan He Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1498567146-11990-2-git-send-email-bhe@redhat.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/misc.c | 2 ++ 1 file changed, 2 insertions(+) commit 9e52b32567126fe146f198971364f68d3bc5233f Author: Sabrina Dubroca Date: Thu Jun 22 11:24:42 2017 +0200 tracing/kprobes: Allow to create probe with a module name starting with a digit Always try to parse an address, since kstrtoul() will safely fail when given a symbol as input. If that fails (which will be the case for a symbol), try to parse a symbol instead. This allows creating a probe such as: p:probe/vlan_gro_receive 8021q:vlan_gro_receive+0 Which is necessary for this command to work: perf probe -m 8021q -a vlan_gro_receive Link: http://lkml.kernel.org/r/fd72d666f45b114e2c5b9cf7e27b91de1ec966f1.1498122881.git.sd@queasysnail.net Cc: stable@vger.kernel.org Fixes: 413d37d1e ("tracing: Add kprobe-based event tracer") Acked-by: Masami Hiramatsu Signed-off-by: Sabrina Dubroca Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_kprobe.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 854236363370995a609a10b03e35fd3dc5e9e4a1 Author: James Hogan Date: Thu Jun 29 15:05:04 2017 +0100 MIPS: Avoid accidental raw backtrace Since commit 81a76d7119f6 ("MIPS: Avoid using unwind_stack() with usermode") show_backtrace() invokes the raw backtracer when cp0_status & ST0_KSU indicates user mode to fix issues on EVA kernels where user and kernel address spaces overlap. However this is used by show_stack() which creates its own pt_regs on the stack and leaves cp0_status uninitialised in most of the code paths. This results in the non deterministic use of the raw back tracer depending on the previous stack content. show_stack() deals exclusively with kernel mode stacks anyway, so explicitly initialise regs.cp0_status to KSU_KERNEL (i.e. 0) to ensure we get a useful backtrace. Fixes: 81a76d7119f6 ("MIPS: Avoid using unwind_stack() with usermode") Signed-off-by: James Hogan Cc: linux-mips@linux-mips.org Cc: # 3.15+ Patchwork: https://patchwork.linux-mips.org/patch/16656/ Signed-off-by: Ralf Baechle arch/mips/kernel/traps.c | 2 ++ 1 file changed, 2 insertions(+) commit cad482c1b1844136fc6d9e33f10d3386344fb045 Author: Paul Burton Date: Tue Jun 13 10:01:08 2017 -0700 MIPS: Perform post-DMA cache flushes on systems with MAARs Recent CPUs from Imagination Technologies such as the I6400 or P6600 are able to speculatively fetch data from memory into caches. This means that if used in a system with non-coherent DMA they require that caches be invalidated after a device performs DMA, and before the CPU reads the DMA'd data, in order to ensure that stale values weren't speculatively prefetched. Such CPUs also introduced Memory Accessibility Attribute Registers (MAARs) in order to control the regions in which they are allowed to speculate. Thus we can use the presence of MAARs as a good indication that the CPU requires the above cache maintenance. Use the presence of MAARs to determine the result of cpu_needs_post_dma_flush() in the default case, in order to handle these recent CPUs correctly. Note that the return type of cpu_needs_post_dma_flush() is changed to bool, such that it's clearer what's happening when cpu_has_maar is cast to bool for the return value. If this patch were backported to a pre-v4.7 kernel then MIPS_CPU_MAAR was 1ull<<34, so when cast to an int we would incorrectly return 0. It so happens that MIPS_CPU_MAAR is currently 1ull<<30, so when truncated to an int gives a non-zero value anyway, but even so the implicit conversion from long long int to bool makes it clearer to understand what will happen than the implicit conversion from long long int to int would. The bool return type also fits this usage better semantically, so seems like an all-round win. Thanks to Ed for spotting the issue for pre-v4.7 kernels & suggesting the return type change. Signed-off-by: Paul Burton Reviewed-by: Bryan O'Donoghue Tested-by: Bryan O'Donoghue Cc: Ed Blake Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16363/ Signed-off-by: Ralf Baechle arch/mips/mm/dma-default.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit d8550860d910c6b7b70f830f59003b33daaa52c9 Author: Paul Burton Date: Fri Mar 3 15:26:05 2017 -0800 MIPS: Fix IRQ tracing & lockdep when rescheduling When the scheduler sets TIF_NEED_RESCHED & we call into the scheduler from arch/mips/kernel/entry.S we disable interrupts. This is true regardless of whether we reach work_resched from syscall_exit_work, resume_userspace or by looping after calling schedule(). Although we disable interrupts in these paths we don't call trace_hardirqs_off() before calling into C code which may acquire locks, and we therefore leave lockdep with an inconsistent view of whether interrupts are disabled or not when CONFIG_PROVE_LOCKING & CONFIG_DEBUG_LOCKDEP are both enabled. Without tracing this interrupt state lockdep will print warnings such as the following once a task returns from a syscall via syscall_exit_partial with TIF_NEED_RESCHED set: [ 49.927678] ------------[ cut here ]------------ [ 49.934445] WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:3687 check_flags.part.41+0x1dc/0x1e8 [ 49.946031] DEBUG_LOCKS_WARN_ON(current->hardirqs_enabled) [ 49.946355] CPU: 0 PID: 1 Comm: init Not tainted 4.10.0-00439-gc9fd5d362289-dirty #197 [ 49.963505] Stack : 0000000000000000 ffffffff81bb5d6a 0000000000000006 ffffffff801ce9c4 [ 49.974431] 0000000000000000 0000000000000000 0000000000000000 000000000000004a [ 49.985300] ffffffff80b7e487 ffffffff80a24498 a8000000ff160000 ffffffff80ede8b8 [ 49.996194] 0000000000000001 0000000000000000 0000000000000000 0000000077c8030c [ 50.007063] 000000007fd8a510 ffffffff801cd45c 0000000000000000 a8000000ff127c88 [ 50.017945] 0000000000000000 ffffffff801cf928 0000000000000001 ffffffff80a24498 [ 50.028827] 0000000000000000 0000000000000001 0000000000000000 0000000000000000 [ 50.039688] 0000000000000000 a8000000ff127bd0 0000000000000000 ffffffff805509bc [ 50.050575] 00000000140084e0 0000000000000000 0000000000000000 0000000000040a00 [ 50.061448] 0000000000000000 ffffffff8010e1b0 0000000000000000 ffffffff805509bc [ 50.072327] ... [ 50.076087] Call Trace: [ 50.079869] [] show_stack+0x80/0xa8 [ 50.086577] [] dump_stack+0x10c/0x190 [ 50.093498] [] __warn+0xf0/0x108 [ 50.099889] [] warn_slowpath_fmt+0x3c/0x48 [ 50.107241] [] check_flags.part.41+0x1dc/0x1e8 [ 50.114961] [] lock_is_held_type+0x8c/0xb0 [ 50.122291] [] __schedule+0x8c0/0x10f8 [ 50.129221] [] schedule+0x30/0x98 [ 50.135659] [] work_resched+0x8/0x34 [ 50.142397] ---[ end trace 0cb4f6ef5b99fe21 ]--- [ 50.148405] possible reason: unannotated irqs-off. [ 50.154600] irq event stamp: 400463 [ 50.159566] hardirqs last enabled at (400463): [] _raw_spin_unlock_irqrestore+0x40/0xa8 [ 50.171981] hardirqs last disabled at (400462): [] _raw_spin_lock_irqsave+0x30/0xb0 [ 50.183897] softirqs last enabled at (400450): [] __do_softirq+0x4ac/0x6a8 [ 50.195015] softirqs last disabled at (400425): [] irq_exit+0x110/0x128 Fix this by using the TRACE_IRQS_OFF macro to call trace_hardirqs_off() when CONFIG_TRACE_IRQFLAGS is enabled. This is done before invoking schedule() following the work_resched label because: 1) Interrupts are disabled regardless of the path we take to reach work_resched() & schedule(). 2) Performing the tracing here avoids the need to do it in paths which disable interrupts but don't call out to C code before hitting a path which uses the RESTORE_SOME macro that will call trace_hardirqs_on() or trace_hardirqs_off() as appropriate. We call trace_hardirqs_on() using the TRACE_IRQS_ON macro before calling syscall_trace_leave() for similar reasons, ensuring that lockdep has a consistent view of state after we re-enable interrupts. Signed-off-by: Paul Burton Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: linux-mips@linux-mips.org Cc: stable Patchwork: https://patchwork.linux-mips.org/patch/15385/ Signed-off-by: Ralf Baechle arch/mips/kernel/entry.S | 3 +++ 1 file changed, 3 insertions(+) commit 161c51ccb7a6faf45ffe09aa5cf1ad85ccdad503 Author: Paul Burton Date: Thu Mar 2 14:02:40 2017 -0800 MIPS: pm-cps: Drop manual cache-line alignment of ready_count We allocate memory for a ready_count variable per-CPU, which is accessed via a cached non-coherent TLB mapping to perform synchronisation between threads within the core using LL/SC instructions. In order to ensure that the variable is contained within its own data cache line we allocate 2 lines worth of memory & align the resulting pointer to a line boundary. This is however unnecessary, since kmalloc is guaranteed to return memory which is at least cache-line aligned (see ARCH_DMA_MINALIGN). Stop the redundant manual alignment. Besides cleaning up the code & avoiding needless work, this has the side effect of avoiding an arithmetic error found by Bryan on 64 bit systems due to the 32 bit size of the former dlinesz. This led the ready_count variable to have its upper 32b cleared erroneously for MIPS64 kernels, causing problems when ready_count was later used on MIPS64 via cpuidle. Signed-off-by: Paul Burton Fixes: 3179d37ee1ed ("MIPS: pm-cps: add PM state entry code for CPS systems") Reported-by: Bryan O'Donoghue Reviewed-by: Bryan O'Donoghue Tested-by: Bryan O'Donoghue Cc: linux-mips@linux-mips.org Cc: stable # v3.16+ Patchwork: https://patchwork.linux-mips.org/patch/15383/ Signed-off-by: Ralf Baechle arch/mips/kernel/pm-cps.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 9e25ebfe56ece7541cd10a20d715cbdd148a2e06 Author: Doug Berger Date: Thu Jun 29 18:41:36 2017 +0100 ARM: 8685/1: ensure memblock-limit is pmd-aligned The pmd containing memblock_limit is cleared by prepare_page_table() which creates the opportunity for early_alloc() to allocate unmapped memory if memblock_limit is not pmd aligned causing a boot-time hang. Commit 965278dcb8ab ("ARM: 8356/1: mm: handle non-pmd-aligned end of RAM") attempted to resolve this problem, but there is a path through the adjust_lowmem_bounds() routine where if all memory regions start and end on pmd-aligned addresses the memblock_limit will be set to arm_lowmem_limit. Since arm_lowmem_limit can be affected by the vmalloc early parameter, the value of arm_lowmem_limit may not be pmd-aligned. This commit corrects this oversight such that memblock_limit is always rounded down to pmd-alignment. Fixes: 965278dcb8ab ("ARM: 8356/1: mm: handle non-pmd-aligned end of RAM") Signed-off-by: Doug Berger Suggested-by: Mark Rutland Signed-off-by: Russell King arch/arm/mm/mmu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4d8a991d460d4fa4829beaffdcba45a217ca0fa7 Merge: 27bc344 d58299a Author: Linus Torvalds Date: Thu Jun 29 14:30:07 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Need to access netdev->num_rx_queues behind an accessor in netvsc driver otherwise the build breaks with some configs, from Arnd Bergmann. 2) Add dummy xfrm_dev_event() so that build doesn't fail when CONFIG_XFRM_OFFLOAD is not set. From Hangbin Liu. 3) Don't OOPS when pfkey_msg2xfrm_state() signals an erros, from Dan Carpenter. 4) Fix MCDI command size for filter operations in sfc driver, from Martin Habets. 5) Fix UFO segmenting so that we don't calculate incorrect checksums, from Michal Kubecek. 6) When ipv6 datagram connects fail, reset destination address and port. From Wei Wang. 7) TCP disconnect must reset the cached receive DST, from WANG Cong. 8) Fix sign extension bug on 32-bit in dev_get_stats(), from Eric Dumazet. 9) fman driver has to depend on HAS_DMA, from Madalin Bucur. 10) Fix bpf pointer leak with xadd in verifier, from Daniel Borkmann. 11) Fix negative page counts with GFO, from Michal Kubecek. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (41 commits) sfc: fix attempt to translate invalid filter ID net: handle NAPI_GRO_FREE_STOLEN_HEAD case also in napi_frags_finish() bpf: prevent leaking pointer via xadd on unpriviledged arcnet: com20020-pci: add missing pdev setup in netdev structure arcnet: com20020-pci: fix dev_id calculation arcnet: com20020: remove needless base_addr assignment Trivial fix to spelling mistake in arc_printk message arcnet: change irq handler to lock irqsave rocker: move dereference before free mlxsw: spectrum_router: Fix NULL pointer dereference net: sched: Fix one possible panic when no destroy callback virtio-net: serialize tx routine during reset net: usb: asix88179_178a: Add support for the Belkin B2B128 fsl/fman: add dependency on HAS_DMA net: prevent sign extension in dev_get_stats() tcp: reset sk_rx_dst in tcp_disconnect() net: ipv6: reset daddr and dport in sk if connect() fails bnx2x: Don't log mc removal needlessly bnxt_en: Fix netpoll handling. bnxt_en: Add missing logic to handle TPA end error conditions. ... commit 27bc344014289a298a9fad4b828fcf61daa60aff Merge: 374bf88 00a0ea3 Author: Linus Torvalds Date: Thu Jun 29 14:23:02 2017 -0700 Merge tag 'for-4.12/dm-fixes-5' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - dm thinp fix for crash that will occur when metadata device failure races with discard passdown to the underlying data device. - dm raid fix to not access the superblock's >= 1.9.0 'sectors' member unconditionally. * tag 'for-4.12/dm-fixes-5' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm thin: do not queue freed thin mapping for next stage processing dm raid: fix oops on upgrading to extended superblock format commit 374bf8831aa99a445d6d26c56a65fb35db747d91 Merge: 6474924 9ae3b3f Author: Linus Torvalds Date: Thu Jun 29 14:10:37 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Two fixes that should go into this release. One is an nvme regression fix from Keith, fixing a missing queue freeze if the controller is being reset. This causes the reset to hang. The other is a fix for a leak of the bio protection info, if smaller sized O_DIRECT is used. This fix should be more involved as we have other problematic paths in the kernel, but given as this isn't a regression in this series, we'll tackle those for 4.13" * 'for-linus' of git://git.kernel.dk/linux-block: block: provide bio_uninit() free freeing integrity/task associations nvme/pci: Fix stuck nvme reset commit d58299a478c416c0b48e4b31c6332fe7beb63000 Author: Edward Cree Date: Thu Jun 29 16:50:06 2017 +0100 sfc: fix attempt to translate invalid filter ID When filter insertion fails with no rollback, we were trying to convert EFX_EF10_FILTER_ID_INVALID to an id to store in 'ids' (which is either vlan->uc or vlan->mc). This would WARN_ON_ONCE and then record a bogus filter ID of 0x1fff, neither of which is a good thing. Fixes: 0ccb998bf46d ("sfc: fix filter_id misinterpretation in edge case") Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e44699d2c28067f69698ccb68dd3ddeacfebc434 Author: Michal Kubeček Date: Thu Jun 29 11:13:36 2017 +0200 net: handle NAPI_GRO_FREE_STOLEN_HEAD case also in napi_frags_finish() Recently I started seeing warnings about pages with refcount -1. The problem was traced to packets being reused after their head was merged into a GRO packet by skb_gro_receive(). While bisecting the issue pointed to commit c21b48cc1bbf ("net: adjust skb->truesize in ___pskb_trim()") and I have never seen it on a kernel with it reverted, I believe the real problem appeared earlier when the option to merge head frag in GRO was implemented. Handling NAPI_GRO_FREE_STOLEN_HEAD state was only added to GRO_MERGED_FREE branch of napi_skb_finish() so that if the driver uses napi_gro_frags() and head is merged (which in my case happens after the skb_condense() call added by the commit mentioned above), the skb is reused including the head that has been merged. As a result, we release the page reference twice and eventually end up with negative page refcount. To fix the problem, handle NAPI_GRO_FREE_STOLEN_HEAD in napi_frags_finish() the same way it's done in napi_skb_finish(). Fixes: d7e8883cfcf4 ("net: make GRO aware of skb->head_frag") Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller net/core/dev.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit 6bdf6abc56b53103324dfd270a86580306e1a232 Author: Daniel Borkmann Date: Thu Jun 29 03:04:59 2017 +0200 bpf: prevent leaking pointer via xadd on unpriviledged Leaking kernel addresses on unpriviledged is generally disallowed, for example, verifier rejects the following: 0: (b7) r0 = 0 1: (18) r2 = 0xffff897e82304400 3: (7b) *(u64 *)(r1 +48) = r2 R2 leaks addr into ctx Doing pointer arithmetic on them is also forbidden, so that they don't turn into unknown value and then get leaked out. However, there's xadd as a special case, where we don't check the src reg for being a pointer register, e.g. the following will pass: 0: (b7) r0 = 0 1: (7b) *(u64 *)(r1 +48) = r0 2: (18) r2 = 0xffff897e82304400 ; map 4: (db) lock *(u64 *)(r1 +48) += r2 5: (95) exit We could store the pointer into skb->cb, loose the type context, and then read it out from there again to leak it eventually out of a map value. Or more easily in a different variant, too: 0: (bf) r6 = r1 1: (7a) *(u64 *)(r10 -8) = 0 2: (bf) r2 = r10 3: (07) r2 += -8 4: (18) r1 = 0x0 6: (85) call bpf_map_lookup_elem#1 7: (15) if r0 == 0x0 goto pc+3 R0=map_value(ks=8,vs=8,id=0),min_value=0,max_value=0 R6=ctx R10=fp 8: (b7) r3 = 0 9: (7b) *(u64 *)(r0 +0) = r3 10: (db) lock *(u64 *)(r0 +0) += r6 11: (b7) r0 = 0 12: (95) exit from 7 to 11: R0=inv,min_value=0,max_value=0 R6=ctx R10=fp 11: (b7) r0 = 0 12: (95) exit Prevent this by checking xadd src reg for pointer types. Also add a couple of test cases related to this. Fixes: 1be7f75d1668 ("bpf: enable non-root eBPF programs") Fixes: 17a5267067f3 ("bpf: verifier (add verifier core)") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Acked-by: Edward Cree Signed-off-by: David S. Miller kernel/bpf/verifier.c | 5 +++ tools/testing/selftests/bpf/test_verifier.c | 66 +++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) commit 80c65fdb4c6920e332a9781a3de5877594b07522 Author: Kan Liang Date: Thu Jun 29 12:09:26 2017 -0700 perf/x86/intel/uncore: Fix wrong box pointer check Should not init a NULL box. It will cause system crash. The issue looks like caused by a typo. This was not noticed because there is no NULL box. Also, for most boxes, they are enabled by default. The init code is not critical. Fixes: fff4b87e594a ("perf/x86/intel/uncore: Make package handling more robust") Signed-off-by: Kan Liang Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20170629190926.2456-1-kan.liang@intel.com arch/x86/events/intel/uncore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00778f7cadd393630a23e83ffaf60b70fe460879 Merge: acb4b7d 2a0ea04 Author: David S. Miller Date: Thu Jun 29 15:18:38 2017 -0400 Merge branch 'arcnet-fixes' Michael Grzeschik says: ==================== arcnet: Collection of latest fixes Here we sum up the recent fixes I collected on the way to use and stabilise the framework. Part of it is an possible deadlock that we prevent as well to fix the calculation of the dev_id that can be setup by an rotary encoder. Beside that we added an trivial spelling patch and fix some wrong and missing assignments that improves the code footprint. ==================== Signed-off-by: David S. Miller commit 2a0ea04c83ab82c3852c9171d2fa5cd9a1432c9b Author: Michael Grzeschik Date: Wed Jun 28 18:28:37 2017 +0200 arcnet: com20020-pci: add missing pdev setup in netdev structure We add the pdev data to the pci devices netdev structure. This way the interface get consistent device names in the userspace (udev). Signed-off-by: Michael Grzeschik Signed-off-by: David S. Miller drivers/net/arcnet/com20020-pci.c | 1 + 1 file changed, 1 insertion(+) commit cb108619f2fc77846bf7a7543517f3487f455b24 Author: Michael Grzeschik Date: Wed Jun 28 18:28:36 2017 +0200 arcnet: com20020-pci: fix dev_id calculation The dev_id was miscalculated. Only the two bits 4-5 are relevant for the MA1 card. PCIARC1 and PCIFB2 use the four bits 4-7 for id selection. Signed-off-by: Michael Grzeschik Signed-off-by: David S. Miller drivers/net/arcnet/com20020-pci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0d494fcf867f95040b5b67e4bc5af739bcda37da Author: Michael Grzeschik Date: Wed Jun 28 18:28:35 2017 +0200 arcnet: com20020: remove needless base_addr assignment The assignment is superfluous. Signed-off-by: Michael Grzeschik Signed-off-by: David S. Miller drivers/net/arcnet/com20020.c | 2 -- 1 file changed, 2 deletions(-) commit 06908d7aee8d62a80cabfd134d0354dc4d2794bc Author: Colin Ian King Date: Wed Jun 28 18:28:34 2017 +0200 Trivial fix to spelling mistake in arc_printk message Signed-off-by: Colin Ian King Signed-off-by: Michael Grzeschik Signed-off-by: David S. Miller drivers/net/arcnet/capmode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b85840320151f61e04d83a23ef2567a07094503 Author: Michael Grzeschik Date: Wed Jun 28 18:28:33 2017 +0200 arcnet: change irq handler to lock irqsave This patch prevents the arcnet driver from the following deadlock. [ 41.273910] ====================================================== [ 41.280397] [ INFO: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected ] [ 41.287433] 4.4.0-00034-gc0ae784 #536 Not tainted [ 41.292366] ------------------------------------------------------ [ 41.298863] arcecho/233 [HC0[0]:SC0[2]:HE0:SE0] is trying to acquire: [ 41.305628] (&(&lp->lock)->rlock){+.+...}, at: [] arcnet_send_packet+0x60/0x1c0 [arcnet] [ 41.315199] [ 41.315199] and this task is already holding: [ 41.321324] (_xmit_ARCNET#2){+.-...}, at: [] packet_direct_xmit+0xfc/0x1c8 [ 41.329593] which would create a new lock dependency: [ 41.334893] (_xmit_ARCNET#2){+.-...} -> (&(&lp->lock)->rlock){+.+...} [ 41.341801] [ 41.341801] but this new dependency connects a SOFTIRQ-irq-safe lock: [ 41.350108] (_xmit_ARCNET#2){+.-...} ... which became SOFTIRQ-irq-safe at: [ 41.357539] [] _raw_spin_lock+0x30/0x40 [ 41.362677] [] dev_watchdog+0x5c/0x264 [ 41.367723] [] call_timer_fn+0x6c/0xf4 [ 41.372759] [] run_timer_softirq+0x154/0x210 [ 41.378340] [] __do_softirq+0x144/0x298 [ 41.383469] [] irq_exit+0xcc/0x130 [ 41.388138] [] __handle_domain_irq+0x60/0xb4 [ 41.393728] [] __irq_svc+0x58/0x78 [ 41.398402] [] arch_cpu_idle+0x24/0x3c [ 41.403443] [] cpu_startup_entry+0x1f8/0x25c [ 41.409029] [] start_kernel+0x3c0/0x3cc [ 41.414170] [ 41.414170] to a SOFTIRQ-irq-unsafe lock: [ 41.419931] (&(&lp->lock)->rlock){+.+...} ... which became SOFTIRQ-irq-unsafe at: [ 41.427996] ... [] _raw_spin_lock+0x30/0x40 [ 41.433409] [] arcnet_interrupt+0x2c/0x800 [arcnet] [ 41.439646] [] handle_nested_irq+0x8c/0xec [ 41.445063] [] regmap_irq_thread+0x190/0x314 [ 41.450661] [] irq_thread_fn+0x1c/0x34 [ 41.455700] [] irq_thread+0x13c/0x1dc [ 41.460649] [] kthread+0xe4/0xf8 [ 41.465158] [] ret_from_fork+0x14/0x24 [ 41.470207] [ 41.470207] other info that might help us debug this: [ 41.470207] [ 41.478627] Possible interrupt unsafe locking scenario: [ 41.478627] [ 41.485763] CPU0 CPU1 [ 41.490521] ---- ---- [ 41.495279] lock(&(&lp->lock)->rlock); [ 41.499414] local_irq_disable(); [ 41.505636] lock(_xmit_ARCNET#2); [ 41.511967] lock(&(&lp->lock)->rlock); [ 41.518741] [ 41.521490] lock(_xmit_ARCNET#2); [ 41.525356] [ 41.525356] *** DEADLOCK *** [ 41.525356] [ 41.531587] 1 lock held by arcecho/233: [ 41.535617] #0: (_xmit_ARCNET#2){+.-...}, at: [] packet_direct_xmit+0xfc/0x1c8 [ 41.544355] the dependencies between SOFTIRQ-irq-safe lock and the holding lock: [ 41.552362] -> (_xmit_ARCNET#2){+.-...} ops: 27 { [ 41.557357] HARDIRQ-ON-W at: [ 41.560664] [] _raw_spin_lock+0x30/0x40 [ 41.567445] [] dev_deactivate_many+0x114/0x304 [ 41.574866] [] dev_deactivate+0x24/0x38 [ 41.581646] [] linkwatch_do_dev+0x40/0x74 [ 41.588613] [] __linkwatch_run_queue+0xec/0x140 [ 41.596120] [] linkwatch_event+0x2c/0x34 [ 41.602991] [] process_one_work+0x188/0x40c [ 41.610131] [] worker_thread+0x4c/0x480 [ 41.616912] [] kthread+0xe4/0xf8 [ 41.623048] [] ret_from_fork+0x14/0x24 [ 41.629735] IN-SOFTIRQ-W at: [ 41.633039] [] _raw_spin_lock+0x30/0x40 [ 41.639820] [] dev_watchdog+0x5c/0x264 [ 41.646508] [] call_timer_fn+0x6c/0xf4 [ 41.653190] [] run_timer_softirq+0x154/0x210 [ 41.660425] [] __do_softirq+0x144/0x298 [ 41.667201] [] irq_exit+0xcc/0x130 [ 41.673518] [] __handle_domain_irq+0x60/0xb4 [ 41.680754] [] __irq_svc+0x58/0x78 [ 41.687077] [] arch_cpu_idle+0x24/0x3c [ 41.693769] [] cpu_startup_entry+0x1f8/0x25c [ 41.701006] [] start_kernel+0x3c0/0x3cc [ 41.707791] INITIAL USE at: [ 41.711003] [] _raw_spin_lock+0x30/0x40 [ 41.717696] [] dev_deactivate_many+0x114/0x304 [ 41.725026] [] dev_deactivate+0x24/0x38 [ 41.731718] [] linkwatch_do_dev+0x40/0x74 [ 41.738593] [] __linkwatch_run_queue+0xec/0x140 [ 41.746011] [] linkwatch_event+0x2c/0x34 [ 41.752789] [] process_one_work+0x188/0x40c [ 41.759847] [] worker_thread+0x4c/0x480 [ 41.766541] [] kthread+0xe4/0xf8 [ 41.772596] [] ret_from_fork+0x14/0x24 [ 41.779198] } [ 41.780945] ... key at: [] netdev_xmit_lock_key+0x38/0x1c8 [ 41.788192] ... acquired at: [ 41.791309] [] lock_acquire+0x70/0x90 [ 41.796361] [] _raw_spin_lock_irqsave+0x40/0x54 [ 41.802324] [] arcnet_send_packet+0x60/0x1c0 [arcnet] [ 41.808844] [] packet_direct_xmit+0x130/0x1c8 [ 41.814622] [] packet_sendmsg+0x3b8/0x680 [ 41.820034] [] sock_sendmsg+0x14/0x24 [ 41.825091] [] SyS_sendto+0xb8/0xe0 [ 41.829956] [] SyS_send+0x18/0x20 [ 41.834638] [] ret_fast_syscall+0x0/0x1c [ 41.839954] [ 41.841514] the dependencies between the lock to be acquired and SOFTIRQ-irq-unsafe lock: [ 41.850302] -> (&(&lp->lock)->rlock){+.+...} ops: 5 { [ 41.855644] HARDIRQ-ON-W at: [ 41.858945] [] _raw_spin_lock+0x30/0x40 [ 41.865726] [] arcnet_interrupt+0x2c/0x800 [arcnet] [ 41.873607] [] handle_nested_irq+0x8c/0xec [ 41.880666] [] regmap_irq_thread+0x190/0x314 [ 41.887901] [] irq_thread_fn+0x1c/0x34 [ 41.894593] [] irq_thread+0x13c/0x1dc [ 41.901195] [] kthread+0xe4/0xf8 [ 41.907338] [] ret_from_fork+0x14/0x24 [ 41.914025] SOFTIRQ-ON-W at: [ 41.917328] [] _raw_spin_lock+0x30/0x40 [ 41.924106] [] arcnet_interrupt+0x2c/0x800 [arcnet] [ 41.931981] [] handle_nested_irq+0x8c/0xec [ 41.939028] [] regmap_irq_thread+0x190/0x314 [ 41.946264] [] irq_thread_fn+0x1c/0x34 [ 41.952954] [] irq_thread+0x13c/0x1dc [ 41.959548] [] kthread+0xe4/0xf8 [ 41.965689] [] ret_from_fork+0x14/0x24 [ 41.972379] INITIAL USE at: [ 41.975595] [] _raw_spin_lock+0x30/0x40 [ 41.982283] [] arcnet_interrupt+0x2c/0x800 [arcnet] [ 41.990063] [] handle_nested_irq+0x8c/0xec [ 41.997027] [] regmap_irq_thread+0x190/0x314 [ 42.004172] [] irq_thread_fn+0x1c/0x34 [ 42.010766] [] irq_thread+0x13c/0x1dc [ 42.017267] [] kthread+0xe4/0xf8 [ 42.023314] [] ret_from_fork+0x14/0x24 [ 42.029903] } [ 42.031648] ... key at: [] __key.42091+0x0/0xfffff0f8 [arcnet] [ 42.039255] ... acquired at: [ 42.042372] [] lock_acquire+0x70/0x90 [ 42.047413] [] _raw_spin_lock_irqsave+0x40/0x54 [ 42.053364] [] arcnet_send_packet+0x60/0x1c0 [arcnet] [ 42.059872] [] packet_direct_xmit+0x130/0x1c8 [ 42.065634] [] packet_sendmsg+0x3b8/0x680 [ 42.071030] [] sock_sendmsg+0x14/0x24 [ 42.076069] [] SyS_sendto+0xb8/0xe0 [ 42.080926] [] SyS_send+0x18/0x20 [ 42.085601] [] ret_fast_syscall+0x0/0x1c [ 42.090918] [ 42.092481] [ 42.092481] stack backtrace: [ 42.097065] CPU: 0 PID: 233 Comm: arcecho Not tainted 4.4.0-00034-gc0ae784 #536 [ 42.104751] Hardware name: Generic AM33XX (Flattened Device Tree) [ 42.111183] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 42.119337] [] (show_stack) from [] (dump_stack+0x8c/0x9c) [ 42.126937] [] (dump_stack) from [] (check_usage+0x4bc/0x63c) [ 42.134815] [] (check_usage) from [] (check_irq_usage+0x58/0xb0) [ 42.142964] [] (check_irq_usage) from [] (__lock_acquire+0x1524/0x20b0) [ 42.151740] [] (__lock_acquire) from [] (lock_acquire+0x70/0x90) [ 42.159886] [] (lock_acquire) from [] (_raw_spin_lock_irqsave+0x40/0x54) [ 42.168768] [] (_raw_spin_lock_irqsave) from [] (arcnet_send_packet+0x60/0x1c0 [arcnet]) [ 42.179115] [] (arcnet_send_packet [arcnet]) from [] (packet_direct_xmit+0x130/0x1c8) [ 42.189182] [] (packet_direct_xmit) from [] (packet_sendmsg+0x3b8/0x680) [ 42.198059] [] (packet_sendmsg) from [] (sock_sendmsg+0x14/0x24) [ 42.206199] [] (sock_sendmsg) from [] (SyS_sendto+0xb8/0xe0) [ 42.213978] [] (SyS_sendto) from [] (SyS_send+0x18/0x20) [ 42.221388] [] (SyS_send) from [] (ret_fast_syscall+0x0/0x1c) Signed-off-by: Michael Grzeschik --- v1 -> v2: removed unneeded zero assignment of flags Signed-off-by: David S. Miller drivers/net/arcnet/arcnet.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit acb4b7df48b539cb391287921de57e4e5fae3460 Author: Dan Carpenter Date: Wed Jun 28 14:44:21 2017 +0300 rocker: move dereference before free My static checker complains that ofdpa_neigh_del() can sometimes free "found". It just makes sense to use it first before deleting it. Fixes: ecf244f753e0 ("rocker: fix maybe-uninitialized warning") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker_ofdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b27c8adf27edf1dabe2cdcfaa101ef7e2712415 Author: Ido Schimmel Date: Wed Jun 28 09:03:12 2017 +0300 mlxsw: spectrum_router: Fix NULL pointer dereference In case a VLAN device is enslaved to a bridge we shouldn't create a router interface (RIF) for it when it's configured with an IP address. This is already handled by the driver for other types of netdevs, such as physical ports and LAG devices. If this IP address is then removed and the interface is subsequently unlinked from the bridge, a NULL pointer dereference can happen, as the original 802.1d FID was replaced with an rFID which was then deleted. To reproduce: $ ip link set dev enp3s0np9 up $ ip link add name enp3s0np9.111 link enp3s0np9 type vlan id 111 $ ip link set dev enp3s0np9.111 up $ ip link add name br0 type bridge $ ip link set dev br0 up $ ip link set enp3s0np9.111 master br0 $ ip address add dev enp3s0np9.111 192.168.0.1/24 $ ip address del dev enp3s0np9.111 192.168.0.1/24 $ ip link set dev enp3s0np9.111 nomaster Fixes: 99724c18fc66 ("mlxsw: spectrum: Introduce support for router interfaces") Signed-off-by: Ido Schimmel Reported-by: Petr Machata Tested-by: Petr Machata Reviewed-by: Petr Machata Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 3 +++ 1 file changed, 3 insertions(+) commit c1a4872ebfb83b1af7144f7b29ac8c4b344a12a8 Author: Gao Feng Date: Wed Jun 28 12:53:54 2017 +0800 net: sched: Fix one possible panic when no destroy callback When qdisc fail to init, qdisc_create would invoke the destroy callback to cleanup. But there is no check if the callback exists really. So it would cause the panic if there is no real destroy callback like the qdisc codel, fq, and so on. Take codel as an example following: When a malicious user constructs one invalid netlink msg, it would cause codel_init->codel_change->nla_parse_nested failed. Then kernel would invoke the destroy callback directly but qdisc codel doesn't define one. It causes one panic as a result. Now add one the check for destroy to avoid the possible panic. Fixes: 87b60cfacf9f ("net_sched: fix error recovery at qdisc creation") Signed-off-by: Gao Feng Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/sched/sch_api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 713a98d90c5ea072c1bb00ef40617aee2cef2232 Author: Jason Wang Date: Wed Jun 28 09:51:03 2017 +0800 virtio-net: serialize tx routine during reset We don't hold any tx lock when trying to disable TX during reset, this would lead a use after free since ndo_start_xmit() tries to access the virtqueue which has already been freed. Fix this by using netif_tx_disable() before freeing the vqs, this could make sure no tx after vq freeing. Reported-by: Jean-Philippe Menil Tested-by: Jean-Philippe Menil Fixes commit f600b6905015 ("virtio_net: Add XDP support") Cc: John Fastabend Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Acked-by: Robert McCabe Signed-off-by: David S. Miller drivers/net/virtio_net.c | 1 + 1 file changed, 1 insertion(+) commit 0f17976568b3f72e676450af0c0db6f8752253d6 Author: Steven Rostedt (VMware) Date: Thu Jun 29 10:05:45 2017 -0400 ftrace: Fix regression with module command in stack_trace_filter When doing the following command: # echo ":mod:kvm_intel" > /sys/kernel/tracing/stack_trace_filter it triggered a crash. This happened with the clean up of probes. It required all callers to the regex function (doing ftrace filtering) to have ops->private be a pointer to a trace_array. But for the stack tracer, that is not the case. Allow for the ops->private to be NULL, and change the function command callbacks to handle the trace_array pointer being NULL as well. Fixes: d2afd57a4b96 ("tracing/ftrace: Allow instances to have their own function probes") Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 3 --- kernel/trace/trace.c | 3 +++ kernel/trace/trace_functions.c | 12 ++++++++++++ kernel/trace/trace_stack.c | 6 ++++-- 4 files changed, 19 insertions(+), 5 deletions(-) commit 1d80df93d9d170eba8c3654719e5857307efd077 Author: Brian Norris Date: Fri Jun 23 13:59:11 2017 -0700 Revert "pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip" This reverts commit 88bb94216f59e10802aaf78c858a4146085faf18. It introduced a new CONFIG_DEBUG_ATOMIC_SLEEP warning in v4.12-rc1: [ 7226.716713] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:238 [ 7226.716716] in_atomic(): 0, irqs_disabled(): 0, pid: 1708, name: bash [ 7226.716722] CPU: 1 PID: 1708 Comm: bash Not tainted 4.12.0-rc6+ #1213 [ 7226.716724] Hardware name: Google Kevin (DT) [ 7226.716726] Call trace: [ 7226.716738] [] dump_backtrace+0x0/0x24c [ 7226.716743] [] show_stack+0x20/0x28 [ 7226.716749] [] dump_stack+0x90/0xb0 [ 7226.716755] [] ___might_sleep+0x10c/0x124 [ 7226.716760] [] __might_sleep+0x78/0x88 [ 7226.716765] [] mutex_lock+0x2c/0x64 [ 7226.716771] [] rockchip_irq_bus_lock+0x30/0x3c [ 7226.716777] [] __irq_get_desc_lock+0x78/0x98 [ 7226.716782] [] irq_set_irq_wake+0x44/0x12c [ 7226.716787] [] dev_pm_arm_wake_irq+0x4c/0x58 [ 7226.716792] [] device_wakeup_arm_wake_irqs+0x3c/0x58 [ 7226.716796] [] dpm_suspend_noirq+0xf8/0x3a0 [ 7226.716800] [] suspend_devices_and_enter+0x1a4/0x9a8 [ 7226.716803] [] pm_suspend+0x664/0x6a4 [ 7226.716807] [] state_store+0xd4/0xf8 ... It was reported on -rc1, and it's still not fixed in -rc6, so it should just be reverted. Cc: John Keeping Signed-off-by: Brian Norris Reviewed-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 44 ++++---------------------------------- 1 file changed, 4 insertions(+), 40 deletions(-) commit c06632ea054c49510efacb42c52aab693c45b7ba Author: Hans de Goede Date: Fri Jun 23 09:26:13 2017 +0200 gpio: acpi: Skip _AEI entries without a handler rather then aborting the scan acpi_walk_resources will stop as soon as the callback passed in returns an error status. On a x86 tablet I have the first GpioInt in the _AEI resource list has no handler defined in the DSDT, causing acpi_walk_resources to abort scanning the rest of the resource list, which does define valid ACPI GPIO events. This commit changes the return for not finding a handler from AE_BAD_PARAMETER to AE_OK so that the rest of the resource list will get scanned normally in case of missing event handlers. Signed-off-by: Hans de Goede Acked-by: Mika Westerberg Acked-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad537b822577fcc143325786cd6ad50d7b9df31c Author: Bartosz Golaszewski Date: Fri Jun 23 13:45:16 2017 +0200 gpiolib: fix filtering out unwanted events GPIOEVENT_REQUEST_BOTH_EDGES is not a single flag, but a binary OR of GPIOEVENT_REQUEST_RISING_EDGE and GPIOEVENT_REQUEST_FALLING_EDGE. The expression 'le->eflags & GPIOEVENT_REQUEST_BOTH_EDGES' we'll get evaluated to true even if only one event type was requested. Fix it by checking both RISING & FALLING flags explicitly. Cc: stable@vger.kernel.org Fixes: 61f922db7221 ("gpio: userspace ABI for reading GPIO line events") Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6474924e2b5ddb0030c355558966adcbe3b49022 Author: Tobias Klauser Date: Wed Jun 28 15:30:02 2017 +0200 arch: remove unused macro/function thread_saved_pc() The only user of thread_saved_pc() in non-arch-specific code was removed in commit 8243d5597793 ("sched/core: Remove pointless printout in sched_show_task()"). Remove the implementations as well. Some architectures use thread_saved_pc() in their arch-specific code. Leave their thread_saved_pc() intact. Signed-off-by: Tobias Klauser Acked-by: Geert Uytterhoeven Cc: Ingo Molnar Signed-off-by: Linus Torvalds arch/arc/include/asm/processor.h | 2 -- arch/blackfin/include/asm/processor.h | 5 ----- arch/c6x/include/asm/processor.h | 5 ----- arch/cris/arch-v10/kernel/process.c | 8 -------- arch/cris/arch-v32/kernel/process.c | 8 -------- arch/cris/include/asm/processor.h | 2 -- arch/frv/include/asm/processor.h | 5 ----- arch/frv/kernel/process.c | 9 --------- arch/h8300/include/asm/processor.h | 4 ---- arch/h8300/kernel/process.c | 5 ----- arch/hexagon/include/asm/processor.h | 3 --- arch/hexagon/kernel/process.c | 8 -------- arch/ia64/include/asm/processor.h | 17 ----------------- arch/m32r/include/asm/processor.h | 2 -- arch/m32r/kernel/process.c | 8 -------- arch/m68k/include/asm/processor.h | 2 -- arch/m68k/kernel/process.c | 14 -------------- arch/microblaze/include/asm/processor.h | 6 ------ arch/microblaze/kernel/process.c | 17 ----------------- arch/mn10300/include/asm/processor.h | 5 ----- arch/mn10300/kernel/process.c | 8 -------- arch/nios2/include/asm/processor.h | 3 --- arch/openrisc/include/asm/processor.h | 5 ----- arch/openrisc/kernel/process.c | 5 ----- arch/parisc/include/asm/processor.h | 5 ----- arch/parisc/kernel/process.c | 5 ----- arch/powerpc/include/asm/processor.h | 6 ------ arch/s390/include/asm/processor.h | 5 ----- arch/s390/kernel/process.c | 25 ------------------------- arch/score/include/asm/processor.h | 1 - arch/score/kernel/process.c | 5 ----- arch/sparc/include/asm/processor_32.h | 3 --- arch/sparc/include/asm/processor_64.h | 2 -- arch/sparc/kernel/process_32.c | 8 -------- arch/sparc/kernel/process_64.c | 19 ------------------- arch/tile/include/asm/processor.h | 7 ------- arch/um/include/asm/processor-generic.h | 2 -- arch/um/kernel/um_arch.c | 6 ------ arch/x86/include/asm/processor.h | 2 -- arch/x86/kernel/process.c | 11 ----------- arch/xtensa/include/asm/processor.h | 2 -- 41 files changed, 270 deletions(-) commit 9ae3b3f52c62ddd5eb12c57f195f4f38121faa01 Author: Jens Axboe Date: Wed Jun 28 15:30:13 2017 -0600 block: provide bio_uninit() free freeing integrity/task associations Wen reports significant memory leaks with DIF and O_DIRECT: "With nvme devive + T10 enabled, On a system it has 256GB and started logging /proc/meminfo & /proc/slabinfo for every minute and in an hour it increased by 15968128 kB or ~15+GB.. Approximately 256 MB / minute leaking. /proc/meminfo | grep SUnreclaim... SUnreclaim: 6752128 kB SUnreclaim: 6874880 kB SUnreclaim: 7238080 kB .... SUnreclaim: 22307264 kB SUnreclaim: 22485888 kB SUnreclaim: 22720256 kB When testcases with T10 enabled call into __blkdev_direct_IO_simple, code doesn't free memory allocated by bio_integrity_alloc. The patch fixes the issue. HTX has been run with +60 hours without failure." Since __blkdev_direct_IO_simple() allocates the bio on the stack, it doesn't go through the regular bio free. This means that any ancillary data allocated with the bio through the stack is not freed. Hence, we can leak the integrity data associated with the bio, if the device is using DIF/DIX. Fix this by providing a bio_uninit() and export it, so that we can use it to free this data. Note that this is a minimal fix for this issue. Any current user of bio's that are allocated outside of bio_alloc_bioset() suffers from this issue, most notably some drivers. We will fix those in a more comprehensive patch for 4.13. This also means that the commit marked as being fixed by this isn't the real culprit, it's just the most obvious one out there. Fixes: 542ff7bf18c6 ("block: new direct I/O implementation") Reported-by: Wen Xiong Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio.c | 12 +++++++++--- fs/block_dev.c | 5 ++++- include/linux/bio.h | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) commit e547204f1f4f314a7352f7b93332fdc1a2e4b24c Merge: 5a37be4 2e31b4c Author: Linus Torvalds Date: Wed Jun 28 13:27:15 2017 -0700 Merge tag 'nfs-for-4.12-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfixes from Trond Myklebust: "Bugfixes include: - stable fix for exclusive create if the server supports the umask attribute - trunking detection should handle ERESTARTSYS/EINTR - stable fix for a race in the LAYOUTGET function - stable fix to revert "nfs_rename() handle -ERESTARTSYS dentry left behind" - nfs4_callback_free_slot() cannot call nfs4_slot_tbl_drain_complete()" * tag 'nfs-for-4.12-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFSv4.1: nfs4_callback_free_slot() cannot call nfs4_slot_tbl_drain_complete() Revert "NFS: nfs_rename() handle -ERESTARTSYS dentry left behind" NFSv4.1: Fix a race in nfs4_proc_layoutget NFS: Trunking detection should handle ERESTARTSYS/EINTR NFSv4.2: Don't send mode again in post-EXCLUSIVE4_1 SETATTR with umask commit 5a37be4b51bbf85e37cdb5831899c330505faf03 Merge: cf72349 9ff1beb Author: Linus Torvalds Date: Wed Jun 28 13:22:26 2017 -0700 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "This is the final set of fixes for -rc8, just a few i915 and one vmwgfx ones. I'm off on holidays for a week, so if anything shows up for fixes I've asked Daniel or Sean Paul to herd it in the right direction" [ The additional etnaviv fixes were already herded towards me as seen in my previous pull - Linus ] * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/vmwgfx: Free hash table allocated by cmdbuf managed res mgr drm/i915: Disable EXEC_OBJECT_ASYNC when doing relocations drm/i915: Hold struct_mutex for per-file stats in debugfs/i915_gem_object drm/i915: Retire the VMA's fence tracker before unbinding commit cf723497f2b0dfd688dd27949f1d6e26a5aec44c Merge: 3c2bfba 426ef1b Author: Linus Torvalds Date: Wed Jun 28 13:13:48 2017 -0700 Merge branch 'etnaviv/fixes' of git://git.pengutronix.de/git/lst/linux Pull drm/etnaviv fixes from Lucas Stach: "I realized I just missed the cut-off point for the final drm fixes pull, but I have 2 more etnaviv fixes that need to go into 4.12, as they fix fallout from the explicit sync work introduced in the last merge window" [ Pulling directly because Dave is on vacation. Noted by Daniel Vetter, and acked by Dave Airlie - Linus ] * 'etnaviv/fixes' of git://git.pengutronix.de/git/lst/linux: drm/etnaviv: Fix implicit/explicit sync sense inversion drm/etnaviv: fix submit flags getting overwritten by BO content commit 84a21dbdef0b96d773599c33c2afbb002198d303 Author: Suravee Suthikulpanit Date: Mon Jun 26 04:28:04 2017 -0500 iommu/amd: Fix interrupt remapping when disable guest_mode Pass-through devices to VM guest can get updated IRQ affinity information via irq_set_affinity() when not running in guest mode. Currently, AMD IOMMU driver in GA mode ignores the updated information if the pass-through device is setup to use vAPIC regardless of guest_mode. This could cause invalid interrupt remapping. Also, the guest_mode bit should be set and cleared only when SVM updates posted-interrupt interrupt remapping information. Signed-off-by: Suravee Suthikulpanit Cc: Joerg Roedel Fixes: d98de49a53e48 ('iommu/amd: Enable vAPIC interrupt remapping mode by default') Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit fbaf94ee3cd5cfa85fe2d4d04be968820cb00556 Author: Miklos Szeredi Date: Wed Jun 28 13:41:22 2017 +0200 ovl: don't set origin on broken lower hardlink When copying up a file that has multiple hard links we need to break any association with the origin file. This makes copy-up be essentially an atomic replace. The new file has nothing to do with the old one (except having the same data and metadata initially), so don't set the overlay.origin attribute. We can relax this in the future when we are able to index upper object by origin. Signed-off-by: Miklos Szeredi Fixes: 3a1e819b4e80 ("ovl: store file handle of lower inode on copy up") fs/overlayfs/copy_up.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit e85f82ff9b8ef503923a3be8ca6b5fd1908a7f3f Author: Miklos Szeredi Date: Wed Jun 28 13:41:22 2017 +0200 ovl: copy-up: don't unlock between lookup and link Nothing prevents mischief on upper layer while we are busy copying up the data. Move the lookup right before the looked up dentry is actually used. Signed-off-by: Miklos Szeredi Fixes: 01ad3eb8a073 ("ovl: concurrent copy up of regular files") Cc: # v4.11 fs/overlayfs/copy_up.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit d94815f917da770d42c377786dc428f542e38f71 Author: Takashi Iwai Date: Wed Jun 28 12:02:02 2017 +0200 ALSA: hda - Fix endless loop of codec configure azx_codec_configure() loops over the codecs found on the given controller via a linked list. The code used to work in the past, but in the current version, this may lead to an endless loop when a codec binding returns an error. The culprit is that the snd_hda_codec_configure() unregisters the device upon error, and this eventually deletes the given codec object from the bus. Since the list is initialized via list_del_init(), the next object points to the same device itself. This behavior change was introduced at splitting the HD-audio code code, and forgotten to adapt it here. For fixing this bug, just use a *_safe() version of list iteration. Fixes: d068ebc25e6e ("ALSA: hda - Move some codes up to hdac_bus struct") Reported-by: Daniel Vetter Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_codec.h | 2 ++ sound/pci/hda/hda_controller.c | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit 426ef1bb40a3bd99ccd16d629bd1294805e96fc6 Author: Daniel Stone Date: Thu Jun 22 12:22:22 2017 +0100 drm/etnaviv: Fix implicit/explicit sync sense inversion We were reading the no-implicit sync flag the wrong way around, synchronizing too much for the explicit case, and not at all for the implicit case. Oops. Signed-off-by: Daniel Stone Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4a4381ba4944603905167d044d865990356ba22 Author: Lucas Stach Date: Tue Jun 27 16:02:51 2017 +0200 drm/etnaviv: fix submit flags getting overwritten by BO content The addition of the flags member to etnaviv_gem_submit structure didn't take into account that the last member of this structure is a variable length array. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gem.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9ff1beb1d19ffe2b26bf9cd2d33e6073d4f4b5fe Merge: 5193c08 611cdf3 Author: Dave Airlie Date: Wed Jun 28 17:07:15 2017 +1000 Merge tag 'drm-intel-fixes-2017-06-27' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes Just a few minor fixes. Important one is the execbuf async fix (aka ANDROID_native_sync). There was another patch for a display coherency corner case on APL, but we've random-walked in that space too much, and the cherry-pick looked really invasive. * tag 'drm-intel-fixes-2017-06-27' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: Disable EXEC_OBJECT_ASYNC when doing relocations drm/i915: Hold struct_mutex for per-file stats in debugfs/i915_gem_object drm/i915: Retire the VMA's fence tracker before unbinding commit 5193c08c7e82248cb6b1e5d672d261c4da6bb47b Merge: c0bc126 82fcee5 Author: Dave Airlie Date: Wed Jun 28 17:06:58 2017 +1000 Merge branch 'vmwgfx-fixes-4.12' of git://people.freedesktop.org/~thomash/linux into drm-fixes Single vmwgfx fix * 'vmwgfx-fixes-4.12' of git://people.freedesktop.org/~thomash/linux: drm/vmwgfx: Free hash table allocated by cmdbuf managed res mgr commit a8f20fd25bdce81a8e41767c39f456d346b63427 Author: Hui Wang Date: Wed Jun 28 08:59:16 2017 +0800 ALSA: hda - set input_path bitmap to zero after moving it to new place Recently we met a problem, the codec has valid adcs and input pins, and they can form valid input paths, but the driver does not build valid controls for them like "Mic boost", "Capture Volume" and "Capture Switch". Through debugging, I found the driver needs to shrink the invalid adcs and input paths for this machine, so it will move the whole column bitmap value to the previous column, after moving it, the driver forgets to set the original column bitmap value to zero, as a result, the driver will invalidate the path whose index value is the original colume bitmap value. After executing this function, all valid input paths are invalidated by a mistake, there are no any valid input paths, so the driver won't build controls for them. Fixes: 3a65bcdc577a ("ALSA: hda - Fix inconsistent input_paths after ADC reduction") Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/hda_generic.c | 1 + 1 file changed, 1 insertion(+) commit 2e31b4cb895ae78db31dffb860cd255d86c6561c Author: Trond Myklebust Date: Tue Jun 27 17:40:50 2017 -0400 NFSv4.1: nfs4_callback_free_slot() cannot call nfs4_slot_tbl_drain_complete() The current code works only for the case where we have exactly one slot, which is no longer true. nfs4_free_slot() will automatically declare the callback channel to be drained when all slots have been returned. Signed-off-by: Trond Myklebust fs/nfs/callback_xdr.c | 1 - 1 file changed, 1 deletion(-) commit d9f2950006f110f54444a10442752372ee568289 Author: Benjamin Coddington Date: Fri Jun 16 11:12:59 2017 -0400 Revert "NFS: nfs_rename() handle -ERESTARTSYS dentry left behind" This reverts commit 920b4530fb80430ff30ef83efe21ba1fa5623731 which could call d_move() without holding the directory's i_mutex, and reverts commit d4ea7e3c5c0e341c15b073016dbf3ab6c65f12f3 "NFS: Fix old dentry rehash after move", which was a follow-up fix. Signed-off-by: Benjamin Coddington Fixes: 920b4530fb80 ("NFS: nfs_rename() handle -ERESTARTSYS dentry left behind") Cc: stable@vger.kernel.org # v4.10+ Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust fs/nfs/dir.c | 51 ++++++++++++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 27 deletions(-) commit bd171930e6a3de4f5cffdafbb944e50093dfb59b Author: Trond Myklebust Date: Tue Jun 27 17:33:38 2017 -0400 NFSv4.1: Fix a race in nfs4_proc_layoutget If the task calling layoutget is signalled, then it is possible for the calls to nfs4_sequence_free_slot() and nfs4_layoutget_prepare() to race, in which case we leak a slot. The fix is to move the call to nfs4_sequence_free_slot() into the nfs4_layoutget_release() so that it gets called at task teardown time. Fixes: 2e80dbe7ac51 ("NFSv4.1: Close callback races for OPEN, LAYOUTGET...") Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 898fc11bb2bd4fbcefb685872d9fffaba2c8edaf Author: Trond Myklebust Date: Wed Jun 21 10:16:56 2017 -0400 NFS: Trunking detection should handle ERESTARTSYS/EINTR Currently, it will return EIO in those cases. Signed-off-by: Trond Myklebust fs/nfs/nfs4state.c | 2 ++ 1 file changed, 2 insertions(+) commit ddbfff7429a75d954bf5bdff9f2222bceb4c236a Author: Aleksandar Markovic Date: Mon Jun 19 17:50:12 2017 +0200 MIPS: math-emu: Handle zero accumulator case in MADDF and MSUBF separately If accumulator value is zero, just return the value of previously calculated product. This brings logic in MADDF/MSUBF implementation closer to the logic in ADD/SUB case. Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Cc: James.Hogan@imgtec.com Cc: Paul.Burton@imgtec.com Cc: Raghu.Gandham@imgtec.com Cc: Leonid.Yegoshin@imgtec.com Cc: Douglas.Leung@imgtec.com Cc: Petar.Jovanovic@imgtec.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16512/ Signed-off-by: Ralf Baechle arch/mips/math-emu/dp_maddf.c | 5 ++++- arch/mips/math-emu/sp_maddf.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) commit ebef7368571d88f0f80b817e6898075c62265b4e Author: Keith Busch Date: Tue Jun 27 17:44:05 2017 -0600 nvme/pci: Fix stuck nvme reset The controller state is set to resetting prior to disabling the controller, so this patch accounts for that state when deciding if it needs to freeze the queues. Without this, an 'nvme reset /dev/nvme0' blocks forever because the queues were never frozen. Fixes: 82b057caefaf ("nvme-pci: fix multiple ctrl removal scheduling") Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 25d8b92e0af75d72ce8b99e63e5a449cc0888efa Author: Karl Beldan Date: Tue Jun 27 19:22:16 2017 +0000 MIPS: head: Reorder instructions missing a delay slot In this sequence the 'move' is assumed in the delay slot of the 'beq', but head.S is in reorder mode and the former gets pushed one 'nop' farther by the assembler. The corrected behavior made booting with an UHI supplied dtb erratic. Fixes: 15f37e158892 ("MIPS: store the appended dtb address in a variable") Signed-off-by: Karl Beldan Reviewed-by: James Hogan Cc: Jonas Gorski Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/16614/ Signed-off-by: Ralf Baechle arch/mips/kernel/head.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e20bd60bf62a2448be873653c7febca1d4d73afc Author: Andrew F. Davis Date: Mon Jun 26 12:41:20 2017 -0500 net: usb: asix88179_178a: Add support for the Belkin B2B128 The Belkin B2B128 is a USB 3.0 Hub + Gigabit Ethernet Adapter, the Ethernet adapter uses the ASIX AX88179 USB 3.0 to Gigabit Ethernet chip supported by this driver, add the USB ID for the same. This patch is based on work by Geoffrey Tran who has indicated they would like this upstreamed by someone more familiar with the upstreaming process. Signed-off-by: Andrew F. Davis Signed-off-by: David S. Miller drivers/net/usb/ax88179_178a.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 85688d9adf68557233d974ef28971e69b89fb690 Author: Madalin Bucur Date: Mon Jun 26 18:47:00 2017 +0300 fsl/fman: add dependency on HAS_DMA A previous commit (5567e989198b5a8d) inserted a dependency on DMA API that requires HAS_DMA to be added in Kconfig. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 00a0ea33b495ee6149bf5a77ac5807ce87323abb Author: Vallish Vaidyeshwara Date: Fri Jun 23 18:53:06 2017 +0000 dm thin: do not queue freed thin mapping for next stage processing process_prepared_discard_passdown_pt1() should cleanup dm_thin_new_mapping in cases of error. dm_pool_inc_data_range() can fail trying to get a block reference: metadata operation 'dm_pool_inc_data_range' failed: error = -61 When dm_pool_inc_data_range() fails, dm thin aborts current metadata transaction and marks pool as PM_READ_ONLY. Memory for thin mapping is released as well. However, current thin mapping will be queued onto next stage as part of queue_passdown_pt2() or passdown_endio(). This dangling thin mapping memory when processed and accessed in next stage will lead to device mapper crashing. Code flow without fix: -> process_prepared_discard_passdown_pt1(m) -> dm_thin_remove_range() -> discard passdown --> passdown_endio(m) queues m onto next stage -> dm_pool_inc_data_range() fails, frees memory m but does not remove it from next stage queue -> process_prepared_discard_passdown_pt2(m) -> processes freed memory m and crashes One such stack: Call Trace: [] dm_cell_release_no_holder+0x2f/0x70 [dm_bio_prison] [] cell_defer_no_holder+0x3c/0x80 [dm_thin_pool] [] process_prepared_discard_passdown_pt2+0x4b/0x90 [dm_thin_pool] [] process_prepared+0x81/0xa0 [dm_thin_pool] [] do_worker+0xc5/0x820 [dm_thin_pool] [] ? __schedule+0x244/0x680 [] ? pwq_activate_delayed_work+0x42/0xb0 [] process_one_work+0x153/0x3f0 [] worker_thread+0x12b/0x4b0 [] ? rescuer_thread+0x350/0x350 [] kthread+0xca/0xe0 [] ? kthread_park+0x60/0x60 [] ret_from_fork+0x25/0x30 The fix is to first take the block ref count for discarded block and then do a passdown discard of this block. If block ref count fails, then bail out aborting current metadata transaction, mark pool as PM_READ_ONLY and also free current thin mapping memory (existing error handling code) without queueing this thin mapping onto next stage of processing. If block ref count succeeds, then passdown discard of this block. Discard callback of passdown_endio() will queue this thin mapping onto next stage of processing. Code flow with fix: -> process_prepared_discard_passdown_pt1(m) -> dm_thin_remove_range() -> dm_pool_inc_data_range() --> if fails, free memory m and bail out -> discard passdown --> passdown_endio(m) queues m onto next stage Cc: stable # v4.9+ Reviewed-by: Eduardo Valentin Reviewed-by: Cristian Gafton Reviewed-by: Anchal Agarwal Signed-off-by: Vallish Vaidyeshwara Reviewed-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-thin.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 6f64ec74515925cced6df4571638b5a099a49aae Author: Eric Dumazet Date: Tue Jun 27 07:02:20 2017 -0700 net: prevent sign extension in dev_get_stats() Similar to the fix provided by Dominik Heidler in commit 9b3dc0a17d73 ("l2tp: cast l2tp traffic counter to unsigned") we need to take care of 32bit kernels in dev_get_stats(). When using atomic_long_read(), we add a 'long' to u64 and might misinterpret high order bit, unless we cast to unsigned. Fixes: caf586e5f23ce ("net: add a core netdev->rx_dropped counter") Fixes: 015f0688f57ca ("net: net: add a core netdev->tx_dropped counter") Fixes: 6e7333d315a76 ("net: add rx_nohandler stat counter") Signed-off-by: Eric Dumazet Cc: Jarod Wilson Signed-off-by: David S. Miller net/core/dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3c2bfbaadff6e0c257bb6b16c9c97f43618b13dc Merge: da8b14e d360a68 Author: Linus Torvalds Date: Tue Jun 27 08:56:52 2017 -0700 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: "Three more fixes: - Fix the previous fix merged in the last pull for the Thumb2 decompressor. - A fix from Vladimir to correctly identify the V7M cache type. - The optimised 3G vmsplit case does not work with LPAE, so don't allow this to be selected for LPAE configurations" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8682/1: V7M: Set cacheid iff DminLine or IminLine is nonzero ARM: 8681/1: make VMSPLIT_3G_OPT depends on !ARM_LPAE ARM: 8680/1: boot/compressed: fix inappropriate Thumb2 mnemonic for __nop commit e3c2c4fb524b548e58108a8820c0ac7787667584 Merge: c0bc126 3f938ee Author: Ingo Molnar Date: Tue Jun 27 09:17:02 2017 +0200 Merge tag 'perf-urgent-for-mingo-4.12-20170626' 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 segfault for kernel.kptr_restrict=2 (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit da8b14e45c8b8234cb9a609c947f7e4d15f8dbef Merge: 9d646c9 91ebcd1 Author: Linus Torvalds Date: Mon Jun 26 12:25:59 2017 -0700 Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming Pull c6x fixlet from Mark Salter: "Update maintainer email" * tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming: MAINTAINERS: update email address for C6x maintainer commit 9d646c97e1abf777cf229031365860e7bc1c588c Merge: c0bc126 4130b28 Author: Linus Torvalds Date: Mon Jun 26 11:58:21 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 bugfix from Martin Schwidefsky: "One last s390 patch for 4.12 Revert the re-IPL semantics back to the v4.7 state. It turned out that the memory layout may change due to memory hotplug if load-normal is used" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/ipl: revert Load Normal semantics for LPAR CCW-type re-IPL commit 3f938ee2f6c4fff8d95b24636a0964b5a93cf547 Author: Jiri Olsa Date: Mon Jun 26 11:51:53 2017 +0200 perf machine: Fix segfault for kernel.kptr_restrict=2 Michael reported the segfault when kernel.kptr_restrict=2 is set. $ perf record ls ... perf: Segmentation fault Obtained 16 stack frames. ./perf(dump_stack+0x2d) [0x5068df] ./perf(sighandler_dump_stack+0x2d) [0x5069bf] ./perf() [0x43e47b] /lib64/libc.so.6(+0x3594f) [0x7f762004794f] /lib64/libc.so.6(strlen+0x26) [0x7f762009ef86] /lib64/libc.so.6(__strdup+0xd) [0x7f762009ecbd] ./perf(maps__set_kallsyms_ref_reloc_sym+0x4d) [0x51590f] ./perf(machine__create_kernel_maps+0x136) [0x50a7de] ./perf(perf_session__create_kernel_maps+0x2c) [0x510a81] ./perf(perf_session__new+0x13d) [0x510e23] ./perf() [0x43fd61] ./perf(cmd_record+0x704) [0x441823] ./perf() [0x4bc1a0] ./perf() [0x4bc40d] ./perf() [0x4bc55f] ./perf(main+0x2d5) [0x4bc939] Segmentation fault (core dumped) The reason is that with kernel.kptr_restrict=2, we don't get the symbol from machine__get_running_kernel_start, which we want to use in maps__set_kallsyms_ref_reloc_sym and we crash. Check the symbol name value before calling maps__set_kallsyms_ref_reloc_sym() and succeed without ref_reloc_sym being set. It's safe because we check its existence before we use it. Reported-by: Michael Petlan 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/20170626095153.553-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/machine.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit d6bd8194e2867e85ac2de63486d3b83ccfae4e62 Author: Michael Ellerman Date: Mon Jun 26 11:30:57 2017 +1000 powerpc/32: Avoid miscompilation w/GCC 4.6.3 - don't inline copy_to/from_user() Larry Finger reported that his Powerbook G4 was no longer booting with v4.12-rc, userspace was up but giving weird errors such as: udevd[64]: starting version 175 udevd[64]: Unable to receive ctrl message: Bad address. modprobe: chdir(4.12-rc1): No such file or directory He bisected the problem to commit 3448890c32c3 ("powerpc: get rid of zeroing, switch to RAW_COPY_USER"). Al identified that the problem is actually a miscompilation by GCC 4.6.3, which is exposed by the above commit. Al also pointed out that inlining copy_to/from_user() is probably of little or no benefit, which is correct. Using Anton's copy_to_user benchmark, with a pathological single byte copy, we see a small increase in performance by *removing* inlining: Before (inlined): # time ./copy_to_user -w -l 1 -i 10000000 ( x 3 ) real 0m22.063s real 0m22.059s real 0m22.076s After: # time ./copy_to_user -w -l 1 -i 10000000 ( x 3 ) real 0m21.325s real 0m21.299s real 0m21.364s So as a small performance improvement and to avoid the miscompilation, drop inlining copy_to/from_user() on 32-bit. Fixes: 3448890c32c3 ("powerpc: get rid of zeroing, switch to RAW_COPY_USER") Reported-by: Larry Finger Suggested-by: Al Viro Signed-off-by: Michael Ellerman arch/powerpc/include/asm/uaccess.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 82fcee526ba8ca2c5d378bdf51b21b7eb058fe3a Author: Deepak Rawat Date: Mon Jun 26 14:39:08 2017 +0200 drm/vmwgfx: Free hash table allocated by cmdbuf managed res mgr The hash table created during vmw_cmdbuf_res_man_create was never freed. This causes memory leak in context creation. Added the corresponding drm_ht_remove in vmw_cmdbuf_res_man_destroy. Tested for memory leak by running piglit overnight and kernel memory is not inflated which earlier was. Cc: Signed-off-by: Deepak Rawat Reviewed-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c | 1 + 1 file changed, 1 insertion(+) commit 98fe3633c5a44e5ee3d642907739eb0210407886 Author: Jérôme Glisse Date: Sat Jun 24 14:05:14 2017 -0400 x86/mm/hotplug: Fix BUG_ON() after hot-remove by not freeing PUD Since commit: af2cf278ef4f ("x86/mm/hotplug: Don't remove PGD entries in remove_pagetable()") we no longer free PUDs so that we do not have to synchronize all PGDs on hot-remove/vfree(). But the new 5-level page table patchset reverted that for 4-level page tables, in the following commit: f2a6a7050109: ("x86: Convert the rest of the code to support p4d_t") This patch restores the damage and disables free_pud() if we are in the 4-level page table case, thus avoiding BUG_ON() after hot-remove. Signed-off-by: Jérôme Glisse [ Clarified the changelog and the code comments. ] Reviewed-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Logan Gunthorpe Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170624180514.3821-1-jglisse@redhat.com Signed-off-by: Ingo Molnar arch/x86/mm/init_64.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 611cdf3695a307fdca3ff3779a1e6cca935e2d31 Author: Chris Wilson Date: Fri Jun 16 15:05:18 2017 +0100 drm/i915: Disable EXEC_OBJECT_ASYNC when doing relocations If we write a relocation into the buffer, we require our own implicit synchronisation added after the start of the execbuf, outside of the user's control. As we may end up clflushing, or doing the patch itself on the GPU, asynchronously we need to look at the implicit serialisation on obj->resv and hence need to disable EXEC_OBJECT_ASYNC for this object. If the user does trigger a stall for relocations, we make sure the stall is complete enough so that the batch is not submitted before we complete those relocations. Fixes: 77ae9957897d ("drm/i915: Enable userspace to opt-out of implicit fencing") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Jason Ekstrand Reviewed-by: Joonas Lahtinen (cherry picked from commit 071750e550af46b5d3a84ad56c2a108c3e136284) [danvet: Resolve conflicts, resolution reviewed by Tvrtko on irc.] Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_gem_execbuffer.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 2c7367626733e27d6f6d9906db7a31ada587566b Author: Chris Wilson Date: Sat Jun 17 12:57:44 2017 +0100 drm/i915: Hold struct_mutex for per-file stats in debugfs/i915_gem_object As we walk the obj->vma_list in per_file_stats(), we need to hold struct_mutex to prevent alteration of that list. Fixes: 1d2ac403ae3b ("drm: Protect dev->filelist with its own mutex") Fixes: c84455b4bacc ("drm/i915: Move debug only per-request pid tracking from request to ctx") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101460 Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170617115744.4452-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin (cherry picked from commit 0caf81b5c53d9bd332a95dbcb44db8de0b397a7c) Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_debugfs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d8462d0ad350ccd399899de051060ee562a5e537 Author: Chris Wilson Date: Tue Jun 20 13:43:19 2017 +0100 drm/i915: Retire the VMA's fence tracker before unbinding Since we may track unfenced access (GPU access to the vma that explicitly requires no fence), vma->last_fence may be set without any attached fence (vma->fence) and so will not be flushed when we call i915_vma_put_fence(). Since we stopped doing a full retire of the activity trackers for unbind, we need to explicitly retire each tracker. Fixes: b0decaf75bd9 ("drm/i915: Track active vma requests") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170620124321.1108-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin (cherry picked from commit 760a898d8069111704e1bd43f00ebf369ae46e57) Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_vma.c | 5 +++++ 1 file changed, 5 insertions(+) commit c0bc126f97fb929b3ae02c1c62322645d70eb408 Author: Linus Torvalds Date: Sun Jun 25 18:30:05 2017 -0700 Linux 4.12-rc7 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4fd8b3accf43d407472e34403d4b0a4df5c0e71 Merge: 5f4b37d 26fcd95 Author: Linus Torvalds Date: Sun Jun 25 12:01:56 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Thomas Gleixner: "A single fix to unbreak the vdso32 build for 64bit kernels caused by excess #includes in the mshyperv header" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mshyperv: Remove excess #includes from mshyperv.h commit 5f4b37d8784da4217ede8f8bcd301686853dcf8c Merge: 35d8d5d 8e6cec1c Author: Linus Torvalds Date: Sun Jun 25 11:59:19 2017 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "A few fixes for timekeeping and timers: - Plug a subtle race due to a missing READ_ONCE() in the timekeeping code where reloading of a pointer results in an inconsistent callback argument being supplied to the clocksource->read function. - Correct the CLOCK_MONOTONIC_RAW sub-nanosecond accounting in the time keeping core code, to prevent a possible discontuity. - Apply a similar fix to the arm64 vdso clock_gettime() implementation - Add missing includes to clocksource drivers, which relied on indirect includes which fails in certain configs. - Use the proper iomem pointer for read/iounmap in a probe function" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW time: Fix CLOCK_MONOTONIC_RAW sub-nanosecond accounting time: Fix clock->read(clock) race around clocksource changes clocksource: Explicitly include linux/clocksource.h when needed clocksource/drivers/arm_arch_timer: Fix read and iounmap of incorrect variable commit 35d8d5d47c0ef066197f629f71cdd6039693b86d Merge: 1a8cca1 977282e Author: Linus Torvalds Date: Sun Jun 25 11:55:21 2017 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "Three fixlets for perf: - Return the proper error code if aux buffers for a event are not supported. - Calculate the probe offset for inlined functions correctly - Update the Skylake DTLB load/store miss event so it can count 1G TLB entries as well" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf probe: Fix probe definition for inlined functions perf/x86/intel: Add 1G DTLB load/store miss support for SKL perf/aux: Correct return code of rb_alloc_aux() if !has_aux(ev) commit 1a8cca1880e6127a22cf6604b3c4ccd8b27cbf65 Merge: 412572b 9f93d87 Author: Linus Torvalds Date: Sun Jun 25 11:53:36 2017 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Thomas Gleixner: "A single fix for the MIPS GIC to prevent ftrace recursion" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/mips-gic: Mark count and compare accessors notrace commit 412572bffa9d1bc0f3ebae39291a815dad1d0418 Merge: d5d5c18 9768935 Author: Linus Torvalds Date: Sun Jun 25 10:39:43 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - a quirk to i8042 to ignore timeout bit on Lifebook AH544 - a fixup to Synaptics RMI function 54 that was breaking some Dells - a fix for memory leak in soc_button_array driver * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics-rmi4 - only read the F54 query registers which are used Input: i8042 - add Fujitsu Lifebook AH544 to notimeout list Input: soc_button_array - fix leaking the ACPI button descriptor buffer commit d5d5c1825e85a144e67448ad777eff441ddb907f Merge: bb9b8fd abb85a9 Author: Linus Torvalds Date: Sun Jun 25 10:36:44 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending Pull SCSI target fixes from Nicholas Bellinger: "Here are the target-pending fixes for v4.12-rc7 that have been queued up for the last 2 weeks. This includes: - Fix a TMR related kref underflow detected by the recent refcount_t conversion in upstream. - Fix a iscsi-target corner case during explicit connection logout timeout failure. - Address last fallout in iscsi-target immediate data handling from v4.4 target-core now allowing control CDB payload underflow" * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: iscsi-target: Reject immediate data underflow larger than SCSI transfer length iscsi-target: Fix delayed logout processing greater than SECONDS_FOR_LOGOUT_COMP target: Fix kref->refcount underflow in transport_cmd_finish_abort commit d747a7a51b00984127a88113cdbbc26f91e9d815 Author: WANG Cong Date: Sat Jun 24 23:50:30 2017 -0700 tcp: reset sk_rx_dst in tcp_disconnect() We have to reset the sk->sk_rx_dst when we disconnect a TCP connection, because otherwise when we re-connect it this dst reference is simply overridden in tcp_finish_connect(). This fixes a dst leak which leads to a loopback dev refcnt leak. It is a long-standing bug, Kevin reported a very similar (if not same) bug before. Thanks to Andrei for providing such a reliable reproducer which greatly narrows down the problem. Fixes: 41063e9dd119 ("ipv4: Early TCP socket demux.") Reported-by: Andrei Vagin Reported-by: Kevin Xu Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/ipv4/tcp.c | 2 ++ 1 file changed, 2 insertions(+) commit 85cb73ff9b74785a7fc752875d7f0fe17ca3ea7c Author: Wei Wang Date: Fri Jun 23 15:25:37 2017 -0700 net: ipv6: reset daddr and dport in sk if connect() fails In __ip6_datagram_connect(), reset sk->sk_v6_daddr and inet->dport if error occurs. In udp_v6_early_demux(), check for sk_state to make sure it is in TCP_ESTABLISHED state. Together, it makes sure unconnected UDP socket won't be considered as a valid candidate for early demux. v3: add TCP_ESTABLISHED state check in udp_v6_early_demux() v2: fix compilation error Fixes: 5425077d73e0 ("net: ipv6: Add early demux handler for UDP unicast") Signed-off-by: Wei Wang Acked-by: Maciej Żenczykowski Signed-off-by: David S. Miller net/ipv6/datagram.c | 8 +++++++- net/ipv6/udp.c | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) commit d0c32a16235aeacd32c9de6ff90f9219614d7e4e Author: Mintz, Yuval Date: Sat Jun 24 15:37:00 2017 +0300 bnx2x: Don't log mc removal needlessly When mc configuration changes bnx2x_config_mcast() can return 0 for success, negative for failure and positive for benign reason preventing its immediate work, e.g., when the command awaits the completion of a previously sent command. When removing all configured macs on a 578xx adapter, if a positive value would be returned driver would errneously log it as an error. Fixes: c7b7b483ccc9 ("bnx2x: Don't flush multicast MACs") Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb9b8fd26b50c9ec822805b9d877bec9d88acff4 Merge: f65013d ad81810 Author: Linus Torvalds Date: Sat Jun 24 16:18:00 2017 -0700 Merge tag 'kbuild-fixes-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: "Nothing scary, just some random fixes: - fix warnings of host programs - fix "make tags" when COMPILED_SOURCE=1 is specified along with O= - clarify help message of C=1 option - fix dependency for ncurses compatibility check - fix "make headers_install" for fakechroot environment" * tag 'kbuild-fixes-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: fix sparse warnings in nconfig kbuild: fix header installation under fakechroot environment kconfig: Check for libncurses before menuconfig Kbuild: tiny correction on `make help` tags: honor COMPILED_SOURCE with apart output directory genksyms: add printf format attribute to error_with_pos() commit f65013d655ac9639f37d3b54189f6468f672e60b Merge: 94a6df2 57db7e4 Author: Linus Torvalds Date: Sat Jun 24 02:24:53 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull timer fix from Eric Biederman: "This fixes an issue of confusing injected signals with the signals from posix timers that has existed since posix timers have been in the kernel. This patch is slightly simpler than my earlier version of this patch as I discovered in testing that I had misspelled "#ifdef CONFIG_POSIX_TIMERS". So I deleted that unnecessary test and made setting of resched_timer uncondtional. I have tested this and verified that without this patch there is a nasty hang that is easy to trigger, and with this patch everything works properly" Thomas Gleixner dixit: "It fixes the problem at hand and covers the ptrace case as well, which I missed. Reviewed-and-tested-by: Thomas Gleixner " * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: signal: Only reschedule timers on signals timers have sent commit 26fcd952d5c977a94ac64bb44ed409e37607b2c9 Author: Thomas Gleixner Date: Fri Jun 23 10:50:38 2017 +0200 x86/mshyperv: Remove excess #includes from mshyperv.h A recent commit included linux/slab.h in linux/irq.h. This breaks the build of vdso32 on a 64-bit kernel. The reason is that linux/irq.h gets included into the vdso code via linux/interrupt.h which is included from asm/mshyperv.h. That makes the 32-bit vdso compile fail, because slab.h includes the pgtable headers for 64-bit on a 64-bit build. Neither linux/clocksource.h nor linux/interrupt.h are needed in the mshyperv.h header file itself - it has a dependency on . Remove the includes and unbreak the build. Reported-by: Ingo Molnar Signed-off-by: Thomas Gleixner Cc: K. Y. Srinivasan Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Vitaly Kuznetsov Cc: devel@linuxdriverproject.org Fixes: dee863b571b0 ("hv: export current Hyper-V clocksource") Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1706231038460.2647@nanos Signed-off-by: Ingo Molnar arch/x86/include/asm/mshyperv.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 94a6df251dd08c6436ebd6d10c68f03659148ce1 Merge: cd5545a 34f19ff Author: Linus Torvalds Date: Fri Jun 23 17:53:16 2017 -0700 Merge tag 'powerpc-4.12-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Some more powerpc fixes for 4.12. Most of these actually came in last week but got held up for some more testing. - three fixes for kprobes/ftrace/livepatch interactions. - properly handle data breakpoints when using the Radix MMU. - fix for perf sampling of registers during call_usermodehelper(). - properly initialise the thread_info on our emergency stacks - add an explicit flush when doing TLB invalidations for a process using NPU2. Thanks to: Alistair Popple, Naveen N. Rao, Nicholas Piggin, Ravi Bangoria, Masami Hiramatsu" * tag 'powerpc-4.12-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64: Initialise thread_info for emergency stacks powerpc/powernv/npu-dma: Add explicit flush when sending an ATSD powerpc/perf: Fix oops when kthread execs user process powerpc/64s: Handle data breakpoints in Radix mode powerpc/kprobes: Skip livepatch_handler() for jprobes powerpc/ftrace: Pass the correct stack pointer for DYNAMIC_FTRACE_WITH_REGS powerpc/kprobes: Pause function_graph tracing during jprobes handling commit cd5545ae87ed9ca76dba7753b436713ce8df2872 Merge: ba6cbdb e4330d8b Author: Linus Torvalds Date: Fri Jun 23 17:49:12 2017 -0700 Merge tag 'acpi-4.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "This fixes the ACPI-based enumeration of some I2C and SPI devices broken in 4.11. Specifics: - I2C and SPI devices are expected to be enumerated by the I2C and SPI subsystems, respectively, but due to a change made during the 4.11 cycle, in some cases the ACPI core marks them as already enumerated which causes the I2C and SPI subsystems to overlook them, so fix that (Jarkko Nikula)" * tag 'acpi-4.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / scan: Fix enumeration for special SPI and I2C devices commit ba6cbdb673c287cee87a965266419fd2111e20c4 Merge: 25b2398 6c782a5 Author: Linus Torvalds Date: Fri Jun 23 17:46:10 2017 -0700 Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fix from Wolfram Sang. * 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: imx: Use correct function to write to register commit 25b2398f5c0167accd6d0ab18db0561ac22ca6cc Merge: 51c933f 6c7515c Author: Linus Torvalds Date: Fri Jun 23 17:40:41 2017 -0700 Merge tag 'gpio-v4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fix from Linus Walleij: "A single GPIO patch fixing the compatible string for the MVEBU PWM controller embedded in the GPIO controller before we release v4.12. Hopefully" * tag 'gpio-v4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: mvebu: change compatible string for PWM support commit 51c933f208c51b3e5371779ba3c246bde144ed11 Merge: 311548f c7ecb90 Author: Linus Torvalds Date: Fri Jun 23 17:37:56 2017 -0700 Merge tag 'sound-4.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Nothing exciting here, just a few stable fixes: - suppress spurious kernel WARNING in PCM core - fix potential spin deadlock at error handling in firewire - HD-audio PCI ID addition / fixup" * tag 'sound-4.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Apply quirks to Broxton-T, too ALSA: firewire-lib: Fix stall of process context at packet error ALSA: pcm: Don't treat NULL chmap as a fatal error ALSA: hda - Add Coffelake PCI ID commit 311548f173ff53bd4c7407eaf52097d00d2ea4de Merge: 7139a06 33ce756 Author: Linus Torvalds Date: Fri Jun 23 17:35:57 2017 -0700 Merge tag 'drm-fixes-for-v4.12-rc7' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "A varied bunch of fixes, one for an API regression with connectors. Otherwise amdgpu and i915 have a bunch of varied fixes, the shrinker ones being the most important" * tag 'drm-fixes-for-v4.12-rc7' of git://people.freedesktop.org/~airlied/linux: drm: Fix GETCONNECTOR regression drm/radeon: add a quirk for Toshiba Satellite L20-183 drm/radeon: add a PX quirk for another K53TK variant drm/amdgpu: adjust default display clock drm/amdgpu/atom: fix ps allocation size for EnableDispPowerGating drm/amdgpu: add Polaris12 DID drm/i915: Don't enable backlight at setup time. drm/i915: Plumb the correct acquire ctx into intel_crtc_disable_noatomic() drm/i915: Fix deadlock witha the pipe A quirk during resume drm/i915: Remove __GFP_NORETRY from our buffer allocator drm/i915: Encourage our shrinker more when our shmemfs allocations fails drm/i915: Differentiate between sw write location into ring and last hw read commit 7139a06b1637fa09d826997d6b869c59d40ac5c1 Merge: 7ec2f7e 4a072c7 Author: Linus Torvalds Date: Fri Jun 23 17:33:46 2017 -0700 Merge tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random Pull random fixes from Ted Ts'o: "Fix some locking and gcc optimization issues from the most recent random_for_linus_stable pull request" * tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: random: silence compiler warnings and fix race commit 7ec2f7e8d9b5d4186e407cdc0a3a84a932bc52f5 Merge: 337c6ba feb7695 Author: Linus Torvalds Date: Fri Jun 23 17:32:05 2017 -0700 Merge tag 'for-4.12/dm-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - a revert of a DM mirror commit that has proven to make the code prone to crash - a DM io reference count fix that resolves a NULL pointer seen when issuing discards to a DM mirror target's device whose mirror legs do not all support discards - a couple DM integrity fixes * tag 'for-4.12/dm-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm io: fix duplicate bio completion due to missing ref count dm integrity: fix to not disable/enable interrupts from interrupt context Revert "dm mirror: use all available legs on multiple failures" dm integrity: reject mappings too large for device commit 337c6ba2d8691596bcada9e73eb40f612e4f5735 Merge: 2592d2e 98da7d0 Author: Linus Torvalds Date: Fri Jun 23 16:30:52 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "8 fixes" * emailed patches from Andrew Morton : fs/exec.c: account for argv/envp pointers ocfs2: fix deadlock caused by recursive locking in xattr slub: make sysfs file removal asynchronous lib/cmdline.c: fix get_options() overflow while parsing ranges fs/dax.c: fix inefficiency in dax_writeback_mapping_range() autofs: sanity check status reported with AUTOFS_DEV_IOCTL_FAIL mm/vmalloc.c: huge-vmap: fail gracefully on unexpected huge vmap mappings mm, thp: remove cond_resched from __collapse_huge_page_copy commit 98da7d08850fb8bdeb395d6368ed15753304aa0c Author: Kees Cook Date: Fri Jun 23 15:08:57 2017 -0700 fs/exec.c: account for argv/envp pointers When limiting the argv/envp strings during exec to 1/4 of the stack limit, the storage of the pointers to the strings was not included. This means that an exec with huge numbers of tiny strings could eat 1/4 of the stack limit in strings and then additional space would be later used by the pointers to the strings. For example, on 32-bit with a 8MB stack rlimit, an exec with 1677721 single-byte strings would consume less than 2MB of stack, the max (8MB / 4) amount allowed, but the pointers to the strings would consume the remaining additional stack space (1677721 * 4 == 6710884). The result (1677721 + 6710884 == 8388605) would exhaust stack space entirely. Controlling this stack exhaustion could result in pathological behavior in setuid binaries (CVE-2017-1000365). [akpm@linux-foundation.org: additional commenting from Kees] Fixes: b6a2fea39318 ("mm: variable length argument support") Link: http://lkml.kernel.org/r/20170622001720.GA32173@beast Signed-off-by: Kees Cook Acked-by: Rik van Riel Acked-by: Michal Hocko Cc: Alexander Viro Cc: Qualys Security Advisory Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/exec.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) commit 8818efaaacb78c60a9d90c5705b6c99b75d7d442 Author: Eric Ren Date: Fri Jun 23 15:08:55 2017 -0700 ocfs2: fix deadlock caused by recursive locking in xattr Another deadlock path caused by recursive locking is reported. This kind of issue was introduced since commit 743b5f1434f5 ("ocfs2: take inode lock in ocfs2_iop_set/get_acl()"). Two deadlock paths have been fixed by commit b891fa5024a9 ("ocfs2: fix deadlock issue when taking inode lock at vfs entry points"). Yes, we intend to fix this kind of case in incremental way, because it's hard to find out all possible paths at once. This one can be reproduced like this. On node1, cp a large file from home directory to ocfs2 mountpoint. While on node2, run setfacl/getfacl. Both nodes will hang up there. The backtraces: On node1: __ocfs2_cluster_lock.isra.39+0x357/0x740 [ocfs2] ocfs2_inode_lock_full_nested+0x17d/0x840 [ocfs2] ocfs2_write_begin+0x43/0x1a0 [ocfs2] generic_perform_write+0xa9/0x180 __generic_file_write_iter+0x1aa/0x1d0 ocfs2_file_write_iter+0x4f4/0xb40 [ocfs2] __vfs_write+0xc3/0x130 vfs_write+0xb1/0x1a0 SyS_write+0x46/0xa0 On node2: __ocfs2_cluster_lock.isra.39+0x357/0x740 [ocfs2] ocfs2_inode_lock_full_nested+0x17d/0x840 [ocfs2] ocfs2_xattr_set+0x12e/0xe80 [ocfs2] ocfs2_set_acl+0x22d/0x260 [ocfs2] ocfs2_iop_set_acl+0x65/0xb0 [ocfs2] set_posix_acl+0x75/0xb0 posix_acl_xattr_set+0x49/0xa0 __vfs_setxattr+0x69/0x80 __vfs_setxattr_noperm+0x72/0x1a0 vfs_setxattr+0xa7/0xb0 setxattr+0x12d/0x190 path_setxattr+0x9f/0xb0 SyS_setxattr+0x14/0x20 Fix this one by using ocfs2_inode_{lock|unlock}_tracker, which is exported by commit 439a36b8ef38 ("ocfs2/dlmglue: prepare tracking logic to avoid recursive cluster lock"). Link: http://lkml.kernel.org/r/20170622014746.5815-1-zren@suse.com Fixes: 743b5f1434f5 ("ocfs2: take inode lock in ocfs2_iop_set/get_acl()") Signed-off-by: Eric Ren Reported-by: Thomas Voegtle Tested-by: Thomas Voegtle 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/dlmglue.c | 4 ++++ fs/ocfs2/xattr.c | 23 +++++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) commit 3b7b314053d021601940c50b07f5f1423ae67e21 Author: Tejun Heo Date: Fri Jun 23 15:08:52 2017 -0700 slub: make sysfs file removal asynchronous Commit bf5eb3de3847 ("slub: separate out sysfs_slab_release() from sysfs_slab_remove()") made slub sysfs file removals synchronous to kmem_cache shutdown. Unfortunately, this created a possible ABBA deadlock between slab_mutex and sysfs draining mechanism triggering the following lockdep warning. ====================================================== [ INFO: possible circular locking dependency detected ] 4.10.0-test+ #48 Not tainted ------------------------------------------------------- rmmod/1211 is trying to acquire lock: (s_active#120){++++.+}, at: [] kernfs_remove+0x23/0x40 but task is already holding lock: (slab_mutex){+.+.+.}, at: [] kmem_cache_destroy+0x41/0x2d0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (slab_mutex){+.+.+.}: lock_acquire+0xf6/0x1f0 __mutex_lock+0x75/0x950 mutex_lock_nested+0x1b/0x20 slab_attr_store+0x75/0xd0 sysfs_kf_write+0x45/0x60 kernfs_fop_write+0x13c/0x1c0 __vfs_write+0x28/0x120 vfs_write+0xc8/0x1e0 SyS_write+0x49/0xa0 entry_SYSCALL_64_fastpath+0x1f/0xc2 -> #0 (s_active#120){++++.+}: __lock_acquire+0x10ed/0x1260 lock_acquire+0xf6/0x1f0 __kernfs_remove+0x254/0x320 kernfs_remove+0x23/0x40 sysfs_remove_dir+0x51/0x80 kobject_del+0x18/0x50 __kmem_cache_shutdown+0x3e6/0x460 kmem_cache_destroy+0x1fb/0x2d0 kvm_exit+0x2d/0x80 [kvm] vmx_exit+0x19/0xa1b [kvm_intel] SyS_delete_module+0x198/0x1f0 entry_SYSCALL_64_fastpath+0x1f/0xc2 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(slab_mutex); lock(s_active#120); lock(slab_mutex); lock(s_active#120); *** DEADLOCK *** 2 locks held by rmmod/1211: #0: (cpu_hotplug.dep_map){++++++}, at: [] get_online_cpus+0x37/0x80 #1: (slab_mutex){+.+.+.}, at: [] kmem_cache_destroy+0x41/0x2d0 stack backtrace: CPU: 3 PID: 1211 Comm: rmmod Not tainted 4.10.0-test+ #48 Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v02.05 05/07/2012 Call Trace: print_circular_bug+0x1be/0x210 __lock_acquire+0x10ed/0x1260 lock_acquire+0xf6/0x1f0 __kernfs_remove+0x254/0x320 kernfs_remove+0x23/0x40 sysfs_remove_dir+0x51/0x80 kobject_del+0x18/0x50 __kmem_cache_shutdown+0x3e6/0x460 kmem_cache_destroy+0x1fb/0x2d0 kvm_exit+0x2d/0x80 [kvm] vmx_exit+0x19/0xa1b [kvm_intel] SyS_delete_module+0x198/0x1f0 ? SyS_delete_module+0x5/0x1f0 entry_SYSCALL_64_fastpath+0x1f/0xc2 It'd be the cleanest to deal with the issue by removing sysfs files without holding slab_mutex before the rest of shutdown; however, given the current code structure, it is pretty difficult to do so. This patch punts sysfs file removal to a work item. Before commit bf5eb3de3847, the removal was punted to a RCU delayed work item which is executed after release. Now, we're punting to a different work item on shutdown which still maintains the goal removing the sysfs files earlier when destroying kmem_caches. Link: http://lkml.kernel.org/r/20170620204512.GI21326@htj.duckdns.org Fixes: bf5eb3de3847 ("slub: separate out sysfs_slab_release() from sysfs_slab_remove()") Signed-off-by: Tejun Heo Reported-by: Steven Rostedt (VMware) Tested-by: Steven Rostedt (VMware) Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slub_def.h | 1 + mm/slub.c | 40 ++++++++++++++++++++++++++-------------- 2 files changed, 27 insertions(+), 14 deletions(-) commit a91e0f680bcd9e10c253ae8b62462a38bd48f09f Author: Ilya Matveychikov Date: Fri Jun 23 15:08:49 2017 -0700 lib/cmdline.c: fix get_options() overflow while parsing ranges When using get_options() it's possible to specify a range of numbers, like 1-100500. The problem is that it doesn't track array size while calling internally to get_range() which iterates over the range and fills the memory with numbers. Link: http://lkml.kernel.org/r/2613C75C-B04D-4BFF-82A6-12F97BA0F620@gmail.com Signed-off-by: Ilya V. Matveychikov Cc: Jonathan Corbet Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/cmdline.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1eb643d02b21412e603b42cdd96010a2ac31c05f Author: Jan Kara Date: Fri Jun 23 15:08:46 2017 -0700 fs/dax.c: fix inefficiency in dax_writeback_mapping_range() dax_writeback_mapping_range() fails to update iteration index when searching radix tree for entries needing cache flushing. Thus each pagevec worth of entries is searched starting from the start which is inefficient and prone to livelocks. Update index properly. Link: http://lkml.kernel.org/r/20170619124531.21491-1-jack@suse.cz Fixes: 9973c98ecfda3 ("dax: add support for fsync/sync") Signed-off-by: Jan Kara Reviewed-by: Ross Zwisler Cc: Dan Williams Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 1 + 1 file changed, 1 insertion(+) commit 9fa4eb8e490a28de40964b1b0e583d8db4c7e57c Author: NeilBrown Date: Fri Jun 23 15:08:43 2017 -0700 autofs: sanity check status reported with AUTOFS_DEV_IOCTL_FAIL If a positive status is passed with the AUTOFS_DEV_IOCTL_FAIL ioctl, autofs4_d_automount() will return ERR_PTR(status) with that status to follow_automount(), which will then dereference an invalid pointer. So treat a positive status the same as zero, and map to ENOENT. See comment in systemd src/core/automount.c::automount_send_ready(). Link: http://lkml.kernel.org/r/871sqwczx5.fsf@notabene.neil.brown.name Signed-off-by: NeilBrown Cc: Ian Kent Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/dev-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 029c54b09599573015a5c18dbe59cbdf42742237 Author: Ard Biesheuvel Date: Fri Jun 23 15:08:41 2017 -0700 mm/vmalloc.c: huge-vmap: fail gracefully on unexpected huge vmap mappings Existing code that uses vmalloc_to_page() may assume that any address for which is_vmalloc_addr() returns true may be passed into vmalloc_to_page() to retrieve the associated struct page. This is not un unreasonable assumption to make, but on architectures that have CONFIG_HAVE_ARCH_HUGE_VMAP=y, it no longer holds, and we need to ensure that vmalloc_to_page() does not go off into the weeds trying to dereference huge PUDs or PMDs as table entries. Given that vmalloc() and vmap() themselves never create huge mappings or deal with compound pages at all, there is no correct answer in this case, so return NULL instead, and issue a warning. When reading /proc/kcore on arm64, you will hit an oops as soon as you hit the huge mappings used for the various segments that make up the mapping of vmlinux. With this patch applied, you will no longer hit the oops, but the kcore contents willl be incorrect (these regions will be zeroed out) We are fixing this for kcore specifically, so it avoids vread() for those regions. At least one other problematic user exists, i.e., /dev/kmem, but that is currently broken on arm64 for other reasons. Link: http://lkml.kernel.org/r/20170609082226.26152-1-ard.biesheuvel@linaro.org Signed-off-by: Ard Biesheuvel Acked-by: Mark Rutland Reviewed-by: Laura Abbott Cc: Michal Hocko Cc: zhong jiang Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit c891d9f6bf2a78c9c657656872a60807820db4c8 Author: David Rientjes Date: Fri Jun 23 15:08:38 2017 -0700 mm, thp: remove cond_resched from __collapse_huge_page_copy This is a partial revert of commit 338a16ba1549 ("mm, thp: copying user pages must schedule on collapse") which added a cond_resched() to __collapse_huge_page_copy(). On x86 with CONFIG_HIGHPTE, __collapse_huge_page_copy is called in atomic context and thus scheduling is not possible. This is only a possible config on arm and i386. Although need_resched has been shown to be set for over 100 jiffies while doing the iteration in __collapse_huge_page_copy, this is better than doing if (in_atomic()) cond_resched() to cover only non-CONFIG_HIGHPTE configs. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1706191341550.97821@chino.kir.corp.google.com Signed-off-by: David Rientjes Reported-by: Larry Finger Tested-by: Larry Finger Acked-by: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/khugepaged.c | 1 - 1 file changed, 1 deletion(-) commit 2592d2ef0448e24878fce24c3fc0ca525f65f286 Merge: 7b249bd 02d94e0 Author: Linus Torvalds Date: Fri Jun 23 12:25:37 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two fixes to remove spurious WARN_ONs from the new(ish) qedi driver. The driver already prints a warning message, there's no need to panic users by printing something that looks like an oops as well" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: qedi: Remove WARN_ON from clear task context. scsi: qedi: Remove WARN_ON for untracked cleanup. commit 7b249bdc3dec656b87bc569d4adcccbfbd525ec1 Merge: a38371c eb5e248 Author: Linus Torvalds Date: Fri Jun 23 12:23:06 2017 -0700 Merge tag 'xfs-4.12-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "I have one more bugfix for you for 4.12-rc7 to fix a disk corruption problem: - don't allow swapon on files on the realtime device, because the swap code will swap pages out to blocks on the data device, thereby corrupting the filesystem" * tag 'xfs-4.12-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: don't allow bmap on rt files commit 92cc8a5105e1236584e92288595ddbd2149bb6cf Merge: db9d8b2 2270bc5 Author: David S. Miller Date: Fri Jun 23 14:48:28 2017 -0400 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: Error handling and netpoll fixes. Add missing error handling and fix netpoll handling. The current code handles RX and TX events in netpoll mode and is causing lots of warnings and errors in the RX code path in netpoll mode. The fix is to only handle TX events in netpoll mode. ==================== Signed-off-by: David S. Miller commit 2270bc5da34979454e6f2eb133d800b635156174 Author: Michael Chan Date: Fri Jun 23 14:01:01 2017 -0400 bnxt_en: Fix netpoll handling. To handle netpoll properly, the driver must only handle TX packets during NAPI. Handling RX events cause warnings and errors in netpoll mode. The ndo_poll_controller() method should call napi_schedule() directly so that a NAPI weight of zero will be used during netpoll mode. The bnxt_en driver supports 2 ring modes: combined, and separate rx/tx. In separate rx/tx mode, the ndo_poll_controller() method will only process the tx rings. In combined mode, the rx and tx completion entries are mixed in the completion ring and we need to drop the rx entries and recycle the rx buffers. Add a function bnxt_force_rx_discard() to handle this in netpoll mode when we see rx entries in combined ring mode. Reported-by: Calvin Owens Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 54 +++++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 6 deletions(-) commit 69c149e2e39e8d66437c9034bb4926ef2c1f7c23 Author: Michael Chan Date: Fri Jun 23 14:01:00 2017 -0400 bnxt_en: Add missing logic to handle TPA end error conditions. When we get a TPA_END completion to handle a completed LRO packet, it is possible that hardware would indicate errors. The current code is not checking for the error condition. Define the proper error bits and the macro to check for this error and abort properly. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 7 ++++--- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) commit db9d8b29d19d2801793e4419f4c6272bf8951c62 Author: Richard Cochran Date: Fri Jun 23 17:51:31 2017 +0200 net: dp83640: Avoid NULL pointer dereference. The function, skb_complete_tx_timestamp(), used to allow passing in a NULL pointer for the time stamps, but that was changed in commit 62bccb8cdb69051b95a55ab0c489e3cab261c8ef ("net-timestamp: Make the clone operation stand-alone from phy timestamping"), and the existing call sites, all of which are in the dp83640 driver, were fixed up. Even though the kernel-doc was subsequently updated in commit 7a76a021cd5a292be875fbc616daf03eab1e6996 ("net-timestamp: Update skb_complete_tx_timestamp comment"), still a bug fix from Manfred Rudigier came into the driver using the old semantics. Probably Manfred derived that patch from an older kernel version. This fix should be applied to the stable trees as well. Fixes: 81e8f2e930fe ("net: dp83640: Fix tx timestamp overflow handling.") Signed-off-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/phy/dp83640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43b786c6765945310cabc61a5e29b97ced85f7f0 Merge: 0ccc22f ca3a1b8 Author: David S. Miller Date: Fri Jun 23 14:11:26 2017 -0400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2017-06-23 1) Fix xfrm garbage collecting when unregistering a netdevice. From Hangbin Liu. 2) Fix NULL pointer derefernce when exiting a network namespace. From Hangbin Liu. 3) Fix some error codes in pfkey to prevent a NULL pointer derefernce. From Dan Carpenter. 4) Fix NULL pointer derefernce on allocation failure in pfkey. From Dan Carpenter. 5) Adjust IPv6 payload_len to include extension headers. Otherwise we corrupt the packets when doing ESP GRO on transport mode. From Yossi Kuperman. 6) Set nhoff to the proper offset of the IPv6 nexthdr when doing ESP GRO. From Yossi Kuperman. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 0ccc22f425e56c4ede9c66f1945846de8ac1f352 Author: WANG Cong Date: Thu Jun 22 15:29:33 2017 -0700 sit: use __GFP_NOWARN for user controlled allocation The memory allocation size is controlled by user-space, if it is too large just fail silently and return NULL, not to mention there is a fallback allocation later. Reported-by: Andrey Konovalov Signed-off-by: Cong Wang Tested-by: Andrey Konovalov Signed-off-by: David S. Miller net/ipv6/sit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5cb659bbc1c8644efa0c3138a757a1e432a4880 Author: Michal Kubeček Date: Mon Jun 19 13:03:43 2017 +0200 net: account for current skb length when deciding about UFO Our customer encountered stuck NFS writes for blocks starting at specific offsets w.r.t. page boundary caused by networking stack sending packets via UFO enabled device with wrong checksum. The problem can be reproduced by composing a long UDP datagram from multiple parts using MSG_MORE flag: sendto(sd, buff, 1000, MSG_MORE, ...); sendto(sd, buff, 1000, MSG_MORE, ...); sendto(sd, buff, 3000, 0, ...); Assume this packet is to be routed via a device with MTU 1500 and NETIF_F_UFO enabled. When second sendto() gets into __ip_append_data(), this condition is tested (among others) to decide whether to call ip_ufo_append_data(): ((length + fragheaderlen) > mtu) || (skb && skb_is_gso(skb)) At the moment, we already have skb with 1028 bytes of data which is not marked for GSO so that the test is false (fragheaderlen is usually 20). Thus we append second 1000 bytes to this skb without invoking UFO. Third sendto(), however, has sufficient length to trigger the UFO path so that we end up with non-UFO skb followed by a UFO one. Later on, udp_send_skb() uses udp_csum() to calculate the checksum but that assumes all fragments have correct checksum in skb->csum which is not true for UFO fragments. When checking against MTU, we need to add skb->len to length of new segment if we already have a partially filled skb and fragheaderlen only if there isn't one. In the IPv6 case, skb can only be null if this is the first segment so that we have to use headersize (length of the first IPv6 header) rather than fragheaderlen (length of IPv6 header of further fragments) for skb == NULL. Fixes: e89e9cf539a2 ("[IPv4/IPv6]: UFO Scatter-gather approach") Fixes: e4c5e13aa45c ("ipv6: Should use consistent conditional judgement for ip6 fragment between __ip6_append_data and ip6_finish_output") Signed-off-by: Michal Kubecek Acked-by: Vlad Yasevich Signed-off-by: David S. Miller net/ipv4/ip_output.c | 3 ++- net/ipv6/ip6_output.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit c4d097d13052d1e6f29b8798264aed6135d99568 Author: Heinz Mauelshagen Date: Fri Jun 23 17:27:01 2017 +0200 dm raid: fix oops on upgrading to extended superblock format When a RAID set was created on dm-raid version < 1.9.0 (old RAID superblock format), all of the new 1.9.0 members of the superblock are uninitialized (zero) -- including the device sectors member needed to support shrinking. All the other accesses to superblock fields new in 1.9.0 were reviewed and verified to be properly guarded against invalid use. The 'sectors' member was the only one used when the superblock version is < 1.9. Don't access the superblock's >= 1.9.0 'sectors' member unconditionally. Also add respective comments. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 977282ed17a0213c84d59498a1e3f7088e211470 Merge: fb3a505 7598f8b Author: Ingo Molnar Date: Fri Jun 23 10:03:27 2017 +0200 Merge tag 'perf-urgent-for-mingo-4.12-20170622' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull 'perf probe' fix from Arnaldo Carvalho de Melo: - Do not double the offset of inline expansions when using 'perf probe' on inlined functions (Björn Töpel) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 9768935264c4f0e4afd788a185d8e8d89c28e41d Author: Andrew Duggan Date: Fri Jun 23 00:04:51 2017 -0700 Input: synaptics-rmi4 - only read the F54 query registers which are used The F54 driver is currently only using the first 6 bytes of F54 so there is no need to read all 27 bytes. Some Dell systems (Dell XP13 9333 and similar) have an issue with the touchpad or I2C bus when reading reports larger then 16 bytes. Reads larger then 16 bytes are reported in two HID reports. Something about the back to back reports seems to cause the next read to report incorrect data. This results in F30 failing to load and the click button failing to work. Previous issues with the I2C controller or touchpad were addressed in: commit 5b65c2a02966 ("HID: rmi: check sanity of the incoming report") Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=195949 Signed-off-by: Andrew Duggan Reviewed-by: Benjamin Tissoires Reviewed-by: Nick Dyer Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_f54.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 797625deaedd9a0621376817db2813244b3246e3 Author: Christophe Lombard Date: Tue Jun 13 17:41:05 2017 +0200 cxl: Fixes for Coherent Accelerator Interface Architecture 2.0 A previous set of patches "cxl: Add support for Coherent Accelerator Interface Architecture 2.0" has introduced a new support for the CAPI cards. These patches have been tested on Simulation environment and quite a bit of them have been tested on real hardware. This patch brings new fixes after a series of tests carried out on new equipment: - Add POWER9 definition. - Re-enable any masked interrupts when the AFU is not activated after resetting the AFU. - Remove the api cxl_is_psl8/9 which is no longer useful. - Do not dump CAPI1 registers. - Rewrite cxl_is_page_fault() function. - Do not register slb callack on P9. Fixes: f24be42aab37 ("cxl: Add psl9 specific code") Signed-off-by: Christophe Lombard Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/context.c | 6 +++--- drivers/misc/cxl/cxl.h | 18 +++++------------- drivers/misc/cxl/fault.c | 23 +++++++++++++++-------- drivers/misc/cxl/main.c | 17 +++++++++++++---- drivers/misc/cxl/native.c | 29 +++++++++++++++++------------ drivers/misc/cxl/pci.c | 11 ++++------- 6 files changed, 57 insertions(+), 47 deletions(-) commit 34f19ff1b5a0d11e46df479623d6936460105c9f Author: Nicholas Piggin Date: Wed Jun 21 15:58:29 2017 +1000 powerpc/64: Initialise thread_info for emergency stacks Emergency stacks have their thread_info mostly uninitialised, which in particular means garbage preempt_count values. Emergency stack code runs with interrupts disabled entirely, and is used very rarely, so this has been unnoticed so far. It was found by a proposed new powerpc watchdog that takes a soft-NMI directly from the masked_interrupt handler and using the emergency stack. That crashed at BUG_ON(in_nmi()) in nmi_enter(). preempt_count()s were found to be garbage. To fix this, zero the entire THREAD_SIZE allocation, and initialize the thread_info. Cc: stable@vger.kernel.org Reported-by: Abdul Haleem Signed-off-by: Nicholas Piggin [mpe: Move it all into setup_64.c, use a function not a macro. Fix crashes on Cell by setting preempt_count to 0 not HARDIRQ_OFFSET] Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup_64.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit 33ce7563a4858430fdf38bb867513d3fbc3dda65 Merge: 816b4e4 e94ac35 Author: Dave Airlie Date: Fri Jun 23 11:44:51 2017 +1000 Merge tag 'drm-misc-fixes-2017-06-22' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes UAPI Changes: - drm: Fix regression in GETCONNECTOR ioctl returning stale properties (Daniel) Cc: Daniel Vetter * tag 'drm-misc-fixes-2017-06-22' of git://anongit.freedesktop.org/git/drm-misc: drm: Fix GETCONNECTOR regression commit ad8181060788c80c0ad75b583f24c22fa962a7a6 Author: Randy Dunlap Date: Mon May 22 18:44:57 2017 -0700 kconfig: fix sparse warnings in nconfig Fix sparse warnings in scripts/kconfig/nconf* ('make nconfig'): ../scripts/kconfig/nconf.c:1071:32: warning: Using plain integer as NULL pointer ../scripts/kconfig/nconf.c:1238:30: warning: Using plain integer as NULL pointer ../scripts/kconfig/nconf.c:511:51: warning: Using plain integer as NULL pointer ../scripts/kconfig/nconf.c:1460:6: warning: symbol 'setup_windows' was not declared. Should it be static? ../scripts/kconfig/nconf.c:274:12: warning: symbol 'current_instructions' was not declared. Should it be static? ../scripts/kconfig/nconf.c:308:22: warning: symbol 'function_keys' was not declared. Should it be static? ../scripts/kconfig/nconf.gui.c:132:17: warning: non-ANSI function declaration of function 'set_colors' ../scripts/kconfig/nconf.gui.c:195:24: warning: Using plain integer as NULL pointer nconf.gui.o before/after files are the same. nconf.o before/after files are the same until the 'static' function declarations are added. Signed-off-by: Randy Dunlap Signed-off-by: Masahiro Yamada scripts/kconfig/nconf.c | 12 ++++++------ scripts/kconfig/nconf.gui.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) commit 7598f8bc1383ffd77686cb4e92e749bef3c75937 Author: Björn Töpel Date: Wed Jun 21 18:41:34 2017 +0200 perf probe: Fix probe definition for inlined functions In commit 613f050d68a8 ("perf probe: Fix to probe on gcc generated functions in modules"), the offset from symbol is, incorrectly, added to the trace point address. This leads to incorrect probe trace points for inlined functions and when using relative line number on symbols. Prior this patch: $ perf probe -m nf_nat -D in_range p:probe/in_range nf_nat:in_range.isra.9+0 $ perf probe -m i40e -D i40e_clean_rx_irq p:probe/i40e_clean_rx_irq i40e:i40e_napi_poll+2212 $ perf probe -m i40e -D i40e_clean_rx_irq:16 p:probe/i40e_clean_rx_irq i40e:i40e_lan_xmit_frame+626 After: $ perf probe -m nf_nat -D in_range p:probe/in_range nf_nat:in_range.isra.9+0 $ perf probe -m i40e -D i40e_clean_rx_irq p:probe/i40e_clean_rx_irq i40e:i40e_napi_poll+1106 $ perf probe -m i40e -D i40e_clean_rx_irq:16 p:probe/i40e_clean_rx_irq i40e:i40e_napi_poll+2665 Committer testing: Using 'pfunct', a tool found in the 'dwarves' package [1], one can ask what are the functions that while not being explicitely marked as inline, were inlined by the compiler: # pfunct --cc_inlined /lib/modules/4.12.0-rc4+/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko | head __ew32 e1000_regdump e1000e_dump_ps_pages e1000_desc_unused e1000e_systim_to_hwtstamp e1000e_rx_hwtstamp e1000e_update_rdt_wa e1000e_update_tdt_wa e1000_put_txbuf e1000_consume_page Then ask 'perf probe' to produce the kprobe_tracer probe definitions for two of them: # perf probe -m e1000e -D e1000e_rx_hwtstamp p:probe/e1000e_rx_hwtstamp e1000e:e1000_receive_skb+74 # perf probe -m e1000e -D e1000_consume_page p:probe/e1000_consume_page e1000e:e1000_clean_jumbo_rx_irq+876 p:probe/e1000_consume_page_1 e1000e:e1000_clean_jumbo_rx_irq+1506 p:probe/e1000_consume_page_2 e1000e:e1000_clean_rx_irq_ps+1074 Now lets concentrate on the 'e1000_consume_page' one, that was inlined twice in e1000_clean_jumbo_rx_irq(), lets see what readelf says about the DWARF tags for that function: $ readelf -wi /lib/modules/4.12.0-rc4+/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko <1><13e27b>: Abbrev Number: 121 (DW_TAG_subprogram) <13e27c> DW_AT_name : (indirect string, offset: 0xa8945): e1000_clean_jumbo_rx_irq <13e287> DW_AT_low_pc : 0x17a30 <3><13e6ef>: Abbrev Number: 119 (DW_TAG_inlined_subroutine) <13e6f0> DW_AT_abstract_origin: <0x13ed2c> <13e6f4> DW_AT_low_pc : 0x17be6 <1><13ed2c>: Abbrev Number: 142 (DW_TAG_subprogram) <13ed2e> DW_AT_name : (indirect string, offset: 0xa54c3): e1000_consume_page So, the first time in e1000_clean_jumbo_rx_irq() where e1000_consume_page() is inlined is at PC 0x17be6, which subtracted from e1000_clean_jumbo_rx_irq()'s address, gives us the offset we should use in the probe definition: 0x17be6 - 0x17a30 = 438 but above we have 876, which is twice as much. Lets see the second inline expansion of e1000_consume_page() in e1000_clean_jumbo_rx_irq(): <3><13e86e>: Abbrev Number: 119 (DW_TAG_inlined_subroutine) <13e86f> DW_AT_abstract_origin: <0x13ed2c> <13e873> DW_AT_low_pc : 0x17d21 0x17d21 - 0x17a30 = 753 So we where adding it at twice the offset from the containing function as we should. And then after this patch: # perf probe -m e1000e -D e1000e_rx_hwtstamp p:probe/e1000e_rx_hwtstamp e1000e:e1000_receive_skb+37 # perf probe -m e1000e -D e1000_consume_page p:probe/e1000_consume_page e1000e:e1000_clean_jumbo_rx_irq+438 p:probe/e1000_consume_page_1 e1000e:e1000_clean_jumbo_rx_irq+753 p:probe/e1000_consume_page_2 e1000e:e1000_clean_jumbo_rx_irq+1353 # Which matches the two first expansions and shows that because we were doubling the offset it would spill over the next function: readelf -sw /lib/modules/4.12.0-rc4+/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko 673: 0000000000017a30 1626 FUNC LOCAL DEFAULT 2 e1000_clean_jumbo_rx_irq 674: 0000000000018090 2013 FUNC LOCAL DEFAULT 2 e1000_clean_rx_irq_ps This is the 3rd inline expansion of e1000_consume_page() in e1000_clean_jumbo_rx_irq(): <3><13ec77>: Abbrev Number: 119 (DW_TAG_inlined_subroutine) <13ec78> DW_AT_abstract_origin: <0x13ed2c> <13ec7c> DW_AT_low_pc : 0x17f79 0x17f79 - 0x17a30 = 1353 So: 0x17a30 + 2 * 1353 = 0x184c2 And: 0x184c2 - 0x18090 = 1074 Which explains the bogus third expansion for e1000_consume_page() to end up at: p:probe/e1000_consume_page_2 e1000e:e1000_clean_rx_irq_ps+1074 All fixed now :-) [1] https://git.kernel.org/pub/scm/devel/pahole/pahole.git/ Signed-off-by: Björn Töpel Tested-by: Arnaldo Carvalho de Melo Acked-by: Magnus Karlsson Acked-by: Masami Hiramatsu Cc: stable@vger.kernel.org Fixes: 613f050d68a8 ("perf probe: Fix to probe on gcc generated functions in modules") Link: http://lkml.kernel.org/r/20170621164134.5701-1-bjorn.topel@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a38371cba67539ce6a5d5324db34bc2ddaf66cc1 Merge: 3f7ba7e 517a6e4 Author: Linus Torvalds Date: Thu Jun 22 11:16:55 2017 -0700 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Various small fixes for stable" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: CIFS: Fix some return values in case of error in 'crypt_message' cifs: remove redundant return in cifs_creation_time_get CIFS: Improve readdir verbosity CIFS: check if pages is null rather than bv for a failed allocation CIFS: Set ->should_dirty in cifs_user_readv() commit 3f7ba7e13e70bbcba1af568dc105c1a4243b33c7 Merge: 4f92f0e c8401dd Author: Linus Torvalds Date: Thu Jun 22 11:03:09 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "MIPS: - Fix build with KVM, DYNAMIC_DEBUG and JUMP_LABEL. PPC: - Fix host crashes/hangs on POWER9. - Properly restore userspace state after KVM_RUN ioctl. s390: - Fix address translation in odd-ball cases (real-space designation ASCEs). x86: - Fix privilege escalation in 64-bit Windows guests All patches are for stable and the x86 also has a CVE" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: fix singlestepping over syscall KVM: s390: gaccess: fix real-space designation asce handling for gmap shadows KVM: MIPS: Fix maybe-uninitialized build failure KVM: PPC: Book3S HV: Ignore timebase offset on POWER9 DD1 KVM: PPC: Book3S HV: Save/restore host values of debug registers KVM: PPC: Book3S HV: Preserve userspace HTM state properly KVM: PPC: Book3S HV: Restore critical SPRs to host values on guest exit KVM: PPC: Book3S HV: Context-switch EBB registers properly KVM: PPC: Book3S HV: Cope with host using large decrementer mode commit 4f92f0e25a48212ae06e0761504ee0c9c23776ee Merge: 8d829b9 9e69672 Author: Linus Torvalds Date: Thu Jun 22 10:47:29 2017 -0700 Merge tag 'mfd-fixes-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD fixes from Lee Jones: - arizona: use address passed in, rather than hard coded value - correct STM32 clock-names value in DT binding documentation * tag 'mfd-fixes-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: dt-bindings: mfd: Update STM32 timers clock names mfd: arizona: Fix typo using hard-coded register commit bb53f4d4f5116d3dae76bb12fb16bc73771f958a Author: Martin Habets Date: Thu Jun 22 10:50:41 2017 +0100 sfc: Fix MCDI command size for filter operations The 8000 series adapters uses catch-all filters for encapsulated traffic to support filtering VXLAN, NVGRE and GENEVE traffic. This new filter functionality requires a longer MCDI command. This patch increases the size of buffers on stack that were missed, which fixes a kernel panic from the stack protector. Fixes: 9b41080125176 ("sfc: insert catch-all filters for encapsulated traffic") Signed-off-by: Martin Habets Acked-by: Edward Cree Acked-by: Bert Kenward bkenward@solarflare.com Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b92b7d3312033a08cae2c879b9243c42ad7de94b Author: Arnd Bergmann Date: Thu Jun 22 00:16:37 2017 +0200 netvsc: don't access netdev->num_rx_queues directly This structure member is hidden behind CONFIG_SYSFS, and we get a build error when that is disabled: drivers/net/hyperv/netvsc_drv.c: In function 'netvsc_set_channels': drivers/net/hyperv/netvsc_drv.c:754:49: error: 'struct net_device' has no member named 'num_rx_queues'; did you mean 'num_tx_queues'? drivers/net/hyperv/netvsc_drv.c: In function 'netvsc_set_rxfh': drivers/net/hyperv/netvsc_drv.c:1181:25: error: 'struct net_device' has no member named 'num_rx_queues'; did you mean 'num_tx_queues'? As the value is only set once to the argument of alloc_netdev_mq(), we can compare against that constant directly. Fixes: ff4a44199012 ("netvsc: allow get/set of RSS indirection table") Fixes: 2b01888d1b45 ("netvsc: allow more flexible setting of number of channels") Signed-off-by: Arnd Bergmann Reviewed-by: Haiyang Zhang Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 60abc0be96e00ca71bac083215ac91ad2e575096 Author: WANG Cong Date: Wed Jun 21 14:34:58 2017 -0700 ipv6: avoid unregistering inet6_dev for loopback The per netns loopback_dev->ip6_ptr is unregistered and set to NULL when its mtu is set to smaller than IPV6_MIN_MTU, this leads to that we could set rt->rt6i_idev NULL after a rt6_uncached_list_flush_dev() and then crash after another call. In this case we should just bring its inet6_dev down, rather than unregistering it, at least prior to commit 176c39af29bc ("netns: fix addrconf_ifdown kernel panic") we always override the case for loopback. Thanks a lot to Andrey for finding a reliable reproducer. Fixes: 176c39af29bc ("netns: fix addrconf_ifdown kernel panic") Reported-by: Andrey Konovalov Cc: Andrey Konovalov Cc: Daniel Lezcano Cc: David Ahern Signed-off-by: Cong Wang Acked-by: David Ahern Tested-by: Andrey Konovalov Signed-off-by: David S. Miller net/ipv6/addrconf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8c4354ef590ec8b3b10eb7f29d8c8ae56709b96b Merge: dfa523a 18c8c54 Author: David S. Miller Date: Thu Jun 22 11:17:43 2017 -0400 Merge branch 'macvlan-Fix-some-issues-with-changing-mac-addresses' Vladislav Yasevich says: ==================== macvlan: Fix some issues with changing mac addresses There are some issues in macvlan wrt to changing it's mac address. * An error is returned in the specified address is the same as an already assigned address. * In passthru mode, the mac address of the macvlan device doesn't change. * After changing the mac address of a passthru macvlan and then removing it, the mac address of the physical device remains changed. This patch series attempts to resolve these issues. V2: Address a small issue in p4 where we save the address from the lowerdev (from girish.moodalbail@oracle.com) ==================== Signed-off-by: David S. Miller commit 18c8c54de9a619ba5533419e0170433e20c0ee3e Author: Vlad Yasevich Date: Wed Jun 21 07:59:19 2017 -0400 macvlan: Let passthru macvlan correctly restore lower mac address Passthru macvlans directly change the mac address of the lower level device. That's OK, but after the macvlan is deleted, the lower device is left with changed address and one needs to reboot to bring back the origina HW addresses. This scenario is actually quite common with passthru macvtap devices. This patch attempts to solve this, by storing the mac address of the lower device in macvlan_port structure and keeping track of it through the changes. After this patch, any changes to the lower device mac address done trough the macvlan device, will be reverted back. Any changs done directly to the lower device mac address will be kept. Signed-off-by: Vladislav Yasevich Signed-off-by: David S. Miller drivers/net/macvlan.c | 47 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) commit 43c2d578a0ce0d6067a02b46461811aced551425 Author: Vlad Yasevich Date: Wed Jun 21 07:59:18 2017 -0400 macvlan: convert port passthru to flags. Convert the port passthru boolean into flags with accesor functions. Signed-off-by: Vladislav Yasevich Signed-off-by: David S. Miller drivers/net/macvlan.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) commit e696cda7bd091411705a4e868ce480eaa3082dbf Author: Vlad Yasevich Date: Wed Jun 21 07:59:17 2017 -0400 macvlan: Fix passthru macvlan mac address inheritance When a lower device of the passthru macvlan changes it's address, passthru macvlan is supposed to change it's own address as well. However, that doesn't happen correctly because the check in macvlan_addr_busy() will catch the fact that the lower level (port) mac address is the same as the address we are trying to assign to the macvlan, and return an error. As a reasult, the address of the passthru macvlan device is never changed. The same thing happens when the user attempts to change the mac address of the passthru macvlan. The simple solution appers to be to not check against the lower device in case of passthru macvlan device, since the 2 addresses are _supposed_ to be the same. Signed-off-by: Vladislav Yasevich Signed-off-by: David S. Miller drivers/net/macvlan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e26f43faa0d79dd06e9e94829696b68b9940c2ee Author: Vlad Yasevich Date: Wed Jun 21 07:59:16 2017 -0400 macvlan: Do not return error when setting the same mac address The user currently gets an EBUSY error when attempting to set the mac address on a macvlan device to the same value. This should really be a no-op as nothing changes. Catch the condition and return early. Signed-off-by: Vladislav Yasevich Signed-off-by: David S. Miller drivers/net/macvlan.c | 4 ++++ 1 file changed, 4 insertions(+) commit dfa523ae9f2542bee4cddaea37b3be3e157f6e6b Author: Wei Liu Date: Wed Jun 21 10:21:22 2017 +0100 xen-netback: correctly schedule rate-limited queues Add a flag to indicate if a queue is rate-limited. Test the flag in NAPI poll handler and avoid rescheduling the queue if true, otherwise we risk locking up the host. The rescheduling will be done in the timer callback function. Reported-by: Jean-Louis Dupond Signed-off-by: Wei Liu Tested-by: Jean-Louis Dupond Reviewed-by: Paul Durrant Signed-off-by: David S. Miller drivers/net/xen-netback/common.h | 1 + drivers/net/xen-netback/interface.c | 6 +++++- drivers/net/xen-netback/netback.c | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) commit 191cdb3822e5df6b3c8b9f8cb8c4bf93f6cc90c7 Author: Serhey Popovych Date: Wed Jun 21 12:12:24 2017 +0300 veth: Be more robust on network device creation when no attributes There are number of problems with configuration peer network device in absence of IFLA_VETH_PEER attributes where attributes for main network device shared with peer. First it is not feasible to configure both network devices with same MAC address since this makes communication in such configuration problematic. This case can be reproduced with following sequence: # ip link add address 02:11:22:33:44:55 type veth # ip li sh ... 26: veth0@veth1: mtu 1500 qdisc \ noop state DOWN mode DEFAULT qlen 1000 link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff 27: veth1@veth0: mtu 1500 qdisc \ noop state DOWN mode DEFAULT qlen 1000 link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff Second it is not possible to register both main and peer network devices with same name, that happens when name for main interface is given with IFLA_IFNAME and same attribute reused for peer. This case can be reproduced with following sequence: # ip link add dev veth1a type veth RTNETLINK answers: File exists To fix both of the cases check if corresponding netlink attributes are taken from peer_tb when valid or name based on rtnl ops kind and random address is used. Signed-off-by: Serhey Popovych Signed-off-by: David S. Miller drivers/net/veth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b88ff4f8c9ef0279f82bca0a83ed860b654f0f8d Author: Lokesh Vutla Date: Wed Jun 21 14:12:04 2017 +0530 drivers: net: cpsw-common: Fix reading of mac address for am43 SoCs cpsw driver tries to get macid for am43xx SoCs using the compatible ti,am4372. But not all variants of am43x uses this complatible like epos evm uses ti,am438x. So use a generic compatible ti,am43 to get macid for all am43 based platforms. Reviewed-by: Dave Gerlach Signed-off-by: Lokesh Vutla Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76da0704507bbc51875013f6557877ab308cfd0a Author: WANG Cong Date: Tue Jun 20 11:42:27 2017 -0700 ipv6: only call ip6_route_dev_notify() once for NETDEV_UNREGISTER In commit 242d3a49a2a1 ("ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf") I assumed NETDEV_REGISTER and NETDEV_UNREGISTER are paired, unfortunately, as reported by jeffy, netdev_wait_allrefs() could rebroadcast NETDEV_UNREGISTER event until all refs are gone. We have to add an additional check to avoid this corner case. For netdev_wait_allrefs() dev->reg_state is NETREG_UNREGISTERED, for dev_change_net_namespace(), dev->reg_state is NETREG_REGISTERED. So check for dev->reg_state != NETREG_UNREGISTERED. Fixes: 242d3a49a2a1 ("ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf") Reported-by: jeffy Cc: David Ahern Signed-off-by: Cong Wang Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b866203d872d5deeafcecd25ea429d6748b5bd56 Author: Zach Brown Date: Tue Jun 20 12:48:11 2017 -0500 net/phy: micrel: configure intterupts after autoneg workaround The commit ("net/phy: micrel: Add workaround for bad autoneg") fixes an autoneg failure case by resetting the hardware. This turns off intterupts. Things will work themselves out if the phy polls, as it will figure out it's state during a poll. However if the phy uses only intterupts, the phy will stall, since interrupts are off. This patch fixes the issue by calling config_intr after resetting the phy. Fixes: d2fd719bcb0e ("net/phy: micrel: Add workaround for bad autoneg ") Signed-off-by: Zach Brown Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/micrel.c | 2 ++ 1 file changed, 2 insertions(+) commit c8401dda2f0a00cd25c0af6a95ed50e478d25de4 Author: Paolo Bonzini Date: Wed Jun 7 15:13:14 2017 +0200 KVM: x86: fix singlestepping over syscall TF is handled a bit differently for syscall and sysret, compared to the other instructions: TF is checked after the instruction completes, so that the OS can disable #DB at a syscall by adding TF to FMASK. When the sysret is executed the #DB is taken "as if" the syscall insn just completed. KVM emulates syscall so that it can trap 32-bit syscall on Intel processors. Fix the behavior, otherwise you could get #DB on a user stack which is not nice. This does not affect Linux guests, as they use an IST or task gate for #DB. This fixes CVE-2017-7518. Cc: stable@vger.kernel.org Reported-by: Andy Lutomirski Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_emulate.h | 1 + arch/x86/kvm/emulate.c | 1 + arch/x86/kvm/x86.c | 62 ++++++++++++++++++++------------------ 3 files changed, 34 insertions(+), 30 deletions(-) commit d6aa07c16941dcf438bd526a56dcf227991c5907 Merge: e27a9ec addb63c Author: Radim Krčmář Date: Thu Jun 22 16:13:06 2017 +0200 Merge tag 'kvm-s390-master-4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux KVM: s390: fix shadow table handling for nested guests Some odd-ball cases (real-space designation ASCEs) are handled wrong for the shadow page tables. Fix it. commit bbd5ff50afffcf4a01d05367524736c57607a478 Author: Alistair Popple Date: Tue Jun 20 18:37:28 2017 +1000 powerpc/powernv/npu-dma: Add explicit flush when sending an ATSD NPU2 requires an extra explicit flush to an active GPU PID when sending address translation shoot downs (ATSDs) to reliably flush the GPU TLB. This patch adds just such a flush at the end of each sequence of ATSDs. We can safely use PID 0 which is always reserved and active on the GPU. PID 0 is only used for init_mm which will never be a user mm on the GPU. To enforce this we add a check in pnv_npu2_init_context() just in case someone tries to use PID 0 on the GPU. Signed-off-by: Alistair Popple [mpe: Use true/false for bool literals] Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/npu-dma.c | 94 ++++++++++++++++++++++---------- 1 file changed, 65 insertions(+), 29 deletions(-) commit addb63c18a0d52a9ce2611d039f981f7b6148d2b Author: Heiko Carstens Date: Mon Jun 19 08:02:28 2017 +0200 KVM: s390: gaccess: fix real-space designation asce handling for gmap shadows For real-space designation asces the asce origin part is only a token. The asce token origin must not be used to generate an effective address for storage references. This however is erroneously done within kvm_s390_shadow_tables(). Furthermore within the same function the wrong parts of virtual addresses are used to generate a corresponding real address (e.g. the region second index is used as region first index). Both of the above can result in incorrect address translations. Only for real space designations with a token origin of zero and addresses below one megabyte the translation was correct. Furthermore replace a "!asce.r" statement with a "!*fake" statement to make it more obvious that a specific condition has nothing to do with the architecture, but with the fake handling of real space designations. Fixes: 3218f7094b6b ("s390/mm: support real-space for gmap shadows") Cc: David Hildenbrand Cc: stable@vger.kernel.org Signed-off-by: Heiko Carstens Reviewed-by: Martin Schwidefsky Signed-off-by: Christian Borntraeger arch/s390/kvm/gaccess.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit fb3a5055cd7098f8d1dd0cd38d7172211113255f Author: Kan Liang Date: Mon Jun 19 07:26:09 2017 -0700 perf/x86/intel: Add 1G DTLB load/store miss support for SKL Current DTLB load/store miss events (0x608/0x649) only counts 4K,2M and 4M page size. Need to extend the events to support any page size (4K/2M/4M/1G). The complete DTLB load/store miss events are: DTLB_LOAD_MISSES.WALK_COMPLETED 0xe08 DTLB_STORE_MISSES.WALK_COMPLETED 0xe49 Signed-off-by: Kan Liang Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: eranian@google.com Link: http://lkml.kernel.org/r/20170619142609.11058-1-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c782a5ea56a799658e213a78dc1455264938afa Author: Michail Georgios Etairidis Date: Tue Jun 20 10:20:42 2017 +0200 i2c: imx: Use correct function to write to register The i2c-imx driver incorrectly uses readb()/writeb() to read and write to the appropriate registers when performing a repeated start. The appropriate imx_i2c_read_reg()/imx_i2c_write_reg() functions should be used instead. Performing a repeated start results in a kernel panic. The platform is imx. Signed-off-by: Michail G Etairidis Fixes: ce1a78840ff7 ("i2c: imx: add DMA support for freescale i2c driver") Fixes: 054b62d9f25c ("i2c: imx: fix the i2c bus hang issue when do repeat restart") Acked-by: Fugang Duan Acked-by: Uwe Kleine-König Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-imx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ca3a1b856636f596c691ab5b3764045a142186db Author: Yossi Kuperman Date: Thu Jun 22 11:37:11 2017 +0300 esp6_offload: Fix IP6CB(skb)->nhoff for ESP GRO IP6CB(skb)->nhoff is the offset of the nexthdr field in an IPv6 header, unless there are extension headers present, in which case nhoff points to the nexthdr field of the last extension header. In non-GRO code path, nhoff is set by ipv6_rcv before any XFRM code is executed. Conversely, in GRO code path (when esp6_offload is loaded), nhoff is not set. The following functions fail to read the correct value and eventually the packet is dropped: xfrm6_transport_finish xfrm6_tunnel_input xfrm6_rcv_tnl Set nhoff to the proper offset of nexthdr in esp6_gro_receive. Fixes: 7785bba299a8 ("esp: Add a software GRO codepath") Signed-off-by: Yossi Kuperman Signed-off-by: Steffen Klassert net/ipv6/esp6_offload.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 7c88e21aefcf86fb41b48b2e04528db5a30fbe18 Author: Yossi Kuperman Date: Thu Jun 22 11:37:10 2017 +0300 xfrm6: Fix IPv6 payload_len in xfrm6_transport_finish IPv6 payload length indicates the size of the payload, including any extension headers. In xfrm6_transport_finish, ipv6_hdr(skb)->payload_len is set to the payload size only, regardless of the presence of any extension headers. After ESP GRO transport mode decapsulation, ipv6_rcv trims the packet according to the wrong payload_len, thus corrupting the packet. Set payload_len to account for extension headers as well. Fixes: 7785bba299a8 ("esp: Add a software GRO codepath") Signed-off-by: Yossi Kuperman Signed-off-by: Steffen Klassert net/ipv6/xfrm6_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d829b9bb878904f3419af8003176a12910b94e8 Merge: 48b6bbe 8e8320c Author: Linus Torvalds Date: Wed Jun 21 22:15:00 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "This contains a set of fixes for xen-blkback by way of Konrad, and a performance regression fix for blk-mq for shared tags. The latter could account for as much as a 50x reduction in performance, with the test case from the user with 500 name spaces. A more realistic setup on my end with 32 drives showed a 3.5x drop. The fix has been thoroughly tested before being committed" * 'for-linus' of git://git.kernel.dk/linux-block: blk-mq: fix performance regression with shared tags xen-blkback: don't leak stack data via response ring xen/blkback: don't use xen_blkif_get() in xen-blkback kthread xen/blkback: don't free be structure too early xen/blkback: fix disconnect while I/Os in flight commit eb5e248d502bec191bd99f04cae8b49992b3abde Author: Darrick J. Wong Date: Wed Jun 21 20:27:35 2017 -0700 xfs: don't allow bmap on rt files bmap returns a dumb LBA address but not the block device that goes with that LBA. Swapfiles don't care about this and will blindly assume that the data volume is the correct blockdev, which is totally bogus for files on the rt subvolume. This results in the swap code doing IOs to arbitrary locations on the data device(!) if the passed in mapping is a realtime file, so just turn off bmap for rt files. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_aops.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 2f263d145140ea4b9f5762b15886ae26195a764a Author: Richard Genoud Date: Thu Jun 15 10:36:22 2017 +0200 kbuild: fix header installation under fakechroot environment Since commit fcc8487d477a ("uapi: export all headers under uapi directories") fakechroot make bindeb-pkg fails, mismatching files for directories: touch: cannot touch 'usr/include/video/uvesafb.h/.install': Not a directory This due to a bug in fakechroot: when using the function $(wildcard $(srcdir)/*/.) in a makefile, under a fakechroot environment, not only directories but also files are returned. To circumvent that, we are using the functions: $(sort $(dir $(wildcard $(srcdir)/*/)))) Fixes: fcc8487d477a ("uapi: export all headers under uapi directories") Signed-off-by: Richard Genoud Signed-off-by: Masahiro Yamada scripts/Makefile.headersinst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit e4330d8bf669139a983255d1801733b64c2ae841 Author: Jarkko Nikula Date: Mon Jun 19 15:53:01 2017 +0300 ACPI / scan: Fix enumeration for special SPI and I2C devices Commit f406270bf73d ("ACPI / scan: Set the visited flag for all enumerated devices") caused that two group of special SPI or I2C devices do not enumerate. SPI and I2C devices are expected to be enumerated by the SPI and I2C subsystems but change caused that acpi_bus_attach() marks those devices with acpi_device_set_enumerated(). First group of devices are matched using Device Tree compatible property with special _HID "PRP0001". Those devices have matched scan handler, acpi_scan_attach_handler() retuns 1 and acpi_bus_attach() marks them with acpi_device_set_enumerated(). Second group of devices without valid _HID such as "LNXVIDEO" have device->pnp.type.platform_id set to zero and change again marks them with acpi_device_set_enumerated(). Fix this by flagging the SPI and I2C devices during struct acpi_device object initialization time and let the code in acpi_bus_attach() to go through the device_attach() and acpi_default_enumeration() path for all SPI and I2C devices. Fixes: f406270bf73d (ACPI / scan: Set the visited flag for all enumerated devices) Signed-off-by: Jarkko Nikula Acked-by: Mika Westerberg Cc: 4.11+ # 4.11+ Signed-off-by: Rafael J. Wysocki drivers/acpi/scan.c | 67 +++++++++++++++++++++++++++---------------------- include/acpi/acpi_bus.h | 3 ++- 2 files changed, 39 insertions(+), 31 deletions(-) commit 48b6bbef9a1789f0365c1a385879a1fea4460016 Merge: ce879b6 b4846fc Author: Linus Torvalds Date: Wed Jun 21 12:40:20 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix refcounting wrt timers which hold onto inet6 address objects, from Xin Long. 2) Fix an ancient bug in wireless wext ioctls, from Johannes Berg. 3) Firmware handling fixes in brcm80211 driver, from Arend Van Spriel. 4) Several mlx5 driver fixes (firmware readiness, timestamp cap reporting, devlink command validity checking, tc offloading, etc.) From Eli Cohen, Maor Dickman, Chris Mi, and Or Gerlitz. 5) Fix dst leak in IP/IP6 tunnels, from Haishuang Yan. 6) Fix dst refcount bug in decnet, from Wei Wang. 7) Netdev can be double freed in register_vlan_device(). Fix from Gao Feng. 8) Don't allow object to be destroyed while it is being dumped in SCTP, from Xin Long. 9) Fix dpaa_eth build when modular, from Madalin Bucur. 10) Fix throw route leaks, from Serhey Popovych. 11) IFLA_GROUP missing from if_nlmsg_size() and ifla_policy[] table, also from Serhey Popovych. 12) Fix premature TX SKB free in stmmac, from Niklas Cassel. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (36 commits) igmp: add a missing spin_lock_init() net: stmmac: free an skb first when there are no longer any descriptors using it sfc: remove duplicate up_write on VF filter_sem rtnetlink: add IFLA_GROUP to ifla_policy ipv6: Do not leak throw route references dt-bindings: net: sms911x: Add missing optional VDD regulators dpaa_eth: reuse the dma_ops provided by the FMan MAC device fsl/fman: propagate dma_ops net/core: remove explicit do_softirq() from busy_poll_stop() fib_rules: Resolve goto rules target on delete sctp: ensure ep is not destroyed before doing the dump net/hns:bugfix of ethtool -t phy self_test net: 8021q: Fix one possible panic caused by BUG_ON in free_netdev cxgb4: notify uP to route ctrlq compl to rdma rspq ip6_tunnel: Correct tos value in collect_md mode decnet: always not take dst->__refcnt when inserting dst into hash table ip6_tunnel: fix potential issue in __ip6_tnl_rcv ip_tunnel: fix potential issue in ip_tunnel_rcv brcmfmac: fix uninitialized warning in brcmf_usb_probe_phase2() net/mlx5e: Avoid doing a cleanup call if the profile doesn't have it ... commit ce879b64a7be347a315bce6785318e9662e31cb5 Merge: db1b5cc b7c747d Author: Linus Torvalds Date: Wed Jun 21 12:16:12 2017 -0700 Merge tag 'pinctrl-v4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull more pin control fixes from Linus Walleij: "Some late arriving fixes. I should have sent earlier, just swamped with work as usual. Thomas patch makes AMD systems usable despite firmware bugs so it is fairly important. - Make the AMD driver use a regular interrupt rather than a chained one, so the system does not lock up. - Fix a function call error deep inside the STM32 driver" * tag 'pinctrl-v4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: stm32: Fix bad function call pinctrl/amd: Use regular interrupt instead of chained commit db1b5ccd27a37840af5c868f82f36d5d33430b96 Merge: dcba710 900a88e Author: Linus Torvalds Date: Wed Jun 21 12:06:29 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fixes from Jiri Kosina: - revert of a commit to magicmouse driver that regressess certain devices, from Daniel Stone - quirk for a specific Dell mouse, from Sebastian Parschauer * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: Revert "HID: magicmouse: Set multi-touch keybits for Magic Mouse" HID: Add quirk for Dell PIXART OEM mouse commit dcba71086e0d1abf4f00cd381530b11d0db7fa1d Merge: 021f601 842c088 Author: Linus Torvalds Date: Wed Jun 21 12:02:48 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching Pull livepatching fix from Jiri Kosina: "Fix the way how livepatches are being stacked with respect to RCU, from Petr Mladek" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching: livepatch: Fix stacking of patches with respect to RCU commit 021f601980ccf07e65bc03e40d0321243f782d34 Merge: bd726c9 77e9ce3 Author: Linus Torvalds Date: Wed Jun 21 11:30:52 2017 -0700 Merge branch 'ufs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull more ufs fixes from Al Viro: "More UFS fixes, unfortunately including build regression fix for the 64-bit s_dsize commit. Fixed in this pile: - trivial bug in signedness of 32bit timestamps on ufs1 - ESTALE instead of ufs_error() when doing open-by-fhandle on something deleted - build regression on 32bit in ufs_new_fragments() - calculating that many percents of u64 pulls libgcc stuff on some of those. Mea culpa. - fix hysteresis loop broken by typo in 2.4.14.7 (right next to the location of previous bug). - fix the insane limits of said hysteresis loop on filesystems with very low percentage of reserved blocks. If it's 5% or less, just use the OPTSPACE policy. - calculate those limits once and mount time. This tree does pass xfstests clean (both ufs1 and ufs2) and it _does_ survive cross-builds. Again, my apologies for missing that, especially since I have noticed a related percentage-of-64bit issue in earlier patches (when dealing with amount of reserved blocks). Self-LART applied..." * 'ufs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: ufs: fix the logics for tail relocation ufs_iget(): fail with -ESTALE on deleted inode fix signedness of timestamps on ufs1 commit bd726c90b6b8ce87602208701b208a208e6d5600 Author: Helge Deller Date: Mon Jun 19 17:34:05 2017 +0200 Allow stack to grow up to address space limit Fix expand_upwards() on architectures with an upward-growing stack (parisc, metag and partly IA-64) to allow the stack to reliably grow exactly up to the address space limit given by TASK_SIZE. Signed-off-by: Helge Deller Acked-by: Hugh Dickins Signed-off-by: Linus Torvalds mm/mmap.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit f4cb767d76cf7ee72f97dd76f6cfa6c76a5edc89 Author: Hugh Dickins Date: Tue Jun 20 02:10:44 2017 -0700 mm: fix new crash in unmapped_area_topdown() Trinity gets kernel BUG at mm/mmap.c:1963! in about 3 minutes of mmap testing. That's the VM_BUG_ON(gap_end < gap_start) at the end of unmapped_area_topdown(). Linus points out how MAP_FIXED (which does not have to respect our stack guard gap intentions) could result in gap_end below gap_start there. Fix that, and the similar case in its alternative, unmapped_area(). Cc: stable@vger.kernel.org Fixes: 1be7107fbe18 ("mm: larger stack guard gap, between vmas") Reported-by: Dave Jones Debugged-by: Linus Torvalds Signed-off-by: Hugh Dickins Acked-by: Michal Hocko Signed-off-by: Linus Torvalds mm/mmap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8e8320c9315c47a6a090188720ccff32a6a6ba18 Author: Jens Axboe Date: Tue Jun 20 17:56:13 2017 -0600 blk-mq: fix performance regression with shared tags If we have shared tags enabled, then every IO completion will trigger a full loop of every queue belonging to a tag set, and every hardware queue for each of those queues, even if nothing needs to be done. This causes a massive performance regression if you have a lot of shared devices. Instead of doing this huge full scan on every IO, add an atomic counter to the main queue that tracks how many hardware queues have been marked as needing a restart. With that, we can avoid looking for restartable queues, if we don't have to. Max reports that this restores performance. Before this patch, 4K IOPS was limited to 22-23K IOPS. With the patch, we are running at 950-970K IOPS. Fixes: 6d8c6c0f97ad ("blk-mq: Restart a single queue if tag sets are shared") Reported-by: Max Gurtovoy Tested-by: Max Gurtovoy Reviewed-by: Bart Van Assche Tested-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-mq-sched.c | 58 +++++++++++++++++++++++++++++++++++++++----------- block/blk-mq-sched.h | 9 -------- block/blk-mq.c | 16 +++++++++++--- include/linux/blkdev.h | 2 ++ 4 files changed, 61 insertions(+), 24 deletions(-) commit feb7695fe9fb83084aa29de0094774f4c9d4c9fc Author: Mike Snitzer Date: Tue Jun 20 19:14:30 2017 -0400 dm io: fix duplicate bio completion due to missing ref count If only a subset of the devices associated with multiple regions support a given special operation (eg. DISCARD) then the dec_count() that is used to set error for the region must increment the io->count. Otherwise, when the dec_count() is called it can cause the dm-io caller's bio to be completed multiple times. As was reported against the dm-mirror target that had mirror legs with a mix of discard capabilities. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=196077 Reported-by: Zhang Yi Signed-off-by: Mike Snitzer drivers/md/dm-io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7def52b78a5fda14864aab9b6fd14f09a4d4ff72 Author: Mike Snitzer Date: Mon Jun 19 10:55:47 2017 -0400 dm integrity: fix to not disable/enable interrupts from interrupt context Use spin_lock_irqsave and spin_unlock_irqrestore rather than spin_{lock,unlock}_irq in submit_flush_bio(). Otherwise lockdep issues the following warning: DEBUG_LOCKS_WARN_ON(current->hardirq_context) WARNING: CPU: 1 PID: 0 at kernel/locking/lockdep.c:2748 trace_hardirqs_on_caller+0x107/0x180 Reported-by: Ondrej Kozina Tested-by: Ondrej Kozina Signed-off-by: Mike Snitzer Acked-by: Mikulas Patocka drivers/md/dm-integrity.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8a1898db51a3390241cd5fae267dc8aaa9db0f8b Author: Hendrik Brueckner Date: Tue Jun 20 12:26:39 2017 +0200 perf/aux: Correct return code of rb_alloc_aux() if !has_aux(ev) If the event for which an AUX area is about to be allocated, does not support setting up an AUX area, rb_alloc_aux() return -ENOTSUPP. This error condition is being returned unfiltered to the user space, and, for example, the perf tools fails with: failed to mmap with 524 (INTERNAL ERROR: strerror_r(524, 0x3fff497a1c8, 512)=22) This error can be easily seen with "perf record -m 128,256 -e cpu-clock". The 524 error code maps to -ENOTSUPP (in rb_alloc_aux()). The -ENOTSUPP error code shall be only used within the kernel. So the correct error code would then be -EOPNOTSUPP. With this commit, the perf tool then reports: failed to mmap with 95 (Operation not supported) which is more clear. Signed-off-by: Hendrik Brueckner Acked-by: Alexander Shishkin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Pu Hou Cc: Thomas Gleixner Cc: Thomas-Mich Richter Cc: acme@kernel.org Cc: linux-s390@vger.kernel.org Link: http://lkml.kernel.org/r/1497954399-6355-1-git-send-email-brueckner@linux.vnet.ibm.com Signed-off-by: Ingo Molnar kernel/events/ring_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e94ac3510b6a0f696f2c442c4fc4051c8101ef12 Author: Daniel Vetter Date: Tue Jun 20 22:28:37 2017 +0200 drm: Fix GETCONNECTOR regression In commit 91eefc05f0ac71902906b2058360e61bd25137fe Author: Daniel Vetter Date: Wed Dec 14 00:08:10 2016 +0100 drm: Tighten locking in drm_mode_getconnector I reordered the logic a bit in that IOCTL, but that broke userspace since it'll get the new mode list, but not the new property values. Fix that again. v2: Fix up the error path handling when copy_to_user for the modes failes (Dhinakaran). Fixes: 91eefc05f0ac ("drm: Tighten locking in drm_mode_getconnector") Cc: Sean Paul Cc: Daniel Vetter Cc: Jani Nikula Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Reported-by: "H.J. Lu" Tested-by: "H.J. Lu" Cc: # v4.11+ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100576 Cc: "H.J. Lu" Cc: "Pandiyan, Dhinakaran" Reviewed-by: Sean Paul Reviewed-by: Dhinakaran Pandiyan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170620202837.1701-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_connector.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) commit 517a6e43c4872c89794af5b377fa085e47345952 Author: Christophe Jaillet Date: Sun Jun 11 09:12:47 2017 +0200 CIFS: Fix some return values in case of error in 'crypt_message' 'rc' is known to be 0 at this point. So if 'init_sg' or 'kzalloc' fails, we should return -ENOMEM instead. Also remove a useless 'rc' in a debug message as it is meaningless here. Fixes: 026e93dc0a3ee ("CIFS: Encrypt SMB3 requests before sending") Signed-off-by: Christophe JAILLET Reviewed-by: Pavel Shilovsky Reviewed-by: Aurelien Aptel Signed-off-by: Steve French CC: Stable fs/cifs/smb2ops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 816b4e448c72cc388cdd0f6ea22302a47cd752a2 Merge: 09da4ba acfd6ee Author: Dave Airlie Date: Wed Jun 21 11:23:35 2017 +1000 Merge branch 'drm-fixes-4.12' of git://people.freedesktop.org/~agd5f/linux into drm-fixes A few fixes for 4.12: - Add a new Polaris12 pci id - A stack corruption fix - Suspend/resume fix - PX fix - Display flickering fix * 'drm-fixes-4.12' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: add a quirk for Toshiba Satellite L20-183 drm/radeon: add a PX quirk for another K53TK variant drm/amdgpu: adjust default display clock drm/amdgpu/atom: fix ps allocation size for EnableDispPowerGating drm/amdgpu: add Polaris12 DID commit 09da4baa4d502833a1ac79aea4ff85d08bb48871 Merge: 41f1830 a8ae0a7 Author: Dave Airlie Date: Wed Jun 21 11:22:34 2017 +1000 Merge tag 'drm-intel-fixes-2017-06-20' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes drm/i915 fixes for v4.12-rc7 * tag 'drm-intel-fixes-2017-06-20' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: Don't enable backlight at setup time. drm/i915: Plumb the correct acquire ctx into intel_crtc_disable_noatomic() drm/i915: Fix deadlock witha the pipe A quirk during resume drm/i915: Remove __GFP_NORETRY from our buffer allocator drm/i915: Encourage our shrinker more when our shmemfs allocations fails drm/i915: Differentiate between sw write location into ring and last hw read commit e125f5284f81bbb765a504494622b45c02faf978 Author: Colin Ian King Date: Wed Jun 7 00:33:45 2017 +0100 cifs: remove redundant return in cifs_creation_time_get There is a redundant return in function cifs_creation_time_get that appears to be old vestigial code than can be removed. So remove it. Detected by CoverityScan, CID#1361924 ("Structurally dead code") Signed-off-by: Colin Ian King Signed-off-by: Steve French fs/cifs/xattr.c | 2 -- 1 file changed, 2 deletions(-) commit dcd87838c06f05ab7650b249ebf0d5b57ae63e1e Author: Pavel Shilovsky Date: Tue Jun 6 16:58:58 2017 -0700 CIFS: Improve readdir verbosity Downgrade the loglevel for SMB2 to prevent filling the log with messages if e.g. readdir was interrupted. Also make SMB2 and SMB1 codepaths do the same logging during readdir. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French CC: Stable fs/cifs/smb1ops.c | 9 +++++++-- fs/cifs/smb2ops.c | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) commit ecf3411a121e7a653e309ff50a820ffa87c537f8 Author: Colin Ian King Date: Wed May 17 19:24:15 2017 +0100 CIFS: check if pages is null rather than bv for a failed allocation pages is being allocated however a null check on bv is being used to see if the allocation failed. Fix this by checking if pages is null. Detected by CoverityScan, CID#1432974 ("Logically dead code") Fixes: ccf7f4088af2dd ("CIFS: Add asynchronous context to support kernel AIO") Signed-off-by: Colin Ian King Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a7b0d8e8d9962ec3b2ae64dd4e86d68a6fb9220 Author: Dan Carpenter Date: Fri May 5 08:30:40 2017 +0300 CIFS: Set ->should_dirty in cifs_user_readv() The current code causes a static checker warning because ITER_IOVEC is zero so the condition is never true. Fixes: 6685c5e2d1ac ("CIFS: Add asynchronous read support through kernel AIO") Signed-off-by: Dan Carpenter Signed-off-by: Steve French fs/cifs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4846fc3c8559649277e3e4e6b5cec5348a8d208 Author: WANG Cong Date: Tue Jun 20 10:46:27 2017 -0700 igmp: add a missing spin_lock_init() Andrey reported a lockdep warning on non-initialized spinlock: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 1 PID: 4099 Comm: a.out Not tainted 4.12.0-rc6+ #9 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 dump_stack+0x292/0x395 lib/dump_stack.c:52 register_lock_class+0x717/0x1aa0 kernel/locking/lockdep.c:755 ? 0xffffffffa0000000 __lock_acquire+0x269/0x3690 kernel/locking/lockdep.c:3255 lock_acquire+0x22d/0x560 kernel/locking/lockdep.c:3855 __raw_spin_lock_bh ./include/linux/spinlock_api_smp.h:135 _raw_spin_lock_bh+0x36/0x50 kernel/locking/spinlock.c:175 spin_lock_bh ./include/linux/spinlock.h:304 ip_mc_clear_src+0x27/0x1e0 net/ipv4/igmp.c:2076 igmpv3_clear_delrec+0xee/0x4f0 net/ipv4/igmp.c:1194 ip_mc_destroy_dev+0x4e/0x190 net/ipv4/igmp.c:1736 We miss a spin_lock_init() in igmpv3_add_delrec(), probably because previously we never use it on this code path. Since we already unlink it from the global mc_tomb list, it is probably safe not to acquire this spinlock here. It does not harm to have it although, to avoid conditional locking. Fixes: c38b7d327aaf ("igmp: acquire pmc lock for ip_mc_clear_src()") Reported-by: Andrey Konovalov Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/ipv4/igmp.c | 1 + 1 file changed, 1 insertion(+) commit 9f93d87cba63e3d18629261243b1f633519eabb5 Author: Marcin Nowakowski Date: Fri Jun 9 09:04:05 2017 +0200 irqchip/mips-gic: Mark count and compare accessors notrace gic_read_count(), gic_write_compare() and gic_write_cpu_compare() are often used in a sequence to update the compare register with a count value increased by a small offset. With small delta values used to update the compare register, the time to update function trace for these operations may be longer than the update timeout leading to update failure. Signed-off-by: Marcin Nowakowski Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Cc: linux-mips@linux-mips.org Cc: Jason Cooper Link: http://lkml.kernel.org/r/1496991845-27031-1-git-send-email-marcin.nowakowski@imgtec.com drivers/irqchip/irq-mips-gic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit afd64631f86c0c0ad440dcac09ed4a44968372d6 Merge: 05cf0d1 35abcd4 Author: David S. Miller Date: Tue Jun 20 15:41:56 2017 -0400 Merge tag 'wireless-drivers-for-davem-2017-06-20' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.12 Two important fixes for brcmfmac. The rest of the brcmfmac patches are either code preparation and fixing a new build warning. brcmfmac * fix a NULL pointer dereference during resume * fix a NULL pointer dereference with USB devices, a regression from v4.12-rc1 ==================== Signed-off-by: David S. Miller commit 05cf0d1bf4ed722aefff92775244dbe9e1bb4679 Author: Niklas Cassel Date: Tue Jun 20 14:32:41 2017 +0200 net: stmmac: free an skb first when there are no longer any descriptors using it When having the skb pointer in the first descriptor, stmmac_tx_clean can get called at a moment where the IP has only cleared the own bit of the first descriptor, thus freeing the skb, even though there can be several descriptors whose buffers point into the same skb. By simply moving the skb pointer from the first descriptor to the last descriptor, a skb will get freed only when the IP has cleared the own bit of all the descriptors that are using that skb. Signed-off-by: Niklas Cassel Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 57f0c9cf58ff7fe479137ab847a886d0eed3ad1d Author: Edward Cree Date: Tue Jun 20 13:08:51 2017 +0100 sfc: remove duplicate up_write on VF filter_sem Somehow two copies of the line 'up_write(&vf->efx->filter_sem);' got into efx_ef10_sriov_set_vf_vlan(). This would put the mutex in a bad state and cause all subsequent down attempts to hang. Fixes: 671b53eec2ed ("sfc: Ensure down_write(&filter_sem) and up_write() are matched before calling efx_net_open()") Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10_sriov.c | 2 -- 1 file changed, 2 deletions(-) commit db833d40ad3263b2ee3b59a1ba168bb3cfed8137 Author: Serhey Popovych Date: Tue Jun 20 14:35:23 2017 +0300 rtnetlink: add IFLA_GROUP to ifla_policy Network interface groups support added while ago, however there is no IFLA_GROUP attribute description in policy and netlink message size calculations until now. Add IFLA_GROUP attribute to the policy. Fixes: cbda10fa97d7 ("net_device: add support for network device groups") Signed-off-by: Serhey Popovych Signed-off-by: David S. Miller net/core/rtnetlink.c | 2 ++ 1 file changed, 2 insertions(+) commit 07f615574f8ac499875b21c1142f26308234a92c Author: Serhey Popovych Date: Tue Jun 20 13:29:25 2017 +0300 ipv6: Do not leak throw route references While commit 73ba57bfae4a ("ipv6: fix backtracking for throw routes") does good job on error propagation to the fib_rules_lookup() in fib rules core framework that also corrects throw routes handling, it does not solve route reference leakage problem happened when we return -EAGAIN to the fib_rules_lookup() and leave routing table entry referenced in arg->result. If rule with matched throw route isn't last matched in the list we overwrite arg->result losing reference on throw route stored previously forever. We also partially revert commit ab997ad40839 ("ipv6: fix the incorrect return value of throw route") since we never return routing table entry with dst.error == -EAGAIN when CONFIG_IPV6_MULTIPLE_TABLES is on. Also there is no point to check for RTF_REJECT flag since it is always set throw route. Fixes: 73ba57bfae4a ("ipv6: fix backtracking for throw routes") Signed-off-by: Serhey Popovych Signed-off-by: David S. Miller net/ipv6/fib6_rules.c | 22 ++++++---------------- net/ipv6/ip6_fib.c | 3 +-- 2 files changed, 7 insertions(+), 18 deletions(-) commit 7e113321eccba2b52c0e9d11129d370c9511e4db Author: Krzysztof Kozlowski Date: Mon Jun 19 18:05:41 2017 +0200 dt-bindings: net: sms911x: Add missing optional VDD regulators The lan911x family of devices require supplying from 3.3 V power supplies (connected to VDD_IO, VDD_A and VREG_3.3 pins). The existing driver however obtains only VDD_IO and VDD_A regulators in an optional way so document this in bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/smsc911x.txt | 1 + 1 file changed, 1 insertion(+) commit 73b098d6fa175e4ecd98e6c1fe53c77ebf6b3eaa Merge: fe420d8 fb52728 Author: David S. Miller Date: Tue Jun 20 13:46:54 2017 -0400 Merge branch 'net-fix-loadable-module-for-DPAA-Ethernet' Madalin Bucur says: ==================== net: fix loadable module for DPAA Ethernet The DPAA Ethernet makes use of a symbol that is not exported. Address the issue by propagating the dma_ops rather than calling arch_setup_dma_ops(). ==================== Signed-off-by: David S. Miller commit fb52728a9294d97de808795b8e3f60fb8de50c00 Author: Madalin Bucur Date: Mon Jun 19 18:04:17 2017 +0300 dpaa_eth: reuse the dma_ops provided by the FMan MAC device Remove the use of arch_setup_dma_ops() that was not exported and was breaking loadable module compilation. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5567e989198b5a8d78f9b5868e48fc9f4726bdd5 Author: Madalin Bucur Date: Mon Jun 19 18:04:16 2017 +0300 fsl/fman: propagate dma_ops Make sure dma_ops are set, to be later used by the Ethernet driver. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/mac.c | 2 ++ 1 file changed, 2 insertions(+) commit fe420d87bbc234015b4195dd239b7d3052b140ea Author: Sebastian Siewior Date: Fri Jun 16 19:24:00 2017 +0200 net/core: remove explicit do_softirq() from busy_poll_stop() Since commit 217f69743681 ("net: busy-poll: allow preemption in sk_busy_loop()") there is an explicit do_softirq() invocation after local_bh_enable() has been invoked. I don't understand why we need this because local_bh_enable() will invoke do_softirq() once the softirq counter reached zero and we have softirq-related work pending. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: David S. Miller net/core/dev.c | 2 -- 1 file changed, 2 deletions(-) commit bdaf32c3ced3d111b692f0af585f880f82d686c5 Author: Serhey Popovych Date: Fri Jun 16 15:44:47 2017 +0300 fib_rules: Resolve goto rules target on delete We should avoid marking goto rules unresolved when their target is actually reachable after rule deletion. Consolder following sample scenario: # ip -4 ru sh 0: from all lookup local 32000: from all goto 32100 32100: from all lookup main 32100: from all lookup default 32766: from all lookup main 32767: from all lookup default # ip -4 ru del pref 32100 table main # ip -4 ru sh 0: from all lookup local 32000: from all goto 32100 [unresolved] 32100: from all lookup default 32766: from all lookup main 32767: from all lookup default After removal of first rule with preference 32100 we mark all goto rules as unreachable, even when rule with same preference as removed one still present. Check if next rule with same preference is available and make all rules with goto action pointing to it. Signed-off-by: Serhey Popovych Signed-off-by: David S. Miller net/core/fib_rules.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit acfd6ee4fa7ebeee75511825fe02be3f7ac1d668 Author: Alex Deucher Date: Mon Jun 19 15:59:58 2017 -0400 drm/radeon: add a quirk for Toshiba Satellite L20-183 Fixes resume from suspend. bug: https://bugzilla.kernel.org/show_bug.cgi?id=196121 Reported-by: Przemek Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_combios.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4eb59793cca00b0e629b6d55b5abb5acb82c5868 Author: Alex Deucher Date: Mon Jun 19 12:52:47 2017 -0400 drm/radeon: add a PX quirk for another K53TK variant Disable PX on these systems. bug: https://bugs.freedesktop.org/show_bug.cgi?id=101491 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_device.c | 4 ++++ 1 file changed, 4 insertions(+) commit 52b482b0f4fd6d5267faf29fe91398e203f3c230 Author: Alex Deucher Date: Thu Jun 15 11:12:28 2017 -0400 drm/amdgpu: adjust default display clock Increase the default display clock on newer asics to accomodate some high res modes with really high refresh rates. bug: https://bugs.freedesktop.org/show_bug.cgi?id=93826 Acked-by: Chunming Zhou Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 4 ++++ 1 file changed, 4 insertions(+) commit 05b4017b37f1fce4b7185f138126dd8decdb381f Author: Alex Deucher Date: Thu Jun 15 10:55:11 2017 -0400 drm/amdgpu/atom: fix ps allocation size for EnableDispPowerGating We were using the wrong structure which lead to an overflow on some boards. bug: https://bugs.freedesktop.org/show_bug.cgi?id=101387 Acked-by: Chunming Zhou Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/atombios_crtc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9e69672e90ccff10dab6f0c9545226a886e5973c Author: Fabrice Gasnier Date: Wed Jun 14 17:13:14 2017 +0200 dt-bindings: mfd: Update STM32 timers clock names Clock name has been updated during driver/DT binding review: https://lkml.org/lkml/2016/12/13/718 Update DT binding doc to reflect this. Fixes: 8f9359c6c6a0 (dt-bindings: mfd: Add bindings for STM32 Timers driver) Signed-off-by: Fabrice Gasnier Acked-by: Benjamin Gaignard Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/stm32-timers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e27a9eca5d4a392b96ce5d5238c8d637bcb0a52c Author: James Cowgill Date: Tue Jun 20 10:57:51 2017 +0100 KVM: MIPS: Fix maybe-uninitialized build failure This commit fixes a "maybe-uninitialized" build failure in arch/mips/kvm/tlb.c when KVM, DYNAMIC_DEBUG and JUMP_LABEL are all enabled. The failure is: In file included from ./include/linux/printk.h:329:0, from ./include/linux/kernel.h:13, from ./include/asm-generic/bug.h:15, from ./arch/mips/include/asm/bug.h:41, from ./include/linux/bug.h:4, from ./include/linux/thread_info.h:11, from ./include/asm-generic/current.h:4, from ./arch/mips/include/generated/asm/current.h:1, from ./include/linux/sched.h:11, from arch/mips/kvm/tlb.c:13: arch/mips/kvm/tlb.c: In function ‘kvm_mips_host_tlb_inv’: ./include/linux/dynamic_debug.h:126:3: error: ‘idx_kernel’ may be used uninitialized in this function [-Werror=maybe-uninitialized] __dynamic_pr_debug(&descriptor, pr_fmt(fmt), \ ^~~~~~~~~~~~~~~~~~ arch/mips/kvm/tlb.c:169:16: note: ‘idx_kernel’ was declared here int idx_user, idx_kernel; ^~~~~~~~~~ There is a similar error relating to "idx_user". Both errors were observed with GCC 6. As far as I can tell, it is impossible for either idx_user or idx_kernel to be uninitialized when they are later read in the calls to kvm_debug, but to satisfy the compiler, add zero initializers to both variables. Signed-off-by: James Cowgill Fixes: 57e3869cfaae ("KVM: MIPS/TLB: Generalise host TLB invalidate to kernel ASID") Cc: # 4.11+ Acked-by: James Hogan Signed-off-by: Radim Krčmář arch/mips/kvm/tlb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit ec2f0fadde446e0ebe28c779ffcac655228b8f1e Merge: dc9edc4 089bc01 Author: Jens Axboe Date: Tue Jun 20 07:09:27 2017 -0600 Merge branch 'stable/for-jens-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-linus Pull xen-blkback fixes from Konrad: "Security and memory leak fixes in xen block driver." commit c72544d85fd6e46cfca6056ba775a17dc272d810 Merge: 41f1830 3d3efb6 Author: Radim Krčmář Date: Tue Jun 20 14:32:57 2017 +0200 Merge branch 'kvm-ppc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc * fix problems that could cause hangs or crashes in the host on POWER9 * fix problems that could allow guests to potentially affect or disrupt the execution of the controlling userspace commit 6c7515c61ffa0985c57abd8892c7928b52b9a306 Author: Ralph Sennhauser Date: Thu Jun 1 22:08:20 2017 +0200 gpio: mvebu: change compatible string for PWM support As it turns out more than just Armada 370 and XP support using GPIO lines as PWM lines. For example the Armada 38x family has the same hardware support. As such "marvell,armada-370-xp-gpio" for the compatible string is a misnomer. Change the compatible string to "marvell,armada-370-gpio" before the driver makes it out of the -rc stage. This also follows the practice of using only the first device family supported as part of the name. Also update the documentation and comments in the code accordingly. Fixes: 757642f9a584 ("gpio: mvebu: Add limited PWM support") Signed-off-by: Ralph Sennhauser Acked-by: Gregory CLEMENT Acked-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/gpio-mvebu.txt | 6 +++--- drivers/gpio/gpio-mvebu.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 8e6cec1c7c5afa489687c90be15d6ed82c742975 Merge: dbb236c 459fa24 Author: Thomas Gleixner Date: Tue Jun 20 12:50:32 2017 +0200 Merge branch 'clockevents/4.12-fixes' of https://git.linaro.org/people/daniel.lezcano/linux into timers/urgent Pull clockevents fixes from Daniel Lezcano: - Fixed wrong iomem area unmapped in the arch_arm_timer (Frank Rowand) - Added missing includes for sun5i and cadence-ttc (Stephen Rothwell) commit 900a88ef348803cd2ad2aeb13ffe06e807c6ce65 Merge: 0ca4cd7 53145c2 Author: Jiri Kosina Date: Tue Jun 20 10:52:46 2017 +0200 Merge branch 'for-4.12/upstream-fixes' into for-linus commit 842c08846420baa619fe3cb8c9af538efdb89428 Author: Petr Mladek Date: Wed Jun 14 10:54:52 2017 +0200 livepatch: Fix stacking of patches with respect to RCU rcu_read_(un)lock(), list_*_rcu(), and synchronize_rcu() are used for a secure access and manipulation of the list of patches that modify the same function. In particular, it is the variable func_stack that is accessible from the ftrace handler via struct ftrace_ops and klp_ops. Of course, it synchronizes also some states of the patch on the top of the stack, e.g. func->transition in klp_ftrace_handler. At the same time, this mechanism guards also the manipulation of task->patch_state. It is modified according to the state of the transition and the state of the process. Now, all this works well as long as RCU works well. Sadly livepatching might get into some corner cases when this is not true. For example, RCU is not watching when rcu_read_lock() is taken in idle threads. It is because they might sleep and prevent reaching the grace period for too long. There are ways how to make RCU watching even in idle threads, see rcu_irq_enter(). But there is a small location inside RCU infrastructure when even this does not work. This small problematic location can be detected either before calling rcu_irq_enter() by rcu_irq_enter_disabled() or later by rcu_is_watching(). Sadly, there is no safe way how to handle it. Once we detect that RCU was not watching, we might see inconsistent state of the function stack and the related variables in klp_ftrace_handler(). Then we could do a wrong decision, use an incompatible implementation of the function and break the consistency of the system. We could warn but we could not avoid the damage. Fortunately, ftrace has similar problems and they seem to be solved well there. It uses a heavy weight implementation of some RCU operations. In particular, it replaces: + rcu_read_lock() with preempt_disable_notrace() + rcu_read_unlock() with preempt_enable_notrace() + synchronize_rcu() with schedule_on_each_cpu(sync_work) My understanding is that this is RCU implementation from a stone age. It meets the core RCU requirements but it is rather ineffective. Especially, it does not allow to batch or speed up the synchronize calls. On the other hand, it is very trivial. It allows to safely trace and/or livepatch even the RCU core infrastructure. And the effectiveness is a not a big issue because using ftrace or livepatches on productive systems is a rare operation. The safety is much more important than a negligible extra load. Note that the alternative implementation follows the RCU principles. Therefore, we could and actually must use list_*_rcu() variants when manipulating the func_stack. These functions allow to access the pointers in the right order and with the right barriers. But they do not use any other information that would be set only by rcu_read_lock(). Also note that there are actually two problems solved in ftrace: First, it cares about the consistency of RCU read sections. It is being solved the way as described and used in this patch. Second, ftrace needs to make sure that nobody is inside the dynamic trampoline when it is being freed. For this, it also calls synchronize_rcu_tasks() in preemptive kernel in ftrace_shutdown(). Livepatch has similar problem but it is solved by ftrace for free. klp_ftrace_handler() is a good guy and never sleeps. In addition, it is registered with FTRACE_OPS_FL_DYNAMIC. It causes that unregister_ftrace_function() calls: * schedule_on_each_cpu(ftrace_sync) - always * synchronize_rcu_tasks() - in preemptive kernel The effect is that nobody is neither inside the dynamic trampoline nor inside the ftrace handler after unregister_ftrace_function() returns. [jkosina@suse.cz: reformat changelog, fix comment] Signed-off-by: Petr Mladek Acked-by: Josh Poimboeuf Acked-by: Miroslav Benes Signed-off-by: Jiri Kosina kernel/livepatch/patch.c | 8 ++++++-- kernel/livepatch/transition.c | 36 +++++++++++++++++++++++++++++++----- 2 files changed, 37 insertions(+), 7 deletions(-) commit dbb236c1ceb697a559e0694ac4c9e7b9131d0b16 Author: Will Deacon Date: Thu Jun 8 16:44:22 2017 -0700 arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW Recently vDSO support for CLOCK_MONOTONIC_RAW was added in 49eea433b326 ("arm64: Add support for CLOCK_MONOTONIC_RAW in clock_gettime() vDSO"). Noticing that the core timekeeping code never set tkr_raw.xtime_nsec, the vDSO implementation didn't bother exposing it via the data page and instead took the unshifted tk->raw_time.tv_nsec value which was then immediately shifted left in the vDSO code. Unfortunately, by accellerating the MONOTONIC_RAW clockid, it uncovered potential 1ns time inconsistencies caused by the timekeeping core not handing sub-ns resolution. Now that the core code has been fixed and is actually setting tkr_raw.xtime_nsec, we need to take that into account in the vDSO by adding it to the shifted raw_time value, in order to fix the user-visible inconsistency. Rather than do that at each use (and expand the data page in the process), instead perform the shift/addition operation when populating the data page and remove the shift from the vDSO code entirely. [jstultz: minor whitespace tweak, tried to improve commit message to make it more clear this fixes a regression] Reported-by: John Stultz Signed-off-by: Will Deacon Signed-off-by: John Stultz Tested-by: Daniel Mentz Acked-by: Kevin Brodsky Cc: Prarit Bhargava Cc: Richard Cochran Cc: Stephen Boyd Cc: "stable #4 . 8+" Cc: Miroslav Lichvar Link: http://lkml.kernel.org/r/1496965462-20003-4-git-send-email-john.stultz@linaro.org Signed-off-by: Thomas Gleixner arch/arm64/kernel/vdso.c | 5 +++-- arch/arm64/kernel/vdso/gettimeofday.S | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) commit 3d88d56c5873f6eebe23e05c3da701960146b801 Author: John Stultz Date: Thu Jun 8 16:44:21 2017 -0700 time: Fix CLOCK_MONOTONIC_RAW sub-nanosecond accounting Due to how the MONOTONIC_RAW accumulation logic was handled, there is the potential for a 1ns discontinuity when we do accumulations. This small discontinuity has for the most part gone un-noticed, but since ARM64 enabled CLOCK_MONOTONIC_RAW in their vDSO clock_gettime implementation, we've seen failures with the inconsistency-check test in kselftest. This patch addresses the issue by using the same sub-ns accumulation handling that CLOCK_MONOTONIC uses, which avoids the issue for in-kernel users. Since the ARM64 vDSO implementation has its own clock_gettime calculation logic, this patch reduces the frequency of errors, but failures are still seen. The ARM64 vDSO will need to be updated to include the sub-nanosecond xtime_nsec values in its calculation for this issue to be completely fixed. Signed-off-by: John Stultz Tested-by: Daniel Mentz Cc: Prarit Bhargava Cc: Kevin Brodsky Cc: Richard Cochran Cc: Stephen Boyd Cc: Will Deacon Cc: "stable #4 . 8+" Cc: Miroslav Lichvar Link: http://lkml.kernel.org/r/1496965462-20003-3-git-send-email-john.stultz@linaro.org Signed-off-by: Thomas Gleixner include/linux/timekeeper_internal.h | 4 ++-- kernel/time/timekeeping.c | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) commit ceea5e3771ed2378668455fa21861bead7504df5 Author: John Stultz Date: Thu Jun 8 16:44:20 2017 -0700 time: Fix clock->read(clock) race around clocksource changes In tests, which excercise switching of clocksources, a NULL pointer dereference can be observed on AMR64 platforms in the clocksource read() function: u64 clocksource_mmio_readl_down(struct clocksource *c) { return ~(u64)readl_relaxed(to_mmio_clksrc(c)->reg) & c->mask; } This is called from the core timekeeping code via: cycle_now = tkr->read(tkr->clock); tkr->read is the cached tkr->clock->read() function pointer. When the clocksource is changed then tkr->clock and tkr->read are updated sequentially. The code above results in a sequential load operation of tkr->read and tkr->clock as well. If the store to tkr->clock hits between the loads of tkr->read and tkr->clock, then the old read() function is called with the new clock pointer. As a consequence the read() function dereferences a different data structure and the resulting 'reg' pointer can point anywhere including NULL. This problem was introduced when the timekeeping code was switched over to use struct tk_read_base. Before that, it was theoretically possible as well when the compiler decided to reload clock in the code sequence: now = tk->clock->read(tk->clock); Add a helper function which avoids the issue by reading tk_read_base->clock once into a local variable clk and then issue the read function via clk->read(clk). This guarantees that the read() function always gets the proper clocksource pointer handed in. Since there is now no use for the tkr.read pointer, this patch also removes it, and to address stopping the fast timekeeper during suspend/resume, it introduces a dummy clocksource to use rather then just a dummy read function. Signed-off-by: John Stultz Acked-by: Ingo Molnar Cc: Prarit Bhargava Cc: Richard Cochran Cc: Stephen Boyd Cc: stable Cc: Miroslav Lichvar Cc: Daniel Mentz Link: http://lkml.kernel.org/r/1496965462-20003-2-git-send-email-john.stultz@linaro.org Signed-off-by: Thomas Gleixner include/linux/timekeeper_internal.h | 1 - kernel/time/timekeeping.c | 52 +++++++++++++++++++++++++------------ 2 files changed, 36 insertions(+), 17 deletions(-) commit 53145c2e354b5a5ed031cec7472b4f16bab060c7 Author: Daniel Stone Date: Thu Jun 15 13:35:50 2017 +0100 Revert "HID: magicmouse: Set multi-touch keybits for Magic Mouse" Setting these bits causes libinput to fail to initialize the device; setting BTN_TOUCH and BTN_TOOL_FINGER causes it to treat the mouse as a touchpad, and it then refuses to continue when it discovers ABS_X is not set. This breaks all known Wayland compositors, as well as Xorg when the libinput driver is being used. This reverts commit f4b65b9563216b3e01a5cc844c3ba68901d9b195. Signed-off-by: Daniel Stone Cc: Che-Liang Chiou Cc: Thierry Escande Cc: Jiri Kosina Cc: Benjamin Tissoires Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-magicmouse.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit c7ecb9068e6772c43941ce609f08bc53f36e1dce Author: Takashi Iwai Date: Wed Jun 14 07:37:14 2017 +0200 ALSA: hda - Apply quirks to Broxton-T, too Broxton-T was a forgotten child and we didn't apply the quirks for Skylake+ properly. Meanwhile, a quirk for reducing the DMA latency seems specific to the early Broxton model, so we leave as is. Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 817ae460c784f32cd45e60b2b1b21378c3c6a847 Author: Daniel Drake Date: Mon Jun 19 19:48:52 2017 -0700 Input: i8042 - add Fujitsu Lifebook AH544 to notimeout list Without this quirk, the touchpad is not responsive on this product, with the following message repeated in the logs: psmouse serio1: bad data from KBC - timeout Add it to the notimeout list alongside other similar Fujitsu laptops. Signed-off-by: Daniel Drake Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/serio/i8042-x86ia64io.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 9705596d08ac87c18aee32cc97f2783b7d14624e Merge: 865be78 949bdfe Author: Linus Torvalds Date: Tue Jun 20 11:02:29 2017 +0800 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "One build fix for an Amlogic clk driver and a handful of Allwinner clk driver fixes for some DT bindings and a randconfig build error that all came in this merge window" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: sunxi-ng: a64: Export PLL_PERIPH0 clock for the PRCM clk: sunxi-ng: h3: Export PLL_PERIPH0 clock for the PRCM dt-bindings: clock: sunxi-ccu: Add pll-periph to PRCM's needed clocks clk: sunxi-ng: sun5i: Fix ahb_bist_clk definition clk: sunxi-ng: enable SUNXI_CCU_MP for PRCM clk: meson: gxbb: fix build error without RESET_CONTROLLER clk: sunxi-ng: v3s: Fix usb otg device reset bit clk: sunxi-ng: a31: Correct lcd1-ch1 clock register offset commit 865be78022e9ae8151c755d01201012ccf5e3232 Merge: 41f1830 88931ec Author: Linus Torvalds Date: Tue Jun 20 10:57:06 2017 +0800 Merge tag 'ntb-4.12-bugfixes' of git://github.com/jonmason/ntb Pull NTB fixes from Jon Mason: "NTB bug fixes to address the modinfo in ntb_perf, a couple of bugs in the NTB transport QP calculations, skx doorbells, and sleeping in ntb_async_tx_submit" * tag 'ntb-4.12-bugfixes' of git://github.com/jonmason/ntb: ntb: no sleep in ntb_async_tx_submit ntb: ntb_hw_intel: Skylake doorbells should be 32bits, not 64bits ntb_transport: fix bug calculating num_qps_mw ntb_transport: fix qp count bug NTB: ntb_test: fix bug printing ntb_perf results ntb: Correct modinfo usage statement for ntb_perf commit 02d94e04747c5df55410c7b19f3cf72a1a11899b Author: Manish Rangankar Date: Thu Jun 15 00:10:40 2017 -0700 scsi: qedi: Remove WARN_ON from clear task context. Signed-off-by: Manish Rangankar Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 6ebf81536d3be327c4f5f59bae3b841d62322343 Author: Manish Rangankar Date: Thu Jun 15 00:10:39 2017 -0700 scsi: qedi: Remove WARN_ON for untracked cleanup. Signed-off-by: Manish Rangankar Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_fw.c | 1 - 1 file changed, 1 deletion(-) commit 4a072c71f49b0a0e495ea13423bdb850da73c58c Author: Jason A. Donenfeld Date: Thu Jun 15 00:45:26 2017 +0200 random: silence compiler warnings and fix race Odd versions of gcc for the sh4 architecture will actually warn about flags being used while uninitialized, so we set them to zero. Non crazy gccs will optimize that out again, so it doesn't make a difference. Next, over aggressive gccs could inline the expression that defines use_lock, which could then introduce a race resulting in a lock imbalance. By using READ_ONCE, we prevent that fate. Finally, we make that assignment const, so that gcc can still optimize a nice amount. Finally, we fix a potential deadlock between primary_crng.lock and batched_entropy_reset_lock, where they could be called in opposite order. Moving the call to invalidate_batched_entropy to outside the lock rectifies this issue. Fixes: b169c13de473a85b3c859bb36216a4cb5f00a54a Signed-off-by: Jason A. Donenfeld Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org drivers/char/random.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6e88491cf2a3b17199c78bd53348b39dc6a88275 Author: Junshan Fang Date: Thu Jun 15 14:02:20 2017 +0800 drm/amdgpu: add Polaris12 DID Signed-off-by: Junshan Fang Reviewed-by: Roger.He Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + 1 file changed, 1 insertion(+) commit a8ae0a773d38b4b1d4566b0edcb6bb63f4a9d22f Author: Dhinakaran Pandiyan Date: Mon Jun 19 11:08:28 2017 -0700 drm/i915: Don't enable backlight at setup time. Maarten and Ville noticed that we are enabling backlight via DP aux very early in the modeset_init path via the intel_dp_aux_setup_backlight() function, since commit e7156c833903 ("drm/i915: Add Backlight Control using DPCD for eDP connectors (v9)"). Looks like all we need to do during _setup_backlight() is read the current brightness state instead of modifying it. v2: Rewrote commit message. Cc: Ville Syrjala Cc: Maarten Lankhorst Cc: Jani Nikula Cc: Yetunde Adebisi Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Maarten Lankhorst Acked-by: Jani Nikula Tested-by: Puthikorn Voravootivat Fixes: e7156c833903 ("drm/i915: Add Backlight Control using DPCD for eDP connectors (v9)") Link: http://patchwork.freedesktop.org/patch/msgid/1497384239-2965-1-git-send-email-dhinakaran.pandiyan@intel.com Signed-off-by: Ville Syrjälä (cherry picked from commit f6262bda462e81e959b80a96dac799bd9df27f73) Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1497895708-19422-1-git-send-email-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 2 -- 1 file changed, 2 deletions(-) commit 86fdb3448cc1ffe0e9f55380f1410f1d12c35f95 Author: Xin Long Date: Sat Jun 17 16:10:27 2017 +0800 sctp: ensure ep is not destroyed before doing the dump Now before dumping a sock in sctp_diag, it only holds the sock while the ep may be already destroyed. It can cause a use-after-free panic when accessing ep->asocs. This patch is to set sctp_sk(sk)->ep NULL in sctp_endpoint_destroy, and check if this ep is already destroyed before dumping this ep. Suggested-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/endpointola.c | 1 + net/sctp/sctp_diag.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit 88931ec3dc11e7dbceb3b0df455693873b508fbe Author: Allen Hubbe Date: Fri Jun 9 18:06:36 2017 -0400 ntb: no sleep in ntb_async_tx_submit Do not sleep in ntb_async_tx_submit, which could deadlock. This reverts commit "8c874cc140d667f84ae4642bb5b5e0d6396d2ca4" Fixes: 8c874cc140d6 ("NTB: Address out of DMA descriptor issue with NTB") Reported-by: Jia-Ju Bai Signed-off-by: Allen Hubbe Acked-by: Dave Jiang Signed-off-by: Jon Mason drivers/ntb/ntb_transport.c | 50 +++++++-------------------------------------- 1 file changed, 7 insertions(+), 43 deletions(-) commit 5eb449e15d2396785a8eb15baf42cea33db9ae13 Author: Dave Jiang Date: Thu Jun 8 12:46:45 2017 -0700 ntb: ntb_hw_intel: Skylake doorbells should be 32bits, not 64bits Fixing doorbell register length to 32bits per spec. On Skylake NTB, the doorbell registers are 32bit write only registers. The source for the doorbell is a 64bit register that shows the interrupt bits. Signed-off-by: Dave Jiang Fixes: 783dfa6cc41b ("ntb: Adding Skylake Xeon NTB support") Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/hw/intel/ntb_hw_intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e8496e0e9564b66165f5219a4e8ed20b0d3fc6b Author: Logan Gunthorpe Date: Mon Jun 5 14:00:53 2017 -0600 ntb_transport: fix bug calculating num_qps_mw A divide by zero error occurs if qp_count is less than mw_count because num_qps_mw is calculated to be zero. The calculation appears to be incorrect. The requirement is for num_qps_mw to be set to qp_count / mw_count with any remainder divided among the earlier mws. For example, if mw_count is 5 and qp_count is 12 then mws 0 and 1 will have 3 qps per window and mws 2 through 4 will have 2 qps per window. Thus, when mw_num < qp_count % mw_count, num_qps_mw is 1 higher than when mw_num >= qp_count. Signed-off-by: Logan Gunthorpe Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers") Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/ntb_transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cb827ee6ccc3e480f0d9c0e8e53eef55be5b0414 Author: Logan Gunthorpe Date: Mon Jun 5 14:00:52 2017 -0600 ntb_transport: fix qp count bug In cases where there are more mw's than spads/2-2, the mw count gets reduced to match the limitation. ntb_transport also tries to ensure that there are fewer qps than mws but uses the full mw count instead of the reduced one. When this happens, the math in 'ntb_transport_setup_qp_mw' will get confused and result in a kernel paging request bug. This patch fixes the bug by reducing qp_count to the reduced mw count instead of the full mw count. Signed-off-by: Logan Gunthorpe Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers") Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/ntb_transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 07b0b22b3e58824f70b9188d085d400069ca3240 Author: Logan Gunthorpe Date: Mon Jun 5 10:13:24 2017 -0600 NTB: ntb_test: fix bug printing ntb_perf results The code mistakenly prints the local perf results for the remote test so the script reports identical results for both directions. Fix this by ensuring we print the remote result. Signed-off-by: Logan Gunthorpe Fixes: a9c59ef77458 ("ntb_test: Add a selftest script for the NTB subsystem") Acked-by: Allen Hubbe Signed-off-by: Jon Mason tools/testing/selftests/ntb/ntb_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94fc795454f461134cdffb88bef4eb9f788c0b5d Author: Gary R Hook Date: Thu May 4 11:36:52 2017 -0500 ntb: Correct modinfo usage statement for ntb_perf The order parameters are powers of 2; adjust the usage information to use correct mathematical representations. Signed-off-by: Gary R Hook Fixes: 8a7b6a778a85 ("ntb: ntb perf tool") Acked-by: Dave Jiang Signed-off-by: Jon Mason drivers/ntb/test/ntb_perf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7fe5b914313ff67d71cb2b5aa4b850e0884e75dd Author: Lin Yun Sheng Date: Fri Jun 16 17:24:51 2017 +0800 net/hns:bugfix of ethtool -t phy self_test This patch fixes the phy loopback self_test failed issue. when Marvell Phy Module is loaded, it will powerdown fiber when doing phy loopback self test, which cause phy loopback self_test fail. Signed-off-by: Lin Yun Sheng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 9745e362add89432d2c951272a99b0a5fe4348a9 Author: Gao Feng Date: Fri Jun 16 15:00:02 2017 +0800 net: 8021q: Fix one possible panic caused by BUG_ON in free_netdev The register_vlan_device would invoke free_netdev directly, when register_vlan_dev failed. It would trigger the BUG_ON in free_netdev if the dev was already registered. In this case, the netdev would be freed in netdev_run_todo later. So add one condition check now. Only when dev is not registered, then free it directly. The following is the part coredump when netdev_upper_dev_link failed in register_vlan_dev. I removed the lines which are too long. [ 411.237457] ------------[ cut here ]------------ [ 411.237458] kernel BUG at net/core/dev.c:7998! [ 411.237484] invalid opcode: 0000 [#1] SMP [ 411.237705] [last unloaded: 8021q] [ 411.237718] CPU: 1 PID: 12845 Comm: vconfig Tainted: G E 4.12.0-rc5+ #6 [ 411.237737] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/02/2015 [ 411.237764] task: ffff9cbeb6685580 task.stack: ffffa7d2807d8000 [ 411.237782] RIP: 0010:free_netdev+0x116/0x120 [ 411.237794] RSP: 0018:ffffa7d2807dbdb0 EFLAGS: 00010297 [ 411.237808] RAX: 0000000000000002 RBX: ffff9cbeb6ba8fd8 RCX: 0000000000001878 [ 411.237826] RDX: 0000000000000001 RSI: 0000000000000282 RDI: 0000000000000000 [ 411.237844] RBP: ffffa7d2807dbdc8 R08: 0002986100029841 R09: 0002982100029801 [ 411.237861] R10: 0004000100029980 R11: 0004000100029980 R12: ffff9cbeb6ba9000 [ 411.238761] R13: ffff9cbeb6ba9060 R14: ffff9cbe60f1a000 R15: ffff9cbeb6ba9000 [ 411.239518] FS: 00007fb690d81700(0000) GS:ffff9cbebb640000(0000) knlGS:0000000000000000 [ 411.239949] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 411.240454] CR2: 00007f7115624000 CR3: 0000000077cdf000 CR4: 00000000003406e0 [ 411.240936] Call Trace: [ 411.241462] vlan_ioctl_handler+0x3f1/0x400 [8021q] [ 411.241910] sock_ioctl+0x18b/0x2c0 [ 411.242394] do_vfs_ioctl+0xa1/0x5d0 [ 411.242853] ? sock_alloc_file+0xa6/0x130 [ 411.243465] SyS_ioctl+0x79/0x90 [ 411.243900] entry_SYSCALL_64_fastpath+0x1e/0xa9 [ 411.244425] RIP: 0033:0x7fb69089a357 [ 411.244863] RSP: 002b:00007ffcd04e0fc8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 411.245445] RAX: ffffffffffffffda RBX: 00007ffcd04e2884 RCX: 00007fb69089a357 [ 411.245903] RDX: 00007ffcd04e0fd0 RSI: 0000000000008983 RDI: 0000000000000003 [ 411.246527] RBP: 00007ffcd04e0fd0 R08: 0000000000000000 R09: 1999999999999999 [ 411.246976] R10: 000000000000053f R11: 0000000000000202 R12: 0000000000000004 [ 411.247414] R13: 00007ffcd04e1128 R14: 00007ffcd04e2888 R15: 0000000000000001 [ 411.249129] RIP: free_netdev+0x116/0x120 RSP: ffffa7d2807dbdb0 Signed-off-by: Gao Feng Signed-off-by: David S. Miller net/8021q/vlan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4a9bfafc64f44ef83de4e00ca1b57352af6cd8c2 Author: Takashi Sakamoto Date: Sun Jun 11 16:08:21 2017 +0900 ALSA: firewire-lib: Fix stall of process context at packet error At Linux v3.5, packet processing can be done in process context of ALSA PCM application as well as software IRQ context for OHCI 1394. Below is an example of the callgraph (some calls are omitted). ioctl(2) with e.g. HWSYNC (sound/core/pcm_native.c) ->snd_pcm_common_ioctl1() ->snd_pcm_hwsync() ->snd_pcm_stream_lock_irq (sound/core/pcm_lib.c) ->snd_pcm_update_hw_ptr() ->snd_pcm_udpate_hw_ptr0() ->struct snd_pcm_ops.pointer() (sound/firewire/*) = Each handler on drivers in ALSA firewire stack (sound/firewire/amdtp-stream.c) ->amdtp_stream_pcm_pointer() (drivers/firewire/core-iso.c) ->fw_iso_context_flush_completions() ->struct fw_card_driver.flush_iso_completion() (drivers/firewire/ohci.c) = flush_iso_completions() ->struct fw_iso_context.callback.sc (sound/firewire/amdtp-stream.c) = in_stream_callback() or out_stream_callback() ->... ->snd_pcm_stream_unlock_irq When packet queueing error occurs or detecting invalid packets in 'in_stream_callback()' or 'out_stream_callback()', 'snd_pcm_stop_xrun()' is called on local CPU with disabled IRQ. (sound/firewire/amdtp-stream.c) in_stream_callback() or out_stream_callback() ->amdtp_stream_pcm_abort() ->snd_pcm_stop_xrun() ->snd_pcm_stream_lock_irqsave() ->snd_pcm_stop() ->snd_pcm_stream_unlock_irqrestore() The process is stalled on the CPU due to attempt to acquire recursive lock. [ 562.630853] INFO: rcu_sched detected stalls on CPUs/tasks: [ 562.630861] 2-...: (1 GPs behind) idle=37d/140000000000000/0 softirq=38323/38323 fqs=7140 [ 562.630862] (detected by 3, t=15002 jiffies, g=21036, c=21035, q=5933) [ 562.630866] Task dump for CPU 2: [ 562.630867] alsa-source-OXF R running task 0 6619 1 0x00000008 [ 562.630870] Call Trace: [ 562.630876] ? vt_console_print+0x79/0x3e0 [ 562.630880] ? msg_print_text+0x9d/0x100 [ 562.630883] ? up+0x32/0x50 [ 562.630885] ? irq_work_queue+0x8d/0xa0 [ 562.630886] ? console_unlock+0x2b6/0x4b0 [ 562.630888] ? vprintk_emit+0x312/0x4a0 [ 562.630892] ? dev_vprintk_emit+0xbf/0x230 [ 562.630895] ? do_sys_poll+0x37a/0x550 [ 562.630897] ? dev_printk_emit+0x4e/0x70 [ 562.630900] ? __dev_printk+0x3c/0x80 [ 562.630903] ? _raw_spin_lock+0x20/0x30 [ 562.630909] ? snd_pcm_stream_lock+0x31/0x50 [snd_pcm] [ 562.630914] ? _snd_pcm_stream_lock_irqsave+0x2e/0x40 [snd_pcm] [ 562.630918] ? snd_pcm_stop_xrun+0x16/0x70 [snd_pcm] [ 562.630922] ? in_stream_callback+0x3e6/0x450 [snd_firewire_lib] [ 562.630925] ? handle_ir_packet_per_buffer+0x8e/0x1a0 [firewire_ohci] [ 562.630928] ? ohci_flush_iso_completions+0xa3/0x130 [firewire_ohci] [ 562.630932] ? fw_iso_context_flush_completions+0x15/0x20 [firewire_core] [ 562.630935] ? amdtp_stream_pcm_pointer+0x2d/0x40 [snd_firewire_lib] [ 562.630938] ? pcm_capture_pointer+0x19/0x20 [snd_oxfw] [ 562.630943] ? snd_pcm_update_hw_ptr0+0x47/0x3d0 [snd_pcm] [ 562.630945] ? poll_select_copy_remaining+0x150/0x150 [ 562.630947] ? poll_select_copy_remaining+0x150/0x150 [ 562.630952] ? snd_pcm_update_hw_ptr+0x10/0x20 [snd_pcm] [ 562.630956] ? snd_pcm_hwsync+0x45/0xb0 [snd_pcm] [ 562.630960] ? snd_pcm_common_ioctl1+0x1ff/0xc90 [snd_pcm] [ 562.630962] ? futex_wake+0x90/0x170 [ 562.630966] ? snd_pcm_capture_ioctl1+0x136/0x260 [snd_pcm] [ 562.630970] ? snd_pcm_capture_ioctl+0x27/0x40 [snd_pcm] [ 562.630972] ? do_vfs_ioctl+0xa3/0x610 [ 562.630974] ? vfs_read+0x11b/0x130 [ 562.630976] ? SyS_ioctl+0x79/0x90 [ 562.630978] ? entry_SYSCALL_64_fastpath+0x1e/0xad This commit fixes the above bug. This assumes two cases: 1. Any error is detected in software IRQ context of OHCI 1394 context. In this case, PCM substream should be aborted in packet handler. On the other hand, it should not be done in any process context. TO distinguish these two context, use 'in_interrupt()' macro. 2. Any error is detect in process context of ALSA PCM application. In this case, PCM substream should not be aborted in packet handler because PCM substream lock is acquired. The task to abort PCM substream should be done in ALSA PCM core. For this purpose, SNDRV_PCM_POS_XRUN is returned at 'struct snd_pcm_ops.pointer()'. Suggested-by: Clemens Ladisch Fixes: e9148dddc3c7("ALSA: firewire-lib: flush completed packets when reading PCM position") Cc: # 4.9+ Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 8 ++++++-- sound/firewire/amdtp-stream.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) commit dec6b33163d24e2c19ba521c89fffbaab53ae986 Author: Raju Rangoju Date: Mon Jun 19 19:46:00 2017 +0530 cxgb4: notify uP to route ctrlq compl to rdma rspq During the module initialisation there is a possible race (basically race between uld and lld) where neither the uld nor lld notifies the uP about where to route the ctrl queue completions. LLD skips notifying uP as the rdma queues were not created by then (will leave it to ULD to notify the uP). As the ULD comes up, it also skips notifying the uP as the flag FULL_INIT_DONE is not set yet (ULD assumes that the interface is not up yet). Consequently, this race between uld and lld leaves uP unnotified about where to send the ctrl queue completions to, leading to iwarp RI_RES WR failure. Here is the race: CPU 0 CPU1 - allocates nic rx queus - t4_sge_alloc_ctrl_txq() (if rdma rsp queues exists, tell uP to route ctrl queue compl to rdma rspq) - acquires the mutex_lock - allocates rdma response queues - if FULL_INIT_DONE set, tell uP to route ctrl queue compl to rdma rspq - relinquishes mutex_lock - acquires the mutex_lock - enable_rx() - set FULL_INIT_DONE - relinquishes mutex_lock This patch fixes the above issue. Fixes: e7519f9926f1('cxgb4: avoid enabling napi twice to the same queue') Signed-off-by: Raju Rangoju Acked-by: Steve Wise CC: Stable # 4.9+ Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 41f1830f5a7af77cf5c86359aba3cbd706687e52 Author: Linus Torvalds Date: Mon Jun 19 22:19:37 2017 +0800 Linux 4.12-rc6 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1be7107fbe18eed3e319a6c3e83c78254b693acb Author: Hugh Dickins Date: Mon Jun 19 04:03:24 2017 -0700 mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage in userspace. E.g. glibc uses as large as 64kB alloca() in many commonly used functions. Others use constructs liks gid_t buffer[NGROUPS_MAX] which is 256kB or stack strings with MAX_ARG_STRLEN. This will become especially dangerous for suid binaries and the default no limit for the stack size limit because those applications can be tricked to consume a large portion of the stack and a single glibc call could jump over the guard page. These attacks are not theoretical, unfortunatelly. Make those attacks less probable by increasing the stack guard gap to 1MB (on systems with 4k pages; but make it depend on the page size because systems with larger base pages might cap stack allocations in the PAGE_SIZE units) which should cover larger alloca() and VLA stack allocations. It is obviously not a full fix because the problem is somehow inherent, but it should reduce attack space a lot. One could argue that the gap size should be configurable from userspace, but that can be done later when somebody finds that the new 1MB is wrong for some special case applications. For now, add a kernel command line option (stack_guard_gap) to specify the stack gap size (in page units). Implementation wise, first delete all the old code for stack guard page: because although we could get away with accounting one extra page in a stack vma, accounting a larger gap can break userspace - case in point, a program run with "ulimit -S -v 20000" failed when the 1MB gap was counted for RLIMIT_AS; similar problems could come with RLIMIT_MLOCK and strict non-overcommit mode. Instead of keeping gap inside the stack vma, maintain the stack guard gap as a gap between vmas: using vm_start_gap() in place of vm_start (or vm_end_gap() in place of vm_end if VM_GROWSUP) in just those few places which need to respect the gap - mainly arch_get_unmapped_area(), and and the vma tree's subtree_gap support for that. Original-patch-by: Oleg Nesterov Original-patch-by: Michal Hocko Signed-off-by: Hugh Dickins Acked-by: Michal Hocko Tested-by: Helge Deller # parisc Signed-off-by: Linus Torvalds Documentation/admin-guide/kernel-parameters.txt | 7 ++ arch/arc/mm/mmap.c | 2 +- arch/arm/mm/mmap.c | 4 +- arch/frv/mm/elf-fdpic.c | 2 +- arch/mips/mm/mmap.c | 2 +- arch/parisc/kernel/sys_parisc.c | 15 ++- arch/powerpc/mm/hugetlbpage-radix.c | 2 +- arch/powerpc/mm/mmap.c | 4 +- arch/powerpc/mm/slice.c | 2 +- arch/s390/mm/mmap.c | 4 +- arch/sh/mm/mmap.c | 4 +- arch/sparc/kernel/sys_sparc_64.c | 4 +- arch/sparc/mm/hugetlbpage.c | 2 +- arch/tile/mm/hugetlbpage.c | 2 +- arch/x86/kernel/sys_x86_64.c | 4 +- arch/x86/mm/hugetlbpage.c | 2 +- arch/xtensa/kernel/syscall.c | 2 +- fs/hugetlbfs/inode.c | 2 +- fs/proc/task_mmu.c | 4 - include/linux/mm.h | 53 ++++----- mm/gup.c | 5 - mm/memory.c | 38 ------ mm/mmap.c | 149 ++++++++++++++---------- 23 files changed, 152 insertions(+), 163 deletions(-) commit 1132d5e7b64445b3fa3cb982e6723e33318f7655 Merge: 3696e4f a1858df Author: Linus Torvalds Date: Mon Jun 19 16:50:09 2017 +0800 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "Stream of fixes has slowed down, only a few this week: - Some DT fixes for Allwinner platforms, and addition of a clock to the R_CCU clock controller that had been missed. - A couple of small DT fixes for am335x-sl50" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: arm64: allwinner: a64: Add PLL_PERIPH0 clock to the R_CCU ARM: sunxi: h3-h5: Add PLL_PERIPH0 clock to the R_CCU ARM: dts: am335x-sl50: Fix cannot claim requested pins for spi0 ARM: dts: am335x-sl50: Fix card detect pin for mmc1 arm64: allwinner: h5: Remove syslink to shared DTSI ARM: sunxi: h3/h5: fix the compatible of R_CCU commit b7f5dd36e0c5cb9ca1070a5e0f22f666bcff07ef Author: Ville Syrjälä Date: Thu Jun 1 17:36:14 2017 +0300 drm/i915: Plumb the correct acquire ctx into intel_crtc_disable_noatomic() If intel_crtc_disable_noatomic() were to ever get called during resume we'd end up deadlocking since resume has its own acqcuire_ctx but intel_crtc_disable_noatomic() still tries to use the mode_config.acquire_ctx. Pass down the correct acquire ctx from the top. Cc: stable@vger.kernel.org Cc: Maarten Lankhorst Fixes: e2c8b8701e2d ("drm/i915: Use atomic helpers for suspend, v2.") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170601143619.27840-3-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst (cherry picked from commit da1d0e265535634bba80d44510b864c620549bee) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 17b206c27366f3cee816eaf86fafc6a11f628ecf Author: Ville Syrjälä Date: Thu Jun 1 17:36:13 2017 +0300 drm/i915: Fix deadlock witha the pipe A quirk during resume Pass down the correct acquire context to the pipe A quirk load detect hack during display resume. Avoids deadlocking the entire thing. Cc: stable@vger.kernel.org Cc: Maarten Lankhorst Fixes: e2c8b8701e2d ("drm/i915: Use atomic helpers for suspend, v2.") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170601143619.27840-2-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst (cherry picked from commit aecd36b8a16b2302b33f49ba3fa24c955f1e32f7) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit ce2c58724f7d07e76dadfeba53d6877a9e67341d Author: Chris Wilson Date: Fri Jun 9 12:03:47 2017 +0100 drm/i915: Remove __GFP_NORETRY from our buffer allocator I tried __GFP_NORETRY in the belief that __GFP_RECLAIM was effective. It struggles with handling reclaim of our dirty buffers and relies on reclaim via kswapd. As a result, a single pass of direct reclaim is unreliable when i915 occupies the majority of available memory, and the only means of effectively waiting on kswapd to amke progress is by not setting the __GFP_NORETRY flag and lopping. That leaves us with the dilemma of invoking the oomkiller instead of propagating the allocation failure back to userspace where it can be handled more gracefully (one hopes). In the future we may have __GFP_MAYFAIL to allow repeats up until we genuinely run out of memory and the oomkiller would have been invoked. Until then, let the oomkiller wreck havoc. v2: Stop playing with side-effects of gfp flags and await __GFP_MAYFAIL v3: Update comments that direct reclaim only appears to be ignoring our dirty buffers! Fixes: 24f8e00a8a2e ("drm/i915: Prefer to report ENOMEM rather than incur the oom for gfx allocations") Testcase: igt/gem_tiled_swapping Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Daniel Vetter Cc: Michal Hocko Link: http://patchwork.freedesktop.org/patch/msgid/20170609110350.1767-2-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen (cherry picked from commit eaf41801559a687cc7511c04dc712984765c9dd7) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit b8d5a9ccfba5fc084b50b00b9f5b587a8e64b72c Author: Chris Wilson Date: Fri Jun 9 12:03:46 2017 +0100 drm/i915: Encourage our shrinker more when our shmemfs allocations fails Commit 24f8e00a8a2e ("drm/i915: Prefer to report ENOMEM rather than incur the oom for gfx allocations") made the bold decision to try and avoid the oomkiller by reporting -ENOMEM to userspace if our allocation failed after attempting to free enough buffer objects. In short, it appears we were giving up too easily (even before we start wondering if one pass of reclaim is as strong as we would like). Part of the problem is that if we only shrink just enough pages for our expected allocation, the likelihood of those pages becoming available to us is less than 100% To counter-act that we ask for twice the number of pages to be made available. Furthermore, we allow the shrinker to pull pages from the active list in later passes. v2: Be a little more cautious in paging out gfx buffers, and leave that to a more balanced approach from shrink_slab(). Important when combined with "drm/i915: Start writeback from the shrinker" as anything shrunk is immediately swapped out and so should be more conservative. Fixes: 24f8e00a8a2e ("drm/i915: Prefer to report ENOMEM rather than incur the oom for gfx allocations") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Daniel Vetter Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170609110350.1767-1-chris@chris-wilson.co.uk (cherry picked from commit 4846bf0ca8cb4304dde6140eff33a92b3fe8ef24) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 50 ++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 21 deletions(-) commit a21ef715fbb8210c50b1d684145f8acdf2339596 Author: Chris Wilson Date: Thu Jun 15 14:11:29 2017 +0100 drm/i915: Differentiate between sw write location into ring and last hw read We need to keep track of the last location we ask the hw to read up to (RING_TAIL) separately from our last write location into the ring, so that in the event of a GPU reset we do not tell the HW to proceed into a partially written request (which can happen if that request is waiting for an external signal before being executed). v2: Refactor intel_ring_reset() (Mika) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100144 Testcase: igt/gem_exec_fence/await-hang Fixes: 821ed7df6e2a ("drm/i915: Update reset path to fix incomplete requests") Fixes: d55ac5bf97c6 ("drm/i915: Defer transfer onto execution timeline to actual hw submission") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170425130049.26147-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala (cherry picked from commit e6ba9992de6c63fe86c028b4876338e1cb7dac34) Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170615131129.3061-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 2 +- drivers/gpu/drm/i915/i915_guc_submission.c | 4 +-- drivers/gpu/drm/i915/intel_lrc.c | 6 ++--- drivers/gpu/drm/i915/intel_ringbuffer.c | 41 ++++++++++++++++++++---------- drivers/gpu/drm/i915/intel_ringbuffer.h | 19 ++++++++++++-- 5 files changed, 48 insertions(+), 24 deletions(-) commit 4b153ca989a9bf61f622ded32e1d689df88edaa5 Merge: 46f8cd9 68dd02d Author: David S. Miller Date: Mon Jun 19 00:03:51 2017 -0400 Merge tag 'mac80211-for-davem-2017-06-16' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Here's just the fix for that ancient bug: * remove wext calling ndo_do_ioctl, since nobody needs that now and it makes the type change easier * use struct iwreq instead of struct ifreq almost everywhere in wireless extensions code * copy only struct iwreq from userspace in dev_ioctl for the wireless extensions, since it's smaller than struct ifreq ==================== Signed-off-by: David S. Miller commit 46f8cd9d2fc1e4e8b82b53a0007f6c92e80c930b Author: Haishuang Yan Date: Sat Jun 17 11:38:05 2017 +0800 ip6_tunnel: Correct tos value in collect_md mode Same as ip_gre, geneve and vxlan, use key->tos as traffic class value. CC: Peter Dawson Fixes: 0e9a709560db ("ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets”) Signed-off-by: Haishuang Yan Acked-by: Peter Dawson Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a1858df975edf6706e7a5a3ae000e52d81076807 Merge: 51b6e28 f74994a Author: Olof Johansson Date: Sun Jun 18 20:42:21 2017 -0700 Merge tag 'sunxi-fixes-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into fixes Allwinner fixes for 4.12 A few fixes around the PRCM support that got in 4.12 with a wrong compatible, and a missing clock in the binding. * tag 'sunxi-fixes-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: allwinner: a64: Add PLL_PERIPH0 clock to the R_CCU ARM: sunxi: h3-h5: Add PLL_PERIPH0 clock to the R_CCU arm64: allwinner: h5: Remove syslink to shared DTSI ARM: sunxi: h3/h5: fix the compatible of R_CCU Signed-off-by: Olof Johansson commit 51b6e2813ca1d7cb530d5f834ea22f1ae52b7e35 Merge: 151d1d7 db145db Author: Olof Johansson Date: Sun Jun 18 18:55:12 2017 -0700 Merge tag 'omap-for-v4.12/fixes-sl50' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Two fixes for am335x-sl50 to fix a boot time error for claiming SPI pins, and to fix a SDIO card detect pin for production version of the device. * tag 'omap-for-v4.12/fixes-sl50' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am335x-sl50: Fix cannot claim requested pins for spi0 ARM: dts: am335x-sl50: Fix card detect pin for mmc1 Signed-off-by: Olof Johansson commit 3696e4f0b0072eb9753ffa1387be1dd2ebe2cb8f Merge: 7d62d94 e41b135 Author: Linus Torvalds Date: Mon Jun 19 09:25:05 2017 +0900 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio bugfix from Michael Tsirkin: "It turns out balloon does not handle IOMMUs correctly. We should fix that at some point, for now let's just disable this configuration" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_balloon: disable VIOMMU support commit 7d62d947605640b403fcb75d7928241d34231b4a Merge: b3ee4ed 17e8354 Author: Linus Torvalds Date: Mon Jun 19 09:20:25 2017 +0900 Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Two driver bugfixes" * 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: ismt: fix wrong device address when unmap the data buffer i2c: rcar: use correct length when unmapping DMA commit b3ee4edd8a18a5ff7c077b6b112692f1d6e9dd16 Merge: edf9364 bcd7c45 Author: Linus Torvalds Date: Mon Jun 19 09:01:01 2017 +0900 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fixes from Ralf Baechle: - Three highmem fixes: + Fixed mapping initialization + Adjust the pkmap location + Ensure we use at most one page for PTEs - Fix makefile dependencies for .its targets to depend on vmlinux - Fix reversed condition in BNEZC and JIALC software branch emulation - Only flush initialized flush_insn_slot to avoid NULL pointer dereference - perf: Remove incorrect odd/even counter handling for I6400 - ftrace: Fix init functions tracing * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: .its targets depend on vmlinux MIPS: Fix bnezc/jialc return address calculation MIPS: kprobes: flush_insn_slot should flush only if probe initialised MIPS: ftrace: fix init functions tracing MIPS: mm: adjust PKMAP location MIPS: highmem: ensure that we don't use more than one page for PTEs MIPS: mm: fixed mappings: correct initialisation MIPS: perf: Remove incorrect odd/even counter handling for I6400 commit 779f19ac9d5858a2c159030c0c166f7da46b74ae Author: Hans de Goede Date: Sun Jun 18 15:10:26 2017 -0700 Input: soc_button_array - fix leaking the ACPI button descriptor buffer We are passing a buffer with ACPI_ALLOCATE_BUFFER set to acpi_evaluate_object, so we must free it when we are done with it. Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/misc/soc_button_array.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit e41b1355508debe45fda33ef8c03ff3ba5d206b9 Author: Michael S. Tsirkin Date: Tue Jun 13 20:56:44 2017 +0300 virtio_balloon: disable VIOMMU support virtio balloon bypasses the DMA API entirely so does not support the VIOMMU right now. It's not clear we need that support, for now let's just make sure we don't pretend to support it. Cc: stable@vger.kernel.org Cc: Wei Wang Fixes: 1a937693993f ("virtio: new feature to detect IOMMU device quirk") Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/virtio/virtio_balloon.c | 7 +++++++ 1 file changed, 7 insertions(+) commit edf9364d3f924aff6f77176b8e52a4b68e5c30d6 Merge: 4f51d57 d9ee35a Author: Linus Torvalds Date: Sun Jun 18 18:49:12 2017 +0900 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "Two fixlets for x86: - Handle WARN_ONs proper with the new UD based WARN implementation - Disable 1G mappings when 2M mappings are disabled by kmemleak or debug_pagealloc. Otherwise 1G mappings might still be used, confusing the debug mechanisms" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Disable 1GB direct mappings when disabling 2MB mappings x86/debug: Handle early WARN_ONs proper commit 4f51d57f3ff0f30bd805ff5bd04587a6145e1f73 Merge: 0be5255 94114c3 Author: Linus Torvalds Date: Sun Jun 18 18:46:51 2017 +0900 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "Three fixlets for timers: - Two hot-fixes for the alarmtimer based posix timers, which prevent a nasty DOS by self rescheduling timers. The proper cleanup of that mess is queued for 4.13 - Make a function static" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tick/broadcast: Make tick_broadcast_setup_oneshot() static alarmtimer: Rate limit periodic intervals alarmtimer: Prevent overflow of relative timers commit 0be5255c88dace8b4e0ef19f2a9c3d0f3598c6e6 Merge: a1ff31d 252d2a4 Author: Linus Torvalds Date: Sun Jun 18 18:45:17 2017 +0900 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: "Two small fixes for the schedulre core: - Use the proper switch_mm() variant in idle_task_exit() because that code is not called with interrupts disabled. - Fix a confusing typo in a printk" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off() sched/fair: Fix typo in printk message commit a1ff31d74663077524aae3c2e90a76590c5002e8 Merge: 2277ba7 531c221 Author: Linus Torvalds Date: Sun Jun 18 18:42:31 2017 +0900 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "Three fixes for the perf user space side: - Fix the probing of precise_ip level, which got broken recently for x86. - Unbreak the ARCH=x86_64 build - Report module before trying to unwind into the module code, which avoids broken stack frames displayed" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf unwind: Report module before querying isactivation in dwfl unwind perf tools: Fix build with ARCH=x86_64 perf evsel: Fix probing of precise_ip level for default cycles event commit 2277ba7cfd43c557eab882757b64755eb0a8ea95 Merge: 0cbf341 fa07ab7 Author: Linus Torvalds Date: Sun Jun 18 18:40:41 2017 +0900 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Thomas Gleixner: "Add a missing resource release to an error path" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Release resources in __setup_irq() error path commit 0cbf3415087c9ec997300b8ba15c12d26ac28e0a Merge: 374d801 92b0a14 Author: Linus Torvalds Date: Sun Jun 18 18:38:42 2017 +0900 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fix from Thomas Gleixner: "A single fix which adds fortify_panic to the list of no return functions" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Add fortify_panic as __noreturn function commit 374d801522fb4a809395c188b1a867c5ebcda752 Merge: 19ea9d6 436c4c45 Author: Linus Torvalds Date: Sun Jun 18 08:51:35 2017 +0900 Merge tag 'led_fixes_for_4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED fixes from Jacek Anaszewski: "Two LED fixes: - fix signal source assignment for leds-bcm6328 - revert patch that intended to fix LED behavior on suspend but it had a side effect preventing suspend at all due to uevent being sent on trigger removal" * tag 'led_fixes_for_4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: Revert "leds: handle suspend/resume in heartbeat trigger" leds: bcm6328: fix signal source assignment for leds 4 to 7 commit 19ea9d668a1f9f1e5e6752549150795a6693e6ad Merge: 1be627d f16443a Author: Linus Torvalds Date: Sun Jun 18 08:39:54 2017 +0900 Merge tag 'usb-4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small gadget and xhci USB fixes for 4.12-rc6. Nothing major, but one of the gadget patches does fix a reported oops, and the xhci ones resolve reported problems. All have been in linux-next with no reported issues" * tag 'usb-4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: gadgetfs, dummy-hcd, net2280: fix locking for callbacks usb: xhci: ASMedia ASM1042A chipset need shorts TX quirk usb: xhci: Fix USB 3.1 supported protocol parsing USB: gadget: fix GPF in gadgetfs usb: gadget: composite: make sure to reactivate function on unbind commit 1be627dfa74d9eee1eca1bc48653e461366a2bb9 Merge: 6e20350 ed6456a Author: Linus Torvalds Date: Sun Jun 18 08:36:30 2017 +0900 Merge tag 'staging-4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO fixes from Greg KH: "Here are some small staging and IIO driver fixes for 4.12-rc6. Nothing huge, just a few small driver fixes for reported issues. All have been in linux-next with no reported issues" * tag 'staging-4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: Staging: rtl8723bs: fix an error code in isFileReadable() iio: buffer-dmaengine: Add missing header buffer_impl.h iio: buffer-dma: Add missing header buffer_impl.h iio: adc: meson-saradc: fix potential crash in meson_sar_adc_clear_fifo iio: adc: mxs-lradc: Fix return value check in mxs_lradc_adc_probe() iio: imu: inv_mpu6050: add accel lpf setting for chip >= MPU6500 staging: iio: ad7152: Fix deadlock in ad7152_write_raw_samp_freq() commit 6e203506599bdd1e73f4850d94ccc762980fd9cd Merge: adc3110 4ca2fea Author: Linus Torvalds Date: Sun Jun 18 08:23:02 2017 +0900 Merge tag 'ceph-for-4.12-rc6' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "A fix for an old ceph ->fh_to_* bug from Luis and two timestamp fixups from Zheng, prompted by the ongoing y2038 work" * tag 'ceph-for-4.12-rc6' of git://github.com/ceph/ceph-client: ceph: unify inode i_ctime update ceph: use current_kernel_time() to get request time stamp ceph: check i_nlink while converting a file handle to dentry commit 77e9ce327d9b607cd6e57c0f4524a654dc59c4b1 Author: Al Viro Date: Sat Jun 17 15:44:06 2017 -0400 ufs: fix the logics for tail relocation * original hysteresis loop got broken by typo back in 2002; now it never switches out of OPTTIME state. Fixed. * critical levels for switching from OPTTIME to OPTSPACE and back ought to be calculated once, at mount time. * we should use mul_u64_u32_div() for those calculations, now that ->s_dsize is 64bit. * to quote Kirk McKusick (in 1995 FreeBSD commit message): The threshold for switching from time-space and space-time is too small when minfree is 5%...so make it stay at space in this case. Signed-off-by: Al Viro fs/ufs/balloc.c | 22 ++++++---------------- fs/ufs/super.c | 9 +++++++++ fs/ufs/ufs_fs.h | 2 ++ 3 files changed, 17 insertions(+), 16 deletions(-) commit 57db7e4a2d92c2d3dfbca4ef8057849b2682436b Author: Eric W. Biederman Date: Tue Jun 13 04:31:16 2017 -0500 signal: Only reschedule timers on signals timers have sent Thomas Gleixner wrote: > The CRIU support added a 'feature' which allows a user space task to send > arbitrary (kernel) signals to itself. The changelog says: > > The kernel prevents sending of siginfo with positive si_code, because > these codes are reserved for kernel. I think we can allow a task to > send such a siginfo to itself. This operation should not be dangerous. > > Quite contrary to that claim, it turns out that it is outright dangerous > for signals with info->si_code == SI_TIMER. The following code sequence in > a user space task allows to crash the kernel: > > id = timer_create(CLOCK_XXX, ..... signo = SIGX); > timer_set(id, ....); > info->si_signo = SIGX; > info->si_code = SI_TIMER: > info->_sifields._timer._tid = id; > info->_sifields._timer._sys_private = 2; > rt_[tg]sigqueueinfo(..., SIGX, info); > sigemptyset(&sigset); > sigaddset(&sigset, SIGX); > rt_sigtimedwait(sigset, info); > > For timers based on CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID this > results in a kernel crash because sigwait() dequeues the signal and the > dequeue code observes: > > info->si_code == SI_TIMER && info->_sifields._timer._sys_private != 0 > > which triggers the following callchain: > > do_schedule_next_timer() -> posix_cpu_timer_schedule() -> arm_timer() > > arm_timer() executes a list_add() on the timer, which is already armed via > the timer_set() syscall. That's a double list add which corrupts the posix > cpu timer list. As a consequence the kernel crashes on the next operation > touching the posix cpu timer list. > > Posix clocks which are internally implemented based on hrtimers are not > affected by this because hrtimer_start() can handle already armed timers > nicely, but it's a reliable way to trigger the WARN_ON() in > hrtimer_forward(), which complains about calling that function on an > already armed timer. This problem has existed since the posix timer code was merged into 2.5.63. A few releases earlier in 2.5.60 ptrace gained the ability to inject not just a signal (which linux has supported since 1.0) but the full siginfo of a signal. The core problem is that the code will reschedule in response to signals getting dequeued not just for signals the timers sent but for other signals that happen to a si_code of SI_TIMER. Avoid this confusion by testing to see if the queued signal was preallocated as all timer signals are preallocated, and so far only the timer code preallocates signals. Move the check for if a timer needs to be rescheduled up into collect_signal where the preallocation check must be performed, and pass the result back to dequeue_signal where the code reschedules timers. This makes it clear why the code cares about preallocated timers. Cc: stable@vger.kernel.org Reported-by: Thomas Gleixner History Tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git Reference: 66dd34ad31e5 ("signal: allow to send any siginfo to itself") Reference: 1669ce53e2ff ("Add PTRACE_GETSIGINFO and PTRACE_SETSIGINFO") Fixes: db8b50ba75f2 ("[PATCH] POSIX clocks & timers") Signed-off-by: "Eric W. Biederman" kernel/signal.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit c0ef65d2928249e822b813beb41b6c1478c556ab Author: Al Viro Date: Fri Jun 16 23:54:47 2017 -0400 ufs_iget(): fail with -ESTALE on deleted inode Signed-off-by: Al Viro fs/ufs/inode.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 23ac7cba73bb2c6e80f9cdebeb39dc3dad34ebb3 Author: Al Viro Date: Fri Jun 16 23:49:17 2017 -0400 fix signedness of timestamps on ufs1 Signed-off-by: Al Viro fs/ufs/inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit adc311034c356e884d180df25deb046cef3e8c75 Merge: c8636b9 95989c4 Author: Linus Torvalds Date: Sat Jun 17 17:34:41 2017 +0900 Merge tag 'xfs-4.12-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fix from Darrick Wong: "One more bugfix for you for 4.12-rc6 to fix something that came up in an earlier rc: - Fix some bogus ASSERT failures on CONFIG_SMP=n and CONFIG_XFS_DEBUG=y" * tag 'xfs-4.12-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix spurious spin_is_locked() assert failures on non-smp kernels commit c8636b90a091331beb0a26c455a0c87b93aa774a Merge: ccd3d90 a8fad98 Author: Linus Torvalds Date: Sat Jun 17 17:30:07 2017 +0900 Merge branch 'ufs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull ufs fixes from Al Viro: "Fix assorted ufs bugs: a couple of deadlocks, fs corruption in truncate(), oopsen on tail unpacking and truncate when racing with vmscan, mild fs corruption (free blocks stats summary buggered, *BSD fsck would complain and fix), several instances of broken logics around reserved blocks (starting with "check almost never triggers when it should" and then there are issues with sufficiently large UFS2)" [ Note: ufs hasn't gotten any loving in a long time, because nobody really seems to use it. These ufs fixes are triggered by people actually caring now, not some sudden influx of new bugs. - Linus ] * 'ufs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: ufs_truncate_blocks(): fix the case when size is in the last direct block ufs: more deadlock prevention on tail unpacking ufs: avoid grabbing ->truncate_mutex if possible ufs_get_locked_page(): make sure we have buffer_heads ufs: fix s_size/s_dsize users ufs: fix reserved blocks check ufs: make ufs_freespace() return signed ufs: fix logics in "ufs: make fsck -f happy" commit ccd3d905f74abbfef4960d6262f057fbb4a02903 Merge: 1439ccf 4068367 Author: Linus Torvalds Date: Sat Jun 17 17:26:53 2017 +0900 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "A couple of fixes; a leak in mntns_install() caught by Andrei (this cycle regression) + d_invalidate() softlockup fix - that had been reported by a bunch of people lately, but the problem is pretty old" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: don't forget to put old mntns in mntns_install Hang/soft lockup in d_invalidate with simultaneous calls commit 1439ccf73d9c07654fdd5b4969fd53c2feb8684d Merge: 3a44829 98dbf5a Author: Linus Torvalds Date: Sat Jun 17 06:53:20 2017 +0900 Merge tag 'pci-v4.12-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - fix another PCI_ENDPOINT build error (merged for v4.12) - fix error codes added to config accessors for v4.12 * tag 'pci-v4.12-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: endpoint: Select CRC32 to fix test build error PCI: Make error code types consistent in pci_{read,write}_config_* commit 3a448294b79ace48cf8ecbbffdeceae49bae00cc Merge: 162f73f b429f96 Author: Linus Torvalds Date: Sat Jun 17 06:51:25 2017 +0900 Merge tag 'fbdev-v4.12-rc6' of git://github.com/bzolnier/linux Pull fbdev fixes from Bartlomiej Zolnierkiewicz: - fix udlfb driver to stop spamming logs (Mike Gerow) - add missing endianness conversions in smscufx & udlfb drivers (Johan Hovold) - fix few gcc warnings/errors (Arnd Bergmann) * tag 'fbdev-v4.12-rc6' of git://github.com/bzolnier/linux: video: fbdev: udlfb: drop log level for blanking video: fbdev: via: remove possibly unused variables video: fbdev: add missing USB-descriptor endianness conversions video: fbdev: avoid int-in-bool-context warning commit 162f73f4b974aa08ab37e9d59f0428edfa8dbc51 Merge: 5ac447d d7143e3 Author: Linus Torvalds Date: Sat Jun 17 06:49:34 2017 +0900 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "5 fixes" * emailed patches from Andrew Morton : mm: correct the comment when reclaimed pages exceed the scanned pages userfaultfd: shmem: handle coredumping in handle_userfault() mm: numa: avoid waiting on freed migrated pages swap: cond_resched in swap_cgroup_prepare() mm/memory-failure.c: use compound_head() flags for huge pages commit d7143e31259cb029e207619209b31aa7520f8e28 Author: zhongjiang Date: Fri Jun 16 14:02:40 2017 -0700 mm: correct the comment when reclaimed pages exceed the scanned pages Commit e1587a494540 ("mm: vmpressure: fix sending wrong events on underflow") declared that reclaimed pages exceed the scanned pages due to the thp reclaim. That is incorrect because THP will be spilt to normal page and loop again, which will result in the scanned pages increment. [akpm@linux-foundation.org: tweak comment text] Link: http://lkml.kernel.org/r/1496824266-25235-1-git-send-email-zhongjiang@huawei.com Signed-off-by: zhongjiang Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmpressure.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 64c2b20301f62c697352c8028c569b1b2bdd8e82 Author: Andrea Arcangeli Date: Fri Jun 16 14:02:37 2017 -0700 userfaultfd: shmem: handle coredumping in handle_userfault() Anon and hugetlbfs handle FOLL_DUMP set by get_dump_page() internally to __get_user_pages(). shmem as opposed has no special FOLL_DUMP handling there so handle_mm_fault() is invoked without mmap_sem and ends up calling handle_userfault() that isn't expecting to be invoked without mmap_sem held. This makes handle_userfault() fail immediately if invoked through shmem_vm_ops->fault during coredumping and solves the problem. The side effect is a BUG_ON with no lock held triggered by the coredumping process which exits. Only 4.11 is affected, pre-4.11 anon memory holes are skipped in __get_user_pages by checking FOLL_DUMP explicitly against empty pagetables (mm/gup.c:no_page_table()). It's zero cost as we already had a check for current->flags to prevent futex to trigger userfaults during exit (PF_EXITING). Link: http://lkml.kernel.org/r/20170615214838.27429-1-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Reported-by: "Dr. David Alan Gilbert" Cc: [4.11+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit 3c226c637b69104f6b9f1c6ec5b08d7b741b3229 Author: Mark Rutland Date: Fri Jun 16 14:02:34 2017 -0700 mm: numa: avoid waiting on freed migrated pages In do_huge_pmd_numa_page(), we attempt to handle a migrating thp pmd by waiting until the pmd is unlocked before we return and retry. However, we can race with migrate_misplaced_transhuge_page(): // do_huge_pmd_numa_page // migrate_misplaced_transhuge_page() // Holds 0 refs on page // Holds 2 refs on page vmf->ptl = pmd_lock(vma->vm_mm, vmf->pmd); /* ... */ if (pmd_trans_migrating(*vmf->pmd)) { page = pmd_page(*vmf->pmd); spin_unlock(vmf->ptl); ptl = pmd_lock(mm, pmd); if (page_count(page) != 2)) { /* roll back */ } /* ... */ mlock_migrate_page(new_page, page); /* ... */ spin_unlock(ptl); put_page(page); put_page(page); // page freed here wait_on_page_locked(page); goto out; } This can result in the freed page having its waiters flag set unexpectedly, which trips the PAGE_FLAGS_CHECK_AT_PREP checks in the page alloc/free functions. This has been observed on arm64 KVM guests. We can avoid this by having do_huge_pmd_numa_page() take a reference on the page before dropping the pmd lock, mirroring what we do in __migration_entry_wait(). When we hit the race, migrate_misplaced_transhuge_page() will see the reference and abort the migration, as it may do today in other cases. Fixes: b8916634b77bffb2 ("mm: Prevent parallel splits during THP migration") Link: http://lkml.kernel.org/r/1497349722-6731-2-git-send-email-will.deacon@arm.com Signed-off-by: Mark Rutland Signed-off-by: Will Deacon Acked-by: Steve Capper Acked-by: Kirill A. Shutemov Acked-by: Vlastimil Babka Cc: Mel Gorman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit ef70762948dde012146926720b70e79736336764 Author: Yu Zhao Date: Fri Jun 16 14:02:31 2017 -0700 swap: cond_resched in swap_cgroup_prepare() I saw need_resched() warnings when swapping on large swapfile (TBs) because continuously allocating many pages in swap_cgroup_prepare() took too long. We already cond_resched when freeing page in swap_cgroup_swapoff(). Do the same for the page allocation. Link: http://lkml.kernel.org/r/20170604200109.17606-1-yuzhao@google.com Signed-off-by: Yu Zhao Acked-by: Michal Hocko Acked-by: Vladimir Davydov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap_cgroup.c | 3 +++ 1 file changed, 3 insertions(+) commit 7258ae5c5a2ce2f5969e8b18b881be40ab55433d Author: James Morse Date: Fri Jun 16 14:02:29 2017 -0700 mm/memory-failure.c: use compound_head() flags for huge pages memory_failure() chooses a recovery action function based on the page flags. For huge pages it uses the tail page flags which don't have anything interesting set, resulting in: > Memory failure: 0x9be3b4: Unknown page state > Memory failure: 0x9be3b4: recovery action for unknown page: Failed Instead, save a copy of the head page's flags if this is a huge page, this means if there are no relevant flags for this tail page, we use the head pages flags instead. This results in the me_huge_page() recovery action being called: > Memory failure: 0x9b7969: recovery action for huge page: Delayed For hugepages that have not yet been allocated, this allows the hugepage to be dequeued. Fixes: 524fca1e7356 ("HWPOISON: fix misjudgement of page_action() for errors on mlocked pages") Link: http://lkml.kernel.org/r/20170524130204.21845-1-james.morse@arm.com Signed-off-by: James Morse Tested-by: Punit Agrawal Acked-by: Punit Agrawal Acked-by: Naoya Horiguchi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory-failure.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5ac447d268601f88264ad18a13e7177a455007bb Merge: ab2789b a093c92 Author: Linus Torvalds Date: Sat Jun 17 05:57:54 2017 +0900 Merge tag 'powerpc-4.12-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Three small fixes for recently merged code: - remove a spurious WARN_ON when a PCI device has no of_node, it's allowed in some circumstances for there to be no of_node. - fix the offset for store EOI MMIOs in the XIVE interrupt controller. - fix non-const WARN_ONs which were becoming BUGs due to them losing BUGFLAG_WARNING in a recent cleanup patch. Thanks to: Alexey Kardashevskiy, Alistair Popple, Benjamin Herrenschmidt" * tag 'powerpc-4.12-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/debug: Add missing warn flag to WARN_ON's non-builtin path powerpc/xive: Fix offset for store EOI MMIOs powerpc/npu-dma: Remove spurious WARN_ON when a PCI device has no of_node commit 531c221df182af5a7fc2bf7ba7eee89354fe9a10 Merge: 63f700a 9126cbb Author: Ingo Molnar Date: Fri Jun 16 21:33:48 2017 +0200 Merge tag 'perf-urgent-for-mingo-4.12-20170616' 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 probing of precise_ip level for default cycles event, that got broken recently on x86_64 when its arch code started considering invalid requesting precise samples when not sampling (i.e. when attr.sample_period == 0). This also fixes another problem in s/390 where the precision probing with sample_period == 0 returned precise_ip > 0, that then, when setting up the real cycles event (not probing) would return EOPNOTSUPP for precise_ip > 0 (as determined previously by probing) and sample_period > 0. These problems resulted in attr_precise not being set to the highest precision available on x86.64 when no event was specified, i.e. the canonical: perf record ./workload would end up using attr.precise_ip = 0. As a workaround this would need to be done: perf record -e cycles:P ./workload And on s/390 it would plain not work, requiring using: perf record -e cycles ./workload as a workaround. (Arnaldo Carvalho de Melo) - Fix perf build with ARCH=x86_64, when ARCH should be transformed into ARCH=x86, just like with the main kernel Makefile and tools/objtool's, i.e. use SRCARCH. (Jiada Wang) - Avoid accessing uninitialized data structures when unwinding with elfutils's libdw, making it more closely mimic libunwind's unwinder. (Milian Wolff) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 76371d2e3ad1f84426a30ebcd8c3b9b98f4c724f Author: Wei Wang Date: Fri Jun 16 10:46:37 2017 -0700 decnet: always not take dst->__refcnt when inserting dst into hash table In the existing dn_route.c code, dn_route_output_slow() takes dst->__refcnt before calling dn_insert_route() while dn_route_input_slow() does not take dst->__refcnt before calling dn_insert_route(). This makes the whole routing code very buggy. In dn_dst_check_expire(), dnrt_free() is called when rt expires. This makes the routes inserted by dn_route_output_slow() not able to be freed as the refcnt is not released. In dn_dst_gc(), dnrt_drop() is called to release rt which could potentially cause the dst->__refcnt to be dropped to -1. In dn_run_flush(), dst_free() is called to release all the dst. Again, it makes the dst inserted by dn_route_output_slow() not able to be released and also, it does not wait on the rcu and could potentially cause crash in the path where other users still refer to this dst. This patch makes sure both input and output path do not take dst->__refcnt before calling dn_insert_route() and also makes sure dnrt_free()/dst_free() is called when removing dst from the hash table. The only difference between those 2 calls is that dnrt_free() waits on the rcu while dst_free() does not. Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/decnet/dn_route.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 9126cbbacecb8917bd0418809ef1d26616b2061e Author: Milian Wolff Date: Fri Jun 2 16:37:53 2017 +0200 perf unwind: Report module before querying isactivation in dwfl unwind The PC returned by dwfl_frame_pc() may map into a not-yet-reported module. We have to report it before we continue unwinding. But when we query for the isactivation flag in dwfl_frame_pc, libdw will actually do one more unwinding step internally which can then break and lead to missed frames or broken stacks. With libunwind we get e.g.: ~~~~~ heaptrack_gui 2228 135073.400474: 613969 cycles: 108c8e [unknown] (/usr/lib/libQt5Core.so.5.8.0) 1093bc [unknown] (/usr/lib/libQt5Core.so.5.8.0) 109e7b QLocale::QLocale (/usr/lib/libQt5Core.so.5.8.0) 1470ff [unknown] (/usr/lib/libQt5Core.so.5.8.0) 147f67 QSystemLocale::query (/usr/lib/libQt5Core.so.5.8.0) 109fbf QLocalePrivate::updateSystemPrivate (/usr/lib/libQt5Core.so.5.8.0) 10aa27 QLocale::QLocale (/usr/lib/libQt5Core.so.5.8.0) 1e02c3 [unknown] (/usr/lib/libQt5Core.so.5.8.0) 2113bb [unknown] (/usr/lib/libQt5Core.so.5.8.0) 211505 [unknown] (/usr/lib/libQt5Core.so.5.8.0) 1b5df0 QFileInfo::exists (/usr/lib/libQt5Core.so.5.8.0) 92eb2 [unknown] (/usr/lib/libQt5Core.so.5.8.0) 93423 [unknown] (/usr/lib/libQt5Core.so.5.8.0) 93d2a QLibraryInfo::location (/usr/lib/libQt5Core.so.5.8.0) 2170af [unknown] (/usr/lib/libQt5Core.so.5.8.0) 297c53 QCoreApplicationPrivate::init (/usr/lib/libQt5Core.so.5.8.0) f7cde QGuiApplicationPrivate::init (/usr/lib/libQt5Gui.so.5.8.0) 1589e8 QApplicationPrivate::init (/usr/lib/libQt5Widgets.so.5.8.0) 78622 main (/home/milian/projects/compiled/other/bin/heaptrack_gui) 20439 __libc_start_main (/usr/lib/libc-2.25.so) 78299 _start (/home/milian/projects/compiled/other/bin/heaptrack_gui) heaptrack_gui 2228 135073.401156: 569521 cycles: 131633 QString::endsWith (/usr/lib/libQt5Core.so.5.8.0) 1a0701 QDir::cleanPath (/usr/lib/libQt5Core.so.5.8.0) 21b82d [unknown] (/usr/lib/libQt5Core.so.5.8.0) 1b3727 QFileInfo::canonicalFilePath (/usr/lib/libQt5Core.so.5.8.0) 2780c7 QFactoryLoader::update (/usr/lib/libQt5Core.so.5.8.0) 279525 QFactoryLoader::QFactoryLoader (/usr/lib/libQt5Core.so.5.8.0) e5bd0 QPlatformIntegrationFactory::create (/usr/lib/libQt5Gui.so.5.8.0) f5a1c QGuiApplicationPrivate::createPlatformIntegration (/usr/lib/libQt5Gui.so.5.8.0) f650c QGuiApplicationPrivate::createEventDispatcher (/usr/lib/libQt5Gui.so.5.8.0) 298524 QCoreApplicationPrivate::init (/usr/lib/libQt5Core.so.5.8.0) f7cde QGuiApplicationPrivate::init (/usr/lib/libQt5Gui.so.5.8.0) 1589e8 QApplicationPrivate::init (/usr/lib/libQt5Widgets.so.5.8.0) 78622 main (/home/milian/projects/compiled/other/bin/heaptrack_gui) 20439 __libc_start_main (/usr/lib/libc-2.25.so) 78299 _start (/home/milian/projects/compiled/other/bin/heaptrack_gui) ~~~~~ Note the two frames 1589e8 and 78622 in the first sample. These are missing when unwinding with libdw. The second sample's breakage is more obvious: ~~~~~ heaptrack_gui 2228 135073.400474: 613969 cycles: 108c8e [unknown] (/usr/lib/libQt5Core.so.5.8.0) 1093bc [unknown] (/usr/lib/libQt5Core.so.5.8.0) 109e7b QLocale::QLocale (/usr/lib/libQt5Core.so.5.8.0) 1470ff [unknown] (/usr/lib/libQt5Core.so.5.8.0) 147f67 QSystemLocale::query (/usr/lib/libQt5Core.so.5.8.0) 109fbf QLocalePrivate::updateSystemPrivate (/usr/lib/libQt5Core.so.5.8.0) 10aa27 QLocale::QLocale (/usr/lib/libQt5Core.so.5.8.0) 1e02c3 [unknown] (/usr/lib/libQt5Core.so.5.8.0) 2113bb [unknown] (/usr/lib/libQt5Core.so.5.8.0) 211505 [unknown] (/usr/lib/libQt5Core.so.5.8.0) 1b5df0 QFileInfo::exists (/usr/lib/libQt5Core.so.5.8.0) 92eb2 [unknown] (/usr/lib/libQt5Core.so.5.8.0) 93423 [unknown] (/usr/lib/libQt5Core.so.5.8.0) 93d2a QLibraryInfo::location (/usr/lib/libQt5Core.so.5.8.0) 2170af [unknown] (/usr/lib/libQt5Core.so.5.8.0) 297c53 QCoreApplicationPrivate::init (/usr/lib/libQt5Core.so.5.8.0) f7cde QGuiApplicationPrivate::init (/usr/lib/libQt5Gui.so.5.8.0) 20439 __libc_start_main (/usr/lib/libc-2.25.so) 78299 _start (/home/milian/projects/compiled/other/bin/heaptrack_gui) heaptrack_gui 2228 135073.401156: 569521 cycles: 131633 QString::endsWith (/usr/lib/libQt5Core.so.5.8.0) 1a0701 QDir::cleanPath (/usr/lib/libQt5Core.so.5.8.0) 21b82d [unknown] (/usr/lib/libQt5Core.so.5.8.0) 1b3727 QFileInfo::canonicalFilePath (/usr/lib/libQt5Core.so.5.8.0) 2780c7 QFactoryLoader::update (/usr/lib/libQt5Core.so.5.8.0) 279525 QFactoryLoader::QFactoryLoader (/usr/lib/libQt5Core.so.5.8.0) e5bd0 QPlatformIntegrationFactory::create (/usr/lib/libQt5Gui.so.5.8.0) 723dbf [unknown] ([unknown]) ~~~~~ This patch fixes this issue and the libdw unwinder mimicks the libunwind behavior more closely. Signed-off-by: Milian Wolff Acked-by: Jan Kratochvil Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20170602143753.16907-2-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/unwind-libdw.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f1925ca50deb48eddafc01bc12c2a17bfbf54425 Author: Haishuang Yan Date: Thu Jun 15 10:29:30 2017 +0800 ip6_tunnel: fix potential issue in __ip6_tnl_rcv When __ip6_tnl_rcv fails, the tun_dst won't be freed, so call dst_release to free it in error code path. Fixes: 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels") CC: Alexei Starovoitov Tested-by: Zhang Shengju Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 2 ++ 1 file changed, 2 insertions(+) commit 469f87e158628fe66dcbbce9dd5e7b7acfe934a9 Author: Haishuang Yan Date: Thu Jun 15 10:29:29 2017 +0800 ip_tunnel: fix potential issue in ip_tunnel_rcv When ip_tunnel_rcv fails, the tun_dst won't be freed, so call dst_release to free it in error code path. Fixes: 2e15ea390e6f ("ip_gre: Add support to collect tunnel metadata.") Acked-by: Eric Dumazet Acked-by: Pravin B Shelar Tested-by: Zhang Shengju Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller net/ipv4/ip_tunnel.c | 2 ++ 1 file changed, 2 insertions(+) commit bf05fc25f268cd62f147f368fe65ad3e5b04fe9f Author: Ravi Bangoria Date: Thu Jun 15 19:16:48 2017 +0530 powerpc/perf: Fix oops when kthread execs user process When a kthread calls call_usermodehelper() the steps are: 1. allocate current->mm 2. load_elf_binary() 3. populate current->thread.regs While doing this, interrupts are not disabled. If there is a perf interrupt in the middle of this process (i.e. step 1 has completed but not yet reached to step 3) and if perf tries to read userspace regs, kernel oops with following log: Unable to handle kernel paging request for data at address 0x00000000 Faulting instruction address: 0xc0000000000da0fc ... Call Trace: perf_output_sample_regs+0x6c/0xd0 perf_output_sample+0x4e4/0x830 perf_event_output_forward+0x64/0x90 __perf_event_overflow+0x8c/0x1e0 record_and_restart+0x220/0x5c0 perf_event_interrupt+0x2d8/0x4d0 performance_monitor_exception+0x54/0x70 performance_monitor_common+0x158/0x160 --- interrupt: f01 at avtab_search_node+0x150/0x1a0 LR = avtab_search_node+0x100/0x1a0 ... load_elf_binary+0x6e8/0x15a0 search_binary_handler+0xe8/0x290 do_execveat_common.isra.14+0x5f4/0x840 call_usermodehelper_exec_async+0x170/0x210 ret_from_kernel_thread+0x5c/0x7c Fix it by setting abi to PERF_SAMPLE_REGS_ABI_NONE when userspace pt_regs are not set. Fixes: ed4a4ef85cf5 ("powerpc/perf: Add support for sampling interrupt register state") Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: Ravi Bangoria Acked-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/perf/perf_regs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d89ba5353f301971dd7d2f9fdf25c4432728f38e Author: Naveen N. Rao Date: Wed Jun 14 00:12:00 2017 +0530 powerpc/64s: Handle data breakpoints in Radix mode On Power9, trying to use data breakpoints throws the splat shown below. This is because the check for a data breakpoint in DSISR is in do_hash_page(), which is not called when in Radix mode. Unable to handle kernel paging request for data at address 0xc000000000e19218 Faulting instruction address: 0xc0000000001155e8 cpu 0x0: Vector: 300 (Data Access) at [c0000000ef1e7b20] pc: c0000000001155e8: find_pid_ns+0x48/0xe0 lr: c000000000116ac4: find_task_by_vpid+0x44/0x90 sp: c0000000ef1e7da0 msr: 9000000000009033 dar: c000000000e19218 dsisr: 400000 Move the check to handle_page_fault() so as to catch data breakpoints in both Hash and Radix MMU modes. We have to change the check in do_hash_page() against 0xa410 to use 0xa450, so as to include the value of (DSISR_DABRMATCH << 16). There are two sites that call handle_page_fault() when in Radix, both already pass DSISR in r4. Fixes: caca285e5ab4 ("powerpc/mm/radix: Use STD_MMU_64 to properly isolate hash related code") Cc: stable@vger.kernel.org # v4.7+ Reported-by: Shriya R. Kulkarni Signed-off-by: Naveen N. Rao [mpe: Fix the fall-through case on hash, we need to reload DSISR] Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit c05b8c4474c03026aaa7f8872e78369f69f1bb08 Author: Naveen N. Rao Date: Thu Jun 1 16:18:17 2017 +0530 powerpc/kprobes: Skip livepatch_handler() for jprobes ftrace_caller() depends on a modified regs->nip to detect if a certain function has been livepatched. However, with KPROBES_ON_FTRACE, it is possible for regs->nip to have been modified by the kprobes pre_handler (jprobes, for instance). In this case, we do not want to invoke the livepatch_handler so as not to consume the livepatch stack. To distinguish between the two (kprobes and livepatch), we check if there is an active kprobe on the current function. If there is, then we know for sure that it must have modified the NIP as we don't support livepatching a kprobe'd function. In this case, we simply skip the livepatch_handler and branch to the new NIP. Otherwise, the livepatch_handler is invoked. Fixes: ead514d5fb30 ("powerpc/kprobes: Add support for KPROBES_ON_FTRACE") Signed-off-by: Naveen N. Rao Reviewed-by: Masami Hiramatsu Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kprobes.h | 1 + arch/powerpc/kernel/kprobes.c | 6 ++++ arch/powerpc/kernel/trace/ftrace_64_mprofile.S | 39 ++++++++++++++++++++++---- 3 files changed, 41 insertions(+), 5 deletions(-) commit a4979a7e71eb8da976cbe4a0a1fa50636e76b04f Author: Naveen N. Rao Date: Thu Jun 1 16:18:16 2017 +0530 powerpc/ftrace: Pass the correct stack pointer for DYNAMIC_FTRACE_WITH_REGS For DYNAMIC_FTRACE_WITH_REGS, we should be passing-in the original set of registers in pt_regs, to capture the state _before_ ftrace_caller. However, we are instead passing the stack pointer *after* allocating a stack frame in ftrace_caller. Fix this by saving the proper value of r1 in pt_regs. Also, use SAVE_10GPRS() to simplify the code. Fixes: 153086644fd1 ("powerpc/ftrace: Add support for -mprofile-kernel ftrace ABI") Cc: stable@vger.kernel.org # v4.6+ Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/trace/ftrace_64_mprofile.S | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit a9f8553e935f26cb5447f67e280946b0923cd2dc Author: Naveen N. Rao Date: Thu Jun 1 16:18:15 2017 +0530 powerpc/kprobes: Pause function_graph tracing during jprobes handling This fixes a crash when function_graph and jprobes are used together. This is essentially commit 237d28db036e ("ftrace/jprobes/x86: Fix conflict between jprobes and function graph tracing"), but for powerpc. Jprobes breaks function_graph tracing since the jprobe hook needs to use jprobe_return(), which never returns back to the hook, but instead to the original jprobe'd function. The solution is to momentarily pause function_graph tracing before invoking the jprobe hook and re-enable it when returning back to the original jprobe'd function. Fixes: 6794c78243bf ("powerpc64: port of the function graph tracer") Cc: stable@vger.kernel.org # v2.6.30+ Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit ab2789b72df3cf7a01e30636ea86cbbf44ba2e99 Merge: 20223f0 19e72d3 Author: Linus Torvalds Date: Fri Jun 16 18:45:47 2017 +0900 Merge tag 'configfs-for-4.12' of git://git.infradead.org/users/hch/configfs Pull configfs updates from Christoph Hellwig: "A fix from Nic for a race seen in production (including a stable tag). And while I'm sending you this I'm also sneaking in a trivial new helper from Bart so that we don't need inter-tree dependencies for the next merge window" * tag 'configfs-for-4.12' of git://git.infradead.org/users/hch/configfs: configfs: Introduce config_item_get_unless_zero() configfs: Fix race between create_link and configfs_rmdir commit 20223f0f39ea9d31ece08f04ac79f8c4e8d98246 Author: Christoph Hellwig Date: Fri Jun 16 11:08:24 2017 +0200 fs: pass on flags in compat_writev Fixes: 793b80ef14af ("vfs: pass a flags argument to vfs_readv/vfs_writev") Signed-off-by: Christoph Hellwig Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds fs/read_write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35abcd4f9f303ac4f10f99b3f7e993e5f2e6fa37 Author: Arend Van Spriel Date: Fri Jun 16 09:36:35 2017 +0100 brcmfmac: fix uninitialized warning in brcmf_usb_probe_phase2() This fixes the following warning: drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c: In function 'brcmf_usb_probe_phase2': drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c:1198:2: warning: 'devinfo' may be used uninitialized in this function [-Wmaybe-uninitialized] mutex_unlock(&devinfo->dev_init_lock); Fixes: 6d0507a777fb ("brcmfmac: add parameter to pass error code in firmware callback") Cc: Stephen Rothwell Reported-by: Kalle Valo Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 92b0a1416be587b87c8ff489b6a74fd929048ca7 Author: Kees Cook Date: Thu Jun 15 08:20:35 2017 -0500 objtool: Add fortify_panic as __noreturn function CONFIG_FORTIFY_SOURCE=y implements fortify_panic() as a __noreturn function, so objtool needs to know about it too. Suggested-by: Daniel Micay Tested-by: Stephen Rothwell Signed-off-by: Kees Cook Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1497532835-32704-1-git-send-email-jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/builtin-check.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3bee1970b32d0c9d1ce986df4b4b58e5e8185c80 Merge: db96d58 2483561 Author: Linus Torvalds Date: Fri Jun 16 17:49:52 2017 +0900 Merge tag 'mmc-v4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fix from Ulf Hansson: "MMC meson-gx host: work around broken SDIO with certain WiFi chips" * tag 'mmc-v4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: meson-gx: work around broken SDIO with certain WiFi chips commit db96d5853e7d55f1d469d51a93ab38ce3bd72daa Merge: 51ce5f3 7119dbd Author: Linus Torvalds Date: Fri Jun 16 17:46:47 2017 +0900 Merge tag 'drm-fixes-for-v4.12-rc6' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "This is the main fixes pull for 4.12-rc6, all pretty normal for this stage, nothing really stands out. The mxsfb one is probably the largest and it's for a black screen boot problem. AMD, i915, mgag200, msxfb, tegra fixes" * tag 'drm-fixes-for-v4.12-rc6' of git://people.freedesktop.org/~airlied/linux: drm: mxsfb_crtc: Reset the eLCDIF controller drm/mgag200: Fix to always set HiPri for G200e4 V2 drm/tegra: Correct idr_alloc() minimum id drm/tegra: Fix lockup on a use of staging API gpu: host1x: Fix error handling drm/radeon: Fix overflow of watermark calcs at > 4k resolutions. drm/amdgpu: Fix overflow of watermark calcs at > 4k resolutions. drm/radeon: fix "force the UVD DPB into VRAM as well" drm/i915: Fix GVT-g PVINFO version compatibility check drm/i915: Fix SKL+ watermarks for 90/270 rotation drm/i915: Fix scaling check for 90/270 degree plane rotation drm: dw-hdmi: Fix compilation breakage by selecting REGMAP_MMIO commit 51ce5f332940ea114426db57772fe0ed18cc2790 Merge: f69d64d d470264 Author: Linus Torvalds Date: Fri Jun 16 17:38:23 2017 +0900 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: "I had thought at the time of the last pull request that there wouldn't be much more to go, but several things just kept trickling in over the last week. Instead of just the six patches to bnxt_re that I had anticipated, there are another five IPoIB patches, two qedr patches, and a few other miscellaneous patches. The bnxt_re patches are more lines of diff than I like to submit this late in the game. That's mostly because of the first two patches in the series of six. I almost dropped them just because of the lines of churn, but on a close review, a lot of the churn came from removing duplicated code sections and consolidating them into callable routines. I felt like this made the number of lines of change more acceptable, and they address problems, so I left them. The remainder of the patches are all small, well contained, and well understood. These have passed 0day testing, but have not been submitted to linux-next (but a local merge test with your current master was without any conflicts). Summary: - A fix for fix eea40b8f624 ("infiniband: call ipv6 route lookup via the stub interface") - Six patches against bnxt_re...the first two are considerably larger than I would like, but as they address real issues I went ahead and submitted them (it also helped that a good deal of the churn was removing code repeated in multiple places and consolidating it to one common function) - Two fixes against qedr that just came in - One fix against rxe that took a few revisions to get right plus time to get the proper reviews - Five late breaking IPoIB fixes - One late cxgb4 fix" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: rdma/cxgb4: Fix memory leaks during module exit IB/ipoib: Fix memory leak in create child syscall IB/ipoib: Fix access to un-initialized napi struct IB/ipoib: Delete napi in device uninit default IB/ipoib: Limit call to free rdma_netdev for capable devices IB/ipoib: Fix memory leaks for child interfaces priv rxe: Fix a sleep-in-atomic bug in post_one_send RDMA/qedr: Add 64KB PAGE_SIZE support to user-space queues RDMA/qedr: Initialize byte_len in WC of READ and SEND commands RDMA/bnxt_re: Remove FMR support RDMA/bnxt_re: Fix RQE posting logic RDMA/bnxt_re: Add HW workaround for avoiding stall for UD QPs RDMA/bnxt_re: Dereg MR in FW before freeing the fast_reg_page_list RDMA/bnxt_re: HW workarounds for handling specific conditions RDMA/bnxt_re: Fixing the Control path command and response handling IB/addr: Fix setting source address in addr6_resolve() commit f69d64deedc19ed1345d5e75176671a84e0cccdc Merge: e78e462 bf5d008 Author: Linus Torvalds Date: Fri Jun 16 17:30:44 2017 +0900 Merge tag 'platform-drivers-x86-v4.12-2' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver fix from Darren Hart: "Just a single patch to fix an oops in the intel_telemetry_debugfs module load/unload" * tag 'platform-drivers-x86-v4.12-2' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: intel_telemetry_debugfs: fix oops when load/unload module commit e78e4626d43ce3143cb6d2942735d75595be7d1e Merge: cbfb749 dc9edc4 Author: Linus Torvalds Date: Fri Jun 16 17:26:10 2017 +0900 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block layer fix from Jens Axboe: "Just a single fix this week, fixing a regression introduced in this release. When we put the final reference to the queue, we may need to block. Ensure that we can safely do so. From Bart" * 'for-linus' of git://git.kernel.dk/linux-block: block: Fix a blk_exit_rl() regression commit cbfb74973753e109f28705f6b98c8c8cc381b047 Merge: 550ad8e a814c35 Author: Linus Torvalds Date: Fri Jun 16 17:13:06 2017 +0900 Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging Pull dmi fixes from Jean Delvare. * 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: firmware: dmi_scan: Check DMI structure length firmware: dmi: Fix permissions of product_family firmware: dmi_scan: Make dmi_walk and dmi_walk_early return real error codes firmware: dmi_scan: Look for SMBIOS 3 entry point first commit 550ad8ef390cbd4c2efc7a8e398add2e753abe7e Merge: a090bd4 023f108 Author: Linus Torvalds Date: Fri Jun 16 17:00:29 2017 +0900 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull selinux fix from James Morris: "Fix for a double free bug in SELinux" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: selinux: fix double free in selinux_parse_opts_str() commit a093c92dc7f96a15de98ec8cfe38e6f7610a5969 Author: Alexey Kardashevskiy Date: Wed Jun 14 13:01:25 2017 +1000 powerpc/debug: Add missing warn flag to WARN_ON's non-builtin path When trapped on WARN_ON(), report_bug() is expected to return BUG_TRAP_TYPE_WARN so the caller will increment NIP by 4 and continue. The __builtin_constant_p() path of the PPC's WARN_ON() calls (indirectly) __WARN_FLAGS() which has BUGFLAG_WARNING set, however the other branch does not which makes report_bug() report a bug rather than a warning. Fixes: f26dee15103f ("debug: Avoid setting BUGFLAG_WARNING twice") Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/bug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d3efb68c19e539f0535c93a5258c1299270215f Author: Paul Mackerras Date: Tue Jun 6 14:35:30 2017 +1000 KVM: PPC: Book3S HV: Ignore timebase offset on POWER9 DD1 POWER9 DD1 has an erratum where writing to the TBU40 register, which is used to apply an offset to the timebase, can cause the timebase to lose counts. This results in the timebase on some CPUs getting out of sync with other CPUs, which then results in misbehaviour of the timekeeping code. To work around the problem, we make KVM ignore the timebase offset for all guests on POWER9 DD1 machines. This means that live migration cannot be supported on POWER9 DD1 machines. Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit be56a099e0f990532e10c940a3778303cc5a0d91 Merge: 3b1bbaf 31ac933 Author: David S. Miller Date: Thu Jun 15 22:22:23 2017 -0400 Merge tag 'mlx5-fixes-2017-06-14' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox mlx5 fixes 2017-06-14 This series contains some fixes for the mlx5 core and netdev driver. Please pull and let me know if there's any problem. For -stable: ("net/mlx5: Wait for FW readiness before initializing command interface") kernels >= 4.4 ("net/mlx5e: Fix timestamping capabilities reporting") kernels >= 4.5 ("net/mlx5e: Avoid doing a cleanup call if the profile doesn't have it") kernels >= 4.9 ("net/mlx5e: Fix min inline value for VF rep SQs") kernels >= 4.11 The "net/mlx5e: Fix min inline .." (a oneliner patch) doesn't cleanly apply to 4.11, it hits a contextual conflict and can be easily resolved by: + mlx5_query_min_inline(mdev, &priv->params.tx_min_inline_mode); to the end of mlx5e_build_rep_netdev_priv. Note the 2nd parameter of mlx5_query_min_inline is slightly different from the original one. ==================== Signed-off-by: David S. Miller commit 7ceaa6dcd8c6f59588428cec37f3c8093dd1011f Author: Paul Mackerras Date: Fri Jun 16 11:53:19 2017 +1000 KVM: PPC: Book3S HV: Save/restore host values of debug registers At present, HV KVM on POWER8 and POWER9 machines loses any instruction or data breakpoint set in the host whenever a guest is run. Instruction breakpoints are currently only used by xmon, but ptrace and the perf_event subsystem can set data breakpoints as well as xmon. To fix this, we save the host values of the debug registers (CIABR, DAWR and DAWRX) before entering the guest and restore them on exit. To provide space to save them in the stack frame, we expand the stack frame allocated by kvmppc_hv_entry() from 112 to 144 bytes. Fixes: b005255e12a3 ("KVM: PPC: Book3S HV: Context-switch new POWER8 SPRs", 2014-01-08) Cc: stable@vger.kernel.org # v3.14+ Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_rmhandlers.S | 45 +++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 13 deletions(-) commit 7119dbdf7c52042acb1b02f116fa3257e97659ea Merge: 91c0719 c380f68 Author: Dave Airlie Date: Fri Jun 16 10:01:52 2017 +1000 Merge tag 'drm-intel-fixes-2017-06-15' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes drm/i915 fixes for v4.12-rc6 * tag 'drm-intel-fixes-2017-06-15' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: Fix GVT-g PVINFO version compatibility check drm/i915: Fix SKL+ watermarks for 90/270 rotation drm/i915: Fix scaling check for 90/270 degree plane rotation commit 91c0719c695a1fcba6a9728eb013eb6e3c7f3487 Merge: 1b22f6d7 0f93332 Author: Dave Airlie Date: Fri Jun 16 10:01:04 2017 +1000 Merge tag 'drm-misc-fixes-2017-06-15' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes Driver Changes: - dw-hdmi: Fix compilation error if REGMAP_MMIO not selected (Laurent) - host1x: Fix incorrect return value (Christophe) - tegra: Shore up idr API usage in tegra staging code (Dmitry) - mgag200: Always use HiPri mode for G200e4v2 and limit max bandwidth (Mathieu) - mxsfb: Ensure display can be lit up without bootloader initialization (Fabio) Cc: Laurent Pinchart Cc: Christophe JAILLET Cc: Dmitry Osipenko Cc: Mathieu Larouche Cc: Fabio Estevam * tag 'drm-misc-fixes-2017-06-15' of git://anongit.freedesktop.org/git/drm-misc: drm: mxsfb_crtc: Reset the eLCDIF controller drm/mgag200: Fix to always set HiPri for G200e4 V2 drm/tegra: Correct idr_alloc() minimum id drm/tegra: Fix lockup on a use of staging API gpu: host1x: Fix error handling drm: dw-hdmi: Fix compilation breakage by selecting REGMAP_MMIO commit 1b22f6d72ab45e0a1912bc7af2efd43e70a5ab59 Merge: 32c1431 55f61a0 Author: Dave Airlie Date: Fri Jun 16 10:00:11 2017 +1000 Merge branch 'drm-fixes-4.12' of git://people.freedesktop.org/~agd5f/linux into drm-fixes A few fixes for 4.12: - fix a UVD regression on SI - fix overflow in watermark calcs on large modes * 'drm-fixes-4.12' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: Fix overflow of watermark calcs at > 4k resolutions. drm/amdgpu: Fix overflow of watermark calcs at > 4k resolutions. drm/radeon: fix "force the UVD DPB into VRAM as well" commit 91ebcd1b97aea87172e8ae8871f1f328b9fa9c05 Author: Aurelien Jacquiot Date: Thu Jun 15 11:41:17 2017 +0200 MAINTAINERS: update email address for C6x maintainer Aurelien has moved. Signed-off-by: Aurelien Jacquiot Signed-off-by: Mark Salter MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31ac93386d135a6c96de9c8bab406f5ccabf5a4d Author: Or Gerlitz Date: Thu Jun 15 20:08:32 2017 +0300 net/mlx5e: Avoid doing a cleanup call if the profile doesn't have it The error flow of mlx5e_create_netdev calls the cleanup call of the given profile without checking if it exists, fix that. Currently the VF reps don't register that callback and we crash if getting into error -- can be reproduced by the user doing ctrl^C while attempting to change the sriov mode from legacy to switchdev. Fixes: 26e59d8077a3 '(net/mlx5e: Implement mlx5e interface attach/detach callbacks') Signed-off-by: Or Gerlitz Reported-by: Sabrina Dubroca Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9cfb4f719264f3eeb68122371ad70fd5bf2e10bb Author: Or Gerlitz Date: Sun Jun 11 19:32:12 2017 +0300 net/mlx5e: Remove TC header re-write offloading of ip tos Currently the firmware API is partial and allows to offload only the dscp part of the tos, also, ipv6 support isn't there yet. As such, remove the offloading option of ipv4 dscp till the FW APIs are more comprehensive. Fixes: d79b6df6b10a ('net/mlx5e: Add parsing of TC pedit actions to HW format') Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 1 - 1 file changed, 1 deletion(-) commit 9d1cef196b2687e9338c4268a3aa0ca521686bc9 Author: Or Gerlitz Date: Sun Jun 4 19:36:17 2017 +0300 net/mlx5: Properly check applicability of devlink eswitch commands Currently we don't check that the link type is Eth and hence crash on IB ports when attempting to deref esw->xxx, fix that. To avoid repeating this check over and over, put the existing checks and the one on link type in a single helper. Fixes: 7768d1971de6 ('net/mlx5: E-Switch, Add control for encapsulation') Signed-off-by: Or Gerlitz Reported-by: Mohamad Badarnah Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 77 +++++++++++----------- 1 file changed, 40 insertions(+), 37 deletions(-) commit 5f195c2c5cba60241004146cd12d71451d6b0fc4 Author: Chris Mi Date: Tue May 16 07:07:11 2017 -0400 net/mlx5e: Fix min inline value for VF rep SQs The offending commit only changed the code path for PF/VF, but it didn't take care of VF representors. As a result, since params->tx_min_inline_mode for VF representors is kzalloced to 0 (MLX5_INLINE_MODE_NONE), all VF reps SQs were set to that mode. This actually works on CX5 by default but broke CX4. Fix that by adding a call to query the min inline mode from the VF rep build up code. Fixes: a6f402e49901 ("net/mlx5e: Tx, no inline copy on ConnectX-5") Signed-off-by: Chris Mi Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 ++ 1 file changed, 2 insertions(+) commit f0b381178b01b831f9907d72f467d6443afdea67 Author: Maor Dickman Date: Thu May 18 15:15:08 2017 +0300 net/mlx5e: Fix timestamping capabilities reporting Misuse of (BIT) macro caused to report wrong flags for "Hardware Transmit Timestamp Modes" and "Hardware Receive Filter Modes" Fixes: ef9814deafd0 ('net/mlx5e: Add HW timestamping (TS) support') Signed-off-by: Maor Dickman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6c780a0267b8a1075f40b39851132eeaefefcff5 Author: Eli Cohen Date: Thu Jun 8 11:33:16 2017 -0500 net/mlx5: Wait for FW readiness before initializing command interface Before attempting to initialize the command interface we must wait till the fw_initializing bit is clear. If we fail to meet this condition the hardware will drop our configuration, specifically the descriptors page address. This scenario can happen when the firmware is still executing an FLR flow and did not finish yet so the driver needs to wait for that to finish. Fixes: e3297246c2c8 ('net/mlx5_core: Wait for FW readiness on startup') Signed-off-by: Eli Cohen Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit f16443a034c7aa359ddf6f0f9bc40d01ca31faea Author: Alan Stern Date: Tue Jun 13 15:23:42 2017 -0400 USB: gadgetfs, dummy-hcd, net2280: fix locking for callbacks Using the syzkaller kernel fuzzer, Andrey Konovalov generated the following error in gadgetfs: > BUG: KASAN: use-after-free in __lock_acquire+0x3069/0x3690 > kernel/locking/lockdep.c:3246 > Read of size 8 at addr ffff88003a2bdaf8 by task kworker/3:1/903 > > CPU: 3 PID: 903 Comm: kworker/3:1 Not tainted 4.12.0-rc4+ #35 > Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 > Workqueue: usb_hub_wq hub_event > Call Trace: > __dump_stack lib/dump_stack.c:16 [inline] > dump_stack+0x292/0x395 lib/dump_stack.c:52 > print_address_description+0x78/0x280 mm/kasan/report.c:252 > kasan_report_error mm/kasan/report.c:351 [inline] > kasan_report+0x230/0x340 mm/kasan/report.c:408 > __asan_report_load8_noabort+0x19/0x20 mm/kasan/report.c:429 > __lock_acquire+0x3069/0x3690 kernel/locking/lockdep.c:3246 > lock_acquire+0x22d/0x560 kernel/locking/lockdep.c:3855 > __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] > _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:151 > spin_lock include/linux/spinlock.h:299 [inline] > gadgetfs_suspend+0x89/0x130 drivers/usb/gadget/legacy/inode.c:1682 > set_link_state+0x88e/0xae0 drivers/usb/gadget/udc/dummy_hcd.c:455 > dummy_hub_control+0xd7e/0x1fb0 drivers/usb/gadget/udc/dummy_hcd.c:2074 > rh_call_control drivers/usb/core/hcd.c:689 [inline] > rh_urb_enqueue drivers/usb/core/hcd.c:846 [inline] > usb_hcd_submit_urb+0x92f/0x20b0 drivers/usb/core/hcd.c:1650 > usb_submit_urb+0x8b2/0x12c0 drivers/usb/core/urb.c:542 > usb_start_wait_urb+0x148/0x5b0 drivers/usb/core/message.c:56 > usb_internal_control_msg drivers/usb/core/message.c:100 [inline] > usb_control_msg+0x341/0x4d0 drivers/usb/core/message.c:151 > usb_clear_port_feature+0x74/0xa0 drivers/usb/core/hub.c:412 > hub_port_disable+0x123/0x510 drivers/usb/core/hub.c:4177 > hub_port_init+0x1ed/0x2940 drivers/usb/core/hub.c:4648 > hub_port_connect drivers/usb/core/hub.c:4826 [inline] > hub_port_connect_change drivers/usb/core/hub.c:4999 [inline] > port_event drivers/usb/core/hub.c:5105 [inline] > hub_event+0x1ae1/0x3d40 drivers/usb/core/hub.c:5185 > process_one_work+0xc08/0x1bd0 kernel/workqueue.c:2097 > process_scheduled_works kernel/workqueue.c:2157 [inline] > worker_thread+0xb2b/0x1860 kernel/workqueue.c:2233 > kthread+0x363/0x440 kernel/kthread.c:231 > ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:424 > > Allocated by task 9958: > save_stack_trace+0x1b/0x20 arch/x86/kernel/stacktrace.c:59 > save_stack+0x43/0xd0 mm/kasan/kasan.c:513 > set_track mm/kasan/kasan.c:525 [inline] > kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:617 > kmem_cache_alloc_trace+0x87/0x280 mm/slub.c:2745 > kmalloc include/linux/slab.h:492 [inline] > kzalloc include/linux/slab.h:665 [inline] > dev_new drivers/usb/gadget/legacy/inode.c:170 [inline] > gadgetfs_fill_super+0x24f/0x540 drivers/usb/gadget/legacy/inode.c:1993 > mount_single+0xf6/0x160 fs/super.c:1192 > gadgetfs_mount+0x31/0x40 drivers/usb/gadget/legacy/inode.c:2019 > mount_fs+0x9c/0x2d0 fs/super.c:1223 > vfs_kern_mount.part.25+0xcb/0x490 fs/namespace.c:976 > vfs_kern_mount fs/namespace.c:2509 [inline] > do_new_mount fs/namespace.c:2512 [inline] > do_mount+0x41b/0x2d90 fs/namespace.c:2834 > SYSC_mount fs/namespace.c:3050 [inline] > SyS_mount+0xb0/0x120 fs/namespace.c:3027 > entry_SYSCALL_64_fastpath+0x1f/0xbe > > Freed by task 9960: > save_stack_trace+0x1b/0x20 arch/x86/kernel/stacktrace.c:59 > save_stack+0x43/0xd0 mm/kasan/kasan.c:513 > set_track mm/kasan/kasan.c:525 [inline] > kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:590 > slab_free_hook mm/slub.c:1357 [inline] > slab_free_freelist_hook mm/slub.c:1379 [inline] > slab_free mm/slub.c:2961 [inline] > kfree+0xed/0x2b0 mm/slub.c:3882 > put_dev+0x124/0x160 drivers/usb/gadget/legacy/inode.c:163 > gadgetfs_kill_sb+0x33/0x60 drivers/usb/gadget/legacy/inode.c:2027 > deactivate_locked_super+0x8d/0xd0 fs/super.c:309 > deactivate_super+0x21e/0x310 fs/super.c:340 > cleanup_mnt+0xb7/0x150 fs/namespace.c:1112 > __cleanup_mnt+0x1b/0x20 fs/namespace.c:1119 > task_work_run+0x1a0/0x280 kernel/task_work.c:116 > exit_task_work include/linux/task_work.h:21 [inline] > do_exit+0x18a8/0x2820 kernel/exit.c:878 > do_group_exit+0x14e/0x420 kernel/exit.c:982 > get_signal+0x784/0x1780 kernel/signal.c:2318 > do_signal+0xd7/0x2130 arch/x86/kernel/signal.c:808 > exit_to_usermode_loop+0x1ac/0x240 arch/x86/entry/common.c:157 > prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline] > syscall_return_slowpath+0x3ba/0x410 arch/x86/entry/common.c:263 > entry_SYSCALL_64_fastpath+0xbc/0xbe > > The buggy address belongs to the object at ffff88003a2bdae0 > which belongs to the cache kmalloc-1024 of size 1024 > The buggy address is located 24 bytes inside of > 1024-byte region [ffff88003a2bdae0, ffff88003a2bdee0) > The buggy address belongs to the page: > page:ffffea0000e8ae00 count:1 mapcount:0 mapping: (null) > index:0x0 compound_mapcount: 0 > flags: 0x100000000008100(slab|head) > raw: 0100000000008100 0000000000000000 0000000000000000 0000000100170017 > raw: ffffea0000ed3020 ffffea0000f5f820 ffff88003e80efc0 0000000000000000 > page dumped because: kasan: bad access detected > > Memory state around the buggy address: > ffff88003a2bd980: fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc > ffff88003a2bda00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc > >ffff88003a2bda80: fc fc fc fc fc fc fc fc fc fc fc fc fb fb fb fb > ^ > ffff88003a2bdb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb > ffff88003a2bdb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb > ================================================================== What this means is that the gadgetfs_suspend() routine was trying to access dev->lock after it had been deallocated. The root cause is a race in the dummy_hcd driver; the dummy_udc_stop() routine can race with the rest of the driver because it contains no locking. And even when proper locking is added, it can still race with the set_link_state() function because that function incorrectly drops the private spinlock before invoking any gadget driver callbacks. The result of this race, as seen above, is that set_link_state() can invoke a callback in gadgetfs even after gadgetfs has been unbound from dummy_hcd's UDC and its private data structures have been deallocated. include/linux/usb/gadget.h documents that the ->reset, ->disconnect, ->suspend, and ->resume callbacks may be invoked in interrupt context. In general this is necessary, to prevent races with gadget driver removal. This patch fixes dummy_hcd to retain the spinlock across these calls, and it adds a spinlock acquisition to dummy_udc_stop() to prevent the race. The net2280 driver makes the same mistake of dropping the private spinlock for its ->disconnect and ->reset callback invocations. The patch fixes it too. Lastly, since gadgetfs_suspend() may be invoked in interrupt context, it cannot assume that interrupts are enabled when it runs. It must use spin_lock_irqsave() instead of spin_lock_irq(). The patch fixes that bug as well. Signed-off-by: Alan Stern Reported-and-tested-by: Andrey Konovalov CC: Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/legacy/inode.c | 5 +++-- drivers/usb/gadget/udc/dummy_hcd.c | 13 ++++--------- drivers/usb/gadget/udc/net2280.c | 9 +-------- 3 files changed, 8 insertions(+), 19 deletions(-) commit 3b1bbafbfd14474fee61487552c9916ec1b25c58 Author: xypron.glpk@gmx.de Date: Thu Jun 15 20:59:57 2017 +0200 Doc: net: dsa: b53: update location of referenced dsa.txt The referenced file dsa.txt is located at Documentation/devicetree/bindings/net/dsa/dsa.txt Reviewed-by: Florian Fainelli Signed-off-by: Heinrich Schuchardt Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/dsa/b53.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 988c7322116970696211e902b468aefec95b6ec4 Author: Xin Long Date: Thu Jun 15 17:49:08 2017 +0800 sctp: return next obj by passing pos + 1 into sctp_transport_get_idx In sctp_for_each_transport, pos is used to save how many objs it has dumped. Now it gets the last obj by sctp_transport_get_idx, then gets the next obj by sctp_transport_get_next. The issue is that in the meanwhile if some objs in transport hashtable are removed and the objs nums are less than pos, sctp_transport_get_idx would return NULL and hti.walker.tbl is NULL as well. At this moment it should stop hti, instead of continue getting the next obj. Or it would cause a NULL pointer dereference in sctp_transport_get_next. This patch is to pass pos + 1 into sctp_transport_get_idx to get the next obj directly, even if pos > objs nums, it would return NULL and stop hti. Fixes: 626d16f50f39 ("sctp: export some apis or variables for sctp_diag and reuse some for proc") Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/socket.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0f933328f018c118ded2035f12068bbdfdef399d Author: Fabio Estevam Date: Fri May 5 15:01:41 2017 -0300 drm: mxsfb_crtc: Reset the eLCDIF controller According to the eLCDIF initialization steps listed in the MX6SX Reference Manual the eLCDIF block reset is mandatory. Without performing the eLCDIF reset the display shows garbage content when the kernel boots. In earlier tests this issue has not been observed because the bootloader was previously showing a splash screen and the bootloader display driver does properly implement the eLCDIF reset. Add the eLCDIF reset to the driver, so that it can operate correctly independently of the bootloader. Tested on a imx6sx-sdb board. Cc: Signed-off-by: Fabio Estevam Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1494007301-14535-1-git-send-email-fabio.estevam@nxp.com drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 5f2f97656ada8d811d3c1bef503ced266fcd53a0 Author: David Howells Date: Thu Jun 15 00:12:24 2017 +0100 rxrpc: Fix several cases where a padded len isn't checked in ticket decode This fixes CVE-2017-7482. When a kerberos 5 ticket is being decoded so that it can be loaded into an rxrpc-type key, there are several places in which the length of a variable-length field is checked to make sure that it's not going to overrun the available data - but the data is padded to the nearest four-byte boundary and the code doesn't check for this extra. This could lead to the size-remaining variable wrapping and the data pointer going over the end of the buffer. Fix this by making the various variable-length data checks use the padded length. Reported-by: 石磊 Signed-off-by: David Howells Reviewed-by: Marc Dionne Reviewed-by: Dan Carpenter Signed-off-by: David S. Miller net/rxrpc/key.c | 64 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 30 deletions(-) commit 0cbb738108927916a659b5b0b96e386fcd7cc6e1 Author: Mathieu Larouche Date: Wed Jun 14 10:39:42 2017 -0400 drm/mgag200: Fix to always set HiPri for G200e4 V2 - Changed the HiPri value for G200e4 to always be 0. - Added Bandwith limitation to block resolution above 1920x1200x60Hz Signed-off-by: Mathieu Larouche Acked-by: Dave Airlie [seanpaul removed some trailing whitespace from the patch] Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/ec0f8568d7ec41904dfe593c5deccf3f062d7bd8.1497450944.git.mathieu.larouche@matrox.com drivers/gpu/drm/mgag200/mgag200_mode.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit a2b7a622d6292b693544d7c94bb5d11c3f4676f8 Author: Arend Van Spriel Date: Mon Jun 12 12:56:35 2017 +0100 brcmfmac: fix brcmf_fws_add_interface() for USB devices USB devices rely on queuing functionality provided by the fwsignal module regardless the mode fwsignal is operating in. For this some data structure needs to be reserved which is tied to the interface, which is done by brcmf_fws_add_interface(). However, it checks the mode. Replace that by checking result from brcmf_fws_queue_skbs(). Otherwise the driver will crash in a null pointer dereference when data is transmitted on the interface. Fixes: fc0471e3e884 ("brcmfmac: ignore interfaces when fwsignal is disabled") Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a51461fc2da82a6c565a3ee65c41c197f28225d Author: Arend Van Spriel Date: Mon Jun 12 12:47:34 2017 +0100 brcmfmac: unbind all devices upon failure in firmware callback When request firmware fails, brcmf_ops_sdio_remove is being called and brcmf_bus freed. In such circumstancies if you do a suspend/resume cycle the kernel hangs on resume due a NULL pointer dereference in resume function. So in brcmf_sdio_firmware_callback() we need to unbind the driver from both sdio_func devices when firmware load failure is indicated. Cc: stable@vger.kernel.org # 4.9.x- Tested-by: Enric Balletbo i Serra Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 03fb0e8393fae8ebb6710a99387853ed0becbc8e Author: Arend Van Spriel Date: Mon Jun 12 12:47:33 2017 +0100 brcmfmac: use firmware callback upon failure to load When firmware loading failed the code used to unbind the device provided by the calling code. However, for the sdio driver two devices are bound and both need to be released upon failure. The callback has been extended with parameter to pass error code so add that in this commit upon firmware loading failure. Cc: stable@vger.kernel.org # 4.9.x- Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/firmware.c | 27 +++++++++++----------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 6d0507a777fbc533f7f1bf5664a81982dd50dece Author: Arend Van Spriel Date: Mon Jun 12 12:47:32 2017 +0100 brcmfmac: add parameter to pass error code in firmware callback Extend the parameters in the firmware callback so it can be called upon success and failure. This allows the caller to properly clear all resources in the failure path. Right now the error code is always zero, ie. success. Cc: stable@vger.kernel.org # 4.9.x- Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 10 +++++----- .../net/wireless/broadcom/brcm80211/brcmfmac/firmware.h | 4 ++-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 17 ++++++++++++----- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 17 +++++++++++------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 6 ++++-- 5 files changed, 34 insertions(+), 20 deletions(-) commit f8a894b218138888542a5058d0e902378fd0d4ec Author: Xin Long Date: Thu Jun 15 16:33:58 2017 +0800 ipv6: fix calling in6_ifa_hold incorrectly for dad work Now when starting the dad work in addrconf_mod_dad_work, if the dad work is idle and queued, it needs to hold ifa. The problem is there's one gap in [1], during which if the pending dad work is removed elsewhere. It will miss to hold ifa, but the dad word is still idea and queue. if (!delayed_work_pending(&ifp->dad_work)) in6_ifa_hold(ifp); <--------------[1] mod_delayed_work(addrconf_wq, &ifp->dad_work, delay); An use-after-free issue can be caused by this. Chen Wei found this issue when WARN_ON(!hlist_unhashed(&ifp->addr_lst)) in net6_ifa_finish_destroy was hit because of it. As Hannes' suggestion, this patch is to fix it by holding ifa first in addrconf_mod_dad_work, then calling mod_delayed_work and putting ifa if the dad_work is already in queue. Note that this patch did not choose to fix it with: if (!mod_delayed_work(delay)) in6_ifa_hold(ifp); As with it, when delay == 0, dad_work would be scheduled immediately, all addrconf_mod_dad_work(0) callings had to be moved under ifp->lock. Reported-by: Wei Chen Suggested-by: Hannes Frederic Sowa Acked-by: Hannes Frederic Sowa Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/addrconf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7304e8f28bb2f3cb2baf37c1bb2caa0f54ca4e43 Author: Shaohua Li Date: Thu Jun 8 11:27:14 2017 -0700 iommu/vt-d: Correctly disable Intel IOMMU force on I made a mistake in commit bfd20f1. We should skip the force on with the option enabled instead of vice versa. Not sure why this passed our performance test, sorry. Fixes: bfd20f1cc850 ('x86, iommu/vt-d: Add an option to disable Intel IOMMU force on') Signed-off-by: Shaohua Li Signed-off-by: Joerg Roedel arch/x86/kernel/tboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17e83549e199d89aace7788a9f11c108671eecf5 Author: Liwei Song Date: Tue Jun 13 00:59:53 2017 -0400 i2c: ismt: fix wrong device address when unmap the data buffer Fix the following kernel bug: kernel BUG at drivers/iommu/intel-iommu.c:3260! invalid opcode: 0000 [#5] PREEMPT SMP Hardware name: Intel Corp. Harcuvar/Server, BIOS HAVLCRB0.X64.0013.D39.1608311820 08/31/2016 task: ffff880175389950 ti: ffff880176bec000 task.ti: ffff880176bec000 RIP: 0010:[] [] intel_unmap+0x25b/0x260 RSP: 0018:ffff880176bef5e8 EFLAGS: 00010296 RAX: 0000000000000024 RBX: ffff8800773c7c88 RCX: 000000000000ce04 RDX: 0000000080000000 RSI: 0000000000000000 RDI: 0000000000000009 RBP: ffff880176bef638 R08: 0000000000000010 R09: 0000000000000004 R10: ffff880175389c78 R11: 0000000000000a4f R12: ffff8800773c7868 R13: 00000000ffffac88 R14: ffff8800773c7818 R15: 0000000000000001 FS: 00007fef21258700(0000) GS:ffff88017b5c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000066d6d8 CR3: 000000007118c000 CR4: 00000000003406e0 Stack: 00000000ffffac88 ffffffff8199867f ffff880176bef5f8 ffff880100000030 ffff880176bef668 ffff8800773c7c88 ffff880178288098 ffff8800772c0010 ffff8800773c7818 0000000000000001 ffff880176bef648 ffffffff8150a86e Call Trace: [] ? printk+0x46/0x48 [] intel_unmap_page+0xe/0x10 [] ismt_access+0x27b/0x8fa [i2c_ismt] [] ? __pm_runtime_suspend+0xa0/0xa0 [] ? pm_suspend_timer_fn+0x80/0x80 [] ? __pm_runtime_suspend+0xa0/0xa0 [] ? pm_suspend_timer_fn+0x80/0x80 [] ? pci_bus_read_dev_vendor_id+0xf0/0xf0 [] i2c_smbus_xfer+0xec/0x4b0 [] ? vprintk_emit+0x345/0x530 [] i2cdev_ioctl_smbus+0x12b/0x240 [i2c_dev] [] ? vprintk_default+0x29/0x40 [] i2cdev_ioctl+0x63/0x1ec [i2c_dev] [] do_vfs_ioctl+0x328/0x5d0 [] ? vfs_write+0x11c/0x190 [] ? rt_up_read+0x19/0x20 [] SyS_ioctl+0x81/0xa0 [] system_call_fastpath+0x16/0x6e This happen When run "i2cdetect -y 0" detect SMBus iSMT adapter. After finished I2C block read/write, when unmap the data buffer, a wrong device address was pass to dma_unmap_single(). To fix this, give dma_unmap_single() the "dev" parameter, just like what dma_map_single() does, then unmap can find the right devices. Fixes: 13f35ac14cd0 ("i2c: Adding support for Intel iSMT SMBus 2.0 host controller") Signed-off-by: Liwei Song Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-ismt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 916335036d4fe33f9806240cb0d1900f4975b959 Author: Wolfram Sang Date: Sun May 28 09:52:17 2017 +0200 i2c: rcar: use correct length when unmapping DMA Because we need to transfer some bytes with PIO, the msg length is not the length of the DMA buffer. Use the correct value which we used when doing the mapping. Fixes: 73e8b0528346e8 ("i2c: rcar: add DMA support") Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25642705b2359a705784bbbf1655c25a8f8efde2 Author: Benjamin Herrenschmidt Date: Wed Jun 14 10:19:25 2017 +1000 powerpc/xive: Fix offset for store EOI MMIOs Architecturally we should apply a 0x400 offset for these. Not doing it will break future HW implementations. The offset of 0 is supposed to remain for "triggers" though not all sources support both trigger and store EOI, and in P9 specifically, some sources will treat 0 as a store EOI. But future chips will not. So this makes us use the properly architected offset which should work always. Fixes: 243e25112d06 ("powerpc/xive: Native exploitation of the XIVE interrupt controller") Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/xive.h | 12 +++++++----- arch/powerpc/kvm/book3s_xive_template.c | 4 ++-- arch/powerpc/sysdev/xive/common.c | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) commit cd15fb64ee56192760ad5c1e2ad97a65e735b18b Author: Mike Snitzer Date: Thu Jun 15 08:39:15 2017 -0400 Revert "dm mirror: use all available legs on multiple failures" This reverts commit 12a7cf5ba6c776a2621d8972c7d42e8d3d959d20. This commit apparently attempted to fix an issue that didn't really exist, furthermore: this commit is the source of deadlocks and crashes seen in multiple cases related to failing the primary mirror dev while syncing. Reported-by: Jonathan Brassow Signed-off-by: Mike Snitzer drivers/md/dm-raid1.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit d6c153ec85856f5ad29adc20739ec28edeb7c042 Author: Dmitry Osipenko Date: Thu Jun 15 02:18:25 2017 +0300 drm/tegra: Correct idr_alloc() minimum id The client ID 0 is reserved by the host1x/cdma to mark the timeout timer work as already been scheduled and context ID is used as the clients one. This fixes spurious CDMA timeouts. Fixes: bdd2f9cd10eb ("drm/tegra: Don't leak kernel pointer to userspace") Signed-off-by: Dmitry Osipenko Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/9c19a44219acd988e678cf9abe21363911184625.1497480754.git.digetx@gmail.com drivers/gpu/drm/tegra/drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1066a8959d04785b9d2e9cbb91aaef922b710c4a Author: Dmitry Osipenko Date: Thu Jun 15 02:18:24 2017 +0300 drm/tegra: Fix lockup on a use of staging API Commit bdd2f9cd10eb ("Don't leak kernel pointer to userspace") added a mutex around staging IOCTL's, some of those mutexes are taken twice. Fixes: bdd2f9cd10eb ("drm/tegra: Don't leak kernel pointer to userspace") Signed-off-by: Dmitry Osipenko Reviewed-by: Mikko Perttunen Reviewed-by: Erik Faye-Lund Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/7b70a506a9d2355ea6ff19a8c4f4d726b67719b3.1497480754.git.digetx@gmail.com drivers/gpu/drm/tegra/drm.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit 59e04bc20de4bd1bd5bfa810bf04a4e50a27b9c1 Author: Christophe JAILLET Date: Mon Apr 10 22:29:22 2017 +0200 gpu: host1x: Fix error handling If 'devm_reset_control_get' returns an error, then we erroneously return success because error code is taken from 'host->clk' instead of 'host->rst'. Fixes: b386c6b73ac6 ("gpu: host1x: Support module reset") Signed-off-by: Christophe JAILLET Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/20170410202922.17665-1-christophe.jaillet@wanadoo.fr drivers/gpu/host1x/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a814c3597a6b6040e2ef9459748081a6d5b7312d Author: Jean Delvare Date: Thu Jun 15 13:46:01 2017 +0200 firmware: dmi_scan: Check DMI structure length Before accessing DMI data to record it for later, we should ensure that the DMI structures are large enough to contain the data in question. Signed-off-by: Jean Delvare Reviewed-by: Mika Westerberg Cc: Dmitry Torokhov Cc: Andy Shevchenko Cc: Linus Walleij drivers/firmware/dmi_scan.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit e0733e975385d25d88c1384dafb8ea4dcf7513c0 Author: Jean Delvare Date: Thu Jun 15 13:46:01 2017 +0200 firmware: dmi: Fix permissions of product_family This is not sensitive information like serial numbers, we can allow all users to read it. Fix odd alignment while we're here. Signed-off-by: Jean Delvare Fixes: c61872c9833d ("firmware: dmi: Add DMI_PRODUCT_FAMILY identification string") Reviewed-by: Andy Shevchenko Reviewed-by: Mika Westerberg Cc: Dmitry Torokhov Cc: Linus Walleij drivers/firmware/dmi-id.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c926820085437a27b27e78996b2c7a5ad94e8055 Author: Andy Lutomirski Date: Thu Jun 15 13:46:00 2017 +0200 firmware: dmi_scan: Make dmi_walk and dmi_walk_early return real error codes Currently they return -1 on error, which will confuse callers if they try to interpret it as a normal negative error code. Signed-off-by: Andy Lutomirski Signed-off-by: Darren Hart (VMware) Signed-off-by: Jean Delvare drivers/firmware/dmi_scan.c | 9 +++++---- include/linux/dmi.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) commit c9aba14362a6eec583819ec8f4b872c1816f5cbe Author: Jean Delvare Date: Thu Jun 15 13:46:00 2017 +0200 firmware: dmi_scan: Look for SMBIOS 3 entry point first Since version 3.0.0 of the SMBIOS specification, there can be multiple entry points in memory, pointing to one or two DMI tables. If both a 32-bit ("_SM_") entry point and a 64-bit ("_SM3_") entry point are present, the specification requires that the latter points to a table which is a super-set of the table pointed to by the former. Therefore we should give preference to the 64-bit ("_SM3_") entry point. However, currently the code is picking the first valid entry point it finds. Per specification, we should look for a 64-bit ("_SM3_") entry point first, and if we can't find any, look for a 32-bit ("_SM_" or "_DMI_") entry point. Modify the code to do that. Signed-off-by: Jean Delvare drivers/firmware/dmi_scan.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 4068367c9ca7b515a209f9c0c8741309a1e90495 Author: Andrei Vagin Date: Thu Jun 8 17:32:29 2017 -0700 fs: don't forget to put old mntns in mntns_install Fixes: 4f757f3cbf54 ("make sure that mntns_install() doesn't end up with referral for root") Cc: Al Viro Signed-off-by: Andrei Vagin Signed-off-by: Al Viro fs/namespace.c | 2 ++ 1 file changed, 2 insertions(+) commit 81be24d263dbeddaba35827036d6f6787a59c2c3 Author: Al Viro Date: Sat Jun 3 07:20:09 2017 +0100 Hang/soft lockup in d_invalidate with simultaneous calls It's not hard to trigger a bunch of d_invalidate() on the same dentry in parallel. They end up fighting each other - any dentry picked for removal by one will be skipped by the rest and we'll go for the next iteration through the entire subtree, even if everything is being skipped. Morevoer, we immediately go back to scanning the subtree. The only thing we really need is to dissolve all mounts in the subtree and as soon as we've nothing left to do, we can just unhash the dentry and bugger off. Signed-off-by: Al Viro fs/dcache.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit bcd7c45e0d5a82be9a64b90050f0e09d41a50758 Author: Paul Burton Date: Fri Jun 2 12:02:08 2017 -0700 MIPS: .its targets depend on vmlinux The .its targets require information about the kernel binary, such as its entry point, which is extracted from the vmlinux ELF. We therefore require that the ELF is built before the .its files are generated. Declare this requirement in the Makefile such that make will ensure this is always the case, otherwise in corner cases we can hit issues as the .its is generated with an incorrect (either invalid or stale) entry point. Signed-off-by: Paul Burton Fixes: cf2a5e0bb4c6 ("MIPS: Support generating Flattened Image Trees (.itb)") Cc: linux-mips@linux-mips.org Cc: stable # v4.9+ Patchwork: https://patchwork.linux-mips.org/patch/16179/ Signed-off-by: Ralf Baechle arch/mips/boot/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1a73d9310e093fc3adffba4d0a67b9fab2ee3f63 Author: Paul Burton Date: Fri Jun 2 11:35:01 2017 -0700 MIPS: Fix bnezc/jialc return address calculation The code handling the pop76 opcode (ie. bnezc & jialc instructions) in __compute_return_epc_for_insn() needs to set the value of $31 in the jialc case, which is encoded with rs = 0. However its check to differentiate bnezc (rs != 0) from jialc (rs = 0) was unfortunately backwards, meaning that if we emulate a bnezc instruction we clobber $31 & if we emulate a jialc instruction it actually behaves like a jic instruction. Fix this by inverting the check of rs to match the way the instructions are actually encoded. Signed-off-by: Paul Burton Fixes: 28d6f93d201d ("MIPS: Emulate the new MIPS R6 BNEZC and JIALC instructions") Cc: stable # v4.0+ Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16178/ Signed-off-by: Ralf Baechle arch/mips/kernel/branch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a090bd4ff8387c409732a8e059fbf264ea0bdd56 Merge: 54ed0f7 640f93c Author: Linus Torvalds Date: Thu Jun 15 18:09:47 2017 +0900 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) The netlink attribute passed in to dev_set_alias() is not necessarily NULL terminated, don't use strlcpy() on it. From Alexander Potapenko. 2) Fix implementation of atomics in arm64 bpf JIT, from Daniel Borkmann. 3) Correct the release of netdevs and driver private data in certain circumstances. 4) Sanitize netlink message length properly in decnet, from Mateusz Jurczyk. 5) Don't leak kernel data in rtnl_fill_vfinfo() netlink blobs. From Yuval Mintz. 6) Hash secret is never initialized in ipv6 ILA translation code, from Arnd Bergmann. I guess those clang warnings about unused inline functions are useful for something! 7) Fix endian selection in bpf_endian.h, from Daniel Borkmann. 8) Sanitize sockaddr length before dereferncing any fields in AF_UNIX and CAIF. From Mateusz Jurczyk. 9) Fix timestamping for GMAC3 chips in stmmac driver, from Mario Molitor. 10) Do not leak netdev on dev_alloc_name() errors in mac80211, from Johannes Berg. 11) Fix locking in sctp_for_each_endpoint(), from Xin Long. 12) Fix wrong memset size on 32-bit in snmp6, from Christian Perle. 13) Fix use after free in ip_mc_clear_src(), from WANG Cong. 14) Fix regressions caused by ICMP rate limiting changes in 4.11, from Jesper Dangaard Brouer. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (91 commits) i40e: Fix a sleep-in-atomic bug net: don't global ICMP rate limit packets originating from loopback net/act_pedit: fix an error code net: update undefined ->ndo_change_mtu() comment net_sched: move tcf_lock down after gen_replace_estimator() caif: Add sockaddr length check before accessing sa_family in connect handler qed: fix dump of context data qmi_wwan: new Telewell and Sierra device IDs net: phy: Fix MDIO_THUNDER dependencies netconsole: Remove duplicate "netconsole: " logging prefix igmp: acquire pmc lock for ip_mc_clear_src() r8152: give the device version net: rps: fix uninitialized symbol warning mac80211: don't send SMPS action frame in AP mode when not needed mac80211/wpa: use constant time memory comparison for MACs mac80211: set bss_info data before configuring the channel mac80211: remove 5/10 MHz rate code from station MLME mac80211: Fix incorrect condition when checking rx timestamp mac80211: don't look at the PM bit of BAR frames i40e: fix handling of HW ATR eviction ... commit 54ed0f71f0a0cbf3218e2503a50364f178b1e855 Merge: 35e60a6 d41519a Author: Linus Torvalds Date: Thu Jun 15 17:54:51 2017 +0900 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 on sparc where we may dereference freed stack memory" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: Work around deallocated stack frame reference gcc bug on sparc. commit 35e60a6b7577218ac7eb7777c8849822a080e127 Merge: 92091c4 9522933 Author: Linus Torvalds Date: Thu Jun 15 17:51:19 2017 +0900 Merge tag 'acpi-4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These revert an ACPICA commit from the 4.11 cycle that causes problems to happen on some systems and add a protection against possible kernel crashes due to table reference counter imbalance. Specifics: - Revert a 4.11 ACPICA change that made assumptions which are not satisfied on some systems and caused the enumeration of resources to fail on them (Rafael Wysocki). - Add a mechanism to prevent tables from being unmapped prematurely due to reference counter overflows (Lv Zheng)" * tag 'acpi-4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPICA: Tables: Mechanism to handle late stage acpi_get_table() imbalance Revert "ACPICA: Disassembler: Enhance resource descriptor detection" commit 92091c438bad93ba2591e8c4ba86126227327be2 Merge: b45edc2 f63e4f7 Author: Linus Torvalds Date: Thu Jun 15 17:47:46 2017 +0900 Merge tag 'pm-4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These revert a recent cpufreq schedutil governor change that turned out to be problematic and fix a few minor issues in cpufreq, cpuidle and the Exynos devfreq drivers. Specifics: - Revert a recent cpufreq schedutil governor change that caused some systems to behave undesirably (Rafael Wysocki). - Fix a cpufreq conservative governor issue introduced during the 3.10 cycle that prevents it from working as expected in some situations (Tomasz Wilczyński). - Fix an error code path in the generic cpuidle driver for DT-based systems (Christophe Jaillet). - Fix three minor issues in devfreq drivers for Exynos (Arvind Yadav, Krzysztof Kozlowski)" * tag 'pm-4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpuidle: dt: Add missing 'of_node_put()' cpufreq: conservative: Allow down_threshold to take values from 1 to 10 Revert "cpufreq: schedutil: Reduce frequencies slower" PM / devfreq: exynos-ppmu: Staticize event list PM / devfreq: exynos-ppmu: Handle return value of clk_prepare_enable PM / devfreq: exynos-nocp: Handle return value of clk_prepare_enable commit b45edc2d02d50ba4657f29c0e2380e337d324aef Merge: 906e0c5 0ca4cd7 Author: Linus Torvalds Date: Thu Jun 15 17:44:41 2017 +0900 Merge branch 'for-4.12/driver-matching-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fix from Jiri Kosina: - ifdef-based bandaid for a long-standing issue with HID driver matching, avoiding regressions in cases where specific driver is not enabled in kernel .config, from Jiri Kosina * 'for-4.12/driver-matching-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: let generic driver yield control iff specific driver has been enabled commit 906e0c5b9f1261b516487f37a6d35eb48426786f Merge: 63f700a f9f314f Author: Linus Torvalds Date: Thu Jun 15 17:37:40 2017 +0900 Merge tag 'media/v4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - some build dependency issues at CEC core with randconfigs - fix an off by one error at vb2 - a race fix at cec core - driver fixes at tc358743, sir_ir and rainshadow-cec * tag 'media/v4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] media/cec.h: use IS_REACHABLE instead of IS_ENABLED [media] cec: race fix: don't return -ENONET in cec_receive() [media] sir_ir: infinite loop in interrupt handler [media] cec-notifier.h: handle unreachable CONFIG_CEC_CORE [media] cec: improve MEDIA_CEC_RC dependencies [media] vb2: Fix an off by one error in 'vb2_plane_vaddr' [media] rainshadow-cec: Fix missing spin_lock_init() [media] tc358743: fix register i2c_rd/wr function fix commit a8fad984833832d5ca11a9ed64ddc55646da30e3 Author: Al Viro Date: Thu Jun 15 03:57:46 2017 -0400 ufs_truncate_blocks(): fix the case when size is in the last direct block The logics when deciding whether we need to do anything with direct blocks is broken when new size is within the last direct block. It's better to find the path to the last byte _not_ to be removed and use that instead of the path to the beginning of the first block to be freed... Signed-off-by: Al Viro fs/ufs/inode.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 46a704f8409f79fd66567ad3f8a7304830a84293 Author: Paul Mackerras Date: Thu Jun 15 16:10:27 2017 +1000 KVM: PPC: Book3S HV: Preserve userspace HTM state properly If userspace attempts to call the KVM_RUN ioctl when it has hardware transactional memory (HTM) enabled, the values that it has put in the HTM-related SPRs TFHAR, TFIAR and TEXASR will get overwritten by guest values. To fix this, we detect this condition and save those SPR values in the thread struct, and disable HTM for the task. If userspace goes to access those SPRs or the HTM facility in future, a TM-unavailable interrupt will occur and the handler will reload those SPRs and re-enable HTM. If userspace has started a transaction and suspended it, we would currently lose the transactional state in the guest entry path and would almost certainly get a "TM Bad Thing" interrupt, which would cause the host to crash. To avoid this, we detect this case and return from the KVM_RUN ioctl with an EINVAL error, with the KVM exit reason set to KVM_EXIT_FAIL_ENTRY. Fixes: b005255e12a3 ("KVM: PPC: Book3S HV: Context-switch new POWER8 SPRs", 2014-01-08) Cc: stable@vger.kernel.org # v3.14+ Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 4c3bb4ccd074e1a0552078c0bf94c662367a1658 Author: Paul Mackerras Date: Thu Jun 15 15:43:17 2017 +1000 KVM: PPC: Book3S HV: Restore critical SPRs to host values on guest exit This restores several special-purpose registers (SPRs) to sane values on guest exit that were missed before. TAR and VRSAVE are readable and writable by userspace, and we need to save and restore them to prevent the guest from potentially affecting userspace execution (not that TAR or VRSAVE are used by any known program that run uses the KVM_RUN ioctl). We save/restore these in kvmppc_vcpu_run_hv() rather than on every guest entry/exit. FSCR affects userspace execution in that it can prohibit access to certain facilities by userspace. We restore it to the normal value for the task on exit from the KVM_RUN ioctl. IAMR is normally 0, and is restored to 0 on guest exit. However, with a radix host on POWER9, it is set to a value that prevents the kernel from executing user-accessible memory. On POWER9, we save IAMR on guest entry and restore it on guest exit to the saved value rather than 0. On POWER8 we continue to set it to 0 on guest exit. PSPB is normally 0. We restore it to 0 on guest exit to prevent userspace taking advantage of the guest having set it non-zero (which would allow userspace to set its SMT priority to high). UAMOR is normally 0. We restore it to 0 on guest exit to prevent the AMR from being used as a covert channel between userspace processes, since the AMR is not context-switched at present. Fixes: b005255e12a3 ("KVM: PPC: Book3S HV: Context-switch new POWER8 SPRs", 2014-01-08) Cc: stable@vger.kernel.org # v3.14+ Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 11 +++++++++-- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 9 ++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) commit 289dec5b895a7ecefb2f49da109e6aed9b0f1754 Author: Al Viro Date: Thu Jun 15 00:42:56 2017 -0400 ufs: more deadlock prevention on tail unpacking ->s_lock is not needed for ufs_change_blocknr() Signed-off-by: Al Viro fs/ufs/balloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09bf4f5b6e6013f0ad6b090d4a8deebd4e56d878 Author: Al Viro Date: Thu Jun 15 00:17:30 2017 -0400 ufs: avoid grabbing ->truncate_mutex if possible tail unpacking is done in a wrong place; the deadlocks galore is best dealt with by doing that in ->write_iter() (and switching to iomap, while we are at it), but that's rather painful to backport. The trouble comes from grabbing pages that cover the beginning of tail from inside of ufs_new_fragments(); ongoing pageout of any of those is going to deadlock on ->truncate_mutex with process that got around to extending the tail holding that and waiting for page to get unlocked, while ->writepage() on that page is waiting on ->truncate_mutex. The thing is, we don't need ->truncate_mutex when the fragment we are trying to map is within the tail - the damn thing is allocated (tail can't contain holes). Let's do a plain lookup and if the fragment is present, we can just pretend that we'd won the race in almost all cases. The only exception is a fragment between the end of tail and the end of block containing tail. Protect ->i_lastfrag with ->meta_lock - read_seqlock_excl() is sufficient. Signed-off-by: Al Viro fs/ufs/balloc.c | 10 ++++++---- fs/ufs/inode.c | 26 ++++++++++++++++++++------ 2 files changed, 26 insertions(+), 10 deletions(-) commit 640f93cc6ea7327588be3cc0849d1342aac0393a Author: Jia-Ju Bai Date: Wed Jun 14 16:35:31 2017 -0700 i40e: Fix a sleep-in-atomic bug The driver may sleep under a spin lock, and the function call path is: i40e_ndo_set_vf_port_vlan (acquire the lock by spin_lock_bh) i40e_vsi_remove_pvid i40e_vlan_stripping_disable i40e_aq_update_vsi_params i40e_asq_send_command mutex_lock --> may sleep To fixed it, the spin lock is released before "i40e_vsi_remove_pvid", and the lock is acquired again after this function. Signed-off-by: Jia-Ju Bai Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 ++ 1 file changed, 2 insertions(+) commit 267309f394bf3cd8db001992890b1fa52b97974e Author: Al Viro Date: Wed Jun 14 23:32:19 2017 -0400 ufs_get_locked_page(): make sure we have buffer_heads callers rely upon that, but find_lock_page() racing with attempt of page eviction by memory pressure might have left us with * try_to_free_buffers() successfully done * __remove_mapping() failed, leaving the page in our mapping * find_lock_page() returning an uptodate page with no buffer_heads attached. Signed-off-by: Al Viro fs/ufs/util.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 9522933454f4c4bd5bedf3d71c538708b7c5de5b Merge: 32c1431 83848fb Author: Rafael J. Wysocki Date: Thu Jun 15 01:52:32 2017 +0200 Merge branch 'acpica-fixes' * acpica-fixes: ACPICA: Tables: Mechanism to handle late stage acpi_get_table() imbalance Revert "ACPICA: Disassembler: Enhance resource descriptor detection" commit f63e4f7d4179c9157c51bbe82af7c8f6b5fb39dd Merge: b8e11f7 b2cdd8e 74b2c98 Author: Rafael J. Wysocki Date: Thu Jun 15 01:51:33 2017 +0200 Merge branches 'pm-cpufreq', 'pm-cpuidle' and 'pm-devfreq' * pm-cpufreq: cpufreq: conservative: Allow down_threshold to take values from 1 to 10 Revert "cpufreq: schedutil: Reduce frequencies slower" * pm-cpuidle: cpuidle: dt: Add missing 'of_node_put()' * pm-devfreq: PM / devfreq: exynos-ppmu: Staticize event list PM / devfreq: exynos-ppmu: Handle return value of clk_prepare_enable PM / devfreq: exynos-nocp: Handle return value of clk_prepare_enable commit 949bdfed4b0f74215da60992e9f5e14c9ecbb064 Merge: 658a7568 d85da22 Author: Stephen Boyd Date: Wed Jun 14 16:48:03 2017 -0700 Merge tag 'sunxi-clk-fixes-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-fixes Allwinner clock fixes for 4.12 Some fixes that fix some bindings that went in 4.12, fix a few reset and clock offsets and a build error fix * tag 'sunxi-clk-fixes-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: a64: Export PLL_PERIPH0 clock for the PRCM clk: sunxi-ng: h3: Export PLL_PERIPH0 clock for the PRCM dt-bindings: clock: sunxi-ccu: Add pll-periph to PRCM's needed clocks clk: sunxi-ng: enable SUNXI_CCU_MP for PRCM clk: sunxi-ng: v3s: Fix usb otg device reset bit clk: sunxi-ng: a31: Correct lcd1-ch1 clock register offset commit c596961d1b4ccc6f15754fe5a49c37ac6da57145 Author: Al Viro Date: Wed Jun 14 16:36:29 2017 -0400 ufs: fix s_size/s_dsize users For UFS2 we need 64bit variants; we even store them in uspi, but use 32bit ones instead. One wrinkle is in handling of reserved space - recalculating it every time had been stupid all along, but now it would become really ugly. Just calculate it once... Signed-off-by: Al Viro fs/ufs/balloc.c | 2 +- fs/ufs/super.c | 23 ++++++++++++----------- fs/ufs/ufs_fs.h | 7 +++---- fs/ufs/util.h | 11 +++-------- 4 files changed, 19 insertions(+), 24 deletions(-) commit b451cec4bbd913688f5381efad407762a64a92ce Author: Al Viro Date: Wed Jun 14 15:41:17 2017 -0400 ufs: fix reserved blocks check a) honour ->s_minfree; don't just go with default (5) b) don't bother with capability checks until we know we'll need them Signed-off-by: Al Viro fs/ufs/balloc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit fffd70f58864f5a48b2c17d02730a460f86d4254 Author: Al Viro Date: Wed Jun 14 15:36:31 2017 -0400 ufs: make ufs_freespace() return signed as it is, checking that its return value is <= 0 is useless and that's how it's being used. Signed-off-by: Al Viro fs/ufs/util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 849a44de91636c24cea799cb8ad8c36433feb913 Author: Jesper Dangaard Brouer Date: Wed Jun 14 13:27:37 2017 +0200 net: don't global ICMP rate limit packets originating from loopback Florian Weimer seems to have a glibc test-case which requires that loopback interfaces does not get ICMP ratelimited. This was broken by commit c0303efeab73 ("net: reduce cycles spend on ICMP replies that gets rate limited"). An ICMP response will usually be routed back-out the same incoming interface. Thus, take advantage of this and skip global ICMP ratelimit when the incoming device is loopback. In the unlikely event that the outgoing it not loopback, due to strange routing policy rules, ICMP rate limiting still works via peer ratelimiting via icmpv4_xrlim_allow(). Thus, we should still comply with RFC1812 (section 4.3.2.8 "Rate Limiting"). This seems to fix the reproducer given by Florian. While still avoiding to perform expensive and unneeded outgoing route lookup for rate limited packets (in the non-loopback case). Fixes: c0303efeab73 ("net: reduce cycles spend on ICMP replies that gets rate limited") Reported-by: Florian Weimer Reported-by: "H.J. Lu" Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller net/ipv4/icmp.c | 8 ++++++-- net/ipv6/icmp.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) commit dc9edc44de6cd7cc8cc7f5b36c1adb221eda3207 Author: Bart Van Assche Date: Wed Jun 14 13:27:50 2017 -0600 block: Fix a blk_exit_rl() regression Avoid that the following complaint is reported: BUG: sleeping function called from invalid context at kernel/workqueue.c:2790 in_atomic(): 1, irqs_disabled(): 0, pid: 41, name: rcuop/3 1 lock held by rcuop/3/41: #0: (rcu_callback){......}, at: [] rcu_nocb_kthread+0x282/0x500 Call Trace: dump_stack+0x86/0xcf ___might_sleep+0x174/0x260 __might_sleep+0x4a/0x80 flush_work+0x7e/0x2e0 __cancel_work_timer+0x143/0x1c0 cancel_work_sync+0x10/0x20 blk_throtl_exit+0x25/0x60 blkcg_exit_queue+0x35/0x40 blk_release_queue+0x42/0x130 kobject_put+0xa9/0x190 This happens since we invoke callbacks that need to block from the queue release handler. Fix this by pushing the final release to a workqueue. Reported-by: Ross Zwisler Fixes: commit b425e5049258 ("block: Avoid that blk_exit_rl() triggers a use-after-free") Signed-off-by: Bart Van Assche Tested-by: Ross Zwisler Updated changelog Signed-off-by: Jens Axboe block/blk-sysfs.c | 34 ++++++++++++++++++++++------------ include/linux/blkdev.h | 2 ++ 2 files changed, 24 insertions(+), 12 deletions(-) commit d4702645838c8e04893383b50406249382b4e6bf Author: Raju Rangoju Date: Fri Jun 9 22:17:49 2017 +0530 rdma/cxgb4: Fix memory leaks during module exit Fix memory leaks of iw_cxgb4 module in the exit path Signed-off-by: Raju Rangoju Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/device.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit c4f65b09b459c6f0ec27b1a1a65302f7fea5c96f Author: Dan Carpenter Date: Wed Jun 14 13:29:31 2017 +0300 net/act_pedit: fix an error code I'm reviewing static checker warnings where we do ERR_PTR(0), which is the same as NULL. I'm pretty sure we intended to return ERR_PTR(-EINVAL) here. Sometimes these bugs lead to a NULL dereference but I don't immediately see that problem here. Fixes: 71d0ed7079df ("net/act_pedit: Support using offset relative to the conventional network headers") Signed-off-by: Dan Carpenter Acked-by: Amir Vadai Signed-off-by: David S. Miller net/sched/act_pedit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 96ecff14225ad40a29f4d5cfa6bd9266c8e1e89a Author: Al Viro Date: Wed Jun 14 15:17:32 2017 -0400 ufs: fix logics in "ufs: make fsck -f happy" Storing stats _only_ at new locations is wrong for UFS1; old locations should always be kept updated. The check for "has been converted to use of new locations" is also wrong - it should be "->fs_maxbsize is equal to ->fs_bsize". Signed-off-by: Al Viro fs/ufs/super.c | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) commit 4542d66bb26f2d021c70a78e46f183c6675fc4c9 Author: Feras Daoud Date: Wed Jun 14 09:59:09 2017 +0300 IB/ipoib: Fix memory leak in create child syscall The flow of creating a new child goes through ipoib_vlan_add which allocates a new interface and checks the rtnl_lock. If the lock is taken, restart_syscall will be called to restart the system call again. In this case we are not releasing the already allocated interface, causing a leak. Fixes: 9baa0b036410 ("IB/ipoib: Add rtnl_link_ops support") Signed-off-by: Feras Daoud Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 560b7c3ffec1ca7d5de250d8ca7b1ca2349e98a4 Author: Alex Vesker Date: Wed Jun 14 09:59:08 2017 +0300 IB/ipoib: Fix access to un-initialized napi struct There is no need to re-enable napi since we set the initialized flag before calling ipoib_ib_dev_stop which will disable napi, disabling napi twice is harmless in case it was already disabled. One more reason for this fix is that when using IPoIB new device driver napi is not added to priv, this can lead to kernel panic when rn_ops ndo_open fails. [ 289.755840] invalid opcode: 0000 [#1] SMP [ 289.757111] task: ffff880036964440 ti: ffff880178ee8000 task.ti: ffff880178ee8000 [ 289.757111] RIP: 0010:[] [] napi_enable.part.24+0x4/0x6 [ib_ipoib] [ 289.757111] RSP: 0018:ffff880178eeb6d8 EFLAGS: 00010246 [ 289.757111] RAX: 0000000000000000 RBX: ffff880177a80010 RCX: 000000007fffffff [ 289.757111] RDX: ffffffff81d5f118 RSI: 0000000000000000 RDI: ffff880177a80010 [ 289.757111] RBP: ffff880178eeb6d8 R08: 0000000000000082 R09: 0000000000000283 [ 289.757111] R10: 0000000000000000 R11: 0000000000000000 R12: ffff880175a00000 [ 289.757111] R13: ffff880177a80080 R14: 0000000000000000 R15: 0000000000000001 [ 289.757111] FS: 00007fe2ee346880(0000) GS:ffff88017fc00000(0000) knlGS:0000000000000000 [ 289.757111] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 289.757111] CR2: 00007fffca979020 CR3: 00000001792e4000 CR4: 00000000000006f0 [ 289.757111] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 289.757111] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 289.757111] Stack: [ 289.796027] ffff880178eeb6f0 ffffffffa05251f5 ffff880177a80000 ffff880178eeb718 [ 289.796027] ffffffffa0528505 ffff880175a00000 ffff880177a80000 0000000000000000 [ 289.796027] ffff880178eeb748 ffffffffa051f0ab ffff880175a00000 ffffffffa0537d60 [ 289.796027] Call Trace: [ 289.796027] [] napi_enable+0x25/0x30 [ib_ipoib] [ 289.796027] [] ipoib_ib_dev_open+0x175/0x190 [ib_ipoib] [ 289.796027] [] ipoib_open+0x4b/0x160 [ib_ipoib] [ 289.796027] [] _dev_open+0xbf/0x130 [ 289.796027] [] __dev_change_flags+0x9d/0x170 [ 289.796027] [] dev_change_flags+0x29/0x60 [ 289.796027] [] do_setlink+0x397/0xa40 Fixes: cd565b4b51e5 ('IB/IPoIB: Support acceleration options callbacks') Signed-off-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_ib.c | 1 - 1 file changed, 1 deletion(-) commit b53d4566cc117d9ab8d20b365ba7c2a519439725 Author: Alex Vesker Date: Wed Jun 14 09:59:07 2017 +0300 IB/ipoib: Delete napi in device uninit default This patch mekas init_default and uninit_default symmetric with a call to delete napi. Additionally, the uninit_default gained delete napi call in case of init_default fails. Fixes: 515ed4f3aab4 ('IB/IPoIB: Separate control and data related initializations') Signed-off-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 +++ 1 file changed, 3 insertions(+) commit 022d038a163f9e889428789d681b97bf07730fb7 Author: Alex Vesker Date: Wed Jun 14 09:59:06 2017 +0300 IB/ipoib: Limit call to free rdma_netdev for capable devices Limit calls to free_rdma_netdev() for capable devices only. Fixes: cd565b4b51e5 ('IB/IPoIB: Support acceleration options callbacks') Signed-off-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 6 ++++-- drivers/infiniband/ulp/ipoib/ipoib_main.c | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) commit ab156afd3eeb68ce7b875ec8d9ff4f64d1427776 Author: Alex Vesker Date: Wed Jun 14 09:59:05 2017 +0300 IB/ipoib: Fix memory leaks for child interfaces priv There is a need to free priv explicitly and not just to release the device, child priv is freed explicitly on remove flow and this patch also includes priv free on error flow in P_key creation and also in add_port. Fixes: cd565b4b51e5 ('IB/IPoIB: Support acceleration options callbacks') Signed-off-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_main.c | 7 ++++++- drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) commit db46a0e1be7eac45d0bb1bdcd438b8d47c920451 Author: Magnus Damm Date: Wed Jun 14 16:15:24 2017 +0900 net: update undefined ->ndo_change_mtu() comment Update ->ndo_change_mtu() callback comment to remove text about returning error in case of undefined callback. This change makes the comment match the existing code behavior. Signed-off-by: Magnus Damm Signed-off-by: David S. Miller include/linux/netdevice.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7a759cd8e8272ee18922838ee711219c7c796a31 Author: Jiada Wang Date: Sun Apr 9 20:02:37 2017 -0700 perf tools: Fix build with ARCH=x86_64 With commit: 0a943cb10ce78 (tools build: Add HOSTARCH Makefile variable) when building for ARCH=x86_64, ARCH=x86_64 is passed to perf instead of ARCH=x86, so the perf build process searchs header files from tools/arch/x86_64/include, which doesn't exist. The following build failure is seen: In file included from util/event.c:2:0: tools/include/uapi/linux/mman.h:4:27: fatal error: uapi/asm/mman.h: No such file or directory compilation terminated. Fix this issue by using SRCARCH instead of ARCH in perf, just like the main kernel Makefile and tools/objtool's. Signed-off-by: Jiada Wang Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Eugeniu Rosca Cc: Jan Stancek Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rui Teng Cc: Sukadev Bhattiprolu Cc: Wang Nan Fixes: 0a943cb10ce7 ("tools build: Add HOSTARCH Makefile variable") Link: http://lkml.kernel.org/r/1491793357-14977-2-git-send-email-jiada_wang@mentor.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 38 +++++++++++++++++++------------------- tools/perf/Makefile.perf | 2 +- tools/perf/arch/Build | 2 +- tools/perf/pmu-events/Build | 4 ++-- tools/perf/tests/Build | 2 +- tools/perf/util/header.c | 2 +- 6 files changed, 25 insertions(+), 25 deletions(-) commit 7a1ac110c22eb726684c837544a2d42c33e07be7 Author: Arnaldo Carvalho de Melo Date: Fri Jun 9 16:54:28 2017 -0300 perf evsel: Fix probing of precise_ip level for default cycles event Since commit 18e7a45af91a ("perf/x86: Reject non sampling events with precise_ip") returns -EINVAL for sys_perf_event_open() with an attribute with (attr.precise_ip > 0 && attr.sample_period == 0), just like is done in the routine used to probe the max precise level when no events were passed to 'perf record' or 'perf top', i.e.: perf_evsel__new_cycles() perf_event_attr__set_max_precise_ip() The x86 code, in x86_pmu_hw_config(), which is called all the way from sys_perf_event_open() did, starting with the aforementioned commit: /* There's no sense in having PEBS for non sampling events: */ if (!is_sampling_event(event)) return -EINVAL; Which makes it fail for cycles:ppp, cycles:pp and cycles:p, always using just the non precise cycles variant. To make sure that this is the case, I tested it, before this patch, with: # perf probe -L x86_pmu_hw_config 0 int x86_pmu_hw_config(struct perf_event *event) 1 { 2 if (event->attr.precise_ip) { 17 if (event->attr.precise_ip > precise) 18 return -EOPNOTSUPP; /* There's no sense in having PEBS for non sampling events: */ 21 if (!is_sampling_event(event)) 22 return -EINVAL; } # perf probe x86_pmu_hw_config:22 Added new events: probe:x86_pmu_hw_config (on x86_pmu_hw_config:22) probe:x86_pmu_hw_config_1 (on x86_pmu_hw_config:22) You can now use it in all perf tools, such as: perf record -e probe:x86_pmu_hw_config_1 -aR sleep 1 # perf trace -e perf_event_open,probe:x86_pmu_hwconfig*/max-stack=16/ perf record usleep 1 0.000 ( 0.015 ms): perf/4150 perf_event_open(attr_uptr: 0x7ffebc8ba110, cpu: -1, group_fd: -1 ) ... 0.015 ( ): probe:x86_pmu_hw_config:(ffffffff9c0065e1)) x86_pmu_hw_config ([kernel.kallsyms]) hsw_hw_config ([kernel.kallsyms]) x86_pmu_event_init ([kernel.kallsyms]) perf_try_init_event ([kernel.kallsyms]) perf_event_alloc ([kernel.kallsyms]) SYSC_perf_event_open ([kernel.kallsyms]) sys_perf_event_open ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) return_from_SYSCALL_64 ([kernel.kallsyms]) syscall (/usr/lib64/libc-2.24.so) perf_event_attr__set_max_precise_ip (/home/acme/bin/perf) perf_evsel__new_cycles (/home/acme/bin/perf) perf_evlist__add_default (/home/acme/bin/perf) cmd_record (/home/acme/bin/perf) run_builtin (/home/acme/bin/perf) handle_internal_command (/home/acme/bin/perf) 0.000 ( 0.021 ms): perf/4150 ... [continued]: perf_event_open()) = -1 EINVAL Invalid argument 0.023 ( 0.002 ms): perf/4150 perf_event_open(attr_uptr: 0x7ffebc8ba110, cpu: -1, group_fd: -1 ) ... 0.025 ( ): probe:x86_pmu_hw_config:(ffffffff9c0065e1)) x86_pmu_hw_config ([kernel.kallsyms]) hsw_hw_config ([kernel.kallsyms]) x86_pmu_event_init ([kernel.kallsyms]) perf_try_init_event ([kernel.kallsyms]) perf_event_alloc ([kernel.kallsyms]) SYSC_perf_event_open ([kernel.kallsyms]) sys_perf_event_open ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) return_from_SYSCALL_64 ([kernel.kallsyms]) syscall (/usr/lib64/libc-2.24.so) perf_event_attr__set_max_precise_ip (/home/acme/bin/perf) perf_evsel__new_cycles (/home/acme/bin/perf) perf_evlist__add_default (/home/acme/bin/perf) cmd_record (/home/acme/bin/perf) run_builtin (/home/acme/bin/perf) handle_internal_command (/home/acme/bin/perf) 0.023 ( 0.004 ms): perf/4150 ... [continued]: perf_event_open()) = -1 EINVAL Invalid argument 0.028 ( 0.002 ms): perf/4150 perf_event_open(attr_uptr: 0x7ffebc8ba110, cpu: -1, group_fd: -1 ) ... 0.030 ( ): probe:x86_pmu_hw_config:(ffffffff9c0065e1)) x86_pmu_hw_config ([kernel.kallsyms]) hsw_hw_config ([kernel.kallsyms]) x86_pmu_event_init ([kernel.kallsyms]) perf_try_init_event ([kernel.kallsyms]) perf_event_alloc ([kernel.kallsyms]) SYSC_perf_event_open ([kernel.kallsyms]) sys_perf_event_open ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) return_from_SYSCALL_64 ([kernel.kallsyms]) syscall (/usr/lib64/libc-2.24.so) perf_event_attr__set_max_precise_ip (/home/acme/bin/perf) perf_evsel__new_cycles (/home/acme/bin/perf) perf_evlist__add_default (/home/acme/bin/perf) cmd_record (/home/acme/bin/perf) run_builtin (/home/acme/bin/perf) handle_internal_command (/home/acme/bin/perf) 0.028 ( 0.004 ms): perf/4150 ... [continued]: perf_event_open()) = -1 EINVAL Invalid argument 41.018 ( 0.012 ms): perf/4150 perf_event_open(attr_uptr: 0x7ffebc8b5dd0, pid: -1, group_fd: -1, flags: FD_CLOEXEC) = 4 41.065 ( 0.011 ms): perf/4150 perf_event_open(attr_uptr: 0x3c7db78, pid: -1, group_fd: -1, flags: FD_CLOEXEC) = 4 41.080 ( 0.006 ms): perf/4150 perf_event_open(attr_uptr: 0x3c7db78, pid: -1, group_fd: -1, flags: FD_CLOEXEC) = 4 41.103 ( 0.010 ms): perf/4150 perf_event_open(attr_uptr: 0x3c4e748, pid: 4151 (perf), group_fd: -1, flags: FD_CLOEXEC) = 4 41.115 ( 0.006 ms): perf/4150 perf_event_open(attr_uptr: 0x3c4e748, pid: 4151 (perf), cpu: 1, group_fd: -1, flags: FD_CLOEXEC) = 5 41.122 ( 0.004 ms): perf/4150 perf_event_open(attr_uptr: 0x3c4e748, pid: 4151 (perf), cpu: 2, group_fd: -1, flags: FD_CLOEXEC) = 6 41.128 ( 0.008 ms): perf/4150 perf_event_open(attr_uptr: 0x3c4e748, pid: 4151 (perf), cpu: 3, group_fd: -1, flags: FD_CLOEXEC) = 8 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.017 MB perf.data (2 samples) ] # I.e. that return -EINVAL in x86_pmu_hw_config() is hit three times. So fix it by just setting attr.sample_period Now, after this patch: # perf trace --max-stack=2 -e perf_event_open,probe:x86_pmu_hw_config* perf record usleep 1 [ perf record: Woken up 1 times to write data ] 0.000 ( 0.017 ms): perf/8469 perf_event_open(attr_uptr: 0x7ffe36c27d10, pid: -1, cpu: 3, group_fd: -1, flags: FD_CLOEXEC) = 4 syscall (/usr/lib64/libc-2.24.so) perf_event_open_cloexec_flag (/home/acme/bin/perf) 0.050 ( 0.031 ms): perf/8469 perf_event_open(attr_uptr: 0x24ebb78, pid: -1, group_fd: -1, flags: FD_CLOEXEC) = 4 syscall (/usr/lib64/libc-2.24.so) perf_evlist__config (/home/acme/bin/perf) 0.092 ( 0.040 ms): perf/8469 perf_event_open(attr_uptr: 0x24ebb78, pid: -1, group_fd: -1, flags: FD_CLOEXEC) = 4 syscall (/usr/lib64/libc-2.24.so) perf_evlist__config (/home/acme/bin/perf) 0.143 ( 0.007 ms): perf/8469 perf_event_open(attr_uptr: 0x24bc748, cpu: -1, group_fd: -1 ) = 4 syscall (/usr/lib64/libc-2.24.so) perf_event_attr__set_max_precise_ip (/home/acme/bin/perf) 0.161 ( 0.007 ms): perf/8469 perf_event_open(attr_uptr: 0x24bc748, pid: 8470 (perf), group_fd: -1, flags: FD_CLOEXEC) = 4 syscall (/usr/lib64/libc-2.24.so) perf_evsel__open (/home/acme/bin/perf) 0.171 ( 0.005 ms): perf/8469 perf_event_open(attr_uptr: 0x24bc748, pid: 8470 (perf), cpu: 1, group_fd: -1, flags: FD_CLOEXEC) = 5 syscall (/usr/lib64/libc-2.24.so) perf_evsel__open (/home/acme/bin/perf) 0.180 ( 0.007 ms): perf/8469 perf_event_open(attr_uptr: 0x24bc748, pid: 8470 (perf), cpu: 2, group_fd: -1, flags: FD_CLOEXEC) = 6 syscall (/usr/lib64/libc-2.24.so) perf_evsel__open (/home/acme/bin/perf) 0.190 ( 0.005 ms): perf/8469 perf_event_open(attr_uptr: 0x24bc748, pid: 8470 (perf), cpu: 3, group_fd: -1, flags: FD_CLOEXEC) = 8 syscall (/usr/lib64/libc-2.24.so) perf_evsel__open (/home/acme/bin/perf) [ perf record: Captured and wrote 0.017 MB perf.data (7 samples) ] # The probe one called from perf_event_attr__set_max_precise_ip() works the first time, with attr.precise_ip = 3, wit hthe next ones being the per cpu ones for the cycles:ppp event. And here is the text from a report and alternative proposed patch by Thomas-Mich Richter: --- On s390 the counter and sampling facility do not support a precise IP skid level and sometimes returns EOPNOTSUPP when structure member precise_ip in struct perf_event_attr is not set to zero. On s390 commnd 'perf record -- true' fails with error EOPNOTSUPP. This happens only when no events are specified on command line. The functions called are ... --> perf_evlist__add_default --> perf_evsel__new_cycles --> perf_event_attr__set_max_precise_ip The last function determines the value of structure member precise_ip by invoking the perf_event_open() system call and checking the return code. The first successful open is the value for precise_ip. However the value is determined without setting member sample_period and indicates no sampling. On s390 the counter facility and sampling facility are different. The above procedure determines a precise_ip value of 3 using the counter facility. Later it uses the sampling facility with a value of 3 and fails with EOPNOTSUPP. --- v2: Older compilers (e.g. gcc 4.4.7) don't support referencing members of unnamed union members in the container struct initialization, so move from: struct perf_event_attr attr = { ... .sample_period = 1, }; to right after it as: struct perf_event_attr attr = { ... }; attr.sample_period = 1; v3: We need to reset .sample_period to 0 to let the users of perf_evsel__new_cycles() to properly setup attr.sample_period or attr.sample_freq. Reported by Ingo Molnar. Reported-and-Acked-by: Thomas-Mich Richter Acked-by: Hendrik Brueckner Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Fixes: 18e7a45af91a ("perf/x86: Reject non sampling events with precise_ip") Link: http://lkml.kernel.org/n/tip-yv6nnkl7tzqocrm0hl3x7vf1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/task-exit.c | 2 +- tools/perf/util/evsel.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) commit 74030603dfd9f76c0f279f19f1dd1ee3028fee7a Author: WANG Cong Date: Tue Jun 13 13:36:24 2017 -0700 net_sched: move tcf_lock down after gen_replace_estimator() Laura reported a sleep-in-atomic kernel warning inside tcf_act_police_init() which calls gen_replace_estimator() with spinlock protection. It is not necessary in this case, we already have RTNL lock here so it is enough to protect concurrent writers. For the reader, i.e. tcf_act_police(), it needs to make decision based on this rate estimator, in the worst case we drop more/less packets than necessary while changing the rate in parallel, it is still acceptable. Reported-by: Laura Abbott Reported-by: Nick Huber Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/act_police.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 4ca2fea6f8277ab381bd08b996d641255b6f7b00 Author: Yan, Zheng Date: Thu Jun 1 17:08:00 2017 +0800 ceph: unify inode i_ctime update Current __ceph_setattr() can set inode's i_ctime to current_time(), req->r_stamp or attr->ia_ctime. These time stamps may have minor differences. It may cause potential problem. Signed-off-by: "Yan, Zheng" Acked-by: Arnd Bergmann Signed-off-by: Ilya Dryomov fs/ceph/acl.c | 1 + fs/ceph/inode.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) commit 56199016e8672feb7b903eda003a863d5bf2b8c4 Author: Yan, Zheng Date: Thu Jun 1 16:44:53 2017 +0800 ceph: use current_kernel_time() to get request time stamp ceph uses ktime_get_real_ts() to get request time stamp. In most other cases, current_kernel_time() is used to get time stamp for filesystem operations (called by current_time()). There is granularity difference between ktime_get_real_ts() and current_kernel_time(). The later one can be up to one jiffy behind the former one. This can causes inode's ctime to go back. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 03f219041fdbeb31cecff41bb1cb4e1018f9cf75 Author: Luis Henriques Date: Wed May 17 12:21:07 2017 +0100 ceph: check i_nlink while converting a file handle to dentry Converting a file handle to a dentry can be done call after the inode unlink. This means that __fh_to_dentry() requires an extra check to verify the number of links is not 0. The issue can be easily reproduced using xfstest generic/426, which does something like: name_to_handle_at(&fh) echo 3 > /proc/sys/vm/drop_caches unlink() open_by_handle_at(&fh) The call to open_by_handle_at() should fail, as the file doesn't exist anymore. Link: http://tracker.ceph.com/issues/19958 Signed-off-by: Luis Henriques Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/export.c | 4 ++++ 1 file changed, 4 insertions(+) commit 07d432bb97f19dd5e784175152f9fce3b2646133 Author: Jia-Ju Bai Date: Mon Jun 5 20:23:40 2017 +0800 rxe: Fix a sleep-in-atomic bug in post_one_send The driver may sleep under a spin lock, and the function call path is: post_one_send (acquire the lock by spin_lock_irqsave) init_send_wqe copy_from_user --> may sleep There is no flow that makes "qp->is_user" true, and copy_from_user may cause bug when a non-user pointer is used. So the lines of copy_from_user and check of "qp->is_user" are removed. Signed-off-by: Jia-Ju Bai Reviewed-by: Leon Romanovsky Acked-by: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_verbs.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit e57bb6be5e095351086d3e6de9853a0763342535 Author: Ram Amrani Date: Mon Jun 5 16:32:27 2017 +0300 RDMA/qedr: Add 64KB PAGE_SIZE support to user-space queues Add 64KB PAGE_SIZE support to user-space CQ, SQ and RQ queues. De-facto it means that code was added to translate 64KB pages to smaller 4KB pages that the FW can handle. Otherwise, the FW would wrap (or jump to the next page) when reaching 4KB while the user space library will continue on the same large page. Note that MR code remains as is since the FW supports larger pages for MRs. Signed-off-by: Ram Amrani Signed-off-by: Michal Kalderon Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/qedr.h | 5 ++- drivers/infiniband/hw/qedr/verbs.c | 64 ++++++++++++++++++++++---------------- 2 files changed, 41 insertions(+), 28 deletions(-) commit dac2738607de3d2bb99bae91c9054a2d753af18b Author: Michal Kalderon Date: Mon Jun 5 16:32:26 2017 +0300 RDMA/qedr: Initialize byte_len in WC of READ and SEND commands Initialize byte_len in work completion of RDMA_READ and RDMA_SEND. Exposed by uDAPL application. Signed-off-by: Michal Kalderon Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/verbs.c | 4 ++++ 1 file changed, 4 insertions(+) commit 86816a00ca57caf7e4bf5d30e20eb683f5a3ae35 Author: Selvin Xavier Date: Mon May 22 03:15:44 2017 -0700 RDMA/bnxt_re: Remove FMR support Some issues observed with FMR implementation while running stress traffic. So removing the FMR verbs support for now. Signed-off-by: Selvin Xavier Acked-by: Christoph Hellwig Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 98 +------------------------------- drivers/infiniband/hw/bnxt_re/ib_verbs.h | 6 -- drivers/infiniband/hw/bnxt_re/main.c | 4 -- 3 files changed, 2 insertions(+), 106 deletions(-) commit 018cf5995d69d25be7330c3b8bef4c31bf2b273b Author: Devesh Sharma Date: Mon May 22 03:15:40 2017 -0700 RDMA/bnxt_re: Fix RQE posting logic This patch adds code to ring RQ Doorbell aggressively so that the adapter can DMA RQ buffers sooner, instead of DMA all WQEs in the post_recv WR list together at the end of the post_recv verb. Also use spinlock to serialize RQ posting Signed-off-by: Kalesh AP Signed-off-by: Devesh Sharma Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/bnxt_re.h | 2 ++ drivers/infiniband/hw/bnxt_re/ib_verbs.c | 18 +++++++++++++++++- drivers/infiniband/hw/bnxt_re/ib_verbs.h | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) commit 3fb755b3d58084001c89e5f0fd558552bdef9051 Author: Somnath Kotur Date: Mon May 22 03:15:36 2017 -0700 RDMA/bnxt_re: Add HW workaround for avoiding stall for UD QPs HW stalls out after 0x800000 WQEs are posted for UD QPs. To workaround this problem, driver will send a modify_qp cmd to the HW at around the halfway mark(0x400000) so that FW can accordingly modify the QP context in the HW to prevent this stall. This workaround needs to be done for UD, QP1 and Raw Ethertype packets. Added a counter to keep track of WQEs posted during post_send. Signed-off-by: Somnath Kotur Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/bnxt_re.h | 2 ++ drivers/infiniband/hw/bnxt_re/ib_verbs.c | 18 ++++++++++++++++++ drivers/infiniband/hw/bnxt_re/qplib_fp.c | 3 +++ drivers/infiniband/hw/bnxt_re/qplib_fp.h | 1 + 4 files changed, 24 insertions(+) commit 1c980b010f06696c9093c5d6a5ac7b5145f89a04 Author: Selvin Xavier Date: Mon May 22 03:15:34 2017 -0700 RDMA/bnxt_re: Dereg MR in FW before freeing the fast_reg_page_list If the host buffers are freed before destroying MR in HW, HW could try accessing these buffers. This could cause a host crash. Fixing the code to avoid this condition. Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9152e0b722b29092115da3bfbf63d26be1a461df Author: Eddie Wai Date: Wed Jun 14 03:26:23 2017 -0700 RDMA/bnxt_re: HW workarounds for handling specific conditions This patch implements the following HW workarounds 1. The SQ depth needs to be augmented by 128 + 1 to avoid running into an Out of order CQE issue 2. Workaround to handle the problem where the HW fast path engine continues to access DMA memory in retranmission mode even after the WQE has already been completed. If the HW reports this condition, driver detects it and posts a Fence WQE. The driver stops reporting the completions to stack until it receives completion for Fence WQE. Signed-off-by: Eddie Wai Signed-off-by: Sriharsha Basavapatna Signed-off-by: Selvin Xavier Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 373 ++++++++++++++++++++++++++---- drivers/infiniband/hw/bnxt_re/ib_verbs.h | 15 ++ drivers/infiniband/hw/bnxt_re/qplib_fp.c | 166 +++++++++++-- drivers/infiniband/hw/bnxt_re/qplib_fp.h | 17 +- drivers/infiniband/hw/bnxt_re/qplib_res.h | 1 - drivers/infiniband/hw/bnxt_re/qplib_sp.c | 5 + drivers/infiniband/hw/bnxt_re/qplib_sp.h | 2 + 7 files changed, 509 insertions(+), 70 deletions(-) commit 2deaeaf102d692cb6f764123b1df7aa118a8e97c Author: Takashi Iwai Date: Wed Jun 14 16:20:32 2017 +0200 ALSA: pcm: Don't treat NULL chmap as a fatal error The standard PCM chmap helper callbacks treat the NULL info->chmap as a fatal error and spews the kernel warning with stack trace when CONFIG_SND_DEBUG is on. This was OK, originally it was supposed to be always static and non-NULL. But, as the recent addition of Intel LPE audio driver shows, the chmap content may vary dynamically, and it can be even NULL when disconnected. The user still sees the kernel warning unnecessarily. For clearing such a confusion, this patch simply removes the snd_BUG_ON() in each place, just returns an error without warning. Cc: # v4.11+ Signed-off-by: Takashi Iwai sound/core/pcm_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4130b28f568688f79539b732797a1dc04b048442 Author: Heiko Carstens Date: Tue Jun 6 13:55:42 2017 +0200 s390/ipl: revert Load Normal semantics for LPAR CCW-type re-IPL This reverts the two commits 7afbeb6df2aa ("s390/ipl: always use load normal for CCW-type re-IPL") 0f7451ff3ab8 ("s390/ipl: use load normal for LPAR re-ipl") The two commits did not take into account that behavior of standby memory changes fundamentally if the re-IPL method is changed from Load Clear to Load Normal. In case of the old re-IPL clear method all memory that was initially in standby state will be put into standby state again within the re-IPL process. Or in other words: memory that was brought online before a re-IPL will be offline again after a reboot. Given that we use different re-IPL methods depending on the hypervisor and CCW-type vs SCSI re-IPL it is not easy to tell in advance when and why memory will stay online or will be offline after a re-IPL. This does also have other side effects, since memory that is online from the beginning will be in ZONE_NORMAL by default vs ZONE_MOVABLE for memory that is offline. Therefore, before the change, a user could online and offline memory easily since standby memory was always in ZONE_NORMAL. After the change, and a re-IPL, this depended on which memory parts were online before the re-IPL. From a usability point of view the current behavior is more than suboptimal. Therefore revert these changes until we have a better solution and get back to a consistent behavior. The bad thing about this is that the time required for a re-IPL will be significantly increased for configurations with several 100GB or 1TB of memory. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/ipl.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 55f61a040e1b1ea0ba962e53ae341b4c51915bd1 Author: Mario Kleiner Date: Tue Jun 13 07:17:11 2017 +0200 drm/radeon: Fix overflow of watermark calcs at > 4k resolutions. Commit e6b9a6c84b93 ("drm/radeon: Make display watermark calculations more accurate") made watermark calculations more accurate, but not for > 4k resolutions on 32-Bit architectures, as it introduced an integer overflow for those setups and resolutions. Fix this by proper u64 casting and division. Signed-off-by: Mario Kleiner Reported-by: Ben Hutchings Fixes: e6b9a6c84b93 ("drm/radeon: Make display watermark calculations more accurate") Cc: Ben Hutchings Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/cik.c | 7 +++++-- drivers/gpu/drm/radeon/evergreen.c | 7 +++++-- drivers/gpu/drm/radeon/si.c | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) commit bea10413934dcf98cb9b2dfcdc56e1d28f192897 Author: Mario Kleiner Date: Tue Jun 13 07:17:10 2017 +0200 drm/amdgpu: Fix overflow of watermark calcs at > 4k resolutions. Commit d63c277dc672e0 ("drm/amdgpu: Make display watermark calculations more accurate") made watermark calculations more accurate, but not for > 4k resolutions on 32-Bit architectures, as it introduced an integer overflow for those setups and resolutions. Fix this by proper u64 casting and division. Signed-off-by: Mario Kleiner Reported-by: Ben Hutchings Fixes: d63c277dc672 ("drm/amdgpu: Make display watermark calculations more accurate") Cc: Ben Hutchings Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 7 +++++-- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 7 +++++-- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 7 +++++-- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 7 +++++-- 4 files changed, 20 insertions(+), 8 deletions(-) commit c0f83da96b906ea331e2eea2bd5d2e7f221d27ab Author: Christian König Date: Thu May 18 10:31:01 2017 +0200 drm/radeon: fix "force the UVD DPB into VRAM as well" The DPB must be in VRAM, but not in the first segment. Signed-off-by: Christian König Tested-by: Arthur Marsh Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_uvd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68dd02d19c811ca8ea60220a9d73e13b4bdad73a Author: Johannes Berg Date: Wed Jun 14 09:28:11 2017 +0200 dev_ioctl: copy only the smaller struct iwreq for wext Unfortunately, struct iwreq isn't a proper subset of struct ifreq, but is still handled by the same code path. Robert reported that then applications may (randomly) fault if the struct iwreq they pass happens to land within 8 bytes of the end of a mapping (the struct is only 32 bytes, vs. struct ifreq's 40 bytes). To fix this, pull out the code handling wireless extension ioctls and copy only the smaller structure in this case. This bug goes back a long time, I tracked that it was introduced into mainline in 2.1.15, over 20 years ago! This fixes https://bugzilla.kernel.org/show_bug.cgi?id=195869 Reported-by: Robert O'Callahan Signed-off-by: Johannes Berg include/net/wext.h | 4 ++-- net/core/dev_ioctl.c | 19 ++++++++++++++++--- net/wireless/wext-core.c | 6 +++--- 3 files changed, 21 insertions(+), 8 deletions(-) commit 4f39a1f5870104b1670df2c09c831ac281896545 Author: Johannes Berg Date: Wed Jun 14 09:21:58 2017 +0200 wireless: wext: use struct iwreq earlier in the call chain To make it clear that we never use struct ifreq, cast from it directly in the wext entrypoint and use struct iwreq from there on. The next patch will remove the cast again and pass the correct struct from the beginning. Signed-off-by: Johannes Berg net/wireless/wext-core.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit ed6456afef0da57edfd87ce9142813d08a571137 Author: Dan Carpenter Date: Wed Jun 14 12:10:56 2017 +0300 Staging: rtl8723bs: fix an error code in isFileReadable() The caller only cares about zero vs non-zero so this code actually works fine but we should be returning a negative error code instead of a valid pointer casted to int. Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/osdep_service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e747f64336fc15e1c823344942923195b800aa1e Author: Dan Carpenter Date: Wed Jun 14 13:35:37 2017 +0300 xfrm: NULL dereference on allocation failure The default error code in pfkey_msg2xfrm_state() is -ENOBUFS. We added a new call to security_xfrm_state_alloc() which sets "err" to zero so there several places where we can return ERR_PTR(0) if kmalloc() fails. The caller is expecting error pointers so it leads to a NULL dereference. Fixes: df71837d5024 ("[LSM-IPSec]: Security association restriction.") Signed-off-by: Dan Carpenter Signed-off-by: Steffen Klassert net/key/af_key.c | 1 + 1 file changed, 1 insertion(+) commit 1e3d0c2c70cd3edb5deed186c5f5c75f2b84a633 Author: Dan Carpenter Date: Wed Jun 14 13:34:05 2017 +0300 xfrm: Oops on error in pfkey_msg2xfrm_state() There are some missing error codes here so we accidentally return NULL instead of an error pointer. It results in a NULL pointer dereference. Fixes: df71837d5024 ("[LSM-IPSec]: Security association restriction.") Signed-off-by: Dan Carpenter Signed-off-by: Steffen Klassert net/key/af_key.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit b429f96aa5cb4023b915de9c2aa6e7720a939856 Author: Mike Gerow Date: Wed Jun 14 12:40:36 2017 +0200 video: fbdev: udlfb: drop log level for blanking Drop log level for blanking from info to debug. Xorg likes to habitually unblank when already unblanked and this can fill up logs over a long period of time. Signed-off-by: Mike Gerow Cc: bernie@plugable.com Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/udlfb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 484c7bbf2649831714da3a0fa30213977458e9b5 Author: Arnd Bergmann Date: Wed Jun 14 12:40:36 2017 +0200 video: fbdev: via: remove possibly unused variables When CONFIG_PROC_FS is disabled, we get warnings about unused variables as remove_proc_entry() evaluates to an empty macro. drivers/video/fbdev/via/viafbdev.c: In function 'viafb_remove_proc': drivers/video/fbdev/via/viafbdev.c:1635:4: error: unused variable 'iga2_entry' [-Werror=unused-variable] drivers/video/fbdev/via/viafbdev.c:1634:4: error: unused variable 'iga1_entry' [-Werror=unused-variable] These are easy to avoid by using the pointer from the structure. Signed-off-by: Arnd Bergmann Cc: Florian Tobias Schandinat Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/via/viafbdev.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 1235185521ba0d9528052578e27c2f4999d489c6 Author: Johan Hovold Date: Wed Jun 14 12:40:36 2017 +0200 video: fbdev: add missing USB-descriptor endianness conversions Add the missing endianness conversions when printing the USB device-descriptor idVendor, idProduct and bcdDevice fields during probe. Signed-off-by: Johan Hovold Cc: Steve Glendinning Cc: Bernie Thompson Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/smscufx.c | 5 +++-- drivers/video/fbdev/udlfb.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit c544ad18bd47ee989eb433f09b6574a7f6d415c7 Author: Arnd Bergmann Date: Wed Jun 14 12:40:36 2017 +0200 video: fbdev: avoid int-in-bool-context warning gcc-7 suspects this code might be wrong because we use the result of a multiplication as a bool: drivers/video/fbdev/core/fbmon.c: In function 'fb_edid_add_monspecs': drivers/video/fbdev/core/fbmon.c:1051:84: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] It's actually fine, so let's add a comparison to zero to make that clear to the compiler too. Signed-off-by: Arnd Bergmann Cc: Andrew Morton Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/core/fbmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64c667fe29ea697af0fce94857f26ae857951843 Merge: 32c1431 7981dc0 Author: Greg Kroah-Hartman Date: Wed Jun 14 12:00:41 2017 +0200 Merge tag 'iio-fixes-for-4.12b' 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.12 cycle. * buffer-dma / buffer-dmaengine - Fix missing include of buffer_impl.h after the split of buffer.h. No driver in mainline is currently using these buffers so it wasn't picked up by automated build tests. * ad7152 - Fix a deadlock in ad7152_write_raw_samp_freq as the chip_state lock was already held. * inv_mpu6050 - Add low pass filter setting for chips newer than the MPU6500. None of use previously picked up no the fact it was different on these newer chips. It is separately set for the acceleration on these parts. There is no normal reason to set it differently so the userspace interface remains the same as for early parts. * meson-saradc: - Fix a potential crash by NULL pointer dereference in meson_sar_adc_clear_fifo. * mxs-lradc - Fix a return value check where IS_ERR is used on a function that returns NULL on error commit e79b0006c45c9b0b22f3ea54ff6e256b34c1f208 Author: Megha Dey Date: Wed Jun 14 09:51:56 2017 +0530 ALSA: hda - Add Coffelake PCI ID Coffelake is another Intel part, so need to add PCI ID for it. Signed-off-by: Megha Dey Signed-off-by: Subhransu S. Prusty Acked-by: Vinod Koul Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8bfb3676606454ffec836f56c5dc3e69dfc0956a Author: Johannes Berg Date: Wed Jun 14 09:17:38 2017 +0200 wireless: wext: remove ndo_do_ioctl fallback There are no longer any drivers (in the tree proper, I didn't check all the staging drivers) that take WEXT ioctls through this API, the only remaining ones that even have ndo_do_ioctl are using it only for private ioctls. Therefore, we can remove this call. Signed-off-by: Johannes Berg net/wireless/wext-core.c | 3 --- 1 file changed, 3 deletions(-) commit 377aa6b0efbaa29cfeecd8b9244641217f9544ca Author: Alistair Popple Date: Wed Jun 14 14:47:50 2017 +1000 powerpc/npu-dma: Remove spurious WARN_ON when a PCI device has no of_node Commit 4c3b89effc28 ("powerpc/powernv: Add sanity checks to pnv_pci_get_{gpu|npu}_dev") introduced explicit warnings in pnv_pci_get_npu_dev() when a PCIe device has no associated device-tree node. However not all PCIe devices have an of_node and pnv_pci_get_npu_dev() gets indirectly called at least once for every PCIe device in the system. This results in spurious WARN_ON()'s so remove it. The same situation should not exist for pnv_pci_get_gpu_dev() as any NPU based PCIe device requires a device-tree node. Fixes: 4c3b89effc28 ("powerpc/powernv: Add sanity checks to pnv_pci_get_{gpu|npu}_dev") Reported-by: Alexey Kardashevskiy Signed-off-by: Alistair Popple Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/npu-dma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 089bc0143f489bd3a4578bdff5f4ca68fb26f341 Author: Jan Beulich Date: Tue Jun 13 16:28:27 2017 -0400 xen-blkback: don't leak stack data via response ring Rather than constructing a local structure instance on the stack, fill the fields directly on the shared ring, just like other backends do. Build on the fact that all response structure flavors are actually identical (the old code did make this assumption too). This is XSA-216. Cc: stable@vger.kernel.org Signed-off-by: Jan Beulich Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkback/blkback.c | 23 ++++++++++++----------- drivers/block/xen-blkback/common.h | 25 +++++-------------------- 2 files changed, 17 insertions(+), 31 deletions(-) commit a24fa22ce22ae302b3bf8f7008896d52d5d57b8d Author: Juergen Gross Date: Thu May 18 17:28:49 2017 +0200 xen/blkback: don't use xen_blkif_get() in xen-blkback kthread There is no need to use xen_blkif_get()/xen_blkif_put() in the kthread of xen-blkback. Thread stopping is synchronous and using the blkif reference counting in the kthread will avoid to ever let the reference count drop to zero at the end of an I/O running concurrent to disconnecting and multiple rings. Setting ring->xenblkd to NULL after stopping the kthread isn't needed as the kthread does this already. Signed-off-by: Juergen Gross Tested-by: Steven Haigh Acked-by: Roger Pau Monné Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkback/blkback.c | 3 --- drivers/block/xen-blkback/xenbus.c | 1 - 2 files changed, 4 deletions(-) commit 20a3d5bf5e5b13c02450ab6178ec374abd830686 Author: Mateusz Jurczyk Date: Tue Jun 13 20:06:12 2017 +0200 caif: Add sockaddr length check before accessing sa_family in connect handler Verify that the caller-provided sockaddr structure is large enough to contain the sa_family field, before accessing it in the connect() handler of the AF_CAIF socket. Since the syscall doesn't enforce a minimum size of the corresponding memory region, very short sockaddrs (zero or one byte long) result in operating on uninitialized memory while referencing sa_family. Signed-off-by: Mateusz Jurczyk Signed-off-by: David S. Miller net/caif/caif_socket.c | 4 ++++ 1 file changed, 4 insertions(+) commit 71df1d7ccad1c36f7321d6b3b48f2ea42681c363 Author: Juergen Gross Date: Thu May 18 17:28:48 2017 +0200 xen/blkback: don't free be structure too early The be structure must not be freed when freeing the blkif structure isn't done. Otherwise a use-after-free of be when unmapping the ring used for communicating with the frontend will occur in case of a late call of xenblk_disconnect() (e.g. due to an I/O still active when trying to disconnect). Signed-off-by: Juergen Gross Tested-by: Steven Haigh Acked-by: Roger Pau Monné Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkback/xenbus.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit cc1ec769b87c7dea9092fb537c512e0b6b7a5dac Author: Devesh Sharma Date: Mon May 22 03:15:31 2017 -0700 RDMA/bnxt_re: Fixing the Control path command and response handling Fixing a concurrency issue with creq handling. Each caller was given a globally managed crsq element, which was accessed outside a lock. This could result in corruption, if lot of applications are simultaneously issuing Control Path commands. Now, each caller will provide its own response buffer and the responses will be copied under a lock. Also, Fixing the queue full condition check for the CMDQ. As a part of these changes, the control path code is refactored to remove the code replication in the response status checking. Signed-off-by: Devesh Sharma Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/qplib_fp.c | 215 +++++-------------- drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 314 ++++++++++++++------------- drivers/infiniband/hw/bnxt_re/qplib_rcfw.h | 61 ++---- drivers/infiniband/hw/bnxt_re/qplib_res.h | 5 + drivers/infiniband/hw/bnxt_re/qplib_sp.c | 328 +++++++---------------------- 5 files changed, 318 insertions(+), 605 deletions(-) commit 46464411307746e6297a034a9983a22c9dfc5a0c Author: Juergen Gross Date: Thu May 18 17:28:47 2017 +0200 xen/blkback: fix disconnect while I/Os in flight Today disconnecting xen-blkback is broken in case there are still I/Os in flight: xen_blkif_disconnect() will bail out early without releasing all resources in the hope it will be called again when the last request has terminated. This, however, won't happen as xen_blkif_free() won't be called on termination of the last running request: xen_blkif_put() won't decrement the blkif refcnt to 0 as xen_blkif_disconnect() didn't finish before thus some xen_blkif_put() calls in xen_blkif_disconnect() didn't happen. To solve this deadlock xen_blkif_disconnect() and xen_blkif_alloc_rings() shouldn't use xen_blkif_put() and xen_blkif_get() but use some other way to do their accounting of resources. This at once fixes another error in xen_blkif_disconnect(): when it returned early with -EBUSY for another ring than 0 it would call xen_blkif_put() again for already handled rings on a subsequent call. This will lead to inconsistencies in the refcnt handling. Cc: stable@vger.kernel.org Signed-off-by: Juergen Gross Tested-by: Steven Haigh Acked-by: Roger Pau Monné Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkback/common.h | 1 + drivers/block/xen-blkback/xenbus.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit 7981dc07fe317e3506d706e5ef91b94da02656f4 Author: Phil Reid Date: Tue Jun 13 13:12:35 2017 +0800 iio: buffer-dmaengine: Add missing header buffer_impl.h Add buffer_impl.h as buffer.h was split into interface for using and for internals. Without this industrialio-buffer-dmaengine.c fails to compile. Fixes: commit 33dd94cb972175249258329c4aaffddcc82c2005 ("iio:buffer.h - split into buffer.h and buffer_impl.h") Signed-off-by: Phil Reid Signed-off-by: Jonathan Cameron drivers/iio/buffer/industrialio-buffer-dmaengine.c | 1 + 1 file changed, 1 insertion(+) commit 838519b89fa7e162f7190c70d888a65ee7889e12 Author: Phil Reid Date: Tue Jun 13 10:31:36 2017 +0800 iio: buffer-dma: Add missing header buffer_impl.h Add buffer_impl.h as buffer.h was split into interface for using and for internals. Without this industrialio-buffer-dma.c fails to compile. Fixes: commit 33dd94cb972175249258329c4aaffddcc82c2005 ("iio:buffer.h - split into buffer.h and buffer_impl.h") Signed-off-by: Phil Reid Signed-off-by: Jonathan Cameron drivers/iio/buffer/industrialio-buffer-dma.c | 1 + 1 file changed, 1 insertion(+) commit 436c4c45b5b9562b59cedbb51b7343ab4a6dd8cc Author: Zhang Bo Date: Tue Jun 13 10:39:20 2017 +0800 Revert "leds: handle suspend/resume in heartbeat trigger" This reverts commit 5ab92a7cb82c66bf30685583a38a18538e3807db. System cannot enter suspend mode because of heartbeat led trigger. In autosleep_wq, try_to_suspend function will try to enter suspend mode in specific period. it will get wakeup_count then call pm_notifier chain callback function and freeze processes. Heartbeat_pm_notifier is called and it call led_trigger_unregister to change the trigger of led device to none. It will send uevent message and the wakeup source count changed. As wakeup_count changed, suspend will abort. Fixes: 5ab92a7cb82c ("leds: handle suspend/resume in heartbeat trigger") Signed-off-by: Zhang Bo Acked-by: Pavel Machek Reviewed-by: Linus Walleij Signed-off-by: Jacek Anaszewski drivers/leds/trigger/ledtrig-heartbeat.c | 31 ------------------------------- 1 file changed, 31 deletions(-) commit 4f02b50ece11dcf75263fb7a4cfe8a5df1cfabea Author: Jonas Gorski Date: Fri Jun 2 14:17:05 2017 +0200 leds: bcm6328: fix signal source assignment for leds 4 to 7 Each nibble represents 4 LEDs, and in case of the higher register, bit 0 represents LED 4, so we need to use modulus for the LED number as well. Fixes: fd7b025a238d0a5440bfa26c585eb78097bf48dc ("leds: add BCM6328 LED driver") Signed-off-by: Jonas Gorski Acked-by: Álvaro Fernández Rojas Signed-off-by: Jacek Anaszewski drivers/leds/leds-bcm6328.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bf5d008164dd84d671ca2dd569a1676051f9faff Author: Priyalee Kushwaha Date: Sat Jun 3 10:21:24 2017 -0700 platform/x86: intel_telemetry_debugfs: fix oops when load/unload module This fixes an oops found while testing load/unload of the intel_telemetry_debugfs module. module_init uses register_pm_notifier for PM callbacks, but unregister_pm_notifier was missing from module_exit. [ 97.481860] BUG: unable to handle kernel paging request at ffffffffa006f010 [ 97.489742] IP: blocking_notifier_chain_register+0x3a/0xa0 [ 97.495898] PGD 2e0a067 [ 97.495899] PUD 2e0b063 [ 97.498737] PMD 179e29067 [ 97.501573] PTE 0 [ 97.508423] Oops: 0000 1 PREEMPT SMP [ 97.512724] Modules linked in: intel_telemetry_debugfs intel_rapl gpio_keys dwc3 udc_core intel_telemetry_pltdrv intel_punit_ipc intel_telemetry_core rtc_cmos efivars x86_pkg_temp_thermal iwlwifi snd_hda_codec_hdmi soc_button_array btusb cfg80211 btrtl mei_me hci_uart btbcm mei btintel i915 bluetooth intel_pmc_ipc snd_hda_intel spi_pxa2xx_platform snd_hda_codec dwc3_pci snd_hda_core tpm_tis tpm_tis_core tpm efivarfs [ 97.558453] CPU: 0 PID: 889 Comm: modprobe Not tainted 4.11.0-rc6-intel-dev-bkc #1 [ 97.566950] Hardware name: Intel Corp. Joule DVT3/SDS, BIOS GTPP181A.X64.0143.B30.1701132137 01/13/2017 [ 97.577518] task: ffff8801793a21c0 task.stack: ffff8801793f0000 [ 97.584162] RIP: 0010:blocking_notifier_chain_register+0x3a/0xa0 [ 97.590903] RSP: 0018:ffff8801793f3c58 EFLAGS: 00010286 [ 97.596802] RAX: ffffffffa006f000 RBX: ffffffff81e3ea20 RCX: 0000000000000000 [ 97.604812] RDX: ffff880179eaf210 RSI: ffffffffa0131000 RDI: ffffffff81e3ea20 [ 97.612821] RBP: ffff8801793f3c68 R08: 0000000000000006 R09: 000000000000005c [ 97.620847] R10: 0000000000000000 R11: 0000000000000006 R12: ffffffffa0131000 [ 97.628855] R13: 0000000000000000 R14: ffff880176e35f48 R15: ffff8801793f3ea8 [ 97.636865] FS: 00007f7eeba07700(0000) GS:ffff88017fc00000(0000) knlGS:0000000000000000 [ 97.645948] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 97.652423] CR2: ffffffffa006f010 CR3: 00000001775ef000 CR4: 00000000003406f0 [ 97.660423] Call Trace: [ 97.663166] ? 0xffffffffa0031000 [ 97.666885] register_pm_notifier+0x18/0x20 [ 97.671581] telemetry_debugfs_init+0x92/0x1000 Signed-off-by: Priyalee Kushwaha Signed-off-by: Andy Shevchenko Signed-off-by: Darren Hart (VMware) drivers/platform/x86/intel_telemetry_debugfs.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 7de84403a2020874714f6f40170f5ef9fc7ab58e Merge: c5549ee a1a745e Author: David S. Miller Date: Tue Jun 13 13:46:01 2017 -0400 Merge tag 'batadv-net-for-davem-20170613' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are two batman-adv bugfixes: - fix rx packet counters for local ARP replies, by Sven Eckelmann - fix memory leaks for unicast packetes received from another gateway in bridge loop avoidance, by Andreas Pape ==================== Signed-off-by: David S. Miller commit c5549ee40112f2511a794c9aad7eb6ac5f18b0eb Merge: ace17c3 b3dd827 Author: David S. Miller Date: Tue Jun 13 13:34:13 2017 -0400 Merge tag 'mac80211-for-davem-2017-06-13' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Some fixes: * Avi fixes some fallout from my mac80211 RX flags changes * Emmanuel fixes an issue with adhering to the spec, and an oversight in the SMPS management code * Jason's patch makes mac80211 use constant-time memory comparisons for message authentication, to avoid having potentially observable timing differences * my fix makes mac80211 set the basic rates bitmap before the channel so the next update to the driver has more consistent data - this required another rework patch to remove some useless 5/10 MHz code that can never be hit ==================== Signed-off-by: David S. Miller commit ace17c369295f088dc8ac8ff468602646fa5cced Author: Tayar, Tomer Date: Tue Jun 13 12:15:59 2017 +0300 qed: fix dump of context data Currently when dumping a context data only word number '1' is read for the entire context. Fixes: c965db444629 ("qed: Add support for debug data collection") Signed-off-by: Tomer Tayar Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60cfe1eaccb8af598ebe1bdc44e157ea30fcdd81 Author: Bjørn Mork Date: Tue Jun 13 19:10:18 2017 +0200 qmi_wwan: new Telewell and Sierra device IDs A new Sierra Wireless EM7305 device ID used in a Toshiba laptop, and two Longcheer device IDs entries used by Telewell TW-3G HSPA+ branded modems. Reported-by: Petr Kloc Reported-by: Teemu Likonen Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 4 ++++ 1 file changed, 4 insertions(+) commit 665fff2923323e348728e03a7cdb0ce56f316d39 Author: Florian Fainelli Date: Mon Jun 12 17:18:51 2017 -0700 net: phy: Fix MDIO_THUNDER dependencies After commit 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs") we could create a configuration where MDIO_DEVICE=y and PHYLIB=m which leads to the following undefined references: drivers/built-in.o: In function `thunder_mdiobus_pci_remove': >> mdio-thunder.c:(.text+0x2a212f): undefined reference to >> `mdiobus_unregister' >> mdio-thunder.c:(.text+0x2a2138): undefined reference to >> `mdiobus_free' drivers/built-in.o: In function `thunder_mdiobus_pci_probe': mdio-thunder.c:(.text+0x2a22e7): undefined reference to `devm_mdiobus_alloc_size' mdio-thunder.c:(.text+0x2a236f): undefined reference to `of_mdiobus_register' Reported-by: kbuild test robot Fixes: 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs") Signed-off-by: Florian Fainelli Tested-by: Randy Dunlap Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 4a6a97e2650c7dd7b1380ba763e9038c814e220c Author: Joe Perches Date: Mon Jun 12 16:39:51 2017 -0700 netconsole: Remove duplicate "netconsole: " logging prefix It's already added by pr_fmt so remove the explicit use. Signed-off-by: Joe Perches Signed-off-by: David S. Miller drivers/net/netconsole.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c38b7d327aafd1e3ad7ff53eefac990673b65667 Author: WANG Cong Date: Mon Jun 12 09:52:26 2017 -0700 igmp: acquire pmc lock for ip_mc_clear_src() Andrey reported a use-after-free in add_grec(): for (psf = *psf_list; psf; psf = psf_next) { ... psf_next = psf->sf_next; where the struct ip_sf_list's were already freed by: kfree+0xe8/0x2b0 mm/slub.c:3882 ip_mc_clear_src+0x69/0x1c0 net/ipv4/igmp.c:2078 ip_mc_dec_group+0x19a/0x470 net/ipv4/igmp.c:1618 ip_mc_drop_socket+0x145/0x230 net/ipv4/igmp.c:2609 inet_release+0x4e/0x1c0 net/ipv4/af_inet.c:411 sock_release+0x8d/0x1e0 net/socket.c:597 sock_close+0x16/0x20 net/socket.c:1072 This happens because we don't hold pmc->lock in ip_mc_clear_src() and a parallel mr_ifc_timer timer could jump in and access them. The RCU lock is there but it is merely for pmc itself, this spinlock could actually ensure we don't access them in parallel. Thanks to Eric and Long for discussion on this bug. Reported-by: Andrey Konovalov Cc: Eric Dumazet Cc: Xin Long Signed-off-by: Cong Wang Reviewed-by: Xin Long Signed-off-by: David S. Miller net/ipv4/igmp.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit eb3c28c15555212227cfa8b9a3baa21ad5982a19 Author: Oliver Neukum Date: Mon Jun 12 13:56:51 2017 +0200 r8152: give the device version Getting the device version out of the driver really aids debugging. Signed-off-by: Oliver Neukum Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 2 ++ 1 file changed, 2 insertions(+) commit 459fa246d8fa4a543ed9a3331f15c8fe1caf9937 Author: Stephen Rothwell Date: Sun Jun 11 15:22:10 2017 +1000 clocksource: Explicitly include linux/clocksource.h when needed The kbuild test robot reported errors in these files when doing an ia64 allmodconfig build. drivers/clocksource/timer-sun5i.c:52:21: error: field 'clksrc' has incomplete type struct clocksource clksrc; ^~~~~~ drivers/clocksource/cadence_ttc_timer.c:92:21: error: field 'cs' has incomplete type struct clocksource cs; ^~ (and many more errors for these files) Cc: Michal Simek Cc: "Sören Brinkmann" Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Maxime Ripard Cc: Chen-Yu Tsai Reported-by: kbuild test robot Signed-off-by: Stephen Rothwell Acked-by: Michal Simek Signed-off-by: Daniel Lezcano drivers/clocksource/cadence_ttc_timer.c | 1 + drivers/clocksource/timer-sun5i.c | 1 + 2 files changed, 2 insertions(+) commit 97d8b6e3b8538198aefb0003342920a82e062147 Author: Ashwanth Goli Date: Tue Jun 13 16:54:55 2017 +0530 net: rps: fix uninitialized symbol warning This patch fixes uninitialized symbol warning that got introduced by the following commit 773fc8f6e8d6 ("net: rps: send out pending IPI's on CPU hotplug") Signed-off-by: Ashwanth Goli Signed-off-by: David S. Miller net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ca4cd7bccf0b82d2c10069f295772bb7b76d006 Author: Jiri Kosina Date: Fri Jun 9 13:15:37 2017 +0200 HID: let generic driver yield control iff specific driver has been enabled There are many situations where generic HID driver provides some basic level of support for certain device, but later this support (usually by implementing vendor-specific extensions of HID protocol) is extended and the support moved over to a separate (usually per-vendor) specific driver. This might bring a rather unpleasant suprise for users, as all of a sudden there is a new config option they have to enable in order to get any support for their device whatsoever, although previous kernel versions provided basic support through the generic driver. Which is rightfully seen as a regression. Fix this by including the entry for a particular device in hid_have_special_driver[] iff the specific config option has been specified, and let generic driver handle the device otherwise. Also make the behavior of hid_scan_report() (where the same decision is being taken on a per-report level) consistent. While at it, reshuffle the hid_have_special_driver[] a bit to restore the alphabetical ordering (first order by config option, and within those sections order by VID). This is considered a short-term solution, before generic way of giving precedence to special drivers and falling back to generic driver is figured out. While at it, fixup a missing entry for GFRM driver; thanks to Hans de Geode for spotting this (and for discovering a few issues in the conversion). Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 282 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 221 insertions(+), 61 deletions(-) commit b3dd8279659f14f3624bb32559782d699fa6f7d1 Author: Emmanuel Grumbach Date: Sat Jun 10 13:52:45 2017 +0300 mac80211: don't send SMPS action frame in AP mode when not needed mac80211 allows to modify the SMPS state of an AP both, when it is started, and after it has been started. Such a change will trigger an action frame to all the peers that are currently connected, and will be remembered so that new peers will get notified as soon as they connect (since the SMPS setting in the beacon may not be the right one). This means that we need to remember the SMPS state currently requested as well as the SMPS state that was configured initially (and advertised in the beacon). The former is bss->req_smps and the latter is sdata->smps_mode. Initially, the AP interface could only be started with SMPS_OFF, which means that sdata->smps_mode was SMPS_OFF always. Later, a nl80211 API was added to be able to start an AP with a different AP mode. That code forgot to update bss->req_smps and because of that, if the AP interface was started with SMPS_DYNAMIC, we had: sdata->smps_mode = SMPS_DYNAMIC bss->req_smps = SMPS_OFF That configuration made mac80211 think it needs to fire off an action frame to any new station connecting to the AP in order to let it know that the actual SMPS configuration is SMPS_OFF. Fix that by properly setting bss->req_smps in ieee80211_start_ap. Fixes: f69931748730 ("mac80211: set smps_mode according to ap params") Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/cfg.c | 2 ++ 1 file changed, 2 insertions(+) commit 98c67d187db7808b1f3c95f2110dd4392d034182 Author: Jason A. Donenfeld Date: Sat Jun 10 04:59:12 2017 +0200 mac80211/wpa: use constant time memory comparison for MACs Otherwise, we enable all sorts of forgeries via timing attack. Signed-off-by: Jason A. Donenfeld Cc: Johannes Berg Cc: linux-wireless@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg net/mac80211/wpa.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c87905bec5dad66aa6bb43d11502cafdb33e07db Author: Johannes Berg Date: Sat Jun 10 13:52:43 2017 +0300 mac80211: set bss_info data before configuring the channel When mac80211 changes the channel, it also calls into the driver's bss_info_changed() callback, e.g. with BSS_CHANGED_IDLE. The driver may, like iwlwifi does, access more data from bss_info in that case and iwlwifi accesses the basic_rates bitmap, but if changing from a band with more (basic) rates to one with fewer, an out-of-bounds access of the rate array may result. While we can't avoid having invalid data at some point in time, we can avoid having it while we call the driver - so set up all the data before configuring the channel, and then apply it afterwards. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=195677 Reported-by: Johannes Hirte Tested-by: Johannes Hirte Debugged-by: Emmanuel Grumbach Signed-off-by: Johannes Berg net/mac80211/mlme.c | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) commit 44f6d42cbd6e4c1d4d25f19502dd5f27aedf89d4 Author: Johannes Berg Date: Sat Jun 10 13:52:44 2017 +0300 mac80211: remove 5/10 MHz rate code from station MLME There's no need for the station MLME code to handle bitrates for 5 or 10 MHz channels when it can't ever create such a configuration. Remove the unnecessary code. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) commit 204a7dbcb27bc4b461f42d7f96fdc875eb677f2f Author: Avraham Stern Date: Mon Jun 12 10:44:58 2017 +0300 mac80211: Fix incorrect condition when checking rx timestamp If the driver reports the rx timestamp at PLCP start, mac80211 can only handle legacy encoding, but the code checks that the encoding is not legacy. Fix this. Fixes: da6a4352e7c8 ("mac80211: separate encoding/bandwidth from flags") Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 769dc04db3ed8484798aceb015b94deacc2ba557 Author: Emmanuel Grumbach Date: Thu Jun 8 14:00:49 2017 +0300 mac80211: don't look at the PM bit of BAR frames When a peer sends a BAR frame with PM bit clear, we should not modify its PM state as madated by the spec in 802.11-20012 10.2.1.2. Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg net/mac80211/rx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit c380f681245d7ae57f17d9ebbbe8f8f1557ee1fb Author: Zhenyu Wang Date: Fri Jun 9 15:48:05 2017 +0800 drm/i915: Fix GVT-g PVINFO version compatibility check Current it's strictly checked if PVINFO version matches 1.0 for GVT-g i915 guest which doesn't help for compatibility at all and forces GVT-g host can't extend PVINFO easily with version bump for real compatibility check. This fixes that to check minimal required PVINFO version instead. v2: - drop unneeded version macro - use only major version for sanity check v3: - fix up PVInfo value with kernel type - one indent fix Reviewed-by: Joonas Lahtinen Cc: Chuanxiao Dong Cc: Joonas Lahtinen Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Zhenyu Wang Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170609074805.5101-1-zhenyuw@linux.intel.com (cherry picked from commit 0c8792d00d38de85b6ceb1dd67d3ee009d7c8e42) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_pvinfo.h | 8 ++------ drivers/gpu/drm/i915/i915_vgpu.c | 10 ++++------ 2 files changed, 6 insertions(+), 12 deletions(-) commit 1c2d6bbf0433ddf7c978ac5f2bd582e9e7d34687 Author: Ville Syrjälä Date: Thu Jun 8 17:40:02 2017 +0300 drm/i915: Fix SKL+ watermarks for 90/270 rotation skl_check_plane_surface() already rotates the clipped plane source coordinates to match the scanout direction because that's the way the GTT mapping is set up. Thus we no longer need to rotate the coordinates in the watermark code. For cursors we use the non-clipped coordinates which are not rotated appropriately, but that doesn't actually matter since cursors don't even support 90/270 degree rotation. v2: Resolve conflicts from SKL+ wm rework Cc: stable@vger.kernel.org Cc: Tvrtko Ursulin Fixes: b63a16f6cd89 ("drm/i915: Compute display surface offset in the plane check hook for SKL+") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170331180056.14086-3-ville.syrjala@linux.intel.com Tested-by: Tvrtko Ursulin Reviewed-by: Maarten Lankhorst (cherry picked from commit fce5adf568abb1e8264d677156e2e0deb529194d) Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170608144002.1605-2-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_pm.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) commit 9a775e0308b575e3a17c66a586ed049b07f48199 Author: Ville Syrjälä Date: Thu Jun 8 17:40:01 2017 +0300 drm/i915: Fix scaling check for 90/270 degree plane rotation Starting from commit b63a16f6cd89 ("drm/i915: Compute display surface offset in the plane check hook for SKL+") we've already rotated the src coordinates by 270 degrees by the time we check if a scaler is needed or not, so we must not account for the rotation a second time. Previously we did these steps in the opposite order and hence the scaler check had to deal with rotation itself. The double rotation handling causes us to enable a scaler pretty much every time 90/270 degree plane rotation is requested, leading to fuzzier fonts and whatnot. v2: s/unsigned/unsigned int/ to appease checkpatch v3: s/DRM_ROTATE_0/DRM_MODE_ROTATE_0/ Cc: stable@vger.kernel.org Cc: Tvrtko Ursulin Reported-by: Tvrtko Ursulin Tested-by: Tvrtko Ursulin Fixes: b63a16f6cd89 ("drm/i915: Compute display surface offset in the plane check hook for SKL+") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170331180056.14086-2-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst (cherry picked from commit d96a7d2adb040a67e163a82dad6316f9f572498a) Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170608144002.1605-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 023f108dcc187e34ef864bf10ed966cf25e14e2a Author: Paul Moore Date: Wed Jun 7 16:48:19 2017 -0400 selinux: fix double free in selinux_parse_opts_str() This patch is based on a discussion generated by an earlier patch from Tetsuo Handa: * https://marc.info/?t=149035659300001&r=1&w=2 The double free problem involves the mnt_opts field of the security_mnt_opts struct, selinux_parse_opts_str() frees the memory on error, but doesn't set the field to NULL so if the caller later attempts to call security_free_mnt_opts() we trigger the problem. In order to play it safe we change selinux_parse_opts_str() to call security_free_mnt_opts() on error instead of free'ing the memory directly. This should ensure that everything is handled correctly, regardless of what the caller may do. Fixes: e0007529893c1c06 ("LSM/SELinux: Interfaces to allow FS to control mount options") Cc: stable@vger.kernel.org Cc: Tetsuo Handa Reported-by: Dmitry Vyukov Signed-off-by: Paul Moore Signed-off-by: James Morris security/selinux/hooks.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d9ee35acfabbc909c3be4360cd5655a006628b2e Author: Vlastimil Babka Date: Mon Jun 12 09:21:30 2017 +0200 x86/mm: Disable 1GB direct mappings when disabling 2MB mappings The kmemleak and debug_pagealloc features both disable using huge pages for direct mappings so they can do cpa() on page level granularity in any context. However they only do that for 2MB pages, which means 1GB pages can still be used if the CPU supports it, unless disabled by a boot param, which is non-obvious. Disable also 1GB pages when disabling 2MB pages. Signed-off-by: Vlastimil Babka Cc: Christian Borntraeger Cc: Linus Torvalds Cc: Pekka Enberg Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vegard Nossum Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/2be70c78-6130-855d-3dfa-d87bd1dd4fda@suse.cz Signed-off-by: Ingo Molnar arch/x86/mm/init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 63f700aab4c11d46626de3cd051dae56cf7e9056 Merge: 2ab99b0 e5c8667 Author: Linus Torvalds Date: Tue Jun 13 15:09:10 2017 +0900 Merge tag 'xtensa-20170612' of git://github.com/jcmvbkbc/linux-xtensa Pull Xtensa fixes from Max Filippov: - don't use linux IRQ #0 in legacy irq domains: fixes timer interrupt assignment when it's hardware IRQ # is 0 and the kernel is built w/o device tree support - reduce reservation size for double exception vector literals from 48 to 20 bytes: fixes build on cores with small user exception vector - cleanups: use kmalloc_array instead of kmalloc in simdisk_init and seq_puts instead of seq_printf in c_show. * tag 'xtensa-20170612' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: don't use linux IRQ #0 xtensa: reduce double exception literal reservation xtensa: ISS: Use kmalloc_array() in simdisk_init() xtensa: Use seq_puts() in c_show() commit 2ab99b001dea71c25bcf34f746f5781c880151bb Merge: 32c1431 16ddcc3 Author: Linus Torvalds Date: Tue Jun 13 15:07:11 2017 +0900 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: - A fix for KVM to avoid kernel oopses in case of host protection faults due to runtime instrumentation - A fix for the AP bus to avoid dead devices after unbind / bind - A fix for a compile warning merged from the vfio_ccw tree - Updated default configurations * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: update defconfig s390/zcrypt: Fix blocking queue device after unbind/bind. s390/vfio_ccw: make some symbols static s390/kvm: do not rely on the ILC on kvm host protection fauls commit ca8efa1df1d15a1795a2da57f9f6aada6ed6b946 Author: Paul Mackerras Date: Tue Jun 6 16:47:22 2017 +1000 KVM: PPC: Book3S HV: Context-switch EBB registers properly This adds code to save the values of three SPRs (special-purpose registers) used by userspace to control event-based branches (EBBs), which are essentially interrupts that get delivered directly to userspace. These registers are loaded up with guest values when entering the guest, and their values are saved when exiting the guest, but we were not saving the host values and restoring them before going back to userspace. On POWER8 this would only affect userspace programs which explicitly request the use of EBBs and also use the KVM_RUN ioctl, since the only source of EBBs on POWER8 is the PMU, and there is an explicit enable bit in the PMU registers (and those PMU registers do get properly context-switched between host and guest). On POWER9 there is provision for externally-generated EBBs, and these are not subject to the control in the PMU registers. Since these registers only affect userspace, we can save them when we first come in from userspace and restore them before returning to userspace, rather than saving/restoring the host values on every guest entry/exit. Similarly, we don't need to worry about their values on offline secondary threads since they execute in the context of the idle task, which never executes in userspace. Fixes: b005255e12a3 ("KVM: PPC: Book3S HV: Context-switch new POWER8 SPRs", 2014-01-08) Cc: stable@vger.kernel.org # v3.14+ Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 6964e53f55837b0c49ed60d36656d2e0ee4fc27b Author: Jacob Keller Date: Mon Jun 12 15:38:36 2017 -0700 i40e: fix handling of HW ATR eviction A recent commit to refactor the driver and remove the hw_disabled_flags field accidentally introduced two regressions. First, we overwrote pf->flags which removed various key flags including the MSI-X settings. Additionally, it was intended that we have now two flags, HW_ATR_EVICT_CAPABLE and HW_ATR_EVICT_ENABLED, but this was not done, and we accidentally were mis-using HW_ATR_EVICT_CAPABLE everywhere. This patch adds the missing piece, HW_ATR_EVICT_ENABLED, and safely updates pf->flags instead of overwriting it. Without this patch we will have many problems including disabling MSI-X support, and we'll attempt to use HW ATR eviction on devices which do not support it. Fixes: 47994c119a36 ("i40e: remove hw_disabled_flags in favor of using separate flag bits", 2017-04-19) Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 4 ++-- drivers/net/ethernet/intel/i40e/i40e_main.c | 7 ++++--- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) commit fa07ab72cbb0d843429e61bf179308aed6cbe0dd Author: Heiner Kallweit Date: Sun Jun 11 00:38:36 2017 +0200 genirq: Release resources in __setup_irq() error path In case __irq_set_trigger() fails the resources requested via irq_request_resources() are not released. Add the missing release call into the error handling path. Fixes: c1bacbae8192 ("genirq: Provide irq_request/release_resources chip callbacks") Signed-off-by: Heiner Kallweit Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/655538f5-cb20-a892-ff15-fbd2dd1fa4ec@gmail.com kernel/irq/manage.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2ad50606f847a902303a5364b7cad64bdd6246f6 Author: Ondrej Mosnáček Date: Mon Jun 5 17:52:39 2017 +0200 dm integrity: reject mappings too large for device dm-integrity would successfully create mappings with the number of sectors greater than the provided data sector count. Attempts to read sectors of this mapping that were beyond the provided data sector count would then yield run-time messages of the form "device-mapper: integrity: Too big sector number: ...". Fix this by emitting an error when the requested mapping size is bigger than the provided data sector count. Signed-off-by: Ondrej Mosnacek Acked-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 5 +++++ 1 file changed, 5 insertions(+) commit 98dbf5af4fdd142f6184dbb4e4164a8d1850d526 Author: Randy Dunlap Date: Mon Jun 12 15:43:03 2017 -0500 PCI: endpoint: Select CRC32 to fix test build error The PCI endpoint test driver uses crc32_le() so it should select CRC32. Fixes this build error (when CRC32=m): drivers/built-in.o: In function `pci_epf_test_cmd_handler': pci-epf-test.c:(.text+0x2d98d): undefined reference to `crc32_le' Fixes: 349e7a85b25f ("PCI: endpoint: functions: Add an EP function to test PCI") Reported-by: kbuild test robot Signed-off-by: Randy Dunlap Signed-off-by: Bjorn Helgaas Acked-by: Kishon Vijay Abraham I drivers/pci/endpoint/functions/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 675c8da049fd6556eb2d6cdd745fe812752f07a8 Author: Karicheri, Muralidharan Date: Mon Jun 12 15:06:26 2017 -0400 hsr: fix incorrect warning When HSR interface is setup using ip link command, an annoying warning appears with the trace as below:- [ 203.019828] hsr_get_node: Non-HSR frame [ 203.019833] Modules linked in: [ 203.019848] CPU: 0 PID: 158 Comm: sd-resolve Tainted: G W 4.12.0-rc3-00052-g9fa6bf70 #2 [ 203.019853] Hardware name: Generic DRA74X (Flattened Device Tree) [ 203.019869] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 203.019880] [] (show_stack) from [] (dump_stack+0xac/0xe0) [ 203.019894] [] (dump_stack) from [] (__warn+0xd8/0x104) [ 203.019907] [] (__warn) from [] (warn_slowpath_fmt+0x34/0x44) root@am57xx-evm:~# [ 203.019921] [] (warn_slowpath_fmt) from [] (hsr_get_node+0x148/0x170) [ 203.019932] [] (hsr_get_node) from [] (hsr_forward_skb+0x110/0x7c0) [ 203.019942] [] (hsr_forward_skb) from [] (hsr_dev_xmit+0x2c/0x34) [ 203.019954] [] (hsr_dev_xmit) from [] (dev_hard_start_xmit+0xc4/0x3bc) [ 203.019963] [] (dev_hard_start_xmit) from [] (__dev_queue_xmit+0x7c4/0x98c) [ 203.019974] [] (__dev_queue_xmit) from [] (ip6_finish_output2+0x330/0xc1c) [ 203.019983] [] (ip6_finish_output2) from [] (ip6_output+0x58/0x454) [ 203.019994] [] (ip6_output) from [] (mld_sendpack+0x420/0x744) As this is an expected path to hsr_get_node() with frame coming from the master interface, add a check to ensure packet is not from the master port and then warn. Signed-off-by: Murali Karicheri Signed-off-by: David S. Miller net/hsr/hsr_forward.c | 3 +-- net/hsr/hsr_framereg.c | 9 +++++++-- net/hsr/hsr_framereg.h | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) commit 8a524f803a3e0290cdba6d373361b2cef9752934 Author: Peter Zijlstra Date: Mon Jun 12 13:52:46 2017 +0200 x86/debug: Handle early WARN_ONs proper Hans managed to trigger a WARN very early in the boot which killed his (Virtual) box. The reason is that the recent rework of WARN() to use UD0 forgot to add the fixup_bug() call to early_fixup_exception(). As a result the kernel does not handle the WARN_ON injected UD0 exception and panics. Add the missing fixup call, so early UD's injected by WARN() get handled. Fixes: 9a93848fe787 ("x86/debug: Implement __WARN() using UD0") Reported-and-tested-by: Hans de Goede Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Frank Mehnert Cc: Hans de Goede Cc: Michael Thayer Link: http://lkml.kernel.org/r/20170612180108.w4vgu2ckucmllf3a@hirez.programming.kicks-ass.net arch/x86/include/asm/extable.h | 1 + arch/x86/kernel/traps.c | 2 +- arch/x86/mm/extable.c | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) commit 94114c367553f3301747e47f6947cabde947575f Author: Stephen Boyd Date: Wed Jun 7 23:36:03 2017 -0700 tick/broadcast: Make tick_broadcast_setup_oneshot() static This function isn't used outside of tick-broadcast.c, so let's mark it static. Signed-off-by: Stephen Boyd Link: http://lkml.kernel.org/r/20170608063603.13276-1-sboyd@codeaurora.org Signed-off-by: Thomas Gleixner kernel/time/tick-broadcast.c | 4 +++- kernel/time/tick-internal.h | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) commit d360a687d99577110c181e67ebfb9a1b6fed63a2 Author: Vladimir Murzin Date: Mon Jun 12 13:35:52 2017 +0100 ARM: 8682/1: V7M: Set cacheid iff DminLine or IminLine is nonzero Cache support is optional feature in M-class cores, thus DminLine or IminLine of Cache Type Register is zero if caches are not implemented, but we check the whole CTR which has other features encoded there. Let's be more precise and check for DminLine and IminLine of CTR before we set cacheid. Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbeedfda8eee0b17ea16e4e157c596095458676a Author: Yisheng Xie Date: Fri Jun 9 15:28:18 2017 +0100 ARM: 8681/1: make VMSPLIT_3G_OPT depends on !ARM_LPAE When both enable CONFIG_ARM_LPAE=y and CONFIG_VMSPLIT_3G_OPT=y, which means use PAGE_OFFSET=0xB0000000 with ARM_LPAE, the kernel will boot fail and stop after uncompressed: Starting kernel ... Uart base = 0x20001000 watchdog reg = 0x20013000 dtb addr = 0x80840308 Uncompressing Linux... done, booting the kernel. For ARM_LPAE only support 3:1, 2:2, 1:3 split of TTBR1, which mention in: http://elinux.org/images/6/6a/Elce11_marinas.pdf - p16 So we should make VMSPLIT_3G_OPT depends on !ARM_LPAE to avoid trigger this bug. Acked-by: Nicolas Pitre Signed-off-by: Yisheng Xie Signed-off-by: Russell King arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 60ce2858514ed9ccaf00dc7e9f4dc219537e9855 Author: Ard Biesheuvel Date: Fri Jun 9 10:14:53 2017 +0100 ARM: 8680/1: boot/compressed: fix inappropriate Thumb2 mnemonic for __nop Commit 06a4b6d009a1 ("ARM: 8677/1: boot/compressed: fix decompressor header layout for v7-M") fixed an issue in the layout of the header of the compressed kernel image that was caused by the assembler emitting narrow opcodes for 'mov r0, r0', and for this reason, the mnemonic was updated to use the W() macro, which will append the .w suffix (which forces a wide encoding) if required, i.e., when building the kernel in Thumb2 mode. However, this failed to take into account that on Thumb2 kernels built for CPUs that are also ARM capable, the entry point is entered in ARM mode, and so the instructions emitted here will be ARM instructions that only exist in a wide encoding to begin with, which is why the assembler rejects the .w suffix here and aborts the build with the following message: head.S: Assembler messages: head.S:132: Error: width suffixes are invalid in ARM mode -- `mov.w r0,r0' So replace the W(mov) with separate ARM and Thumb2 instructions, where the latter will only be used for THUMB2_ONLY builds. Fixes: 06a4b6d009a1 ("ARM: 8677/1: boot/compressed: fix decompressor ...") Reported-by: Arnd Bergmann Acked-by: Arnd Bergmann Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King arch/arm/boot/compressed/efi-header.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d2f48f05cd2a2a0a708fbfa45f1a00a87660d937 Author: Corentin Labbe Date: Fri Jun 9 14:48:41 2017 +0300 usb: xhci: ASMedia ASM1042A chipset need shorts TX quirk When plugging an USB webcam I see the following message: [106385.615559] xhci_hcd 0000:04:00.0: WARN Successful completion on short TX: needs XHCI_TRUST_TX_LENGTH quirk? [106390.583860] handle_tx_event: 913 callbacks suppressed With this patch applied, I get no more printing of this message. Cc: Signed-off-by: Corentin Labbe Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci.c | 3 +++ 1 file changed, 3 insertions(+) commit b72eb8435b25be3a1880264cf32ac91e626ba5ba Author: YD Tseng Date: Fri Jun 9 14:48:40 2017 +0300 usb: xhci: Fix USB 3.1 supported protocol parsing xHCI host controllers can have both USB 3.1 and 3.0 extended speed protocol lists. If the USB3.1 speed is parsed first and 3.0 second then the minor revision supported will be overwritten by the 3.0 speeds and the USB3 roothub will only show support for USB 3.0 speeds. This was the case with a xhci controller with the supported protocol capability listed below. In xhci-mem.c, the USB 3.1 speed is parsed first, the min_rev of usb3_rhub is set as 0x10. And then USB 3.0 is parsed. However, the min_rev of usb3_rhub will be changed to 0x00. If USB 3.1 device is connected behind this host controller, the speed of USB 3.1 device just reports 5G speed using lsusb. 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 08 00 00 00 00 00 40 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 02 08 10 03 55 53 42 20 01 02 00 00 00 00 00 00 //USB 3.1 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 02 08 00 03 55 53 42 20 03 06 00 00 00 00 00 00 //USB 3.0 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 02 08 00 02 55 53 42 20 09 0E 19 00 00 00 00 00 //USB 2.0 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 This patch fixes the issue by only owerwriting the minor revision if it is higher than the existing one. [reword commit message -Mathias] Cc: Signed-off-by: YD Tseng Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8ada5f3ae96b0336145e453740b9168a56a0fc1d Merge: 32c1431 f50b878 Author: Greg Kroah-Hartman Date: Mon Jun 12 16:02:19 2017 +0200 Merge tag 'fixes-for-v4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.12-rc5 Alan Stern fixed a GPF in gadgetfs found by the kernel fuzzying project composite.c learned that if it deactivates a function during bind, it must reactivate it during unbind. commit 3500cd73dff48f28f4ba80c171c4c80034d40f76 Author: Christian Perle Date: Mon Jun 12 10:06:57 2017 +0200 proc: snmp6: Use correct type in memset Reading /proc/net/snmp6 yields bogus values on 32 bit kernels. Use "u64" instead of "unsigned long" in sizeof(). Fixes: 4a4857b1c81e ("proc: Reduce cache miss in snmp6_seq_show") Signed-off-by: Christian Perle Signed-off-by: David S. Miller net/ipv6/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3db1200ca21f3c63c9044185dc5762ef996848cb Author: Frank Rowand Date: Fri Jun 9 17:26:32 2017 -0700 clocksource/drivers/arm_arch_timer: Fix read and iounmap of incorrect variable Fix boot warning 'Trying to vfree() nonexistent vm area' from arch_timer_mem_of_init(). Refactored code attempts to read and iounmap using address frame instead of address ioremap(frame->cntbase). Fixes: c389d701dfb70 ("clocksource: arm_arch_timer: split MMIO timer probing.") Signed-off-by: Frank Rowand Reviewed-by: Fu Wei Acked-by: Marc Zyngier Signed-off-by: Daniel Lezcano drivers/clocksource/arm_arch_timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 74b2c983960b1af193eafe6b4ea3bb1bf77e2650 Merge: 32c1431 6b1355f Author: Rafael J. Wysocki Date: Mon Jun 12 14:40:08 2017 +0200 Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq Pull devfreq fixes from MyungJoo Ham. * 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq: PM / devfreq: exynos-ppmu: Staticize event list PM / devfreq: exynos-ppmu: Handle return value of clk_prepare_enable PM / devfreq: exynos-nocp: Handle return value of clk_prepare_enable commit b2cdd8e1b54849477a32d820acc2e87828a38f3d Author: Christophe Jaillet Date: Sun Jun 11 14:28:54 2017 +0200 cpuidle: dt: Add missing 'of_node_put()' 'of_node_put()' should be called on pointer returned by 'of_parse_phandle()' when done. In this function this is done in all path except this 'continue', so add it. Fixes: 97735da074fd (drivers: cpuidle: Add status property to ARM idle states) Signed-off-by: Christophe Jaillet Signed-off-by: Rafael J. Wysocki drivers/cpuidle/dt_idle_states.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b8e11f7d2791bd9320be1c6e772a60b2aa093e45 Author: Tomasz Wilczyński Date: Sun Jun 11 17:28:39 2017 +0900 cpufreq: conservative: Allow down_threshold to take values from 1 to 10 Commit 27ed3cd2ebf4 (cpufreq: conservative: Fix the logic in frequency decrease checking) removed the 10 point substraction when comparing the load against down_threshold but did not remove the related limit for the down_threshold value. As a result, down_threshold lower than 11 is not allowed even though values from 1 to 10 do work correctly too. The comment ("cannot be lower than 11 otherwise freq will not fall") also does not apply after removing the substraction. For this reason, allow down_threshold to take any value from 1 to 99 and fix the related comment. Fixes: 27ed3cd2ebf4 (cpufreq: conservative: Fix the logic in frequency decrease checking) Signed-off-by: Tomasz Wilczyński Acked-by: Viresh Kumar Cc: 3.10+ # 3.10+ Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq_conservative.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ff0a6d6f932ff4b9eb8e8140f98cc1cf763d0d78 Author: Rafael J. Wysocki Date: Mon Jun 12 14:16:16 2017 +0200 Revert "cpufreq: schedutil: Reduce frequencies slower" Revert commit 39b64aa1c007 (cpufreq: schedutil: Reduce frequencies slower) that introduced unintentional changes in behavior leading to adverse effects on some systems. Reported-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki kernel/sched/cpufreq_schedutil.c | 3 --- 1 file changed, 3 deletions(-) commit 83848fbe7e6af978c080a88c130a67178b1ac0e4 Author: Lv Zheng Date: Wed Jun 7 12:54:58 2017 +0800 ACPICA: Tables: Mechanism to handle late stage acpi_get_table() imbalance Considering this case: 1. A program opens a sysfs table file 65535 times, it can increase validation_count and first increment cause the table to be mapped: validation_count = 65535 2. AML execution causes "Load" to be executed on the same table, this time it cannot increase validation_count, so validation_count remains: validation_count = 65535 3. The program closes sysfs table file 65535 times, it can decrease validation_count and the last decrement cause the table to be unmapped: validation_count = 0 4. AML code still accessing the loaded table, kernel crash can be observed. To prevent that from happening, add a validation_count threashold. When it is reached, the validation_count can no longer be incremented/decremented to invalidate the table descriptor (means preventing table unmappings) Note that code added in acpi_tb_put_table() is actually a no-op but changes the warning message into a "warn once" one. Lv Zheng. Signed-off-by: Lv Zheng [ rjw: Changelog, comments ] Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/tbutils.c | 34 +++++++++++++++++++++++++--------- include/acpi/actbl.h | 14 ++++++++++++++ 2 files changed, 39 insertions(+), 9 deletions(-) commit 19e72d3abb63cb16d021a4066ce1a18880509e99 Author: Bart Van Assche Date: Thu Feb 9 17:28:50 2017 -0800 configfs: Introduce config_item_get_unless_zero() Signed-off-by: Bart Van Assche [hch: minor style tweak] Signed-off-by: Christoph Hellwig fs/configfs/item.c | 8 ++++++++ include/linux/configfs.h | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) commit ba80aa909c99802c428682c352b0ee0baac0acd3 Author: Nicholas Bellinger Date: Thu Jun 8 04:51:54 2017 +0000 configfs: Fix race between create_link and configfs_rmdir This patch closes a long standing race in configfs between the creation of a new symlink in create_link(), while the symlink target's config_item is being concurrently removed via configfs_rmdir(). This can happen because the symlink target's reference is obtained by config_item_get() in create_link() before the CONFIGFS_USET_DROPPING bit set by configfs_detach_prep() during configfs_rmdir() shutdown is actually checked.. This originally manifested itself on ppc64 on v4.8.y under heavy load using ibmvscsi target ports with Novalink API: [ 7877.289863] rpadlpar_io: slot U8247.22L.212A91A-V1-C8 added [ 7879.893760] ------------[ cut here ]------------ [ 7879.893768] WARNING: CPU: 15 PID: 17585 at ./include/linux/kref.h:46 config_item_get+0x7c/0x90 [configfs] [ 7879.893811] CPU: 15 PID: 17585 Comm: targetcli Tainted: G O 4.8.17-customv2.22 #12 [ 7879.893812] task: c00000018a0d3400 task.stack: c0000001f3b40000 [ 7879.893813] NIP: d000000002c664ec LR: d000000002c60980 CTR: c000000000b70870 [ 7879.893814] REGS: c0000001f3b43810 TRAP: 0700 Tainted: G O (4.8.17-customv2.22) [ 7879.893815] MSR: 8000000000029033 CR: 28222242 XER: 00000000 [ 7879.893820] CFAR: d000000002c664bc SOFTE: 1 GPR00: d000000002c60980 c0000001f3b43a90 d000000002c70908 c0000000fbc06820 GPR04: c0000001ef1bd900 0000000000000004 0000000000000001 0000000000000000 GPR08: 0000000000000000 0000000000000001 d000000002c69560 d000000002c66d80 GPR12: c000000000b70870 c00000000e798700 c0000001f3b43ca0 c0000001d4949d40 GPR16: c00000014637e1c0 0000000000000000 0000000000000000 c0000000f2392940 GPR20: c0000001f3b43b98 0000000000000041 0000000000600000 0000000000000000 GPR24: fffffffffffff000 0000000000000000 d000000002c60be0 c0000001f1dac490 GPR28: 0000000000000004 0000000000000000 c0000001ef1bd900 c0000000f2392940 [ 7879.893839] NIP [d000000002c664ec] config_item_get+0x7c/0x90 [configfs] [ 7879.893841] LR [d000000002c60980] check_perm+0x80/0x2e0 [configfs] [ 7879.893842] Call Trace: [ 7879.893844] [c0000001f3b43ac0] [d000000002c60980] check_perm+0x80/0x2e0 [configfs] [ 7879.893847] [c0000001f3b43b10] [c000000000329770] do_dentry_open+0x2c0/0x460 [ 7879.893849] [c0000001f3b43b70] [c000000000344480] path_openat+0x210/0x1490 [ 7879.893851] [c0000001f3b43c80] [c00000000034708c] do_filp_open+0xfc/0x170 [ 7879.893853] [c0000001f3b43db0] [c00000000032b5bc] do_sys_open+0x1cc/0x390 [ 7879.893856] [c0000001f3b43e30] [c000000000009584] system_call+0x38/0xec [ 7879.893856] Instruction dump: [ 7879.893858] 409d0014 38210030 e8010010 7c0803a6 4e800020 3d220000 e94981e0 892a0000 [ 7879.893861] 2f890000 409effe0 39200001 992a0000 <0fe00000> 4bffffd0 60000000 60000000 [ 7879.893866] ---[ end trace 14078f0b3b5ad0aa ]--- To close this race, go ahead and obtain the symlink's target config_item reference only after the existing CONFIGFS_USET_DROPPING check succeeds. This way, if configfs_rmdir() wins create_link() will return -ENONET, and if create_link() wins configfs_rmdir() will return -EBUSY. Reported-by: Bryant G. Ly Tested-by: Bryant G. Ly Signed-off-by: Nicholas Bellinger Signed-off-by: Christoph Hellwig Cc: stable@vger.kernel.org fs/configfs/symlink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 138437f591dd9a42d53c6fed1a3c85e02678851c Author: Hangbin Liu Date: Sun Jun 11 09:44:20 2017 +0800 xfrm: move xfrm_garbage_collect out of xfrm_policy_flush Now we will force to do garbage collection if any policy removed in xfrm_policy_flush(). But during xfrm_net_exit(). We call flow_cache_fini() first and set set fc->percpu to NULL. Then after we call xfrm_policy_fini() -> frxm_policy_flush() -> flow_cache_flush(), we will get NULL pointer dereference when check percpu_empty. The code path looks like: flow_cache_fini() - fc->percpu = NULL xfrm_policy_fini() - xfrm_policy_flush() - xfrm_garbage_collect() - flow_cache_flush() - flow_cache_percpu_empty() - fcp = per_cpu_ptr(fc->percpu, cpu) To reproduce, just add ipsec in netns and then remove the netns. v2: As Xin Long suggested, since only two other places need to call it. move xfrm_garbage_collect() outside xfrm_policy_flush(). v3: Fix subject mismatch after v2 fix. Fixes: 35db06912189 ("xfrm: do the garbage collection after flushing policy") Signed-off-by: Hangbin Liu Reviewed-by: Xin Long Signed-off-by: Steffen Klassert net/key/af_key.c | 2 ++ net/xfrm/xfrm_policy.c | 4 ---- net/xfrm/xfrm_user.c | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) commit 24835611a96e9b41ad57dd5024915106293be7e9 Author: Heiner Kallweit Date: Sat Jun 10 13:36:38 2017 +0200 mmc: meson-gx: work around broken SDIO with certain WiFi chips There have been reports about SDIO failing with certain WiFi chips in descriptor chain mode. SD / eMMC are working fine. So let's fall back to bounce buffer mode for command SD_IO_RW_EXTENDED. This was reported to fix the error. Fixes: 79ed05e329c3 "mmc: meson-gx: add support for descriptor chain mode" Signed-off-by: Heiner Kallweit Tested-by: Martin Blumenstingl Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d758619ba6a5d250914b06b2b923a65e48bdd002 Author: Laurent Pinchart Date: Sat Jun 10 11:59:43 2017 +0300 drm: dw-hdmi: Fix compilation breakage by selecting REGMAP_MMIO The dw-hdmi driver switched to regmap-mmio, but lacks the dependency in Kconfig. This can result in compilation breakages. Fix it by selecting REGMAP_MMIO. Fixes: 80e2f97968b5 ("drm: bridge: dw-hdmi: Switch to regmap for register access") Reported-by: kbuild test robot Signed-off-by: Laurent Pinchart Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170610085943.15788-1-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/synopsys/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 6b1355f9ace06a65443c607e1b70872a5f613f80 Author: Krzysztof Kozlowski Date: Wed Jun 7 20:12:28 2017 +0200 PM / devfreq: exynos-ppmu: Staticize event list The ppmu_events array is accessed only in this compilation unit so it can be made static. Signed-off-by: Krzysztof Kozlowski Acked-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/event/exynos-ppmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97a6ba5bd0b54544fabe090711fabefc7a703a5f Author: Arvind Yadav Date: Fri May 19 16:26:04 2017 +0530 PM / devfreq: exynos-ppmu: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: MyungJoo Ham drivers/devfreq/event/exynos-ppmu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 973a27c7464231282489b2f14581e33cf29024b8 Author: Arvind Yadav Date: Fri May 19 16:20:35 2017 +0530 PM / devfreq: exynos-nocp: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: MyungJoo Ham drivers/devfreq/event/exynos-nocp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 32c1431eea4881a6b17bd7c639315010aeefa452 Author: Linus Torvalds Date: Sun Jun 11 16:48:20 2017 -0700 Linux 4.12-rc5 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32627645e9e89b58e0e2fcf6f5f6755b9bd046bb Merge: 6d53cef 92347cf Author: Linus Torvalds Date: Sun Jun 11 16:17:29 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull key subsystem fixes from James Morris: "Here are a bunch of fixes for Linux keyrings, including: - Fix up the refcount handling now that key structs use the refcount_t type and the refcount_t ops don't allow a 0->1 transition. - Fix a potential NULL deref after error in x509_cert_parse(). - Don't put data for the crypto algorithms to use on the stack. - Fix the handling of a null payload being passed to add_key(). - Fix incorrect cleanup an uninitialised key_preparsed_payload in key_update(). - Explicit sanitisation of potentially secure data before freeing. - Fixes for the Diffie-Helman code" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (23 commits) KEYS: fix refcount_inc() on zero KEYS: Convert KEYCTL_DH_COMPUTE to use the crypto KPP API crypto : asymmetric_keys : verify_pefile:zero memory content before freeing KEYS: DH: add __user annotations to keyctl_kdf_params KEYS: DH: ensure the KDF counter is properly aligned KEYS: DH: don't feed uninitialized "otherinfo" into KDF KEYS: DH: forbid using digest_null as the KDF hash KEYS: sanitize key structs before freeing KEYS: trusted: sanitize all key material KEYS: encrypted: sanitize all key material KEYS: user_defined: sanitize key payloads KEYS: sanitize add_key() and keyctl() key payloads KEYS: fix freeing uninitialized memory in key_update() KEYS: fix dereferencing NULL payload with nonzero length KEYS: encrypted: use constant-time HMAC comparison KEYS: encrypted: fix race causing incorrect HMAC calculations KEYS: encrypted: fix buffer overread in valid_master_desc() KEYS: encrypted: avoid encrypting/decrypting stack buffers KEYS: put keyring if install_session_keyring_to_cred() fails KEYS: Delete an error message for a failed memory allocation in get_derived_key() ... commit 6d53cefb18e4646fb4bf62ccb6098fb3808486df Author: Linus Torvalds Date: Sun Jun 11 15:51:56 2017 -0700 compiler, clang: properly override 'inline' for clang Commit abb2ea7dfd82 ("compiler, clang: suppress warning for unused static inline functions") just caused more warnings due to re-defining the 'inline' macro. So undef it before re-defining it, and also add the 'notrace' attribute like the gcc version that this is overriding does. Maybe this makes clang happier. Signed-off-by: Linus Torvalds include/linux/compiler-clang.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4b1f0d33db7d5bf92b5623e3ea2066e2de3999e3 Author: Donald Sharp Date: Sat Jun 10 16:30:17 2017 -0400 net: ipmr: Fix some mroute forwarding issues in vrf's This patch fixes two issues: 1) When forwarding on *,G mroutes that are in a vrf, the kernel was dropping information about the actual incoming interface when calling ip_mr_forward from ip_mr_input. This caused ip_mr_forward to send the multicast packet back out the incoming interface. Fix this by modifying ip_mr_forward to be handed the correctly resolved dev. 2) When a unresolved cache entry is created we store the incoming skb on the unresolved cache entry and upon mroute resolution from the user space daemon, we attempt to forward the packet. Again we were not resolving to the correct incoming device for a vrf scenario, before calling ip_mr_forward. Fix this by resolving to the correct interface and calling ip_mr_forward with the result. Fixes: e58e41596811 ("net: Enable support for VRF with ipv4 multicast") Signed-off-by: Donald Sharp Acked-by: David Ahern Acked-by: Nikolay Aleksandrov Reviewed-by: Yotam Gigi Signed-off-by: David S. Miller net/ipv4/ipmr.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit 062bb997d290879ea711d149189daf485bd777b3 Merge: 77a6bb5 91828bd Author: David S. Miller Date: Sun Jun 11 16:40:52 2017 -0400 Merge tag 'mlx5-fixes-2017-06-11' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox mlx5 fixes 2017-06-11 This series contains some fixes for the mlx5 core and netdev driver. Please pull and let me know if there's any problem. For -stable: ("net/mlx5e: Added BW check for DIM decision mechanism") kernels >= 4.9 ("net/mlx5e: Fix wrong indications in DIM due to counter wraparound") kernels >= 4.9 ("net/mlx5: Remove several module events out of ethtool stats") kernels >= 4.10 ("net/mlx5: Enable 4K UAR only when page size is bigger than 4K") kernels >= 4.11 *all patches apply with no issue on their -stable. ==================== Signed-off-by: David S. Miller commit 77a6bb5ac00dd48934dae0df4a24461cc7893d64 Merge: b87fa0f e7ff7ef Author: David S. Miller Date: Sun Jun 11 16:36:48 2017 -0400 Merge branch 'ena-fixes' Netanel Belgazal says: ==================== Bugs fixes in ena ethernet driver This patchset contains fixes for the bugs that were discovered so far. ==================== Signed-off-by: David S. Miller commit e7ff7efae5708513a795e329909ccbe2ac367b1a Author: Netanel Belgazal Date: Sun Jun 11 15:42:51 2017 +0300 net: ena: update ena driver to version 1.1.7 Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 800c55cb76be6617232ef50a2be29830f3aa8e5c Author: Netanel Belgazal Date: Sun Jun 11 15:42:50 2017 +0300 net: ena: bug fix in lost tx packets detection mechanism check_for_missing_tx_completions() is called from a timer task and looking for lost tx packets. The old implementation accumulate all the lost tx packets and did not check if those packets were retrieved on a later stage. This cause to a situation where the driver reset the device for no reason. Fixes: 1738cd3ed342 ("Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_ethtool.c | 1 - drivers/net/ethernet/amazon/ena/ena_netdev.c | 66 +++++++++++++++------------ drivers/net/ethernet/amazon/ena/ena_netdev.h | 14 +++++- 3 files changed, 50 insertions(+), 31 deletions(-) commit a2cc5198dac102775b21787752a2e0afe44ad311 Author: Netanel Belgazal Date: Sun Jun 11 15:42:49 2017 +0300 net: ena: disable admin msix while working in polling mode Fixes: 1738cd3ed342 ("Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit a3af7c18cfe545a711e5df7491b7d6df71eba2ff Author: Netanel Belgazal Date: Sun Jun 11 15:42:48 2017 +0300 net: ena: fix theoretical Rx hang on low memory systems For the rare case where the device runs out of free rx buffer descriptors (in case of pressure on kernel memory), and the napi handler continuously fail to refill new Rx descriptors until device rx queue totally runs out of all free rx buffers to post incoming packet, leading to a deadlock: * The device won't send interrupts since all the new Rx packets will be dropped. * The napi handler won't try to allocate new Rx descriptors since allocation is part of NAPI that's not being invoked any more The fix involves detecting this scenario and rescheduling NAPI (to refill buffers) by the keepalive/watchdog task. Fixes: 1738cd3ed342 ("Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_ethtool.c | 1 + drivers/net/ethernet/amazon/ena/ena_netdev.c | 55 +++++++++++++++++++++++++++ drivers/net/ethernet/amazon/ena/ena_netdev.h | 2 + 3 files changed, 58 insertions(+) commit 0857d92f71b6cb75281fde913554b2d5436c394b Author: Netanel Belgazal Date: Sun Jun 11 15:42:47 2017 +0300 net: ena: add missing unmap bars on device removal This patch also change the mapping functions to devm_ functions Fixes: 1738cd3ed342 ("Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 661d2b0ccef6a63f48b61105cf7be17403d1db01 Author: Netanel Belgazal Date: Sun Jun 11 15:42:46 2017 +0300 net: ena: fix race condition between submit and completion admin command Bug: "Completion context is occupied" error printout will be noticed in dmesg. This error will cause the admin command to fail, which will lead to an ena_probe() failure or a watchdog reset (depends on which admin command failed). Root cause: __ena_com_submit_admin_cmd() is the function that submits new entries to the admin queue. The function have a check that makes sure the queue is not full and the function does not override any outstanding command. It uses head and tail indexes for this check. The head is increased by ena_com_handle_admin_completion() which runs from interrupt context, and the tail index is increased by the submit function (the function is running under ->q_lock, so there is no risk of multithread increment). Each command is associated with a completion context. This context allocated before call to __ena_com_submit_admin_cmd() and freed by ena_com_wait_and_process_admin_cq_interrupts(), right after the command was completed. This can lead to a state where the head was increased, the check passed, but the completion context is still in use. Solution: Use the atomic variable ->outstanding_cmds instead of using the head and the tail indexes. This variable is safe for use since it is bumped in get_comp_ctx() in __ena_com_submit_admin_cmd() and is freed by comp_ctxt_release() Fixes: 1738cd3ed342 ("Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2d2c600a917127f16f179d5a88fc44ba3ed263ed Author: Netanel Belgazal Date: Sun Jun 11 15:42:45 2017 +0300 net: ena: add missing return when ena_com_get_io_handlers() fails Fixes: 1738cd3ed342 ("Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 ++ 1 file changed, 2 insertions(+) commit 418df30f7e9e8f4795fb2f3abf9744e5886df5ca Author: Netanel Belgazal Date: Sun Jun 11 15:42:44 2017 +0300 net: ena: fix bug that might cause hang after consecutive open/close interface. Fixing a bug that the driver does not unmask the IO interrupts in ndo_open(): occasionally, the MSI-X interrupt (for one or more IO queues) can be masked when ndo_close() was called. If that is followed by ndo open(), then the MSI-X will be still masked so no interrupt will be received by the driver. Fixes: 1738cd3ed342 ("Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 41 ++++++++++++++++++---------- 1 file changed, 26 insertions(+), 15 deletions(-) commit a77c1aafcc906f657d1a0890c1d898be9ee1d5c9 Author: Netanel Belgazal Date: Sun Jun 11 15:42:43 2017 +0300 net: ena: fix rare uncompleted admin command false alarm The current flow to detect admin completion is: while (command_not_completed) { if (timeout) error check_for_completion() sleep() } So in case the sleep took more than the timeout (in case the thread/workqueue was not scheduled due to higher priority task or prolonged VMexit), the driver can detect a stall even if the completion is present. The fix changes the order of this function to first check for completion and only after that check if the timeout expired. Fixes: 1738cd3ed342 ("Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 5ad9345d2321eb1442794098506d136d01cf8345 Merge: 5e38b72 b169c13 Author: Linus Torvalds Date: Sun Jun 11 12:02:01 2017 -0700 Merge tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random Pull randomness fixes from Ted Ts'o: "Improve performance by using a lockless update mechanism suggested by Linus, and make sure we refresh per-CPU entropy returned get_random_* as soon as the CRNG is initialized" * tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: random: invalidate batched entropy after crng init random: use lockless method of accessing and updating f->reg_idx commit 5e38b72ac1b0000f1d7bd2b62fba7ee9053f5b94 Merge: f986e31 67a7d5f Author: Linus Torvalds Date: Sun Jun 11 11:57:47 2017 -0700 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "Fix various bug fixes in ext4 caused by races and memory allocation failures" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix fdatasync(2) after extent manipulation operations ext4: fix data corruption for mmap writes ext4: fix data corruption with EXT4_GET_BLOCKS_ZERO ext4: fix quota charging for shared xattr blocks ext4: remove redundant check for encrypted file on dio write path ext4: remove unused d_name argument from ext4_search_dir() et al. ext4: fix off-by-one error when writing back pages before dio read ext4: fix off-by-one on max nr_pages in ext4_find_unwritten_pgoff() ext4: keep existing extra fields when inode expands ext4: handle the rest of ext4_mb_load_buddy() ENOMEM errors ext4: fix off-by-in in loop termination in ext4_find_unwritten_pgoff() ext4: fix SEEK_HOLE jbd2: preserve original nofs flag during journal restart ext4: clear lockdep subtype for quota files on quota off commit f986e31bb4d0dba0a10adc51308bf9de2d0e7e4a Merge: 9cd9cb0 fc7a906 Author: Linus Torvalds Date: Sun Jun 11 11:34:27 2017 -0700 Merge tag 'gpio-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "A few overdue GPIO patches for the v4.12 kernel. - Fix debounce logic on the Aspeed platform. - Fix the "virtual gpio" things on the Intel Crystal Cove. - Fix the blink counter selection on the MVEBU platform" * tag 'gpio-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: mvebu: fix gpio bank registration when pwm is used gpio: mvebu: fix blink counter register selection MAINTAINERS: remove self from GPIO maintainers gpio: crystalcove: Do not write regular gpio registers for virtual GPIOs gpio: aspeed: Don't attempt to debounce if disabled commit 9cd9cb0ba3e9e55120d25be3a45ffafd299b1b14 Merge: 21c9eb7 ed45509 Author: Linus Torvalds Date: Sun Jun 11 11:29:15 2017 -0700 Merge tag 'char-misc-4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small driver fixes for 4.12-rc5. Nothing major here, just some small bugfixes found by people testing, and a MAINTAINERS file update for the genwqe driver. All have been in linux-next with no reported issues" [ The cxl driver fix came in through the powerpc tree earlier ] * tag 'char-misc-4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: cxl: Avoid double free_irq() for psl,slice interrupts mei: make sysfs modalias format similar as uevent modalias drivers: char: mem: Fix wraparound check to allow mappings up to the end MAINTAINERS: Change maintainer of genwqe driver goldfish_pipe: use GFP_ATOMIC under spin lock firmware: vpd: do not leak kobjects firmware: vpd: avoid potential use-after-free when destroying section firmware: vpd: do not leave freed section attributes to the list commit 21c9eb7ca32be43a1c6fcb8194cf2d1aea771772 Merge: 246baac 26f4b1f Author: Linus Torvalds Date: Sun Jun 11 11:25:51 2017 -0700 Merge tag 'staging-4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO fixes from Greg KH: "These are mostly all IIO driver fixes, resolving a number of tiny issues. There's also a ccree and lustre fix in here as well, both fix problems found in those codebases. All have been in linux-next with no reported issues" * tag 'staging-4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: ccree: fix buffer copy staging/lustre/lov: remove set_fs() call from lov_getstripe() staging: ccree: add CRYPTO dependency iio: adc: sun4i-gpadc-iio: fix parent device being used in devm function iio: light: ltr501 Fix interchanged als/ps register field iio: adc: bcm_iproc_adc: swap primary and secondary isr handler's iio: trigger: fix NULL pointer dereference in iio_trigger_write_current() iio: adc: max9611: Fix attribute measure unit iio: adc: ti_am335x_adc: allocating too much in probe iio: adc: sun4i-gpadc-iio: Fix module autoload when OF devices are registered iio: adc: sun4i-gpadc-iio: Fix module autoload when PLATFORM devices are registered iio: proximity: as3935: fix iio_trigger_poll issue iio: proximity: as3935: fix AS3935_INT mask iio: adc: Max9611: checking for ERR_PTR instead of NULL in probe iio: proximity: as3935: recalibrate RCO after resume commit 246baac2fd2917259ba5dd34f3be7d6d195cbeb8 Merge: ef918d3 29532e7 Author: Linus Torvalds Date: Sun Jun 11 11:23:10 2017 -0700 Merge tag 'usb-4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes for 4.12-rc5 They are for some reported issues in the chipidea and gadget drivers. Nothing major. All have been in linux-next for a while with no reported issues" * tag 'usb-4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: gadget: udc: renesas_usb3: Fix PN_INT_ENA disabling timing usb: gadget: udc: renesas_usb3: lock for PN_ registers access usb: gadget: udc: renesas_usb3: fix deadlock by spinlock usb: gadget: udc: renesas_usb3: fix pm_runtime functions calling usb: gadget: f_mass_storage: Serialize wake and sleep execution usb: dwc2: add support for the DWC2 controller on Meson8 SoCs phy: qualcomm: phy-qcom-qmp: fix application of sizeof to pointer usb: musb: dsps: keep VBUS on for host-only mode usb: chipidea: core: check before accessing ci_role in ci_role_show usb: chipidea: debug: check before accessing ci_role phy: qcom-qmp: fix return value check in qcom_qmp_phy_create() usb: chipidea: udc: fix NULL pointer dereference if udc_start failed usb: chipidea: imx: Do not access CLKONOFF on i.MX51 commit ef918d3c80f5e2c42076f2b23c7ec4767b5ec925 Merge: 8f56821 e0f8e8c Author: Linus Torvalds Date: Sun Jun 11 11:21:08 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "This is a set of user visible fixes (excepting one format string change). Four of the qla2xxx fixes only affect the firmware dump path, but it's still important to the enterprise. The rest are various NULL pointer crash conditions or outright driver hangs" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: cxgb4i: libcxgbi: in error case RST tcp conn scsi: scsi_debug: Avoid PI being disabled when TPGS is enabled scsi: qla2xxx: Fix extraneous ref on sp's after adapter break scsi: lpfc: prevent potential null pointer dereference scsi: lpfc: Avoid NULL pointer dereference in lpfc_els_abort() scsi: lpfc: nvmet_fc: fix format string scsi: qla2xxx: Fix crash due to NULL pointer dereference of ctx scsi: qla2xxx: Fix mailbox pointer error in fwdump capture scsi: qla2xxx: Set bit 15 for DIAG_ECHO_TEST MBC scsi: qla2xxx: Modify T262 FW dump template to specify same start/end to debug customer issues scsi: qla2xxx: Fix crash due to mismatch mumber of Q-pair creation for Multi queue scsi: qla2xxx: Fix NULL pointer access due to redundant fc_host_port_name call scsi: qla2xxx: Fix recursive loop during target mode configuration for ISP25XX leaving system unresponsive scsi: bnx2fc: fix race condition in bnx2fc_get_host_stats() scsi: qla2xxx: don't disable a not previously enabled PCI device commit 8f56821d1db34b980ebe027a1b6fff2233471062 Merge: 9d66af6 b9d39d1 Author: Linus Torvalds Date: Sun Jun 11 11:15:09 2017 -0700 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fix from Dan Williams: "We expanded the device-dax fs type in 4.12 to be a generic provider of a struct dax_device with an embedded inode. However, Sasha found some basic negative testing was not run to verify that this fs cleanly handles being mounted directly. Note that the fresh rebase was done to remove an unnecessary Cc: tag, but this commit otherwise had a build success notification from the 0day robot." * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: device-dax: fix 'dax' device filesystem inode destruction crash commit 9d66af6bbf94d520e65e58a98543f67693ea4145 Merge: 9d0eb46 4d801cc Author: Linus Torvalds Date: Sun Jun 11 11:09:15 2017 -0700 Merge tag 'hexagon-for-linus-v4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hexagon fix from Guenter Roeck: "This fixes a build error seen when building hexagon images. Richard sent me an Ack, but didn't reply when asked if he wants me to send the patch to you directly, so I figured I'd just do it" * tag 'hexagon-for-linus-v4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hexagon: Use raw_copy_to_user commit 9d0eb4624601ac978b9e89be4aeadbd51ab2c830 Merge: 5faab9e 9bc1f09 Author: Linus Torvalds Date: Sun Jun 11 11:07:25 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "Bug fixes (ARM, s390, x86)" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: async_pf: avoid async pf injection when in guest mode KVM: cpuid: Fix read/write out-of-bounds vulnerability in cpuid emulation arm: KVM: Allow unaligned accesses at HYP arm64: KVM: Allow unaligned accesses at EL2 arm64: KVM: Preserve RES1 bits in SCTLR_EL2 KVM: arm/arm64: Handle possible NULL stage2 pud when ageing pages KVM: nVMX: Fix exception injection kvm: async_pf: fix rcu_irq_enter() with irqs enabled KVM: arm/arm64: vgic-v3: Fix nr_pre_bits bitfield extraction KVM: s390: fix ais handling vs cpu model KVM: arm/arm64: Fix isues with GICv2 on GICv3 migration commit 103a07d4278203d6299798cd74cdc4d209801cac Author: Martin Blumenstingl Date: Sun Jun 4 15:28:23 2017 +0200 iio: adc: meson-saradc: fix potential crash in meson_sar_adc_clear_fifo meson_sar_adc_clear_fifo passes a 0 as value-pointer to regmap_read(). In case of the meson-saradc driver this ends up in regmap_mmio_read(), where the value-pointer is de-referenced unconditionally to assign the value which was read. Fix this by passing an actual pointer, even though all we want to do is to discard the value. As a side-effect this fixes a sparse warning ("Using plain integer as NULL pointer") as reported by Paolo Cretaro. Fixes: 3adbf3427330 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs") Reported-by: Paolo Cretaro Signed-off-by: Martin Blumenstingl Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/meson_saradc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 91828bd89940e8145f91751a015bc11bc486aad0 Author: Majd Dibbiny Date: Sun May 28 14:47:56 2017 +0300 net/mlx5: Enable 4K UAR only when page size is bigger than 4K When the page size isn't bigger than 4K, there is no added value of enabling 4K UAR feature in the Firmware. Modified the condition of enabling the 4K UAR accordingly. Fixes: f502d834950a ("net/mlx5: Activate support for 4K UARs") Signed-off-by: Majd Dibbiny Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 53acd76ce571e3b71f9205f2d49ab285a9f1aad8 Author: Tal Gilboa Date: Mon May 29 17:02:55 2017 +0300 net/mlx5e: Fix wrong indications in DIM due to counter wraparound DIM (Dynamically-tuned Interrupt Moderation) is a mechanism designed for changing the channel interrupt moderation values in order to reduce CPU overhead for all traffic types. Each iteration of the algorithm, DIM calculates the difference in throughput, packet rate and interrupt rate from last iteration in order to make a decision. DIM relies on counters for each metric. When these counters get to their type's max value they wraparound. In this case the delta between 'end' and 'start' samples is negative and when translated to unsigned integers - very high. This results in a false indication to the algorithm and might result in a wrong decision. The fix calculates the 'distance' between 'end' and 'start' samples in a cyclic way around the relevant type's max value. It can also be viewed as an absolute value around the type's max value instead of around 0. Testing show higher stability in DIM profile selection and no wraparound issues. Fixes: cb3c7fd4f839 ("net/mlx5e: Support adaptive RX coalescing") Signed-off-by: Tal Gilboa Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 8 ++++---- drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c | 10 +++++++--- 2 files changed, 11 insertions(+), 7 deletions(-) commit c3164d2fc48fd4fa0477ab658b644559c3fe9073 Author: Tal Gilboa Date: Mon May 15 14:13:16 2017 +0300 net/mlx5e: Added BW check for DIM decision mechanism DIM (Dynamically-tuned Interrupt Moderation) is a mechanism designed for changing the channel interrupt moderation values in order to reduce CPU overhead for all traffic types. Until now only interrupt and packet rate were sampled. We found a scenario on which we get a false indication since a change in DIM caused more aggregation and reduced packet rate while increasing BW. We now regard a change as succesfull iff: current_BW > (prev_BW + threshold) or current_BW ~= prev_BW and current_PR > (prev_PR + threshold) or current_BW ~= prev_BW and current_PR ~= prev_PR and current_IR < (prev_IR - threshold) Where BW = Bandwidth, PR = Packet rate and IR = Interrupt rate Improvements (ConnectX-4Lx 25GbE, single RX queue, LRO off) -------------------------------------------------- packet size | before[Mb/s] | after[Mb/s] | gain | 2B | 343.4 | 359.4 | 4.5% | 16B | 2739.7 | 2814.8 | 2.7% | 64B | 9739 | 10185.3 | 4.5% | Fixes: cb3c7fd4f839 ("net/mlx5e: Support adaptive RX coalescing") Signed-off-by: Tal Gilboa Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c | 37 ++++++++++++---------- 2 files changed, 22 insertions(+), 17 deletions(-) commit f729860a177d097ac44321fb2f7d927a0c54c5a3 Author: Huy Nguyen Date: Mon May 8 11:46:50 2017 -0500 net/mlx5: Remove several module events out of ethtool stats Remove the following module event counters out of ethtool stats. The reason for removing these event counters is that these events do not occur without techinician's intervention. module_pwr_budget_exd module_long_range module_no_eeprom module_enforce_part module_unknown_id module_unknown_status module_plug Fixes: bedb7c909c19 ("net/mlx5e: Add port module event counters to ethtool stats") Signed-off-by: Huy Nguyen Reviewed by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 3fece5d676939f42f434c63dfe1bd42d7d94e6f0 Author: Mohamad Haj Yahia Date: Sun Apr 9 17:19:37 2017 +0300 net/mlx5: Continue health polling until it is explicitly stopped The issue is that when we get an assert we will stop polling the health and thus we cant enter error state when we have a real health issue. Fixes: fd76ee4da55a ('net/mlx5_core: Fix internal error detection conditions') Signed-off-by: Mohamad Haj Yahia Reviewed-by: Daniel Jurgens Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/health.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 57f35c93a2072c1f66ab1728a77a9ee4bc33bf42 Author: Mohamad Haj Yahia Date: Thu May 25 16:46:14 2017 +0300 net/mlx5: Fix create vport flow table flow Send vport number to the create flow table inner method instead of ignoring the vport argument and sending always 0. Fixes: b3ba51498bdd ('net/mlx5: Refactor create flow table method to accept underlay QP') Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 252d2a4117bc181b287eeddf848863788da733ae Author: Andy Lutomirski Date: Fri Jun 9 11:49:15 2017 -0700 sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off() idle_task_exit() can be called with IRQs on x86 on and therefore should use switch_mm(), not switch_mm_irqs_off(). This doesn't seem to cause any problems right now, but it will confuse my upcoming TLB flush changes. Nonetheless, I think it should be backported because it's trivial. There won't be any meaningful performance impact because idle_task_exit() is only used when offlining a CPU. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: stable@vger.kernel.org Fixes: f98db6013c55 ("sched/core: Add switch_mm_irqs_off() and use it in the scheduler") Link: http://lkml.kernel.org/r/ca3d1a9fa93a0b49f5a8ff729eda3640fb6abdf9.1497034141.git.luto@kernel.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f67abed585efe251edda52dc9690020d6441890f Author: Marcin Nowakowski Date: Fri Jun 9 10:00:29 2017 +0200 sched/fair: Fix typo in printk message 'schedstats' kernel parameter should be set to enable/disable, so correct the printk hint saying that it should be set to 'enable' rather than 'enabled' to enable scheduler tracepoints. Signed-off-by: Marcin Nowakowski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1496995229-31245-1-git-send-email-marcin.nowakowski@imgtec.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bc1f09f6fa76fdf31eb7d6a4a4df43574725f93 Author: Wanpeng Li Date: Thu Jun 8 20:13:40 2017 -0700 KVM: async_pf: avoid async pf injection when in guest mode INFO: task gnome-terminal-:1734 blocked for more than 120 seconds. Not tainted 4.12.0-rc4+ #8 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. gnome-terminal- D 0 1734 1015 0x00000000 Call Trace: __schedule+0x3cd/0xb30 schedule+0x40/0x90 kvm_async_pf_task_wait+0x1cc/0x270 ? __vfs_read+0x37/0x150 ? prepare_to_swait+0x22/0x70 do_async_page_fault+0x77/0xb0 ? do_async_page_fault+0x77/0xb0 async_page_fault+0x28/0x30 This is triggered by running both win7 and win2016 on L1 KVM simultaneously, and then gives stress to memory on L1, I can observed this hang on L1 when at least ~70% swap area is occupied on L0. This is due to async pf was injected to L2 which should be injected to L1, L2 guest starts receiving pagefault w/ bogus %cr2(apf token from the host actually), and L1 guest starts accumulating tasks stuck in D state in kvm_async_pf_task_wait() since missing PAGE_READY async_pfs. This patch fixes the hang by doing async pf when executing L1 guest. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: stable@vger.kernel.org Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 7 +++++-- arch/x86/kvm/mmu.h | 1 + arch/x86/kvm/x86.c | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) commit 4d801cca0bb7011699c2d29f0139902dcfb3482d Author: Guenter Roeck Date: Tue May 2 20:44:16 2017 -0700 hexagon: Use raw_copy_to_user Commit ac4691fac8ad ("hexagon: switch to RAW_COPY_USER") replaced __copy_to_user_hexagon() with raw_copy_to_user(), but did not catch all callers, resulting in the following build error. arch/hexagon/mm/uaccess.c: In function '__clear_user_hexagon': arch/hexagon/mm/uaccess.c:40:3: error: implicit declaration of function '__copy_to_user_hexagon' Fixes: ac4691fac8ad ("hexagon: switch to RAW_COPY_USER") Cc: Al Viro Acked-by: Al Viro Acked-by: Richard Kuo Signed-off-by: Guenter Roeck arch/hexagon/mm/uaccess.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b87fa0fafef4b16495740432f4eb8262efa500d0 Merge: 343eba6 a704bb5 Author: David S. Miller Date: Sat Jun 10 18:22:56 2017 -0400 Merge branch 'mvpp2-fixes' Thomas Petazzoni says: ==================== net: mvpp2: driver fixes As requested, here is a series of patches containing only bug fixes for the mvpp2 driver. It is based on the latest "net" branch. Changes since v1: - Fixed a build breakage that occurred when only PATCH 1 was only, and not later patches in the series. Was reported by the kbuild report on the first submission. - Added Tested-by from Marc Zyngier on PATCH 2. ==================== Signed-off-by: David S. Miller commit a704bb5c052bbd6b77c6530a2e83cef42486e335 Author: Thomas Petazzoni Date: Sat Jun 10 23:18:22 2017 +0200 net: mvpp2: use {get, put}_cpu() instead of smp_processor_id() smp_processor_id() should not be used in migration-enabled contexts. We originally thought it was OK in the specific situation of this driver, but it was wrong, and calling smp_processor_id() in a migration-enabled context prints a big fat warning when CONFIG_DEBUG_PREEMPT=y. Therefore, this commit replaces the smp_processor_id() in migration-enabled contexts by the appropriate get_cpu/put_cpu sections. Reported-by: Marc Zyngier Fixes: a786841df72e ("net: mvpp2: handle register mapping and access for PPv2.2") Signed-off-by: Thomas Petazzoni Tested-by: Marc Zyngier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit 56b8aae959499508090b2d2db6961ed905f38164 Author: Thomas Petazzoni Date: Sat Jun 10 23:18:21 2017 +0200 net: mvpp2: remove mvpp2_bm_cookie_{build,pool_get} This commit removes the useless remove mvpp2_bm_cookie_{build,pool_get} functions. All what mvpp2_bm_cookie_build() was doing is compute a 32-bit value by concatenating the pool number and the CPU number... only to get the pool number re-extracted by mvpp2_bm_cookie_pool_get() later on. Instead, just get the pool number directly from RX descriptor status, and pass it to mvpp2_pool_refill() and mvpp2_rx_refill(). This has the added benefit of dropping a smp_processor_id() call in a migration-enabled context, which is wrong, and is the original motivation for making this change. Fixes: 3f518509dedc9 ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 47 +++++++++++------------------------- 1 file changed, 14 insertions(+), 33 deletions(-) commit 343eba69c6968190d8654b857aea952fed9a6749 Author: Jia-Ju Bai Date: Sat Jun 10 17:03:35 2017 +0800 net: tipc: Fix a sleep-in-atomic bug in tipc_msg_reverse The kernel may sleep under a rcu read lock in tipc_msg_reverse, and the function call path is: tipc_l2_rcv_msg (acquire the lock by rcu_read_lock) tipc_rcv tipc_sk_rcv tipc_msg_reverse pskb_expand_head(GFP_KERNEL) --> may sleep tipc_node_broadcast tipc_node_xmit_skb tipc_node_xmit tipc_sk_rcv tipc_msg_reverse pskb_expand_head(GFP_KERNEL) --> may sleep To fix it, "GFP_KERNEL" is replaced with "GFP_ATOMIC". Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller net/tipc/msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f146e872eb12ebbe92d8e583b2637e0741440db3 Author: Jia-Ju Bai Date: Sat Jun 10 16:49:39 2017 +0800 net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx The kernel may sleep under a rcu read lock in cfpkt_create_pfx, and the function call path is: cfcnfg_linkup_rsp (acquire the lock by rcu_read_lock) cfctrl_linkdown_req cfpkt_create cfpkt_create_pfx alloc_skb(GFP_KERNEL) --> may sleep cfserl_receive (acquire the lock by rcu_read_lock) cfpkt_split cfpkt_create_pfx alloc_skb(GFP_KERNEL) --> may sleep There is "in_interrupt" in cfpkt_create_pfx to decide use "GFP_KERNEL" or "GFP_ATOMIC". In this situation, "GFP_KERNEL" is used because the function is called under a rcu read lock, instead in interrupt. To fix it, only "GFP_ATOMIC" is used in cfpkt_create_pfx. Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller net/caif/cfpkt_skbuff.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 5aa32f53ab93175442dffbd95a231d0798cab4d1 Author: David S. Miller Date: Sat Jun 10 16:44:28 2017 -0400 Revert "net: fec: Add a fec_enet_clear_ethtool_stats() stub for CONFIG_M5272" This reverts commit bf292f1b2c813f1d6ac49b04bd1a9863d8314266. It belongs in 'net-next' not 'net'. Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 4 ---- 1 file changed, 4 deletions(-) commit 581409dacc9176b0de1f6c4ca8d66e13aa8e1b29 Author: Xin Long Date: Sat Jun 10 14:48:14 2017 +0800 sctp: disable BH in sctp_for_each_endpoint Now sctp holds read_lock when foreach sctp_ep_hashtable without disabling BH. If CPU schedules to another thread A at this moment, the thread A may be trying to hold the write_lock with disabling BH. As BH is disabled and CPU cannot schedule back to the thread holding the read_lock, while the thread A keeps waiting for the read_lock. A dead lock would be triggered by this. This patch is to fix this dead lock by calling read_lock_bh instead to disable BH when holding the read_lock in sctp_for_each_endpoint. Fixes: 626d16f50f39 ("sctp: export some apis or variables for sctp_diag and reuse some for proc") Reported-by: Xiumei Mu Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bf292f1b2c813f1d6ac49b04bd1a9863d8314266 Author: Fabio Estevam Date: Fri Jun 9 22:37:22 2017 -0300 net: fec: Add a fec_enet_clear_ethtool_stats() stub for CONFIG_M5272 Commit 2b30842b23b9 ("net: fec: Clear and enable MIB counters on imx51") introduced fec_enet_clear_ethtool_stats(), but missed to add a stub for the CONFIG_M5272=y case, causing build failure for the m5272c3_defconfig. Add the missing empty stub to fix the build failure. Reported-by: Paul Gortmaker Signed-off-by: Fabio Estevam Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9b3dc0a17d7388c4fb83736ca45253a93e994ce4 Author: Dominik Heidler Date: Fri Jun 9 16:29:47 2017 +0200 l2tp: cast l2tp traffic counter to unsigned This fixes a counter problem on 32bit systems: When the rx_bytes counter reached 2 GiB, it jumpd to (2^64 Bytes - 2GiB) Bytes. rtnl_link_stats64 has __u64 type and atomic_long_read returns atomic_long_t which is signed. Due to the conversation we get an incorrect value on 32bit systems if the MSB of the atomic_long_t value is set. CC: Tom Parkin Fixes: 7b7c0719cd7a ("l2tp: avoid deadlock in l2tp stats update") Signed-off-by: Dominik Heidler Signed-off-by: David S. Miller net/l2tp/l2tp_eth.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit d8dba51de5dfb55225b169653bbd7379ac0d0c63 Author: Philippe Reynes Date: Fri Jun 9 23:50:57 2017 +0200 net: aquantia: atlantic: remove declaration of hw_atl_utils_hw_set_power This function is not defined, so no need to declare it. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h | 3 --- 1 file changed, 3 deletions(-) commit d9a8d6a1023bb82ceadbd65f7cc54beb747fbfec Merge: f6d4c71 3523882 Author: David S. Miller Date: Sat Jun 10 16:02:56 2017 -0400 Merge branch 'bnx2x-Fix-malicious-VFs-indication' Yuval Mintz says: ==================== bnx2x: Fix malicious VFs indication It was discovered that for a VF there's a simple [yet uncommon] scenario which would cause device firmware to declare that VF as malicious - Add a vlan interface on top of a VF and disable txvlan offloading for that VF [causing VF to transmit packets where vlan is on payload]. Patch #1 corrects driver transmission to prevent this issue. Patch #2 is a by-product correcting PF behavior once a VF is declared malicious. ==================== Signed-off-by: David S. Miller commit 3523882229b903e967de05665b871dab87c5df0f Author: Mintz, Yuval Date: Fri Jun 9 17:17:02 2017 +0300 bnx2x: Don't post statistics to malicious VFs Once firmware indicates that a given VF is malicious and until that VF passes an FLR all bets are off - PF can't know anything is happening to the VF [since VF can't communicate anything to its PF]. But PF is currently still periodically asking device to collect statistics for the VF which might in turn fill logs by IOMMU blocking memory access done by the VF's PCI function [in the case VF has unmapped its buffers]. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 13 ++++++++++++- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) commit 92f85f05caa51d844af6ea14ffbc7a786446a644 Author: Mintz, Yuval Date: Fri Jun 9 17:17:01 2017 +0300 bnx2x: Allow vfs to disable txvlan offload VF clients are configured as enforced, meaning firmware is validating the correctness of their ethertype/vid during transmission. Once txvlan is disabled, VF would start getting SKBs for transmission here vlan is on the payload - but it'll pass the packet's ethertype instead of the vid, leading to firmware declaring it as malicious. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 5faab9e0f03c4eef97886b45436015e107f79f5f Merge: 66cea28 67a7001 Author: Linus Torvalds Date: Sat Jun 10 11:09:23 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull UFS fixes from Al Viro: "This is just the obvious backport fodder; I'm pretty sure that there will be more - definitely so wrt performance and quite possibly correctness as well" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: ufs: we need to sync inode before freeing it excessive checks in ufs_write_failed() and ufs_evict_inode() ufs_getfrag_block(): we only grab ->truncate_mutex on block creation path ufs_extend_tail(): fix the braino in calling conventions of ufs_new_fragments() ufs: set correct ->s_maxsize ufs: restore maintaining ->i_blocks fix ufs_isblockset() ufs: restore proper tail allocation commit 66cea28a947739343ba3f804641de5cdf388cffa Merge: ac1a14a 70e7af2 Author: Linus Torvalds Date: Sat Jun 10 11:06:05 2017 -0700 Merge branch 'for-linus-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes from Chris Mason: "Some fixes that Dave Sterba collected. We've been hitting an early enospc problem on production machines that Omar tracked down to an old int->u64 mistake. I waited a bit on this pull to make sure it was really the problem from production, but it's on ~2100 hosts now and I think we're good. Omar also noticed a commit in the queue would make new early ENOSPC problems. I pulled that out for now, which is why the top three commits are younger than the rest. Otherwise these are all fixes, some explaining very old bugs that we've been poking at for a while" * 'for-linus-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: fix delalloc accounting leak caused by u32 overflow Btrfs: clear EXTENT_DEFRAG bits in finish_ordered_io btrfs: tree-log.c: Wrong printk information about namelen btrfs: fix race with relocation recovery and fs_root setup btrfs: fix memory leak in update_space_info failure path btrfs: use correct types for page indices in btrfs_page_exists_in_range btrfs: fix incorrect error return ret being passed to mapping_set_error btrfs: Make flush bios explicitely sync btrfs: fiemap: Cache and merge fiemap extent before submit it to user commit ac1a14a239bb1a871dbd20daea4946aa5d289a1d Merge: 45b44f0 5b0bc9a Author: Linus Torvalds Date: Sat Jun 10 10:51:25 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Misc fixes: a Geode fix plus a microcode loader fix" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode/intel: Clear patch pointer before jettisoning the initrd x86/cpu/cyrix: Add alternative Device ID of Geode GX1 SoC commit 45b44f0f287d6d396b78466e13be1d1ea3d3097b Merge: 6b7ed45 40da1b1 Author: Linus Torvalds Date: Sat Jun 10 10:49:42 2017 -0700 Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull CPU hotplug fix from Ingo Molnar: "An error handling corner case fix" * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Drop the device lock on error commit 6b7ed4588ce681222534f901ce825d1ead31882a Merge: f701d86 8affb06 Author: Linus Torvalds Date: Sat Jun 10 10:22:35 2017 -0700 Merge branch 'rcu-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RCU fixes from Ingo Molnar: "Fix an SRCU bug affecting KVM IRQ injection" * 'rcu-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: srcu: Allow use of Classic SRCU from both process and interrupt context srcu: Allow use of Tiny/Tree SRCU from both process and interrupt context commit f701d860af381265639244fb84b07797fbb5efca Merge: 9376906 47c1ded Author: Linus Torvalds Date: Sat Jun 10 10:15:47 2017 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "This is mostly tooling fixes, plus an instruction pointer filtering fix. It's more fixes than usual - Arnaldo got back from a longer vacation and there was a backlog" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits) perf symbols: Kill dso__build_id_is_kmod() perf symbols: Keep DSO->symtab_type after decompress perf tests: Decompress kernel module before objdump perf tools: Consolidate error path in __open_dso() perf tools: Decompress kernel module when reading DSO data perf annotate: Use dso__decompress_kmodule_path() perf tools: Introduce dso__decompress_kmodule_{fd,path} perf tools: Fix a memory leak in __open_dso() perf annotate: Fix symbolic link of build-id cache perf/core: Drop kernel samples even though :u is specified perf script python: Remove dups in documentation examples perf script python: Updated trace_unhandled() signature perf script python: Fix wrong code snippets in documentation perf script: Fix documentation errors perf script: Fix outdated comment for perf-trace-python perf probe: Fix examples section of documentation perf report: Ensure the perf DSO mapping matches what libdw sees perf report: Include partial stacks unwound with libdw perf annotate: Add missing powerpc triplet perf test: Disable breakpoint signal tests for powerpc ... commit 9376906c17fa975bf6a7ea9dd124be697bcda289 Merge: 179145e 792ef14 Author: Linus Torvalds Date: Sat Jun 10 10:12:14 2017 -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: "A boot crash fix for certain systems where the kernel would trust a piece of firmware data it should not have" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi: Fix boot panic because of invalid BGRT image address commit 67a70017fa0a152657bc7e337e69bb9c9f5549bf Author: Al Viro Date: Sat Jun 10 12:01:50 2017 -0400 ufs: we need to sync inode before freeing it Signed-off-by: Al Viro fs/ufs/inode.c | 1 + 1 file changed, 1 insertion(+) commit 179145e6312b1ccb1731841360d7fcaf2f4abc7a Merge: c7a1aef d3e01c5 Author: Linus Torvalds Date: Fri Jun 9 22:30:55 2017 -0700 Merge tag 'iommu-fixes-v4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: - another compile-fix for my header cleanup - a couple of fixes for the recently merged IOMMU probe deferal code - fixes for ACPI/IORT code necessary with IOMMU probe deferal * tag 'iommu-fixes-v4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: arm: dma-mapping: Reset the device's dma_ops ACPI/IORT: Move the check to get iommu_ops from translated fwspec ARM: dma-mapping: Don't tear down third-party mappings ACPI/IORT: Ignore all errors except EPROBE_DEFER iommu/of: Ignore all errors except EPROBE_DEFER iommu/of: Fix check for returning EPROBE_DEFER iommu/dma: Fix function declaration commit c7a1aefc47cc17b754180a18f77f508f2f210d2c Merge: 2833b7e a0897d5 Author: Linus Torvalds Date: Fri Jun 9 22:28:33 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - mark "guest" RMI device as pass-through port to avoid "phantom" ALPS toouchpad on newer Lenovo Carbons - add two more laptops to the Elantech's lists of devices using CRC mode * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics-rmi4 - register F03 port as pass-through serio Input: elantech - add Fujitsu Lifebook E546/E557 to force crc_enabled commit 2833b7e913327855c2c0c842c37ca1d90602139e Merge: 42211f6 a415c0f Author: Linus Torvalds Date: Fri Jun 9 22:24:23 2017 -0700 Merge tag 'md/4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD bugfix from Shaohua Li: "One bug fix from Neil Brown for MD. The bug was introduced in this cycle" * tag 'md/4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: md: initialise ->writes_pending in personality modules. commit 42211f6cb6d7c3a39fe9b2892a93e4c065149d5f Merge: 39e4edf 8f9bebc Author: Linus Torvalds Date: Fri Jun 9 22:18:41 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A set of fixes in the area of block IO, that should go into the next -rc release. This contains: - An OOPS fix from Dmitry, fixing a regression with the bio integrity code in this series. - Fix truncation of elevator io context cache name, from Eric Biggers. - NVMe pull from Christoph includes FC fixes from James, APST fixes/tweaks from Kai-Heng, removal fix from Rakesh, and an RDMA fix from Sagi. - Two tweaks for the block throttling code. One from Joseph Qi, fixing an oops from the timer code, and one from Shaohua, improving the behavior on rotatonal storage. - Two blk-mq fixes from Ming, fixing corner cases with the direct issue code. - Locking fix for bfq cgroups from Paolo" * 'for-linus' of git://git.kernel.dk/linux-block: block, bfq: access and cache blkg data only when safe Fix loop device flush before configure v3 blk-throttle: set default latency baseline for harddisk blk-throttle: fix NULL pointer dereference in throtl_schedule_pending_timer nvme: relax APST default max latency to 100ms nvme: only consider exit latency when choosing useful non-op power states nvme-fc: fix missing put reference on controller create failure nvme-fc: on lldd/transport io error, terminate association nvme-rdma: fast fail incoming requests while we reconnect nvme-pci: fix multiple ctrl removal scheduling nvme: fix hang in remove path elevator: fix truncation of icq_cache_name blk-mq: fix direct issue blk-mq: pass correct hctx to blk_mq_try_issue_directly bio-integrity: Do not allocate integrity context for bio w/o data commit 39e4edfdf5016bb28438093d030a0ef90ce2d30a Merge: 6107cc5 ba3021b Author: Linus Torvalds Date: Fri Jun 9 22:15:08 2017 -0700 Merge tag 'sound-4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This update contains a slightly hight amount of changes due to the pending ASoC fixes: - ALSA timer core got a couple of fixes for races between read and ioctl, leading to potential read of uninitialized kmalloced memory - ASoC core fixed the de-registration pattern for use-after-free bug - The rewrite of probe code in ASoC Intel Skylake for i915 component - ASoC R-snd got a series of fixes for SSI - ASoC simple-card, atmel, da7213, and rt286 trivial fixes - HD-audio ALC269 quirk and rearrangement of quirk table" * tag 'sound-4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: timer: Fix missing queue indices reset at SNDRV_TIMER_IOCTL_SELECT ALSA: timer: Fix race between read and ioctl ALSA: hda/realtek - Reorder ALC269 ASUS quirk entries ALSA: hda/realtek: Fix mic and headset jack sense on Asus X705UD ASoC: rsnd: fixup parent_clk_name of AUDIO_CLKOUTx ASoC: Intel: Skylake: Fix to parse consecutive string tkns in manifest ASoC: Intel: Skylake: Fix IPC rx_list corruption ASoC: rsnd: SSI PIO adjust to 24bit mode MAINTAINERS: Update email address for patches to Wolfson parts ASoC: Fix use-after-free at card unregistration ASoC: simple-card: fix mic jack initialization ASoC: rsnd: don't call free_irq() on Parent SSI ASoC: atmel-classd: sync regcache when resuming ASoC: rsnd: don't use PDTA bit for 24bit on SSI ASoC: da7213: Fix incorrect usage of bitwise '&' operator for SRM check rt286: add Thinkpad Helix 2 to force_combo_jack_table ASoC: Intel: Skylake: Move i915 registration to worker thread commit 6107cc58f33c0581d4bbd847ed9145b76e61d57c Merge: eb4125d 6e88007 Author: Linus Torvalds Date: Fri Jun 9 22:12:06 2017 -0700 Merge tag 'drm-fixes-for-v4.12-rc5' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Intel, nouveau, rockchip, vmwgfx, imx, meson, mediatek and core fixes. Bit more spread out fixes this time, fixes for 7 drivers + a couple of core fixes. i915 and vmwgfx are the main ones. The vmwgfx ones fix a bunch of regressions in their atomic rework, and a few fixes destined for stable. i915 has some 4.12 regressions and older things that need to be fixed in stable as well. nouveau also has some runtime pm fixes and a timer list handling fix, otherwise a couple of core and small driver regression fixes" * tag 'drm-fixes-for-v4.12-rc5' of git://people.freedesktop.org/~airlied/linux: (37 commits) drm/i915: fix warning for unused variable drm/meson: Fix driver bind when only CVBS is available drm/i915: Fix 90/270 rotated coordinates for FBC drm/i915: Restore has_fbc=1 for ILK-M drm/i915: Workaround VLV/CHV DSI scanline counter hardware fail drm/i915: Fix logical inversion for gen4 quirking drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally drm/i915: Always recompute watermarks when distrust_bios_wm is set, v2. drm/i915: Prevent the system suspend complete optimization drm/i915/psr: disable psr2 for resolution greater than 32X20 drm/i915: Hold a wakeref for probing the ring registers drm/i915: Short-circuit i915_gem_wait_for_idle() if already idle drm/i915: Disable decoupled MMIO drm/i915/guc: Remove stale comment for q_fail drm/vmwgfx: Bump driver minor and date drm/vmwgfx: Remove unused legacy cursor functions drm/vmwgfx: fix spelling mistake "exeeds" -> "exceeds" drm/vmwgfx: Fix large topology crash drm/vmwgfx: Make sure to update STDU when FB is updated drm/vmwgfx: Make sure backup_handle is always valid ... commit babef37dccbaa49249a22bae9150686815d7be71 Author: Al Viro Date: Fri Jun 9 16:20:34 2017 -0400 excessive checks in ufs_write_failed() and ufs_evict_inode() As it is, short copy in write() to append-only file will fail to truncate the excessive allocated blocks. As the matter of fact, all checks in ufs_truncate_blocks() are either redundant or wrong for that caller. As for the only other caller (ufs_evict_inode()), we only need the file type checks there. Cc: stable@vger.kernel.org Signed-off-by: Al Viro fs/ufs/inode.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 006351ac8ead0d4a67dd3845e3ceffe650a23212 Author: Al Viro Date: Thu Jun 8 23:28:53 2017 -0400 ufs_getfrag_block(): we only grab ->truncate_mutex on block creation path Cc: stable@vger.kernel.org Signed-off-by: Al Viro fs/ufs/inode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 940ef1a0ed939c2ca029fca715e25e7778ce1e34 Author: Al Viro Date: Thu Jun 8 23:27:12 2017 -0400 ufs_extend_tail(): fix the braino in calling conventions of ufs_new_fragments() ... and it really needs splitting into "new" and "extend" cases, but that's for later Cc: stable@vger.kernel.org Signed-off-by: Al Viro fs/ufs/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6b0d144fa758869bdd652c50aa41aaf601232550 Author: Al Viro Date: Thu Jun 8 21:15:45 2017 -0400 ufs: set correct ->s_maxsize Cc: stable@vger.kernel.org Signed-off-by: Al Viro fs/ufs/super.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit eb315d2ae614493fd1ebb026c75a80573d84f7ad Author: Al Viro Date: Thu Jun 8 21:15:03 2017 -0400 ufs: restore maintaining ->i_blocks Cc: stable@vger.kernel.org Signed-off-by: Al Viro fs/stat.c | 1 + fs/ufs/balloc.c | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) commit 414cf7186dbec29bd946c138d6b5c09da5955a08 Author: Al Viro Date: Thu Jun 8 18:15:18 2017 -0400 fix ufs_isblockset() Cc: stable@vger.kernel.org Signed-off-by: Al Viro fs/ufs/util.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 8785d84d002c2ce0f68fbcd6c2c86be859802c7e Author: Al Viro Date: Thu Jun 8 02:42:03 2017 -0400 ufs: restore proper tail allocation Cc: stable@vger.kernel.org Signed-off-by: Al Viro fs/ufs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70e7af244f24c94604ef6eca32ad297632018583 Author: Omar Sandoval Date: Fri Jun 2 01:20:01 2017 -0700 Btrfs: fix delalloc accounting leak caused by u32 overflow btrfs_calc_trans_metadata_size() does an unsigned 32-bit multiplication, which can overflow if num_items >= 4 GB / (nodesize * BTRFS_MAX_LEVEL * 2). For a nodesize of 16kB, this overflow happens at 16k items. Usually, num_items is a small constant passed to btrfs_start_transaction(), but we also use btrfs_calc_trans_metadata_size() for metadata reservations for extent items in btrfs_delalloc_{reserve,release}_metadata(). In drop_outstanding_extents(), num_items is calculated as inode->reserved_extents - inode->outstanding_extents. The difference between these two counters is usually small, but if many delalloc extents are reserved and then the outstanding extents are merged in btrfs_merge_extent_hook(), the difference can become large enough to overflow in btrfs_calc_trans_metadata_size(). The overflow manifests itself as a leak of a multiple of 4 GB in delalloc_block_rsv and the metadata bytes_may_use counter. This in turn can cause early ENOSPC errors. Additionally, these WARN_ONs in extent-tree.c will be hit when unmounting: WARN_ON(fs_info->delalloc_block_rsv.size > 0); WARN_ON(fs_info->delalloc_block_rsv.reserved > 0); WARN_ON(space_info->bytes_pinned > 0 || space_info->bytes_reserved > 0 || space_info->bytes_may_use > 0); Fix it by casting nodesize to a u64 so that btrfs_calc_trans_metadata_size() does a full 64-bit multiplication. While we're here, do the same in btrfs_calc_trunc_metadata_size(); this can't overflow with any existing uses, but it's better to be safe here than have another hard-to-debug problem later on. Cc: stable@vger.kernel.org Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: Chris Mason fs/btrfs/ctree.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 452e62b71fbbefe2646fad3a968371a026936c6d Author: Liu Bo Date: Fri May 26 17:44:23 2017 -0600 Btrfs: clear EXTENT_DEFRAG bits in finish_ordered_io Before this, we use 'filled' mode here, ie. if all range has been filled with EXTENT_DEFRAG bits, get to clear it, but if the defrag range joins the adjacent delalloc range, then we'll have EXTENT_DEFRAG bits in extent_state until releasing this inode's pages, and that prevents extent_data from being freed. This clears the bit if any was found within the ordered extent. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Chris Mason fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 286b92f43c0d0ae2c29a61769b66219fe5ae6701 Author: Su Yue Date: Wed May 24 09:31:32 2017 +0800 btrfs: tree-log.c: Wrong printk information about namelen In verify_dir_item, it wants to printk name_len of dir_item but printk data_len acutally. Fix it by calling btrfs_dir_name_len instead of btrfs_dir_data_len. Signed-off-by: Su Yue Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Chris Mason fs/btrfs/dir-item.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6d4c7133257bb2d6f66723d11b19f1c49cdf2f7 Merge: c7a61cb 97edec3 Author: David S. Miller Date: Fri Jun 9 15:41:57 2017 -0400 Merge tag 'linux-can-fixes-for-4.12-20170609' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2017-06-09 this is a pull request of 6 patches for net/master. There's a patch by Stephane Grosjean that fixes an uninitialized symbol warning in the peak_canfd driver. A patch by Johan Hovold to fix the product-id endianness in an error message in the the peak_usb driver. A patch by Oliver Hartkopp to enable CAN FD for virtual CAN devices by default. Three patches by me, one makes the helper function can_change_state() robust to be called with cf == NULL. The next patch fixes a memory leak in the gs_usb driver. And the last one fixes a lockdep splat by properly initialize the per-net can_rcvlists_lock spin_lock. ==================== Signed-off-by: David S. Miller commit c7a61cba71fd151cc7d9ebe53a090e0e61eeebf3 Author: Johannes Berg Date: Fri Jun 9 21:33:09 2017 +0200 mac80211: free netdev on dev_alloc_name() error The change to remove free_netdev() from ieee80211_if_free() erroneously didn't add the necessary free_netdev() for when ieee80211_if_free() is called directly in one place, rather than as the priv_destructor. Add the missing call. Fixes: cf124db566e6 ("net: Fix inconsistent teardown and release of private netdev state.") Signed-off-by: Johannes Berg Signed-off-by: David S. Miller net/mac80211/iface.c | 1 + 1 file changed, 1 insertion(+) commit 773fc8f6e8d63ec9d840588e161cbb73a01cfc45 Author: ashwanth@codeaurora.org Date: Fri Jun 9 14:24:58 2017 +0530 net: rps: send out pending IPI's on CPU hotplug IPI's from the victim cpu are not handled in dev_cpu_callback. So these pending IPI's would be sent to the remote cpu only when NET_RX is scheduled on the victim cpu and since this trigger is unpredictable it would result in packet latencies on the remote cpu. This patch add support to send the pending ipi's of victim cpu. Signed-off-by: Ashwanth Goli Signed-off-by: David S. Miller net/core/dev.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) commit eb4125dfdb1f64a5e41da8315bff48f67e5d1712 Merge: a92f63c 753c09b Author: Linus Torvalds Date: Fri Jun 9 09:59:51 2017 -0700 Merge tag 'for-linus-4.12b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fix from Juergen Gross: "A fix for Xen on ARM when dealing with 64kB page size of a guest" * tag 'for-linus-4.12b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/privcmd: Support correctly 64KB page granularity when mapping memory commit a0897d5f2c2d884d20840c82aea517e8a7801441 Author: Dmitry Torokhov Date: Tue Jun 6 13:05:03 2017 -0700 Input: synaptics-rmi4 - register F03 port as pass-through serio The 5th generation Thinkpad X1 Carbons use Synaptics touchpads accessible over SMBus/RMI, combined with ALPS or Elantech trackpoint devices instead of classic IBM/Lenovo trackpoints. Unfortunately there is no way for ALPS driver to detect whether it is dealing with touchpad + trackpoint combination or just a trackpoint, so we end up with a "phantom" dualpoint ALPS device in addition to real touchpad and trackpoint. Given that we do not have any special advanced handling for ALPS or Elantech trackpoints (unlike IBM trackpoints that have separate driver and a host of options) we are better off keeping the trackpoints in PS/2 emulation mode. We achieve that by setting serio type to SERIO_PS_PSTHRU, which will limit number of protocols psmouse driver will try. In addition to getting rid of the "phantom" touchpads, this will also speed up probing of F03 pass-through port. Reported-by: Damjan Georgievski Suggested-by: Benjamin Tissoires Acked-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_f03.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a92f63cd13776e35d3ccb63187d1d95ab16f24a5 Merge: 788a73f c6ee9619 Author: Linus Torvalds Date: Fri Jun 9 09:44:46 2017 -0700 Merge tag 'powerpc-4.12-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Mostly fairly minor, of note are: - Fix percpu allocations to be NUMA aware - Limit 4k page size config to 64TB virtual address space - Avoid needlessly restoring FP and vector registers Thanks to Aneesh Kumar K.V, Breno Leitao, Christophe Leroy, Frederic Barrat, Madhavan Srinivasan, Michael Bringmann, Nicholas Piggin, Vaibhav Jain" * tag 'powerpc-4.12-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/book3s64: Move PPC_DT_CPU_FTRs and enable it by default powerpc/mm/4k: Limit 4k page size config to 64TB virtual address space cxl: Fix error path on bad ioctl powerpc/perf: Fix Power9 test_adder fields powerpc/numa: Fix percpu allocations to be NUMA aware cxl: Avoid double free_irq() for psl,slice interrupts powerpc/kernel: Initialize load_tm on task creation powerpc/kernel: Fix FP and vector register restoration powerpc/64: Reclaim CPU_FTR_SUBCORE powerpc/hotplug-mem: Fix missing endian conversion of aa_index powerpc/sysdev/simple_gpio: Fix oops in gpio save_regs function powerpc/spufs: Fix coredump of SPU contexts powerpc/64s: Add dt_cpu_ftrs boot time setup option commit 788a73f4e5c8f606a500a6c3fa35c6d9b2cd9979 Merge: 0d22df9 151d1d7 Author: Linus Torvalds Date: Fri Jun 9 09:40:08 2017 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "Been sitting on these for a couple of weeks waiting on some larger batches to come in but it's been pretty quiet. Just your garden variety fixes here: - A few maintainers updates (ep93xx, Exynos, TI, Marvell) - Some PM fixes for Atmel/at91 and Marvell - A few DT fixes for Marvell, Versatile, TI Keystone, bcm283x - A reset driver patch to set module license for symbol access" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: MAINTAINERS: EP93XX: Update maintainership MAINTAINERS: remove kernel@stlinux.com obsolete mailing list ARM: dts: versatile: use #include "..." to include local DT MAINTAINERS: add device-tree files to TI DaVinci entry ARM: at91: select CONFIG_ARM_CPU_SUSPEND ARM: dts: keystone-k2l: fix broken Ethernet due to disabled OSR arm64: defconfig: enable some core options for 64bit Rockchip socs arm64: marvell: dts: fix interrupts in 7k/8k crypto nodes reset: hi6220: Set module license so that it can be loaded MAINTAINERS: add irqchip related drivers to Marvell EBU maintainers MAINTAINERS: sort F entries for Marvell EBU maintainers ARM: davinci: PM: Do not free useful resources in normal path in 'davinci_pm_init' ARM: davinci: PM: Free resources in error handling path in 'davinci_pm_init' ARM: dts: bcm283x: Reserve first page for firmware memory: atmel-ebi: mark PM ops as __maybe_unused MAINTAINERS: Remove Javier Martinez Canillas as reviewer for Exynos commit 33d4c4821323729b463e45d0b2d32f6a87dcba5b Author: Mario Molitor Date: Thu Jun 8 23:03:09 2017 +0200 stmmac: fix for hw timestamp of GMAC3 unit 1.) Bugfix of function stmmac_get_tx_hwtstamp. Corrected the tx timestamp available check (same as 4.8 and older) Change printout from info syslevel to debug. 2.) Bugfix of function stmmac_get_rx_hwtstamp. Corrected the rx timestamp available check (same as 4.8 and older) Change printout from info syslevel to debug. Fixes: ba1ffd74df74 ("stmmac: fix PTP support for GMAC4") Signed-off-by: Mario Molitor Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 11 +++++++---- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 10 +++++----- 2 files changed, 12 insertions(+), 9 deletions(-) commit fd6720aefde06eacf17404eed2cad65c6ec103e1 Author: Mario Molitor Date: Thu Jun 8 22:41:02 2017 +0200 stmmac: fix ptp header for GMAC3 hw timestamp According the CYCLON V documention only the bit 16 of snaptypesel should set. (more information see Table 17-20 (cv_5v4.pdf) : Timestamp Snapshot Dependency on Register Bits) Fixes: d2042052a0aa ("stmmac: update the PTP header file") Signed-off-by: Mario Molitor Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 15 ++++++++++++--- drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h | 3 ++- 2 files changed, 14 insertions(+), 4 deletions(-) commit ff85a1a80e00349dc7783c8dc4d6233d9a709283 Author: Borislav Petkov Date: Sun May 21 11:44:47 2017 +0200 kconfig: Check for libncurses before menuconfig There is a check and a nice user-friendly message when the curses library is not present on the system and the user wants to do "make menuconfig". It doesn't get issued, though. Instead, we fail the build when mconf.c doesn't find the curses.h header: HOSTCC scripts/kconfig/mconf.o In file included from scripts/kconfig/mconf.c:23:0: scripts/kconfig/lxdialog/dialog.h:38:20: fatal error: curses.h: No such file or directory #include CURSES_LOC ^ compilation terminated. Make that check a prerequisite to mconf so that the user sees the error message instead: $ make menuconfig *** Unable to find the ncurses libraries or the *** required header files. *** 'make menuconfig' requires the ncurses libraries. *** *** Install ncurses (ncurses-devel) and try again. *** scripts/kconfig/Makefile:203: recipe for target 'scripts/kconfig/dochecklxdialog' failed make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1 Makefile:548: recipe for target 'menuconfig' failed make: *** [menuconfig] Error 2 Signed-off-by: Borislav Petkov Signed-off-by: Masahiro Yamada scripts/kconfig/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f186ce61bb8235d80068c390dc2aad7ca427a4c2 Author: Krister Johansen Date: Thu Jun 8 13:12:38 2017 -0700 Fix an intermittent pr_emerg warning about lo becoming free. It looks like this: Message from syslogd@flamingo at Apr 26 00:45:00 ... kernel:unregister_netdevice: waiting for lo to become free. Usage count = 4 They seem to coincide with net namespace teardown. The message is emitted by netdev_wait_allrefs(). Forced a kdump in netdev_run_todo, but found that the refcount on the lo device was already 0 at the time we got to the panic. Used bcc to check the blocking in netdev_run_todo. The only places where we're off cpu there are in the rcu_barrier() and msleep() calls. That behavior is expected. The msleep time coincides with the amount of time we spend waiting for the refcount to reach zero; the rcu_barrier() wait times are not excessive. After looking through the list of callbacks that the netdevice notifiers invoke in this path, it appears that the dst_dev_event is the most interesting. The dst_ifdown path places a hold on the loopback_dev as part of releasing the dev associated with the original dst cache entry. Most of our notifier callbacks are straight-forward, but this one a) looks complex, and b) places a hold on the network interface in question. I constructed a new bcc script that watches various events in the liftime of a dst cache entry. Note that dst_ifdown will take a hold on the loopback device until the invalidated dst entry gets freed. [ __dst_free] on DST: ffff883ccabb7900 IF tap1008300eth0 invoked at 1282115677036183 __dst_free rcu_nocb_kthread kthread ret_from_fork Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/core/dst.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit b9d39d17e4819ca2e69ad1f14acaad12240a1de5 Author: Dan Williams Date: Fri Jun 9 08:50:49 2017 -0700 device-dax: fix 'dax' device filesystem inode destruction crash The inode destruction path for the 'dax' device filesystem incorrectly assumes that the inode was initialized through 'alloc_dax()'. However, if someone attempts to directly mount the dax filesystem with 'mount -t dax dax mnt' that will bypass 'alloc_dax()' and the following failure signatures may occur as a result: kill_dax() must be called before final iput() WARNING: CPU: 2 PID: 1188 at drivers/dax/super.c:243 dax_destroy_inode+0x48/0x50 RIP: 0010:dax_destroy_inode+0x48/0x50 Call Trace: destroy_inode+0x3b/0x60 evict+0x139/0x1c0 iput+0x1f9/0x2d0 dentry_unlink_inode+0xc3/0x160 __dentry_kill+0xcf/0x180 ? dput+0x37/0x3b0 dput+0x3a3/0x3b0 do_one_tree+0x36/0x40 shrink_dcache_for_umount+0x2d/0x90 generic_shutdown_super+0x1f/0x120 kill_anon_super+0x12/0x20 deactivate_locked_super+0x43/0x70 deactivate_super+0x4e/0x60 general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC RIP: 0010:kfree+0x6d/0x290 Call Trace: dax_i_callback+0x22/0x60 ? dax_destroy_inode+0x50/0x50 rcu_process_callbacks+0x298/0x740 ida_remove called for id=0 which is not allocated. WARNING: CPU: 0 PID: 0 at lib/idr.c:383 ida_remove+0x110/0x120 [..] Call Trace: ida_simple_remove+0x2b/0x50 ? dax_destroy_inode+0x50/0x50 dax_i_callback+0x3c/0x60 rcu_process_callbacks+0x298/0x740 Add missing initialization of the 'struct dax_device' and inode so that the destruction path does not kfree() or ida_simple_remove() uninitialized data. Fixes: 7b6be8444e0f ("dax: refactor dax-fs into a generic provider of 'struct dax_device' instances") Reported-by: Sasha Levin Signed-off-by: Dan Williams drivers/dax/super.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit defbcf2decc903a28d8398aa477b6881e711e3ea Author: Mateusz Jurczyk Date: Thu Jun 8 11:13:36 2017 +0200 af_unix: Add sockaddr length checks before accessing sa_family in bind and connect handlers Verify that the caller-provided sockaddr structure is large enough to contain the sa_family field, before accessing it in bind() and connect() handlers of the AF_UNIX socket. Since neither syscall enforces a minimum size of the corresponding memory region, very short sockaddrs (zero or one byte long) result in operating on uninitialized memory while referencing .sa_family. Signed-off-by: Mateusz Jurczyk Signed-off-by: David S. Miller net/unix/af_unix.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit fc5b775da468e359154795afeb27be79b509b76d Author: Joe Perches Date: Fri Jun 9 15:45:32 2017 +0200 net: phy: add missing SPEED_14000 Fixes: 0d7e2d2166f6 ("IB/ipoib: add get_link_ksettings in ethtool") Signed-off-by: Joe Perches Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller drivers/net/phy/phy.c | 2 ++ 1 file changed, 2 insertions(+) commit f50b878fed33e360d01dcdc31a8eeb1815d033d5 Author: Alan Stern Date: Thu Jun 8 13:55:59 2017 -0400 USB: gadget: fix GPF in gadgetfs A NULL-pointer dereference bug in gadgetfs was uncovered by syzkaller: > kasan: GPF could be caused by NULL-ptr deref or user memory access > general protection fault: 0000 [#1] SMP KASAN > Dumping ftrace buffer: > (ftrace buffer empty) > Modules linked in: > CPU: 2 PID: 4820 Comm: syz-executor0 Not tainted 4.12.0-rc4+ #5 > Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 > task: ffff880039542dc0 task.stack: ffff88003bdd0000 > RIP: 0010:__list_del_entry_valid+0x7e/0x170 lib/list_debug.c:51 > RSP: 0018:ffff88003bdd6e50 EFLAGS: 00010246 > RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000010000 > RDX: 0000000000000000 RSI: ffffffff86504948 RDI: ffffffff86504950 > RBP: ffff88003bdd6e68 R08: ffff880039542dc0 R09: ffffffff8778ce00 > R10: ffff88003bdd6e68 R11: dffffc0000000000 R12: 0000000000000000 > R13: dffffc0000000000 R14: 1ffff100077badd2 R15: ffffffff864d2e40 > FS: 0000000000000000(0000) GS:ffff88006dc00000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 000000002014aff9 CR3: 0000000006022000 CR4: 00000000000006e0 > Call Trace: > __list_del_entry include/linux/list.h:116 [inline] > list_del include/linux/list.h:124 [inline] > usb_gadget_unregister_driver+0x166/0x4c0 drivers/usb/gadget/udc/core.c:1387 > dev_release+0x80/0x160 drivers/usb/gadget/legacy/inode.c:1187 > __fput+0x332/0x7f0 fs/file_table.c:209 > ____fput+0x15/0x20 fs/file_table.c:245 > task_work_run+0x19b/0x270 kernel/task_work.c:116 > exit_task_work include/linux/task_work.h:21 [inline] > do_exit+0x18a3/0x2820 kernel/exit.c:878 > do_group_exit+0x149/0x420 kernel/exit.c:982 > get_signal+0x77f/0x1780 kernel/signal.c:2318 > do_signal+0xd2/0x2130 arch/x86/kernel/signal.c:808 > exit_to_usermode_loop+0x1a7/0x240 arch/x86/entry/common.c:157 > prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline] > syscall_return_slowpath+0x3ba/0x410 arch/x86/entry/common.c:263 > entry_SYSCALL_64_fastpath+0xbc/0xbe > RIP: 0033:0x4461f9 > RSP: 002b:00007fdac2b1ecf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca > RAX: fffffffffffffe00 RBX: 00000000007080c8 RCX: 00000000004461f9 > RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007080c8 > RBP: 00000000007080a8 R08: 0000000000000000 R09: 0000000000000000 > R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 > R13: 0000000000000000 R14: 00007fdac2b1f9c0 R15: 00007fdac2b1f700 > Code: 00 00 00 00 ad de 49 39 c4 74 6a 48 b8 00 02 00 00 00 00 ad de > 48 89 da 48 39 c3 74 74 48 c1 ea 03 48 b8 00 00 00 00 00 fc ff df <80> > 3c 02 00 0f 85 92 00 00 00 48 8b 13 48 39 f2 75 66 49 8d 7c > RIP: __list_del_entry_valid+0x7e/0x170 lib/list_debug.c:51 RSP: ffff88003bdd6e50 > ---[ end trace 30e94b1eec4831c8 ]--- > Kernel panic - not syncing: Fatal exception The bug was caused by dev_release() failing to turn off its gadget_registered flag after unregistering the gadget driver. As a result, when a later user closed the device file before writing a valid set of descriptors, dev_release() thought the gadget had been registered and tried to unregister it, even though it had not been. This led to the NULL pointer dereference. The fix is simple: turn off the flag when the gadget is unregistered. Signed-off-by: Alan Stern Reported-and-tested-by: Andrey Konovalov CC: Signed-off-by: Felipe Balbi drivers/usb/gadget/legacy/inode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 792ef14df5c585c19b2831673a077504a09e5203 Author: Dave Young Date: Fri Jun 9 08:45:58 2017 +0000 efi: Fix boot panic because of invalid BGRT image address Maniaxx reported a kernel boot crash in the EFI code, which I emulated by using same invalid phys addr in code: BUG: unable to handle kernel paging request at ffffffffff280001 IP: efi_bgrt_init+0xfb/0x153 ... Call Trace: ? bgrt_init+0xbc/0xbc acpi_parse_bgrt+0xe/0x12 acpi_table_parse+0x89/0xb8 acpi_boot_init+0x445/0x4e2 ? acpi_parse_x2apic+0x79/0x79 ? dmi_ignore_irq0_timer_override+0x33/0x33 setup_arch+0xb63/0xc82 ? early_idt_handler_array+0x120/0x120 start_kernel+0xb7/0x443 ? early_idt_handler_array+0x120/0x120 x86_64_start_reservations+0x29/0x2b x86_64_start_kernel+0x154/0x177 secondary_startup_64+0x9f/0x9f There is also a similar bug filed in bugzilla.kernel.org: https://bugzilla.kernel.org/show_bug.cgi?id=195633 The crash is caused by this commit: 7b0a911478c7 efi/x86: Move the EFI BGRT init code to early init code The root cause is the firmware on those machines provides invalid BGRT image addresses. In a kernel before above commit BGRT initializes late and uses ioremap() to map the image address. Ioremap validates the address, if it is not a valid physical address ioremap() just fails and returns. However in current kernel EFI BGRT initializes early and uses early_memremap() which does not validate the image address, and kernel panic happens. According to ACPI spec the BGRT image address should fall into EFI_BOOT_SERVICES_DATA, see the section 5.2.22.4 of below document: http://www.uefi.org/sites/default/files/resources/ACPI_6_1.pdf Fix this issue by validating the image address in efi_bgrt_init(). If the image address does not fall into any EFI_BOOT_SERVICES_DATA areas we just bail out with a warning message. Reported-by: Maniaxx Signed-off-by: Dave Young Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Fixes: 7b0a911478c7 ("efi/x86: Move the EFI BGRT init code to early init code") Link: http://lkml.kernel.org/r/20170609084558.26766-2-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/efi-bgrt.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit 97edec3a11cf6f73f2e45c3035b5ff8e4c3543dd Author: Oliver Hartkopp Date: Fri Jun 2 19:37:30 2017 +0200 can: enable CAN FD for virtual CAN devices by default CAN FD capable CAN interfaces can handle (classic) CAN 2.0 frames too. New users usually fail at their first attempt to explore CAN FD on virtual CAN interfaces due to the current CAN_MTU default. Set the MTU to CANFD_MTU by default to reduce this confusion. If someone *really* needs a 'classic CAN'-only device this can be set with the 'ip' tool with e.g. 'ip link set vcan0 mtu 16' as before. Signed-off-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde drivers/net/can/vcan.c | 2 +- drivers/net/can/vxcan.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 74b7b490886852582d986a33443c2ffa50970169 Author: Marc Kleine-Budde Date: Tue Jun 6 13:53:16 2017 +0200 can: af_can: namespace support: fix lockdep splat: properly initialize spin_lock This patch uses spin_lock_init() instead of __SPIN_LOCK_UNLOCKED() to initialize the per namespace net->can.can_rcvlists_lock lock to fix this lockdep warning: | INFO: trying to register non-static key. | the code is fine but needs lockdep annotation. | turning off the locking correctness validator. | CPU: 0 PID: 186 Comm: candump Not tainted 4.12.0-rc3+ #47 | Hardware name: Marvell Kirkwood (Flattened Device Tree) | [] (unwind_backtrace) from [] (show_stack+0x18/0x1c) | [] (show_stack) from [] (register_lock_class+0x1e4/0x55c) | [] (register_lock_class) from [] (__lock_acquire+0x148/0x1990) | [] (__lock_acquire) from [] (lock_acquire+0x174/0x210) | [] (lock_acquire) from [] (_raw_spin_lock+0x50/0x88) | [] (_raw_spin_lock) from [] (can_rx_register+0x94/0x15c [can]) | [] (can_rx_register [can]) from [] (raw_enable_filters+0x60/0xc0 [can_raw]) | [] (raw_enable_filters [can_raw]) from [] (raw_enable_allfilters+0x2c/0xa0 [can_raw]) | [] (raw_enable_allfilters [can_raw]) from [] (raw_bind+0xb0/0x250 [can_raw]) | [] (raw_bind [can_raw]) from [] (SyS_bind+0x70/0xac) | [] (SyS_bind) from [] (ret_fast_syscall+0x0/0x1c) Cc: Mario Kicherer Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde net/can/af_can.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5cda3ee5138e91ac369ed9d0b55eab0dab077686 Author: Marc Kleine-Budde Date: Sun Jun 4 14:03:42 2017 +0200 can: gs_usb: fix memory leak in gs_cmd_reset() This patch adds the missing kfree() in gs_cmd_reset() to free the memory that is not used anymore after usb_control_msg(). Cc: linux-stable Cc: Maximilian Schneider Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 2 ++ 1 file changed, 2 insertions(+) commit dadcd398b3f059a0aa9de1cac8030a1d5a3791a5 Author: Johan Hovold Date: Fri May 12 12:09:25 2017 +0200 can: peak_usb: fix product-id endianness in error message Make sure to use the USB device product-id stored in host-byte order in a probe error message. Also remove a redundant reassignment of the local usb_dev variable which had already been used to retrieve the product id. Signed-off-by: Johan Hovold Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/peak_usb/pcan_usb_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f2a918b40cea994f9524ace67fd05ef42a8d9e5b Author: Stephane Grosjean Date: Wed May 3 10:35:04 2017 +0200 can: peak_canfd: fix uninitialized symbol warnings This patch fixes two uninitialized symbol warnings in the new code adding support of the PEAK-System PCAN-PCI Express FD boards, in the socket-CAN network protocol family. Signed-off-by: Stephane Grosjean Reported-by: Dan Carpenter Signed-off-by: Marc Kleine-Budde drivers/net/can/peak_canfd/peak_canfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff3416fb5b02cfae94591ef4395b0b4dc793f25e Author: Marc Kleine-Budde Date: Thu May 18 10:22:22 2017 +0200 can: dev: make can_change_state() robust to be called with cf == NULL In OOM situations where no skb can be allocated, can_change_state() may be called with cf == NULL. As this function updates the state and error statistics it's not an option to skip the call to can_change_state() in OOM situations. This patch makes can_change_state() robust, so that it can be called with cf == NULL. Signed-off-by: Marc Kleine-Budde drivers/net/can/dev.c | 3 +++ 1 file changed, 3 insertions(+) commit ed45509b550488f6a71a4b6cc5b12265e8c1f85d Author: Vaibhav Jain Date: Fri Jun 2 22:26:48 2017 +0530 cxl: Avoid double free_irq() for psl,slice interrupts During an eeh call to cxl_remove can result in double free_irq of psl,slice interrupts. This can happen if perst_reloads_same_image == 1 and call to cxl_configure_adapter() fails during slot_reset callback. In such a case we see a kernel oops with following back-trace: Oops: Kernel access of bad area, sig: 11 [#1] Call Trace: free_irq+0x88/0xd0 (unreliable) cxl_unmap_irq+0x20/0x40 [cxl] cxl_native_release_psl_irq+0x78/0xd8 [cxl] pci_deconfigure_afu+0xac/0x110 [cxl] cxl_remove+0x104/0x210 [cxl] pci_device_remove+0x6c/0x110 device_release_driver_internal+0x204/0x2e0 pci_stop_bus_device+0xa0/0xd0 pci_stop_and_remove_bus_device+0x28/0x40 pci_hp_remove_devices+0xb0/0x150 pci_hp_remove_devices+0x68/0x150 eeh_handle_normal_event+0x140/0x580 eeh_handle_event+0x174/0x360 eeh_event_handler+0x1e8/0x1f0 This patch fixes the issue of double free_irq by checking that variables that hold the virqs (err_hwirq, serr_hwirq, psl_virq) are not '0' before un-mapping and resetting these variables to '0' when they are un-mapped. Cc: stable@vger.kernel.org Signed-off-by: Vaibhav Jain Signed-off-by: Greg Kroah-Hartman drivers/misc/cxl/native.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit b7c747d4627462f25b3daabf49c18895a6722faa Author: Alexandre TORGUE Date: Tue May 30 16:43:04 2017 +0200 pinctrl: stm32: Fix bad function call In stm32_pconf_parse_conf function, stm32_pmx_gpio_set_direction is called with wrong parameter value. Indeed, using NULL value for range will raise an oops. Fixes: aceb16dc2da5 ("pinctrl: Add STM32 MCUs support") Reported-by: Dan Carpenter Signed-off-by: Alexandre TORGUE Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba714a9c1dea85e0bf2899d02dfeb9c70040427c Author: Thomas Gleixner Date: Tue May 23 23:23:32 2017 +0200 pinctrl/amd: Use regular interrupt instead of chained The AMD pinctrl driver uses a chained interrupt to demultiplex the GPIO interrupts. Kevin Vandeventer reported, that his new AMD Ryzen locks up hard on boot when the AMD pinctrl driver is initialized. The reason is an interrupt storm. It's not clear whether that's caused by hardware or firmware or both. Using chained interrupts on X86 is a dangerous endavour. If a system is misconfigured or the hardware buggy there is no safety net to catch an interrupt storm. Convert the driver to use a regular interrupt for the demultiplex handler. This allows the interrupt storm detector to catch the malfunction and lets the system boot up. This should be backported to stable because it's likely that more users run into this problem as the AMD Ryzen machines are spreading. Reported-by: Kevin Vandeventer Link: https://bugzilla.suse.com/show_bug.cgi?id=1034261 Signed-off-by: Thomas Gleixner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 91 +++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 50 deletions(-) commit fc7a90686777e7d2da7a08cf0202c21f3b96febb Author: Richard Genoud Date: Thu Jun 1 14:18:26 2017 +0200 gpio: mvebu: fix gpio bank registration when pwm is used If more than one gpio bank has the "pwm" property, only one will be registered successfully, all the others will fail with: mvebu-gpio: probe of f1018140.gpio failed with error -17 That's because in alloc_pwms(), the chip->base (aka "int pwm"), was not set (thus, ==0) ; and 0 is a meaningful start value in alloc_pwm(). What was intended is mvpwm->chip->base = -1. Like that, the numbering will be done auto-magically Moreover, as the region might be already occupied by another pwm, we shouldn't force: mvpwm->chip->base = 0 nor mvpwm->chip->base = id * MVEBU_MAX_GPIO_PER_BANK; Tested on clearfog-pro (Marvell 88F6828) Fixes: 757642f9a584 ("gpio: mvebu: Add limited PWM support") Signed-off-by: Richard Genoud Reviewed-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/gpio/gpio-mvebu.c | 7 +++++++ 1 file changed, 7 insertions(+) commit c528eb27a3be2600e724c8a57cb69eab1fd9afa2 Author: Richard Genoud Date: Thu Jun 1 14:18:25 2017 +0200 gpio: mvebu: fix blink counter register selection The blink counter A was always selected because 0 was forced in the blink select counter register. The variable 'set' was obviously there to be used as the register value, selecting the B counter when id==1 and A counter when id==0. Tested on clearfog-pro (Marvell 88F6828) Fixes: 757642f9a584 ("gpio: mvebu: Add limited PWM support") Reviewed-by: Gregory CLEMENT Reviewed-by: Ralph Sennhauser Signed-off-by: Richard Genoud Signed-off-by: Linus Walleij drivers/gpio/gpio-mvebu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8affb06737ae565722764c2b309eb0e892538344 Merge: b29794e 1123a60 Author: Ingo Molnar Date: Fri Jun 9 08:17:10 2017 +0200 Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into rcu/urgent Pull RCU fix from Paul E. McKenney: " This series enables srcu_read_lock() and srcu_read_unlock() to be used from interrupt handlers, which fixes a bug in KVM's use of SRCU in delivery of interrupts to guest OSes. " Signed-off-by: Ingo Molnar commit abb85a9b512e8ca7ad04a5a8a6db9664fe644974 Author: Nicholas Bellinger Date: Wed Jun 7 20:29:50 2017 -0700 iscsi-target: Reject immediate data underflow larger than SCSI transfer length When iscsi WRITE underflow occurs there are two different scenarios that can happen. Normally in practice, when an EDTL vs. SCSI CDB TRANSFER LENGTH underflow is detected, the iscsi immediate data payload is the smaller SCSI CDB TRANSFER LENGTH. That is, when a host fabric LLD is using a fixed size EDTL for a specific control CDB, the SCSI CDB TRANSFER LENGTH and actual SCSI payload ends up being smaller than EDTL. In iscsi, this means the received iscsi immediate data payload matches the smaller SCSI CDB TRANSFER LENGTH, because there is no more SCSI payload to accept beyond SCSI CDB TRANSFER LENGTH. However, it's possible for a malicous host to send a WRITE underflow where EDTL is larger than SCSI CDB TRANSFER LENGTH, but incoming iscsi immediate data actually matches EDTL. In the wild, we've never had a iscsi host environment actually try to do this. For this special case, it's wrong to truncate part of the control CDB payload and continue to process the command during underflow when immediate data payload received was larger than SCSI CDB TRANSFER LENGTH, so go ahead and reject and drop the bogus payload as a defensive action. Note this potential bug was originally relaxed by the following for allowing WRITE underflow in MSFT FCP host environments: commit c72c5250224d475614a00c1d7e54a67f77cd3410 Author: Roland Dreier Date: Wed Jul 22 15:08:18 2015 -0700 target: allow underflow/overflow for PR OUT etc. commands Cc: Roland Dreier Cc: Mike Christie Cc: Hannes Reinecke Cc: Martin K. Petersen Cc: # v4.3+ Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 105fa2f44e504c830697b0c794822112d79808dc Author: Nicholas Bellinger Date: Sat Jun 3 05:35:47 2017 -0700 iscsi-target: Fix delayed logout processing greater than SECONDS_FOR_LOGOUT_COMP This patch fixes a BUG() in iscsit_close_session() that could be triggered when iscsit_logout_post_handler() execution from within tx thread context was not run for more than SECONDS_FOR_LOGOUT_COMP (15 seconds), and the TCP connection didn't already close before then forcing tx thread context to automatically exit. This would manifest itself during explicit logout as: [33206.974254] 1 connection(s) still exist for iSCSI session to iqn.1993-08.org.debian:01:3f5523242179 [33206.980184] INFO: NMI handler (kgdb_nmi_handler) took too long to run: 2100.772 msecs [33209.078643] ------------[ cut here ]------------ [33209.078646] kernel BUG at drivers/target/iscsi/iscsi_target.c:4346! Normally when explicit logout attempt fails, the tx thread context exits and iscsit_close_connection() from rx thread context does the extra cleanup once it detects conn->conn_logout_remove has not been cleared by the logout type specific post handlers. To address this special case, if the logout post handler in tx thread context detects conn->tx_thread_active has already been cleared, simply return and exit in order for existing iscsit_close_connection() logic from rx thread context do failed logout cleanup. Reported-by: Bart Van Assche Tested-by: Bart Van Assche Cc: Mike Christie Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: stable@vger.kernel.org # 3.14+ Tested-by: Gary Guo Tested-by: Chu Yuan Lin Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 73d4e580ccc5c3e05cea002f18111f66c9c07034 Author: Nicholas Bellinger Date: Fri Jun 2 20:00:17 2017 -0700 target: Fix kref->refcount underflow in transport_cmd_finish_abort This patch fixes a se_cmd->cmd_kref underflow during CMD_T_ABORTED when a fabric driver drops it's second reference from below the target_core_tmr.c based callers of transport_cmd_finish_abort(). Recently with the conversion of kref to refcount_t, this bug was manifesting itself as: [705519.601034] refcount_t: underflow; use-after-free. [705519.604034] INFO: NMI handler (kgdb_nmi_handler) took too long to run: 20116.512 msecs [705539.719111] ------------[ cut here ]------------ [705539.719117] WARNING: CPU: 3 PID: 26510 at lib/refcount.c:184 refcount_sub_and_test+0x33/0x51 Since the original kref atomic_t based kref_put() didn't check for underflow and only invoked the final callback when zero was reached, this bug did not manifest in practice since all se_cmd memory is using preallocated tags. To address this, go ahead and propigate the existing return from transport_put_cmd() up via transport_cmd_finish_abort(), and change transport_cmd_finish_abort() + core_tmr_handle_tas_abort() callers to only do their local target_put_sess_cmd() if necessary. Reported-by: Bart Van Assche Tested-by: Bart Van Assche Cc: Mike Christie Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Himanshu Madhani Cc: Sagi Grimberg Cc: stable@vger.kernel.org # 3.14+ Tested-by: Gary Guo Tested-by: Chu Yuan Lin Signed-off-by: Nicholas Bellinger drivers/target/target_core_internal.h | 2 +- drivers/target/target_core_tmr.c | 16 ++++++++-------- drivers/target/target_core_transport.c | 9 ++++++--- 3 files changed, 15 insertions(+), 12 deletions(-) commit 92347cfd62c174ab91ad97dd4bfbaa1d4aa28e67 Author: Mark Rutland Date: Thu Jun 8 14:47:41 2017 +0100 KEYS: fix refcount_inc() on zero If a key's refcount is dropped to zero between key_lookup() peeking at the refcount and subsequently attempting to increment it, refcount_inc() will see a zero refcount. Here, refcount_inc() will WARN_ONCE(), and will *not* increment the refcount, which will remain zero. Once key_lookup() drops key_serial_lock, it is possible for the key to be freed behind our back. This patch uses refcount_inc_not_zero() to perform the peek and increment atomically. Fixes: fff292914d3a2f1e ("security, keys: convert key.usage from atomic_t to refcount_t") Signed-off-by: Mark Rutland Signed-off-by: David Howells Cc: David Windsor Cc: Elena Reshetova Cc: Hans Liljestrand Cc: James Morris Cc: Kees Cook Cc: Peter Zijlstra Signed-off-by: James Morris security/keys/key.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 7cbe0932c2f2014d6e24e716e79ea3910b468950 Author: Mat Martineau Date: Thu Jun 8 14:50:11 2017 +0100 KEYS: Convert KEYCTL_DH_COMPUTE to use the crypto KPP API The initial Diffie-Hellman computation made direct use of the MPI library because the crypto module did not support DH at the time. Now that KPP is implemented, KEYCTL_DH_COMPUTE should use it to get rid of duplicate code and leverage possible hardware acceleration. This fixes an issue whereby the input to the KDF computation would include additional uninitialized memory when the result of the Diffie-Hellman computation was shorter than the input prime number. Signed-off-by: Mat Martineau Signed-off-by: David Howells Signed-off-by: James Morris security/keys/Kconfig | 2 +- security/keys/dh.c | 272 +++++++++++++++++++++++++++++++------------------- 2 files changed, 171 insertions(+), 103 deletions(-) commit da7798a7b6714cf35ea6084ad6b1fe0497566cf2 Author: Loganaden Velvindron Date: Thu Jun 8 14:50:04 2017 +0100 crypto : asymmetric_keys : verify_pefile:zero memory content before freeing Signed-off-by: Loganaden Velvindron Signed-off-by: Yasir Auleear Signed-off-by: David Howells Signed-off-by: James Morris crypto/asymmetric_keys/verify_pefile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a77395447b0aeab9473a066ff28fbee01130206b Author: Eric Biggers Date: Thu Jun 8 14:49:57 2017 +0100 KEYS: DH: add __user annotations to keyctl_kdf_params Signed-off-by: Eric Biggers Signed-off-by: David Howells Acked-by: Stephan Mueller Signed-off-by: James Morris include/uapi/linux/keyctl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ddd9f1a6b7e5746b52959f645fc66859b805e88 Author: Eric Biggers Date: Thu Jun 8 14:49:49 2017 +0100 KEYS: DH: ensure the KDF counter is properly aligned Accessing a 'u8[4]' through a '__be32 *' violates alignment rules. Just make the counter a __be32 instead. Signed-off-by: Eric Biggers Signed-off-by: David Howells Acked-by: Stephan Mueller Signed-off-by: James Morris security/keys/dh.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 281590b4221779dbc4a5e2c33c0c5b0239cfe794 Author: Eric Biggers Date: Thu Jun 8 14:49:42 2017 +0100 KEYS: DH: don't feed uninitialized "otherinfo" into KDF If userspace called KEYCTL_DH_COMPUTE with kdf_params containing NULL otherinfo but nonzero otherinfolen, the kernel would allocate a buffer for the otherinfo, then feed it into the KDF without initializing it. Fix this by always doing the copy from userspace (which will fail with EFAULT in this scenario). Signed-off-by: Eric Biggers Signed-off-by: David Howells Acked-by: Stephan Mueller Signed-off-by: James Morris security/keys/dh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbe240454d86be95151e0ecfd6ac55fe5ef5a6f5 Author: Eric Biggers Date: Thu Jun 8 14:49:34 2017 +0100 KEYS: DH: forbid using digest_null as the KDF hash Requesting "digest_null" in the keyctl_kdf_params caused an infinite loop in kdf_ctr() because the "null" hash has a digest size of 0. Fix it by rejecting hash algorithms with a digest size of 0. Signed-off-by: Eric Biggers Signed-off-by: David Howells Acked-by: Stephan Mueller Signed-off-by: James Morris security/keys/dh.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 0620fddb56dfaf0e1034eeb69d79c73b361debbf Author: Eric Biggers Date: Thu Jun 8 14:49:26 2017 +0100 KEYS: sanitize key structs before freeing While a 'struct key' itself normally does not contain sensitive information, Documentation/security/keys.txt actually encourages this: "Having a payload is not required; and the payload can, in fact, just be a value stored in the struct key itself." In case someone has taken this advice, or will take this advice in the future, zero the key structure before freeing it. We might as well, and as a bonus this could make it a bit more difficult for an adversary to determine which keys have recently been in use. This is safe because the key_jar cache does not use a constructor. Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: James Morris include/linux/key.h | 1 - security/keys/gc.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) commit ee618b4619b72527aaed765f0f0b74072b281159 Author: Eric Biggers Date: Thu Jun 8 14:49:18 2017 +0100 KEYS: trusted: sanitize all key material As the previous patch did for encrypted-keys, zero sensitive any potentially sensitive data related to the "trusted" key type before it is freed. Notably, we were not zeroing the tpm_buf structures in which the actual key is stored for TPM seal and unseal, nor were we zeroing the trusted_key_payload in certain error paths. Cc: Mimi Zohar Cc: David Safford Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: James Morris security/keys/trusted.c | 50 ++++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) commit a9dd74b252e04b7e41ffe78d418b896b33b70a13 Author: Eric Biggers Date: Thu Jun 8 14:49:11 2017 +0100 KEYS: encrypted: sanitize all key material For keys of type "encrypted", consistently zero sensitive key material before freeing it. This was already being done for the decrypted payloads of encrypted keys, but not for the master key and the keys derived from the master key. Out of an abundance of caution and because it is trivial to do so, also zero buffers containing the key payload in encrypted form, although depending on how the encrypted-keys feature is used such information does not necessarily need to be kept secret. Cc: Mimi Zohar Cc: David Safford Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: James Morris security/keys/encrypted-keys/encrypted.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) commit 6966c74932b328b3d6df92b11b083bfbcd067986 Author: Eric Biggers Date: Thu Jun 8 14:49:04 2017 +0100 KEYS: user_defined: sanitize key payloads Zero the payloads of user and logon keys before freeing them. This prevents sensitive key material from being kept around in the slab caches after a key is released. Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: James Morris security/keys/user_defined.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 57070c850a03ee0cea654fc22cb8032fc3139d39 Author: Eric Biggers Date: Thu Jun 8 14:48:57 2017 +0100 KEYS: sanitize add_key() and keyctl() key payloads Before returning from add_key() or one of the keyctl() commands that takes in a key payload, zero the temporary buffer that was allocated to hold the key payload copied from userspace. This may contain sensitive key material that should not be kept around in the slab caches. Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: James Morris security/keys/keyctl.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 63a0b0509e700717a59f049ec6e4e04e903c7fe2 Author: Eric Biggers Date: Thu Jun 8 14:48:47 2017 +0100 KEYS: fix freeing uninitialized memory in key_update() key_update() freed the key_preparsed_payload even if it was not initialized first. This would cause a crash if userspace called keyctl_update() on a key with type like "asymmetric" that has a ->preparse() method but not an ->update() method. Possibly it could even be triggered for other key types by racing with keyctl_setperm() to make the KEY_NEED_WRITE check fail (the permission was already checked, so normally it wouldn't fail there). Reproducer with key type "asymmetric", given a valid cert.der: keyctl new_session keyid=$(keyctl padd asymmetric desc @s < cert.der) keyctl setperm $keyid 0x3f000000 keyctl update $keyid data [ 150.686666] BUG: unable to handle kernel NULL pointer dereference at 0000000000000001 [ 150.687601] IP: asymmetric_key_free_kids+0x12/0x30 [ 150.688139] PGD 38a3d067 [ 150.688141] PUD 3b3de067 [ 150.688447] PMD 0 [ 150.688745] [ 150.689160] Oops: 0000 [#1] SMP [ 150.689455] Modules linked in: [ 150.689769] CPU: 1 PID: 2478 Comm: keyctl Not tainted 4.11.0-rc4-xfstests-00187-ga9f6b6b8cd2f #742 [ 150.690916] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-20170228_101828-anatol 04/01/2014 [ 150.692199] task: ffff88003b30c480 task.stack: ffffc90000350000 [ 150.692952] RIP: 0010:asymmetric_key_free_kids+0x12/0x30 [ 150.693556] RSP: 0018:ffffc90000353e58 EFLAGS: 00010202 [ 150.694142] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000004 [ 150.694845] RDX: ffffffff81ee3920 RSI: ffff88003d4b0700 RDI: 0000000000000001 [ 150.697569] RBP: ffffc90000353e60 R08: ffff88003d5d2140 R09: 0000000000000000 [ 150.702483] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001 [ 150.707393] R13: 0000000000000004 R14: ffff880038a4d2d8 R15: 000000000040411f [ 150.709720] FS: 00007fcbcee35700(0000) GS:ffff88003fd00000(0000) knlGS:0000000000000000 [ 150.711504] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 150.712733] CR2: 0000000000000001 CR3: 0000000039eab000 CR4: 00000000003406e0 [ 150.714487] Call Trace: [ 150.714975] asymmetric_key_free_preparse+0x2f/0x40 [ 150.715907] key_update+0xf7/0x140 [ 150.716560] ? key_default_cmp+0x20/0x20 [ 150.717319] keyctl_update_key+0xb0/0xe0 [ 150.718066] SyS_keyctl+0x109/0x130 [ 150.718663] entry_SYSCALL_64_fastpath+0x1f/0xc2 [ 150.719440] RIP: 0033:0x7fcbce75ff19 [ 150.719926] RSP: 002b:00007ffd5d167088 EFLAGS: 00000206 ORIG_RAX: 00000000000000fa [ 150.720918] RAX: ffffffffffffffda RBX: 0000000000404d80 RCX: 00007fcbce75ff19 [ 150.721874] RDX: 00007ffd5d16785e RSI: 000000002866cd36 RDI: 0000000000000002 [ 150.722827] RBP: 0000000000000006 R08: 000000002866cd36 R09: 00007ffd5d16785e [ 150.723781] R10: 0000000000000004 R11: 0000000000000206 R12: 0000000000404d80 [ 150.724650] R13: 00007ffd5d16784d R14: 00007ffd5d167238 R15: 000000000040411f [ 150.725447] Code: 83 c4 08 31 c0 5b 41 5c 41 5d 41 5e 41 5f 5d c3 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 85 ff 74 23 55 48 89 e5 53 48 89 fb <48> 8b 3f e8 06 21 c5 ff 48 8b 7b 08 e8 fd 20 c5 ff 48 89 df e8 [ 150.727489] RIP: asymmetric_key_free_kids+0x12/0x30 RSP: ffffc90000353e58 [ 150.728117] CR2: 0000000000000001 [ 150.728430] ---[ end trace f7f8fe1da2d5ae8d ]--- Fixes: 4d8c0250b841 ("KEYS: Call ->free_preparse() even after ->preparse() returns an error") Cc: stable@vger.kernel.org # 3.17+ Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: James Morris security/keys/key.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5649645d725c73df4302428ee4e02c869248b4c5 Author: Eric Biggers Date: Thu Jun 8 14:48:40 2017 +0100 KEYS: fix dereferencing NULL payload with nonzero length sys_add_key() and the KEYCTL_UPDATE operation of sys_keyctl() allowed a NULL payload with nonzero length to be passed to the key type's ->preparse(), ->instantiate(), and/or ->update() methods. Various key types including asymmetric, cifs.idmap, cifs.spnego, and pkcs7_test did not handle this case, allowing an unprivileged user to trivially cause a NULL pointer dereference (kernel oops) if one of these key types was present. Fix it by doing the copy_from_user() when 'plen' is nonzero rather than when '_payload' is non-NULL, causing the syscall to fail with EFAULT as expected when an invalid buffer is specified. Cc: stable@vger.kernel.org # 2.6.10+ Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: James Morris security/keys/keyctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0f534e4a13496b02ae284f50fcb0263f6ea37007 Author: Eric Biggers Date: Thu Jun 8 14:48:32 2017 +0100 KEYS: encrypted: use constant-time HMAC comparison MACs should, in general, be compared using crypto_memneq() to prevent timing attacks. Cc: Mimi Zohar Cc: Herbert Xu Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: James Morris security/keys/encrypted-keys/encrypted.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 64d107d3acca1565c39c044c459fd18f70943534 Author: Eric Biggers Date: Thu Jun 8 14:48:25 2017 +0100 KEYS: encrypted: fix race causing incorrect HMAC calculations The encrypted-keys module was using a single global HMAC transform, which could be rekeyed by multiple threads concurrently operating on different keys, causing incorrect HMAC values to be calculated. Fix this by allocating a new HMAC transform whenever we need to calculate a HMAC. Also simplify things a bit by allocating the shash_desc's using SHASH_DESC_ON_STACK() for both the HMAC and unkeyed hashes. The following script reproduces the bug: keyctl new_session keyctl add user master "abcdefghijklmnop" @s for i in $(seq 2); do ( set -e for j in $(seq 1000); do keyid=$(keyctl add encrypted desc$i "new user:master 25" @s) datablob="$(keyctl pipe $keyid)" keyctl unlink $keyid > /dev/null keyid=$(keyctl add encrypted desc$i "load $datablob" @s) keyctl unlink $keyid > /dev/null done ) & done Output with bug: [ 439.691094] encrypted_key: bad hmac (-22) add_key: Invalid argument add_key: Invalid argument Cc: Mimi Zohar Cc: Herbert Xu Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: James Morris security/keys/encrypted-keys/encrypted.c | 115 +++++++++---------------------- 1 file changed, 32 insertions(+), 83 deletions(-) commit 794b4bc292f5d31739d89c0202c54e7dc9bc3add Author: Eric Biggers Date: Thu Jun 8 14:48:18 2017 +0100 KEYS: encrypted: fix buffer overread in valid_master_desc() With the 'encrypted' key type it was possible for userspace to provide a data blob ending with a master key description shorter than expected, e.g. 'keyctl add encrypted desc "new x" @s'. When validating such a master key description, validate_master_desc() could read beyond the end of the buffer. Fix this by using strncmp() instead of memcmp(). [Also clean up the code to deduplicate some logic.] Cc: Mimi Zohar Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: James Morris security/keys/encrypted-keys/encrypted.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit e9ff56ac352446f55141aaef1553cee662b2e310 Author: Eric Biggers Date: Thu Jun 8 14:48:10 2017 +0100 KEYS: encrypted: avoid encrypting/decrypting stack buffers Since v4.9, the crypto API cannot (normally) be used to encrypt/decrypt stack buffers because the stack may be virtually mapped. Fix this for the padding buffers in encrypted-keys by using ZERO_PAGE for the encryption padding and by allocating a temporary heap buffer for the decryption padding. Tested with CONFIG_DEBUG_SG=y: keyctl new_session keyctl add user master "abcdefghijklmnop" @s keyid=$(keyctl add encrypted desc "new user:master 25" @s) datablob="$(keyctl pipe $keyid)" keyctl unlink $keyid keyid=$(keyctl add encrypted desc "load $datablob" @s) datablob2="$(keyctl pipe $keyid)" [ "$datablob" = "$datablob2" ] && echo "Success!" Cc: Andy Lutomirski Cc: Herbert Xu Cc: Mimi Zohar Cc: stable@vger.kernel.org # 4.9+ Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: James Morris security/keys/encrypted-keys/encrypted.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit d636bd9f12a66ea3775c9fabbf3f8e118253467a Author: Eric Biggers Date: Thu Jun 8 14:48:03 2017 +0100 KEYS: put keyring if install_session_keyring_to_cred() fails In join_session_keyring(), if install_session_keyring_to_cred() were to fail, we would leak the keyring reference, just like in the bug fixed by commit 23567fd052a9 ("KEYS: Fix keyring ref leak in join_session_keyring()"). Fortunately this cannot happen currently, but we really should be more careful. Do this by adding and using a new error label at which the keyring reference is dropped. Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: James Morris security/keys/process_keys.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 41f1c53e0d7d6e79087d5f5e18c467747126a3fc Author: Markus Elfring Date: Thu Jun 8 14:47:56 2017 +0100 KEYS: Delete an error message for a failed memory allocation in get_derived_key() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: David Howells Signed-off-by: James Morris security/keys/encrypted-keys/encrypted.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4e880168e9ffb1cdbdb72b3b48ab0324b30c2d62 Author: Dan Carpenter Date: Thu Jun 8 14:47:49 2017 +0100 X.509: Fix error code in x509_cert_parse() We forgot to set the error code on this path so it could result in returning NULL which leads to a NULL dereference. Fixes: db6c43bd2132 ("crypto: KEYS: convert public key and digsig asym to the akcipher api") Signed-off-by: Dan Carpenter Signed-off-by: David Howells Signed-off-by: James Morris crypto/asymmetric_keys/x509_cert_parser.c | 1 + 1 file changed, 1 insertion(+) commit 381f20fceba8ea540aef5241a9099f4552700d0c Author: Davidlohr Bueso Date: Thu Jun 8 14:47:34 2017 +0100 security: use READ_ONCE instead of deprecated ACCESS_ONCE With the new standardized functions, we can replace all ACCESS_ONCE() calls across relevant security/keyrings/. ACCESS_ONCE() does not work reliably on non-scalar types. For example gcc 4.6 and 4.7 might remove the volatile tag for such accesses during the SRA (scalar replacement of aggregates) step: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 Update the new calls regardless of if it is a scalar type, this is cleaner than having three alternatives. Signed-off-by: Davidlohr Bueso Signed-off-by: David Howells Signed-off-by: James Morris security/keys/keyring.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 47b2c3fff4932e6fc17ce13d51a43c6969714e20 Author: Bilal Amarni Date: Thu Jun 8 14:47:26 2017 +0100 security/keys: add CONFIG_KEYS_COMPAT to Kconfig CONFIG_KEYS_COMPAT is defined in arch-specific Kconfigs and is missing for several 64-bit architectures : mips, parisc, tile. At the moment and for those architectures, calling in 32-bit userspace the keyctl syscall would return an ENOSYS error. This patch moves the CONFIG_KEYS_COMPAT option to security/keys/Kconfig, to make sure the compatibility wrapper is registered by default for any 64-bit architecture as long as it is configured with CONFIG_COMPAT. [DH: Modified to remove arm64 compat enablement also as requested by Eric Biggers] Signed-off-by: Bilal Amarni Signed-off-by: David Howells Reviewed-by: Arnd Bergmann cc: Eric Biggers Signed-off-by: James Morris arch/arm64/Kconfig | 4 ---- arch/powerpc/Kconfig | 5 ----- arch/s390/Kconfig | 3 --- arch/sparc/Kconfig | 3 --- arch/x86/Kconfig | 4 ---- security/keys/Kconfig | 4 ++++ 6 files changed, 4 insertions(+), 19 deletions(-) commit 6e88007e224ce51969ccf9afeec645146c638816 Merge: 3d76917 1929e66 Author: Dave Airlie Date: Fri Jun 9 13:12:02 2017 +1000 Merge branch 'vmwgfx-fixes-4.12' of git://people.freedesktop.org/~thomash/linux into drm-fixes A bunch of fixes for vmwgfx 4.12 regressions and older stuff. In the latter case either trivial, cc'd stable or requiring backports for stable. * 'vmwgfx-fixes-4.12' of git://people.freedesktop.org/~thomash/linux: drm/vmwgfx: Bump driver minor and date drm/vmwgfx: Remove unused legacy cursor functions drm/vmwgfx: fix spelling mistake "exeeds" -> "exceeds" drm/vmwgfx: Fix large topology crash drm/vmwgfx: Make sure to update STDU when FB is updated drm/vmwgfx: Make sure backup_handle is always valid drm/vmwgfx: Handle vmalloc() failure in vmw_local_fifo_reserve() drm/vmwgfx: Don't create proxy surface for cursor drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl() commit 3d76917f50a38870dc2d960287b07e239b3da2c3 Merge: b62dba5 ef6c4d7 Author: Dave Airlie Date: Fri Jun 9 12:18:07 2017 +1000 Merge tag 'drm-intel-fixes-2017-06-08' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes drm/i915 fixes for v4.12-rc5 * tag 'drm-intel-fixes-2017-06-08' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: fix warning for unused variable drm/i915: Fix 90/270 rotated coordinates for FBC drm/i915: Restore has_fbc=1 for ILK-M drm/i915: Workaround VLV/CHV DSI scanline counter hardware fail drm/i915: Fix logical inversion for gen4 quirking drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally drm/i915: Always recompute watermarks when distrust_bios_wm is set, v2. drm/i915: Prevent the system suspend complete optimization drm/i915/psr: disable psr2 for resolution greater than 32X20 drm/i915: Hold a wakeref for probing the ring registers drm/i915: Short-circuit i915_gem_wait_for_idle() if already idle drm/i915: Disable decoupled MMIO drm/i915/guc: Remove stale comment for q_fail drm/i915: Serialize GTT/Aperture accesses on BXT commit b62dba55779d9216128dc651204438be898fd16f Merge: 97f607f 8604889 Author: Dave Airlie Date: Fri Jun 9 12:17:27 2017 +1000 Merge tag 'drm-misc-fixes-2017-06-07' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes Driver Changes: - kirin: Use correct dt port for the bridge (John) - meson: Fix regression caused by adding HDMI support to allow board configurations without HDMI (Neil) Cc: John Stultz Cc: Neil Armstrong * tag 'drm-misc-fixes-2017-06-07' of git://anongit.freedesktop.org/git/drm-misc: drm/meson: Fix driver bind when only CVBS is available drm: kirin: Fix drm_of_find_panel_or_bridge conversion commit 97f607fe0d4e8c49e4ee3251bda853f7b6aa75d0 Merge: dd44c95 014580f Author: Dave Airlie Date: Fri Jun 9 12:17:00 2017 +1000 Merge branch 'mediatek-drm-fixes-4.12-rc1' of https://github.com/ckhu-mediatek/linux.git-tags into drm-fixes mediatek fixes * 'mediatek-drm-fixes-4.12-rc1' of https://github.com/ckhu-mediatek/linux.git-tags: drm/mediatek: fix mtk_hdmi_setup_vendor_specific_infoframe mistake drm/mediatek: fix a timeout loop commit dd44c95739dffafac0e52076dd750911180295d4 Merge: e5b4ab1 b7dfee24 Author: Dave Airlie Date: Fri Jun 9 12:16:25 2017 +1000 Merge tag 'imx-drm-fixes-2017-06-08' of git://git.pengutronix.de/git/pza/linux into drm-fixes imx-drm: PRE clock gating, panelless LDB, and VDIC CSI selection fixes - Keep the external clock input to the PRE ungated and only use the internal soft reset to keep the module in low power state, to avoid sporadic startup failures. - Ignore -ENODEV return values from drm_of_find_panel_or_bridge in the LDB driver to fix probing for devices that still do not specify a panel in the device tree. - Fix the CSI input selection to the VDIC. According to experiments, the real behaviour differs a bit from the documentation. * tag 'imx-drm-fixes-2017-06-08' of git://git.pengutronix.de/git/pza/linux: gpu: ipu-v3: Fix CSI selection for VDIC drm/imx: imx-ldb: Accept drm_of_find_panel_or_bridge failure gpu: ipu-v3: pre: only use internal clock gating commit 0d22df90c7eadeaf852caca49ae8df9b2c3075a4 Merge: aea4156 fbd78af Author: Linus Torvalds Date: Thu Jun 8 17:40:32 2017 -0700 Merge tag 'pm-4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These revert one problematic commit related to system sleep and fix one recent intel_pstate regression. Specifics: - Revert a recent commit that attempted to avoid spurious wakeups from suspend-to-idle via ACPI SCI, but introduced regressions on some systems (Rafael Wysocki). We will get back to the problem it tried to address in the next cycle. - Fix a possible division by 0 during intel_pstate initialization due to a missing check (Rafael Wysocki)" * tag 'pm-4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle" cpufreq: intel_pstate: Avoid division by 0 in min_perf_pct_min() commit aea4156c308670699d74dedb182ebceffb633185 Merge: dc0cf5a 462c5a8 Author: Linus Torvalds Date: Thu Jun 8 16:28:49 2017 -0700 Merge tag 'modules-for-v4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux Pull module maintainer address change from Jessica Yu: "A single patch that advertises my email address change" * tag 'modules-for-v4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: MAINTAINERS: update email address for Jessica Yu commit 097d3c9508dc58286344e4a22b300098cf0c1566 Author: David Ahern Date: Thu Jun 8 11:31:11 2017 -0600 net: vrf: Make add_fib_rules per network namespace flag Commit 1aa6c4f6b8cd8 ("net: vrf: Add l3mdev rules on first device create") adds the l3mdev FIB rule the first time a VRF device is created. However, it only creates the rule once and only in the namespace the first device is created - which may not be init_net. Fix by using the net_generic capability to make the add_fib_rules flag per network namespace. Fixes: 1aa6c4f6b8cd8 ("net: vrf: Add l3mdev rules on first device create") Reported-by: Petr Machata Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) commit fbd78afe34d9cc3a86aff7cc214d9f06e815e63e Merge: 3c2993b 57caf4e f3b7eaa Author: Rafael J. Wysocki Date: Fri Jun 9 01:25:16 2017 +0200 Merge branches 'intel_pstate' and 'pm-sleep' * intel_pstate: cpufreq: intel_pstate: Avoid division by 0 in min_perf_pct_min() * pm-sleep: Revert "ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle" commit 47c1ded7fef108c730b803cd386241beffcdd15c Merge: cc1582c b89fe63 Author: Ingo Molnar Date: Fri Jun 9 00:41:33 2017 +0200 Merge tag 'perf-urgent-for-mingo-4.12-20170608' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: - Fixes for handling compressed kernel modules (Namhyung Kim) - Fix handling old style build-id cache ($HOME/.debug/) (Namhyung Kim) - 'perf script' python/perl documentation fixes: outdated comments, invalid code snippets, etc (SeongJae Park) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 78a5a93c1eeb4e6933d1f62b33e5496d53b46c5a Author: Daniel Borkmann Date: Thu Jun 8 19:06:25 2017 +0200 bpf, tests: fix endianness selection I noticed that test_l4lb was failing in selftests: # ./test_progs test_pkt_access:PASS:ipv4 77 nsec test_pkt_access:PASS:ipv6 44 nsec test_xdp:PASS:ipv4 2933 nsec test_xdp:PASS:ipv6 1500 nsec test_l4lb:PASS:ipv4 377 nsec test_l4lb:PASS:ipv6 544 nsec test_l4lb:FAIL:stats 6297600000 200000 test_tcp_estats:PASS: 0 nsec Summary: 7 PASSED, 1 FAILED Tracking down the issue actually revealed that endianness selection in bpf_endian.h is broken when compiled with clang with bpf target. test_pkt_access.c, test_l4lb.c is compiled with __BYTE_ORDER as __BIG_ENDIAN, test_xdp.c as __LITTLE_ENDIAN! test_l4lb noticeably fails, because the test accounts bytes via bpf_ntohs(ip6h->payload_len) and bpf_ntohs(iph->tot_len), and compares them against a defined value and given a wrong endianness, the test outcome is different, of course. Turns out that there are actually two bugs: i) when we do __BYTE_ORDER comparison with __LITTLE_ENDIAN/__BIG_ENDIAN, then depending on the include order we see different outcomes. Reason is that __BYTE_ORDER is undefined due to missing endian.h include. Before we include the asm/byteorder.h (e.g. through linux/in.h), then __BYTE_ORDER equals __LITTLE_ENDIAN since both are undefined, after the include which correctly pulls in linux/byteorder/little_endian.h, __LITTLE_ENDIAN is defined, but given __BYTE_ORDER is still undefined, we match on __BYTE_ORDER equals to __BIG_ENDIAN since __BIG_ENDIAN is also undefined at that point, sigh. ii) But even that would be wrong, since when compiling the test cases with clang, one can select between bpfeb and bpfel targets for cross compilation. Hence, we can also not rely on what the system's endian.h provides, but we need to look at the compiler's defined endianness. The compiler defines __BYTE_ORDER__, and we can match __ORDER_LITTLE_ENDIAN__ and __ORDER_BIG_ENDIAN__, which also reflects targets bpf (native), bpfel, bpfeb correctly, thus really only rely on that. After patch: # ./test_progs test_pkt_access:PASS:ipv4 74 nsec test_pkt_access:PASS:ipv6 42 nsec test_xdp:PASS:ipv4 2340 nsec test_xdp:PASS:ipv6 1461 nsec test_l4lb:PASS:ipv4 400 nsec test_l4lb:PASS:ipv6 530 nsec test_tcp_estats:PASS: 0 nsec Summary: 7 PASSED, 0 FAILED Fixes: 43bcf707ccdc ("bpf: fix _htons occurences in test_progs") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/bpf_endian.h | 41 +++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 11 deletions(-) commit 297fb414d0d190ca82bf0b46fb19d7fda1598737 Author: Nicolas Dichtel Date: Thu Jun 8 11:18:13 2017 +0200 ethtool.h: remind to update 802.3ad when adding new speeds Each time a new speed is added, the bonding 802.3ad isn't updated. Add a comment to remind the developer to update this driver. Signed-off-by: Nicolas Dichtel Acked-by: Andy Gospodarek Signed-off-by: David S. Miller include/uapi/linux/ethtool.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3fcd64cfa0e9cb72b99aaba5c6bc13af9c03417f Author: Nicolas Dichtel Date: Thu Jun 8 11:18:12 2017 +0200 bonding: fix 802.3ad support for 14G speed This patch adds 14 Gbps enum definition, and fixes aggregated bandwidth calculation based on above slave links. Fixes: 0d7e2d2166f6 ("IB/ipoib: add get_link_ksettings in ethtool") Signed-off-by: Nicolas Dichtel Acked-by: Andy Gospodarek Signed-off-by: David S. Miller drivers/net/bonding/bond_3ad.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit c7c550670afda2e16f9e2d06a1473885312eb6b5 Author: Thibaut Collet Date: Thu Jun 8 11:18:11 2017 +0200 bonding: fix 802.3ad support for 5G and 50G speeds This patch adds [5|50] Gbps enum definition, and fixes aggregated bandwidth calculation based on above slave links. Fixes: c9a70d43461d ("net-next: ethtool: Added port speed macros.") Signed-off-by: Thibaut Collet Signed-off-by: Nicolas Dichtel Acked-by: Andy Gospodarek Signed-off-by: David S. Miller drivers/net/bonding/bond_3ad.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit daa6630a310fe2ad90ce5f7d2d196cd0353ef4fa Author: Nicolas Dichtel Date: Thu Jun 8 10:37:45 2017 +0200 openvswitch: warn about missing first netlink attribute The first netlink attribute (value 0) must always be defined as none/unspec. Because we cannot change an existing UAPI, I add a comment to point the mistake and avoid to propagate it in a new ovs API in the future. Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller include/uapi/linux/openvswitch.h | 1 + 1 file changed, 1 insertion(+) commit f9f314f323951a33d8b4a4f63f7d04b7f3bc0603 Author: Hans Verkuil Date: Thu Jun 8 15:37:44 2017 -0300 [media] media/cec.h: use IS_REACHABLE instead of IS_ENABLED Fix messages like this: adv7842.c:(.text+0x2edadd): undefined reference to `cec_unregister_adapter' when CEC_CORE=m but the driver including media/cec.h is built-in. In that case the static inlines provided in media/cec.h should be used by that driver. Reported-by: Randy Dunlap Reported-by: kbuild test robot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/cec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0db47e3d323411beeb6ea97f2c4d19395c91fd8b Author: Arnd Bergmann Date: Thu Jun 8 09:54:24 2017 +0200 ila_xlat: add missing hash secret initialization While discussing the possible merits of clang warning about unused initialized functions, I found one function that was clearly meant to be called but never actually is. __ila_hash_secret_init() initializes the hash value for the ila locator, apparently this is intended to prevent hash collision attacks, but this ends up being a read-only zero constant since there is no caller. I could find no indication of why it was never called, the earliest patch submission for the module already was like this. If my interpretation is right, we certainly want to backport the patch to stable kernels as well. I considered adding it to the ila_xlat_init callback, but for best effect the random data is read as late as possible, just before it is first used. The underlying net_get_random_once() is already highly optimized to avoid overhead when called frequently. Fixes: 7f00feaf1076 ("ila: Add generic ILA translation facility") Cc: stable@vger.kernel.org Link: https://www.spinics.net/lists/kernel/msg2527243.html Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller net/ipv6/ila/ila_xlat.c | 1 + 1 file changed, 1 insertion(+) commit b89fe63fbafe307fb72546f7a2320380bf41bdd4 Author: Namhyung Kim Date: Thu Jun 8 16:31:09 2017 +0900 perf symbols: Kill dso__build_id_is_kmod() The commit e7ee40475760 ("perf symbols: Fix symbols searching for module in buildid-cache") added the function to check kernel modules reside in the build-id cache. This was because there's no way to identify a DSO which is actually a kernel module. So it searched linkname of the file and find ".ko" suffix. But this does not work for compressed kernel modules and now such DSOs hCcave correct symtab_type now. So no need to check it anymore. This patch essentially reverts the commit. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Peter Zijlstra Cc: Wang Nan Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170608073109.30699-10-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/build-id.c | 45 --------------------------------------------- tools/perf/util/build-id.h | 1 - tools/perf/util/symbol.c | 4 ---- 3 files changed, 50 deletions(-) commit c25ec42f846f702f8f532fbc890171e3a1f6ec85 Author: Namhyung Kim Date: Thu Jun 8 16:31:08 2017 +0900 perf symbols: Keep DSO->symtab_type after decompress The symsrc__init() overwrites dso->symtab_type as symsrc->type in dso__load_sym(). But for compressed kernel modules in the build-id cache, it should have original symtab type to be decompressed as needed. This fixes perf annotate to show disassembly of the function properly. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Peter Zijlstra Cc: Wang Nan Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170608073109.30699-9-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol-elf.c | 2 ++ 1 file changed, 2 insertions(+) commit 94df1040b1e6aacd8dec0ba3c61d7e77cd695f26 Author: Namhyung Kim Date: Thu Jun 8 16:31:07 2017 +0900 perf tests: Decompress kernel module before objdump If a kernel modules is compressed, it should be decompressed before running objdump to parse binary data correctly. This fixes a failure of object code reading test for me. Signed-off-by: Namhyung Kim Acked-by: Adrian Hunter Acked-by: Jiri Olsa Cc: David Ahern Cc: Peter Zijlstra Cc: Wang Nan Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170608073109.30699-8-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/code-reading.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 8ba29adf9a7cdff3c7283d5fc0dcf5e777d3b40f Author: Namhyung Kim Date: Thu Jun 8 16:31:06 2017 +0900 perf tools: Consolidate error path in __open_dso() On failure, it should free the 'name', so clean up the error path using goto. Signed-off-by: Namhyung Kim Suggested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Peter Zijlstra Cc: Wang Nan Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170608073109.30699-7-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dso.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 1d6b3c9ba756a5134fd7ad1959acac776d17404b Author: Namhyung Kim Date: Thu Jun 8 16:31:05 2017 +0900 perf tools: Decompress kernel module when reading DSO data Currently perf decompresses kernel modules when loading the symbol table but it missed to do it when reading raw data. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Peter Zijlstra Cc: Wang Nan Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170608073109.30699-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dso.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 3c84fd53044f98017271101b59a21ddb20fb312b Author: Namhyung Kim Date: Thu Jun 8 16:31:04 2017 +0900 perf annotate: Use dso__decompress_kmodule_path() Convert open-coded decompress routine to use the function. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Peter Zijlstra Cc: Wang Nan Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170608073109.30699-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) commit 42b3fa670825983fc8bd0ac7b80cc84ae3abb75b Author: Namhyung Kim Date: Thu Jun 8 16:31:03 2017 +0900 perf tools: Introduce dso__decompress_kmodule_{fd,path} Move decompress_kmodule() to util/dso.c and split it into two functions returning fd and (decompressed) file path. The existing user only wants the fd version but the path version will be used soon. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Peter Zijlstra Cc: Wang Nan Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170608073109.30699-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dso.c | 58 ++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/dso.h | 6 +++++ tools/perf/util/symbol-elf.c | 36 +-------------------------- 3 files changed, 65 insertions(+), 35 deletions(-) commit 44ad6b8852529eb39066edbedc027a6901da6803 Author: Namhyung Kim Date: Thu Jun 8 16:31:02 2017 +0900 perf tools: Fix a memory leak in __open_dso() The 'name' variable should be freed on the error path. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Peter Zijlstra Cc: Wang Nan Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170608073109.30699-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dso.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3619ef76b37d4803bc9daee9d03d82c8526db378 Author: Namhyung Kim Date: Thu Jun 8 16:31:01 2017 +0900 perf annotate: Fix symbolic link of build-id cache The commit 6ebd2547dd24 ("perf annotate: Fix a bug following symbolic link of a build-id file") changed to use dirname to follow the symlink. But it only considers new-style build-id cache names so old names fail on readlink() and force to use system path which might not available. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Peter Zijlstra Cc: Taeung Song Cc: Wang Nan Cc: kernel-team@lge.com Fixes: 6ebd2547dd24 ("perf annotate: Fix a bug following symbolic link of a build-id file") Link: http://lkml.kernel.org/r/20170608073109.30699-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit dc0cf5a77db9d200284f54a60994c1f6d2fbfc5f Merge: d0aab7d dac8bbb Author: Linus Torvalds Date: Thu Jun 8 10:50:04 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk Pull printk fix from Petr Mladek: "This reverts a fix added into 4.12-rc1. It caused the kernel log to be printed on another console when two consoles of the same type were defined, e.g. console=ttyS0 console=ttyS1. This configuration was never supported by kernel itself, but it started to make sense with systemd. In other words, the commit broke userspace" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: Revert "printk: fix double printing with earlycon" commit d0aab7d4e93e0fd5df3e892e0f2087d7a5371b1a Merge: b29794e f3ad587 Author: Linus Torvalds Date: Thu Jun 8 10:02:58 2017 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "This fixes a couple of places in the crypto code that were doing interruptible sleeps dangerously. They have been converted to use non-interruptible sleeps. This also fixes a bug in asymmetric_keys where it would trigger a use-after-free if a request returned EBUSY due to a full device queue" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: gcm - wait for crypto op not signal safe crypto: drbg - wait for crypto op not signal safe crypto: asymmetric_keys - handle EBUSY due to backlog correctly commit 0bed865060836dc5f26b68052de0a504d66d9fae Author: David S. Miller Date: Thu Jun 8 11:51:59 2017 -0400 net: Fix build regression in rtl8723bs staging driver. drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function ‘rtw_cfg80211_add_monitor_if’: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2670:10: error: ‘struct net_device’ has no member named ‘destructor’ mon_ndev->destructor = rtw_ndev_destructor; ^ Signed-off-by: David S. Miller drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 3 ++- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) commit 8f9bebc33dd718283183582fc4a762e178552fb8 Author: Paolo Valente Date: Mon Jun 5 10:11:15 2017 +0200 block, bfq: access and cache blkg data only when safe In blk-cgroup, operations on blkg objects are protected with the request_queue lock. This is no more the lock that protects I/O-scheduler operations in blk-mq. In fact, the latter are now protected with a finer-grained per-scheduler-instance lock. As a consequence, although blkg lookups are also rcu-protected, blk-mq I/O schedulers may see inconsistent data when they access blkg and blkg-related objects. BFQ does access these objects, and does incur this problem, in the following case. The blkg_lookup performed in bfq_get_queue, being protected (only) through rcu, may happen to return the address of a copy of the original blkg. If this is the case, then the blkg_get performed in bfq_get_queue, to pin down the blkg, is useless: it does not prevent blk-cgroup code from destroying both the original blkg and all objects directly or indirectly referred by the copy of the blkg. BFQ accesses these objects, which typically causes a crash for NULL-pointer dereference of memory-protection violation. Some additional protection mechanism should be added to blk-cgroup to address this issue. In the meantime, this commit provides a quick temporary fix for BFQ: cache (when safe) blkg data that might disappear right after a blkg_lookup. In particular, this commit exploits the following facts to achieve its goal without introducing further locks. Destroy operations on a blkg invoke, as a first step, hooks of the scheduler associated with the blkg. And these hooks are executed with bfqd->lock held for BFQ. As a consequence, for any blkg associated with the request queue an instance of BFQ is attached to, we are guaranteed that such a blkg is not destroyed, and that all the pointers it contains are consistent, while that instance is holding its bfqd->lock. A blkg_lookup performed with bfqd->lock held then returns a fully consistent blkg, which remains consistent until this lock is held. In more detail, this holds even if the returned blkg is a copy of the original one. Finally, also the object describing a group inside BFQ needs to be protected from destruction on the blkg_free of the original blkg (which invokes bfq_pd_free). This commit adds private refcounting for this object, to let it disappear only after no bfq_queue refers to it any longer. This commit also removes or updates some stale comments on locking issues related to blk-cgroup operations. Reported-by: Tomas Konir Reported-by: Lee Tibbert Reported-by: Marco Piazza Signed-off-by: Paolo Valente Tested-by: Tomas Konir Tested-by: Lee Tibbert Tested-by: Marco Piazza Signed-off-by: Jens Axboe block/bfq-cgroup.c | 116 +++++++++++++++++++++++++++++++++++++++++----------- block/bfq-iosched.c | 2 +- block/bfq-iosched.h | 23 +++++------ 3 files changed, 105 insertions(+), 36 deletions(-) commit bcdaa2b8a640d6e3d29d3257434fe741fcba4a9c Merge: 8397ed3 4f19c0d Author: David S. Miller Date: Thu Jun 8 11:45:49 2017 -0400 Merge branch 'netvsc-bug-fixes' Stephen Hemminger says: ==================== netvsc: bug fixes These are bugfixes for netvsc driver in 4.12. ==================== Signed-off-by: David S. Miller commit 4f19c0d8070cd4aa8e85bbf8a19d9ef5bef77c90 Author: stephen hemminger Date: Wed Jun 7 15:53:49 2017 -0700 netvsc: move filter setting to rndis_device The work queue and handling of network filter parameters should be in rndis_device. This gets rid of warning from RCU checks, eliminates a race and cleans up code. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 5 +++-- drivers/net/hyperv/netvsc_drv.c | 33 ++------------------------------- drivers/net/hyperv/rndis_filter.c | 30 +++++++++++++++++++++++++++++- 3 files changed, 34 insertions(+), 34 deletions(-) commit a5ecd43992a7cd9f91d5f98b0082ae44df5e543c Author: stephen hemminger Date: Wed Jun 7 15:53:48 2017 -0700 netvsc: fix net poll mode The ndo_poll_controller function needs to schedule NAPI to pick up arriving packets and send completions. Otherwise no data will ever be received. For simple case of netconsole, it also will allow send completions to happen. Without this netpoll will eventually get stuck. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit fbd4c7e768f1719bea340e40148800279d230922 Author: stephen hemminger Date: Wed Jun 7 15:53:47 2017 -0700 netvsc: fix rcu dereference warning from ethtool The ethtool info command calls the netvsc get_sset_count with RTNL but not with RCU. Which causes warning: drivers/net/hyperv/netvsc_drv.c:1010 suspicious rcu_dereference_check() usage! Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1123a6041654e8f889014659593bad4168e542c2 Author: Paolo Bonzini Date: Wed May 31 14:03:11 2017 +0200 srcu: Allow use of Classic SRCU from both process and interrupt context Linu Cherian reported a WARN in cleanup_srcu_struct() when shutting down a guest running iperf on a VFIO assigned device. This happens because irqfd_wakeup() calls srcu_read_lock(&kvm->irq_srcu) in interrupt context, while a worker thread does the same inside kvm_set_irq(). If the interrupt happens while the worker thread is executing __srcu_read_lock(), updates to the Classic SRCU ->lock_count[] field or the Tree SRCU ->srcu_lock_count[] field can be lost. The docs say you are not supposed to call srcu_read_lock() and srcu_read_unlock() from irq context, but KVM interrupt injection happens from (host) interrupt context and it would be nice if SRCU supported the use case. KVM is using SRCU here not really for the "sleepable" part, but rather due to its IPI-free fast detection of grace periods. It is therefore not desirable to switch back to RCU, which would effectively revert commit 719d93cd5f5c ("kvm/irqchip: Speed up KVM_SET_GSI_ROUTING", 2014-01-16). However, the docs are overly conservative. You can have an SRCU instance only has users in irq context, and you can mix process and irq context as long as process context users disable interrupts. In addition, __srcu_read_unlock() actually uses this_cpu_dec() on both Tree SRCU and Classic SRCU. For those two implementations, only srcu_read_lock() is unsafe. When Classic SRCU's __srcu_read_unlock() was changed to use this_cpu_dec(), in commit 5a41344a3d83 ("srcu: Simplify __srcu_read_unlock() via this_cpu_dec()", 2012-11-29), __srcu_read_lock() did two increments. Therefore it kept __this_cpu_inc(), with preempt_disable/enable in the caller. Tree SRCU however only does one increment, so on most architectures it is more efficient for __srcu_read_lock() to use this_cpu_inc(), and any performance differences appear to be down in the noise. Cc: stable@vger.kernel.org Fixes: 719d93cd5f5c ("kvm/irqchip: Speed up KVM_SET_GSI_ROUTING") Reported-by: Linu Cherian Suggested-by: Linu Cherian Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini Cc: Linus Torvalds Signed-off-by: Paul E. McKenney include/linux/srcu.h | 2 -- kernel/rcu/srcu.c | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) commit cdf7abc4610a7f1c43d06cda246c5f748a4fd267 Author: Paolo Bonzini Date: Wed May 31 14:03:10 2017 +0200 srcu: Allow use of Tiny/Tree SRCU from both process and interrupt context Linu Cherian reported a WARN in cleanup_srcu_struct() when shutting down a guest running iperf on a VFIO assigned device. This happens because irqfd_wakeup() calls srcu_read_lock(&kvm->irq_srcu) in interrupt context, while a worker thread does the same inside kvm_set_irq(). If the interrupt happens while the worker thread is executing __srcu_read_lock(), updates to the Classic SRCU ->lock_count[] field or the Tree SRCU ->srcu_lock_count[] field can be lost. The docs say you are not supposed to call srcu_read_lock() and srcu_read_unlock() from irq context, but KVM interrupt injection happens from (host) interrupt context and it would be nice if SRCU supported the use case. KVM is using SRCU here not really for the "sleepable" part, but rather due to its IPI-free fast detection of grace periods. It is therefore not desirable to switch back to RCU, which would effectively revert commit 719d93cd5f5c ("kvm/irqchip: Speed up KVM_SET_GSI_ROUTING", 2014-01-16). However, the docs are overly conservative. You can have an SRCU instance only has users in irq context, and you can mix process and irq context as long as process context users disable interrupts. In addition, __srcu_read_unlock() actually uses this_cpu_dec() on both Tree SRCU and Classic SRCU. For those two implementations, only srcu_read_lock() is unsafe. When Classic SRCU's __srcu_read_unlock() was changed to use this_cpu_dec(), in commit 5a41344a3d83 ("srcu: Simplify __srcu_read_unlock() via this_cpu_dec()", 2012-11-29), __srcu_read_lock() did two increments. Therefore it kept __this_cpu_inc(), with preempt_disable/enable in the caller. Tree SRCU however only does one increment, so on most architectures it is more efficient for __srcu_read_lock() to use this_cpu_inc(), and any performance differences appear to be down in the noise. Unlike Classic and Tree SRCU, Tiny SRCU does increments and decrements on a single variable. Therefore, as Peter Zijlstra pointed out, Tiny SRCU's implementation already supports mixed-context use of srcu_read_lock() and srcu_read_unlock(), at least as long as uses of srcu_read_lock() and srcu_read_unlock() in each handler are nested and paired properly. In other words, it is still illegal to (say) invoke srcu_read_lock() in an interrupt handler and to invoke the matching srcu_read_unlock() in a softirq handler. Therefore, the only change required for Tiny SRCU is to its comments. Fixes: 719d93cd5f5c ("kvm/irqchip: Speed up KVM_SET_GSI_ROUTING") Reported-by: Linu Cherian Suggested-by: Linu Cherian Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini Cc: Linus Torvalds Signed-off-by: Paul E. McKenney Tested-by: Paolo Bonzini kernel/rcu/srcutiny.c | 7 ++++--- kernel/rcu/srcutree.c | 5 ++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 95989c46d2a156365867b1d795fdefce71bce378 Author: Brian Foster Date: Thu Jun 8 08:23:07 2017 -0700 xfs: fix spurious spin_is_locked() assert failures on non-smp kernels The 0-day kernel test robot reports assertion failures on !CONFIG_SMP kernels due to failed spin_is_locked() checks. As it turns out, spin_is_locked() is hardcoded to return zero on !CONFIG_SMP kernels and so this function cannot be relied on to verify spinlock state in this configuration. To avoid this problem, replace the associated asserts with lockdep variants that do the right thing regardless of kernel configuration. Drop the one assert that checks for an unlocked lock as there is no suitable lockdep variant for that case. This moves the spinlock checks from XFS debug code to lockdep, but generally provides the same level of protection. Reported-by: kbuild test robot Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf.c | 2 +- fs/xfs/xfs_icache.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) commit 8397ed36b7c585f8d3e06c431f4137309124f78f Author: David Ahern Date: Wed Jun 7 12:26:23 2017 -0600 net: ipv6: Release route when device is unregistering Roopa reported attempts to delete a bond device that is referenced in a multipath route is hanging: $ ifdown bond2 # ifupdown2 command that deletes virtual devices unregister_netdevice: waiting for bond2 to become free. Usage count = 2 Steps to reproduce: echo 1 > /proc/sys/net/ipv6/conf/all/ignore_routes_with_linkdown ip link add dev bond12 type bond ip link add dev bond13 type bond ip addr add 2001:db8:2::0/64 dev bond12 ip addr add 2001:db8:3::0/64 dev bond13 ip route add 2001:db8:33::0/64 nexthop via 2001:db8:2::2 nexthop via 2001:db8:3::2 ip link del dev bond12 ip link del dev bond13 The root cause is the recent change to keep routes on a linkdown. Update the check to detect when the device is unregistering and release the route for that case. Fixes: a1a22c12060e4 ("net: ipv6: Keep nexthop of multipath route on admin down") Reported-by: Roopa Prabhu Signed-off-by: David Ahern Acked-by: Roopa Prabhu Signed-off-by: David S. Miller include/linux/netdevice.h | 5 +++++ net/ipv6/route.c | 1 + 2 files changed, 6 insertions(+) commit 0eed9cf58446b28b233388b7f224cbca268b6986 Author: Mintz, Yuval Date: Wed Jun 7 21:00:33 2017 +0300 net: Zero ifla_vf_info in rtnl_fill_vfinfo() Some of the structure's fields are not initialized by the rtnetlink. If driver doesn't set those in ndo_get_vf_config(), they'd leak memory to user. Signed-off-by: Yuval Mintz CC: Michal Schmidt Reviewed-by: Greg Rose Signed-off-by: David S. Miller net/core/rtnetlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dd0da17b209ed91f39872766634ca967c170ada1 Author: Mateusz Jurczyk Date: Wed Jun 7 16:14:29 2017 +0200 decnet: dn_rtmsg: Improve input length sanitization in dnrmg_receive_user_skb Verify that the length of the socket buffer is sufficient to cover the nlmsghdr structure before accessing the nlh->nlmsg_len field for further input sanitization. If the client only supplies 1-3 bytes of data in sk_buff, then nlh->nlmsg_len remains partially uninitialized and contains leftover memory from the corresponding kernel allocation. Operating on such data may result in indeterminate evaluation of the nlmsg_len < sizeof(*nlh) expression. The bug was discovered by a runtime instrumentation designed to detect use of uninitialized memory in the kernel. The patch prevents this and other similar tools (e.g. KMSAN) from flagging this behavior in the future. Signed-off-by: Mateusz Jurczyk Signed-off-by: David S. Miller net/decnet/netfilter/dn_rtmsg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c164772dd32343ee19e276ce0137830557517834 Author: David S. Miller Date: Thu Jun 8 10:50:18 2017 -0400 Revert "decnet: dn_rtmsg: Improve input length sanitization in dnrmg_receive_user_skb" This reverts commit 85eac2ba35a2dbfbdd5767c7447a4af07444a5b4. There is an updated version of this fix which we should use instead. Signed-off-by: David S. Miller net/decnet/netfilter/dn_rtmsg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9065bc386fcf52dee8f697450ddeb788e1bd514c Author: Christian Lamparter Date: Wed Jun 7 15:51:16 2017 +0200 net: emac: fix and unify emac_mdio functions emac_mdio_read_link() was not copying the requested phy settings back into the emac driver's own phy api. This has caused a link speed mismatch issue for the AR8035 as the emac driver kept trying to connect with 10/100MBps on a 1GBit/s link. This patch also unifies shared code between emac_setup_aneg() and emac_mdio_setup_forced(). And furthermore it removes a chunk of emac_mdio_init_phy(), that was copying the same data into itself. Signed-off-by: Christian Lamparter Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/ibm/emac/core.c | 41 ++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 23 deletions(-) commit 19d90ece81da802207a9b91ce95a29fbdc40626e Author: Christian Lamparter Date: Wed Jun 7 15:51:15 2017 +0200 net: emac: fix reset timeout with AR8035 phy This patch fixes a problem where the AR8035 PHY can't be detected on an Cisco Meraki MR24, if the ethernet cable is not connected on boot. Russell Senior provided steps to reproduce the issue: |Disconnect ethernet cable, apply power, wait until device has booted, |plug in ethernet, check for interfaces, no eth0 is listed. | |This appears to be a problem during probing of the AR8035 Phy chip. |When ethernet has no link, the phy detection fails, and eth0 is not |created. Plugging ethernet later has no effect, because there is no |interface as far as the kernel is concerned. The relevant part of |the boot log looks like this: |this is the failing case: | |[ 0.876611] /plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode |[ 0.882532] /plb/opb/ethernet@ef600c00: reset timeout |[ 0.888546] /plb/opb/ethernet@ef600c00: can't find PHY! |and the succeeding case: | |[ 0.876672] /plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode |[ 0.883952] eth0: EMAC-0 /plb/opb/ethernet@ef600c00, MAC 00:01:.. |[ 0.890822] eth0: found Atheros 8035 Gigabit Ethernet PHY (0x01) Based on the comment and the commit message of commit 23fbb5a87c56 ("emac: Fix EMAC soft reset on 460EX/GT"). This is because the AR8035 PHY doesn't provide the TX Clock, if the ethernet cable is not attached. This causes the reset to timeout and the PHY detection code in emac_init_phy() is unable to detect the AR8035 PHY. As a result, the emac driver bails out early and the user left with no ethernet. In order to stay compatible with existing configurations, the driver tries the current reset approach at first. Only if the first attempt timed out, it does perform one more retry with the clock temporarily switched to the internal source for just the duration of the reset. LEDE-Bug: #687 Cc: Chris Blake Reported-by: Russell Senior Fixes: 23fbb5a87c56e98 ("emac: Fix EMAC soft reset on 460EX/GT") Signed-off-by: Christian Lamparter Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/ibm/emac/core.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit 85eac2ba35a2dbfbdd5767c7447a4af07444a5b4 Author: Mateusz Jurczyk Date: Wed Jun 7 15:14:29 2017 +0200 decnet: dn_rtmsg: Improve input length sanitization in dnrmg_receive_user_skb Verify that the length of the socket buffer is sufficient to cover the entire nlh->nlmsg_len field before accessing that field for further input sanitization. If the client only supplies 1-3 bytes of data in sk_buff, then nlh->nlmsg_len remains partially uninitialized and contains leftover memory from the corresponding kernel allocation. Operating on such data may result in indeterminate evaluation of the nlmsg_len < sizeof(*nlh) expression. The bug was discovered by a runtime instrumentation designed to detect use of uninitialized memory in the kernel. The patch prevents this and other similar tools (e.g. KMSAN) from flagging this behavior in the future. Signed-off-by: Mateusz Jurczyk Signed-off-by: David S. Miller net/decnet/netfilter/dn_rtmsg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9e53932d888b7f32475db72f859f8f38cc2135fb Merge: a364163 1ba15b2 Author: Paolo Bonzini Date: Thu Jun 8 16:35:18 2017 +0200 Merge tag 'kvm-s390-master-4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: Fix for master (4.12) - The newly created AIS capability enables the feature unconditionally and ignores the cpu model commit 85d0331aedff4646b2a2b14561c8be3678ffcee2 Merge: 6460495 9947d6a Author: Jens Axboe Date: Thu Jun 8 08:33:45 2017 -0600 Merge branch 'nvme-4.12' of git://git.infradead.org/nvme into for-linus Christoph writes: "A few NVMe fixes for 4.12-rc, PCIe reset fixes and APST fixes, a RDMA reconnect fix, two FC fixes and a general controller removal fix." commit ed66e50d9587fc0bb032e276a2563c0068a5b63a Author: David S. Miller Date: Thu Jun 8 10:16:05 2017 -0400 hsi: Fix build regression due to netdev destructor fix. > ../drivers/hsi/clients/ssi_protocol.c:1069:5: error: 'struct net_device' has no member named 'destructor' Reported-by: Mark Brown Reported-by: Stephen Rothwell Signed-off-by: David S. Miller drivers/hsi/clients/ssi_protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd1997f6c11483da819a7719aa013093b8003743 Author: Stephen Rothwell Date: Thu Jun 8 19:06:29 2017 +1000 net: s390: fix up for "Fix inconsistent teardown and release of private netdev state" Signed-off-by: Stephen Rothwell Signed-off-by: David S. Miller drivers/s390/net/netiucv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ef6c4d75e35345f8f362d6754bcd9a28292a897c Author: Jani Nikula Date: Thu Jun 8 16:58:23 2017 +0300 drm/i915: fix warning for unused variable drivers/gpu/drm/i915/intel_engine_cs.c: In function ‘intel_engine_is_idle’: drivers/gpu/drm/i915/intel_engine_cs.c:1103:27: error: unused variable ‘dev_priv’ [-Werror=unused-variable] struct drm_i915_private *dev_priv = engine->i915; ^~~~~~~~ Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_engine_cs.c | 2 -- 1 file changed, 2 deletions(-) commit 6460495709aeb651896bc8e5c134b2e4ca7d34a8 Author: James Wang Date: Thu Jun 8 14:52:51 2017 +0800 Fix loop device flush before configure v3 While installing SLES-12 (based on v4.4), I found that the installer will stall for 60+ seconds during LVM disk scan. The root cause was determined to be the removal of a bound device check in loop_flush() by commit b5dd2f6047ca ("block: loop: improve performance via blk-mq"). Restoring this check, examining ->lo_state as set by loop_set_fd() eliminates the bad behavior. Test method: modprobe loop max_loop=64 dd if=/dev/zero of=disk bs=512 count=200K for((i=0;i<4;i++))do losetup -f disk; done mkfs.ext4 -F /dev/loop0 for((i=0;i<4;i++))do mkdir t$i; mount /dev/loop$i t$i;done for f in `ls /dev/loop[0-9]*|sort`; do \ echo $f; dd if=$f of=/dev/null bs=512 count=1; \ done Test output: stock patched /dev/loop0 18.1217e-05 8.3842e-05 /dev/loop1 6.1114e-05 0.000147979 /dev/loop10 0.414701 0.000116564 /dev/loop11 0.7474 6.7942e-05 /dev/loop12 0.747986 8.9082e-05 /dev/loop13 0.746532 7.4799e-05 /dev/loop14 0.480041 9.3926e-05 /dev/loop15 1.26453 7.2522e-05 Note that from loop10 onward, the device is not mounted, yet the stock kernel consumes several orders of magnitude more wall time than it does for a mounted device. (Thanks for Mike Galbraith , give a changelog review.) Reviewed-by: Hannes Reinecke Reviewed-by: Ming Lei Signed-off-by: James Wang Fixes: b5dd2f6047ca ("block: loop: improve performance via blk-mq") Signed-off-by: Jens Axboe drivers/block/loop.c | 3 +++ 1 file changed, 3 insertions(+) commit 16ddcc34b8bde5d9257114a16565fac73237bef9 Author: Martin Schwidefsky Date: Tue Jan 17 12:32:15 2017 +0100 s390: update defconfig Signed-off-by: Martin Schwidefsky arch/s390/configs/default_defconfig | 39 ++++++++++++++++++++++++++++----- arch/s390/configs/gcov_defconfig | 28 +++++++++++++++++++---- arch/s390/configs/performance_defconfig | 27 +++++++++++++++++++---- arch/s390/configs/zfcpdump_defconfig | 6 +++-- arch/s390/defconfig | 8 +++---- 5 files changed, 87 insertions(+), 21 deletions(-) commit 698b851073ddf5a894910d63ca04605e0473414e Author: Marcin Nowakowski Date: Thu Jun 8 15:20:32 2017 +0200 MIPS: kprobes: flush_insn_slot should flush only if probe initialised When ftrace is used with kprobes, it is possible for a kprobe to contain an invalid location (ie. only initialised to 0 and not to a specific location in the code). Trying to perform a cache flush on such location leads to a crash r4k_flush_icache_range(). Fixes: c1bf207d6ee1 ("MIPS: kprobe: Add support.") Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16296/ Signed-off-by: Ralf Baechle arch/mips/include/asm/kprobes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a3641631d14571242eec0d30c9faa786cbf52d44 Author: Wanpeng Li Date: Thu Jun 8 01:22:07 2017 -0700 KVM: cpuid: Fix read/write out-of-bounds vulnerability in cpuid emulation If "i" is the last element in the vcpu->arch.cpuid_entries[] array, it potentially can be exploited the vulnerability. this will out-of-bounds read and write. Luckily, the effect is small: /* when no next entry is found, the current entry[i] is reselected */ for (j = i + 1; ; j = (j + 1) % nent) { struct kvm_cpuid_entry2 *ej = &vcpu->arch.cpuid_entries[j]; if (ej->function == e->function) { It reads ej->maxphyaddr, which is user controlled. However... ej->flags |= KVM_CPUID_FLAG_STATE_READ_NEXT; After cpuid_entries there is int maxphyaddr; struct x86_emulate_ctxt emulate_ctxt; /* 16-byte aligned */ So we have: - cpuid_entries at offset 1B50 (6992) - maxphyaddr at offset 27D0 (6992 + 3200 = 10192) - padding at 27D4...27DF - emulate_ctxt at 27E0 And it writes in the padding. Pfew, writing the ops field of emulate_ctxt would have been much worse. This patch fixes it by modding the index to avoid the out-of-bounds access. Worst case, i == j and ej->function == e->function, the loop can bail out. Reported-by: Moguofang Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Guofang Mo Cc: stable@vger.kernel.org Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 38a4f43d5698daec601f4c5652ec287e594faf84 Merge: d491221 33b5c38 Author: Paolo Bonzini Date: Thu Jun 8 15:04:38 2017 +0200 Merge tag 'kvm-arm-for-v4.12-rc5-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/ARM Fixes for v4.12-rc5 - Take 2 Changes include: - Fix an issue with migrating GICv2 VMs on GICv3 systems. - Squashed a bug for gicv3 when figuring out preemption levels. - Fix a potential null pointer derefence in KVM happening under memory pressure. - Maintain RES1 bits in the SCTLR_EL2 to make sure KVM works on new architecture revisions. - Allow unaligned accesses at EL2/HYP commit 87051ec120bb9abd9e57aecf2569c00d587b6f33 Author: Marcin Nowakowski Date: Tue May 23 12:56:43 2017 +0200 MIPS: ftrace: fix init functions tracing Since introduction of tracing for init functions the in_kernel_space() check is no longer correct, as it ignores the init sections. As a result, when probes are inserted (and disabled) in the init functions, a branch instruction is inserted instead of a nop, which is likely to result in random crashes during boot. Remove the MIPS-specific in_kernel_space() method and replace it with a generic core_kernel_text() that also checks for init sections during system boot stage. Fixes: 42c269c88dc1 ("ftrace: Allow for function tracing to record init functions on boot up") Signed-off-by: Marcin Nowakowski Tested-by: Matt Redfearn Cc: Steven Rostedt Cc: Ingo Molnar Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16092/ Signed-off-by: Ralf Baechle arch/mips/kernel/ftrace.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) commit c56e7a4c3e77f6fbd9b55c06c14eda65aae58958 Author: Marcin Nowakowski Date: Tue Apr 11 09:00:36 2017 +0200 MIPS: mm: adjust PKMAP location Space reserved for PKMap should span from PKMAP_BASE to FIXADDR_START. For large page sizes this is not the case as eg. for 64k pages the range currently defined is from 0xfe000000 to 0x102000000(!!) which obviously isn't right. Remove the hardcoded location and set the BASE address as an offset from FIXADDR_START. Since all PKMAP ptes have to be placed in a contiguous memory, ensure that this is the case by placing them all in a single page. This is achieved by aligning the end address to pkmap pages count pages. Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15950/ Signed-off-by: Ralf Baechle arch/mips/include/asm/pgtable-32.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 725a269b3dd149f36c206c218253336774ef26f5 Author: Marcin Nowakowski Date: Tue Apr 11 09:00:35 2017 +0200 MIPS: highmem: ensure that we don't use more than one page for PTEs All PTEs used by PKMAP should be allocated in a contiguous memory area, but we do not currently have a mechanism to enforce that, so ensure that we don't try to allocate more entries than would fit in a single page. Current fixed value of 1024 would not work with XPA enabled when sizeof(pte_t)==8 and we need two pages to store pte tables. Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15949/ Signed-off-by: Ralf Baechle arch/mips/include/asm/highmem.h | 5 +++++ 1 file changed, 5 insertions(+) commit 71eb989ab5a110df8bcbb9609bacde73feacbedd Author: Marcin Nowakowski Date: Tue Apr 11 09:00:34 2017 +0200 MIPS: mm: fixed mappings: correct initialisation fixrange_init operates at PMD-granularity and expects the addresses to be PMD-size aligned, but currently that might not be the case for PKMAP_BASE unless it is defined properly, so ensure a correct alignment is used before passing the address to fixrange_init. fixed mappings: only align the start address that is passed to fixrange_init rather than the value before adding the size, as we may end up with uninitialised upper part of the range. Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15948/ Signed-off-by: Ralf Baechle arch/mips/mm/pgtable-32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f7a31b5e7874f77464a4eae0a8ba84b9ae0b3a54 Author: Marcin Nowakowski Date: Wed Apr 19 14:07:43 2017 +0200 MIPS: perf: Remove incorrect odd/even counter handling for I6400 All performance counters on I6400 (odd and even) are capable of counting any of the available events, so drop current logic of using the extra bit to determine which counter to use. Signed-off-by: Marcin Nowakowski Fixes: 4e88a8621301 ("MIPS: Add cases for CPU_I6400") Fixes: fd716fca10fc ("MIPS: perf: Fix I6400 event numbers") Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15991/ Signed-off-by: Ralf Baechle arch/mips/kernel/perf_event_mipsxx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit c6ee9619e2edd9912316f7e2eaf9ffa14fafe9f9 Author: Michael Ellerman Date: Thu Jun 8 16:29:59 2017 +1000 powerpc/book3s64: Move PPC_DT_CPU_FTRs and enable it by default The PPC_DT_CPU_FTRs is a bit misplaced in menuconfig, it shows up with other general kernel options. It's really more at home in the "Platform Support" section, so move it there. Also enable it by default, for Book3s 64. It does mostly nothing unless the device tree properties are found, and we will want it enabled eventually in distro kernels, so turn it on to start getting more testing. Fixes: 5a61ef74f269 ("powerpc/64s: Support new device tree binding for discovering CPU features") Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 11 ----------- arch/powerpc/platforms/Kconfig | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) commit 92d9dfda8b547cc292af27e11e11c9eff3bb574f Author: Aneesh Kumar K.V Date: Thu Jun 1 20:05:04 2017 +0530 powerpc/mm/4k: Limit 4k page size config to 64TB virtual address space Supporting 512TB requires us to do a order 3 allocation for level 1 page table (pgd). This results in page allocation failures with certain workloads. For now limit 4k linux page size config to 64TB. Fixes: f6eedbba7a26 ("powerpc/mm/hash: Increase VA range to 128TB") Reported-by: Hugh Dickins Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/hash-4k.h | 2 +- arch/powerpc/include/asm/processor.h | 25 ++++++++++++------------- arch/powerpc/kernel/setup-common.c | 2 +- arch/powerpc/mm/mmu_context_book3s64.c | 2 +- 4 files changed, 15 insertions(+), 16 deletions(-) commit cec422c11caeeccae709e9942058b6b644ce434c Author: Frederic Barrat Date: Tue Jun 6 11:43:41 2017 +0200 cxl: Fix error path on bad ioctl Fix error path if we can't copy user structure on CXL_IOCTL_START_WORK ioctl. We shouldn't unlock the context status mutex as it was not locked (yet). Fixes: 0712dc7e73e5 ("cxl: Fix issues when unmapping contexts") Cc: stable@vger.kernel.org # v3.19+ Signed-off-by: Frederic Barrat Reviewed-by: Vaibhav Jain Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman drivers/misc/cxl/file.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit b94aac64a4c17c5af92f9b4ba7164c5b384d5c02 Author: Hans Verkuil Date: Wed Jun 7 12:07:51 2017 -0300 [media] cec: race fix: don't return -ENONET in cec_receive() When calling CEC_RECEIVE do not check if the adapter is configured. Typically CEC_RECEIVE is called after a select() and if that indicates that there are messages in the receive queue, then you should always be able to dequeue a message. The race condition here is that a message has been received and is queued, so select() tells userspace that a message is available. But before the application calls CEC_RECEIVE the adapter is unconfigured (e.g. the HDMI cable is removed). Now select will always report that there is a message, but calling CEC_RECEIVE will always return -ENONET because the adapter is no longer configured and so will never actually dequeue the message. There is really no need for this check, and in fact the ENONET error code was never documented for CEC_RECEIVE. This may have been a left-over of old code that was never updated. Signed-off-by: Hans Verkuil Cc: # for v4.10 and up Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-api.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit dac8bbbae1d0ccba96402d25deeed3a2e87992c6 Author: Petr Mladek Date: Thu Jun 8 12:01:30 2017 +0200 Revert "printk: fix double printing with earlycon" This reverts commit cf39bf58afdaabc0b86f141630fb3fd18190294e. The commit regression to users that define both console=ttyS1 and console=ttyS0 on the command line, see https://lkml.kernel.org/r/20170509082915.GA13236@bistromath.localdomain The kernel log messages always appeared only on one serial port. It is even documented in Documentation/admin-guide/serial-console.rst: "Note that you can only define one console per device type (serial, video)." The above mentioned commit changed the order in which the command line parameters are searched. As a result, the kernel log messages go to the last mentioned ttyS* instead of the first one. We long thought that using two console=ttyS* on the command line did not make sense. But then we realized that console= parameters were handled also by systemd, see http://0pointer.de/blog/projects/serial-console.html "By default systemd will instantiate one serial-getty@.service on the main kernel console, if it is not a virtual terminal." where "[4] If multiple kernel consoles are used simultaneously, the main console is the one listed first in /sys/class/tty/console/active, which is the last one listed on the kernel command line." This puts the original report into another light. The system is running in qemu. The first serial port is used to store the messages into a file. The second one is used to login to the system via a socket. It depends on systemd and the historic kernel behavior. By other words, systemd causes that it makes sense to define both console=ttyS1 console=ttyS0 on the command line. The kernel fix caused regression related to userspace (systemd) and need to be reverted. In addition, it went out that the fix helped only partially. The messages still were duplicated when the boot console was removed early by late_initcall(printk_late_init). Then the entire log was replayed when the same console was registered as a normal one. Link: 20170606160339.GC7604@pathway.suse.cz Cc: Aleksey Makarov Cc: Sabrina Dubroca Cc: Sudeep Holla Cc: Greg Kroah-Hartman Cc: Peter Hurley Cc: Jiri Slaby Cc: Robin Murphy , Cc: Steven Rostedt Cc: "Nair, Jayachandran" Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reported-by: Sabrina Dubroca Acked-by: Sergey Senozhatsky Signed-off-by: Petr Mladek kernel/printk/printk.c | 46 ++++++++++------------------------------------ 1 file changed, 10 insertions(+), 36 deletions(-) commit d41519a69b35b10af7fda867fb9100df24fdf403 Author: David Miller Date: Fri Jun 2 11:28:54 2017 -0400 crypto: Work around deallocated stack frame reference gcc bug on sparc. On sparc, if we have an alloca() like situation, as is the case with SHASH_DESC_ON_STACK(), we can end up referencing deallocated stack memory. The result can be that the value is clobbered if a trap or interrupt arrives at just the right instruction. It only occurs if the function ends returning a value from that alloca() area and that value can be placed into the return value register using a single instruction. For example, in lib/libcrc32c.c:crc32c() we end up with a return sequence like: return %i7+8 lduw [%o5+16], %o0 ! MEM[(u32 *)__shash_desc.1_10 + 16B], %o5 holds the base of the on-stack area allocated for the shash descriptor. But the return released the stack frame and the register window. So if an intererupt arrives between 'return' and 'lduw', then the value read at %o5+16 can be corrupted. Add a data compiler barrier to work around this problem. This is exactly what the gcc fix will end up doing as well, and it absolutely should not change the code generated for other cpus (unless gcc on them has the same bug :-) With crucial insight from Eric Sandeen. Cc: Reported-by: Anatoly Pugachev Signed-off-by: David S. Miller Signed-off-by: Herbert Xu drivers/infiniband/sw/rxe/rxe.h | 5 ++++- fs/btrfs/hash.c | 5 ++++- fs/f2fs/f2fs.h | 5 ++++- lib/libcrc32c.c | 6 ++++-- 4 files changed, 16 insertions(+), 5 deletions(-) commit cc1582c231ea041fbc68861dfaf957eaf902b829 Author: Jin Yao Date: Thu May 25 18:09:07 2017 +0800 perf/core: Drop kernel samples even though :u is specified When doing sampling, for example: perf record -e cycles:u ... On workloads that do a lot of kernel entry/exits we see kernel samples, even though :u is specified. This is due to skid existing. This might be a security issue because it can leak kernel addresses even though kernel sampling support is disabled. The patch drops the kernel samples if exclude_kernel is specified. For example, test on Haswell desktop: perf record -e cycles:u perf report --stdio Before patch applied: 99.77% mgen mgen [.] buf_read 0.20% mgen mgen [.] rand_buf_init 0.01% mgen [kernel.vmlinux] [k] apic_timer_interrupt 0.00% mgen mgen [.] last_free_elem 0.00% mgen libc-2.23.so [.] __random_r 0.00% mgen libc-2.23.so [.] _int_malloc 0.00% mgen mgen [.] rand_array_init 0.00% mgen [kernel.vmlinux] [k] page_fault 0.00% mgen libc-2.23.so [.] __random 0.00% mgen libc-2.23.so [.] __strcasestr 0.00% mgen ld-2.23.so [.] strcmp 0.00% mgen ld-2.23.so [.] _dl_start 0.00% mgen libc-2.23.so [.] sched_setaffinity@@GLIBC_2.3.4 0.00% mgen ld-2.23.so [.] _start We can see kernel symbols apic_timer_interrupt and page_fault. After patch applied: 99.79% mgen mgen [.] buf_read 0.19% mgen mgen [.] rand_buf_init 0.00% mgen libc-2.23.so [.] __random_r 0.00% mgen mgen [.] rand_array_init 0.00% mgen mgen [.] last_free_elem 0.00% mgen libc-2.23.so [.] vfprintf 0.00% mgen libc-2.23.so [.] rand 0.00% mgen libc-2.23.so [.] __random 0.00% mgen libc-2.23.so [.] _int_malloc 0.00% mgen libc-2.23.so [.] _IO_doallocbuf 0.00% mgen ld-2.23.so [.] do_lookup_x 0.00% mgen ld-2.23.so [.] open_verify.constprop.7 0.00% mgen ld-2.23.so [.] _dl_important_hwcaps 0.00% mgen libc-2.23.so [.] sched_setaffinity@@GLIBC_2.3.4 0.00% mgen ld-2.23.so [.] _start There are only userspace symbols. Signed-off-by: Jin Yao Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: acme@kernel.org Cc: jolsa@kernel.org Cc: kan.liang@intel.com Cc: mark.rutland@arm.com Cc: will.deacon@arm.com Cc: yao.jin@intel.com Link: http://lkml.kernel.org/r/1495706947-3744-1-git-send-email-yao.jin@linux.intel.com Signed-off-by: Ingo Molnar kernel/events/core.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 5b0bc9ac2ce4881ee318a21f31140584ce4dbdad Author: Dominik Brodowski Date: Wed Jun 7 11:58:19 2017 +0200 x86/microcode/intel: Clear patch pointer before jettisoning the initrd During early boot, load_ucode_intel_ap() uses __load_ucode_intel() to obtain a pointer to the relevant microcode patch (embedded in the initrd), and stores this value in 'intel_ucode_patch' to speed up the microcode patch application for subsequent CPUs. On resuming from suspend-to-RAM, however, load_ucode_ap() calls load_ucode_intel_ap() for each non-boot-CPU. By then the initramfs is long gone so the pointer stored in 'intel_ucode_patch' no longer points to a valid microcode patch. Clear that pointer so that we effectively fall back to the CPU hotplug notifier callbacks to update the microcode. Signed-off-by: Dominik Brodowski [ Edit and massage commit message. ] Signed-off-by: Borislav Petkov Cc: # 4.10.. Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170607095819.9754-1-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/microcode/intel.c | 3 +++ 1 file changed, 3 insertions(+) commit 462c5a826eba39fad819ccef916f9943ff42bf0d Author: Jessica Yu Date: Wed Jun 7 23:52:36 2017 -0700 MAINTAINERS: update email address for Jessica Yu I will be traveling in the upcoming months and it'll be much easier for me to access my kernel.org email rather than my work one. Change my email address in the MAINTAINERS file from jeyu@redhat.com to jeyu@kernel.org. Signed-off-by: Jessica Yu MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b169c13de473a85b3c859bb36216a4cb5f00a54a Author: Jason A. Donenfeld Date: Wed Jun 7 19:45:31 2017 -0400 random: invalidate batched entropy after crng init It's possible that get_random_{u32,u64} is used before the crng has initialized, in which case, its output might not be cryptographically secure. For this problem, directly, this patch set is introducing the *_wait variety of functions, but even with that, there's a subtle issue: what happens to our batched entropy that was generated before initialization. Prior to this commit, it'd stick around, supplying bad numbers. After this commit, we force the entropy to be re-extracted after each phase of the crng has initialized. In order to avoid a race condition with the position counter, we introduce a simple rwlock for this invalidation. Since it's only during this awkward transition period, after things are all set up, we stop using it, so that it doesn't have an impact on performance. Signed-off-by: Jason A. Donenfeld Cc: Greg Kroah-Hartman Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org # v4.11+ drivers/char/random.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 14fc42fa1b3e7ea5160c84d0e686a3a0c1ffe619 Author: SeongJae Park Date: Tue May 30 20:18:25 2017 +0900 perf script python: Remove dups in documentation examples Few shell command examples in perf-script-python.txt has few nitpicks include: - tools/perf/scripts/python directory listing command is unnecessarily repeated. - few examples contain additional information in command prompt unnecessarily and inconsistently. This commit fixes them to enhance readability of the document. Signed-off-by: SeongJae Park Cc: Alexander Shishkin Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Tom Zanussi Fixes: cff68e582237 ("perf/scripts: Add perf-trace-python Documentation") Link: http://lkml.kernel.org/r/20170530111827.21732-4-sj38.park@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script-python.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1bf8d5a4a5da19b1f6e7958fe67db4118fa7a1c1 Author: SeongJae Park Date: Tue May 30 20:18:27 2017 +0900 perf script python: Updated trace_unhandled() signature Default function signature of trace_unhandled() got changed to include a field dict, but its documentation, perf-script-python.txt has not been updated. Fix it. Signed-off-by: SeongJae Park Cc: Alexander Shishkin Cc: Peter Zijlstra Cc: Pierre Tardy Fixes: c02514850d67 ("perf scripts python: Give field dict to unhandled callback") Link: http://lkml.kernel.org/r/20170530111827.21732-6-sj38.park@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script-python.txt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 26ddb8722df865aa67fbe459107d2f3f8e5c6829 Author: SeongJae Park Date: Tue May 30 20:18:26 2017 +0900 perf script python: Fix wrong code snippets in documentation This commit fixes wrong code snippets for trace_begin() and trace_end() function example definition. Signed-off-by: SeongJae Park Cc: Alexander Shishkin Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Tom Zanussi Fixes: cff68e582237 ("perf/scripts: Add perf-trace-python Documentation") Link: http://lkml.kernel.org/r/20170530111827.21732-5-sj38.park@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script-python.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 34d4453dac257be53c21abf2f713c992fb692b5c Author: SeongJae Park Date: Tue May 30 20:18:24 2017 +0900 perf script: Fix documentation errors This commit fixes two errors in documents for perf-script-python and perf-script-perl as below: - /sys/kernel/debug/tracing events -> /sys/kernel/debug/tracing/events/ - trace_handled -> trace_unhandled Signed-off-by: SeongJae Park Cc: Alexander Shishkin Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Tom Zanussi Fixes: cff68e582237 ("perf/scripts: Add perf-trace-python Documentation") Link: http://lkml.kernel.org/r/20170530111827.21732-3-sj38.park@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script-perl.txt | 2 +- tools/perf/Documentation/perf-script-python.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit c76132dc5182776b98e946d674cb41c421661ea9 Author: SeongJae Park Date: Tue May 30 20:18:23 2017 +0900 perf script: Fix outdated comment for perf-trace-python Script generated by the '--gen-script' option contains an outdated comment. It mentions a 'perf-trace-python' document while it has been renamed to 'perf-script-python'. Fix it. Signed-off-by: SeongJae Park Cc: Alexander Shishkin Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 133dc4c39c57 ("perf: Rename 'perf trace' to 'perf script'") Link: http://lkml.kernel.org/r/20170530111827.21732-2-sj38.park@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/scripting-engines/trace-event-python.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d89269a89ebb6a74512f3f40e89cd12017f60a75 Author: SeongJae Park Date: Sun May 7 19:36:42 2017 +0900 perf probe: Fix examples section of documentation An example in perf-probe documentation for pattern of function name based probe addition is not providing example command for that case. This commit fixes the example to give appropriate example command. Signed-off-by: SeongJae Park Acked-by: Masami Hiramatsu Cc: Peter Zijlstra Cc: Taeung Song Fixes: ee391de876ae ("perf probe: Update perf probe document") Link: http://lkml.kernel.org/r/20170507103642.30560-1-sj38.park@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-probe.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 92e75428ffc90e2a0321062379f883f3671cfebe Author: Theodore Ts'o Date: Wed Jun 7 19:01:32 2017 -0400 random: use lockless method of accessing and updating f->reg_idx Linus pointed out that there is a much more efficient way of avoiding the problem that we were trying to address in commit 9dfa7bba35ac0: "fix race in drivers/char/random.c:get_reg()". Signed-off-by: Theodore Ts'o drivers/char/random.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit cf124db566e6b036b8bcbe8decbed740bdfac8c6 Author: David S. Miller Date: Mon May 8 12:52:56 2017 -0400 net: Fix inconsistent teardown and release of private netdev state. Network devices can allocate reasources and private memory using netdev_ops->ndo_init(). However, the release of these resources can occur in one of two different places. Either netdev_ops->ndo_uninit() or netdev->destructor(). The decision of which operation frees the resources depends upon whether it is necessary for all netdev refs to be released before it is safe to perform the freeing. netdev_ops->ndo_uninit() presumably can occur right after the NETDEV_UNREGISTER notifier completes and the unicast and multicast address lists are flushed. netdev->destructor(), on the other hand, does not run until the netdev references all go away. Further complicating the situation is that netdev->destructor() almost universally does also a free_netdev(). This creates a problem for the logic in register_netdevice(). Because all callers of register_netdevice() manage the freeing of the netdev, and invoke free_netdev(dev) if register_netdevice() fails. If netdev_ops->ndo_init() succeeds, but something else fails inside of register_netdevice(), it does call ndo_ops->ndo_uninit(). But it is not able to invoke netdev->destructor(). This is because netdev->destructor() will do a free_netdev() and then the caller of register_netdevice() will do the same. However, this means that the resources that would normally be released by netdev->destructor() will not be. Over the years drivers have added local hacks to deal with this, by invoking their destructor parts by hand when register_netdevice() fails. Many drivers do not try to deal with this, and instead we have leaks. Let's close this hole by formalizing the distinction between what private things need to be freed up by netdev->destructor() and whether the driver needs unregister_netdevice() to perform the free_netdev(). netdev->priv_destructor() performs all actions to free up the private resources that used to be freed by netdev->destructor(), except for free_netdev(). netdev->needs_free_netdev is a boolean that indicates whether free_netdev() should be done at the end of unregister_netdevice(). Now, register_netdevice() can sanely release all resources after ndo_ops->ndo_init() succeeds, by invoking both ndo_ops->ndo_uninit() and netdev->priv_destructor(). And at the end of unregister_netdevice(), we invoke netdev->priv_destructor() and optionally call free_netdev(). Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 6 +++--- drivers/net/caif/caif_hsi.c | 2 +- drivers/net/caif/caif_serial.c | 2 +- drivers/net/caif/caif_spi.c | 2 +- drivers/net/caif/caif_virtio.c | 2 +- drivers/net/can/slcan.c | 7 +++---- drivers/net/can/vcan.c | 2 +- drivers/net/can/vxcan.c | 2 +- drivers/net/dummy.c | 4 ++-- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 +- drivers/net/geneve.c | 2 +- drivers/net/gtp.c | 2 +- drivers/net/hamradio/6pack.c | 2 +- drivers/net/hamradio/bpqether.c | 2 +- drivers/net/ifb.c | 4 ++-- drivers/net/ipvlan/ipvlan_main.c | 2 +- drivers/net/loopback.c | 4 ++-- drivers/net/macsec.c | 4 ++-- drivers/net/macvlan.c | 2 +- drivers/net/nlmon.c | 2 +- drivers/net/slip/slip.c | 7 +++---- drivers/net/team/team.c | 4 ++-- drivers/net/tun.c | 4 ++-- drivers/net/usb/cdc-phonet.c | 2 +- drivers/net/usb/qmi_wwan.c | 2 +- drivers/net/veth.c | 4 ++-- drivers/net/vrf.c | 2 +- drivers/net/vsockmon.c | 2 +- drivers/net/vxlan.c | 2 +- drivers/net/wan/dlci.c | 2 +- drivers/net/wan/hdlc_fr.c | 2 +- drivers/net/wan/lapbether.c | 2 +- drivers/net/wireless/ath/ath6kl/main.c | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 1 - drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 3 ++- drivers/net/wireless/intersil/hostap/hostap_main.c | 2 +- drivers/net/wireless/mac80211_hwsim.c | 2 +- drivers/net/wireless/marvell/mwifiex/main.c | 2 +- drivers/staging/rtl8188eu/os_dep/mon.c | 2 +- drivers/usb/gadget/function/f_phonet.c | 2 +- include/linux/netdevice.h | 7 ++++--- net/8021q/vlan_dev.c | 4 ++-- net/batman-adv/soft-interface.c | 5 ++--- net/bluetooth/6lowpan.c | 2 +- net/bridge/br_device.c | 2 +- net/caif/chnl_net.c | 4 ++-- net/core/dev.c | 8 ++++++-- net/hsr/hsr_device.c | 4 ++-- net/ieee802154/6lowpan/core.c | 2 +- net/ipv4/ip_tunnel.c | 4 ++-- net/ipv4/ipmr.c | 2 +- net/ipv6/ip6_gre.c | 9 +++++---- net/ipv6/ip6_tunnel.c | 8 ++++---- net/ipv6/ip6_vti.c | 8 ++++---- net/ipv6/ip6mr.c | 2 +- net/ipv6/sit.c | 6 +++--- net/irda/irlan/irlan_eth.c | 2 +- net/l2tp/l2tp_eth.c | 2 +- net/mac80211/iface.c | 6 +++--- net/mac802154/iface.c | 7 +++---- net/openvswitch/vport-internal_dev.c | 4 ++-- net/phonet/pep-gprs.c | 2 +- 62 files changed, 105 insertions(+), 103 deletions(-) commit 7005cade1bdbb423413f8aafcbf17a1ec614a585 Author: Daniel Borkmann Date: Wed Jun 7 13:45:37 2017 +0200 bpf, arm64: use separate register for state in stxr Will reported that in BPF_XADD we must use a different register in stxr instruction for the status flag due to otherwise CONSTRAINED UNPREDICTABLE behavior per architecture. Reference manual says [1]: If s == t, then one of the following behaviors must occur: * The instruction is UNDEFINED. * The instruction executes as a NOP. * The instruction performs the store to the specified address, but the value stored is UNKNOWN. Thus, use a different temporary register for the status flag to fix it. Disassembly extract from test 226/STX_XADD_DW from test_bpf.ko: [...] 0000003c: c85f7d4b ldxr x11, [x10] 00000040: 8b07016b add x11, x11, x7 00000044: c80c7d4b stxr w12, x11, [x10] 00000048: 35ffffac cbnz w12, 0x0000003c [...] [1] https://static.docs.arm.com/ddi0487/b/DDI0487B_a_armv8_arm.pdf, p.6132 Fixes: 85f68fe89832 ("bpf, arm64: implement jiting of BPF_XADD") Reported-by: Will Deacon Signed-off-by: Daniel Borkmann Acked-by: Will Deacon Signed-off-by: David S. Miller arch/arm64/net/bpf_jit_comp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e173db36e3090d90651d97ab4bc45ace7f8cc0c6 Author: Antoine Ténart Date: Wed Jun 7 08:17:50 2017 +0200 net: mvpp2: do not bypass the mvpp22_port_mii_set function The mvpp22_port_mii_set() function was added by 2697582144dd, but the function directly returns without doing anything. This return was used when debugging and wasn't removed before sending the patch. Fix this. Fixes: 2697582144dd ("net: mvpp2: handle misc PPv2.1/PPv2.2 differences") Signed-off-by: Antoine Tenart Acked-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 -- 1 file changed, 2 deletions(-) commit 3a807b751c66e76bff39da4a9bd9828d7866d025 Author: John Allen Date: Tue Jun 6 16:55:52 2017 -0500 ibmvnic: Return failure on attempted mtu change Changing the mtu is currently not supported in the ibmvnic driver. Implement .ndo_change_mtu in the driver so that attempting to use ifconfig to change the mtu will fail and present the user with an error message. Signed-off-by: John Allen Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 79e25959403e6a79552db28a87abed34de32a1df Author: Roland Dreier Date: Tue Jun 6 09:22:00 2017 -0700 IB/addr: Fix setting source address in addr6_resolve() Commit eea40b8f624f ("infiniband: call ipv6 route lookup via the stub interface") introduced a regression in address resolution when connecting to IPv6 destination addresses. The old code called ip6_route_output(), while the new code calls ipv6_stub->ipv6_dst_lookup(). The two are almost the same, except that ipv6_dst_lookup() also calls ip6_route_get_saddr() if the source address is in6addr_any. This means that the test of ipv6_addr_any(&fl6.saddr) now never succeeds, and so we never copy the source address out. This ends up causing rdma_resolve_addr() to fail, because without a resolved source address, cma_acquire_dev() will fail to find an RDMA device to use. For me, this causes connecting to an NVMe over Fabrics target via RoCE / IPv6 to fail. Fix this by copying out fl6.saddr if ipv6_addr_any() is true for the original source address passed into addr6_resolve(). We can drop our call to ipv6_dev_get_saddr() because ipv6_dst_lookup() already does that work. Fixes: eea40b8f624 ("infiniband: call ipv6 route lookup via the stub interface") Cc: # 3.12+ Signed-off-by: Roland Dreier Acked-by: Paolo Abeni Signed-off-by: Doug Ledford drivers/infiniband/core/addr.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 47eb0c8b4d9eb6368941c6a9bb443f00847a46d7 Author: Ulrik De Bie Date: Wed Jun 7 10:30:57 2017 -0700 Input: elantech - add Fujitsu Lifebook E546/E557 to force crc_enabled The Lifebook E546 and E557 touchpad were also not functioning and worked after running: echo "1" > /sys/devices/platform/i8042/serio2/crc_enabled Add them to the list of machines that need this workaround. Signed-off-by: Ulrik De Bie Reviewed-by: Arjan Opmeer Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/elantech.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit e4061d572cef1f990bb7761f45d00342daa27fbd Author: Michael S. Tsirkin Date: Tue Jun 6 19:01:37 2017 +0300 net: fix up hash documentation commit 61b905da33 ("net: Rename skb->rxhash to skb->hash") didn't update the documentation, fix this up. Cc: Tom Herbert Signed-off-by: Michael S. Tsirkin Signed-off-by: David S. Miller Documentation/networking/scaling.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 996652c7050c70008e4434af108be6f15f20fbd0 Author: Michal Schmidt Date: Tue Jun 6 16:30:31 2017 +0200 bnx2x: fix pf2vf bulletin DMA mapping leak When freeing VF's DMA mappings, an already NULLed pointer was checked again due to an apparent copy&paste error. Consequently, the pf2vf bulletin DMA mapping was not freed. Signed-off-by: Michal Schmidt Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c28294b941232931fbd714099798eb7aa7e865d7 Author: Alexander Potapenko Date: Tue Jun 6 15:56:54 2017 +0200 net: don't call strlen on non-terminated string in dev_set_alias() KMSAN reported a use of uninitialized memory in dev_set_alias(), which was caused by calling strlcpy() (which in turn called strlen()) on the user-supplied non-terminated string. Signed-off-by: Alexander Potapenko Signed-off-by: David S. Miller net/core/dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3e411b0ee7c7bf0cbe2bd5961f84a02f0451ad57 Merge: ba7b238 2538b9e Author: Ingo Molnar Date: Wed Jun 7 17:50:19 2017 +0200 Merge tag 'perf-urgent-for-mingo-4.12-20170606' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: - Only print NMI watchdog hint in 'perf stat' when it is enabled (Andi Kleen) - Fix sys_mmap/sys_old_mmap shandling in s390 in 'perf trace' (Jiri Olsa) - Disable breakpoint signal tests in powerpc, that lacks the perf kernel glue to set breakpoint events and makes 'perf test' always fail (Jiri Olsa) - Fix 'perf annotate' for branch instruction with multiple operands (Kim Phillips) - Add missing powerpc triplet when disassembling with 'objdump' in 'perf annotate' (Kim Phillips) - Do not trow away partial unwound stacks when using libdw, making callchains produced with it similar to those produced when linked with the other DWARF unwind library supported in perf, libunwind (Milian Wolff) - Fixes to properly handle kernel modules when processing build-id meta events (Namhyung Kim) - Fix handling of compressed modules in the build-id cache (Namhyung Kim) - Fix 'perf annotate' failure when filename has special chars (Ravi Bangoria) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 6679a90c4b0dc2563383df1fe0eb170736952a2e Author: Shaohua Li Date: Tue Jun 6 12:40:43 2017 -0700 blk-throttle: set default latency baseline for harddisk hard disk IO latency varies a lot depending on spindle move. The latency range could be from several microseconds to several milliseconds. It's pretty hard to get the baseline latency used by io.low. We will use a different stragety here. The idea is only using IO with spindle move to determine if cgroup IO is in good state. For HD, if io latency is small (< 1ms), we ignore the IO. Such IO is likely from sequential IO, and is helpless to help determine if a cgroup's IO is impacted by other cgroups. With this, we only account IO with big latency. Then we can choose a hardcoded baseline latency for HD (4ms, which is typical IO latency with seek). With all these settings, the io.low latency works for both HD and SSD. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-throttle.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 8604889f83381cac42b849acc6c420af6df9b35b Author: Neil Armstrong Date: Mon May 29 16:15:52 2017 +0200 drm/meson: Fix driver bind when only CVBS is available While introducing HDMI support, component matching on connectors node were bypassed since no driver would actually bind on the DT node. But when only a CVBS connector is present, only a single node is found in the graph, but ignored and a NULL match table is given to the component code. This code permits bypassing the components framework by binding directly the DRM driver when no components needs to be loaded. Fixes: a41e82e6c457 ("drm/meson: Add support for components") Signed-off-by: Neil Armstrong Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1496067352-8733-1-git-send-email-narmstrong@baylibre.com drivers/gpu/drm/meson/meson_drv.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit a41b816c174409417d91b4ceef0145c9f0bef67c Author: Joseph Qi Date: Wed Jun 7 11:36:14 2017 +0800 blk-throttle: fix NULL pointer dereference in throtl_schedule_pending_timer I have encountered a NULL pointer dereference in throtl_schedule_pending_timer: [ 413.735396] BUG: unable to handle kernel NULL pointer dereference at 0000000000000038 [ 413.735535] IP: [] throtl_schedule_pending_timer+0x3f/0x210 [ 413.735643] PGD 22c8cf067 PUD 22cb34067 PMD 0 [ 413.735713] Oops: 0000 [#1] SMP ...... This is caused by the following case: blk_throtl_bio throtl_schedule_next_dispatch <= sq is top level one without parent throtl_schedule_pending_timer sq_to_tg(sq)->td->throtl_slice <= sq_to_tg(sq) returns NULL Fix it by using sq_to_td instead of sq_to_tg(sq)->td, which will always return a valid td. Fixes: 297e3d854784 ("blk-throttle: make throtl_slice tunable") Signed-off-by: Joseph Qi Reviewed-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-throttle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1065467ed8e2601bf2d7018cf47c557ccbea3769 Author: Ville Syrjälä Date: Fri Mar 31 21:00:56 2017 +0300 drm/i915: Fix 90/270 rotated coordinates for FBC The clipped src coordinates have already been rotated by 270 degrees for when the plane rotation is 90/270 degrees, hence the FBC code should no longer swap the width and height. Cc: stable@vger.kernel.org Cc: Tvrtko Ursulin Cc: Paulo Zanoni Fixes: b63a16f6cd89 ("drm/i915: Compute display surface offset in the plane check hook for SKL+") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170331180056.14086-4-ville.syrjala@linux.intel.com Reviewed-by: Paulo Zanoni Tested-by: Tvrtko Ursulin Reviewed-by: Maarten Lankhorst (cherry picked from commit 73714c05df97d7527e7eaaa771472ef2ede46fa3) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_fbc.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 27fe407cb5122f12cfe976813686e8206425c32a Author: Ville Syrjälä Date: Tue Jun 6 16:32:29 2017 +0300 drm/i915: Restore has_fbc=1 for ILK-M Restore the lost has_fbc flag for mobile ILK. Cc: Carlos Santa Cc: Rodrigo Vivi Fixes: a13233804686 ("drm/i915: Introduce GEN5_FEATURES for device info") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170606133229.12439-1-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi (cherry picked from commit c2d1a0ced2603c4a17fa9c53c37e415905cf5a6d) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f4d38099b3098eae75f7755e1801931f8141350 Author: Ville Syrjälä Date: Thu Dec 15 19:47:34 2016 +0200 drm/i915: Workaround VLV/CHV DSI scanline counter hardware fail The scanline counter is bonkers on VLV/CHV DSI. The scanline counter increment is not lined up with the start of vblank like it is on every other platform and output type. This causes problems for both the vblank timestamping and atomic update vblank evasion. On my FFRD8 machine at least, the scanline counter increment happens about 1/3 of a scanline ahead of the start of vblank (which is where all register latching happens still). That means we can't trust the scanline counter to tell us whether we're in vblank or not while we're on that particular line. In order to keep vblank timestamping in working condition when called from the vblank irq, we'll leave scanline_offset at one, which means that the entire line containing the start of vblank is considered to be inside the vblank. For the vblank evasion we'll need to consider that entire line to be bad, since we can't tell whether the registers already got latched or not. And we can't actually use the start of vblank interrupt to get us past that line as the interrupt would fire too soon, and then we'd up waiting for the next start of vblank instead. One way around that would using the frame start interrupt instead since that wouldn't fire until the next scanline, but that would require some bigger changes in the interrupt code. So for simplicity we'll just poll until we get past the bad line. v2: Adjust the comments a bit Cc: stable@vger.kernel.org Cc: Jonas Aaberg Tested-by: Jonas Aaberg Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99086 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20161215174734.28779-1-ville.syrjala@linux.intel.com Tested-by: Mika Kahola Reviewed-by: Mika Kahola (cherry picked from commit ec1b4ee2834e66884e5b0d3d465f347ff212e372) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 9 +++++++++ drivers/gpu/drm/i915/intel_sprite.c | 21 +++++++++++++++++++++ 2 files changed, 30 insertions(+) commit 5857dbfabc15ae9e17fd5a355c4920b46295ff1f Author: Chris Wilson Date: Sun May 21 13:40:14 2017 +0100 drm/i915: Fix logical inversion for gen4 quirking The assertion that we want to make before disabling the pin of the pages for the unknown swizzling quirk is that the quirk is indeed active, and that the quirk is disabled before we do apply it to the pages. Fixes: 2c3a3f44dc13 ("drm/i915: Fix pages pin counting around swizzle quirk") Fixes: 957870f93412 ("drm/i915: Split out i915_gem_object_set_tiling()") Signed-off-by: Chris Wilson Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170521124014.27678-1-chris@chris-wilson.co.uk Reviewed-bhy: Joonas Lahtinen (cherry picked from commit 20bb377106af69d16269b1837e9a945b9f508a2e) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_tiling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d90c98905afd00c15d5d255d845b646a37173ce9 Author: Chris Wilson Date: Wed May 31 20:05:14 2017 +0100 drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally Commit 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon insertion") added the restoration of the invalidation routine after the GuC was disabled, but missed that the GuC was unconditionally disabled when not used. This then overwrites the invalidate routine for the older chipsets, causing havoc and breaking resume as the most obvious victim. We place the guard inside i915_ggtt_disable_guc() to be backport friendly (the bug was introduced into v4.11) but it would be preferred to be in more control over when this was guard (i.e. do not try and teardown the data structures before we have enabled them). That should be true with the reorganisation of the guc loaders. Reported-by: Ville Syrjälä Signed-off-by: Chris Wilson Fixes: 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon insertion") Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Oscar Mateo Cc: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: Arkadiusz Hiler Cc: # v4.11+ Link: http://patchwork.freedesktop.org/patch/msgid/20170531190514.3691-1-chris@chris-wilson.co.uk Reviewed-by: Michel Thierry (cherry picked from commit cb60606d835ca8b2f744835116bcabe64ce88849) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_gtt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4e3aed844547f63614363a386de126e6304e55fb Author: Maarten Lankhorst Date: Wed May 31 17:42:36 2017 +0200 drm/i915: Always recompute watermarks when distrust_bios_wm is set, v2. On some systems there can be a race condition in which no crtc state is added to the first atomic commit. This results in all crtc's having a null DDB allocation, causing a FIFO underrun on any update until the first modeset. Changes since v1: - Do not take the connection_mutex, this is already done below. Reported-by: Maarten Lankhorst Inspired-by: Mahesh Kumar Signed-off-by: Maarten Lankhorst Fixes: 98d39494d375 ("drm/i915/gen9: Compute DDB allocation at atomic check time (v4)") Cc: # v4.8+ Cc: Mahesh Kumar Cc: Matt Roper Link: http://patchwork.freedesktop.org/patch/msgid/20170531154236.27180-1-maarten.lankhorst@linux.intel.com Reviewed-by: Mahesh Kumar Reviewed-by: Matt Roper (cherry picked from commit 367d73d2806085bb507ab44c1f532640917fd5ca) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_pm.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6ab92afc95c9bd6877cb42e7b24f65be887a5440 Author: Imre Deak Date: Tue May 2 15:04:09 2017 +0300 drm/i915: Prevent the system suspend complete optimization Since commit bac2a909a096c9110525c18cbb8ce73c660d5f71 Author: Rafael J. Wysocki Date: Wed Jan 21 02:17:42 2015 +0100 PCI / PM: Avoid resuming PCI devices during system suspend PCI devices will default to allowing the system suspend complete optimization where devices are not woken up during system suspend if they were already runtime suspended. This however breaks the i915/HDA drivers for two reasons: - The i915 driver has system suspend specific steps that it needs to run, that bring the device to a different state than its runtime suspended state. - The HDA driver's suspend handler requires power that it will request from the i915 driver's power domain handler. This in turn requires the i915 driver to runtime resume itself, but this won't be possible if the suspend complete optimization is in effect: in this case the i915 runtime PM is disabled and trying to get an RPM reference returns -EACCESS. Solve this by requiring the PCI/PM core to resume the device during system suspend which in effect disables the suspend complete optimization. Regardless of the above commit the optimization stayed disabled for DRM devices until commit d14d2a8453d650bea32a1c5271af1458cd283a0f Author: Lukas Wunner Date: Wed Jun 8 12:49:29 2016 +0200 drm: Remove dev_pm_ops from drm_class so this patch is in practice a fix for this commit. Another reason for the bug staying hidden for so long is that the optimization for a device is disabled if it's disabled for any of its children devices. i915 may have a backlight device as its child which doesn't support runtime PM and so doesn't allow the optimization either. So if this backlight device got registered the bug stayed hidden. Credits to Marta, Tomi and David who enabled pstore logging, that caught one instance of this issue across a suspend/ resume-to-ram and Ville who rememberd that the optimization was enabled for some devices at one point. The first WARN triggered by the problem: [ 6250.746445] WARNING: CPU: 2 PID: 17384 at drivers/gpu/drm/i915/intel_runtime_pm.c:2846 intel_runtime_pm_get+0x6b/0xd0 [i915] [ 6250.746448] pm_runtime_get_sync() failed: -13 [ 6250.746451] Modules linked in: snd_hda_intel i915 vgem snd_hda_codec_hdmi x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul snd_hda_codec_realtek snd_hda_codec_generic ghash_clmulni_intel e1000e snd_hda_codec snd_hwdep snd_hda_core ptp mei_me pps_core snd_pcm lpc_ich mei prime_ numbers i2c_hid i2c_designware_platform i2c_designware_core [last unloaded: i915] [ 6250.746512] CPU: 2 PID: 17384 Comm: kworker/u8:0 Tainted: G U W 4.11.0-rc5-CI-CI_DRM_334+ #1 [ 6250.746515] Hardware name: /NUC5i5RYB, BIOS RYBDWi35.86A.0362.2017.0118.0940 01/18/2017 [ 6250.746521] Workqueue: events_unbound async_run_entry_fn [ 6250.746525] Call Trace: [ 6250.746530] dump_stack+0x67/0x92 [ 6250.746536] __warn+0xc6/0xe0 [ 6250.746542] ? pci_restore_standard_config+0x40/0x40 [ 6250.746546] warn_slowpath_fmt+0x46/0x50 [ 6250.746553] ? __pm_runtime_resume+0x56/0x80 [ 6250.746584] intel_runtime_pm_get+0x6b/0xd0 [i915] [ 6250.746610] intel_display_power_get+0x1b/0x40 [i915] [ 6250.746646] i915_audio_component_get_power+0x15/0x20 [i915] [ 6250.746654] snd_hdac_display_power+0xc8/0x110 [snd_hda_core] [ 6250.746661] azx_runtime_resume+0x218/0x280 [snd_hda_intel] [ 6250.746667] pci_pm_runtime_resume+0x76/0xa0 [ 6250.746672] __rpm_callback+0xb4/0x1f0 [ 6250.746677] ? pci_restore_standard_config+0x40/0x40 [ 6250.746682] rpm_callback+0x1f/0x80 [ 6250.746686] ? pci_restore_standard_config+0x40/0x40 [ 6250.746690] rpm_resume+0x4ba/0x740 [ 6250.746698] __pm_runtime_resume+0x49/0x80 [ 6250.746703] pci_pm_suspend+0x57/0x140 [ 6250.746709] dpm_run_callback+0x6f/0x330 [ 6250.746713] ? pci_pm_freeze+0xe0/0xe0 [ 6250.746718] __device_suspend+0xf9/0x370 [ 6250.746724] ? dpm_watchdog_set+0x60/0x60 [ 6250.746730] async_suspend+0x1a/0x90 [ 6250.746735] async_run_entry_fn+0x34/0x160 [ 6250.746741] process_one_work+0x1f2/0x6d0 [ 6250.746749] worker_thread+0x49/0x4a0 [ 6250.746755] kthread+0x107/0x140 [ 6250.746759] ? process_one_work+0x6d0/0x6d0 [ 6250.746763] ? kthread_create_on_node+0x40/0x40 [ 6250.746768] ret_from_fork+0x2e/0x40 [ 6250.746778] ---[ end trace 102a62fd2160f5e6 ]--- v2: - Use the new pci_dev->needs_resume flag, to avoid any overhead during the ->pm_prepare hook. (Rafael) v3: - Update commit message to reference the actual regressing commit. (Lukas) v4: - Rebase on v4 of patch 1/2. Fixes: d14d2a8453d6 ("drm: Remove dev_pm_ops from drm_class") References: https://bugs.freedesktop.org/show_bug.cgi?id=100378 References: https://bugs.freedesktop.org/show_bug.cgi?id=100770 Cc: Rafael J. Wysocki Cc: Marta Lofstedt Cc: David Weinehall Cc: Tomi Sarvela Cc: Ville Syrjälä Cc: Mika Kuoppala Cc: Chris Wilson Cc: Takashi Iwai Cc: Bjorn Helgaas Cc: Lukas Wunner Cc: linux-pci@vger.kernel.org Cc: # v4.10.x: 4d071c3 - PCI/PM: Add needs_resume flag Cc: # v4.10.x Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Reported-and-tested-by: Marta Lofstedt Link: http://patchwork.freedesktop.org/patch/msgid/1493726649-32094-2-git-send-email-imre.deak@intel.com (cherry picked from commit adfdf85d795f4d4f487b61ee0b169d64c6e19081) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit bd709898a50184de4fe418bf85486c5b1e002901 Author: Nagaraju, Vathsala Date: Thu May 25 22:13:29 2017 +0530 drm/i915/psr: disable psr2 for resolution greater than 32X20 psr1 is also disabled for panel resolution greater than 32X20. Added psr2 check to disable only for psr2 panels having resolution greater than 32X20. issue was introduced by commit-id : "acf45d11050abd751dcec986ab121cb2367dcbba" commit message: "PSR2 is restricted to work with panel resolutions upto 3200x2000, move the check to intel_psr_match_conditions and fully block psr." v2: (Rodrigo) Add previous commit details which introduced the issue Fixes: acf45d11050a ("drm/i915/psr: disable psr2 for resolution greater than 32X20") Cc: Rodrigo Vivi Cc: Jim Bride Cc: Yaroslav Shabalin Reported-by: Yaroslav Shabalin Reviewed-by: Rodrigo Vivi Signed-off-by: vathsala nagaraju Signed-off-by: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/49935bdff896ee3140bed471012b9f9110a863a4.1495729964.git.vathsala.nagaraju@intel.com (cherry picked from commit bef8c056fba09aa4629fe5a2d3efe64068d049db) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_psr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d9533f19d8401b7072da2d484a9514af0d473148 Author: Chris Wilson Date: Tue May 30 13:13:33 2017 +0100 drm/i915: Hold a wakeref for probing the ring registers Allow intel_engine_is_idle() to be called outside of the GT wakeref by acquiring the device runtime pm for ourselves. This allows the function to act as check after we assume the engine is idle and we release the GT wakeref held whilst we have requests. At the moment, we do not call it outside of an awake context but taking the wakeref as required makes it more convenient to use for quick debugging in future. [ 2613.401647] RPM wakelock ref not held during HW access [ 2613.401684] ------------[ cut here ]------------ [ 2613.401720] WARNING: CPU: 5 PID: 7739 at drivers/gpu/drm/i915/intel_drv.h:1787 gen6_read32+0x21f/0x2b0 [i915] [ 2613.401731] Modules linked in: snd_hda_intel i915 vgem snd_hda_codec_hdmi x86_pkg_temp_thermal intel_powerclamp snd_hda_codec_realtek coretemp snd_hda_codec_generic crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm r8169 mii mei_me lpc_ich mei prime_numbers [last unloaded: i915] [ 2613.401823] CPU: 5 PID: 7739 Comm: drv_missed_irq Tainted: G U 4.12.0-rc2-CI-CI_DRM_421+ #1 [ 2613.401825] Hardware name: MSI MS-7924/Z97M-G43(MS-7924), BIOS V1.12 02/15/2016 [ 2613.401840] task: ffff880409e3a740 task.stack: ffffc900084dc000 [ 2613.401861] RIP: 0010:gen6_read32+0x21f/0x2b0 [i915] [ 2613.401863] RSP: 0018:ffffc900084dfce8 EFLAGS: 00010292 [ 2613.401869] RAX: 000000000000002a RBX: ffff8804016a8000 RCX: 0000000000000006 [ 2613.401871] RDX: 0000000000000006 RSI: ffffffff81cbf2d9 RDI: ffffffff81c9e3a7 [ 2613.401874] RBP: ffffc900084dfd18 R08: ffff880409e3afc8 R09: 0000000000000000 [ 2613.401877] R10: 000000008a1c483f R11: 0000000000000000 R12: 000000000000209c [ 2613.401879] R13: 0000000000000001 R14: ffff8804016a8000 R15: ffff8804016ac150 [ 2613.401882] FS: 00007f39ef3dd8c0(0000) GS:ffff88041fb40000(0000) knlGS:0000000000000000 [ 2613.401885] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2613.401887] CR2: 00000000023717c8 CR3: 00000002e7b34000 CR4: 00000000001406e0 [ 2613.401889] Call Trace: [ 2613.401912] intel_engine_is_idle+0x76/0x90 [i915] [ 2613.401931] i915_gem_wait_for_idle+0xe6/0x1e0 [i915] [ 2613.401951] fault_irq_set+0x40/0x90 [i915] [ 2613.401970] i915_ring_test_irq_set+0x42/0x50 [i915] [ 2613.401976] simple_attr_write+0xc7/0xe0 [ 2613.401981] full_proxy_write+0x4f/0x70 [ 2613.401987] __vfs_write+0x23/0x120 [ 2613.401992] ? rcu_read_lock_sched_held+0x75/0x80 [ 2613.401996] ? rcu_sync_lockdep_assert+0x2a/0x50 [ 2613.401999] ? __sb_start_write+0xfa/0x1f0 [ 2613.402004] vfs_write+0xc5/0x1d0 [ 2613.402008] ? trace_hardirqs_on_caller+0xe7/0x1c0 [ 2613.402013] SyS_write+0x44/0xb0 [ 2613.402020] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 2613.402022] RIP: 0033:0x7f39eded6670 [ 2613.402025] RSP: 002b:00007fffdcdcb1a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 2613.402030] RAX: ffffffffffffffda RBX: ffffffff81470203 RCX: 00007f39eded6670 [ 2613.402033] RDX: 0000000000000001 RSI: 000000000041bc33 RDI: 0000000000000006 [ 2613.402036] RBP: ffffc900084dff88 R08: 00007f39ef3dd8c0 R09: 0000000000000001 [ 2613.402038] R10: 0000000000000000 R11: 0000000000000246 R12: 000000000041bc33 [ 2613.402041] R13: 0000000000000006 R14: 0000000000000000 R15: 0000000000000000 [ 2613.402046] ? __this_cpu_preempt_check+0x13/0x20 [ 2613.402052] Code: 01 9b fa e0 0f ff e9 28 fe ff ff 80 3d 6a dd 0e 00 00 0f 85 29 fe ff ff 48 c7 c7 48 19 29 a0 c6 05 56 dd 0e 00 01 e8 da 9a fa e0 <0f> ff e9 0f fe ff ff b9 01 00 00 00 ba 01 00 00 00 44 89 e6 48 [ 2613.402199] ---[ end trace 31f0cfa93ab632bf ]--- Fixes: 5400367a864d ("drm/i915: Ensure the engine is idle before manually changing HWS") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170530121334.17364-2-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin (cherry picked from commit a091d4ee931b16ce4fef945d39a20b851a7e17b7) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_engine_cs.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit e0da1963fe84ee86b59dc4b9ff1a69cb4e1275c7 Author: Chris Wilson Date: Tue May 30 13:13:32 2017 +0100 drm/i915: Short-circuit i915_gem_wait_for_idle() if already idle If the device is asleep (no GT wakeref), we know the GPU is already idle. If we add an early return, we can avoid touching registers and checking hw state outside of the assumed GT wakelock. This prevents causing such errors whilst debugging: [ 2613.401647] RPM wakelock ref not held during HW access [ 2613.401684] ------------[ cut here ]------------ [ 2613.401720] WARNING: CPU: 5 PID: 7739 at drivers/gpu/drm/i915/intel_drv.h:1787 gen6_read32+0x21f/0x2b0 [i915] [ 2613.401731] Modules linked in: snd_hda_intel i915 vgem snd_hda_codec_hdmi x86_pkg_temp_thermal intel_powerclamp snd_hda_codec_realtek coretemp snd_hda_codec_generic crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm r8169 mii mei_me lpc_ich mei prime_numbers [last unloaded: i915] [ 2613.401823] CPU: 5 PID: 7739 Comm: drv_missed_irq Tainted: G U 4.12.0-rc2-CI-CI_DRM_421+ #1 [ 2613.401825] Hardware name: MSI MS-7924/Z97M-G43(MS-7924), BIOS V1.12 02/15/2016 [ 2613.401840] task: ffff880409e3a740 task.stack: ffffc900084dc000 [ 2613.401861] RIP: 0010:gen6_read32+0x21f/0x2b0 [i915] [ 2613.401863] RSP: 0018:ffffc900084dfce8 EFLAGS: 00010292 [ 2613.401869] RAX: 000000000000002a RBX: ffff8804016a8000 RCX: 0000000000000006 [ 2613.401871] RDX: 0000000000000006 RSI: ffffffff81cbf2d9 RDI: ffffffff81c9e3a7 [ 2613.401874] RBP: ffffc900084dfd18 R08: ffff880409e3afc8 R09: 0000000000000000 [ 2613.401877] R10: 000000008a1c483f R11: 0000000000000000 R12: 000000000000209c [ 2613.401879] R13: 0000000000000001 R14: ffff8804016a8000 R15: ffff8804016ac150 [ 2613.401882] FS: 00007f39ef3dd8c0(0000) GS:ffff88041fb40000(0000) knlGS:0000000000000000 [ 2613.401885] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2613.401887] CR2: 00000000023717c8 CR3: 00000002e7b34000 CR4: 00000000001406e0 [ 2613.401889] Call Trace: [ 2613.401912] intel_engine_is_idle+0x76/0x90 [i915] [ 2613.401931] i915_gem_wait_for_idle+0xe6/0x1e0 [i915] [ 2613.401951] fault_irq_set+0x40/0x90 [i915] [ 2613.401970] i915_ring_test_irq_set+0x42/0x50 [i915] [ 2613.401976] simple_attr_write+0xc7/0xe0 [ 2613.401981] full_proxy_write+0x4f/0x70 [ 2613.401987] __vfs_write+0x23/0x120 [ 2613.401992] ? rcu_read_lock_sched_held+0x75/0x80 [ 2613.401996] ? rcu_sync_lockdep_assert+0x2a/0x50 [ 2613.401999] ? __sb_start_write+0xfa/0x1f0 [ 2613.402004] vfs_write+0xc5/0x1d0 [ 2613.402008] ? trace_hardirqs_on_caller+0xe7/0x1c0 [ 2613.402013] SyS_write+0x44/0xb0 [ 2613.402020] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 2613.402022] RIP: 0033:0x7f39eded6670 [ 2613.402025] RSP: 002b:00007fffdcdcb1a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 2613.402030] RAX: ffffffffffffffda RBX: ffffffff81470203 RCX: 00007f39eded6670 [ 2613.402033] RDX: 0000000000000001 RSI: 000000000041bc33 RDI: 0000000000000006 [ 2613.402036] RBP: ffffc900084dff88 R08: 00007f39ef3dd8c0 R09: 0000000000000001 [ 2613.402038] R10: 0000000000000000 R11: 0000000000000246 R12: 000000000041bc33 [ 2613.402041] R13: 0000000000000006 R14: 0000000000000000 R15: 0000000000000000 [ 2613.402046] ? __this_cpu_preempt_check+0x13/0x20 [ 2613.402052] Code: 01 9b fa e0 0f ff e9 28 fe ff ff 80 3d 6a dd 0e 00 00 0f 85 29 fe ff ff 48 c7 c7 48 19 29 a0 c6 05 56 dd 0e 00 01 e8 da 9a fa e0 <0f> ff e9 0f fe ff ff b9 01 00 00 00 ba 01 00 00 00 44 89 e6 48 [ 2613.402199] ---[ end trace 31f0cfa93ab632bf ]--- Fixes: 25112b64b3d2 ("drm/i915: Wait for all engines to be idle as part of i915_gem_wait_for_idle()") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170530121334.17364-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen (cherry picked from commit 863e9fde1a7061dad09bb299c65bed5f1ccb44ff) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4c4c565513cca1c53a12956640b5915727431631 Author: Kai Chen Date: Tue May 23 14:58:11 2017 -0700 drm/i915: Disable decoupled MMIO The decoupled MMIO feature doesn't work as intended by HW team. Enabling it with forcewake will only make debugging efforts more difficult, so let's disable it. Fixes: 85ee17ebeedd ("drm/i915/bxt: Broxton decoupled MMIO") Cc: Zhe Wang Cc: Praveen Paneri Cc: Tvrtko Ursulin Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: # v4.10+ Signed-off-by: Kai Chen Reviewed-by: Tvrtko Ursulin Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170523215812.18328-2-kai.chen@intel.com (cherry picked from commit 0051c10acabb631cfd439eae73289e6e4c39b2b7) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_pci.c | 1 - 1 file changed, 1 deletion(-) commit 4ca9a5821972b431cb94c6a1ac69a64aefe1c17d Author: Michal Wajdeczko Date: Thu May 18 11:31:02 2017 +0000 drm/i915/guc: Remove stale comment for q_fail This member was dropped long time ago. Fixes: 774439e1 ("drm/i915/guc: re-optimise i915_guc_client layout") Signed-off-by: Michal Wajdeczko Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170518113104.54400-1-michal.wajdeczko@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson (cherry picked from commit 4afc67be8e203ee8f5e95e829c0777eae7a14702) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_uc.h | 2 -- 1 file changed, 2 deletions(-) commit 1929e6610bddf0cc44f0859fc72d4016cba0c1fa Author: Thomas Hellstrom Date: Wed Jun 7 14:46:15 2017 +0200 drm/vmwgfx: Bump driver minor and date While the atomic modesetting capability is signaled also elsewhere, also reflect it by a driver minor bump. Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f470a7740f8c7577df1db5923ec89d890cf32040 Author: Sinclair Yeh Date: Wed Jun 7 14:24:08 2017 +0200 drm/vmwgfx: Remove unused legacy cursor functions These function implementations and/or declarations are no longer used now that atomic is enabled. Signed-off-by: Sinclair Yeh Reported-by: Daniel Vetter Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 114 ------------------------------------ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 15 ----- 2 files changed, 129 deletions(-) commit a2e5a3e2f8cc48cc9ed10a919ae582ab0222da80 Author: Colin Ian King Date: Sat May 27 19:52:30 2017 +0100 drm/vmwgfx: fix spelling mistake "exeeds" -> "exceeds" Trivial fix to spelling mistake in DRM_ERROR error message. Signed-off-by: Colin Ian King Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1ac633912305168bf432c3d47979d43b16164f8 Author: Sinclair Yeh Date: Fri Jun 2 07:55:50 2017 +0200 drm/vmwgfx: Fix large topology crash The previous attempt at this had an issue with with num_clips > 1 because it would always end up using the coordinates of the last clip while using width and height calculated from the bounding box of all the clips. So if the last clip happens to be not at the top-left corner of the bounding box, the CPU blit operation would go out of bounds. The original intent was to coalesce all the clips into one blit, and to do that we need to also track the starting point of the content buffer. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 8a309c8a2d0619efe29ec652c163d6b89eff9f9f Author: Sinclair Yeh Date: Fri Jun 2 07:53:27 2017 +0200 drm/vmwgfx: Make sure to update STDU when FB is updated When a new FB is bound, we have to send an update command otherwise the new FB may not be shown Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 5 +++++ 1 file changed, 5 insertions(+) commit 07678eca2cf9c9a18584e546c2b2a0d0c9a3150c Author: Sinclair Yeh Date: Fri Jun 2 07:50:57 2017 +0200 drm/vmwgfx: Make sure backup_handle is always valid When vmw_gb_surface_define_ioctl() is called with an existing buffer, we end up returning an uninitialized variable in the backup_handle. The fix is to first initialize backup_handle to 0 just to be sure, and second, when a user-provided buffer is found, we will use the req->buffer_handle as the backup_handle. Cc: Reported-by: Murray McAllister Signed-off-by: Sinclair Yeh Reviewed-by: Deepak Rawat drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit f0c62e9878024300319ba2438adc7b06c6b9c448 Author: Dan Carpenter Date: Thu Apr 27 12:12:08 2017 +0300 drm/vmwgfx: Handle vmalloc() failure in vmw_local_fifo_reserve() If vmalloc() fails then we need to a bit of cleanup before returning. Cc: Fixes: fb1d9738ca05 ("drm/vmwgfx: Add DRM driver for VMware Virtual GPU") Signed-off-by: Dan Carpenter Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 2 ++ 1 file changed, 2 insertions(+) commit bbd5fefeea59412af4b4a325c2743f53a1d6c417 Author: Sinclair Yeh Date: Fri Jun 2 07:44:53 2017 +0200 drm/vmwgfx: Don't create proxy surface for cursor With atomic, the cursor surface is treated like a FB. Creating a proxy surface for cursor doesn't gain us much benefit. This fixes the issue on atomic enabled 2D VMs where the cursor disappears. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 1 + 1 file changed, 1 insertion(+) commit ee9c4e681ec4f58e42a83cb0c22a0289ade1aacf Author: Vladis Dronov Date: Fri Jun 2 07:42:09 2017 +0200 drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl() The 'req->mip_levels' parameter in vmw_gb_surface_define_ioctl() is a user-controlled 'uint32_t' value which is used as a loop count limit. This can lead to a kernel lockup and DoS. Add check for 'req->mip_levels'. References: https://bugzilla.redhat.com/show_bug.cgi?id=1437431 Cc: Signed-off-by: Vladis Dronov Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 3 +++ 1 file changed, 3 insertions(+) commit d86b18a06cf361e12ccdf61ae240d432182d8d6b Author: Jon Bloomfield Date: Wed May 24 08:54:11 2017 -0700 drm/i915: Serialize GTT/Aperture accesses on BXT BXT has a H/W issue with IOMMU which can lead to system hangs when Aperture accesses are queued within the GAM behind GTT Accesses. This patch avoids the condition by wrapping all GTT updates in stop_machine and using a flushing read prior to restarting the machine. The stop_machine guarantees no new Aperture accesses can begin while the PTE writes are being emmitted. The flushing read ensures that any following Aperture accesses cannot begin until the PTE writes have been cleared out of the GAM's fifo. Only FOLLOWING Aperture accesses need to be separated from in flight PTE updates. PTE Writes may follow tightly behind already in flight Aperture accesses, so no flushing read is required at the start of a PTE update sequence. This issue was reproduced by running igt/gem_readwrite and igt/gem_render_copy simultaneously from different processes, each in a tight loop, with INTEL_IOMMU enabled. This patch was originally published as: drm/i915: Serialize GTT Updates on BXT [Note: This will cause a performance penalty for some use cases, but avoiding hangs trumps performance hits. This may need to be worked around in Mesa to recover the lost performance.] v2: Move bxt/iommu detection into static function Remove #ifdef CONFIG_INTEL_IOMMU protection Make function names more reflective of purpose Move flushing read into static function v3: Tidy up for checkpatch.pl Testcase: igt/gem_concurrent_blit Signed-off-by: Jon Bloomfield Cc: John Harrison Cc: Chris Wilson Cc: Daniel Vetter Cc: Tvrtko Ursulin Cc: stable@vger.kernel.org Link: http://patchwork.freedesktop.org/patch/msgid/1495641251-30022-1-git-send-email-jon.bloomfield@intel.com Reviewed-by: Tvrtko Ursulin Signed-off-by: Chris Wilson (cherry picked from commit 0ef34ad6222abfa513117515fec720c33a58f105) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 10 ++++ drivers/gpu/drm/i915/i915_gem_gtt.c | 103 ++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) commit 753c09b5652bb4fe53e2db648002ec64b32b8827 Author: Julien Grall Date: Wed May 31 14:03:57 2017 +0100 xen/privcmd: Support correctly 64KB page granularity when mapping memory Commit 5995a68 "xen/privcmd: Add support for Linux 64KB page granularity" did not go far enough to support 64KB in mmap_batch_fn. The variable 'nr' is the number of 4KB chunk to map. However, when Linux is using 64KB page granularity the array of pages (vma->vm_private_data) contain one page per 64KB. Fix it by incrementing st->index correctly. Furthermore, st->va is not correctly incremented as PAGE_SIZE != XEN_PAGE_SIZE. Fixes: 5995a68 ("xen/privcmd: Add support for Linux 64KB page granularity") CC: stable@vger.kernel.org Reported-by: Feng Kan Signed-off-by: Julien Grall Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross drivers/xen/privcmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9947d6a09cd71937dade2fc14640e4843ae19802 Author: Kai-Heng Feng Date: Wed Jun 7 15:25:43 2017 +0800 nvme: relax APST default max latency to 100ms Christoph Hellwig suggests we should to make APST work out of the box. Hence relax the the default max latency to make them able to enter deepest power state on default. Here are id-ctrl excerpts from two high latency NVMes: vid : 0x14a4 ssvid : 0x1b4b mn : CX2-GB1024-Q11 NVMe LITEON 1024GB ps 3 : mp:0.1000W non-operational enlat:5000 exlat:5000 rrt:3 rrl:3 rwt:3 rwl:3 idle_power:- active_power:- ps 4 : mp:0.0100W non-operational enlat:50000 exlat:100000 rrt:4 rrl:4 rwt:4 rwl:4 idle_power:- active_power:- vid : 0x15b7 ssvid : 0x1b4b mn : A400 NVMe SanDisk 512GB ps 3 : mp:0.0500W non-operational enlat:51000 exlat:10000 rrt:0 rrl:0 rwt:0 rwl:0 idle_power:- active_power:- ps 4 : mp:0.0055W non-operational enlat:1000000 exlat:100000 rrt:0 rrl:0 rwt:0 rwl:0 idle_power:- active_power:- Signed-off-by: Kai-Heng Feng Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da87591bea92204fcb921bac927666eb7141908e Author: Kai-Heng Feng Date: Wed Jun 7 15:25:42 2017 +0800 nvme: only consider exit latency when choosing useful non-op power states When a NVMe is in non-op states, the latency is exlat. The latency will be enlat + exlat only when the NVMe tries to transit from operational state right atfer it begins to transit to non-operational state, which should be a rare case. Therefore, as Andy Lutomirski suggests, use exlat only when deciding power states to trainsit to. Signed-off-by: Kai-Heng Feng Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 24b7f0592f738a1127c72dbf5b72a83997dd6997 Author: James Smart Date: Mon Jun 5 15:03:42 2017 -0700 nvme-fc: fix missing put reference on controller create failure The failure case, of a create controller request, called nvme_uninit_ctrl() but didn't do a put to allow the nvme controller to be deleted. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 1 + 1 file changed, 1 insertion(+) commit f874d5d079ec35158fa1a1509554c9d641bd5770 Author: James Smart Date: Thu Jun 1 22:54:21 2017 -0700 nvme-fc: on lldd/transport io error, terminate association Per FC-NVME, when lldd or transport detects an i/o error, the connection must be terminated, which in turn requires the association to be termianted. Currently the transport simply creates a nvme completion status of transport error and returns the io. The FC-NVME spec makes the mandate as initiator and host, depending on the error, can get out of sync on outstanding io counts (sqhd/sqtail). Implement the association teardown on lldd or transport detected errors. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg drivers/nvme/host/fc.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit e818a5b487fea20494b0e48548c1085634abdc0d Author: Sagi Grimberg Date: Mon Jun 5 20:35:56 2017 +0300 nvme-rdma: fast fail incoming requests while we reconnect When we encounter an transport/controller errors, error recovery kicks in which performs: 1. stops io/admin queues 2. moves transport queues out of LIVE state 3. fast fail pending io 4. schedule periodic reconnects. But we also need to fast fail incoming IO taht enters after we already scheduled. Given that our queue is not LIVE anymore, simply restart the request queues to fail in .queue_rq Reported-by: Alex Turin Reported-by: shahar.salzman Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Cc: stable@vger.kernel.org drivers/nvme/host/rdma.c | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) commit 82b057caefaff2a891f821a617d939f46e03e844 Author: Rakesh Pandit Date: Mon Jun 5 14:43:11 2017 +0300 nvme-pci: fix multiple ctrl removal scheduling Commit c5f6ce97c1210 tries to address multiple resets but fails as work_busy doesn't involve any synchronization and can fail. This is reproducible easily as can be seen by WARNING below which is triggered with line: WARN_ON(dev->ctrl.state == NVME_CTRL_RESETTING) Allowing multiple resets can result in multiple controller removal as well if different conditions inside nvme_reset_work fail and which might deadlock on device_release_driver. [ 480.327007] WARNING: CPU: 3 PID: 150 at drivers/nvme/host/pci.c:1900 nvme_reset_work+0x36c/0xec0 [ 480.327008] Modules linked in: rfcomm fuse nf_conntrack_netbios_ns nf_conntrack_broadcast... [ 480.327044] btusb videobuf2_core ghash_clmulni_intel snd_hwdep cfg80211 acer_wmi hci_uart.. [ 480.327065] CPU: 3 PID: 150 Comm: kworker/u16:2 Not tainted 4.12.0-rc1+ #13 [ 480.327065] Hardware name: Acer Predator G9-591/Mustang_SLS, BIOS V1.10 03/03/2016 [ 480.327066] Workqueue: nvme nvme_reset_work [ 480.327067] task: ffff880498ad8000 task.stack: ffffc90002218000 [ 480.327068] RIP: 0010:nvme_reset_work+0x36c/0xec0 [ 480.327069] RSP: 0018:ffffc9000221bdb8 EFLAGS: 00010246 [ 480.327070] RAX: 0000000000460000 RBX: ffff880498a98128 RCX: dead000000000200 [ 480.327070] RDX: 0000000000000001 RSI: ffff8804b1028020 RDI: ffff880498a98128 [ 480.327071] RBP: ffffc9000221be50 R08: 0000000000000000 R09: 0000000000000000 [ 480.327071] R10: ffffc90001963ce8 R11: 000000000000020d R12: ffff880498a98000 [ 480.327072] R13: ffff880498a53500 R14: ffff880498a98130 R15: ffff880498a98128 [ 480.327072] FS: 0000000000000000(0000) GS:ffff8804c1cc0000(0000) knlGS:0000000000000000 [ 480.327073] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 480.327074] CR2: 00007ffcf3c37f78 CR3: 0000000001e09000 CR4: 00000000003406e0 [ 480.327074] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 480.327075] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 480.327075] Call Trace: [ 480.327079] ? __switch_to+0x227/0x400 [ 480.327081] process_one_work+0x18c/0x3a0 [ 480.327082] worker_thread+0x4e/0x3b0 [ 480.327084] kthread+0x109/0x140 [ 480.327085] ? process_one_work+0x3a0/0x3a0 [ 480.327087] ? kthread_park+0x60/0x60 [ 480.327102] ret_from_fork+0x2c/0x40 [ 480.327103] Code: e8 5a dc ff ff 85 c0 41 89 c1 0f..... This patch addresses the problem by using state of controller to decide whether reset should be queued or not as state change is synchronizated using controller spinlock. Also cancel_work_sync is used to make sure remove cancels the reset_work and waits for it to finish. This patch also changes return value from -ENODEV to more appropriate -EBUSY if nvme_reset fails to change state. Fixes: c5f6ce97c1210 ("nvme: don't schedule multiple resets") Signed-off-by: Rakesh Pandit Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 82654b6b8ef8b93ee87a97fc562f87f081fc2f91 Author: Ming Lei Date: Fri Jun 2 16:32:08 2017 +0800 nvme: fix hang in remove path We need to start admin queues too in nvme_kill_queues() for avoiding hang in remove path[1]. This patch is very similar with 806f026f9b901eaf(nvme: use blk_mq_start_hw_queues() in nvme_kill_queues()). [1] hang stack trace [] blk_execute_rq+0x56/0x80 [] __nvme_submit_sync_cmd+0x89/0xf0 [] nvme_set_features+0x5e/0x90 [] nvme_configure_apst+0x166/0x200 [] nvme_set_latency_tolerance+0x35/0x50 [] apply_constraint+0xb1/0xc0 [] dev_pm_qos_constraints_destroy+0xf4/0x1f0 [] dpm_sysfs_remove+0x2a/0x60 [] device_del+0x101/0x320 [] device_unregister+0x1a/0x60 [] device_destroy+0x3c/0x50 [] nvme_uninit_ctrl+0x45/0xa0 [] nvme_remove+0x78/0x110 [] pci_device_remove+0x39/0xb0 [] device_release_driver_internal+0x155/0x210 [] device_release_driver+0x12/0x20 [] nvme_remove_dead_ctrl_work+0x6b/0x70 [] process_one_work+0x18c/0x3a0 [] worker_thread+0x4e/0x3b0 [] kthread+0x109/0x140 [] ret_from_fork+0x2c/0x40 [] 0xffffffffffffffff Fixes: c5552fde102fc("nvme: Enable autonomous power state transitions") Reported-by: Rakesh Pandit Tested-by: Rakesh Pandit Reviewed-by: Sagi Grimberg Signed-off-by: Ming Lei Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 4 ++++ 1 file changed, 4 insertions(+) commit ba3021b2c79b2fa9114f92790a99deb27a65b728 Author: Takashi Iwai Date: Fri Jun 2 17:26:56 2017 +0200 ALSA: timer: Fix missing queue indices reset at SNDRV_TIMER_IOCTL_SELECT snd_timer_user_tselect() reallocates the queue buffer dynamically, but it forgot to reset its indices. Since the read may happen concurrently with ioctl and snd_timer_user_tselect() allocates the buffer via kmalloc(), this may lead to the leak of uninitialized kernel-space data, as spotted via KMSAN: BUG: KMSAN: use of unitialized memory in snd_timer_user_read+0x6c4/0xa10 CPU: 0 PID: 1037 Comm: probe Not tainted 4.11.0-rc5+ #2739 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 dump_stack+0x143/0x1b0 lib/dump_stack.c:52 kmsan_report+0x12a/0x180 mm/kmsan/kmsan.c:1007 kmsan_check_memory+0xc2/0x140 mm/kmsan/kmsan.c:1086 copy_to_user ./arch/x86/include/asm/uaccess.h:725 snd_timer_user_read+0x6c4/0xa10 sound/core/timer.c:2004 do_loop_readv_writev fs/read_write.c:716 __do_readv_writev+0x94c/0x1380 fs/read_write.c:864 do_readv_writev fs/read_write.c:894 vfs_readv fs/read_write.c:908 do_readv+0x52a/0x5d0 fs/read_write.c:934 SYSC_readv+0xb6/0xd0 fs/read_write.c:1021 SyS_readv+0x87/0xb0 fs/read_write.c:1018 This patch adds the missing reset of queue indices. Together with the previous fix for the ioctl/read race, we cover the whole problem. Reported-by: Alexander Potapenko Tested-by: Alexander Potapenko Cc: Signed-off-by: Takashi Iwai sound/core/timer.c | 1 + 1 file changed, 1 insertion(+) commit d11662f4f798b50d8c8743f433842c3e40fe3378 Author: Takashi Iwai Date: Fri Jun 2 15:03:38 2017 +0200 ALSA: timer: Fix race between read and ioctl The read from ALSA timer device, the function snd_timer_user_tread(), may access to an uninitialized struct snd_timer_user fields when the read is concurrently performed while the ioctl like snd_timer_user_tselect() is invoked. We have already fixed the races among ioctls via a mutex, but we seem to have forgotten the race between read vs ioctl. This patch simply applies (more exactly extends the already applied range of) tu->ioctl_lock in snd_timer_user_tread() for closing the race window. Reported-by: Alexander Potapenko Tested-by: Alexander Potapenko Cc: Signed-off-by: Takashi Iwai sound/core/timer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b81f884a547b5c264c13fdfaa3b65cf994bf1dcf Author: Hangbin Liu Date: Thu Jun 1 14:57:56 2017 +0800 xfrm: fix xfrm_dev_event() missing when compile without CONFIG_XFRM_OFFLOAD In commit d77e38e612a0 ("xfrm: Add an IPsec hardware offloading API") we make xfrm_device.o only compiled when enable option CONFIG_XFRM_OFFLOAD. But this will make xfrm_dev_event() missing if we only enable default XFRM options. Then if we set down and unregister an interface with IPsec on it. there will no xfrm_garbage_collect(), which will cause dev usage count hold and get error like: unregister_netdevice: waiting for to become free. Usage count = 4 Fixes: d77e38e612a0 ("xfrm: Add an IPsec hardware offloading API") Signed-off-by: Hangbin Liu Signed-off-by: Steffen Klassert include/net/xfrm.h | 7 ++----- net/xfrm/Makefile | 3 +-- net/xfrm/xfrm_device.c | 2 ++ 3 files changed, 5 insertions(+), 7 deletions(-) commit 151d1d752bb681f29898c68c966f6e17b446456c Author: Alexander Sverdlin Date: Mon May 22 15:30:21 2017 +0200 MAINTAINERS: EP93XX: Update maintainership As agreed with Ryan, change the maintainership. Signed-off-by: Alexander Sverdlin Acked-by: Ryan Mallon Acked-by: H Hartley Sweeten Signed-off-by: Olof Johansson MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3b7eaae1b35eb8077610eb7c7db042c9b0645e1 Author: Rafael J. Wysocki Date: Wed Jun 7 00:57:37 2017 +0200 Revert "ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle" Revert commit eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle) as it turned out to be premature and triggered a number of different issues on various systems. That includes, but is not limited to, premature suspend-to-RAM aborts on Dell XPS 13 (9343) reported by Dominik. The issue the commit in question attempted to address is real and will need to be taken care of going forward, but evidently more work is needed for this purpose. Reported-by: Dominik Brodowski Signed-off-by: Rafael J. Wysocki drivers/acpi/battery.c | 2 +- drivers/acpi/button.c | 5 ++--- drivers/acpi/device_pm.c | 3 +-- drivers/acpi/sleep.c | 28 ---------------------------- drivers/base/power/main.c | 5 +++++ drivers/base/power/wakeup.c | 18 ++++++------------ include/linux/suspend.h | 7 ++----- kernel/power/process.c | 2 +- kernel/power/suspend.c | 29 ++++------------------------- 9 files changed, 22 insertions(+), 77 deletions(-) commit b29794ec95c6856b316c2295904208bf11ffddd9 Merge: e87f327 1d3028f Author: Linus Torvalds Date: Tue Jun 6 14:30:17 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Made TCP congestion control documentation match current reality, from Anmol Sarma. 2) Various build warning and failure fixes from Arnd Bergmann. 3) Fix SKB list leak in ipv6_gso_segment(). 4) Use after free in ravb driver, from Eugeniu Rosca. 5) Don't use udp_poll() in ping protocol driver, from Eric Dumazet. 6) Don't crash in PCI error recovery of cxgb4 driver, from Guilherme Piccoli. 7) _SRC_NAT_DONE_BIT needs to be cleared using atomics, from Liping Zhang. 8) Use after free in vxlan deletion, from Mark Bloch. 9) Fix ordering of NAPI poll enabled in ethoc driver, from Max Filippov. 10) Fix stmmac hangs with TSO, from Niklas Cassel. 11) Fix crash in CALIPSO ipv6, from Richard Haines. 12) Clear nh_flags properly on mpls link up. From Roopa Prabhu. 13) Fix regression in sk_err socket error queue handling, noticed by ping applications. From Soheil Hassas Yeganeh. 14) Update mlx4/mlx5 MAINTAINERS information. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (78 commits) net: stmmac: fix a broken u32 less than zero check net: stmmac: fix completely hung TX when using TSO net: ethoc: enable NAPI before poll may be scheduled net: bridge: fix a null pointer dereference in br_afspec ravb: Fix use-after-free on `ifconfig eth0 down` net/ipv6: Fix CALIPSO causing GPF with datagram support net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value Revert "sit: reload iphdr in ipip6_rcv" i40e/i40evf: proper update of the page_offset field i40e: Fix state flags for bit set and clean operations of PF iwlwifi: fix host command memory leaks iwlwifi: fix min API version for 7265D, 3168, 8000 and 8265 iwlwifi: mvm: clear new beacon command template struct iwlwifi: mvm: don't fail when removing a key from an inexisting sta iwlwifi: pcie: only use d0i3 in suspend/resume if system_pm is set to d0i3 iwlwifi: mvm: fix firmware debug restart recording iwlwifi: tt: move ucode_loaded check under mutex iwlwifi: mvm: support ibss in dqa mode iwlwifi: mvm: Fix command queue number on d0i3 flow iwlwifi: mvm: rs: start using LQ command color ... commit e87f327ecd166e6cf0205e4e9b8003ec535add51 Merge: abb2ea7 b3aefc2 Author: Linus Torvalds Date: Tue Jun 6 14:28:18 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: 1) Fix TLB context wrap races, from Pavel Tatashin. 2) Cure some gcc-7 build issues. 3) Handle invalid setup_hugepagesz command line values properly, from Liam R Howlett. 4) Copy TSB using the correct address shift for the huge TSB, from Mike Kravetz. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: delete old wrap code sparc64: new context wrap sparc64: add per-cpu mm of secondary contexts sparc64: redefine first version sparc64: combine activate_mm and switch_mm sparc64: reset mm cpumask after wrap sparc/mm/hugepages: Fix setup_hugepagesz for invalid values. sparc: Machine description indices can vary sparc64: mm: fix copy_tsb to correctly copy huge page TSBs arch/sparc: support NR_CPUS = 4096 sparc64: Add __multi3 for gcc 7.x and later. sparc64: Fix build warnings with gcc 7. arch/sparc: increase CONFIG_NODES_SHIFT on SPARC64 to 5 commit abb2ea7dfd82451d85ce669b811310c05ab5ca46 Author: David Rientjes Date: Tue Jun 6 13:36:24 2017 -0700 compiler, clang: suppress warning for unused static inline functions GCC explicitly does not warn for unused static inline functions for -Wunused-function. The manual states: Warn whenever a static function is declared but not defined or a non-inline static function is unused. Clang does warn for static inline functions that are unused. It turns out that suppressing the warnings avoids potentially complex #ifdef directives, which also reduces LOC. Suppress the warning for clang. Signed-off-by: David Rientjes Signed-off-by: Linus Torvalds include/linux/compiler-clang.h | 7 +++++++ 1 file changed, 7 insertions(+) commit b3aefc2fbdff2576d0c5aca09b963c40f0299664 Merge: f322980 0197e41 Author: David S. Miller Date: Tue Jun 6 13:45:48 2017 -0700 Merge branch 'sparc64-context-wrap-fixes' Pavel Tatashin says: ==================== sparc64: context wrap fixes This patch series contains fixes for context wrap: when we are out of context ids, and need to get a new version. It fixes memory corruption issues which happen when more than number of context ids (currently set to 8K) number of processes are started simultaneously, and processes can get a wrong context. sparc64: new context wrap: - contains explanation of new wrap method, and also explanation of races that it solves sparc64: reset mm cpumask after wrap - explains issue of not reseting cpu mask on a wrap ==================== Signed-off-by: David S. Miller commit 0197e41ce70511dc3b71f7fefa1a676e2b5cd60b Author: Pavel Tatashin Date: Wed May 31 11:25:25 2017 -0400 sparc64: delete old wrap code The old method that is using xcall and softint to get new context id is deleted, as it is replaced by a method of using per_cpu_secondary_mm without xcall to perform the context wrap. Signed-off-by: Pavel Tatashin Reviewed-by: Bob Picco Reviewed-by: Steven Sistare Signed-off-by: David S. Miller arch/sparc/include/asm/mmu_context_64.h | 6 ------ arch/sparc/include/asm/pil.h | 1 - arch/sparc/kernel/kernel.h | 1 - arch/sparc/kernel/smp_64.c | 31 ------------------------------- arch/sparc/kernel/ttable_64.S | 2 +- arch/sparc/mm/ultra.S | 5 ----- 6 files changed, 1 insertion(+), 45 deletions(-) commit a0582f26ec9dfd5360ea2f35dd9a1b026f8adda0 Author: Pavel Tatashin Date: Wed May 31 11:25:24 2017 -0400 sparc64: new context wrap The current wrap implementation has a race issue: it is called outside of the ctx_alloc_lock, and also does not wait for all CPUs to complete the wrap. This means that a thread can get a new context with a new version and another thread might still be running with the same context. The problem is especially severe on CPUs with shared TLBs, like sun4v. I used the following test to very quickly reproduce the problem: - start over 8K processes (must be more than context IDs) - write and read values at a memory location in every process. Very quickly memory corruptions start happening, and what we read back does not equal what we wrote. Several approaches were explored before settling on this one: Approach 1: Move smp_new_mmu_context_version() inside ctx_alloc_lock, and wait for every process to complete the wrap. (Note: every CPU must WAIT before leaving smp_new_mmu_context_version_client() until every one arrives). This approach ends up with deadlocks, as some threads own locks which other threads are waiting for, and they never receive softint until these threads exit smp_new_mmu_context_version_client(). Since we do not allow the exit, deadlock happens. Approach 2: Handle wrap right during mondo interrupt. Use etrap/rtrap to enter into into C code, and issue new versions to every CPU. This approach adds some overhead to runtime: in switch_mm() we must add some checks to make sure that versions have not changed due to wrap while we were loading the new secondary context. (could be protected by PSTATE_IE but that degrades performance as on M7 and older CPUs as it takes 50 cycles for each access). Also, we still need a global per-cpu array of MMs to know where we need to load new contexts, otherwise we can change context to a thread that is going way (if we received mondo between switch_mm() and switch_to() time). Finally, there are some issues with window registers in rtrap() when context IDs are changed during CPU mondo time. The approach in this patch is the simplest and has almost no impact on runtime. We use the array with mm's where last secondary contexts were loaded onto CPUs and bump their versions to the new generation without changing context IDs. If a new process comes in to get a context ID, it will go through get_new_mmu_context() because of version mismatch. But the running processes do not need to be interrupted. And wrap is quicker as we do not need to xcall and wait for everyone to receive and complete wrap. Signed-off-by: Pavel Tatashin Reviewed-by: Bob Picco Reviewed-by: Steven Sistare Signed-off-by: David S. Miller arch/sparc/mm/init_64.c | 81 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 54 insertions(+), 27 deletions(-) commit 7a5b4bbf49fe86ce77488a70c5dccfe2d50d7a2d Author: Pavel Tatashin Date: Wed May 31 11:25:23 2017 -0400 sparc64: add per-cpu mm of secondary contexts The new wrap is going to use information from this array to figure out mm's that currently have valid secondary contexts setup. Signed-off-by: Pavel Tatashin Reviewed-by: Bob Picco Reviewed-by: Steven Sistare Signed-off-by: David S. Miller arch/sparc/include/asm/mmu_context_64.h | 5 +++-- arch/sparc/mm/init_64.c | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) commit c4415235b2be0cc791572e8e7f7466ab8f73a2bf Author: Pavel Tatashin Date: Wed May 31 11:25:22 2017 -0400 sparc64: redefine first version CTX_FIRST_VERSION defines the first context version, but also it defines first context. This patch redefines it to only include the first context version. Signed-off-by: Pavel Tatashin Reviewed-by: Bob Picco Reviewed-by: Steven Sistare Signed-off-by: David S. Miller arch/sparc/include/asm/mmu_64.h | 2 +- arch/sparc/mm/init_64.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 14d0334c6748ff2aedb3f2f7fdc51ee90a9b54e7 Author: Pavel Tatashin Date: Wed May 31 11:25:21 2017 -0400 sparc64: combine activate_mm and switch_mm The only difference between these two functions is that in activate_mm we unconditionally flush context. However, there is no need to keep this difference after fixing a bug where cpumask was not reset on a wrap. So, in this patch we combine these. Signed-off-by: Pavel Tatashin Reviewed-by: Bob Picco Reviewed-by: Steven Sistare Signed-off-by: David S. Miller arch/sparc/include/asm/mmu_context_64.h | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit 588974857359861891f478a070b1dc7ae04a3880 Author: Pavel Tatashin Date: Wed May 31 11:25:20 2017 -0400 sparc64: reset mm cpumask after wrap After a wrap (getting a new context version) a process must get a new context id, which means that we would need to flush the context id from the TLB before running for the first time with this ID on every CPU. But, we use mm_cpumask to determine if this process has been running on this CPU before, and this mask is not reset after a wrap. So, there are two possible fixes for this issue: 1. Clear mm cpumask whenever mm gets a new context id 2. Unconditionally flush context every time process is running on a CPU This patch implements the first solution Signed-off-by: Pavel Tatashin Reviewed-by: Bob Picco Reviewed-by: Steven Sistare Signed-off-by: David S. Miller arch/sparc/mm/init_64.c | 2 ++ 1 file changed, 2 insertions(+) commit f322980b74a15e08f8c70a34a5864ecdbf957251 Author: Liam R. Howlett Date: Tue May 30 15:45:00 2017 -0400 sparc/mm/hugepages: Fix setup_hugepagesz for invalid values. hugetlb_bad_size needs to be called on invalid values. Also change the pr_warn to a pr_err to better align with other platforms. Signed-off-by: Liam R. Howlett Signed-off-by: David S. Miller arch/sparc/mm/init_64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c982aa9c304bf0b9a7522fd118fed4afa5a0263c Author: James Clarke Date: Mon May 29 20:17:56 2017 +0100 sparc: Machine description indices can vary VIO devices were being looked up by their index in the machine description node block, but this often varies over time as devices are added and removed. Instead, store the ID and look up using the type, config handle and ID. Signed-off-by: James Clarke Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=112541 Signed-off-by: David S. Miller arch/sparc/include/asm/vio.h | 1 + arch/sparc/kernel/vio.c | 68 +++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 65 insertions(+), 4 deletions(-) commit 654f4807624a657f364417c2a7454f0df9961734 Author: Mike Kravetz Date: Fri Jun 2 14:51:12 2017 -0700 sparc64: mm: fix copy_tsb to correctly copy huge page TSBs When a TSB grows beyond its current capacity, a new TSB is allocated and copy_tsb is called to copy entries from the old TSB to the new. A hash shift based on page size is used to calculate the index of an entry in the TSB. copy_tsb has hard coded PAGE_SHIFT in these calculations. However, for huge page TSBs the value REAL_HPAGE_SHIFT should be used. As a result, when copy_tsb is called for a huge page TSB the entries are placed at the incorrect index in the newly allocated TSB. When doing hardware table walk, the MMU does not match these entries and we end up in the TSB miss handling code. This code will then create and write an entry to the correct index in the TSB. We take a performance hit for the table walk miss and recreation of these entries. Pass a new parameter to copy_tsb that is the page size shift to be used when copying the TSB. Suggested-by: Anthony Yznaga Signed-off-by: Mike Kravetz Signed-off-by: David S. Miller arch/sparc/kernel/tsb.S | 11 +++++++---- arch/sparc/mm/tsb.c | 7 +++++-- 2 files changed, 12 insertions(+), 6 deletions(-) commit c79a13734d104b5b147d7cb0870276ccdd660dae Author: Jane Chu Date: Tue Jun 6 14:32:29 2017 -0600 arch/sparc: support NR_CPUS = 4096 Linux SPARC64 limits NR_CPUS to 4064 because init_cpu_send_mondo_info() only allocates a single page for NR_CPUS mondo entries. Thus we cannot use all 4096 CPUs on some SPARC platforms. To fix, allocate (2^order) pages where order is set according to the size of cpu_list for possible cpus. Since cpu_list_pa and cpu_mondo_block_pa are not used in asm code, there are no imm13 offsets from the base PA that will break because they can only reach one page. Orabug: 25505750 Signed-off-by: Jane Chu Reviewed-by: Bob Picco Reviewed-by: Atish Patra Signed-off-by: David S. Miller arch/sparc/Kconfig | 4 ++-- arch/sparc/kernel/irq_64.c | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) commit 1d3028f4c16487d63861ab6c68451768a7a109df Author: Colin Ian King Date: Tue Jun 6 14:10:49 2017 +0100 net: stmmac: fix a broken u32 less than zero check The check that queue is less or equal to zero is always true because queue is a u32; queue is decremented and will wrap around and never go -ve. Fix this by making queue an int. Detected by CoverityScan, CID#1428988 ("Unsigned compared against 0") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 426849e6611f2092553f8d53372ae310818a6292 Author: Niklas Cassel Date: Tue Jun 6 09:25:00 2017 +0200 net: stmmac: fix completely hung TX when using TSO stmmac_tso_allocator can fail to set the Last Descriptor bit on a descriptor that actually was the last descriptor. This happens when the buffer of the last descriptor ends up having a size of exactly TSO_MAX_BUFF_SIZE. When the IP eventually reaches the next last descriptor, which actually has the bit set, the DMA will hang. When the DMA hangs, we get a tx timeout, however, since stmmac does not do a complete reset of the IP in stmmac_tx_timeout, we end up in a state with completely hung TX. Signed-off-by: Niklas Cassel Acked-by: Giuseppe Cavallaro Acked-by: Alexandre TORGUE Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d220b942a4b6a0640aee78841608f4aa5e8e185e Author: Max Filippov Date: Mon Jun 5 18:31:16 2017 -0700 net: ethoc: enable NAPI before poll may be scheduled ethoc_reset enables device interrupts, ethoc_interrupt may schedule a NAPI poll before NAPI is enabled in the ethoc_open, which results in device being unable to send or receive anything until it's closed and reopened. In case the device is flooded with ingress packets it may be unable to recover at all. Move napi_enable above ethoc_reset in the ethoc_open to fix that. Fixes: a1702857724f ("net: Add support for the OpenCores 10/100 Mbps Ethernet MAC.") Signed-off-by: Max Filippov Reviewed-by: Tobias Klauser Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/ethoc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 33b5c38852b29736f3b472dd095c9a18ec22746f Author: Marc Zyngier Date: Tue Jun 6 19:08:35 2017 +0100 arm: KVM: Allow unaligned accesses at HYP We currently have the HSCTLR.A bit set, trapping unaligned accesses at HYP, but we're not really prepared to deal with it. Since the rest of the kernel is pretty happy about that, let's follow its example and set HSCTLR.A to zero. Modern CPUs don't really care. Cc: stable@vger.kernel.org Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/init.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 78fd6dcf11468a5a131b8365580d0c613bcc02cb Author: Marc Zyngier Date: Tue Jun 6 19:08:34 2017 +0100 arm64: KVM: Allow unaligned accesses at EL2 We currently have the SCTLR_EL2.A bit set, trapping unaligned accesses at EL2, but we're not really prepared to deal with it. So far, this has been unnoticed, until GCC 7 started emitting those (in particular 64bit writes on a 32bit boundary). Since the rest of the kernel is pretty happy about that, let's follow its example and set SCTLR_EL2.A to zero. Modern CPUs don't really care. Cc: stable@vger.kernel.org Reported-by: Alexander Graf Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kvm/hyp-init.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d68c1f7fd1b7148dab5fe658321d511998969f2d Author: Marc Zyngier Date: Tue Jun 6 19:08:33 2017 +0100 arm64: KVM: Preserve RES1 bits in SCTLR_EL2 __do_hyp_init has the rather bad habit of ignoring RES1 bits and writing them back as zero. On a v8.0-8.2 CPU, this doesn't do anything bad, but may end-up being pretty nasty on future revisions of the architecture. Let's preserve those bits so that we don't have to fix this later on. Cc: stable@vger.kernel.org Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/sysreg.h | 4 ++++ arch/arm64/kvm/hyp-init.S | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) commit 1020ce3108cc26fbf09d70550ea2937cb1a211d2 Author: Nikolay Aleksandrov Date: Tue Jun 6 01:26:24 2017 +0300 net: bridge: fix a null pointer dereference in br_afspec We might call br_afspec() with p == NULL which is a valid use case if the action is on the bridge device itself, but the bridge tunnel code dereferences the p pointer without checking, so check if p is null first. Reported-by: Gustavo A. R. Silva Fixes: efa5356b0d97 ("bridge: per vlan dst_metadata netlink support") Signed-off-by: Nikolay Aleksandrov Acked-by: Roopa Prabhu Signed-off-by: David S. Miller net/bridge/br_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79514ef670e9e575a1fe36922268c439d0f0ca8a Author: Eugeniu Rosca Date: Tue Jun 6 00:08:10 2017 +0200 ravb: Fix use-after-free on `ifconfig eth0 down` Commit a47b70ea86bd ("ravb: unmap descriptors when freeing rings") has introduced the issue seen in [1] reproduced on H3ULCB board. Fix this by relocating the RX skb ringbuffer free operation, so that swiotlb page unmapping can be done first. Freeing of aligned TX buffers is not relevant to the issue seen in [1]. Still, reposition TX free calls as well, to have all kfree() operations performed consistently _after_ dma_unmap_*()/dma_free_*(). [1] Console screenshot with the problem reproduced: salvator-x login: root root@salvator-x:~# ifconfig eth0 up Micrel KSZ9031 Gigabit PHY e6800000.ethernet-ffffffff:00: \ attached PHY driver [Micrel KSZ9031 Gigabit PHY] \ (mii_bus:phy_addr=e6800000.ethernet-ffffffff:00, irq=235) IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready root@salvator-x:~# root@salvator-x:~# ifconfig eth0 down ================================================================== BUG: KASAN: use-after-free in swiotlb_tbl_unmap_single+0xc4/0x35c Write of size 1538 at addr ffff8006d884f780 by task ifconfig/1649 CPU: 0 PID: 1649 Comm: ifconfig Not tainted 4.12.0-rc4-00004-g112eb07287d1 #32 Hardware name: Renesas H3ULCB board based on r8a7795 (DT) Call trace: [] dump_backtrace+0x0/0x3a4 [] show_stack+0x14/0x1c [] dump_stack+0xf8/0x150 [] print_address_description+0x7c/0x330 [] kasan_report+0x2e0/0x2f4 [] check_memory_region+0x20/0x14c [] memcpy+0x48/0x68 [] swiotlb_tbl_unmap_single+0xc4/0x35c [] unmap_single+0x90/0xa4 [] swiotlb_unmap_page+0xc/0x14 [] __swiotlb_unmap_page+0xcc/0xe4 [] ravb_ring_free+0x514/0x870 [] ravb_close+0x288/0x36c [] __dev_close_many+0x14c/0x174 [] __dev_close+0xc8/0x144 [] __dev_change_flags+0xd8/0x194 [] dev_change_flags+0x60/0xb0 [] devinet_ioctl+0x484/0x9d4 [] inet_ioctl+0x190/0x194 [] sock_do_ioctl+0x78/0xa8 [] sock_ioctl+0x110/0x3c4 [] vfs_ioctl+0x90/0xa0 [] do_vfs_ioctl+0x148/0xc38 [] SyS_ioctl+0x44/0x74 [] el0_svc_naked+0x24/0x28 The buggy address belongs to the page: page:ffff7e001b6213c0 count:0 mapcount:0 mapping: (null) index:0x0 flags: 0x4000000000000000() raw: 4000000000000000 0000000000000000 0000000000000000 00000000ffffffff raw: 0000000000000000 ffff7e001b6213e0 0000000000000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8006d884f680: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8006d884f700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8006d884f780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8006d884f800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8006d884f880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== Disabling lock debugging due to kernel taint root@salvator-x:~# Fixes: a47b70ea86bd ("ravb: unmap descriptors when freeing rings") Signed-off-by: Eugeniu Rosca Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit e3ebdb20fddacded2740a333ff66781e0d28b05c Author: Richard Haines Date: Mon Jun 5 16:44:40 2017 +0100 net/ipv6: Fix CALIPSO causing GPF with datagram support When using CALIPSO with IPPROTO_UDP it is possible to trigger a GPF as the IP header may have moved. Also update the payload length after adding the CALIPSO option. Signed-off-by: Richard Haines Acked-by: Paul Moore Signed-off-by: Huw Davies Signed-off-by: David S. Miller net/ipv6/calipso.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 594238158bf748c285f0a73222cd9b7ccf3c525d Author: Colin Ian King Date: Mon Jun 5 10:04:52 2017 +0100 net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value The current comparison of entry < 0 will never be true since entry is an unsigned integer. Make entry an int to ensure -ve error return values from the call to jumbo_frm are correctly being caught. Detected by CoverityScan, CID#1238760 ("Macro compares unsigned to 0") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dd8038ec56c18680ddddf948247f53d427054f45 Merge: 4eab0ea 7327a94 Author: Takashi Iwai Date: Tue Jun 6 20:03:46 2017 +0200 Merge tag 'asoc-fix-v4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v4.12 This is the usual collection of device specific fixes, all accumilated since the merge window, plus one fix from Takashi for a nasty use after free bug that bit some things with deferred probe and an update to the maintainer address for the former Wolfson parts. commit 9bd2bbc01d17ddd567cc0f81f77fe1163e497462 Author: Eric Biggers Date: Fri Jun 2 20:35:51 2017 -0700 elevator: fix truncation of icq_cache_name gcc 7.1 reports the following warning: block/elevator.c: In function ‘elv_register’: block/elevator.c:898:5: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] "%s_io_cq", e->elevator_name); ^~~~~~~~~~ block/elevator.c:897:3: note: ‘snprintf’ output between 7 and 22 bytes into a destination of size 21 snprintf(e->icq_cache_name, sizeof(e->icq_cache_name), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%s_io_cq", e->elevator_name); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The bug is that the name of the icq_cache is 6 characters longer than the elevator name, but only ELV_NAME_MAX + 5 characters were reserved for it --- so in the case of a maximum-length elevator name, the 'q' character in "_io_cq" would be truncated by snprintf(). Fix it by reserving ELV_NAME_MAX + 6 characters instead. Signed-off-by: Eric Biggers Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe include/linux/elevator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b868fed00f6c72d3e0270bcb057b4f26c09e809 Merge: 80971df dc89481 Author: David S. Miller Date: Tue Jun 6 12:53:20 2017 -0400 Merge tag 'wireless-drivers-for-davem-2017-06-06' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.12 It has been a slow start of cycle and this the first set of fixes for 4.12. Nothing really major here. wcn36xx * fix an issue with module reload brcmfmac * fix aligment regression on 64 bit systems iwlwifi * fixes for memory leaks, runtime PM, memory initialisation and other smaller problems * fix IBSS on devices using DQA mode (7260 and up) * fix the minimum firmware API requirement for 7265D, 3168, 8000 and 8265 ==================== Signed-off-by: David S. Miller commit 84c6c3035b1de00271362a9550389c605c7d28a0 Merge: ba7b238 963761a Author: Linus Torvalds Date: Tue Jun 6 09:37:44 2017 -0700 Merge tag 'media/v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Some bug fixes: - Don't fail build if atomisp has warnings - Some CEC Kconfig changes to allow it to be used by DRM without media dependencies - A race fix at RC initialization code - A driver fix at rainshadow-cec IMHO, the one that affects most people in this series is a build fix: if you try to build the Kernel with W=1 or using gcc7 and all[yes|mod]config, build will fail due to -Werror at atomisp makefiles" * tag 'media/v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] rc-core: race condition during ir_raw_event_register() [media] cec: drop MEDIA_CEC_DEBUG [media] cec: rename MEDIA_CEC_NOTIFIER to CEC_NOTIFIER [media] cec: select CEC_CORE instead of depend on it [media] rainshadow-cec: ensure exit_loop is intialized [media] atomisp: don't treat warnings as errors commit 80971dfbf047c25b4160f708711fed7e3b28c372 Merge: f4eb17e 2aae918 Author: David S. Miller Date: Tue Jun 6 12:12:57 2017 -0400 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2017-06-06 This series contains fixes to i40e and i40evf only. Mauro S. M. Rodrigues fixes a flood in the kernel log which was introduced in a previous commit because of a mistaken substitution of __I40E_VSI_DOWN instead of __I40E_DOWN when testing the state of the PF. Björn Töpel fixes an issue introduced in a previous commit where the offset was incorrect and could lead to data corruption for architectures using PAGE_SIZE larger than 8191. Fixed the issue by updating the page_offset correctly using the proper setting for truesize. ==================== Signed-off-by: David S. Miller commit d964f04a8fde84d978eff0d96561faa6e8de24de Author: Ming Lei Date: Tue Jun 6 23:22:00 2017 +0800 blk-mq: fix direct issue If queue is stopped, we shouldn't dispatch request into driver and hardware, unfortunately the check is removed in bd166ef183c2(blk-mq-sched: add framework for MQ capable IO schedulers). This patch fixes the issue by moving the check back into __blk_mq_try_issue_directly(). This patch fixes request use-after-free[1][2] during canceling requets of NVMe in nvme_dev_disable(), which can be triggered easily during NVMe reset & remove test. [1] oops kernel log when CONFIG_BLK_DEV_INTEGRITY is on [ 103.412969] BUG: unable to handle kernel NULL pointer dereference at 000000000000000a [ 103.412980] IP: bio_integrity_advance+0x48/0xf0 [ 103.412981] PGD 275a88067 [ 103.412981] P4D 275a88067 [ 103.412982] PUD 276c43067 [ 103.412983] PMD 0 [ 103.412984] [ 103.412986] Oops: 0000 [#1] SMP [ 103.412989] Modules linked in: vfat fat intel_rapl sb_edac x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel crypto_simd cryptd ipmi_ssif iTCO_wdt iTCO_vendor_support mxm_wmi glue_helper dcdbas ipmi_si mei_me pcspkr mei sg ipmi_devintf lpc_ich ipmi_msghandler shpchp acpi_power_meter wmi nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod mgag200 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm crc32c_intel nvme ahci nvme_core libahci libata tg3 i2c_core megaraid_sas ptp pps_core dm_mirror dm_region_hash dm_log dm_mod [ 103.413035] CPU: 0 PID: 102 Comm: kworker/0:2 Not tainted 4.11.0+ #1 [ 103.413036] Hardware name: Dell Inc. PowerEdge R730xd/072T6D, BIOS 2.2.5 09/06/2016 [ 103.413041] Workqueue: events nvme_remove_dead_ctrl_work [nvme] [ 103.413043] task: ffff9cc8775c8000 task.stack: ffffc033c252c000 [ 103.413045] RIP: 0010:bio_integrity_advance+0x48/0xf0 [ 103.413046] RSP: 0018:ffffc033c252fc10 EFLAGS: 00010202 [ 103.413048] RAX: 0000000000000000 RBX: ffff9cc8720a8cc0 RCX: ffff9cca72958240 [ 103.413049] RDX: ffff9cca72958000 RSI: 0000000000000008 RDI: ffff9cc872537f00 [ 103.413049] RBP: ffffc033c252fc28 R08: 0000000000000000 R09: ffffffffb963a0d5 [ 103.413050] R10: 000000000000063e R11: 0000000000000000 R12: ffff9cc8720a8d18 [ 103.413051] R13: 0000000000001000 R14: ffff9cc872682e00 R15: 00000000fffffffb [ 103.413053] FS: 0000000000000000(0000) GS:ffff9cc877c00000(0000) knlGS:0000000000000000 [ 103.413054] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 103.413055] CR2: 000000000000000a CR3: 0000000276c41000 CR4: 00000000001406f0 [ 103.413056] Call Trace: [ 103.413063] bio_advance+0x2a/0xe0 [ 103.413067] blk_update_request+0x76/0x330 [ 103.413072] blk_mq_end_request+0x1a/0x70 [ 103.413074] blk_mq_dispatch_rq_list+0x370/0x410 [ 103.413076] ? blk_mq_flush_busy_ctxs+0x94/0xe0 [ 103.413080] blk_mq_sched_dispatch_requests+0x173/0x1a0 [ 103.413083] __blk_mq_run_hw_queue+0x8e/0xa0 [ 103.413085] __blk_mq_delay_run_hw_queue+0x9d/0xa0 [ 103.413088] blk_mq_start_hw_queue+0x17/0x20 [ 103.413090] blk_mq_start_hw_queues+0x32/0x50 [ 103.413095] nvme_kill_queues+0x54/0x80 [nvme_core] [ 103.413097] nvme_remove_dead_ctrl_work+0x1f/0x40 [nvme] [ 103.413103] process_one_work+0x149/0x360 [ 103.413105] worker_thread+0x4d/0x3c0 [ 103.413109] kthread+0x109/0x140 [ 103.413111] ? rescuer_thread+0x380/0x380 [ 103.413113] ? kthread_park+0x60/0x60 [ 103.413120] ret_from_fork+0x2c/0x40 [ 103.413121] Code: 08 4c 8b 63 50 48 8b 80 80 00 00 00 48 8b 90 d0 03 00 00 31 c0 48 83 ba 40 02 00 00 00 48 8d 8a 40 02 00 00 48 0f 45 c1 c1 ee 09 <0f> b6 48 0a 0f b6 40 09 41 89 f5 83 e9 09 41 d3 ed 44 0f af e8 [ 103.413145] RIP: bio_integrity_advance+0x48/0xf0 RSP: ffffc033c252fc10 [ 103.413146] CR2: 000000000000000a [ 103.413157] ---[ end trace cd6875d16eb5a11e ]--- [ 103.455368] Kernel panic - not syncing: Fatal exception [ 103.459826] Kernel Offset: 0x37600000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) [ 103.850916] ---[ end Kernel panic - not syncing: Fatal exception [ 103.857637] sched: Unexpected reschedule of offline CPU#1! [ 103.863762] ------------[ cut here ]------------ [2] kernel hang in blk_mq_freeze_queue_wait() when CONFIG_BLK_DEV_INTEGRITY is off [ 247.129825] INFO: task nvme-test:1772 blocked for more than 120 seconds. [ 247.137311] Not tainted 4.12.0-rc2.upstream+ #4 [ 247.142954] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 247.151704] Call Trace: [ 247.154445] __schedule+0x28a/0x880 [ 247.158341] schedule+0x36/0x80 [ 247.161850] blk_mq_freeze_queue_wait+0x4b/0xb0 [ 247.166913] ? remove_wait_queue+0x60/0x60 [ 247.171485] blk_freeze_queue+0x1a/0x20 [ 247.175770] blk_cleanup_queue+0x7f/0x140 [ 247.180252] nvme_ns_remove+0xa3/0xb0 [nvme_core] [ 247.185503] nvme_remove_namespaces+0x32/0x50 [nvme_core] [ 247.191532] nvme_uninit_ctrl+0x2d/0xa0 [nvme_core] [ 247.196977] nvme_remove+0x70/0x110 [nvme] [ 247.201545] pci_device_remove+0x39/0xc0 [ 247.205927] device_release_driver_internal+0x141/0x200 [ 247.211761] device_release_driver+0x12/0x20 [ 247.216531] pci_stop_bus_device+0x8c/0xa0 [ 247.221104] pci_stop_and_remove_bus_device_locked+0x1a/0x30 [ 247.227420] remove_store+0x7c/0x90 [ 247.231320] dev_attr_store+0x18/0x30 [ 247.235409] sysfs_kf_write+0x3a/0x50 [ 247.239497] kernfs_fop_write+0xff/0x180 [ 247.243867] __vfs_write+0x37/0x160 [ 247.247757] ? selinux_file_permission+0xe5/0x120 [ 247.253011] ? security_file_permission+0x3b/0xc0 [ 247.258260] vfs_write+0xb2/0x1b0 [ 247.261964] ? syscall_trace_enter+0x1d0/0x2b0 [ 247.266924] SyS_write+0x55/0xc0 [ 247.270540] do_syscall_64+0x67/0x150 [ 247.274636] entry_SYSCALL64_slow_path+0x25/0x25 [ 247.279794] RIP: 0033:0x7f5c96740840 [ 247.283785] RSP: 002b:00007ffd00e87ee8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 247.292238] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f5c96740840 [ 247.300194] RDX: 0000000000000002 RSI: 00007f5c97060000 RDI: 0000000000000001 [ 247.308159] RBP: 00007f5c97060000 R08: 000000000000000a R09: 00007f5c97059740 [ 247.316123] R10: 0000000000000001 R11: 0000000000000246 R12: 00007f5c96a14400 [ 247.324087] R13: 0000000000000002 R14: 0000000000000001 R15: 0000000000000000 [ 370.016340] INFO: task nvme-test:1772 blocked for more than 120 seconds. Fixes: 12d70958a2e8(blk-mq: don't fail allocating driver tag for stopped hw queue) Cc: stable@vger.kernel.org Signed-off-by: Ming Lei Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-mq.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit dad7a3be4960e5545882a0cd8d7613af22874314 Author: Ming Lei Date: Tue Jun 6 23:21:59 2017 +0800 blk-mq: pass correct hctx to blk_mq_try_issue_directly When direct issue is done on request picked up from plug list, the hctx need to be updated with the actual hw queue, otherwise wrong hctx is used and may hurt performance, especially when wrong SRCU readlock is acquired/released Reported-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f4eb17e1efe538d4da7d574bedb00a8dafcc26b7 Author: David S. Miller Date: Tue Jun 6 11:34:06 2017 -0400 Revert "sit: reload iphdr in ipip6_rcv" This reverts commit b699d0035836f6712917a41e7ae58d84359b8ff9. As per Eric Dumazet, the pskb_may_pull() is a NOP in this particular case, so the 'iph' reload is unnecessary. Signed-off-by: David S. Miller net/ipv6/sit.c | 1 - 1 file changed, 1 deletion(-) commit 9ba26a7283f56100eb08a2df48f17da600f60d52 Author: Cao jin Date: Tue Jun 6 17:07:53 2017 +0800 Kbuild: tiny correction on `make help` The help info of `make C=1` is little confusing, make it clear. Signed-off-by: Cao jin Signed-off-by: Masahiro Yamada Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2cc3c8071bee6e3defa54b701671d310cb94f3c Author: John Stultz Date: Tue May 23 09:40:26 2017 -0700 drm: kirin: Fix drm_of_find_panel_or_bridge conversion This fixes a regression introduced by ebc944613567 ("drm: convert drivers to use drm_of_find_panel_or_bridge") that was recently merged, causing HDMI output to not work. For the kirin driver, the port value should be 1 instead of 0, so this oneline patch fixes it and gets graphics working again. Cc: Rob Herring Cc: Archit Taneja Cc: Philipp Zabel Cc: Maxime Ripard Cc: Sean Paul Cc: Dave Airlie Cc: Xinliang Liu Fix-suggested-by: Rob Herring Signed-off-by: John Stultz Reviewed-by: Xinliang Liu Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1495557626-25285-1-git-send-email-john.stultz@linaro.org drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26f4b1f7a8da3eaa6c32e12f87c9f5388196dc67 Author: Gilad Ben-Yossef Date: Tue Jun 6 11:00:45 2017 +0300 staging: ccree: fix buffer copy Fix a bug where the copying of scatterlist buffers incorrectly ignored bytes to skip in a scatterlist and ended 1 byte short. This fixes testmgr hmac and hash test failures currently obscured by hash import/export not being supported. Fixes: abefd6741d ("staging: ccree: introduce CryptoCell HW driver"). Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_buffer_mgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d6dbdd3c8558cad3b6d74cc357b408622d122331 Author: Marc Zyngier Date: Mon Jun 5 19:17:18 2017 +0100 KVM: arm/arm64: Handle possible NULL stage2 pud when ageing pages Under memory pressure, we start ageing pages, which amounts to parsing the page tables. Since we don't want to allocate any extra level, we pass NULL for our private allocation cache. Which means that stage2_get_pud() is allowed to fail. This results in the following splat: [ 1520.409577] Unable to handle kernel NULL pointer dereference at virtual address 00000008 [ 1520.417741] pgd = ffff810f52fef000 [ 1520.421201] [00000008] *pgd=0000010f636c5003, *pud=0000010f56f48003, *pmd=0000000000000000 [ 1520.429546] Internal error: Oops: 96000006 [#1] PREEMPT SMP [ 1520.435156] Modules linked in: [ 1520.438246] CPU: 15 PID: 53550 Comm: qemu-system-aar Tainted: G W 4.12.0-rc4-00027-g1885c397eaec #7205 [ 1520.448705] Hardware name: FOXCONN R2-1221R-A4/C2U4N_MB, BIOS G31FB12A 10/26/2016 [ 1520.463726] task: ffff800ac5fb4e00 task.stack: ffff800ce04e0000 [ 1520.469666] PC is at stage2_get_pmd+0x34/0x110 [ 1520.474119] LR is at kvm_age_hva_handler+0x44/0xf0 [ 1520.478917] pc : [] lr : [] pstate: 40000145 [ 1520.486325] sp : ffff800ce04e33d0 [ 1520.489644] x29: ffff800ce04e33d0 x28: 0000000ffff40064 [ 1520.494967] x27: 0000ffff27e00000 x26: 0000000000000000 [ 1520.500289] x25: ffff81051ba65008 x24: 0000ffff40065000 [ 1520.505618] x23: 0000ffff40064000 x22: 0000000000000000 [ 1520.510947] x21: ffff810f52b20000 x20: 0000000000000000 [ 1520.516274] x19: 0000000058264000 x18: 0000000000000000 [ 1520.521603] x17: 0000ffffa6fe7438 x16: ffff000008278b70 [ 1520.526940] x15: 000028ccd8000000 x14: 0000000000000008 [ 1520.532264] x13: ffff7e0018298000 x12: 0000000000000002 [ 1520.537582] x11: ffff000009241b93 x10: 0000000000000940 [ 1520.542908] x9 : ffff0000092ef800 x8 : 0000000000000200 [ 1520.548229] x7 : ffff800ce04e36a8 x6 : 0000000000000000 [ 1520.553552] x5 : 0000000000000001 x4 : 0000000000000000 [ 1520.558873] x3 : 0000000000000000 x2 : 0000000000000008 [ 1520.571696] x1 : ffff000008fd5000 x0 : ffff0000080b149c [ 1520.577039] Process qemu-system-aar (pid: 53550, stack limit = 0xffff800ce04e0000) [...] [ 1521.510735] [] stage2_get_pmd+0x34/0x110 [ 1521.516221] [] kvm_age_hva_handler+0x44/0xf0 [ 1521.522054] [] handle_hva_to_gpa+0xb8/0xe8 [ 1521.527716] [] kvm_age_hva+0x44/0xf0 [ 1521.532854] [] kvm_mmu_notifier_clear_flush_young+0x70/0xc0 [ 1521.539992] [] __mmu_notifier_clear_flush_young+0x88/0xd0 [ 1521.546958] [] page_referenced_one+0xf0/0x188 [ 1521.552881] [] rmap_walk_anon+0xec/0x250 [ 1521.558370] [] rmap_walk+0x78/0xa0 [ 1521.563337] [] page_referenced+0x164/0x180 [ 1521.569002] [] shrink_active_list+0x178/0x3b8 [ 1521.574922] [] shrink_node_memcg+0x328/0x600 [ 1521.580758] [] shrink_node+0xc4/0x328 [ 1521.585986] [] do_try_to_free_pages+0xc0/0x340 [ 1521.592000] [] try_to_free_pages+0xcc/0x240 [...] The trivial fix is to handle this NULL pud value early, rather than dereferencing it blindly. Cc: stable@vger.kernel.org Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/mmu.c | 3 +++ 1 file changed, 3 insertions(+) commit d4912215d1031e4fb3d1038d2e1857218dba0d0a Author: Wanpeng Li Date: Mon Jun 5 05:19:09 2017 -0700 KVM: nVMX: Fix exception injection WARNING: CPU: 3 PID: 2840 at arch/x86/kvm/vmx.c:10966 nested_vmx_vmexit+0xdcd/0xde0 [kvm_intel] CPU: 3 PID: 2840 Comm: qemu-system-x86 Tainted: G OE 4.12.0-rc3+ #23 RIP: 0010:nested_vmx_vmexit+0xdcd/0xde0 [kvm_intel] Call Trace: ? kvm_check_async_pf_completion+0xef/0x120 [kvm] ? rcu_read_lock_sched_held+0x79/0x80 vmx_queue_exception+0x104/0x160 [kvm_intel] ? vmx_queue_exception+0x104/0x160 [kvm_intel] kvm_arch_vcpu_ioctl_run+0x1171/0x1ce0 [kvm] ? kvm_arch_vcpu_load+0x47/0x240 [kvm] ? kvm_arch_vcpu_load+0x62/0x240 [kvm] kvm_vcpu_ioctl+0x384/0x7b0 [kvm] ? kvm_vcpu_ioctl+0x384/0x7b0 [kvm] ? __fget+0xf3/0x210 do_vfs_ioctl+0xa4/0x700 ? __fget+0x114/0x210 SyS_ioctl+0x79/0x90 do_syscall_64+0x81/0x220 entry_SYSCALL64_slow_path+0x25/0x25 This is triggered occasionally by running both win7 and win2016 in L2, in addition, EPT is disabled on both L1 and L2. It can't be reproduced easily. Commit 0b6ac343fc (KVM: nVMX: Correct handling of exception injection) mentioned that "KVM wants to inject page-faults which it got to the guest. This function assumes it is called with the exit reason in vmcs02 being a #PF exception". Commit e011c663 (KVM: nVMX: Check all exceptions for intercept during delivery to L2) allows to check all exceptions for intercept during delivery to L2. However, there is no guarantee the exit reason is exception currently, when there is an external interrupt occurred on host, maybe a time interrupt for host which should not be injected to guest, and somewhere queues an exception, then the function nested_vmx_check_exception() will be called and the vmexit emulation codes will try to emulate the "Acknowledge interrupt on exit" behavior, the warning is triggered. Reusing the exit reason from the L2->L0 vmexit is wrong in this case, the reason must always be EXCEPTION_NMI when injecting an exception into L1 as a nested vmexit. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Fixes: e011c663b9c7 ("KVM: nVMX: Check all exceptions for intercept during delivery to L2") Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3db28271f0feae129262d30e41384a7c4c767987 Author: Sebastian Parschauer Date: Tue Jun 6 13:53:13 2017 +0200 HID: Add quirk for Dell PIXART OEM mouse This mouse is also known under other IDs. It needs the quirk ALWAYS_POLL or will disconnect in runlevel 1 or 3. Signed-off-by: Sebastian Parschauer CC: stable@vger.kernel.org Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 3 +++ drivers/hid/usbhid/hid-quirks.c | 1 + 2 files changed, 4 insertions(+) commit bbaf0e2b1c1b4f88abd6ef49576f0efb1734eae5 Author: Paolo Bonzini Date: Wed Apr 26 16:56:26 2017 +0200 kvm: async_pf: fix rcu_irq_enter() with irqs enabled native_safe_halt enables interrupts, and you just shouldn't call rcu_irq_enter() with interrupts enabled. Reorder the call with the following local_irq_disable() to respect the invariant. Reported-by: Ross Zwisler Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini Acked-by: Paul E. McKenney Tested-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/kernel/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e3e97526a850f97c9fe8b646937b3a2bef58290 Author: Felipe Balbi Date: Tue Jun 6 14:47:29 2017 +0300 usb: gadget: composite: make sure to reactivate function on unbind If a function sets bind_deactivated flag, upon removal we will be left with an unbalanced deactivation. Let's make sure that we conditionally call usb_function_activate() from usb_remove_function() and make sure usb_remove_function() is called from remove_config(). Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 8c218578fcbbbdb10416c8614658bf32e3bf1655 Author: Madhavan Srinivasan Date: Fri May 26 13:38:27 2017 +0530 powerpc/perf: Fix Power9 test_adder fields Commit 8d911904f3ce4 ('powerpc/perf: Add restrictions to PMC5 in power9 DD1') was added to restrict the use of PMC5 in Power9 DD1. Intention was to disable the use of PMC5 using raw event code. But instead of updating the power9_isa207_pmu structure (used on DD1), the commit incorrectly updated the power9_pmu structure. Fix it. Fixes: 8d911904f3ce ("powerpc/perf: Add restrictions to PMC5 in power9 DD1") Reported-by: Shriya Signed-off-by: Madhavan Srinivasan Tested-by: Shriya Signed-off-by: Michael Ellerman arch/powerpc/perf/power9-pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ba4a648f12f4cd0a8003dd229b6ca8a53348ee4b Author: Michael Ellerman Date: Tue Jun 6 20:23:57 2017 +1000 powerpc/numa: Fix percpu allocations to be NUMA aware In commit 8c272261194d ("powerpc/numa: Enable USE_PERCPU_NUMA_NODE_ID"), we switched to the generic implementation of cpu_to_node(), which uses a percpu variable to hold the NUMA node for each CPU. Unfortunately we neglected to notice that we use cpu_to_node() in the allocation of our percpu areas, leading to a chicken and egg problem. In practice what happens is when we are setting up the percpu areas, cpu_to_node() reports that all CPUs are on node 0, so we allocate all percpu areas on node 0. This is visible in the dmesg output, as all pcpu allocs being in group 0: pcpu-alloc: [0] 00 01 02 03 [0] 04 05 06 07 pcpu-alloc: [0] 08 09 10 11 [0] 12 13 14 15 pcpu-alloc: [0] 16 17 18 19 [0] 20 21 22 23 pcpu-alloc: [0] 24 25 26 27 [0] 28 29 30 31 pcpu-alloc: [0] 32 33 34 35 [0] 36 37 38 39 pcpu-alloc: [0] 40 41 42 43 [0] 44 45 46 47 To fix it we need an early_cpu_to_node() which can run prior to percpu being setup. We already have the numa_cpu_lookup_table we can use, so just plumb it in. With the patch dmesg output shows two groups, 0 and 1: pcpu-alloc: [0] 00 01 02 03 [0] 04 05 06 07 pcpu-alloc: [0] 08 09 10 11 [0] 12 13 14 15 pcpu-alloc: [0] 16 17 18 19 [0] 20 21 22 23 pcpu-alloc: [1] 24 25 26 27 [1] 28 29 30 31 pcpu-alloc: [1] 32 33 34 35 [1] 36 37 38 39 pcpu-alloc: [1] 40 41 42 43 [1] 44 45 46 47 We can also check the data_offset in the paca of various CPUs, with the fix we see: CPU 0: data_offset = 0x0ffe8b0000 CPU 24: data_offset = 0x1ffe5b0000 And we can see from dmesg that CPU 24 has an allocation on node 1: node 0: [mem 0x0000000000000000-0x0000000fffffffff] node 1: [mem 0x0000001000000000-0x0000001fffffffff] Cc: stable@vger.kernel.org # v3.16+ Fixes: 8c272261194d ("powerpc/numa: Enable USE_PERCPU_NUMA_NODE_ID") Signed-off-by: Michael Ellerman Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/topology.h | 14 ++++++++++++++ arch/powerpc/kernel/setup_64.c | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) commit 4eab0ea196f569ed2085a0fa3729f60eb8edaad1 Author: Takashi Iwai Date: Tue Jun 6 12:33:17 2017 +0200 ALSA: hda/realtek - Reorder ALC269 ASUS quirk entries A disorder is found in some ALC269 quirk entries for ASUS (1043:xxxx), which should have been sorted in PCI SSID order. Rearrange them, so that I won't overlook the already existing entry like I did a couple of times in the past... Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 28e8af8a163ed6afe9498f1d499a5061c2214755 Author: Chris Chiu Date: Mon Jun 5 15:05:30 2017 -0600 ALSA: hda/realtek: Fix mic and headset jack sense on Asus X705UD The ASUS X705UD laptop requires the known fixup ALC256_FIXUP_ASUS_MIC in order to fix headphone jack sensing and to enable use of the internal microphone. Unfortunately jack sensing for the headset mic is still not working. [rearranged the position to keep the PCI SSID order -- tiwai] Signed-off-by: Chris Chiu Signed-off-by: Daniel Drake Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit f8c627fbabbe9ed6ae68dcfefb7519bd153a7ac0 Author: Sean Young Date: Tue May 16 04:56:14 2017 -0300 [media] sir_ir: infinite loop in interrupt handler Since this driver does no detection of hardware, it might be used with a non-sir port. Escape out if we are spinning. Reported-by: kbuild test robot Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/sir_ir.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ae8eb443a17331a07579bc04817accaaaa62b78e Author: Arnd Bergmann Date: Fri May 12 16:39:21 2017 -0300 [media] cec-notifier.h: handle unreachable CONFIG_CEC_CORE Fix a link error in this specific combination of config options: CONFIG_MEDIA_CEC_SUPPORT=y CONFIG_CEC_CORE=m CONFIG_MEDIA_CEC_NOTIFIER=y CONFIG_VIDEO_STI_HDMI_CEC=m CONFIG_DRM_STI=y drivers/gpu/drm/sti/sti_hdmi.o: In function `sti_hdmi_remove': sti_hdmi.c:(.text.sti_hdmi_remove+0x10): undefined reference to `cec_notifier_set_phys_addr' sti_hdmi.c:(.text.sti_hdmi_remove+0x34): undefined reference to `cec_notifier_put' drivers/gpu/drm/sti/sti_hdmi.o: In function `sti_hdmi_connector_get_modes': sti_hdmi.c:(.text.sti_hdmi_connector_get_modes+0x4a): undefined reference to `cec_notifier_set_phys_addr_from_edid' drivers/gpu/drm/sti/sti_hdmi.o: In function `sti_hdmi_probe': sti_hdmi.c:(.text.sti_hdmi_probe+0x204): undefined reference to `cec_notifier_get' drivers/gpu/drm/sti/sti_hdmi.o: In function `sti_hdmi_connector_detect': sti_hdmi.c:(.text.sti_hdmi_connector_detect+0x36): undefined reference to `cec_notifier_set_phys_addr' drivers/gpu/drm/sti/sti_hdmi.o: In function `sti_hdmi_disable': sti_hdmi.c:(.text.sti_hdmi_disable+0xc0): undefined reference to `cec_notifier_set_phys_addr' The version below seems to work, though I don't particularly like the IS_REACHABLE() addition since that can be confusing to users. Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/cec-notifier.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2302e5591a4ad2d66107c75b6be170121bff5ccd Author: Arnd Bergmann Date: Fri Apr 21 07:52:17 2017 -0300 [media] cec: improve MEDIA_CEC_RC dependencies Changing the IS_REACHABLE() into a plain #ifdef broke the case of CONFIG_MEDIA_RC=m && CONFIG_MEDIA_CEC=y: drivers/media/cec/cec-core.o: In function `cec_unregister_adapter': cec-core.c:(.text.cec_unregister_adapter+0x18): undefined reference to `rc_unregister_device' drivers/media/cec/cec-core.o: In function `cec_delete_adapter': cec-core.c:(.text.cec_delete_adapter+0x54): undefined reference to `rc_free_device' drivers/media/cec/cec-core.o: In function `cec_register_adapter': cec-core.c:(.text.cec_register_adapter+0x94): undefined reference to `rc_register_device' cec-core.c:(.text.cec_register_adapter+0xa4): undefined reference to `rc_free_device' cec-core.c:(.text.cec_register_adapter+0x110): undefined reference to `rc_unregister_device' drivers/media/cec/cec-core.o: In function `cec_allocate_adapter': cec-core.c:(.text.cec_allocate_adapter+0x234): undefined reference to `rc_allocate_device' drivers/media/cec/cec-adap.o: In function `cec_received_msg': cec-adap.c:(.text.cec_received_msg+0x734): undefined reference to `rc_keydown' cec-adap.c:(.text.cec_received_msg+0x768): undefined reference to `rc_keyup' This adds an additional dependency to explicitly forbid this combination. Fixes: 5f2c467c54f5 ("[media] cec: add MEDIA_CEC_RC config option") Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5ebb6dd36c9f5fb37b1077b393c254d70a14cb46 Author: Christophe JAILLET Date: Fri Apr 28 01:51:40 2017 -0300 [media] vb2: Fix an off by one error in 'vb2_plane_vaddr' We should ensure that 'plane_no' is '< vb->num_planes' as done in 'vb2_plane_cookie' just a few lines below. Fixes: e23ccc0ad925 ("[media] v4l: add videobuf2 Video for Linux 2 driver framework") Cc: stable@vger.kernel.org Signed-off-by: Christophe JAILLET Reviewed-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0f2e5eb14668dc798942ff5f4241d9bd17f9655 Author: Wei Yongjun Date: Tue Apr 25 00:12:46 2017 -0300 [media] rainshadow-cec: Fix missing spin_lock_init() The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly. This is detected by Coccinelle semantic patch. Fixes: 0f314f6c2e77 ("[media] rainshadow-cec: new RainShadow Tech HDMI CEC driver") Signed-off-by: Wei Yongjun Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/rainshadow-cec/rainshadow-cec.c | 1 + 1 file changed, 1 insertion(+) commit 4b0755e90ae03ba40174842af6fa810355960fbc Author: Philipp Zabel Date: Thu May 4 12:20:17 2017 -0300 [media] tc358743: fix register i2c_rd/wr function fix The below mentioned fix contains a small but severe bug, fix it to make the driver work again. Fixes: 3538aa6ecfb2 ("[media] tc358743: fix register i2c_rd/wr functions") Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Signed-off-by: Philipp Zabel Acked-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2aae918c7a21fb8388ab30b8abd4d9240e8ebd7f Author: Björn Töpel Date: Mon May 15 06:52:00 2017 +0200 i40e/i40evf: proper update of the page_offset field In f8b45b74cc62 ("i40e/i40evf: Use build_skb to build frames") i40e_build_skb updates the page_offset field with an incorrect offset, which can lead to data corruption. This patch updates page_offset correctly, by properly setting truesize. Note that the bug only appears on architectures where PAGE_SIZE is 8192 or larger. Fixes: f8b45b74cc62 ("i40e/i40evf: Use build_skb to build frames") Signed-off-by: Björn Töpel Acked-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 ++- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 9e6c9c0f2ce67534fda1fdd305fb5da3defece3e Author: Mauro S. M. Rodrigues Date: Fri May 12 23:26:56 2017 -0300 i40e: Fix state flags for bit set and clean operations of PF Commit 0da36b9774cc ("i40e: use DECLARE_BITMAP for state fields") introduced changes in the way i40e works with state flags converting them to bitmaps using kernel bitmap API. This change introduced a regression due to a mistaken substitution using __I40E_VSI_DOWN instead of __I40E_DOWN when testing state of a PF at i40e_reset_subtask() function. This caused a flood in the kernel log with the follow message: [49.013] i40e 0002:01:00.0: bad reset request 0x00000020 Commit d19cb64b9222 ("i40e: separate PF and VSI state flags") also introduced some misuse of the VSI and PF flags, so both could be considered as the offenders. This patch simply fixes the flags where it makes sense by changing __I40E_VSI_DOWN to __I40E_DOWN. Fixes: 0da36b9774cc ("i40e: use DECLARE_BITMAP for state fields") Fixes: d19cb64b9222 ("i40e: separate PF and VSI state flags") Reviewed-by: "Guilherme G. Piccoli" Signed-off-by: "Mauro S. M. Rodrigues" Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) commit 27fef9f8ecb0495d302deba210606a32e54db37a Author: Charles Keepax Date: Tue Jun 6 09:46:33 2017 +0100 mfd: arizona: Fix typo using hard-coded register A hardcoded register is accidentally used instead of the register address passed into the function. Correct this and use the appropriate variable. This would cause minor issues on wm5102, but all other devices using this driver would have been unaffected. Fixes: commit ef84f885e037 ("mfd: arizona: Refactor arizona_poll_reg") Reported-by: Andrzej Hajda Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b3aa20ba2ba8072b73bd799605b8c98927b7056c Author: Vaibhav Jain Date: Fri Jun 2 22:26:48 2017 +0530 cxl: Avoid double free_irq() for psl,slice interrupts During an eeh call to cxl_remove can result in double free_irq of psl,slice interrupts. This can happen if perst_reloads_same_image == 1 and call to cxl_configure_adapter() fails during slot_reset callback. In such a case we see a kernel oops with following back-trace: Oops: Kernel access of bad area, sig: 11 [#1] Call Trace: free_irq+0x88/0xd0 (unreliable) cxl_unmap_irq+0x20/0x40 [cxl] cxl_native_release_psl_irq+0x78/0xd8 [cxl] pci_deconfigure_afu+0xac/0x110 [cxl] cxl_remove+0x104/0x210 [cxl] pci_device_remove+0x6c/0x110 device_release_driver_internal+0x204/0x2e0 pci_stop_bus_device+0xa0/0xd0 pci_stop_and_remove_bus_device+0x28/0x40 pci_hp_remove_devices+0xb0/0x150 pci_hp_remove_devices+0x68/0x150 eeh_handle_normal_event+0x140/0x580 eeh_handle_event+0x174/0x360 eeh_event_handler+0x1e8/0x1f0 This patch fixes the issue of double free_irq by checking that variables that hold the virqs (err_hwirq, serr_hwirq, psl_virq) are not '0' before un-mapping and resetting these variables to '0' when they are un-mapped. Cc: stable@vger.kernel.org Signed-off-by: Vaibhav Jain Reviewed-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/native.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 7f22ced4377628074e2ac25f41a88f98eb3b03f1 Author: Breno Leitao Date: Mon Jun 5 11:40:59 2017 -0300 powerpc/kernel: Initialize load_tm on task creation Currently tsk->thread.load_tm is not initialized in the task creation and can contain garbage on a new task. This is an undesired behaviour, since it affects the timing to enable and disable the transactional memory laziness (disabling and enabling the MSR TM bit, which affects TM reclaim and recheckpoint in the scheduling process). Fixes: 5d176f751ee3 ("powerpc: tm: Enable transactional memory (TM) lazily for userspace") Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 1 + 1 file changed, 1 insertion(+) commit b7dfee2433576f1f030cb84cdb04b70f36554992 Author: Marek Vasut Date: Sat Jun 3 11:57:21 2017 -0700 gpu: ipu-v3: Fix CSI selection for VDIC The description of the CSI_SEL bit in the i.MX6 reference manual is incorrect. It states "This bit defines which CSI is the input to the IC. This bit is effective only if IC_INPUT is bit cleared". From experiment it was found this is in fact not correct. The CSI_SEL bit selects which CSI is input to _both_ the VDIC _and_ the IC. If the IC_INPUT bit is set so that the IC is receiving from the VDIC, the IC ignores the CSI_SEL bit, but CSI_SEL still selects which CSI the VDIC receives from in that case. Signed-off-by: Marek Vasut Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-common.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit e36aecba54bf24387271f2d7b989cc686a389931 Author: Leonard Crestez Date: Wed May 10 16:17:13 2017 +0300 drm/imx: imx-ldb: Accept drm_of_find_panel_or_bridge failure Not having an endpoint bound in DT should not cause a failure here, there are fallbacks. So explicitly accept a missing endpoint. This behavior change was introduced by refactoring in drm_of parsing code and it should not require dts changes. In particular this fixes imx6qdl-sabreauto boards. Link: https://lists.freedesktop.org/archives/dri-devel/2017-May/141233.html Fixes: ebc944613567 ("drm: convert drivers to use drm_of_find_panel_or_bridge") Signed-off-by: Leonard Crestez Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-ldb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47c298f792992c6eda26fc4e4630c7ca54dcec47 Author: Lucas Stach Date: Wed May 3 10:38:18 2017 +0200 gpu: ipu-v3: pre: only use internal clock gating By setting the SFTRST bit, the PRE will be held in the lowest power state with clocks to the internal blocks gated. When external clock gating is used (from the external clock controller, or by setting the CLKGATE bit) the PRE will sporadically fail to start. Signed-off-by: Lucas Stach Fixes: d2a34232580a ("gpu: ipu-v3: add driver for Prefetch Resolve Engine") Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-pre.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit d68356cc51e304ff9a389f006b6249d41f2c2319 Author: Christoffer Dall Date: Sun Jun 4 22:17:02 2017 +0200 KVM: arm/arm64: vgic-v3: Fix nr_pre_bits bitfield extraction We used to extract PRIbits from the ICH_VT_EL2 which was the upper field in the register word, so a mask wasn't necessary, but as we switched to looking at PREbits, which is bits 26 through 28 with the PRIbits field being potentially non-zero, we really need to mask off the field value, otherwise fun things may happen. Signed-off-by: Christoffer Dall Acked-by: Marc Zyngier virt/kvm/arm/hyp/vgic-v3-sr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5b4ab1ffbe2553ee278cb1b6bcb671a31d86518 Merge: 1f779cd 75fb636 Author: Dave Airlie Date: Tue Jun 6 16:52:15 2017 +1000 Merge tag 'drm-misc-fixes-2017-06-02' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes Core Changes: - Grab locks in drm_atomic_helper_resume() (Daniel) - Fix oops when unplugging USB device (expand cleanup in drm_unplug_dev) (Hans) Driver Changes: - rockchip: Don't output 10-bit format to 8-bit encoders (Mark) Cc: Mark yao Cc: Daniel Vetter Cc: Hans de Goede * tag 'drm-misc-fixes-2017-06-02' of git://anongit.freedesktop.org/git/drm-misc: drm: Fix oops + Xserver hang when unplugging USB drm devices drm: Fix locking in drm_atomic_helper_resume drm/rockchip: Correct vop out_mode configure commit 1f779cd74507d7cc3ea16087163f0509e74ef022 Merge: 3c2993b b4e382c Author: Dave Airlie Date: Tue Jun 6 16:10:16 2017 +1000 Merge branch 'linux-4.12' of git://github.com/skeggsb/linux into drm-fixes 4 nouveau regression fixes. * 'linux-4.12' of git://github.com/skeggsb/linux: drm/nouveau/tmr: fully separate alarm execution/pending lists drm/nouveau: enable autosuspend only when it'll actually be used drm/nouveau: replace multiple open-coded runpm support checks with function drm/nouveau/kms/nv50: add null check before pointer dereference commit b4e382ca7586a63b6c1e5221ce0863ff867c2df6 Author: Ben Skeggs Date: Mon Jun 5 17:23:32 2017 +1000 drm/nouveau/tmr: fully separate alarm execution/pending lists Reusing the list_head for both is a bad idea. Callback execution is done with the lock dropped so that alarms can be rescheduled from the callback, which means that with some unfortunate timing, lists can get corrupted. The execution list should not require its own locking, the single function that uses it can only be called from a single context. Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) commit 8fa4338acca96cbc231e4125229632e879476464 Author: Ben Skeggs Date: Fri Jun 2 14:49:45 2017 +1000 drm/nouveau: enable autosuspend only when it'll actually be used This prevents a deadlock that somehow results from the suspend() -> forbid() -> resume() callchain. [ 125.266960] [drm] Initialized nouveau 1.3.1 20120801 for 0000:02:00.0 on minor 1 [ 370.120872] INFO: task kworker/4:1:77 blocked for more than 120 seconds. [ 370.120920] Tainted: G O 4.12.0-rc3 #20 [ 370.120947] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 370.120982] kworker/4:1 D13808 77 2 0x00000000 [ 370.120998] Workqueue: pm pm_runtime_work [ 370.121004] Call Trace: [ 370.121018] __schedule+0x2bf/0xb40 [ 370.121025] ? mark_held_locks+0x5f/0x90 [ 370.121038] schedule+0x3d/0x90 [ 370.121044] rpm_resume+0x107/0x870 [ 370.121052] ? finish_wait+0x90/0x90 [ 370.121065] ? pci_pm_runtime_resume+0xa0/0xa0 [ 370.121070] pm_runtime_forbid+0x4c/0x60 [ 370.121129] nouveau_pmops_runtime_suspend+0xaf/0xc0 [nouveau] [ 370.121139] pci_pm_runtime_suspend+0x5f/0x170 [ 370.121147] ? pci_pm_runtime_resume+0xa0/0xa0 [ 370.121152] __rpm_callback+0xb9/0x1e0 [ 370.121159] ? pci_pm_runtime_resume+0xa0/0xa0 [ 370.121166] rpm_callback+0x24/0x80 [ 370.121171] ? pci_pm_runtime_resume+0xa0/0xa0 [ 370.121176] rpm_suspend+0x138/0x6e0 [ 370.121192] pm_runtime_work+0x7b/0xc0 [ 370.121199] process_one_work+0x253/0x6a0 [ 370.121216] worker_thread+0x4d/0x3b0 [ 370.121229] kthread+0x133/0x150 [ 370.121234] ? process_one_work+0x6a0/0x6a0 [ 370.121238] ? kthread_create_on_node+0x70/0x70 [ 370.121246] ret_from_fork+0x2a/0x40 [ 370.121283] Showing all locks held in the system: [ 370.121291] 2 locks held by kworker/4:1/77: [ 370.121298] #0: ("pm"){.+.+.+}, at: [] process_one_work+0x1d0/0x6a0 [ 370.121315] #1: ((&dev->power.work)){+.+.+.}, at: [] process_one_work+0x1d0/0x6a0 [ 370.121330] 1 lock held by khungtaskd/81: [ 370.121333] #0: (tasklist_lock){.+.+..}, at: [] debug_show_all_locks+0x3d/0x1a0 [ 370.121355] 1 lock held by dmesg/1639: [ 370.121358] #0: (&user->lock){+.+.+.}, at: [] devkmsg_read+0x4d/0x360 [ 370.121377] ============================================= Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_drm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 321f5c5f2c494f3c94cec2289c8add678657ba2d Author: Ben Skeggs Date: Fri Jun 2 14:38:07 2017 +1000 drm/nouveau: replace multiple open-coded runpm support checks with function Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_drm.c | 34 +++++++++++++++------------------- drivers/gpu/drm/nouveau/nouveau_drv.h | 3 +-- drivers/gpu/drm/nouveau/nouveau_vga.c | 13 ++----------- 3 files changed, 18 insertions(+), 32 deletions(-) commit 86276921a17ee3090749c9f38f57dcfb73733bd4 Author: Gustavo A. R. Silva Date: Mon May 22 14:12:37 2017 -0500 drm/nouveau/kms/nv50: add null check before pointer dereference Add null check before dereferencing pointer asyc Addresses-Coverity-ID: 1397932 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nv50_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e5c86679d5e864947a52fb31e45a425dea3e7fa9 Author: Max Filippov Date: Mon Jun 5 02:43:51 2017 -0700 xtensa: don't use linux IRQ #0 Linux IRQ #0 is reserved for error reporting and may not be used. Increase NR_IRQS for one additional slot and increase irq_domain_add_legacy parameter first_irq value to 1, so that linux IRQ #0 is not associated with hardware IRQ #0 in legacy IRQ domains. Introduce macro XTENSA_PIC_LINUX_IRQ for static translation of xtensa PIC hardware IRQ # to linux IRQ #. Use this macro in XTFPGA platform data definitions. This fixes inability to use hardware IRQ #0 in configurations that don't use device tree and allows for non-identity mapping between linux IRQ # and hardware IRQ #. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov arch/xtensa/include/asm/irq.h | 3 ++- arch/xtensa/kernel/irq.c | 5 ----- arch/xtensa/platforms/xtfpga/include/platform/hardware.h | 6 ++++-- arch/xtensa/platforms/xtfpga/setup.c | 10 +++++----- drivers/irqchip/irq-xtensa-mx.c | 2 +- drivers/irqchip/irq-xtensa-pic.c | 2 +- 6 files changed, 13 insertions(+), 15 deletions(-) commit cbf52a3e6a8a92beec6e0c70abf4111cd8f8faf7 Author: Robert Jarzmik Date: Mon Jun 5 13:59:15 2017 +0200 tags: honor COMPILED_SOURCE with apart output directory When the kernel is compiled with an "O=" argument, the object files are not in the source tree, but in the build tree. This patch fixes O= build by looking for object files in the build tree. Fixes: 923e02ecf3f8 ("scripts/tags.sh: Support compiled source") Signed-off-by: Robert Jarzmik Signed-off-by: Masahiro Yamada scripts/tags.sh | 1 + 1 file changed, 1 insertion(+) commit a415c0f10627913793709ddb75add09d2ea334dc Author: NeilBrown Date: Mon Jun 5 16:05:13 2017 +1000 md: initialise ->writes_pending in personality modules. The new per-cpu counter for writes_pending is initialised in md_alloc(), which is not called by dm-raid. So dm-raid fails when md_write_start() is called. Move the initialization to the personality modules that need it. This way it is always initialised when needed, but isn't unnecessarily initialized (requiring memory allocation) when the personality doesn't use writes_pending. Reported-by: Heinz Mauelshagen Fixes: 4ad23a976413 ("MD: use per-cpu counter for writes_pending") Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 16 ++++++++++++---- drivers/md/md.h | 1 + drivers/md/raid1.c | 2 ++ drivers/md/raid10.c | 3 +++ drivers/md/raid5.c | 3 +++ 5 files changed, 21 insertions(+), 4 deletions(-) commit ba7b2387ad239a519041f2a2d35a1902bdd03dfb Merge: e543c8a 41c2570 Author: Linus Torvalds Date: Mon Jun 5 15:37:03 2017 -0700 Merge branch 'for-4.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: "Two cgroup fixes. One to address RCU delay of cpuset removal affecting userland visible behaviors. The other fixes a race condition between controller disable and cgroup removal" * 'for-4.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cpuset: consider dying css as offline cgroup: Prevent kill_css() from being called more than once commit e543c8a92fb6eca8dd554561fa55bba5f2a90d09 Merge: 112eb07 f7cf69a Author: Linus Torvalds Date: Mon Jun 5 15:31:14 2017 -0700 Merge branch 'for-4.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fixes from Tejun Heo: - Revert of sata_mv devm_ioremap_resource() conversion. It made init fail if there are overlapping resources which led to detection failures on some setups. - A workaround for an Acer laptop which sometimes reports corrupt port map. - Other non-critical fixes. * 'for-4.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: libata: fix error checking in in ata_parse_force_one() Revert "ata: sata_mv: Convert to devm_ioremap_resource()" ata: libahci: properly propagate return value of platform_get_irq() ata: sata_rcar: Handle return value of clk_prepare_enable ahci: Acer SA5-271 SSD Not Detected Fix commit 186f0a0d8e083505bd5cd23baa82b2205224d9ad Author: Rafael J. Wysocki Date: Mon Jun 5 23:33:39 2017 +0200 Revert "ACPICA: Disassembler: Enhance resource descriptor detection" Revert commit da28e1955d7f (ACPICA: Disassembler: Enhance resource descriptor detection) as it is based on an assumption that doesn't hold all the time and causes problems to happen because of that. Reported-by: Linda Knippers Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utresrc.c | 9 --------- 1 file changed, 9 deletions(-) commit dc89481bb4c9af0700423e21c8371379d3d943b1 Merge: 1dbf647 dc1cd1d Author: Kalle Valo Date: Mon Jun 5 22:21:25 2017 +0300 Merge tag 'iwlwifi-for-kalle-2017-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes Fixes for 4.12: * Some memory leaks; * IBSS support; * Some bugzilla bugs; * Some runtime PM fixes; * Rate-scaling issues; * Some locking problems; commit 6bf28969f617f0131e94deb5476f4c45f43fd847 Author: Max Filippov Date: Mon Jun 5 11:25:07 2017 -0700 xtensa: reduce double exception literal reservation Double exception vector only needs 20 bytes of space for 5 literals, not 48. Reduce the reservation for double exception vector literals accordingly. This fixes build for configurations with small user exception vector size. Signed-off-by: Max Filippov arch/xtensa/kernel/vmlinux.lds.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dc1cd1d5ac22dbcd158c3de62b76ebb80e55d46b Author: Shahar S Matityahu Date: Thu Apr 6 13:35:38 2017 +0300 iwlwifi: fix host command memory leaks Sending host command with CMD_WANT_SKB flag demands the release of the response buffer with iwl_free_resp function. The patch adds the memory release in all the relevant places Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 15098803d38778070b8edfa5a3d5fc4fef10d0a1 Author: Luca Coelho Date: Tue Apr 25 10:18:10 2017 +0300 iwlwifi: fix min API version for 7265D, 3168, 8000 and 8265 In a previous commit, we removed support for API versions earlier than 22 for these NICs. By mistake, the *_UCODE_API_MIN definitions were set to 17. Fix that. Fixes: 4b87e5af638b ("iwlwifi: remove support for fw older than -17 and -22") Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-7000.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 40cbeca3c09965f3084d591476559cbb3df150ec Author: Johannes Berg Date: Fri Mar 31 10:47:35 2017 +0200 iwlwifi: mvm: clear new beacon command template struct Clear the struct so that all reserved fields are zero when we send the struct down to the device. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71793b7d3eb0897ca0dc4a109ede608d3e2c70ed Author: Luca Coelho Date: Thu Mar 30 12:04:47 2017 +0300 iwlwifi: mvm: don't fail when removing a key from an inexisting sta The iwl_mvm_remove_sta_key() function handles removing a key when the sta doesn't exist anymore. Mistakenly, this was changed to return an error while fixing another bug. If the mvm_sta doesn't exist, we continue normally, but just don't try to remove the igtk key. Fixes: cd4d23c1ea9b ("iwlwifi: mvm: Fix removal of IGTK") Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit e4c49c4937951de1cdbe35572ade40c948dec1e1 Author: Luca Coelho Date: Fri Mar 24 11:01:45 2017 +0200 iwlwifi: pcie: only use d0i3 in suspend/resume if system_pm is set to d0i3 We only need to handle d0i3 entry and exit during suspend resume if system_pm is set to IWL_PLAT_PM_MODE_D0I3, otherwise d0i3 entry failures will cause suspend to fail. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=194791 Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit addce854f164a68da9cb158e2e7e447705068549 Author: Emmanuel Grumbach Date: Wed Mar 29 10:21:09 2017 +0300 iwlwifi: mvm: fix firmware debug restart recording When we want to stop the recording of the firmware debug and restart it later without reloading the firmware we don't need to resend the configuration that comes with host commands. Sending those commands confused the hardware and led to an NMI 0x66. Change the flow as following: * read the relevant registers (DBGC_IN_SAMPLE, DBGC_OUT_CTRL) * clear those registers * wait for the hardware to complete its write to the buffer * get the data * restore the value of those registers (to restart the recording) For early start (where the configuration is already compiled in the firmware), we don't need to set those registers after the firmware has been loaded, but only when we want to restart the recording without having restarted the firmware. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 12 +--------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 32 ++++++++++++++++++------- 4 files changed, 27 insertions(+), 19 deletions(-) commit d9954405758a0cbbe258d9b4d4dc12a06fa48a28 Author: Johannes Berg Date: Wed Mar 22 22:00:10 2017 +0100 iwlwifi: tt: move ucode_loaded check under mutex The ucode_loaded check should be under the mutex, since it can otherwise change state after we looked at it and before we got the mutex. Fix that. Fixes: 5c89e7bc557e ("iwlwifi: mvm: add registration to cooling device") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ee48b72211f844a58a06819e9ccceee6acf04b2d Author: Liad Kaufman Date: Tue Mar 21 17:13:16 2017 +0200 iwlwifi: mvm: support ibss in dqa mode Allow working IBSS also when working in DQA mode. This is done by setting it to treat the queues the same as a BSS AP treats the queues. Fixes: 7948b87308a4 ("iwlwifi: mvm: enable dynamic queue allocation mode") Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit c72c37b7f392ad7edc10b6092fa48c632ba6f4ed Author: Haim Dreyfuss Date: Thu Mar 16 17:26:03 2017 +0200 iwlwifi: mvm: Fix command queue number on d0i3 flow During d0i3 flow we flush all the queue except from the command queue. Currently, in this flow the command queue is hard coded to 9. In DQA the command queue number has changed from 9 to 0. Fix that. This fixes a problem in runtime PM resume flow. Fixes: 097129c9e625 ("iwlwifi: mvm: move cmd queue to be #0 in dqa mode") Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ea42d1cbe3f067fb714c3ec3e1792fa273b99561 Author: Gregory Greenman Date: Mon Mar 6 11:15:41 2017 +0200 iwlwifi: mvm: rs: start using LQ command color Up until now, the driver was comparing the rate reported by the FW and the rate of the latest LQ command to avoid processing data belonging to the old LQ command. Recently, FW changed the meaning of the initial rate field in tx response and it holds the actual rate (which is not necessarily the initial rate of LQ's rate table). Use instead LQ cmd color to be able to filter out tx responses/BA notifications which where sent during earlier LQ commands' time frame. This fixes some throughput degradation in noisy environments. Signed-off-by: Gregory Greenman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-rs.h | 5 +++ drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 3 ++ drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 46 ++++++---------------- drivers/net/wireless/intel/iwlwifi/mvm/rs.h | 15 +++++++ drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 2 + drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 12 +++++- 6 files changed, 47 insertions(+), 36 deletions(-) commit 1b4af13ff2cc6897557bb0b8d9e2fad4fa4d67aa Author: David S. Miller Date: Mon Jun 5 11:28:57 2017 -0700 sparc64: Add __multi3 for gcc 7.x and later. Reported-by: Waldemar Brodkorb Signed-off-by: David S. Miller arch/sparc/lib/Makefile | 1 + arch/sparc/lib/multi3.S | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) commit 112eb07287d10bef6ec74e36f1ffd24f19bdd0a0 Merge: 3c2993b 06a4b6d Author: Linus Torvalds Date: Mon Jun 5 11:19:40 2017 -0700 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: "Three fixes this time around: - Two fixes for noMMU, fixing the decompressor header layout, and preventing a build error with some configurations. - Fixing the hyp-stub updates that went in during the merge window for platforms that use MCPM" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8677/1: boot/compressed: fix decompressor header layout for v7-M ARM: 8676/1: NOMMU: provide pgprot_device() macro ARM: 8675/1: MCPM: ensure not to enter __hyp_soft_restart from loopback and cpu_power_down commit 2538b9e2450ae255337c04356e9e0f8cb9ec48d9 Author: Milian Wolff Date: Fri Jun 2 16:37:52 2017 +0200 perf report: Ensure the perf DSO mapping matches what libdw sees In some situations the libdw unwinder stopped working properly. I.e. with libunwind we see: ~~~~~ heaptrack_gui 2228 135073.400112: 641314 cycles: e8ed _dl_fixup (/usr/lib/ld-2.25.so) 15f06 _dl_runtime_resolve_sse_vex (/usr/lib/ld-2.25.so) ed94c KDynamicJobTracker::KDynamicJobTracker (/home/milian/projects/compiled/kf5/lib64/libKF5KIOWidgets.so.5.35.0) 608f3 _GLOBAL__sub_I_kdynamicjobtracker.cpp (/home/milian/projects/compiled/kf5/lib64/libKF5KIOWidgets.so.5.35.0) f199 call_init.part.0 (/usr/lib/ld-2.25.so) f2a5 _dl_init (/usr/lib/ld-2.25.so) db9 _dl_start_user (/usr/lib/ld-2.25.so) ~~~~~ But with libdw and without this patch this sample is not properly unwound: ~~~~~ heaptrack_gui 2228 135073.400112: 641314 cycles: e8ed _dl_fixup (/usr/lib/ld-2.25.so) 15f06 _dl_runtime_resolve_sse_vex (/usr/lib/ld-2.25.so) ed94c KDynamicJobTracker::KDynamicJobTracker (/home/milian/projects/compiled/kf5/lib64/libKF5KIOWidgets.so.5.35.0) ~~~~~ Debug output showed me that libdw found a module for the last frame address, but it thinks it belongs to /usr/lib/ld-2.25.so. This patch double-checks what libdw sees and what perf knows. If the mappings mismatch, we now report the elf known to perf. This fixes the situation above, and the libdw unwinder produces the same stack as libunwind. Signed-off-by: Milian Wolff Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20170602143753.16907-1-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/unwind-libdw.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5ea0416f51cc93436bbe497c62ab49fd9cb245b6 Author: Milian Wolff Date: Thu Jun 1 23:00:21 2017 +0200 perf report: Include partial stacks unwound with libdw So far the whole stack was thrown away when any error occurred before the maximum stack depth was unwound. This is actually a very common scenario though. The stacks that got unwound so far are still interesting. This removes a large chunk of differences when comparing perf script output for libunwind and libdw perf unwinding. E.g. with libunwind: ~~~~~ heaptrack_gui 2228 135073.388524: 479408 cycles: ffffffff811749ed perf_iterate_ctx ([kernel.kallsyms]) ffffffff81181662 perf_event_mmap ([kernel.kallsyms]) ffffffff811cf5ed mmap_region ([kernel.kallsyms]) ffffffff811cfe6b do_mmap ([kernel.kallsyms]) ffffffff811b0dca vm_mmap_pgoff ([kernel.kallsyms]) ffffffff811cdb0c sys_mmap_pgoff ([kernel.kallsyms]) ffffffff81033acb sys_mmap ([kernel.kallsyms]) ffffffff81631d37 entry_SYSCALL_64_fastpath ([kernel.kallsyms]) 192ca mmap64 (/usr/lib/ld-2.25.so) 59a9 _dl_map_object_from_fd (/usr/lib/ld-2.25.so) 83d0 _dl_map_object (/usr/lib/ld-2.25.so) cda1 openaux (/usr/lib/ld-2.25.so) 1834f _dl_catch_error (/usr/lib/ld-2.25.so) cfe2 _dl_map_object_deps (/usr/lib/ld-2.25.so) 3481 dl_main (/usr/lib/ld-2.25.so) 17387 _dl_sysdep_start (/usr/lib/ld-2.25.so) 4d37 _dl_start (/usr/lib/ld-2.25.so) d87 _start (/usr/lib/ld-2.25.so) heaptrack_gui 2228 135073.388677: 611329 cycles: 1a3e0 strcmp (/usr/lib/ld-2.25.so) 82b2 _dl_map_object (/usr/lib/ld-2.25.so) cda1 openaux (/usr/lib/ld-2.25.so) 1834f _dl_catch_error (/usr/lib/ld-2.25.so) cfe2 _dl_map_object_deps (/usr/lib/ld-2.25.so) 3481 dl_main (/usr/lib/ld-2.25.so) 17387 _dl_sysdep_start (/usr/lib/ld-2.25.so) 4d37 _dl_start (/usr/lib/ld-2.25.so) d87 _start (/usr/lib/ld-2.25.so) ~~~~~ With libdw without this patch: ~~~~~ heaptrack_gui 2228 135073.388524: 479408 cycles: ffffffff811749ed perf_iterate_ctx ([kernel.kallsyms]) ffffffff81181662 perf_event_mmap ([kernel.kallsyms]) ffffffff811cf5ed mmap_region ([kernel.kallsyms]) ffffffff811cfe6b do_mmap ([kernel.kallsyms]) ffffffff811b0dca vm_mmap_pgoff ([kernel.kallsyms]) ffffffff811cdb0c sys_mmap_pgoff ([kernel.kallsyms]) ffffffff81033acb sys_mmap ([kernel.kallsyms]) ffffffff81631d37 entry_SYSCALL_64_fastpath ([kernel.kallsyms]) heaptrack_gui 2228 135073.388677: 611329 cycles: ~~~~~ With this patch applied, the libdw unwinder will produce the same output as the libunwind unwinder. Signed-off-by: Milian Wolff Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20170601210021.20046-1-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/unwind-libdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6db47fdec7562b02703e346c10f7f4efdda6af5a Author: Kim Phillips Date: Mon May 29 14:27:54 2017 -0500 perf annotate: Add missing powerpc triplet On an Ubuntu xenial system, 'perf annotate' says to install powerpc objdump on a system that already has binutils-powerpc-linux-gnu installed. Make perf aware of the missing triplet for the powerpc-linux-gnu target. Signed-off-by: Kim Phillips Cc: Alexander Shishkin Cc: He Kuang Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Ravi Bangoria Link: http://lkml.kernel.org/r/20170529142754.7fbfb1152fd8f2663de0ea70@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/common.c | 1 + 1 file changed, 1 insertion(+) commit 598762cf91532e6e86dd21199b5e7f803df73f49 Author: Jiri Olsa Date: Thu Jun 1 22:54:50 2017 +0200 perf test: Disable breakpoint signal tests for powerpc The following tests are failing on powerpc: # perf test break 18: Breakpoint overflow signal handler : FAILED! 19: Breakpoint overflow sampling : FAILED! The powerpc kenel so far does not have support to even create instruction breakpoints using the perf event interface, so those tests fail early in the config phase. I added a '->is_supported()' callback to test struct to be able to disable specific tests. It seems better than putting ifdefs directly to the test array. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170601205450.GA398@krava Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/bp_signal.c | 14 ++++++++++++++ tools/perf/tests/builtin-test.c | 7 +++++++ tools/perf/tests/tests.h | 3 +++ 3 files changed, 24 insertions(+) commit a09935b878dc8efd4b030ed1ffa0553fc9011fb8 Author: Namhyung Kim Date: Wed May 31 21:01:05 2017 +0900 perf symbols: Use correct filename for compressed modules in build-id cache The decompress_kmodule() decompresses kernel modules in order to load symbols from it. In the DSO_BINARY_TYPE__BUILD_ID_CACHE case, it needs the full file path to extract the file extension to determine the decompression method. But overwriting 'name' will fail the decompression since it might point to a non-existing old file. Instead, use dso->long_name for having the correct extension and use the real filename to decompress. In the DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE_COMP case, both names should be the same. This allows resolving symbols in the old modules. Before: $ perf report -i perf.data.old | grep scsi_mod 0.00% cc1 [scsi_mod] [k] 0x0000000000004aa6 0.00% as [scsi_mod] [k] 0x00000000000099e1 0.00% cc1 [scsi_mod] [k] 0x0000000000009830 0.00% cc1 [scsi_mod] [k] 0x0000000000001b8f After: 0.00% cc1 [scsi_mod] [k] scsi_handle_queue_ramp_up 0.00% as [scsi_mod] [k] scsi_sg_alloc 0.00% cc1 [scsi_mod] [k] scsi_setup_cmnd 0.00% cc1 [scsi_mod] [k] scsi_get_command Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Peter Zijlstra Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170531120105.21731-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol-elf.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 6b335e8f545591c07df0f34231bd7ff7506c98c1 Author: Namhyung Kim Date: Wed May 31 21:01:04 2017 +0900 perf symbols: Set module info when build-id event found Like machine__findnew_module_dso(), it should set necessary info for kernel modules to find symbol info from the file. Factor out dso__set_module_info() to do it. This is needed for dso__needs_decompress() to detect such DSOs. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Peter Zijlstra Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170531120105.21731-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dso.c | 15 +++++++++++++++ tools/perf/util/dso.h | 3 +++ tools/perf/util/header.c | 2 +- tools/perf/util/machine.c | 11 +---------- 4 files changed, 20 insertions(+), 11 deletions(-) commit 1deec1bd96ccd8beb04d2112a6d12fe20505c3a6 Author: Namhyung Kim Date: Wed May 31 21:01:03 2017 +0900 perf header: Set proper module name when build-id event found When perf processes build-id event, it creates DSOs with the build-id. But it didn't set the module short name (like '[module-name]') so when processing a kernel mmap event of the module, it cannot found the DSO as it only checks the short names. That leads for perf to create a same DSO without the build-id info and it'll lookup the system path even if the DSO is already in the build-id cache. After kernel was updated, perf cannot find the DSO and cannot show symbols in it anymore. You can see this if you have an old data file (w/ old kernel version): $ perf report -i perf.data.old -v |& grep scsi_mod build id event received for /lib/modules/3.19.2-1-ARCH/kernel/drivers/scsi/scsi_mod.ko.gz : cafe1ce6ca13a98a5d9ed3425cde249e57a27fc1 Failed to open /lib/modules/3.19.2-1-ARCH/kernel/drivers/scsi/scsi_mod.ko.gz, continuing without symbols ... The second message didn't show the build-id. With this patch: $ perf report -i perf.data.old -v |& grep scsi_mod build id event received for /lib/modules/3.19.2-1-ARCH/kernel/drivers/scsi/scsi_mod.ko.gz: cafe1ce6ca13a98a5d9ed3425cde249e57a27fc1 /lib/modules/3.19.2-1-ARCH/kernel/drivers/scsi/scsi_mod.ko.gz with build id cafe1ce6ca13a98a5d9ed3425cde249e57a27fc1 not found, continuing without symbols ... Now it shows the build-id but still cannot load the symbol table. This is a different problem which will be fixed in the next patch. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Peter Zijlstra Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170531120105.21731-1-namhyung@kernel.org [ Fix the build on older compilers (debian <= 8, fedora <= 21, etc) wrt kmod_path var init ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 501e7a4689378f8b1690089bfdd4f1e12ec22903 Author: Benjamin Coddington Date: Fri Jun 2 11:21:34 2017 -0400 NFSv4.2: Don't send mode again in post-EXCLUSIVE4_1 SETATTR with umask Now that we have umask support, we shouldn't re-send the mode in a SETATTR following an exclusive CREATE, or we risk having the same problem fixed in commit 5334c5bdac92 ("NFS: Send attributes in OPEN request for NFS4_CREATE_EXCLUSIVE4_1"), which is that files with S_ISGID will have that bit stripped away. Signed-off-by: Benjamin Coddington Fixes: dff25ddb4808 ("nfs: add support for the umask attribute") Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3def03441e53e29eed3afd9009974a5a42bf124a Author: Nicolas Iooss Date: Sat May 20 13:27:00 2017 +0200 genksyms: add printf format attribute to error_with_pos() When compiling with -Wsuggest-attribute=format in HOSTCFLAGS, gcc complains that error_with_pos() may be declared with a printf format attribute: scripts/genksyms/genksyms.c:726:3: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] vfprintf(stderr, fmt, args); ^~~~~~~~ This would allow catching printf-format errors at compile time in callers to error_with_pos(). Add this attribute. Signed-off-by: Nicolas Iooss Signed-off-by: Masahiro Yamada scripts/genksyms/genksyms.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 269f9883fe254d109afdfc657875c456d6fabb08 Author: Ido Shamay Date: Mon Jun 5 10:44:56 2017 +0300 net/mlx4: Check if Granular QoS per VF has been enabled before updating QP qos_vport The Granular QoS per VF feature must be enabled in FW before it can be used. Thus, the driver cannot modify a QP's qos_vport value (via the UPDATE_QP FW command) if the feature has not been enabled -- the FW returns an error if this is attempted. Fixes: 08068cd5683f ("net/mlx4: Added qos_vport QP configuration in VST mode") Signed-off-by: Ido Shamay Signed-off-by: Jack Morgenstein Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/qp.c | 6 ++++++ drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 16 +++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) commit 6c6ab3e73b391b38c9749c77775bf21479ed7d60 Author: Randy Dunlap Date: Sun Jun 4 19:46:53 2017 -0700 net: phy: fix kernel-doc warnings Fix kernel-doc warnings (typo) in drivers/net/phy/phy.c: ..//drivers/net/phy/phy.c:259: warning: No description found for parameter 'features' ..//drivers/net/phy/phy.c:259: warning: Excess function parameter 'feature' description in 'phy_lookup_setting' Signed-off-by: Randy Dunlap Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6044bd4a7d580d4459b992bc6631c817486a1514 Author: Haishuang Yan Date: Mon Jun 5 08:57:21 2017 +0800 devlink: fix potential memort leak We must free allocated skb when genlmsg_put() return fails. Fixes: 1555d204e743 ("devlink: Support for pipeline debug (dpipe)") Signed-off-by: Haishuang Yan Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/core/devlink.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1e0ce2a1ee0d5fb334e82e80600f1e8e77df525c Author: Anmol Sarma Date: Sat Jun 3 17:40:54 2017 +0530 net: Update TCP congestion control documentation Update tcp.txt to fix mandatory congestion control ops and default CCA selection. Also, fix comment in tcp.h for undo_cwnd. Signed-off-by: Anmol Sarma Signed-off-by: David S. Miller Documentation/networking/tcp.txt | 31 +++++++++++++------------------ include/net/tcp.h | 2 +- 2 files changed, 14 insertions(+), 19 deletions(-) commit 57caf4ec2b8bfbcb4f738ab5a12eedf3a8786045 Author: Rafael J. Wysocki Date: Mon Jun 5 14:51:18 2017 +0200 cpufreq: intel_pstate: Avoid division by 0 in min_perf_pct_min() Commit c5a2ee7dde89 (cpufreq: intel_pstate: Active mode P-state limits rework) incorrectly assumed that pstate.turbo_pstate would always be nonzero for CPU0 in min_perf_pct_min() if cpufreq_register_driver() had succeeded which may not be the case in virtualized environments. If that assumption doesn't hold, it leads to an early crash on boot in intel_pstate_register_driver(), so add a sanity check to min_perf_pct_min() to prevent the crash from happening. Fixes: c5a2ee7dde89 (cpufreq: intel_pstate: Active mode P-state limits rework) Reported-and-tested-by: Jongman Heo Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 06a4b6d009a1b74a6ec46c5418b46cc53a79fcb8 Author: Ard Biesheuvel Date: Wed May 24 15:31:57 2017 +0100 ARM: 8677/1: boot/compressed: fix decompressor header layout for v7-M As reported by Patrice, the header layout of the decompressor is incorrect when building for v7-M. In this case, the __nop macro resolves to 'mov r0, r0', which is emitted as a narrow encoding, resulting in the header data fields to end up at lower offsets than required. Given the variety of targets we need to support with the same code, the startup sequence is a bit of a jumble, and uses instructions and macros whose encoding widths cannot be specified (badr), or only exist in a narrow encoding (bx) So force the use of a wide encoding in __nop, and replace the start sequence with a simple jump to the label marking the start of code, preceded by a Thumb2 mode switch if required (using explicit wide encodings where appropriate). The label itself can be moved to the start of code [where it belongs] due to the larger range of branch instructions as compared to adr instructions. Reported-by: Patrice CHOTARD Acked-by: Nicolas Pitre Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King arch/arm/boot/compressed/efi-header.S | 4 +--- arch/arm/boot/compressed/head.S | 17 ++++++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) commit 7ef4783e19a84fe1e8b58f4c27b858dfdcaef207 Author: Vladimir Murzin Date: Wed May 24 10:30:18 2017 +0100 ARM: 8676/1: NOMMU: provide pgprot_device() macro NOMMU build leads to the following error: CC drivers/pci/mmap.o drivers/pci/mmap.c: In function 'pci_mmap_resource_range': drivers/pci/mmap.c:60:3: error: implicit declaration of function 'pgprot_device' [-Werror=implicit-function-declaration] vma->vm_page_prot = pgprot_device(vma->vm_page_prot); ^ cc1: some warnings being treated as errors scripts/Makefile.build:302: recipe for target 'drivers/pci/mmap.o' failed make[2]: *** [drivers/pci/mmap.o] Error 1 scripts/Makefile.build:561: recipe for target 'drivers/pci' failed make[1]: *** [drivers/pci] Error 2 Makefile:1016: recipe for target 'drivers' failed make: *** [drivers] Error 2 Fix it with support of pgprot_device() macro for NOMMU. Fixes: 00d2904ffeac ("ARM/PCI: Use generic pci_mmap_resource_range()") Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/include/asm/pgtable-nommu.h | 1 + 1 file changed, 1 insertion(+) commit ae1d557d8f30cb097b4d1f2ab04fa294588ee1cf Author: Christian Sünkenberg Date: Sun Jun 4 19:18:39 2017 +0200 x86/cpu/cyrix: Add alternative Device ID of Geode GX1 SoC A SoC variant of Geode GX1, notably NSC branded SC1100, seems to report an inverted Device ID in its DIR0 configuration register, specifically 0xb instead of the expected 0x4. Catch this presumably quirky version so it's properly recognized as GX1 and has its cache switched to write-back mode, which provides a significant performance boost in most workloads. SC1100's datasheet "Geode™ SC1100 Information Appliance On a Chip", states in section 1.1.7.1 "Device ID" that device identification values are specified in SC1100's device errata. These, however, seem to not have been publicly released. Wading through a number of boot logs and /proc/cpuinfo dumps found on pastebin and blogs, this patch should mostly be relevant for a number of now admittedly aging Soekris NET4801 and PC Engines WRAP devices, the latter being the platform this issue was discovered on. Performance impact was verified using "openssl speed", with write-back caching scaling throughput between -3% and +41%. Signed-off-by: Christian Sünkenberg Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1496596719.26725.14.camel@student.kit.edu Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/cyrix.c | 1 + 1 file changed, 1 insertion(+) commit 1195892c091a15cc862f4e202482a36adc924e12 Author: Breno Leitao Date: Fri Jun 2 18:43:30 2017 -0300 powerpc/kernel: Fix FP and vector register restoration Currently tsk->thread->load_vec and load_fp are not initialized during task creation, which can lead to garbage values in these variables (non-zero values). These variables will be checked later in restore_math() to validate if the FP and vector registers are being utilized. Since these values might be non-zero, the restore_math() will continue to save the FP and vectors even if they were never utilized by the userspace application. load_fp and load_vec counters will then overflow (they wrap at 255) and the FP and Altivec will be finally disabled, but before that condition is reached (counter overflow) several context switches will have restored FP and vector registers without need, causing a performance degradation. Fixes: 70fe3d980f5f ("powerpc: Restore FPU/VEC/VSX if previously used") Cc: stable@vger.kernel.org # v4.6+ Signed-off-by: Breno Leitao Signed-off-by: Gustavo Romero Acked-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 2 ++ 1 file changed, 2 insertions(+) commit 6dc06c08bef1c746ff8da33dab677cfbacdcad32 Author: Talat Batheesh Date: Sun Jun 4 14:30:07 2017 +0300 net/mlx4: Fix the check in attaching steering rules Our previous patch (cited below) introduced a regression for RAW Eth QPs. Fix it by checking if the QP number provided by user-space exists, hence allowing steering rules to be added for valid QPs only. Fixes: 89c557687a32 ("net/mlx4_en: Avoid adding steering rules with invalid ring") Reported-by: Or Gerlitz Signed-off-by: Talat Batheesh Signed-off-by: Tariq Toukan Acked-by: Or Gerlitz Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 5 ----- drivers/net/ethernet/mellanox/mlx4/mcg.c | 15 +++++++++++---- drivers/net/ethernet/mellanox/mlx4/qp.c | 13 +++++++++++++ include/linux/mlx4/qp.h | 1 + 4 files changed, 25 insertions(+), 9 deletions(-) commit b699d0035836f6712917a41e7ae58d84359b8ff9 Author: Haishuang Yan Date: Sun Jun 4 14:43:43 2017 +0800 sit: reload iphdr in ipip6_rcv Since iptunnel_pull_header() can call pskb_may_pull(), we must reload any pointer that was related to skb->head. Fixes: a09a4c8dd1ec ("tunnels: Remove encapsulation offloads on decap") Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller net/ipv6/sit.c | 1 + 1 file changed, 1 insertion(+) commit 77d4b1d36926a9b8387c6b53eeba42bcaaffcea3 Author: Eric Dumazet Date: Sat Jun 3 09:29:25 2017 -0700 net: ping: do not abuse udp_poll() Alexander reported various KASAN messages triggered in recent kernels The problem is that ping sockets should not use udp_poll() in the first place, and recent changes in UDP stack finally exposed this old bug. Fixes: c319b4d76b9e ("net: ipv4: add IPPROTO_ICMP socket kind") Fixes: 6d0bfe226116 ("net: ipv6: Add IPv6 support to the ping socket.") Signed-off-by: Eric Dumazet Reported-by: Sasha Levin Cc: Solar Designer Cc: Vasiliy Kulikov Cc: Lorenzo Colitti Acked-By: Lorenzo Colitti Tested-By: Lorenzo Colitti Signed-off-by: David S. Miller include/net/ipv6.h | 1 + net/ipv4/af_inet.c | 2 +- net/ipv6/ping.c | 2 +- net/ipv6/raw.c | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) commit b07ac9894644202614ca87c69f3f45e424a82fef Author: Florian Fainelli Date: Fri Jun 2 22:05:23 2017 -0700 net: dsa: Fix stale cpu_switch reference after unbind then bind Commit 9520ed8fb841 ("net: dsa: use cpu_switch instead of ds[0]") replaced the use of dst->ds[0] with dst->cpu_switch since that is functionally equivalent, however, we can now run into an use after free scenario after unbinding then rebinding the switch driver. The use after free happens because we do correctly initialize dst->cpu_switch the first time we probe in dsa_cpu_parse(), then we unbind the driver: dsa_dst_unapply() is called, and we rebind again. dst->cpu_switch now points to a freed "ds" structure, and so when we finally dereference it in dsa_cpu_port_ethtool_setup(), we oops. To fix this, simply set dst->cpu_switch to NULL in dsa_dst_unapply() which guarantees that we always correctly re-assign dst->cpu_switch in dsa_cpu_parse(). Fixes: 9520ed8fb841 ("net: dsa: use cpu_switch instead of ds[0]") Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e3e86b5119f81e5e2499bea7ea1ebe8ac6aab789 Author: David S. Miller Date: Sun Jun 4 21:41:10 2017 -0400 ipv6: Fix leak in ipv6_gso_segment(). If ip6_find_1stfragopt() fails and we return an error we have to free up 'segs' because nobody else is going to. Fixes: 2423496af35d ("ipv6: Prevent overrun when parsing v6 header options") Reported-by: Ben Hutchings Signed-off-by: David S. Miller net/ipv6/ip6_offload.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9a1c44d989bff4c992b8b9a112d9fda275ea5515 Author: Eric Garver Date: Fri Jun 2 14:54:10 2017 -0400 geneve: fix needed_headroom and max_mtu for collect_metadata Since commit 9b4437a5b870 ("geneve: Unify LWT and netdev handling.") when using COLLECT_METADATA geneve devices are created with too small of a needed_headroom and too large of a max_mtu. This is because ip_tunnel_info_af() is not valid with the device level info when using COLLECT_METADATA and we mistakenly fall into the IPv4 case. For COLLECT_METADATA, always use the worst case of ipv6 since both sockets are created. Fixes: 9b4437a5b870 ("geneve: Unify LWT and netdev handling.") Signed-off-by: Eric Garver Acked-by: Pravin B Shelar Signed-off-by: David S. Miller drivers/net/geneve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38b257938ac6655d0d6333743303231b9c465ec1 Author: Soheil Hassas Yeganeh Date: Fri Jun 2 12:38:22 2017 -0400 sock: reset sk_err when the error queue is empty Prior to f5f99309fa74 (sock: do not set sk_err in sock_dequeue_err_skb), sk_err was reset to the error of the skb on the head of the error queue. Applications, most notably ping, are relying on this behavior to reset sk_err for ICMP packets. Set sk_err to the ICMP error when there is an ICMP packet at the head of the error queue. Fixes: f5f99309fa74 (sock: do not set sk_err in sock_dequeue_err_skb) Reported-by: Cyril Hrubis Tested-by: Cyril Hrubis Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/core/skbuff.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a7c0b8bee212e22725196fda8389bff9ade3ac68 Author: Michal Hocko Date: Fri Jun 2 17:54:08 2017 +0200 amd-xgbe: use PAGE_ALLOC_COSTLY_ORDER in xgbe_map_rx_buffer xgbe_map_rx_buffer is rather confused about what PAGE_ALLOC_COSTLY_ORDER means. It uses PAGE_ALLOC_COSTLY_ORDER-1 assuming that PAGE_ALLOC_COSTLY_ORDER is the first costly order which is not the case actually because orders larger than that are costly. And even that applies only to sleeping allocations which is not the case here. We simply do not perform any costly operations like reclaim or compaction for those. Simplify the code by dropping the order calculation and use PAGE_ALLOC_COSTLY_ORDER directly. Signed-off-by: Michal Hocko Acked-by: Tom Lendacky Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-desc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5f733ee68f9a4df94775299ac6a7ab260704f6ed Author: Liam McBirnie Date: Thu Jun 1 15:36:01 2017 +1000 ip6_tunnel: fix traffic class routing for tunnels ip6_route_output() requires that the flowlabel contains the traffic class for policy routing. Commit 0e9a709560db ("ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets") removed the code which previously added the traffic class to the flowlabel. The traffic class is added here because only route lookup needs the flowlabel to contain the traffic class. Fixes: 0e9a709560db ("ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets") Signed-off-by: Liam McBirnie Acked-by: Peter Dawson Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 3 +++ 1 file changed, 3 insertions(+) commit 3c2993b8c6143d8a5793746a54eba8f86f95240f Author: Linus Torvalds Date: Sun Jun 4 16:47:43 2017 -0700 Linux 4.12-rc4 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 239e250e4acbc0104d514307029c0839e834a51a Author: Richard Narron Date: Sun Jun 4 16:23:18 2017 -0700 fs/ufs: Set UFS default maximum bytes per file This fixes a problem with reading files larger than 2GB from a UFS-2 file system: https://bugzilla.kernel.org/show_bug.cgi?id=195721 The incorrect UFS s_maxsize limit became a problem as of commit c2a9737f45e2 ("vfs,mm: fix a dead loop in truncate_inode_pages_range()") which started using s_maxbytes to avoid a page index overflow in do_generic_file_read(). That caused files to be truncated on UFS-2 file systems because the default maximum file size is 2GB (MAX_NON_LFS) and UFS didn't update it. Here I simply increase the default to a common value used by other file systems. Signed-off-by: Richard Narron Cc: Al Viro Cc: Will B Cc: Theodore Ts'o Cc: # v4.9 and backports of c2a9737f45e2 Signed-off-by: Linus Torvalds fs/ufs/super.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 246096690be0742d9bb5f3456d2cb95b68f7b46d Author: Timur Tabi Date: Thu Jun 1 16:08:13 2017 -0500 net: qcom/emac: do not use hardware mdio automatic polling Use software polling (PHY_POLL) to check for link state changes instead of relying on the EMAC's hardware polling feature. Some PHY drivers are unable to get a functioning link because the HW polling is not robust enough. The EMAC is able to poll the PHY on the MDIO bus looking for link state changes (via the Link Status bit in the Status Register at address 0x1). When the link state changes, the EMAC triggers an interrupt and tells the driver what the new state is. The feature eliminates the need for software to poll the MDIO bus. Unfortunately, this feature is incompatible with phylib, because it ignores everything that the PHY core and PHY drivers are trying to do. In particular: 1. It assumes a compatible register set, so PHYs with different registers may not work. 2. It doesn't allow for hardware errata that have work-arounds implemented in the PHY driver. 3. It doesn't support multiple register pages. If the PHY core switches the register set to another page, the EMAC won't know the page has changed and will still attempt to read the same PHY register. 4. It only checks the copper side of the link, not the SGMII side. Some PHY drivers (e.g. at803x) may also check the SGMII side, and report the link as not ready during autonegotiation if the SGMII link is still down. Phylib then waits for another interrupt to query the PHY again, but the EMAC won't send another interrupt because it thinks the link is up. Cc: stable@vger.kernel.org # 4.11.x Tested-by: Manoj Iyer Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-mac.c | 2 +- drivers/net/ethernet/qualcomm/emac/emac-phy.c | 75 ++------------------------- drivers/net/ethernet/qualcomm/emac/emac.c | 22 +------- 3 files changed, 6 insertions(+), 93 deletions(-) commit 125f42b0e226d201a2118b79a6c7f1ddb9aabe1d Merge: 3c06e6c 4f253e1 Author: Linus Torvalds Date: Sun Jun 4 11:56:53 2017 -0700 Merge tag 'nfs-for-4.12-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfixes from Trond Myklebust: "Bugfixes include: - Fix a typo in commit e092693443b ("NFS append COMMIT after synchronous COPY") that breaks copy offload - Fix the connect error propagation in xs_tcp_setup_socket() - Fix a lock leak in nfs40_walk_client_list - Verify that pNFS requests lie within the offset range of the layout segment" * tag 'nfs-for-4.12-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: nfs: Mark unnecessarily extern functions as static SUNRPC: ensure correct error is reported by xs_tcp_setup_socket() NFSv4.0: Fix a lock leak in nfs40_walk_client_list pnfs: Fix the check for requests in range of layout segment xprtrdma: Delete an error message for a failed memory allocation in xprt_rdma_bc_setup() pNFS/flexfiles: missing error code in ff_layout_alloc_lseg() NFS fix COMMIT after COPY commit 3c06e6cbdb6a3faa73fbdfd9022e23f82d24c372 Merge: e00811b fc098af Author: Linus Torvalds Date: Sun Jun 4 11:41:41 2017 -0700 Merge tag 'tty-4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty fix from Greg KH: "Here is a single tty core fix for 4.12-rc4. It reverts a patch that a lot of people reported as causing lockdep and other warnings. Right after I reverted this in my tree, it seems like another "correct" fix might have shown up, but it's too late in the release cycle to be messing with tty core locking, so let's just revert this for now to go back how things always have been and try it again for 4.13. This has not been in linux-next as I only reverted it a few hours ago" * tag 'tty-4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: Revert "tty: fix port buffer locking" commit e00811b4ca520e5a876baf41c6831de4bc276d3e Merge: 9f03b2c 0fd5f22 Author: Linus Torvalds Date: Sun Jun 4 11:37:42 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input subsystem fixes from Dmitry Torokhov: - a couple of regression fixes in synaptics and axp20x-pek drivers - try to ease transition from PS/2 to RMI for Synaptics touchpad users by ensuring we do not try to activate RMI mode when RMI SMBus support is not enabled, and nag users a bit to enable it - plus a couple of other changes that seemed worthwhile for this release * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: axp20x-pek - switch to acpi_dev_present and check for ACPI0011 too Input: axp20x-pek - only check for "INTCFD9" ACPI device on Cherry Trail Input: tm2-touchkey - use LEN_ON as boolean value instead of LED_FULL Input: synaptics - tell users to report when they should be using rmi-smbus Input: synaptics - warn the users when there is a better mode Input: synaptics - keep PS/2 around when RMI4_SMB is not enabled Input: synaptics - clear device info before filling in Input: silead - disable interrupt during suspend commit 9f03b2c7c576bbc427b4c214b2c548f3539b17a2 Merge: 1f915b7 6ceec69 Author: Linus Torvalds Date: Sun Jun 4 11:29:32 2017 -0700 Merge tag 'rtc-4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC fixlet from Alexandre Belloni: "A single patch, not really a fix but I don't think there is any reason to delay it. Change the mailing list address" * tag 'rtc-4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: MAINTAINERS: update RTC mailing list commit 963761a0b2e85663ee4a5630f72930885a06598a Author: Sean Young Date: Wed May 24 06:24:51 2017 -0300 [media] rc-core: race condition during ir_raw_event_register() A rc device can call ir_raw_event_handle() after rc_allocate_device(), but before rc_register_device() has completed. This is racey because rcdev->raw is set before rcdev->raw->thread has a valid value. Cc: stable@kernel.org Reported-by: kbuild test robot Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-ir-raw.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 20249f84238e006ef7b726d3211a70de7454d045 Author: Hans Verkuil Date: Sun May 28 05:52:16 2017 -0300 [media] cec: drop MEDIA_CEC_DEBUG Just depend on DEBUG_FS, no need to invent a new kernel config. Especially since CEC can be enabled by drm without enabling MEDIA_SUPPORT. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/Kconfig | 6 ------ drivers/media/cec/cec-adap.c | 2 +- drivers/media/cec/cec-core.c | 4 ++-- 3 files changed, 3 insertions(+), 9 deletions(-) commit e94c32818d865b620c9bbd2656ab3199259ef9ec Author: Hans Verkuil Date: Sun May 28 05:58:04 2017 -0300 [media] cec: rename MEDIA_CEC_NOTIFIER to CEC_NOTIFIER This config option is strictly speaking independent of the media subsystem since it can be used by drm as well. Besides, it looks odd when drivers select CEC_CORE and MEDIA_CEC_NOTIFIER, that's inconsistent naming. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/Kconfig | 2 +- drivers/media/cec/Makefile | 2 +- drivers/media/cec/cec-core.c | 4 ++-- drivers/media/platform/Kconfig | 4 ++-- include/media/cec-notifier.h | 2 +- include/media/cec.h | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) commit 9177e51d1434076a91f9bfb693deae8b955d6d57 Author: Hans Verkuil Date: Sun May 28 05:48:37 2017 -0300 [media] cec: select CEC_CORE instead of depend on it The CEC framework is used by both drm and media. That makes it tricky to get the dependencies right. This patch moves the CEC_CORE and MEDIA_CEC_NOTIFIER config options out of the media menu and instead drivers that want to use CEC should select CEC_CORE and MEDIA_CEC_NOTIFIER (if needed). Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/Kconfig | 6 ++++++ drivers/media/Makefile | 4 ++-- drivers/media/cec/Kconfig | 8 -------- drivers/media/i2c/Kconfig | 9 ++++++--- drivers/media/platform/Kconfig | 6 ++++-- drivers/media/platform/vivid/Kconfig | 3 ++- drivers/media/usb/pulse8-cec/Kconfig | 3 ++- drivers/media/usb/rainshadow-cec/Kconfig | 3 ++- 8 files changed, 24 insertions(+), 18 deletions(-) commit ca33784ba4949856a94a545c91429aae5c8b658d Author: Colin Ian King Date: Fri May 19 14:45:15 2017 -0300 [media] rainshadow-cec: ensure exit_loop is intialized exit_loop is not being initialized, so it contains garbage. Ensure it is initialized to false. Detected by CoverityScan, CID#1436409 ("Uninitialized scalar variable") Fixes: ea6a69defd3311 ("[media] rainshadow-cec: avoid -Wmaybe-uninitialized warning") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/rainshadow-cec/rainshadow-cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f224c5768c78cb42f582636c4720a4d81d452778 Author: Mauro Carvalho Chehab Date: Thu May 18 05:40:18 2017 -0300 [media] atomisp: don't treat warnings as errors Several atomisp files use: ccflags-y += -Werror As, on media, our usual procedure is to use W=1, and atomisp has *a lot* of warnings with such flag enabled,like: ./drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/system_local.h:62:26: warning: 'DDR_BASE' defined but not used [-Wunused-const-variable=] At the end, it causes our build to fail, impacting our workflow. So, remove this crap. If one wants to force -Werror, he can still build with it enabled by passing a parameter to make. Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/Makefile | 2 -- drivers/staging/media/atomisp/i2c/imx/Makefile | 2 -- drivers/staging/media/atomisp/i2c/ov5693/Makefile | 2 -- drivers/staging/media/atomisp/pci/atomisp2/Makefile | 2 +- 4 files changed, 1 insertion(+), 7 deletions(-) commit 1f915b7fedd605d69baa581130abc5a38334eaa5 Merge: 55cbdaf 75b6125 Author: Linus Torvalds Date: Sun Jun 4 11:15:43 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "This is nine fixes, seven of which are for the qedi driver (new as of 4.10) the other two are a use after free in the cxgbi drivers and a potential NULL dereference in the rdac device handler" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: libcxgbi: fix skb use after free scsi: qedi: Fix endpoint NULL panic during recovery. scsi: qedi: set max_fin_rt default value scsi: qedi: Set firmware tcp msl timer value. scsi: qedi: Fix endpoint NULL panic in qedi_set_path. scsi: qedi: Set dma_boundary to 0xfff. scsi: qedi: Correctly set firmware max supported BDs. scsi: qedi: Fix bad pte call trace when iscsiuio is stopped. scsi: scsi_dh_rdac: Use ctlr directly in rdac_failover_get() commit 55cbdaf6399de16b61d40d49b6c8bb739a877dea Merge: ea094f3 d3957b86 Author: Linus Torvalds Date: Sun Jun 4 10:41:32 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: "For the most part this is just a minor -rc cycle for the rdma subsystem. Even given that this is all of the -rc patches since the merge window closed, it's still only about 25 patches: - Multiple i40iw, nes, iw_cxgb4, hfi1, qib, mlx4, mlx5 fixes - A few upper layer protocol fixes (IPoIB, iSER, SRP) - A modest number of core fixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (26 commits) RDMA/SA: Fix kernel panic in CMA request handler flow RDMA/umem: Fix missing mmap_sem in get umem ODP call RDMA/core: not to set page dirty bit if it's already set. RDMA/uverbs: Declare local function static and add brackets to sizeof RDMA/netlink: Reduce exposure of RDMA netlink functions RDMA/srp: Fix NULL deref at srp_destroy_qp() RDMA/IPoIB: Limit the ipoib_dev_uninit_default scope RDMA/IPoIB: Replace netdev_priv with ipoib_priv for ipoib_get_link_ksettings RDMA/qedr: add null check before pointer dereference RDMA/mlx5: set UMR wqe fence according to HCA cap net/mlx5: Define interface bits for fencing UMR wqe RDMA/mlx4: Fix MAD tunneling when SRIOV is enabled RDMA/qib,hfi1: Fix MR reference count leak on write with immediate RDMA/hfi1: Defer setting VL15 credits to link-up interrupt RDMA/hfi1: change PCI bar addr assignments to Linux API functions RDMA/hfi1: fix array termination by appending NULL to attr array RDMA/iw_cxgb4: fix the calculation of ipv6 header size RDMA/iw_cxgb4: calculate t4_eq_status_entries properly RDMA/iw_cxgb4: Avoid touch after free error in ARP failure handlers RDMA/nes: ACK MPA Reply frame ... commit ff86bf0c65f14346bf2440534f9ba5ac232c39a0 Author: Thomas Gleixner Date: Tue May 30 23:15:35 2017 +0200 alarmtimer: Rate limit periodic intervals The alarmtimer code has another source of potentially rearming itself too fast. Interval timers with a very samll interval have a similar CPU hog effect as the previously fixed overflow issue. The reason is that alarmtimers do not implement the normal protection against this kind of problem which the other posix timer use: timer expires -> queue signal -> deliver signal -> rearm timer This scheme brings the rearming under scheduler control and prevents permanently firing timers which hog the CPU. Bringing this scheme to the alarm timer code is a major overhaul because it lacks all the necessary mechanisms completely. So for a quick fix limit the interval to one jiffie. This is not problematic in practice as alarmtimers are usually backed by an RTC for suspend which have 1 second resolution. It could be therefor argued that the resolution of this clock should be set to 1 second in general, but that's outside the scope of this fix. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Kostya Serebryany Cc: syzkaller Cc: John Stultz Cc: Dmitry Vyukov Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20170530211655.896767100@linutronix.de kernel/time/alarmtimer.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f4781e76f90df7aec400635d73ea4c35ee1d4765 Author: Thomas Gleixner Date: Tue May 30 23:15:34 2017 +0200 alarmtimer: Prevent overflow of relative timers Andrey reported a alartimer related RCU stall while fuzzing the kernel with syzkaller. The reason for this is an overflow in ktime_add() which brings the resulting time into negative space and causes immediate expiry of the timer. The following rearm with a small interval does not bring the timer back into positive space due to the same issue. This results in a permanent firing alarmtimer which hogs the CPU. Use ktime_add_safe() instead which detects the overflow and clamps the result to KTIME_SEC_MAX. Reported-by: Andrey Konovalov Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Kostya Serebryany Cc: syzkaller Cc: John Stultz Cc: Dmitry Vyukov Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20170530211655.802921648@linutronix.de kernel/time/alarmtimer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fc098af16b9ff6d470d779d8ddcfb2d91869045a Author: Greg Kroah-Hartman Date: Sun Jun 4 10:23:25 2017 +0200 Revert "tty: fix port buffer locking" This reverts commit 925bb1ce47f429f69aad35876df7ecd8c53deb7e. It causes lots of warnings and problems so for now, let's just revert it. Reported-by: Reported-by: Russell King Reported-by: Sergey Senozhatsky Reported-by: Geert Uytterhoeven Reported-by: Jiri Slaby Reported-by: Andrey Konovalov Acked-by: Vegard Nossum Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_port.c | 2 -- 1 file changed, 2 deletions(-) commit 4f253e1eb628f5adf7ca4f43aab4bbb1bfffa081 Author: Jan Kara Date: Tue May 16 12:18:11 2017 +0200 nfs: Mark unnecessarily extern functions as static nfs_initialise_sb() and nfs_clone_super() are declared as extern even though they are used only in fs/nfs/super.c. Mark them as static. Also remove explicit 'inline' directive from nfs_initialise_sb() and leave it upto compiler to decide whether inlining is worth it. Signed-off-by: Jan Kara Signed-off-by: Trond Myklebust fs/nfs/internal.h | 2 -- fs/nfs/super.c | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) commit ea094f3c830a67f252677aacba5d04ebcf55c4d9 Merge: cc54874 5f348fa Author: Linus Torvalds Date: Sat Jun 3 08:45:03 2017 -0700 Merge tag 'hwmon-for-linus-v4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: "A couple of patches for the aspeed pwm fan driver" * tag 'hwmon-for-linus-v4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (aspeed-pwm-tacho) make fan/pwm names start with index 1 hwmon: (aspeed-pwm-tacho) Call of_node_put() on a node not claimed hwmon: (aspeed-pwm-tacho) On read failure return -ETIMEDOUT hwmon: (aspeed-pwm-tacho) Select REGMAP commit cc54874055c007cd599138a394d1f039e4e0764b Merge: 104c08b 05e97a9 Author: Linus Torvalds Date: Sat Jun 3 08:42:30 2017 -0700 Merge tag 'for-linus-20170602' of git://git.infradead.org/linux-mtd Pull MTD fixes from Brian Norris: "NAND updates from Boris: tango fixes: - Add missing MODULE_DEVICE_TABLE() in tango_nand.c - Update the number of corrected bitflips core fixes: - Fix a long standing memory leak in nand_scan_tail() - Fix several bugs introduced by the per-vendor init/detection infrastructure (introduced in 4.12) - Add a static specifier to nand_ooblayout_lp_hamming_ops definition" * tag 'for-linus-20170602' of git://git.infradead.org/linux-mtd: mtd: nand: make nand_ooblayout_lp_hamming_ops static mtd: nand: tango: Update ecc_stats.corrected mtd: nand: tango: Export OF device ID table as module aliases mtd: nand: samsung: warn about un-parseable ECC info mtd: nand: free vendor-specific resources in init failure paths mtd: nand: drop unneeded module.h include mtd: nand: don't leak buffers when ->scan_bbt() fails commit 3116a23bb30272d74ea81baf5d0ee23f602dd15b Author: Dmitry Monakhov Date: Wed May 10 19:20:44 2017 +0400 bio-integrity: Do not allocate integrity context for bio w/o data If bio has no data, such as ones from blkdev_issue_flush(), then we have nothing to protect. This patch prevent bugon like follows: kfree_debugcheck: out of range ptr ac1fa1d106742a5ah kernel BUG at mm/slab.c:2773! invalid opcode: 0000 [#1] SMP Modules linked in: bcache CPU: 0 PID: 4428 Comm: xfs_io Tainted: G W 4.11.0-rc4-ext4-00041-g2ef0043-dirty #43 Hardware name: Virtuozzo KVM, BIOS seabios-1.7.5-11.vz7.4 04/01/2014 task: ffff880137786440 task.stack: ffffc90000ba8000 RIP: 0010:kfree_debugcheck+0x25/0x2a RSP: 0018:ffffc90000babde0 EFLAGS: 00010082 RAX: 0000000000000034 RBX: ac1fa1d106742a5a RCX: 0000000000000007 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88013f3ccb40 RBP: ffffc90000babde8 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000fcb76420 R11: 00000000725172ed R12: 0000000000000282 R13: ffffffff8150e766 R14: ffff88013a145e00 R15: 0000000000000001 FS: 00007fb09384bf40(0000) GS:ffff88013f200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fd0172f9e40 CR3: 0000000137fa9000 CR4: 00000000000006f0 Call Trace: kfree+0xc8/0x1b3 bio_integrity_free+0xc3/0x16b bio_free+0x25/0x66 bio_put+0x14/0x26 blkdev_issue_flush+0x7a/0x85 blkdev_fsync+0x35/0x42 vfs_fsync_range+0x8e/0x9f vfs_fsync+0x1c/0x1e do_fsync+0x31/0x4a SyS_fsync+0x10/0x14 entry_SYSCALL_64_fastpath+0x1f/0xc2 Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Signed-off-by: Dmitry Monakhov Signed-off-by: Jens Axboe block/bio-integrity.c | 3 +++ 1 file changed, 3 insertions(+) commit 5f348fa35a28b19cf7ee1eaa420757341a724c86 Author: Stefan Schaeckeler Date: Fri Jun 2 12:43:28 2017 -0700 hwmon: (aspeed-pwm-tacho) make fan/pwm names start with index 1 Make fan and pwm names in sysfs start with index 1 in accordance to Documentation/hwmon/sysfs-interface conventions. Current implementation starts with index 0, making tools such as sensors(1) skip the first fan. Signed-off-by: Stefan Schaeckeler Fixes: 2d7a548a3eff ("drivers: hwmon: Support for ASPEED PWM/Fan tach") Signed-off-by: Guenter Roeck drivers/hwmon/aspeed-pwm-tacho.c | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 4d58e7329fdd87d37f04b319d6a5165aaff5d75c Author: Stefan Schaeckeler Date: Fri Jun 2 12:42:08 2017 -0700 hwmon: (aspeed-pwm-tacho) Call of_node_put() on a node not claimed Call of_node_put() on a node claimed with of_node_get() or by any other means such as for_each_child_of_node(). Signed-off-by: Stefan Schaeckeler Fixes: 2d7a548a3eff ("drivers: hwmon: Support for ASPEED PWM/Fan tach") Signed-off-by: Guenter Roeck drivers/hwmon/aspeed-pwm-tacho.c | 1 - 1 file changed, 1 deletion(-) commit 6f9193ec044a8f72d8b6ae94a5c4ab6e8b0f00ca Author: Pratyush Anand Date: Mon May 29 22:08:24 2017 +0300 mei: make sysfs modalias format similar as uevent modalias modprobe is not able to resolve sysfs modalias for mei devices. # cat /sys/class/watchdog/watchdog0/device/watchdog/watchdog0/device/modalias mei::05b79a6f-4628-4d7f-899d-a91514cb32ab: # modprobe --set-version 4.9.6-200.fc25.x86_64 -R mei::05b79a6f-4628-4d7f-899d-a91514cb32ab: modprobe: FATAL: Module mei::05b79a6f-4628-4d7f-899d-a91514cb32ab: not found in directory /lib/modules/4.9.6-200.fc25.x86_64 # cat /lib/modules/4.9.6-200.fc25.x86_64/modules.alias | grep 05b79a6f-4628-4d7f-899d-a91514cb32ab alias mei:*:05b79a6f-4628-4d7f-899d-a91514cb32ab:*:* mei_wdt commit b26864cad1c9 ("mei: bus: add client protocol version to the device alias"), however sysfs modalias is still in formmat mei:S:uuid:*. This patch equates format of uevent and sysfs modalias so that modprobe is able to resolve the aliases. Cc: 4.7+ Fixes: commit b26864cad1c9 ("mei: bus: add client protocol version to the device alias") Signed-off-by: Pratyush Anand Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/bus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 32829da54d9368103a2f03269a5120aa9ee4d5da Author: Julius Werner Date: Fri Jun 2 15:36:39 2017 -0700 drivers: char: mem: Fix wraparound check to allow mappings up to the end A recent fix to /dev/mem prevents mappings from wrapping around the end of physical address space. However, the check was written in a way that also prevents a mapping reaching just up to the end of physical address space, which may be a valid use case (especially on 32-bit systems). This patch fixes it by checking the last mapped address (instead of the first address behind that) for overflow. Fixes: b299cde245 ("drivers: char: mem: Check for address space wraparound with mmap()") Cc: Reported-by: Nico Huber Signed-off-by: Julius Werner Signed-off-by: Greg Kroah-Hartman drivers/char/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1454e15bc28ba94aa5d6b31a83a42d5c03af2a6d Author: Wei Yongjun Date: Tue May 16 15:26:12 2017 +0000 iio: adc: mxs-lradc: Fix return value check in mxs_lradc_adc_probe() In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Also add NULL test for iores. Signed-off-by: Wei Yongjun Signed-off-by: Jonathan Cameron drivers/iio/adc/mxs-lradc-adc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 948588e25b8af5e66962ed3f53e1cae1656fa5af Author: Jean-Baptiste Maneyrol Date: Mon May 29 09:59:40 2017 +0000 iio: imu: inv_mpu6050: add accel lpf setting for chip >= MPU6500 Starting from MPU6500, accelerometer dlpf is set in a separate register named ACCEL_CONFIG_2. Add this new register in the map and set it for the corresponding chips. Signed-off-by: Jean-Baptiste Maneyrol Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 39 +++++++++++++++++++++++++++--- drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 3 +++ 2 files changed, 39 insertions(+), 3 deletions(-) commit 0a33252e060e97ed3fbdcec9517672f1e91aaef3 Author: Oleg Drokin Date: Fri May 26 23:40:33 2017 -0400 staging/lustre/lov: remove set_fs() call from lov_getstripe() lov_getstripe() calls set_fs(KERNEL_DS) so that it can handle a struct lov_user_md pointer from user- or kernel-space. This changes the behavior of copy_from_user() on SPARC and may result in a misaligned access exception which in turn oopses the kernel. In fact the relevant argument to lov_getstripe() is never called with a kernel-space pointer and so changing the address limits is unnecessary and so we remove the calls to save, set, and restore the address limits. Signed-off-by: John L. Hammond Reviewed-on: http://review.whamcloud.com/6150 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3221 Reviewed-by: Andreas Dilger Reviewed-by: Li Wei Signed-off-by: Oleg Drokin Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lov/lov_pack.c | 9 --------- 1 file changed, 9 deletions(-) commit 40da1b11f01e43aad1aa6cea64681b6125e8a2a7 Author: Sebastian Andrzej Siewior Date: Fri Jun 2 16:27:14 2017 +0200 cpu/hotplug: Drop the device lock on error If a custom CPU target is specified and that one is not available _or_ can't be interrupted then the code returns to userland without dropping a lock as notices by lockdep: |echo 133 > /sys/devices/system/cpu/cpu7/hotplug/target | ================================================ | [ BUG: lock held when returning to user space! ] | ------------------------------------------------ | bash/503 is leaving the kernel with locks still held! | 1 lock held by bash/503: | #0: (device_hotplug_lock){+.+...}, at: [] lock_device_hotplug_sysfs+0x10/0x40 So release the lock then. Fixes: 757c989b9994 ("cpu/hotplug: Make target state writeable") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20170602142714.3ogo25f2wbq6fjpj@linutronix.de kernel/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f74994a94063bc85ac1d6ad677ed06b5279c101f Author: Chen-Yu Tsai Date: Wed May 31 15:58:24 2017 +0800 arm64: allwinner: a64: Add PLL_PERIPH0 clock to the R_CCU The AR100 clock within the R_CCU (PRCM) has the PLL_PERIPH0 as one of its parents. This adds the reference in the device tree describing this relationship. This patch uses a raw number for the clock index to ease merging by avoiding cross tree dependencies. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 77125a701adb21bfc03a2af211f472f8b490a084 Author: Chen-Yu Tsai Date: Wed May 31 15:58:22 2017 +0800 ARM: sunxi: h3-h5: Add PLL_PERIPH0 clock to the R_CCU The AR100 clock within the R_CCU (PRCM) has the PLL_PERIPH0 as one of its parents. This adds the reference in the device tree describing this relationship. This patch uses a raw number for the clock index to ease merging by avoiding cross tree dependencies. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sunxi-h3-h5.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 29532e7b67f0ce0576e56f8ab0eeda311cde3b4b Merge: b132e4a2 9605bc4 Author: Greg Kroah-Hartman Date: Sat Jun 3 09:55:59 2017 +0900 Merge tag 'phy-for-4.12-rc-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus Kishon writes: phy: for 4.12-rc *) Fix return value check in phy-qcom-qmp driver *) Fix memory allocation bug in phy-qcom-qmp driver Signed-off-by: Kishon Vijay Abraham I commit 0fd5f221093870d93edb696f6903b058c4d75411 Author: Hans de Goede Date: Fri Jun 2 17:50:22 2017 -0700 Input: axp20x-pek - switch to acpi_dev_present and check for ACPI0011 too acpi_dev_found checks that there is a matching ACPI node, but it may be disabled (_STA method returns 0) in which case the soc_button_array driver will not bind to it and axp20x-pek should handle the power-button. This commit switches from acpi_dev_found to acpi_dev_present to avoid not registering an input-dev for the powerbutton when there is a disabled PNP0C40 device. The ACPI-6.0 standard defines a standard gpio button device using the ACPI0011 HID replacing the custom PNP0C40 gpio device, many newer devices define both PNP0C40 and ACPI0011 devices enabling one or the other depending on whether the BIOS thinks it is going to boot Android or Windows. This commit adds a check for the ACPI0011 device, so that if either device is present *and* enabled we don't register an input-dev for the powerbutton. Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/misc/axp20x-pek.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8d4b31376974855cd4fb176e5d63ba8e0407928e Author: Hans de Goede Date: Fri Jun 2 17:18:47 2017 -0700 Input: axp20x-pek - only check for "INTCFD9" ACPI device on Cherry Trail Commit 9b13a4ca8d2c ("Input: axp20x-pek - do not register input device on some systems") added a check for the INTCFD9 ACPI device which also handles the powerbutton as on some systems the powerbutton is connected to both the PMIC, handled by axp20x-pek, and to a gpio on the SoC, handled by soc_button_array which attaches itself to the INTCFD9 ACPI device. Testing + comparing DSDTs has shown that this only happens on Cherry Trail devices with an AXP288 PMIC, the AXP288 PMIC is also used on Bay Trail devices but there the power button is only connected to the PMIC and not handled by soc_button_array. This means that the INTCFD9 check has caused a regression on Bay Trail devices, causing power-button presses to no longer be seen. This commit fixes this by limiting the check to devices where the ACPI node for the AXP288 contains a _HRV (hardware revision) attribute with a value of 3 which indicates we are dealing with a Cherry Trail platform. Fixes: 9b13a4ca8d2c ("Input: axp20x-pek - do not register input ...") Reported-by: Сергей Трусов Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/misc/axp20x-pek.c | 43 ++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) commit eadcbfa58ae8693f0d6a0f591d8f51d55cf068e1 Merge: c4beedb 5ed02db Author: Dmitry Torokhov Date: Fri Jun 2 17:49:10 2017 -0700 Merge tag 'v4.12-rc3' into for-linus Merge with mainline to get acpi_dev_present() needed by patches to axp20x-pek driver. commit b132e4a25dccf5d5857e6ce2d96541be51aa9c5e Merge: b3addcf afbbc79 Author: Greg Kroah-Hartman Date: Sat Jun 3 09:47:16 2017 +0900 Merge tag 'fixes-for-v4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.12-rc4 A fix to a really old synchronization bug on mass storage gadget. Support for Meson8 SoCs on dwc2 Synchronization fixes on renesas USB driver. commit 104c08ba8e921ef97abfdc10408d54921a6d9003 Merge: 89af529 6031913 Author: Linus Torvalds Date: Fri Jun 2 16:36:23 2017 -0700 Merge tag 'acpi-4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These revert one more problematic commit related to the ACPI-based handling of laptop lids and make some unuseful error messages coming from ACPICA go away. Specifics: - Revert one more commit related to the ACPI-based handling of laptop lids that changed the default behavior on laptops that booted with closed lids and introduced a regression there (Benjamin Tissoires). - Add a missing acpi_put_table() to the code implementing the /sys/firmware/acpi/tables interface to prevent a counter in the ACPICA core from overflowing (Dan Williams). - Drop error messages printed by ACPICA on acpi_get_table() reference counting mismatches as they need not indicate real errors at this point (Lv Zheng)" * tag 'acpi-4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPICA: Tables: Fix regression introduced by a too early mechanism enabling Revert "ACPI / button: Change default behavior to lid_init_state=open" ACPI / sysfs: fix acpi_get_table() leak / acpi-sysfs denial of service commit 89af529a6469d612258fce5745a7d45430f316ce Merge: 5a4829b bb5710e Author: Linus Torvalds Date: Fri Jun 2 16:33:33 2017 -0700 Merge tag 'pm-4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix two bugs in error code paths in the cpufreq core and in the kirkwood-cpufreq driver. Specifics: - Make cpufreq_register_driver() return an error if the ->init() calls fail for all CPUs to prevent non-functional drivers from hanging around for no reason (David Arcari). - Make kirkwood-cpufreq check the return value of clk_prepare_enable() (which may fail) as appropriate (Arvind Yadav)" * tag 'pm-4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: kirkwood-cpufreq:- Handle return value of clk_prepare_enable() cpufreq: cpufreq_register_driver() should return -ENODEV if init fails commit 5a4829b564d2f69574dc55bba2ada3ee72022187 Merge: f219764 9dfa7bb Author: Linus Torvalds Date: Fri Jun 2 16:19:47 2017 -0700 Merge tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random Pull /dev/random bug fix from Ted Ts'o: "Fix a race on architectures with prioritized interrupts (such as m68k) which can causes crashes in drivers/char/random.c:get_reg()" * tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: fix race in drivers/char/random.c:get_reg() commit f219764920c3d235713566013375cc01decd3d49 Merge: e6e6d07 d6c9708 Author: Linus Torvalds Date: Fri Jun 2 15:49:46 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "15 fixes" * emailed patches from Andrew Morton : scripts/gdb: make lx-dmesg command work (reliably) mm: consider memblock reservations for deferred memory initialization sizing mm/hugetlb: report -EHWPOISON not -EFAULT when FOLL_HWPOISON is specified mlock: fix mlock count can not decrease in race condition mm/migrate: fix refcount handling when !hugepage_migration_supported() dax: fix race between colliding PMD & PTE entries mm: avoid spurious 'bad pmd' warning messages mm/page_alloc.c: make sure OOM victim can try allocations with no watermarks once pcmcia: remove left-over %Z format slub/memcg: cure the brainless abuse of sysfs attributes initramfs: fix disabling of initramfs (and its compression) mm: clarify why we want kmalloc before falling backto vmallock frv: declare jiffies to be located in the .data section include/linux/gfp.h: fix ___GFP_NOLOCKDEP value ksm: prevent crash after write_protect_page fails commit d6c9708737c2107c38bd75f133d14d5801b8d6d5 Author: André Draszik Date: Fri Jun 2 14:46:51 2017 -0700 scripts/gdb: make lx-dmesg command work (reliably) lx-dmesg needs access to the log_buf symbol from printk.c. Unfortunately, the symbol log_buf also exists in BPF's verifier.c and hence gdb can pick one or the other. If it happens to pick BPF's log_buf, lx-dmesg doesn't work: (gdb) lx-dmesg Python Exception Cannot access memory at address 0x0: Error occurred in Python command: Cannot access memory at address 0x0 (gdb) p log_buf $15 = 0x0 Luckily, GDB has a way to deal with this, see https://sourceware.org/gdb/onlinedocs/gdb/Symbols.html (gdb) info variables ^log_buf$ All variables matching regular expression "^log_buf$": File /kernel/bpf/verifier.c: static char *log_buf; File /kernel/printk/printk.c: static char *log_buf; (gdb) p 'verifier.c'::log_buf $1 = 0x0 (gdb) p 'printk.c'::log_buf $2 = 0x811a6aa0 <__log_buf> "" (gdb) p &log_buf $3 = (char **) 0x8120fe40 (gdb) p &'verifier.c'::log_buf $4 = (char **) 0x8120fe40 (gdb) p &'printk.c'::log_buf $5 = (char **) 0x8048b7d0 By being explicit about the location of the symbol, we can make lx-dmesg work again. While at it, do the same for the other symbols we need from printk.c Link: http://lkml.kernel.org/r/20170526112222.3414-1-git@andred.net Signed-off-by: André Draszik Tested-by: Kieran Bingham Acked-by: Jan Kiszka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/gdb/linux/dmesg.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 864b9a393dcb5aed09b8fd31b9bbda0fdda99374 Author: Michal Hocko Date: Fri Jun 2 14:46:49 2017 -0700 mm: consider memblock reservations for deferred memory initialization sizing We have seen an early OOM killer invocation on ppc64 systems with crashkernel=4096M: kthreadd invoked oom-killer: gfp_mask=0x16040c0(GFP_KERNEL|__GFP_COMP|__GFP_NOTRACK), nodemask=7, order=0, oom_score_adj=0 kthreadd cpuset=/ mems_allowed=7 CPU: 0 PID: 2 Comm: kthreadd Not tainted 4.4.68-1.gd7fe927-default #1 Call Trace: dump_stack+0xb0/0xf0 (unreliable) dump_header+0xb0/0x258 out_of_memory+0x5f0/0x640 __alloc_pages_nodemask+0xa8c/0xc80 kmem_getpages+0x84/0x1a0 fallback_alloc+0x2a4/0x320 kmem_cache_alloc_node+0xc0/0x2e0 copy_process.isra.25+0x260/0x1b30 _do_fork+0x94/0x470 kernel_thread+0x48/0x60 kthreadd+0x264/0x330 ret_from_kernel_thread+0x5c/0xa4 Mem-Info: active_anon:0 inactive_anon:0 isolated_anon:0 active_file:0 inactive_file:0 isolated_file:0 unevictable:0 dirty:0 writeback:0 unstable:0 slab_reclaimable:5 slab_unreclaimable:73 mapped:0 shmem:0 pagetables:0 bounce:0 free:0 free_pcp:0 free_cma:0 Node 7 DMA free:0kB min:0kB low:0kB high:0kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:52428800kB managed:110016kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:320kB slab_unreclaimable:4672kB kernel_stack:1152kB pagetables:0kB unstable:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes lowmem_reserve[]: 0 0 0 0 Node 7 DMA: 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB = 0kB 0 total pagecache pages 0 pages in swap cache Swap cache stats: add 0, delete 0, find 0/0 Free swap = 0kB Total swap = 0kB 819200 pages RAM 0 pages HighMem/MovableOnly 817481 pages reserved 0 pages cma reserved 0 pages hwpoisoned the reason is that the managed memory is too low (only 110MB) while the rest of the the 50GB is still waiting for the deferred intialization to be done. update_defer_init estimates the initial memoty to initialize to 2GB at least but it doesn't consider any memory allocated in that range. In this particular case we've had Reserving 4096MB of memory at 128MB for crashkernel (System RAM: 51200MB) so the low 2GB is mostly depleted. Fix this by considering memblock allocations in the initial static initialization estimation. Move the max_initialise to reset_deferred_meminit and implement a simple memblock_reserved_memory helper which iterates all reserved blocks and sums the size of all that start below the given address. The cumulative size is than added on top of the initial estimation. This is still not ideal because reset_deferred_meminit doesn't consider holes and so reservation might be above the initial estimation whihch we ignore but let's make the logic simpler until we really need to handle more complicated cases. Fixes: 3a80a7fa7989 ("mm: meminit: initialise a subset of struct pages if CONFIG_DEFERRED_STRUCT_PAGE_INIT is set") Link: http://lkml.kernel.org/r/20170531104010.GI27783@dhcp22.suse.cz Signed-off-by: Michal Hocko Acked-by: Mel Gorman Tested-by: Srikar Dronamraju Cc: [4.2+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memblock.h | 8 ++++++++ include/linux/mmzone.h | 1 + mm/memblock.c | 23 +++++++++++++++++++++++ mm/page_alloc.c | 33 ++++++++++++++++++++++----------- 4 files changed, 54 insertions(+), 11 deletions(-) commit 9a291a7c9428155e8e623e4a3989f8be47134df5 Author: James Morse Date: Fri Jun 2 14:46:46 2017 -0700 mm/hugetlb: report -EHWPOISON not -EFAULT when FOLL_HWPOISON is specified KVM uses get_user_pages() to resolve its stage2 faults. KVM sets the FOLL_HWPOISON flag causing faultin_page() to return -EHWPOISON when it finds a VM_FAULT_HWPOISON. KVM handles these hwpoison pages as a special case. (check_user_page_hwpoison()) When huge pages are involved, this doesn't work so well. get_user_pages() calls follow_hugetlb_page(), which stops early if it receives VM_FAULT_HWPOISON from hugetlb_fault(), eventually returning -EFAULT to the caller. The step to map this to -EHWPOISON based on the FOLL_ flags is missing. The hwpoison special case is skipped, and -EFAULT is returned to user-space, causing Qemu or kvmtool to exit. Instead, move this VM_FAULT_ to errno mapping code into a header file and use it from faultin_page() and follow_hugetlb_page(). With this, KVM works as expected. This isn't a problem for arm64 today as we haven't enabled MEMORY_FAILURE, but I can't see any reason this doesn't happen on x86 too, so I think this should be a fix. This doesn't apply earlier than stable's v4.11.1 due to all sorts of cleanup. [james.morse@arm.com: add vm_fault_to_errno() call to faultin_page()] suggested. Link: http://lkml.kernel.org/r/20170525171035.16359-1-james.morse@arm.com [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20170524160900.28786-1-james.morse@arm.com Signed-off-by: James Morse Acked-by: Punit Agrawal Acked-by: Naoya Horiguchi Cc: "Kirill A . Shutemov" Cc: [4.11.1+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 11 +++++++++++ mm/gup.c | 20 ++++++++------------ mm/hugetlb.c | 5 +++++ 3 files changed, 24 insertions(+), 12 deletions(-) commit 70feee0e1ef331b22cc51f383d532a0d043fbdcc Author: Yisheng Xie Date: Fri Jun 2 14:46:43 2017 -0700 mlock: fix mlock count can not decrease in race condition Kefeng reported that when running the follow test, the mlock count in meminfo will increase permanently: [1] testcase linux:~ # cat test_mlockal grep Mlocked /proc/meminfo for j in `seq 0 10` do for i in `seq 4 15` do ./p_mlockall >> log & done sleep 0.2 done # wait some time to let mlock counter decrease and 5s may not enough sleep 5 grep Mlocked /proc/meminfo linux:~ # cat p_mlockall.c #include #include #include #define SPACE_LEN 4096 int main(int argc, char ** argv) { int ret; void *adr = malloc(SPACE_LEN); if (!adr) return -1; ret = mlockall(MCL_CURRENT | MCL_FUTURE); printf("mlcokall ret = %d\n", ret); ret = munlockall(); printf("munlcokall ret = %d\n", ret); free(adr); return 0; } In __munlock_pagevec() we should decrement NR_MLOCK for each page where we clear the PageMlocked flag. Commit 1ebb7cc6a583 ("mm: munlock: batch NR_MLOCK zone state updates") has introduced a bug where we don't decrement NR_MLOCK for pages where we clear the flag, but fail to isolate them from the lru list (e.g. when the pages are on some other cpu's percpu pagevec). Since PageMlocked stays cleared, the NR_MLOCK accounting gets permanently disrupted by this. Fix it by counting the number of page whose PageMlock flag is cleared. Fixes: 1ebb7cc6a583 (" mm: munlock: batch NR_MLOCK zone state updates") Link: http://lkml.kernel.org/r/1495678405-54569-1-git-send-email-xieyisheng1@huawei.com Signed-off-by: Yisheng Xie Reported-by: Kefeng Wang Tested-by: Kefeng Wang Cc: Vlastimil Babka Cc: Joern Engel Cc: Mel Gorman Cc: Michel Lespinasse Cc: Hugh Dickins Cc: Rik van Riel Cc: Johannes Weiner Cc: Michal Hocko Cc: Xishi Qiu Cc: zhongjiang Cc: Hanjun Guo Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mlock.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 30809f559a0d348c2dfd7ab05e9a451e2384962e Author: Punit Agrawal Date: Fri Jun 2 14:46:40 2017 -0700 mm/migrate: fix refcount handling when !hugepage_migration_supported() On failing to migrate a page, soft_offline_huge_page() performs the necessary update to the hugepage ref-count. But when !hugepage_migration_supported() , unmap_and_move_hugepage() also decrements the page ref-count for the hugepage. The combined behaviour leaves the ref-count in an inconsistent state. This leads to soft lockups when running the overcommitted hugepage test from mce-tests suite. Soft offlining pfn 0x83ed600 at process virtual address 0x400000000000 soft offline: 0x83ed600: migration failed 1, type 1fffc00000008008 (uptodate|head) INFO: rcu_preempt detected stalls on CPUs/tasks: Tasks blocked on level-0 rcu_node (CPUs 0-7): P2715 (detected by 7, t=5254 jiffies, g=963, c=962, q=321) thugetlb_overco R running task 0 2715 2685 0x00000008 Call trace: dump_backtrace+0x0/0x268 show_stack+0x24/0x30 sched_show_task+0x134/0x180 rcu_print_detail_task_stall_rnp+0x54/0x7c rcu_check_callbacks+0xa74/0xb08 update_process_times+0x34/0x60 tick_sched_handle.isra.7+0x38/0x70 tick_sched_timer+0x4c/0x98 __hrtimer_run_queues+0xc0/0x300 hrtimer_interrupt+0xac/0x228 arch_timer_handler_phys+0x3c/0x50 handle_percpu_devid_irq+0x8c/0x290 generic_handle_irq+0x34/0x50 __handle_domain_irq+0x68/0xc0 gic_handle_irq+0x5c/0xb0 Address this by changing the putback_active_hugepage() in soft_offline_huge_page() to putback_movable_pages(). This only triggers on systems that enable memory failure handling (ARCH_SUPPORTS_MEMORY_FAILURE) but not hugepage migration (!ARCH_ENABLE_HUGEPAGE_MIGRATION). I imagine this wasn't triggered as there aren't many systems running this configuration. [akpm@linux-foundation.org: remove dead comment, per Naoya] Link: http://lkml.kernel.org/r/20170525135146.32011-1-punit.agrawal@arm.com Reported-by: Manoj Iyer Tested-by: Manoj Iyer Suggested-by: Naoya Horiguchi Signed-off-by: Punit Agrawal Cc: Joonsoo Kim Cc: Wanpeng Li Cc: Christoph Lameter Cc: Mel Gorman Cc: [3.14+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory-failure.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit e2093926a098a8ccf0f1d10f6df8dad452cb28d3 Author: Ross Zwisler Date: Fri Jun 2 14:46:37 2017 -0700 dax: fix race between colliding PMD & PTE entries We currently have two related PMD vs PTE races in the DAX code. These can both be easily triggered by having two threads reading and writing simultaneously to the same private mapping, with the key being that private mapping reads can be handled with PMDs but private mapping writes are always handled with PTEs so that we can COW. Here is the first race: CPU 0 CPU 1 (private mapping write) __handle_mm_fault() create_huge_pmd() - FALLBACK handle_pte_fault() passes check for pmd_devmap() (private mapping read) __handle_mm_fault() create_huge_pmd() dax_iomap_pmd_fault() inserts PMD dax_iomap_pte_fault() does a PTE fault, but we already have a DAX PMD installed in our page tables at this spot. Here's the second race: CPU 0 CPU 1 (private mapping read) __handle_mm_fault() passes check for pmd_none() create_huge_pmd() dax_iomap_pmd_fault() inserts PMD (private mapping write) __handle_mm_fault() create_huge_pmd() - FALLBACK (private mapping read) __handle_mm_fault() passes check for pmd_none() create_huge_pmd() handle_pte_fault() dax_iomap_pte_fault() inserts PTE dax_iomap_pmd_fault() inserts PMD, but we already have a PTE at this spot. The core of the issue is that while there is isolation between faults to the same range in the DAX fault handlers via our DAX entry locking, there is no isolation between faults in the code in mm/memory.c. This means for instance that this code in __handle_mm_fault() can run: if (pmd_none(*vmf.pmd) && transparent_hugepage_enabled(vma)) { ret = create_huge_pmd(&vmf); But by the time we actually get to run the fault handler called by create_huge_pmd(), the PMD is no longer pmd_none() because a racing PTE fault has installed a normal PMD here as a parent. This is the cause of the 2nd race. The first race is similar - there is the following check in handle_pte_fault(): } else { /* See comment in pte_alloc_one_map() */ if (pmd_devmap(*vmf->pmd) || pmd_trans_unstable(vmf->pmd)) return 0; So if a pmd_devmap() PMD (a DAX PMD) has been installed at vmf->pmd, we will bail and retry the fault. This is correct, but there is nothing preventing the PMD from being installed after this check but before we actually get to the DAX PTE fault handlers. In my testing these races result in the following types of errors: BUG: Bad rss-counter state mm:ffff8800a817d280 idx:1 val:1 BUG: non-zero nr_ptes on freeing mm: 15 Fix this issue by having the DAX fault handlers verify that it is safe to continue their fault after they have taken an entry lock to block other racing faults. [ross.zwisler@linux.intel.com: improve fix for colliding PMD & PTE entries] Link: http://lkml.kernel.org/r/20170526195932.32178-1-ross.zwisler@linux.intel.com Link: http://lkml.kernel.org/r/20170522215749.23516-2-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reported-by: Pawel Lebioda Reviewed-by: Jan Kara Cc: "Darrick J. Wong" Cc: Alexander Viro Cc: Christoph Hellwig Cc: Dan Williams Cc: Dave Hansen Cc: Matthew Wilcox Cc: "Kirill A . Shutemov" Cc: Pawel Lebioda Cc: Dave Jiang Cc: Xiong Zhou Cc: Eryu Guan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit d0f0931de936a0a468d7e59284d39581c16d3a73 Author: Ross Zwisler Date: Fri Jun 2 14:46:34 2017 -0700 mm: avoid spurious 'bad pmd' warning messages When the pmd_devmap() checks were added by 5c7fb56e5e3f ("mm, dax: dax-pmd vs thp-pmd vs hugetlbfs-pmd") to add better support for DAX huge pages, they were all added to the end of if() statements after existing pmd_trans_huge() checks. So, things like: - if (pmd_trans_huge(*pmd)) + if (pmd_trans_huge(*pmd) || pmd_devmap(*pmd)) When further checks were added after pmd_trans_unstable() checks by commit 7267ec008b5c ("mm: postpone page table allocation until we have page to map") they were also added at the end of the conditional: + if (pmd_trans_unstable(fe->pmd) || pmd_devmap(*fe->pmd)) This ordering is fine for pmd_trans_huge(), but doesn't work for pmd_trans_unstable(). This is because DAX huge pages trip the bad_pmd() check inside of pmd_none_or_trans_huge_or_clear_bad() (called by pmd_trans_unstable()), which prints out a warning and returns 1. So, we do end up doing the right thing, but only after spamming dmesg with suspicious looking messages: mm/pgtable-generic.c:39: bad pmd ffff8808daa49b88(84000001006000a5) Reorder these checks in a helper so that pmd_devmap() is checked first, avoiding the error messages, and add a comment explaining why the ordering is important. Fixes: commit 7267ec008b5c ("mm: postpone page table allocation until we have page to map") Link: http://lkml.kernel.org/r/20170522215749.23516-1-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Cc: Pawel Lebioda Cc: "Darrick J. Wong" Cc: Alexander Viro Cc: Christoph Hellwig Cc: Dan Williams Cc: Dave Hansen Cc: Matthew Wilcox Cc: "Kirill A . Shutemov" Cc: Dave Jiang Cc: Xiong Zhou Cc: Eryu Guan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) commit c288983dddf714216428774e022ad78f48dd8cb1 Author: Tetsuo Handa Date: Fri Jun 2 14:46:31 2017 -0700 mm/page_alloc.c: make sure OOM victim can try allocations with no watermarks once Roman Gushchin has reported that the OOM killer can trivially selects next OOM victim when a thread doing memory allocation from page fault path was selected as first OOM victim. allocate invoked oom-killer: gfp_mask=0x14280ca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), nodemask=(null), order=0, oom_score_adj=0 allocate cpuset=/ mems_allowed=0 CPU: 1 PID: 492 Comm: allocate Not tainted 4.12.0-rc1-mm1+ #181 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 Call Trace: oom_kill_process+0x219/0x3e0 out_of_memory+0x11d/0x480 __alloc_pages_slowpath+0xc84/0xd40 __alloc_pages_nodemask+0x245/0x260 alloc_pages_vma+0xa2/0x270 __handle_mm_fault+0xca9/0x10c0 handle_mm_fault+0xf3/0x210 __do_page_fault+0x240/0x4e0 trace_do_page_fault+0x37/0xe0 do_async_page_fault+0x19/0x70 async_page_fault+0x28/0x30 ... Out of memory: Kill process 492 (allocate) score 899 or sacrifice child Killed process 492 (allocate) total-vm:2052368kB, anon-rss:1894576kB, file-rss:4kB, shmem-rss:0kB allocate: page allocation failure: order:0, mode:0x14280ca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), nodemask=(null) allocate cpuset=/ mems_allowed=0 CPU: 1 PID: 492 Comm: allocate Not tainted 4.12.0-rc1-mm1+ #181 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 Call Trace: __alloc_pages_slowpath+0xd32/0xd40 __alloc_pages_nodemask+0x245/0x260 alloc_pages_vma+0xa2/0x270 __handle_mm_fault+0xca9/0x10c0 handle_mm_fault+0xf3/0x210 __do_page_fault+0x240/0x4e0 trace_do_page_fault+0x37/0xe0 do_async_page_fault+0x19/0x70 async_page_fault+0x28/0x30 ... oom_reaper: reaped process 492 (allocate), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB ... allocate invoked oom-killer: gfp_mask=0x0(), nodemask=(null), order=0, oom_score_adj=0 allocate cpuset=/ mems_allowed=0 CPU: 1 PID: 492 Comm: allocate Not tainted 4.12.0-rc1-mm1+ #181 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 Call Trace: oom_kill_process+0x219/0x3e0 out_of_memory+0x11d/0x480 pagefault_out_of_memory+0x68/0x80 mm_fault_error+0x8f/0x190 ? handle_mm_fault+0xf3/0x210 __do_page_fault+0x4b2/0x4e0 trace_do_page_fault+0x37/0xe0 do_async_page_fault+0x19/0x70 async_page_fault+0x28/0x30 ... Out of memory: Kill process 233 (firewalld) score 10 or sacrifice child Killed process 233 (firewalld) total-vm:246076kB, anon-rss:20956kB, file-rss:0kB, shmem-rss:0kB There is a race window that the OOM reaper completes reclaiming the first victim's memory while nothing but mutex_trylock() prevents the first victim from calling out_of_memory() from pagefault_out_of_memory() after memory allocation for page fault path failed due to being selected as an OOM victim. This is a side effect of commit 9a67f6488eca926f ("mm: consolidate GFP_NOFAIL checks in the allocator slowpath") because that commit silently changed the behavior from /* Avoid allocations with no watermarks from looping endlessly */ to /* * Give up allocations without trying memory reserves if selected * as an OOM victim */ in __alloc_pages_slowpath() by moving the location to check TIF_MEMDIE flag. I have noticed this change but I didn't post a patch because I thought it is an acceptable change other than noise by warn_alloc() because !__GFP_NOFAIL allocations are allowed to fail. But we overlooked that failing memory allocation from page fault path makes difference due to the race window explained above. While it might be possible to add a check to pagefault_out_of_memory() that prevents the first victim from calling out_of_memory() or remove out_of_memory() from pagefault_out_of_memory(), changing pagefault_out_of_memory() does not suppress noise by warn_alloc() when allocating thread was selected as an OOM victim. There is little point with printing similar backtraces and memory information from both out_of_memory() and warn_alloc(). Instead, if we guarantee that current thread can try allocations with no watermarks once when current thread looping inside __alloc_pages_slowpath() was selected as an OOM victim, we can follow "who can use memory reserves" rules and suppress noise by warn_alloc() and prevent memory allocations from page fault path from calling pagefault_out_of_memory(). If we take the comment literally, this patch would do - if (test_thread_flag(TIF_MEMDIE)) - goto nopage; + if (alloc_flags == ALLOC_NO_WATERMARKS || (gfp_mask & __GFP_NOMEMALLOC)) + goto nopage; because gfp_pfmemalloc_allowed() returns false if __GFP_NOMEMALLOC is given. But if I recall correctly (I couldn't find the message), the condition is meant to apply to only OOM victims despite the comment. Therefore, this patch preserves TIF_MEMDIE check. Fixes: 9a67f6488eca926f ("mm: consolidate GFP_NOFAIL checks in the allocator slowpath") Link: http://lkml.kernel.org/r/201705192112.IAF69238.OQOHSJLFOFFMtV@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Reported-by: Roman Gushchin Tested-by: Roman Gushchin Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Cc: [4.11] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ff5a20169b98d84ad8d7f99f27c5ebbb008204d6 Author: Nicolas Iooss Date: Fri Jun 2 14:46:28 2017 -0700 pcmcia: remove left-over %Z format Commit 5b5e0928f742 ("lib/vsprintf.c: remove %Z support") removed some usages of format %Z but forgot "%.2Zx". This makes clang 4.0 reports a -Wformat-extra-args warning because it does not know about %Z. Replace %Z with %z. Link: http://lkml.kernel.org/r/20170520090946.22562-1-nicolas.iooss_linux@m4x.org Signed-off-by: Nicolas Iooss Cc: Harald Welte Cc: Alexey Dobriyan Cc: [4.11+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/char/pcmcia/cm4040_cs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 478fe3037b2278d276d4cd9cd0ab06c4cb2e9b32 Author: Thomas Gleixner Date: Fri Jun 2 14:46:25 2017 -0700 slub/memcg: cure the brainless abuse of sysfs attributes memcg_propagate_slab_attrs() abuses the sysfs attribute file functions to propagate settings from the root kmem_cache to a newly created kmem_cache. It does that with: attr->show(root, buf); attr->store(new, buf, strlen(bug); Aside of being a lazy and absurd hackery this is broken because it does not check the return value of the show() function. Some of the show() functions return 0 w/o touching the buffer. That means in such a case the store function is called with the stale content of the previous show(). That causes nonsense like invoking kmem_cache_shrink() on a newly created kmem_cache. In the worst case it would cause handing in an uninitialized buffer. This should be rewritten proper by adding a propagate() callback to those slub_attributes which must be propagated and avoid that insane conversion to and from ASCII, but that's too large for a hot fix. Check at least the return value of the show() function, so calling store() with stale content is prevented. Steven said: "It can cause a deadlock with get_online_cpus() that has been uncovered by recent cpu hotplug and lockdep changes that Thomas and Peter have been doing. Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(cpu_hotplug.lock); lock(slab_mutex); lock(cpu_hotplug.lock); lock(slab_mutex); *** DEADLOCK ***" Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1705201244540.2255@nanos Signed-off-by: Thomas Gleixner Reported-by: Steven Rostedt Acked-by: David Rientjes Cc: Johannes Weiner Cc: Michal Hocko Cc: Peter Zijlstra Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Cc: Christoph Hellwig Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 57ddfdaa9a72fe726a44d26d99db31bc137dbeff Author: Florian Fainelli Date: Fri Jun 2 14:46:22 2017 -0700 initramfs: fix disabling of initramfs (and its compression) Commit db2aa7fd15e8 ("initramfs: allow again choice of the embedded initram compression algorithm") introduced the possibility to select the initramfs compression algorithm from Kconfig and while this is a nice feature it broke the use case described below. Here is what my build system does: - kernel is initially configured not to have an initramfs included - build the user space root file system - re-configure the kernel to have an initramfs included (CONFIG_INITRAMFS_SOURCE="/path/to/romfs") and set relevant CONFIG_INITRAMFS options, in my case, no compression option (CONFIG_INITRAMFS_COMPRESSION_NONE) - kernel is re-built with these options -> kernel+initramfs image is copied - kernel is re-built again without these options -> kernel image is copied Building a kernel without an initramfs means setting this option: CONFIG_INITRAMFS_SOURCE="" (and this one only) whereas building a kernel with an initramfs means setting these options: CONFIG_INITRAMFS_SOURCE="/home/fainelli/work/uclinux-rootfs/romfs /home/fainelli/work/uclinux-rootfs/misc/initramfs.dev" CONFIG_INITRAMFS_ROOT_UID=1000 CONFIG_INITRAMFS_ROOT_GID=1000 CONFIG_INITRAMFS_COMPRESSION_NONE=y CONFIG_INITRAMFS_COMPRESSION="" Commit db2aa7fd15e85 ("initramfs: allow again choice of the embedded initram compression algorithm") is problematic because CONFIG_INITRAMFS_COMPRESSION which is used to determine the initramfs_data.cpio extension/compression is a string, and due to how Kconfig works it will evaluate in order, how to assign it. Setting CONFIG_INITRAMFS_COMPRESSION_NONE with CONFIG_INITRAMFS_SOURCE="" cannot possibly work (because of the depends on INITRAMFS_SOURCE!="" imposed on CONFIG_INITRAMFS_COMPRESSION ) yet we still get CONFIG_INITRAMFS_COMPRESSION assigned to ".gz" because CONFIG_RD_GZIP=y is set in my kernel, even when there is no initramfs being built. So we basically end-up generating two initramfs_data.cpio* files, one without extension, and one with .gz. This causes usr/Makefile to track usr/initramfs_data.cpio.gz, and not usr/initramfs_data.cpio anymore, that is also largely problematic after 9e3596b0c6539e ("kbuild: initramfs cleanup, set target from Kconfig") because we used to track all possible initramfs_data files in the $(targets) variable before that commit. The end result is that the kernel with an initramfs clearly does not contain what we expect it to, it has a stale initramfs_data.cpio file built into it, and we keep re-generating an initramfs_data.cpio.gz file which is not the one that we want to include in the kernel image proper. The fix consists in hiding CONFIG_INITRAMFS_COMPRESSION when CONFIG_INITRAMFS_SOURCE="". This puts us back in a state to the pre-4.10 behavior where we can properly disable and re-enable initramfs within the same kernel .config file, and be in control of what CONFIG_INITRAMFS_COMPRESSION is set to. Fixes: db2aa7fd15e8 ("initramfs: allow again choice of the embedded initram compression algorithm") Fixes: 9e3596b0c653 ("kbuild: initramfs cleanup, set target from Kconfig") Link: http://lkml.kernel.org/r/20170521033337.6197-1-f.fainelli@gmail.com Signed-off-by: Florian Fainelli Acked-by: Nicholas Piggin Cc: P J P Cc: Paul Bolle Cc: Michal Marek Cc: Daniel Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds usr/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 4f4f2ba9c531b3d7cee293dd3654ba3b86e7d220 Author: Michal Hocko Date: Fri Jun 2 14:46:19 2017 -0700 mm: clarify why we want kmalloc before falling backto vmallock While converting drm_[cm]alloc* helpers to kvmalloc* variants Chris Wilson has wondered why we want to try kmalloc before vmalloc fallback even for larger allocations requests. Let's clarify that one larger physically contiguous block is less likely to fragment memory than many scattered pages which can prevent more large blocks from being created. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20170517080932.21423-1-mhocko@kernel.org Signed-off-by: Michal Hocko Suggested-by: Chris Wilson Reviewed-by: Chris Wilson Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/util.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 60b0a8c3d2480f3b57282b47b7cae7ee71c48635 Author: Matthias Kaehlcke Date: Fri Jun 2 14:46:16 2017 -0700 frv: declare jiffies to be located in the .data section Commit 7c30f352c852 ("jiffies.h: declare jiffies and jiffies_64 with ____cacheline_aligned_in_smp") removed a section specification from the jiffies declaration that caused conflicts on some platforms. Unfortunately this change broke the build for frv: kernel/built-in.o: In function `__do_softirq': (.text+0x6460): relocation truncated to fit: R_FRV_GPREL12 against symbol `jiffies' defined in *ABS* section in .tmp_vmlinux1 kernel/built-in.o: In function `__do_softirq': (.text+0x6574): relocation truncated to fit: R_FRV_GPREL12 against symbol `jiffies' defined in *ABS* section in .tmp_vmlinux1 kernel/built-in.o: In function `pwq_activate_delayed_work': workqueue.c:(.text+0x15b9c): relocation truncated to fit: R_FRV_GPREL12 against symbol `jiffies' defined in *ABS* section in .tmp_vmlinux1 ... Add __jiffy_arch_data to the declaration of jiffies and use it on frv to include the section specification. For all other platforms __jiffy_arch_data (currently) has no effect. Fixes: 7c30f352c852 ("jiffies.h: declare jiffies and jiffies_64 with ____cacheline_aligned_in_smp") Link: http://lkml.kernel.org/r/20170516221333.177280-1-mka@chromium.org Signed-off-by: Matthias Kaehlcke Reported-by: Guenter Roeck Tested-by: Guenter Roeck Reviewed-by: David Howells Cc: Sudip Mukherjee Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/frv/include/asm/timex.h | 6 ++++++ include/linux/jiffies.h | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) commit 1bde33e051233f0ed93a8bc67137016ab38c3d2d Author: Michal Hocko Date: Fri Jun 2 14:46:13 2017 -0700 include/linux/gfp.h: fix ___GFP_NOLOCKDEP value Igor Stoppa has noticed that __GFP_NOLOCKDEP can use a lower bit. At the time commit 7e7844226f10 ("lockdep: allow to disable reclaim lockup detection") was written we still had __GFP_OTHER_NODE but I have removed it in commit 41b6167e8f74 ("mm: get rid of __GFP_OTHER_NODE") and forgot to lower the bit value. The current value is outside of __GFP_BITS_SHIFT so it cannot be used actually. Fixes: 7e7844226f10 ("lockdep: allow to disable reclaim lockup detection") Signed-off-by: Michal Hocko Reported-by: Igor Stoppa Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/gfp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7306c3436e9c8e584a4b9fad5f3dc91be2a6076 Author: Andrea Arcangeli Date: Fri Jun 2 14:46:11 2017 -0700 ksm: prevent crash after write_protect_page fails "err" needs to be left set to -EFAULT if split_huge_page succeeds. Otherwise if "err" gets clobbered with zero and write_protect_page fails, try_to_merge_one_page() will succeed instead of returning -EFAULT and then try_to_merge_with_ksm_page() will continue thinking kpage is a PageKsm when in fact it's still an anonymous page. Eventually it'll crash in page_add_anon_rmap. This has been reproduced on Fedora25 kernel but I can reproduce with upstream too. The bug was introduced in commit f765f540598a ("ksm: prepare to new THP semantics") introduced in v4.5. page:fffff67546ce1cc0 count:4 mapcount:2 mapping:ffffa094551e36e1 index:0x7f0f46673 flags: 0x2ffffc0004007c(referenced|uptodate|dirty|lru|active|swapbacked) page dumped because: VM_BUG_ON_PAGE(!PageLocked(page)) page->mem_cgroup:ffffa09674bf0000 ------------[ cut here ]------------ kernel BUG at mm/rmap.c:1222! CPU: 1 PID: 76 Comm: ksmd Not tainted 4.9.3-200.fc25.x86_64 #1 RIP: do_page_add_anon_rmap+0x1c4/0x240 Call Trace: page_add_anon_rmap+0x18/0x20 try_to_merge_with_ksm_page+0x50b/0x780 ksm_scan_thread+0x1211/0x1410 ? prepare_to_wait_event+0x100/0x100 ? try_to_merge_with_ksm_page+0x780/0x780 kthread+0xd9/0xf0 ? kthread_park+0x60/0x60 ret_from_fork+0x25/0x30 Fixes: f765f54059 ("ksm: prepare to new THP semantics") Link: http://lkml.kernel.org/r/20170513131040.21732-1-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Reported-by: Federico Simoncelli Acked-by: Kirill A. Shutemov Cc: Hugh Dickins Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/ksm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 60319130254084b337e02439d3b4ec301b6328bb Merge: 5ed02db 878d8db0 2ea6532 0de0e19 Author: Rafael J. Wysocki Date: Sat Jun 3 00:03:29 2017 +0200 Merge branches 'acpi-button', 'acpica' and 'acpi-sysfs' * acpi-button: Revert "ACPI / button: Change default behavior to lid_init_state=open" * acpica: ACPICA: Tables: Fix regression introduced by a too early mechanism enabling * acpi-sysfs: ACPI / sysfs: fix acpi_get_table() leak / acpi-sysfs denial of service commit bb5710e72c217e5bbdf0969a2fd84f5f5ad7fc2b Merge: 5ed02db 7575f82 Author: Rafael J. Wysocki Date: Sat Jun 3 00:01:45 2017 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: cpufreq: kirkwood-cpufreq:- Handle return value of clk_prepare_enable() cpufreq: cpufreq_register_driver() should return -ENODEV if init fails commit e6e6d074369c839e84071c3b056adf20ead8da6e Merge: b939c51 63db7c8 Author: Linus Torvalds Date: Fri Jun 2 12:29:03 2017 -0700 Merge tag 'xfs-4.12-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull XFS fix from Darrick Wong: "I've one more bugfix for you for 4.12-rc4: Fix an unmount hang due to a race in io buffer accounting" * tag 'xfs-4.12-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: use ->b_state to fix buffer I/O accounting release race commit b939c51445f0542e80a8f910014c418d04b5de6e Merge: 65d0332 cb7cf77 Author: Linus Torvalds Date: Fri Jun 2 12:06:27 2017 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: "ACPI-related fixes for arm64: - GICC MADT entry validity check fix - Skip IRQ registration with pmu=off in an ACPI guest - struct acpi_pci_root_ops freeing on error path" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: ARM64/ACPI: Fix BAD_MADT_GICC_ENTRY() macro implementation drivers/perf: arm_pmu_acpi: avoid perf IRQ init when guest PMU is off ARM64: PCI: Fix struct acpi_pci_root_ops allocation failure path commit 65d03328aace31043be98f807f6e20332cdb19c8 Merge: 60c42a3 6ac5695 Author: Linus Torvalds Date: Fri Jun 2 12:03:07 2017 -0700 Merge tag 'ceph-for-4.12-rc4' of git://github.com/ceph/ceph-client Pull ceph fix from Ilya Dryomov: "A small fix for rbd FALLOC_FL_ZERO_RANGE/PUNCH_HOLE handling breakage introduced in -rc1" * tag 'ceph-for-4.12-rc4' of git://github.com/ceph/ceph-client: rbd: implement REQ_OP_WRITE_ZEROES commit e0f8e8cf3bf9305f36155a5ac6e16b3b910e6cec Author: Varun Prakash Date: Sat May 27 20:22:51 2017 +0530 scsi: cxgb4i: libcxgbi: in error case RST tcp conn If logout response is not received and ->ep_disconnect() is called then close tcp conn by RST instead of FIN to cleanup conn resources immediately. Also move ->csk_push_tx_frames() above 'done:' to avoid calling ->csk_push_tx_frames() in error cases. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 1 - drivers/scsi/cxgbi/libcxgbi.c | 29 ++++++++++++++++++++++------- drivers/scsi/cxgbi/libcxgbi.h | 1 + 3 files changed, 23 insertions(+), 8 deletions(-) commit 60c42a31dc0fd307098486221dcb43b59057110f Merge: 6f37fa4 ff0361b Author: Linus Torvalds Date: Fri Jun 2 11:50:37 2017 -0700 Merge tag 'for-4.12/dm-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - a DM verity fix for a mode when no salt is used - a fix to DM to account for the possibility that PREFLUSH or FUA are used without the SYNC flag if the underlying storage doesn't have a volatile write-cache - a DM ioctl memory allocation flag fix to use __GFP_HIGH to allow emergency forward progress (by using memory reserves as last resort) - a small DM integrity cleanup to use kvmalloc() instead of duplicating the same * tag 'for-4.12/dm-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm: make flush bios explicitly sync dm ioctl: restore __GFP_HIGH in copy_params() dm integrity: use kvmalloc() instead of dm_integrity_kvmalloc() dm verity: fix no salt use case commit 6f37fa4364a1099b59f73d1a71538895fd2ef975 Merge: bb32985 5a8948f Author: Linus Torvalds Date: Fri Jun 2 11:47:24 2017 -0700 Merge tag 'md/4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD fixes from Shaohua Li: "Several patches for MD. One notable is making flush bios sync, others fix small issues" * tag 'md/4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: md: Make flush bios explicitely sync md: report sector of stripes with check mismatches md: uuid debug statement now in processor byte order. md-cluster: fix potential lock issue in add_new_disk commit bb329859effa06736c39adf6ce622e86e38fc274 Merge: 4635694 b425e50 Author: Linus Torvalds Date: Fri Jun 2 11:44:46 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A set of fixes that should go into the next -rc. This contains: - A use-after-free in the request_list exit for the legacy IO path, from Bart. - A fix for CFQ, fixing a recent regression with the conversion to higher resolution timing for iops mode. From Hou Tao. - A single fix for nbd, split in two patches, fixing a leak of a data structure. - A regression fix from Keith, ensuring that callers of blk_mq_update_nr_hw_queues() hold the right lock" * 'for-linus' of git://git.kernel.dk/linux-block: block: Avoid that blk_exit_rl() triggers a use-after-free cfq-iosched: fix the delay of cfq_group's vdisktime under iops mode blk-mq: Take tagset lock when updating hw queues nbd: don't leak nbd_config nbd: nbd_reset() call in nbd_dev_add() is redundant commit 46356945fc2bc932dd224af60c12ece2672479be Merge: c531577 28904ee Author: Linus Torvalds Date: Fri Jun 2 11:32:38 2017 -0700 Merge tag 'drm-dp-quirk-for-v4.12-rc4' of git://people.freedesktop.org/~airlied/linux Pull drm displayport quirk support: "DP quirk for usb c dongles. As mentioned I have a separate request for fixing a regression, but also keeping the broken hw working, for certain USB-C DP adapters they require a minimised n/m parameters, but an attempt to do this generically has failed, we need to quirk these specific adapters. However doing it generically regressed some eDP panels. This pull adds the infrastructure and a quirk for the adapter" * tag 'drm-dp-quirk-for-v4.12-rc4' of git://people.freedesktop.org/~airlied/linux: drm/i915: Detect USB-C specific dongles before reducing M and N drm/dp: start a DPCD based DP sink/branch device quirk database drm/i915: use drm DP helper to read DPCD desc drm/dp: add helper for reading DP sink/branch device desc from DPCD commit f0c3192ceee3c16154e70dfb373f66ed86c6fea9 Author: Michael S. Tsirkin Date: Fri Jun 2 17:54:33 2017 +0300 virtio_net: lower limit on buffer size commit d85b758f72b0 ("virtio_net: fix support for small rings") was supposed to increase the buffer size for small rings but had an unintentional side effect of decreasing it for large rings. This seems to break some setups - it's not yet clear why, but increasing buffer size back to what it was before helps. Fixes: d85b758f72b0 ("virtio_net: fix support for small rings") Reported-by: Mikulas Patocka Reported-by: "J. Bruce Fields" Tested-by: Mikulas Patocka Tested-by: "J. Bruce Fields" Signed-off-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/virtio_net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4bd7ef0b033721b659b9357057e76d1ced95c1da Author: Chopra, Manish Date: Fri Jun 2 06:52:54 2017 -0700 qlcnic: Fix tunnel offload for 82xx adapters Qlogic's 82xx series adapter doesn't support tunnel offloads, driver incorrectly assumes that it is supported and causes firmware hang while running tunnel IO. This patch fixes this by not advertising tunnel offloads for 82xx adapters. Signed-off-by: Manish Chopra Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 26 ++++++++++++++++++++-- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 2 ++ drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 2 ++ .../ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 2 ++ 4 files changed, 30 insertions(+), 2 deletions(-) commit a53cb29b0af346af44e4abf13d7e59f807fba690 Author: Mark Bloch Date: Fri Jun 2 03:24:08 2017 +0300 vxlan: fix use-after-free on deletion Adding a vxlan interface to a socket isn't symmetrical, while adding is done in vxlan_open() the deletion is done in vxlan_dellink(). This can cause a use-after-free error when we close the vxlan interface before deleting it. We add vxlan_vs_del_dev() to match vxlan_vs_add_dev() and call it from vxlan_stop() to match the call from vxlan_open(). Fixes: 56ef9c909b40 ("vxlan: Move socket initialization to within rtnl scope") Acked-by: Jiri Benc Tested-by: Roi Dayan Signed-off-by: Mark Bloch Acked-by: Roopa Prabhu Signed-off-by: David S. Miller drivers/net/vxlan.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 78b07ac1e4c8acc9daf6b7f7b579300328673640 Author: Thomas Falcon Date: Thu Jun 1 15:32:34 2017 -0500 ibmvnic: Remove module author mailing address The original author left the project and so far has not responded to emails sent to the listed address. Signed-off-by: John Allen Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77032732d0e89b83c3bca75b857a1f63e9efb44b Author: Thor Thayer Date: Wed May 31 14:28:47 2017 -0500 net: ethernet: stmmac: Fix altr_tse_pcs SGMII Initialization Fix NETDEV WATCHDOG timeout on startup by adding missing register writes that properly setup SGMII. Signed-off-by: Thor Thayer Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 44abafc4cc094214a99f860f778c48ecb23422fc Author: Yuchung Cheng Date: Wed May 31 11:21:27 2017 -0700 tcp: disallow cwnd undo when switching congestion control When the sender switches its congestion control during loss recovery, if the recovery is spurious then it may incorrectly revert cwnd and ssthresh to the older values set by a previous congestion control. Consider a congestion control (like BBR) that does not use ssthresh and keeps it infinite: the connection may incorrectly revert cwnd to an infinite value when switching from BBR to another congestion control. This patch fixes it by disallowing such cwnd undo operation upon switching congestion control. Note that undo_marker is not reset s.t. the packets that were incorrectly marked lost would be corrected. We only avoid undoing the cwnd in tcp_undo_cwnd_reduction(). Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_cong.c | 1 + 1 file changed, 1 insertion(+) commit e7519f9926f1d0d11c776eb0475eb098c7760f68 Author: Ganesh Goudar Date: Wed May 31 18:26:28 2017 +0530 cxgb4: avoid enabling napi twice to the same queue Take uld mutex to avoid race between cxgb_up() and cxgb4_register_uld() to enable napi for the same uld queue. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6e80ac5cc992ab6256c3dae87f7e57db15e1a58c Author: Ben Hutchings Date: Wed May 31 13:15:41 2017 +0100 ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt() xfrm6_find_1stfragopt() may now return an error code and we must not treat it as a length. Fixes: 2423496af35d ("ipv6: Prevent overrun when parsing v6 header options") Signed-off-by: Ben Hutchings Acked-by: Craig Gallek Signed-off-by: David S. Miller net/ipv6/xfrm6_mode_ro.c | 2 ++ net/ipv6/xfrm6_mode_transport.c | 2 ++ 2 files changed, 4 insertions(+) commit c531577bcdac51225f50033e0c89644873f4dc6d Merge: f8e72db d2c3b14 Author: Linus Torvalds Date: Fri Jun 2 09:40:47 2017 -0700 Merge tag 'sound-4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This contains the fixes for a few reported regression for HD-audio and USB-audio. All small, trivial, and boring" * tag 'sound-4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix applying MSI dual-codec mobo quirk ALSA: usb: Avoid VLA in mixer_us16x08.c ALSA: usb: Fix a typo in Tascam US-16x08 mixer element Revert "ALSA: usb-audio: purge needless variable length array" commit f8e72db3452227e49fde563a528eb875b6c3c9b4 Merge: 6df62e7 ebcdaee Author: Linus Torvalds Date: Fri Jun 2 09:26:42 2017 -0700 Merge tag 'dmaengine-fix-4.12-rc4' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "Here is the dmaengine fixes request for 4.12. Fixes bunch of issues in the driver, npthing exciting though.. - mv_xor_v2 driver fixes for handling descriptors, tx_submit implementation, removing interrupt coalescing and setting DMA mask properly - fix usb-dmac DMAOR AE bit definition - fix ep93xx start buffer from BASE0 and not drain the transfers in terminate_all - fix rcar-dmac to use right descriptor pointer for residue calculation - pl330 fix warn for irq freeup" * tag 'dmaengine-fix-4.12-rc4' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: pl330: fix warning in pl330_remove rcar-dmac: fixup descriptor pointer for descriptor mode dmaengine: ep93xx: Don't drain the transfers in terminate_all() dmaengine: ep93xx: Always start from BASE0 dmaengine: usb-dmac: Fix DMAOR AE bit definition dmaengine: mv_xor_v2: set DMA mask to 40 bits dmaengine: mv_xor_v2: remove interrupt coalescing dmaengine: mv_xor_v2: fix tx_submit() implementation dmaengine: mv_xor_v2: enable XOR engine after its configuration dmaengine: mv_xor_v2: do not use descriptors not acked by async_tx dmaengine: mv_xor_v2: properly handle wrapping in the array of HW descriptors dmaengine: mv_xor_v2: handle mv_xor_v2_prep_sw_desc() error properly commit 6df62e7916befd2c04ac63180b4ddeae2f7639f2 Merge: 035f145 715e944 Author: Linus Torvalds Date: Fri Jun 2 09:23:56 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fixes from Jiri Kosina: - corner-case oops fixes for Asus and Wacom drivers from Carlo Caione and Jason Gerecke - power management fix (reported on SIS0817 touchscreen) for i2c-hid devices from Hans de Goede - device-id-specific fixes and quirks from Hans de Goede, Diego Elio Pettenò and Che-Liang Chiou * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: asus: Stop underlying hardware on remove HID: i2c: Call acpi_device_fix_up_power for ACPI-enumerated devices HID: asus: Add support for T100 keyboard HID: elecom: extend to fix the descriptor for DEFT trackballs HID: magicmouse: Set multi-touch keybits for Magic Mouse HID: wacom: Have wacom_tpc_irq guard against possible NULL dereference commit 035f1456f9ed256cd1a92ae1b81cc24413359e61 Merge: f2a025d 5720acf Author: Linus Torvalds Date: Fri Jun 2 08:59:17 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching Pull livepatching fix from Jiri Kosina: "Kconfig dependency fix for livepatching infrastructure from Miroslav Benes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching: livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS commit f2a025defd804be938f8acffe62e4801a3ed1601 Merge: f56f88e c08d517 Author: Linus Torvalds Date: Fri Jun 2 08:53:42 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Misc fixes: - revert a broken PAT commit that broke a number of systems - fix two preemptability warnings/bugs that can trigger under certain circumstances, in the debug code and in the microcode loader" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "x86/PAT: Fix Xorg regression on CPUs that don't support PAT" x86/debug/32: Convert a smp_processor_id() call to raw to avoid DEBUG_PREEMPT warning x86/microcode/AMD: Change load_microcode_amd()'s param to bool to fix preemptibility bug commit f56f88ee3fa1c3080f6ba122a597e75f0d5ab969 Merge: 3b1e342 7425826 Author: Linus Torvalds Date: Fri Jun 2 08:51:53 2017 -0700 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Ingo Molnar: "Misc fixes: - three boot crash fixes for uncommon configurations - silence a boot warning under virtualization - plus a GCC 7 related (harmless) build warning fix" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/bgrt: Skip efi_bgrt_init() in case of non-EFI boot x86/efi: Correct EFI identity mapping under 'efi=old_map' when KASLR is enabled x86/efi: Disable runtime services on kexec kernel if booted with efi=old_map efi: Remove duplicate 'const' specifiers efi: Don't issue error message when booted under Xen commit 75fb636324a839c2c31be9f81644034c6142e469 Author: Hans de Goede Date: Thu Jun 1 13:54:30 2017 +0200 drm: Fix oops + Xserver hang when unplugging USB drm devices commit a39be606f99d ("drm: Do a full device unregister when unplugging") causes backtraces like this one when unplugging an usb drm device while it is in use: usb 2-3: USB disconnect, device number 25 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 242 at drivers/gpu/drm/drm_mode_config.c:424 drm_mode_config_cleanup+0x220/0x280 [drm] ... RIP: 0010:drm_mode_config_cleanup+0x220/0x280 [drm] ... Call Trace: gm12u320_modeset_cleanup+0xe/0x10 [gm12u320] gm12u320_driver_unload+0x35/0x70 [gm12u320] drm_dev_unregister+0x3c/0xe0 [drm] drm_unplug_dev+0x12/0x60 [drm] gm12u320_usb_disconnect+0x36/0x40 [gm12u320] usb_unbind_interface+0x72/0x280 device_release_driver_internal+0x158/0x210 device_release_driver+0x12/0x20 bus_remove_device+0x104/0x180 device_del+0x1d2/0x350 usb_disable_device+0x9f/0x270 usb_disconnect+0xc6/0x260 ... [drm:drm_mode_config_cleanup [drm]] *ERROR* connector Unknown-1 leaked! ------------[ cut here ]------------ WARNING: CPU: 0 PID: 242 at drivers/gpu/drm/drm_mode_config.c:458 drm_mode_config_cleanup+0x268/0x280 [drm] ... ---[ end trace 80df975dae439ed6 ]--- general protection fault: 0000 [#1] SMP ... Call Trace: ? __switch_to+0x225/0x450 drm_mode_rmfb_work_fn+0x55/0x70 [drm] process_one_work+0x193/0x3c0 worker_thread+0x4a/0x3a0 ... RIP: drm_framebuffer_remove+0x62/0x3f0 [drm] RSP: ffffb776c39dfd98 ---[ end trace 80df975dae439ed7 ]--- After which the system is unusable this is caused by drm_dev_unregister getting called immediately on unplug, which calls the drivers unload function which calls drm_mode_config_cleanup which removes the framebuffer object while userspace is still holding a reference to it. Reverting commit a39be606f99d ("drm: Do a full device unregister when unplugging") leads to the following oops on unplug instead, when userspace closes the last fd referencing the drm_dev: sysfs group 'power' not found for kobject 'card1-Unknown-1' ------------[ cut here ]------------ WARNING: CPU: 0 PID: 2459 at fs/sysfs/group.c:237 sysfs_remove_group+0x80/0x90 ... RIP: 0010:sysfs_remove_group+0x80/0x90 ... Call Trace: dpm_sysfs_remove+0x57/0x60 device_del+0xfd/0x350 device_unregister+0x1a/0x60 drm_sysfs_connector_remove+0x39/0x50 [drm] drm_connector_unregister+0x5a/0x70 [drm] drm_connector_unregister_all+0x45/0xa0 [drm] drm_modeset_unregister_all+0x12/0x30 [drm] drm_dev_unregister+0xca/0xe0 [drm] drm_put_dev+0x32/0x60 [drm] drm_release+0x2f3/0x380 [drm] __fput+0xdf/0x1e0 ... ---[ end trace ecfb91ac85688bbe ]--- BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8 IP: down_write+0x1f/0x40 ... Call Trace: debugfs_remove_recursive+0x55/0x1b0 drm_debugfs_connector_remove+0x21/0x40 [drm] drm_connector_unregister+0x62/0x70 [drm] drm_connector_unregister_all+0x45/0xa0 [drm] drm_modeset_unregister_all+0x12/0x30 [drm] drm_dev_unregister+0xca/0xe0 [drm] drm_put_dev+0x32/0x60 [drm] drm_release+0x2f3/0x380 [drm] __fput+0xdf/0x1e0 ... ---[ end trace ecfb91ac85688bbf ]--- This is caused by the revert moving back to drm_unplug_dev calling drm_minor_unregister which does: device_del(minor->kdev); dev_set_drvdata(minor->kdev, NULL); /* safety belt */ drm_debugfs_cleanup(minor); Causing the sysfs entries to already be removed even though we still have references to them in e.g. drm_connector. Note we must call drm_minor_unregister to notify userspace of the unplug of the device, so calling drm_dev_unregister is not completely wrong the problem is that drm_dev_unregister does too much. This commit fixes drm_unplug_dev by not only reverting commit a39be606f99d ("drm: Do a full device unregister when unplugging") but by also adding a call to drm_modeset_unregister_all before the drm_minor_unregister calls to make sure all sysfs entries are removed before calling device_del(minor->kdev) thereby also fixing the second set of oopses caused by just reverting the commit. Fixes: a39be606f99d ("drm: Do a full device unregister when unplugging") Cc: stable@vger.kernel.org Cc: Chris Wilson Cc: Jeffy Cc: Marco Diego Aurélio Mesquita Reported-by: Marco Diego Aurélio Mesquita Signed-off-by: Hans de Goede Reviewed-by: Chris Wilson Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170601115430.4113-1-hdegoede@redhat.com drivers/gpu/drm/drm_drv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 13fb6c2c7fe10ce39a5549c268e35341d83f2b3d Merge: ac2629a e165bc0 Author: David S. Miller Date: Fri Jun 2 10:37:11 2017 -0400 Merge tag 'mac80211-for-davem-2017-06-02' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Just two fixes: * fix the per-CPU drop counters to not be added to the rx_packets counter, but really the drop counter * fix TX aggregation start/stop callback races by setting bits instead of allocating and queueing an skb ==================== Signed-off-by: David S. Miller commit ac2629a4797fdc839f7a4775cc141e6f53e064cf Author: Florian Fainelli Date: Thu Jun 1 19:53:04 2017 -0700 net: dsa: Move dsa_switch_{suspend,resume} out of legacy.c dsa_switch_suspend() and dsa_switch_resume() are functions that belong in net/dsa/dsa.c and are not part of the legacy platform support code. Fixes: a6a71f19fe5e ("net: dsa: isolate legacy code") Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/dsa.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ net/dsa/legacy.c | 47 ----------------------------------------------- 2 files changed, 47 insertions(+), 47 deletions(-) commit d31353cd753c443ace5723d6878a39f393a0c136 Author: Florian Fainelli Date: Thu Jun 1 18:02:39 2017 -0700 net: systemport: Fix missing Wake-on-LAN interrupt for SYSTEMPORT Lite On SYSTEMPORT Lite, since we have the main interrupt source in the first cell, the second cell is the Wake-on-LAN interrupt, yet the code was not properly updated to fetch the second cell, and instead looked at the third and non-existing cell for Wake-on-LAN. Fixes: 44a4524c54af ("net: systemport: Add support for SYSTEMPORT Lite") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 918c7b062a0f9198d9503cfece0210c1743c0f88 Author: Andi Kleen Date: Mon May 22 18:00:16 2017 -0700 perf stat: Only print NMI watchdog hint when enabled Only print the NMI watchdog hint when that watchdog it actually enabled. This avoids printing these unnecessarily. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/n/tip-lnw7edxnqsphkmeew857wz1i@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cb7cf772d83d2d4e6995c5bb9e0fb59aea8f7080 Author: Lorenzo Pieralisi Date: Fri May 26 17:40:02 2017 +0100 ARM64/ACPI: Fix BAD_MADT_GICC_ENTRY() macro implementation The BAD_MADT_GICC_ENTRY() macro checks if a GICC MADT entry passes muster from an ACPI specification standpoint. Current macro detects the MADT GICC entry length through ACPI firmware version (it changed from 76 to 80 bytes in the transition from ACPI 5.1 to ACPI 6.0 specification) but always uses (erroneously) the ACPICA (latest) struct (ie struct acpi_madt_generic_interrupt - that is 80-bytes long) length to check if the current GICC entry memory record exceeds the MADT table end in memory as defined by the MADT table header itself, which may result in false negatives depending on the ACPI firmware version and how the MADT entries are laid out in memory (ie on ACPI 5.1 firmware MADT GICC entries are 76 bytes long, so by adding 80 to a GICC entry start address in memory the resulting address may well be past the actual MADT end, triggering a false negative). Fix the BAD_MADT_GICC_ENTRY() macro by reshuffling the condition checks and update them to always use the firmware version specific MADT GICC entry length in order to carry out boundary checks. Fixes: b6cfb277378e ("ACPI / ARM64: add BAD_MADT_GICC_ENTRY() macro") Reported-by: Julien Grall Acked-by: Will Deacon Acked-by: Marc Zyngier Signed-off-by: Lorenzo Pieralisi Cc: Julien Grall Cc: Hanjun Guo Cc: Al Stone Signed-off-by: Catalin Marinas arch/arm64/include/asm/acpi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e385050873d1e19e40481d8cd868c9f60ebe46ac Author: Harald Freudenberger Date: Wed May 24 10:26:29 2017 +0200 s390/zcrypt: Fix blocking queue device after unbind/bind. When the association between a queue device and the driver is released via unbind and later re-associated the queue device was not operational any more. Reason was a wrong administration of the card/queue lists within the ap device driver. This patch introduces revised card/queue list handling within the ap device driver: when an ap device is detected it is initial not added to the card/queue list any more. With driver probe the card device is added to the card list/the queue device is added to the queue list within a card. With driver remove the device is removed from the card/queue list. Additionally there are some situations within the ap device live where the lists need update upon card/queue device release (for example device hot unplug or suspend/resume). Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/ap_bus.c | 38 ++++++++++++++++++++++++-------------- drivers/s390/crypto/ap_card.c | 9 ++++++++- drivers/s390/crypto/ap_queue.c | 9 ++++++++- 3 files changed, 40 insertions(+), 16 deletions(-) commit 715e944f8a7a1059db5d61ebf197e6f348d747e2 Author: Carlo Caione Date: Tue May 30 22:39:46 2017 +0200 HID: asus: Stop underlying hardware on remove We are missing a call to hid_hw_stop() on the remove hook. Among other things this is causing an Oops when (re-)starting GNOME / upowerd / ... after the module has been already rmmod-ed. Signed-off-by: Carlo Caione Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-asus.c | 2 ++ 1 file changed, 2 insertions(+) commit afbbc7913a288c29616bd31ae612548f6475151a Author: Yoshihiro Shimoda Date: Wed Apr 26 20:50:10 2017 +0900 usb: gadget: udc: renesas_usb3: Fix PN_INT_ENA disabling timing The PN_INT_ENA register should be used after usb3_pn_change() is called. So, this patch moves the access from renesas_usb3_stop_controller() to usb3_disable_pipe_n(). Fixes: 746bfe63bba3 ("usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller") Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/renesas_usb3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 940f538a100c84c6e72813e4ac88bd1753a86945 Author: Yoshihiro Shimoda Date: Wed Apr 26 20:50:09 2017 +0900 usb: gadget: udc: renesas_usb3: lock for PN_ registers access This controller disallows to change the PIPE until reading/writing a packet finishes. However. the previous code is not enough to hold the lock in some functions. So, this patch fixes it. Fixes: 746bfe63bba3 ("usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller") Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/renesas_usb3.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit 067d6fdc558d2c43f0bfdc7af99630dd5eb08dc5 Author: Yoshihiro Shimoda Date: Wed Apr 26 20:50:08 2017 +0900 usb: gadget: udc: renesas_usb3: fix deadlock by spinlock This patch fixes an issue that this driver is possible to cause deadlock by double-spinclocked in renesas_usb3_stop_controller(). So, this patch removes spinlock API calling in renesas_usb3_stop(). (In other words, the previous code had a redundant lock.) Fixes: 746bfe63bba3 ("usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller") Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/renesas_usb3.c | 3 --- 1 file changed, 3 deletions(-) commit cdc876877ebc3f0677b267756d4564e2a429e730 Author: Yoshihiro Shimoda Date: Wed Apr 26 20:50:07 2017 +0900 usb: gadget: udc: renesas_usb3: fix pm_runtime functions calling This patch fixes an issue that this driver is possible to access the registers before pm_runtime_get_sync() if a gadget driver is installed first. After that, oops happens on R-Car Gen3 environment. To avoid it, this patch changes the pm_runtime call timing from probe/remove to udc_start/udc_stop. Fixes: 746bfe63bba3 ("usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller") Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/renesas_usb3.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit dc9217b69dd6089dcfeb86ed4b3c671504326087 Author: Thinh Nguyen Date: Thu May 11 17:26:48 2017 -0700 usb: gadget: f_mass_storage: Serialize wake and sleep execution f_mass_storage has a memorry barrier issue with the sleep and wake functions that can cause a deadlock. This results in intermittent hangs during MSC file transfer. The host will reset the device after receiving no response to resume the transfer. This issue is seen when dwc3 is processing 2 transfer-in-progress events at the same time, invoking completion handlers for CSW and CBW. Also this issue occurs depending on the system timing and latency. To increase the chance to hit this issue, you can force dwc3 driver to wait and process those 2 events at once by adding a small delay (~100us) in dwc3_check_event_buf() whenever the request is for CSW and read the event count again. Avoid debugging with printk and ftrace as extra delays and memory barrier will mask this issue. Scenario which can lead to failure: ----------------------------------- 1) The main thread sleeps and waits for the next command in get_next_command(). 2) bulk_in_complete() wakes up main thread for CSW. 3) bulk_out_complete() tries to wake up the running main thread for CBW. 4) thread_wakeup_needed is not loaded with correct value in sleep_thread(). 5) Main thread goes to sleep again. The pattern is shown below. Note the 2 critical variables. * common->thread_wakeup_needed * bh->state CPU 0 (sleep_thread) CPU 1 (wakeup_thread) ============================== =============================== bh->state = BH_STATE_FULL; smp_wmb(); thread_wakeup_needed = 0; thread_wakeup_needed = 1; smp_rmb(); if (bh->state != BH_STATE_FULL) sleep again ... As pointed out by Alan Stern, this is an R-pattern issue. The issue can be seen when there are two wakeups in quick succession. The thread_wakeup_needed can be overwritten in sleep_thread, and the read of the bh->state maybe reordered before the write to thread_wakeup_needed. This patch applies full memory barrier smp_mb() in both sleep_thread() and wakeup_thread() to ensure the order which the thread_wakeup_needed and bh->state are written and loaded. However, a better solution in the future would be to use wait_queue method that takes care of managing memory barrier between waker and waiter. Cc: Acked-by: Alan Stern Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_mass_storage.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 55b644fd2431cfd28d04cc28f092d49e7bea3433 Author: Martin Blumenstingl Date: Sat May 6 19:37:45 2017 +0200 usb: dwc2: add support for the DWC2 controller on Meson8 SoCs USB support in the Meson8 SoCs is provided by a DWC2 controller which works with the same settings as Meson8b and GXBB. Using the generic "snps,dwc2" binding results in an endless stream of "Overcurrent change detected" messages. Acked-by: Rob Herring Signed-off-by: Martin Blumenstingl Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/dwc2.txt | 1 + drivers/usb/dwc2/params.c | 2 ++ 2 files changed, 3 insertions(+) commit ebcdaee4cebb3a8d0d702ab5e9392373672ec1de Author: Jean-Philippe Brucker Date: Thu Jun 1 19:22:01 2017 +0100 dmaengine: pl330: fix warning in pl330_remove When removing a device with less than 9 IRQs (AMBA_NR_IRQS), we'll get a big WARN_ON from devres.c because pl330_remove calls devm_free_irqs for unallocated irqs. Similarly to pl330_probe, check that IRQ number is present before calling devm_free_irq. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Vinod Koul drivers/dma/pl330.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c4beedb8a914af9c8c1b6e67c753adf411e05160 Author: Andi Shyti Date: Thu Jun 1 22:05:40 2017 -0700 Input: tm2-touchkey - use LEN_ON as boolean value instead of LED_FULL Commit 4e552c8cb5bc ("leds: add LED_ON brightness as boolean value") has introduced the LED_ON enumeration value that can be used instead of LED_FULL which has more of a linear value. Because the tm2-touchscreen doesn't have brightness levels, but it's a simple on/off led, use LED_ON instead of LED_FULL. Signed-off-by: Andi Shyti Reviewed-by: Jaechul Lee Tested-by: Jaechul Lee Signed-off-by: Dmitry Torokhov drivers/input/keyboard/tm2-touchkey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28904eeced2c6cf6d315c675e79e1700ef7507ac Merge: 400129f b31e85e Author: Dave Airlie Date: Fri Jun 2 12:57:32 2017 +1000 Merge tag 'topic/dp-quirks-2017-05-31' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes DP sink specific quirks * tag 'topic/dp-quirks-2017-05-31' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: Detect USB-C specific dongles before reducing M and N drm/dp: start a DPCD based DP sink/branch device quirk database drm/i915: use drm DP helper to read DPCD desc drm/dp: add helper for reading DP sink/branch device desc from DPCD commit 243f6aa0090234f5d279060d0f8c2baf968f9de2 Merge: c883af2 f434b1c Author: Olof Johansson Date: Thu Jun 1 17:05:36 2017 -0700 Merge tag 'davinci-fixes-for-v4.12-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes A fix to MAINTAINERS file adding relevant device-tree files to mach-davinci entry. * tag 'davinci-fixes-for-v4.12-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: MAINTAINERS: add device-tree files to TI DaVinci entry Signed-off-by: Olof Johansson commit c883af2f2bd1139f4d102cbebc3d66ea447ca08a Merge: 1ba2eaa 1cb0b57 Author: Olof Johansson Date: Thu Jun 1 16:59:55 2017 -0700 Merge tag 'mvebu-fixes-non-critical-4.12-1' of git://git.infradead.org/linux-mvebu into fixes mvebu non critical fixes for 4.12 Update MAINTAINER file for irqchip related drivers to Marvell EBU * tag 'mvebu-fixes-non-critical-4.12-1' of git://git.infradead.org/linux-mvebu: MAINTAINERS: add irqchip related drivers to Marvell EBU maintainers MAINTAINERS: sort F entries for Marvell EBU maintainers Signed-off-by: Olof Johansson commit 1ba2eaaacd2cb3e3e0d753d62dae515c6dec8035 Merge: 7306988 44f73dc Author: Olof Johansson Date: Thu Jun 1 16:56:06 2017 -0700 Merge tag 'mvebu-fixes-4.12-1' of git://git.infradead.org/linux-mvebu into fixes mvebu fixes for 4.12 Fix the interrupt description of the crypto node for device tree of the Armada 7K/8K SoCs * tag 'mvebu-fixes-4.12-1' of git://git.infradead.org/linux-mvebu: (316 commits) arm64: marvell: dts: fix interrupts in 7k/8k crypto nodes + Linux 4.12-rc2 Signed-off-by: Olof Johansson commit 73069883c017d454737d07a5aeab2b1639fcfeca Author: Patrice Chotard Date: Mon May 29 17:17:54 2017 +0200 MAINTAINERS: remove kernel@stlinux.com obsolete mailing list The STMicroelectronics dedicated mailing list kernel@stlinux.com is no more available, remove it to avoid bouncing mails. Several request to create a new mailing list has been send by Benjamin Gaignard and me but without any answers. Signed-off-by: Patrice Chotard Signed-off-by: Olof Johansson MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) commit 84d40c0b73966a62c4d0f40288636a2f66cac3df Merge: da3d1d4 4497a22 Author: Olof Johansson Date: Thu Jun 1 16:54:14 2017 -0700 Merge tag 'reset-fixes-for-4.12' of git://git.pengutronix.de/git/pza/linux into fixes Reset controller fixes for v4.12 - Set hi6220_reset driver module license to GPL v2 to fix module loading. * tag 'reset-fixes-for-4.12' of git://git.pengutronix.de/git/pza/linux: reset: hi6220: Set module license so that it can be loaded Signed-off-by: Olof Johansson commit da3d1d4a4e6c554237466db060d53abbf0620605 Merge: cf5cde2 cc7a938 Author: Olof Johansson Date: Thu Jun 1 16:53:38 2017 -0700 Merge tag 'at91-4.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into fixes Fixes for 4.12: Fix two compilation issues * tag 'at91-4.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: at91: select CONFIG_ARM_CPU_SUSPEND memory: atmel-ebi: mark PM ops as __maybe_unused Signed-off-by: Olof Johansson commit cf5cde2199058f1aed33f8b5f637c02a95936031 Author: Masahiro Yamada Date: Wed May 24 14:10:10 2017 +0900 ARM: dts: versatile: use #include "..." to include local DT Most of DT files in ARM use #include "..." to make pre-processor include DT in the same directory, but this is one of the exceptional files that use #include <...> for that. Fix it to remove -I$(srctree)/arch/$(SRCARCH)/boot/dts path from dtc_cpp_flags. ARM: dts: versatile: use #include "..." to include DT in the same directory Most of DT files in ARM use #include "..." to make pre-processor include DT in the same directory, but we have 3 exceptional files that use #include <...> for that. They must be fixed to remove -I$(srctree)/arch/$(SRCARCH)/boot/dts path from dtc_cpp_flags. Signed-off-by: Masahiro Yamada Signed-off-by: Olof Johansson arch/arm/boot/dts/versatile-pb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b1e342be265f7df915c68c7c6e450956d8865aa Merge: 2f48641 9a30740 Author: Linus Torvalds Date: Thu Jun 1 16:24:48 2017 -0700 Merge tag 'nfsd-4.12-1' of git://linux-nfs.org/~bfields/linux Pull nfsd fixes from Bruce Fields: "Revert patch accidentally included in the merge window pull request, and fix a crash that was likely a result of buggy client behavior" * tag 'nfsd-4.12-1' of git://linux-nfs.org/~bfields/linux: nfsd4: fix null dereference on replay nfsd: Revert "nfsd: check for oversized NFSv2/v3 arguments" commit 2f48641cfc83c3e1fdc81204382e05edf182691a Merge: 9ea15a5 243dd05 Author: Linus Torvalds Date: Thu Jun 1 16:17:42 2017 -0700 Merge tag 'gcc-plugins-v4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull gcc-plugin prepwork from Kees Cook: "Use designated initializers for mtk-vcodec, powerplay, amdgpu, and sgi-xp. Use ERR_CAST() to avoid cross-structure cast in ocf2, ntfs, and NFS. Christoph Hellwig recommended that I send these fixes now, rather than waiting for the v4.13 merge window. These are all initializer and cast fixes needed for the future randstruct plugin that haven't been picked up by the respective maintainers" * tag 'gcc-plugins-v4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: mtk-vcodec: Use designated initializers drm/amd/powerplay: Use designated initializers drm/amdgpu: Use designated initializers sgi-xp: Use designated initializers ocfs2: Use ERR_CAST() to avoid cross-structure cast ntfs: Use ERR_CAST() to avoid cross-structure cast NFS: Use ERR_CAST() to avoid cross-structure cast commit d3957b86a40612826ef935f474b31359d66cbdca Author: Majd Dibbiny Date: Sun May 21 19:09:54 2017 +0300 RDMA/SA: Fix kernel panic in CMA request handler flow Commit 9fdca4da4d8c (IB/SA: Split struct sa_path_rec based on IB and ROCE specific fields) moved the service_id to be specific attribute for IB and OPA SA Path Record, and thus wasn't assigned for RoCE. This caused to the following kernel panic in the CMA request handler flow: [ 27.074594] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 [ 27.074731] IP: __radix_tree_lookup+0x1d/0xe0 ... [ 27.075356] Workqueue: ib_cm cm_work_handler [ib_cm] [ 27.075401] task: ffff88022e3b8000 task.stack: ffffc90001298000 [ 27.075449] RIP: 0010:__radix_tree_lookup+0x1d/0xe0 ... [ 27.075979] Call Trace: [ 27.076015] radix_tree_lookup+0xd/0x10 [ 27.076055] cma_ps_find+0x59/0x70 [rdma_cm] [ 27.076097] cma_id_from_event+0xd2/0x470 [rdma_cm] [ 27.076144] ? ib_init_ah_from_path+0x39a/0x590 [ib_core] [ 27.076193] cma_req_handler+0x25/0x480 [rdma_cm] [ 27.076237] cm_process_work+0x25/0x120 [ib_cm] [ 27.076280] ? cm_get_bth_pkey.isra.62+0x3c/0xa0 [ib_cm] [ 27.076350] cm_req_handler+0xb03/0xd40 [ib_cm] [ 27.076430] ? sched_clock_cpu+0x11/0xb0 [ 27.076478] cm_work_handler+0x194/0x1588 [ib_cm] [ 27.076525] process_one_work+0x160/0x410 [ 27.076565] worker_thread+0x137/0x4a0 [ 27.076614] kthread+0x112/0x150 [ 27.076684] ? max_active_store+0x60/0x60 [ 27.077642] ? kthread_park+0x90/0x90 [ 27.078530] ret_from_fork+0x2c/0x40 This patch moves it back to the common SA Path Record structure and removes the redundant setter and getter. Tested on Connect-IB and Connect-X4 in Infiniband and RoCE respectively. Fixes: 9fdca4da4d8c (IB/SA: Split struct sa_path_rec based on IB ands ROCE specific fields) Signed-off-by: Majd Dibbiny Reviewed-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 4 ++-- drivers/infiniband/core/cma.c | 13 ++++++------- drivers/infiniband/core/sa_query.c | 6 +++--- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- include/rdma/ib_sa.h | 25 +++---------------------- 5 files changed, 15 insertions(+), 35 deletions(-) commit 79bb5b7ee1776a244484a1be6671d89fbd7c0c9f Author: Leon Romanovsky Date: Sun May 21 19:08:09 2017 +0300 RDMA/umem: Fix missing mmap_sem in get umem ODP call Add mmap_sem lock around VMA inspection in ib_umem_odp_get(). Fixes: 0008b84ea9af ('IB/umem: Add support to huge ODP') Signed-off-by: Artemy Kovalyov Reviewed-by: Eli Cohen Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/umem_odp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 53376fedb9da54c0d3b0bd3a6edcbeb681692909 Author: Qing Huang Date: Thu May 18 16:33:53 2017 -0700 RDMA/core: not to set page dirty bit if it's already set. This change will optimize kernel memory deregistration operations. __ib_umem_release() used to call set_page_dirty_lock() against every writable page in its memory region. Its purpose is to keep data synced between CPU and DMA device when swapping happens after mem deregistration ops. Now we choose not to set page dirty bit if it's already set by kernel prior to calling __ib_umem_release(). This reduces memory deregistration time by half or even more when we ran application simulation test program. Signed-off-by: Qing Huang Signed-off-by: Doug Ledford drivers/infiniband/core/umem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f937d93a9122d1510ca6e4bb8d860aedcf9408c3 Author: Leon Romanovsky Date: Thu May 18 07:40:33 2017 +0300 RDMA/uverbs: Declare local function static and add brackets to sizeof Commit 57520751445b ("IB/SA: Add OPA path record type") introduced new local function __ib_copy_path_rec_to_user, but didn't limit its scope. This produces the following sparse warning: drivers/infiniband/core/uverbs_marshall.c:99:6: warning: symbol '__ib_copy_path_rec_to_user' was not declared. Should it be static? In addition, it used sizeof ... notations instead of sizeof(...), which is correct in C, but a little bit misleading. Let's change it too. Fixes: 57520751445b ("IB/SA: Add OPA path record type") Reviewed-by: Yuval Shaia Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_marshall.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 233c1955835bd8649003be9bb3d8e79788b08be1 Author: Leon Romanovsky Date: Sun May 14 15:49:57 2017 +0300 RDMA/netlink: Reduce exposure of RDMA netlink functions RDMA netlink is part of ib_core, hence ibnl_chk_listeners(), ibnl_init() and ibnl_cleanup() don't need to be published in public header file. Let's remove EXPORT_SYMBOL from ibnl_chk_listeners() and move all these functions to private header file. CC: Yuval Shaia Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/core/core_priv.h | 10 ++++++++++ drivers/infiniband/core/netlink.c | 2 +- include/rdma/rdma_netlink.h | 10 ---------- 3 files changed, 11 insertions(+), 11 deletions(-) commit 95c2ef50c726a51d580c35ae8dccd383abaa8701 Author: Israel Rukshin Date: Thu May 11 18:52:36 2017 +0300 RDMA/srp: Fix NULL deref at srp_destroy_qp() If srp_init_qp() fails at srp_create_ch_ib() then ch->send_cq may be NULL. Calling directly to ib_destroy_qp() is sufficient because no work requests were posted on the created qp. Fixes: 9294000d6d89 ("IB/srp: Drain the send queue before destroying a QP") Cc: Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Bart van Assche -- Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a1a972630c77edb39adf310699e404b8bf9176e Author: Leon Romanovsky Date: Sun May 14 13:32:06 2017 +0300 RDMA/IPoIB: Limit the ipoib_dev_uninit_default scope ipoib_dev_uninit_default() call is used in ipoib_main.c file only and it generates the following warning from smatch tool: drivers/infiniband/ulp/ipoib/ipoib_main.c:1593:6: warning: symbol 'ipoib_dev_uninit_default' was not declared. Should it be static? so let's declare that function as static. Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c490669deb0133dfb6bfe7a80d7cfef3bbbd92f Author: Honggang Li Date: Thu May 11 20:14:28 2017 +0800 RDMA/IPoIB: Replace netdev_priv with ipoib_priv for ipoib_get_link_ksettings ipoib_dev_init accesses the wrong private data for the IPoIB device. Commit cd565b4b51e5 (IB/IPoIB: Support acceleration options callbacks) changed ipoib_priv from being identical to netdev_priv to being an area inside of, but not the same pointer as, the netdev_priv pointer. As such, the struct we want is the ipoib_priv area, not the netdev_priv area, so use the right accessor, otherwise we kernel panic. [ 27.271938] IPv6: ADDRCONF(NETDEV_CHANGE): mlx5_ib0.8006: link becomes ready [ 28.156790] BUG: unable to handle kernel NULL pointer dereference at 000000000000067c [ 28.166309] IP: ib_query_port+0x30/0x180 [ib_core] ... [ 28.306282] RIP: 0010:ib_query_port+0x30/0x180 [ib_core] ... [ 28.393337] Call Trace: [ 28.397594] ipoib_get_link_ksettings+0x66/0xe0 [ib_ipoib] [ 28.405274] __ethtool_get_link_ksettings+0xa0/0x1c0 [ 28.412353] speed_show+0x74/0xa0 [ 28.417503] dev_attr_show+0x20/0x50 [ 28.422922] ? mutex_lock+0x12/0x40 [ 28.428179] sysfs_kf_seq_show+0xbf/0x1a0 [ 28.434002] kernfs_seq_show+0x21/0x30 [ 28.439470] seq_read+0x116/0x3b0 [ 28.444445] ? do_filp_open+0xa5/0x100 [ 28.449774] kernfs_fop_read+0xff/0x180 [ 28.455220] __vfs_read+0x37/0x150 [ 28.460167] ? security_file_permission+0x9d/0xc0 [ 28.466560] vfs_read+0x8c/0x130 [ 28.471318] SyS_read+0x55/0xc0 [ 28.475950] do_syscall_64+0x67/0x150 [ 28.481163] entry_SYSCALL64_slow_path+0x25/0x25 ... [ 28.584493] ---[ end trace 3549968a4bf0aa5d ]--- Fixes: cd565b4b51e5 (IB/IPoIB: Support acceleration options callbacks) Fixes: 0d7e2d2166f6 (IB/ipoib: add get_link_ksettings in ethtool) Signed-off-by: Honggang Li Reviewed-by: Yuval Shaia Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d38d7fdafaf89d1756f27e9b4054dd19a1d2f545 Author: Gustavo A. R. Silva Date: Mon May 22 13:30:15 2017 -0500 RDMA/qedr: add null check before pointer dereference Add null check before dereferencing pointer sgid_attr.ndev inside function rdma_vlan_dev_vlan_id(). Addresses-Coverity-ID: 1373979 Signed-off-by: Gustavo A. R. Silva Acked-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/qedr_cm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 6e8484c5cf07c7ee632587e98c1a12d319dacb7c Author: Max Gurtovoy Date: Sun May 28 10:53:11 2017 +0300 RDMA/mlx5: set UMR wqe fence according to HCA cap Cache the needed umr_fence and set the wqe ctrl segmennt accordingly. Signed-off-by: Max Gurtovoy Acked-by: Leon Romanovsky Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 14 +++++++++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 +- drivers/infiniband/hw/mlx5/qp.c | 59 ++++++++++++++---------------------- 3 files changed, 39 insertions(+), 37 deletions(-) commit 1410a90ae449061b7e1ae19d275148f36948801b Author: Max Gurtovoy Date: Sun May 28 10:53:10 2017 +0300 net/mlx5: Define interface bits for fencing UMR wqe HW can implement UMR wqe re-transmission in various ways. Thus, add HCA cap to distinguish the needed fence for UMR to make sure that the wqe wouldn't fail on mkey checks. Signed-off-by: Max Gurtovoy Acked-by: Leon Romanovsky Reviewed-by: Christoph Hellwig Signed-off-by: Doug Ledford include/linux/mlx5/mlx5_ifc.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit eed7624552ca55c346a4e9ccaa9ab0723841aee6 Author: Jack Morgenstein Date: Sun May 21 19:11:13 2017 +0300 RDMA/mlx4: Fix MAD tunneling when SRIOV is enabled The cited patch added a type field to structures ib_ah and rdma_ah_attr. Function mlx4_ib_query_ah() builds an rdma_ah_attr structure from the data in an mlx4_ib_ah structure (which contains both an ib_ah structure and an address vector). For mlx4_ib_query_ah() to work properly, the type field in the contained ib_ah structure must be set correctly. In the outgoing MAD tunneling flow, procedure mlx4_ib_multiplex_mad() paravirtualizes a MAD received from a slave and sends the processed mad out over the wire. During this processing, it populates an mlx4_ib_ah structure and calls mlx4_ib_query_ah(). The cited commit overlooked setting the type field in the contained ib_ah structure before invoking mlx4_ib_query_ah(). As a result, the type field remained uninitialized, and the rdma_ah_attr structure was incorrectly built. This resulted in improperly built MADs being sent out over the wire. This patch properly initializes the type field in the contained ib_ah structure before calling mlx4_ib_query_ah(). The rdma_ah_attr structure is then generated correctly. Fixes: 44c58487d51a ("IB/core: Define 'ib' and 'roce' rdma_ah_attr types") Signed-off-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/mad.c | 1 + 1 file changed, 1 insertion(+) commit 1feb40067cf04ae48d65f728d62ca255c9449178 Author: Mike Marciniszyn Date: Fri May 12 09:02:00 2017 -0700 RDMA/qib,hfi1: Fix MR reference count leak on write with immediate The handling of IB_RDMA_WRITE_ONLY_WITH_IMMEDIATE will leak a memory reference when a buffer cannot be allocated for returning the immediate data. The issue is that the rkey validation has already occurred and the RNR nak fails to release the reference that was fruitlessly gotten. The the peer will send the identical single packet request when its RNR timer pops. The fix is to release the held reference prior to the rnr nak exit. This is the only sequence the requires both rkey validation and the buffer allocation on the same packet. Cc: Stable # 4.7+ Tested-by: Tadeusz Struk Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/rc.c | 5 ++++- drivers/infiniband/hw/qib/qib_rc.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) commit b3e6b4bdbb609762d8401ac4a959d590b4e4e3b8 Author: Byczkowski, Jakub Date: Fri May 12 09:01:37 2017 -0700 RDMA/hfi1: Defer setting VL15 credits to link-up interrupt Keep VL15 credits at 0 during LNI, before link-up. Store VL15 credits value during verify cap interrupt and set in after link-up. This addresses an issue where VL15 MAD packets could be sent by one side of the link before the other side is ready to receive them. Reviewed-by: Mike Marciniszyn Reviewed-by: Dean Luick Reviewed-by: Dennis Dalessandro Signed-off-by: Jakub Byczkowski Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 67 +++++++++++++++++++++-------- drivers/infiniband/hw/hfi1/chip_registers.h | 2 + drivers/infiniband/hw/hfi1/hfi.h | 11 ++++- drivers/infiniband/hw/hfi1/intr.c | 3 +- 4 files changed, 64 insertions(+), 19 deletions(-) commit e4785b0633574a607daaa04bf2fe43550055194f Author: Steven L. Roberts Date: Wed May 10 14:58:13 2017 -0500 RDMA/hfi1: change PCI bar addr assignments to Linux API functions The Omni-Path adapter driver fails to load on the ppc64le platform due to invalid PCI setup. This patch makes the PCI configuration more robust and will fix 64 bit addressing for ppc64le. Signed-off-by: Steven L Roberts Acked-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/pcie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c4dd4b69f55abcc8dd079f8de55d9d8c2ddbefce Author: Steven L. Roberts Date: Wed May 10 10:54:12 2017 -0500 RDMA/hfi1: fix array termination by appending NULL to attr array This fixes a kernel panic when loading the hfi driver as a dynamic module. Signed-off-by: Steven L Roberts Reviewed-by: Leon Romanovsky Acked-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 98b80a2a73a26f0e259632da519ccedb0cf37617 Author: Raju Rangoju Date: Wed May 31 12:06:58 2017 +0530 RDMA/iw_cxgb4: fix the calculation of ipv6 header size Take care of ipv6 checks while computing header length for deducing mtu size of ipv6 servers. Due to the incorrect header length computation for ipv6 servers, wrong mss is reported to the peer (client). Signed-off-by: Raju Rangoju Signed-off-by: Ganesh Goudar Acked-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4bbfabede50849f87b913a1fc07c02ecc96b6c57 Author: Ganesh Goudar Date: Fri May 19 14:48:42 2017 +0530 RDMA/iw_cxgb4: calculate t4_eq_status_entries properly use egrstatuspagesize to calculate t4_eq_status_entries. Fixes: bb58d07964f2 ("cxgb4: Update IngPad and IngPack values") Reported-by: Logan Gunthorpe Signed-off-by: Potnuri Bharat Teja Signed-off-by: Ganesh Goudar Acked-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1dad0ebeea1cd890b8892523f736916e245b0aef Author: Raju Rangoju Date: Mon May 15 06:40:39 2017 +0000 RDMA/iw_cxgb4: Avoid touch after free error in ARP failure handlers The patch 761e19a504af (RDMA/iw_cxgb4: Handle return value of c4iw_ofld_send() in abort_arp_failure()) from May 6, 2016 leads to the following static checker warning: drivers/infiniband/hw/cxgb4/cm.c:575 abort_arp_failure() warn: passing freed memory 'skb' Also fixes skb leak when l2t resolution fails Fixes: 761e19a504afa55 (RDMA/iw_cxgb4: Handle return value of c4iw_ofld_send() in abort_arp_failure()) Reported-by: Dan Carpenter Cc: Dan Carpenter Signed-off-by: Raju Rangoju Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f863de7de34025ee536cb3cc382bfc3cafaa9f0a Author: Tatyana Nikolova Date: Wed May 10 16:46:40 2017 -0500 RDMA/nes: ACK MPA Reply frame Explicitly ACK the MPA Reply frame so the peer does not retransmit the frame. Signed-off-by: Tatyana Nikolova Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e5fc903513a652a2cf890a3d3b91c1779e16e97 Author: Tatyana Nikolova Date: Wed May 10 16:46:39 2017 -0500 RDMA/nes: Don't set 0-length FULPDU RTR indication control flag Don't set control flag for 0-length FULPDU (Send) RTR indication in the enhanced MPA Request/Reply frames, because it isn't supported. Signed-off-by: Tatyana Nikolova Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes_cm.c | 1 - 1 file changed, 1 deletion(-) commit e80bd98d1ff011beec872a8ebbb73930507d6a13 Author: Gustavo A. R. Silva Date: Thu May 18 13:11:17 2017 -0500 RDMA/i40iw: fix duplicated code for different branches Refactor code to avoid identical code for different branches. Addresses-Coverity-ID: 1357356 Reviewed-by: Yuval Shaia Signed-off-by: Gustavo A. R. Silva Acked-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_virtchnl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit f300ba2d1ef1cb8411daa5e1ae44acfa7b88236c Author: Shiraz Saleem Date: Fri May 19 16:14:02 2017 -0500 RDMA/i40iw: Remove MSS change support MSS change on active QPs is not supported. Store new MSS value for new QPs only. Remove code to modify MSS on the fly. This also resolves a crash on QP modify to QP 0. BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 IP: i40iw_sc_qp_modify+0x22/0x280 [i40iw] Oops: 0000 [#1] SMP KASAN CPU: 2 PID: 1236 Comm: kworker/u16:4 Not tainted 4.12.0-rc1 #5 Hardware name: Gigabyte Technology Co., Ltd. To be filled by O.E.M./Q87M-D2H, BIOS F7 01/17/2014 Workqueue: l2params i40iw_l2params_worker [i40iw] task: ffff88070f5a9b40 task.stack: ffff88070f5a0000 RIP: 0010:i40iw_sc_qp_modify+0x22/0x280 [i40iw] ... Call Trace: i40iw_exec_cqp_cmd+0x2ce/0x410 [i40iw] ? _raw_spin_lock_irqsave+0x6f/0x80 ? i40iw_process_cqp_cmd+0x1d/0x80 [i40iw] i40iw_process_cqp_cmd+0x7c/0x80 [i40iw] i40iw_handle_cqp_op+0x2f/0x200 [i40iw] ? trace_hardirqs_off+0xd/0x10 ? _raw_spin_unlock_irqrestore+0x46/0x50 i40iw_hw_modify_qp+0x5e/0x90 [i40iw] i40iw_qp_mss_modify+0x52/0x60 [i40iw] i40iw_change_l2params+0x145/0x160 [i40iw] i40iw_l2params_worker+0x1f/0x40 [i40iw] process_one_work+0x1f5/0x650 ? process_one_work+0x161/0x650 worker_thread+0x48/0x3b0 kthread+0x112/0x150 ? process_one_work+0x650/0x650 ? kthread_create_on_node+0x40/0x40 ret_from_fork+0x2e/0x40 Code: 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 56 41 55 41 89 cd 41 54 49 89 fc 53 48 89 f3 48 89 d6 48 83 ec 08 48 8b 87 10 01 00 00 <48> 8b 40 08 4c 8b b0 40 04 00 00 4c 89 f7 e8 1b e5 ff ff 48 85 RIP: i40iw_sc_qp_modify+0x22/0x280 [i40iw] RSP: ffff88070f5a7c28 CR2: 0000000000000008 ---[ end trace 77a405931e296060 ]--- Reported-by: Stefan Assmann Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 12 +----------- drivers/infiniband/hw/i40iw/i40iw_osdep.h | 1 - drivers/infiniband/hw/i40iw/i40iw_type.h | 2 -- drivers/infiniband/hw/i40iw/i40iw_utils.c | 17 ----------------- 4 files changed, 1 insertion(+), 31 deletions(-) commit c0c643e16f9b00332cbbf3954556652dfa4ed5a3 Author: Mustafa Ismail Date: Wed May 10 23:32:14 2017 -0500 RDMA/i40iw: Fix device initialization error path Some error paths in i40iw_initialize_dev are doing additional and unnecessary work before exiting. Correctly free resources allocated prior to error and return with correct status code. Signed-off-by: Mustafa Ismail Signed-off-by: Henry Orosco Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_main.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit b117f4796306a750ec1ffb928acc5f55bdb1fc7b Author: Tatyana Nikolova Date: Fri May 5 12:05:17 2017 -0500 RDMA/i40iw: ACK MPA Reject frame Explicitly ACK the MPA Reject frame so the peer does not retransmit the frame. Signed-off-by: Tatyana Nikolova Signed-off-by: Henry Orosco Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a27fec21b70c2c41efbfe30a0fbb0f005b9f7e5 Author: Tatyana Nikolova Date: Fri May 5 12:05:16 2017 -0500 RDMA/i40iw: Don't set 0-length FULPDU RTR indication control flag Don't set control flag for 0-length FULPDU (Send) RTR indication in the enhanced MPA Request/Reply frames, because it isn't supported. Signed-off-by: Tatyana Nikolova Signed-off-by: Henry Orosco Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_cm.c | 1 - 1 file changed, 1 deletion(-) commit e165bc02a02c70e40d5c811c705ba269aeca0497 Author: Johannes Berg Date: Thu Jun 1 21:26:03 2017 +0200 mac80211: fix dropped counter in multiqueue RX In the commit enabling per-CPU station statistics, I inadvertedly copy-pasted some code to update rx_packets and forgot to change it to update rx_dropped_misc. Fix that. This addresses https://bugzilla.kernel.org/show_bug.cgi?id=195953. Fixes: c9c5962b56c1 ("mac80211: enable collecting station statistics per-CPU") Reported-by: Petru-Florin Mihancea Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b425e50492583b10cceb388af36ef0bd3bdf842a Author: Bart Van Assche Date: Wed May 31 14:43:45 2017 -0700 block: Avoid that blk_exit_rl() triggers a use-after-free Since the introduction of .init_rq_fn() and .exit_rq_fn() it is essential that the memory allocated for struct request_queue stays around until all blk_exit_rl() calls have finished. Hence make blk_init_rl() take a reference on struct request_queue. This patch fixes the following crash: general protection fault: 0000 [#2] SMP CPU: 3 PID: 28 Comm: ksoftirqd/3 Tainted: G D 4.12.0-rc2-dbg+ #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014 task: ffff88013a108040 task.stack: ffffc9000071c000 RIP: 0010:free_request_size+0x1a/0x30 RSP: 0018:ffffc9000071fd38 EFLAGS: 00010202 RAX: 6b6b6b6b6b6b6b6b RBX: ffff880067362a88 RCX: 0000000000000003 RDX: ffff880067464178 RSI: ffff880067362a88 RDI: ffff880135ea4418 RBP: ffffc9000071fd40 R08: 0000000000000000 R09: 0000000100180009 R10: ffffc9000071fd38 R11: ffffffff81110800 R12: ffff88006752d3d8 R13: ffff88006752d3d8 R14: ffff88013a108040 R15: 000000000000000a FS: 0000000000000000(0000) GS:ffff88013fd80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa8ec1edb00 CR3: 0000000138ee8000 CR4: 00000000001406e0 Call Trace: mempool_destroy.part.10+0x21/0x40 mempool_destroy+0xe/0x10 blk_exit_rl+0x12/0x20 blkg_free+0x4d/0xa0 __blkg_release_rcu+0x59/0x170 rcu_process_callbacks+0x260/0x4e0 __do_softirq+0x116/0x250 smpboot_thread_fn+0x123/0x1e0 kthread+0x109/0x140 ret_from_fork+0x31/0x40 Fixes: commit e9c787e65c0c ("scsi: allocate scsi_cmnd structures as part of struct request") Signed-off-by: Bart Van Assche Acked-by: Tejun Heo Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Cc: Jan Kara Cc: # v4.11+ Signed-off-by: Jens Axboe block/blk-cgroup.c | 2 +- block/blk-core.c | 10 ++++++++-- block/blk-sysfs.c | 2 +- block/blk.h | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) commit 58a6960663a112b97ccfcf0814b489f8ac0cdf9a Merge: 93818da 79e498a Author: David S. Miller Date: Thu Jun 1 15:02:31 2017 -0400 Merge branch 'ARM-imx6ul-14x14-evk-Fix-suspend-over-nfs-by-phy' Leonard Crestez says: ==================== ARM: imx6ul-14x14-evk: Fix suspend over nfs by phy Right now attempting doing suspend/resume while root is mounted over NFS hangs on imx6ul-14x14-evk. This is happening because ksz8081 phy fixups are lost on resume. Fix this by using equivalent devicetree properties instead of a phy fixup and handling those properties on resume in the micrel driver. In theory it might now be possible to remove the phy fixup from mach-imx6ul entirely but it is possible that this would break other imx6ul boards which use the same phy. The solution would be to patch their dts but it's not clear how to identify affected boards. This code is shared with imx6ull-14x14-evk but 6ull suspend needs an unrelated patch: https://lkml.org/lkml/2017/5/30/584 This is something of a corner case so there is no CC: stable. Changes since v1: https://lkml.org/lkml/2017/5/30/672 * Split a kszphy_config_reset function for stuff shared between config_init and resume. Calling config_init directly could be an option but on some HW variants it does extra stuff like parsing devicetree options. That would not be appropriate for resume code. ==================== Signed-off-by: David S. Miller commit 79e498a9c7da0737829ff864aae44df434105676 Author: Leonard Crestez Date: Wed May 31 13:29:30 2017 +0300 net: phy: micrel: Restore led_mode and clk_sel on resume These bits seem to be lost after a suspend/resume cycle so just set them again. Do this by splitting the handling of these bits into a function that is also called on resume. This patch fixes ethernet suspend/resume on imx6ul-14x14-evk boards. Signed-off-by: Leonard Crestez Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/micrel.c | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) commit e6f4292ae0a1e73fae26ced57de13a48f71ad1fa Author: Leonard Crestez Date: Wed May 31 13:29:29 2017 +0300 ARM: dts: imx6ul-14x14-evk: Add ksz8081 phy properties Right now mach-imx6ul registers a fixup for the ksz8081 phy. The same register values can be set through the micrel phy driver by using dts properties. This seems preferable and allows cleanly fixing suspend/resume. Signed-off-by: Leonard Crestez Reviewed-by: Fabio Estevam Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller arch/arm/boot/dts/imx6ul-14x14-evk.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 93818da5eed63fbc17b64080406ea53b86b23309 Author: Jia-Ju Bai Date: Wed May 31 15:08:25 2017 +0800 mISDN: Fix a sleep-in-atomic bug The driver may sleep under a read spin lock, and the function call path is: send_socklist (acquire the lock by read_lock) skb_copy(GFP_KERNEL) --> may sleep To fix it, the "GFP_KERNEL" is replaced with "GFP_ATOMIC". Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller drivers/isdn/mISDN/stack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35cf2845563c1aaa01d27bd34d64795c4ae72700 Author: Lance Richardson Date: Mon May 29 13:25:57 2017 -0400 vxlan: eliminate cached dst leak After commit 0c1d70af924b ("net: use dst_cache for vxlan device"), cached dst entries could be leaked when more than one remote was present for a given vxlan_fdb entry, causing subsequent netns operations to block indefinitely and "unregister_netdevice: waiting for lo to become free." messages to appear in the kernel log. Fix by properly releasing cached dst and freeing resources in this case. Fixes: 0c1d70af924b ("net: use dst_cache for vxlan device") Signed-off-by: Lance Richardson Acked-by: Paolo Abeni Signed-off-by: David S. Miller drivers/net/vxlan.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 05e97a9eda72d58dba293857df6aac62584ef99a Merge: 2ea659a d4ed3b9 Author: Brian Norris Date: Thu Jun 1 10:53:55 2017 -0700 Merge tag 'nand/fixes-for-4.12-rc3' of git://git.infradead.org/linux-mtd into MTD From Boris: """ This pull request contains several fixes to the core and the tango driver. tango fixes: * Add missing MODULE_DEVICE_TABLE() in tango_nand.c * Update the number of corrected bitflips core fixes: * Fix a long standing memory leak in nand_scan_tail() * Fix several bugs introduced by the per-vendor init/detection infrastructure (introduced in 4.12) * Add a static specifier to nand_ooblayout_lp_hamming_ops definition """ commit b13bbeee5ee606cfb57ddcf47e66802f9aa7273e Author: Kim Phillips Date: Thu Jun 1 09:29:59 2017 -0500 perf annotate: Fix branch instruction with multiple operands 'perf annotate' is dropping the cr* fields from branch instructions. Fix it by adding support to display branch instructions having multiple operands. Power Arch objdump of int_sqrt: 20.36 | c0000000004d2694: subf r10,r10,r3 | c0000000004d2698: v bgt cr6,c0000000004d26a0 1.82 | c0000000004d269c: mr r3,r10 29.18 | c0000000004d26a0: mr r10,r8 | c0000000004d26a4: v bgt cr7,c0000000004d26ac | c0000000004d26a8: mr r10,r7 Power Arch Before Patch: 20.36 | subf r10,r10,r3 | v bgt 40 1.82 | mr r3,r10 29.18 | 40: mr r10,r8 | v bgt 4c | mr r10,r7 Power Arch After patch: 20.36 | subf r10,r10,r3 | v bgt cr6,40 1.82 | mr r3,r10 29.18 | 40: mr r10,r8 | v bgt cr7,4c | mr r10,r7 Also support AArch64 conditional branch instructions, which can have up to three operands: Aarch64 Non-simplified (raw objdump) view: │ffff0000083cd11c: ↑ cbz w0, ffff0000083cd100 Tested-by: Ravi Bangoria Reported-by: Anton Blanchard Reported-by: Robin Murphy Signed-off-by: Kim Phillips Cc: Alexander Shishkin Cc: Christian Borntraeger Cc: Mark Rutland Cc: Peter Zijlstra Cc: Taeung Song Link: http://lkml.kernel.org/r/20170601092959.f60d98912e8a1b66fd1e4c0e@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) commit 9ea15a59c39d6395160274d8829bb8b7e185dd56 Merge: 0bb2303 47a66ee Author: Linus Torvalds Date: Thu Jun 1 10:48:09 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "Many small x86 bug fixes: SVM segment registers access rights, nested VMX, preempt notifiers, LAPIC virtual wire mode, NMI injection" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: Fix nmi injection failure when vcpu got blocked KVM: SVM: do not zero out segment attributes if segment is unusable or not present KVM: SVM: ignore type when setting segment registers KVM: nVMX: fix nested_vmx_check_vmptr failure paths under debugging KVM: x86: Fix virtual wire mode KVM: nVMX: Fix handling of lmsw instruction KVM: X86: Fix preempt the preemption timer cancel commit 0bb230399fd337cc9a838d47a0c9ec3433aa612e Merge: 393bcfa d8747d6 Author: Linus Torvalds Date: Thu Jun 1 10:45:27 2017 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull Reiserfs and GFS2 fixes from Jan Kara: "Fixes to GFS2 & Reiserfs for the fallout of the recent WRITE_FUA cleanup from Christoph. Fixes for other filesystems were already merged by respective maintainers." * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: reiserfs: Make flush bios explicitely sync gfs2: Make flush bios explicitely sync commit 393bcfaeb8be7f46a4cd7d673e33541ebee76b12 Merge: a374846 5e0cf5e Author: Linus Torvalds Date: Thu Jun 1 10:40:41 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending Pull SCSI target fixes from Nicholas Bellinger: "Here are the target-pending fixes for v4.12-rc4: - ibmviscsis ABORT_TASK handling fixes that missed the v4.12 merge window. (Bryant Ly and Michael Cyr) - Re-add a target-core check enforcing WRITE overflow reject that was relaxed in v4.3, to avoid unsupported iscsi-target immediate data overflow. (nab) - Fix a target-core-user OOPs during device removal. (MNC + Bryant Ly) - Fix a long standing iscsi-target potential issue where kthread exit did not wait for kthread_should_stop(). (Jiang Yi) - Fix a iscsi-target v3.12.y regression OOPs involving initial login PDU processing during asynchronous TCP connection close. (MNC + nab) This is a little larger than usual for an -rc4, primarily due to the iscsi-target v3.12.y regression OOPs bug-fix. However, it's an important patch as MNC + Hannes where both able to trigger it using a reduced iscsi initiator login timeout combined with a backend taking a long time to complete I/Os during iscsi login driven session reinstatement" * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: iscsi-target: Always wait for kthread_should_stop() before kthread exit iscsi-target: Fix initial login PDU asynchronous socket close OOPs tcmu: fix crash during device removal target: Re-add check to reject control WRITEs with overflow data ibmvscsis: Fix the incorrect req_lim_delta ibmvscsis: Clear left-over abort_cmd pointers commit 0fde7ad71ee371ede73b3f326e58f9e8d102feb6 Author: David S. Miller Date: Thu Jun 1 09:42:46 2017 -0700 sparc64: Fix build warnings with gcc 7. arch/sparc/kernel/ds.c: In function ‘register_services’: arch/sparc/kernel/ds.c:912:3: error: ‘strcpy’: writing at least 1 byte into a region of size 0 overflows the destination Reported-by: Anatoly Pugachev Signed-off-by: David S. Miller arch/sparc/kernel/ds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aeb073241fe7a2b932e04e20c60e47718332877f Author: Nikolay Aleksandrov Date: Thu Jun 1 18:07:55 2017 +0300 net: bridge: start hello timer only if device is up When the transition of NO_STP -> KERNEL_STP was fixed by always calling mod_timer in br_stp_start, it introduced a new regression which causes the timer to be armed even when the bridge is down, and since we stop the timers in its ndo_stop() function, they never get disabled if the device is destroyed before it's upped. To reproduce: $ while :; do ip l add br0 type bridge hello_time 100; brctl stp br0 on; ip l del br0; done; CC: Xin Long CC: Ivan Vecera CC: Sebastian Ott Reported-by: Sebastian Ott Fixes: 6d18c732b95c ("bridge: start hello_timer when enabling KERNEL_STP in br_stp_start") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_stp_if.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3968d38917eb9bd0cd391265f6c9c538d9b33ffa Author: Mintz, Yuval Date: Thu Jun 1 15:57:56 2017 +0300 bnx2x: Fix Multi-Cos Apparently multi-cos isn't working for bnx2x quite some time - driver implements ndo_select_queue() to allow queue-selection for FCoE, but the regular L2 flow would cause it to modulo the fallback's result by the number of queues. The fallback would return a queue matching the needed tc [via __skb_tx_hash()], but since the modulo is by the number of TSS queues where number of TCs is not accounted, transmission would always be done by a queue configured into using TC0. Fixes: ada7c19e6d27 ("bnx2x: use XPS if possible for bnx2x_select_queue instead of pure hash") Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b7ea64f94347b72235e563fedd6ef1ead4d11ec Author: Ganesh Goudar Date: Thu Jun 1 17:11:30 2017 +0530 cxgb4: update latest firmware version supported Change t4fw_version.h to update latest firmware version number to 1.16.45.0. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4fw_version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7212462fa6fdae61f7f40a4ead048def45bb23cb Author: Nicolas Dichtel Date: Thu Jun 1 10:00:07 2017 +0200 netlink: don't send unknown nsid The NETLINK_F_LISTEN_ALL_NSID otion enables to listen all netns that have a nsid assigned into the netns where the netlink socket is opened. The nsid is sent as metadata to userland, but the existence of this nsid is checked only for netns that are different from the socket netns. Thus, if no nsid is assigned to the socket netns, NETNSA_NSID_NOT_ASSIGNED is reported to the userland. This value is confusing and useless. After this patch, only valid nsid are sent to userland. Reported-by: Flavio Leitner Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller net/netlink/af_netlink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5ea6d691aac6c93b790f0905e3460d44cc4c449b Author: Jia-Ju Bai Date: Thu Jun 1 16:18:10 2017 +0800 qlcnic: Fix a sleep-in-atomic bug in qlcnic_82xx_hw_write_wx_2M and qlcnic_82xx_hw_read_wx_2M The driver may sleep under a write spin lock, and the function call path is: qlcnic_82xx_hw_write_wx_2M (acquire the lock by write_lock_irqsave) crb_win_lock qlcnic_pcie_sem_lock usleep_range qlcnic_82xx_hw_read_wx_2M (acquire the lock by write_lock_irqsave) crb_win_lock qlcnic_pcie_sem_lock usleep_range To fix it, the usleep_range is replaced with udelay. Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9b3311ef36b670909ea4443f306c8318082c8f0 Author: Jeff Mahoney Date: Wed May 17 11:38:34 2017 -0400 btrfs: fix race with relocation recovery and fs_root setup If we have to recover relocation during mount, we'll ultimately have to evict the orphan inode. That goes through the reservation dance, where priority_reclaim_metadata_space and flush_space expect fs_info->fs_root to be valid. That's the next thing to be set up during mount, so we crash, almost always in flush_space trying to join the transaction but priority_reclaim_metadata_space is possible as well. This call path has been problematic in the past WRT whether ->fs_root is valid yet. Commit 957780eb278 (Btrfs: introduce ticketed enospc infrastructure) added new users that are called in the direct path instead of the async path that had already been worked around. The thing is that we don't actually need the fs_root, specifically, for anything. We either use it to determine whether the root is the chunk_root for use in choosing an allocation profile or as a root to pass btrfs_join_transaction before immediately committing it. Anything that isn't the chunk root works in the former case and any root works in the latter. A simple fix is to use a root we know will always be there: the extent_root. Cc: # v4.8+ Fixes: 957780eb278 (Btrfs: introduce ticketed enospc infrastructure) Signed-off-by: Jeff Mahoney Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 896533a7da929136d0432713f02a3edffece2826 Author: Jeff Mahoney Date: Wed May 17 09:49:37 2017 -0400 btrfs: fix memory leak in update_space_info failure path If we fail to add the space_info kobject, we'll leak the memory for the percpu counter. Fixes: 6ab0a2029c (btrfs: publish allocation data in sysfs) Cc: # v3.14+ Signed-off-by: Jeff Mahoney Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 1 + 1 file changed, 1 insertion(+) commit cc2b702c52094b637a351d7491ac5200331d0445 Author: David Sterba Date: Fri May 12 01:03:52 2017 +0200 btrfs: use correct types for page indices in btrfs_page_exists_in_range Variables start_idx and end_idx are supposed to hold a page index derived from the file offsets. The int type is not the right one though, offsets larger than 1 << 44 will get silently trimmed off the high bits. (1 << 44 is 16TiB) What can go wrong, if start is below the boundary and end gets trimmed: - if there's a page after start, we'll find it (radix_tree_gang_lookup_slot) - the final check "if (page->index <= end_idx)" will unexpectedly fail The function will return false, ie. "there's no page in the range", although there is at least one. btrfs_page_exists_in_range is used to prevent races in: * in hole punching, where we make sure there are not pages in the truncated range, otherwise we'll wait for them to finish and redo truncation, but we're going to replace the pages with holes anyway so the only problem is the intermediate state * lock_extent_direct: we want to make sure there are no pages before we lock and start DIO, to prevent stale data reads For practical occurence of the bug, there are several constaints. The file must be quite large, the affected range must cross the 16TiB boundary and the internal state of the file pages and pending operations must match. Also, we must not have started any ordered data in the range, otherwise we don't even reach the buggy function check. DIO locking tries hard in several places to avoid deadlocks with buffered IO and avoids waiting for ranges. The worst consequence seems to be stale data read. CC: Liu Bo CC: stable@vger.kernel.org # 3.16+ Fixes: fc4adbff823f7 ("btrfs: Drop EXTENT_UPTODATE check in hole punching and direct locking") Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c08d517480ea342cc43acdacc5cf4a795e18151d Author: Ingo Molnar Date: Thu Jun 1 15:52:23 2017 +0200 Revert "x86/PAT: Fix Xorg regression on CPUs that don't support PAT" This reverts commit cbed27cdf0e3f7ea3b2259e86b9e34df02be3fe4. As Andy Lutomirski observed: "I think this patch is bogus. pat_enabled() sure looks like it's supposed to return true if PAT is *enabled*, and these days PAT is 'enabled' even if there's no HW PAT support." Reported-by: Bernhard Held Reported-by: Chris Wilson Acked-by: Andy Lutomirski Cc: Andrew Morton Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Luis R. Rodriguez Cc: Mikulas Patocka Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Toshi Kani Cc: stable@vger.kernel.org # v4.2+ Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/mm/pat.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 54265664c15a68905d8d67d19205e9a767636434 Author: Jiri Olsa Date: Wed May 31 13:35:57 2017 +0200 perf trace: Add mmap alias for s390 The s390 architecture maps sys_mmap (nr 90) into sys_old_mmap. For this reason perf trace can't find the proper syscall event to get args format from and displays it wrongly as 'continued'. To fix that fill the "alias" field with "old_mmap" for trace's mmap record to get the correct translation. Before: 0.042 ( 0.011 ms): vest/43052 fstat(statbuf: 0x3ffff89fd90 ) = 0 0.042 ( 0.028 ms): vest/43052 ... [continued]: mmap()) = 0x3fffd6e2000 0.072 ( 0.025 ms): vest/43052 read(buf: 0x3fffd6e2000, count: 4096 ) = 6 After: 0.045 ( 0.011 ms): fstat(statbuf: 0x3ffff8a0930 ) = 0 0.057 ( 0.018 ms): mmap(arg: 0x3ffff8a0858 ) = 0x3fffd14a000 0.076 ( 0.025 ms): read(buf: 0x3fffd14a000, count: 4096 ) = 6 Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170531113557.19175-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0e5e7f5e9700661c3ddd95501743fb52fec1ab07 Author: Michael Ellerman Date: Thu May 25 16:33:52 2017 +1000 powerpc/64: Reclaim CPU_FTR_SUBCORE We are running low on CPU feature bits, so we only want to use them when it's really necessary. CPU_FTR_SUBCORE is only used in one place, and only in C, so we don't need it in order to make asm patching work. It can only be set on "Power8" CPUs, which in practice means POWER8, POWER8E and POWER8NVL. There are no plans to implement it on future CPUs, but if there ever were we could retrofit it then. Although KVM uses subcores, it never looks at the CPU feature, it either looks at the ISA level or the threads_per_subcore value. So drop the CPU feature and do a PVR check instead. Drop the device tree "subcore" feature as we no longer support doing anything with it, and we will drop it from skiboot too. Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 3 +-- arch/powerpc/kernel/dt_cpu_ftrs.c | 1 - arch/powerpc/platforms/powernv/subcore.c | 8 +++++++- 3 files changed, 8 insertions(+), 4 deletions(-) commit dc421b200f91930c9c6a9586810ff8c232cf10fc Author: Michael Bringmann Date: Mon May 22 15:44:37 2017 -0500 powerpc/hotplug-mem: Fix missing endian conversion of aa_index When adding or removing memory, the aa_index (affinity value) for the memblock must also be converted to match the endianness of the rest of the 'ibm,dynamic-memory' property. Otherwise, subsequent retrieval of the attribute will likely lead to non-existent nodes, followed by using the default node in the code inappropriately. Fixes: 5f97b2a0d176 ("powerpc/pseries: Implement memory hotplug add in the kernel") Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Michael Bringmann Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/hotplug-memory.c | 2 ++ 1 file changed, 2 insertions(+) commit 6f553912eedafae13ff20b322a65e471fe7f5236 Author: Christophe Leroy Date: Wed May 24 10:01:55 2017 +0200 powerpc/sysdev/simple_gpio: Fix oops in gpio save_regs function of_mm_gpiochip_add_data() generates an oops for NULL pointer dereference. of_mm_gpiochip_add_data() calls mm_gc->save_regs() before setting the data, therefore ->save_regs() cannot use gpiochip_get_data() Fixes: 937daafca774 ("powerpc: simple-gpio: use gpiochip data pointer") Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: Christophe Leroy Reviewed-by: Linus Walleij Signed-off-by: Michael Ellerman arch/powerpc/sysdev/simple_gpio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 99acc9bede06bbb2662aafff51f5b9e529fa845e Author: Michael Ellerman Date: Mon May 29 20:26:07 2017 +1000 powerpc/spufs: Fix coredump of SPU contexts If a process dumps core while it has SPU contexts active then we have code to also dump information about the SPU contexts. Unfortunately it's been broken for 3 1/2 years, and we didn't notice. In commit 7b1f4020d0d1 ("spufs: get rid of dump_emit() wrappers") the nread variable was removed and rc used instead. That means when the loop exits successfully, rc has the number of bytes read, but it's then used as the return value for the function, which should return 0 on success. So fix it by setting rc = 0 before returning in the success case. Fixes: 7b1f4020d0d1 ("spufs: get rid of dump_emit() wrappers") Signed-off-by: Michael Ellerman Acked-by: Jeremy Kerr Signed-off-by: Michael Ellerman arch/powerpc/platforms/cell/spufs/coredump.c | 2 ++ 1 file changed, 2 insertions(+) commit a2b05b7aa60e1e9b60faf01dfb1cca35638d1ab1 Author: Nicholas Piggin Date: Thu May 11 21:24:41 2017 +1000 powerpc/64s: Add dt_cpu_ftrs boot time setup option Provide a dt_cpu_ftrs= cmdline option to disable the dt_cpu_ftrs CPU feature discovery, and fall back to the "cputable" based version. Also allow control of advertising unknown features to userspace and with this parameter, and remove the clunky CONFIG option. Signed-off-by: Nicholas Piggin [mpe: Add explicit early check of bootargs in dt_cpu_ftrs_init()] Signed-off-by: Michael Ellerman Documentation/admin-guide/kernel-parameters.txt | 9 ++++ arch/powerpc/Kconfig | 5 --- arch/powerpc/kernel/dt_cpu_ftrs.c | 57 +++++++++++++++++++++---- 3 files changed, 57 insertions(+), 14 deletions(-) commit 9605bc46433d54f89b12d443a3d9aabf8070824b Author: Fengguang Wu Date: Tue May 16 20:41:45 2017 +0800 phy: qualcomm: phy-qcom-qmp: fix application of sizeof to pointer drivers/phy/qualcomm/phy-qcom-qmp.c:847:37-43: 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: Vivek Gautam Signed-off-by: Fengguang Wu Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-qcom-qmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47a66eed99e6f231f4a1d261a9d493f4eee94829 Author: ZhuangYanying Date: Fri May 26 13:16:48 2017 +0800 KVM: x86: Fix nmi injection failure when vcpu got blocked When spin_lock_irqsave() deadlock occurs inside the guest, vcpu threads, other than the lock-holding one, would enter into S state because of pvspinlock. Then inject NMI via libvirt API "inject-nmi", the NMI could not be injected into vm. The reason is: 1 It sets nmi_queued to 1 when calling ioctl KVM_NMI in qemu, and sets cpu->kvm_vcpu_dirty to true in do_inject_external_nmi() meanwhile. 2 It sets nmi_queued to 0 in process_nmi(), before entering guest, because cpu->kvm_vcpu_dirty is true. It's not enough just to check nmi_queued to decide whether to stay in vcpu_block() or not. NMI should be injected immediately at any situation. Add checking nmi_pending, and testing KVM_REQ_NMI replaces nmi_queued in vm_vcpu_has_events(). Do the same change for SMIs. Signed-off-by: Zhuang Yanying Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d9c1b5431d5f0e07575db785a022bce91051ac1d Author: Roman Pen Date: Thu Jun 1 10:55:03 2017 +0200 KVM: SVM: do not zero out segment attributes if segment is unusable or not present This is a fix for the problem [1], where VMCB.CPL was set to 0 and interrupt was taken on userspace stack. The root cause lies in the specific AMD CPU behaviour which manifests itself as unusable segment attributes on SYSRET. The corresponding work around for the kernel is the following: 61f01dd941ba ("x86_64, asm: Work around AMD SYSRET SS descriptor attribute issue") In other turn virtualization side treated unusable segment incorrectly and restored CPL from SS attributes, which were zeroed out few lines above. In current patch it is assured only that P bit is cleared in VMCB.save state and segment attributes are not zeroed out if segment is not presented or is unusable, therefore CPL can be safely restored from DPL field. This is only one part of the fix, since QEMU side should be fixed accordingly not to zero out attributes on its side. Corresponding patch will follow. [1] Message id: CAJrWOzD6Xq==b-zYCDdFLgSRMPM-NkNuTSDFEtX=7MreT45i7Q@mail.gmail.com Signed-off-by: Roman Pen Signed-off-by: Mikhail Sennikovskii Cc: Paolo Bonzini Cc: Radim KrÄmář Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 1dbf647f31751a4e94fa0435c34f0f5ad5ce0adc Author: Arend Van Spriel Date: Fri May 26 13:02:55 2017 +0200 brcmfmac: fix alignment configuration on host using 64-bit DMA For SDIO the alignment requirement for transfers from device to host is configured in firmware. This configuration is limited to minimum of 4-byte alignment. However, this is not correct for platforms using 64-bit DMA when the minimum alignment should be 8 bytes. This issue appeared when the ALIGNMENT definition was set according the DMA configuration. The configuration in firmware was not using that macro defintion, but a hardcoded value of 4. Hence the driver reported alignment failures for data coming from the device and causing transfers to fail. Fixes: 6e84ab604bde ("brcmfmac: properly align buffers on certain platforms Reported-by: Hans de Goede Tested-by: Hans de Goede Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Hans de Goede Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2c3b14e1f0dcebdb695617c0c1342a36b914a47 Author: Takashi Iwai Date: Thu Jun 1 09:35:30 2017 +0200 ALSA: hda - Fix applying MSI dual-codec mobo quirk The previous commit [63691587f7b0: ALSA: hda - Apply dual-codec quirk for MSI Z270-Gaming mobo] attempted to apply the existing dual-codec quirk for a MSI mobo. But it turned out that this isn't applied properly due to the MSI-vendor quirk before this entry. I overlooked such two MSI entries just because they were put in the wrong position, although we have a list ordered by PCI SSID numbers. This patch fixes it by rearranging the unordered entries. Fixes: 63691587f7b0 ("ALSA: hda - Apply dual-codec quirk for MSI Z270-Gaming mobo") Reported-by: Rudolf Schmidt Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a37484638ca5e0aa7c205ecb91c9ace92e83c32c Merge: d602fb6 400129f Author: Linus Torvalds Date: Wed May 31 21:53:49 2017 -0700 Merge tag 'drm-fixes-for-v4.12-rc4' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "This is the main set of fixes for rc4, one amdgpu fix, some exynos regression fixes, some msm fixes and some i915 and GVT fixes. I've got a second regression fix for some DP chips that might be a bit large, but I think we'd like to land it now, I'll send it along tomorrow, once you are happy with this set" * tag 'drm-fixes-for-v4.12-rc4' of git://people.freedesktop.org/~airlied/linux: (24 commits) drm/amdgpu: Program ring for vce instance 1 at its register space drm/exynos: clean up description of exynos_drm_crtc drm/exynos: dsi: Remove bridge node reference in removal drm/exynos: dsi: Fix the parse_dt function drm/exynos: Merge pre/postclose hooks drm/msm: Fix the check for the command size drm/msm: Take the mutex before calling msm_gem_new_impl drm/msm: for array in-fences, check if all backing fences are from our own context before waiting drm/msm: constify irq_domain_ops drm/msm/mdp5: release hwpipe(s) for unused planes drm/msm: Reuse dma_fence_release. drm/msm: Expose our reservation object when exporting a dmabuf. drm/msm/gpu: check legacy clk names in get_clocks() drm/msm/mdp5: use __drm_atomic_helper_plane_duplicate_state() drm/msm: select PM_OPP drm/i915: Stop pretending to mask/unmask LPE audio interrupts drm/i915/selftests: Silence compiler warning in igt_ctx_exec Revert "drm/i915: Restore lost "Initialized i915" welcome message" drm/i915/gvt: clean up unsubmited workloads before destroying kmem cache drm/i915/gvt: Disable compression workaround for Gen9 ... commit 70bdf2026d905b8bfa0a455d35018df3e9777a6c Author: Martin K. Petersen Date: Fri May 19 12:39:36 2017 -0400 scsi: scsi_debug: Avoid PI being disabled when TPGS is enabled It was not possible to enable both T10 PI and TPGS because they share the same byte in the INQUIRY response. Logically OR the TPGS value instead of using assignment. Reported-by: Ritika Srivastava Reviewed-by: Bart Van Assche Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen drivers/scsi/scsi_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cd3b6ebff8510b2139d64024411207090cfe0a9 Author: Bill Kuzeja Date: Thu May 25 15:26:31 2017 -0400 scsi: qla2xxx: Fix extraneous ref on sp's after adapter break Hung task timeouts can result if a qlogic board breaks unexpectedly while running I/O. These tasks become hung because command srb reference counts are not going to zero, hence the affected srbs and commands do not get freed. This fix accounts for this extra reference in the srbs in the case of a board failure. Fixes: a465537ad1a4 ("qla2xxx: Disable the adapter and skip error recovery in case of register disconnect") Signed-off-by: Bill Kuzeja Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e6ef6a77f51e403a1400241b9d029ecaba45a834 Author: Gustavo A. R. Silva Date: Tue May 23 10:09:28 2017 -0500 scsi: lpfc: prevent potential null pointer dereference Null check at line 966: if (ndlp) {, implies that ndlp might be NULL. Functions lpfc_nlp_set_state() and lpfc_issue_els_prli() dereference pointer ndlp. Include these function calls inside the IF block that tests pointer ndlp. Addresses-Coverity-ID: 1401856 Signed-off-by: Gustavo A. R. Silva Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_ct.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7c9fdfb7000715df2d187df251d11e4850ce94c8 Author: Guilherme G. Piccoli Date: Wed May 24 18:48:51 2017 -0300 scsi: lpfc: Avoid NULL pointer dereference in lpfc_els_abort() We might have a NULL pring in lpfc_els_abort(), for example on error recovery path, since queues are destroyed during error recovery mechanism. In this case, we should just drop the abort since the queues will be recreated anyway. This patch just verifies for NULL pointer and stop the abortion of the queue in case of a NULL pring. Also, this patch converts return type of lpfc_els_abort() from int to void, since it's not checked anywhere. Reported-by: Harsha Thyagaraja Reported-by: Naresh Bannoth Tested-by: Raphael Silva Signed-off-by: Guilherme G. Piccoli Reviewed-by: Johannes Thumshirn Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_crtn.h | 2 +- drivers/scsi/lpfc/lpfc_nportdisc.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit 9094367a9161858004eacb7373aa2bf48c51c16d Author: Arnd Bergmann Date: Fri May 19 10:04:31 2017 +0200 scsi: lpfc: nvmet_fc: fix format string The lpfc_nvmeio_data() tracing helper always takes a format string and three additional arguments. The latest caller has a format string with only two integer arguments, causing this harmless warning: drivers/scsi/lpfc/lpfc_nvmet.c: In function 'lpfc_nvmet_xmt_fcp_release': drivers/scsi/lpfc/lpfc_nvmet.c:802:25: error: too many arguments for format [-Werror=format-extra-args] lpfc_nvmeio_data(phba, "NVMET FCP FREE: xri x%x ste %d\n", ctxp->oxid, We could add a dummy argument here, but it seems reasonable to print the 'abort' flag as the third argument. Fixes: 19b58d9473e8 ("nvmet_fc: add req_release to lldd api") Signed-off-by: Arnd Bergmann Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 400129f0a3ae989c30b37104bbc23b35c9d7a9a4 Merge: 8ef6fcc e379cbe Author: Dave Airlie Date: Thu Jun 1 12:07:48 2017 +1000 Merge tag 'exynos-drm-fixes-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes - Fix a regression to description of exynos_drm_crtc - Remove preclose hook of Exynos . This was a exynos change of the patch series[1] merged already. - Fix one dt broken issue - Make sure to release bridge_node of Exynos MIPI-DSI driver. [1] https://lists.freedesktop.org/archives/dri-devel/2017-March/135111.html * tag 'exynos-drm-fixes-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: clean up description of exynos_drm_crtc drm/exynos: dsi: Remove bridge node reference in removal drm/exynos: dsi: Fix the parse_dt function drm/exynos: Merge pre/postclose hooks commit 8ef6fcc8eebbea8c90735ef362b96bf1cafcd45f Merge: 58b58f6 45cc658 Author: Dave Airlie Date: Thu Jun 1 12:07:18 2017 +1000 Merge branch 'drm-fixes-4.12' of git://people.freedesktop.org/~agd5f/linux into drm-fixes * 'drm-fixes-4.12' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: Program ring for vce instance 1 at its register space commit 58b58f6ef582426710724a2b01ac230a0d542b5f Merge: 25f480e d72fea5 Author: Dave Airlie Date: Thu Jun 1 12:06:34 2017 +1000 Merge branch 'msm-fixes-4.12-rc4' of git://people.freedesktop.org/~robclark/linux into drm-fixes a few fixes for 4.12.. * 'msm-fixes-4.12-rc4' of git://people.freedesktop.org/~robclark/linux: drm/msm: Fix the check for the command size drm/msm: Take the mutex before calling msm_gem_new_impl drm/msm: for array in-fences, check if all backing fences are from our own context before waiting drm/msm: constify irq_domain_ops drm/msm/mdp5: release hwpipe(s) for unused planes drm/msm: Reuse dma_fence_release. drm/msm: Expose our reservation object when exporting a dmabuf. drm/msm/gpu: check legacy clk names in get_clocks() drm/msm/mdp5: use __drm_atomic_helper_plane_duplicate_state() drm/msm: select PM_OPP commit 25f480e89a022d382ddc5badc23b49426e89eabc Merge: 5ed02db 9bd9590 Author: Dave Airlie Date: Thu Jun 1 11:53:34 2017 +1000 Merge tag 'drm-intel-fixes-2017-05-29' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes drm/i915 fixes for v4.12-rc4 * tag 'drm-intel-fixes-2017-05-29' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: Stop pretending to mask/unmask LPE audio interrupts drm/i915/selftests: Silence compiler warning in igt_ctx_exec Revert "drm/i915: Restore lost "Initialized i915" welcome message" drm/i915/gvt: clean up unsubmited workloads before destroying kmem cache drm/i915/gvt: Disable compression workaround for Gen9 drm/i915: set initialised only when init_context callback is NULL drm/i915: Fix new -Wint-in-bool-context gcc compiler warning drm/i915: use vma->size for appgtt allocate_va_range drm/i915: Do not sync RCU during shrinking commit 5e0cf5e6c43b9e19fc0284f69e5cd2b4a47523b0 Author: Jiang Yi Date: Tue May 16 17:57:55 2017 +0800 iscsi-target: Always wait for kthread_should_stop() before kthread exit There are three timing problems in the kthread usages of iscsi_target_mod: - np_thread of struct iscsi_np - rx_thread and tx_thread of struct iscsi_conn In iscsit_close_connection(), it calls send_sig(SIGINT, conn->tx_thread, 1); kthread_stop(conn->tx_thread); In conn->tx_thread, which is iscsi_target_tx_thread(), when it receive SIGINT the kthread will exit without checking the return value of kthread_should_stop(). So if iscsi_target_tx_thread() exit right between send_sig(SIGINT...) and kthread_stop(...), the kthread_stop() will try to stop an already stopped kthread. This is invalid according to the documentation of kthread_stop(). (Fix -ECONNRESET logout handling in iscsi_target_tx_thread and early iscsi_target_rx_thread failure case - nab) Signed-off-by: Jiang Yi Cc: # v3.12+ Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 30 ++++++++++++++++++++++++------ drivers/target/iscsi/iscsi_target_erl0.c | 6 +++++- drivers/target/iscsi/iscsi_target_erl0.h | 2 +- drivers/target/iscsi/iscsi_target_login.c | 4 ++++ 4 files changed, 34 insertions(+), 8 deletions(-) commit 25cdda95fda78d22d44157da15aa7ea34be3c804 Author: Nicholas Bellinger Date: Wed May 24 21:47:09 2017 -0700 iscsi-target: Fix initial login PDU asynchronous socket close OOPs This patch fixes a OOPs originally introduced by: commit bb048357dad6d604520c91586334c9c230366a14 Author: Nicholas Bellinger Date: Thu Sep 5 14:54:04 2013 -0700 iscsi-target: Add sk->sk_state_change to cleanup after TCP failure which would trigger a NULL pointer dereference when a TCP connection was closed asynchronously via iscsi_target_sk_state_change(), but only when the initial PDU processing in iscsi_target_do_login() from iscsi_np process context was blocked waiting for backend I/O to complete. To address this issue, this patch makes the following changes. First, it introduces some common helper functions used for checking socket closing state, checking login_flags, and atomically checking socket closing state + setting login_flags. Second, it introduces a LOGIN_FLAGS_INITIAL_PDU bit to know when a TCP connection has dropped via iscsi_target_sk_state_change(), but the initial PDU processing within iscsi_target_do_login() in iscsi_np context is still running. For this case, it sets LOGIN_FLAGS_CLOSED, but doesn't invoke schedule_delayed_work(). The original NULL pointer dereference case reported by MNC is now handled by iscsi_target_do_login() doing a iscsi_target_sk_check_close() before transitioning to FFP to determine when the socket has already closed, or iscsi_target_start_negotiation() if the login needs to exchange more PDUs (eg: iscsi_target_do_login returned 0) but the socket has closed. For both of these cases, the cleanup up of remaining connection resources will occur in iscsi_target_start_negotiation() from iscsi_np process context once the failure is detected. Finally, to handle to case where iscsi_target_sk_state_change() is called after the initial PDU procesing is complete, it now invokes conn->login_work -> iscsi_target_do_login_rx() to perform cleanup once existing iscsi_target_sk_check_close() checks detect connection failure. For this case, the cleanup of remaining connection resources will occur in iscsi_target_do_login_rx() from delayed workqueue process context once the failure is detected. Reported-by: Mike Christie Reviewed-by: Mike Christie Tested-by: Mike Christie Cc: Mike Christie Reported-by: Hannes Reinecke Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: Varun Prakash Cc: # v3.12+ Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_nego.c | 194 +++++++++++++++++++++---------- include/target/iscsi/iscsi_target_core.h | 1 + 2 files changed, 133 insertions(+), 62 deletions(-) commit d85da227c3ae43d9ca513d60f244213cb4e55485 Author: Chen-Yu Tsai Date: Wed May 31 15:58:23 2017 +0800 clk: sunxi-ng: a64: Export PLL_PERIPH0 clock for the PRCM The PRCM takes PLL_PERIPH0 as one of its parents for the AR100 clock. As such we need to be able to describe this relationship in the device tree. Export the PLL_PERIPH0 clock so we can reference it in the PRCM node. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun50i-a64.h | 4 +++- include/dt-bindings/clock/sun50i-a64-ccu.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) commit c4be8c68e6900b1811bc64f74cb13d5032a389ce Author: Chen-Yu Tsai Date: Wed May 31 15:58:21 2017 +0800 clk: sunxi-ng: h3: Export PLL_PERIPH0 clock for the PRCM The PRCM takes PLL_PERIPH0 as one of its parents for the AR100 clock. As such we need to be able to describe this relationship in the device tree. Export the PLL_PERIPH0 clock so we can reference it in the PRCM node. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-h3.h | 4 +++- include/dt-bindings/clock/sun8i-h3-ccu.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) commit a91afc974ee8441940241e3c39c75d7b8f38e911 Author: Chen-Yu Tsai Date: Wed May 31 15:58:19 2017 +0800 dt-bindings: clock: sunxi-ccu: Add pll-periph to PRCM's needed clocks The AR100 clock in the PRCM has parents, one of which is pll-periph from the main CCU. Add it to the list of required clocks for the PRCM CCU. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/clock/sunxi-ccu.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c2e8471d98f072f0f18acdd7df5b401ed0d29a2c Author: Roopa Prabhu Date: Tue May 30 23:50:36 2017 -0700 mpls: fix clearing of dead nh_flags on link up recent fixes to use WRITE_ONCE for nh_flags on link up, accidently ended up leaving the deadflags on a nh. This patch fixes the WRITE_ONCE to use freshly evaluated nh_flags. Fixes: 39eb8cd17588 ("net: mpls: rt_nhn_alive and nh_flags should be accessed using READ_ONCE") Reported-by: Satish Ashok Signed-off-by: Roopa Prabhu Acked-by: David Ahern Signed-off-by: David S. Miller net/mpls/af_mpls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8f4ae85439f34bec3b0ab69223a41809dab28c9 Author: Jia-Ju Bai Date: Wed May 31 09:40:11 2017 +0800 isdn: Fix a sleep-in-atomic bug The driver may sleep under a spin lock, the function call path is: isdn_ppp_mp_receive (acquire the lock) isdn_ppp_mp_reassembly isdn_ppp_push_higher isdn_ppp_decompress isdn_ppp_ccp_reset_trans isdn_ppp_ccp_reset_alloc_state kzalloc(GFP_KERNEL) --> may sleep To fixed it, the "GFP_KERNEL" is replaced with "GFP_ATOMIC". Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller drivers/isdn/i4l/isdn_ppp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7cf69ae171592d133c69b9adaa5de7cfb6038ea Author: Tejun Heo Date: Wed May 31 14:26:26 2017 -0400 libata: fix error checking in in ata_parse_force_one() ata_parse_force_one() was incorrectly comparing @p to @endp when it should have been comparing @id. The only consequence is that it may end up using an invalid port number in "libata.force" module param instead of rejecting it. Signed-off-by: Tejun Heo Reported-by: Petru-Florin Mihancea Link: https://bugzilla.kernel.org/show_bug.cgi?id=195785 drivers/ata/libata-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06d2d6431bc8d41ef5ffd8bd4b52cea9f72aed22 Author: Gustavo A. R. Silva Date: Tue May 30 17:38:43 2017 -0500 net: freescale: fix potential null pointer dereference Add NULL check before dereferencing pointer _id_ in order to avoid a potential NULL pointer dereference. Addresses-Coverity-ID: 1397995 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fsl_pq_mdio.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 1b8f8694bb4992135dac150bf44a6c139e573970 Author: Russell King Date: Tue May 30 21:38:18 2017 +0100 net: fix auto-loading of Marvell DSA driver Auto-loading of the Marvell DSA driver has stopped working with recent kernels. This seems to be due to the change of binding for DSA devices, moving them from the platform bus to the MDIO bus. In order for module auto-loading to work, we need to provide a MODALIAS string in the uevent file for the device. However, the device core does not automatically provide this, and needs each bus_type to implement a uevent method to generate these strings. The MDIO bus does not provide such a method, so no MODALIAS string is provided: .# cat /sys/bus/mdio_bus/devices/f1072004.mdio-mii\:04/uevent DRIVER=mv88e6085 OF_NAME=switch OF_FULLNAME=/soc/internal-regs/mdio@72004/switch@4 OF_COMPATIBLE_0=marvell,mv88e6085 OF_COMPATIBLE_N=1 In the case of OF-based devices, the solution is easy - of_device_uevent_modalias() does the work for us. After this is done, the uevent file looks like this: .# cat /sys/bus/mdio_bus/devices/f1072004.mdio-mii\:04/uevent DRIVER=mv88e6085 OF_NAME=switch OF_FULLNAME=/soc/internal-regs/mdio@72004/switch@4 OF_COMPATIBLE_0=marvell,mv88e6085 OF_COMPATIBLE_N=1 MODALIAS=of:NswitchTCmarvell,mv88e6085 which results in auto-loading of the Marvell DSA driver on Clearfog platforms. Fixes: c0405563a613 ("ARM: dts: armada-388-clearfog: Utilize new DSA binding") Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mdio_bus.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 1ba15b24f07c44f68067959522639226c963e212 Author: Christian Borntraeger Date: Wed May 31 10:18:55 2017 +0200 KVM: s390: fix ais handling vs cpu model If ais is disabled via cpumodel, we must act accordingly, even if KVM_CAP_S390_AIS was enabled. Signed-off-by: Christian Borntraeger Reviewed-by: Pierre Morel Reviewed-by: Yi Min Zhao Reviewed-by: Halil Pasic Reviewed-by: Eric Farman arch/s390/include/asm/kvm_host.h | 1 - arch/s390/kvm/interrupt.c | 4 ++-- arch/s390/kvm/kvm-s390.c | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) commit 898805e0cdf7fd860ec21bf661d3a0285a3defbd Author: Russell King Date: Tue May 30 16:21:51 2017 +0100 net: phy: fix marvell phy status reading The Marvell driver incorrectly provides phydev->lp_advertising as the logical and of the link partner's advert and our advert. This is incorrect - this field is supposed to store the link parter's unmodified advertisment. This allows ethtool to report the correct link partner auto-negotiation status. Fixes: be937f1f89ca ("Marvell PHY m88e1111 driver fix") Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 2 -- 1 file changed, 2 deletions(-) commit 45cc6586b7a73e84a8806881122b6ec306cdc9e7 Author: Leo Liu Date: Mon May 29 13:13:59 2017 -0400 drm/amdgpu: Program ring for vce instance 1 at its register space We need program ring buffer on instance 1 register space domain, when only if instance 1 available, with two instances or instance 0, and we need only program instance 0 regsiter space domain for ring. Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 95 +++++++++++++++++++++++++---------- 1 file changed, 68 insertions(+), 27 deletions(-) commit 15e5651525c2e580a523568ed207e4a3fb11cc33 Author: Douglas Caetano dos Santos Date: Fri May 26 14:28:00 2017 -0300 tcp: reinitialize MTU probing when setting MSS in a TCP repair MTU probing initialization occurred only at connect() and at SYN or SYN-ACK reception, but the former sets MSS to either the default or the user set value (through TCP_MAXSEG sockopt) and the latter never happens with repaired sockets. The result was that, with MTU probing enabled and unless TCP_MAXSEG sockopt was used before connect(), probing would be stuck at tcp_base_mss value until tcp_probe_interval seconds have passed. Signed-off-by: Douglas Caetano dos Santos Signed-off-by: David S. Miller net/ipv4/tcp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6ea44adce91526700535b3150f77f8639ae8c82d Author: NeilBrown Date: Thu May 25 17:00:32 2017 +1000 SUNRPC: ensure correct error is reported by xs_tcp_setup_socket() If you attempt a TCP mount from an host that is unreachable in a way that triggers an immediate error from kernel_connect(), that error does not propagate up, instead EAGAIN is reported. This results in call_connect_status receiving the wrong error. A case that it easy to demonstrate is to attempt to mount from an address that results in ENETUNREACH, but first deleting any default route. Without this patch, the mount.nfs process is persistently runnable and is hard to kill. With this patch it exits as it should. The problem is caused by the fact that xs_tcp_force_close() eventually calls xprt_wake_pending_tasks(xprt, -EAGAIN); which causes an error return of -EAGAIN. so when xs_tcp_setup_sock() calls xprt_wake_pending_tasks(xprt, status); the status is ignored. Fixes: 4efdd92c9211 ("SUNRPC: Remove TCP client connection reset hack") Signed-off-by: NeilBrown Signed-off-by: Trond Myklebust net/sunrpc/xprtsock.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5a8948f8a32ba56c17b3fb75d318ac98157f3ba5 Author: Jan Kara Date: Wed May 31 09:44:33 2017 +0200 md: Make flush bios explicitely sync Commit b685d3d65ac7 "block: treat REQ_FUA and REQ_PREFLUSH as synchronous" removed REQ_SYNC flag from WRITE_{FUA|PREFLUSH|...} definitions. generic_make_request_checks() however strips REQ_FUA and REQ_PREFLUSH flags from a bio when the storage doesn't report volatile write cache and thus write effectively becomes asynchronous which can lead to performance regressions Fix the problem by making sure all bios which are synchronous are properly marked with REQ_SYNC. CC: linux-raid@vger.kernel.org CC: Shaohua Li Fixes: b685d3d65ac791406e0dfd8779cc9b3707fea5a3 CC: stable@vger.kernel.org Signed-off-by: Jan Kara Signed-off-by: Shaohua Li drivers/md/md.c | 2 +- drivers/md/raid5-cache.c | 4 ++-- drivers/md/raid5-ppl.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit d602fb6844940b23afb64d4bf70bb963c15571ee Merge: f511c0b a082c6f Author: Linus Torvalds Date: Wed May 31 08:29:02 2017 -0700 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: "Fix regressions: - missing CONFIG_EXPORTFS dependency - failure if upper fs doesn't support xattr - bad error cleanup This also adds the concept of "impure" directories complementing the "origin" marking introduced in -rc1. Together they enable getting consistent st_ino and d_ino for directory listings. And there's a bug fix and a cleanup as well" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: filter trusted xattr for non-admin ovl: mark upper merge dir with type origin entries "impure" ovl: mark upper dir with type origin entries "impure" ovl: remove unused arg from ovl_lookup_temp() ovl: handle rename when upper doesn't support xattr ovl: don't fail copy-up if upper doesn't support xattr ovl: check on mount time if upper fs supports setting xattr ovl: fix creds leak in copy up error path ovl: select EXPORTFS commit 5be6b75610cefd1e21b98a218211922c2feb6e08 Author: Hou Tao Date: Wed Mar 1 09:02:33 2017 +0800 cfq-iosched: fix the delay of cfq_group's vdisktime under iops mode When adding a cfq_group into the cfq service tree, we use CFQ_IDLE_DELAY as the delay of cfq_group's vdisktime if there have been other cfq_groups already. When cfq is under iops mode, commit 9a7f38c42c2b ("cfq-iosched: Convert from jiffies to nanoseconds") could result in a large iops delay and lead to an abnormal io schedule delay for the added cfq_group. To fix it, we just need to revert to the old CFQ_IDLE_DELAY value: HZ / 5 when iops mode is enabled. Despite having the same value, the delay of a cfq_queue in idle class and the delay of cfq_group are different things, so I define two new macros for the delay of a cfq_group under time-slice mode and iops mode. Fixes: 9a7f38c42c2b ("cfq-iosched: Convert from jiffies to nanoseconds") Cc: # 4.8+ Signed-off-by: Hou Tao Acked-by: Jan Kara Signed-off-by: Jens Axboe block/cfq-iosched.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 63db7c815bc0997c29e484d2409684fdd9fcd93b Author: Brian Foster Date: Wed May 31 08:22:52 2017 -0700 xfs: use ->b_state to fix buffer I/O accounting release race We've had user reports of unmount hangs in xfs_wait_buftarg() that analysis shows is due to btp->bt_io_count == -1. bt_io_count represents the count of in-flight asynchronous buffers and thus should always be >= 0. xfs_wait_buftarg() waits for this value to stabilize to zero in order to ensure that all untracked (with respect to the lru) buffers have completed I/O processing before unmount proceeds to tear down in-core data structures. The value of -1 implies an I/O accounting decrement race. Indeed, the fact that xfs_buf_ioacct_dec() is called from xfs_buf_rele() (where the buffer lock is no longer held) means that bp->b_flags can be updated from an unsafe context. While a user-level reproducer is currently not available, some intrusive hacks to run racing buffer lookups/ioacct/releases from multiple threads was used to successfully manufacture this problem. Existing callers do not expect to acquire the buffer lock from xfs_buf_rele(). Therefore, we can not safely update ->b_flags from this context. It turns out that we already have separate buffer state bits and associated serialization for dealing with buffer LRU state in the form of ->b_state and ->b_lock. Therefore, replace the _XBF_IN_FLIGHT flag with a ->b_state variant, update the I/O accounting wrappers appropriately and make sure they are used with the correct locking. This ensures that buffer in-flight state can be modified at buffer release time without racing with modifications from a buffer lock holder. Fixes: 9c7504aa72b6 ("xfs: track and serialize in-flight async buffers against unmount") Cc: # v4.8+ Signed-off-by: Brian Foster Reviewed-by: Nikolay Borisov Tested-by: Libor Pechacek Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf.c | 38 ++++++++++++++++++++++++++------------ fs/xfs/xfs_buf.h | 5 ++--- 2 files changed, 28 insertions(+), 15 deletions(-) commit ff0361b34ac63ef80c785c32d62e0e9d89a2cf89 Author: Jan Kara Date: Wed May 31 09:44:32 2017 +0200 dm: make flush bios explicitly sync Commit b685d3d65ac7 ("block: treat REQ_FUA and REQ_PREFLUSH as synchronous") removed REQ_SYNC flag from WRITE_{FUA|PREFLUSH|...} definitions. generic_make_request_checks() however strips REQ_FUA and REQ_PREFLUSH flags from a bio when the storage doesn't report volatile write cache and thus write effectively becomes asynchronous which can lead to performance regressions. Fix the problem by making sure all bios which are synchronous are properly marked with REQ_SYNC. Fixes: b685d3d65ac7 ("block: treat REQ_FUA and REQ_PREFLUSH as synchronous") Cc: stable@vger.kernel.org Signed-off-by: Jan Kara Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 2 +- drivers/md/dm-integrity.c | 3 ++- drivers/md/dm-raid1.c | 2 +- drivers/md/dm-snap-persistent.c | 3 ++- drivers/md/dm.c | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) commit 869e188a35c93f1bad7bf16c32f34a6feb5f79f1 Author: Daniel Vetter Date: Wed May 31 10:38:13 2017 +0200 drm: Fix locking in drm_atomic_helper_resume In the conversion to drop drm_modeset_lock_all and the magic implicit context I failed to realize that _resume starts out with a pile of state copies, but not with the locks. And hence drm_atomic_commit won't grab these for us. v2: Add locking checks in helpers to make sure we catch this in the future. Note we can only require the locks in the atomic_check phase, not in the commit phase. But since any commit is guaranteed to first run the checks (even for the resume stuff where we use stored duplicated old state) this should give us full coverage. Requested by Maarten. Cc: Jyri Sarha Fixes: a5b8444e289c ("drm/atomic-helper: remove modeset_lock_all from helper_resume") Cc: Maarten Lankhorst Reviewed-by: Maarten Lankhorst Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170531083813.1390-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic_helper.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit e49a14fa36aeb72476e038fcde96c151b7e4ecc8 Author: Takashi Iwai Date: Tue May 30 23:24:45 2017 +0200 ALSA: usb: Avoid VLA in mixer_us16x08.c This is another attempt to work around the VLA used in mixer_us16x08.c. Basically the temporary array is used individually for two cases, and we can declare locally in each block, instead of hackish max() usage. Signed-off-by: Takashi Iwai sound/usb/mixer_us16x08.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 617163fc2580da3d489b6c1bacb6312e0e2aac02 Author: Takashi Iwai Date: Tue May 30 23:21:07 2017 +0200 ALSA: usb: Fix a typo in Tascam US-16x08 mixer element A mixer element created in a quirk for Tascam US-16x08 contains a typo: it should be "EQ MidLow Q" instead of "EQ MidQLow Q". Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195875 Fixes: d2bb390a2081 ("ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk") Cc: # v4.11+ Signed-off-by: Takashi Iwai sound/usb/mixer_us16x08.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64188cfbe5245d412de2139a3864e4e00b4136f0 Author: Takashi Iwai Date: Tue May 30 09:23:41 2017 +0200 Revert "ALSA: usb-audio: purge needless variable length array" This reverts commit 89b593c30e83 ("ALSA: usb-audio: purge needless variable length array"). The patch turned out to cause a severe regression, triggering an Oops at snd_usb_ctl_msg(). It was overseen that snd_usb_ctl_msg() writes back the response to the given buffer, while the patch changed it to a read-only const buffer. (One should always double-check when an extra pointer cast is present...) As a simple fix, just revert the affected commit. It was merely a cleanup. Although it brings VLA again, it's clearer as a fix. We'll address the VLA later in another patch. Fixes: 89b593c30e83 ("ALSA: usb-audio: purge needless variable length array") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195875 Cc: # v4.11+ Signed-off-by: Takashi Iwai sound/usb/mixer_us16x08.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit efd11cc8fa1a6d8aba16bd6aaa774ecc3d02145f Author: Mark yao Date: Sat May 27 19:43:36 2017 +0800 drm/rockchip: Correct vop out_mode configure Force vop output mode on encoder driver seem not a good idea, EDP, HDMI, DisplayPort all have 10bit input on rk3399, On non-10bit vop, vop 8bit output bit[0-7] connect to the encoder high 8bit [2-9]. So force RGB10 to RGB888 on vop driver would be better. And another problem, EDP check crtc id on atomic_check, but encoder maybe NULL, so out_mode configure would fail, it cause edp no display. Signed-off-by: Mark Yao Reviewed-by: Jeffy Chen Link: http://patchwork.freedesktop.org/patch/msgid/1495885416-22216-1-git-send-email-mark.yao@rock-chips.com drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 12 ------------ drivers/gpu/drm/rockchip/cdn-dp-core.c | 9 ++------- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 8 ++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 3 +++ drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 2 ++ 5 files changed, 15 insertions(+), 19 deletions(-) commit 7ed1c5e5ddbb87aef9df7f8a8a714bcffe90f0eb Author: Patrick Venture Date: Tue May 30 12:42:01 2017 -0700 hwmon: (aspeed-pwm-tacho) On read failure return -ETIMEDOUT When the controller fails to provide an RPM reading within the alloted time; the driver returns -ETIMEDOUT and no file contents. Signed-off-by: Patrick Venture Fixes: 2d7a548a3eff ("drivers: hwmon: Support for ASPEED PWM/Fan tach") Signed-off-by: Guenter Roeck drivers/hwmon/aspeed-pwm-tacho.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 08fd5e76c268b7a5353302825b6b63a6027ddd0a Author: Guenter Roeck Date: Sat May 27 06:50:05 2017 -0700 hwmon: (aspeed-pwm-tacho) Select REGMAP The driver uses regmap and thus has to select it to avoid build errors such as the following. drivers/hwmon/aspeed-pwm-tacho.c:337:21: error: variable 'aspeed_pwm_tacho_regmap_config' has initializer but incomplete type Reported-by: kbuild test robot Acked-by: Joel Stanley Fixes: 2d7a548a3eff ("drivers: hwmon: Support for ASPEED PWM/Fan tach") Signed-off-by: Guenter Roeck drivers/hwmon/Kconfig | 1 + 1 file changed, 1 insertion(+) commit f511c0b17b081562dca8ac5061dfa86db4c66cc2 Author: Linus Torvalds Date: Tue May 30 12:38:59 2017 -0700 "Yes, people use FOLL_FORCE ;)" This effectively reverts commit 8ee74a91ac30 ("proc: try to remove use of FOLL_FORCE entirely") It turns out that people do depend on FOLL_FORCE for the /proc//mem case, and we're talking not just debuggers. Talking to the affected people, the use-cases are: Keno Fischer: "We used these semantics as a hardening mechanism in the julia JIT. By opening /proc/self/mem and using these semantics, we could avoid needing RWX pages, or a dual mapping approach. We do have fallbacks to these other methods (though getting EIO here actually causes an assert in released versions - we'll updated that to make sure to take the fall back in that case). Nevertheless the /proc/self/mem approach was our favored approach because it a) Required an attacker to be able to execute syscalls which is a taller order than getting memory write and b) didn't double the virtual address space requirements (as a dual mapping approach would). I think in general this feature is very useful for anybody who needs to precisely control the execution of some other process. Various debuggers (gdb/lldb/rr) certainly fall into that category, but there's another class of such processes (wine, various emulators) which may want to do that kind of thing. Now, I suspect most of these will have the other process under ptrace control, so maybe allowing (same_mm || ptraced) would be ok, but at least for the sandbox/remote-jit use case, it would be perfectly reasonable to not have the jit server be a ptracer" Robert O'Callahan: "We write to readonly code and data mappings via /proc/.../mem in lots of different situations, particularly when we're adjusting program state during replay to match the recorded execution. Like Julia, we can add workarounds, but they could be expensive." so not only do people use FOLL_FORCE for both reads and writes, but they use it for both the local mm and remote mm. With these comments in mind, we likely also cannot add the "are we actively ptracing" check either, so this keeps the new code organization and does not do a real revert that would add back the original comment about "Maybe we should limit FOLL_FORCE to actual ptrace users?" Reported-by: Keno Fischer Reported-by: Robert O'Callahan Cc: Kees Cook Cc: Andy Lutomirski Cc: Eric Biederman Signed-off-by: Linus Torvalds fs/proc/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4dc2b32df5573b077f6723e01cf761d236d5113 Author: Keith Busch Date: Tue May 30 14:39:11 2017 -0400 blk-mq: Take tagset lock when updating hw queues The tagset lock needs to be held when iterating the tag_list, so a lockdep assert was added when updating number of hardware queues. The drivers calling this API, however, were unaware of the new requirement, so are failing the assertion. This patch takes the lock within the blk-mq function so the drivers do not have to be modified in order to be safe. Fixes: 705cda97e ("blk-mq: Make it safe to use RCU to iterate over blk_mq_tag_set.tag_list") Reported-by: Gabriel Krisman Bertazi Reviewed-by: Bart Van Assche Signed-off-by: Keith Busch Signed-off-by: Jens Axboe block/blk-mq.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit b9565077ae6c8695e3668071b109aecfbf8537c3 Merge: f0d7ae9 1775675 Author: David S. Miller Date: Tue May 30 14:18:16 2017 -0400 Merge branch 'mlx4-mlx5-MAINTAINERS-update' Tariq Toukan says: ==================== MAINTAINERS updates This patchset contains updates to the MAINTAINERS file. In the first patch, I replace Yishai as the maintainer of the mlx4_core driver. In the other two patches we move an RDMA header file from the list of the mlx4/mlx5 core driver into the respective IB driver, where it belongs. Series generated against net commit: 468b0df61a51 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf ==================== Signed-off-by: David S. Miller commit 177567580aa1c3ec6e900b25280a52f02f93469f Author: Tariq Toukan Date: Tue May 30 11:44:06 2017 +0300 MAINTAINERS: Move mlx5 rdma header file to IB driver charge It belongs there, should not be under mlx5 Core driver. Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39acf4e242621bd2b5d992a7ef2fd3358065d576 Author: Tariq Toukan Date: Tue May 30 11:44:05 2017 +0300 MAINTAINERS: Move mlx4 rdma header file to IB driver charge It belongs there, should not be under mlx4 Core driver. Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a1d08726230ead4817e9c22f2736b9ff21bf6af Author: Tariq Toukan Date: Tue May 30 11:44:04 2017 +0300 MAINTAINERS: Update MELLANOX MLX4 core VPI driver maintainer Add myself as a maintainer for mlx4 core driver, replacing Yishai Hadas. Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0d7ae95fff4ab444b8433f07afc4b077ef1a285 Author: Arnd Bergmann Date: Mon May 29 15:00:17 2017 +0200 net/mlx5: avoid build warning for uniprocessor Building the driver with CONFIG_SMP disabled results in a harmless warning: ethernet/mellanox/mlx5/core/main.c: In function 'mlx5_irq_set_affinity_hint': ethernet/mellanox/mlx5/core/main.c:615:6: error: unused variable 'irq' [-Werror=unused-variable] It's better to express the conditional compilation using IS_ENABLED() here, as that lets the compiler see what the intented use for the variable is, and that it can be silently discarded. Fixes: b665d98edc9a ("net/mlx5: Tolerate irq_set_affinity_hint() failures") Signed-off-by: Arnd Bergmann Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 59b2c3140f329e5817197f84860f3fa61a742fdf Author: Arnd Bergmann Date: Mon May 29 14:56:01 2017 +0200 net: dsa: mv88e6xxx: Add missing static to stub functions 'static' was not enough, the helpers must be 'static inline' net/dsa/mv88e6xxx/global2.h:123:12: error: 'mv88e6xxx_g2_misc_4_bit_port' defined but not used [-Werror=unused-function] net/dsa/mv88e6xxx/global2.h:117:12: error: 'mv88e6xxx_g2_pvt_write' defined but not used [-Werror=unused-function] Fixes: c21fbe29f858 ("net: dsa: mv88e6xxx: Add missing static to stub functions") Signed-off-by: Arnd Bergmann Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 512c7840cd692fdac0333684249753ebf3c819f9 Author: Mintz, Yuval Date: Mon May 29 11:24:49 2017 +0300 qed: Don't log missing periodic stats by default Current implementation lacks the logic for providing management firmware with RDMA-related statistics; [much] worse than that - it logs such events by default to system logs. Since the statistics' gathering is done periodically, using sufficiently new management firmware the system logs would get filled with these unnecessary prints. For now, reduce the verbosity of the log so that it would not be logged by default. Fixes: 6c75424612a7 ("qed: Add support for NCSI statistics") Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5ee6842cd8aff517701549463927cb1e5eb50b01 Author: Madalin Bucur Date: Mon May 29 09:22:06 2017 +0300 Documentation: networking: add DPAA Ethernet document Signed-off-by: Madalin Bucur Signed-off-by: Camelia Groza Signed-off-by: David S. Miller Documentation/networking/dpaa.txt | 194 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 194 insertions(+) commit 025d0973a0ec2121c6fd0da59e8cc3829fbb221e Author: Guilherme G. Piccoli Date: Sun May 28 23:07:01 2017 -0300 cxgb4: avoid crash on PCI error recovery path During PCI error recovery process, specifically on eeh_err_detected() we might have a NULL netdev struct, hence a direct dereference will lead to a kernel oops. This was observed with latest upstream kernel (v4.12-rc2) on Chelsio adapter T422-CR in PowerPC machines. This patch checks for NULL pointer and avoids the crash, both in eeh_err_detected() and eeh_resume(). Also, we avoid to trigger a fatal error or to try disabling interrupts on FW during PCI error recovery, because: (a) driver might not be able to accurately access PCI regions in this case, and (b) trigger a fatal error _during_ the recovery steps is a mistake that could prevent the recovery path to complete successfully. Reported-by: Harsha Thyagaraja Signed-off-by: Guilherme G. Piccoli Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 21 +++++++++++++-------- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 9 +++++++-- 2 files changed, 20 insertions(+), 10 deletions(-) commit 8eae9570d1d3887487be0b355d12656b46fac226 Author: Gioh Kim Date: Tue May 30 15:24:45 2017 +0200 KVM: SVM: ignore type when setting segment registers Commit 19bca6ab75d8 ("KVM: SVM: Fix cross vendor migration issue with unusable bit") added checking type when setting unusable. So unusable can be set if present is 0 OR type is 0. According to the AMD processor manual, long mode ignores the type value in segment descriptor. And type can be 0 if it is read-only data segment. Therefore type value is not related to unusable flag. This patch is based on linux-next v4.12.0-rc3. Signed-off-by: Gioh Kim Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbf712792b6e61317b93dd56dd5c0784363c9ac9 Author: Radim Krčmář Date: Fri May 19 15:48:51 2017 +0200 KVM: nVMX: fix nested_vmx_check_vmptr failure paths under debugging kvm_skip_emulated_instruction() will return 0 if userspace is single-stepping the guest. kvm_skip_emulated_instruction() uses return status convention of exit handler: 0 means "exit to userspace" and 1 means "continue vm entries". The problem is that nested_vmx_check_vmptr() return status means something else: 0 is ok, 1 is error. This means we would continue executing after a failure. Static checker noticed it because vmptr was not initialized. Reported-by: Dan Carpenter Fixes: 6affcbedcac7 ("KVM: x86: Add kvm_skip_emulated_instruction and use it.") Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 140 ++++++++++++++++++++++------------------------------- 1 file changed, 57 insertions(+), 83 deletions(-) commit fa9765323a93473d3853d04c9903958453c92ad4 Author: Ilya Dryomov Date: Tue May 23 17:49:55 2017 +0200 nbd: don't leak nbd_config nbd_config is allocated in nbd_alloc_config(), but never freed. Fixes: 5ea8d10802ec ("nbd: separate out the config information") Signed-off-by: Ilya Dryomov Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 1 + 1 file changed, 1 insertion(+) commit af622b86665881ffa96bc77fb89c94fae02cfa6b Author: Ilya Dryomov Date: Tue May 23 17:49:54 2017 +0200 nbd: nbd_reset() call in nbd_dev_add() is redundant There is nothing to clear -- nbd_device has just been allocated. Fold nbd_reset() into its other caller, nbd_config_put(). Signed-off-by: Ilya Dryomov Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 477c50e8dc1c7b5004e099b8b74ca8b70be2f4fd Author: Wei Huang Date: Tue May 30 11:56:22 2017 +0100 drivers/perf: arm_pmu_acpi: avoid perf IRQ init when guest PMU is off We saw perf IRQ init failures when running Linux kernel in an ACPI guest without PMU (i.e. pmu=off). This is because perf IRQ is not present when pmu=off, but arm_pmu_acpi still tries to register or unregister GSI. This patch addresses the problem by checking gicc->performance_interrupt. If it is 0, which is the value set by qemu when pmu=off, we skip the IRQ register/unregister process. [ 4.069470] bc00: 0000000000040b00 ffff0000089db190 [ 4.070267] [] enable_percpu_irq+0xdc/0xe4 [ 4.071192] [] arm_perf_starting_cpu+0x108/0x10c [ 4.072200] [] cpuhp_invoke_callback+0x14c/0x4ac [ 4.073210] [] cpuhp_thread_fun+0xd4/0x11c [ 4.074132] [] smpboot_thread_fn+0x1b4/0x1c4 [ 4.075081] [] kthread+0x10c/0x138 [ 4.075921] [] ret_from_fork+0x10/0x50 [ 4.076947] genirq: Setting trigger mode 4 for irq 43 failed (gic_set_type+0x0/0x74) Signed-off-by: Wei Huang [will: add comment justifying deviation from ACPI spec, removed redundant hunk] Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas drivers/perf/arm_pmu_acpi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f434b1c4aba5cc4e5bae4399a965b5fd14011d69 Author: Sekhar Nori Date: Thu May 25 15:08:07 2017 +0530 MAINTAINERS: add device-tree files to TI DaVinci entry Add device-tree files relevant to TI DaVinci platform to its entry so mach-davinci sub-arch maintainers get copied on patches with device-tree file updates. Signed-off-by: Sekhar Nori MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit d3e01c51598b2639a4830549058500e5f2ace86f Author: Sricharan R Date: Sat May 27 19:17:45 2017 +0530 arm: dma-mapping: Reset the device's dma_ops arch_teardown_dma_ops() being the inverse of arch_setup_dma_ops() ,dma_ops should be cleared in the teardown path. Currently, only the device's iommu mapping structures are cleared in arch_teardown_dma_ops, but not the dma_ops. So on the next reprobe, dma_ops left in place is stale from the first IOMMU setup, but iommu mappings has been disposed of. This is a problem when the probe of the device is deferred and recalled with the IOMMU probe deferral. So for fixing this, slightly refactor by moving the code from __arm_iommu_detach_device to arm_iommu_detach_device and cleanup the former. This takes care of resetting the dma_ops in the teardown path. Fixes: 09515ef5ddad ("of/acpi: Configure dma operations at probe time for platform/amba/pci bus devices") Reviewed-by: Laurent Pinchart Signed-off-by: Sricharan R Signed-off-by: Joerg Roedel arch/arm/mm/dma-mapping.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 4dac3210c54a04be9c187dd31b4debb46e3d792b Author: Lorenzo Pieralisi Date: Sat May 27 19:17:44 2017 +0530 ACPI/IORT: Move the check to get iommu_ops from translated fwspec With IOMMU probe deferral, iort_iommu_configure can be called multiple times for the same device. Hence we have a check to see if the device's fwspec is already translated and return the iommu_ops from that directly. But the check is wrongly placed in iort_iommu_xlate, which breaks devices with multiple sids. Move the check to iort_iommu_configure. Fixes: 5a1bb638d567 ("drivers: acpi: Handle IOMMU lookup failure with deferred probing or error") Tested-by: Nate Watterson Signed-off-by: Lorenzo Pieralisi Signed-off-by: Joerg Roedel drivers/acpi/arm64/iort.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit a93a121a96531b99d6feb8db96417b49e1bb28e8 Author: Laurent Pinchart Date: Sat May 27 19:17:43 2017 +0530 ARM: dma-mapping: Don't tear down third-party mappings arch_setup_dma_ops() is used in device probe code paths to create an IOMMU mapping and attach it to the device. The function assumes that the device is attached to a device-specific IOMMU instance (or at least a device-specific TLB in a shared IOMMU instance) and thus creates a separate mapping for every device. On several systems (Renesas R-Car Gen2 being one of them), that assumption is not true, and IOMMU mappings must be shared between multiple devices. In those cases the IOMMU driver knows better than the generic ARM dma-mapping layer and attaches mapping to devices manually with arm_iommu_attach_device(), which sets the DMA ops for the device. The arch_setup_dma_ops() function takes this into account and bails out immediately if the device already has DMA ops assigned. However, the corresponding arch_teardown_dma_ops() function, called from driver unbind code paths (including probe deferral), will tear the mapping down regardless of who created it. When the device is reprobed arch_setup_dma_ops() will be called again but won't perform any operation as the DMA ops will still be set. We need to reset the DMA ops in arch_teardown_dma_ops() to fix this. However, we can't do so unconditionally, as then a new mapping would be created by arch_setup_dma_ops() when the device is reprobed, regardless of whether the device needs to share a mapping or not. We must thus keep track of whether arch_setup_dma_ops() created the mapping, and only in that case tear it down in arch_teardown_dma_ops(). Keep track of that information in the dev_archdata structure. As the structure is embedded in all instances of struct device let's not grow it, but turn the existing dma_coherent bool field into a bitfield that can be used for other purposes. Fixes: 09515ef5ddad ("of/acpi: Configure dma operations at probe time for platform/amba/pci bus devices") Reviewed-by: Robin Murphy Signed-off-by: Laurent Pinchart Signed-off-by: Joerg Roedel arch/arm/include/asm/device.h | 3 ++- arch/arm/mm/dma-mapping.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 058f8c3fb44d028ba44c2e3635d8bee9787018d6 Author: Sricharan R Date: Sat May 27 19:17:42 2017 +0530 ACPI/IORT: Ignore all errors except EPROBE_DEFER While deferring the probe of IOMMU masters, xlate and add_device callbacks called from iort_iommu_configure can pass back error values like -ENODEV, which means the IOMMU cannot be connected with that master for real reasons. Before the IOMMU probe deferral, all such errors were ignored. Now all those errors are propagated back, killing the master's probe for such errors. Instead ignore all the errors except EPROBE_DEFER, which is the only one of concern and let the master work without IOMMU, thus restoring the old behavior. Also make explicit that acpi_dma_configure handles only -EPROBE_DEFER from iort_iommu_configure. Fixes: 5a1bb638d567 ("drivers: acpi: Handle IOMMU lookup failure with deferred probing or error") Signed-off-by: Sricharan R Signed-off-by: Joerg Roedel drivers/acpi/arm64/iort.c | 6 ++++++ drivers/acpi/scan.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit a37b19a384914c60b7e1264a6c21e7bf96b637e8 Author: Sricharan R Date: Sat May 27 19:17:41 2017 +0530 iommu/of: Ignore all errors except EPROBE_DEFER While deferring the probe of IOMMU masters, xlate and add_device callbacks called from of_iommu_configure can pass back error values like -ENODEV, which means the IOMMU cannot be connected with that master for real reasons. Before the IOMMU probe deferral, all such errors were ignored. Now all those errors are propagated back, killing the master's probe for such errors. Instead ignore all the errors except EPROBE_DEFER, which is the only one of concern and let the master work without IOMMU, thus restoring the old behavior. Also make explicit that of_dma_configure handles only -EPROBE_DEFER from of_iommu_configure. Fixes: 7b07cbefb68d ("iommu: of: Handle IOMMU lookup failure with deferred probing or error") Reported-by: Geert Uytterhoeven Tested-by: Magnus Damn Signed-off-by: Sricharan R Signed-off-by: Joerg Roedel drivers/iommu/of_iommu.c | 6 ++++++ drivers/of/device.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit 573d41757c47cb71cd572236685d4c9e6cacc06c Author: Sricharan R Date: Sat May 27 19:17:40 2017 +0530 iommu/of: Fix check for returning EPROBE_DEFER Now with IOMMU probe deferral, we return -EPROBE_DEFER for masters that are connected to an IOMMU which is not probed yet, but going to get probed, so that we can attach the correct dma_ops. So while trying to defer the probe of the master, check if the of_iommu node that it is connected to is marked in DT as 'status=disabled', then the IOMMU is never is going to get probed. So simply return NULL and let the master work without an IOMMU. Fixes: 7b07cbefb68d ("iommu: of: Handle IOMMU lookup failure with deferred probing or error") Reported-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Tested-by: Will Deacon Tested-by: Magnus Damn Acked-by: Will Deacon Signed-off-by: Sricharan R Signed-off-by: Joerg Roedel drivers/iommu/of_iommu.c | 1 + 1 file changed, 1 insertion(+) commit 4b1c88984c8ac894c2c411570757bed7fa5f3226 Author: Arnd Bergmann Date: Thu May 18 15:13:57 2017 +0200 iommu/dma: Fix function declaration Newly added code in the ipmmu-vmsa driver showed a small mistake in a header file that can't be included by itself without CONFIG_IOMMU_DMA enabled: In file included from drivers/iommu/ipmmu-vmsa.c:13:0: include/linux/dma-iommu.h:105:94: error: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] This adds a forward declaration for 'struct device', similar to how we treat the other struct types in this case. Fixes: 3ae47292024f ("iommu/ipmmu-vmsa: Add new IOMMU_DOMAIN_DMA ops") Fixes: 273df9635385 ("iommu/dma: Make PCI window reservation generic") Signed-off-by: Arnd Bergmann Acked-by: Robin Murphy Signed-off-by: Joerg Roedel include/linux/dma-iommu.h | 1 + 1 file changed, 1 insertion(+) commit 7a7c0a6438b8e7636d5a22e572892cc234f68297 Author: Johannes Berg Date: Sat May 27 00:27:25 2017 +0200 mac80211: fix TX aggregation start/stop callback race When starting or stopping an aggregation session, one of the steps is that the driver calls back to mac80211 that the start/stop can proceed. This is handled by queueing up a fake SKB and processing it from the normal iface/sdata work. Since this isn't flushed when disassociating, the following race is possible: * associate * start aggregation session * driver callback * disassociate * associate again to the same AP * callback processing runs, leading to a WARN_ON() that the TID hadn't requested aggregation If the second association isn't to the same AP, there would only be a message printed ("Could not find station: "), but the same race could happen. Fix this by not going the whole detour with a fake SKB etc. but simply looking up the aggregation session in the driver callback, marking it with a START_CB/STOP_CB bit and then scheduling the regular aggregation work that will now process these bits as well. This also simplifies the code and gets rid of the whole problem with allocation failures of said skb, which could have left the session in limbo. Reported-by: Jouni Malinen Signed-off-by: Johannes Berg net/mac80211/agg-tx.c | 128 ++++++++++++++++++--------------------------- net/mac80211/ht.c | 16 ++++-- net/mac80211/ieee80211_i.h | 14 ++--- net/mac80211/iface.c | 11 +--- net/mac80211/sta_info.h | 2 + 5 files changed, 71 insertions(+), 100 deletions(-) commit 56b177055adb246cdeca174331dbf92fc49bfccd Author: Kuninori Morimoto Date: Tue May 23 07:08:43 2017 +0000 rcar-dmac: fixup descriptor pointer for descriptor mode In descriptor mode, the descriptor running pointer is not maintained by the interrupt handler, thus, driver finds the running descriptor from the descriptor pointer field in the CHCRB register. But, CHCRB::DPTR indicates *next* descriptor pointer, not current. Thus, The residue calculation will be missed. This patch fixup it. Signed-off-by: Kuninori Morimoto Signed-off-by: Vinod Koul drivers/dma/sh/rcar-dmac.c | 3 +++ 1 file changed, 3 insertions(+) commit 468b0df61a5146e79f63380ad6c36228fd30619c Merge: c21fbe2 fefa926 Author: David S. Miller Date: Mon May 29 23:16:54 2017 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for your net tree, they are: 1) Conntrack SCTP CRC32c checksum mangling may operate on non-linear skbuff, patch from Davide Caratti. 2) nf_tables rb-tree set backend does not handle element re-addition after deletion in the same transaction, leading to infinite loop. 3) Atomically unclear the IPS_SRC_NAT_DONE_BIT on nat module removal, from Liping Zhang. 4) Conntrack hashtable resizing while ctnetlink dump is progress leads to a dead reference to released objects in the lists, also from Liping. ==================== Signed-off-by: David S. Miller commit 2fef826e45c6a1e63f55ab72546f7d795300d9a8 Author: Benjamin Tissoires Date: Fri May 26 16:51:19 2017 -0700 Input: synaptics - tell users to report when they should be using rmi-smbus Users should really consider switching to rmi-smbus instead of plain PS/2. Notify them that they should report a missing pnpID in the file. Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit f4101ff87dafd22fbcc3547fd3a3a3717d3d72d3 Author: Benjamin Tissoires Date: Fri May 26 16:21:36 2017 -0700 Input: synaptics - warn the users when there is a better mode The Synaptics touchpads are now either using i2c-hid or rmi-smbus. Warn the users if they are missing the rmi-smbus modules and have no chance of reporting correct data. Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit f4947d79a7080b25829997eeee38d4d65137c161 Author: Benjamin Tissoires Date: Tue May 23 14:15:24 2017 -0700 Input: synaptics - keep PS/2 around when RMI4_SMB is not enabled Or the user might have the touchpad unbound from PS/2 but never picked up by rmi-smbus.ko Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2755551188d240f0098cdc6f1a2984f8a1785689 Author: Eric Biggers Date: Mon May 29 19:57:19 2017 -0700 Input: synaptics - clear device info before filling in synaptics_query_hardware() was being passed a 'struct synaptics_device_info' in uninitialized stack memory, then not always initializing all fields. This caused garbage to show up in certain fields, making the touchpad unusable. Fix by zeroing the device info, so all fields default to 0. Fixes: 6c53694fb222 ("Input: synaptics - split device info into a separate structure") Signed-off-by: Eric Biggers Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 2 ++ 1 file changed, 2 insertions(+) commit 1943d1723e7a7ee1a7b9b0ba4878dde0dc100671 Author: Hans de Goede Date: Fri May 26 16:09:48 2017 -0700 Input: silead - disable interrupt during suspend When we put the touchscreen controller in low-power mode the irq pin may trigger (float) and if we then try to read a data packet we get the following error in dmesg: [ 478.801017] silead_ts i2c-MSSL1680:00: Data read error -121 This commit disables the irq during suspend/resume fixing this error. Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/silead.c | 3 +++ 1 file changed, 3 insertions(+) commit 7575f8257279f9dd24b3fc950aa2c7e98564a103 Author: Arvind Yadav Date: Wed May 17 12:20:35 2017 +0530 cpufreq: kirkwood-cpufreq:- Handle return value of clk_prepare_enable() clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/kirkwood-cpufreq.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 6c77003677d5f1ce15f26d24360cb66c0bc07bb3 Author: David Arcari Date: Fri May 26 11:37:31 2017 -0400 cpufreq: cpufreq_register_driver() should return -ENODEV if init fails For a driver that does not set the CPUFREQ_STICKY flag, if all of the ->init() calls fail, cpufreq_register_driver() should return an error. This will prevent the driver from loading. Fixes: ce1bcfe94db8 (cpufreq: check cpufreq_policy_list instead of scanning policies for all CPUs) Cc: 4.0+ # 4.0+ Signed-off-by: David Arcari Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 1 + 1 file changed, 1 insertion(+) commit 2ea65321b83539afc1d45c1bea39c55ab42af62b Author: Lv Zheng Date: Tue May 9 13:57:31 2017 +0800 ACPICA: Tables: Fix regression introduced by a too early mechanism enabling In the Linux kernel, acpi_get_table() "clones" haven't been fully balanced by acpi_put_table() invocations. In upstream ACPICA, due to the design change, there are also unbalanced acpi_get_table_by_index() invocations requiring special care. acpi_get_table() reference counting mismatches may occor due to that and printing error messages related to them is not useful at this point. The strict balanced validation count check should only be enabled after confirming that all invocations are safe and aligned with their designed purposes. Thus this patch removes the error value returned by acpi_tb_get_table() in that case along with the accompanying error message to fix the issue. Fixes: 174cc7187e6f (ACPICA: Tables: Back port acpi_get_table_with_size() and early_acpi_os_unmap_memory() from Linux kernel) Cc: 4.10+ # 4.10+ Reported-by: Anush Seetharaman Reported-by: Dan Williams Signed-off-by: Lv Zheng [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/tbutils.c | 4 ---- 1 file changed, 4 deletions(-) commit 878d8db039daac0938238e9a40a5bd6e50ee3c9b Author: Benjamin Tissoires Date: Wed May 10 18:12:40 2017 +0200 Revert "ACPI / button: Change default behavior to lid_init_state=open" Revert commit 77e9a4aa9de1 (ACPI / button: Change default behavior to lid_init_state=open) which changed the kernel's behavior on laptops that boot with closed lids and expect the lid switch state to be reported accurately by the kernel. If you boot or resume your laptop with the lid closed on a docking station while using an external monitor connected to it, both internal and external displays will light on, while only the external should. There is a design choice in gdm to only provide the greeter on the internal display when lit on, so users only see a gray area on the external monitor. Also, the cursor will not show up as it's by default on the internal display too. To "fix" that, users have to open the laptop once and close it once again to sync the state of the switch with the hardware state. Even if the "method" operation mode implementation can be buggy on some platforms, the "open" choice is worse. It breaks docking stations basically and there is no way to have a user-space hwdb to fix that. On the contrary, it's rather easy in user-space to have a hwdb with the problematic platforms. Then, libinput (1.7.0+) can fix the state of the lid switch for us: you need to set the udev property LIBINPUT_ATTR_LID_SWITCH_RELIABILITY to 'write_open'. When libinput detects internal keyboard events, it will overwrite the state of the switch to open, making it reliable again. Given that logind only checks the lid switch value after a timeout, we can assume the user will use the internal keyboard before this timeout expires. For example, such a hwdb entry is: libinput:name:*Lid Switch*:dmi:*svnMicrosoftCorporation:pnSurface3:* LIBINPUT_ATTR_LID_SWITCH_RELIABILITY=write_open Link: https://bugzilla.gnome.org/show_bug.cgi?id=782380 Cc: 4.11+ # 4.11+ Signed-off-by: Benjamin Tissoires Signed-off-by: Rafael J. Wysocki drivers/acpi/button.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67a7d5f561f469ad2fa5154d2888258ab8e6df7c Author: Jan Kara Date: Mon May 29 13:24:55 2017 -0400 ext4: fix fdatasync(2) after extent manipulation operations Currently, extent manipulation operations such as hole punch, range zeroing, or extent shifting do not record the fact that file data has changed and thus fdatasync(2) has a work to do. As a result if we crash e.g. after a punch hole and fdatasync, user can still possibly see the punched out data after journal replay. Test generic/392 fails due to these problems. Fix the problem by properly marking that file data has changed in these operations. CC: stable@vger.kernel.org Fixes: a4bb6b64e39abc0e41ca077725f2a72c868e7622 Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/extents.c | 5 +++++ fs/ext4/inode.c | 2 ++ 2 files changed, 7 insertions(+) commit 3f173bde7e4320211e77a83f936fb754e7591006 Merge: b0f5a8f 7903d4f Author: Linus Torvalds Date: Mon May 29 10:05:19 2017 -0700 Merge tag 'pinctrl-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Here is an overdue pull request for pin control fixes, the most prominent feature is to make Intel Chromebooks (and I suspect any other Cherryview-based Intel thing) happy again, which we really want to see. There is a patch hitting drivers/firmware/* that I was uncertain to who actually manages, but I got Andy Shevchenko's and Dmitry Torokov's review tags on it and I trust them both 100% to do the right thing for Intel platform drivers. Summary: - Make a few Intel Chromebooks with Cherryview DMI firmware work smoothly. - A fix for some bogus allocations in the generic group management code. - Some GPIO descriptor lookup table stubs. Merged through the pin control tree for administrative reasons. - Revert the "bi-directional" and "output-enable" generic properties: we need more discussions around this. It seems other SoCs are using input/output gate enablement and these terms are not correct. - Fix mux and drive strength atomically in the MXS driver. - Fix the SPDIF function on sunxi A83T. - OF table terminators and other small fixes" * tag 'pinctrl-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: sunxi: Fix SPDIF function name for A83T pinctrl: mxs: atomically switch mux and drive strength config pinctrl: cherryview: Extend the Chromebook DMI quirk to Intel_Strago systems firmware: dmi: Add DMI_PRODUCT_FAMILY identification string pinctrl: core: Fix warning by removing bogus code gpiolib: Add stubs for gpiod lookup table interface Revert "pinctrl: generic: Add bi-directional and output-enable" pinctrl: cherryview: Add terminate entry for dmi_system_id tables commit b0f5a8f32e8bbdaae1abb8abe2d3cbafaba57e08 Author: Vegard Nossum Date: Mon May 29 09:22:07 2017 +0200 kthread: fix boot hang (regression) on MIPS/OpenRISC This fixes a regression in commit 4d6501dce079 where I didn't notice that MIPS and OpenRISC were reinitialising p->{set,clear}_child_tid to NULL after our initialisation in copy_process(). We can simply get rid of the arch-specific initialisation here since it is now always done in copy_process() before hitting copy_thread{,_tls}(). Review notes: - As far as I can tell, copy_process() is the only user of copy_thread_tls(), which is the only caller of copy_thread() for architectures that don't implement copy_thread_tls(). - After this patch, there is no arch-specific code touching p->set_child_tid or p->clear_child_tid whatsoever. - It may look like MIPS/OpenRISC wanted to always have these fields be NULL, but that's not true, as copy_process() would unconditionally set them again _after_ calling copy_thread_tls() before commit 4d6501dce079. Fixes: 4d6501dce079c1eb6bf0b1d8f528a5e81770109e ("kthread: Fix use-after-free if kthread fork fails") Reported-by: Guenter Roeck Tested-by: Guenter Roeck # MIPS only Acked-by: Stafford Horne Acked-by: Oleg Nesterov Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: Jonas Bonn Cc: Stefan Kristiansson Cc: openrisc@lists.librecores.org Cc: Jamie Iles Cc: Thomas Gleixner Signed-off-by: Vegard Nossum Signed-off-by: Linus Torvalds arch/mips/kernel/process.c | 1 - arch/openrisc/kernel/process.c | 2 -- 2 files changed, 3 deletions(-) commit a082c6f680da298cf075886ff032f32ccb7c5e1a Author: Miklos Szeredi Date: Mon May 29 15:15:27 2017 +0200 ovl: filter trusted xattr for non-admin Filesystems filter out extended attributes in the "trusted." domain for unprivlieged callers. Overlay calls underlying filesystem's method with elevated privs, so need to do the filtering in overlayfs too. Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit f3d3eab667de62572376abb1aa26316191c39929 Author: Hans de Goede Date: Tue May 9 10:04:36 2017 +0200 HID: i2c: Call acpi_device_fix_up_power for ACPI-enumerated devices For ACPI devices which do not have a _PSC method, the ACPI subsys cannot query their initial state at boot, so these devices are assumed to have been put in D0 by the BIOS, but for touchscreens that is not always true. This commit adds a call to acpi_device_fix_up_power to explicitly put devices without a _PSC method into D0 state (for devices with a _PSC method it is a nop). Note we only need to do this on probe, after a resume the ACPI subsys knows the device is in D3 and will properly put it in D0. This fixes the SIS0817 i2c-hid touchscreen on a Peaq C1010 2-in-1 device failing to probe with a "hid_descr_cmd failed" error. Acked-by: Benjamin Tissoires Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina drivers/hid/i2c-hid/i2c-hid.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b31e85eda38c58cae986162ae2c462b53b0a2065 Author: Jani Nikula Date: Thu May 18 14:10:25 2017 +0300 drm/i915: Detect USB-C specific dongles before reducing M and N The Analogix 7737 DP to HDMI converter requires reduced M and N values when to operate correctly at HBR2. We tried to reduce the M/N values for all devices in commit 9a86cda07af2 ("drm/i915/dp: reduce link M/N parameters"), but that regressed some other sinks. Detect this IC by its OUI value of 0x0022B9 via the DPCD quirk list, and only reduce the M/N values for that. v2 by Jani: Rebased on the DP quirk database v3 by Jani: Rebased on the reworked DP quirk database v4 by Jani: Improve commit message (Daniel) Fixes: 9a86cda07af2 ("drm/i915/dp: reduce link M/N parameters") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93578 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100755 Cc: Jani Nikula Cc: Dhinakaran Pandiyan Cc: Ville Syrjälä Reviewed-by: Daniel Vetter Signed-off-by: Clint Taylor Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/2d2e30f8f47d3f28c9b74ca2612336a54585c3ec.1495105635.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/intel_display.c | 22 ++++++++++++++-------- drivers/gpu/drm/i915/intel_dp.c | 8 ++++++-- drivers/gpu/drm/i915/intel_dp_mst.c | 5 ++++- 4 files changed, 26 insertions(+), 12 deletions(-) commit 76fa998acd86b6b40d0217e12af39c2406bdcd2b Author: Jani Nikula Date: Thu May 18 14:10:24 2017 +0300 drm/dp: start a DPCD based DP sink/branch device quirk database Face the fact, there are Display Port sink and branch devices out there in the wild that don't follow the Display Port specifications, or they have bugs, or just otherwise require special treatment. Start a common quirk database the drivers can query based on the DP device identification. At least for now, we leave the workarounds for the drivers to implement as they see fit. For starters, add a branch device that can't handle full 24-bit main link Mdiv and Ndiv main link attributes properly. Naturally, the workaround of reducing main link attributes for all devices ended up in regressions for other devices. So here we are. v2: Rebase on DRM DP desc read helpers v3: Fix the OUI memcmp blunder (Clint) Cc: Ville Syrjälä Cc: Dhinakaran Pandiyan Cc: Clint Taylor Cc: Adam Jackson Cc: Harry Wentland Tested-by: Clinton Taylor Reviewed-by: Clinton Taylor Reviewed-by: Daniel Vetter # v2 Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/91ec198dd95258dbf3bee2f6be739e0da73b4fdd.1495105635.git.jani.nikula@intel.com drivers/gpu/drm/drm_dp_helper.c | 52 +++++++++++++++++++++++++++++++++++++++-- include/drm/drm_dp_helper.h | 32 +++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 2 deletions(-) commit 84c367533bd24108e5392b355280647a4a2893ac Author: Jani Nikula Date: Thu May 18 14:10:23 2017 +0300 drm/i915: use drm DP helper to read DPCD desc Switch to using the common DP helpers instead of using our own. v2: also remove leftover struct intel_dp_desc (Daniel) Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dp.c | 37 ++++--------------------------------- drivers/gpu/drm/i915/intel_drv.h | 13 +------------ drivers/gpu/drm/i915/intel_lspcon.c | 2 +- 3 files changed, 6 insertions(+), 46 deletions(-) commit 118b90f3f18e733c99f0e8b98ea31a815ffc4d14 Author: Jani Nikula Date: Thu May 18 14:10:22 2017 +0300 drm/dp: add helper for reading DP sink/branch device desc from DPCD Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/acba54da7d80eafea9e59a893e27e3c31028c0ba.1495105635.git.jani.nikula@intel.com drivers/gpu/drm/drm_dp_helper.c | 35 +++++++++++++++++++++++++++++++++++ include/drm/drm_dp_helper.h | 19 +++++++++++++++++++ 2 files changed, 54 insertions(+) commit f3a1568582cc207663a4d5e37da790334372855b Author: Amir Goldstein Date: Wed May 24 15:29:33 2017 +0300 ovl: mark upper merge dir with type origin entries "impure" An upper dir is marked "impure" to let ovl_iterate() know that this directory may contain non pure upper entries whose d_ino may need to be read from the origin inode. We already mark a non-merge dir "impure" when moving a non-pure child entry inside it, to let ovl_iterate() know not to iterate the non-merge dir directly. Mark also a merge dir "impure" when moving a non-pure child entry inside it and when copying up a child entry inside it. This can be used to optimize ovl_iterate() to perform a "pure merge" of upper and lower directories, merging the content of the directories, without having to read d_ino from origin inodes. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 5 +++++ fs/overlayfs/dir.c | 31 +++++-------------------------- fs/overlayfs/namei.c | 20 -------------------- fs/overlayfs/overlayfs.h | 15 +++++++++++---- fs/overlayfs/super.c | 5 ++++- fs/overlayfs/util.c | 42 +++++++++++++++++++++++++++++++++++------- 6 files changed, 60 insertions(+), 58 deletions(-) commit 6ac56951dc10232e24419f6972fc8131dd0166e0 Author: Ilya Dryomov Date: Mon May 22 19:59:24 2017 +0200 rbd: implement REQ_OP_WRITE_ZEROES Commit 93c1defedcae ("rbd: remove the discard_zeroes_data flag") explicitly didn't implement REQ_OP_WRITE_ZEROES for rbd, while the following commit 48920ff2a5a9 ("block: remove the discard_zeroes_data flag") dropped ->discard_zeroes_data in favor of REQ_OP_WRITE_ZEROES. rbd does support efficient zeroing via CEPH_OSD_OP_ZERO opcode and will release either some or all blocks depending on whether the zeroing request is rbd_obj_bytes() aligned. This is how we currently implement discards, so REQ_OP_WRITE_ZEROES can be identical to REQ_OP_DISCARD for now. Caveats: - REQ_NOUNMAP is ignored, but AFAICT that's true of at least two other current implementations - nvme and loop - there is no ->write_zeroes_alignment and blk_bio_write_zeroes_split() is hence less helpful than blk_bio_discard_split(), but this can (and should) be fixed on the rbd side In the future we will split these into two code paths to respect REQ_NOUNMAP on zeroout and save on zeroing blocks that couldn't be released on discard. Fixes: 93c1defedcae ("rbd: remove the discard_zeroes_data flag") Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman Reviewed-by: Christoph Hellwig drivers/block/rbd.c | 2 ++ 1 file changed, 2 insertions(+) commit cc7a938f5f308eeb6f8fe3cec28e1800aa81facb Author: Arnd Bergmann Date: Wed May 24 17:39:03 2017 +0200 ARM: at91: select CONFIG_ARM_CPU_SUSPEND The reference to cpu_resume requires the corresponding generic code to be enabled when CONFIG_PM is set: arch/arm/mach-at91/pm.o: In function `sama5d2_pm_init': pm.c:(.init.text+0x5e8): undefined reference to `cpu_resume' Fixes: 24a0f5c539f9 ("ARM: at91: pm: Add sama5d2 backup mode") Signed-off-by: Arnd Bergmann Signed-off-by: Alexandre Belloni arch/arm/mach-at91/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5d9070b1f0fc9a159a9a3240c43004828408444b Author: Borislav Petkov Date: Sun May 28 11:03:42 2017 +0200 x86/debug/32: Convert a smp_processor_id() call to raw to avoid DEBUG_PREEMPT warning ... to raw_smp_processor_id() to not trip the BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1 check. The reasoning behind it is that __warn() already uses the raw_ variants but the show_regs() path on 32-bit doesn't. Signed-off-by: Borislav Petkov Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170528092212.fiod7kygpjm23m3o@pd.tnic Signed-off-by: Ingo Molnar arch/x86/kernel/process_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dac6ca243c4c49a9ca7507d3d66140ebfac8b04b Author: Borislav Petkov Date: Sun May 28 22:04:14 2017 +0200 x86/microcode/AMD: Change load_microcode_amd()'s param to bool to fix preemptibility bug With CONFIG_DEBUG_PREEMPT enabled, I get: BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1 caller is debug_smp_processor_id CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc2+ #2 Call Trace: dump_stack check_preemption_disabled debug_smp_processor_id save_microcode_in_initrd_amd ? microcode_init save_microcode_in_initrd ... because, well, it says it above, we're using smp_processor_id() in preemptible code. But passing the CPU number is not really needed. It is only used to determine whether we're on the BSP, and, if so, to save the microcode patch for early loading. [ We don't absolutely need to do it on the BSP but we do that customarily there. ] Instead, convert that function parameter to a boolean which denotes whether the patch should be saved or not, thereby avoiding the use of smp_processor_id() in preemptible code. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170528200414.31305-1-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/microcode/amd.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 2f2724630f7a8d582470f03ee56b96746767d270 Author: Paul Mackerras Date: Mon May 22 16:25:14 2017 +1000 KVM: PPC: Book3S HV: Cope with host using large decrementer mode POWER9 introduces a new mode for the decrementer register, called large decrementer mode, in which the decrementer counter is 56 bits wide rather than 32, and reads are sign-extended rather than zero-extended. For the decrementer, this new mode is optional and controlled by a bit in the LPCR. The hypervisor decrementer (HDEC) is 56 bits wide on POWER9 and has no mode control. Since KVM code reads and writes the decrementer and hypervisor decrementer registers in a few places, it needs to be aware of the need to treat the decrementer value as a 64-bit quantity, and only do a 32-bit sign extension when large decrementer mode is not in effect. Similarly, the HDEC should always be treated as a 64-bit quantity on POWER9. We define a new EXTEND_HDEC macro to encapsulate the feature test for POWER9 and the sign extension. To enable the sign extension to be removed in large decrementer mode, we test the LPCR_LD bit in the host LPCR image stored in the struct kvm for the guest. If is set then large decrementer mode is enabled and the sign extension should be skipped. This is partly based on an earlier patch by Oliver O'Halloran. Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_interrupts.S | 12 +++++++++++- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 23 +++++++++++++++++------ 2 files changed, 28 insertions(+), 7 deletions(-) commit e379cbee79a8abb8e9b4da63187884939852ddb4 Author: Inki Dae Date: Mon May 29 09:59:05 2017 +0900 drm/exynos: clean up description of exynos_drm_crtc This patch removes unnecessary descriptions on exynos_drm_crtc structure and adds one description which specifies what pipe_clk member does. pipe_clk support had been added by below patch without any description, drm/exynos: add support for pipeline clock to the framework Commit-id : f26b9343f582f44ec920474d71b4b2220b1ed9a8 Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_drv.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 70505c2ef94b7584dc24d6eaaeb0fc335b99813a Author: Hoegeun Kwon Date: Fri May 26 10:02:01 2017 +0900 drm/exynos: dsi: Remove bridge node reference in removal Since bridge node is referenced during in the probe, it should be released on removal. Suggested-by: Andrzej Hajda Signed-off-by: Hoegeun Kwon Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 ++++ 1 file changed, 4 insertions(+) commit f2921d8c4899a3d9d7c6326315c24efea2c9efd9 Author: Hoegeun Kwon Date: Thu Apr 13 15:05:26 2017 +0900 drm/exynos: dsi: Fix the parse_dt function The dsi + panel is a parental relationship, so OF grpah is not needed. Therefore, the current dsi_parse_dt function will throw an error, because there is no linked OF graph for the case fimd + dsi + panel. Parse the Pll burst and esc clock frequency properties in dsi_parse_dt() and create a bridge_node only if there is an OF graph associated with dsi. Signed-off-by: Hoegeun Kwon Reviewed-by: Andrzej Hajda Reviewed-by: Andi Shyti Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_dsi.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) commit 4013ef48798ae954530bdb8971d3794333e46526 Author: Daniel Vetter Date: Wed Mar 8 15:12:53 2017 +0100 drm/exynos: Merge pre/postclose hooks Again no apparent explanation for the split except hysterical raisins. Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Signed-off-by: Daniel Vetter Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_drv.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 5ed02dbb497422bf225783f46e6eadd237d23d6b Author: Linus Torvalds Date: Sun May 28 17:20:53 2017 -0700 Linux 4.12-rc3 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d09bc680ca42ddf3e7b862b95c59af6ef4477840 Merge: 249f1ef a54c518 Author: Linus Torvalds Date: Sun May 28 16:18:27 2017 -0700 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal Pull thermal SoC management fixes from Eduardo Valentin: - fixes to TI SoC driver, Broadcom, qoriq - small sparse warning fix on thermal core * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal: thermal: broadcom: ns-thermal: default on iProc SoCs ti-soc-thermal: Fix a typo in a comment line ti-soc-thermal: Delete error messages for failed memory allocations in ti_bandgap_build() ti-soc-thermal: Use devm_kcalloc() in ti_bandgap_build() thermal: core: make thermal_emergency_poweroff static thermal: qoriq: remove useless call for of_thermal_get_trip_points() commit 243dd05d39aa14fac2ffde75cc66dee3270896f8 Author: Kees Cook Date: Sat May 6 01:10:06 2017 -0700 mtk-vcodec: Use designated initializers The randstruct plugin requires designated initializers for structures that are entirely function pointers. Cc: Wu-Cheng Li Cc: Tiffany Lin Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Signed-off-by: Kees Cook drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c | 8 ++++---- drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c | 8 ++++---- drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) commit 3ddd396f6b57cbd5cb034498b5c4cd3dd920cf15 Author: Kees Cook Date: Sat May 6 01:09:00 2017 -0700 drm/amd/powerplay: Use designated initializers The randstruct plugin requires designated initializers for structures that are entirely function pointers. Cc: Christian König Cc: Eric Huang Cc: Alex Deucher Signed-off-by: Kees Cook drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 2a9d6d26e2b76eee1064d221b49f3ec527546c53 Author: Kees Cook Date: Sat May 6 00:54:07 2017 -0700 drm/amdgpu: Use designated initializers The randstruct plugin requires structures that are entirely function pointers be initialized using designated initializers. Cc: Alex Deucher Cc: Christian König Signed-off-by: Kees Cook drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 234041dfe5ca83d5c8122ec1999eaf3f00335d7b Author: Kees Cook Date: Tue Apr 4 22:07:10 2017 -0700 sgi-xp: Use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. In this case, no initializers are needed (they can be NULL initialized and callers adjusted to check for NULL, which is more efficient than an indirect call). Cc: Robin Holt Signed-off-by: Kees Cook Reviewed-by: Christoph Hellwig drivers/misc/sgi-xp/xp.h | 12 +++++++++++- drivers/misc/sgi-xp/xp_main.c | 36 +++++++----------------------------- 2 files changed, 18 insertions(+), 30 deletions(-) commit 7585d12f6555fdf4faaefec34ac58b28555b27d0 Author: Kees Cook Date: Mon May 8 14:49:27 2017 -0700 ocfs2: Use ERR_CAST() to avoid cross-structure cast When trying to propagate an error result, the error return path attempts to retain the error, but does this with an open cast across very different types, which the upcoming structure layout randomization plugin flags as being potentially dangerous in the face of randomization. This is a false positive, but what this code actually wants to do is use ERR_CAST() to retain the error value. Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Kees Cook fs/ocfs2/export.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fee2aa753823860f2b8dfe58d98cafe8e4840855 Author: Kees Cook Date: Mon May 8 14:45:26 2017 -0700 ntfs: Use ERR_CAST() to avoid cross-structure cast When trying to propagate an error result, the error return path attempts to retain the error, but does this with an open cast across very different types, which the upcoming structure layout randomization plugin flags as being potentially dangerous in the face of randomization. This is a false positive, but what this code actually wants to do is use ERR_CAST() to retain the error value. Cc: Anton Altaparmakov Cc: Andrew Morton Signed-off-by: Kees Cook fs/ntfs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe3b81b446d4ecb954f1b9dd191164a78fd278ad Author: Kees Cook Date: Tue Apr 4 17:08:42 2017 -0700 NFS: Use ERR_CAST() to avoid cross-structure cast When the call to nfs_devname() fails, the error path attempts to retain the error via the mnt variable, but this requires a cast across very different types (char * to struct vfsmount *), which the upcoming structure layout randomization plugin flags as being potentially dangerous in the face of randomization. This is a false positive, but what this code actually wants to do is retain the error value, so this patch explicitly sets it, instead of using what seems to be an unexpected cast. Signed-off-by: Kees Cook Acked-by: Trond Myklebust Reviewed-by: Christoph Hellwig fs/nfs/namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c21fbe29f8588991b4fbf209ad4f6ecd4b550cdb Author: Andrew Lunn Date: Sun May 28 17:25:14 2017 +0200 net: dsa: mv88e6xxx: Add missing static to stub functions Stub functions in header files need to be static, or we can have multiple definitions errors. Reported-by: kbuild test robot Fixes: 6335e9f2446b ("net: dsa: mv88e6xxx: mv88e6390X SERDES support") Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 95264c8c6a9040e84edda883dbbe9d193c41f46c Author: Alexey Khoroshilov Date: Sat May 27 01:53:04 2017 +0300 staging: iio: ad7152: Fix deadlock in ad7152_write_raw_samp_freq() ad7152_write_raw_samp_freq() is called by ad7152_write_raw() with chip->state_lock held. So, there is unavoidable deadlock when ad7152_write_raw_samp_freq() locks the mutex itself. The patch removes unneeded locking. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Fixes: 6572389bcc11 ("staging: iio: cdc: ad7152: Implement IIO_CHAN_INFO_SAMP_FREQ attribute") Acked-by: Lars-Peter Clausen Cc: Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7152.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 7425826f4f7ac60f2538b06a7f0a5d1006405159 Author: Dave Young Date: Fri May 26 12:36:51 2017 +0100 efi/bgrt: Skip efi_bgrt_init() in case of non-EFI boot Sabrina Dubroca reported an early panic: BUG: unable to handle kernel paging request at ffffffffff240001 IP: efi_bgrt_init+0xdc/0x134 [...] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ... which was introduced by: 7b0a911478c7 ("efi/x86: Move the EFI BGRT init code to early init code") The cause is that on this machine the firmware provides the EFI ACPI BGRT table even on legacy non-EFI bootups - which table should be EFI only. The garbage BGRT data causes the efi_bgrt_init() panic. Add a check to skip efi_bgrt_init() in case non-EFI bootup to work around this firmware bug. Tested-by: Sabrina Dubroca Signed-off-by: Dave Young Signed-off-by: Ard Biesheuvel Signed-off-by: Matt Fleming Cc: # v4.11+ Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Fixes: 7b0a911478c7 ("efi/x86: Move the EFI BGRT init code to early init code") Link: http://lkml.kernel.org/r/20170526113652.21339-6-matt@codeblueprint.co.uk [ Rewrote the changelog to be more readable. ] Signed-off-by: Ingo Molnar drivers/firmware/efi/efi-bgrt.c | 3 +++ 1 file changed, 3 insertions(+) commit 94133e46a0f5ca3f138479806104ab4a8cb0455e Author: Baoquan He Date: Fri May 26 12:36:50 2017 +0100 x86/efi: Correct EFI identity mapping under 'efi=old_map' when KASLR is enabled For EFI with the 'efi=old_map' kernel option specified, the kernel will panic when KASLR is enabled: BUG: unable to handle kernel paging request at 000000007febd57e IP: 0x7febd57e PGD 1025a067 PUD 0 Oops: 0010 [#1] SMP Call Trace: efi_enter_virtual_mode() start_kernel() x86_64_start_reservations() x86_64_start_kernel() start_cpu() The root cause is that the identity mapping is not built correctly in the 'efi=old_map' case. On 'nokaslr' kernels, PAGE_OFFSET is 0xffff880000000000 which is PGDIR_SIZE aligned. We can borrow the PUD table from the direct mappings safely. Given a physical address X, we have pud_index(X) == pud_index(__va(X)). However, on KASLR kernels, PAGE_OFFSET is PUD_SIZE aligned. For a given physical address X, pud_index(X) != pud_index(__va(X)). We can't just copy the PGD entry from direct mapping to build identity mapping, instead we need to copy the PUD entries one by one from the direct mapping. Fix it. Signed-off-by: Baoquan He Signed-off-by: Matt Fleming Cc: Ard Biesheuvel Cc: Bhupesh Sharma Cc: Borislav Petkov Cc: Dave Young Cc: Frank Ramsay Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russ Anderson Cc: Thomas Garnier Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170526113652.21339-5-matt@codeblueprint.co.uk [ Fixed and reworded the changelog and code comments to be more readable. ] Signed-off-by: Ingo Molnar arch/x86/platform/efi/efi_64.c | 79 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 71 insertions(+), 8 deletions(-) commit 4e52797d2efefac3271abdc54439a3435abd77b9 Author: Sai Praneeth Date: Fri May 26 12:36:49 2017 +0100 x86/efi: Disable runtime services on kexec kernel if booted with efi=old_map Booting kexec kernel with "efi=old_map" in kernel command line hits kernel panic as shown below. BUG: unable to handle kernel paging request at ffff88007fe78070 IP: virt_efi_set_variable.part.7+0x63/0x1b0 PGD 7ea28067 PUD 7ea2b067 PMD 7ea2d067 PTE 0 [...] Call Trace: virt_efi_set_variable() efi_delete_dummy_variable() efi_enter_virtual_mode() start_kernel() x86_64_start_reservations() x86_64_start_kernel() start_cpu() [ efi=old_map was never intended to work with kexec. The problem with using efi=old_map is that the virtual addresses are assigned from the memory region used by other kernel mappings; vmalloc() space. Potentially there could be collisions when booting kexec if something else is mapped at the virtual address we allocated for runtime service regions in the initial boot - Matt Fleming ] Since kexec was never intended to work with efi=old_map, disable runtime services in kexec if booted with efi=old_map, so that we don't panic. Tested-by: Lee Chun-Yi Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Matt Fleming Acked-by: Dave Young Cc: Ard Biesheuvel Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Ricardo Neri Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170526113652.21339-4-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar arch/x86/platform/efi/efi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 684e3f965d0be8c26fedefe94f637374242aba08 Author: Arnd Bergmann Date: Fri May 26 12:36:48 2017 +0100 efi: Remove duplicate 'const' specifiers gcc-7 shows these harmless warnings: drivers/firmware/efi/libstub/secureboot.c:19:27: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier] static const efi_char16_t const efi_SecureBoot_name[] = { drivers/firmware/efi/libstub/secureboot.c:22:27: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier] Removing one of the specifiers gives us the expected behavior. Signed-off-by: Arnd Bergmann Signed-off-by: Matt Fleming Reviewed-by: David Howells Acked-by: Ard Biesheuvel Cc: Josh Boyer Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Fixes: de8cb458625c ("efi: Get and store the secure boot status") Link: http://lkml.kernel.org/r/20170526113652.21339-3-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar drivers/firmware/efi/libstub/secureboot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1ea34adb87c969b89dfd83f1905a79161e9ada26 Author: Juergen Gross Date: Fri May 26 12:36:47 2017 +0100 efi: Don't issue error message when booted under Xen When booted as Xen dom0 there won't be an EFI memmap allocated. Avoid issuing an error message in this case: [ 0.144079] efi: Failed to allocate new EFI memmap Signed-off-by: Juergen Gross Signed-off-by: Matt Fleming Cc: # v4.9+ Cc: Ard Biesheuvel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170526113652.21339-2-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar arch/x86/platform/efi/quirks.c | 3 +++ 1 file changed, 3 insertions(+) commit fb3ce90b7d7761b6f7f28f0ff5c456ef6b5229a1 Author: Firo Yang Date: Fri May 26 22:37:38 2017 +0800 hdlcdrv: Fix divide by zero in hdlcdrv_ioctl syszkaller fuzzer triggered a divide by zero, when set calibration through ioctl(). To fix it, test 'bitrate' if it is negative or 0, just return -EINVAL. Reported-by: Andrey Konovalov Signed-off-by: Firo Yang Signed-off-by: David S. Miller drivers/net/hamradio/hdlcdrv.c | 2 ++ 1 file changed, 2 insertions(+) commit 6c713a3a23154f4f0c2217ea39811ebe443dafaa Author: Andrew Lunn Date: Fri May 26 01:44:43 2017 +0200 net: dsa: mv88e6xxx: Add eeprom-length to binding The binding documentation for the mv88e6xxx switch is missing the eeprom-length property, which has been implemented since May 2016, commit f8cd8753def0 ("dsa: mv88e6xxx: Handle eeprom-length property") Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/dsa/marvell.txt | 4 ++++ 1 file changed, 4 insertions(+) commit d72fea538fe6d783c1e63a2fc304019abf4be93a Author: Jordan Crouse Date: Mon May 8 14:34:58 2017 -0600 drm/msm: Fix the check for the command size The overrun check for the size of submitted commands is off by one. It should allow the offset plus the size to be equal to the size of the memory object when the command stream is very tightly constructed. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem_submit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 90dd57de4a043f642179b1323a31ca3ced826611 Author: Jordan Crouse Date: Mon May 8 14:34:57 2017 -0600 drm/msm: Take the mutex before calling msm_gem_new_impl Amongst its other duties, msm_gem_new_impl adds the newly created GEM object to the shared inactive list which may also be actively modifiying the list during submission. All the paths to modify the list are protected by the mutex except for the one through msm_gem_import which can end up causing list corruption. Signed-off-by: Jordan Crouse [add extra WARN_ON(!mutex_is_locked(&dev->struct_mutex))] Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 3cfac69cbd56e1a57a70bfbdb07560b788030404 Author: Philipp Zabel Date: Fri Mar 17 19:38:40 2017 +0100 drm/msm: for array in-fences, check if all backing fences are from our own context before waiting Use the dma_fence_match_context helper to check if all backing fences are from our own context, in which case we don't have to wait. Signed-off-by: Philipp Zabel Cc: Rob Clark Cc: Gustavo Padovan [rebased on code-motion] Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem_submit.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit c43dd227f411359802427da7aebe5da5b0e48e0e Author: Tobias Klauser Date: Wed May 24 18:12:19 2017 +0200 drm/msm: constify irq_domain_ops struct irq_domain_ops is not modified, so it can be made const. Signed-off-by: Tobias Klauser Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_mdss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit adcbae310f9ed84ef139e3fa6d7a7743d96c44c8 Author: Rob Clark Date: Sun May 21 12:05:07 2017 -0400 drm/msm/mdp5: release hwpipe(s) for unused planes Otherwise, if userspace doesn't re-use a given plane, it's hwpipe(s) could stay permanently assigned. Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3c30cc41a87880db86c343b8c9cc8bc2d3d36055 Author: Eric Anholt Date: Wed Apr 12 12:12:00 2017 -0700 drm/msm: Reuse dma_fence_release. If we follow the typical pattern of the base class being the first member, we can use the default dma_fence_free function. Signed-off-by: Eric Anholt Cc: Rob Clark Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Reviewed-by: Rob Clark Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_fence.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 43523eba79bda8f5b4c27f8ffe20ea078d20113a Author: Eric Anholt Date: Wed Apr 12 12:11:58 2017 -0700 drm/msm: Expose our reservation object when exporting a dmabuf. Without this, polling on the dma-buf (and presumably other devices synchronizing against our rendering) would return immediately, even while the BO was busy. Signed-off-by: Eric Anholt Reviewed-by: Daniel Vetter Cc: stable@vger.kernel.org Cc: Rob Clark Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Reviewed-by: Rob Clark Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.c | 1 + drivers/gpu/drm/msm/msm_drv.h | 1 + drivers/gpu/drm/msm/msm_gem_prime.c | 7 +++++++ 3 files changed, 9 insertions(+) commit 134ccada7ac59156761ce05afd1c0b1d02ebd928 Author: Rob Clark Date: Wed May 3 10:43:14 2017 -0400 drm/msm/gpu: check legacy clk names in get_clocks() Otherwise if someone was using old bindings with "core_clk" instead of "core" as the clock name, we'd never find it and gpu would be stuck at 27MHz (or whatever it's slowest rate is). Fixes: 98db803 ("msm/drm: gpu: Dynamically locate the clocks from the device tree") Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 786813c343cb619d23cb0990e152e350b826d810 Author: Rob Clark Date: Wed May 3 10:04:48 2017 -0400 drm/msm/mdp5: use __drm_atomic_helper_plane_duplicate_state() Somehow the helper was never retrofitted for mdp5. Which meant when plane_state->fence was added, it could get copied into new state in mdp5_plane_duplicate_state(). If an update to disable the plane (for example on rmfb) managed to sneak in after an nonblock update had swapped state, but before it was committed, we'd get a splat: WARNING: CPU: 1 PID: 69 at ../drivers/gpu/drm/drm_atomic_helper.c:1061 drm_atomic_helper_wait_for_fences+0xe0/0xf8 Modules linked in: CPU: 1 PID: 69 Comm: kworker/1:1 Tainted: G W 4.11.0-rc8+ #1187 Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) Workqueue: events drm_mode_rmfb_work_fn task: ffffffc036560d00 task.stack: ffffffc036550000 PC is at drm_atomic_helper_wait_for_fences+0xe0/0xf8 LR is at complete_commit.isra.1+0x44/0x1c0 pc : [] lr : [] pstate: 20000145 sp : ffffffc036553b60 x29: ffffffc036553b60 x28: ffffffc0264e6a00 x27: ffffffc035659000 x26: 0000000000000000 x25: ffffffc0240e8000 x24: 0000000000000038 x23: 0000000000000000 x22: ffffff800858f200 x21: ffffffc0240e8000 x20: ffffffc02f56a800 x19: 0000000000000000 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: ffffffc00a192700 x13: 0000000000000004 x12: 0000000000000000 x11: ffffff80089a1690 x10: 00000000000008f0 x9 : ffffffc036553b20 x8 : ffffffc036561650 x7 : ffffffc03fe6cb40 x6 : 0000000000000000 x5 : 0000000000000001 x4 : 0000000000000002 x3 : ffffffc035659000 x2 : ffffffc0240e8c80 x1 : 0000000000000000 x0 : ffffffc02adbe588 ---[ end trace 13aeec77c3fb55e2 ]--- Call trace: Exception stack(0xffffffc036553990 to 0xffffffc036553ac0) 3980: 0000000000000000 0000008000000000 39a0: ffffffc036553b60 ffffff80084f6040 0000000000004ff0 0000000000000038 39c0: ffffffc0365539d0 ffffff800857e098 ffffffc036553a00 ffffff800857e1b0 39e0: ffffffc036553a10 ffffff800857c554 ffffffc0365e8400 ffffffc0365e8400 3a00: ffffffc036553a20 ffffff8008103358 000000000001aad7 ffffff800851b72c 3a20: ffffffc036553a50 ffffff80080e9228 ffffffc02adbe588 0000000000000000 3a40: ffffffc0240e8c80 ffffffc035659000 0000000000000002 0000000000000001 3a60: 0000000000000000 ffffffc03fe6cb40 ffffffc036561650 ffffffc036553b20 3a80: 00000000000008f0 ffffff80089a1690 0000000000000000 0000000000000004 3aa0: ffffffc00a192700 0000000000000000 0000000000000000 0000000000000000 [] drm_atomic_helper_wait_for_fences+0xe0/0xf8 [] complete_commit.isra.1+0x44/0x1c0 [] msm_atomic_commit+0x32c/0x350 [] drm_atomic_commit+0x50/0x60 [] drm_atomic_remove_fb+0x158/0x250 [] drm_framebuffer_remove+0x50/0x158 [] drm_mode_rmfb_work_fn+0x40/0x58 [] process_one_work+0x1d0/0x378 [] worker_thread+0x244/0x488 [] kthread+0xfc/0x128 [] ret_from_fork+0x10/0x50 Fixes: 9626014 ("drm/fence: add in-fences support") Cc: stable@vger.kernel.org Reviewed-by: Daniel Vetter Reported-by: Stanimir Varbanov Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ac20fa0a96c32ff40c8a127dfd58140f1df44a9b Author: Rob Clark Date: Tue May 2 12:39:53 2017 -0400 drm/msm: select PM_OPP Otherwise, if nothing else enabled selects it, dev_pm_opp_of_add_table() will return -ENOTSUPP. Fixes: e2af8b6 ("drm/msm: gpu: Use OPP tables if we can") Signed-off-by: Rob Clark drivers/gpu/drm/msm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 249f1efd8e3d58f86469fc305b0eda39db18d7ce Merge: 6f68a6a 59fe2cc Author: Linus Torvalds Date: Sat May 27 09:39:09 2017 -0700 Merge tag 'tty-4.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are some serial and tty fixes for 4.12-rc3. They are a bit bigger than normal, which is why I had them bake in linux-next for a few weeks and didn't send them to you for -rc2. They revert a few of the serdev patches from 4.12-rc1, and bring things back to how they were in 4.11, to try to make things a bit more stable there. Rob and Johan both agree that this is the way forward, so this isn't people squabbling over semantics. Other than that, just a few minor serial driver fixes that people have had problems with. All of these have been in linux-next for a few weeks with no reported issues" * tag 'tty-4.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: altera_uart: call iounmap() at driver remove serial: imx: ensure UCR3 and UFCR are setup correctly MAINTAINERS/serial: Change maintainer of jsm driver serial: enable serdev support tty/serdev: add serdev registration interface serdev: Restore serdev_device_write_buf for atomic context serial: core: fix crash in uart_suspend_port tty: fix port buffer locking tty: ehv_bytechan: clean up init error handling serial: ifx6x60: fix use-after-free on module unload serial: altera_jtaguart: adding iounmap() serial: exar: Fix stuck MSIs serial: efm32: Fix parity management in 'efm32_uart_console_get_options()' serdev: fix tty-port client deregistration Revert "tty_port: register tty ports with serdev bus" drivers/tty: 8250: only call fintek_8250_probe when doing port I/O commit 6f68a6ae1f0ea2fd87e26dc345866e928b5850a8 Merge: 38e6bf2 a4700a2 Author: Linus Torvalds Date: Sat May 27 09:28:34 2017 -0700 Merge tag 'powerpc-4.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Fix running SPU programs on Cell, and a few other minor fixes. Thanks to Alistair Popple, Jeremy Kerr, Michael Neuling, Nicholas Piggin" * tag 'powerpc-4.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc: Add PPC_FEATURE userspace bits for SCV and DARN instructions powerpc/spufs: Fix hash faults for kernel regions powerpc: Fix booting P9 hash with CONFIG_PPC_RADIX_MMU=N powerpc/powernv/npu-dma.c: Fix opal_npu_destroy_context() call selftests/powerpc: Fix TM resched DSCR test with some compilers commit 38e6bf238daa2514a543f76ec8d1cc0f488ac422 Merge: 39b8ab3 702644e Author: Linus Torvalds Date: Sat May 27 09:17:58 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A series of fixes for X86: - The final fix for the end-of-stack issue in the unwinder - Handle non PAT systems gracefully - Prevent access to uninitiliazed memory - Move early delay calaibration after basic init - Fix Kconfig help text - Fix a cross compile issue - Unbreak older make versions" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/timers: Move simple_udelay_calibration past init_hypervisor_platform x86/alternatives: Prevent uninitialized stack byte read in apply_alternatives() x86/PAT: Fix Xorg regression on CPUs that don't support PAT x86/watchdog: Fix Kconfig help text file path reference to lockup watchdog documentation x86/build: Permit building with old make versions x86/unwind: Add end-of-stack check for ftrace handlers Revert "x86/entry: Fix the end of the stack for newly forked tasks" x86/boot: Use CROSS_COMPILE prefix for readelf commit 39b8ab31bced71486b3aa077a7cf828b1a18fbce Merge: de0b9d7 43fe8b8 Author: Linus Torvalds Date: Sat May 27 09:14:24 2017 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixlet from Thomas Gleixner: "Silence dmesg spam by making the posix cpu timer printks depend on print_fatal_signals" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: posix-timers: Make signal printks conditional commit de0b9d751b9cd4cfedd0112722e84d0b5abaac73 Merge: fac3fca fc08a47 Author: Linus Torvalds Date: Sat May 27 09:06:43 2017 -0700 Merge branch 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS fixes from Thomas Gleixner: "Two fixlets for RAS: - Export memory_error() so the NFIT module can utilize it - Handle memory errors in NFIT correctly" * 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: acpi, nfit: Fix the memory error check in nfit_handle_mce() x86/MCE: Export memory_error() commit fac3fcae3244d6d8af61f04d2c10b4fd5ee03933 Merge: 805f286 6e30437 Author: Linus Torvalds Date: Sat May 27 09:02:41 2017 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf tooling fixes from Thomas Gleixner: - Synchronization of tools and kernel headers - A series of fixes for perf report addressing various failures: * Handle invalid maps proper * Plug a memory leak * Handle frames and callchain order correctly - Fixes for handling inlines and children mode * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tools/include: Sync kernel ABI headers with tooling headers perf tools: Put caller above callee in --children mode perf report: Do not drop last inlined frame perf report: Always honor callchain order for inlined nodes perf script: Add --inline option for debugging perf report: Fix off-by-one for non-activation frames perf report: Fix memory leak in addr2line when called by addr2inlines perf report: Don't crash on invalid maps in `-g srcline` mode commit 805f286907ace68bef37db20bbdfa8f4a1908ed9 Merge: d024baa 04dc1b2 Author: Linus Torvalds Date: Sat May 27 08:59:37 2017 -0700 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fix from Thomas Gleixner: "A fix for a state leak which was introduced in the recent rework of futex/rtmutex interaction" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex,rt_mutex: Fix rt_mutex_cleanup_proxy_lock() commit d024baa58a4a7e5eb6058017771d15b9e47b56db Merge: 77d6465 4d6501d Author: Linus Torvalds Date: Sat May 27 08:52:27 2017 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull kthread fix from Thomas Gleixner: "A single fix which prevents a use after free when kthread fork fails" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: kthread: Fix use-after-free if kthread fork fails commit 77d64656950b299f5e7c70f1e3a0bdc991b51497 Merge: c86daad 6ee98ff Author: Linus Torvalds Date: Sat May 27 08:30:30 2017 -0700 Merge tag 'trace-v4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull ftrace fixes from Steven Rostedt: "There's been a few memory issues found with ftrace. One was simply a memory leak where not all was being freed that should have been in releasing a file pointer on set_graph_function. Then Thomas found that the ftrace trampolines were marked for read/write as well as execute. To shrink the possible attack surface, he added calls to set them to ro. Which also uncovered some other issues with freeing module allocated memory that had its permissions changed. Kprobes had a similar issue which is fixed and a selftest was added to trigger that issue again" * tag 'trace-v4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: x86/ftrace: Make sure that ftrace trampolines are not RWX x86/mm/ftrace: Do not bug in early boot on irqs_disabled in cpu_flush_range() selftests/ftrace: Add a testcase for many kprobe events kprobes/x86: Fix to set RWX bits correctly before releasing trampoline ftrace: Fix memory leak in ftrace_graph_release() commit 7b4500bc519686712471924972022df88b12ff93 Author: Ravi Bangoria Date: Fri May 5 15:44:17 2017 +0530 perf annotate: Fix failure when filename has special chars When filename contains special chars, perf annotate fails with an error: $ perf annotate --vmlinux ./vmlinux\(test\) --stdio native_safe_halt sh: -c: line 0: syntax error near unexpected token `(' sh: -c: line 0: `objdump --start-address=0xffffffff8184e840 --stop-address=0xffffffff8184e848 -l -d --no-show-raw -S -C ./vmlinux(test) 2>/dev/null|grep -v ./vmlinux(test):|expand' Fix it by surrounding filename in double quotes. Signed-off-by: Ravi Bangoria Cc: Adam Stylinski Cc: Alexander Shishkin Cc: Christian Borntraeger Cc: Peter Zijlstra Cc: Taeung Song Link: http://lkml.kernel.org/r/20170505101417.2117-1-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3addcf0d1f04f53fcc302577d5a5e964c18531a Author: Bin Liu Date: Thu May 25 13:42:39 2017 -0500 usb: musb: dsps: keep VBUS on for host-only mode Currently VBUS is turned off while a usb device is detached, and turned on again by the polling routine. This short period VBUS loss prevents usb modem to switch mode. VBUS should be constantly on for host-only mode, so this changes the driver to not turn off VBUS for host-only mode. Fixes: 2f3fd2c5bde1 ("usb: musb: Prepare dsps glue layer for PM runtime support") Cc: stable@vger.kernel.org #v4.11 Reported-by: Moreno Bartalucci Acked-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_dsps.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6ee98ffeea0bc9e072e419497d78697d8afcdd6d Author: Thomas Gleixner Date: Thu May 25 10:57:51 2017 +0200 x86/ftrace: Make sure that ftrace trampolines are not RWX ftrace use module_alloc() to allocate trampoline pages. The mapping of module_alloc() is RWX, which makes sense as the memory is written to right after allocation. But nothing makes these pages RO after writing to them. Add proper set_memory_rw/ro() calls to protect the trampolines after modification. Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1705251056410.1862@nanos Signed-off-by: Thomas Gleixner Signed-off-by: Steven Rostedt (VMware) arch/x86/kernel/ftrace.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit a53276e2826010338478ed94310874001a8097fa Author: Steven Rostedt (VMware) Date: Fri May 26 10:14:11 2017 -0400 x86/mm/ftrace: Do not bug in early boot on irqs_disabled in cpu_flush_range() With function tracing starting in early bootup and having its trampoline pages being read only, a bug triggered with the following: kernel BUG at arch/x86/mm/pageattr.c:189! invalid opcode: 0000 [#1] SMP Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 4.12.0-rc2-test+ #3 Hardware name: MSI MS-7823/CSM-H87M-G43 (MS-7823), BIOS V1.6 02/22/2014 task: ffffffffb4222500 task.stack: ffffffffb4200000 RIP: 0010:change_page_attr_set_clr+0x269/0x302 RSP: 0000:ffffffffb4203c88 EFLAGS: 00010046 RAX: 0000000000000046 RBX: 0000000000000000 RCX: 00000001b6000000 RDX: ffffffffb4203d40 RSI: 0000000000000000 RDI: ffffffffb4240d60 RBP: ffffffffb4203d18 R08: 00000001b6000000 R09: 0000000000000001 R10: ffffffffb4203aa8 R11: 0000000000000003 R12: ffffffffc029b000 R13: ffffffffb4203d40 R14: 0000000000000001 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff9a639ea00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff9a636b384000 CR3: 00000001ea21d000 CR4: 00000000000406b0 Call Trace: change_page_attr_clear+0x1f/0x21 set_memory_ro+0x1e/0x20 arch_ftrace_update_trampoline+0x207/0x21c ? ftrace_caller+0x64/0x64 ? 0xffffffffc029b000 ftrace_startup+0xf4/0x198 register_ftrace_function+0x26/0x3c function_trace_init+0x5e/0x73 tracer_init+0x1e/0x23 tracing_set_tracer+0x127/0x15a register_tracer+0x19b/0x1bc init_function_trace+0x90/0x92 early_trace_init+0x236/0x2b3 start_kernel+0x200/0x3f5 x86_64_start_reservations+0x29/0x2b x86_64_start_kernel+0x17c/0x18f secondary_startup_64+0x9f/0x9f ? secondary_startup_64+0x9f/0x9f Interrupts should not be enabled at this early in the boot process. It is also fine to leave interrupts enabled during this time as there's only one CPU running, and on_each_cpu() means to only run on the current CPU. If early_boot_irqs_disabled is set, it is safe to run cpu_flush_range() with interrupts disabled. Don't trigger a BUG_ON() in that case. Link: http://lkml.kernel.org/r/20170526093717.0be3b849@gandalf.local.home Suggested-by: Thomas Gleixner Signed-off-by: Steven Rostedt (VMware) arch/x86/mm/pageattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdd7e3d68492bfb7ade574f8c64b87bea499ca2e Author: Masami Hiramatsu Date: Fri May 26 13:44:54 2017 +0900 selftests/ftrace: Add a testcase for many kprobe events Add a testcase to test kprobes via ftrace interface with many concurrent kprobe events. This tries to add many kprobe events (up to 256) on kernel functions. To avoid making ftrace-based kprobes (kprobes on fentry), it skips first N bytes (on x86 N=5, on ppc or arm N=4) of function entry. After that, it enables all those events, disable it, and remove it. Since the unoptimization buffer reclaiming will be delayed, after removing events, it will wait enough time. Link: http://lkml.kernel.org/r/149577388470.11702.11832460851769204511.stgit@devbox Signed-off-by: Masami Hiramatsu Suggested-by: Steven Rostedt Signed-off-by: Steven Rostedt (VMware) .../ftrace/test.d/kprobe/multiple_kprobes.tc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit c93f5cf571e7795f97d49ef51b766cf25e328545 Author: Masami Hiramatsu Date: Thu May 25 19:38:17 2017 +0900 kprobes/x86: Fix to set RWX bits correctly before releasing trampoline Fix kprobes to set(recover) RWX bits correctly on trampoline buffer before releasing it. Releasing readonly page to module_memfree() crash the kernel. Without this fix, if kprobes user register a bunch of kprobes in function body (since kprobes on function entry usually use ftrace) and unregister it, kernel hits a BUG and crash. Link: http://lkml.kernel.org/r/149570868652.3518.14120169373590420503.stgit@devbox Signed-off-by: Masami Hiramatsu Fixes: d0381c81c2f7 ("kprobes/x86: Set kprobes pages read-only") Signed-off-by: Steven Rostedt (VMware) arch/x86/kernel/kprobes/core.c | 9 +++++++++ kernel/kprobes.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) commit f9797c2f20c0160edd718aa467101f3301e57e59 Author: Luis Henriques Date: Thu May 25 16:20:38 2017 +0100 ftrace: Fix memory leak in ftrace_graph_release() ftrace_hash is being kfree'ed in ftrace_graph_release(), however the ->buckets field is not. This results in a memory leak that is easily captured by kmemleak: unreferenced object 0xffff880038afe000 (size 8192): comm "trace-cmd", pid 238, jiffies 4294916898 (age 9.736s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] kmemleak_alloc+0x4e/0xb0 [] __kmalloc+0x12d/0x1a0 [] alloc_ftrace_hash+0x51/0x80 [] __ftrace_graph_open.isra.39.constprop.46+0xa3/0x100 [] ftrace_graph_open+0x68/0xa0 [] do_dentry_open.isra.1+0x1bd/0x2d0 [] vfs_open+0x47/0x60 [] path_openat+0x2a5/0x1020 [] do_filp_open+0x8a/0xf0 [] do_sys_open+0x12f/0x200 [] SyS_open+0x1e/0x20 [] entry_SYSCALL_64_fastpath+0x13/0x94 [] 0xffffffffffffffff Link: http://lkml.kernel.org/r/20170525152038.7661-1-lhenriques@suse.com Cc: stable@vger.kernel.org Fixes: b9b0c831bed2 ("ftrace: Convert graph filter to use hash tables") Signed-off-by: Luis Henriques Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c86daad2c25bfd4a33d48b7691afaa96d9c5ab46 Merge: e2a9aa5 a04f144 Author: Linus Torvalds Date: Fri May 26 16:45:13 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input layer fixes from Dmitry Torokhov: "Just a few fixups to a couple of drivers" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elan_i2c - ignore signals when finishing updating firmware Input: elan_i2c - clear INT before resetting controller Input: atmel_mxt_ts - add T100 as a readable object Input: edt-ft5x06 - increase allowed data range for threshold parameter commit 5720acf4bfc142ba568d5b6782fceaf62ed15e0b Author: Miroslav Benes Date: Fri May 26 14:45:21 2017 +0200 livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS If TRIM_UNUSED_KSYMS is enabled, all unneeded exported symbols are made unexported. Two-pass build of the kernel is done to find out which symbols are needed based on a configuration. This effectively complicates things for out-of-tree modules. Livepatch exports functions to (un)register and enable/disable a live patch. The only in-tree module which uses these functions is a sample in samples/livepatch/. If the sample is disabled, the functions are trimmed and out-of-tree live patches cannot be built. Note that live patches are intended to be built out-of-tree. Suggested-by: Michal Marek Acked-by: Josh Poimboeuf Acked-by: Jessica Yu Signed-off-by: Miroslav Benes Signed-off-by: Jiri Kosina kernel/livepatch/Kconfig | 1 + 1 file changed, 1 insertion(+) commit a056bdaae7a181f7dcc876cfab2f94538e508709 Author: Jan Kara Date: Fri May 26 17:45:45 2017 -0400 ext4: fix data corruption for mmap writes mpage_submit_page() can race with another process growing i_size and writing data via mmap to the written-back page. As mpage_submit_page() samples i_size too early, it may happen that ext4_bio_write_page() zeroes out too large tail of the page and thus corrupts user data. Fix the problem by sampling i_size only after the page has been write-protected in page tables by clear_page_dirty_for_io() call. Reported-by: Michael Zimmer CC: stable@vger.kernel.org Fixes: cb20d5188366f04d96d2e07b1240cc92170ade40 Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 4f8caa60a5a13a78f26198618f21774bd6aa6498 Author: Jan Kara Date: Fri May 26 17:40:52 2017 -0400 ext4: fix data corruption with EXT4_GET_BLOCKS_ZERO When ext4_map_blocks() is called with EXT4_GET_BLOCKS_ZERO to zero-out allocated blocks and these blocks are actually converted from unwritten extent the following race can happen: CPU0 CPU1 page fault page fault ... ... ext4_map_blocks() ext4_ext_map_blocks() ext4_ext_handle_unwritten_extents() ext4_ext_convert_to_initialized() - zero out converted extent ext4_zeroout_es() - inserts extent as initialized in status tree ext4_map_blocks() ext4_es_lookup_extent() - finds initialized extent write data ext4_issue_zeroout() - zeroes out new extent overwriting data This problem can be reproduced by generic/340 for the fallocated case for the last block in the file. Fix the problem by avoiding zeroing out the area we are mapping with ext4_map_blocks() in ext4_ext_convert_to_initialized(). It is pointless to zero out this area in the first place as the caller asked us to convert the area to initialized because he is just going to write data there before the transaction finishes. To achieve this we delete the special case of zeroing out full extent as that will be handled by the cases below zeroing only the part of the extent that needs it. We also instruct ext4_split_extent() that the middle of extent being split contains data so that ext4_split_extent_at() cannot zero out full extent in case of ENOSPC. CC: stable@vger.kernel.org Fixes: 12735f881952c32b31bc4e433768f18489f79ec9 Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/extents.c | 80 +++++++++++++++++++++++++------------------------------ 1 file changed, 37 insertions(+), 43 deletions(-) commit 449e2f9e95d803961635d725f6482e5e995b7554 Author: Brian Norris Date: Tue May 23 12:36:58 2017 -0700 PCI: Make error code types consistent in pci_{read,write}_config_* Callers normally treat the config space accessors as returning PCBIOS_* error codes, not Linux error codes (or they don't look at them at all). We have pcibios_err_to_errno() in case the error code needs to be translated. Fixes: 4b1038834739 ("PCI: Don't attempt config access to disconnected devices") Signed-off-by: Brian Norris Signed-off-by: Bjorn Helgaas Reviewed-by: Keith Busch drivers/pci/access.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e2a9aa5ab2a4d1fb05fcdfa9661d54e437093297 Merge: 6741d51 aace34c Author: Linus Torvalds Date: Fri May 26 14:02:30 2017 -0700 Merge tag 'led_fixes_for_4-12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED fix from Jacek Anaszewski: "A single LED fix for 4.12-rc3. leds-pca955x driver uses only i2c_smbus API and thus it should pass I2C_FUNC_SMBUS_BYTE_DATA flag to i2c_check_functionality" * tag 'led_fixes_for_4-12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: pca955x: Correct I2C Functionality commit 6741d51699ac9ef21f1fac14c63ecd31d3a7c278 Merge: cdbe020 3fb07da Author: Linus Torvalds Date: Fri May 26 13:51:01 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix state pruning in bpf verifier wrt. alignment, from Daniel Borkmann. 2) Handle non-linear SKBs properly in SCTP ICMP parsing, from Davide Caratti. 3) Fix bit field definitions for rss_hash_type of descriptors in mlx5 driver, from Jesper Brouer. 4) Defer slave->link updates until bonding is ready to do a full commit to the new settings, from Nithin Sujir. 5) Properly reference count ipv4 FIB metrics to avoid use after free situations, from Eric Dumazet and several others including Cong Wang and Julian Anastasov. 6) Fix races in llc_ui_bind(), from Lin Zhang. 7) Fix regression of ESP UDP encapsulation for TCP packets, from Steffen Klassert. 8) Fix mdio-octeon driver Kconfig deps, from Randy Dunlap. 9) Fix regression in setting DSCP on ipv6/GRE encapsulation, from Peter Dawson. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (43 commits) ipv4: add reference counting to metrics net: ethernet: ax88796: don't call free_irq without request_irq first ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets sctp: fix ICMP processing if skb is non-linear net: llc: add lock_sock in llc_ui_bind to avoid a race condition bonding: Don't update slave->link until ready to commit test_bpf: Add a couple of tests for BPF_JSGE. bpf: add various verifier test cases bpf: fix wrong exposure of map_flags into fdinfo for lpm bpf: add bpf_clone_redirect to bpf_helper_changes_pkt_data bpf: properly reset caller saved regs after helper call and ld_abs/ind bpf: fix incorrect pruning decision when alignment must be tracked arp: fixed -Wuninitialized compiler warning tcp: avoid fastopen API to be used on AF_UNSPEC net: move somaxconn init from sysctl code net: fix potential null pointer dereference geneve: fix fill_info when using collect_metadata virtio-net: enable TSO/checksum offloads for Q-in-Q vlans be2net: Fix offload features for Q-in-Q packets vlan: Fix tcp checksum offloads in Q-in-Q vlans ... commit cdbe0206783b4e86abb0150303f137e448b5e531 Merge: 1b8f2ff a54fba8 Author: Linus Torvalds Date: Fri May 26 12:13:08 2017 -0700 Merge tag 'xfs-4.12-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull XFS fixes from Darrick Wong: "A few miscellaneous bug fixes & cleanups: - Fix indlen block reservation accounting bug when splitting delalloc extent - Fix warnings about unused variables that appeared in -rc1. - Don't spew errors when bmapping a local format directory - Fix an off-by-one error in a delalloc eof assertion - Make fsmap only return inode information for CAP_SYS_ADMIN - Fix a potential mount time deadlock recovering cow extents - Fix unaligned memory access in _btree_visit_blocks - Fix various SEEK_HOLE/SEEK_DATA bugs" * tag 'xfs-4.12-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: Move handling of missing page into one place in xfs_find_get_desired_pgoff() xfs: Fix off-by-in in loop termination in xfs_find_get_desired_pgoff() xfs: Fix missed holes in SEEK_HOLE implementation xfs: fix off-by-one on max nr_pages in xfs_find_get_desired_pgoff() xfs: fix unaligned access in xfs_btree_visit_blocks xfs: avoid mount-time deadlock in CoW extent recovery xfs: only return detailed fsmap info if the caller has CAP_SYS_ADMIN xfs: bad assertion for delalloc an extent that start at i_size xfs: fix warnings about unused stack variables xfs: BMAPX shouldn't barf on inline-format directories xfs: fix indlen accounting error on partial delalloc conversion commit 3fb07daff8e99243366a081e5129560734de4ada Author: Eric Dumazet Date: Thu May 25 14:27:35 2017 -0700 ipv4: add reference counting to metrics Andrey Konovalov reported crashes in ipv4_mtu() I could reproduce the issue with KASAN kernels, between 10.246.7.151 and 10.246.7.152 : 1) 20 concurrent netperf -t TCP_RR -H 10.246.7.152 -l 1000 & 2) At the same time run following loop : while : do ip ro add 10.246.7.152 dev eth0 src 10.246.7.151 mtu 1500 ip ro del 10.246.7.152 dev eth0 src 10.246.7.151 mtu 1500 done Cong Wang attempted to add back rt->fi in commit 82486aa6f1b9 ("ipv4: restore rt->fi for reference counting") but this proved to add some issues that were complex to solve. Instead, I suggested to add a refcount to the metrics themselves, being a standalone object (in particular, no reference to other objects) I tried to make this patch as small as possible to ease its backport, instead of being super clean. Note that we believe that only ipv4 dst need to take care of the metric refcount. But if this is wrong, this patch adds the basic infrastructure to extend this to other families. Many thanks to Julian Anastasov for reviewing this patch, and Cong Wang for his efforts on this problem. Fixes: 2860583fe840 ("ipv4: Kill rt->fi") Signed-off-by: Eric Dumazet Reported-by: Andrey Konovalov Reviewed-by: Julian Anastasov Acked-by: Cong Wang Signed-off-by: David S. Miller include/net/dst.h | 8 +++++++- include/net/ip_fib.h | 10 +++++----- net/core/dst.c | 23 ++++++++++++++--------- net/ipv4/fib_semantics.c | 17 ++++++++++------- net/ipv4/route.c | 10 +++++++++- 5 files changed, 45 insertions(+), 23 deletions(-) commit 82533ad9a1ce3a7a6863849a552c2cc041b55e0d Author: Uwe Kleine-König Date: Thu May 25 22:54:53 2017 +0200 net: ethernet: ax88796: don't call free_irq without request_irq first The function ax_init_dev (which is called only from the driver's .probe function) calls free_irq in the error path without having requested the irq in the first place. So drop the free_irq call in the error path. Fixes: 825a2ff1896e ("AX88796 network driver") Signed-off-by: Uwe Kleine-König Signed-off-by: David S. Miller drivers/net/ethernet/8390/ax88796.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 0e9a709560dbcfbace8bf4019dc5298619235891 Author: Peter Dawson Date: Fri May 26 06:35:18 2017 +1000 ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets This fix addresses two problems in the way the DSCP field is formulated on the encapsulating header of IPv6 tunnels. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195661 1) The IPv6 tunneling code was manipulating the DSCP field of the encapsulating packet using the 32b flowlabel. Since the flowlabel is only the lower 20b it was incorrect to assume that the upper 12b containing the DSCP and ECN fields would remain intact when formulating the encapsulating header. This fix handles the 'inherit' and 'fixed-value' DSCP cases explicitly using the extant dsfield u8 variable. 2) The use of INET_ECN_encapsulate(0, dsfield) in ip6_tnl_xmit was incorrect and resulted in the DSCP value always being set to 0. Commit 90427ef5d2a4 ("ipv6: fix flow labels when the traffic class is non-0") caused the regression by masking out the flowlabel which exposed the incorrect handling of the DSCP portion of the flowlabel in ip6_tunnel and ip6_gre. Fixes: 90427ef5d2a4 ("ipv6: fix flow labels when the traffic class is non-0") Signed-off-by: Peter Dawson Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 13 +++++++------ net/ipv6/ip6_tunnel.c | 21 +++++++++++++-------- 2 files changed, 20 insertions(+), 14 deletions(-) commit 7485af89a6fd48f7e6fab2505d2364d1817723e6 Author: Jane Chu Date: Thu May 25 13:51:20 2017 -0600 arch/sparc: increase CONFIG_NODES_SHIFT on SPARC64 to 5 SPARC M6-32 platform has (2^5) NUMA nodes, so need to bump up the CONFIG_NODES_SHIFT to 5. Orabug: 25577754 Signed-off-by: Jane Chu Reviewed-by: Bob Picco Reviewed-by: Atish Patra Signed-off-by: David S. Miller arch/sparc/Kconfig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 804ec7ebe8ea003999ca8d1bfc499edc6a9e07df Author: Davide Caratti Date: Thu May 25 19:14:56 2017 +0200 sctp: fix ICMP processing if skb is non-linear sometimes ICMP replies to INIT chunks are ignored by the client, even if the encapsulated SCTP headers match an open socket. This happens when the ICMP packet is carried by a paged skb: use skb_header_pointer() to read packet contents beyond the SCTP header, so that chunk header and initiate tag are validated correctly. v2: - don't use skb_header_pointer() to read the transport header, since icmp_socket_deliver() already puts these 8 bytes in the linear area. - change commit message to make specific reference to INIT chunks. Signed-off-by: Davide Caratti Acked-by: Marcelo Ricardo Leitner Acked-by: Vlad Yasevich Reviewed-by: Xin Long Signed-off-by: David S. Miller net/sctp/input.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 0908cf4dfef35fc6ac12329007052ebe93ff1081 Author: linzhang Date: Thu May 25 14:07:18 2017 +0800 net: llc: add lock_sock in llc_ui_bind to avoid a race condition There is a race condition in llc_ui_bind if two or more processes/threads try to bind a same socket. If more processes/threads bind a same socket success that will lead to two problems, one is this action is not what we expected, another is will lead to kernel in unstable status or oops(in my simple test case, cause llc2.ko can't unload). The current code is test SOCK_ZAPPED bit to avoid a process to bind a same socket twice but that is can't avoid more processes/threads try to bind a same socket at the same time. So, add lock_sock in llc_ui_bind like others, such as llc_ui_connect. Signed-off-by: Lin Zhang Signed-off-by: David S. Miller net/llc/af_llc.c | 3 +++ 1 file changed, 3 insertions(+) commit 1b8f2ffc79279712e9402fb297c07911ae15180f Merge: 6ce4782 8aa6382 Author: Linus Torvalds Date: Fri May 26 11:05:22 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A collection of fixes that should go into this series. This contains: - A set of NVMe fixes, pulled from Christoph. This includes a set of fixes for the fiber channel bits from James Smart, rdma queue depth fix from Marta, controller removal fixes from Ming, and some more APST quirk updates from Andy. - A blk-mq debugfs fix from Bart, fixing a problem with the untangling of the sysfs and debugfs blk-mq bits that was added in this series. - Error code fix in add_partition() from Dan. - A small series of fixes for the new blk-throttle code from Shaohua" * 'for-linus' of git://git.kernel.dk/linux-block: (21 commits) blk-mq: Only register debugfs attributes for blk-mq queues nvme: Quirk APST on Intel 600P/P3100 devices nvme: only setup block integrity if supported by the driver nvme: replace is_flags field in nvme_ctrl_ops with a flags field nvme-pci: consistencly use ctrl->device for logging partitions/msdos: FreeBSD UFS2 file systems are not recognized block: fix an error code in add_partition() blk-throttle: force user to configure all settings for io.low blk-throttle: respect 0 bps/iops settings for io.low blk-throttle: output some debug info in trace blk-throttle: add hierarchy support for latency target and idle time nvme_fc: remove extra controller reference taken on reconnect nvme_fc: correct nvme status set on abort nvme_fc: set logging level on resets/deletes nvme_fc: revise comment on teardown nvme_fc: Support ctrl_loss_tmo nvme_fc: get rid of local reconnect_delay blk-mq: remove blk_mq_abort_requeue_list() nvme: avoid to use blk_mq_abort_requeue_list() nvme: use blk_mq_start_hw_queues() in nvme_kill_queues() ... commit 6ce47829113772b1d6b9046f5eaf00e154f0f9de Merge: 80941b2 4d071c3 Author: Linus Torvalds Date: Fri May 26 10:51:18 2017 -0700 Merge tag 'pci-v4.12-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - fix PCI_ENDPOINT build error (merged for v4.12) - fix Switchtec driver (merged for v4.12) - fix imx6 config read timeouts, fallout from changing to non-postable reads - add PM "needs_resume" flag for i915 suspend issue * tag 'pci-v4.12-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI/PM: Add needs_resume flag to avoid suspend complete optimization PCI: imx6: Fix config read timeout handling switchtec: Fix minor bug with partition ID register switchtec: Use new cdev_device_add() helper function PCI: endpoint: Make PCI_ENDPOINT depend on HAS_DMA commit 80941b2aebd3433594886d7774220c71c2d7ceec Merge: a38b461 42c99fc Author: Linus Torvalds Date: Fri May 26 09:35:22 2017 -0700 Merge tag 'ceph-for-4.12-rc3' of git://github.com/ceph/ceph-client Pul ceph fixes from Ilya Dryomov: "A bunch of make W=1 and static checker fixups, a RECONNECT_SEQ messenger patch from Zheng and Luis' fallocate fix" * tag 'ceph-for-4.12-rc3' of git://github.com/ceph/ceph-client: ceph: check that the new inode size is within limits in ceph_fallocate() libceph: cleanup old messages according to reconnect seq libceph: NULL deref on crush_decode() error path libceph: fix error handling in process_one_ticket() libceph: validate blob_struct_v in process_one_ticket() libceph: drop version variable from ceph_monmap_decode() libceph: make ceph_msg_data_advance() return void libceph: use kbasename() and kill ceph_file_part() commit a38b461ed5329d4c09c36dbc0084fc16f0adeb20 Merge: e95806d ea45267 Author: Linus Torvalds Date: Fri May 26 09:05:35 2017 -0700 Merge tag 'mmc-v4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "This contains fixes to make the WiFi work again for the ARM64 Hikey board. Together with a couple of DTS updates for the Hikey board we have also extended the mmc pwrseq_simple, to support a new power-off-delay-us DT property, as that was required to enable a graceful power off sequence for the WiFi chip" * tag 'mmc-v4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: arm64: dts: hikey: Fix WiFi support arm64: dts: hi6220: Move board data from the dwmmc nodes to hikey dts arm64: dts: hikey: Add the SYS_5V and the VDD_3V3 regulators arm64: dts: hi6220: Move the fixed_5v_hub regulator to the hikey dts arm64: dts: hikey: Add clock for the pmic mfd mfd: dts: hi655x: Add clock binding for the pmic mmc: pwrseq_simple: Parse DTS for the power-off-delay-us property mmc: dt: pwrseq-simple: Invent power-off-delay-us commit e95806dffc2f2d632c7891e71fc9ef7e1ba0ce97 Merge: 876ca8f 1fc2e41 Author: Linus Torvalds Date: Fri May 26 09:03:09 2017 -0700 Merge tag 'sound-4.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This contains a few HD-audio device-specific quirks and an endianess fix for USB-audio, as well as the update of quirk model list document. All fixes are small and trivial. The document update could have been postponed, but it's a good thing for user and has absolutely zero risk of breakage, so included here" * tag 'sound-4.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - apply STAC_9200_DELL_M22 quirk for Dell Latitude D430 ALSA: hda - Update the list of quirk models ALSA: hda - Provide dual-codecs model option for a few Realtek codecs ALSA: hda - Apply dual-codec quirk for MSI Z270-Gaming mobo ALSA: hda - No loopback on ALC299 codec ALSA: usb-audio: fix Amanero Combo384 quirk on big-endian hosts commit 52b5419016997f2960e9c8b6584c4acb3875d126 Author: Jan H. Schönherr Date: Sat May 20 13:24:32 2017 +0200 KVM: x86: Fix virtual wire mode Intel SDM says, that at most one LAPIC should be configured with ExtINT delivery. KVM configures all LAPICs this way. This causes pic_unlock() to kick the first available vCPU from the internal KVM data structures. If this vCPU is not the BSP, but some not-yet-booted AP, the BSP may never realize that there is an interrupt. Fix that by enabling ExtINT delivery only for the BSP. This allows booting a Linux guest without a TSC in the above situation. Otherwise the BSP gets stuck in calibrate_delay_converge(). Signed-off-by: Jan H. Schönherr Reviewed-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e1d39b17e044e8ae819827810d87d809ba5f58c0 Author: Jan H. Schönherr Date: Sat May 20 13:22:56 2017 +0200 KVM: nVMX: Fix handling of lmsw instruction The decision whether or not to exit from L2 to L1 on an lmsw instruction is based on bogus values: instead of using the information encoded within the exit qualification, it uses the data also used for the mov-to-cr instruction, which boils down to using whatever is in %eax at that point. Use the correct values instead. Without this fix, an L1 may not get notified when a 32-bit Linux L2 switches its secondary CPUs to protected mode; the L1 is only notified on the next modification of CR0. This short time window poses a problem, when there is some other reason to exit to L1 in between. Then, L2 will be resumed in real mode and chaos ensues. Signed-off-by: Jan H. Schönherr Reviewed-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 876ca8f3d0855043833602b9da9d1470f2a7e03f Merge: 83b4605 bc1f0e0 Author: Linus Torvalds Date: Fri May 26 08:54:06 2017 -0700 Merge tag 'drm-fixes-for-v4.12-rc3' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Not a whole lot happening here, a set of amdgpu fixes and one core deadlock fix, and some misc drivers fixes" * tag 'drm-fixes-for-v4.12-rc3' of git://people.freedesktop.org/~airlied/linux: drm/amdgpu: fix null point error when rmmod amdgpu. drm/amd/powerplay: fix a signedness bugs drm/amdgpu: fix NULL pointer panic of emit_gds_switch drm/radeon: Unbreak HPD handling for r600+ drm/amd/powerplay/smu7: disable mclk switching for high refresh rates drm/amd/powerplay/smu7: add vblank check for mclk switching (v2) drm/radeon/ci: disable mclk switching for high refresh rates (v2) drm/amdgpu/ci: disable mclk switching for high refresh rates (v2) drm/amdgpu: fix fundamental suspend/resume issue drm/gma500/psb: Actually use VBT mode when it is found drm: Fix deadlock retry loop in page_flip_ioctl drm: qxl: Delay entering atomic context during cursor update drm/radeon: Fix oops upon driver load on PowerXpress laptops commit 5acc1ca4fb15f00bfa3d4046e35ca381bc25d580 Author: Wanpeng Li Date: Sat May 20 20:32:32 2017 -0700 KVM: X86: Fix preempt the preemption timer cancel Preemption can occur during cancel preemption timer, and there will be inconsistent status in lapic, vmx and vmcs field. CPU0 CPU1 preemption timer vmexit handle_preemption_timer(vCPU0) kvm_lapic_expired_hv_timer vmx_cancel_hv_timer vmx->hv_deadline_tsc = -1 vmcs_clear_bits /* hv_timer_in_use still true */ sched_out sched_in kvm_arch_vcpu_load vmx_set_hv_timer write vmx->hv_deadline_tsc vmcs_set_bits /* back in kvm_lapic_expired_hv_timer */ hv_timer_in_use = false ... vmx_vcpu_run vmx_arm_hv_run write preemption timer deadline spurious preemption timer vmexit handle_preemption_timer(vCPU0) kvm_lapic_expired_hv_timer WARN_ON(!apic->lapic_timer.hv_timer_in_use); This can be reproduced sporadically during boot of L2 on a preemptible L1, causing a splat on L1. WARNING: CPU: 3 PID: 1952 at arch/x86/kvm/lapic.c:1529 kvm_lapic_expired_hv_timer+0xb5/0xd0 [kvm] CPU: 3 PID: 1952 Comm: qemu-system-x86 Not tainted 4.12.0-rc1+ #24 RIP: 0010:kvm_lapic_expired_hv_timer+0xb5/0xd0 [kvm] Call Trace: handle_preemption_timer+0xe/0x20 [kvm_intel] vmx_handle_exit+0xc9/0x15f0 [kvm_intel] ? lock_acquire+0xdb/0x250 ? lock_acquire+0xdb/0x250 ? kvm_arch_vcpu_ioctl_run+0xdf3/0x1ce0 [kvm] kvm_arch_vcpu_ioctl_run+0xe55/0x1ce0 [kvm] kvm_vcpu_ioctl+0x384/0x7b0 [kvm] ? kvm_vcpu_ioctl+0x384/0x7b0 [kvm] ? __fget+0xf3/0x210 do_vfs_ioctl+0xa4/0x700 ? __fget+0x114/0x210 SyS_ioctl+0x79/0x90 do_syscall_64+0x8f/0x750 ? trace_hardirqs_on_thunk+0x1a/0x1c entry_SYSCALL64_slow_path+0x25/0x25 This patch fixes it by disabling preemption while cancelling preemption timer. This way cancel_hv_timer is atomic with respect to kvm_arch_vcpu_load. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 2 ++ 1 file changed, 2 insertions(+) commit 83b4605b0c16cde5b00c8cf192408d51eab75402 Author: Christoph Hellwig Date: Sat May 20 18:59:54 2017 +0200 PCI/msi: fix the pci_alloc_irq_vectors_affinity stub We need to return an error for any call that asks for MSI / MSI-X vectors only, so that non-trivial fallback logic can work properly. Also valid dev->irq and use the "correct" errno value based on feedback from Linus. Signed-off-by: Christoph Hellwig Reported-by: Steven Rostedt Fixes: aff17164 ("PCI: Provide sensible IRQ vector alloc/free routines") Signed-off-by: Linus Torvalds include/linux/pci.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit db145db99f5bf30acc12d7450b9ad0707072a7be Author: Enric Balletbo i Serra Date: Mon May 22 11:01:53 2017 +0200 ARM: dts: am335x-sl50: Fix cannot claim requested pins for spi0 We don't need to bitbang these pins anymore, instead we muxed these pins as SPI, after this change, done in commit 6c69f726, we introduced the following error: pinctrl-single 44e10800.pinmux: pin PIN85 already requested \ by 44e10800.pinmux; cannot claim for 48030000.spi pinctrl-single 44e10800.pinmux: pin-85 (48030000.spi) status -22 Fixes: 6c69f726 ("ARM: dts: am335x-sl50: Enable SPI0 interface and Flash Memory") Cc: # 4.11 Signed-off-by: Enric Balletbo i Serra Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-sl50.dts | 4 ---- 1 file changed, 4 deletions(-) commit 56b74ed9c1e8050408b9beeee25888a49a458997 Author: Enric Balletbo i Serra Date: Mon May 22 11:01:52 2017 +0200 ARM: dts: am335x-sl50: Fix card detect pin for mmc1 The second version of the hardware moved the card detect pin from gpio0_6 to gpio1_9, as we won't support the first hardware version fix the pinmux configuration of this pin. Fixes: 8584d4fc ("ARM: dts: am335x-sl50: Add Toby-Churchill SL50 board support.") Cc: # 4.11 Signed-off-by: Enric Balletbo i Serra Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-sl50.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8aa6382907fa495e6b8b8184b53e36d142ffd8da Merge: a8ecdd7 50af47d Author: Jens Axboe Date: Fri May 26 09:11:19 2017 -0600 Merge branch 'nvme-4.12' of git://git.infradead.org/nvme into for-linus Christoph writes: "A couple of fixes for the next rc on the nvme front. Various FC fixes from James, controller removal fixes from Ming (including a block layer patch), a APST related device quirk from Andy, a RDMA fix for small queue depth device from Marta, as well as fixes for the lack of metadata support in non-PCIe drivers and the printk logging format from me." commit a8ecdd7117ee68fe27009acc8021423870c1dcd7 Author: Bart Van Assche Date: Thu May 25 16:38:06 2017 -0700 blk-mq: Only register debugfs attributes for blk-mq queues The code in blk-mq-debugfs.c assumes that it is working on a blk-mq queue and is not intended to work on a blk-sq queue. Hence only register blk-mq debugfs attributes for blk-mq queues. Fixes: commit 9c1051aacde8 ("blk-mq: untangle debugfs and sysfs") Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Ming Lei Reviewed-by: Omar Sandoval Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7327a946a3b921d60d48924d34ac99eae2fae57d Merge: 6a9905e fe0dfd6 Author: Mark Brown Date: Fri May 26 12:42:28 2017 +0100 Merge remote-tracking branch 'asoc/fix/rt286' into asoc-linus commit 6a9905e52c15bc44c791700ba58f2c2d3551363f Merge: 7a7ef5b 61abce1 3a1672b 14f814f 4efda5f f746aa5 Author: Mark Brown Date: Fri May 26 12:42:25 2017 +0100 Merge remote-tracking branches 'asoc/fix/atmel', 'asoc/fix/cirrus', 'asoc/fix/da7213', 'asoc/fix/free' and 'asoc/fix/jack' into asoc-linus commit 7a7ef5b9d563abd1f7b97b909aa38fa08b4e9d97 Merge: 5e8338d e8a3ce1 Author: Mark Brown Date: Fri May 26 12:42:24 2017 +0100 Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linus commit 5e8338db849fae05ef910de4213976a9d37e9b15 Merge: 0833289 0a71677 Author: Mark Brown Date: Fri May 26 12:42:24 2017 +0100 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus commit e8a3ce1130134046e9da132aa4d043566df8237d Author: Kuninori Morimoto Date: Fri May 26 01:44:19 2017 +0000 ASoC: rsnd: fixup parent_clk_name of AUDIO_CLKOUTx commit 25165f79adc7 ("ASoC: rsnd: enable clock-frequency for both 44.1kHz/48kHz") supported both 44.1kHz/48kHz for AUDIO_CLKOUTx, but it didn't care its parent clock name. This patch fixes it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/adg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 702644ec1cab10ffefcebb4060d4da46d4ef2c7f Author: Jan Kiszka Date: Wed May 24 20:04:41 2017 +0200 x86/timers: Move simple_udelay_calibration past init_hypervisor_platform This ensures that adjustments to x86_platform done by the hypervisor setup is already respected by this simple calibration. The current user of this, introduced by 1b5aeebf3a92 ("x86/earlyprintk: Add support for earlyprintk via USB3 debug port"), comes much later into play. Fixes: dd759d93f4dd ("x86/timers: Add simple udelay calibration") Signed-off-by: Jan Kiszka Signed-off-by: Thomas Gleixner Acked-by: Lu Baolu Link: http://lkml.kernel.org/r/5e89fe60-aab3-2c1c-aba8-32f8ad376189@siemens.com arch/x86/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 50af47d04ca530544b27affffb0722f158e2bb9c Author: Andy Lutomirski Date: Wed May 24 15:06:31 2017 -0700 nvme: Quirk APST on Intel 600P/P3100 devices They have known firmware bugs. A fix is apparently in the works -- once fixed firmware is available, someone from Intel (Hi, Keith!) can adjust the quirk accordingly. Cc: stable@vger.kernel.org # v4.11 Cc: Kai-Heng Feng Cc: Mario Limonciello Signed-off-by: Andy Lutomirski Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 2 ++ 1 file changed, 2 insertions(+) commit 9bd9590997b92fbd79fd028f704f6c584b4439d7 Author: Ville Syrjälä Date: Thu Apr 27 19:02:22 2017 +0300 drm/i915: Stop pretending to mask/unmask LPE audio interrupts vlv_display_irq_postinstall() enables the LPE audio interrupts regardless of whether the LPE audio irq chip has masked/unmasked them. Also the irqchip masking/unmasking doesn't consider the state of the display power well or the device, and hence just leads to dmesg spew when it tries to access the hardware while it's powered down. If the current way works, then we don't need to do anything in the mask/unmask hooks. If it doesn't work, well, then we'd need to properly track whether the irqchip has masked/unmasked the interrupts when we enable display interrupts. And the mask/unmask hooks would need to check whether display interrupts are even enabled before frobbing with he registers. So let's just assume the current way works and neuter the mask/unmask hooks. Also clean up vlv_display_irq_postinstall() a bit and stop it from trying to unmask/enable the LPE C interrupt on VLV since it doesn't exist. Cc: Takashi Iwai Cc: Pierre-Louis Bossart Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170427160231.13337-4-ville.syrjala@linux.intel.com Reviewed-by: Takashi Iwai (cherry picked from commit ebf5f921478b9b55ed4e634b994571dd23a8fca3) Reference: http://mid.mail-archive.com/874cf6d3-4e45-d4cf-e662-eb972490d2ce@redhat.com Tested-by: Hans de Goede Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_irq.c | 15 ++++++-------- drivers/gpu/drm/i915/intel_lpe_audio.c | 36 ---------------------------------- 2 files changed, 6 insertions(+), 45 deletions(-) commit 12ea39f8daf206eaaf926adf8f162b2f230bfb38 Merge: 2e0bb5b e274086 Author: Jani Nikula Date: Fri May 26 11:12:35 2017 +0300 Merge tag 'gvt-fixes-2017-05-25' of https://github.com/01org/gvt-linux into drm-intel-fixes gvt-fixes-2017-05-25 - workload cleanup fix for vGPU destroy (Changbin) - disable compression workaround to fix vGPU hang (Chuanxiao) Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170525083802.ae4uwx2qks2ho35b@zhen-hp.sh.intel.com commit 791229f1d530a0f0a680a4c09f98199792485f33 Author: Murali Karicheri Date: Wed Mar 29 16:02:18 2017 +0530 ARM: dts: keystone-k2l: fix broken Ethernet due to disabled OSR Ethernet networking on K2L has been broken since v4.11-rc1. This was caused by commit 32a34441a9bd ("ARM: keystone: dts: fix netcp clocks and add names"). This commit inadvertently moves on-chip static RAM clock to the end of list of clocks provided for netcp. Since keystone PM domain support does not have a list of recognized con_ids, only the first clock in the list comes under runtime PM management. This means the OSR (On-chip Static RAM) clock remains disabled and that broke networking on K2L. The OSR is used by QMSS on K2L as an external linking RAM. However this is a standalone RAM that can be used for non-QMSS usage (as well as from DSP side). So add a SRAM device node for the same and add the OSR clock to the node. Remove the now redundant OSR clock node from netcp. To manage all clocks defined for netCP's use by runtime PM needs keystone generic power domain (genpd) driver support which is under works. Meanwhile, this patch restores K2L networking and is correct irrespective of any future genpd work since OSR is an independent module and not part of NetCP anyway. Signed-off-by: Murali Karicheri Acked-by: Tero Kristo [nsekhar@ti.com: commit message updates, port to latest mainline] Signed-off-by: Sekhar Nori Cc: stable@vger.kernel.org # for 4.11 Acked-by: Santosh Shilimkar Signed-off-by: Arnd Bergmann arch/arm/boot/dts/keystone-k2l-netcp.dtsi | 4 ++-- arch/arm/boot/dts/keystone-k2l.dtsi | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) commit c81bfba9983fc44210d3eb5971e0faac597bf50d Author: Christoph Hellwig Date: Sat May 20 15:14:45 2017 +0200 nvme: only setup block integrity if supported by the driver Currently only the PCIe driver supports metadata, so we should not claim integrity support for the other drivers. This prevents nasty crashes with targets that advertise metadata support on fabrics. Also use the opportunity to factor out some code into a separate helper that isn't even compiled if CONFIG_BLK_DEV_INTEGRITY is disabled. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch drivers/nvme/host/core.c | 50 ++++++++++++++++++++++++++++++------------------ drivers/nvme/host/nvme.h | 1 + drivers/nvme/host/pci.c | 1 + 3 files changed, 33 insertions(+), 19 deletions(-) commit d3d5b87ddde09bade512526f6df90e8c06c28230 Author: Christoph Hellwig Date: Sat May 20 15:14:44 2017 +0200 nvme: replace is_flags field in nvme_ctrl_ops with a flags field So that we can have more flags for transport-specific behavior. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch drivers/nvme/host/core.c | 2 +- drivers/nvme/host/fc.c | 2 +- drivers/nvme/host/nvme.h | 3 ++- drivers/nvme/host/rdma.c | 2 +- drivers/nvme/target/loop.c | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) commit 9bdcfb10f221e796c9619fe48655e0f1272f1d92 Author: Christoph Hellwig Date: Sat May 20 15:14:43 2017 +0200 nvme-pci: consistencly use ctrl->device for logging This is what most of the code already does and gives much more useful prefixes than the device embedded in the pci_dev. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch drivers/nvme/host/pci.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit bc1f0e04da20473d6fea4444b0cd9ac638a348d5 Merge: 538fd19 b62ce39 Author: Dave Airlie Date: Fri May 26 11:51:55 2017 +1000 Merge branch 'drm-fixes-4.12' of git://people.freedesktop.org/~agd5f/linux into drm-fixes A bunch of bug fixes: - Fix display flickering on some chips at high refresh rates - suspend/resume fix - hotplug fix - a couple of segfault fixes for certain cases * 'drm-fixes-4.12' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: fix null point error when rmmod amdgpu. drm/amd/powerplay: fix a signedness bugs drm/amdgpu: fix NULL pointer panic of emit_gds_switch drm/radeon: Unbreak HPD handling for r600+ drm/amd/powerplay/smu7: disable mclk switching for high refresh rates drm/amd/powerplay/smu7: add vblank check for mclk switching (v2) drm/radeon/ci: disable mclk switching for high refresh rates (v2) drm/amdgpu/ci: disable mclk switching for high refresh rates (v2) drm/amdgpu: fix fundamental suspend/resume issue commit 538fd19ed7e24728b469704f702c2826281578b4 Merge: 0833289 82bc9a4 Author: Dave Airlie Date: Fri May 26 11:51:28 2017 +1000 Merge tag 'drm-misc-fixes-2017-05-25' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes Core Changes: - Don't drop vblank reference more than once in cases of ww retry (Daniel) Driver Changes: - radeon: Fix oops during radeon probe trying to reference wrong device (Lukas) - qxl: Avoid sleeping while in atomic context on cursor update (Gabriel) - gma500: Use VBT mode instead of pre-programmed mode for LVDS (Patrik) Cc: Lukas Wunner Cc: Gabriel Krisman Bertazi Cc: Daniel Vetter Cc: Patrik Jakobsson * tag 'drm-misc-fixes-2017-05-25' of git://anongit.freedesktop.org/git/drm-misc: drm/gma500/psb: Actually use VBT mode when it is found drm: Fix deadlock retry loop in page_flip_ioctl drm: qxl: Delay entering atomic context during cursor update drm/radeon: Fix oops upon driver load on PowerXpress laptops commit 5612ac83b9d7a32a7f2967d9f6f97e7f3428dfd2 Merge: 962ef41 1c005f9 Author: Olof Johansson Date: Thu May 25 17:04:44 2017 -0700 Merge tag 'samsung-fixes-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into fixes Update of maintainers entry for Samsung SoC. * tag 'samsung-fixes-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: MAINTAINERS: Remove Javier Martinez Canillas as reviewer for Exynos Signed-off-by: Olof Johansson commit 962ef410d933dcf92303470484e101f4661d58cc Merge: 5711ea1 6c0c57a Author: Olof Johansson Date: Thu May 25 17:02:05 2017 -0700 Merge tag 'arm-soc/for-4.12/devicetree-fixes-2' of http://github.com/Broadcom/stblinux into fixes This pull request contains Broadcom ARM-based SoCs Device Tree fixes for 4.12, please pull the following: - Phil provides a fix for the BCM283x (Raspberry Pi) by flagging the first 4KiB of physical memory as a reserved region in order to let the secondary cores successfully spin until they are brought online * tag 'arm-soc/for-4.12/devicetree-fixes-2' of http://github.com/Broadcom/stblinux: ARM: dts: bcm283x: Reserve first page for firmware Signed-off-by: Olof Johansson commit 5711ea1b5421cbc3f0e35162e3d9611b1a57544c Author: Heiko Stuebner Date: Thu May 25 01:06:50 2017 +0200 arm64: defconfig: enable some core options for 64bit Rockchip socs Enable some very core config options used on 64bit Rockchip socs. As built-in driver enable the Rockchip spi driver as well as the cros-ec-spi and cros-ec keyboard driver, as this may be helpful in case an initrd does not work as expected and drops the user into a shell. Another built-in is the fan53555 regulator driver, as it and its register-compatible cousins Silergy syr827 and syr828 are often used on Rockchip socs as cpu-supply next to regular pmic. The rest can be enabled as modules and contains the pcie host controller and its phy, the sucessive approximation adc (saradc) that gets often used for additional buttons on Rockchip boards as well as the adc-keys Keyboard driver for these keys. The cros-ec-pwm also can be a module, as it is normally only used to drive display backlights as well as the Rockchip thermal controller that allows to read the cpu and gpu temperatures and affect frequency scaling if necessary. Signed-off-by: Heiko Stuebner Signed-off-by: Olof Johansson arch/arm64/configs/defconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3616aa198fdc3c673ce920a138913b933c1f31a7 Merge: 6bf1c2d 95d7c1f Author: Olof Johansson Date: Thu May 25 16:59:43 2017 -0700 Merge tag 'davinci-fixes-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes These fix issues with power management initialization code on DaVinci. Some resources were getting freed prematurely. And there was an issue with resources not being on error. * tag 'davinci-fixes-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: PM: Do not free useful resources in normal path in 'davinci_pm_init' ARM: davinci: PM: Free resources in error handling path in 'davinci_pm_init' Signed-off-by: Olof Johansson commit 658a7568030e287215b069a9c383c0fd0c5f57d5 Merge: 370d919 dbed87a Author: Michael Turquette Date: Thu May 25 14:11:11 2017 -0700 Merge tag 'meson-clk-fixes-for-4.12-rc2' of git://github.com/baylibre/clk-meson into clk-fixes KConfig fix: - clk: meson: gxbb: fix build error without RESET_CONTROLLER commit 370d9192719e6c174167888cf9240df2542e3b4b Author: Boris Brezillon Date: Wed May 24 18:34:29 2017 +0200 clk: sunxi-ng: sun5i: Fix ahb_bist_clk definition AHB BIST gate is actually controlled with bit 7. This bug was detected while trying to use the NAND controller which is using the DMA engine to transfer data to the NAND. Since the ahb_bist_clk gate bit conflicts with the ahb_dma_clk gate bit, the core was disabling the DMA engine clock as part of its 'disable unused clks' procedure, which was causing all DMA transfers to fail after this point. Fixes: 5e73761786d6 ("clk: sunxi-ng: Add sun5i CCU driver") Cc: stable@vger.kernel.org Reported-by: Angus Ainslie Signed-off-by: Boris Brezillon Tested-by: Angus Ainslie Reviewed-by: Chen-Yu Tsai Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1495643669-28221-1-git-send-email-boris.brezillon@free-electrons.com drivers/clk/sunxi-ng/ccu-sun5i.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 797a93647a48d6cb8a20641a86a71713a947f786 Author: Nithin Sujir Date: Wed May 24 19:45:17 2017 -0700 bonding: Don't update slave->link until ready to commit In the loadbalance arp monitoring scheme, when a slave link change is detected, the slave->link is immediately updated and slave_state_changed is set. Later down the function, the rtnl_lock is acquired and the changes are committed, updating the bond link state. However, the acquisition of the rtnl_lock can fail. The next time the monitor runs, since slave->link is already updated, it determines that link is unchanged. This results in the bond link state permanently out of sync with the slave link. This patch modifies bond_loadbalance_arp_mon() to handle link changes identical to bond_ab_arp_{inspect/commit}(). The new link state is maintained in slave->new_link until we're ready to commit at which point it's copied into slave->link. NOTE: miimon_{inspect/commit}() has a more complex state machine requiring the use of the bond_{propose,commit}_link_state() functions which maintains the intermediate state in slave->link_new_state. The arp monitors don't require that. Testing: This bug is very easy to reproduce with the following steps. 1. In a loop, toggle a slave link of a bond slave interface. 2. In a separate loop, do ifconfig up/down of an unrelated interface to create contention for rtnl_lock. Within a few iterations, the bond link goes out of sync with the slave link. Signed-off-by: Nithin Nayak Sujir Cc: Mahesh Bandewar Cc: Jay Vosburgh Acked-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 791caeb084c57e3a4d648cf1ee799d1f70c0ef4e Author: David Daney Date: Wed May 24 16:35:49 2017 -0700 test_bpf: Add a couple of tests for BPF_JSGE. Some JITs can optimize comparisons with zero. Add a couple of BPF_JSGE tests against immediate zero. Signed-off-by: David Daney Acked-by: Daniel Borkmann Signed-off-by: David S. Miller lib/test_bpf.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit ae08ea976862dcd058af89fcddc2ef4790b4a2bd Merge: 5990baa 614d0d7 Author: David S. Miller Date: Thu May 25 13:44:29 2017 -0400 Merge branch 'bpf-fixes' Daniel Borkmann says: ==================== Various BPF fixes Follow-up to fix incorrect pruning when alignment tracking is in use and to properly clear regs after call to not leave stale data behind, also a fix that adds bpf_clone_redirect to the bpf_helper_changes_pkt_data helper and exposes correct map_flags for lpm map into fdinfo. For details, please see individual patches. v1 -> v2: - Reworked first patch so that env->strict_alignment is the final indicator on whether we have to deal with strict alignment rather than having CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS checks on various locations, so only checking env->strict_alignment is sufficient after that. Thanks for spotting, Dave! - Added patch 3 and 4. - Rest as is. ==================== Signed-off-by: David S. Miller commit 614d0d77b49a9b131e58b77473698ab5b2c525b7 Author: Daniel Borkmann Date: Thu May 25 01:05:09 2017 +0200 bpf: add various verifier test cases This patch adds various verifier test cases: 1) A test case for the pruning issue when tracking alignment is used. 2) Various PTR_TO_MAP_VALUE_OR_NULL tests to make sure pointer arithmetic turns such register into UNKNOWN_VALUE type. 3) Test cases for the special treatment of LD_ABS/LD_IND to make sure verifier doesn't break calling convention here. Latter is needed, since f.e. arm64 JIT uses r1 - r5 for storing temporary data, so they really must be marked as NOT_INIT. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/filter.h | 10 ++ tools/include/linux/filter.h | 10 ++ tools/testing/selftests/bpf/test_verifier.c | 239 +++++++++++++++++++++++++++- 3 files changed, 255 insertions(+), 4 deletions(-) commit a316338cb71a3260201490e615f2f6d5c0d8fb2c Author: Daniel Borkmann Date: Thu May 25 01:05:08 2017 +0200 bpf: fix wrong exposure of map_flags into fdinfo for lpm trie_alloc() always needs to have BPF_F_NO_PREALLOC passed in via attr->map_flags, since it does not support preallocation yet. We check the flag, but we never copy the flag into trie->map.map_flags, which is later on exposed into fdinfo and used by loaders such as iproute2. Latter uses this in bpf_map_selfcheck_pinned() to test whether a pinned map has the same spec as the one from the BPF obj file and if not, bails out, which is currently the case for lpm since it exposes always 0 as flags. Also copy over flags in array_map_alloc() and stack_map_alloc(). They always have to be 0 right now, but we should make sure to not miss to copy them over at a later point in time when we add actual flags for them to use. Fixes: b95a5c4db09b ("bpf: add a longest prefix match trie map implementation") Reported-by: Jarno Rajahalme Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/arraymap.c | 1 + kernel/bpf/lpm_trie.c | 1 + kernel/bpf/stackmap.c | 1 + 3 files changed, 3 insertions(+) commit 41703a731066fde79c3e5ccf3391cf77a98aeda5 Author: Daniel Borkmann Date: Thu May 25 01:05:07 2017 +0200 bpf: add bpf_clone_redirect to bpf_helper_changes_pkt_data The bpf_clone_redirect() still needs to be listed in bpf_helper_changes_pkt_data() since we call into bpf_try_make_head_writable() from there, thus we need to invalidate prior pkt regs as well. Fixes: 36bbef52c7eb ("bpf: direct packet write and access for helpers for clsact progs") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/filter.c | 1 + 1 file changed, 1 insertion(+) commit a9789ef9afcb4fb0193f8dd94f2665ba3ad71e79 Author: Daniel Borkmann Date: Thu May 25 01:05:06 2017 +0200 bpf: properly reset caller saved regs after helper call and ld_abs/ind Currently, after performing helper calls, we clear all caller saved registers, that is r0 - r5 and fill r0 depending on struct bpf_func_proto specification. The way we reset these regs can affect pruning decisions in later paths, since we only reset register's imm to 0 and type to NOT_INIT. However, we leave out clearing of other variables such as id, min_value, max_value, etc, which can later on lead to pruning mismatches due to stale data. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) commit 1ad2f5838d345e1c102bd1cd27c4f4c1349b0dc8 Author: Daniel Borkmann Date: Thu May 25 01:05:05 2017 +0200 bpf: fix incorrect pruning decision when alignment must be tracked Currently, when we enforce alignment tracking on direct packet access, the verifier lets the following program pass despite doing a packet write with unaligned access: 0: (61) r2 = *(u32 *)(r1 +76) 1: (61) r3 = *(u32 *)(r1 +80) 2: (61) r7 = *(u32 *)(r1 +8) 3: (bf) r0 = r2 4: (07) r0 += 14 5: (25) if r7 > 0x1 goto pc+4 R0=pkt(id=0,off=14,r=0) R1=ctx R2=pkt(id=0,off=0,r=0) R3=pkt_end R7=inv,min_value=0,max_value=1 R10=fp 6: (2d) if r0 > r3 goto pc+1 R0=pkt(id=0,off=14,r=14) R1=ctx R2=pkt(id=0,off=0,r=14) R3=pkt_end R7=inv,min_value=0,max_value=1 R10=fp 7: (63) *(u32 *)(r0 -4) = r0 8: (b7) r0 = 0 9: (95) exit from 6 to 8: R0=pkt(id=0,off=14,r=0) R1=ctx R2=pkt(id=0,off=0,r=0) R3=pkt_end R7=inv,min_value=0,max_value=1 R10=fp 8: (b7) r0 = 0 9: (95) exit from 5 to 10: R0=pkt(id=0,off=14,r=0) R1=ctx R2=pkt(id=0,off=0,r=0) R3=pkt_end R7=inv,min_value=2 R10=fp 10: (07) r0 += 1 11: (05) goto pc-6 6: safe <----- here, wrongly found safe processed 15 insns However, if we enforce a pruning mismatch by adding state into r8 which is then being mismatched in states_equal(), we find that for the otherwise same program, the verifier detects a misaligned packet access when actually walking that path: 0: (61) r2 = *(u32 *)(r1 +76) 1: (61) r3 = *(u32 *)(r1 +80) 2: (61) r7 = *(u32 *)(r1 +8) 3: (b7) r8 = 1 4: (bf) r0 = r2 5: (07) r0 += 14 6: (25) if r7 > 0x1 goto pc+4 R0=pkt(id=0,off=14,r=0) R1=ctx R2=pkt(id=0,off=0,r=0) R3=pkt_end R7=inv,min_value=0,max_value=1 R8=imm1,min_value=1,max_value=1,min_align=1 R10=fp 7: (2d) if r0 > r3 goto pc+1 R0=pkt(id=0,off=14,r=14) R1=ctx R2=pkt(id=0,off=0,r=14) R3=pkt_end R7=inv,min_value=0,max_value=1 R8=imm1,min_value=1,max_value=1,min_align=1 R10=fp 8: (63) *(u32 *)(r0 -4) = r0 9: (b7) r0 = 0 10: (95) exit from 7 to 9: R0=pkt(id=0,off=14,r=0) R1=ctx R2=pkt(id=0,off=0,r=0) R3=pkt_end R7=inv,min_value=0,max_value=1 R8=imm1,min_value=1,max_value=1,min_align=1 R10=fp 9: (b7) r0 = 0 10: (95) exit from 6 to 11: R0=pkt(id=0,off=14,r=0) R1=ctx R2=pkt(id=0,off=0,r=0) R3=pkt_end R7=inv,min_value=2 R8=imm1,min_value=1,max_value=1,min_align=1 R10=fp 11: (07) r0 += 1 12: (b7) r8 = 0 13: (05) goto pc-7 <----- mismatch due to r8 7: (2d) if r0 > r3 goto pc+1 R0=pkt(id=0,off=15,r=15) R1=ctx R2=pkt(id=0,off=0,r=15) R3=pkt_end R7=inv,min_value=2 R8=imm0,min_value=0,max_value=0,min_align=2147483648 R10=fp 8: (63) *(u32 *)(r0 -4) = r0 misaligned packet access off 2+15+-4 size 4 The reason why we fail to see it in states_equal() is that the third test in compare_ptrs_to_packet() ... if (old->off <= cur->off && old->off >= old->range && cur->off >= cur->range) return true; ... will let the above pass. The situation we run into is that old->off <= cur->off (14 <= 15), meaning that prior walked paths went with smaller offset, which was later used in the packet access after successful packet range check and found to be safe already. For example: Given is R0=pkt(id=0,off=0,r=0). Adding offset 14 as in above program to it, results in R0=pkt(id=0,off=14,r=0) before the packet range test. Now, testing this against R3=pkt_end with 'if r0 > r3 goto out' will transform R0 into R0=pkt(id=0,off=14,r=14) for the case when we're within bounds. A write into the packet at offset *(u32 *)(r0 -4), that is, 2 + 14 -4, is valid and aligned (2 is for NET_IP_ALIGN). After processing this with all fall-through paths, we later on check paths from branches. When the above skb->mark test is true, then we jump near the end of the program, perform r0 += 1, and jump back to the 'if r0 > r3 goto out' test we've visited earlier already. This time, R0 is of type R0=pkt(id=0,off=15,r=0), and we'll prune that part because this time we'll have a larger safe packet range, and we already found that with off=14 all further insn were already safe, so it's safe as well with a larger off. However, the problem is that the subsequent write into the packet with 2 + 15 -4 is then unaligned, and not caught by the alignment tracking. Note that min_align, aux_off, and aux_off_align were all 0 in this example. Since we cannot tell at this time what kind of packet access was performed in the prior walk and what minimal requirements it has (we might do so in the future, but that requires more complexity), fix it to disable this pruning case for strict alignment for now, and let the verifier do check such paths instead. With that applied, the test cases pass and reject the program due to misalignment. Fixes: d1174416747d ("bpf: Track alignment of register values in the verifier.") Reference: http://patchwork.ozlabs.org/patch/761909/ Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 5990baaa6d7b437dfcf58b7021ca56b1d6b35869 Author: Ihar Hrachyshka Date: Wed May 24 15:19:35 2017 -0700 arp: fixed -Wuninitialized compiler warning Commit 7d472a59c0e5ec117220a05de6b370447fb6cb66 ("arp: always override existing neigh entries with gratuitous ARP") introduced a compiler warning: net/ipv4/arp.c:880:35: warning: 'addr_type' may be used uninitialized in this function [-Wmaybe-uninitialized] While the code logic seems to be correct and doesn't allow the variable to be used uninitialized, and the warning is not consistently reproducible, it's still worth fixing it for other people not to waste time looking at the warning in case it pops up in the build environment. Yes, compiler is probably at fault, but we will need to accommodate. Fixes: 7d472a59c0e5 ("arp: always override existing neigh entries with gratuitous ARP") Signed-off-by: Ihar Hrachyshka Signed-off-by: David S. Miller net/ipv4/arp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba615f675281d76fd19aa03558777f81fb6b6084 Author: Wei Wang Date: Wed May 24 09:59:31 2017 -0700 tcp: avoid fastopen API to be used on AF_UNSPEC Fastopen API should be used to perform fastopen operations on the TCP socket. It does not make sense to use fastopen API to perform disconnect by calling it with AF_UNSPEC. The fastopen data path is also prone to race conditions and bugs when using with AF_UNSPEC. One issue reported and analyzed by Vegard Nossum is as follows: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Thread A: Thread B: ------------------------------------------------------------------------ sendto() - tcp_sendmsg() - sk_stream_memory_free() = 0 - goto wait_for_sndbuf - sk_stream_wait_memory() - sk_wait_event() // sleep | sendto(flags=MSG_FASTOPEN, dest_addr=AF_UNSPEC) | - tcp_sendmsg() | - tcp_sendmsg_fastopen() | - __inet_stream_connect() | - tcp_disconnect() //because of AF_UNSPEC | - tcp_transmit_skb()// send RST | - return 0; // no reconnect! | - sk_stream_wait_connect() | - sock_error() | - xchg(&sk->sk_err, 0) | - return -ECONNRESET - ... // wake up, see sk->sk_err == 0 - skb_entail() on TCP_CLOSE socket If the connection is reopened then we will send a brand new SYN packet after thread A has already queued a buffer. At this point I think the socket internal state (sequence numbers etc.) becomes messed up. When the new connection is closed, the FIN-ACK is rejected because the sequence number is outside the window. The other side tries to retransmit, but __tcp_retransmit_skb() calls tcp_trim_head() on an empty skb which corrupts the skb data length and hits a BUG() in copy_and_csum_bits(). +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Hence, this patch adds a check for AF_UNSPEC in the fastopen data path and return EOPNOTSUPP to user if such case happens. Fixes: cf60af03ca4e7 ("tcp: Fast Open client - sendmsg(MSG_FASTOPEN)") Reported-by: Vegard Nossum Signed-off-by: Wei Wang Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 7c3f1875c66fbc19762760097cabc91849ea0bbb Author: Roman Kapl Date: Wed May 24 10:22:22 2017 +0200 net: move somaxconn init from sysctl code The default value for somaxconn is set in sysctl_core_net_init(), but this function is not called when kernel is configured without CONFIG_SYSCTL. This results in the kernel not being able to accept TCP connections, because the backlog has zero size. Usually, the user ends up with: "TCP: request_sock_TCP: Possible SYN flooding on port 7. Dropping request. Check SNMP counters." If SYN cookies are not enabled the connection is rejected. Before ef547f2ac16 (tcp: remove max_qlen_log), the effects were less severe, because the backlog was always at least eight slots long. Signed-off-by: Roman Kapl Signed-off-by: David S. Miller net/core/net_namespace.c | 19 +++++++++++++++++++ net/core/sysctl_net_core.c | 2 -- 2 files changed, 19 insertions(+), 2 deletions(-) commit a04f144059ac09f2c3da50b5707df589044aad66 Author: KT Liao Date: Tue May 23 13:41:47 2017 -0700 Input: elan_i2c - ignore signals when finishing updating firmware Use wait_for_completion_timeout() instead of wait_for_completion_interruptible_timeout() to avoid stray signals ruining firmware update. Our timeout is only 300 msec so we are fine simply letting it expire in case device misbehaves. Signed-off-by: KT Liao Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_i2c.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 4b3c7dbbfff0673e8a89575414b864d8b001d3bb Author: KT Liao Date: Thu May 25 10:06:21 2017 -0700 Input: elan_i2c - clear INT before resetting controller Some old touchpad FWs need to have interrupt cleared before issuing reset command after updating firmware. We clear interrupt by attempting to read full report from the controller, and discarding any data read. Signed-off-by: KT Liao Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_i2c.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 65d786c21bf8140dac83563306f46fe0b13a9aaa Author: Gustavo A. R. Silva Date: Tue May 23 18:18:37 2017 -0500 net: fix potential null pointer dereference Add null check to avoid a potential null pointer dereference. Addresses-Coverity-ID: 1408831 Signed-off-by: Gustavo A. R. Silva Acked-by: Pablo Neira Ayuso Signed-off-by: David S. Miller drivers/net/gtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b62ce397675502325d4282924bf70cfb6a005c3a Author: Rex Zhu Date: Mon May 22 13:11:41 2017 +0800 drm/amdgpu: fix null point error when rmmod amdgpu. this bug happened when amdgpu load failed. [ 75.740951] BUG: unable to handle kernel paging request at 00000000000031c0 [ 75.748167] IP: [] amdgpu_fbdev_restore_mode+0x20/0x60 [amdgpu] [ 75.755774] PGD 0 [ 75.759185] Oops: 0000 [#1] SMP [ 75.762408] Modules linked in: amdgpu(OE-) ttm(OE) drm_kms_helper(OE) drm(OE) i2c_algo_bit(E) fb_sys_fops(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) rpcsec_gss_krb5(E) nfsv4(E) nfs(E) fscache(E) eeepc_wmi(E) asus_wmi(E) sparse_keymap(E) intel_rapl(E) snd_hda_codec_hdmi(E) snd_hda_codec_realtek(E) snd_hda_codec_generic(E) snd_hda_intel(E) snd_hda_codec(E) snd_hda_core(E) x86_pkg_temp_thermal(E) intel_powerclamp(E) snd_hwdep(E) snd_pcm(E) snd_seq_midi(E) coretemp(E) kvm_intel(E) snd_seq_midi_event(E) snd_rawmidi(E) kvm(E) snd_seq(E) joydev(E) snd_seq_device(E) snd_timer(E) irqbypass(E) crct10dif_pclmul(E) crc32_pclmul(E) mei_me(E) ghash_clmulni_intel(E) snd(E) aesni_intel(E) mei(E) soundcore(E) aes_x86_64(E) shpchp(E) serio_raw(E) lrw(E) acpi_pad(E) gf128mul(E) glue_helper(E) ablk_helper(E) mac_hid(E) [ 75.835574] cryptd(E) parport_pc(E) ppdev(E) lp(E) nfsd(E) parport(E) auth_rpcgss(E) nfs_acl(E) lockd(E) grace(E) sunrpc(E) autofs4(E) hid_generic(E) usbhid(E) mxm_wmi(E) psmouse(E) e1000e(E) ptp(E) pps_core(E) ahci(E) libahci(E) wmi(E) video(E) i2c_hid(E) hid(E) [ 75.858489] CPU: 5 PID: 1603 Comm: rmmod Tainted: G OE 4.9.0-custom #2 [ 75.866183] Hardware name: System manufacturer System Product Name/Z170-A, BIOS 0901 08/31/2015 [ 75.875050] task: ffff88045d1bbb80 task.stack: ffffc90002de4000 [ 75.881094] RIP: 0010:[] [] amdgpu_fbdev_restore_mode+0x20/0x60 [amdgpu] [ 75.891238] RSP: 0018:ffffc90002de7d48 EFLAGS: 00010286 [ 75.896648] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001 [ 75.903933] RDX: 0000000000000000 RSI: ffff88045d1bbb80 RDI: 0000000000000286 [ 75.911183] RBP: ffffc90002de7d50 R08: 0000000000000502 R09: 0000000000000004 [ 75.918449] R10: 0000000000000000 R11: 0000000000000001 R12: ffff880464bf0000 [ 75.925675] R13: ffffffffa0853000 R14: 0000000000000000 R15: 0000564e44f88210 [ 75.932980] FS: 00007f13d5400700(0000) GS:ffff880476540000(0000) knlGS:0000000000000000 [ 75.941238] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 75.947088] CR2: 00000000000031c0 CR3: 000000045fd0b000 CR4: 00000000003406e0 [ 75.954332] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 75.961566] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 75.968834] Stack: [ 75.970881] ffff880464bf0000 ffffc90002de7d60 ffffffffa0636592 ffffc90002de7d80 [ 75.978454] ffffffffa059015f ffff880464bf0000 ffff880464bf0000 ffffc90002de7da8 [ 75.986076] ffffffffa0595216 ffff880464bf0000 ffff880460f4d000 ffffffffa0853000 [ 75.993692] Call Trace: [ 75.996177] [] amdgpu_driver_lastclose_kms+0x12/0x20 [amdgpu] [ 76.003700] [] drm_lastclose+0x2f/0xd0 [drm] [ 76.009777] [] drm_dev_unregister+0x16/0xd0 [drm] [ 76.016255] [] drm_put_dev+0x34/0x70 [drm] [ 76.022139] [] amdgpu_pci_remove+0x15/0x20 [amdgpu] [ 76.028800] [] pci_device_remove+0x39/0xc0 [ 76.034661] [] __device_release_driver+0x9a/0x140 [ 76.041121] [] driver_detach+0xb8/0xc0 [ 76.046575] [] bus_remove_driver+0x55/0xd0 [ 76.052401] [] driver_unregister+0x2c/0x50 [ 76.058244] [] pci_unregister_driver+0x29/0x90 [ 76.064466] [] drm_pci_exit+0x9e/0xb0 [drm] [ 76.070507] [] amdgpu_exit+0x1c/0x32 [amdgpu] [ 76.076609] [] SyS_delete_module+0x1a0/0x200 [ 76.082627] [] ? rcu_eqs_enter.isra.36+0x4a/0x50 [ 76.089001] [] do_syscall_64+0x6e/0x180 [ 76.094583] [] entry_SYSCALL64_slow_path+0x25/0x25 [ 76.101114] Code: 94 c0 c3 31 c0 5d c3 0f 1f 40 00 0f 1f 44 00 00 55 31 c0 48 89 e5 53 48 89 fb 48 c7 c7 1d 21 84 a0 e8 ab 77 b3 e0 e8 fc 8b d7 e0 <48> 8b bb c0 31 00 00 48 85 ff 74 09 e8 ff eb fc ff 85 c0 75 03 [ 76.121432] RIP [] amdgpu_fbdev_restore_mode+0x20/0x60 [amdgpu] Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 11387fe4a98f75d1f4cdb3efe3b42b19205c9df5 Author: Eric Garver Date: Tue May 23 18:37:27 2017 -0400 geneve: fix fill_info when using collect_metadata Since 9b4437a5b870 ("geneve: Unify LWT and netdev handling.") fill_info does not return UDP_ZERO_CSUM6_RX when using COLLECT_METADATA. This is because it uses ip_tunnel_info_af() with the device level info, which is not valid for COLLECT_METADATA. Fix by checking for the presence of the actual sockets. Fixes: 9b4437a5b870 ("geneve: Unify LWT and netdev handling.") Signed-off-by: Eric Garver Acked-by: Pravin B Shelar Signed-off-by: David S. Miller drivers/net/geneve.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit a54fba8f5a0dc36161cacdf2aa90f007f702ec1a Author: Jan Kara Date: Thu May 18 16:36:24 2017 -0700 xfs: Move handling of missing page into one place in xfs_find_get_desired_pgoff() Currently several places in xfs_find_get_desired_pgoff() handle the case of a missing page. Make them all handled in one place after the loop has terminated. Signed-off-by: Jan Kara Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_file.c | 38 ++++++++------------------------------ 1 file changed, 8 insertions(+), 30 deletions(-) commit d7fd24257aa60316bf81093f7f909dc9475ae974 Author: Jan Kara Date: Thu May 18 16:36:23 2017 -0700 xfs: Fix off-by-in in loop termination in xfs_find_get_desired_pgoff() There is an off-by-one error in loop termination conditions in xfs_find_get_desired_pgoff() since 'end' may index a page beyond end of desired range if 'endoff' is page aligned. It doesn't have any visible effects but still it is good to fix it. Signed-off-by: Jan Kara Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5375023ae1266553a7baa0845e82917d8803f48c Author: Jan Kara Date: Thu May 18 16:36:22 2017 -0700 xfs: Fix missed holes in SEEK_HOLE implementation XFS SEEK_HOLE implementation could miss a hole in an unwritten extent as can be seen by the following command: xfs_io -c "falloc 0 256k" -c "pwrite 0 56k" -c "pwrite 128k 8k" -c "seek -h 0" file wrote 57344/57344 bytes at offset 0 56 KiB, 14 ops; 0.0000 sec (49.312 MiB/sec and 12623.9856 ops/sec) wrote 8192/8192 bytes at offset 131072 8 KiB, 2 ops; 0.0000 sec (70.383 MiB/sec and 18018.0180 ops/sec) Whence Result HOLE 139264 Where we can see that hole at offset 56k was just ignored by SEEK_HOLE implementation. The bug is in xfs_find_get_desired_pgoff() which does not properly detect the case when pages are not contiguous. Fix the problem by properly detecting when found page has larger offset than expected. CC: stable@vger.kernel.org Fixes: d126d43f631f996daeee5006714fed914be32368 Signed-off-by: Jan Kara Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_file.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) commit 8affebe16d79ebefb1d9d6d56a46dc89716f9453 Author: Eryu Guan Date: Tue May 23 08:30:46 2017 -0700 xfs: fix off-by-one on max nr_pages in xfs_find_get_desired_pgoff() xfs_find_get_desired_pgoff() is used to search for offset of hole or data in page range [index, end] (both inclusive), and the max number of pages to search should be at least one, if end == index. Otherwise the only page is missed and no hole or data is found, which is not correct. When block size is smaller than page size, this can be demonstrated by preallocating a file with size smaller than page size and writing data to the last block. E.g. run this xfs_io command on a 1k block size XFS on x86_64 host. # xfs_io -fc "falloc 0 3k" -c "pwrite 2k 1k" \ -c "seek -d 0" /mnt/xfs/testfile wrote 1024/1024 bytes at offset 2048 1 KiB, 1 ops; 0.0000 sec (33.675 MiB/sec and 34482.7586 ops/sec) Whence Result DATA EOF Data at offset 2k was missed, and lseek(2) returned ENXIO. This is uncovered by generic/285 subtest 07 and 08 on ppc64 host, where pagesize is 64k. Because a recent change to generic/285 reduced the preallocated file size to smaller than 64k. Cc: stable@vger.kernel.org # v3.7+ Signed-off-by: Eryu Guan Reviewed-by: Jan Kara Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4d768e702de224cc85e0c8eac9311763403b368 Author: Eric Sandeen Date: Mon May 22 19:54:10 2017 -0700 xfs: fix unaligned access in xfs_btree_visit_blocks This structure copy was throwing unaligned access warnings on sparc64: Kernel unaligned access at TPC[1043c088] xfs_btree_visit_blocks+0x88/0xe0 [xfs] xfs_btree_copy_ptrs does a memcpy, which avoids it. Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdc1daca1b9b9ea3809009af944ade641dc32e86 Author: Guilherme G. Piccoli Date: Thu May 18 16:53:20 2017 -0300 MAINTAINERS: Change maintainer of genwqe driver Gabriel won't maintain this driver anymore. So, I'll maintain it with Frank. Thanks Gabriel for all your work on genwqe. Signed-off-by: Guilherme G. Piccoli Acked-by: Gabriel Krisman Bertazi Acked-by: Frank Haverkamp Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3eff8ecd271d941b2326dba7defd0ca7c4c0baf5 Author: Wei Yongjun Date: Sun May 21 00:45:46 2017 +0000 goldfish_pipe: use GFP_ATOMIC under spin lock The function get_free_pipe_id_locked() is called from goldfish_pipe_open() with a lock is held, so we should use GFP_ATOMIC instead of GFP_KERNEL. Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/platform/goldfish/goldfish_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 717902cc93118119a6fce7765da6cf2786987418 Author: Timmy Li Date: Mon May 22 16:48:28 2017 +0100 ARM64: PCI: Fix struct acpi_pci_root_ops allocation failure path Commit 093d24a20442 ("arm64: PCI: Manage controller-specific data on per-controller basis") added code to allocate ACPI PCI root_ops dynamically on a per host bridge basis but failed to update the corresponding memory allocation failure path in pci_acpi_scan_root() leading to a potential memory leakage. Fix it by adding the required kfree call. Fixes: 093d24a20442 ("arm64: PCI: Manage controller-specific data on per-controller basis") Reviewed-by: Tomasz Nowicki Signed-off-by: Timmy Li [lorenzo.pieralisi@arm.com: refactored code, rewrote commit log] Signed-off-by: Lorenzo Pieralisi CC: Will Deacon CC: Bjorn Helgaas Signed-off-by: Catalin Marinas arch/arm64/kernel/pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2ee1cc70552e5520a275254427c0c37fc81728d2 Author: Dmitry Torokhov Date: Tue May 23 17:07:44 2017 -0700 firmware: vpd: do not leak kobjects kobject_del() only unlinks kobject, we need to use kobject_put() to make sure kobject will go away completely. Fixes: 049a59db34eb ("firmware: Google VPD sysfs driver") Signed-off-by: Dmitry Torokhov Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/vpd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ce57cba37f3721c21e46adf21c61292dfd7a9c04 Author: Dmitry Torokhov Date: Tue May 23 17:07:43 2017 -0700 firmware: vpd: avoid potential use-after-free when destroying section We should not free info->key before we remove sysfs attribute that uses this data as its name. Fixes: 049a59db34eb ("firmware: Google VPD sysfs driver") Signed-off-by: Dmitry Torokhov Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/vpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f53de2069c801776f0f5d1a1d665324967a4fab Author: Dmitry Torokhov Date: Tue May 23 17:07:41 2017 -0700 firmware: vpd: do not leave freed section attributes to the list We should only add section attribute to the list of section attributes if we successfully created corresponding sysfs attribute. Fixes: 049a59db34eb ("firmware: Google VPD sysfs driver") Signed-off-by: Dmitry Torokhov Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/vpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4700a26107241cc7b9ac8528b2c6714ff99983d Author: Nicholas Piggin Date: Sat May 20 14:29:49 2017 +1000 powerpc: Add PPC_FEATURE userspace bits for SCV and DARN instructions Providing "scv" support to userspace requires kernel support, so it must be advertised as independently to the base ISA 3 instruction set. The darn instruction relies on firmware enablement, so it has been decided to split this out from the core ISA 3 feature as well. Signed-off-by: Nicholas Piggin Acked-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/uapi/asm/cputable.h | 2 ++ arch/powerpc/kernel/cputable.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit d75e4919cc0b6fbcbc8d6654ef66d87a9dbf1526 Author: Jeremy Kerr Date: Wed May 24 16:49:59 2017 +1000 powerpc/spufs: Fix hash faults for kernel regions Commit ac29c64089b7 ("powerpc/mm: Replace _PAGE_USER with _PAGE_PRIVILEGED") swapped _PAGE_USER for _PAGE_PRIVILEGED, and introduced check_pte_access() which denied kernel access to non-_PAGE_PRIVILEGED pages. However, it didn't add _PAGE_PRIVILEGED to the hash fault handler for spufs' kernel accesses, so the DMAs required to establish SPE memory no longer work. This change adds _PAGE_PRIVILEGED to the hash fault handler for kernel accesses. Fixes: ac29c64089b7 ("powerpc/mm: Replace _PAGE_USER with _PAGE_PRIVILEGED") Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: Jeremy Kerr Reported-by: Sombat Tragolgosol Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/platforms/cell/spu_base.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d957fb4d173647640a2b83e7c7e56a580e7fc7e7 Author: Michael Neuling Date: Wed May 24 17:03:26 2017 +1000 powerpc: Fix booting P9 hash with CONFIG_PPC_RADIX_MMU=N Currently if you disable CONFIG_PPC_RADIX_MMU you'll crash on boot on a P9. This is because we still set MMU_FTR_TYPE_RADIX via ibm,pa-features and MMU_FTR_TYPE_RADIX is what's used for code patching in much of the asm code (ie. slb_miss_realmode) This patch fixes the problem by stopping MMU_FTR_TYPE_RADIX from being set from ibm.pa-features. We may eventually end up removing the CONFIG_PPC_RADIX_MMU option completely but until then this fixes the issue. Fixes: 17a3dd2f5fc7 ("powerpc/mm/radix: Use firmware feature to enable Radix MMU") Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/kernel/prom.c | 2 ++ 1 file changed, 2 insertions(+) commit 415ba3c157b9de7edc59468d19d48c1d15972a75 Author: Alistair Popple Date: Sat May 20 06:56:35 2017 +1000 powerpc/powernv/npu-dma.c: Fix opal_npu_destroy_context() call opal_npu_destroy_context() should be called with the NPU PHB, not the PCIe PHB. Fixes: 1ab66d1fbada ("powerpc/powernv: Introduce address translation services for Nvlink2") Signed-off-by: Alistair Popple Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/npu-dma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3d51b956267343a65498704ada854c33c0f5e946 Author: Arnd Bergmann Date: Fri May 19 10:04:01 2017 +0200 staging: ccree: add CRYPTO dependency A rare randconfig build error shows up when we have CONFIG_CRYPTO=m in combination with a built-in CCREE driver: crypto/hmac.o: In function `hmac_update': hmac.c:(.text.hmac_update+0x28): undefined reference to `crypto_shash_update' crypto/hmac.o: In function `hmac_setkey': hmac.c:(.text.hmac_setkey+0x90): undefined reference to `crypto_shash_digest' hmac.c:(.text.hmac_setkey+0x154): undefined reference to `crypto_shash_update' drivers/staging/ccree/ssi_cipher.o: In function `ssi_blkcipher_setkey': ssi_cipher.c:(.text.ssi_blkcipher_setkey+0x350): undefined reference to `crypto_shash_digest' drivers/staging/ccree/ssi_cipher.o: In function `ssi_blkcipher_exit': ssi_cipher.c:(.text.ssi_blkcipher_exit+0xd4): undefined reference to `crypto_destroy_tfm' drivers/staging/ccree/ssi_cipher.o: In function `ssi_blkcipher_init': ssi_cipher.c:(.text.ssi_blkcipher_init+0x1b0): undefined reference to `crypto_alloc_shash' drivers/staging/ccree/ssi_cipher.o: In function `ssi_ablkcipher_free': ssi_cipher.c:(.text.ssi_ablkcipher_free+0x48): undefined reference to `crypto_unregister_alg' drivers/staging/ccree/ssi_cipher.o: In function `ssi_ablkcipher_alloc': ssi_cipher.c:(.text.ssi_ablkcipher_alloc+0x138): undefined reference to `crypto_register_alg' ssi_cipher.c:(.text.ssi_ablkcipher_alloc+0x274): undefined reference to `crypto_blkcipher_type' We actually need to depend on both CRYPTO and CRYPTO_HW here to avoid the problem, since CRYPTO_HW is a bool symbol and by itself that does not force CCREE to be a loadable module when the core cryto support is modular. Fixes: 50cfbbb7e627 ("staging: ccree: add ahash support") Signed-off-by: Arnd Bergmann Acked-By: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59fe2cc8b1c32dd139da80fc8222b5b3290b7a09 Author: Tobias Klauser Date: Fri May 19 13:59:20 2017 +0200 serial: altera_uart: call iounmap() at driver remove The driver calls ioremap() in the probe function but doesn't call iounmap() in the remove function correspondingly. Do so now. Follow commit 5c9d6abed9e0 ("serial: altera_jtaguart: adding iounmap()") Cc: Alexey Khoroshilov Signed-off-by: Tobias Klauser Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/altera_uart.c | 1 + 1 file changed, 1 insertion(+) commit 6df765dca378bddf994cfd2044acafa501bd800f Author: Uwe Kleine-König Date: Wed May 24 21:38:46 2017 +0200 serial: imx: ensure UCR3 and UFCR are setup correctly Commit e61c38d85b73 ("serial: imx: setup DCEDTE early and ensure DCD and RI irqs to be off") has a flaw: While UCR3 and UFCR were modified using read-modify-write before it switched to write register values independent of the previous state. That's a good idea in principle (and that's why I did it) but needs more care. This patch reinstates read-modify-write for UFCR and for UCR3 ensures that RXDMUXSEL and ADNIMP are set for post imx1. Fixes: e61c38d85b73 ("serial: imx: setup DCEDTE early and ensure DCD and RI irqs to be off") Signed-off-by: Uwe Kleine-König Acked-by: Mika Penttilä Tested-by: Mika Penttilä Acked-by: Steve Twiss Tested-by: Steve Twiss Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit be941bf2e6a32605935865972df7abf74087944f Merge: 2426125 1bad6c4 Author: Linus Torvalds Date: Wed May 24 20:29:53 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "This is quite a big update because it includes a rework of the lpfc driver to separate the NVMe part from the FC part. The reason for doing this is because two separate trees (the nvme and scsi trees respectively) want to update the individual components and this separation will prevent a really nasty cross tree entanglement by the time we reach the next merge window. The rest of the fixes are the usual minor sort with no significant security implications" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (25 commits) scsi: zero per-cmd private driver data for each MQ I/O scsi: csiostor: fix use after free in csio_hw_use_fwconfig() scsi: ufs: Clean up some rpm/spm level SysFS nodes upon remove scsi: lpfc: fix build issue if NVME_FC_TARGET is not defined scsi: lpfc: Fix NULL pointer dereference during PCI error recovery scsi: lpfc: update version to 11.2.0.14 scsi: lpfc: Add MDS Diagnostic support. scsi: lpfc: Fix NVMEI's handling of NVMET's PRLI response attributes scsi: lpfc: Cleanup entry_repost settings on SLI4 queues scsi: lpfc: Fix debugfs root inode "lpfc" not getting deleted on driver unload. scsi: lpfc: Fix NVME I+T not registering NVME as a supported FC4 type scsi: lpfc: Added recovery logic for running out of NVMET IO context resources scsi: lpfc: Separate NVMET RQ buffer posting from IO resources SGL/iocbq/context scsi: lpfc: Separate NVMET data buffer pool fir ELS/CT. scsi: lpfc: Fix NMI watchdog assertions when running nvmet IOPS tests scsi: lpfc: Fix NVMEI driver not decrementing counter causing bad rport state. scsi: lpfc: Fix nvmet RQ resource needs for large block writes. scsi: lpfc: Adding additional stats counters for nvme. scsi: lpfc: Fix system crash when port is reset. scsi: lpfc: Fix used-RPI accounting problem. ... commit d5ff0eed3a6621f6fd6c14f042c30a6eacfa77f1 Author: Joe Carnuccio Date: Wed May 24 18:06:24 2017 -0700 scsi: qla2xxx: Fix crash due to NULL pointer dereference of ctx Fixes following signature in the stack trace: BUG: unable to handle kernel NULL pointer dereference at 0000000000000374 IP: [] qla2x00_sp_free_dma+0xeb/0x2a0 [qla2xxx] Cc: # v4.10+ Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_inline.h | 26 +++++++------------------- drivers/scsi/qla2xxx/qla_os.c | 30 +++++++++++++++++++----------- drivers/scsi/qla2xxx/qla_target.c | 8 +++++--- 3 files changed, 31 insertions(+), 33 deletions(-) commit 74939a0bc772d642b1c12827966c4c3a3c90ea2c Author: Joe Carnuccio Date: Wed May 24 18:06:23 2017 -0700 scsi: qla2xxx: Fix mailbox pointer error in fwdump capture Cc: # v4.10+ Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_dbg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1d63496516c61e2e1351f10e6becbfc9ee511395 Author: Joe Carnuccio Date: Wed May 24 18:06:22 2017 -0700 scsi: qla2xxx: Set bit 15 for DIAG_ECHO_TEST MBC Set bit (BIT_15) to send right ECHO payload information for Diagnostic Echo Test command. Cc: # v4.10+ Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_bsg.c | 9 +++++---- drivers/scsi/qla2xxx/qla_mbx.c | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) commit ce6c668b146cc4f4442111e2bcee4c3af94e1ddf Author: Joe Carnuccio Date: Wed May 24 18:06:21 2017 -0700 scsi: qla2xxx: Modify T262 FW dump template to specify same start/end to debug customer issues Firmware dump allows for debugging customer issues. This patch fixes start/end pointer calculation to capture T262 template entry for dump tool. Cc: # v4.10+ Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_tmpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b95b9452aacf80659ea67bf0948cbfa7e28e5e0b Author: Sawan Chandak Date: Wed May 24 18:06:20 2017 -0700 scsi: qla2xxx: Fix crash due to mismatch mumber of Q-pair creation for Multi queue when driver is loaded with Multi Queue enabled, it was noticed that there was one less queue pair created. Following message would indicate this: "No resources to create additional q pair." The result of one less queue pair means that system can crash, if the block mq layer thinks there is an extra hardware queue available, and the driver will use a NULL ptr qpair in that instance. Following stack trace is seen in one of the crash: irq_create_affinity_masks+0x98/0x530 irq_create_affinity_masks+0x98/0x530 __pci_enable_msix+0x321/0x4e0 mutex_lock+0x12/0x40 pci_alloc_irq_vectors_affinity+0xb5/0x140 qla24xx_enable_msix+0x79/0x530 [qla2xxx] qla2x00_request_irqs+0x61/0x2d0 [qla2xxx] qla2x00_probe_one+0xc73/0x2390 [qla2xxx] ida_simple_get+0x98/0x100 kernfs_next_descendant_post+0x40/0x50 local_pci_probe+0x45/0xa0 pci_device_probe+0xfc/0x140 driver_probe_device+0x2c5/0x470 __driver_attach+0xdd/0xe0 driver_probe_device+0x470/0x470 bus_for_each_dev+0x6c/0xc0 driver_attach+0x1e/0x20 bus_add_driver+0x45/0x270 driver_register+0x60/0xe0 __pci_register_driver+0x4c/0x50 qla2x00_module_init+0x1ce/0x21e [qla2xxx] Cc: # v4.10+ Signed-off-by: Sawan Chandak Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 1 + drivers/scsi/qla2xxx/qla_init.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 0ea88662b5c6404a8f7af6b040b3cf1f0e8c3a66 Author: Quinn Tran Date: Wed May 24 18:06:19 2017 -0700 scsi: qla2xxx: Fix NULL pointer access due to redundant fc_host_port_name call Remove redundant fc_host_port_name calls to prevent early access of scsi_host->shost_data buffer. This prevent null pointer access. Following stack trace is seen: BUG: unable to handle kernel NULL pointer dereference at 00000000000008 IP: qla24xx_report_id_acquisition+0x22d/0x3a0 [qla2xxx] Cc: # v4.11+ Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_mbx.c | 9 --------- 1 file changed, 9 deletions(-) commit cb590700e04d4f59179c44f360217f5ad04ae262 Author: himanshu.madhani@cavium.com Date: Wed May 24 18:06:18 2017 -0700 scsi: qla2xxx: Fix recursive loop during target mode configuration for ISP25XX leaving system unresponsive Following messages are seen into system logs qla2xxx [0000:09:00.0]-00af:9: Performing ISP error recovery - ha=ffff98315ee30000. qla2xxx [0000:09:00.0]-504b:9: RISC paused -- HCCR=40, Dumping firmware. qla2xxx [0000:09:00.0]-d009:9: Firmware has been previously dumped (ffffba488c001000) -- ignoring request. qla2xxx [0000:09:00.0]-504b:9: RISC paused -- HCCR=40, Dumping firmware. See Bugzilla for details https://bugzilla.kernel.org/show_bug.cgi?id=195285 Fixes: d74595278f4ab ("scsi: qla2xxx: Add multiple queue pair functionality.") Cc: # v4.10+ Reported-by: Laurence Oberman Reported-by: Anthony Bloodoff Tested-by: Laurence Oberman Tested-by: Anthony Bloodoff Signed-off-by: Himanshu Madhani Signed-off-by: Giridhar Malavali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_isr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e153903686deac9ea8c499b49516126f1a844fdb Author: Nix Date: Tue May 16 10:13:31 2017 +0100 md: report sector of stripes with check mismatches This makes it possible, with appropriate filesystem support, for a sysadmin to tell what is affected by the mismatch, and whether it should be ignored (if it's inside a swap partition, for instance). We ratelimit to prevent log flooding: if there are so many mismatches that ratelimiting is necessary, the individual messages are relatively unlikely to be important (either the machine is swapping like crazy or something is very wrong with the disk). Signed-off-by: Nick Alcock Signed-off-by: Shaohua Li drivers/md/raid5.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 4179bc30b2fe85f827d93e0ae7ae8f49ad3afc02 Author: Kyungchan Koh Date: Wed May 24 10:16:27 2017 -0700 md: uuid debug statement now in processor byte order. Previously, the uuid debug statements were printed in little-endian format, which wasn't consistent in machines that might not be in little-endian byte order. With this change, the output will be consistent for all machines with different byte-ordering. Signed-off-by: Kyungchan Koh Signed-off-by: Shaohua Li drivers/md/bitmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b8cb5a545c3dd8b975aad19ea020eabe0a888e8d Author: Tahsin Erdogan Date: Wed May 24 18:24:07 2017 -0400 ext4: fix quota charging for shared xattr blocks ext4_xattr_block_set() calls dquot_alloc_block() to charge for an xattr block when new references are made. However if dquot_initialize() hasn't been called on an inode, request for charging is effectively ignored because ext4_inode_info->i_dquot is not initialized yet. Add dquot_initialize() to call paths that lead to ext4_xattr_block_set(). Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/acl.c | 4 ++++ fs/ext4/super.c | 3 +++ fs/ext4/xattr.c | 8 ++++++++ fs/quota/dquot.c | 16 ++++++++++++++++ include/linux/quotaops.h | 6 ++++++ 5 files changed, 37 insertions(+) commit c41d342b39f15acbdc61948bab0cb3c567ec992a Author: Eric Biggers Date: Wed May 24 18:20:31 2017 -0400 ext4: remove redundant check for encrypted file on dio write path Currently we don't allow direct I/O on encrypted regular files, so in such cases we return 0 early in ext4_direct_IO(). There was also an additional BUG_ON() check in ext4_direct_IO_write(), but it can never be hit because of the earlier check for the exact same condition in ext4_direct_IO(). There was also no matching check on the read path, which made the write path specific check seem very ad-hoc. Just remove the unnecessary BUG_ON(). Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Reviewed-by: David Gstir Reviewed-by: Jan Kara fs/ext4/inode.c | 3 --- 1 file changed, 3 deletions(-) commit d6b975504e7e71fc29fcd14530433e816d7f5aac Author: Eric Biggers Date: Wed May 24 18:10:49 2017 -0400 ext4: remove unused d_name argument from ext4_search_dir() et al. Now that we are passing a struct ext4_filename, we do not need to pass around the original struct qstr too. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/ext4.h | 2 -- fs/ext4/inline.c | 5 ++--- fs/ext4/namei.c | 13 +++++-------- 3 files changed, 7 insertions(+), 13 deletions(-) commit e5465795cac48233c9b606a7a419f4190a91851e Author: Eric Biggers Date: Wed May 24 18:05:29 2017 -0400 ext4: fix off-by-one error when writing back pages before dio read The 'lend' argument of filemap_write_and_wait_range() is inclusive, so we need to subtract 1 from pos + count. Note that 'count' is guaranteed to be nonzero since ext4_file_read_iter() returns early when given a 0 count. Fixes: 16c54688592c ("ext4: Allow parallel DIO reads") Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 624327f8794704c5066b11a52f9da6a09dce7f9a Author: Eryu Guan Date: Wed May 24 18:02:20 2017 -0400 ext4: fix off-by-one on max nr_pages in ext4_find_unwritten_pgoff() ext4_find_unwritten_pgoff() is used to search for offset of hole or data in page range [index, end] (both inclusive), and the max number of pages to search should be at least one, if end == index. Otherwise the only page is missed and no hole or data is found, which is not correct. When block size is smaller than page size, this can be demonstrated by preallocating a file with size smaller than page size and writing data to the last block. E.g. run this xfs_io command on a 1k block size ext4 on x86_64 host. # xfs_io -fc "falloc 0 3k" -c "pwrite 2k 1k" \ -c "seek -d 0" /mnt/ext4/testfile wrote 1024/1024 bytes at offset 2048 1 KiB, 1 ops; 0.0000 sec (42.459 MiB/sec and 43478.2609 ops/sec) Whence Result DATA EOF Data at offset 2k was missed, and lseek(2) returned ENXIO. This is unconvered by generic/285 subtest 07 and 08 on ppc64 host, where pagesize is 64k. Because a recent change to generic/285 reduced the preallocated file size to smaller than 64k. Signed-off-by: Eryu Guan Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9dfa7bba35ac08a63565d58c454dccb7e1bb0a08 Author: Michael Schmitz Date: Sun Apr 30 19:49:21 2017 +1200 fix race in drivers/char/random.c:get_reg() get_reg() can be reentered on architectures with prioritized interrupts (m68k in this case), causing f->reg_index to be incremented after the range check. Out of bounds memory access past the pt_regs struct results. This will go mostly undetected unless access is beyond end of memory. Prevent the race by disabling interrupts in get_reg(). Tested on m68k (Atari Falcon, and ARAnyM emulator). Kudos to Geert Uytterhoeven for helping to trace this race. Signed-off-by: Michael Schmitz Signed-off-by: Theodore Ts'o drivers/char/random.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3083696a1ee68f4845f8e9a21b91e343ff25eff3 Author: Dan Carpenter Date: Tue May 23 13:13:45 2017 +0800 drm/amd/powerplay: fix a signedness bugs Smatch complains about a signedness bug here: vega10_hwmgr.c:4202 vega10_force_clock_level() warn: always true condition '(i >= 0) => (0-u32max >= 0)' Fixes: 7b52db39a4c2 ("drm/amd/powerplay: fix bug sclk/mclk level can't be set on vega10.") Signed-off-by: Dan Carpenter Reviewed-by: Eric Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c4378f4523d4af05b5941ea906e7032631eb753 Author: Chunming Zhou Date: Thu May 11 18:22:17 2017 +0800 drm/amdgpu: fix NULL pointer panic of emit_gds_switch [ 338.384770] BUG: unable to handle kernel NULL pointer dereference at (null) [ 338.384817] IP: [< (null)>] (null) [ 338.385505] RIP: 0010:[<0000000000000000>] [< (null)>] (null) [ 338.385950] Call Trace: [ 338.385993] [] ? amdgpu_vm_flush+0x283/0x400 [amdgpu] [ 338.386025] [] ? printk+0x4d/0x4f [ 338.386074] [] amdgpu_ib_schedule+0x4a6/0x4d0 [amdgpu] [ 338.386140] [] amdgpu_job_run+0x64/0x180 [amdgpu] [ 338.386203] [] amd_sched_main+0x2e9/0x4a0 [amdgpu] [ 338.386232] [] ? prepare_to_wait_event+0x110/0x110 [ 338.386295] [] ? amd_sched_select_entity+0xe0/0xe0 [amdgpu] [ 338.386327] [] kthread+0xd3/0xf0 [ 338.386349] [] ? kthread_park+0x60/0x60 [ 338.386376] [] ret_from_fork+0x25/0x30 [ 338.386401] Code: Bad RIP value. [ 338.386420] RIP [< (null)>] (null) [ 338.386443] RSP [ 338.386458] CR2: 0000000000000000 [ 338.398508] ---[ end trace 4c66fcdc74b9a0a2 ]--- Signed-off-by: Chunming Zhou Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d18e33735a02b1a90aecf14410bf3edbfd4d3dc Author: Lyude Date: Thu May 11 19:31:12 2017 -0400 drm/radeon: Unbreak HPD handling for r600+ We end up reading the interrupt register for HPD5, and then writing it to HPD6 which on systems without anything using HPD5 results in permanently disabling hotplug on one of the display outputs after the first time we acknowledge a hotplug interrupt from the GPU. This code is really bad. But for now, let's just fix this. I will hopefully have a large patch series to refactor all of this soon. Reviewed-by: Christian König Signed-off-by: Lyude Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/cik.c | 4 ++-- drivers/gpu/drm/radeon/evergreen.c | 4 ++-- drivers/gpu/drm/radeon/r600.c | 2 +- drivers/gpu/drm/radeon/si.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) commit 2275a3a2fe9914ba6d76c8ea490da3c08342bd19 Author: Alex Deucher Date: Thu May 11 13:57:41 2017 -0400 drm/amd/powerplay/smu7: disable mclk switching for high refresh rates Even if the vblank period would allow it, it still seems to be problematic on some cards. bug: https://bugs.freedesktop.org/show_bug.cgi?id=96868 Cc: stable@vger.kernel.org Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 09be4a5219610a6fae3215d4f51f948d6f5d2609 Author: Alex Deucher Date: Thu May 11 13:46:12 2017 -0400 drm/amd/powerplay/smu7: add vblank check for mclk switching (v2) Check to make sure the vblank period is long enough to support mclk switching. v2: drop needless initial assignment (Nils) bug: https://bugs.freedesktop.org/show_bug.cgi?id=96868 Cc: stable@vger.kernel.org Acked-by: Christian König Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 31 +++++++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) commit 58d7e3e427db1bd68f33025519a9468140280a75 Author: Alex Deucher Date: Thu May 11 13:14:14 2017 -0400 drm/radeon/ci: disable mclk switching for high refresh rates (v2) Even if the vblank period would allow it, it still seems to be problematic on some cards. v2: fix logic inversion (Nils) bug: https://bugs.freedesktop.org/show_bug.cgi?id=96868 Cc: stable@vger.kernel.org Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/ci_dpm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0a646f331db0eb9efc8d3a95a44872036d441d58 Author: Alex Deucher Date: Thu May 11 13:10:02 2017 -0400 drm/amdgpu/ci: disable mclk switching for high refresh rates (v2) Even if the vblank period would allow it, it still seems to be problematic on some cards. v2: fix logic inversion (Nils) bug: https://bugs.freedesktop.org/show_bug.cgi?id=96868 Cc: stable@vger.kernel.org Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e6a88e4ba88f3dd9d772f0ff7a88837939264883 Merge: f289978 2836b4f Author: David S. Miller Date: Wed May 24 16:27:22 2017 -0400 Merge branch 'q-in-q-checksums' Daniel Borkmann says: ==================== BPF pruning follow-up Follow-up to fix incorrect pruning when alignment tracking is in use and to properly clear regs after call to not leave stale data behind. For details, please see individual patches. ==================== Signed-off-by: David S. Miller commit 2836b4f224d4fd7d1a2b23c3eecaf0f0ae199a74 Author: Vlad Yasevich Date: Tue May 23 13:38:43 2017 -0400 virtio-net: enable TSO/checksum offloads for Q-in-Q vlans Since virtio does not provide it's own ndo_features_check handler, TSO, and now checksum offload, are disabled for stacked vlans. Re-enable the support and let the host take care of it. This restores/improves Guest-to-Guest performance over Q-in-Q vlans. Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: Vladislav Yasevich Signed-off-by: David S. Miller drivers/net/virtio_net.c | 1 + 1 file changed, 1 insertion(+) commit cc6e9de62a7f84c9293a2ea41bc412b55bb46e85 Author: Vlad Yasevich Date: Tue May 23 13:38:42 2017 -0400 be2net: Fix offload features for Q-in-Q packets At least some of the be2net cards do not seem to be capabled of performing checksum offload computions on Q-in-Q packets. In these case, the recevied checksum on the remote is invalid and TCP syn packets are dropped. This patch adds a call to check disbled acceleration features on Q-in-Q tagged traffic. CC: Sathya Perla CC: Ajit Khaparde CC: Sriharsha Basavapatna CC: Somnath Kotur Signed-off-by: Vladislav Yasevich Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 35d2f80b07bbe03fb358afb0bdeff7437a7d67ff Author: Vlad Yasevich Date: Tue May 23 13:38:41 2017 -0400 vlan: Fix tcp checksum offloads in Q-in-Q vlans It appears that TCP checksum offloading has been broken for Q-in-Q vlans. The behavior was execerbated by the series commit afb0bc972b52 ("Merge branch 'stacked_vlan_tso'") that that enabled accleleration features on stacked vlans. However, event without that series, it is possible to trigger this issue. It just requires a lot more specialized configuration. The root cause is the interaction between how netdev_intersect_features() works, the features actually set on the vlan devices and HW having the ability to run checksum with longer headers. The issue starts when netdev_interesect_features() replaces NETIF_F_HW_CSUM with a combination of NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM, if the HW advertises IP|IPV6 specific checksums. This happens for tagged and multi-tagged packets. However, HW that enables IP|IPV6 checksum offloading doesn't gurantee that packets with arbitrarily long headers can be checksummed. This patch disables IP|IPV6 checksums on the packet for multi-tagged packets. CC: Toshiaki Makita CC: Michal Kubecek Signed-off-by: Vladislav Yasevich Acked-by: Toshiaki Makita Signed-off-by: David S. Miller include/linux/if_vlan.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit b3c85a0fb2c79f2c945fa1305b39974d0acf3105 Author: Christian König Date: Wed May 10 20:06:58 2017 +0200 drm/amdgpu: fix fundamental suspend/resume issue Reinitializing the VM manager during suspend/resume is a very very bad idea since all the VMs are still active and kicking. This can lead to random VM faults after resume when new processes become the same client ID assigned. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 22 +++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 15 ++------------- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 15 ++------------- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 15 ++------------- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 16 ++-------------- 6 files changed, 30 insertions(+), 54 deletions(-) commit f2899788353c13891412b273fdff5f02d49aa40f Author: Andrew Lunn Date: Tue May 23 17:49:13 2017 +0200 net: phy: marvell: Limit errata to 88m1101 The 88m1101 has an errata when configuring autoneg. However, it was being applied to many other Marvell PHYs as well. Limit its scope to just the 88m1101. Fixes: 76884679c644 ("phylib: Add support for Marvell 88e1111S and 88e1145") Reported-by: Daniel Walker Signed-off-by: Andrew Lunn Acked-by: Harini Katakam Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 66 ++++++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 29 deletions(-) commit cd47512e51190efc34a6b90d5c6b54de036ea421 Author: Randy Dunlap Date: Tue May 23 08:19:49 2017 -0700 net/phy: fix mdio-octeon dependency and build Fix build errors by making this driver depend on OF_MDIO, like several other similar drivers do. drivers/built-in.o: In function `octeon_mdiobus_remove': mdio-octeon.c:(.text+0x196ee0): undefined reference to `mdiobus_unregister' mdio-octeon.c:(.text+0x196ee8): undefined reference to `mdiobus_free' drivers/built-in.o: In function `octeon_mdiobus_probe': mdio-octeon.c:(.text+0x196f1d): undefined reference to `devm_mdiobus_alloc_size' mdio-octeon.c:(.text+0x196ffe): undefined reference to `of_mdiobus_register' mdio-octeon.c:(.text+0x197010): undefined reference to `mdiobus_free' Signed-off-by: Randy Dunlap Cc: Andrew Lunn Cc: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f6b123bcc666a1766167065c2eb5a708f55651e Merge: 029c581 b665d98 Author: David S. Miller Date: Wed May 24 15:43:57 2017 -0400 Merge tag 'mlx5-fixes-2017-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-fixes-2017-05-23 Some TC offloads fixes from Or Gerlitz. From Erez, mlx5 IPoIB RX fix to improve GRO. From Mohamad, Command interface fix to improve mitigation against FW commands timeouts. From Tariq, Driver load Tolerance against affinity settings failures. ==================== Signed-off-by: David S. Miller commit 029c58178b9aa0a293a86ee0da3355611ac99d07 Merge: 0ff50e8 1b57b62 Author: David S. Miller Date: Wed May 24 15:31:39 2017 -0400 Merge tag 'mac80211-for-davem-2017-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Just two fixes this time: * fix the scheduled scan "BUG: scheduling while atomic" * check mesh address extension flags more strictly ==================== Signed-off-by: David S. Miller commit 0ff50e83b5122e836ca492fefb11656b225ac29c Author: Alexander Potapenko Date: Tue May 23 13:20:28 2017 +0200 net: rtnetlink: bail out from rtnl_fdb_dump() on parse error rtnl_fdb_dump() failed to check the result of nlmsg_parse(), which led to contents of |ifm| being uninitialized because nlh->nlmsglen was too small to accommodate |ifm|. The uninitialized data may affect some branches and result in unwanted effects, although kernel data doesn't seem to leak to the userspace directly. The bug has been detected with KMSAN and syzkaller. For the record, here is the KMSAN report: ================================================================== BUG: KMSAN: use of unitialized memory in rtnl_fdb_dump+0x5dc/0x1000 CPU: 0 PID: 1039 Comm: probe Not tainted 4.11.0-rc5+ #2727 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 dump_stack+0x143/0x1b0 lib/dump_stack.c:52 kmsan_report+0x12a/0x180 mm/kmsan/kmsan.c:1007 __kmsan_warning_32+0x66/0xb0 mm/kmsan/kmsan_instr.c:491 rtnl_fdb_dump+0x5dc/0x1000 net/core/rtnetlink.c:3230 netlink_dump+0x84f/0x1190 net/netlink/af_netlink.c:2168 __netlink_dump_start+0xc97/0xe50 net/netlink/af_netlink.c:2258 netlink_dump_start ./include/linux/netlink.h:165 rtnetlink_rcv_msg+0xae9/0xb40 net/core/rtnetlink.c:4094 netlink_rcv_skb+0x339/0x5a0 net/netlink/af_netlink.c:2339 rtnetlink_rcv+0x83/0xa0 net/core/rtnetlink.c:4110 netlink_unicast_kernel net/netlink/af_netlink.c:1272 netlink_unicast+0x13b7/0x1480 net/netlink/af_netlink.c:1298 netlink_sendmsg+0x10b8/0x10f0 net/netlink/af_netlink.c:1844 sock_sendmsg_nosec net/socket.c:633 sock_sendmsg net/socket.c:643 ___sys_sendmsg+0xd4b/0x10f0 net/socket.c:1997 __sys_sendmsg net/socket.c:2031 SYSC_sendmsg+0x2c6/0x3f0 net/socket.c:2042 SyS_sendmsg+0x87/0xb0 net/socket.c:2038 do_syscall_64+0x102/0x150 arch/x86/entry/common.c:285 entry_SYSCALL64_slow_path+0x25/0x25 arch/x86/entry/entry_64.S:246 RIP: 0033:0x401300 RSP: 002b:00007ffc3b0e6d58 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000004002b0 RCX: 0000000000401300 RDX: 0000000000000000 RSI: 00007ffc3b0e6d80 RDI: 0000000000000003 RBP: 00007ffc3b0e6e00 R08: 000000000000000b R09: 0000000000000004 R10: 000000000000000d R11: 0000000000000246 R12: 0000000000000000 R13: 00000000004065a0 R14: 0000000000406630 R15: 0000000000000000 origin: 000000008fe00056 save_stack_trace+0x59/0x60 arch/x86/kernel/stacktrace.c:59 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:352 kmsan_internal_poison_shadow+0xb1/0x1a0 mm/kmsan/kmsan.c:247 kmsan_poison_shadow+0x6d/0xc0 mm/kmsan/kmsan.c:260 slab_alloc_node mm/slub.c:2743 __kmalloc_node_track_caller+0x1f4/0x390 mm/slub.c:4349 __kmalloc_reserve net/core/skbuff.c:138 __alloc_skb+0x2cd/0x740 net/core/skbuff.c:231 alloc_skb ./include/linux/skbuff.h:933 netlink_alloc_large_skb net/netlink/af_netlink.c:1144 netlink_sendmsg+0x934/0x10f0 net/netlink/af_netlink.c:1819 sock_sendmsg_nosec net/socket.c:633 sock_sendmsg net/socket.c:643 ___sys_sendmsg+0xd4b/0x10f0 net/socket.c:1997 __sys_sendmsg net/socket.c:2031 SYSC_sendmsg+0x2c6/0x3f0 net/socket.c:2042 SyS_sendmsg+0x87/0xb0 net/socket.c:2038 do_syscall_64+0x102/0x150 arch/x86/entry/common.c:285 return_from_SYSCALL_64+0x0/0x6a arch/x86/entry/entry_64.S:246 ================================================================== and the reproducer: ================================================================== #include #include #include #include int main() { int sock = socket(PF_NETLINK, SOCK_DGRAM | SOCK_NONBLOCK, 0); struct msghdr msg; memset(&msg, 0, sizeof(msg)); char nlmsg_buf[32]; memset(nlmsg_buf, 0, sizeof(nlmsg_buf)); struct nlmsghdr *nlmsg = nlmsg_buf; nlmsg->nlmsg_len = 0x11; nlmsg->nlmsg_type = 0x1e; // RTM_NEWROUTE = RTM_BASE + 0x0e // type = 0x0e = 1110b // kind = 2 nlmsg->nlmsg_flags = 0x101; // NLM_F_ROOT | NLM_F_REQUEST nlmsg->nlmsg_seq = 0; nlmsg->nlmsg_pid = 0; nlmsg_buf[16] = (char)7; struct iovec iov; iov.iov_base = nlmsg_buf; iov.iov_len = 17; msg.msg_iov = &iov; msg.msg_iovlen = 1; sendmsg(sock, &msg, 0); return 0; } ================================================================== Signed-off-by: Alexander Potapenko Signed-off-by: David S. Miller net/core/rtnetlink.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 159a07604a99bd01e7db112de08d53dc4fcad109 Author: Quentin Schulz Date: Tue May 23 11:48:08 2017 +0200 net: fec: add post PHY reset delay DT property Some PHY require to wait for a bit after the reset GPIO has been toggled. This adds support for the DT property `phy-reset-post-delay` which gives the delay in milliseconds to wait after reset. If the DT property is not given, no delay is observed. Post reset delay greater than 1000ms are invalid. Signed-off-by: Quentin Schulz Reviewed-by: Andrew Lunn Acked-by: Fugang Duan Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/fsl-fec.txt | 4 ++++ drivers/net/ethernet/freescale/fec_main.c | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) commit 11d3c949b4ca37124fcace1ee3a5c2db0737a268 Merge: 12e8b57 7e06297 Author: David S. Miller Date: Wed May 24 15:21:05 2017 -0400 Merge branch 'sctp-dupcookie-fixes' Xin Long says: ==================== sctp: a bunch of fixes for processing dupcookie After introducing transport hashtable and per stream info into sctp, some regressions were caused when processing dupcookie, this patchset is to fix them. ==================== Signed-off-by: David S. Miller commit 7e06297768886337707f5833942b3bd524a6d3d5 Author: Xin Long Date: Tue May 23 13:28:55 2017 +0800 sctp: set new_asoc temp when processing dupcookie After sctp changed to use transport hashtable, a transport would be added into global hashtable when adding the peer to an asoc, then the asoc can be got by searching the transport in the hashtbale. The problem is when processing dupcookie in sctp_sf_do_5_2_4_dupcook, a new asoc would be created. A peer with the same addr and port as the one in the old asoc might be added into the new asoc, but fail to be added into the hashtable, as they also belong to the same sk. It causes that sctp's dupcookie processing can not really work. Since the new asoc will be freed after copying it's information to the old asoc, it's more like a temp asoc. So this patch is to fix it by setting it as a temp asoc to avoid adding it's any transport into the hashtable and also avoid allocing assoc_id. An extra thing it has to do is to also alloc stream info for any temp asoc, as sctp dupcookie process needs it to update old asoc. But I don't think it would hurt something, as a temp asoc would always be freed after finishing processing cookie echo packet. Reported-by: Jianwen Ji Signed-off-by: Xin Long Acked-by: Neil Horman Acked-by: Vlad Yasevich Signed-off-by: David S. Miller net/sctp/sm_make_chunk.c | 13 ++++--------- net/sctp/sm_statefuns.c | 3 +++ 2 files changed, 7 insertions(+), 9 deletions(-) commit 3ab2137915aea0ce7b3ec02e0f260ecc0f1c289d Author: Xin Long Date: Tue May 23 13:28:54 2017 +0800 sctp: fix stream update when processing dupcookie Since commit 3dbcc105d556 ("sctp: alloc stream info when initializing asoc"), stream and stream.out info are always alloced when creating an asoc. So it's not correct to check !asoc->stream before updating stream info when processing dupcookie, but would be better to check asoc state instead. Fixes: 3dbcc105d556 ("sctp: alloc stream info when initializing asoc") Signed-off-by: Xin Long Acked-by: Neil Horman Acked-by: Vlad Yasevich Signed-off-by: David S. Miller net/sctp/associola.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c2dd893a3b0772d1c680e109b9d5715d7f73022b Author: Maurizio Lombardi Date: Wed May 24 14:09:44 2017 +0200 scsi: bnx2fc: fix race condition in bnx2fc_get_host_stats() If multiple tasks attempt to read the stats, it may happen that the start_req_done completion is re-initialized while still being used by another task, causing a list corruption. This patch fixes the bug by adding a mutex to serialize the calls to bnx2fc_get_host_stats(). WARNING: at lib/list_debug.c:48 list_del+0x6e/0xa0() (Not tainted) Hardware name: PowerEdge R820 list_del corruption. prev->next should be ffff882035627d90, but was ffff884069541588 Pid: 40267, comm: perl Not tainted 2.6.32-642.3.1.el6.x86_64 #1 Call Trace: [] ? warn_slowpath_common+0x91/0xe0 [] ? warn_slowpath_fmt+0x46/0x60 [] ? list_del+0x6e/0xa0 [] ? wait_for_common+0x14d/0x180 [] ? default_wake_function+0x0/0x20 [] ? wait_for_completion_timeout+0x13/0x20 [] ? bnx2fc_get_host_stats+0xa1/0x280 [bnx2fc] [] ? fc_stat_show+0x90/0xc0 [scsi_transport_fc] [] ? show_fcstat_tx_frames+0x16/0x20 [scsi_transport_fc] [] ? dev_attr_show+0x27/0x50 [] ? __get_free_pages+0xe/0x50 [] ? sysfs_read_file+0x111/0x200 [] ? vfs_read+0xb5/0x1a0 [] ? fget_light_pos+0x16/0x50 [] ? sys_read+0x51/0xb0 [] ? __audit_syscall_exit+0x25e/0x290 [] ? system_call_fastpath+0x16/0x1b Signed-off-by: Maurizio Lombardi Acked-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc.h | 1 + drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit ddff7ed45edce4a4c92949d3c61cd25d229c4a14 Author: Johannes Thumshirn Date: Tue May 23 16:50:47 2017 +0200 scsi: qla2xxx: don't disable a not previously enabled PCI device When pci_enable_device() or pci_enable_device_mem() fail in qla2x00_probe_one() we bail out but do a call to pci_disable_device(). This causes the dev_WARN_ON() in pci_disable_device() to trigger, as the device wasn't enabled previously. So instead of taking the 'probe_out' error path we can directly return *iff* one of the pci_enable_device() calls fails. Additionally rename the 'probe_out' goto label's name to the more descriptive 'disable_device'. Signed-off-by: Johannes Thumshirn Fixes: e315cd28b9ef ("[SCSI] qla2xxx: Code changes for qla data structure refactoring") Cc: Reviewed-by: Bart Van Assche Reviewed-by: Giridhar Malavali Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0a716776914ed9d7ca90b48041e6767693bfb672 Author: Shreyas NC Date: Mon May 15 19:44:30 2017 +0530 ASoC: Intel: Skylake: Fix to parse consecutive string tkns in manifest Element size in the manifest should be updated for each token, so that the loop can parse all the string elements in the manifest. This was not happening when more than two string elements appear consecutively, as it is not updated with correct string element size. Fixed with this patch. Signed-off-by: Shreyas NC Signed-off-by: Subhransu S. Prusty Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5cd1f5c32132101955d7f0e1955249a84f9b6fd9 Author: Pardha Saradhi K Date: Mon May 15 19:44:29 2017 +0530 ASoC: Intel: Skylake: Fix IPC rx_list corruption In SKL+ platforms, all IPC commands are serialised, i.e. the driver sends a new IPC to DSP, only after receiving a reply from the firmware for the current IPC. Hence it seems apparent that there is only a single modifier of the IPC RX List. However, during an IPC timeout case in a multithreaded environment, there is a possibility of the list element being deleted two times if not properly protected. So, use spin lock save/restore to prevent rx_list corruption. Signed-off-by: Pardha Saradhi K Signed-off-by: Subhransu S. Prusty Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-ipc.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7819a942de7b993771bd9377babc80485fe7606b Author: Kuninori Morimoto Date: Wed May 24 01:17:10 2017 +0000 ASoC: rsnd: SSI PIO adjust to 24bit mode commit 90431eb49bff ("ASoC: rsnd: don't use PDTA bit for 24bit on SSI") fixups 24bit mode data alignment, but PIO was not cared. This patch fixes PIO mode 24bit data alignment Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/ssi.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 3a1672bb0186e940fc8521d19069f57690e850c2 Author: Charles Keepax Date: Wed May 24 11:01:32 2017 +0100 MAINTAINERS: Update email address for patches to Wolfson parts A somewhat overdue update of the address for sending patches on Wolfson parts to since our acquision a couple of years ago by Cirrus Logic. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4efda5f2130da033aeedc5b3205569893b910de2 Author: Takashi Iwai Date: Wed May 24 10:19:45 2017 +0200 ASoC: Fix use-after-free at card unregistration soc_cleanup_card_resources() call snd_card_free() at the last of its procedure. This turned out to lead to a use-after-free. PCM runtimes have been already removed via soc_remove_pcm_runtimes(), while it's dereferenced later in soc_pcm_free() called via snd_card_free(). The fix is simple: just move the snd_card_free() call to the beginning of the whole procedure. This also gives another benefit: it guarantees that all operations have been shut down before actually releasing the resources, which was racy until now. Reported-and-tested-by: Robert Jarzmik Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown Cc: sound/soc/soc-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 41c25707d21716826e3c1f60967f5550610ec1c9 Author: Tejun Heo Date: Wed May 24 12:03:48 2017 -0400 cpuset: consider dying css as offline In most cases, a cgroup controller don't care about the liftimes of cgroups. For the controller, a css becomes online when ->css_online() is called on it and offline when ->css_offline() is called. However, cpuset is special in that the user interface it exposes cares whether certain cgroups exist or not. Combined with the RCU delay between cgroup removal and css offlining, this can lead to user visible behavior oddities where operations which should succeed after cgroup removals fail for some time period. The effects of cgroup removals are delayed when seen from userland. This patch adds css_is_dying() which tests whether offline is pending and updates is_cpuset_online() so that the function returns false also while offline is pending. This gets rid of the userland visible delays. Signed-off-by: Tejun Heo Reported-by: Daniel Jordan Link: http://lkml.kernel.org/r/327ca1f5-7957-fbb9-9e5f-9ba149d40ba2@oracle.com Cc: stable@vger.kernel.org Signed-off-by: Tejun Heo include/linux/cgroup.h | 20 ++++++++++++++++++++ kernel/cgroup/cpuset.c | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) commit 46e3813d72abb018f0cd6e72389004db8728c738 Author: Guilherme G. Piccoli Date: Thu May 18 18:34:35 2017 -0300 MAINTAINERS/serial: Change maintainer of jsm driver Gabriel will no longer maintain this driver, so I'm adding myself as maintainer. Thanks for all your work on jsm driver Gabriel. Signed-off-by: Guilherme G. Piccoli Acked-by: Gabriel Krisman Bertazi Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42c99fc4c7069371da7b04b9099319dd1c633ee2 Author: Luis Henriques Date: Fri May 5 18:28:44 2017 +0100 ceph: check that the new inode size is within limits in ceph_fallocate() Currently the ceph client doesn't respect the rlimit in fallocate. This means that a user can allocate a file with size > RLIMIT_FSIZE. This patch adds the call to inode_newsize_ok() to verify filesystem limits and ulimits. This should make ceph successfully run xfstest generic/228. Signed-off-by: Luis Henriques Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/file.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0a2ad541071f99eaf4589c3551176fca191c1ee2 Author: Yan, Zheng Date: Fri May 5 18:47:37 2017 +0800 libceph: cleanup old messages according to reconnect seq when reopen a connection, use 'reconnect seq' to clean up messages that have already been received by peer. Link: http://tracker.ceph.com/issues/18690 Signed-off-by: "Yan, Zheng" Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov net/ceph/messenger.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 2426125ab4ebdfc70fcdbaff8af8d50e34084616 Merge: 590d4b3 c70d9d8 Author: Linus Torvalds Date: Wed May 24 08:28:59 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull ptrace fix from Eric Biederman: "This fixes a brown paper bag bug. When I fixed the ptrace interaction with user namespaces I added a new field ptracer_cred in struct_task and I failed to properly initialize it on fork. This dangling pointer wound up breaking runing setuid applications run from the enlightenment window manager. As this is the worst sort of bug. A regression breaking user space for no good reason let's get this fixed" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: ptrace: Properly initialize ptracer_cred on fork commit 590d4b333d12cbf85dae37257d81960a280232df Merge: 56fff1b f5f968f Author: Linus Torvalds Date: Wed May 24 08:21:56 2017 -0700 Merge tag 'mmc-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "A couple of MMC host fixes intended for v4.12 rc3: - sdhci-xenon: Don't free data for phy allocated by devm* - sdhci-iproc: Suppress spurious interrupts - cavium: Fix probing race with regulator - cavium: Prevent crash with incomplete DT - cavium-octeon: Use proper GPIO name for power control - cavium-octeon: Fix interrupt enable code" * tag 'mmc-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-iproc: suppress spurious interrupt with Multiblock read mmc: cavium: Fix probing race with regulator of/platform: Make of_platform_device_destroy globally visible mmc: cavium: Prevent crash with incomplete DT mmc: cavium-octeon: Use proper GPIO name for power control mmc: cavium-octeon: Fix interrupt enable code mmc: sdhci-xenon: kill xenon_clean_phy() commit 44f73dc42c11398d7b84e94365a485ebd6420798 Author: Antoine Tenart Date: Wed May 24 16:10:32 2017 +0200 arm64: marvell: dts: fix interrupts in 7k/8k crypto nodes The cryptographic engine nodes have an interrupt which is configured as both edge and level, which makes no sense at all. Fix this by configuring it the right way (level). Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 3 +-- arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 3e4240da0e3673637c1c995bdd14cfdbc8f4dc4c Author: Andrew Lunn Date: Wed May 24 01:39:35 2017 +0200 Revert "ata: sata_mv: Convert to devm_ioremap_resource()" This reverts commit 368e5fbdfc60732643f34f538823ed4bc8829827. devm_ioremap_resource() enforces that there are no overlapping resources, where as devm_ioremap() does not. The sata phy driver needs a subset of the sata IO address space, so maps some of the sata address space. As a result, sata_mv now fails to probe, reporting it cannot get its resources, and so we don't have any SATA disks. Signed-off-by: Andrew Lunn Acked-by: Gregory CLEMENT Cc: stable@vger.kernel.org # v4.11+ Signed-off-by: Tejun Heo drivers/ata/sata_mv.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit fc152d22d6e9fac95a9a990e6c29510bdf1b9425 Author: Mateusz Jurczyk Date: Wed May 24 15:55:00 2017 +0200 x86/alternatives: Prevent uninitialized stack byte read in apply_alternatives() In the current form of the code, if a->replacementlen is 0, the reference to *insnbuf for comparison touches potentially garbage memory. While it doesn't affect the execution flow due to the subsequent a->replacementlen comparison, it is (rightly) detected as use of uninitialized memory by a runtime instrumentation currently under my development, and could be detected as such by other tools in the future, too (e.g. KMSAN). Fix the "false-positive" by reordering the conditions to first check the replacement instruction length before referencing specific opcode bytes. Signed-off-by: Mateusz Jurczyk Reviewed-by: Borislav Petkov Cc: Andy Lutomirski Link: http://lkml.kernel.org/r/20170524135500.27223-1-mjurczyk@google.com Signed-off-by: Thomas Gleixner arch/x86/kernel/alternative.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 2e0bb5b38f32eb21fe25e845721a205370adeffe Author: Chris Wilson Date: Tue May 23 20:44:12 2017 +0100 drm/i915/selftests: Silence compiler warning in igt_ctx_exec The compiler doesn't always spot the guard that object is allocated on the first pass, leading to: drivers/gpu/drm/i915/selftests/i915_gem_context.c: warning: 'obj' may be used uninitialized in this function [-Wuninitialized]: => 370:8 v2: Make it more obvious by setting obj to NULL on the first pass and any later pass where we need to reallocate. Reported-by: Geert Uytterhoeven Fixes: 791ff39ae32a ("drm/i915: Live testing for context execution") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Matthew Auld c: # v4.12-rc1+ Link: http://patchwork.freedesktop.org/patch/msgid/20170523194412.1195-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin (cherry picked from commit ca83d5840cb641b2efb04db0b70fa56955dd1453) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/selftests/i915_gem_context.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit d38162e4b5c643733792f32be4ea107c831827b4 Author: Daniel Vetter Date: Wed May 17 15:15:57 2017 +0200 Revert "drm/i915: Restore lost "Initialized i915" welcome message" This reverts commit bc5ca47c0af4f949ba889e666b7da65569e36093. Gabriel put this back into generic code with commit 75f6dfe3e652e1adef8cc1b073c89f3e22103a8f Author: Gabriel Krisman Bertazi Date: Wed Dec 28 12:32:11 2016 -0200 drm: Deduplicate driver initialization message but somehow he missed Chris' patch to add the message meanwhile. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101025 Fixes: 75f6dfe3e652 ("drm: Deduplicate driver initialization message") Cc: Gabriel Krisman Bertazi Cc: Daniel Vetter Cc: Jani Nikula Cc: Chris Wilson Cc: # v4.11+ Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170517131557.7836-1-daniel.vetter@ffwll.ch (cherry picked from commit 6bdba81979b2c3c8fed0be62ca31c32c3129d85f) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.c | 4 ---- 1 file changed, 4 deletions(-) commit b49c15f97c936ef5a536821f97e4dd8568369802 Author: Trond Myklebust Date: Wed May 24 07:55:44 2017 -0400 NFSv4.0: Fix a lock leak in nfs40_walk_client_list Xiaolong Ye's kernel test robot detected the following Oops: [ 299.158991] BUG: scheduling while atomic: mount.nfs/9387/0x00000002 [ 299.169587] 2 locks held by mount.nfs/9387: [ 299.176165] #0: (nfs_clid_init_mutex){......}, at: [] nfs4_discover_server_trunking+0x47/0x1fc [ 299.201802] #1: (&(&nn->nfs_client_lock)->rlock){......}, at: [] nfs40_walk_client_list+0x2e9/0x338 [ 299.221979] CPU: 0 PID: 9387 Comm: mount.nfs Not tainted 4.11.0-rc7-00021-g14d1bbb #45 [ 299.235584] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014 [ 299.251176] Call Trace: [ 299.255192] dump_stack+0x61/0x7e [ 299.260416] __schedule_bug+0x65/0x74 [ 299.266208] __schedule+0x5d/0x87c [ 299.271883] schedule+0x89/0x9a [ 299.276937] schedule_timeout+0x232/0x289 [ 299.283223] ? detach_if_pending+0x10b/0x10b [ 299.289935] schedule_timeout_uninterruptible+0x2a/0x2c [ 299.298266] ? put_rpccred+0x3e/0x115 [ 299.304327] ? schedule_timeout_uninterruptible+0x2a/0x2c [ 299.312851] msleep+0x1e/0x22 [ 299.317612] nfs4_discover_server_trunking+0x102/0x1fc [ 299.325644] nfs4_init_client+0x13f/0x194 It looks as if we recently added a spin_lock() leak to nfs40_walk_client_list() when cleaning up the code. Reported-by: kernel test robot Fixes: 14d1bbb0ca42 ("NFS: Create a common nfs4_match_client() function") Cc: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs4client.c | 1 - 1 file changed, 1 deletion(-) commit 08cb5b0f058a325fcb5305e33f572ff6d6dfa289 Author: Benjamin Coddington Date: Mon May 22 20:20:23 2017 -0400 pnfs: Fix the check for requests in range of layout segment It's possible and acceptable for NFS to attempt to add requests beyond the range of the current pgio->pg_lseg, a case which should be caught and limited by the pg_test operation. However, the current handling of this case replaces pgio->pg_lseg with a new layout segment (after a WARN) within that pg_test operation. That will cause all the previously added requests to be submitted with this new layout segment, which may not be valid for those requests. Fix this problem by only returning zero for the number of bytes to coalesce from pg_test for this case which allows any previously added requests to complete on the current layout segment. The check for requests starting out of range of the layout segment moves to pg_init, so that the replacement of pgio->pg_lseg will be done when the next request is added. Signed-off-by: Benjamin Coddington Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 25 +++++++++++++++++-------- fs/nfs/pnfs.h | 10 ++++++++++ 2 files changed, 27 insertions(+), 8 deletions(-) commit d2c23c0075d7091bf749411bd2ee757cf4ec356c Author: Markus Elfring Date: Mon May 22 22:18:28 2017 +0200 xprtrdma: Delete an error message for a failed memory allocation in xprt_rdma_bc_setup() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Reviewed-by: Chuck Lever Signed-off-by: Trond Myklebust net/sunrpc/xprtrdma/backchannel.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 662f9a105b4322b8559d448f86110e6ec24b8738 Author: Dan Carpenter Date: Sat May 20 00:31:12 2017 +0300 pNFS/flexfiles: missing error code in ff_layout_alloc_lseg() If xdr_inline_decode() fails then we end up returning ERR_PTR(0). The caller treats NULL returns as -ENOMEM so it doesn't really hurt runtime, but obviously we intended to set an error code here. Fixes: d67ae825a59d ("pnfs/flexfiles: Add the FlexFile Layout Driver") Signed-off-by: Dan Carpenter Signed-off-by: Trond Myklebust fs/nfs/flexfilelayout/flexfilelayout.c | 1 + 1 file changed, 1 insertion(+) commit 6d3b5d8d8dd1c14f991ccab84b40f8425f1ae91b Author: Olga Kornievskaia Date: Tue May 16 12:00:15 2017 -0400 NFS fix COMMIT after COPY Fix a typo in the commit e092693443b995c8e3a565a73b5fdb05f1260f9b "NFS append COMMIT after synchronous COPY" Reported-by: Eryu Guan Fixes: e092693443b ("NFS append COMMIT after synchronous COPY") Signed-off-by: Olga Kornievskaia Tested-by: Eryu Guan Signed-off-by: Trond Myklebust fs/nfs/nfs42proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8747d642ec4ce96adf17ae35652a5e4015cfe02 Author: Jan Kara Date: Tue May 2 13:16:18 2017 +0200 reiserfs: Make flush bios explicitely sync Commit b685d3d65ac7 "block: treat REQ_FUA and REQ_PREFLUSH as synchronous" removed REQ_SYNC flag from WRITE_{FUA|PREFLUSH|...} definitions. generic_make_request_checks() however strips REQ_FUA and REQ_PREFLUSH flags from a bio when the storage doesn't report volatile write cache and thus write effectively becomes asynchronous which can lead to performance regressions Fix the problem by making sure all bios which are synchronous are properly marked with REQ_SYNC. Fixes: b685d3d65ac791406e0dfd8779cc9b3707fea5a3 CC: reiserfs-devel@vger.kernel.org CC: stable@vger.kernel.org Signed-off-by: Jan Kara fs/reiserfs/journal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0f0b9b63e14fc3f66e4d342df016c9b071c5abed Author: Jan Kara Date: Tue May 2 13:14:13 2017 +0200 gfs2: Make flush bios explicitely sync Commit b685d3d65ac7 "block: treat REQ_FUA and REQ_PREFLUSH as synchronous" removed REQ_SYNC flag from WRITE_{FUA|PREFLUSH|...} definitions. generic_make_request_checks() however strips REQ_FUA and REQ_PREFLUSH flags from a bio when the storage doesn't report volatile write cache and thus write effectively becomes asynchronous which can lead to performance regressions Fix the problem by making sure all bios which are synchronous are properly marked with REQ_SYNC. Fixes: b685d3d65ac791406e0dfd8779cc9b3707fea5a3 CC: Steven Whitehouse CC: cluster-devel@redhat.com CC: stable@vger.kernel.org Acked-by: Bob Peterson Signed-off-by: Jan Kara fs/gfs2/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fefa92679dbe0c613e62b6c27235dcfbe9640ad1 Author: Liping Zhang Date: Sun May 21 07:22:49 2017 +0800 netfilter: ctnetlink: fix incorrect nf_ct_put during hash resize If nf_conntrack_htable_size was adjusted by the user during the ct dump operation, we may invoke nf_ct_put twice for the same ct, i.e. the "last" ct. This will cause the ct will be freed but still linked in hash buckets. It's very easy to reproduce the problem by the following commands: # while : ; do echo $RANDOM > /proc/sys/net/netfilter/nf_conntrack_buckets done # while : ; do conntrack -L done # iperf -s 127.0.0.1 & # iperf -c 127.0.0.1 -P 60 -t 36000 After a while, the system will hang like this: NMI watchdog: BUG: soft lockup - CPU#1 stuck for 22s! [bash:20184] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [iperf:20382] ... So at last if we find cb->args[1] is equal to "last", this means hash resize happened, then we can set cb->args[1] to 0 to fix the above issue. Fixes: d205dc40798d ("[NETFILTER]: ctnetlink: fix deadlock in table dumping") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_netlink.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4497a224f759cd8350e07382307b55f870ef0df2 Author: Jeremy Linton Date: Sat Apr 8 02:18:40 2017 -0500 reset: hi6220: Set module license so that it can be loaded The hi6220_reset driver can be built as a standalone module yet it cannot be loaded because it depends on GPL exported symbols. Lets set the module license so that the module loads, and things like the on-board kirin drm starts working. Signed-off-by: Jeremy Linton Reviewed-by: Xinliang Liu Signed-off-by: Philipp Zabel drivers/reset/hisilicon/hi6220_reset.c | 2 ++ 1 file changed, 2 insertions(+) commit cbed27cdf0e3f7ea3b2259e86b9e34df02be3fe4 Author: Mikulas Patocka Date: Tue Apr 18 15:07:11 2017 -0400 x86/PAT: Fix Xorg regression on CPUs that don't support PAT In the file arch/x86/mm/pat.c, there's a '__pat_enabled' variable. The variable is set to 1 by default and the function pat_init() sets __pat_enabled to 0 if the CPU doesn't support PAT. However, on AMD K6-3 CPUs, the processor initialization code never calls pat_init() and so __pat_enabled stays 1 and the function pat_enabled() returns true, even though the K6-3 CPU doesn't support PAT. The result of this bug is that a kernel warning is produced when attempting to start the Xserver and the Xserver doesn't start (fork() returns ENOMEM). Another symptom of this bug is that the framebuffer driver doesn't set the K6-3 MTRR registers: x86/PAT: Xorg:3891 map pfn expected mapping type uncached-minus for [mem 0xe4000000-0xe5ffffff], got write-combining ------------[ cut here ]------------ WARNING: CPU: 0 PID: 3891 at arch/x86/mm/pat.c:1020 untrack_pfn+0x5c/0x9f ... x86/PAT: Xorg:3891 map pfn expected mapping type uncached-minus for [mem 0xe4000000-0xe5ffffff], got write-combining To fix the bug change pat_enabled() so that it returns true only if PAT initialization was actually done. Also, I changed boot_cpu_has(X86_FEATURE_PAT) to this_cpu_has(X86_FEATURE_PAT) in pat_ap_init(), so that we check the PAT feature on the processor that is being initialized. Signed-off-by: Mikulas Patocka Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Luis R. Rodriguez Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Toshi Kani Cc: stable@vger.kernel.org # v4.2+ Link: http://lkml.kernel.org/r/alpine.LRH.2.02.1704181501450.26399@file01.intranet.prod.int.rdu2.redhat.com Signed-off-by: Ingo Molnar arch/x86/mm/pat.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 28232a4317be7ad615f0f1b69dc8583fd580a8e3 Author: Christoffer Dall Date: Sat May 20 14:12:34 2017 +0200 KVM: arm/arm64: Fix isues with GICv2 on GICv3 migration We have been a little loose with our intermediate VMCR representation where we had a 'ctlr' field, but we failed to differentiate between the GICv2 GICC_CTLR and ICC_CTLR_EL1 layouts, and therefore ended up mapping the wrong bits into the individual fields of the ICH_VMCR_EL2 when emulating a GICv2 on a GICv3 system. Fix this by using explicit fields for the VMCR bits instead. Cc: Eric Auger Reported-by: wanghaibin Signed-off-by: Christoffer Dall Reviewed-by: Marc Zyngier Tested-by: Marc Zyngier arch/arm64/kvm/vgic-sys-reg-v3.c | 10 ++++---- include/linux/irqchip/arm-gic-v3.h | 4 ++++ include/linux/irqchip/arm-gic.h | 28 ++++++++++++++++++++--- virt/kvm/arm/vgic/vgic-mmio-v2.c | 16 +++++++++++-- virt/kvm/arm/vgic/vgic-v2.c | 28 ++++++++++++++++++++--- virt/kvm/arm/vgic/vgic-v3.c | 47 ++++++++++++++++++++++++++------------ virt/kvm/arm/vgic/vgic.h | 12 ++++++---- 7 files changed, 114 insertions(+), 31 deletions(-) commit 8b77b0cfa99edbc4993139aab7592a2315c7bff4 Merge: 0833289 cbb22eb Author: Greg Kroah-Hartman Date: Wed May 24 09:19:43 2017 +0200 Merge tag 'usb-ci-v4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: Some small bugs commit c9525a3fab63fbe091007494f8b7a06438eea6a7 Author: Benjamin Peterson Date: Sat May 20 17:20:16 2017 -0700 x86/watchdog: Fix Kconfig help text file path reference to lockup watchdog documentation Signed-off-by: Benjamin Peterson Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Fixes: 9919cba7ff71147803c988521cc1ceb80e7f0f6d ("watchdog: Update documentation") Link: http://lkml.kernel.org/r/20170521002016.13258-1-bp@benjamin.pe Signed-off-by: Ingo Molnar arch/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e6091209f7f73e2a81943020793b5ad26d645c6 Author: Jan Kiszka Date: Tue May 23 18:27:54 2017 +0200 x86/build: Permit building with old make versions At least Make 3.82 dislikes the tab in front of the $(warning) function: arch/x86/Makefile:162: *** recipe commences before first target. Stop. Let's be gentle. Signed-off-by: Jan Kiszka Acked-by: Thomas Gleixner Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1944fcd8-e3df-d1f7-c0e4-60aeb1917a24@siemens.com Signed-off-by: Ingo Molnar arch/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 519fb5c3350d1b5225b27b1cac55144f79351718 Author: Josh Poimboeuf Date: Tue May 23 10:37:30 2017 -0500 x86/unwind: Add end-of-stack check for ftrace handlers Dave Jones and Steven Rostedt reported unwinder warnings like the following: WARNING: kernel stack frame pointer at ffff8800bda0ff30 in sshd:1090 has bad value 000055b32abf1fa8 In both cases, the unwinder was attempting to unwind from an ftrace handler into entry code. The callchain was something like: syscall entry code C function ftrace handler save_stack_trace() The problem is that the unwinder's end-of-stack logic gets confused by the way ftrace lays out the stack frame (with fentry enabled). I was able to recreate this warning with: echo call_usermodehelper_exec_async:stacktrace > /sys/kernel/debug/tracing/set_ftrace_filter (exit login session) I considered fixing this by changing the ftrace code to rewrite the stack to make the unwinder happy. But that seemed too intrusive after I implemented it. Instead, just add another check to the unwinder's end-of-stack logic to detect this special case. Side note: We could probably get rid of these end-of-stack checks by encoding the frame pointer for syscall entry just like we do for interrupt entry. That would be simpler, but it would also be a lot more intrusive since it would slightly affect the performance of every syscall. Reported-by: Dave Jones Reported-by: Steven Rostedt Signed-off-by: Josh Poimboeuf Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Petr Mladek Cc: live-patching@vger.kernel.org Fixes: c32c47c68a0a ("x86/unwind: Warn on bad frame pointer") Link: http://lkml.kernel.org/r/671ba22fbc0156b8f7e0cfa5ab2a795e08bc37e1.1495553739.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/unwind_frame.c | 49 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 9 deletions(-) commit ebd574994c63164d538a197172157318f58ac647 Author: Josh Poimboeuf Date: Tue May 23 10:37:29 2017 -0500 Revert "x86/entry: Fix the end of the stack for newly forked tasks" Petr Mladek reported the following warning when loading the livepatch sample module: WARNING: CPU: 1 PID: 3699 at arch/x86/kernel/stacktrace.c:132 save_stack_trace_tsk_reliable+0x133/0x1a0 ... Call Trace: __schedule+0x273/0x820 schedule+0x36/0x80 kthreadd+0x305/0x310 ? kthread_create_on_cpu+0x80/0x80 ? icmp_echo.part.32+0x50/0x50 ret_from_fork+0x2c/0x40 That warning means the end of the stack is no longer recognized as such for newly forked tasks. The problem was introduced with the following commit: ff3f7e2475bb ("x86/entry: Fix the end of the stack for newly forked tasks") ... which was completely misguided. It only partially fixed the reported issue, and it introduced another bug in the process. None of the other entry code saves the frame pointer before calling into C code, so it doesn't make sense for ret_from_fork to do so either. Contrary to what I originally thought, the original issue wasn't related to newly forked tasks. It was actually related to ftrace. When entry code calls into a function which then calls into an ftrace handler, the stack frame looks different than normal. The original issue will be fixed in the unwinder, in a subsequent patch. Reported-by: Petr Mladek Signed-off-by: Josh Poimboeuf Acked-by: Thomas Gleixner Cc: Dave Jones Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Cc: live-patching@vger.kernel.org Fixes: ff3f7e2475bb ("x86/entry: Fix the end of the stack for newly forked tasks") Link: http://lkml.kernel.org/r/f350760f7e82f0750c8d1dd093456eb212751caa.1495553739.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 30 +++++++++++++++++++----------- arch/x86/entry/entry_64.S | 11 ++++------- 2 files changed, 23 insertions(+), 18 deletions(-) commit 6e30437bd42c4d4e9cfc4c40efda00eb83a11cde Author: Ingo Molnar Date: Wed May 24 08:57:21 2017 +0200 tools/include: Sync kernel ABI headers with tooling headers Sync (copy) the following v4.12 kernel headers to the tooling headers: arch/x86/include/asm/disabled-features.h: arch/x86/include/uapi/asm/kvm.h: arch/powerpc/include/uapi/asm/kvm.h: arch/s390/include/uapi/asm/kvm.h: arch/arm/include/uapi/asm/kvm.h: arch/arm64/include/uapi/asm/kvm.h: - 'struct kvm_sync_regs' got changed in an ABI-incompatible way, fortunately none of the (in-kernel) tooling relied on it - new KVM_DEV calls added arch/x86/include/asm/required-features.h: - 5-level paging hardware ABI detail added arch/x86/include/asm/cpufeatures.h: - new CPU feature added arch/x86/include/uapi/asm/vmx.h: - new VMX exit conditions None of the changes requires fixes in the tooling source code. This addresses the following warnings: Warning: include/uapi/linux/stat.h differs from kernel Warning: arch/x86/include/asm/disabled-features.h differs from kernel Warning: arch/x86/include/asm/required-features.h differs from kernel Warning: arch/x86/include/asm/cpufeatures.h differs from kernel Warning: arch/x86/include/uapi/asm/kvm.h differs from kernel Warning: arch/x86/include/uapi/asm/vmx.h differs from kernel Warning: arch/powerpc/include/uapi/asm/kvm.h differs from kernel Warning: arch/s390/include/uapi/asm/kvm.h differs from kernel Warning: arch/arm/include/uapi/asm/kvm.h differs from kernel Warning: arch/arm64/include/uapi/asm/kvm.h differs from kernel Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Jiri Olsa Cc: Linus Torvalds Cc: Milian Wolff Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yao Jin Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170524065721.j2mlch6bgk5klgbc@gmail.com Signed-off-by: Ingo Molnar tools/arch/arm/include/uapi/asm/kvm.h | 10 +++++++++- tools/arch/arm64/include/uapi/asm/kvm.h | 10 +++++++++- tools/arch/powerpc/include/uapi/asm/kvm.h | 3 +++ tools/arch/s390/include/uapi/asm/kvm.h | 26 ++++++++++++++++++++++++-- tools/arch/x86/include/asm/cpufeatures.h | 2 ++ tools/arch/x86/include/asm/disabled-features.h | 8 +++++++- tools/arch/x86/include/asm/required-features.h | 8 +++++++- tools/arch/x86/include/uapi/asm/kvm.h | 3 +++ tools/arch/x86/include/uapi/asm/vmx.h | 25 ++++++++++++++++++------- tools/include/uapi/linux/stat.h | 8 ++------ 10 files changed, 84 insertions(+), 19 deletions(-) commit 7111ffff60a68f55d864200cd6c7677319e5c242 Author: Namhyung Kim Date: Wed May 24 15:21:29 2017 +0900 perf tools: Put caller above callee in --children mode The __hpp__sort_acc() sorts entries using callchain depth in order to put callers above in children mode. But it assumed the callchain order was callee-first. Now default (for children) is caller-first so the order of entries is reverted. For example, consider following case: $ perf report --no-children ..l # Overhead Command Shared Object Symbol # ........ ....... ................... .......................... # 99.44% a.out a.out [.] main | ---main __libc_start_main _start Then children mode should show 'start' above '__libc_start_main' since it's the caller (parent) of the __libc_start_main. But it's reversed: # Children Self Command Shared Object Symbol # ........ ........ ....... ............... ..................... # 99.61% 0.00% a.out libc-2.25.so [.] __libc_start_main 99.61% 0.00% a.out a.out [.] _start 99.54% 99.44% a.out a.out [.] main This patch fixes it. # Children Self Command Shared Object Symbol # ........ ........ ....... ............... ..................... # 99.61% 0.00% a.out a.out [.] _start 99.61% 0.00% a.out libc-2.25.so [.] __libc_start_main 99.54% 99.44% a.out a.out [.] main Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Linus Torvalds Cc: Milian Wolff Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yao Jin Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170524062129.32529-8-namhyung@kernel.org Signed-off-by: Ingo Molnar tools/perf/ui/hist.c | 2 ++ 1 file changed, 2 insertions(+) commit 4d53b9d546f9f4505e6e3d58c8eed894d6f684e7 Author: Milian Wolff Date: Wed May 24 15:21:28 2017 +0900 perf report: Do not drop last inlined frame The very last inlined frame, i.e. the one furthest away from the non-inlined frame, was silently dropped. This is apparent when comparing the output of `perf script` and `addr2line`: ~~~~~~ $ perf script --inline ... a.out 26722 80836.309329: 72425 cycles: 21561 __hypot_finite (/usr/lib/libm-2.25.so) ace3 hypot (/usr/lib/libm-2.25.so) a4a main (a.out) std::abs std::_Norm_helper::_S_do_it std::norm main 20510 __libc_start_main (/usr/lib/libc-2.25.so) bd9 _start (a.out) $ addr2line -a -f -i -e /tmp/a.out a4a | c++filt 0x0000000000000a4a std::__complex_abs(doublecomplex ) /usr/include/c++/6.3.1/complex:589 double std::abs(std::complex const&) /usr/include/c++/6.3.1/complex:597 double std::_Norm_helper::_S_do_it(std::complex const&) /usr/include/c++/6.3.1/complex:654 double std::norm(std::complex const&) /usr/include/c++/6.3.1/complex:664 main /tmp/inlining.cpp:14 ~~~~~ Note how `std::__complex_abs` is missing from the `perf script` output. This is similarly showing up in `perf report`. The patch here fixes this issue, and the output becomes: ~~~~~ a.out 26722 80836.309329: 72425 cycles: 21561 __hypot_finite (/usr/lib/libm-2.25.so) ace3 hypot (/usr/lib/libm-2.25.so) a4a main (a.out) std::__complex_abs std::abs std::_Norm_helper::_S_do_it std::norm main 20510 __libc_start_main (/usr/lib/libc-2.25.so) bd9 _start (a.out) ~~~~~ Signed-off-by: Milian Wolff Signed-off-by: Namhyung Kim Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yao Jin Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170524062129.32529-7-namhyung@kernel.org Signed-off-by: Ingo Molnar tools/perf/util/srcline.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 28071f51839e393f697d0d1df0b223a4bc373606 Author: Milian Wolff Date: Wed May 24 15:21:27 2017 +0900 perf report: Always honor callchain order for inlined nodes So far, the inlined nodes where only reversed when we built perf against libbfd. If that was not available, the addr2line fallback code path was missing the inline_list__reverse call. Now we always add the nodes in the correct order within inline_list__append. This removes the need to reverse the list and also ensures that all callers construct the list in the right order. Signed-off-by: Milian Wolff Signed-off-by: Namhyung Kim Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yao Jin Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170524062129.32529-6-namhyung@kernel.org Signed-off-by: Ingo Molnar tools/perf/util/srcline.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 325fbff51f961491adff4037d0e0a94d6132bd9b Author: Namhyung Kim Date: Wed May 24 15:21:26 2017 +0900 perf script: Add --inline option for debugging The --inline option is to show inlined functions in callchains. For example: $ perf script a.out 5644 11611.467597: 309961 cycles:u: 790 main (/home/namhyung/tmp/perf/a.out) 20511 __libc_start_main (/usr/lib/libc-2.25.so) 8ba _start (/home/namhyung/tmp/perf/a.out) ... $ perf script --inline a.out 5644 11611.467597: 309961 cycles:u: 790 main (/home/namhyung/tmp/perf/a.out) std::__detail::_Adaptor, double>::operator() std::uniform_real_distribution::operator() > std::uniform_real_distribution::operator() > main 20511 __libc_start_main (/usr/lib/libc-2.25.so) 8ba _start (/home/namhyung/tmp/perf/a.out) ... Reviewed-and-tested-by: Milian Wolff Signed-off-by: Namhyung Kim Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jin Yao Cc: Jiri Olsa Cc: Jiri Olsa Cc: Linus Torvalds Cc: Milian Wolff Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170524062129.32529-5-namhyung@kernel.org Signed-off-by: Ingo Molnar tools/perf/Documentation/perf-script.txt | 4 ++++ tools/perf/builtin-script.c | 2 ++ tools/perf/util/evsel_fprintf.c | 33 ++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) commit 1982ad48fc82c284a5cc55697a012d3357e84d01 Author: Milian Wolff Date: Wed May 24 15:21:25 2017 +0900 perf report: Fix off-by-one for non-activation frames As the documentation for dwfl_frame_pc says, frames that are no activation frames need to have their program counter decremented by one to properly find the function of the caller. This fixes many cases where perf report currently attributes the cost to the next line. I.e. I have code like this: ~~~~~~~~~~~~~~~ #include #include using namespace std; int main() { this_thread::sleep_for(chrono::milliseconds(1000)); this_thread::sleep_for(chrono::milliseconds(100)); this_thread::sleep_for(chrono::milliseconds(10)); return 0; } ~~~~~~~~~~~~~~~ Now compile and record it: ~~~~~~~~~~~~~~~ g++ -std=c++11 -g -O2 test.cpp echo 1 | sudo tee /proc/sys/kernel/sched_schedstats perf record \ --event sched:sched_stat_sleep \ --event sched:sched_process_exit \ --event sched:sched_switch --call-graph=dwarf \ --output perf.data.raw \ ./a.out echo 0 | sudo tee /proc/sys/kernel/sched_schedstats perf inject --sched-stat --input perf.data.raw --output perf.data ~~~~~~~~~~~~~~~ Before this patch, the report clearly shows the off-by-one issue. Most notably, the last sleep invocation is incorrectly attributed to the "return 0;" line: ~~~~~~~~~~~~~~~ Overhead Source:Line ........ ........... 100.00% core.c:0 | ---__schedule core.c:0 schedule do_nanosleep hrtimer.c:0 hrtimer_nanosleep sys_nanosleep entry_SYSCALL_64_fastpath .tmp_entry_64.o:0 __nanosleep_nocancel .:0 std::this_thread::sleep_for > thread:323 | |--90.08%--main test.cpp:9 | __libc_start_main | _start | |--9.01%--main test.cpp:10 | __libc_start_main | _start | --0.91%--main test.cpp:13 __libc_start_main _start ~~~~~~~~~~~~~~~ With this patch here applied, the issue is fixed. The report becomes much more usable: ~~~~~~~~~~~~~~~ Overhead Source:Line ........ ........... 100.00% core.c:0 | ---__schedule core.c:0 schedule do_nanosleep hrtimer.c:0 hrtimer_nanosleep sys_nanosleep entry_SYSCALL_64_fastpath .tmp_entry_64.o:0 __nanosleep_nocancel .:0 std::this_thread::sleep_for > thread:323 | |--90.08%--main test.cpp:8 | __libc_start_main | _start | |--9.01%--main test.cpp:9 | __libc_start_main | _start | --0.91%--main test.cpp:10 __libc_start_main _start ~~~~~~~~~~~~~~~ Similarly it works for signal frames: ~~~~~~~~~~~~~~~ __noinline void bar(void) { volatile long cnt = 0; for (cnt = 0; cnt < 100000000; cnt++); } __noinline void foo(void) { bar(); } void sig_handler(int sig) { foo(); } int main(void) { signal(SIGUSR1, sig_handler); raise(SIGUSR1); foo(); return 0; } ~~~~~~~~~~~~~~~~ Before, the report wrongly points to `signal.c:29` after raise(): ~~~~~~~~~~~~~~~~ $ perf report --stdio --no-children -g srcline -s srcline ... 100.00% signal.c:11 | ---bar signal.c:11 | |--50.49%--main signal.c:29 | __libc_start_main | _start | --49.51%--0x33a8f raise .:0 main signal.c:29 __libc_start_main _start ~~~~~~~~~~~~~~~~ With this patch in, the issue is fixed and we instead get: ~~~~~~~~~~~~~~~~ 100.00% signal signal [.] bar | ---bar signal.c:11 | |--50.49%--main signal.c:29 | __libc_start_main | _start | --49.51%--0x33a8f raise .:0 main signal.c:27 __libc_start_main _start ~~~~~~~~~~~~~~~~ Note how this patch fixes this issue for both unwinding methods, i.e. both dwfl and libunwind. The former case is straight-forward thanks to dwfl_frame_pc(). For libunwind, we replace the functionality via unw_is_signal_frame() for any but the very first frame. Signed-off-by: Milian Wolff Signed-off-by: Namhyung Kim Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yao Jin Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170524062129.32529-4-namhyung@kernel.org Signed-off-by: Ingo Molnar tools/perf/util/unwind-libdw.c | 6 +++++- tools/perf/util/unwind-libunwind-local.c | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) commit b21cc97810932a551f7aac46f0b89c469c828b3f Author: Milian Wolff Date: Wed May 24 15:21:24 2017 +0900 perf report: Fix memory leak in addr2line when called by addr2inlines When a filename was found in addr2line it was duplicated via strdup() but never freed. Now we pass NULL and handle this gracefully in addr2line. Detected by Valgrind: ==16331== 1,680 bytes in 21 blocks are definitely lost in loss record 148 of 220 ==16331== at 0x4C2AF1F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==16331== by 0x672FA69: strdup (in /usr/lib/libc-2.25.so) ==16331== by 0x52769F: addr2line (srcline.c:256) ==16331== by 0x52769F: addr2inlines (srcline.c:294) ==16331== by 0x52769F: dso__parse_addr_inlines (srcline.c:502) ==16331== by 0x574D7A: inline__fprintf (hist.c:41) ==16331== by 0x574D7A: ipchain__fprintf_graph (hist.c:147) ==16331== by 0x57518A: __callchain__fprintf_graph (hist.c:212) ==16331== by 0x5753CF: callchain__fprintf_graph.constprop.6 (hist.c:337) ==16331== by 0x57738E: hist_entry__fprintf (hist.c:628) ==16331== by 0x57738E: hists__fprintf (hist.c:882) ==16331== by 0x44A20F: perf_evlist__tty_browse_hists (builtin-report.c:399) ==16331== by 0x44A20F: report__browse_hists (builtin-report.c:491) ==16331== by 0x44A20F: __cmd_report (builtin-report.c:624) ==16331== by 0x44A20F: cmd_report (builtin-report.c:1054) ==16331== by 0x4A49CE: run_builtin (perf.c:296) ==16331== by 0x4A4CC0: handle_internal_command (perf.c:348) ==16331== by 0x434371: run_argv (perf.c:392) ==16331== by 0x434371: main (perf.c:530) Signed-off-by: Milian Wolff Signed-off-by: Namhyung Kim Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yao Jin Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170524062129.32529-3-namhyung@kernel.org Signed-off-by: Ingo Molnar tools/perf/util/srcline.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 7d4df089d77306914426a604c890175f91a9a459 Author: Milian Wolff Date: Wed May 24 15:21:23 2017 +0900 perf report: Don't crash on invalid maps in `-g srcline` mode I just hit a segfault when doing `perf report -g srcline`. Valgrind pointed me at this code as the culprit: ==8359== Invalid read of size 8 ==8359== at 0x3096D9: map__rip_2objdump (map.c:430) ==8359== by 0x2FC1A3: match_chain_srcline (callchain.c:645) ==8359== by 0x2FC1A3: match_chain (callchain.c:700) ==8359== by 0x2FC1A3: append_chain (callchain.c:895) ==8359== by 0x2FC1A3: append_chain_children (callchain.c:846) ==8359== by 0x2FF719: callchain_append (callchain.c:944) ==8359== by 0x2FF719: hist_entry__append_callchain (callchain.c:1058) ==8359== by 0x32FA06: iter_add_single_cumulative_entry (hist.c:908) ==8359== by 0x33195C: hist_entry_iter__add (hist.c:1050) ==8359== by 0x258F65: process_sample_event (builtin-report.c:204) ==8359== by 0x30D60C: perf_session__deliver_event (session.c:1310) ==8359== by 0x30D60C: ordered_events__deliver_event (session.c:119) ==8359== by 0x310D12: __ordered_events__flush (ordered-events.c:210) ==8359== by 0x310D12: ordered_events__flush.part.3 (ordered-events.c:277) ==8359== by 0x30DD3C: perf_session__process_user_event (session.c:1349) ==8359== by 0x30DD3C: perf_session__process_event (session.c:1475) ==8359== by 0x30FC3C: __perf_session__process_events (session.c:1867) ==8359== by 0x30FC3C: perf_session__process_events (session.c:1921) ==8359== by 0x25A985: __cmd_report (builtin-report.c:575) ==8359== by 0x25A985: cmd_report (builtin-report.c:1054) ==8359== by 0x2B9A80: run_builtin (perf.c:296) ==8359== Address 0x70 is not stack'd, malloc'd or (recently) free'd This patch fixes the issue. Signed-off-by: Milian Wolff [ Remove dependency from another change ] Signed-off-by: Namhyung Kim Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yao Jin Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170524062129.32529-2-namhyung@kernel.org Signed-off-by: Ingo Molnar tools/perf/util/callchain.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 98f9de366fccee7572c646af226b2d4b4841e3b5 Author: Alexander Sverdlin Date: Mon May 22 16:05:23 2017 +0200 dmaengine: ep93xx: Don't drain the transfers in terminate_all() Draining the transfers in terminate_all callback happens with IRQs disabled, therefore induces huge latency: irqsoff latency trace v1.1.5 on 4.11.0 -------------------------------------------------------------------- latency: 39770 us, #57/57, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0) ----------------- | task: process-129 (uid:0 nice:0 policy:2 rt_prio:50) ----------------- => started at: _snd_pcm_stream_lock_irqsave => ended at: snd_pcm_stream_unlock_irqrestore _------=> CPU# / _-----=> irqs-off | / _----=> need-resched || / _---=> hardirq/softirq ||| / _--=> preempt-depth |||| / delay cmd pid ||||| time | caller \ / ||||| \ | / process-129 0d.s. 3us : _snd_pcm_stream_lock_irqsave process-129 0d.s1 9us : snd_pcm_stream_lock <-_snd_pcm_stream_lock_irqsave process-129 0d.s1 15us : preempt_count_add <-snd_pcm_stream_lock process-129 0d.s2 22us : preempt_count_add <-snd_pcm_stream_lock process-129 0d.s3 32us : snd_pcm_update_hw_ptr0 <-snd_pcm_period_elapsed process-129 0d.s3 41us : soc_pcm_pointer <-snd_pcm_update_hw_ptr0 process-129 0d.s3 50us : dmaengine_pcm_pointer <-soc_pcm_pointer process-129 0d.s3 58us+: snd_dmaengine_pcm_pointer_no_residue <-dmaengine_pcm_pointer process-129 0d.s3 96us : update_audio_tstamp <-snd_pcm_update_hw_ptr0 process-129 0d.s3 103us : snd_pcm_update_state <-snd_pcm_update_hw_ptr0 process-129 0d.s3 112us : xrun <-snd_pcm_update_state process-129 0d.s3 119us : snd_pcm_stop <-xrun process-129 0d.s3 126us : snd_pcm_action <-snd_pcm_stop process-129 0d.s3 134us : snd_pcm_action_single <-snd_pcm_action process-129 0d.s3 141us : snd_pcm_pre_stop <-snd_pcm_action_single process-129 0d.s3 150us : snd_pcm_do_stop <-snd_pcm_action_single process-129 0d.s3 157us : soc_pcm_trigger <-snd_pcm_do_stop process-129 0d.s3 166us : snd_dmaengine_pcm_trigger <-soc_pcm_trigger process-129 0d.s3 175us : ep93xx_dma_terminate_all <-snd_dmaengine_pcm_trigger process-129 0d.s3 182us : preempt_count_add <-ep93xx_dma_terminate_all process-129 0d.s4 189us*: m2p_hw_shutdown <-ep93xx_dma_terminate_all process-129 0d.s4 39472us : m2p_hw_setup <-ep93xx_dma_terminate_all ... rest skipped... process-129 0d.s. 40080us : => ep93xx_dma_tasklet => tasklet_action => __do_softirq => irq_exit => __handle_domain_irq => vic_handle_irq => __irq_usr => 0xb66c6668 Just abort the transfers and warn if the HW state is not what we expect. Move draining into device_synchronize callback. Signed-off-by: Alexander Sverdlin Cc: stable@vger.kernel.org Signed-off-by: Vinod Koul drivers/dma/ep93xx_dma.c | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) commit 0037ae47812b1f431cc602100d1d51f37d77b61e Author: Alexander Sverdlin Date: Mon May 22 16:05:22 2017 +0200 dmaengine: ep93xx: Always start from BASE0 The current buffer is being reset to zero on device_free_chan_resources() but not on device_terminate_all(). It could happen that HW is restarted and expects BASE0 to be used, but the driver is not synchronized and will start from BASE1. One solution is to reset the buffer explicitly in m2p_hw_setup(). Signed-off-by: Alexander Sverdlin Cc: stable@vger.kernel.org Signed-off-by: Vinod Koul drivers/dma/ep93xx_dma.c | 2 ++ 1 file changed, 2 insertions(+) commit a54c51863ed1294078a435151e625313b4365ac5 Author: Jon Mason Date: Fri Apr 28 16:11:30 2017 -0400 thermal: broadcom: ns-thermal: default on iProc SoCs Tweak the Kconfig description to mention support for NSP and make the default on for iProc based platforms. Signed-off-by: Jon Mason Signed-off-by: Eduardo Valentin drivers/thermal/broadcom/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 8b8656d64c0cce9007e062273190d8e97096f0ac Author: Markus Elfring Date: Wed Apr 26 17:11:28 2017 +0200 ti-soc-thermal: Fix a typo in a comment line Add a missing character in this description for a function. Acked-by: Keerthy Tested-by: Keerthy Signed-off-by: Markus Elfring Signed-off-by: Eduardo Valentin drivers/thermal/ti-soc-thermal/ti-bandgap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57e521151b56ee0c5164c442b7928c66711bfbc4 Author: Markus Elfring Date: Wed Apr 26 17:03:07 2017 +0200 ti-soc-thermal: Delete error messages for failed memory allocations in ti_bandgap_build() The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such statements here. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Acked-by: Keerthy Tested-by: Keerthy Signed-off-by: Markus Elfring Signed-off-by: Eduardo Valentin drivers/thermal/ti-soc-thermal/ti-bandgap.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 748c23d88610b5df378d86e7192e4bd1f58adb35 Author: Markus Elfring Date: Wed Apr 26 16:45:25 2017 +0200 ti-soc-thermal: Use devm_kcalloc() in ti_bandgap_build() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". This issue was detected by using the Coccinelle software. Acked-by: Keerthy Tested-by: Keerthy Signed-off-by: Markus Elfring Signed-off-by: Eduardo Valentin drivers/thermal/ti-soc-thermal/ti-bandgap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c4b379d0640a35b6c87200c3bdac0df2e6137022 Author: Colin Ian King Date: Mon May 8 11:36:43 2017 +0100 thermal: core: make thermal_emergency_poweroff static Making thermal_emergency_poweroff static fixes sparse warning: drivers/thermal/thermal_core.c:6: warning: symbol 'thermal_emergency_poweroff' was not declared. Should it be static? Fixes: ef1d87e06ab4 ("thermal: core: Add a back up thermal shutdown mechanism") Acked-by: Keerthy Signed-off-by: Colin Ian King Signed-off-by: Eduardo Valentin drivers/thermal/thermal_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e774888675d7ec693379a228490ce611135cbc2 Author: Masahiro Yamada Date: Wed Apr 26 10:50:02 2017 +0900 thermal: qoriq: remove useless call for of_thermal_get_trip_points() Building this driver with W=1 reports: warning: variable 'trip' set but not used [-Wunused-but-set-variable] The call for of_thermal_get_trip_points() is useless. Signed-off-by: Masahiro Yamada Signed-off-by: Eduardo Valentin drivers/thermal/qoriq_thermal.c | 3 --- 1 file changed, 3 deletions(-) commit f3cdbe39b2ab0636dec0d5d43b54f1061ce7566c Author: Mike Christie Date: Wed May 17 04:34:37 2017 -0500 tcmu: fix crash during device removal We currently do tcmu_free_device ->tcmu_netlink_event(TCMU_CMD_REMOVED_DEVICE) -> uio_unregister_device -> kfree(tcmu_dev). The problem is that the kernel does not wait for userspace to do the close() on the uio device before freeing the tcmu_dev. We can then hit a race where the kernel frees the tcmu_dev before userspace does close() and so when close() -> release -> tcmu_release is done, we try to access a freed tcmu_dev. This patch made over the target-pending master branch moves the freeing of the tcmu_dev to when the last reference has been dropped. This also fixes a leak where if tcmu_configure_device was not called on a device we did not free udev->name which was allocated at tcmu_alloc_device time. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 46 ++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 13 deletions(-) commit 75b61250bf687c686ba6850c34eccc1303b0b827 Author: Varun Prakash Date: Tue May 16 19:23:44 2017 +0530 scsi: libcxgbi: fix skb use after free skb->data is assigned to task->hdr in cxgbi_conn_alloc_pdu(), skb gets freed after tx but task->hdr is still dereferenced in iscsi_tcp_task_xmit() to avoid this call skb_get() after allocating skb and free the skb in cxgbi_cleanup_task() or before allocating new skb in cxgbi_conn_alloc_pdu(). Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/cxgbi/libcxgbi.c | 25 ++++++++++++++++++------- drivers/scsi/cxgbi/libcxgbi.h | 16 ++++++++-------- 2 files changed, 26 insertions(+), 15 deletions(-) commit e274086e473c0cbea18051ae0a78a05f8d658f47 Author: Changbin Du Date: Mon May 22 17:46:58 2017 +0800 drm/i915/gvt: clean up unsubmited workloads before destroying kmem cache This is to fix a memory leak issue caused by unfreed gvtg workload objects. Walk through the workload list and free all of the remained workloads before destroying kmem cache. [179.885211] INFO: Object 0xffff9cef10003b80 @offset=7040 [179.885657] kmem_cache_destroy gvt-g_vgpu_workload: Slab cache still has objects [179.886146] CPU: 2 PID: 2318 Comm: win_lucas Tainted: G    B   W       4.11.0+ #1 [179.887223] Call Trace: [179.887394] dump_stack+0x63/0x90 [179.887617] kmem_cache_destroy+0x1cf/0x1e0 [179.887960] intel_vgpu_clean_execlist+0x15/0x20 [i915] [179.888365] intel_gvt_destroy_vgpu+0x4c/0xd0 [i915] [179.888688] intel_vgpu_remove+0x2a/0x30 [kvmgt] [179.888988] mdev_device_remove_ops+0x23/0x50 [mdev] [179.889309] mdev_device_remove+0xe4/0x190 [mdev] [179.889615] remove_store+0x7d/0xb0 [mdev] [179.889885] dev_attr_store+0x18/0x30 [179.890129] sysfs_kf_write+0x37/0x40 [179.890371] kernfs_fop_write+0x107/0x180 [179.890632] __vfs_write+0x37/0x160 [179.890865] ? kmem_cache_alloc+0xd7/0x1b0 [179.891116] ? apparmor_file_permission+0x1a/0x20 [179.891372] ? security_file_permission+0x3b/0xc0 [179.891628] vfs_write+0xb8/0x1b0 [179.891812] SyS_write+0x55/0xc0 [179.891992] entry_SYSCALL_64_fastpath+0x1e/0xad Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/execlist.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit b19775e4785996503b106e59d9d3a8839e677afd Author: manish.rangankar@cavium.com Date: Fri May 19 01:33:21 2017 -0700 scsi: qedi: Fix endpoint NULL panic during recovery. Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_fw.c | 2 ++ 1 file changed, 2 insertions(+) commit 3d61a3132212d6b1c8c6914700d5f6456712ac08 Author: Nilesh Javali Date: Fri May 19 01:33:20 2017 -0700 scsi: qedi: set max_fin_rt default value max_fin_rt is the maximum re-transmission of FIN packets as part of the termination flow. After reaching this value the FW will send a single RESET. Signed-off-by: Nilesh Javali Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_main.c | 1 + 1 file changed, 1 insertion(+) commit 962ea1c0df6c5a36f4477aa4a10f4acc0f5f56bd Author: manish.rangankar@cavium.com Date: Fri May 19 01:33:19 2017 -0700 scsi: qedi: Set firmware tcp msl timer value. Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_main.c | 1 + 1 file changed, 1 insertion(+) commit 0ea9314f4e6c69f8d732e0a9310114c2de35ada8 Author: manish.rangankar@cavium.com Date: Fri May 19 01:33:18 2017 -0700 scsi: qedi: Fix endpoint NULL panic in qedi_set_path. RIP: 0010:qedi_set_path+0x114/0x570 [qedi] Call Trace: [] iscsi_if_recv_msg+0x623/0x14a0 [] ? rhashtable_lookup_compare+0x36/0x70 [] iscsi_if_rx+0x8e/0x1f0 [] netlink_unicast+0xed/0x1b0 [] netlink_sendmsg+0x330/0x770 [] sock_sendmsg+0xb0/0xf0 [] ? __switch_to+0x17b/0x4b0 [] ? __schedule+0x2d8/0x900 [] ___sys_sendmsg+0x3a9/0x3c0 [] ? get_futex_key+0x1c8/0x2b0 [] ? futex_wake+0x80/0x160 Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_iscsi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d0788a528d9e09d7c17f05dd61c4cc492181f817 Author: manish.rangankar@cavium.com Date: Fri May 19 01:33:17 2017 -0700 scsi: qedi: Set dma_boundary to 0xfff. Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi.h | 1 + drivers/scsi/qedi/qedi_iscsi.c | 1 + 2 files changed, 2 insertions(+) commit fc2fbf0d422b54b487c5e7413acd54cbac6d4151 Author: manish.rangankar@cavium.com Date: Fri May 19 01:33:16 2017 -0700 scsi: qedi: Correctly set firmware max supported BDs. Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e901d0b15c0cba8c5ba55e4be46fc5a0e2f3cb9 Author: Arun Easi Date: Fri May 19 01:33:15 2017 -0700 scsi: qedi: Fix bad pte call trace when iscsiuio is stopped. munmap done by iscsiuio during a stop of the service triggers a "bad pte" warning sometimes. munmap kernel path goes through the mmapped pages and has a validation check for mapcount (in struct page) to be zero or above. kzalloc, which we had used to allocate udev->ctrl, uses slab allocations, which re-uses mapcount (union) for other purposes that can make the mapcount look negative. Avoid all these trouble by invoking one of the __get_free_pages wrappers to be used instead of kzalloc for udev->ctrl. BUG: Bad page map in process iscsiuio pte:80000000aa624067 pmd:3e6777067 page:ffffea0002a98900 count:2 mapcount:-2143289280 mapping: (null) index:0xffff8800aa624e00 page flags: 0x10075d00000090(dirty|slab) page dumped because: bad pte addr:00007fcba70a3000 vm_flags:0c0400fb anon_vma: (null) mapping:ffff8803edf66e90 index:0 Call Trace: dump_stack+0x19/0x1b print_bad_pte+0x1af/0x250 unmap_page_range+0x7a7/0x8a0 unmap_single_vma+0x81/0xf0 unmap_vmas+0x49/0x90 unmap_region+0xbe/0x140 ? vma_rb_erase+0x121/0x220 do_munmap+0x245/0x420 vm_munmap+0x41/0x60 SyS_munmap+0x22/0x30 tracesys+0xdd/0xe2 Signed-off-by: Arun Easi Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_main.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 0648a07c9b22acc33ead0645cf8f607b0c9c7e32 Author: Artem Savkov Date: Sat May 20 09:58:10 2017 +0200 scsi: scsi_dh_rdac: Use ctlr directly in rdac_failover_get() rdac_failover_get references struct rdac_controller as ctlr->ms_sdev->handler_data->ctlr for no apparent reason. Besides being inefficient this also introduces a null-pointer dereference as send_mode_select() sets ctlr->ms_sdev to NULL before calling rdac_failover_get(): [ 18.432550] device-mapper: multipath service-time: version 0.3.0 loaded [ 18.436124] BUG: unable to handle kernel NULL pointer dereference at 0000000000000790 [ 18.436129] IP: send_mode_select+0xca/0x560 [ 18.436129] PGD 0 [ 18.436130] P4D 0 [ 18.436130] [ 18.436132] Oops: 0000 [#1] SMP [ 18.436133] Modules linked in: dm_service_time sd_mod dm_multipath amdkfd amd_iommu_v2 radeon(+) i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm qla2xxx drm serio_raw scsi_transport_fc bnx2 i2c_core dm_mirror dm_region_hash dm_log dm_mod [ 18.436143] CPU: 4 PID: 443 Comm: kworker/u16:2 Not tainted 4.12.0-rc1.1.el7.test.x86_64 #1 [ 18.436144] Hardware name: IBM BladeCenter LS22 -[79013SG]-/Server Blade, BIOS -[L8E164AUS-1.07]- 05/25/2011 [ 18.436145] Workqueue: kmpath_rdacd send_mode_select [ 18.436146] task: ffff880225116a40 task.stack: ffffc90002bd8000 [ 18.436148] RIP: 0010:send_mode_select+0xca/0x560 [ 18.436148] RSP: 0018:ffffc90002bdbda8 EFLAGS: 00010246 [ 18.436149] RAX: 0000000000000000 RBX: ffffc90002bdbe08 RCX: ffff88017ef04a80 [ 18.436150] RDX: ffffc90002bdbe08 RSI: ffff88017ef04a80 RDI: ffff8802248e4388 [ 18.436151] RBP: ffffc90002bdbe48 R08: 0000000000000000 R09: ffffffff81c104c0 [ 18.436151] R10: 00000000000001ff R11: 000000000000035a R12: ffffc90002bdbdd8 [ 18.436152] R13: ffff8802248e4390 R14: ffff880225152800 R15: ffff8802248e4400 [ 18.436153] FS: 0000000000000000(0000) GS:ffff880227d00000(0000) knlGS:0000000000000000 [ 18.436154] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 18.436154] CR2: 0000000000000790 CR3: 000000042535b000 CR4: 00000000000006e0 [ 18.436155] Call Trace: [ 18.436159] ? rdac_activate+0x14e/0x150 [ 18.436161] ? refcount_dec_and_test+0x11/0x20 [ 18.436162] ? kobject_put+0x1c/0x50 [ 18.436165] ? scsi_dh_activate+0x6f/0xd0 [ 18.436168] process_one_work+0x149/0x360 [ 18.436170] worker_thread+0x4d/0x3c0 [ 18.436172] kthread+0x109/0x140 [ 18.436173] ? rescuer_thread+0x380/0x380 [ 18.436174] ? kthread_park+0x60/0x60 [ 18.436176] ret_from_fork+0x2c/0x40 [ 18.436177] Code: 49 c7 46 20 00 00 00 00 4c 89 ef c6 07 00 0f 1f 40 00 45 31 ed c7 45 b0 05 00 00 00 44 89 6d b4 4d 89 f5 4c 8b 75 a8 49 8b 45 20 <48> 8b b0 90 07 00 00 48 8b 56 10 8b 42 10 48 8d 7a 28 85 c0 0f [ 18.436192] RIP: send_mode_select+0xca/0x560 RSP: ffffc90002bdbda8 [ 18.436192] CR2: 0000000000000790 [ 18.436198] ---[ end trace 40f3e4dca1ffabdd ]--- [ 18.436199] Kernel panic - not syncing: Fatal exception [ 18.436222] Kernel Offset: disabled [-- MARK -- Thu May 18 11:45:00 2017] Fixes: 327825574132 scsi_dh_rdac: switch to scsi_execute_req_flags() Cc: stable@vger.kernel.org Signed-off-by: Artem Savkov Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_rdac.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 43fe8b8eb81eee713400340716cf945f59d21496 Author: Thomas Gleixner Date: Tue May 23 23:27:38 2017 +0200 posix-timers: Make signal printks conditional A recent commit added extra printks for CPU/RT limits. This can result in excessive spam in dmesg. Make the printks conditional on print_fatal_signals. Fixes: e7ea7c9806a2 ("rlimits: Print more information when CPU/RT limits are exceeded") Reported-by: Dave Jones Signed-off-by: Thomas Gleixner Cc: Arun Raghavan kernel/time/posix-cpu-timers.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 124dffea9e8e372509e055aebd118e85518fd644 Author: Liping Zhang Date: Sun May 21 22:38:11 2017 +0800 netfilter: nat: use atomic bit op to clear the _SRC_NAT_DONE_BIT We need to clear the IPS_SRC_NAT_DONE_BIT to indicate that the ct has been removed from nat_bysource table. But unfortunately, we use the non-atomic bit operation: "ct->status &= ~IPS_NAT_DONE_MASK". So there's a race condition that we may clear the _DYING_BIT set by another CPU unexpectedly. Since we don't care about the IPS_DST_NAT_DONE_BIT, so just using clear_bit to clear the IPS_SRC_NAT_DONE_BIT is enough. Also note, this is the last user which use the non-atomic bit operation to update the confirmed ct->status. Reported-by: Florian Westphal Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_nat_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2df92e98a34a5619dadd29c6291113c009181e7 Author: Pablo Neira Ayuso Date: Sun May 21 00:37:10 2017 +0200 netfilter: nft_set_rbtree: handle element re-addition after deletion The existing code selects no next branch to be inspected when re-inserting an inactive element into the rb-tree, looping endlessly. This patch restricts the check for active elements to the EEXIST case only. Fixes: e701001e7cbe ("netfilter: nft_rbtree: allow adjacent intervals with dynamic updates") Reported-by: Wolfgang Bumiller Tested-by: Wolfgang Bumiller Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_rbtree.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit f3c0eb05e258c6a48c2d1ef2fa71ffb6ff63cd18 Author: Davide Caratti Date: Thu May 18 18:01:43 2017 +0200 netfilter: conntrack: fix false CRC32c mismatch using paged skb sctp_compute_cksum() implementation assumes that at least the SCTP header is in the linear part of skb: modify conntrack error callback to avoid false CRC32c mismatch, if the transport header is partially/entirely paged. Fixes: cf6e007eef83 ("netfilter: conntrack: validate SCTP crc32c in PREROUTING") Signed-off-by: Davide Caratti Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto_sctp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 82bc9a42cf854fdf63155759c0aa790bd1f361b0 Author: Patrik Jakobsson Date: Tue Apr 18 13:43:32 2017 +0200 drm/gma500/psb: Actually use VBT mode when it is found With LVDS we were incorrectly picking the pre-programmed mode instead of the prefered mode provided by VBT. Make sure we pick the VBT mode if one is provided. It is likely that the mode read-out code is still wrong but this patch fixes the immediate problem on most machines. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78562 Cc: Signed-off-by: Patrik Jakobsson Link: http://patchwork.freedesktop.org/patch/msgid/20170418114332.12183-1-patrik.r.jakobsson@gmail.com drivers/gpu/drm/gma500/psb_intel_lvds.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 4d071c3238987325b9e50e33051a40d1cce311cc Author: Imre Deak Date: Tue May 23 14:18:17 2017 -0500 PCI/PM: Add needs_resume flag to avoid suspend complete optimization Some drivers - like i915 - may not support the system suspend direct complete optimization due to differences in their runtime and system suspend sequence. Add a flag that when set resumes the device before calling the driver's system suspend handlers which effectively disables the optimization. Needed by a future patch fixing suspend/resume on i915. Suggested by Rafael. Signed-off-by: Imre Deak Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki Cc: stable@vger.kernel.org drivers/pci/pci.c | 3 ++- include/linux/pci.h | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 293dffaad8d500e1a5336eeb90d544cf40d4fbd8 Author: Dan Carpenter Date: Tue May 23 17:25:10 2017 +0300 libceph: NULL deref on crush_decode() error path If there is not enough space then ceph_decode_32_safe() does a goto bad. We need to return an error code in that situation. The current code returns ERR_PTR(0) which is NULL. The callers are not expecting that and it results in a NULL dereference. Fixes: f24e9980eb86 ("ceph: OSD client") Signed-off-by: Dan Carpenter Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov net/ceph/osdmap.c | 1 + 1 file changed, 1 insertion(+) commit b51456a6096ebf9f4ceb2cc7e176b471d4b70af0 Author: Ilya Dryomov Date: Fri May 19 14:24:36 2017 +0200 libceph: fix error handling in process_one_ticket() Don't leak key internals after new_session_key is populated. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder net/ceph/auth_x.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d18a1247c4070390fc0c2d83d89a72afe921882e Author: Ilya Dryomov Date: Fri May 19 12:21:56 2017 +0200 libceph: validate blob_struct_v in process_one_ticket() None of these are validated in userspace, but since we do validate reply_struct_v in ceph_x_proc_ticket_reply(), tkt_struct_v (first) and CephXServiceTicket struct_v (second) in process_one_ticket(), validate CephXTicketBlob struct_v as well. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder net/ceph/auth_x.c | 3 +++ 1 file changed, 3 insertions(+) commit f3b4e55ded9b3c52831a7d2ab9e511293c99fc11 Author: Ilya Dryomov Date: Fri May 19 11:59:22 2017 +0200 libceph: drop version variable from ceph_monmap_decode() It's set but not used: CEPH_FEATURE_MONNAMES feature bit isn't advertised, which guarantees a v1 MonMap. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder net/ceph/mon_client.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1759f7b0e3fab1d1882d7c680af9d12c5c111b0e Author: Ilya Dryomov Date: Fri May 19 11:38:17 2017 +0200 libceph: make ceph_msg_data_advance() return void Both callers ignore the returned bool. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder net/ceph/messenger.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 6f4dbd149d2a151b89d1a5bbf7530ee5546c7908 Author: Ilya Dryomov Date: Fri May 19 11:33:16 2017 +0200 libceph: use kbasename() and kill ceph_file_part() Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder include/linux/ceph/ceph_debug.h | 6 +++--- net/ceph/ceph_common.c | 13 ------------- 2 files changed, 3 insertions(+), 16 deletions(-) commit 9a307403d374b993061f5992a6e260c944920d0b Author: J. Bruce Fields Date: Tue May 23 12:24:40 2017 -0400 nfsd4: fix null dereference on replay if we receive a compound such that: - the sessionid, slot, and sequence number in the SEQUENCE op match a cached succesful reply with N ops, and - the Nth operation of the compound is a PUTFH, PUTPUBFH, PUTROOTFH, or RESTOREFH, then nfsd4_sequence will return 0 and set cstate->status to nfserr_replay_cache. The current filehandle will not be set. This will cause us to call check_nfsd_access with first argument NULL. To nfsd4_compound it looks like we just succesfully executed an operation that set a filehandle, but the current filehandle is not set. Fix this by moving the nfserr_replay_cache earlier. There was never any reason to have it after the encode_op label, since the only case where he hit that is when opdesc->op_func sets it. Note that there are two ways we could hit this case: - a client is resending a previously sent compound that ended with one of the four PUTFH-like operations, or - a client is sending a *new* compound that (incorrectly) shares sessionid, slot, and sequence number with a previously sent compound, and the length of the previously sent compound happens to match the position of a PUTFH-like operation in the new compound. The second is obviously incorrect client behavior. The first is also very strange--the only purpose of a PUTFH-like operation is to set the current filehandle to be used by the following operation, so there's no point in having it as the last in a compound. So it's likely this requires a buggy or malicious client to reproduce. Reported-by: Scott Mayhew Cc: stable@kernel.vger.org Signed-off-by: J. Bruce Fields fs/nfsd/nfs4proc.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 56fff1bb0f31358bf81a3c64a8dcd6da0dc44263 Merge: fde8e33 e2c8249 Author: Linus Torvalds Date: Tue May 23 09:57:39 2017 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Fix the i2c-designware regression of rc2. Also, a DMA buffer fix for the tiny-usb driver where the USB core now loudly complains about the non DMA-capable buffer" [ I had cherry-picked the designware fix separately because it hit my laptop, but here is the proper sync with the i2c tree - Linus ] * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: designware: Fix bogus sda_hold_time due to uninitialized vars i2c: i2c-tiny-usb: fix buffer not being DMA capable commit 29226b198bb26f8e23985d011a9301cee5550da8 Author: Sudeep Holla Date: Thu May 18 17:09:59 2017 +0100 ARM: 8675/1: MCPM: ensure not to enter __hyp_soft_restart from loopback and cpu_power_down Commit 9da5ac236de6 ("ARM: soft-reboot into same mode that we entered the kernel") added support to enter the new kernel in the same processor mode as the previous one when we soft-reboot from one kernel into another by pass a flag to cpu_reset() so it knows what to do exactly. However it missed to make similar changes in MCPM code. Due to the missing flag, the CPUs enter HYP mode which is not supported with MCPM. MCPM works only in secure mode as it manages CCI. This patch aligns the cpu_reset call in MCPM with other changes in the above mentioned commit by making phys_reset_t to follow the prototype of cpu_reset(). Fixes: 9da5ac236de6 ("ARM: soft-reboot into same mode that we entered the kernel") Acked-by: Nicolas Pitre Signed-off-by: Sudeep Holla Signed-off-by: Russell King arch/arm/common/mcpm_entry.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit efad8396e906d095521791e0408293c101543e50 Author: Bjorn Andersson Date: Mon May 8 21:36:37 2017 -0700 wcn36xx: Close SMD channel on device removal The SMD channel is not the primary WCNSS channel and must explicitly be closed as the device is removed, or the channel will already by open on a subsequent probe call in e.g. the case of reloading the kernel module. This issue was introduced because I simplified the underlying SMD implementation while the SMD adaptions of the driver sat on the mailing list, but missed to update these patches. The patch does however only apply back to the transition to rpmsg, hence the limited Fixes. Fixes: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to rpmsg") Reported-by: Eyal Ilsar Signed-off-by: Bjorn Andersson Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/main.c | 2 ++ 1 file changed, 2 insertions(+) commit 223220356d5ebc05ead9a8d697abb0c0a906fc81 Author: Richard Date: Sun May 21 12:27:00 2017 -0700 partitions/msdos: FreeBSD UFS2 file systems are not recognized The code in block/partitions/msdos.c recognizes FreeBSD, OpenBSD and NetBSD partitions and does a reasonable job picking out OpenBSD and NetBSD UFS subpartitions. But for FreeBSD the subpartitions are always "bad". Kernel: Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/partitions/msdos.c | 2 ++ 1 file changed, 2 insertions(+) commit 12e8b570e732eaa5eae3a2895ba3fbcf91bde2b4 Author: Jesper Dangaard Brouer Date: Mon May 22 20:13:07 2017 +0200 mlx5: fix bug reading rss_hash_type from CQE Masks for extracting part of the Completion Queue Entry (CQE) field rss_hash_type was swapped, namely CQE_RSS_HTYPE_IP and CQE_RSS_HTYPE_L4. The bug resulted in setting skb->l4_hash, even-though the rss_hash_type indicated that hash was NOT computed over the L4 (UDP or TCP) part of the packet. Added comments from the datasheet, to make it more clear what these masks are selecting. Signed-off-by: Jesper Dangaard Brouer Acked-by: Saeed Mahameed Signed-off-by: David S. Miller include/linux/mlx5/device.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 7f65b1f5adc5f8496ca8bec4947de66fefe36220 Author: Oliver Neukum Date: Mon May 22 14:50:30 2017 +0200 cdc-ether: divorce initialisation with a filter reset and a generic method Some devices need their multicast filter reset but others are crashed by that. So the methods need to be separated. Signed-off-by: Oliver Neukum Reported-by: "Ridgway, Keith" Signed-off-by: David S. Miller drivers/net/usb/cdc_ether.c | 31 ++++++++++++++++++++++++------- include/linux/usb/usbnet.h | 1 + 2 files changed, 25 insertions(+), 7 deletions(-) commit 2f9bfd3399920440edec724bee626b87070def4a Merge: fadd2ce a486cd2 Author: David S. Miller Date: Tue May 23 10:51:32 2017 -0400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2017-05-23 1) Fix wrong header offset for esp4 udpencap packets. 2) Fix a stack access out of bounds when creating a bundle with sub policies. From Sabrina Dubroca. 3) Fix slab-out-of-bounds in pfkey due to an incorrect sadb_x_sec_len calculation. 4) We checked the wrong feature flags when taking down an interface with IPsec offload enabled. Fix from Ilan Tayari. 5) Copy the anti replay sequence numbers when doing a state migration, otherwise we get out of sync with the sequence numbers. Fix from Antony Antony. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 7bd897cfce1eb373892d35d7f73201b0f9b221c4 Author: Dan Carpenter Date: Tue May 23 17:28:36 2017 +0300 block: fix an error code in add_partition() We don't set an error code on this path. It means that we return NULL instead of an error pointer and the caller does a NULL dereference. Fixes: 6d1d8050b4bc ("block, partition: add partition_meta_info to hd_struct") Signed-off-by: Dan Carpenter Signed-off-by: Jens Axboe block/partition-generic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1cb0b57fec06a616d98deaeda1924f8e45e1e4de Author: Thomas Petazzoni Date: Thu May 18 14:58:53 2017 +0200 MAINTAINERS: add irqchip related drivers to Marvell EBU maintainers This commit updates the MAINTAINERS file so that the Marvell EBU maintainers are also responsible for their irqchip drivers in drivers/irqchip/. Signed-off-by: Thomas Petazzoni Acked-by: Jason Cooper Signed-off-by: Gregory CLEMENT MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit e7c1572f6565d8b2b2e3be9cffa022a8cd6a6643 Author: Thomas Petazzoni Date: Thu May 18 14:58:52 2017 +0200 MAINTAINERS: sort F entries for Marvell EBU maintainers This commit sorts alphabetically the file entries of the Marvell EBU maintainers in the MAINTAINERS file. Signed-off-by: Thomas Petazzoni Acked-by: Jason Cooper Signed-off-by: Gregory CLEMENT MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b665d98edc9ab295169be2fc5bb4e89a46de0a1a Author: Tariq Toukan Date: Thu May 18 13:34:43 2017 +0300 net/mlx5: Tolerate irq_set_affinity_hint() failures Add tolerance to failures of irq_set_affinity_hint(). Its role is to give hints that optimizes performance, and should not block the driver load. In non-SMP systems, functionality is not available as there is a single core, and all these calls definitely fail. Hence, do not call the function and avoid the warning prints. Fixes: db058a186f98 ("net/mlx5_core: Set irq affinity hints") Signed-off-by: Tariq Toukan Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 73dd3a4839c1d27c36d4dcc92e1ff44225ecbeb7 Author: Mohamad Haj Yahia Date: Thu Feb 23 11:19:36 2017 +0200 net/mlx5: Avoid using pending command interface slots Currently when firmware command gets stuck or it takes long time to complete, the driver command will get timeout and the command slot is freed and can be used for new commands, and if the firmware receive new command on the old busy slot its behavior is unexpected and this could be harmful. To fix this when the driver command gets timeout we return failure, but we don't free the command slot and we wait for the firmware to explicitly respond to that command. Once all the entries are busy we will stop processing new firmware commands. Fixes: 9cba4ebcf374 ('net/mlx5: Fix potential deadlock in command mode change') Signed-off-by: Mohamad Haj Yahia Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 41 +++++++++++++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/health.c | 2 +- include/linux/mlx5/driver.h | 7 +++- 4 files changed, 44 insertions(+), 8 deletions(-) commit b57fe691961cc8f00541f9a435c70df45d41e514 Author: Erez Shitrit Date: Thu Apr 27 17:59:00 2017 +0300 net/mlx5e: IPoIB, handle RX packet correctly IPoIB packet contains the pseudo header area, we need to pull it prior to reset_mac_header in order to let the GRO work well. In more details: GRO checks the mac address of the new coming packet, it does that by comparing the hard_header_len size of the current packet to the previous one in that session, the comparison is over hard_header_len size. Now, the driver prepares that area in the skb by allocating area from the reserved part and resetting the correct mac header to it. Fixes: 9d6bd752c63c ("net/mlx5e: IPoIB, RX handler") Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit e3ca4e0583a02a04503d9c827fb5c5d50abc4ff5 Author: Or Gerlitz Date: Tue May 9 13:37:26 2017 +0300 net/mlx5e: Fix warnings around parsing of TC pedit actions The sparse tool emits these correct complaints: drivers/net/ethernet/mellanox/mlx5/core//en_tc.c:1005:25: warning: cast to restricted __be32 drivers/net/ethernet/mellanox/mlx5/core//en_tc.c:1007:25: warning: cast to restricted __be16 The value is provided from user-space in network order, but there's no way for them to realize that, avoid the warnings by casting to the appropriate type. Fixes: d79b6df6b10a ('net/mlx5e: Add parsing of TC pedit actions to HW format') Signed-off-by: Or Gerlitz Reported-by: Leon Romanovsky Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit d824bf3fe2d352fc2c52b7ede05b1a0e95d946be Author: Or Gerlitz Date: Tue May 9 19:02:42 2017 +0300 net/mlx5e: Properly enforce disallowing of partial field re-write offload Currently we don't support partial header re-writes through TC pedit action offloading. However, the code that enforces that wasn't err-ing on cases where the first and last bits of the mask are set but there is some zero bit between them, such as in the below example, fix that! tc filter add dev enp1s0 protocol ip parent ffff: prio 10 flower ip_proto udp dst_port 2001 skip_sw action pedit munge ip src set 1.0.0.1 retain 0xff0000ff Fixes: d79b6df6b10a ('net/mlx5e: Add parsing of TC pedit actions to HW format') Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 26c02749936f064abf771a0f5f49b280fcfd8b66 Author: Or Gerlitz Date: Wed May 10 13:59:54 2017 +0300 net/mlx5e: Allow TC csum offload if applied together with pedit action When offloading header re-writes, the HW re-calculates the relevant L3/L4 checksums. Hence, when upper layers (as done by OVS) ask for TC checksum action offload together with pedit offload, don't err. This command now works: tc filter add dev ens1f0 protocol ip parent ffff: prio 20 flower skip_sw ip_proto tcp dst_port 9001 action pedit ex munge tcp dport set 0x1234 pipe action csum tcp Signed-off-by: Or Gerlitz Reported-by: Paul Blakey Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 39 +++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 3aa4266405a6c2e03eb0ff12d7c573d3d903da4c Author: Or Gerlitz Date: Wed May 10 13:48:41 2017 +0300 net/sched: act_csum: Add accessors for offloading drivers Add the accessors for realizing if this is a csum action, and for which fields checksum is needed. Signed-off-by: Or Gerlitz Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed include/net/tc_act/tc_csum.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit cdc5a7f363be34287ac6c2345e5d1d3b37cf4a23 Author: Or Gerlitz Date: Tue May 9 20:45:06 2017 +0300 net/mlx5e: Use the correct delete call on offloaded TC encap entry detach We wrongly direcly invoke hlist_del_rcu() and not hash_del_rcu() which does a slightly different call now and may change later, fix that. Fixes: a54e20b4fcae ('net/mlx5e: Add basic TC tunnel set action for SRIOV offloads') Signed-off-by: Or Gerlitz Reported-by: Paul Blakey Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c70d9d809fdeecedb96972457ee45c49a232d97f Author: Eric W. Biederman Date: Mon May 22 15:40:12 2017 -0500 ptrace: Properly initialize ptracer_cred on fork When I introduced ptracer_cred I failed to consider the weirdness of fork where the task_struct copies the old value by default. This winds up leaving ptracer_cred set even when a process forks and the child process does not wind up being ptraced. Because ptracer_cred is not set on non-ptraced processes whose parents were ptraced this has broken the ability of the enlightenment window manager to start setuid children. Fix this by properly initializing ptracer_cred in ptrace_init_task This must be done with a little bit of care to preserve the current value of ptracer_cred when ptrace carries through fork. Re-reading the ptracer_cred from the ptracing process at this point is inconsistent with how PT_PTRACE_CAP has been maintained all of these years. Tested-by: Takashi Iwai Fixes: 64b875f7ac8a ("ptrace: Capture the ptracer's creds not PT_PTRACE_CAP") Signed-off-by: "Eric W. Biederman" include/linux/ptrace.h | 7 +++++-- kernel/ptrace.c | 20 +++++++++++++------- 2 files changed, 18 insertions(+), 9 deletions(-) commit 1b57b6210f4e52904393be97c62122aae69bc8aa Author: Arend Van Spriel Date: Tue May 23 09:58:07 2017 +0100 cfg80211: make cfg80211_sched_scan_results() work from atomic context Drivers should be able to call cfg80211_sched_scan_results() from atomic context. However, with the introduction of multiple scheduled scan feature this requirement was not taken into account resulting in regression shown below. [ 119.021594] BUG: scheduling while atomic: irq/47-iwlwifi/517/0x00000200 [ 119.021604] Modules linked in: [...] [ 119.021759] CPU: 1 PID: 517 Comm: irq/47-iwlwifi Not tainted 4.12.0-rc2-t440s-20170522+ #1 [ 119.021763] Hardware name: LENOVO 20AQS03H00/20AQS03H00, BIOS GJET91WW (2.41 ) 09/21/2016 [ 119.021766] Call Trace: [ 119.021778] ? dump_stack+0x5c/0x84 [ 119.021784] ? __schedule_bug+0x4c/0x70 [ 119.021792] ? __schedule+0x496/0x5c0 [ 119.021798] ? schedule+0x2d/0x80 [ 119.021804] ? schedule_preempt_disabled+0x5/0x10 [ 119.021810] ? __mutex_lock.isra.0+0x18e/0x4c0 [ 119.021817] ? __wake_up+0x2f/0x50 [ 119.021833] ? cfg80211_sched_scan_results+0x19/0x60 [cfg80211] [ 119.021844] ? cfg80211_sched_scan_results+0x19/0x60 [cfg80211] [ 119.021859] ? iwl_mvm_rx_lmac_scan_iter_complete_notif+0x17/0x30 [iwlmvm] [ 119.021869] ? iwl_pcie_rx_handle+0x2a9/0x7e0 [iwlwifi] [ 119.021878] ? iwl_pcie_irq_handler+0x17c/0x730 [iwlwifi] [ 119.021884] ? irq_forced_thread_fn+0x60/0x60 [ 119.021887] ? irq_thread_fn+0x16/0x40 [ 119.021892] ? irq_thread+0x109/0x180 [ 119.021896] ? wake_threads_waitq+0x30/0x30 [ 119.021901] ? kthread+0xf2/0x130 [ 119.021905] ? irq_thread_dtor+0x90/0x90 [ 119.021910] ? kthread_create_on_node+0x40/0x40 [ 119.021915] ? ret_from_fork+0x26/0x40 Fixes: b34939b98369 ("cfg80211: add request id to cfg80211_sched_scan_*() api") Reported-by: Sander Eikelenboom Signed-off-by: Arend van Spriel Signed-off-by: Johannes Berg net/wireless/scan.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ea452678734eb782126f999bf5c4fb3e71d3b196 Author: Ulf Hansson Date: Wed May 3 16:11:33 2017 +0200 arm64: dts: hikey: Fix WiFi support The description of the connection between the dwmmc (SDIO) controller and the Wifi chip, which is attached to the SDIO bus is wrong. Currently the SDIO card can't be detected and thus the Wifi doesn't work. Let's fix this by assigning the correct vmmc supply, which is the always on regulator VDD_3V3 and remove the WLAN enable regulator altogether. Then to properly deal with the power on/off sequence, add a mmc-pwrseq node to describe the resources needed to detect the SDIO card. Except for the WLAN enable GPIO and its corresponding assert/de-assert delays, the mmc-pwrseq node also contains a handle to a clock provided by the hi655x pmic. This clock is also needed to be able to turn on the WiFi chip. Signed-off-by: Ulf Hansson Acked-by: Arnd Bergmann arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 76f1dfb687150e852aa74573962cfc158a9570cc Author: Ulf Hansson Date: Wed May 3 14:18:26 2017 +0200 arm64: dts: hi6220: Move board data from the dwmmc nodes to hikey dts Move the board specific descriptions for the dwmmc nodes in the hi6220 SoC dtsi, into the hikey dts as it's there these belongs. While changing this, let's take the opportunity to drop the use of the "ti,non-removable" binding for one of the dwmmc device nodes, as it's not a valid binding and not used. Drop also the unnecessary use of "num-slots = <0x1>" for all of the dwmmc nodes, as there is no need to set this since when default number of slots is one. Signed-off-by: Ulf Hansson Acked-by: Daniel Lezcano Acked-by: Arnd Bergmann arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 23 ++++++++++++++++++++++- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 19 ------------------- 2 files changed, 22 insertions(+), 20 deletions(-) commit 84f7c60b31f10e3a438153bc7408ad536f585641 Author: Ulf Hansson Date: Wed May 3 13:51:27 2017 +0200 arm64: dts: hikey: Add the SYS_5V and the VDD_3V3 regulators Add these regulators to better describe the HW, but also because those is needed in following changes. Signed-off-by: Ulf Hansson Acked-by: Daniel Lezcano Acked-by: Arnd Bergmann arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 1b32a5ff98fbb271d2235ddcfe3b58f514f8260a Author: Ulf Hansson Date: Wed May 3 12:46:55 2017 +0200 arm64: dts: hi6220: Move the fixed_5v_hub regulator to the hikey dts The regulator is a part of the hikey board, therefore let's move it from the hi6220 SoC dtsi file into the hikey dts file . Let's also rename the regulator according to the datasheet (5V_HUB) to better reflect the HW. Signed-off-by: Ulf Hansson Acked-by: Daniel Lezcano Acked-by: Arnd Bergmann arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 10 ++++++++++ arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 12 +----------- 2 files changed, 11 insertions(+), 11 deletions(-) commit 307ded8968868e55343e063fbe96cff1efd77eb6 Author: Daniel Lezcano Date: Mon Apr 24 22:40:22 2017 +0200 arm64: dts: hikey: Add clock for the pmic mfd The hi655x PMIC provides the regulators but also a clock. The latter is missing so let's add it. This clock is used by WiFi/Bluetooth chip, but that connection is done in a separate change on top of this one. Signed-off-by: Daniel Lezcano Acked-by: Rob Herring Acked-by: Lee Jones [Ulf: Split patch and updated changelog] Signed-off-by: Ulf Hansson Acked-by: Arnd Bergmann arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 1 + 1 file changed, 1 insertion(+) commit f74ac688c981138c914f9afba50b646146e35585 Author: Daniel Lezcano Date: Mon Apr 24 22:40:22 2017 +0200 mfd: dts: hi655x: Add clock binding for the pmic The hi655x PMIC provides the regulators but also a clock. The latter is missing in the definition, so extend the documentation to include this as well. Signed-off-by: Daniel Lezcano Acked-by: Rob Herring Acked-by: Lee Jones [Ulf: Split patch and updated changelog] Signed-off-by: Ulf Hansson Acked-by: Arnd Bergmann Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit e9256e142f597edf90c68cec22db4c4aebaa27de Author: Ulf Hansson Date: Sat May 6 11:43:05 2017 +0200 mmc: pwrseq_simple: Parse DTS for the power-off-delay-us property If the optional power-off-delay-us property is found, insert the corresponding delay after asserting the GPIO during power off. This enables a graceful shutdown sequence for some devices. Cc: linux-mmc@vger.kernel.org Signed-off-by: Ulf Hansson Acked-by: Arnd Bergmann drivers/mmc/core/pwrseq_simple.c | 7 +++++++ 1 file changed, 7 insertions(+) commit c477ebe21fabe0010a2ed324ce3a1762c757d867 Author: Ulf Hansson Date: Sat May 6 11:41:30 2017 +0200 mmc: dt: pwrseq-simple: Invent power-off-delay-us During power off, after the GPIO pin has been asserted, some devices like the Wifi chip from TI, Wl18xx, needs a delay before the host continues with clock gating and turning off regulators as to follow a graceful shutdown sequence. Therefore invent an optional power-off-delay-us DT binding for mmc-pwrseq-simple, to allow us to support this constraint. Cc: devicetree@vger.kernel.org Cc: Rob Herring Cc: linux-mmc@vger.kernel.org Signed-off-by: Ulf Hansson Acked-by: Arnd Bergmann Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt | 2 ++ 1 file changed, 2 insertions(+) commit 7903d4f5e1dec53963cba9b1bc472a76a3532e07 Author: Chen-Yu Tsai Date: Mon May 22 14:25:49 2017 +0800 pinctrl: sunxi: Fix SPDIF function name for A83T We use well known standard names for functions that have name, such as I2C, SPI, SPDIF, etc.. Fix the function name of SPDIF, which was named OWA (One Wire Audio) based on Allwinner datasheets. Fixes: 4730f33f0d82 ("pinctrl: sunxi: add allwinner A83T PIO controller support") Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da6c2addf66d7ff7d0b090d6267d4292f951e4e6 Author: Uwe Kleine-König Date: Thu May 18 11:23:55 2017 +0200 pinctrl: mxs: atomically switch mux and drive strength config To set the mux mode of a pin two bits must be set. Up to now this is implemented using the following idiom: writel(mask, reg + CLR); writel(value, reg + SET); . This however results in the mux mode being 0 between the two writes. On my machine there is an IC's reset pin connected to LCD_D20. The bootloader configures this pin as GPIO output-high (i.e. not holding the IC in reset). When Linux reconfigures the pin to GPIO the short time LCD_D20 is muxed as LCD_D20 instead of GPIO_1_20 is enough to confuse the connected IC. The same problem is present for the pin's drive strength setting which is reset to low drive strength before using the right value. So instead of relying on the hardware to modify the register setting using two writes implement the bit toggling using read-modify-write. Fixes: 17723111e64f ("pinctrl: add pinctrl-mxs support") Signed-off-by: Uwe Kleine-König Acked-by: Shawn Guo Signed-off-by: Linus Walleij drivers/pinctrl/freescale/pinctrl-mxs.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 0377f49fb4f83edf40a6ff355eb8df6697491ea1 Author: Alexandre Courbot Date: Fri May 12 10:01:18 2017 -0700 MAINTAINERS: remove self from GPIO maintainers I have not been able to dedicate time to the GPIO subsystem since quite some time, and I don't see the situation improving in the near future. Update the maintainers list to reflect this unfortunate fact. Signed-off-by: Alexandre Courbot Signed-off-by: Linus Walleij MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 2a8209fa68236ad65363dba03db5dbced520268a Author: Mika Westerberg Date: Wed May 17 13:25:14 2017 +0300 pinctrl: cherryview: Extend the Chromebook DMI quirk to Intel_Strago systems It turns out there are quite many Chromebooks out there that have the same keyboard issue than Acer Chromebook. All of them are based on Intel_Strago reference and report their DMI_PRODUCT_FAMILY as "Intel_Strago" (Samsung Chromebook 3 and Cyan Chromebooks are exceptions for which we add separate entries). Instead of adding each machine to the quirk table, we use DMI_PRODUCT_FAMILY of "Intel_Strago" that hopefully covers most of the machines out there currently. Link: https://bugzilla.kernel.org/show_bug.cgi?id=194945 Suggested: Dmitry Torokhov Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-cherryview.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit c61872c9833d17d3807fb999096917c1f9eaada0 Author: Mika Westerberg Date: Wed May 17 13:25:12 2017 +0300 firmware: dmi: Add DMI_PRODUCT_FAMILY identification string Sometimes it is more convenient to be able to match a whole family of products, like in case of bunch of Chromebooks based on Intel_Strago to apply a driver quirk instead of quirking each machine one-by-one. This adds support for DMI_PRODUCT_FAMILY identification string and also exports it to the userspace through sysfs attribute just like the existing ones. Suggested-by: Dmitry Torokhov Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/firmware/dmi-id.c | 2 ++ drivers/firmware/dmi_scan.c | 1 + include/linux/mod_devicetable.h | 1 + 3 files changed, 4 insertions(+) commit 9a752b4c9ab924033bfdb8784c680d50b2bd5684 Author: Hans de Goede Date: Sat May 13 14:39:53 2017 +0200 gpio: crystalcove: Do not write regular gpio registers for virtual GPIOs The Crystal Cove PMIC has 16 real GPIOs but the ACPI code for devices with this PMIC may address up to 95 GPIOs, these extra GPIOs are called virtual GPIOs and are used by the ACPI code as a method of accessing various non GPIO bits of PMIC. Commit dcdc3018d635 ("gpio: crystalcove: support virtual GPIO") added dummy support for these to avoid a bunch of ACPI errors, but instead of ignoring writes / reads to them by doing: if (gpio >= CRYSTALCOVE_GPIO_NUM) return 0; It accidentally introduced the following wrong check: if (gpio > CRYSTALCOVE_VGPIO_NUM) return 0; Which means that attempts by the ACPI code to access these gpios causes some arbitrary gpio to get touched through for example GPIO1P0CTLO + gpionr % 8. Since we do support input/output (but not interrupts) on the 0x5e virtual GPIO, this commit makes to_reg return -ENOTSUPP for unsupported virtual GPIOs so as to not have to check for (gpio >= CRYSTALCOVE_GPIO_NUM && gpio != 0x5e) everywhere and to make it easier to add support for more virtual GPIOs in the future. It then adds a check for to_reg returning an error to all callers where this may happen fixing the ACPI code accessing virtual GPIOs accidentally causing changes to real GPIOs. Fixes: dcdc3018d635 ("gpio: crystalcove: support virtual GPIO") Cc: Aaron Lu Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-crystalcove.c | 54 +++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 18 deletions(-) commit f928543404bdf6bb4e8d6a6c3ced5edebd0d6f38 Author: Daniel Vetter Date: Mon May 22 15:59:45 2017 +0200 drm: Fix deadlock retry loop in page_flip_ioctl I failed to properly onion-wrap the unwind code: We acquire the vblank reference before we start with the wait-wound locking dance, hence we must make sure we retry before we drop the reference. Oops. v2: The vblank_put must be after the frambuffer_put (Michel). I suck at unwrapping code that doesn't use separate labels for each stage, but checks each pointer first ... While re-reading everything I also realized that we must clean up the fb refcounts, and specifically plane->old_fb before we drop the locks, either in the final unlocking, or in the w/w retry path. Hence the correct fix is to drop the vblank_put to the very bottom. Fixes: 29dc0d1de182 ("drm: Roll out acquire context for the page_flip ioctl") Cc: Harry Wentland Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Reported-by: Tommi Rantala Cc: Tommi Rantala Cc: Michel Dänzer Tested-by: Tommi Rantala Reviewed-by: Michel Dänzer Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170522135945.28831-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_plane.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 429030bc944ee9a8bbe5d9bb23dcda0ae2205450 Author: Gabriel Krisman Bertazi Date: Fri May 19 14:58:19 2017 -0300 drm: qxl: Delay entering atomic context during cursor update qxl_release_map will enter an atomic context, but since we still need to alloc memory for BOs, we better delay that until we have everything we need, in case we need to sleep inside the allocation. This avoids the Sleep in atomic state below, which was reported by Mike. [ 43.910362] BUG: sleeping function called from invalid context at mm/slab.h:432 [ 43.910955] in_atomic(): 1, irqs_disabled(): 0, pid: 2077, name: Xorg [ 43.911472] Preemption disabled at: [ 43.911478] [] qxl_bo_kmap_atomic_page+0xa5/0x100 [qxl] [ 43.912103] CPU: 0 PID: 2077 Comm: Xorg Tainted: G E 4.12.0-master #38 [ 43.912550] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.8.1-0-g4adadbd-20161202_174313-build11a 04/01/2014 [ 43.913202] Call Trace: [ 43.913371] dump_stack+0x65/0x89 [ 43.913581] ? qxl_bo_kmap_atomic_page+0xa5/0x100 [qxl] [ 43.913876] ___might_sleep+0x11a/0x190 [ 43.914095] __might_sleep+0x4a/0x80 [ 43.914319] ? qxl_bo_create+0x50/0x190 [qxl] [ 43.914565] kmem_cache_alloc_trace+0x46/0x180 [ 43.914836] qxl_bo_create+0x50/0x190 [qxl] [ 43.915082] ? refcount_dec_and_test+0x11/0x20 [ 43.915332] ? ttm_mem_io_reserve+0x41/0xe0 [ttm] [ 43.915595] qxl_alloc_bo_reserved+0x37/0xb0 [qxl] [ 43.915884] qxl_cursor_atomic_update+0x8f/0x260 [qxl] [ 43.916172] ? drm_atomic_helper_update_legacy_modeset_state+0x1d6/0x210 [drm_kms_helper] [ 43.916623] drm_atomic_helper_commit_planes+0xec/0x230 [drm_kms_helper] [ 43.916995] drm_atomic_helper_commit_tail+0x2b/0x60 [drm_kms_helper] [ 43.917398] commit_tail+0x65/0x70 [drm_kms_helper] [ 43.917693] drm_atomic_helper_commit+0xa9/0x100 [drm_kms_helper] [ 43.918039] drm_atomic_commit+0x4b/0x50 [drm] [ 43.918334] drm_atomic_helper_update_plane+0xf1/0x110 [drm_kms_helper] [ 43.918902] __setplane_internal+0x19f/0x280 [drm] [ 43.919240] drm_mode_cursor_universal+0x101/0x1c0 [drm] [ 43.919541] drm_mode_cursor_common+0x15b/0x1d0 [drm] [ 43.919858] drm_mode_cursor2_ioctl+0xe/0x10 [drm] [ 43.920157] drm_ioctl+0x211/0x460 [drm] [ 43.920383] ? drm_mode_cursor_ioctl+0x50/0x50 [drm] [ 43.920664] ? handle_mm_fault+0x93/0x160 [ 43.920893] do_vfs_ioctl+0x96/0x6e0 [ 43.921117] ? __fget+0x73/0xa0 [ 43.921322] SyS_ioctl+0x41/0x70 [ 43.921545] entry_SYSCALL_64_fastpath+0x1a/0xa5 [ 43.922188] RIP: 0033:0x7f1145804bc7 [ 43.922526] RSP: 002b:00007ffcd3e50508 EFLAGS: 00003246 ORIG_RAX: 0000000000000010 [ 43.923367] RAX: ffffffffffffffda RBX: 0000000000000040 RCX: 00007f1145804bc7 [ 43.923852] RDX: 00007ffcd3e50540 RSI: 00000000c02464bb RDI: 000000000000000b [ 43.924299] RBP: 0000000000000040 R08: 0000000000000040 R09: 000000000000000c [ 43.924694] R10: 00007ffcd3e50340 R11: 0000000000003246 R12: 0000000000000018 [ 43.925128] R13: 00000000022bc390 R14: 0000000000000040 R15: 00007ffcd3e5062c Reported-by: Mike Galbraith Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170519175819.15682-1-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1fc2e41f7af4572b07190f9dec28396b418e9a36 Author: Alexander Tsoy Date: Mon May 22 20:58:11 2017 +0300 ALSA: hda - apply STAC_9200_DELL_M22 quirk for Dell Latitude D430 This model is actually called 92XXM2-8 in Windows driver. But since pin configs for M22 and M28 are identical, just reuse M22 quirk. Fixes external microphone (tested) and probably docking station ports (not tested). Signed-off-by: Alexander Tsoy Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_sigmatel.c | 2 ++ 1 file changed, 2 insertions(+) commit 698be5d6ee26127818d6033c32aa7967034496bd Merge: c0e7bb3 5bf1853 Author: Martin Schwidefsky Date: Tue May 23 07:33:57 2017 +0200 Merge tag 'vfio-ccw-20170522' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into fixes Pull vfio-ccw fix from Conelia Huck: "vfio-ccw: one patch" * Make some symbols in vfio-ccw static, as detected by sparse. commit 1999f108c983a7287a847b09e29dac25b9301dee Author: Chuanxiao Dong Date: Wed May 17 15:49:01 2017 +0800 drm/i915/gvt: Disable compression workaround for Gen9 With enabling this workaround, can observe GPU hang issue on Gen9. As currently host side doesn't have this workaround, disable it from GVT side. v2: - Fix indent error.(Zhenyu) Cc: Zhenyu Wang Signed-off-by: Chuanxiao Dong Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) commit f3ad587070d6bd961ab942b3fd7a85d00dfc934b Author: Gilad Ben-Yossef Date: Thu May 18 16:29:25 2017 +0300 crypto: gcm - wait for crypto op not signal safe crypto_gcm_setkey() was using wait_for_completion_interruptible() to wait for completion of async crypto op but if a signal occurs it may return before DMA ops of HW crypto provider finish, thus corrupting the data buffer that is kfree'ed in this case. Resolve this by using wait_for_completion() instead. Reported-by: Eric Biggers Signed-off-by: Gilad Ben-Yossef CC: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/gcm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a5dfefb1c3f3db81662556393fd9283511e08430 Author: Gilad Ben-Yossef Date: Thu May 18 16:29:24 2017 +0300 crypto: drbg - wait for crypto op not signal safe drbg_kcapi_sym_ctr() was using wait_for_completion_interruptible() to wait for completion of async crypto op but if a signal occurs it may return before DMA ops of HW crypto provider finish, thus corrupting the output buffer. Resolve this by using wait_for_completion() instead. Reported-by: Eric Biggers Signed-off-by: Gilad Ben-Yossef CC: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/drbg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e68368aed56324e2e38d4f6b044bb8cf82077fc2 Author: Gilad Ben-Yossef Date: Thu May 18 16:29:23 2017 +0300 crypto: asymmetric_keys - handle EBUSY due to backlog correctly public_key_verify_signature() was passing the CRYPTO_TFM_REQ_MAY_BACKLOG flag to akcipher_request_set_callback() but was not handling correctly the case where a -EBUSY error could be returned from the call to crypto_akcipher_verify() if backlog was used, possibly casuing data corruption due to use-after-free of buffers. Resolve this by handling -EBUSY correctly. Signed-off-by: Gilad Ben-Yossef CC: stable@vger.kernel.org Signed-off-by: Herbert Xu crypto/asymmetric_keys/public_key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fde8e33d106846b081b0e6cd5e283af7146eb7e4 Merge: fadd2ce 9933e11 Author: Linus Torvalds Date: Mon May 22 21:30:20 2017 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "This fixes a regression in the skcipher interface that allows bogus key parameters to hit underlying implementations which can cause crashes" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: skcipher - Add missing API setkey checks commit fadd2ce5a3680fb265694f573cbfb8bcb7d6c9d5 Merge: 74a9e7d c10e803 Author: Linus Torvalds Date: Mon May 22 19:31:07 2017 -0700 Merge tag 'pstore-v4.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore fix from Kees Cook: "Marta noticed another misbehavior in EFI pstore, which this fixes. Hopefully this is the last of the v4.12 fixes for pstore!" * tag 'pstore-v4.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: efi-pstore: Fix write/erase id tracking commit 74a9e7dbbc4a45ee78560f36903f3c3b1f553928 Merge: 801099b e3170cc Author: Linus Torvalds Date: Mon May 22 19:26:33 2017 -0700 Merge tag 'acpi-4.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These revert a 4.11 change that turned out to be problematic and add a .gitignore file. Specifics: - Revert a 4.11 commit related to the ACPI-based handling of laptop lids that made changes incompatible with existing user space stacks and broke things there (Lv Zheng). - Add .gitignore to the ACPI tools directory (Prarit Bhargava)" * tag 'acpi-4.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "ACPI / button: Remove lid_init_state=method mode" tools/power/acpi: Add .gitignore file commit 801099bed082c89fb434671a42c50eccc49f0789 Merge: ad258fb bb47e96 Author: Linus Torvalds Date: Mon May 22 19:24:32 2017 -0700 Merge tag 'pm-4.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix RTC wakeup from suspend-to-idle broken recently, fix CPU idleness detection condition in the schedutil cpufreq governor, fix a cpufreq driver build failure, fix an error code path in the power capping framework, clean up the hibernate core and update the intel_pstate documentation. Specifics: - Fix RTC wakeup from suspend-to-idle broken by the recent rework of ACPI wakeup handling (Rafael Wysocki). - Update intel_pstate driver documentation to reflect the current code and explain how it works in more detail (Rafael Wysocki). - Fix an issue related to CPU idleness detection on systems with shared cpufreq policies in the schedutil governor (Juri Lelli). - Fix a possible build issue in the dbx500 cpufreq driver (Arnd Bergmann). - Fix a function in the power capping framework core to return an error code instead of 0 when there's an error (Dan Carpenter). - Clean up variable definition in the hibernation core (Pushkar Jambhlekar)" * tag 'pm-4.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: dbx500: add a Kconfig symbol PM / hibernate: Declare variables as static PowerCap: Fix an error code in powercap_register_zone() RTC: rtc-cmos: Fix wakeup from suspend-to-idle PM / wakeup: Fix up wakeup_source_report_event() cpufreq: intel_pstate: Document the current behavior and user interface cpufreq: schedutil: use now as reference when aggregating shared policy requests commit ad258fb918dae8b1ec79a85b4c7f518e4f902869 Author: Jan Kiszka Date: Mon May 22 07:46:55 2017 +0200 i2c: designware: Fix bogus sda_hold_time due to uninitialized vars We need to initializes those variables to 0 for platforms that do not provide ACPI parameters. Otherwise, we set sda_hold_time to random values, breaking e.g. Galileo and IOT2000 boards. Reported-and-tested-by: Linus Torvalds Reported-by: Tobias Klausmann Fixes: 9d6408433019 ("i2c: designware: don't infer timings described by ACPI from clock rate") Signed-off-by: Jan Kiszka Reviewed-by: Ard Biesheuvel Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang Signed-off-by: Linus Torvalds drivers/i2c/busses/i2c-designware-platdrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbb22ebcfb9920380ed69854a7095d497798063d Author: Michael Thalmeier Date: Fri May 19 10:32:09 2017 +0200 usb: chipidea: core: check before accessing ci_role in ci_role_show ci_role BUGs when the role is >= CI_ROLE_END. This is the case while the role is changing. Signed-off-by: Michael Thalmeier Signed-off-by: Peter Chen drivers/usb/chipidea/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0340ff83cd4475261e7474033a381bc125b45244 Author: Michael Thalmeier Date: Thu May 18 16:14:14 2017 +0200 usb: chipidea: debug: check before accessing ci_role ci_role BUGs when the role is >= CI_ROLE_END. Cc: stable@vger.kernel.org #v3.10+ Signed-off-by: Michael Thalmeier Signed-off-by: Peter Chen drivers/usb/chipidea/debug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 089b50d95948f691589cca4d81f1f8761747dbaa Author: Maxime Roussin-Bélanger Date: Fri May 19 14:59:03 2017 -0700 Input: atmel_mxt_ts - add T100 as a readable object When using the 'object' sysfs attribute, T100 is not displayed in the output. Signed-off-by: Maxime Roussin-Bélanger Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/atmel_mxt_ts.c | 1 + 1 file changed, 1 insertion(+) commit aa3d4409b664813ceb86a24bd09458cdd29cbb8a Author: Martin Kepplinger Date: Mon May 22 17:19:45 2017 -0700 Input: edt-ft5x06 - increase allowed data range for threshold parameter The datasheet and application note does not mention an allowed range for the M09_REGISTER_THRESHOLD parameter. One of our customers needs to set lower values than 20 and they seem to work just fine on EDT EP0xx0M09 with T5x06 touch. So, lacking a known lower limit, we increase the range for thresholds, and set the lower limit to 0. The documentation is updated accordingly. Signed-off-by: Schoefegger Stefan Signed-off-by: Manfred Schlaegl Signed-off-by: Martin Kepplinger Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt | 2 +- Documentation/input/devices/edt-ft5x06.rst | 2 +- drivers/input/touchscreen/edt-ft5x06.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit c10e8031d5b34cde06b039ca2e8af87a33d5ba11 Author: Kees Cook Date: Thu May 18 13:07:49 2017 -0700 efi-pstore: Fix write/erase id tracking Prior to the pstore interface refactoring, the "id" generated during a backend pstore_write() was only retained by the internal pstore inode tracking list. Additionally the "part" was ignored, so EFI would encode this in the id. This corrects the misunderstandings and correctly sets "id" during pstore_write(), and uses "part" directly during pstore_erase(). Reported-by: Marta Lofstedt Fixes: 76cc9580e3fb ("pstore: Replace arguments for write() API") Fixes: a61072aae693 ("pstore: Replace arguments for erase() API") Signed-off-by: Kees Cook Tested-by: Marta Lofstedt drivers/firmware/efi/efi-pstore.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 8c1e2162f27b319da913683143c0c6c09b083ebb Author: Junaid Shahid Date: Thu May 18 12:00:51 2017 -0700 dm ioctl: restore __GFP_HIGH in copy_params() Commit d224e9381897 ("drivers/md/dm-ioctl.c: use kvmalloc rather than opencoded variant") left out the __GFP_HIGH flag when converting from __vmalloc to kvmalloc. This can cause the DM ioctl to fail in some low memory situations where it wouldn't have failed earlier. Add __GFP_HIGH back to avoid any potential regression. Fixes: d224e9381897 ("drivers/md/dm-ioctl.c: use kvmalloc rather than opencoded variant") Signed-off-by: Junaid Shahid Signed-off-by: Mikulas Patocka Acked-by: David Rientjes Signed-off-by: Mike Snitzer drivers/md/dm-ioctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 415b6185c541dc0a21457ff307cdb61950a6eb9f Author: Lucas Stach Date: Mon May 22 17:06:30 2017 -0500 PCI: imx6: Fix config read timeout handling Commit cc7b0d495589 ("PCI: designware: Update PCI config space remap function") made PCI configuration requests non-posted, which means we now get a synchronous abort when the CFG space read to probe for downstream devices times out. Synchronous aborts need to be handled differently from the async aborts we were getting before, in particular the PC needs to be advanced when resolving the abort. This is mostly a copy of what other PCI drivers do on ARM to handle those aborts. [bhelgaas: changelog, "Fixes"] Fixes: cc7b0d495589 ("PCI: designware: Update PCI config space remap function") Tested-by: Fabio Estevam Tested-by: Peter Senna Tschudin Signed-off-by: Lucas Stach Signed-off-by: Bjorn Helgaas Acked-by: Richard Zhu drivers/pci/dwc/pci-imx6.c | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) commit 9871e9bb5cf6ff0b51457ca74c270c5c5230b224 Author: Logan Gunthorpe Date: Mon May 22 16:52:30 2017 -0500 switchtec: Fix minor bug with partition ID register When a switch endpoint is configured without NTB, the mmio_ntb registers will read all zeros. However, in corner case configurations where the partition ID is not zero and NTB is not enabled, the code will have the wrong partition ID and this causes the driver to use the wrong set of drivers. To fix this we simply take the partition ID from the system info region. Reported-by: Dingbao Chen Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas drivers/pci/switch/switchtec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e40cf640b8f632091a30ef0b030c83546f07c902 Author: Logan Gunthorpe Date: Mon May 22 16:52:24 2017 -0500 switchtec: Use new cdev_device_add() helper function Convert from "cdev_add() + device_add()" to cdev_device_add(), and from "device_del() + cdev_del()" to cdev_device_del(). [bhelgaas: changelog] Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas drivers/pci/switch/switchtec.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit c849e55178f559c4bbed43efb113cb7602aade89 Author: Geert Uytterhoeven Date: Tue May 16 19:21:08 2017 +0200 PCI: endpoint: Make PCI_ENDPOINT depend on HAS_DMA If NO_DMA=y: drivers/built-in.o: In function `__pci_epc_create': (.text+0xef4e): undefined reference to `bad_dma_ops' drivers/built-in.o: In function `pci_epc_add_epf': (.text+0xf676): undefined reference to `bad_dma_ops' drivers/built-in.o: In function `pci_epf_alloc_space': (.text+0xfa32): undefined reference to `bad_dma_ops' drivers/built-in.o: In function `pci_epf_free_space': (.text+0xfac4): undefined reference to `bad_dma_ops' Add a dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven Signed-off-by: Bjorn Helgaas drivers/pci/endpoint/Kconfig | 1 + 1 file changed, 1 insertion(+) commit b4f428ef2844e9fa8154f2faaca249aa74e222a7 Author: Shaohua Li Date: Wed May 17 13:07:27 2017 -0700 blk-throttle: force user to configure all settings for io.low Default value of io.low limit is 0. If user doesn't configure the limit, last patch makes cgroup be throttled to very tiny bps/iops, which could stall the system. A cgroup with default settings of io.low limit really means nothing, so we force user to configure all settings, otherwise io.low limit doesn't take effect. With this stragety, default setting of latency/idle isn't important, so just set them to very conservative and safe value. Signed-off-by: Shaohua Li Acked-by: Tejun Heo Signed-off-by: Jens Axboe block/blk-throttle.c | 80 ++++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 43 deletions(-) commit 9bb67aeb96784527dbc784c7a1b234461299363c Author: Shaohua Li Date: Wed May 17 13:07:26 2017 -0700 blk-throttle: respect 0 bps/iops settings for io.low If a cgroup with low limit 0 for both bps/iops, the cgroup's low limit is ignored and we throttle the cgroup with its max limit. In this way, other cgroups with a low limit will not get protected. To fix this, we don't do the exception any more. cgroup will be throttled to a limit 0 if it uese default setting. To avoid completed stall, we give such cgroup tiny IO resources. Signed-off-by: Shaohua Li Acked-by: Tejun Heo Signed-off-by: Jens Axboe block/blk-throttle.c | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) commit 4cff729f62d1bd433178f1ffe09db5718835e925 Author: Shaohua Li Date: Wed May 17 13:07:25 2017 -0700 blk-throttle: output some debug info in trace These info are important to understand what's happening and help debug. Signed-off-by: Shaohua Li Acked-by: Tejun Heo Signed-off-by: Jens Axboe block/blk-throttle.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 5b81fc3cc625e857275573cb4240bbab553f919c Author: Shaohua Li Date: Wed May 17 13:07:24 2017 -0700 blk-throttle: add hierarchy support for latency target and idle time For idle time, children's setting should not be bigger than parent's. For latency target, children's setting should not be smaller than parent's. The leaf nodes will adjust their settings according to the hierarchy and compare their IO with the settings and do upgrade/downgrade. parents nodes don't need to track their IO latency/idle time. Signed-off-by: Shaohua Li Acked-by: Tejun Heo Signed-off-by: Jens Axboe block/blk-throttle.c | 50 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 14 deletions(-) commit 4d6501dce079c1eb6bf0b1d8f528a5e81770109e Author: Vegard Nossum Date: Tue May 9 09:39:59 2017 +0200 kthread: Fix use-after-free if kthread fork fails If a kthread forks (e.g. usermodehelper since commit 1da5c46fa965) but fails in copy_process() between calling dup_task_struct() and setting p->set_child_tid, then the value of p->set_child_tid will be inherited from the parent and get prematurely freed by free_kthread_struct(). kthread() - worker_thread() - process_one_work() | - call_usermodehelper_exec_work() | - kernel_thread() | - _do_fork() | - copy_process() | - dup_task_struct() | - arch_dup_task_struct() | - tsk->set_child_tid = current->set_child_tid // implied | - ... | - goto bad_fork_* | - ... | - free_task(tsk) | - free_kthread_struct(tsk) | - kfree(tsk->set_child_tid) - ... - schedule() - __schedule() - wq_worker_sleeping() - kthread_data(task)->flags // UAF The problem started showing up with commit 1da5c46fa965 since it reused ->set_child_tid for the kthread worker data. A better long-term solution might be to get rid of the ->set_child_tid abuse. The comment in set_kthread_struct() also looks slightly wrong. Debugged-by: Jamie Iles Fixes: 1da5c46fa965 ("kthread: Make struct kthread kmalloc'ed") Signed-off-by: Vegard Nossum Acked-by: Oleg Nesterov Cc: Peter Zijlstra Cc: Greg Kroah-Hartman Cc: Andy Lutomirski Cc: Frederic Weisbecker Cc: Jamie Iles Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20170509073959.17858-1-vegard.nossum@oracle.com Signed-off-by: Thomas Gleixner kernel/fork.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 04dc1b2fff4e96cb4142227fbdc63c8871ad4ed9 Author: Peter Zijlstra Date: Fri May 19 17:48:50 2017 +0200 futex,rt_mutex: Fix rt_mutex_cleanup_proxy_lock() Markus reported that the glibc/nptl/tst-robustpi8 test was failing after commit: cfafcd117da0 ("futex: Rework futex_lock_pi() to use rt_mutex_*_proxy_lock()") The following trace shows the problem: ld-linux-x86-64-2161 [019] .... 410.760971: SyS_futex: 00007ffbeb76b028: 80000875 op=FUTEX_LOCK_PI ld-linux-x86-64-2161 [019] ...1 410.760972: lock_pi_update_atomic: 00007ffbeb76b028: curval=80000875 uval=80000875 newval=80000875 ret=0 ld-linux-x86-64-2165 [011] .... 410.760978: SyS_futex: 00007ffbeb76b028: 80000875 op=FUTEX_UNLOCK_PI ld-linux-x86-64-2165 [011] d..1 410.760979: do_futex: 00007ffbeb76b028: curval=80000875 uval=80000875 newval=80000871 ret=0 ld-linux-x86-64-2165 [011] .... 410.760980: SyS_futex: 00007ffbeb76b028: 80000871 ret=0000 ld-linux-x86-64-2161 [019] .... 410.760980: SyS_futex: 00007ffbeb76b028: 80000871 ret=ETIMEDOUT Task 2165 does an UNLOCK_PI, assigning the lock to the waiter task 2161 which then returns with -ETIMEDOUT. That wrecks the lock state, because now the owner isn't aware it acquired the lock and removes the pending robust list entry. If 2161 is killed, the robust list will not clear out this futex and the subsequent acquire on this futex will then (correctly) result in -ESRCH which is unexpected by glibc, triggers an internal assertion and dies. Task 2161 Task 2165 rt_mutex_wait_proxy_lock() timeout(); /* T2161 is still queued in the waiter list */ return -ETIMEDOUT; futex_unlock_pi() spin_lock(hb->lock); rtmutex_unlock() remove_rtmutex_waiter(T2161); mark_lock_available(); /* Make the next waiter owner of the user space side */ futex_uval = 2161; spin_unlock(hb->lock); spin_lock(hb->lock); rt_mutex_cleanup_proxy_lock() if (rtmutex_owner() !== current) ... return FAIL; .... return -ETIMEOUT; This means that rt_mutex_cleanup_proxy_lock() needs to call try_to_take_rt_mutex() so it can take over the rtmutex correctly which was assigned by the waker. If the rtmutex is owned by some other task then this call is harmless and just confirmes that the waiter is not able to acquire it. While there, fix what looks like a merge error which resulted in rt_mutex_cleanup_proxy_lock() having two calls to fixup_rt_mutex_waiters() and rt_mutex_wait_proxy_lock() not having any. Both should have one, since both potentially touch the waiter list. Fixes: 38d589f2fd08 ("futex,rt_mutex: Restructure rt_mutex_finish_proxy_lock()") Reported-by: Markus Trippelsdorf Bug-Spotted-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Cc: Florian Weimer Cc: Darren Hart Cc: Sebastian Andrzej Siewior Cc: Markus Trippelsdorf Link: http://lkml.kernel.org/r/20170519154850.mlomgdsd26drq5j6@hirez.programming.kicks-ass.net Signed-off-by: Thomas Gleixner kernel/locking/rtmutex.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 5a4733df7ef255446a213ee84efa5713a9765688 Merge: 0833289 82237f2 Author: Greg Kroah-Hartman Date: Mon May 22 21:53:09 2017 +0200 Merge tag 'iio-fixes-for-4.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First set of IIO fixes in the 4.12 cycle. Matt finally set up the lightning storm he needed to test the as3935. * core - Fix a null pointer deference in iio_trigger_write_current when changing from a non existent trigger to another non existent trigger. * a3935 - Recalibrate the RCO after resume. - Fix interrupt mask so that we actually get some interrupts. - Use iio_trigger_poll_chained as we aren't in interrupt context. * am335x - Fix wrong allocation size provided for private data to iio_device_alloc. * bcm_iproc - Swapped primary and secondary isr handlers. * ltr501 - Fix swapped als/ps register fields when enabling interrupts * max9611 - Wrong scale factor for the shunt_resistor attribute. * sun4-gpadc - Module autoloading fixes by adding the device table declarations. - Fix parent device being used in devm functions. commit 86ca984cef98a499a7c7572376502b745a9ca369 Merge: 0833289 2d76b2f Author: Linus Torvalds Date: Mon May 22 12:42:02 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "Mostly netfilter bug fixes in here, but we have some bits elsewhere as well. 1) Don't do SNAT replies for non-NATed connections in IPVS, from Julian Anastasov. 2) Don't delete conntrack helpers while they are still in use, from Liping Zhang. 3) Fix zero padding in xtables's xt_data_to_user(), from Willem de Bruijn. 4) Add proper RCU protection to nf_tables_dump_set() because we cannot guarantee that we hold the NFNL_SUBSYS_NFTABLES lock. From Liping Zhang. 5) Initialize rcv_mss in tcp_disconnect(), from Wei Wang. 6) smsc95xx devices can't handle IPV6 checksums fully, so don't advertise support for offloading them. From Nisar Sayed. 7) Fix out-of-bounds access in __ip6_append_data(), from Eric Dumazet. 8) Make atl2_probe() propagate the error code properly on failures, from Alexey Khoroshilov. 9) arp_target[] in bond_check_params() is used uninitialized. This got changes from a global static to a local variable, which is how this mistake happened. Fix from Jarod Wilson. 10) Fix fallout from unnecessary NULL check removal in cls_matchall, from Jiri Pirko. This is definitely brown paper bag territory..." * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (26 commits) net: sched: cls_matchall: fix null pointer dereference vsock: use new wait API for vsock_stream_sendmsg() bonding: fix randomly populated arp target array net: Make IP alignment calulations clearer. bonding: fix accounting of active ports in 3ad net: atheros: atl2: don't return zero on failure path in atl2_probe() ipv6: fix out of bound writes in __ip6_append_data() bridge: start hello_timer when enabling KERNEL_STP in br_stp_start smsc95xx: Support only IPv4 TCP/UDP csum offload arp: always override existing neigh entries with gratuitous ARP arp: postpone addr_type calculation to as late as possible arp: decompose is_garp logic into a separate function arp: fixed error in a comment tcp: initialize rcv_mss to TCP_MIN_MSS instead of 0 netfilter: xtables: fix build failure from COMPAT_XT_ALIGN outside CONFIG_COMPAT ebtables: arpreply: Add the standard target sanity check netfilter: nf_tables: revisit chain/object refcounting from elements netfilter: nf_tables: missing sanitization in data from userspace netfilter: nf_tables: can't assume lock is acquired when dumping set elems netfilter: synproxy: fix conntrackd interaction ... commit aace34c0bb8ea3c8bdcec865b6a4be4db0a68e33 Author: Tin Huynh Date: Mon May 22 16:19:20 2017 +0700 leds: pca955x: Correct I2C Functionality The driver checks an incorrect flag of functionality of adapter. When a driver requires i2c_smbus_read_byte_data and i2c_smbus_write_byte_data, it should check I2C_FUNC_SMBUS_BYTE_DATA instead I2C_FUNC_I2C. This patch fixes the problem. Signed-off-by: Tin Huynh Signed-off-by: Jacek Anaszewski drivers/leds/leds-pca955x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cb657bc0242dfdca20869685bf179774ef1a6fb Author: James Smart Date: Mon May 15 17:10:22 2017 -0700 nvme_fc: remove extra controller reference taken on reconnect fix extra controller reference taken on reconnect by moving reference to initial controller create Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e392e1f1f408fe8baf1046c970d05cbf1f0ec945 Author: James Smart Date: Mon May 15 17:10:24 2017 -0700 nvme_fc: correct nvme status set on abort correct nvme status set on abort. Patch that changed status to being actual nvme status crossed in the night with the patch that added abort values. Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 589ff7753bb54edd3ee4a9399ccc3ac48d9b22d7 Author: James Smart Date: Mon May 15 17:10:19 2017 -0700 nvme_fc: set logging level on resets/deletes Per the review by Sagi on: http://lists.infradead.org/pipermail/linux-nvme/2017-April/009261.html Looked at existing warn vs info vs err dev_xxx levels for the messages printed on reconnects and deletes: - Resets due to error and resets transitioned to deletes are dev_warn - Other reset/disconnect messages are dev_info - Removed chatty io queue related messages Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit a5321aa5efea05ae748dc5b3e8053584213325ca Author: James Smart Date: Mon May 15 17:10:18 2017 -0700 nvme_fc: revise comment on teardown Per the recommendation by Sagi on: http://lists.infradead.org/pipermail/linux-nvme/2017-April/009261.html An extra reference was pointed out. There's no issue with the references, but rather a literal interpretation of what the comment is saying. Reword the comment to avoid confusion. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5bbecdbc8e7ffaaf47ac1f02014bf3bedda3fd11 Author: James Smart Date: Mon May 15 17:10:16 2017 -0700 nvme_fc: Support ctrl_loss_tmo Sync with Sagi's recent addition of ctrl_loss_tmo in the core fabrics layer. Remove local connect limits and connect_attempts variable. Use fabrics new nr_connects variable and use of nvmf_should_reconnect() Refactor duplicate reconnect failure code. Addresses review comment by Sagi on controller reset support: http://lists.infradead.org/pipermail/linux-nvme/2017-April/009261.html Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 116 +++++++++++++++++++++---------------------------- 1 file changed, 49 insertions(+), 67 deletions(-) commit 0ce872bf8b5c4d425a41940a523ff1b8daa0b275 Author: James Smart Date: Mon May 15 17:10:15 2017 -0700 nvme_fc: get rid of local reconnect_delay Remove the local copy of reconnect_delay. Use the value in the controller options directly. Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 2d76b2f8b54abd16225cd80afca36ed43f113c41 Author: Jiri Pirko Date: Mon May 22 16:46:13 2017 +0200 net: sched: cls_matchall: fix null pointer dereference Since the head is guaranteed by the check above to be null, the call_rcu would explode. Remove the previously logically dead code that was made logically very much alive and kicking. Fixes: 985538eee06f ("net/sched: remove redundant null check on head") Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_matchall.c | 1 - 1 file changed, 1 deletion(-) commit 7254a50a5db40ca6739ddf37e0a45e6912532b2c Author: Ming Lei Date: Mon May 22 23:05:05 2017 +0800 blk-mq: remove blk_mq_abort_requeue_list() No one uses it any more, so remove it. Reviewed-by: Keith Busch Reviewed-by: Johannes Thumshirn Signed-off-by: Ming Lei Signed-off-by: Christoph Hellwig block/blk-mq.c | 19 ------------------- include/linux/blk-mq.h | 1 - 2 files changed, 20 deletions(-) commit 986f75c876dbafed98eba7cb516c5118f155db23 Author: Ming Lei Date: Mon May 22 23:05:04 2017 +0800 nvme: avoid to use blk_mq_abort_requeue_list() NVMe may add request into requeue list simply and not kick off the requeue if hw queues are stopped. Then blk_mq_abort_requeue_list() is called in both nvme_kill_queues() and nvme_ns_remove() for dealing with this issue. Unfortunately blk_mq_abort_requeue_list() is absolutely a race maker, for example, one request may be requeued during the aborting. So this patch just calls blk_mq_kick_requeue_list() in nvme_kill_queues() to handle this issue like what nvme_start_queues() does. Now all requests in requeue list when queues are stopped will be handled by blk_mq_kick_requeue_list() when queues are restarted, either in nvme_start_queues() or in nvme_kill_queues(). Cc: stable@vger.kernel.org Reported-by: Zhang Yi Reviewed-by: Keith Busch Reviewed-by: Johannes Thumshirn Signed-off-by: Ming Lei Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 806f026f9b901eaf1a6baeb48b5da18d6a4f818e Author: Ming Lei Date: Mon May 22 23:05:03 2017 +0800 nvme: use blk_mq_start_hw_queues() in nvme_kill_queues() Inside nvme_kill_queues(), we have to start hw queues for draining requests in sw queues, .dispatch list and requeue list, so use blk_mq_start_hw_queues() instead of blk_mq_start_stopped_hw_queues() which only run queues if queues are stopped, but the queues may have been started already, for example nvme_start_queues() is called in reset work function. blk_mq_start_hw_queues() run hw queues in current context, instead of running asynchronously like before. Given nvme_kill_queues() is run from either remove context or reset worker context, both are fine to run hw queue directly. And the mutex of namespaces_mutex isn't a problem too becasue nvme_start_freeze() runs hw queue in this way already. Cc: stable@vger.kernel.org Reported-by: Zhang Yi Reviewed-by: Keith Busch Reviewed-by: Johannes Thumshirn Signed-off-by: Ming Lei Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 0544f5494a03b8846db74e02be5685d1f32b06c9 Author: Marta Rybczynska Date: Mon Apr 10 17:12:34 2017 +0200 nvme-rdma: support devices with queue size < 32 In the case of small NVMe-oF queue size (<32) we may enter a deadlock caused by the fact that the IB completions aren't sent waiting for 32 and the send queue will fill up. The error is seen as (using mlx5): [ 2048.693355] mlx5_0:mlx5_ib_post_send:3765:(pid 7273): [ 2048.693360] nvme nvme1: nvme_rdma_post_send failed with error code -12 This patch changes the way the signaling is done so that it depends on the queue depth now. The magic define has been removed completely. Cc: stable@vger.kernel.org Signed-off-by: Marta Rybczynska Signed-off-by: Samuel Jones Acked-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 499fde662f1957e3cb8d192a94a099ebe19c714b Author: WANG Cong Date: Fri May 19 11:21:59 2017 -0700 vsock: use new wait API for vsock_stream_sendmsg() As reported by Michal, vsock_stream_sendmsg() could still sleep at vsock_stream_has_space() after prepare_to_wait(): vsock_stream_has_space vmci_transport_stream_has_space vmci_qpair_produce_free_space qp_lock qp_acquire_queue_mutex mutex_lock Just switch to the new wait API like we did for commit d9dc8b0f8b4e ("net: fix sleeping for sk_wait_event()"). Reported-by: Michal Kubecek Cc: Stefan Hajnoczi Cc: Jorgen Hansen Cc: "Michael S. Tsirkin" Cc: Claudio Imbrenda Signed-off-by: Cong Wang Reviewed-by: Stefan Hajnoczi Signed-off-by: David S. Miller net/vmw_vsock/af_vsock.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 72ccc471e13b8266d2ee2104521df5b92ba08e9c Author: Jarod Wilson Date: Fri May 19 14:46:46 2017 -0400 bonding: fix randomly populated arp target array In commit dc9c4d0fe023, the arp_target array moved from a static global to a local variable. By the nature of static globals, the array used to be initialized to all 0. At present, it's full of random data, which that gets interpreted as arp_target values, when none have actually been specified. Systems end up booting with spew along these lines: [ 32.161783] IPv6: ADDRCONF(NETDEV_UP): lacp0: link is not ready [ 32.168475] IPv6: ADDRCONF(NETDEV_UP): lacp0: link is not ready [ 32.175089] 8021q: adding VLAN 0 to HW filter on device lacp0 [ 32.193091] IPv6: ADDRCONF(NETDEV_UP): lacp0: link is not ready [ 32.204892] lacp0: Setting MII monitoring interval to 100 [ 32.211071] lacp0: Removing ARP target 216.124.228.17 [ 32.216824] lacp0: Removing ARP target 218.160.255.255 [ 32.222646] lacp0: Removing ARP target 185.170.136.184 [ 32.228496] lacp0: invalid ARP target 255.255.255.255 specified for removal [ 32.236294] lacp0: option arp_ip_target: invalid value (-255.255.255.255) [ 32.243987] lacp0: Removing ARP target 56.125.228.17 [ 32.249625] lacp0: Removing ARP target 218.160.255.255 [ 32.255432] lacp0: Removing ARP target 15.157.233.184 [ 32.261165] lacp0: invalid ARP target 255.255.255.255 specified for removal [ 32.268939] lacp0: option arp_ip_target: invalid value (-255.255.255.255) [ 32.276632] lacp0: Removing ARP target 16.0.0.0 [ 32.281755] lacp0: Removing ARP target 218.160.255.255 [ 32.287567] lacp0: Removing ARP target 72.125.228.17 [ 32.293165] lacp0: Removing ARP target 218.160.255.255 [ 32.298970] lacp0: Removing ARP target 8.125.228.17 [ 32.304458] lacp0: Removing ARP target 218.160.255.255 None of these were actually specified as ARP targets, and the driver does seem to clean up the mess okay, but it's rather noisy and confusing, leaks values to userspace, and the 255.255.255.255 spew shows up even when debug prints are disabled. The fix: just zero out arp_target at init time. While we're in here, init arp_all_targets_value in the right place. Fixes: dc9c4d0fe023 ("bonding: reduce scope of some global variables") CC: Mahesh Bandewar CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: netdev@vger.kernel.org CC: stable@vger.kernel.org Signed-off-by: Jarod Wilson Acked-by: Andy Gospodarek Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit bb47e964175e5fb4c163066e4373fac055fe5da0 Merge: 079c181 0bae5fd 216c4e9 Author: Rafael J. Wysocki Date: Mon May 22 20:32:05 2017 +0200 Merge branches 'pm-sleep' and 'powercap' * pm-sleep: PM / hibernate: Declare variables as static RTC: rtc-cmos: Fix wakeup from suspend-to-idle PM / wakeup: Fix up wakeup_source_report_event() * powercap: PowerCap: Fix an error code in powercap_register_zone() commit e3170cc04d7ccf0e644ee3e3263e2df7a7685936 Merge: 0833289 f369fdf bdce57e Author: Rafael J. Wysocki Date: Mon May 22 20:29:06 2017 +0200 Merge branches 'acpi-button' and 'acpi-tools' * acpi-button: Revert "ACPI / button: Remove lid_init_state=method mode" * acpi-tools: tools/power/acpi: Add .gitignore file commit 079c1812a2848539b61351fe4b08902187e19019 Merge: 0833289 33fc30b be0408d d86ab9c Author: Rafael J. Wysocki Date: Mon May 22 20:28:22 2017 +0200 Merge branches 'intel_pstate', 'pm-cpufreq' and 'pm-cpufreq-sched' * intel_pstate: cpufreq: intel_pstate: Document the current behavior and user interface * pm-cpufreq: cpufreq: dbx500: add a Kconfig symbol * pm-cpufreq-sched: cpufreq: schedutil: use now as reference when aggregating shared policy requests commit 702a6204f804bad946c455e7cd8d50d79c9d1629 Author: Mikulas Patocka Date: Sat May 20 14:56:21 2017 -0400 dm integrity: use kvmalloc() instead of dm_integrity_kvmalloc() Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) commit f52236e0b0a0820e938e16a776309e76b7bd6c43 Author: Gilad Ben-Yossef Date: Thu May 18 13:47:25 2017 +0300 dm verity: fix no salt use case DM-Verity has an (undocumented) mode where no salt is used. This was never handled directly by the DM-Verity code, instead working due to the fact that calling crypto_shash_update() with a zero length data is an implicit noop. This is no longer the case now that we have switched to crypto_ahash_update(). Fix the issue by introducing explicit handling of the no salt use case to DM-Verity. Signed-off-by: Gilad Ben-Yossef Reported-by: Marian Csontos Fixes: d1ac3ff ("dm verity: switch to using asynchronous hash crypto API") Tested-by: Milan Broz Signed-off-by: Mike Snitzer drivers/md/dm-verity-target.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4eda884db7930cee434828759064b4711604078 Author: David S. Miller Date: Mon May 22 12:27:07 2017 -0400 net: Make IP alignment calulations clearer. The assignmnet: ip_align = strict ? 2 : NET_IP_ALIGN; in compare_pkt_ptr_alignment() trips up Coverity because we can only get to this code when strict is true, therefore ip_align will always be 2 regardless of NET_IP_ALIGN's value. So just assign directly to '2' and explain the situation in the comment above. Reported-by: "Gustavo A. R. Silva" Signed-off-by: David S. Miller kernel/bpf/verifier.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit f5f968f2371ccdebb8a365487649673c9af68d09 Author: Srinath Mannam Date: Thu May 18 22:27:40 2017 +0530 mmc: sdhci-iproc: suppress spurious interrupt with Multiblock read The stingray SDHCI hardware supports ACMD12 and automatically issues after multi block transfer completed. If ACMD12 in SDHCI is disabled, spurious tx done interrupts are seen on multi block read command with below error message: Got data interrupt 0x00000002 even though no data operation was in progress. This patch uses SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 to enable ACM12 support in SDHCI hardware and suppress spurious interrupt. Signed-off-by: Srinath Mannam Reviewed-by: Ray Jui Reviewed-by: Scott Branden Acked-by: Adrian Hunter Fixes: b580c52d58d9 ("mmc: sdhci-iproc: add IPROC SDHCI driver") Cc: Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-iproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 751da2a69b7cc82d83dc310ed7606225f2d6e014 Author: Jarod Wilson Date: Fri May 19 19:43:45 2017 -0400 bonding: fix accounting of active ports in 3ad As of 7bb11dc9f59d and 0622cab0341c, bond slaves in a 3ad bond are not removed from the aggregator when they are down, and the active slave count is NOT equal to number of ports in the aggregator, but rather the number of ports in the aggregator that are still enabled. The sysfs spew for bonding_show_ad_num_ports() has a comment that says "Show number of active 802.3ad ports.", but it's currently showing total number of ports, both active and inactive. Remedy it by using the same logic introduced in 0622cab0341c in __bond_3ad_get_active_agg_info(), so sysfs, procfs and netlink all report the number of active ports. Note that this means that IFLA_BOND_AD_INFO_NUM_PORTS really means NUM_ACTIVE_PORTS instead of NUM_PORTS, and thus perhaps should be renamed for clarity. Lightly tested on a dual i40e lacp bond, simulating link downs with an ip link set dev down, was able to produce the state where I could see both in the same aggregator, but a number of ports count of 1. MII Status: up Active Aggregator Info: Aggregator ID: 1 Number of ports: 2 <--- Slave Interface: ens10 MII Status: up <--- Aggregator ID: 1 Slave Interface: ens11 MII Status: up Aggregator ID: 1 MII Status: up Active Aggregator Info: Aggregator ID: 1 Number of ports: 1 <--- Slave Interface: ens10 MII Status: down <--- Aggregator ID: 1 Slave Interface: ens11 MII Status: up Aggregator ID: 1 CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller drivers/net/bonding/bond_3ad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd703a1524e851b8d6d646be9dafd794d4eb6045 Author: Alexey Khoroshilov Date: Sat May 20 01:52:11 2017 +0300 net: atheros: atl2: don't return zero on failure path in atl2_probe() If dma mask checks fail in atl2_probe(), it breaks off initialization, deallocates all resources, but returns zero. The patch adds proper error code return value and make error code setup unified. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: David S. Miller drivers/net/ethernet/atheros/atlx/atl2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8fb83b142823cdd1f85f78dcf9e861e9033919f9 Author: Jan Glauber Date: Mon May 22 13:09:21 2017 +0200 mmc: cavium: Fix probing race with regulator If the regulator probing is not yet finished this driver might catch a -EPROBE_DEFER. Returning after this condition did not remove the created platform device. On a repeated call to the probe function the of_platform_device_create fails. Calling of_platform_device_destroy after EPROBE_DEFER resolves this bug. Signed-off-by: Jan Glauber Signed-off-by: Ulf Hansson drivers/mmc/host/cavium-octeon.c | 11 ++++++++++- drivers/mmc/host/cavium-thunderx.c | 6 ++++++ 2 files changed, 16 insertions(+), 1 deletion(-) commit c2372c20425bd75a5527b3e2204059762190f6ca Author: Jan Glauber Date: Mon May 22 13:09:20 2017 +0200 of/platform: Make of_platform_device_destroy globally visible of_platform_device_destroy is the counterpart to of_platform_device_create which is a non-static function. After creating a platform device it might be neccessary to destroy it to deal with -EPROBE_DEFER where a repeated of_platform_device_create call would fail otherwise. Therefore also make of_platform_device_destroy globally visible. Signed-off-by: Jan Glauber Acked-by: Rob Herring Signed-off-by: Ulf Hansson drivers/of/platform.c | 3 ++- include/linux/of_platform.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 9e7b9a25e170722f15ed54f5b963e9867f79195d Author: Jan Glauber Date: Mon May 22 13:09:19 2017 +0200 mmc: cavium: Prevent crash with incomplete DT In case the DT specifies neither a regulator nor a gpio for the shared power the driver will crash accessing the regulator. Prevent the crash by checking the regulator before use. Use mmc_regulator_get_supply() instead of open coding the same logic. Signed-off-by: Jan Glauber Signed-off-by: Ulf Hansson drivers/mmc/host/cavium.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 232cd35d0804cc241eb887bb8d4d9b3b9881c64a Author: Eric Dumazet Date: Fri May 19 14:17:48 2017 -0700 ipv6: fix out of bound writes in __ip6_append_data() Andrey Konovalov and idaifish@gmail.com reported crashes caused by one skb shared_info being overwritten from __ip6_append_data() Andrey program lead to following state : copy -4200 datalen 2000 fraglen 2040 maxfraglen 2040 alloclen 2048 transhdrlen 0 offset 0 fraggap 6200 The skb_copy_and_csum_bits(skb_prev, maxfraglen, data + transhdrlen, fraggap, 0); is overwriting skb->head and skb_shared_info Since we apparently detect this rare condition too late, move the code earlier to even avoid allocating skb and risking crashes. Once again, many thanks to Andrey and syzkaller team. Signed-off-by: Eric Dumazet Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Reported-by: Signed-off-by: David S. Miller net/ipv6/ip6_output.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 664b7c4728821767e0228ee161bab87db2be58f1 Author: Tony Lindgren Date: Fri May 12 08:47:57 2017 -0700 pinctrl: core: Fix warning by removing bogus code Andre Przywara noticed that we can get the following warning with -EPROBE_DEFER: "WARNING: CPU: 1 PID: 89 at drivers/base/dd.c:349 driver_probe_device+0x2ac/0x2e8" Let's fix the issue by removing the indices as suggested by Tejun Heo . All we have to do here is kill the radix tree. I probably ended up with the indices after grepping for removal of all entries using radix_tree_for_each_slot() and the first match found was gmap_radix_tree_free(). Anyways, no need for indices here, and we can just do remove all the entries using radix_tree_for_each_slot() along how the item_kill_tree() test case does. Fixes: c7059c5ac70a ("pinctrl: core: Add generic pinctrl functions for managing groups") Fixes: a76edc89b100 ("pinctrl: core: Add generic pinctrl functions for managing groups") Reported-by: Andre Przywara Signed-off-by: Tony Lindgren Reviewed-by: Andre Przywara Tested-by: Andre Przywara Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 20 +++----------------- drivers/pinctrl/pinmux.c | 21 ++++----------------- 2 files changed, 7 insertions(+), 34 deletions(-) commit a79e7df97592b2326be81d5dae286bdb5c529a01 Author: Takashi Iwai Date: Mon May 22 16:41:24 2017 +0200 ALSA: hda - Update the list of quirk models I've forgotten to sync the documentation with the actually available options for some time. Now all updated. Signed-off-by: Takashi Iwai Documentation/sound/hd-audio/models.rst | 114 ++++++++++++++++++-------------- 1 file changed, 65 insertions(+), 49 deletions(-) commit ba90d6a6b00a84f2a18112145c113e5ef628e561 Author: Takashi Iwai Date: Mon May 22 16:38:47 2017 +0200 ALSA: hda - Provide dual-codecs model option for a few Realtek codecs Recently some laptops and mobos are equipped with the dual Realtek codecs that require special quirks. For making the debugging easier, add the model "dual-codecs" to be passed via module option. Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 3 +++ 1 file changed, 3 insertions(+) commit 63691587f7b0028326ddd1226c378aaaeca4d4e4 Author: Takashi Iwai Date: Mon May 22 16:32:46 2017 +0200 ALSA: hda - Apply dual-codec quirk for MSI Z270-Gaming mobo MSI Z270-Gamin mobo has also two ALC1220 codecs like Gigabyte AZ370- Gaming mobo. Apply the same quirk to this one. Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 5bf185366bfca4ab7730c607f530188e1591a4c0 Author: Sebastian Ott Date: Mon May 15 17:28:34 2017 +0200 s390/vfio_ccw: make some symbols static Make some symbols static to fix sparse warnings like: drivers/s390/cio/vfio_ccw_ops.c:73:1: warning: symbol 'mdev_type_attr_name' was not declared. Should it be static? Signed-off-by: Sebastian Ott Reviewed-by: Dong Jia Shi Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_ops.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 76dd1fbebbaebab294dc09230960238746b883b1 Author: Hans de Goede Date: Mon May 15 09:31:41 2017 +0200 HID: asus: Add support for T100 keyboard The keyboard dock used with the Asus Transformer T100 series, uses the same vendor-defined 0xff31 usage-page as some other Asus keyboards. But with a small twist, it has a small descriptor bug which needs to be fixed up for things to work. This commit adds the USB-ID for this keyboard to the hid-asus driver and makes asus_report_fixup fix the descriptor issue, fixing various special function keys on this keyboard not working. Signed-off-by: Hans de Goede Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-asus.c | 10 ++++++++++ drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 1 + 3 files changed, 12 insertions(+) commit 020e0b1c8f19f1fc3bce23beeccd80c574ca0e49 Author: Anatolij Gustschin Date: Thu May 11 20:24:31 2017 +0200 gpiolib: Add stubs for gpiod lookup table interface Add stubs for gpiod_add_lookup_table() and gpiod_remove_lookup_table() for the !GPIOLIB case to prevent build errors. Signed-off-by: Anatolij Gustschin Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij include/linux/gpio/machine.h | 7 +++++++ 1 file changed, 7 insertions(+) commit b4d2ea2af95cb77e2f320e24da526280d4aa2f6b Author: Linus Walleij Date: Mon May 8 10:48:21 2017 +0200 Revert "pinctrl: generic: Add bi-directional and output-enable" This reverts commit 8c58f1a7a4b6d1d723bf25fef9d842d5a11200d0. It turns out that applying these generic properties was premature: the properties used in the driver using this are of unclear electrical nature and the subject need to be discussed. Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | 2 -- drivers/pinctrl/pinconf-generic.c | 3 --- include/linux/pinctrl/pinconf-generic.h | 3 --- 3 files changed, 8 deletions(-) commit a9de080bbcd5c4e213a3d7bbb1e314d60980e943 Author: Wei Yongjun Date: Tue Apr 25 06:22:05 2017 +0000 pinctrl: cherryview: Add terminate entry for dmi_system_id tables Make sure dmi_system_id tables are NULL terminated. Fixes: 703650278372 ("pinctrl: cherryview: Add a quirk to make Acer Chromebook keyboard work again") Signed-off-by: Wei Yongjun Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-cherryview.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit df563c85de690ec0a1c7e49bd1d43ff743dfb1ce Author: Joel Stanley Date: Tue May 2 15:38:24 2017 +0930 gpio: aspeed: Don't attempt to debounce if disabled We warn the user at driver probe time that debouncing is disabled. However, if they request debouncing later on we print a confusing error message: gpio_aspeed 1e780000.gpio: Failed to convert 5000us to cycles at 0Hz: -524 Instead bail out when the clock is not present. Fixes: 5ae4cb94b3133 (gpio: aspeed: Add debounce support) Signed-off-by: Joel Stanley Signed-off-by: Linus Walleij drivers/gpio/gpio-aspeed.c | 3 +++ 1 file changed, 3 insertions(+) commit e2c824924cdb41528932c550647406ad81336b18 Author: Jan Kiszka Date: Mon May 22 07:46:55 2017 +0200 i2c: designware: Fix bogus sda_hold_time due to uninitialized vars We need to initializes those variables to 0 for platforms that do not provide ACPI parameters. Otherwise, we set sda_hold_time to random values, breaking e.g. Galileo and IOT2000 boards. Fixes: 9d6408433019 ("i2c: designware: don't infer timings described by ACPI from clock rate") Signed-off-by: Jan Kiszka Reviewed-by: Ard Biesheuvel Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-platdrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5165da5923d6c7df6f2927b0113b2e4d9288661e Author: Sebastian Reichel Date: Fri May 5 11:06:50 2017 +0200 i2c: i2c-tiny-usb: fix buffer not being DMA capable Since v4.9 i2c-tiny-usb generates the below call trace and longer works, since it can't communicate with the USB device. The reason is, that since v4.9 the USB stack checks, that the buffer it should transfer is DMA capable. This was a requirement since v2.2 days, but it usually worked nevertheless. [ 17.504959] ------------[ cut here ]------------ [ 17.505488] WARNING: CPU: 0 PID: 93 at drivers/usb/core/hcd.c:1587 usb_hcd_map_urb_for_dma+0x37c/0x570 [ 17.506545] transfer buffer not dma capable [ 17.507022] Modules linked in: [ 17.507370] CPU: 0 PID: 93 Comm: i2cdetect Not tainted 4.11.0-rc8+ #10 [ 17.508103] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 [ 17.509039] Call Trace: [ 17.509320] ? dump_stack+0x5c/0x78 [ 17.509714] ? __warn+0xbe/0xe0 [ 17.510073] ? warn_slowpath_fmt+0x5a/0x80 [ 17.510532] ? nommu_map_sg+0xb0/0xb0 [ 17.510949] ? usb_hcd_map_urb_for_dma+0x37c/0x570 [ 17.511482] ? usb_hcd_submit_urb+0x336/0xab0 [ 17.511976] ? wait_for_completion_timeout+0x12f/0x1a0 [ 17.512549] ? wait_for_completion_timeout+0x65/0x1a0 [ 17.513125] ? usb_start_wait_urb+0x65/0x160 [ 17.513604] ? usb_control_msg+0xdc/0x130 [ 17.514061] ? usb_xfer+0xa4/0x2a0 [ 17.514445] ? __i2c_transfer+0x108/0x3c0 [ 17.514899] ? i2c_transfer+0x57/0xb0 [ 17.515310] ? i2c_smbus_xfer_emulated+0x12f/0x590 [ 17.515851] ? _raw_spin_unlock_irqrestore+0x11/0x20 [ 17.516408] ? i2c_smbus_xfer+0x125/0x330 [ 17.516876] ? i2c_smbus_xfer+0x125/0x330 [ 17.517329] ? i2cdev_ioctl_smbus+0x1c1/0x2b0 [ 17.517824] ? i2cdev_ioctl+0x75/0x1c0 [ 17.518248] ? do_vfs_ioctl+0x9f/0x600 [ 17.518671] ? vfs_write+0x144/0x190 [ 17.519078] ? SyS_ioctl+0x74/0x80 [ 17.519463] ? entry_SYSCALL_64_fastpath+0x1e/0xad [ 17.519959] ---[ end trace d047c04982f5ac50 ]--- Cc: Signed-off-by: Sebastian Reichel Reviewed-by: Greg Kroah-Hartman Acked-by: Till Harbaum Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tiny-usb.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit d4ed3b9015b5eebc90d629579d9e7944607cbae5 Author: Colin Ian King Date: Thu May 4 13:11:00 2017 +0100 mtd: nand: make nand_ooblayout_lp_hamming_ops static nand_ooblayout_lp_hamming_ops can be made static as it does not need to be in global scope. Signed-off-by: Colin Ian King Acked-by: Boris Brezillon Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60cf0ce14b09b54e7ee79dc3ef498de6ef0e41e9 Author: Marc Gonzalez Date: Fri May 12 17:34:01 2017 +0200 mtd: nand: tango: Update ecc_stats.corrected According to Boris, some user-space tools expect MTD drivers to update ecc_stats.corrected, and it's better to provide a lower bound than to provide no information at all. Fixes: 6956e2385a16 ("mtd: nand: add tango NAND flash controller support") Cc: stable@vger.kernel.org Reported-by: Pavel Machek Signed-off-by: Marc Gonzalez Signed-off-by: Boris Brezillon drivers/mtd/nand/tango_nand.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 2761b4f12b017f6d3e5add386733a700a490df47 Author: Andres Galacho Date: Mon May 1 16:30:15 2017 -0400 mtd: nand: tango: Export OF device ID table as module aliases The device table is required to load modules based on modaliases. After adding MODULE_DEVICE_TABLE, below entries for example will be added to module.alias: alias: of:N*T*Csigma,smp8758-nandC* alias: of:N*T*Csigma,smp8758-nand Fixes: 6956e2385a16 ("mtd: nand: add tango NAND flash controller support") Cc: stable@vger.kernel.org Signed-off-by: Andres Galacho Acked-by: Brian Norris Signed-off-by: Boris Brezillon drivers/mtd/nand/tango_nand.c | 1 + 1 file changed, 1 insertion(+) commit d24197907454b902908e025bce4b8bc677d3ba6b Author: Brian Norris Date: Mon May 1 17:04:55 2017 -0700 mtd: nand: samsung: warn about un-parseable ECC info We don't handle cases larger than 7. We probably shouldn't pretend we know the ECC step size in this case, and it's probably also good to WARN() like we do in many other similar cases. Fixes: 8fc82d456e40 ("mtd: nand: samsung: Retrieve ECC requirements from extended ID") Signed-off-by: Brian Norris Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_samsung.c | 3 +++ 1 file changed, 3 insertions(+) commit 787710492911e21148975e1d1914c7409fb32c7e Author: Brian Norris Date: Mon May 1 17:04:53 2017 -0700 mtd: nand: free vendor-specific resources in init failure paths If we fail any time after calling nand_detect(), then we don't call the vendor-specific ->cleanup() callback, and we'll leak any resources the vendor-specific code might have allocated. Mark the "fix" against the first commit that started allocating anything in ->init(). Fixes: 626994e07480 ("mtd: nand: hynix: Add read-retry support for 1x nm MLC NANDs") Signed-off-by: Brian Norris Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) commit 0545c1720277dd246bd682b23aee425f3830a14f Author: Brian Norris Date: Mon May 1 17:04:52 2017 -0700 mtd: nand: drop unneeded module.h include nand_ids isn't a separate module anymore and doesn't need this header. Signed-off-by: Brian Norris Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_ids.c | 1 - 1 file changed, 1 deletion(-) commit 44d4182e23c555cbfa8b8a0ad2d94664d23850d3 Author: Brian Norris Date: Mon May 1 17:04:50 2017 -0700 mtd: nand: don't leak buffers when ->scan_bbt() fails This bug seems to have been here forever, although we came close to fixing all of them in [1]! [1] 11eaf6df1cce ("mtd: nand: Remove BUG() abuse in nand_scan_tail") Signed-off-by: Brian Norris Acked-by: Ezequiel Garcia Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 014580ffab654bb83256783a2b185cf6c06dffaa Author: YYS Date: Tue Mar 21 16:27:03 2017 +0800 drm/mediatek: fix mtk_hdmi_setup_vendor_specific_infoframe mistake mtk_hdmi_setup_vendor_specific_infoframe will return before handle mtk_hdmi_hw_send_info_frame.Because hdmi_vendor_infoframe_pack returns the number of bytes packed into the binary buffer or a negative error code on failure. So correct it. Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support") Signed-off-by: Nickey Yang Signed-off-by: CK Hu drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f752413e26bdc9f73a8a12e280770646555c82fc Author: Dan Carpenter Date: Fri Apr 21 13:51:43 2017 +0300 drm/mediatek: fix a timeout loop This code causes a static checker warning because it treats "i == 0" as a timeout but, because it's a post-op, the loop actually ends with "i" set to -1. Philipp Zabel points out that it would be cleaner to use readl_poll_timeout() instead. Fixes: 21898816831f ("drm/mediatek: add dsi transfer function") Signed-off-by: Dan Carpenter Signed-off-by: CK Hu Reviewed-by: Philipp Zabel drivers/gpu/drm/mediatek/mtk_dsi.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit e480eabae232b92ff44ce63678280373713920a4 Author: Lukas Wunner Date: Thu May 18 21:33:44 2017 +0200 drm/radeon: Fix oops upon driver load on PowerXpress laptops Nicolai Stange reports the following oops which is caused by dereferencing rdev->pdev before it's subsequently set by radeon_device_init(). Fix it. BUG: unable to handle kernel NULL pointer dereference at 00000000000007cb IP: radeon_driver_load_kms+0xeb/0x230 [radeon] ... Call Trace: drm_dev_register+0x146/0x1d0 [drm] drm_get_pci_dev+0x9a/0x180 [drm] radeon_pci_probe+0xb8/0xe0 [radeon] local_pci_probe+0x45/0xa0 pci_device_probe+0x14f/0x1a0 driver_probe_device+0x29c/0x450 __driver_attach+0xdf/0xf0 ? driver_probe_device+0x450/0x450 bus_for_each_dev+0x6c/0xc0 driver_attach+0x1e/0x20 bus_add_driver+0x170/0x270 driver_register+0x60/0xe0 ? 0xffffffffc0508000 __pci_register_driver+0x4c/0x50 drm_pci_init+0xeb/0x100 [drm] ? vga_switcheroo_register_handler+0x6a/0x90 ? 0xffffffffc0508000 radeon_init+0x98/0xb6 [radeon] do_one_initcall+0x52/0x1a0 ? __vunmap+0x81/0xb0 ? kmem_cache_alloc_trace+0x159/0x1b0 ? do_init_module+0x27/0x1f8 do_init_module+0x5f/0x1f8 load_module+0x27ce/0x2be0 SYSC_finit_module+0xdf/0x110 ? SYSC_finit_module+0xdf/0x110 SyS_finit_module+0xe/0x10 do_syscall_64+0x67/0x150 entry_SYSCALL64_slow_path+0x25/0x25 Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt eGPU with vga_switcheroo") Reported-and-tested-by: Nicolai Stange Signed-off-by: Lukas Wunner Link: http://patchwork.freedesktop.org/patch/msgid/cfb91ba052af06117137eec0637543a2626a7979.1495135190.git.lukas@wunner.de drivers/gpu/drm/radeon/radeon_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2dffdc0724004f38f5e39907747b53e4b0d80e59 Author: Guoqing Jiang Date: Tue May 16 14:01:25 2017 +0800 md-cluster: fix potential lock issue in add_new_disk The add_new_disk returns with communication locked if __sendmsg returns failure, fix it with call unlock_comm before return. Reported-by: Dan Carpenter CC: Goldwyn Rodrigues Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md-cluster.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 887a9730614727c4fff7cb756711b190593fc1df Author: Konstantin Khlebnikov Date: Sun May 21 22:36:23 2017 -0400 ext4: keep existing extra fields when inode expands ext4_expand_extra_isize() should clear only space between old and new size. Fixes: 6dd4ee7cab7e # v2.6.23 Cc: stable@vger.kernel.org Signed-off-by: Konstantin Khlebnikov Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9651e6b2e20648d04d5e1fe6479a3056047e8781 Author: Konstantin Khlebnikov Date: Sun May 21 22:35:23 2017 -0400 ext4: handle the rest of ext4_mb_load_buddy() ENOMEM errors I've got another report about breaking ext4 by ENOMEM error returned from ext4_mb_load_buddy() caused by memory shortage in memory cgroup. This time inside ext4_discard_preallocations(). This patch replaces ext4_error() with ext4_warning() where errors returned from ext4_mb_load_buddy() are not fatal and handled by caller: * ext4_mb_discard_group_preallocations() - called before generating ENOSPC, we'll try to discard other group or return ENOSPC into user-space. * ext4_trim_all_free() - just stop trimming and return ENOMEM from ioctl. Some callers cannot handle errors, thus __GFP_NOFAIL is used for them: * ext4_discard_preallocations() * ext4_mb_discard_lg_preallocations() Fixes: adb7ef600cc9 ("ext4: use __GFP_NOFAIL in ext4_free_blocks()") Signed-off-by: Konstantin Khlebnikov Signed-off-by: Theodore Ts'o fs/ext4/mballoc.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 3f1d5bad3fae983da07be01cff2fde13293bb7b9 Author: Jan Kara Date: Sun May 21 22:34:23 2017 -0400 ext4: fix off-by-in in loop termination in ext4_find_unwritten_pgoff() There is an off-by-one error in loop termination conditions in ext4_find_unwritten_pgoff() since 'end' may index a page beyond end of desired range if 'endoff' is page aligned. It doesn't have any visible effects but still it is good to fix it. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d95eddf313c88b24f99d4ca9c2411a4b82fef33 Author: Jan Kara Date: Sun May 21 22:33:23 2017 -0400 ext4: fix SEEK_HOLE Currently, SEEK_HOLE implementation in ext4 may both return that there's a hole at some offset although that offset already has data and skip some holes during a search for the next hole. The first problem is demostrated by: xfs_io -c "falloc 0 256k" -c "pwrite 0 56k" -c "seek -h 0" file wrote 57344/57344 bytes at offset 0 56 KiB, 14 ops; 0.0000 sec (2.054 GiB/sec and 538461.5385 ops/sec) Whence Result HOLE 0 Where we can see that SEEK_HOLE wrongly returned offset 0 as containing a hole although we have written data there. The second problem can be demonstrated by: xfs_io -c "falloc 0 256k" -c "pwrite 0 56k" -c "pwrite 128k 8k" -c "seek -h 0" file wrote 57344/57344 bytes at offset 0 56 KiB, 14 ops; 0.0000 sec (1.978 GiB/sec and 518518.5185 ops/sec) wrote 8192/8192 bytes at offset 131072 8 KiB, 2 ops; 0.0000 sec (2 GiB/sec and 500000.0000 ops/sec) Whence Result HOLE 139264 Where we can see that hole at offsets 56k..128k has been ignored by the SEEK_HOLE call. The underlying problem is in the ext4_find_unwritten_pgoff() which is just buggy. In some cases it fails to update returned offset when it finds a hole (when no pages are found or when the first found page has higher index than expected), in some cases conditions for detecting hole are just missing (we fail to detect a situation where indices of returned pages are not contiguous). Fix ext4_find_unwritten_pgoff() to properly detect non-contiguous page indices and also handle all cases where we got less pages then expected in one place and handle it properly there. CC: stable@vger.kernel.org Fixes: c8c0df241cc2719b1262e627f999638411934f60 CC: Zheng Liu Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/file.c | 50 ++++++++++++++------------------------------------ 1 file changed, 14 insertions(+), 36 deletions(-) commit b4709067ac0944e4a5b94eabdc26155c6f2efbd7 Author: Tahsin Erdogan Date: Sun May 21 22:32:23 2017 -0400 jbd2: preserve original nofs flag during journal restart When a transaction starts, start_this_handle() saves current PF_MEMALLOC_NOFS value so that it can be restored at journal stop time. Journal restart is a special case that calls start_this_handle() without stopping the transaction. start_this_handle() isn't aware that the original value is already stored so it overwrites it with current value. For instance, a call sequence like below leaves PF_MEMALLOC_NOFS flag set at the end: jbd2_journal_start() jbd2__journal_restart() jbd2_journal_stop() Make jbd2__journal_restart() restore the original value before calling start_this_handle(). Fixes: 81378da64de6 ("jbd2: mark the transaction context with the scope GFP_NOFS context") Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/jbd2/transaction.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 964edf66bf9ab70cb387b27946c0aef7b94c4d1b Author: Jan Kara Date: Sun May 21 22:31:23 2017 -0400 ext4: clear lockdep subtype for quota files on quota off Quota files have special ranking of i_data_sem lock. We inform lockdep about it when turning on quotas however when turning quotas off, we don't clear the lockdep subclass from i_data_sem lock and thus when the inode gets later reused for a normal file or directory, lockdep gets confused and complains about possible deadlocks. Fix the problem by resetting lockdep subclass of i_data_sem on quota off. Cc: stable@vger.kernel.org Fixes: daf647d2dd58cec59570d7698a45b98e580f2076 Reported-and-tested-by: Ross Zwisler Reviewed-by: Andreas Dilger Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/super.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 08332893e37af6ae779367e78e444f8f9571511d Author: Linus Torvalds Date: Sun May 21 19:30:23 2017 -0700 Linux 4.12-rc2 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33c9e9729033387ef0521324c62e7eba529294af Author: Linus Torvalds Date: Sun May 21 18:26:54 2017 -0700 x86: fix 32-bit case of __get_user_asm_u64() The code to fetch a 64-bit value from user space was entirely buggered, and has been since the code was merged in early 2016 in commit b2f680380ddf ("x86/mm/32: Add support for 64-bit __get_user() on 32-bit kernels"). Happily the buggered routine is almost certainly entirely unused, since the normal way to access user space memory is just with the non-inlined "get_user()", and the inlined version didn't even historically exist. The normal "get_user()" case is handled by external hand-written asm in arch/x86/lib/getuser.S that doesn't have either of these issues. There were two independent bugs in __get_user_asm_u64(): - it still did the STAC/CLAC user space access marking, even though that is now done by the wrapper macros, see commit 11f1a4b9755f ("x86: reorganize SMAP handling in user space accesses"). This didn't result in a semantic error, it just means that the inlined optimized version was hugely less efficient than the allegedly slower standard version, since the CLAC/STAC overhead is quite high on modern Intel CPU's. - the double register %eax/%edx was marked as an output, but the %eax part of it was touched early in the asm, and could thus clobber other inputs to the asm that gcc didn't expect it to touch. In particular, that meant that the generated code could look like this: mov (%eax),%eax mov 0x4(%eax),%edx where the load of %edx obviously was _supposed_ to be from the 32-bit word that followed the source of %eax, but because %eax was overwritten by the first instruction, the source of %edx was basically random garbage. The fixes are trivial: remove the extraneous STAC/CLAC entries, and mark the 64-bit output as early-clobber to let gcc know that no inputs should alias with the output register. Cc: Al Viro Cc: Benjamin LaHaise Cc: Ingo Molnar Cc: stable@kernel.org # v4.8+ Signed-off-by: Linus Torvalds arch/x86/include/asm/uaccess.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 334a023ee50997b45ffb8fbcc8bc875519040aac Author: Linus Torvalds Date: Sun May 21 15:25:46 2017 -0700 Clean up x86 unsafe_get/put_user() type handling Al noticed that unsafe_put_user() had type problems, and fixed them in commit a7cc722fff0b ("fix unsafe_put_user()"), which made me look more at those functions. It turns out that unsafe_get_user() had a type issue too: it limited the largest size of the type it could handle to "unsigned long". Which is fine with the current users, but doesn't match our existing normal get_user() semantics, which can also handle "u64" even when that does not fit in a long. While at it, also clean up the type cast in unsafe_put_user(). We actually want to just make it an assignment to the expected type of the pointer, because we actually do want warnings from types that don't convert silently. And it makes the code more readable by not having that one very long and complex line. [ This patch might become stable material if we ever end up back-porting any new users of the unsafe uaccess code, but as things stand now this doesn't matter for any current existing uses. ] Cc: Al Viro Signed-off-by: Linus Torvalds arch/x86/include/asm/uaccess.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fc08a4703a418a398bbb575ac311d36d110ac786 Author: Vishal Verma Date: Fri May 19 11:39:10 2017 +0200 acpi, nfit: Fix the memory error check in nfit_handle_mce() The check for an MCE being a memory error in the NFIT mce handler was bogus. Use the new mce_is_memory_error() helper to detect the error properly. Reported-by: Tony Luck Signed-off-by: Vishal Verma Signed-off-by: Borislav Petkov Cc: Link: http://lkml.kernel.org/r/20170519093915.15413-3-bp@alien8.de Signed-off-by: Thomas Gleixner drivers/acpi/nfit/mce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d1f406139ec20320bf38bcd2461aa8e358084b5 Author: Borislav Petkov Date: Fri May 19 11:39:09 2017 +0200 x86/MCE: Export memory_error() Export the function which checks whether an MCE is a memory error to other users so that we can reuse the logic. Drop the boot_cpu_data use, while at it, as mce.cpuvendor already has the CPU vendor in there. Integrate a piece from a patch from Vishal Verma to export it for modules (nfit). The main reason we're exporting it is that the nfit handler nfit_handle_mce() needs to detect a memory error properly before doing its recovery actions. Signed-off-by: Borislav Petkov Cc: Tony Luck Cc: Vishal Verma Cc: Link: http://lkml.kernel.org/r/20170519093915.15413-2-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/include/asm/mce.h | 1 + arch/x86/kernel/cpu/mcheck/mce.c | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) commit f3926e4c2a4b53c25a998de168d4eef6d0360369 Merge: 970c305 a8c3954 Author: Linus Torvalds Date: Sun May 21 12:06:44 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc uaccess fixes from Al Viro: "Fix for unsafe_put_user() (no callers currently in mainline, but anyone starting to use it will step into that) + alpha osf_wait4() infoleak fix" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: osf_wait4(): fix infoleak fix unsafe_put_user() commit 970c305aa802346aaa741ab241f6f3f63d623cc0 Merge: e7a3d62 8663eff Author: Linus Torvalds Date: Sun May 21 11:52:00 2017 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Thomas Gleixner: "A single scheduler fix: Prevent idle task from ever being preempted. That makes sure that synchronize_rcu_tasks() which is ignoring idle task does not pretend that no task is stuck in preempted state. If that happens and idle was preempted on a ftrace trampoline the machine crashes due to inconsistent state" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Call __schedule() from do_idle() without enabling preemption commit e7a3d62749183576854cdc961b8b1cddf1aed71e Merge: 56f410c 2c4569c Author: Linus Torvalds Date: Sun May 21 11:45:26 2017 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "A set of small fixes for the irq subsystem: - Cure a data ordering problem with chained interrupts - Three small fixlets for the mbigen irq chip" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Fix chained interrupt data ordering irqchip/mbigen: Fix the clear register offset calculation irqchip/mbigen: Fix potential NULL dereferencing irqchip/mbigen: Fix memory mapping code commit 6d18c732b95c0a9d35e9f978b4438bba15412284 Author: Xin Long Date: Fri May 19 22:20:29 2017 +0800 bridge: start hello_timer when enabling KERNEL_STP in br_stp_start Since commit 76b91c32dd86 ("bridge: stp: when using userspace stp stop kernel hello and hold timers"), bridge would not start hello_timer if stp_enabled is not KERNEL_STP when br_dev_open. The problem is even if users set stp_enabled with KERNEL_STP later, the timer will still not be started. It causes that KERNEL_STP can not really work. Users have to re-ifup the bridge to avoid this. This patch is to fix it by starting br->hello_timer when enabling KERNEL_STP in br_stp_start. As an improvement, it's also to start hello_timer again only when br->stp_enabled is KERNEL_STP in br_hello_timer_expired, there is no reason to start the timer again when it's NO_STP. Fixes: 76b91c32dd86 ("bridge: stp: when using userspace stp stop kernel hello and hold timers") Reported-by: Haidong Li Signed-off-by: Xin Long Acked-by: Nikolay Aleksandrov Reviewed-by: Ivan Vecera Signed-off-by: David S. Miller net/bridge/br_stp_if.c | 1 + net/bridge/br_stp_timer.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit fe0cd8ca1b82983db24b173bb8518ea646c02d25 Author: Nisar Sayed Date: Fri May 19 14:00:25 2017 +0000 smsc95xx: Support only IPv4 TCP/UDP csum offload When TX checksum offload is used, if the computed checksum is 0 the LAN95xx device do not alter the checksum to 0xffff. In the case of ipv4 UDP checksum, it indicates to receiver that no checksum is calculated. Under ipv6, UDP checksum yields a result of zero must be changed to 0xffff. Hence disabling checksum offload for ipv6 packets. Signed-off-by: Nisar Sayed Reported-by: popcorn mix Signed-off-by: David S. Miller drivers/net/usb/smsc95xx.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 776ee323ddf1167435f2cae0d7f8a6955383b5aa Merge: 499350a 7d472a5 Author: David S. Miller Date: Sun May 21 13:26:46 2017 -0400 Merge branch 'arp-always-override-existing-neigh-entries-with-gratuitous-ARP' Ihar Hrachyshka says: ==================== arp: always override existing neigh entries with gratuitous ARP This patchset is spurred by discussion started at https://patchwork.ozlabs.org/patch/760372/ where we figured that there is no real reason for enforcing override by gratuitous ARP packets only when arp_accept is 1. Same should happen when it's 0 (the default value). changelog v2: handled review comments by Julian Anastasov - fixed a mistake in a comment; - postponed addr_type calculation to as late as possible. ==================== Signed-off-by: David S. Miller commit 7d472a59c0e5ec117220a05de6b370447fb6cb66 Author: Ihar Hrachyshka Date: Thu May 18 12:41:21 2017 -0700 arp: always override existing neigh entries with gratuitous ARP Currently, when arp_accept is 1, we always override existing neigh entries with incoming gratuitous ARP replies. Otherwise, we override them only if new replies satisfy _locktime_ conditional (packets arrive not earlier than _locktime_ seconds since the last update to the neigh entry). The idea behind locktime is to pick the very first (=> close) reply received in a unicast burst when ARP proxies are used. This helps to avoid ARP thrashing where Linux would switch back and forth from one proxy to another. This logic has nothing to do with gratuitous ARP replies that are generally not aligned in time when multiple IP address carriers send them into network. This patch enforces overriding of existing neigh entries by all incoming gratuitous ARP packets, irrespective of their time of arrival. This will make the kernel honour all incoming gratuitous ARP packets. Signed-off-by: Ihar Hrachyshka Signed-off-by: David S. Miller net/ipv4/arp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit d9ef2e7bf99f59179b89d5c1c4d5b4919375daee Author: Ihar Hrachyshka Date: Thu May 18 12:41:20 2017 -0700 arp: postpone addr_type calculation to as late as possible The addr_type retrieval can be costly, so it's worth trying to avoid its calculation as much as possible. This patch makes it calculated only for gratuitous ARP packets. This is especially important since later we may want to move is_garp calculation outside of arp_accept block, at which point the costly operation will be executed for all setups. The patch is the result of a discussion in net-dev: http://marc.info/?l=linux-netdev&m=149506354216994 Suggested-by: Julian Anastasov Signed-off-by: Ihar Hrachyshka Signed-off-by: David S. Miller net/ipv4/arp.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit 6fd05633bdafc0ae6ec0d55e61af10780d4d3530 Author: Ihar Hrachyshka Date: Thu May 18 12:41:19 2017 -0700 arp: decompose is_garp logic into a separate function The code is quite involving already to earn a separate function for itself. If anything, it helps arp_process readability. Signed-off-by: Ihar Hrachyshka Signed-off-by: David S. Miller net/ipv4/arp.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) commit 34eb5fe07831458cf8238d54c1fc847dedeaf68c Author: Ihar Hrachyshka Date: Thu May 18 12:41:18 2017 -0700 arp: fixed error in a comment the is_garp code deals just with gratuitous ARP packets, not every unsolicited packet. This patch is a result of a discussion in netdev: http://marc.info/?l=linux-netdev&m=149506354216994 Suggested-by: Julian Anastasov Signed-off-by: Ihar Hrachyshka Signed-off-by: David S. Miller net/ipv4/arp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 499350a5a6e7512d9ed369ed63a4244b6536f4f8 Author: Wei Wang Date: Thu May 18 11:22:33 2017 -0700 tcp: initialize rcv_mss to TCP_MIN_MSS instead of 0 When tcp_disconnect() is called, inet_csk_delack_init() sets icsk->icsk_ack.rcv_mss to 0. This could potentially cause tcp_recvmsg() => tcp_cleanup_rbuf() => __tcp_select_window() call path to have division by 0 issue. So this patch initializes rcv_mss to TCP_MIN_MSS instead of 0. Reported-by: Andrey Konovalov Signed-off-by: Wei Wang Signed-off-by: Eric Dumazet Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/tcp.c | 4 ++++ 1 file changed, 4 insertions(+) commit a8c39544a6eb2093c04afd5005b6192bd0e880c6 Author: Al Viro Date: Sun May 14 21:47:25 2017 -0400 osf_wait4(): fix infoleak failing sys_wait4() won't fill struct rusage... Cc: stable@vger.kernel.org Signed-off-by: Al Viro arch/alpha/kernel/osf_sys.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a7cc722fff0b32bcd28bf4722dff816b0b695f7d Author: Al Viro Date: Sun May 21 13:08:42 2017 -0400 fix unsafe_put_user() __put_user_size() relies upon its first argument having the same type as what the second one points to; the only other user makes sure of that and unsafe_put_user() should do the same. Signed-off-by: Al Viro arch/x86/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23416e230416a9201561f1db553b1515e9959f6a Merge: 8b4822d 751a9c7 Author: David S. Miller Date: Sun May 21 13:00:02 2017 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter/IPVS fixes for net The following patchset contains Netfilter/IPVS fixes for your net tree, they are: 1) When using IPVS in direct-routing mode, normal traffic from the LVS host to a back-end server is sometimes incorrectly NATed on the way back into the LVS host. Patch to fix this from Julian Anastasov. 2) Calm down clang compilation warning in ctnetlink due to type mismatch, from Matthias Kaehlcke. 3) Do not re-setup NAT for conntracks that are already confirmed, this is fixing a problem that was introduced in the previous nf-next batch. Patch from Liping Zhang. 4) Do not allow conntrack helper removal from userspace cthelper infrastructure if already in used. This comes with an initial patch to introduce nf_conntrack_helper_put() that is required by this fix. From Liping Zhang. 5) Zero the pad when copying data to userspace, otherwise iptables fails to remove rules. This is a follow up on the patchset that sorts out the internal match/target structure pointer leak to userspace. Patch from the same author, Willem de Bruijn. This also comes with a build failure when CONFIG_COMPAT is not on, coming in the last patch of this series. 6) SYNPROXY crashes with conntrack entries that are created via ctnetlink, more specifically via conntrackd state sync. Patch from Eric Leblond. 7) RCU safe iteration on set element dumping in nf_tables, from Liping Zhang. 8) Missing sanitization of immediate date for the bitwise and cmp expressions in nf_tables. 9) Refcounting logic for chain and objects from set elements does not integrate into the nf_tables 2-phase commit protocol. 10) Missing sanitization of target verdict in ebtables arpreply target, from Gao Feng. ==================== Signed-off-by: David S. Miller commit 82237f268281d338aa35cd014be8ffb0b5445482 Author: Quentin Schulz Date: Thu May 18 08:36:07 2017 +0200 iio: adc: sun4i-gpadc-iio: fix parent device being used in devm function For the sake of DT binding stability, this IIO driver is a child of an MFD driver for Allwinner A10, A13 and A31 because there already exists a DT binding for this IP. The MFD driver has a DT node but the IIO driver does not. The IIO device registers the temperature sensor in the thermal framework using the DT node of the parent, the MFD device, so the thermal framework could match the phandle to the MFD device in the DT and the struct device used to register in the thermal framework. devm_thermal_zone_of_sensor_register was previously used to register the thermal sensor with the parent struct device of the IIO device, representing the MFD device. By doing so, we registered actually the parent in the devm routine and not the actual IIO device. This lead to the devm unregister function not being called when the IIO module driver is removed. It resulted in the thermal framework still polling the get_temp function of the IIO module while the device doesn't exist anymore, thus generated a kernel panic. Use the non-devm function instead and do the unregister manually in the remove function. Fixes: d1caa9905538 ("iio: adc: add support for Allwinner SoCs ADC") Signed-off-by: Quentin Schulz Reported-by: Corentin Labbe Reviewed-by: Maxime Ripard Signed-off-by: Jonathan Cameron drivers/iio/adc/sun4i-gpadc-iio.c | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) commit 7cc3bff4efe6164a0c8163331c8aa55454799f42 Author: Franziska Naepelt Date: Wed May 17 12:41:19 2017 +0200 iio: light: ltr501 Fix interchanged als/ps register field The register mapping for the IIO driver for the Liteon Light and Proximity sensor LTR501 interrupt mode is interchanged (ALS/PS). There is a register called INTERRUPT register (address 0x8F) Bit 0 represents PS measurement trigger. Bit 1 represents ALS measurement trigger. This two bit fields are interchanged within the driver. see datasheet page 24: http://optoelectronics.liteon.com/upload/download/DS86-2012-0006/S_110_LTR-501ALS-01_PrelimDS_ver1%5B1%5D.pdf Signed-off-by: Franziska Naepelt Fixes: 7ac702b3144b6 ("iio: ltr501: Add interrupt support") Acked-by: Peter Meerwald-Stadler Cc: Signed-off-by: Jonathan Cameron drivers/iio/light/ltr501.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f7d86ecf83cb66d3c4c6ac4edb1dd50c0919aa2b Author: Raveendra Padasalagi Date: Tue May 16 12:22:42 2017 +0530 iio: adc: bcm_iproc_adc: swap primary and secondary isr handler's The third argument of devm_request_threaded_irq() is the primary handler. It is called in hardirq context and checks whether the interrupt is relevant to the device. If the primary handler returns IRQ_WAKE_THREAD, the secondary handler (a.k.a. handler thread) is scheduled to run in process context. bcm_iproc_adc.c uses the secondary handler as the primary one and the other way around. So this patch fixes the same, along with re-naming the secondary handler and primary handler names properly. Tested on the BCM9583XX iProc SoC based boards. Fixes: 4324c97ecedc ("iio: Add driver for Broadcom iproc-static-adc") Reported-by: Pavel Roskin Signed-off-by: Raveendra Padasalagi Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron drivers/iio/adc/bcm_iproc_adc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4eecbe81885180c9f6217ecfd679b1f285967218 Author: Marcin Niestroj Date: Thu May 18 09:12:06 2017 +0200 iio: trigger: fix NULL pointer dereference in iio_trigger_write_current() In case oldtrig == trig == NULL (which happens when we set none trigger, when there is already none set) there is a NULL pointer dereference during iio_trigger_put(trig). Below is kernel output when this occurs: [ 26.741790] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 26.750179] pgd = cacc0000 [ 26.752936] [00000000] *pgd=8adc6835, *pte=00000000, *ppte=00000000 [ 26.759531] Internal error: Oops: 17 [#1] SMP ARM [ 26.764261] Modules linked in: usb_f_ncm u_ether usb_f_acm u_serial usb_f_fs libcomposite configfs evbug [ 26.773844] CPU: 0 PID: 152 Comm: synchro Not tainted 4.12.0-rc1 #2 [ 26.780128] Hardware name: Freescale i.MX6 Ultralite (Device Tree) [ 26.786329] task: cb1de200 task.stack: cac92000 [ 26.790892] PC is at iio_trigger_write_current+0x188/0x1f4 [ 26.796403] LR is at lock_release+0xf8/0x20c [ 26.800696] pc : [] lr : [] psr: 600d0013 [ 26.800696] sp : cac93e30 ip : cac93db0 fp : cac93e5c [ 26.812193] r10: c0e64fe8 r9 : 00000000 r8 : 00000001 [ 26.817436] r7 : cb190810 r6 : 00000010 r5 : 00000001 r4 : 00000000 [ 26.823982] r3 : 00000000 r2 : 00000000 r1 : cb1de200 r0 : 00000000 [ 26.830528] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 26.837683] Control: 10c5387d Table: 8acc006a DAC: 00000051 [ 26.843448] Process synchro (pid: 152, stack limit = 0xcac92210) [ 26.849475] Stack: (0xcac93e30 to 0xcac94000) [ 26.853857] 3e20: 00000001 c0736dac c054033c cae6b680 [ 26.862060] 3e40: cae6b680 00000000 00000001 cb3f8610 cac93e74 cac93e60 c054035c c0736db8 [ 26.870264] 3e60: 00000001 c054033c cac93e94 cac93e78 c029bf34 c0540348 00000000 00000000 [ 26.878469] 3e80: cb3f8600 cae6b680 cac93ed4 cac93e98 c029b320 c029bef0 00000000 00000000 [ 26.886672] 3ea0: 00000000 cac93f78 cb2d41fc caed3280 c029b214 cac93f78 00000001 000e20f8 [ 26.894874] 3ec0: 00000001 00000000 cac93f44 cac93ed8 c0221dcc c029b220 c0e1ca39 cb2d41fc [ 26.903079] 3ee0: cac93f04 cac93ef0 c0183ef0 c0183ab0 cb2d41fc 00000000 cac93f44 cac93f08 [ 26.911282] 3f00: c0225eec c0183ebc 00000001 00000000 c0223728 00000000 c0245454 00000001 [ 26.919485] 3f20: 00000001 caed3280 000e20f8 cac93f78 000e20f8 00000001 cac93f74 cac93f48 [ 26.927690] 3f40: c0223680 c0221da4 c0246520 c0245460 caed3283 caed3280 00000000 00000000 [ 26.935893] 3f60: 000e20f8 00000001 cac93fa4 cac93f78 c0224520 c02235e4 00000000 00000000 [ 26.944096] 3f80: 00000001 000e20f8 00000001 00000004 c0107f84 cac92000 00000000 cac93fa8 [ 26.952299] 3fa0: c0107de0 c02244e8 00000001 000e20f8 0000000e 000e20f8 00000001 fbad2484 [ 26.960502] 3fc0: 00000001 000e20f8 00000001 00000004 beb6b698 00064260 0006421c beb6b4b4 [ 26.968705] 3fe0: 00000000 beb6b450 b6f219a0 b6e2f268 800d0010 0000000e cac93ff4 cac93ffc [ 26.976896] Backtrace: [ 26.979388] [] (iio_trigger_write_current) from [] (dev_attr_store+0x20/0x2c) [ 26.988289] r10:cb3f8610 r9:00000001 r8:00000000 r7:cae6b680 r6:cae6b680 r5:c054033c [ 26.996138] r4:c0736dac r3:00000001 [ 26.999747] [] (dev_attr_store) from [] (sysfs_kf_write+0x50/0x54) [ 27.007686] r5:c054033c r4:00000001 [ 27.011290] [] (sysfs_kf_write) from [] (kernfs_fop_write+0x10c/0x224) [ 27.019579] r7:cae6b680 r6:cb3f8600 r5:00000000 r4:00000000 [ 27.025271] [] (kernfs_fop_write) from [] (__vfs_write+0x34/0x120) [ 27.033214] r10:00000000 r9:00000001 r8:000e20f8 r7:00000001 r6:cac93f78 r5:c029b214 [ 27.041059] r4:caed3280 [ 27.043622] [] (__vfs_write) from [] (vfs_write+0xa8/0x170) [ 27.050959] r9:00000001 r8:000e20f8 r7:cac93f78 r6:000e20f8 r5:caed3280 r4:00000001 [ 27.058731] [] (vfs_write) from [] (SyS_write+0x44/0x98) [ 27.065806] r9:00000001 r8:000e20f8 r7:00000000 r6:00000000 r5:caed3280 r4:caed3283 [ 27.073582] [] (SyS_write) from [] (ret_fast_syscall+0x0/0x1c) [ 27.081179] r9:cac92000 r8:c0107f84 r7:00000004 r6:00000001 r5:000e20f8 r4:00000001 [ 27.088947] Code: 1a000009 e1a04009 e3a06010 e1a05008 (e5943000) [ 27.095244] ---[ end trace 06d1dab86d6e6bab ]--- To fix that problem call iio_trigger_put(trig) only when trig is not NULL. Fixes: d5d24bcc0a10 ("iio: trigger: close race condition in acquiring trigger reference") Signed-off-by: Marcin Niestroj Cc: Signed-off-by: Jonathan Cameron drivers/iio/industrialio-trigger.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3780578761921f094179c6289072a74b2228c602 Author: Rob Landley Date: Sat May 20 15:03:29 2017 -0500 x86/boot: Use CROSS_COMPILE prefix for readelf The boot code Makefile contains a straight 'readelf' invocation. This causes build warnings in cross compile environments, when there is no unprefixed readelf accessible via $PATH. Add the missing $(CROSS_COMPILE) prefix. [ tglx: Rewrote changelog ] Fixes: 98f78525371b ("x86/boot: Refuse to build with data relocations") Signed-off-by: Rob Landley Acked-by: Kees Cook Cc: Jiri Kosina Cc: Paul Bolle Cc: "H.J. Lu" Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/ced18878-693a-9576-a024-113ef39a22c0@landley.net Signed-off-by: Thomas Gleixner arch/x86/boot/compressed/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56f410cf45a1c1f68f77741990e0435b06a07676 Merge: 894e216 a33d7d9 Author: Linus Torvalds Date: Sat May 20 23:39:03 2017 -0700 Merge tag 'trace-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: - Fix a bug caused by not cleaning up the new instance unique triggers when deleting an instance. It also creates a selftest that triggers that bug. - Fix the delayed optimization happening after kprobes boot up self tests being removed by freeing of init memory. - Comment kprobes on why the delay optimization is not a problem for removal of modules, to keep other developers from searching that riddle. - Fix another case of rcu not watching in stack trace tracing. * tag 'trace-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Make sure RCU is watching before calling a stack trace kprobes: Document how optimized kprobes are removed from module unload selftests/ftrace: Add test to remove instance with active event triggers selftests/ftrace: Fix bashisms ftrace: Remove #ifdef from code and add clear_ftrace_function_probes() stub ftrace/instances: Clear function triggers when removing instances ftrace: Simplify glob handling in unregister_ftrace_function_probe_func() tracing/kprobes: Enforce kprobes teardown after testing tracing: Move postpone selftests to core from early_initcall commit 894e21642dde19184f059c485c49abd7ecdd6ec9 Merge: ef82f1a 549f01a Author: Linus Torvalds Date: Sat May 20 16:12:30 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A small collection of fixes that should go into this cycle. - a pull request from Christoph for NVMe, which ended up being manually applied to avoid pulling in newer bits in master. Mostly fibre channel fixes from James, but also a few fixes from Jon and Vijay - a pull request from Konrad, with just a single fix for xen-blkback from Gustavo. - a fuseblk bdi fix from Jan, fixing a regression in this series with the dynamic backing devices. - a blktrace fix from Shaohua, replacing sscanf() with kstrtoull(). - a request leak fix for drbd from Lars, fixing a regression in the last series with the kref changes. This will go to stable as well" * 'for-linus' of git://git.kernel.dk/linux-block: nvmet: release the sq ref on rdma read errors nvmet-fc: remove target cpu scheduling flag nvme-fc: stop queues on error detection nvme-fc: require target or discovery role for fc-nvme targets nvme-fc: correct port role bits nvme: unmap CMB and remove sysfs file in reset path blktrace: fix integer parse fuseblk: Fix warning in super_setup_bdi_name() block: xen-blkback: add null check to avoid null pointer dereference drbd: fix request leak introduced by locking/atomic, kref: Kill kref_sub() commit 549f01ae7b913355bea76100d3f17694bc9ec769 Author: Vijay Immanuel Date: Mon May 8 16:38:35 2017 -0700 nvmet: release the sq ref on rdma read errors On rdma read errors, release the sq ref that was taken when the req was initialized. This avoids a hang in nvmet_sq_destroy() when the queue is being freed. Signed-off-by: Vijay Immanuel Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/core.c | 6 ++++++ drivers/nvme/target/nvmet.h | 1 + drivers/nvme/target/rdma.c | 1 + 3 files changed, 8 insertions(+) commit 4b8ba5fa525bc8bdaaed2a5c5433f0f2008d7bc5 Author: James Smart Date: Tue Apr 25 16:23:09 2017 -0700 nvmet-fc: remove target cpu scheduling flag Remove NVMET_FCTGTFEAT_NEEDS_CMD_CPUSCHED. It's unnecessary. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/fc.c | 4 +--- drivers/nvme/target/fcloop.c | 1 - drivers/scsi/lpfc/lpfc_nvmet.c | 1 - include/linux/nvme-fc-driver.h | 12 ++---------- 4 files changed, 3 insertions(+), 15 deletions(-) commit 2952a879bacbfae8b03fd886754e64fe14b8041e Author: James Smart Date: Tue Apr 25 15:32:01 2017 -0700 nvme-fc: stop queues on error detection Per the recommendation by Sagi on: http://lists.infradead.org/pipermail/linux-nvme/2017-April/009261.html Rather than waiting for reset work thread to stop queues and abort the ios, immediately stop the queues on error detection. Reset thread will restop the queues (as it's called on other paths), but it does not appear to have a side effect. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 85e6a6adf8de7f992e01d2c3c59d9875d658b276 Author: James Smart Date: Fri May 5 16:13:15 2017 -0700 nvme-fc: require target or discovery role for fc-nvme targets In order to create an association, the remoteport must be serving either a target role or a discovery role. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4123109050a869a8871e58a50f28f383d41e49ad Author: James Smart Date: Fri May 5 16:13:02 2017 -0700 nvme-fc: correct port role bits FC Port roles is a bit mask, not individual values. Correct nvme definitions to unique bits. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe include/linux/nvme-fc-driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f63572dff1421b6ca6abce71d46e03411e605c94 Author: Jon Derrick Date: Fri May 5 14:52:06 2017 -0600 nvme: unmap CMB and remove sysfs file in reset path CMB doesn't get unmapped until removal while getting remapped on every reset. Add the unmapping and sysfs file removal to the reset path in nvme_pci_disable to match the mapping path in nvme_pci_enable. Fixes: 202021c1a ("nvme : Add sysfs entry for NVMe CMBs when appropriate") Signed-off-by: Jon Derrick Acked-by: Keith Busch Reviewed-By: Stephen Bates Cc: # 4.9+ Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ef82f1ad2e3f4509807c83e7eff4ec7c735076e8 Merge: 3202629 66ea597 Author: Linus Torvalds Date: Sat May 20 09:02:27 2017 -0700 Merge tag 'staging-4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes from Greg KH: "Here are a number of staging driver fixes for 4.12-rc2 Most of them are typec driver fixes found by reviewers and users of the code. There are also some removals of files no longer needed in the tree due to the ion driver rewrite in 4.12-rc1, as well as some wifi driver fixes. And to round it out, a MAINTAINERS file update. All have been in linux-next with no reported issues" * tag 'staging-4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (22 commits) MAINTAINERS: greybus-dev list is members-only staging: fsl-dpaa2/eth: add ETHERNET dependency staging: typec: fusb302: refactor resume retry mechanism staging: typec: fusb302: reset i2c_busy state in error staging: rtl8723bs: remove re-positioned call to kfree in os_dep/ioctl_cfg80211.c staging: rtl8192e: GetTs Fix invalid TID 7 warning. staging: rtl8192e: rtl92e_get_eeprom_size Fix read size of EPROM_CMD. staging: rtl8192e: fix 2 byte alignment of register BSSIDR. staging: rtl8192e: rtl92e_fill_tx_desc fix write to mapped out memory. staging: vc04_services: Fix bulk cache maintenance staging: ccree: remove extraneous spin_unlock_bh() in error handler staging: typec: Fix sparse warnings about incorrect types staging: typec: fusb302: do not free gpio from managed resource staging: typec: tcpm: Fix Port Power Role field in PS_RDY messages staging: typec: tcpm: Respond to Discover Identity commands staging: typec: tcpm: Set correct flags in PD request messages staging: typec: tcpm: Drop duplicate PD messages staging: typec: fusb302: Fix chip->vbus_present init value staging: typec: fusb302: Fix module autoload staging: typec: tcpci: declare private structure as static ... commit 32026293452a49b8395ec8a17d7f07304307af63 Merge: 331da10 b51e0ce Author: Linus Torvalds Date: Sat May 20 08:52:34 2017 -0700 Merge tag 'usb-4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a number of small USB fixes for 4.12-rc2 Most of them come from Johan, in his valiant quest to fix up all drivers that could be affected by "malicious" USB devices. There's also some fixes for more "obscure" drivers to handle some of the vmalloc stack fallout (which for USB drivers, was always the case, but very few people actually ran those systems...) Other than that, the normal set of xhci and gadget and musb driver fixes as well. All have been in linux-next with no reported issues" * tag 'usb-4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (42 commits) usb: musb: tusb6010_omap: Do not reset the other direction's packet size usb: musb: Fix trying to suspend while active for OTG configurations usb: host: xhci-plat: propagate return value of platform_get_irq() xhci: Fix command ring stop regression in 4.11 xhci: remove GFP_DMA flag from allocation USB: xhci: fix lock-inversion problem usb: host: xhci-ring: don't need to clear interrupt pending for MSI enabled hcd usb: host: xhci-mem: allocate zeroed Scratchpad Buffer xhci: apply PME_STUCK_QUIRK and MISSING_CAS quirk for Denverton usb: xhci: trace URB before giving it back instead of after USB: serial: qcserial: add more Lenovo EM74xx device IDs USB: host: xhci: use max-port define USB: hub: fix SS max number of ports USB: hub: fix non-SS hub-descriptor handling USB: hub: fix SS hub-descriptor handling USB: usbip: fix nonconforming hub descriptor USB: gadget: dummy_hcd: fix hub-descriptor removable fields doc-rst: fixed kernel-doc directives in usb/typec.rst USB: core: of: document reference taken by companion helper USB: ehci-platform: fix companion-device leak ... commit 331da109ec20d352a6f59ba8cd68aa7835c68fa1 Merge: ec53c02 9434cec Author: Linus Torvalds Date: Sat May 20 08:44:22 2017 -0700 Merge tag 'char-misc-4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are five small bugfixes for reported issues with 4.12-rc1 and earlier kernels. Nothing huge here, just a lp, mem, vpd, and uio driver fix, along with a Kconfig fixup for one of the misc drivers. All of these have been in linux-next with no reported issues" * tag 'char-misc-4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: firmware: Google VPD: Fix memory allocation error handling drivers: char: mem: Check for address space wraparound with mmap() uio: fix incorrect memory leak cleanup misc: pci_endpoint_test: select CRC32 char: lp: fix possible integer overflow in lp_setup() commit ec53c027f3e6b0ee82a5d18de7b0d8bfae3ec374 Merge: cf80a6f fedf266f Author: Linus Torvalds Date: Sat May 20 08:35:27 2017 -0700 Merge git://www.linux-watchdog.org/linux-watchdog Pull watchdog fixes from Wim Van Sebroeck: - orion_wdt compile-test dependencies - sama5d4_wdt: WDDIS handling and a race confition - pcwd_usb: fix NULL-deref at probe - cadence_wdt: fix timeout setting - wdt_pci: fix build error if SOFTWARE_REBOOT is defined - iTCO_wdt: all versions count down twice - zx2967: remove redundant dev_err call in zx2967_wdt_probe() - bcm281xx: Fix use of uninitialized spinlock * git://www.linux-watchdog.org/linux-watchdog: watchdog: bcm281xx: Fix use of uninitialized spinlock. watchdog: zx2967: remove redundant dev_err call in zx2967_wdt_probe() iTCO_wdt: all versions count down twice watchdog: wdt_pci: fix build error if define SOFTWARE_REBOOT watchdog: cadence_wdt: fix timeout setting watchdog: pcwd_usb: fix NULL-deref at probe watchdog: sama5d4: fix race condition watchdog: sama5d4: fix WDDIS handling watchdog: orion: fix compile-test dependencies commit cf80a6fbca377516628ea50507eded0a51e88d8c Merge: 6fe1de4 d51aff1 Author: Linus Torvalds Date: Sat May 20 08:29:30 2017 -0700 Merge tag 'drm-fixes-for-v4.12-rc2' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Mostly nouveau and i915, fairly quiet as usual for rc2" * tag 'drm-fixes-for-v4.12-rc2' of git://people.freedesktop.org/~airlied/linux: drm/atmel-hlcdc: Fix output initialization gpu: host1x: select IOMMU_IOVA drm/nouveau/fifo/gk104-: Silence a locking warning drm/nouveau/secboot: plug memory leak in ls_ucode_img_load_gr() error path drm/nouveau: Fix drm poll_helper handling drm/i915: don't do allocate_va_range again on PIN_UPDATE drm/i915: Fix rawclk readout for g4x drm/i915: Fix runtime PM for LPE audio drm/i915/glk: Fix DSI "*ERROR* ULPS is still active" messages drm/i915/gvt: avoid unnecessary vgpu switch drm/i915/gvt: not to restore in-context mmio drm/etnaviv: don't put fence in case of submit failure drm/i915/gvt: fix typo: "supporte" -> "support" drm: hdlcd: Fix the calculation of the scanout start address commit 623d8c095cb3351564d4dd8e3b449163a07cbd47 Author: Maxime Ripard Date: Mon May 15 10:50:00 2017 +0200 arm64: allwinner: h5: Remove syslink to shared DTSI The arm64 H5 and arm H3 SoCs share roughly the same base, and therefore share a significant part of their device tree. The approach we took was to add a symlink from the arm64 DTSI to the arm DTSI. Now that the arm DT folder is exposed in the include path, we can just use it and remove our symlink. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 2 +- arch/arm64/boot/dts/allwinner/sunxi-h3-h5.dtsi | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 6fe1de43c5f6ba9174540422b29ea06f32af09f8 Merge: 8c3fc16 b77b36c Author: Linus Torvalds Date: Fri May 19 17:46:51 2017 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "This is the first sweep of mostly minor fixes. There's one security one: the read past the end of a buffer in qedf, and a panic fix for lpfc SLI-3 adapters, but the rest are a set of include and build dependency tidy ups and assorted other small fixes and updates" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: pmcraid: remove redundant check to see if request_size is less than zero scsi: lpfc: ensure els_wq is being checked before destroying it scsi: cxlflash: Select IRQ_POLL scsi: qedf: Avoid reading past end of buffer scsi: qedf: Cleanup the type of io_log->op scsi: lpfc: double lock typo in lpfc_ns_rsp() scsi: qedf: properly update arguments position in function call scsi: scsi_lib: Add #include scsi: MAINTAINERS: update OSD entries scsi: Skip deleted devices in __scsi_device_lookup scsi: lpfc: Fix panic on BFS configuration scsi: libfc: do not flood console with messages 'libfc: queue full ...' commit 8c3fc1643d13ff70110701d08beaf77dc20c7c0a Merge: 0bdc6fd f5705aa8c Author: Linus Torvalds Date: Fri May 19 17:35:34 2017 -0700 Merge branch 'libnvdimm-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "A couple of compile fixes. With the removal of the ->direct_access() method from block_device_operations in favor of a new dax_device + dax_operations we broke two configurations. The CONFIG_BLOCK=n case is fixed by compiling out the block+dax helpers in the dax core. Configurations with FS_DAX=n EXT4=y / XFS=y and DAX=m fail due to the helpers the builtin filesystem needs being in a module, so we stub out the helpers in the FS_DAX=n case." * 'libnvdimm-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax, xfs, ext4: compile out iomap-dax paths in the FS_DAX=n case dax: fix false CONFIG_BLOCK dependency commit 0bdc6fd2329e51b9659d5192f4281493c15e95b3 Merge: d4c6cd1 9d64084 Author: Linus Torvalds Date: Fri May 19 17:33:08 2017 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fix from Wolfram Sang: "A regression fix for I2C that would be great to have in rc2" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: designware: don't infer timings described by ACPI from clock rate commit d4c6cd157a77645b9f8bff348b57aafa551f2d79 Merge: 4217fdd 745b6e7 Author: Linus Torvalds Date: Fri May 19 17:27:28 2017 -0700 Merge tag 'iommu-fixes-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: - another compile-fix as a fallout of the recent header-file cleanup - add a missing IO/TLB flush to the Intel VT-d kdump code path - a fix for ARM64 dma code to only access initialized iova_domain members * tag 'iommu-fixes-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/mediatek: Include linux/dma-mapping.h iommu/vt-d: Flush the IOTLB to get rid of the initial kdump mappings iommu/dma: Don't touch invalid iova_domain members commit 4217fdde34a574f1bbdd5f34f64e499465a157ba Merge: 9e856e4 92ceb76 Author: Linus Torvalds Date: Fri May 19 15:13:13 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "ARM: - a fix for a build failure introduced in -rc1 when tracepoints are enabled on 32-bit ARM. - disable use of stack pointer protection in the hyp code which can cause panics. - a handful of VGIC fixes. - a fix to the init of the redistributors on GICv3 systems that prevented boot with kvmtool on GICv3 systems introduced in -rc1. - a number of race conditions fixed in our MMU handling code. - a fix for the guest being able to program the debug extensions for the host on the 32-bit side. PPC: - fixes for build failures with PR KVM configurations. - a fix for a host crash that can occur on POWER9 with radix guests. x86: - fixes for nested PML and nested EPT. - a fix for crashes caused by reserved bits in SSE MXCSR that could have been set by userspace. - an optimization of halt polling that fixes high CPU overhead. - fixes for four reports from Dan Carpenter's static checker. - a protection around code that shouldn't have been preemptible. - a fix for port IO emulation" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (27 commits) KVM: x86: prevent uninitialized variable warning in check_svme() KVM: x86/vPMU: fix undefined shift in intel_pmu_refresh() KVM: x86: zero base3 of unusable segments KVM: X86: Fix read out-of-bounds vulnerability in kvm pio emulation KVM: x86: Fix potential preemption when get the current kvmclock timestamp KVM: Silence underflow warning in avic_get_physical_id_entry() KVM: arm/arm64: Hold slots_lock when unregistering kvm io bus devices KVM: arm/arm64: Fix bug when registering redist iodevs KVM: x86: lower default for halt_poll_ns kvm: arm/arm64: Fix use after free of stage2 page table kvm: arm/arm64: Force reading uncached stage2 PGD KVM: nVMX: fix EPT permissions as reported in exit qualification KVM: VMX: Don't enable EPT A/D feature if EPT feature is disabled KVM: x86: Fix load damaged SSEx MXCSR register kvm: nVMX: off by one in vmx_write_pml_buffer() KVM: arm: rename pm_fake handler to trap_raz_wi KVM: arm: plug potential guest hardware debug leakage kvm: arm/arm64: Fix race in resetting stage2 PGD KVM: arm/arm64: vgic-v3: Use PREbits to infer the number of ICH_APxRn_EL2 registers KVM: arm/arm64: vgic-v3: Do not use Active+Pending state for a HW interrupt ... commit 9e856e4b475502270f2cfdd7b289075c1924786b Merge: 1fbbed4 c71e6d8 Author: Linus Torvalds Date: Fri May 19 15:06:48 2017 -0700 Merge tag 'for-linus-4.12b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Some fixes for the new Xen 9pfs frontend and some minor cleanups" * tag 'for-linus-4.12b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: make xen_flush_tlb_all() static xen: cleanup pvh leftovers from pv-only sources xen/9pfs: p9_trans_xen_init and p9_trans_xen_exit can be static xen/9pfs: fix return value check in xen_9pfs_front_probe() commit 1fbbed4137de93e02fc62776b8bf08a2d9ae1141 Merge: f538a82 49e67dd Author: Linus Torvalds Date: Fri May 19 15:03:24 2017 -0700 Merge tag 'devicetree-fixes-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree fixes from Rob Herring: - fix missing allocation failure handling in fdt code - fix dtc compile error on 32-bit hosts - revert bad sparse changes causing GCC7 warnings * tag 'devicetree-fixes-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of: fdt: add missing allocation-failure check dtc: check.c fix compile error Partially Revert "of: fix sparse warnings in fdt, irq, reserved mem, and resolver code" commit f538a82c075ba3d31e7691a361f28795eff0a786 Merge: 2fe296a 6bf1c2d Author: Linus Torvalds Date: Fri May 19 13:36:56 2017 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "We had a small batch of fixes before -rc1, but here is a larger one. It contains a backmerge of 4.12-rc1 since some of the downstream branches we merge had that as base; at the same time we already had merged contents before -rc1 and rebase wasn't the right solution. A mix of random smaller fixes and a few things worth pointing out: - We've started telling people to avoid cross-tree shared branches if all they're doing is picking up one or two DT-used constants from a shared include file, and instead to use the numeric values on first submission. Follow-up moving over to symbolic names are sent in right after -rc1, i.e. here. It's only a few minor patches of this type. - Linus Walleij and others are resurrecting the 'Gemini' platform, and wanted a cut-down platform-specific defconfig for it. So I picked that up for them. - Rob Herring ran 'savedefconfig' on arm64, it's a bit churny but it helps people to prepare patches since it's a pain when defconfig and current savedefconfig contents differs too much. - Devicetree additions for some pinctrl drivers for Armada that were merged this window. I'd have preferred to see those earlier but it's not a huge deail. The biggest change worth pointing out though since it's touching other parts of the tree: We added prefixes to be used when cross-including DT contents between arm64 and arm, allowing someone to #include from arm64, and likewise. As part of that, we needed arm/foo.dtsi to work on arm as well. The way I suggested this to Heiko resulted in a recursive symlink. Instead, I've now moved it out of arch/*/boot/dts/include, into a shared location under scripts/dtc. While I was at it, I consolidated so all architectures now behave the same way in this manner. Rob Herring (DT maintainer) has acked it. I cc:d most other arch maintainers but nobody seems to care much; it doesn't really affect them since functionality is unchanged for them by default" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (29 commits) arm64: dts: rockchip: fix include reference firmware: ti_sci: fix strncat length check ARM: remove duplicate 'const' annotations' arm64: defconfig: enable options needed for QCom DB410c board arm64: defconfig: sync with savedefconfig ARM: configs: add a gemini defconfig devicetree: Move include prefixes from arch to separate directory ARM: dts: dra7: Reduce cpu thermal shutdown temperature memory: omap-gpmc: Fix debug output for access width ARM: dts: LogicPD Torpedo: Fix camera pin mux ARM: dts: omap4: enable CEC pin for Pandaboard A4 and ES ARM: dts: gta04: fix polarity of clocks for mcbsp4 ARM: dts: dra7: Add power hold and power controller properties to palmas soc: imx: add PM dependency for IMX7_PM_DOMAINS ARM: dts: imx6sx-sdb: Remove OPP override ARM: dts: imx53-qsrb: Pulldown PMIC IRQ pin soc: bcm: brcmstb: Correctly match 7435 SoC tee: add ARM_SMCCC dependency ARM: omap2+: make omap4_get_cpu1_ns_pa_addr declaration usable ARM64: dts: mediatek: configure some fixed mmc parameters ... commit 2fe296a61a4e2ec11efc41cb8d645c52e0113f55 Merge: e5a489a 63a1e1c Author: Linus Torvalds Date: Fri May 19 13:34:34 2017 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes/cleanups from Catalin Marinas: - Avoid taking a mutex in the secondary CPU bring-up path when interrupts are disabled - Ignore perf exclude_hv when the kernel is running in Hyp mode - Remove redundant instruction in cmpxchg * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64/cpufeature: don't use mutex in bringup path arm64: perf: Ignore exclude_hv when kernel is running in HYP arm64: Remove redundant mov from LL/SC cmpxchg commit d51aff16e821a755c242e14168f5d4601199eafd Merge: 4fd8922 1de3cd4 Author: Dave Airlie Date: Sat May 20 06:00:49 2017 +1000 Merge branch 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld into drm-fixes single hdlcd fix * 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld: drm: hdlcd: Fix the calculation of the scanout start address commit e5a489abcfd216d07ad6b33ea0d191e61d0f25ea Merge: 8b4822d e41e53c Author: Linus Torvalds Date: Fri May 19 11:31:38 2017 -0700 Merge tag 'powerpc-4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "The headliner is a fix for FP/VMX register corruption when using transactional memory, and a new selftest to go with it. Then there's the virt_addr_valid() fix, currently HARDENDED_USERCOPY is tripping on that causing some machines to crash. A few other fairly minor fixes for long tail things, and a couple of fixes for code we just merged. Thanks to: Breno Leitao, Gautham Shenoy, Michael Neuling, Naveen Rao. Nicholas Piggin, Paul Mackerras" * tag 'powerpc-4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash powerpc/mm: Fix crash in page table dump with huge pages powerpc/kprobes: Fix handling of instruction emulation on probe re-entry powerpc/powernv: Set NAPSTATELOST after recovering paca on P9 DD1 selftests/powerpc: Test TM and VMX register state powerpc/tm: Fix FP and VMX register corruption powerpc/modules: If mprofile-kernel is enabled add it to vermagic commit 6c0c57ac0951a3166f318b82055b6e60eeaada14 Merge: b155f05 b0804ed Author: Florian Fainelli Date: Fri May 19 11:15:10 2017 -0700 Merge tag 'bcm2835-dt-fixes-2017-05-16' into devicetree/fixes This pull request brings in a fix for booting on SMP Raspberry Pis, particularly with maxcpus=1 Signed-off-by: Florian Fainelli commit 92ceb7679ab8807d3b7fbcc6daf2279036954ef5 Author: Radim Krčmář Date: Thu May 18 19:37:32 2017 +0200 KVM: x86: prevent uninitialized variable warning in check_svme() get_msr() of MSR_EFER is currently always going to succeed, but static checker doesn't see that far. Don't complicate stuff and just use 0 for the fallback -- it means that the feature is not present. Reported-by: Dan Carpenter Reviewed-by: Paolo Bonzini Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/emulate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34b0dadbdf698f9b277a31b2747b625b9a75ea1f Author: Radim Krčmář Date: Thu May 18 19:37:31 2017 +0200 KVM: x86/vPMU: fix undefined shift in intel_pmu_refresh() Static analysis noticed that pmu->nr_arch_gp_counters can be 32 (INTEL_PMC_MAX_GENERIC) and therefore cannot be used to shift 'int'. I didn't add BUILD_BUG_ON for it as we have a better checker. Reported-by: Dan Carpenter Fixes: 25462f7f5295 ("KVM: x86/vPMU: Define kvm_pmu_ops to support vPMU function dispatch") Reviewed-by: Paolo Bonzini Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/pmu_intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0367ee1d64d27fa08be2407df5c125442e885e3 Author: Radim Krčmář Date: Thu May 18 19:37:30 2017 +0200 KVM: x86: zero base3 of unusable segments Static checker noticed that base3 could be used uninitialized if the segment was not present (useable). Random stack values probably would not pass VMCS entry checks. Reported-by: Dan Carpenter Fixes: 1aa366163b8b ("KVM: x86 emulator: consolidate segment accessors") Reviewed-by: Paolo Bonzini Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 2 ++ 1 file changed, 2 insertions(+) commit cbfc6c9184ce71b52df4b1d82af5afc81a709178 Author: Wanpeng Li Date: Fri May 19 02:46:56 2017 -0700 KVM: X86: Fix read out-of-bounds vulnerability in kvm pio emulation Huawei folks reported a read out-of-bounds vulnerability in kvm pio emulation. - "inb" instruction to access PIT Mod/Command register (ioport 0x43, write only, a read should be ignored) in guest can get a random number. - "rep insb" instruction to access PIT register port 0x43 can control memcpy() in emulator_pio_in_emulated() to copy max 0x400 bytes but only read 1 bytes, which will disclose the unimportant kernel memory in host but no crash. The similar test program below can reproduce the read out-of-bounds vulnerability: void hexdump(void *mem, unsigned int len) { unsigned int i, j; for(i = 0; i < len + ((len % HEXDUMP_COLS) ? (HEXDUMP_COLS - len % HEXDUMP_COLS) : 0); i++) { /* print offset */ if(i % HEXDUMP_COLS == 0) { printf("0x%06x: ", i); } /* print hex data */ if(i < len) { printf("%02x ", 0xFF & ((char*)mem)[i]); } else /* end of block, just aligning for ASCII dump */ { printf(" "); } /* print ASCII dump */ if(i % HEXDUMP_COLS == (HEXDUMP_COLS - 1)) { for(j = i - (HEXDUMP_COLS - 1); j <= i; j++) { if(j >= len) /* end of block, not really printing */ { putchar(' '); } else if(isprint(((char*)mem)[j])) /* printable char */ { putchar(0xFF & ((char*)mem)[j]); } else /* other char */ { putchar('.'); } } putchar('\n'); } } } int main(void) { int i; if (iopl(3)) { err(1, "set iopl unsuccessfully\n"); return -1; } static char buf[0x40]; /* test ioport 0x40,0x41,0x42,0x43,0x44,0x45 */ memset(buf, 0xab, sizeof(buf)); asm volatile("push %rdi;"); asm volatile("mov %0, %%rdi;"::"q"(buf)); asm volatile ("mov $0x40, %rdx;"); asm volatile ("in %dx,%al;"); asm volatile ("stosb;"); asm volatile ("mov $0x41, %rdx;"); asm volatile ("in %dx,%al;"); asm volatile ("stosb;"); asm volatile ("mov $0x42, %rdx;"); asm volatile ("in %dx,%al;"); asm volatile ("stosb;"); asm volatile ("mov $0x43, %rdx;"); asm volatile ("in %dx,%al;"); asm volatile ("stosb;"); asm volatile ("mov $0x44, %rdx;"); asm volatile ("in %dx,%al;"); asm volatile ("stosb;"); asm volatile ("mov $0x45, %rdx;"); asm volatile ("in %dx,%al;"); asm volatile ("stosb;"); asm volatile ("pop %rdi;"); hexdump(buf, 0x40); printf("\n"); /* ins port 0x40 */ memset(buf, 0xab, sizeof(buf)); asm volatile("push %rdi;"); asm volatile("mov %0, %%rdi;"::"q"(buf)); asm volatile ("mov $0x20, %rcx;"); asm volatile ("mov $0x40, %rdx;"); asm volatile ("rep insb;"); asm volatile ("pop %rdi;"); hexdump(buf, 0x40); printf("\n"); /* ins port 0x43 */ memset(buf, 0xab, sizeof(buf)); asm volatile("push %rdi;"); asm volatile("mov %0, %%rdi;"::"q"(buf)); asm volatile ("mov $0x20, %rcx;"); asm volatile ("mov $0x43, %rdx;"); asm volatile ("rep insb;"); asm volatile ("pop %rdi;"); hexdump(buf, 0x40); printf("\n"); return 0; } The vcpu->arch.pio_data buffer is used by both in/out instrutions emulation w/o clear after using which results in some random datas are left over in the buffer. Guest reads port 0x43 will be ignored since it is write only, however, the function kernel_pio() can't distigush this ignore from successfully reads data from device's ioport. There is no new data fill the buffer from port 0x43, however, emulator_pio_in_emulated() will copy the stale data in the buffer to the guest unconditionally. This patch fixes it by clearing the buffer before in instruction emulation to avoid to grant guest the stale data in the buffer. In addition, string I/O is not supported for in kernel device. So there is no iteration to read ioport %RCX times for string I/O. The function kernel_pio() just reads one round, and then copy the io size * %RCX to the guest unconditionally, actually it copies the one round ioport data w/ other random datas which are left over in the vcpu->arch.pio_data buffer to the guest. This patch fixes it by introducing the string I/O support for in kernel device in order to grant the right ioport datas to the guest. Before the patch: 0x000000: fe 38 93 93 ff ff ab ab .8...... 0x000008: ab ab ab ab ab ab ab ab ........ 0x000010: ab ab ab ab ab ab ab ab ........ 0x000018: ab ab ab ab ab ab ab ab ........ 0x000020: ab ab ab ab ab ab ab ab ........ 0x000028: ab ab ab ab ab ab ab ab ........ 0x000030: ab ab ab ab ab ab ab ab ........ 0x000038: ab ab ab ab ab ab ab ab ........ 0x000000: f6 00 00 00 00 00 00 00 ........ 0x000008: 00 00 00 00 00 00 00 00 ........ 0x000010: 00 00 00 00 4d 51 30 30 ....MQ00 0x000018: 30 30 20 33 20 20 20 20 00 3 0x000020: ab ab ab ab ab ab ab ab ........ 0x000028: ab ab ab ab ab ab ab ab ........ 0x000030: ab ab ab ab ab ab ab ab ........ 0x000038: ab ab ab ab ab ab ab ab ........ 0x000000: f6 00 00 00 00 00 00 00 ........ 0x000008: 00 00 00 00 00 00 00 00 ........ 0x000010: 00 00 00 00 4d 51 30 30 ....MQ00 0x000018: 30 30 20 33 20 20 20 20 00 3 0x000020: ab ab ab ab ab ab ab ab ........ 0x000028: ab ab ab ab ab ab ab ab ........ 0x000030: ab ab ab ab ab ab ab ab ........ 0x000038: ab ab ab ab ab ab ab ab ........ After the patch: 0x000000: 1e 02 f8 00 ff ff ab ab ........ 0x000008: ab ab ab ab ab ab ab ab ........ 0x000010: ab ab ab ab ab ab ab ab ........ 0x000018: ab ab ab ab ab ab ab ab ........ 0x000020: ab ab ab ab ab ab ab ab ........ 0x000028: ab ab ab ab ab ab ab ab ........ 0x000030: ab ab ab ab ab ab ab ab ........ 0x000038: ab ab ab ab ab ab ab ab ........ 0x000000: d2 e2 d2 df d2 db d2 d7 ........ 0x000008: d2 d3 d2 cf d2 cb d2 c7 ........ 0x000010: d2 c4 d2 c0 d2 bc d2 b8 ........ 0x000018: d2 b4 d2 b0 d2 ac d2 a8 ........ 0x000020: ab ab ab ab ab ab ab ab ........ 0x000028: ab ab ab ab ab ab ab ab ........ 0x000030: ab ab ab ab ab ab ab ab ........ 0x000038: ab ab ab ab ab ab ab ab ........ 0x000000: 00 00 00 00 00 00 00 00 ........ 0x000008: 00 00 00 00 00 00 00 00 ........ 0x000010: 00 00 00 00 00 00 00 00 ........ 0x000018: 00 00 00 00 00 00 00 00 ........ 0x000020: ab ab ab ab ab ab ab ab ........ 0x000028: ab ab ab ab ab ab ab ab ........ 0x000030: ab ab ab ab ab ab ab ab ........ 0x000038: ab ab ab ab ab ab ab ab ........ Reported-by: Moguofang Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Moguofang Signed-off-by: Wanpeng Li Cc: stable@vger.kernel.org Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit e2c2206a18993bc9f62393d49c7b2066c3845b25 Author: Wanpeng Li Date: Thu May 11 18:12:05 2017 -0700 KVM: x86: Fix potential preemption when get the current kvmclock timestamp BUG: using __this_cpu_read() in preemptible [00000000] code: qemu-system-x86/2809 caller is __this_cpu_preempt_check+0x13/0x20 CPU: 2 PID: 2809 Comm: qemu-system-x86 Not tainted 4.11.0+ #13 Call Trace: dump_stack+0x99/0xce check_preemption_disabled+0xf5/0x100 __this_cpu_preempt_check+0x13/0x20 get_kvmclock_ns+0x6f/0x110 [kvm] get_time_ref_counter+0x5d/0x80 [kvm] kvm_hv_process_stimers+0x2a1/0x8a0 [kvm] ? kvm_hv_process_stimers+0x2a1/0x8a0 [kvm] ? kvm_arch_vcpu_ioctl_run+0xac9/0x1ce0 [kvm] kvm_arch_vcpu_ioctl_run+0x5bf/0x1ce0 [kvm] kvm_vcpu_ioctl+0x384/0x7b0 [kvm] ? kvm_vcpu_ioctl+0x384/0x7b0 [kvm] ? __fget+0xf3/0x210 do_vfs_ioctl+0xa4/0x700 ? __fget+0x114/0x210 SyS_ioctl+0x79/0x90 entry_SYSCALL_64_fastpath+0x23/0xc2 RIP: 0033:0x7f9d164ed357 ? __this_cpu_preempt_check+0x13/0x20 This can be reproduced by run kvm-unit-tests/hyperv_stimer.flat w/ CONFIG_PREEMPT and CONFIG_DEBUG_PREEMPT enabled. Safe access to per-CPU data requires a couple of constraints, though: the thread working with the data cannot be preempted and it cannot be migrated while it manipulates per-CPU variables. If the thread is preempted, the thread that replaces it could try to work with the same variables; migration to another CPU could also cause confusion. However there is no preemption disable when reads host per-CPU tsc rate to calculate the current kvmclock timestamp. This patch fixes it by utilizing get_cpu/put_cpu pair to guarantee both __this_cpu_read() and rdtsc() are not preempted. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Reviewed-by: Paolo Bonzini Cc: stable@vger.kernel.org Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit f746aa5e8636c83e53bbb2d988bb614f732b2b80 Author: Stefan Agner Date: Mon May 15 14:00:31 2017 -0700 ASoC: simple-card: fix mic jack initialization Initialize asoc_simple_card_init_mic with the correct struct asoc_simple_jack. Fixes: 9eac361877b3 ("ASoC: simple-card: add new asoc_simple_jack and use it") Signed-off-by: Stefan Agner Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f8754d4daea5f257370a52a30fcb22798c54516 Author: Kuninori Morimoto Date: Tue May 16 01:48:24 2017 +0000 ASoC: rsnd: don't call free_irq() on Parent SSI If SSI uses shared pin, some SSI will be used as parent SSI. Then, normal SSI's remove and Parent SSI's remove (these are same SSI) will be called when unbind or remove timing. In this case, free_irq() will be called twice. This patch solve this issue. Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Reported-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/ssi.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5f3394530fbe90d3bcd1c204618960bc50236578 Author: Shaohua Li Date: Fri May 19 08:04:59 2017 -0700 blktrace: fix integer parse sscanf is a very poor way to parse integer. For example, I input "discard" for act_mask, it gets 0xd and completely messes up. Using correct API to do integer parse. This patch also makes attributes accept any base of integer. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe kernel/trace/blktrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3ecb3ac7b950ff8f6c6a61e8b7b0d6e3546429a0 Author: Darrick J. Wong Date: Mon May 15 19:16:15 2017 -0700 xfs: avoid mount-time deadlock in CoW extent recovery If a malicious user corrupts the refcount btree to cause a cycle between different levels of the tree, the next mount attempt will deadlock in the CoW recovery routine while grabbing buffer locks. We can use the ability to re-grab a buffer that was previous locked to a transaction to avoid deadlocks, so do that here. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_refcount.c | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) commit 9d6408433019bfae15e2d0d5f4498c4ff70b86c0 Author: Ard Biesheuvel Date: Fri May 19 09:56:40 2017 +0100 i2c: designware: don't infer timings described by ACPI from clock rate Commit bd698d24b1b57 ("i2c: designware: Get selected speed mode sda-hold-time via ACPI") updated the logic that reads the timing parameters for various I2C bus rates from the DSDT, to only read the timing parameters for the currently selected mode. This causes a WARN_ON() splat on platforms that legally omit the clock frequency from the ACPI description, because in the new situation, the core I2C designware driver still accesses the fields in the driver struct that we no longer populate, and proceeds to calculate them from the clock frequency. Since the clock frequency is unspecified, the driver complains loudly using a WARN_ON(). So revert back to the old situation, where the struct fields for all timings are populated, but retain the new logic which chooses the SDA hold time from the timing mode that is currently in use. Fixes: bd698d24b1b57 ("i2c: designware: Get selected speed mode ...") Signed-off-by: Ard Biesheuvel Reported-by: Lorenzo Pieralisi Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-platdrv.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 6bf1c2d26716dcd483699cc62474e49d164c5563 Author: Arnd Bergmann Date: Fri May 19 14:12:00 2017 +0200 arm64: dts: rockchip: fix include reference The way we handle include paths for DT has changed a bit, which broke a file that had an unconventional way to reference a common header file: arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts:47:10: fatal error: include/dt-bindings/input/linux-event-codes.h: No such file or directory This removes the leading "include/" from the path name, which fixes it. Fixes: d5d332d3f7e8 ("devicetree: Move include prefixes from arch to separate directory") Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a486cd23661c9387fb076c3f6ae8b2aa9d20d54a Author: Antony Antony Date: Fri May 19 12:47:00 2017 +0200 xfrm: fix state migration copy replay sequence numbers During xfrm migration copy replay and preplay sequence numbers from the previous state. Here is a tcpdump output showing the problem. 10.0.10.46 is running vanilla kernel, is the IKE/IPsec responder. After the migration it sent wrong sequence number, reset to 1. The migration is from 10.0.0.52 to 10.0.0.53. IP 10.0.0.52.4500 > 10.0.10.46.4500: UDP-encap: ESP(spi=0x43ef462d,seq=0x7cf), length 136 IP 10.0.10.46.4500 > 10.0.0.52.4500: UDP-encap: ESP(spi=0xca1c282d,seq=0x7cf), length 136 IP 10.0.0.52.4500 > 10.0.10.46.4500: UDP-encap: ESP(spi=0x43ef462d,seq=0x7d0), length 136 IP 10.0.10.46.4500 > 10.0.0.52.4500: UDP-encap: ESP(spi=0xca1c282d,seq=0x7d0), length 136 IP 10.0.0.53.4500 > 10.0.10.46.4500: NONESP-encap: isakmp: child_sa inf2[I] IP 10.0.10.46.4500 > 10.0.0.53.4500: NONESP-encap: isakmp: child_sa inf2[R] IP 10.0.0.53.4500 > 10.0.10.46.4500: NONESP-encap: isakmp: child_sa inf2[I] IP 10.0.10.46.4500 > 10.0.0.53.4500: NONESP-encap: isakmp: child_sa inf2[R] IP 10.0.0.53.4500 > 10.0.10.46.4500: UDP-encap: ESP(spi=0x43ef462d,seq=0x7d1), length 136 NOTE: next sequence is wrong 0x1 IP 10.0.10.46.4500 > 10.0.0.53.4500: UDP-encap: ESP(spi=0xca1c282d,seq=0x1), length 136 IP 10.0.0.53.4500 > 10.0.10.46.4500: UDP-encap: ESP(spi=0x43ef462d,seq=0x7d2), length 136 IP 10.0.10.46.4500 > 10.0.0.53.4500: UDP-encap: ESP(spi=0xca1c282d,seq=0x2), length 136 Signed-off-by: Antony Antony Reviewed-by: Richard Guy Briggs Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 2 ++ 1 file changed, 2 insertions(+) commit a1a745ef980a1b48299ead4ea7990e62c0516f6e Author: Andreas Pape Date: Fri May 19 10:01:42 2017 +0200 batman-adv: fix memory leak when dropping packet from other gateway The skb must be released in the receive handler since b91a2543b4c1 ("batman-adv: Consume skb in receive handlers"). Just returning NET_RX_DROP will no longer automatically free the memory. This results in memory leaks when unicast packets from other backbones must be dropped because they share a common backbone. Fixes: 9e794b6bf4a2 ("batman-adv: drop unicast packets from other backbone gw") Signed-off-by: Andreas Pape [sven@narfation.org: adjust commit message] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/routing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36d4d68cd658d914ef73ac845705c4a89e7d9e2f Author: Sven Eckelmann Date: Wed Apr 5 16:26:17 2017 +0200 batman-adv: Fix rx packet/bytes stats on local ARP reply The stats are generated by batadv_interface_stats and must not be stored directly in the net_device stats member variable. The batadv_priv bat_counters information is assembled when ndo_get_stats is called. The stats previously stored in net_device::stats is then overwritten. The batman-adv counters must therefore be increased when an ARP packet is answered locally via the distributed arp table. Fixes: c384ea3ec930 ("batman-adv: Distributed ARP Table - add snooping functions for ARP messages") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/distributed-arp-table.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fe06fe860250a4f01d0eaf70a2563b1997174a74 Author: Michael Ellerman Date: Fri May 19 11:29:04 2017 +1000 selftests/powerpc: Fix TM resched DSCR test with some compilers The tm-resched-dscr test has started failing sometimes, depending on what compiler it's built with, eg: test: tm_resched_dscr Check DSCR TM context switch: tm-resched-dscr: tm-resched-dscr.c:76: test_body: Assertion `rv' failed. !! child died by signal 6 When it fails we see that the compiler doesn't initialise rv to 1 before entering the inline asm block. Although that's counter intuitive, it is allowed because we tell the compiler that the inline asm will write to rv (using "=r"), meaning the original value is irrelevant. Marking it as a read/write parameter would presumably work, but it seems simpler to fix it by setting the initial value of rv in the inline asm. Fixes: 96d016108640 ("powerpc: Correct DSCR during TM context switch") Signed-off-by: Michael Ellerman Acked-by: Michael Neuling tools/testing/selftests/powerpc/tm/tm-resched-dscr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46cd902f6d9a746f0da816cbdfb04b9baf6d7967 Author: Chuanxiao Dong Date: Thu May 11 18:07:42 2017 +0800 drm/i915: set initialised only when init_context callback is NULL During execlist_context_deferred_alloc() we presumed that the context is uninitialised (we only just allocated the state object for it!) and chose to optimise away the later call to engine->init_context() if engine->init_context were NULL. This breaks with GVT's contexts that are marked as pre-initialised to avoid us annoyingly calling engine->init_context(). The fix is to not override ce->initialised if it is already true. Cc: Chris Wilson Signed-off-by: Chuanxiao Dong Link: http://patchwork.freedesktop.org/patch/msgid/1494497262-24855-1-git-send-email-chuanxiao.dong@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson (cherry picked from commit 0d402a24df8c8160727af934d83293f3d44d31a3) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_lrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53bf9590151e06e3f74212fea8da2eca2385db76 Author: Wei Yongjun Date: Tue Apr 25 03:14:54 2017 +0000 phy: qcom-qmp: fix return value check in qcom_qmp_phy_create() In case of error, the function of_iomap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") Reviewed-by: Vivek Gautam Signed-off-by: Wei Yongjun Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-qcom-qmp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit fedf266f9955d9a019643cde199a2fd9a0259f6f Author: Eric Anholt Date: Thu Apr 27 18:02:32 2017 -0700 watchdog: bcm281xx: Fix use of uninitialized spinlock. The bcm_kona_wdt_set_resolution_reg() call takes the spinlock, so initialize it earlier. Fixes a warning at boot with lock debugging enabled. Fixes: 6adb730dc208 ("watchdog: bcm281xx: Watchdog Driver") Signed-off-by: Eric Anholt Reviewed-by: Florian Fainelli Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/bcm_kona_wdt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 07441a7dd11f6855bcf55fbbfc6abba42258b2c6 Author: Wei Yongjun Date: Tue Apr 25 16:17:33 2017 +0000 watchdog: zx2967: remove redundant dev_err call in zx2967_wdt_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/zx2967_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1fccb73011ea8a5fa0c6d357c33fa29c695139ea Author: Paolo Bonzini Date: Wed Apr 5 13:41:15 2017 +0200 iTCO_wdt: all versions count down twice The ICH9 is listed as having TCO v2, and indeed the behavior in the datasheet corresponds to v2 (for example the NO_REBOOT flag is accessible via the 16KiB-aligned Root Complex Base Address). However, the TCO counts twice just like in v1; the documentation of the SECOND_TO_STS bit says: "ICH9 sets this bit to 1 to indicate that the TIMEOUT bit had been (or is currently) set and a second timeout occurred before the TCO_RLD register was written. If this bit is set and the NO_REBOOT config bit is 0, then the ICH9 will reboot the system after the second timeout. The same can be found in the BayTrail (Atom E3800) datasheet, and even HOWTOs around the Internet say that it will reboot after _twice_ the specified heartbeat. I did not find the Apollo Lake datasheet, but because v4/v5 has a SECOND_TO_STS bit just like the previous version I'm enabling this for Apollo Lake as well. Cc: linux-watchdog@vger.kernel.org Reviewed-by: Andy Shevchenko Signed-off-by: Paolo Bonzini Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/watchdog/watchdog-parameters.txt | 2 +- drivers/watchdog/iTCO_wdt.c | 22 ++++++++++------------ 2 files changed, 11 insertions(+), 13 deletions(-) commit 76cefef8e838304a71725a0b5007c375619d78fb Author: Arnd Bergmann Date: Wed Jan 11 12:53:05 2017 +0100 firmware: ti_sci: fix strncat length check gcc-7 notices that the length we pass to strncat is wrong: drivers/firmware/ti_sci.c: In function 'ti_sci_probe': drivers/firmware/ti_sci.c:204:32: error: specified bound 50 equals the size of the destination [-Werror=stringop-overflow=] Instead of the total length, we must pass the length of the remaining space here. Fixes: aa276781a64a ("firmware: Add basic support for TI System Control Interface (TI-SCI) protocol") Cc: stable@vger.kernel.org Acked-by: Nishanth Menon Acked-by: Santosh Shilimkar Signed-off-by: Arnd Bergmann drivers/firmware/ti_sci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0527873b29b077fc8e656acd63e1866b429fef55 Author: Arnd Bergmann Date: Thu May 11 13:50:16 2017 +0200 ARM: remove duplicate 'const' annotations' gcc-7 warns about some declarations that are more 'const' than necessary: arch/arm/mach-at91/pm.c:338:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier] static const struct of_device_id const ramc_ids[] __initconst = { arch/arm/mach-bcm/bcm_kona_smc.c:36:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier] static const struct of_device_id const bcm_kona_smc_ids[] __initconst = { arch/arm/mach-spear/time.c:207:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier] static const struct of_device_id const timer_of_match[] __initconst = { arch/arm/mach-omap2/prm_common.c:714:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier] static const struct of_device_id const omap_prcm_dt_match_table[] __initconst = { arch/arm/mach-omap2/vc.c:562:35: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier] static const struct i2c_init_data const omap4_i2c_timing_data[] __initconst = { The ones in arch/arm were apparently all introduced accidentally by one commit that correctly marked a lot of variables as __initconst. Fixes: 19c233b79d1a ("ARM: appropriate __init annotation for const data") Acked-by: Alexandre Belloni Acked-by: Tony Lindgren Acked-by: Nicolas Pitre Acked-by: Florian Fainelli Acked-by: Viresh Kumar Acked-by: Krzysztof Hałasa Signed-off-by: Arnd Bergmann arch/arm/mach-at91/pm.c | 2 +- arch/arm/mach-bcm/bcm_kona_smc.c | 2 +- arch/arm/mach-cns3xxx/core.c | 2 +- arch/arm/mach-omap2/prm_common.c | 2 +- arch/arm/mach-omap2/vc.c | 2 +- arch/arm/mach-spear/time.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit b51e0ceed1f93a1eda3cbee328a396a188ec79e3 Merge: 6df2b42 8d7a10d Author: Greg Kroah-Hartman Date: Fri May 19 10:10:07 2017 +0200 Merge tag 'usb-serial-4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.12-rc2 Here's a fix for a long-standing issue in the ftdi_sio driver that prevented unprivileged users from updating the low-latency flag, something which became apparent after a recent change that restored the older setting of not using low-latency mode by default. A run of sparse revealed a couple of endianness issues that are now fixed, and addressed is also a user-triggerable division-by-zero in io_ti when debugging is enabled. Finally there are some new device ids, including a simplification of how we deal with a couple of older Olimex JTAG adapters. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold commit ee1d6d37b6b884383b501089be93ce94f2153028 Author: Amir Goldstein Date: Thu May 11 16:42:26 2017 +0300 ovl: mark upper dir with type origin entries "impure" When moving a merge dir or non-dir with copy up origin into a non-merge upper dir (a.k.a pure upper dir), we are marking the target parent dir "impure". ovl_iterate() iterates pure upper dirs directly, because there is no need to filter out whiteouts and merge dir content with lower dir. But for the case of an "impure" upper dir, ovl_iterate() will not be able to iterate the real upper dir directly, because it will need to lookup the origin inode and use it to fill d_ino. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/dir.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ fs/overlayfs/namei.c | 18 ++++++++++++++++-- fs/overlayfs/overlayfs.h | 3 +++ fs/overlayfs/ovl_entry.h | 1 + fs/overlayfs/util.c | 14 ++++++++++++++ 5 files changed, 79 insertions(+), 2 deletions(-) commit 3d27573ce32b47ba54e6680c77c26a700d67cc16 Author: Miklos Szeredi Date: Fri May 19 09:33:49 2017 +0200 ovl: remove unused arg from ovl_lookup_temp() Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 2 +- fs/overlayfs/dir.c | 8 ++++---- fs/overlayfs/overlayfs.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 21a228781104ae6fed7e720137ab024575071feb Author: Amir Goldstein Date: Wed May 17 00:12:41 2017 +0300 ovl: handle rename when upper doesn't support xattr On failure to set opaque/redirect xattr on rename, skip setting xattr and return -EXDEV. On failure to set opaque xattr when creating a new directory, -EIO is returned instead of -EOPNOTSUPP. Any failure to set those xattr will be recorded in super block and then setting any xattr on upper won't be attempted again. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/dir.c | 29 +++++++++++++++++++---------- fs/overlayfs/overlayfs.h | 1 - fs/overlayfs/util.c | 9 +-------- 3 files changed, 20 insertions(+), 19 deletions(-) commit 899e4aad15e93315fa18ab9e9c88904ad237cfa0 Author: David Daney Date: Tue May 16 11:36:52 2017 +0200 mmc: cavium-octeon: Use proper GPIO name for power control The devm_gpiod_get_optional() function appends a "-gpios" to the string passed to it, so if we want to find the "power-gpios" signal, we must pass "power" to this function. Fixes: 01d95843335c ("mmc: cavium: Add MMC support for Octeon SOCs.") Signed-off-by: David Daney [jglauber@cavium.com: removed point after subject line] Signed-off-by: Jan Glauber Signed-off-by: Ulf Hansson drivers/mmc/host/cavium-octeon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aca69344c8a99e7374d913e42ba9120c398ee16f Author: David Daney Date: Tue May 16 11:36:51 2017 +0200 mmc: cavium-octeon: Fix interrupt enable code OCTEON SoCs with CIU3 do not have interrupt masking local to the MMC bus interface. Unfortunately, some even have a diagnostic register at the same address of the enable register, which causes the interrupts to fire immediately if stored to, thus breaking the driver. The proper action on these SoCs is not to touch this register. Fixes: 01d95843335c ("mmc: cavium: Add MMC support for Octeon SOCs.") Signed-off-by: David Daney [jglauber@cavium.com: removed point after subject line] Signed-off-by: Jan Glauber Signed-off-by: Ulf Hansson drivers/mmc/host/cavium-octeon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec16187a631d410157791997cb29901466420485 Merge: 6a3538c bca5238 Author: Olof Johansson Date: Fri May 19 00:02:16 2017 -0700 Merge tag 'omap-for-v4.12/fixes-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Fixes for omaps for v4.12-rc cycle most consisting of few minor dts fixes for various devices. Also included is a memory controller (GPMC) debug output fix as without that the shown bootloader configured GPMC bus width will be wrong and won't work for kernel timings: - Add dra7 powerhold configuration to be able to shut down pmic correctly - Fix polarity for gta04 mcbsp4 clocks for modem - Fix Pandaboard CEC pin pull making it usable - Fix LogicPD Torpedo camera pin mux - Fix GPMC debug bus width - Reduce cpu thermal shutdown temperature * tag 'omap-for-v4.12/fixes-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: dra7: Reduce cpu thermal shutdown temperature memory: omap-gpmc: Fix debug output for access width ARM: dts: LogicPD Torpedo: Fix camera pin mux ARM: dts: omap4: enable CEC pin for Pandaboard A4 and ES ARM: dts: gta04: fix polarity of clocks for mcbsp4 ARM: dts: dra7: Add power hold and power controller properties to palmas Signed-off-by: Olof Johansson commit 6a3538c1744b1a45e723dc94efa6931e96ce5713 Merge: f4e506c e23c7f7 Author: Olof Johansson Date: Fri May 19 00:02:04 2017 -0700 Merge tag 'imx-fixes-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes i.MX fixes for 4.12: - A fix on GPCv2 power domain driver Kconfig which causes a build failure when CONFIG_PM is not set. - Pull down PMIC IRQ pin for imx53-qsrb board to prevent spurious PMIC interrupts from happening. - Remove board level OPP override for imx6sx-sdb to fix a boot crash seen on Rev.C boards. * tag 'imx-fixes-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx: add PM dependency for IMX7_PM_DOMAINS ARM: dts: imx6sx-sdb: Remove OPP override ARM: dts: imx53-qsrb: Pulldown PMIC IRQ pin Signed-off-by: Olof Johansson commit f4e506c5a3a026a28c99ca2cbc1c79aeca1a1b68 Author: Rob Herring Date: Wed May 17 16:52:30 2017 -0500 arm64: defconfig: enable options needed for QCom DB410c board Enable Qualcomm drivers needed to boot Dragonboard 410c with HDMI. This enables support for clocks, regulators, and USB PHY. Cc: Bjorn Andersson Cc: John Stultz Signed-off-by: Rob Herring [Olof: Turned off _RPM configs per follow-up email] Signed-off-by: Olof Johansson arch/arm64/configs/defconfig | 7 +++++++ 1 file changed, 7 insertions(+) commit bae3dee0992dcb336a591468376b046e5447997b Author: Jisheng Zhang Date: Tue May 16 14:17:20 2017 +0800 mmc: sdhci-xenon: kill xenon_clean_phy() Currently, the xenon_clean_phy() is only used for freeing phy_params. The phy_params is allocated by devm_kzalloc(), there's no need to free is explicitly. Signed-off-by: Jisheng Zhang Acked-by: Hu Ziji Acked-by: Adrian Hunter drivers/mmc/host/sdhci-xenon-phy.c | 14 +------------- drivers/mmc/host/sdhci-xenon.c | 6 +----- drivers/mmc/host/sdhci-xenon.h | 1 - 3 files changed, 2 insertions(+), 19 deletions(-) commit eb1e6716cc9c6fd22e706379ab082b4ac198a1b1 Author: Rob Herring Date: Wed May 17 16:52:29 2017 -0500 arm64: defconfig: sync with savedefconfig Sync the defconfig with savedefconfig as config options change/move over time. Generated with the following commands: make defconfig make savedefconfig cp defconfig arch/arm64/configs/defconfig Signed-off-by: Rob Herring Signed-off-by: Olof Johansson arch/arm64/configs/defconfig | 103 ++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 61 deletions(-) commit 877dd4b1f7986bd7ca31b1e69589289e4aa3e066 Author: Linus Walleij Date: Sun May 14 23:45:02 2017 +0200 ARM: configs: add a gemini defconfig It makes sense to have a stripped-down defconfig for just Gemini, as it is a pretty small platform used in NAS etc, and will use appended device tree. It is also quick to compile and test. Hopefully this defconfig can be a good base for distributions such as OpenWRT. I plan to add in the config options needed for the different variants of Gemini as we go along. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/configs/gemini_defconfig | 68 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit 3d2ba3fb544385f335ddb34afd97e480acabb87e Merge: 5cb1ac0 31d848a Author: Olof Johansson Date: Thu May 18 23:56:26 2017 -0700 Merge tag 'arm-soc/for-4.12/drivers-fixes' of http://github.com/Broadcom/stblinux into fixes This pull request contains Broadcom SoC drivers fixes for 4.12, please pull the following: - Florian removes the duplicate compatible string matched by the SUN_TOP_CTRL driver and instead uses the correct one for 7435 * tag 'arm-soc/for-4.12/drivers-fixes' of http://github.com/Broadcom/stblinux: soc: bcm: brcmstb: Correctly match 7435 SoC Signed-off-by: Olof Johansson commit 5cb1ac0f7906cea3d978e54023e9432e910579c8 Merge: d5d332d b155f05 Author: Olof Johansson Date: Thu May 18 23:55:53 2017 -0700 Merge tag 'arm-soc/for-4.12/devicetree-fixes' of http://github.com/Broadcom/stblinux into fixes This pull request contains Broadcom ARM-based SoC Device Tree fixes for 4.12, please pull the following: - Baruch provides several fixes for the Raspberry Pi (BCM2835) Device Tree source include file: uart0 pinctrl node names, pin number for i2c0, uart0 rts/cts pins and invalid uart1 pin, missing numbers for ethernet aliases * tag 'arm-soc/for-4.12/devicetree-fixes' of http://github.com/Broadcom/stblinux: ARM: dts: bcm2835: add index to the ethernet alias ARM: dts: bcm2835: fix uart0/uart1 pins ARM: dts: bcm2835: fix i2c0 pins ARM: dts: bcm2835: fix uart0 pinctrl node names Signed-off-by: Olof Johansson commit d5d332d3f7e8435e264a71b90178dee69428d630 Author: Olof Johansson Date: Fri May 12 20:13:26 2017 -0700 devicetree: Move include prefixes from arch to separate directory We use a directory under arch/$ARCH/boot/dts as an include path that has links outside of the subtree to find dt-bindings from under include/dt-bindings. That's been working well, but new DT architectures haven't been adding them by default. Recently there's been a desire to share some of the DT material between arm and arm64, which originally caused developers to create symlinks or relative includes between the subtrees. This isn't ideal -- it breaks if the DT files aren't stored in the exact same hierarchy as the kernel tree, and generally it's just icky. As a somewhat cleaner solution we decided to add a $ARCH/ prefix link once, and allow DTS files to reference dtsi (and dts) files in other architectures that way. Original approach was to create these links under each architecture, but it lead to the problem of recursive symlinks. As a remedy, move the include link directories out of the architecture trees into a common location. At the same time, they can now share one directory and one dt-bindings/ link as well. Fixes: 4027494ae6e3 ('ARM: dts: add arm/arm64 include symlinks') Reported-by: Russell King Reported-by: Omar Sandoval Reviewed-by: Heiko Stuebner Reviewed-by: Masahiro Yamada Tested-by: Heiko Stuebner Acked-by: Rob Herring Cc: Heiko Stuebner Cc: Mark Rutland Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Mikael Starvik Cc: Jesper Nilsson Cc: James Hogan Cc: Ralf Baechle Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Frank Rowand Cc: linux-arch Signed-off-by: Olof Johansson arch/arm/boot/dts/include/arm | 1 - arch/arm/boot/dts/include/arm64 | 1 - arch/arm/boot/dts/include/dt-bindings | 1 - arch/arm64/boot/dts/include/arm | 1 - arch/arm64/boot/dts/include/arm64 | 1 - arch/arm64/boot/dts/include/dt-bindings | 1 - arch/cris/boot/dts/include/dt-bindings | 1 - arch/metag/boot/dts/include/dt-bindings | 1 - arch/mips/boot/dts/include/dt-bindings | 1 - arch/powerpc/boot/dts/include/dt-bindings | 1 - scripts/Makefile.lib | 2 +- scripts/dtc/include-prefixes/arc | 1 + scripts/dtc/include-prefixes/arm | 1 + scripts/dtc/include-prefixes/arm64 | 1 + scripts/dtc/include-prefixes/c6x | 1 + scripts/dtc/include-prefixes/cris | 1 + scripts/dtc/include-prefixes/dt-bindings | 1 + scripts/dtc/include-prefixes/h8300 | 1 + scripts/dtc/include-prefixes/metag | 1 + scripts/dtc/include-prefixes/microblaze | 1 + scripts/dtc/include-prefixes/mips | 1 + scripts/dtc/include-prefixes/nios2 | 1 + scripts/dtc/include-prefixes/openrisc | 1 + scripts/dtc/include-prefixes/powerpc | 1 + scripts/dtc/include-prefixes/sh | 1 + scripts/dtc/include-prefixes/xtensa | 1 + 26 files changed, 16 insertions(+), 11 deletions(-) commit 5252d73756f318f182f2316acd78a6532041414d Merge: e841888 2ea659a Author: Olof Johansson Date: Thu May 18 23:54:47 2017 -0700 Merge tag 'v4.12-rc1' into fixes We've received a few fixes branches with -rc1 as base, but our contents was still at pre-rc1. Merge it in expliticly to make 'git merge --log' clear on hat was actually merged. Signed-off-by: Olof Johansson commit c71e6d804c88168ecf02aaf14e1fd5773d683b5f Author: Juergen Gross Date: Thu May 18 17:46:48 2017 +0200 xen: make xen_flush_tlb_all() static xen_flush_tlb_all() is used in arch/x86/xen/mmu.c only. Make it static. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross arch/x86/xen/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 989513a735f51407280acd91e436d83eb48514cd Author: Juergen Gross Date: Tue May 16 09:41:06 2017 +0200 xen: cleanup pvh leftovers from pv-only sources There are some leftovers testing for pvh guest mode in pv-only source files. Remove them. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross arch/x86/xen/enlighten_pv.c | 15 ++----- arch/x86/xen/mmu_pv.c | 102 +++++++++++++++++--------------------------- 2 files changed, 42 insertions(+), 75 deletions(-) commit a33d7d94eed92b23fbbc7b0de06a41b2bbaa49e3 Author: Steven Rostedt (VMware) Date: Fri May 12 13:15:45 2017 -0400 tracing: Make sure RCU is watching before calling a stack trace As stack tracing now requires "rcu watching", force RCU to be watching when recording a stack trace. Link: http://lkml.kernel.org/r/20170512172449.879684501@goodmis.org Acked-by: Paul E. McKenney Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit e41e53cd4fe331d0d1f06f8e4ed7e2cc63ee2c34 Author: Michael Ellerman Date: Thu May 18 20:37:31 2017 +1000 powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash virt_addr_valid() is supposed to tell you if it's OK to call virt_to_page() on an address. What this means in practice is that it should only return true for addresses in the linear mapping which are backed by a valid PFN. We are failing to properly check that the address is in the linear mapping, because virt_to_pfn() will return a valid looking PFN for more or less any address. That bug is actually caused by __pa(), used in virt_to_pfn(). eg: __pa(0xc000000000010000) = 0x10000 # Good __pa(0xd000000000010000) = 0x10000 # Bad! __pa(0x0000000000010000) = 0x10000 # Bad! This started happening after commit bdbc29c19b26 ("powerpc: Work around gcc miscompilation of __pa() on 64-bit") (Aug 2013), where we changed the definition of __pa() to work around a GCC bug. Prior to that we subtracted PAGE_OFFSET from the value passed to __pa(), meaning __pa() of a 0xd or 0x0 address would give you something bogus back. Until we can verify if that GCC bug is no longer an issue, or come up with another solution, this commit does the minimal fix to make virt_addr_valid() work, by explicitly checking that the address is in the linear mapping region. Fixes: bdbc29c19b26 ("powerpc: Work around gcc miscompilation of __pa() on 64-bit") Signed-off-by: Michael Ellerman Reviewed-by: Paul Mackerras Reviewed-by: Balbir Singh Tested-by: Breno Leitao arch/powerpc/include/asm/page.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 1bad6c4a57efda0d5f5bf8a2403b21b1ed24875c Author: Long Li Date: Thu May 18 15:40:05 2017 -0700 scsi: zero per-cmd private driver data for each MQ I/O In lower layer driver's (LLD) scsi_host_template, the driver may optionally ask SCSI to allocate its private driver memory for each command, by specifying cmd_size. This memory is allocated at the end of scsi_cmnd by SCSI. Later when SCSI queues a command, the LLD can use scsi_cmd_priv to get to its private data. Some LLD, e.g. hv_storvsc, doesn't clear its private data before use. In this case, the LLD may get to stale or uninitialized data in its private driver memory. This may result in unexpected driver and hardware behavior. Fix this problem by also zeroing the private driver memory before passing them to LLD. Signed-off-by: Long Li Reviewed-by: Bart Van Assche Reviewed-by: KY Srinivasan Reviewed-by: Christoph Hellwig CC: # 4.11+ Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a351e40b6de550049423a26f7ded7b639e363d89 Author: Varun Prakash Date: Wed May 17 20:30:43 2017 +0530 scsi: csiostor: fix use after free in csio_hw_use_fwconfig() mbp pointer is passed to csio_hw_validate_caps() so call mempool_free() after calling csio_hw_validate_caps(). Signed-off-by: Varun Prakash Fixes: 541c571fa2fd ("csiostor:Use firmware version from cxgb4/t4fw_version.h") Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/csiostor/csio_hw.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 463f620b1256e0488d932088e04a372817e8c42e Author: Michał Potomski Date: Fri May 12 08:36:27 2017 +0200 scsi: ufs: Clean up some rpm/spm level SysFS nodes upon remove When reloading module these two attributes aren't cleaned up properly and they persist causing warnings when trying to load module again. Additionally they are not recreated properly due to that. Signed-off-by: Michał Potomski Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4fd8922689c9d73edc93473552987ea81e11463e Merge: e629612 2f720aa Author: Dave Airlie Date: Fri May 19 10:23:14 2017 +1000 Merge tag 'drm-intel-fixes-2017-05-18-1' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes drm/i915 fixes for v4.12-rc2 * tag 'drm-intel-fixes-2017-05-18-1' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: don't do allocate_va_range again on PIN_UPDATE drm/i915: Fix rawclk readout for g4x drm/i915: Fix runtime PM for LPE audio drm/i915/glk: Fix DSI "*ERROR* ULPS is still active" messages drm/i915/gvt: avoid unnecessary vgpu switch drm/i915/gvt: not to restore in-context mmio drm/i915/gvt: fix typo: "supporte" -> "support" commit e62961262141bd94341ae0dcb75d16a38542cc99 Merge: 6de92ab 2579b8b Author: Dave Airlie Date: Fri May 19 10:21:41 2017 +1000 Merge branch 'linux-4.12' of git://github.com/skeggsb/linux into drm-fixes misc nouveau fixes. * 'linux-4.12' of git://github.com/skeggsb/linux: drm/nouveau/fifo/gk104-: Silence a locking warning drm/nouveau/secboot: plug memory leak in ls_ucode_img_load_gr() error path drm/nouveau: Fix drm poll_helper handling commit 6de92ab875c201553a7c48e131d99fc78406a197 Merge: 389cf70 6bee9b7 Author: Dave Airlie Date: Fri May 19 10:20:53 2017 +1000 Merge tag 'drm-misc-fixes-2017-05-18' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes Driver Changes: - host1x: Fix link error when host1x is built-in and iova is a module (Arnd) - hlcdc: Fix arguments passed to drm_of_find_panel_or_bridge (Boris) Cc: Arnd Bergmann Cc: Boris Brezillon * tag 'drm-misc-fixes-2017-05-18' of git://anongit.freedesktop.org/git/drm-misc: drm/atmel-hlcdc: Fix output initialization gpu: host1x: select IOMMU_IOVA commit 389cf7080c062eb5fae525858d2e70aea0422d89 Merge: 8b4822d 657314b Author: Dave Airlie Date: Fri May 19 10:16:06 2017 +1000 Merge branch 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux into drm-fixes one etnaviv fence leak fix. * 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux: drm/etnaviv: don't put fence in case of submit failure commit 8b4822de59d5d9919b9b045183a36c673ce20b73 Merge: 667f867 d82dd0e Author: Linus Torvalds Date: Thu May 18 12:04:41 2017 -0700 Merge tag 'md/4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD fixes from Shaohua Li: - Several bug fixes for raid5-cache from Song Liu, mainly handle journal disk error - Fix bad block handling in choosing raid1 disk from Tomasz Majchrzak - Simplify external metadata array sysfs handling from Artur Paszkiewicz - Optimize raid0 discard handling from me, now raid0 will dispatch large discard IO directly to underlayer disks. * tag 'md/4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: raid1: prefer disk without bad blocks md/r5cache: handle sync with data in write back cache md/r5cache: gracefully handle journal device errors for writeback mode md/raid1/10: avoid unnecessary locking md/raid5-cache: in r5l_do_submit_io(), submit io->split_bio first md/md0: optimize raid0 discard handling md: don't return -EAGAIN in md_allow_write for external metadata arrays md/raid5: make use of spin_lock_irq over local_irq_disable + spin_lock commit aaf0475a0b3f445000c50f7fc75d5e846bf7ee7b Author: Wei Yongjun Date: Thu May 18 15:22:41 2017 +0000 xen/9pfs: p9_trans_xen_init and p9_trans_xen_exit can be static Fixes the following sparse warnings: net/9p/trans_xen.c:528:5: warning: symbol 'p9_trans_xen_init' was not declared. Should it be static? net/9p/trans_xen.c:540:6: warning: symbol 'p9_trans_xen_exit' was not declared. Should it be static? Signed-off-by: Wei Yongjun Reviewed-by: Stefano Stabellini net/9p/trans_xen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14e3995e63759b80eb22a3c06958d105db4d3f79 Author: Wei Yongjun Date: Tue May 16 14:22:47 2017 +0000 xen/9pfs: fix return value check in xen_9pfs_front_probe() In case of error, the function xenbus_read() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 71ebd71921e4 ("xen/9pfs: connect to the backend") Signed-off-by: Wei Yongjun Reviewed-by: Stefano Stabellini net/9p/trans_xen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 667f867c93d0117dec83bc5be9018d1a3a94044d Merge: a58a260 c0e01ea Author: Linus Torvalds Date: Thu May 18 11:40:21 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Don't allow negative TCP reordering values, from Soheil Hassas Yeganeh. 2) Don't overflow while parsing ipv6 header options, from Craig Gallek. 3) Handle more cleanly the case where an individual route entry during a dump will not fit into the allocated netlink SKB, from David Ahern. 4) Add missing CONFIG_INET dependency for mlx5e, from Arnd Bergmann. 5) Allow neighbour updates to converge more quickly via gratuitous ARPs, from Ihar Hrachyshka. 6) Fix compile error from CONFIG_INET is disabled, from Eric Dumazet. 7) Fix use after free in x25 protocol init, from Lin Zhang. 8) Valid VLAN pvid ranges passed into br_validate(), from Tobias Jungel. 9) NULL out address lists in child sockets in SCTP, this is similar to the fix we made for inet connection sockets last week. From Eric Dumazet. 10) Fix NULL deref in mlxsw driver, from Ido Schimmel. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits) mlxsw: spectrum: Avoid possible NULL pointer dereference sh_eth: Do not print an error message for probe deferral sh_eth: Use platform device for printing before register_netdev() mlxsw: spectrum_router: Fix rif counter freeing routine mlxsw: spectrum_dpipe: Fix incorrect entry index cxgb4: update latest firmware version supported qmi_wwan: add another Lenovo EM74xx device ID sctp: do not inherit ipv6_{mc|ac|fl}_list from parent udp: make *udp*_queue_rcv_skb() functions static bridge: netlink: check vlan_default_pvid range net: ethernet: faraday: To support device tree usage. net: x25: fix one potential use-after-free issue bpf: adjust verifier heuristics ipv6: Check ip6_find_1stfragopt() return value properly. selftests/bpf: fix broken build due to types.h bnxt_en: Check status of firmware DCBX agent before setting DCB_CAP_DCBX_HOST. bnxt_en: Call bnxt_dcb_init() after getting firmware DCBX configuration. net: fix compile error in skb_orphan_partial() ipv6: Prevent overrun when parsing v6 header options neighbour: update neigh timestamps iff update is effective ... commit a58a260fd96b7217b7abc49d107874206f3c55e3 Merge: 5396a01 48078d2 Author: Linus Torvalds Date: Thu May 18 11:21:10 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: "Three sparc bug fixes" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc/ftrace: Fix ftrace graph time measurement sparc: Fix -Wstringop-overflow warning sparc64: Fix mapping of 64k pages with MAP_FIXED commit 5396a018f3e0793204985c205622711f61afadfd Merge: 16d95c4 05d8cba Author: Linus Torvalds Date: Thu May 18 11:17:34 2017 -0700 Merge tag 'kbuild-fixes-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fix from Masahiro Yamada: "Fix headers_install to not delete pre-existing headers in the install destination" * tag 'kbuild-fixes-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: skip install/check of headers right under uapi directories commit 16d95c43965d287987505bbd875e59e5b3c9b131 Merge: af5d285 3fd3722 Author: Linus Torvalds Date: Thu May 18 10:04:42 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull pid namespace fixes from Eric Biederman: "These are two bugs that turn out to have simple fixes that were reported during the merge window. Both of these issues have existed for a while and it just happens that they both were reported at almost the same time" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: pid_ns: Fix race between setns'ed fork() and zap_pid_ns_processes() pid_ns: Sleep in TASK_INTERRUPTIBLE in zap_pid_ns_processes commit 455a9a60b6d4afb293b0e63ec75cc8e82912a767 Author: Shile Zhang Date: Mon Apr 10 22:39:33 2017 +0800 watchdog: wdt_pci: fix build error if define SOFTWARE_REBOOT To fix following build error when SOFTWARE_REBOOT is defined: CC [M] driver/watchdog/wdt_pci.o driver/watchdog/wdt_pci.c: In function 'wdtpci_interrupt': driver/watchdog/wdt_pci.c:335:3: error: too many arguments to function 'emergency_restart' emergency_restart(NULL); ^ In file included from driver/watchdog/wdt_pci.c:51:0: include/linux/reboot.h:80:13: note: declared here extern void emergency_restart(void); ^ Signed-off-by: Shile Zhang Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/wdt_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ddad77b90cb52075b5a9498f0621e3e265cc19f Author: Tomas Melin Date: Mon Mar 20 09:29:31 2017 +0200 watchdog: cadence_wdt: fix timeout setting wdt_timeout must not be initialized to CDNS_WDT_DEFAULT_TIMEOUT in order to allow the value to be overriddden by a device tree setting. This way, the default timeout value will be used only in case module_param has not been set, or device tree timeout-sec has not been defined. Signed-off-by: Tomas Melin Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/cadence_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46c319b848268dab3f0e7c4a5b6e9146d3bca8a4 Author: Johan Hovold Date: Mon Mar 13 13:49:45 2017 +0100 watchdog: pcwd_usb: fix NULL-deref at probe Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Signed-off-by: Johan Hovold Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/pcwd_usb.c | 3 +++ 1 file changed, 3 insertions(+) commit ddd6d240b26dcb8b8dc98bd493eba944dd97ebc8 Author: Alexandre Belloni Date: Thu Mar 2 18:31:12 2017 +0100 watchdog: sama5d4: fix race condition WDT_MR and WDT_CR must not updated within three slow clock periods after the last ping (write to WDT_CR or WDT_MR). Ensure enough time has elapsed before writing those registers. wdt_write() waits for 4 periods to ensure at least 3 edges are seen by the IP. Signed-off-by: Alexandre Belloni Acked-by: Wenyou.Yang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sama5d4_wdt.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) commit 015b528644a84b0018d3286ecd6ea5f82dce0180 Author: Alexandre Belloni Date: Thu Mar 2 18:31:11 2017 +0100 watchdog: sama5d4: fix WDDIS handling The datasheet states: "When setting the WDDIS bit, and while it is set, the fields WDV and WDD must not be modified." Because the whole configuration is already cached inside .mr, wait for the user to enable the watchdog to configure it so it is enabled and configured at the same time (what the IP is actually expecting). When the watchdog is already enabled, it is not an issue to reconfigure it. Signed-off-by: Alexandre Belloni Acked-by: Wenyou.Yang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sama5d4_wdt.c | 48 ++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 18 deletions(-) commit d8f1deaa5256aba3296025e103e8abb96f3e6479 Author: Arnd Bergmann Date: Thu Mar 2 13:09:52 2017 +0100 watchdog: orion: fix compile-test dependencies I ran into one corner case with the orion watchdog using the atomic_io_modify interface: drivers/watchdog/orion_wdt.o: In function `orion_stop': orion_wdt.c:(.text.orion_stop+0x28): undefined reference to `atomic_io_modify' drivers/watchdog/orion_wdt.o: In function `armada375_stop': orion_wdt.c:(.text.armada375_stop+0x28): undefined reference to `atomic_io_modify' This function is available on all 32-bit ARM builds except for ebsa110, so we have to specifically exclude that from compile-testing. Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible") Signed-off-by: Arnd Bergmann Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af5d28565f5822fb6a280d2de07315dad487f1f1 Merge: dac94e2 90b4f30 Author: Linus Torvalds Date: Thu May 18 09:38:09 2017 -0700 Merge tag 'hwmon-for-linus-v4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fix from Guenter Roeck: "Fix problem with hotplug state machine in coretemp driver" * tag 'hwmon-for-linus-v4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (coretemp) Handle frozen hotplug state correctly commit da4c279942b05727088774df224c0734688b4cbc Author: Johan Hovold Date: Thu May 18 17:33:01 2017 +0200 serial: enable serdev support Enable serdev support by using the new device-registration helpers. Reviewed-by: Rob Herring Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8cde11b2baa1d02eb2eb955dfd47d9f2a12f12cf Author: Johan Hovold Date: Thu May 18 17:33:00 2017 +0200 tty/serdev: add serdev registration interface Add a new interface for registering a serdev controller and clients, and a helper function to deregister serdev devices (or a tty device) that were previously registered using the new interface. Once every driver currently using the tty_port_register_device() helpers have been vetted and converted to use the new serdev registration interface (at least for deregistration), we can move serdev registration to the current helpers and get rid of the serdev-specific functions. Reviewed-by: Rob Herring Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/serdev-ttyport.c | 6 ++- drivers/tty/tty_port.c | 75 +++++++++++++++++++++++++++++++++++++ include/linux/serdev.h | 7 +++- include/linux/tty.h | 9 +++++ 4 files changed, 93 insertions(+), 4 deletions(-) commit c0e01eac7ada785fdeaea1ae5476ec1cf3b00374 Author: Ido Schimmel Date: Thu May 18 13:03:52 2017 +0200 mlxsw: spectrum: Avoid possible NULL pointer dereference In case we got an FDB notification for a port that doesn't exist we execute an FDB entry delete to prevent it from re-appearing the next time we poll for notifications. If the operation failed we would trigger a NULL pointer dereference as 'mlxsw_sp_port' is NULL. Fix it by reporting the error using the underlying bus device instead. Fixes: 12f1501e7511 ("mlxsw: spectrum: remove FDB entry in case we get unknown object notification") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b7ce520e9f71ff65d0aa0ad86223f94ae4095fae Author: Geert Uytterhoeven Date: Thu May 18 15:01:35 2017 +0200 sh_eth: Do not print an error message for probe deferral EPROBE_DEFER is not an error, hence printing an error message like sh-eth ee700000.ethernet: failed to initialise MDIO may confuse the user. To fix this, suppress the error message in case of probe deferral. While at it, shorten the message, and add the actual error code. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5f5c5449acad0cd3322e53e1ac68c044483b0aa5 Author: Geert Uytterhoeven Date: Thu May 18 15:01:34 2017 +0200 sh_eth: Use platform device for printing before register_netdev() The MDIO initialization failure message is printed using the network device, before it has been registered, leading to: (null): failed to initialise MDIO Use the platform device instead to fix this: sh-eth ee700000.ethernet: failed to initialise MDIO Fixes: daacf03f0bbfefee ("sh_eth: Register MDIO bus before registering the network device") Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b16c4c48390eb14a1bb4a06702a8c65b837c4566 Merge: 1ac91bf 6b1206b Author: David S. Miller Date: Thu May 18 11:04:00 2017 -0400 Merge branch 'mlxsw-fixes' Jiri Pirko says: ==================== mlxsw: couple of fixes Couple of fixes from Arkadi ==================== Signed-off-by: David S. Miller commit 6b1206bbbce6092b2ec412125300889e6e551bc2 Author: Arkadi Sharshevsky Date: Thu May 18 09:18:53 2017 +0200 mlxsw: spectrum_router: Fix rif counter freeing routine During rif counter freeing the counter index can be invalid. Add check of validity before freeing the counter. Fixes: e0c0afd8aa4e ("mlxsw: spectrum: Support for counters on router interfaces") Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 3 +++ 1 file changed, 3 insertions(+) commit 6dd4aba36f2dca00c3b6976a0d59c5cee16ad545 Author: Arkadi Sharshevsky Date: Thu May 18 09:18:52 2017 +0200 mlxsw: spectrum_dpipe: Fix incorrect entry index In case of disabled counters the entry index will be incorrect. Fix this by moving the entry index set before the counter status check. Fixes: 2ba5999f009d ("mlxsw: spectrum: Add Support for erif table entries access") Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9434cec130a941e8a0698d598dfa5499dbdeb949 Author: Christophe JAILLET Date: Fri May 5 21:08:44 2017 +0200 firmware: Google VPD: Fix memory allocation error handling This patch fixes several issues: - if the 1st 'kzalloc' fails, we dereference a NULL pointer - if the 2nd 'kzalloc' fails, there is a memory leak - if 'sysfs_create_bin_file' fails there is also a memory leak Fix it by adding a test after the first memory allocation and some error handling paths to correctly free memory if needed. Signed-off-by: Christophe JAILLET Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/vpd.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 6bee9b78a7a5ea257b24d93974538938c82b1169 Author: Boris Brezillon Date: Thu May 18 14:35:21 2017 +0200 drm/atmel-hlcdc: Fix output initialization drm_of_find_panel_or_bridge() is expecting np to point to the encoder node, not the bridge or panel this encoder is feeding. Moreover, the endpoint parameter passed to drm_of_find_panel_or_bridge() is always set to zero, which prevents us from probing all outputs. We also move the atmel_hlcdc_rgb_output allocation after the panel/bridge detection to avoid useless allocations. Reported-by: Alexandre Belloni Fixes: ebc944613567 ("drm: convert drivers to use drm_of_find_panel_or_bridge") Signed-off-by: Boris Brezillon Tested-by: Alexandre Belloni Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1495110921-4032-1-git-send-email-boris.brezillon@free-electrons.com drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 36 +++++++++--------------- 1 file changed, 14 insertions(+), 22 deletions(-) commit b299cde245b0b76c977f4291162cf668e087b408 Author: Julius Werner Date: Fri May 12 14:42:58 2017 -0700 drivers: char: mem: Check for address space wraparound with mmap() /dev/mem currently allows mmap() mappings that wrap around the end of the physical address space, which should probably be illegal. It circumvents the existing STRICT_DEVMEM permission check because the loop immediately terminates (as the start address is already higher than the end address). On the x86_64 architecture it will then cause a panic (from the BUG(start >= end) in arch/x86/mm/pat.c:reserve_memtype()). This patch adds an explicit check to make sure offset + size will not wrap around in the physical address type. Signed-off-by: Julius Werner Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/char/mem.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6bdc00d01e202ae11fa1cae0dacbef895434483d Author: Stefan Wahren Date: Fri Apr 28 13:47:21 2017 +0200 serdev: Restore serdev_device_write_buf for atomic context Starting with commit 6fe729c4bdae ("serdev: Add serdev_device_write subroutine") the function serdev_device_write_buf cannot be used in atomic context anymore (mutex_lock is sleeping). So restore the old behavior. Signed-off-by: Stefan Wahren Fixes: 6fe729c4bdae ("serdev: Add serdev_device_write subroutine") Acked-by: Rob Herring Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/core.c | 12 ++++++++++++ include/linux/serdev.h | 14 +++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) commit 88e2582e90bb89fe895ff0dceeb5d5ab65d07997 Author: Lucas Stach Date: Thu May 11 12:56:14 2017 +0200 serial: core: fix crash in uart_suspend_port With serdev we might end up with serial ports that have no cdev exported to userspace, as they are used as the bus interface to other devices. In that case serial_match_port() won't be able to find a matching tty_dev. Skip the irq wakeup enabling in that case, as serdev will make sure to keep the port active, as long as there are devices depending on it. Fixes: 8ee3fde04758 (tty_port: register tty ports with serdev bus) Signed-off-by: Lucas Stach Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 925bb1ce47f429f69aad35876df7ecd8c53deb7e Author: Vegard Nossum Date: Thu May 11 12:18:52 2017 +0200 tty: fix port buffer locking tty_insert_flip_string_fixed_flag() is racy against itself when called from the ioctl(TCXONC, TCION/TCIOFF) path [1] and the flush_to_ldisc() workqueue path [2]. The problem is that port->buf.tail->used is modified without consistent locking; the ioctl path takes tty->atomic_write_lock, whereas the workqueue path takes ldata->output_lock. We cannot simply take ldata->output_lock, since that is specific to the N_TTY line discipline. It might seem natural to try to take port->buf.lock inside tty_insert_flip_string_fixed_flag() and friends (where port->buf is actually used/modified), but this creates problems for flush_to_ldisc() which takes it before grabbing tty->ldisc_sem, o_tty->termios_rwsem, and ldata->output_lock. Therefore, the simplest solution for now seems to be to take tty->atomic_write_lock inside tty_port_default_receive_buf(). This lock is also used in the write path [3] with a consistent ordering. [1]: Call Trace: tty_insert_flip_string_fixed_flag pty_write tty_send_xchar // down_read(&o_tty->termios_rwsem) // mutex_lock(&tty->atomic_write_lock) n_tty_ioctl_helper n_tty_ioctl tty_ioctl // down_read(&tty->ldisc_sem) do_vfs_ioctl SyS_ioctl [2]: Workqueue: events_unbound flush_to_ldisc Call Trace: tty_insert_flip_string_fixed_flag pty_write tty_put_char __process_echoes commit_echoes // mutex_lock(&ldata->output_lock) n_tty_receive_buf_common n_tty_receive_buf2 tty_ldisc_receive_buf // down_read(&o_tty->termios_rwsem) tty_port_default_receive_buf // down_read(&tty->ldisc_sem) flush_to_ldisc // mutex_lock(&port->buf.lock) process_one_work [3]: Call Trace: tty_insert_flip_string_fixed_flag pty_write n_tty_write // mutex_lock(&ldata->output_lock) // down_read(&tty->termios_rwsem) do_tty_write (inline) // mutex_lock(&tty->atomic_write_lock) tty_write // down_read(&tty->ldisc_sem) __vfs_write vfs_write SyS_write The bug can result in about a dozen different crashes depending on what exactly gets corrupted when port->buf.tail->used points outside the buffer. The patch passes my LOCKDEP/PROVE_LOCKING testing but more testing is always welcome. Found using syzkaller. Cc: Signed-off-by: Vegard Nossum Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_port.c | 2 ++ 1 file changed, 2 insertions(+) commit 11d4d32158eeaf36fe1073a4a260193d7a19ccf1 Author: Johan Hovold Date: Wed Apr 26 12:30:04 2017 +0200 tty: ehv_bytechan: clean up init error handling Straighten out the initcall error handling to avoid deregistering a never-registered tty driver (something which would lead to a NULL-pointer dereference) in the most unlikely event that driver registration fails (e.g. we've run out of major numbers). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/tty/ehv_bytechan.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 1e948479b3d63e3ac0ecca13cbf4921c7d17c168 Author: Johan Hovold Date: Wed Apr 26 12:24:21 2017 +0200 serial: ifx6x60: fix use-after-free on module unload Make sure to deregister the SPI driver before releasing the tty driver to avoid use-after-free in the SPI remove callback where the tty devices are deregistered. Fixes: 72d4724ea54c ("serial: ifx6x60: Add modem power off function in the platform reboot process") Cc: stable # 3.8 Cc: Jun Chen Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/ifx6x60.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c9d6abed9e0a061de252a53ab687a1171502e81 Author: Alexey Khoroshilov Date: Sat May 13 00:36:22 2017 +0300 serial: altera_jtaguart: adding iounmap() The driver does ioremap(port->mapbase, ALTERA_JTAGUART_SIZE), but there is no any iounmap(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Acked-by: Tobias Klauser Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/altera_jtaguart.c | 1 + 1 file changed, 1 insertion(+) commit 2c0ac5b48a3586f612b85755b041ed7733dc8e6b Author: Jan Kiszka Date: Mon Apr 24 12:30:15 2017 +0200 serial: exar: Fix stuck MSIs After migrating 8250_exar to MSI in 172c33cb61da, we can get stuck without further interrupts because of the special wake-up event these chips send. They are only cleared by reading INT0. As we fail to do so during startup and shutdown, we can leave the interrupt line asserted, which is fatal with edge-triggered MSIs. Add the required reading of INT0 to startup and shutdown. Also account for the fact that a pending wake-up interrupt means we have to return 1 from exar_handle_irq. Drop the unneeded reading of INT1..3 along with this - those never reset anything. An alternative approach would have been disabling the wake-up interrupt. Unfortunately, this feature (REGB[17] = 1) is not available on the XR17D15X. Fixes: 172c33cb61da ("serial: exar: Enable MSI support") Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit be40597a1bc173bf9dadccdf5388b956f620ae8f Author: Christophe JAILLET Date: Fri May 12 16:35:45 2017 +0200 serial: efm32: Fix parity management in 'efm32_uart_console_get_options()' UARTn_FRAME_PARITY_ODD is 0x0300 UARTn_FRAME_PARITY_EVEN is 0x0200 So if the UART is configured for EVEN parity, it would be reported as ODD. Fix it by correctly testing if the 2 bits are set. Fixes: 3afbd89c9639 ("serial/efm32: add new driver") Signed-off-by: Christophe JAILLET Acked-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/efm32-uart.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit aee5da7838787f8ed47f825dbe09e2812acdf97b Author: Johan Hovold Date: Tue Apr 11 19:07:29 2017 +0200 serdev: fix tty-port client deregistration The port client data must be set when registering the serdev controller or client deregistration will fail (and the serdev devices are left registered and allocated) if the port was never opened in between. Make sure to clear the port client data on any probe errors to avoid a use-after-free when the client is later deregistered unconditionally (e.g. in a tty-port deregistration helper). Also move port client operation initialisation to registration. Note that the client ops must be restored on failed probe. Fixes: bed35c6dfa6a ("serdev: add a tty port controller driver") Signed-off-by: Johan Hovold Reviewed-by: Rob Herring Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/serdev-ttyport.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit d3ba126a226a6b6da021ebfea444a2a807cde945 Author: Johan Hovold Date: Tue Apr 11 19:07:28 2017 +0200 Revert "tty_port: register tty ports with serdev bus" This reverts commit 8ee3fde047589dc9c201251f07d0ca1dc776feca. The new serdev bus hooked into the tty layer in tty_port_register_device() by registering a serdev controller instead of a tty device whenever a serdev client is present, and by deregistering the controller in the tty-port destructor. This is broken in several ways: Firstly, it leads to a NULL-pointer dereference whenever a tty driver later deregisters its devices as no corresponding character device will exist. Secondly, far from every tty driver uses tty-port refcounting (e.g. serial core) so the serdev devices might never be deregistered or deallocated. Thirdly, deregistering at tty-port destruction is too late as the underlying device and structures may be long gone by then. A port is not released before an open tty device is closed, something which a registered serdev client can prevent from ever happening. A driver callback while the device is gone typically also leads to crashes. Many tty drivers even keep their ports around until the driver is unloaded (e.g. serial core), something which even if a late callback never happens, leads to leaks if a device is unbound from its driver and is later rebound. The right solution here is to add a new tty_port_unregister_device() helper and to never call tty_device_unregister() whenever the port has been claimed by serdev, but since this requires modifying just about every tty driver (and multiple subsystems) it will need to be done incrementally. Reverting the offending patch is the first step in fixing the broken lifetime assumptions. A follow-up patch will add a new pair of tty-device registration helpers, which a vetted tty driver can use to support serdev (initially serial core). When every tty driver uses the serdev helpers (at least for deregistration), we can add serdev registration to tty_port_register_device() again. Note that this also fixes another issue with serdev, which currently allocates and registers a serdev controller for every tty device registered using tty_port_device_register() only to immediately deregister and deallocate it when the corresponding OF node or serdev child node is missing. This should be addressed before enabling serdev for hot-pluggable buses. Signed-off-by: Johan Hovold Reviewed-by: Rob Herring Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_port.c | 12 ------------ 1 file changed, 12 deletions(-) commit 52499a6ad2aef20f7baf5872e97988c385170f1b Author: Arnd Bergmann Date: Wed Apr 19 20:24:41 2017 +0200 gpu: host1x: select IOMMU_IOVA When IOMMU_IOVA is not built-in but host1x is, we get a link error: drivers/gpu/host1x/dev.o: In function `host1x_remove': dev.c:(.text.host1x_remove+0x50): undefined reference to `put_iova_domain' drivers/gpu/host1x/dev.o: In function `host1x_probe': dev.c:(.text.host1x_probe+0x31c): undefined reference to `init_iova_domain' dev.c:(.text.host1x_probe+0x38c): undefined reference to `put_iova_domain' drivers/gpu/host1x/cdma.o: In function `host1x_cdma_init': cdma.c:(.text.host1x_cdma_init+0x238): undefined reference to `alloc_iova' cdma.c:(.text.host1x_cdma_init+0x2c0): undefined reference to `__free_iova' drivers/gpu/host1x/cdma.o: In function `host1x_cdma_deinit': cdma.c:(.text.host1x_cdma_deinit+0xb0): undefined reference to `free_iova' This adds the same select statement that we have for drm_tegra. Fixes: 404bfb78daf3 ("gpu: host1x: Add IOMMU support") Signed-off-by: Arnd Bergmann Reviewed-by: Mikko Perttunen Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170419182449.885312-1-arnd@arndb.de drivers/gpu/host1x/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 4c4fc90964b1cf205a67df566cc82ea1731bcb00 Author: Ard Biesheuvel Date: Thu May 18 12:29:55 2017 +0100 drivers/tty: 8250: only call fintek_8250_probe when doing port I/O Commit fa01e2ca9f53 ("serial: 8250: Integrate Fintek into 8250_base") modified the probing logic for PNP0501 devices, to remove a collision between the generic 16550A driver and the Fintek driver, which reused the same ACPI _HID. The Fintek device probe is now incorporated into the common 8250 probe path, and gets called for all discovered 16550A compatible devices, including ones that are MMIO mapped rather than IO mapped. However, the Fintek driver assumes the port base is a I/O address, and proceeds to probe some arbitrary offsets above it. This is generally a wrong thing to do, but on ARM systems (having no native port I/O), this may result in faulting accesses of completely unrelated MMIO regions in the PCI I/O space. Given that this is at serial probe time, this results in hard to diagnose crashes at boot. So let's restrict the Fintek probe to devices that we know are using port I/O in the first place. Fixes: fa01e2ca9f53 ("serial: 8250: Integrate Fintek into 8250_base") Suggested-by: Arnd Bergmann Reviewed-by: Ricardo Ribalda Signed-off-by: Ard Biesheuvel Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ac91bff9c65d4a5e0da244495ea6275fd514c5a Author: Ganesh Goudar Date: Thu May 18 00:08:16 2017 +0530 cxgb4: update latest firmware version supported Change t4fw_version.h to update latest firmware version number to 1.16.43.0. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4fw_version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 486181bcb3248e2f1977f4e69387a898234a4e1e Author: Bjørn Mork Date: Wed May 17 16:31:41 2017 +0200 qmi_wwan: add another Lenovo EM74xx device ID In their infinite wisdom, and never ending quest for end user frustration, Lenovo has decided to use a new USB device ID for the wwan modules in their 2017 laptops. The actual hardware is still the Sierra Wireless EM7455 or EM7430, depending on region. Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 2 ++ 1 file changed, 2 insertions(+) commit fdcee2cbb8438702ea1b328fb6e0ac5e9a40c7f8 Author: Eric Dumazet Date: Wed May 17 07:16:40 2017 -0700 sctp: do not inherit ipv6_{mc|ac|fl}_list from parent SCTP needs fixes similar to 83eaddab4378 ("ipv6/dccp: do not inherit ipv6_mc_list from parent"), otherwise bad things can happen. Signed-off-by: Eric Dumazet Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: David S. Miller net/sctp/ipv6.c | 3 +++ 1 file changed, 3 insertions(+) commit a3f96c47c8d4c38be71fdbb440a99968c764ba62 Author: Paolo Abeni Date: Wed May 17 14:52:16 2017 +0200 udp: make *udp*_queue_rcv_skb() functions static Since the udp memory accounting refactor, we don't need any more to export the *udp*_queue_rcv_skb(). Make them static and fix a couple of sparse warnings: net/ipv4/udp.c:1615:5: warning: symbol 'udp_queue_rcv_skb' was not declared. Should it be static? net/ipv6/udp.c:572:5: warning: symbol 'udpv6_queue_rcv_skb' was not declared. Should it be static? Fixes: 850cbaddb52d ("udp: use it's own memory accounting schema") Fixes: c915fe13cbaa ("udplite: fix NULL pointer dereference") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv4/udp.c | 4 ++-- net/ipv4/udp_impl.h | 1 - net/ipv6/udp.c | 4 ++-- net/ipv6/udp_impl.h | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) commit a285860211bf257b0e6d522dac6006794be348af Author: Tobias Jungel Date: Wed May 17 09:29:12 2017 +0200 bridge: netlink: check vlan_default_pvid range Currently it is allowed to set the default pvid of a bridge to a value above VLAN_VID_MASK (0xfff). This patch adds a check to br_validate and returns -EINVAL in case the pvid is out of bounds. Reproduce by calling: [root@test ~]# ip l a type bridge [root@test ~]# ip l a type dummy [root@test ~]# ip l s bridge0 type bridge vlan_filtering 1 [root@test ~]# ip l s bridge0 type bridge vlan_default_pvid 9999 [root@test ~]# ip l s dummy0 master bridge0 [root@test ~]# bridge vlan port vlan ids bridge0 9999 PVID Egress Untagged dummy0 9999 PVID Egress Untagged Fixes: 0f963b7592ef ("bridge: netlink: add support for default_pvid") Acked-by: Nikolay Aleksandrov Signed-off-by: Tobias Jungel Acked-by: Sabrina Dubroca Signed-off-by: David S. Miller net/bridge/br_netlink.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6266d465bde044a105f6c2d4e244680f951a2d70 Author: Miklos Szeredi Date: Thu May 18 16:11:24 2017 +0200 ovl: don't fail copy-up if upper doesn't support xattr Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 82b749b2c65e9d108c1c5598dc0a5f436b525f42 Author: Amir Goldstein Date: Wed May 17 00:12:40 2017 +0300 ovl: check on mount time if upper fs supports setting xattr xattr are needed by overlayfs for setting opaque dir, redirect dir and copy up origin. Check at mount time by trying to set the overlay.opaque xattr on the workdir and if that fails issue a warning message. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/overlayfs.h | 3 +++ fs/overlayfs/ovl_entry.h | 1 + fs/overlayfs/super.c | 13 +++++++++++++ fs/overlayfs/util.c | 21 +++++++++++++++++++++ 4 files changed, 38 insertions(+) commit 8137ae26d25303e7b5cfb418fd28b976461e5b6e Author: Amir Goldstein Date: Tue May 16 08:45:46 2017 +0300 ovl: fix creds leak in copy up error path Fixes: 42f269b92540 ("ovl: rearrange code in ovl_copy_up_locked()") Cc: # v4.11 Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 47ab37a19a8112670e63474016d5fbf86bc8737f Author: Greentime Hu Date: Wed May 17 15:28:19 2017 +0800 net: ethernet: faraday: To support device tree usage. To support device tree usage for ftmac100. Signed-off-by: Greentime Hu Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftmac100.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 64df6d525fcff1630098db9238bfd2b3e092d5c1 Author: linzhang Date: Wed May 17 12:05:07 2017 +0800 net: x25: fix one potential use-after-free issue The function x25_init is not properly unregister related resources on error handler.It is will result in kernel oops if x25_init init failed, so add properly unregister call on error handler. Also, i adjust the coding style and make x25_register_sysctl properly return failure. Signed-off-by: linzhang Signed-off-by: David S. Miller include/net/x25.h | 4 ++-- net/x25/af_x25.c | 24 ++++++++++++++++-------- net/x25/sysctl_net_x25.c | 5 ++++- 3 files changed, 22 insertions(+), 11 deletions(-) commit 66ea5974b36b73129bbdc129847ec73cecb3f14d Author: Randy Dunlap Date: Mon May 15 10:16:30 2017 -0700 MAINTAINERS: greybus-dev list is members-only The greybus-dev mailing list is a members-only list and is moderated for non-subscribers. Signed-off-by: Randy Dunlap Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6df2b42f7c040d57d9ecb67244e04e905ab87ac6 Author: Peter Ujfalusi Date: Wed May 17 11:23:11 2017 -0500 usb: musb: tusb6010_omap: Do not reset the other direction's packet size We have one register for each EP to set the maximum packet size for both TX and RX. If for example an RX programming would happen before the previous TX transfer finishes we would reset the TX packet side. To fix this issue, only modify the TX or RX part of the register. Fixes: 550a7375fe72 ("USB: Add MUSB and TUSB support") Signed-off-by: Peter Ujfalusi Tested-by: Tony Lindgren Signed-off-by: Bin Liu Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/tusb6010_omap.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 3c50ffef25855a9d9e4b07b02d756a8cdd653069 Author: Tony Lindgren Date: Wed May 17 11:23:10 2017 -0500 usb: musb: Fix trying to suspend while active for OTG configurations Commit d8e5f0eca1e8 ("usb: musb: Fix hardirq-safe hardirq-unsafe lock order error") caused a regression where musb keeps trying to enable host mode with no cable connected. This seems to be caused by the fact that now phy is enabled earlier, and we are wrongly trying to force USB host mode on an OTG port. The errors we are getting are "trying to suspend as a_idle while active". For ports configured as OTG, we should not need to do anything to try to force USB host mode on it's OTG port. Trying to force host mode in this case just seems to completely confuse the musb state machine. Let's fix the issue by making musb_host_setup() attempt to force the mode only if port_mode is configured for host mode. Fixes: d8e5f0eca1e8 ("usb: musb: Fix hardirq-safe hardirq-unsafe lock order error") Cc: Johan Hovold Cc: stable Reported-by: Laurent Pinchart Reported-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_host.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 4b148d5144d64ee135b8924350cb0b3a7fd21150 Author: Thomas Petazzoni Date: Wed May 17 18:32:06 2017 +0300 usb: host: xhci-plat: propagate return value of platform_get_irq() platform_get_irq() returns an error code, but the xhci-plat driver ignores it and always returns -ENODEV. This is not correct, and prevents -EPROBE_DEFER from being propagated properly. CC: Signed-off-by: Thomas Petazzoni Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 604d02a2a66ab7f93fd3b2bde3698c29ef057b65 Author: Mathias Nyman Date: Wed May 17 18:32:05 2017 +0300 xhci: Fix command ring stop regression in 4.11 In 4.11 TRB completion codes were renamed to match spec. Completion codes for command ring stopped and endpoint stopped were mixed, leading to failures while handling a stopped command ring. Use the correct completion code for command ring stopped events. Fixes: 0b7c105a04ca ("usb: host: xhci: rename completion codes to match spec") Cc: # 4.11 Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 2 +- drivers/usb/host/xhci-ring.c | 8 ++++---- drivers/usb/host/xhci.c | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) commit 5db851cf20857c5504b146046e97cb7781f2a743 Author: Matthias Lange Date: Wed May 17 18:32:04 2017 +0300 xhci: remove GFP_DMA flag from allocation There is no reason to restrict allocations to the first 16MB ISA DMA addresses. It is causing problems in a virtualization setup with enabled IOMMU (x86_64). The result is that USB is not working in the VM. CC: Signed-off-by: Matthias Lange Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63aea0dbab90a2461faaae357cbc8cfd6c8de9fe Author: Alan Stern Date: Wed May 17 18:32:03 2017 +0300 USB: xhci: fix lock-inversion problem With threaded interrupts, bottom-half handlers are called with interrupts enabled. Therefore they can't safely use spin_lock(); they have to use spin_lock_irqsave(). Lockdep warns about a violation occurring in xhci_irq(): ========================================================= [ INFO: possible irq lock inversion dependency detected ] 4.11.0-rc8-dbg+ #1 Not tainted --------------------------------------------------------- swapper/7/0 just changed the state of lock: (&(&ehci->lock)->rlock){-.-...}, at: [] ehci_hrtimer_func+0x29/0xc0 [ehci_hcd] but this lock took another, HARDIRQ-unsafe lock in the past: (hcd_urb_list_lock){+.....} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(hcd_urb_list_lock); local_irq_disable(); lock(&(&ehci->lock)->rlock); lock(hcd_urb_list_lock); lock(&(&ehci->lock)->rlock); *** DEADLOCK *** no locks held by swapper/7/0. the shortest dependencies between 2nd lock and 1st lock: -> (hcd_urb_list_lock){+.....} ops: 252 { HARDIRQ-ON-W at: __lock_acquire+0x602/0x1280 lock_acquire+0xd5/0x1c0 _raw_spin_lock+0x2f/0x40 usb_hcd_unlink_urb_from_ep+0x1b/0x60 [usbcore] xhci_giveback_urb_in_irq.isra.45+0x70/0x1b0 [xhci_hcd] finish_td.constprop.60+0x1d8/0x2e0 [xhci_hcd] xhci_irq+0xdd6/0x1fa0 [xhci_hcd] usb_hcd_irq+0x26/0x40 [usbcore] irq_forced_thread_fn+0x2f/0x70 irq_thread+0x149/0x1d0 kthread+0x113/0x150 ret_from_fork+0x2e/0x40 This patch fixes the problem. Signed-off-by: Alan Stern Reported-and-tested-by: Bart Van Assche CC: Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6a29beef9d1b16c762e469d77e28c3de3f5c3dbb Author: Peter Chen Date: Wed May 17 18:32:02 2017 +0300 usb: host: xhci-ring: don't need to clear interrupt pending for MSI enabled hcd According to xHCI spec Figure 30: Interrupt Throttle Flow Diagram If PCI Message Signaled Interrupts (MSI or MSI-X) are enabled, then the assertion of the Interrupt Pending (IP) flag in Figure 30 generates a PCI Dword write. The IP flag is automatically cleared by the completion of the PCI write. the MSI enabled HCs don't need to clear interrupt pending bit, but hcd->irq = 0 doesn't equal to MSI enabled HCD. At some Dual-role controller software designs, it sets hcd->irq as 0 to avoid HCD requesting interrupt, and they want to decide when to call usb_hcd_irq by software. Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 5 +---- drivers/usb/host/xhci.c | 5 +++-- include/linux/usb/hcd.h | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) commit 7480d912d549f414e0ce39331870899e89a5598c Author: Peter Chen Date: Wed May 17 18:32:01 2017 +0300 usb: host: xhci-mem: allocate zeroed Scratchpad Buffer According to xHCI ch4.20 Scratchpad Buffers, the Scratchpad Buffer needs to be zeroed. ... The following operations take place to allocate Scratchpad Buffers to the xHC: ... b. Software clears the Scratchpad Buffer to '0' Cc: stable Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0c16630d35a874e82bdf2088f58ecaca1024315 Author: Mathias Nyman Date: Wed May 17 18:32:00 2017 +0300 xhci: apply PME_STUCK_QUIRK and MISSING_CAS quirk for Denverton Intel Denverton microserver is Atom based and need the PME and CAS quirks as well. Cc: stable Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 7bc5d5aff356f3ba16c4d1e9eaf95cc99b7574ab Author: Mathias Nyman Date: Wed May 17 18:31:59 2017 +0300 usb: xhci: trace URB before giving it back instead of after Don't access any members of a URB after giving it back. URB might be freed by then already. Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3e7dec054174fdddae33eaa0032a82c3f42181d Author: Dan Carpenter Date: Thu May 18 10:38:53 2017 +0300 KVM: Silence underflow warning in avic_get_physical_id_entry() Smatch complains that we check cap the upper bound of "index" but don't check for negatives. It's a false positive because "index" is never negative. But it's also simple enough to make it unsigned which makes the code easier to audit. Signed-off-by: Dan Carpenter Signed-off-by: Radim Krčmář arch/x86/kvm/svm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d8db7ae4eeebb278aa68a231a003e7102f635a4d Author: Hans de Goede Date: Thu May 18 13:06:44 2017 +0200 drm/i915: Fix new -Wint-in-bool-context gcc compiler warning This commit fixes the following compiler warning: drivers/gpu/drm/i915/intel_dsi.c: In function ‘intel_dsi_prepare’: drivers/gpu/drm/i915/intel_dsi.c:1487:23: warning: ?: using integer constants in boolean context [-Wint-in-bool-context] PORT_A ? PORT_C : PORT_A), Fixes: f4c3a88e5f04 ("drm/i915: Tighten mmio arrays for MIPI_PORT") Signed-off-by: Hans de Goede Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170518110644.9902-1-hdegoede@redhat.com (cherry picked from commit 0ad4dc887d4168448e8c801aa4edd8fe1e0bd534) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55c315ee09d3bd37f9d71e85e54d6ebe675b6462 Merge: b401ee0 fa472fa Author: Radim Krčmář Date: Thu May 18 14:40:32 2017 +0200 Merge tag 'kvm-arm-for-v4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm KVM/ARM Fixes for v4.12-rc2. Includes: - A fix for a build failure introduced in -rc1 when tracepoints are enabled on 32-bit ARM. - Disabling use of stack pointer protection in the hyp code which can cause panics. - A handful of VGIC fixes. - A fix to the init of the redistributors on GICv3 systems that prevented boot with kvmtool on GICv3 systems introduced in -rc1. - A number of race conditions fixed in our MMU handling code. - A fix for the guest being able to program the debug extensions for the host on the 32-bit side. commit 171d8b9363725e122b164e6b9ef2acf2f751e387 Author: Matthew Auld Date: Tue May 16 09:55:14 2017 +0100 drm/i915: use vma->size for appgtt allocate_va_range For the aliasing ppgtt we clear the va range up to vma->size, but seem to allocate up to vma->node.size, which is a little inconsistent given that vma->node.size >= vma->size. Not that is really matters all that much since we preallocate anyway, but for consistency just use vma->size. Fixes: ff685975d97f ("drm/i915: Move allocate_va_range to GTT") Signed-off-by: Matthew Auld Cc: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170516085514.5853-1-matthew.auld@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson (cherry picked from commit d567232cbd9ec2a289ddffea4013b7265bbcc3d5) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4681ee21d62cfed4364e09ec50ee8e88185dd628 Author: Joonas Lahtinen Date: Thu May 18 11:49:39 2017 +0300 drm/i915: Do not sync RCU during shrinking Due to the complex dependencies between workqueues and RCU, which are not easily detected by lockdep, do not synchronize RCU during shrinking. On low-on-memory systems (mem=1G for example), the RCU sync leads to all system workqueus freezing and unrelated lockdep splats are displayed according to reports. GIT bisecting done by J. R. Okajima points to the commit where RCU syncing was extended. RCU sync gains us very little benefit in real life scenarios where the amount of memory used by object backing storage is dominant over the metadata under RCU, so drop it altogether. " Yeeeaah, if core could just, go ahead and reclaim RCU queues, that'd be great. " - Chris Wilson, 2016 (0eafec6d3244) v2: More information to commit message. v3: Remove "grep _rcu_" escapee from i915_gem_shrink_all (Andrea) Fixes: c053b5a506d3 ("drm/i915: Don't call synchronize_rcu_expedited under struct_mutex") Suggested-by: Chris Wilson Reported-by: J. R. Okajima Signed-off-by: Joonas Lahtinen Reviewed-by: Chris Wilson Tested-by: Hugh Dickins Tested-by: Andrea Arcangeli Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: J. R. Okajima Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Jani Nikula Cc: # v4.11+ (cherry picked from commit 73cc0b9aa9afa5ba65d92e46ded61d29430d72a4) Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1495097379-573-1-git-send-email-joonas.lahtinen@linux.intel.com drivers/gpu/drm/i915/i915_gem_shrinker.c | 5 ----- 1 file changed, 5 deletions(-) commit 751a9c763849f5859cb69ea44b0430d00672f637 Author: Willem de Bruijn Date: Wed May 17 11:24:47 2017 -0400 netfilter: xtables: fix build failure from COMPAT_XT_ALIGN outside CONFIG_COMPAT The patch in the Fixes references COMPAT_XT_ALIGN in the definition of XT_DATA_TO_USER, outside an #ifdef CONFIG_COMPAT block. Split XT_DATA_TO_USER into separate compat and non compat variants and define the first inside an CONFIG_COMPAT block. This simplifies both variants by removing branches inside the macro. Fixes: 324318f0248c ("netfilter: xtables: zero padding in data_to_user") Reported-by: Stephen Rothwell Signed-off-by: Willem de Bruijn Signed-off-by: Pablo Neira Ayuso net/netfilter/x_tables.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit fa472fa91a5a0b241f5ddae927d2e235d07545df Author: Christoffer Dall Date: Wed May 17 21:16:09 2017 +0200 KVM: arm/arm64: Hold slots_lock when unregistering kvm io bus devices We were not holding the kvm->slots_lock as required when calling kvm_io_bus_unregister_dev() as required. This only affects the error path, but still, let's do our due diligence. Reported by: Eric Auger Signed-off-by: Christoffer Dall Reviewed-by: Eric Auger virt/kvm/arm/vgic/vgic-mmio-v3.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 552c9f47f8d451830a6b47151c6d2db77f77cc3e Author: Christoffer Dall Date: Wed May 17 13:12:51 2017 +0200 KVM: arm/arm64: Fix bug when registering redist iodevs If userspace creates the VCPUs after initializing the VGIC, then we end up in a situation where we trigger a bug in kvm_vcpu_get_idx(), because it is called prior to adding the VCPU into the vcpus array on the VM. There is no tight coupling between the VCPU index and the area of the redistributor region used for the VCPU, so we can simply ensure that all creations of redistributors are serialized per VM, and increment an offset when we successfully add a redistributor. The vgic_register_redist_iodev() function can be called from two paths: vgic_redister_all_redist_iodev() which is called via the kvm_vgic_addr() device attribute handler. This patch already holds the kvm->lock mutex. The other path is via kvm_vgic_vcpu_init, which is called through a longer chain from kvm_vm_ioctl_create_vcpu(), which releases the kvm->lock mutex just before calling kvm_arch_vcpu_create(), so we can simply take this mutex again later for our purposes. Fixes: ab6f468c10 ("KVM: arm/arm64: Register iodevs when setting redist base and creating VCPUs") Signed-off-by: Christoffer Dall Tested-by: Jean-Philippe Brucker Reviewed-by: Eric Auger include/kvm/arm_vgic.h | 5 ++++- virt/kvm/arm/vgic/vgic-init.c | 5 ++++- virt/kvm/arm/vgic/vgic-mmio-v3.c | 9 ++++++--- 3 files changed, 14 insertions(+), 5 deletions(-) commit f36afd38c5372a7cd5b363786fd62076c8b28427 Author: Arnd Bergmann Date: Wed May 17 23:19:01 2017 +0200 clk: sunxi-ng: enable SUNXI_CCU_MP for PRCM The newly added PRCM CCU driver uses SUNXI_CCU_MP_WITH_MUX_GATE, which causes a link error when no other driver enables SUNXI_CCU_MP: drivers/clk/built-in.o:(.data+0x5c8c8): undefined reference to `ccu_mp_ops' This adds an explicit 'select' statement for it. Signed-off-by: Arnd Bergmann Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 9933e113c2e87a9f46a40fde8dafbf801dca1ab9 Author: Herbert Xu Date: Wed May 10 03:48:23 2017 +0800 crypto: skcipher - Add missing API setkey checks The API setkey checks for key sizes and alignment went AWOL during the skcipher conversion. This patch restores them. Cc: Fixes: 4e6c3df4d729 ("crypto: skcipher - Add low-level skcipher...") Reported-by: Baozeng Signed-off-by: Herbert Xu crypto/skcipher.c | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) commit 3c2ce60bdd3d57051bf85615deec04a694473840 Author: Daniel Borkmann Date: Thu May 18 03:00:06 2017 +0200 bpf: adjust verifier heuristics Current limits with regards to processing program paths do not really reflect today's needs anymore due to programs becoming more complex and verifier smarter, keeping track of more data such as const ALU operations, alignment tracking, spilling of PTR_TO_MAP_VALUE_ADJ registers, and other features allowing for smarter matching of what LLVM generates. This also comes with the side-effect that we result in fewer opportunities to prune search states and thus often need to do more work to prove safety than in the past due to different register states and stack layout where we mismatch. Generally, it's quite hard to determine what caused a sudden increase in complexity, it could be caused by something as trivial as a single branch somewhere at the beginning of the program where LLVM assigned a stack slot that is marked differently throughout other branches and thus causing a mismatch, where verifier then needs to prove safety for the whole rest of the program. Subsequently, programs with even less than half the insn size limit can get rejected. We noticed that while some programs load fine under pre 4.11, they get rejected due to hitting limits on more recent kernels. We saw that in the vast majority of cases (90+%) pruning failed due to register mismatches. In case of stack mismatches, majority of cases failed due to different stack slot types (invalid, spill, misc) rather than differences in spilled registers. This patch makes pruning more aggressive by also adding markers that sit at conditional jumps as well. Currently, we only mark jump targets for pruning. For example in direct packet access, these are usually error paths where we bail out. We found that adding these markers, it can reduce number of processed insns by up to 30%. Another option is to ignore reg->id in probing PTR_TO_MAP_VALUE_OR_NULL registers, which can help pruning slightly as well by up to 7% observed complexity reduction as stand-alone. Meaning, if a previous path with register type PTR_TO_MAP_VALUE_OR_NULL for map X was found to be safe, then in the current state a PTR_TO_MAP_VALUE_OR_NULL register for the same map X must be safe as well. Last but not least the patch also adds a scheduling point and bumps the current limit for instructions to be processed to a more adequate value. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 7dd7eb9513bd02184d45f000ab69d78cb1fa1531 Author: David S. Miller Date: Wed May 17 22:54:11 2017 -0400 ipv6: Check ip6_find_1stfragopt() return value properly. Do not use unsigned variables to see if it returns a negative error or not. Fixes: 2423496af35d ("ipv6: Prevent overrun when parsing v6 header options") Reported-by: Julia Lawall Signed-off-by: David S. Miller net/ipv6/ip6_offload.c | 9 ++++----- net/ipv6/ip6_output.c | 7 +++---- net/ipv6/udp_offload.c | 8 +++++--- 3 files changed, 12 insertions(+), 12 deletions(-) commit 545a028190dae4437aac4f86da7c8ab20857647c Author: Steven Rostedt (VMware) Date: Tue May 16 14:58:35 2017 -0400 kprobes: Document how optimized kprobes are removed from module unload Thomas discovered a bug where the kprobe trace tests had a race condition where the kprobe_optimizer called from a delayed work queue that does the optimizing and "unoptimizing" of a kprobe, can try to modify the text after it has been freed by the init code. The kprobe trace selftest is a special case, and Thomas and myself investigated to see if there's a chance that this could also be a bug with module unloading, as the code is not obvious to how it handles this. After adding lots of printks, I figured it out. Thomas suggested that this should be commented so that others will not have to go through this exercise again. Link: http://lkml.kernel.org/r/20170516145835.3827d3aa@gandalf.local.home Acked-by: Masami Hiramatsu Suggested-by: Thomas Gleixner Signed-off-by: Steven Rostedt (VMware) kernel/kprobes.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b172296b90b799c8b634521c248e9316581c8154 Author: Naveen N. Rao Date: Tue May 16 23:21:28 2017 +0530 selftests/ftrace: Add test to remove instance with active event triggers Add a test to ensure we clean up properly when removing an instance with active event triggers. Link: http://lkml.kernel.org/r/c479465b2009397708d6c52c8561e1523c22cd31.1494956770.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Naveen N. Rao Signed-off-by: Steven Rostedt (VMware) tools/testing/selftests/ftrace/test.d/instances/instance-event.tc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d2ffb8d3cc3458e2102b2f067a2e82c84947deea Author: Naveen N. Rao Date: Tue May 16 23:21:27 2017 +0530 selftests/ftrace: Fix bashisms Fix a few bashisms in ftrace selftests. Link: http://lkml.kernel.org/r/5fbf4613eef0766918fa04e3ff537cae271223ee.1494956770.git.naveen.n.rao@linux.vnet.ibm.com Acked-by: Masami Hiramatsu Signed-off-by: Naveen N. Rao Signed-off-by: Steven Rostedt (VMware) tools/testing/selftests/ftrace/ftracetest | 2 +- tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc | 2 +- tools/testing/selftests/ftrace/test.d/functions | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 8a49f3e03c8ac52fe1b706fffb13142295fa0c47 Author: Steven Rostedt (VMware) Date: Wed May 17 21:53:32 2017 -0400 ftrace: Remove #ifdef from code and add clear_ftrace_function_probes() stub No need to add ugly #ifdefs in the code. Having a standard stub file is much prettier. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 2 -- kernel/trace/trace.h | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) commit a0e6369e4bac8844825ae1a66ccd122b290dcc86 Author: Naveen N. Rao Date: Tue May 16 23:21:26 2017 +0530 ftrace/instances: Clear function triggers when removing instances If instance directories are deleted while there are registered function triggers: # cd /sys/kernel/debug/tracing/instances # mkdir test # echo "schedule:enable_event:sched:sched_switch" > test/set_ftrace_filter # rmdir test Unable to handle kernel paging request for data at address 0x00000008 Unable to handle kernel paging request for data at address 0x00000008 Faulting instruction address: 0xc0000000021edde8 Oops: Kernel access of bad area, sig: 11 [#1] SMP NR_CPUS=2048 NUMA pSeries Modules linked in: iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp tun bridge stp llc kvm iptable_filter fuse binfmt_misc pseries_rng rng_core vmx_crypto ib_iser rdma_cm iw_cm ib_cm ib_core libiscsi scsi_transport_iscsi ip_tables x_tables autofs4 btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c multipath virtio_net virtio_blk virtio_pci crc32c_vpmsum virtio_ring virtio CPU: 8 PID: 8694 Comm: rmdir Not tainted 4.11.0-nnr+ #113 task: c0000000bab52800 task.stack: c0000000baba0000 NIP: c0000000021edde8 LR: c0000000021f0590 CTR: c000000002119620 REGS: c0000000baba3870 TRAP: 0300 Not tainted (4.11.0-nnr+) MSR: 8000000000009033 CR: 22002422 XER: 20000000 CFAR: 00007fffabb725a8 DAR: 0000000000000008 DSISR: 40000000 SOFTE: 0 GPR00: c00000000220f750 c0000000baba3af0 c000000003157e00 0000000000000000 GPR04: 0000000000000040 00000000000000eb 0000000000000040 0000000000000000 GPR08: 0000000000000000 0000000000000113 0000000000000000 c00000000305db98 GPR12: c000000002119620 c00000000fd42c00 0000000000000000 0000000000000000 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20: 0000000000000000 0000000000000000 c0000000bab52e90 0000000000000000 GPR24: 0000000000000000 00000000000000eb 0000000000000040 c0000000baba3bb0 GPR28: c00000009cb06eb0 c0000000bab52800 c00000009cb06eb0 c0000000baba3bb0 NIP [c0000000021edde8] ring_buffer_lock_reserve+0x8/0x4e0 LR [c0000000021f0590] trace_event_buffer_lock_reserve+0xe0/0x1a0 Call Trace: [c0000000baba3af0] [c0000000021f96c8] trace_event_buffer_commit+0x1b8/0x280 (unreliable) [c0000000baba3b60] [c00000000220f750] trace_event_buffer_reserve+0x80/0xd0 [c0000000baba3b90] [c0000000021196b8] trace_event_raw_event_sched_switch+0x98/0x180 [c0000000baba3c10] [c0000000029d9980] __schedule+0x6e0/0xab0 [c0000000baba3ce0] [c000000002122230] do_task_dead+0x70/0xc0 [c0000000baba3d10] [c0000000020ea9c8] do_exit+0x828/0xd00 [c0000000baba3dd0] [c0000000020eaf70] do_group_exit+0x60/0x100 [c0000000baba3e10] [c0000000020eb034] SyS_exit_group+0x24/0x30 [c0000000baba3e30] [c00000000200bcec] system_call+0x38/0x54 Instruction dump: 60000000 60420000 7d244b78 7f63db78 4bffaa09 393efff8 793e0020 39200000 4bfffecc 60420000 3c4c00f7 3842a020 <81230008> 2f890000 409e02f0 a14d0008 ---[ end trace b917b8985d0e650b ]--- Unable to handle kernel paging request for data at address 0x00000008 Faulting instruction address: 0xc0000000021edde8 Unable to handle kernel paging request for data at address 0x00000008 Faulting instruction address: 0xc0000000021edde8 Faulting instruction address: 0xc0000000021edde8 To address this, let's clear all registered function probes before deleting the ftrace instance. Link: http://lkml.kernel.org/r/c5f1ca624043690bd94642bb6bffd3f2fc504035.1494956770.git.naveen.n.rao@linux.vnet.ibm.com Reported-by: Michael Ellerman Signed-off-by: Naveen N. Rao Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 8 ++++++++ kernel/trace/trace.c | 3 +++ kernel/trace/trace.h | 1 + 3 files changed, 12 insertions(+) commit cbab567c3dc7d6f443b4c84eab76e8967d5c1dee Author: Naveen N. Rao Date: Tue May 16 23:21:25 2017 +0530 ftrace: Simplify glob handling in unregister_ftrace_function_probe_func() Handle a NULL glob properly and simplify the check. Link: http://lkml.kernel.org/r/5df74d4ffb4721db6d5a22fa08ca031d62ead493.1494956770.git.naveen.n.rao@linux.vnet.ibm.com Reviewed-by: Masami Hiramatsu Signed-off-by: Naveen N. Rao Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 30e7d894c1478c88d50ce94ddcdbd7f9763d9cdd Author: Thomas Gleixner Date: Wed May 17 10:19:49 2017 +0200 tracing/kprobes: Enforce kprobes teardown after testing Enabling the tracer selftest triggers occasionally the warning in text_poke(), which warns when the to be modified page is not marked reserved. The reason is that the tracer selftest installs kprobes on functions marked __init for testing. These probes are removed after the tests, but that removal schedules the delayed kprobes_optimizer work, which will do the actual text poke. If the work is executed after the init text is freed, then the warning triggers. The bug can be reproduced reliably when the work delay is increased. Flush the optimizer work and wait for the optimizing/unoptimizing lists to become empty before returning from the kprobes tracer selftest. That ensures that all operations which were queued due to the probes removal have completed. Link: http://lkml.kernel.org/r/20170516094802.76a468bb@gandalf.local.home Signed-off-by: Thomas Gleixner Acked-by: Masami Hiramatsu Cc: stable@vger.kernel.org Fixes: 6274de498 ("kprobes: Support delayed unoptimizing") Signed-off-by: Steven Rostedt (VMware) include/linux/kprobes.h | 3 +++ kernel/kprobes.c | 2 +- kernel/trace/trace_kprobe.c | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) commit b9ef0326c05a008c3c576bd4d676208b50c344d5 Author: Steven Rostedt Date: Wed May 17 11:14:35 2017 -0400 tracing: Move postpone selftests to core from early_initcall I hit the following lockdep splat when booting with ftrace selftests enabled, as well as CONFIG_PREEMPT and LOCKDEP. Testing dynamic ftrace ops #1: (1 0 1 0 0) (1 1 2 0 0) (2 1 3 0 169) (2 2 4 0 50066) ------------[ cut here ]------------ WARNING: CPU: 0 PID: 13 at kernel/rcu/srcutree.c:202 check_init_srcu_struct+0x60/0x70 Modules linked in: CPU: 0 PID: 13 Comm: rcu_tasks_kthre Not tainted 4.12.0-rc1-test+ #587 Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v02.05 05/07/2012 task: ffff880119628040 task.stack: ffffc900006a4000 RIP: 0010:check_init_srcu_struct+0x60/0x70 RSP: 0000:ffffc900006a7d98 EFLAGS: 00010246 RAX: 0000000000000246 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff880119628040 RSI: 00000000ffffffff RDI: ffffffff81e5fb40 RBP: ffffc900006a7e20 R08: 00000023b403c000 R09: 0000000000000001 R10: ffffc900006a7e40 R11: 0000000000000000 R12: ffffffff81e5fb40 R13: 0000000000000286 R14: ffff880119628040 R15: ffffc900006a7e98 FS: 0000000000000000(0000) GS:ffff88011ea00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff88011edff000 CR3: 0000000001e0f000 CR4: 00000000001406f0 Call Trace: ? __synchronize_srcu+0x6e/0x140 ? lock_acquire+0xdc/0x1d0 ? ktime_get_mono_fast_ns+0x5d/0xb0 synchronize_srcu+0x6f/0x110 ? synchronize_srcu+0x6f/0x110 rcu_tasks_kthread+0x20a/0x540 kthread+0x114/0x150 ? __rcu_read_unlock+0x70/0x70 ? kthread_create_on_node+0x40/0x40 ret_from_fork+0x2e/0x40 Code: f6 83 70 06 00 00 03 49 89 c5 74 0d be 01 00 00 00 48 89 df e8 42 fa ff ff 4c 89 ee 4c 89 e7 e8 b7 42 75 00 5b 41 5c 41 5d 5d c3 <0f> ff eb aa 66 90 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 ---[ end trace 5c3f4206ce50f6ac ]--- What happens is that the selftests include a creating of a dynamically allocated ftrace_ops, which requires the use of synchronize_rcu_tasks() which uses srcu, and triggers the above warning. It appears that synchronize_rcu_tasks() is not set up at early_initcall(), but it is at core_initcall(). By moving the tests down to that location works out properly. Link: http://lkml.kernel.org/r/20170517111435.7388c033@gandalf.local.home Acked-by: "Paul E. McKenney" Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa1f058d7d9244423b8c5a75b9484b1115df7f02 Author: Jisheng Zhang Date: Mon Apr 24 12:35:51 2017 +0000 usb: chipidea: udc: fix NULL pointer dereference if udc_start failed Fix below NULL pointer dereference. we set ci->roles[CI_ROLE_GADGET] too early in ci_hdrc_gadget_init(), if udc_start() fails due to some reason, the ci->roles[CI_ROLE_GADGET] check in ci_hdrc_gadget_destroy can't protect us. We fix this issue by only setting ci->roles[CI_ROLE_GADGET] if udc_start() succeed. [ 1.398550] Unable to handle kernel NULL pointer dereference at virtual address 00000000 ... [ 1.448600] PC is at dma_pool_free+0xb8/0xf0 [ 1.453012] LR is at dma_pool_free+0x28/0xf0 [ 2.113369] [] dma_pool_free+0xb8/0xf0 [ 2.118857] [] destroy_eps+0x4c/0x68 [ 2.124165] [] ci_hdrc_gadget_destroy+0x28/0x50 [ 2.130461] [] ci_hdrc_probe+0x588/0x7e8 [ 2.136129] [] platform_drv_probe+0x50/0xb8 [ 2.142066] [] driver_probe_device+0x1fc/0x2a8 [ 2.148270] [] __device_attach_driver+0x9c/0xf8 [ 2.154563] [] bus_for_each_drv+0x58/0x98 [ 2.160317] [] __device_attach+0xc4/0x138 [ 2.166072] [] device_initial_probe+0x10/0x18 [ 2.172185] [] bus_probe_device+0x94/0xa0 [ 2.177940] [] device_add+0x3f0/0x560 [ 2.183337] [] platform_device_add+0x180/0x240 [ 2.189541] [] ci_hdrc_add_device+0x440/0x4f8 [ 2.195654] [] ci_hdrc_usb2_probe+0x13c/0x2d8 [ 2.201769] [] platform_drv_probe+0x50/0xb8 [ 2.207705] [] driver_probe_device+0x1fc/0x2a8 [ 2.213910] [] __driver_attach+0xac/0xb0 [ 2.219575] [] bus_for_each_dev+0x60/0xa0 [ 2.225329] [] driver_attach+0x20/0x28 [ 2.230816] [] bus_add_driver+0x1d0/0x238 [ 2.236571] [] driver_register+0x60/0xf8 [ 2.242237] [] __platform_driver_register+0x44/0x50 [ 2.248891] [] ci_hdrc_usb2_driver_init+0x18/0x20 [ 2.255365] [] do_one_initcall+0x38/0x128 [ 2.261121] [] kernel_init_freeable+0x1ac/0x250 [ 2.267414] [] kernel_init+0x10/0x100 [ 2.272810] [] ret_from_fork+0x10/0x50 Cc: stable Fixes: 3f124d233e97 ("usb: chipidea: add role init and destroy APIs") Signed-off-by: Jisheng Zhang Signed-off-by: Peter Chen drivers/usb/chipidea/udc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 62b97d502bb76c6e8d589e42e02bfcb7bdff0453 Author: Andrey Smirnov Date: Mon May 15 06:48:58 2017 -0700 usb: chipidea: imx: Do not access CLKONOFF on i.MX51 Unlike i.MX53, i.MX51's USBOH3 register file does not implemenent registers past offset 0x018, which includes MX53_USB_CLKONOFF_CTRL_OFFSET and trying to access that register on said platform results in external abort. Fix it by enabling CLKONOFF accessing codepath only for i.MX53. Cc: stable Fixes 3be3251db088 ("usb: chipidea: imx: Disable internal 60Mhz clock with ULPI PHY") Cc: cphealy@gmail.com Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov Signed-off-by: Peter Chen drivers/usb/chipidea/usbmisc_imx.c | 41 +++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) commit eeeb51d834d76c66784e7fe1a9ace3ce3f8d2af1 Author: James Smart Date: Tue May 16 20:52:29 2017 -0700 scsi: lpfc: fix build issue if NVME_FC_TARGET is not defined fix build issue if NVME_FC_TARGET is not defined. noop the code. The code will never be invoked if target mode is not enabled. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 2 ++ 1 file changed, 2 insertions(+) commit 53cf29d3b1bc5b86fcff5fdc52f873d79d908ef4 Author: Guilherme G. Piccoli Date: Wed May 17 19:02:17 2017 -0300 scsi: lpfc: Fix NULL pointer dereference during PCI error recovery Recent commit on patchset "lpfc updates for 11.2.0.14" fixed an issue about dereferencing a NULL pointer on port reset. The specific commit, named "lpfc: Fix system crash when port is reset.", is missing a check against NULL pointer on lpfc_els_flush_cmd() though. Since we destroy the queues on adapter resets, like in PCI error recovery path, we need the validation present on this patch in order to avoid a NULL pointer dereference when trying to flush commands of ELS wq, after it has been destroyed (which would lead to a kernel oops). Tested-by: Raphael Silva Signed-off-by: Guilherme G. Piccoli Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 579f1d926c66cc0bd3bd87b1fe2e091084b07430 Author: Yonghong Song Date: Wed May 17 15:18:05 2017 -0700 selftests/bpf: fix broken build due to types.h Commit 0a5539f66133 ("bpf: Provide a linux/types.h override for bpf selftests.") caused a build failure for tools/testing/selftest/bpf because of some missing types: $ make -C tools/testing/selftests/bpf/ ... In file included from /home/yhs/work/net-next/tools/testing/selftests/bpf/test_pkt_access.c:8: ../../../include/uapi/linux/bpf.h:170:3: error: unknown type name '__aligned_u64' __aligned_u64 key; ... /usr/include/linux/swab.h:160:8: error: unknown type name '__always_inline' static __always_inline __u16 __swab16p(const __u16 *p) ... The type __aligned_u64 is defined in linux:include/uapi/linux/types.h. The fix is to copy missing type definition into tools/testing/selftests/bpf/include/uapi/linux/types.h. Adding additional include "string.h" resolves __always_inline issue. Fixes: 0a5539f66133 ("bpf: Provide a linux/types.h override for bpf selftests.") Signed-off-by: Yonghong Song Signed-off-by: David S. Miller tools/testing/selftests/bpf/include/uapi/linux/types.h | 16 ++++++++++++++++ tools/testing/selftests/bpf/test_pkt_access.c | 1 + 2 files changed, 17 insertions(+) commit dac94e29110cd606dec37673644caf2cf6fd1dde Merge: 243bfd2 7e1b952 Author: Linus Torvalds Date: Wed May 17 14:21:15 2017 -0700 Merge tag 'for-4.12/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - a couple DM thin provisioning fixes - a few request-based DM and DM multipath fixes for issues that were made when merging Christoph's changes with Bart's changes for 4.12 - a DM bufio unsigned overflow fix - a couple pure fixes for the DM cache target. - various very small tweaks to the DM cache target that enable considerable speed improvements in the face of continuous IO. Given that the cache target was significantly reworked for 4.12 I see no reason to sit on these advances until 4.13 considering the favorable results associated with such minimalist tweaks. * tag 'for-4.12/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm cache: handle kmalloc failure allocating background_tracker struct dm bufio: make the parameter "retain_bytes" unsigned long dm mpath: multipath_clone_and_map must not return -EIO dm mpath: don't return -EIO from dm_report_EIO dm rq: add a missing break to map_request dm space map disk: fix some book keeping in the disk space map dm thin metadata: call precommit before saving the roots dm cache policy smq: don't do any writebacks unless IDLE dm cache: simplify the IDLE vs BUSY state calculation dm cache: track all IO to the cache rather than just the origin device's IO dm cache policy smq: stop preemptively demoting blocks dm cache policy smq: put newly promoted entries at the top of the multiqueue dm cache policy smq: be more aggressive about triggering a writeback dm cache policy smq: only demote entries in bottom half of the clean multiqueue dm cache: fix incorrect 'idle_time' reset in IO tracker commit 243bfd2c052dafe9e59fb0170434bfe706439156 Merge: b23afd3 83345d5 Author: Linus Torvalds Date: Wed May 17 14:13:44 2017 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Here are some bugfixes from I2C, especially removing a wrongly displayed error message for all i2c muxes" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: xgene: Set ACPI_COMPANION_I2C i2c: mv64xxx: don't override deferred probing when getting irq i2c: mux: only print failure message on error i2c: mux: reg: rename label to indicate what it does i2c: mux: reg: put away the parent i2c adapter on probe failure commit 33c35aa4817864e056fd772230b0c6b552e36ea2 Author: Waiman Long Date: Mon May 15 09:34:06 2017 -0400 cgroup: Prevent kill_css() from being called more than once The kill_css() function may be called more than once under the condition that the css was killed but not physically removed yet followed by the removal of the cgroup that is hosting the css. This patch prevents any harmm from being done when that happens. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo Cc: stable@vger.kernel.org # v4.5+ include/linux/cgroup-defs.h | 1 + kernel/cgroup/cgroup.c | 5 +++++ 2 files changed, 6 insertions(+) commit f917174caf71a470e520fbee0daf9d9e62da3ef6 Merge: 9142e900 f667724 Author: David S. Miller Date: Wed May 17 15:12:50 2017 -0400 Merge branch 'bnxt_en-DCBX-fixes' Michael Chan says: ==================== bnxt_en: DCBX fixes. 2 bug fixes for the case where the NIC's firmware DCBX agent is enabled. With these fixes, we will return the proper information to lldpad. ==================== Signed-off-by: David S. Miller commit f667724b99ad1afc91f16064d8fb293d2805bd57 Author: Michael Chan Date: Tue May 16 16:39:44 2017 -0400 bnxt_en: Check status of firmware DCBX agent before setting DCB_CAP_DCBX_HOST. Otherwise, all the host based DCBX settings from lldpad will fail if the firmware DCBX agent is running. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 87fe603274aa9889c05cca3c3e45675e1997cb13 Author: Michael Chan Date: Tue May 16 16:39:43 2017 -0400 bnxt_en: Call bnxt_dcb_init() after getting firmware DCBX configuration. In the current code, bnxt_dcb_init() is called too early before we determine if the firmware DCBX agent is running or not. As a result, we are not setting the DCB_CAP_DCBX_HOST and DCB_CAP_DCBX_LLD_MANAGED flags properly to report to DCBNL. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9142e9007f2d7ab58a587a1e1d921b0064a339aa Author: Eric Dumazet Date: Tue May 16 13:27:53 2017 -0700 net: fix compile error in skb_orphan_partial() If CONFIG_INET is not set, net/core/sock.c can not compile : net/core/sock.c: In function ‘skb_orphan_partial’: net/core/sock.c:1810:2: error: implicit declaration of function ‘skb_is_tcp_pure_ack’ [-Werror=implicit-function-declaration] if (skb_is_tcp_pure_ack(skb)) ^ Fix this by always including Fixes: f6ba8d33cfbb ("netem: fix skb_orphan_partial()") Signed-off-by: Eric Dumazet Reported-by: Paul Gortmaker Reported-by: Randy Dunlap Reported-by: Stephen Rothwell Signed-off-by: David S. Miller net/core/sock.c | 3 --- 1 file changed, 3 deletions(-) commit 48078d2dac0a26f84f5f3ec704f24f7c832cce14 Author: Liam R. Howlett Date: Wed May 17 11:47:00 2017 -0400 sparc/ftrace: Fix ftrace graph time measurement The ftrace function_graph time measurements of a given function is not accurate according to those recorded by ftrace using the function filters. This change pulls the x86_64 fix from 'commit 722b3c746953 ("ftrace/graph: Trace function entry before updating index")' into the sparc specific prepare_ftrace_return which stops ftrace from counting interrupted tasks in the time measurement. Example measurements for select_task_rq_fair running "hackbench 100 process 1000": | tracing/trace_stat/function0 | function_graph Before patch | 2.802 us | 4.255 us After patch | 2.749 us | 3.094 us Signed-off-by: Liam R. Howlett Signed-off-by: David S. Miller arch/sparc/kernel/ftrace.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit deba804c90642c8ed0f15ac1083663976d578f54 Author: Orlando Arias Date: Tue May 16 15:34:00 2017 -0400 sparc: Fix -Wstringop-overflow warning Greetings, GCC 7 introduced the -Wstringop-overflow flag to detect buffer overflows in calls to string handling functions [1][2]. Due to the way ``empty_zero_page'' is declared in arch/sparc/include/setup.h, this causes a warning to trigger at compile time in the function mem_init(), which is subsequently converted to an error. The ensuing patch fixes this issue and aligns the declaration of empty_zero_page to that of other architectures. Thank you. Cheers, Orlando. [1] https://gcc.gnu.org/ml/gcc-patches/2016-10/msg02308.html [2] https://gcc.gnu.org/gcc-7/changes.html Signed-off-by: Orlando Arias -------------------------------------------------------------------------------- Signed-off-by: David S. Miller arch/sparc/include/asm/pgtable_32.h | 4 ++-- arch/sparc/include/asm/setup.h | 2 +- arch/sparc/mm/init_32.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit b6c41cb050d5debc7e4eaa0a81cbdbad72588891 Author: Nitin Gupta Date: Mon May 15 16:28:17 2017 -0700 sparc64: Fix mapping of 64k pages with MAP_FIXED An incorrect huge page alignment check caused mmap failure for 64K pages when MAP_FIXED is used with address not aligned to HPAGE_SIZE. Orabug: 25885991 Fixes: dcd1912d21a0 ("sparc64: Add 64K page size support") Signed-off-by: Nitin Gupta Signed-off-by: David S. Miller arch/sparc/include/asm/hugetlb.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2423496af35d94a87156b063ea5cedffc10a70a1 Author: Craig Gallek Date: Tue May 16 14:36:23 2017 -0400 ipv6: Prevent overrun when parsing v6 header options The KASAN warning repoted below was discovered with a syzkaller program. The reproducer is basically: int s = socket(AF_INET6, SOCK_RAW, NEXTHDR_HOP); send(s, &one_byte_of_data, 1, MSG_MORE); send(s, &more_than_mtu_bytes_data, 2000, 0); The socket() call sets the nexthdr field of the v6 header to NEXTHDR_HOP, the first send call primes the payload with a non zero byte of data, and the second send call triggers the fragmentation path. The fragmentation code tries to parse the header options in order to figure out where to insert the fragment option. Since nexthdr points to an invalid option, the calculation of the size of the network header can made to be much larger than the linear section of the skb and data is read outside of it. This fix makes ip6_find_1stfrag return an error if it detects running out-of-bounds. [ 42.361487] ================================================================== [ 42.364412] BUG: KASAN: slab-out-of-bounds in ip6_fragment+0x11c8/0x3730 [ 42.365471] Read of size 840 at addr ffff88000969e798 by task ip6_fragment-oo/3789 [ 42.366469] [ 42.366696] CPU: 1 PID: 3789 Comm: ip6_fragment-oo Not tainted 4.11.0+ #41 [ 42.367628] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.1-1ubuntu1 04/01/2014 [ 42.368824] Call Trace: [ 42.369183] dump_stack+0xb3/0x10b [ 42.369664] print_address_description+0x73/0x290 [ 42.370325] kasan_report+0x252/0x370 [ 42.370839] ? ip6_fragment+0x11c8/0x3730 [ 42.371396] check_memory_region+0x13c/0x1a0 [ 42.371978] memcpy+0x23/0x50 [ 42.372395] ip6_fragment+0x11c8/0x3730 [ 42.372920] ? nf_ct_expect_unregister_notifier+0x110/0x110 [ 42.373681] ? ip6_copy_metadata+0x7f0/0x7f0 [ 42.374263] ? ip6_forward+0x2e30/0x2e30 [ 42.374803] ip6_finish_output+0x584/0x990 [ 42.375350] ip6_output+0x1b7/0x690 [ 42.375836] ? ip6_finish_output+0x990/0x990 [ 42.376411] ? ip6_fragment+0x3730/0x3730 [ 42.376968] ip6_local_out+0x95/0x160 [ 42.377471] ip6_send_skb+0xa1/0x330 [ 42.377969] ip6_push_pending_frames+0xb3/0xe0 [ 42.378589] rawv6_sendmsg+0x2051/0x2db0 [ 42.379129] ? rawv6_bind+0x8b0/0x8b0 [ 42.379633] ? _copy_from_user+0x84/0xe0 [ 42.380193] ? debug_check_no_locks_freed+0x290/0x290 [ 42.380878] ? ___sys_sendmsg+0x162/0x930 [ 42.381427] ? rcu_read_lock_sched_held+0xa3/0x120 [ 42.382074] ? sock_has_perm+0x1f6/0x290 [ 42.382614] ? ___sys_sendmsg+0x167/0x930 [ 42.383173] ? lock_downgrade+0x660/0x660 [ 42.383727] inet_sendmsg+0x123/0x500 [ 42.384226] ? inet_sendmsg+0x123/0x500 [ 42.384748] ? inet_recvmsg+0x540/0x540 [ 42.385263] sock_sendmsg+0xca/0x110 [ 42.385758] SYSC_sendto+0x217/0x380 [ 42.386249] ? SYSC_connect+0x310/0x310 [ 42.386783] ? __might_fault+0x110/0x1d0 [ 42.387324] ? lock_downgrade+0x660/0x660 [ 42.387880] ? __fget_light+0xa1/0x1f0 [ 42.388403] ? __fdget+0x18/0x20 [ 42.388851] ? sock_common_setsockopt+0x95/0xd0 [ 42.389472] ? SyS_setsockopt+0x17f/0x260 [ 42.390021] ? entry_SYSCALL_64_fastpath+0x5/0xbe [ 42.390650] SyS_sendto+0x40/0x50 [ 42.391103] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 42.391731] RIP: 0033:0x7fbbb711e383 [ 42.392217] RSP: 002b:00007ffff4d34f28 EFLAGS: 00000246 ORIG_RAX: 000000000000002c [ 42.393235] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fbbb711e383 [ 42.394195] RDX: 0000000000001000 RSI: 00007ffff4d34f60 RDI: 0000000000000003 [ 42.395145] RBP: 0000000000000046 R08: 00007ffff4d34f40 R09: 0000000000000018 [ 42.396056] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000400aad [ 42.396598] R13: 0000000000000066 R14: 00007ffff4d34ee0 R15: 00007fbbb717af00 [ 42.397257] [ 42.397411] Allocated by task 3789: [ 42.397702] save_stack_trace+0x16/0x20 [ 42.398005] save_stack+0x46/0xd0 [ 42.398267] kasan_kmalloc+0xad/0xe0 [ 42.398548] kasan_slab_alloc+0x12/0x20 [ 42.398848] __kmalloc_node_track_caller+0xcb/0x380 [ 42.399224] __kmalloc_reserve.isra.32+0x41/0xe0 [ 42.399654] __alloc_skb+0xf8/0x580 [ 42.400003] sock_wmalloc+0xab/0xf0 [ 42.400346] __ip6_append_data.isra.41+0x2472/0x33d0 [ 42.400813] ip6_append_data+0x1a8/0x2f0 [ 42.401122] rawv6_sendmsg+0x11ee/0x2db0 [ 42.401505] inet_sendmsg+0x123/0x500 [ 42.401860] sock_sendmsg+0xca/0x110 [ 42.402209] ___sys_sendmsg+0x7cb/0x930 [ 42.402582] __sys_sendmsg+0xd9/0x190 [ 42.402941] SyS_sendmsg+0x2d/0x50 [ 42.403273] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 42.403718] [ 42.403871] Freed by task 1794: [ 42.404146] save_stack_trace+0x16/0x20 [ 42.404515] save_stack+0x46/0xd0 [ 42.404827] kasan_slab_free+0x72/0xc0 [ 42.405167] kfree+0xe8/0x2b0 [ 42.405462] skb_free_head+0x74/0xb0 [ 42.405806] skb_release_data+0x30e/0x3a0 [ 42.406198] skb_release_all+0x4a/0x60 [ 42.406563] consume_skb+0x113/0x2e0 [ 42.406910] skb_free_datagram+0x1a/0xe0 [ 42.407288] netlink_recvmsg+0x60d/0xe40 [ 42.407667] sock_recvmsg+0xd7/0x110 [ 42.408022] ___sys_recvmsg+0x25c/0x580 [ 42.408395] __sys_recvmsg+0xd6/0x190 [ 42.408753] SyS_recvmsg+0x2d/0x50 [ 42.409086] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 42.409513] [ 42.409665] The buggy address belongs to the object at ffff88000969e780 [ 42.409665] which belongs to the cache kmalloc-512 of size 512 [ 42.410846] The buggy address is located 24 bytes inside of [ 42.410846] 512-byte region [ffff88000969e780, ffff88000969e980) [ 42.411941] The buggy address belongs to the page: [ 42.412405] page:ffffea000025a780 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 42.413298] flags: 0x100000000008100(slab|head) [ 42.413729] raw: 0100000000008100 0000000000000000 0000000000000000 00000001800c000c [ 42.414387] raw: ffffea00002a9500 0000000900000007 ffff88000c401280 0000000000000000 [ 42.415074] page dumped because: kasan: bad access detected [ 42.415604] [ 42.415757] Memory state around the buggy address: [ 42.416222] ffff88000969e880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 42.416904] ffff88000969e900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 42.417591] >ffff88000969e980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 42.418273] ^ [ 42.418588] ffff88000969ea00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.419273] ffff88000969ea80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.419882] ================================================================== Reported-by: Andrey Konovalov Signed-off-by: Craig Gallek Signed-off-by: David S. Miller net/ipv6/ip6_offload.c | 2 ++ net/ipv6/ip6_output.c | 4 ++++ net/ipv6/output_core.c | 14 ++++++++------ net/ipv6/udp_offload.c | 2 ++ 4 files changed, 16 insertions(+), 6 deletions(-) commit 05d8cba4a1e8c7e2d1f91a24a2f3d26852938a04 Author: Masahiro Yamada Date: Tue May 16 14:15:03 2017 +0900 kbuild: skip install/check of headers right under uapi directories Since commit 61562f981e92 ("uapi: export all arch specifics directories"), "make INSTALL_HDR_PATH=$root/usr headers_install" deletes standard glibc headers and others in $(root)/usr/include. The cause of the issue is that headers_install now starts descending from arch/$(hdr-arch)/include/uapi with $(root)/usr/include for its destination when installing asm headers. So, headers already there are assumed to be unwanted. When headers_install starts descending from include/uapi with $(root)/usr/include for its destination, it works around the problem by creating an dummy destination $(root)/usr/include/uapi, but this is tricky. To fix the problem in a clean way is to skip headers install/check in include/uapi and arch/$(hdr-arch)/include/uapi because we know there are only sub-directories in uapi directories. A good side effect is the empty destination $(root)/usr/include/uapi will go away. I am also removing the trailing slash in the headers_check target to skip checking in arch/$(hdr-arch)/include/uapi. Fixes: 61562f981e92 ("uapi: export all arch specifics directories") Reported-by: Dan Williams Signed-off-by: Masahiro Yamada Tested-by: Dan Williams Acked-by: Nicolas Dichtel Makefile | 2 +- scripts/Makefile.headersinst | 43 +++++++++++++++++++++++++++---------------- 2 files changed, 28 insertions(+), 17 deletions(-) commit 49e67dd17649b60b4d54966e18ec9c80198227f0 Author: Johan Hovold Date: Wed May 17 17:29:09 2017 +0200 of: fdt: add missing allocation-failure check The memory allocator passed to __unflatten_device_tree() (e.g. a wrapped kzalloc) can fail so add the missing sanity check to avoid dereferencing a NULL pointer. Fixes: fe14042358fa ("of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree") Cc: stable # 2.6.38 Signed-off-by: Johan Hovold Signed-off-by: Rob Herring drivers/of/fdt.c | 3 +++ 1 file changed, 3 insertions(+) commit 828d4cdd012c8ffbf76625c3ff164312e8666784 Author: Shuah Khan Date: Tue May 16 10:08:08 2017 -0600 dtc: check.c fix compile error Fix the following compile error found on odroid-xu4: checks.c: In function ‘check_simple_bus_reg’: checks.c:876:41: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint64_t{aka long long unsigned int}’ [-Werror=format=] snprintf(unit_addr, sizeof(unit_addr), "%lx", reg); ^ checks.c:876:41: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint64_t {aka long long unsigned int}’ [-Werror=format=] cc1: all warnings being treated as errors Makefile:304: recipe for target 'checks.o' failed make: *** [checks.o] Error 1 Signed-off-by: Shuah Khan [dwg: Correct new format to be correct in general] Signed-off-by: David Gibson [robh: cherry-picked from upstream dtc commit 2a42b14d0d03] Signed-off-by: Rob Herring scripts/dtc/checks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63a1e1c95e60e798fa09ab3c536fb555aa5bbf2b Author: Mark Rutland Date: Tue May 16 15:18:05 2017 +0100 arm64/cpufeature: don't use mutex in bringup path Currently, cpus_set_cap() calls static_branch_enable_cpuslocked(), which must take the jump_label mutex. We call cpus_set_cap() in the secondary bringup path, from the idle thread where interrupts are disabled. Taking a mutex in this path "is a NONO" regardless of whether it's contended, and something we must avoid. We didn't spot this until recently, as ___might_sleep() won't warn for this case until all CPUs have been brought up. This patch avoids taking the mutex in the secondary bringup path. The poking of static keys is deferred until enable_cpu_capabilities(), which runs in a suitable context on the boot CPU. To account for the static keys being set later, cpus_have_const_cap() is updated to use another static key to check whether the const cap keys have been initialised, falling back to the caps bitmap until this is the case. This means that users of cpus_have_const_cap() gain should only gain a single additional NOP in the fast path once the const caps are initialised, but should always see the current cap value. The hyp code should never dereference the caps array, since the caps are initialized before we run the module initcall to initialise hyp. A check is added to the hyp init code to document this requirement. This change will sidestep a number of issues when the upcoming hotplug locking rework is merged. Signed-off-by: Mark Rutland Reviewed-by: Marc Zyniger Reviewed-by: Suzuki Poulose Acked-by: Will Deacon Cc: Christoffer Dall Cc: Peter Zijlstra Cc: Sebastian Sewior Cc: Thomas Gleixner Signed-off-by: Catalin Marinas arch/arm64/include/asm/cpufeature.h | 12 ++++++++++-- arch/arm64/include/asm/kvm_host.h | 8 ++++++-- arch/arm64/kernel/cpufeature.c | 23 +++++++++++++++++++++-- 3 files changed, 37 insertions(+), 6 deletions(-) commit 77d7123342dcf6442341b67816321d71da8b2b16 Author: Ihar Hrachyshka Date: Tue May 16 08:44:24 2017 -0700 neighbour: update neigh timestamps iff update is effective It's a common practice to send gratuitous ARPs after moving an IP address to another device to speed up healing of a service. To fulfill service availability constraints, the timing of network peers updating their caches to point to a new location of an IP address can be particularly important. Sometimes neigh_update calls won't touch neither lladdr nor state, for example if an update arrives in locktime interval. The neigh->updated value is tested by the protocol specific neigh code, which in turn will influence whether NEIGH_UPDATE_F_OVERRIDE gets set in the call to neigh_update() or not. As a result, we may effectively ignore the update request, bailing out of touching the neigh entry, except that we still bump its timestamps inside neigh_update. This may be a problem for updates arriving in quick succession. For example, consider the following scenario: A service is moved to another device with its IP address. The new device sends three gratuitous ARP requests into the network with ~1 seconds interval between them. Just before the first request arrives to one of network peer nodes, its neigh entry for the IP address transitions from STALE to DELAY. This transition, among other things, updates neigh->updated. Once the kernel receives the first gratuitous ARP, it ignores it because its arrival time is inside the locktime interval. The kernel still bumps neigh->updated. Then the second gratuitous ARP request arrives, and it's also ignored because it's still in the (new) locktime interval. Same happens for the third request. The node eventually heals itself (after delay_first_probe_time seconds since the initial transition to DELAY state), but it just wasted some time and require a new ARP request/reply round trip. This unfortunate behaviour both puts more load on the network, as well as reduces service availability. This patch changes neigh_update so that it bumps neigh->updated (as well as neigh->confirmed) only once we are sure that either lladdr or entry state will change). In the scenario described above, it means that the second gratuitous ARP request will actually update the entry lladdr. Ideally, we would update the neigh entry on the very first gratuitous ARP request. The locktime mechanism is designed to ignore ARP updates in a short timeframe after a previous ARP update was honoured by the kernel layer. This would require tracking timestamps for state transitions separately from timestamps when actual updates are received. This would probably involve changes in neighbour struct. Therefore, the patch doesn't tackle the issue of the first gratuitous APR ignored, leaving it for a follow-up. Signed-off-by: Ihar Hrachyshka Signed-off-by: David S. Miller net/core/neighbour.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 23d268eb240954e6e78f7cfab04f2b1e79f84489 Author: Ihar Hrachyshka Date: Tue May 16 07:53:43 2017 -0700 arp: honour gratuitous ARP _replies_ When arp_accept is 1, gratuitous ARPs are supposed to override matching entries irrespective of whether they arrive during locktime. This was implemented in commit 56022a8fdd87 ("ipv4: arp: update neighbour address when a gratuitous arp is received and arp_accept is set") There is a glitch in the patch though. RFC 2002, section 4.6, "ARP, Proxy ARP, and Gratuitous ARP", defines gratuitous ARPs so that they can be either of Request or Reply type. Those Reply gratuitous ARPs can be triggered with standard tooling, for example, arping -A option does just that. This patch fixes the glitch, making both Request and Reply flavours of gratuitous ARPs to behave identically. As per RFC, if gratuitous ARPs are of Reply type, their Target Hardware Address field should also be set to the link-layer address to which this cache entry should be updated. The field is present in ARP over Ethernet but not in IEEE 1394. In this patch, I don't consider any broadcasted ARP replies as gratuitous if the field is not present, to conform the standard. It's not clear whether there is such a thing for IEEE 1394 as a gratuitous ARP reply; until it's cleared up, we will ignore such broadcasts. Note that they will still update existing ARP cache entries, assuming they arrive out of locktime time interval. Signed-off-by: Ihar Hrachyshka Signed-off-by: David S. Miller net/ipv4/arp.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 8d7a10dd323993cc40bd37bce8bc570133b0c396 Author: Bjørn Mork Date: Wed May 17 16:30:50 2017 +0200 USB: serial: qcserial: add more Lenovo EM74xx device IDs In their infinite wisdom, and never ending quest for end user frustration, Lenovo has decided to use new USB device IDs for the wwan modules in their 2017 laptops. The actual hardware is still the Sierra Wireless EM7455 or EM7430, depending on region. Cc: Signed-off-by: Bjørn Mork Signed-off-by: Johan Hovold drivers/usb/serial/qcserial.c | 2 ++ 1 file changed, 2 insertions(+) commit 69c8ebf83213e6165b13d94ec599b861467ee2dc Author: Jan Kara Date: Tue May 16 12:22:22 2017 +0200 fuseblk: Fix warning in super_setup_bdi_name() Commit 5f7f7543f52e "fuse: Convert to separately allocated bdi" didn't properly handle fuseblk filesystem. When fuse_bdi_init() is called for that filesystem type, sb->s_bdi is already initialized (by set_bdev_super()) to point to block device's bdi and consequently super_setup_bdi_name() complains about this fact when reseting bdi to the private one. Fix the problem by properly dropping bdi reference in fuse_bdi_init() before creating a private bdi in super_setup_bdi_name(). Fixes: 5f7f7543f52e ("fuse: Convert to separately allocated bdi") Reported-by: Rakesh Pandit Tested-by: Rakesh Pandit Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/fuse/inode.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit bca5238816939436d72ae6bab124c4b0641a3a99 Author: Ravikumar Kattekola Date: Wed May 17 06:51:38 2017 -0700 ARM: dts: dra7: Reduce cpu thermal shutdown temperature On dra7, as per TRM, the HW shutdown (TSHUT) temperature is hardcoded to 123C and cannot be modified by SW. This means when the temperature reaches 123C HW asserts TSHUT output which signals a warm reset. This reset is held until the temperature goes below the TSHUT low (105C). While in SW, the thermal driver continuously monitors current temperature and takes decisions based on whether it reached an alert or a critical point. The intention of setting a SW critical point is to prevent force reset by HW and instead do an orderly_poweroff(). But if the SW critical temperature is greater than or equal to that of HW then it defeats the purpose. To address this and let SW take action before HW does keep the SW critical temperature less than HW TSHUT value. The value for SW critical temperature was chosen as 120C just to ensure we give SW sometime before HW catches up. Document reference SPRUI30C – DRA75x, DRA74x Technical Reference Manual - November 2016 SPRUHZ6H - AM572x Technical Reference Manual - November 2016 Tested on: DRA75x PG 2.0 Rev H EVM Signed-off-by: Ravikumar Kattekola Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 7e1b9521f5a8356553f5e58b07952bf346632ea4 Author: Colin Ian King Date: Sat Mar 11 19:09:45 2017 +0000 dm cache: handle kmalloc failure allocating background_tracker struct Currently there is no kmalloc failure check on the allocation of the background_tracker struct in btracker_create(), and so a NULL return will lead to a NULL pointer dereference. Add a NULL check. Detected by CoverityScan, CID#1416587 ("Dereference null return value") Fixes: b29d4986d ("dm cache: significant rework to leverage dm-bio-prison-v2") Signed-off-by: Colin Ian King Signed-off-by: Mike Snitzer drivers/md/dm-cache-background-tracker.c | 5 +++++ 1 file changed, 5 insertions(+) commit 745b6e74704782488dd875292bc49e24d23e81fd Author: Arnd Bergmann Date: Thu May 11 13:35:51 2017 +0200 iommu/mediatek: Include linux/dma-mapping.h The mediatek iommu driver relied on an implicit include of dma-mapping.h, but for some reason that is no longer there in 4.12-rc1: drivers/iommu/mtk_iommu_v1.c: In function 'mtk_iommu_domain_finalise': drivers/iommu/mtk_iommu_v1.c:233:16: error: implicit declaration of function 'dma_zalloc_coherent'; did you mean 'debug_dma_alloc_coherent'? [-Werror=implicit-function-declaration] drivers/iommu/mtk_iommu_v1.c: In function 'mtk_iommu_domain_free': drivers/iommu/mtk_iommu_v1.c:265:2: error: implicit declaration of function 'dma_free_coherent'; did you mean 'debug_dma_free_coherent'? [-Werror=implicit-function-declaration] This adds an explicit #include to make it build again. Signed-off-by: Arnd Bergmann Fixes: 208480bb27 ('iommu: Remove trace-events include from iommu.h') Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu_v1.c | 1 + 1 file changed, 1 insertion(+) commit f73a7eee900e95404b61408a23a1df5c5811704c Author: KarimAllah Ahmed Date: Fri May 5 11:39:59 2017 -0700 iommu/vt-d: Flush the IOTLB to get rid of the initial kdump mappings Ever since commit 091d42e43d ("iommu/vt-d: Copy translation tables from old kernel") the kdump kernel copies the IOMMU context tables from the previous kernel. Each device mappings will be destroyed once the driver for the respective device takes over. This unfortunately breaks the workflow of mapping and unmapping a new context to the IOMMU. The mapping function assumes that either: 1) Unmapping did the proper IOMMU flushing and it only ever flush if the IOMMU unit supports caching invalid entries. 2) The system just booted and the initialization code took care of flushing all IOMMU caches. This assumption is not true for the kdump kernel since the context tables have been copied from the previous kernel and translations could have been cached ever since. So make sure to flush the IOTLB as well when we destroy these old copied mappings. Cc: Joerg Roedel Cc: David Woodhouse Cc: David Woodhouse Cc: Anthony Liguori Signed-off-by: KarimAllah Ahmed Acked-by: David Woodhouse Cc: stable@vger.kernel.org v4.2+ Fixes: 091d42e43d ("iommu/vt-d: Copy translation tables from old kernel") Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1cc896ed61fa0441dffef726ff678fd82a9e6265 Author: Robin Murphy Date: Mon May 15 16:01:30 2017 +0100 iommu/dma: Don't touch invalid iova_domain members When __iommu_dma_map() and iommu_dma_free_iova() are called from iommu_dma_get_msi_page(), various iova_*() helpers are still invoked in the process, whcih is unwise since they access a different member of the union (the iova_domain) from that which was last written, and there's no guarantee that sensible values will result anyway. CLean up the code paths that are valid for an MSI cookie to ensure we only do iova_domain-specific things when we're actually dealing with one. Fixes: a44e6657585b ("iommu/dma: Clean up MSI IOVA allocation") Reported-by: Nate Watterson Tested-by: Shanker Donthineni Tested-by: Bharat Bhushan Signed-off-by: Robin Murphy Tested-by: Eric Auger Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 5667c86acf021e6dcf02584408b4484a273ac68f Author: Rajkumar Manoharan Date: Sun May 14 21:41:55 2017 -0700 mac80211: strictly check mesh address extension mode Mesh forwarding path checks for address extension mode to fetch appropriate proxied address and MPP address. Existing condition that looks for 6 address format is not strict enough so that frames with improper values are processed and invalid entries are added into MPP table. Fix that by adding a stricter check before processing the packet. Per IEEE Std 802.11s-2011 spec. Table 7-6g1 lists address extension mode 0x3 as reserved one. And also Table Table 9-13 does not specify 0x3 as valid address field. Fixes: 9b395bc3be1c ("mac80211: verify that skb data is present") Signed-off-by: Rajkumar Manoharan Signed-off-by: Johannes Berg net/mac80211/rx.c | 3 ++- net/wireless/util.c | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) commit c0e7bb38c07cbd8269549ee0a0566021a3c729de Author: Christian Borntraeger Date: Mon May 15 14:11:03 2017 +0200 s390/kvm: do not rely on the ILC on kvm host protection fauls For most cases a protection exception in the host (e.g. copy on write or dirty tracking) on the sie instruction will indicate an instruction length of 4. Turns out that there are some corner cases (e.g. runtime instrumentation) where this is not necessarily true and the ILC is unpredictable. Let's replace our 4 byte rewind_pad with 3 byte nops to prepare for all possible ILCs. Signed-off-by: Christian Borntraeger Cc: stable@vger.kernel.org Signed-off-by: Martin Schwidefsky arch/s390/kernel/entry.S | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 95d7c1f18bf8ac03b0fc48eac1f1b11f867765b8 Author: Christophe JAILLET Date: Sat May 13 13:40:20 2017 +0200 ARM: davinci: PM: Do not free useful resources in normal path in 'davinci_pm_init' It is wrong to iounmap resources in the normal path of davinci_pm_init() The 3 ioremap'ed fields of 'pm_config' can be accessed later on in other functions, so we should return 'success' instead of unrolling everything. Fixes: aa9aa1ec2df6 ("ARM: davinci: PM: rework init, remove platform device") Signed-off-by: Christophe JAILLET [nsekhar@ti.com: commit message and minor style fixes] Signed-off-by: Sekhar Nori arch/arm/mach-davinci/pm.c | 2 ++ 1 file changed, 2 insertions(+) commit 5120a266928a07231d198bb518f6fe73148786a3 Author: Johan Hovold Date: Wed May 10 18:18:30 2017 +0200 USB: host: xhci: use max-port define Use the new define for the maximum number of SuperSpeed ports instead of a constant when allocating xHCI root hubs. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 93491ced3c87c94b12220dbac0527e1356702179 Author: Johan Hovold Date: Wed May 10 18:18:29 2017 +0200 USB: hub: fix SS max number of ports Add define for the maximum number of ports on a SuperSpeed hub as per USB 3.1 spec Table 10-5, and use it when verifying the retrieved hub descriptor. This specifically avoids benign attempts to update the DeviceRemovable mask for non-existing ports (should we get that far). Fixes: dbe79bbe9dcb ("USB 3.0 Hub Changes") Acked-by: Alan Stern Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 8 +++++++- include/uapi/linux/usb/ch11.h | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) commit bec444cd1c94c48df409a35ad4e5b143c245c3f7 Author: Johan Hovold Date: Wed May 10 18:18:28 2017 +0200 USB: hub: fix non-SS hub-descriptor handling Add missing sanity check on the non-SuperSpeed hub-descriptor length in order to avoid parsing and leaking two bytes of uninitialised slab data through sysfs removable-attributes (or a compound-device debug statement). Note that we only make sure that the DeviceRemovable field is always present (and specifically ignore the unused PortPwrCtrlMask field) in order to continue support any hubs with non-compliant descriptors. As a further safeguard, the descriptor buffer is also cleared. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable # 2.6.12 Signed-off-by: Johan Hovold Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 2c25a2c818023df64463aac3288a9f969491e507 Author: Johan Hovold Date: Wed May 10 18:18:27 2017 +0200 USB: hub: fix SS hub-descriptor handling A SuperSpeed hub descriptor does not have any variable-length fields so bail out when reading a short descriptor. This avoids parsing and leaking two bytes of uninitialised slab data through sysfs removable-attributes. Fixes: dbe79bbe9dcb ("USB 3.0 Hub Changes") Cc: stable # 2.6.39 Cc: John Youn Acked-by: Alan Stern Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ec963b412a54aac8e527708ecad06a6988a86fb4 Author: Johan Hovold Date: Wed May 10 18:18:26 2017 +0200 USB: usbip: fix nonconforming hub descriptor Fix up the root-hub descriptor to accommodate the variable-length DeviceRemovable and PortPwrCtrlMask fields, while marking all ports as removable (and leaving the reserved bit zero unset). Also add a build-time constraint on VHCI_HC_PORTS which must never be greater than USB_MAXCHILDREN (but this was only enforced through a KConfig constant). This specifically fixes the descriptor layout whenever VHCI_HC_PORTS is greater than seven (default is 8). Fixes: 04679b3489e0 ("Staging: USB/IP: add client driver") Cc: Takahiro Hirofuchi Cc: Valentina Manea Signed-off-by: Johan Hovold Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci_hcd.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit d81182ce30dbd497a1e7047d7fda2af040347790 Author: Johan Hovold Date: Wed May 10 18:18:25 2017 +0200 USB: gadget: dummy_hcd: fix hub-descriptor removable fields Flag the first and only port as removable while also leaving the remaining bits (including the reserved bit zero) unset in accordance with the specifications: "Within a byte, if no port exists for a given location, the bit field representing the port characteristics shall be 0." Also add a comment marking the legacy PortPwrCtrlMask field. Fixes: 1cd8fd2887e1 ("usb: gadget: dummy_hcd: add SuperSpeed support") Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: Tatyana Brokhman Signed-off-by: Johan Hovold Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/dummy_hcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5383fae76b8224a8f0465be6ab9c7a645042951a Author: Markus Heiser Date: Sat May 13 15:49:17 2017 +0200 doc-rst: fixed kernel-doc directives in usb/typec.rst Even if this file is not yet included in any toctree, it is parsed by Sphinx since it is named '.rst'. This patch fixes the following two ERRORs from Sphinx build: Documentation/usb/typec.rst:116: ERROR: Error in "kernel-doc" directive: invalid option block. .. kernel-doc:: drivers/usb/typec/typec.c :functions: typec_register_cable typec_unregister_cable typec_register_plug typec_unregister_plug Documentation/usb/typec.rst:139: ERROR: Error in "kernel-doc" directive: invalid option block. .. kernel-doc:: drivers/usb/typec/typec.c :functions: typec_set_data_role typec_set_pwr_role typec_set_vconn_role typec_set_pwr_opmode Signed-off-by: Markus Heiser Signed-off-by: Greg Kroah-Hartman Documentation/usb/typec.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ef53b92ece675ed9778b50f4432e004683696d01 Author: Johan Hovold Date: Tue May 16 16:26:14 2017 +0200 USB: core: of: document reference taken by companion helper Document that the new companion-device lookup helper takes a reference to the companion device which needs to be dropped after use. Signed-off-by: Johan Hovold Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/of.c | 3 +++ 1 file changed, 3 insertions(+) commit a7415477a20448bbb7d13765784c0b29249a176f Author: Johan Hovold Date: Tue May 16 16:26:13 2017 +0200 USB: ehci-platform: fix companion-device leak Make sure do drop the reference taken to the companion device during resume. Fixes: d4d75128b8fd ("usb: host: ehci-platform: fix usb 1.1 device is not connected in system resume") Cc: stable # 4.11 Signed-off-by: Johan Hovold Acked-by: Yoshihiro Shimoda Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-platform.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1f873d857b6c2fefb4dada952674aa01bcfb92bd Author: Chris Brandt Date: Thu Apr 27 12:12:02 2017 -0700 usb: r8a66597-hcd: select a different endpoint on timeout If multiple endpoints on a single device have pending IN URBs and one endpoint times out due to NAKs (perfectly legal), select a different endpoint URB to try. The existing code only checked to see another device address has pending URBs and ignores other IN endpoints on the current device address. This leads to endpoints never getting serviced if one endpoint is using NAK as a flow control method. Fixes: 5d3043586db4 ("usb: r8a66597-hcd: host controller driver for R8A6659") Signed-off-by: Chris Brandt Signed-off-by: Greg Kroah-Hartman drivers/usb/host/r8a66597-hcd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dd14a3e9b92ac6f0918054f9e3477438760a4fa6 Author: Chris Brandt Date: Thu Apr 27 12:12:49 2017 -0700 usb: r8a66597-hcd: decrease timeout The timeout for BULK packets was 300ms which is a long time if other endpoints or devices are waiting for their turn. Changing it to 50ms greatly increased the overall performance for multi-endpoint devices. Fixes: 5d3043586db4 ("usb: r8a66597-hcd: host controller driver for R8A6659") Signed-off-by: Chris Brandt Signed-off-by: Greg Kroah-Hartman drivers/usb/host/r8a66597-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61abce1312bf97eac62eef704260ce9a8f9b85f6 Author: Quentin Schulz Date: Mon May 15 10:36:17 2017 +0200 ASoC: atmel-classd: sync regcache when resuming The PM functions used in this driver are the ones defined in sounc/soc/soc-core.c. When suspending (using snd_soc_suspend), the regcache is marked dirty but is never synced on resume. Sync regcache on resume of Atmel ClassD device. Signed-off-by: Quentin Schulz Acked-by: Alexandre Belloni Acked-by: Nicolas Ferre Signed-off-by: Mark Brown sound/soc/atmel/atmel-classd.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 90431eb49bff6d79814cbf0c96e13597ad53095c Author: Kuninori Morimoto Date: Tue May 16 01:51:41 2017 +0000 ASoC: rsnd: don't use PDTA bit for 24bit on SSI Current SSI uses PDTA bit which indicates data that Input/Output data are Right-Aligned. But, 24bit sound should be Left-Aligned in this HW. Because Linux is using Right-Aligned data, and HW uses Left-Aligned data, current 24bit data is missing lower 8bit. To fix this issue, this patch removes PDTA bit, and shift 8bit in necessary module Reported-by: Hiroyuki Yokoyama Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/cmd.c | 1 + sound/soc/sh/rcar/core.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ sound/soc/sh/rcar/gen.c | 1 + sound/soc/sh/rcar/rsnd.h | 2 ++ sound/soc/sh/rcar/src.c | 12 ++++++++++-- sound/soc/sh/rcar/ssi.c | 2 +- sound/soc/sh/rcar/ssiu.c | 3 ++- 7 files changed, 68 insertions(+), 4 deletions(-) commit 1a744d2eb76aaafb997fda004ae3ae62a1538f85 Author: Anton Bondarenko Date: Sun May 7 01:53:46 2017 +0200 usb: core: fix potential memory leak in error path during hcd creation Free memory allocated for address0_mutex if allocation of bandwidth_mutex failed. Fixes: feb26ac31a2a ("usb: core: hub: hub_port_init lock controller instead of bus") Signed-off-by: Anton Bondarenko Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 1 + 1 file changed, 1 insertion(+) commit dd5ca753fa92fb736b1395db892bd29f78e6d408 Author: Johan Hovold Date: Thu May 11 11:36:02 2017 +0200 USB: iowarrior: fix info ioctl on big-endian hosts Drop erroneous le16_to_cpu when returning the USB device speed which is already in host byte order. Found using sparse: warning: cast to restricted __le16 Fixes: 946b960d13c1 ("USB: add driver for iowarrior devices.") Cc: stable # 2.6.21 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/iowarrior.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63afd5cc78775018ea2dec4004428dafa5283e93 Author: Johan Hovold Date: Thu May 11 11:36:01 2017 +0200 USB: chaoskey: fix Alea quirk on big-endian hosts Add missing endianness conversion when applying the Alea timeout quirk. Found using sparse: warning: restricted __le16 degrades to integer Fixes: e4a886e811cd ("hwrng: chaoskey - Fix URB warning due to timeout on Alea") Cc: stable # 4.8 Cc: Bob Ham Cc: Herbert Xu Cc: Keith Packard Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/chaoskey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cdfe4ddea47dbc66306edf802fd2ef86a6c8867 Author: Jiri Slaby Date: Fri May 12 10:06:29 2017 +0200 sisusb_con: fix coccinelle warning After commit d705ff3818 (tty: vt, cleanup and document con_scroll), in the coccinelle output, we can see: drivers/usb/misc/sisusbvga/sisusb_con.c:852:8-9: WARNING: return of 0/1 in function 'sisusbcon_scroll_area' with return type bool Return true instead of 1 in the function returning bool which was intended to do in d705ff3818 but omitted. Signed-off-by: Jiri Slaby Fixes: d705ff3818 (tty: vt, cleanup and document con_scroll) Cc: Thomas Winischhofer Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/sisusbvga/sisusb_con.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41318a2b82f5d5fe1fb408f6d6e0b22aa557111d Author: Johan Hovold Date: Fri May 12 12:06:32 2017 +0200 uwb: fix device quirk on big-endian hosts Add missing endianness conversion when using the USB device-descriptor idProduct field to apply a hardware quirk. Fixes: 1ba47da52712 ("uwb: add the i1480 DFU driver") Cc: stable # 2.6.28 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/uwb/i1480/dfu/usb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0bd193d62b4270a2a7a09da43ad1034c7ca5b3d3 Author: Maksim Salau Date: Sat May 13 23:49:26 2017 +0300 usb: misc: legousbtower: Fix memory leak get_version_reply is not freed if function returns with success. Fixes: 942a48730faf ("usb: misc: legousbtower: Fix buffers on stack") Reported-by: Heikki Krogerus Signed-off-by: Maksim Salau Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/legousbtower.c | 1 + 1 file changed, 1 insertion(+) commit 2f964780c03b73de269b08d12aff96a9618d13f3 Author: Vamsi Krishna Samavedam Date: Tue May 16 14:38:08 2017 +0200 USB: core: replace %p with %pK Format specifier %p can leak kernel addresses while not valuing the kptr_restrict system settings. When kptr_restrict is set to (1), kernel pointers printed using the %pK format specifier will be replaced with Zeros. Debugging Note : &pK prints only Zeros as address. If you need actual address information, write 0 to kptr_restrict. echo 0 > /proc/sys/kernel/kptr_restrict [Found by poking around in a random vendor kernel tree, it would be nice if someone would actually send these types of patches upstream - gkh] Signed-off-by: Vamsi Krishna Samavedam Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/devio.c | 14 +++++++------- drivers/usb/core/hcd.c | 4 ++-- drivers/usb/core/urb.c | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) commit 628c2893d44876ddd11602400c70606ade62e129 Author: Alan Stern Date: Tue May 16 11:47:29 2017 -0400 USB: ene_usb6250: fix DMA to the stack The ene_usb6250 sub-driver in usb-storage does USB I/O to buffers on the stack, which doesn't work with vmapped stacks. This patch fixes the problem by allocating a separate 512-byte buffer at probe time and using it for all of the offending I/O operations. Signed-off-by: Alan Stern Reported-and-tested-by: Andreas Hartmann CC: Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/ene_ub6250.c | 90 ++++++++++++++++++++++++---------------- 1 file changed, 55 insertions(+), 35 deletions(-) commit f3f6cc814f9cb61cfb738af2b126a8bf19e5ab4c Author: Christophe JAILLET Date: Sat May 13 13:40:05 2017 +0200 ARM: davinci: PM: Free resources in error handling path in 'davinci_pm_init' If 'sram_alloc' fails, we need to free already allocated resources. Fixes: aa9aa1ec2df6 ("ARM: davinci: PM: rework init, remove platform device") Signed-off-by: Christophe JAILLET Signed-off-by: Sekhar Nori arch/arm/mach-davinci/pm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9b31071dd18af2078cd866e39718f51f89b31c89 Merge: 2ea659a 018047a Author: Greg Kroah-Hartman Date: Wed May 17 11:18:36 2017 +0200 Merge tag 'fixes-for-v4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.12-rc2 - New device ID for Intel Canonlake CPUs - fix for Isochronous performance regression on dwc3 - fix for out-of-bounds access on comp_desc on f_fs - fix for lost events on dwc3 in case of spurious interrupts commit 5f63424ab7daac840df2b12dd5bcc5b38d50f779 Author: Andrey Korolyov Date: Tue May 16 23:54:41 2017 +0300 USB: serial: ftdi_sio: add Olimex ARM-USB-TINY(H) PIDs This patch adds support for recognition of ARM-USB-TINY(H) devices which are almost identical to ARM-USB-OCD(H) but lacking separate barrel jack and serial console. By suggestion from Johan Hovold it is possible to replace ftdi_jtag_quirk with a bit more generic construction. Since all Olimex-ARM debuggers has exactly two ports, we could safely always use only second port within the debugger family. Signed-off-by: Andrey Korolyov Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 8 ++++---- drivers/usb/serial/ftdi_sio_ids.h | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) commit 83345d51a49a4b3f3b4a08a5db644dae438b0189 Author: Tin Huynh Date: Wed May 17 11:25:34 2017 +0700 i2c: xgene: Set ACPI_COMPANION_I2C With ACPI, i2c-core requires ACPI companion to be set in order for it to create slave device. This patch sets the ACPI companion accordingly. Signed-off-by: Tin Huynh Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-xgene-slimpro.c | 1 + 1 file changed, 1 insertion(+) commit bfb9956ab4d8242f4594b5f4bee534b935384fd9 Author: Michael Ellerman Date: Tue May 16 20:42:53 2017 +1000 powerpc/mm: Fix crash in page table dump with huge pages The page table dump code doesn't know about huge pages, so currently it crashes (or walks random memory, usually leading to a crash), if it finds a huge page. On Book3S we only see huge pages in the Linux page tables when we're using the P9 Radix MMU. Teaching the code to properly handle huge pages is a bit more involved, so for now just prevent the crash. Cc: stable@vger.kernel.org # v4.10+ Fixes: 8eb07b187000 ("powerpc/mm: Dump linux pagetables") Signed-off-by: Michael Ellerman arch/powerpc/mm/dump_linuxpagetables.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 2848e1d503d60955ff51ae9ec8d5eada6bd9ba6d Author: James Smart Date: Mon May 15 15:20:52 2017 -0700 scsi: lpfc: update version to 11.2.0.14 Change driver version to 11.2.0.14. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae9e28f36a6cca4e5760f4927b70b6c9e588db1a Author: James Smart Date: Mon May 15 15:20:51 2017 -0700 scsi: lpfc: Add MDS Diagnostic support. Added code to support Cisco MDS loopback diagnostic. The diagnostics run various loopbacks including one which loops-back frame through the driver. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 2 + drivers/scsi/lpfc/lpfc_els.c | 7 +++ drivers/scsi/lpfc/lpfc_hbadisc.c | 3 +- drivers/scsi/lpfc/lpfc_hw4.h | 15 ++++- drivers/scsi/lpfc/lpfc_init.c | 13 ++++ drivers/scsi/lpfc/lpfc_sli.c | 131 ++++++++++++++++++++++++++++++++++++--- 6 files changed, 161 insertions(+), 10 deletions(-) commit dc53a61852279f25909d99dad4638b4aee0b2d82 Author: James Smart Date: Mon May 15 15:20:50 2017 -0700 scsi: lpfc: Fix NVMEI's handling of NVMET's PRLI response attributes Code review of NVMEI's FC_PORT_ROLE_NVME_DISCOVERY looked wrong. Discussions with storage architecture team clarified NVMEI's audit of the PRLI response port roles. Following up discussion with code review showed a few minor corrections were required - especially in anticipation of NVME auto discovery. During PRLI, NVMEI should sent prli_init - which it it does. NVMET should send prli_tgt and prli_disc - which it does. When NVMEI receives a PRLI Response now, it audits the incoming target bits and stores the attributes in the corresponding NDLP. Later, when NVMEI registers the NVME rport, it uses the stored ndlp attributes to set the rport port_roles correctly. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_disc.h | 1 + drivers/scsi/lpfc/lpfc_nportdisc.c | 6 ++++++ 2 files changed, 7 insertions(+) commit 64eb4dcb140a7c5547f6e965fb471b1b75c01108 Author: James Smart Date: Mon May 15 15:20:49 2017 -0700 scsi: lpfc: Cleanup entry_repost settings on SLI4 queues Too many work items being processed in IRQ context take a lot of CPU time and cause problems. With a recent change, we get out of the ISR after hitting entry_repost work items on a queue. However, the actual values for entry repost are still high. EQ is 128 and CQ is 128, this could translate into processing 128 * 128 (16384) work items under IRQ context. Set entry_repost in the actual queue creation routine now. Limit EQ repost to 8 and CQ repost to 64 to further limit the amount of time spent in the IRQ. Fix fof IRQ routines as well. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 19 ++++++++----------- drivers/scsi/lpfc/lpfc_sli4.h | 6 ++++-- 2 files changed, 12 insertions(+), 13 deletions(-) commit 667a7662529bf0afb1d84a32ceb0da0a875a3b6c Author: James Smart Date: Mon May 15 15:20:48 2017 -0700 scsi: lpfc: Fix debugfs root inode "lpfc" not getting deleted on driver unload. When unloading and reloading the driver, the driver fails to recreate the lpfc root inode in the debugfs tree. The driver is incorrectly removing the lpfc root inode in lpfc_debugfs_terminate in the first driver instance that unloads and then sets the lpfc_debugfs_root global parameter to NULL. When the final driver instance unloads, the debugfs calls quietly ignore the remove on a NULL pointer. The bug is that the debugfs_remove call returns void so the driver doesn't know to correctly set the global parameter to NULL. Base the debugfs_remove of the lpfc_debugfs_root parameter on lpfc_debugfs_hba_count because this parameter tracks the fnX instance tracked per driver instance. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_debugfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 82820f0cf19aa62e2608c2909bd44e7a68268ff5 Author: James Smart Date: Mon May 15 15:20:47 2017 -0700 scsi: lpfc: Fix NVME I+T not registering NVME as a supported FC4 type When the driver send the RPA command, it does not send supported FC4 Type NVME to the management server. Encode NVME (type x28) in the AttribEntry in the RPA command. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_ct.c | 1 + 1 file changed, 1 insertion(+) commit a8cf5dfeb4d84248c0ad12386ae0cb36ee21589a Author: James Smart Date: Mon May 15 15:20:46 2017 -0700 scsi: lpfc: Added recovery logic for running out of NVMET IO context resources Previous logic would just drop the IO. Added logic to queue the IO to wait for an IO context resource from an IO thats already in progress. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 1 + drivers/scsi/lpfc/lpfc_attr.c | 6 ++ drivers/scsi/lpfc/lpfc_crtn.h | 2 + drivers/scsi/lpfc/lpfc_debugfs.c | 6 ++ drivers/scsi/lpfc/lpfc_init.c | 2 + drivers/scsi/lpfc/lpfc_nvmet.c | 138 +++++++++++++++++++++++++++++++++------ drivers/scsi/lpfc/lpfc_sli.c | 7 +- drivers/scsi/lpfc/lpfc_sli4.h | 6 +- 8 files changed, 144 insertions(+), 24 deletions(-) commit 6c621a2229b084da0d926967f84b059a10c26ede Author: James Smart Date: Mon May 15 15:20:45 2017 -0700 scsi: lpfc: Separate NVMET RQ buffer posting from IO resources SGL/iocbq/context Currently IO resources are mapped 1 to 1 with RQ buffers posted Added logic to separate RQE buffers from IO op resources (sgl/iocbq/context). During initialization, the driver will determine how many SGLs it will allocate for NVMET (based on what the firmware reports) and associate a NVMET IOCBq and NVMET context structure with each one. Now that hdr/data buffers are immediately reposted back to the RQ, 512 RQEs for each MRQ is sufficient. Also, since NVMET data buffers are now 128 bytes, lpfc_nvmet_mrq_post is not necessary anymore as we will always post the max (512) buffers per NVMET MRQ. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 11 +- drivers/scsi/lpfc/lpfc_attr.c | 11 -- drivers/scsi/lpfc/lpfc_crtn.h | 8 +- drivers/scsi/lpfc/lpfc_init.c | 92 ++------------- drivers/scsi/lpfc/lpfc_mem.c | 73 +----------- drivers/scsi/lpfc/lpfc_nvmet.c | 246 +++++++++++++++++++++++++++++++---------- drivers/scsi/lpfc/lpfc_nvmet.h | 1 + drivers/scsi/lpfc/lpfc_sli.c | 78 ++++++++++++- drivers/scsi/lpfc/lpfc_sli4.h | 4 +- 9 files changed, 291 insertions(+), 233 deletions(-) commit 3c603be9798758dde794daa622e0f7017dbff3a7 Author: James Smart Date: Mon May 15 15:20:44 2017 -0700 scsi: lpfc: Separate NVMET data buffer pool fir ELS/CT. Using 2048 byte buffer and onle 128 bytes is needed. Create nee LFPC_NVMET_DATA_BUF_SIZE define to use for NVMET RQ/MRQs. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 1 + drivers/scsi/lpfc/lpfc_crtn.h | 1 + drivers/scsi/lpfc/lpfc_hw4.h | 1 + drivers/scsi/lpfc/lpfc_init.c | 7 ++++++- drivers/scsi/lpfc/lpfc_mem.c | 33 ++++++++++++++++++++++++++------- drivers/scsi/lpfc/lpfc_sli.c | 19 +++++++++++++++---- 6 files changed, 50 insertions(+), 12 deletions(-) commit 7869da183a7cfc8a2189f6eddd3bc558be40d5e3 Author: James Smart Date: Mon May 15 15:20:43 2017 -0700 scsi: lpfc: Fix NMI watchdog assertions when running nvmet IOPS tests After running IOPS test for 30 second we get kernel:NMI watchdog: Watchdog detected hard LOCKUP on cpu 0 The driver is speend too much time in its ISR. In ISR EQ and CQ processing routines, if we hit the entry_repost numbers of EQE/CQEs just break out of the routine as opposed to hitting the doorbell with NOARM and continue processing. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_debugfs.c | 30 +++++++++++++++--------------- drivers/scsi/lpfc/lpfc_sli.c | 16 ++++++---------- 2 files changed, 21 insertions(+), 25 deletions(-) commit 3120046a970aee08a0787fb6792590f1e0047f62 Author: James Smart Date: Mon May 15 15:20:42 2017 -0700 scsi: lpfc: Fix NVMEI driver not decrementing counter causing bad rport state. During driver boot, a latency in the NVMET driver side causes the incoming NVMEI PRLI to get rejected by the NVMET driver. When this happens, the NVMEI driver runs out of PRLI retries. Bouncing the link does not fix the situation. If the NVMEI driver decides, on PRLI completion failures, to retry the PRLI, always decrement the fc4_prli_sent counter. This allows the PRLI completion to resolve to UNMAPPED when NVMET rejects the PRLI. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 61f3d4bf4f8f062cf6be143c9b7adbc3a017ea6e Author: James Smart Date: Mon May 15 15:20:41 2017 -0700 scsi: lpfc: Fix nvmet RQ resource needs for large block writes. Large block writes to the nvme target were failing because the default number of RQs posted was insufficient. Expand the NVMET RQs to 2048 RQEs and ensure a minimum of 512 RQEs are posted, no matter how many MRQs are configured. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 6 +++--- drivers/scsi/lpfc/lpfc_init.c | 23 +++++++++++++------- drivers/scsi/lpfc/lpfc_nvmet.c | 2 +- drivers/scsi/lpfc/lpfc_nvmet.h | 1 + drivers/scsi/lpfc/lpfc_sli.c | 49 +++++++++--------------------------------- drivers/scsi/lpfc/lpfc_sli4.h | 2 +- 6 files changed, 31 insertions(+), 52 deletions(-) commit 547077a44b3b49f56c0f05c0b46c8c617dea591d Author: James Smart Date: Mon May 15 15:20:40 2017 -0700 scsi: lpfc: Adding additional stats counters for nvme. More debug messages added for nvme statistics. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 24 ++++++++++++--------- drivers/scsi/lpfc/lpfc_debugfs.c | 27 +++++++++++++---------- drivers/scsi/lpfc/lpfc_nvmet.c | 46 ++++++++++++++++++++++++++++++---------- drivers/scsi/lpfc/lpfc_nvmet.h | 12 ++++++----- drivers/scsi/lpfc/lpfc_sli.c | 38 ++++++++++++++++++++++++++++----- drivers/scsi/lpfc/lpfc_sli4.h | 2 +- 6 files changed, 106 insertions(+), 43 deletions(-) commit 0c9c6a75141810acade82add4f4708959a5d3a1d Author: James Smart Date: Mon May 15 15:20:39 2017 -0700 scsi: lpfc: Fix system crash when port is reset. The driver panic when using the els_wq during port reset. Check for NULL els_wq before dereferencing. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 8 ++++++-- drivers/scsi/lpfc/lpfc_hbadisc.c | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) commit 845d9e8df2fa879e6494e786f290e1fd5560ac8c Author: James Smart Date: Mon May 15 15:20:38 2017 -0700 scsi: lpfc: Fix used-RPI accounting problem. With 255 vports created a link trasition can casue a crash. When going through discovery after a link bounce the driver is using rpis before the cmd FCOE_POST_HDR_TEMPLATES completes. By doing that the next rpi bumps the rpi range out of the boundary. The fix it to increment the next_rpi only when the FCOE_POST_HDR_TEMPLATE succeeds. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 3 ++- drivers/scsi/lpfc/lpfc_init.c | 24 +++++------------------- drivers/scsi/lpfc/lpfc_sli.c | 8 ++++++++ drivers/scsi/lpfc/lpfc_sli4.h | 1 + 4 files changed, 16 insertions(+), 20 deletions(-) commit dd6e1f71b785a6ac2511e2ddb86315f292873e59 Author: Gustavo A. R. Silva Date: Thu May 11 17:24:44 2017 -0500 scsi: libfc: fix incorrect variable assignment Previous assignment was causing the use of the uninitialized variable _explan_ inside fc_seq_ls_rjt() function, which in this particular case is being called by fc_seq_els_rsp_send(). [mkp: fixed typo] Addresses-Coverity-ID: 1398125 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_rport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fa8324461b824eaea9b6695464395710fe20c44 Author: Derek Basehore Date: Thu May 11 14:34:24 2017 +0200 scsi: sd: Ignore sync cache failures when not supported Some external hard drives don't support the sync command even though the hard drive has write cache enabled. In this case, upon suspend request, sync cache failures are ignored if the error code in the sense header is ILLEGAL_REQUEST. There's not much we can do for these drives, so we shouldn't fail to suspend for this error case. The drive may stay powered if that's the setup for the port it's plugged into. Signed-off-by: Derek Basehore Signed-off-by: Thierry Escande Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) commit 2579b8b0ece53248b815042f8662a4531acf120d Author: Dan Carpenter Date: Thu Apr 27 12:12:56 2017 +0300 drm/nouveau/fifo/gk104-: Silence a locking warning Presumably we can never actually hit this return, but static checkers complain that we should unlock before we return. Signed-off-by: Dan Carpenter Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 563ad2b640955a0da21aedce1aaa332c7d016dde Author: Christophe JAILLET Date: Mon May 8 14:30:43 2017 +0200 drm/nouveau/secboot: plug memory leak in ls_ucode_img_load_gr() error path The last goto looks spurious because it releases less resources than the previous one. Also free 'img->sig' if 'ls_ucode_img_build()' fails. Fixes: 9d896f3e41a6 ("drm/nouveau/secboot: abstract LS firmware loading functions") Signed-off-by: Christophe JAILLET Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode_gr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9a2eba337cacefc95b97c2726e3efdd435b3460e Author: Peter Ujfalusi Date: Mon May 15 12:04:31 2017 +0300 drm/nouveau: Fix drm poll_helper handling Commit cae9ff036eea effectively disabled the drm poll_helper by checking the wrong flag to see if the driver should enable the poll or not: mode_config.poll_enabled is only set to true by poll_init and it is not indicating if the poll is enabled or not. nouveau_display_create() will initialize the poll and going to disable it right away. After poll_init() the mode_config.poll_enabled will be true, but the poll itself is disabled. To avoid the race caused by calling the poll_enable() from different paths, this patch will enable the poll from one place, in the nouveau_display_hpd_work(). In case the pm_runtime is disabled we will enable the poll in nouveau_drm_load() once. Fixes: cae9ff036eea ("drm/nouveau: Don't enabling polling twice on runtime resume") Signed-off-by: Peter Ujfalusi Reviewed-by: Lyude Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_display.c | 6 ++---- drivers/gpu/drm/nouveau/nouveau_drm.c | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) commit 88ad60c23a394b2f8bf1e570c756f415435d1d35 Author: Thomas Petazzoni Date: Tue May 16 14:07:24 2017 +0200 i2c: mv64xxx: don't override deferred probing when getting irq There is no reason to use platform_get_irq() for non-DT probing and irq_of_parse_and_map() for DT probing. Indeed, platform_get_irq() works fine for both. In addition, using platform_get_irq() properly returns -EPROBE_DEFER when the interrupt controller is not yet available, so instead of inventing our own error code (-ENXIO), return the one provided by platform_get_irq(). Signed-off-by: Thomas Petazzoni Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mv64xxx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0d83539092ddb1ab79b4d65bccb866bf07ea2ccd Author: Suman Anna Date: Tue May 9 18:58:24 2017 -0500 uio: fix incorrect memory leak cleanup Commit 75f0aef6220d ("uio: fix memory leak") has fixed up some memory leaks during the failure paths of the addition of uio attributes, but still is not correct entirely. A kobject_uevent() failure still needs a kobject_put() and the kobject container structure allocation failure before the kobject_init() doesn't need a kobject_put(). Fix this properly. Fixes: 75f0aef6220d ("uio: fix memory leak") Signed-off-by: Suman Anna Signed-off-by: Greg Kroah-Hartman drivers/uio/uio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a20cfc1cde76047657045fc5976834f57422a8c5 Author: Tobias Regnery Date: Tue May 9 13:52:02 2017 +0200 misc: pci_endpoint_test: select CRC32 There is the following link error with CONFIG_PCI_ENDPOINT_TEST=y and CONFIG_CRC32=m: drivers/built-in.o: In function 'pci_endpoint_test_ioctl': pci_endpoint_test.c:(.text+0xf1251): undefined reference to 'crc32_le' pci_endpoint_test.c:(.text+0xf1322): undefined reference to 'crc32_le' pci_endpoint_test.c:(.text+0xf13b2): undefined reference to 'crc32_le' pci_endpoint_test.c:(.text+0xf141e): undefined reference to 'crc32_le' Fix this by selecting CRC32 in the PCI_ENDPOINT_TEST kconfig entry. Fixes: 2c156ac71c6b ("misc: Add host side PCI driver for PCI test function device") Signed-off-by: Tobias Regnery Signed-off-by: Greg Kroah-Hartman drivers/misc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 3e21f4af170bebf47c187c1ff8bf155583c9f3b1 Author: Willy Tarreau Date: Tue May 16 19:18:55 2017 +0200 char: lp: fix possible integer overflow in lp_setup() The lp_setup() code doesn't apply any bounds checking when passing "lp=none", and only in this case, resulting in an overflow of the parport_nr[] array. All versions in Git history are affected. Reported-By: Roee Hay Cc: Ben Hutchings Cc: stable@vger.kernel.org Signed-off-by: Willy Tarreau Signed-off-by: Greg Kroah-Hartman drivers/char/lp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b23afd384801711ab6dbccd259cc14cb09a1dcaf Merge: 2b6b38b 6f61dd3 Author: Linus Torvalds Date: Tue May 16 13:29:07 2017 -0700 Merge tag 'pstore-v4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore fix from Kees Cook: "Fix bad EFI vars iterator usage" * tag 'pstore-v4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: efi-pstore: Fix read iter after pstore API refactor commit 9512a16b0e1217bbef73d276a67c28b5fbb46512 Author: J. Bruce Fields Date: Tue May 16 15:57:42 2017 -0400 nfsd: Revert "nfsd: check for oversized NFSv2/v3 arguments" This reverts commit 51f567777799 "nfsd: check for oversized NFSv2/v3 arguments", which breaks support for NFSv3 ACLs. That patch was actually an earlier draft of a fix for the problem that was eventually fixed by e6838a29ecb "nfsd: check for oversized NFSv2/v3 arguments". But somehow I accidentally left this earlier draft in the branch that was part of my 2.12 pull request. Reported-by: Eryu Guan Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/nfs3xdr.c | 23 ++++++----------------- fs/nfsd/nfsxdr.c | 13 +++---------- include/linux/sunrpc/svc.h | 3 ++- 3 files changed, 11 insertions(+), 28 deletions(-) commit 2432a3fb5cff026005aaad24e42226402f7fd0aa Author: Arnd Bergmann Date: Tue May 16 13:27:49 2017 +0200 mlx5e: add CONFIG_INET dependency We now reference the arp_tbl, which requires IPv4 support to be enabled in the kernel, otherwise we get a link error: drivers/net/built-in.o: In function `mlx5e_tc_update_neigh_used_value': (.text+0x16afec): undefined reference to `arp_tbl' drivers/net/built-in.o: In function `mlx5e_rep_neigh_init': en_rep.c:(.text+0x16c16d): undefined reference to `arp_tbl' drivers/net/built-in.o: In function `mlx5e_rep_netevent_event': en_rep.c:(.text+0x16cbb5): undefined reference to `arp_tbl' This adds a Kconfig dependency for it. Fixes: 232c001398ae ("net/mlx5e: Add support to neighbour update flow") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea9a46e1c49251331dbfda19ced7114337966178 Author: Darrick J. Wong Date: Fri May 12 10:44:10 2017 -0700 xfs: only return detailed fsmap info if the caller has CAP_SYS_ADMIN There were a number of handwaving complaints that one could "possibly" use inode numbers and extent maps to fingerprint a filesystem hosting multiple containers and somehow use the information to guess at the contents of other containers and attack them. Despite the total lack of any demonstration that this is actually possible, it's easier to restrict access now and broaden it later, so use the rmapbt fsmap backends only if the caller has CAP_SYS_ADMIN. Unprivileged users will just have to make do with only getting the free space and static metadata placement information. Signed-off-by: Darrick J. Wong Reviewed-by: Carlos Maiolino fs/xfs/xfs_fsmap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b401ee0b85a53e89739ff68a5b1a0667d664afc9 Author: Paolo Bonzini Date: Tue Apr 18 12:41:18 2017 +0200 KVM: x86: lower default for halt_poll_ns In some fio benchmarks, halt_poll_ns=400000 caused CPU utilization to increase heavily even in cases where the performance improvement was small. In particular, bandwidth divided by CPU usage was as much as 60% lower. To some extent this is the expected effect of the patch, and the additional CPU utilization is only visible when running the benchmarks. However, halving the threshold also halves the extra CPU utilization (from +30-130% to +20-70%) and has no negative effect on performance. Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13840d38016203f0095cd547b90352812d24b787 Author: Mikulas Patocka Date: Sun Apr 30 17:32:28 2017 -0400 dm bufio: make the parameter "retain_bytes" unsigned long Change the type of the parameter "retain_bytes" from unsigned to unsigned long, so that on 64-bit machines the user can set more than 4GiB of data to be retained. Also, change the type of the variable "count" in the function "__evict_old_buffers" to unsigned long. The assignment "count = c->n_buffers[LIST_CLEAN] + c->n_buffers[LIST_DIRTY];" could result in unsigned long to unsigned overflow and that could result in buffers not being freed when they should. While at it, avoid division in get_retain_buffers(). Division is slow, we can change it to shift because we have precalculated the log2 of block size. Cc: stable@vger.kernel.org Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit f6c5775ff0bfa62b072face6bf1d40f659f194b2 Author: David Ahern Date: Mon May 15 23:19:17 2017 -0700 net: Improve handling of failures on link and route dumps In general, rtnetlink dumps do not anticipate failure to dump a single object (e.g., link or route) on a single pass. As both route and link objects have grown via more attributes, that is no longer a given. netlink dumps can handle a failure if the dump function returns an error; specifically, netlink_dump adds the return code to the response if it is <= 0 so userspace is notified of the failure. The missing piece is the rtnetlink dump functions returning the error. Fix route and link dump functions to return the errors if no object is added to an skb (detected by skb->len != 0). IPv6 route dumps (rt6_dump_route) already return the error; this patch updates IPv4 and link dumps. Other dump functions may need to be ajusted as well. Reported-by: Jan Moskyto Matejka Signed-off-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 36 ++++++++++++++++++++++++------------ net/ipv4/fib_frontend.c | 15 +++++++++++---- net/ipv4/fib_trie.c | 26 ++++++++++++++------------ 3 files changed, 49 insertions(+), 28 deletions(-) commit 19a0f7e37c0761a0a1cbf550705a6063c9675223 Author: Christoph Hellwig Date: Tue May 16 09:51:38 2017 +0300 net/smc: Add warning about remote memory exposure The driver explicitly bypasses APIs to register all memory once a connection is made, and thus allows remote access to memory. Signed-off-by: Christoph Hellwig Signed-off-by: Leon Romanovsky Acked-by: Ursula Braun Signed-off-by: David S. Miller net/smc/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 263eec9b2a82e8697d064709414914b5b10ac538 Author: Ursula Braun Date: Mon May 15 17:33:37 2017 +0200 smc: switch to usage of IB_PD_UNSAFE_GLOBAL_RKEY Currently, SMC enables remote access to physical memory when a user has successfully configured and established an SMC-connection until ten minutes after the last SMC connection is closed. Because this is considered a security risk, drivers are supposed to use IB_PD_UNSAFE_GLOBAL_RKEY in such a case. This patch changes the current SMC code to use IB_PD_UNSAFE_GLOBAL_RKEY. This improves user awareness, but does not remove the security risk itself. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/smc_clc.c | 4 ++-- net/smc/smc_core.c | 16 +++------------- net/smc/smc_core.h | 2 +- net/smc/smc_ib.c | 21 ++------------------- net/smc/smc_ib.h | 2 -- 5 files changed, 8 insertions(+), 37 deletions(-) commit 6f61dd3aa35179043f1fcdb0965c5d56278ab724 Author: Kees Cook Date: Fri May 12 14:52:34 2017 -0700 efi-pstore: Fix read iter after pstore API refactor During the internal pstore API refactoring, the EFI vars read entry was accidentally made to update a stack variable instead of the pstore private data pointer. This corrects the problem (and removes the now needless argument). Fixes: 125cc42baf8a ("pstore: Replace arguments for read() API") Signed-off-by: Kees Cook drivers/firmware/efi/efi-pstore.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit fc9d0cd9ca3f013663d79d9201d1df6c14f3ca10 Merge: 2ea659a 9fce894d Author: Wolfram Sang Date: Tue May 16 18:57:39 2017 +0200 Merge branch 'i2c-mux/for-current' of https://github.com/peda-r/i2c-mux into i2c/for-current Pull bugfixes from the i2c mux subsubsystem: This fixes an old bug in resource cleanup on failure in i2c-mux-reg and a new log spamming bug from this merge window in the i2c-mux core. commit bcfc7d33110b0f33069d74138eeb7ca9acbb3c85 Author: Thomas Winter Date: Tue May 16 10:14:44 2017 +1200 ipmr: vrf: Find VIFs using the actual device The skb->dev that is passed into ip_mr_input is the loX device for VRFs. When we lookup a vif for this dev, none is found as we do not create vifs for loopbacks. Instead lookup a vif for the actual device that the packet was received on, eg the vlan. Signed-off-by: Thomas Winter cc: David Ahern cc: Nikolay Aleksandrov cc: roopa Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv4/ipmr.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit bafbb9c73241760023d8981191ddd30bb1c6dbac Author: Soheil Hassas Yeganeh Date: Mon May 15 17:05:47 2017 -0400 tcp: eliminate negative reordering in tcp_clean_rtx_queue tcp_ack() can call tcp_fragment() which may dededuct the value tp->fackets_out when MSS changes. When prior_fackets is larger than tp->fackets_out, tcp_clean_rtx_queue() can invoke tcp_update_reordering() with negative values. This results in absurd tp->reodering values higher than sysctl_tcp_max_reordering. Note that tcp_update_reordering indeeds sets tp->reordering to min(sysctl_tcp_max_reordering, metric), but because the comparison is signed, a negative metric always wins. Fixes: c7caf8d3ed7a ("[TCP]: Fix reord detection due to snd_una covered holes") Reported-by: Rebecca Isaacs Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b6b38b04c2e7fe1713104768048fe2cae89c38e Merge: bec6cd63 fb317002 Author: Linus Torvalds Date: Tue May 16 09:24:44 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: - convert the debug feature to refcount_t - reduce the copy size for strncpy_from_user - 8 bug fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/virtio: change virtio_feature_desc:features type to __le32 s390: convert debug_info.ref_count from atomic_t to refcount_t s390: move _text symbol to address higher than zero s390/qdio: increase string buffer size s390/ccwgroup: increase string buffer size s390/topology: let topology_mnest_limit() return unsigned char s390/uaccess: use sane length for __strncpy_from_user() s390/uprobes: fix compile for !KPROBES s390/ftrace: fix compile for !MODULES s390/cputime: fix incorrect system time commit 892d2a5f705723b2cb488bfb38bcbdcf83273184 Author: Zorro Lang Date: Mon May 15 08:40:02 2017 -0700 xfs: bad assertion for delalloc an extent that start at i_size By run fsstress long enough time enough in RHEL-7, I find an assertion failure (harder to reproduce on linux-4.11, but problem is still there): XFS: Assertion failed: (iflags & BMV_IF_DELALLOC) != 0, file: fs/xfs/xfs_bmap_util.c The assertion is in xfs_getbmap() funciton: if (map[i].br_startblock == DELAYSTARTBLOCK && --> map[i].br_startoff <= XFS_B_TO_FSB(mp, XFS_ISIZE(ip))) ASSERT((iflags & BMV_IF_DELALLOC) != 0); When map[i].br_startoff == XFS_B_TO_FSB(mp, XFS_ISIZE(ip)), the startoff is just at EOF. But we only need to make sure delalloc extents that are within EOF, not include EOF. Signed-off-by: Zorro Lang Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e747506dde195d3d05fe2bb8ef78aceba28a5e3 Author: Darrick J. Wong Date: Fri May 12 10:44:11 2017 -0700 xfs: fix warnings about unused stack variables Reduce stack usage and get rid of compiler warnings by eliminating unused variables. Signed-off-by: Darrick J. Wong Reviewed-by: Carlos Maiolino fs/xfs/libxfs/xfs_bmap.c | 2 -- 1 file changed, 2 deletions(-) commit 6eadbf4c8ba816c10d1c97bed9aa861d9fd17809 Author: Darrick J. Wong Date: Fri May 12 10:44:08 2017 -0700 xfs: BMAPX shouldn't barf on inline-format directories When we're fulfilling a BMAPX request, jump out early if the data fork is in local format. This prevents us from hitting a debugging check in bmapi_read and barfing errors back to userspace. The on-disk extent count check later isn't sufficient for IF_DELALLOC mode because da extents are in memory and not on disk. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig fs/xfs/xfs_bmap_util.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 0daaecacb83bc6b656a56393ab77a31c28139bc7 Author: Brian Foster Date: Fri May 12 10:44:08 2017 -0700 xfs: fix indlen accounting error on partial delalloc conversion The delalloc -> real block conversion path uses an incorrect calculation in the case where the middle part of a delalloc extent is being converted. This is documented as a rare situation because XFS generally attempts to maximize contiguity by converting as much of a delalloc extent as possible. If this situation does occur, the indlen reservation for the two new delalloc extents left behind by the conversion of the middle range is calculated and compared with the original reservation. If more blocks are required, the delta is allocated from the global block pool. This delta value can be characterized as the difference between the new total requirement (temp + temp2) and the currently available reservation minus those blocks that have already been allocated (startblockval(PREV.br_startblock) - allocated). The problem is that the current code does not account for previously allocated blocks correctly. It subtracts the current allocation count from the (new - old) delta rather than the old indlen reservation. This means that more indlen blocks than have been allocated end up stashed in the remaining extents and free space accounting is broken as a result. Fix up the calculation to subtract the allocated block count from the original extent indlen and thus correctly allocate the reservation delta based on the difference between the new total requirement and the unused blocks from the original reservation. Also remove a bogus assert that contradicts the fact that the new indlen reservation can be larger than the original indlen reservation. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit bec6cd63aa0abb0752e3d04daa36e26c08a49315 Merge: a95cfad eb77e6b Author: Linus Torvalds Date: Tue May 16 09:18:18 2017 -0700 Merge tag 'edac_fix_for_4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC fix from Borislav Petkov: "A single amd64_edac fix correcting chip select sizes reporting on F17h" * tag 'edac_fix_for_4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: EDAC, amd64: Fix reporting of Chip Select sizes on Fam17h commit c034640a32f8456018d9c8c83799ead683046b95 Author: Thomas Petazzoni Date: Tue May 16 14:06:12 2017 +0200 ata: libahci: properly propagate return value of platform_get_irq() When platform_get_irq() fails, it returns an error code, which libahci_platform and replaces it by -EINVAL. This commit fixes that by propagating the error code. It fixes the situation where platform_get_irq() returns -EPROBE_DEFER because the interrupt controller is not available yet, and generally looks like the right thing to do. We pay attention to not show the "no irq" message when we are in an EPROBE_DEFER situation, because the driver probing will be retried later on, once the interrupt controller becomes available to provide the interrupt. Signed-off-by: Thomas Petazzoni Reviewed-by: Hans de Goede Signed-off-by: Tejun Heo drivers/ata/libahci_platform.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5dc63fdcc09f47fb226b8bc7d83a61feb787d817 Author: Arvind Yadav Date: Tue May 9 16:00:28 2017 +0530 ata: sata_rcar: Handle return value of clk_prepare_enable Here, Clock enable can failed. So adding an error check for clk_prepare_enable. tj: minor style updates Signed-off-by: Arvind Yadav Signed-off-by: Tejun Heo drivers/ata/sata_rcar.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 8bfd174312629866efa535193d9e563768ff4307 Author: Sui Chen Date: Tue May 9 07:47:22 2017 -0500 ahci: Acer SA5-271 SSD Not Detected Fix (Correction in this resend: fixed function name acer_sa5_271_workaround; fixed the always-true condition in the function; fixed description.) On the Acer Switch Alpha 12 (model number: SA5-271), the internal SSD may not get detected because the port_map and CAP.nr_ports combination causes the driver to skip the port that is actually connected to the SSD. More specifically, either all SATA ports are identified as DUMMY, or all ports get ``link down'' and never get up again. This problem occurs occasionally. When this problem occurs, CAP may hold a value of 0xC734FF00 or 0xC734FF01 and port_map may hold a value of 0x00 or 0x01. When this problem does not occur, CAP holds a value of 0xC734FF02 and port_map may hold a value of 0x07. Overriding the CAP value to 0xC734FF02 and port_map to 0x7 significantly reduces the occurrence of this problem. Link: https://bugzilla.kernel.org/attachment.cgi?id=253091 Signed-off-by: Sui Chen Tested-by: Damian Ivanov Cc: stable@vger.kernel.org Signed-off-by: Tejun Heo drivers/ata/ahci.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit aff523fb82696f59b197ea79ea3652c216dbe4c0 Author: Tony Lindgren Date: Fri May 5 15:37:06 2017 -0700 memory: omap-gpmc: Fix debug output for access width The width needs to be configured in bytes with 1 meaning 8-bit access and 2 meaning 16-bit access. Cc: Peter Ujfalusi Acked-by: Roger Quadros Signed-off-by: Tony Lindgren drivers/memory/omap-gpmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56322e123235370f1449c7444e311cce857d12f5 Author: Adam Ford Date: Thu May 11 12:21:19 2017 -0500 ARM: dts: LogicPD Torpedo: Fix camera pin mux Fix commit 05c4ffc3a266 ("ARM: dts: LogicPD Torpedo: Add MT9P031 Support") In the previous commit, I indicated that the only testing was done by showing the camera showed up when probing. This patch fixes an incorrect pin muxing on cam_d0, cam_d1 and cam_d2. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f0b8dca8336b112d23be9fa9c0d38cc4eb733344 Author: Hans Verkuil Date: Tue May 16 08:10:07 2017 -0700 ARM: dts: omap4: enable CEC pin for Pandaboard A4 and ES The CEC pin was always pulled up, making it impossible to use it. Change to PIN_INPUT so it can be used by the new CEC support. Signed-off-by: Hans Verkuil Reviewed-by: Tomi Valkeinen arch/arm/boot/dts/omap4-panda-a4.dts | 2 +- arch/arm/boot/dts/omap4-panda-es.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 910958b65cf638347e6c8f65d1f749d6a4cfb7e3 Author: Andreas Kemnade Date: Fri Apr 28 12:27:35 2017 +0200 ARM: dts: gta04: fix polarity of clocks for mcbsp4 The clock polarity setting of the mcbsp connected to the modem was wrong so almost only noise was received. With this patch it is also the same as it was on earlier non-dt kernels where it was working properly Signed-off-by: Andreas Kemnade Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-gta04.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7c62de5f3fc92291decc0dac5f36949bdc3fb575 Author: Keerthy Date: Thu Apr 13 10:21:21 2017 +0530 ARM: dts: dra7: Add power hold and power controller properties to palmas Add power hold and power controller properties to palmas node. This is needed to shutdown pmic correctly on boards with powerhold set. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7-evm.dts | 2 ++ 1 file changed, 2 insertions(+) commit 6ceec6953efe7f371218082ddee1fe022a13e8ab Author: Alexandre Belloni Date: Tue May 16 16:54:53 2017 +0200 MAINTAINERS: update RTC mailing list The RTC subsystem mailing list is moving to vger. Signed-off-by: Alexandre Belloni MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bff5baf8aa37a97293725a16c03f49872249c07e Author: Colin Ian King Date: Tue May 9 18:14:01 2017 +0100 btrfs: fix incorrect error return ret being passed to mapping_set_error The setting of return code ret should be based on the error code passed into function end_extent_writepage and not on ret. Thanks to Liu Bo for spotting this mistake in the original fix I submitted. Detected by CoverityScan, CID#1414312 ("Logically dead code") Fixes: 5dca6eea91653e ("Btrfs: mark mapping with error flag to report errors to userspace") Signed-off-by: Colin Ian King Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d91012528b3c95c159e6b6779e367421df9cbb5 Author: Jan Kara Date: Tue May 2 17:03:50 2017 +0200 btrfs: Make flush bios explicitely sync Commit b685d3d65ac7 "block: treat REQ_FUA and REQ_PREFLUSH as synchronous" removed REQ_SYNC flag from WRITE_{FUA|PREFLUSH|...} definitions. generic_make_request_checks() however strips REQ_FUA and REQ_PREFLUSH flags from a bio when the storage doesn't report volatile write cache and thus write effectively becomes asynchronous which can lead to performance regressions Fix the problem by making sure all bios which are synchronous are properly marked with REQ_SYNC. CC: David Sterba CC: linux-btrfs@vger.kernel.org Fixes: b685d3d65ac791406e0dfd8779cc9b3707fea5a3 Signed-off-by: Jan Kara Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/disk-io.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 4751832da990a927c37526ae67b9226ea01eb99e Author: Qu Wenruo Date: Fri Apr 7 10:43:15 2017 +0800 btrfs: fiemap: Cache and merge fiemap extent before submit it to user [BUG] Cycle mount btrfs can cause fiemap to return different result. Like: # mount /dev/vdb5 /mnt/btrfs # dd if=/dev/zero bs=16K count=4 oflag=dsync of=/mnt/btrfs/file # xfs_io -c "fiemap -v" /mnt/btrfs/file /mnt/test/file: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..127]: 25088..25215 128 0x1 # umount /mnt/btrfs # mount /dev/vdb5 /mnt/btrfs # xfs_io -c "fiemap -v" /mnt/btrfs/file /mnt/test/file: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..31]: 25088..25119 32 0x0 1: [32..63]: 25120..25151 32 0x0 2: [64..95]: 25152..25183 32 0x0 3: [96..127]: 25184..25215 32 0x1 But after above fiemap, we get correct merged result if we call fiemap again. # xfs_io -c "fiemap -v" /mnt/btrfs/file /mnt/test/file: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..127]: 25088..25215 128 0x1 [REASON] Btrfs will try to merge extent map when inserting new extent map. btrfs_fiemap(start=0 len=(u64)-1) |- extent_fiemap(start=0 len=(u64)-1) |- get_extent_skip_holes(start=0 len=64k) | |- btrfs_get_extent_fiemap(start=0 len=64k) | |- btrfs_get_extent(start=0 len=64k) | | Found on-disk (ino, EXTENT_DATA, 0) | |- add_extent_mapping() | |- Return (em->start=0, len=16k) | |- fiemap_fill_next_extent(logic=0 phys=X len=16k) | |- get_extent_skip_holes(start=0 len=64k) | |- btrfs_get_extent_fiemap(start=0 len=64k) | |- btrfs_get_extent(start=16k len=48k) | | Found on-disk (ino, EXTENT_DATA, 16k) | |- add_extent_mapping() | | |- try_merge_map() | | Merge with previous em start=0 len=16k | | resulting em start=0 len=32k | |- Return (em->start=0, len=32K) << Merged result |- Stripe off the unrelated range (0~16K) of return em |- fiemap_fill_next_extent(logic=16K phys=X+16K len=16K) ^^^ Causing split fiemap extent. And since in add_extent_mapping(), em is already merged, in next fiemap() call, we will get merged result. [FIX] Here we introduce a new structure, fiemap_cache, which records previous fiemap extent. And will always try to merge current fiemap_cache result before calling fiemap_fill_next_extent(). Only when we failed to merge current fiemap extent with cached one, we will call fiemap_fill_next_extent() to submit cached one. So by this method, we can merge all fiemap extents. It can also be done in fs/ioctl.c, however the problem is if fieinfo->fi_extents_max == 0, we have no space to cache previous fiemap extent. So I choose to merge it in btrfs. Signed-off-by: Qu Wenruo Reviewed-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 122 insertions(+), 2 deletions(-) commit 2c4569ca26986d18243f282dd727da27e9adae4c Author: Thomas Gleixner Date: Thu May 11 13:54:11 2017 +0200 genirq: Fix chained interrupt data ordering irq_set_chained_handler_and_data() sets up the chained interrupt and then stores the handler data. That's racy against an immediate interrupt which gets handled before the store of the handler data happened. The handler will dereference a NULL pointer and crash. Cure it by storing handler data before installing the chained handler. Reported-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org kernel/irq/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b72d7451209a0bad4264f5f4cb389e7f71cc5ad4 Author: Arnd Bergmann Date: Tue May 16 13:30:05 2017 +0200 staging: fsl-dpaa2/eth: add ETHERNET dependency The new driver cannot link correctly when the netdevice infrastructure is disabled: ERROR: "netdev_info" [drivers/staging/fsl-dpaa2/ethernet/fsl-dpaa2-eth.ko] undefined! ERROR: "skb_to_sgvec" [drivers/staging/fsl-dpaa2/ethernet/fsl-dpaa2-eth.ko] undefined! ERROR: "napi_disable" [drivers/staging/fsl-dpaa2/ethernet/fsl-dpaa2-eth.ko] undefined! ERROR: "napi_schedule_prep" [drivers/staging/fsl-dpaa2/ethernet/fsl-dpaa2-eth.ko] undefined! ERROR: "__napi_schedule_irqoff" [drivers/staging/fsl-dpaa2/ethernet/fsl-dpaa2-eth.ko] undefined! ERROR: "netif_carrier_on" [drivers/staging/fsl-dpaa2/ethernet/fsl-dpaa2-eth.ko] undefined! This adds a dependency on NETDEVICES and ETHERNET. Fixes: 0352d1d85201 ("staging: fsl-dpaa2/eth: Add APIs for DPNI objects") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 50b7c322cfc8b44a36b1373dab2177db23e3282c Author: Rui Miguel Silva Date: Fri May 12 21:16:15 2017 +0100 staging: typec: fusb302: refactor resume retry mechanism The i2c functions need to test the pm_suspend state and do, if needed, some retry before i2c operations. This code was repeated 4x. To isolate this, create a new function to check suspend state and call it in every need place. As at it, move the error message from pr_err to dev_err. Signed-off-by: Rui Miguel Silva Acked-by: Yueyao Zhu Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/fusb302/fusb302.c | 70 +++++++++++++++++---------------- 1 file changed, 36 insertions(+), 34 deletions(-) commit f0d39a179b9cd38c739acfc4f92720a0c79e1d66 Author: Rui Miguel Silva Date: Fri May 12 21:16:14 2017 +0100 staging: typec: fusb302: reset i2c_busy state in error Fix reset of i2c_busy flag if an error occurs during the i2c block read. Signed-off-by: Rui Miguel Silva Acked-by: Yueyao Zhu Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/fusb302/fusb302.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 018047a1dba7636e1f7fdae2cc290a528991d648 Author: Pan Bian Date: Sun Apr 23 13:55:13 2017 +0800 usb: dwc3: keystone: check return value Function devm_clk_get() returns an ERR_PTR when it fails. However, in function kdwc3_probe(), its return value is not checked, which may result in a bad memory access bug. This patch fixes the bug. Signed-off-by: Pan Bian Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-keystone.c | 4 ++++ 1 file changed, 4 insertions(+) commit b7f73850bb4fac1e2209a4dd5e636d39be92f42c Author: William Wu Date: Tue Apr 25 17:45:48 2017 +0800 usb: gadget: f_fs: avoid out of bounds access on comp_desc Companion descriptor is only used for SuperSpeed endpoints, if the endpoints are HighSpeed or FullSpeed, the Companion descriptor will not allocated, so we can only access it if gadget is SuperSpeed. I can reproduce this issue on Rockchip platform rk3368 SoC which supports USB 2.0, and use functionfs for ADB. Kernel build with CONFIG_KASAN=y and CONFIG_SLUB_DEBUG=y report the following BUG: ================================================================== BUG: KASAN: slab-out-of-bounds in ffs_func_set_alt+0x224/0x3a0 at addr ffffffc0601f6509 Read of size 1 by task swapper/0/0 ============================================================================ BUG kmalloc-256 (Not tainted): kasan: bad access detected ---------------------------------------------------------------------------- Disabling lock debugging due to kernel taint INFO: Allocated in ffs_func_bind+0x52c/0x99c age=1275 cpu=0 pid=1 alloc_debug_processing+0x128/0x17c ___slab_alloc.constprop.58+0x50c/0x610 __slab_alloc.isra.55.constprop.57+0x24/0x34 __kmalloc+0xe0/0x250 ffs_func_bind+0x52c/0x99c usb_add_function+0xd8/0x1d4 configfs_composite_bind+0x48c/0x570 udc_bind_to_driver+0x6c/0x170 usb_udc_attach_driver+0xa4/0xd0 gadget_dev_desc_UDC_store+0xcc/0x118 configfs_write_file+0x1a0/0x1f8 __vfs_write+0x64/0x174 vfs_write+0xe4/0x200 SyS_write+0x68/0xc8 el0_svc_naked+0x24/0x28 INFO: Freed in inode_doinit_with_dentry+0x3f0/0x7c4 age=1275 cpu=7 pid=247 ... Call trace: [] dump_backtrace+0x0/0x230 [] show_stack+0x14/0x1c [] dump_stack+0xa0/0xc8 [] print_trailer+0x188/0x198 [] object_err+0x3c/0x4c [] kasan_report+0x324/0x4dc [] __asan_load1+0x24/0x50 [] ffs_func_set_alt+0x224/0x3a0 [] composite_setup+0xdcc/0x1ac8 [] android_setup+0x124/0x1a0 [] _setup+0x54/0x74 [] handle_ep0+0x3288/0x4390 [] dwc_otg_pcd_handle_out_ep_intr+0x14dc/0x2ae4 [] dwc_otg_pcd_handle_intr+0x1ec/0x298 [] dwc_otg_pcd_irq+0x10/0x20 [] handle_irq_event_percpu+0x124/0x3ac [] handle_irq_event+0x60/0xa0 [] handle_fasteoi_irq+0x10c/0x1d4 [] generic_handle_irq+0x30/0x40 [] __handle_domain_irq+0xac/0xdc [] gic_handle_irq+0x64/0xa4 ... Memory state around the buggy address: ffffffc0601f6400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffffc0601f6480: 00 00 00 00 00 00 00 00 00 00 06 fc fc fc fc fc >ffffffc0601f6500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffffffc0601f6580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffffffc0601f6600: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ================================================================== Signed-off-by: William Wu Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 844cf8a9d51f1d1e116d0bb18c353a2a94c70e79 Author: Bogdan Mirea Date: Sun Apr 30 13:21:26 2017 +0300 usb: gadget: gserial: check if console kthread exists Check for bad pointer that may result because of kthread_create failure. This check is needed since the gserial setup callback function (gs_console_setup()) is only freeing the info->con_buf in case of kthread_create failure which will result into bad info->console_thread pointer. Without checking info->console_thread pointer validity in the gserial_console_exit() function, before calling kthread_stop(), the rmmod will generate Kernel Oops. Signed-off-by: Bogdan Mirea Signed-off-by: Felipe Balbi drivers/usb/gadget/function/u_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d325a1de49d61ee11aca58a529571c91ecea7879 Author: Thinh Nguyen Date: Thu May 11 17:26:47 2017 -0700 usb: dwc3: gadget: Prevent losing events in event cache The dwc3 driver can overwite its previous events if its top-half IRQ handler (TH) gets invoked again before processing the events in the cache. We see this as a hang in the file transfer and the host will attempt to reset the device. TH gets the event count and deasserts the interrupt line by writing DWC3_GEVNTSIZ_INTMASK to DWC3_GEVNTSIZ. If there's a new event coming between reading the event count and interrupt deassertion, dwc3 will lose previous pending events. More generally, we will see 0 event count, which should not affect anything. This shouldn't be possible in the current dwc3 implementation. However, through testing and reading the PCIe trace, the TH occasionally still gets invoked one more time after HW interrupt deassertion. (With PCIe legacy interrupts, TH is called repeatedly as long as the interrupt line is asserted). We suspect that there is a small detection delay in the SW. To avoid this issue, Check DWC3_EVENT_PENDING flag to determine if the events are processed in the bottom-half IRQ handler. If not, return IRQ_HANDLED and don't process new event. Cc: stable@vger.kernel.org Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f1d6826cae30e97e37a1f2481d7e1dc4faa09ce1 Author: Roger Quadros Date: Fri Apr 21 15:58:08 2017 +0300 usb: dwc3: gadget: Fix ISO transfer performance Commit 08a36b543803 ("usb: dwc3: gadget: simplify __dwc3_gadget_ep_queue()") caused a small change in the way ISO transfer is handled in the case when XferInProgress event happens on Isoc EP with an active transfer. This caused a performance degradation of 50%. e.g. using g_webcam on DUT and luvcview on host the video frame rate dropped from 16fps to 8fps @high-speed. Make the ISO transfer handling equivalent to that prior to that commit to get back the original ISO performance numbers. Fixes: 08a36b543803 ("usb: dwc3: gadget: simplify __dwc3_gadget_ep_queue()") Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 682179592e48fa66056fbad1a86604be4992f885 Author: Heikki Krogerus Date: Fri Apr 1 17:13:13 2016 +0300 usb: dwc3: pci: add Intel Cannonlake PCI IDs Intel Cannonlake PCH has the same DWC3 than Intel Sunrisepoint. Add the new IDs to the supported devices. Signed-off-by: Heikki Krogerus Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-pci.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0c428a6a9256fcd66817e12db32a50b405ed2e5c Author: Suzuki K Poulose Date: Tue May 16 10:34:55 2017 +0100 kvm: arm/arm64: Fix use after free of stage2 page table We yield the kvm->mmu_lock occassionaly while performing an operation (e.g, unmap or permission changes) on a large area of stage2 mappings. However this could possibly cause another thread to clear and free up the stage2 page tables while we were waiting for regaining the lock and thus the original thread could end up in accessing memory that was freed. This patch fixes the problem by making sure that the stage2 pagetable is still valid after we regain the lock. The fact that mmu_notifer->release() could be called twice (via __mmu_notifier_release and mmu_notifier_unregsister) enhances the possibility of hitting this race where there are two threads trying to unmap the entire guest shadow pages. While at it, cleanup the redudant checks around cond_resched_lock in stage2_wp_range(), as cond_resched_lock already does the same checks. Cc: Mark Rutland Cc: Radim Krčmář Cc: andreyknvl@google.com Cc: Paolo Bonzini Cc: stable@vger.kernel.org Acked-by: Marc Zyngier Signed-off-by: Suzuki K Poulose Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/mmu.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 2952a6070e07ebdd5896f1f5b861acad677caded Author: Suzuki K Poulose Date: Tue May 16 10:34:54 2017 +0100 kvm: arm/arm64: Force reading uncached stage2 PGD Make sure we don't use a cached value of the KVM stage2 PGD while resetting the PGD. Cc: Marc Zyngier Cc: stable@vger.kernel.org Signed-off-by: Suzuki K Poulose Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dbed87a9d3a857a86f602775b5845f5f6d9652b5 Author: Tobias Regnery Date: Mon Apr 24 12:05:42 2017 +0200 clk: meson: gxbb: fix build error without RESET_CONTROLLER With CONFIG_RESET_CONTROLLER=n we see the following link error in the meson gxbb clk driver: drivers/built-in.o: In function 'gxbb_aoclkc_probe': drivers/clk/meson/gxbb-aoclk.c:161: undefined reference to 'devm_reset_controller_register' Fix this by selecting the reset controller subsystem. Fixes: f8c11f79912d ("clk: meson: Add GXBB AO Clock and Reset controller driver") Signed-off-by: Tobias Regnery Acked-by: Neil Armstrong [narmstrong: Added fixes-by tag] Signed-off-by: Neil Armstrong drivers/clk/meson/Kconfig | 1 + 1 file changed, 1 insertion(+) commit c953d63548207a085abcb12a15fefc8a11ffdf0a Author: Gao Feng Date: Tue May 16 09:30:18 2017 +0800 ebtables: arpreply: Add the standard target sanity check The info->target comes from userspace and it would be used directly. So we need to add the sanity check to make sure it is a valid standard target, although the ebtables tool has already checked it. Kernel needs to validate anything coming from userspace. If the target is set as an evil value, it would break the ebtables and cause a panic. Because the non-standard target is treated as one offset. Now add one helper function ebt_invalid_target, and we would replace the macro INVALID_TARGET later. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso include/linux/netfilter_bridge/ebtables.h | 5 +++++ net/bridge/netfilter/ebt_arpreply.c | 3 +++ 2 files changed, 8 insertions(+) commit fa16b69f1299004b60b625f181143500a246e5cb Author: Takashi Iwai Date: Tue May 16 09:11:33 2017 +0200 ALSA: hda - No loopback on ALC299 codec ALC299 has no loopback mixer, but the driver still tries to add a beep control over the mixer NID which leads to the error at accessing it. This patch fixes it by properly declaring mixer_nid=0 for this codec. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195775 Fixes: 28f1f9b26cee ("ALSA: hda/realtek - Add new codec ID ALC299") Cc: stable@vger.kernel.org Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 3 +++ 1 file changed, 3 insertions(+) commit 9a445bbb1607d9f14556a532453dd86d1b7e381e Author: Hiroyuki Yokoyama Date: Mon May 15 17:49:52 2017 +0900 dmaengine: usb-dmac: Fix DMAOR AE bit definition This patch fixes the register definition of AE (Address Error flag) bit. Fixes: 0c1c8ff32fa2 ("dmaengine: usb-dmac: Add Renesas USB DMA Controller (USB-DMAC) driver") Cc: # v4.1+ Signed-off-by: Hiroyuki Yokoyama [Shimoda: add Fixes and Cc tags in the commit log] Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Vinod Koul drivers/dma/sh/usb-dmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ff83daa0200affe1894bd33d17bac404e3d78d4 Author: Nicholas Bellinger Date: Thu May 11 01:07:24 2017 -0700 target: Re-add check to reject control WRITEs with overflow data During v4.3 when the overflow/underflow check was relaxed by commit c72c525022: commit c72c5250224d475614a00c1d7e54a67f77cd3410 Author: Roland Dreier Date: Wed Jul 22 15:08:18 2015 -0700 target: allow underflow/overflow for PR OUT etc. commands to allow underflow/overflow for Windows compliance + FCP, a consequence was to allow control CDBs to process overflow data for iscsi-target with immediate data as well. As per Roland's original change, continue to allow underflow cases for control CDBs to make Windows compliance + FCP happy, but until overflow for control CDBs is supported tree-wide, explicitly reject all control WRITEs with overflow following pre v4.3.y logic. Reported-by: Bart Van Assche Cc: Roland Dreier Cc: # v4.3+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 75dbf2d36f6b122ad3c1070fe4bf95f71bbff321 Author: Bryant G. Ly Date: Wed May 10 14:35:47 2017 -0500 ibmvscsis: Fix the incorrect req_lim_delta The current code is not correctly calculating the req_lim_delta. We want to make sure vscsi->credit is always incremented when we do not send a response for the scsi op. Thus for the case where there is a successfully aborted task we need to make sure the vscsi->credit is incremented. v2 - Moves the original location of the vscsi->credit increment to a better spot. Since if we increment credit, the next command we send back will have increased req_lim_delta. But we probably shouldn't be doing that until the aborted cmd is actually released. Otherwise the client will think that it can send a new command, and we could find ourselves short of command elements. Not likely, but could happen. This patch depends on both: commit 25e78531268e ("ibmvscsis: Do not send aborted task response") commit 98883f1b5415 ("ibmvscsis: Clear left-over abort_cmd pointers") Signed-off-by: Bryant G. Ly Reviewed-by: Michael Cyr Cc: # v4.8+ Signed-off-by: Nicholas Bellinger drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit 98883f1b5415ea9dce60d5178877d15f4faa10b8 Author: Bryant G. Ly Date: Tue May 9 11:50:26 2017 -0500 ibmvscsis: Clear left-over abort_cmd pointers With the addition of ibmvscsis->abort_cmd pointer within commit 25e78531268e ("ibmvscsis: Do not send aborted task response"), make sure to explicitly NULL these pointers when clearing DELAY_SEND flag. Do this for two cases, when getting the new new ibmvscsis descriptor in ibmvscsis_get_free_cmd() and before posting the response completion in ibmvscsis_send_messages(). Signed-off-by: Bryant G. Ly Reviewed-by: Michael Cyr Cc: # v4.8+ Signed-off-by: Nicholas Bellinger drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 3 +++ 1 file changed, 3 insertions(+) commit d04c02f8aa96d82e4cbe783f85a820aae820e746 Author: Naveen N. Rao Date: Mon May 15 23:40:05 2017 +0530 powerpc/kprobes: Fix handling of instruction emulation on probe re-entry Commit 22d8b3dec214c ("powerpc/kprobes: Emulate instructions on kprobe handler re-entry") enabled emulating instructions on kprobe re-entry, rather than single-stepping always. However, we didn't update the single stepping code to only be run if the emulation fails. Also, we missed re-enabling preemption if the instruction emulation was successful. Fix those issues. Fixes: 22d8b3dec214c ("powerpc/kprobes: Emulate instructions on kprobe handler re-entry") Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bbb075ddf7d58762040ca413ad82e9974713def3 Author: Gautham R. Shenoy Date: Fri May 12 14:52:06 2017 +0530 powerpc/powernv: Set NAPSTATELOST after recovering paca on P9 DD1 Commit 17ed4c8f81da ("powerpc/powernv: Recover correct PACA on wakeup from a stop on P9 DD1") promises to set the NAPSTATELOST bit in paca after recovering the correct paca for the thread waking up from stop1 on DD1, so that the GPRs can be correctly restored on the stop exit path. However, it loads the value 1 into r3, but stores the value in r0 into NAPSTATELOST(r13). Fix this by correctly set the NAPSTATELOST bit in paca after recovering the paca on POWER9 DD1. Fixes: 17ed4c8f81da ("powerpc/powernv: Recover correct PACA on wakeup from a stop on P9 DD1") Signed-off-by: Gautham R. Shenoy Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cde97f8492ac4425c4d0647a308e15e78cb4c218 Author: Michael Neuling Date: Mon May 8 17:16:27 2017 +1000 selftests/powerpc: Test TM and VMX register state Test that the VMX checkpointed register state is maintained when a VMX unavailable exception is taken during a transaction. Thanks to Breno Leitao and Gustavo Bueno Romero for the original test this is based heavily on. Signed-off-by: Michael Neuling Reviewed-by: Cyril Bur [mpe: Add to .gitignore, always build it 64-bit to fix build errors] Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/tm/.gitignore | 1 + tools/testing/selftests/powerpc/tm/Makefile | 4 +- .../testing/selftests/powerpc/tm/tm-vmx-unavail.c | 118 +++++++++++++++++++++ 3 files changed, 122 insertions(+), 1 deletion(-) commit a95cfad947d5f40cfbf9ad3019575aac1d8ac7a6 Merge: 1319a28 66f4bc8 Author: Linus Torvalds Date: Mon May 15 15:50:49 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Track alignment in BPF verifier so that legitimate programs won't be rejected on !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS architectures. 2) Make tail calls work properly in arm64 BPF JIT, from Deniel Borkmann. 3) Make the configuration and semantics Generic XDP make more sense and don't allow both generic XDP and a driver specific instance to be active at the same time. Also from Daniel. 4) Don't crash on resume in xen-netfront, from Vitaly Kuznetsov. 5) Fix use-after-free in VRF driver, from Gao Feng. 6) Use netdev_alloc_skb_ip_align() to avoid unaligned IP headers in qca_spi driver, from Stefan Wahren. 7) Always run cleanup routines in BPF samples when we get SIGTERM, from Andy Gospodarek. 8) The mdio phy code should bring PHYs out of reset using the shared GPIO lines before invoking bus->reset(). From Florian Fainelli. 9) Some USB descriptor access endian fixes in various drivers from Johan Hovold. 10) Handle PAUSE advertisements properly in mlx5 driver, from Gal Pressman. 11) Fix reversed test in mlx5e_setup_tc(), from Saeed Mahameed. 12) Cure netdev leak in AF_PACKET when using timestamping via control messages. From Douglas Caetano dos Santos. 13) netcp doesn't support HWTSTAMP_FILTER_ALl, reject it. From Miroslav Lichvar. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (52 commits) ldmvsw: stop the clean timer at beginning of remove ldmvsw: unregistering netdev before disable hardware net: netcp: fix check of requested timestamping filter ipv6: avoid dad-failures for addresses with NODAD qed: Fix uninitialized data in aRFS infrastructure mdio: mux: fix device_node_continue.cocci warnings net/packet: fix missing net_device reference release net/mlx4_core: Use min3 to select number of MSI-X vectors macvlan: Fix performance issues with vlan tagged packets net: stmmac: use correct pointer when printing normal descriptor ring net/mlx5: Use underlay QPN from the root name space net/mlx5e: IPoIB, Only support regular RQ for now net/mlx5e: Fix setup TC ndo net/mlx5e: Fix ethtool pause support and advertise reporting net/mlx5e: Use the correct pause values for ethtool advertising vmxnet3: ensure that adapter is in proper state during force_close sfc: revert changes to NIC revision numbers net: ch9200: add missing USB-descriptor endianness conversions net: irda: irda-usb: fix firmware name on big-endian hosts net: dsa: mv88e6xxx: add default case to switch ... commit 1319a2856dfdd6b4613530e771fe108f00dfc661 Merge: 2ea659a 67b4c88 Author: Linus Torvalds Date: Mon May 15 15:27:02 2017 -0700 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "A set of minor cifs fixes" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: [CIFS] Minor cleanup of xattr query function fs: cifs: transport: Use time_after for time comparison SMB2: Fix share type handling cifs: cifsacl: Use a temporary ops variable to reduce code length Don't delay freeing mids when blocked on slow socket write of request CIFS: silence lockdep splat in cifs_relock_file() commit b0804ed0cadd7e38d94d2f15cdcc0d9695818856 Author: Phil Elwell Date: Tue May 9 10:04:30 2017 +0100 ARM: dts: bcm283x: Reserve first page for firmware The Raspberry Pi startup stub files for multi-core BCM283X processors make the secondary CPUs spin until the corresponding mailbox is written. These stubs are loaded at physical address 0x00000xxx (as seen by the ARMs), but this page will be reused by the kernel unless it is explicitly reserved, causing the waiting cores to execute random code. Use the /memreserve/ Device Tree directive to mark the first page as off-limits to the kernel. See: https://github.com/raspberrypi/linux/issues/1989 Signed-off-by: Phil Elwell Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt arch/arm/boot/dts/bcm283x.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit d3f7c35c1ab33e6aa035407fed38d9149858bed7 Merge: a00ebd1 2d4456c Author: Jens Axboe Date: Mon May 15 15:33:06 2017 -0600 Merge branch 'stable/for-jens-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-linus Pull a single fix from Konrad. commit 2d4456c73a487abe53863e10641c2f73537edf5c Author: Gustavo A. R. Silva Date: Thu May 11 10:27:35 2017 -0500 block: xen-blkback: add null check to avoid null pointer dereference Add null check before calling xen_blkif_put() to avoid potential null pointer dereference. Addresses-Coverity-ID: 1350942 Cc: Juergen Gross Signed-off-by: Gustavo A. R. Silva Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkback/xenbus.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 66f4bc819d71bb600f1c879c9a7161de1cc725f8 Merge: ca9df7e 8b671f9 Author: David S. Miller Date: Mon May 15 15:36:09 2017 -0400 Merge branch 'ldmsw-fixes' Shannon Nelson says: ==================== ldmvsw: port removal stability Under heavy reboot stress testing we found a couple of timing issues when removing the device that could cause the kernel great heartburn, addressed by these two patches. ==================== Signed-off-by: David S. Miller commit 8b671f906c2debc4f2393438c4e7668936522e99 Author: Shannon Nelson Date: Mon May 15 10:51:08 2017 -0700 ldmvsw: stop the clean timer at beginning of remove Stop the clean timer earlier to be sure there's no asynchronous interference while stopping the port. Orabug: 25748241 Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller drivers/net/ethernet/sun/ldmvsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b18e5e86b44be0dca399d8e2383f97c8077392ce Author: Thomas Tai Date: Mon May 15 10:51:07 2017 -0700 ldmvsw: unregistering netdev before disable hardware When running LDom binding/unbinding test, kernel may panic in ldmvsw_open(). It is more likely that because we're removing the ldc connection before unregistering the netdev in vsw_port_remove(), we set up a window of time where one process could be removing the device while another trying to UP the device. This also sometimes causes vio handshake error due to opening a device without closing it completely. We should unregister the netdev before we disable the "hardware". Orabug: 25980913, 25925306 Signed-off-by: Thomas Tai Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller drivers/net/ethernet/sun/ldmvsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca9df7ede41afd006d74fd6f09f36d909d0eaad7 Author: Miroslav Lichvar Date: Mon May 15 16:04:36 2017 +0200 net: netcp: fix check of requested timestamping filter The driver doesn't support timestamping of all received packets and should return error when trying to enable the HWTSTAMP_FILTER_ALL filter. Cc: WingMan Kwok Cc: Richard Cochran Signed-off-by: Miroslav Lichvar Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp_ethss.c | 1 - 1 file changed, 1 deletion(-) commit f98e0eb68008aff9824d1c4dad7276c8bab83ca5 Author: Christoph Hellwig Date: Mon May 15 17:28:38 2017 +0200 dm mpath: multipath_clone_and_map must not return -EIO Since 412445ac ("dm: introduce a new DM_MAPIO_KILL return value"), the clone_and_map_rq methods must not return errno values, so fix it up to properly return DM_MAPIO_KILL, instead of the -EIO value that snuck in due to a conflict between two patches. Signed-off-by: Christoph Hellwig Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18a482f5245cc875755090853e84283512b3e6bd Author: Christoph Hellwig Date: Mon May 15 17:28:37 2017 +0200 dm mpath: don't return -EIO from dm_report_EIO Instead just turn the macro into a helper for the warning message. This removes an unnecessary assignment and will allow the next commit to fix a place where -EIO is the wrong return value. Signed-off-by: Christoph Hellwig Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit ece0728037b15f4d31198f12b359104bcb5db4c8 Author: Christoph Hellwig Date: Mon May 15 17:28:36 2017 +0200 dm rq: add a missing break to map_request We don't want to bug when receiving a DM_MAPIO_KILL value.. Fixes: 412445ac ("dm: introduce a new DM_MAPIO_KILL return value") Signed-off-by: Christoph Hellwig Signed-off-by: Mike Snitzer drivers/md/dm-rq.c | 1 + 1 file changed, 1 insertion(+) commit 0377a07c7a035e0d033cd8b29f0cb15244c0916a Author: Joe Thornber Date: Mon May 15 09:45:40 2017 -0400 dm space map disk: fix some book keeping in the disk space map When decrementing the reference count for a block, the free count wasn't being updated if the reference count went to zero. Cc: stable@vger.kernel.org Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/persistent-data/dm-space-map-disk.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 91bcdb92d39711d1adb40c26b653b7978d93eb98 Author: Joe Thornber Date: Mon May 15 09:43:05 2017 -0400 dm thin metadata: call precommit before saving the roots These calls were the wrong way round in __write_initial_superblock. Cc: stable@vger.kernel.org Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-thin-metadata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 42a928ced3a2f36934d9c4157fbd21178e3acff3 Merge: 66eb9f8 5085411 Author: David S. Miller Date: Mon May 15 14:38:04 2017 -0400 Merge tag 'mlx5-fixes-2017-05-12-V2' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2017-05-12 This series contains some mlx5 fixes for net. Please pull and let me know if there's any problem. For -stable: ("net/mlx5e: Fix ethtool pause support and advertise reporting") kernels >= 4.8 ("net/mlx5e: Use the correct pause values for ethtool advertising") kernels >= 4.8 v1->v2: Dropped statistics spinlock patch, it needs some extra work. ==================== Signed-off-by: David S. Miller commit 66eb9f86e50547ec2a8ff7a75997066a74ef584b Author: Mahesh Bandewar Date: Fri May 12 17:03:39 2017 -0700 ipv6: avoid dad-failures for addresses with NODAD Every address gets added with TENTATIVE flag even for the addresses with IFA_F_NODAD flag and dad-work is scheduled for them. During this DAD process we realize it's an address with NODAD and complete the process without sending any probe. However the TENTATIVE flags stays on the address for sometime enough to cause misinterpretation when we receive a NS. While processing NS, if the address has TENTATIVE flag, we mark it DADFAILED and endup with an address that was originally configured as NODAD with DADFAILED. We can't avoid scheduling dad_work for addresses with NODAD but we can avoid adding TENTATIVE flag to avoid this racy situation. Signed-off-by: Mahesh Bandewar Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv6/addrconf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit aa4ad88cfcd4ee45f527fb982140576711e3b501 Author: Mintz, Yuval Date: Sun May 14 12:21:23 2017 +0300 qed: Fix uninitialized data in aRFS infrastructure Current memset is using incorrect type of variable, causing the upper-half of the strucutre to be left uninitialized and causing: ethernet/qlogic/qed/qed_init_fw_funcs.c: In function 'qed_set_rfs_mode_disable': ethernet/qlogic/qed/qed_init_fw_funcs.c:993:3: error: '*((void *)&ramline+4)' is used uninitialized in this function [-Werror=uninitialized] Fixes: d51e4af5c209 ("qed: aRFS infrastructure support") Reported-by: Arnd Bergmann Signed-off-by: Yuval Mintz Reviewed-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c977f5a856a7276450ddf3a7b57b4a8815b63f9 Author: Julia Lawall Date: Fri May 12 22:54:23 2017 +0800 mdio: mux: fix device_node_continue.cocci warnings Device node iterators put the previous value of the index variable, so an explicit put causes a double put. In particular, of_mdiobus_register can fail before doing anything interesting, so one could view it as a no-op from the reference count point of view. Generated by: scripts/coccinelle/iterators/device_node_continue.cocci CC: Jon Mason Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu Signed-off-by: David S. Miller drivers/net/phy/mdio-mux.c | 1 - 1 file changed, 1 deletion(-) commit d19b183cdc1fa3d70d6abe2a4c369e748cd7ebb8 Author: Douglas Caetano dos Santos Date: Fri May 12 15:19:15 2017 -0300 net/packet: fix missing net_device reference release When using a TX ring buffer, if an error occurs processing a control message (e.g. invalid message), the net_device reference is not released. Fixes c14ac9451c348 ("sock: enable timestamping using control messages") Signed-off-by: Douglas Caetano dos Santos Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/packet/af_packet.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 4762010f09ac0453f613df345c5281e7f2dec510 Author: yuval.shaia@oracle.com Date: Fri May 12 09:10:51 2017 +0300 net/mlx4_core: Use min3 to select number of MSI-X vectors Signed-off-by: Yuval Shaia Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 70957eaecc2e43308e403c80293bec3d59632412 Author: Vlad Yasevich Date: Thu May 11 11:09:52 2017 -0400 macvlan: Fix performance issues with vlan tagged packets Macvlan always turns on offload features that have sofware fallback (NETIF_GSO_SOFTWARE). This allows much higher guest-guest communications over macvtap. However, macvtap does not turn on these features for vlan tagged traffic. As a result, depending on the HW that mactap is configured on, the performance of guest-guest communication over a vlan is very inconsistent. If the HW supports TSO/UFO over vlans, then the performance will be fine. If not, the the performance will suffer greatly since the VM may continue using TSO/UFO, and will force the host segment the traffic and possibly overlow the macvtap queue. This patch adds the always on offloads to vlan_features. This makes sure that any vlan tagged traffic between 2 guest will not be segmented needlessly. Signed-off-by: Vladislav Yasevich Signed-off-by: David S. Miller drivers/net/macvlan.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 78a19cfdf37d19002c83c8790853c1cc10feccdc Author: Ganapatrao Kulkarni Date: Tue May 2 21:59:34 2017 +0530 arm64: perf: Ignore exclude_hv when kernel is running in HYP commit d98ecdaca296 ("arm64: perf: Count EL2 events if the kernel is running in HYP") returns -EINVAL when perf system call perf_event_open is called with exclude_hv != exclude_kernel. This change breaks applications on VHE enabled ARMv8.1 platforms. The issue was observed with HHVM application, which calls perf_event_open with exclude_hv = 1 and exclude_kernel = 0. There is no separate hypervisor privilege level when VHE is enabled, the host kernel runs at EL2. So when VHE is enabled, we should ignore exclude_hv from the application. This behaviour is consistent with PowerPC where the exclude_hv is ignored when the hypervisor is not present and with x86 where this flag is ignored. Signed-off-by: Ganapatrao Kulkarni [will: added comment to justify the behaviour of exclude_hv] Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/kernel/perf_event.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 8df728e1ae614f592961e51f65d3e3212ede5a75 Author: Robin Murphy Date: Fri May 12 13:48:41 2017 +0100 arm64: Remove redundant mov from LL/SC cmpxchg The cmpxchg implementation introduced by commit c342f78217e8 ("arm64: cmpxchg: patch in lse instructions when supported by the CPU") performs an apparently redundant register move of [old] to [oldval] in the success case - it always uses the same register width as [oldval] was originally loaded with, and is only executed when [old] and [oldval] are known to be equal anyway. The only effect it seemingly does have is to take up a surprising amount of space in the kernel text, as removing it reveals: text data bss dec hex filename 12426658 1348614 4499749 18275021 116dacd vmlinux.o.new 12429238 1348614 4499749 18277601 116e4e1 vmlinux.o.old Reviewed-by: Will Deacon Signed-off-by: Robin Murphy Signed-off-by: Catalin Marinas arch/arm64/include/asm/atomic_ll_sc.h | 1 - 1 file changed, 1 deletion(-) commit 9fce894d03a98ec8e8e8106a964644633d2772ee Author: Peter Rosin Date: Mon May 15 09:03:50 2017 +0200 i2c: mux: only print failure message on error As is, a failure message is printed unconditionally, which is confusing. And noisy. Fixes: 8d4d159f25a7 ("i2c: mux: provide more info on failure in i2c_mux_add_adapter") Signed-off-by: Peter Rosin drivers/i2c/i2c-mux.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit a36d4637e4a06be067b8e327a0b1118bb2a73cb8 Author: Peter Rosin Date: Mon May 15 18:48:55 2017 +0200 i2c: mux: reg: rename label to indicate what it does That maintains sanity if it is ever called from some other spot, and also makes the label names coherent. Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-mux-reg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 68118e0e73aa3a6291c8b9eb1ee708e05f110cea Author: Peter Rosin Date: Sun May 7 07:16:30 2017 +0200 i2c: mux: reg: put away the parent i2c adapter on probe failure It is only prudent to let go of resources that are not used. Fixes: b3fdd32799d8 ("i2c: mux: Add register-based mux i2c-mux-reg") Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-mux-reg.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 0780516a18f87e881e42ed815f189279b0a1743c Author: Paolo Bonzini Date: Thu May 11 13:23:29 2017 +0200 KVM: nVMX: fix EPT permissions as reported in exit qualification This fixes the new ept_access_test_read_only and ept_access_test_read_write testcases from vmx.flat. The problem is that gpte_access moves bits around to switch from EPT bit order (XWR) to ACC_*_MASK bit order (RWX). This results in an incorrect exit qualification. To fix this, make pt_access and pte_access operate on raw PTE values (only with NX flipped to mean "can execute") and call gpte_access at the end of the walk. This lets us use pte_access to compute the exit qualification with XWR bit order. Signed-off-by: Paolo Bonzini Reviewed-by: Xiao Guangrong Signed-off-by: Radim Krčmář arch/x86/kvm/paging_tmpl.h | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit fce6ac4c0508b985d497e3d9c8eff28ec8a43182 Author: Wanpeng Li Date: Thu May 11 02:58:56 2017 -0700 KVM: VMX: Don't enable EPT A/D feature if EPT feature is disabled We can observe eptad kvm_intel module parameter is still Y even if ept is disabled which is weird. This patch will not enable EPT A/D feature if EPT feature is disabled. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a575813bfe4bc15aba511a5e91e61d242bff8b9d Author: Wanpeng Li Date: Thu May 11 02:58:55 2017 -0700 KVM: x86: Fix load damaged SSEx MXCSR register Reported by syzkaller: BUG: unable to handle kernel paging request at ffffffffc07f6a2e IP: report_bug+0x94/0x120 PGD 348e12067 P4D 348e12067 PUD 348e14067 PMD 3cbd84067 PTE 80000003f7e87161 Oops: 0003 [#1] SMP CPU: 2 PID: 7091 Comm: kvm_load_guest_ Tainted: G OE 4.11.0+ #8 task: ffff92fdfb525400 task.stack: ffffbda6c3d04000 RIP: 0010:report_bug+0x94/0x120 RSP: 0018:ffffbda6c3d07b20 EFLAGS: 00010202 do_trap+0x156/0x170 do_error_trap+0xa3/0x170 ? kvm_load_guest_fpu.part.175+0x12a/0x170 [kvm] ? mark_held_locks+0x79/0xa0 ? retint_kernel+0x10/0x10 ? trace_hardirqs_off_thunk+0x1a/0x1c do_invalid_op+0x20/0x30 invalid_op+0x1e/0x30 RIP: 0010:kvm_load_guest_fpu.part.175+0x12a/0x170 [kvm] ? kvm_load_guest_fpu.part.175+0x1c/0x170 [kvm] kvm_arch_vcpu_ioctl_run+0xed6/0x1b70 [kvm] kvm_vcpu_ioctl+0x384/0x780 [kvm] ? kvm_vcpu_ioctl+0x384/0x780 [kvm] ? sched_clock+0x13/0x20 ? __do_page_fault+0x2a0/0x550 do_vfs_ioctl+0xa4/0x700 ? up_read+0x1f/0x40 ? __do_page_fault+0x2a0/0x550 SyS_ioctl+0x79/0x90 entry_SYSCALL_64_fastpath+0x23/0xc2 SDM mentioned that "The MXCSR has several reserved bits, and attempting to write a 1 to any of these bits will cause a general-protection exception(#GP) to be generated". The syzkaller forks' testcase overrides xsave area w/ random values and steps on the reserved bits of MXCSR register. The damaged MXCSR register values of guest will be restored to SSEx MXCSR register before vmentry. This patch fixes it by catching userspace override MXCSR register reserved bits w/ random values and bails out immediately. Reported-by: Andrey Konovalov Reviewed-by: Paolo Bonzini Cc: Paolo Bonzini Cc: Radim Krčmář Cc: stable@vger.kernel.org Signed-off-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/kernel/fpu/init.c | 1 + arch/x86/kvm/x86.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit 4769886baf39b6a307eb8f9e39848823ca6c5939 Author: Dan Carpenter Date: Wed May 10 22:43:17 2017 +0300 kvm: nVMX: off by one in vmx_write_pml_buffer() There are PML_ENTITY_NUM elements in the pml_address[] array so the > should be >= or we write beyond the end of the array when we do: pml_address[vmcs12->guest_pml_index--] = gpa; Fixes: c5f983f6e845 ("nVMX: Implement emulated Page Modification Logging") Signed-off-by: Dan Carpenter Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66c25f6e31766a9ec19c2bdc7f5f69f9c59bafd7 Author: Niklas Cassel Date: Mon May 15 10:56:06 2017 +0200 net: stmmac: use correct pointer when printing normal descriptor ring There are two pointers in sysfs_display_ring, one that increments if using normal dma descriptors, another if using extended dma descriptors. When printing the normal dma descriptors, the wrong pointer is used, thus the printed descriptor addresses are incorrect. Signed-off-by: Niklas Cassel Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65acb891aaeb9294ebd06beb6138278b2331fec0 Merge: 2ea659a 76d837a Author: Radim Krčmář Date: Mon May 15 14:38:56 2017 +0200 Merge branch 'kvm-ppc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc - fix build failures with PR KVM configurations - fix a host crash that can occur on POWER9 with radix guests commit 9b619a8f08da9f61f166edbbe30ad05c359ec19e Author: Zhichao Huang Date: Thu May 11 13:46:12 2017 +0100 KVM: arm: rename pm_fake handler to trap_raz_wi pm_fake doesn't quite describe what the handler does (ignoring writes and returning 0 for reads). As we're about to use it (a lot) in a different context, rename it with a (admitedly cryptic) name that make sense for all users. Signed-off-by: Zhichao Huang Reviewed-by: Alex Bennee Acked-by: Christoffer Dall Acked-by: Marc Zyngier Signed-off-by: Alex Bennée Signed-off-by: Christoffer Dall arch/arm/kvm/coproc.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 661e6b02b5aa82db31897f36e96324b77450fd7a Author: Zhichao Huang Date: Thu May 11 13:46:11 2017 +0100 KVM: arm: plug potential guest hardware debug leakage Hardware debugging in guests is not intercepted currently, it means that a malicious guest can bring down the entire machine by writing to the debug registers. This patch enable trapping of all debug registers, preventing the guests to access the debug registers. This includes access to the debug mode(DBGDSCR) in the guest world all the time which could otherwise mess with the host state. Reads return 0 and writes are ignored (RAZ_WI). The result is the guest cannot detect any working hardware based debug support. As debug exceptions are still routed to the guest normal debug using software based breakpoints still works. To support debugging using hardware registers we need to implement a debug register aware world switch as well as special trapping for registers that may affect the host state. Cc: stable@vger.kernel.org Signed-off-by: Zhichao Huang Signed-off-by: Alex Bennée Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_coproc.h | 3 +- arch/arm/kvm/coproc.c | 77 ++++++++++++++++++++++++++++++--------- arch/arm/kvm/handle_exit.c | 4 +- arch/arm/kvm/hyp/switch.c | 4 +- 4 files changed, 66 insertions(+), 22 deletions(-) commit 2f720aac936dc7a301b757d3b197d86c333d59b8 Author: Matthew Auld Date: Fri May 12 10:14:23 2017 +0100 drm/i915: don't do allocate_va_range again on PIN_UPDATE If a vma is already bound to a ppgtt, we incorrectly call allocate_va_range again when doing a PIN_UPDATE, which will result in over accounting within our paging structures, such that when we do unbind something we don't actually destroy the structures and end up inadvertently recycling them. In reality this probably isn't too bad, but once we start touching PDEs and PDPEs for 64K/2M/1G pages this apparent recycling will manifest into lots of really, really subtle bugs. v2: Fix the testing of vma->flags for aliasing_ppgtt_bind_vma Fixes: ff685975d97f ("drm/i915: Move allocate_va_range to GTT") Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170512091423.26085-1-chris@chris-wilson.co.uk (cherry picked from commit 1f23475c893a85c934143cd64865ebb9b6af383f) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_gtt.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 82f2b4aca8fd90476fc3fd1786d107163ab17201 Author: Ville Syrjälä Date: Thu May 4 21:15:30 2017 +0300 drm/i915: Fix rawclk readout for g4x Turns out our skills in decoding the CLKCFG register weren't good enough. On this particular elk the answer we got was 400 MHz when in reality the clock was running at 266 MHz, which then caused us to program a bogus AUX clock divider that caused all AUX communication to fail. Sadly the docs are now in bit heaven, so the fix will have to be based on empirical evidence. Using another elk machine I was able to frob the FSB frequency from the BIOS and see how it affects the CLKCFG register. The machine seesm to use a frequency of 266 MHz by default, and fortunately it still boot even with the 50% CPU overclock that we get when we bump the FSB up to 400 MHz. It turns out the actual FSB frequency and the register have no real link whatsoever. The register value is based on some straps or something, but fortunately those too can be configured from the BIOS on this board, although it doesn't seem to respect the settings 100%. In the end I was able to derive the following relationship: BIOS FSB / strap | CLKCFG ------------------------- 200 | 0x2 266 | 0x0 333 | 0x4 400 | 0x4 So only the 200 and 400 MHz cases actually match how we're currently decoding that register. But as the comment next to some of the defines says, we have been just guessing anyway. So let's fix things up so that at least the 266 MHz case will work correctly as that is actually the setting used by both the buggy machine and my test machine. The fact that 333 and 400 MHz BIOS settings result in the same register value is a little disappointing, as that means we can't tell them apart. However, according to the gmch datasheet for both elk and ctg 400 Mhz is not even a supported FSB frequency, so I'm going to make the assumption that we should decode it as 333 MHz instead. Cc: stable@vger.kernel.org Cc: Tomi Sarvela Reported-by: Tomi Sarvela Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100926 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170504181530.6908-1-ville.syrjala@linux.intel.com Acked-by: Jani Nikula Tested-by: Tomi Sarvela (cherry picked from commit 6f38123ecaac446312a63523b68df84ceb5a06ed) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_reg.h | 10 +++++++--- drivers/gpu/drm/i915/intel_cdclk.c | 6 ++---- 2 files changed, 9 insertions(+), 7 deletions(-) commit 668e3b014afb66ab29e134bca7c258527273ac75 Author: Ville Syrjälä Date: Thu Apr 27 19:02:20 2017 +0300 drm/i915: Fix runtime PM for LPE audio Not calling pm_runtime_enable() means that runtime PM can't be enabled at all via sysfs. So we definitely need to call it from somewhere. Calling it from the driver seems like a bad idea because it would have to be paired with a pm_runtime_disable() at driver unload time, otherwise the core gets upset. Also if there's no LPE audio driver loaded then we couldn't runtime suspend i915 either. So it looks like a better plan is to call it from i915 when we register the platform device. That seems to match how pci generally does things. I cargo culted the pm_runtime_forbid() and pm_runtime_set_active() calls from pci as well. The exposed runtime PM API is massive an thorougly misleading, so I don't actually know if this is how you're supposed to use the API or not. But it seems to work. I can now runtime suspend i915 again with or without the LPE audio driver loaded, and reloading the LPE audio driver also seems to work. Note that powertop won't auto-tune runtime PM for platform devices, which is a little annoying. So I'm not sure that leaving runtime PM in "on" mode by default is the best choice here. But I've left it like that for now at least. Also remove the comment about there not being much benefit from LPE audio runtime PM. Not allowing runtime PM blocks i915 runtime PM, which will also block s0ix, and that could have a measurable impact on power consumption. Cc: stable@vger.kernel.org Cc: Takashi Iwai Cc: Pierre-Louis Bossart Fixes: 0b6b524f3915 ("ALSA: x86: Don't enable runtime PM as default") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170427160231.13337-2-ville.syrjala@linux.intel.com Reviewed-by: Takashi Iwai (cherry picked from commit 183c00350ccda86781f6695840e6c5f5b22efbd1) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_lpe_audio.c | 5 +++++ sound/x86/intel_hdmi_audio.c | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) commit 9b5fed0daa2a9ea3355ef06bb9e87ce800e71df6 Author: Ander Conselvan de Oliveira Date: Fri Apr 28 11:02:22 2017 +0300 drm/i915/glk: Fix DSI "*ERROR* ULPS is still active" messages The sequence in glk_dsi_device_ready() enters ULPS then waits until it is *not* active to then disable it. The correct sequence according to the spec is to enter ULPS then wait until the GLK_ULPS_NOT_ACTIVE bit is zero, i.e., ULPS is active, and then disable ULPS. Fixing the condition gets rid of the following spurious error messages: [drm:glk_dsi_device_ready [i915]] *ERROR* ULPS is still active Fixes: 4644848369c0 ("drm/i915/glk: Add MIPIIO Enable/disable sequence") Cc: Deepak M Cc: Madhav Chauhan Cc: Jani Nikula Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Madhav Chauhan Link: http://patchwork.freedesktop.org/patch/msgid/20170428080222.6147-1-ander.conselvan.de.oliveira@intel.com (cherry picked from commit 3acbec03b3c51559d01c879e9564d9c9610fe8ce) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dsi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 591054469b3eef34bc097c30fae8ededddf8d796 Author: Pablo Neira Ayuso Date: Mon May 15 11:17:34 2017 +0100 netfilter: nf_tables: revisit chain/object refcounting from elements Andreas reports that the following incremental update using our commit protocol doesn't work. # nft -f incremental-update.nft delete element ip filter client_to_any { 10.180.86.22 : goto CIn_1 } delete chain ip filter CIn_1 ... Error: Could not process rule: Device or resource busy The existing code is not well-integrated into the commit phase protocol, since element deletions do not result in refcount decrement from the preparation phase. This results in bogus EBUSY errors like the one above. Two new functions come with this patch: * nft_set_elem_activate() function is used from the abort path, to restore the set element refcounting on objects that occurred from the preparation phase. * nft_set_elem_deactivate() that is called from nft_del_setelem() to decrement set element refcounting on objects from the preparation phase in the commit protocol. The nft_data_uninit() has been renamed to nft_data_release() since this function does not uninitialize any data store in the data register, instead just releases the references to objects. Moreover, a new function nft_data_hold() has been introduced to be used from nft_set_elem_activate(). Reported-by: Andreas Schultz Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 2 +- net/netfilter/nf_tables_api.c | 82 ++++++++++++++++++++++++++++++++++----- net/netfilter/nft_bitwise.c | 4 +- net/netfilter/nft_cmp.c | 2 +- net/netfilter/nft_immediate.c | 5 ++- net/netfilter/nft_range.c | 4 +- 6 files changed, 81 insertions(+), 18 deletions(-) commit 71df14b0ce094be46d105b5a3ededd83b8e779a0 Author: Pablo Neira Ayuso Date: Mon May 15 11:17:29 2017 +0100 netfilter: nf_tables: missing sanitization in data from userspace Do not assume userspace always sends us NFT_DATA_VALUE for bitwise and cmp expressions. Although NFT_DATA_VERDICT does not make any sense, it is still possible to handcraft a netlink message using this incorrect data type. Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_bitwise.c | 19 ++++++++++++++----- net/netfilter/nft_cmp.c | 12 ++++++++++-- 2 files changed, 24 insertions(+), 7 deletions(-) commit fa803605eef39372e53d7813002d73a3fcf10c88 Author: Liping Zhang Date: Sun May 14 21:35:22 2017 +0800 netfilter: nf_tables: can't assume lock is acquired when dumping set elems When dumping the elements related to a specified set, we may invoke the nf_tables_dump_set with the NFNL_SUBSYS_NFTABLES lock not acquired. So we should use the proper rcu operation to avoid race condition, just like other nft dump operations. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 78 +++++++++++++++++++++++++++++++------------ net/netfilter/nft_set_hash.c | 2 +- 2 files changed, 57 insertions(+), 23 deletions(-) commit 87e94dbc210a720a34be5c1174faee5c84be963e Author: Eric Leblond Date: Thu May 11 18:56:38 2017 +0200 netfilter: synproxy: fix conntrackd interaction This patch fixes the creation of connection tracking entry from netlink when synproxy is used. It was missing the addition of the synproxy extension. This was causing kernel crashes when a conntrack entry created by conntrackd was used after the switch of traffic from active node to the passive node. Signed-off-by: Eric Leblond Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_netlink.c | 4 ++++ 1 file changed, 4 insertions(+) commit 324318f0248c31be8a08984146e7e4dd7cdd091d Author: Willem de Bruijn Date: Tue May 9 16:17:37 2017 -0400 netfilter: xtables: zero padding in data_to_user When looking up an iptables rule, the iptables binary compares the aligned match and target data (XT_ALIGN). In some cases this can exceed the actual data size to include padding bytes. Before commit f77bc5b23fb1 ("iptables: use match, target and data copy_to_user helpers") the malloc()ed bytes were overwritten by the kernel with kzalloced contents, zeroing the padding and making the comparison succeed. After this patch, the kernel copies and clears only data, leaving the padding bytes undefined. Extend the clear operation from data size to aligned data size to include the padding bytes, if any. Padding bytes can be observed in both match and target, and the bug triggered, by issuing a rule with match icmp and target ACCEPT: iptables -t mangle -A INPUT -i lo -p icmp --icmp-type 1 -j ACCEPT iptables -t mangle -D INPUT -i lo -p icmp --icmp-type 1 -j ACCEPT Fixes: f77bc5b23fb1 ("iptables: use match, target and data copy_to_user helpers") Reported-by: Paul Moore Reported-by: Richard Guy Briggs Signed-off-by: Willem de Bruijn Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/x_tables.h | 2 +- net/bridge/netfilter/ebtables.c | 9 ++++++--- net/netfilter/x_tables.c | 9 ++++++--- 3 files changed, 13 insertions(+), 7 deletions(-) commit ff1e4300cf69bebd7d61741475812ba13cc69e31 Merge: 9338d7b 3c5ab3f Author: Pablo Neira Ayuso Date: Mon May 15 12:50:12 2017 +0200 Merge tag 'ipvs-fixes-for-v4.12' of http://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs Simon Horman says: ==================== IPVS Fixes for v4.12 please consider this fix to IPVS for v4.12. * It is a fix from Julian Anastasov to only SNAT SNAT packet replies only for NATed connections My understanding is that this fix is appropriate for 4.9.25, 4.10.13, 4.11 as well as the nf tree. Julian has separately posted backports for other -stable kernels; please see: * [PATCH 3.2.88,3.4.113 -stable 1/3] ipvs: SNAT packet replies only for NATed connections * [PATCH 3.10.105,3.12.73,3.16.43,4.1.39 -stable 2/3] ipvs: SNAT packet replies only for NATed connections * [PATCH 4.4.65 -stable 3/3] ipvs: SNAT packet replies only for NATed connections ==================== Signed-off-by: Pablo Neira Ayuso commit 9338d7b4418e9996a7642867d8f6b482a6040ed6 Author: Liping Zhang Date: Sun May 7 22:01:56 2017 +0800 netfilter: nfnl_cthelper: reject del request if helper obj is in use We can still delete the ct helper even if it is in use, this will cause a use-after-free error. In more detail, I mean: # nfct helper add ssdp inet udp # iptables -t raw -A OUTPUT -p udp -j CT --helper ssdp # nfct helper delete ssdp //--> oops, succeed! BUG: unable to handle kernel paging request at 000026ca IP: 0x26ca [...] Call Trace: ? ipv4_helper+0x62/0x80 [nf_conntrack_ipv4] nf_hook_slow+0x21/0xb0 ip_output+0xe9/0x100 ? ip_fragment.constprop.54+0xc0/0xc0 ip_local_out+0x33/0x40 ip_send_skb+0x16/0x80 udp_send_skb+0x84/0x240 udp_sendmsg+0x35d/0xa50 So add reference count to fix this issue, if ct helper is used by others, reject the delete request. Apply this patch: # nfct helper delete ssdp nfct v1.4.3: netlink error: Device or resource busy Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_helper.h | 2 ++ net/netfilter/nf_conntrack_helper.c | 6 ++++++ net/netfilter/nfnetlink_cthelper.c | 17 +++++++++++------ 3 files changed, 19 insertions(+), 6 deletions(-) commit d91fc59cd77c719f33eda65c194ad8f95a055190 Author: Liping Zhang Date: Sun May 7 22:01:55 2017 +0800 netfilter: introduce nf_conntrack_helper_put helper function And convert module_put invocation to nf_conntrack_helper_put, this is prepared for the followup patch, which will add a refcnt for cthelper, so we can reject the deleting request when cthelper is in use. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_helper.h | 2 ++ net/netfilter/nf_conntrack_helper.c | 6 ++++++ net/netfilter/nft_ct.c | 4 ++-- net/netfilter/xt_CT.c | 6 +++--- net/openvswitch/conntrack.c | 4 ++-- 5 files changed, 15 insertions(+), 7 deletions(-) commit d110a3942aca78d14929bc648aeb83ee0b245a61 Author: Liping Zhang Date: Sat May 6 20:28:02 2017 +0800 netfilter: don't setup nat info for confirmed ct We cannot setup nat info if the ct has been confirmed already, else, different cpu may race to handle the same ct. In extreme situation, we may hit the "BUG_ON(nf_nat_initialized(ct, maniptype))" in the nf_nat_setup_info. Also running the following commands will easily hit NF_CT_ASSERT in nf_conntrack_alter_reply: # nft flush ruleset # ping -c 2 -W 1 1.1.1.111 & # nft add table t # nft add chain t c {type nat hook postrouting priority 0 \;} # nft add rule t c snat to 4.5.6.7 WARNING: CPU: 1 PID: 10065 at net/netfilter/nf_conntrack_core.c:1472 nf_conntrack_alter_reply+0x9a/0x1a0 [nf_conntrack] [...] Call Trace: nf_nat_setup_info+0xad/0x840 [nf_nat] ? deactivate_slab+0x65d/0x6c0 nft_nat_eval+0xcd/0x100 [nft_nat] nft_do_chain+0xff/0x5d0 [nf_tables] ? mark_held_locks+0x6f/0xa0 ? __local_bh_enable_ip+0x70/0xa0 ? trace_hardirqs_on_caller+0x11f/0x190 ? ipt_do_table+0x310/0x610 ? trace_hardirqs_on+0xd/0x10 ? __local_bh_enable_ip+0x70/0xa0 ? ipt_do_table+0x32b/0x610 ? __lock_acquire+0x2ac/0x1580 ? ipt_do_table+0x32b/0x610 nft_nat_do_chain+0x65/0x80 [nft_chain_nat_ipv4] nf_nat_ipv4_fn+0x1ae/0x240 [nf_nat_ipv4] nf_nat_ipv4_out+0x4a/0xf0 [nf_nat_ipv4] nft_nat_ipv4_out+0x15/0x20 [nft_chain_nat_ipv4] nf_hook_slow+0x2c/0xf0 ip_output+0x154/0x270 So for the confirmed ct, just ignore it and return NF_ACCEPT. Fixes: 9a08ecfe74d7 ("netfilter: don't attach a nat extension by default") Signed-off-by: Liping Zhang Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_nat_core.c | 4 ++++ 1 file changed, 4 insertions(+) commit ca6e8cdbe1865caf7b05483e1a242e72d9bc919f Author: Ian W MORRISON Date: Mon May 8 23:40:35 2017 +1000 staging: rtl8723bs: remove re-positioned call to kfree in os_dep/ioctl_cfg80211.c A re-positioned call to kfree() in drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c causes a segmentation error. This patch removed the kfree() call. Fixes 6557ddfec348 ("staging: rtl8723bs: Fix various errors in os_dep/ioctl_cfg80211.c") Signed-off-by: Ian W Morrison Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 1 - 1 file changed, 1 deletion(-) commit fb317002ab4419ae7e068bee6897f2d5745aa3b9 Author: Heiko Carstens Date: Tue May 9 12:50:53 2017 +0200 s390/virtio: change virtio_feature_desc:features type to __le32 The feature member of virtio_feature_desc contains little endian values, given that it contents will be converted with le32_to_cpu(). The "wrong" __u32 type leads to the sparse warnings below. In order to avoid them, use the correct __le32 type instead. drivers/s390/virtio/virtio_ccw.c:749:14: warning: cast to restricted __le32 drivers/s390/virtio/virtio_ccw.c:762:28: warning: cast to restricted __le32 Acked-by: Halil Pasic Acked-by: Cornelia Huck Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/virtio/virtio_ccw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2b7cbdd2559aff06cebc28a7150f81c307a90d3 Author: Matthias Kaehlcke Date: Wed Apr 19 11:39:20 2017 -0700 netfilter: ctnetlink: Make some parameters integer to avoid enum mismatch Not all parameters passed to ctnetlink_parse_tuple() and ctnetlink_exp_dump_tuple() match the enum type in the signatures of these functions. Since this is intended change the argument type of to be an unsigned integer value. Signed-off-by: Matthias Kaehlcke Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_netlink.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 6c0d706b563af732adb094c5bf807437e8963e84 Author: Suzuki K Poulose Date: Wed May 3 15:17:51 2017 +0100 kvm: arm/arm64: Fix race in resetting stage2 PGD In kvm_free_stage2_pgd() we check the stage2 PGD before holding the lock and proceed to take the lock if it is valid. And we unmap the page tables, followed by releasing the lock. We reset the PGD only after dropping this lock, which could cause a race condition where another thread waiting on or even holding the lock, could potentially see that the PGD is still valid and proceed to perform a stage2 operation and later encounter a NULL PGD. [223090.242280] Unable to handle kernel NULL pointer dereference at virtual address 00000040 [223090.262330] PC is at unmap_stage2_range+0x8c/0x428 [223090.262332] LR is at kvm_unmap_hva_handler+0x2c/0x3c [223090.262531] Call trace: [223090.262533] [] unmap_stage2_range+0x8c/0x428 [223090.262535] [] kvm_unmap_hva_handler+0x2c/0x3c [223090.262537] [] handle_hva_to_gpa+0xb0/0x104 [223090.262539] [] kvm_unmap_hva+0x5c/0xbc [223090.262543] [] kvm_mmu_notifier_invalidate_page+0x50/0x8c [223090.262547] [] __mmu_notifier_invalidate_page+0x5c/0x84 [223090.262551] [] try_to_unmap_one+0x1d0/0x4a0 [223090.262553] [] rmap_walk+0x1cc/0x2e0 [223090.262555] [] try_to_unmap+0x74/0xa4 [223090.262557] [] migrate_pages+0x31c/0x5ac [223090.262561] [] compact_zone+0x3fc/0x7ac [223090.262563] [] compact_zone_order+0x94/0xb0 [223090.262564] [] try_to_compact_pages+0x108/0x290 [223090.262569] [] __alloc_pages_direct_compact+0x70/0x1ac [223090.262571] [] __alloc_pages_nodemask+0x434/0x9f4 [223090.262572] [] alloc_pages_vma+0x230/0x254 [223090.262574] [] do_huge_pmd_anonymous_page+0x114/0x538 [223090.262576] [] handle_mm_fault+0xd40/0x17a4 [223090.262577] [] __get_user_pages+0x12c/0x36c [223090.262578] [] get_user_pages_unlocked+0xa4/0x1b8 [223090.262579] [] __gfn_to_pfn_memslot+0x280/0x31c [223090.262580] [] gfn_to_pfn_prot+0x4c/0x5c [223090.262582] [] kvm_handle_guest_abort+0x240/0x774 [223090.262584] [] handle_exit+0x11c/0x1ac [223090.262586] [] kvm_arch_vcpu_ioctl_run+0x31c/0x648 [223090.262587] [] kvm_vcpu_ioctl+0x378/0x768 [223090.262590] [] do_vfs_ioctl+0x324/0x5a4 [223090.262591] [] SyS_ioctl+0x90/0xa4 [223090.262595] [] el0_svc_naked+0x38/0x3c This patch moves the stage2 PGD manipulation under the lock. Reported-by: Alexander Graf Cc: Mark Rutland Cc: Marc Zyngier Cc: Paolo Bonzini Cc: Radim Krčmář Reviewed-by: Christoffer Dall Reviewed-by: Marc Zyngier Signed-off-by: Suzuki K Poulose Signed-off-by: Christoffer Dall virt/kvm/arm/mmu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 3d72e27a3af88b6f939aa87070c36304f713aa28 Merge: 2ea659a ae15790 Author: Jani Nikula Date: Mon May 15 13:03:30 2017 +0300 Merge tag 'gvt-fixes-2017-05-11' of https://github.com/01org/gvt-linux into drm-intel-fixes gvt-fixes-2017-05-11 - vGPU scheduler performance regression fix (Ping) - bypass in-context mmio restore (Chuanxiao) - one typo fix (Colin) Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170511054736.swpcmnzdoqi75cnl@zhen-hp.sh.intel.com commit 6aeb75e6adfaed16e58780309613a578fe1ee90b Author: Johan Hovold Date: Thu May 11 11:41:21 2017 +0200 USB: serial: io_ti: fix div-by-zero in set_termios Fix a division-by-zero in set_termios when debugging is enabled and a high-enough speed has been requested so that the divisor value becomes zero. Instead of just fixing the offending debug statement, cap the baud rate at the base as a zero divisor value also appears to crash the firmware. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable # 2.6.12 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/io_ti.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 26cede343656c0bc2c33cdc783771282405c7fb2 Author: Johan Hovold Date: Thu May 11 11:41:20 2017 +0200 USB: serial: mct_u232: fix big-endian baud-rate handling Drop erroneous cpu_to_le32 when setting the baud rate, something which corrupted the divisor on big-endian hosts. Found using sparse: warning: incorrect type in argument 1 (different base types) expected unsigned int [unsigned] [usertype] val got restricted __le32 [usertype] Fixes: af2ac1a091bc ("USB: serial mct_usb232: move DMA buffers to heap") Cc: stable # 2.6.34 Reviewed-by: Greg Kroah-Hartman Acked-By: Pete Zaitcev Signed-off-by: Johan Hovold drivers/usb/serial/mct_u232.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad0ccac76dcc92c3331f4c94c9fc54f8bf1ab20c Author: Johan Hovold Date: Thu May 11 11:41:19 2017 +0200 USB: serial: ir-usb: fix big-endian baud-rate debug printk Add missing endianness conversion when printing the supported baud rates. Found using sparse: warning: restricted __le16 degrades to integer Fixes: e0d795e4f36c ("usb: irda: cleanup on ir-usb module") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/ir-usb.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 95d93e271d920dfda369d4740b1cc1061d41fe7f Author: Malcolm Priestley Date: Thu May 11 18:57:46 2017 +0100 staging: rtl8192e: GetTs Fix invalid TID 7 warning. TID 7 is a valid value for QoS IEEE 802.11e. The switch statement that follows states 7 is valid. Remove function IsACValid and use the default case to filter invalid TIDs. Signed-off-by: Malcolm Priestley Cc: Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl819x_TSProc.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 90be652c9f157d44b9c2803f902a8839796c090d Author: Malcolm Priestley Date: Thu May 11 18:57:45 2017 +0100 staging: rtl8192e: rtl92e_get_eeprom_size Fix read size of EPROM_CMD. EPROM_CMD is 2 byte aligned on PCI map so calling with rtl92e_readl will return invalid data so use rtl92e_readw. The device is unable to select the right eeprom type. Signed-off-by: Malcolm Priestley Cc: Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 867510bde14e7b7fc6dd0f50b48f6753cfbd227a Author: Malcolm Priestley Date: Thu May 11 18:57:44 2017 +0100 staging: rtl8192e: fix 2 byte alignment of register BSSIDR. BSSIDR has two byte alignment on PCI ioremap correct the write by swapping to 16 bits first. This fixes a problem that the device associates fail because the filter is not set correctly. Signed-off-by: Malcolm Priestley Cc: Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit baabd567f87be05330faa5140f72a91960e7405a Author: Malcolm Priestley Date: Thu May 11 18:57:43 2017 +0100 staging: rtl8192e: rtl92e_fill_tx_desc fix write to mapped out memory. The driver attempts to alter memory that is mapped to PCI device. This is because tx_fwinfo_8190pci points to skb->data Move the pci_map_single to when completed buffer is ready to be mapped with psdec is empty to drop on mapping error. Signed-off-by: Malcolm Priestley Cc: Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit ff92b9e3c9f85fa442c430d70bf075499e1193b7 Author: Phil Elwell Date: Thu May 4 10:58:20 2017 +0100 staging: vc04_services: Fix bulk cache maintenance vchiq_arm supports transfers less than one page and at arbitrary alignment, using the dma-mapping API to perform its cache maintenance (even though the VPU drives the DMA hardware). Read (DMA_FROM_DEVICE) operations use cache invalidation for speed, falling back to clean+invalidate on partial cache lines, with writes (DMA_TO_DEVICE) using flushes. If a read transfer has ends which aren't page-aligned, performing cache maintenance as if they were whole pages can lead to memory corruption since the partial cache lines at the ends (and any cache lines before or after the transfer area) will be invalidated. This bug was masked until the disabling of the cache flush in flush_dcache_page(). Honouring the requested transfer start- and end-points prevents the corruption. Fixes: cf9caf192988 ("staging: vc04_services: Replace dmac_map_area with dmac_map_sg") Signed-off-by: Phil Elwell Cc: stable # 4.10 Reported-by: Stefan Wahren Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../interface/vchiq_arm/vchiq_2835_arm.c | 31 +++++++++++++--------- 1 file changed, 19 insertions(+), 12 deletions(-) commit c21376631d6325590e53ac8720312d2b02494103 Author: Ian Chard Date: Wed May 10 10:20:59 2017 +0100 staging: ccree: remove extraneous spin_unlock_bh() in error handler An early error handler in send_request() tries to release a spinlock, but the lock isn't acquired until the loop below it is entered. Signed-off-by: Ian Chard Acked-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_request_mgr.c | 1 - 1 file changed, 1 deletion(-) commit 41b80bb1db5c4c547cf187d1bc0c6c6feb7c14af Author: Arnd Bergmann Date: Wed Apr 19 19:48:07 2017 +0200 memory: atmel-ebi: mark PM ops as __maybe_unused We get a harmless warning without CONFIG_PM: drivers/memory/atmel-ebi.c:584:12: error: 'atmel_ebi_resume' defined but not used [-Werror=unused-function] Marking the function as __maybe_unused does the right thing here and drops it silently when unused. Fixes: a483fb10e5ea ("memory: atmel-ebi: Add PM ops") Signed-off-by: Arnd Bergmann Signed-off-by: Alexandre Belloni drivers/memory/atmel-ebi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f03d95f59026d14219230795ac4dcda8c09b5321 Author: Guru Das Srinagesh Date: Wed May 10 22:51:35 2017 -0700 staging: typec: Fix sparse warnings about incorrect types Fix the following sparse warnings about incorrect type usage: fusb302.c:1028:32: warning: incorrect type in argument 1 (different base types) fusb302.c:1028:32: expected unsigned short [unsigned] [usertype] header fusb302.c:1028:32: got restricted __le16 const [usertype] header fusb302.c:1484:32: warning: incorrect type in argument 1 (different base types) fusb302.c:1484:32: expected unsigned short [unsigned] [usertype] header fusb302.c:1484:32: got restricted __le16 [usertype] header Signed-off-by: Guru Das Srinagesh Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/fusb302/fusb302.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2c8e3f44f708a89a2c73a25a134af8c23998a2bc Author: Rui Miguel Silva Date: Fri May 12 21:16:13 2017 +0100 staging: typec: fusb302: do not free gpio from managed resource When allocating a gpio using the managed resource devm_, we can avoid freeing it manually. But even if we did it we should use devm_gpio_free. So, just remove the free of the gpio in the error path. Signed-off-by: Rui Miguel Silva Acked-by: Yueyao Zhu Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/fusb302/fusb302.c | 2 -- 1 file changed, 2 deletions(-) commit 15d2bffdde6268883647c6112970f74d3e1af651 Author: Marc Zyngier Date: Tue May 2 14:30:41 2017 +0100 KVM: arm/arm64: vgic-v3: Use PREbits to infer the number of ICH_APxRn_EL2 registers The GICv3 documentation is extremely confusing, as it talks about the number of priorities represented by the ICH_APxRn_EL2 registers, while it should really talk about the number of preemption levels. This leads to a bug where we may access undefined ICH_APxRn_EL2 registers, since PREbits is allowed to be smaller than PRIbits. Thankfully, nobody seem to have taken this path so far... The fix is to use ICH_VTR_EL2.PREbits instead. Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/hyp/vgic-v3-sr.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 3d6e77ad1489650afa20da92bb589c8778baa8da Author: Marc Zyngier Date: Tue May 2 14:30:40 2017 +0100 KVM: arm/arm64: vgic-v3: Do not use Active+Pending state for a HW interrupt When an interrupt is injected with the HW bit set (indicating that deactivation should be propagated to the physical distributor), special care must be taken so that we never mark the corresponding LR with the Active+Pending state (as the pending state is kept in the physycal distributor). Cc: stable@vger.kernel.org Fixes: 59529f69f504 ("KVM: arm/arm64: vgic-new: Add GICv3 world switch backend") Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-v3.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ddf42d068f8802de122bb7efdfcb3179336053f1 Author: Marc Zyngier Date: Tue May 2 14:30:39 2017 +0100 KVM: arm/arm64: vgic-v2: Do not use Active+Pending state for a HW interrupt When an interrupt is injected with the HW bit set (indicating that deactivation should be propagated to the physical distributor), special care must be taken so that we never mark the corresponding LR with the Active+Pending state (as the pending state is kept in the physycal distributor). Cc: stable@vger.kernel.org Fixes: 140b086dd197 ("KVM: arm/arm64: vgic-new: Add GICv2 world switch backend") Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-v2.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f48e91e87e67b56bef63393d1a02c6e22c1d7078 Author: Michael Neuling Date: Mon May 8 17:16:26 2017 +1000 powerpc/tm: Fix FP and VMX register corruption In commit dc3106690b20 ("powerpc: tm: Always use fp_state and vr_state to store live registers"), a section of code was removed that copied the current state to checkpointed state. That code should not have been removed. When an FP (Floating Point) unavailable is taken inside a transaction, we need to abort the transaction. This is because at the time of the tbegin, the FP state is bogus so the state stored in the checkpointed registers is incorrect. To fix this, we treclaim (to get the checkpointed GPRs) and then copy the thread_struct FP live state into the checkpointed state. We then trecheckpoint so that the FP state is correctly restored into the CPU. The copying of the FP registers from live to checkpointed is what was missing. This simplifies the logic slightly from the original patch. tm_reclaim_thread() will now always write the checkpointed FP state. Either the checkpointed FP state will be written as part of the actual treclaim (in tm.S), or it'll be a copy of the live state. Which one we use is based on MSR[FP] from userspace. Similarly for VMX. Fixes: dc3106690b20 ("powerpc: tm: Always use fp_state and vr_state to store live registers") Cc: stable@vger.kernel.org # 4.9+ Signed-off-by: Michael Neuling Reviewed-by: cyrilbur@gmail.com Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 501ad27c67ed0b90df465f23d33e9aed64058a47 Author: Marc Zyngier Date: Tue May 2 14:30:38 2017 +0100 arm: KVM: Do not use stack-protector to compile HYP code We like living dangerously. Nothing explicitely forbids stack-protector to be used in the HYP code, while distributions routinely compile their kernel with it. We're just lucky that no code actually triggers the instrumentation. Let's not try our luck for much longer, and disable stack-protector for code living at HYP. Cc: stable@vger.kernel.org Signed-off-by: Marc Zyngier Acked-by: Christoffer Dall Signed-off-by: Christoffer Dall arch/arm/kvm/hyp/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 43e24e82f35291d4c1ca78877ce1b20d3aeb78f1 Author: Michael Ellerman Date: Wed May 10 16:57:49 2017 +1000 powerpc/modules: If mprofile-kernel is enabled add it to vermagic On powerpc we can build the kernel with two different ABIs for mcount(), which is used by ftrace. Kernels built with one ABI do not know how to load modules built with the other ABI. The new style ABI is called "mprofile-kernel", for want of a better name. Currently if we build a module using the old style ABI, and the kernel with mprofile-kernel, when we load the module we'll oops something like: # insmod autofs4-no-mprofile-kernel.ko ftrace-powerpc: Unexpected instruction f8810028 around bl _mcount ------------[ cut here ]------------ WARNING: CPU: 6 PID: 3759 at ../kernel/trace/ftrace.c:2024 ftrace_bug+0x2b8/0x3c0 CPU: 6 PID: 3759 Comm: insmod Not tainted 4.11.0-rc3-gcc-5.4.1-00017-g5a61ef74f269 #11 ... NIP [c0000000001eaa48] ftrace_bug+0x2b8/0x3c0 LR [c0000000001eaff8] ftrace_process_locs+0x4a8/0x590 Call Trace: alloc_pages_current+0xc4/0x1d0 (unreliable) ftrace_process_locs+0x4a8/0x590 load_module+0x1c8c/0x28f0 SyS_finit_module+0x110/0x140 system_call+0x38/0xfc ... ftrace failed to modify [] 0xd000000002a31024 actual: 35:65:00:48 We can avoid this by including in the vermagic whether the kernel/module was built with mprofile-kernel. Which results in: # insmod autofs4-pg.ko autofs4: version magic '4.11.0-rc3-gcc-5.4.1-00017-g5a61ef74f269 SMP mod_unload modversions ' should be '4.11.0-rc3-gcc-5.4.1-00017-g5a61ef74f269-dirty SMP mod_unload modversions mprofile-kernel' insmod: ERROR: could not insert module autofs4-pg.ko: Invalid module format Fixes: 8c50b72a3b4f ("powerpc/ftrace: Add Kconfig & Make glue for mprofile-kernel") Signed-off-by: Michael Ellerman Acked-by: Balbir Singh Acked-by: Jessica Yu Signed-off-by: Michael Ellerman arch/powerpc/include/asm/module.h | 4 ++++ 1 file changed, 4 insertions(+) commit cde13b5dad60471886a3bccb4f4134c647c4a9dc Author: Marc Zyngier Date: Tue May 2 14:30:37 2017 +0100 arm64: KVM: Do not use stack-protector to compile EL2 code We like living dangerously. Nothing explicitely forbids stack-protector to be used in the EL2 code, while distributions routinely compile their kernel with it. We're just lucky that no code actually triggers the instrumentation. Let's not try our luck for much longer, and disable stack-protector for code living at EL2. Cc: stable@vger.kernel.org Signed-off-by: Marc Zyngier Acked-by: Christoffer Dall Signed-off-by: Christoffer Dall arch/arm64/kvm/hyp/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 050161ea3268ad72d276bc2c327e9654048a82b2 Author: Guenter Roeck Date: Tue May 9 09:04:59 2017 -0700 staging: typec: tcpm: Fix Port Power Role field in PS_RDY messages PS_RDY messages sent during power swap sequences are expected to reflect the new power role. Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpm.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 193a68011fdc002cc03d6e6edabf941251df5690 Author: Guenter Roeck Date: Tue May 9 09:04:58 2017 -0700 staging: typec: tcpm: Respond to Discover Identity commands If the lower level driver provided a list of VDOs in its configuration data, send it to the partner as response to a Discover Identity command if in device mode (UFP). Cc: Yueyao Zhu Originally-from: Puma Hsu Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/pd_vdo.h | 4 +++- drivers/staging/typec/tcpm.c | 27 +++++++++++++++++++++++++++ drivers/staging/typec/tcpm.h | 3 +++ 3 files changed, 33 insertions(+), 1 deletion(-) commit 931693f973507b320ecbdccd0ac3e786ddaf795f Author: Guenter Roeck Date: Tue May 9 09:04:57 2017 -0700 staging: typec: tcpm: Set correct flags in PD request messages We do support USB PD communication, and devices supported by this driver typically use USB power for purposes other than USB communication. Originally-from: Puma Hsu Cc: Yueyao Zhu Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5fec4b54d0bf6c3eeb176b624ce50d6aef4819c0 Author: Guenter Roeck Date: Tue May 9 09:04:56 2017 -0700 staging: typec: tcpm: Drop duplicate PD messages Per USB PD standard, we have to drop duplicate PD messages. We can not expect lower protocol layers to drop such messages, since lower layers don't know if a message was dropped somewhere else in the stack. Originally-from: Puma Hsu Cc: Yueyao Zhu Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/pd.h | 10 ++++++++++ drivers/staging/typec/tcpm.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) commit aac53ee4557947d778cb6a255c719e5c70963c42 Author: Yueyao Zhu Date: Tue May 9 09:04:55 2017 -0700 staging: typec: fusb302: Fix chip->vbus_present init value FUSB_REG_STATUS0 & FUSB_REG_STATUS0_VBUSOK = 0x40 & 0x80 is always zero. Fix the code to what it is intended to be: check the VBUSOK bit of the value read from address FUSB_REG_STATUS0. Reported-by: Dan Carpenter Cc: Guenter Roeck Signed-off-by: Yueyao Zhu Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/fusb302/fusb302.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 227383f8c28ea9e53d958801790d0e2e8f985d08 Author: Javier Martinez Canillas Date: Tue May 9 09:04:54 2017 -0700 staging: typec: fusb302: Fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the OF and I2C device ID table entries as module aliases, using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/staging/typec/fusb302/fusb302.ko | grep alias $ After this patch: $ modinfo drivers/staging/typec/fusb302/fusb302.ko | grep alias alias: of:N*T*Cfcs,fusb302C* alias: of:N*T*Cfcs,fusb302 alias: i2c:typec_fusb302 Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/fusb302/fusb302.c | 2 ++ 1 file changed, 2 insertions(+) commit c6a9d3eaee508f53ec4f777035522565ed567692 Author: Olivier Leveque Date: Tue May 9 09:04:53 2017 -0700 staging: typec: tcpci: declare private structure as static This fixes a sparse warning regarding an undeclared symbol. Since the structure tcpci_tcpc_config is private to tcpci.c, it should be declared as static. Signed-off-by: Olivier Leveque Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84817ef091f378b3f9fc86b02efb48b3fc1a3428 Author: Gilad Ben-Yossef Date: Sun May 7 16:18:27 2017 +0300 staging: MAINTAINERS: add GBY as ccree maintainer I work for Arm on maintaining the TrustZone CryptoCell driver. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 849ff8190eb9add34c376219b5ae319de83eeb32 Author: Yisheng Xie Date: Sat May 6 17:49:08 2017 +0800 staging/android/ion: remove useless document file After commit 9828282e33a0 ("staging: android: ion: Remove old platform support"), the document about devicetree of ion is no need anymore, so just remove it. Signed-off-by: Yisheng Xie Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/staging/ion/hi6220-ion.txt | 31 ------------- MAINTAINERS | 1 - drivers/staging/android/ion/devicetree.txt | 51 ---------------------- 3 files changed, 83 deletions(-) commit f83914fdfcc3ecb62a5a83eeb609ff59a9c2052d Author: Johan Hovold Date: Fri May 12 14:34:37 2017 +0200 ALSA: usb-audio: fix Amanero Combo384 quirk on big-endian hosts Add missing endianness conversion when using the USB device-descriptor bcdDevice field when applying the Amanero Combo384 (endianness!) quirk. Fixes: 3eff682d765b ("ALSA: usb-audio: Support both DSD LE/BE Amanero firmware versions") Cc: Jussi Laako Signed-off-by: Johan Hovold Signed-off-by: Takashi Iwai sound/usb/quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72d42504bd7faa6de1c1644b5e46652933e040a6 Author: Arnd Bergmann Date: Thu May 11 13:34:29 2017 +0200 ovl: select EXPORTFS We get a link error when EXPORTFS is not enabled: ERROR: "exportfs_encode_fh" [fs/overlayfs/overlay.ko] undefined! ERROR: "exportfs_decode_fh" [fs/overlayfs/overlay.ko] undefined! This adds a Kconfig 'select' statement for overlayfs, the same way that it is done for the other users of exportfs. Fixes: 3a1e819b4e80 ("ovl: store file handle of lower inode on copy up") Signed-off-by: Arnd Bergmann Signed-off-by: Miklos Szeredi fs/overlayfs/Kconfig | 1 + 1 file changed, 1 insertion(+) commit bb246681b3ed0967489a7401ad528c1aaa1a4c2e Author: Anthony Mallet Date: Fri May 5 17:30:16 2017 +0200 USB: serial: ftdi_sio: fix setting latency for unprivileged users Commit 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY flag") enables unprivileged users to set the FTDI latency timer, but there was a logic flaw that skipped sending the corresponding USB control message to the device. Specifically, the device latency timer would not be updated until next open, something which was later also inadvertently broken by commit c19db4c9e49a ("USB: ftdi_sio: set device latency timeout at port probe"). A recent commit c6dce2626606 ("USB: serial: ftdi_sio: fix extreme low-latency setting") disabled the low-latency mode by default so we now need this fix to allow unprivileged users to again enable it. Signed-off-by: Anthony Mallet [johan: amend commit message] Fixes: 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY flag") Fixes: c19db4c9e49a ("USB: ftdi_sio: set device latency timeout at port probe"). Cc: stable # 2.6.31 Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8663effb24f9430394d3bf1ed2dac42a771421d1 Author: Steven Rostedt (VMware) Date: Fri Apr 14 08:48:09 2017 -0400 sched/core: Call __schedule() from do_idle() without enabling preemption I finally got around to creating trampolines for dynamically allocated ftrace_ops with using synchronize_rcu_tasks(). For users of the ftrace function hook callbacks, like perf, that allocate the ftrace_ops descriptor via kmalloc() and friends, ftrace was not able to optimize the functions being traced to use a trampoline because they would also need to be allocated dynamically. The problem is that they cannot be freed when CONFIG_PREEMPT is set, as there's no way to tell if a task was preempted on the trampoline. That was before Paul McKenney implemented synchronize_rcu_tasks() that would make sure all tasks (except idle) have scheduled out or have entered user space. While testing this, I triggered this bug: BUG: unable to handle kernel paging request at ffffffffa0230077 ... RIP: 0010:0xffffffffa0230077 ... Call Trace: schedule+0x5/0xe0 schedule_preempt_disabled+0x18/0x30 do_idle+0x172/0x220 What happened was that the idle task was preempted on the trampoline. As synchronize_rcu_tasks() ignores the idle thread, there's nothing that lets ftrace know that the idle task was preempted on a trampoline. The idle task shouldn't need to ever enable preemption. The idle task is simply a loop that calls schedule or places the cpu into idle mode. In fact, having preemption enabled is inefficient, because it can happen when idle is just about to call schedule anyway, which would cause schedule to be called twice. Once for when the interrupt came in and was returning back to normal context, and then again in the normal path that the idle loop is running in, which would be pointless, as it had already scheduled. The only reason schedule_preempt_disable() enables preemption is to be able to call sched_submit_work(), which requires preemption enabled. As this is a nop when the task is in the RUNNING state, and idle is always in the running state, there's no reason that idle needs to enable preemption. But that means it cannot use schedule_preempt_disable() as other callers of that function require calling sched_submit_work(). Adding a new function local to kernel/sched/ that allows idle to call the scheduler without enabling preemption, fixes the synchronize_rcu_tasks() issue, as well as removes the pointless spurious schedule calls caused by interrupts happening in the brief window where preemption is enabled just before it calls schedule. Reviewed: Thomas Gleixner Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Acked-by: Paul E. McKenney Cc: Andrew Morton Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170414084809.3dacde2a@gandalf.local.home Signed-off-by: Ingo Molnar kernel/sched/core.c | 25 +++++++++++++++++++++++++ kernel/sched/idle.c | 2 +- kernel/sched/sched.h | 2 ++ 3 files changed, 28 insertions(+), 1 deletion(-) commit 40dd46048c155b8f0683f468c950a1c107f77a7c Author: Daniele Palmas Date: Wed May 3 10:28:54 2017 +0200 usb: serial: option: add Telit ME910 support This patch adds support for Telit ME910 PID 0x1100. Signed-off-by: Daniele Palmas Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 01630ab8543f21df30b0dca19087b85744f61aee Author: Marc Zyngier Date: Fri May 12 11:04:52 2017 +0100 ARM: KVM: Fix tracepoint generation after move to virt/kvm/arm/ Moving most of the shared code to virt/kvm/arm had for consequence that KVM/ARM doesn't build anymore, because the code that used to define the tracepoints is now somewhere else. Fix this by defining CREATE_TRACE_POINTS in coproc.c, and clean-up trace.h as well. Fixes: 35d2d5d490e2 ("KVM: arm/arm64: Move shared files to virt/kvm/arm") Reported-by: Arnd Bergmann Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/coproc.c | 1 + arch/arm/kvm/trace.h | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) commit 2e63309507c818e8b631a03f02c363031c007fb7 Author: Joe Thornber Date: Thu May 11 09:09:04 2017 -0400 dm cache policy smq: don't do any writebacks unless IDLE If there are no clean blocks to be demoted the writeback will be triggered at that point. Preemptively writing back can hurt high IO load scenarios. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-policy-smq.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 49b7f768900f4084a65c3689d955b2fceac39e53 Author: Joe Thornber Date: Thu May 11 09:07:16 2017 -0400 dm cache: simplify the IDLE vs BUSY state calculation Drop the MODERATE state since it wasn't buying us much. Also, in check_migrations(), prepare for the next commit ("dm cache policy smq: don't do any writebacks unless IDLE") by deferring to the policy to make the final decision on whether writebacks can be serviced. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-target.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 701e03e4e180f0cd97d4139a32e2b2d879d12da2 Author: Joe Thornber Date: Thu May 11 08:22:31 2017 -0400 dm cache: track all IO to the cache rather than just the origin device's IO IO tracking used to throttle writebacks when the origin device is busy. Even if all the IO is going to the fast device, writebacks can significantly degrade performance. So track all IO to gauge whether the cache is busy or not. Otherwise, synthetic IO tests (e.g. fio) that might send all IO to the fast device wouldn't cause writebacks to get throttled. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-target.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 6cf4cc8f8b3b7bc9e3c04a7eab44b985d50029fc Author: Joe Thornber Date: Thu May 11 07:48:18 2017 -0400 dm cache policy smq: stop preemptively demoting blocks It causes a lot of churn if the working set's size is close to the fast device's size. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-policy-smq.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 4d44ec5ab751be63c5d348f13294304d87baa8c3 Author: Joe Thornber Date: Thu May 11 05:11:06 2017 -0400 dm cache policy smq: put newly promoted entries at the top of the multiqueue This stops entries bouncing in and out of the cache quickly. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-policy-smq.c | 1 + 1 file changed, 1 insertion(+) commit 78c45607b909fb384c47c134d89b39285a6a8b45 Author: Joe Thornber Date: Thu May 11 05:09:38 2017 -0400 dm cache policy smq: be more aggressive about triggering a writeback If there are no clean entries to demote we really want to writeback immediately. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-policy-smq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8cd1eba6135e086109e2b94bf96deb17456ede8 Author: Joe Thornber Date: Thu May 11 05:07:34 2017 -0400 dm cache policy smq: only demote entries in bottom half of the clean multiqueue Heavy IO load may mean there are very few clean blocks in the cache, and we risk demoting entries that get hit a lot. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-policy-smq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 072792dcdfc8d5f91a26050e5665285f50afebf5 Author: Joe Thornber Date: Thu May 11 06:14:16 2017 -0400 dm cache: fix incorrect 'idle_time' reset in IO tracker Some bios have no payload (eg, a FLUSH), don't reset the idle_time when these come in. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-target.c | 3 +++ 1 file changed, 3 insertions(+) commit e23c7f7d57831fdae444be9d507e67716ab601d4 Author: Arnd Bergmann Date: Thu May 11 13:37:47 2017 +0200 soc: imx: add PM dependency for IMX7_PM_DOMAINS The new pm domain driver causes a build failure when CONFIG_PM is not set: warning: (IMX7_PM_DOMAINS) selects PM_GENERIC_DOMAINS which has unmet direct dependencies (PM) drivers/base/power/domain_governor.c: In function 'default_suspend_ok': drivers/base/power/domain_governor.c:75:17: error: 'struct dev_pm_info' has no member named 'ignore_children' This adds a dependency to ensure that we don't attempt to build the driver without CONFIG_PM. Fixes: 03aa12629fc4 ("soc: imx: Add GPCv2 power gating driver") Signed-off-by: Arnd Bergmann Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo drivers/soc/imx/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d8581c7c8be172dac156a19d261f988a72ce596f Author: Leonard Crestez Date: Fri May 5 14:00:17 2017 +0300 ARM: dts: imx6sx-sdb: Remove OPP override The board file for imx6sx-sdb overrides cpufreq operating points to use higher voltages. This is done because the board has a shared rail for VDD_ARM_IN and VDD_SOC_IN and when using LDO bypass the shared voltage needs to be a value suitable for both ARM and SOC. This only applies to LDO bypass mode, a feature not present in upstream. When LDOs are enabled the effect is to use higher voltages than necessary for no good reason. Setting these higher voltages can make some boards fail to boot with ugly semi-random crashes reminiscent of memory corruption. These failures only happen on board rev. C, rev. B is reported to still work. Signed-off-by: Leonard Crestez Fixes: 54183bd7f766 ("ARM: imx6sx-sdb: add revb board and make it default") Cc: stable@vger.kernel.org Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx-sdb.dts | 17 ----------------- 1 file changed, 17 deletions(-) commit 2fe4bff3516924a37e083e3211364abe59db1161 Author: Fabio Estevam Date: Wed Apr 12 18:31:18 2017 -0300 ARM: dts: imx53-qsrb: Pulldown PMIC IRQ pin Currently the following errors are seen: [ 14.015056] mc13xxx 0-0008: Failed to read IRQ status: -6 [ 27.321093] mc13xxx 0-0008: Failed to read IRQ status: -6 [ 27.411681] mc13xxx 0-0008: Failed to read IRQ status: -6 [ 27.456281] mc13xxx 0-0008: Failed to read IRQ status: -6 [ 30.527106] mc13xxx 0-0008: Failed to read IRQ status: -6 [ 36.596900] mc13xxx 0-0008: Failed to read IRQ status: -6 Also when reading the interrupts via 'cat /proc/interrupts' the PMIC GPIO interrupt counter does not stop increasing. The reason for the storm of interrupts is that the PUS field of register IOMUXC_SW_PAD_CTL_PAD_CSI0_DAT5 is currently configured as: 10 : 100k pullup and the PMIC interrupt is being registered as IRQ_TYPE_LEVEL_HIGH type, which is the correct type as per the MC34708 datasheet. Use the default power on value for the IOMUX, which sets PUS field as: 00: 360k pull down This prevents the spurious PMIC interrupts from happening. Commit e1ffceb078c6 ("ARM: imx53: qsrb: fix PMIC interrupt level") correctly described the irq type as IRQ_TYPE_LEVEL_HIGH, but missed to update the IOMUX of the PMIC GPIO as pull down. Fixes: e1ffceb078c6 ("ARM: imx53: qsrb: fix PMIC interrupt level") Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-qsrb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c54517196811b0561079833c147083ab2c9cc5e1 Author: Jacopo Mondi Date: Tue May 9 09:57:57 2017 +0200 iio: adc: max9611: Fix attribute measure unit The power and current "shunt-resistor" attribute's 'show' function displays the resistor value in milli-Ohms, while the ABI description specifies it should be displayed in Ohms. Fix it. Reported-by: Geert Uytterhoeven Signed-off-by: Jacopo Mondi Tested-by: Geert Uytterhoeven Signed-off-by: Jonathan Cameron drivers/iio/adc/max9611.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5ba5b437efaa7a502eec393c045d3bf90c92c4e9 Author: Dan Carpenter Date: Wed May 10 08:51:09 2017 +0300 iio: adc: ti_am335x_adc: allocating too much in probe We should be allocating enough information for a tiadc_device struct which is about 400 bytes but instead we allocate enough for a second iio_dev struct which is over 2000 bytes. Fixes: fea89e2dfcea ("iio: adc: ti_am335x_adc: use variable names for sizeof() operator") Signed-off-by: Dan Carpenter Signed-off-by: Jonathan Cameron drivers/iio/adc/ti_am335x_adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90b4f30b6d15222a509dacf47f29efef2b22571e Author: Thomas Gleixner Date: Wed May 10 16:30:12 2017 +0200 hwmon: (coretemp) Handle frozen hotplug state correctly The recent conversion to the hotplug state machine missed that the original hotplug notifiers did not execute in the frozen state, which is used on suspend on resume. This does not matter on single socket machines, but on multi socket systems this breaks when the device for a non-boot socket is removed when the last CPU of that socket is brought offline. The device removal locks up the machine hard w/o any debug output. Prevent executing the hotplug callbacks when cpuhp_tasks_frozen is true. Thanks to Tommi for providing debug information patiently while I failed to spot the obvious. Fixes: e00ca5df37ad ("hwmon: (coretemp) Convert to hotplug state machine") Reported-by: Tommi Rantala Tested-by: Tommi Rantala Signed-off-by: Thomas Gleixner Signed-off-by: Guenter Roeck drivers/hwmon/coretemp.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit b2d3c270f9f2fb82518ac500a9849c3aaf503852 Author: Thomas Petazzoni Date: Fri May 5 11:57:50 2017 +0200 dmaengine: mv_xor_v2: set DMA mask to 40 bits The XORv2 engine on Armada 7K/8K can only access the first 40 bits of the physical address space, so the DMA mask must be set accordingly. Fixes: 19a340b1a820 ("dmaengine: mv_xor_v2: new driver") Cc: Signed-off-by: Thomas Petazzoni Signed-off-by: Vinod Koul drivers/dma/mv_xor_v2.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9dd4f319bac25334a869d9276b19eac9e478fd33 Author: Thomas Petazzoni Date: Fri May 5 11:57:49 2017 +0200 dmaengine: mv_xor_v2: remove interrupt coalescing The current implementation of interrupt coalescing doesn't work, because it doesn't configure the coalescing timer, which is needed to make sure we get an interrupt at some point. As a fix for stable, we simply remove the interrupt coalescing functionality. It will be re-introduced properly in a future commit. Fixes: 19a340b1a820 ("dmaengine: mv_xor_v2: new driver") Cc: Signed-off-by: Thomas Petazzoni Signed-off-by: Vinod Koul drivers/dma/mv_xor_v2.c | 25 ------------------------- 1 file changed, 25 deletions(-) commit 44d5887a8bf1e86915c8ff647337cb138149da82 Author: Thomas Petazzoni Date: Fri May 5 11:57:48 2017 +0200 dmaengine: mv_xor_v2: fix tx_submit() implementation The mv_xor_v2_tx_submit() gets the next available HW descriptor by calling mv_xor_v2_get_desq_write_ptr(), which reads a HW register telling the next available HW descriptor. This was working fine when HW descriptors were issued for processing directly in tx_submit(). However, as part of the review process of the driver, a change was requested to move the actual kick-off of HW descriptors processing to ->issue_pending(). Due to this, reading the HW register to know the next available HW descriptor no longer works. So instead of using this HW register, we implemented a software index pointing to the next available HW descriptor. Fixes: 19a340b1a820 ("dmaengine: mv_xor_v2: new driver") Cc: Signed-off-by: Thomas Petazzoni Signed-off-by: Vinod Koul drivers/dma/mv_xor_v2.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) commit ab2c5f0a77fe49bdb6e307b397496373cb47d2c2 Author: Hanna Hawa Date: Fri May 5 11:57:47 2017 +0200 dmaengine: mv_xor_v2: enable XOR engine after its configuration The engine was enabled prior to its configuration, which isn't correct. This patch relocates the activation of the XOR engine, to be after the configuration of the XOR engine. Fixes: 19a340b1a820 ("dmaengine: mv_xor_v2: new driver") Cc: Signed-off-by: Hanna Hawa Signed-off-by: Thomas Petazzoni Signed-off-by: Vinod Koul drivers/dma/mv_xor_v2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bc473da1ed726c975ad47f8d7d27631de11356d8 Author: Thomas Petazzoni Date: Fri May 5 11:57:46 2017 +0200 dmaengine: mv_xor_v2: do not use descriptors not acked by async_tx Descriptors that have not been acknowledged by the async_tx layer should not be re-used, so this commit adjusts the implementation of mv_xor_v2_prep_sw_desc() to skip descriptors for which async_tx_test_ack() is false. Fixes: 19a340b1a820 ("dmaengine: mv_xor_v2: new driver") Cc: Signed-off-by: Thomas Petazzoni Signed-off-by: Vinod Koul drivers/dma/mv_xor_v2.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) commit 2aab4e18152cd30cb5d2f4c27629fc8a04aed979 Author: Thomas Petazzoni Date: Fri May 5 11:57:45 2017 +0200 dmaengine: mv_xor_v2: properly handle wrapping in the array of HW descriptors mv_xor_v2_tasklet() is looping over completed HW descriptors. Before the loop, it initializes 'next_pending_hw_desc' to the first HW descriptor to handle, and then the loop simply increments this point, without taking care of wrapping when we reach the last HW descriptor. The 'pending_ptr' index was being wrapped back to 0 at the end, but it wasn't used in each iteration of the loop to calculate next_pending_hw_desc. This commit fixes that, and makes next_pending_hw_desc a variable local to the loop itself. Fixes: 19a340b1a820 ("dmaengine: mv_xor_v2: new driver") Cc: Signed-off-by: Thomas Petazzoni Signed-off-by: Vinod Koul drivers/dma/mv_xor_v2.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit eb8df543e444492328f506adffc7dfe94111f1bd Author: Thomas Petazzoni Date: Fri May 5 11:57:44 2017 +0200 dmaengine: mv_xor_v2: handle mv_xor_v2_prep_sw_desc() error properly The mv_xor_v2_prep_sw_desc() is called from a few different places in the driver, but we never take into account the fact that it might return NULL. This commit fixes that, ensuring that we don't panic if there are no more descriptors available. Fixes: 19a340b1a820 ("dmaengine: mv_xor_v2: new driver") Cc: Signed-off-by: Thomas Petazzoni Signed-off-by: Vinod Koul drivers/dma/mv_xor_v2.c | 6 ++++++ 1 file changed, 6 insertions(+) commit be0408d74d9c95de1baf6c2563b6e6d1dfb17b88 Author: Arnd Bergmann Date: Thu May 11 14:12:29 2017 +0200 cpufreq: dbx500: add a Kconfig symbol Moving the cooling code into the cpufreq driver caused a possible build failure when the cpu_thermal helper code is a loadable module or disabled: drivers/cpufreq/dbx500-cpufreq.o: In function `dbx500_cpufreq_ready': dbx500-cpufreq.c:(.text.dbx500_cpufreq_ready+0x4): undefined reference to `cpufreq_cooling_register' This adds the same dependency that we have in other cpufreq drivers, forcing the driver to be disabled when we can't possibly link it. Fixes: 19678ffb9fd6 (cpufreq: dbx500: Manage cooling device from cpufreq driver) Signed-off-by: Arnd Bergmann Acked-by: Viresh Kumar Reviewed-by: Linus Walleij Signed-off-by: Rafael J. Wysocki drivers/cpufreq/Kconfig.arm | 9 +++++++++ drivers/cpufreq/Makefile | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) commit 0bae5fd3330be0517fba697e6b228601d421fade Author: Pushkar Jambhlekar Date: Thu May 11 10:31:24 2017 +0530 PM / hibernate: Declare variables as static Fixing sparse warnings: 'symbol not declared. Should it be static?' Signed-off-by: Pushkar Jambhlekar Signed-off-by: Rafael J. Wysocki kernel/power/snapshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 216c4e9db4c9d1d2a382b42880442dc632cd47d9 Author: Dan Carpenter Date: Wed May 10 22:40:06 2017 +0300 PowerCap: Fix an error code in powercap_register_zone() In the current code we accidentally return the successful result from idr_alloc() instead of a negative error pointer. The caller is looking for an error pointer and so it treats the returned value as a valid pointer. This one might be a bit serious because if it lets people get around the kernel's protection for remapping NULL. I'm not sure. Fixes: 75d2364ea0ca (PowerCap: Add class driver) Signed-off-by: Dan Carpenter Reviewed-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/powercap/powercap_sys.c | 1 + 1 file changed, 1 insertion(+) commit 508541146af18e43072e41a31aa62fac2b01aac1 Author: Yishai Hadas Date: Tue Apr 25 10:39:57 2017 +0300 net/mlx5: Use underlay QPN from the root name space Root flow table is dynamically changed by the underlying flow steering layer, and IPoIB/ULPs have no idea what will be the root flow table in the future, hence we need a dynamic infrastructure to move Underlay QPs with the root flow table. Fixes: b3ba51498bdd ("net/mlx5: Refactor create flow table method to accept underlay QP") Signed-off-by: Erez Shitrit Signed-off-by: Maor Gottlieb Signed-off-by: Yishai Hadas Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 5 ++--- drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 9 +++----- drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 25 +++++++++++++++++++---- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 7 +++++-- include/linux/mlx5/fs.h | 4 +++- 8 files changed, 38 insertions(+), 19 deletions(-) commit 5360fd473c23f18b42722cdb13a1c6ec7acd96ff Author: Saeed Mahameed Date: Thu May 4 17:53:32 2017 +0300 net/mlx5e: IPoIB, Only support regular RQ for now IPoIB doesn't support striding RQ at the moment, for this we need to explicitly choose non striding RQ in IPoIB init, even if the HW supports it. Fixes: 8f493ffd88ea ("net/mlx5e: IPoIB, RX steering RSS RQTs and TIRs") Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 4 ++++ 1 file changed, 4 insertions(+) commit 20b6a1c78280dbeb45214c463cf9cbccb3665146 Author: Saeed Mahameed Date: Tue May 9 16:40:46 2017 +0300 net/mlx5e: Fix setup TC ndo Fail-safe support patches introduced a trivial bug, setup tc callback is doing a wrong check of the netdevice state, the fix is simply to invert the condition. Fixes: 6f9485af4020 ("net/mlx5e: Fail safe tc setup") Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3c19503712d6360239b19c14cded56dd63c40d7 Author: Gal Pressman Date: Wed Apr 19 14:35:15 2017 +0300 net/mlx5e: Fix ethtool pause support and advertise reporting Pause bit should set when RX pause is on, not TX pause. Also, setting Asym_Pause is incorrect, and should be turned off. Fixes: 665bc53969d7 ("net/mlx5e: Use new ethtool get/set link ksettings API") Signed-off-by: Gal Pressman Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b383b544f2666d67446b951a9a97af239dafed5d Author: Gal Pressman Date: Mon Apr 3 15:11:22 2017 +0300 net/mlx5e: Use the correct pause values for ethtool advertising Query the operational pause from firmware (PFCC register) instead of always passing zeros. Fixes: 665bc53969d7 ("net/mlx5e: Use new ethtool get/set link ksettings API") Signed-off-by: Gal Pressman Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 14f814fbedd749992476bb365b454b2170b3b225 Author: Adam Thomson Date: Wed May 3 16:15:53 2017 +0100 ASoC: da7213: Fix incorrect usage of bitwise '&' operator for SRM check In the SRM lock check section of code the '&' bitwise operator is used as part of checking lock status. Functionally the code works as intended, but the conditional statement is a boolean comparison so should really use '&&' logical operator instead. This commit rectifies this discrepancy. Signed-off-by: Adam Thomson Signed-off-by: Mark Brown sound/soc/codecs/da7213.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe0dfd6358a17c79bd7d6996af7512ba452a7059 Author: Yifeng Li Date: Thu May 4 01:34:14 2017 +0800 rt286: add Thinkpad Helix 2 to force_combo_jack_table Thinkpad Helix 2 is a tablet PC, the audio is powered by Core M broadwell-audio and rt286 codec. For all versions of Linux kernel, the stereo output doesn't work properly when earphones are plugged in, the sound was coming out from both channels even if the audio contains only the left or right channel. Furthermore, if a music recorded in stereo is played, the two channels cancle out each other out, as a result, no voice but only distorted background music can be heard, like a sound card with builtin a Karaoke sount effect. Apparently this tablet uses a combo jack with polarity incorrectly set by rt286 driver. This patch adds DMI information of Thinkpad Helix 2 to force_combo_jack_table[] and the issue is resolved. The microphone input doesn't work regardless to the presence of this patch and still needs help from other developers to investigate. This is my first patch to LKML directly, sorry for CC-ing too many people here. Link: https://bugzilla.kernel.org/show_bug.cgi?id=93841 Signed-off-by: Yifeng Li Signed-off-by: Mark Brown sound/soc/codecs/rt286.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ab1b732d53c18f26f51cad49371be3244fe67504 Author: Vinod Koul Date: Thu May 4 14:09:10 2017 +0530 ASoC: Intel: Skylake: Move i915 registration to worker thread The i915 component framework expects the caller to be invoking snd_hdac_i915_init() from a thread context. Otherwise it results in lockups on drm side. So move the registering of component interface and probing of codecs on this bus to a worker thread. init_failed in skl structure is not used currently, so renamed to init_done and used to track the initialization done in worker thread. Reported-by: Imre Deak Signed-off-by: Vinod Koul Signed-off-by: Sodhi, VunnyX Signed-off-by: Subhransu S. Prusty Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 162 +++++++++++++++++++++++------------------- sound/soc/intel/skylake/skl.h | 4 +- 2 files changed, 91 insertions(+), 75 deletions(-) commit a27b49b8afd41d53ab2429ebb122b78a4201fa0d Author: Icenowy Zheng Date: Mon Apr 17 18:34:49 2017 +0800 ARM: sunxi: h3/h5: fix the compatible of R_CCU The R_CCU of H3/H5 currently wrongly used A64 R_CCU compatible. Fix it by changing it to the correct H3 compatible. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sunxi-h3-h5.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ffc781ec46ef1e9aedb482f5f04425bd8bb2753 Author: Yong Deng Date: Fri May 5 18:31:57 2017 +0800 clk: sunxi-ng: v3s: Fix usb otg device reset bit V3S's usb otg device reset bit should be 24, not 23. Cc: stable@vger.kernel.org Signed-off-by: Yong Deng Reviewed-By: Icenowy Zheng Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-v3s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38b8f823864707eb1cf331d2247608c419ed388c Author: Chen-Yu Tsai Date: Wed May 3 11:13:46 2017 +0800 clk: sunxi-ng: a31: Correct lcd1-ch1 clock register offset The register offset for the lcd1-ch1 clock was incorrectly pointing to the lcd0-ch1 clock. This resulted in the lcd0-ch1 clock being disabled when the clk core disables unused clocks. This then stops the simplefb HDMI output path. Reported-by: Bob Ham Fixes: c6e6c96d8fa6 ("clk: sunxi-ng: Add A31/A31s clocks") Cc: stable@vger.kernel.org # 4.9.x- Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31d848aa1d85530770f0bdf1b61a042335d340ad Author: Florian Fainelli Date: Wed Apr 19 09:58:23 2017 -0700 soc: bcm: brcmstb: Correctly match 7435 SoC Remove the duplicate brcm,bcm7425-sun-top-ctrl compatible string and replace it with brcm,bcm7435-sun-top-ctrl which was intended. Fixes: bd0faf08dc7f ("soc: bcm: brcmstb: Match additional compatible strings") Reported-by: Andreas Oberritter Acked-by: Gregory Fong Signed-off-by: Florian Fainelli drivers/soc/bcm/brcmstb/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b155f05dc578299557447a6fd6545ebc72c1d19b Merge: 2ea659a 10b6c0c Author: Florian Fainelli Date: Sat May 13 20:26:09 2017 -0700 Merge tag 'bcm2835-dt-next-2017-03-30' into devicetree/fixes This pull request brings back bcm2835 DT fixups from Baruch Siach that got misplaced after a PR for 4.11 got rejected. Signed-off-by: Florian Fainelli commit f5705aa8cfed142d980ecac12bee0d81b756479e Author: Dan Williams Date: Sat May 13 16:31:05 2017 -0700 dax, xfs, ext4: compile out iomap-dax paths in the FS_DAX=n case Tetsuo reports: fs/built-in.o: In function `xfs_file_iomap_end': xfs_iomap.c:(.text+0xe0ef9): undefined reference to `put_dax' fs/built-in.o: In function `xfs_file_iomap_begin': xfs_iomap.c:(.text+0xe1a7f): undefined reference to `dax_get_by_host' make: *** [vmlinux] Error 1 $ grep DAX .config CONFIG_DAX=m # CONFIG_DEV_DAX is not set # CONFIG_FS_DAX is not set When FS_DAX=n we can/must throw away the dax code in filesystems. Implement 'fs_' versions of dax_get_by_host() and put_dax() that are nops in the FS_DAX=n case. Cc: Cc: Cc: Jan Kara Cc: "Theodore Ts'o" Cc: "Darrick J. Wong" Cc: Ross Zwisler Tested-by: Tony Luck Fixes: ef51042472f5 ("block, dax: move 'select DAX' from BLOCK to FS_DAX") Reported-by: Tetsuo Handa Signed-off-by: Dan Williams fs/ext2/inode.c | 4 ++-- fs/ext4/inode.c | 4 ++-- fs/xfs/xfs_iomap.c | 4 ++-- include/linux/dax.h | 34 +++++++++++++++++++++++++++------- 4 files changed, 33 insertions(+), 13 deletions(-) commit 967b08c25a091867b04261fa34addedc950256f1 Author: Rafael J. Wysocki Date: Sun May 14 02:23:12 2017 +0200 RTC: rtc-cmos: Fix wakeup from suspend-to-idle Commit eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle) modified the core suspend-to-idle code to filter out spurious SCI interrupts received while suspended, which requires ACPI event source handlers to report wakeup events in a way that will trigger a wakeup from suspend to idle (or abort system suspends in progress, which is equivalent). That needs to be done in the rtc-cmos driver too, which was overlooked by the above commit, so do that now. Fixes: eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle) Reported-by: David E. Box Signed-off-by: Rafael J. Wysocki drivers/rtc/rtc-cmos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60d4553bdc1a0099adb544e12cafd7bbc7f1d484 Author: Rafael J. Wysocki Date: Sun May 14 02:23:04 2017 +0200 PM / wakeup: Fix up wakeup_source_report_event() Commit 8a537ece3d94 (PM / wakeup: Integrate mechanism to abort transitions in progress) modified wakeup_source_report_event() and wakeup_source_activate() to make it possible to call pm_system_wakeup() from the latter if so indicated by the caller of the former (via a new function argument added by that commit), but it overlooked the fact that in some situations wakeup_source_report_event() is called to signal a "hard" event (ie. such that should abort a system suspend in progress) after pm_stay_awake() has been called for the same wakeup source object, in which case the pm_system_wakeup() will not trigger. To work around this issue, modify wakeup_source_activate() and wakeup_source_report_event() again so that pm_system_wakeup() is called by the latter directly (if its last argument is true), in which case the additional argument does not need to be passed to wakeup_source_activate() any more, so drop it from there. Fixes: 8a537ece3d94 (PM / wakeup: Integrate mechanism to abort transitions in progress) Reported-by: David E. Box Signed-off-by: Rafael J. Wysocki drivers/base/power/wakeup.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 33fc30b470983e5b641a16cccc882f6777dd50ef Author: Rafael J. Wysocki Date: Sun May 14 02:06:03 2017 +0200 cpufreq: intel_pstate: Document the current behavior and user interface Add a document describing the current behavior and user space interface of the intel_pstate driver in the RST format and drop the existing outdated intel_pstate.txt document. Also update admin-guide/pm/cpufreq.rst with proper RST references to the new intel_pstate.rst document. Signed-off-by: Rafael J. Wysocki Documentation/admin-guide/pm/cpufreq.rst | 19 +- Documentation/admin-guide/pm/index.rst | 1 + Documentation/admin-guide/pm/intel_pstate.rst | 755 ++++++++++++++++++++++++++ Documentation/cpu-freq/intel-pstate.txt | 281 ---------- 4 files changed, 766 insertions(+), 290 deletions(-) commit 9d109081c261d87fc84e0cce245796796ae4c460 Author: Dan Williams Date: Sat May 13 16:18:21 2017 -0700 dax: fix false CONFIG_BLOCK dependency In the BLOCK=n case the dax core does not need to / must not emit the block-device-dax helpers. Otherwise it leads to compile errors. Cc: Arnd Bergmann Reported-by: Fabian Frederick Fixes: ef51042472f5 ("block, dax: move 'select DAX' from BLOCK to FS_DAX") Signed-off-by: Dan Williams drivers/dax/super.c | 2 ++ 1 file changed, 2 insertions(+) commit 3fd37226216620c1a468afa999739d5016fbc349 Author: Kirill Tkhai Date: Fri May 12 19:11:31 2017 +0300 pid_ns: Fix race between setns'ed fork() and zap_pid_ns_processes() Imagine we have a pid namespace and a task from its parent's pid_ns, which made setns() to the pid namespace. The task is doing fork(), while the pid namespace's child reaper is dying. We have the race between them: Task from parent pid_ns Child reaper copy_process() .. alloc_pid() .. .. zap_pid_ns_processes() .. disable_pid_allocation() .. read_lock(&tasklist_lock) .. iterate over pids in pid_ns .. kill tasks linked to pids .. read_unlock(&tasklist_lock) write_lock_irq(&tasklist_lock); .. attach_pid(p, PIDTYPE_PID); .. .. .. So, just created task p won't receive SIGKILL signal, and the pid namespace will be in contradictory state. Only manual kill will help there, but does the userspace care about this? I suppose, the most users just inject a task into a pid namespace and wait a SIGCHLD from it. The patch fixes the problem. It simply checks for (pid_ns->nr_hashed & PIDNS_HASH_ADDING) in copy_process(). We do it under the tasklist_lock, and can't skip PIDNS_HASH_ADDING as noted by Oleg: "zap_pid_ns_processes() does disable_pid_allocation() and then takes tasklist_lock to kill the whole namespace. Given that copy_process() checks PIDNS_HASH_ADDING under write_lock(tasklist) they can't race; if copy_process() takes this lock first, the new child will be killed, otherwise copy_process() can't miss the change in ->nr_hashed." If allocation is disabled, we just return -ENOMEM like it's made for such cases in alloc_pid(). v2: Do not move disable_pid_allocation(), do not introduce a new variable in copy_process() and simplify the patch as suggested by Oleg Nesterov. Account the problem with double irq enabling found by Eric W. Biederman. Fixes: c876ad768215 ("pidns: Stop pid allocation when init dies") Signed-off-by: Kirill Tkhai CC: Andrew Morton CC: Ingo Molnar CC: Peter Zijlstra CC: Oleg Nesterov CC: Mike Rapoport CC: Michal Hocko CC: Andy Lutomirski CC: "Eric W. Biederman" CC: Andrei Vagin CC: Cyrill Gorcunov CC: Serge Hallyn Cc: stable@vger.kernel.org Acked-by: Oleg Nesterov Signed-off-by: Eric W. Biederman kernel/fork.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b9a985db98961ae1ba0be169f19df1c567e4ffe0 Author: Eric W. Biederman Date: Thu May 11 18:21:01 2017 -0500 pid_ns: Sleep in TASK_INTERRUPTIBLE in zap_pid_ns_processes The code can potentially sleep for an indefinite amount of time in zap_pid_ns_processes triggering the hung task timeout, and increasing the system average. This is undesirable. Sleep with a task state of TASK_INTERRUPTIBLE instead of TASK_UNINTERRUPTIBLE to remove these undesirable side effects. Apparently under heavy load this has been allowing Chrome to trigger the hung time task timeout error and cause ChromeOS to reboot. Reported-by: Vovo Yang Reported-by: Guenter Roeck Tested-by: Guenter Roeck Fixes: 6347e9009104 ("pidns: guarantee that the pidns init will be the last pidns process reaped") Cc: stable@vger.kernel.org Signed-off-by: "Eric W. Biederman" kernel/pid_namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ea659a9ef488125eb46da6eb571de5eae5c43f6 Author: Linus Torvalds Date: Sat May 13 13:19:49 2017 -0700 Linux 4.12-rc1 Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cd636458904a04de2349c728323c5d2af1203bdf Merge: b53c4d5 3af9256 Author: Linus Torvalds Date: Sat May 13 10:25:05 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull some more input subsystem updates from Dmitry Torokhov: "An updated xpad driver with a few more recognized device IDs, and a new psxpad-spi driver, allowing connecting Playstation 1 and 2 joypads via SPI bus" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: cros_ec_keyb - remove extraneous 'const' Input: add support for PlayStation 1/2 joypads connected via SPI Input: xpad - add USB IDs for Mad Catz Brawlstick and Razer Sabertooth Input: xpad - sync supported devices with xboxdrv Input: xpad - sort supported devices by USB ID commit b53c4d5eb7cda86f7bf495f52116ae43bdc9cf23 Merge: ec05901 7bccd12 Author: Linus Torvalds Date: Sat May 13 10:23:12 2017 -0700 Merge tag 'upstream-4.12-rc1' of git://git.infradead.org/linux-ubifs Pull UBI/UBIFS updates from Richard Weinberger: - new config option CONFIG_UBIFS_FS_SECURITY - minor improvements - random fixes * tag 'upstream-4.12-rc1' of git://git.infradead.org/linux-ubifs: ubi: Add debugfs file for tracking PEB state ubifs: Fix a typo in comment of ioctl2ubifs & ubifs2ioctl ubifs: Remove unnecessary assignment ubifs: Fix cut and paste error on sb type comparisons ubi: fastmap: Fix slab corruption ubifs: Add CONFIG_UBIFS_FS_SECURITY to disable/enable security labels ubi: Make mtd parameter readable ubi: Fix section mismatch commit ec059019b7e6ae3926a8e1dec02a62d64dd8c060 Merge: 1251704 ce45860 Author: Linus Torvalds Date: Sat May 13 10:20:02 2017 -0700 Merge branch 'for-linus-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML fixes from Richard Weinberger: "No new stuff, just fixes" * 'for-linus-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: Add missing NR_CPUS include um: Fix to call read_initrd after init_bootmem um: Include kbuild.h instead of duplicating its macros um: Fix PTRACE_POKEUSER on x86_64 um: Set number of CPUs um: Fix _print_addr() commit 1251704a631b62591ad1d1b6ead252e9e597d5f5 Merge: 0fcc3ab b340959 Author: Linus Torvalds Date: Sat May 13 09:49:35 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "15 fixes" * emailed patches from Andrew Morton : mm, docs: update memory.stat description with workingset* entries mm: vmscan: scan until it finds eligible pages mm, thp: copying user pages must schedule on collapse dax: fix PMD data corruption when fault races with write dax: fix data corruption when fault races with write ext4: return to starting transaction in ext4_dax_huge_fault() mm: fix data corruption due to stale mmap reads dax: prevent invalidation of mapped DAX entries Tigran has moved mm, vmalloc: fix vmalloc users tracking properly mm/khugepaged: add missed tracepoint for collapse_huge_page_swapin gcov: support GCC 7.1 mm, vmstat: Remove spurious WARN() during zoneinfo print time: delete current_fs_time() hwpoison, memcg: forcibly uncharge LRU pages commit 67b4c889cc835a2a6e2ff4e20544a33e37e2875d Author: Steve French Date: Fri May 12 20:59:10 2017 -0500 [CIFS] Minor cleanup of xattr query function Some minor cleanup of cifs query xattr functions (will also make SMB3 xattr implementation cleaner as well). Signed-off-by: Steve French fs/cifs/cifsglob.h | 2 +- fs/cifs/cifsproto.h | 3 +-- fs/cifs/cifssmb.c | 4 +++- fs/cifs/inode.c | 3 +-- fs/cifs/xattr.c | 6 ++---- 5 files changed, 8 insertions(+), 10 deletions(-) commit 4328fea77ca30ef6af938ae3f263a3d055a9c0e6 Author: Karim Eshapa Date: Fri May 12 01:53:38 2017 +0200 fs: cifs: transport: Use time_after for time comparison Use time_after kernel macro for time comparison that has safety check. Signed-off-by: Karim Eshapa Signed-off-by: Steve French fs/cifs/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd1230070ae1c12fd34cf6a557bfa81bf9311009 Author: Christophe JAILLET Date: Fri May 12 17:59:32 2017 +0200 SMB2: Fix share type handling In fs/cifs/smb2pdu.h, we have: #define SMB2_SHARE_TYPE_DISK 0x01 #define SMB2_SHARE_TYPE_PIPE 0x02 #define SMB2_SHARE_TYPE_PRINT 0x03 Knowing that, with the current code, the SMB2_SHARE_TYPE_PRINT case can never trigger and printer share would be interpreted as disk share. So, test the ShareType value for equality instead. Fixes: faaf946a7d5b ("CIFS: Add tree connect/disconnect capability for SMB2") Signed-off-by: Christophe JAILLET Acked-by: Aurelien Aptel Signed-off-by: Steve French fs/cifs/smb2pdu.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit ecdcf622eb74b52cebde1387a7a1852a787d8050 Author: Joe Perches via samba-technical Date: Sun May 7 01:31:47 2017 -0700 cifs: cifsacl: Use a temporary ops variable to reduce code length Create an ops variable to store tcon->ses->server->ops and cache indirections and reduce code size a trivial bit. $ size fs/cifs/cifsacl.o* text data bss dec hex filename 5338 136 8 5482 156a fs/cifs/cifsacl.o.new 5371 136 8 5515 158b fs/cifs/cifsacl.o.old Signed-off-by: Joe Perches Acked-by: Shirish Pargaonkar Signed-off-by: Steve French fs/cifs/cifsacl.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit b340959ea281dbac15344277094d0a294dbe8aca Author: Roman Gushchin Date: Fri May 12 15:47:09 2017 -0700 mm, docs: update memory.stat description with workingset* entries Commit 4b4cea91691d ("mm: vmscan: fix IO/refault regression in cache workingset transition") introduced three new entries in memory stat file: - workingset_refault - workingset_activate - workingset_nodereclaim This commit adds a corresponding description to the cgroup v2 docs. Link: http://lkml.kernel.org/r/1494530293-31236-1-git-send-email-guro@fb.com Signed-off-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Tejun Heo Cc: Li Zefan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/cgroup-v2.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 791b48b642324c4e6bfef27f552aaebead81905f Author: Minchan Kim Date: Fri May 12 15:47:06 2017 -0700 mm: vmscan: scan until it finds eligible pages Although there are a ton of free swap and anonymous LRU page in elgible zones, OOM happened. balloon invoked oom-killer: gfp_mask=0x17080c0(GFP_KERNEL_ACCOUNT|__GFP_ZERO|__GFP_NOTRACK), nodemask=(null), order=0, oom_score_adj=0 CPU: 7 PID: 1138 Comm: balloon Not tainted 4.11.0-rc6-mm1-zram-00289-ge228d67e9677-dirty #17 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 Call Trace: oom_kill_process+0x21d/0x3f0 out_of_memory+0xd8/0x390 __alloc_pages_slowpath+0xbc1/0xc50 __alloc_pages_nodemask+0x1a5/0x1c0 pte_alloc_one+0x20/0x50 __pte_alloc+0x1e/0x110 __handle_mm_fault+0x919/0x960 handle_mm_fault+0x77/0x120 __do_page_fault+0x27a/0x550 trace_do_page_fault+0x43/0x150 do_async_page_fault+0x2c/0x90 async_page_fault+0x28/0x30 Mem-Info: active_anon:424716 inactive_anon:65314 isolated_anon:0 active_file:52 inactive_file:46 isolated_file:0 unevictable:0 dirty:27 writeback:0 unstable:0 slab_reclaimable:3967 slab_unreclaimable:4125 mapped:133 shmem:43 pagetables:1674 bounce:0 free:4637 free_pcp:225 free_cma:0 Node 0 active_anon:1698864kB inactive_anon:261256kB active_file:208kB inactive_file:184kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:532kB dirty:108kB writeback:0kB shmem:172kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no DMA free:7316kB min:32kB low:44kB high:56kB active_anon:8064kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15908kB mlocked:0kB slab_reclaimable:464kB slab_unreclaimable:40kB kernel_stack:0kB pagetables:24kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB lowmem_reserve[]: 0 992 992 1952 DMA32 free:9088kB min:2048kB low:3064kB high:4080kB active_anon:952176kB inactive_anon:0kB active_file:36kB inactive_file:0kB unevictable:0kB writepending:88kB present:1032192kB managed:1019388kB mlocked:0kB slab_reclaimable:13532kB slab_unreclaimable:16460kB kernel_stack:3552kB pagetables:6672kB bounce:0kB free_pcp:56kB local_pcp:24kB free_cma:0kB lowmem_reserve[]: 0 0 0 959 Movable free:3644kB min:1980kB low:2960kB high:3940kB active_anon:738560kB inactive_anon:261340kB active_file:188kB inactive_file:640kB unevictable:0kB writepending:20kB present:1048444kB managed:1010816kB mlocked:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:832kB local_pcp:60kB free_cma:0kB lowmem_reserve[]: 0 0 0 0 DMA: 1*4kB (E) 0*8kB 18*16kB (E) 10*32kB (E) 10*64kB (E) 9*128kB (ME) 8*256kB (E) 2*512kB (E) 2*1024kB (E) 0*2048kB 0*4096kB = 7524kB DMA32: 417*4kB (UMEH) 181*8kB (UMEH) 68*16kB (UMEH) 48*32kB (UMEH) 14*64kB (MH) 3*128kB (M) 1*256kB (H) 1*512kB (M) 2*1024kB (M) 0*2048kB 0*4096kB = 9836kB Movable: 1*4kB (M) 1*8kB (M) 1*16kB (M) 1*32kB (M) 0*64kB 1*128kB (M) 2*256kB (M) 4*512kB (M) 1*1024kB (M) 0*2048kB 0*4096kB = 3772kB 378 total pagecache pages 17 pages in swap cache Swap cache stats: add 17325, delete 17302, find 0/27 Free swap = 978940kB Total swap = 1048572kB 524157 pages RAM 0 pages HighMem/MovableOnly 12629 pages reserved 0 pages cma reserved 0 pages hwpoisoned [ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name [ 433] 0 433 4904 5 14 3 82 0 upstart-udev-br [ 438] 0 438 12371 5 27 3 191 -1000 systemd-udevd With investigation, skipping page of isolate_lru_pages makes reclaim void because it returns zero nr_taken easily so LRU shrinking is effectively nothing and just increases priority aggressively. Finally, OOM happens. The problem is that get_scan_count determines nr_to_scan with eligible zones so although priority drops to zero, it couldn't reclaim any pages if the LRU contains mostly ineligible pages. get_scan_count: size = lruvec_lru_size(lruvec, lru, sc->reclaim_idx); size = size >> sc->priority; Assumes sc->priority is 0 and LRU list is as follows. N-N-N-N-H-H-H-H-H-H-H-H-H-H-H-H-H-H-H-H (Ie, small eligible pages are in the head of LRU but others are almost ineligible pages) In that case, size becomes 4 so VM want to scan 4 pages but 4 pages from tail of the LRU are not eligible pages. If get_scan_count counts skipped pages, it doesn't reclaim any pages remained after scanning 4 pages so it ends up OOM happening. This patch makes isolate_lru_pages try to scan pages until it encounters eligible zones's pages. [akpm@linux-foundation.org: clean up mind-bending `for' statement. Tweak comment text] Fixes: 3db65812d688 ("Revert "mm, vmscan: account for skipped pages as a partial scan"") Link: http://lkml.kernel.org/r/1494457232-27401-1-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Acked-by: Michal Hocko Acked-by: Johannes Weiner Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 338a16ba154959b049458d4f507d60f694550b68 Author: David Rientjes Date: Fri May 12 15:47:03 2017 -0700 mm, thp: copying user pages must schedule on collapse We have encountered need_resched warnings in __collapse_huge_page_copy() while doing {clear,copy}_user_highpage() over HPAGE_PMD_NR source pages. mm->mmap_sem is held for write, but the iteration is well bounded. Reschedule as needed. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1705101426380.109808@chino.kir.corp.google.com Signed-off-by: David Rientjes Acked-by: Vlastimil Babka Cc: "Kirill A. Shutemov" Cc: Johannes Weiner Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/khugepaged.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 876f29460cbd4086b43475890c1bf2488fa11d40 Author: Ross Zwisler Date: Fri May 12 15:47:00 2017 -0700 dax: fix PMD data corruption when fault races with write This is based on a patch from Jan Kara that fixed the equivalent race in the DAX PTE fault path. Currently DAX PMD read fault can race with write(2) in the following way: CPU1 - write(2) CPU2 - read fault dax_iomap_pmd_fault() ->iomap_begin() - sees hole dax_iomap_rw() iomap_apply() ->iomap_begin - allocates blocks dax_iomap_actor() invalidate_inode_pages2_range() - there's nothing to invalidate grab_mapping_entry() - we add huge zero page to the radix tree and map it to page tables The result is that hole page is mapped into page tables (and thus zeros are seen in mmap) while file has data written in that place. Fix the problem by locking exception entry before mapping blocks for the fault. That way we are sure invalidate_inode_pages2_range() call for racing write will either block on entry lock waiting for the fault to finish (and unmap stale page tables after that) or read fault will see already allocated blocks by write(2). Fixes: 9f141d6ef6258 ("dax: Call ->iomap_begin without entry lock during dax fault") Link: http://lkml.kernel.org/r/20170510172700.18991-1-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Cc: Dan Williams Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 13e451fdc1af05568ea379d71c02a126295d2244 Author: Jan Kara Date: Fri May 12 15:46:57 2017 -0700 dax: fix data corruption when fault races with write Currently DAX read fault can race with write(2) in the following way: CPU1 - write(2) CPU2 - read fault dax_iomap_pte_fault() ->iomap_begin() - sees hole dax_iomap_rw() iomap_apply() ->iomap_begin - allocates blocks dax_iomap_actor() invalidate_inode_pages2_range() - there's nothing to invalidate grab_mapping_entry() - we add zero page in the radix tree and map it to page tables The result is that hole page is mapped into page tables (and thus zeros are seen in mmap) while file has data written in that place. Fix the problem by locking exception entry before mapping blocks for the fault. That way we are sure invalidate_inode_pages2_range() call for racing write will either block on entry lock waiting for the fault to finish (and unmap stale page tables after that) or read fault will see already allocated blocks by write(2). Fixes: 9f141d6ef6258a3a37a045842d9ba7e68f368956 Link: http://lkml.kernel.org/r/20170510085419.27601-5-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Ross Zwisler Cc: Dan Williams Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit fb26a1cbed8c90025572d48bc9eabe59f7571e88 Author: Jan Kara Date: Fri May 12 15:46:54 2017 -0700 ext4: return to starting transaction in ext4_dax_huge_fault() DAX will return to locking exceptional entry before mapping blocks for a page fault to fix possible races with concurrent writes. To avoid lock inversion between exceptional entry lock and transaction start, start the transaction already in ext4_dax_huge_fault(). Fixes: 9f141d6ef6258a3a37a045842d9ba7e68f368956 Link: http://lkml.kernel.org/r/20170510085419.27601-4-jack@suse.cz Signed-off-by: Jan Kara Cc: Ross Zwisler Cc: Dan Williams Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ext4/file.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit cd656375f94632d7b5af57bf67b7b5c0270c591c Author: Jan Kara Date: Fri May 12 15:46:50 2017 -0700 mm: fix data corruption due to stale mmap reads Currently, we didn't invalidate page tables during invalidate_inode_pages2() for DAX. That could result in e.g. 2MiB zero page being mapped into page tables while there were already underlying blocks allocated and thus data seen through mmap were different from data seen by read(2). The following sequence reproduces the problem: - open an mmap over a 2MiB hole - read from a 2MiB hole, faulting in a 2MiB zero page - write to the hole with write(3p). The write succeeds but we incorrectly leave the 2MiB zero page mapping intact. - via the mmap, read the data that was just written. Since the zero page mapping is still intact we read back zeroes instead of the new data. Fix the problem by unconditionally calling invalidate_inode_pages2_range() in dax_iomap_actor() for new block allocations and by properly invalidating page tables in invalidate_inode_pages2_range() for DAX mappings. Fixes: c6dcf52c23d2d3fb5235cec42d7dd3f786b87d55 Link: http://lkml.kernel.org/r/20170510085419.27601-3-jack@suse.cz Signed-off-by: Jan Kara Signed-off-by: Ross Zwisler Cc: Dan Williams Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 2 +- mm/truncate.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) commit 4636e70bb0a8b871998b6841a2e4b205cf2bc863 Author: Ross Zwisler Date: Fri May 12 15:46:47 2017 -0700 dax: prevent invalidation of mapped DAX entries Patch series "mm,dax: Fix data corruption due to mmap inconsistency", v4. This series fixes data corruption that can happen for DAX mounts when page faults race with write(2) and as a result page tables get out of sync with block mappings in the filesystem and thus data seen through mmap is different from data seen through read(2). The series passes testing with t_mmap_stale test program from Ross and also other mmap related tests on DAX filesystem. This patch (of 4): dax_invalidate_mapping_entry() currently removes DAX exceptional entries only if they are clean and unlocked. This is done via: invalidate_mapping_pages() invalidate_exceptional_entry() dax_invalidate_mapping_entry() However, for page cache pages removed in invalidate_mapping_pages() there is an additional criteria which is that the page must not be mapped. This is noted in the comments above invalidate_mapping_pages() and is checked in invalidate_inode_page(). For DAX entries this means that we can can end up in a situation where a DAX exceptional entry, either a huge zero page or a regular DAX entry, could end up mapped but without an associated radix tree entry. This is inconsistent with the rest of the DAX code and with what happens in the page cache case. We aren't able to unmap the DAX exceptional entry because according to its comments invalidate_mapping_pages() isn't allowed to block, and unmap_mapping_range() takes a write lock on the mapping->i_mmap_rwsem. Since we essentially never have unmapped DAX entries to evict from the radix tree, just remove dax_invalidate_mapping_entry(). Fixes: c6dcf52c23d2 ("mm: Invalidate DAX radix tree entries only if appropriate") Link: http://lkml.kernel.org/r/20170510085419.27601-2-jack@suse.cz Signed-off-by: Ross Zwisler Signed-off-by: Jan Kara Reported-by: Jan Kara Cc: Dan Williams Cc: [4.10+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 29 ----------------------------- include/linux/dax.h | 1 - mm/truncate.c | 9 +++------ 3 files changed, 3 insertions(+), 36 deletions(-) commit cea582247a0aea78b4674c32833c10b8820fcdbe Author: Andrew Morton Date: Fri May 12 15:46:44 2017 -0700 Tigran has moved Cc: Tigran Aivazian Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/bfs.txt | 2 +- MAINTAINERS | 2 +- arch/x86/kernel/cpu/microcode/amd.c | 2 +- arch/x86/kernel/cpu/microcode/core.c | 2 +- arch/x86/kernel/cpu/microcode/intel.c | 2 +- fs/bfs/inode.c | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) commit 8594a21cf7a8318baedbedc3fcd2967a17ddeec0 Author: Michal Hocko Date: Fri May 12 15:46:41 2017 -0700 mm, vmalloc: fix vmalloc users tracking properly Commit 1f5307b1e094 ("mm, vmalloc: properly track vmalloc users") has pulled asm/pgtable.h include dependency to linux/vmalloc.h and that turned out to be a bad idea for some architectures. E.g. m68k fails with In file included from arch/m68k/include/asm/pgtable_mm.h:145:0, from arch/m68k/include/asm/pgtable.h:4, from include/linux/vmalloc.h:9, from arch/m68k/kernel/module.c:9: arch/m68k/include/asm/mcf_pgtable.h: In function 'nocache_page': >> arch/m68k/include/asm/mcf_pgtable.h:339:43: error: 'init_mm' undeclared (first use in this function) #define pgd_offset_k(address) pgd_offset(&init_mm, address) as spotted by kernel build bot. nios2 fails for other reason In file included from include/asm-generic/io.h:767:0, from arch/nios2/include/asm/io.h:61, from include/linux/io.h:25, from arch/nios2/include/asm/pgtable.h:18, from include/linux/mm.h:70, from include/linux/pid_namespace.h:6, from include/linux/ptrace.h:9, from arch/nios2/include/uapi/asm/elf.h:23, from arch/nios2/include/asm/elf.h:22, from include/linux/elf.h:4, from include/linux/module.h:15, from init/main.c:16: include/linux/vmalloc.h: In function '__vmalloc_node_flags': include/linux/vmalloc.h:99:40: error: 'PAGE_KERNEL' undeclared (first use in this function); did you mean 'GFP_KERNEL'? which is due to the newly added #include , which on nios2 includes and thus and which again includes . Tweaking that around just turns out a bigger headache than necessary. This patch reverts 1f5307b1e094 and reimplements the original fix in a different way. __vmalloc_node_flags can stay static inline which will cover vmalloc* functions. We only have one external user (kvmalloc_node) and we can export __vmalloc_node_flags_caller and provide the caller directly. This is much simpler and it doesn't really need any games with header files. [akpm@linux-foundation.org: coding-style fixes] [mhocko@kernel.org: revert old comment] Link: http://lkml.kernel.org/r/20170509211054.GB16325@dhcp22.suse.cz Fixes: 1f5307b1e094 ("mm, vmalloc: properly track vmalloc users") Link: http://lkml.kernel.org/r/20170509153702.GR6481@dhcp22.suse.cz Signed-off-by: Michal Hocko Cc: Tobias Klauser Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/vmalloc.h | 21 ++++++--------------- mm/util.c | 3 ++- mm/vmalloc.c | 19 ++++++++++++++++++- 3 files changed, 26 insertions(+), 17 deletions(-) commit 835152a25949dd5561819c2e3fcc4b2dd27f3e1e Author: SeongJae Park Date: Fri May 12 15:46:38 2017 -0700 mm/khugepaged: add missed tracepoint for collapse_huge_page_swapin One return case of `__collapse_huge_page_swapin()` does not invoke tracepoint while every other return case does. This commit adds a tracepoint invocation for the case. Link: http://lkml.kernel.org/r/20170507101813.30187-1-sj38.park@gmail.com Signed-off-by: SeongJae Park Cc: Kirill A. Shutemov Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/khugepaged.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 05384213436ab690c46d9dfec706b80ef8d671ab Author: Martin Liska Date: Fri May 12 15:46:35 2017 -0700 gcov: support GCC 7.1 Starting from GCC 7.1, __gcov_exit is a new symbol expected to be implemented in a profiling runtime. [akpm@linux-foundation.org: coding-style fixes] [mliska@suse.cz: v2] Link: http://lkml.kernel.org/r/e63a3c59-0149-c97e-4084-20ca8f146b26@suse.cz Link: http://lkml.kernel.org/r/8c4084fa-3885-29fe-5fc4-0d4ca199c785@suse.cz Signed-off-by: Martin Liska Acked-by: Peter Oberparleiter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/gcov/base.c | 6 ++++++ kernel/gcov/gcc_4_7.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 8d35bb310698c69d73073b26fc581f2e3f7f621d Author: Reza Arbab Date: Fri May 12 15:46:32 2017 -0700 mm, vmstat: Remove spurious WARN() during zoneinfo print After commit e2ecc8a79ed4 ("mm, vmstat: print non-populated zones in zoneinfo"), /proc/zoneinfo will show unpopulated zones. A memoryless node, having no populated zones at all, was previously ignored, but will now trigger the WARN() in is_zone_first_populated(). Remove this warning, as its only purpose was to warn of a situation that has since been enabled. Aside: The "per-node stats" are still printed under the first populated zone, but that's not necessarily the first stanza any more. I'm not sure which criteria is more important with regard to not breaking parsers, but it looks a little weird to the eye. Fixes: e2ecc8a79ed4 ("mm, vmstat: print node-based stats in zoneinfo file") Link: http://lkml.kernel.org/r/1493854905-10918-1-git-send-email-arbab@linux.vnet.ibm.com Signed-off-by: Reza Arbab Cc: David Rientjes Cc: Anshuman Khandual Cc: Vlastimil Babka Cc: Mel Gorman Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmstat.c | 2 -- 1 file changed, 2 deletions(-) commit 572e0ca9b909339fbe017aaff1a225efb6db3b61 Author: Deepa Dinamani Date: Fri May 12 15:46:29 2017 -0700 time: delete current_fs_time() All uses of the current_fs_time() function have been replaced by other time interfaces. And, its use cases can be fulfilled by current_time() or ktime_get_* variants. Link: http://lkml.kernel.org/r/1491613030-11599-13-git-send-email-deepa.kernel@gmail.com Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann Cc: John Stultz Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/fs.h | 1 - kernel/time/time.c | 14 -------------- 2 files changed, 15 deletions(-) commit 18365225f0440d09708ad9daade2ec11275c3df9 Author: Michal Hocko Date: Fri May 12 15:46:26 2017 -0700 hwpoison, memcg: forcibly uncharge LRU pages Laurent Dufour has noticed that hwpoinsoned pages are kept charged. In his particular case he has hit a bad_page("page still charged to cgroup") when onlining a hwpoison page. While this looks like something that shouldn't happen in the first place because onlining hwpages and returning them to the page allocator makes only little sense it shows a real problem. hwpoison pages do not get freed usually so we do not uncharge them (at least not since commit 0a31bc97c80c ("mm: memcontrol: rewrite uncharge API")). Each charge pins memcg (since e8ea14cc6ead ("mm: memcontrol: take a css reference for each charged page")) as well and so the mem_cgroup and the associated state will never go away. Fix this leak by forcibly uncharging a LRU hwpoisoned page in delete_from_lru_cache(). We also have to tweak uncharge_list because it cannot rely on zero ref count for these pages. [akpm@linux-foundation.org: coding-style fixes] Fixes: 0a31bc97c80c ("mm: memcontrol: rewrite uncharge API") Link: http://lkml.kernel.org/r/20170502185507.GB19165@dhcp22.suse.cz Signed-off-by: Michal Hocko Reported-by: Laurent Dufour Tested-by: Laurent Dufour Reviewed-by: Balbir Singh Reviewed-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 2 +- mm/memory-failure.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 0fcc3ab23d7395f58e8ab0834e7913e2e4314a83 Merge: deac842 e84b83b Author: Linus Torvalds Date: Fri May 12 15:43:10 2017 -0700 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "Incremental fixes and a small feature addition on top of the main libnvdimm 4.12 pull request: - Geert noticed that tinyconfig was bloated by BLOCK selecting DAX. The size regression is fixed by moving all dax helpers into the dax-core and only specifying "select DAX" for FS_DAX and dax-capable drivers. He also asked for clarification of the NR_DEV_DAX config option which, on closer look, does not need to be a config option at all. Mike also throws in a DEV_DAX_PMEM fixup for good measure. - Ben's attention to detail on -stable patch submissions caught a case where the recent fixes to arch_copy_from_iter_pmem() missed a condition where we strand dirty data in the cache. This is tagged for -stable and will also be included in the rework of the pmem api to a proposed {memcpy,copy_user}_flushcache() interface for 4.13. - Vishal adds a feature that missed the initial pull due to pending review feedback. It allows the kernel to clear media errors when initializing a BTT (atomic sector update driver) instance on a pmem namespace. - Ross noticed that the dax_device + dax_operations conversion broke __dax_zero_page_range(). The nvdimm unit tests fail to check this path, but xfstests immediately trips over it. No excuse for missing this before submitting the 4.12 pull request. These all pass the nvdimm unit tests and an xfstests spot check. The set has received a build success notification from the kbuild robot" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: filesystem-dax: fix broken __dax_zero_page_range() conversion libnvdimm, btt: ensure that initializing metadata clears poison libnvdimm: add an atomic vs process context flag to rw_bytes x86, pmem: Fix cache flushing for iovec write < 8 bytes device-dax: kill NR_DEV_DAX block, dax: move "select DAX" from BLOCK to FS_DAX device-dax: Tell kbuild DEV_DAX_PMEM depends on DEV_DAX commit d82dd0e34d0347be201fd274dc84cd645dccc064 Author: Tomasz Majchrzak Date: Fri May 12 14:26:10 2017 +0200 raid1: prefer disk without bad blocks If an array consists of two drives and the first drive has the bad block, the read request to the region overlapping the bad block chooses the same disk (with bad block) as device to read from over and over and the request gets stuck. If the first disk only partially overlaps with bad block, it becomes a candidate ("best disk") for shorter range of sectors. The second disk is capable of reading the entire requested range and it is updated accordingly, however it is not recorded as a best device for the request. In the end the request is sent to the first disk to read entire range of sectors. It fails and is re-tried in a moment but with the same outcome. Actually it is quite likely scenario but it had little exposure in my test until commit 715d40b93b10 ("md/raid1: add failfast handling for reads.") removed preference for idle disk. Such scenario had been passing as second disk was always chosen when idle. Reset a candidate ("best disk") to read from if disk can read entire range. Do it only if other disk has already been chosen as a candidate for a smaller range. The head position / disk type logic will select the best disk to read from - it is fine as disk with bad block won't be considered for it. Signed-off-by: Tomasz Majchrzak Signed-off-by: Shaohua Li drivers/md/raid1.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f369fdf4f661322b73f3307e9f3cd55fb3a20123 Author: Lv Zheng Date: Tue May 9 15:02:22 2017 +0800 Revert "ACPI / button: Remove lid_init_state=method mode" This reverts commit ecb10b694b72ca5ea51b3c90a71ff2a11963425a. The only expected ACPI control method lid device's usage model is 1. Listen to the lid notification, 2. Evaluate _LID after being notified by BIOS, 3. Suspend the system (if users configure to do so) after seeing "close". It's not ensured that BIOS will notify OS after boot/resume, and it's not ensured that BIOS will always generate "open" event upon opening the lid. But there are 2 wrong usage models: 1. When the lid device is responsible for suspend/resume the system, userspace requires to see "open" event to be paired with "close" after the system is resumed, or it will suspend the system again. 2. When an external monitor connects to the laptop attached docks, userspace requires to see "close" event after the system is resumed so that it can determine whether the internal display should remain dark and the external display should be lit on. After we made default kernel behavior to be suitable for usage model 1, users of usage model 2 start to report regressions for such behavior change. Reversion of button.lid_init_state=method doesn't actually reverts to old default behavior as doing so can enter a regression loop, but facilitates users to work the reported regressions around with button.lid_init_state=method. Fixes: ecb10b694b72 (ACPI / button: Remove lid_init_state=method mode) Cc: 4.11+ # 4.11+ Link: https://bugzilla.kernel.org/show_bug.cgi?id=195455 Link: https://bugzilla.redhat.com/show_bug.cgi?id=1430259 Tested-by: Steffen Weber Tested-by: Julian Wiedmann Reported-by: Joachim Frieben Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki Documentation/acpi/acpi-lid.txt | 16 ++++++++++++---- drivers/acpi/button.c | 9 +++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) commit bdce57e7ae9cac56cda958029104c752afaf0894 Author: Prarit Bhargava Date: Fri Mar 3 09:44:11 2017 -0500 tools/power/acpi: Add .gitignore file Add a .gitignore file so that git commands do not pick up the resulting binaries and directories. Signed-off-by: Prarit Bhargava Acked-by: Lv Zheng Signed-off-by: Rafael J. Wysocki tools/power/acpi/.gitignore | 4 ++++ 1 file changed, 4 insertions(+) commit deac8429d62ca19c1571853e2a18f60e760ee04c Merge: 6b402bd 31cbee6 Author: Linus Torvalds Date: Fri May 12 12:10:38 2017 -0700 Merge tag 'sound-fix-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This contains a one-liner change that has a significant impact: disabling the build of OSS. It's been unmaintained for long time, and we'd like to drop the stuff. Finally, as the first step, stop the build. Let's see whether it works without much complaints. Other than that, there are two small fixes for HD-audio" * tag 'sound-fix-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: sound: Disable the build of OSS drivers ALSA: hda: Fix cpu lockup when stopping the cmd dmas ALSA: hda - Add mute led support for HP EliteBook 840 G3 commit 6b402bdfdbafce241cb6789ae38d94f45641078c Merge: 6a776e4 35f4f99 Author: Linus Torvalds Date: Fri May 12 12:02:21 2017 -0700 Merge tag 'for-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull more power-supply updates from Sebastian Reichel: "The power-supply subsystem has a few more changes for the v4.12 merge window: - New battery driver for AXP20X and AXP22X PMICs - Improve max17042_battery for usage on x86 - Misc small cleanups & fixes" * tag 'for-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (34 commits) power: supply: cpcap-charger: Keep trickle charger bits disabled power: supply: cpcap-charger: Fix enable for 3.8V charge setting power: supply: cpcap-charger: Fix charge voltage configuration power: supply: cpcap-charger: Fix charger name power: supply: twl4030-charger: make twl4030_bci_property_is_writeable static power: supply: sbs-battery: Add alert callback mailmap: add Sebastian Reichel power: supply: avoid unused twl4030-madc.h power: supply: sbs-battery: Correct supply status with current draw power: supply: sbs-battery: Don't ignore the first external power change power: supply: pda_power: move from timer to delayed_work power: supply: max17042_battery: Add support for the SCOPE property power: supply: max17042_battery: Add support for the CHARGE_NOW property power: supply: max17042_battery: Add support for the CHARGE_FULL_DESIGN property power: supply: max17042_battery: mAh readings depend on r_sns value power: supply: max17042_battery: Add support for the VOLT_MIN property power: supply: max17042_battery: Add support for the TECHNOLOGY attribute power: supply: max17042_battery: Add external_power_changed callback power: supply: max17042_battery: Add support for the STATUS property power: supply: max17042_battery: Add default platform_data fallback data ... commit 6a776e47a045462a1df1a3a9592598259ffd614f Merge: a34ab10 cb15c81 Author: Linus Torvalds Date: Fri May 12 11:58:45 2017 -0700 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management updates from Zhang Rui: - Fix a problem where orderly_shutdown() is called for multiple times due to multiple critical overheating events raised in a short period by platform thermal driver. (Keerthy) - Introduce a backup thermal shutdown mechanism, which invokes kernel_power_off()/emergency_restart() directly, after orderly_shutdown() being issued for certain amount of time(specified via Kconfig). This is useful in certain conditions that userspace may be unable to power off the system in a clean manner and leaves the system in a critical state, like in the middle of driver probing phase. (Keerthy) - Introduce a new interface in thermal devfreq_cooling code so that the driver can provide more precise data regarding actual power to the thermal governor every time the power budget is calculated. (Lukasz Luba) - Introduce BCM 2835 soc thermal driver and northstar thermal driver, within a new sub-folder. (Rafał Miłecki) - Introduce DA9062/61 thermal driver. (Steve Twiss) - Remove non-DT booting on TI-SoC driver. Also add support to fetching coefficients from DT. (Keerthy) - Refactorf RCAR Gen3 thermal driver. (Niklas Söderlund) - Small fix on MTK and intel-soc-dts thermal driver. (Dawei Chien, Brian Bian) * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (25 commits) thermal: core: Add a back up thermal shutdown mechanism thermal: core: Allow orderly_poweroff to be called only once Thermal: Intel SoC DTS: Change interrupt request behavior trace: thermal: add another parameter 'power' to the tracing function thermal: devfreq_cooling: add new interface for direct power read thermal: devfreq_cooling: refactor code and add get_voltage function thermal: mt8173: minor mtk_thermal.c cleanups thermal: bcm2835: move to the broadcom subdirectory thermal: broadcom: ns: specify myself as MODULE_AUTHOR thermal: da9062/61: Thermal junction temperature monitoring driver Documentation: devicetree: thermal: da9062/61 TJUNC temperature binding thermal: broadcom: add Northstar thermal driver dt-bindings: thermal: add support for Broadcom's Northstar thermal thermal: bcm2835: add thermal driver for bcm2835 SoC dt-bindings: Add thermal zone to bcm2835-thermal example thermal: rcar_gen3_thermal: add suspend and resume support thermal: rcar_gen3_thermal: store device match data in private structure thermal: rcar_gen3_thermal: enable hardware interrupts for trip points thermal: rcar_gen3_thermal: record and check number of TSCs found thermal: rcar_gen3_thermal: check that TSC exists before memory allocation ... commit a34ab101a9d27a2995142b47f9857fb46fcb072a Merge: bd1286f 7b8cd33 Author: Linus Torvalds Date: Fri May 12 11:48:26 2017 -0700 Merge tag 'drm-fixes-for-v4.12-rc1' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "AMD, nouveau, one i915, and one EDID fix for v4.12-rc1 Some fixes that it would be good to have in rc1. It contains the i915 quiet fix that you reported. It also has an amdgpu fixes pull, with lots of ongoing work on Vega10 which is new in this kernel and is preliminary support so may have a fair bit of movement. Otherwise a few non-Vega10 AMD fixes, one EDID fix and some nouveau regression fixers" * tag 'drm-fixes-for-v4.12-rc1' of git://people.freedesktop.org/~airlied/linux: (144 commits) drm/i915: Make vblank evade warnings optional drm/nouveau/therm: remove ineffective workarounds for alarm bugs drm/nouveau/tmr: avoid processing completed alarms when adding a new one drm/nouveau/tmr: fix corruption of the pending list when rescheduling an alarm drm/nouveau/tmr: handle races with hw when updating the next alarm time drm/nouveau/tmr: ack interrupt before processing alarms drm/nouveau/core: fix static checker warning drm/nouveau/fb/ram/gf100-: remove 0x10f200 read drm/nouveau/kms/nv50: skip core channel cursor update on position-only changes drm/nouveau/kms/nv50: fix source-rect-only plane updates drm/nouveau/kms/nv50: remove pointless argument to window atomic_check_acquire() drm/amd/powerplay: refine pwm1_enable callback functions for CI. drm/amd/powerplay: refine pwm1_enable callback functions for vi. drm/amd/powerplay: refine pwm1_enable callback functions for Vega10. drm/amdgpu: refine amdgpu pwm1_enable sysfs interface. drm/amdgpu: add amd fan ctrl mode enums. drm/amd/powerplay: add more smu message on Vega10. drm/amdgpu: fix dependency issue drm/amd: fix init order of sched job drm/amdgpu: add some additional vega10 pci ids ... commit bd1286f964041a2fe5eec8801a51bd79d905bd02 Merge: 0504532 984a9d4 Author: Linus Torvalds Date: Fri May 12 11:44:13 2017 -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: "Things were a lot more calm than previously expected. It's primarily fixes in various areas, with most of the new functionality centering around TCMU backend driver work that Xiubo Li has been driving. Here's the summary on the feature side: - Make T10-PI verify configurable for emulated (FILEIO + RD) backends (Dmitry Monakhov) - Allow target-core/TCMU pass-through to use in-kernel SPC-PR logic (Bryant Ly + MNC) - Add TCMU support for growing ring buffer size (Xiubo Li + MNC) - Add TCMU support for global block data pool (Xiubo Li + MNC) and on the bug-fix side: - Fix COMPARE_AND_WRITE non GOOD status handling for READ phase failures (Gary Guo + nab) - Fix iscsi-target hang with explicitly changing per NodeACL CmdSN number depth with concurrent login driven session reinstatement. (Gary Guo + nab) - Fix ibmvscsis fabric driver ABORT task handling (Bryant Ly) - Fix target-core/FILEIO zero length handling (Bart Van Assche) Also, there was an OOPs introduced with the WRITE_VERIFY changes that I ended up reverting at the last minute, because as not unusual Bart and I could not agree on the fix in time for -rc1. Since it's specific to a conformance test, it's been reverted for now. There is a separate patch in the queue to address the underlying control CDB write overflow regression in >= v4.3 separate from the WRITE_VERIFY revert here, that will be pushed post -rc1" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (30 commits) Revert "target: Fix VERIFY and WRITE VERIFY command parsing" IB/srpt: Avoid that aborting a command triggers a kernel warning IB/srpt: Fix abort handling target/fileio: Fix zero-length READ and WRITE handling ibmvscsis: Do not send aborted task response tcmu: fix module removal due to stuck thread target: Don't force session reset if queue_depth does not change iscsi-target: Set session_fall_back_to_erl0 when forcing reinstatement target: Fix compare_and_write_callback handling for non GOOD status tcmu: Recalculate the tcmu_cmd size to save cmd area memories tcmu: Add global data block pool support tcmu: Add dynamic growing data area feature support target: fixup error message in target_tg_pt_gp_tg_pt_gp_id_store() target: fixup error message in target_tg_pt_gp_alua_access_type_store() target/user: PGR Support target: Add WRITE_VERIFY_16 Documentation/target: add an example script to configure an iSCSI target target: Use kmalloc_array() in transport_kmap_data_sg() target: Use kmalloc_array() in compare_and_write_callback() target: Improve size determinations in two functions ... commit 050453295f808dd683b9a88f58a1b29540097394 Merge: e0c4a5f 4f757f3 Author: Linus Torvalds Date: Fri May 12 11:39:59 2017 -0700 Merge branch 'work.sane_pwd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs updates from Al Viro: "Making sure that something like a referral point won't end up as pwd or root. The main part is the last commit (fixing mntns_install()); that one fixes a hard-to-hit race. The fchdir() commit is making fchdir(2) a bit more robust - it should be impossible to get opened files (even O_PATH ones) for referral points in the first place, so the existing checks are OK, but checking the same thing as in chdir(2) is just as cheap. The path_init() commit removes a redundant check that shouldn't have been there in the first place" * 'work.sane_pwd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: make sure that mntns_install() doesn't end up with referral for root path_init(): don't bother with checking MAY_EXEC for LOOKUP_ROOT make sure that fchdir() won't accept referral points, etc. commit e0c4a5fc750e22c6f8d5c1ab7cc18592b88852ab Merge: dfcb7b2 88b0193 Author: Linus Torvalds Date: Fri May 12 10:45:36 2017 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates/fixes from Ingo Molnar: "Mostly tooling updates, but also two kernel fixes: a call chain handling robustness fix and an x86 PMU driver event definition fix" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/callchain: Force USER_DS when invoking perf_callchain_user() tools build: Fixup sched_getcpu feature test perf tests kmod-path: Don't fail if compressed modules aren't supported perf annotate: Fix AArch64 comment char perf tools: Fix spelling mistakes perf/x86: Fix Broadwell-EP DRAM RAPL events perf config: Refactor a duplicated code for obtaining config file name perf symbols: Allow user probes on versioned symbols perf symbols: Accept symbols starting at address 0 tools lib string: Adopt prefixcmp() from perf and subcmd perf units: Move parse_tag_value() to units.[ch] perf ui gtk: Move gtk .so name to the only place where it is used perf tools: Move HAS_BOOL define to where perl headers are used perf memswap: Split the byteswap memory range wrappers from util.[ch] perf tools: Move event prototypes from util.h to event.h perf buildid: Move prototypes from util.h to build-id.h commit dfcb7b2379ff90afb9231da040046f4b9eb1c895 Merge: 1b84fc1 f63d947 Author: Linus Torvalds Date: Fri May 12 10:43:25 2017 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Ingo Molnar: "A single ARM Juno clocksource driver fix" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/arm_arch_timer: Fix arch_timer_mem_find_best_frame() commit 1b84fc1503f24862d45eafb2e63da72b714da3fa Merge: f1e0527 5ea30e4 Author: Linus Torvalds Date: Fri May 12 10:41:45 2017 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull stackprotector fixlet from Ingo Molnar: "A single fix/enhancement to increase stackprotector canary randomness on 64-bit kernels with very little cost" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: stackprotector: Increase the per-task stack canary's random range from 32 bits to 64 bits on 64-bit platforms commit f1e0527d2db416dfdef9c55132fed7fa05910101 Merge: 5836e42 fb8fb46 Author: Linus Torvalds Date: Fri May 12 10:11:50 2017 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Misc fixes: - two boot crash fixes - unwinder fixes - kexec related kernel direct mappings enhancements/fixes - more Clang support quirks - minor cleanups - Documentation fixes" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/intel_rdt: Fix a typo in Documentation x86/build: Don't add -maccumulate-outgoing-args w/o compiler support x86/boot/32: Fix UP boot on Quark and possibly other platforms x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init() x86/kexec/64: Use gbpages for identity mappings if available x86/mm: Add support for gbpages to kernel_ident_mapping_init() x86/boot: Declare error() as noreturn x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompatibility x86/mm: Fix boot crash caused by incorrect loop count calculation in sync_global_pgds() x86/asm: Don't use RBP as a temporary register in csum_partial_copy_generic() x86/microcode/AMD: Remove redundant NULL check on mc commit 5836e422e5ca6d36d552f700916436e01cbd2066 Merge: dc2a248 69861e0 Author: Linus Torvalds Date: Fri May 12 10:09:14 2017 -0700 Merge tag 'for-linus-4.12b-rc0c-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "This contains two fixes for booting under Xen introduced during this merge window and two fixes for older problems, where one is just much more probable due to another merge window change" * tag 'for-linus-4.12b-rc0c-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: adjust early dom0 p2m handling to xen hypervisor behavior x86/amd: don't set X86_BUG_SYSRET_SS_ATTRS when running under Xen xen/x86: Do not call xen_init_time_ops() until shared_info is initialized x86/xen: fix xsave capability setting commit dc2a24816637ff6c60f08c4245aba01c6e9b6a79 Merge: ac3c4aa 5a61ef7 Author: Linus Torvalds Date: Fri May 12 10:04:09 2017 -0700 Merge tag 'powerpc-4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull more powerpc updates from Michael Ellerman: "The change to the Linux page table geometry was delayed for more testing with 16G pages, and there's the new CPU features stuff which just needed one more polish before going in. Plus a few changes from Scott which came in a bit late. And then various fixes, mostly minor. Summary highlights: - rework the Linux page table geometry to lower memory usage on 64-bit Book3S (IBM chips) using the Hash MMU. - support for a new device tree binding for discovering CPU features on future firmwares. - Freescale updates from Scott: "Includes a fix for a powerpc/next mm regression on 64e, a fix for a kernel hang on 64e when using a debugger inside a relocated kernel, a qman fix, and misc qe improvements." Thanks to: Christophe Leroy, Gavin Shan, Horia Geantă, LiuHailong, Nicholas Piggin, Roy Pledge, Scott Wood, Valentin Longchamp" * tag 'powerpc-4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s: Support new device tree binding for discovering CPU features powerpc: Don't print cpu_spec->cpu_name if it's NULL of/fdt: introduce of_scan_flat_dt_subnodes and of_get_flat_dt_phandle powerpc/64s: Fix unnecessary machine check handler relocation branch powerpc/mm/book3s/64: Rework page table geometry for lower memory usage powerpc: Fix distclean with Makefile.postlink powerpc/64e: Don't place the stack beyond TASK_SIZE powerpc/powernv: Block PCI config access on BCM5718 during EEH recovery powerpc/8xx: Adding support of IRQ in MPC8xx GPIO soc/fsl/qbman: Disable IRQs for deferred QBMan work soc/fsl/qe: add EXPORT_SYMBOL for the 2 qe_tdm functions soc/fsl/qe: only apply QE_General4 workaround on affected SoCs soc/fsl/qe: round brg_freq to 1kHz granularity soc/fsl/qe: get rid of immrbar_virt_to_phys() net: ethernet: ucc_geth: fix MEM_PART_MURAM mode powerpc/64e: Fix hang when debugging programs with relocated kernel commit ac3c4aa248c5b5390c40fad1ceb0a15a53f57a36 Merge: 0ba1c19 3e44184 Author: Linus Torvalds Date: Fri May 12 09:56:30 2017 -0700 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS updates from James Hogan: "math-emu: - Add missing clearing of BLTZALL and BGEZALL emulation counters - Fix BC1EQZ and BC1NEZ condition handling - Fix BLEZL and BGTZL identification BPF: - Add JIT support for SKF_AD_HATYPE - Use unsigned access for unsigned SKB fields - Quit clobbering callee saved registers in JIT code - Fix multiple problems in JIT skb access helpers Loongson 3: - Select MIPS_L1_CACHE_SHIFT_6 Octeon: - Remove vestiges of CONFIG_CAVIUM_OCTEON_2ND_KERNEL - Remove unused L2C types and macros. - Remove unused SLI types and macros. - Fix compile error when USB is not enabled. - Octeon: Remove unused PCIERCX types and macros. - Octeon: Clean up platform code. SNI: - Remove recursive include of cpu-feature-overrides.h Sibyte: - Export symbol periph_rev to sb1250-mac network driver. - Fix Kconfig warning. Generic platform: - Enable Root FS on NFS in generic_defconfig SMP-MT: - Use CPU interrupt controller IPI IRQ domain support UASM: - Add support for LHU for uasm. - Remove needless ISA abstraction mm: - Add 48-bit VA space and 4-level page tables for 4K pages. PCI: - Add controllers before the specified head irqchip driver for MIPS CPU: - Replace magic 0x100 with IE_SW0 - Prepare for non-legacy IRQ domains - Introduce IPI IRQ domain support MAINTAINERS: - Update email-id of Rahul Bedarkar NET: - sb1250-mac: Add missing MODULE_LICENSE() CPUFREQ: - Loongson2: drop set_cpus_allowed_ptr() Misc: - Disable Werror when W= is set - Opt into HAVE_COPY_THREAD_TLS - Enable GENERIC_CPU_AUTOPROBE - Use common outgoing-CPU-notification code - Remove dead define of ST_OFF - Remove CONFIG_ARCH_HAS_ILOG2_U{32,64} - Stengthen IPI IRQ domain sanity check - Remove confusing else statement in __do_page_fault() - Don't unnecessarily include kmalloc.h into . - Delete unused definition of SMP_CACHE_SHIFT. - Delete redundant definition of SMP_CACHE_BYTES" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (39 commits) MIPS: Sibyte: Fix Kconfig warning. MIPS: Sibyte: Export symbol periph_rev to sb1250-mac network driver. NET: sb1250-mac: Add missing MODULE_LICENSE() MAINTAINERS: Update email-id of Rahul Bedarkar MIPS: Remove confusing else statement in __do_page_fault() MIPS: Stengthen IPI IRQ domain sanity check MIPS: smp-mt: Use CPU interrupt controller IPI IRQ domain support irqchip: mips-cpu: Introduce IPI IRQ domain support irqchip: mips-cpu: Prepare for non-legacy IRQ domains irqchip: mips-cpu: Replace magic 0x100 with IE_SW0 MIPS: Remove CONFIG_ARCH_HAS_ILOG2_U{32,64} MIPS: generic: Enable Root FS on NFS in generic_defconfig MIPS: mach-rm: Remove recursive include of cpu-feature-overrides.h MIPS: Opt into HAVE_COPY_THREAD_TLS CPUFREQ: Loongson2: drop set_cpus_allowed_ptr() MIPS: uasm: Remove needless ISA abstraction MIPS: Remove dead define of ST_OFF MIPS: Use common outgoing-CPU-notification code MIPS: math-emu: Fix BC1EQZ and BC1NEZ condition handling MIPS: r2-on-r6-emu: Clear BLTZALL and BGEZALL debugfs counters ... commit 0ba1c1950c320fcfdfe3dbc7470884e4a390083c Merge: 09d79d1 e118c3f Author: Linus Torvalds Date: Fri May 12 09:53:16 2017 -0700 Merge tag 'nios2-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 Pull nios2 updates from Ley Foon Tan: "nios2 fixes/enhancements and adding nios2 R2 support" * tag 'nios2-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2: nios2: remove custom early console implementation nios2: use generic strncpy_from_user() and strnlen_user() nios2: Add CDX support nios2: Add BMX support nios2: Add NIOS2_ARCH_REVISION to select between R1 and R2 nios2: implement flush_dcache_mmap_lock/unlock nios2: enable earlycon support nios2: constify irq_domain_ops nios2: remove wrapper header for cmpxchg.h nios2: add .gitignore entries for auto-generated files commit 1c4d5f51a812a82de97beee24f48ed05c65ebda5 Author: Neil Horman Date: Fri May 12 12:00:01 2017 -0400 vmxnet3: ensure that adapter is in proper state during force_close There are several paths in vmxnet3, where settings changes cause the adapter to be brought down and back up (vmxnet3_set_ringparam among them). Should part of the reset operation fail, these paths call vmxnet3_force_close, which enables all napi instances prior to calling dev_close (with the expectation that vmxnet3_close will then properly disable them again). However, vmxnet3_force_close neglects to clear VMXNET3_STATE_BIT_QUIESCED prior to calling dev_close. As a result vmxnet3_quiesce_dev (called from vmxnet3_close), returns early, and leaves all the napi instances in a enabled state while the device itself is closed. If a device in this state is activated again, napi_enable will be called on already enabled napi_instances, leading to a BUG halt. The fix is to simply enausre that the QUIESCED bit is cleared in vmxnet3_force_close to allow quesence to be completed properly on close. Signed-off-by: Neil Horman CC: Shrikrishna Khare CC: "VMware, Inc." CC: "David S. Miller" Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_drv.c | 5 +++++ 1 file changed, 5 insertions(+) commit 42e6cae1b35b186650f5abc7b24c20ab6986c5a0 Author: Bert Kenward Date: Fri May 12 17:18:50 2017 +0100 sfc: revert changes to NIC revision numbers The revision enum values (eg EFX_REV_HUNT_A0) form part of our API, and are included in ethtool. If these are inconsistent then ethtool will print garbage for a register dump (ethtool -d). Fixes: 5a6681e22c14 ("sfc: separate out SFC4000 ("Falcon") support into new sfc-falcon driver") Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/nic.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b12ca80ca145cecadf841ba27cc061c510cd97ca Author: Johan Hovold Date: Fri May 12 12:13:26 2017 +0200 net: ch9200: add missing USB-descriptor endianness conversions Add the missing endianness conversions to a debug statement printing the USB device-descriptor idVendor and idProduct fields during probe. Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/usb/ch9200.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 75cf067953d5ee543b3bda90bbfcbee5e1f94ae8 Author: Johan Hovold Date: Fri May 12 12:11:13 2017 +0200 net: irda: irda-usb: fix firmware name on big-endian hosts Add missing endianness conversion when using the USB device-descriptor bcdDevice field to construct a firmware file name. Fixes: 8ef80aef118e ("[IRDA]: irda-usb.c: STIR421x cleanups") Cc: stable # 2.6.18 Cc: Nick Fedchik Signed-off-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/irda/irda-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9fc3e4dc67fde953fd26adb3cea8f92597810b64 Author: Gustavo A. R. Silva Date: Thu May 11 22:11:29 2017 -0500 net: dsa: mv88e6xxx: add default case to switch Add default case to switch in order to avoid any chance of using an uninitialized variable _low_, in case s->type does not match any of the listed case values. Addresses-Coverity-ID: 1398130 Suggested-by: Andrew Lunn Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 3 +++ 1 file changed, 3 insertions(+) commit dbc2b5e9a09e9a6664679a667ff81cff6e5f2641 Author: Xin Long Date: Fri May 12 14:39:52 2017 +0800 sctp: fix src address selection if using secondary addresses for ipv6 Commit 0ca50d12fe46 ("sctp: fix src address selection if using secondary addresses") has fixed a src address selection issue when using secondary addresses for ipv4. Now sctp ipv6 also has the similar issue. When using a secondary address, sctp_v6_get_dst tries to choose the saddr which has the most same bits with the daddr by sctp_v6_addr_match_len. It may make some cases not work as expected. hostA: [1] fd21:356b:459a:cf10::11 (eth1) [2] fd21:356b:459a:cf20::11 (eth2) hostB: [a] fd21:356b:459a:cf30::2 (eth1) [b] fd21:356b:459a:cf40::2 (eth2) route from hostA to hostB: fd21:356b:459a:cf30::/64 dev eth1 metric 1024 mtu 1500 The expected path should be: fd21:356b:459a:cf10::11 <-> fd21:356b:459a:cf30::2 But addr[2] matches addr[a] more bits than addr[1] does, according to sctp_v6_addr_match_len. It causes the path to be: fd21:356b:459a:cf20::11 <-> fd21:356b:459a:cf30::2 This patch is to fix it with the same way as Marcelo's fix for sctp ipv4. As no ip_dev_find for ipv6, this patch is to use ipv6_chk_addr to check if the saddr is in a dev instead. Note that for backwards compatibility, it will still do the addr_match_len check here when no optimal is found. Reported-by: Patrick Talbert Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/ipv6.c | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) commit 9459a04b6a5a09967eec94a1b66f0a74312819d9 Author: MaJun Date: Fri May 12 11:55:28 2017 +0800 irqchip/mbigen: Fix the clear register offset calculation The register array offset for clearing an interrupt is calculated by: offset = (hwirq - RESERVED_IRQ_PER_MBIGEN_CHIP) / 32; This is wrong because the clear register array includes the reserved interrupts. So the clear operation ends up in the wrong register. This went unnoticed so far, because the hardware clears the real bit through a timeout mechanism when the hardware is configured in debug mode. That debug mode was enabled on early generations of the hardware, so the problem was papered over. On newer hardware with updated firmware the debug mode was disabled, so the bits did not get cleared which causes the system to malfunction. Remove the subtraction of RESERVED_IRQ_PER_MBIGEN_CHIP, so the correct register is accessed. [ tglx: Rewrote changelog ] Fixes: a6c2f87b8820 ("irqchip/mbigen: Implement the mbigen irq chip operation functions") Signed-off-by: MaJun Signed-off-by: Hanjun Guo Acked-by: Marc Zyngier Cc: Kefeng Wang Cc: linuxarm@huawei.com Cc: Wei Yongjun Link: http://lkml.kernel.org/r/1494561328-39514-4-git-send-email-guohanjun@huawei.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-mbigen.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit ad7cc3c0c57d77b442db323056354d0e49833569 Author: Hanjun Guo Date: Fri May 12 11:55:27 2017 +0800 irqchip/mbigen: Fix potential NULL dereferencing platform_get_resource() may return NULL, add proper check to avoid potential NULL dereferencing. Signed-off-by: Hanjun Guo Acked-by: Marc Zyngier Cc: Kefeng Wang Cc: linuxarm@huawei.com Cc: Wei Yongjun Cc: MaJun Link: http://lkml.kernel.org/r/1494561328-39514-3-git-send-email-guohanjun@huawei.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-mbigen.c | 3 +++ 1 file changed, 3 insertions(+) commit 5ba9b0a14132d0b8d97affe909f324045a968d03 Author: Hanjun Guo Date: Fri May 12 11:55:26 2017 +0800 irqchip/mbigen: Fix memory mapping code Some mbigens share memory regions, and devm_ioremap_resource does not allow to share resources which will break the probe of mbigen, in opposition to devm_ioremap. This patch restores back usage of devm_ioremap function, but with proper error handling and logging. Fixes: 216646e4d82e ("irqchip/mbigen: Fix return value check in mbigen_device_probe()") Signed-off-by: Hanjun Guo Acked-by: Marc Zyngier Cc: Kefeng Wang Cc: linuxarm@huawei.com Cc: Wei Yongjun Cc: MaJun Link: http://lkml.kernel.org/r/1494561328-39514-2-git-send-email-guohanjun@huawei.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-mbigen.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 31cbee6a5611f07d2d66f55bb6f8648db5947e32 Author: Takashi Iwai Date: Thu May 11 11:14:45 2017 +0200 sound: Disable the build of OSS drivers OSS drivers are left as badly unmaintained, and now we're facing a problem to clean up the hackish set_fs() usage in their codes. Since most of drivers have been covered by ALSA, and the others are dead old and inactive, let's leave them RIP. This patch is the first step: disable the build of OSS drivers. We'll eventually drop the whole codes and clean up later. Note that sound/oss/dmasound is still kept, since it's a completely different implementation of OSS, and it doesn't suffer from set_fs() hack. Moreover, the build of ALSA is disabled on M68K by some reason, thus disabling it shall result in a regression. This one will be disabled / removed once when we add the support in ALSA side. Tested-by: Randy Dunlap Signed-off-by: Takashi Iwai sound/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 76d837a4c0f905f98088877d780169d7a14a6b29 Author: Paul Mackerras Date: Thu May 11 14:31:59 2017 +1000 KVM: PPC: Book3S PR: Don't include SPAPR TCE code on non-pseries platforms Commit e91aa8e6ecd5 ("KVM: PPC: Enable IOMMU_API for KVM_BOOK3S_64 permanently", 2017-03-22) enabled the SPAPR TCE code for all 64-bit Book 3S kernel configurations in order to simplify the code and reduce #ifdefs. However, 64-bit Book 3S PPC platforms other than pseries and powernv don't implement the necessary IOMMU callbacks, leading to build failures like the following (for a pasemi config): scripts/kconfig/conf --silentoldconfig Kconfig warning: (KVM_BOOK3S_64) selects SPAPR_TCE_IOMMU which has unmet direct dependencies (IOMMU_SUPPORT && (PPC_POWERNV || PPC_PSERIES)) ... CC [M] arch/powerpc/kvm/book3s_64_vio.o /home/paulus/kernel/kvm/arch/powerpc/kvm/book3s_64_vio.c: In function ‘kvmppc_clear_tce’: /home/paulus/kernel/kvm/arch/powerpc/kvm/book3s_64_vio.c:363:2: error: implicit declaration of function ‘iommu_tce_xchg’ [-Werror=implicit-function-declaration] iommu_tce_xchg(tbl, entry, &hpa, &dir); ^ To fix this, we make the inclusion of the SPAPR TCE support, and the code that uses it in book3s_vio.c and book3s_vio_hv.c, depend on the inclusion of support for the pseries and/or powernv platforms. This means that when running a 'pseries' guest on those platforms, the guest won't have in-kernel acceleration of the PAPR TCE hypercalls, but at least now they compile. Reviewed-by: Alexey Kardashevskiy Signed-off-by: Paul Mackerras arch/powerpc/kvm/Kconfig | 2 +- arch/powerpc/kvm/Makefile | 4 ++-- arch/powerpc/kvm/book3s_pr_papr.c | 36 +++++++++++++++++++++++++++--------- arch/powerpc/kvm/powerpc.c | 4 +++- 4 files changed, 33 insertions(+), 13 deletions(-) commit 5ddf0440a1a28f00f69ed2e093476bab3b60c2c3 Author: Song Liu Date: Thu May 11 17:03:44 2017 -0700 md/r5cache: handle sync with data in write back cache Currently, sync of raid456 array cannot make progress when hitting data in writeback r5cache. This patch fixes this issue by flushing cached data of the stripe before processing the sync request. This is achived by: 1. In handle_stripe(), do not set STRIPE_SYNCING if the stripe is in write back cache; 2. In r5c_try_caching_write(), handle the stripe in sync with write through; 3. In do_release_stripe(), make stripe in sync write out and send it to the state machine. Shaohua: explictly set STRIPE_HANDLE after write out completed Signed-off-by: Song Liu Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 8 +++++++- drivers/md/raid5.c | 21 +++++++++++++++------ 2 files changed, 22 insertions(+), 7 deletions(-) commit 70d466f760b351fe30b5f8c956354ddf29aa676b Author: Song Liu Date: Thu May 11 15:28:28 2017 -0700 md/r5cache: gracefully handle journal device errors for writeback mode For the raid456 with writeback cache, when journal device failed during normal operation, it is still possible to persist all data, as all pending data is still in stripe cache. However, it is necessary to handle journal failure gracefully. During journal failures, the following logic handles the graceful shutdown of journal: 1. raid5_error() marks the device as Faulty and schedules async work log->disable_writeback_work; 2. In disable_writeback_work (r5c_disable_writeback_async), the mddev is suspended, set to write through, and then resumed. mddev_suspend() flushes all cached stripes; 3. All cached stripes need to be flushed carefully to the RAID array. This patch fixes issues within the process above: 1. In r5c_update_on_rdev_error() schedule disable_writeback_work for journal failures; 2. In r5c_disable_writeback_async(), wait for MD_SB_CHANGE_PENDING, since raid5_error() updates superblock. 3. In handle_stripe(), allow stripes with data in journal (s.injournal > 0) to make progress during log_failed; 4. In delay_towrite(), if log failed only process data in the cache (skip new writes in dev->towrite); 5. In __get_priority_stripe(), process loprio_list during journal device failures. 6. In raid5_remove_disk(), wait for all cached stripes are flushed before calling log_exit(). Signed-off-by: Song Liu Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 11 +++++++++-- drivers/md/raid5-log.h | 3 ++- drivers/md/raid5.c | 29 +++++++++++++++++++++++------ 3 files changed, 34 insertions(+), 9 deletions(-) commit 67325e988faea735d663799b6d152b5f4254093c Author: Paul Mackerras Date: Thu May 11 11:33:30 2017 +1000 KVM: PPC: Book3S PR: Check copy_to/from_user return values The PR KVM implementation of the PAPR HPT hypercalls (H_ENTER etc.) access an image of the HPT in userspace memory using copy_from_user and copy_to_user. Recently, the declarations of those functions were annotated to indicate that the return value must be checked. Since this code doesn't currently check the return value, this causes compile warnings like the ones shown below, and since on PPC the default is to compile arch/powerpc with -Werror, this causes the build to fail. To fix this, we check the return values, and if non-zero, fail the hypercall being processed with a H_FUNCTION error return value. There is really no good error return value to use since PAPR didn't envisage the possibility that the hypervisor may not be able to access the guest's HPT, and H_FUNCTION (function not supported) seems as good as any. The typical compile warnings look like this: CC arch/powerpc/kvm/book3s_pr_papr.o /home/paulus/kernel/kvm/arch/powerpc/kvm/book3s_pr_papr.c: In function ‘kvmppc_h_pr_enter’: /home/paulus/kernel/kvm/arch/powerpc/kvm/book3s_pr_papr.c:53:2: error: ignoring return value of ‘copy_from_user’, declared with attribute warn_unused_result [-Werror=unused-result] copy_from_user(pteg, (void __user *)pteg_addr, sizeof(pteg)); ^ /home/paulus/kernel/kvm/arch/powerpc/kvm/book3s_pr_papr.c:74:2: error: ignoring return value of ‘copy_to_user’, declared with attribute warn_unused_result [-Werror=unused-result] copy_to_user((void __user *)pteg_addr, hpte, HPTE_SIZE); ^ ... etc. Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_pr_papr.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) commit acde25726bc6034b628febb8a4c6c0838736ccbf Author: Paul Mackerras Date: Wed May 10 16:39:41 2017 +1000 KVM: PPC: Book3S HV: Add radix checks in real-mode hypercall handlers POWER9 running a radix guest will take some hypervisor interrupts without going to real mode (turning off the MMU). This means that early hypercall handlers may now be called in virtual mode. Most of the handlers work just fine in both modes, but there are some that can crash the host if called in virtual mode, notably the TCE (IOMMU) hypercalls H_PUT_TCE, H_STUFF_TCE and H_PUT_TCE_INDIRECT. These already have both a real-mode and a virtual-mode version, so we arrange for the real-mode version to return H_TOO_HARD for radix guests, which will result in the virtual-mode version being called. The other hypercall which is sensitive to the MMU mode is H_RANDOM. It doesn't have a virtual-mode version, so this adds code to enable it to be called in either mode. An alternative solution was considered which would refuse to call any of the early hypercall handlers when doing a virtual-mode exit from a radix guest. However, the XICS-on-XIVE code depends on the XICS hypercalls being handled early even for virtual-mode exits, because the handlers need to be called before the XIVE vCPU state has been pulled off the hardware. Therefore that solution would have become quite invasive and complicated, and was rejected in favour of the simpler, though less elegant, solution presented here. Reviewed-by: David Gibson Tested-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_vio_hv.c | 13 +++++++++++++ arch/powerpc/kvm/book3s_hv_builtin.c | 9 ++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) commit 7b8cd3363e8a0e6b90a7067f75aaeaae61a7d612 Author: Ville Syrjälä Date: Sun May 7 20:12:52 2017 +0300 drm/i915: Make vblank evade warnings optional Add a new Kconfig option to enable/disable the extra warnings from the vblank evade code. For now we'll keep the warning about an actually missed vblank always enabled as that can have an actual user visible impact. But if we miss the deadline othrwise there's no real need to bother the user with that. We'll want these warnings enabled during development however so that we can catch regressions. Based on the reports it looks like this is still very easy to hit on SKL, so we have more work ahead of us to optimize the crtiical section further. Cc: Daniel Vetter Cc: Jani Nikula Cc: Dave Airlie Cc: Jens Axboe Cc: Linus Torvalds Cc: Maarten Lankhorst Reported-by: Jens Axboe Reported-by: Linus Torvalds Fixes: e1edbd44e23b ("drm/i915: Complain if we take too long under vblank evasion.") Signed-off-by: Ville Syrjälä Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie drivers/gpu/drm/i915/Kconfig.debug | 13 +++++++++++++ drivers/gpu/drm/i915/intel_sprite.c | 7 +++++-- 2 files changed, 18 insertions(+), 2 deletions(-) commit bb57d0411a41f525c88f0ca3cc29936e0b879a1b Merge: 7ec2723 e4311ee Author: Dave Airlie Date: Fri May 12 14:25:22 2017 +1000 Merge branch 'linux-4.12' of git://github.com/skeggsb/linux into drm-next Quite a few patches, but not much code changed: - Fixes regression from atomic when only the source rect of a plane changes (ie. xrandr --right-of) - Fixes another issue where atomic changed behaviour underneath us, potentially causing laggy cursor position updates - Fixes for a bunch of races in thermal code, which lead to random lockups for a lot of users * 'linux-4.12' of git://github.com/skeggsb/linux: drm/nouveau/therm: remove ineffective workarounds for alarm bugs drm/nouveau/tmr: avoid processing completed alarms when adding a new one drm/nouveau/tmr: fix corruption of the pending list when rescheduling an alarm drm/nouveau/tmr: handle races with hw when updating the next alarm time drm/nouveau/tmr: ack interrupt before processing alarms drm/nouveau/core: fix static checker warning drm/nouveau/fb/ram/gf100-: remove 0x10f200 read drm/nouveau/kms/nv50: skip core channel cursor update on position-only changes drm/nouveau/kms/nv50: fix source-rect-only plane updates drm/nouveau/kms/nv50: remove pointless argument to window atomic_check_acquire() commit 7ec27233e62b5efe795563896577de5340dc7473 Merge: bab1e2f afa3187 Author: Dave Airlie Date: Fri May 12 13:58:29 2017 +1000 Merge branch 'drm-next-4.12' of git://people.freedesktop.org/~agd5f/linux into drm-next Fixes for 4.12. This is a bit bigger than usual since it's 3 weeks worth of fixes and most of these changes are for vega10 which is new for 4.12 and still in a fair amount of flux. It looks like you missed my last pull request, so those patches are included here as well. Highlights: - Lots of vega10 fixes - Fix interruptable wait mixup - Fan control method fixes - Misc display fixes for radeon and amdgpu - Misc bug fixes * 'drm-next-4.12' of git://people.freedesktop.org/~agd5f/linux: (132 commits) drm/amd/powerplay: refine pwm1_enable callback functions for CI. drm/amd/powerplay: refine pwm1_enable callback functions for vi. drm/amd/powerplay: refine pwm1_enable callback functions for Vega10. drm/amdgpu: refine amdgpu pwm1_enable sysfs interface. drm/amdgpu: add amd fan ctrl mode enums. drm/amd/powerplay: add more smu message on Vega10. drm/amdgpu: fix dependency issue drm/amd: fix init order of sched job drm/amdgpu: add some additional vega10 pci ids drm/amdgpu/soc15: use atomfirmware for setting bios scratch for reset drm/amdgpu/atomfirmware: add function to update engine hang status drm/radeon: only warn once in radeon_ttm_bo_destroy if va list not empty drm/amdgpu: fix mutex list null pointer reference drm/amd/powerplay: fix bug sclk/mclk level can't be set on vega10. drm/amd/powerplay: Setup sw CTF to allow graceful exit when temperature exceeds maximum. drm/amd/powerplay: delete dead code in powerplay. drm/amdgpu: Use less generic enum definitions drm/amdgpu/gfx9: derive tile pipes from golden settings drm/amdgpu/gfx: drop max_gs_waves_per_vgt drm/amd/powerplay: disable engine spread spectrum feature on Vega10. ... commit bab1e2fe4b82a853076e6752a49a456244110f8b Merge: 09d79d1 e345da8 Author: Dave Airlie Date: Fri May 12 13:57:20 2017 +1000 Merge tag 'drm-misc-next-fixes-2017-05-05' of git://anongit.freedesktop.org/git/drm-misc into drm-next Core Changes: - Add quirk for LGD 764 panel to default 10bpc (Mario) Cc: Mario Kleiner * tag 'drm-misc-next-fixes-2017-05-05' of git://anongit.freedesktop.org/git/drm-misc: drm/edid: Add 10 bpc quirk for LGD 764 panel in HP zBook 17 G2 commit 48ae8484e9fc324b4968d33c585e54bc98e44d61 Author: Johannes Thumshirn Date: Wed May 10 09:53:40 2017 +0200 scsi: sg: don't return bogus Sg_requests If the list search in sg_get_rq_mark() fails to find a valid request, we return a bogus element. This then can later lead to a GPF in sg_remove_scat(). So don't return bogus Sg_requests in sg_get_rq_mark() but NULL in case the list search doesn't find a valid request. Signed-off-by: Johannes Thumshirn Reported-by: Andrey Konovalov Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Doug Gilbert Reviewed-by: Hannes Reinecke Acked-by: Doug Gilbert Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ed44fd7fd8a6785b73cfc6d44594c434e578d724 Author: Damien Le Moal Date: Mon May 8 15:48:19 2017 +0900 scsi: sd: Write lock zone for REQ_OP_WRITE_ZEROES For a zoned block device, sd_zbc_complete() handles zone write unlock on completion of a REQ_OP_WRITE_ZEROES command but the zone write locking is missing from sd_setup_write_zeroes_cmnd(). This patch fixes this problem by locking the target zone of a REQ_OP_WRITE_ZEROES request. Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 29f6ca6916e29fc46f1418885374d9ed50430687 Author: Damien Le Moal Date: Mon May 8 14:59:02 2017 +0900 scsi: sd: Unlock zone in case of error in sd_setup_write_same_cmnd() scsi_io_init() may fail, leaving a zone of a zoned block device locked. Fix this by properly unlocking the write same request target zone if scsi_io_init() fails. Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 4 ++++ 1 file changed, 4 insertions(+) commit df0c8d911abf6ba97b2c2fc3c5a12769e0b081a3 Author: Florian Fainelli Date: Thu May 11 11:24:16 2017 -0700 net: phy: Call bus->reset() after releasing PHYs from reset The API convention makes it that a given MDIO bus reset should be able to access PHY devices in its reset() callback and perform additional MDIO accesses in order to bring the bus and PHYs in a working state. Commit 69226896ad63 ("mdio_bus: Issue GPIO RESET to PHYs.") broke that contract by first calling bus->reset() and then release all PHYs from reset using their shared GPIO line, so restore the expected functionality here. Fixes: 69226896ad63 ("mdio_bus: Issue GPIO RESET to PHYs.") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/mdio_bus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6832a333ed4a7cc4fcb170c045d1d96d0976fdd4 Author: David S. Miller Date: Thu May 11 19:30:02 2017 -0700 bpf: Handle multiple variable additions into packet pointers in verifier. We must accumulate into reg->aux_off rather than use a plain assignment. Add a test for this situation to test_align. Reported-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 2 +- tools/testing/selftests/bpf/test_align.c | 37 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) commit 844cf763fba654436d3a4279b6a672c196cf1901 Author: Jon Paul Maloy Date: Thu May 11 20:28:15 2017 +0200 tipc: make macro tipc_wait_for_cond() smp safe The macro tipc_wait_for_cond() is embedding the macro sk_wait_event() to fulfil its task. The latter, in turn, is evaluating the stated condition outside the socket lock context. This is problematic if the condition is accessing non-trivial data structures which may be altered by incoming interrupts, as is the case with the cong_links() linked list, used by socket to keep track of the current set of congested links. We sometimes see crashes when this list is accessed by a condition function at the same time as a SOCK_WAKEUP interrupt is removing an element from the list. We fix this by expanding selected parts of sk_wait_event() into the outer macro, while ensuring that all evaluations of a given condition are performed under socket lock protection. Fixes: commit 365ad353c256 ("tipc: reduce risk of user starvation during link congestion") Reviewed-by: Parthasarathy Bhuvaragan Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit ad990dbe6d3ac3af1f5f4484b1126b9fc601e98a Author: Andy Gospodarek Date: Thu May 11 15:52:30 2017 -0400 samples/bpf: run cleanup routines when receiving SIGTERM Shahid Habib noticed that when xdp1 was killed from a different console the xdp program was not cleaned-up properly in the kernel and it continued to forward traffic. Most of the applications in samples/bpf cleanup properly, but only when getting SIGINT. Since kill defaults to using SIGTERM, add support to cleanup when the application receives either SIGINT or SIGTERM. Signed-off-by: Andy Gospodarek Reported-by: Shahid Habib Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/cookie_uid_helper_example.c | 4 +++- samples/bpf/offwaketime_user.c | 1 + samples/bpf/sampleip_user.c | 1 + samples/bpf/trace_event_user.c | 1 + samples/bpf/tracex2_user.c | 1 + samples/bpf/xdp1_user.c | 1 + samples/bpf/xdp_tx_iptunnel_user.c | 1 + 7 files changed, 9 insertions(+), 1 deletion(-) commit d2be3667f3769b3c60aa294ef7f2b03d1b16559c Author: Colin Ian King Date: Thu May 11 19:29:40 2017 +0100 ethernet: aquantia: remove redundant checks on error status The error status err is initialized as zero and then being checked several times to see if it is less than zero even when it has not been updated. It may seem that the err should be assigned to the return code of the call to the various *offload_en_set calls and then we check for failure, however, these functions are void and never actually return any status. Since these error checks are redundant we can remove these as well as err and the error exit label err_exit. Detected by CoverityScan, CID#1398313 and CID#1398306 ("Logically dead code") Signed-off-by: Colin Ian King Reviewed-by: Lino Sanfilippo Acked-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 13 +------------ drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 12 +----------- 2 files changed, 2 insertions(+), 23 deletions(-) commit 69a73e744db1a57175039e3d1e6ef3913e816eb8 Author: David S. Miller Date: Thu May 11 21:41:09 2017 -0400 bpf: Remove commented out debugging hack in test_align. Reported-by: Alexander Alemayhu Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_align.c | 1 - 1 file changed, 1 deletion(-) commit 34e934b9f94552fe0274dda9849e194197eab8e6 Merge: d86b567 33c16bf Author: David S. Miller Date: Thu May 11 21:39:53 2017 -0400 Merge branch 'qlcnic-fixes' Manish Chopra says: ==================== qlcnic: Bug fix and update version This series has one fix and bumps up driver version. Please consider applying to "net" ==================== Signed-off-by: David S. Miller commit 33c16bfd5bc00bbb9823d25af46c496966e0ac0d Author: Chopra, Manish Date: Thu May 11 07:12:48 2017 -0700 qlcnic: Update version to 5.3.66 Bumping up the version as couple of fixes added after 5.3.65 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 f9c3fe2f43343be7972226c2e736e7a68e383dc1 Author: Chopra, Manish Date: Thu May 11 07:12:47 2017 -0700 qlcnic: Fix link configuration with autoneg disabled Currently driver returns error on speed configurations for 83xx adapter's non XGBE ports, due to this link doesn't come up on the ports using 1000Base-T as a connector with autoneg disabled. This patch fixes this with initializing appropriate port type based on queried module/connector types from hardware before any speed/autoneg configuration. Signed-off-by: Manish Chopra Signed-off-by: David S. Miller .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 34 ++++++++++++++++++++++ .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h | 1 + .../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 3 ++ 3 files changed, 38 insertions(+) commit d86b5672b1adb98b4cdd6fbf0224bbfb03db6e2e Author: Vitaly Kuznetsov Date: Thu May 11 13:58:06 2017 +0200 xen-netfront: avoid crashing on resume after a failure in talk_to_netback() Unavoidable crashes in netfront_resume() and netback_changed() after a previous fail in talk_to_netback() (e.g. when we fail to read MAC from xenstore) were discovered. The failure path in talk_to_netback() does unregister/free for netdev but we don't reset drvdata and we try accessing it after resume. Fix the bug by removing the whole xen device completely with device_unregister(), this guarantees we won't have any calls into netfront after a failure. Signed-off-by: Vitaly Kuznetsov Signed-off-by: David S. Miller drivers/net/xen-netfront.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cb395b2010879a8461aa1b1c37025769708c32cf Author: Eric Dumazet Date: Wed May 10 21:59:28 2017 -0700 net: sched: optimize class dumps In commit 59cc1f61f09c ("net: sched: convert qdisc linked list to hashtable") we missed the opportunity to considerably speed up tc_dump_tclass_root() if a qdisc handle is provided by user. Instead of iterating all the qdiscs, use qdisc_match_from_root() to directly get the one we look for. Signed-off-by: Eric Dumazet Cc: Jiri Kosina Cc: Jamal Hadi Salim Cc: Cong Wang Cc: Jiri Pirko Signed-off-by: David S. Miller net/sched/sch_api.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b451e5d24ba6687c6f0e7319c727a709a1846c06 Author: Yuchung Cheng Date: Wed May 10 17:01:27 2017 -0700 tcp: avoid fragmenting peculiar skbs in SACK This patch fixes a bug in splitting an SKB during SACK processing. Specifically if an skb contains multiple packets and is only partially sacked in the higher sequences, tcp_match_sack_to_skb() splits the skb and marks the second fragment as SACKed. The current code further attempts rounding up the first fragment to MSS boundaries. But it misses a boundary condition when the rounded-up fragment size (pkt_len) is exactly skb size. Spliting such an skb is pointless and causses a kernel warning and aborts the SACK processing. This patch universally checks such over-split before calling tcp_fragment to prevent these unnecessary warnings. Fixes: adb92db857ee ("tcp: Make SACK code to split only at mss boundaries") Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit f6ba8d33cfbb46df569972e64dbb5bb7e929bfd9 Author: Eric Dumazet Date: Thu May 11 15:24:41 2017 -0700 netem: fix skb_orphan_partial() I should have known that lowering skb->truesize was dangerous :/ In case packets are not leaving the host via a standard Ethernet device, but looped back to local sockets, bad things can happen, as reported by Michael Madsen ( https://bugzilla.kernel.org/show_bug.cgi?id=195713 ) So instead of tweaking skb->truesize, lets change skb->destructor and keep a reference on the owner socket via its sk_refcnt. Fixes: f2f872f9272a ("netem: Introduce skb_orphan_partial() helper") Signed-off-by: Eric Dumazet Reported-by: Michael Madsen Signed-off-by: David S. Miller net/core/sock.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 4e3c60ed2f594e4ec6bb81d71ef6993e60f740d8 Merge: 0a5539f d67b9cd Author: David S. Miller Date: Thu May 11 21:30:58 2017 -0400 Merge branch 'generic-xdp-followups' Daniel Borkmann says: ==================== Two generic xdp related follow-ups Two follow-ups for the generic XDP API, would be great if both could still be considered, since the XDP API is not frozen yet. For details please see individual patches. v1 -> v2: - Implemented feedback from Jakub Kicinski (reusing attribute on dump), thanks! - Rest as is. ==================== Signed-off-by: David S. Miller commit d67b9cd28c1d7f82c2e5e727731ea7c89b23a0a8 Author: Daniel Borkmann Date: Fri May 12 01:04:46 2017 +0200 xdp: refine xdp api with regards to generic xdp While working on the iproute2 generic XDP frontend, I noticed that as of right now it's possible to have native *and* generic XDP programs loaded both at the same time for the case when a driver supports native XDP. The intended model for generic XDP from b5cdae3291f7 ("net: Generic XDP") is, however, that only one out of the two can be present at once which is also indicated as such in the XDP netlink dump part. The main rationale for generic XDP is to ease accessibility (in case a driver does not yet have XDP support) and to generically provide a semantical model as an example for driver developers wanting to add XDP support. The generic XDP option for an XDP aware driver can still be useful for comparing and testing both implementations. However, it is not intended to have a second XDP processing stage or layer with exactly the same functionality of the first native stage. Only reason could be to have a partial fallback for future XDP features that are not supported yet in the native implementation and we probably also shouldn't strive for such fallback and instead encourage native feature support in the first place. Given there's currently no such fallback issue or use case, lets not go there yet if we don't need to. Therefore, change semantics for loading XDP and bail out if the user tries to load a generic XDP program when a native one is present and vice versa. Another alternative to bailing out would be to handle the transition from one flavor to another gracefully, but that would require to bring the device down, exchange both types of programs, and bring it up again in order to avoid a tiny window where a packet could hit both hooks. Given this complicates the logic for just a debugging feature in the native case, I went with the simpler variant. For the dump, remove IFLA_XDP_FLAGS that was added with b5cdae3291f7 and reuse IFLA_XDP_ATTACHED for indicating the mode. Dumping all or just a subset of flags that were used for loading the XDP prog is suboptimal in the long run since not all flags are useful for dumping and if we start to reuse the same flag definitions for load and dump, then we'll waste bit space. What we really just want is to dump the mode for now. Current IFLA_XDP_ATTACHED semantics are: nothing was installed (0), a program is running at the native driver layer (1). Thus, add a mode that says that a program is running at generic XDP layer (2). Applications will handle this fine in that older binaries will just indicate that something is attached at XDP layer, effectively this is similar to IFLA_XDP_FLAGS attr that we would have had modulo the redundancy. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/netdevice.h | 8 +++++-- include/uapi/linux/if_link.h | 7 ++++++ net/core/dev.c | 55 +++++++++++++++++++++++++++++--------------- net/core/rtnetlink.c | 40 +++++++++++++++----------------- 4 files changed, 67 insertions(+), 43 deletions(-) commit 0489df9a430e9607de8130a6bc4bf4c02f96eaf1 Author: Daniel Borkmann Date: Fri May 12 01:04:45 2017 +0200 xdp: add flag to enforce driver mode After commit b5cdae3291f7 ("net: Generic XDP") we automatically fall back to a generic XDP variant if the driver does not support native XDP. Allow for an option where the user can specify that always the native XDP variant should be selected and in case it's not supported by a driver, just bail out. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/if_link.h | 6 ++++-- net/core/dev.c | 2 ++ net/core/rtnetlink.c | 5 +++++ samples/bpf/xdp1_user.c | 8 ++++++-- samples/bpf/xdp_tx_iptunnel_user.c | 7 ++++++- 5 files changed, 23 insertions(+), 5 deletions(-) commit 3af9256150b3ecc597c5428711f87ce105d1d58e Author: Arnd Bergmann Date: Thu May 11 10:14:06 2017 -0700 Input: cros_ec_keyb - remove extraneous 'const' gcc-7 warns about 'const SIMPLE_DEV_PM_OPS', as that macro already contains a 'const' keyword: drivers/input/keyboard/cros_ec_keyb.c:663:14: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier] static const SIMPLE_DEV_PM_OPS(cros_ec_keyb_pm_ops, NULL, cros_ec_keyb_resume); This removes the extra one. Fixes: 6af6dc2d2aa6 ("input: Add ChromeOS EC keyboard driver") Signed-off-by: Arnd Bergmann Signed-off-by: Dmitry Torokhov drivers/input/keyboard/cros_ec_keyb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4311ee51d1e2676001b2d8fcefd92bdd79aad85 Author: Ben Skeggs Date: Thu May 11 17:33:39 2017 +1000 drm/nouveau/therm: remove ineffective workarounds for alarm bugs These were ineffective due to touching the list without the alarm lock, but should no longer be required. Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/therm/fantog.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 330bdf62fe6a6c5b99a647f7bf7157107c9348b3 Author: Ben Skeggs Date: Thu May 11 17:13:29 2017 +1000 drm/nouveau/tmr: avoid processing completed alarms when adding a new one The idea here was to avoid having to "manually" program the HW if there's a new earliest alarm. This was lazy and bad, as it leads to loads of fun races between inter-related callers (ie. therm). Turns out, it's not so difficult after all. Go figure ;) Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 9fc64667ee48c9a25e7dca1a6bcb6906fec5bcc5 Author: Ben Skeggs Date: Thu May 11 17:03:05 2017 +1000 drm/nouveau/tmr: fix corruption of the pending list when rescheduling an alarm At least therm/fantog "attempts" to work around this issue, which could lead to corruption of the pending alarm list. Fix it properly by not updating the timestamp without the lock held, or trying to add an already pending alarm to the pending alarm list.... Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 1b0f84380b10ee97f7d2dd191294de9017e94d1d Author: Ben Skeggs Date: Thu May 11 17:19:48 2017 +1000 drm/nouveau/tmr: handle races with hw when updating the next alarm time If the time to the next alarm is short enough, we could race with HW and end up with an ~4 second delay until it triggers. Fix this by checking again after we update HW. Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c | 26 +++++++++++++++--------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 3733bd8b407211739e72d051e5f30ad82a52c4bc Author: Ben Skeggs Date: Thu May 11 16:53:42 2017 +1000 drm/nouveau/tmr: ack interrupt before processing alarms Fixes a race where we can miss an alarm that triggers while we're already processing previous alarms. Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nvkm/subdev/timer/nv04.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89ed10a5721d569b053a8355c1a6bd812fed7c29 Author: Ben Skeggs Date: Thu May 4 17:29:03 2017 +1000 drm/nouveau/core: fix static checker warning object->engine cannot be NULL, it's either valid, or an error pointer. This particular condition shouldn't actually be possible, but just in case, we'll keep it. Reported-by: Dan Carpenter Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/core/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80a92865f2113fe8bc268218b0c4156cfab4c9ac Author: Ben Skeggs Date: Tue Mar 28 11:46:37 2017 +1000 drm/nouveau/fb/ram/gf100-: remove 0x10f200 read This reg has moved on Pascal, and causes a bus fault. We never use the value anyway, so just remove the read. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 1 - 1 file changed, 1 deletion(-) commit 23b245c04d0ef408087430dd4d1b214a5da1eb78 Author: Shaohua Li Date: Wed May 10 08:47:11 2017 -0700 md/raid1/10: avoid unnecessary locking If we add bios to block plugging list, locking is unnecessry, since the block unplug is guaranteed not to run at that time. Reviewed-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid1.c | 7 +++---- drivers/md/raid10.c | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) commit e6db95799b1b870aae15682a6d0898df9e9dfb38 Author: Ben Skeggs Date: Mon May 1 16:53:40 2017 +1000 drm/nouveau/kms/nv50: skip core channel cursor update on position-only changes The DRM core used to only call prepare_fb/cleanup_fb() when a plane's framebuffer changed, which achieved the desired effect. It's apparently now up to the driver to decide on its own. Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org [4.11+] drivers/gpu/drm/nouveau/nv50_display.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 36601c2b36e27435d9be33cfa092120ff69914eb Author: Ben Skeggs Date: Mon May 1 16:52:03 2017 +1000 drm/nouveau/kms/nv50: fix source-rect-only plane updates This "optimisation" (which was originally meant to skip updating cursor settings in the core channel on position-only updates) turned out to be pointless in the final design of the code before it was merged. Remove it completely, as it breaks other cases. Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org [4.10+] drivers/gpu/drm/nouveau/nv50_display.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit f42c5707f9344a2e30128cde5ca2a02775e58994 Author: Ben Skeggs Date: Mon May 1 16:59:29 2017 +1000 drm/nouveau/kms/nv50: remove pointless argument to window atomic_check_acquire() Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nv50_display.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 0a5539f66133a02b24f9cc43da5b84b7e6f3f436 Author: David S. Miller Date: Thu May 11 12:00:50 2017 -0700 bpf: Provide a linux/types.h override for bpf selftests. We do not want to use the architecture's type.h header when building BPF programs which are always 64-bit. Signed-off-by: David S. Miller tools/testing/selftests/bpf/Makefile | 3 ++- tools/testing/selftests/bpf/include/uapi/linux/types.h | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 09d79d103371b1b7ea70ea7f9c05ac207ef22f5d Merge: e47b40a 25a0da7 Author: Linus Torvalds Date: Thu May 11 11:29:52 2017 -0700 Merge tag 'docs-4.12-2' of git://git.lwn.net/linux Pull more documentation updates from Jonathan Corbet: "Connect the newly RST-formatted documentation to the rest; this had to wait until the input pull was done. There's also a few small fixes that wandered in" * tag 'docs-4.12-2' of git://git.lwn.net/linux: doc: replace FTP URL to kernel.org with HTTPS one docs: update references to the device io book Documentation: earlycon: fix Marvell Armada 3700 UART name docs-rst: add input docs at main index and use kernel-figure commit e47b40a235e9552bc48e4c73c53854ce734da661 Merge: 4892c6f 0c2cf6d Author: Linus Torvalds Date: Thu May 11 11:27:54 2017 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull more arm64 updates from Catalin Marinas: - Silence module allocation failures when CONFIG_ARM*_MODULE_PLTS is enabled. This requires a check for __GFP_NOWARN in alloc_vmap_area() - Improve/sanitise user tagged pointers handling in the kernel - Inline asm fixes/cleanups * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Silence first allocation with CONFIG_ARM64_MODULE_PLTS=y ARM: Silence first allocation with CONFIG_ARM_MODULE_PLTS=y mm: Silence vmap() allocation failures based on caller gfp_flags arm64: uaccess: suppress spurious clang warning arm64: atomic_lse: match asm register sizes arm64: armv8_deprecated: ensure extension of addr arm64: uaccess: ensure extension of access_ok() addr arm64: ensure extension of smp_store_release value arm64: xchg: hazard against entire exchange variable arm64: documentation: document tagged pointer stack constraints arm64: entry: improve data abort handling of tagged pointers arm64: hw_breakpoint: fix watchpoint matching for tagged pointers arm64: traps: fix userspace cache maintenance emulation on a tagged pointer commit 228b0324fe61781c8a6939032da644e677f6d01b Merge: d8b5411 18b3ad9 Author: David S. Miller Date: Thu May 11 14:19:10 2017 -0400 Merge branch 'bpf-pkt-ptr-align' David S. Miller says: ==================== bpf: Add alignment tracker to verifier. First we add the alignment tracking logic to the verifier. Next, we work on building up infrastructure to facilitate regression testing of this facility. Finally, we add the "test_align" test case. ==================== Signed-off-by: David S. Miller commit 18b3ad90b64e9893297357608abddd26170730eb Author: David S. Miller Date: Wed May 10 11:43:51 2017 -0700 bpf: Add verifier test case for alignment. Signed-off-by: David S. Miller Acked-by: Daniel Borkmann tools/testing/selftests/bpf/Makefile | 3 +- tools/testing/selftests/bpf/test_align.c | 417 +++++++++++++++++++++++++++++++ 2 files changed, 419 insertions(+), 1 deletion(-) commit 91045f5e5238a6d2ad21d41d7e86e2fa65f90d76 Author: David S. Miller Date: Wed May 10 11:42:48 2017 -0700 bpf: Add bpf_verify_program() to the library. This allows a test case to load a BPF program and unconditionally acquire the verifier log. It also allows specification of the strict alignment flag. Signed-off-by: David S. Miller Acked-by: Daniel Borkmann tools/lib/bpf/bpf.c | 22 ++++++++++++++++++++++ tools/lib/bpf/bpf.h | 4 ++++ 2 files changed, 26 insertions(+) commit e07b98d9bffe410019dfcf62c3428d4a96c56a2c Author: David S. Miller Date: Wed May 10 11:38:07 2017 -0700 bpf: Add strict alignment flag for BPF_PROG_LOAD. Add a new field, "prog_flags", and an initial flag value BPF_F_STRICT_ALIGNMENT. When set, the verifier will enforce strict pointer alignment regardless of the setting of CONFIG_EFFICIENT_UNALIGNED_ACCESS. The verifier, in this mode, will also use a fixed value of "2" in place of NET_IP_ALIGN. This facilitates test cases that will exercise and validate this part of the verifier even when run on architectures where alignment doesn't matter. Signed-off-by: David S. Miller Acked-by: Daniel Borkmann include/linux/bpf_verifier.h | 1 + include/uapi/linux/bpf.h | 8 ++++++++ kernel/bpf/syscall.c | 5 ++++- kernel/bpf/verifier.c | 23 +++++++++++++++++------ tools/build/feature/test-bpf.c | 1 + tools/include/uapi/linux/bpf.h | 11 +++++++++-- 6 files changed, 40 insertions(+), 9 deletions(-) commit c5fc9692d101d1318b0f53f9f691cd88ac029317 Author: David S. Miller Date: Wed May 10 11:25:17 2017 -0700 bpf: Do per-instruction state dumping in verifier when log_level > 1. If log_level > 1, do a state dump every instruction and emit it in a more compact way (without a leading newline). This will facilitate more sophisticated test cases which inspect the verifier log for register state. Signed-off-by: David S. Miller Acked-by: Daniel Borkmann kernel/bpf/verifier.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d1174416747d790d750742d0514915deeed93acf Author: David S. Miller Date: Wed May 10 11:22:52 2017 -0700 bpf: Track alignment of register values in the verifier. Currently if we add only constant values to pointers we can fully validate the alignment, and properly check if we need to reject the program on !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS architectures. However, once an unknown value is introduced we only allow byte sized memory accesses which is too restrictive. Add logic to track the known minimum alignment of register values, and propagate this state into registers containing pointers. The most common paradigm that makes use of this new logic is computing the transport header using the IP header length field. For example: struct ethhdr *ep = skb->data; struct iphdr *iph = (struct iphdr *) (ep + 1); struct tcphdr *th; ... n = iph->ihl; th = ((void *)iph + (n * 4)); port = th->dest; The existing code will reject the load of th->dest because it cannot validate that the alignment is at least 2 once "n * 4" is added the the packet pointer. In the new code, the register holding "n * 4" will have a reg->min_align value of 4, because any value multiplied by 4 will be at least 4 byte aligned. (actually, the eBPF code emitted by the compiler in this case is most likely to use a shift left by 2, but the end result is identical) At the critical addition: th = ((void *)iph + (n * 4)); The register holding 'th' will start with reg->off value of 14. The pointer addition will transform that reg into something that looks like: reg->aux_off = 14 reg->aux_off_align = 4 Next, the verifier will look at the th->dest load, and it will see a load offset of 2, and first check: if (reg->aux_off_align % size) which will pass because aux_off_align is 4. reg_off will be computed: reg_off = reg->off; ... reg_off += reg->aux_off; plus we have off==2, and it will thus check: if ((NET_IP_ALIGN + reg_off + off) % size != 0) which evaluates to: if ((NET_IP_ALIGN + 14 + 2) % size != 0) On strict alignment architectures, NET_IP_ALIGN is 2, thus: if ((2 + 14 + 2) % size != 0) which passes. These pointer transformations and checks work regardless of whether the constant offset or the variable with known alignment is added first to the pointer register. Signed-off-by: David S. Miller Acked-by: Daniel Borkmann include/linux/bpf_verifier.h | 3 ++ kernel/bpf/verifier.c | 108 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 92 insertions(+), 19 deletions(-) commit 4892c6f72e4b335b162edadbefc5378cea4f0ee1 Merge: 55a1ab5 34bf129 Author: Linus Torvalds Date: Thu May 11 11:12:26 2017 -0700 Merge tag 'fbdev-v4.12' of git://github.com/bzolnier/linux Pull fbdev updates from Bartlomiej Zolnierkiewicz: "There is nothing really major here, just a couple of small bugfixes, improvements and cleanups. - fix handling of probing errors in omapfb (Arvind Yadav) - remove incorrect __exit markups in few drivers (Dmitry Torokhov) - fix boot time logo support for drivers using deferred probe (Takeshi Kihara) - fix DMA allocation size for ARM CLCD driver (Liam Beguin) - add support for specifying size via xenstore in xen-frontfb (Juergen Gross) - support for AUS mode in imxfb driver (Martin Kaiser) - fix buffer on stack usage in udlfb driver (Maksim Salau) - probe failure path fixup in sm501fb driver (Alexey Khoroshilov) - fix config dependency loop for stifb driver (Arnd Bergmann) - misc cleanups (Joe Perches, Christophe Leroy, Karim Eshapa, Pushkar Jambhlekar)" * tag 'fbdev-v4.12' of git://github.com/bzolnier/linux: fbdev: sti: don't select CONFIG_VT drivers/video/fbdev/omap/lcd_mipid.c: Use time comparison kernel macros sm501fb: don't return zero on failure path in sm501fb_start() video: fbdev: udlfb: Fix buffer on stack video: console: Remove reference to CONFIG_8xx dt-bindings: display: imx: entry for AUS mode video: fbdev: imxfb: support AUS mode drivers/video/fbdev: Fixing coding guidelines in acornfb.c xen, fbfront: add support for specifying size via xenstore video: ARM CLCD: fix dma allocation size drivers/video: Convert remaining uses of pr_warning to pr_warn video/logo: tidyup fb_logo_late_init initcall timing video: fbdev: i810: remove incorrect __exit markups video: fbdev: pmag-aa-fb: remove incorrect __exit markups video: fbdev: pmagb-b-fb: remove incorrect __exit markups video: fbdev: pmag-ba-fb: remove incorrect __exit markups omapfb: dss: Handle return errors in dss_init_ports() commit 55a1ab56c7981ab84373f372a4df75e3ee1535a7 Merge: 9786e34 ed6565e Author: Linus Torvalds Date: Thu May 11 11:01:56 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A smaller collection of fixes that should go into -rc1. This contains: - A fix from Christoph, fixing a regression with the WRITE_SAME and partial completions. Caused a BUG() on ppc. - Fixup for __blk_mq_stop_hw_queues(), it should be static. From Colin. - Removal of dmesg error messages on elevator switching, when invoked from sysfs. From me. - Fix for blk-stat, using this_cpu_ptr() in a section only protected by rcu_read_lock(). This breaks when PREEMPT_RCU is enabled. From me. - Two fixes for BFQ from Paolo, one fixing a crash and one updating the documentation. - An error handling lightnvm memory leak, from Rakesh. - The previous blk-mq hot unplug lock reversal depends on the CPU hotplug rework that isn't in mainline yet. This caused a lockdep splat when people unplugged CPUs with blk-mq devices. From Wanpeng. - A regression fix for DIF/DIX on blk-mq. From Wen" * 'for-linus' of git://git.kernel.dk/linux-block: block: handle partial completions for special payload requests blk-mq: NVMe 512B/4K+T10 DIF/DIX format returns I/O error on dd with split op blk-stat: don't use this_cpu_ptr() in a preemptable section elevator: remove redundant warnings on IO scheduler switch block, bfq: stress that low_latency must be off to get max throughput block, bfq: use pointer entity->sched_data only if set nvme: lightnvm: fix memory leak blk-mq: make __blk_mq_stop_hw_queues static lightnvm: remove unused rq parameter of nvme_nvm_rqtocmd() to kill warning block/mq: fix potential deadlock during cpu hotplug commit 25a0da73f24c95d57381bedd9cd89e4929b1bfde Author: Michael Heimpold Date: Thu May 11 10:13:44 2017 +0200 doc: replace FTP URL to kernel.org with HTTPS one FTP services were shutdown some weeks ago, so the FTP URL does not work anymore. Fix this by replacing it with corresponding HTTPS URL. Signed-off-by: Michael Heimpold Signed-off-by: Jonathan Corbet Documentation/admin-guide/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9786e34e0a6055dbd1b46e16dfa791ac2b3da289 Merge: 791a9a6 a940288 Author: Linus Torvalds Date: Thu May 11 10:44:22 2017 -0700 Merge tag 'for-linus-20170510' of git://git.infradead.org/linux-mtd Pull MTD updates from Brian Norris: "NAND, from Boris: - some minor fixes/improvements on existing drivers (fsmc, gpio, ifc, davinci, brcmnand, omap) - a huge cleanup/rework of the denali driver accompanied with core fixes/improvements to simplify the driver code - a complete rewrite of the atmel driver to support new DT bindings make future evolution easier - the addition of per-vendor detection/initialization steps to avoid extending the nand_ids table with more extended-id entries SPI NOR, from Cyrille: - fixes in the hisi, intel and Mediatek SPI controller drivers - fixes to some SPI flash memories not supporting the Chip Erase command. - add support to some new memory parts (Winbond, Macronix, Micron, ESMT). - add new driver for the STM32 QSPI controller And a few fixes for Gemini and Versatile platforms on physmap-of" * tag 'for-linus-20170510' of git://git.infradead.org/linux-mtd: (100 commits) MAINTAINERS: Update NAND subsystem git repositories mtd: nand: gpio: update binding mtd: nand: add ooblayout for old hamming layout mtd: oxnas_nand: Allocating more than necessary in probe() dt-bindings: mtd: Document the STM32 QSPI bindings mtd: mtk-nor: set controller's address width according to nor flash mtd: spi-nor: add driver for STM32 quad spi flash controller mtd: nand: brcmnand: Check flash #WP pin status before nand erase/program mtd: nand: davinci: add comment on NAND subpage write status on keystone mtd: nand: omap2: Fix partition creation via cmdline mtdparts mtd: nand: NULL terminate a of_device_id table mtd: nand: Fix a couple error codes mtd: nand: allow drivers to request minimum alignment for passed buffer mtd: nand: allocate aligned buffers if NAND_OWN_BUFFERS is unset mtd: nand: denali: allow to override revision number mtd: nand: denali_dt: use pdev instead of ofdev for platform_device mtd: nand: denali_dt: remove dma-mask DT property mtd: nand: denali: support 64bit capable DMA engine mtd: nand: denali_dt: enable HW_ECC_FIXUP for Altera SOCFPGA variant mtd: nand: denali: support HW_ECC_FIXUP capability ... commit d8b54110ee944de522ccd3531191f39986ec20f9 Author: Daniel Borkmann Date: Thu May 11 01:53:15 2017 +0200 bpf, arm64: fix faulty emission of map access in tail calls Shubham was recently asking on netdev why in arm64 JIT we don't multiply the index for accessing the tail call map by 8. That led me into testing out arm64 JIT wrt tail calls and it turned out I got a NULL pointer dereference on the tail call. The buggy access is at: prog = array->ptrs[index]; if (prog == NULL) goto out; [...] 00000060: d2800e0a mov x10, #0x70 // #112 00000064: f86a682a ldr x10, [x1,x10] 00000068: f862694b ldr x11, [x10,x2] 0000006c: b40000ab cbz x11, 0x00000080 [...] The code triggering the crash is f862694b. x1 at the time contains the address of the bpf array, x10 offsetof(struct bpf_array, ptrs). Meaning, above we load the pointer to the program at map slot 0 into x10. x10 can then be NULL if the slot is not occupied, which we later on try to access with a user given offset in x2 that is the map index. Fix this by emitting the following instead: [...] 00000060: d2800e0a mov x10, #0x70 // #112 00000064: 8b0a002a add x10, x1, x10 00000068: d37df04b lsl x11, x2, #3 0000006c: f86b694b ldr x11, [x10,x11] 00000070: b40000ab cbz x11, 0x00000084 [...] This basically adds the offset to ptrs to the base address of the bpf array we got and we later on access the map with an index * 8 offset relative to that. The tail call map itself is basically one large area with meta data at the head followed by the array of prog pointers. This makes tail calls working again, tested on Cavium ThunderX ARMv8. Fixes: ddb55992b04d ("arm64: bpf: implement bpf_tail_call() helper") Reported-by: Shubham Bansal Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller arch/arm64/net/bpf_jit_comp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5b6cb43b4d625b04a4049d727a116edbfe5cf0f4 Author: Ivan Khoronzhuk Date: Wed May 10 10:28:05 2017 -0700 net: ethernet: ti: netcp_core: return error while dma channel open issue Fix error path while dma open channel issue. Also, no need to check output on NULL if it's never returned. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp_core.c | 6 ++++-- drivers/soc/ti/knav_dma.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) commit dc319c4bbc1e297befba195d7ed22fc28b30df63 Merge: b601616 ebccc739 Author: David S. Miller Date: Thu May 11 12:37:49 2017 -0400 Merge branch 's390-net-fixes' Julian Wiedmann says: ==================== s390/net fixes some qeth fixes for -net, the OSM/OSN one being the most crucial. Please also queue these up for stable. ==================== Signed-off-by: David S. Miller commit ebccc7397e4a49ff64c8f44a54895de9d32fe742 Author: Ursula Braun Date: Wed May 10 19:07:54 2017 +0200 s390/qeth: add missing hash table initializations commit 5f78e29ceebf ("qeth: optimize IP handling in rx_mode callback") added new hash tables, but missed to initialize them. Fixes: 5f78e29ceebf ("qeth: optimize IP handling in rx_mode callback") Signed-off-by: Ursula Braun Reviewed-by: Julian Wiedmann Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l3_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 25e2c341e7818a394da9abc403716278ee646014 Author: Julian Wiedmann Date: Wed May 10 19:07:53 2017 +0200 s390/qeth: avoid null pointer dereference on OSN Access card->dev only after checking whether's its valid. Signed-off-by: Julian Wiedmann Reviewed-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 2d2ebb3ed0c6acfb014f98e427298673a5d07b82 Author: Julian Wiedmann Date: Wed May 10 19:07:52 2017 +0200 s390/qeth: unbreak OSM and OSN support commit b4d72c08b358 ("qeth: bridgeport support - basic control") broke the support for OSM and OSN devices as follows: As OSM and OSN are L2 only, qeth_core_probe_device() does an early setup by loading the l2 discipline and calling qeth_l2_probe_device(). In this context, adding the l2-specific bridgeport sysfs attributes via qeth_l2_create_device_attributes() hits a BUG_ON in fs/sysfs/group.c, since the basic sysfs infrastructure for the device hasn't been established yet. Note that OSN actually has its own unique sysfs attributes (qeth_osn_devtype), so the additional attributes shouldn't be created at all. For OSM, add a new qeth_l2_devtype that contains all the common and l2-specific sysfs attributes. When qeth_core_probe_device() does early setup for OSM or OSN, assign the corresponding devtype so that the ccwgroup probe code creates the full set of sysfs attributes. This allows us to skip qeth_l2_create_device_attributes() in case of an early setup. Any device that can't do early setup will initially have only the generic sysfs attributes, and when it's probed later qeth_l2_probe_device() adds the l2-specific attributes. If an early-setup device is removed (by calling ccwgroup_ungroup()), device_unregister() will - using the devtype - delete the l2-specific attributes before qeth_l2_remove_device() is called. So make sure to not remove them twice. What complicates the issue is that qeth_l2_probe_device() and qeth_l2_remove_device() is also called on a device when its layer2 attribute changes (ie. its layer mode is switched). For early-setup devices this wouldn't work properly - we wouldn't remove the l2-specific attributes when switching to L3. But switching the layer mode doesn't actually make any sense; we already decided that the device can only operate in L2! So just refuse to switch the layer mode on such devices. Note that OSN doesn't have a layer2 attribute, so we only need to special-case OSM. Based on an initial patch by Ursula Braun. Fixes: b4d72c08b358 ("qeth: bridgeport support - basic control") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 4 ++++ drivers/s390/net/qeth_core_main.c | 17 +++++++++-------- drivers/s390/net/qeth_core_sys.c | 22 ++++++++++++++-------- drivers/s390/net/qeth_l2.h | 2 ++ drivers/s390/net/qeth_l2_main.c | 17 +++++++++++++---- drivers/s390/net/qeth_l2_sys.c | 8 ++++++++ drivers/s390/net/qeth_l3_main.c | 1 + 7 files changed, 51 insertions(+), 20 deletions(-) commit 9111e7880ccf419548c7b0887df020b08eadb075 Author: Ursula Braun Date: Wed May 10 19:07:51 2017 +0200 s390/qeth: handle sysfs error during initialization When setting up the device from within the layer discipline's probe routine, creating the layer-specific sysfs attributes can fail. Report this error back to the caller, and handle it by releasing the layer discipline. Signed-off-by: Ursula Braun [jwi: updated commit msg, moved an OSN change to a subsequent patch] Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 4 +++- drivers/s390/net/qeth_core_sys.c | 2 ++ drivers/s390/net/qeth_l2_main.c | 5 ++++- drivers/s390/net/qeth_l3_main.c | 5 ++++- 4 files changed, 13 insertions(+), 3 deletions(-) commit b60161668199ac62011c024adc9e66713b9554e7 Author: Jon Mason Date: Wed May 10 11:20:27 2017 -0400 mdio: mux: Correct mdio_mux_init error path issues There is a potential unnecessary refcount decrement on error path of put_device(&pb->mii_bus->dev), as it is possible to avoid the of_mdio_find_bus() call if mux_bus is specified by the calling function. The same put_device() is not called in the error path if the devm_kzalloc of pb fails. This caused the variable used in the put_device() to be changed, as the pb pointer was obviously not set up. There is an unnecessary of_node_get() on child_bus_node if the of_mdiobus_register() is successful, as the for_each_available_child_of_node() automatically increments this. Thus the refcount on this node will always be +1 more than it should be. There is no of_node_put() on child_bus_node if the of_mdiobus_register() call fails. Finally, it is lacking devm_kfree() of pb in the error path. While this might not be technically necessary, it was present in other parts of the function. So, I am adding it where necessary to make it uniform. Signed-off-by: Jon Mason Fixes: f20e6657a875 ("mdio: mux: Enhanced MDIO mux framework for integrated multiplexers") Fixes: 0ca2997d1452 ("netdev/of/phy: Add MDIO bus multiplexer support.") Signed-off-by: David S. Miller drivers/net/phy/mdio-mux.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 83eaddab4378db256d00d295bda6ca997cd13a52 Author: WANG Cong Date: Tue May 9 16:59:54 2017 -0700 ipv6/dccp: do not inherit ipv6_mc_list from parent Like commit 657831ffc38e ("dccp/tcp: do not inherit mc_list from parent") we should clear ipv6_mc_list etc. for IPv6 sockets too. Cc: Eric Dumazet Signed-off-by: Cong Wang Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/dccp/ipv6.c | 6 ++++++ net/ipv6/tcp_ipv6.c | 2 ++ 2 files changed, 8 insertions(+) commit 0fe20fafd1791f993806d417048213ec57b81045 Author: Colin Ian King Date: Tue May 9 17:19:42 2017 +0100 netxen_nic: set rcode to the return status from the call to netxen_issue_cmd Currently rcode is being initialized to NX_RCODE_SUCCESS and later it is checked to see if it is not NX_RCODE_SUCCESS which is never true. It appears that there is an unintentional missing assignment of rcode from the return of the call to netxen_issue_cmd() that was dropped in an earlier fix, so add it in. Detected by CoverityScan, CID#401900 ("Logically dead code") Fixes: 2dcd5d95ad6b2 ("netxen_nic: fix cdrp race condition") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d66c30b12ed3cb533696dea8b9a9eadd5da426a Author: Stefan Wahren Date: Tue May 9 15:40:38 2017 +0200 net: qca_spi: Fix alignment issues in rx path The qca_spi driver causes alignment issues on ARM devices. So fix this by using netdev_alloc_skb_ip_align(). Signed-off-by: Stefan Wahren Fixes: 291ab06ecf67 ("net: qualcomm: new Ethernet over SPI driver for QCA7000") Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/qca_spi.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 1a4a5bf52a4adb477adb075e5afce925824ad132 Author: Gao Feng Date: Tue May 9 18:27:33 2017 +0800 driver: vrf: Fix one possible use-after-free issue The current codes only deal with the case that the skb is dropped, it may meet one use-after-free issue when NF_HOOK returns 0 that means the skb is stolen by one netfilter rule or hook. When one netfilter rule or hook stoles the skb and return NF_STOLEN, it means the skb is taken by the rule, and other modules should not touch this skb ever. Maybe the skb is queued or freed directly by the rule. Now uses the nf_hook instead of NF_HOOK to get the result of netfilter, and check the return value of nf_hook. Only when its value equals 1, it means the skb could go ahead. Or reset the skb as NULL. BTW, because vrf_rcv_finish is empty function, so needn't invoke it even though nf_hook returns 1. But we need to modify vrf_rcv_finish to deal with the NF_STOLEN case. There are two cases when skb is stolen. 1. The skb is stolen and freed directly. There is nothing we need to do, and vrf_rcv_finish isn't invoked. 2. The skb is queued and reinjected again. The vrf_rcv_finish would be invoked as okfn, so need to free the skb in it. Signed-off-by: Gao Feng Signed-off-by: David S. Miller drivers/net/vrf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a00ebd1cf12c378a1d4f7a1d6daf1d76c1eaad82 Author: Lars Ellenberg Date: Thu May 11 10:21:46 2017 +0200 drbd: fix request leak introduced by locking/atomic, kref: Kill kref_sub() When killing kref_sub(), the unconditional additional kref_get() was not properly paired with the necessary kref_put(), causing a leak of struct drbd_requests (~ 224 Bytes) per submitted bio, and breaking DRBD in general, as the destructor of those "drbd_requests" does more than just the mempoll_free(). Fixes: bdfafc4ffdd2 ("locking/atomic, kref: Kill kref_sub()") Signed-off-by: Lars Ellenberg Cc: stable@vger.kernel.org # v4.11 Signed-off-by: Jens Axboe drivers/block/drbd/drbd_req.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit df3ed932394488e57e72dd0e73c224d1804fdc8f Author: Rob Herring Date: Thu May 11 10:15:10 2017 -0500 Partially Revert "of: fix sparse warnings in fdt, irq, reserved mem, and resolver code" A change to function pointers that was meant to address a sparse warning turned out to cause hundreds of new gcc-7 warnings: include/linux/of_irq.h:11:13: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers] drivers/of/of_reserved_mem.c: In function '__reserved_mem_init_node': drivers/of/of_reserved_mem.c:200:7: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers] int const (*initfn)(struct reserved_mem *rmem) = i->data; Turns out the sparse warnings were spurious and have been fixed in upstream sparse since 0.5.0 in commit "sparse: treat function pointers as pointers to const data". This partially reverts commit 17a70355ea576843a7ac851f1db26872a50b2850. Fixes: 17a70355ea57 ("of: fix sparse warnings in fdt, irq, reserved mem, and resolver code") Reported-by: Arnd Bergmann Signed-off-by: Rob Herring drivers/of/of_reserved_mem.c | 2 +- include/linux/of_irq.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit efc0c21c9ea786d6f019d7df7b4e3932f3578d90 Author: Elena Reshetova Date: Thu Mar 2 12:23:45 2017 +0100 s390: convert debug_info.ref_count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/debug.h | 3 ++- arch/s390/kernel/debug.c | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) commit ed6565e734249ef021d5c13ba34c167eb4e42f62 Author: Christoph Hellwig Date: Thu May 11 12:34:38 2017 +0200 block: handle partial completions for special payload requests SCSI devices can return short writes on Write Same just like for normal writes, so we need to handle this case for our special payload requests as well. Signed-off-by: Christoph Hellwig Reported-by: Abdul Haleem Tested-by: Abdul Haleem Signed-off-by: Jens Axboe block/blk-core.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 69861e0a52f8733355ce246f0db15e1b240ad667 Author: Juergen Gross Date: Wed May 10 06:08:44 2017 +0200 xen: adjust early dom0 p2m handling to xen hypervisor behavior When booted as pv-guest the p2m list presented by the Xen is already mapped to virtual addresses. In dom0 case the hypervisor might make use of 2M- or 1G-pages for this mapping. Unfortunately while being properly aligned in virtual and machine address space, those pages might not be aligned properly in guest physical address space. So when trying to obtain the guest physical address of such a page pud_pfn() and pmd_pfn() must be avoided as those will mask away guest physical address bits not being zero in this special case. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Signed-off-by: Juergen Gross arch/x86/xen/mmu_pv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit def9331a12977770cc6132d79f8e6565871e8e38 Author: Juergen Gross Date: Thu Apr 27 07:01:20 2017 +0200 x86/amd: don't set X86_BUG_SYSRET_SS_ATTRS when running under Xen When running as Xen pv guest X86_BUG_SYSRET_SS_ATTRS must not be set on AMD cpus. This bug/feature bit is kind of special as it will be used very early when switching threads. Setting the bit and clearing it a little bit later leaves a critical window where things can go wrong. This time window has enlarged a little bit by using setup_clear_cpu_cap() instead of the hypervisor's set_cpu_features callback. It seems this larger window now makes it rather easy to hit the problem. The proper solution is to never set the bit in case of Xen. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Acked-by: Thomas Gleixner Signed-off-by: Juergen Gross arch/x86/kernel/cpu/amd.c | 5 +++-- arch/x86/xen/enlighten_pv.c | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) commit 0c2cf6d9487cb90be6ad7fac66044dfa8e8e5243 Author: Florian Fainelli Date: Thu Apr 27 11:19:02 2017 -0700 arm64: Silence first allocation with CONFIG_ARM64_MODULE_PLTS=y When CONFIG_ARM64_MODULE_PLTS is enabled, the first allocation using the module space fails, because the module is too big, and then the module allocation is attempted from vmalloc space. Silence the first allocation failure in that case by setting __GFP_NOWARN. Reviewed-by: Ard Biesheuvel Acked-by: Will Deacon Signed-off-by: Florian Fainelli Signed-off-by: Catalin Marinas arch/arm64/kernel/module.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 75d24d968af8913f641c612930c96acc5399e427 Author: Florian Fainelli Date: Thu Apr 27 11:19:01 2017 -0700 ARM: Silence first allocation with CONFIG_ARM_MODULE_PLTS=y When CONFIG_ARM_MODULE_PLTS is enabled, the first allocation using the module space fails, because the module is too big, and then the module allocation is attempted from vmalloc space. Silence the first allocation failure in that case by setting __GFP_NOWARN. Acked-by: Russell King Signed-off-by: Florian Fainelli Signed-off-by: Catalin Marinas arch/arm/kernel/module.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 03497d761c55438144fd63534d4223418fdfd345 Author: Florian Fainelli Date: Thu Apr 27 11:19:00 2017 -0700 mm: Silence vmap() allocation failures based on caller gfp_flags If the caller has set __GFP_NOWARN don't print the following message: vmap allocation for size 15736832 failed: use vmalloc= to increase size. This can happen with the ARM/Linux or ARM64/Linux module loader built with CONFIG_ARM{,64}_MODULE_PLTS=y which does a first attempt at loading a large module from module space, then falls back to vmalloc space. Acked-by: Michal Hocko Signed-off-by: Florian Fainelli Signed-off-by: Catalin Marinas mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e118c3fec9c0d8d2a96462c4c035305dc952e402 Author: Tobias Klauser Date: Thu May 11 11:40:16 2017 +0200 nios2: remove custom early console implementation As of commits d8f347ba35cf ("nios2: enable earlycon support"), 0dcc0542a006 ("serial: altera_jtaguart: add earlycon support") and 4d9d7d896d77 ("serial: altera_uart: add earlycon support"), the nios2 architecture and the altera_uart/altera_jtaguart drivers support earlycon. Thus, the custom early console implementation for nios2 is no longer necessary to get early boot messages. Remove it and rely fully on earlycon support. Signed-off-by: Tobias Klauser arch/nios2/include/asm/prom.h | 22 ------- arch/nios2/include/asm/setup.h | 2 - arch/nios2/kernel/Makefile | 1 - arch/nios2/kernel/early_printk.c | 121 --------------------------------------- arch/nios2/kernel/prom.c | 49 ---------------- arch/nios2/kernel/setup.c | 4 -- 6 files changed, 199 deletions(-) commit 0bb7a37f8d15e5fb5d21776875f9fbc74e10753a Author: Diego Elio Pettenò Date: Wed Apr 26 17:37:04 2017 +0100 HID: elecom: extend to fix the descriptor for DEFT trackballs The ELECOM DEFT trackballs report only five buttons, when the device actually has 8. Change the descriptor so that the HID driver can see all of them. For completeness and future reference, I included a side-by-side diff of the part of the descriptor that is being edited. Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Yuxuan Shui Signed-off-by: Diego Elio Pettenò Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 6 +++-- drivers/hid/hid-core.c | 2 ++ drivers/hid/hid-elecom.c | 62 +++++++++++++++++++++++++++++++++++++++++------- drivers/hid/hid-ids.h | 2 ++ 4 files changed, 61 insertions(+), 11 deletions(-) commit 984a9d4c40bed351a92ed31f0723a710444295da Author: Nicholas Bellinger Date: Thu May 11 00:23:08 2017 -0700 Revert "target: Fix VERIFY and WRITE VERIFY command parsing" This reverts commit 0e2eb7d12eaa8e391bf5615d4271bb87a649caaa Author: Bart Van Assche Date: Thu Mar 30 10:12:39 2017 -0700 target: Fix VERIFY and WRITE VERIFY command parsing This patch broke existing behaviour for WRITE_VERIFY because it dropped the original SCF_SCSI_DATA_CDB assignment for bytchk = 0 so target_cmd_size_check() no longer rejected this case, allowing an overflow case to trigger an OOPs in iscsi-target. Since the short term and long term fixes are still being discussed, revert it for now since it's late in the merge window and try again in v4.13-rc1. Conflicts: drivers/target/target_core_sbc.c Signed-off-by: Nicholas Bellinger drivers/target/target_core_sbc.c | 74 ++++++---------------------------------- 1 file changed, 10 insertions(+), 64 deletions(-) commit e84b83b9ee2187817cf895471675f1ccdf64cd53 Author: Dan Williams Date: Wed May 10 19:38:13 2017 -0700 filesystem-dax: fix broken __dax_zero_page_range() conversion The conversion of __dax_zero_page_range() to 'struct dax_operations' caused it to frequently fail. The mistake was treating the @size parameter as a dax mapping length rather than just a length of the clear_pmem() operation. The dax mapping length is assumed to be hard coded as PAGE_SIZE. Without this fix any page unaligned zeroing request will trigger a -EINVAL return from bdev_dax_pgoff(). Cc: Jan Kara Cc: Christoph Hellwig Reported-by: Ross Zwisler Tested-by: Ross Zwisler Fixes: cccbce671582 ("filesystem-dax: convert to dax_direct_access()") Signed-off-by: Dan Williams fs/dax.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b177fe85dd27de1ee4c29f59c4e82b3ea3b78784 Author: Vishal Verma Date: Wed May 10 15:01:31 2017 -0600 libnvdimm, btt: ensure that initializing metadata clears poison If we had badblocks/poison in the metadata area of a BTT, recreating the BTT would not clear the poison in all cases, notably the flog area. This is because rw_bytes will only clear errors if the request being sent down is 512B aligned and sized. Make sure that when writing the map and info blocks, the rw_bytes being sent are of the correct size/alignment. For the flog, instead of doing the smaller log_entry writes only, first do a 'wipe' of the entire area by writing zeroes in large enough chunks so that errors get cleared. Cc: Andy Rudoff Cc: Dan Williams Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/btt.c | 54 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 7 deletions(-) commit 3ae3d67ba705c754a3c91ac009f9ce73a0e7286a Author: Vishal Verma Date: Wed May 10 15:01:30 2017 -0600 libnvdimm: add an atomic vs process context flag to rw_bytes nsio_rw_bytes can clear media errors, but this cannot be done while we are in an atomic context due to locking within ACPI. From the BTT, ->rw_bytes may be called either from atomic or process context depending on whether the calls happen during initialization or during IO. During init, we want to ensure error clearing happens, and the flag marking process context allows nsio_rw_bytes to do that. When called during IO, we're in atomic context, and error clearing can be skipped. Cc: Dan Williams Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/blk.c | 3 ++- drivers/nvdimm/btt.c | 67 +++++++++++++++++++++++++---------------------- drivers/nvdimm/btt_devs.c | 2 +- drivers/nvdimm/claim.c | 6 +++-- drivers/nvdimm/nd.h | 1 + drivers/nvdimm/pfn_devs.c | 4 +-- include/linux/nd.h | 12 +++++---- 7 files changed, 53 insertions(+), 42 deletions(-) commit 791a9a666d1afe2603bcb2c6a4852d684e879252 Merge: 23ea3f62 3e18c63 Author: Linus Torvalds Date: Wed May 10 20:45:36 2017 -0700 Merge tag 'kbuild-uapi-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild UAPI updates from Masahiro Yamada: "Improvement of headers_install by Nicolas Dichtel. It has been long since the introduction of uapi directories, but the de-coupling of exported headers has not been completed. Headers listed in header-y are exported whether they exist in uapi directories or not. His work fixes this inconsistency. All (and only) headers under uapi directories are now exported. The asm-generic wrappers are still exceptions, but this is a big step forward" * tag 'kbuild-uapi-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: arch/include: remove empty Kbuild files uapi: export all arch specifics directories uapi: export all headers under uapi directories smc_diag.h: fix include from userland btrfs_tree.h: fix include from userland uapi: includes linux/types.h before exporting files Makefile.headersinst: remove destination-y option Makefile.headersinst: cleanup input files x86: stop exporting msr-index.h to userland nios2: put setup.h in uapi h8300: put bitsperlong.h in uapi commit 23ea3f62f3f90caaa7b4bf32690c341101228cca Merge: 593043d 9eb3c95 Author: Linus Torvalds Date: Wed May 10 20:41:43 2017 -0700 Merge tag 'kbuild-misc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull misc Kbuild updates from Masahiro Yamada: - clean up builddeb script - use full path for KBUILD_IMAGE to fix rpm-pkg build - fix objdiff tool to ignore debug info * tag 'kbuild-misc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: builddeb: fix typo builddeb: Update a few outdated and hardcoded strings deb-pkg: Remove the KBUILD_IMAGE workaround unicore32: Use full path in KBUILD_IMAGE definition sh: Use full path in KBUILD_IMAGE definition arc: Use full path in KBUILD_IMAGE definition arm: Use full path in KBUILD_IMAGE definition arm64: Use full path in KBUILD_IMAGE definition scripts: objdiff: Ignore debug info when comparing commit 593043d35ddff8ab033546c2a89bb1d4080d03e1 Merge: 556d994 f55813b Author: Linus Torvalds Date: Wed May 10 20:11:05 2017 -0700 Merge tag 'kbuild-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - improve Clang support - clean up various Makefiles - improve build log visibility (objtool, alpha, ia64) - improve compiler flag evaluation for better build performance - fix GCC version-dependent warning - fix genksyms * tag 'kbuild-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (23 commits) kbuild: dtbinst: remove unnecessary __dtbs_install_prep target ia64: beatify build log for gate.so and gate-syms.o alpha: make short build log available for division routines alpha: merge build rules of division routines alpha: add $(src)/ rather than $(obj)/ to make source file path Makefile: evaluate LDFLAGS_BUILD_ID only once objtool: make it visible in make V=1 output kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS kbuild: Add support to generate LLVM assembly files kbuild: Add better clang cross build support kbuild: drop -Wno-unknown-warning-option from clang options kbuild: fix asm-offset generation to work with clang kbuild: consolidate redundant sed script ASM offset generation frv: Use OFFSET macro in DEF_*REG() kbuild: avoid conflict between -ffunction-sections and -pg on gcc-4.7 kbuild: Consolidate header generation from ASM offset information kbuild: use -Oz instead of -Os when using clang kbuild, LLVMLinux: Add -Werror to cc-option to support clang Kbuild: make designated_init attribute fatal kbuild: drop unneeded patterns '.*.orig' and '.*.rej' from distclean ... commit 556d994a75790dce8a9c6b35b94cff1d526b2e32 Merge: 291b38a 332e0d1 Author: Linus Torvalds Date: Wed May 10 19:37:14 2017 -0700 Merge tag 'rtc-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "RTC subsystem update: - Add OF device ID table for i2c drivers New RTC driver: - Motorola CPCAP PMIC RTC RTC driver updates: - cmos: fix IRQ selection - ds1307: Add ST m41t0 support - ds1374: fix watchdog configuration - sh: Add rza series support" * tag 'rtc-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (33 commits) rtc: gemini: add return value validation rtc: snvs: fix an incorrect check of return value rtc: ds1374: wdt: Fix stop/start ioctl always returning -EINVAL rtc: ds1374: wdt: Fix issue with timeout scaling from secs to wdt ticks rtc: sh: mark PM functions as unused rtc: hid-sensor-time: remove some dead code rtc: m41t80: Add proper compatible for rv4162 rtc: ds1307: Add m41t0 to OF device ID table rtc: ds1307: support m41t0 variant rtc: cpcap: fix improper use of IRQ_NONE for request_threaded_irq rtc: cmos: Do not assume irq 8 for rtc when there are no legacy irqs x86: i8259: export legacy_pic symbol dt-bindings: rtc: document the rtc-sh bindings rtc: sh: add support for rza series rtc: cpcap: kfreeing devm allocated memory rtc: wm8350: Remove unused to_wm8350_from_rtc_dev rtc: cpcap: new rtc driver dt-bindings: Add vendor prefix for Motorola rtc: omap: mark PM methods as __maybe_unused rtc: omap: remove incorrect __exit markups ... commit 291b38a7565b41676cafd1b4052315a94d9c8977 Merge: b5a53b6 6192c41 Author: Linus Torvalds Date: Wed May 10 19:13:03 2017 -0700 Merge tag 'hwparam-20170420' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull hw lockdown support from David Howells: "Annotation of module parameters that configure hardware resources including ioports, iomem addresses, irq lines and dma channels. This allows a future patch to prohibit the use of such module parameters to prevent that hardware from being abused to gain access to the running kernel image as part of locking the kernel down under UEFI secure boot conditions. Annotations are made by changing: module_param(n, t, p) module_param_named(n, v, t, p) module_param_array(n, t, m, p) to: module_param_hw(n, t, hwtype, p) module_param_hw_named(n, v, t, hwtype, p) module_param_hw_array(n, t, hwtype, m, p) where the module parameter refers to a hardware setting hwtype specifies the type of the resource being configured. This can be one of: ioport Module parameter configures an I/O port iomem Module parameter configures an I/O mem address ioport_or_iomem Module parameter could be either (runtime set) irq Module parameter configures an I/O port dma Module parameter configures a DMA channel dma_addr Module parameter configures a DMA buffer address other Module parameter configures some other value Note that the hwtype is compile checked, but not currently stored (the lockdown code probably won't require it). It is, however, there for future use. A bonus is that the hwtype can also be used for grepping. The intention is for the kernel to ignore or reject attempts to set annotated module parameters if lockdown is enabled. This applies to options passed on the boot command line, passed to insmod/modprobe or direct twiddling in /sys/module/ parameter files. The module initialisation then needs to handle the parameter not being set, by (1) giving an error, (2) probing for a value or (3) using a reasonable default. What I can't do is just reject a module out of hand because it may take a hardware setting in the module parameters. Some important modules, some ipmi stuff for instance, both probe for hardware and allow hardware to be manually specified; if the driver is aborts with any error, you don't get any ipmi hardware. Further, trying to do this entirely in the module initialisation code doesn't protect against sysfs twiddling. [!] Note that in and of itself, this series of patches should have no effect on the the size of the kernel or code execution - that is left to a patch in the next series to effect. It does mark annotated kernel parameters with a KERNEL_PARAM_FL_HWPARAM flag in an already existing field" * tag 'hwparam-20170420' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: (38 commits) Annotate hardware config module parameters in sound/pci/ Annotate hardware config module parameters in sound/oss/ Annotate hardware config module parameters in sound/isa/ Annotate hardware config module parameters in sound/drivers/ Annotate hardware config module parameters in fs/pstore/ Annotate hardware config module parameters in drivers/watchdog/ Annotate hardware config module parameters in drivers/video/ Annotate hardware config module parameters in drivers/tty/ Annotate hardware config module parameters in drivers/staging/vme/ Annotate hardware config module parameters in drivers/staging/speakup/ Annotate hardware config module parameters in drivers/staging/media/ Annotate hardware config module parameters in drivers/scsi/ Annotate hardware config module parameters in drivers/pcmcia/ Annotate hardware config module parameters in drivers/pci/hotplug/ Annotate hardware config module parameters in drivers/parport/ Annotate hardware config module parameters in drivers/net/wireless/ Annotate hardware config module parameters in drivers/net/wan/ Annotate hardware config module parameters in drivers/net/irda/ Annotate hardware config module parameters in drivers/net/hamradio/ Annotate hardware config module parameters in drivers/net/ethernet/ ... commit a9402889f41cc2db7a9b162990bef271be098ff0 Author: Boris Brezillon Date: Wed May 3 08:48:55 2017 +0200 MAINTAINERS: Update NAND subsystem git repositories NAND branches are now hosted on MTD repos, nand/next is on l2-mtd and nand/fixes will be on linux-mtd. Signed-off-by: Boris Brezillon [Brian: added branch names] Signed-off-by: Brian Norris MAINTAINERS | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 7db789d08cb23aeedb4d6392c2994ce387067021 Author: Christophe Leroy Date: Wed May 3 14:18:24 2017 +0200 mtd: nand: gpio: update binding This patch updates the binding documentation in accordance with commit 44dd182861f99 ("mtd: nand: gpio: make nCE GPIO optional") Signed-off-by: Christophe Leroy Reported-by: Brian Norris Acked-by: Rob Herring Signed-off-by: Brian Norris Documentation/devicetree/bindings/mtd/gpio-control-nand.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8be193c7b1f44d3f4dcb27107df0831709c2deb1 Author: Tomohiro Yoshidomi Date: Sat May 6 13:00:31 2017 -0700 Input: add support for PlayStation 1/2 joypads connected via SPI PlayStation 1/2 joypads can be connected directly to the SPI interface. Signed-off-by: Tomohiro Yoshidomi Acked-by: David Herrmann Signed-off-by: Dmitry Torokhov drivers/input/joystick/Kconfig | 21 ++ drivers/input/joystick/Makefile | 1 + drivers/input/joystick/psxpad-spi.c | 401 ++++++++++++++++++++++++++++++++++++ 3 files changed, 423 insertions(+) commit b5a53b61a2890ec08f404f524c1c42aa86f09be4 Merge: c70422f 0119dc6 Author: Linus Torvalds Date: Wed May 10 13:38:18 2017 -0700 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "Sort of on the quieter side this time, which is probably due more to me not catching up as quickly on patch review than anything else. Overall it seems normal though, a few small changes to the core, mostly small non-critical fixes here and there as well as driver updates for new and existing hardware support. The biggest things are the TI clk driver rework to lay the groundwork for clkctrl support in the next merge window and the AmLogic audio/graphics clk support. Core: - clk_possible_parents debugfs file so we know which parents a clk could possibly have - Fix to make clk rate change notifiers stop on the first failure instead of continuing New Drivers: - Mediatek MT6797 SoCs - hi655x PMIC clks - AmLogic Meson SoC i2s and spdif audio clks and Mali graphics clks - Allwinner H5 SoCs and PRCM hardware Updates: - Nvidia Tegra T210 cleanups and non-critical fixes - TI OMAP cleanups in preparation for clkctrl support - trivial fixes like kcalloc(), devm_* conversions, and seq_puts() - ZTE zx296718 SoC VGA clks - Rockchip clk-ids, fixups, and rename of rk1108 to rv1108 - IDT VersaClock 5P49V5935 support - Renesas R-Car H3 and M3-W IMR clks and ES2.0 rev of R-Car H3 support" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (151 commits) clk: x86: pmc-atom: Checking for IS_ERR() instead of NULL clk: ti: divider: try to fix ti_clk_register_divider clk: mvebu: Use kcalloc() in two functions clk: mvebu: Use kcalloc() in of_cpu_clk_setup() clk: nomadik: Delete error messages for a failed memory allocation in two functions clk: nomadik: Use seq_puts() in nomadik_src_clk_show() clk: Improve a size determination in two functions clk: Replace four seq_printf() calls by seq_putc() clk: si5351: Delete an error message for a failed memory allocation in si5351_i2c_probe() clk: si5351: Use devm_kcalloc() in si5351_i2c_probe() clk: at91: Use kcalloc() in of_at91_clk_pll_get_characteristics() reset: mediatek: Add MT2701 ethsys reset controller include file clk: mediatek: add mt2701 ethernet reset clk: hi6220: Add the hi655x's pmic clock clk: ti: fix building without legacy omap3 clk: ti: fix linker error with !SOC_OMAP4 clk: hi3620: Fix a typo in one variable name clk: hi3620: Delete error messages for a failed memory allocation in two functions clk: hi3620: Use kcalloc() in hi3620_mmc_clk_init() clk: hisilicon: Delete error messages for failed memory allocations in hisi_clk_init() ... commit c70422f760c120480fee4de6c38804c72aa26bc1 Merge: 73ccb02 b26b78c Author: Linus Torvalds Date: Wed May 10 13:29:23 2017 -0700 Merge tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "Another RDMA update from Chuck Lever, and a bunch of miscellaneous bugfixes" * tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux: (26 commits) nfsd: Fix up the "supattr_exclcreat" attributes nfsd: encoders mustn't use unitialized values in error cases nfsd: fix undefined behavior in nfsd4_layout_verify lockd: fix lockd shutdown race NFSv4: Fix callback server shutdown SUNRPC: Refactor svc_set_num_threads() NFSv4.x/callback: Create the callback service through svc_create_pooled lockd: remove redundant check on block svcrdma: Clean out old XDR encoders svcrdma: Remove the req_map cache svcrdma: Remove unused RDMA Write completion handler svcrdma: Reduce size of sge array in struct svc_rdma_op_ctxt svcrdma: Clean up RPC-over-RDMA backchannel reply processing svcrdma: Report Write/Reply chunk overruns svcrdma: Clean up RDMA_ERROR path svcrdma: Use rdma_rw API in RPC reply path svcrdma: Introduce local rdma_rw API helpers svcrdma: Clean up svc_rdma_get_inv_rkey() svcrdma: Add helper to save pages under I/O svcrdma: Eliminate RPCRDMA_SQ_DEPTH_MULT ... commit 73ccb023a2f25b72c4b95499ca24760588014614 Merge: f94c128 76b2a30 Author: Linus Torvalds Date: Wed May 10 13:03:38 2017 -0700 Merge tag 'nfs-for-4.12-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client updates from Trond Myklebust: "Highlights include: Stable bugfixes: - Fix use after free in write error path - Use GFP_NOIO for two allocations in writeback - Fix a hang in OPEN related to server reboot - Check the result of nfs4_pnfs_ds_connect - Fix an rcu lock leak Features: - Removal of the unmaintained and unused OSD pNFS layout - Cleanup and removal of lots of unnecessary dprintk()s - Cleanup and removal of some memory failure paths now that GFP_NOFS is guaranteed to never fail. - Remove the v3-only data server limitation on pNFS/flexfiles Bugfixes: - RPC/RDMA connection handling bugfixes - Copy offload: fixes to ensure the copied data is COMMITed to disk. - Readdir: switch back to using the ->iterate VFS interface - File locking fixes from Ben Coddington - Various use-after-free and deadlock issues in pNFS - Write path bugfixes" * tag 'nfs-for-4.12-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (89 commits) pNFS/flexfiles: Always attempt to call layoutstats when flexfiles is enabled NFSv4.1: Work around a Linux server bug... NFS append COMMIT after synchronous COPY NFSv4: Fix exclusive create attributes encoding NFSv4: Fix an rcu lock leak nfs: use kmap/kunmap directly NFS: always treat the invocation of nfs_getattr as cache hit when noac is on Fix nfs_client refcounting if kmalloc fails in nfs4_proc_exchange_id and nfs4_proc_async_renew NFSv4.1: RECLAIM_COMPLETE must handle NFS4ERR_CONN_NOT_BOUND_TO_SESSION pNFS: Fix NULL dereference in pnfs_generic_alloc_ds_commits pNFS: Fix a typo in pnfs_generic_alloc_ds_commits pNFS: Fix a deadlock when coalescing writes and returning the layout pNFS: Don't clear the layout return info if there are segments to return pNFS: Ensure we commit the layout if it has been invalidated pNFS: Don't send COMMITs to the DSes if the server invalidated our layout pNFS/flexfiles: Fix up the ff_layout_write_pagelist failure path pNFS: Ensure we check layout validity before marking it for return NFS4.1 handle interrupted slot reuse from ERR_DELAY NFSv4: check return value of xdr_inline_decode nfs/filelayout: fix NULL pointer dereference in fl_pnfs_update_layout() ... commit e84188852a7239d7a144af12f7e5dac8fa88600b Author: Arnd Bergmann Date: Wed May 10 21:05:16 2017 +0200 tee: add ARM_SMCCC dependency For the moment, the tee subsystem only makes sense in combination with the op-tee driver that depends on ARM_SMCCC, so let's hide the subsystem from users that can't select that. Suggested-by: Linus Torvalds Signed-off-by: Arnd Bergmann drivers/tee/Kconfig | 1 + 1 file changed, 1 insertion(+) commit e038d5515b4a0c0946f331f4eeaa538453a89c36 Merge: 6cde26f 14e21cb Author: Arnd Bergmann Date: Wed May 10 21:03:31 2017 +0200 Merge branch 'tee/initial-merge' into fixes This is a dependency for the following fix * tee/initial-merge: arm64: dt: hikey: Add optee node Documentation: tee subsystem and op-tee driver tee: add OP-TEE driver tee: generic TEE subsystem dt/bindings: add bindings for optee commit f94c128eefcce2e3448d543f13cd7d7b8aa660a5 Merge: c44b594 e3cd7f0 Author: Linus Torvalds Date: Wed May 10 11:40:36 2017 -0700 Merge tag 'metag-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag Pull metag updates from James Hogan: "These patches primarily make some usercopy improvements (following on from the recent usercopy fixes): - reformat and simplify rapf copy loops - add 64-bit get_user support And fix a couple more uaccess issues, partily pointed out by Al: - fix access_ok() serious shortcomings - fix strncpy_from_user() address validation Also included is a trivial removal of a redundant increment" * tag 'metag-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag: metag/mm: Drop pointless increment metag/uaccess: Check access_ok in strncpy_from_user metag/uaccess: Fix access_ok() metag/usercopy: Add 64-bit get_user support metag/usercopy: Simplify rapf loop fixup corner case metag/usercopy: Reformat rapf loop inline asm commit c44b59430393c38873fd933333d945f426857a59 Merge: 5ccd414 c8b0d72 Author: Linus Torvalds Date: Wed May 10 11:33:08 2017 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: "Fixes, cleanups, performance A bunch of changes to virtio, most affecting virtio net. Also ptr_ring batched zeroing - first of batching enhancements that seems ready." * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: s390/virtio: change maintainership tools/virtio: fix spelling mistake: "wakeus" -> "wakeups" virtio_net: tidy a couple debug statements ptr_ring: support testing different batching sizes ringtest: support test specific parameters ptr_ring: batch ring zeroing virtio: virtio_driver doc virtio_net: don't reset twice on XDP on/off virtio_net: fix support for small rings virtio_net: reduce alignment for buffers virtio_net: rework mergeable buffer handling virtio_net: allow specifying context for rx virtio: allow extra context per descriptor tools/virtio: fix build breakage virtio: add context flag to find vqs virtio: wrap find_vqs ringtest: fix an assert statement commit b26b78cb726007533d81fdf90a62e915002ef5c8 Author: Trond Myklebust Date: Tue May 9 16:24:59 2017 -0400 nfsd: Fix up the "supattr_exclcreat" attributes If an NFSv4 client asks us for the supattr_exclcreat, then we must not return attributes that are unsupported by this minor version. Signed-off-by: Trond Myklebust Fixes: 75976de6556f ("NFSD: Return word2 bitmask if setting security..,") Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/nfs4xdr.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 5ccd414080822d5257c3569f4aeca74f63f4a257 Merge: 29250d3 36c344f Author: Linus Torvalds Date: Wed May 10 11:29:23 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull more KVM updates from Paolo Bonzini: "ARM: - bugfixes - moved shared 32-bit/64-bit files to virt/kvm/arm - support for saving/restoring virtual ITS state to userspace PPC: - XIVE (eXternal Interrupt Virtualization Engine) support x86: - nVMX improvements, including emulated page modification logging (PML) which brings nice performance improvements on some workloads" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (45 commits) KVM: arm/arm64: vgic-its: Cleanup after failed ITT restore KVM: arm/arm64: Don't call map_resources when restoring ITS tables KVM: arm/arm64: Register ITS iodev when setting base address KVM: arm/arm64: Get rid of its->initialized field KVM: arm/arm64: Register iodevs when setting redist base and creating VCPUs KVM: arm/arm64: Slightly rework kvm_vgic_addr KVM: arm/arm64: Make vgic_v3_check_base more broadly usable KVM: arm/arm64: Refactor vgic_register_redist_iodevs KVM: Add kvm_vcpu_get_idx to get vcpu index in kvm->vcpus nVMX: Advertise PML to L1 hypervisor nVMX: Implement emulated Page Modification Logging kvm: x86: Add a hook for arch specific dirty logging emulation kvm: nVMX: Validate CR3 target count on nested VM-entry KVM: set no_llseek in stat_fops_per_vm KVM: arm/arm64: vgic: Rename kvm_vgic_vcpu_init to kvm_vgic_vcpu_enable KVM: arm/arm64: Clarification and relaxation to ITS save/restore ABI KVM: arm64: vgic-v3: KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES KVM: arm64: vgic-its: Fix pending table sync KVM: arm64: vgic-its: ITT save and restore KVM: arm64: vgic-its: Device table save/restore ... commit 29250d301b0c75ef142b51eebee6b7403cc79624 Merge: a2d9214 4dbbe2d Author: Linus Torvalds Date: Wed May 10 11:26:25 2017 -0700 Merge tag 'trace-v4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "This is a trivial patch that changes a check for a cpumask from a NULL pointer to using cpumask_available(), which will do the check. This is because cpumasks when not allocated are always set, and clang complains about it" * tag 'trace-v4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Use cpumask_available() to check if cpumask variable may be used commit f961e3f2acae94b727380c0b74e2d3954d0edf79 Author: J. Bruce Fields Date: Fri May 5 16:17:57 2017 -0400 nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same problem. Reported-by: Ari Kauppi Reviewed-by: Christoph Hellwig Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/nfs4xdr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a2d9214c730f54ff72c2940bcd7f22d1fccb26ec Merge: de4d195 414d06a Author: Linus Torvalds Date: Wed May 10 11:20:09 2017 -0700 Merge tag 'armsoc-tee' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull TEE driver infrastructure and OP-TEE drivers from Arnd Bergmann: "This introduces a generic TEE framework in the kernel, to handle trusted environemtns (security coprocessor or software implementations such as OP-TEE/TrustZone). I'm sending it separately from the other arm-soc driver changes to give it a little more visibility, once the subsystem is merged, we will likely keep this in the arm₋soc drivers branch or have the maintainers submit pull requests directly, depending on the patch volume. I have reviewed earlier versions in the past, and have reviewed the latest version in person during Linaro Connect BUD17. Here is my overall assessment of the subsystem: - There is clearly demand for this, both for the generic infrastructure and the specific OP-TEE implementation. - The code has gone through a large number of reviews, and the review comments have all been addressed, but the reviews were not coming up with serious issues any more and nobody volunteered to vouch for the quality. - The user space ioctl interface is sufficient to work with the OP-TEE driver, and it should in principle work with other TEE implementations that follow the GlobalPlatform[1] standards, but it might need to be extended in minor ways depending on specific requirements of future TEE implementations - The main downside of the API to me is how the user space is tied to the TEE implementation in hardware or firmware, but uses a generic way to communicate with it. This seems to be an inherent problem with what it is trying to do, and I could not come up with any better solution than what is implemented here. For a detailed history of the patch series, see https://lkml.org/lkml/2017/3/10/1277" * tag 'armsoc-tee' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: arm64: dt: hikey: Add optee node Documentation: tee subsystem and op-tee driver tee: add OP-TEE driver tee: generic TEE subsystem dt/bindings: add bindings for optee commit afa31879f0a62f769cdeeffc8cfec613da2bc482 Author: Rex Zhu Date: Fri May 5 17:53:18 2017 +0800 drm/amd/powerplay: refine pwm1_enable callback functions for CI. Use the new enums for setting and getting the fan control mode. Fixes problems due to previous inconsistencies between enums. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 2fde9ab218b7f8446c2428b7f9dad602afce8be6 Author: Rex Zhu Date: Fri May 5 16:50:36 2017 +0800 drm/amd/powerplay: refine pwm1_enable callback functions for vi. Use the new enums for setting and getting the fan control mode. Fixes problems due to previous inconsistencies between enums. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 35 ++++++++++++---------- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c | 9 +++--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.h | 2 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + 4 files changed, 27 insertions(+), 20 deletions(-) commit 7522ffc41b73a3dd1f9d19164f033bd649c0404b Author: Rex Zhu Date: Fri May 5 17:44:32 2017 +0800 drm/amd/powerplay: refine pwm1_enable callback functions for Vega10. Use the new enums for setting and getting the fan control mode. Fixes problems due to previous inconsistencies between enums. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 44 ++++++++++++---------- .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.h | 1 + 2 files changed, 25 insertions(+), 20 deletions(-) commit aad22ca4368082cdd1cff1c55d8607c94ea1a74b Author: Rex Zhu Date: Fri May 5 16:56:45 2017 +0800 drm/amdgpu: refine amdgpu pwm1_enable sysfs interface. Make the interface consistent. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 4f93f09e5c3e59e72aa1ae877b24ae0cacdfdfa8 Author: Rex Zhu Date: Fri May 5 17:37:20 2017 +0800 drm/amdgpu: add amd fan ctrl mode enums. Add common fan enums that can be used for both powerplay and dpm. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/amd_shared.h | 6 ++++++ 1 file changed, 6 insertions(+) commit ded96c7389c2fdef174d3dbdc6e8c2822312c364 Author: Rex Zhu Date: Fri Apr 21 17:26:38 2017 +0800 drm/amd/powerplay: add more smu message on Vega10. Add some new SMU messages. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/vega10_ppsmc.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit de4d195308ad589626571dbe5789cebf9695a204 Merge: dc9edaa 20652ed6 Author: Linus Torvalds Date: Wed May 10 09:50:55 2017 -0700 Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RCU updates from Ingo Molnar: "The main changes are: - Debloat RCU headers - Parallelize SRCU callback handling (plus overlapping patches) - Improve the performance of Tree SRCU on a CPU-hotplug stress test - Documentation updates - Miscellaneous fixes" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (74 commits) rcu: Open-code the rcu_cblist_n_lazy_cbs() function rcu: Open-code the rcu_cblist_n_cbs() function rcu: Open-code the rcu_cblist_empty() function rcu: Separately compile large rcu_segcblist functions srcu: Debloat the header srcu: Adjust default auto-expediting holdoff srcu: Specify auto-expedite holdoff time srcu: Expedite first synchronize_srcu() when idle srcu: Expedited grace periods with reduced memory contention srcu: Make rcutorture writer stalls print SRCU GP state srcu: Exact tracking of srcu_data structures containing callbacks srcu: Make SRCU be built by default srcu: Fix Kconfig botch when SRCU not selected rcu: Make non-preemptive schedule be Tasks RCU quiescent state srcu: Expedite srcu_schedule_cbs_snp() callback invocation srcu: Parallelize callback handling kvm: Move srcu_struct fields to end of struct kvm rcu: Fix typo in PER_RCU_NODE_PERIOD header comment rcu: Use true/false in assignment to bool rcu: Use bool value directly ... commit 30514decb27d45b98599612cb5d3e6a20ba733a5 Author: Chunming Zhou Date: Tue May 9 13:39:40 2017 +0800 drm/amdgpu: fix dependency issue The problem is that executing the jobs in the right order doesn't give you the right result because consecutive jobs executed on the same engine are pipelined. In other words job B does it buffer read before job A has written it's result. 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_ib.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 17 +++++++++++++++++ drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 2 ++ 6 files changed, 27 insertions(+), 1 deletion(-) commit cb3696fdeca24d3a347a5225d934ce50c6edccba Author: Chunming Zhou Date: Tue May 9 15:34:07 2017 +0800 drm/amd: fix init order of sched job Need to increment after the fence check. Signed-off-by: Chunming Zhou Reviewed-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb3338d3474e0329918fda9dae2c52751731eb58 Author: Song Liu Date: Mon May 8 17:39:24 2017 -0700 md/raid5-cache: in r5l_do_submit_io(), submit io->split_bio first In r5l_do_submit_io(), it is necessary to check io->split_bio before submit io->current_bio. This is because, endio of current_bio may free the whole IO unit, and thus change io->split_bio. Signed-off-by: Song Liu Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit dc9edaab90de9441cc28ac570b23b0d2bdba7879 Merge: 2e4ab93 46436eb Author: Linus Torvalds Date: Wed May 10 09:35:42 2017 -0700 Merge tag 'acpi-extra-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI updates from Rafael Wysocki: "These update the ACPICA code in the kernel to upstream revision 20170303 which adds a few minor fixes and improvements, update ACPI SoC drivers with new device IDs, platform-related information and similar, fix the register information in the xpower PMIC driver, introduce a concept of "always present" devices to the ACPI device enumeration code and use it to fix a problem with one platform, and fix a system resume issue related to power resources. Specifics: - Update the ACPICA code in the kernel to upstream revision 20170303 which includes: * Minor fixes and improvements in the core code (Bob Moore, Seunghun Han). * Debugger fixes (Colin Ian King, Lv Zheng). * Compiler/disassembler improvements (Bob Moore, David Box, Lv Zheng). * Build-related update (Lv Zheng). - Add new device IDs and platform-related information to the ACPI drivers for Intel (LPSS) and AMD (APD) SoCs (Hanjun Guo, Hans de Goede). - Make it possible to quirk ACPI-enumerated devices as "always present" on platforms where they are incorrectly reported as not present by the AML and add the INT0002 device ID to the list of "always present" devices (Hans de Goede). - Fix the register information in the xpower PMIC driver and add comments to map the registers to symbols used by AML to it (Hans de Goede). - Move the code turning off unused ACPI power resources during system resume to a point after all devices have been resumed to avoid issues with power resources that do not behave as expected (Hans de Goede)" * tag 'acpi-extra-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (22 commits) ACPI / power: Delay turning off unused power resources after suspend ACPI / PMIC: xpower: Fix power_table addresses ACPI / LPSS: Call pwm_add_table() for Bay Trail PWM device ACPICA: Update version to 20170303 ACPICA: iasl: add ASL conversion tool ACPICA: Local cache support: Allow small cache objects ACPICA: Disassembler: Do not unconditionally remove temporary names ACPICA: iasl: Fix IORT SMMU GSI disassembling ACPICA: Cleanup AML opcode definitions, no functional change ACPICA: Debugger: Add interpreter blocking mark for single-step mode ACPICA: debugger: fix memory leak on Pathname ACPICA: Update for automatic repair code for objects returned by evaluate_object ACPICA: Namespace: fix operand cache leak ACPICA: Fix several incorrect invocations of ACPICA return macro ACPICA: Fix a module for excessive debug output ACPICA: Update some function headers, no funtional change ACPICA: Disassembler: Enhance resource descriptor detection i2c: designware: Add ACPI HID for Hisilicon Hip07/08 I2C controller ACPI / APD: Add clock frequency for Hisilicon Hip07/08 I2C controller ACPI / bus: Add INT0002 to list of always-present devices ... commit 2e4ab937ec49a6616e7354ccf4b18e4373f5f8a3 Merge: b948abf 80449d8 Author: Linus Torvalds Date: Wed May 10 09:12:30 2017 -0700 Merge tag 'pm-extra-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These add new CPU IDs to a couple of drivers, fix a possible NULL pointer dereference in the cpuidle core, update DT-related things in the generic power domains framework and finally update the suspend/resume infrastructure to improve the handling of wakeups from suspend-to-idle. Specifics: - Add Intel Gemini Lake CPU IDs to the intel_idle and intel_rapl drivers (David Box). - Add a NULL pointer check to the cpuidle core to prevent it from crashing on platforms with incomplete cpuidle configuration (Fei Li). - Fix DT-related documentation in the generic power domains (genpd) framework and add a MAINTAINERS entry for DT-related material in genpd (Viresh Kumar). - Update the system suspend/resume infrastructure to improve the handling of aborts of suspend transitions in progress in the wakeup framework and rework the suspend-to-idle core loop to make it possible to filter out spurious wakeup events (specifically the ones coming from ACPI) without resuming all the way up to user space every time (Rafael Wysocki)" * tag 'pm-extra-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle PM / wakeup: Integrate mechanism to abort transitions in progress x86/intel_idle: add Gemini Lake support cpuidle: check dev before usage in cpuidle_use_deepest_state() powercap: intel_rapl: Add support for Gemini Lake PM / Domains: Add DT file to MAINTAINERS PM / Domains: Fix DT example commit b948abf53a381a0c681aadd612e2affba47f62bc Merge: a2e5ad4 65f2673 Author: Linus Torvalds Date: Wed May 10 09:03:48 2017 -0700 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs update from Miklos Szeredi: "The biggest part of this is making st_dev/st_ino on the overlay behave like a normal filesystem (i.e. st_ino doesn't change on copy up, st_dev is the same for all files and directories). Currently this only works if all layers are on the same filesystem, but future work will move the general case towards more sane behavior. There are also miscellaneous fixes, including fixes to handling append-only files. There's a small change in the VFS, but that only has an effect on overlayfs, since otherwise file->f_path.dentry->inode and file_inode(file) are always the same" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: update documentation w.r.t. constant inode numbers ovl: persistent inode numbers for upper hardlinks ovl: merge getattr for dir and nondir ovl: constant st_ino/st_dev across copy up ovl: persistent inode number for directories ovl: set the ORIGIN type flag ovl: lookup non-dir copy-up-origin by file handle ovl: use an auxiliary var for overlay root entry ovl: store file handle of lower inode on copy up ovl: check if all layers are on the same fs ovl: do not set overlay.opaque on non-dir create ovl: check IS_APPEND() on real upper inode vfs: ftruncate check IS_APPEND() on real upper inode ovl: Use designated initializers ovl: lockdep annotate of nested stacked overlayfs inode lock commit a2e5ad45a9741068f357de4dbff50bb37c233e1b Merge: 26c5eaa 0b6e9ea Author: Linus Torvalds Date: Wed May 10 08:45:30 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse updates from Miklos Szeredi: "Support for pid namespaces from Seth and refcount_t work from Elena" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: Add support for pid namespaces fuse: convert fuse_conn.count from atomic_t to refcount_t fuse: convert fuse_req.count from atomic_t to refcount_t fuse: convert fuse_file.count from atomic_t to refcount_t commit 26c5eaa1326e9703effd01e7cc3cc0d4ad4b3c19 Merge: 1176032 eeca958 Author: Linus Torvalds Date: Wed May 10 08:42:33 2017 -0700 Merge tag 'ceph-for-4.12-rc1' of git://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "The two main items are support for disabling automatic rbd exclusive lock transfers from myself and the long awaited -ENOSPC handling series from Jeff. The former will allow rbd users to take advantage of exclusive lock's built-in blacklist/break-lock functionality while staying in control of who owns the lock. With the latter in place, we will abort filesystem writes on -ENOSPC instead of having them block indefinitely. Beyond that we've got the usual pile of filesystem fixes from Zheng, some refcount_t conversion patches from Elena and a patch for an ancient open() flags handling bug from Alexander" * tag 'ceph-for-4.12-rc1' of git://github.com/ceph/ceph-client: (31 commits) ceph: fix memory leak in __ceph_setxattr() ceph: fix file open flags on ppc64 ceph: choose readdir frag based on previous readdir reply rbd: exclusive map option rbd: return ResponseMessage result from rbd_handle_request_lock() rbd: kill rbd_is_lock_supported() rbd: support updating the lock cookie without releasing the lock rbd: store lock cookie rbd: ignore unlock errors rbd: fix error handling around rbd_init_disk() rbd: move rbd_unregister_watch() call into rbd_dev_image_release() rbd: move rbd_dev_destroy() call out of rbd_dev_image_release() ceph: when seeing write errors on an inode, switch to sync writes Revert "ceph: SetPageError() for writeback pages if writepages fails" ceph: handle epoch barriers in cap messages libceph: add an epoch_barrier field to struct ceph_osd_client libceph: abort already submitted but abortable requests when map or pool goes full libceph: allow requests to return immediately on full conditions if caller wishes libceph: remove req->r_replay_version ceph: make seeky readdir more efficient ... commit 1176032cb12bb89ad558a3e57e82f2f25b817eff Merge: 56868a4 9bcaaea Author: Linus Torvalds Date: Wed May 10 08:33:17 2017 -0700 Merge branch 'for-linus-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs updates from Chris Mason: "This has fixes and cleanups Dave Sterba collected for the merge window. The biggest functional fixes are between btrfs raid5/6 and scrub, and raid5/6 and device replacement. Some of our pending qgroup fixes are included as well while I bash on the rest in testing. We also have the usual set of cleanups, including one that makes __btrfs_map_block() much more maintainable, and conversions from atomic_t to refcount_t" * 'for-linus-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (71 commits) btrfs: fix the gfp_mask for the reada_zones radix tree Btrfs: fix reported number of inode blocks Btrfs: send, fix file hole not being preserved due to inline extent Btrfs: fix extent map leak during fallocate error path Btrfs: fix incorrect space accounting after failure to insert inline extent Btrfs: fix invalid attempt to free reserved space on failure to cow range btrfs: Handle delalloc error correctly to avoid ordered extent hang btrfs: Fix metadata underflow caused by btrfs_reloc_clone_csum error btrfs: check if the device is flush capable btrfs: delete unused member nobarriers btrfs: scrub: Fix RAID56 recovery race condition btrfs: scrub: Introduce full stripe lock for RAID56 btrfs: Use ktime_get_real_ts for root ctime Btrfs: handle only applicable errors returned by btrfs_get_extent btrfs: qgroup: Fix qgroup corruption caused by inode_cache mount option btrfs: use q which is already obtained from bdev_get_queue Btrfs: switch to div64_u64 if with a u64 divisor Btrfs: update scrub_parity to use u64 stripe_len Btrfs: enable repair during read for raid56 profile btrfs: use clear_page where appropriate ... commit 09062ae1bb1c4a84e382560ff5059803d263a6c8 Author: Alex Deucher Date: Tue May 9 13:08:39 2017 -0400 drm/amdgpu: add some additional vega10 pci ids Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit bfc181af3b3978e4b9619e3b46b1c4f7e5adb43a Author: Alex Deucher Date: Fri May 5 10:26:12 2017 -0400 drm/amdgpu/soc15: use atomfirmware for setting bios scratch for reset Need to use the atomfirmware interface rather than atombios since soc15 is atomfirmware based. Reviewed-by: Chunming Zhou Acked-by: Harry Wentland Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit de70c6357be23261c18fcccfd2ad148512fedd28 Author: Alex Deucher Date: Fri May 5 10:21:36 2017 -0400 drm/amdgpu/atomfirmware: add function to update engine hang status Update the scratch reg for when the engine is hung. Reviewed-by: Chunming Zhou Acked-by: Harry Wentland Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 13 +++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h | 2 ++ 2 files changed, 15 insertions(+) commit 634b6a8a064576797120b74facf95ba79283b5d5 Author: Julien Isorce Date: Thu Apr 27 15:10:08 2017 +0100 drm/radeon: only warn once in radeon_ttm_bo_destroy if va list not empty Encountered a dozen of exact same backtraces when mesa's pb_cache_release_all_buffers is called after that a gpu reset failed. v2: Remove superfluous error message added in v1. bug: https://bugs.freedesktop.org/show_bug.cgi?id=96271 Signed-off-by: Julien Isorce Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e18c637fa3e2f6836a4034c80ca0a86be968efc Author: Nicolas Dichtel Date: Mon Mar 27 14:20:17 2017 +0200 arch/include: remove empty Kbuild files Signed-off-by: Nicolas Dichtel Signed-off-by: Masahiro Yamada arch/cris/include/arch-v10/arch/Kbuild | 1 - arch/cris/include/arch-v32/arch/Kbuild | 1 - arch/tile/include/arch/Kbuild | 1 - 3 files changed, 3 deletions(-) commit 61562f981e9284ff7dfb2769d89c750986a5f677 Author: Nicolas Dichtel Date: Mon Mar 27 14:20:16 2017 +0200 uapi: export all arch specifics directories This patch removes the need of subdir-y. Now all files/directories under arch//include/uapi/ are exported. The only change for userland is the layout of the command 'make headers_install_all': directories asm- are replaced by arch-/. Those new directories contains all files/directories of the specified arch. Note that only cris and tile have more directories than only asm: - arch-v[10|32] for cris; - arch for tile. Signed-off-by: Nicolas Dichtel Signed-off-by: Masahiro Yamada Documentation/kbuild/makefiles.txt | 15 +-------------- Makefile | 6 +++--- arch/cris/include/uapi/asm/Kbuild | 3 --- arch/tile/include/uapi/asm/Kbuild | 2 -- scripts/Makefile.headersinst | 3 +-- 5 files changed, 5 insertions(+), 24 deletions(-) commit fcc8487d477a3452a1d0ccbdd4c5e0e1e3cb8bed Author: Nicolas Dichtel Date: Mon Mar 27 14:20:15 2017 +0200 uapi: export all headers under uapi directories Regularly, when a new header is created in include/uapi/, the developer forgets to add it in the corresponding Kbuild file. This error is usually detected after the release is out. In fact, all headers under uapi directories should be exported, thus it's useless to have an exhaustive list. After this patch, the following files, which were not exported, are now exported (with make headers_install_all): asm-arc/kvm_para.h asm-arc/ucontext.h asm-blackfin/shmparam.h asm-blackfin/ucontext.h asm-c6x/shmparam.h asm-c6x/ucontext.h asm-cris/kvm_para.h asm-h8300/shmparam.h asm-h8300/ucontext.h asm-hexagon/shmparam.h asm-m32r/kvm_para.h asm-m68k/kvm_para.h asm-m68k/shmparam.h asm-metag/kvm_para.h asm-metag/shmparam.h asm-metag/ucontext.h asm-mips/hwcap.h asm-mips/reg.h asm-mips/ucontext.h asm-nios2/kvm_para.h asm-nios2/ucontext.h asm-openrisc/shmparam.h asm-parisc/kvm_para.h asm-powerpc/perf_regs.h asm-sh/kvm_para.h asm-sh/ucontext.h asm-tile/shmparam.h asm-unicore32/shmparam.h asm-unicore32/ucontext.h asm-x86/hwcap2.h asm-xtensa/kvm_para.h drm/armada_drm.h drm/etnaviv_drm.h drm/vgem_drm.h linux/aspeed-lpc-ctrl.h linux/auto_dev-ioctl.h linux/bcache.h linux/btrfs_tree.h linux/can/vxcan.h linux/cifs/cifs_mount.h linux/coresight-stm.h linux/cryptouser.h linux/fsmap.h linux/genwqe/genwqe_card.h linux/hash_info.h linux/kcm.h linux/kcov.h linux/kfd_ioctl.h linux/lightnvm.h linux/module.h linux/nbd-netlink.h linux/nilfs2_api.h linux/nilfs2_ondisk.h linux/nsfs.h linux/pr.h linux/qrtr.h linux/rpmsg.h linux/sched/types.h linux/sed-opal.h linux/smc.h linux/smc_diag.h linux/stm.h linux/switchtec_ioctl.h linux/vfio_ccw.h linux/wil6210_uapi.h rdma/bnxt_re-abi.h Note that I have removed from this list the files which are generated in every exported directories (like .install or .install.cmd). Thanks to Julien Floret for the tip to get all subdirs with a pure makefile command. For the record, note that exported files for asm directories are a mix of files listed by: - include/uapi/asm-generic/Kbuild.asm; - arch//include/uapi/asm/Kbuild; - arch//include/asm/Kbuild. Signed-off-by: Nicolas Dichtel Acked-by: Daniel Vetter Acked-by: Russell King Acked-by: Mark Salter Acked-by: Michael Ellerman (powerpc) Signed-off-by: Masahiro Yamada Documentation/kbuild/makefiles.txt | 66 ++-- arch/alpha/include/uapi/asm/Kbuild | 41 --- arch/arc/include/uapi/asm/Kbuild | 3 - arch/arm/include/uapi/asm/Kbuild | 17 - arch/arm64/include/uapi/asm/Kbuild | 18 - arch/blackfin/include/uapi/asm/Kbuild | 17 - arch/c6x/include/uapi/asm/Kbuild | 8 - arch/cris/include/uapi/arch-v10/arch/Kbuild | 5 - arch/cris/include/uapi/arch-v32/arch/Kbuild | 3 - arch/cris/include/uapi/asm/Kbuild | 43 +-- arch/frv/include/uapi/asm/Kbuild | 33 -- arch/h8300/include/uapi/asm/Kbuild | 28 -- arch/hexagon/include/asm/Kbuild | 3 - arch/hexagon/include/uapi/asm/Kbuild | 13 - arch/ia64/include/uapi/asm/Kbuild | 45 --- arch/m32r/include/uapi/asm/Kbuild | 31 -- arch/m68k/include/uapi/asm/Kbuild | 24 -- arch/metag/include/uapi/asm/Kbuild | 8 - arch/microblaze/include/uapi/asm/Kbuild | 32 -- arch/mips/include/uapi/asm/Kbuild | 37 --- arch/mn10300/include/uapi/asm/Kbuild | 32 -- arch/nios2/include/uapi/asm/Kbuild | 3 +- arch/openrisc/include/asm/Kbuild | 3 - arch/openrisc/include/uapi/asm/Kbuild | 8 - arch/parisc/include/uapi/asm/Kbuild | 28 -- arch/powerpc/include/uapi/asm/Kbuild | 45 --- arch/s390/include/uapi/asm/Kbuild | 46 --- arch/score/include/asm/Kbuild | 3 - arch/score/include/uapi/asm/Kbuild | 32 -- arch/sh/include/uapi/asm/Kbuild | 23 -- arch/sparc/include/uapi/asm/Kbuild | 48 --- arch/tile/include/asm/Kbuild | 3 - arch/tile/include/uapi/arch/Kbuild | 17 - arch/tile/include/uapi/asm/Kbuild | 19 +- arch/unicore32/include/uapi/asm/Kbuild | 6 - arch/x86/include/uapi/asm/Kbuild | 58 ---- arch/xtensa/include/uapi/asm/Kbuild | 23 -- include/Kbuild | 2 - include/asm-generic/Kbuild.asm | 1 - include/scsi/fc/Kbuild | 0 include/uapi/Kbuild | 15 - include/uapi/asm-generic/Kbuild | 36 -- include/uapi/asm-generic/Kbuild.asm | 76 ++--- include/uapi/drm/Kbuild | 23 -- include/uapi/linux/Kbuild | 494 +--------------------------- include/uapi/linux/android/Kbuild | 2 - include/uapi/linux/byteorder/Kbuild | 3 - include/uapi/linux/caif/Kbuild | 3 - include/uapi/linux/can/Kbuild | 6 - include/uapi/linux/dvb/Kbuild | 9 - include/uapi/linux/hdlc/Kbuild | 2 - include/uapi/linux/hsi/Kbuild | 2 - include/uapi/linux/iio/Kbuild | 3 - include/uapi/linux/isdn/Kbuild | 2 - include/uapi/linux/mmc/Kbuild | 2 - include/uapi/linux/netfilter/Kbuild | 89 ----- include/uapi/linux/netfilter/ipset/Kbuild | 5 - include/uapi/linux/netfilter_arp/Kbuild | 3 - include/uapi/linux/netfilter_bridge/Kbuild | 18 - include/uapi/linux/netfilter_ipv4/Kbuild | 10 - include/uapi/linux/netfilter_ipv6/Kbuild | 13 - include/uapi/linux/nfsd/Kbuild | 6 - include/uapi/linux/raid/Kbuild | 3 - include/uapi/linux/spi/Kbuild | 2 - include/uapi/linux/sunrpc/Kbuild | 2 - include/uapi/linux/tc_act/Kbuild | 16 - include/uapi/linux/tc_ematch/Kbuild | 5 - include/uapi/linux/usb/Kbuild | 12 - include/uapi/linux/wimax/Kbuild | 2 - include/uapi/misc/Kbuild | 2 - include/uapi/mtd/Kbuild | 6 - include/uapi/rdma/Kbuild | 20 -- include/uapi/rdma/hfi/Kbuild | 3 - include/uapi/scsi/Kbuild | 6 - include/uapi/scsi/fc/Kbuild | 5 - include/uapi/sound/Kbuild | 16 - include/uapi/video/Kbuild | 4 - include/uapi/xen/Kbuild | 5 - include/video/Kbuild | 0 scripts/Makefile.headersinst | 55 ++-- 80 files changed, 111 insertions(+), 1750 deletions(-) commit ea6819e1f2d6c30624ea067f4b3a50a3cca79d8a Author: Nicolas Dichtel Date: Mon Mar 27 14:20:14 2017 +0200 smc_diag.h: fix include from userland This patch prepares the uapi export by fixing the following error: .../linux/smc_diag.h:6:27: fatal error: rdma/ib_verbs.h: No such file or directory #include Signed-off-by: Nicolas Dichtel Signed-off-by: Masahiro Yamada include/rdma/ib_verbs.h | 3 +-- include/uapi/linux/smc_diag.h | 2 +- include/uapi/rdma/ib_user_verbs.h | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) commit 3a4e7f56ca6cd66e69a159073584434b2e639c71 Author: Nicolas Dichtel Date: Mon Mar 27 14:20:12 2017 +0200 btrfs_tree.h: fix include from userland This patch prepares the uapi export by fixing the following errors: .../linux/btrfs_tree.h:283:2: error: #error "UUID items require BTRFS_UUID_SIZE == 16!" #error "UUID items require BTRFS_UUID_SIZE == 16!" .../linux/btrfs_tree.h:390:12: error: ‘BTRFS_UUID_SIZE’ undeclared here (not in a function) __u8 uuid[BTRFS_UUID_SIZE]; ^ .../linux/btrfs_tree.h:796:16: error: ‘BTRFS_DEV_STAT_VALUES_MAX’ undeclared here (not in a function) __le64 values[BTRFS_DEV_STAT_VALUES_MAX]; Signed-off-by: Nicolas Dichtel Signed-off-by: Masahiro Yamada include/uapi/linux/btrfs_tree.h | 1 + 1 file changed, 1 insertion(+) commit 9078b4eea119c13d633d45af0397c821a517b522 Author: Nicolas Dichtel Date: Mon Mar 27 14:20:11 2017 +0200 uapi: includes linux/types.h before exporting files Some files will be exported after a following patch. 0-day tests report the following warning/error: ./usr/include/linux/bcache.h:8: include of is preferred over ./usr/include/linux/bcache.h:11: found __[us]{8,16,32,64} type without #include ./usr/include/linux/qrtr.h:8: found __[us]{8,16,32,64} type without #include ./usr/include/linux/cryptouser.h:39: found __[us]{8,16,32,64} type without #include ./usr/include/linux/pr.h:14: found __[us]{8,16,32,64} type without #include ./usr/include/linux/btrfs_tree.h:337: found __[us]{8,16,32,64} type without #include ./usr/include/rdma/bnxt_re-abi.h:45: found __[us]{8,16,32,64} type without #include Signed-off-by: Nicolas Dichtel Signed-off-by: Masahiro Yamada include/uapi/linux/bcache.h | 2 +- include/uapi/linux/btrfs_tree.h | 2 ++ include/uapi/linux/cryptouser.h | 2 ++ include/uapi/linux/pr.h | 2 ++ include/uapi/linux/qrtr.h | 1 + include/uapi/rdma/bnxt_re-abi.h | 2 ++ 6 files changed, 10 insertions(+), 1 deletion(-) commit bd73a328cbb5731000bb3fd876189d9395c0cd61 Author: Nicolas Dichtel Date: Mon Mar 27 14:20:10 2017 +0200 Makefile.headersinst: remove destination-y option This option was added in commit c7bb349e7c25 ("kbuild: introduce destination-y for exported headers") but never used in-tree. Signed-off-by: Nicolas Dichtel Acked-by: Paul Bolle Signed-off-by: Masahiro Yamada Documentation/kbuild/makefiles.txt | 23 ++++------------------- scripts/Makefile.headersinst | 2 +- 2 files changed, 5 insertions(+), 20 deletions(-) commit 7c025b2afc96b4a3fddff1dc9fbe3685953e38b4 Author: Nicolas Dichtel Date: Mon Mar 27 14:20:09 2017 +0200 Makefile.headersinst: cleanup input files After the last three patches, all exported headers are under uapi/, thus input-files2 are not needed anymore. The side effect is that input-files1-name is exactly header-y. Note also that input-files3-name is genhdr-y. Signed-off-by: Nicolas Dichtel Signed-off-by: Masahiro Yamada scripts/Makefile.headersinst | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) commit 25dc1d6cc3082aab293e5dad47623b550f7ddd2a Author: Nicolas Dichtel Date: Mon Mar 27 14:20:08 2017 +0200 x86: stop exporting msr-index.h to userland Even if this file was not in an uapi directory, it was exported because it was listed in the Kbuild file. Fixes: b72e7464e4cf ("x86/uapi: Do not export as part of the user API headers") Suggested-by: Borislav Petkov Signed-off-by: Nicolas Dichtel Acked-by: Ingo Molnar Acked-by: Thomas Gleixner Signed-off-by: Masahiro Yamada arch/x86/include/uapi/asm/Kbuild | 1 - 1 file changed, 1 deletion(-) commit 4f4ddad395b04c051fcf76687dd558228e605b6f Author: Nicolas Dichtel Date: Mon Mar 27 14:20:07 2017 +0200 nios2: put setup.h in uapi This header file is exported, but from a userland pov, it's just a wrapper to asm-generic/setup.h. Signed-off-by: Nicolas Dichtel Reviewed-by: Tobias Klauser Signed-off-by: Masahiro Yamada arch/nios2/include/uapi/asm/Kbuild | 1 + 1 file changed, 1 insertion(+) commit 37835671c43b82bdfed628a6a37284a117bda17d Author: Nicolas Dichtel Date: Mon Mar 27 14:20:06 2017 +0200 h8300: put bitsperlong.h in uapi This header file is exported, thus move it to uapi. Signed-off-by: Nicolas Dichtel Signed-off-by: Masahiro Yamada arch/h8300/include/asm/bitsperlong.h | 14 -------------- arch/h8300/include/uapi/asm/bitsperlong.h | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) commit f36ea50ca0043e7b1204feaf1d2ba6bd68c08d36 Author: Wen Xiong Date: Wed May 10 08:54:11 2017 -0500 blk-mq: NVMe 512B/4K+T10 DIF/DIX format returns I/O error on dd with split op When formatting NVMe to 512B/4K + T10 DIf/DIX, dd with split op returns "Input/output error". Looks block layer split the bio after calling bio_integrity_prep(bio). This patch fixes the issue. Below is how we debug this issue: (1)format nvme to 4K block # size with type 2 DIF (2)dd with block size bigger than 1024k. oflag=direct dd: error writing '/dev/nvme0n1': Input/output error We added some debug code in nvme device driver. It showed us the first op and the second op have the same bi and pi address. This is not correct. 1st op: nvme0n1 Op:Wr slba 0x505 length 0x100, PI ctrl=0x1400, dsmgmt=0x0, AT=0x0 & RT=0x505 Guard 0x00b1, AT 0x0000, RT physical 0x00000505 RT virtual 0x00002828 2nd op: nvme0n1 Op:Wr slba 0x605 length 0x1, PI ctrl=0x1400, dsmgmt=0x0, AT=0x0 & RT=0x605 ==> This op fails and subsequent 5 retires.. Guard 0x00b1, AT 0x0000, RT physical 0x00000605 RT virtual 0x00002828 With the fix, It showed us both of the first op and the second op have correct bi and pi address. 1st op: nvme2n1 Op:Wr slba 0x505 length 0x100, PI ctrl=0x1400, dsmgmt=0x0, AT=0x0 & RT=0x505 Guard 0x5ccb, AT 0x0000, RT physical 0x00000505 RT virtual 0x00002828 2nd op: nvme2n1 Op:Wr slba 0x605 length 0x1, PI ctrl=0x1400, dsmgmt=0x0, AT=0x0 & RT=0x605 Guard 0xab4c, AT 0x0000, RT physical 0x00000605 RT virtual 0x00003028 Signed-off-by: Wen Xiong Signed-off-by: Jens Axboe block/blk-mq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d3738123986954ba3abbd96b595f5176b50c3f5d Author: Jens Axboe Date: Tue May 9 11:39:56 2017 -0600 blk-stat: don't use this_cpu_ptr() in a preemptable section If PREEMPT_RCU is enabled, rcu_read_lock() isn't strong enough for us to use this_cpu_ptr() in that section. Use the safer get/put_cpu_ptr() variants instead. Reported-by: Mike Galbraith Fixes: 34dbad5d26e2 ("blk-stat: convert to callback-based statistics reporting") Signed-off-by: Jens Axboe block/blk-stat.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 340ff3216799a947fe0b07bed8f0409ffc716be9 Author: Jens Axboe Date: Wed May 10 07:40:04 2017 -0600 elevator: remove redundant warnings on IO scheduler switch We warn twice for switching to a scheduler, if that switch fails. As we also report the failure in the return value to the sysfs write, remove the dmesg induced failures. Keep the failure print for warning to switch to the kconfig selected IO scheduler, as we can't report errors for that in any other way. Signed-off-by: Jens Axboe block/elevator.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 43c1b3d6e536b7b21ed329ae54280d8ba308ba92 Author: Paolo Valente Date: Tue May 9 12:54:23 2017 +0200 block, bfq: stress that low_latency must be off to get max throughput The introduction of the BFQ and Kyber I/O schedulers has triggered a new wave of I/O benchmarks. Unfortunately, comments and discussions on these benchmarks confirm that there is still little awareness that it is very hard to achieve, at the same time, a low latency and a high throughput. In particular, virtually all benchmarks measure throughput, or throughput-related figures of merit, but, for BFQ, they use the scheduler in its default configuration. This configuration is geared, instead, toward a low latency. This is evidently a sign that BFQ documentation is still too unclear on this important aspect. This commit addresses this issue by stressing how BFQ configuration must be (easily) changed if the only goal is maximum throughput. Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe Documentation/block/bfq-iosched.txt | 17 ++++++++++++++++- block/bfq-iosched.c | 5 +++++ 2 files changed, 21 insertions(+), 1 deletion(-) commit a66c38a171ed25488debf80247a9e72e1026e82c Author: Paolo Valente Date: Tue May 9 11:37:27 2017 +0200 block, bfq: use pointer entity->sched_data only if set In the function __bfq_deactivate_entity, the pointer entity->sched_data could happen to be used before being properly initialized. This led to a NULL pointer dereference. This commit fixes this bug by just using this pointer only where it is safe to do so. Reported-by: Tom Harrison Tested-by: Tom Harrison Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-wf2q.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit fba704b494fdc6816a039a66887274b4e5c00eeb Author: Rakesh Pandit Date: Tue May 9 08:48:25 2017 -0600 nvme: lightnvm: fix memory leak Free up kmalloc allocated memory if failure happens while handling L2P table transfer in nvme_nvm_get_l2p_tbl. Fixes: 8e79b5cb ("lightnvm: move block provisioning to targets") Signed-off-by: Rakesh Pandit Reviewed-by: Javier González Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6cde26fda11b3e7bcc17574c6a71e96ac40f2573 Merge: faec5ea d2718d1 Author: Arnd Bergmann Date: Wed May 10 15:36:43 2017 +0200 Merge tag 'mvebu-arm64-4.12-1' of git://git.infradead.org/linux-mvebu into fixes Merge "mvebu arm64 for 4.12" from Gregory CLEMENT: enable the Armada 37xx pinctrl driver * tag 'mvebu-arm64-4.12-1' of git://git.infradead.org/linux-mvebu: arm64: marvell: enable the Armada 37xx pinctrl driver commit faec5ea6cbbe1c88e0351c249130ad38d7bc71a9 Merge: 9dfe29d 6a68078 Author: Arnd Bergmann Date: Wed May 10 15:35:01 2017 +0200 Merge tag 'mvebu-dt64-4.12-3' of git://git.infradead.org/linux-mvebu into fixes Pull "mvebu dt64 for 4.12 (part 3)" from Gregory CLEMENT: pinctrl and GPIO description for Armada 37xx SoCs * tag 'mvebu-dt64-4.12-3' of git://git.infradead.org/linux-mvebu: ARM64: dts: marvell: armada37xx: add pinctrl definition ARM64: dts: marvell: Add pinctrl nodes for Armada 3700 commit 9dfe29d9d2b07ef3fe683d64f57ca06f03e17805 Merge: e942661 7b4ccb3 Author: Arnd Bergmann Date: Wed May 10 15:33:45 2017 +0200 Merge tag 'renesas-fixes-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes Pull "Renesas ARM Based SoC Fixes for v4.12" from Simon Horman: * Provide dummy rcar_rst_read_mode_pins() for compile-testing * tag 'renesas-fixes-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: soc: renesas: Provide dummy rcar_rst_read_mode_pins() for compile-testing commit 960013762df0a214b57f2fce655422fb52bdfd2c Author: Jeeja KP Date: Wed May 10 11:51:58 2017 +0530 ALSA: hda: Fix cpu lockup when stopping the cmd dmas Using jiffies in hdac_wait_for_cmd_dmas() to determine when to time out when interrupts are off (snd_hdac_bus_stop_cmd_io()/spin_lock_irq()) causes hard lockup so unlock while waiting using jiffies. ---<-snip->--- <0>[ 1211.603046] NMI watchdog: Watchdog detected hard LOCKUP on cpu 3 <4>[ 1211.603047] Modules linked in: snd_hda_intel i915 vgem <4>[ 1211.603053] irq event stamp: 13366 <4>[ 1211.603053] hardirqs last enabled at (13365): ... <4>[ 1211.603059] Call Trace: <4>[ 1211.603059] ? delay_tsc+0x3d/0xc0 <4>[ 1211.603059] __delay+0xa/0x10 <4>[ 1211.603060] __const_udelay+0x31/0x40 <4>[ 1211.603060] snd_hdac_bus_stop_cmd_io+0x96/0xe0 [snd_hda_core] <4>[ 1211.603060] ? azx_dev_disconnect+0x20/0x20 [snd_hda_intel] <4>[ 1211.603061] snd_hdac_bus_stop_chip+0xb1/0x100 [snd_hda_core] <4>[ 1211.603061] azx_stop_chip+0x9/0x10 [snd_hda_codec] <4>[ 1211.603061] azx_suspend+0x72/0x220 [snd_hda_intel] <4>[ 1211.603061] pci_pm_suspend+0x71/0x140 <4>[ 1211.603062] dpm_run_callback+0x6f/0x330 <4>[ 1211.603062] ? pci_pm_freeze+0xe0/0xe0 <4>[ 1211.603062] __device_suspend+0xf9/0x370 <4>[ 1211.603062] ? dpm_watchdog_set+0x60/0x60 <4>[ 1211.603063] async_suspend+0x1a/0x90 <4>[ 1211.603063] async_run_entry_fn+0x34/0x160 <4>[ 1211.603063] process_one_work+0x1f4/0x6d0 <4>[ 1211.603063] ? process_one_work+0x16e/0x6d0 <4>[ 1211.603064] worker_thread+0x49/0x4a0 <4>[ 1211.603064] kthread+0x107/0x140 <4>[ 1211.603064] ? process_one_work+0x6d0/0x6d0 <4>[ 1211.603065] ? kthread_create_on_node+0x40/0x40 <4>[ 1211.603065] ret_from_fork+0x2e/0x40 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100419 Fixes: 38b19ed7f81ec ("ALSA: hda: fix to wait for RIRB & CORB DMA to set") Reported-by: Marta Lofstedt Suggested-by: Takashi Iwai Signed-off-by: Jeeja KP Acked-by: Vinod Koul CC: stable # 4.7 Signed-off-by: Takashi Iwai sound/hda/hdac_controller.c | 4 ++++ 1 file changed, 4 insertions(+) commit 88b0193d9418c00340e45e0a913a0813bc6c8c96 Author: Will Deacon Date: Tue May 9 18:00:04 2017 +0100 perf/callchain: Force USER_DS when invoking perf_callchain_user() Perf can generate and record a user callchain in response to a synchronous request, such as a tracepoint firing. If this happens under set_fs(KERNEL_DS), then we can end up walking the user stack (and dereferencing/saving whatever we find there) without the protections usually afforded by checks such as access_ok. Rather than play whack-a-mole with each architecture's stack unwinding implementation, fix the root of the problem by ensuring that we force USER_DS when invoking perf_callchain_user from the perf core. Reported-by: Al Viro Signed-off-by: Will Deacon Acked-by: Peter Zijlstra Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/events/callchain.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ae157902aea13926e9596d091cad6bd87b3be084 Author: Ping Gao Date: Wed Apr 19 14:02:31 2017 +0800 drm/i915/gvt: avoid unnecessary vgpu switch It's no need to switch vgpu if next vgpu is the same with current vgpu, otherwise it will make performance drop in some case. v2: correct the comments. Signed-off-by: Ping Gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/sched_policy.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit de1892b887eeb85ce458a93979c2108e6f329618 Author: Steve French Date: Thu May 4 07:54:04 2017 -0500 Don't delay freeing mids when blocked on slow socket write of request When processing responses, and in particular freeing mids (DeleteMidQEntry), which is very important since it also frees the associated buffers (cifs_buf_release), we can block a long time if (writes to) socket is slow due to low memory or networking issues. We can block in send (smb request) waiting for memory, and be blocked in processing responess (which could free memory if we let it) - since they both grab the server->srv_mutex. In practice, in the DeleteMidQEntry case - there is no reason we need to grab the srv_mutex so remove these around DeleteMidQEntry, and it allows us to free memory faster. Signed-off-by: Steve French Acked-by: Pavel Shilovsky fs/cifs/cifssmb.c | 7 ------- fs/cifs/smb2pdu.c | 7 ------- fs/cifs/transport.c | 2 -- 3 files changed, 16 deletions(-) commit 560d388950ceda5e7c7cdef7f3d9a8ff297bbf9d Author: Rabin Vincent Date: Wed May 3 17:17:21 2017 +0200 CIFS: silence lockdep splat in cifs_relock_file() cifs_relock_file() can perform a down_write() on the inode's lock_sem even though it was already performed in cifs_strict_readv(). Lockdep complains about this. AFAICS, there is no problem here, and lockdep just needs to be told that this nesting is OK. ============================================= [ INFO: possible recursive locking detected ] 4.11.0+ #20 Not tainted --------------------------------------------- cat/701 is trying to acquire lock: (&cifsi->lock_sem){++++.+}, at: cifs_reopen_file+0x7a7/0xc00 but task is already holding lock: (&cifsi->lock_sem){++++.+}, at: cifs_strict_readv+0x177/0x310 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&cifsi->lock_sem); lock(&cifsi->lock_sem); *** DEADLOCK *** May be due to missing lock nesting notation 1 lock held by cat/701: #0: (&cifsi->lock_sem){++++.+}, at: cifs_strict_readv+0x177/0x310 stack backtrace: CPU: 0 PID: 701 Comm: cat Not tainted 4.11.0+ #20 Call Trace: dump_stack+0x85/0xc2 __lock_acquire+0x17dd/0x2260 ? trace_hardirqs_on_thunk+0x1a/0x1c ? preempt_schedule_irq+0x6b/0x80 lock_acquire+0xcc/0x260 ? lock_acquire+0xcc/0x260 ? cifs_reopen_file+0x7a7/0xc00 down_read+0x2d/0x70 ? cifs_reopen_file+0x7a7/0xc00 cifs_reopen_file+0x7a7/0xc00 ? printk+0x43/0x4b cifs_readpage_worker+0x327/0x8a0 cifs_readpage+0x8c/0x2a0 generic_file_read_iter+0x692/0xd00 cifs_strict_readv+0x29f/0x310 generic_file_splice_read+0x11c/0x1c0 do_splice_to+0xa5/0xc0 splice_direct_to_actor+0xfa/0x350 ? generic_pipe_buf_nosteal+0x10/0x10 do_splice_direct+0xb5/0xe0 do_sendfile+0x278/0x3a0 SyS_sendfile64+0xc4/0xe0 entry_SYSCALL_64_fastpath+0x1f/0xbe Signed-off-by: Rabin Vincent Acked-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56868a460b83c0f93d339256a81064d89aadae8e Merge: 7fc22f4 acfead3 Author: Linus Torvalds Date: Tue May 9 15:56:58 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide Pull IDE updates from David Miller: "Two small cleanups in the IDE layer" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide: ide: don't call memcpy with the same source and destination ide: use setup_timer commit 7fc22f45fef00b55d9517e340650b6a0368faff1 Merge: 50fb55d 3c7f6221 Author: Linus Torvalds Date: Tue May 9 15:48:29 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc updates from David Miller: "sparc changes, including a bug fix for handling exceptions during bzero on some sparc64 cpus" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: fix fault handling in NGbzero.S and GENbzero.S sparc: use memdup_user_nul in sun4m LED driver sparc: Remove redundant tests in boot_flags_init(). commit 50fb55d88c999b3c17f93357a009b04d22eda4f7 Merge: 4879b7a 657831f Author: Linus Torvalds Date: Tue May 9 15:42:31 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix multiqueue in stmmac driver on PCI, from Andy Shevchenko. 2) cdc_ncm doesn't actually fully zero out the padding area is allocates on TX, from Jim Baxter. 3) Don't leak map addresses in BPF verifier, from Daniel Borkmann. 4) If we randomize TCP timestamps, we have to do it everywhere including SYN cookies. From Eric Dumazet. 5) Fix "ethtool -S" crash in aquantia driver, from Pavel Belous. 6) Fix allocation size for ntp filter bitmap in bnxt_en driver, from Dan Carpenter. 7) Add missing memory allocation return value check to DSA loop driver, from Christophe Jaillet. 8) Fix XDP leak on driver unload in qed driver, from Suddarsana Reddy Kalluru. 9) Don't inherit MC list from parent inet connection sockets, another syzkaller spotted gem. Fix from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (43 commits) dccp/tcp: do not inherit mc_list from parent qede: Split PF/VF ndos. qed: Correct doorbell configuration for !4Kb pages qed: Tell QM the number of tasks qed: Fix VF removal sequence qede: Fix XDP memory leak on unload net/mlx4_core: Reduce harmless SRIOV error message to debug level net/mlx4_en: Avoid adding steering rules with invalid ring net/mlx4_en: Change the error print to debug print drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comparison DECnet: Use container_of() for embedded struct Revert "ipv4: restore rt->fi for reference counting" net: mdio-mux: bcm-iproc: call mdiobus_free() in error path net: ethernet: ti: cpsw: adjust cpsw fifos depth for fullduplex flow control ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf net: cdc_ncm: Fix TX zero padding stmmac: pci: split out common_default_data() helper stmmac: pci: RX queue routing configuration stmmac: pci: TX and RX queue priority configuration stmmac: pci: set default number of rx and tx queues ... commit 4879b7ae05431ebcd228a4ff25a81120b3d85891 Merge: ecc721a be13ec6 Author: Linus Torvalds Date: Tue May 9 15:40:28 2017 -0700 Merge tag 'dmaengine-4.12-rc1' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine updates from Vinod Koul: "This time again a smaller update consisting of: - support for TI DA8xx dma controller and updates to the cppi driver - updates on bunch of drivers like xilinx, pl08x, stm32-dma, mv_xor, ioat, dmatest" * tag 'dmaengine-4.12-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (35 commits) dmaengine: pl08x: remove lock documentation dmaengine: pl08x: fix pl08x_dma_chan_state documentation dmaengine: pl08x: Use the BIT() macro consistently dmaengine: pl080: Fix some missing kerneldoc dmaengine: pl080: Cut some unused defines dmaengine: dmatest: Add check for supported buffer count (sg_buffers) dmaengine: dmatest: Select DMA_ENGINE_RAID as its needed for the slave_sg test dmaengine: virt-dma: Convert to use list_for_each_entry_safe() dma-debug: use offset_in_page() macro dmaengine: mv_xor: use offset_in_page() macro dmaengine: dmatest: use offset_in_page() macro dmaengine: sun4i: fix invalid argument dmaengine: ioat: use setup_timer dmaengine: cppi41: Fix an Oops happening in cppi41_dma_probe() dmaengine: pl330: remove pdata based initialization dmaengine: cppi: fix build error due to bad variable dmaengine: imx-sdma: add 1ms delay to ensure SDMA channel is stopped dmaengine: cppi41: use managed functions devm_*() dmaengine: cppi41: fix cppi41_dma_tx_status() logic dmaengine: qcom_hidma: pause the channel on shutdown ... commit ecc721a72c121e8b641d68efd24a225abedb9a30 Merge: 28b4780 97512ce Author: Linus Torvalds Date: Tue May 9 15:34:20 2017 -0700 Merge tag 'pwm/for-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "Adds a new driver for the PWM controller found on MediaTek SoCs and extends support for the Atmel PWM controller to include the SAMA5D2. Some existing drivers have been migrated to the atomic API and a few others see miscellaneous improvements" * tag 'pwm/for-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: tegra: Read PWM clock source rate in driver init pwm: pca9685: Fix GPIO-only operation pwm: mediatek: Don't explicitly set .owner pwm: tegra: Avoid potential overflow for short periods pwm: tegra: Add support to configure pin state in suspends/resume pwm: tegra: Add DT binding details to configure pin in suspends/resume pwm: tegra: Increase precision in PWM rate calculation pwm: tegra: Use DIV_ROUND_CLOSEST_ULL() instead of local implementation pwm: Add MediaTek PWM support dt-bindings: pwm: Add MediaTek PWM bindings pwm: atmel: Enable PWM on sama5d2 pwm: atmel: Switch to atomic PWM pwm: atmel-hlcdc: Implement the suspend/resume hooks pwm: atmel-hlcdc: Convert to the atomic PWM API commit 28b47809b2171a6cfbab839936b24280639c9f85 Merge: 4a1e31c 2c0248d Author: Linus Torvalds Date: Tue May 9 15:15:47 2017 -0700 Merge tag 'iommu-updates-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU updates from Joerg Roedel: - code optimizations for the Intel VT-d driver - ability to switch off a previously enabled Intel IOMMU - support for 'struct iommu_device' for OMAP, Rockchip and Mediatek IOMMUs - header optimizations for IOMMU core code headers and a few fixes that became necessary in other parts of the kernel because of that - ACPI/IORT updates and fixes - Exynos IOMMU optimizations - updates for the IOMMU dma-api code to bring it closer to use per-cpu iova caches - new command-line option to set default domain type allocated by the iommu core code - another command line option to allow the Intel IOMMU switched off in a tboot environment - ARM/SMMU: TLB sync optimisations for SMMUv2, Support for using an IDENTITY domain in conjunction with DMA ops, Support for SMR masking, Support for 16-bit ASIDs (was previously broken) - various other small fixes and improvements * tag 'iommu-updates-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (63 commits) soc/qbman: Move dma-mapping.h include to qman_priv.h soc/qbman: Fix implicit header dependency now causing build fails iommu: Remove trace-events include from iommu.h iommu: Remove pci.h include from trace/events/iommu.h arm: dma-mapping: Don't override dma_ops in arch_setup_dma_ops() ACPI/IORT: Fix CONFIG_IOMMU_API dependency iommu/vt-d: Don't print the failure message when booting non-kdump kernel iommu: Move report_iommu_fault() to iommu.c iommu: Include device.h in iommu.h x86, iommu/vt-d: Add an option to disable Intel IOMMU force on iommu/arm-smmu: Return IOVA in iova_to_phys when SMMU is bypassed iommu/arm-smmu: Correct sid to mask iommu/amd: Fix incorrect error handling in amd_iommu_bind_pasid() iommu: Make iommu_bus_notifier return NOTIFY_DONE rather than error code omap3isp: Remove iommu_group related code iommu/omap: Add iommu-group support iommu/omap: Make use of 'struct iommu_device' iommu/omap: Store iommu_dev pointer in arch_data iommu/omap: Move data structures to omap-iommu.h iommu/omap: Drop legacy-style device support ... commit 46436eb2f9e6ab0770c14292296d133f8907f699 Merge: 8269c73 04434ab 753a448 2bde7c3 8ece1d8 Author: Rafael J. Wysocki Date: Tue May 9 23:23:02 2017 +0200 Merge branches 'acpi-soc', 'acpi-bus', 'acpi-pmic' and 'acpi-power' * acpi-soc: ACPI / LPSS: Call pwm_add_table() for Bay Trail PWM device i2c: designware: Add ACPI HID for Hisilicon Hip07/08 I2C controller ACPI / APD: Add clock frequency for Hisilicon Hip07/08 I2C controller * acpi-bus: ACPI / bus: Add INT0002 to list of always-present devices ACPI / bus: Introduce a list of ids for "always present" devices * acpi-pmic: ACPI / PMIC: xpower: Fix power_table addresses * acpi-power: ACPI / power: Delay turning off unused power resources after suspend commit 8269c734049cf4869c99d63c5d94774db37ca190 Merge: 08be881 bc5150e Author: Rafael J. Wysocki Date: Tue May 9 23:22:36 2017 +0200 Merge branch 'acpica' * acpica: ACPICA: Update version to 20170303 ACPICA: iasl: add ASL conversion tool ACPICA: Local cache support: Allow small cache objects ACPICA: Disassembler: Do not unconditionally remove temporary names ACPICA: iasl: Fix IORT SMMU GSI disassembling ACPICA: Cleanup AML opcode definitions, no functional change ACPICA: Debugger: Add interpreter blocking mark for single-step mode ACPICA: debugger: fix memory leak on Pathname ACPICA: Update for automatic repair code for objects returned by evaluate_object ACPICA: Namespace: fix operand cache leak ACPICA: Fix several incorrect invocations of ACPICA return macro ACPICA: Fix a module for excessive debug output ACPICA: Update some function headers, no funtional change ACPICA: Disassembler: Enhance resource descriptor detection ACPICA: Add non-linux host build support commit 80449d89d4d6d0af4d6d310597e0f4a3fe0c08a9 Merge: 08be881 5e68ebd 1b2e876 eed4d47 4486740 Author: Rafael J. Wysocki Date: Tue May 9 23:21:46 2017 +0200 Merge branches 'pm-domains', 'pm-cpuidle', 'pm-sleep' and 'powercap' * pm-domains: PM / Domains: Add DT file to MAINTAINERS PM / Domains: Fix DT example * pm-cpuidle: x86/intel_idle: add Gemini Lake support cpuidle: check dev before usage in cpuidle_use_deepest_state() * pm-sleep: ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle PM / wakeup: Integrate mechanism to abort transitions in progress * powercap: powercap: intel_rapl: Add support for Gemini Lake commit b550a32e60a4941994b437a8d662432a486235a5 Author: Ari Kauppi Date: Fri May 5 16:07:55 2017 -0400 nfsd: fix undefined behavior in nfsd4_layout_verify UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:1262:34 shift exponent 128 is too large for 32-bit type 'int' Depending on compiler+architecture, this may cause the check for layout_type to succeed for overly large values (which seems to be the case with amd64). The large value will be later used in de-referencing nfsd4_layout_ops for function pointers. Reported-by: Jani Tuovila Signed-off-by: Ari Kauppi [colin.king@canonical.com: use LAYOUT_TYPE_MAX instead of 32] Cc: stable@vger.kernel.org Reviewed-by: Dan Carpenter Reviewed-by: Christoph Hellwig Signed-off-by: J. Bruce Fields fs/nfsd/nfs4proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 76b2a303384e1d6299c3a0249f0f0ce2f8f96017 Author: Trond Myklebust Date: Tue May 9 16:02:57 2017 -0400 pNFS/flexfiles: Always attempt to call layoutstats when flexfiles is enabled Layoutstats is always desirable when using the flexfiles driver, so we should enable it if that driver is being loaded. It is safe to do so, because even when the mount specifies NFSv4.1, we will turn it off if the server tells us it is unsupported. Signed-off-by: Trond Myklebust fs/nfs/flexfilelayout/flexfilelayout.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f4b23de3dda1536590787c9e5c3d16b8738ab108 Author: Trond Myklebust Date: Tue May 9 15:47:15 2017 -0400 NFSv4.1: Work around a Linux server bug... It turns out the Linux server has a bug in its implementation of supattr_exclcreat; it returns the set of all attributes, whether or not they are supported by minor version 1. In order to avoid a regression, we therefore apply the supported_attrs as a mask on top of whatever the server sent us. Reported-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0fe397f0c65d478eea3798ac361736fd91da7022 Author: Helmut Grohne Date: Wed May 3 11:51:46 2017 +0200 docs: update references to the device io book While converting the deviceiobook from DocBook to RST, dangling references were left behind. This commit updates all remaining references to the new location. SeongJae Park improved the ko_KR translation. Fixes: 8a8a602fdb83 ("docs: Convert the deviceio template to RST") Signed-off-by: Helmut Grohne Signed-off-by: SeongJae Park Signed-off-by: Jonathan Corbet Documentation/memory-barriers.txt | 4 ++-- Documentation/translations/ko_KR/memory-barriers.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit f7c864e7ee5c3907d232838f1b4540612252a605 Author: Andre Przywara Date: Thu May 4 00:49:36 2017 +0100 Documentation: earlycon: fix Marvell Armada 3700 UART name The Marvell Armada 3700 UART uses "ar3700_uart" for its earlycon name. Adjust documentation to match the code. Signed-off-by: Andre Przywara Signed-off-by: Jonathan Corbet Documentation/admin-guide/kernel-parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aeb899af65d2d29039ce8f000bced39dd0dacad1 Author: Mauro Carvalho Chehab Date: Tue Apr 11 07:01:19 2017 -0300 docs-rst: add input docs at main index and use kernel-figure The input subsystem documentation got converted into ReST. Add it to the main documentation index and use kernel-figure for the two svg images there. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/index.rst | 1 + Documentation/input/ff.rst | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 657831ffc38e30092a2d5f03d385d710eb88b09a Author: Eric Dumazet Date: Tue May 9 06:29:19 2017 -0700 dccp/tcp: do not inherit mc_list from parent syzkaller found a way to trigger double frees from ip_mc_drop_socket() It turns out that leave a copy of parent mc_list at accept() time, which is very bad. Very similar to commit 8b485ce69876 ("tcp: do not inherit fastopen_req from parent") Initial report from Pray3r, completed by Andrey one. Thanks a lot to them ! Signed-off-by: Eric Dumazet Reported-by: Pray3r Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: David S. Miller net/ipv4/inet_connection_sock.c | 2 ++ 1 file changed, 2 insertions(+) commit 3c7f62212018b904ae17f5636ead18a4dca3a88f Author: Dave Aldridge Date: Tue May 9 02:57:35 2017 -0600 sparc64: fix fault handling in NGbzero.S and GENbzero.S When any of the functions contained in NGbzero.S and GENbzero.S vector through *bzero_from_clear_user, we may end up taking a fault when executing one of the store alternate address space instructions. If this happens, the exception handler does not restore the %asi register. This commit fixes the issue by introducing a new exception handler that ensures the %asi register is restored when a fault is handled. Orabug: 25577560 Signed-off-by: Dave Aldridge Reviewed-by: Rob Gardner Reviewed-by: Babu Moger Signed-off-by: David S. Miller arch/sparc/kernel/head_64.S | 6 ++++++ arch/sparc/lib/GENbzero.S | 2 +- arch/sparc/lib/NGbzero.S | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) commit aed74ea0a09d2e60e4b3fe45caf30f6365b6c9f3 Author: Geliang Tang Date: Sat May 6 23:40:20 2017 +0800 sparc: use memdup_user_nul in sun4m LED driver Use memdup_user_nul() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller arch/sparc/kernel/led.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit e942661130e7221d4aeac9804ff100e7516470f3 Merge: 6f92120 1c08036 Author: Arnd Bergmann Date: Tue May 9 21:14:47 2017 +0200 Merge tag 'v4.11-next-fixes' of https://github.com/mbgg/linux-mediatek into fixes Pull "DTS fixes" from Matthias Brugger: - mt8173: fix mmc parameters - set timer frequency explicitly and force the driver to set it * tag 'v4.11-next-fixes' of https://github.com/mbgg/linux-mediatek: ARM64: dts: mediatek: configure some fixed mmc parameters arm: dts: mt7623: add clock-frequency to the a7 timer node to mt7623.dtsi commit 6f92120892d94ef6c551da5aa2cf7bc9401c9903 Author: Arnd Bergmann Date: Fri Apr 21 23:55:28 2017 +0200 ARM: omap2+: make omap4_get_cpu1_ns_pa_addr declaration usable When CONFIG_PM is disabled, we get a build error: arch/arm/mach-omap2/omap-smp.c: In function 'omap4_smp_maybe_reset_cpu1': arch/arm/mach-omap2/omap-smp.c:309:20: error: implicit declaration of function 'omap4_get_cpu1_ns_pa_addr'; did you mean 'omap4_get_scu_base'? [-Werror=implicit-function-declaration] We need to fix this in multiple files, to ensure the declaration is visible, to actually build the function without CONFIG_PM, and to only call it when OMAP4 and/or OMAP5 are enabled. Fixes: 351b7c490700 ("ARM: omap2+: Revert omap-smp.c changes resetting CPU1 during boot") Signed-off-by: Arnd Bergmann Acked-by: Tony Lindgren arch/arm/mach-omap2/common.h | 3 ++- arch/arm/mach-omap2/omap-mpuss-lowpower.c | 10 +++++----- arch/arm/mach-omap2/omap-smp.c | 11 +++++++---- 3 files changed, 14 insertions(+), 10 deletions(-) commit 4a1e31c68e9f40be32838944931178b0d9ed9162 Merge: c6778ff cf4100d Author: Linus Torvalds Date: Tue May 9 10:10:15 2017 -0700 Merge tag 'arc-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC updates from Vineet Gupta: - AXS10x platform clk updates for I2S, PGU - add region based cache flush operation for ARCv2 cores - enforce PAE40 dependency on HIGHMEM - ptrace support for additional regs in ARCv2 cores - fix build failure in linux-next dut to a header include ordering change * tag 'arc-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: Revert "ARCv2: Allow enabling PAE40 w/o HIGHMEM" ARC: mm: fix build failure in linux-next for UP builds ARCv2: ptrace: provide regset for accumulator/r30 regs elf: Add ARCv2 specific core note section ARCv2: mm: micro-optimize region flush generated code ARCv2: mm: Merge 2 updates to DC_CTRL for region flush ARCv2: mm: Implement cache region flush operations ARC: mm: Move full_page computation into cache version agnostic wrapper arc: axs10x: Fix ARC PGU default clock frequency arc: axs10x: Add DT bindings for I2S audio playback commit 8376efd31d3d7c44bd05be337adde023cc531fa1 Author: Ben Hutchings Date: Tue May 9 18:00:43 2017 +0100 x86, pmem: Fix cache flushing for iovec write < 8 bytes Commit 11e63f6d920d added cache flushing for unaligned writes from an iovec, covering the first and last cache line of a >= 8 byte write and the first cache line of a < 8 byte write. But an unaligned write of 2-7 bytes can still cover two cache lines, so make sure we flush both in that case. Cc: Fixes: 11e63f6d920d ("x86, pmem: fix broken __copy_user_nocache ...") Signed-off-by: Ben Hutchings Signed-off-by: Dan Williams arch/x86/include/asm/pmem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6778ff813d2ca3e3c8733c87dc8b6831a64578b Merge: 0ff4c01 3c0e3ab Author: Linus Torvalds Date: Tue May 9 10:07:33 2017 -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 Olof Johansson: "Device-tree updates for arm64 platforms. Just as with 32-bit, a bunch of smaller changes, but also some new platforms that are worth mentioning: - Rockchip RK3399 platforms for Chromebooks, including Samsung Chromebook Plus (Kevin) - Orange Pi PC2 (Allwinner H5) - Freescale LS2088A and LS1088A SoCs - Expanded support for Nvidia Tegra186 (and Jetson TX2)" * tag 'armsoc-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (180 commits) arm64: dts: Add basic DT to support Spreadtrum's SP9860G arm64: dts: exynos: Use - instead of @ for DT OPP entries arm64: dts: exynos: Add support for s6e3hf2 panel device on TM2e board arm64: dts: juno: add information about L1 and L2 caches arm64: dts: juno: fix few unit address format warnings arm64: marvell: dts: enable the crypto engine on the Armada 8040 DB arm64: marvell: dts: enable the crypto engine on the Armada 7040 DB arm64: marvell: dts: add crypto engine description for 7k/8k arm64: dts: marvell: add sdhci support for Armada 7K/8K arm64: dts: marvell: add eMMC support for Armada 37xx arm64: dts: hisi: add pinctrl dtsi file for HiKey960 development board arm64: dts: hisi: add drive strength levels of the pins for Hi3660 SoC arm64: dts: hisi: enable the NIC and SAS for the hip07-d05 board arm64: dts: hisi: add SAS nodes for the hip07 SoC arm64: dts: hisi: add RoCE nodes for the hip07 SoC arm64: dts: hisi: add network related nodes for the hip07 SoC arm64: dts: hisi: add mbigen nodes for the hip07 SoC arm64: dts: rockchip: fix the memory size of PX5 Evaluation board arm64: dts: hisilicon: add dts files for hi3798cv200-poplar board dt-bindings: arm: hisilicon: add bindings for hi3798cv200 SoC and Poplar board ... commit 0ff4c01b279a590a2826ade9321ad8c7ca5a1b6c Merge: 0160e00 900a902 Author: Linus Torvalds Date: Tue May 9 10:04:17 2017 -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 Olof Johansson: "Changes to platform code for 64-bit ARM platforms. Most of these are small changes to the one defconfig we use on arm64 (no per-platform configs there), to enable new drivers. There are also a few other changes. Broadcom sold off their 'Vulcan' design to Cavium, where it is now called ThunderX2. While we normally don't rename stuff based on marketing's whims, it seemed appropriate to bring in renames on a few things such as MAINTAINERS, etc" * tag 'armsoc-arm64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: arm64: sunxi: always enable reset controller arm64: defconfig: enable the Safexcel crypto engine as a module arm64: configs: enable SDHCI driver for Xenon MAINTAINERS: Broadcom Vulcan is now Cavium ThunderX2 arm64: defconfig: add Allwinner USB PHY arm64: defconfig: enable MVPP2 arm64: defconfig: Enable video, DRM and LPASS drivers for Exynos5433 and Exynos7 arm64: exynos: Enable Exynos PMU and PM domains drivers arm64: only select PINCTRL for Allwinner platforms arm64: set CONFIG_MMC_BCM2835=y in defconfig arm64: defconfig: enable I2C_PXA arm64: defconfig: enable MVNETA ARM64: defconfig: enable the leds-pwm driver and default-on trigger arm64: defconfig: Enable SH Mobile I2C controller commit 0160e00ae8e987be8822745fb166aa76451c9bcc Merge: c81ee18 b6942b6 Author: Linus Torvalds Date: Tue May 9 10:01:15 2017 -0700 Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Olof Johansson: "Driver updates for ARM SoCs: Reset subsystem, merged through arm-soc by tradition: - Make bool drivers explicitly non-modular - New support for i.MX7 and Arria10 reset controllers PATA driver for Palmchip BK371 (acked by Tejun) Power domain drivers for i.MX (GPC, GPCv2) - Moved out of mach-imx for GPC - Bunch of tweaks, fixes, etc PMC support for Tegra186 SoC detection support for Renesas RZ/G1H and RZ/G1N Move Tegra flow controller driver from mach directory to drivers/soc - (Power management / CPU power driver) Misc smaller tweaks for other platforms" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (60 commits) soc: pm-domain: Fix the mangled urls soc: renesas: rcar-sysc: Add support for R-Car H3 ES2.0 soc: renesas: rcar-sysc: Add support for fixing up power area tables soc: renesas: Register SoC device early soc: imx: gpc: add workaround for i.MX6QP to the GPC PD driver dt-bindings: imx-gpc: add i.MX6 QuadPlus compatible soc: imx: gpc: add defines for domain index soc: imx: Add GPCv2 power gating driver dt-bindings: Add GPCv2 power gating driver ARM/clk: move the ICST library to drivers/clk ARM: plat-versatile: remove stale clock header ARM: keystone: Drop PM domain support for k2g soc: ti: Add ti_sci_pm_domains driver dt-bindings: Add TI SCI PM Domains PM / Domains: Do not check if simple providers have phandle cells PM / Domains: Add generic data pointer to genpd data struct soc/tegra: Add initial flowctrl support for Tegra132/210 soc/tegra: flowctrl: Add basic platform driver soc/tegra: Move Tegra flowctrl driver ARM: tegra: Remove unnecessary inclusion of flowctrl header ... commit c81ee18e97e4e3162169a749eb7f2b79b3510c7a Merge: 85d6049 ad8618c Author: Linus Torvalds Date: Tue May 9 09:58:15 2017 -0700 Merge tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM: SoC defconfig updates from Olof Johansson: "We've traditionally kept defconfig updates in a separate branch, often to encourage submaintainers to handle those patches separately to avoid conflicts on the shared files. The amount of changes seem to be decreasing though, so we might rethink how we handle this going forward. There really isn't much to write about here. The bulk of changes here are enabling drivers for whatever platforms the hardware is found on (and multi-configs)" * tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (30 commits) multi_v7_defconfig: make Rockchip usb2-phy built-in ARM: omap2plus_defconfig: Enable droid 4 devices ARM: omap2plus_defconfig: Add QMI, ACM and PPP as loadable modules ARM: configs: aspeed: Add new drivers ARM: configs: aspeed: Update configs for BMC systems ARM: omap2plus_defconfig: Enable TI Ethernet PHY ARM: configs: Add new config fragment to change RAM start point ARM: configs: stm32: Add I2C support multi_v7_defconfig: make Rockchip DRM drivers built-in ARM: configs: stm32: Set CPU_V7M_NUM_IRQ to max value ARM: imx_v6_v7_defconfig: Select SMSC_PHY ARM: davinci_all_defconfig: convert to use libata PATA ARM: qcom_defconfig: Enable Qualcomm remoteproc and related drivers ARM: omap2plus_defconfig: enable ahci-dm816 module arm: set CONFIG_MMC_BCM2835=y in bcm2835_defconfig and multi_v7_defconfig ARM: bcm2835: Enable missing CMA settings for VC4 driver ARM: socfpga: updates for socfpga_defconfig ARM: imx_v6_v7_defconfig: Select hid-multitouchdriver ARM: imx_v6_v7_defconfig: Select max11801_ts touchscreen driver ARM: exynos_defconfig: Increase CONFIG_CMA_SIZE_MBYTES to 96 ... commit 85d604902eb28eaea4f9e0f3a655ae986fa4bd2e Merge: 8d648aa b9f34da Author: Linus Torvalds Date: Tue May 9 09:54:39 2017 -0700 Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM Device-tree updates from Olof Johansson: "Device-tree continues to see lots of updates. The majority of patches here are smaller changes for new hardware on existing platforms, and there are a few larger changes worth pointing out. Major new platforms: - Gemini has been ported to DT, so a handful of "new" platforms moved over from board files - Rockchip RK3288 support for Tinkerboard and Phytec phyCORE-RK3288 SoM and RDK - A bunch of embedded platforms, several Linksys platforms, Synology DS116, - Motorola Droid4 (really old OMAP-based phone) support is added. Some refactorings, i.e. Allwinner H3/H5 support is commonalized. And lots of smaller changes, cleanups, etc. See shortlog for more description We're adding ability to cross-include DT files between arm and arm64, by creating appropriate links in the dt-include directory, and using arm/ and arm64/ as include prefixes. This will avoid other local hacks such as per-file links between the two arch trees (this broke for external mirroring of DT contents). Now they can just provide their own appropriate dt-include hierarcy per platform" * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (349 commits) ARM: dts: exynos: Use - instead of @ for DT OPP entries arm: spear6xx: add DT description of the ADC on SPEAr600 arm: spear6xx: remove unneeded pinctrl properties in spear600-evb arm: spear6xx: switch spear600-evb to the new flash partition DT binding arm: spear6xx: fix spaces in spear600-evb.dts arm: spear6xx: use node labels in spear600-evb.dts arm: spear6xx: add labels to various nodes in spear600.dtsi ARM: dts: vexpress: fix few unit address format warnings ARM: dts: at91: sama5d3_xplained: not all ADC channels are available ARM: dts: at91: sama5d3_xplained: fix ADC vref ARM: dts: at91: add envelope detector mux to the Axentia TSE-850 ARM: dts: armada-38x: label USB and SATA nodes ARM: dts: imx6q-utilite-pro: add hpd gpio ARM: dts: imx6qp-sabresd: Set reg_arm regulator supply ARM: dts: imx6qdl-sabresd: Set LDO regulator supply ARM: dts: imx: add Gateworks Ventana GW5903 support ARM: dts: i.MX25: add AIPS control registers ARM: dts: imx7-colibri: add Carrier Board 3.3V/5V regulators ARM: dts: imx7-colibri: remove 1.8V fixed regulator ARM: dts: imx7-colibri: allow to disable Ethernet rail ... commit 8d648aad05811ccc07df22834de60a7bf8d9e0e6 Merge: e07e368 17e310b Author: Linus Torvalds Date: Tue May 9 09:49:36 2017 -0700 Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC platform updates from Olof Johansson: "SoC platform changes (arch/arm/mach-*). This merge window, the bulk is for a few platforms: Gemini: - Legacy platform that Linus Walleij has converted to multiplatform and DT, so a handful of various tweaks there, removal of some old stale support, etc. Atmel AT91: - Fixup of various power management related pieces - Move of SoC detection to a drivers/soc driver instead ST Micro STM32: - New SoC support: STM32H743 TI platforms: - More driver support for Davinci (SATA in particular) - Removal of some old stale hwmod files (linkspace platform) Misc: - A couple of smaller patches for i.MX, sunxi, hisi" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (57 commits) ARM: davinci: Add clock for CPPI 4.1 DMA engine ARM: mxs: add support for I2SE Duckbill 2 boards MAINTAINERS: Update the Allwinner sunXi entry ARM: i.MX25: globally disable supervisor protect ARM: at91: move SoC detection to its own driver ARM: at91: pm: correct typo ARM: at91: pm: Remove at91_pm_set_standby ARM: at91: pm: Merge all at91sam9*_pm_init ARM: at91: pm: Tie the USB clock mask to the pmc ARM: at91: pm: Tie the memory controller type to the ramc id ARM: at91: pm: Workaround DDRSDRC self-refresh bug with LPDDR1 memories. ARM: at91: pm: Simplify at91rm9200_standby ARM: at91: pm: Use struct at91_pm_data in pm_suspend.S ARM: at91: pm: Move global variables into at91_pm_data ARM: at91: pm: Move at91_ramc_read/write to pm.c ARM: at91: pm: Cleanup headers MAINTAINERS: Add memory drivers to AT91 entry MAINTAINERS: Update AT91 entry ARM: davinci: add pata_bk3710 libata driver support ARM: OMAP2+: mark omap_init_rng as __init ... commit d135b8b5060ea91dd751ff172d179eb4eab1e966 Author: Mark Rutland Date: Wed May 3 16:09:38 2017 +0100 arm64: uaccess: suppress spurious clang warning Clang tries to warn when there's a mismatch between an operand's size, and the size of the register it is held in, as this may indicate a bug. Specifically, clang warns when the operand's type is less than 64 bits wide, and the register is used unqualified (i.e. %N rather than %xN or %wN). Unfortunately clang can generate these warnings for unreachable code. For example, for code like: do { \ typeof(*(ptr)) __v = (v); \ switch(sizeof(*(ptr))) { \ case 1: \ // assume __v is 1 byte wide \ asm ("{op}b %w0" : : "r" (v)); \ break; \ case 8: \ // assume __v is 8 bytes wide \ asm ("{op} %0" : : "r" (v)); \ break; \ } while (0) ... if op() were passed a char value and pointer to char, clang may produce a warning for the unreachable case where sizeof(*(ptr)) is 8. For the same reasons, clang produces warnings when __put_user_err() is used for types that are less than 64 bits wide. We could avoid this with a cast to a fixed-width type in each of the cases. However, GCC will then warn that pointer types are being cast to mismatched integer sizes (in unreachable paths). Another option would be to use the same union trickery as we do for __smp_store_release() and __smp_load_acquire(), but this is fairly invasive. Instead, this patch suppresses the clang warning by using an x modifier in the assembly for the 8 byte case of __put_user_err(). No additional work is necessary as the value has been cast to typeof(*(ptr)), so the compiler will have performed any necessary extension for the reachable case. For consistency, __get_user_err() is also updated to use the x modifier for its 8 byte case. Acked-by: Will Deacon Signed-off-by: Mark Rutland Reported-by: Matthias Kaehlcke Signed-off-by: Catalin Marinas arch/arm64/include/asm/uaccess.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8997c93452d16aac11d3b0cc53940c94330273a4 Author: Mark Rutland Date: Wed May 3 16:09:37 2017 +0100 arm64: atomic_lse: match asm register sizes The LSE atomic code uses asm register variables to ensure that parameters are allocated in specific registers. In the majority of cases we specifically ask for an x register when using 64-bit values, but in a couple of cases we use a w regsiter for a 64-bit value. For asm register variables, the compiler only cares about the register index, with wN and xN having the same meaning. The compiler determines the register size to use based on the type of the variable. Thus, this inconsistency is merely confusing, and not harmful to code generation. For consistency, this patch updates those cases to use the x register alias. There should be no functional change as a result of this patch. Acked-by: Will Deacon Signed-off-by: Mark Rutland Signed-off-by: Catalin Marinas arch/arm64/include/asm/atomic_lse.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 55de49f9aa17b0b2b144dd2af587177b9aadf429 Author: Mark Rutland Date: Wed May 3 16:09:36 2017 +0100 arm64: armv8_deprecated: ensure extension of addr Our compat swp emulation holds the compat user address in an unsigned int, which it passes to __user_swpX_asm(). When a 32-bit value is passed in a register, the upper 32 bits of the register are unknown, and we must extend the value to 64 bits before we can use it as a base address. This patch casts the address to unsigned long to ensure it has been suitably extended, avoiding the potential issue, and silencing a related warning from clang. Fixes: bd35a4adc413 ("arm64: Port SWP/SWPB emulation support from arm") Cc: # 3.19.x- Acked-by: Will Deacon Signed-off-by: Mark Rutland Signed-off-by: Catalin Marinas arch/arm64/kernel/armv8_deprecated.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a06040d7a791a9177581dcf7293941bd92400856 Author: Mark Rutland Date: Wed May 3 16:09:35 2017 +0100 arm64: uaccess: ensure extension of access_ok() addr Our access_ok() simply hands its arguments over to __range_ok(), which implicitly assummes that the addr parameter is 64 bits wide. This isn't necessarily true for compat code, which might pass down a 32-bit address parameter. In these cases, we don't have a guarantee that the address has been zero extended to 64 bits, and the upper bits of the register may contain unknown values, potentially resulting in a suprious failure. Avoid this by explicitly casting the addr parameter to an unsigned long (as is done on other architectures), ensuring that the parameter is widened appropriately. Fixes: 0aea86a2176c ("arm64: User access library functions") Cc: # 3.7.x- Acked-by: Will Deacon Signed-off-by: Mark Rutland Signed-off-by: Catalin Marinas arch/arm64/include/asm/uaccess.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 994870bead4ab19087a79492400a5478e2906196 Author: Mark Rutland Date: Wed May 3 16:09:34 2017 +0100 arm64: ensure extension of smp_store_release value When an inline assembly operand's type is narrower than the register it is allocated to, the least significant bits of the register (up to the operand type's width) are valid, and any other bits are permitted to contain any arbitrary value. This aligns with the AAPCS64 parameter passing rules. Our __smp_store_release() implementation does not account for this, and implicitly assumes that operands have been zero-extended to the width of the type being stored to. Thus, we may store unknown values to memory when the value type is narrower than the pointer type (e.g. when storing a char to a long). This patch fixes the issue by casting the value operand to the same width as the pointer operand in all cases, which ensures that the value is zero-extended as we expect. We use the same union trickery as __smp_load_acquire and {READ,WRITE}_ONCE() to avoid GCC complaining that pointers are potentially cast to narrower width integers in unreachable paths. A whitespace issue at the top of __smp_store_release() is also corrected. No changes are necessary for __smp_load_acquire(). Load instructions implicitly clear any upper bits of the register, and the compiler will only consider the least significant bits of the register as valid regardless. Fixes: 47933ad41a86 ("arch: Introduce smp_load_acquire(), smp_store_release()") Fixes: 878a84d5a8a1 ("arm64: add missing data types in smp_load_acquire/smp_store_release") Cc: # 3.14.x- Acked-by: Will Deacon Signed-off-by: Mark Rutland Cc: Matthias Kaehlcke Signed-off-by: Catalin Marinas arch/arm64/include/asm/barrier.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit fee960bed5e857eb126c4e56dd9ff85938356579 Author: Mark Rutland Date: Wed May 3 16:09:33 2017 +0100 arm64: xchg: hazard against entire exchange variable The inline assembly in __XCHG_CASE() uses a +Q constraint to hazard against other accesses to the memory location being exchanged. However, the pointer passed to the constraint is a u8 pointer, and thus the hazard only applies to the first byte of the location. GCC can take advantage of this, assuming that other portions of the location are unchanged, as demonstrated with the following test case: union u { unsigned long l; unsigned int i[2]; }; unsigned long update_char_hazard(union u *u) { unsigned int a, b; a = u->i[1]; asm ("str %1, %0" : "+Q" (*(char *)&u->l) : "r" (0UL)); b = u->i[1]; return a ^ b; } unsigned long update_long_hazard(union u *u) { unsigned int a, b; a = u->i[1]; asm ("str %1, %0" : "+Q" (*(long *)&u->l) : "r" (0UL)); b = u->i[1]; return a ^ b; } The linaro 15.08 GCC 5.1.1 toolchain compiles the above as follows when using -O2 or above: 0000000000000000 : 0: d2800001 mov x1, #0x0 // #0 4: f9000001 str x1, [x0] 8: d2800000 mov x0, #0x0 // #0 c: d65f03c0 ret 0000000000000010 : 10: b9400401 ldr w1, [x0,#4] 14: d2800002 mov x2, #0x0 // #0 18: f9000002 str x2, [x0] 1c: b9400400 ldr w0, [x0,#4] 20: 4a000020 eor w0, w1, w0 24: d65f03c0 ret This patch fixes the issue by passing an unsigned long pointer into the +Q constraint, as we do for our cmpxchg code. This may hazard against more than is necessary, but this is better than missing a necessary hazard. Fixes: 305d454aaa29 ("arm64: atomics: implement native {relaxed, acquire, release} atomics") Cc: # 4.4.x- Acked-by: Will Deacon Signed-off-by: Mark Rutland Signed-off-by: Catalin Marinas arch/arm64/include/asm/cmpxchg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0e421b1bf7af97f026e1bb8bfe4c5a7a8c08f42 Author: Kristina Martsenko Date: Wed May 3 16:37:48 2017 +0100 arm64: documentation: document tagged pointer stack constraints Some kernel features don't currently work if a task puts a non-zero address tag in its stack pointer, frame pointer, or frame record entries (FP, LR). For example, with a tagged stack pointer, the kernel can't deliver signals to the process, and the task is killed instead. As another example, with a tagged frame pointer or frame records, perf fails to generate call graphs or resolve symbols. For now, just document these limitations, instead of finding and fixing everything that doesn't work, as it's not known if anyone needs to use tags in these places anyway. In addition, as requested by Dave Martin, generalize the limitations into a general kernel address tag policy, and refactor tagged-pointers.txt to include it. Fixes: d50240a5f6ce ("arm64: mm: permit use of tagged pointers at EL0") Cc: # 3.12.x- Reviewed-by: Dave Martin Acked-by: Will Deacon Signed-off-by: Kristina Martsenko Signed-off-by: Catalin Marinas Documentation/arm64/tagged-pointers.txt | 62 +++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 15 deletions(-) commit 1c0803652d82b9a62980886e019c9f70576028a5 Author: yong mao Date: Wed Mar 15 15:26:39 2017 +0800 ARM64: dts: mediatek: configure some fixed mmc parameters configure some fixed mmc parameters Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 3 +++ 1 file changed, 3 insertions(+) commit 7e6c7fe95e3d0be80d0d05a2efde5c8fb97602ba Author: John Crispin Date: Wed Apr 26 17:25:50 2017 +0800 arm: dts: mt7623: add clock-frequency to the a7 timer node to mt7623.dtsi We need to tell the driver what the timers frequency is and that the core has not be configured by the bootrom. Not doing so makes the unit not boot. Signed-off-by: John Crispin Signed-off-by: Sean Wang Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt7623.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 276e93279a630657fff4b086ba14c95955912dfa Author: Kristina Martsenko Date: Wed May 3 16:37:47 2017 +0100 arm64: entry: improve data abort handling of tagged pointers When handling a data abort from EL0, we currently zero the top byte of the faulting address, as we assume the address is a TTBR0 address, which may contain a non-zero address tag. However, the address may be a TTBR1 address, in which case we should not zero the top byte. This patch fixes that. The effect is that the full TTBR1 address is passed to the task's signal handler (or printed out in the kernel log). When handling a data abort from EL1, we leave the faulting address intact, as we assume it's either a TTBR1 address or a TTBR0 address with tag 0x00. This is true as far as I'm aware, we don't seem to access a tagged TTBR0 address anywhere in the kernel. Regardless, it's easy to forget about address tags, and code added in the future may not always remember to remove tags from addresses before accessing them. So add tag handling to the EL1 data abort handler as well. This also makes it consistent with the EL0 data abort handler. Fixes: d50240a5f6ce ("arm64: mm: permit use of tagged pointers at EL0") Cc: # 3.12.x- Reviewed-by: Dave Martin Acked-by: Will Deacon Signed-off-by: Kristina Martsenko Signed-off-by: Catalin Marinas arch/arm64/include/asm/asm-uaccess.h | 9 +++++++++ arch/arm64/kernel/entry.S | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) commit 7dcd9dd8cebe9fa626af7e2358d03a37041a70fb Author: Kristina Martsenko Date: Wed May 3 16:37:46 2017 +0100 arm64: hw_breakpoint: fix watchpoint matching for tagged pointers When we take a watchpoint exception, the address that triggered the watchpoint is found in FAR_EL1. We compare it to the address of each configured watchpoint to see which one was hit. The configured watchpoint addresses are untagged, while the address in FAR_EL1 will have an address tag if the data access was done using a tagged address. The tag needs to be removed to compare the address to the watchpoints. Currently we don't remove it, and as a result can report the wrong watchpoint as being hit (specifically, always either the highest TTBR0 watchpoint or lowest TTBR1 watchpoint). This patch removes the tag. Fixes: d50240a5f6ce ("arm64: mm: permit use of tagged pointers at EL0") Cc: # 3.12.x- Acked-by: Mark Rutland Acked-by: Will Deacon Signed-off-by: Kristina Martsenko Signed-off-by: Catalin Marinas arch/arm64/include/asm/uaccess.h | 6 +++--- arch/arm64/kernel/hw_breakpoint.c | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) commit 81cddd65b5c82758ea5571a25e31ff6f1f89ff02 Author: Kristina Martsenko Date: Wed May 3 16:37:45 2017 +0100 arm64: traps: fix userspace cache maintenance emulation on a tagged pointer When we emulate userspace cache maintenance in the kernel, we can currently send the task a SIGSEGV even though the maintenance was done on a valid address. This happens if the address has a non-zero address tag, and happens to not be mapped in. When we get the address from a user register, we don't currently remove the address tag before performing cache maintenance on it. If the maintenance faults, we end up in either __do_page_fault, where find_vma can't find the VMA if the address has a tag, or in do_translation_fault, where the tagged address will appear to be above TASK_SIZE. In both cases, the address is not mapped in, and the task is sent a SIGSEGV. This patch removes the tag from the address before using it. With this patch, the fault is handled correctly, the address gets mapped in, and the cache maintenance succeeds. As a second bug, if cache maintenance (correctly) fails on an invalid tagged address, the address gets passed into arm64_notify_segfault, where find_vma fails to find the VMA due to the tag, and the wrong si_code may be sent as part of the siginfo_t of the segfault. With this patch, the correct si_code is sent. Fixes: 7dd01aef0557 ("arm64: trap userspace "dc cvau" cache operation on errata-affected core") Cc: # 4.8.x- Acked-by: Will Deacon Signed-off-by: Kristina Martsenko Signed-off-by: Catalin Marinas arch/arm64/kernel/traps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e07e368b27c3470765b70f71279d18992c7d9e03 Merge: 11fbf53 c58ab53 Author: Linus Torvalds Date: Tue May 9 09:20:16 2017 -0700 Merge tag 'armsoc-fixes-nc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull misc ARM SoC fixes from Olof Johansson: "ARM SoC non-urgent fixes for merge window Smaller patches that didn't seem to find a home in other branches, and low-priority fixes from late in the merge window. A number of these are MAINTAINER updates, it seems. Highlights: * Maintainers: - Remove Alexandre Courbot and Stephen Warren from Tegra maintainership, add Jon Hunter - Remove Stephen Warren and add Stefan Wahren to bcm2835 - Tweaks for file flagging for Marvell Dove * Fixes: - For two non-common-clk platform, handle clk_disable with NULL arg - Remove redundant Kconfig select for Oxnas" * tag 'armsoc-fixes-nc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: mmp: let clk_disable() return immediately if clk is NULL ARM: w90x900: let clk_disable() return immediately if clk is NULL MAINTAINERS: Add file patterns for dove device tree bindings ARM: oxnas: remove redundant select CPU_V6K MAINTAINERS: tegra: Remove self as maintainer MAINTAINERS: tegra: Replace Stephen with Jon MAINTAINERS: Add Stefan Wahren to bcm2835. MAINTAINERS: remove swarren from bcm2835 MAINTAINERS: Add Jon Mason to BCM5301X maintainers commit 11fbf53d66ec302fe50b06bd7cb4863dbb98775a Merge: 339fbf6 6b46576 Author: Linus Torvalds Date: Tue May 9 09:12:53 2017 -0700 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs updates from Al Viro: "Assorted bits and pieces from various people. No common topic in this pile, sorry" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs/affs: add rename exchange fs/affs: add rename2 to prepare multiple methods Make stat/lstat/fstatat pass AT_NO_AUTOMOUNT to vfs_statx() fs: don't set *REFERENCED on single use objects fs: compat: Remove warning from COMPATIBLE_IOCTL remove pointless extern of atime_need_update_rcu() fs: completely ignore unknown open flags fs: add a VALID_OPEN_FLAGS fs: remove _submit_bh() fs: constify tree_descr arrays passed to simple_fill_super() fs: drop duplicate header percpu-rwsem.h fs/affs: bugfix: Write files greater than page size on OFS fs/affs: bugfix: enable writes on OFS disks fs/affs: remove node generation check fs/affs: import amigaffs.h fs/affs: bugfix: make symbolic links work again commit cf1e22891bee39f50e058bee0827086fd75a8717 Author: Dan Williams Date: Mon May 8 12:33:53 2017 -0700 device-dax: kill NR_DEV_DAX There is no point to ask how many device-dax instances the kernel should support. Since we are already using a dynamic major number, just allow the max number of minors by default and be done. This also fixes the fact that the proposed max for the NR_DEV_DAX range was larger than what could be supported by alloc_chrdev_region(). Fixes: ba09c01d2fa8 ("dax: convert to the cdev api") Reported-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Signed-off-by: Dan Williams drivers/dax/Kconfig | 5 ----- drivers/dax/super.c | 11 +++-------- 2 files changed, 3 insertions(+), 13 deletions(-) commit 339fbf6796f8e74544091adbf511286768eaf93e Merge: 8ee74a9 5b47d59 Author: Linus Torvalds Date: Tue May 9 09:01:21 2017 -0700 Merge branch 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fix from Al Viro: "Braino fix for iov_iter_revert() misuse" * 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix braino in generic_file_read_iter() commit 8ee74a91ac304ad2e9e794eb96ed76f0634dec40 Author: Linus Torvalds Date: Tue May 9 08:45:16 2017 -0700 proc: try to remove use of FOLL_FORCE entirely We fixed the bugs in it, but it's still an ugly interface, so let's see if anybody actually depends on it. It's entirely possible that nothing actually requires the whole "punch through read-only mappings" semantics. For example, gdb definitely uses the /proc//mem interface, but it looks like it mainly does it for regular reads of the target (that don't need FOLL_FORCE), and looking at the gdb source code seems to fall back on the traditional ptrace(PTRACE_POKEDATA) interface if it needs to. If this breaks something, I do have a (more complex) version that only enables FOLL_FORCE when somebody has PTRACE_ATTACH'ed to the target, like the comment here used to say ("Maybe we should limit FOLL_FORCE to actual ptrace users?"). Cc: Kees Cook Cc: Andy Lutomirski Cc: Eric Biederman Signed-off-by: Linus Torvalds fs/proc/base.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit e735da5ec09526f197f3d8dd837d9a00e45e72aa Merge: cf68017 be47c55 Author: David S. Miller Date: Tue May 9 11:24:24 2017 -0400 Merge branch 'qed-general-fixes' Yuval Mintz says: ==================== qed*: General fixes This series contain several fixes for qed and qede. - #1 [and ~#5] relate to XDP cleanups - #2 and #5 correct VF behavior - #3 and #4 fix and add missing configurations needed for RoCE & storage ==================== Signed-off-by: David S. Miller commit be47c5555778fa3354950731023deb034a9e445e Author: Mintz, Yuval Date: Tue May 9 15:07:51 2017 +0300 qede: Split PF/VF ndos. PFs and VFs share the same structure of NDOs today, and the VFs explicitly fails the ndo_xdp() callback stating it doesn't support XDP. This results in lots of: [qede_xdp:1032(enp131s2)]VFs don't support XDP ------------[ cut here ]------------ WARNING: CPU: 4 PID: 1426 at net/core/rtnetlink.c:1637 rtnl_dump_ifinfo+0x354/0x3c0 ... Call Trace: ? __alloc_skb+0x9b/0x1d0 netlink_dump+0x122/0x290 netlink_recvmsg+0x27d/0x430 sock_recvmsg+0x3d/0x50 ... As every dump request for the VF interface info would fail due to rtnl_xdp_fill() returning an error code. To resolve this, introduce a subset of the NDOs meant for the VF in a seperate structure and register that one instead for VFs, and omit the ndo_xdp initialization. Fixes: 40b8c45492ef ("qede: Prevent VFs from using XDP") Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_filter.c | 5 ----- drivers/net/ethernet/qlogic/qede/qede_main.c | 22 +++++++++++++++++++++- 2 files changed, 21 insertions(+), 6 deletions(-) commit a82dadbce47395747824971db08a128130786fdc Author: Ram Amrani Date: Tue May 9 15:07:50 2017 +0300 qed: Correct doorbell configuration for !4Kb pages When configuring the doorbell DPI address, driver aligns the start address to 4KB [HW-pages] instead of host PAGE_SIZE. As a result, RoCE applications might receive addresses which are unaligned to pages [when PAGE_SIZE > 4KB], which is a security risk. Fixes: 51ff17251c9c ("qed: Add support for RoCE hw init") Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9f0523bb3d1e70fbfd3245842de855096194925 Author: Mintz, Yuval Date: Tue May 9 15:07:49 2017 +0300 qed: Tell QM the number of tasks Driver doesn't pass the number of tasks to the QM init logic which would cause back-pressure in scenarios requiring many tasks [E.g., using max MRs] and thus reduced performance. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_cxt.c | 1 + 1 file changed, 1 insertion(+) commit 5f027d7a48aee110e5f66ef5f9e2d90d214cd06b Author: Mintz, Yuval Date: Tue May 9 15:07:48 2017 +0300 qed: Fix VF removal sequence After previos changes in HW-stop scheme, VFs stopped sending CLOSE messages to their PFs when they unload. Fixes: 1226337ad98f ("qed: Correct HW stop flow") Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 92c43eb41669d8edbbfa3db45e89d2edcc55e2de Author: Suddarsana Reddy Kalluru Date: Tue May 9 15:07:47 2017 +0300 qede: Fix XDP memory leak on unload When (re|un)loading, Tx-queues belonging to XDP would not get freed. Fixes: cb6aeb079294 ("qede: Add support for XDP_TX") 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 | 3 +++ 1 file changed, 3 insertions(+) commit cf680179c111b1901e83bdd53997fb09dafff967 Merge: 4c19e2f 83bd511 Author: David S. Miller Date: Tue May 9 11:22:48 2017 -0400 Merge branch 'mlx4-misc-fixes' Tariq Toukan says: ==================== mlx4 misc fixes This patchset contains misc bug fixes from the team to the mlx4 Core and Eth drivers. Series generated against net commit: 32f1bc0f3d26 Revert "ipv4: restore rt->fi for reference counting" ==================== Signed-off-by: David S. Miller commit 83bd5118a119cabba47e194bba96641e303aadff Author: Jack Morgenstein Date: Tue May 9 14:45:24 2017 +0300 net/mlx4_core: Reduce harmless SRIOV error message to debug level Under SRIOV resource management, extra counters are allocated to VFs from a free pool. If that pool is empty, the ALLOC_RES command for a counter resource fails -- and this generates a misleading error message in the message log. Under SRIOV, each VF is allocated (i.e., guaranteed) 2 counters -- one counter per port. For ETH ports, the RoCE driver requests an additional counter (above the guaranteed counters). If that request fails, the VF RoCE driver simply uses the default (i.e., guaranteed) counter for that port. Thus, failing to allocate an additional counter does not constitute a problem, and the error message on the PF when this occurs should be reduced to debug level. Finally, to identify the situation that the reason for the failure is that no resources are available to grant to the VF, we modified the error returned by mlx4_grant_resource to -EDQUOT (Quota exceeded), which more accurately describes the error. Fixes: c3abb51bdb0e ("IB/mlx4: Add RoCE/IB dedicated counters") Signed-off-by: Jack Morgenstein Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/cmd.c | 14 +++++++++++--- drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) commit 89c557687a32c294e9d25670a96e9287c09f2d5f Author: Talat Batheesh Date: Tue May 9 14:45:23 2017 +0300 net/mlx4_en: Avoid adding steering rules with invalid ring Inserting steering rules with illegal ring is an invalid operation, block it. Fixes: 820672812f82 ('net/mlx4_en: Manage flow steering rules with ethtool') Signed-off-by: Talat Batheesh Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 5 +++++ 1 file changed, 5 insertions(+) commit 505a9249c23988768983aaa0766ce54e0dbe037d Author: Kamal Heib Date: Tue May 9 14:45:22 2017 +0300 net/mlx4_en: Change the error print to debug print The error print within mlx4_en_calc_rx_buf() should be a debug print. Fixes: 51151a16a60f ('mlx4: allow order-0 memory allocations in RX path') Signed-off-by: Kamal Heib Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c8b0d7290657996a29f318b948d2397d30e70c36 Author: Christian Borntraeger Date: Thu Mar 2 17:08:23 2017 +0100 s390/virtio: change maintainership Halil is doing a lot more work in the virtio area on s390 than I do. Let's reflect the reality in the maintainers file. Signed-off-by: Christian Borntraeger Acked-by: Halil Pasic Acked-by: Cornelia Huck Signed-off-by: Michael S. Tsirkin MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96fb20c343be46afca37d6c501d4cf13d58e110a Author: Colin Ian King Date: Sat Apr 29 23:14:21 2017 +0100 tools/virtio: fix spelling mistake: "wakeus" -> "wakeups" trivial fix to spelling mistake in an error message. Signed-off-by: Colin Ian King Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang tools/virtio/virtio_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56da5fd04e3d51d0d876c685b0107ca357b9fd9d Author: Dan Carpenter Date: Thu Apr 6 12:04:47 2017 +0300 virtio_net: tidy a couple debug statements We are printing a decimal value for truesize so we shouldn't use an "0x" prefix. Signed-off-by: Dan Carpenter Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3008a206209fba670ab1da5590694a616b705efb Author: Michael S. Tsirkin Date: Fri Apr 7 08:45:32 2017 +0300 ptr_ring: support testing different batching sizes Use the param flag for that. Signed-off-by: Michael S. Tsirkin tools/virtio/ringtest/ptr_ring.c | 3 +++ 1 file changed, 3 insertions(+) commit a49795054a0b2034ac50a2a894864fdb353addb5 Author: Michael S. Tsirkin Date: Fri Apr 7 08:44:23 2017 +0300 ringtest: support test specific parameters Add a new flag for passing test-specific parameters. Signed-off-by: Michael S. Tsirkin tools/virtio/ringtest/main.c | 13 +++++++++++++ tools/virtio/ringtest/main.h | 2 ++ 2 files changed, 15 insertions(+) commit fb9de9704775d6190c204f4ddf8da4cfdac26be1 Author: Michael S. Tsirkin Date: Fri Apr 7 08:25:09 2017 +0300 ptr_ring: batch ring zeroing A known weakness in ptr_ring design is that it does not handle well the situation when ring is almost full: as entries are consumed they are immediately used again by the producer, so consumer and producer are writing to a shared cache line. To fix this, add batching to consume calls: as entries are consumed do not write NULL into the ring until we get a multiple (in current implementation 2x) of cache lines away from the producer. At that point, write them all out. We do the write out in the reverse order to keep producer from sharing cache with consumer for as long as possible. Writeout also triggers when ring wraps around - there's no special reason to do this but it helps keep the code a bit simpler. What should we do if getting away from producer by 2 cache lines would mean we are keeping the ring moe than half empty? Maybe we should reduce the batching in this case, current patch simply reduces the batching. Notes: - it is no longer true that a call to consume guarantees that the following call to produce will succeed. No users seem to assume that. - batching can also in theory reduce the signalling rate: users that would previously send interrups to the producer to wake it up after consuming each entry would now only need to do this once in a batch. Doing this would be easy by returning a flag to the caller. No users seem to do signalling on consume yet so this was not implemented yet. Signed-off-by: Michael S. Tsirkin Reviewed-by: Jesper Dangaard Brouer Acked-by: Jason Wang include/linux/ptr_ring.h | 63 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 54 insertions(+), 9 deletions(-) commit 9ea762a5ae45235eb3e5ec9c05c33cf37db78d70 Author: Cornelia Huck Date: Thu Mar 30 13:13:33 2017 +0200 virtio: virtio_driver doc Add comments for the virtio_driver members that were not documented. Signed-off-by: Cornelia Huck Signed-off-by: Michael S. Tsirkin include/linux/virtio.h | 4 ++++ 1 file changed, 4 insertions(+) commit 5f24df0945b3ce3be71602c2655f689d42a24181 Author: Michael S. Tsirkin Date: Wed Mar 29 23:12:23 2017 +0300 virtio_net: don't reset twice on XDP on/off We already do a reset once in remove_vq_common - there appears to be no point in doing another one when we add/remove XDP. Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 1 - 1 file changed, 1 deletion(-) commit d85b758f72b05a774045545f24d70980e3e9aac4 Author: Michael S. Tsirkin Date: Thu Mar 9 02:21:21 2017 +0200 virtio_net: fix support for small rings When ring size is small (<32 entries) making buffers smaller means a full ring might not be able to hold enough buffers to fit a single large packet. Make sure a ring full of buffers is large enough to allow at least one packet of max size. Fixes: 2613af0ed18a ("virtio_net: migrate mergeable rx buffers to page frag allocators") Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) commit e377fcc8486d40867c6c217077ad0fa40977e060 Author: Michael S. Tsirkin Date: Mon Mar 6 22:21:35 2017 +0200 virtio_net: reduce alignment for buffers We don't need to align length to any particular value anymore. Aligning to L1 cache size probably sill makes sense to reduce false sharing. Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 680557cf79f82623e2c4fd42733077d60a843513 Author: Michael S. Tsirkin Date: Mon Mar 6 21:29:47 2017 +0200 virtio_net: rework mergeable buffer handling Use the new _ctx virtio API to maintain true length for each buffer. Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 89 +++++++++++++++++++++++------------------------- 1 file changed, 43 insertions(+), 46 deletions(-) commit d45b897b11eaf9847c4b9bc99a91279041b1bbf7 Author: Michael S. Tsirkin Date: Mon Mar 6 20:31:21 2017 +0200 virtio_net: allow specifying context for rx With mergeable buffers we never use s/g for rx, so allow specifying context in that case. Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 5a61ef74f269f2573f48fa53607a8911216c3326 Author: Nicholas Piggin Date: Tue May 9 13:16:52 2017 +1000 powerpc/64s: Support new device tree binding for discovering CPU features The ibm,powerpc-cpu-features device tree binding describes CPU features with ASCII names and extensible compatibility, privilege, and enablement metadata that allows improved flexibility and compatibility with new hardware. The interface is described in detail in ibm,powerpc-cpu-features.txt in this patch. Currently this code is not enabled by default, and there are no released firmwares that provide the binding. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman .../bindings/powerpc/ibm,powerpc-cpu-features.txt | 248 +++++ arch/powerpc/Kconfig | 16 + arch/powerpc/include/asm/cpu_has_feature.h | 6 +- arch/powerpc/include/asm/cputable.h | 2 + arch/powerpc/include/asm/dt_cpu_ftrs.h | 26 + arch/powerpc/include/asm/reg.h | 1 + arch/powerpc/include/uapi/asm/cputable.h | 7 + arch/powerpc/kernel/Makefile | 1 + arch/powerpc/kernel/cputable.c | 37 +- arch/powerpc/kernel/dt_cpu_ftrs.c | 1031 ++++++++++++++++++++ arch/powerpc/kernel/prom.c | 29 +- arch/powerpc/kernel/setup_64.c | 10 +- 12 files changed, 1398 insertions(+), 16 deletions(-) commit 4c19e2f2a86f2281014c1e06785715ad9864c9cc Author: Karim Eshapa Date: Tue May 9 02:06:50 2017 +0200 drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comparison Use time_after() for time comparison with the new fix. Signed-off-by: Karim Eshapa Signed-off-by: David S. Miller drivers/net/wimax/i2400m/i2400m-usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f92ceb01c2cad7092af89c32dde5b14d4fdf8a09 Author: Kees Cook Date: Mon May 8 15:31:44 2017 -0700 DECnet: Use container_of() for embedded struct Instead of a direct cross-type cast, use conatiner_of() to locate the embedded structure, even in the face of future struct layout randomization. Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/decnet/dn_neigh.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 75bda95048a4d2c5ff04036bd0181bc84085d8b2 Author: Nicholas Piggin Date: Tue May 9 13:17:08 2017 +1000 powerpc: Don't print cpu_spec->cpu_name if it's NULL Currently we assume that if the cpu_spec has a pvr_mask then it must also have a cpu_name. But that will change in a subsequent commit when we do CPU feature discovery via the device tree, so check explicitly if cpu_name is NULL. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea47dd191d543f81e0912b5dc0471b48346b016e Author: Nicholas Piggin Date: Wed Apr 19 05:12:18 2017 +1000 of/fdt: introduce of_scan_flat_dt_subnodes and of_get_flat_dt_phandle Introduce primitives for FDT parsing. These will be used for powerpc cpufeatures node scanning, which has quite complex structure but should be processed early. Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman drivers/of/fdt.c | 38 ++++++++++++++++++++++++++++++++++++++ include/linux/of_fdt.h | 6 ++++++ 2 files changed, 44 insertions(+) commit 0b382fb3d905e2754302cf9097ffca13afb8b73f Merge: 6102c00 61baf15 Author: Michael Ellerman Date: Tue May 9 22:54:35 2017 +1000 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next Freescale updates from Scott: "Includes a fix for a powerpc/next mm regression on 64e, a fix for a kernel hang on 64e when using a debugger inside a relocated kernel, a qman fix, and misc qe improvements." commit 36c344f3f1ffc0b1b20abd237b7401dc6687ee8f Merge: 03efce6 a2b19e6 Author: Paolo Bonzini Date: Tue May 9 12:51:49 2017 +0200 Merge tag 'kvm-arm-for-v4.12-round2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD Second round of KVM/ARM Changes for v4.12. Changes include: - A fix related to the 32-bit idmap stub - A fix to the bitmask used to deode the operands of an AArch32 CP instruction - We have moved the files shared between arch/arm/kvm and arch/arm64/kvm to virt/kvm/arm - We add support for saving/restoring the virtual ITS state to userspace commit a2b19e6e2d4bb662a64799541c144fd94f8fb024 Author: Christoffer Dall Date: Mon May 8 13:31:12 2017 +0200 KVM: arm/arm64: vgic-its: Cleanup after failed ITT restore When failing to restore the ITT for a DTE, we should remove the failed device entry from the list and free the object. We slightly refactor vgic_its_destroy to be able to reuse the now separate vgic_its_free_dte() function. Signed-off-by: Christoffer Dall Reviewed-by: Eric Auger virt/kvm/arm/vgic/vgic-its.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) commit 67723c25ce7fc0bd4f1b0f4bcbee5f0d114516ca Author: Christoffer Dall Date: Mon May 8 14:43:45 2017 +0200 KVM: arm/arm64: Don't call map_resources when restoring ITS tables The only reason we called kvm_vgic_map_resources() when restoring the ITS tables was because we wanted to have the KVM iodevs registered in the KVM IO bus framework at the time when the ITS was restored such that a restored and active device can inject MSIs prior to otherwise calling kvm_vgic_map_resources() from the first run of a VCPU. Since we now register the KVM iodevs for the redestributors and ITS as soon as possible (when setting the base addresses), we no longer need this call and kvm_vgic_map_resources() is again called only when first running a VCPU. Signed-off-by: Christoffer Dall Reviewed-by: Eric Auger virt/kvm/arm/vgic/vgic-its.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 30e1b684f0afd94745821f27ce1165226df02ba9 Author: Christoffer Dall Date: Mon May 8 13:14:57 2017 +0200 KVM: arm/arm64: Register ITS iodev when setting base address We have to register the ITS iodevice before running the VM, because in migration scenarios, we may be restoring a live device that wishes to inject MSIs before the VCPUs have started. All we need to register the ITS io device is the base address of the ITS, so we can simply register that when the base address of the ITS is set. [ Code to fix concurrency issues when setting the ITS base address and to fix the undef base address check written by Marc Zyngier ] Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Reviewed-by: Eric Auger virt/kvm/arm/vgic/vgic-its.c | 44 ++++++++++---------------------------------- virt/kvm/arm/vgic/vgic-v3.c | 8 -------- virt/kvm/arm/vgic/vgic.h | 1 - 3 files changed, 10 insertions(+), 43 deletions(-) commit 6cc40f273b30ef8f7b37f95cd2e6456d652808c0 Author: Marc Zyngier Date: Mon May 8 18:15:40 2017 +0100 KVM: arm/arm64: Get rid of its->initialized field The its->initialized doesn't bring much to the table, and creates unnecessary ordering between setting the address and initializing it (which amounts to exactly nothing). Let's kill it altogether, making KVM_DEV_ARM_VGIC_CTRL_INIT the no-op it deserves to be. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall Reviewed-by: Eric Auger include/kvm/arm_vgic.h | 1 - virt/kvm/arm/vgic/vgic-its.c | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) commit 1aab6f468c10a1ec3977fb6f7bc12869174d516e Author: Christoffer Dall Date: Mon May 8 12:30:24 2017 +0200 KVM: arm/arm64: Register iodevs when setting redist base and creating VCPUs Instead of waiting with registering KVM iodevs until the first VCPU is run, we can actually create the iodevs when the redist base address is set. The only downside is that we must now also check if we need to do this for VCPUs which are created after creating the VGIC, because there is no enforced ordering between creating the VGIC (and setting its base addresses) and creating the VCPUs. Signed-off-by: Christoffer Dall Reviewed-by: Eric Auger include/kvm/arm_vgic.h | 1 + virt/kvm/arm/arm.c | 2 +- virt/kvm/arm/vgic/vgic-init.c | 21 ++++++++++++++++++ virt/kvm/arm/vgic/vgic-kvm-device.c | 7 +++++- virt/kvm/arm/vgic/vgic-mmio-v3.c | 43 +++++++++++++++++++++++++++++++++++-- virt/kvm/arm/vgic/vgic-v3.c | 6 ------ virt/kvm/arm/vgic/vgic.h | 3 ++- 7 files changed, 72 insertions(+), 11 deletions(-) commit 72030536ebf5e5e512771922efa472a80f2c969f Author: Christoffer Dall Date: Mon May 8 12:28:19 2017 +0200 KVM: arm/arm64: Slightly rework kvm_vgic_addr As we are about to handle setting the address for the redistributor base region separately from some of the other base addresses, let's rework this function to leave a little more room for being flexible in what each type of base address does. Signed-off-by: Christoffer Dall Reviewed-by: Eric Auger virt/kvm/arm/vgic/vgic-kvm-device.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 9a746d75c06e2a68f27886d041c6e46df0aa86d8 Author: Christoffer Dall Date: Mon May 8 12:23:51 2017 +0200 KVM: arm/arm64: Make vgic_v3_check_base more broadly usable As we are about to fiddle with the IO device registration mechanism, let's be a little more careful when setting base addresses as early as possible. When setting a base address, we can check that there's address space enough for its scope and when the last of the two base addresses (dist and redist) get set, we can also check if the regions overlap at that time. This allows us to provide error messages to the user at time when trying to set the base address, as opposed to later when trying to run the VM. To do this, we make vgic_v3_check_base available in the core vgic-v3 code as well as in the other parts of the GICv3 code, namely the MMIO config code. We also return true for undefined base addresses so that the function can be used before all base addresses are set; all callers already check for uninitialized addresses before calling this function. Signed-off-by: Christoffer Dall Reviewed-by: Eric Auger virt/kvm/arm/vgic/vgic-v3.c | 19 +++++++++++++++---- virt/kvm/arm/vgic/vgic.h | 1 + 2 files changed, 16 insertions(+), 4 deletions(-) commit 7fadcd3a859b218fa27c399db0aa8d6d62ad84a9 Author: Christoffer Dall Date: Mon May 8 12:18:26 2017 +0200 KVM: arm/arm64: Refactor vgic_register_redist_iodevs Split out the function to register all the redistributor iodevs into a function that handles a single redistributor at a time in preparation for being able to call this per VCPU as these get created. Signed-off-by: Christoffer Dall Reviewed-by: Eric Auger virt/kvm/arm/vgic/vgic-mmio-v3.c | 108 ++++++++++++++++++++++++--------------- virt/kvm/arm/vgic/vgic-v3.c | 2 +- virt/kvm/arm/vgic/vgic.h | 2 +- 3 files changed, 68 insertions(+), 44 deletions(-) commit 497d72d80a789501501cccabdad6b145f9e31371 Author: Christoffer Dall Date: Mon May 8 20:38:40 2017 +0200 KVM: Add kvm_vcpu_get_idx to get vcpu index in kvm->vcpus There are occasional needs to use the index of vcpu in the kvm->vcpus array to map something related to a VCPU. For example, unlike the vcpu->vcpu_id, the vcpu index is guaranteed to not be sparse across all vcpus which is useful when allocating a memory area for each vcpu. Signed-off-by: Christoffer Dall Reviewed-by: Eric Auger include/linux/kvm_host.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 03efce6f935f89f90a98997ceea514aeff47b6dc Author: Bandan Das Date: Fri May 5 15:25:15 2017 -0400 nVMX: Advertise PML to L1 hypervisor Advertise the PML bit in vmcs12 but don't try to enable it in hardware when running L2 since L0 is emulating it. Also, preserve L0's settings for PML since it may still want to log writes. Signed-off-by: Bandan Das Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit c5f983f6e8455bbff8b6b39f3ad470317fcd808e Author: Bandan Das Date: Fri May 5 15:25:14 2017 -0400 nVMX: Implement emulated Page Modification Logging With EPT A/D enabled, processor access to L2 guest paging structures will result in a write violation. When this happens, write the GUEST_PHYSICAL_ADDRESS to the pml buffer provided by L1 if the access is write and the dirty bit is being set. This patch also adds necessary checks during VMEntry if L1 has enabled PML. If the PML index overflows, we change the exit reason and run L1 to simulate a PML full event. Signed-off-by: Bandan Das Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 79 insertions(+), 2 deletions(-) commit bab4165e2f031905bd0a2bb8b6ad65c5c8cfa870 Author: Bandan Das Date: Fri May 5 15:25:13 2017 -0400 kvm: x86: Add a hook for arch specific dirty logging emulation When KVM updates accessed/dirty bits, this hook can be used to invoke an arch specific function that implements/emulates dirty logging such as PML. Signed-off-by: Bandan Das Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/mmu.c | 15 +++++++++++++++ arch/x86/kvm/mmu.h | 1 + arch/x86/kvm/paging_tmpl.h | 4 ++++ 4 files changed, 22 insertions(+) commit c7c2c709b60ed2d7e6e6871496f0e963cfad121f Author: Jim Mattson Date: Fri May 5 11:28:09 2017 -0700 kvm: nVMX: Validate CR3 target count on nested VM-entry According to the SDM, the CR3-target count must not be greater than 4. Future processors may support a different number of CR3-target values. Software should read the VMX capability MSR IA32_VMX_MISC to determine the number of values supported. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4415b335282591e76762cd9e6dc60932a7595fc3 Merge: 3bed888 fb7dcf7 Author: Paolo Bonzini Date: Tue May 9 11:50:01 2017 +0200 Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD The main thing here is a new implementation of the in-kernel XICS interrupt controller emulation for POWER9 machines, from Ben Herrenschmidt. POWER9 has a new interrupt controller called XIVE (eXternal Interrupt Virtualization Engine) which is able to deliver interrupts directly to guest virtual CPUs in hardware without hypervisor intervention. With this new code, the guest still sees the old XICS interface but performance is better because the XICS emulation in the host uses the XIVE directly rather than going through a XICS emulation in firmware. Conflicts: arch/powerpc/kernel/cpu_setup_power.S [cherry-picked fix] arch/powerpc/kvm/book3s_xive.c [include asm/debugfs.h] commit 3bed8888edc8f60d734c44fdcdb7c6abd5e2d02e Author: Geliang Tang Date: Sat May 6 23:37:19 2017 +0800 KVM: set no_llseek in stat_fops_per_vm In vm_stat_get_per_vm_fops and vcpu_stat_get_per_vm_fops, since we use nonseekable_open() to open, we should use no_llseek() to seek, not generic_file_llseek(). Signed-off-by: Geliang Tang Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6102c005a71b4a7a6433d43b887662fb0780746d Author: Nicholas Piggin Date: Thu May 4 20:41:12 2017 +1000 powerpc/64s: Fix unnecessary machine check handler relocation branch Similarly to commit 2563a70c3b ("powerpc/64s: Remove unnecessary relocation branch from idle handler"), the machine check handler has a BRANCH_TO from relocated to relocated code, which is unnecessary. It has also caused build errors with some toolchains: arch/powerpc/kernel/exceptions-64s.S: Assembler messages: arch/powerpc/kernel/exceptions-64s.S:395: Error: operand out of range (0xffffffffffff8280 is not between 0x0000000000000000 and 0x000000000000ffff) Fixes: 1945bc4549e5 ("powerpc/64s: Fix POWER9 machine check handler from stop state") Signed-off-by: Nicholas Piggin Reported-and-tested-by : Abdul Haleem Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ba95b5d0359609b4ec8010f77c40ab3c595a6ac6 Author: Michael Ellerman Date: Tue May 9 15:39:04 2017 +1000 powerpc/mm/book3s/64: Rework page table geometry for lower memory usage Recently in commit f6eedbba7a26 ("powerpc/mm/hash: Increase VA range to 128TB") we increased the virtual address space for user processes to 128TB by default, and up to 512TB if user space opts in. This obviously required expanding the range of the Linux page tables. For Book3s 64-bit using hash and with PAGE_SIZE=64K, we increased the PGD to 2^15 entries. This meant we could cover the full address range, while still being able to insert a 16G hugepage at the PGD level and a 16M hugepage in the PMD. The downside of that geometry is that it uses a lot of memory for the PGD, and in particular makes the PGD a 4-page allocation, which means it's much more likely to fail under memory pressure. Instead we can make the PMD larger, so that a single PUD entry maps 16G, allowing the 16G hugepages to sit at that level in the tree. We're then able to split the remaining bits between the PUG and PGD. We make the PGD slightly larger as that results in lower memory usage for typical programs. When THP is enabled the PMD actually doubles in size, to 2^11 entries, or 2^14 bytes, which is large but still < PAGE_SIZE. Signed-off-by: Michael Ellerman Reviewed-by: Balbir Singh Reviewed-by: Aneesh Kumar K.V arch/powerpc/include/asm/book3s/64/hash-64k.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 24e0bfbf63bac18495b0ad76115269f2158e9234 Author: Horia Geantă Date: Mon May 8 11:50:16 2017 +0300 powerpc: Fix distclean with Makefile.postlink Makefile.postlink always includes include/config/auto.conf, however this file is not present in a clean kernel tree, causing make to fail: $ git clone linuxppc.git $ cd linuxppc.git $ make distclean arch/powerpc/Makefile.postlink:10: include/config/auto.conf: No such file or directory make[1]: *** No rule to make target `include/config/auto.conf'. Stop. make: *** [vmlinuxclean] Error 2 Equally running 'make distclean; make distclean' will trip the error case. Change the inclusion such that file not being found does not trigger an error. Fixes: f188d0524d7e ("powerpc: Use the new post-link pass to check relocations") Reported-by: Mircea Pop Signed-off-by: Horia Geantă Tested-by: Justin M. Forbes Signed-off-by: Michael Ellerman arch/powerpc/Makefile.postlink | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 443c3a9e686aa44cf00c677498a6b715f9a43a45 Author: Christoffer Dall Date: Mon May 8 12:09:13 2017 +0200 KVM: arm/arm64: vgic: Rename kvm_vgic_vcpu_init to kvm_vgic_vcpu_enable This function really doesn't init anything, it enables the CPU interface, so name it as such, which gives us the name to use for actual init work later on. Signed-off-by: Christoffer Dall Reviewed-by: Eric Auger virt/kvm/arm/vgic/vgic-init.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit cb9d043469d216416d75efe05f3bce279bab2262 Author: Christoffer Dall Date: Mon May 8 09:31:53 2017 +0200 KVM: arm/arm64: Clarification and relaxation to ITS save/restore ABI Clarify what is meant by the save/restore ABI only supporting virtual physical interrupts. Relax the requirement of the order that the collection entries are written in and be clear that there is no particular ordering enforced. Some cosmetic changes in the capitalization of ID names to align with the GICv3 manual and remove the empty line in the bottom of the patch. Signed-off-by: Christoffer Dall Reviewed-by: Eric Auger Documentation/virtual/kvm/devices/arm-vgic-its.txt | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit d04a4c76f71dd5335f8e499b59617382d84e2b8d Author: Heiko Carstens Date: Thu May 4 09:42:22 2017 +0200 s390: move _text symbol to address higher than zero The perf tool assumes that kernel symbols are never present at address zero. In fact it assumes if functions that map symbols to addresses return zero, that the symbol was not found. Given that s390's _text symbol historically is located at address zero this yields at least a couple of false errors and warnings in one of perf's test cases about not present symbols ("perf test 1"). To fix this simply move the _text symbol to address 0x200, just behind the initial psw and channel program located at the beginning of the kernel image. This is now hard coded within the linker script. I tried a nicer solution which moves the initial psw and channel program into an own section. However that would move the symbols within the "real" head.text section to different addresses, since the ".org" statements within head.S are relative to the head.text section. If there is a new section in front, everything else will be moved. Alternatively I could have adjusted all ".org" statements. But this current solution seems to be the easiest one, since nobody really cares where the _text symbol is actually located. Reported-by: Zvonko Kosic Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/vmlinux.lds.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 6423ef691c50568e56bb7e33a35bf9f8d6142d23 Author: Heiko Carstens Date: Thu May 4 13:39:18 2017 +0200 s390/qdio: increase string buffer size Avoid false positive warnings like this with gcc 7.1: drivers/s390/cio/qdio_debug.h:63:4: note: 'snprintf' output between 8 and 17 bytes into a destination of size 16 snprintf(debug_buffer, QDIO_DBF_LEN, text); and simply increase the size of the string buffer. Reviewed-by: Sebastian Ott Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2685df6776b2c69967eaead48f694869f7dc91ca Author: Heiko Carstens Date: Thu May 4 13:35:33 2017 +0200 s390/ccwgroup: increase string buffer size Avoid false positive warnings like this with gcc 7.1: drivers/s390/cio/ccwgroup.c:41:21: warning: '%d' directive writing between 1 and 10 bytes into a region of size 4 sprintf(str, "cdev%d", i); and simply increase the size of the string buffer. Reviewed-by: Sebastian Ott Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/cio/ccwgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 80ba38469aa28bbcfc7a31e5b41adfc42120465e Author: Heiko Carstens Date: Thu May 4 13:06:58 2017 +0200 s390/topology: let topology_mnest_limit() return unsigned char Fixes a couple of compile warnings with gcc 7.1.0 : arch/s390/kernel/sysinfo.c:578:20: note: directive argument in the range [-2147483648, 4] sprintf(link_to, "15_1_%d", topology_mnest_limit()); Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/sysinfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5c8b9601036869e162cb278aaafbf003dc4e5a0 Author: Heiko Carstens Date: Wed May 3 09:15:07 2017 +0200 s390/uaccess: use sane length for __strncpy_from_user() The average string that is copied from user space to kernel space is rather short. E.g. booting a system involves about 50.000 strncpy_from_user() calls where the NULL terminated string has an average size of 27 bytes. By default our s390 specific strncpy_from_user() implementation however copies up to 4096 bytes, which is a waste of cpu cycles and cache lines. Therefore reduce the default length to L1_CACHE_BYTES (256 bytes), which also reduces the average execution time of strncpy_from_user() by 30-40%. Alternatively we could have switched to the generic strncpy_from_user() implementation, however it turned out that that variant would be slower than the now optimized s390 variant. Reported-by: Al Viro Reported-by: Linus Torvalds Signed-off-by: Heiko Carstens Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky arch/s390/lib/uaccess.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fb8fb46c56289b3f34b5d90a4ec65e9e4e4544a5 Author: Xiaochen Shen Date: Wed May 3 11:15:56 2017 +0800 x86/intel_rdt: Fix a typo in Documentation Example 3 contains a typo: "C0" in "# echo C0 > p0/cpus" is wrong because it specifies core 6-7 instead of wanted core 4-7. Correct this typo to avoid confusion. Signed-off-by: Xiaochen Shen Acked-by: Fenghua Yu Cc: vikas.shivappa@linux.intel.com Cc: tony.luck@intel.com Link: http://lkml.kernel.org/r/1493781356-24229-1-git-send-email-xiaochen.shen@intel.com Signed-off-by: Thomas Gleixner Documentation/x86/intel_rdt_ui.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f63d947c1673930bfc5f2f9bd1073a02c179a890 Author: Sudeep Holla Date: Mon May 8 13:32:27 2017 +0100 clocksource/arm_arch_timer: Fix arch_timer_mem_find_best_frame() arch_timer_mem_find_best_frame() looks through ARCH_TIMER_MEM_MAX_FRAMES frames even after finding matches to ensure the best frame is chosen, which means the variable frame will point to the last valid frame but not necessarily the best frame. On Juno, we get the following error as the wrong frame is returned as the best frame from arch_timer_mem_find_best_frame(): arch_timer: Unable to map frame @ 0x0000000000000000 arch_timer: Frame missing phys irq. Failed to initialize '/timer@2a810000': -22 Fix the issue by correctly returning the best frame from arch_timer_mem_find_best_frame(). Fixes: c389d701dfb7 ("clocksource: arm_arch_timer: split MMIO timer probing.") Signed-off-by: Sudeep Holla Acked-by: Mark Rutland Cc: Marc Zyngier Cc: Daniel Lezcano Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1494246747-17267-1-git-send-email-sudeep.holla@arm.com Signed-off-by: Thomas Gleixner drivers/clocksource/arm_arch_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a1bec4605838fd7872ec41677585e241e256785 Author: Nick Desaulniers Date: Mon May 8 20:29:46 2017 -0700 x86/build: Don't add -maccumulate-outgoing-args w/o compiler support Clang does not support this machine dependent option. Older versions of GCC (pre 3.0) may not support this option, added in 2000, but it's unlikely they can still compile a working kernel. Signed-off-by: Nick Desaulniers Reviewed-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170509032946.20444-1-nick.desaulniers@gmail.com Signed-off-by: Ingo Molnar arch/x86/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d2b6dc61a8dd3c429609b993778cb54e75a5c5f0 Author: Andy Lutomirski Date: Mon May 8 17:09:10 2017 -0700 x86/boot/32: Fix UP boot on Quark and possibly other platforms This partially reverts commit: 23b2a4ddebdd17f ("x86/boot/32: Defer resyncing initial_page_table until per-cpu is set up") That commit had one definite bug and one potential bug. The definite bug is that setup_per_cpu_areas() uses a differnet generic implementation on UP kernels, so initial_page_table never got resynced. This was fine for access to percpu data (it's in the identity map on UP), but it breaks other users of initial_page_table. The potential bug is that helpers like efi_init() would be called before the tables were synced. Avoid both problems by just syncing the page tables in setup_arch() *and* setup_per_cpu_areas(). Reported-by: Jan Kiszka Signed-off-by: Andy Lutomirski Cc: Andy Shevchenko Cc: Ard Biesheuvel Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Garnier Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/setup.c | 15 +++++++++++++++ arch/x86/kernel/setup_percpu.c | 10 +++++----- 2 files changed, 20 insertions(+), 5 deletions(-) commit 861ce4a3244c21b0af64f880d5bfe5e6e2fb9e4a Author: Laura Abbott Date: Mon May 8 14:23:16 2017 -0700 x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init() '__vmalloc_start_set' currently only gets set in initmem_init() when !CONFIG_NEED_MULTIPLE_NODES. This breaks detection of vmalloc address with virt_addr_valid() with CONFIG_NEED_MULTIPLE_NODES=y, causing a kernel crash: [mm/usercopy] 517e1fbeb6: kernel BUG at arch/x86/mm/physaddr.c:78! Set '__vmalloc_start_set' appropriately for that case as well. Reported-by: kbuild test robot Signed-off-by: Laura Abbott Reviewed-by: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: dc16ecf7fd1f ("x86-32: use specific __vmalloc_start_set flag in __virt_addr_valid") Link: http://lkml.kernel.org/r/1494278596-30373-1-git-send-email-labbott@redhat.com Signed-off-by: Ingo Molnar arch/x86/mm/numa_32.c | 1 + 1 file changed, 1 insertion(+) commit 29efc390b9462582ae95eb9a0b8cd17ab956afc0 Author: Shaohua Li Date: Sun May 7 17:36:24 2017 -0700 md/md0: optimize raid0 discard handling There are complaints that raid0 discard handling is slow. Currently we divide discard request into chunks and dispatch to underlayer disks. The block layer will do merge to form big requests. This causes a lot of request split/merge and uses significant CPU time. A simple idea is to calculate the range for each raid disk for an IO request and send a discard request to raid disks, which will avoid the split/merge completely. Previously Coly tried the approach, but the implementation was too complex because of raid0 zones. This patch always split bio in zone boundary and handle bio within one zone. It simplifies the implementation a lot. Reviewed-by: NeilBrown Acked-by: Coly Li Signed-off-by: Shaohua Li drivers/md/raid0.c | 116 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 102 insertions(+), 14 deletions(-) commit 2868b2513aa732a99ea4a0a6bf10dc93c1f3dac2 Merge: 00d9593 945f8f5 Author: Linus Torvalds Date: Mon May 8 20:43:30 2017 -0700 Merge tag 'linux-kselftest-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest updates from Shuah Khan: "This update consists of: - important fixes for build failures and clean target related warnings to address regressions introduced in commit 88baa78d1f31 ("selftests: remove duplicated all and clean target") - several minor spelling fixes in and log messages and comment blocks. - Enabling configs for better test coverage in ftrace, vm, and cpufreq tests. - .gitignore changes" * tag 'linux-kselftest-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (26 commits) selftests: x86: add missing executables to .gitignore selftests: watchdog: accept multiple params on command line selftests: create cpufreq kconfig fragments selftests: x86: override clean in lib.mk to fix warnings selftests: sync: override clean in lib.mk to fix warnings selftests: splice: override clean in lib.mk to fix warnings selftests: gpio: fix clean target to remove all generated files and dirs selftests: add gpio generated files to .gitignore selftests: powerpc: override clean in lib.mk to fix warnings selftests: gpio: override clean in lib.mk to fix warnings selftests: futex: override clean in lib.mk to fix warnings selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean selftests: splice: fix clean target to not remove default_file_splice_read.sh selftests: gpio: add config fragment for gpio-mockup selftests: breakpoints: allow to cross-compile for aarch64/arm64 selftests/Makefile: Add missed PHONY targets selftests/vm/run_vmtests: Fix wrong comment selftests/Makefile: Add missed closing `"` in comment selftests/vm/run_vmtests: Polish output text selftests/timers: fix spelling mistake: "Asynchronous" ... commit 00d959333513a41959d3b85ba3e35320ec8844e5 Merge: 3341713 77c0edd Author: Linus Torvalds Date: Mon May 8 20:36:38 2017 -0700 Merge tag 'trace-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull more tracing updates from Steven Rostedt: "These are three simple changes. The first one is just a switch from using strcpy() to strlcpy(). Someone thought that it may cause an overflow bug, but since it only copies comms into a pre-allocated array of TASK_COMM_LEN, and no comm should ever be bigger than that, nor not end with a nul character, this change is more of a safety precaution than fixing anything that is actually broken. The other two changes are simply cleaning and optimizing some code" * tag 'trace-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace: Simplify ftrace_match_record() even more ftrace: Remove an unneeded condition tracing: Use strlcpy() instead of strcpy() in __trace_find_cmdline() commit 3341713c67d5eae5c68bab30add97e9f9ecfafa5 Merge: 857f864 693dfd5 67cf362 Author: Linus Torvalds Date: Mon May 8 20:07:29 2017 -0700 Merge tags 'for-linus' and 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull more rdma updates from Doug Ledford: "As mentioned in my first pull request, this is the subsequent pull requests I had. This is all I have, and in fact this cleans out the RDMA subsystem's entire patchworks queue of kernel changes that are ready to go (well, it did for the weekend anyway, a few new patches are in, but they'll be coming during the -rc cycle). The first tag contains a single patch that would have conflicted if taken from my tree or DaveM's tree as it needed our trees merged to come cleanly. The second tag contains the patch series from Intel plus three other stragllers that came in late last week. I took them because it allowed me to legitimately claim that the RDMA patchworks queue was, for a short time, 100% cleared of all waiting kernel patches, woohoo! :-). I have it under my for-next tag, so it did get 0day and linux- next over the end of last week, and linux-next did show one minor conflict. Summary: 'for-linus' tag: - mlx5/IPoIB fixup patch 'for-next' tag: - the hfi1 15 patch set that landed late - IPoIB get_link_ksettings which landed late because I asked for a respin - one late rxe change - one -rc worthy fix that's in early" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: IB/mlx5: Enable IPoIB acceleration * tag 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: rxe: expose num_possible_cpus() cnum_comp_vectors IB/rxe: Update caller's CRC for RXE_MEM_TYPE_DMA memory type IB/hfi1: Clean up on context initialization failure IB/hfi1: Fix an assign/ordering issue with shared context IDs IB/hfi1: Clean up context initialization IB/hfi1: Correctly clear the pkey IB/hfi1: Search shared contexts on the opened device, not all devices IB/hfi1: Remove atomic operations for SDMA_REQ_HAVE_AHG bit IB/hfi1: Use filedata rather than filepointer IB/hfi1: Name function prototype parameters IB/hfi1: Fix a subcontext memory leak IB/hfi1: Return an error on memory allocation failure IB/hfi1: Adjust default eager_buffer_size to 8MB IB/hfi1: Get rid of divide when setting the tx request header IB/hfi1: Fix yield logic in send engine IB/hfi1, IB/rdmavt: Move r_adefered to r_lock cache line IB/hfi1: Fix checks for Offline transient state IB/ipoib: add get_link_ksettings in ethtool commit 32f1bc0f3d262125169f9212aac306c638e34b54 Author: David S. Miller Date: Mon May 8 22:35:32 2017 -0400 Revert "ipv4: restore rt->fi for reference counting" This reverts commit 82486aa6f1b9bc8145e6d0fa2bc0b44307f3b875. As implemented, this causes dangling netdevice refs. Reported-by: Eric Dumazet Signed-off-by: David S. Miller include/net/route.h | 1 - net/ipv4/route.c | 18 +----------------- 2 files changed, 1 insertion(+), 18 deletions(-) commit b77b36cb7272ec5b9fb000e2ff18e947d9586a22 Author: Colin Ian King Date: Wed May 3 17:29:01 2017 +0100 scsi: pmcraid: remove redundant check to see if request_size is less than zero The 2nd check to see if request_size is less than zero is redundant because the first check takes error exit path on this condition. So, since it is redundant, remove it. Detected by CoverityScan, CID#146149 ("Logically Dead Code") Signed-off-by: Colin Ian King Reviewed-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/scsi/pmcraid.c | 3 --- 1 file changed, 3 deletions(-) commit 019c0d66f66a8612bb867caf05e865a4766238a4 Author: Colin Ian King Date: Sat May 6 23:13:55 2017 +0100 scsi: lpfc: ensure els_wq is being checked before destroying it I believe there is a typo on the wq destroy of els_wq, currently the driver is checking if els_cq is not null and I think this should be a check on els_wq instead. Detected by CoverityScan, CID#1411629 ("Copy-paste error") Signed-off-by: Colin Ian King Acked-by: Dick Kennedy Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07cc1ccfb84320582c9ac389a21cd81df82bc123 Author: Guenter Roeck Date: Fri May 5 16:31:47 2017 -0700 scsi: cxlflash: Select IRQ_POLL The driver now uses IRQ_POLL and needs to select it to avoid the following build error. ERROR: ".irq_poll_complete" [drivers/scsi/cxlflash/cxlflash.ko] undefined! ERROR: ".irq_poll_sched" [drivers/scsi/cxlflash/cxlflash.ko] undefined! ERROR: ".irq_poll_disable" [drivers/scsi/cxlflash/cxlflash.ko] undefined! ERROR: ".irq_poll_init" [drivers/scsi/cxlflash/cxlflash.ko] undefined! Fixes: cba06e6de403 ("scsi: cxlflash: Implement IRQ polling for RRQ processing") Signed-off-by: Guenter Roeck Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/Kconfig | 1 + 1 file changed, 1 insertion(+) commit cd22874fec8fbecd4999b55e67baf3d71775f6f3 Author: Kees Cook Date: Fri May 5 15:42:55 2017 -0700 scsi: qedf: Avoid reading past end of buffer Using memcpy() from a string that is shorter than the length copied means the destination buffer is being filled with arbitrary data from the kernel rodata segment. Instead, use strncpy() which will fill the trailing bytes with zeros. This was found with the future CONFIG_FORTIFY_SOURCE feature. Cc: Daniel Micay Signed-off-by: Kees Cook Acked-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 857f8640147c9fb43f20e43cbca6452710e1ca5d Merge: 8f3207c 3146c8f Author: Linus Torvalds Date: Mon May 8 19:03:25 2017 -0700 Merge tag 'pci-v4.12-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: - add framework for supporting PCIe devices in Endpoint mode (Kishon Vijay Abraham I) - use non-postable PCI config space mappings when possible (Lorenzo Pieralisi) - clean up and unify mmap of PCI BARs (David Woodhouse) - export and unify Function Level Reset support (Christoph Hellwig) - avoid FLR for Intel 82579 NICs (Sasha Neftin) - add pci_request_irq() and pci_free_irq() helpers (Christoph Hellwig) - short-circuit config access failures for disconnected devices (Keith Busch) - remove D3 sleep delay when possible (Adrian Hunter) - freeze PME scan before suspending devices (Lukas Wunner) - stop disabling MSI/MSI-X in pci_device_shutdown() (Prarit Bhargava) - disable boot interrupt quirk for ASUS M2N-LR (Stefan Assmann) - add arch-specific alignment control to improve device passthrough by avoiding multiple BARs in a page (Yongji Xie) - add sysfs sriov_drivers_autoprobe to control VF driver binding (Bodong Wang) - allow slots below PCI-to-PCIe "reverse bridges" (Bjorn Helgaas) - fix crashes when unbinding host controllers that don't support removal (Brian Norris) - add driver for MicroSemi Switchtec management interface (Logan Gunthorpe) - add driver for Faraday Technology FTPCI100 host bridge (Linus Walleij) - add i.MX7D support (Andrey Smirnov) - use generic MSI support for Aardvark (Thomas Petazzoni) - make Rockchip driver modular (Brian Norris) - advertise 128-byte Read Completion Boundary support for Rockchip (Shawn Lin) - advertise PCI_EXP_LNKSTA_SLC for Rockchip root port (Shawn Lin) - convert atomic_t to refcount_t in HV driver (Elena Reshetova) - add CPU IRQ affinity in HV driver (K. Y. Srinivasan) - fix PCI bus removal in HV driver (Long Li) - add support for ThunderX2 DMA alias topology (Jayachandran C) - add ThunderX pass2.x 2nd node MCFG quirk (Tomasz Nowicki) - add ITE 8893 bridge DMA alias quirk (Jarod Wilson) - restrict Cavium ACS quirk only to CN81xx/CN83xx/CN88xx devices (Manish Jaggi) * tag 'pci-v4.12-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (146 commits) PCI: Don't allow unbinding host controllers that aren't prepared ARM: DRA7: clockdomain: Change the CLKTRCTRL of CM_PCIE_CLKSTCTRL to SW_WKUP MAINTAINERS: Add PCI Endpoint maintainer Documentation: PCI: Add userguide for PCI endpoint test function tools: PCI: Add sample test script to invoke pcitest tools: PCI: Add a userspace tool to test PCI endpoint Documentation: misc-devices: Add Documentation for pci-endpoint-test driver misc: Add host side PCI driver for PCI test function device PCI: Add device IDs for DRA74x and DRA72x dt-bindings: PCI: dra7xx: Add DT bindings to enable unaligned access PCI: dwc: dra7xx: Workaround for errata id i870 dt-bindings: PCI: dra7xx: Add DT bindings for PCI dra7xx EP mode PCI: dwc: dra7xx: Add EP mode support PCI: dwc: dra7xx: Facilitate wrapper and MSI interrupts to be enabled independently dt-bindings: PCI: Add DT bindings for PCI designware EP mode PCI: dwc: designware: Add EP mode support Documentation: PCI: Add binding documentation for pci-test endpoint function ixgbe: Use pcie_flr() instead of duplicating it IB/hfi1: Use pcie_flr() instead of duplicating it PCI: imx6: Fix spelling mistake: "contol" -> "control" ... commit 0d2fc3b48ba0e267962c861c5258564c335dd1f2 Author: Dan Carpenter Date: Thu May 4 00:23:57 2017 +0300 scsi: qedf: Cleanup the type of io_log->op We store sc_cmd->cmnd[0] which is an unsigned char in io_log->op so this should also be unsigned char. The other thing is that this is displayed in the debugfs: seq_printf(s, "0x%02x:", io_log->op); Smatch complains that the formatting won't work for negative values so changing it to unsigned silences that warning as well. Signed-off-by: Dan Carpenter Acked-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d618cf4f24cebb822eaf57c27985266e4110176 Author: Dan Carpenter Date: Thu May 4 00:22:16 2017 +0300 scsi: lpfc: double lock typo in lpfc_ns_rsp() There is a double lock bug here so this will deadlock instead of unlocking. Fixes: 1c5b12f76301 ("Fix implicit logo and RSCN handling for NVMET") Signed-off-by: Dan Carpenter Reviewed-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_ct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f3207c7eab9d885cc64c778416537034a7d9c5b Merge: bf5f894 8e1c21f4 Author: Linus Torvalds Date: Mon May 8 18:49:23 2017 -0700 Merge tag 'tty-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial updates from Greg KH: "Here is the "big" TTY/Serial patch updates for 4.12-rc1 Not a lot of new things here, the normal number of serial driver updates and additions, tiny bugs fixed, and some core files split up to make future changes a bit easier for Nicolas's "tiny-tty" work. All of these have been in linux-next for a while" * tag 'tty-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (62 commits) serial: small Makefile reordering tty: split job control support into a file of its own tty: move baudrate handling code to a file of its own console: move console_init() out of tty_io.c serial: 8250_early: Add earlycon support for Palmchip UART tty: pl011: use "qdf2400_e44" as the earlycon name for QDF2400 E44 vt: make mouse selection of non-ASCII consistent vt: set mouse selection word-chars to gpm's default imx-serial: Reduce RX DMA startup latency when opening for reading serial: omap: suspend device on probe errors serial: omap: fix runtime-pm handling on unbind tty: serial: omap: add UPF_BOOT_AUTOCONF flag for DT init serial: samsung: Remove useless spinlock serial: samsung: Add missing checks for dma_map_single failure serial: samsung: Use right device for DMA-mapping calls serial: imx: setup DCEDTE early and ensure DCD and RI irqs to be off tty: fix comment typo s/repsonsible/responsible/ tty: amba-pl011: Fix spurious TX interrupts serial: xuartps: Enable clocks in the pm disable case also serial: core: Re-use struct uart_port {name} field ... commit 87ea6bdd8da88842a8247921f58ca495b4da79ef Author: Gustavo A. R. Silva Date: Wed May 3 14:17:55 2017 -0500 scsi: qedf: properly update arguments position in function call Properly update the position of the arguments in function call. Addresses-Coverity-ID: 1402010 Signed-off-by: Gustavo A. R. Silva Acked-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_els.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7aa686d35598cbe58b3f7ce32e4ec17649190f3d Author: Bart Van Assche Date: Tue May 2 10:45:03 2017 -0700 scsi: scsi_lib: Add #include This patch avoids that when building with W=1 the compiler complains that __scsi_init_queue() has not been declared. See also commit d48777a633d6 ("scsi: remove __scsi_alloc_queue"). Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 1 + 1 file changed, 1 insertion(+) commit 7cc49bbd005a5447afafc285dd302cbb8065eb28 Author: Christoph Hellwig Date: Tue May 2 09:57:20 2017 +0200 scsi: MAINTAINERS: update OSD entries The open-osd domain doesn't exist anymore, and mails to the list lead to really annoying bounced that repeat every day. Also the primarydata address for Benny bounces, and while I have a new one for him he doesn't seem to be maintaining the OSD code any more. Which beggs the question: should we really leave the Supported status in MAINTAINERS given that the code is barely maintained? Signed-off-by: Christoph Hellwig Acked-by: Jeff Layton Acked-by: Boaz Harrosh Acked-by: Benny Halevy Signed-off-by: Martin K. Petersen MAINTAINERS | 4 ---- 1 file changed, 4 deletions(-) commit 4ff7adc8c7886bcf6e48f09c49d3f339f33d7e79 Author: Zhou Zhengping Date: Fri Apr 28 17:43:04 2017 +0800 scsi: Skip deleted devices in __scsi_device_lookup When a device is unplugged from a SCSI controller, if the scsi_device is still in use by application layer, it won't get released until users close it. In this case, scsi_device_remove just set the scsi_device's state to be SDEV_DEL. But if you plug the disk just before the old scsi_device is released, then there will be two scsi_device structures in scsi_host->__devices. When the next unplug event happens, some low-level drivers will check whether the scsi_device has been added to host (for example the MegaRAID SAS series controller) by calling scsi_device_lookup(call __scsi_device_lookup) in function megasas_aen_polling. __scsi_device_lookup will return the first scsi_device. Because its state is SDEV_DEL, the scsi_device_lookup will return NULL, making the low-level driver assume that the scsi_device has been removed, and won't call scsi_device_remove which will lead to hot swap failure. Signed-off-by: Zhou Zhengping Tested-by: Zeng Rujia Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195607 Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi.c | 2 ++ 1 file changed, 2 insertions(+) commit 4492b739c9ccfaf828bd7c02dc779ec2a5e55ff4 Author: James Smart Date: Thu Apr 27 15:08:26 2017 -0700 scsi: lpfc: Fix panic on BFS configuration To select the appropriate shost template, the driver is issuing a mailbox command to retrieve the wwn. Turns out the sending of the command precedes the reset of the function. On SLI-4 adapters, this is inconsequential as the mailbox command location is specified by dma via the BMBX register. However, on SLI-3 adapters, the location of the mailbox command submission area changes. When the function is first powered on or reset, the cmd is submitted via PCI bar memory. Later the driver changes the function config to use host memory and DMA. The request to start a mailbox command is the same, a simple doorbell write, regardless of submission area. So.. if there has not been a boot driver run against the adapter, the mailbox command works as defaults are ok. But, if the boot driver has configured the card and, and if no platform pci function/slot reset occurs as the os starts, the mailbox command will fail. The SLI-3 device will use the stale boot driver dma location. This can cause PCI eeh errors. Fix is to reset the sli-3 function before sending the mailbox command, thus synchronizing the function/driver on mailbox location. Note: The fix uses routines that are typically invoked later in the call flow to reset the sli-3 device. The issue in using those routines is that the normal (non-fix) flow does additional initialization, namely the allocation of the pport structure. So, rather than significantly reworking the initialization flow so that the pport is alloc'd first, pointer checks are added to work around it. Checks are limited to the routines invoked by a sli-3 adapter (s3 routines) as this fix/early call is only invoked on a sli3 adapter. Nothing changes post the fix. Subsequent initialization, and another adapter reset, still occur - both on sli-3 and sli-4 adapters. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Fixes: 96418b5e2c88 ("scsi: lpfc: Fix eh_deadline setting for sli3 adapters.") Cc: stable@vger.kernel.org # v4.11+ Reviewed-by: Ewan D. Milne Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_crtn.h | 1 + drivers/scsi/lpfc/lpfc_init.c | 7 +++++++ drivers/scsi/lpfc/lpfc_sli.c | 19 ++++++++++++------- 3 files changed, 20 insertions(+), 7 deletions(-) commit c1061255031dea76ee9e082d081b88ac6d6c8265 Author: Hannes Reinecke Date: Thu Apr 27 16:25:03 2017 +0200 scsi: libfc: do not flood console with messages 'libfc: queue full ...' When the FCoE sending side becomes congested libfc tries to reduce the queue depth on the host; however due to the built-in lag before attempting to ramp down the queue depth _again_ the message log is flooded with the following message: libfc: queue full, reducing can_queue to 512 With this patch the message is printed only once (ie when it's actually changed). Signed-off-by: Hannes Reinecke Reviewed-by: Bart Van Assche Acked-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_fcp.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 4dbbe2d8e95c351157f292ece067f985c30c7b53 Author: Matthias Kaehlcke Date: Fri Apr 21 16:41:10 2017 -0700 tracing: Use cpumask_available() to check if cpumask variable may be used This fixes the following clang warning: kernel/trace/trace.c:3231:12: warning: address of array 'iter->started' will always evaluate to 'true' [-Wpointer-bool-conversion] if (iter->started) Link: http://lkml.kernel.org/r/20170421234110.117075-1-mka@chromium.org Signed-off-by: Matthias Kaehlcke Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bf5f89463f5b3109a72ed13ca62b57e90213387d Merge: 2d3e486 4d2b5bc Author: Linus Torvalds Date: Mon May 8 18:17:56 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: - the rest of MM - various misc things - procfs updates - lib/ updates - checkpatch updates - kdump/kexec updates - add kvmalloc helpers, use them - time helper updates for Y2038 issues. We're almost ready to remove current_fs_time() but that awaits a btrfs merge. - add tracepoints to DAX * emailed patches from Andrew Morton : (114 commits) drivers/staging/ccree/ssi_hash.c: fix build with gcc-4.4.4 selftests/vm: add a test for virtual address range mapping dax: add tracepoint to dax_insert_mapping() dax: add tracepoint to dax_writeback_one() dax: add tracepoints to dax_writeback_mapping_range() dax: add tracepoints to dax_load_hole() dax: add tracepoints to dax_pfn_mkwrite() dax: add tracepoints to dax_iomap_pte_fault() mtd: nand: nandsim: convert to memalloc_noreclaim_*() treewide: convert PF_MEMALLOC manipulations to new helpers mm: introduce memalloc_noreclaim_{save,restore} mm: prevent potential recursive reclaim due to clearing PF_MEMALLOC mm/huge_memory.c: deposit a pgtable for DAX PMD faults when required mm/huge_memory.c: use zap_deposited_table() more time: delete CURRENT_TIME_SEC and CURRENT_TIME gfs2: replace CURRENT_TIME with current_time apparmorfs: replace CURRENT_TIME with current_time() lustre: replace CURRENT_TIME macro fs: ubifs: replace CURRENT_TIME_SEC with current_time fs: ufs: use ktime_get_real_ts64() for birthtime ... commit 4d2b5bcab53f1c76a86279339561c9a36109a93b Author: Andrew Morton Date: Mon May 8 16:00:22 2017 -0700 drivers/staging/ccree/ssi_hash.c: fix build with gcc-4.4.4 drivers/staging/ccree/ssi_hash.c:1990: error: unknown field 'template_ahash' specified in initializer drivers/staging/ccree/ssi_hash.c:1991: error: unknown field 'init' specified in initializer drivers/staging/ccree/ssi_hash.c:1991: warning: missing braces around initializer drivers/staging/ccree/ssi_hash.c:1991: warning: (near initialization for 'driver_hash[0]..template_ahash') drivers/staging/ccree/ssi_hash.c:1992: error: unknown field 'update' specified in initializer drivers/staging/ccree/ssi_hash.c:1992: warning: excess elements in union initializer drivers/staging/ccree/ssi_hash.c:1992: warning: (near initialization for 'driver_hash[0].') drivers/staging/ccree/ssi_hash.c:1993: error: unknown field 'final' specified in initializer drivers/staging/ccree/ssi_hash.c:1993: warning: excess elements in union initializer drivers/staging/ccree/ssi_hash.c:1993: warning: (near initialization for 'driver_hash[0].') ... gcc-4.4.4 has issues with anon union initializers. Work around this. Cc: Gilad Ben-Yossef Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/staging/ccree/ssi_hash.c | 236 +++++++++++++++++++++------------------ 1 file changed, 126 insertions(+), 110 deletions(-) commit 4e5ce33ceb3250f564656588da4d47f3eca7d2af Author: Anshuman Khandual Date: Mon May 8 16:00:19 2017 -0700 selftests/vm: add a test for virtual address range mapping This verifies virtual address mapping below and above the 128TB range and makes sure that address returned are within the expected range depending upon the hint passed from the user space. Link: http://lkml.kernel.org/r/20170418095252.20533-1-khandual@linux.vnet.ibm.com Signed-off-by: Anshuman Khandual Cc: Michal Suchanek Cc: Aneesh Kumar K.V Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/Makefile | 1 + tools/testing/selftests/vm/run_vmtests | 11 ++ tools/testing/selftests/vm/virtual_address_range.c | 122 +++++++++++++++++++++ 3 files changed, 134 insertions(+) commit b4440734583c3addf80558e8fde2b61e2d76328c Author: Ross Zwisler Date: Mon May 8 16:00:16 2017 -0700 dax: add tracepoint to dax_insert_mapping() Add a tracepoint to dax_insert_mapping(), following the same logging conventions as the rest of DAX. This tracepoint, along with the one in dax_load_hole(), lets us know how a DAX PTE fault was serviced. Here is an example DAX fault that inserts a PTE mapping: small-1126 [007] .... 145.451604: dax_pte_fault: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10420000 pgoff 0x220 small-1126 [007] .... 145.452317: dax_insert_mapping: dev 259:0 ino 0x1003 shared write address 0x10420000 radix_entry 0x100006 small-1126 [007] .... 145.452399: dax_pte_fault_done: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10420000 pgoff 0x220 MAJOR|NOPAGE Link: http://lkml.kernel.org/r/20170221195116.13278-7-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Cc: Alexander Viro Cc: Dan Williams Cc: Ingo Molnar Cc: Matthew Wilcox Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 1 + include/trace/events/fs_dax.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) commit f9bc3a07539bc80b4da9ff2f5d6c13d5c7a4f073 Author: Ross Zwisler Date: Mon May 8 16:00:13 2017 -0700 dax: add tracepoint to dax_writeback_one() Add a tracepoint to dax_writeback_one(), following the same logging conventions as the rest of DAX. Here is an example range writeback which ends up flushing one PMD and one PTE: test-1265 [003] .... 496.615250: dax_writeback_range: dev 259:0 ino 0x1003 pgoff 0x0-0x7ffffffffffff test-1265 [003] .... 496.616263: dax_writeback_one: dev 259:0 ino 0x1003 pgoff 0x0 pglen 0x200 test-1265 [003] .... 496.616270: dax_writeback_one: dev 259:0 ino 0x1003 pgoff 0x305 pglen 0x1 test-1265 [003] .... 496.616272: dax_writeback_range_done: dev 259:0 ino 0x1003 pgoff 0x0-0x7ffffffffffff [akpm@linux-foundation.org: struct blk_dax_ctl has disappeared] Link: http://lkml.kernel.org/r/20170221195116.13278-6-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Cc: Alexander Viro Cc: Dan Williams Cc: Ingo Molnar Cc: Matthew Wilcox Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 1 + include/trace/events/fs_dax.h | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) commit d14a3f48a152b75a1e690d443f509c07c7b06c0e Author: Ross Zwisler Date: Mon May 8 16:00:10 2017 -0700 dax: add tracepoints to dax_writeback_mapping_range() Add tracepoints to dax_writeback_mapping_range(), following the same logging conventions as the rest of DAX. Here is an example writeback call: msync-1085 [006] .... 200.902565: dax_writeback_range: dev 259:0 ino 0x1003 pgoff 0x200-0x2ff msync-1085 [006] .... 200.902579: dax_writeback_range_done: dev 259:0 ino 0x1003 pgoff 0x200-0x2ff [ross.zwisler@linux.intel.com: fix regression in dax_writeback_mapping_range()] Link: http://lkml.kernel.org/r/20170314215358.31451-1-ross.zwisler@linux.intel.com Link: http://lkml.kernel.org/r/20170221195116.13278-5-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Cc: Alexander Viro Cc: Dan Williams Cc: Ingo Molnar Cc: Matthew Wilcox Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 12 +++++++----- include/trace/events/fs_dax.h | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 5 deletions(-) commit 678c9fd0430a1431bd9901c76f41e04fcb3eac87 Author: Ross Zwisler Date: Mon May 8 16:00:07 2017 -0700 dax: add tracepoints to dax_load_hole() Add tracepoints to dax_load_hole(), following the same logging conventions as the rest of DAX. Here is the logging generated by a PTE read from a hole: read-1075 [002] .... 62.362108: dax_pte_fault: dev 259:0 ino 0x1003 shared ALLOW_RETRY|KILLABLE|USER address 0x10480000 pgoff 0x280 read-1075 [002] .... 62.362140: dax_load_hole: dev 259:0 ino 0x1003 shared ALLOW_RETRY|KILLABLE|USER address 0x10480000 pgoff 0x280 NOPAGE read-1075 [002] .... 62.362141: dax_pte_fault_done: dev 259:0 ino 0x1003 shared ALLOW_RETRY|KILLABLE|USER address 0x10480000 pgoff 0x280 NOPAGE Link: http://lkml.kernel.org/r/20170221195116.13278-4-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Cc: Alexander Viro Cc: Dan Williams Cc: Ingo Molnar Cc: Matthew Wilcox Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 16 +++++++++++----- include/trace/events/fs_dax.h | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) commit c3ff68d7d1e6a24b7ad76d00ee583929858d4001 Author: Ross Zwisler Date: Mon May 8 16:00:03 2017 -0700 dax: add tracepoints to dax_pfn_mkwrite() Add tracepoints to dax_pfn_mkwrite(), following the same logging conventions as the rest of DAX. Here is an example PTE fault followed by a pfn_mkwrite: small_aligned-1094 [002] .... 374.084998: dax_pte_fault: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10400000 pgoff 0x200 small_aligned-1094 [002] .... 374.085145: dax_pte_fault_done: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10400000 pgoff 0x200 MAJOR|NOPAGE small_aligned-1094 [002] .... 374.085165: dax_pfn_mkwrite: dev 259:0 ino 0x1003 shared WRITE|MKWRITE|ALLOW_RETRY|KILLABLE|USER address 0x10400000 pgoff 0x200 NOPAGE Link: http://lkml.kernel.org/r/20170221195116.13278-3-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Cc: Alexander Viro Cc: Dan Williams Cc: Ingo Molnar Cc: Matthew Wilcox Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 3 +++ include/trace/events/fs_dax.h | 2 ++ 2 files changed, 5 insertions(+) commit a9c42b33ed80968dd160e3be48c7e84ccf171cf9 Author: Ross Zwisler Date: Mon May 8 16:00:00 2017 -0700 dax: add tracepoints to dax_iomap_pte_fault() Patch series "second round of tracepoints for DAX". This second round of DAX tracepoint patches adds tracing to the PTE fault path (dax_iomap_pte_fault(), dax_pfn_mkwrite(), dax_load_hole(), dax_insert_mapping()) and to the writeback path (dax_writeback_mapping_range(), dax_writeback_one()). The purpose of this tracing is to give us a high level view of what DAX is doing, whether faults are being serviced by PMDs or PTEs, and by real storage or by zero pages covering holes. I do have some patches nearly ready which also add tracing to grab_mapping_entry() and dax_insert_mapping_entry(). These are more targeted at logging how we are interacting with the radix tree, how we use empty entries for locking, whether we "downgrade" huge zero pages to 4k PTE sized allocations, etc. In the end it seemed to me that this might be too detailed to have as constantly present tracepoints, but if anyone sees value in having tracepoints like this in the DAX code permanently (Jan?), please let me know and I'll add those last two patches. All these tracepoints were done to be consistent with the style of the XFS tracepoints and with the existing DAX PMD tracepoints. This patch (of 6): Add tracepoints to dax_iomap_pte_fault(), following the same logging conventions as the rest of DAX. Here is an example fault that initially tries to be serviced by the PMD fault handler but which falls back to PTEs because the VMA isn't large enough to hold a PMD: small-1086 [005] .... 71.140014: xfs_filemap_huge_fault: dev 259:0 ino 0x1003 small-1086 [005] .... 71.140027: dax_pmd_fault: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10420000 vm_start 0x10200000 vm_end 0x10500000 pgoff 0x220 max_pgoff 0x1400 small-1086 [005] .... 71.140028: dax_pmd_fault_done: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10420000 vm_start 0x10200000 vm_end 0x10500000 pgoff 0x220 max_pgoff 0x1400 FALLBACK small-1086 [005] .... 71.140035: dax_pte_fault: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10420000 pgoff 0x220 small-1086 [005] .... 71.140396: dax_pte_fault_done: dev 259:0 ino 0x1003 shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10420000 pgoff 0x220 MAJOR|NOPAGE Link: http://lkml.kernel.org/r/20170221195116.13278-2-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara Cc: Alexander Viro Cc: Dan Williams Cc: Ingo Molnar Cc: Matthew Wilcox Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 15 +++++++++++---- include/trace/events/fs_dax.h | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 4 deletions(-) commit dcbe82149cc9d03dcdf7cd1a75d5541de7c14be1 Author: Vlastimil Babka Date: Mon May 8 15:59:57 2017 -0700 mtd: nand: nandsim: convert to memalloc_noreclaim_*() Nandsim has own functions set_memalloc() and clear_memalloc() for robust setting and clearing of PF_MEMALLOC. Replace them by the new generic helpers. No functional change. Link: http://lkml.kernel.org/r/20170405074700.29871-5-vbabka@suse.cz Signed-off-by: Vlastimil Babka Cc: Boris Brezillon Cc: Richard Weinberger Cc: Michal Hocko Cc: Mel Gorman Cc: Johannes Weiner Cc: Andrey Ryabinin Cc: Chris Leech Cc: "David S. Miller" Cc: Eric Dumazet Cc: Josef Bacik Cc: Lee Duncan Cc: Michal Hocko Cc: Adrian Hunter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/mtd/nand/nandsim.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) commit f108304872b8d987ceab195174ba41153fb70bf6 Author: Vlastimil Babka Date: Mon May 8 15:59:53 2017 -0700 treewide: convert PF_MEMALLOC manipulations to new helpers We now have memalloc_noreclaim_{save,restore} helpers for robust setting and clearing of PF_MEMALLOC. Let's convert the code which was using the generic tsk_restore_flags(). No functional change. [vbabka@suse.cz: in net/core/sock.c the hunk is missing] Link: http://lkml.kernel.org/r/20170405074700.29871-4-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Josef Bacik Cc: Lee Duncan Cc: Chris Leech Cc: "David S. Miller" Cc: Eric Dumazet Cc: Mel Gorman Cc: Johannes Weiner Cc: Andrey Ryabinin Cc: Boris Brezillon Cc: Michal Hocko Cc: Richard Weinberger Cc: Wouter Verhelst Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/nbd.c | 7 ++++--- drivers/scsi/iscsi_tcp.c | 7 ++++--- net/core/dev.c | 7 ++++--- net/core/sock.c | 7 ++++--- 4 files changed, 16 insertions(+), 12 deletions(-) commit 499118e966f1d2150bd66647c8932343c4e9a0b8 Author: Vlastimil Babka Date: Mon May 8 15:59:50 2017 -0700 mm: introduce memalloc_noreclaim_{save,restore} The previous patch ("mm: prevent potential recursive reclaim due to clearing PF_MEMALLOC") has shown that simply setting and clearing PF_MEMALLOC in current->flags can result in wrongly clearing a pre-existing PF_MEMALLOC flag and potentially lead to recursive reclaim. Let's introduce helpers that support proper nesting by saving the previous stat of the flag, similar to the existing memalloc_noio_* and memalloc_nofs_* helpers. Convert existing setting/clearing of PF_MEMALLOC within mm to the new helpers. There are no known issues with the converted code, but the change makes it more robust. Link: http://lkml.kernel.org/r/20170405074700.29871-3-vbabka@suse.cz Signed-off-by: Vlastimil Babka Suggested-by: Michal Hocko Acked-by: Michal Hocko Acked-by: Hillf Danton Cc: Mel Gorman Cc: Johannes Weiner Cc: Andrey Ryabinin Cc: Boris Brezillon Cc: Chris Leech Cc: "David S. Miller" Cc: Eric Dumazet Cc: Josef Bacik Cc: Lee Duncan Cc: Michal Hocko Cc: Richard Weinberger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/sched/mm.h | 12 ++++++++++++ mm/page_alloc.c | 11 ++++++----- mm/vmscan.c | 17 +++++++++++------ 3 files changed, 29 insertions(+), 11 deletions(-) commit 62be1511b1db8066220b18b7d4da2e6b9fdc69fb Author: Vlastimil Babka Date: Mon May 8 15:59:46 2017 -0700 mm: prevent potential recursive reclaim due to clearing PF_MEMALLOC Patch series "more robust PF_MEMALLOC handling" This series aims to unify the setting and clearing of PF_MEMALLOC, which prevents recursive reclaim. There are some places that clear the flag unconditionally from current->flags, which may result in clearing a pre-existing flag. This already resulted in a bug report that Patch 1 fixes (without the new helpers, to make backporting easier). Patch 2 introduces the new helpers, modelled after existing memalloc_noio_* and memalloc_nofs_* helpers, and converts mm core to use them. Patches 3 and 4 convert non-mm code. This patch (of 4): __alloc_pages_direct_compact() sets PF_MEMALLOC to prevent deadlock during page migration by lock_page() (see the comment in __unmap_and_move()). Then it unconditionally clears the flag, which can clear a pre-existing PF_MEMALLOC flag and result in recursive reclaim. This was not a problem until commit a8161d1ed609 ("mm, page_alloc: restructure direct compaction handling in slowpath"), because direct compation was called only after direct reclaim, which was skipped when PF_MEMALLOC flag was set. Even now it's only a theoretical issue, as the new callsite of __alloc_pages_direct_compact() is reached only for costly orders and when gfp_pfmemalloc_allowed() is true, which means either __GFP_NOMEMALLOC is in gfp_flags or in_interrupt() is true. There is no such known context, but let's play it safe and make __alloc_pages_direct_compact() robust for cases where PF_MEMALLOC is already set. Fixes: a8161d1ed609 ("mm, page_alloc: restructure direct compaction handling in slowpath") Link: http://lkml.kernel.org/r/20170405074700.29871-2-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reported-by: Andrey Ryabinin Acked-by: Michal Hocko Acked-by: Hillf Danton Cc: Mel Gorman Cc: Johannes Weiner Cc: Boris Brezillon Cc: Chris Leech Cc: "David S. Miller" Cc: Eric Dumazet Cc: Josef Bacik Cc: Lee Duncan Cc: Michal Hocko Cc: Richard Weinberger Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3b6521f53572d7fc1b40c93931948716a53a82ab Author: Oliver O'Halloran Date: Mon May 8 15:59:43 2017 -0700 mm/huge_memory.c: deposit a pgtable for DAX PMD faults when required Although all architectures use a deposited page table for THP on anonymous VMAs, some architectures (s390 and powerpc) require the deposited storage even for file backed VMAs due to quirks of their MMUs. This patch adds support for depositing a table in DAX PMD fault handling path for archs that require it. Other architectures should see no functional changes. Link: http://lkml.kernel.org/r/20170411174233.21902-3-oohall@gmail.com Signed-off-by: Oliver O'Halloran Cc: Reza Arbab Cc: Balbir Singh Cc: linux-nvdimm@ml01.01.org Cc: Oliver O'Halloran Cc: Aneesh Kumar K.V Cc: "Kirill A. Shutemov" Cc: Martin Schwidefsky Cc: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit c14a6eb44d8a59337433961d181ca953fb20d083 Author: Oliver O'Halloran Date: Mon May 8 15:59:40 2017 -0700 mm/huge_memory.c: use zap_deposited_table() more Depending on the flags of the PMD being zapped there may or may not be a deposited pgtable to be freed. In two of the three cases this is open coded while the third uses the zap_deposited_table() helper. This patch converts the others to use the helper to clean things up a bit. Link: http://lkml.kernel.org/r/20170411174233.21902-2-oohall@gmail.com Cc: Reza Arbab Cc: Balbir Singh Cc: linux-nvdimm@ml01.01.org Cc: Oliver O'Halloran Cc: Aneesh Kumar K.V Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit bfe1c566453a0979c0b3cd3728d0de962272f034 Author: Deepa Dinamani Date: Mon May 8 15:59:37 2017 -0700 time: delete CURRENT_TIME_SEC and CURRENT_TIME All uses of CURRENT_TIME_SEC and CURRENT_TIME macros have been replaced by other time functions. These macros are also not y2038 safe. And, all their use cases can be fulfilled by y2038 safe ktime_get_* variants. Link: http://lkml.kernel.org/r/1491613030-11599-12-git-send-email-deepa.kernel@gmail.com Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann Acked-by: John Stultz Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/time.h | 3 --- 1 file changed, 3 deletions(-) commit b32c8c7648d2fa6ed689fc688ed74baa22f12ca0 Author: Stephen Rothwell Date: Mon May 8 15:59:34 2017 -0700 gfs2: replace CURRENT_TIME with current_time Link: http://lkml.kernel.org/r/20170420161852.0492bc3f@canb.auug.org.au Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/gfs2/bmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 24d0d03c2edcd24906cf04fe4f41fa619f1fe632 Author: Deepa Dinamani Date: Mon May 8 15:59:31 2017 -0700 apparmorfs: replace CURRENT_TIME with current_time() CURRENT_TIME macro is not y2038 safe on 32 bit systems. The patch replaces all the uses of CURRENT_TIME by current_time(). This is also in preparation for the patch that transitions vfs timestamps to use 64 bit time and hence make them y2038 safe. current_time() is also planned to be transitioned to y2038 safe behavior along with this change. CURRENT_TIME macro will be deleted before merging the aforementioned change. Link: http://lkml.kernel.org/r/1491613030-11599-11-git-send-email-deepa.kernel@gmail.com Signed-off-by: Deepa Dinamani Acked-by: John Johansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds security/apparmor/apparmorfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47f38c539e9a42344ff5a664942075bd4df93876 Author: Deepa Dinamani Date: Mon May 8 15:59:28 2017 -0700 lustre: replace CURRENT_TIME macro CURRENT_TIME macro is not y2038 safe on 32 bit systems. The patch replaces all the uses of CURRENT_TIME by current_time() for filesystem times, and ktime_get_* functions for others. struct timespec is also not y2038 safe. Retain timespec for timestamp representation here as lustre uses it internally everywhere. These references will be changed to use struct timespec64 in a separate patch. This is also in preparation for the patch that transitions vfs timestamps to use 64 bit time and hence make them y2038 safe. current_time() is also planned to be transitioned to y2038 safe behavior along with this change. CURRENT_TIME macro will be deleted before merging the aforementioned change. Link: http://lkml.kernel.org/r/1491613030-11599-10-git-send-email-deepa.kernel@gmail.com Signed-off-by: Deepa Dinamani Cc: Oleg Drokin Cc: Andreas Dilger Cc: James Simmons Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/staging/lustre/lustre/llite/llite_lib.c | 6 +++--- drivers/staging/lustre/lustre/osc/osc_io.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 607a11ad947794d0f4f2c0f73c654876d1abb9b1 Author: Deepa Dinamani Date: Mon May 8 15:59:25 2017 -0700 fs: ubifs: replace CURRENT_TIME_SEC with current_time CURRENT_TIME_SEC is not y2038 safe. current_time() will be transitioned to use 64 bit time along with vfs in a separate patch. There is no plan to transition CURRENT_TIME_SEC to use y2038 safe time interfaces. current_time() returns timestamps according to the granularities set in the inode's super_block. The granularity check to call current_fs_time() or CURRENT_TIME_SEC is not required. Use current_time() directly to update inode timestamp. Use timespec_trunc during file system creation, before the first inode is created. Link: http://lkml.kernel.org/r/1491613030-11599-9-git-send-email-deepa.kernel@gmail.com Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann Cc: Richard Weinberger Cc: Artem Bityutskiy Cc: Adrian Hunter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ubifs/dir.c | 12 ++++++------ fs/ubifs/file.c | 12 ++++++------ fs/ubifs/ioctl.c | 2 +- fs/ubifs/misc.h | 10 ---------- fs/ubifs/sb.c | 14 ++++++++++---- fs/ubifs/xattr.c | 6 +++--- 6 files changed, 26 insertions(+), 30 deletions(-) commit a88e99e976582814cf73acd04134f52a620f3416 Author: Deepa Dinamani Date: Mon May 8 15:59:22 2017 -0700 fs: ufs: use ktime_get_real_ts64() for birthtime CURRENT_TIME is not y2038 safe. Replace it with ktime_get_real_ts64(). Inode time formats are already 64 bit long and accommodates time64_t. Link: http://lkml.kernel.org/r/1491613030-11599-6-git-send-email-deepa.kernel@gmail.com Signed-off-by: Deepa Dinamani Cc: Evgeniy Dushistov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ufs/ialloc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1134e091006a61d7ea4c33748b598972d1edc5c4 Author: Deepa Dinamani Date: Mon May 8 15:59:19 2017 -0700 fs: ceph: CURRENT_TIME with ktime_get_real_ts() CURRENT_TIME is not y2038 safe. The macro will be deleted and all the references to it will be replaced by ktime_get_* apis. struct timespec is also not y2038 safe. Retain timespec for timestamp representation here as ceph uses it internally everywhere. These references will be changed to use struct timespec64 in a separate patch. The current_fs_time() api is being changed to use vfs struct inode* as an argument instead of struct super_block*. Set the new mds client request r_stamp field using ktime_get_real_ts() instead of using current_fs_time(). Also, since r_stamp is used as mtime on the server, use timespec_trunc() to truncate the timestamp, using the right granularity from the superblock. This api will be transitioned to be y2038 safe along with vfs. Link: http://lkml.kernel.org/r/1491613030-11599-5-git-send-email-deepa.kernel@gmail.com Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann M: Ilya Dryomov M: "Yan, Zheng" M: Sage Weil Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/rbd.c | 2 +- fs/ceph/mds_client.c | 4 +++- net/ceph/messenger.c | 6 ++++-- net/ceph/osd_client.c | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) commit e37fea58f771c2674709099a09ddafd058fef634 Author: Deepa Dinamani Date: Mon May 8 15:59:16 2017 -0700 fs: cifs: replace CURRENT_TIME by other appropriate apis CURRENT_TIME macro is not y2038 safe on 32 bit systems. The patch replaces all the uses of CURRENT_TIME by current_time() for filesystem times, and ktime_get_* functions for authentication timestamps and timezone calculations. This is also in preparation for the patch that transitions vfs timestamps to use 64 bit time and hence make them y2038 safe. CURRENT_TIME macro will be deleted before merging the aforementioned change. The inode timestamps read from the server are assumed to have correct granularity and range. The patch also assumes that the difference between server and client times lie in the range INT_MIN..INT_MAX. This is valid because this is the difference between current times between server and client, and the largest timezone difference is in the range of one day. All cifs timestamps currently use timespec representation internally. Authentication and timezone timestamps can also be transitioned into using timespec64 when all other timestamps for cifs is transitioned to use timespec64. Link: http://lkml.kernel.org/r/1491613030-11599-4-git-send-email-deepa.kernel@gmail.com Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann Cc: Steve French Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/cifs/cifsencrypt.c | 4 +++- fs/cifs/cifssmb.c | 10 +++++----- fs/cifs/inode.c | 28 +++++++++++++++------------- 3 files changed, 23 insertions(+), 19 deletions(-) commit 51aad0aee5b70e26347e4d891d568518909f3452 Author: Deepa Dinamani Date: Mon May 8 15:59:13 2017 -0700 trace: make trace_hwlat timestamp y2038 safe struct timespec is not y2038 safe on 32 bit machines and needs to be replaced by struct timespec64 in order to represent times beyond year 2038 on such machines. Fix all the timestamp representation in struct trace_hwlat and all the corresponding implementations. Link: http://lkml.kernel.org/r/1491613030-11599-3-git-send-email-deepa.kernel@gmail.com Signed-off-by: Deepa Dinamani Acked-by: Steven Rostedt (VMware) Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/trace/trace_entries.h | 6 +++--- kernel/trace/trace_hwlat.c | 14 +++++++------- kernel/trace/trace_output.c | 9 ++++----- 3 files changed, 14 insertions(+), 15 deletions(-) commit 48fbfe50f1d5fef51bac98d105d2a28df42a1205 Author: Deepa Dinamani Date: Mon May 8 15:59:10 2017 -0700 fs: f2fs: use ktime_get_real_seconds for sit_info times CURRENT_TIME_SEC is not y2038 safe. Replace use of CURRENT_TIME_SEC with ktime_get_real_seconds in segment timestamps used by GC algorithm including the segment mtime timestamps. Link: http://lkml.kernel.org/r/1491613030-11599-2-git-send-email-deepa.kernel@gmail.com Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann Cc: Jaegeuk Kim Cc: Chao Yu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/f2fs/segment.c | 2 +- fs/f2fs/segment.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 063246641d4a9e9de84a2466fbad50112faf88dc Author: Kees Cook Date: Mon May 8 15:59:05 2017 -0700 format-security: move static strings to const While examining output from trial builds with -Wformat-security enabled, many strings were found that should be defined as "const", or as a char array instead of char pointer. This makes some static analysis easier, by producing fewer false positives. As these are all trivial changes, it seemed best to put them all in a single patch rather than chopping them up per maintainer. Link: http://lkml.kernel.org/r/20170405214711.GA5711@beast Signed-off-by: Kees Cook Acked-by: Jes Sorensen [runner.c] Cc: Tony Lindgren Cc: Russell King Cc: "Maciej W. Rozycki" Cc: Ralf Baechle Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: David Airlie Cc: Yisen Zhuang Cc: Salil Mehta Cc: Thomas Bogendoerfer Cc: Jiri Slaby Cc: Patrice Chotard Cc: "David S. Miller" Cc: James Hogan Cc: Paul Burton Cc: Matt Redfearn Cc: Paolo Bonzini Cc: Ingo Molnar Cc: Rasmus Villemoes Cc: Mugunthan V N Cc: Felipe Balbi Cc: Jarod Wilson Cc: Florian Westphal Cc: Antonio Quartulli Cc: Dmitry Torokhov Cc: Kejian Yan Cc: Daode Huang Cc: Qianqian Xie Cc: Philippe Reynes Cc: Colin Ian King Cc: Eric Dumazet Cc: Christian Gromm Cc: Andrey Shvetsov Cc: Jason Litzinger Cc: WANG Cong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/mach-omap2/board-n8x0.c | 2 +- arch/mips/dec/prom/init.c | 6 +++--- arch/mips/kernel/traps.c | 4 ++-- drivers/char/dsp56k.c | 2 +- drivers/cpufreq/powernow-k8.c | 3 ++- drivers/gpu/drm/drm_fb_helper.c | 2 +- drivers/net/ethernet/amd/atarilance.c | 4 ++-- drivers/net/ethernet/amd/declance.c | 2 +- drivers/net/ethernet/amd/sun3lance.c | 3 ++- drivers/net/ethernet/cirrus/mac89x0.c | 2 +- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.h | 2 +- drivers/net/ethernet/natsemi/sonic.h | 2 +- drivers/net/ethernet/toshiba/tc35815.c | 2 +- drivers/net/fddi/defxx.c | 2 +- drivers/net/hippi/rrunner.c | 3 ++- drivers/staging/most/mostcore/core.c | 2 +- drivers/tty/n_hdlc.c | 10 +++++----- drivers/tty/serial/st-asc.c | 2 +- net/decnet/af_decnet.c | 3 ++- 19 files changed, 31 insertions(+), 27 deletions(-) commit 929f9d285a212fde8703b2c0d540d3a79e93b2cd Author: SeongJae Park Date: Mon May 8 15:59:02 2017 -0700 Documentation/vm/transhuge.txt: fix trivial typos [akpm@linux-foundation.org: fixes per Randy] Link: http://lkml.kernel.org/r/20170405210259.2067-1-sj38.park@gmail.com Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/transhuge.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c718a97514e4d77c97a35734b728aaf541a0621b Author: Tetsuo Handa Date: Mon May 8 15:58:59 2017 -0700 fs: semove set but not checked AOP_FLAG_UNINTERRUPTIBLE flag Commit afddba49d18f ("fs: introduce write_begin, write_end, and perform_write aops") introduced AOP_FLAG_UNINTERRUPTIBLE flag which was checked in pagecache_write_begin(), but that check was removed by 4e02ed4b4a2f ("fs: remove prepare_write/commit_write"). Between these two commits, commit d9414774dc0c ("cifs: Convert cifs to new aops.") added a check in cifs_write_begin(), but that check was soon removed by commit a98ee8c1c707 ("[CIFS] fix regression in cifs_write_begin/cifs_write_end"). Therefore, AOP_FLAG_UNINTERRUPTIBLE flag is checked nowhere. Let's remove this flag. This patch has no functionality changes. Link: http://lkml.kernel.org/r/1489294781-53494-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Reviewed-by: Jeff Layton Reviewed-by: Christoph Hellwig Cc: Nick Piggin Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/vfs.txt | 3 +-- fs/buffer.c | 13 +++++-------- fs/exofs/dir.c | 3 +-- fs/hfs/extent.c | 4 ++-- fs/hfsplus/extents.c | 5 ++--- fs/iomap.c | 13 +++---------- fs/namei.c | 2 +- include/linux/fs.h | 5 ++--- mm/filemap.c | 6 ------ 9 files changed, 17 insertions(+), 37 deletions(-) commit f44a2920c84af809883ecbbd08d47fb5fe47c8ad Author: Andi Kleen Date: Mon May 8 15:58:56 2017 -0700 include/linux/uaccess.h: remove expensive WARN_ON in pagefault_disabled_dec pagefault_disabled_dec is frequently used inline, and it has a WARN_ON for underflow that expands to about 6.5k of extra code. The warning doesn't seem to be that useful and worth so much code so remove it. If it was needed could make it depending on some debug kernel option. Saves ~6.5k in my kernel text data bss dec hex filename 9039417 5367568 11116544 25523529 1857549 vmlinux-before-pf 9032805 5367568 11116544 25516917 1855b75 vmlinux-pf Link: http://lkml.kernel.org/r/20170315021431.13107-8-andi@firstfloor.org Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/uaccess.h | 1 - 1 file changed, 1 deletion(-) commit 68b43744c1fb3f86238527a696c0dc5f2bd6ea1b Author: Andi Kleen Date: Mon May 8 15:58:53 2017 -0700 drivers/scsi/megaraid: remove expensive inline from megasas_return_cmd Remove an inline from a fairly big function that is used often. It's unlikely that calling or not calling it makes a lot of difference. Saves around 8k text in my kernel. text data bss dec hex filename 9047801 5367568 11116544 25531913 1859609 vmlinux-before-megasas 9039417 5367568 11116544 25523529 1857549 vmlinux-megasas Link: http://lkml.kernel.org/r/20170315021431.13107-7-andi@firstfloor.org Signed-off-by: Andi Kleen Cc: Kashyap Desai Cc: Sumit Saxena Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec48c940da6cb96c4be6638d0f2efade24d5242a Author: Andi Kleen Date: Mon May 8 15:58:50 2017 -0700 kref: remove WARN_ON for NULL release functions The kref functions check for NULL release functions. This WARN_ON seems rather pointless. We will eventually release and then just crash nicely. It is also somewhat expensive because these functions are inlined in a lot of places. Removing the WARN_ONs saves around 2.3k in this kernel (likely more in others with more drivers) text data bss dec hex filename 9083992 5367600 11116544 25568136 1862388 vmlinux-before-load-avg 9070166 5367600 11116544 25554310 185ed86 vmlinux-load-avg Link: http://lkml.kernel.org/r/20170315021431.13107-5-andi@firstfloor.org Signed-off-by: Andi Kleen Acked-by: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kref.h | 6 ------ 1 file changed, 6 deletions(-) commit e6ccbff0e90cf4bf012bf369dbdaf84c6faaedaa Author: Laura Abbott Date: Mon May 8 15:58:47 2017 -0700 treewide: decouple cacheflush.h and set_memory.h Now that all call sites, completely decouple cacheflush.h and set_memory.h [sfr@canb.auug.org.au: kprobes/x86: merge fix for set_memory.h decoupling] Link: http://lkml.kernel.org/r/20170418180903.10300fd3@canb.auug.org.au Link: http://lkml.kernel.org/r/1488920133-27229-17-git-send-email-labbott@redhat.com Signed-off-by: Laura Abbott Signed-off-by: Stephen Rothwell Acked-by: Catalin Marinas Acked-by: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/cacheflush.h | 1 - arch/arm64/include/asm/cacheflush.h | 1 - arch/s390/include/asm/Kbuild | 1 + arch/s390/include/asm/cacheflush.h | 8 -------- arch/x86/include/asm/cacheflush.h | 1 - arch/x86/kernel/kprobes/core.c | 1 + arch/x86/kernel/kprobes/opt.c | 1 + 7 files changed, 3 insertions(+), 11 deletions(-) commit 880d5a36efe7479287c36194bffdcd6d7a183bab Author: Andrew Morton Date: Mon May 8 15:58:44 2017 -0700 drivers/staging/media/atomisp/pci/atomisp2: use set_memory.h Cc: Laura Abbott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 3 ++- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c | 2 +- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_reserved_pool.c | 3 ++- drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c | 5 ++++- 4 files changed, 9 insertions(+), 4 deletions(-) commit 8d5a1181f32f555f1182ba4da56d9db0ce2c60c9 Author: Laura Abbott Date: Mon May 8 15:58:41 2017 -0700 drivers/video/fbdev/vermilion/vermilion.c: use set_memory.h header set_memory_* functions have moved to set_memory.h. Switch to this explicitly. Link: http://lkml.kernel.org/r/1488920133-27229-16-git-send-email-labbott@redhat.com Signed-off-by: Laura Abbott Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/video/fbdev/vermilion/vermilion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 056d16b2141d66611437fa12c2016c1c99cd7e3d Author: Laura Abbott Date: Mon May 8 15:58:38 2017 -0700 drivers/misc/sram-exec.c: use set_memory.h header set_memory_* functions have moved to set_memory.h. Switch to this explicitly. Link: http://lkml.kernel.org/r/1488920133-27229-15-git-send-email-labbott@redhat.com Signed-off-by: Laura Abbott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/misc/sram-exec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7f80f513588dac3d9cbf886a3f2f6354d821695e Author: Laura Abbott Date: Mon May 8 15:58:35 2017 -0700 alsa: use set_memory.h header set_memory_* functions have moved to set_memory.h. Switch to this explicitly. Link: http://lkml.kernel.org/r/1488920133-27229-14-git-send-email-labbott@redhat.com Signed-off-by: Laura Abbott Acked-by: Takashi Iwai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds sound/pci/hda/hda_intel.c | 2 +- sound/pci/intel8x0.c | 4 +++- sound/x86/intel_hdmi_audio.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) commit 50327ddfbc926e68da1958e4fac51f1106f5e730 Author: Laura Abbott Date: Mon May 8 15:58:32 2017 -0700 kernel/power/snapshot.c: use set_memory.h header set_memory_* functions have moved to set_memory.h. Switch to this explicitly. Link: http://lkml.kernel.org/r/1488920133-27229-13-git-send-email-labbott@redhat.com Signed-off-by: Laura Abbott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/power/snapshot.c | 3 +++ 1 file changed, 3 insertions(+) commit bbca07c307166a753155e79a874d07023f4edd20 Author: Laura Abbott Date: Mon May 8 15:58:29 2017 -0700 kernel/module.c: use set_memory.h header set_memory_* functions have moved to set_memory.h. Switch to this explicitly. Link: http://lkml.kernel.org/r/1488920133-27229-12-git-send-email-labbott@redhat.com Signed-off-by: Laura Abbott Acked-by: Jessica Yu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/module.c | 3 +++ 1 file changed, 3 insertions(+) commit 2d0bde57f3527ffac9279b4c8ba61060ba395b1a Author: Laura Abbott Date: Mon May 8 15:58:26 2017 -0700 include/linux/filter.h: use set_memory.h header set_memory_* functions have moved to set_memory.h. Switch to this explicitly. Link: http://lkml.kernel.org/r/1488920133-27229-11-git-send-email-labbott@redhat.com Signed-off-by: Laura Abbott Acked-by: Daniel Borkmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/filter.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 23f19a563b2f15d9bf391cb9d3c1829bee56a44b Author: Laura Abbott Date: Mon May 8 15:58:23 2017 -0700 drivers/watchdog/hpwdt.c: use set_memory.h header set_memory_* functions have moved to set_memory.h. Switch to this explicitly. Link: http://lkml.kernel.org/r/1488920133-27229-10-git-send-email-labbott@redhat.com Signed-off-by: Laura Abbott Acked-by: Guenter Roeck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/watchdog/hpwdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c14dac9a411d20ca59e3b39724c1393f27635bc Author: Laura Abbott Date: Mon May 8 15:58:20 2017 -0700 drivers/hwtracing/intel_th/msu.c: use set_memory.h header set_memory_* functions have moved to set_memory.h. Switch to this explicitly. Link: http://lkml.kernel.org/r/1488920133-27229-9-git-send-email-labbott@redhat.com Signed-off-by: Laura Abbott Acked-by: Alexander Shishkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/hwtracing/intel_th/msu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ed3ba07946631f5c3a091fb37b018f7570f242b1 Author: Laura Abbott Date: Mon May 8 15:58:17 2017 -0700 drm: use set_memory.h header set_memory_* functions have moved to set_memory.h. Switch to this explicitly. [akpm@linux-foundation.org: track drivers/gpu/drm/i915/i915_gem_gtt.c linux-next changes] Link: http://lkml.kernel.org/r/1488920133-27229-8-git-send-email-labbott@redhat.com Signed-off-by: Laura Abbott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 3 +++ drivers/gpu/drm/gma500/gtt.c | 1 + drivers/gpu/drm/gma500/psb_drv.c | 1 + drivers/gpu/drm/i915/i915_gem_gtt.c | 2 ++ drivers/gpu/drm/radeon/radeon_gart.c | 3 +++ drivers/gpu/drm/ttm/ttm_page_alloc.c | 3 +++ drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 3 +++ drivers/gpu/drm/ttm/ttm_tt.c | 3 +++ 8 files changed, 19 insertions(+) commit e47036b45a3f02d35648d4683b9e26f26a60e231 Author: Laura Abbott Date: Mon May 8 15:58:14 2017 -0700 agp: use set_memory.h header set_memory_* functions have moved to set_memory.h. Switch to this explicitly. Link: http://lkml.kernel.org/r/1488920133-27229-7-git-send-email-labbott@redhat.com Signed-off-by: Laura Abbott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/char/agp/amd-k7-agp.c | 1 + drivers/char/agp/ati-agp.c | 1 + drivers/char/agp/generic.c | 4 +++- drivers/char/agp/intel-gtt.c | 1 + drivers/char/agp/sworks-agp.c | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) commit d11636511ed97ceda66a08ecff99f100e1107b76 Author: Laura Abbott Date: Mon May 8 15:58:11 2017 -0700 x86: use set_memory.h header set_memory_* functions have moved to set_memory.h. Switch to this explicitly. Link: http://lkml.kernel.org/r/1488920133-27229-6-git-send-email-labbott@redhat.com Signed-off-by: Laura Abbott Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/kernel/amd_gart_64.c | 2 +- arch/x86/kernel/cpu/amd.c | 2 +- arch/x86/kernel/cpu/bugs.c | 2 +- arch/x86/kernel/ftrace.c | 2 +- arch/x86/kernel/machine_kexec_32.c | 2 +- arch/x86/kernel/machine_kexec_64.c | 1 + arch/x86/mm/init.c | 2 +- arch/x86/mm/init_32.c | 2 +- arch/x86/mm/init_64.c | 2 +- arch/x86/mm/ioremap.c | 2 +- arch/x86/mm/pageattr.c | 1 + arch/x86/net/bpf_jit_comp.c | 1 + arch/x86/pci/pcbios.c | 2 +- arch/x86/platform/efi/efi.c | 2 +- arch/x86/realmode/init.c | 2 +- 15 files changed, 15 insertions(+), 12 deletions(-) commit e6c7c63001920a57f23c8f5d6f652bfc4bea327b Author: Laura Abbott Date: Mon May 8 15:58:08 2017 -0700 s390: use set_memory.h header set_memory_* functions have moved to set_memory.h. Switch to this explicitly Link: http://lkml.kernel.org/r/1488920133-27229-5-git-send-email-labbott@redhat.com Signed-off-by: Laura Abbott Acked-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/kernel/ftrace.c | 1 + arch/s390/kernel/kprobes.c | 2 +- arch/s390/kernel/machine_kexec.c | 1 + arch/s390/mm/init.c | 1 + arch/s390/mm/pageattr.c | 1 + arch/s390/mm/vmem.c | 1 + arch/s390/net/bpf_jit_comp.c | 1 + 7 files changed, 7 insertions(+), 1 deletion(-) commit d4bbc30bb059ec6bbb17edd3d3f98c5edeee7494 Author: Laura Abbott Date: Mon May 8 15:58:05 2017 -0700 arm64: use set_memory.h header The set_memory_* functions have moved to set_memory.h. Use that header explicitly. Link: http://lkml.kernel.org/r/1488920133-27229-4-git-send-email-labbott@redhat.com Signed-off-by: Laura Abbott Acked-by: Catalin Marinas Acked-by: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/mm/pageattr.c | 1 + arch/arm64/net/bpf_jit_comp.c | 1 + 2 files changed, 2 insertions(+) commit 74d86a70636a0a5eec76efcff24bee9681e01804 Author: Laura Abbott Date: Mon May 8 15:58:02 2017 -0700 arm: use set_memory.h header set_memory_* functions have moved to set_memory.h. Switch to this explicitly Link: http://lkml.kernel.org/r/1488920133-27229-3-git-send-email-labbott@redhat.com Signed-off-by: Laura Abbott Acked-by: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/kernel/ftrace.c | 1 + arch/arm/kernel/machine_kexec.c | 1 + arch/arm/mm/pageattr.c | 1 + arch/arm/net/bpf_jit_32.c | 1 + 4 files changed, 4 insertions(+) commit 299878bac326c890699c696ebba26f56fe93fc75 Author: Laura Abbott Date: Mon May 8 15:57:59 2017 -0700 treewide: move set_memory_* functions away from cacheflush.h Patch series "set_memory_* functions header refactor", v3. The set_memory_* APIs came out of a desire to have a better way to change memory attributes. Many of these attributes were linked to cache functionality so the prototypes were put in cacheflush.h. These days, the APIs have grown and have a much wider use than just cache APIs. To support this growth, split off set_memory_* and friends into a separate header file to avoid growing cacheflush.h for APIs that have nothing to do with caches. Link: http://lkml.kernel.org/r/1488920133-27229-2-git-send-email-labbott@redhat.com Signed-off-by: Laura Abbott Acked-by: Russell King Acked-by: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/cacheflush.h | 21 +-------- arch/arm/include/asm/set_memory.h | 32 ++++++++++++++ arch/arm64/include/asm/Kbuild | 1 + arch/arm64/include/asm/cacheflush.h | 5 +-- arch/s390/include/asm/cacheflush.h | 28 +----------- arch/s390/include/asm/set_memory.h | 31 +++++++++++++ arch/x86/include/asm/cacheflush.h | 86 +----------------------------------- arch/x86/include/asm/set_memory.h | 87 +++++++++++++++++++++++++++++++++++++ include/asm-generic/set_memory.h | 12 +++++ 9 files changed, 167 insertions(+), 136 deletions(-) commit 8ac1ed791401790968fd00ca63ca4fa814677199 Author: Joe Perches Date: Mon May 8 15:57:56 2017 -0700 treewide: spelling: correct diffrent[iate] and banlance typos Add these misspellings to scripts/spelling.txt too Link: http://lkml.kernel.org/r/962aace119675e5fe87be2a88ddac1a5486f8e60.1490931810.git.joe@perches.com Signed-off-by: Joe Perches Acked-by: Mauro Carvalho Chehab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/media/dvb-frontends/drx39xyj/drx_dap_fasi.h | 2 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_int.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_main.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 2 +- include/linux/mlx4/device.h | 2 +- scripts/spelling.txt | 3 +++ 7 files changed, 9 insertions(+), 6 deletions(-) commit 6e7c2b4dd36d8336f876c66a31d9b84616f3b2c4 Author: Masahiro Yamada Date: Mon May 8 15:57:53 2017 -0700 scripts/spelling.txt: add "intialise(d)" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: intialisation||initialisation intialised||initialised intialise||initialise This commit does not intend to change the British spelling itself. Link: http://lkml.kernel.org/r/1481573103-11329-18-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds certs/blacklist.c | 2 +- drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 8 ++++---- drivers/video/fbdev/intelfb/intelfbdrv.c | 2 +- fs/inode.c | 2 +- fs/xfs/xfs_log_recover.c | 2 +- scripts/spelling.txt | 3 +++ 6 files changed, 11 insertions(+), 8 deletions(-) commit ad61dd303a0f2439bb104349e2d2ec91a3010ce0 Author: Stephen Boyd Date: Mon May 8 15:57:50 2017 -0700 scripts/spelling.txt: add regsiter -> register spelling mistake This typo is quite common. Fix it and add it to the spelling file so that checkpatch catches it earlier. Link: http://lkml.kernel.org/r/20170317011131.6881-2-sboyd@codeaurora.org Signed-off-by: Stephen Boyd Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arc/kernel/unwind.c | 2 +- arch/arm/kernel/kgdb.c | 2 +- arch/arm/mach-ixp4xx/common-pci.c | 4 ++-- arch/m68k/ifpsp060/src/ilsp.S | 2 +- arch/m68k/ifpsp060/src/isp.S | 2 +- arch/mips/cavium-octeon/executive/cvmx-helper-rgmii.c | 2 +- arch/mips/include/asm/octeon/cvmx-helper-rgmii.h | 2 +- arch/parisc/kernel/entry.S | 2 +- arch/powerpc/mm/icswx.c | 2 +- drivers/acpi/cppc_acpi.c | 2 +- drivers/clk/qcom/common.c | 2 +- drivers/cpufreq/sti-cpufreq.c | 4 ++-- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 +- drivers/infiniband/hw/hns/hns_roce_mr.c | 2 +- drivers/net/can/rcar/rcar_canfd.c | 2 +- drivers/net/ethernet/amd/amd8111e.h | 4 ++-- drivers/net/ethernet/atheros/atl1c/atl1c_hw.c | 2 +- drivers/net/ethernet/intel/igb/e1000_phy.c | 2 +- drivers/scsi/isci/registers.h | 4 ++-- drivers/scsi/mpt3sas/mpt3sas_base.h | 2 +- include/linux/bcma/bcma_driver_pci.h | 2 +- include/linux/ftrace.h | 2 +- include/uapi/linux/ipmi.h | 2 +- scripts/spelling.txt | 1 + sound/soc/soc-core.c | 2 +- 25 files changed, 29 insertions(+), 28 deletions(-) commit d1b7c9344b628f8bbb55a0775667f33b8eafac82 Author: Stephen Boyd Date: Mon May 8 15:57:47 2017 -0700 scripts/spelling.txt: add "memory" pattern and fix typos Fix typos and add the following to the scripts/spelling.txt: momery||memory Link: http://lkml.kernel.org/r/20170317011131.6881-1-sboyd@codeaurora.org Signed-off-by: Stephen Boyd Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 +- drivers/leds/leds-lp5521.c | 2 +- drivers/leds/leds-lp5523.c | 2 +- drivers/leds/leds-lp5562.c | 2 +- scripts/spelling.txt | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) commit 19809c2da28aee5860ad9a2eff760730a0710df0 Author: Michal Hocko Date: Mon May 8 15:57:44 2017 -0700 mm, vmalloc: use __GFP_HIGHMEM implicitly __vmalloc* allows users to provide gfp flags for the underlying allocation. This API is quite popular $ git grep "=[[:space:]]__vmalloc\|return[[:space:]]*__vmalloc" | wc -l 77 The only problem is that many people are not aware that they really want to give __GFP_HIGHMEM along with other flags because there is really no reason to consume precious lowmemory on CONFIG_HIGHMEM systems for pages which are mapped to the kernel vmalloc space. About half of users don't use this flag, though. This signals that we make the API unnecessarily too complex. This patch simply uses __GFP_HIGHMEM implicitly when allocating pages to be mapped to the vmalloc space. Current users which add __GFP_HIGHMEM are simplified and drop the flag. Link: http://lkml.kernel.org/r/20170307141020.29107-1-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: Matthew Wilcox Cc: Al Viro Cc: Vlastimil Babka Cc: David Rientjes Cc: Cristopher Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/parisc/kernel/module.c | 2 +- arch/x86/kernel/module.c | 2 +- drivers/block/drbd/drbd_bitmap.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_dump.c | 4 ++-- drivers/md/dm-bufio.c | 2 +- fs/btrfs/free-space-tree.c | 3 +-- fs/file.c | 2 +- fs/xfs/kmem.c | 2 +- include/drm/drm_mem_util.h | 9 +++------ kernel/bpf/core.c | 9 +++------ kernel/bpf/syscall.c | 3 +-- kernel/fork.c | 2 +- kernel/groups.c | 2 +- kernel/module.c | 2 +- mm/kasan/kasan.c | 2 +- mm/nommu.c | 3 +-- mm/util.c | 2 +- mm/vmalloc.c | 14 +++++++------- net/ceph/ceph_common.c | 2 +- net/netfilter/x_tables.c | 3 +-- 20 files changed, 31 insertions(+), 41 deletions(-) commit 54f180d3c181277457fb003dd9524c2aa1ef8160 Author: Huang Ying Date: Mon May 8 15:57:40 2017 -0700 mm, swap: use kvzalloc to allocate some swap data structures Now vzalloc() is used in swap code to allocate various data structures, such as swap cache, swap slots cache, cluster info, etc. Because the size may be too large on some system, so that normal kzalloc() may fail. But using kzalloc() has some advantages, for example, less memory fragmentation, less TLB pressure, etc. So change the data structure allocation in swap code to use kvzalloc() which will try kzalloc() firstly, and fallback to vzalloc() if kzalloc() failed. In general, although kmalloc() will reduce the number of high-order pages in short term, vmalloc() will cause more pain for memory fragmentation in the long term. And the swap data structure allocation that is changed in this patch is expected to be long term allocation. From Dave Hansen: "for example, we have a two-page data structure. vmalloc() takes two effectively random order-0 pages, probably from two different 2M pages and pins them. That "kills" two 2M pages. kmalloc(), allocating two *contiguous* pages, will not cross a 2M boundary. That means it will only "kill" the possibility of a single 2M page. More 2M pages == less fragmentation. The allocation in this patch occurs during swap on time, which is usually done during system boot, so usually we have high opportunity to allocate the contiguous pages successfully. The allocation for swap_map[] in struct swap_info_struct is not changed, because that is usually quite large and vmalloc_to_page() is used for it. That makes it a little harder to change. Link: http://lkml.kernel.org/r/20170407064911.25447-1-ying.huang@intel.com Signed-off-by: Huang Ying Acked-by: Tim Chen Acked-by: Michal Hocko Acked-by: Rik van Riel Cc: Dave Hansen Cc: Hugh Dickins Cc: Shaohua Li Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap_slots.c | 19 +++++++++++-------- mm/swap_state.c | 2 +- mm/swapfile.c | 10 ++++++---- 3 files changed, 18 insertions(+), 13 deletions(-) commit bc4e54f6e966e9ca35064cd60f91b1478c07a1b2 Author: Michal Hocko Date: Mon May 8 15:57:37 2017 -0700 drivers/md/bcache/super.c: use kvmalloc bcache_device_init uses kmalloc for small requests and vmalloc for those which are larger than 64 pages. This alone is a strange criterion. Moreover kmalloc can fallback to vmalloc on the failure. Let's simply use kvmalloc instead as it knows how to handle the fallback properly Link: http://lkml.kernel.org/r/20170306103327.2766-5-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Kent Overstreet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/md/bcache/super.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit d224e938189771dbd1e3b68ee8603a949bee76bb Author: Michal Hocko Date: Mon May 8 15:57:34 2017 -0700 drivers/md/dm-ioctl.c: use kvmalloc rather than opencoded variant copy_params uses kmalloc with vmalloc fallback. We already have a helper for that - kvmalloc. This caller requires GFP_NOIO semantic so it hasn't been converted with many others by previous patches. All we need to achieve this semantic is to use the scope memalloc_noio_{save,restore} around kvmalloc. Link: http://lkml.kernel.org/r/20170306103327.2766-4-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Mikulas Patocka Cc: Mike Snitzer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/md/dm-ioctl.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit da6bc57a8f02dd90d07071b4cd067f2de26c9192 Author: Michal Hocko Date: Mon May 8 15:57:31 2017 -0700 net: use kvmalloc with __GFP_REPEAT rather than open coded variant fq_alloc_node, alloc_netdev_mqs and netif_alloc* open code kmalloc with vmalloc fallback. Use the kvmalloc variant instead. Keep the __GFP_REPEAT flag based on explanation from Eric: "At the time, tests on the hardware I had in my labs showed that vmalloc() could deliver pages spread all over the memory and that was a small penalty (once memory is fragmented enough, not at boot time)" The way how the code is constructed means, however, that we prefer to go and hit the OOM killer before we fall back to the vmalloc for requests <=32kB (with 4kB pages) in the current code. This is rather disruptive for something that can be achived with the fallback. On the other hand __GFP_REPEAT doesn't have any useful semantic for these requests. So the effect of this patch is that requests which fit into 32kB will fall back to vmalloc easier now. Link: http://lkml.kernel.org/r/20170306103327.2766-3-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Eric Dumazet Cc: David Miller Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds net/core/dev.c | 24 +++++++++--------------- net/sched/sch_fq.c | 12 +----------- 2 files changed, 10 insertions(+), 26 deletions(-) commit 752ade68cbd81d0321dfecc188f655a945551b25 Author: Michal Hocko Date: Mon May 8 15:57:27 2017 -0700 treewide: use kv[mz]alloc* rather than opencoded variants There are many code paths opencoding kvmalloc. Let's use the helper instead. The main difference to kvmalloc is that those users are usually not considering all the aspects of the memory allocator. E.g. allocation requests <= 32kB (with 4kB pages) are basically never failing and invoke OOM killer to satisfy the allocation. This sounds too disruptive for something that has a reasonable fallback - the vmalloc. On the other hand those requests might fallback to vmalloc even when the memory allocator would succeed after several more reclaim/compaction attempts previously. There is no guarantee something like that happens though. This patch converts many of those places to kv[mz]alloc* helpers because they are more conservative. Link: http://lkml.kernel.org/r/20170306103327.2766-2-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: Boris Ostrovsky # Xen bits Acked-by: Kees Cook Acked-by: Vlastimil Babka Acked-by: Andreas Dilger # Lustre Acked-by: Christian Borntraeger # KVM/s390 Acked-by: Dan Williams # nvdim Acked-by: David Sterba # btrfs Acked-by: Ilya Dryomov # Ceph Acked-by: Tariq Toukan # mlx4 Acked-by: Leon Romanovsky # mlx5 Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Herbert Xu Cc: Anton Vorontsov Cc: Colin Cross Cc: Tony Luck Cc: "Rafael J. Wysocki" Cc: Ben Skeggs Cc: Kent Overstreet Cc: Santosh Raspatur Cc: Hariprasad S Cc: Yishai Hadas Cc: Oleg Drokin Cc: "Yan, Zheng" Cc: Alexander Viro Cc: Alexei Starovoitov Cc: Eric Dumazet Cc: David Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/kvm/kvm-s390.c | 10 ++----- crypto/lzo.c | 4 +-- drivers/acpi/apei/erst.c | 8 ++---- drivers/char/agp/generic.c | 8 +----- drivers/gpu/drm/nouveau/nouveau_gem.c | 4 +-- drivers/md/bcache/util.h | 12 ++------ drivers/net/ethernet/chelsio/cxgb3/cxgb3_defs.h | 3 -- drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c | 29 +++---------------- drivers/net/ethernet/chelsio/cxgb3/l2t.c | 8 +----- drivers/net/ethernet/chelsio/cxgb3/l2t.h | 1 - drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c | 12 ++++---- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 3 -- drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 10 +++---- drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 8 +++--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 31 ++++---------------- drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c | 14 ++++----- drivers/net/ethernet/chelsio/cxgb4/l2t.c | 2 +- drivers/net/ethernet/chelsio/cxgb4/sched.c | 12 ++++---- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 9 ++---- drivers/net/ethernet/mellanox/mlx4/mr.c | 9 ++---- drivers/nvdimm/dimm_devs.c | 5 +--- .../staging/lustre/lnet/libcfs/linux/linux-mem.c | 11 +------- drivers/xen/evtchn.c | 14 +-------- fs/btrfs/ctree.c | 9 ++---- fs/btrfs/ioctl.c | 9 ++---- fs/btrfs/send.c | 27 ++++++------------ fs/ceph/file.c | 9 ++---- fs/select.c | 5 +--- fs/xattr.c | 27 ++++++------------ include/linux/mlx5/driver.h | 7 +---- include/linux/mm.h | 8 ++++++ lib/iov_iter.c | 5 +--- mm/frame_vector.c | 5 +--- net/ipv4/inet_hashtables.c | 6 +--- net/ipv4/tcp_metrics.c | 5 +--- net/mpls/af_mpls.c | 5 +--- net/netfilter/x_tables.c | 21 +++----------- net/netfilter/xt_recent.c | 5 +--- net/sched/sch_choke.c | 5 +--- net/sched/sch_fq_codel.c | 26 ++++------------- net/sched/sch_hhf.c | 33 ++++++---------------- net/sched/sch_netem.c | 6 +--- net/sched/sch_sfq.c | 6 +--- security/keys/keyctl.c | 22 ++++----------- 44 files changed, 128 insertions(+), 350 deletions(-) commit 81be3dee96346fbe08c31be5ef74f03f6b63cf68 Author: Michal Hocko Date: Mon May 8 15:57:24 2017 -0700 fs/xattr.c: zero out memory copied to userspace in getxattr getxattr uses vmalloc to allocate memory if kzalloc fails. This is filled by vfs_getxattr and then copied to the userspace. vmalloc, however, doesn't zero out the memory so if the specific implementation of the xattr handler is sloppy we can theoretically expose a kernel memory. There is no real sign this is really the case but let's make sure this will not happen and use vzalloc instead. Fixes: 779302e67835 ("fs/xattr.c:getxattr(): improve handling of allocation failures") Link: http://lkml.kernel.org/r/20170306103327.2766-1-mhocko@kernel.org Acked-by: Kees Cook Reported-by: Vlastimil Babka Signed-off-by: Michal Hocko Cc: [3.6+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 847f716f9ec2c61f57690c871a307f1349d472d0 Author: Michal Hocko Date: Mon May 8 15:57:21 2017 -0700 net/ipv6/ila/ila_xlat.c: simplify a strange allocation pattern alloc_ila_locks seemed to c&p from alloc_bucket_locks allocation pattern which is quite unusual. The default allocation size is 320 * sizeof(spinlock_t) which is sub page unless lockdep is enabled when the performance benefit is really questionable and not worth the subtle code IMHO. Also note that the context when we call ila_init_net (modprobe or a task creating a net namespace) has to be properly configured. Let's just simplify the code and use kvmalloc helper which is a transparent way to use kmalloc with vmalloc fallback. Link: http://lkml.kernel.org/r/20170306103032.2540-5-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Tom Herbert Cc: Eric Dumazet Cc: David Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds net/ipv6/ila/ila_xlat.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 43ca5bc4f72ed22e6e20feabdd3eab3c721d98cd Author: Michal Hocko Date: Mon May 8 15:57:18 2017 -0700 lib/rhashtable.c: simplify a strange allocation pattern alloc_bucket_locks allocation pattern is quite unusual. We are preferring vmalloc when CONFIG_NUMA is enabled. The rationale is that vmalloc will respect the memory policy of the current process and so the backing memory will get distributed over multiple nodes if the requester is configured properly. At least that is the intention, in reality rhastable is shrunk and expanded from a kernel worker so no mempolicy can be assumed. Let's just simplify the code and use kvmalloc helper, which is a transparent way to use kmalloc with vmalloc fallback, if the caller is allowed to block and use the flag otherwise. Link: http://lkml.kernel.org/r/20170306103032.2540-4-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Tom Herbert Cc: Eric Dumazet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/rhashtable.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 6c5ab6511f718c3fb19bcc3f78a90b0e0b601675 Author: Michal Hocko Date: Mon May 8 15:57:15 2017 -0700 mm: support __GFP_REPEAT in kvmalloc_node for >32kB vhost code uses __GFP_REPEAT when allocating vhost_virtqueue resp. vhost_vsock because it would really like to prefer kmalloc to the vmalloc fallback - see 23cc5a991c7a ("vhost-net: extend device allocation to vmalloc") for more context. Michael Tsirkin has also noted: "__GFP_REPEAT overhead is during allocation time. Using vmalloc means all accesses are slowed down. Allocation is not on data path, accesses are." The similar applies to other vhost_kvzalloc users. Let's teach kvmalloc_node to handle __GFP_REPEAT properly. There are two things to be careful about. First we should prevent from the OOM killer and so have to involve __GFP_NORETRY by default and secondly override __GFP_REPEAT for !costly order requests as the __GFP_REPEAT is ignored for !costly orders. Supporting __GFP_REPEAT like semantic for !costly request is possible it would require changes in the page allocator. This is out of scope of this patch. This patch shouldn't introduce any functional change. Link: http://lkml.kernel.org/r/20170306103032.2540-3-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Acked-by: Michael S. Tsirkin Cc: David Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/vhost/net.c | 9 +++------ drivers/vhost/vhost.c | 15 +++------------ drivers/vhost/vsock.c | 9 +++------ mm/util.c | 18 +++++++++++++++--- 4 files changed, 24 insertions(+), 27 deletions(-) commit 1f5307b1e094bfffa83c65c40ac6e3415c108780 Author: Michal Hocko Date: Mon May 8 15:57:12 2017 -0700 mm, vmalloc: properly track vmalloc users __vmalloc_node_flags used to be static inline but this has changed by "mm: introduce kv[mz]alloc helpers" because kvmalloc_node needs to use it as well and the code is outside of the vmalloc proper. I haven't realized that changing this will lead to a subtle bug though. The function is responsible to track the caller as well. This caller is then printed by /proc/vmallocinfo. If __vmalloc_node_flags is not inline then we would get only direct users of __vmalloc_node_flags as callers (e.g. v[mz]alloc) which reduces usefulness of this debugging feature considerably. It simply doesn't help to see that the given range belongs to vmalloc as a caller: 0xffffc90002c79000-0xffffc90002c7d000 16384 vmalloc+0x16/0x18 pages=3 vmalloc N0=3 0xffffc90002c81000-0xffffc90002c85000 16384 vmalloc+0x16/0x18 pages=3 vmalloc N1=3 0xffffc90002c8d000-0xffffc90002c91000 16384 vmalloc+0x16/0x18 pages=3 vmalloc N1=3 0xffffc90002c95000-0xffffc90002c99000 16384 vmalloc+0x16/0x18 pages=3 vmalloc N1=3 We really want to catch the _caller_ of the vmalloc function. Fix this issue by making __vmalloc_node_flags static inline again. Link: http://lkml.kernel.org/r/20170502134657.12381-1-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/vmalloc.h | 19 +++++++++++++++++++ mm/vmalloc.c | 12 +----------- 2 files changed, 20 insertions(+), 11 deletions(-) commit a7c3e901a46ff54c016d040847eda598a9e3e653 Author: Michal Hocko Date: Mon May 8 15:57:09 2017 -0700 mm: introduce kv[mz]alloc helpers Patch series "kvmalloc", v5. There are many open coded kmalloc with vmalloc fallback instances in the tree. Most of them are not careful enough or simply do not care about the underlying semantic of the kmalloc/page allocator which means that a) some vmalloc fallbacks are basically unreachable because the kmalloc part will keep retrying until it succeeds b) the page allocator can invoke a really disruptive steps like the OOM killer to move forward which doesn't sound appropriate when we consider that the vmalloc fallback is available. As it can be seen implementing kvmalloc requires quite an intimate knowledge if the page allocator and the memory reclaim internals which strongly suggests that a helper should be implemented in the memory subsystem proper. Most callers, I could find, have been converted to use the helper instead. This is patch 6. There are some more relying on __GFP_REPEAT in the networking stack which I have converted as well and Eric Dumazet was not opposed [2] to convert them as well. [1] http://lkml.kernel.org/r/20170130094940.13546-1-mhocko@kernel.org [2] http://lkml.kernel.org/r/1485273626.16328.301.camel@edumazet-glaptop3.roam.corp.google.com This patch (of 9): Using kmalloc with the vmalloc fallback for larger allocations is a common pattern in the kernel code. Yet we do not have any common helper for that and so users have invented their own helpers. Some of them are really creative when doing so. Let's just add kv[mz]alloc and make sure it is implemented properly. This implementation makes sure to not make a large memory pressure for > PAGE_SZE requests (__GFP_NORETRY) and also to not warn about allocation failures. This also rules out the OOM killer as the vmalloc is a more approapriate fallback than a disruptive user visible action. This patch also changes some existing users and removes helpers which are specific for them. In some cases this is not possible (e.g. ext4_kvmalloc, libcfs_kvzalloc) because those seems to be broken and require GFP_NO{FS,IO} context which is not vmalloc compatible in general (note that the page table allocation is GFP_KERNEL). Those need to be fixed separately. While we are at it, document that __vmalloc{_node} about unsupported gfp mask because there seems to be a lot of confusion out there. kvmalloc_node will warn about GFP_KERNEL incompatible (which are not superset) flags to catch new abusers. Existing ones would have to die slowly. [sfr@canb.auug.org.au: f2fs fixup] Link: http://lkml.kernel.org/r/20170320163735.332e64b7@canb.auug.org.au Link: http://lkml.kernel.org/r/20170306103032.2540-2-mhocko@kernel.org Signed-off-by: Michal Hocko Signed-off-by: Stephen Rothwell Reviewed-by: Andreas Dilger [ext4 part] Acked-by: Vlastimil Babka Cc: John Hubbard Cc: David Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/kvm/lapic.c | 4 ++-- arch/x86/kvm/page_track.c | 4 ++-- arch/x86/kvm/x86.c | 4 ++-- drivers/md/dm-stats.c | 7 +----- fs/ext4/mballoc.c | 2 +- fs/ext4/super.c | 4 ++-- fs/f2fs/f2fs.h | 20 ----------------- fs/f2fs/file.c | 4 ++-- fs/f2fs/node.c | 6 +++--- fs/f2fs/segment.c | 14 ++++++------ fs/seq_file.c | 16 +------------- include/linux/kvm_host.h | 2 -- include/linux/mm.h | 14 ++++++++++++ include/linux/vmalloc.h | 1 + ipc/util.c | 7 +----- mm/nommu.c | 5 +++++ mm/util.c | 45 +++++++++++++++++++++++++++++++++++++++ mm/vmalloc.c | 9 +++++++- security/apparmor/apparmorfs.c | 2 +- security/apparmor/include/lib.h | 11 ---------- security/apparmor/lib.c | 30 -------------------------- security/apparmor/match.c | 2 +- security/apparmor/policy_unpack.c | 2 +- virt/kvm/kvm_main.c | 18 +++------------- 24 files changed, 103 insertions(+), 130 deletions(-) commit 60f3e00d25b44e3aa51846590d1e10f408466a83 Author: Davidlohr Bueso Date: Mon May 8 15:57:06 2017 -0700 sysv,ipc: cacheline align kern_ipc_perm Assign 'struct kern_ipc_perm' its own cacheline to avoid false sharing with sysv ipc calls. While the structure itself is rather read-mostly throughout the lifespan of ipc, the spinlock causes most of the invalidations. One example is commit 31a7c4746e9 ("ipc/sem.c: cacheline align the ipc spinlock for semaphores"). Therefore, extend this to all ipc. The effect of cacheline alignment on sems can be seen in sembench, which deals mostly with semtimedop wait/wakes is seen to improve raw throughput (worker loops) between 8 to 12% on a 24-core x86 with over 4 threads. Link: http://lkml.kernel.org/r/1486673582-6979-4-git-send-email-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/ipc.h | 7 +++---- include/linux/sem.h | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) commit f0cb88026f51a0d8c952cf5e09e1933ef10b50b4 Author: Davidlohr Bueso Date: Mon May 8 15:57:03 2017 -0700 ipc/shm: some shmat cleanups Clean up early flag and address some minutia. Link: http://lkml.kernel.org/r/1486673582-6979-3-git-send-email-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/shm.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 046aa1265f08d8400bd4b63171238c9daba15ec3 Author: Arnd Bergmann Date: Mon May 8 15:57:00 2017 -0700 initramfs: use vfs_stat/lstat directly sys_newlstat is a system call implementation that is meant for user space, and that copies kernel-internal data structure to the user format, which is not needed for in-kernel users. Further, as we rearrange the system call implementation so we can extend it with 64-bit time_t, the prototype for sys_newlstat changes. This changes the initramfs code to use vfs_lstat directly, to get it out of the way of the time_t changes, and make it slightly more efficient in the process. Along the same lines we also replace sys_stat and sys_stat64 with vfs_stat. Link: http://lkml.kernel.org/r/20170314214932.4052842-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/do_mounts.h | 22 ++++------------------ init/initramfs.c | 12 ++++++------ 2 files changed, 10 insertions(+), 24 deletions(-) commit cff75e0b6fe835800f8e08a32d731119cd9e3b79 Author: Daniel Thompson Date: Mon May 8 15:56:57 2017 -0700 initramfs: provide a way to ignore image provided by bootloader Many "embedded" architectures provide CMDLINE_FORCE to allow the kernel to override the command line provided by an inflexible bootloader. However there is currrently no way for the kernel to override the initramfs image provided by the bootloader meaning there are still ways for bootloaders to make things difficult for us. Fix this by introducing INITRAMFS_FORCE which can prevent the kernel from loading the bootloader supplied image. We use CMDLINE_FORCE (and its friend CMDLINE_EXTEND) to imply that the system has an inflexible bootloader. This allow us to avoid presenting this config option to users of systems where inflexible bootloaders aren't usually a problem. Link: http://lkml.kernel.org/r/20170217121940.30126-1-daniel.thompson@linaro.org Signed-off-by: Daniel Thompson Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/initramfs.c | 2 +- usr/Kconfig | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit da5e108b0288d390dae40f51c09bbb30358bf7a7 Author: Guenter Roeck Date: Mon May 8 15:56:54 2017 -0700 lib/zlib_inflate/inftrees.c: fix potential buffer overflow smatch says: WARNING: please, no spaces at the start of a line #30: FILE: lib/zlib_inflate/inftrees.c:112: + for (min = 1; min < MAXBITS; min++)$ total: 0 errors, 1 warnings, 8 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. ./patches/zlib-inflate-fix-potential-buffer-overflow.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/zlib_inflate/inftrees.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2ad37da805414e9385e7ca2961e1d0431df3799 Author: Dmitry Vyukov Date: Mon May 8 15:56:51 2017 -0700 lib/fault-inject.c: use correct check for interrupts in_interrupt() also returns true when bh is disabled in task context. That's not what fail_task() wants to check. Use the new in_task() predicate that does the right thing. Link: http://lkml.kernel.org/r/20170321091805.140676-1-dvyukov@google.com Signed-off-by: Dmitry Vyukov Reviewed-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/fault-inject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f61e869d519c0c11a8d80a503cfdfb4897df855a Author: Dmitry Vyukov Date: Mon May 8 15:56:48 2017 -0700 kcov: simplify interrupt check in_interrupt() semantics are confusing and wrong for most users as it also returns true when bh is disabled. Thus we open coded a proper check for interrupts in __sanitizer_cov_trace_pc() with a lengthy explanatory comment. Use the new in_task() predicate instead. Link: http://lkml.kernel.org/r/20170321091026.139655-1-dvyukov@google.com Signed-off-by: Dmitry Vyukov Cc: Kefeng Wang Cc: James Morse Cc: Alexander Popov Cc: Andrey Konovalov Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kcov.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 8c733420bdd5a6cc2d8540fb5aa32d1fbf3cb3ff Author: Zhang Xiao Date: Mon May 8 15:56:45 2017 -0700 taskstats: add e/u/stime for TGID command The elapsed time, user CPU time and system CPU time for the thread group status request are presently left at zero. Fill these in. [akpm@linux-foundation.org: run ktime_get_ns() a single time] [akpm@linux-foundation.org: include linux/sched/cputime.h for task_cputime()] Link: http://lkml.kernel.org/r/1488508424-12322-1-git-send-email-xiao.zhang@windriver.com Signed-off-by: Zhang Xiao Cc: Balbir Singh Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/taskstats.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit eaa0d190bfe1ed891b814a52712dcd852554cb08 Author: Kirill Tkhai Date: Mon May 8 15:56:41 2017 -0700 pidns: expose task pid_ns_for_children to userspace pid_ns_for_children set by a task is known only to the task itself, and it's impossible to identify it from outside. It's a big problem for checkpoint/restore software like CRIU, because it can't correctly handle tasks, that do setns(CLONE_NEWPID) in proccess of their work. This patch solves the problem, and it exposes pid_ns_for_children to ns directory in standard way with the name "pid_for_children": ~# ls /proc/5531/ns -l | grep pid lrwxrwxrwx 1 root root 0 Jan 14 16:38 pid -> pid:[4026531836] lrwxrwxrwx 1 root root 0 Jan 14 16:38 pid_for_children -> pid:[4026532286] Link: http://lkml.kernel.org/r/149201123914.6007.2187327078064239572.stgit@localhost.localdomain Signed-off-by: Kirill Tkhai Cc: Andrei Vagin Cc: Andreas Gruenbacher Cc: Kees Cook Cc: Michael Kerrisk Cc: Al Viro Cc: Oleg Nesterov Cc: Paul Moore Cc: Eric Biederman Cc: Andy Lutomirski Cc: Ingo Molnar Cc: Serge Hallyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/namespaces.c | 1 + include/linux/proc_ns.h | 1 + kernel/pid_namespace.c | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) commit 25b14e92af1a563c7331466ca59188f88050bbf0 Author: Kirill Tkhai Date: Mon May 8 15:56:38 2017 -0700 ns: allow ns_entries to have custom symlink content Patch series "Expose task pid_ns_for_children to userspace". pid_ns_for_children set by a task is known only to the task itself, and it's impossible to identify it from outside. It's a big problem for checkpoint/restore software like CRIU, because it can't correctly handle tasks, that do setns(CLONE_NEWPID) in proccess of their work. If they have a custom pid_ns_for_children before dump, they must have the same ns after restore. Otherwise, restored task bumped into enviroment it does not expect. This patchset solves the problem. It exposes pid_ns_for_children to ns directory in standard way with the name "pid_for_children": ~# ls /proc/5531/ns -l | grep pid lrwxrwxrwx 1 root root 0 Jan 14 16:38 pid -> pid:[4026531836] lrwxrwxrwx 1 root root 0 Jan 14 16:38 pid_for_children -> pid:[4026532286] This patch (of 2): Make possible to have link content prefix yyy different from the link name xxx: $ readlink /proc/[pid]/ns/xxx yyy:[4026531838] This will be used in next patch. Link: http://lkml.kernel.org/r/149201120318.6007.7362655181033883000.stgit@localhost.localdomain Signed-off-by: Kirill Tkhai Reviewed-by: Cyrill Gorcunov Acked-by: Andrei Vagin Cc: Andreas Gruenbacher Cc: Kees Cook Cc: Michael Kerrisk Cc: Al Viro Cc: Oleg Nesterov Cc: Paul Moore Cc: Eric Biederman Cc: Andy Lutomirski Cc: Ingo Molnar Cc: Serge Hallyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/nsfs.c | 4 +++- include/linux/proc_ns.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit 8896c23d2ef803f1883fea73117a435925c2b4c4 Author: Kirill Tkhai Date: Mon May 8 15:56:34 2017 -0700 pidns: disable pid allocation if pid_ns_prepare_proc() is failed in alloc_pid() alloc_pidmap() advances pid_namespace::last_pid. When first pid allocation fails, then next created process will have pid 2 and pid_ns_prepare_proc() won't be called. So, pid_namespace::proc_mnt will never be initialized (not to mention that there won't be a child reaper). I saw crash stack of such case on kernel 3.10: BUG: unable to handle kernel NULL pointer dereference at (null) IP: proc_flush_task+0x8f/0x1b0 Call Trace: release_task+0x3f/0x490 wait_consider_task.part.10+0x7ff/0xb00 do_wait+0x11f/0x280 SyS_wait4+0x7d/0x110 We may fix this by restore of last_pid in 0 or by prohibiting of futher allocations. Since there was a similar issue in Oleg Nesterov's commit 314a8ad0f18a ("pidns: fix free_pid() to handle the first fork failure"). and it was fixed via prohibiting allocation, let's follow this way, and do the same. Link: http://lkml.kernel.org/r/149201021004.4863.6762095011554287922.stgit@localhost.localdomain Signed-off-by: Kirill Tkhai Acked-by: Cyrill Gorcunov Cc: Andrei Vagin Cc: Andreas Gruenbacher Cc: Kees Cook Cc: Michael Kerrisk Cc: Al Viro Cc: Oleg Nesterov Cc: Paul Moore Cc: Eric Biederman Cc: Andy Lutomirski Cc: Ingo Molnar Cc: Serge Hallyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/pid.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 92019efc6cf2126edc482342446f1252d091081a Author: Hari Bathini Date: Mon May 8 15:56:31 2017 -0700 powerpc/fadump: update documentation about crashkernel parameter reuse As we are reusing crashkernel parameter instead of fadump_reserve_mem parameter to specify the memory to reserve for fadump's crash kernel, update the documentation accordingly. Link: http://lkml.kernel.org/r/149035347559.6881.14224829694291758581.stgit@hbathini.in.ibm.com Signed-off-by: Hari Bathini Acked-by: Michael Ellerman Cc: Fenghua Yu Cc: Tony Luck Cc: Dave Young Cc: Eric Biederman Cc: Mahesh Salgaonkar Cc: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/powerpc/firmware-assisted-dump.txt | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 11550dc0a00b793236e8dedcf1f489f4627ddf7e Author: Hari Bathini Date: Mon May 8 15:56:28 2017 -0700 powerpc/fadump: reuse crashkernel parameter for fadump memory reservation fadump supports specifying memory to reserve for fadump's crash kernel with fadump_reserve_mem kernel parameter. This parameter currently supports passing a fixed memory size, like fadump_reserve_mem= only. This patch aims to add support for other syntaxes like range-based memory size :[,:,:,...] which allows using the same parameter to boot the kernel with different system RAM sizes. As crashkernel parameter already supports the above mentioned syntaxes, this patch deprecates fadump_reserve_mem parameter and reuses crashkernel parameter instead, to specify memory for fadump's crash kernel memory reservation as well. If any offset is provided in crashkernel parameter, it will be ignored in case of fadump, as fadump reserves memory at end of RAM. Advantages using crashkernel parameter instead of fadump_reserve_mem parameter are one less kernel parameter overall, code reuse and support for multiple syntaxes to specify memory. Suggested-by: Dave Young Link: http://lkml.kernel.org/r/149035346749.6881.911095631212975718.stgit@hbathini.in.ibm.com Signed-off-by: Hari Bathini Reviewed-by: Mahesh Salgaonkar Acked-by: Michael Ellerman Cc: Fenghua Yu Cc: Tony Luck Cc: Dave Young Cc: Eric Biederman Cc: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/kernel/fadump.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit 22bd0177bd08677a8888f4d1d8361b0326f9119b Author: Hari Bathini Date: Mon May 8 15:56:24 2017 -0700 powerpc/fadump: remove dependency with CONFIG_KEXEC Now that crashkernel parameter parsing and vmcoreinfo related code is moved under CONFIG_CRASH_CORE instead of CONFIG_KEXEC_CORE, remove dependency with CONFIG_KEXEC for CONFIG_FA_DUMP. While here, get rid of definitions of fadump_append_elf_note() & fadump_final_note() functions to reuse similar functions compiled under CONFIG_CRASH_CORE. Link: http://lkml.kernel.org/r/149035343956.6881.1536459326017709354.stgit@hbathini.in.ibm.com Signed-off-by: Hari Bathini Reviewed-by: Mahesh Salgaonkar Acked-by: Michael Ellerman Cc: Fenghua Yu Cc: Tony Luck Cc: Dave Young Cc: Eric Biederman Cc: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/Kconfig | 10 ++++++---- arch/powerpc/include/asm/fadump.h | 2 ++ arch/powerpc/kernel/crash.c | 2 -- arch/powerpc/kernel/fadump.c | 34 +++------------------------------- arch/powerpc/kernel/setup-common.c | 5 +++++ 5 files changed, 16 insertions(+), 37 deletions(-) commit 51dbd92520d4344fef78481b1bcbc3a7de32b69b Author: Hari Bathini Date: Mon May 8 15:56:21 2017 -0700 ia64: reuse append_elf_note() and final_note() functions Get rid of multiple definitions of append_elf_note() & final_note() functions. Reuse these functions compiled under CONFIG_CRASH_CORE Also, define Elf_Word and use it instead of generic u32 or the more specific Elf64_Word. Link: http://lkml.kernel.org/r/149035342324.6881.11667840929850361402.stgit@hbathini.in.ibm.com Signed-off-by: Hari Bathini Acked-by: Dave Young Acked-by: Tony Luck Cc: Fenghua Yu Cc: Eric Biederman Cc: Mahesh Salgaonkar Cc: Vivek Goyal Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/ia64/kernel/crash.c | 22 ---------------------- include/linux/crash_core.h | 4 ++++ include/linux/elf.h | 2 ++ kernel/crash_core.c | 34 ++++++++++++++-------------------- kernel/kexec_core.c | 28 ---------------------------- 5 files changed, 20 insertions(+), 70 deletions(-) commit 692f66f26a4c19d73249736aa973c13a1521b387 Author: Hari Bathini Date: Mon May 8 15:56:18 2017 -0700 crash: move crashkernel parsing and vmcore related code under CONFIG_CRASH_CORE Patch series "kexec/fadump: remove dependency with CONFIG_KEXEC and reuse crashkernel parameter for fadump", v4. Traditionally, kdump is used to save vmcore in case of a crash. Some architectures like powerpc can save vmcore using architecture specific support instead of kexec/kdump mechanism. Such architecture specific support also needs to reserve memory, to be used by dump capture kernel. crashkernel parameter can be a reused, for memory reservation, by such architecture specific infrastructure. This patchset removes dependency with CONFIG_KEXEC for crashkernel parameter and vmcoreinfo related code as it can be reused without kexec support. Also, crashkernel parameter is reused instead of fadump_reserve_mem to reserve memory for fadump. The first patch moves crashkernel parameter parsing and vmcoreinfo related code under CONFIG_CRASH_CORE instead of CONFIG_KEXEC_CORE. The second patch reuses the definitions of append_elf_note() & final_note() functions under CONFIG_CRASH_CORE in IA64 arch code. The third patch removes dependency on CONFIG_KEXEC for firmware-assisted dump (fadump) in powerpc. The next patch reuses crashkernel parameter for reserving memory for fadump, instead of the fadump_reserve_mem parameter. This has the advantage of using all syntaxes crashkernel parameter supports, for fadump as well. The last patch updates fadump kernel documentation about use of crashkernel parameter. This patch (of 5): Traditionally, kdump is used to save vmcore in case of a crash. Some architectures like powerpc can save vmcore using architecture specific support instead of kexec/kdump mechanism. Such architecture specific support also needs to reserve memory, to be used by dump capture kernel. crashkernel parameter can be a reused, for memory reservation, by such architecture specific infrastructure. But currently, code related to vmcoreinfo and parsing of crashkernel parameter is built under CONFIG_KEXEC_CORE. This patch introduces CONFIG_CRASH_CORE and moves the above mentioned code under this config, allowing code reuse without dependency on CONFIG_KEXEC. There is no functional change with this patch. Link: http://lkml.kernel.org/r/149035338104.6881.4550894432615189948.stgit@hbathini.in.ibm.com Signed-off-by: Hari Bathini Acked-by: Dave Young Cc: Fenghua Yu Cc: Tony Luck Cc: Eric Biederman Cc: Mahesh Salgaonkar Cc: Vivek Goyal Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/Kconfig | 4 + include/linux/crash_core.h | 65 +++++++ include/linux/kexec.h | 57 +----- include/linux/printk.h | 4 +- kernel/Makefile | 1 + kernel/crash_core.c | 445 +++++++++++++++++++++++++++++++++++++++++++++ kernel/kexec_core.c | 403 ---------------------------------------- kernel/ksysfs.c | 8 +- kernel/printk/printk.c | 6 +- 9 files changed, 531 insertions(+), 462 deletions(-) commit c311c797998c1e70eade463dd60b843da4f1a203 Author: Alexey Dobriyan Date: Mon May 8 15:56:15 2017 -0700 cpumask: make "nr_cpumask_bits" unsigned Bit searching functions accept "unsigned long" indices but "nr_cpumask_bits" is "int" which is signed, so inevitable sign extensions occur on x86_64. Those MOVSX are #1 MOVSX bloat by number of uses across whole kernel. Change "nr_cpumask_bits" to unsigned, this number can't be negative after all. It allows to do implicit zero-extension on x86_64 without MOVSX. Change signed comparisons into unsigned comparisons where necessary. Other uses looks fine because it is either argument passed to a function or comparison is already unsigned. Net win on allyesconfig type of kernel: ~2.8 KB (!) add/remove: 0/0 grow/shrink: 8/725 up/down: 93/-2926 (-2833) function old new delta xen_exit_mmap 691 735 +44 qstat_read 426 440 +14 __cpufreq_cooling_register 1678 1687 +9 trace_rb_cpu_prepare 447 455 +8 vermagic 54 60 +6 nfp_driver_version 54 60 +6 rcu_torture_stats_print 1147 1151 +4 find_next_push_cpu 267 269 +2 xen_irq_resume 961 960 -1 ... init_vp_index 946 906 -40 od_set_powersave_bias 328 281 -47 power_cpu_exit 193 139 -54 arch_show_interrupts 3538 3484 -54 select_idle_sibling 1558 1471 -87 Total: Before=158358910, After=158356077, chg -0.00% Same arguments apply to "nr_cpu_ids" but I haven't yet found enough courage to delve into this issue (and proper fix may require new type "cpu_t" which is whole separate story). Link: http://lkml.kernel.org/r/20170309205322.GA1728@avx2 Signed-off-by: Alexey Dobriyan Cc: Rusty Russell Cc: Heiko Carstens Cc: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/kernel/perf_event_mipsxx.c | 2 +- arch/s390/kernel/perf_cpum_sf.c | 2 +- include/linux/cpumask.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 19659c59af52df22d1b85208a2c37b2d46290541 Author: Hoeun Ryu Date: Mon May 8 15:56:11 2017 -0700 fork: free vmapped stacks in cache when cpus are offline Using virtually mapped stack, kernel stacks are allocated via vmalloc. In the current implementation, two stacks per cpu can be cached when tasks are freed and the cached stacks are used again in task duplications. But the cached stacks may remain unfreed even when cpu are offline. By adding a cpu hotplug callback to free the cached stacks when a cpu goes offline, the pages of the cached stacks are not wasted. Link: http://lkml.kernel.org/r/1487076043-17802-1-git-send-email-hoeun.ryu@gmail.com Signed-off-by: Hoeun Ryu Reviewed-by: Thomas Gleixner Acked-by: Michal Hocko Cc: Ingo Molnar Cc: Andy Lutomirski Cc: Kees Cook Cc: "Eric W. Biederman" Cc: Oleg Nesterov Cc: Mateusz Guzik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/fork.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 7fe6a42e87ef20edd7faf1b2f4bf18d95922d1e4 Author: Kees Cook Date: Mon May 8 15:56:08 2017 -0700 reiserfs: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Link: http://lkml.kernel.org/r/20170329210419.GA40066@beast Signed-off-by: Kees Cook Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/reiserfs/item_ops.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit f6950a735f29e782bc219ece22bb91d6e1ab7bbc Author: Joe Perches Date: Mon May 8 15:56:05 2017 -0700 checkpatch: improve the SUSPECT_CODE_INDENT test The current SUSPECT_CODE_INDENT test does not recognize several defective code style defects where code following a logical test is inappropriately indented. Before this patch, for code like: if (foo) bar(); checkpatch would not emit a warning. Improve the test to warn when code after a logical test has the same indentation as the logical test. Perform the same indentation test for "else" blocks too. Link: http://lkml.kernel.org/r/df2374b68c4a68af2b7ef08afe486584811f610a.1493683942.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 74fd4f347bfc10c1b19a18d0760f220eed1b2023 Author: Joe Perches Date: Mon May 8 15:56:02 2017 -0700 checkpatch: improve the embedded function name test for patch contexts The current test works only for a single patch context as it is done in the foreach ($rawlines) loop that precedes the loop where the actual $context_function variable is used. Move the set of $context_function into the foreach (@lines) loop where it is useful for each patch context. Link: http://lkml.kernel.org/r/6c675a31c74fbfad4fc45b9f462303d60ca2a283.1493486091.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 75ad8c575a5ad105e2afc2051c68abceb9c65431 Author: Jerome Forissier Date: Mon May 8 15:56:00 2017 -0700 checkpatch: add --typedefsfile When using checkpatch on out-of-tree code, it may occur that some project-specific types are used, which will cause spurious warnings. Add the --typedefsfile option as a way to extend the known types and deal with this issue. This was developed for OP-TEE [1]. We run a Travis job on all pull requests [2], and checkpatch is part of that. The typical false warning we get on a regular basis is with some pointers to functions returning TEE_Result [3], which is a typedef from the GlobalPlatform APIs. We consider it is acceptable to use GP types in the OP-TEE core implementation, that's why this patch would be helpful for us. [1] https://github.com/OP-TEE/optee_os [2] https://travis-ci.org/OP-TEE/optee_os/builds [3] https://travis-ci.org/OP-TEE/optee_os/builds/193355335#L1733 Link: http://lkml.kernel.org/r/ba1124d6dfa599bb0dd1d8919dd45dd09ce541a4.1492702192.git.jerome.forissier@linaro.org Signed-off-by: Jerome Forissier Cc: Joe Perches Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 52 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 17 deletions(-) commit 1b4a2ed4c8773524cc7890c4cd57d58b39c049eb Author: Joe Perches Date: Mon May 8 15:55:57 2017 -0700 checkpatch: improve k.alloc with multiplication and sizeof test Find multi-line uses of k.alloc by using the $stat variable and not the $line variable. This can still --fix only the single line variant though. Link: http://lkml.kernel.org/r/3f4b23d37cd4c7d8628eefc25afe83ba8fb3ab55.1493167076.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit e882dbfc248cf28d6afd6fc6d8db8be58a824158 Author: Wei Wang Date: Mon May 8 15:55:54 2017 -0700 checkpatch: special audit for revert commit line Currently checkpatch.pl does not recognize git's default commit revert message and will complain about the hash format. Add special audit for revert commit message line to fix it. Link: http://lkml.kernel.org/r/20170411191532.74381-1-wvw@google.com Signed-off-by: Wei Wang Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) commit e4b7d3091def85336d838e38dea91be37bd4d1f5 Author: Joe Perches Date: Mon May 8 15:55:51 2017 -0700 checkpatch: clarify the EMBEDDED_FUNCTION_NAME message Try to make the conversion of embedded function names to "%s: ", __func__ a bit clearer. Add a bit more information to the comment describing the test too. Link: http://lkml.kernel.org/r/38f5d32f0aec1cd98cb9ceeedd6a736cc9a802db.1491759835.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit e795556a581a849bf33b22521bf8ebc97ab899ea Author: Joe Perches Date: Mon May 8 15:55:48 2017 -0700 checkpatch: improve MULTISTATEMENT_MACRO_USE_DO_WHILE test The logic currrently misses macros that start with an if statement. e.g.: #define foo(bar) if (bar) baz; Add a test for macro content that starts with if Link: http://lkml.kernel.org/r/a9d41aafe1673889caf1a9850208fb7fd74107a0.1491783914.git.joe@perches.com Signed-off-by: Joe Perches Reported-by: Andreas Mohr Original-patch-by: Alfonso Lima Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d9190e4e1a057ad55027cbefd1d21f6eae93fe0e Author: Joe Perches Date: Mon May 8 15:55:45 2017 -0700 checkpatch: avoid suggesting struct definitions should be const Many structs are generally used const and there is a known list of these structs. struct definitions should not be generally be declared const. Add a test for the lack of an open brace immediately after the struct to avoid definitions. This avoids the false positive "struct foo should normally be const" message only when the open brace is on the same line as the definition. Link: http://lkml.kernel.org/r/0dce709150d712e66f1b90b03827634b53b28085.1491845946.git.joe@perches.com Signed-off-by: Joe Perches Cc: Arthur Brainville Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit eb3a58de3ec4940fc6b2a9f810895d772a2a9794 Author: Joe Perches Date: Mon May 8 15:55:42 2017 -0700 checkpatch: allow space leading blank lines in email headers Allow a leading space and otherwise blank link in the email headers as it can be a line wrapped Spamassassin multiple line string or any other valid rfc 2822/5322 email header. The line with space causes checkpatch to erroneously think that it's in the content body, as opposed to headers and thus flag a mail header as an unwrapped long comment line. Link: http://lkml.kernel.org/r/d75a9f0b78b3488078429f4037d9fff3bdfa3b78.1490247180.git.joe@perches.com Signed-off-by: Joe Perches Reported-by: Darren Hart (VMware) Tested-by: Darren Hart (VMware) Reviewed-by: Darren Hart (VMware) Original-patch-by: John 'Warthog9' Hawley (VMware) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4dbed76f2429516b9519620dacdda6c750640e8d Author: Joe Perches Date: Mon May 8 15:55:39 2017 -0700 checkpatch: improve EMBEDDED_FUNCTION_NAME test The existing behavior relies on patch context to identify function declarations. Add the ability to find function declarations when there is an open brace in column 1. This finds function declarations only in specific single line forms where the function name is on a single line like: int foo(args...) { and int foo(args...) { It does not recognize function declarations like: int foo(int bar, int baz) { Link: http://lkml.kernel.org/r/738d74bbbe1a06b80f11ed504818107c68903095.1488155636.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 0b523769ebb9473c60df1b0f70615aa82ebac2c9 Author: Joe Perches Date: Mon May 8 15:55:36 2017 -0700 checkpatch: add ability to find bad uses of vsprintf %p extensions %pK was at least once misused at %pk in an out-of-tree module. This lead to some security concerns. Add the ability to track single and multiple line statements for misuses of %p. [akpm@linux-foundation.org: add helpful comment into lib/vsprintf.c] [akpm@linux-foundation.org: text tweak] Link: http://lkml.kernel.org/r/163a690510e636a23187c0dc9caa09ddac6d4cde.1488228427.git.joe@perches.com Signed-off-by: Joe Perches Acked-by: Kees Cook Acked-by: William Roberts Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/vsprintf.c | 3 +++ scripts/checkpatch.pl | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit cd8618ab3df3ac6018cecb9dc626ff72c39eb503 Author: Ruslan Bilovol Date: Mon May 8 15:55:33 2017 -0700 checkpatch: remove obsolete CONFIG_EXPERIMENTAL checks Config EXPERIMENTAL has been removed from kernel in 2013 (see commit 3d374d09f16f: "final removal of CONFIG_EXPERIMENTAL"), there is no any reason to do these checks now. Link: http://lkml.kernel.org/r/1488234097-20119-1-git-send-email-ruslan.bilovol@gmail.com Signed-off-by: Ruslan Bilovol Acked-by: Kees Cook Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 13 ------------- 1 file changed, 13 deletions(-) commit 0cd5246bf8e61bb1f61a4bd1203573f8a9adf085 Author: Luis R. Rodriguez Date: Mon May 8 15:55:30 2017 -0700 firmware/Makefile: force recompilation if makefile changes If you modify the target asm we currently do not force the recompilation of the firmware files. The target asm is in the firmware/Makefile, peg this file as a dependency to require re-compilation of firmware targets when the asm changes. Link: http://lkml.kernel.org/r/20170123150727.4883-1-mcgrof@kernel.org Signed-off-by: Luis R. Rodriguez Cc: Masahiro Yamada Cc: Michal Marek Cc: Ming Lei Cc: Greg Kroah-Hartman Cc: Tom Gundersen Cc: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds firmware/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e327fd7c86678ba22d2b7cd25f6ceef1ffe29c8a Author: Geert Uytterhoeven Date: Mon May 8 15:55:26 2017 -0700 lib: add module support to linked list sorting tests Extract the linked list sorting test code into its own source file, to allow to compile it either to a loadable module, or builtin into the kernel. Link: http://lkml.kernel.org/r/1488287219-15832-4-git-send-email-geert@linux-m68k.org Signed-off-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Cc: Arnd Bergmann Cc: Paul Gortmaker Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig.debug | 7 +-- lib/Makefile | 1 + lib/list_sort.c | 149 -------------------------------------------------- lib/test_list_sort.c | 150 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 155 insertions(+), 152 deletions(-) commit 5c4e679898eabca844059743c05253cf33b90e94 Author: Geert Uytterhoeven Date: Mon May 8 15:55:23 2017 -0700 lib: add module support to array-based sort tests Allow to compile the array-based sort test code either to a loadable module, or builtin into the kernel. Link: http://lkml.kernel.org/r/1488287219-15832-3-git-send-email-geert@linux-m68k.org Signed-off-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Cc: Arnd Bergmann Cc: Paul Gortmaker Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig.debug | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ebd03a9aacc7d47a9d5dc7ed63adf594f9a0391c Author: Geert Uytterhoeven Date: Mon May 8 15:55:20 2017 -0700 Revert "lib/test_sort.c: make it explicitly non-modular" Patch series "lib: add module support to sort tests". This patch series allows to compile the array-based and linked list sort test code either to loadable modules, or builtin into the kernel. It's very valuable to have modular tests, so you can run them just by insmodding the test modules, instead of needing a separate kernel that runs them at boot. This patch (of 3): This reverts commit 8893f519330bb073a49c5b4676fce4be6f1be15d. It's very valuable to have modular tests, so you can run them just by insmodding the test modules, instead of needing a separate kernel that runs them at boot. Link: http://lkml.kernel.org/r/1488287219-15832-2-git-send-email-geert@linux-m68k.org Signed-off-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Cc: Arnd Bergmann Cc: Paul Gortmaker Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_sort.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 8128a31eaadbcdfa37774bbd28f3f00bac69996a Author: Dan Carpenter Date: Mon May 8 15:55:17 2017 -0700 drivers/misc/c2port/c2port-duramar2150.c: checking for NULL instead of IS_ERR() c2port_device_register() never returns NULL, it uses error pointers. Link: http://lkml.kernel.org/r/20170412083321.GC3250@mwanda Fixes: 65131cd52b9e ("c2port: add c2port support for Eurotech Duramar 2150") Signed-off-by: Dan Carpenter Acked-by: Rodolfo Giometti Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/misc/c2port/c2port-duramar2150.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 146180c052a00172f4dc08eaade836fd02f61fb5 Author: Dan Carpenter Date: Mon May 8 15:55:14 2017 -0700 drivers/misc/vmw_vmci/vmci_queue_pair.c: fix a couple integer overflow tests The "DIV_ROUND_UP(size, PAGE_SIZE)" operation can overflow if "size" is more than ULLONG_MAX - PAGE_SIZE. Link: http://lkml.kernel.org/r/20170322111950.GA11279@mwanda Signed-off-by: Dan Carpenter Cc: Jorgen Hansen Cc: Masahiro Yamada Cc: Michal Hocko Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/misc/vmw_vmci/vmci_queue_pair.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 780cbcf28781511d2cb235c375127265209796a8 Author: Tetsuo Handa Date: Mon May 8 15:55:11 2017 -0700 kernel/hung_task.c: defer showing held locks When I was running my testcase which may block hundreds of threads on fs locks, I got lockup due to output from debug_show_all_locks() added by commit b2d4c2edb2e4 ("locking/hung_task: Show all locks"). For example, if 1000 threads were blocked in TASK_UNINTERRUPTIBLE state and 500 out of 1000 threads hold some lock, debug_show_all_locks() from for_each_process_thread() loop will report locks held by 500 threads for 1000 times. This is a too much noise. In order to make sure rcu_lock_break() is called frequently, we should avoid calling debug_show_all_locks() from for_each_process_thread() loop because debug_show_all_locks() effectively calls for_each_process_thread() loop. Let's defer calling debug_show_all_locks() till before panic() or leaving for_each_process_thread() loop. Link: http://lkml.kernel.org/r/1489296834-60436-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Reviewed-by: Vegard Nossum Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/hung_task.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 31b8cc80776c1b5a17abda6e0bbb5c615b9d90e4 Author: Randy Dunlap Date: Mon May 8 15:55:08 2017 -0700 make help: add tools help target Add a top-level Makefile help target for Userspace tools. Also make each help "heading" end with a colon ':'. Link: http://lkml.kernel.org/r/55c986ff-3966-3e47-2984-7349da2cce51@infradead.org Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 7c30f352c852bae2715ad65ac4a38ca9af7d7696 Author: Matthias Kaehlcke Date: Mon May 8 15:55:05 2017 -0700 jiffies.h: declare jiffies and jiffies_64 with ____cacheline_aligned_in_smp jiffies_64 is defined in kernel/time/timer.c with ____cacheline_aligned_in_smp, however this macro is not part of the declaration of jiffies and jiffies_64 in jiffies.h. As a result clang generates the following warning: kernel/time/timer.c:57:26: error: section does not match previous declaration [-Werror,-Wsection] __visible u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES; ^ include/linux/cache.h:39:36: note: expanded from macro '__cacheline_aligned_in_smp' ^ include/linux/cache.h:34:4: note: expanded from macro '__cacheline_aligned' __section__(".data..cacheline_aligned"))) ^ include/linux/jiffies.h:77:12: note: previous attribute is here extern u64 __jiffy_data jiffies_64; ^ include/linux/jiffies.h:70:38: note: expanded from macro '__jiffy_data' Link: http://lkml.kernel.org/r/20170403190200.70273-1-mka@chromium.org Signed-off-by: Matthias Kaehlcke Cc: "Jason A . Donenfeld" Cc: Grant Grundler Cc: Michael Davidson Cc: Greg Hackmann Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/jiffies.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 3d88936f35bc67f7bee2efd4eec69baf26c17a5a Author: Lorenzo Stoakes Date: Mon May 8 15:55:02 2017 -0700 drivers/virt/fsl_hypervisor.c: use get_user_pages_unlocked() Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. Link: http://lkml.kernel.org/r/20161101194332.23961-1-lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Cc: Michal Hocko Cc: Paolo Bonzini Cc: Kumar Gala Cc: Mihai Caraman Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/virt/fsl_hypervisor.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 63259457a2eea54cc3b3a284b4bc7da52398a19a Author: Gao Feng Date: Mon May 8 15:54:58 2017 -0700 proc/sysctl: fix the int overflow for jiffies conversion do_proc_dointvec_jiffies_conv() uses LONG_MAX/HZ as the max value to avoid overflow. But actually the *valp is int type, so it still causes overflow. For example, echo 2147483647 > ./sys/net/ipv4/tcp_keepalive_time Then, cat ./sys/net/ipv4/tcp_keepalive_time The output is "-1", it is not expected. Now use INT_MAX/HZ as the max value instead LONG_MAX/HZ to fix it. Link: http://lkml.kernel.org/r/1490109532-9228-1-git-send-email-fgao@ikuai8.com Signed-off-by: Gao Feng Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Alexey Dobriyan Cc: Eric Dumazet Cc: Josh Poimboeuf Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f245e1c17a702964ad552878d01a10e53cf0e8e5 Author: Tobin C. Harding Date: Mon May 8 15:54:55 2017 -0700 fs/proc/inode.c: remove cast from memory allocation Coccinelle emits this warning: WARNING: casting value returned by memory allocation function to (struct proc_inode *) is useless. Remove unnecessary cast. Link: http://lkml.kernel.org/r/1487745720-16967-1-git-send-email-me@tobin.cc Signed-off-by: Tobin C. Harding Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit baf6a9a1db5a40ebfa5d3e761428d3deb2cc3a3b Author: Vlastimil Babka Date: Mon May 8 15:54:52 2017 -0700 mm, compaction: finish whole pageblock to reduce fragmentation The main goal of direct compaction is to form a high-order page for allocation, but it should also help against long-term fragmentation when possible. Most lower-than-pageblock-order compactions are for non-movable allocations, which means that if we compact in a movable pageblock and terminate as soon as we create the high-order page, it's unlikely that the fallback heuristics will claim the whole block. Instead there might be a single unmovable page in a pageblock full of movable pages, and the next unmovable allocation might pick another pageblock and increase long-term fragmentation. To help against such scenarios, this patch changes the termination criteria for compaction so that the current pageblock is finished even though the high-order page already exists. Note that it might be possible that the high-order page formed elsewhere in the zone due to parallel activity, but this patch doesn't try to detect that. This is only done with sync compaction, because async compaction is limited to pageblock of the same migratetype, where it cannot result in a migratetype fallback. (Async compaction also eagerly skips order-aligned blocks where isolation fails, which is against the goal of migrating away as much of the pageblock as possible.) As a result of this patch, long-term memory fragmentation should be reduced. In testing based on 4.9 kernel with stress-highalloc from mmtests configured for order-4 GFP_KERNEL allocations, this patch has reduced the number of unmovable allocations falling back to movable pageblocks by 20%. The number Link: http://lkml.kernel.org/r/20170307131545.28577-9-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Acked-by: Johannes Weiner Cc: Joonsoo Kim Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 36 ++++++++++++++++++++++++++++++++++-- mm/internal.h | 1 + 2 files changed, 35 insertions(+), 2 deletions(-) commit 282722b0d258ec23fc79d80165418fee83f01736 Author: Vlastimil Babka Date: Mon May 8 15:54:49 2017 -0700 mm, compaction: restrict async compaction to pageblocks of same migratetype The migrate scanner in async compaction is currently limited to MIGRATE_MOVABLE pageblocks. This is a heuristic intended to reduce latency, based on the assumption that non-MOVABLE pageblocks are unlikely to contain movable pages. However, with the exception of THP's, most high-order allocations are not movable. Should the async compaction succeed, this increases the chance that the non-MOVABLE allocations will fallback to a MOVABLE pageblock, making the long-term fragmentation worse. This patch attempts to help the situation by changing async direct compaction so that the migrate scanner only scans the pageblocks of the requested migratetype. If it's a non-MOVABLE type and there are such pageblocks that do contain movable pages, chances are that the allocation can succeed within one of such pageblocks, removing the need for a fallback. If that fails, the subsequent sync attempt will ignore this restriction. In testing based on 4.9 kernel with stress-highalloc from mmtests configured for order-4 GFP_KERNEL allocations, this patch has reduced the number of unmovable allocations falling back to movable pageblocks by 30%. The number of movable allocations falling back is reduced by 12%. Link: http://lkml.kernel.org/r/20170307131545.28577-8-vbabka@suse.cz Signed-off-by: Vlastimil Babka Cc: Mel Gorman Cc: Johannes Weiner Cc: Joonsoo Kim Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 11 +++++++++-- mm/page_alloc.c | 20 +++++++++++++------- 2 files changed, 22 insertions(+), 9 deletions(-) commit d39773a0622c267fef3f79e3b1f0e7bdbad8a1a8 Author: Vlastimil Babka Date: Mon May 8 15:54:46 2017 -0700 mm, compaction: add migratetype to compact_control Preparation patch. We are going to need migratetype at lower layers than compact_zone() and compact_finished(). Link: http://lkml.kernel.org/r/20170307131545.28577-7-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Acked-by: Johannes Weiner Cc: Joonsoo Kim Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 15 +++++++-------- mm/internal.h | 1 + 2 files changed, 8 insertions(+), 8 deletions(-) commit b682debd97153706ffbe2fe3f8ec30a7ee11f9e1 Author: Vlastimil Babka Date: Mon May 8 15:54:43 2017 -0700 mm, compaction: change migrate_async_suitable() to suitable_migration_source() Preparation for making the decisions more complex and depending on compact_control flags. No functional change. Link: http://lkml.kernel.org/r/20170307131545.28577-6-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Acked-by: Johannes Weiner Cc: Joonsoo Kim Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 5 +++++ mm/compaction.c | 19 +++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) commit 02aa0cdd72483c6dd436ed24d1000f86e0038d28 Author: Vlastimil Babka Date: Mon May 8 15:54:40 2017 -0700 mm, page_alloc: count movable pages when stealing from pageblock When stealing pages from pageblock of a different migratetype, we count how many free pages were stolen, and change the pageblock's migratetype if more than half of the pageblock was free. This might be too conservative, as there might be other pages that are not free, but were allocated with the same migratetype as our allocation requested. While we cannot determine the migratetype of allocated pages precisely (at least without the page_owner functionality enabled), we can count pages that compaction would try to isolate for migration - those are either on LRU or __PageMovable(). The rest can be assumed to be MIGRATE_RECLAIMABLE or MIGRATE_UNMOVABLE, which we cannot easily distinguish. This counting can be done as part of free page stealing with little additional overhead. The page stealing code is changed so that it considers free pages plus pages of the "good" migratetype for the decision whether to change pageblock's migratetype. The result should be more accurate migratetype of pageblocks wrt the actual pages in the pageblocks, when stealing from semi-occupied pageblocks. This should help the efficiency of page grouping by mobility. In testing based on 4.9 kernel with stress-highalloc from mmtests configured for order-4 GFP_KERNEL allocations, this patch has reduced the number of unmovable allocations falling back to movable pageblocks by 47%. The number of movable allocations falling back to other pageblocks are increased by 55%, but these events don't cause permanent fragmentation, so the tradeoff should be positive. Later patches also offset the movable fallback increase to some extent. [akpm@linux-foundation.org: merge fix] Link: http://lkml.kernel.org/r/20170307131545.28577-5-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Cc: Johannes Weiner Cc: Joonsoo Kim Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-isolation.h | 5 +-- mm/page_alloc.c | 74 +++++++++++++++++++++++++++++++++--------- mm/page_isolation.c | 5 +-- 3 files changed, 63 insertions(+), 21 deletions(-) commit 3bc48f96cf11ce8699e419d5e47ae0d456403274 Author: Vlastimil Babka Date: Mon May 8 15:54:37 2017 -0700 mm, page_alloc: split smallest stolen page in fallback The __rmqueue_fallback() function is called when there's no free page of requested migratetype, and we need to steal from a different one. There are various heuristics to make this event infrequent and reduce permanent fragmentation. The main one is to try stealing from a pageblock that has the most free pages, and possibly steal them all at once and convert the whole pageblock. Precise searching for such pageblock would be expensive, so instead the heuristics walks the free lists from MAX_ORDER down to requested order and assumes that the block with highest-order free page is likely to also have the most free pages in total. Chances are that together with the highest-order page, we steal also pages of lower orders from the same block. But then we still split the highest order page. This is wasteful and can contribute to fragmentation instead of avoiding it. This patch thus changes __rmqueue_fallback() to just steal the page(s) and put them on the freelist of the requested migratetype, and only report whether it was successful. Then we pick (and eventually split) the smallest page with __rmqueue_smallest(). This all happens under zone lock, so nobody can steal it from us in the process. This should reduce fragmentation due to fallbacks. At worst we are only stealing a single highest-order page and waste some cycles by moving it between lists and then removing it, but fallback is not exactly hot path so that should not be a concern. As a side benefit the patch removes some duplicate code by reusing __rmqueue_smallest(). [vbabka@suse.cz: fix endless loop in the modified __rmqueue()] Link: http://lkml.kernel.org/r/59d71b35-d556-4fc9-ee2e-1574259282fd@suse.cz Link: http://lkml.kernel.org/r/20170307131545.28577-4-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Acked-by: Johannes Weiner Cc: Joonsoo Kim Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 62 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 25 deletions(-) commit 228d7e33903040a0b9dd9a5ee9b3a49c538c0613 Author: Vlastimil Babka Date: Mon May 8 15:54:33 2017 -0700 mm, compaction: remove redundant watermark check in compact_finished() When detecting whether compaction has succeeded in forming a high-order page, __compact_finished() employs a watermark check, followed by an own search for a suitable page in the freelists. This is not ideal for two reasons: - The watermark check also searches high-order freelists, but has a less strict criteria wrt fallback. It's therefore redundant and waste of cycles. This was different in the past when high-order watermark check attempted to apply reserves to high-order pages. - The watermark check might actually fail due to lack of order-0 pages. Compaction can't help with that, so there's no point in continuing because of that. It's possible that high-order page still exists and it terminates. This patch therefore removes the watermark check. This should save some cycles and terminate compaction sooner in some cases. Link: http://lkml.kernel.org/r/20170307131545.28577-3-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Acked-by: Johannes Weiner Cc: Joonsoo Kim Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 8 -------- 1 file changed, 8 deletions(-) commit f25ba6dccc3bfe7e1524f4498a171be038507c45 Author: Vlastimil Babka Date: Mon May 8 15:54:30 2017 -0700 mm, compaction: reorder fields in struct compact_control Patch series "try to reduce fragmenting fallbacks", v3. Last year, Johannes Weiner has reported a regression in page mobility grouping [1] and while the exact cause was not found, I've come up with some ways to improve it by reducing the number of allocations falling back to different migratetype and causing permanent fragmentation. The series was tested with mmtests stress-highalloc modified to do GFP_KERNEL order-4 allocations, on 4.9 with "mm, vmscan: fix zone balance check in prepare_kswapd_sleep" (without that, kcompactd indeed wasn't woken up) on UMA machine with 4GB memory. There were 5 repeats of each run, as the extfrag stats are quite volatile (note the stats below are sums, not averages, as it was less perl hacking for me). Success rate are the same, already high due to the low allocation order used, so I'm not including them. Compaction stats: (the patches are stacked, and I haven't measured the non-functional-changes patches separately) patch 1 patch 2 patch 3 patch 4 patch 7 patch 8 Compaction stalls 22449 24680 24846 19765 22059 17480 Compaction success 12971 14836 14608 10475 11632 8757 Compaction failures 9477 9843 10238 9290 10426 8722 Page migrate success 3109022 3370438 3312164 1695105 1608435 2111379 Page migrate failure 911588 1149065 1028264 1112675 1077251 1026367 Compaction pages isolated 7242983 8015530 7782467 4629063 4402787 5377665 Compaction migrate scanned 980838938 987367943 957690188 917647238 947155598 1018922197 Compaction free scanned 557926893 598946443 602236894 594024490 541169699 763651731 Compaction cost 10243 10578 10304 8286 8398 9440 Compaction stats are mostly within noise until patch 4, which decreases the number of compactions, and migrations. Part of that could be due to more pageblocks marked as unmovable, and async compaction skipping those. This changes a bit with patch 7, but not so much. Patch 8 increases free scanner stats and migrations, which comes from the changed termination criteria. Interestingly number of compactions decreases - probably the fully compacted pageblock satisfies multiple subsequent allocations, so it amortizes. Next comes the extfrag tracepoint, where "fragmenting" means that an allocation had to fallback to a pageblock of another migratetype which wasn't fully free (which is almost all of the fallbacks). I have locally added another tracepoint for "Page steal" into steal_suitable_fallback() which triggers in situations where we are allowed to do move_freepages_block(). If we decide to also do set_pageblock_migratetype(), it's "Pages steal with pageblock" with break down for which allocation migratetype we are stealing and from which fallback migratetype. The last part "due to counting" comes from patch 4 and counts the events where the counting of movable pages allowed us to change pageblock's migratetype, while the number of free pages alone wouldn't be enough to cross the threshold. patch 1 patch 2 patch 3 patch 4 patch 7 patch 8 Page alloc extfrag event 10155066 8522968 10164959 15622080 13727068 13140319 Extfrag fragmenting 10149231 8517025 10159040 15616925 13721391 13134792 Extfrag fragmenting for unmovable 159504 168500 184177 97835 70625 56948 Extfrag fragmenting unmovable placed with movable 153613 163549 172693 91740 64099 50917 Extfrag fragmenting unmovable placed with reclaim. 5891 4951 11484 6095 6526 6031 Extfrag fragmenting for reclaimable 4738 4829 6345 4822 5640 5378 Extfrag fragmenting reclaimable placed with movable 1836 1902 1851 1579 1739 1760 Extfrag fragmenting reclaimable placed with unmov. 2902 2927 4494 3243 3901 3618 Extfrag fragmenting for movable 9984989 8343696 9968518 15514268 13645126 13072466 Pages steal 179954 192291 210880 123254 94545 81486 Pages steal with pageblock 22153 18943 20154 33562 29969 33444 Pages steal with pageblock for unmovable 14350 12858 13256 20660 19003 20852 Pages steal with pageblock for unmovable from mov. 12812 11402 11683 19072 17467 19298 Pages steal with pageblock for unmovable from recl. 1538 1456 1573 1588 1536 1554 Pages steal with pageblock for movable 7114 5489 5965 11787 10012 11493 Pages steal with pageblock for movable from unmov. 6885 5291 5541 11179 9525 10885 Pages steal with pageblock for movable from recl. 229 198 424 608 487 608 Pages steal with pageblock for reclaimable 689 596 933 1115 954 1099 Pages steal with pageblock for reclaimable from unmov. 273 219 537 658 547 667 Pages steal with pageblock for reclaimable from mov. 416 377 396 457 407 432 Pages steal with pageblock due to counting 11834 10075 7530 ... for unmovable 8993 7381 4616 ... for movable 2792 2653 2851 ... for reclaimable 49 41 63 What we can see is that "Extfrag fragmenting for unmovable" and "... placed with movable" drops with almost each patch, which is good as we are polluting less movable pageblocks with unmovable pages. The most significant change is patch 4 with movable page counting. On the other hand it increases "Extfrag fragmenting for movable" by 50%. "Pages steal" drops though, so these movable allocation fallbacks find only small free pages and are not allowed to steal whole pageblocks back. "Pages steal with pageblock" raises, because the patch increases the chances of pageblock migratetype changes to happen. This affects all migratetypes. The summary is that patch 4 is not a clear win wrt these stats, but I believe that the tradeoff it makes is a good one. There's less pollution of movable pageblocks by unmovable allocations. There's less stealing between pageblock, and those that remain have higher chance of changing migratetype also the pageblock itself, so it should more faithfully reflect the migratetype of the pages within the pageblock. The increase of movable allocations falling back to unmovable pageblock might look dramatic, but those allocations can be migrated by compaction when needed, and other patches in the series (7-9) improve that aspect. Patches 7 and 8 continue the trend of reduced unmovable fallbacks and also reduce the impact on movable fallbacks from patch 4. [1] https://www.spinics.net/lists/linux-mm/msg114237.html This patch (of 8): While currently there are (mostly by accident) no holes in struct compact_control (on x86_64), but we are going to add more bool flags, so place them all together to the end of the structure. While at it, just order all fields from largest to smallest. Link: http://lkml.kernel.org/r/20170307131545.28577-2-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Acked-by: Johannes Weiner Cc: Joonsoo Kim Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/internal.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e092693443b995c8e3a565a73b5fdb05f1260f9b Author: Olga Kornievskaia Date: Mon May 8 18:02:24 2017 -0400 NFS append COMMIT after synchronous COPY Instead of messing with the commit path which has been causing issues, add a COMMIT op after the COPY and ask for stable copies in the first space. It saves a round trip, since after the COPY, the client sends a COMMIT anyway. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust fs/nfs/internal.h | 1 - fs/nfs/nfs42proc.c | 21 +++++++++++++++------ fs/nfs/nfs42xdr.c | 22 ++++++++++++++++++++-- fs/nfs/write.c | 30 ------------------------------ include/linux/nfs_xdr.h | 1 + 5 files changed, 36 insertions(+), 39 deletions(-) commit efda760fe95ea15291853c8fa9235c32d319cd98 Author: J. Bruce Fields Date: Tue Mar 28 21:25:08 2017 -0400 lockd: fix lockd shutdown race As reported by David Jeffery: "a signal was sent to lockd while lockd was shutting down from a request to stop nfs. The signal causes lockd to call restart_grace() which puts the lockd_net structure on the grace list. If this signal is received at the wrong time, it will occur after lockd_down_net() has called locks_end_grace() but before lockd_down_net() stops the lockd thread. This leads to lockd putting the lockd_net structure back on the grace list, then exiting without anything removing it from the list." So, perform the final locks_end_grace() from the the lockd thread; this ensures it's serialized with respect to restart_grace(). Reported-by: David Jeffery Signed-off-by: J. Bruce Fields fs/lockd/svc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 922c60e89d52730050c6ccca218bff40cc8bcd8e Author: Jon Mason Date: Mon May 8 17:48:35 2017 -0400 net: mdio-mux: bcm-iproc: call mdiobus_free() in error path If an error is encountered in mdio_mux_init(), the error path will call mdiobus_free(). Since mdiobus_register() has been called prior to mdio_mux_init(), the bus->state will not be MDIOBUS_UNREGISTERED. This causes a BUG_ON() in mdiobus_free(). To correct this issue, add an error path for mdio_mux_init() which calls mdiobus_unregister() prior to mdiobus_free(). Signed-off-by: Jon Mason Fixes: 98bc865a1ec8 ("net: mdio-mux: Add MDIO mux driver for iProc SoCs") Acked-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/mdio-mux-bcm-iproc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5e78e465abcba4a21e5cc52bef41aa4b3361957d Author: Markus Elfring Date: Thu Aug 25 14:28:09 2016 +0200 xtensa: ISS: Use kmalloc_array() in simdisk_init() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Max Filippov arch/xtensa/platforms/iss/simdisk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit acfead32f3f938e456d7d5e1a82c743d30b8b886 Author: Mikulas Patocka Date: Fri Apr 14 14:35:33 2017 -0400 ide: don't call memcpy with the same source and destination The parisc architecture recently reimplemented the memcpy function and their reimplementation crashed when source and destination overlapped. The crash happened in the function ide_complete_cmd where memcpy is called with the same source and destination pointer. According to the C specification, memcpy behavior is undefined if the source and destination range overlaps. This patches fixes the undefined behavior. Signed-off-by: Mikulas Patocka Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: David S. Miller drivers/ide/ide-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a1df90ae195d9c676b6f313375f3e8f13752e13 Author: Geliang Tang Date: Sun Apr 9 09:41:32 2017 +0800 ide: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller drivers/ide/ide-probe.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 48f5bccc60675f8426a6159935e8636a1fd89f56 Author: Grygorii Strashko Date: Mon May 8 14:21:21 2017 -0500 net: ethernet: ti: cpsw: adjust cpsw fifos depth for fullduplex flow control When users set flow control using ethtool the bits are set properly in the CPGMAC_SL MACCONTROL register, but the FIFO depth in the respective Port n Maximum FIFO Blocks (Pn_MAX_BLKS) registers remains set to the minimum size reset value. When receive flow control is enabled on a port, the port's associated FIFO block allocation must be adjusted. The port RX allocation must increase to accommodate the flow control runout. The TRM recommends numbers of 5 or 6. Hence, apply required Port FIFO configuration to Pn_MAX_BLKS.Pn_TX_MAX_BLKS=0xF and Pn_MAX_BLKS.Pn_RX_MAX_BLKS=0x5 during interface initialization. Cc: Schuyler Patton Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 242d3a49a2a1a71d8eb9f953db1bcaa9d698ce00 Author: WANG Cong Date: Mon May 8 10:12:13 2017 -0700 ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf For each netns (except init_net), we initialize its null entry in 3 places: 1) The template itself, as we use kmemdup() 2) Code around dst_init_metrics() in ip6_route_net_init() 3) ip6_route_dev_notify(), which is supposed to initialize it after loopback registers Unfortunately the last one still happens in a wrong order because we expect to initialize net->ipv6.ip6_null_entry->rt6i_idev to net->loopback_dev's idev, thus we have to do that after we add idev to loopback. However, this notifier has priority == 0 same as ipv6_dev_notf, and ipv6_dev_notf is registered after ip6_route_dev_notifier so it is called actually after ip6_route_dev_notifier. This is similar to commit 2f460933f58e ("ipv6: initialize route null entry in addrconf_init()") which fixes init_net. Fix it by picking a smaller priority for ip6_route_dev_notifier. Also, we have to release the refcnt accordingly when unregistering loopback_dev because device exit functions are called before subsys exit functions. Acked-by: David Ahern Tested-by: David Ahern Signed-off-by: Cong Wang Signed-off-by: David S. Miller include/net/addrconf.h | 2 ++ net/ipv6/addrconf.c | 1 + net/ipv6/route.c | 13 +++++++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) commit c32537d49faba69f5c2146f1ab6dbacf26bff133 Author: Markus Elfring Date: Sun May 7 21:24:51 2017 +0200 xtensa: Use seq_puts() in c_show() A string which did not contain a data format specification should be put into a sequence. Thus use the corresponding function "seq_puts". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Max Filippov arch/xtensa/kernel/setup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 29cee56c0be46ad01e78af104a06223c65ee0c67 Merge: aeca3a7 6406c91 Author: David S. Miller Date: Mon May 8 16:02:23 2017 -0400 Merge tag 'mac80211-for-davem-2017-05-08' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== A couple more fixes: * don't try to authenticate during reconfiguration, which causes drivers to get confused * fix a kernel-doc warning for a recently merged change * fix MU-MIMO group configuration (relevant only for monitor mode) * more rate flags fix: remove stray RX_ENC_FLAG_40MHZ * fix IBSS probe response allocation size ==================== Signed-off-by: David S. Miller commit aeca3a77b1e0ed06a095933b89c86aed007383eb Author: Jim Baxter Date: Mon May 8 13:49:57 2017 +0100 net: cdc_ncm: Fix TX zero padding The zero padding that is added to NTB's does not zero the memory correctly. This is because the skb_put modifies the value of skb_out->len which results in the memset command not setting any memory to zero as (ctx->tx_max - skb_out->len) == 0. I have resolved this by storing the size of the memory to be zeroed before the skb_put and using this in the memset call. Signed-off-by: Jim Baxter Reviewed-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/cdc_ncm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 2d3e4866dea96b0506395b47bfefb234f2088dac Merge: 9c6ee01 2e5b0bd Author: Linus Torvalds Date: Mon May 8 12:37:56 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Paolo Bonzini: "ARM: - HYP mode stub supports kexec/kdump on 32-bit - improved PMU support - virtual interrupt controller performance improvements - support for userspace virtual interrupt controller (slower, but necessary for KVM on the weird Broadcom SoCs used by the Raspberry Pi 3) MIPS: - basic support for hardware virtualization (ImgTec P5600/P6600/I6400 and Cavium Octeon III) PPC: - in-kernel acceleration for VFIO s390: - support for guests without storage keys - adapter interruption suppression x86: - usual range of nVMX improvements, notably nested EPT support for accessed and dirty bits - emulation of CPL3 CPUID faulting generic: - first part of VCPU thread request API - kvm_stat improvements" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (227 commits) kvm: nVMX: Don't validate disabled secondary controls KVM: put back #ifndef CONFIG_S390 around kvm_vcpu_kick Revert "KVM: Support vCPU-based gfn->hva cache" tools/kvm: fix top level makefile KVM: x86: don't hold kvm->lock in KVM_SET_GSI_ROUTING KVM: Documentation: remove VM mmap documentation kvm: nVMX: Remove superfluous VMX instruction fault checks KVM: x86: fix emulation of RSM and IRET instructions KVM: mark requests that need synchronization KVM: return if kvm_vcpu_wake_up() did wake up the VCPU KVM: add explicit barrier to kvm_vcpu_kick KVM: perform a wake_up in kvm_make_all_cpus_request KVM: mark requests that do not need a wakeup KVM: remove #ifndef CONFIG_S390 around kvm_vcpu_wake_up KVM: x86: always use kvm_make_request instead of set_bit KVM: add kvm_{test,clear}_request to replace {test,clear}_bit s390: kvm: Cpu model support for msa6, msa7 and msa8 KVM: x86: remove irq disablement around KVM_SET_CLOCK/KVM_GET_CLOCK kvm: better MWAIT emulation for guests KVM: x86: virtualize cpuid faulting ... commit 9c6ee01ed5bb1ee489d580eaa60d7eb5a8ede336 Merge: d9dc089 c92a90a Author: Linus Torvalds Date: Mon May 8 12:32:00 2017 -0700 Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: "Lots of little things this time: - allow modules to be autoloaded according to the HWCAP feature bits (used primarily for crypto modules) - split module core and init PLT sections, since the core code and init code could be placed far apart, and the PLT sections need to be local to the code block. - three patches from Chris Brandt to allow Cortex-A9 L2 cache optimisations to be disabled where a SoC didn't wire up the out of band signals. - NoMMU compliance fixes, avoiding corruption of vector table which is not being used at this point, and avoiding possible register state corruption when switching mode. - fixmap memory attribute compliance update. - remove unnecessary locking from update_sections_early() - ftrace fix for DEBUG_RODATA with !FRAME_POINTER" * 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8672/1: mm: remove tasklist locking from update_sections_early() ARM: 8671/1: V7M: Preserve registers across switch from Thread to Handler mode ARM: 8670/1: V7M: Do not corrupt vector table around v7m_invalidate_l1 call ARM: 8668/1: ftrace: Fix dynamic ftrace with DEBUG_RODATA and !FRAME_POINTER ARM: 8667/3: Fix memory attribute inconsistencies when using fixmap ARM: 8663/1: wire up HWCAP/HWCAP2 feature bits to the CPU modalias ARM: 8666/1: mm: dump: Add domain to output ARM: 8662/1: module: split core and init PLT sections ARM: 8661/1: dts: r7s72100: add l2 cache ARM: 8660/1: shmobile: r7s72100: Enable L2 cache ARM: 8659/1: l2c: allow CA9 optimizations to be disabled commit d9dc089583ebf28d6f02b995e2d71c85965660f9 Merge: 70ef8f0 2a4e669 Author: Linus Torvalds Date: Mon May 8 12:29:46 2017 -0700 Merge tag 'xtensa-20170507' of git://github.com/jcmvbkbc/linux-xtensa Pull Xtensa updates from Max Filippov: - clearly mark references to spilled register locations with SPILL_SLOT macros - clean up xtensa ptrace: use generic tracehooks, move internal kernel definitions from uapi/asm to asm, make locally-used functions static, fix code style and alignment - use command line parameters passed to ISS as kernel command line. * tag 'xtensa-20170507' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: clean up access to spilled registers locations xtensa: use generic tracehooks xtensa: move internal ptrace definitions from uapi/asm to asm xtensa: clean up xtensa/kernel/ptrace.c xtensa: drop unused fast_io_protect function xtensa: use ITLB_HIT_BIT instead of hardcoded number xtensa: ISS: update kernel command line in platform_setup xtensa: ISS: add argc/argv simcall definitions xtensa: ISS: cleanup setup.c commit 70ef8f0d37573079e093305214d0cc9eb71100f7 Merge: 677375c e9cdd30 Author: Linus Torvalds Date: Mon May 8 12:24:17 2017 -0700 Merge tag 'for-f2fs-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this round, we've focused on enhancing performance with regards to block allocation, GC, and discard/in-place-update IO controls. There are a bunch of clean-ups as well as minor bug fixes. Enhancements: - disable heap-based allocation by default - issue small-sized discard commands by default - change the policy of data hotness for logging - distinguish IOs in terms of size and wbc type - start SSR earlier to avoid foreground GC - enhance data structures managing discard commands - enhance in-place update flow - add some more fault injection routines - secure one more xattr entry Bug fixes: - calculate victim cost for GC correctly - remain correct victim segment number for GC - race condition in nid allocator and initializer - stale pointer produced by atomic_writes - fix missing REQ_SYNC for flush commands - handle missing errors in more corner cases" * tag 'for-f2fs-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (111 commits) f2fs: fix a mount fail for wrong next_scan_nid f2fs: enhance scalability of trace macro f2fs: relocate inode_{,un}lock in F2FS_IOC_SETFLAGS f2fs: Make flush bios explicitely sync f2fs: show available_nids in f2fs/status f2fs: flush dirty nats periodically f2fs: introduce CP_TRIMMED_FLAG to avoid unneeded discard f2fs: allow cpc->reason to indicate more than one reason f2fs: release cp and dnode lock before IPU f2fs: shrink size of struct discard_cmd f2fs: don't hold cmd_lock during waiting discard command f2fs: nullify fio->encrypted_page for each writes f2fs: sanity check segment count f2fs: introduce valid_ipu_blkaddr to clean up f2fs: lookup extent cache first under IPU scenario f2fs: reconstruct code to write a data page f2fs: introduce __wait_discard_cmd f2fs: introduce __issue_discard_cmd f2fs: enable small discard by default f2fs: delay awaking discard thread ... commit b210aeaedfc47ab8a86fbdcad46caf1e49cc0e37 Merge: 8ed508f 70fe443 Author: David S. Miller Date: Mon May 8 15:15:03 2017 -0400 Merge branch 'stmmac-pci-fix-crash-on-Intel-Galileo-Gen2' Andy Shevchenko says: ==================== stmmac: pci: Fix crash on Intel Galileo Gen2 Due to misconfiguration of PCI driver for Intel Quark the user will get a kernel crash: udhcpc: started, v1.26.2 stmmaceth 0000:00:14.6 eth0: device MAC address 98:4f:ee:05:ac:47 Generic PHY stmmac-a6:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=stmmac-a6:01, irq=-1) stmmaceth 0000:00:14.6 eth0: IEEE 1588-2008 Advanced Timestamp supported stmmaceth 0000:00:14.6 eth0: registered PTP clock IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready udhcpc: sending discover stmmaceth 0000:00:14.6 eth0: Link is Up - 100Mbps/Full - flow control off IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready BUG: unable to handle kernel NULL pointer dereference at (null) IP: stmmac_xmit+0xf1/0x1080 Fix this by adding necessary settings. P.S. I split fix to three patches according to what each of them adds. ==================== Tested-by: Jan Kiszka Signed-off-by: David S. Miller commit 70fe4432bb360207fba04b4137f330a7a109f7a6 Author: Andy Shevchenko Date: Mon May 8 17:14:22 2017 +0300 stmmac: pci: split out common_default_data() helper New helper is added in order to prevent misconfiguration happened for one of the platforms when configuration data is expanded. Signed-off-by: Andy Shevchenko Acked-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 52 ++++++++---------------- 1 file changed, 18 insertions(+), 34 deletions(-) commit efcd24147fa03817485dab9ff9d5542a0f28684b Author: Andy Shevchenko Date: Mon May 8 17:14:21 2017 +0300 stmmac: pci: RX queue routing configuration The commit abe80fdc6ee6 ("net: stmmac: RX queue routing configuration") missed Intel Quark configuration. Append it here. Fixes: abe80fdc6ee6 ("net: stmmac: RX queue routing configuration") Cc: Joao Pinto Signed-off-by: Andy Shevchenko Acked-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 3 +++ 1 file changed, 3 insertions(+) commit a1437e57af1c07ef01b921c4a1ab8efd5134b597 Author: Andy Shevchenko Date: Mon May 8 17:14:20 2017 +0300 stmmac: pci: TX and RX queue priority configuration The commit a8f5102af2a7 ("net: stmmac: TX and RX queue priority configuration") missed Intel Quark configuration. Append it here. Fixes: a8f5102af2a7 ("net: stmmac: TX and RX queue priority configuration") Cc: Joao Pinto Signed-off-by: Andy Shevchenko Acked-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 4 ++++ 1 file changed, 4 insertions(+) commit 05c5d0041972d3f3c6d881e94aa351f89a62eb2a Author: Andy Shevchenko Date: Mon May 8 17:14:19 2017 +0300 stmmac: pci: set default number of rx and tx queues The commit 26d6851fd24e ("net: stmmac: set default number of rx and tx queues in stmmac_pci") missed Intel Quark configuration. Append it here. Fixes: 26d6851fd24e ("net: stmmac: set default number of rx and tx queues in stmmac_pci") Cc: Joao Pinto Signed-off-by: Andy Shevchenko Acked-by: Joao Pinto Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8ed508fd4b84a38db63ddeee8ab6905f06cfa589 Author: Hangbin Liu Date: Mon May 8 17:57:13 2017 +0800 vti: check nla_put_* return value Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller net/ipv4/ip_vti.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 0d0e57697f162da4aa218b5feafe614fb666db07 Author: Daniel Borkmann Date: Mon May 8 00:04:09 2017 +0200 bpf: don't let ldimm64 leak map addresses on unprivileged The patch fixes two things at once: 1) It checks the env->allow_ptr_leaks and only prints the map address to the log if we have the privileges to do so, otherwise it just dumps 0 as we would when kptr_restrict is enabled on %pK. Given the latter is off by default and not every distro sets it, I don't want to rely on this, hence the 0 by default for unprivileged. 2) Printing of ldimm64 in the verifier log is currently broken in that we don't print the full immediate, but only the 32 bit part of the first insn part for ldimm64. Thus, fix this up as well; it's okay to access, since we verified all ldimm64 earlier already (including just constants) through replace_map_fd_with_map_ptr(). Fixes: 1be7f75d1668 ("bpf: enable non-root eBPF programs") Fixes: cbd357008604 ("bpf: verifier (add ability to receive verification log)") Reported-by: Jann Horn Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 871ff2ebe0af0d7f1050bfc8bce62fddea2b12ec Author: Geliang Tang Date: Sat May 6 23:42:22 2017 +0800 yam: use memdup_user Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller drivers/net/hamradio/yam.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 294316a4af16cd5c355a80bd2dc7ea803b88f6ba Author: Geliang Tang Date: Sat May 6 23:42:16 2017 +0800 net/hippi/rrunner: use memdup_user Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller drivers/net/hippi/rrunner.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 3bb4858fda1cac2ae677edb5134932af4c7f8ff8 Author: Ganesh Goudar Date: Sat May 6 14:25:06 2017 +0530 cxgb4: avoid disabling FEC by default Recent Chelsio firmware started using few port capablity bits to manage FEC and as driver was not aware of FEC changes those bits were zeroed, consequently disabling FEC. Avoid zeroing those bits and default to whatever the firmware tells us the Link is currently advertising. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 9 +++++++ drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 38 ++++++++++++++++++++++----- drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 6 ++--- 3 files changed, 43 insertions(+), 10 deletions(-) commit 8ce7aaaa9797f944ad2f50e5160c8a20a473aedf Author: Christophe Jaillet Date: Sat May 6 07:29:45 2017 +0200 net: dsa: loop: Check for memory allocation failure If 'devm_kzalloc' fails, a NULL pointer will be dereferenced. Return -ENOMEM instead, as done for some other memory allocation just a few lines above. Fixes: 98cd1552ea27 ("net: dsa: Mock-up driver") Signed-off-by: Christophe JAILLET Reviewed-by: Andrew Lunn Acked-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/dsa_loop.c | 3 +++ 1 file changed, 3 insertions(+) commit d62844a825e87da345e11639e98deb617ef11e08 Author: Hangbin Liu Date: Sat May 6 11:17:06 2017 +0800 bonding: check nla_put_be32 return value Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller drivers/net/bonding/bond_netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7bccd12d27b7e358823feb5429731b8ee698b173 Author: Ben Shelton Date: Mon Mar 27 13:24:44 2017 -0500 ubi: Add debugfs file for tracking PEB state Add a file under debugfs to allow easy access to the erase count for each physical erase block on an UBI device. This is useful when debugging data integrity issues with UBIFS on NAND flash devices. Signed-off-by: Ben Shelton Signed-off-by: Zach Brown v2: * If ubi_io_is_bad eraseblk_count_seq_show just returns the err. * if ubi->lookuptbl returns null, its no longer treated as an error instead info for that block is not printeded * Removed check for UBI_MAX_ERASECOUNTER since it is impossible to hit * Removed block state from print, if a block is printed then it is good and if it is not printed, then it is bad. v3: * Remove errant ! symbol from if statement checking if erase count is valid. Signed-off-by: Richard Weinberger drivers/mtd/ubi/debug.c | 126 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 125 insertions(+), 1 deletion(-) commit 798868c021016c1ee1825a3fbf10ae64ecc64c8e Author: Rock Lee Date: Thu Apr 13 23:16:06 2017 -0700 ubifs: Fix a typo in comment of ioctl2ubifs & ubifs2ioctl Change 'convert' to 'converts' Change 'UBIFS' to 'UBIFS inode flags' Signed-off-by: Rock Lee Signed-off-by: Richard Weinberger fs/ubifs/ioctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2a068daf57424b98b3c9de8da8bbf47ca360a618 Author: Stefan Agner Date: Sun Apr 16 19:22:43 2017 -0700 ubifs: Remove unnecessary assignment Assigning a value of a variable to itself is not useful. Signed-off-by: Stefan Agner Signed-off-by: Richard Weinberger fs/ubifs/recovery.c | 1 - 1 file changed, 1 deletion(-) commit 6a258f7d0fbd9f5e93099018741a7e64dd3a4578 Author: Colin Ian King Date: Sat Apr 8 00:22:03 2017 +0100 ubifs: Fix cut and paste error on sb type comparisons The check for the bad node type of sb->type is checking sa->type and not sb-type. This looks like a cut and paste error. Fix this. Detected by PVS-Studio, warning: V581 Signed-off-by: Colin Ian King Signed-off-by: Richard Weinberger fs/ubifs/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8a1435880f452430b41374d27ac4a33e7bd381ea Author: Rabin Vincent Date: Mon Apr 3 13:44:11 2017 +0200 ubi: fastmap: Fix slab corruption Booting with UBI fastmap and SLUB debugging enabled results in the following splats. The problem is that ubi_scan_fastmap() moves the fastmap blocks from the scan_ai (allocated in scan_fast()) to the ai allocated in ubi_attach(). This results in two problems: - When the scan_ai is freed, aebs which were allocated from its slab cache are still in use. - When the other ai is being destroyed in destroy_ai(), the arguments to kmem_cache_free() call are incorrect since aebs on its ->fastmap list were allocated with a slab cache from a differnt ai. Fix this by making a copy of the aebs in ubi_scan_fastmap() instead of moving them. ============================================================================= BUG ubi_aeb_slab_cache (Not tainted): Objects remaining in ubi_aeb_slab_cache on __kmem_cache_shutdown() ----------------------------------------------------------------------------- INFO: Slab 0xbfd2da3c objects=17 used=1 fp=0xb33d7748 flags=0x40000080 CPU: 1 PID: 118 Comm: ubiattach Tainted: G B 4.9.15 #3 [<80111910>] (unwind_backtrace) from [<8010d498>] (show_stack+0x18/0x1c) [<8010d498>] (show_stack) from [<804a3274>] (dump_stack+0xb4/0xe0) [<804a3274>] (dump_stack) from [<8026c47c>] (slab_err+0x78/0x88) [<8026c47c>] (slab_err) from [<802735bc>] (__kmem_cache_shutdown+0x180/0x3e0) [<802735bc>] (__kmem_cache_shutdown) from [<8024e13c>] (shutdown_cache+0x1c/0x60) [<8024e13c>] (shutdown_cache) from [<8024ed64>] (kmem_cache_destroy+0x19c/0x20c) [<8024ed64>] (kmem_cache_destroy) from [<8057cc14>] (destroy_ai+0x1dc/0x1e8) [<8057cc14>] (destroy_ai) from [<8057f04c>] (ubi_attach+0x3f4/0x450) [<8057f04c>] (ubi_attach) from [<8056fe70>] (ubi_attach_mtd_dev+0x60c/0xff8) [<8056fe70>] (ubi_attach_mtd_dev) from [<80571d78>] (ctrl_cdev_ioctl+0x110/0x2b8) [<80571d78>] (ctrl_cdev_ioctl) from [<8029c77c>] (do_vfs_ioctl+0xac/0xa00) [<8029c77c>] (do_vfs_ioctl) from [<8029d10c>] (SyS_ioctl+0x3c/0x64) [<8029d10c>] (SyS_ioctl) from [<80108860>] (ret_fast_syscall+0x0/0x1c) INFO: Object 0xb33d7e88 @offset=3720 INFO: Allocated in scan_peb+0x608/0x81c age=72 cpu=1 pid=118 kmem_cache_alloc+0x3b0/0x43c scan_peb+0x608/0x81c ubi_attach+0x124/0x450 ubi_attach_mtd_dev+0x60c/0xff8 ctrl_cdev_ioctl+0x110/0x2b8 do_vfs_ioctl+0xac/0xa00 SyS_ioctl+0x3c/0x64 ret_fast_syscall+0x0/0x1c kmem_cache_destroy ubi_aeb_slab_cache: Slab cache still has objects CPU: 1 PID: 118 Comm: ubiattach Tainted: G B 4.9.15 #3 [<80111910>] (unwind_backtrace) from [<8010d498>] (show_stack+0x18/0x1c) [<8010d498>] (show_stack) from [<804a3274>] (dump_stack+0xb4/0xe0) [<804a3274>] (dump_stack) from [<8024ed80>] (kmem_cache_destroy+0x1b8/0x20c) [<8024ed80>] (kmem_cache_destroy) from [<8057cc14>] (destroy_ai+0x1dc/0x1e8) [<8057cc14>] (destroy_ai) from [<8057f04c>] (ubi_attach+0x3f4/0x450) [<8057f04c>] (ubi_attach) from [<8056fe70>] (ubi_attach_mtd_dev+0x60c/0xff8) [<8056fe70>] (ubi_attach_mtd_dev) from [<80571d78>] (ctrl_cdev_ioctl+0x110/0x2b8) [<80571d78>] (ctrl_cdev_ioctl) from [<8029c77c>] (do_vfs_ioctl+0xac/0xa00) [<8029c77c>] (do_vfs_ioctl) from [<8029d10c>] (SyS_ioctl+0x3c/0x64) [<8029d10c>] (SyS_ioctl) from [<80108860>] (ret_fast_syscall+0x0/0x1c) cache_from_obj: Wrong slab cache. ubi_aeb_slab_cache but object is from ubi_aeb_slab_cache ------------[ cut here ]------------ WARNING: CPU: 1 PID: 118 at mm/slab.h:354 kmem_cache_free+0x39c/0x450 Modules linked in: CPU: 1 PID: 118 Comm: ubiattach Tainted: G B 4.9.15 #3 [<80111910>] (unwind_backtrace) from [<8010d498>] (show_stack+0x18/0x1c) [<8010d498>] (show_stack) from [<804a3274>] (dump_stack+0xb4/0xe0) [<804a3274>] (dump_stack) from [<80120e40>] (__warn+0xf4/0x10c) [<80120e40>] (__warn) from [<80120f20>] (warn_slowpath_null+0x28/0x30) [<80120f20>] (warn_slowpath_null) from [<80271fe0>] (kmem_cache_free+0x39c/0x450) [<80271fe0>] (kmem_cache_free) from [<8057cb88>] (destroy_ai+0x150/0x1e8) [<8057cb88>] (destroy_ai) from [<8057ef1c>] (ubi_attach+0x2c4/0x450) [<8057ef1c>] (ubi_attach) from [<8056fe70>] (ubi_attach_mtd_dev+0x60c/0xff8) [<8056fe70>] (ubi_attach_mtd_dev) from [<80571d78>] (ctrl_cdev_ioctl+0x110/0x2b8) [<80571d78>] (ctrl_cdev_ioctl) from [<8029c77c>] (do_vfs_ioctl+0xac/0xa00) [<8029c77c>] (do_vfs_ioctl) from [<8029d10c>] (SyS_ioctl+0x3c/0x64) [<8029d10c>] (SyS_ioctl) from [<80108860>] (ret_fast_syscall+0x0/0x1c) ---[ end trace 2bd8396277fd0a0b ]--- ============================================================================= BUG ubi_aeb_slab_cache (Tainted: G B W ): page slab pointer corrupt. ----------------------------------------------------------------------------- INFO: Allocated in scan_peb+0x608/0x81c age=104 cpu=1 pid=118 kmem_cache_alloc+0x3b0/0x43c scan_peb+0x608/0x81c ubi_attach+0x124/0x450 ubi_attach_mtd_dev+0x60c/0xff8 ctrl_cdev_ioctl+0x110/0x2b8 do_vfs_ioctl+0xac/0xa00 SyS_ioctl+0x3c/0x64 ret_fast_syscall+0x0/0x1c INFO: Slab 0xbfd2da3c objects=17 used=1 fp=0xb33d7748 flags=0x40000081 INFO: Object 0xb33d7e88 @offset=3720 fp=0xb33d7da0 Redzone b33d7e80: cc cc cc cc cc cc cc cc ........ Object b33d7e88: 02 00 00 00 01 00 00 00 00 f0 ff 7f ff ff ff ff ................ Object b33d7e98: 00 00 00 00 00 00 00 00 bd 16 00 00 00 00 00 00 ................ Object b33d7ea8: 00 01 00 00 00 02 00 00 00 00 00 00 00 00 00 00 ................ Redzone b33d7eb8: cc cc cc cc .... Padding b33d7f60: 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZ CPU: 1 PID: 118 Comm: ubiattach Tainted: G B W 4.9.15 #3 [<80111910>] (unwind_backtrace) from [<8010d498>] (show_stack+0x18/0x1c) [<8010d498>] (show_stack) from [<804a3274>] (dump_stack+0xb4/0xe0) [<804a3274>] (dump_stack) from [<80271770>] (free_debug_processing+0x320/0x3c4) [<80271770>] (free_debug_processing) from [<80271ad0>] (__slab_free+0x2bc/0x430) [<80271ad0>] (__slab_free) from [<80272024>] (kmem_cache_free+0x3e0/0x450) [<80272024>] (kmem_cache_free) from [<8057cb88>] (destroy_ai+0x150/0x1e8) [<8057cb88>] (destroy_ai) from [<8057ef1c>] (ubi_attach+0x2c4/0x450) [<8057ef1c>] (ubi_attach) from [<8056fe70>] (ubi_attach_mtd_dev+0x60c/0xff8) [<8056fe70>] (ubi_attach_mtd_dev) from [<80571d78>] (ctrl_cdev_ioctl+0x110/0x2b8) [<80571d78>] (ctrl_cdev_ioctl) from [<8029c77c>] (do_vfs_ioctl+0xac/0xa00) [<8029c77c>] (do_vfs_ioctl) from [<8029d10c>] (SyS_ioctl+0x3c/0x64) [<8029d10c>] (SyS_ioctl) from [<80108860>] (ret_fast_syscall+0x0/0x1c) FIX ubi_aeb_slab_cache: Object at 0xb33d7e88 not freed Signed-off-by: Rabin Vincent Signed-off-by: Richard Weinberger drivers/mtd/ubi/fastmap.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) commit 8326c1eec2449f0e868f7b19a5fa7bfa0386ab48 Author: Hyunchul Lee Date: Fri Mar 3 16:44:03 2017 +0900 ubifs: Add CONFIG_UBIFS_FS_SECURITY to disable/enable security labels When write syscall is called, every time security label is searched to determine that file's privileges should be changed. If LSM(Linux Security Model) is not used, this is useless. So introduce CONFIG_UBIFS_SECURITY to disable security labels. it's default value is "y". Signed-off-by: Hyunchul Lee Signed-off-by: Richard Weinberger fs/ubifs/Kconfig | 13 +++++++++++++ fs/ubifs/ubifs.h | 14 ++++++++++++-- fs/ubifs/xattr.c | 6 ++++++ 3 files changed, 31 insertions(+), 2 deletions(-) commit 997d30cb7490eb1ac37a3fb02a222fabf1f25fa9 Author: Andy Shevchenko Date: Tue Jan 10 14:56:43 2017 +0200 ubi: Make mtd parameter readable Fix permissions to allow read mtd parameter back (only for owner). Signed-off-by: Andy Shevchenko Signed-off-by: Richard Weinberger drivers/mtd/ubi/build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 435009d4064af72b283fdd47025cede4dfefc6d2 Author: Andy Shevchenko Date: Tue Jan 10 14:56:42 2017 +0200 ubi: Fix section mismatch WARNING: vmlinux.o(.text+0x1f2a80): Section mismatch in reference from the variable __param_ops_mtd to the function .init.text:ubi_mtd_param_parse() The function __param_ops_mtd() references the function __init ubi_mtd_param_parse(). This is often because __param_ops_mtd lacks a __init annotation or the annotation of ubi_mtd_param_parse is wrong. Cc: Richard Weinberger Signed-off-by: Andy Shevchenko Signed-off-by: Richard Weinberger drivers/mtd/ubi/build.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ac45bd93a5035c2f39c9862b8b6ed692db0fdc87 Author: Dan Carpenter Date: Sat May 6 03:49:01 2017 +0300 bnxt_en: allocate enough space for ->ntp_fltr_bmap We have the number of longs, but we need to calculate the number of bytes required. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Dan Carpenter Acked-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit df5303a8aa9a0a6934f4cea7427f1edf771f21c2 Author: Kees Cook Date: Fri May 5 15:34:34 2017 -0700 qlge: Avoid reading past end of buffer Using memcpy() from a string that is shorter than the length copied means the destination buffer is being filled with arbitrary data from the kernel rodata segment. Instead, use strncpy() which will fill the trailing bytes with zeros. This was found with the future CONFIG_FORTIFY_SOURCE feature. Cc: Daniel Micay Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlge/qlge_dbg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4dc69c1c1fff2f587f8e737e70b4a4e7565a5c94 Author: Kees Cook Date: Fri May 5 15:30:23 2017 -0700 bna: ethtool: Avoid reading past end of buffer Using memcpy() from a string that is shorter than the length copied means the destination buffer is being filled with arbitrary data from the kernel rodata segment. Instead, use strncpy() which will fill the trailing bytes with zeros. This was found with the future CONFIG_FORTIFY_SOURCE feature. Cc: Daniel Micay Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/brocade/bna/bnad_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9e4eb1ce472fbf7b007f23c88ec11c37265e401c Author: Kees Cook Date: Fri May 5 15:25:32 2017 -0700 bna: Avoid reading past end of buffer Using memcpy() from a string that is shorter than the length copied means the destination buffer is being filled with arbitrary data from the kernel rodata segment. Instead, use strncpy() which will fill the trailing bytes with zeros. This was found with the future CONFIG_FORTIFY_SOURCE feature. Cc: Daniel Micay Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/brocade/bna/bfa_ioc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 677375cef8cb7763ef620e007873117b9bad72a0 Merge: dd727da 6f9d696 Author: Linus Torvalds Date: Mon May 8 11:40:34 2017 -0700 Merge tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt Pull fscrypt updates from Ted Ts'o: "Only bug fixes and cleanups for this merge window" * tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt: fscrypt: correct collision claim for digested names MAINTAINERS: fscrypt: update mailing list, patchwork, and git ext4: clean up ext4_match() and callers f2fs: switch to using fscrypt_match_name() ext4: switch to using fscrypt_match_name() fscrypt: introduce helper function for filename matching fscrypt: avoid collisions when presenting long encrypted filenames f2fs: check entire encrypted bigname when finding a dentry ubifs: check for consistent encryption contexts in ubifs_lookup() f2fs: sync f2fs_lookup() with ext4_lookup() ext4: remove "nokey" check from ext4_lookup() fscrypt: fix context consistency check when key(s) unavailable fscrypt: Remove __packed from fscrypt_policy fscrypt: Move key structure and constants to uapi fscrypt: remove fscrypt_symlink_data_len() fscrypt: remove unnecessary checks for NULL operations commit 8403debeead8e8b296d7a7db2174af524695ab42 Author: Vlad Yasevich Date: Fri May 5 16:17:41 2017 -0400 vlan: Keep NETIF_F_HW_CSUM similar to other software devices Vlan devices, like all other software devices, enable NETIF_F_HW_CSUM feature. However, unlike all the othe other software devices, vlans will switch to using IP|IPV6_CSUM features, if the underlying devices uses them. In these situations, checksum offload features on the vlan device can't be controlled via ethtool. This patch makes vlans keep HW_CSUM feature if the underlying device supports checksum offloading. This makes vlan devices behave like other software devices, and restores control to the user. A side-effect is that some offload settings (typically UFO) may be enabled on the vlan device while being disabled on the HW. However, the GSO code will correctly process the packets. This actually results in slightly better raw throughput. Signed-off-by: Vladislav Yasevich Acked-by: Alexander Duyck Signed-off-by: David S. Miller net/8021q/vlan_dev.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 1b1fc3fddabfb8739ef2c8f04e05a9858b42c1f7 Author: Wei Wang Date: Fri May 5 12:53:23 2017 -0700 tcp: make congestion control optionally skip slow start after idle Congestion control modules that want full control over congestion control behavior do not want the cwnd modifications controlled by the sysctl_tcp_slow_start_after_idle code path. So skip those code paths for CC modules that use the cong_control() API. As an example, those cwnd effects are not desired for the BBR congestion control algorithm. Fixes: c0402760f565 ("tcp: new CC hook to set sending rate with rate_sample in any CA state") Signed-off-by: Wei Wang Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: David S. Miller include/net/tcp.h | 4 +++- net/ipv4/tcp_output.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 82486aa6f1b9bc8145e6d0fa2bc0b44307f3b875 Author: WANG Cong Date: Thu May 4 14:54:17 2017 -0700 ipv4: restore rt->fi for reference counting IPv4 dst could use fi->fib_metrics to store metrics but fib_info itself is refcnt'ed, so without taking a refcnt fi and fi->fib_metrics could be freed while dst metrics still points to it. This triggers use-after-free as reported by Andrey twice. This patch reverts commit 2860583fe840 ("ipv4: Kill rt->fi") to restore this reference counting. It is a quick fix for -net and -stable, for -net-next, as Eric suggested, we can consider doing reference counting for metrics itself instead of relying on fib_info. IPv6 is very different, it copies or steals the metrics from mx6_config in fib6_commit_metrics() so probably doesn't need a refcnt. Decnet has already done the refcnt'ing, see dn_fib_semantic_match(). Fixes: 2860583fe840 ("ipv4: Kill rt->fi") Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Cong Wang Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/route.h | 1 + net/ipv4/route.c | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) commit dd727dad37297f497dc69ac00182abf9651e7b6c Merge: 13e0988 17f423b Author: Linus Torvalds Date: Mon May 8 11:30:05 2017 -0700 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: - add GETFSMAP support - some performance improvements for very large file systems and for random write workloads into a preallocated file - bug fixes and cleanups. * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: jbd2: cleanup write flags handling from jbd2_write_superblock() ext4: mark superblock writes synchronous for nobarrier mounts ext4: inherit encryption xattr before other xattrs ext4: replace BUG_ON with WARN_ONCE in ext4_end_bio() ext4: avoid unnecessary transaction stalls during writeback ext4: preload block group descriptors ext4: make ext4_shutdown() static ext4: support GETFSMAP ioctls vfs: add common GETFSMAP ioctl definitions ext4: evict inline data when writing to memory map ext4: remove ext4_xattr_check_entry() ext4: rename ext4_xattr_check_names() to ext4_xattr_check_entries() ext4: merge ext4_xattr_list() into ext4_listxattr() ext4: constify static data that is never modified ext4: trim return value and 'dir' argument from ext4_insert_dentry() jbd2: fix dbench4 performance regression for 'nobarrier' mounts jbd2: Fix lockdep splat with generic/270 test mm: retry writepages() on ENOMEM when doing an data integrity writeback commit ef51042472f55b325fd7f2b26a2e29fd89757234 Author: Dan Williams Date: Mon May 8 10:55:27 2017 -0700 block, dax: move "select DAX" from BLOCK to FS_DAX For configurations that do not enable DAX filesystems or drivers, do not require the DAX core to be built. Given that the 'direct_access' method has been removed from 'block_device_operations', we can also go ahead and remove the block-related dax helper functions from fs/block_dev.c to drivers/dax/super.c. This keeps dax details out of the block layer and lets the DAX core be built as a module in the FS_DAX=n case. Filesystems need to include dax.h to call bdev_dax_supported(). Cc: linux-xfs@vger.kernel.org Cc: Jens Axboe Cc: "Theodore Ts'o" Cc: Matthew Wilcox Cc: Alexander Viro Cc: "Darrick J. Wong" Cc: Ross Zwisler Reviewed-by: Jan Kara Reported-by: Geert Uytterhoeven Signed-off-by: Dan Williams block/Kconfig | 1 - drivers/dax/super.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/Kconfig | 1 + fs/block_dev.c | 66 ----------------------------------------------- fs/ext2/super.c | 1 + fs/ext4/super.c | 1 + fs/xfs/xfs_super.c | 1 + include/linux/blkdev.h | 2 -- include/linux/dax.h | 30 ++++++++++++++++++++-- 9 files changed, 102 insertions(+), 71 deletions(-) commit 74d71a01abef37f71d914f2105a4cb8712a2beb8 Author: Mike Galbraith Date: Sat May 6 06:14:43 2017 +0200 device-dax: Tell kbuild DEV_DAX_PMEM depends on DEV_DAX ERROR: "devm_create_dev_dax" [drivers/dax/dax_pmem.ko] undefined! ERROR: "alloc_dax_region" [drivers/dax/dax_pmem.ko] undefined! ERROR: "dax_region_put" [drivers/dax/dax_pmem.ko] undefined! Signed-off-by: Mike Galbraith Signed-off-by: Dan Williams drivers/dax/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b47d59af68a8735e4637bacedcb4baf6f47c73f Author: Al Viro Date: Mon May 8 13:54:47 2017 -0400 fix braino in generic_file_read_iter() Wrong sign of iov_iter_revert() argument. Unfortunately, slipped through the testing, since most of the time we don't do anything to the iterator afterwards and potential oops on walking the iter->iov too far backwards is too infrequent to be easily triggered. Add a sanity check in iov_iter_revert() to catch bugs like this one; fortunately, the same braino hadn't happened in other callers, but we'd better have a warning if such thing crops up. Signed-off-by: Al Viro lib/iov_iter.c | 2 ++ mm/filemap.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 2214c260c72b0bd94e6c1c19bf451686212025d3 Author: Artur Paszkiewicz Date: Mon May 8 11:56:55 2017 +0200 md: don't return -EAGAIN in md_allow_write for external metadata arrays This essentially reverts commit b5470dc5fc18 ("md: resolve external metadata handling deadlock in md_allow_write") with some adjustments. Since commit 6791875e2e53 ("md: make reconfig_mutex optional for writes to md sysfs files.") changing array_state to 'active' does not use mddev_lock() and will not cause a deadlock with md_allow_write(). This revert simplifies userspace tools that write to sysfs attributes like "stripe_cache_size" or "consistency_policy" because it removes the need for special handling for external metadata arrays, checking for EAGAIN and retrying the write. Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li drivers/md/md.c | 20 ++++++++------------ drivers/md/md.h | 2 +- drivers/md/raid1.c | 9 +++------ drivers/md/raid5.c | 12 +++--------- 4 files changed, 15 insertions(+), 28 deletions(-) commit 3013c4983eb15f4ce8958e81922cdfd80f771d3e Author: Pavel Belous Date: Thu May 4 23:10:56 2017 +0300 aquantia: Fix "ethtool -S" crash when adapter down. This patch fixes the crash that happens when driver tries to collect statistics from already released "aq_vec" object. If adapter is in "down" state we still allow user to see statistics from HW. V2: fixed braces around "aq_vec_free". Fixes: 97bde5c4f909 ("net: ethernet: aquantia: Support for NIC-specific code") Signed-off-by: Pavel Belous Tested-by: David Arcari Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ebd768579552a10682c2cbdfa657779dea62a01d Author: Colin Ian King Date: Mon May 8 11:44:40 2017 +0100 blk-mq: make __blk_mq_stop_hw_queues static Making __blk_mq_stop_hw_queues static fixes sparse warning: block/blk-mq.c:6: warning: symbol '__blk_mq_stop_hw_queues' was not declared. Should it be static? Fixes: 2719aa217e0d0 ("blk-mq: don't use sync workqueue flushing from drivers") Signed-off-by: Colin Ian King Signed-off-by: Jens Axboe block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28cf22d0ba283deccc30b71de5f34d222cf9aa4c Author: Trond Myklebust Date: Sat May 6 12:19:11 2017 -0400 NFSv4: Fix exclusive create attributes encoding When using NFS4_CREATE_EXCLUSIVE4_1 mode, the client will overestimate the amount of space that it needs for the attributes because it does so before checking whether or not the server supports a given attribute. Fix by checking the attribute mask earlier. Signed-off-by: Trond Myklebust fs/nfs/nfs4xdr.c | 75 ++++++++++++++++++++++++++------------------------------ 1 file changed, 35 insertions(+), 40 deletions(-) commit 2e84611b3f4fa50e1f4c12f2966fcc7fb955d944 Author: Trond Myklebust Date: Fri May 5 13:02:42 2017 -0400 NFSv4: Fix an rcu lock leak The intention in the original patch was to release the lock when we put the inode, however something got screwed up. Reported-by: Jason Yan Fixes: 7b410d9ce460f ("pNFS: Delay getting the layout header in..") Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Trond Myklebust fs/nfs/callback_proc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 280771252c1bae0947215c59fb9ea6a8d9f8399d Author: Eric Auger Date: Mon Jan 9 16:28:27 2017 +0100 KVM: arm64: vgic-v3: KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES This patch adds a new attribute to GICV3 KVM device KVM_DEV_ARM_VGIC_GRP_CTRL group. This allows userspace to flush all GICR pending tables into guest RAM. Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall Acked-by: Marc Zyngier arch/arm/include/uapi/asm/kvm.h | 1 + arch/arm64/include/uapi/asm/kvm.h | 1 + virt/kvm/arm/vgic/vgic-kvm-device.c | 20 +++++++++++++++ virt/kvm/arm/vgic/vgic-v3.c | 51 +++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic.h | 1 + 5 files changed, 74 insertions(+) commit ccb1d791ab9e9d45be15a779e6a42fc661309af1 Author: Eric Auger Date: Wed Apr 12 14:13:27 2017 +0200 KVM: arm64: vgic-its: Fix pending table sync In its_sync_lpi_pending_table() we currently ignore the target_vcpu of the LPIs. We sync the pending bit found in the vcpu pending table even if the LPI is not targeting it. Also in vgic_its_cmd_handle_invall() we are supposed to read the config table data for the LPIs associated to the collection ID. At the moment we refresh all LPI config information. This patch passes a vpcu to vgic_copy_lpi_list() so that this latter returns a snapshot of the LPIs targeting this CPU and only those. Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall Acked-by: Marc Zyngier virt/kvm/arm/vgic/vgic-its.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit eff484e0298da5a4d18ca82f5454c557fd942af5 Author: Eric Auger Date: Wed May 3 17:38:01 2017 +0200 KVM: arm64: vgic-its: ITT save and restore Implement routines to save and restore device ITT and their interrupt table entries (ITE). Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 116 +++++++++++++++++++++++++++++++++++++++++-- virt/kvm/arm/vgic/vgic.h | 4 ++ 2 files changed, 117 insertions(+), 3 deletions(-) commit 57a9a117154c93539e33161dd318e6aeb8c04efa Author: Eric Auger Date: Mon Jan 9 16:27:07 2017 +0100 KVM: arm64: vgic-its: Device table save/restore This patch saves the device table entries into guest RAM. Both flat table and 2 stage tables are supported. DeviceId indexing is used. For each device listed in the device table, we also save the translation table using the vgic_its_save/restore_itt routines. Those functions will be implemented in a subsequent patch. On restore, devices are re-allocated and their itt are re-built. Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 194 +++++++++++++++++++++++++++++++++++++++++-- virt/kvm/arm/vgic/vgic.h | 10 +++ 2 files changed, 199 insertions(+), 5 deletions(-) commit dceff7025851405412e1a180ddd0cf79c7cbc1d8 Author: Eric Auger Date: Tue Jan 31 14:36:14 2017 +0100 KVM: arm64: vgic-its: vgic_its_check_id returns the entry's GPA As vgic_its_check_id() computes the device/collection entry's GPA, let's return it so that new callers can retrieve it easily. Signed-off-by: Eric Auger Acked-by: Christoffer Dall Acked-by: Marc Zyngier virt/kvm/arm/vgic/vgic-its.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit ea1ad53e1e31a32dcbeae61b8d3d01cccedcffc5 Author: Eric Auger Date: Mon Jan 9 16:19:41 2017 +0100 KVM: arm64: vgic-its: Collection table save/restore The save path copies the collection entries into guest RAM at the GPA specified in the BASER register. This obviously requires the BASER to be set. The last written element is a dummy collection table entry. We do not index by collection ID as the collection entry can fit into 8 bytes while containing the collection ID. On restore path we re-allocate the collection objects. Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall Reviewed-by: Marc Zyngier virt/kvm/arm/vgic/vgic-its.c | 100 ++++++++++++++++++++++++++++++++++++++++++- virt/kvm/arm/vgic/vgic.h | 9 ++++ 2 files changed, 107 insertions(+), 2 deletions(-) commit 920a7a8fa92ae0ec73c4f6d6f15c01f86017f20d Author: Eric Auger Date: Wed Feb 8 05:20:04 2017 +0100 KVM: arm64: vgic-its: Add infrastructure for table lookup Add a generic scan_its_table() helper whose role consists in scanning a contiguous table located in guest RAM and applying a callback on each entry. Entries can be handled as linked lists since the callback may return an id offset to the next entry and also indicate whether the entry is the last one. Helper functions also are added to compute the device/event ID offset to the next DTE/ITE. compute_next_devid_offset, compute_next_eventid_offset and scan_table will become static in subsequent patches Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall Reviewed-by: Marc Zyngier virt/kvm/arm/vgic/vgic-its.c | 92 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) commit 528297f560add8b7cac2f401d6aeb5bb3d1ef345 Author: Eric Auger Date: Sun Dec 25 18:57:54 2016 +0100 KVM: arm64: vgic-its: vgic_its_alloc_ite/device Add two new helpers to allocate an its ite and an its device. This will avoid duplication on restore path. Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall Reviewed-by: Marc Zyngier virt/kvm/arm/vgic/vgic-its.c | 68 ++++++++++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 21 deletions(-) commit 3b65808f4b2914db175a048097956d59ec609e04 Author: Eric Auger Date: Sat Dec 24 18:48:04 2016 +0100 KVM: arm64: vgic-its: KVM_DEV_ARM_ITS_SAVE/RESTORE_TABLES Introduce new attributes in KVM_DEV_ARM_VGIC_GRP_CTRL group: - KVM_DEV_ARM_ITS_SAVE_TABLES: saves the ITS tables into guest RAM - KVM_DEV_ARM_ITS_RESTORE_TABLES: restores them into VGIC internal structures. We hold the vcpus lock during the save and restore to make sure no vcpu is running. At this stage the functionality is not yet implemented. Only the skeleton is put in place. Signed-off-by: Eric Auger [Given we will move the iodev register until setting the base addr] Reviewed-by: Christoffer Dall arch/arm/include/uapi/asm/kvm.h | 4 +- arch/arm64/include/uapi/asm/kvm.h | 4 +- virt/kvm/arm/vgic/vgic-its.c | 107 ++++++++++++++++++++++++++++++++++++-- 3 files changed, 109 insertions(+), 6 deletions(-) commit 06bd5359549d7a0a2759a08f07e3d13a7acc9ecc Author: Eric Auger Date: Thu May 4 11:36:32 2017 +0200 KVM: arm64: vgic-its: Read config and pending bit in add_lpi() When creating the lpi we now ask the redistributor what is the state of the LPI (priority, enabled, pending). Signed-off-by: Eric Auger Reviewed-by: Marc Zyngier Reviewed-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) commit 44de9d683847ba6dbac290bb8c9f1b773cbda746 Author: Eric Auger Date: Thu May 4 11:19:52 2017 +0200 KVM: arm64: vgic-v3: vgic_v3_lpi_sync_pending_status this new helper synchronizes the irq pending_latch with the LPI pending bit status found in rdist pending table. As the status is consumed, we reset the bit in pending table. As we need the PENDBASER_ADDRESS() in vgic-v3, let's move its definition in the irqchip header. We restore the full length of the field, ie [51:16]. Same for PROPBASER_ADDRESS with full field length of [51:12]. Signed-off-by: Eric Auger Reviewed-by: Marc Zyngier Reviewed-by: Christoffer Dall include/linux/irqchip/arm-gic-v3.h | 2 ++ virt/kvm/arm/vgic/vgic-its.c | 6 ++---- virt/kvm/arm/vgic/vgic-v3.c | 44 ++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic.h | 1 + 4 files changed, 49 insertions(+), 4 deletions(-) commit 07a3e9a7b8d2c5b0fa59b281f4480711bea8fa2b Author: Eric Auger Date: Thu Feb 2 14:37:33 2017 +0100 KVM: arm64: vgic-its: Check the device id matches TYPER DEVBITS range On MAPD we currently check the device id can be stored in the device table. Let's first check it can be encoded within the range defined by TYPER DEVBITS. Also check the collection ID belongs to the 16 bit range as GITS_TYPER CIL field equals to 0. Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall Reviewed-by: Marc Zyngier virt/kvm/arm/vgic/vgic-its.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit 7333cefe7b147320debcc64ea41220bdd1dca723 Author: Eric Auger Date: Thu Feb 2 13:45:45 2017 +0100 KVM: arm64: vgic-its: Interpret MAPD ITT_addr field Up to now the MAPD ITT_addr had been ignored. We will need it for save/restore. Let's record it in the its_device struct. Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall Reviewed-by: Marc Zyngier virt/kvm/arm/vgic/vgic-its.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0d44cdb631ef53ea75be056886cf0541311e48df Author: Eric Auger Date: Thu Dec 22 18:14:14 2016 +0100 KVM: arm64: vgic-its: Interpret MAPD Size field and check related errors Up to now the MAPD's ITT size field has been ignored. It encodes the number of eventid bit minus 1. It should be used to check the eventid when a MAPTI command is issued on a device. Let's store the number of eventid bits in the its_device and do the check on MAPTI. Also make sure the ITT size field does not exceed the GITS_TYPER IDBITS field. Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall Reviewed-by: Marc Zyngier include/linux/irqchip/arm-gic-v3.h | 2 ++ virt/kvm/arm/vgic/vgic-its.c | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) commit ab01c6bdacc43c41c6b326889f4358f5afc38bf9 Author: Eric Auger Date: Thu Mar 23 15:14:00 2017 +0100 KVM: arm64: vgic-its: Implement vgic_mmio_uaccess_write_its_iidr The GITS_IIDR revision field is used to encode the migration ABI revision. So we need to restore it to check the table layout is readable by the destination. By writing the IIDR, userspace thus forces the ABI revision to be used and this must be less than or equal to the max revision KVM supports. Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall include/linux/irqchip/arm-gic-v3.h | 5 +++++ virt/kvm/arm/vgic/vgic-its.c | 23 ++++++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) commit 71afe470e20db133b30730cfa856e5d6854312e9 Author: Eric Auger Date: Thu Apr 13 09:06:20 2017 +0200 KVM: arm64: vgic-its: Introduce migration ABI infrastructure We plan to support different migration ABIs, ie. characterizing the ITS table layout format in guest RAM. For example, a new ABI will be needed if vLPIs get supported for nested use case. So let's introduce an array of supported ABIs (at the moment a single ABI is supported though). The following characteristics are foreseen to vary with the ABI: size of table entries, save/restore operation, the way abi settings are applied. By default the MAX_ABI_REV is applied on its creation. In subsequent patches we will introduce a way for the userspace to change the ABI in use. The entry sizes now are set according to the ABI version and not hardcoded anymore. Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall include/kvm/arm_vgic.h | 3 ++ include/linux/irqchip/arm-gic-v3.h | 5 ++ virt/kvm/arm/vgic/vgic-its.c | 93 ++++++++++++++++++++++++++++++++++++-- 3 files changed, 97 insertions(+), 4 deletions(-) commit 0979bfa69421279459b4516542503f1d577d2ec5 Author: Eric Auger Date: Wed Jan 4 11:58:41 2017 +0100 KVM: arm64: vgic-its: Implement vgic_mmio_uaccess_write_its_creadr GITS_CREADR needs to be restored so let's implement the associated uaccess_write_its callback. The write only is allowed if the its is disabled. Signed-off-by: Eric Auger Acked-by: Marc Zyngier Reviewed-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) commit 8331c23c28e8b7f70cb5c25366160d900ab127d7 Author: Eric Auger Date: Tue Dec 20 09:33:13 2016 +0100 KVM: arm64: vgic-its: Implement vgic_its_has_attr_regs and attr_regs_access This patch implements vgic_its_has_attr_regs and vgic_its_attr_regs_access upon the MMIO framework. VGIC ITS KVM device KVM_DEV_ARM_VGIC_GRP_ITS_REGS group becomes functional. At least GITS_CREADR and GITS_IIDR require to differentiate a guest write action from a user access. As such let's introduce a new uaccess_its_write vgic_register_region callback. Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall Reviewed-by: Marc Zyngier virt/kvm/arm/vgic/vgic-its.c | 79 +++++++++++++++++++++++++++++++++++++++++-- virt/kvm/arm/vgic/vgic-mmio.h | 9 +++-- 2 files changed, 84 insertions(+), 4 deletions(-) commit dfc99f85c0a554b2885824654b1fc235bc4f9be9 Author: Eric Auger Date: Thu Mar 23 11:51:52 2017 +0100 KVM: arm/arm64: vgic: expose (un)lock_all_vcpus We need to use those helpers in vgic-its.c so let's expose them in the private vgic header. Signed-off-by: Eric Auger Acked-by: Marc Zyngier Acked-by: Christoffer Dall virt/kvm/arm/vgic/vgic-kvm-device.c | 4 ++-- virt/kvm/arm/vgic/vgic.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) commit 876ae234cb5e908c12c60562295cd633eac687bb Author: Eric Auger Date: Tue Dec 20 01:36:35 2016 -0500 KVM: arm64: vgic-its: KVM_DEV_ARM_VGIC_GRP_ITS_REGS group The ITS KVM device exposes a new KVM_DEV_ARM_VGIC_GRP_ITS_REGS group which allows the userspace to save/restore ITS registers. At this stage the get/set/has operations are not yet implemented. Signed-off-by: Eric Auger Reviewed-by: Andre Przywara Reviewed-by: Christoffer Dall Acked-by: Marc Zyngier arch/arm/include/uapi/asm/kvm.h | 1 + arch/arm64/include/uapi/asm/kvm.h | 1 + virt/kvm/arm/vgic/vgic-its.c | 36 +++++++++++++++++++++++++++++++++++- 3 files changed, 37 insertions(+), 1 deletion(-) commit 4b7171ac564786247a49eedc59d3060bddf2377c Author: Eric Auger Date: Tue Dec 20 09:20:00 2016 +0100 arm/arm64: vgic: turn vgic_find_mmio_region into public We plan to use vgic_find_mmio_region in vgic-its.c so let's turn it into a public function. Also let's take the opportunity to rename the region parameter into regions to emphasize this latter is an array of regions. Signed-off-by: Eric Auger Reviewed-by: Andre Przywara Acked-by: Marc Zyngier Acked-by: Christoffer Dall virt/kvm/arm/vgic/vgic-mmio.c | 11 +++++------ virt/kvm/arm/vgic/vgic-mmio.h | 5 +++++ 2 files changed, 10 insertions(+), 6 deletions(-) commit 9ce91c7234ff477c805c3dec7cf54716193c7a48 Author: Eric Auger Date: Wed Feb 8 06:09:29 2017 +0100 KVM: arm/arm64: vgic-its: rename itte into ite The actual abbreviation for the interrupt translation table entry is ITE. Let's rename all itte instances by ite. Signed-off-by: Eric Auger Acked-by: Marc Zyngier Acked-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 148 +++++++++++++++++++++---------------------- 1 file changed, 74 insertions(+), 74 deletions(-) commit 100e62983ef3a012e62e0e7116035529a286c1ec Author: Eric Auger Date: Fri Apr 14 10:18:12 2017 +0200 KVM: arm/arm64: Add GICV3 pending table save API documentation Add description for how to save GICV3 LPI pending bit into guest RAM pending tables. Signed-off-by: Eric Auger Acked-by: Christoffer Dall Acked-by: Marc Zyngier Documentation/virtual/kvm/devices/arm-vgic-v3.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit de2a0910795d44d6534e0fe83c571c1bbbe05808 Author: Eric Auger Date: Mon Jan 9 14:59:24 2017 +0100 KVM: arm/arm64: Add ITS save/restore API documentation Add description for how to access ITS registers and how to save/restore ITS tables into/from memory. Reviewed-by: Christoffer Dall Signed-off-by: Eric Auger Documentation/virtual/kvm/devices/arm-vgic-its.txt | 120 +++++++++++++++++++++ 1 file changed, 120 insertions(+) commit 6406c91943a0f29b6e8786921aaa038663e08055 Author: Johannes Berg Date: Tue May 2 09:33:40 2017 +0200 cfg80211: fix multi scheduled scan kernel-doc Replace @results_wk with @report_results, which was missed in an earlier patch between revisions thereof. Fixes: b34939b98369 ("cfg80211: add request id to cfg80211_sched_scan_*() api") Signed-off-by: Johannes Berg Acked-by: Arend van Spriel Signed-off-by: Johannes Berg include/net/cfg80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c5ab3f395d66a9e4e937fcfdf6ebc63894f028b Author: Julian Anastasov Date: Sat Apr 29 20:33:09 2017 +0300 ipvs: SNAT packet replies only for NATed connections We do not check if packet from real server is for NAT connection before performing SNAT. This causes problems for setups that use DR/TUN and allow local clients to access the real server directly, for example: - local client in director creates IPVS-DR/TUN connection CIP->VIP and the request packets are routed to RIP. Talks are finished but IPVS connection is not expired yet. - second local client creates non-IPVS connection CIP->RIP with same reply tuple RIP->CIP and when replies are received on LOCAL_IN we wrongly assign them for the first client connection because RIP->CIP matches the reply direction. As result, IPVS SNATs replies for non-IPVS connections. The problem is more visible to local UDP clients but in rare cases it can happen also for TCP or remote clients when the real server sends the reply traffic via the director. So, better to be more precise for the reply traffic. As replies are not expected for DR/TUN connections, better to not touch them. Reported-by: Nick Moriarty Tested-by: Nick Moriarty Signed-off-by: Julian Anastasov Signed-off-by: Simon Horman net/netfilter/ipvs/ip_vs_core.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit f1f3e9e2a50a70de908f9dfe0d870e9cdc67e042 Author: Johannes Berg Date: Thu Apr 27 13:19:04 2017 +0200 mac80211: fix IBSS presp allocation size When VHT IBSS support was added, the size of the extra elements wasn't considered in ieee80211_ibss_build_presp(), which makes it possible that it would overrun the allocated buffer. Fix it by allocating the necessary space. Fixes: abcff6ef01f9 ("mac80211: add VHT support for IBSS") Reported-by: Shaul Triebitz Signed-off-by: Johannes Berg net/mac80211/ibss.c | 2 ++ 1 file changed, 2 insertions(+) commit 4954601f821bb5afd4dd59b57bf801adf4924bbd Author: Johannes Berg Date: Thu Apr 27 09:13:38 2017 +0200 nl80211: correctly validate MU-MIMO groups Since groups 0 and 63 are invalid, we should check for those bits. Note that the 802.11 spec specifies the *bit* order, but the CPU doesn't care about bit order since it can't address bits, so it's always treating BIT(0) as the lowest bit within a byte. Reported-by: Jan Fuchs Signed-off-by: Johannes Berg net/wireless/nl80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f8860ce836f2d502b07ef99559707fe55d90f5bc Author: Luca Coelho Date: Tue May 2 17:56:21 2017 +0300 mac80211: bail out from prep_connection() if a reconfig is ongoing If ieee80211_hw_restart() is called during authentication, the authentication process will continue, causing the driver to be called in a wrong state. This ultimately causes an oops in the iwlwifi driver (at least). This fixes bugzilla 195299 partly. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195299 Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/mlme.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7f1e614113ffe75f5ea7c99f641bf1b56f85be03 Author: Ley Foon Tan Date: Mon May 8 17:14:14 2017 +0800 nios2: use generic strncpy_from_user() and strnlen_user() This change enables the generic strncpy_from_user() and strnlen_user() Signed-off-by: Ley Foon Tan arch/nios2/Kconfig | 2 ++ arch/nios2/include/asm/uaccess.h | 7 +++++-- arch/nios2/mm/uaccess.c | 33 --------------------------------- 3 files changed, 7 insertions(+), 35 deletions(-) commit 2f242bf45370b8ea44f209b22c3c90984655a102 Author: Johannes Berg Date: Fri May 5 11:53:19 2017 +0200 mac80211: properly remove RX_ENC_FLAG_40MHZ Somehow I missed this in my RX rate cleanup series, causing some drivers to not report correct bandwidth since this flag isn't used by mac80211 anymore. Fix this, and make hwsim also report higher bandwidths appropriately. Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath9k/ar9003_mac.c | 2 +- drivers/net/wireless/ath/ath9k/mac.c | 4 ++-- drivers/net/wireless/intel/iwlegacy/4965-mac.c | 4 +++- drivers/net/wireless/intel/iwlwifi/dvm/rx.c | 4 +++- drivers/net/wireless/mac80211_hwsim.c | 8 +++++++- include/net/mac80211.h | 2 -- 6 files changed, 16 insertions(+), 8 deletions(-) commit edebea98777d7090ea14bdce2e38e6798557729d Author: Marek Vasut Date: Wed Apr 19 13:19:02 2017 +0200 nios2: Add CDX support Add support for the CDX Code Density Extensions present in Nios II R2 . This introduces new 16bit instruction set to improve code density while retaining support for the 32bit Nios II R2 instructions. Signed-off-by: Marek Vasut Cc: Ley Foon Tan arch/nios2/Makefile | 1 + arch/nios2/include/asm/cpuinfo.h | 1 + arch/nios2/kernel/cpuinfo.c | 10 ++++++++-- arch/nios2/platform/Kconfig.platform | 9 +++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) commit 23460839b983d5d8d47fe90f341599f66523dd81 Author: Marek Vasut Date: Wed Apr 19 13:19:01 2017 +0200 nios2: Add BMX support Add support for the BMX Bit Manipulation Extensions present in Nios II R2 . This introduces three new instructions, EXTRACT, INSERT and MERGE. Signed-off-by: Marek Vasut Cc: Ley Foon Tan arch/nios2/Makefile | 1 + arch/nios2/include/asm/cpuinfo.h | 1 + arch/nios2/kernel/cpuinfo.c | 10 ++++++++-- arch/nios2/platform/Kconfig.platform | 9 +++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) commit a89988a6e00c5a099ee23619cd91dc8dc7ec9328 Author: Marek Vasut Date: Wed Apr 19 13:19:00 2017 +0200 nios2: Add NIOS2_ARCH_REVISION to select between R1 and R2 Allow user to select between Nios2 R1 and R2. Since R1 and R2 are not binary compatible, we cannot have a single kernel binary and there is no point in having DT property for discerning these two. Signed-off-by: Marek Vasut Cc: Ley Foon Tan arch/nios2/Makefile | 3 +++ arch/nios2/kernel/cpuinfo.c | 2 ++ arch/nios2/platform/Kconfig.platform | 8 ++++++++ 3 files changed, 13 insertions(+) commit 4b40c1c092a932b5b5ab8154235080f02ae19a34 Author: Julien Beraud Date: Wed Apr 5 15:03:44 2017 +0800 nios2: implement flush_dcache_mmap_lock/unlock Use spin_lock/unlock_irq instead of doing nothing. This fixes corruptions of the vma_interval_tree causing the kernel to be stuck in an infinite loop in vma_interval_tree_foreach. Signed-off-by: Julien Beraud Acked-by: Ley Foon Tan arch/nios2/include/asm/cacheflush.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 44a4ed42576da5f3387005a1667cb3e7aedfd687 Author: Tobias Klauser Date: Sun Apr 2 20:09:04 2017 -0700 nios2: enable earlycon support Enable generic earlycon support for nios2. This e.g. allows to use a 8250/16650 UART as earlycon. In order to get the earlycon, we just need to call parse_early_param() in early_init_devtree() as soon as the device tree is initially scanned. By adding an stdout-path property to the dts (done in this patch for 10m50_devboard), the earlycon can be used. In order to provide early printk support, we need to provide a dummy implementation of early_console_write(), so that arch/nios2/kernel/early_printk.c can still be compiled if neither SERIAL_ALTERA_JTAGUART_CONSOLE nor SERIAL_ALTERA_UART_CONSOLE is selected. As soon as the altera_uart and altera_jtaguart support earlycon, the entire file can be removed. Tested-by: Guenter Roeck Signed-off-by: Tobias Klauser Acked-by: Ley Foon Tan arch/nios2/Kconfig.debug | 1 - arch/nios2/boot/dts/10m50_devboard.dts | 3 ++- arch/nios2/kernel/early_printk.c | 7 +++++-- arch/nios2/kernel/setup.c | 2 ++ 4 files changed, 9 insertions(+), 4 deletions(-) commit 57ac76ed6c0daf02c520e09e0af421f02ee2de8b Author: Tobias Klauser Date: Sun Apr 2 20:08:52 2017 -0700 nios2: constify irq_domain_ops struct irq_domain_ops is not modified, so it can be made const. Signed-off-by: Tobias Klauser Acked-by: Ley Foon Tan arch/nios2/kernel/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f679b311f0683be352cb73b28d7108eed79ef795 Author: Tobias Klauser Date: Sun Apr 2 20:08:40 2017 -0700 nios2: remove wrapper header for cmpxchg.h Since commit 713e9b802e21 ("nios2: Switch to generic __xchg()") asm/cmpxchg.h for nios2 is merely including asm-generic/cmpxchg.h. Thus, the wrapper can be omitted and the generic header can be used directly. Signed-off-by: Tobias Klauser Acked-by: Ley Foon Tan arch/nios2/include/asm/Kbuild | 1 + arch/nios2/include/asm/cmpxchg.h | 14 -------------- 2 files changed, 1 insertion(+), 14 deletions(-) commit 6852aa0263cdc4d43ab8e23735e6e0973cadeb63 Author: Tobias Klauser Date: Sun Apr 2 20:08:29 2017 -0700 nios2: add .gitignore entries for auto-generated files Add .gitignore entries for nios2 specific files generated during the build process. Signed-off-by: Tobias Klauser Acked-by: Ley Foon Tan arch/nios2/boot/.gitignore | 2 ++ arch/nios2/kernel/.gitignore | 1 + 2 files changed, 3 insertions(+) commit c3123d6adb715de12fb366a55c1dedc6aabd94b0 Author: Florin Tudorache Date: Fri May 5 19:40:06 2017 +0000 ALSA: hda - Add mute led support for HP EliteBook 840 G3 Signed-off-by: Florin Tudorache Signed-off-by: Takashi Iwai sound/pci/hda/patch_conexant.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2345ab1df8a9aa3cdca942142b48eb141faeb1c3 Author: Chuanxiao Dong Date: Mon May 8 09:27:39 2017 +0800 drm/i915/gvt: not to restore in-context mmio Needn't to restore the in-context MMIO when SCHEDULE_OUT. Sometimes with restoring the in-context MMIO, some GPU hang can be observed. So remove the in-context MMIO restore Signed-off-by: Chuanxiao Dong Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/render.c | 3 +++ 1 file changed, 3 insertions(+) commit 2c1497bbc8fdee897341ab48ee9c9209b421b8c0 Author: Ilan Tayari Date: Mon May 8 10:30:18 2017 +0300 xfrm: Fix NETDEV_DOWN with IPSec offload Upon NETDEV_DOWN event, all xfrm_state objects which are bound to the device are flushed. The condition for this is wrong, though, testing dev->hw_features instead of dev->features. If a device has non-user-modifiable NETIF_F_HW_ESP, then its xfrm_state objects are not flushed, causing a crash later on after the device is deleted. Check dev->features instead of dev->hw_features. Fixes: d77e38e612a0 ("xfrm: Add an IPsec hardware offloading API") Signed-off-by: Ilan Tayari Signed-off-by: Steffen Klassert net/xfrm/xfrm_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8638100c52bb7782462b14aad102a4aaf0c7094c Author: Xunlei Pang Date: Thu May 4 09:42:51 2017 +0800 x86/kexec/64: Use gbpages for identity mappings if available Kexec sets up all identity mappings before booting into the new kernel, and this will cause extra memory consumption for paging structures which is quite considerable on modern machines with huge memory sizes. E.g. on a 32TB machine that is kdumping, it could waste around 128MB (around 4MB/TB) from the reserved memory after kexec sets all the identity mappings using the current 2MB page. Add to that the memory needed for the loaded kdump kernel, initramfs, etc., and it causes a kexec syscall -NOMEM failure. As a result, we had to enlarge reserved memory via "crashkernel=X" to work around this problem. This causes some trouble for distributions that use policies to evaluate the proper "crashkernel=X" value for users. So enable gbpages for kexec mappings. Signed-off-by: Xunlei Pang Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Young Cc: Denys Vlasenko Cc: Eric Biederman Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yinghai Lu Cc: akpm@linux-foundation.org Cc: kexec@lists.infradead.org Link: http://lkml.kernel.org/r/1493862171-8799-2-git-send-email-xlpang@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/machine_kexec_64.c | 4 ++++ 1 file changed, 4 insertions(+) commit 66aad4fdf2bf0af29c7decb4433dc5ec6c7c5451 Author: Xunlei Pang Date: Thu May 4 09:42:50 2017 +0800 x86/mm: Add support for gbpages to kernel_ident_mapping_init() Kernel identity mappings on x86-64 kernels are created in two ways: by the early x86 boot code, or by kernel_ident_mapping_init(). Native kernels (which is the dominant usecase) use the former, but the kexec and the hibernation code uses kernel_ident_mapping_init(). There's a subtle difference between these two ways of how identity mappings are created, the current kernel_ident_mapping_init() code creates identity mappings always using 2MB page(PMD level) - while the native kernel boot path also utilizes gbpages where available. This difference is suboptimal both for performance and for memory usage: kernel_ident_mapping_init() needs to allocate pages for the page tables when creating the new identity mappings. This patch adds 1GB page(PUD level) support to kernel_ident_mapping_init() to address these concerns. The primary advantage would be better TLB coverage/performance, because we'd utilize 1GB TLBs instead of 2MB ones. It is also useful for machines with large number of memory to save paging structure allocations(around 4MB/TB using 2MB page) when setting identity mappings for all the memory, after using 1GB page it will consume only 8KB/TB. ( Note that this change alone does not activate gbpages in kexec, we are doing that in a separate patch. ) Signed-off-by: Xunlei Pang Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Young Cc: Denys Vlasenko Cc: Eric Biederman Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yinghai Lu Cc: akpm@linux-foundation.org Cc: kexec@lists.infradead.org Link: http://lkml.kernel.org/r/1493862171-8799-1-git-send-email-xlpang@redhat.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/pagetable.c | 2 +- arch/x86/include/asm/init.h | 3 ++- arch/x86/kernel/machine_kexec_64.c | 2 +- arch/x86/mm/ident_map.c | 14 +++++++++++++- arch/x86/power/hibernate_64.c | 2 +- 5 files changed, 18 insertions(+), 5 deletions(-) commit d90c902449a7561f1b1d58ba5a0d11728ce8b0b2 Author: Steffen Klassert Date: Fri May 5 07:40:42 2017 +0200 af_key: Fix slab-out-of-bounds in pfkey_compile_policy. The sadb_x_sec_len is stored in the unit 'byte divided by eight'. So we have to multiply this value by eight before we can do size checks. Otherwise we may get a slab-out-of-bounds when we memcpy the user sec_ctx. Fixes: df71837d502 ("[LSM-IPSec]: Security association restriction.") Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Steffen Klassert net/key/af_key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 629b1b2e0e6c8285fdc21624af60e8190fa4417e Author: Geert Uytterhoeven Date: Sun May 7 16:14:44 2017 +0200 lightnvm: remove unused rq parameter of nvme_nvm_rqtocmd() to kill warning With gcc 4.1.2: drivers/nvme/host/lightnvm.c: In function ‘nvme_nvm_submit_io’: drivers/nvme/host/lightnvm.c:498: warning: ‘rq’ is used uninitialized in this function Indeed, since commit 2e13f33a2464fc3a ("lightnvm: create cmd before allocating request"), the request is passed to nvme_nvm_rqtocmd() before it is allocated. Fortunately, as of commit 91276162de9476b8 ("lightnvm: refactor end_io functions for sync"), nvme_nvm_rqtocmd () no longer uses the passed request, so this warning is a false positive. Drop the unused parameter to clean up the code and kill the warning. Fixes: 2e13f33a2464fc3a ("lightnvm: create cmd before allocating request") Fixes: 91276162de9476b8 ("lightnvm: refactor end_io functions for sync") Signed-off-by: Geert Uytterhoeven Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 51d638b1f56a0bfd9219800620994794a1a2b219 Author: Wanpeng Li Date: Sun May 7 00:14:22 2017 -0700 block/mq: fix potential deadlock during cpu hotplug This can be triggered by hot-unplug one cpu. ====================================================== [ INFO: possible circular locking dependency detected ] 4.11.0+ #17 Not tainted ------------------------------------------------------- step_after_susp/2640 is trying to acquire lock: (all_q_mutex){+.+...}, at: [] blk_mq_queue_reinit_work+0x18/0x110 but task is already holding lock: (cpu_hotplug.lock){+.+.+.}, at: [] cpu_hotplug_begin+0x7f/0xe0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (cpu_hotplug.lock){+.+.+.}: lock_acquire+0x11c/0x230 __mutex_lock+0x92/0x990 mutex_lock_nested+0x1b/0x20 get_online_cpus+0x64/0x80 blk_mq_init_allocated_queue+0x3a0/0x4e0 blk_mq_init_queue+0x3a/0x60 loop_add+0xe5/0x280 loop_init+0x124/0x177 do_one_initcall+0x53/0x1c0 kernel_init_freeable+0x1e3/0x27f kernel_init+0xe/0x100 ret_from_fork+0x31/0x40 -> #0 (all_q_mutex){+.+...}: __lock_acquire+0x189a/0x18a0 lock_acquire+0x11c/0x230 __mutex_lock+0x92/0x990 mutex_lock_nested+0x1b/0x20 blk_mq_queue_reinit_work+0x18/0x110 blk_mq_queue_reinit_dead+0x1c/0x20 cpuhp_invoke_callback+0x1f2/0x810 cpuhp_down_callbacks+0x42/0x80 _cpu_down+0xb2/0xe0 freeze_secondary_cpus+0xb6/0x390 suspend_devices_and_enter+0x3b3/0xa40 pm_suspend+0x129/0x490 state_store+0x82/0xf0 kobj_attr_store+0xf/0x20 sysfs_kf_write+0x45/0x60 kernfs_fop_write+0x135/0x1c0 __vfs_write+0x37/0x160 vfs_write+0xcd/0x1d0 SyS_write+0x58/0xc0 do_syscall_64+0x8f/0x710 return_from_SYSCALL_64+0x0/0x7a other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(cpu_hotplug.lock); lock(all_q_mutex); lock(cpu_hotplug.lock); lock(all_q_mutex); *** DEADLOCK *** 8 locks held by step_after_susp/2640: #0: (sb_writers#6){.+.+.+}, at: [] vfs_write+0x1ad/0x1d0 #1: (&of->mutex){+.+.+.}, at: [] kernfs_fop_write+0x101/0x1c0 #2: (s_active#166){.+.+.+}, at: [] kernfs_fop_write+0x109/0x1c0 #3: (pm_mutex){+.+...}, at: [] pm_suspend+0x21d/0x490 #4: (acpi_scan_lock){+.+.+.}, at: [] acpi_scan_lock_acquire+0x17/0x20 #5: (cpu_add_remove_lock){+.+.+.}, at: [] freeze_secondary_cpus+0x27/0x390 #6: (cpu_hotplug.dep_map){++++++}, at: [] cpu_hotplug_begin+0x5/0xe0 #7: (cpu_hotplug.lock){+.+.+.}, at: [] cpu_hotplug_begin+0x7f/0xe0 stack backtrace: CPU: 3 PID: 2640 Comm: step_after_susp Not tainted 4.11.0+ #17 Hardware name: Dell Inc. OptiPlex 7040/0JCTF8, BIOS 1.4.9 09/12/2016 Call Trace: dump_stack+0x99/0xce print_circular_bug+0x1fa/0x270 __lock_acquire+0x189a/0x18a0 lock_acquire+0x11c/0x230 ? lock_acquire+0x11c/0x230 ? blk_mq_queue_reinit_work+0x18/0x110 ? blk_mq_queue_reinit_work+0x18/0x110 __mutex_lock+0x92/0x990 ? blk_mq_queue_reinit_work+0x18/0x110 ? kmem_cache_free+0x2cb/0x330 ? anon_transport_class_unregister+0x20/0x20 ? blk_mq_queue_reinit_work+0x110/0x110 mutex_lock_nested+0x1b/0x20 ? mutex_lock_nested+0x1b/0x20 blk_mq_queue_reinit_work+0x18/0x110 blk_mq_queue_reinit_dead+0x1c/0x20 cpuhp_invoke_callback+0x1f2/0x810 ? __flow_cache_shrink+0x160/0x160 cpuhp_down_callbacks+0x42/0x80 _cpu_down+0xb2/0xe0 freeze_secondary_cpus+0xb6/0x390 suspend_devices_and_enter+0x3b3/0xa40 ? rcu_read_lock_sched_held+0x79/0x80 pm_suspend+0x129/0x490 state_store+0x82/0xf0 kobj_attr_store+0xf/0x20 sysfs_kf_write+0x45/0x60 kernfs_fop_write+0x135/0x1c0 __vfs_write+0x37/0x160 ? rcu_read_lock_sched_held+0x79/0x80 ? rcu_sync_lockdep_assert+0x2f/0x60 ? __sb_start_write+0xd9/0x1c0 ? vfs_write+0x1ad/0x1d0 vfs_write+0xcd/0x1d0 SyS_write+0x58/0xc0 ? rcu_read_lock_sched_held+0x79/0x80 do_syscall_64+0x8f/0x710 ? trace_hardirqs_on_thunk+0x1a/0x1c entry_SYSCALL64_slow_path+0x25/0x25 The cpu hotplug path will hold cpu_hotplug.lock and then reinit all exiting queues for blk mq w/ all_q_mutex, however, blk_mq_init_allocated_queue() will contend these two locks in the inversion order. This is due to commit eabe06595d62 (blk/mq: Cure cpu hotplug lock inversion), it fixes a cpu hotplug lock inversion issue because of hotplug rework, however the hotplug rework is still work-in-progress and lives in a -tip branch and mainline cannot yet trigger that splat. The commit breaks the linus's tree in the merge window, so this patch reverts the lock order and avoids to splat linus's tree. Cc: Jens Axboe Cc: Peter Zijlstra (Intel) Cc: Thomas Gleixner Signed-off-by: Wanpeng Li Signed-off-by: Jens Axboe block/blk-mq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bd2c52d733f126ff75f99c537a27655b2db07e28 Author: Bart Van Assche Date: Thu May 4 15:50:54 2017 -0700 IB/srpt: Avoid that aborting a command triggers a kernel warning Avoid that the following warning is triggered: WARNING: CPU: 10 PID: 166 at ../drivers/infiniband/ulp/srpt/ib_srpt.c:2674 srpt_release_cmd+0x139/0x140 [ib_srpt] CPU: 10 PID: 166 Comm: kworker/u24:8 Not tainted 4.9.4-1-default #1 Workqueue: tmr-fileio target_tmr_work [target_core_mod] Call Trace: [] dump_stack+0x63/0x83 [] __warn+0xcb/0xf0 [] warn_slowpath_null+0x1d/0x20 [] srpt_release_cmd+0x139/0x140 [ib_srpt] [] target_release_cmd_kref+0xb7/0x120 [target_core_mod] [] target_put_sess_cmd+0x2f/0x60 [target_core_mod] [] core_tmr_lun_reset+0x340/0x790 [target_core_mod] [] target_tmr_work+0xe6/0x140 [target_core_mod] [] process_one_work+0x1f3/0x4d0 [] worker_thread+0x48/0x4e0 [] ? process_one_work+0x4d0/0x4d0 [] kthread+0xca/0xe0 [] ? kthread_park+0x60/0x60 [] ret_from_fork+0x25/0x30 Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Doug Ledford Cc: Christoph Hellwig Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/srpt/ib_srpt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 55d694275f41a1c0eef4ef49044ff29bc3999490 Author: Bart Van Assche Date: Thu May 4 15:50:53 2017 -0700 IB/srpt: Fix abort handling Let the target core check the CMD_T_ABORTED flag instead of the SRP target driver. Hence remove the transport_check_aborted_status() call. Since state == SRPT_STATE_CMD_RSP_SENT is something that really should not happen, do not try to recover if srpt_queue_response() is called for an I/O context that is in that state. This patch is a bug fix because the srpt_abort_cmd() call is misplaced - if that function is called from srpt_queue_response() it should either be called before the command state is changed or after the response has been sent. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Doug Ledford Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp Signed-off-by: Nicholas Bellinger drivers/infiniband/ulp/srpt/ib_srpt.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 59ac9c078141b8fd0186c0b18660a1b2c24e724e Author: Bart Van Assche Date: Thu May 4 15:50:47 2017 -0700 target/fileio: Fix zero-length READ and WRITE handling This patch fixes zero-length READ and WRITE handling in target/FILEIO, which was broken a long time back by: Since: commit d81cb44726f050d7cf1be4afd9cb45d153b52066 Author: Paolo Bonzini Date: Mon Sep 17 16:36:11 2012 -0700 target: go through normal processing for all zero-length commands which moved zero-length READ and WRITE completion out of target-core, to doing submission into backend driver code. To address this, go ahead and invoke target_complete_cmd() for any non negative return value in fd_do_rw(). Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp Cc: # v3.7+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f55813b4d8bfc9f35fda87bc1e21b7f26835fc5c Author: Masahiro Yamada Date: Thu May 4 10:14:57 2017 +0900 kbuild: dtbinst: remove unnecessary __dtbs_install_prep target Since commit 5399eb9b3908 ("dtbsinstall: don't move target directory out of the way"), the target __dtbs_install_prep is invoked just for creating the install directory, but all the necessary directories are automatically created by: cmd_dtb_install = mkdir -p $(2); cp $< $(2) Signed-off-by: Masahiro Yamada scripts/Makefile.dtbinst | 8 -------- 1 file changed, 8 deletions(-) commit 4706aa075662fe3cad29c3f49b50878de53f4f3b Author: Benjamin Valentin Date: Sun May 7 14:49:09 2017 -0700 Input: xpad - add USB IDs for Mad Catz Brawlstick and Razer Sabertooth Add USB IDs for two more Xbox 360 controllers. I found them in the pull requests for the xboxdrv userspace driver, which seems abandoned. Thanks to psychogony and mkaito for reporting the IDs there! Signed-off-by: Benjamin Valentin Reviewed-by: Cameron Gutman Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 2 ++ 1 file changed, 2 insertions(+) commit 44bc722593201da43862b7200ee0b98155410b07 Author: Benjamin Valentin Date: Sun May 7 14:48:14 2017 -0700 Input: xpad - sync supported devices with xboxdrv The userspace xboxdrv driver [0] contains some USB IDs unknown to the kernel driver. I have created a simple script [1] to extract the missing devices and add them to xpad. A quick google search confirmed that all the new devices called Fightstick/pad are Arcade-type devices [2] where the MAP_TRIGGERS_TO_BUTTONS option should apply. There are some similar devices in the existing device table where this flag is not set, but I did refrain from changing those. [0] https://github.com/xboxdrv/xboxdrv/blob/stable/src/xpad_device.cpp [1] http://codepad.org/CHV98BNH [2] https://www.google.com/search?q=SFxT+Fightstick+Pro&tbm=isch Signed-off-by: Benjamin Valentin Reviewed-by: Cameron Gutman Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 873cb582738fde338ecaeaca594560cde2ba42c3 Author: Benjamin Valentin Date: Sun May 7 14:45:08 2017 -0700 Input: xpad - sort supported devices by USB ID Some entries in the table of supported devices are out of order. To not create a mess when adding new ones using a script, sort them first. Signed-off-by: Benjamin Valentin Reviewed-by: Cameron Gutman Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1c005f9c129201121ef90bde57c374a4403ccfa6 Author: Javier Martinez Canillas Date: Fri Apr 28 00:22:15 2017 -0400 MAINTAINERS: Remove Javier Martinez Canillas as reviewer for Exynos I left Samsung and lost access to most Exynos hardware and documentation. Also, I likely won't be able to keep an eye on the platform anymore in the short term so remove myself as a reviewer for Exynos. Signed-off-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 2a4e669dd611855d89d938063c10f44cb67ce65d Merge: 062b1c1 fbe22d2 Author: Max Filippov Date: Sun May 7 10:39:03 2017 -0700 Merge branch 'xtensa-sim-params' into xtensa-fixes commit f35327f16b0cbe51d47a366aaf5dd9a3d4fac01b Author: Eduardo Molinas Date: Mon May 1 18:45:59 2017 -0400 iio: adc: sun4i-gpadc-iio: Fix module autoload when OF devices are registered If the driver is built as a module, it won't be autloaded if the devices are registered via OF code because the OF device table entries are not exported as aliases Before the patch: $ modinfo drivers/iio/adc/sun4i-gpadc-iio.ko | grep alias alias: platform:sun6i-a31-gpadc-iio alias: platform:sun5i-a13-gpadc-iio alias: platform:sun4i-a10-gpadc-iio After the patch: $ modinfo drivers/iio/adc/sun4i-gpadc-iio.ko | grep alias alias: of:N*T*Callwinner,sun8i-a33-thsC* alias: of:N*T*Callwinner,sun8i-a33-ths alias: platform:sun6i-a31-gpadc-iio alias: platform:sun5i-a13-gpadc-iio alias: platform:sun4i-a10-gpadc-iio Signed-off-by: Eduardo Molinas Signed-off-by: Jonathan Cameron drivers/iio/adc/sun4i-gpadc-iio.c | 1 + 1 file changed, 1 insertion(+) commit f83e36e0a372c012a31d57e9d3e69d29a158264e Author: Eduardo Molinas Date: Mon May 1 18:45:58 2017 -0400 iio: adc: sun4i-gpadc-iio: Fix module autoload when PLATFORM devices are registered If the driver is built as a module, it won't be autloaded if the devices are registered via PLATFORM code because the PLATFORM device table entries are not exported as aliases Before the patch: $ modinfo drivers/iio/adc/sun4i-gpadc-iio.ko | grep alias $ After the patch: $ modinfo drivers/iio/adc/sun4i-gpadc-iio.ko | grep alias alias: platform:sun6i-a31-gpadc-iio alias: platform:sun5i-a13-gpadc-iio alias: platform:sun4i-a10-gpadc-iio Signed-off-by: Eduardo Molinas Acked-by: Chen-Yu Tsai Signed-off-by: Jonathan Cameron drivers/iio/adc/sun4i-gpadc-iio.c | 1 + 1 file changed, 1 insertion(+) commit 9122b54f266ddee09654fe3fbc503c1a60f4a01c Author: Matt Ranostay Date: Thu May 4 17:32:19 2017 -0700 iio: proximity: as3935: fix iio_trigger_poll issue Using iio_trigger_poll() can oops when multiple interrupts happen before the first is handled. Use iio_trigger_poll_chained() instead and use the timestamp when processed, since it will be in theory be 2 ms max latency. Fixes: 24ddb0e4bba4 ("iio: Add AS3935 lightning sensor support") Cc: stable@vger.kernel.org Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/proximity/as3935.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 60854a12d281e2fa25662fa32ac8022bbff17432 Author: Kees Cook Date: Fri May 5 21:51:16 2017 -0700 x86/boot: Declare error() as noreturn The compressed boot function error() is used to halt execution, but it wasn't marked with "noreturn". This fixes that in preparation for supporting kernel FORTIFY_SOURCE, which uses the noreturn annotation on panic, and calls error(). GCC would warn about a noreturn function calling a non-noreturn function: arch/x86/boot/compressed/misc.c: In function ‘fortify_panic’: arch/x86/boot/compressed/misc.c:416:1: warning: ‘noreturn’ function does return } ^ Signed-off-by: Kees Cook Cc: Daniel Micay Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: H. Peter Anvin Link: http://lkml.kernel.org/r/20170506045116.GA2879@beast Signed-off-by: Ingo Molnar arch/x86/boot/compressed/error.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 13e0988140374123bead1dd27c287354cb95108e Author: Max Filippov Date: Sat May 6 15:39:25 2017 -0700 docs: complete bumping minimal GNU Make version to 3.81 Commit 37d69ee30808 ("docs: bump minimal GNU Make version to 3.81") changes one entry of GNU make version in the changes.rst, there's still one more entry saying that one need version 3.80. Fix that. Signed-off-by: Max Filippov Signed-off-by: Linus Torvalds Documentation/process/changes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe7a719b30dfdb4d55680461954b99b257ebe671 Merge: d484467 85435d7 Author: Linus Torvalds Date: Sat May 6 11:51:46 2017 -0700 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Various fixes for stable for CIFS/SMB3 especially for better interoperability for SMB3 to Macs. It also includes Pavel's improvements to SMB3 async i/o support (which is much faster now)" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: CIFS: add misssing SFM mapping for doublequote SMB3: Work around mount failure when using SMB3 dialect to Macs cifs: fix CIFS_IOC_GET_MNT_INFO oops CIFS: fix mapping of SFM_SPACE and SFM_PERIOD CIFS: fix oplock break deadlocks cifs: fix CIFS_ENUMERATE_SNAPSHOTS oops cifs: fix leak in FSCTL_ENUM_SNAPS response handling Set unicode flag on cifs echo request to avoid Mac error CIFS: Add asynchronous write support through kernel AIO CIFS: Add asynchronous read support through kernel AIO CIFS: Add asynchronous context to support kernel AIO cifs: fix IPv6 link local, with scope id, address parsing cifs: small underflow in cnvrtDosUnixTm() commit d484467c860dab3e17893d23b2238e1f581460fa Merge: 044f1da 161f55e Author: Linus Torvalds Date: Sat May 6 11:46:16 2017 -0700 Merge tag 'xfs-4.12-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs updates from Darrick Wong: "Here are the XFS changes for 4.12. The big new feature for this release is the new space mapping ioctl that we've been discussing since LSF2016, but other than that most of the patches are larger bug fixes, memory corruption prevention, and other cleanups. Summary: - various code cleanups - introduce GETFSMAP ioctl - various refactoring - avoid dio reads past eof - fix memory corruption and other errors with fragmented directory blocks - fix accidental userspace memory corruptions - publish fs uuid in superblock - make fstrim terminatable - fix race between quotaoff and in-core inode creation - avoid use-after-free when finishing up w/ buffer heads - reserve enough space to handle bmap tree resizing during cow remap" * tag 'xfs-4.12-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (53 commits) xfs: fix use-after-free in xfs_finish_page_writeback xfs: reserve enough blocks to handle btree splits when remapping xfs: wait on new inodes during quotaoff dquot release xfs: update ag iterator to support wait on new inodes xfs: support ability to wait on new inodes xfs: publish UUID in struct super_block xfs: Allow user to kill fstrim process xfs: better log intent item refcount checking xfs: fix up quotacheck buffer list error handling xfs: remove xfs_trans_ail_delete_bulk xfs: don't use bool values in trace buffers xfs: fix getfsmap userspace memory corruption while setting OF_LAST xfs: fix __user annotations for xfs_ioc_getfsmap xfs: corruption needs to respect endianess too! xfs: use NULL instead of 0 to initialize a pointer in xfs_ioc_getfsmap xfs: use NULL instead of 0 to initialize a pointer in xfs_getfsmap xfs: simplify validation of the unwritten extent bit xfs: remove unused values from xfs_exntst_t xfs: remove the unused XFS_MAXLINK_1 define xfs: more do_div cleanups ... commit 044f1daaaaf7c86bc4fcf433848b7baae236946b Merge: d557d1b daaadb3 Author: Linus Torvalds Date: Sat May 6 11:25:08 2017 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes and updates from Jens Axboe: "Some fixes and followup features/changes that should go in, in this merge window. This contains: - Two fixes for lightnvm from Javier, fixing problems in the new code merge previously in this merge window. - A fix from Jan for the backing device changes, fixing an issue in NFS that causes a failure to mount on certain setups. - A change from Christoph, cleaning up the blk-mq init and exit request paths. - Remove elevator_change(), which is now unused. From Bart. - A fix for queue operation invocation on a dead queue, from Bart. - A series fixing up mtip32xx for blk-mq scheduling, removing a bandaid we previously had in place for this. From me. - A regression fix for this series, fixing a case where we wait on workqueue flushing from an invalid (non-blocking) context. From me. - A fix/optimization from Ming, ensuring that we don't both quiesce and freeze a queue at the same time. - A fix from Peter on lock ordering for CPU hotplug. Not a real problem right now, but will be once the CPU hotplug rework goes in. - A series from Omar, cleaning up out blk-mq debugfs support, and adding support for exporting info from schedulers in debugfs as well. This is really useful in debugging stalls or livelocks. From Omar" * 'for-linus' of git://git.kernel.dk/linux-block: (28 commits) mq-deadline: add debugfs attributes kyber: add debugfs attributes blk-mq-debugfs: allow schedulers to register debugfs attributes blk-mq: untangle debugfs and sysfs blk-mq: move debugfs declarations to a separate header file blk-mq: Do not invoke queue operations on a dead queue blk-mq-debugfs: get rid of a bunch of boilerplate blk-mq-debugfs: rename hw queue directories from to hctx blk-mq-debugfs: don't open code strstrip() blk-mq-debugfs: error on long write to queue "state" file blk-mq-debugfs: clean up flag definitions blk-mq-debugfs: separate flags with | nfs: Fix bdi handling for cloned superblocks block/mq: Cure cpu hotplug lock inversion lightnvm: fix bad back free on error path lightnvm: create cmd before allocating request blk-mq: don't use sync workqueue flushing from drivers mtip32xx: convert internal commands to regular block infrastructure mtip32xx: cleanup internal tag assumptions block: don't call blk_mq_quiesce_queue() after queue is frozen ... commit d557d1b58b3546bab2c5bc2d624c5709840e6b10 Author: Greg Kroah-Hartman Date: Thu May 4 15:51:03 2017 -0700 refcount: change EXPORT_SYMBOL markings Now that kref is using the refcount apis, the _GPL markings are getting exported to places that it previously wasn't. Now kref.h is GPLv2 licensed, so any non-GPL code using it better be talking to some lawyers, but changing api markings isn't considered "nice", so let's fix this up. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds lib/refcount.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 37d69ee30808110bd8336d65af3f999a7a475e1d Author: Masahiro Yamada Date: Sun May 7 00:39:17 2017 +0900 docs: bump minimal GNU Make version to 3.81 Since 2014, you can't successfully build kernels with GNU Make version 3.80. Example errors: $ git describe v4.11 $ make --version | head -1 GNU Make 3.80 $ make defconfig HOSTCC scripts/basic/fixdep scripts/Makefile.host:135: *** missing separator. Stop. make: *** [defconfig] Error 2 $ make ARCH=arm64 help arch/arm64/Makefile:43: *** unterminated call to function `warning': missing `)'. Stop. $ make help >/dev/null ./Documentation/Makefile.sphinx:25: Extraneous text after `else' directive ./Documentation/Makefile.sphinx:31: *** only one `else' per conditional. Stop. make: *** [help] Error 2 The first breakage was introduced by commit c8589d1e9e01 ("kbuild: handle multi-objs dependency appropriately"). Since then (i.e. v3.18), GNU Make 3.80 has not been able to compile the kernel, but nobody has ever complained aboutt (or noticed) it. Even GNU Make 3.81 is more than 10 years old. It would not hurt to match the documentation with reality instead of fixing makefiles. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Torvalds Documentation/process/changes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 394e4f5d5834b610ee032cceb20a1b1f45b01d28 Author: Linus Torvalds Date: Sat May 6 10:27:13 2017 -0700 initramfs: avoid "label at end of compound statement" error Commit 17a9be317475 ("initramfs: Always do fput() and load modules after rootfs populate") introduced an error for the CONFIG_BLK_DEV_RAM=y case, because even though the code looks fine, the compiler really wants a statement after a label, or you'll get complaints: init/initramfs.c: In function 'populate_rootfs': init/initramfs.c:644:2: error: label at end of compound statement That commit moved the subsequent statements to outside the compound statement, leaving the label without any associated statements. Reported-by: Jörg Otte Fixes: 17a9be317475 ("initramfs: Always do fput() and load modules after rootfs populate") Cc: Al Viro Cc: Stafford Horne Cc: stable@vger.kernel.org # if 17a9be317475 gets backported Signed-off-by: Linus Torvalds init/initramfs.c | 1 + 1 file changed, 1 insertion(+) commit cb15c81a0c1c1f7829b9809a209ecacc77f5aa63 Merge: bb4d5e3 e4cb5bb Author: Zhang Rui Date: Sat May 6 19:31:19 2017 +0800 Merge branch 'thermal-soc' into next commit e4cb5bb286af409d814e4d13c650a736769b854b Merge: 39da7c5 05d7839 Author: Zhang Rui Date: Sat May 6 19:30:53 2017 +0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal into thermal-soc commit 25e78531268e9240fc594ce76587601b873d37c9 Author: Bryant G. Ly Date: Fri May 5 14:17:15 2017 -0500 ibmvscsis: Do not send aborted task response The driver is sending a response to the actual scsi op that was aborted by an abort task TM, while LIO is sending a response to the abort task TM. ibmvscsis_tgt does not send the response to the client until release_cmd time. The reason for this was because if we did it at queue_status time, then the client would be free to reuse the tag for that command, but we're still using the tag until the command is released at release_cmd time, so we chose to delay sending the response until then. That then caused this issue, because release_cmd is always called, even if queue_status is not. SCSI spec says that the initiator that sends the abort task TM NEVER gets a response to the aborted op and with the current code it will send a response. Thus this fix will remove that response if the CMD_T_ABORTED && !CMD_T_TAS. Another case with a small timing window is the case where if LIO sends a TMR_DOES_NOT_EXIST, and the release_cmd callback is called for the TMR Abort cmd before the release_cmd for the (attemped) aborted cmd, then we need to ensure that we send the response for the (attempted) abort cmd to the client before we send the response for the TMR Abort cmd. Cc: # v4.8+ Signed-off-by: Bryant G. Ly Signed-off-by: Michael Cyr Signed-off-by: Nicholas Bellinger drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 114 ++++++++++++++++++++++++------- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.h | 2 + 2 files changed, 91 insertions(+), 25 deletions(-) commit 3ef2bc099d1cce09e2844467e2ced98e1a44609d Merge: 2eecf3a 17a7035 Author: Linus Torvalds Date: Fri May 5 19:33:07 2017 -0700 Merge tag 'devicetree-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree updates from Rob Herring: - fix sparse warnings in drivers/of/ - add more overlay unittests - update dtc to v1.4.4-8-g756ffc4f52f6. This adds more checks on dts files such as unit-address formatting and stricter character sets for node and property names - add a common DT modalias function - move trivial-devices.txt up and out of i2c dir - ARM NVIC interrupt controller binding - vendor prefixes for Sensirion, Dioo, Nordic, ROHM - correct some binding file locations * tag 'devicetree-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (24 commits) of: fix sparse warnings in fdt, irq, reserved mem, and resolver code of: fix sparse warning in of_pci_range_parser_one of: fix sparse warnings in of_find_next_cache_node of/unittest: Missing unlocks on error of: fix uninitialized variable warning for overlay test of: fix unittest build without CONFIG_OF_OVERLAY of: Add unit tests for applying overlays of: per-file dtc compiler flags fpga: region: add missing DT documentation for config complete timeout of: Add vendor prefix for ROHM Semiconductor of: fix "/cpus" reference leak in of_numa_parse_cpu_nodes() of: Add vendor prefix for Nordic Semiconductor dt-bindings: arm,nvic: Binding for ARM NVIC interrupt controller on Cortex-M dtc: update warning settings for new bus and node/property name checks scripts/dtc: Update to upstream version v1.4.4-8-g756ffc4f52f6 scripts/dtc: automate getting dtc version and log in update script of: Add function for generating a DT modalias with a newline of: fix of_device_get_modalias returned length when truncating buffers Documentation: devicetree: move trivial-devices out of I2C realm dt-bindings: add vendor prefix for Dioo .. commit 2eecf3a49f1ff24c6116c954dd74e83f227fc716 Merge: 53ef7d0 10add84e Author: Linus Torvalds Date: Fri May 5 19:31:06 2017 -0700 Merge tag 'for-4.12/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - DM cache metadata fixes to short-circuit operations that require the metadata not be in 'fail_io' mode. Otherwise crashes are possible. - a DM cache fix to address the inability to adapt to continuous IO that happened to also reflect a changing working set (which required old blocks be demoted before the new working set could be promoted) - a DM cache smq policy cleanup that fell out from reviewing the above - fix the Kconfig help text for CONFIG_DM_INTEGRITY * tag 'for-4.12/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm cache metadata: fail operations if fail_io mode has been established dm integrity: improve the Kconfig help text for DM_INTEGRITY dm cache policy smq: cleanup free_target_met() and clean_target_met() dm cache policy smq: allow demotions to happen even during continuous IO commit 53ef7d0e208fa38c3f63d287e0c3ab174f1e1235 Merge: c6a677c 7361636 Author: Linus Torvalds Date: Fri May 5 18:49:20 2017 -0700 Merge tag 'libnvdimm-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm updates from Dan Williams: "The bulk of this has been in multiple -next releases. There were a few late breaking fixes and small features that got added in the last couple days, but the whole set has received a build success notification from the kbuild robot. Change summary: - Region media error reporting: A libnvdimm region device is the parent to one or more namespaces. To date, media errors have been reported via the "badblocks" attribute attached to pmem block devices for namespaces in "raw" or "memory" mode. Given that namespaces can be in "device-dax" or "btt-sector" mode this new interface reports media errors generically, i.e. independent of namespace modes or state. This subsequently allows userspace tooling to craft "ACPI 6.1 Section 9.20.7.6 Function Index 4 - Clear Uncorrectable Error" requests and submit them via the ioctl path for NVDIMM root bus devices. - Introduce 'struct dax_device' and 'struct dax_operations': Prompted by a request from Linus and feedback from Christoph this allows for dax capable drivers to publish their own custom dax operations. This fixes the broken assumption that all dax operations are related to a persistent memory device, and makes it easier for other architectures and platforms to add customized persistent memory support. - 'libnvdimm' core updates: A new "deep_flush" sysfs attribute is available for storage appliance applications to manually trigger memory controllers to drain write-pending buffers that would otherwise be flushed automatically by the platform ADR (asynchronous-DRAM-refresh) mechanism at a power loss event. Support for "locked" DIMMs is included to prevent namespaces from surfacing when the namespace label data area is locked. Finally, fixes for various reported deadlocks and crashes, also tagged for -stable. - ACPI / nfit driver updates: General updates of the nfit driver to add DSM command overrides, ACPI 6.1 health state flags support, DSM payload debug available by default, and various fixes. Acknowledgements that came after the branch was pushed: - commmit 565851c972b5 "device-dax: fix sysfs attribute deadlock": Tested-by: Yi Zhang - commit 23f498448362 "libnvdimm: rework region badblocks clearing" Tested-by: Toshi Kani " * tag 'libnvdimm-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (52 commits) libnvdimm, pfn: fix 'npfns' vs section alignment libnvdimm: handle locked label storage areas libnvdimm: convert NDD_ flags to use bitops, introduce NDD_LOCKED brd: fix uninitialized use of brd->dax_dev block, dax: use correct format string in bdev_dax_supported device-dax: fix sysfs attribute deadlock libnvdimm: restore "libnvdimm: band aid btt vs clear poison locking" libnvdimm: fix nvdimm_bus_lock() vs device_lock() ordering libnvdimm: rework region badblocks clearing acpi, nfit: kill ACPI_NFIT_DEBUG libnvdimm: fix clear length of nvdimm_forget_poison() libnvdimm, pmem: fix a NULL pointer BUG in nd_pmem_notify libnvdimm, region: sysfs trigger for nvdimm_flush() libnvdimm: fix phys_addr for nvdimm_clear_poison x86, dax, pmem: remove indirection around memcpy_from_pmem() block: remove block_device_operations ->direct_access() block, dax: convert bdev_dax_supported() to dax_direct_access() filesystem-dax: convert to dax_direct_access() Revert "block: use DAX for partition table reads" ext2, ext4, xfs: retrieve dax_device for iomap operations ... commit c6a677c6f37bb7abc85ba7e3465e82b9f7eb1d91 Merge: e87d51a 1127005 Author: Linus Torvalds Date: Fri May 5 18:16:23 2017 -0700 Merge tag 'staging-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO updates from Greg KH: "Here is the big staging tree update for 4.12-rc1. It's a big one, adding about 350k new lines of crap^Wcode, mostly all in a big dump of media drivers from Intel. But there's other new drivers in here as well, yet-another-wifi driver, new IIO drivers, and a new crypto accelerator. We also deleted a bunch of stuff, mostly in patch cleanups, but also the Android ION code has shrunk a lot, and the Android low memory killer driver was finally deleted, much to the celebration of the -mm developers. All of these have been in linux-next with a few build issues that will show up when you merge to your tree" Merge conflicts in the new rtl8723bs driver (due to the wifi changes this merge window) handled as per linux-next, courtesy of Stephen Rothwell. * tag 'staging-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1182 commits) staging: fsl-mc/dpio: add cpu <--> LE conversion for dpaa2_fd staging: ks7010: remove line continuations in quoted strings staging: vt6656: use tabs instead of spaces staging: android: ion: Fix unnecessary initialization of static variable staging: media: atomisp: fix range checking on clk_num staging: media: atomisp: fix misspelled word in comment staging: media: atomisp: kmap() can't fail staging: atomisp: remove #ifdef for runtime PM functions staging: atomisp: satm include directory is gone atomisp: remove some more unused files atomisp: remove hmm_load/store/clear indirections atomisp: kill off mmgr_free atomisp: clean up the hmm init/cleanup indirections atomisp: handle allocation calls before init in the hmm layer staging: fsl-dpaa2/eth: Add maintainer for Ethernet driver staging: fsl-dpaa2/eth: Add TODO file staging: fsl-dpaa2/eth: Add trace points staging: fsl-dpaa2/eth: Add driver specific stats staging: fsl-dpaa2/eth: Add ethtool support staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver ... commit e87d51ac61f88ae44fe14b34abe08566032d726b Merge: bdc713b 3622d3e Author: Linus Torvalds Date: Fri May 5 17:34:57 2017 -0700 Merge tag 'media/v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: "Media updates for v4.12-rc1: - new driver to support mediatek jpeg in hardware codec - rc-lirc, s5p-cec and st-cec staging drivers got promoted - hardware histogram support for vsp1 driver - added Virtual Media Controller driver, to make easier to test the media controller - added a new CEC driver (rainshadow-cec) - removed two staging LIRC drivers for obscure hardware that are too obsolete - added support for Intel SR300 Depth camera - some improvements at CEC and RC core - lots of driver cleanups, improvements all over the tree With this series, we're finally getting rid of the LIRC staging driver. There's just one left (lirc_zilog), with require more care, as part of its functionality (IR RX) is already provided by another driver. Work in progress to convert it on the proper way" * tag 'media/v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (304 commits) [media] ov2640: print error if devm_*_optional*() fails [media] atmel-isc: Fix the static checker warning [media] ov2640: add support for MEDIA_BUS_FMT_YVYU8_2X8 and MEDIA_BUS_FMT_VYUY8_2X8 [media] ov2640: fix vflip control [media] ov2640: fix duplicate width+height returning from ov2640_select_win() [media] ov2640: add missing write to size change preamble [media] ov2640: add information about DSP register 0xc7 [media] ov2640: improve banding filter register definitions/documentation [media] ov2640: fix init sequence alignment [media] ov2640: make GPIOLIB an optional dependency [media] xc5000: fix spelling mistake: "calibration" [media] vidioc-queryctrl.rst: fix menu/int menu references [media] media-entity: only call dev_dbg_obj if mdev is not NULL [media] pixfmt-meta-vsp1-hgo.rst: remove spurious '-' [media] mtk-vcodec: avoid warnings because of empty macros [media] coda: bump maximum number of internal framebuffers to 17 [media] media: mtk-vcodec: remove informative log [media] subdev-formats.rst: remove spurious '-' [media] dw2102: limit messages to buffer size [media] ttusb2: limit messages to buffer size ... commit bdc713bf5674bc6a881bd05c85e2a0f811b409b3 Merge: 1062ae4 8676df5 Author: Linus Torvalds Date: Fri May 5 17:30:44 2017 -0700 Merge tag 'drm-coc-for-v4.12-rc1' of git://people.freedesktop.org/~airlied/linux Pull drm CoC pointer from Dave Airlie: "Small supplementary pull request. I didn't want anyone saying we snuck this in in a the middle of a big pile of changes, so here is a clearly separate pull request documenting the code of conduct introduced for freedesktop.org and how it relates to dri-devel community" * tag 'drm-coc-for-v4.12-rc1' of git://people.freedesktop.org/~airlied/linux: drm: Document code of conduct commit 1062ae4982cabbf60f89b4e069fbb7def7edc8f7 Merge: 1a5fb64 644b493 Author: Linus Torvalds Date: Fri May 5 17:18:44 2017 -0700 Merge tag 'drm-forgot-about-tegra-for-v4.12-rc1' of git://people.freedesktop.org/~airlied/linux Pull drm tegra updates from Dave Airlie: "I missed a pull request from Thierry, this stuff has been in linux-next for a while anyways. It does contain a branch from the iommu tree, but Thierry said it should be fine" * tag 'drm-forgot-about-tegra-for-v4.12-rc1' of git://people.freedesktop.org/~airlied/linux: gpu: host1x: Fix host1x driver shutdown gpu: host1x: Support module reset gpu: host1x: Sort includes alphabetically drm/tegra: Add VIC support dt-bindings: Add bindings for the Tegra VIC drm/tegra: Add falcon helper library drm/tegra: Add Tegra DRM allocation API drm/tegra: Add tiling FB modifiers drm/tegra: Don't leak kernel pointer to userspace drm/tegra: Protect IOMMU operations by mutex drm/tegra: Enable IOVA API when IOMMU support is enabled gpu: host1x: Add IOMMU support gpu: host1x: Fix potential out-of-bounds access iommu/iova: Fix compile error with CONFIG_IOMMU_IOVA=m iommu: Add dummy implementations for !IOMMU_IOVA MAINTAINERS: Add related headers to IOMMU section iommu/iova: Consolidate code for adding new node to iovad domain rbtree commit db2c2a9798d266fd1d7c950b3937793b05533bf4 Author: Pixel Ding Date: Tue Apr 25 16:47:42 2017 +0800 drm/amdgpu: fix mutex list null pointer reference Fix NULL pointer reference. Signed-off-by: Pixel Ding Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7b52db39a4c27c0020ff953a4bb0aa8bbe55e4a2 Author: Rex Zhu Date: Thu May 4 13:32:01 2017 +0800 drm/amd/powerplay: fix bug sclk/mclk level can't be set on vega10. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 61 +++++++++++----------- 1 file changed, 31 insertions(+), 30 deletions(-) commit 5784d5cca66b362e3588c189eada757cf664ae6c Author: Rex Zhu Date: Thu May 4 14:51:31 2017 +0800 drm/amd/powerplay: Setup sw CTF to allow graceful exit when temperature exceeds maximum. cherry-pick from amd windows driver. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 73 +++++++++++++--------- 1 file changed, 45 insertions(+), 28 deletions(-) commit 652bd0c3441d861402bf7347088c846b6799c5b8 Author: Rex Zhu Date: Wed May 3 15:38:58 2017 +0800 drm/amd/powerplay: delete dead code in powerplay. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 28 ------------------------ drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 2 -- 2 files changed, 30 deletions(-) commit af8baf1518d8b3d086ac6d11d8f6acd57e9cab99 Author: Guenter Roeck Date: Wed May 3 23:49:18 2017 -0700 drm/amdgpu: Use less generic enum definitions alpha:allmodconfig fails to build as follows. drivers/gpu/drm/amd/amdgpu/amdgpu.h:1006:2: error: expected identifier before '(' token drivers/gpu/drm/amd/amdgpu/amdgpu.h:1011:28: error: 'NGG_BUF_MAX' undeclared here The problem is not really the enum definition of NGG_BUF_MAX but PARAM, which happens to be defined differently for alpha and a couple of other architectures. Use less generic defines for NGG enums to solve the problem. Fixes: bce23e00f3369 ("drm/amdgpu: add NGG parameters") Cc: Christian König Cc: Alex Deucher Signed-off-by: Guenter Roeck Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 ++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 16 ++++++++-------- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 28 ++++++++++++++-------------- 3 files changed, 26 insertions(+), 26 deletions(-) commit ad7d0ff3e79a100a24b66e8908a45402c20c3685 Author: Alex Deucher Date: Tue May 2 16:15:06 2017 -0400 drm/amdgpu/gfx9: derive tile pipes from golden settings rather than hardcoding it. Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f47b77b4e4baeb7922b5652ae7040d4d5de684a7 Author: Alex Deucher Date: Tue May 2 15:49:36 2017 -0400 drm/amdgpu/gfx: drop max_gs_waves_per_vgt We already have this info: max_gs_threads. Drop the duplicate. Reviewed-by: Junwei Zhang 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/gfx_v9_0.c | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) commit 327fce0c0d265b14be575bfe21a98c7c0dd932d8 Author: Rex Zhu Date: Thu May 4 11:07:02 2017 +0800 drm/amd/powerplay: disable engine spread spectrum feature on Vega10. Vega10 atomfirmware do not have ASIC_InternalSS_Info table so disable this feature by default in driver. Signed-off-by: Rex Zhu Reviewed-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b4a33e325c58579a2017d3b1c1a1227f78ae52cd Author: Rex Zhu Date: Wed May 3 12:48:52 2017 +0800 drm/amd/powerplay: clean up code in vega10_smumgr.c 1. fix typo in print message info. 2. fix block comments's coding style. Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 101 +++++++++------------ 1 file changed, 45 insertions(+), 56 deletions(-) commit 236763d340d6190c56554caee61c2bd5cfdf5217 Author: Monk Liu Date: Mon May 1 16:15:31 2017 +0800 drm/amdgpu:fix waiting on dirty fence if bo->shadow is NULL (race issue:BO shadow was just released and gpu-reset kick in but BO hasn't yet) recover_vram_from_shadow won't set @next, so the following "fence=next" will wrongly use a fence pointer which may already dirty. fixing it by set next to NULL prior to recover_vram_from_shadow Signed-off-by: Monk Liu Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+) commit 1d1a2cd58f05da1167c04394292aef9fbcf29bff Author: Monk Liu Date: Thu Apr 27 17:14:57 2017 +0800 drm/amdgpu:PTE flag should be 64 bit width otherwise we'll lost the high 32 bit for pte, which lead to incorrect MTYPE for vega10. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0dca7047512cb31e7a08a677a69fa7d47959dbf8 Author: Rex Zhu Date: Fri Apr 28 13:49:50 2017 +0800 drm/amd/powerplay: correct LoadLineResistance value in pptable. this value is used by avfs to adjust inversion voltage. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 4 ++-- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit b7a1f0e3cca40044952901e659939133e7cd1efe Author: Rex Zhu Date: Tue May 2 14:30:39 2017 +0800 drm/amd/powerplay: Allow duplicate enteries in pptable. This is a valid configuration. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 56a2f08c418ec01d46851683ee0463a2d8a2504d Author: Rex Zhu Date: Tue May 2 17:11:29 2017 +0800 drm/amd/powerplay: set fan target temperature by msg on vega10. SMU not support FanTargetTemperature in pptable, so send msg instand. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 5 +++++ 1 file changed, 5 insertions(+) commit 05ee3215110303b3ffacfb44fdae59a151799e89 Author: Rex Zhu Date: Tue May 2 16:51:49 2017 +0800 drm/amd/powerplay: set soc floor voltage on boot on vega10. Send the VBIOS bootup VDDC as a SOC floor voltage to SMU before populating the PPTABLE. After DPM is enabled, This floor voltage will be removed. This will prevent SMC from going to Vmin upon receiving PPTable causing a violation. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c | 28 ++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.h | 15 ++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 25 +++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h | 3 +++ 4 files changed, 71 insertions(+) commit ef181f268e0e8d868f353b764799d96d6a8a2d86 Author: Rex Zhu Date: Tue May 2 16:01:00 2017 +0800 drm/amd/powerplay: refine code in vega10_smumgr.c 1. return error code instand of -1. 2. print msg info if send msg failed Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 78 +++++++++++----------- 1 file changed, 39 insertions(+), 39 deletions(-) commit d86ab9cff8b936aadde444d0e263a8db5ff0349b Author: Juri Lelli Date: Wed May 3 14:30:48 2017 +0100 cpufreq: schedutil: use now as reference when aggregating shared policy requests Currently, sugov_next_freq_shared() uses last_freq_update_time as a reference to decide when to start considering CPU contributions as stale. However, since last_freq_update_time is set by the last CPU that issued a frequency transition, this might cause problems in certain cases. In practice, the detection of stale utilization values fails whenever the CPU with such values was the last to update the policy. For example (and please note again that the SCHED_CPUFREQ_RT flag is not the problem here, but only the detection of after how much time that flag has to be considered stale), suppose a policy with 2 CPUs: CPU0 | CPU1 | | RT task scheduled | SCHED_CPUFREQ_RT is set | CPU1->last_update = now | freq transition to max | last_freq_update_time = now | more than TICK_NSEC nsecs | a small CFS wakes up | CPU0->last_update = now1 | delta_ns(CPU0) < TICK_NSEC* | CPU0's util is considered | delta_ns(CPU1) = | last_freq_update_time - | CPU1->last_update = 0 | < TICK_NSEC | CPU1 is still considered | CPU1->SCHED_CPUFREQ_RT is set | we stay at max (until CPU1 | exits from idle) | * delta_ns is actually negative as now1 > last_freq_update_time While last_freq_update_time is a sensible reference for rate limiting, it doesn't seem to be useful for working around stale CPU states. Fix the problem by always considering now (time) as the reference for deciding when CPUs have stale contributions. Signed-off-by: Juri Lelli Acked-by: Vincent Guittot Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki kernel/sched/cpufreq_schedutil.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit eed4d47efe9508b855b09754cf6de4325d8a2f0d Author: Rafael J. Wysocki Date: Wed Apr 26 23:23:03 2017 +0200 ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle The ACPI SCI (System Control Interrupt) is set up as a wakeup IRQ during suspend-to-idle transitions and, consequently, any events signaled through it wake up the system from that state. However, on some systems some of the events signaled via the ACPI SCI while suspended to idle should not cause the system to wake up. In fact, quite often they should just be discarded. Arguably, systems should not resume entirely on such events, but in order to decide which events really should cause the system to resume and which are spurious, it is necessary to resume up to the point when ACPI SCIs are actually handled and processed, which is after executing dpm_resume_noirq() in the system resume path. For this reasons, add a loop around freeze_enter() in which the platforms can process events signaled via multiplexed IRQ lines like the ACPI SCI and add suspend-to-idle hooks that can be used for this purpose to struct platform_freeze_ops. In the ACPI case, the ->wake hook is used for checking if the SCI has triggered while suspended and deferring the interrupt-induced system wakeup until the events signaled through it are actually processed sufficiently to decide whether or not the system should resume. In turn, the ->sync hook allows all of the relevant event queues to be flushed so as to prevent events from being missed due to race conditions. In addition to that, some ACPI code processing wakeup events needs to be modified to use the "hard" version of wakeup triggers, so that it will cause a system resume to happen on device-induced wakeup events even if the "soft" mechanism to prevent the system from suspending is not enabled (that also helps to catch device-induced wakeup events occurring during suspend transitions in progress). Signed-off-by: Rafael J. Wysocki drivers/acpi/battery.c | 2 +- drivers/acpi/button.c | 5 +++-- drivers/acpi/device_pm.c | 3 ++- drivers/acpi/sleep.c | 28 ++++++++++++++++++++++++++++ drivers/base/power/main.c | 5 ----- drivers/base/power/wakeup.c | 18 ++++++++++++------ include/linux/suspend.h | 7 +++++-- kernel/power/process.c | 2 +- kernel/power/suspend.c | 29 +++++++++++++++++++++++++---- 9 files changed, 77 insertions(+), 22 deletions(-) commit 8a537ece3d946227e4afa81eae0e43fa47439c7d Author: Rafael J. Wysocki Date: Wed Apr 26 23:22:09 2017 +0200 PM / wakeup: Integrate mechanism to abort transitions in progress The system wakeup framework is not very consistent with respect to the way it handles suspend-to-idle and generally wakeup events occurring during transitions to system low-power states. First off, system transitions in progress are aborted by the event reporting helpers like pm_wakeup_event() only if the wakeup_count sysfs attribute is in use (as documented), but there are cases in which system-wide transitions should be aborted even if that is not the case. For example, a wakeup signal from a designated wakeup device during system-wide PM transition, it should cause the transition to be aborted right away. Moreover, there is a freeze_wake() call in wakeup_source_activate(), but that really is only effective after suspend_freeze_state has been set to FREEZE_STATE_ENTER by freeze_enter(). However, it is very unlikely that wakeup_source_activate() will ever be called at that time, as it could only be triggered by a IRQF_NO_SUSPEND interrupt handler, so wakeups from suspend-to-idle don't really occur in wakeup_source_activate(). At the same time there is a way to abort a system suspend in progress (or wake up the system from suspend-to-idle), which is by calling pm_system_wakeup(), but in turn that doesn't cause any wakeup source objects to be activated, so it will not be covered by wakeup source statistics and will not prevent the system from suspending again immediately (in case autosleep is used, for example). Consequently, if anyone wants to abort system transitions in progress and allow the wakeup_count mechanism to work, they need to use both pm_system_wakeup() and pm_wakeup_event(), say, at the same time which is awkward. For the above reasons, make it possible to trigger pm_system_wakeup() from within wakeup_source_activate() and provide a new pm_wakeup_hard_event() helper to do so within the wakeup framework. Signed-off-by: Rafael J. Wysocki drivers/base/power/wakeup.c | 36 ++++++++++++++++++------------------ include/linux/pm_wakeup.h | 25 +++++++++++++++++++++---- 2 files changed, 39 insertions(+), 22 deletions(-) commit cf4100d1cddcd243f80ac2af2e4c4273919ff225 Author: Alexey Brodkin Date: Fri May 5 23:20:29 2017 +0300 Revert "ARCv2: Allow enabling PAE40 w/o HIGHMEM" This reverts commit 7cab91b87dd8eeee5911ec34be8bb0288ebba18b. Now when we have a real hardware platform with PAE40 enabled (here I mean axs103 with firmware v1.2) and 1 Gb of DDR mapped to 0x1_a000_0000-0x1_ffff_ffff we're really targeting memory above 4Gb when PAE40 is enabled. This in its turn requires HIGHMEM to be enabled otherwise user won't see any difference with enabling PAE in kernel configuration as only lowmem will be used anyways. Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 1a5fb64fee203f9f5a9274c67ddbb821a29f723f Merge: aeced66 ed17545 Author: Linus Torvalds Date: Fri May 5 13:40:20 2017 -0700 Merge tag 'gfs2-4.12.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull GFS2 updates from Bob Peterson: "We've got ten GFS2 patches for this merge window. - Andreas Gruenbacher wrote a patch to replace the deprecated call to rhashtable_walk_init with rhashtable_walk_enter. - Andreas also wrote a patch to eliminate redundant code in two of our debugfs sequence files. - Andreas also cleaned up the rhashtable key ugliness Linus pointed out during this cycle, following Linus's suggestions. - Andreas also wrote a patch to take advantage of his new function rhashtable_lookup_get_insert_fast. This makes glock lookup faster and more bullet-proof. - Andreas also wrote a patch to revert a patch in the evict path that caused occasional deadlocks, and is no longer needed. - Andrew Price wrote a patch to re-enable fallocate for the rindex system file to enable gfs2_grow to grow properly on secondary file system grow operations. - I wrote a patch to initialize an inode number field to make certain kernel trace points more understandable. - I also wrote a patch that makes GFS2 file system "withdraw" work more like it should by ignoring operations after a withdraw that would formerly cause a BUG() and kernel panic. - I also reworked the entire truncate/delete algorithm, scrapping the old recursive algorithm in favor of a new non-recursive algorithm. This was done for performance: This way, GFS2 no longer needs to lock multiple resource groups while doing truncates and deletes of files that cross multiple resource group boundaries, allowing for better parallelism. It also solves a problem whereby deleting large files would request a large chunk of kernel memory, which resulted in a get_page_from_freelist warning. - Due to a regression found during testing, I added a new patch to correct 'GFS2: Prevent BUG from occurring when normal Withdraws occur'." * tag 'gfs2-4.12.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: GFS2: Allow glocks to be unlocked after withdraw GFS2: Non-recursive delete gfs2: Re-enable fallocate for the rindex Revert "GFS2: Wait for iopen glock dequeues" gfs2: Switch to rhashtable_lookup_get_insert_fast GFS2: Temporarily zero i_no_addr when creating a dinode gfs2: Don't pack struct lm_lockname gfs2: Deduplicate gfs2_{glocks,glstats}_open gfs2: Replace rhashtable_walk_init with rhashtable_walk_enter GFS2: Prevent BUG from occurring when normal Withdraws occur commit aeced66196460a04644538f4985192ce6be6acc0 Merge: 414975e 2f713b5 Author: Linus Torvalds Date: Fri May 5 13:36:10 2017 -0700 Merge tag 'for-linus-4.12-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs updates from Mike Marshall: "Orangefs cleanups, fixes and statx support. Some cleanups: - remove unused get_fsid_from_ino - fix bounds check for listxattr - clean up oversize xattr validation - do not set getattr_time on orangefs_lookup - return from orangefs_devreq_read quickly if possible - do not wait for timeout if umounting - handle zero size write in debugfs Bug fixes: - do not check possibly stale size on truncate - ensure the userspace component is unmounted if mount fails - total reimplementation of dir.c New feature: - implement statx The new implementation of dir.c is kind of a big deal, all new code. It has been posted to fs-devel during the previous rc period, we didn't get much review or feedback from there, but it has been reviewed very heavily here, so much so that we have two entire versions of the reimplementation. Not only does the new implementation fix some xfstests, but it passes all the new tests we made here that involve seeking and rewinding and giant directories and long file names. The new dir code has three patches itself: - skip forward to the next directory entry if seek is short - invalidate stored directory on seek - count directory pieces correctly" * tag 'for-linus-4.12-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: count directory pieces correctly orangefs: invalidate stored directory on seek orangefs: skip forward to the next directory entry if seek is short orangefs: handle zero size write in debugfs orangefs: do not wait for timeout if umounting orangefs: return from orangefs_devreq_read quickly if possible orangefs: ensure the userspace component is unmounted if mount fails orangefs: do not check possibly stale size on truncate orangefs: implement statx orangefs: remove ORANGEFS_READDIR macros orangefs: support very large directories orangefs: support llseek on directories orangefs: rewrite readdir to fix several bugs orangefs: do not set getattr_time on orangefs_lookup orangefs: clean up oversize xattr validation orangefs: fix bounds check for listxattr orangefs: remove unused get_fsid_from_ino commit 414975eb7644aa57781679ffc1e63d670b3a1031 Merge: 58017a3 dcfd9b21 Author: Linus Torvalds Date: Fri May 5 13:33:38 2017 -0700 Merge tag 'befs-v4.12-rc1' of git://github.com/luisbg/linux-befs Pull befs fix from Luis de Bethencourt: "One fix from Fabian Frederick making the nfs client still work after a cache drop" * tag 'befs-v4.12-rc1' of git://github.com/luisbg/linux-befs: befs: make export work with cold dcache commit 58017a3e284059186fa0dc16730e9f2ef336da61 Merge: ab182e6 17a9be3 Author: Linus Torvalds Date: Fri May 5 13:30:11 2017 -0700 Merge tag 'initramfs-fix-4.12-rc1' of git://github.com/stffrdhrn/linux Pull initramfs fix from Stafford Horne: "This is a fix for an issue that has caused 4.11 to not boot on OpenRISC. I should have caught this during the 4.11 cycle but I had been busy on testing some other series of patches. I would have considered pushing it though a different path but Al Viro suggested submitting directly to you. Also, its just one as I havent really got anything else ready on my queue for 4.12. Summary: - Ensure fput() flush is done even for builtin initramfs" * tag 'initramfs-fix-4.12-rc1' of git://github.com/stffrdhrn/linux: initramfs: Always do fput() and load modules after rootfs populate commit 6b4657667ba06cd2e07206c65e630acdf248bfd1 Author: Fabian Frederick Date: Fri May 5 20:52:07 2017 +0200 fs/affs: add rename exchange Process RENAME_EXCHANGE in affs_rename2() adding static affs_xrename() based on affs_rename(). We remove headers from respective directories then affect bh to other inode directory entries for swapping. Signed-off-by: Fabian Frederick Signed-off-by: Al Viro fs/affs/namei.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) commit c6184028a75cf63036267089741ec7ef975ebc27 Author: Fabian Frederick Date: Fri May 5 20:51:42 2017 +0200 fs/affs: add rename2 to prepare multiple methods Currently AFFS only supports RENAME_NOREPLACE. This patch isolates that method to a static function to prepare RENAME_EXCHANGE addition. Signed-off-by: Fabian Frederick Signed-off-by: Al Viro fs/affs/affs.h | 2 +- fs/affs/dir.c | 2 +- fs/affs/namei.c | 25 ++++++++++++++++--------- 3 files changed, 18 insertions(+), 11 deletions(-) commit ed17545d01e4a40086f1622c88ce64cc0241cfc2 Author: Bob Peterson Date: Fri May 5 09:43:02 2017 -0500 GFS2: Allow glocks to be unlocked after withdraw This bug fixes a regression introduced by patch 0d1c7ae9d8. The intent of the patch was to stop promoting glocks after a file system is withdrawn due to a variety of errors, because doing so results in a BUG(). (You should be able to unmount after a withdraw rather than having the kernel panic.) Unfortunately, it also stopped demotions, so glocks could not be unlocked after withdraw, which means the unmount would hang. This patch allows function do_xmote to demote locks to an unlocked state after a withdraw, but not promote them. Signed-off-by: Bob Peterson fs/gfs2/glock.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 161f55efba5ddccc690139fae9373cafc3447a97 Author: Eryu Guan Date: Tue May 2 13:54:47 2017 -0700 xfs: fix use-after-free in xfs_finish_page_writeback Commit 28b783e47ad7 ("xfs: bufferhead chains are invalid after end_page_writeback") fixed one use-after-free issue by pre-calculating the loop conditionals before calling bh->b_end_io() in the end_io processing loop, but it assigned 'next' pointer before checking end offset boundary & breaking the loop, at which point the bh might be freed already, and caused use-after-free. This is caught by KASAN when running fstests generic/127 on sub-page block size XFS. [ 2517.244502] run fstests generic/127 at 2017-04-27 07:30:50 [ 2747.868840] ================================================================== [ 2747.876949] BUG: KASAN: use-after-free in xfs_destroy_ioend+0x3d3/0x4e0 [xfs] at addr ffff8801395ae698 ... [ 2747.918245] Call Trace: [ 2747.920975] dump_stack+0x63/0x84 [ 2747.924673] kasan_object_err+0x21/0x70 [ 2747.928950] kasan_report+0x271/0x530 [ 2747.933064] ? xfs_destroy_ioend+0x3d3/0x4e0 [xfs] [ 2747.938409] ? end_page_writeback+0xce/0x110 [ 2747.943171] __asan_report_load8_noabort+0x19/0x20 [ 2747.948545] xfs_destroy_ioend+0x3d3/0x4e0 [xfs] [ 2747.953724] xfs_end_io+0x1af/0x2b0 [xfs] [ 2747.958197] process_one_work+0x5ff/0x1000 [ 2747.962766] worker_thread+0xe4/0x10e0 [ 2747.966946] kthread+0x2d3/0x3d0 [ 2747.970546] ? process_one_work+0x1000/0x1000 [ 2747.975405] ? kthread_create_on_node+0xc0/0xc0 [ 2747.980457] ? syscall_return_slowpath+0xe6/0x140 [ 2747.985706] ? do_page_fault+0x30/0x80 [ 2747.989887] ret_from_fork+0x2c/0x40 [ 2747.993874] Object at ffff8801395ae690, in cache buffer_head size: 104 [ 2748.001155] Allocated: [ 2748.003782] PID = 8327 [ 2748.006411] save_stack_trace+0x1b/0x20 [ 2748.010688] save_stack+0x46/0xd0 [ 2748.014383] kasan_kmalloc+0xad/0xe0 [ 2748.018370] kasan_slab_alloc+0x12/0x20 [ 2748.022648] kmem_cache_alloc+0xb8/0x1b0 [ 2748.027024] alloc_buffer_head+0x22/0xc0 [ 2748.031399] alloc_page_buffers+0xd1/0x250 [ 2748.035968] create_empty_buffers+0x30/0x410 [ 2748.040730] create_page_buffers+0x120/0x1b0 [ 2748.045493] __block_write_begin_int+0x17a/0x1800 [ 2748.050740] iomap_write_begin+0x100/0x2f0 [ 2748.055308] iomap_zero_range_actor+0x253/0x5c0 [ 2748.060362] iomap_apply+0x157/0x270 [ 2748.064347] iomap_zero_range+0x5a/0x80 [ 2748.068624] iomap_truncate_page+0x6b/0xa0 [ 2748.073227] xfs_setattr_size+0x1f7/0xa10 [xfs] [ 2748.078312] xfs_vn_setattr_size+0x68/0x140 [xfs] [ 2748.083589] xfs_file_fallocate+0x4ac/0x820 [xfs] [ 2748.088838] vfs_fallocate+0x2cf/0x780 [ 2748.093021] SyS_fallocate+0x48/0x80 [ 2748.097006] do_syscall_64+0x18a/0x430 [ 2748.101186] return_from_SYSCALL_64+0x0/0x6a [ 2748.105948] Freed: [ 2748.108189] PID = 8327 [ 2748.110816] save_stack_trace+0x1b/0x20 [ 2748.115093] save_stack+0x46/0xd0 [ 2748.118788] kasan_slab_free+0x73/0xc0 [ 2748.122969] kmem_cache_free+0x7a/0x200 [ 2748.127247] free_buffer_head+0x41/0x80 [ 2748.131524] try_to_free_buffers+0x178/0x250 [ 2748.136316] xfs_vm_releasepage+0x2e9/0x3d0 [xfs] [ 2748.141563] try_to_release_page+0x100/0x180 [ 2748.146325] invalidate_inode_pages2_range+0x7da/0xcf0 [ 2748.152087] xfs_shift_file_space+0x37d/0x6e0 [xfs] [ 2748.157557] xfs_collapse_file_space+0x49/0x120 [xfs] [ 2748.163223] xfs_file_fallocate+0x2a7/0x820 [xfs] [ 2748.168462] vfs_fallocate+0x2cf/0x780 [ 2748.172642] SyS_fallocate+0x48/0x80 [ 2748.176629] do_syscall_64+0x18a/0x430 [ 2748.180810] return_from_SYSCALL_64+0x0/0x6a Fixed it by checking on offset against end & breaking out first, dereference bh only if there're still bufferheads to process. Signed-off-by: Eryu Guan Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_aops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab182e67ec99ea0c8d7435a32a4a1ed9bb02559a Merge: 7246f60 92f66f8 Author: Linus Torvalds Date: Fri May 5 12:11:37 2017 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Catalin Marinas: - kdump support, including two necessary memblock additions: memblock_clear_nomap() and memblock_cap_memory_range() - ARMv8.3 HWCAP bits for JavaScript conversion instructions, complex numbers and weaker release consistency - arm64 ACPI platform MSI support - arm perf updates: ACPI PMU support, L3 cache PMU in some Qualcomm SoCs, Cortex-A53 L2 cache events and DTLB refills, MAINTAINERS update for DT perf bindings - architected timer errata framework (the arch/arm64 changes only) - support for DMA_ATTR_FORCE_CONTIGUOUS in the arm64 iommu DMA API - arm64 KVM refactoring to use common system register definitions - remove support for ASID-tagged VIVT I-cache (no ARMv8 implementation using it and deprecated in the architecture) together with some I-cache handling clean-up - PE/COFF EFI header clean-up/hardening - define BUG() instruction without CONFIG_BUG * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (92 commits) arm64: Fix the DMA mmap and get_sgtable API with DMA_ATTR_FORCE_CONTIGUOUS arm64: Print DT machine model in setup_machine_fdt() arm64: pmu: Wire-up Cortex A53 L2 cache events and DTLB refills arm64: module: split core and init PLT sections arm64: pmuv3: handle pmuv3+ arm64: Add CNTFRQ_EL0 trap handler arm64: Silence spurious kbuild warning on menuconfig arm64: pmuv3: use arm_pmu ACPI framework arm64: pmuv3: handle !PMUv3 when probing drivers/perf: arm_pmu: add ACPI framework arm64: add function to get a cpu's MADT GICC table drivers/perf: arm_pmu: split out platform device probe logic drivers/perf: arm_pmu: move irq request/free into probe drivers/perf: arm_pmu: split cpu-local irq request/free drivers/perf: arm_pmu: rename irq request/free functions drivers/perf: arm_pmu: handle no platform_device drivers/perf: arm_pmu: simplify cpu_pmu_request_irqs() drivers/perf: arm_pmu: factor out pmu registration drivers/perf: arm_pmu: fold init into alloc drivers/perf: arm_pmu: define armpmu_init_fn ... commit 868a65307d3015064db2a6fb2d6e451293e3047f Author: Vineet Gupta Date: Fri May 5 11:59:41 2017 -0700 ARC: mm: fix build failure in linux-next for UP builds kisskb build service reported ARC defconfig build failures in linux-next | arch/arc/include/asm/mmu.h:75:21: error: 'NR_CPUS' undeclared here (not in a function) | make[3]: *** [arch/arc/mm/ioremap.o] Error 1 | make[2]: *** [arch/arc/mm] Error 2 | make[1]: *** [arch/arc] Error 2 which I bisected to a subtle side-effect of a totally benign mm patch ("mm, vmalloc: properly track vmalloc users") which caused a header include chain deviation - asm/mmu.h using NR_CPUS before including linux/threads.h Fix that by adding the dependnet header and while it at fix a related header to include linux headers aheads of asm headers as sometimes that slso triggers such issues ! Reported-by: noreply@ellerman.id.au Signed-off-by: Vineet Gupta arch/arc/include/asm/mmu.h | 4 ++++ arch/arc/include/asm/pgtable.h | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) commit 2c041afc5af93a47b8bae2b1190a7b6ed028b706 Author: Rakesh Pandit Date: Fri May 5 14:28:23 2017 +0300 net: alx: handle pci_alloc_irq_vectors return correctly It was introduced while switching to pci_alloc_irq_vectors recently and fixes: [ 60.527052] alx 0000:03:00.0 enp3s0: Enabling MSI-X interrupts failed! [ 60.529323] BUG: unable to handle kernel NULL pointer dereference at 00000000000000b8 [ 60.531589] IP: alx_alloc_napis+0xe6/0x1e0 [alx] [ 60.533831] PGD 0 [ 60.533833] P4D 0 [ 60.540559] Oops: 0002 [#1] SMP [ 60.542759] Modules linked in: ebtables ip6table_filter ip6_tables..... [ 60.549990] drm_kms_helper drm crc32c_intel alx serio_raw mdio wmi video i2c_hid uas usb_storage [ 60.551404] CPU: 0 PID: 999 Comm: NetworkManager Not tainted 4.11.0+ #1 [ 60.552813] Hardware name: Acer Predator G9-591/Mustang_SLS, BIOS V1.10 03/03/2016 [ 60.554219] task: ffff8804ae833c00 task.stack: ffffc90003eec000 [ 60.555383] RIP: 0010:alx_alloc_napis+0xe6/0x1e0 [alx] [ 60.556615] RSP: 0018:ffffc90003eef660 EFLAGS: 00010286 [ 60.557787] RAX: ffff8804962835a0 RBX: ffff8804aee8a8c0 RCX: 0000000000000000 [ 60.558987] RDX: 0000000000000060 RSI: 0000000000000000 RDI: ffff880496283600 [ 60.559979] RBP: ffffc90003eef688 R08: ffff8804c1c1e7e0 R09: ffff8804962835a0 [ 60.560978] R10: ffff8804962835a0 R11: 0000000000000102 R12: 0000000000000000 [ 60.561974] R13: 0000000000000000 R14: ffff8804aee8aaf0 R15: ffffffffa0052ea0 [ 60.562974] FS: 00007f1cecbc9940(0000) GS:ffff8804c1c00000(0000) knlGS:0000000000000000 [ 60.564003] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 60.564884] CR2: 00000000000000b8 CR3: 0000000496025000 CR4: 00000000003406f0 [ 60.565782] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 60.566676] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 60.567560] Call Trace: [ 60.568500] __alx_open+0xa2/0x570 [alx] [ 60.569355] ? notifier_call_chain+0x4a/0x70 [ 60.570144] alx_open+0x17/0x20 [alx] [ 60.570909] __dev_open+0xc6/0x140 [ 60.571682] ? _raw_spin_unlock_bh+0x1a/0x20 [ 60.572469] __dev_change_flags+0x9d/0x160 [ 60.573252] dev_change_flags+0x29/0x60 [ 60.574070] do_setlink+0x32e/0xc90 [ 60.574815] ? ttwu_do_activate+0x77/0x80 [ 60.575544] ? drm_fb_helper_dirty.isra.17+0xc7/0xe0 [drm_kms_helper] [ 60.576273] ? drm_fb_helper_cfb_imageblit+0x30/0x40 [drm_kms_helper] [ 60.577004] ? bit_putcs+0x2f7/0x560 [ 60.577729] ? nla_parse+0x35/0x140 [ 60.578518] rtnl_newlink+0x7d3/0x900 [ 60.579280] ? security_capset+0x30/0x80 [ 60.580029] ? ns_capable_common+0x68/0x80 [ 60.580747] ? ns_capable+0x13/0x20 [ 60.581453] rtnetlink_rcv_msg+0xee/0x220 [ 60.582198] ? rtnl_newlink+0x900/0x900 [ 60.582909] netlink_rcv_skb+0xe7/0x120 [ 60.583601] rtnetlink_rcv+0x28/0x30 [ 60.584303] netlink_unicast+0x18c/0x220 [ 60.585002] netlink_sendmsg+0x2ba/0x3b0 [ 60.585703] sock_sendmsg+0x38/0x50 [ 60.586436] ___sys_sendmsg+0x2b6/0x2d0 [ 60.587123] ? lockref_put_or_lock+0x5e/0x80 [ 60.587822] ? dput+0x155/0x1d0 [ 60.588518] ? mntput+0x24/0x40 [ 60.589215] __sys_sendmsg+0x54/0x90 [ 60.589907] ? __sys_sendmsg+0x54/0x90 [ 60.590627] SyS_sendmsg+0x12/0x20 [ 60.591333] entry_SYSCALL_64_fastpath+0x1a/0xa5 [ 60.592021] RIP: 0033:0x7f1ceb44e3b0 [ 60.592697] RSP: 002b:00007fffd7f0a2d0 EFLAGS: 00000293 ORIG_RAX: 000000000000002e [ 60.593385] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f1ceb44e3b0 [ 60.594107] RDX: 0000000000000000 RSI: 00007fffd7f0a380 RDI: 000000000000000c [ 60.594798] RBP: 00007fffd7f0a800 R08: 0000000000000000 R09: 0000000000000000 [ 60.595502] R10: 0000564ffbae6e20 R11: 0000000000000293 R12: 0000000000000001 [ 60.596200] R13: 0000000000000002 R14: 0000000000000010 R15: 00007fffd7f0a4d0 [ 60.596899] Code: ed 85 c9 0f 8f ec 00 00 00 48 8b 3d 9d 97 1a e2 ba 50 00 00 00 be c0 80 40 01 4c 8b a3 30 02 00 00 e8 ff e5 1d e1 48 85 c0 74 a3 <49> 89 84 24 b8 00 00 00 48 8b 93 30 02 00 00 48 8b 4b 08 48 89 [ 60.597642] RIP: alx_alloc_napis+0xe6/0x1e0 [alx] RSP: ffffc90003eef660 [ 60.598427] CR2: 00000000000000b8 Fixes: f3297f68 ("net: alx: switch to pci_alloc_irq_vectors") Signed-off-by: Rakesh Pandit Signed-off-by: David S. Miller drivers/net/ethernet/atheros/alx/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 10add84e276432d9dd8044679a1028dd4084117e Author: Mike Snitzer Date: Fri May 5 14:40:13 2017 -0400 dm cache metadata: fail operations if fail_io mode has been established Otherwise it is possible to trigger crashes due to the metadata being inaccessible yet these methods don't safely account for that possibility without these checks. Cc: stable@vger.kernel.org Reported-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-cache-metadata.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 7246f60068840847bdcf595be5f0b5ca632736e0 Merge: e579dde 700b7ead Author: Linus Torvalds Date: Fri May 5 11:36:44 2017 -0700 Merge tag 'powerpc-4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: "Highlights include: - Larger virtual address space on 64-bit server CPUs. By default we use a 128TB virtual address space, but a process can request access to the full 512TB by passing a hint to mmap(). - Support for the new Power9 "XIVE" interrupt controller. - TLB flushing optimisations for the radix MMU on Power9. - Support for CAPI cards on Power9, using the "Coherent Accelerator Interface Architecture 2.0". - The ability to configure the mmap randomisation limits at build and runtime. - Several small fixes and cleanups to the kprobes code, as well as support for KPROBES_ON_FTRACE. - Major improvements to handling of system reset interrupts, correctly treating them as NMIs, giving them a dedicated stack and using a new hypervisor call to trigger them, all of which should aid debugging and robustness. - Many fixes and other minor enhancements. Thanks to: Alastair D'Silva, Alexey Kardashevskiy, Alistair Popple, Andrew Donnellan, Aneesh Kumar K.V, Anshuman Khandual, Anton Blanchard, Balbir Singh, Ben Hutchings, Benjamin Herrenschmidt, Bhupesh Sharma, Chris Packham, Christian Zigotzky, Christophe Leroy, Christophe Lombard, Daniel Axtens, David Gibson, Gautham R. Shenoy, Gavin Shan, Geert Uytterhoeven, Guilherme G. Piccoli, Hamish Martin, Hari Bathini, Kees Cook, Laurent Dufour, Madhavan Srinivasan, Mahesh J Salgaonkar, Mahesh Salgaonkar, Masami Hiramatsu, Matt Brown, Matthew R. Ochs, Michael Neuling, Naveen N. Rao, Nicholas Piggin, Oliver O'Halloran, Pan Xinhui, Paul Mackerras, Rashmica Gupta, Russell Currey, Sukadev Bhattiprolu, Thadeu Lima de Souza Cascardo, Tobin C. Harding, Tyrel Datwyler, Uma Krishnan, Vaibhav Jain, Vipin K Parashar, Yang Shi" * tag 'powerpc-4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (214 commits) powerpc/64s: Power9 has no LPCR[VRMASD] field so don't set it powerpc/powernv: Fix TCE kill on NVLink2 powerpc/mm/radix: Drop support for CPUs without lockless tlbie powerpc/book3s/mce: Move add_taint() later in virtual mode powerpc/sysfs: Move #ifdef CONFIG_HOTPLUG_CPU out of the function body powerpc/smp: Document irq enable/disable after migrating IRQs powerpc/mpc52xx: Don't select user-visible RTAS_PROC powerpc/powernv: Document cxl dependency on special case in pnv_eeh_reset() powerpc/eeh: Clean up and document event handling functions powerpc/eeh: Avoid use after free in eeh_handle_special_event() cxl: Mask slice error interrupts after first occurrence cxl: Route eeh events to all drivers in cxl_pci_error_detected() cxl: Force context lock during EEH flow powerpc/64: Allow CONFIG_RELOCATABLE if COMPILE_TEST powerpc/xmon: Teach xmon oops about radix vectors powerpc/mm/hash: Fix off-by-one in comment about kernel contexts ids powerpc/pseries: Enable VFIO powerpc/powernv: Fix iommu table size calculation hook for small tables powerpc/powernv: Check kzalloc() return value in pnv_pci_table_alloc powerpc: Add arch/powerpc/tools directory ... commit e579dde654fc2c6b0d3e4b77a9a4b2d2405c510e Merge: af82455 d66bb16 Author: Linus Torvalds Date: Fri May 5 11:08:43 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull namespace updates from Eric Biederman: "This is a set of small fixes that were mostly stumbled over during more significant development. This proc fix and the fix to posix-timers are the most significant of the lot. There is a lot of good development going on but unfortunately it didn't quite make the merge window" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: proc: Fix unbalanced hard link numbers signal: Make kill_proc_info static rlimit: Properly call security_task_setrlimit signal: Remove unused definition of sig_user_definied ia64: Remove unused IA64_TASK_SIGHAND_OFFSET and IA64_SIGHAND_SIGLOCK_OFFSET ipc: Remove unused declaration of recompute_msgmni posix-timers: Correct sanity check in posix_cpu_nsleep sysctl: Remove dead register_sysctl_root commit 0795bf8357c1887e2a95e6e4f5b89d0896a0d929 Author: Fabian Frederick Date: Wed May 3 20:52:21 2017 +0200 nfs: use kmap/kunmap directly This patch removes useless nfs_readdir_get_array() and nfs_readdir_release_array() as suggested by Trond Myklebust nfs_readdir() calls nfs_revalidate_mapping() before readdir_search_pagecache() , nfs_do_filldir(), uncached_readdir() so mapping should be correct. While kmap() can't fail, all subsequent error checks were removed as well as unused labels. Signed-off-by: Fabian Frederick Signed-off-by: Trond Myklebust fs/nfs/dir.c | 67 +++++++++++------------------------------------------------- 1 file changed, 12 insertions(+), 55 deletions(-) commit 59b86d85a7a30ba56289cdac83cd66a7dd2adebf Author: Hou Tao Date: Fri Apr 28 18:35:19 2017 +0800 NFS: always treat the invocation of nfs_getattr as cache hit when noac is on When using 'ls -l' to display a large directory, if noac option is used, in function nfs_getattr() nfs_need_revalidate_inode() will always be true for NFSv3 and the nfs_entry cache of the directory will be flushed. The flush will lead to a fully reread of the directory entries from server. To prevent the unnecessary RPCs, we need to check whether or not the noac option is used, and always report the invocation of nfs_getattr() as cache hit instead cache miss when it's on. Signed-off-by: Hou Tao Signed-off-by: Trond Myklebust fs/nfs/inode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5c737cb29977896eb0f373d3adbcdea73b815808 Author: Dave Wysochanski Date: Thu Apr 27 10:45:15 2017 -0400 Fix nfs_client refcounting if kmalloc fails in nfs4_proc_exchange_id and nfs4_proc_async_renew If memory allocation fails for the callback data, we need to put the nfs_client or we end up with an elevated refcount. Signed-off-by: Dave Wysochanski Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 0048fdd06614a4ea088f9fcad11511956b795698 Author: Trond Myklebust Date: Thu May 4 13:44:04 2017 -0400 NFSv4.1: RECLAIM_COMPLETE must handle NFS4ERR_CONN_NOT_BOUND_TO_SESSION If the server returns NFS4ERR_CONN_NOT_BOUND_TO_SESSION because we are trunking, then RECLAIM_COMPLETE must handle that by calling nfs4_schedule_session_recovery() and then retrying. Reported-by: Chuck Lever Signed-off-by: Trond Myklebust Tested-by: Chuck Lever fs/nfs/nfs4proc.c | 7 ++++++- fs/nfs/nfs4state.c | 10 +++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) commit 84b114b98452c431299d99c135f751659e517acb Author: Eric Dumazet Date: Fri May 5 06:56:54 2017 -0700 tcp: randomize timestamps on syncookies Whole point of randomization was to hide server uptime, but an attacker can simply start a syn flood and TCP generates 'old style' timestamps, directly revealing server jiffies value. Also, TSval sent by the server to a particular remote address vary depending on syncookies being sent or not, potentially triggering PAWS drops for innocent clients. Lets implement proper randomization, including for SYNcookies. Also we do not need to export sysctl_tcp_timestamps, since it is not used from a module. In v2, I added Florian feedback and contribution, adding tsoff to tcp_get_cookie_sock(). v3 removed one unused variable in tcp_v4_connect() as Florian spotted. Fixes: 95a22caee396c ("tcp: randomize tcp timestamp offsets for each connection") Signed-off-by: Eric Dumazet Reviewed-by: Florian Westphal Tested-by: Florian Westphal Cc: Yuchung Cheng Signed-off-by: David S. Miller include/net/secure_seq.h | 10 ++++++---- include/net/tcp.h | 5 +++-- net/core/secure_seq.c | 31 +++++++++++++++++++------------ net/ipv4/syncookies.c | 12 ++++++++++-- net/ipv4/tcp_input.c | 8 +++----- net/ipv4/tcp_ipv4.c | 32 +++++++++++++++++++------------- net/ipv6/syncookies.c | 10 +++++++++- net/ipv6/tcp_ipv6.c | 32 +++++++++++++++++++------------- 8 files changed, 88 insertions(+), 52 deletions(-) commit 34bf129a7f068e3108dbb051b4b05674e2a270e7 Author: Arnd Bergmann Date: Fri May 5 17:25:12 2017 +0200 fbdev: sti: don't select CONFIG_VT While working on another build error, I ran into several variations of this dependency loop: subsection "Kconfig recursive dependency limitations" drivers/input/Kconfig:8: symbol INPUT is selected by VT For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/tty/Kconfig:12: symbol VT is selected by FB_STI For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/video/fbdev/Kconfig:677: symbol FB_STI depends on FB For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/video/fbdev/Kconfig:5: symbol FB is selected by DRM_KMS_FB_HELPER For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/gpu/drm/Kconfig:72: symbol DRM_KMS_FB_HELPER is selected by DRM_KMS_CMA_HELPER For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/gpu/drm/Kconfig:137: symbol DRM_KMS_CMA_HELPER is selected by DRM_HDLCD For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/gpu/drm/arm/Kconfig:6: symbol DRM_HDLCD depends on OF For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/of/Kconfig:4: symbol OF is selected by X86_INTEL_CE For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" arch/x86/Kconfig:523: symbol X86_INTEL_CE depends on X86_IO_APIC For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" arch/x86/Kconfig:1011: symbol X86_IO_APIC depends on X86_LOCAL_APIC For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" arch/x86/Kconfig:1005: symbol X86_LOCAL_APIC depends on X86_UP_APIC For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" arch/x86/Kconfig:980: symbol X86_UP_APIC depends on PCI_MSI For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/pci/Kconfig:11: symbol PCI_MSI is selected by AMD_IOMMU For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/iommu/Kconfig:106: symbol AMD_IOMMU depends on IOMMU_SUPPORT For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/iommu/Kconfig:5: symbol IOMMU_SUPPORT is selected by DRM_ETNAVIV For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/gpu/drm/etnaviv/Kconfig:2: symbol DRM_ETNAVIV depends on THERMAL For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/thermal/Kconfig:5: symbol THERMAL is selected by ACPI_VIDEO For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" drivers/acpi/Kconfig:183: symbol ACPI_VIDEO is selected by INPUT This doesn't currently show up as I fixed the 'THERMAL' part of it, but I noticed that the FB_STI dependency should not be there but was introduced by slightly incorrect bug-fix patch that tried to fix a link error. Instead of selecting 'VT' to make us enter the drivers/video/console directory at compile-time, it's sufficient to build the drivers/video/console/sticore.c file by adding its directory to when CONFIG_FB_STI is enabled. Alternatively, we could move the sticore code to another directory that is always built when we have at STI_CONSOLE or FB_STI enabled. Fixes: 17085a934592 ("parisc: stifb: should depend on STI_CONSOLE") Signed-off-by: Arnd Bergmann Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Alexander Beregalov Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/Makefile | 1 + drivers/video/fbdev/Kconfig | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) commit 9051247dcf9ecee156d2ddac39a4f1ca591f8428 Author: Tobias Klauser Date: Fri May 5 16:36:53 2017 +0200 bridge: netlink: account for IFLA_BRPORT_{B, M}CAST_FLOOD size and policy The attribute sizes for IFLA_BRPORT_MCAST_FLOOD and IFLA_BRPORT_BCAST_FLOOD weren't accounted for in br_port_info_size() when they were added. Do so now and also add the corresponding policy entries: Cc: Nikolay Aleksandrov Cc: Mike Manning Fixes: b6cb5ac8331b ("net: bridge: add per-port multicast flood flag") Fixes: 99f906e9ad7b ("bridge: add per-port broadcast flood flag") Signed-off-by: Tobias Klauser Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_netlink.c | 4 ++++ 1 file changed, 4 insertions(+) commit 657314b7a5d16961e7e0ecdae4a59d28123e74c0 Author: Lucas Stach Date: Fri Apr 28 17:30:52 2017 +0200 drm/etnaviv: don't put fence in case of submit failure If we bail out of the submit before actually adding the cmdstream to the kernel ring there is no valid fence to put. Make sure to skip the fence_put in that case. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 85435d7a15294f9f7ef23469e6aaf7c5dfcc54f0 Author: Björn Jacke Date: Fri May 5 04:36:16 2017 +0200 CIFS: add misssing SFM mapping for doublequote SFM is mapping doublequote to 0xF020 Without this patch creating files with doublequote fails to Windows/Mac Signed-off-by: Bjoern Jacke Signed-off-by: Steve French CC: stable fs/cifs/cifs_unicode.c | 6 ++++++ fs/cifs/cifs_unicode.h | 1 + 2 files changed, 7 insertions(+) commit f4b65b9563216b3e01a5cc844c3ba68901d9b195 Author: Che-Liang Chiou Date: Fri Apr 7 10:12:36 2017 +0200 HID: magicmouse: Set multi-touch keybits for Magic Mouse The driver emits multi-touch events for Magic Trackpad as well as Magic Mouse, but it does not set keybits that are related to multi-touch event for Magic Mouse; so set these keybits. The keybits that are not set cause trouble because user programs often probe these keybits for self-configuration and thus they cannot operate properly if the keybits are not set. One of such troubles is that libevdev will not be able to emit correct touch count, causing gestures library failed to do fling stop. Signed-off-by: Che-Liang Chiou Signed-off-by: Thierry Escande Signed-off-by: Jiri Kosina drivers/hid/hid-magicmouse.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 2ac97f0f6654da14312d125005c77a6010e0ea38 Author: Jason Gerecke Date: Tue Apr 25 11:29:56 2017 -0700 HID: wacom: Have wacom_tpc_irq guard against possible NULL dereference The following Smatch complaint was generated in response to commit 2a6cdbd ("HID: wacom: Introduce new 'touch_input' device"): drivers/hid/wacom_wac.c:1586 wacom_tpc_irq() error: we previously assumed 'wacom->touch_input' could be null (see line 1577) The 'touch_input' and 'pen_input' variables point to the 'struct input_dev' used for relaying touch and pen events to userspace, respectively. If a device does not have a touch interface or pen interface, the associated input variable is NULL. The 'wacom_tpc_irq()' function is responsible for forwarding input reports to a more-specific IRQ handler function. An unknown report could theoretically be mistaken as e.g. a touch report on a device which does not have a touch interface. This can be prevented by only calling the pen/touch functions are called when the pen/touch pointers are valid. Fixes: 2a6cdbd ("HID: wacom: Introduce new 'touch_input' device") Signed-off-by: Jason Gerecke Reviewed-by: Ping Cheng Cc: stable@vger.kernel.org Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) commit bb4d5e38decf3f3c6bf170d19603949abb4d4b99 Merge: a6128f4 ef1d87e Author: Zhang Rui Date: Fri May 5 20:30:09 2017 +0800 Merge branch 'backup-thermal-shutdown' into next commit a6128f47f7940d8388ca7c8623fbe24e52f8fae6 Merge: 771ffa1 68b2440 Author: Zhang Rui Date: Fri May 5 20:30:03 2017 +0800 Merge branches 'thermal-core' and 'thermal-intel' into next commit 92f66f84d9695d07adf9bc987bbcce4bf9b8e87c Author: Catalin Marinas Date: Tue Apr 25 15:42:31 2017 +0100 arm64: Fix the DMA mmap and get_sgtable API with DMA_ATTR_FORCE_CONTIGUOUS While honouring the DMA_ATTR_FORCE_CONTIGUOUS on arm64 (commit 44176bb38fa4: "arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU"), the existing uses of dma_mmap_attrs() and dma_get_sgtable() have been broken by passing a physically contiguous vm_struct with an invalid pages pointer through the common iommu API. Since the coherent allocation with DMA_ATTR_FORCE_CONTIGUOUS uses CMA, this patch simply reuses the existing swiotlb logic for mmap and get_sgtable. Note that the current implementation of get_sgtable (both swiotlb and iommu) is broken if dma_declare_coherent_memory() is used since such memory does not have a corresponding struct page. To be addressed in a subsequent patch. Fixes: 44176bb38fa4 ("arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU") Reported-by: Andrzej Hajda Cc: Geert Uytterhoeven Acked-by: Robin Murphy Tested-by: Andrzej Hajda Reviewed-by: Andrzej Hajda Signed-off-by: Catalin Marinas arch/arm64/mm/dma-mapping.c | 65 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 16 deletions(-) commit dcfd9b215b89d72c1053a717571d52bf96cc64f8 Author: Fabian Frederick Date: Tue Mar 28 20:16:46 2017 +0200 befs: make export work with cold dcache based on commit b3b42c0deaa1 ("fs/affs: make export work with cold dcache") This adds get_parent function so that nfs client can still work after cache drop (Tested on NFS v4 with echo 3 > /proc/sys/vm/drop_caches) Signed-off-by: Fabian Frederick Signed-off-by: Luis de Bethencourt fs/befs/linuxvfs.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 7f48d0b48cba2ddc03d09353ba4ef6ae680da520 Author: Colin Ian King Date: Tue Apr 25 10:05:12 2017 +0100 drm/i915/gvt: fix typo: "supporte" -> "support" trivial fix to typo in WARN_ONCE message Signed-off-by: Colin Ian King Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65f2673832d4647f6d46783d8d745d2b15d090c4 Author: Amir Goldstein Date: Tue Apr 25 17:28:31 2017 +0300 ovl: update documentation w.r.t. constant inode numbers Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi Documentation/filesystems/overlayfs.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 5b6c9053fb38a66fd5c6177fcf5022b24767811a Author: Amir Goldstein Date: Mon Apr 24 19:54:13 2017 +0300 ovl: persistent inode numbers for upper hardlinks An upper type non directory dentry that is a copy up target should have a reference to its lower copy up origin. There are three ways for an upper type dentry to be instantiated: 1. A lower type dentry that is being copied up 2. An entry that is found in upper dir by ovl_lookup() 3. A negative dentry is hardlinked to an upper type dentry In the first case, the lower reference is set before copy up. In the second case, the lower reference is found by ovl_lookup(). In the last case of hardlinked upper dentry, it is not easy to update the lower reference of the negative dentry. Instead, drop the newly hardlinked negative dentry from dcache and let the next access call ovl_lookup() to find its lower reference. This makes sure that the inode number reported by stat(2) after the hardlink is created is the same inode number that will be reported by stat(2) after mount cycle, which is the inode number of the lower copy up origin of the hardlink source. NOTE that this does not fix breaking of lower hardlinks on copy up, but only fixes the case of lower nlink == 1, whose upper copy up inode is hardlinked in upper dir. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/dir.c | 3 +++ 1 file changed, 3 insertions(+) commit 5b712091a3a3904b0ae8311e18e6b540a070d464 Author: Miklos Szeredi Date: Fri May 5 11:38:58 2017 +0200 ovl: merge getattr for dir and nondir Signed-off-by: Miklos Szeredi fs/overlayfs/dir.c | 61 +----------------------------------------------- fs/overlayfs/inode.c | 31 ++++++++++++++++++++---- fs/overlayfs/overlayfs.h | 2 ++ 3 files changed, 30 insertions(+), 64 deletions(-) commit 72b608f08528458334218a809d66ea94d924c378 Author: Amir Goldstein Date: Mon Apr 24 00:25:49 2017 +0300 ovl: constant st_ino/st_dev across copy up When all layers are on the same underlying filesystem, let stat(2) return st_dev/st_ino values of the copy up origin inode if it is known. This results in constant st_ino/st_dev representation of files in an overlay mount before and after copy up. When the underlying filesystem support NFS exportfs, the result is also persistent st_ino/st_dev representation before and after mount cycle. Lower hardlinks are broken on copy up to different upper files, so we cannot use the lower origin st_ino for those different files, even for the same fs case. When all overlay layers are on the same fs, use overlay st_dev for non-dirs to get the correct result from du -x. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit b7a807dc2010334e62e0afd89d6f7a8913eb14ff Author: Amir Goldstein Date: Mon Apr 24 09:37:28 2017 +0300 ovl: persistent inode number for directories stat(2) on overlay directories reports the overlay temp inode number, which is constant across copy up, but is not persistent. When all layers are on the same fs, report the copy up origin inode number for directories. This inode number is persistent, unique across the overlay mount and constant across copy up. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/dir.c | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) commit 595485033db2c24178257698254fd4182fdb4123 Author: Amir Goldstein Date: Sun Apr 23 23:12:34 2017 +0300 ovl: set the ORIGIN type flag For directory entries, non zero oe->numlower implies OVL_TYPE_MERGE. Define a new type flag OVL_TYPE_ORIGIN to indicate that an entry holds a reference to its lower copy up origin. For directory entries ORIGIN := MERGE && UPPER. For non-dir entries ORIGIN means that a lower type dentry has been recently copied up or that we were able to find the copy up origin from overlay.origin xattr. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/overlayfs.h | 2 ++ fs/overlayfs/util.c | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) commit a9d019573e881472aa62f093fa599ad68cd0fc1e Author: Amir Goldstein Date: Sun Apr 30 14:46:31 2017 +0300 ovl: lookup non-dir copy-up-origin by file handle If overlay.origin xattr is found on a non-dir upper inode try to get lower dentry by calling exportfs_decode_fh(). On failure to lookup by file handle to lower layer, do not lookup the copy up origin by name, because the lower found by name could be another file in case the upper file was renamed. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 132 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) commit c22205d0584bc65cfc9a65db0e15a9b69f5cdf64 Author: Amir Goldstein Date: Wed Apr 26 23:40:52 2017 +0300 ovl: use an auxiliary var for overlay root entry Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 3a1e819b4e80216e00ef6a4dfe67fa142450c5e1 Author: Amir Goldstein Date: Thu Mar 30 15:22:16 2017 +0300 ovl: store file handle of lower inode on copy up Sometimes it is interesting to know if an upper file is pure upper or a copy up target, and if it is a copy up target, it may be interesting to find the copy up origin. This will be used to preserve lower inode numbers across copy up. Store the lower inode file handle in upper inode extended attribute overlay.origin on copy up to use it later for these cases. Store the lower filesystem uuid along side the file handle, so we can validate that we are looking for the origin file in the original fs. If lower fs does not support NFS export ops store a zero sized xattr so we can always use the overlay.origin xattr to distinguish between a copy up and a pure upper inode. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++ fs/overlayfs/overlayfs.h | 36 +++++++++++++++++++++ 2 files changed, 118 insertions(+) commit 7bcd74b98d7bac3e5149894caaf72de6989af7f0 Author: Amir Goldstein Date: Wed Mar 22 08:42:21 2017 -0400 ovl: check if all layers are on the same fs Some features can only work when all layers are on the same fs. Test this condition during mount time, so features can check them later. Add helper ovl_same_sb() to return the common super block in case all layers are on the same fs. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/overlayfs.h | 1 + fs/overlayfs/ovl_entry.h | 2 ++ fs/overlayfs/super.c | 8 ++++++++ fs/overlayfs/util.c | 7 +++++++ 4 files changed, 18 insertions(+) commit d162809f85b4f54ef075517ffa2f3d02e55d5a53 Author: Boris Ostrovsky Date: Wed May 3 16:20:51 2017 -0400 xen/x86: Do not call xen_init_time_ops() until shared_info is initialized Routines that are set by xen_init_time_ops() use shared_info's pvclock_vcpu_time_info area. This area is not properly available until shared_info is mapped in xen_setup_shared_info(). This became especially problematic due to commit dd759d93f4dd ("x86/timers: Add simple udelay calibration") where we end up reading tsc_to_system_mul from xen_dummy_shared_info (i.e. getting zero value) and then trying to divide by it in pvclock_tsc_khz(). Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/enlighten_pv.c | 9 +++++++-- arch/x86/xen/time.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) commit 40f4ac0b510dbf9f00668ded5474290940616d09 Author: Juergen Gross Date: Tue Apr 25 08:47:40 2017 +0200 x86/xen: fix xsave capability setting Commit 690b7f10b4f9f ("x86/xen: use capabilities instead of fake cpuid values for xsave") introduced a regression as it tried to make use of the fixup feature before it being available. Fall back to the old variant testing via cpuid(). Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross arch/x86/xen/enlighten_pv.c | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) commit 2e5b0bd9cc6172edef502dfae28ae790f74a882e Author: Jim Mattson Date: Thu May 4 11:51:58 2017 -0700 kvm: nVMX: Don't validate disabled secondary controls According to the SDM, if the "activate secondary controls" primary processor-based VM-execution control is 0, no checks are performed on the secondary processor-based VM-execution controls. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ef1d87e06ab4d3f9a95f02517ecc50902dc233a7 Author: Keerthy Date: Tue Apr 18 09:59:59 2017 +0530 thermal: core: Add a back up thermal shutdown mechanism orderly_poweroff is triggered when a graceful shutdown of system is desired. This may be used in many critical states of the kernel such as when subsystems detects conditions such as critical temperature conditions. However, in certain conditions in system boot up sequences like those in the middle of driver probes being initiated, userspace will be unable to power off the system in a clean manner and leaves the system in a critical state. In cases like these, the /sbin/poweroff will return success (having forked off to attempt powering off the system. However, the system overall will fail to completely poweroff (since other modules will be probed) and the system is still functional with no userspace (since that would have shut itself off). However, there is no clean way of detecting such failure of userspace powering off the system. In such scenarios, it is necessary for a backup workqueue to be able to force a shutdown of the system when orderly shutdown is not successful after a configurable time period. Reported-by: Nishanth Menon Signed-off-by: Keerthy Acked-by: Eduardo Valentin Signed-off-by: Zhang Rui Documentation/thermal/sysfs-api.txt | 21 +++++++++++++++ drivers/thermal/Kconfig | 17 ++++++++++++ drivers/thermal/thermal_core.c | 53 +++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) commit e441fd68663e298e99a99e215e0144a0eda6250d Author: Keerthy Date: Tue Apr 18 09:59:58 2017 +0530 thermal: core: Allow orderly_poweroff to be called only once thermal_zone_device_check --> thermal_zone_device_update --> handle_thermal_trip --> handle_critical_trips --> orderly_poweroff The above sequence happens every 250/500 mS based on the configuration. The orderly_poweroff function is getting called every 250/500 mS. With a full fledged file system it takes at least 5-10 Seconds to power off gracefully. In that period due to the thermal_zone_device_check triggering periodically the thermal work queues bombard with orderly_poweroff calls multiple times eventually leading to failures in gracefully powering off the system. Make sure that orderly_poweroff is called only once. Signed-off-by: Keerthy Acked-by: Eduardo Valentin Signed-off-by: Zhang Rui drivers/thermal/thermal_core.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 68b2440b2a4beaa393d8ed97ac619fd1c94a549e Author: Brian Bian Date: Wed Apr 12 14:07:17 2017 -0700 Thermal: Intel SoC DTS: Change interrupt request behavior The interrupt request call in Intel SoC DTS driver may fail if there is no underlying BIOS support. However, the user space thermal daemon can still use the thermal zones created by the SoC DTS driver in polling mode, therefore, instead of bailing out on interrupt request failures, it is better just to log a warning message and continue the init process. Signed-off-by: Brian Bian Signed-off-by: Zhang Rui drivers/thermal/intel_soc_dts_thermal.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 771ffa14ead18887bed400c09f4bde5bca5bf342 Author: Lukasz Luba Date: Thu May 4 12:34:33 2017 +0100 trace: thermal: add another parameter 'power' to the tracing function This patch adds another parameter to the trace function: trace_thermal_power_devfreq_get_power(). In case when we call directly driver's code for the real power, we do not have static/dynamic_power values. Instead we get total power in the '*power' value. The 'static_power' and 'dynamic_power' are set to 0. Therefore, we have to trace that '*power' value in this scenario. CC: Steven Rostedt CC: Ingo Molnar CC: Zhang Rui CC: Eduardo Valentin Acked-by: Javi Merino Signed-off-by: Lukasz Luba drivers/thermal/devfreq_cooling.c | 2 +- include/trace/events/thermal.h | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) commit 2be83da85a64773efaa407639de81bd1377f880e Author: Lukasz Luba Date: Thu May 4 12:34:32 2017 +0100 thermal: devfreq_cooling: add new interface for direct power read This patch introduces a new interface for device drivers connected to devfreq_cooling in the thermal framework: get_real_power(). Some devices have more sophisticated methods (like power counters) to approximate the actual power that they use. In the previous implementation we had a pre-calculated power table which was then scaled by 'utilization' ('busy_time' and 'total_time' taken from devfreq 'last_status'). With this new interface the driver can provide more precise data regarding actual power to the thermal governor every time the power budget is calculated. We then use this value and calculate the real resource utilization scaling factor. Reviewed-by: Chris Diamand Acked-by: Javi Merino Signed-off-by: Lukasz Luba drivers/thermal/devfreq_cooling.c | 105 +++++++++++++++++++++++++++++--------- include/linux/devfreq_cooling.h | 19 +++++++ 2 files changed, 101 insertions(+), 23 deletions(-) commit e34cab4cd1f98b4daed5bc98fe727e63f8dbf4e4 Author: Lukasz Luba Date: Thu May 4 12:34:31 2017 +0100 thermal: devfreq_cooling: refactor code and add get_voltage function Move the code which gets the voltage for a given frequency. This code will be resused in few places. Acked-by: Javi Merino Signed-off-by: Lukasz Luba drivers/thermal/devfreq_cooling.c | 45 ++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 17 deletions(-) commit 17a9be31747535184f2af156b1f080ec4c92a952 Author: Stafford Horne Date: Thu May 4 21:15:56 2017 +0900 initramfs: Always do fput() and load modules after rootfs populate In OpenRISC we do not have a bootloader passed initrd, but the built in initramfs does contain the /init and other binaries, including modules. The previous commit 08865514805d2 ("initramfs: finish fput() before accessing any binary from initramfs") made a change to only call fput() if the bootloader initrd was available, this caused intermittent crashes for OpenRISC. This patch changes the fput() to happen unconditionally if any rootfs is loaded. Also, I added some comments to make it a bit more clear why we call unpack_to_rootfs() multiple times. Fixes: 08865514805d2 ("initramfs: finish fput() before accessing any binary from initramfs") Cc: stable@vger.kernel.org Cc: Lokesh Vutla Cc: Al Viro Acked-by: Al Viro Signed-off-by: Stafford Horne init/initramfs.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 736163671bcb163fc82600b46c83dfa89d532d95 Merge: d5483fe 1ef97fe Author: Dan Williams Date: Thu May 4 23:38:43 2017 -0700 Merge branch 'for-4.12/dax' into libnvdimm-for-next commit 121843eb02a6e2fa30aefab64bfe183c97230c75 Author: Matthias Kaehlcke Date: Mon May 1 15:47:41 2017 -0700 x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompatibility The constraint "rm" allows the compiler to put mix_const into memory. When the input operand is a memory location then MUL needs an operand size suffix, since Clang can't infer the multiplication width from the operand. Add and use the _ASM_MUL macro which determines the operand size and resolves to the NUL instruction with the corresponding suffix. This fixes the following error when building with clang: CC arch/x86/lib/kaslr.o /tmp/kaslr-dfe1ad.s: Assembler messages: /tmp/kaslr-dfe1ad.s:182: Error: no instruction mnemonic suffix given and no register operands; can't size instruction Signed-off-by: Matthias Kaehlcke Cc: Grant Grundler Cc: Greg Hackmann Cc: Kees Cook Cc: Linus Torvalds Cc: Michael Davidson Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170501224741.133938-1-mka@chromium.org Signed-off-by: Ingo Molnar arch/x86/include/asm/asm.h | 1 + arch/x86/lib/kaslr.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 61baf15555129f69720334f232b153890895ef71 Author: Scott Wood Date: Fri May 5 01:22:06 2017 -0500 powerpc/64e: Don't place the stack beyond TASK_SIZE Commit f4ea6dcb08ea ("powerpc/mm: Enable mappings above 128TB") increased the task size on book3s, and introduced a mechanism to dynamically control whether a task uses these larger addresses. While the change to the task size itself was ifdef-protected to only apply on book3s, the change to STACK_TOP_USER64 was not. On book3e, this had the effect of trying to use addresses up to 128TiB for the stack despite a 64TiB task size limit -- which broke 64-bit userspace producing the following errors: Starting init: /sbin/init exists but couldn't execute it (error -14) Starting init: /bin/sh exists but couldn't execute it (error -14) Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. Fixes: f4ea6dcb08ea ("powerpc/mm: Enable mappings above 128TB") Cc: Aneesh Kumar K.V Signed-off-by: Scott Wood arch/powerpc/include/asm/processor.h | 5 +++++ 1 file changed, 5 insertions(+) commit fc5f9d5f151c9fff21d3d1d2907b888a5aec3ff7 Author: Baoquan He Date: Thu May 4 10:25:47 2017 +0800 x86/mm: Fix boot crash caused by incorrect loop count calculation in sync_global_pgds() Jeff Moyer reported that on his system with two memory regions 0~64G and 1T~1T+192G, and kernel option "memmap=192G!1024G" added, enabling KASLR will make the system hang intermittently during boot. While adding 'nokaslr' won't. The back trace is: Oops: 0000 [#1] SMP RIP: memcpy_erms() [ .... ] Call Trace: pmem_rw_page() bdev_read_page() do_mpage_readpage() mpage_readpages() blkdev_readpages() __do_page_cache_readahead() force_page_cache_readahead() page_cache_sync_readahead() generic_file_read_iter() blkdev_read_iter() __vfs_read() vfs_read() SyS_read() entry_SYSCALL_64_fastpath() This crash happens because the for loop count calculation in sync_global_pgds() is not correct. When a mapping area crosses PGD entries, we should calculate the starting address of region which next PGD covers and assign it to next for loop count, but not add PGDIR_SIZE directly. The old code works right only if the mapping area is an exact multiple of PGDIR_SIZE, otherwize the end region could be skipped so that it can't be synchronized to all other processes from kernel PGD init_mm.pgd. In Jeff's system, emulated pmem area [1024G, 1216G) is smaller than PGDIR_SIZE. While 'nokaslr' works because PAGE_OFFSET is 1T aligned, it makes this area be mapped inside one PGD entry. With KASLR enabled, this area could cross two PGD entries, then the next PGD entry won't be synced to all other processes. That is why we saw empty PGD. Fix it. Reported-by: Jeff Moyer Signed-off-by: Baoquan He Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Dave Hansen Cc: Dave Young Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jinbum Park Cc: Josh Poimboeuf Cc: Kees Cook Cc: Kirill A. Shutemov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Garnier Cc: Thomas Gleixner Cc: Yasuaki Ishimatsu Cc: Yinghai Lu Link: http://lkml.kernel.org/r/1493864747-8506-1-git-send-email-bhe@redhat.com Signed-off-by: Ingo Molnar arch/x86/mm/init_64.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 415812f2d6b856d33ede9bf4a2b95575dbbb3d4e Merge: 42fc6c6 d3b5d35 Author: Ingo Molnar Date: Fri May 5 08:20:52 2017 +0200 Merge branch 'linus' into x86/urgent, to pick up dependent commits We are going to fix a bug introduced by a more recent commit, so refresh the tree. Signed-off-by: Ingo Molnar commit 5ea30e4e58040cfd6434c2f33dc3ea76e2c15b05 Author: Daniel Micay Date: Thu May 4 09:32:09 2017 -0400 stackprotector: Increase the per-task stack canary's random range from 32 bits to 64 bits on 64-bit platforms The stack canary is an 'unsigned long' and should be fully initialized to random data rather than only 32 bits of random data. Signed-off-by: Daniel Micay Acked-by: Arjan van de Ven Acked-by: Rik van Riel Acked-by: Kees Cook Cc: Arjan van Ven Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-hardening@lists.openwall.com Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20170504133209.3053-1-danielmicay@gmail.com Signed-off-by: Ingo Molnar kernel/fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42fc6c6cb1662ba2fa727dd01c9473c63be4e3b6 Author: Josh Poimboeuf Date: Thu May 4 09:51:40 2017 -0500 x86/asm: Don't use RBP as a temporary register in csum_partial_copy_generic() Andrey Konovalov reported the following warning while fuzzing the kernel with syzkaller: WARNING: kernel stack regs at ffff8800686869f8 in a.out:4933 has bad 'bp' value c3fc855a10167ec0 The unwinder dump revealed that RBP had a bad value when an interrupt occurred in csum_partial_copy_generic(). That function saves RBP on the stack and then overwrites it, using it as a scratch register. That's problematic because it breaks stack traces if an interrupt occurs in the middle of the function. Replace the usage of RBP with another callee-saved register (R15) so stack traces are no longer affected. Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Josh Poimboeuf Cc: Cong Wang Cc: David S . Miller Cc: Dmitry Vyukov Cc: Eric Dumazet Cc: Kostya Serebryany Cc: Linus Torvalds Cc: Marcelo Ricardo Leitner Cc: Neil Horman Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vlad Yasevich Cc: linux-sctp@vger.kernel.org Cc: netdev Cc: syzkaller Link: http://lkml.kernel.org/r/4b03a961efda5ec9bfe46b7b9c9ad72d1efad343.1493909486.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/lib/csum-copy_64.S | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d906d8af28e524bfa62c49cb2315f6ccdb910938 Author: Mike Christie Date: Tue May 2 23:57:05 2017 -0500 tcmu: fix module removal due to stuck thread We need to do a kthread_should_stop to check when kthread_stop has been called. This was a regression added in b6df4b79a5514a9c6c53533436704129ef45bf76 tcmu: Add global data block pool support so not sure if you wanted to merge it in with that patch or what. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 3 +++ 1 file changed, 3 insertions(+) commit 46861cdd80e1a862dc65d10833a1450861fabef7 Author: Nicholas Bellinger Date: Tue Apr 25 13:52:45 2017 -0700 target: Don't force session reset if queue_depth does not change Keeping in the idempotent nature of target_core_fabric_configfs.c, if a queue_depth value is set and it's the same as the existing value, don't attempt to force session reinstatement. Reported-by: Raghu Krishnamurthy Cc: Raghu Krishnamurthy Tested-by: Gary Guo Cc: Gary Guo Signed-off-by: Nicholas Bellinger drivers/target/target_core_tpg.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 197b806ae5db60c6f609d74da04ddb62ea5e1b00 Author: Nicholas Bellinger Date: Tue Apr 25 10:55:12 2017 -0700 iscsi-target: Set session_fall_back_to_erl0 when forcing reinstatement While testing modification of per se_node_acl queue_depth forcing session reinstatement via lio_target_nacl_cmdsn_depth_store() -> core_tpg_set_initiator_node_queue_depth(), a hung task bug triggered when changing cmdsn_depth invoked session reinstatement while an iscsi login was already waiting for session reinstatement to complete. This can happen when an outstanding se_cmd descriptor is taking a long time to complete, and session reinstatement from iscsi login or cmdsn_depth change occurs concurrently. To address this bug, explicitly set session_fall_back_to_erl0 = 1 when forcing session reinstatement, so session reinstatement is not attempted if an active session is already being shutdown. This patch has been tested with two scenarios. The first when iscsi login is blocked waiting for iscsi session reinstatement to complete followed by queue_depth change via configfs, and second when queue_depth change via configfs us blocked followed by a iscsi login driven session reinstatement. Note this patch depends on commit d36ad77f702 to handle multiple sessions per se_node_acl when changing cmdsn_depth, and for pre v4.5 kernels will need to be included for stable as well. Reported-by: Gary Guo Tested-by: Gary Guo Cc: Gary Guo Cc: # v4.1+ Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 1 + drivers/target/iscsi/iscsi_target_configfs.c | 1 + drivers/target/iscsi/iscsi_target_login.c | 1 + 3 files changed, 3 insertions(+) commit a71a5dc7f833943998e97ca8fa6a4c708a0ed1a9 Author: Nicholas Bellinger Date: Tue Apr 11 16:24:16 2017 -0700 target: Fix compare_and_write_callback handling for non GOOD status Following the bugfix for handling non SAM_STAT_GOOD COMPARE_AND_WRITE status during COMMIT phase in commit 9b2792c3da1, the same bug exists for the READ phase as well. This would manifest first as a lost SCSI response, and eventual hung task during fabric driver logout or re-login, as existing shutdown logic waited for the COMPARE_AND_WRITE se_cmd->cmd_kref to reach zero. To address this bug, compare_and_write_callback() has been changed to set post_ret = 1 and return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE as necessary to signal failure status. Reported-by: Bill Borsari Cc: Bill Borsari Tested-by: Gary Guo Cc: Gary Guo Cc: # v4.1+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_sbc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d5483feda85a8f39ee2e940e279547c686aac30c Author: Dan Williams Date: Thu May 4 19:54:42 2017 -0700 libnvdimm, pfn: fix 'npfns' vs section alignment Fix failures to create namespaces due to the vmem_altmap not advertising enough free space to store the memmap. WARNING: CPU: 15 PID: 8022 at arch/x86/mm/init_64.c:656 arch_add_memory+0xde/0xf0 [..] Call Trace: dump_stack+0x63/0x83 __warn+0xcb/0xf0 warn_slowpath_null+0x1d/0x20 arch_add_memory+0xde/0xf0 devm_memremap_pages+0x244/0x440 pmem_attach_disk+0x37e/0x490 [nd_pmem] nd_pmem_probe+0x7e/0xa0 [nd_pmem] nvdimm_bus_probe+0x71/0x120 [libnvdimm] driver_probe_device+0x2bb/0x460 bind_store+0x114/0x160 drv_attr_store+0x25/0x30 In commit 658922e57b84 "libnvdimm, pfn: fix memmap reservation sizing" we arranged for the capacity to be allocated, but failed to also update the 'npfns' parameter. This leads to cases where there is enough capacity reserved to hold all the allocated sections, but vmemmap_populate_hugepages() still encounters -ENOMEM from altmap_alloc_block_buf(). This fix is a stop-gap until we can teach the core memory hotplug implementation to permit sub-section hotplug. Cc: Fixes: 658922e57b84 ("libnvdimm, pfn: fix memmap reservation sizing") Reported-by: Anisha Allada Signed-off-by: Dan Williams drivers/nvdimm/pfn_devs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit af82455f7dbd9dc20244d80d033721b30d22c065 Merge: 0be7517 2a76f89 Author: Linus Torvalds Date: Thu May 4 19:07:10 2017 -0700 Merge tag 'char-misc-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver updates from Greg KH: "Here is the big set of new char/misc driver drivers and features for 4.12-rc1. There's lots of new drivers added this time around, new firmware drivers from Google, more auxdisplay drivers, extcon drivers, fpga drivers, and a bunch of other driver updates. Nothing major, except if you happen to have the hardware for these drivers, and then you will be happy :) All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (136 commits) firmware: google memconsole: Fix return value check in platform_memconsole_init() firmware: Google VPD: Fix return value check in vpd_platform_init() goldfish_pipe: fix build warning about using too much stack. goldfish_pipe: An implementation of more parallel pipe fpga fr br: update supported version numbers fpga: region: release FPGA region reference in error path fpga altera-hps2fpga: disable/unprepare clock on error in alt_fpga_bridge_probe() mei: drop the TODO from samples firmware: Google VPD sysfs driver firmware: Google VPD: import lib_vpd source files misc: lkdtm: Add volatile to intentional NULL pointer reference eeprom: idt_89hpesx: Add OF device ID table misc: ds1682: Add OF device ID table misc: tsl2550: Add OF device ID table w1: Remove unneeded use of assert() and remove w1_log.h w1: Use kernel common min() implementation uio_mf624: Align memory regions to page size and set correct offsets uio_mf624: Refactor memory info initialization uio: Allow handling of non page-aligned memory regions hangcheck-timer: Fix typo in comment ... commit 8676df503092dcdd757b1120fab03bfbce0ae1e7 Author: Daniel Vetter Date: Tue Apr 18 12:10:57 2017 +0200 drm: Document code of conduct freedesktop.org has adopted a formal&enforced code of conduct: https://www.fooishbar.org/blog/fdo-contributor-covenant/ https://www.freedesktop.org/wiki/CodeOfConduct/ Besides formalizing things a bit more I don't think this changes anything for us, we've already peer-enforced respectful and constructive interactions since a long time. But it's good to document things properly. v2: Drop confusing note from commit message and clarify the grammer (Chris, Alex and others). Cc: Daniel Stone Cc: Keith Packard Cc: tfheen@err.no Signed-off-by: Daniel Vetter Reviewed-by: Daniel Stone Reviewed-by: Sumit Semwal Acked-by: Archit Taneja Reviewed-by: Martin Peres Acked-by: Thierry Reding Acked-by: Jani Nikula Acked-by: Vincent Abriou Acked-by: Neil Armstrong Reviewed-by: Maarten Lankhorst Acked-by: Brian Starkey Acked-by: Rob Clark Reviewed-by: David Herrmann Acked-by: Sean Paul Reviewed-by: Harry Wentland Reviewed-by: Eric Anholt Acked-by: Alex Deucher Acked-by: Gustavo Padovan Acked-by: Michel Dänzer Acked-by: Laurent Pinchart Acked-by: Sumit Semwal Acked-by: Keith Packard Acked-by: Gabriel Krisman Bertazi Acked-by: Adam Jackson Signed-off-by: Dave Airlie Documentation/gpu/introduction.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 644b4930bf7e2adeffbe842e1097f7933c6a9158 Merge: 8b03d1e b0d36da Author: Dave Airlie Date: Fri May 5 11:47:01 2017 +1000 Merge tag 'drm/tegra/for-4.12-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Changes for v4.12-rc1 This contains various fixes to the host1x driver as well as a plug for a leak of kernel pointers to userspace. A fairly big addition this time around is the Video Image Composer (VIC) support that can be used to accelerate some 2D and image compositing operations. Furthermore the driver now supports FB modifiers, so we no longer rely on a custom IOCTL to set those. Finally this contains a few preparatory patches for Tegra186 support which unfortunately didn't quite make it this time, but will hopefully be ready for v4.13. * tag 'drm/tegra/for-4.12-rc1' of git://anongit.freedesktop.org/tegra/linux: gpu: host1x: Fix host1x driver shutdown gpu: host1x: Support module reset gpu: host1x: Sort includes alphabetically drm/tegra: Add VIC support dt-bindings: Add bindings for the Tegra VIC drm/tegra: Add falcon helper library drm/tegra: Add Tegra DRM allocation API drm/tegra: Add tiling FB modifiers drm/tegra: Don't leak kernel pointer to userspace drm/tegra: Protect IOMMU operations by mutex drm/tegra: Enable IOVA API when IOMMU support is enabled gpu: host1x: Add IOMMU support gpu: host1x: Fix potential out-of-bounds access iommu/iova: Fix compile error with CONFIG_IOMMU_IOVA=m iommu: Add dummy implementations for !IOMMU_IOVA MAINTAINERS: Add related headers to IOMMU section iommu/iova: Consolidate code for adding new node to iovad domain rbtree commit 0be75179df5e20306528800fc7c6a504b12b97db Merge: 8f28472 523aa35 Author: Linus Torvalds Date: Thu May 4 18:27:46 2017 -0700 Merge tag 'driver-core-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Very tiny pull request for 4.12-rc1 for the driver core this time around. There are some documentation fixes, an eventpoll.h fixup to make it easier for the libc developers to take our header files directly, and some very minor driver core fixes and changes. All have been in linux-next for a very long time with no reported issues" * tag 'driver-core-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: Revert "kref: double kref_put() in my_data_handler()" driver core: don't initialize 'parent' in device_add() drivers: base: dma-mapping: use nth_page helper Documentation/ABI: add information about cpu_capacity debugfs: set no_llseek in DEFINE_DEBUGFS_ATTRIBUTE eventpoll.h: add missing epoll event masks eventpoll.h: fix epoll event masks commit 8f28472a739e8e39adc6e64ee5b460df039f0e4f Merge: 4ac4d58 c034a43 Author: Linus Torvalds Date: Thu May 4 18:03:51 2017 -0700 Merge tag 'usb-4.12-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.12-rc1. Lots of good stuff here, after many many many attempts, the kernel finally has a working typeC interface, many thanks to Heikki and Guenter and others who have taken the time to get this merged. It wasn't an easy path for them at all. There's also a staging driver that uses this new api, which is why it's coming in through this tree. Along with that, there's the usual huge number of changes for gadget drivers, xhci, and other stuff. Johan also finally refactored pretty much every driver that was looking at USB endpoints to do it in a common way, which will help prevent any "badly-formed" devices from causing problems in drivers. That too wasn't a simple task. All of these have been in linux-next for a while with no reported issues" * tag 'usb-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (263 commits) staging: typec: Fairchild FUSB302 Type-c chip driver staging: typec: Type-C Port Controller Interface driver (tcpci) staging: typec: USB Type-C Port Manager (tcpm) usb: host: xhci: remove #ifdef around PM functions usb: musb: don't mark of_dev_auxdata as initdata usb: misc: legousbtower: Fix buffers on stack USB: Revert "cdc-wdm: fix "out-of-sync" due to missing notifications" usb: Make sure usb/phy/of gets built-in USB: storage: e-mail update in drivers/usb/storage/unusual_devs.h usb: host: xhci: print correct command ring address usb: host: xhci: delete sp_dma_buffers for scratchpad usb: host: xhci: using correct specification chapter reference for DCBAAP xhci: switch to pci_alloc_irq_vectors usb: host: xhci-plat: set resume_quirk() for R-Car controllers usb: host: xhci-plat: add resume_quirk() usb: host: xhci-plat: enable clk in resume timing usb: host: plat: Enable xHCI plat runtime PM USB: serial: ftdi_sio: add device ID for Microsemi/Arrow SF2PLUS Dev Kit USB: serial: constify static arrays usb: fix some references for /proc/bus/usb ... commit 9bcaaea7418d09691f1ffab5c49aacafe3eef9d0 Author: Chris Mason Date: Thu May 4 16:08:08 2017 -0700 btrfs: fix the gfp_mask for the reada_zones radix tree Commits cc8385b59e17 and 7ef70b4d9987a7 added preallocation for the reada radix trees and also switched them over to GFP_KERNEL for the default gfp mask. Since we're doing radix tree insertions under spinlocks, we need to make sure the mask doesn't allow sleeping. This fix keeps the radix preallocation but switches back to the original gfp_mask. Reported-by: Filipe Manana Signed-off-by: Chris Mason fs/btrfs/disk-io.c | 2 +- fs/btrfs/volumes.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit deccf497d804a4c5fca2dbfad2f104675a6f9102 Author: David Howells Date: Thu May 4 23:30:16 2017 +0100 Make stat/lstat/fstatat pass AT_NO_AUTOMOUNT to vfs_statx() stat/lstat/fstatat need to pass AT_NO_AUTOMOUNT to vfs_statx() as the pre-statx code didn't set LOOKUP_AUTOMOUNT, even though fstatat() accepted the AT_NO_AUTOMOUNT flag. Fixes: a528d35e8bfc ("statx: Add a system call to make enhanced file info available") Reported-by: Ian Kent Signed-off-by: David Howells Tested-by: Ian Kent cc: stable@vger.kernel.org Signed-off-by: Al Viro include/linux/fs.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 67cf3623e097706b0ca03bf79bf28d60c39591eb Author: Sagi Grimberg Date: Thu May 4 16:23:07 2017 +0300 rxe: expose num_possible_cpus() cnum_comp_vectors They're completely logical, so don't impose an artificial limitation. Signed-off-by: Sagi Grimberg Reviewed-by: Leon Romanovsky Acked-by: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_param.h | 1 - drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit af5df5fb59ee01e78fd334c3d6202d9e7bcfddd3 Author: Leon Romanovsky Date: Thu May 4 15:36:07 2017 +0300 IB/rxe: Update caller's CRC for RXE_MEM_TYPE_DMA memory type Callers of rxe_mem_copy() provide pointer to store updated CRC value. That pointer was supposed to be updated, but the commit cee2688e3cd6 ("IB/rxe: Offload CRC calculation when possible") mistakenly removed that assignment for RXE_MEM_TYPE_DMA memory type. The code worked because there are no actual callers with RXE_MEM_TYPE_DMA, who are interested in returned value of crcp. The one caller in read_reply(), who uses the returned crcp didn't set RXE_MEM_TYPE_DMA as mem->type. Fixes: cee2688e3cd6 ("IB/rxe: Offload CRC calculation when possible") Reported-by: Andrew Boyer Signed-off-by: Leon Romanovsky Acked-by: Moni Shoua Reviewed-by: Andrew Boyer Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62239fc6e5545b2e59f83dfbc5db231a81f37a45 Author: Michael J. Ruhl Date: Thu May 4 05:15:21 2017 -0700 IB/hfi1: Clean up on context initialization failure The error path for context initialization is not consistent. Cleanup all resources on failure. Removed unused variable user_event_mask. Add the _BASE_FAILED bit to the event flags so that a base context can notify waiting sub contexts that they cannot continue. Running out of sub contexts is an EBUSY result, not EINVAL. Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 62 +++++++++++++++++++------------ drivers/infiniband/hw/hfi1/hfi.h | 16 +++----- drivers/infiniband/hw/hfi1/init.c | 10 ++--- drivers/infiniband/hw/hfi1/user_exp_rcv.c | 31 +++++++++------- drivers/infiniband/hw/hfi1/user_sdma.c | 61 +++++++++++++++--------------- 5 files changed, 95 insertions(+), 85 deletions(-) commit 8737ce95c463c6d8c4307ab3d6858cbf71cd4fc8 Author: Michael J. Ruhl Date: Thu May 4 05:15:15 2017 -0700 IB/hfi1: Fix an assign/ordering issue with shared context IDs The current algorithm for generating sub-context IDs is FILO. If the contexts are not closed in that order, the uniqueness of the ID will be compromised. I.e. logging the creation/deletion of context IDs with an application that assigns and closes in a FIFO order reveals: cache_id: assign: uctxt: 3 sub_ctxt: 0 cache_id: assign: uctxt: 3 sub_ctxt: 1 cache_id: assign: uctxt: 3 sub_ctxt: 2 cache_id: close: uctxt: 3 sub_ctxt: 0 cache_id: assign: uctxt: 3 sub_ctxt: 2 <<< The sub_ctxt ID 2 is reused incorrectly. Update the sub-context ID assign algorithm to use a bitmask of in_use contexts. The new algorithm will allow the contexts to be closed in any order, and will only re-use unused contexts. Size subctxt and subctxt_cnt to match the user API size. Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/driver.c | 2 +- drivers/infiniband/hw/hfi1/file_ops.c | 51 +++++++++++++++++++++------------- drivers/infiniband/hw/hfi1/hfi.h | 8 +++--- drivers/infiniband/hw/hfi1/init.c | 3 +- drivers/infiniband/hw/hfi1/intr.c | 3 +- drivers/infiniband/hw/hfi1/user_sdma.h | 2 +- 6 files changed, 41 insertions(+), 28 deletions(-) commit 9b60d2cbe07486658a32d4ed2fff7085c44bae7a Author: Michael J. Ruhl Date: Thu May 4 05:15:09 2017 -0700 IB/hfi1: Clean up context initialization Context initialization mixes base context init with sub context init. This is bad because contexts can be reused, and on reuse, reinit things that should not re-initialized. Normalize comments and function names to refer to base context and sub context (not main, shared or slaves). Separate the base context initialization from sub context initialization. hfi1_init_ctxt() cannot return an error so changed to a void and remove error message. Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 3 +- drivers/infiniband/hw/hfi1/chip.h | 2 +- drivers/infiniband/hw/hfi1/file_ops.c | 179 +++++++++++++++--------------- drivers/infiniband/hw/hfi1/hfi.h | 13 +-- drivers/infiniband/hw/hfi1/init.c | 10 +- drivers/infiniband/hw/hfi1/trace_ctxts.h | 17 ++- drivers/infiniband/hw/hfi1/user_exp_rcv.c | 84 +++++++------- drivers/infiniband/hw/hfi1/user_exp_rcv.h | 3 +- drivers/infiniband/hw/hfi1/vnic_main.c | 6 +- 9 files changed, 159 insertions(+), 158 deletions(-) commit 637a9a7febf8b48d2ac1916f34d639aa81998a8a Author: Michael J. Ruhl Date: Thu May 4 05:15:03 2017 -0700 IB/hfi1: Correctly clear the pkey In the close path the context is removed from the device array, and then the clear pkey function is called. The pkey function trys to get the context from the device array, but because it was removed the clearing does not occur. Rework pkey clear function to work as expected. Update the function variable to reflect the correct size and name of the hw_context. Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 34 ++++++++++++++-------------------- drivers/infiniband/hw/hfi1/chip.h | 2 +- drivers/infiniband/hw/hfi1/file_ops.c | 2 +- drivers/infiniband/hw/hfi1/vnic_main.c | 2 +- 4 files changed, 17 insertions(+), 23 deletions(-) commit 5fbded483c699823a7cca001a5c27ddc4d73370f Author: Michael J. Ruhl Date: Thu May 4 05:14:57 2017 -0700 IB/hfi1: Search shared contexts on the opened device, not all devices The search for available shared contexts walks each registered hfi1 device. This search is too broad because other devices may not be on the same fabric, and using its contexts could cause unexpected behavior. Removed walking the list of devices, limiting the search to the opened device. With the device walk removed, the hfi1_devdata (dd) is not available. Added it to the hfi1_filedata for reference. With this change, hfi1_count_units() was rendered obsolete and was removed. Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/driver.c | 36 ---------- drivers/infiniband/hw/hfi1/file_ops.c | 122 +++++++++++++--------------------- drivers/infiniband/hw/hfi1/hfi.h | 2 +- 3 files changed, 49 insertions(+), 111 deletions(-) commit 780a4c16aaacba3746a20d9138a5b1f467035ffc Author: Sebastian Sanchez Date: Thu May 4 05:14:51 2017 -0700 IB/hfi1: Remove atomic operations for SDMA_REQ_HAVE_AHG bit The AHG index is only accessed in the request call from user space, so there's no need for atomic semantics. Replace atomic operations for SDMA_REQ_HAVE_AHG bit with a test of the AHG index. Reviewed-by: Mike Marciniszyn Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_sdma.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 5042cddfd058a2db419ba7aaadc866e8dccca06c Author: Michael J. Ruhl Date: Thu May 4 05:14:45 2017 -0700 IB/hfi1: Use filedata rather than filepointer Since almost all functions that use the hfi1_filedata get the pointer from the file pointer, simplify by only passing the hfi1_filedata pointer. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 68 +++++++++++++++---------------- drivers/infiniband/hw/hfi1/user_exp_rcv.c | 45 +++++++++----------- drivers/infiniband/hw/hfi1/user_exp_rcv.h | 11 +++-- drivers/infiniband/hw/hfi1/user_sdma.c | 14 +++---- drivers/infiniband/hw/hfi1/user_sdma.h | 9 ++-- 5 files changed, 72 insertions(+), 75 deletions(-) commit f4cd876529194b2d3f653c645ba203688e9e4ba3 Author: Michael J. Ruhl Date: Thu May 4 05:14:39 2017 -0700 IB/hfi1: Name function prototype parameters To improve the readability of function prototypes, give the parameters names. Reviewed-by: Dennis Dalessandro Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 8 ++-- drivers/infiniband/hw/hfi1/chip.h | 6 ++- drivers/infiniband/hw/hfi1/driver.c | 4 +- drivers/infiniband/hw/hfi1/file_ops.c | 54 ++++++++++++----------- drivers/infiniband/hw/hfi1/hfi.h | 72 ++++++++++++++++--------------- drivers/infiniband/hw/hfi1/init.c | 2 +- drivers/infiniband/hw/hfi1/user_exp_rcv.c | 30 +++++++------ drivers/infiniband/hw/hfi1/user_exp_rcv.h | 12 +++--- drivers/infiniband/hw/hfi1/user_sdma.c | 62 +++++++++++++------------- drivers/infiniband/hw/hfi1/user_sdma.h | 13 +++--- 10 files changed, 143 insertions(+), 120 deletions(-) commit 224d71f910102c966cdcd782c97e096d5e26e4da Author: Michael J. Ruhl Date: Thu May 4 05:14:34 2017 -0700 IB/hfi1: Fix a subcontext memory leak The only context that frees user_exp_rcv data structures is the last context closed (from a sub-context set). This leaks the allocations from the other sub-contexts. Separate the common frees from the specific frees and call them at the appropriate time. Using KEDR to check for memory leaks we get: Before test: [leak_check] Possible leaks: 25 After test: [leak_check] Possible leaks: 31 (6 leaked data structures) After patch applied (before and after test have the same value) [leak_check] Possible leaks: 25 Each leak is 192 + 13440 + 6720 = 20352 bytes per sub-context. Cc: stable@vger.kernel.org Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 5 ++++- drivers/infiniband/hw/hfi1/user_exp_rcv.c | 32 +++++++++++++++++-------------- drivers/infiniband/hw/hfi1/user_exp_rcv.h | 1 + 3 files changed, 23 insertions(+), 15 deletions(-) commit 94679061dcdddbafcf24e3bfb526e54dedcc2f2f Author: Michael J. Ruhl Date: Thu May 4 05:14:28 2017 -0700 IB/hfi1: Return an error on memory allocation failure If the eager buffer allocation fails, it is necessary to return an error code. Cc: stable@vger.kernel.org Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/init.c | 1 + 1 file changed, 1 insertion(+) commit 9746fa439c63893195c7f285728617ab874b8bbd Author: Tymoteusz Kielan Date: Thu May 4 05:14:22 2017 -0700 IB/hfi1: Adjust default eager_buffer_size to 8MB Performance analysis shows benefits for PSM2 in increasing eager buffer size from 2MB to 8MB. The change has neutral impact on verbs. Make change to the module parameter's default value. Allocation ring down was verified to work with the larger buffer size. Reviewed-by: Tadeusz Struk Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Tymoteusz Kielan Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ade6f8af52f5187e6af6f774cff43e0bc60902e4 Author: Sebastian Sanchez Date: Thu May 4 05:14:16 2017 -0700 IB/hfi1: Get rid of divide when setting the tx request header Div instructions show costly in profiles when the tx request header is set. Using right shift instead of a divide operation reduces the cycles spent in the function that sets the tx request header as shown in the profile. Use right shift operation instead. Profile before change: 43.24% 009 | |--23.41%-- user_sdma_send_pkts | | | |--99.90%-- hfi1_user_sdma_process_requestAfter: Profile after change: 45.75% 009 | |--14.81%-- user_sdma_send_pkts | | | |--99.95%-- hfi1_user_sdma_process_request Reviewed-by: Mike Marciniszyn Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_sdma.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit dd1ed1081750a1ce4daeeb53a0ae91af599ecdad Author: Mike Marciniszyn Date: Thu May 4 05:14:10 2017 -0700 IB/hfi1: Fix yield logic in send engine When there are many RC QPs and an RDMA READ request is sent, timeouts occur on the requester side because of fairness among RC QPs on their relative SDMA engine on the responder side. This also hits write and send, but to a lesser extent. Complicating the issue is that the current code checks if workqueue is congested before scheduling other QPs, however, this check is based on the number of active entries in the workqueue, which was found to be too big to for workqueue_congested() to be effective. Fix by reducing the number of active entries as revealed by experimentation from the default of num_sdma to HFI1_MAX_ACTIVE_WORKQUEUE_ENTRIES. Retry counts were monitored to determine the correct value. Tracing to investigate any future issues is also added. Reviewed-by: Mike Marciniszyn Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/init.c | 3 +- drivers/infiniband/hw/hfi1/ruc.c | 80 ++++++++++++++++++++++------------- drivers/infiniband/hw/hfi1/trace_tx.h | 34 +++++++++++++++ drivers/infiniband/hw/hfi1/verbs.h | 4 ++ 4 files changed, 90 insertions(+), 31 deletions(-) commit 688f21c0be9e3ddd6c5b2241daeb9fe978c0e081 Author: Mike Marciniszyn Date: Thu May 4 05:14:04 2017 -0700 IB/hfi1, IB/rdmavt: Move r_adefered to r_lock cache line This field is causing excessive cache line bouncing. There are spare bytes in the r_lock cache line so the best approach is to make an rvt QP field and remove from the hfi1 priv field. Signed-off-by: Sebastian Sanchez Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/qp.c | 4 +--- drivers/infiniband/hw/hfi1/rc.c | 13 ++++--------- drivers/infiniband/hw/hfi1/verbs.h | 1 - include/rdma/rdmavt_qp.h | 1 + 4 files changed, 6 insertions(+), 13 deletions(-) commit 02d1008bcf41c7eada7882df673ae3794f7bfea8 Author: Jakub Byczkowski Date: Thu May 4 05:13:58 2017 -0700 IB/hfi1: Fix checks for Offline transient state In goto_offline() function pstate is masked by 0xff when compared to PLS_OFFLINE state. Mask should be 0xf0, since upper 4 bits specify the "major" state. Reviewed-by: Dennis Dalessandro Reviewed-by: Easwar Hariharan Signed-off-by: Jakub Byczkowski Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d7e2d2166f6b0b7d1959ca858052a15feb574cc Author: Zhu Yanjun Date: Thu May 4 01:24:51 2017 -0400 IB/ipoib: add get_link_ksettings in ethtool In order to let the bonding driver report the correct speed of the underlaying interfaces, when they are IPoIB, the ethtool function get_link_ksettings() in the IPoIB driver is implemented. Cc: Joe Jin Cc: Junxiao Bi Suggested-by: Håkon Bugge Signed-off-by: Zhu Yanjun Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 59 ++++++++++++++++++++++++++++ include/uapi/linux/ethtool.h | 1 + 2 files changed, 60 insertions(+) commit 332e0d13d3c7d1e4394a513585a3d3b15a0030b8 Author: Pan Bian Date: Sun Apr 23 20:48:07 2017 +0800 rtc: gemini: add return value validation Function devm_ioremap() will return a NULL pointer if it fails to remap IO address, and its return value should be validated before it is used. However, in function gemini_rtc_probe(), its return value is not checked. This may result in bad memory access bugs on future access, e.g. calling the function gemini_rtc_read_time(). Signed-off-by: Pan Bian Acked-by: Hans Ulli Kroll Signed-off-by: Alexandre Belloni drivers/rtc/rtc-gemini.c | 2 ++ 1 file changed, 2 insertions(+) commit 758929005f06f954b7e1c87a1c9fdb44157b228f Author: Pan Bian Date: Sun Apr 23 13:43:24 2017 +0800 rtc: snvs: fix an incorrect check of return value Function devm_regmap_init_mmio() returns an ERR_PTR on error. However, in function snvs_rtc_probe() its return value is checked against NULL. This patch fixes it by checking the return value with IS_ERR(). Signed-off-by: Pan Bian Signed-off-by: Alexandre Belloni drivers/rtc/rtc-snvs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d62ed96511823fa9c2ac7a819d7b4be22a9a6de Author: Dan Williams Date: Thu May 4 11:47:22 2017 -0700 libnvdimm: handle locked label storage areas Per the latest version of the "NVDIMM DSM Interface Example" [1], the label data retrieval routine can report a "locked" status. In this case all regions associated with that DIMM are disabled until the label area is unlocked. Provide generic libnvdimm enabling for NVDIMMs with label data area locking capabilities. [1]: http://pmem.io/documents/ Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 21 ++++++++++++++++++--- drivers/nvdimm/dimm.c | 2 ++ drivers/nvdimm/dimm_devs.c | 8 ++++++-- drivers/nvdimm/namespace_devs.c | 17 ++++++++++++----- include/uapi/linux/ndctl.h | 1 + 5 files changed, 39 insertions(+), 10 deletions(-) commit 8f078b38dd382710884ce7abd31a1935c440e6f8 Author: Dan Williams Date: Thu May 4 14:01:24 2017 -0700 libnvdimm: convert NDD_ flags to use bitops, introduce NDD_LOCKED This is a preparation patch for handling locked nvdimm label regions, a new concept as introduced by the latest DSM document on pmem.io [1]. A future patch will leverage nvdimm_set_locked() at DIMM probe time to flag regions that can not be enabled. There should be no functional difference resulting from this change. [1]: http://pmem.io/documents/NVDIMM_DSM_Interface_Example-V1.3.pdf Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 4 ++-- drivers/nvdimm/dimm_devs.c | 11 +++++++++-- drivers/nvdimm/namespace_devs.c | 2 +- drivers/nvdimm/nd.h | 1 + drivers/nvdimm/region_devs.c | 4 ++-- include/linux/libnvdimm.h | 6 ++++-- 6 files changed, 19 insertions(+), 9 deletions(-) commit 3d05f3aed5d721c2c77d20288c29ab26c6193ed5 Author: Julia Cartwright Date: Fri Apr 28 12:41:02 2017 -0500 md/raid5: make use of spin_lock_irq over local_irq_disable + spin_lock On mainline, there is no functional difference, just less code, and symmetric lock/unlock paths. On PREEMPT_RT builds, this fixes the following warning, seen by Alexander GQ Gerasiov, due to the sleeping nature of spinlocks. BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:993 in_atomic(): 0, irqs_disabled(): 1, pid: 58, name: kworker/u12:1 CPU: 5 PID: 58 Comm: kworker/u12:1 Tainted: G W 4.9.20-rt16-stand6-686 #1 Hardware name: Supermicro SYS-5027R-WRF/X9SRW-F, BIOS 3.2a 10/28/2015 Workqueue: writeback wb_workfn (flush-253:0) Call Trace: dump_stack+0x47/0x68 ? migrate_enable+0x4a/0xf0 ___might_sleep+0x101/0x180 rt_spin_lock+0x17/0x40 add_stripe_bio+0x4e3/0x6c0 [raid456] ? preempt_count_add+0x42/0xb0 raid5_make_request+0x737/0xdd0 [raid456] Reported-by: Alexander GQ Gerasiov Tested-by: Alexander GQ Gerasiov Signed-off-by: Julia Cartwright Signed-off-by: Shaohua Li drivers/md/raid5.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 693dfd5a3f19efc44acf3a57217c0480e414f8ee Author: Erez Shitrit Date: Thu Apr 27 17:01:34 2017 +0300 IB/mlx5: Enable IPoIB acceleration Enable mlx5 IPoIB acceleration by declaring mlx5_ib_{alloc,free}_rdma_netdev and assigning the mlx5 IPoIB rdma_netdev callbacks. In addition, this patch brings in sync mlx5's IPoIB parts for net and IB trees. As a precaution, we disabled IPoIB acceleration by default (in the mlx5_core Kconfig file). Signed-off-by: Saeed Mahameed Signed-off-by: Erez Shitrit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 22 +++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 2 +- drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 44 +++++++++++++++---------- drivers/net/ethernet/mellanox/mlx5/core/ipoib.h | 2 ++ include/linux/mlx5/driver.h | 19 +++++++++++ 5 files changed, 70 insertions(+), 19 deletions(-) commit 4ac4d584886a4f47f8ff3bca0f32ff9a2987d3e5 Merge: 8d5e72d 842be75 Author: Linus Torvalds Date: Thu May 4 12:26:43 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) The wireless rate info fix from Johannes Berg. 2) When a RAW socket is in hdrincl mode, we need to make sure that the user provided at least a minimally sized ipv4/ipv6 header. Fix from Alexander Potapenko. 3) We must emit IFLA_PHYS_PORT_NAME netlink attributes using nla_put_string() so that it is NULL terminated. 4) Fix a bug in TCP fastopen handling, wherein child sockets erroneously inherit the fastopen_req from the parent, and later can end up derefencing freed memory or doing a double free. From Eric Dumazet. 5) Don't clear out netdev stats at close time in tg3 driver, from YueHaibing. 6) Fix refcount leak in xt_CT, from Gao Feng. 7) In nft_set_bitmap() don't leak dummy elements, from Liping Zhang. 8) Fix deadlock due to taking the expectation lock twice, also from Liping Zhang. 9) Make xt_socket work again with ipv6, from Peter Tirsek. 10) Don't allow IPV6 to be used with IPVS if ipv6.disable=1, from Paolo Abeni. 11) Make the BPF loader more flexible wrt. changes to the bpf MAP entry layout. From Jesper Dangaard Brouer. 12) Fix ethtool reported device name in aquantia driver, from Pavel Belous. 13) Fix build failures due to the compile time size test not working in netfilter conntrack. From Geert Uytterhoeven. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (52 commits) cfg80211: make RATE_INFO_BW_20 the default ipv6: initialize route null entry in addrconf_init() qede: Fix possible misconfiguration of advertised autoneg value. qed: Fix overriding of supported autoneg value. qed*: Fix possible overflow for status block id field. rtnetlink: NUL-terminate IFLA_PHYS_PORT_NAME string netvsc: make sure napi enabled before vmbus_open aquantia: Fix driver name reported by ethtool ipv4, ipv6: ensure raw socket message is big enough to hold an IP header net/sched: remove redundant null check on head tcp: do not inherit fastopen_req from parent forcedeth: remove unnecessary carrier status check ibmvnic: Move queue restarting in ibmvnic_tx_complete ibmvnic: Record SKB RX queue during poll ibmvnic: Continue skb processing after skb completion error ibmvnic: Check for driver reset first in ibmvnic_xmit ibmvnic: Wait for any pending scrqs entries at driver close ibmvnic: Clean up tx pools when closing ibmvnic: Whitespace correction in release_rx_pools ibmvnic: Delete napi's when releasing driver resources ... commit 8d5e72dfdf0fa29a21143fd72746c6f43295ce9f Merge: 2bd8040 e7731da Author: Linus Torvalds Date: Thu May 4 12:19:44 2017 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "This update includes the usual round of major driver updates (hisi_sas, ufs, fnic, cxlflash, be2iscsi, ipr, stex). There's also the usual amount of cosmetic and spelling stuff" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (155 commits) scsi: qla4xxx: fix spelling mistake: "Tempalate" -> "Template" scsi: stex: make S6flag static scsi: mac_esp: fix to pass correct device identity to free_irq() scsi: aacraid: pci_alloc_consistent() failures on ARM64 scsi: ufs: make ufshcd_get_lists_status() register operation obvious scsi: ufs: use MASK_EE_STATUS scsi: mac_esp: Replace bogus memory barrier with spinlock scsi: fcoe: make fcoe_e_d_tov and fcoe_r_a_tov static scsi: sd_zbc: Do not write lock zones for reset scsi: sd_zbc: Remove superfluous assignments scsi: sd: sd_zbc: Rename sd_zbc_setup_write_cmnd scsi: Improve scsi_get_sense_info_fld scsi: sd: Cleanup sd_done sense data handling scsi: sd: Improve sd_completed_bytes scsi: sd: Fix function descriptions scsi: mpt3sas: remove redundant wmb scsi: mpt: Move scsi_remove_host() out of mptscsih_remove_host() scsi: sg: reset 'res_in_use' after unlinking reserved array scsi: mvumi: remove code handling zero scsi_sg_count(scmd) case scsi: fusion: fix spelling mistake: "Persistancy" -> "Persistency" ... commit 2bd80401743568ced7d303b008ae5298ce77e695 Merge: 99a7583 b86c86a Author: Linus Torvalds Date: Thu May 4 12:05:32 2017 -0700 Merge tag 'gpio-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "This is the bulk of GPIO changes for the v4.12 kernel cycle. Core changes: - Return NULL from gpiod_get_optional() when GPIOLIB is disabled. This was a much discussed change. It affects use cases where people write drivers that might or might not be using GPIO resources. I have decided that this is the lesser evil right now. - Make gpiod_count() behave consistently across different hardware descriptions. - Fix the syntax around open drain/open source to not infer active high/low semantics. New drivers: - A new single-register fixed-direction framework driver for hardware that have lines controlled by a single register that just work in one direction (out or in), including IRQ support. - Support the Fintek F71889A GPIO SuperIO controller. - Support the National NI 169445 MMIO GPIO. - Support for the X-Gene derivative of the DWC GPIO controller - Support for the Rohm BD9571MWV-M PMIC GPIO controller. - Refactor the Gemini GPIO driver to a generic Faraday FTGPIO driver and replace both the Gemini and the Moxa ART custom drivers with this driver. Driver improvements: - A whole slew of drivers have their spinlocks chaned to raw spinlocks as they provide irqchips, and thus we are progressing on realtime compliance. - Use devm_irq_alloc_descs() in a slew of drivers, getting managed resources. - Support for the embedded PWM controller inside the MVEBU driver. - Debounce, open source and open drain support for the Aspeed driver. - Misc smaller fixes like spelling and syntax and whatnot" * tag 'gpio-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (77 commits) gpio: f7188x: Add a missing break gpio: omap: return error if requested debounce time is not possible gpio: Add ROHM BD9571MWV-M PMIC GPIO driver gpio: gpio-wcove: fix GPIO IRQ status mask gpio: DT bindings, move tca9554 from pcf857x to pca953x gpio: move tca9554 from pcf857x to pca953x gpio: arizona: Correct check whether the pin is an input gpio: Add XRA1403 DTS binding documentation dt-bindings: add exar to vendor prefixes list gpio: gpio-wcove: fix irq pending status bit width gpio: dwapb: use dwapb_read instead of readl_relaxed gpio: aspeed: Add open-source and open-drain support gpio: aspeed: Add debounce support gpio: aspeed: dt: Add optional clocks property gpio: aspeed: dt: Fix description alignment in bindings document gpio: mvebu: Add limited PWM support gpio: Use unsigned int for interrupt numbers gpio: f7188x: Add F71889A GPIO support. gpio: core: Decouple open drain/source flag with active low/high gpio: arizona: Correct handling for reading input GPIOs ... commit 17a70355ea576843a7ac851f1db26872a50b2850 Author: Rob Herring Date: Thu May 4 12:56:12 2017 -0500 of: fix sparse warnings in fdt, irq, reserved mem, and resolver code sparse generates the following warnings in drivers/of/: ../drivers/of/fdt.c:63:36: warning: cast to restricted __be32 ../drivers/of/fdt.c:68:33: warning: cast to restricted __be32 ../drivers/of/irq.c:105:88: warning: incorrect type in initializer (different base types) ../drivers/of/irq.c:105:88: expected restricted __be32 ../drivers/of/irq.c:105:88: got int ../drivers/of/irq.c:526:35: warning: incorrect type in assignment (different modifiers) ../drivers/of/irq.c:526:35: expected int ( *const [usertype] irq_init_cb )( ... ) ../drivers/of/irq.c:526:35: got void const *const data ../drivers/of/of_reserved_mem.c:200:50: warning: incorrect type in initializer (different modifiers) ../drivers/of/of_reserved_mem.c:200:50: expected int ( *[usertype] initfn )( ... ) ../drivers/of/of_reserved_mem.c:200:50: got void const *const data ../drivers/of/resolver.c:95:42: warning: incorrect type in assignment (different base types) ../drivers/of/resolver.c:95:42: expected unsigned int [unsigned] [usertype] ../drivers/of/resolver.c:95:42: got restricted __be32 [usertype] All these are harmless type mismatches fixed by adjusting the types. Signed-off-by: Rob Herring drivers/of/fdt.c | 4 ++-- drivers/of/irq.c | 2 +- drivers/of/of_reserved_mem.c | 2 +- drivers/of/resolver.c | 2 +- include/linux/of_irq.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit 99a7583de5ffd5cd82c407aad32bcbdeea09155b Merge: c336bf8 6df97f8 Author: Linus Torvalds Date: Thu May 4 11:56:59 2017 -0700 Merge tag 'platform-drivers-x86-v4.12-1' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform-drivers update from Darren Hart: "This represents a significantly larger and more complex set of changes than those of prior merge windows. In particular, we had several changes with dependencies on other subsystems which we felt were best managed through merges of immutable branches, including one each from input, i2c, and leds. Two patches for the watchdog subsystem are included after discussion with Wim and Guenter following a collision in linux-next (this should be resolved and you should only see these two appear in this pull request). These are called out in the "External" section below. Summary of changes: - significant further cleanup of fujitsu-laptop and hp-wmi - new model support for ideapad, asus, silead, and xiaomi - new hotkeys for thinkpad and models using intel-vbtn - dell keyboard backlight improvements - build and dependency improvements - intel * ipc fixes, cleanups, and api updates - single isolated fixes noted below External: - watchdog: iTCO_wdt: Add PMC specific noreboot update api - watchdog: iTCO_wdt: cleanup set/unset no_reboot_bit functions - Merge branch 'ib/4.10-sparse-keymap-managed' - Merge branch 'i2c/for-INT33FE' - Merge branch 'linux-leds/dell-laptop-changes-for-4.12' platform/x86: - Add Intel Cherry Trail ACPI INT33FE device driver - remove sparse_keymap_free() calls - Make SILEAD_DMI depend on TOUCHSCREEN_SILEAD asus-wmi: - try to set als by default - fix cpufv sysfs file permission acer-wmi: - setup accelerometer when ACPI device was found ideapad-laptop: - Add IdeaPad V310-15ISK to no_hw_rfkill - Add IdeaPad 310-15IKB to no_hw_rfkill intel_pmc_ipc: - use gcr mem base for S0ix counter read - Fix iTCO_wdt GCS memory mapping failure - Add pmc gcr read/write/update api's - fix gcr offset dell-laptop: - Add keyboard backlight timeout AC settings - Handle return error form dell_get_intensity. - Protect kbd_state against races - Refactor kbd_led_triggers_store() hp-wireless: - reuse module_acpi_driver - add Xiaomi's hardware id to the supported list intel-vbtn: - add volume up and down INT33FE: - add i2c dependency hp-wmi: - Cleanup exit paths - Do not shadow errors in sysfs show functions - Use DEVICE_ATTR_(RO|RW) helper macros - Refactor dock and tablet state fetchers - Cleanup wireless get_(hw|sw)state functions - Refactor redundant HPWMI_READ functions - Standardize enum usage for constants - Cleanup local variable declarations - Do not shadow error values - Fix detection for dock and tablet mode - Fix error value for hp_wmi_tablet_state fujitsu-laptop: - simplify error handling in acpi_fujitsu_laptop_add() - do not log LED registration failures - switch to managed LED class devices - reorganize LED-related code - refactor LED registration - select LEDS_CLASS - remove redundant fields from struct fujitsu_bl - account for backlight power when determining brightness - do not log set_lcd_level() failures in bl_update_status() - ignore errors when setting backlight power - make disable_brightness_adjust a boolean - clean up use_alt_lcd_levels handling - sync brightness in set_lcd_level() - simplify set_lcd_level() - merge set_lcd_level_alt() into set_lcd_level() - switch to a managed backlight device - only handle backlight when appropriate - update debug message logged by call_fext_func() - rename call_fext_func() arguments - simplify call_fext_func() - clean up local variables in call_fext_func() - remove keycode fields from struct fujitsu_bl - model-dependent sparse keymap overrides - use a sparse keymap for hotkey event generation - switch to a managed hotkey input device - refactor hotkey input device setup - use a sparse keymap for brightness key events - switch to a managed backlight input device - refactor backlight input device setup - remove pf_device field from struct fujitsu_bl - only register platform device if FUJ02E3 is present - add and remove platform device in separate functions - simplify platform device attribute definitions - remove backlight-related attributes from the platform device - cleanup error labels in fujitsu_init() - only register backlight device if FUJ02B1 is present - sync backlight power status in acpi_fujitsu_laptop_add() - register backlight device in a separate function - simplify brightness key event generation logic - decrease indentation in acpi_fujitsu_bl_notify() intel-hid: - Add missing ->thaw callback - do not set parents of input devices explicitly - remove redundant set_bit() call - use devm_input_allocate_device() for HID events input device - make intel_hid_set_enable() take a boolean argument - simplify enabling/disabling HID events silead_dmi: - Add touchscreen info for Surftab Wintron 7.0 - Abort early if DMI does not match - Do not treat all devices as i2c_clients - Add entry for Insyde 7W tablets - Constify properties arrays intel_scu_ipc: - Introduce intel_scu_ipc_raw_command() - Introduce SCU_DEVICE() macro - Remove redundant subarch check - Rearrange init sequence - Platform data is mandatory asus-nb-wmi: - Add wapf4 quirk for the X302UA dell-*: - Call new led hw_changed API on kbd brightness change - Add a generic dell-laptop notifier chain eeepc-laptop: - Skip unknown key messages 0x50 0x51 thinkpad_acpi: - add mapping for new hotkeys - guard generic hotkey case" * tag 'platform-drivers-x86-v4.12-1' of git://git.infradead.org/linux-platform-drivers-x86: (108 commits) platform/x86: Make SILEAD_DMI depend on TOUCHSCREEN_SILEAD platform/x86: asus-wmi: try to set als by default platform/x86: asus-wmi: fix cpufv sysfs file permission platform/x86: acer-wmi: setup accelerometer when ACPI device was found platform/x86: ideapad-laptop: Add IdeaPad V310-15ISK to no_hw_rfkill platform/x86: intel_pmc_ipc: use gcr mem base for S0ix counter read platform/x86: intel_pmc_ipc: Fix iTCO_wdt GCS memory mapping failure watchdog: iTCO_wdt: Add PMC specific noreboot update api watchdog: iTCO_wdt: cleanup set/unset no_reboot_bit functions platform/x86: intel_pmc_ipc: Add pmc gcr read/write/update api's platform/x86: intel_pmc_ipc: fix gcr offset platform/x86: dell-laptop: Add keyboard backlight timeout AC settings platform/x86: dell-laptop: Handle return error form dell_get_intensity. platform/x86: hp-wireless: reuse module_acpi_driver platform/x86: intel-vbtn: add volume up and down platform/x86: INT33FE: add i2c dependency platform/x86: hp-wmi: Cleanup exit paths platform/x86: hp-wmi: Do not shadow errors in sysfs show functions platform/x86: hp-wmi: Use DEVICE_ATTR_(RO|RW) helper macros platform/x86: hp-wmi: Refactor dock and tablet state fetchers ... commit c336bf8e658122eeab63afe0bfcb6360a381a79c Merge: a964807 7cb671e Author: Linus Torvalds Date: Thu May 4 11:53:24 2017 -0700 Merge tag 'vfio-v4.12-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Updates for SPAPR IOMMU backend including compatibility test and memory allocation check (Alexey Kardashevskiy) - Updates for type1 IOMMU backend to remove asynchronous locked page accounting and remove redundancy (Alex Williamson) * tag 'vfio-v4.12-rc1' of git://github.com/awilliam/linux-vfio: vfio/type1: Reduce repetitive calls in vfio_pin_pages_remote() vfio/type1: Prune vfio_pin_page_external() vfio/type1: Remove locked page accounting workqueue vfio/spapr_tce: Check kzalloc() return when preregistering memory vfio/powerpc/spapr_tce: Enforce IOMMU type compatibility check commit 2f713b5c7d2a90baba6c88174c81fb9a96bfde21 Author: Martin Brandenburg Date: Thu May 4 13:16:04 2017 -0400 orangefs: count directory pieces correctly A large directory full of differently sized file names triggered this. Most directories, even very large directories with shorter names, would be lucky enough to fit in one server response. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/dir.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 942835d68f6e16f2673c70791dc963c548681cb4 Author: Martin Brandenburg Date: Tue May 2 12:15:11 2017 -0400 orangefs: invalidate stored directory on seek If an application seeks to a position before the point which has been read, it must want updates which have been made to the directory. So delete the copy stored in the kernel so it will be fetched again. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/dir.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit bf15ba7c1f9ad000d062968f931e80234db84a24 Author: Martin Brandenburg Date: Tue May 2 12:15:10 2017 -0400 orangefs: skip forward to the next directory entry if seek is short If userspace seeks to a position in the stream which is not correct, it would have returned EIO because the data in the buffer at that offset would be incorrect. This and the userspace daemon returning a corrupt directory are indistinguishable. Now if the data does not look right, skip forward to the next chunk and try again. The motivation is that if the directory changes, an application may seek to a position that was valid and no longer is valid. It is not yet possible for a directory to change. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/dir.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit a96480723c287c502b02659f4b347aecaa651ea1 Merge: a1be8ed 3dbd820 Author: Linus Torvalds Date: Thu May 4 11:37:09 2017 -0700 Merge tag 'for-linus-4.12b-rc0b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: "Xen fixes and featrues for 4.12. The main changes are: - enable building the kernel with Xen support but without enabling paravirtualized mode (Vitaly Kuznetsov) - add a new 9pfs xen frontend driver (Stefano Stabellini) - simplify Xen's cpuid handling by making use of cpu capabilities (Juergen Gross) - add/modify some headers for new Xen paravirtualized devices (Oleksandr Andrushchenko) - EFI reset_system support under Xen (Julien Grall) - and the usual cleanups and corrections" * tag 'for-linus-4.12b-rc0b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (57 commits) xen: Move xen_have_vector_callback definition to enlighten.c xen: Implement EFI reset_system callback arm/xen: Consolidate calls to shutdown hypercall in a single helper xen: Export xen_reboot xen/x86: Call xen_smp_intr_init_pv() on BSP xen: Revert commits da72ff5bfcb0 and 72a9b186292d xen/pvh: Do not fill kernel's e820 map in init_pvh_bootparams() xen/scsifront: use offset_in_page() macro xen/arm,arm64: rename __generic_dma_ops to xen_get_dma_ops xen/arm,arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..." xen/9pfs: select CONFIG_XEN_XENBUS_FRONTEND x86/cpu: remove hypervisor specific set_cpu_features vmware: set cpu capabilities during platform initialization x86/xen: use capabilities instead of fake cpuid values for xsave x86/xen: use capabilities instead of fake cpuid values for x2apic x86/xen: use capabilities instead of fake cpuid values for mwait x86/xen: use capabilities instead of fake cpuid values for acpi x86/xen: use capabilities instead of fake cpuid values for acc x86/xen: use capabilities instead of fake cpuid values for mtrr x86/xen: use capabilities instead of fake cpuid values for aperf ... commit eb3100365791b06242b8bb5c3c2854ba41dabfbc Author: Rob Herring Date: Thu May 4 12:34:30 2017 -0500 of: fix sparse warning in of_pci_range_parser_one sparse gives the following warning for 'pci_space': ../drivers/of/address.c:266:26: warning: incorrect type in assignment (different base types) ../drivers/of/address.c:266:26: expected unsigned int [unsigned] [usertype] pci_space ../drivers/of/address.c:266:26: got restricted __be32 const [usertype] It appears that pci_space is only ever accessed on powerpc, so the endian swap is often not needed. Cc: stable@vger.kernel.org Signed-off-by: Rob Herring drivers/of/address.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91d967497f11dbb5038c7b84bc30dae684ae5ffb Author: Rob Herring Date: Thu May 4 12:30:07 2017 -0500 of: fix sparse warnings in of_find_next_cache_node sparse gives a warning that 'handle' is not a __be32: ../drivers/of/base.c:2261:61: warning: incorrect type in argument 1 (different base types) ../drivers/of/base.c:2261:61: expected restricted __be32 const [usertype] *p ../drivers/of/base.c:2261:61: got unsigned int const [usertype] *[assigned] handle We could just change the type, but the code can be improved by using of_parse_phandle instead of open coding it with of_get_property and of_find_node_by_phandle. Signed-off-by: Rob Herring drivers/of/base.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit cefec668868be847ac3733c927ccd527c305b529 Merge: 12c1c2fd 1e6e7ea Author: Ingo Molnar Date: Thu May 4 19:43:39 2017 +0200 Merge tag 'perf-urgent-for-mingo-4.12-20170504' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: User visible changes: - Fix AArch64 objdump disasm comment char in 'perf annotate' (Kim Phillips) - Fix documentation spelling mistakes (Kim Phillips) - Don't fail 'perf test kmod-path' if compressed modules aren't supported (Kim Phillips) Infrastructure changes: - Fix sched_getcpu() feature test when included in test-all.c redefining _GNU_SOURCE (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 842be75c77cb72ee546a2b19da9c285fb3ded660 Author: Johannes Berg Date: Thu May 4 08:42:30 2017 +0200 cfg80211: make RATE_INFO_BW_20 the default Due to the way I did the RX bitrate conversions in mac80211 with spatch, going setting flags to setting the value, many drivers now don't set the bandwidth value for 20 MHz, since with the flags it wasn't necessary to (there was no 20 MHz flag, only the others.) Rather than go through and try to fix up all the drivers, instead renumber the enum so that 20 MHz, which is the typical bandwidth, actually has the value 0, making those drivers all work again. If VHT was hit used with a driver not reporting it, e.g. iwlmvm, this manifested in hitting the bandwidth warning in cfg80211_calculate_bitrate_vht(). Reported-by: Linus Torvalds Tested-by: Jens Axboe Signed-off-by: Johannes Berg Signed-off-by: David S. Miller include/net/cfg80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f460933f58eee3393aba64f0f6d14acb08d1724 Author: WANG Cong Date: Wed May 3 22:07:31 2017 -0700 ipv6: initialize route null entry in addrconf_init() Andrey reported a crash on init_net.ipv6.ip6_null_entry->rt6i_idev since it is always NULL. This is clearly wrong, we have code to initialize it to loopback_dev, unfortunately the order is still not correct. loopback_dev is registered very early during boot, we lose a chance to re-initialize it in notifier. addrconf_init() is called after ip6_route_init(), which means we have no chance to correct it. Fix it by moving this initialization explicitly after ipv6_add_dev(init_net.loopback_dev) in addrconf_init(). Reported-by: Andrey Konovalov Signed-off-by: Cong Wang Tested-by: Andrey Konovalov Signed-off-by: David S. Miller include/net/ip6_route.h | 1 + net/ipv6/addrconf.c | 2 ++ net/ipv6/route.c | 26 +++++++++++++++----------- 3 files changed, 18 insertions(+), 11 deletions(-) commit 15981952e8d04fa3349cd8db10f46ab3273ff398 Merge: 77ef033 161adb0 Author: David S. Miller Date: Thu May 4 12:31:03 2017 -0400 Merge branch 'qed-fixes' Sudarsana Reddy Kalluru says: ==================== qed*: Bug fix series. The series contains minor bug fixes for qed/qede drivers. Please consider applying it to 'net' branch. ==================== Signed-off-by: David S. Miller commit 161adb046b9119d480f2547db20fc3e9ce7cbf59 Author: sudarsana.kalluru@cavium.com Date: Thu May 4 08:15:05 2017 -0700 qede: Fix possible misconfiguration of advertised autoneg value. Fail the configuration of advertised speed-autoneg value if the config update is not supported. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 5 +++++ 1 file changed, 5 insertions(+) commit 34f9199ce7b7e5c641b96e928bd60e086bf7f278 Author: sudarsana.kalluru@cavium.com Date: Thu May 4 08:15:04 2017 -0700 qed: Fix overriding of supported autoneg value. Driver currently uses advertised-autoneg value to populate the supported-autoneg field. When advertised field is updated, user gets the same value for supported field. Supported-autoneg value need to be populated from the link capabilities value returned by the MFW. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 3 +++ drivers/net/ethernet/qlogic/qed/qed_main.c | 6 +++++- drivers/net/ethernet/qlogic/qed/qed_mcp.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) commit f870a3c6727db5fcfeaa42d099f75872e4b17553 Author: sudarsana.kalluru@cavium.com Date: Thu May 4 08:15:03 2017 -0700 qed*: Fix possible overflow for status block id field. Value for status block id could be more than 256 in 100G mode, need to update its data type from u8 to u16. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 8 ++++---- drivers/net/ethernet/qlogic/qed/qed_dev_api.h | 4 ++-- drivers/net/ethernet/qlogic/qed/qed_main.c | 2 +- drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 5 ++--- include/linux/qed/qed_if.h | 2 +- 5 files changed, 10 insertions(+), 11 deletions(-) commit 8756cd1ded1af222fda4470b08ba547f5625e656 Author: Dan Carpenter Date: Wed May 3 22:49:50 2017 +0300 of/unittest: Missing unlocks on error Static checkers complain that we should unlock before returning. Which is true. Signed-off-by: Dan Carpenter Reviewed-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/unittest.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 2c0248d68880fc0e783af1048b3367ee5d4412f0 Merge: d5bf739 fd8e2d4 c9d9f23 6f66ea0 bdf9592 26b37b9 8e12188 73dbd4a 290d638 Author: Joerg Roedel Date: Thu May 4 18:06:17 2017 +0200 Merge branches 'arm/exynos', 'arm/omap', 'arm/rockchip', 'arm/mediatek', 'arm/smmu', 'arm/core', 'x86/vt-d', 'x86/amd' and 'core' into next commit 290d638e04e7b94ff34d2f5e9426e7ce617e9a59 Author: Paul Gortmaker Date: Tue May 2 18:21:12 2017 -0400 soc/qbman: Move dma-mapping.h include to qman_priv.h With the include there it fixes all build failures in this directory caused by commit 461a6946b1f9. Fixes: 461a6946b1f9 ("iommu: Remove pci.h include from trace/events/iommu.h") Signed-off-by: Joerg Roedel drivers/soc/fsl/qbman/qman_portal.c | 2 -- drivers/soc/fsl/qbman/qman_priv.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) commit 35f4f99ccbc1ccf3a1f1157a5f2f14d6a7d1848f Author: Tony Lindgren Date: Wed May 3 17:15:32 2017 -0700 power: supply: cpcap-charger: Keep trickle charger bits disabled Android does not seem to set the trickle charger bits, and these seem to be only used by the bootloader when bringing up a completely discharged battery. So let's keep the trickle charging bits disabled and avoid misconfiguring the hardware. Fixes: 0c9888e3c192 ("power: supply: cpcap-charger: Add minimal CPCAP PMIC battery charger") Cc: Marcel Partap Cc: Michael Scott Signed-off-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/cpcap-charger.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6ffa8ace7092a5414d5d387c54a66118eb90482b Author: Tony Lindgren Date: Wed May 3 17:15:31 2017 -0700 power: supply: cpcap-charger: Fix enable for 3.8V charge setting Zero is a valid register value for for 3.8V charging. Fixes: 0c9888e3c192 ("power: supply: cpcap-charger: Add minimal CPCAP PMIC battery charger") Cc: Marcel Partap Cc: Michael Scott Signed-off-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/cpcap-charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ae5f06681fc0e9ce6a0ac4f909aa7695e1f3228 Author: Tony Lindgren Date: Wed May 3 17:15:30 2017 -0700 power: supply: cpcap-charger: Fix charge voltage configuration We have the charge voltage wrong, it should be 4.35V instead of 4.2V. This will cause the battery to never get fully charged. I noticed this when looking at the Andoid kernel battery and charger status for a fully charged battery: POWER_SUPPLY_VOLTAGE_NOW=4351000 Also the battery on droid 4 says "4.35, 1735/1785mAh (min/typ), 6.6/6.8 Wh (min/typ)". Presumably the 4.35 on the battery is the charge voltage. And finally, on Android the CPCAP CRM register is set to 0x03b5 where the b is the charge voltage. Let's fix the charge voltage define and update the charge configuration to use the 4.35V setting. Fixes: 0c9888e3c192 ("power: supply: cpcap-charger: Add minimal CPCAP PMIC battery charger") Cc: Marcel Partap Cc: Michael Scott Signed-off-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/cpcap-charger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4f700a5285dc8f9dde4ad02542bc42fe9f97cfcf Author: Tony Lindgren Date: Wed May 3 17:15:29 2017 -0700 power: supply: cpcap-charger: Fix charger name I noticed we have a different name from what Android is using. Let's not break the /sys/class/power user space interface here and use the same naming as Android has. On Android we have the following for droid 4: $ ls /sys/class/power_supply/ ac battery usb So let's use the usb naming here for charger too. Fixes: 0c9888e3c192 ("power: supply: cpcap-charger: Add minimal CPCAP PMIC battery charger") Cc: Marcel Partap Cc: Michael Scott Signed-off-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/cpcap-charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f9d696f016f5b42f6c6e8c9f723f8d3380e5903 Author: Eric Biggers Date: Mon May 1 11:43:32 2017 -0700 fscrypt: correct collision claim for digested names As I noted on the mailing list, it's easier than I originally thought to create intentional collisions in the digested names. Unfortunately it's not too easy to solve this, so for now just fix the comment to not lie. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o include/linux/fscrypt_supp.h | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 90fce086ed59caefa457dffd587b00caeab9116d Author: Eric Biggers Date: Wed Apr 26 16:43:00 2017 -0700 MAINTAINERS: fscrypt: update mailing list, patchwork, and git Now that there has been a dedicated mailing list, patchwork project, and git repository set up for filesystem encryption, update the MAINTAINERS file accordingly. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o MAINTAINERS | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d9b9f8d5a88cb7881d9f1c2b7e9de9a3fe1dc9e2 Author: Eric Biggers Date: Mon Apr 24 10:00:13 2017 -0700 ext4: clean up ext4_match() and callers When ext4 encryption was originally merged, we were encrypting the user-specified filename in ext4_match(), introducing a lot of additional complexity into ext4_match() and its callers. This has since been changed to encrypt the filename earlier, so we can remove the gunk that's no longer needed. This more or less reverts ext4_search_dir() and ext4_find_dest_de() to the way they were in the v4.0 kernel. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/namei.c | 81 ++++++++++++++++++--------------------------------------- 1 file changed, 25 insertions(+), 56 deletions(-) commit 1f73d491779047e81fff047c4613e84d5d76ddae Author: Eric Biggers Date: Mon Apr 24 10:00:12 2017 -0700 f2fs: switch to using fscrypt_match_name() Switch f2fs directory searches to use the fscrypt_match_name() helper function. There should be no functional change. Signed-off-by: Eric Biggers Acked-by: Jaegeuk Kim Signed-off-by: Theodore Ts'o fs/f2fs/dir.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) commit 067d1023b6beeded688500d417e40e16981437e0 Author: Eric Biggers Date: Mon Apr 24 10:00:11 2017 -0700 ext4: switch to using fscrypt_match_name() Switch ext4 directory searches to use the fscrypt_match_name() helper function. There should be no functional change. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/namei.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) commit 17159420a6c18bb3515ff85598b5ccf1a572763d Author: Eric Biggers Date: Mon Apr 24 10:00:10 2017 -0700 fscrypt: introduce helper function for filename matching Introduce a helper function fscrypt_match_name() which tests whether a fscrypt_name matches a directory entry. Also clean up the magic numbers and document things properly. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/fname.c | 90 ++++++++++++++++++++++++++++++++--------- fs/crypto/fscrypt_private.h | 2 - include/linux/fscrypt_notsupp.h | 9 +++++ include/linux/fscrypt_supp.h | 78 +++++++++++++++++++++++++++++++++++ 4 files changed, 157 insertions(+), 22 deletions(-) commit 6b06cdee81d68a8a829ad8e8d0f31d6836744af9 Author: Eric Biggers Date: Mon Apr 24 10:00:09 2017 -0700 fscrypt: avoid collisions when presenting long encrypted filenames When accessing an encrypted directory without the key, userspace must operate on filenames derived from the ciphertext names, which contain arbitrary bytes. Since we must support filenames as long as NAME_MAX, we can't always just base64-encode the ciphertext, since that may make it too long. Currently, this is solved by presenting long names in an abbreviated form containing any needed filesystem-specific hashes (e.g. to identify a directory block), then the last 16 bytes of ciphertext. This needs to be sufficient to identify the actual name on lookup. However, there is a bug. It seems to have been assumed that due to the use of a CBC (ciphertext block chaining)-based encryption mode, the last 16 bytes (i.e. the AES block size) of ciphertext would depend on the full plaintext, preventing collisions. However, we actually use CBC with ciphertext stealing (CTS), which handles the last two blocks specially, causing them to appear "flipped". Thus, it's actually the second-to-last block which depends on the full plaintext. This caused long filenames that differ only near the end of their plaintexts to, when observed without the key, point to the wrong inode and be undeletable. For example, with ext4: # echo pass | e4crypt add_key -p 16 edir/ # seq -f "edir/abcdefghijklmnopqrstuvwxyz012345%.0f" 100000 | xargs touch # find edir/ -type f | xargs stat -c %i | sort | uniq | wc -l 100000 # sync # echo 3 > /proc/sys/vm/drop_caches # keyctl new_session # find edir/ -type f | xargs stat -c %i | sort | uniq | wc -l 2004 # rm -rf edir/ rm: cannot remove 'edir/_A7nNFi3rhkEQlJ6P,hdzluhODKOeWx5V': Structure needs cleaning ... To fix this, when presenting long encrypted filenames, encode the second-to-last block of ciphertext rather than the last 16 bytes. Although it would be nice to solve this without depending on a specific encryption mode, that would mean doing a cryptographic hash like SHA-256 which would be much less efficient. This way is sufficient for now, and it's still compatible with encryption modes like HEH which are strong pseudorandom permutations. Also, changing the presented names is still allowed at any time because they are only provided to allow applications to do things like delete encrypted directories. They're not designed to be used to persistently identify files --- which would be hard to do anyway, given that they're encrypted after all. For ease of backports, this patch only makes the minimal fix to both ext4 and f2fs. It leaves ubifs as-is, since ubifs doesn't compare the ciphertext block yet. Follow-on patches will clean things up properly and make the filesystems use a shared helper function. Fixes: 5de0b4d0cd15 ("ext4 crypto: simplify and speed up filename encryption") Reported-by: Gwendal Grignou Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/fname.c | 2 +- fs/ext4/namei.c | 4 ++-- fs/f2fs/dir.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit 6332cd32c8290a80e929fc044dc5bdba77396e33 Author: Jaegeuk Kim Date: Mon Apr 24 10:00:08 2017 -0700 f2fs: check entire encrypted bigname when finding a dentry If user has no key under an encrypted dir, fscrypt gives digested dentries. Previously, when looking up a dentry, f2fs only checks its hash value with first 4 bytes of the digested dentry, which didn't handle hash collisions fully. This patch enhances to check entire dentry bytes likewise ext4. Eric reported how to reproduce this issue by: # seq -f "edir/abcdefghijklmnopqrstuvwxyz012345%.0f" 100000 | xargs touch # find edir -type f | xargs stat -c %i | sort | uniq | wc -l 100000 # sync # echo 3 > /proc/sys/vm/drop_caches # keyctl new_session # find edir -type f | xargs stat -c %i | sort | uniq | wc -l 99999 Cc: Reported-by: Eric Biggers Signed-off-by: Jaegeuk Kim (fixed f2fs_dentry_hash() to work even when the hash is 0) Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/f2fs/dir.c | 37 +++++++++++++++++++++---------------- fs/f2fs/f2fs.h | 3 ++- fs/f2fs/hash.c | 7 ++++++- fs/f2fs/inline.c | 4 ++-- 4 files changed, 31 insertions(+), 20 deletions(-) commit 413d5a9edbb45eec4dbb1904fe689b561ea5d143 Author: Eric Biggers Date: Fri Apr 7 10:58:40 2017 -0700 ubifs: check for consistent encryption contexts in ubifs_lookup() As ext4 and f2fs do, ubifs should check for consistent encryption contexts during ->lookup() in an encrypted directory. This protects certain users of filesystem encryption against certain types of offline attacks. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ubifs/dir.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit faac7fd97e0827f959c9d376399b91b37364a567 Author: Eric Biggers Date: Fri Apr 7 10:58:39 2017 -0700 f2fs: sync f2fs_lookup() with ext4_lookup() As for ext4, now that fscrypt_has_permitted_context() correctly handles the case where we have the key for the parent directory but not the child, f2fs_lookup() no longer has to work around it. Also add the same warning message that ext4 uses. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/f2fs/namei.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8c68084bff7a852252cf91985fa8111ae4673f91 Author: Eric Biggers Date: Fri Apr 7 10:58:38 2017 -0700 ext4: remove "nokey" check from ext4_lookup() Now that fscrypt_has_permitted_context() correctly handles the case where we have the key for the parent directory but not the child, we don't need to try to work around this in ext4_lookup(). Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/namei.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 272f98f6846277378e1758a49a49d7bf39343c02 Author: Eric Biggers Date: Fri Apr 7 10:58:37 2017 -0700 fscrypt: fix context consistency check when key(s) unavailable To mitigate some types of offline attacks, filesystem encryption is designed to enforce that all files in an encrypted directory tree use the same encryption policy (i.e. the same encryption context excluding the nonce). However, the fscrypt_has_permitted_context() function which enforces this relies on comparing struct fscrypt_info's, which are only available when we have the encryption keys. This can cause two incorrect behaviors: 1. If we have the parent directory's key but not the child's key, or vice versa, then fscrypt_has_permitted_context() returned false, causing applications to see EPERM or ENOKEY. This is incorrect if the encryption contexts are in fact consistent. Although we'd normally have either both keys or neither key in that case since the master_key_descriptors would be the same, this is not guaranteed because keys can be added or removed from keyrings at any time. 2. If we have neither the parent's key nor the child's key, then fscrypt_has_permitted_context() returned true, causing applications to see no error (or else an error for some other reason). This is incorrect if the encryption contexts are in fact inconsistent, since in that case we should deny access. To fix this, retrieve and compare the fscrypt_contexts if we are unable to set up both fscrypt_infos. While this slightly hurts performance when accessing an encrypted directory tree without the key, this isn't a case we really need to be optimizing for; access *with* the key is much more important. Furthermore, the performance hit is barely noticeable given that we are already retrieving the fscrypt_context and doing two keyring searches in fscrypt_get_encryption_info(). If we ever actually wanted to optimize this case we might start by caching the fscrypt_contexts. Cc: stable@vger.kernel.org # 4.0+ Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/policy.c | 87 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 68 insertions(+), 19 deletions(-) commit 77ef033b687c3e030017c94a29bf6ea3aaaef678 Author: Michal Schmidt Date: Thu May 4 16:48:58 2017 +0200 rtnetlink: NUL-terminate IFLA_PHYS_PORT_NAME string IFLA_PHYS_PORT_NAME is a string attribute, so terminate it with \0. Otherwise libnl3 fails to validate netlink messages with this attribute. "ip -detail a" assumes too that the attribute is NUL-terminated when printing it. It often was, due to padding. I noticed this as libvirtd failing to start on a system with sfc driver after upgrading it to Linux 4.11, i.e. when sfc added support for phys_port_name. Signed-off-by: Michal Schmidt Signed-off-by: David S. Miller net/core/rtnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2be0f2644598ee4b8ea0ed6a32913e1ce0212c9c Author: stephen hemminger Date: Wed May 3 16:59:21 2017 -0700 netvsc: make sure napi enabled before vmbus_open This fixes a race where vmbus callback for new packet arriving could occur before NAPI is initialized. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 8 +++++--- drivers/net/hyperv/rndis_filter.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) commit 5900eca1ac3bcb03cd0da1c9a5504f1fbfe9b5bc Author: Pavel Belous Date: Wed May 3 21:17:44 2017 +0300 aquantia: Fix driver name reported by ethtool V2: using "aquantia" subsystem tag. The command "ethtool -i ethX" should display driver name (driver: atlantic) instead vendor name (driver: aquantia). Signed-off-by: Pavel Belous Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_cfg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86f4c90a1c5c1493f07f2d12c1079f5bf01936f2 Author: Alexander Potapenko Date: Wed May 3 17:06:58 2017 +0200 ipv4, ipv6: ensure raw socket message is big enough to hold an IP header raw_send_hdrinc() and rawv6_send_hdrinc() expect that the buffer copied from the userspace contains the IPv4/IPv6 header, so if too few bytes are copied, parts of the header may remain uninitialized. This bug has been detected with KMSAN. For the record, the KMSAN report: ================================================================== BUG: KMSAN: use of unitialized memory in nf_ct_frag6_gather+0xf5a/0x44a0 inter: 0 CPU: 0 PID: 1036 Comm: probe Not tainted 4.11.0-rc5+ #2455 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 dump_stack+0x143/0x1b0 lib/dump_stack.c:52 kmsan_report+0x16b/0x1e0 mm/kmsan/kmsan.c:1078 __kmsan_warning_32+0x5c/0xa0 mm/kmsan/kmsan_instr.c:510 nf_ct_frag6_gather+0xf5a/0x44a0 net/ipv6/netfilter/nf_conntrack_reasm.c:577 ipv6_defrag+0x1d9/0x280 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c:68 nf_hook_entry_hookfn ./include/linux/netfilter.h:102 nf_hook_slow+0x13f/0x3c0 net/netfilter/core.c:310 nf_hook ./include/linux/netfilter.h:212 NF_HOOK ./include/linux/netfilter.h:255 rawv6_send_hdrinc net/ipv6/raw.c:673 rawv6_sendmsg+0x2fcb/0x41a0 net/ipv6/raw.c:919 inet_sendmsg+0x3f8/0x6d0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:633 sock_sendmsg net/socket.c:643 SYSC_sendto+0x6a5/0x7c0 net/socket.c:1696 SyS_sendto+0xbc/0xe0 net/socket.c:1664 do_syscall_64+0x72/0xa0 arch/x86/entry/common.c:285 entry_SYSCALL64_slow_path+0x25/0x25 arch/x86/entry/entry_64.S:246 RIP: 0033:0x436e03 RSP: 002b:00007ffce48baf38 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00000000004002b0 RCX: 0000000000436e03 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007ffce48baf90 R08: 00007ffce48baf50 R09: 000000000000001c R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000401790 R14: 0000000000401820 R15: 0000000000000000 origin: 00000000d9400053 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:362 kmsan_internal_poison_shadow+0xb1/0x1a0 mm/kmsan/kmsan.c:257 kmsan_poison_shadow+0x6d/0xc0 mm/kmsan/kmsan.c:270 slab_alloc_node mm/slub.c:2735 __kmalloc_node_track_caller+0x1f4/0x390 mm/slub.c:4341 __kmalloc_reserve net/core/skbuff.c:138 __alloc_skb+0x2cd/0x740 net/core/skbuff.c:231 alloc_skb ./include/linux/skbuff.h:933 alloc_skb_with_frags+0x209/0xbc0 net/core/skbuff.c:4678 sock_alloc_send_pskb+0x9ff/0xe00 net/core/sock.c:1903 sock_alloc_send_skb+0xe4/0x100 net/core/sock.c:1920 rawv6_send_hdrinc net/ipv6/raw.c:638 rawv6_sendmsg+0x2918/0x41a0 net/ipv6/raw.c:919 inet_sendmsg+0x3f8/0x6d0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:633 sock_sendmsg net/socket.c:643 SYSC_sendto+0x6a5/0x7c0 net/socket.c:1696 SyS_sendto+0xbc/0xe0 net/socket.c:1664 do_syscall_64+0x72/0xa0 arch/x86/entry/common.c:285 return_from_SYSCALL_64+0x0/0x6a arch/x86/entry/entry_64.S:246 ================================================================== , triggered by the following syscalls: socket(PF_INET6, SOCK_RAW, IPPROTO_RAW) = 3 sendto(3, NULL, 0, 0, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "ff00::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EPERM A similar report is triggered in net/ipv4/raw.c if we use a PF_INET socket instead of a PF_INET6 one. Signed-off-by: Alexander Potapenko Signed-off-by: David S. Miller net/ipv4/raw.c | 3 +++ net/ipv6/raw.c | 2 ++ 2 files changed, 5 insertions(+) commit 17f423b5160767a8ec43b0602767e5f4d3ecd083 Author: Jan Kara Date: Thu May 4 11:01:31 2017 -0400 jbd2: cleanup write flags handling from jbd2_write_superblock() Currently jbd2_write_superblock() silently adds REQ_SYNC to flags with which journal superblock is written. Make this explicit by making flags passed down to jbd2_write_superblock() contain REQ_SYNC. CC: linux-ext4@vger.kernel.org Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/jbd2/journal.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 985538eee06f169bb13c7ecb1a7fcdeb700b05c7 Author: Colin Ian King Date: Wed May 3 14:50:40 2017 +0100 net/sched: remove redundant null check on head head is previously null checked and so the 2nd null check on head is redundant and therefore can be removed. Detected by CoverityScan, CID#1399505 ("Logically dead code") Signed-off-by: Colin Ian King Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_matchall.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8b485ce69876c65db12ed390e7f9c0d2a64eff2c Author: Eric Dumazet Date: Wed May 3 06:39:31 2017 -0700 tcp: do not inherit fastopen_req from parent Under fuzzer stress, it is possible that a child gets a non NULL fastopen_req pointer from its parent at accept() time, when/if parent morphs from listener to active session. We need to make sure this can not happen, by clearing the field after socket cloning. BUG: Double free or freeing an invalid pointer Unexpected shadow byte: 0xFB CPU: 3 PID: 20933 Comm: syz-executor3 Not tainted 4.11.0+ #306 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x292/0x395 lib/dump_stack.c:52 kasan_object_err+0x1c/0x70 mm/kasan/report.c:164 kasan_report_double_free+0x5c/0x70 mm/kasan/report.c:185 kasan_slab_free+0x9d/0xc0 mm/kasan/kasan.c:580 slab_free_hook mm/slub.c:1357 [inline] slab_free_freelist_hook mm/slub.c:1379 [inline] slab_free mm/slub.c:2961 [inline] kfree+0xe8/0x2b0 mm/slub.c:3882 tcp_free_fastopen_req net/ipv4/tcp.c:1077 [inline] tcp_disconnect+0xc15/0x13e0 net/ipv4/tcp.c:2328 inet_child_forget+0xb8/0x600 net/ipv4/inet_connection_sock.c:898 inet_csk_reqsk_queue_add+0x1e7/0x250 net/ipv4/inet_connection_sock.c:928 tcp_get_cookie_sock+0x21a/0x510 net/ipv4/syncookies.c:217 cookie_v4_check+0x1a19/0x28b0 net/ipv4/syncookies.c:384 tcp_v4_cookie_check net/ipv4/tcp_ipv4.c:1384 [inline] tcp_v4_do_rcv+0x731/0x940 net/ipv4/tcp_ipv4.c:1421 tcp_v4_rcv+0x2dc0/0x31c0 net/ipv4/tcp_ipv4.c:1715 ip_local_deliver_finish+0x4cc/0xc20 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:257 [inline] ip_local_deliver+0x1ce/0x700 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:492 [inline] ip_rcv_finish+0xb1d/0x20b0 net/ipv4/ip_input.c:396 NF_HOOK include/linux/netfilter.h:257 [inline] ip_rcv+0xd8c/0x19c0 net/ipv4/ip_input.c:487 __netif_receive_skb_core+0x1ad1/0x3400 net/core/dev.c:4210 __netif_receive_skb+0x2a/0x1a0 net/core/dev.c:4248 process_backlog+0xe5/0x6c0 net/core/dev.c:4868 napi_poll net/core/dev.c:5270 [inline] net_rx_action+0xe70/0x18e0 net/core/dev.c:5335 __do_softirq+0x2fb/0xb99 kernel/softirq.c:284 do_softirq_own_stack+0x1c/0x30 arch/x86/entry/entry_64.S:899 do_softirq.part.17+0x1e8/0x230 kernel/softirq.c:328 do_softirq kernel/softirq.c:176 [inline] __local_bh_enable_ip+0x1cf/0x1e0 kernel/softirq.c:181 local_bh_enable include/linux/bottom_half.h:31 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:931 [inline] ip_finish_output2+0x9ab/0x15e0 net/ipv4/ip_output.c:230 ip_finish_output+0xa35/0xdf0 net/ipv4/ip_output.c:316 NF_HOOK_COND include/linux/netfilter.h:246 [inline] ip_output+0x1f6/0x7b0 net/ipv4/ip_output.c:404 dst_output include/net/dst.h:486 [inline] ip_local_out+0x95/0x160 net/ipv4/ip_output.c:124 ip_queue_xmit+0x9a8/0x1a10 net/ipv4/ip_output.c:503 tcp_transmit_skb+0x1ade/0x3470 net/ipv4/tcp_output.c:1057 tcp_write_xmit+0x79e/0x55b0 net/ipv4/tcp_output.c:2265 __tcp_push_pending_frames+0xfa/0x3a0 net/ipv4/tcp_output.c:2450 tcp_push+0x4ee/0x780 net/ipv4/tcp.c:683 tcp_sendmsg+0x128d/0x39b0 net/ipv4/tcp.c:1342 inet_sendmsg+0x164/0x5b0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xca/0x110 net/socket.c:643 SYSC_sendto+0x660/0x810 net/socket.c:1696 SyS_sendto+0x40/0x50 net/socket.c:1664 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x446059 RSP: 002b:00007faa6761fb58 EFLAGS: 00000282 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000017 RCX: 0000000000446059 RDX: 0000000000000001 RSI: 0000000020ba3fcd RDI: 0000000000000017 RBP: 00000000006e40a0 R08: 0000000020ba4ff0 R09: 0000000000000010 R10: 0000000020000000 R11: 0000000000000282 R12: 0000000000708150 R13: 0000000000000000 R14: 00007faa676209c0 R15: 00007faa67620700 Object at ffff88003b5bbcb8, in cache kmalloc-64 size: 64 Allocated: PID = 20909 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:513 set_track mm/kasan/kasan.c:525 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:616 kmem_cache_alloc_trace+0x82/0x270 mm/slub.c:2745 kmalloc include/linux/slab.h:490 [inline] kzalloc include/linux/slab.h:663 [inline] tcp_sendmsg_fastopen net/ipv4/tcp.c:1094 [inline] tcp_sendmsg+0x221a/0x39b0 net/ipv4/tcp.c:1139 inet_sendmsg+0x164/0x5b0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xca/0x110 net/socket.c:643 SYSC_sendto+0x660/0x810 net/socket.c:1696 SyS_sendto+0x40/0x50 net/socket.c:1664 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed: PID = 20909 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:513 set_track mm/kasan/kasan.c:525 [inline] kasan_slab_free+0x73/0xc0 mm/kasan/kasan.c:589 slab_free_hook mm/slub.c:1357 [inline] slab_free_freelist_hook mm/slub.c:1379 [inline] slab_free mm/slub.c:2961 [inline] kfree+0xe8/0x2b0 mm/slub.c:3882 tcp_free_fastopen_req net/ipv4/tcp.c:1077 [inline] tcp_disconnect+0xc15/0x13e0 net/ipv4/tcp.c:2328 __inet_stream_connect+0x20c/0xf90 net/ipv4/af_inet.c:593 tcp_sendmsg_fastopen net/ipv4/tcp.c:1111 [inline] tcp_sendmsg+0x23a8/0x39b0 net/ipv4/tcp.c:1139 inet_sendmsg+0x164/0x5b0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xca/0x110 net/socket.c:643 SYSC_sendto+0x660/0x810 net/socket.c:1696 SyS_sendto+0x40/0x50 net/socket.c:1664 entry_SYSCALL_64_fastpath+0x1f/0xbe Fixes: e994b2f0fb92 ("tcp: do not lock listener to process SYN packets") Fixes: 7db92362d2fe ("tcp: fix potential double free issue for fastopen_req") Signed-off-by: Eric Dumazet Reported-by: Andrey Konovalov Acked-by: Wei Wang Signed-off-by: David S. Miller net/ipv4/tcp_minisocks.c | 1 + 1 file changed, 1 insertion(+) commit 7ab84db64f119e03b2c42ed919dfee7d6cf0dc3c Author: Mike Snitzer Date: Thu May 4 10:32:07 2017 -0400 dm integrity: improve the Kconfig help text for DM_INTEGRITY Signed-off-by: Mike Snitzer Signed-off-by: Milan Broz drivers/md/Kconfig | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 00473374b72a6e5aba01af083f0d5100f3151210 Author: Jan Kara Date: Thu May 4 10:58:03 2017 -0400 ext4: mark superblock writes synchronous for nobarrier mounts Commit b685d3d65ac7 "block: treat REQ_FUA and REQ_PREFLUSH as synchronous" removed REQ_SYNC flag from WRITE_FUA implementation. generic_make_request_checks() however strips REQ_FUA flag from a bio when the storage doesn't report volatile write cache and thus write effectively becomes asynchronous which can lead to performance regressions. This affects superblock writes for ext4. Fix the problem by marking superblock writes always as synchronous. Fixes: b685d3d65ac791406e0dfd8779cc9b3707fea5a3 CC: linux-ext4@vger.kernel.org Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d826b7b98a66c890920d690d101bf54d220ea92 Author: Zhu Yanjun Date: Wed May 3 00:43:42 2017 -0400 forcedeth: remove unnecessary carrier status check Since netif_carrier_on() will do nothing if device's carrier is already on, so it's unnecessary to do carrier status check. It's the same for netif_carrier_off(). Signed-off-by: Zhu Yanjun Signed-off-by: David S. Miller drivers/net/ethernet/nvidia/forcedeth.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 50730eb367147dc96394d25b3f55c33595663b6f Author: Sebastian Reichel Date: Wed May 3 11:33:57 2017 +0100 power: supply: twl4030-charger: make twl4030_bci_property_is_writeable static The function twl4030_bci_property_is_writeable can be made static as it does not need to be in global scope. Signed-off-by: Colin Ian King Tested-by: "H. Nikolaus Schaller" Signed-off-by: Sebastian Reichel drivers/power/supply/twl4030_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97dfb20309e0ad4fa22deb5bc5ed85604d5014ef Author: Mike Snitzer Date: Thu May 4 10:04:18 2017 -0400 dm cache policy smq: cleanup free_target_met() and clean_target_met() Depending on the passed @idle arg, there may be no need to calculate 'nr_free' or 'nr_clean' respectively in free_target_met() and clean_target_met(). Signed-off-by: Mike Snitzer drivers/md/dm-cache-policy-smq.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit ce1d64e84dbea98d41deaf5db0fe91fd729ad2cd Author: Joe Thornber Date: Wed May 3 12:01:27 2017 -0400 dm cache policy smq: allow demotions to happen even during continuous IO dm-cache's smq policy tries hard to do it's work during the idle periods when there is no IO. But if there are no idle periods (eg, a long fio run) we still need to allow some demotions and promotions to occur. To achieve this, pass @idle=true to queue_promotion()'s free_target_met() call so that free_target_met() doesn't short-circuit the possibility of demotion simply because it isn't an idle period. Fixes: b29d4986d0 ("dm cache: significant rework to leverage dm-bio-prison-v2") Reported-by: John Harrigan Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-policy-smq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit daaadb3e9453ab89c2e113a2d1df8e19e30944cc Author: Omar Sandoval Date: Thu May 4 00:31:34 2017 -0700 mq-deadline: add debugfs attributes Expose the fifo lists, cached next requests, batching state, and dispatch list. It'd also be possible to add the sorted lists, but there aren't already seq_file helpers for rbtrees. Signed-off-by: Omar Sandoval Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 9 +++- block/blk-mq-debugfs.h | 1 + block/mq-deadline.c | 123 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+), 2 deletions(-) commit 16b738f651c83a01db057e5db02ec4b830af9130 Author: Omar Sandoval Date: Thu May 4 00:31:33 2017 -0700 kyber: add debugfs attributes Expose the domain token pools, asynchronous sbitmap depth, domain request lists, and batching state. Signed-off-by: Omar Sandoval Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 3 +- block/blk-mq-debugfs.h | 2 + block/kyber-iosched.c | 130 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 134 insertions(+), 1 deletion(-) commit d332ce091813d11a46144354baa72b755833392f Author: Omar Sandoval Date: Thu May 4 08:24:40 2017 -0600 blk-mq-debugfs: allow schedulers to register debugfs attributes This provides the infrastructure for schedulers to expose their internal state through debugfs. We add a list of queue attributes and a list of hctx attributes to struct elevator_type and wire them up when switching schedulers. Signed-off-by: Omar Sandoval Reviewed-by: Hannes Reinecke Add missing seq_file.h header in blk-mq-debugfs.h Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 74 ++++++++++++++++++++++++++++++++++++++++++------ block/blk-mq-debugfs.h | 37 ++++++++++++++++++++++++ block/blk-mq-sched.c | 24 ++++++++++------ include/linux/blk-mq.h | 1 + include/linux/blkdev.h | 1 + include/linux/elevator.h | 7 +++++ 6 files changed, 127 insertions(+), 17 deletions(-) commit 9c1051aacde828073dbbab5e8e59c0fc802efa9a Author: Omar Sandoval Date: Thu May 4 08:17:21 2017 -0600 blk-mq: untangle debugfs and sysfs Originally, I tied debugfs registration/unregistration together with sysfs. There's no reason to do this, and it's getting in the way of letting schedulers define their own debugfs attributes. Instead, tie the debugfs registration to the lifetime of the structures themselves. The saner lifetimes mean we can also get rid of the extra mq directory and move everything one level up. I.e., nvme0n1/mq/hctx0/tags is now just nvme0n1/hctx0/tags. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-core.c | 9 +--- block/blk-mq-debugfs.c | 110 ++++++++++++++++++++++++++++--------------------- block/blk-mq-debugfs.h | 21 ++++++++-- block/blk-mq-sysfs.c | 11 ----- block/blk-mq.c | 7 ++++ block/blk-sysfs.c | 2 + include/linux/blk-mq.h | 4 ++ include/linux/blkdev.h | 1 - 8 files changed, 94 insertions(+), 71 deletions(-) commit d173a25165c124442182f6b21d0c2ec381a0eebe Author: Omar Sandoval Date: Thu May 4 00:31:30 2017 -0700 blk-mq: move debugfs declarations to a separate header file Preparation for adding more declarations. Signed-off-by: Omar Sandoval Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-core.c | 1 + block/blk-mq-debugfs.c | 1 + block/blk-mq-debugfs.h | 29 +++++++++++++++++++++++++++++ block/blk-mq-sysfs.c | 1 + block/blk-mq.h | 28 ---------------------------- block/blk-sysfs.c | 1 + 6 files changed, 33 insertions(+), 28 deletions(-) commit 18d4d7d0571f5acc9de638ea3a33e8064deaceca Author: Bart Van Assche Date: Thu May 4 00:31:29 2017 -0700 blk-mq: Do not invoke queue operations on a dead queue In commit e869b5462f83 ("blk-mq: Unregister debugfs attributes earlier"), we shuffled the debugfs cleanup around so that the "state" attribute was removed before we freed the blk-mq data structures. However, later changes are going to undo that, so we need to explicitly disallow running a dead queue. [Omar: rebased and updated commit message] Signed-off-by: Omar Sandoval Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f57de23ac9019ea84c548a1637d5562ef07a8f7e Author: Omar Sandoval Date: Thu May 4 00:31:28 2017 -0700 blk-mq-debugfs: get rid of a bunch of boilerplate A large part of blk-mq-debugfs.c is file_operations and seq_file boilerplate. This sucks as is but will suck even more when schedulers can define their own debugfs entries. Factor it all out into a single blk_mq_debugfs_fops which multiplexes as needed. We store the request_queue, blk_mq_hw_ctx, or blk_mq_ctx in the parent directory dentry, which is kind of hacky, but it works. Signed-off-by: Omar Sandoval Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 464 +++++++++++++++---------------------------------- 1 file changed, 136 insertions(+), 328 deletions(-) commit 88aabbd7e7ace77fb3fbf06d22dd3cc0bfc0ca79 Author: Omar Sandoval Date: Thu May 4 00:31:27 2017 -0700 blk-mq-debugfs: rename hw queue directories from to hctx It's not clear what these numbered directories represent unless you consult the code. We're about to get rid of the intermediate "mq" directory, so these would be even more confusing without that context. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71b90511cb170dd3e13b640cc1a453b2dd92e023 Author: Omar Sandoval Date: Thu May 4 00:31:26 2017 -0700 blk-mq-debugfs: don't open code strstrip() Slightly more readable, plus we also strip leading spaces. Signed-off-by: Omar Sandoval Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit c7e4145ae11b45931f117aa64c26be6cf58302df Author: Omar Sandoval Date: Thu May 4 00:31:25 2017 -0700 blk-mq-debugfs: error on long write to queue "state" file blk_queue_flags_store() currently truncates and returns a short write if the operation being written is too long. This can give us weird results, like here: $ echo "run bar" echo: write error: invalid argument $ dmesg [ 1103.075435] blk_queue_flags_store: unsupported operation bar. Use either 'run' or 'start' Instead, return an error if the user does this. While we're here, make the argument names consistent with everywhere else in this file. Signed-off-by: Omar Sandoval Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 1a435111f8eb30b370e3891caebb1d1ca61f41ec Author: Omar Sandoval Date: Thu May 4 00:31:24 2017 -0700 blk-mq-debugfs: clean up flag definitions Make sure the spelled out flag names match the definition. This also adds a missing hctx state, BLK_MQ_S_START_ON_RUN, and a missing cmd_flag, __REQ_NOUNMAP. Signed-off-by: Omar Sandoval Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 201 ++++++++++++++++++++++++++----------------------- 1 file changed, 108 insertions(+), 93 deletions(-) commit bec03d6b92264bb2a06cc3d6f2da5815f0585107 Author: Omar Sandoval Date: Thu May 4 00:31:23 2017 -0700 blk-mq-debugfs: separate flags with | This reads more naturally than spaces. Signed-off-by: Omar Sandoval Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9052c7cf492d8c52c556f9536c4a9483fbfe4d73 Author: Jan Kara Date: Thu May 4 09:02:42 2017 +0200 nfs: Fix bdi handling for cloned superblocks In commit 0d3b12584972 "nfs: Convert to separately allocated bdi" I have wrongly cloned bdi reference in nfs_clone_super(). Further inspection has shown that originally the code was actually allocating a new bdi (in ->clone_server callback) which was later registered in nfs_fs_mount_common() and used for sb->s_bdi in nfs_initialise_sb(). This could later result in bdi for the original superblock not getting unregistered when that superblock got shutdown (as the cloned sb still held bdi reference) and later when a new superblock was created under the same anonymous device number, a clash in sysfs has happened on bdi registration: ------------[ cut here ]------------ WARNING: CPU: 1 PID: 10284 at /linux-next/fs/sysfs/dir.c:31 sysfs_warn_dup+0x64/0x74 sysfs: cannot create duplicate filename '/devices/virtual/bdi/0:32' Modules linked in: axp20x_usb_power gpio_axp209 nvmem_sunxi_sid sun4i_dma sun4i_ss virt_dma CPU: 1 PID: 10284 Comm: mount.nfs Not tainted 4.11.0-rc4+ #14 Hardware name: Allwinner sun7i (A20) Family [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x78/0x8c) [] (dump_stack) from [] (__warn+0xe8/0x100) [] (__warn) from [] (warn_slowpath_fmt+0x38/0x48) [] (warn_slowpath_fmt) from [] (sysfs_warn_dup+0x64/0x74) [] (sysfs_warn_dup) from [] (sysfs_create_dir_ns+0x84/0x94) [] (sysfs_create_dir_ns) from [] (kobject_add_internal+0x9c/0x2ec) [] (kobject_add_internal) from [] (kobject_add+0x48/0x98) [] (kobject_add) from [] (device_add+0xe4/0x5a0) [] (device_add) from [] (device_create_groups_vargs+0xac/0xbc) [] (device_create_groups_vargs) from [] (device_create_vargs+0x20/0x28) [] (device_create_vargs) from [] (bdi_register_va+0x44/0xfc) [] (bdi_register_va) from [] (super_setup_bdi_name+0x48/0xa4) [] (super_setup_bdi_name) from [] (nfs_fill_super+0x1a4/0x204) [] (nfs_fill_super) from [] (nfs_fs_mount_common+0x140/0x1e8) [] (nfs_fs_mount_common) from [] (nfs4_remote_mount+0x50/0x58) [] (nfs4_remote_mount) from [] (mount_fs+0x14/0xa4) [] (mount_fs) from [] (vfs_kern_mount+0x54/0x128) [] (vfs_kern_mount) from [] (nfs_do_root_mount+0x80/0xa0) [] (nfs_do_root_mount) from [] (nfs4_try_mount+0x28/0x3c) [] (nfs4_try_mount) from [] (nfs_fs_mount+0x2cc/0x8c4) [] (nfs_fs_mount) from [] (mount_fs+0x14/0xa4) [] (mount_fs) from [] (vfs_kern_mount+0x54/0x128) [] (vfs_kern_mount) from [] (do_mount+0x158/0xc7c) [] (do_mount) from [] (SyS_mount+0x8c/0xb4) [] (SyS_mount) from [] (ret_fast_syscall+0x0/0x3c) Fix the problem by always creating new bdi for a superblock as we used to do. Reported-and-tested-by: Corentin Labbe Fixes: 0d3b12584972ce5781179ad3f15cca3cdb5cae05 Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/nfs/internal.h | 6 +++--- fs/nfs/super.c | 28 ++++++++++------------------ 2 files changed, 13 insertions(+), 21 deletions(-) commit eabe06595d62cfa9278e2cd012df614bc68a7042 Author: Peter Zijlstra Date: Thu May 4 15:05:26 2017 +0200 block/mq: Cure cpu hotplug lock inversion By poking at /debug/sched_features I triggered the following splat: [] ====================================================== [] WARNING: possible circular locking dependency detected [] 4.11.0-00873-g964c8b7-dirty #694 Not tainted [] ------------------------------------------------------ [] bash/2109 is trying to acquire lock: [] (cpu_hotplug_lock.rw_sem){++++++}, at: [] static_key_slow_dec+0x1b/0x50 [] [] but task is already holding lock: [] (&sb->s_type->i_mutex_key#4){+++++.}, at: [] sched_feat_write+0x86/0x170 [] [] which lock already depends on the new lock. [] [] [] the existing dependency chain (in reverse order) is: [] [] -> #2 (&sb->s_type->i_mutex_key#4){+++++.}: [] lock_acquire+0x100/0x210 [] down_write+0x28/0x60 [] start_creating+0x5e/0xf0 [] debugfs_create_dir+0x13/0x110 [] blk_mq_debugfs_register+0x21/0x70 [] blk_mq_register_dev+0x64/0xd0 [] blk_register_queue+0x6a/0x170 [] device_add_disk+0x22d/0x440 [] loop_add+0x1f3/0x280 [] loop_init+0x104/0x142 [] do_one_initcall+0x43/0x180 [] kernel_init_freeable+0x1de/0x266 [] kernel_init+0xe/0x100 [] ret_from_fork+0x31/0x40 [] [] -> #1 (all_q_mutex){+.+.+.}: [] lock_acquire+0x100/0x210 [] __mutex_lock+0x6c/0x960 [] mutex_lock_nested+0x1b/0x20 [] blk_mq_init_allocated_queue+0x37c/0x4e0 [] blk_mq_init_queue+0x3a/0x60 [] loop_add+0xe5/0x280 [] loop_init+0x104/0x142 [] do_one_initcall+0x43/0x180 [] kernel_init_freeable+0x1de/0x266 [] kernel_init+0xe/0x100 [] ret_from_fork+0x31/0x40 [] *** DEADLOCK *** [] [] 3 locks held by bash/2109: [] #0: (sb_writers#11){.+.+.+}, at: [] vfs_write+0x17d/0x1a0 [] #1: (debugfs_srcu){......}, at: [] full_proxy_write+0x5d/0xd0 [] #2: (&sb->s_type->i_mutex_key#4){+++++.}, at: [] sched_feat_write+0x86/0x170 [] [] stack backtrace: [] CPU: 9 PID: 2109 Comm: bash Not tainted 4.11.0-00873-g964c8b7-dirty #694 [] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013 [] Call Trace: [] lock_acquire+0x100/0x210 [] get_online_cpus+0x2a/0x90 [] static_key_slow_dec+0x1b/0x50 [] static_key_disable+0x20/0x30 [] sched_feat_write+0x131/0x170 [] full_proxy_write+0x97/0xd0 [] __vfs_write+0x28/0x120 [] vfs_write+0xb5/0x1a0 [] SyS_write+0x49/0xa0 [] entry_SYSCALL_64_fastpath+0x23/0xc2 This is because of the cpu hotplug lock rework. Break the chain at #1 by reversing the lock acquisition order. This way i_mutex_key#4 no longer depends on cpu_hotplug_lock and things are good. Cc: Jens Axboe Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Jens Axboe block/blk-mq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 507f7d68fe5c24973dcd6e48f011bdfbd2197f01 Author: Javier González Date: Wed May 3 11:19:05 2017 +0200 lightnvm: fix bad back free on error path Free memory correctly when an allocation fails on a loop and we free backwards previously successful allocations. Signed-off-by: Javier González Reviewed-by: Matias Bjørling Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2e13f33a2464fc3aa7783022a90309cabeca8935 Author: Javier González Date: Wed May 3 11:19:04 2017 +0200 lightnvm: create cmd before allocating request Create nvme command before allocating a request using nvme_alloc_request, which uses the command direction. Up until now, the command has been zeroized, so all commands have been allocated as a read operation. Signed-off-by: Javier González Reviewed-by: Matias Bjørling Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1e6e7eae8a3a66f5fee4f44ef165ffcf31f0c40e Author: Arnaldo Carvalho de Melo Date: Thu May 4 10:30:40 2017 -0300 tools build: Fixup sched_getcpu feature test We have tools/build/feature/test-all.c to speed up feature testing, doing all tests at once, but then all tests in this file should normally pass. That is not the case with the sched-getcpu one, that wasn't passing when included from test-all.c because it needs to have _GNU_SOURCE defined before including sched.h, but _GNU_SOURCE is defined by a header included from another feature test included earlier in test-all.d, test-libpython.c, resulting in: $ cat /tmp/build/perf/feature/test-all.make.output In file included from test-all.c:121:0: test-sched_getcpu.c:1:0: error: "_GNU_SOURCE" redefined [-Werror] #define _GNU_SOURCE In file included from /usr/include/python2.7/pyconfig.h:6:0, from /usr/include/python2.7/Python.h:8, from test-libpython.c:1, from test-all.c:13: /usr/include/python2.7/pyconfig-64.h:1177:0: note: this is the location of the previous definition #define _GNU_SOURCE 1 cc1: all warnings being treated as errors Which would trigger testing the tests individually, when that _GNU_SOURCE redefinition would not take place, and the whole process would continue, just slower... Fix it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: 120010cb1eea ("tools build: Add test for sched_getcpu()") Link: http://lkml.kernel.org/n/tip-3qp1it69xsc4w8gnuu1e9ayh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/build/feature/test-sched_getcpu.c | 2 ++ 1 file changed, 2 insertions(+) commit 0266c894b51c41d3161adb90e3c15eda3e90a7be Author: Paolo Bonzini Date: Thu May 4 15:14:13 2017 +0200 KVM: put back #ifndef CONFIG_S390 around kvm_vcpu_kick The #ifndef was removed in 75aaafb79f73516b69d5639ad30a72d72e75c8b4, but it was also protecting smp_send_reschedule() in kvm_vcpu_kick(). Acked-by: Cornelia Huck Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 805b151a1afd24414706a7f6ae275fbb9649be74 Author: Kim Phillips Date: Wed May 3 13:14:02 2017 +0100 perf tests kmod-path: Don't fail if compressed modules aren't supported __kmod_path__parse() uses is_supported_compression() to determine and parse out compressed module file extensions. On systems without zlib, this test fails and __kmod_path__parse() continues to strcmp "ko" with "gz". Don't do this on those systems. Signed-off-by: Kim Phillips Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Peter Zijlstra Fixes: 3c8a67f50a1e ("perf tools: Add kmod_path__parse function") Link: http://lkml.kernel.org/r/20170503131402.c66e314460026c80cd787b34@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/kmod-path.c | 2 ++ 1 file changed, 2 insertions(+) commit d1f7b0234ec7743899321aaaba379b2f5f9d0500 Author: Kim Phillips Date: Wed May 3 13:13:56 2017 +0100 perf annotate: Fix AArch64 comment char The commit 0fcb1da4aba "perf annotate: AArch64 support" blindly copied the comment character from the original: https://lkml.org/lkml/2016/5/19/461 whereas that same commit shows objdump output utilizing the C++ style "//" as the comment delimeter. Since '/' doesn't occur elsewhere in objdump output, we retain the single character check, but fix it to be '/'. Signed-off-by: Kim Phillips Cc: Alexander Shishkin Cc: Chris Riyder Cc: Peter Zijlstra Fixes: 0fcb1da4aba6 ("perf annotate: AArch64 support") Link: http://lkml.kernel.org/r/20170503131356.be88f977094fb3fa0f49b99d@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm64/annotate/instructions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1291927a490832a9bbd0158a5d3c05c25a3c7159 Author: Kim Phillips Date: Wed May 3 13:13:50 2017 +0100 perf tools: Fix spelling mistakes Mostly in the documentation. Signed-off-by: Kim Phillips Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170503131350.cebeecd8bd0f2968417626ab@arm.com [ Fix spelling of "parameter" in one of the spell-checked lines ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-c2c.txt | 4 ++-- tools/perf/Documentation/perf-record.txt | 2 +- tools/perf/Documentation/perf-report.txt | 6 +++--- tools/perf/Documentation/perf.data-file-format.txt | 4 ++-- tools/perf/Documentation/tips.txt | 2 +- tools/perf/util/event.h | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) commit 538c08f4c89580fc644e2bc64e0a4b86c925da4e Author: Moritz Fischer Date: Mon Apr 24 15:05:12 2017 -0700 rtc: ds1374: wdt: Fix stop/start ioctl always returning -EINVAL The WDIOC_SETOPTIONS case in the watchdog ioctl would alwayss falls through to the -EINVAL case. This is wrong since thew watchdog does actually get stopped or started correctly. Fixes: 920f91e50c5b ("drivers/rtc/rtc-ds1374.c: add watchdog support") Signed-off-by: Moritz Fischer Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1374.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 453d0744f6c6ca3f9749b8c57c2e85b5b9f52514 Author: Moritz Fischer Date: Mon Apr 24 15:05:11 2017 -0700 rtc: ds1374: wdt: Fix issue with timeout scaling from secs to wdt ticks The issue is that the internal counter that triggers the watchdog reset is actually running at 4096 Hz instead of 1Hz, therefore the value given by userland (in sec) needs to be multiplied by 4096 to get the correct behavior. Fixes: 920f91e50c5b ("drivers/rtc/rtc-ds1374.c: add watchdog support") Signed-off-by: Moritz Fischer Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1374.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 35d2d5d490e2dc98ec07f899577b2a5451f413e8 Author: Christoffer Dall Date: Thu May 4 13:54:17 2017 +0200 KVM: arm/arm64: Move shared files to virt/kvm/arm For some time now we have been having a lot of shared functionality between the arm and arm64 KVM support in arch/arm, which not only required a horrible inter-arch reference from the Makefile in arch/arm64/kvm, but also created confusion for newcomers to the code base, as was recently seen on the mailing list. Further, it causes confusion for things like cscope, which needs special attention to index specific shared files for arm64 from the arm tree. Move the shared files into virt/kvm/arm and move the trace points along with it. When moving the tracepoints we have to modify the way the vgic creates definitions of the trace points, so we take the chance to include the VGIC tracepoints in its very own special vgic trace.h file. Signed-off-by: Christoffer Dall arch/arm/kvm/Makefile | 7 +- arch/arm/kvm/arm.c | 1480 ---------------------------------- arch/arm/kvm/mmio.c | 217 ----- arch/arm/kvm/mmu.c | 1958 --------------------------------------------- arch/arm/kvm/perf.c | 68 -- arch/arm/kvm/psci.c | 332 -------- arch/arm/kvm/trace.h | 247 ------ arch/arm64/kvm/Makefile | 5 +- virt/kvm/arm/arm.c | 1480 ++++++++++++++++++++++++++++++++++ virt/kvm/arm/mmio.c | 217 +++++ virt/kvm/arm/mmu.c | 1958 +++++++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/perf.c | 68 ++ virt/kvm/arm/psci.c | 332 ++++++++ virt/kvm/arm/trace.h | 246 +++++- virt/kvm/arm/vgic/trace.h | 37 + virt/kvm/arm/vgic/vgic.c | 2 +- 16 files changed, 4335 insertions(+), 4319 deletions(-) commit be13ec668d043e5313985014d34735ec6ede074a Merge: b7b0201 e8bb467 Author: Vinod Koul Date: Thu May 4 16:08:52 2017 +0530 Merge branch 'topic/pl330' into for-linus commit b7b0201a6743c4d9b634da68ad8bb94db28b8e69 Merge: 3378e7a db6a3d0 Author: Vinod Koul Date: Thu May 4 16:08:21 2017 +0530 Merge branch 'topic/xilinx' into for-linus commit 3378e7a49fda9537d48953cd41cf7836c472ba2f Merge: dd2b9ff dc7c733 Author: Vinod Koul Date: Thu May 4 16:08:10 2017 +0530 Merge branch 'topic/qcom' into for-linus commit dd2b9ff8a9f992b4c85842e8b7c0b6f08f9e7e7c Merge: f23514b 417cb97 Author: Vinod Koul Date: Thu May 4 16:07:59 2017 +0530 Merge branch 'topic/pl08x' into for-linus commit 417cb972537af7994b9123c226a35aac26369f9d Author: Vinod Koul Date: Mon Apr 3 09:04:28 2017 +0530 dmaengine: pl08x: remove lock documentation lock variable in pl08x_dma_chan_state no longer exists so remove it Signed-off-by: Vinod Koul drivers/dma/amba-pl08x.c | 1 - 1 file changed, 1 deletion(-) commit 8ee1bdc5a46cf818e2192c11bc1294a7dbad36c8 Author: Vinod Koul Date: Mon Apr 3 09:02:36 2017 +0530 dmaengine: pl08x: fix pl08x_dma_chan_state documentation Documentation for pl08x_dma_chan_state mentions it as struct whereas it is a enum, so fix that Signed-off-by: Vinod Koul drivers/dma/amba-pl08x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ded091fee6806b7120f475d89c151d611758a395 Author: Linus Walleij Date: Sun Apr 2 16:50:53 2017 +0200 dmaengine: pl08x: Use the BIT() macro consistently This makes the driver shift bits with BIT() which is used on other places in the driver. Signed-off-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/amba-pl08x.c | 10 +++++----- include/linux/amba/pl080.h | 40 ++++++++++++++++++++-------------------- 2 files changed, 25 insertions(+), 25 deletions(-) commit da7cbd2098a7c943ac919297d896682222a306dc Author: Linus Walleij Date: Sun Apr 2 16:50:44 2017 +0200 dmaengine: pl080: Fix some missing kerneldoc Two elements of the physical channel description was missing. Signed-off-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/amba-pl08x.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 44f0aeec203738bf34f4b7e16b745c8c71fe0f06 Author: Linus Walleij Date: Sun Apr 2 16:50:33 2017 +0200 dmaengine: pl080: Cut some unused defines There is no in-kernel code using these indexed register defines, and their offsets are clearly defined right below. Cut them. Signed-off-by: Linus Walleij Signed-off-by: Vinod Koul include/linux/amba/pl080.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit f23514b1017905c2798224fa07e236471b9ed1e7 Merge: fbfb8e1 eda6f4e Author: Vinod Koul Date: Thu May 4 16:03:05 2017 +0530 Merge branch 'topic/cppi' into for-linus commit eeca958dce0a9231d1969f86196653eb50fcc9b3 Author: Luis Henriques Date: Fri Apr 28 11:14:04 2017 +0100 ceph: fix memory leak in __ceph_setxattr() The ceph_inode_xattr needs to be released when removing an xattr. Easily reproducible running the 'generic/020' test from xfstests or simply by doing: attr -s attr0 -V 0 /mnt/test && attr -r attr0 /mnt/test While there, also fix the error path. Here's the kmemleak splat: unreferenced object 0xffff88001f86fbc0 (size 64): comm "attr", pid 244, jiffies 4294904246 (age 98.464s) hex dump (first 32 bytes): 40 fa 86 1f 00 88 ff ff 80 32 38 1f 00 88 ff ff @........28..... 00 01 00 00 00 00 ad de 00 02 00 00 00 00 ad de ................ backtrace: [] kmemleak_alloc+0x49/0xa0 [] kmem_cache_alloc+0x9b/0xf0 [] __ceph_setxattr+0x17e/0x820 [] ceph_set_xattr_handler+0x37/0x40 [] __vfs_removexattr+0x4b/0x60 [] vfs_removexattr+0x77/0xd0 [] removexattr+0x41/0x60 [] path_removexattr+0x75/0xa0 [] SyS_lremovexattr+0xb/0x10 [] entry_SYSCALL_64_fastpath+0x13/0x94 [] 0xffffffffffffffff Cc: stable@vger.kernel.org Signed-off-by: Luis Henriques Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/xattr.c | 3 +++ 1 file changed, 3 insertions(+) commit f775ff7d89f33fc9ba63f6f70df3bcc98c2d9828 Author: Alexander Graf Date: Thu Apr 27 18:34:00 2017 +0200 ceph: fix file open flags on ppc64 The file open flags (O_foo) are platform specific and should never go out to an interface that is not local to the system. Unfortunately these flags have leaked out onto the wire in the cephfs implementation. That lead to bogus flags getting transmitted on ppc64. This patch converts the kernel view of flags to the ceph view of file open flags. Fixes: 124e68e74 ("ceph: file operations") Signed-off-by: Alexander Graf Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/file.c | 34 +++++++++++++++++++++++++++++++++- include/linux/ceph/ceph_fs.h | 12 ++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) commit b50c2de51e611da90cf3cf04c058f7e9bbe79e93 Author: Yan, Zheng Date: Mon Apr 24 11:56:50 2017 +0800 ceph: choose readdir frag based on previous readdir reply The dirfragtree is lazily updated, it's not always accurate. Infinite loops happens in following circumstance. - client send request to read frag A - frag A has been fragmented into frag B and C. So mds fills the reply with contents of frag B - client wants to read next frag C. ceph_choose_frag(frag value of C) return frag A. The fix is using previous readdir reply to calculate next readdir frag when possible. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/dir.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit e010dd0ada619ed6d3411de7371fba12c1baa48b Author: Ilya Dryomov Date: Thu Apr 13 12:17:39 2017 +0200 rbd: exclusive map option Support disabling automatic exclusive lock transfers to allow users to be in charge of which node should own the lock while being able to reuse exclusive lock's built-in blacklist/break-lock functionality. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 73 insertions(+), 10 deletions(-) commit 3b77faa0495abd07e94119681be8cc66af5e0a3b Author: Ilya Dryomov Date: Thu Apr 13 12:17:39 2017 +0200 rbd: return ResponseMessage result from rbd_handle_request_lock() Right now it's just 0, but "no automatic exclusive lock transfers" mode code will need -EROFS. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) commit f9bebd580360c141b5fdbede9cc13a4caf23cd1a Author: Ilya Dryomov Date: Thu Apr 13 12:17:39 2017 +0200 rbd: kill rbd_is_lock_supported() Currently the exclusive lock is acquired only if the mapping is writable, i.e. an image HEAD mapped in rw mode. This means that we don't acquire the lock for executing a read from a snapshot or an image HEAD mapped in ro mode, even if lock_on_read is set. This is somewhat weird and inconsistent with "no automatic exclusive lock transfers" mode, where the lock is acquired unconditionally. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 14bb211d324d6c8140167bd6b2b8a80757348a2f Author: Ilya Dryomov Date: Thu Apr 13 12:17:38 2017 +0200 rbd: support updating the lock cookie without releasing the lock As we no longer release the lock before potentially raising BLACKLISTED in rbd_reregister_watch(), the "either locked or blacklisted" assert in rbd_queue_workfn() needs to go: we can be both locked and blacklisted at that point now. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 66 ++++++++++++++++++++++-------------- include/linux/ceph/cls_lock_client.h | 5 +++ net/ceph/cls_lock_client.c | 51 ++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+), 25 deletions(-) commit cbbfb0ff115159847121afe9c7553bd5c86f6062 Author: Ilya Dryomov Date: Thu Apr 13 12:17:38 2017 +0200 rbd: store lock cookie In preparation for supporting set_cookie method (or rather set_cookie fallback for older OSDs), store the lock cookie on lock and use it on unlock instead of recalculating from rbd_dev->watch_cookie. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit bbead745d96cfd51aaa332bdeab300862c7a8061 Author: Ilya Dryomov Date: Thu Apr 13 12:17:38 2017 +0200 rbd: ignore unlock errors Currently the lock_state is set to UNLOCKED (preventing further I/O), but RELEASED_LOCK notification isn't sent. Be consistent with userspace and treat ceph_cls_unlock() errors as the image is unlocked. Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) commit 5769ed0cb12dcd135251e546863196cec0b58e34 Author: Ilya Dryomov Date: Thu Apr 13 12:17:38 2017 +0200 rbd: fix error handling around rbd_init_disk() add_disk() takes an extra reference on disk->queue, which is put in put_disk() -> disk_release(). Avoiding blk_cleanup_queue() (which also puts the queue) until add_disk() sets GENHD_FL_UP works for the queue itself, but leaks various queue internals. Conditioning tag_set freeing on GENHD_FL_UP is wrong too: all error paths after rbd_init_disk() leak the tag_set. Move the final "announce" steps out of rbd_dev_device_setup() so that it can be unwound like any other function. Leave "announce" steps to do_rbd_add/remove(). Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 87 +++++++++++++++++++++++++++-------------------------- 1 file changed, 44 insertions(+), 43 deletions(-) commit fd22aef8b47cfc068448df65c1183698b0abd815 Author: Ilya Dryomov Date: Thu Apr 13 12:17:37 2017 +0200 rbd: move rbd_unregister_watch() call into rbd_dev_image_release() rbd_dev->disk tear down vs rbd_watch_cb() race shouldn't be a problem anymore thanks to EXISTS and REMOVING checks in rbd_dev_update_size(). A similar race could occur on "rbd map", see commit 811c66887746 ("rbd: fix rbd map vs notify races"). Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 8b679ec5257eeb3d73b71a613cad2769f21c86ad Author: Ilya Dryomov Date: Thu Apr 13 12:17:37 2017 +0200 rbd: move rbd_dev_destroy() call out of rbd_dev_image_release() ... to simplify error handling in do_rbd_add(). Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 26544c623e741ac6445f8b1ae369ee32ae1794ad Author: Jeff Layton Date: Tue Apr 4 08:39:46 2017 -0400 ceph: when seeing write errors on an inode, switch to sync writes Currently, we don't have a real feedback mechanism in place for when we start seeing buffered writeback errors. If writeback is failing, there is nothing that prevents an application from continuing to dirty pages that aren't being cleaned. In the event that we're seeing write errors of any sort occur on an inode, have the callback set a flag to force further writes to be synchronous. When the next write succeeds, clear the flag to allow buffered writeback to continue. Since this is just a hint to the write submission mechanism, we only take the i_ceph_lock when a lockless check shows that the flag needs to be changed. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng” Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 6 +++++- fs/ceph/file.c | 31 ++++++++++++++++++------------- fs/ceph/super.h | 26 ++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 14 deletions(-) commit 6fc1fe5e4cfc8939ee59a570b087946042a30140 Author: Jeff Layton Date: Tue Apr 4 08:39:44 2017 -0400 Revert "ceph: SetPageError() for writeback pages if writepages fails" This reverts commit b109eec6f4332bd517e2f41e207037c4b9065094. If I'm filling up a filesystem with this sort of command: $ dd if=/dev/urandom of=/mnt/cephfs/fillfile bs=2M oflag=sync ...then I'll eventually get back EIO on a write. Further calls will give us ENOSPC. I'm not sure what prompted this change, but I don't think it's what we want to do. If writepages failed, we will have already set the mapping error appropriately, and that's what gets reported by fsync() or close(). __filemap_fdatawait_range however, does this: wait_on_page_writeback(page); if (TestClearPageError(page)) ret = -EIO; ...and that -EIO ends up trumping the mapping's error if one exists. When writepages fails, we only want to set the error in the mapping, and not flag the individual pages. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng” Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 3 --- 1 file changed, 3 deletions(-) commit 92475f05bdb6daefce3f55f46551153e7ed05f45 Author: Jeff Layton Date: Thu Apr 13 11:07:04 2017 -0400 ceph: handle epoch barriers in cap messages Have the client store and update the osdc epoch_barrier when a cap message comes in with one. When sending cap messages, send the epoch barrier as well. This allows clients to inform servers that their released caps may not be used until a particular OSD map epoch. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng” Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 21 ++++++++++++++++----- fs/ceph/mds_client.c | 20 ++++++++++++++++++++ fs/ceph/mds_client.h | 7 +++++-- 3 files changed, 41 insertions(+), 7 deletions(-) commit 58eb7932ae4d671d2a2377a1779eda96a2789b11 Author: Jeff Layton Date: Tue Apr 18 09:21:16 2017 -0400 libceph: add an epoch_barrier field to struct ceph_osd_client Cephfs can get cap update requests that contain a new epoch barrier in them. When that happens we want to pause all OSD traffic until the right map epoch arrives. Add an epoch_barrier field to ceph_osd_client that is protected by the osdc->lock rwsem. When the barrier is set, and the current OSD map epoch is below that, pause the request target when submitting the request or when revisiting it. Add a way for upper layers (cephfs) to update the epoch_barrier as well. If we get a new map, compare the new epoch against the barrier before kicking requests and request another map if the map epoch is still lower than the one we want. If we get a map with a full pool, or at quota condition, then set the barrier to the current epoch value. Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov include/linux/ceph/osd_client.h | 2 ++ net/ceph/debugfs.c | 3 +- net/ceph/osd_client.c | 79 +++++++++++++++++++++++++++++++++++++---- 3 files changed, 76 insertions(+), 8 deletions(-) commit fc36d0a42c19870e57a542c2dd0972185584d407 Author: Jeff Layton Date: Tue Apr 4 08:39:39 2017 -0400 libceph: abort already submitted but abortable requests when map or pool goes full When a Ceph volume hits capacity, a flag is set in the OSD map to indicate that, and a new map is sprayed around the cluster. With cephfs we want it to shut down any abortable requests that are in progress with an -ENOSPC error as they'd just hang otherwise. Add a new ceph_osdc_abort_on_full helper function to handle this. It will first check whether there is an out-of-space condition in the cluster and then walk the tree and abort any request that has r_abort_on_full set with a -ENOSPC error. Call this new function directly whenever we get a new OSD map. Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov net/ceph/osd_client.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit a1f4020aab10a6bddb2d061c960ebe52cdfa30b5 Author: Jeff Layton Date: Tue Apr 4 08:39:37 2017 -0400 libceph: allow requests to return immediately on full conditions if caller wishes Usually, when the osd map is flagged as full or the pool is at quota, write requests just hang. This is not what we want for cephfs, where it would be better to simply report -ENOSPC back to userland instead of stalling. If the caller knows that it will want an immediate error return instead of blocking on a full or at-quota error condition then allow it to set a flag to request that behavior. Set that flag in ceph_osdc_new_request (since ceph.ko is the only caller), and on any other write request from ceph.ko. A later patch will deal with requests that were submitted before the new map showing the full condition came in. Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 1 + fs/ceph/file.c | 1 + include/linux/ceph/osd_client.h | 1 + net/ceph/osd_client.c | 7 +++++++ 4 files changed, 10 insertions(+) commit aa26d662b9d44e7f5b0d109e892e537a23471863 Author: Jeff Layton Date: Tue Apr 4 08:39:36 2017 -0400 libceph: remove req->r_replay_version Nothing uses this anymore with the removal of the ack vs. commit code. Remove the field and just encode zeroes into place in the request encoding. Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov include/linux/ceph/osd_client.h | 1 - net/ceph/debugfs.c | 4 +--- net/ceph/osd_client.c | 7 ++++--- 3 files changed, 5 insertions(+), 7 deletions(-) commit 79162547b76e4979b21ef80c9629ada94a51a59b Author: Yan, Zheng Date: Wed Apr 5 12:54:05 2017 -0400 ceph: make seeky readdir more efficient Current cephfs client uses string to indicate start position of readdir. The string is last entry of previous readdir reply. This approach does not work for seeky readdir because we can not easily convert the new postion to a string. For seeky readdir, mds needs to return dentries from the beginning. Client keeps retrying if the reply does not contain the dentry it wants. In current version of ceph, mds sorts CDentry in its cache in hash order. Client also uses dentry hash to compose dir postion. For seeky readdir, if client passes the hash part of dir postion to mds. mds can avoid replying useless dentries. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/dir.c | 4 ++++ fs/ceph/inode.c | 17 ++++++++++++----- fs/ceph/mds_client.c | 1 + fs/ceph/mds_client.h | 3 ++- include/linux/ceph/ceph_fs.h | 2 ++ 5 files changed, 21 insertions(+), 6 deletions(-) commit 2827528da003ad207930f0d1af5faf3e482d6393 Author: Yan, Zheng Date: Tue Mar 28 17:56:29 2017 +0800 ceph: close stopped mds' session If a mds has stopped, close its session and clean up its session requests/caps. The process is similar to handling SESSION_CLOSE initiated by mds. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 0a07fc8cd01b6838d999a5eacaa99fe90b8f768b Author: Yan, Zheng Date: Wed Mar 29 15:30:24 2017 +0800 ceph: fix potential use-after-free __unregister_session() free the session if it drops the last reference. We should grab an extra reference if we want to use session after __unregister_session(). Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 76201b6354bb3aa31c7ba2bd42b9cbb8dda71c44 Author: Yan, Zheng Date: Tue Mar 28 17:04:13 2017 +0800 ceph: allow connecting to mds whose rank >= mdsmap::m_max_mds mdsmap::m_max_mds is the expected count of active mds. It's not the max rank of active mds. User can decrease mdsmap::m_max_mds, but does not stop mds whose rank >= mdsmap::m_max_mds. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/debugfs.c | 21 ++++++++++----------- fs/ceph/mds_client.c | 10 +++++----- fs/ceph/mdsmap.c | 44 +++++++++++++++++++++++++++++++++++++------- include/linux/ceph/mdsmap.h | 7 ++++--- 4 files changed, 56 insertions(+), 26 deletions(-) commit 8242c9f35ae77ca21e6cf79827787789a988f44c Author: Yan, Zheng Date: Sat Mar 25 17:28:10 2017 +0800 ceph: fix wrong check in ceph_renew_caps() Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e1a5ee6577e43e5be55369d398107080b360941 Author: Elena Reshetova Date: Fri Mar 17 14:10:29 2017 +0200 libceph: convert ceph_pagelist.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 2 +- include/linux/ceph/pagelist.h | 6 +++--- net/ceph/pagelist.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 02113a0f14e20bd8e675d7cec16db6eaaf2b2380 Author: Elena Reshetova Date: Fri Mar 17 14:10:28 2017 +0200 libceph: convert ceph_osd.o_ref from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Ilya Dryomov include/linux/ceph/osd_client.h | 3 ++- net/ceph/osd_client.c | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) commit 06dfa96399a9a3280dd81e47f8696aa89f1783e7 Author: Elena Reshetova Date: Fri Mar 17 14:10:27 2017 +0200 libceph: convert ceph_snap_context.nref from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Ilya Dryomov include/linux/ceph/libceph.h | 3 ++- net/ceph/snapshot.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 805692d0e0f7dec42b5e05fb8b2a5c172f66a3c2 Author: Elena Reshetova Date: Fri Mar 3 11:15:07 2017 +0200 ceph: convert ceph_cap_snap.nref from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 4 ++-- fs/ceph/snap.c | 2 +- fs/ceph/super.h | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) commit 3997c01d260ed00d712b051fdab022a08719441e Author: Elena Reshetova Date: Fri Mar 3 11:15:06 2017 +0200 ceph: convert ceph_mds_session.s_ref from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 18 +++++++++--------- fs/ceph/mds_client.h | 5 +++-- 2 files changed, 12 insertions(+), 11 deletions(-) commit d6a3408a77807037872892c2a2034180fcc08d12 Author: Ilya Dryomov Date: Fri Mar 3 18:16:07 2017 +0100 libceph: supported_features module parameter Add a readonly, exported to sysfs module parameter so that userspace can generate meaningful error messages. It's a bit funky, but there is no other libceph-specific place. Signed-off-by: Ilya Dryomov net/ceph/ceph_common.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 74da4a0f574d11ed60dbe50a1e5e942e20476590 Author: Ilya Dryomov Date: Fri Mar 3 18:16:07 2017 +0100 libceph, ceph: always advertise all supported features No reason to hide CephFS-specific features in the rbd case. Recent feature bits mix RADOS and CephFS-specific stuff together anyway. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 2 +- fs/ceph/super.c | 7 +------ include/linux/ceph/ceph_features.h | 4 ++++ include/linux/ceph/libceph.h | 5 +---- net/ceph/ceph_common.c | 16 ++++++---------- 5 files changed, 13 insertions(+), 21 deletions(-) commit ce4586063f1af780b1c6b7e344907e6f9c1ba59a Author: Richard Weinberger Date: Thu May 4 08:15:10 2017 +0200 um: Add missing NR_CPUS include We need linux/threads.h for that variable. Fixes: 8bba077066d6d0 ("um: Set number of CPUs") Signed-off-by: Richard Weinberger arch/um/os-Linux/skas/process.c | 1 + 1 file changed, 1 insertion(+) commit 9b3eb54106cf6acd03f07cf0ab01c13676a226c2 Author: Sabrina Dubroca Date: Wed May 3 16:43:19 2017 +0200 xfrm: fix stack access out of bounds with CONFIG_XFRM_SUB_POLICY When CONFIG_XFRM_SUB_POLICY=y, xfrm_dst stores a copy of the flowi for that dst. Unfortunately, the code that allocates and fills this copy doesn't care about what type of flowi (flowi, flowi4, flowi6) gets passed. In multiple code paths (from raw_sendmsg, from TCP when replying to a FIN, in vxlan, geneve, and gre), the flowi that gets passed to xfrm is actually an on-stack flowi4, so we end up reading stuff from the stack past the end of the flowi4 struct. Since xfrm_dst->origin isn't used anywhere following commit ca116922afa8 ("xfrm: Eliminate "fl" and "pol" args to xfrm_bundle_ok()."), just get rid of it. xfrm_dst->partner isn't used either, so get rid of that too. Fixes: 9d6ec938019c ("ipv4: Use flowi4 in public route lookup interfaces.") Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert include/net/xfrm.h | 10 ---------- net/xfrm/xfrm_policy.c | 47 ----------------------------------------------- 2 files changed, 57 deletions(-) commit 0e78a87306a6f55b1c7bbafad1de62c3975953ca Author: Steffen Klassert Date: Wed May 3 08:44:27 2017 +0200 esp4: Fix udpencap for local TCP packets. Locally generated TCP packets are usually cloned, so we do skb_cow_data() on this packets. After that we need to reload the pointer to the esp header. On udpencap this header has an offset to skb_transport_header, so take this offset into account. Fixes: 67d349ed603 ("net/esp4: Fix invalid esph pointer crash") Fixes: fca11ebde3f0 ("esp4: Reorganize esp_output") Reported-by: Don Bowman Signed-off-by: Steffen Klassert net/ipv4/esp4.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7db0a6efdc3e990cdfd4b24820d010e9eb7890ad Author: Steve French Date: Wed May 3 21:12:20 2017 -0500 SMB3: Work around mount failure when using SMB3 dialect to Macs Macs send the maximum buffer size in response on ioctl to validate negotiate security information, which causes us to fail the mount as the response buffer is larger than the expected response. Changed ioctl response processing to allow for padding of validate negotiate ioctl response and limit the maximum response size to maximum buffer size. Signed-off-by: Steve French CC: Stable fs/cifs/smb2pdu.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 77c0eddeeeee14bf0fb0c0bb97e782981bbcf084 Author: Steven Rostedt (VMware) Date: Wed May 3 11:41:44 2017 -0400 ftrace: Simplify ftrace_match_record() even more Dan Carpenter sent a patch to remove a check in ftrace_match_record() because the logic of the code made the check redundant. I looked deeper into the code, and made the following logic table, with the three variables and the result of the original code. modname mod_matches exclude_mod result ------- ----------- ----------- ------ 0 0 0 return 0 0 0 1 func_match 0 1 * < cannot exist > 1 0 0 return 0 1 0 1 func_match 1 1 0 func_match 1 1 1 return 0 Notice that when mod_matches == exclude mod, the result is always to return 0, and when mod_matches != exclude_mod, then the result is to test the function. This means we only need test if mod_matches is equal to exclude_mod. Cc: Dan Carpenter Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 31805c90521ea75dfa3d016fc94f581da6a40fee Author: Dan Carpenter Date: Fri Mar 31 18:21:30 2017 +0300 ftrace: Remove an unneeded condition We know that "mod_matches" is true here so there is no need to check again. Link: http://lkml.kernel.org/r/20170331152130.GA4947@mwanda Signed-off-by: Dan Carpenter Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e09e28671cda63e6308b31798b997639120e2a21 Author: Amey Telawane Date: Wed May 3 15:41:14 2017 +0530 tracing: Use strlcpy() instead of strcpy() in __trace_find_cmdline() Strcpy is inherently not safe, and strlcpy() should be used instead. __trace_find_cmdline() uses strcpy() because the comms saved must have a terminating nul character, but it doesn't hurt to add the extra protection of using strlcpy() instead of strcpy(). Link: http://lkml.kernel.org/r/1493806274-13936-1-git-send-email-amit.pundir@linaro.org Signed-off-by: Amey Telawane [AmitP: Cherry-picked this commit from CodeAurora kernel/msm-3.10 https://source.codeaurora.org/quic/la/kernel/msm-3.10/commit/?id=2161ae9a70b12cf18ac8e5952a20161ffbccb477] Signed-off-by: Amit Pundir [ Updated change log and removed the "- 1" from len parameter ] Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1be8edda4fe1f0a75007f26000a51436800869d Merge: 4c17468 1758618 Author: Linus Torvalds Date: Wed May 3 19:12:27 2017 -0700 Merge tag 'modules-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux Pull modules updates from Jessica Yu: - Minor code cleanups - Fix section alignment for .init_array * tag 'modules-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: kallsyms: Use bounded strnchr() when parsing string module: Unify the return value type of try_module_get module: set .init_array alignment to 8 commit e9cdd307704b5a8f685fa3fff4403691fbf64f97 Author: Yunlei He Date: Wed Apr 26 15:56:52 2017 +0800 f2fs: fix a mount fail for wrong next_scan_nid -write_checkpoint -do_checkpoint -next_free_nid <--- something wrong with next free nid -f2fs_fill_super -build_node_manager -build_free_nids -get_current_nat_page -__get_meta_page <--- attempt to access beyond end of device Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 3 +++ 1 file changed, 3 insertions(+) commit baaabbb72b0960d6d5220b77f206116aa54771de Author: Chao Yu Date: Thu May 4 09:35:43 2017 +0800 f2fs: enhance scalability of trace macro Use __print_flags in show_bio_op_flags and show_cpreason instead of __print_symbolic, it enables tracer function traverses and shows all bits in the flag. Additionally, add missing REQ_FUA into F2FS_OP_FLAGS. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim include/trace/events/f2fs.h | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit 4c174688ee92805aa5df6e06e5b625a3286e415c Merge: 9c35baf 73a757e Author: Linus Torvalds Date: Wed May 3 18:41:21 2017 -0700 Merge tag 'trace-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: "New features for this release: - Pretty much a full rewrite of the processing of function plugins. i.e. echo do_IRQ:stacktrace > set_ftrace_filter - The rewrite was needed to add plugins to be unique to tracing instances. i.e. mkdir instance/foo; cd instances/foo; echo do_IRQ:stacktrace > set_ftrace_filter The old way was written very hacky. This removes a lot of those hacks. - New "function-fork" tracing option. When set, pids in the set_ftrace_pid will have their children added when the processes with their pids listed in the set_ftrace_pid file forks. - Exposure of "maxactive" for kretprobe in kprobe_events - Allow for builtin init functions to be traced by the function tracer (via the kernel command line). Module init function tracing will come in the next release. - Added more selftests, and have selftests also test in an instance" * tag 'trace-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (60 commits) ring-buffer: Return reader page back into existing ring buffer selftests: ftrace: Allow some event trigger tests to run in an instance selftests: ftrace: Have some basic tests run in a tracing instance too selftests: ftrace: Have event tests also run in an tracing instance selftests: ftrace: Make func_event_triggers and func_traceonoff_triggers tests do instances selftests: ftrace: Allow some tests to be run in a tracing instance tracing/ftrace: Allow for instances to trigger their own stacktrace probes tracing/ftrace: Allow for the traceonoff probe be unique to instances tracing/ftrace: Enable snapshot function trigger to work with instances tracing/ftrace: Allow instances to have their own function probes tracing/ftrace: Add a better way to pass data via the probe functions ftrace: Dynamically create the probe ftrace_ops for the trace_array tracing: Pass the trace_array into ftrace_probe_ops functions tracing: Have the trace_array hold the list of registered func probes ftrace: If the hash for a probe fails to update then free what was initialized ftrace: Have the function probes call their own function ftrace: Have each function probe use its own ftrace_ops ftrace: Have unregister_ftrace_function_probe_func() return a value ftrace: Add helper function ftrace_hash_move_and_update_ops() ftrace: Remove data field from ftrace_func_probe structure ... commit 9c35baf6cee9a5745d55de6f9995916dde642517 Merge: dd23f27 cf39bf5 Author: Linus Torvalds Date: Wed May 3 18:29:28 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk Pull printk updates from Petr Mladek: - There is a situation when early console is not deregistered because the preferred one matches a wrong entry. It caused messages to appear twice. This is the 2nd attempt to fix it. The first one was wrong, see the commit c6c7d83b9c9e ('Revert "console: don't prefer first registered if DT specifies stdout-path"'). The fix is coupled with some small code clean up. Well, the console registration code would deserve a big one. We need to think about it. - Do not lose information about the preemtive context when the console semaphore is re-taken. - Do not block CPU hotplug when someone else is already pushing messages to the console. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: printk: fix double printing with earlycon printk: rename selected_console -> preferred_console printk: fix name/type/scope of preferred_console var printk: Correctly handle preemption in console_unlock() printk: use console_trylock() in console_cpu_notify() commit c374ed27c93698c794f99c5d41d9ad3062c4c207 Author: Gavin Shan Date: Wed Apr 19 14:46:24 2017 +1000 powerpc/powernv: Block PCI config access on BCM5718 during EEH recovery Similar to what is done in commit b6541db13952 ("powerpc/eeh: Block PCI config access upon frozen PE"), we need block PCI config access for BCM5719 when recovering frozen error on them. Otherwise, an unexpected recursive fenced PHB error is observed. 0001:06:00.0 Ethernet controller: Broadcom Corporation \ NetXtreme BCM5718 Gigabit Ethernet PCIe (rev 10) 0001:06:00.1 Ethernet controller: Broadcom Corporation \ NetXtreme BCM5718 Gigabit Ethernet PCIe (rev 10) Signed-off-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/eeh-powernv.c | 3 +++ 1 file changed, 3 insertions(+) commit dd23f273d9a765d7f092c1bb0d1cd7aaf668077e Merge: 1684096 b193859 Author: Linus Torvalds Date: Wed May 3 17:55:59 2017 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc updates from Andrew Morton: - a few misc things - most of MM - KASAN updates * emailed patches from Andrew Morton : (102 commits) kasan: separate report parts by empty lines kasan: improve double-free report format kasan: print page description after stacks kasan: improve slab object description kasan: change report header kasan: simplify address description logic kasan: change allocation and freeing stack traces headers kasan: unify report headers kasan: introduce helper functions for determining bug type mm: hwpoison: call shake_page() after try_to_unmap() for mlocked page mm: hwpoison: call shake_page() unconditionally mm/swapfile.c: fix swap space leak in error path of swap_free_entries() mm/gup.c: fix access_ok() argument type mm/truncate: avoid pointless cleancache_invalidate_inode() calls. mm/truncate: bail out early from invalidate_inode_pages2_range() if mapping is empty fs/block_dev: always invalidate cleancache in invalidate_bdev() fs: fix data invalidation in the cleancache during direct IO zram: reduce load operation in page_same_filled zram: use zram_free_page instead of open-coded zram: introduce zram data accessor ... commit d8a6e505d6bba2250852fbc1c1c86fe68aaf9af3 Author: David Disseldorp Date: Thu May 4 00:41:13 2017 +0200 cifs: fix CIFS_IOC_GET_MNT_INFO oops An open directory may have a NULL private_data pointer prior to readdir. Fixes: 0de1f4c6f6c0 ("Add way to query server fs info for smb3") Cc: stable@vger.kernel.org Signed-off-by: David Disseldorp Signed-off-by: Steve French fs/cifs/ioctl.c | 2 ++ 1 file changed, 2 insertions(+) commit b704e70b7cf48f9b67c07d585168e102dfa30bb4 Author: Björn Jacke Date: Wed May 3 23:47:44 2017 +0200 CIFS: fix mapping of SFM_SPACE and SFM_PERIOD - trailing space maps to 0xF028 - trailing period maps to 0xF029 This fix corrects the mapping of file names which have a trailing character that would otherwise be illegal (period or space) but is allowed by POSIX. Signed-off-by: Bjoern Jacke CC: Stable Signed-off-by: Steve French fs/cifs/cifs_unicode.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b19385993623c1a18a686b6b271cd24d5aa96f52 Author: Andrey Konovalov Date: Wed May 3 14:56:50 2017 -0700 kasan: separate report parts by empty lines Makes the report easier to read. Link: http://lkml.kernel.org/r/20170302134851.101218-10-andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/report.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 5ab6d91ac998158d04f9563335aa5f1409eda971 Author: Andrey Konovalov Date: Wed May 3 14:56:47 2017 -0700 kasan: improve double-free report format Changes double-free report header from BUG: Double free or freeing an invalid pointer Unexpected shadow byte: 0xFB to BUG: KASAN: double-free or invalid-free in kmalloc_oob_left+0xe5/0xef This makes a bug uniquely identifiable by the first report line. To account for removing of the unexpected shadow value, print shadow bytes at the end of the report as in reports for other kinds of bugs. Link: http://lkml.kernel.org/r/20170302134851.101218-9-andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/kasan.c | 3 ++- mm/kasan/kasan.h | 2 +- mm/kasan/report.c | 30 ++++++++++++++---------------- 3 files changed, 17 insertions(+), 18 deletions(-) commit 430a05f91d6051705a6ddbe207735ca62e39bb80 Author: Andrey Konovalov Date: Wed May 3 14:56:44 2017 -0700 kasan: print page description after stacks Moves page description after the stacks since it's less important. Link: http://lkml.kernel.org/r/20170302134851.101218-8-andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/report.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 0c06f1f86c87b1eb93420effe0c0457b30911360 Author: Andrey Konovalov Date: Wed May 3 14:56:41 2017 -0700 kasan: improve slab object description Changes slab object description from: Object at ffff880068388540, in cache kmalloc-128 size: 128 to: The buggy address belongs to the object at ffff880068388540 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 123 bytes inside of 128-byte region [ffff880068388540, ffff8800683885c0) Makes it more explanatory and adds information about relative offset of the accessed address to the start of the object. Link: http://lkml.kernel.org/r/20170302134851.101218-7-andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/report.c | 53 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 11 deletions(-) commit 7f0a84c23b1dede3e76a7b2ebbde45a506252005 Author: Andrey Konovalov Date: Wed May 3 14:56:38 2017 -0700 kasan: change report header Change report header format from: BUG: KASAN: use-after-free in unwind_get_return_address+0x28a/0x2c0 at addr ffff880069437950 Read of size 8 by task insmod/3925 to: BUG: KASAN: use-after-free in unwind_get_return_address+0x28a/0x2c0 Read of size 8 at addr ffff880069437950 by task insmod/3925 The exact access address is not usually important, so move it to the second line. This also makes the header look visually balanced. Link: http://lkml.kernel.org/r/20170302134851.101218-6-andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/report.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit db429f16e0b472292000fd53b63ebd7221a9856e Author: Andrey Konovalov Date: Wed May 3 14:56:34 2017 -0700 kasan: simplify address description logic Simplify logic for describing a memory address. Add addr_to_page() helper function. Makes the code easier to follow. Link: http://lkml.kernel.org/r/20170302134851.101218-5-andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/report.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) commit b6b72f4919c121bee5890732e0b8de2ab99c8dbc Author: Andrey Konovalov Date: Wed May 3 14:56:31 2017 -0700 kasan: change allocation and freeing stack traces headers Change stack traces headers from: Allocated: PID = 42 to: Allocated by task 42: Makes the report one line shorter and look better. Link: http://lkml.kernel.org/r/20170302134851.101218-4-andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/report.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 7d418f7b0d3407b93ec70f3b380cc5beafa1fa68 Author: Andrey Konovalov Date: Wed May 3 14:56:28 2017 -0700 kasan: unify report headers Unify KASAN report header format for different kinds of bad memory accesses. Makes the code simpler. Link: http://lkml.kernel.org/r/20170302134851.101218-3-andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/report.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 5e82cd120382ad7bbcc82298e34a034538b4384c Author: Andrey Konovalov Date: Wed May 3 14:56:25 2017 -0700 kasan: introduce helper functions for determining bug type Patch series "kasan: improve error reports", v2. This patchset improves KASAN reports by making them easier to read and a little more detailed. Also improves mm/kasan/report.c readability. Effectively changes a use-after-free report to: ================================================================== BUG: KASAN: use-after-free in kmalloc_uaf+0xaa/0xb6 [test_kasan] Write of size 1 at addr ffff88006aa59da8 by task insmod/3951 CPU: 1 PID: 3951 Comm: insmod Tainted: G B 4.10.0+ #84 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: dump_stack+0x292/0x398 print_address_description+0x73/0x280 kasan_report.part.2+0x207/0x2f0 __asan_report_store1_noabort+0x2c/0x30 kmalloc_uaf+0xaa/0xb6 [test_kasan] kmalloc_tests_init+0x4f/0xa48 [test_kasan] do_one_initcall+0xf3/0x390 do_init_module+0x215/0x5d0 load_module+0x54de/0x82b0 SYSC_init_module+0x3be/0x430 SyS_init_module+0x9/0x10 entry_SYSCALL_64_fastpath+0x1f/0xc2 RIP: 0033:0x7f22cfd0b9da RSP: 002b:00007ffe69118a78 EFLAGS: 00000206 ORIG_RAX: 00000000000000af RAX: ffffffffffffffda RBX: 0000555671242090 RCX: 00007f22cfd0b9da RDX: 00007f22cffcaf88 RSI: 000000000004df7e RDI: 00007f22d0399000 RBP: 00007f22cffcaf88 R08: 0000000000000003 R09: 0000000000000000 R10: 00007f22cfd07d0a R11: 0000000000000206 R12: 0000555671243190 R13: 000000000001fe81 R14: 0000000000000000 R15: 0000000000000004 Allocated by task 3951: save_stack_trace+0x16/0x20 save_stack+0x43/0xd0 kasan_kmalloc+0xad/0xe0 kmem_cache_alloc_trace+0x82/0x270 kmalloc_uaf+0x56/0xb6 [test_kasan] kmalloc_tests_init+0x4f/0xa48 [test_kasan] do_one_initcall+0xf3/0x390 do_init_module+0x215/0x5d0 load_module+0x54de/0x82b0 SYSC_init_module+0x3be/0x430 SyS_init_module+0x9/0x10 entry_SYSCALL_64_fastpath+0x1f/0xc2 Freed by task 3951: save_stack_trace+0x16/0x20 save_stack+0x43/0xd0 kasan_slab_free+0x72/0xc0 kfree+0xe8/0x2b0 kmalloc_uaf+0x85/0xb6 [test_kasan] kmalloc_tests_init+0x4f/0xa48 [test_kasan] do_one_initcall+0xf3/0x390 do_init_module+0x215/0x5d0 load_module+0x54de/0x82b0 SYSC_init_module+0x3be/0x430 SyS_init_module+0x9/0x10 entry_SYSCALL_64_fastpath+0x1f/0xc The buggy address belongs to the object at ffff88006aa59da0 which belongs to the cache kmalloc-16 of size 16 The buggy address is located 8 bytes inside of 16-byte region [ffff88006aa59da0, ffff88006aa59db0) The buggy address belongs to the page: page:ffffea0001aa9640 count:1 mapcount:0 mapping: (null) index:0x0 flags: 0x100000000000100(slab) raw: 0100000000000100 0000000000000000 0000000000000000 0000000180800080 raw: ffffea0001abe380 0000000700000007 ffff88006c401b40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88006aa59c80: 00 00 fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc ffff88006aa59d00: 00 00 fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc >ffff88006aa59d80: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ^ ffff88006aa59e00: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ffff88006aa59e80: fb fb fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc ================================================================== from: ================================================================== BUG: KASAN: use-after-free in kmalloc_uaf+0xaa/0xb6 [test_kasan] at addr ffff88006c4dcb28 Write of size 1 by task insmod/3984 CPU: 1 PID: 3984 Comm: insmod Tainted: G B 4.10.0+ #83 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: dump_stack+0x292/0x398 kasan_object_err+0x1c/0x70 kasan_report.part.1+0x20e/0x4e0 __asan_report_store1_noabort+0x2c/0x30 kmalloc_uaf+0xaa/0xb6 [test_kasan] kmalloc_tests_init+0x4f/0xa48 [test_kasan] do_one_initcall+0xf3/0x390 do_init_module+0x215/0x5d0 load_module+0x54de/0x82b0 SYSC_init_module+0x3be/0x430 SyS_init_module+0x9/0x10 entry_SYSCALL_64_fastpath+0x1f/0xc2 RIP: 0033:0x7feca0f779da RSP: 002b:00007ffdfeae5218 EFLAGS: 00000206 ORIG_RAX: 00000000000000af RAX: ffffffffffffffda RBX: 000055a064c13090 RCX: 00007feca0f779da RDX: 00007feca1236f88 RSI: 000000000004df7e RDI: 00007feca1605000 RBP: 00007feca1236f88 R08: 0000000000000003 R09: 0000000000000000 R10: 00007feca0f73d0a R11: 0000000000000206 R12: 000055a064c14190 R13: 000000000001fe81 R14: 0000000000000000 R15: 0000000000000004 Object at ffff88006c4dcb20, in cache kmalloc-16 size: 16 Allocated: PID = 3984 save_stack_trace+0x16/0x20 save_stack+0x43/0xd0 kasan_kmalloc+0xad/0xe0 kmem_cache_alloc_trace+0x82/0x270 kmalloc_uaf+0x56/0xb6 [test_kasan] kmalloc_tests_init+0x4f/0xa48 [test_kasan] do_one_initcall+0xf3/0x390 do_init_module+0x215/0x5d0 load_module+0x54de/0x82b0 SYSC_init_module+0x3be/0x430 SyS_init_module+0x9/0x10 entry_SYSCALL_64_fastpath+0x1f/0xc2 Freed: PID = 3984 save_stack_trace+0x16/0x20 save_stack+0x43/0xd0 kasan_slab_free+0x73/0xc0 kfree+0xe8/0x2b0 kmalloc_uaf+0x85/0xb6 [test_kasan] kmalloc_tests_init+0x4f/0xa48 [test_kasan] do_one_initcall+0xf3/0x390 do_init_module+0x215/0x5d0 load_module+0x54de/0x82b0 SYSC_init_module+0x3be/0x430 SyS_init_module+0x9/0x10 entry_SYSCALL_64_fastpath+0x1f/0xc2 Memory state around the buggy address: ffff88006c4dca00: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ffff88006c4dca80: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc >ffff88006c4dcb00: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ^ ffff88006c4dcb80: fb fb fc fc 00 00 fc fc fb fb fc fc fb fb fc fc ffff88006c4dcc00: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ================================================================== This patch (of 9): Introduce get_shadow_bug_type() function, which determines bug type based on the shadow value for a particular kernel address. Introduce get_wild_bug_type() function, which determines bug type for addresses which don't have a corresponding shadow value. Link: http://lkml.kernel.org/r/20170302134851.101218-2-andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/report.c | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) commit 286c469a988fbaf68e3a97ddf1e6c245c1446968 Author: Naoya Horiguchi Date: Wed May 3 14:56:22 2017 -0700 mm: hwpoison: call shake_page() after try_to_unmap() for mlocked page Memory error handler calls try_to_unmap() for error pages in various states. If the error page is a mlocked page, error handling could fail with "still referenced by 1 users" message. This is because the page is linked to and stays in lru cache after the following call chain. try_to_unmap_one page_remove_rmap clear_page_mlock putback_lru_page lru_cache_add memory_failure() calls shake_page() to hanlde the similar issue, but current code doesn't cover because shake_page() is called only before try_to_unmap(). So this patches adds shake_page(). Fixes: 23a003bfd23ea9ea0b7756b920e51f64b284b468 ("mm/madvise: pass return code of memory_failure() to userspace") Link: http://lkml.kernel.org/r/20170417055948.GM31394@yexl-desktop Link: http://lkml.kernel.org/r/1493197841-23986-3-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Naoya Horiguchi Reported-by: kernel test robot Cc: Xiaolong Ye Cc: Chen Gong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory-failure.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8bcb74de764aaa261d6af3ce5ac723e435f00ff4 Author: Naoya Horiguchi Date: Wed May 3 14:56:19 2017 -0700 mm: hwpoison: call shake_page() unconditionally shake_page() is called before going into core error handling code in order to ensure that the error page is flushed from lru_cache lists where pages stay during transferring among LRU lists. But currently it's not fully functional because when the page is linked to lru_cache by calling activate_page(), its PageLRU flag is set and shake_page() is skipped. The result is to fail error handling with "still referenced by 1 users" message. When the page is linked to lru_cache by isolate_lru_page(), its PageLRU is clear, so that's fine. This patch makes shake_page() unconditionally called to avoild the failure. Fixes: 23a003bfd23ea9ea0b7756b920e51f64b284b468 ("mm/madvise: pass return code of memory_failure() to userspace") Link: http://lkml.kernel.org/r/20170417055948.GM31394@yexl-desktop Link: http://lkml.kernel.org/r/1493197841-23986-2-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Naoya Horiguchi Reported-by: kernel test robot Cc: Xiaolong Ye Cc: Chen Gong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hwpoison-inject.c | 3 +-- mm/memory-failure.c | 27 +++++++++++---------------- 2 files changed, 12 insertions(+), 18 deletions(-) commit 0ccfece6ed507738c0e7e4414c3688b78d4e3756 Author: Huang Ying Date: Wed May 3 14:56:16 2017 -0700 mm/swapfile.c: fix swap space leak in error path of swap_free_entries() In swapcache_free_entries(), if swap_info_get_cont() returns NULL, something wrong occurs for the swap entry. But we should still continue to free the following swap entries in the array instead of skip them to avoid swap space leak. This is just problem in error path, where system may be in an inconsistent state, but it is still good to fix it. Link: http://lkml.kernel.org/r/20170421124739.24534-1-ying.huang@intel.com Signed-off-by: "Huang, Ying" Acked-by: Tim Chen Cc: Rik van Riel Cc: Hugh Dickins Cc: Shaohua Li Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 2 -- 1 file changed, 2 deletions(-) commit aa2369f11ff77317b9af388ae3527f1b85981e0d Author: Arnd Bergmann Date: Wed May 3 14:56:12 2017 -0700 mm/gup.c: fix access_ok() argument type MIPS just got changed to only accept a pointer argument for access_ok(), causing one warning in drivers/scsi/pmcraid.c. I tried changing x86 the same way and found the same warning in __get_user_pages_fast() and nowhere else in the kernel during randconfig testing: mm/gup.c: In function '__get_user_pages_fast': mm/gup.c:1578:6: error: passing argument 1 of '__chk_range_not_ok' makes pointer from integer without a cast [-Werror=int-conversion] It would probably be a good idea to enforce type-safety in general, so let's change this file to not cause a warning if we do that. I don't know why the warning did not appear on MIPS. Fixes: 2667f50e8b81 ("mm: introduce a general RCU get_user_pages_fast()") Link: http://lkml.kernel.org/r/20170421162659.3314521-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Cc: Alexander Viro Acked-by: Ingo Molnar Cc: Michal Hocko Cc: "Kirill A. Shutemov" Cc: Lorenzo Stoakes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34ccb69ea27ab25efc31a67c227ac85f93e0dc81 Author: Andrey Ryabinin Date: Wed May 3 14:56:09 2017 -0700 mm/truncate: avoid pointless cleancache_invalidate_inode() calls. cleancache_invalidate_inode() called truncate_inode_pages_range() and invalidate_inode_pages2_range() twice - on entry and on exit. It's stupid and waste of time. It's enough to call it once at exit. Link: http://lkml.kernel.org/r/20170424164135.22350-5-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Reviewed-by: Jan Kara Acked-by: Konrad Rzeszutek Wilk Cc: Alexander Viro Cc: Ross Zwisler Cc: Jens Axboe Cc: Johannes Weiner Cc: Alexey Kuznetsov Cc: Christoph Hellwig Cc: Nikolay Borisov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/truncate.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 32691f0fbe41a52eee811496205dc4828991b399 Author: Andrey Ryabinin Date: Wed May 3 14:56:06 2017 -0700 mm/truncate: bail out early from invalidate_inode_pages2_range() if mapping is empty If mapping is empty (both ->nrpages and ->nrexceptional is zero) we can avoid pointless lookups in empty radix tree and bail out immediately after cleancache invalidation. Link: http://lkml.kernel.org/r/20170424164135.22350-4-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Reviewed-by: Jan Kara Acked-by: Konrad Rzeszutek Wilk Cc: Alexander Viro Cc: Ross Zwisler Cc: Jens Axboe Cc: Johannes Weiner Cc: Alexey Kuznetsov Cc: Christoph Hellwig Cc: Nikolay Borisov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/truncate.c | 3 +++ 1 file changed, 3 insertions(+) commit a5f6a6a9c72eac38a7fadd1a038532bc8516337c Author: Andrey Ryabinin Date: Wed May 3 14:56:02 2017 -0700 fs/block_dev: always invalidate cleancache in invalidate_bdev() invalidate_bdev() calls cleancache_invalidate_inode() iff ->nrpages != 0 which doen't make any sense. Make sure that invalidate_bdev() always calls cleancache_invalidate_inode() regardless of mapping->nrpages value. Fixes: c515e1fd361c ("mm/fs: add hooks to support cleancache") Link: http://lkml.kernel.org/r/20170424164135.22350-3-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Reviewed-by: Jan Kara Acked-by: Konrad Rzeszutek Wilk Cc: Alexander Viro Cc: Ross Zwisler Cc: Jens Axboe Cc: Johannes Weiner Cc: Alexey Kuznetsov Cc: Christoph Hellwig Cc: Nikolay Borisov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/block_dev.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 55635ba76ef91f26b418702ace5e6287eb727f6a Author: Andrey Ryabinin Date: Wed May 3 14:55:59 2017 -0700 fs: fix data invalidation in the cleancache during direct IO Patch series "Properly invalidate data in the cleancache", v2. We've noticed that after direct IO write, buffered read sometimes gets stale data which is coming from the cleancache. The reason for this is that some direct write hooks call call invalidate_inode_pages2[_range]() conditionally iff mapping->nrpages is not zero, so we may not invalidate data in the cleancache. Another odd thing is that we check only for ->nrpages and don't check for ->nrexceptional, but invalidate_inode_pages2[_range] also invalidates exceptional entries as well. So we invalidate exceptional entries only if ->nrpages != 0? This doesn't feel right. - Patch 1 fixes direct IO writes by removing ->nrpages check. - Patch 2 fixes similar case in invalidate_bdev(). Note: I only fixed conditional cleancache_invalidate_inode() here. Do we also need to add ->nrexceptional check in into invalidate_bdev()? - Patches 3-4: some optimizations. This patch (of 4): Some direct IO write fs hooks call invalidate_inode_pages2[_range]() conditionally iff mapping->nrpages is not zero. This can't be right, because invalidate_inode_pages2[_range]() also invalidate data in the cleancache via cleancache_invalidate_inode() call. So if page cache is empty but there is some data in the cleancache, buffered read after direct IO write would get stale data from the cleancache. Also it doesn't feel right to check only for ->nrpages because invalidate_inode_pages2[_range] invalidates exceptional entries as well. Fix this by calling invalidate_inode_pages2[_range]() regardless of nrpages state. Note: nfs,cifs,9p doesn't need similar fix because the never call cleancache_get_page() (nor directly, nor via mpage_readpage[s]()), so they are not affected by this bug. Fixes: c515e1fd361c ("mm/fs: add hooks to support cleancache") Link: http://lkml.kernel.org/r/20170424164135.22350-2-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Reviewed-by: Jan Kara Acked-by: Konrad Rzeszutek Wilk Cc: Alexander Viro Cc: Ross Zwisler Cc: Jens Axboe Cc: Johannes Weiner Cc: Alexey Kuznetsov Cc: Christoph Hellwig Cc: Nikolay Borisov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/iomap.c | 18 ++++++++---------- mm/filemap.c | 26 +++++++++++--------------- 2 files changed, 19 insertions(+), 25 deletions(-) commit f0fe9984656604ea8effd5ff82709ff8ce1f954b Author: Sangwoo Park Date: Wed May 3 14:55:56 2017 -0700 zram: reduce load operation in page_same_filled In page_same_filled function, all elements in the page is compared with next index value. The current comparison routine compares the (i)th and (i+1)th values of the page. In this case, two load operaions occur for each comparison. But if we store first value of the page stores at 'val' variable and using it to compare with others, the load opearation is reduced. It reduce load operation per page by up to 64times. Link: http://lkml.kernel.org/r/1488428104-7257-1-git-send-email-sangwoo2.park@lge.com Signed-off-by: Sangwoo Park Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 302128dce142d780417aa548bfd7ef4dfb89fa80 Author: Minchan Kim Date: Wed May 3 14:55:53 2017 -0700 zram: use zram_free_page instead of open-coded The zram_free_page already handles NULL handle case and same page so use it to reduce error probability. (Acutaully, I made a mistake when I handled same page feature) Link: http://lkml.kernel.org/r/1492052365-16169-7-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit 643ae61d0f41c48aa7179921fe15ba4b4d8ddfec Author: Minchan Kim Date: Wed May 3 14:55:50 2017 -0700 zram: introduce zram data accessor With element, sometime I got confused handle and element access. It might be my bad but I think it's time to introduce accessor to prevent future idiot like me. This patch is just clean-up patch so it shouldn't change any behavior. Link: http://lkml.kernel.org/r/1492052365-16169-6-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit beb6602cf87abee547b2692031185111f625153a Author: Minchan Kim Date: Wed May 3 14:55:47 2017 -0700 zram: remove zram_meta structure It's redundant now. Instead, remove it and use zram structure directly. Link: http://lkml.kernel.org/r/1492052365-16169-5-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 189 +++++++++++++++++------------------------- drivers/block/zram/zram_drv.h | 6 +- 2 files changed, 78 insertions(+), 117 deletions(-) commit 86c49814d449ebc51c7d455ac8e3d17b9fa702eb Author: Minchan Kim Date: Wed May 3 14:55:44 2017 -0700 zram: use zram_slot_lock instead of raw bit_spin_lock op With this clean-up phase, I want to use zram's wrapper function to lock table access which is more consistent with other zram's functions. Link: http://lkml.kernel.org/r/1492052365-16169-4-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) commit 1f7319c7427503abe2d365683588827b80f5714e Author: Minchan Kim Date: Wed May 3 14:55:41 2017 -0700 zram: partial IO refactoring For architecture(PAGE_SIZE > 4K), zram have supported partial IO. However, the mixed code for handling normal/partial IO is too mess, error-prone to modify IO handler functions with upcoming feature so this patch aims for cleaning up zram's IO handling functions. Link: http://lkml.kernel.org/r/1492052365-16169-3-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 337 +++++++++++++++++++++++------------------- 1 file changed, 184 insertions(+), 153 deletions(-) commit e86942c7b6c1e1dd5e539f3bf3cfb63799163048 Author: Minchan Kim Date: Wed May 3 14:55:38 2017 -0700 zram: handle multiple pages attached bio's bvec Patch series "zram clean up", v2. This patchset aims to clean up zram . [1] clean up multiple pages's bvec handling. [2] clean up partial IO handling [3-6] clean up zram via using accessor and removing pointless structure. With [2-6] applied, we can get a few hundred bytes as well as huge readibility enhance. x86: 708 byte save add/remove: 1/1 grow/shrink: 0/11 up/down: 478/-1186 (-708) function old new delta zram_special_page_read - 478 +478 zram_reset_device 317 314 -3 mem_used_max_store 131 128 -3 compact_store 96 93 -3 mm_stat_show 203 197 -6 zram_add 719 712 -7 zram_slot_free_notify 229 214 -15 zram_make_request 819 803 -16 zram_meta_free 128 111 -17 zram_free_page 180 151 -29 disksize_store 432 361 -71 zram_decompress_page.isra 504 - -504 zram_bvec_rw 2592 2080 -512 Total: Before=25350773, After=25350065, chg -0.00% ppc64: 231 byte save add/remove: 2/0 grow/shrink: 1/9 up/down: 681/-912 (-231) function old new delta zram_special_page_read - 480 +480 zram_slot_lock - 200 +200 vermagic 39 40 +1 mm_stat_show 256 248 -8 zram_meta_free 200 184 -16 zram_add 944 912 -32 zram_free_page 348 308 -40 disksize_store 572 492 -80 zram_decompress_page 664 564 -100 zram_slot_free_notify 292 160 -132 zram_make_request 1132 1000 -132 zram_bvec_rw 2768 2396 -372 Total: Before=17565825, After=17565594, chg -0.00% This patch (of 6): Johannes Thumshirn reported system goes the panic when using NVMe over Fabrics loopback target with zram. The reason is zram expects each bvec in bio contains a single page but nvme can attach a huge bulk of pages attached to the bio's bvec so that zram's index arithmetic could be wrong so that out-of-bound access makes system panic. [1] in mainline solved solved the problem by limiting max_sectors with SECTORS_PER_PAGE but it makes zram slow because bio should split with each pages so this patch makes zram aware of multiple pages in a bvec so it could solve without any regression(ie, bio split). [1] 0bc315381fe9, zram: set physical queue limits to avoid array out of bounds accesses Link: http://lkml.kernel.org/r/20170413134057.GA27499@bbox Signed-off-by: Minchan Kim Reported-by: Johannes Thumshirn Tested-by: Johannes Thumshirn Reviewed-by: Johannes Thumshirn Reviewed-by: Sergey Senozhatsky Cc: Hannes Reinecke Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 40 +++++++++++----------------------------- 1 file changed, 11 insertions(+), 29 deletions(-) commit 0f7896f12b6a3dae3ffccbebe8c954d954350f3d Author: Tetsuo Handa Date: Wed May 3 14:55:34 2017 -0700 mm, page_alloc: remove debug_guardpage_minorder() test in warn_alloc() Commit c0a32fc5a2e4 ("mm: more intensive memory corruption debugging") changed to check debug_guardpage_minorder() > 0 when reporting allocation failures. The reasoning was When we use guard page to debug memory corruption, it shrinks available pages to 1/2, 1/4, 1/8 and so on, depending on parameter value. In such case memory allocation failures can be common and printing errors can flood dmesg. If somebody debug corruption, allocation failures are not the things he/she is interested about. but this is misguided. Allocation requests with __GFP_NOWARN flag by definition do not cause flooding of allocation failure messages. Allocation requests with __GFP_NORETRY flag likely also have __GFP_NOWARN flag. Costly allocation requests likely also have __GFP_NOWARN flag. Allocation requests without __GFP_DIRECT_RECLAIM flag likely also have __GFP_NOWARN flag or __GFP_HIGH flag. Non-costly allocation requests with __GFP_DIRECT_RECLAIM flag basically retry forever due to the "too small to fail" memory-allocation rule. Therefore, as a whole, shrinking available pages by debug_guardpage_minorder= kernel boot parameter might cause flooding of OOM killer messages but unlikely causes flooding of allocation failure messages. Let's remove debug_guardpage_minorder() > 0 check which would likely be pointless. Link: http://lkml.kernel.org/r/1491910035-4231-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Acked-by: Michal Hocko Cc: Stanislaw Gruszka Cc: Mel Gorman Cc: Andrea Arcangeli Cc: "Rafael J . Wysocki" Cc: Christoph Lameter Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 82a2481e8e2832a19869a7e826e2e7b44420493e Author: Anshuman Khandual Date: Wed May 3 14:55:31 2017 -0700 mm/memory-failure.c: add page flag description in error paths It helps to provide page flag description along with the raw value in error paths during soft offline process. From sample experiments Before the patch: soft offline: 0x6100: migration failed 1, type 3ffff800008018 soft offline: 0x7400: migration failed 1, type 3ffff800008018 After the patch: soft offline: 0x5900: migration failed 1, type 3ffff800008018 (uptodate|dirty|head) soft offline: 0x6c00: migration failed 1, type 3ffff800008018 (uptodate|dirty|head) Link: http://lkml.kernel.org/r/20170409023829.10788-1-khandual@linux.vnet.ibm.com Signed-off-by: Anshuman Khandual Acked-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory-failure.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 5e451be75ca51dd45a77a6409a30a0de39dc15c8 Author: Anshuman Khandual Date: Wed May 3 14:55:28 2017 -0700 mm/madvise: move up the behavior parameter validation madvise_behavior_valid() should be called before acting upon the behavior parameter. Hence move up the function. This also includes MADV_SOFT_OFFLINE and MADV_HWPOISON options as valid behavior parameter for the system call madvise(). Link: http://lkml.kernel.org/r/20170418052844.24891-1-khandual@linux.vnet.ibm.com Signed-off-by: Anshuman Khandual Acked-by: David Rientjes Acked-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/madvise.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 97167a7681e9a587ee75955bcbbf27e90f0883b9 Author: Anshuman Khandual Date: Wed May 3 14:55:25 2017 -0700 mm/madvise.c: clean up MADV_SOFT_OFFLINE and MADV_HWPOISON This cleans up handling MADV_SOFT_OFFLINE and MADV_HWPOISON called through madvise() system call. * madvise_memory_failure() was misleading to accommodate handling of both memory_failure() as well as soft_offline_page() functions. Basically it handles memory error injection from user space which can go either way as memory failure or soft offline. Renamed as madvise_inject_error() instead. * Renamed struct page pointer 'p' to 'page'. * pr_info() was essentially printing PFN value but it said 'page' which was misleading. Made the process virtual address explicit. Before the patch: Soft offlining page 0x15e3e at 0x3fff8c230000 Soft offlining page 0x1f3 at 0x3fffa0da0000 Soft offlining page 0x744 at 0x3fff7d200000 Soft offlining page 0x1634d at 0x3fff95e20000 Soft offlining page 0x16349 at 0x3fff95e30000 Soft offlining page 0x1d6 at 0x3fff9e8b0000 Soft offlining page 0x5f3 at 0x3fff91bd0000 Injecting memory failure for page 0x15c8b at 0x3fff83280000 Injecting memory failure for page 0x16190 at 0x3fff83290000 Injecting memory failure for page 0x740 at 0x3fff9a2e0000 Injecting memory failure for page 0x741 at 0x3fff9a2f0000 After the patch: Soft offlining pfn 0x1484e at process virtual address 0x3fff883c0000 Soft offlining pfn 0x1484f at process virtual address 0x3fff883d0000 Soft offlining pfn 0x14850 at process virtual address 0x3fff883e0000 Soft offlining pfn 0x14851 at process virtual address 0x3fff883f0000 Soft offlining pfn 0x14852 at process virtual address 0x3fff88400000 Soft offlining pfn 0x14853 at process virtual address 0x3fff88410000 Soft offlining pfn 0x14854 at process virtual address 0x3fff88420000 Soft offlining pfn 0x1521c at process virtual address 0x3fff6bc70000 Injecting memory failure for pfn 0x10fcf at process virtual address 0x3fff86310000 Injecting memory failure for pfn 0x10fd0 at process virtual address 0x3fff86320000 Injecting memory failure for pfn 0x10fd1 at process virtual address 0x3fff86330000 Injecting memory failure for pfn 0x10fd2 at process virtual address 0x3fff86340000 Injecting memory failure for pfn 0x10fd3 at process virtual address 0x3fff86350000 Injecting memory failure for pfn 0x10fd4 at process virtual address 0x3fff86360000 Injecting memory failure for pfn 0x10fd5 at process virtual address 0x3fff86370000 Link: http://lkml.kernel.org/r/20170410084701.11248-1-khandual@linux.vnet.ibm.com Signed-off-by: Anshuman Khandual Reviewed-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/madvise.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) commit 70bc0dc578b3f3aafefc4f5e874bdd378680acca Author: Mike Kravetz Date: Wed May 3 14:55:22 2017 -0700 Documentation: vm, add hugetlbfs reservation overview Adding a brief overview of hugetlbfs reservation design and implementation as an aid to those making code modifications in this area. Link: http://lkml.kernel.org/r/1491586995-13085-1-git-send-email-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Acked-by: Hillf Danton Cc: Jonathan Corbet Cc: Michal Hocko Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/00-INDEX | 2 + Documentation/vm/hugetlbfs_reserv.txt | 529 ++++++++++++++++++++++++++++++++++ 2 files changed, 531 insertions(+) commit df6b7499806bffd233e6dd0465901827b0b385b8 Author: Huang Ying Date: Wed May 3 14:55:19 2017 -0700 mm, swap: remove unused function prototype This is a code cleanup patch, no functionality changes. There are 2 unused function prototype in swap.h, they are removed. Link: http://lkml.kernel.org/r/20170405071017.23677-1-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Tim Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 3 --- 1 file changed, 3 deletions(-) commit ccda7f4360be86b87497c50d1f58aab3fd85a9a5 Author: Johannes Weiner Date: Wed May 3 14:55:16 2017 -0700 mm: memcontrol: use node page state naming scheme for memcg The memory controllers stat function names are awkwardly long and arbitrarily different from the zone and node stat functions. The current interface is named: mem_cgroup_read_stat() mem_cgroup_update_stat() mem_cgroup_inc_stat() mem_cgroup_dec_stat() mem_cgroup_update_page_stat() mem_cgroup_inc_page_stat() mem_cgroup_dec_page_stat() This patch renames it to match the corresponding node stat functions: memcg_page_state() [node_page_state()] mod_memcg_state() [mod_node_state()] inc_memcg_state() [inc_node_state()] dec_memcg_state() [dec_node_state()] mod_memcg_page_state() [mod_node_page_state()] inc_memcg_page_state() [inc_node_page_state()] dec_memcg_page_state() [dec_node_page_state()] Link: http://lkml.kernel.org/r/20170404220148.28338-4-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Vladimir Davydov Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 73 +++++++++++++++++++++++----------------------- mm/memcontrol.c | 38 ++++++++++++------------ mm/page-writeback.c | 10 +++---- mm/rmap.c | 4 +-- mm/vmscan.c | 5 ++-- mm/workingset.c | 6 ++-- 6 files changed, 68 insertions(+), 68 deletions(-) commit 71cd31135d4cf030a057ed7079a75a40c0a4a796 Author: Johannes Weiner Date: Wed May 3 14:55:13 2017 -0700 mm: memcontrol: re-use node VM page state enum The current duplication is a high-maintenance mess, and it's painful to add new items or query memcg state from the rest of the VM. This increases the size of the stat array marginally, but we should aim to track all these stats on a per-cgroup level anyway. Link: http://lkml.kernel.org/r/20170404220148.28338-3-hannes@cmpxchg.org 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 | 100 +++++++++++++++------------------ mm/memcontrol.c | 135 +++++++++++++++++++++++---------------------- mm/page-writeback.c | 10 ++-- mm/rmap.c | 4 +- mm/vmscan.c | 5 +- mm/workingset.c | 7 +-- 6 files changed, 123 insertions(+), 138 deletions(-) commit df0e53d0619e83b465e363c088bf4eeb2848273b Author: Johannes Weiner Date: Wed May 3 14:55:10 2017 -0700 mm: memcontrol: re-use global VM event enum The current duplication is a high-maintenance mess, and it's painful to add new items. This increases the size of the event array, but we'll eventually want most of the VM events tracked on a per-cgroup basis anyway. Link: http://lkml.kernel.org/r/20170404220148.28338-2-hannes@cmpxchg.org 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 | 45 ++++++++++++--------------------------- mm/memcontrol.c | 53 ++++++++++++++++++++++++---------------------- 2 files changed, 42 insertions(+), 56 deletions(-) commit 31176c781508e4e35b1cc4ae2f0a5abd1f4ea689 Author: Johannes Weiner Date: Wed May 3 14:55:07 2017 -0700 mm: memcontrol: clean up memory.events counting function We only ever count single events, drop the @nr parameter. Rename the function accordingly. Remove low-information kerneldoc. Link: http://lkml.kernel.org/r/20170404220148.28338-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Vladimir Davydov Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 18 +++++------------- mm/memcontrol.c | 8 ++++---- mm/vmscan.c | 2 +- 3 files changed, 10 insertions(+), 18 deletions(-) commit 2a2e48854d704214dac7546e87ae0e4daa0e61a0 Author: Johannes Weiner Date: Wed May 3 14:55:03 2017 -0700 mm: vmscan: fix IO/refault regression in cache workingset transition Since commit 59dc76b0d4df ("mm: vmscan: reduce size of inactive file list") we noticed bigger IO spikes during changes in cache access patterns. The patch in question shrunk the inactive list size to leave more room for the current workingset in the presence of streaming IO. However, workingset transitions that previously happened on the inactive list are now pushed out of memory and incur more refaults to complete. This patch disables active list protection when refaults are being observed. This accelerates workingset transitions, and allows more of the new set to establish itself from memory, without eating into the ability to protect the established workingset during stable periods. The workloads that were measurably affected for us were hit pretty bad by it, with refault/majfault rates doubling and tripling during cache transitions, and the machines sustaining half-hour periods of 100% IO utilization, where they'd previously have sub-minute peaks at 60-90%. Stateful services that handle user data tend to be more conservative with kernel upgrades. As a result we hit most page cache issues with some delay, as was the case here. The severity seemed to warrant a stable tag. Fixes: 59dc76b0d4df ("mm: vmscan: reduce size of inactive file list") Link: http://lkml.kernel.org/r/20170404220052.27593-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Cc: Rik van Riel Cc: Mel Gorman Cc: Michal Hocko Cc: Vladimir Davydov Cc: [4.7+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 64 +++++++++++++++++++++++++++++-- include/linux/mmzone.h | 2 + mm/memcontrol.c | 24 ++++-------- mm/vmscan.c | 94 ++++++++++++++++++++++++++++++++++++---------- mm/workingset.c | 7 +++- 5 files changed, 150 insertions(+), 41 deletions(-) commit 20ac28933c49433e0f064314de3618129b54a22e Author: Anshuman Khandual Date: Wed May 3 14:55:00 2017 -0700 mm/mmap: replace SHM_HUGE_MASK with MAP_HUGE_MASK inside mmap_pgoff Commit 091d0d55b286 ("shm: fix null pointer deref when userspace specifies invalid hugepage size") had replaced MAP_HUGE_MASK with SHM_HUGE_MASK. Though both of them contain the same numeric value of 0x3f, MAP_HUGE_MASK flag sounds more appropriate than the other one in the context. Hence change it back. Link: http://lkml.kernel.org/r/20170404045635.616-1-khandual@linux.vnet.ibm.com Signed-off-by: Anshuman Khandual Reviewed-by: Matthew Wilcox Acked-by: Balbir Singh Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d75da004c708c9fca7b53f7da293a295522414d9 Author: Michal Hocko Date: Wed May 3 14:54:57 2017 -0700 oom: improve oom disable handling Tetsuo has reported that sysrq triggered OOM killer will print a misleading information when no tasks are selected: sysrq: SysRq : Manual OOM execution Out of memory: Kill process 4468 ((agetty)) score 0 or sacrifice child Killed process 4468 ((agetty)) total-vm:43704kB, anon-rss:1760kB, file-rss:0kB, shmem-rss:0kB sysrq: SysRq : Manual OOM execution Out of memory: Kill process 4469 (systemd-cgroups) score 0 or sacrifice child Killed process 4469 (systemd-cgroups) total-vm:10704kB, anon-rss:120kB, file-rss:0kB, shmem-rss:0kB sysrq: SysRq : Manual OOM execution sysrq: OOM request ignored because killer is disabled sysrq: SysRq : Manual OOM execution sysrq: OOM request ignored because killer is disabled sysrq: SysRq : Manual OOM execution sysrq: OOM request ignored because killer is disabled The real reason is that there are no eligible tasks for the OOM killer to select but since commit 7c5f64f84483 ("mm: oom: deduplicate victim selection code for memcg and global oom") the semantic of out_of_memory has changed without updating moom_callback. This patch updates moom_callback to tell that no task was eligible which is the case for both oom killer disabled and no eligible tasks. In order to help distinguish first case from the second add printk to both oom_killer_{enable,disable}. This information is useful on its own because it might help debugging potential memory allocation failures. Fixes: 7c5f64f84483 ("mm: oom: deduplicate victim selection code for memcg and global oom") Link: http://lkml.kernel.org/r/20170404134705.6361-1-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/tty/sysrq.c | 2 +- mm/oom_kill.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit b6ad19763dce4a08bdcd5140a97aa1f94aed3671 Author: Mike Rapoport Date: Wed May 3 14:54:54 2017 -0700 userfaultfd: selftest: combine all cases into a single executable Currently, selftest for userfaultfd is compiled three times: for anonymous, shared and hugetlb memory. Let's combine all the cases into a single executable which will have a command line option for selection of the test type. Link: http://lkml.kernel.org/r/1490869741-5913-1-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Reviewed-by: Mike Kravetz Cc: Andrea Arcangeli Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/Makefile | 11 +- tools/testing/selftests/vm/run_vmtests | 6 +- tools/testing/selftests/vm/userfaultfd.c | 207 +++++++++++++++++-------------- 3 files changed, 116 insertions(+), 108 deletions(-) commit ac2e8e40acf4c73e0ad1addca34b186d855565d7 Author: Hao Lee Date: Wed May 3 14:54:51 2017 -0700 mm: fix spelling error Fix variable name error in comments. No code changes. Link: http://lkml.kernel.org/r/20170403161655.5081-1-haolee.swjtu@gmail.com Signed-off-by: Hao Lee Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/gfp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b7a814327a314c56c0e68654c76d99bd2938084 Author: Tim Chen Date: Wed May 3 14:54:48 2017 -0700 mm/swap_slots.c: add warning if swap slots cache failed to initialize Add a warning diagnostics to user if we failed to allocate swap slots cache and use it. [akpm@linux-foundation.org: use WARN_ONCE return value, fix grammar in message] Link: http://lkml.kernel.org/r/20170328234827.GA10107@linux.intel.com Signed-off-by: Tim Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap_slots.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9927e3887642b976d9b391cd77d71388aa521e54 Author: Pushkar Jambhlekar Date: Wed May 3 14:54:45 2017 -0700 include/linux/migrate.h: add arg names to prototype It is preferred, and the rest of migrate.h gets it right. Link: http://lkml.kernel.org/r/1490336009-8024-1-git-send-email-pushkar.iit@gmail.com Signed-off-by: Pushkar Jambhlekar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/migrate.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bd33ef3681359343863f2290aded182b0441edee Author: Vinayak Menon Date: Wed May 3 14:54:42 2017 -0700 mm: enable page poisoning early at boot On SPARSEMEM systems page poisoning is enabled after buddy is up, because of the dependency on page extension init. This causes the pages released by free_all_bootmem not to be poisoned. This either delays or misses the identification of some issues because the pages have to undergo another cycle of alloc-free-alloc for any corruption to be detected. Enable page poisoning early by getting rid of the PAGE_EXT_DEBUG_POISON flag. Since all the free pages will now be poisoned, the flag need not be verified before checking the poison during an alloc. [vinmenon@codeaurora.org: fix Kconfig] Link: http://lkml.kernel.org/r/1490878002-14423-1-git-send-email-vinmenon@codeaurora.org Link: http://lkml.kernel.org/r/1490358246-11001-1-git-send-email-vinmenon@codeaurora.org Signed-off-by: Vinayak Menon Acked-by: Laura Abbott Tested-by: Laura Abbott Cc: Joonsoo Kim Cc: Michal Hocko Cc: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 1 - mm/Kconfig.debug | 1 - mm/page_alloc.c | 13 +++------ mm/page_ext.c | 13 ++------- mm/page_poison.c | 77 +++++++++--------------------------------------------- 5 files changed, 17 insertions(+), 88 deletions(-) commit 2872bb2d0a4952ffb721e703555cb73d40b2c2f0 Author: Huang Ying Date: Wed May 3 14:54:39 2017 -0700 mm, swap: avoid lock swap_avail_lock when held cluster lock Cluster lock is used to protect the swap_cluster_info and corresponding elements in swap_info_struct->swap_map[]. But it is found that now in scan_swap_map_slots(), swap_avail_lock may be acquired when cluster lock is held. This does no good except making the locking more complex and improving the potential locking contention, because the swap_info_struct->lock is used to protect the data structure operated in the code already. Fix this via moving the corresponding operations in scan_swap_map_slots() out of cluster lock. Link: http://lkml.kernel.org/r/20170317064635.12792-3-ying.huang@intel.com Signed-off-by: "Huang, Ying" Acked-by: Tim Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0ef017d117d79eb765cb490a8d7e323752a13f4a Author: Huang Ying Date: Wed May 3 14:54:36 2017 -0700 mm, swap: improve readability via make spin_lock/unlock balanced This is just a cleanup patch, no functionality change. In cluster_list_add_tail(), spin_lock_nested() is used to lock the cluster, while unlock_cluster() is used to unlock the cluster. To improve the code readability, use spin_unlock() directly to unlock the cluster. Link: http://lkml.kernel.org/r/20170317064635.12792-2-ying.huang@intel.com Signed-off-by: "Huang, Ying" Acked-by: Tim Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c1cc2e4f25c14dc1a2d98e98808aefef24abaf4 Author: Huang Ying Date: Wed May 3 14:54:33 2017 -0700 mm, swap: fix comment in __read_swap_cache_async Commit cbab0e4eec29 ("swap: avoid read_swap_cache_async() race to deadlock while waiting on discard I/O completion") fixed a deadlock in read_swap_cache_async(). Because at that time, in swap allocation path, a swap entry may be set as SWAP_HAS_CACHE, then wait for discarding to complete before the page for the swap entry is added to the swap cache. But in commit 815c2c543d3a ("swap: make swap discard async"), the discarding for swap become asynchronous, waiting for discarding to complete will be done before the swap entry is set as SWAP_HAS_CACHE. So the comments in code is incorrect now. This patch fixes the comments. The cond_resched() added in the commit cbab0e4eec29 is not necessary now too. But if we added some sleep in swap allocation path in the future, there may be some hard to debug/reproduce deadlock bug. So it is kept. Link: http://lkml.kernel.org/r/20170317064635.12792-1-ying.huang@intel.com Signed-off-by: "Huang, Ying" Acked-by: Rafael Aquini Cc: Shaohua Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap_state.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 83612a948d3bd2e71b110d7e8735661621bd23d9 Author: Minchan Kim Date: Wed May 3 14:54:30 2017 -0700 mm: remove SWAP_[SUCCESS|AGAIN|FAIL] There is no user for it. Remove it. [minchan@kernel.org: use false instead of SWAP_FAIL] Link: http://lkml.kernel.org/r/20170316053313.GA19241@bbox Link: http://lkml.kernel.org/r/1489555493-14659-11-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Anshuman Khandual Cc: Hillf Danton Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Vlastimil Babka Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 7 ------- mm/rmap.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) commit e4b82222712ed15813d35204c91429883d27d1d9 Author: Minchan Kim Date: Wed May 3 14:54:27 2017 -0700 mm: make rmap_one boolean function rmap_one's return value controls whether rmap_work should contine to scan other ptes or not so it's target for changing to boolean. Return true if the scan should be continued. Otherwise, return false to stop the scanning. This patch makes rmap_one's return value to boolean. Link: http://lkml.kernel.org/r/1489555493-14659-10-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Anshuman Khandual Cc: Hillf Danton Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 6 +++++- mm/ksm.c | 2 +- mm/migrate.c | 4 ++-- mm/page_idle.c | 4 ++-- mm/rmap.c | 30 +++++++++++++++--------------- 5 files changed, 25 insertions(+), 21 deletions(-) commit 1df631ae19819cff343d316eda42eca32d3de7fc Author: Minchan Kim Date: Wed May 3 14:54:23 2017 -0700 mm: make rmap_walk() return void There is no user of the return value from rmap_walk() and friends so this patch makes them void-returning functions. Link: http://lkml.kernel.org/r/1489555493-14659-9-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Anshuman Khandual Cc: Hillf Danton Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/ksm.h | 5 ++--- include/linux/rmap.h | 4 ++-- mm/ksm.c | 16 ++++++---------- mm/rmap.c | 32 +++++++++++++------------------- 4 files changed, 23 insertions(+), 34 deletions(-) commit 666e5a406c3ed562e7b3ceff8b631b6067bdaead Author: Minchan Kim Date: Wed May 3 14:54:20 2017 -0700 mm: make ttu's return boolean try_to_unmap() returns SWAP_SUCCESS or SWAP_FAIL so it's suitable for boolean return. This patch changes it. Link: http://lkml.kernel.org/r/1489555493-14659-8-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Naoya Horiguchi Cc: Anshuman Khandual Cc: Hillf Danton Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 4 ++-- mm/huge_memory.c | 6 +++--- mm/memory-failure.c | 26 ++++++++++++-------------- mm/rmap.c | 8 +++----- mm/vmscan.c | 7 +------ 5 files changed, 21 insertions(+), 30 deletions(-) commit 33fc80e2574737e6e21eecc4c1d7942370a2c752 Author: Minchan Kim Date: Wed May 3 14:54:17 2017 -0700 mm: remove SWAP_AGAIN in ttu In 2002, [1] introduced SWAP_AGAIN. At that time, try_to_unmap_one used spin_trylock(&mm->page_table_lock) so it's really easy to contend and fail to hold a lock so SWAP_AGAIN to keep LRU status makes sense. However, now we changed it to mutex-based lock and be able to block without skip pte so there is few of small window to return SWAP_AGAIN so remove SWAP_AGAIN and just return SWAP_FAIL. [1] c48c43e, minimal rmap Link: http://lkml.kernel.org/r/1489555493-14659-7-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Anshuman Khandual Cc: Hillf Danton Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/rmap.c | 11 +++-------- mm/vmscan.c | 2 -- 2 files changed, 3 insertions(+), 10 deletions(-) commit ad6b67041a45497261617d7a28b15159b202cb5a Author: Minchan Kim Date: Wed May 3 14:54:13 2017 -0700 mm: remove SWAP_MLOCK in ttu ttu doesn't need to return SWAP_MLOCK. Instead, just return SWAP_FAIL because it means the page is not-swappable so it should move to another LRU list(active or unevictable). putback friends will move it to right list depending on the page's LRU flag. Link: http://lkml.kernel.org/r/1489555493-14659-6-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Anshuman Khandual Cc: Hillf Danton Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 1 - mm/rmap.c | 3 +-- mm/vmscan.c | 20 +++++++------------- 3 files changed, 8 insertions(+), 16 deletions(-) commit 192d7232569ab61ded40c8be691b12832bc6bcd1 Author: Minchan Kim Date: Wed May 3 14:54:10 2017 -0700 mm: make try_to_munlock() return void try_to_munlock returns SWAP_MLOCK if the one of VMAs mapped the page has VM_LOCKED flag. In that time, VM set PG_mlocked to the page if the page is not pte-mapped THP which cannot be mlocked, either. With that, __munlock_isolated_page can use PageMlocked to check whether try_to_munlock is successful or not without relying on try_to_munlock's retval. It helps to make try_to_unmap/try_to_unmap_one simple with upcoming patches. [minchan@kernel.org: remove PG_Mlocked VM_BUG_ON check] Link: http://lkml.kernel.org/r/20170411025615.GA6545@bbox Link: http://lkml.kernel.org/r/1489555493-14659-5-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Acked-by: Kirill A. Shutemov Acked-by: Vlastimil Babka Cc: Anshuman Khandual Cc: Hillf Danton Cc: Johannes Weiner Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Sasha Levin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 2 +- mm/mlock.c | 6 ++---- mm/rmap.c | 16 ++++------------ 3 files changed, 7 insertions(+), 17 deletions(-) commit 22ffb33f4620b502799877d4186502bfe20621ea Author: Minchan Kim Date: Wed May 3 14:54:07 2017 -0700 mm: remove SWAP_MLOCK check for SWAP_SUCCESS in ttu If the page is mapped and rescue in try_to_unmap_one, the page_mapcount() of a page cannot be zero, so the page_mapcount check in try_to_unmap is enough to return SWAP_SUCCESS. IOW, SWAP_MLOCK check is redundant so remove it. Link: http://lkml.kernel.org/r/1489555493-14659-4-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Anshuman Khandual Cc: Hillf Danton Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/rmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18863d3a3f593f47b075b9f53ebf9228dc76cf72 Author: Minchan Kim Date: Wed May 3 14:54:04 2017 -0700 mm: remove SWAP_DIRTY in ttu If we found lazyfree page is dirty, try_to_unmap_one can just SetPageSwapBakced in there like PG_mlocked page and just return with SWAP_FAIL which is very natural because the page is not swappable right now so that vmscan can activate it. There is no point to introduce new return value SWAP_DIRTY in try_to_unmap at the moment. Link: http://lkml.kernel.org/r/1489555493-14659-3-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Acked-by: Hillf Danton Acked-by: Kirill A. Shutemov Cc: Anshuman Khandual Cc: Johannes Weiner Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 1 - mm/rmap.c | 4 ++-- mm/vmscan.c | 3 --- 3 files changed, 2 insertions(+), 6 deletions(-) commit c24f386c60b2269d532a23e70939ed8ce55d7005 Author: Minchan Kim Date: Wed May 3 14:54:00 2017 -0700 mm: remove unncessary ret in page_referenced Nobody uses ret variable. Remove it. Link: http://lkml.kernel.org/r/1489555493-14659-2-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Acked-by: Hillf Danton Acked-by: Kirill A. Shutemov Cc: Johannes Weiner Cc: Michal Hocko Cc: Kirill A. Shutemov Cc: Anshuman Khandual Cc: Vlastimil Babka Cc: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/rmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d6622f6365dbf31e9534a440daecdb9b04804aa4 Author: Yisheng Xie Date: Wed May 3 14:53:57 2017 -0700 mm/vmscan: more restrictive condition for retry in do_try_to_free_pages By reviewing code, I find that when enter do_try_to_free_pages, the may_thrash is always clear, and it will retry shrink zones to tap cgroup's reserves memory by setting may_thrash when the former shrink_zones reclaim nothing. However, when memcg is disabled or on legacy hierarchy, or there do not have any memcg protected by low limit, it should not do this useless retry at all, for we do not have any cgroup's reserves memory to tap, and we have already done hard work but made no progress, which as Michal pointed out in former version, we are trying hard to control the retry logical of page alloctor, and the current additional round of reclaim is just lame. Therefore, to avoid this unneeded retrying and make code more readable, we remove the may_thrash field in scan_control, instead, introduce memcg_low_reclaim and memcg_low_skipped, and only retry when memcg_low_skipped, by setting memcg_low_reclaim. [xieyisheng1@huawei.com: remove may_thrash field, introduce mem_cgroup_reclaim] Link: http://lkml.kernel.org/r/1490191893-5923-1-git-send-email-ysxie@foxmail.com Link: http://lkml.kernel.org/r/1490191893-5923-1-git-send-email-ysxie@foxmail.com Signed-off-by: Yisheng Xie Acked-by: Michal Hocko Suggested-by: Johannes Weiner Suggested-by: Michal Hocko Suggested-by: Shakeel Butt Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Mel Gorman Cc: Vlastimil Babka Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 1ef36db2a96f23ac0a278d498072ef7193c8b8f2 Author: Yisheng Xie Date: Wed May 3 14:53:54 2017 -0700 mm/compaction: ignore block suitable after check large free page By reviewing code, I find that if the migrate target is a large free page and we ignore suitable, it may splite large target free page into smaller block which is not good for defrag. So move the ignore block suitable after check large free page. As Vlastimil pointed out in RFC version that this patch is just based on logical analyses which might be better for future-proofing the function and it is most likely won't have any visible effect right now, for direct compaction shouldn't have to be called if there's a >=pageblock_order page already available. Link: http://lkml.kernel.org/r/1489490743-5364-1-git-send-email-xieyisheng1@huawei.com Signed-off-by: Yisheng Xie Cc: Vlastimil Babka Cc: Michal Hocko Cc: Mel Gorman Cc: Joonsoo Kim Cc: David Rientjes Cc: Minchan Kim Cc: Hanjun Guo Cc: Xishi Qiu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 60a7a88dbb9fc9adcca78a10a3ecf36966b5a45c Author: Wei Yang Date: Wed May 3 14:53:51 2017 -0700 mm/sparse: refine usemap_size() a little The current implementation calculates usemap_size in two steps: * calculate number of bytes to cover these bits * calculate number of "unsigned long" to cover these bytes It would be more clear by: * calculate number of "unsigned long" to cover these bits * multiple it with sizeof(unsigned long) This patch refine usemap_size() a little to make it more easy to understand. Link: http://lkml.kernel.org/r/20170310043713.96871-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/sparse.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 822519634142cb66614514ac8ee9221868f764bb Author: Johannes Weiner Date: Wed May 3 14:53:48 2017 -0700 mm: page_alloc: __GFP_NOWARN shouldn't suppress stall warnings __GFP_NOWARN, which is usually added to avoid warnings from callsites that expect to fail and have fallbacks, currently also suppresses allocation stall warnings. These trigger when an allocation is stuck inside the allocator for 10 seconds or longer. But there is no class of allocations that can get legitimately stuck in the allocator for this long. This always indicates a problem. Always emit stall warnings. Restrict __GFP_NOWARN to alloc failures. Link: http://lkml.kernel.org/r/20170125181150.GA16398@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Minchan Kim Cc: Michal Hocko Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e716f2eb24defb33b82be763a3ed9a618a210cee Author: Mel Gorman Date: Wed May 3 14:53:45 2017 -0700 mm, vmscan: prevent kswapd sleeping prematurely due to mismatched classzone_idx kswapd is woken to reclaim a node based on a failed allocation request from any eligible zone. Once reclaiming in balance_pgdat(), it will continue reclaiming until there is an eligible zone available for the zone it was woken for. kswapd tracks what zone it was recently woken for in pgdat->kswapd_classzone_idx. If it has not been woken recently, this zone will be 0. However, the decision on whether to sleep is made on kswapd_classzone_idx which is 0 without a recent wakeup request and that classzone does not account for lowmem reserves. This allows kswapd to sleep when a low small zone such as ZONE_DMA is balanced for a GFP_DMA request even if a stream of allocations cannot use that zone. While kswapd may be woken again shortly in the near future there are two consequences -- the pgdat bits that control congestion are cleared prematurely and direct reclaim is more likely as kswapd slept prematurely. This patch flips kswapd_classzone_idx to default to MAX_NR_ZONES (an invalid index) when there has been no recent wakeups. If there are no wakeups, it'll decide whether to sleep based on the highest possible zone available (MAX_NR_ZONES - 1). It then becomes critical that the "pgdat balanced" decisions during reclaim and when deciding to sleep are the same. If there is a mismatch, kswapd can stay awake continually trying to balance tiny zones. simoop was used to evaluate it again. Two of the preparation patches regressed the workload so they are included as the second set of results. Otherwise this patch looks artifically excellent 4.11.0-rc1 4.11.0-rc1 4.11.0-rc1 vanilla clear-v2 keepawake-v2 Amean p50-Read 21670074.18 ( 0.00%) 19786774.76 ( 8.69%) 22668332.52 ( -4.61%) Amean p95-Read 25456267.64 ( 0.00%) 24101956.27 ( 5.32%) 26738688.00 ( -5.04%) Amean p99-Read 29369064.73 ( 0.00%) 27691872.71 ( 5.71%) 30991404.52 ( -5.52%) Amean p50-Write 1390.30 ( 0.00%) 1011.91 ( 27.22%) 924.91 ( 33.47%) Amean p95-Write 412901.57 ( 0.00%) 34874.98 ( 91.55%) 1362.62 ( 99.67%) Amean p99-Write 6668722.09 ( 0.00%) 575449.60 ( 91.37%) 16854.04 ( 99.75%) Amean p50-Allocation 78714.31 ( 0.00%) 84246.26 ( -7.03%) 74729.74 ( 5.06%) Amean p95-Allocation 175533.51 ( 0.00%) 400058.43 (-127.91%) 101609.74 ( 42.11%) Amean p99-Allocation 247003.02 ( 0.00%) 10905600.00 (-4315.17%) 125765.57 ( 49.08%) With this patch on top, write and allocation latencies are massively improved. The read latencies are slightly impaired but it's worth noting that this is mostly due to the IO scheduler and not directly related to reclaim. The vmstats are a bit of a mix but the relevant ones are as follows; 4.10.0-rc7 4.10.0-rc7 4.10.0-rc7 mmots-20170209 clear-v1r25keepawake-v1r25 Swap Ins 0 0 0 Swap Outs 0 608 0 Direct pages scanned 6910672 3132699 6357298 Kswapd pages scanned 57036946 82488665 56986286 Kswapd pages reclaimed 55993488 63474329 55939113 Direct pages reclaimed 6905990 2964843 6352115 Kswapd efficiency 98% 76% 98% Kswapd velocity 12494.375 17597.507 12488.065 Direct efficiency 99% 94% 99% Direct velocity 1513.835 668.306 1393.148 Page writes by reclaim 0.000 4410243.000 0.000 Page writes file 0 4409635 0 Page writes anon 0 608 0 Page reclaim immediate 1036792 14175203 1042571 4.11.0-rc1 4.11.0-rc1 4.11.0-rc1 vanilla clear-v2 keepawake-v2 Swap Ins 0 12 0 Swap Outs 0 838 0 Direct pages scanned 6579706 3237270 6256811 Kswapd pages scanned 61853702 79961486 54837791 Kswapd pages reclaimed 60768764 60755788 53849586 Direct pages reclaimed 6579055 2987453 6256151 Kswapd efficiency 98% 75% 98% Page writes by reclaim 0.000 4389496.000 0.000 Page writes file 0 4388658 0 Page writes anon 0 838 0 Page reclaim immediate 1073573 14473009 982507 Swap-outs are equivalent to baseline. Direct reclaim is reduced but not eliminated. It's worth noting that there are two periods of direct reclaim for this workload. The first is when it switches from preparing the files for the actual test itself. It's a lot of file IO followed by a lot of allocs that reclaims heavily for a brief window. While direct reclaim is lower with clear-v2, it is due to kswapd scanning aggressively and trying to reclaim the world which is not the right thing to do. With the patches applied, there is still direct reclaim but the phase change from "creating work files" to starting multiple threads that allocate a lot of anonymous memory faster than kswapd can reclaim. Scanning/reclaim efficiency is restored by this patch. Page writes from reclaim context are back at 0 which is ideal. Pages immediately reclaimed after IO completes is slightly improved but it is expected this will vary slightly. On UMA, there is almost no change so this is not expected to be a universal win. [mgorman@suse.de: fix ->kswapd_classzone_idx initialization] Link: http://lkml.kernel.org/r/20170406174538.5msrznj6nt6qpbx5@suse.de Link: http://lkml.kernel.org/r/20170309075657.25121-4-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Hillf Danton Cc: Johannes Weiner Cc: Shantanu Goel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 6 ++- mm/vmscan.c | 120 +++++++++++++++++++++++++++++----------------------- 2 files changed, 71 insertions(+), 55 deletions(-) commit 631b6e083ec328f7203f466ba839d296aee70c36 Author: Mel Gorman Date: Wed May 3 14:53:41 2017 -0700 mm, vmscan: only clear pgdat congested/dirty/writeback state when balanced A pgdat tracks if recent reclaim encountered too many dirty, writeback or congested pages. The flags control whether kswapd writes pages back from reclaim context, tags pages for immediate reclaim when IO completes, whether processes block on wait_iff_congested and whether kswapd blocks when too many pages marked for immediate reclaim are encountered. The state is cleared in a check function with side-effects. With the patch "mm, vmscan: fix zone balance check in prepare_kswapd_sleep", the timing of when the bits get cleared changed. Due to the way the check works, it'll clear the bits if ZONE_DMA is balanced for a GFP_DMA allocation because it does not account for lowmem reserves properly. For the simoop workload, kswapd is not stalling when it should due to the premature clearing, writing pages from reclaim context like crazy and generally being unhelpful. This patch resets the pgdat bits related to page reclaim only when kswapd is going to sleep. The comparison with simoop is then 4.11.0-rc1 4.11.0-rc1 4.11.0-rc1 vanilla fixcheck-v2 clear-v2 Amean p50-Read 21670074.18 ( 0.00%) 20464344.18 ( 5.56%) 19786774.76 ( 8.69%) Amean p95-Read 25456267.64 ( 0.00%) 25721423.64 ( -1.04%) 24101956.27 ( 5.32%) Amean p99-Read 29369064.73 ( 0.00%) 30174230.76 ( -2.74%) 27691872.71 ( 5.71%) Amean p50-Write 1390.30 ( 0.00%) 1395.28 ( -0.36%) 1011.91 ( 27.22%) Amean p95-Write 412901.57 ( 0.00%) 37737.74 ( 90.86%) 34874.98 ( 91.55%) Amean p99-Write 6668722.09 ( 0.00%) 666489.04 ( 90.01%) 575449.60 ( 91.37%) Amean p50-Allocation 78714.31 ( 0.00%) 86286.22 ( -9.62%) 84246.26 ( -7.03%) Amean p95-Allocation 175533.51 ( 0.00%) 351812.27 (-100.42%) 400058.43 (-127.91%) Amean p99-Allocation 247003.02 ( 0.00%) 6291171.56 (-2447.00%) 10905600.00 (-4315.17%) Read latency is improved, write latency is mostly improved but allocation latency is regressed. kswapd is still reclaiming inefficiently, pages are being written back from writeback context and a host of other issues. However, given the change, it needed to be spelled out why the side-effect was moved. Link: http://lkml.kernel.org/r/20170309075657.25121-3-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Hillf Danton Cc: Johannes Weiner Cc: Shantanu Goel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 333b0a459c0e1b4faa3127ec6209a4d984408b95 Author: Shantanu Goel Date: Wed May 3 14:53:38 2017 -0700 mm, vmscan: fix zone balance check in prepare_kswapd_sleep Patch series "Reduce amount of time kswapd sleeps prematurely", v2. The series is unusual in that the first patch fixes one problem and introduces other issues that are noted in the changelog. Patch 2 makes a minor modification that is worth considering on its own but leaves the kernel in a state where it behaves badly. It's not until patch 3 that there is an improvement against baseline. This was mostly motivated by examining Chris Mason's "simoop" benchmark which puts the VM under similar pressure to HADOOP. It has been reported that the benchmark has regressed severely during the last number of releases. While I cannot reproduce all the same problems Chris experienced due to hardware limitations, there was a number of problems on a 2-socket machine with a single disk. simoop latencies 4.11.0-rc1 4.11.0-rc1 vanilla keepawake-v2 Amean p50-Read 21670074.18 ( 0.00%) 22668332.52 ( -4.61%) Amean p95-Read 25456267.64 ( 0.00%) 26738688.00 ( -5.04%) Amean p99-Read 29369064.73 ( 0.00%) 30991404.52 ( -5.52%) Amean p50-Write 1390.30 ( 0.00%) 924.91 ( 33.47%) Amean p95-Write 412901.57 ( 0.00%) 1362.62 ( 99.67%) Amean p99-Write 6668722.09 ( 0.00%) 16854.04 ( 99.75%) Amean p50-Allocation 78714.31 ( 0.00%) 74729.74 ( 5.06%) Amean p95-Allocation 175533.51 ( 0.00%) 101609.74 ( 42.11%) Amean p99-Allocation 247003.02 ( 0.00%) 125765.57 ( 49.08%) These are latencies. Read/write are threads reading fixed-size random blocks from a simulated database. The allocation latency is mmaping and faulting regions of memory. The p50, 95 and p99 reports the worst latencies for 50% of the samples, 95% and 99% respectively. For example, the report indicates that while the test was running 99% of writes completed 99.75% faster. It's worth noting that on a UMA machine that no difference in performance with simoop was observed so milage will vary. It's noted that there is a slight impact to read latencies but it's mostly due to IO scheduler decisions and offset by the large reduction in other latencies. This patch (of 3): The check in prepare_kswapd_sleep needs to match the one in balance_pgdat since the latter will return as soon as any one of the zones in the classzone is above the watermark. This is specially important for higher order allocations since balance_pgdat will typically reset the order to zero relying on compaction to create the higher order pages. Without this patch, prepare_kswapd_sleep fails to wake up kcompactd since the zone balance check fails. It was first reported against 4.9.7 that kswapd is failing to wake up kcompactd due to a mismatch in the zone balance check between balance_pgdat() and prepare_kswapd_sleep(). balance_pgdat() returns as soon as a single zone satisfies the allocation but prepare_kswapd_sleep() requires all zones to do +the same. This causes prepare_kswapd_sleep() to never succeed except in the order == 0 case and consequently, wakeup_kcompactd() is never called. For the machine that originally motivated this patch, the state of compaction from /proc/vmstat looked this way after a day and a half +of uptime: compact_migrate_scanned 240496 compact_free_scanned 76238632 compact_isolated 123472 compact_stall 1791 compact_fail 29 compact_success 1762 compact_daemon_wake 0 After applying the patch and about 10 hours of uptime the state looks like this: compact_migrate_scanned 59927299 compact_free_scanned 2021075136 compact_isolated 640926 compact_stall 4 compact_fail 2 compact_success 2 compact_daemon_wake 5160 Further notes from Mel that motivated him to pick this patch up and resend it; It was observed for the simoop workload (pressures the VM similar to HADOOP) that kswapd was failing to keep ahead of direct reclaim. The investigation noted that there was a need to rationalise kswapd decisions to reclaim with kswapd decisions to sleep. With this patch on a 2-socket box, there was a 49% reduction in direct reclaim scanning. However, the impact otherwise is extremely negative. Kswapd reclaim efficiency dropped from 98% to 76%. simoop has three latency-related metrics for read, write and allocation (an anonymous mmap and fault). 4.11.0-rc1 4.11.0-rc1 vanilla fixcheck-v2 Amean p50-Read 21670074.18 ( 0.00%) 20464344.18 ( 5.56%) Amean p95-Read 25456267.64 ( 0.00%) 25721423.64 ( -1.04%) Amean p99-Read 29369064.73 ( 0.00%) 30174230.76 ( -2.74%) Amean p50-Write 1390.30 ( 0.00%) 1395.28 ( -0.36%) Amean p95-Write 412901.57 ( 0.00%) 37737.74 ( 90.86%) Amean p99-Write 6668722.09 ( 0.00%) 666489.04 ( 90.01%) Amean p50-Allocation 78714.31 ( 0.00%) 86286.22 ( -9.62%) Amean p95-Allocation 175533.51 ( 0.00%) 351812.27 (-100.42%) Amean p99-Allocation 247003.02 ( 0.00%) 6291171.56 (-2447.00%) Of greater concern is that the patch causes swapping and page writes from kswapd context rose from 0 pages to 4189753 pages during the hour the workload ran for. By and large, the patch has very bad behaviour but easily missed as the impact on a UMA machine is negligible. This patch is included with the data in case a bisection leads to this area. This patch is also a pre-requisite for the rest of the series. Link: http://lkml.kernel.org/r/20170309075657.25121-2-mgorman@techsingularity.net Signed-off-by: Shantanu Goel Signed-off-by: Mel Gorman Acked-by: Hillf Danton Acked-by: Vlastimil Babka Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 2948be5acf7d798991b127ceda6eea13e52c597f Author: Minchan Kim Date: Wed May 3 14:53:35 2017 -0700 mm: do not use double negation for testing page flags With the discussion[1], I found it seems there are every PageFlags functions return bool at this moment so we don't need double negation any more. Although it's not a problem to keep it, it makes future users confused to use double negation for them, too. Remove such possibility. [1] https://marc.info/?l=linux-kernel&m=148881578820434 Frankly sepaking, I like every PageFlags to return bool instead of int. It will make it clear. AFAIR, Chen Gang had tried it but don't know why it was not merged at that time. http://lkml.kernel.org/r/1469336184-1904-1-git-send-email-chengang@emindsoft.com.cn Link: http://lkml.kernel.org/r/1488868597-32222-1-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Kirill A. Shutemov Cc: Chen Gang Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/khugepaged.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 056b9d8a76924df02011f3941c4f53ace8d6c32a Author: Kees Cook Date: Wed May 3 14:53:32 2017 -0700 mm: remove rodata_test_data export, add pr_fmt Since commit 3ad38ceb2769 ("x86/mm: Remove CONFIG_DEBUG_NX_TEST"), nothing is using the exported rodata_test_data variable, so drop the export. This additionally updates the pr_fmt to avoid redundant strings and adjusts some whitespace. Link: http://lkml.kernel.org/r/20170307005313.GA85809@beast Signed-off-by: Kees Cook Cc: Jinbum Park Cc: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rodata_test.h | 1 - mm/rodata_test.c | 17 +++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) commit 9ab2594febb468964a4c00f8023ec22073ca8716 Author: Matthew Wilcox Date: Wed May 3 14:53:29 2017 -0700 mm: tighten up the fault path a little The round_up() macro generates a couple of unnecessary instructions in this usage: 48cd: 49 8b 47 50 mov 0x50(%r15),%rax 48d1: 48 83 e8 01 sub $0x1,%rax 48d5: 48 0d ff 0f 00 00 or $0xfff,%rax 48db: 48 83 c0 01 add $0x1,%rax 48df: 48 c1 f8 0c sar $0xc,%rax 48e3: 48 39 c3 cmp %rax,%rbx 48e6: 72 2e jb 4916 If we change round_up() to ((x) + __round_mask(x, y)) & ~__round_mask(x, y) then GCC can see through it and remove the mask (because that would be dead code given the subsequent shift): 48cd: 49 8b 47 50 mov 0x50(%r15),%rax 48d1: 48 05 ff 0f 00 00 add $0xfff,%rax 48d7: 48 c1 e8 0c shr $0xc,%rax 48db: 48 39 c3 cmp %rax,%rbx 48de: 72 2e jb 490e But that's problematic because we'd evaluate 'y' twice. Converting round_up into an inline function prevents it from being used in other definitions. The easiest thing to do is just change these three usages of round_up to use DIV_ROUND_UP. Also add an unlikely() because GCC's heuristic is wrong in this case. Link: http://lkml.kernel.org/r/20170207192812.5281-1-willy@infradead.org Signed-off-by: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit eb52da3f48f5b1ddceb7e8d4725b6c88204aa2c4 Author: Michal Hocko Date: Wed May 3 14:53:26 2017 -0700 jbd2: make the whole kjournald2 kthread NOFS safe kjournald2 is central to the transaction commit processing. As such any potential allocation from this kernel thread has to be GFP_NOFS. Make sure to mark the whole kernel thread GFP_NOFS by the memalloc_nofs_save. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20170306131408.9828-8-mhocko@kernel.org Signed-off-by: Michal Hocko Suggested-by: Jan Kara Reviewed-by: Jan Kara Cc: Dave Chinner Cc: Theodore Ts'o Cc: Chris Mason Cc: David Sterba Cc: Brian Foster Cc: Darrick J. Wong Cc: Nikolay Borisov Cc: Peter Zijlstra Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/jbd2/journal.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 81378da64de6d33d0c200885f1de431c9a3e5ccd Author: Michal Hocko Date: Wed May 3 14:53:22 2017 -0700 jbd2: mark the transaction context with the scope GFP_NOFS context now that we have memalloc_nofs_{save,restore} api we can mark the whole transaction context as implicitly GFP_NOFS. All allocations will automatically inherit GFP_NOFS this way. This means that we do not have to mark any of those requests with GFP_NOFS and moreover all the ext4_kv[mz]alloc(GFP_NOFS) are also safe now because even the hardcoded GFP_KERNEL allocations deep inside the vmalloc will be NOFS now. [akpm@linux-foundation.org: tweak comments] Link: http://lkml.kernel.org/r/20170306131408.9828-7-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: Jan Kara Cc: Dave Chinner Cc: Theodore Ts'o Cc: Chris Mason Cc: David Sterba Cc: Brian Foster Cc: Darrick J. Wong Cc: Nikolay Borisov Cc: Peter Zijlstra Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/jbd2/transaction.c | 12 ++++++++++++ include/linux/jbd2.h | 2 ++ 2 files changed, 14 insertions(+) commit 9ba1fb2c602a6f2323e3a08ec8e7a8e33bf335f4 Author: Michal Hocko Date: Wed May 3 14:53:19 2017 -0700 xfs: use memalloc_nofs_{save,restore} instead of memalloc_noio* kmem_zalloc_large and _xfs_buf_map_pages use memalloc_noio_{save,restore} API to prevent from reclaim recursion into the fs because vmalloc can invoke unconditional GFP_KERNEL allocations and these functions might be called from the NOFS contexts. The memalloc_noio_save will enforce GFP_NOIO context which is even weaker than GFP_NOFS and that seems to be unnecessary. Let's use memalloc_nofs_{save,restore} instead as it should provide exactly what we need here - implicit GFP_NOFS context. Link: http://lkml.kernel.org/r/20170306131408.9828-6-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Acked-by: Vlastimil Babka Cc: Dave Chinner Cc: Theodore Ts'o Cc: Chris Mason Cc: David Sterba Cc: Jan Kara Cc: Nikolay Borisov Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/xfs/kmem.c | 12 ++++++------ fs/xfs/xfs_buf.c | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) commit 7dea19f9ee636cb244109a4dba426bbb3e5304b7 Author: Michal Hocko Date: Wed May 3 14:53:15 2017 -0700 mm: introduce memalloc_nofs_{save,restore} API GFP_NOFS context is used for the following 5 reasons currently: - to prevent from deadlocks when the lock held by the allocation context would be needed during the memory reclaim - to prevent from stack overflows during the reclaim because the allocation is performed from a deep context already - to prevent lockups when the allocation context depends on other reclaimers to make a forward progress indirectly - just in case because this would be safe from the fs POV - silence lockdep false positives Unfortunately overuse of this allocation context brings some problems to the MM. Memory reclaim is much weaker (especially during heavy FS metadata workloads), OOM killer cannot be invoked because the MM layer doesn't have enough information about how much memory is freeable by the FS layer. In many cases it is far from clear why the weaker context is even used and so it might be used unnecessarily. We would like to get rid of those as much as possible. One way to do that is to use the flag in scopes rather than isolated cases. Such a scope is declared when really necessary, tracked per task and all the allocation requests from within the context will simply inherit the GFP_NOFS semantic. Not only this is easier to understand and maintain because there are much less problematic contexts than specific allocation requests, this also helps code paths where FS layer interacts with other layers (e.g. crypto, security modules, MM etc...) and there is no easy way to convey the allocation context between the layers. Introduce memalloc_nofs_{save,restore} API to control the scope of GFP_NOFS allocation context. This is basically copying memalloc_noio_{save,restore} API we have for other restricted allocation context GFP_NOIO. The PF_MEMALLOC_NOFS flag already exists and it is just an alias for PF_FSTRANS which has been xfs specific until recently. There are no more PF_FSTRANS users anymore so let's just drop it. PF_MEMALLOC_NOFS is now checked in the MM layer and drops __GFP_FS implicitly same as PF_MEMALLOC_NOIO drops __GFP_IO. memalloc_noio_flags is renamed to current_gfp_context because it now cares about both PF_MEMALLOC_NOFS and PF_MEMALLOC_NOIO contexts. Xfs code paths preserve their semantic. kmem_flags_convert() doesn't need to evaluate the flag anymore. This patch shouldn't introduce any functional changes. Let's hope that filesystems will drop direct GFP_NOFS (resp. ~__GFP_FS) usage as much as possible and only use a properly documented memalloc_nofs_{save,restore} checkpoints where they are appropriate. [akpm@linux-foundation.org: fix comment typo, reflow comment] Link: http://lkml.kernel.org/r/20170306131408.9828-5-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Dave Chinner Cc: Theodore Ts'o Cc: Chris Mason Cc: David Sterba Cc: Jan Kara Cc: Brian Foster Cc: Darrick J. Wong Cc: Nikolay Borisov Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/xfs/kmem.h | 2 +- include/linux/gfp.h | 8 ++++++++ include/linux/sched.h | 8 +++----- include/linux/sched/mm.h | 26 +++++++++++++++++++++++--- kernel/locking/lockdep.c | 6 +++--- mm/page_alloc.c | 10 ++++++---- mm/vmscan.c | 6 +++--- 7 files changed, 47 insertions(+), 19 deletions(-) commit 9070733b4efac4bf17f299a81b01c15e206f9ff5 Author: Michal Hocko Date: Wed May 3 14:53:12 2017 -0700 xfs: abstract PF_FSTRANS to PF_MEMALLOC_NOFS xfs has defined PF_FSTRANS to declare a scope GFP_NOFS semantic quite some time ago. We would like to make this concept more generic and use it for other filesystems as well. Let's start by giving the flag a more generic name PF_MEMALLOC_NOFS which is in line with an exiting PF_MEMALLOC_NOIO already used for the same purpose for GFP_NOIO contexts. Replace all PF_FSTRANS usage from the xfs code in the first step before we introduce a full API for it as xfs uses the flag directly anyway. This patch doesn't introduce any functional change. Link: http://lkml.kernel.org/r/20170306131408.9828-4-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Acked-by: Vlastimil Babka Cc: Dave Chinner Cc: Theodore Ts'o Cc: Chris Mason Cc: David Sterba Cc: Jan Kara Cc: Nikolay Borisov Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/xfs/kmem.c | 4 ++-- fs/xfs/kmem.h | 2 +- fs/xfs/libxfs/xfs_btree.c | 2 +- fs/xfs/xfs_aops.c | 6 +++--- fs/xfs/xfs_trans.c | 12 ++++++------ include/linux/sched.h | 2 ++ 6 files changed, 15 insertions(+), 13 deletions(-) commit 7e7844226f1053236b6f6d5d122a06509fb14fd9 Author: Michal Hocko Date: Wed May 3 14:53:09 2017 -0700 lockdep: allow to disable reclaim lockup detection The current implementation of the reclaim lockup detection can lead to false positives and those even happen and usually lead to tweak the code to silence the lockdep by using GFP_NOFS even though the context can use __GFP_FS just fine. See http://lkml.kernel.org/r/20160512080321.GA18496@dastard as an example. ================================= [ INFO: inconsistent lock state ] 4.5.0-rc2+ #4 Tainted: G O --------------------------------- inconsistent {RECLAIM_FS-ON-R} -> {IN-RECLAIM_FS-W} usage. kswapd0/543 [HC0[0]:SC0[0]:HE1:SE1] takes: (&xfs_nondir_ilock_class){++++-+}, at: xfs_ilock+0x177/0x200 [xfs] {RECLAIM_FS-ON-R} state was registered at: mark_held_locks+0x79/0xa0 lockdep_trace_alloc+0xb3/0x100 kmem_cache_alloc+0x33/0x230 kmem_zone_alloc+0x81/0x120 [xfs] xfs_refcountbt_init_cursor+0x3e/0xa0 [xfs] __xfs_refcount_find_shared+0x75/0x580 [xfs] xfs_refcount_find_shared+0x84/0xb0 [xfs] xfs_getbmap+0x608/0x8c0 [xfs] xfs_vn_fiemap+0xab/0xc0 [xfs] do_vfs_ioctl+0x498/0x670 SyS_ioctl+0x79/0x90 entry_SYSCALL_64_fastpath+0x12/0x6f CPU0 ---- lock(&xfs_nondir_ilock_class); lock(&xfs_nondir_ilock_class); *** DEADLOCK *** 3 locks held by kswapd0/543: stack backtrace: CPU: 0 PID: 543 Comm: kswapd0 Tainted: G O 4.5.0-rc2+ #4 Call Trace: lock_acquire+0xd8/0x1e0 down_write_nested+0x5e/0xc0 xfs_ilock+0x177/0x200 [xfs] xfs_reflink_cancel_cow_range+0x150/0x300 [xfs] xfs_fs_evict_inode+0xdc/0x1e0 [xfs] evict+0xc5/0x190 dispose_list+0x39/0x60 prune_icache_sb+0x4b/0x60 super_cache_scan+0x14f/0x1a0 shrink_slab.part.63.constprop.79+0x1e9/0x4e0 shrink_zone+0x15e/0x170 kswapd+0x4f1/0xa80 kthread+0xf2/0x110 ret_from_fork+0x3f/0x70 To quote Dave: "Ignoring whether reflink should be doing anything or not, that's a "xfs_refcountbt_init_cursor() gets called both outside and inside transactions" lockdep false positive case. The problem here is lockdep has seen this allocation from within a transaction, hence a GFP_NOFS allocation, and now it's seeing it in a GFP_KERNEL context. Also note that we have an active reference to this inode. So, because the reclaim annotations overload the interrupt level detections and it's seen the inode ilock been taken in reclaim ("interrupt") context, this triggers a reclaim context warning where it thinks it is unsafe to do this allocation in GFP_KERNEL context holding the inode ilock..." This sounds like a fundamental problem of the reclaim lock detection. It is really impossible to annotate such a special usecase IMHO unless the reclaim lockup detection is reworked completely. Until then it is much better to provide a way to add "I know what I am doing flag" and mark problematic places. This would prevent from abusing GFP_NOFS flag which has a runtime effect even on configurations which have lockdep disabled. Introduce __GFP_NOLOCKDEP flag which tells the lockdep gfp tracking to skip the current allocation request. While we are at it also make sure that the radix tree doesn't accidentaly override tags stored in the upper part of the gfp_mask. Link: http://lkml.kernel.org/r/20170306131408.9828-3-mhocko@kernel.org Signed-off-by: Michal Hocko Suggested-by: Peter Zijlstra Acked-by: Peter Zijlstra (Intel) Acked-by: Vlastimil Babka Cc: Dave Chinner Cc: Theodore Ts'o Cc: Chris Mason Cc: David Sterba Cc: Jan Kara Cc: Brian Foster Cc: Darrick J. Wong Cc: Nikolay Borisov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/gfp.h | 10 +++++++++- kernel/locking/lockdep.c | 4 ++++ lib/radix-tree.c | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) commit 6d7225f0cc1a1fc32cf5dd01b4ab4b8a34c7cdb4 Author: Nikolay Borisov Date: Wed May 3 14:53:05 2017 -0700 lockdep: teach lockdep about memalloc_noio_save Patch series "scope GFP_NOFS api", v5. This patch (of 7): Commit 21caf2fc1931 ("mm: teach mm by current context info to not do I/O during memory allocation") added the memalloc_noio_(save|restore) functions to enable people to modify the MM behavior by disabling I/O during memory allocation. This was further extended in commit 934f3072c17c ("mm: clear __GFP_FS when PF_MEMALLOC_NOIO is set"). memalloc_noio_* functions prevent allocation paths recursing back into the filesystem without explicitly changing the flags for every allocation site. However, lockdep hasn't been keeping up with the changes and it entirely misses handling the memalloc_noio adjustments. Instead, it is left to the callers of __lockdep_trace_alloc to call the function after they have shaven the respective GFP flags which can lead to false positives: ================================= [ INFO: inconsistent lock state ] 4.10.0-nbor #134 Not tainted --------------------------------- inconsistent {IN-RECLAIM_FS-W} -> {RECLAIM_FS-ON-W} usage. fsstress/3365 [HC0[0]:SC0[0]:HE1:SE1] takes: (&xfs_nondir_ilock_class){++++?.}, at: xfs_ilock+0x141/0x230 {IN-RECLAIM_FS-W} state was registered at: __lock_acquire+0x62a/0x17c0 lock_acquire+0xc5/0x220 down_write_nested+0x4f/0x90 xfs_ilock+0x141/0x230 xfs_reclaim_inode+0x12a/0x320 xfs_reclaim_inodes_ag+0x2c8/0x4e0 xfs_reclaim_inodes_nr+0x33/0x40 xfs_fs_free_cached_objects+0x19/0x20 super_cache_scan+0x191/0x1a0 shrink_slab+0x26f/0x5f0 shrink_node+0xf9/0x2f0 kswapd+0x356/0x920 kthread+0x10c/0x140 ret_from_fork+0x31/0x40 irq event stamp: 173777 hardirqs last enabled at (173777): __local_bh_enable_ip+0x70/0xc0 hardirqs last disabled at (173775): __local_bh_enable_ip+0x37/0xc0 softirqs last enabled at (173776): _xfs_buf_find+0x67a/0xb70 softirqs last disabled at (173774): _xfs_buf_find+0x5db/0xb70 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&xfs_nondir_ilock_class); lock(&xfs_nondir_ilock_class); *** DEADLOCK *** 4 locks held by fsstress/3365: #0: (sb_writers#10){++++++}, at: mnt_want_write+0x24/0x50 #1: (&sb->s_type->i_mutex_key#12){++++++}, at: vfs_setxattr+0x6f/0xb0 #2: (sb_internal#2){++++++}, at: xfs_trans_alloc+0xfc/0x140 #3: (&xfs_nondir_ilock_class){++++?.}, at: xfs_ilock+0x141/0x230 stack backtrace: CPU: 0 PID: 3365 Comm: fsstress Not tainted 4.10.0-nbor #134 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 Call Trace: kmem_cache_alloc_node_trace+0x3a/0x2c0 vm_map_ram+0x2a1/0x510 _xfs_buf_map_pages+0x77/0x140 xfs_buf_get_map+0x185/0x2a0 xfs_attr_rmtval_set+0x233/0x430 xfs_attr_leaf_addname+0x2d2/0x500 xfs_attr_set+0x214/0x420 xfs_xattr_set+0x59/0xb0 __vfs_setxattr+0x76/0xa0 __vfs_setxattr_noperm+0x5e/0xf0 vfs_setxattr+0xae/0xb0 setxattr+0x15e/0x1a0 path_setxattr+0x8f/0xc0 SyS_lsetxattr+0x11/0x20 entry_SYSCALL_64_fastpath+0x23/0xc6 Let's fix this by making lockdep explicitly do the shaving of respective GFP flags. Fixes: 934f3072c17c ("mm: clear __GFP_FS when PF_MEMALLOC_NOIO is set") Link: http://lkml.kernel.org/r/20170306131408.9828-2-mhocko@kernel.org Signed-off-by: Nikolay Borisov Signed-off-by: Michal Hocko Acked-by: Peter Zijlstra (Intel) Cc: Dave Chinner Cc: Theodore Ts'o Cc: Chris Mason Cc: David Sterba Cc: Jan Kara Cc: Brian Foster Cc: Darrick J. Wong Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/locking/lockdep.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7dfb8bf3b9caef4049bee51d2c22e1c3a311d483 Author: David Rientjes Date: Wed May 3 14:53:02 2017 -0700 mm, vmstat: suppress pcp stats for unpopulated zones in zoneinfo After "mm, vmstat: print non-populated zones in zoneinfo", /proc/zoneinfo will show unpopulated zones. The per-cpu pageset statistics are not relevant for unpopulated zones and can be potentially lengthy, so supress them when they are not interesting. Also moves lowmem reserve protection information above pcp stats since it is relevant for all zones per vm.lowmem_reserve_ratio. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1703061400500.46428@chino.kir.corp.google.com Signed-off-by: David Rientjes Cc: Anshuman Khandual Cc: Vlastimil Babka Cc: Mel Gorman Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmstat.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit b2bd8598195f1b2a72130592125ac6b4218988a2 Author: David Rientjes Date: Wed May 3 14:52:59 2017 -0700 mm, vmstat: print non-populated zones in zoneinfo Initscripts can use the information (protection levels) from /proc/zoneinfo to configure vm.lowmem_reserve_ratio at boot. vm.lowmem_reserve_ratio is an array of ratios for each configured zone on the system. If a zone is not populated on an arch, /proc/zoneinfo suppresses its output. This results in there not being a 1:1 mapping between the set of zones emitted by /proc/zoneinfo and the zones configured by vm.lowmem_reserve_ratio. This patch shows statistics for non-populated zones in /proc/zoneinfo. The zones exist and hold a spot in the vm.lowmem_reserve_ratio array. Without this patch, it is not possible to determine which index in the array controls which zone if one or more zones on the system are not populated. Remaining users of walk_zones_in_node() are unchanged. Files such as /proc/pagetypeinfo require certain zone data to be initialized properly for display, which is not done for unpopulated zones. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1703031451310.98023@chino.kir.corp.google.com Signed-off-by: David Rientjes Reviewed-by: Anshuman Khandual Cc: Vlastimil Babka Cc: Mel Gorman Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmstat.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit bbf9ce9719b5c64eac7f8483d1da6e8a3d4f98f5 Author: Xishi Qiu Date: Wed May 3 14:52:55 2017 -0700 mm: use is_migrate_isolate_page() to simplify the code Use is_migrate_isolate_page() to simplify the code, no functional changes. Link: http://lkml.kernel.org/r/58B94FB1.8020802@huawei.com Signed-off-by: Xishi Qiu Acked-by: Michal Hocko Cc: Vlastimil Babka Cc: Mel Gorman Cc: Minchan Kim Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_isolation.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a6ffdc07847e74cc244c02ab6d0351a4a5d77281 Author: Xishi Qiu Date: Wed May 3 14:52:52 2017 -0700 mm: use is_migrate_highatomic() to simplify the code Introduce two helpers, is_migrate_highatomic() and is_migrate_highatomic_page(). Simplify the code, no functional changes. [akpm@linux-foundation.org: use static inlines rather than macros, per mhocko] Link: http://lkml.kernel.org/r/58B94F15.6060606@huawei.com Signed-off-by: Xishi Qiu Acked-by: Michal Hocko Cc: Vlastimil Babka Cc: Mel Gorman Cc: Minchan Kim Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 2 +- mm/internal.h | 10 ++++++++++ mm/page_alloc.c | 14 ++++++-------- 3 files changed, 17 insertions(+), 9 deletions(-) commit 322b8afe4a65906c133102532e63a278775cc5f0 Author: Huang Ying Date: Wed May 3 14:52:49 2017 -0700 mm, swap: Fix a race in free_swap_and_cache() Before using cluster lock in free_swap_and_cache(), the swap_info_struct->lock will be held during freeing the swap entry and acquiring page lock, so the page swap count will not change when testing page information later. But after using cluster lock, the cluster lock (or swap_info_struct->lock) will be held only during freeing the swap entry. So before acquiring the page lock, the page swap count may be changed in another thread. If the page swap count is not 0, we should not delete the page from the swap cache. This is fixed via checking page swap count again after acquiring the page lock. I found the race when I review the code, so I didn't trigger the race via a test program. If the race occurs for an anonymous page shared by multiple processes via fork, multiple pages will be allocated and swapped in from the swap device for the previously shared one page. That is, the user-visible runtime effect is more memory will be used and the access latency for the page will be higher, that is, the performance regression. Link: http://lkml.kernel.org/r/20170301143905.12846-1-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Hugh Dickins Cc: Shaohua Li Cc: Minchan Kim Cc: Rik van Riel Cc: Tim Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swapfile.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 9a4caf1e9fa4864ce21ba9584a2c336bfbc72740 Author: Johannes Weiner Date: Wed May 3 14:52:45 2017 -0700 mm: memcontrol: provide shmem statistics Cgroups currently don't report how much shmem they use, which can be useful data to have, in particular since shmem is included in the cache/file item while being reclaimed like anonymous memory. Add a counter to track shmem pages during charging and uncharging. Link: http://lkml.kernel.org/r/20170221164343.32252-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reported-by: Chris Down Cc: Michal Hocko Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/cgroup-v2.txt | 5 +++++ include/linux/memcontrol.h | 1 + mm/memcontrol.c | 28 ++++++++++++++++++++-------- 3 files changed, 26 insertions(+), 8 deletions(-) commit cf8496ea8020792ea32d0fbec0c140d8de93011a Author: Shaohua Li Date: Wed May 3 14:52:42 2017 -0700 proc: show MADV_FREE pages info in smaps Show MADV_FREE pages info of each vma in smaps. The interface is for diganose or monitoring purpose, userspace could use it to understand what happens in the application. Since userspace could dirty MADV_FREE pages without notice from kernel, this interface is the only place we can get accurate accounting info about MADV_FREE pages. [mhocko@kernel.org: update Documentation/filesystems/proc.txt] Link: http://lkml.kernel.org/r/89efde633559de1ec07444f2ef0f4963a97a2ce8.1487965799.git.shli@fb.com Signed-off-by: Shaohua Li Acked-by: Johannes Weiner Acked-by: Minchan Kim Acked-by: Michal Hocko Acked-by: Hillf Danton Cc: Hugh Dickins Cc: Rik van Riel Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/proc.txt | 6 ++++++ fs/proc/task_mmu.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit 93e06c7a645343d222c9a838834a51042eebbbf7 Author: Shaohua Li Date: Wed May 3 14:52:39 2017 -0700 mm: enable MADV_FREE for swapless system Now MADV_FREE pages can be easily reclaimed even for swapless system. We can safely enable MADV_FREE for all systems. Link: http://lkml.kernel.org/r/155648585589300bfae1d45078e7aebb3d988b87.1487965799.git.shli@fb.com Signed-off-by: Shaohua Li Acked-by: Johannes Weiner Acked-by: Michal Hocko Acked-by: Hillf Danton Acked-by: Minchan Kim Cc: Hugh Dickins Cc: Rik van Riel Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/madvise.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit eb94a8784427b28479f871b5d4121c547808d0fc Author: Minchan Kim Date: Wed May 3 14:52:36 2017 -0700 mm: fix lazyfree BUG_ON check in try_to_unmap_one() If a page is swapbacked, it means it should be in swapcache in try_to_unmap_one's path. If a page is !swapbacked, it mean it shouldn't be in swapcache in try_to_unmap_one's path. Check both two cases all at once and if it fails, warn and return SWAP_FAIL. Such bug never mean we should shut down the kernel. [minchan@kernel.org: do not use VM_WARN_ON_ONCE as if condition[ Link: http://lkml.kernel.org/r/20170309060226.GB854@bbox Link: http://lkml.kernel.org/r/20170307055551.GC29458@bbox Signed-off-by: Minchan Kim Suggested-by: Johannes Weiner Acked-by: Michal Hocko Acked-by: Johannes Weiner Cc: Shaohua Li Cc: Hillf Danton Cc: Hugh Dickins Cc: Rik van Riel Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/rmap.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 802a3a92ad7ac0b9be9df229dee530a1f0a8039b Author: Shaohua Li Date: Wed May 3 14:52:32 2017 -0700 mm: reclaim MADV_FREE pages When memory pressure is high, we free MADV_FREE pages. If the pages are not dirty in pte, the pages could be freed immediately. Otherwise we can't reclaim them. We put the pages back to anonumous LRU list (by setting SwapBacked flag) and the pages will be reclaimed in normal swapout way. We use normal page reclaim policy. Since MADV_FREE pages are put into inactive file list, such pages and inactive file pages are reclaimed according to their age. This is expected, because we don't want to reclaim too many MADV_FREE pages before used once pages. Based on Minchan's original patch [minchan@kernel.org: clean up lazyfree page handling] Link: http://lkml.kernel.org/r/20170303025237.GB3503@bbox Link: http://lkml.kernel.org/r/14b8eb1d3f6bf6cc492833f183ac8c304e560484.1487965799.git.shli@fb.com Signed-off-by: Shaohua Li Signed-off-by: Minchan Kim Acked-by: Minchan Kim Acked-by: Michal Hocko Acked-by: Johannes Weiner Acked-by: Hillf Danton Cc: Hugh Dickins Cc: Rik van Riel Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 2 +- mm/huge_memory.c | 2 ++ mm/madvise.c | 1 + mm/rmap.c | 46 ++++++++++++++++++++-------------------------- mm/vmscan.c | 34 ++++++++++++++++++++++------------ 5 files changed, 46 insertions(+), 39 deletions(-) commit f7ad2a6cb9f7c4040004bedee84a70a9b985583e Author: Shaohua Li Date: Wed May 3 14:52:29 2017 -0700 mm: move MADV_FREE pages into LRU_INACTIVE_FILE list madv()'s MADV_FREE indicate pages are 'lazyfree'. They are still anonymous pages, but they can be freed without pageout. To distinguish these from normal anonymous pages, we clear their SwapBacked flag. MADV_FREE pages could be freed without pageout, so they pretty much like used once file pages. For such pages, we'd like to reclaim them once there is memory pressure. Also it might be unfair reclaiming MADV_FREE pages always before used once file pages and we definitively want to reclaim the pages before other anonymous and file pages. To speed up MADV_FREE pages reclaim, we put the pages into LRU_INACTIVE_FILE list. The rationale is LRU_INACTIVE_FILE list is tiny nowadays and should be full of used once file pages. Reclaiming MADV_FREE pages will not have much interfere of anonymous and active file pages. And the inactive file pages and MADV_FREE pages will be reclaimed according to their age, so we don't reclaim too many MADV_FREE pages too. Putting the MADV_FREE pages into LRU_INACTIVE_FILE_LIST also means we can reclaim the pages without swap support. This idea is suggested by Johannes. This patch doesn't move MADV_FREE pages to LRU_INACTIVE_FILE list yet to avoid bisect failure, next patch will do it. The patch is based on Minchan's original patch. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/2f87063c1e9354677b7618c647abde77b07561e5.1487965799.git.shli@fb.com Signed-off-by: Shaohua Li Suggested-by: Johannes Weiner Acked-by: Johannes Weiner Acked-by: Minchan Kim Acked-by: Michal Hocko Acked-by: Hillf Danton Cc: Hugh Dickins Cc: Rik van Riel Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 2 +- include/linux/vm_event_item.h | 2 +- mm/huge_memory.c | 3 --- mm/madvise.c | 2 -- mm/swap.c | 49 ++++++++++++++++++++++++------------------- mm/vmstat.c | 1 + 6 files changed, 31 insertions(+), 28 deletions(-) commit d44d363f65780f2ac2ec672164555af54896d40d Author: Shaohua Li Date: Wed May 3 14:52:26 2017 -0700 mm: don't assume anonymous pages have SwapBacked flag There are a few places the code assumes anonymous pages should have SwapBacked flag set. MADV_FREE pages are anonymous pages but we are going to add them to LRU_INACTIVE_FILE list and clear SwapBacked flag for them. The assumption doesn't hold any more, so fix them. Link: http://lkml.kernel.org/r/3945232c0df3dd6c4ef001976f35a95f18dcb407.1487965799.git.shli@fb.com Signed-off-by: Shaohua Li Acked-by: Johannes Weiner Acked-by: Hillf Danton Cc: Michal Hocko Cc: Minchan Kim Cc: Hugh Dickins Cc: Rik van Riel Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 1 - mm/khugepaged.c | 8 +++----- mm/migrate.c | 3 ++- mm/rmap.c | 3 ++- 4 files changed, 7 insertions(+), 8 deletions(-) commit a128ca71fb29ed4444b80f38a0148b468826e19b Author: Shaohua Li Date: Wed May 3 14:52:22 2017 -0700 mm: delete unnecessary TTU_* flags Patch series "mm: fix some MADV_FREE issues", v5. We are trying to use MADV_FREE in jemalloc. Several issues are found. Without solving the issues, jemalloc can't use the MADV_FREE feature. - Doesn't support system without swap enabled. Because if swap is off, we can't or can't efficiently age anonymous pages. And since MADV_FREE pages are mixed with other anonymous pages, we can't reclaim MADV_FREE pages. In current implementation, MADV_FREE will fallback to MADV_DONTNEED without swap enabled. But in our environment, a lot of machines don't enable swap. This will prevent our setup using MADV_FREE. - Increases memory pressure. page reclaim bias file pages reclaim against anonymous pages. This doesn't make sense for MADV_FREE pages, because those pages could be freed easily and refilled with very slight penality. Even page reclaim doesn't bias file pages, there is still an issue, because MADV_FREE pages and other anonymous pages are mixed together. To reclaim a MADV_FREE page, we probably must scan a lot of other anonymous pages, which is inefficient. In our test, we usually see oom with MADV_FREE enabled and nothing without it. - Accounting. There are two accounting problems. We don't have a global accounting. If the system is abnormal, we don't know if it's a problem from MADV_FREE side. The other problem is RSS accounting. MADV_FREE pages are accounted as normal anon pages and reclaimed lazily, so application's RSS becomes bigger. This confuses our workloads. We have monitoring daemon running and if it finds applications' RSS becomes abnormal, the daemon will kill the applications even kernel can reclaim the memory easily. To address the first the two issues, we can either put MADV_FREE pages into a separate LRU list (Minchan's previous patches and V1 patches), or put them into LRU_INACTIVE_FILE list (suggested by Johannes). The patchset use the second idea. The reason is LRU_INACTIVE_FILE list is tiny nowadays and should be full of used once file pages. So we can still efficiently reclaim MADV_FREE pages there without interference with other anon and active file pages. Putting the pages into inactive file list also has an advantage which allows page reclaim to prioritize MADV_FREE pages and used once file pages. MADV_FREE pages are put into the lru list and clear SwapBacked flag, so PageAnon(page) && !PageSwapBacked(page) will indicate a MADV_FREE pages. These pages will directly freed without pageout if they are clean, otherwise normal swap will reclaim them. For the third issue, the previous post adds global accounting and a separate RSS count for MADV_FREE pages. The problem is we never get accurate accounting for MADV_FREE pages. The pages are mapped to userspace, can be dirtied without notice from kernel side. To get accurate accounting, we could write protect the page, but then there is extra page fault overhead, which people don't want to pay. Jemalloc guys have concerns about the inaccurate accounting, so this post drops the accounting patches temporarily. The info exported to /proc/pid/smaps for MADV_FREE pages are kept, which is the only place we can get accurate accounting right now. This patch (of 6): Johannes pointed out TTU_LZFREE is unnecessary. It's true because we always have the flag set if we want to do an unmap. For cases we don't do an unmap, the TTU_LZFREE part of code should never run. Also the TTU_UNMAP is unnecessary. If no other flags set (for example, TTU_MIGRATION), an unmap is implied. The patch includes Johannes's cleanup and dead TTU_ACTION macro removal code Link: http://lkml.kernel.org/r/4be3ea1bc56b26fd98a54d0a6f70bec63f6d8980.1487965799.git.shli@fb.com Signed-off-by: Shaohua Li Suggested-by: Johannes Weiner Acked-by: Johannes Weiner Acked-by: Minchan Kim Acked-by: Hillf Danton Acked-by: Michal Hocko Cc: Hugh Dickins Cc: Rik van Riel Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 22 +++++++++------------- mm/memory-failure.c | 2 +- mm/rmap.c | 2 +- mm/vmscan.c | 11 ++++------- 4 files changed, 15 insertions(+), 22 deletions(-) commit 0a372d09cca6a71610af6a353617dbb90facde76 Author: Geliang Tang Date: Wed May 3 14:52:19 2017 -0700 mm/page-writeback.c: use setup_deferrable_timer Use setup_deferrable_timer() instead of init_timer_deferrable() to simplify the code. Link: http://lkml.kernel.org/r/e8e3d4280a34facbc007346f31df833cec28801e.1488070291.git.geliangtang@gmail.com Signed-off-by: Geliang Tang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page-writeback.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 491d79ae778f24dbf65f1f2178d4744d940d4093 Author: Johannes Weiner Date: Wed May 3 14:52:16 2017 -0700 mm: remove unnecessary back-off function when retrying page reclaim The backoff mechanism is not needed. If we have MAX_RECLAIM_RETRIES loops without progress, we'll OOM anyway; backing off might cut one or two iterations off that in the rare OOM case. If we have intermittent success reclaiming a few pages, the backoff function gets reset also, and so is of little help in these scenarios. We might want a backoff function for when there IS progress, but not enough to be satisfactory. But this isn't that. Remove it. Link: http://lkml.kernel.org/r/20170228214007.5621-10-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Hillf Danton Acked-by: Michal Hocko Cc: Jia He Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 3db65812d68883d1acfd20a9f2bc2cd13a7cd5c5 Author: Johannes Weiner Date: Wed May 3 14:52:13 2017 -0700 Revert "mm, vmscan: account for skipped pages as a partial scan" This reverts commit d7f05528eedb047efe2288cff777676b028747b6. Now that reclaimability of a node is no longer based on the ratio between pages scanned and theoretically reclaimable pages, we can remove accounting tricks for pages skipped due to zone constraints. Link: http://lkml.kernel.org/r/20170228214007.5621-9-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Hillf Danton Acked-by: Michal Hocko Cc: Jia He Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit c822f6223d03c2c5b026a21da09c6b6d523258cd Author: Johannes Weiner Date: Wed May 3 14:52:10 2017 -0700 mm: delete NR_PAGES_SCANNED and pgdat_reclaimable() NR_PAGES_SCANNED counts number of pages scanned since the last page free event in the allocator. This was used primarily to measure the reclaimability of zones and nodes, and determine when reclaim should give up on them. In that role, it has been replaced in the preceding patches by a different mechanism. Being implemented as an efficient vmstat counter, it was automatically exported to userspace as well. It's however unlikely that anyone outside the kernel is using this counter in any meaningful way. Remove the counter and the unused pgdat_reclaimable(). Link: http://lkml.kernel.org/r/20170228214007.5621-8-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Hillf Danton Acked-by: Michal Hocko Cc: Jia He Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 1 - mm/internal.h | 1 - mm/page_alloc.c | 11 ----------- mm/vmscan.c | 9 --------- mm/vmstat.c | 22 +++------------------- 5 files changed, 3 insertions(+), 41 deletions(-) commit 688035f729dcd9a98152c827338805a061f5c6fa Author: Johannes Weiner Date: Wed May 3 14:52:07 2017 -0700 mm: don't avoid high-priority reclaim on memcg limit reclaim Commit 246e87a93934 ("memcg: fix get_scan_count() for small targets") sought to avoid high reclaim priorities for memcg by forcing it to scan a minimum amount of pages when lru_pages >> priority yielded nothing. This was done at a time when reclaim decisions like dirty throttling were tied to the priority level. Nowadays, the only meaningful thing still tied to priority dropping below DEF_PRIORITY - 2 is gating whether laptop_mode=1 is generally allowed to write. But that is from an era where direct reclaim was still allowed to call ->writepage, and kswapd nowadays avoids writes until it's scanned every clean page in the system. Potential changes to how quick sc->may_writepage could trigger are of little concern. Remove the force_scan stuff, as well as the ugly multi-pass target calculation that it necessitated. Link: http://lkml.kernel.org/r/20170228214007.5621-7-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Hillf Danton Acked-by: Michal Hocko Cc: Jia He Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 94 ++++++++++++++++++++++++------------------------------------- 1 file changed, 37 insertions(+), 57 deletions(-) commit a2d7f8e461881394167bafb616112a96f5f567d0 Author: Johannes Weiner Date: Wed May 3 14:52:03 2017 -0700 mm: don't avoid high-priority reclaim on unreclaimable nodes Commit 246e87a93934 ("memcg: fix get_scan_count() for small targets") sought to avoid high reclaim priorities for kswapd by forcing it to scan a minimum amount of pages when lru_pages >> priority yielded nothing. Commit b95a2f2d486d ("mm: vmscan: convert global reclaim to per-memcg LRU lists"), due to switching global reclaim to a round-robin scheme over all cgroups, had to restrict this forceful behavior to unreclaimable zones in order to prevent massive overreclaim with many cgroups. The latter patch effectively neutered the behavior completely for all but extreme memory pressure. But in those situations we might as well drop the reclaimers to lower priority levels. Remove the check. Link: http://lkml.kernel.org/r/20170228214007.5621-6-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Hillf Danton Acked-by: Michal Hocko Cc: Jia He Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 15038d0de9eca33f66bc1fed4243914906e04de4 Author: Johannes Weiner Date: Wed May 3 14:52:00 2017 -0700 mm: remove unnecessary reclaimability check from NUMA balancing target NUMA balancing already checks the watermarks of the target node to decide whether it's a suitable balancing target. Whether the node is reclaimable or not is irrelevant when we don't intend to reclaim. Link: http://lkml.kernel.org/r/20170228214007.5621-5-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Hillf Danton Acked-by: Michal Hocko Cc: Jia He Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 3 --- 1 file changed, 3 deletions(-) commit 047d72c30eedcb953222810f1e7dcaae663aa452 Author: Johannes Weiner Date: Wed May 3 14:51:57 2017 -0700 mm: remove seemingly spurious reclaimability check from laptop_mode gating Commit 1d82de618ddd ("mm, vmscan: make kswapd reclaim in terms of nodes") allowed laptop_mode=1 to start writing not just when the priority drops to DEF_PRIORITY - 2 but also when the node is unreclaimable. That appears to be a spurious change in this patch as I doubt the series was tested with laptop_mode, and neither is that particular change mentioned in the changelog. Remove it, it's still recent. Link: http://lkml.kernel.org/r/20170228214007.5621-4-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Hillf Danton Acked-by: Mel Gorman Acked-by: Michal Hocko Cc: Jia He Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d450abd81b081d45adb12f303a07dd44b15eb1bc Author: Johannes Weiner Date: Wed May 3 14:51:54 2017 -0700 mm: fix check for reclaimable pages in PF_MEMALLOC reclaim throttling PF_MEMALLOC direct reclaimers get throttled on a node when the sum of all free pages in each zone fall below half the min watermark. During the summation, we want to exclude zones that don't have reclaimables. Checking the same pgdat over and over again doesn't make sense. Fixes: 599d0c954f91 ("mm, vmscan: move LRU lists to node") Link: http://lkml.kernel.org/r/20170228214007.5621-3-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Hillf Danton Acked-by: Michal Hocko Cc: Jia He Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c73322d098e4b6f5f0f0fa1330bf57e218775539 Author: Johannes Weiner Date: Wed May 3 14:51:51 2017 -0700 mm: fix 100% CPU kswapd busyloop on unreclaimable nodes Patch series "mm: kswapd spinning on unreclaimable nodes - fixes and cleanups". Jia reported a scenario in which the kswapd of a node indefinitely spins at 100% CPU usage. We have seen similar cases at Facebook. The kernel's current method of judging its ability to reclaim a node (or whether to back off and sleep) is based on the amount of scanned pages in proportion to the amount of reclaimable pages. In Jia's and our scenarios, there are no reclaimable pages in the node, however, and the condition for backing off is never met. Kswapd busyloops in an attempt to restore the watermarks while having nothing to work with. This series reworks the definition of an unreclaimable node based not on scanning but on whether kswapd is able to actually reclaim pages in MAX_RECLAIM_RETRIES (16) consecutive runs. This is the same criteria the page allocator uses for giving up on direct reclaim and invoking the OOM killer. If it cannot free any pages, kswapd will go to sleep and leave further attempts to direct reclaim invocations, which will either make progress and re-enable kswapd, or invoke the OOM killer. Patch #1 fixes the immediate problem Jia reported, the remainder are smaller fixlets, cleanups, and overall phasing out of the old method. Patch #6 is the odd one out. It's a nice cleanup to get_scan_count(), and directly related to #5, but in itself not relevant to the series. If the whole series is too ambitious for 4.11, I would consider the first three patches fixes, the rest cleanups. This patch (of 9): Jia He reports a problem with kswapd spinning at 100% CPU when requesting more hugepages than memory available in the system: $ echo 4000 >/proc/sys/vm/nr_hugepages top - 13:42:59 up 3:37, 1 user, load average: 1.09, 1.03, 1.01 Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.0 us, 12.5 sy, 0.0 ni, 85.5 id, 2.0 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem: 31371520 total, 30915136 used, 456384 free, 320 buffers KiB Swap: 6284224 total, 115712 used, 6168512 free. 48192 cached Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 76 root 20 0 0 0 0 R 100.0 0.000 217:17.29 kswapd3 At that time, there are no reclaimable pages left in the node, but as kswapd fails to restore the high watermarks it refuses to go to sleep. Kswapd needs to back away from nodes that fail to balance. Up until commit 1d82de618ddd ("mm, vmscan: make kswapd reclaim in terms of nodes") kswapd had such a mechanism. It considered zones whose theoretically reclaimable pages it had reclaimed six times over as unreclaimable and backed away from them. This guard was erroneously removed as the patch changed the definition of a balanced node. However, simply restoring this code wouldn't help in the case reported here: there *are* no reclaimable pages that could be scanned until the threshold is met. Kswapd would stay awake anyway. Introduce a new and much simpler way of backing off. If kswapd runs through MAX_RECLAIM_RETRIES (16) cycles without reclaiming a single page, make it back off from the node. This is the same number of shots direct reclaim takes before declaring OOM. Kswapd will go to sleep on that node until a direct reclaimer manages to reclaim some pages, thus proving the node reclaimable again. [hannes@cmpxchg.org: check kswapd failure against the cumulative nr_reclaimed count] Link: http://lkml.kernel.org/r/20170306162410.GB2090@cmpxchg.org [shakeelb@google.com: fix condition for throttle_direct_reclaim] Link: http://lkml.kernel.org/r/20170314183228.20152-1-shakeelb@google.com Link: http://lkml.kernel.org/r/20170228214007.5621-2-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Signed-off-by: Shakeel Butt Reported-by: Jia He Tested-by: Jia He Acked-by: Michal Hocko Acked-by: Hillf Danton Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 2 ++ mm/internal.h | 6 ++++++ mm/page_alloc.c | 9 ++------- mm/vmscan.c | 47 ++++++++++++++++++++++++++++++++--------------- mm/vmstat.c | 2 +- 5 files changed, 43 insertions(+), 23 deletions(-) commit a87c75fbcc8dc8466be6c4b18a45bcaf315883ab Author: Greg Thelen Date: Wed May 3 14:51:47 2017 -0700 slab: avoid IPIs when creating kmem caches Each slab kmem cache has per cpu array caches. The array caches are created when the kmem_cache is created, either via kmem_cache_create() or lazily when the first object is allocated in context of a kmem enabled memcg. Array caches are replaced by writing to /proc/slabinfo. Array caches are protected by holding slab_mutex or disabling interrupts. Array cache allocation and replacement is done by __do_tune_cpucache() which holds slab_mutex and calls kick_all_cpus_sync() to interrupt all remote processors which confirms there are no references to the old array caches. IPIs are needed when replacing array caches. But when creating a new array cache, there's no need to send IPIs because there cannot be any references to the new cache. Outside of memcg kmem accounting these IPIs occur at boot time, so they're not a problem. But with memcg kmem accounting each container can create kmem caches, so the IPIs are wasteful. Avoid unnecessary IPIs when creating array caches. Test which reports the IPI count of allocating slab in 10000 memcg: import os def ipi_count(): with open("/proc/interrupts") as f: for l in f: if 'Function call interrupts' in l: return int(l.split()[1]) def echo(val, path): with open(path, "w") as f: f.write(val) n = 10000 os.chdir("/mnt/cgroup/memory") pid = str(os.getpid()) a = ipi_count() for i in range(n): os.mkdir(str(i)) echo("1G\n", "%d/memory.limit_in_bytes" % i) echo("1G\n", "%d/memory.kmem.limit_in_bytes" % i) echo(pid, "%d/cgroup.procs" % i) open("/tmp/x", "w").close() os.unlink("/tmp/x") b = ipi_count() print "%d loops: %d => %d (+%d ipis)" % (n, a, b, b-a) echo(pid, "cgroup.procs") for i in range(n): os.rmdir(str(i)) patched: 10000 loops: 1069 => 1170 (+101 ipis) unpatched: 10000 loops: 1192 => 48933 (+47741 ipis) Link: http://lkml.kernel.org/r/20170416214544.109476-1-gthelen@google.com Signed-off-by: Greg Thelen Acked-by: Joonsoo Kim Acked-by: David Rientjes Cc: Christoph Lameter Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit d47736fafe779f0843e2d766f76832dec5b672d9 Author: Geliang Tang Date: Wed May 3 14:51:44 2017 -0700 fs/ocfs2/cluster: use offset_in_page() macro Use offset_in_page() macro instead of open-coding. Link: http://lkml.kernel.org/r/4dbc77ccaaed98b183cf4dba58a4fa325fd65048.1492758503.git.geliangtang@gmail.com Signed-off-by: Geliang Tang Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/cluster/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33496c3c3d7b88dcbe5e55aa01288b05646c6aca Author: Junxiao Bi Date: Wed May 3 14:51:41 2017 -0700 ocfs2: o2hb: revert hb threshold to keep compatible Configfs is the interface for ocfs2-tools to set configure to kernel and $configfs_dir/cluster/$clustername/heartbeat/dead_threshold is the one used to configure heartbeat dead threshold. Kernel has a default value of it but user can set O2CB_HEARTBEAT_THRESHOLD in /etc/sysconfig/o2cb to override it. Commit 45b997737a80 ("ocfs2/cluster: use per-attribute show and store methods") changed heartbeat dead threshold name while ocfs2-tools did not, so ocfs2-tools won't set this configurable and the default value is always used. So revert it. Fixes: 45b997737a80 ("ocfs2/cluster: use per-attribute show and store methods") Link: http://lkml.kernel.org/r/1490665245-15374-1-git-send-email-junxiao.bi@oracle.com Signed-off-by: Junxiao Bi Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/cluster/heartbeat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 667b8a37f34b39f752f59f4808762bd5c7688a71 Author: Geliang Tang Date: Wed May 3 14:51:38 2017 -0700 fs/ocfs2/cluster: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Link: http://lkml.kernel.org/r/5e75bf07beb91e092d5aa36c36769949a480456a.1489060564.git.geliangtang@gmail.com Signed-off-by: Geliang Tang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/cluster/tcp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit accce8e7e8b769ec2430bc0f4a8a2b23c68c1837 Author: Masahiro Yamada Date: Wed May 3 14:51:35 2017 -0700 blackfin: bf609: let clk_disable() return immediately if clk is NULL In many of clk_disable() implementations, it is a no-op for a NULL pointer input, but this is one of the exceptions. Making it treewide consistent will allow clock consumers to call clk_disable() without NULL pointer check. Link: http://lkml.kernel.org/r/1490692624-11931-4-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Cc: Stephen Boyd Cc: Ralf Baechle Cc: Michael Turquette Cc: Steven Miao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/blackfin/mach-bf609/clock.c | 3 +++ 1 file changed, 3 insertions(+) commit 672934d2470133b94df26dd3e4e3f26fbd74ff11 Author: Colin Ian King Date: Wed May 3 14:51:32 2017 -0700 scripts/spelling.txt: add several more common spelling mistakes Here are some of the more common spelling mistakes that I've found while fixing up spelling mistakes in kernel error message text. They probably should be added to this list so we don't keep on seeing them appearing again. Link: http://lkml.kernel.org/r/20170421122534.5378-1-colin.king@canonical.com Signed-off-by: Colin Ian King Acked-by: Kees Cook Cc: Masahiro Yamada Cc: Joe Perches Cc: Stephen Boyd Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/spelling.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 6a5cd60ba84723c3f6cdb8dbe26a1dc9e26a0a02 Author: Pankaj Gupta Date: Wed May 3 14:51:28 2017 -0700 lib/dma-debug.c: make locking work for RT Interrupt enable/disabled with spinlock is not a valid operation for RT as it can make executing tasks sleep from a non-sleepable context. So convert it to spin_lock_irq[save, restore]. Link: http://lkml.kernel.org/r/1492065666-3816-1-git-send-email-pagupta@redhat.com Signed-off-by: Pankaj Gupta Cc: Ingo Molnar Cc: Niklas Söderlund Cc: Vinod Koul Cc: Andy Lutomirski Cc: Ville Syrjl Cc: Miles Chen Cc: Marcelo Tosatti Cc: Joerg Roedel Cc: Stanislaw Gruszka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/dma-debug.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit a72d4b97bb83c92a25d3eb21cc36b9bf94077c60 Author: Chao Yu Date: Wed May 3 23:59:13 2017 +0800 f2fs: relocate inode_{,un}lock in F2FS_IOC_SETFLAGS This patch expands cover region of inode->i_rwsem to keep setting flag atomically. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 3adc5fcb7edf5f8dfe8d37dcb50ba6b30077c905 Author: Jan Kara Date: Tue May 2 17:03:47 2017 +0200 f2fs: Make flush bios explicitely sync Commit b685d3d65ac7 "block: treat REQ_FUA and REQ_PREFLUSH as synchronous" removed REQ_SYNC flag from WRITE_{FUA|PREFLUSH|...} definitions. generic_make_request_checks() however strips REQ_FUA and REQ_PREFLUSH flags from a bio when the storage doesn't report volatile write cache and thus write effectively becomes asynchronous which can lead to performance regressions. Fix the problem by making sure all bios which are synchronous are properly marked with REQ_SYNC. Fixes: b685d3d65ac791406e0dfd8779cc9b3707fea5a3 Cc: stable@vger.kernel.org # 4.9+ CC: Jaegeuk Kim CC: linux-f2fs-devel@lists.sourceforge.net Signed-off-by: Jan Kara Acked-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 2 +- fs/f2fs/segment.c | 2 +- fs/f2fs/super.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 5b4236e17cc1bd9fa14b2b0c7a4ae632d41f2e20 Author: Masami Hiramatsu Date: Thu Apr 27 12:15:10 2017 +0900 um: Fix to call read_initrd after init_bootmem Since read_initrd() invokes alloc_bootmem() for allocating memory to load initrd image, it must be called after init_bootmem. This makes read_initrd() called directly from setup_arch() after init_bootmem() and mem_total_pages(). Cc: Fixes: b63236972e1 ("um: Setup physical memory in setup_arch()") Signed-off-by: Masami Hiramatsu Signed-off-by: Richard Weinberger arch/um/kernel/initrd.c | 4 +--- arch/um/kernel/um_arch.c | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) commit 601b7b9147455a4d8d80d04f0e5a1eb222301bbe Author: Matthias Kaehlcke Date: Mon Apr 3 12:54:58 2017 -0700 um: Include kbuild.h instead of duplicating its macros Signed-off-by: Matthias Kaehlcke Reviewed-by: Masahiro Yamada Signed-off-by: Richard Weinberger arch/x86/um/shared/sysdep/kernel-offsets.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 9abc74a22d85ab29cef9896a2582a530da7e79bf Author: Richard Weinberger Date: Sat Apr 1 00:41:57 2017 +0200 um: Fix PTRACE_POKEUSER on x86_64 This is broken since ever but sadly nobody noticed. Recent versions of GDB set DR_CONTROL unconditionally and UML dies due to a heap corruption. It turns out that the PTRACE_POKEUSER was copy&pasted from i386 and assumes that addresses are 4 bytes long. Fix that by using 8 as address size in the calculation. Cc: Reported-by: jie cao Signed-off-by: Richard Weinberger arch/x86/um/ptrace_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bba077066d6d0a135b7be1970691522075bf905 Author: Nikola Kotur Date: Thu Mar 2 14:16:40 2017 +0100 um: Set number of CPUs Define NR_CPUS required by the timer subsystem. Fixes this make warning: scripts/kconfig/conf --oldconfig arch/x86/um/Kconfig kernel/time/Kconfig:155:warning: range is invalid Signed-off-by: Nikola Kotur Signed-off-by: Richard Weinberger arch/um/Kconfig.common | 5 +++++ arch/um/os-Linux/skas/process.c | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) commit ecb6c7435f25d6a11fa9d14f407d00286f9642b9 Author: Richard Weinberger Date: Sun Dec 25 23:11:05 2016 +0100 um: Fix _print_addr() Recent changes to printk() broke UML's stack trace output. Kill the root of the problem by using a single printk() statement. Signed-off-by: Richard Weinberger arch/um/kernel/sysrq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit fe0be23e68200573de027de9b8cc2b27e7fce35e Author: Darrick J. Wong Date: Wed Apr 12 12:26:07 2017 -0700 xfs: reserve enough blocks to handle btree splits when remapping In xfs_reflink_end_cow, we erroneously reserve only enough blocks to handle adding 1 extent. This is problematic if we fragment free space, have to do CoW, and then have to perform multiple bmap btree expansions. Furthermore, the BUI recovery routine doesn't reserve /any/ blocks to handle btree splits, so log recovery fails after our first error causes the filesystem to go down. Therefore, refactor the transaction block reservation macros until we have a macro that works for our deferred (re)mapping activities, and fix both problems by using that macro. With 1k blocks we can hit this fairly often in g/187 if the scratch fs is big enough. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_trans_space.h | 23 +++++++++++++++++------ fs/xfs/xfs_bmap_item.c | 5 ++++- fs/xfs/xfs_reflink.c | 18 ++++++++++++++++-- 3 files changed, 37 insertions(+), 9 deletions(-) commit 1684096b1ed813f621fb6cbd06e72235c1c2a0ca Merge: 16a12fa 24b43c9 Author: Linus Torvalds Date: Wed May 3 12:45:55 2017 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma updates from Doug Ledford: "More exchaustive description of primary updates in this release: - Lots of driver fixes and misc fixes across the board. - I had to base on a net-next tree because the IPoIB Accelorator patches needed it. Unfortunately, it was known to Mellanox that there would need to be an IPoIB accelorator patch to the net tree (which left some functions turned off by an #ifdef construct to avoid warnings about defined but unused functions), then one to the RDMA tree, then a fixup that went back and re-enabled the functions in the net tree and enabled their use in the rdma tree Also, a sparse fix was sent to the net tree after I did my pull, and the fixup patch conflicts quite directly with that sparse fix, so I'm going to submit the fixup patch towards the end of the merge window by itself and based upon your master branch at the time. - Two separate rounds of hfi1 fixes, one that got dropped from last release because it came in just a day or two before the end of the merge window and then the one from this release cycle. Of note is that I now have a third series that just landed from Intel yesterday. It is not included in this pull request, but I may submit it by the end of the week. I'll talk to Intel about improving the timing of thier submissions for my workflow. - Changes to our idr usage in the RDMA subsystem that will tie into our cgroup management and also into the upcoming changes for the RDMA kernel<->userspace API. - Addition of support for a netdev to be tied to an RDMA device at the core level - Addition of the VNIC driver from Intel. While IPoIB provides IP over InfiniBand (and *only* IP, no lower layer protocol headers are allowed or supported), the VNIC driver presents a virtual Ethernet device with support for things like varying Ethertypes, VLANs, priorities and other features of Ethernet. The virtual devices are centrally managed by the OPA fabric manager, making this (for the time being) a strictly OPA specific feature. - Improvements to the On-Demand Paging support in the RDMA subsystem. - Addition of three significant OPA changes. While we added OPA support some time ago (via the hfi1 driver), the RDMA subsystem has so far glossed over the areas where OPA and InfiniBand differ. With this release we are starting to add support for the OPA extensions into the RDMA core in the following area: Extended port information for OPA is now supported, extended Address Handle attributes for OPA are now supported, and extended SA Queries to get OPA specific subnet information is now supported. Concise summary from the tag: - idr usage and locking changes - build fix for hns - ipoib debug path record file fix - hfi1 updates - core RDMA netdev addition - Intel VNIC driver addition - Enhanced accelerators for IPoIB addition - Debug cleanups in cxgb3/4 - Trivial cleanups from SF Markus Elfring - Misc rxe fixes from Mellanox - Misc ipoib fixes from Mellanox - Lots of mlx4/mlx5 changes from Mellanox - Misc fixes across the RDMA subsystem - ODP paging fixes and improvements - qedr updates - hfi1 updates - OPA port info patches - OPA AH patches - OPA SA Query patches" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (191 commits) infiniband: avoid dereferencing uninitialized dst on error path IB/SA: Add OPA addr header IB/mlx5: Add port_xmit_wait to counter registers read IB/ocrdma: fix out of bounds access to local buffer IB/mlx4: Fix incorrect order of formal and actual parameters IB/mlx4: Change flush logic so it adheres to the variable name mlx5: Fix mlx5_ib_map_mr_sg mr length IB/rxe: Don't clamp residual length to mtu IB/SA: Add support to query OPA path records IB/SA: Add OPA path record type IB/SA: Split struct sa_path_rec based on IB and ROCE specific fields IB/SA: Introduce path record specific types IB/SA: Rename ib_sa_path_rec to sa_path_rec IB/CM: Add braces when using sizeof IB/core: Define 'opa' rdma_ah_attr type IB/core: Define 'ib' and 'roce' rdma_ah_attr types IB/core: Use rdma_ah_attr accessor functions IB/core: Add accessor functions for rdma_ah_attr fields IB/PVRDMA: Rename ib_ah_attr related functions IB/mthca: Rename to_ib_ah_attr to to_rdma_ah_attr ... commit 16a12fa9aed176444fc795b09e796be41902bb08 Merge: d25e436 0337966 Author: Linus Torvalds Date: Wed May 3 12:38:20 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input subsystem updates from Dmitry Torokhov: - a big update from Mauro converting input documentation to ReST format - Synaptics PS/2 is now aware of SMBus companion devices, which means that we can now use native RMI4 protocol to handle touchpads, instead of relying on legacy PS/2 mode. - we removed support from BMA180 accelerometer from input devices as it is now handled properly by IIO - update to TSC2007 to corretcly report pressure - other miscellaneous driver fixes. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (152 commits) Input: ar1021_i2c - use BIT to check for a bit Input: twl4030-pwrbutton - use input_set_capability() helper Input: twl4030-pwrbutton - use correct device for irq request Input: ar1021_i2c - enable touch mode during open Input: add uinput documentation dt-bindings: input: add bindings document for ar1021_i2c driver dt-bindings: input: rotary-encoder: fix typo Input: xen-kbdfront - add module parameter for setting resolution ARM: pxa/raumfeld: fix compile error in rotary controller resources Input: xpad - do not suggest writing to Dominic Input: xpad - don't use literal blocks inside footnotes Input: xpad - note that usb/devices is now at /sys/kernel/debug/ Input: docs - freshen up introduction Input: docs - split input docs into kernel- and user-facing Input: docs - note that MT-A protocol is obsolete Input: docs - update joystick documentation a bit Input: docs - remove disclaimer/GPL notice Input: fix "Game console" heading level in joystick documentation Input: rotary-encoder - remove references to platform data from docs Input: move documentation for Amiga CD32 ... commit d25e436c4b68db2895185b24ad1f22499c2f87b0 Merge: a90f0e9 282ec0e Author: Linus Torvalds Date: Wed May 3 12:31:39 2017 -0700 Merge tag 'spi-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "There's quite a lot of small driver specific fixes and enhancements in this release but the main activity has been around the loopback and spidev test drivers which is good to see as it should hopefully help improve the quality of all the drivers as people start to make use of the new code: - Additional tests in the loopback test driver for vmalloc() compatibility and around delays together with fixes for existing tests. - Support for testing continuous data transfer for use in soak testing. - Device property support for board info platforms. - Support for registering empty sets of devices via board info (useful when writing code to enumerate hardware automatically)" * tag 'spi-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (52 commits) spi: cadence: Allow for GPIO pins to be used as chipselects spi-imx: Implements handling of the SPI_READY mode flag. spi: tegra: fix spelling mistake: "trasfer" -> "transfer" spi: spi-ti-qspi: Use bounce buffer if read buffer is not DMA'ble spi: Add can_dma like interface for spi_flash_read spi: dw: Disable clock after unregistering the host spi: double time out tolerance spi: atmel: add deepest PM support to SAMA5D2 spi: atmel: factorize reusable code for SPI controller init spi: orion: add LSB support spi: pl022: don't use uninitialized variable spi: loopback-test: fix spelling mistake: "minimam" -> "minimum" spi: dynamycally allocated message initialization spi: spi-ti-qspi: Remove unused dma_dev variable spi: omap2-mcspi: poll OMAP2_MCSPI_CHSTAT_RXS for PIO transfer spi: spi-ti-qspi: Use dma_engine wrapper for dma memcpy call spi: spidev_test: add option to continuously transfer data spi: loopback-test: fix potential integer overflow on multiple spi: sun6i: update max transfer size reported spi: pl022: Document property values ... commit a90f0e9ebb88ba7b0efea4e7d9defc0c2b96f712 Merge: 14b7307 ae53b5d Author: Linus Torvalds Date: Wed May 3 12:27:53 2017 -0700 Merge tag 'regulator-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "Quite a lot going on with the regulator API for this release, much more in the core than in the drivers for a change: - Fixes for voltage change propagation through dumb power switches. - A notification when regulators are enabled. - A new settling time property for regulators where the time taken to move to a new voltage is not related to the size of the change. - Some reorganization of the Arizona drivers in preparation for sharing the code with the next generation devices they've been integrated with. - Support for newer Freescale chips in the Anatop regulator. - A new driver for voltage controlled regulators to cope with some exciting ChromeOS hardware designs. - Support for Rohm BD9571MWV-M and TI TPS65132" * tag 'regulator-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (51 commits) regulator: Add ROHM BD9571MWV-M PMIC regulator driver regulator: arizona-ldo1: Factor out generic initialization regulator: arizona-ldo1: Make arizona_ldo1 independent of struct arizona regulator: arizona-ldo1: Move pdata into a separate structure regulator: arizona-micsupp: Factor out generic initialization regulator: arizona-micsupp: Make arizona_micsupp independent of struct arizona regulator: arizona-micsupp: Move pdata into a separate structure regulator: arizona: Split KConfig options for LDO1 and MICSUPP regulators regulator: anatop: make regulator name property required regulator: tps65023: Fix inverted core enable logic. regulator: anatop: make sure regulator name is properly defined regulator: core: Allow dummy regulators for supplies regulator: core: Only propagate voltage changes to if it can change voltages regulator: vctrl: Fix out of bounds array access for vctrl->vtable regulator: tps65132: fix platform_no_drv_owner.cocci warnings regulator: tps65132: Fix off-by-one for .max_register setting regulator: anatop: set default voltage selector for pcie regulator: tps65132: add device-tree binding regulator: tps65132: add regulator driver for TI TPS65132 regulator: anatop: remove unneeded name field of struct anatop_regulator ... commit 14b730723aac9cf3ba0a74e830491e9a43bfc80a Merge: d26f552 889ef45 Author: Linus Torvalds Date: Wed May 3 12:18:47 2017 -0700 Merge branch 'i2c/for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wilfram Sang: "I2C has the following updates for you: - an immutable cross-subsystem branch fixing PMIC access on Intel Baytrail - bigger driver updates to the designware, meson, exynos5 drivers - new i2c_acpi_new_device() function to create devices from ACPI - struct i2c_driver has now a flag 'disable_i2c_core_irq_mapping' to allow custom IRQ mapping in case the default does not fit - mux subsystem centralized error messages in its core - new driver for ltc4306 i2c mux - usual set of small updates" * 'i2c/for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (44 commits) i2c: thunderx: Enable HWMON class probing i2c: rcar: clarify PM handling with more comments i2c: rcar: fix resume by always initializing registers before transfer i2c: tegra: fix spelling mistake: "contoller" -> "controller" i2c: exynos5: use core helper to get driver data i2c: exynos5: de-duplicate error logs on clock setup i2c: exynos5: simplify clock frequency handling i2c: exynos5: simplify timings calculation i2c: designware-baytrail: fix potential null pointer dereference on dev i2c: designware: Get selected speed mode sda-hold-time via ACPI [media] cx231xx: stop double error reporting i2c: core: Allow drivers to disable i2c-core irq mapping i2c: core: Add new i2c_acpi_new_device helper function i2c: core: Allow getting ACPI info by index i2c: img-scb: use setup_timer i2c: i2c-scmi: add a MS HID i2c: mux: ltc4306: LTC4306 and LTC4305 I2C multiplexer/switch dt-bindings: i2c: mux: ltc4306: Add dt-bindings for I2C multiplexer/switch i2c: mux: reg: stop double error reporting i2c: mux: pinctrl: stop double error reporting ... commit d26f552ebbfb0f2c7fe712f457a038d60ed73daa Merge: e897f26 ab6241a Author: Linus Torvalds Date: Wed May 3 12:16:25 2017 -0700 Merge tag 'mfd-next-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Drivers: - Freescale MXS Low Resolution ADC - Freescale i.MX23/i.MX28 LRADC touchscreen - Motorola CPCAP Power Button - TI LMU (Lighting Management Unit) - Atmel SMC (Static Memory Controller) New Device Support: - Add support for X-Powers AXP803 to axp20x - Add support for Dialog Semi DA9061 to da9062-core - Add support for Intel Cougar Mountain to lpc_ich - Add support for Intel Gemini Lake to lpc_ich New Functionality: - Add Device Tree support; wm831x-*, axp20x, ti-lmu, da9062, sun4i-gpadc - Add IRQ sense support; motorola-cpcap - Add ACPI support; cros_ec - Add Reset support; altera-a10sr - Add ADC support; axp20x - Add AC Power support; axp20x - Add Runtime PM support; atmel-ebi, exynos-lpass - Add Battery Power Supply support; axp20x - Add Clock support; exynos-lpass, hi655x-pmic Fix-ups: - Implicitly specify required headers; motorola-cpcap, intel_soc_pmic_bxtwc - Add .remove() method; stm32-timers, exynos-lpass - Remove unused code; intel_soc_pmic_core, intel-lpss-acpi, ipaq-micro, atmel-smc, menelaus - Rename variables for clarity; axp20x - Convert pr_warning() to pr_warn(); db8500-prcmu, sta2x11-mfd, twl4030-power - Improve formatting; arizona-core, axp20x - Use raw_spinlock_*() variants; asic3, t7l66xb, tc6393xb - Simplify/refactor code; arizona-core, atmel-ebi - Improve error checking; intel_soc_pmic_core Bug Fixes: - Ensure OMAP3630/3730 boards can successfully reboot; twl4030-power - Correct max-register value; stm32-timers - Extend timeout to account for clock stretching; cros_ec_spi - Use correct IRQ trigger type; motorola-cpcap - Fix bad use of IRQ sense register; motorola-cpcap - Logic error "||" should be "&&"; mxs-lradc-ts" * tag 'mfd-next-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (79 commits) input: touchscreen: mxs-lradc: || vs && typos dt-bindings: Add AXP803's regulator info mfd: axp20x: Support AXP803 variant dt-bindings: Add device tree binding for X-Powers AXP803 PMIC dt-bindings: Make AXP20X compatible strings one per line mfd: intel_soc_pmic_core: Fix unchecked return value mfd: menelaus: Remove obsolete local_irq_disable() and local_irq_enable() mfd: omap-usb-tll: Configure ULPIAUTOIDLE mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode mfd: palmas: Fixed spelling mistake in error message mfd: lpc_ich: Add support for Intel Gemini Lake SoC mfd: hi655x: Add the clock cell to provide WiFi and Bluetooth mfd: intel_soc_pmic: Fix a mess with compilation units mfd: exynos-lpass: Add runtime PM support mfd: exynos-lpass: Add missing remove() function mfd: exynos-lpass: Add support for clocks mfd: exynos-lpass: Remove pad retention control iio: adc: add support for X-Powers AXP20X and AXP22X PMICs ADCs mfd: cpcap: Fix bad use of IRQ sense register mfd: cpcap: Use ack_invert interrupts ... commit e897f267c51812bfecec45771a2d835c1a2bdacf Merge: 221656e e739c5b Author: Linus Torvalds Date: Wed May 3 12:11:44 2017 -0700 Merge tag 'backlight-next-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight update from Lee Jones: "New Arctic Sand ARC2C0608 LED Backlight driver" * tag 'backlight-next-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: Add support for Arctic Sand LED backlight driver chips dt-bindings: backlight: arcxcnn: Supply bindings for Arctic Sand backlight commit 221656e7c4ce342b99c31eca96c1cbb6d1dce45f Merge: 2f34c12 a5c3b32 Author: Linus Torvalds Date: Wed May 3 11:58:59 2017 -0700 Merge tag 'sound-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "It was a relatively calm development cycle, and no scaring changes are seen in both core and driver sides. Here are some highlights: ASoC: - A new API for hooking up jacks more generically and easily - Card longname is set based on DMI for a unique UCM profile - Lots of Intel driver fixes: Atom, Broxton, Skylake and newer chips - New drivers for Cirrus CS35L35, DIO DIO2125, Everest ES7132, HiSilicon hi6210, Maxim MAX98927, MT2701 systems with WM8960, Nuvoton NAU8824, Odroid systems, ST STM32 SAI controllers and x86 systems with DA7213 HD-audio: - Many new quirks to support headset for various devices (mostly ASUS ones) as usual - Support for dual codecs on some Gigabyte mobos and Lenovo laptop - Improvement on PCM position reporting for Skylake and newer FireWire: - New drivers for MOTU and RME Fireface series - Updates for Digidesign Digi00x and TASCAM series - Support for tracepoints Others: - USB-audio: improved support for quirk_alias option - Cleanups, constification allover the places" * tag 'sound-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (299 commits) ASoC: codec: wm8960: Relax bit clock computation when using PLL ASoC: codec: wm9860: avoid maybe-uninitialized warning ASoC: nau8824: leave Class D gain at chip default ASoC: nau8824: rename controls to match DAPM controls ASoC: Intel: Skylake: Return negative error code ASoC: Intel: Skylake: Fix unused variable warning ASoC: Intel: Skylake: fix uninitialized pointer use ASoC: sti: Fix error handling if of_clk_get() fails ASoC: cs4271: configure reset GPIO as output ASoC: dwc: Disallow building designware_pcm as a module ALSA: ali5451: fix spelling mistake in "ali_capture_preapre" ASoC: stm32: add SAI driver ASoC: stm32: add bindings for SAI ASoC: Intel: Skylake: Add loadable module support on KBL platform ASoC: Intel: Skylake: Modify load_lib_ipc arguments for a nowait version ASoC: Intel: Skylake: Register dsp_fw_ops for kabylake ASoC: Intel: Skylake: Modify arguments to reuse module transfer function ASoC: Intel: Skylake: Commonize library load ASoC: Intel: Skylake: Move sst common initialization to a helper function ASoC: nau8824: new driver ... commit 2f34c1231bfc9f2550f934acb268ac7315fb3837 Merge: a3719f3 8b03d1e Author: Linus Torvalds Date: Wed May 3 11:44:24 2017 -0700 Merge tag 'drm-for-v4.12' of git://people.freedesktop.org/~airlied/linux Pull drm u pdates from Dave Airlie: "This is the main drm pull request for v4.12. Apart from two fixes pulls, everything should have been in drm-next for at least 2 weeks. The biggest thing in here is AMD released the public headers for their upcoming VEGA GPUs. These as always are quite a sizeable chunk of header files. They've also added initial non-display support for those GPUs, though they aren't available in production yet. Otherwise it's pretty much normal. New bridge drivers: - megachips-stdpxxxx-ge-b850v3-fw LVDS->DP++ - generic LVDS bridge support. Core: - Displayport link train failure reporting to userspace - debugfs interface cleaned up - subsystem TODO in kerneldoc now - Extended fbdev support (flipping and vblank wait) - drm_platform removed - EDP CRC support in helper - HF-VSDB SCDC support in EDID parser - Lots of code cleanups and header extraction - Thunderbolt external GPU awareness - Atomic helper improvements - Documentation improvements panel: - Sitronix and Samsung new panel support amdgpu: - Preliminary vega10 support - Multi-level page table support - GPU sensor support for userspace - PRT support for sparse buffers - SR-IOV improvements - Non-contig VRAM CPU mapping i915: - Atomic modesetting enabled by default on Gen5+ - LSPCON improvements - Atomic state handling for cdclk - GPU reset improvements - In-kernel unit tests - Geminilake improvements and color manager support - Designware i2c fixes - vblank evasion improvements - Hotplug safe connector iterators - GVT scheduler QoS support - GVT Kabylake support nouveau: - Acceleration support for Pascal (GP10x). - Rearchitecture of code handling proprietary signed firmware - Fix GTX 970 with odd MMU configuration - GP10B support - GP107 acceleration support vmwgfx: - Atomic modesetting support for vmwgfx omapdrm: - Support for render nodes - Refactor omapdss code - Fix some probe ordering issues - Fix too dark RGB565 rendering sunxi: - prelim rework for multiple pipes. mali-dp: - Color management support - Plane scaling - Power management improvements imx-drm: - Prefetch Resolve Engine/Gasket on i.MX6QP - Deferred plane disabling - Separate alpha support mediatek: - Mediatek SoC MT2701 support rcar-du: - Gen3 HDMI support msm: - 4k support for newer chips - OPP bindings for gpu - prep work for per-process pagetables vc4: - HDMI audio support - fixes qxl: - minor fixes. dw-hdmi: - PHY improvements - CSC fixes - Amlogic GX SoC support" * tag 'drm-for-v4.12' of git://people.freedesktop.org/~airlied/linux: (1778 commits) drm/nouveau/fb/gf100-: Fix 32 bit wraparound in new ram detection drm/nouveau/secboot/gm20b: fix the error return code in gm20b_secboot_tegra_read_wpr() drm/nouveau/kms: Increase max retries in scanout position queries. drm/nouveau/bios/bitP: check that table is long enough for optional pointers drm/nouveau/fifo/nv40: no ctxsw for pre-nv44 mpeg engine drm: mali-dp: use div_u64 for expensive 64-bit divisions drm/i915: Confirm the request is still active before adding it to the await drm/i915: Avoid busy-spinning on VLV_GLTC_PW_STATUS mmio drm/i915/selftests: Allocate inode/file dynamically drm/i915: Fix system hang with EI UP masked on Haswell drm/i915: checking for NULL instead of IS_ERR() in mock selftests drm/i915: Perform link quality check unconditionally during long pulse drm/i915: Fix use after free in lpe_audio_platdev_destroy() drm/i915: Use the right mapping_gfp_mask for final shmem allocation drm/i915: Make legacy cursor updates more unsynced drm/i915: Apply a cond_resched() to the saturated signaler drm/i915: Park the signaler before sleeping drm: mali-dp: Check the mclk rate and allow up/down scaling drm: mali-dp: Enable image enhancement when scaling drm: mali-dp: Add plane upscaling support ... commit a3719f34fdb664ffcfaec2160ef20fca7becf2ee Merge: 5133cd7 61a9298 Author: Linus Torvalds Date: Wed May 3 11:35:47 2017 -0700 Merge branch 'generic' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull quota, reiserfs, udf and ext2 updates from Jan Kara: "The branch contains changes to quota code so that it does not modify persistent flags in inode->i_flags (it was the only place in kernel doing that) and handle it inside filesystem's quotaon/off handlers instead. The branch also contains two UDF cleanups, a couple of reiserfs fixes and one fix for ext2 quota locking" * 'generic' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: ext4: Improve comments in ext4_quota_{on|off}() udf: use kmap_atomic for memcpy copying udf: use octal for permissions quota: Remove dquot_quotactl_ops reiserfs: Remove i_attrs_to_sd_attrs() reiserfs: Remove useless setting of i_flags jfs: Remove jfs_get_inode_flags() ext2: Remove ext2_get_inode_flags() ext4: Remove ext4_get_inode_flags() quota: Stop setting IMMUTABLE and NOATIME flags on quota files jfs: Set flags on quota files directly ext2: Set flags on quota files directly reiserfs: Set flags on quota files directly ext4: Set flags on quota files directly reiserfs: Protect dquot_writeback_dquots() by s_umount semaphore reiserfs: Make cancel_old_flush() reliable ext2: Call dquot_writeback_dquots() with s_umount held reiserfs: avoid a -Wmaybe-uninitialized warning commit 1ef97fe4f8abd3317d5c3c860f990e02c2633959 Author: Gerald Schaefer Date: Wed May 3 14:56:02 2017 +0200 brd: fix uninitialized use of brd->dax_dev commit 1647b9b9 "brd: add dax_operations support" introduced the allocation and freeing of a dax_device, but the allocated dax_device is not stored into the brd_device, so brd_del_one() will eventually operate on an uninitialized brd->dax_dev. Fix this by storing the allocated dax_device to brd->dax_dev. Signed-off-by: Gerald Schaefer Signed-off-by: Dan Williams drivers/block/brd.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 65c02a556bc4f374e9002ded1ea11a0263da7b63 Author: Vineet Gupta Date: Wed May 3 11:21:31 2017 -0700 ARCv2: ptrace: provide regset for accumulator/r30 regs Signed-off-by: Vineet Gupta arch/arc/include/uapi/asm/elf.h | 1 + arch/arc/include/uapi/asm/ptrace.h | 5 +++ arch/arc/kernel/ptrace.c | 62 ++++++++++++++++++++++++++++++++++++-- 3 files changed, 65 insertions(+), 3 deletions(-) commit 991c7ed6acca506983c42d51965da8b8f3677682 Author: Vineet Gupta Date: Wed May 3 11:20:15 2017 -0700 elf: Add ARCv2 specific core note section Signed-off-by: Vineet Gupta include/uapi/linux/elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5133cd7518758211e827481e7d5053333bb926f0 Merge: 7b66f13 4ff33aa Author: Linus Torvalds Date: Wed May 3 11:05:15 2017 -0700 Merge branch 'fsnotify' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify updates from Jan Kara: "The branch contains mainly a rework of fsnotify infrastructure fixing a shortcoming that we have waited for response to fanotify permission events with SRCU read lock held and when the process consuming events was slow to respond the kernel has stalled. It also contains several cleanups of unnecessary indirections in fsnotify framework and a bugfix from Amir fixing leakage of kernel internal errno to userspace" * 'fsnotify' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: (37 commits) fanotify: don't expose EOPENSTALE to userspace fsnotify: remove a stray unlock fsnotify: Move ->free_mark callback to fsnotify_ops fsnotify: Add group pointer in fsnotify_init_mark() fsnotify: Drop inode_mark.c fsnotify: Remove fsnotify_find_{inode|vfsmount}_mark() fsnotify: Remove fsnotify_detach_group_marks() fsnotify: Rename fsnotify_clear_marks_by_group_flags() fsnotify: Inline fsnotify_clear_{inode|vfsmount}_mark_group() fsnotify: Remove fsnotify_recalc_{inode|vfsmount}_mask() fsnotify: Remove fsnotify_set_mark_{,ignored_}mask_locked() fanotify: Release SRCU lock when waiting for userspace response fsnotify: Pass fsnotify_iter_info into handle_event handler fsnotify: Provide framework for dropping SRCU lock in ->handle_event fsnotify: Remove special handling of mark destruction on group shutdown fsnotify: Detach mark from object list when last reference is dropped fsnotify: Move queueing of mark for destruction into fsnotify_put_mark() inotify: Do not drop mark reference under idr_lock fsnotify: Free fsnotify_mark_connector when there is no mark attached fsnotify: Lock object list with connector lock ... commit 2719aa217e0d025dbfce74ac777815776ccec072 Author: Jens Axboe Date: Wed May 3 11:08:14 2017 -0600 blk-mq: don't use sync workqueue flushing from drivers A previous commit introduced the sync flush, which we need from internal callers like blk_mq_quiesce_queue(). However, we also call the stop helpers from drivers, particularly from ->queue_rq() when we have to stop processing for a bit. We can't block from those locations, and we don't have to guarantee that we're fully flushed. Fixes: 9f993737906b ("blk-mq: unify hctx delayed_run_work and run_work") Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-mq.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit 7b66f13207e60e7c550af730986e77e38a0c69a3 Merge: d35a878 412445a Author: Linus Torvalds Date: Wed May 3 10:34:03 2017 -0700 Merge tag 'for-4.12/dm-post-merge-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull additional device mapper updates from Mike Snitzer: "Here are some changes from Christoph that needed to be rebased ontop of changes that were already merged into the device mapper tree. In addition, these changes depend on the 'for-4.12/block' changes that you've already merged. - Cleanups to request-based DM and DM multipath from Christoph that prepare for his block core error code type checking improvements" * tag 'for-4.12/dm-post-merge-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm: introduce a new DM_MAPIO_KILL return value dm rq: change ->rq_end_io calling conventions dm mpath: merge do_end_io into multipath_end_io commit d35a878ae1c50977b55e352fd46e36e35add72a0 Merge: e502187 390020a Author: Linus Torvalds Date: Wed May 3 10:31:20 2017 -0700 Merge tag 'for-4.12/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - A major update for DM cache that reduces the latency for deciding whether blocks should migrate to/from the cache. The bio-prison-v2 interface supports this improvement by enabling direct dispatch of work to workqueues rather than having to delay the actual work dispatch to the DM cache core. So the dm-cache policies are much more nimble by being able to drive IO as they see fit. One immediate benefit from the improved latency is a cache that should be much more adaptive to changing workloads. - Add a new DM integrity target that emulates a block device that has additional per-sector tags that can be used for storing integrity information. - Add a new authenticated encryption feature to the DM crypt target that builds on the capabilities provided by the DM integrity target. - Add MD interface for switching the raid4/5/6 journal mode and update the DM raid target to use it to enable aid4/5/6 journal write-back support. - Switch the DM verity target over to using the asynchronous hash crypto API (this helps work better with architectures that have access to off-CPU algorithm providers, which should reduce CPU utilization). - Various request-based DM and DM multipath fixes and improvements from Bart and Christoph. - A DM thinp target fix for a bio structure leak that occurs for each discard IFF discard passdown is enabled. - A fix for a possible deadlock in DM bufio and a fix to re-check the new buffer allocation watermark in the face of competing admin changes to the 'max_cache_size_bytes' tunable. - A couple DM core cleanups. * tag 'for-4.12/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (50 commits) dm bufio: check new buffer allocation watermark every 30 seconds dm bufio: avoid a possible ABBA deadlock dm mpath: make it easier to detect unintended I/O request flushes dm mpath: cleanup QUEUE_IF_NO_PATH bit manipulation by introducing assign_bit() dm mpath: micro-optimize the hot path relative to MPATHF_QUEUE_IF_NO_PATH dm: introduce enum dm_queue_mode to cleanup related code dm mpath: verify __pg_init_all_paths locking assumptions at runtime dm: verify suspend_locking assumptions at runtime dm block manager: remove an unused argument from dm_block_manager_create() dm rq: check blk_mq_register_dev() return value in dm_mq_init_request_queue() dm mpath: delay requeuing while path initialization is in progress dm mpath: avoid that path removal can trigger an infinite loop dm mpath: split and rename activate_path() to prepare for its expanded use dm ioctl: prevent stack leak in dm ioctl call dm integrity: use previously calculated log2 of sectors_per_block dm integrity: use hex2bin instead of open-coded variant dm crypt: replace custom implementation of hex2bin() dm crypt: remove obsolete references to per-CPU state dm verity: switch to using asynchronous hash crypto API dm crypt: use WQ_HIGHPRI for the IO and crypt workqueues ... commit 12c1c2fd780a9a5581105fcb6f251466cf35af2a Merge: 33b88e7 4341ec6 Author: Ingo Molnar Date: Wed May 3 19:28:27 2017 +0200 Merge tag 'perf-core-for-mingo-4.12-20170503' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: Fixes: - Support setting probes in versioned user space symbols, such as pthread_create@@GLIBC_2.1, picking the default one, more work needed to make it possible to set it on the other versions, as the 'perf probe' syntax already uses @ for other purposes. (Paul Clarke) - Do not special case address zero as an error for routines that return addresses (symbol lookup), instead use the return as the success/error indication and pass a pointer to return the address, fixing 'perf test vmlinux' (the one that compares address between vmlinux and kallsyms) on s/390, where the '_text' address is equal to zero (Arnaldo Carvalho de Melo) Infrastructure changes: - More header sanitization, moving stuff out of util.h into more appropriate headers and objects and sometimes creating new ones (Arnaldo Carvalho de Melo) - Refactor a duplicated code for obtaining config file name (Taeung Song) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit e5021876c91dc3894b2174cca8fa797f8e29e7b9 Merge: 46f0537 e265eb3a Author: Linus Torvalds Date: Wed May 3 10:05:38 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD updates from Shaohua Li: - Add Partial Parity Log (ppl) feature found in Intel IMSM raid array by Artur Paszkiewicz. This feature is another way to close RAID5 writehole. The Linux implementation is also available for normal RAID5 array if specific superblock bit is set. - A number of md-cluser fixes and enabling md-cluster array resize from Guoqing Jiang - A bunch of patches from Ming Lei and Neil Brown to rewrite MD bio handling related code. Now MD doesn't directly access bio bvec, bi_phys_segments and uses modern bio API for bio split. - Improve RAID5 IO pattern to improve performance for hard disk based RAID5/6 from me. - Several patches from Song Liu to speed up raid5-cache recovery and allow raid5 cache feature disabling in runtime. - Fix a performance regression in raid1 resync from Xiao Ni. - Other cleanup and fixes from various people. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: (84 commits) md/raid10: skip spare disk as 'first' disk md/raid1: Use a new variable to count flighting sync requests md: clear WantReplacement once disk is removed md/raid1/10: remove unused queue md: handle read-only member devices better. md/raid10: wait up frozen array in handle_write_completed uapi: fix linux/raid/md_p.h userspace compilation error md-cluster: Fix a memleak in an error handling path md: support disabling of create-on-open semantics. md: allow creation of mdNNN arrays via md_mod/parameters/new_array raid5-ppl: use a single mempool for ppl_io_unit and header_page md/raid0: fix up bio splitting. md/linear: improve bio splitting. md/raid5: make chunk_aligned_read() split bios more cleanly. md/raid10: simplify handle_read_error() md/raid10: simplify the splitting of requests. md/raid1: factor out flush_bio_list() md/raid1: simplify handle_read_error(). Revert "block: introduce bio_copy_data_partial" md/raid1: simplify alloc_behind_master_bio() ... commit 5b0ef73c9d19517467e0cb36158164bf097fe148 Author: Jaegeuk Kim Date: Mon May 1 18:13:03 2017 -0700 f2fs: show available_nids in f2fs/status This patch adds an entry in f2fs/status to show # of available nids. Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 5 +++-- fs/f2fs/f2fs.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) commit 1c0f4bf5c3df13da4090a602c377f7d7a3708ce8 Author: Jaegeuk Kim Date: Mon May 1 18:09:44 2017 -0700 f2fs: flush dirty nats periodically This patch flushes dirty nats in order to acquire available nids by writing checkpoint. Otherwise, we can have no chance to get freed nids. Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f43e2ad7bff54f7c82a084a57e5c90da0d3f4d9 Author: Chao Yu Date: Fri Apr 28 13:56:08 2017 +0800 f2fs: introduce CP_TRIMMED_FLAG to avoid unneeded discard Introduce CP_TRIMMED_FLAG to indicate all invalid block were trimmed before umount, so once we do mount with image which contain the flag, we don't record invalid blocks as undiscard one, when fstrim is being triggered, we can avoid issuing redundant discard commands. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 3 +++ fs/f2fs/f2fs.h | 1 + fs/f2fs/segment.c | 28 ++++++++++++++++++++-------- fs/f2fs/super.c | 7 +++++++ include/linux/f2fs_fs.h | 1 + include/trace/events/f2fs.h | 4 +++- 6 files changed, 35 insertions(+), 9 deletions(-) commit c473f1a9658b6c23d576136d5a49b1c731ef1767 Author: Chao Yu Date: Thu Apr 27 20:40:39 2017 +0800 f2fs: allow cpc->reason to indicate more than one reason Change to use different bits of cpc->reason to indicate different status, so cpc->reason can indicate more than one reason. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 14 +++++++------- fs/f2fs/f2fs.h | 16 +++++++--------- fs/f2fs/segment.c | 8 ++++---- 3 files changed, 18 insertions(+), 20 deletions(-) commit 279d6df20c94079d35e012f1602d40c42632e8f3 Author: Hou Pengyang Date: Thu Apr 27 00:17:21 2017 +0800 f2fs: release cp and dnode lock before IPU We don't need to rewrite the page under cp_rwsem and dnode locks. Signed-off-by: Hou Pengyang Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 39 ++++++++++++++++++++++++--------------- fs/f2fs/f2fs.h | 2 +- fs/f2fs/gc.c | 1 + fs/f2fs/segment.c | 1 + 4 files changed, 27 insertions(+), 16 deletions(-) commit 945f8f5f863321de0dc5c13b3d446d4dbf41531e Author: Shuah Khan Date: Tue May 2 11:00:22 2017 -0600 selftests: x86: add missing executables to .gitignore Executables that are common for both x86_32 and x86_64 are missing from .gitignore. Add them. Signed-off-by: Shuah Khan tools/testing/selftests/x86/.gitignore | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit c296cfe26bdd86de6eeefde57d333174ed9574d0 Author: Fred Isaman Date: Tue May 2 16:53:36 2017 -0400 pNFS: Fix NULL dereference in pnfs_generic_alloc_ds_commits Signed-off-by: Fred Isaman Signed-off-by: Trond Myklebust fs/nfs/pnfs_nfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46f0537b1ecf672052007c97f102a7e6bf0791e4 Merge: 0302e28 48d0e02 Author: Linus Torvalds Date: Wed May 3 09:21:59 2017 -0700 Merge branch 'stable-4.12' of git://git.infradead.org/users/pcmoore/audit Pull audit updates from Paul Moore: "Fourteen audit patches for v4.12 that span the full range of fixes, new features, and internal cleanups. We have a patches to move to 64-bit timestamps, convert refcounts from atomic_t to refcount_t, track PIDs using the pid struct instead of pid_t, convert our own private audit buffer cache to a standard kmem_cache, log kernel module names when they are unloaded, and normalize the NETFILTER_PKT to make the userspace folks happier. From a fixes perspective, the most important is likely the auditd connection tracking RCU fix; it was a rather brain dead bug that I'll take the blame for, but thankfully it didn't seem to affect many people (only one report). I think the patch subject lines and commit descriptions do a pretty good job of explaining the details and why the changes are important so I'll point you there instead of duplicating it here; as usual, if you have any questions you know where to find us. We also manage to take out more code than we put in this time, that always makes me happy :)" * 'stable-4.12' of git://git.infradead.org/users/pcmoore/audit: audit: fix the RCU locking for the auditd_connection structure audit: use kmem_cache to manage the audit_buffer cache audit: Use timespec64 to represent audit timestamps audit: store the auditd PID as a pid struct instead of pid_t audit: kernel generated netlink traffic should have a portid of 0 audit: combine audit_receive() and audit_receive_skb() audit: convert audit_watch.count from atomic_t to refcount_t audit: convert audit_tree.count from atomic_t to refcount_t audit: normalize NETFILTER_PKT netfilter: use consistent ipv4 network offset in xt_AUDIT audit: log module name on delete_module audit: remove unnecessary semicolon in audit_watch_handle_event() audit: remove unnecessary semicolon in audit_mark_handle_event() audit: remove unnecessary semicolon in audit_field_valid() commit 0302e28dee643932ee7b3c112ebccdbb9f8ec32c Merge: 89c9fea 8979b02 Author: Linus Torvalds Date: Wed May 3 08:50:52 2017 -0700 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security subsystem updates from James Morris: "Highlights: IMA: - provide ">" and "<" operators for fowner/uid/euid rules KEYS: - add a system blacklist keyring - add KEYCTL_RESTRICT_KEYRING, exposes keyring link restriction functionality to userland via keyctl() LSM: - harden LSM API with __ro_after_init - add prlmit security hook, implement for SELinux - revive security_task_alloc hook TPM: - implement contextual TPM command 'spaces'" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (98 commits) tpm: Fix reference count to main device tpm_tis: convert to using locality callbacks tpm: fix handling of the TPM 2.0 event logs tpm_crb: remove a cruft constant keys: select CONFIG_CRYPTO when selecting DH / KDF apparmor: Make path_max parameter readonly apparmor: fix parameters so that the permission test is bypassed at boot apparmor: fix invalid reference to index variable of iterator line 836 apparmor: use SHASH_DESC_ON_STACK security/apparmor/lsm.c: set debug messages apparmor: fix boolreturn.cocci warnings Smack: Use GFP_KERNEL for smk_netlbl_mls(). smack: fix double free in smack_parse_opts_str() KEYS: add SP800-56A KDF support for DH KEYS: Keyring asymmetric key restrict method with chaining KEYS: Restrict asymmetric key linkage using a specific keychain KEYS: Add a lookup_restriction function for the asymmetric key type KEYS: Add KEYCTL_RESTRICT_KEYRING KEYS: Consistent ordering for __key_link_begin and restrict check KEYS: Add an optional lookup_restriction hook to key_type ... commit 563f40019d16e5299e9edd3eac37846760637076 Author: Josef Bacik Date: Tue Apr 18 16:04:17 2017 -0400 fs: don't set *REFERENCED on single use objects By default we set DCACHE_REFERENCED and I_REFERENCED on any dentry or inode we create. This is problematic as this means that it takes two trips through the LRU for any of these objects to be reclaimed, regardless of their actual lifetime. With enough pressure from these caches we can easily evict our working set from page cache with single use objects. So instead only set *REFERENCED if we've already been added to the LRU list. This means that we've been touched since the first time we were accessed, and so more likely to need to hang out in cache. To illustrate this issue I wrote the following scripts https://github.com/josefbacik/debug-scripts/tree/master/cache-pressure on my test box. It is a single socket 4 core CPU with 16gib of RAM and I tested on an Intel 2tib NVME drive. The cache-pressure.sh script creates a new file system and creates 2 6.5gib files in order to take up 13gib of the 16gib of ram with pagecache. Then it runs a test program that reads these 2 files in a loop, and keeps track of how often it has to read bytes for each loop. On an ideal system with no pressure we should have to read 0 bytes indefinitely. The second thing this script does is start a fs_mark job that creates a ton of 0 length files, putting pressure on the system with slab only allocations. On exit the script prints out how many bytes were read by the read-file program. The results are as follows Without patch: /mnt/btrfs-test/reads/file1: total read during loops 27262988288 /mnt/btrfs-test/reads/file2: total read during loops 27262976000 With patch: /mnt/btrfs-test/reads/file2: total read during loops 18640457728 /mnt/btrfs-test/reads/file1: total read during loops 9565376512 This patch results in a 50% reduction of the amount of pages evicted from our working set. Signed-off-by: Josef Bacik Signed-off-by: Al Viro fs/dcache.c | 4 ++-- fs/inode.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) commit f411af6822182f84834c4881b825dd40534e7fe8 Merge: 4d89ac2 7c3e7de Author: David S. Miller Date: Wed May 3 11:33:06 2017 -0400 Merge branch 'ibmvnic-Updated-reset-handler-andcode-fixes' Nathan Fontenot says: ==================== ibmvnic: Updated reset handler and code fixes This set of patches multiple code fixes and a new rest handler for the ibmvnic driver. In order to implement the new reset handler for the ibmvnic driver resource initialization needed to be moved to its own routine, a state variable is introduced to replace the various is_* flags in the driver, and a new routine to handle the assorted reasons the driver can be reset. v4 updates: Patch 3/11: Corrected trailing whitespace Patch 7/11: Corrected trailing whitespace v3 updates: Patch 10/11: Correct patch subject line to be a description of the patch. v2 updates: Patch 11/11: Use __netif_subqueue_stopped() instead of netif_subqueue_stopped() to avoid possible use of an un-initialized skb variable. ==================== Signed-off-by: David S. Miller commit 7c3e7de3f3a94fa34731f302e2f6606c9adc0f38 Author: Nathan Fontenot Date: Wed May 3 14:05:25 2017 -0400 ibmvnic: Move queue restarting in ibmvnic_tx_complete Restart of the subqueue should occur outside of the loop processing any tx buffers instead of doing this in the middle of the loop. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 94ca305fd85cd052050b19b1762eb14eaa8cdd6a Author: Thomas Falcon Date: Wed May 3 14:05:20 2017 -0400 ibmvnic: Record SKB RX queue during poll Map each RX SKB to the RX queue associated with the driver's RX SCRQ. This should improve the RX CPU load balancing issues seen by the performance team. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 1 + 1 file changed, 1 insertion(+) commit ca05e31674b20904ff86464e475604f1de445365 Author: Nathan Fontenot Date: Wed May 3 14:05:14 2017 -0400 ibmvnic: Continue skb processing after skb completion error There is not a need to stop processing skbs if we encounter a skb that has a receive completion error. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 161b8a813877fb7d3deba6b3bd2731d4f4a75c5e Author: Nathan Fontenot Date: Wed May 3 14:05:08 2017 -0400 ibmvnic: Check for driver reset first in ibmvnic_xmit Move the check for the driver resetting to the first thing in ibmvnic_xmit(). Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 46293b940fede04f90aab18d4bfecc5bd942cf3a Author: Nathan Fontenot Date: Wed May 3 14:05:02 2017 -0400 ibmvnic: Wait for any pending scrqs entries at driver close When closing the ibmvnic driver we need to wait for any pending sub crq entries to ensure they are handled. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 47 ++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 20 deletions(-) commit b41b83e9a784576b2bcc33bce447f7ce78fb265d Author: Nathan Fontenot Date: Wed May 3 14:04:56 2017 -0400 ibmvnic: Clean up tx pools when closing When closing the ibmvnic driver, most notably during the reset path, the tx pools need to be cleaned to ensure there are no hanging skbs that need to be free'ed. The need for this was found during debugging a loss of network traffic after handling a driver reset. The underlying cause was some skbs in the tx pool that were never free'ed. As a result the upper network layers never tried a re-send since it believed the driver still had the skb. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit e0ebe942f42952fb23bb0596f8775e50bed0b341 Author: Nathan Fontenot Date: Wed May 3 14:04:50 2017 -0400 ibmvnic: Whitespace correction in release_rx_pools Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7bac00b4056ab951c377aff99bb91b81890c727 Author: Nathan Fontenot Date: Wed May 3 14:04:44 2017 -0400 ibmvnic: Delete napi's when releasing driver resources The napi structs allocated at drivier initializatio need to be free'ed when releasing the drivers resources. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit ed651a10875f13135a5f59c1bae4d51b377b3925 Author: Nathan Fontenot Date: Wed May 3 14:04:38 2017 -0400 ibmvnic: Updated reset handling The ibmvnic driver has multiple handlers for resetting the driver depending on the reason the reset is needed (failover, lpm, fatal erors,...). All of the reset handlers do essentially the same thing, this patch moves this work to a common reset handler. By doing this we also allow the driver to better handle situations where we can get a reset while handling a reset. The updated reset handling works by adding a reset work item to the list of resets and then scheduling work to perform the reset. This step is necessary because we can receive a reset in interrupt context and we want to handle the reset out of interrupt context. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 413 +++++++++++++++++++++++-------------- drivers/net/ethernet/ibm/ibmvnic.h | 19 +- 2 files changed, 275 insertions(+), 157 deletions(-) commit 90c8014c2be5e5805d972341b40221da4309d564 Author: Nathan Fontenot Date: Wed May 3 14:04:32 2017 -0400 ibmvnic: Replace is_closed with state field Replace the is_closed flag in the ibmvnic adapter strcut with a more comprehensive state field that tracks the current state of the driver. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 20 +++++++++++++------- drivers/net/ethernet/ibm/ibmvnic.h | 12 ++++++++++-- 2 files changed, 23 insertions(+), 9 deletions(-) commit bfc32f297337e86bbf16512ea27dd50dadd5959e Author: Nathan Fontenot Date: Wed May 3 14:04:26 2017 -0400 ibmvnic: Move resource initialization to its own routine Move all of the calls to initialize resources for the driver to a separate routine. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 71 +++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 32 deletions(-) commit 8c64415cc1f5794c02b95dee10084fa8a4ee3cfe Author: David S. Miller Date: Wed May 3 08:28:48 2017 -0700 sparc: Remove redundant tests in boot_flags_init(). The test: *commands && *commands == ' ' is equivalent to: *commands == ' ' Reported-by: David Binderman Signed-off-by: David S. Miller arch/sparc/kernel/setup_32.c | 2 +- arch/sparc/kernel/setup_64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3998e6b87d4258a70df358296d6f1c7234012bfe Author: Rabin Vincent Date: Wed May 3 17:54:01 2017 +0200 CIFS: fix oplock break deadlocks When the final cifsFileInfo_put() is called from cifsiod and an oplock break work is queued, lockdep complains loudly: ============================================= [ INFO: possible recursive locking detected ] 4.11.0+ #21 Not tainted --------------------------------------------- kworker/0:2/78 is trying to acquire lock: ("cifsiod"){++++.+}, at: flush_work+0x215/0x350 but task is already holding lock: ("cifsiod"){++++.+}, at: process_one_work+0x255/0x8e0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock("cifsiod"); lock("cifsiod"); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by kworker/0:2/78: #0: ("cifsiod"){++++.+}, at: process_one_work+0x255/0x8e0 #1: ((&wdata->work)){+.+...}, at: process_one_work+0x255/0x8e0 stack backtrace: CPU: 0 PID: 78 Comm: kworker/0:2 Not tainted 4.11.0+ #21 Workqueue: cifsiod cifs_writev_complete Call Trace: dump_stack+0x85/0xc2 __lock_acquire+0x17dd/0x2260 ? match_held_lock+0x20/0x2b0 ? trace_hardirqs_off_caller+0x86/0x130 ? mark_lock+0xa6/0x920 lock_acquire+0xcc/0x260 ? lock_acquire+0xcc/0x260 ? flush_work+0x215/0x350 flush_work+0x236/0x350 ? flush_work+0x215/0x350 ? destroy_worker+0x170/0x170 __cancel_work_timer+0x17d/0x210 ? ___preempt_schedule+0x16/0x18 cancel_work_sync+0x10/0x20 cifsFileInfo_put+0x338/0x7f0 cifs_writedata_release+0x2a/0x40 ? cifs_writedata_release+0x2a/0x40 cifs_writev_complete+0x29d/0x850 ? preempt_count_sub+0x18/0xd0 process_one_work+0x304/0x8e0 worker_thread+0x9b/0x6a0 kthread+0x1b2/0x200 ? process_one_work+0x8e0/0x8e0 ? kthread_create_on_node+0x40/0x40 ret_from_fork+0x31/0x40 This is a real warning. Since the oplock is queued on the same workqueue this can deadlock if there is only one worker thread active for the workqueue (which will be the case during memory pressure when the rescuer thread is handling it). Furthermore, there is at least one other kind of hang possible due to the oplock break handling if there is only worker. (This can be reproduced without introducing memory pressure by having passing 1 for the max_active parameter of cifsiod.) cifs_oplock_break() can wait indefintely in the filemap_fdatawait() while the cifs_writev_complete() work is blocked: sysrq: SysRq : Show Blocked State task PC stack pid father kworker/0:1 D 0 16 2 0x00000000 Workqueue: cifsiod cifs_oplock_break Call Trace: __schedule+0x562/0xf40 ? mark_held_locks+0x4a/0xb0 schedule+0x57/0xe0 io_schedule+0x21/0x50 wait_on_page_bit+0x143/0x190 ? add_to_page_cache_lru+0x150/0x150 __filemap_fdatawait_range+0x134/0x190 ? do_writepages+0x51/0x70 filemap_fdatawait_range+0x14/0x30 filemap_fdatawait+0x3b/0x40 cifs_oplock_break+0x651/0x710 ? preempt_count_sub+0x18/0xd0 process_one_work+0x304/0x8e0 worker_thread+0x9b/0x6a0 kthread+0x1b2/0x200 ? process_one_work+0x8e0/0x8e0 ? kthread_create_on_node+0x40/0x40 ret_from_fork+0x31/0x40 dd D 0 683 171 0x00000000 Call Trace: __schedule+0x562/0xf40 ? mark_held_locks+0x29/0xb0 schedule+0x57/0xe0 io_schedule+0x21/0x50 wait_on_page_bit+0x143/0x190 ? add_to_page_cache_lru+0x150/0x150 __filemap_fdatawait_range+0x134/0x190 ? do_writepages+0x51/0x70 filemap_fdatawait_range+0x14/0x30 filemap_fdatawait+0x3b/0x40 filemap_write_and_wait+0x4e/0x70 cifs_flush+0x6a/0xb0 filp_close+0x52/0xa0 __close_fd+0xdc/0x150 SyS_close+0x33/0x60 entry_SYSCALL_64_fastpath+0x1f/0xbe Showing all locks held in the system: 2 locks held by kworker/0:1/16: #0: ("cifsiod"){.+.+.+}, at: process_one_work+0x255/0x8e0 #1: ((&cfile->oplock_break)){+.+.+.}, at: process_one_work+0x255/0x8e0 Showing busy workqueues and worker pools: workqueue cifsiod: flags=0xc pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/1 in-flight: 16:cifs_oplock_break delayed: cifs_writev_complete, cifs_echo_request pool 0: cpus=0 node=0 flags=0x0 nice=0 hung=0s workers=3 idle: 750 3 Fix these problems by creating a a new workqueue (with a rescuer) for the oplock break work. Signed-off-by: Rabin Vincent Signed-off-by: Steve French CC: Stable fs/cifs/cifsfs.c | 15 +++++++++++++-- fs/cifs/cifsglob.h | 1 + fs/cifs/misc.c | 2 +- fs/cifs/smb2misc.c | 5 +++-- 4 files changed, 18 insertions(+), 5 deletions(-) commit 6026685de33b0db5b2b6b0e9b41b3a1a3261033c Author: David Disseldorp Date: Wed May 3 17:39:08 2017 +0200 cifs: fix CIFS_ENUMERATE_SNAPSHOTS oops As with 618763958b22, an open directory may have a NULL private_data pointer prior to readdir. CIFS_ENUMERATE_SNAPSHOTS must check for this before dereference. Fixes: 834170c85978 ("Enable previous version support") Signed-off-by: David Disseldorp CC: Stable Signed-off-by: Steve French fs/cifs/ioctl.c | 2 ++ 1 file changed, 2 insertions(+) commit 0e5c795592930d51fd30d53a2e7b73cba022a29b Author: David Disseldorp Date: Wed May 3 17:39:09 2017 +0200 cifs: fix leak in FSCTL_ENUM_SNAPS response handling The server may respond with success, and an output buffer less than sizeof(struct smb_snapshot_array) in length. Do not leak the output buffer in this case. Fixes: 834170c85978 ("Enable previous version support") Signed-off-by: David Disseldorp CC: Stable Signed-off-by: Steve French fs/cifs/smb2ops.c | 1 + 1 file changed, 1 insertion(+) commit 4e335d9e7ddbcf83d03e7fbe65797ebed2272c18 Author: Paolo Bonzini Date: Tue May 2 16:20:18 2017 +0200 Revert "KVM: Support vCPU-based gfn->hva cache" This reverts commit bbd6411513aa8ef3ea02abab61318daf87c1af1e. I've been sitting on this revert for too long and it unfortunately missed 4.11. It's also the reason why I haven't merged ring-based dirty tracking for 4.12. Using kvm_vcpu_memslots in kvm_gfn_to_hva_cache_init and kvm_vcpu_write_guest_offset_cached means that the MSR value can now be used to access SMRAM, simply by making it point to an SMRAM physical address. This is problematic because it lets the guest OS overwrite memory that it shouldn't be able to touch. Cc: stable@vger.kernel.org Fixes: bbd6411513aa8ef3ea02abab61318daf87c1af1e Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 22 ++++++++++++---------- arch/x86/kvm/x86.c | 41 +++++++++++++++++++++-------------------- include/linux/kvm_host.h | 16 ++++++++-------- virt/kvm/kvm_main.c | 34 +++++++++++++++++----------------- 4 files changed, 58 insertions(+), 55 deletions(-) commit ee5f7d79a80550179b258417442b7bdbccaf476a Author: Justin M. Forbes Date: Tue Apr 11 10:34:35 2017 -0500 tools/kvm: fix top level makefile The top level tools/Makefile includes kvm_stat as a target in help, but the actual target is missing. Signed-off-by: Justin M. Forbes Signed-off-by: Paolo Bonzini tools/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit eb77e6b80f3bed262c7773236f0fb84649fd3091 Author: Yazen Ghannam Date: Thu Apr 27 12:11:54 2017 -0500 EDAC, amd64: Fix reporting of Chip Select sizes on Fam17h The wrong index into the csbases/csmasks arrays was being passed to the function to compute the chip select sizes, which resulted in the wrong size being computed. Address that so that the correct values are computed and printed. Also, redo how we calculate the number of pages in a CS row. Reported-by: Benjamin Bennett Signed-off-by: Yazen Ghannam Cc: # 4.10.x Cc: linux-edac Link: http://lkml.kernel.org/r/1493313114-11260-1-git-send-email-Yazen.Ghannam@amd.com [ Remove unneeded integer math comment, minor cleanups. ] Signed-off-by: Borislav Petkov drivers/edac/amd64_edac.c | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) commit 4d89ac2dd559b343dad30a294fb11e0237d697d8 Merge: ab71632 9744a6f Author: David S. Miller Date: Wed May 3 10:11:26 2017 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter/IPVS/OVS fixes for net The following patchset contains a rather large batch of Netfilter, IPVS and OVS fixes for your net tree. This includes fixes for ctnetlink, the userspace conntrack helper infrastructure, conntrack OVS support, ebtables DNAT target, several leaks in error path among other. More specifically, they are: 1) Fix reference count leak in the CT target error path, from Gao Feng. 2) Remove conntrack entry clashing with a matching expectation, patch from Jarno Rajahalme. 3) Fix bogus EEXIST when registering two different userspace helpers, from Liping Zhang. 4) Don't leak dummy elements in the new bitmap set type in nf_tables, from Liping Zhang. 5) Get rid of module autoload from conntrack update path in ctnetlink, we don't need autoload at this late stage and it is happening with rcu read lock held which is not good. From Liping Zhang. 6) Fix deadlock due to double-acquire of the expect_lock from conntrack update path, this fixes a bug that was introduced when the central spinlock got removed. Again from Liping Zhang. 7) Safe ct->status update from ctnetlink path, from Liping. The expect_lock protection that was selected when the central spinlock was removed was not really protecting anything at all. 8) Protect sequence adjustment under ct->lock. 9) Missing socket match with IPv6, from Peter Tirsek. 10) Adjust skb->pkt_type of DNAT'ed frames from ebtables, from Linus Luessing. 11) Don't give up on evaluating the expression on new entries added via dynset expression in nf_tables, from Liping Zhang. 12) Use skb_checksum() when mangling icmpv6 in IPv6 NAT as this deals with non-linear skbuffs. 13) Don't allow IPv6 service in IPVS if no IPv6 support is available, from Paolo Abeni. 14) Missing mutex release in error path of xt_find_table_lock(), from Dan Carpenter. 15) Update maintainers files, Netfilter section. Add Florian to the file, refer to nftables.org and change project status from Supported to Maintained. 16) Bail out on mismatching extensions in element updates in nf_tables. ==================== Signed-off-by: David S. Miller commit 6f63503c8af569fcd60bb27dfe740d13be0030f6 Author: Jens Axboe Date: Tue May 2 09:56:00 2017 -0600 mtip32xx: convert internal commands to regular block infrastructure Get rid of the private end_io handlers and data, and just use the regular block IO path for these requests. This removes a lot of redundant code. Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 198 ++++++-------------------------------- drivers/block/mtip32xx/mtip32xx.h | 10 -- 2 files changed, 30 insertions(+), 178 deletions(-) commit 994ff079e8f6399e1f8cd43141da0f79ce7a179a Author: Jens Axboe Date: Tue May 2 09:53:04 2017 -0600 mtip32xx: cleanup internal tag assumptions We don't decode the internal tag to the proper group or tag indx. This works fine because we have hard wired it as 0 for now, but could break if we get rid of that. Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit ab71632c457269a6f3ec5a233c7a83682ae27019 Author: Geert Uytterhoeven Date: Wed May 3 14:18:43 2017 +0200 netfilter: conntrack: Force inlining of build check to prevent build failure If gcc (e.g. 4.1.2) decides not to inline total_extension_size(), the build will fail with: net/built-in.o: In function `nf_conntrack_init_start': (.text+0x9baf6): undefined reference to `__compiletime_assert_1893' or ERROR: "__compiletime_assert_1893" [net/netfilter/nf_conntrack.ko] undefined! Fix this by forcing inlining of total_extension_size(). Fixes: b3a5db109e0670d6 ("netfilter: conntrack: use u8 for extension sizes again") Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Acked-by: Florian Westphal Signed-off-by: David S. Miller net/netfilter/nf_conntrack_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86f8e247b960d6cf4cad8b65162e73301c5a58ec Author: Geert Uytterhoeven Date: Wed May 3 13:31:04 2017 +0200 test_bpf: Use ULL suffix for 64-bit constants On 32-bit: lib/test_bpf.c:4772: warning: integer constant is too large for ‘unsigned long’ type lib/test_bpf.c:4772: warning: integer constant is too large for ‘unsigned long’ type lib/test_bpf.c:4773: warning: integer constant is too large for ‘unsigned long’ type lib/test_bpf.c:4773: warning: integer constant is too large for ‘unsigned long’ type lib/test_bpf.c:4787: warning: integer constant is too large for ‘unsigned long’ type lib/test_bpf.c:4787: warning: integer constant is too large for ‘unsigned long’ type lib/test_bpf.c:4801: warning: integer constant is too large for ‘unsigned long’ type lib/test_bpf.c:4801: warning: integer constant is too large for ‘unsigned long’ type lib/test_bpf.c:4802: warning: integer constant is too large for ‘unsigned long’ type lib/test_bpf.c:4802: warning: integer constant is too large for ‘unsigned long’ type On 32-bit systems, "long" is only 32-bit. Replace the "UL" suffix by "ULL" to fix this. Fixes: 85f68fe898320575 ("bpf, arm64: implement jiting of BPF_XADD") Signed-off-by: Geert Uytterhoeven Acked-by: Daniel Borkmann Signed-off-by: David S. Miller lib/test_bpf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4c54dc0277d0d55a9248c43aebd31858f926a056 Author: Daniele Palmas Date: Wed May 3 10:30:11 2017 +0200 net: usb: qmi_wwan: add Telit ME910 support This patch adds support for Telit ME910 PID 0x1100. Signed-off-by: Daniele Palmas Acked-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit 37a7fdf2892be124545ddaf99b85de576121476c Author: YueHaibing Date: Wed May 3 15:51:32 2017 +0800 tg3: don't clear stats while tg3_close Now tg3 NIC's stats will be cleared after ifdown/ifup. bond_get_stats traverse its salves to get statistics,cumulative the increment.If a tg3 NIC is added to bonding as a slave,ifdown/ifup will cause bonding's stats become tremendous value (ex.1638.3 PiB) because of negative increment. Fixes: 92feeabf3f67 ("tg3: Save stats across chip resets") Signed-off-by: YueHaibing Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/tg3.c | 4 ---- 1 file changed, 4 deletions(-) commit 1c2dd16add7ebd7fc6a47f21a42f502cfed5ec2f Author: Alexei Starovoitov Date: Tue May 2 21:14:43 2017 -0700 selftests/bpf: get rid of -D__x86_64__ -D__x86_64__ workaround was used to make /usr/include/features.h to follow expected path through the system include headers. This is not portable. Instead define dummy stubs.h which is used by 'clang -target bpf' Fixes: 6882804c916b ("selftests/bpf: add a test for overlapping packet range checks") Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/Makefile | 4 ++-- tools/testing/selftests/bpf/gnu/stubs.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) commit 6ead18fb18c8182a81d70f24942f9547e56a35d2 Author: Yonghong Song Date: Tue May 2 19:58:14 2017 -0700 selftests/bpf: add a test case to check verifier pointer arithmetic With clang/llvm 4.0+, the test case is able to generate the following pattern: .... 440: (b7) r1 = 15 441: (05) goto pc+73 515: (79) r6 = *(u64 *)(r10 -152) 516: (bf) r7 = r10 517: (07) r7 += -112 518: (bf) r2 = r7 519: (0f) r2 += r1 520: (71) r1 = *(u8 *)(r8 +0) 521: (73) *(u8 *)(r2 +45) = r1 .... commit 332270fdc8b6 ("bpf: enhance verifier to understand stack pointer arithmetic") improved verifier to handle such a pattern. This patch adds a C test case to actually generate such a pattern. A dummy tracepoint interface is used to load the program into the kernel. Signed-off-by: Yonghong Song Acked-by: Martin KaFai Lau Acked-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/test_progs.c | 16 ++ tools/testing/selftests/bpf/test_tcp_estats.c | 258 ++++++++++++++++++++++++++ 3 files changed, 275 insertions(+), 1 deletion(-) commit 4d463c4dbc5c1c5d73e488d52faeec05570443a0 Author: Daniel Borkmann Date: Wed May 3 00:39:17 2017 +0200 xdp: use common helper for netlink extended ack reporting Small follow-up to d74a32acd59a ("xdp: use netlink extended ACK reporting") in order to let drivers all use the same NL_SET_ERR_MSG_MOD() helper macro for reporting. This also ensures that we consistently add the driver's prefix for dumping the report in user space to indicate that the error message is driver specific and not coming from core code. Furthermore, NL_SET_ERR_MSG_MOD() now reuses NL_SET_ERR_MSG() and thus makes all macros check the pointer as suggested. References: https://www.spinics.net/lists/netdev/msg433267.html Signed-off-by: Daniel Borkmann Acked-by: Jakub Kicinski Reviewed-by: Johannes Berg Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 4 ++-- drivers/net/virtio_net.c | 8 ++++---- include/linux/netlink.h | 19 ++++++++----------- 3 files changed, 14 insertions(+), 17 deletions(-) commit 6d717134a1a6e1b34a7d0d70e953037bc2642046 Author: David Ahern Date: Tue May 2 14:43:44 2017 -0700 net: ipv6: Do not duplicate DAD on link up Andrey reported a warning triggered by the rcu code: ------------[ cut here ]------------ WARNING: CPU: 1 PID: 5911 at lib/debugobjects.c:289 debug_print_object+0x175/0x210 ODEBUG: activate active (active state 1) object type: rcu_head hint: (null) Modules linked in: CPU: 1 PID: 5911 Comm: a.out Not tainted 4.11.0-rc8+ #271 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 dump_stack+0x192/0x22d lib/dump_stack.c:52 __warn+0x19f/0x1e0 kernel/panic.c:549 warn_slowpath_fmt+0xe0/0x120 kernel/panic.c:564 debug_print_object+0x175/0x210 lib/debugobjects.c:286 debug_object_activate+0x574/0x7e0 lib/debugobjects.c:442 debug_rcu_head_queue kernel/rcu/rcu.h:75 __call_rcu.constprop.76+0xff/0x9c0 kernel/rcu/tree.c:3229 call_rcu_sched+0x12/0x20 kernel/rcu/tree.c:3288 rt6_rcu_free net/ipv6/ip6_fib.c:158 rt6_release+0x1ea/0x290 net/ipv6/ip6_fib.c:188 fib6_del_route net/ipv6/ip6_fib.c:1461 fib6_del+0xa42/0xdc0 net/ipv6/ip6_fib.c:1500 __ip6_del_rt+0x100/0x160 net/ipv6/route.c:2174 ip6_del_rt+0x140/0x1b0 net/ipv6/route.c:2187 __ipv6_ifa_notify+0x269/0x780 net/ipv6/addrconf.c:5520 addrconf_ifdown+0xe60/0x1a20 net/ipv6/addrconf.c:3672 ... Andrey's reproducer program runs in a very tight loop, calling 'unshare -n' and then spawning 2 sets of 14 threads running random ioctl calls. The relevant networking sequence: 1. New network namespace created via unshare -n - ip6tnl0 device is created in down state 2. address added to ip6tnl0 - equivalent to ip -6 addr add dev ip6tnl0 fd00::bb/1 - DAD is started on the address and when it completes the host route is inserted into the FIB 3. ip6tnl0 is brought up - the new fixup_permanent_addr function restarts DAD on the address 4. exit namespace - teardown / cleanup sequence starts - once in a blue moon, lo teardown appears to happen BEFORE teardown of ip6tunl0 + down on 'lo' removes the host route from the FIB since the dst->dev for the route is loobback + host route added to rcu callback list * rcu callback has not run yet, so rt is NOT on the gc list so it has NOT been marked obsolete 5. in parallel to 4. worker_thread runs addrconf_dad_completed - DAD on the address on ip6tnl0 completes - calls ipv6_ifa_notify which inserts the host route All of that happens very quickly. The result is that a host route that has been deleted from the IPv6 FIB and added to the RCU list is re-inserted into the FIB. The exit namespace eventually gets to cleaning up ip6tnl0 which removes the host route from the FIB again, calls the rcu function for cleanup -- and triggers the double rcu trace. The root cause is duplicate DAD on the address -- steps 2 and 3. Arguably, DAD should not be started in step 2. The interface is in the down state, so it can not really send out requests for the address which makes starting DAD pointless. Since the second DAD was introduced by a recent change, seems appropriate to use it for the Fixes tag and have the fixup function only start DAD for addresses in the PREDAD state which occurs in addrconf_ifdown if the address is retained. Big thanks to Andrey for isolating a reliable reproducer for this problem. Fixes: f1705ec197e7 ("net: ipv6: Make address flushing on ifdown optional") Reported-by: Andrey Konovalov Signed-off-by: David Ahern Tested-by: Andrey Konovalov Signed-off-by: David S. Miller net/ipv6/addrconf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f6fec61eb555e47e87234e8915ad726ba6c2d3f8 Author: David Cai Date: Tue May 2 20:59:14 2017 +0000 smsc911x: Adding support for Micochip LAN9250 Ethernet controller Adding support for Microchip LAN9250 Ethernet controller. Signed-off-by: David Cai Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smsc911x.c | 49 ++++++++++++++++++++++-------------- drivers/net/ethernet/smsc/smsc911x.h | 19 ++++++++++++++ 2 files changed, 49 insertions(+), 19 deletions(-) commit 8b8e3ad0c840f64a5de2c292cba33976571b9b73 Merge: 89c9fea 9178b4c Author: David S. Miller Date: Wed May 3 09:30:25 2017 -0400 Merge branch 'sample-bpf-loader-fixes' Jesper Dangaard Brouer says: ==================== Improve bpf ELF-loader under samples/bpf This series improves and fixes bpf ELF loader and programs under samples/bpf. The bpf_load.c created some hard to debug issues when the struct (bpf_map_def) used in the ELF maps section format changed in commit fb30d4b71214 ("bpf: Add tests for map-in-map"). This was hotfixed in commit 409526bea3c3 ("samples/bpf: bpf_load.c detect and abort if ELF maps section size is wrong") by detecting the issue and aborting the program. In most situations the bpf-loader should be able to handle these kind of changes to the struct size. This patch series aim to do proper backward and forward compabilility handling when loading ELF files. This series also adjust the callback that was introduced in commit 9fd63d05f3e8 ("bpf: Allow bpf sample programs (*_user.c) to change bpf_map_def") to use the new bpf_map_data structure, before more users start to use this callback. Hoping these changes can make the merge window, as above mentioned commits have not been merged yet, and it would be good to avoid users hitting these issues. ==================== Acked-by: Daniel Borkmann Signed-off-by: David S. Miller commit 9178b4c17d1b8b21738771d53d999c990e69f538 Author: Jesper Dangaard Brouer Date: Tue May 2 14:32:06 2017 +0200 samples/bpf: export map_data[] for more info on maps Giving *_user.c side tools access to map_data[] provides easier access to information on the maps being loaded. Still provide the guarantee that the order maps are being defined in inside the _kern.c file corresponds with the order in the array. Now user tools are not blind, but can inspect and verify the maps that got loaded from the ELF binary. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller samples/bpf/bpf_load.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 6979bcc731f9680824a85a9efc43f36d01cec1b2 Author: Jesper Dangaard Brouer Date: Tue May 2 14:32:01 2017 +0200 samples/bpf: load_bpf.c make callback fixup more flexible Do this change before others start to use this callback. Change map_perf_test_user.c which seems to be the only user. This patch extends capabilities of commit 9fd63d05f3e8 ("bpf: Allow bpf sample programs (*_user.c) to change bpf_map_def"). Give fixup callback access to struct bpf_map_data, instead of only stuct bpf_map_def. This add flexibility to allow userspace to reassign the map file descriptor. This is very useful when wanting to share maps between several bpf programs. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller samples/bpf/bpf_load.c | 17 ++++++++--------- samples/bpf/bpf_load.h | 10 ++++++++-- samples/bpf/map_perf_test_user.c | 14 +++++++------- 3 files changed, 23 insertions(+), 18 deletions(-) commit 156450d9d964447adfb44a231c634d2f5609d110 Author: Jesper Dangaard Brouer Date: Tue May 2 14:31:56 2017 +0200 samples/bpf: make bpf_load.c code compatible with ELF maps section changes This patch does proper parsing of the ELF "maps" section, in-order to be both backwards and forwards compatible with changes to the map definition struct bpf_map_def, which gets compiled into the ELF file. The assumption is that new features with value zero, means that they are not in-use. For backward compatibility where loading an ELF file with a smaller struct bpf_map_def, only copy objects ELF size, leaving rest of loaders struct zero. For forward compatibility where ELF file have a larger struct bpf_map_def, only copy loaders own struct size and verify that rest of the larger struct is zero, assuming this means the newer feature was not activated, thus it should be safe for this older loader to load this newer ELF file. Fixes: fb30d4b71214 ("bpf: Add tests for map-in-map") Fixes: 409526bea3c3 ("samples/bpf: bpf_load.c detect and abort if ELF maps section size is wrong") Signed-off-by: Jesper Dangaard Brouer Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/bpf_load.c | 224 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 155 insertions(+), 69 deletions(-) commit 55de170382a92d6da6fc9f23efc21eb2f3d25126 Author: Jesper Dangaard Brouer Date: Tue May 2 14:31:50 2017 +0200 samples/bpf: adjust rlimit RLIMIT_MEMLOCK for traceex2, tracex3 and tracex4 Needed to adjust max locked memory RLIMIT_MEMLOCK for testing these bpf samples as these are using more and larger maps than can fit in distro default 64Kbytes limit. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller samples/bpf/tracex2_user.c | 7 +++++++ samples/bpf/tracex3_user.c | 7 +++++++ samples/bpf/tracex4_user.c | 8 ++++++++ 3 files changed, 22 insertions(+) commit 33b88e708e7dfa58dc896da2a98f5719d2eb315c Author: Vince Weaver Date: Tue May 2 14:08:50 2017 -0400 perf/x86: Fix Broadwell-EP DRAM RAPL events It appears as though the Broadwell-EP DRAM units share the special units quirk with Haswell-EP/KNL. Without this patch, you get really high results (a single DRAM using 20W of power). The powercap driver in drivers/powercap/intel_rapl.c already has this change. Signed-off-by: Vince Weaver Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Stephane Eranian Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Cc: Signed-off-by: Ingo Molnar arch/x86/events/intel/rapl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee320b33b4a316e22612ad6409517fc647f2a37c Author: Arnd Bergmann Date: Fri Apr 28 11:44:11 2017 +0200 of: fix uninitialized variable warning for overlay test gcc warns that an empty device tree would cause undefined behavior: drivers/of/unittest.c: In function 'of_unittest': drivers/of/unittest.c:2199:25: warning: 'last_sibling' may be used uninitialized in this function [-Wmaybe-uninitialized] This adds an initialization of the variable to zero, which we handle correctly. Fixes: 81d0848fc8d2 ("of: Add unit tests for applying overlays") Signed-off-by: Arnd Bergmann Signed-off-by: Rob Herring drivers/of/unittest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 700b7eadd5625d22b8235fb21259b3d7d564c000 Author: Nicholas Piggin Date: Wed Apr 19 05:12:17 2017 +1000 powerpc/64s: Power9 has no LPCR[VRMASD] field so don't set it Power9/ISAv3 has no VRMASD field in LPCR, we shouldn't be setting reserved bits, so don't set them on Power9. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/cpu_setup_power.S | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 6b3d12a948d27977816a15eb48409a298902a548 Author: Alistair Popple Date: Wed May 3 13:24:08 2017 +1000 powerpc/powernv: Fix TCE kill on NVLink2 Commit 616badd2fb49 ("powerpc/powernv: Use OPAL call for TCE kill on NVLink2") forced all TCE kills to go via the OPAL call for NVLink2. However the PHB3 implementation of TCE kill was still being called directly from some functions which in some circumstances caused a machine check. This patch adds an equivalent IODA2 version of the function which uses the correct invalidation method depending on PHB model and changes all external callers to use it instead. Fixes: 616badd2fb49 ("powerpc/powernv: Use OPAL call for TCE kill on NVLink2") Cc: stable@vger.kernel.org # v4.11+ Signed-off-by: Alistair Popple Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/npu-dma.c | 8 ++++---- arch/powerpc/platforms/powernv/pci-ioda.c | 10 +++++++++- arch/powerpc/platforms/powernv/pci.h | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) commit 3c9ac2bcc35453141f82461c71ed109ded152a6a Author: Michael Ellerman Date: Tue May 2 21:00:14 2017 +1000 powerpc/mm/radix: Drop support for CPUs without lockless tlbie Currently the radix TLB code includes support for CPUs that do *not* have MMU_FTR_LOCKLESS_TLBIE. On those CPUs we are required to take a global spinlock before issuing a tlbie. Radix can only be built for 64-bit Book3s CPUs, and of those, only POWER4, 970, Cell and PA6T do not have MMU_FTR_LOCKLESS_TLBIE. Although it's possible to build a kernel with Radix support that can also boot on those CPUs, we happen to know that in reality none of those CPUs support the Radix MMU, so the code can never actually run on those CPUs. So remove the native_tlbie_lock in the Radix TLB code. Note that there is another lock of the same name in the hash code, which is unaffected by this patch. Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb-radix.c | 45 +++++++-------------------------------------- 1 file changed, 7 insertions(+), 38 deletions(-) commit 9744a6fcefcb4d56501d69adb04c24559d353cad Author: Pablo Neira Ayuso Date: Mon May 1 12:58:50 2017 +0200 netfilter: nf_tables: check if same extensions are set when adding elements If no NLM_F_EXCL is set and the element already exists in the set, make sure that both elements have the same extensions. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 5 +++++ 1 file changed, 5 insertions(+) commit e3cd7f013bac3105d44b8bd5a90359989d45b5a5 Author: James Hogan Date: Wed May 3 09:54:20 2017 +0100 metag/mm: Drop pointless increment The increment of entry in the loop in mmu_init for meta1 is redundant as it isn't used again, so drop it. Reported-by: David Binderman Signed-off-by: James Hogan arch/metag/mm/mmu-meta1.c | 1 - 1 file changed, 1 deletion(-) commit 4512c7bccb7794fb6d6ff37ae449154413bd4963 Author: Paul Gortmaker Date: Tue May 2 18:21:12 2017 -0400 soc/qbman: Fix implicit header dependency now causing build fails In commit 461a6946b1f9 ("iommu: Remove pci.h include from trace/events/iommu.h") that header shuffle uncovered an implicit include in this driver, manifesting as: CC drivers/soc/fsl/qbman/qman_portal.o drivers/soc/fsl/qbman/qman_portal.c: In function 'qman_portal_probe': drivers/soc/fsl/qbman/qman_portal.c:299:2: error: implicit declaration of function 'dma_set_mask' drivers/soc/fsl/qbman/qman_portal.c:299:2: error: implicit declaration of function 'DMA_BIT_MASK' if (dma_set_mask(dev, DMA_BIT_MASK(40))) { ^ on the corenet32_smp_defconfig (and 64 bit respectively.) The above commit was singled out via git bisect. The header it was implictly relying on getting was dma-mapping.h - so we explicitly add it here. Fixes: 461a6946b1f9 ("iommu: Remove pci.h include from trace/events/iommu.h") Cc: Joerg Roedel Cc: Scott Wood Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Paul Gortmaker Signed-off-by: Joerg Roedel drivers/soc/fsl/qbman/qman_portal.c | 2 ++ 1 file changed, 2 insertions(+) commit db55947dd2d09cd3e6f722d1205934fec793ee63 Author: Heiko Carstens Date: Tue May 2 13:20:11 2017 +0200 s390/uprobes: fix compile for !KPROBES Fix the following compile error(s) if CONFIG_KPROBES is disabled: arch/s390/kernel/uprobes.c:79:14: error: implicit declaration of function 'probe_get_fixup_type' arch/s390/kernel/uprobes.c:87:14: error: 'FIXUP_PSW_NORMAL' undeclared (first use in this function) Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/dis.h | 2 ++ arch/s390/include/asm/kprobes.h | 20 ++++++++++---------- arch/s390/lib/probes.c | 1 + 3 files changed, 13 insertions(+), 10 deletions(-) commit 085b6ba0f7971d18fc3078b25e8309e9e75659cb Author: Heiko Carstens Date: Tue May 2 12:38:57 2017 +0200 s390/ftrace: fix compile for !MODULES Fix this compile error if CONFIG_MODULES is disabled: arch/s390/built-in.o: In function `ftrace_plt_init': arch/s390/kernel/ftrace.o:(.init.text+0x34cc): undefined reference to `module_alloc' Reported-by: Rob Landley Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/ftrace.c | 4 ++++ 1 file changed, 4 insertions(+) commit 07a63cbe8bcb6ba72fb989dcab1ec55ec6c36c7e Author: Martin Schwidefsky Date: Tue May 2 13:36:00 2017 +0200 s390/cputime: fix incorrect system time git commit c5328901aa1db134 "[S390] entry[64].S improvements" removed the update of the exit_timer lowcore field from the critical section cleanup of the .Lsysc_restore/.Lsysc_done and .Lio_restore/.Lio_done blocks. If the PSW is updated by the critical section cleanup to point to user space again, the interrupt entry code will do a vtime calculation after the cleanup completed with an exit_timer value which has *not* been updated. Due to this incorrect system time deltas are calculated. If an interrupt occured with an old PSW between .Lsysc_restore/.Lsysc_done or .Lio_restore/.Lio_done update __LC_EXIT_TIMER with the system entry time of the interrupt. Cc: stable@vger.kernel.org # 3.3+ Tested-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky arch/s390/kernel/entry.S | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 028d5bf161d11b6cab9f2d0ad076cccd1d8495bc Author: Masahiro Yamada Date: Wed Apr 12 08:36:32 2017 +0900 ia64: beatify build log for gate.so and gate-syms.o Currently, the object path is not aligned in the build log: LDS arch/ia64/kernel/gate.lds AS arch/ia64/kernel/gate.o GATE arch/ia64/kernel/gate.so AS arch/ia64/kernel/gate-data.o Signed-off-by: Masahiro Yamada arch/ia64/kernel/Makefile.gate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20652ed6e44f4963281b65209b917be86ac6765b Merge: b5fe223 933dfbd Author: Ingo Molnar Date: Wed May 3 08:00:14 2017 +0200 Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull RCU fixes from Paul E. McKenney: "This series adds a pair of commits that move function definitions from include/linux/rcu_segcblist.h to new kernel/rcu/rcu_segcblist.h and kernel/rcu/rcu_segcblist.c files, thus greatly decreasing the size of the externally visible include/linux/rcu_segcblist.h file." Signed-off-by: Ingo Molnar commit 3eec0291830e4c28d09f73bab247f3b59172022b Author: Masahiro Yamada Date: Sun Sep 11 16:42:16 2016 +0900 alpha: make short build log available for division routines This enables the Kbuild standard log style as follows: AS arch/alpha/lib/__divlu.o AS arch/alpha/lib/__divqu.o AS arch/alpha/lib/__remlu.o AS arch/alpha/lib/__remqu.o Signed-off-by: Masahiro Yamada arch/alpha/lib/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e19a4e3f1bffe45b8e2ea67fcfb0c9c88278c4cc Author: Masahiro Yamada Date: Sun Sep 11 16:42:15 2016 +0900 alpha: merge build rules of division routines These four objects are generated by the same build rule, with different compile options. The build rules can be merged. Signed-off-by: Masahiro Yamada arch/alpha/lib/Makefile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 5ed78e5523fd9ba77b8444d380d54da1f88c53fc Author: Masahiro Yamada Date: Sun Sep 11 16:42:14 2016 +0900 alpha: add $(src)/ rather than $(obj)/ to make source file path $(ev6-y)divide.S is a source file, not a build-time generated file. So, it should be prefixed with $(src)/ rather than $(obj)/. Signed-off-by: Masahiro Yamada arch/alpha/lib/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3dbd8204af48d0da442f11ad39aa778a5fd462bf Author: Boris Ostrovsky Date: Tue May 2 13:23:06 2017 -0400 xen: Move xen_have_vector_callback definition to enlighten.c Commit 84d582d236dc ("xen: Revert commits da72ff5bfcb0 and 72a9b186292d") defined xen_have_vector_callback in enlighten_hvm.c. Since guest-type-neutral code refers to this variable this causes build failures when CONFIG_XEN_PVHVM is not defined. Moving xen_have_vector_callback definition to enlighten.c resolves this issue. Signed-off-by: Boris Ostrovsky Reported-by: Randy Dunlap Acked-by: Randy Dunlap Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/enlighten.c | 3 +++ arch/x86/xen/enlighten_hvm.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) commit d93b0ac01a9ce276ec39644be47001873d3d183c Author: Mahesh Salgaonkar Date: Tue Apr 18 22:08:17 2017 +0530 powerpc/book3s/mce: Move add_taint() later in virtual mode machine_check_early() gets called in real mode. The very first time when add_taint() is called, it prints a warning which ends up calling opal call (that uses OPAL_CALL wrapper) for writing it to console. If we get a very first machine check while we are in opal we are doomed. OPAL_CALL overwrites the PACASAVEDMSR in r13 and in this case when we are done with MCE handling the original opal call will use this new MSR on it's way back to opal_return. This usually leads to unexpected behaviour or the kernel to panic. Instead move the add_taint() call later in the virtual mode where it is safe to call. This is broken with current FW level. We got lucky so far for not getting very first MCE hit while in OPAL. But easily reproducible on Mambo. Fixes: 27ea2c420cad ("powerpc: Set the correct kernel taint on machine check errors.") Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman arch/powerpc/kernel/mce.c | 2 ++ arch/powerpc/kernel/traps.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit 3f2290e1b5192fdfa74f012220a8d90067beb076 Author: Michael Ellerman Date: Mon Apr 24 20:46:59 2017 +1000 powerpc/sysfs: Move #ifdef CONFIG_HOTPLUG_CPU out of the function body The entire body of unregister_cpu_online() is inside an #ifdef CONFIG_HOTPLUG_CPU block. This is ugly and means we create an empty function when hotplug is disabled for no reason. Instead move the #ifdef out of the function body and define the function to be NULL in the else case. This means we'll pass NULL to cpuhp_setup_state(), but that's fine because it accepts NULL to mean there is no teardown callback, which is exactly what we want. Signed-off-by: Michael Ellerman arch/powerpc/kernel/sysfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 687b8f24f14db842c8c3f8cb8b24c9a29b691db8 Author: Michael Ellerman Date: Wed Feb 15 20:49:54 2017 +1100 powerpc/smp: Document irq enable/disable after migrating IRQs This code was until recently completely undocumented and even now the comment is not very verbose. We've already had one patch sent to remove the IRQ enable/disable because it's "paradoxical and unnecessary". So document it thoroughly to save anyone else from puzzling over it. Signed-off-by: Michael Ellerman arch/powerpc/kernel/smp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 0cc68bfad45b47167c9d99cf560b505983ebd012 Author: Michael Ellerman Date: Fri Feb 17 17:31:22 2017 +1100 powerpc/mpc52xx: Don't select user-visible RTAS_PROC Otherwise we might select it when its dependenices aren't enabled, leading to a build break. It's default y anyway, so will be on unless someone disables it manually. Signed-off-by: Michael Ellerman arch/powerpc/platforms/52xx/Kconfig | 1 - 1 file changed, 1 deletion(-) commit b7da1230532984fc00962b2c8be94acc87655707 Author: Andrew Donnellan Date: Fri Jul 22 17:16:35 2016 +1000 powerpc/powernv: Document cxl dependency on special case in pnv_eeh_reset() pnv_eeh_reset() has special handling for PEs whose primary bus is the root bus or the bus immediately underneath the root port. The cxl bi-modal card support added in b0b5e5918ad1 ("cxl: Add cxl_check_and_switch_mode() API to switch bi-modal cards") relies on this behaviour when hot-resetting the CAPI adapter following a mode switch. Document this in pnv_eeh_reset() so we don't accidentally break it. Suggested-by: Gavin Shan Signed-off-by: Andrew Donnellan Reviewed-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/eeh-powernv.c | 7 +++++++ 1 file changed, 7 insertions(+) commit bd74370b8657fc6fdab7b0d5024d011985183809 Author: Rabin Vincent Date: Sun Apr 30 18:16:00 2017 +0200 Makefile: evaluate LDFLAGS_BUILD_ID only once Evaluate LDFLAGS_BUILD_ID (which involves invoking the compiler) only once instead of over and over. This provides a ~20% reduction in null build time with x86 allnoconfig: $ make allnoconfig && make -j8 $ perf stat -r5 -e sched:sched_process_exec make -j8 - 2 119 sched:sched_process_exec + 1 878 sched:sched_process_exec - 1,238817018 seconds time elapsed + 0,971020553 seconds time elapsed Signed-off-by: Rabin Vincent Signed-off-by: Masahiro Yamada Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8a3118e1f5cbe0c26704419390bf074689b349f Author: Jiri Slaby Date: Fri Apr 21 17:16:20 2017 +0200 objtool: make it visible in make V=1 output It is currently impossible to see what is going on with objtool when building, so call echo-cmd to see the actions: gcc -Wp,-MD,arch/x86/entry/.entry_64.o.d -nostdinc -isystem ... ./tools/objtool/objtool check "arch/x86/entry/entry_64.o"; Signed-off-by: Jiri Slaby Cc: Michal Marek Cc: linux-kbuild@vger.kernel.org Cc: Josh Poimboeuf Signed-off-by: Masahiro Yamada scripts/Makefile.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9a744b92da6eacea33dec1e9280fd324736bfe81 Author: Chao Yu Date: Wed Apr 26 17:39:55 2017 +0800 f2fs: shrink size of struct discard_cmd In order to shrink size of struct discard_cmd, change variable type of @state in struct discard_cmd from int to unsigned char. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec9895add2c519681c45a8599262d1d9b4986349 Author: Chao Yu Date: Wed Apr 26 17:39:54 2017 +0800 f2fs: don't hold cmd_lock during waiting discard command Previously, with protection of cmd_lock, we will wait for end io of discard command which potentially may lead long latency, making worse concurrency. So, in this patch, we try to add reference into discard entry to prevent the entry being released by other thread, then we can avoid holding global cmd_lock during waiting discard to finish. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 1 + fs/f2fs/segment.c | 25 ++++++++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) commit 4d9780781304af0a57b6e369ce353f7bd2fb5e52 Author: Jaegeuk Kim Date: Wed Apr 26 11:11:12 2017 -0700 f2fs: nullify fio->encrypted_page for each writes This makes sure each write request has nullified encrypted_page pointer. Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9dd46188edc2f0d1f37328637860bb65a771124 Author: Jin Qian Date: Tue Apr 25 16:28:48 2017 -0700 f2fs: sanity check segment count F2FS uses 4 bytes to represent block address. As a result, supported size of disk is 16 TB and it equals to 16 * 1024 * 1024 / 2 segments. Signed-off-by: Jin Qian Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 7 +++++++ include/linux/f2fs_fs.h | 6 ++++++ 2 files changed, 13 insertions(+) commit a817737e87d506ea7b3983d287b4578c99922d85 Author: Jaegeuk Kim Date: Mon Apr 24 15:20:16 2017 -0700 f2fs: introduce valid_ipu_blkaddr to clean up This patch introduces valid_ipu_blkaddr to clean up checking block address for inplace-update. Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit e959c8f543e11dadf7f6923427fb3acb452a0de6 Author: Hou Pengyang Date: Tue Apr 25 12:45:13 2017 +0000 f2fs: lookup extent cache first under IPU scenario If a page is cold, NOT atomit written and need_ipu now, there is a high probability that IPU should be adapted. For IPU, we try to check extent tree to get the block index first, instead of reading the dnode page, where may lead to an useless dnode IO, since no need to update the dnode index for IPU. Signed-off-by: Hou Pengyang Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 16 ++++++++++++++-- fs/f2fs/gc.c | 1 + fs/f2fs/segment.c | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) commit 7eab0c0df8d1a8c460f7d660d3ffd06fd448e590 Author: Hou Pengyang Date: Tue Apr 25 12:45:12 2017 +0000 f2fs: reconstruct code to write a data page This patch introduces encrypt_one_page which encrypts one data page before submit_bio, and change the use of need_inplace_update. Signed-off-by: Hou Pengyang Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 81 ++++++++++++++++++++++++++++++++++--------------------- fs/f2fs/file.c | 4 +-- fs/f2fs/segment.h | 6 +---- 3 files changed, 54 insertions(+), 37 deletions(-) commit 63a94fa1d79dfbb94a2c923f8810e3b45b27570e Author: Chao Yu Date: Tue Apr 25 20:21:38 2017 +0800 f2fs: introduce __wait_discard_cmd Just cleanup, no logic change. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) commit bd5b07383a9057f9b6aefad6c784af95ffde8a67 Author: Chao Yu Date: Tue Apr 25 20:21:37 2017 +0800 f2fs: introduce __issue_discard_cmd Just cleanup, no logic change. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 63 ++++++++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 33 deletions(-) commit fe25cc347959b1efd18ee150165416aa6ed0ecdd Author: Xiubo Li Date: Tue May 2 15:54:29 2017 +0800 tcmu: Recalculate the tcmu_cmd size to save cmd area memories For the "struct tcmu_cmd_entry" in cmd area, the minimum size will be sizeof(struct tcmu_cmd_entry) == 112 Bytes. And it could fill about (sizeof(struct rsp) - sizeof(struct req)) / sizeof(struct iovec) == 68 / 16 ~= 4 data regions(iov[4]) by default. For most tcmu_cmds, the data block indexes allocated from the data area will be continuous. And for the continuous blocks they will be merged into the same region using only one iovec. For the current code, it will always allocates the same number of iovecs with blocks for each tcmu_cmd, and it will wastes much memories. For example, when the block size is 4K and the DATA_OUT buffer size is 64K, and the regions needed is less than 5(on my environment is almost 99.7%). The current code will allocate about 16 iovecs, and there will be (16 - 4) * sizeof(struct iovec) = 192 Bytes cmd area memories wasted. Here adds two helpers to calculate the base size and full size of the tcmu_cmd. And will recalculate them again when it make sure how many iovs is needed before insert it to cmd area. Signed-off-by: Xiubo Li Acked-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 52 ++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 11 deletions(-) commit 726bd223105c04f7bf5eacdc2540819c301061f7 Author: Christophe Leroy Date: Mon May 1 09:38:13 2017 +0200 powerpc/8xx: Adding support of IRQ in MPC8xx GPIO This patch allows the use of IRQ to notify the change of GPIO status on MPC8xx CPM IO ports. This then allows to associate IRQs to GPIOs in the Device Tree. Ex: CPM1_PIO_C: gpio-controller@960 { #gpio-cells = <2>; compatible = "fsl,cpm1-pario-bank-c"; reg = <0x960 0x10>; fsl,cpm1-gpio-irq-mask = <0x0fff>; interrupts = <1 2 6 9 10 11 14 15 23 24 26 31>; interrupt-parent = <&CPM_PIC>; gpio-controller; }; The property 'fsl,cpm1-gpio-irq-mask' defines which of the 16 GPIOs have the associated interrupts defined in the 'interrupts' property. Signed-off-by: Christophe Leroy Signed-off-by: Scott Wood .../devicetree/bindings/soc/fsl/cpm_qe/gpio.txt | 21 +++++++++++++++++- arch/powerpc/include/asm/cpm1.h | 2 ++ arch/powerpc/sysdev/cpm1.c | 25 ++++++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) commit 89c9fea3c8034cdb2fd745f551cde0b507fd6893 Merge: 76f1948 6fbc879 Author: Linus Torvalds Date: Tue May 2 19:09:35 2017 -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: tty: fix comment for __tty_alloc_driver() init/main: properly align the multi-line comment init/main: Fix double "the" in comment Fix dead URLs to ftp.kernel.org drivers: Clean up duplicated email address treewide: Fix typo in xml/driver-api/basics.xml tools/testing/selftests/powerpc: remove redundant CFLAGS in Makefile: "-Wall -O2 -Wall" -> "-O2 -Wall" selftests/timers: Spelling s/privledges/privileges/ HID: picoLCD: Spelling s/REPORT_WRTIE_MEMORY/REPORT_WRITE_MEMORY/ net: phy: dp83848: Fix Typo UBI: Fix typos Documentation: ftrace.txt: Correct nice value of 120 priority net: fec: Fix typo in error msg and comment treewide: Fix typos in printk commit 6a623e07694437ad09f382a13f76cffc32239a7f Author: Alexander Couzens Date: Tue May 2 12:19:00 2017 +0200 mtd: nand: add ooblayout for old hamming layout The old 1-bit hamming layout requires ECC data to be placed at a fixed offset, and not necessarily at the end of the OOB area. Add this old layout back in order to fix legacy setups. Fixes: 41b207a70d3a ("mtd: nand: implement the default mtd_ooblayout_ops") Cc: Signed-off-by: Alexander Couzens Acked-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/nand/nand_base.c | 70 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) commit 76f1948a79b26d5f57a5ee9941876b745c6baaea Merge: 7af4c72 a084160 Author: Linus Torvalds Date: Tue May 2 18:24:16 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching Pull livepatch updates from Jiri Kosina: - a per-task consistency model is being added for architectures that support reliable stack dumping (extending this, currently rather trivial set, is currently in the works). This extends the nature of the types of patches that can be applied by live patching infrastructure. The code stems from the design proposal made [1] back in November 2014. It's a hybrid of SUSE's kGraft and RH's kpatch, combining advantages of both: it uses kGraft's per-task consistency and syscall barrier switching combined with kpatch's stack trace switching. There are also a number of fallback options which make it quite flexible. Most of the heavy lifting done by Josh Poimboeuf with help from Miroslav Benes and Petr Mladek [1] https://lkml.kernel.org/r/20141107140458.GA21774@suse.cz - module load time patch optimization from Zhou Chengming - a few assorted small fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching: livepatch: add missing printk newlines livepatch: Cancel transition a safe way for immediate patches livepatch: Reduce the time of finding module symbols livepatch: make klp_mutex proper part of API livepatch: allow removal of a disabled patch livepatch: add /proc//patch_state livepatch: change to a per-task consistency model livepatch: store function sizes livepatch: use kstrtobool() in enabled_store() livepatch: move patching functions into patch.c livepatch: remove unnecessary object loaded check livepatch: separate enabled and patched states livepatch/s390: add TIF_PATCH_PENDING thread flag livepatch/s390: reorganize TIF thread flag bits livepatch/powerpc: add TIF_PATCH_PENDING thread flag livepatch/x86: add TIF_PATCH_PENDING thread flag livepatch: create temporary klp_update_patch_state() stub x86/entry: define _TIF_ALLWORK_MASK flags explicitly stacktrace/x86: add function for detecting reliable stack traces commit 7af4c727c7b6104f94f2ffc3d0899e75a9cc1e55 Merge: 68fed41 4d6ca22 Author: Linus Torvalds Date: Tue May 2 18:07:04 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID subsystem updates from Jiri Kosina: - The need for HID_QUIRK_NO_INIT_REPORTS per-device quirk has been growing dramatically during past years, so the time has come to switch over the default, and perform the pro-active reading only in cases where it's really needed (multitouch, wacom). The only place where this behavior is (in some form) preserved is hiddev so that we don't introduce userspace-visible change of behavior. From Benjamin Tissoires - HID++ support for power_supply / baterry reporting. From Benjamin Tissoires and Bastien Nocera - Vast improvements / rework of DS3 and DS4 in Sony driver. From Roderick Colenbrander - Improvment (in terms of getting closer to the Microsoft's interpretation of slightly ambiguous specification) of logical range interpretation in case null-state is set in the rdesc. From Valtteri Heikkilä and Tomasz Kramkowski - A lot of newly supported device IDs and small assorted fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (71 commits) HID: usbhid: Add HID_QUIRK_NOGET for Aten CS-1758 KVM switch HID: asus: support backlight on USB keyboards HID: wacom: Move wacom_remote_irq and wacom_remote_status_irq HID: wacom: generic: sync pad events only for actual packets HID: sony: remove redundant check for -ve err HID: sony: Make sure to unregister sensors on failure HID: sony: Make DS4 bt poll interval adjustable HID: sony: Set proper bit flags on DS4 output report HID: sony: DS4 use brighter LED colors HID: sony: Improve navigation controller axis/button mapping HID: sony: Use DS3 MAC address as unique identifier on USB HID: logitech-hidpp: add a sysfs file to tell we support power_supply HID: logitech-hidpp: enable HID++ 1.0 battery reporting HID: logitech-hidpp: add support for battery status for the K750 HID: logitech-hidpp: battery: provide CAPACITY_LEVEL HID: logitech-hidpp: rename battery level into capacity HID: logitech-hidpp: battery: provide ONLINE property HID: logitech-hidpp: notify battery on connect HID: logitech-hidpp: return an error if the queried feature is not present HID: logitech-hidpp: create the battery for all types of HID++ devices ... commit 68fed41e0ff6c0332520a0d70ac05be2a7d9130e Merge: be580e7 1aa2faf Author: Linus Torvalds Date: Tue May 2 17:59:33 2017 -0700 Merge tag 'pinctrl-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "This is the bulk of pin control changes for the v4.12 cycle. The extra week before the merge window actually resulted in some of the type of fixes that usually arrive after the merge window already starting to trickle in from eager developers using -next, I'm impressed. I have recruited a Samsung subsubsystem maintainer (Krzysztof) to deal with the onset of Samsung patches. It works great. Apart from that it is a boring round, just incremental updates and fixes all over the place, no serious core changes or anything exciting like that. The most pleasing to see is Julia Cartwrights work to audit the irqchip-providing drivers for realtime locking compliance. It's one of those "I should really get around to looking into that" things that have been on my TODO list since forever. Summary: Core changes: - add bi-directional and output-enable pin configurations to the generic bindings and generic pin controlling core. New drivers or subdrivers: - Armada 37xx SoC pin controller and GPIO support. - Axis ARTPEC-6 SoC pin controller support. - AllWinner A64 R_PIO controller support, and opening up the AllWinner sunxi driver for ARM64 use. - Rockchip RK3328 support. - Renesas R-Car H3 ES2.0 support. - STM32F469 support in the STM32 driver. - Aspeed G4 and G5 pin controller support. Improvements: - a whole slew of realtime improvements to drivers implementing irqchips: BCM, AMD, SiRF, sunxi, rockchip. - switch meson driver to get the GPIO ranges from the device tree. - input schmitt trigger support on the Rockchip driver. - enable the sunxi (AllWinner) driver to also be used on ARM64 silicon. - name the Qualcomm QDF2xxx GPIO lines. - support GMMR GPIO regions on the Intel Cherryview. This fixes a serialization problem on these platforms. - pad retention support for the Samsung Exynos 5433. - handle suspend-to-ram in the AT91-pio4 driver. - pin configuration support in the Aspeed driver. Cleanups: - the final name of Rockchip RK1108 was RV1108 so rename the driver and variables to stay consistent" * tag 'pinctrl-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (80 commits) pinctrl: mediatek: Add missing pinctrl bindings for mt7623 pinctrl: artpec6: Fix return value check in artpec6_pmx_probe() pinctrl: artpec6: Remove .owner field for driver pinctrl: tegra: xusb: Silence sparse warnings ARM: at91/at91-pinctrl documentation: fix spelling mistake: "contoller" -> "controller" pinctrl: make artpec6 explicitly non-modular pinctrl: aspeed: g5: Add pinconf support pinctrl: aspeed: g4: Add pinconf support pinctrl: aspeed: Add core pinconf support pinctrl: aspeed: Document pinconf in devicetree bindings pinctrl: Add st,stm32f469-pinctrl compatible to stm32-pinctrl pinctrl: stm32: Add STM32F469 MCU support Documentation: dt: Remove ngpios from stm32-pinctrl binding pinctrl: stm32: replace device_initcall() with arch_initcall() pinctrl: stm32: add possibility to use gpio-ranges to declare bank range pinctrl: armada-37xx: Add gpio support pinctrl: armada-37xx: Add pin controller support for Armada 37xx pinctrl: dt-bindings: Add documentation for Armada 37xx pin controllers pinctrl: core: Make pinctrl_init_controller() static pinctrl: generic: Add bi-directional and output-enable ... commit be580e7522eecfcf31c70abdf6fa0ae77b2e293b Merge: 8d65b08 a627f02 Author: Linus Torvalds Date: Tue May 2 17:34:32 2017 -0700 Merge tag 'mmc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Continue to re-factor code to prepare for eMMC CMDQ and blkmq support - Introduce queue semantics to prepare for eMMC CMDQ and blkmq support - Add helper functions to manage temporary enable/disable of eMMC CMDQ - Improve wait-busy detection for SDIO MMC host: - cavium: Add driver to support Cavium controllers - cavium: Extend Cavium driver to support Octeon and ThunderX SOCs - bcm2835: Add new driver for Broadcom BCM2835 controller - sdhci-xenon: Add driver to support Marvell Xenon SDHCI controller - sdhci-tegra: Add support for the Tegra186 variant - sdhci-of-esdhc: Support for UHS-I SD cards - sdhci-of-esdhc: Support for eMMC HS200 cards - sdhci-cadence: Add eMMC HS400 enhanced strobe support - sdhci-esdhc-imx: Reset tuning circuit when needed - sdhci-pci: Modernize and clean-up some PM related code - sdhci-pci: Avoid re-tuning at runtime PM for some Intel devices - sdhci-pci|acpi: Use aggressive PM for some Intel BYT controllers - sdhci: Re-factoring and modernizations - sdhci: Optimize delay loops - sdhci: Improve register dump print format - sdhci: Add support for the Command Queue Engine - meson-gx: Various improvements and clean-ups - meson-gx: Add support for CMD23 - meson-gx: Basic tuning support to avoid CRC errors - s3cmci: Enable probing via DT - mediatek: Improve tuning support for eMMC HS200 and HS400 mode - tmio: Improve DMA support - tmio: Use correct response for CMD12 - dw_mmc: Minor improvements and clean-ups" * tag 'mmc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (148 commits) mmc: sdhci-of-esdhc: limit SD clock for ls1012a/ls1046a mmc: sdhci-of-esdhc: poll ESDHC_CLOCK_STABLE bit with udelay mmc: sdhci-xenon: Fix default value of LOGIC_TIMING_ADJUST for eMMC5.0 PHY mmc: sdhci-xenon: Fix the work flow in xenon_remove(). MIPS: Octeon: cavium_octeon_defconfig: Enable Octeon MMC mmc: sdhci-xenon: Remove redundant dev_err call in get_dt_pad_ctrl_data() mmc: cavium: Use module_pci_driver to simplify the code mmc: cavium: Add MMC support for Octeon SOCs. mmc: cavium: Fix detection of block or byte addressing. mmc: core: Export API to allow hosts to get the card address mmc: sdio: Fix sdio wait busy implement limitation mmc: sdhci-esdhc-imx: reset tuning circuit when power on mmc card clk: apn806: fix spelling mistake: "mising" -> "missing" mmc: sdhci-of-esdhc: add delay between tuning cycles mmc: sdhci: Control the delay between tuning commands mmc: sdhci-of-esdhc: add tuning support mmc: sdhci-of-esdhc: add support for signal voltage switch mmc: sdhci-of-esdhc: add peripheral clock support mmc: sdhci-pci: Allow for 3 bytes from Intel DSM mmc: cavium: Fix a shift wrapping bug ... commit f734a31083324b8f4f24b2c5cba178c7459db309 Author: Vineet Gupta Date: Tue May 2 16:23:57 2017 -0700 ARCv2: mm: micro-optimize region flush generated code DC_CTRL.RGN_OP is 3 bits wide, however only 1 bit is used in current programming model (0: flush, 1: invalidate) The current code targetting 3 bits leads to additional 8 byte AND operation which can be elided given that only 1 bit is ever set by software and/or looked at by hardware before ------ | 80b63324 <__dma_cache_wback_inv_l1>: | 80b63324: clri r3 | 80b63328: lr r2,[dc_ctrl] | 80b6332c: and r2,r2,0xfffff1ff <--- 8 bytes insn | 80b63334: or r2,r2,576 | 80b63338: sr r2,[dc_ctrl] | ... | ... | 80b63360 <__dma_cache_inv_l1>: | 80b63360: clri r3 | 80b63364: lr r2,[dc_ctrl] | 80b63368: and r2,r2,0xfffff1ff <--- 8 bytes insn | 80b63370: bset_s r2,r2,0x9 | 80b63372: sr r2,[dc_ctrl] | ... | ... | 80b6338c <__dma_cache_wback_l1>: | 80b6338c: clri r3 | 80b63390: lr r2,[dc_ctrl] | 80b63394: and r2,r2,0xfffff1ff <--- 8 bytes insn | 80b6339c: sr r2,[dc_ctrl] after (AND elided totally in 2 cases, replaced with 2 byte BCLR in 3rd) ----- | 80b63324 <__dma_cache_wback_inv_l1>: | 80b63324: clri r3 | 80b63328: lr r2,[dc_ctrl] | 80b6332c: or r2,r2,576 | 80b63330: sr r2,[dc_ctrl] | ... | ... | 80b63358 <__dma_cache_inv_l1>: | 80b63358: clri r3 | 80b6335c: lr r2,[dc_ctrl] | 80b63360: bset_s r2,r2,0x9 | 80b63362: sr r2,[dc_ctrl] | ... | ... | 80b6337c <__dma_cache_wback_l1>: | 80b6337c: clri r3 | 80b63380: lr r2,[dc_ctrl] | 80b63384: bclr_s r2,r2,0x9 | 80b63386: sr r2,[dc_ctrl] Signed-off-by: Vineet Gupta arch/arc/include/asm/cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d65b08debc7e62b2c6032d7fe7389d895b92cbc Merge: 5a0387a 5d15af6 Author: Linus Torvalds Date: Tue May 2 16:40:27 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next Pull networking updates from David Millar: "Here are some highlights from the 2065 networking commits that happened this development cycle: 1) XDP support for IXGBE (John Fastabend) and thunderx (Sunil Kowuri) 2) Add a generic XDP driver, so that anyone can test XDP even if they lack a networking device whose driver has explicit XDP support (me). 3) Sparc64 now has an eBPF JIT too (me) 4) Add a BPF program testing framework via BPF_PROG_TEST_RUN (Alexei Starovoitov) 5) Make netfitler network namespace teardown less expensive (Florian Westphal) 6) Add symmetric hashing support to nft_hash (Laura Garcia Liebana) 7) Implement NAPI and GRO in netvsc driver (Stephen Hemminger) 8) Support TC flower offload statistics in mlxsw (Arkadi Sharshevsky) 9) Multiqueue support in stmmac driver (Joao Pinto) 10) Remove TCP timewait recycling, it never really could possibly work well in the real world and timestamp randomization really zaps any hint of usability this feature had (Soheil Hassas Yeganeh) 11) Support level3 vs level4 ECMP route hashing in ipv4 (Nikolay Aleksandrov) 12) Add socket busy poll support to epoll (Sridhar Samudrala) 13) Netlink extended ACK support (Johannes Berg, Pablo Neira Ayuso, and several others) 14) IPSEC hw offload infrastructure (Steffen Klassert)" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2065 commits) tipc: refactor function tipc_sk_recv_stream() tipc: refactor function tipc_sk_recvmsg() net: thunderx: Optimize page recycling for XDP net: thunderx: Support for XDP header adjustment net: thunderx: Add support for XDP_TX net: thunderx: Add support for XDP_DROP net: thunderx: Add basic XDP support net: thunderx: Cleanup receive buffer allocation net: thunderx: Optimize CQE_TX handling net: thunderx: Optimize RBDR descriptor handling net: thunderx: Support for page recycling ipx: call ipxitf_put() in ioctl error path net: sched: add helpers to handle extended actions qed*: Fix issues in the ptp filter config implementation. qede: Fix concurrency issue in PTP Tx path processing. stmmac: Add support for SIMATIC IOT2000 platform net: hns: fix ethtool_get_strings overflow in hns driver tcp: fix wraparound issue in tcp_lp bpf, arm64: fix jit branch offset related to ldimm64 bpf, arm64: implement jiting of BPF_XADD ... commit ee40bd1e0c3fb83d810f258952692ffdebc14726 Author: Vineet Gupta Date: Tue May 2 15:28:12 2017 -0700 ARCv2: mm: Merge 2 updates to DC_CTRL for region flush Region Flush has a weird programming model. 1. Flush or Invalidate is selected by DC_CTRL.RGN_OP 2 Flush-n-Invalidate is done by DC_CTRL.IM Given the code structuring before, case #2 above was generating two seperate updates to DC_CTRL which was pointless. | 80a342b0 <__dma_cache_wback_inv_l1>: | 80a342b0: clri r4 | 80a342b4: lr r2,[dc_ctrl] | 80a342b8: bset_s r2,r2,0x6 | 80a342ba: sr r2,[dc_ctrl] <-- FIRST | | 80a342be: bmskn r3,r0,0x5 | | 80a342c2: lr r2,[dc_ctrl] | 80a342c6: and r2,r2,0xfffff1ff | 80a342ce: bset_s r2,r2,0x9 | 80a342d0: sr r2,[dc_ctrl] <-- SECOND | | 80a342d4: add_s r1,r1,0x3f | 80a342d6: bmsk_s r0,r0,0x5 | 80a342d8: add_s r0,r0,r1 | 80a342da: add_s r0,r0,r3 | 80a342dc: sr r0,[78] | 80a342e0: sr r3,[77] |... |... So move setting of DC_CTRL.RGN_OP into __before_dc_op() and combine with any other update. | 80b63324 <__dma_cache_wback_inv_l1>: | 80b63324: clri r3 | 80b63328: lr r2,[dc_ctrl] | 80b6332c: and r2,r2,0xfffff1ff | 80b63334: or r2,r2,576 | 80b63338: sr r2,[dc_ctrl] | | 80b6333c: add_s r1,r1,0x3f | 80b6333e: bmskn r2,r0,0x5 | 80b63342: add_s r0,r0,r1 | 80b63344: sr r0,[78] | 80b63348: sr r2,[77] Signed-off-by: Vineet Gupta arch/arc/mm/cache.c | 46 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 14 deletions(-) commit 0d77117fc5c0333d024a183d6790167bb90c3b62 Author: Vineet Gupta Date: Fri Aug 29 10:55:15 2014 +0530 ARCv2: mm: Implement cache region flush operations These are more efficient than the per-line ops Signed-off-by: Vineet Gupta arch/arc/include/asm/cache.h | 6 ++++ arch/arc/mm/cache.c | 68 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) commit b98e1995e4fa9030474a61ed0dbc033464fe5ea0 Author: Dan Carpenter Date: Tue Apr 25 12:19:49 2017 +0300 mtd: oxnas_nand: Allocating more than necessary in probe() We only need to allocate sizeof(struct oxnas_nand_ctrl) which is 192 bytes and not sizeof(struct nand_chip) which is a much larger 3056 bytes. Fixes: 668592492409 ("mtd: nand: Add OX820 NAND Support") Signed-off-by: Dan Carpenter Acked-by: Neil Armstrong Acked-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/nand/oxnas_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a0387a8a8efb90ae7fea1e2e5c62de3efa74691 Merge: 204f144 929562b Author: Linus Torvalds Date: Tue May 2 15:53:46 2017 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "Here is the crypto update for 4.12: API: - Add batch registration for acomp/scomp - Change acomp testing to non-unique compressed result - Extend algorithm name limit to 128 bytes - Require setkey before accept(2) in algif_aead Algorithms: - Add support for deflate rfc1950 (zlib) Drivers: - Add accelerated crct10dif for powerpc - Add crc32 in stm32 - Add sha384/sha512 in ccp - Add 3des/gcm(aes) for v5 devices in ccp - Add Queue Interface (QI) backend support in caam - Add new Exynos RNG driver - Add ThunderX ZIP driver - Add driver for hardware random generator on MT7623 SoC" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (101 commits) crypto: stm32 - Fix OF module alias information crypto: algif_aead - Require setkey before accept(2) crypto: scomp - add support for deflate rfc1950 (zlib) crypto: scomp - allow registration of multiple scomps crypto: ccp - Change ISR handler method for a v5 CCP crypto: ccp - Change ISR handler method for a v3 CCP crypto: crypto4xx - rename ce_ring_contol to ce_ring_control crypto: testmgr - Allow ecb(cipher_null) in FIPS mode Revert "crypto: arm64/sha - Add constant operand modifier to ASM_EXPORT" crypto: ccp - Disable interrupts early on unload crypto: ccp - Use only the relevant interrupt bits hwrng: mtk - Add driver for hardware random generator on MT7623 SoC dt-bindings: hwrng: Add Mediatek hardware random generator bindings crypto: crct10dif-vpmsum - Fix missing preempt_disable() crypto: testmgr - replace compression known answer test crypto: acomp - allow registration of multiple acomps hwrng: n2 - Use devm_kcalloc() in n2rng_probe() crypto: chcr - Fix error handling related to 'chcr_alloc_shash' padata: get_next is never NULL crypto: exynos - Add new Exynos RNG driver ... commit 7d3d162bbd515070dfa4f422778276aa28f114d4 Author: Vineet Gupta Date: Mon Jan 23 19:32:23 2017 -0800 ARC: mm: Move full_page computation into cache version agnostic wrapper This reduces code duplication in each of cache version specific handlers Signed-off-by: Vineet Gupta arch/arc/mm/cache.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 4341ec6b3db4c3e903d6c44958722918baec1e59 Author: Taeung Song Date: Wed Apr 26 21:21:02 2017 +0900 perf config: Refactor a duplicated code for obtaining config file name We were doing the same sequence to figure out what is the config pathname to use, fix it by doing it before those two uses. Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/1493209268-5543-2-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-config.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit d80406453ad4a69932dc17a617d5b7bc7ae80b8f Author: Paul Clarke Date: Tue Apr 25 13:15:49 2017 -0500 perf symbols: Allow user probes on versioned symbols Symbol versioning, as in glibc, results in symbols being defined as: @[@] (Note that "@@" identifies a default symbol, if the symbol name is repeated.) perf is currently unable to deal with this, and is unable to create user probes at such symbols: -- $ nm /lib/powerpc64le-linux-gnu/libpthread.so.0 | grep pthread_create 0000000000008d30 t __pthread_create_2_1 0000000000008d30 T pthread_create@@GLIBC_2.17 $ /usr/bin/sudo perf probe -v -x /lib/powerpc64le-linux-gnu/libpthread.so.0 pthread_create probe-definition(0): pthread_create symbol:pthread_create file:(null) line:0 offset:0 return:0 lazy:(null) 0 arguments Open Debuginfo file: /usr/lib/debug/lib/powerpc64le-linux-gnu/libpthread-2.19.so Try to find probe point from debuginfo. Probe point 'pthread_create' not found. Error: Failed to add events. Reason: No such file or directory (Code: -2) -- One is not able to specify the fully versioned symbol, either, due to syntactic conflicts with other uses of "@" by perf: -- $ /usr/bin/sudo perf probe -v -x /lib/powerpc64le-linux-gnu/libpthread.so.0 pthread_create@@GLIBC_2.17 probe-definition(0): pthread_create@@GLIBC_2.17 Semantic error :SRC@SRC is not allowed. 0 arguments Error: Command Parse Error. Reason: Invalid argument (Code: -22) -- This patch ignores versioning for default symbols, thus allowing probes to be created for these symbols: -- $ /usr/bin/sudo ./perf probe -x /lib/powerpc64le-linux-gnu/libpthread.so.0 pthread_create Added new event: probe_libpthread:pthread_create (on pthread_create in /lib/powerpc64le-linux-gnu/libpthread-2.19.so) You can now use it in all perf tools, such as: perf record -e probe_libpthread:pthread_create -aR sleep 1 $ /usr/bin/sudo ./perf record -e probe_libpthread:pthread_create -aR ./test 2 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.052 MB perf.data (2 samples) ] $ /usr/bin/sudo ./perf script test 2915 [000] 19124.260729: probe_libpthread:pthread_create: (3fff99248d38) test 2916 [000] 19124.260962: probe_libpthread:pthread_create: (3fff99248d38) $ /usr/bin/sudo ./perf probe --del=probe_libpthread:pthread_create Removed event: probe_libpthread:pthread_create -- Committer note: Change the variable storing the result of strlen() to 'int', to fix the build on debian:experimental-x-mipsel, fedora:24-x-ARC-uClibc, ubuntu:16.04-x-arm, etc: util/symbol.c: In function 'symbol__match_symbol_name': util/symbol.c:422:11: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (len < versioning - name) ^ Signed-off-by: Paul A. Clarke Tested-by: Arnaldo Carvalho de Melo Acked-by: Masami Hiramatsu Cc: David Ahern Link: http://lkml.kernel.org/r/c2b18d9c-17f8-9285-4868-f58b6359ccac@us.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/powerpc/util/sym-handling.c | 12 ++++++ tools/perf/util/map.c | 5 --- tools/perf/util/map.h | 5 ++- tools/perf/util/symbol.c | 61 +++++++++++++++++++++++------ tools/perf/util/symbol.h | 11 ++++++ 5 files changed, 74 insertions(+), 20 deletions(-) commit b843f62ad942f3879c2d7acd27b44f931c609685 Author: Arnaldo Carvalho de Melo Date: Thu Apr 27 21:21:09 2017 -0300 perf symbols: Accept symbols starting at address 0 That is the case of _text on s390, and we have some functions that return an address, using address zero to report problems, oops. This would lead the symbol loading routines to not use "_text" as the reference relocation symbol, or the first symbol for the kernel, but use instead "_stext", that is at the same address on x86_64 and others, but not on s390: [acme@localhost perf-4.11.0-rc6]$ head -15 /proc/kallsyms 0000000000000000 T _text 0000000000000418 t iplstart 0000000000000800 T start 000000000000080a t .base 000000000000082e t .sk8x8 0000000000000834 t .gotr 0000000000000842 t .cmd 0000000000000846 t .parm 000000000000084a t .lowcase 0000000000010000 T startup 0000000000010010 T startup_kdump 0000000000010214 t startup_kdump_relocated 0000000000011000 T startup_continue 00000000000112a0 T _ehead 0000000000100000 T _stext [acme@localhost perf-4.11.0-rc6]$ Which in turn would make 'perf test vmlinux' to fail because it wouldn't find the symbols before "_stext" in kallsyms. Fix it by using the return value only for errors and storing the address, when the symbol is successfully found, in a provided pointer arg. Before this patch: After: [acme@localhost perf-4.11.0-rc6]$ tools/perf/perf test -v 1 1: vmlinux symtab matches kallsyms : --- start --- test child forked, pid 40693 Looking at the vmlinux_path (8 entries long) Using /usr/lib/debug/lib/modules/3.10.0-654.el7.s390x/vmlinux for symbols ERR : 0: _text not on kallsyms ERR : 0x418: iplstart not on kallsyms ERR : 0x800: start not on kallsyms ERR : 0x80a: .base not on kallsyms ERR : 0x82e: .sk8x8 not on kallsyms ERR : 0x834: .gotr not on kallsyms ERR : 0x842: .cmd not on kallsyms ERR : 0x846: .parm not on kallsyms ERR : 0x84a: .lowcase not on kallsyms ERR : 0x10000: startup not on kallsyms ERR : 0x10010: startup_kdump not on kallsyms ERR : 0x10214: startup_kdump_relocated not on kallsyms ERR : 0x11000: startup_continue not on kallsyms ERR : 0x112a0: _ehead not on kallsyms test child finished with -1 ---- end ---- vmlinux symtab matches kallsyms: FAILED! [acme@localhost perf-4.11.0-rc6]$ After: [acme@localhost perf-4.11.0-rc6]$ tools/perf/perf test -v 1 1: vmlinux symtab matches kallsyms : --- start --- test child forked, pid 47160 test child finished with 0 ---- end ---- vmlinux symtab matches kallsyms: Ok [acme@localhost perf-4.11.0-rc6]$ Reported-by: Michael Petlan Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-9x9bwgd3btwdk1u51xie93fz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-buildid-cache.c | 13 ++++++++----- tools/perf/util/event.c | 9 +++++---- tools/perf/util/event.h | 4 ++-- tools/perf/util/machine.c | 28 +++++++++++++++++----------- tools/perf/util/symbol.c | 11 +++++------ 5 files changed, 37 insertions(+), 28 deletions(-) commit 5a08b04f637921e44ba767c07c74b0535504ab71 Author: Michael S. Tsirkin Date: Tue Feb 7 06:15:13 2017 +0200 virtio: allow extra context per descriptor Allow extra context per descriptor. To avoid slow down for data path, this disables use of indirect descriptors for this vq. Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_ring.c | 70 ++++++++++++++++++++++++++++++++++++-------- include/linux/virtio.h | 9 ++++++ 2 files changed, 66 insertions(+), 13 deletions(-) commit 0a12ae4024a5167c30444d722b0cbafbdb5f4b57 Author: Sekhar Nori Date: Mon Apr 17 16:42:15 2017 +0530 tools/virtio: fix build breakage Previous commit ("virtio: add context flag to find vqs") added a new 'context' flag to vring_new_virtqueue(), but the corresponding API in tools/virtio/ is not updated causing build errors due to conflicting declarations. Bring code in tools/virtio in sync with that in kernel. I have used 'false' for the value of the new boolean 'context' flag as that seems to be the best way to preserve existing behavior. Tested with: $ make -C tools/virtio clean all ARCH=x86 Signed-off-by: Sekhar Nori Signed-off-by: Michael S. Tsirkin tools/virtio/linux/virtio.h | 1 + tools/virtio/virtio_test.c | 2 +- tools/virtio/vringh_test.c | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) commit f94682dde5ed23eed13533a37dfce942e60ade4e Author: Michael S. Tsirkin Date: Mon Mar 6 18:32:29 2017 +0200 virtio: add context flag to find vqs Allows maintaining extra context per vq. For ease of use, passing in NULL is legal and disables the feature for all vqs. Includes fixes by Christian for s390, acked by Cornelia. Signed-off-by: Christian Borntraeger Acked-by: Cornelia Huck Signed-off-by: Michael S. Tsirkin drivers/misc/mic/vop/vop_main.c | 9 ++++++--- drivers/remoteproc/remoteproc_virtio.c | 10 ++++++---- drivers/s390/virtio/kvm_virtio.c | 8 +++++--- drivers/s390/virtio/virtio_ccw.c | 7 ++++--- drivers/virtio/virtio_mmio.c | 8 +++++--- drivers/virtio/virtio_pci_common.c | 17 +++++++++++------ drivers/virtio/virtio_pci_common.h | 4 +++- drivers/virtio/virtio_pci_legacy.c | 4 +++- drivers/virtio/virtio_pci_modern.c | 12 ++++++++---- drivers/virtio/virtio_ring.c | 7 +++++-- include/linux/virtio_config.h | 18 +++++++++++++++--- include/linux/virtio_ring.h | 3 +++ 12 files changed, 74 insertions(+), 33 deletions(-) commit 9b2bbdb227588455afcc3b03475fa9b0a35d83af Author: Michael S. Tsirkin Date: Mon Mar 6 18:19:39 2017 +0200 virtio: wrap find_vqs We are going to add more parameters to find_vqs, let's wrap the call so we don't need to tweak all drivers every time. Signed-off-by: Michael S. Tsirkin drivers/block/virtio_blk.c | 3 +-- drivers/char/virtio_console.c | 6 +++--- drivers/crypto/virtio/virtio_crypto_core.c | 3 +-- drivers/gpu/drm/virtio/virtgpu_kms.c | 3 +-- drivers/net/caif/caif_virtio.c | 3 +-- drivers/net/virtio_net.c | 3 +-- drivers/rpmsg/virtio_rpmsg_bus.c | 2 +- drivers/scsi/virtio_scsi.c | 3 +-- drivers/virtio/virtio_balloon.c | 3 +-- drivers/virtio/virtio_input.c | 3 +-- include/linux/virtio_config.h | 9 +++++++++ net/vmw_vsock/virtio_transport.c | 6 +++--- 12 files changed, 24 insertions(+), 23 deletions(-) commit 4f6d9bfc882450631251052756ed84658ec88a70 Author: Dan Carpenter Date: Sat Apr 15 22:22:14 2017 +0300 ringtest: fix an assert statement There is an || vs && typo so the assert can never be triggered. Signed-off-by: Dan Carpenter Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang tools/virtio/ringtest/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a158a62da0673db918b53ac1440845a5b64fd90 Author: James Hogan Date: Tue May 2 19:41:06 2017 +0100 metag/uaccess: Check access_ok in strncpy_from_user The metag implementation of strncpy_from_user() doesn't validate the src pointer, which could allow reading of arbitrary kernel memory. Add a short access_ok() check to prevent that. Its still possible for it to read across the user/kernel boundary, but it will invariably reach a NUL character after only 9 bytes, leaking only a static kernel address being loaded into D0Re0 at the beginning of __start, which is acceptable for the immediate fix. Reported-by: Al Viro Signed-off-by: James Hogan Cc: linux-metag@vger.kernel.org Cc: stable@vger.kernel.org arch/metag/include/asm/uaccess.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 26c9cb668c7fbf9830516b75d8bee70b699ed449 Author: Steve French Date: Tue May 2 13:35:20 2017 -0500 Set unicode flag on cifs echo request to avoid Mac error Mac requires the unicode flag to be set for cifs, even for the smb echo request (which doesn't have strings). Without this Mac rejects the periodic echo requests (when mounting with cifs) that we use to check if server is down Signed-off-by: Steve French CC: Stable fs/cifs/cifssmb.c | 3 +++ 1 file changed, 3 insertions(+) commit c610c4b619e53494d9c512fa0333e28c732e976f Author: Pavel Shilovsky Date: Tue Apr 25 11:52:31 2017 -0700 CIFS: Add asynchronous write support through kernel AIO This patch adds support to process write calls passed by io_submit() asynchronously. It based on the previously introduced async context that allows to process i/o responses in a separate thread and return the caller immediately for asynchronous calls. This improves writing performance of single threaded applications with increasing of i/o queue depth size. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/cifsglob.h | 2 + fs/cifs/file.c | 188 ++++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 139 insertions(+), 51 deletions(-) commit 6685c5e2d1acae8e7d3b63b1a205f58420ce7150 Author: Pavel Shilovsky Date: Tue Apr 25 11:52:30 2017 -0700 CIFS: Add asynchronous read support through kernel AIO This patch adds support to process read calls passed by io_submit() asynchronously. It based on the previously introduced async context that allows to process i/o responses in a separate thread and return the caller immediately for asynchronous calls. This improves reading performance of single threaded applications with increasing of i/o queue depth size. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/cifsglob.h | 1 + fs/cifs/file.c | 169 ++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 131 insertions(+), 39 deletions(-) commit ccf7f4088af2dd6733bfcbc40b488e2484345ae5 Author: Pavel Shilovsky Date: Tue Apr 25 11:52:29 2017 -0700 CIFS: Add asynchronous context to support kernel AIO Currently the code doesn't recognize asynchronous calls passed by io_submit() and processes all calls synchronously. This is not what kernel AIO expects. This patch introduces a new async context that keeps track of all issued i/o requests and moves a response collecting procedure to a separate thread. This allows to return to a caller immediately for async calls and call iocb->ki_complete() once all requests are completed. For sync calls the current thread simply waits until all requests are completed. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/cifsglob.h | 16 +++++++ fs/cifs/cifsproto.h | 3 ++ fs/cifs/misc.c | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 139 insertions(+) commit 29bb3158cf6a5ad7b3521d1229552f375107a58c Author: Daniel N Pettersson Date: Thu Apr 27 11:32:36 2017 +0200 cifs: fix IPv6 link local, with scope id, address parsing When the IP address is gotten from the UNC, use only the address part of the UNC. Else all after the percent sign in an IPv6 link local address is interpreted as a scope id. This includes the slash and share name. A scope id is expected to be an integer and any trailing characters makes the conversion to integer fail. Example of mount command that fails: mount -i -t cifs //fe80::6a05:caff:fe3e:8ffc%2/test /mnt/t -o sec=none Signed-off-by: Daniel N Pettersson Signed-off-by: Steve French fs/cifs/connect.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 564277eceeca01e02b1ef3e141cfb939184601b4 Author: Dan Carpenter Date: Mon May 1 21:43:43 2017 +0300 cifs: small underflow in cnvrtDosUnixTm() January is month 1. There is no zero-th month. If someone passes a zero month then it means we read from one space before the start of the total_days_of_prev_months[] array. We may as well also be strict about days as well. Fixes: 1bd5bbcb6531 ("[CIFS] Legacy time handling for Win9x and OS/2 part 1") Signed-off-by: Dan Carpenter Signed-off-by: Steve French fs/cifs/netmisc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5d15af6778b8e4ed1fd41b040283af278e7a9a72 Merge: b0e9227 ec8a09f Author: David S. Miller Date: Tue May 2 15:56:54 2017 -0400 Merge branch 'tipc-refactor-socket-receive-functions' Jon Maloy says: ==================== tipc: refactor socket receive functions We try to make the functions tipc_sk_recvmsg() and tipc_sk_recvstream() more readable. ==================== Signed-off-by: David S. Miller commit ec8a09fbbeff252c80daf62c7a78342003dddf9c Author: Jon Paul Maloy Date: Tue May 2 18:16:54 2017 +0200 tipc: refactor function tipc_sk_recv_stream() We try to make this function more readable by improving variable names and comments, using more stack variables, and doing some smaller changes to the logics. We also rename the function to make it consistent with naming conventions used elsewhere in the code. Reviewed-by: Parthasarathy Bhuvaragan Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 155 +++++++++++++++++++++++++----------------------------- 1 file changed, 71 insertions(+), 84 deletions(-) commit e9f8b10101c6da3ab000a2fb17162374c9bd2c69 Author: Jon Paul Maloy Date: Tue May 2 18:16:53 2017 +0200 tipc: refactor function tipc_sk_recvmsg() We try to make this function more readable by improving variable names and comments, plus some minor changes to the logics. Reviewed-by: Parthasarathy Bhuvaragan Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 109 +++++++++++++++++++++++++----------------------------- 1 file changed, 50 insertions(+), 59 deletions(-) commit b0e92279d3ec3656152c4dfa1c8b28fa40ca66d7 Merge: ee0d8d8 7732253 Author: David S. Miller Date: Tue May 2 15:41:23 2017 -0400 Merge branch 'thunderx-xdp' Sunil Goutham says: ==================== net: thunderx: Adds XDP support This patch series adds support for XDP to ThunderX NIC driver which is used on CN88xx, CN81xx and CN83xx platforms. Patches 1-4 are performance improvement and cleanup patches which are done keeping XDP performance bottlenecks in view. Rest of the patches adds actual XDP support. ==================== Signed-off-by: David S. Miller commit 773225388dae15e72790d6f573e2e70e96292b6b Author: Sunil Goutham Date: Tue May 2 18:36:58 2017 +0530 net: thunderx: Optimize page recycling for XDP Driver follows a method of taking one extra reference on the page for recycling which is fine in usual packet path where each 64KB page is segmented into multiple receive buffers. But in XDP mode since there is just one receive buffer per page taking extra page reference itself becomes big bottleneck consuming ~50% of CPU cycles due to atomic operations. This patch adds a internal ref count in pgcache for each page and additional page references are taken in a batch instead of just one at a time. Internal i.e 'pgcache->ref_count' and page's i.e 'page->_refcount' counters are compared to check page's recyclability. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 57 +++++++++++++++++++--- drivers/net/ethernet/cavium/thunder/nicvf_queues.h | 1 + 2 files changed, 51 insertions(+), 7 deletions(-) commit e3d06ff9ec9400b93bacf8fa92f3985c9412e282 Author: Sunil Goutham Date: Tue May 2 18:36:57 2017 +0530 net: thunderx: Support for XDP header adjustment When in XDP mode reserve XDP_PACKET_HEADROOM bytes at the start of receive buffer for XDP program to modify headers and adjust packet start. Additional code changes done to handle such packets. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 63 ++++++++++++++++------ drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 9 +++- 2 files changed, 55 insertions(+), 17 deletions(-) commit 16f2bccda75da48888772c4829a468be620c5d79 Author: Sunil Goutham Date: Tue May 2 18:36:56 2017 +0530 net: thunderx: Add support for XDP_TX Adds support for XDP_TX i.e transmits packet out of the XDP TX queue mapped to the corresponding Rx queue on which packet is received. Since SQ for XDP TX will be used only on a single cpu i.e SQ description creation and freeing, using atomic free count is not necessary and will become a bottleneck. Hence added a separate 'xdp_free_cnt' used for SQs designated for XDP to track descriptor free count. Changes also include - A new entry 'xdp_page' is added to save transmitted packet's page pointer for later cleanup. - XDP Tx SQ's doorbell is ringed once per NAPI instance. - Retrieving designated SQ for packets being sent out by stack via 'nicvf_xmit'. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 63 ++++++++--- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 117 ++++++++++++++++++--- drivers/net/ethernet/cavium/thunder/nicvf_queues.h | 7 ++ 3 files changed, 160 insertions(+), 27 deletions(-) commit c56d91ce38d54c0c0dd8d0e4c6a9e0cfa557152f Author: Sunil Goutham Date: Tue May 2 18:36:55 2017 +0530 net: thunderx: Add support for XDP_DROP Adds support for XDP_DROP. Also since in XDP mode there is just a single buffer per page, made changes to recycle DMA mapping info as well along with pages. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 23 ++++++- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 77 ++++++++++++++++------ drivers/net/ethernet/cavium/thunder/nicvf_queues.h | 4 +- 3 files changed, 79 insertions(+), 25 deletions(-) commit 05c773f52b96ef3fbc7d9bfa21caadc6247ef7a8 Author: Sunil Goutham Date: Tue May 2 18:36:54 2017 +0530 net: thunderx: Add basic XDP support Adds basic XDP support i.e attaching a BPF program to an interface. Also takes care of allocating separate Tx queues for XDP path and for network stack packet transmission. This patch doesn't support handling of any of the XDP actions, all are treated as XDP_PASS i.e packets will be handed over to the network stack. Changes also involve allocating one receive buffer per page in XDP mode and multiple in normal mode i.e when no BPF program is attached. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic.h | 6 +- .../net/ethernet/cavium/thunder/nicvf_ethtool.c | 26 +++- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 162 ++++++++++++++++++++- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 15 +- drivers/net/ethernet/cavium/thunder/nicvf_queues.h | 9 ++ 5 files changed, 199 insertions(+), 19 deletions(-) commit 927987f39f116db477fcd74ced2a2aea940e585c Author: Sunil Goutham Date: Tue May 2 18:36:53 2017 +0530 net: thunderx: Cleanup receive buffer allocation Get rid of unnecessary double pointer references and type casting in receive buffer allocation code. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 0dada88b8cd74569abc3dda50f1b268a5868f6f2 Author: Sunil Goutham Date: Tue May 2 18:36:52 2017 +0530 net: thunderx: Optimize CQE_TX handling Optimized CQE handling with below changes - Feeing descriptors back to SQ in bulk i.e once per NAPI instance instead for every CQE_TX, this will reduce number of atomic updates to 'sq->free_cnt'. - Checking errors in CQE_TX and CQE_RX before calling appropriate fn()s to update error stats i.e reduce branching. Also removed debug messages in packet handling path which otherwise causes issues if DEBUG is enabled. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 44 +++++++++++----------- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 5 --- 2 files changed, 21 insertions(+), 28 deletions(-) commit 5e848e4c5d77438e126c97702ec3bea477f550a9 Author: Sunil Goutham Date: Tue May 2 18:36:51 2017 +0530 net: thunderx: Optimize RBDR descriptor handling Receive buffer's physical address or iova will anyway not go beyond 49bits, since it is the max supported HW address. As per perf, updating bitfields i.e buf_addr:42 in RBDR descriptor entry consumes lots of cpu cycles, hence changed it to a 64bit field with alignment requirements taken care of. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 8 ++++---- drivers/net/ethernet/cavium/thunder/q_struct.h | 10 +--------- 2 files changed, 5 insertions(+), 13 deletions(-) commit 5836b4429777bf57ca8fc02b154263aa54d97508 Author: Sunil Goutham Date: Tue May 2 18:36:50 2017 +0530 net: thunderx: Support for page recycling Adds support for page recycling for allocating receive buffers to reduce cost of refilling RBDR ring. Also got rid of using compound pages when pagesize is 4K, only order-0 pages now. Only page is recycled, DMA mappings still needs to be done for every receive buffer allocated due to following constraints - Cannot have just one receive buffer per 64KB page. - There is just one buffer ring shared across 8 Rx queues, so buffers of same page can go to any Rx queue. - HW gives buffer address where packet has been DMA'ed and not the index into buffer ring. This makes it not possible to resue DMA mapping info. So unfortunately have to go through costly mapping route for every buffer. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic.h | 4 +- .../net/ethernet/cavium/thunder/nicvf_ethtool.c | 3 +- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 121 ++++++++++++++++++--- drivers/net/ethernet/cavium/thunder/nicvf_queues.h | 11 ++ 4 files changed, 119 insertions(+), 20 deletions(-) commit ee0d8d8482345ff97a75a7d747efc309f13b0d80 Author: Dan Carpenter Date: Tue May 2 13:58:53 2017 +0300 ipx: call ipxitf_put() in ioctl error path We should call ipxitf_put() if the copy_to_user() fails. Reported-by: 李强 Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller net/ipx/af_ipx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9da3242e6a83b6f315aa9c394c939da8e4ad7774 Author: Jiri Pirko Date: Tue May 2 10:12:00 2017 +0200 net: sched: add helpers to handle extended actions Jump is now the only one using value action opcode. This is going to change soon. So introduce helpers to work with this. Convert TC_ACT_JUMP. This also fixes the TC_ACT_JUMP check, which is incorrectly done as a bit check, not a value check. Fixes: e0ee84ded796 ("net sched actions: Complete the JUMPX opcode") Signed-off-by: Jiri Pirko Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller include/uapi/linux/pkt_cls.h | 15 ++++++++++++++- net/sched/act_api.c | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) commit 5657f89abb2d8966ac7678b84e3c020b93f340f4 Merge: 212c7fd 8d3f87d Author: David S. Miller Date: Tue May 2 15:33:02 2017 -0400 Merge branch 'qed-PTP-fixes' Sudarsana Reddy Kalluru says: ==================== qed*: PTP bug fixes. The series addresses couple of issues in the PTP implementation. ==================== Signed-off-by: David S. Miller commit 8d3f87d8cd0a16c58ae7e4410938528866c1c0db Author: sudarsana.kalluru@cavium.com Date: Tue May 2 01:11:03 2017 -0700 qed*: Fix issues in the ptp filter config implementation. PTP hardware filter configuration performed by the driver for a given user requested config is not correct for some of the PTP modes. Following changes are needed for PTP config-filter implementation. 1. NIG_REG_TX_PTP_EN register - Bits 0/1/2 respectively enables TimeSync/"V1 frame format support"/"V2 frame format support" on the TX side. Set the associated bits based on the user request. 2. ptp4l application fails to operate in Peer Delay mode. Following changes are needed to fix this, a. Driver should enable (set to 0) DA #1-related bits for IPv4, IPv6 and MAC destination addresses in these registers: NIG_REG_TX_LLH_PTP_RULE_MASK NIG_REG_LLH_PTP_RULE_MASK b. NIG_REG_LLH_PTP_PARAM_MASK/NIG_REG_TX_LLH_PTP_PARAM_MASK should be set to 0x0 in all modes. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ptp.c | 84 ++++++++++++++++++----------- drivers/net/ethernet/qlogic/qede/qede_ptp.c | 34 +++++++++--- include/linux/qed/qed_eth_if.h | 23 +++++--- 3 files changed, 98 insertions(+), 43 deletions(-) commit 461eec12012c29b66525c270208d30be8f6da8e7 Author: sudarsana.kalluru@cavium.com Date: Tue May 2 01:11:02 2017 -0700 qede: Fix concurrency issue in PTP Tx path processing. PTP Tx timestamping data structures are not protected against the concurrent access in the Tx paths. Protecting the same using atomic bit locks. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede.h | 5 +++-- drivers/net/ethernet/qlogic/qede/qede_ptp.c | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit 212c7fd614377fef4415d94856a59e9f484aa439 Author: Jan Kiszka Date: Tue May 2 09:58:00 2017 +0200 stmmac: Add support for SIMATIC IOT2000 platform The IOT2000 is industrial controller platform, derived from the Intel Galileo Gen2 board. The variant IOT2020 comes with one LAN port, the IOT2040 has two of them. They can be told apart based on the board asset tag in the DMI table. Based on patch by Sascha Weisenberger. Signed-off-by: Jan Kiszka Signed-off-by: Sascha Weisenberger Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 26 +++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit 412b65d15a7f8a93794653968308fc100f2aa87c Author: Timmy Li Date: Tue May 2 10:46:52 2017 +0800 net: hns: fix ethtool_get_strings overflow in hns driver hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated is not enough for ethtool_get_strings(), which will cause random memory corruption. When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the the following can be observed without this patch: [ 43.115200] Slab corruption (Not tainted): Acpi-ParseExt start=ffff801fb0b69030, len=80 [ 43.115206] Redzone: 0x9f911029d006462/0x5f78745f31657070. [ 43.115208] Last user: [<5f7272655f746b70>](0x5f7272655f746b70) [ 43.115214] 010: 70 70 65 31 5f 74 78 5f 70 6b 74 00 6b 6b 6b 6b ppe1_tx_pkt.kkkk [ 43.115217] 030: 70 70 65 31 5f 74 78 5f 70 6b 74 5f 6f 6b 00 6b ppe1_tx_pkt_ok.k [ 43.115218] Next obj: start=ffff801fb0b69098, len=80 [ 43.115220] Redzone: 0x706d655f6f666966/0x9f911029d74e35b. [ 43.115229] Last user: [](acpi_os_release_object+0x28/0x38) [ 43.115231] 000: 74 79 00 6b 6b 6b 6b 6b 70 70 65 31 5f 74 78 5f ty.kkkkkppe1_tx_ [ 43.115232] 010: 70 6b 74 5f 65 72 72 5f 63 73 75 6d 5f 66 61 69 pkt_err_csum_fai Signed-off-by: Timmy Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 2 +- drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c | 2 +- drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 2 +- drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit a9f11f963a546fea9144f6a6d1a307e814a387e7 Author: Eric Dumazet Date: Mon May 1 15:29:48 2017 -0700 tcp: fix wraparound issue in tcp_lp Be careful when comparing tcp_time_stamp to some u32 quantity, otherwise result can be surprising. Fixes: 7c106d7e782b ("[TCP]: TCP Low Priority congestion control") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_lp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ddc665a4bb4b728b4e6ecec8db1b64efa9184b9c Author: Daniel Borkmann Date: Tue May 2 20:34:54 2017 +0200 bpf, arm64: fix jit branch offset related to ldimm64 When the instruction right before the branch destination is a 64 bit load immediate, we currently calculate the wrong jump offset in the ctx->offset[] array as we only account one instruction slot for the 64 bit load immediate although it uses two BPF instructions. Fix it up by setting the offset into the right slot after we incremented the index. Before (ldimm64 test 1): [...] 00000020: 52800007 mov w7, #0x0 // #0 00000024: d2800060 mov x0, #0x3 // #3 00000028: d2800041 mov x1, #0x2 // #2 0000002c: eb01001f cmp x0, x1 00000030: 54ffff82 b.cs 0x00000020 00000034: d29fffe7 mov x7, #0xffff // #65535 00000038: f2bfffe7 movk x7, #0xffff, lsl #16 0000003c: f2dfffe7 movk x7, #0xffff, lsl #32 00000040: f2ffffe7 movk x7, #0xffff, lsl #48 00000044: d29dddc7 mov x7, #0xeeee // #61166 00000048: f2bdddc7 movk x7, #0xeeee, lsl #16 0000004c: f2ddddc7 movk x7, #0xeeee, lsl #32 00000050: f2fdddc7 movk x7, #0xeeee, lsl #48 [...] After (ldimm64 test 1): [...] 00000020: 52800007 mov w7, #0x0 // #0 00000024: d2800060 mov x0, #0x3 // #3 00000028: d2800041 mov x1, #0x2 // #2 0000002c: eb01001f cmp x0, x1 00000030: 540000a2 b.cs 0x00000044 00000034: d29fffe7 mov x7, #0xffff // #65535 00000038: f2bfffe7 movk x7, #0xffff, lsl #16 0000003c: f2dfffe7 movk x7, #0xffff, lsl #32 00000040: f2ffffe7 movk x7, #0xffff, lsl #48 00000044: d29dddc7 mov x7, #0xeeee // #61166 00000048: f2bdddc7 movk x7, #0xeeee, lsl #16 0000004c: f2ddddc7 movk x7, #0xeeee, lsl #32 00000050: f2fdddc7 movk x7, #0xeeee, lsl #48 [...] Also, add a couple of test cases to make sure JITs pass this test. Tested on Cavium ThunderX ARMv8. The added test cases all pass after the fix. Fixes: 8eee539ddea0 ("arm64: bpf: fix out-of-bounds read in bpf2a64_offset()") Reported-by: David S. Miller Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Cc: Xi Wang Signed-off-by: David S. Miller arch/arm64/net/bpf_jit_comp.c | 8 ++++---- lib/test_bpf.c | 45 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 4 deletions(-) commit 85f68fe89832057584a9e66e1e7e53d53e50faff Author: Daniel Borkmann Date: Mon May 1 02:57:20 2017 +0200 bpf, arm64: implement jiting of BPF_XADD This work adds BPF_XADD for BPF_W/BPF_DW to the arm64 JIT and therefore completes JITing of all BPF instructions, meaning we can thus also remove the 'notyet' label and do not need to fall back to the interpreter when BPF_XADD is used in a program! This now also brings arm64 JIT in line with x86_64, s390x, ppc64, sparc64, where all current eBPF features are supported. BPF_W example from test_bpf: .u.insns_int = { BPF_ALU32_IMM(BPF_MOV, R0, 0x12), BPF_ST_MEM(BPF_W, R10, -40, 0x10), BPF_STX_XADD(BPF_W, R10, R0, -40), BPF_LDX_MEM(BPF_W, R0, R10, -40), BPF_EXIT_INSN(), }, [...] 00000020: 52800247 mov w7, #0x12 // #18 00000024: 928004eb mov x11, #0xffffffffffffffd8 // #-40 00000028: d280020a mov x10, #0x10 // #16 0000002c: b82b6b2a str w10, [x25,x11] // start of xadd mapping: 00000030: 928004ea mov x10, #0xffffffffffffffd8 // #-40 00000034: 8b19014a add x10, x10, x25 00000038: f9800151 prfm pstl1strm, [x10] 0000003c: 885f7d4b ldxr w11, [x10] 00000040: 0b07016b add w11, w11, w7 00000044: 880b7d4b stxr w11, w11, [x10] 00000048: 35ffffab cbnz w11, 0x0000003c // end of xadd mapping: [...] BPF_DW example from test_bpf: .u.insns_int = { BPF_ALU32_IMM(BPF_MOV, R0, 0x12), BPF_ST_MEM(BPF_DW, R10, -40, 0x10), BPF_STX_XADD(BPF_DW, R10, R0, -40), BPF_LDX_MEM(BPF_DW, R0, R10, -40), BPF_EXIT_INSN(), }, [...] 00000020: 52800247 mov w7, #0x12 // #18 00000024: 928004eb mov x11, #0xffffffffffffffd8 // #-40 00000028: d280020a mov x10, #0x10 // #16 0000002c: f82b6b2a str x10, [x25,x11] // start of xadd mapping: 00000030: 928004ea mov x10, #0xffffffffffffffd8 // #-40 00000034: 8b19014a add x10, x10, x25 00000038: f9800151 prfm pstl1strm, [x10] 0000003c: c85f7d4b ldxr x11, [x10] 00000040: 8b07016b add x11, x11, x7 00000044: c80b7d4b stxr w11, x11, [x10] 00000048: 35ffffab cbnz w11, 0x0000003c // end of xadd mapping: [...] Tested on Cavium ThunderX ARMv8, test suite results after the patch: No JIT: [ 3751.855362] test_bpf: Summary: 311 PASSED, 0 FAILED, [0/303 JIT'ed] With JIT: [ 3573.759527] test_bpf: Summary: 311 PASSED, 0 FAILED, [303/303 JIT'ed] Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller arch/arm64/include/asm/insn.h | 30 ++++++++++++ arch/arm64/kernel/insn.c | 106 ++++++++++++++++++++++++++++++++++++++++++ arch/arm64/net/bpf_jit.h | 19 ++++++++ arch/arm64/net/bpf_jit_comp.c | 16 +++++-- lib/test_bpf.c | 105 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 271 insertions(+), 5 deletions(-) commit 204f144c9fcac355843412b6ba1150086488a208 Merge: da7b66f 801b25f Author: Linus Torvalds Date: Tue May 2 11:54:26 2017 -0700 Merge branch 'work.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull fs/compat.c cleanups from Al Viro: "More moving of compat syscalls from fs/compat.c to fs/*.c where the native counterparts live. And death to compat_sys_getdents64() - the only architecture that used to need it was ia64, and _that_ has lost biarch support quite a few years ago" * 'work.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs/compat.c: trim unused includes move compat_rw_copy_check_uvector() over to fs/read_write.c fhandle: move compat syscalls from compat.c open: move compat syscalls from compat.c stat: move compat syscalls from compat.c fcntl: move compat syscalls from compat.c readdir: move compat syscalls from compat.c statfs: move compat syscalls from compat.c utimes: move compat syscalls from compat.c move compat select-related syscalls to fs/select.c Remove compat_sys_getdents64() commit da7b66ffb2815800440d9e1649282a27c805304f Merge: 5b13475 13c0f52 Author: Linus Torvalds Date: Tue May 2 11:38:06 2017 -0700 Merge branch 'work.splice' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull splice updates from Al Viro: "These actually missed the last cycle; the branch itself is from last December" * 'work.splice' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: make nr_pages calculation in default_file_splice_read() a bit less ugly splice/tee/vmsplice: validate flags splice_pipe_desc: kill ->flags remove spd_release_page() commit 5b13475a5e12c49c24422ba1bd9998521dec1d4e Merge: 6fd4e7f a6a5993 Author: Linus Torvalds Date: Tue May 2 11:18:50 2017 -0700 Merge branch 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull iov_iter updates from Al Viro: "Cleanups that sat in -next + -stable fodder that has just missed 4.11. There's more iov_iter work in my local tree, but I'd prefer to push the stuff that had been in -next first" * 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: iov_iter: don't revert iov buffer if csum error generic_file_read_iter(): make use of iov_iter_revert() generic_file_direct_write(): make use of iov_iter_revert() orangefs: use iov_iter_revert() sctp: switch to copy_from_iter_full() net/9p: switch to copy_from_iter_full() switch memcpy_from_msg() to copy_from_iter_full() rds: make use of iov_iter_revert() commit 6fd4e7f7744bd7859ca3cae19c4613252ebb6bff Merge: 5958cc4 a6f74e8 Author: Linus Torvalds Date: Tue May 2 11:16:29 2017 -0700 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull CIFS fixes from Steve French: "Three cifs/smb3 fixes - including two for stable" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: cifs: don't check for failure from mempool_alloc() Do not return number of bytes written for ioctl CIFS_IOC_COPYCHUNK_FILE Fix match_prepath() commit 8a8b56638bcac4e64cccc88bf95a0f9f4b19a2fb Author: James Hogan Date: Fri Apr 28 10:50:26 2017 +0100 metag/uaccess: Fix access_ok() The __user_bad() macro used by access_ok() has a few corner cases noticed by Al Viro where it doesn't behave correctly: - The kernel range check has off by 1 errors which permit access to the first and last byte of the kernel mapped range. - The kernel range check ends at LINCORE_BASE rather than META_MEMORY_LIMIT, which is ineffective when the kernel is in global space (an extremely uncommon configuration). There are a couple of other shortcomings here too: - Access to the whole of the other address space is permitted (i.e. the global half of the address space when the kernel is in local space). This isn't ideal as it could theoretically still contain privileged mappings set up by the bootloader. - The size argument is unused, permitting user copies which start on valid pages at the end of the user address range and cross the boundary into the kernel address space (e.g. addr = 0x3ffffff0, size > 0x10). It isn't very convenient to add size checks when disallowing certain regions, and it seems far safer to be sure and explicit about what userland is able to access, so invert the logic to allow certain regions instead, and fix the off by 1 errors and missing size checks. This also allows the get_fs() == KERNEL_DS check to be more easily optimised into the user address range case. We now have 3 such allowed regions: - The user address range (incorporating the get_fs() == KERNEL_DS check). - NULL (some kernel code expects this to work, and we'll always catch the fault anyway). - The core code memory region. Fixes: 373cd784d0fc ("metag: Memory handling") Reported-by: Al Viro Signed-off-by: James Hogan Cc: linux-metag@vger.kernel.org Cc: stable@vger.kernel.org arch/metag/include/asm/uaccess.h | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) commit 5958cc49ed2961a059d92ae55afeeaba64a783a0 Merge: 2575be8 517e1fb Author: Linus Torvalds Date: Tue May 2 10:45:15 2017 -0700 Merge tag 'usercopy-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull hardened usercopy updates from Kees Cook: "A couple hardened usercopy changes: - drop now unneeded is_vmalloc_or_module() check (Laura Abbott) - use enum instead of literals for stack frame API (Sahara)" * tag 'usercopy-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: mm/usercopy: Drop extra is_vmalloc_or_module() check usercopy: Move enum for arch_within_stack_frames() commit 2575be8ad32f9910d7e7c118e73f529b8d5b8b7b Merge: c58d405 3a7d2fd Author: Linus Torvalds Date: Tue May 2 10:35:45 2017 -0700 Merge tag 'pstore-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore updates from Kees Cook: "This has a large internal refactoring along with several smaller fixes. - constify compression structures; Bhumika Goyal - restore powerpc dumping; Ankit Kumar - fix more bugs in the rarely exercises module unloading logic - reorganize filesystem locking to fix problems noticed by lockdep - refactor internal pstore APIs to make development and review easier: - improve error reporting - add kernel-doc structure and function comments - avoid insane argument passing by using a common record structure" * tag 'pstore-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: (23 commits) pstore: Solve lockdep warning by moving inode locks pstore: Fix flags to enable dumps on powerpc pstore: Remove unused vmalloc.h in pmsg pstore: simplify write_user_compat() pstore: Remove write_buf() callback pstore: Replace arguments for write_buf_user() API pstore: Replace arguments for write_buf() API pstore: Replace arguments for erase() API pstore: Do not duplicate record metadata pstore: Allocate records on heap instead of stack pstore: Pass record contents instead of copying pstore: Always allocate buffer for decompression pstore: Replace arguments for write() API pstore: Replace arguments for read() API pstore: Switch pstore_mkfile to pass record pstore: Move record decompression to function pstore: Extract common arguments into structure pstore: Add kernel-doc for struct pstore_info pstore: Improve register_pstore() error reporting pstore: Avoid race in module unloading ... commit 7a148c2fcff83309748bfaafe121aa85b724624f Author: Ming Lei Date: Tue May 2 07:28:02 2017 +0800 block: don't call blk_mq_quiesce_queue() after queue is frozen After queue is frozen, no request in this queue can be in use at all, so there can't be any .queue_rq() running on this queue. It isn't necessary to call blk_mq_quiesce_queue() any more, so remove it in both elevator_switch_mq() and blk_mq_update_nr_requests(). Cc: Bart Van Assche Signed-off-by: Ming Lei Fixed up the description a bit. Signed-off-by: Jens Axboe block/blk-mq.c | 2 -- block/elevator.c | 3 --- 2 files changed, 5 deletions(-) commit c58d4055c054fc6dc72f1be8bc71bd6fff209e48 Merge: ceb198b 9bb0e9c Author: Linus Torvalds Date: Tue May 2 10:21:17 2017 -0700 Merge tag 'docs-4.12' of git://git.lwn.net/linux Pull documentation update from Jonathan Corbet: "A reasonably busy cycle for documentation this time around. There is a new guide for user-space API documents, rather sparsely populated at the moment, but it's a start. Markus improved the infrastructure for converting diagrams. Mauro has converted much of the USB documentation over to RST. Plus the usual set of fixes, improvements, and tweaks. There's a bit more than the usual amount of reaching out of Documentation/ to fix comments elsewhere in the tree; I have acks for those where I could get them" * tag 'docs-4.12' of git://git.lwn.net/linux: (74 commits) docs: Fix a couple typos docs: Fix a spelling error in vfio-mediated-device.txt docs: Fix a spelling error in ioctl-number.txt MAINTAINERS: update file entry for HSI subsystem Documentation: allow installing man pages to a user defined directory Doc/PM: Sync with intel_powerclamp code behavior zr364xx.rst: usb/devices is now at /sys/kernel/debug/ usb.rst: move documentation from proc_usb_info.txt to USB ReST book convert philips.txt to ReST and add to media docs docs-rst: usb: update old usbfs-related documentation arm: Documentation: update a path name docs: process/4.Coding.rst: Fix a couple of document refs docs-rst: fix usb cross-references usb: gadget.h: be consistent at kernel doc macros usb: composite.h: fix two warnings when building docs usb: get rid of some ReST doc build errors usb.rst: get rid of some Sphinx errors usb/URB.txt: convert to ReST and update it usb/persist.txt: convert to ReST and add to driver-api book usb/hotplug.txt: convert to ReST and add to driver-api book ... commit 43b9176faae1543d1a190db8eb098a8284d364f3 Author: Shaoyun Liu Date: Fri Apr 28 16:14:59 2017 -0400 drm/amdgpu: Reserve 0-2 invalidation reg sets for none-amdgpu usages Firmware used reg set 2 for tlb invalidation. AMDGPU can start from reg set 3 to avoid the conflict. AMDKFD will use the reg set 0 or 1 when necesary. Signed-off-by: Shaoyun Liu Reviewws-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fca4ce697f304e5d1f739399d97cbfb2b918fa7f Author: Alex Deucher Date: Mon Apr 17 17:34:42 2017 -0400 drm/amdgpu/gfx9: add additional MQD initialization Need to properly set the ROQ space setting. Reviewed-by: monk liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0274a9c55614a5c89dd04bca376dbe252f5ea334 Author: Alex Deucher Date: Mon Apr 17 17:30:27 2017 -0400 drm/amdgpu/gfx9: fix typo in mpd init Using the wrong macro for soc15 register access. Reviewed-by: monk liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 42ce22439fdbbdb4d95d2979056ed5b075dd8403 Author: Alex Deucher Date: Mon May 1 16:20:42 2017 -0400 drm/amdgpu/gfx9: use actual gpu num se setting for ngg allocation Rather than using a hardcoded value. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 80112bffb0ed50257165f673aa73301a4458cd95 Author: Alex Deucher Date: Tue Apr 18 11:32:15 2017 -0400 drm/amdgpu: update revision id settings for BR/ST Add new RIDs. Acked-by: Christian König Acked-by: Alex Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit ceb198bb007b84ead867e87a71ffe715c4412b15 Merge: b68e7e9 f6ab4d5 Author: Linus Torvalds Date: Tue May 2 10:10:52 2017 -0700 Merge tag 'm68k-for-v4.12-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - more kernel message modernizations and cleanups - Mac and Nubus improvements and cleanups. * tag 'm68k-for-v4.12-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: nubus: Add MVC and VSC video card definitions nubus: Clean up whitespace nubus: Clean up printk calls nubus: Fix nubus_rewinddir m68k/mac: Clarify IOP message alloc/free confusion m68k/mac: Adopt platform_device_register_simple() m68k/mac: Modernize printing of kernel messages m68k/mac: IOP - Modernize printing of kernel messages commit b68e7e952f24527de62f4768b1cead91f92f5f6e Merge: d3b5d35 d0790fb Author: Linus Torvalds Date: Tue May 2 09:50:09 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Martin Schwidefsky: - three merges for KVM/s390 with changes for vfio-ccw and cpacf. The patches are included in the KVM tree as well, let git sort it out. - add the new 'trng' random number generator - provide the secure key verification API for the pkey interface - introduce the z13 cpu counters to perf - add a new system call to set up the guarded storage facility - simplify TASK_SIZE and arch_get_unmapped_area - export the raw STSI data related to CPU topology to user space - ... and the usual churn of bug-fixes and cleanups. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (74 commits) s390/crypt: use the correct module alias for paes_s390. s390/cpacf: Introduce kma instruction s390/cpacf: query instructions use unique parameters for compatibility with KMA s390/trng: Introduce s390 TRNG device driver. s390/crypto: Provide s390 specific arch random functionality. s390/crypto: Add new subfunctions to the cpacf PRNO function. s390/crypto: Renaming PPNO to PRNO. s390/pageattr: avoid unnecessary page table splitting s390/mm: simplify arch_get_unmapped_area[_topdown] s390/mm: make TASK_SIZE independent from the number of page table levels s390/gs: add regset for the guarded storage broadcast control block s390/kvm: Add use_cmma field to mm_context_t s390/kvm: Add PGSTE manipulation functions vfio: ccw: improve error handling for vfio_ccw_mdev_remove vfio: ccw: remove unnecessary NULL checks of a pointer s390/spinlock: remove compare and delay instruction s390/spinlock: use atomic primitives for spinlocks s390/cpumf: simplify detection of guest samples s390/pci: remove forward declaration s390/pci: increase the PCI_NR_FUNCTIONS default ... commit 0337966d121ebebf73a1c346123e8112796e684e Merge: 7c5bb4a 8a038b8 Author: Dmitry Torokhov Date: Tue May 2 09:48:26 2017 -0700 Merge branch 'next' into for-linus Prepare input updates for 4.12 merge window. commit 1dbdcc810928a2c1acdd0bbfce9495f63610a0d1 Author: Timur Tabi Date: Mon May 1 14:23:04 2017 -0500 selftests: watchdog: accept multiple params on command line Watchdog drivers are not required to retain programming information, such as timeouts, after the watchdog device is closed. Therefore, the watchdog test should be able to perform multiple actions after opening the watchdog device. For example, to set the timeout to 10s and ping every 5s: watchdog-test -t 10 -p 5 -e Also, display the periodic decimal point only if the keep-alive call succeeds. Signed-off-by: Timur Tabi Reviewed-by: Guenter Roeck Signed-off-by: Shuah Khan tools/testing/selftests/watchdog/watchdog-test.c | 61 +++++++++++++----------- 1 file changed, 34 insertions(+), 27 deletions(-) commit 5f0114832a6eca70ee7563ba99b8e32da68f944b Author: Trond Myklebust Date: Mon May 1 17:35:58 2017 -0400 pNFS: Fix a typo in pnfs_generic_alloc_ds_commits If the layout segment is invalid, we want to just resend the remaining writes. Signed-off-by: Trond Myklebust fs/nfs/pnfs_nfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61f454e30c18a28924e96be12592c0d5e24bcc81 Author: Trond Myklebust Date: Mon May 1 17:06:56 2017 -0400 pNFS: Fix a deadlock when coalescing writes and returning the layout Consider the following deadlock: Process P1 Process P2 Process P3 ========== ========== ========== lock_page(page) lseg = pnfs_update_layout(inode) lo = NFS_I(inode)->layout pnfs_error_mark_layout_for_return(lo) lock_page(page) lseg = pnfs_update_layout(inode) In this scenario, - P1 has declared the layout to be in error, but P2 holds a reference to a layout segment on that inode, so the layoutreturn is deferred. - P2 is waiting for a page lock held by P3. - P3 is asking for a new layout segment, but is blocked waiting for the layoutreturn. The fix is to ensure that pnfs_error_mark_layout_for_return() does not set the NFS_LAYOUT_RETURN flag, which blocks P3. Instead, we allow the latter to call LAYOUTGET so that it can make progress and unblock P2. Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 2 -- 1 file changed, 2 deletions(-) commit 5466d21411baf413c838d9a197f6734e94910a65 Author: Trond Myklebust Date: Mon May 1 17:03:44 2017 -0400 pNFS: Don't clear the layout return info if there are segments to return In pnfs_clear_layoutreturn_info, ensure that we don't clear the layout return info if there are new segments queued for return due to, for instance, a race between a LAYOUTRETURN and a failed I/O attempt. Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 933dfbd7c437bbbf65caae785dfa105fbfaa8485 Author: Paul E. McKenney Date: Tue May 2 08:48:33 2017 -0700 rcu: Open-code the rcu_cblist_n_lazy_cbs() function Because the rcu_cblist_n_lazy_cbs() just samples the ->len_lazy counter, and because the rcu_cblist structure is quite straightforward, it makes sense to open-code rcu_cblist_n_lazy_cbs(p) as p->len_lazy, cutting out a level of indirection. This commit makes this change. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds kernel/rcu/rcu_segcblist.h | 6 ------ kernel/rcu/tree.c | 2 +- kernel/rcu/tree_plugin.h | 2 +- kernel/rcu/tree_trace.c | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-) commit 4b27f20b40a23f03df682eb1f69e9dc3da7d3b93 Author: Paul E. McKenney Date: Tue May 2 08:45:25 2017 -0700 rcu: Open-code the rcu_cblist_n_cbs() function Because the rcu_cblist_n_cbs() just samples the ->len counter, and because the rcu_cblist structure is quite straightforward, it makes sense to open-code rcu_cblist_n_cbs(p) as p->len, cutting out a level of indirection. This commit makes this change. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds kernel/rcu/rcu_segcblist.h | 6 ------ kernel/rcu/tree.c | 9 ++++----- kernel/rcu/tree_plugin.h | 2 +- kernel/rcu/tree_trace.c | 2 +- 4 files changed, 6 insertions(+), 13 deletions(-) commit a481649e1c2a4900450e967165524282bbdf91e0 Merge: 4e9c3a6 586f852 Author: David S. Miller Date: Tue May 2 11:46:29 2017 -0400 Merge branch 'bpf-test-prog-fixes' I say: ==================== Fix some bpf program testing framework bugs This series fixes two issue: 1) Accidental user pointer dereference in bpf_test_finish() 2) The packet data given to the test programs is not aligned correctly The first issue is fixed simply because we have a kernel side copy of the datastructure in question already. And the second bug is a simple matter of applying NET_IP_ALIGN where needed. ==================== Signed-off-by: David S. Miller commit 586f8525979ad9574bf61637fd58c98d5077f29d Author: David Miller Date: Tue May 2 11:36:45 2017 -0400 bpf: Align packet data properly in program testing framework. Make sure we apply NET_IP_ALIGN when reserving headroom for SKB and XDP test runs, just like a real driver would. Signed-off-by: David S. Miller Acked-by: Daniel Borkmann net/bpf/test_run.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 78e5227237cae9172dd50c3ebb08d4fb31530676 Author: David Miller Date: Tue May 2 11:36:33 2017 -0400 bpf: Do not dereference user pointer in bpf_test_finish(). Instead, pass the kattr in which has a kernel side copy of this data structure from userspace already. Fix based upon a suggestion from Alexei Starovoitov. Signed-off-by: David S. Miller Acked-by: Daniel Borkmann net/bpf/test_run.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 8ef0f37efb7863a04b1e4102d42b7c0b1a59d40f Author: Paul E. McKenney Date: Tue May 2 08:18:40 2017 -0700 rcu: Open-code the rcu_cblist_empty() function Because the rcu_cblist_empty() just samples the ->head pointer, and because the rcu_cblist structure is quite straightforward, it makes sense to open-code rcu_cblist_empty(p) as !p->head, cutting out a level of indirection. This commit makes this change. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Linus Torvalds kernel/rcu/rcu_segcblist.h | 8 +------- kernel/rcu/tree.c | 9 ++++----- kernel/rcu/tree_plugin.h | 4 ++-- 3 files changed, 7 insertions(+), 14 deletions(-) commit 4e9c3a667135799d50f2778a8a8dae2ca13aafd0 Author: David S. Miller Date: Tue May 2 07:52:01 2017 -0700 selftests: bpf: Use bpf_endian.h in test_xdp.c This fixes the testcase on big-endian. Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_xdp.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 24b43c99647bf9be4995e6a6c9c3a923c147770a Author: Paolo Abeni Date: Tue May 2 16:03:58 2017 +0200 infiniband: avoid dereferencing uninitialized dst on error path With commit eea40b8f624f ("infiniband: call ipv6 route lookup via the stub interface"), if the route lookup fails due to ipv6 being disabled, the dst variable is left untouched, and the following dst_release() may access uninitialized memory. Since ipv6_dst_lookup() always sets dst to NULL in case of lookup failure with ipv6 enabled, fix the above just returning the error code if the lookup fails. Fixes: eea40b8f624 ("infiniband: call ipv6 route lookup via the stub interface") Reported-by: Sabrina Dubroca Signed-off-by: Paolo Abeni Reviewed-by: Sabrina Dubroca Signed-off-by: Doug Ledford drivers/infiniband/core/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98059b98619d093366462ff0a4e1258e946accb9 Author: Paul E. McKenney Date: Tue May 2 06:30:12 2017 -0700 rcu: Separately compile large rcu_segcblist functions This commit creates a new kernel/rcu/rcu_segcblist.c file that contains non-trivial segcblist functions. Trivial functions remain as static inline functions in kernel/rcu/rcu_segcblist.h Reported-by: Linus Torvalds Signed-off-by: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner init/Kconfig | 3 + kernel/rcu/Makefile | 1 + kernel/rcu/rcu_segcblist.c | 505 ++++++++++++++++++++++++++++++++++++++++++ kernel/rcu/rcu_segcblist.h | 533 +++------------------------------------------ 4 files changed, 544 insertions(+), 498 deletions(-) commit 48d0e023af9799cd7220335baf8e3ba61eeafbeb Author: Paul Moore Date: Tue May 2 10:16:05 2017 -0400 audit: fix the RCU locking for the auditd_connection structure Cong Wang correctly pointed out that the RCU read locking of the auditd_connection struct was wrong, this patch correct this by adopting a more traditional, and correct RCU locking model. This patch is heavily based on an earlier prototype by Cong Wang. Cc: # 4.11.x- Reported-by: Cong Wang Signed-off-by: Cong Wang Signed-off-by: Paul Moore kernel/audit.c | 157 ++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 100 insertions(+), 57 deletions(-) commit 8cc96382d9a7fe1746286670dd5140c3b12638ae Author: Paul Moore Date: Tue May 2 10:16:05 2017 -0400 audit: use kmem_cache to manage the audit_buffer cache The audit subsystem implemented its own buffer cache mechanism which is a bit silly these days when we could use the kmem_cache construct. Some credit is due to Florian Westphal for originally proposing that we remove the audit cache implementation in favor of simple kmalloc()/kfree() calls, but I would rather have a dedicated slab cache to ease debugging and future stats/performance work. Cc: Florian Westphal Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/audit.c | 66 +++++++++++++++------------------------------------------- 1 file changed, 17 insertions(+), 49 deletions(-) commit 2115bb250f260089743e26decfb5f271ba71ca37 Author: Deepa Dinamani Date: Tue May 2 10:16:05 2017 -0400 audit: Use timespec64 to represent audit timestamps struct timespec is not y2038 safe. Audit timestamps are recorded in string format into an audit buffer for a given context. These mark the entry timestamps for the syscalls. Use y2038 safe struct timespec64 to represent the times. The log strings can handle this transition as strings can hold upto 1024 characters. Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann Acked-by: Paul Moore Acked-by: Richard Guy Briggs Signed-off-by: Paul Moore include/linux/audit.h | 4 ++-- kernel/audit.c | 10 +++++----- kernel/audit.h | 2 +- kernel/auditsc.c | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) commit b6c7c115c2ce679ac536f0adf0ff518fcd939196 Author: Paul Moore Date: Tue May 2 10:16:05 2017 -0400 audit: store the auditd PID as a pid struct instead of pid_t This is arguably the right thing to do, and will make it easier when we start supporting multiple audit daemons in different namespaces. Signed-off-by: Paul Moore kernel/audit.c | 84 +++++++++++++++++++++++++++++++++++++++------------------- kernel/audit.h | 2 +- 2 files changed, 58 insertions(+), 28 deletions(-) commit 45a0642b4d021a2f50d5db9c191b5bfe60bfa1c7 Author: Paul Moore Date: Tue May 2 10:16:05 2017 -0400 audit: kernel generated netlink traffic should have a portid of 0 We were setting the portid incorrectly in the netlink message headers, fix that to always be 0 (nlmsg_pid = 0). Signed-off-by: Paul Moore Reviewed-by: Richard Guy Briggs include/linux/audit.h | 3 +-- kernel/audit.c | 23 ++++++----------------- kernel/audit.h | 3 +-- kernel/auditfilter.c | 14 ++++++-------- 4 files changed, 14 insertions(+), 29 deletions(-) commit a9d1620877748375cf60b43ef3fa5f61ab6d9f24 Author: Paul Moore Date: Tue May 2 10:16:05 2017 -0400 audit: combine audit_receive() and audit_receive_skb() There is no reason to have both of these functions, combine the two. Signed-off-by: Paul Moore Reviewed-by: Richard Guy Briggs kernel/audit.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit bd120ded6a6af61ad342a8a95b36b64bd1e2f9e6 Author: Elena Reshetova Date: Tue May 2 10:16:05 2017 -0400 audit: convert audit_watch.count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor [PM: fix subject line, add #include] Signed-off-by: Paul Moore kernel/audit_watch.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 9d2378f8c8f1a3fcfab681fd90c139d90dca7b69 Author: Elena Reshetova Date: Tue May 2 10:16:04 2017 -0400 audit: convert audit_tree.count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor [PM: fix subject line, add #include] Signed-off-by: Paul Moore kernel/audit_tree.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 2173c519d5e912a6e2934bb04255fcd36c1591c8 Author: Richard Guy Briggs Date: Tue May 2 10:16:04 2017 -0400 audit: normalize NETFILTER_PKT Eliminate flipping in and out of message fields, dropping fields in the process. Sample raw message format IPv4 UDP: type=NETFILTER_PKT msg=audit(1487874761.386:228): mark=0xae8a2732 saddr=127.0.0.1 daddr=127.0.0.1 proto=17^] Sample raw message format IPv6 ICMP6: type=NETFILTER_PKT msg=audit(1487874761.381:227): mark=0x223894b7 saddr=::1 daddr=::1 proto=58^] Issue: https://github.com/linux-audit/audit-kernel/issues/11 Test case: https://github.com/linux-audit/audit-testsuite/issues/43 Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore net/netfilter/xt_AUDIT.c | 124 +++++++++++------------------------------------ 1 file changed, 27 insertions(+), 97 deletions(-) commit 0cb88b6ff054ccfa30e0fd7f7b42ee9f088db432 Author: Richard Guy Briggs Date: Tue May 2 10:16:04 2017 -0400 netfilter: use consistent ipv4 network offset in xt_AUDIT Even though the skb->data pointer has been moved from the link layer header to the network layer header, use the same method to calculate the offset in ipv4 and ipv6 routines. Signed-off-by: Richard Guy Briggs [PM: munged subject line] Signed-off-by: Paul Moore net/netfilter/xt_AUDIT.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6276ac95bde4312251535904af32b1de9d54949 Author: Richard Guy Briggs Date: Tue May 2 10:16:04 2017 -0400 audit: log module name on delete_module When a sysadmin wishes to monitor module unloading with a syscall rule such as: -a always,exit -F arch=x86_64 -S delete_module -F key=mod-unload the SYSCALL record doesn't tell us what module was requested for unloading. Use the new KERN_MODULE auxiliary record to record it. The SYSCALL record result code will list the return code. See: https://github.com/linux-audit/audit-kernel/issues/37 https://github.com/linux-audit/audit-kernel/issues/7 https://github.com/linux-audit/audit-kernel/wiki/RFE-Module-Load-Record-Format Signed-off-by: Richard Guy Briggs Acked-by: Jessica Yu Signed-off-by: Paul Moore kernel/module.c | 2 ++ 1 file changed, 2 insertions(+) commit 9aab4f4ea7a4ca80ec3e0269ce2eb71a24f6fef9 Author: Nicholas Mc Guire Date: Tue May 2 10:16:04 2017 -0400 audit: remove unnecessary semicolon in audit_watch_handle_event() The excess ; after the closing parenthesis is just code-noise it has no and can be removed. Signed-off-by: Nicholas Mc Guire [PM: tweaked subject line] Signed-off-by: Paul Moore kernel/audit_watch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5239fba69949a44290d4af517fc1c2eff3e36f6 Author: Nicholas Mc Guire Date: Tue May 2 10:16:04 2017 -0400 audit: remove unnecessary semicolon in audit_mark_handle_event() The excess ; after the closing parenthesis is just code-noise it has no and can be removed. Signed-off-by: Nicholas Mc Guire [PM: tweaked subject line] Signed-off-by: Paul Moore kernel/audit_fsnotify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7a84deaf8d1b0e62b437a290a40d6380975f126 Author: Nicholas Mc Guire Date: Tue May 2 10:16:03 2017 -0400 audit: remove unnecessary semicolon in audit_field_valid() The excess ; after the closing parenthesis is just code-noise it has no and can be removed. Signed-off-by: Nicholas Mc Guire [PM: tweak subject line] Signed-off-by: Paul Moore kernel/auditfilter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d6296d39e90c9075bc2fc15f1e86dac44930d4b5 Author: Christoph Hellwig Date: Mon May 1 10:19:08 2017 -0600 blk-mq: update ->init_request and ->exit_request prototypes Remove the request_idx parameter, which can't be used safely now that we support I/O schedulers with blk-mq. Except for a superflous check in mtip32xx it was unused anyway. Also pass the tag_set instead of just the driver data - this allows drivers to avoid some code duplication in a follow on cleanup. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq.c | 18 +++++------------- drivers/block/loop.c | 5 ++--- drivers/block/mtip32xx/mtip32xx.c | 20 ++++++-------------- drivers/block/nbd.c | 7 +++---- drivers/block/rbd.c | 5 ++--- drivers/block/virtio_blk.c | 7 +++---- drivers/md/dm-rq.c | 7 +++---- drivers/mtd/ubi/block.c | 7 +++---- drivers/nvme/host/fc.c | 20 +++++++++----------- drivers/nvme/host/pci.c | 15 +++++++-------- drivers/nvme/host/rdma.c | 28 ++++++++++++++-------------- drivers/nvme/target/loop.c | 17 +++++++++-------- drivers/scsi/scsi_lib.c | 13 ++++++------- include/linux/blk-mq.h | 4 ++-- 14 files changed, 74 insertions(+), 99 deletions(-) commit a800ce8ba53da88571872cbccb0e2fff8e374752 Author: Jens Axboe Date: Thu Apr 27 16:46:02 2017 -0600 Revert "mtip32xx: pass BLK_MQ_F_NO_SCHED" This reverts commit 4981d04dd8f1ab19e2cce008da556d7f099b6e68. The driver has been converted to using the proper infrastructure for issuing internal commands. This means it's now safe to use with the scheduling infrastruture, so we can now revert the change that turned off scheduling for mtip32xx. Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Tested-by: Ming Lei Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f2779bff2f178496fb00b89797734ee245d2c93 Author: Jens Axboe Date: Fri Apr 28 08:53:01 2017 -0600 blk-mq-sched: remove hack that bypasses scheduler for reserved requests We have update the troublesome driver (mtip32xx) to deal with this appropriately. So kill the hack that bypassed scheduler allocation and insertion for reserved requests. Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Tested-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq-sched.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 3f5e6a35774cd6bb4fd6b32edb4efd2a3f90e4dd Author: Jens Axboe Date: Fri Apr 28 10:45:08 2017 -0600 mtip32xx: convert internal command issue to block IO path The driver special cases certain things for command issue, depending on whether it's an internal command or not. Make the internal commands use the regular infrastructure for issuing IO. Since this is an 8-group souped up AHCI variant, we have to deal with NCQ vs non-queueable commands. Do this from the queue_rq handler, by backing off unless the drive is idle. Reviewed-by: Christoph Hellwig Tested-by: Ming Lei Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 103 +++++++++++++++++++++++++++----------- 1 file changed, 73 insertions(+), 30 deletions(-) commit baed548a98397f57a71d61917177f7d42ab17881 Author: Jens Axboe Date: Fri Apr 28 07:54:06 2017 -0600 mtip32xx: abstract out "are any commands active" helper This is a prep patch for backoff in ->queue_rq() for non-ncq commands. Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Tested-by: Ming Lei Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit 8afdd94c74e416de74a8ee61d79e4bf93466420b Author: Jens Axboe Date: Thu Apr 27 16:32:41 2017 -0600 mtip32xx: kill atomic argument to mtip_quiesce_io() All callers now pass in GFP_KERNEL, get rid of the argument. Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Tested-by: Ming Lei Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit 0f6422a2c57c6afcf66ead903dc3fa6641184aa4 Author: Jens Axboe Date: Thu Apr 27 16:29:26 2017 -0600 mtip32xx: get rid of 'atomic' argument to mtip_exec_internal_command() All callers can safely block. Kill the atomic/block argument, and remove the argument from all callers. Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Tested-by: Ming Lei Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 148 +++++++++++--------------------------- 1 file changed, 43 insertions(+), 105 deletions(-) commit c0332694903a37cf8ecdc9102d5c9e09cf8643d0 Author: Bart Van Assche Date: Mon May 1 08:58:49 2017 -0700 block: Remove elevator_change() Since commit 84253394927c ("remove the mg_disk driver") removed the only caller of elevator_change(), also remove the elevator_change() function itself. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Markus Trippelsdorf Signed-off-by: Jens Axboe block/elevator.c | 13 ------------- include/linux/elevator.h | 1 - 2 files changed, 14 deletions(-) commit b5d60989c6f7501af72cb65893c02621dd16fd84 Author: Jakub Kicinski Date: Mon May 1 15:53:43 2017 -0700 xdp: fix parameter kdoc for extack Fix kdoc parameter spelling from extact to extack. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb6211d3606971a957fea28f7532687f9d0f93f2 Author: Daniel Borkmann Date: Tue May 2 00:47:09 2017 +0200 bpf, samples: fix build warning in cookie_uid_helper_example Fix the following warnings triggered by 51570a5ab2b7 ("A Sample of using socket cookie and uid for traffic monitoring"): In file included from /home/foo/net-next/samples/bpf/cookie_uid_helper_example.c:54:0: /home/foo/net-next/samples/bpf/cookie_uid_helper_example.c: In function 'prog_load': /home/foo/net-next/samples/bpf/cookie_uid_helper_example.c:119:27: warning: overflow in implicit constant conversion [-Woverflow] -32 + offsetof(struct stats, uid)), ^ /home/foo/net-next/samples/bpf/libbpf.h:135:12: note: in definition of macro 'BPF_STX_MEM' .off = OFF, \ ^ /home/foo/net-next/samples/bpf/cookie_uid_helper_example.c:121:27: warning: overflow in implicit constant conversion [-Woverflow] -32 + offsetof(struct stats, packets), 1), ^ /home/foo/net-next/samples/bpf/libbpf.h:155:12: note: in definition of macro 'BPF_ST_MEM' .off = OFF, \ ^ /home/foo/net-next/samples/bpf/cookie_uid_helper_example.c:129:27: warning: overflow in implicit constant conversion [-Woverflow] -32 + offsetof(struct stats, bytes)), ^ /home/foo/net-next/samples/bpf/libbpf.h:135:12: note: in definition of macro 'BPF_STX_MEM' .off = OFF, \ ^ HOSTLD /home/foo/net-next/samples/bpf/per_socket_stats_example Fixes: 51570a5ab2b7 ("A Sample of using socket cookie and uid for traffic monitoring") Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/cookie_uid_helper_example.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 45753c5f315749711b935a2506ee5c10eef5c23d Author: Ingo Molnar Date: Tue May 2 10:31:18 2017 +0200 srcu: Debloat the header Linus noticed that the has huge inline functions which should not be inline at all. As a first step in cleaning this up, move them all to kernel/rcu/ and only keep an absolute minimum of data type defines in the header: before: -rw-r--r-- 1 mingo mingo 22284 May 2 10:25 include/linux/rcu_segcblist.h after: -rw-r--r-- 1 mingo mingo 3180 May 2 10:22 include/linux/rcu_segcblist.h More can be done, such as uninlining the large functions, which inlining is unjustified even if it's an RCU internal matter. Reported-by: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar Signed-off-by: Paul E. McKenney include/linux/rcu_segcblist.h | 628 +--------------------------------------- kernel/rcu/rcu_segcblist.h | 645 ++++++++++++++++++++++++++++++++++++++++++ kernel/rcu/srcutiny.c | 1 + kernel/rcu/srcutree.c | 1 + kernel/rcu/tree.h | 3 +- 5 files changed, 652 insertions(+), 626 deletions(-) commit 5c0aea0e8d98e38858fbb3a09870ed8487a01da2 Author: David Hildenbrand Date: Fri Apr 28 17:06:20 2017 +0200 KVM: x86: don't hold kvm->lock in KVM_SET_GSI_ROUTING We needed the lock to avoid racing with creation of the irqchip on x86. As kvm_set_irq_routing() calls srcu_synchronize_expedited(), this lock might be held for a longer time. Let's introduce an arch specific callback to check if we can actually add irq routes. For x86, all we have to do is check if we have an irqchip in the kernel. We don't need kvm->lock at that point as the irqchip is marked as inititalized only when actually fully created. Reported-by: Steve Rutherford Reviewed-by: Radim Krčmář Fixes: 1df6ddede10a ("KVM: x86: race between KVM_SET_GSI_ROUTING and KVM_CREATE_IRQCHIP") Signed-off-by: David Hildenbrand Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 - arch/x86/kvm/irq.h | 2 +- arch/x86/kvm/irq_comm.c | 15 +++++++++------ arch/x86/kvm/x86.c | 11 +---------- include/linux/kvm_host.h | 1 + virt/kvm/irqchip.c | 5 +++++ virt/kvm/kvm_main.c | 5 ++--- 7 files changed, 19 insertions(+), 21 deletions(-) commit c0b64978f09195e00d6649ca0ad0242a80e6e99a Author: Russell Currey Date: Wed Apr 19 17:39:27 2017 +1000 powerpc/eeh: Clean up and document event handling functions Remove unnecessary tags in eeh_handle_normal_event(), and add function comments for eeh_handle_normal_event() and eeh_handle_special_event(). The only functional difference is that in the case of a PE reaching the maximum number of failures, rather than one message telling you of this and suggesting you reseat the device, there are two separate messages. Suggested-by: Alexey Kardashevskiy Signed-off-by: Russell Currey Reviewed-by: Andrew Donnellan Reviewed-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_driver.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) commit daeba2956f32f91f3493788ff6ee02fb1b2f02fa Author: Russell Currey Date: Wed Apr 19 17:39:26 2017 +1000 powerpc/eeh: Avoid use after free in eeh_handle_special_event() eeh_handle_special_event() is called when an EEH event is detected but can't be narrowed down to a specific PE. This function looks through every PE to find one in an erroneous state, then calls the regular event handler eeh_handle_normal_event() once it knows which PE has an error. However, if eeh_handle_normal_event() found that the PE cannot possibly be recovered, it will free it, rendering the passed PE stale. This leads to a use after free in eeh_handle_special_event() as it attempts to clear the "recovering" state on the PE after eeh_handle_normal_event() returns. Thus, make sure the PE is valid when attempting to clear state in eeh_handle_special_event(). Fixes: 8a6b1bc70dbb ("powerpc/eeh: EEH core to handle special event") Cc: stable@vger.kernel.org # v3.11+ Reported-by: Alexey Kardashevskiy Signed-off-by: Russell Currey Reviewed-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_driver.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit a715626a8e904e7226915d1bc4885317ea9da141 Author: Alastair D'Silva Date: Mon May 1 10:53:31 2017 +1000 cxl: Mask slice error interrupts after first occurrence In some situations, a faulty AFU slice may create an interrupt storm of slice errors, rendering the machine unusable. Since these interrupts are informational only, present the interrupt once, then mask it off to prevent it from being retriggered until the AFU is reset. Signed-off-by: Alastair D'Silva Reviewed-by: Andrew Donnellan Reviewed-by: Vaibhav Jain Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 18 ++++++++++++++++++ drivers/misc/cxl/native.c | 19 +++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) commit 4f58f0bf155e87dda31a3088b1e107fa9dd79f0e Author: Vaibhav Jain Date: Thu Apr 27 10:58:22 2017 +0530 cxl: Route eeh events to all drivers in cxl_pci_error_detected() Fix a boundary condition where in some cases an eeh event that results in card reset isn't passed on to a driver attached to the virtual PCI device associated with a slice. This will happen in case when a slice attached device driver returns a value other than PCI_ERS_RESULT_NEED_RESET from the eeh error_detected() callback. This would result in an early return from cxl_pci_error_detected() and other drivers attached to other AFUs on the card wont be notified. The patch fixes this by making sure that all slice attached device-drivers are notified and the return values from error_detected() callback are aggregated in a scheme where request for 'disconnect' trumps all and 'none' trumps 'need_reset'. Fixes: 9e8df8a21963 ("cxl: EEH support") Cc: stable@vger.kernel.org # v4.3+ Signed-off-by: Vaibhav Jain Reviewed-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/pci.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit ea9a26d117cf0637c71d3e0076f4a124bf5859df Author: Vaibhav Jain Date: Thu Apr 27 10:53:25 2017 +0530 cxl: Force context lock during EEH flow During an eeh event when the cxl card is fenced and card sysfs attr perst_reloads_same_image is set following warning message is seen in the kernel logs: Adapter context unlocked with 0 active contexts ------------[ cut here ]------------ WARNING: CPU: 12 PID: 627 at ../drivers/misc/cxl/main.c:325 cxl_adapter_context_unlock+0x60/0x80 [cxl] Even though this warning is harmless, it clutters the kernel log during an eeh event. This warning is triggered as the EEH callback cxl_pci_error_detected doesn't obtain a context-lock before forcibly detaching all active context and when context-lock is released during call to cxl_configure_adapter from cxl_pci_slot_reset, a warning in cxl_adapter_context_unlock is triggered. To fix this warning, we acquire the adapter context-lock via cxl_adapter_context_lock() in the eeh callback cxl_pci_error_detected() once all the virtual AFU PHBs are notified and their contexts detached. The context-lock is released in cxl_pci_slot_reset() after the adapter is successfully reconfigured and before the we call the slot_reset callback on slice attached device-drivers. Fixes: 70b565bbdb91 ("cxl: Prevent adapter reset if an active context exists") Cc: stable@vger.kernel.org # v4.9+ Reported-by: Andrew Donnellan Signed-off-by: Vaibhav Jain Acked-by: Frederic Barrat Reviewed-by: Matthew R. Ochs Tested-by: Uma Krishnan Signed-off-by: Michael Ellerman drivers/misc/cxl/pci.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 5c9cfda13dc503f4b25b486a57974e0414adb6f1 Author: Karim Eshapa Date: Tue May 2 13:47:54 2017 +0200 drivers/video/fbdev/omap/lcd_mipid.c: Use time comparison kernel macros Use time_before_eq time comparison defind kernel macro that has safety check. Signed-off-by: Karim Eshapa Cc: Tomi Valkeinen Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/omap/lcd_mipid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc85e9a87420613b3129d5cc5ecd79c58351c546 Author: Alexey Khoroshilov Date: Tue May 2 13:47:53 2017 +0200 sm501fb: don't return zero on failure path in sm501fb_start() If fbmem iomemory mapping failed, sm501fb_start() breaks off initialization, deallocates resources, but returns zero. As a result, double deallocation can happen in sm501fb_stop(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Cc: Tomi Valkeinen Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sm501fb.c | 1 + 1 file changed, 1 insertion(+) commit 45f580c42e5c125d55dbd8099750a1998de3d917 Author: Maksim Salau Date: Tue May 2 13:47:53 2017 +0200 video: fbdev: udlfb: Fix buffer on stack Allocate buffers on HEAP instead of STACK for local array that is to be sent using usb_control_msg(). Signed-off-by: Maksim Salau Cc: Bernie Thompson Cc: Geert Uytterhoeven Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/udlfb.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit e371fd7607999fabbd955b4d22c8e912594a7997 Author: Julien Grall Date: Mon Apr 24 18:58:39 2017 +0100 xen: Implement EFI reset_system callback When rebooting DOM0 with ACPI on ARM64, the kernel is crashing with the stack trace [1]. This is happening because when EFI runtimes are enabled, the reset code (see machine_restart) will first try to use EFI restart method. However, the EFI restart code is expecting the reset_system callback to be always set. This is not the case for Xen and will lead to crash. The EFI restart helper is used in multiple places and some of them don't not have fallback (see machine_power_off). So implement reset_system callback as a call to xen_reboot when using EFI Xen. [ 36.999270] reboot: Restarting system [ 37.002921] Internal error: Attempting to execute userspace memory: 86000004 [#1] PREEMPT SMP [ 37.011460] Modules linked in: [ 37.014598] CPU: 0 PID: 1 Comm: systemd-shutdow Not tainted 4.11.0-rc1-00003-g1e248b60a39b-dirty #506 [ 37.023903] Hardware name: (null) (DT) [ 37.027734] task: ffff800902068000 task.stack: ffff800902064000 [ 37.033739] PC is at 0x0 [ 37.036359] LR is at efi_reboot+0x94/0xd0 [ 37.040438] pc : [<0000000000000000>] lr : [] pstate: 404001c5 [ 37.047920] sp : ffff800902067cf0 [ 37.051314] x29: ffff800902067cf0 x28: ffff800902068000 [ 37.056709] x27: ffff000008992000 x26: 000000000000008e [ 37.062104] x25: 0000000000000123 x24: 0000000000000015 [ 37.067499] x23: 0000000000000000 x22: ffff000008e6e250 [ 37.072894] x21: ffff000008e6e000 x20: 0000000000000000 [ 37.078289] x19: ffff000008e5d4c8 x18: 0000000000000010 [ 37.083684] x17: 0000ffffa7c27470 x16: 00000000deadbeef [ 37.089079] x15: 0000000000000006 x14: ffff000088f42bef [ 37.094474] x13: ffff000008f42bfd x12: ffff000008e706c0 [ 37.099870] x11: ffff000008e70000 x10: 0000000005f5e0ff [ 37.105265] x9 : ffff800902067a50 x8 : 6974726174736552 [ 37.110660] x7 : ffff000008cc6fb8 x6 : ffff000008cc6fb0 [ 37.116055] x5 : ffff000008c97dd8 x4 : 0000000000000000 [ 37.121453] x3 : 0000000000000000 x2 : 0000000000000000 [ 37.126845] x1 : 0000000000000000 x0 : 0000000000000000 [ 37.132239] [ 37.133808] Process systemd-shutdow (pid: 1, stack limit = 0xffff800902064000) [ 37.141118] Stack: (0xffff800902067cf0 to 0xffff800902068000) [ 37.146949] 7ce0: ffff800902067d40 ffff000008085334 [ 37.154869] 7d00: 0000000000000000 ffff000008f3b000 ffff800902067d40 ffff0000080852e0 [ 37.162787] 7d20: ffff000008cc6fb0 ffff000008cc6fb8 ffff000008c7f580 ffff000008c97dd8 [ 37.170706] 7d40: ffff800902067d60 ffff0000080e2c2c 0000000000000000 0000000001234567 [ 37.178624] 7d60: ffff800902067d80 ffff0000080e2ee8 0000000000000000 ffff0000080e2df4 [ 37.186544] 7d80: 0000000000000000 ffff0000080830f0 0000000000000000 00008008ff1c1000 [ 37.194462] 7da0: ffffffffffffffff 0000ffffa7c4b1cc 0000000000000000 0000000000000024 [ 37.202380] 7dc0: ffff800902067dd0 0000000000000005 0000fffff24743c8 0000000000000004 [ 37.210299] 7de0: 0000fffff2475f03 0000000000000010 0000fffff2474418 0000000000000005 [ 37.218218] 7e00: 0000fffff2474578 000000000000000a 0000aaaad6b722c0 0000000000000001 [ 37.226136] 7e20: 0000000000000123 0000000000000038 ffff800902067e50 ffff0000081e7294 [ 37.234055] 7e40: ffff800902067e60 ffff0000081e935c ffff800902067e60 ffff0000081e9388 [ 37.241973] 7e60: ffff800902067eb0 ffff0000081ea388 0000000000000000 00008008ff1c1000 [ 37.249892] 7e80: ffffffffffffffff 0000ffffa7c4a79c 0000000000000000 ffff000000020000 [ 37.257810] 7ea0: 0000010000000004 0000000000000000 0000000000000000 ffff0000080830f0 [ 37.265729] 7ec0: fffffffffee1dead 0000000028121969 0000000001234567 0000000000000000 [ 37.273651] 7ee0: ffffffffffffffff 8080000000800000 0000800000008080 feffa9a9d4ff2d66 [ 37.281567] 7f00: 000000000000008e feffa9a9d5b60e0f 7f7fffffffff7f7f 0101010101010101 [ 37.289485] 7f20: 0000000000000010 0000000000000008 000000000000003a 0000ffffa7ccf588 [ 37.297404] 7f40: 0000aaaad6b87d00 0000ffffa7c4b1b0 0000fffff2474be0 0000aaaad6b88000 [ 37.305326] 7f60: 0000fffff2474fb0 0000000001234567 0000000000000000 0000000000000000 [ 37.313240] 7f80: 0000000000000000 0000000000000001 0000aaaad6b70d4d 0000000000000000 [ 37.321159] 7fa0: 0000000000000001 0000fffff2474ea0 0000aaaad6b5e2e0 0000fffff2474e80 [ 37.329078] 7fc0: 0000ffffa7c4b1cc 0000000000000000 fffffffffee1dead 000000000000008e [ 37.336997] 7fe0: 0000000000000000 0000000000000000 9ce839cffee77eab fafdbf9f7ed57f2f [ 37.344911] Call trace: [ 37.347437] Exception stack(0xffff800902067b20 to 0xffff800902067c50) [ 37.353970] 7b20: ffff000008e5d4c8 0001000000000000 0000000080f82000 0000000000000000 [ 37.361883] 7b40: ffff800902067b60 ffff000008e17000 ffff000008f44c68 00000001081081b4 [ 37.369802] 7b60: ffff800902067bf0 ffff000008108478 0000000000000000 ffff000008c235b0 [ 37.377721] 7b80: ffff800902067ce0 0000000000000000 0000000000000000 0000000000000015 [ 37.385643] 7ba0: 0000000000000123 000000000000008e ffff000008992000 ffff800902068000 [ 37.393557] 7bc0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 37.401477] 7be0: 0000000000000000 ffff000008c97dd8 ffff000008cc6fb0 ffff000008cc6fb8 [ 37.409396] 7c00: 6974726174736552 ffff800902067a50 0000000005f5e0ff ffff000008e70000 [ 37.417318] 7c20: ffff000008e706c0 ffff000008f42bfd ffff000088f42bef 0000000000000006 [ 37.425234] 7c40: 00000000deadbeef 0000ffffa7c27470 [ 37.430190] [< (null)>] (null) [ 37.434982] [] machine_restart+0x6c/0x70 [ 37.440550] [] kernel_restart+0x6c/0x78 [ 37.446030] [] SyS_reboot+0x130/0x228 [ 37.451337] [] el0_svc_naked+0x24/0x28 [ 37.456737] Code: bad PC value [ 37.459891] ---[ end trace 76e2fc17e050aecd ]--- Signed-off-by: Julien Grall -- Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org The x86 code has theoritically a similar issue, altought EFI does not seem to be the preferred method. I have only built test it on x86. This should also probably be fixed in stable tree. Changes in v2: - Implement xen_efi_reset_system using xen_reboot - Move xen_efi_reset_system in drivers/xen/efi.c Signed-off-by: Juergen Gross arch/arm/xen/efi.c | 2 +- arch/x86/xen/efi.c | 2 +- drivers/xen/efi.c | 18 ++++++++++++++++++ include/xen/xen-ops.h | 3 +++ 4 files changed, 23 insertions(+), 2 deletions(-) commit fa12a870a9d594ba458242a04a4d17a76fc816a4 Author: Julien Grall Date: Mon Apr 24 18:58:38 2017 +0100 arm/xen: Consolidate calls to shutdown hypercall in a single helper Signed-off-by: Julien Grall Signed-off-by: Juergen Gross arch/arm/xen/enlighten.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 5d9404e1185de8d508cd042761306495f727d7eb Author: Julien Grall Date: Mon Apr 24 18:58:37 2017 +0100 xen: Export xen_reboot The helper xen_reboot will be called by the EFI code in a later patch. Note that the ARM version does not yet exist and will be added in a later patch too. Signed-off-by: Julien Grall Signed-off-by: Juergen Gross arch/x86/xen/xen-ops.h | 1 - include/xen/xen-ops.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) commit f31b969217b42df605b2e0e64aa6b3e03e781a4f Author: Boris Ostrovsky Date: Wed Apr 26 09:42:48 2017 -0400 xen/x86: Call xen_smp_intr_init_pv() on BSP Recent code rework that split handling ov PV, HVM and PVH guests into separate files missed calling xen_smp_intr_init_pv() on CPU0. Add this call. Signed-off-by: Boris Ostrovsky Reported-by: Sander Eikelenboom Signed-off-by: Juergen Gross arch/x86/xen/smp_pv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84d582d236dc1f9085e741affc72e9ba061a67c2 Author: Boris Ostrovsky Date: Mon Apr 24 15:04:53 2017 -0400 xen: Revert commits da72ff5bfcb0 and 72a9b186292d Recent discussion (http://marc.info/?l=xen-devel&m=149192184523741) established that commit 72a9b186292d ("xen: Remove event channel notification through Xen PCI platform device") (and thus commit da72ff5bfcb0 ("partially revert "xen: Remove event channel notification through Xen PCI platform device"")) are unnecessary and, in fact, prevent HVM guests from booting on Xen releases prior to 4.0 Therefore we revert both of those commits. The summary of that discussion is below: Here is the brief summary of the current situation: Before the offending commit (72a9b186292): 1) INTx does not work because of the reset_watches path. 2) The reset_watches path is only taken if you have Xen > 4.0 3) The Linux Kernel by default will use vector inject if the hypervisor support. So even INTx does not work no body running the kernel with Xen > 4.0 would notice. Unless he explicitly disabled this feature either in the kernel or in Xen (and this can only be disabled by modifying the code, not user-supported way to do it). After the offending commit (+ partial revert): 1) INTx is no longer support for HVM (only for PV guests). 2) Any HVM guest The kernel will not boot on Xen < 4.0 which does not have vector injection support. Since the only other mode supported is INTx which. So based on this summary, I think before commit (72a9b186292) we were in much better position from a user point of view. Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/include/asm/xen/events.h | 11 +++++++++++ arch/x86/pci/xen.c | 2 +- arch/x86/xen/enlighten_hvm.c | 12 ++++++++---- arch/x86/xen/smp_hvm.c | 5 +++++ arch/x86/xen/time.c | 8 ++++++++ drivers/xen/events/events_base.c | 25 +++++++++++++++++-------- drivers/xen/platform-pci.c | 14 ++++---------- 7 files changed, 54 insertions(+), 23 deletions(-) commit 5f6a1614fab801834e32b420b60acdc27acfcdec Author: Boris Ostrovsky Date: Fri Apr 21 11:13:14 2017 -0400 xen/pvh: Do not fill kernel's e820 map in init_pvh_bootparams() e820 map is updated with information from the zeropage (i.e. pvh_bootparams) by default_machine_specific_memory_setup(). With the way things are done now, we end up with a duplicated e820 map. Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/enlighten_pvh.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 6483e3135a693548874429db901c0544d3a9b4cd Author: Geliang Tang Date: Sat Apr 22 09:21:13 2017 +0800 xen/scsifront: use offset_in_page() macro Use offset_in_page() macro instead of open-coding. Signed-off-by: Geliang Tang Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross drivers/scsi/xen-scsifront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5ff5061c35448525fcb38950f06af6b9ae12c04 Author: Stefano Stabellini Date: Thu Apr 13 14:04:22 2017 -0700 xen/arm,arm64: rename __generic_dma_ops to xen_get_dma_ops Now that __generic_dma_ops is a xen specific function, rename it to xen_get_dma_ops. Change all the call sites appropriately. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Acked-by: Konrad Rzeszutek Wilk CC: linux@armlinux.org.uk CC: catalin.marinas@arm.com CC: will.deacon@arm.com CC: boris.ostrovsky@oracle.com CC: jgross@suse.com CC: Julien Grall drivers/xen/swiotlb-xen.c | 8 ++++---- include/xen/arm/page-coherent.h | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) commit e058632670b709145730a134acc3f83f392f7aa7 Author: Stefano Stabellini Date: Thu Apr 13 14:04:21 2017 -0700 xen/arm,arm64: fix xen_dma_ops after 815dd18 "Consolidate get_dma_ops..." The following commit: commit 815dd18788fe0d41899f51b91d0560279cf16b0d Author: Bart Van Assche Date: Fri Jan 20 13:04:04 2017 -0800 treewide: Consolidate get_dma_ops() implementations rearranges get_dma_ops in a way that xen_dma_ops are not returned when running on Xen anymore, dev->dma_ops is returned instead (see arch/arm/include/asm/dma-mapping.h:get_arch_dma_ops and include/linux/dma-mapping.h:get_dma_ops). Fix the problem by storing dev->dma_ops in dev_archdata, and setting dev->dma_ops to xen_dma_ops. This way, xen_dma_ops is returned naturally by get_dma_ops. The Xen code can retrieve the original dev->dma_ops from dev_archdata when needed. It also allows us to remove __generic_dma_ops from common headers. Signed-off-by: Stefano Stabellini Tested-by: Julien Grall Suggested-by: Catalin Marinas Reviewed-by: Catalin Marinas Cc: [4.11+] CC: linux@armlinux.org.uk CC: catalin.marinas@arm.com CC: will.deacon@arm.com CC: boris.ostrovsky@oracle.com CC: jgross@suse.com CC: Julien Grall arch/arm/include/asm/device.h | 3 +++ arch/arm/include/asm/dma-mapping.h | 12 +----------- arch/arm/mm/dma-mapping.c | 7 +++++++ arch/arm64/include/asm/device.h | 3 +++ arch/arm64/include/asm/dma-mapping.h | 13 +------------ arch/arm64/mm/dma-mapping.c | 7 +++++++ include/xen/arm/page-coherent.h | 8 ++++++++ 7 files changed, 30 insertions(+), 23 deletions(-) commit 4a806016223c6df131280c82f1ed69c820b6a9ff Author: Arnd Bergmann Date: Wed Apr 19 19:06:39 2017 +0200 xen/9pfs: select CONFIG_XEN_XENBUS_FRONTEND All Xen frontends need to select this symbol to avoid a link error: net/built-in.o: In function `p9_trans_xen_init': :(.text+0x149e9c): undefined reference to `__xenbus_register_frontend' Fixes: d4b40a02f837 ("xen/9pfs: build 9pfs Xen transport driver") Signed-off-by: Arnd Bergmann Reviewed-by: Stefano Stabellini net/9p/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 65f9d65443b5512f74248a3eb56731fbb0b337b8 Author: Juergen Gross Date: Thu Apr 13 09:42:03 2017 +0200 x86/cpu: remove hypervisor specific set_cpu_features There is no user of x86_hyper->set_cpu_features() any more. Remove it. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross arch/x86/include/asm/hypervisor.h | 5 ----- arch/x86/kernel/cpu/common.c | 1 - arch/x86/kernel/cpu/hypervisor.c | 8 -------- 3 files changed, 14 deletions(-) commit d40342a2ac035444897e5952ea72a50440a2a028 Author: Juergen Gross Date: Thu Apr 13 09:37:20 2017 +0200 vmware: set cpu capabilities during platform initialization There is no need to set the same capabilities for each cpu individually. This can be done for all cpus in platform initialization. Cc: Alok Kataria Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: virtualization@lists.linux-foundation.org Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Acked-by: Alok Kataria Signed-off-by: Juergen Gross arch/x86/kernel/cpu/vmware.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) commit 6807cf65f5ba6f2902ab64355d71506b9c14a9dd Author: Juergen Gross Date: Wed Apr 12 15:12:09 2017 +0200 x86/xen: use capabilities instead of fake cpuid values for xsave When running as pv domain xen_cpuid() is being used instead of native_cpuid(). In xen_cpuid() the xsave feature availability is indicated by special casing the related cpuid leaf. Instead of delivering fake cpuid values set or clear the cpu capability bits for xsave instead. Signed-off-by: Juergen Gross Reviewed-by: Andrew Cooper Signed-off-by: Juergen Gross arch/x86/xen/enlighten_pv.c | 53 +++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 23 deletions(-) commit e657fccb799b970bd1f152e22e13f20e0de7adb5 Author: Juergen Gross Date: Wed Apr 12 12:45:57 2017 +0200 x86/xen: use capabilities instead of fake cpuid values for x2apic When running as pv domain xen_cpuid() is being used instead of native_cpuid(). In xen_cpuid() the x2apic feature is indicated as not being present by special casing the related cpuid leaf. Instead of delivering fake cpuid values clear the cpu capability bit for x2apic instead. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross arch/x86/xen/enlighten_pv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ea01598b4bc453ed513e9d482a43c14557042ec9 Author: Juergen Gross Date: Wed Apr 12 12:37:00 2017 +0200 x86/xen: use capabilities instead of fake cpuid values for mwait When running as pv domain xen_cpuid() is being used instead of native_cpuid(). In xen_cpuid() the mwait feature is indicated to be present or not by special casing the related cpuid leaf. Instead of delivering fake cpuid values use the cpu capability bit for mwait instead. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross arch/x86/xen/enlighten_pv.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit b778d6bf63e0a07ceb2258ce9bd996dbaaa11bfa Author: Juergen Gross Date: Wed Apr 12 09:27:47 2017 +0200 x86/xen: use capabilities instead of fake cpuid values for acpi When running as pv domain xen_cpuid() is being used instead of native_cpuid(). In xen_cpuid() the acpi feature is indicated as not being present by special casing the related cpuid leaf in case we are not the initial domain. Instead of delivering fake cpuid values clear the cpu capability bit for acpi instead. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross arch/x86/xen/enlighten_pv.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit aa1071562937d1b66b07db48e3dbafe136027f01 Author: Juergen Gross Date: Wed Apr 12 09:24:01 2017 +0200 x86/xen: use capabilities instead of fake cpuid values for acc When running as pv domain xen_cpuid() is being used instead of native_cpuid(). In xen_cpuid() the acc feature (thermal monitoring) is indicated as not being present by special casing the related cpuid leaf. Instead of delivering fake cpuid values clear the cpu capability bit for acc instead. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross arch/x86/xen/enlighten_pv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 88f3256f21d958d0773bf93523ad12d2ddaf3006 Author: Juergen Gross Date: Wed Apr 12 09:21:05 2017 +0200 x86/xen: use capabilities instead of fake cpuid values for mtrr When running as pv domain xen_cpuid() is being used instead of native_cpuid(). In xen_cpuid() the mtrr feature is indicated as not being present by special casing the related cpuid leaf. Instead of delivering fake cpuid values clear the cpu capability bit for mtrr instead. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross arch/x86/xen/enlighten_pv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fd9145fd270c7d152853219b8b44210026fa3c02 Author: Juergen Gross Date: Wed Apr 12 08:27:07 2017 +0200 x86/xen: use capabilities instead of fake cpuid values for aperf When running as pv domain xen_cpuid() is being used instead of native_cpuid(). In xen_cpuid() the aperf/mperf feature is indicated as not being present by special casing the related cpuid leaf. Instead of delivering fake cpuid values clear the cpu capability bit for aperf/mperf instead. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross arch/x86/xen/enlighten_pv.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 3ee99df333a0ac57c3bd8155dfa56fc275668f88 Author: Juergen Gross Date: Wed Apr 12 08:20:29 2017 +0200 x86/xen: don't indicate DCA support in pv domains Xen doesn't support DCA (direct cache access) for pv domains. Clear the corresponding capability indicator. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross arch/x86/xen/enlighten_pv.c | 1 + 1 file changed, 1 insertion(+) commit 0808e80cb760de2733c0527d2090ed2205a1eef8 Author: Juergen Gross Date: Thu Apr 13 08:55:41 2017 +0200 xen: set cpu capabilities from xen_start_kernel() There is no need to set the same capabilities for each cpu individually. This can easily be done for all cpus when starting the kernel. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross arch/x86/xen/enlighten_pv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 31d47266c6e599d76e84c9809f9ea2735d9cda5b Author: Stefano Stabellini Date: Thu Apr 13 10:57:56 2017 -0700 xen/9pfs: initialize len to 0 to detect xenbus_read errors In order to use "len" to check for xenbus_read errors properly, we need to initialize len to 0 before passing it to xenbus_read. CC: dan.carpenter@oracle.com CC: jgross@suse.com CC: boris.ostrovsky@oracle.com CC: Eric Van Hensbergen CC: Ron Minnich CC: Latchesar Ionkov CC: v9fs-developer@lists.sourceforge.net Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross net/9p/trans_xen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29985b09613ba106a1ed0496988636d288600515 Author: Juergen Gross Date: Tue Apr 11 18:14:26 2017 +0200 xen,kdump: handle pv domain in paddr_vmcoreinfo_note() For kdump to work correctly it needs the physical address of vmcoreinfo_note. When running as dom0 this means the virtual address has to be translated to the related machine address. paddr_vmcoreinfo_note() is meant to do the translation via __pa_symbol() only, but being attributed "weak" it can be replaced easily in Xen case. Signed-off-by: Juergen Gross Tested-by: Petr Tesarik Reviewed-by: Boris Ostrovsky Reviewed-by: Daniel Kiper Signed-off-by: Juergen Gross arch/x86/xen/mmu_pv.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 8945c08e2b148be926b5f1aa653b2021a127e905 Author: Oleksandr Andrushchenko Date: Mon Apr 10 09:25:29 2017 +0300 xen/displif: add ABI for para-virtual display This is the ABI for the two halves of a para-virtualized display driver. This protocol aims to provide a unified protocol which fits more sophisticated use-cases than a framebuffer device can handle. At the moment basic functionality is supported with the intention to extend: o multiple dynamically allocated/destroyed framebuffers o buffers of arbitrary sizes o better configuration options including multiple display support Note: existing fbif can be used together with displif running at the same time, e.g. on Linux one provides framebuffer and another DRM/KMS Future extensions to the existing protocol may include: o allow display/connector cloning o allow allocating objects other than display buffers o add planes/overlays support o support scaling o support rotation Note, that this protocol doesn't use ring macros for bi-directional exchange (PV calls/9pfs) bacause: o it statically defines the use of a single page for the ring buffer o it uses direct memory access to ring's contents w/o memory copying o re-uses the same idea that kbdif/fbif use which for this use-case seems to be appropriate ================================================== Rationale for introducing this protocol instead of using the existing fbif: ================================================== 1. In/out event sizes o fbif - 40 octets o displif - 40 octets This is only the initial version of the displif protocol which means that there could be requests which will not fit (WRT introducing some GPU related functionality later on). In that case we cannot alter fbif sizes as we need to be backward compatible an will be forced to handle those apart of fbif. 2. Shared page Displif doesn't use anything like struct xenfb_page, but DEFINE_RING_TYPES(xen_displif, struct xendispl_req, struct xendispl_resp) which is a better and more common way. Output events use a shared page which only has in_cons and in_prod and all the rest is used for incoming events. Here struct xenfb_page could probably be used as is despite the fact that it only has a half of a page for incoming events which is only 50 events. (consider something like 60Hz display) 3. Amount of changes. fbif only provides XENFB_TYPE_UPDATE and XENFB_TYPE_RESIZE events, so it looks like it is easier to get fb support into displif than vice versa. displif at the moment has 6 requests and 1 event, multiple connector support, etc. Signed-off-by: Oleksandr Grytsov Signed-off-by: Oleksandr Andrushchenko Acked-by: Juergen Gross Signed-off-by: Juergen Gross include/xen/interface/io/displif.h | 854 +++++++++++++++++++++++++++++++++++++ 1 file changed, 854 insertions(+) commit 2843531fb6ca74a960d6dd2b7fda0717f60bf2e9 Author: Oleksandr Andrushchenko Date: Mon Apr 10 09:25:28 2017 +0300 xen/sndif: add sound-device ABI Add ABI for the two halves of a para-virtualized sound driver to communicate with each other. The ABI allows implementing audio playback and capture as well as volume control and possibility to mute/unmute audio sources. Note: depending on the use-case backend can expose more sound cards and PCM devices/streams than the underlying HW physically has by employing SW mixers, configuring virtual sound streams, channels etc. Thus, allowing fine tunned configurations per frontend. Signed-off-by: Oleksandr Andrushchenko Signed-off-by: Oleksandr Grytsov Signed-off-by: Oleksandr Dmytryshyn Signed-off-by: Iurii Konovalenko Acked-by: Juergen Gross Signed-off-by: Juergen Gross include/xen/interface/io/sndif.h | 793 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 793 insertions(+) commit f9ebfc22cc15c06ba61563c885f40a4bc07cccea Author: Oleksandr Andrushchenko Date: Mon Apr 10 09:25:27 2017 +0300 xen/kbdif: add multi-touch support Multi-touch fields re-use the page that is used by the other features which means that you can interleave multi-touch, motion, and key events. Signed-off-by: Oleksandr Andrushchenko Acked-by: Juergen Gross Signed-off-by: Juergen Gross include/xen/interface/io/kbdif.h | 210 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 210 insertions(+) commit 8ec9dd0e69cfaab05649ed7ab3838eb4eea96081 Author: Oleksandr Andrushchenko Date: Mon Apr 10 09:25:26 2017 +0300 xen/kbdif: update protocol description The patch clarifies the protocol that is used by the PV keyboard drivers. Signed-off-by: Oleksandr Andrushchenko Acked-by: Juergen Gross Signed-off-by: Juergen Gross include/xen/interface/io/kbdif.h | 248 ++++++++++++++++++++++++++++++++++----- 1 file changed, 221 insertions(+), 27 deletions(-) commit 7f25483a88291ed6b2cbe761ee2a30a69674b131 Author: Stefano Stabellini Date: Wed Apr 5 12:04:01 2017 -0700 xen/9pfs: build 9pfs Xen transport driver This patch adds a Kconfig option and Makefile support for building the 9pfs Xen driver. CC: groug@kaod.org CC: boris.ostrovsky@oracle.com CC: jgross@suse.com CC: Eric Van Hensbergen CC: Ron Minnich CC: Latchesar Ionkov CC: v9fs-developer@lists.sourceforge.net Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross net/9p/Kconfig | 8 ++++++++ net/9p/Makefile | 4 ++++ 2 files changed, 12 insertions(+) commit f66c72bea1293786b9916894019f96bcd729505b Author: Stefano Stabellini Date: Wed Apr 5 12:04:00 2017 -0700 xen/9pfs: receive responses Upon receiving a notification from the backend, schedule the p9_xen_response work_struct. p9_xen_response checks if any responses are available, if so, it reads them one by one, calling p9_client_cb to send them up to the 9p layer (p9_client_cb completes the request). Handle the ring following the Xen 9pfs specification. CC: groug@kaod.org CC: jgross@suse.com CC: Eric Van Hensbergen CC: Ron Minnich CC: Latchesar Ionkov CC: v9fs-developer@lists.sourceforge.net Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross net/9p/trans_xen.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit f023f18ddf41dda487241d1514075b1136eb8101 Author: Stefano Stabellini Date: Wed Apr 5 12:03:59 2017 -0700 xen/9pfs: send requests to the backend Implement struct p9_trans_module create and close functions by looking at the available Xen 9pfs frontend-backend connections. We don't expect many frontend-backend connections, thus walking a list is OK. Send requests to the backend by copying each request to one of the available rings (each frontend-backend connection comes with multiple rings). Handle the ring and notifications following the 9pfs specification. If there are not enough free bytes on the ring for the request, wait on the wait_queue: the backend will send a notification after consuming more requests. CC: groug@kaod.org CC: jgross@suse.com CC: Eric Van Hensbergen CC: Ron Minnich CC: Latchesar Ionkov CC: v9fs-developer@lists.sourceforge.net Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross net/9p/trans_xen.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 2 deletions(-) commit 71ebd71921e451f0f942ddfe85d01e31ddc6eb88 Author: Stefano Stabellini Date: Wed Apr 5 12:03:58 2017 -0700 xen/9pfs: connect to the backend Implement functions to handle the xenbus handshake. Upon connection, allocate the rings according to the protocol specification. Initialize a work_struct and a wait_queue. The work_struct will be used to schedule work upon receiving an event channel notification from the backend. The wait_queue will be used to wait when the ring is full and we need to send a new request. CC: groug@kaod.org CC: boris.ostrovsky@oracle.com CC: jgross@suse.com CC: Eric Van Hensbergen CC: Ron Minnich CC: Latchesar Ionkov CC: v9fs-developer@lists.sourceforge.net Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross net/9p/trans_xen.c | 281 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 281 insertions(+) commit 868eb122739a588f2cd873308b9ff1f00849b8fd Author: Stefano Stabellini Date: Wed Apr 5 12:03:57 2017 -0700 xen/9pfs: introduce Xen 9pfs transport driver Introduce the Xen 9pfs transport driver: add struct xenbus_driver to register as a xenbus driver and add struct p9_trans_module to register as v9fs driver. All functions are empty stubs for now. CC: groug@kaod.org CC: jgross@suse.com CC: Eric Van Hensbergen CC: Ron Minnich CC: Latchesar Ionkov CC: v9fs-developer@lists.sourceforge.net Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross net/9p/trans_xen.c | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) commit 04c40dfc8d7965e722b6e99352e2bfc2f5637359 Author: Stefano Stabellini Date: Wed Apr 5 12:03:56 2017 -0700 xen: introduce the header file for the Xen 9pfs transport protocol It uses the new ring.h macros to declare rings and interfaces. CC: konrad.wilk@oracle.com CC: boris.ostrovsky@oracle.com CC: jgross@suse.com CC: groug@kaod.org Signed-off-by: Stefano Stabellini Acked-by: Juergen Gross Signed-off-by: Juergen Gross include/xen/interface/io/9pfs.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 564f7dfde24a405d877168f150ae5d29d3ad99c7 Author: Stefano Stabellini Date: Wed Apr 5 12:03:55 2017 -0700 xen: import new ring macros in ring.h Sync the ring.h file with upstream Xen, to introduce the new ring macros. They will be used by the Xen transport for 9pfs. CC: konrad.wilk@oracle.com CC: boris.ostrovsky@oracle.com CC: jgross@suse.com CC: groug@kaod.org Signed-off-by: Stefano Stabellini Acked-by: Juergen Gross Signed-off-by: Juergen Gross include/xen/interface/io/ring.h | 143 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) commit ab1570a427551be2d3eeb30b09834ba01c6109eb Author: Juergen Gross Date: Tue Mar 28 11:02:08 2017 +0200 x86/xen: remove unused static function from smp_pv.c xen_call_function_interrupt() isn't used in smp_pv.c. Remove it. Signed-off-by: Juergen Gross arch/x86/xen/smp_pv.c | 10 ---------- 1 file changed, 10 deletions(-) commit 8cb6de390096b2ff337cbcf30c9484dd8cf83029 Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:56 2017 +0100 x86/xen: rename some PV-only functions in smp_pv.c After code split between PV and HVM some functions in xen_smp_ops have xen_pv_ prefix and some only xen_ which makes them look like they're common for both PV and HVM while they're not. Rename all the rest to have xen_pv_ prefix. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/smp_pv.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 33af746985699001c1122c2d5e9dbece28f18272 Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:55 2017 +0100 x86/xen: enable PVHVM-only builds Now everything is in place and we can move PV-only code under CONFIG_XEN_PV. CONFIG_XEN_PV_SMP is created to support the change. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/Kconfig | 4 ++++ arch/x86/xen/Makefile | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) commit 16624390816c4c40df3d777b34665d3fd01e693d Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:54 2017 +0100 xen: create xen_create/destroy_contiguous_region() stubs for PVHVM only builds xen_create_contiguous_region()/xen_create_contiguous_region() are PV-only, they both contain xen_feature(XENFEAT_auto_translated_physmap) check and bail in the very beginning. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross include/xen/xen-ops.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 4fee9ad84e9648a3cb07586501d283d3aef9f923 Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:53 2017 +0100 xen/balloon: decorate PV-only parts with #ifdef CONFIG_XEN_PV Balloon driver uses several PV-only concepts (xen_start_info, xen_extra_mem,..) and it seems the simpliest solution to make HVM-only build happy is to decorate these parts with #ifdefs. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross drivers/xen/balloon.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 3d4ebdb26f6f3573d68d7957f66a89e9401fc4b1 Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:52 2017 +0100 x86/xen: create stubs for HVM-only builds in page.h __pfn_to_mfn() is only used from PV code (mmu_pv.c, p2m.c) and from page.h where all functions calling it check for xen_feature(XENFEAT_auto_translated_physmap) first so we can replace it with any stub to make build happy. set_foreign_p2m_mapping()/clear_foreign_p2m_mapping() are used from grant-table.c but only if !xen_feature(XENFEAT_auto_translated_physmap). Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/include/asm/xen/page.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit c504b2f1061972e1e9f2a3fcbbb1d6fbcce5ed26 Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:51 2017 +0100 x86/xen: define startup_xen for XEN PV only startup_xen references PV-only code, decorate it with #ifdef CONFIG_XEN_PV to make PV-free builds possible. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/xen-head.S | 4 ++++ 1 file changed, 4 insertions(+) commit 50a1062d61a62421f3181ce3e594a330f8a15cff Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:50 2017 +0100 x86/xen: put setup.c, pmu.c and apic.c under CONFIG_XEN_PV xen_pmu_init/finish() functions are used in suspend.c and enlighten.c, add stubs for now. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/Kconfig | 2 +- arch/x86/xen/Makefile | 6 +++--- arch/x86/xen/pmu.h | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) commit 9963236d7c753cf89be2e0366af185e51f150c79 Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:49 2017 +0100 x86/xen: split suspend.c for PV and PVHVM guests Slit the code in suspend.c into suspend_pv.c and suspend_hvm.c. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/Makefile | 3 ++- arch/x86/xen/suspend.c | 54 ---------------------------------------------- arch/x86/xen/suspend_hvm.c | 22 +++++++++++++++++++ arch/x86/xen/suspend_pv.c | 46 +++++++++++++++++++++++++++++++++++++++ arch/x86/xen/xen-ops.h | 13 +++++++++++ 5 files changed, 83 insertions(+), 55 deletions(-) commit 7e0563dea9c4e62297846359186c597e7231912d Author: Vitaly Kuznetsov Date: Tue Apr 4 14:48:17 2017 +0200 x86/xen: split off mmu_pv.c Basically, mmu.c is renamed to mmu_pv.c and some code moved out to common mmu.c. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/Makefile | 4 +- arch/x86/xen/mmu.c | 2784 +------------------------------------------------ arch/x86/xen/mmu_pv.c | 2717 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 2756 insertions(+), 2749 deletions(-) commit feef87ebfde295ff29a8a57ce47c933db7e79b05 Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:47 2017 +0100 x86/xen: split off mmu_hvm.c Move PVHVM related code to mmu_hvm.c. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/Makefile | 2 +- arch/x86/xen/mmu.c | 74 ---------------------------------------------- arch/x86/xen/mmu_hvm.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 75 deletions(-) commit 83b96794e0ea97ca7e05b15e31d31dac71d3fc2a Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:46 2017 +0100 x86/xen: split off smp_pv.c Basically, smp.c is renamed to smp_pv.c and some code moved out to common smp.c. struct xen_common_irq delcaration ended up in smp.h. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/Makefile | 2 +- arch/x86/xen/smp.c | 488 +----------------------------------------------- arch/x86/xen/smp.h | 5 + arch/x86/xen/smp_pv.c | 500 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 509 insertions(+), 486 deletions(-) commit a52482d9355e25ab7bb3cb190ffe26364db09b3e Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:45 2017 +0100 x86/xen: split off smp_hvm.c Move PVHVM related code to smp_hvm.c. Drop 'static' qualifier from xen_smp_send_reschedule(), xen_smp_send_call_function_ipi(), xen_smp_send_call_function_single_ipi(), these functions will be moved to common smp code when smp_pv.c is split. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/Kconfig | 4 ++++ arch/x86/xen/Makefile | 1 + arch/x86/xen/smp.c | 57 +++---------------------------------------------- arch/x86/xen/smp.h | 3 +++ arch/x86/xen/smp_hvm.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 69 insertions(+), 54 deletions(-) commit aa1c84e8ca7f6f881514b109b9a2468db148045c Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:44 2017 +0100 x86/xen: split xen_cpu_die() Split xen_cpu_die() into xen_pv_cpu_die() and xen_hvm_cpu_die() to support further splitting of smp.c. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/smp.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit a2d1078a35f9a38ae888aa6147e4ca32666154a1 Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:43 2017 +0100 x86/xen: split xen_smp_prepare_boot_cpu() Split xen_smp_prepare_boot_cpu() into xen_pv_smp_prepare_boot_cpu() and xen_hvm_smp_prepare_boot_cpu() to support further splitting of smp.c. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/smp.c | 49 ++++++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 19 deletions(-) commit 04e95761faae743f50a04aab47b9dc457c82063f Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:42 2017 +0100 x86/xen: split xen_smp_intr_init()/xen_smp_intr_free() xen_smp_intr_init() and xen_smp_intr_free() have PV-specific code and as a praparatory change to splitting smp.c we need to split these fucntions. Create xen_smp_intr_init_pv()/xen_smp_intr_free_pv(). Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/enlighten_pv.c | 9 +++++++++ arch/x86/xen/smp.c | 29 ++++++++++++++++++----------- arch/x86/xen/smp.h | 8 ++++++++ 3 files changed, 35 insertions(+), 11 deletions(-) commit e1dab14cf68d1e03950135969af3faf322f0db04 Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:41 2017 +0100 x86/xen: split off enlighten_pv.c Basically, enlighten.c is renamed to enlighten_pv.c and some code moved out to common enlighten.c. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/Makefile | 4 +- arch/x86/xen/enlighten.c | 1646 ++----------------------------------------- arch/x86/xen/enlighten_pv.c | 1512 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 1586 insertions(+), 1576 deletions(-) commit 98f2a47a002139ce677d3062d334af8b6e36e25c Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:40 2017 +0100 x86/xen: split off enlighten_hvm.c Move PVHVM related code to enlighten_hvm.c. Three functions: xen_cpuhp_setup(), xen_reboot(), xen_emergency_restart() are shared, drop static qualifier from them. These functions will go to common code once it is split from enlighten.c. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/Makefile | 1 + arch/x86/xen/enlighten.c | 212 +----------------------------------------- arch/x86/xen/enlighten_hvm.c | 213 +++++++++++++++++++++++++++++++++++++++++++ arch/x86/xen/xen-ops.h | 8 ++ 4 files changed, 227 insertions(+), 207 deletions(-) commit 4d6ca227c768b50b05cf183974b40abe444e9d0c Merge: 800f3eef af22a61 Author: Jiri Kosina Date: Tue May 2 11:02:41 2017 +0200 Merge branch 'for-4.12/asus' into for-linus commit 800f3eef8ebc1264e9c135bfa892c8ae41fa4792 Merge: 18fc216 040fc00 Author: Jiri Kosina Date: Tue May 2 11:02:24 2017 +0200 Merge branch 'for-4.12/sony' into for-linus commit 18fc2163b8a410d4d36b8f44658580731c0afaa1 Merge: d529a4a c846fe9 ac34b97 c3883fe 733aca9 d3d9adf 9547837 a4bf6153 e9d0a26 07e88a3 959d973 149f6f6 Author: Jiri Kosina Date: Tue May 2 11:01:10 2017 +0200 Merge branches 'for-4.11/upstream-fixes', 'for-4.12/accutouch', 'for-4.12/cp2112', 'for-4.12/hid-core-null-state-handling', 'for-4.12/hiddev', 'for-4.12/i2c-hid', 'for-4.12/innomedia', 'for-4.12/logitech-hidpp-battery-power-supply', 'for-4.12/multitouch', 'for-4.12/nti', 'for-4.12/upstream' and 'for-4.12/wacom' into for-linus commit 481d66325dfc2a6b4f5e729b64ad144383b63fad Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:39 2017 +0100 x86/xen: split off enlighten_pvh.c Create enlighten_pvh.c by splitting off PVH related code from enlighten.c, put it under CONFIG_XEN_PVH. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/Makefile | 2 + arch/x86/xen/enlighten.c | 108 ---------------------------------------- arch/x86/xen/enlighten_pvh.c | 114 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+), 108 deletions(-) commit 5e57f1d607d1cc0f54611162525ca6436e17e8b7 Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:38 2017 +0100 x86/xen: add CONFIG_XEN_PV to Kconfig All code to support Xen PV will get under this new option. For the beginning, check for it in the common code. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/kernel/cpu/hypervisor.c | 4 +++- arch/x86/kernel/process_64.c | 2 +- arch/x86/xen/Kconfig | 23 ++++++++++++++++++----- 3 files changed, 22 insertions(+), 7 deletions(-) commit 52519f2af020b6b53b4e0cbb8cff71058ed434cd Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:37 2017 +0100 x86/xen: globalize have_vcpu_info_placement have_vcpu_info_placement applies to both PV and HVM and as we're going to split the code we need to make it global. Rename to xen_have_vcpu_info_placement. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/xen/enlighten.c | 12 ++++++------ arch/x86/xen/xen-ops.h | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) commit 0991d22d5e7fad3ea4f504a1eb0ccb4707135f64 Author: Vitaly Kuznetsov Date: Tue Mar 14 18:35:36 2017 +0100 x86/xen: separate PV and HVM hypervisors As a preparation to splitting the code we need to untangle it: x86_hyper_xen -> x86_hyper_xen_hvm and x86_hyper_xen_pv xen_platform() -> xen_platform_hvm() and xen_platform_pv() xen_cpu_up_prepare() -> xen_cpu_up_prepare_pv() and xen_cpu_up_prepare_hvm() xen_cpu_dead() -> xen_cpu_dead_pv() and xen_cpu_dead_pv_hvm() Add two parameters to xen_cpuhp_setup() to pass proper cpu_up_prepare and cpu_dead hooks. xen_set_cpu_features() is now PV-only so the redundant xen_pv_domain() check can be dropped. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross arch/x86/include/asm/hypervisor.h | 3 +- arch/x86/kernel/cpu/hypervisor.c | 3 +- arch/x86/xen/enlighten.c | 114 +++++++++++++++++++++++++------------- 3 files changed, 79 insertions(+), 41 deletions(-) commit e345da82bd6bdfa8492f80b3ce4370acfd868d95 Author: Mario Kleiner Date: Fri Apr 21 17:05:08 2017 +0200 drm/edid: Add 10 bpc quirk for LGD 764 panel in HP zBook 17 G2 The builtin eDP panel in the HP zBook 17 G2 supports 10 bpc, as advertised by the Laptops product specs and verified via injecting a fixed edid + photometer measurements, but edid reports unknown depth, so drivers fall back to 6 bpc. Add a quirk to get the full 10 bpc. Cc: stable@vger.kernel.org Signed-off-by: Mario Kleiner Acked-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1492787108-23959-1-git-send-email-mario.kleiner.de@gmail.com drivers/gpu/drm/drm_edid.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit c667186f1c01ca8970c785888868b7ffd74e51ee Author: Marc Zyngier Date: Thu Apr 27 19:06:48 2017 +0100 arm64: KVM: Fix decoding of Rt/Rt2 when trapping AArch32 CP accesses Our 32bit CP14/15 handling inherited some of the ARMv7 code for handling the trapped system registers, completely missing the fact that the fields for Rt and Rt2 are now 5 bit wide, and not 4... Let's fix it, and provide an accessor for the most common Rt case. Cc: stable@vger.kernel.org Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_emulate.h | 6 ++++++ arch/arm64/kvm/sys_regs.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) commit d3b5d35290d729a2518af00feca867385a1b08fa Merge: aa2a4b65 7138970 Author: Linus Torvalds Date: Mon May 1 23:54:56 2017 -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 x86 MM changes in this cycle were: - continued native kernel PCID support preparation patches to the TLB flushing code (Andy Lutomirski) - various fixes related to 32-bit compat syscall returning address over 4Gb in applications, launched from 64-bit binaries - motivated by C/R frameworks such as Virtuozzo. (Dmitry Safonov) - continued Intel 5-level paging enablement: in particular the conversion of x86 GUP to the generic GUP code. (Kirill A. Shutemov) - x86/mpx ABI corner case fixes/enhancements (Joerg Roedel) - ... plus misc updates, fixes and cleanups" * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (62 commits) mm, zone_device: Replace {get, put}_zone_device_page() with a single reference to fix pmem crash x86/mm: Fix flush_tlb_page() on Xen x86/mm: Make flush_tlb_mm_range() more predictable x86/mm: Remove flush_tlb() and flush_tlb_current_task() x86/vm86/32: Switch to flush_tlb_mm_range() in mark_screen_rdonly() x86/mm/64: Fix crash in remove_pagetable() Revert "x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation" x86/boot/e820: Remove a redundant self assignment x86/mm: Fix dump pagetables for 4 levels of page tables x86/mpx, selftests: Only check bounds-vs-shadow when we keep shadow x86/mpx: Correctly report do_mpx_bt_fault() failures to user-space Revert "x86/mm/numa: Remove numa_nodemask_from_meminfo()" x86/espfix: Add support for 5-level paging x86/kasan: Extend KASAN to support 5-level paging x86/mm: Add basic defines/helpers for CONFIG_X86_5LEVEL=y x86/paravirt: Add 5-level support to the paravirt code x86/mm: Define virtual memory map for 5-level paging x86/asm: Remove __VIRTUAL_MASK_SHIFT==47 assert x86/boot: Detect 5-level paging support x86/mm/numa: Remove numa_nodemask_from_meminfo() ... commit a5c3b32a1146e44f6b38fdfdfffc27842953420c Merge: d7dc450 20d5c84 Author: Takashi Iwai Date: Tue May 2 08:25:25 2017 +0200 Merge tag 'asoc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v4.12 A quiet release for the core, but lots of new drivers this time around: - A new, generalized, API for hooking up jacks which makes it easier to write generic machine drivers for simple cases. - Continuing fixes for issues with the x86 CPU drivers. - New drivers for Cirrus CS35L35, DIO DIO2125, Everest ES7132, HiSilicon hi6210, Maxim MAX98927, MT2701 systems with WM8960, Nuvoton NAU8824, Odroid systems, ST STM32 SAI controllers and x86 systems with DA7213 commit d7dc450d5a7162de96edbed6b1792240c2f3a55f Merge: d4a2fbc 0997e37 Author: Takashi Iwai Date: Tue May 2 08:24:42 2017 +0200 Merge branch 'for-next' into for-linus For 4.12 merge. commit aa2a4b6569d5b10491b606a86e574dff3852597a Merge: d19458a 90b2043 Author: Linus Torvalds Date: Mon May 1 23:08:46 2017 -0700 Merge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 vdso updates from Ingo Molnar: "Add support for vDSO acceleration of the "Hyper-V TSC page", to speed up clock reading on Hyper-V guests" * 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method x86/hyperv: Move TSC reading method to asm/mshyperv.h x86/hyperv: Implement hv_get_tsc_page() commit d19458a4ead14da70c4c852659ccb0234ecd769e Merge: 888411b d4d9699 Author: Linus Torvalds Date: Mon May 1 23:05:12 2017 -0700 Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 platform updates from Ingo Molnar: "Most of the commits are continued SGI UV4 hardware-enablement changes, plus there's also new Bluetooth support for the Intel Edison platform" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/platform/intel-mid: Enable Bluetooth support on Intel Edison x86/platform/uv/BAU: Implement uv4_wait_completion with read_status x86/platform/uv/BAU: Add wait_completion to bau_operations x86/platform/uv/BAU: Add status mmr location fields to bau_control x86/platform/uv/BAU: Cleanup bau_operations declaration and instances x86/platform/uv/BAU: Add payload descriptor qualifier x86/platform/uv/BAU: Add uv_bau_version enumerated constants commit 888411be09739443271d254c9d8c1f5188c05509 Merge: 7d6a31c c0edbd4 Author: Linus Torvalds Date: Mon May 1 23:03:17 2017 -0700 Merge branch 'x86-irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 irq update from Ingo Molnar: "A single commit that micro-optimizes an IRQ vectors code path in the CPU offlining code" * 'x86-irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/irq: Optimize free vector check in the CPU offline path commit 7d6a31c394722c914c61292b457e1999c8bef5ea Merge: 2cc12e2 1b32627 Author: Linus Torvalds Date: Mon May 1 23:00:21 2017 -0700 Merge branch 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 debug updates from Ingo Molnar: "The biggest update is the addition of USB3 debug port based early-console. Greg was fine with the USB changes and with the routing of these patches: https://www.spinics.net/lists/linux-usb/msg155093.html" * 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: usb/doc: Add document for USB3 debug port usage usb/serial: Add DBC debug device support to usb_debug x86/earlyprintk: Add support for earlyprintk via USB3 debug port usb/early: Add driver for xhci debug capability x86/timers: Add simple udelay calibration commit b6df4b79a5514a9c6c53533436704129ef45bf76 Author: Xiubo Li Date: Tue May 2 11:38:06 2017 +0800 tcmu: Add global data block pool support For each target there will be one ring, when the target number grows larger and larger, it could eventually runs out of the system memories. In this patch for each target ring, currently for the cmd area the size will be fixed to 8MB and for the data area the size will grow from 0 to max 256K * PAGE_SIZE(1G for 4K page size). For all the targets' data areas, they will get empty blocks from the "global data block pool", which has limited to 512K * PAGE_SIZE(2G for 4K page size) for now. When the "global data block pool" has been used up, then any target could wake up the unmap thread routine to shrink other targets' data area memories. And the unmap thread routine will always try to truncate the ring vma from the last using block offset. When user space has touched the data blocks out of tcmu_cmd iov[], the tcmu_page_fault() will try to return one zeroed blocks. Here we move the timeout's tcmu_handle_completions() into unmap thread routine, that's to say when the timeout fired, it will only do the tcmu_check_expired_cmd() and then wake up the unmap thread to do the completions() and then try to shrink its idle memories. Then the cmdr_lock could be a mutex and could simplify this patch because the unmap_mapping_range() or zap_* may go to sleep. Signed-off-by: Xiubo Li Signed-off-by: Jianfei Hu Acked-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 464 +++++++++++++++++++++++++++----------- 1 file changed, 336 insertions(+), 128 deletions(-) commit 141685a39151aea95eb56562d2953e919c6c73da Author: Xiubo Li Date: Tue May 2 11:38:05 2017 +0800 tcmu: Add dynamic growing data area feature support Currently for the TCMU, the ring buffer size is fixed to 64K cmd area + 1M data area, and this will be bottlenecks for high iops. The struct tcmu_cmd_entry {} size is fixed about 112 bytes with iovec[N] & N <= 4, and the size of struct iovec is about 16 bytes. If N == 0, the ratio will be sizeof(cmd entry) : sizeof(datas) == 112Bytes : (N * 4096)Bytes = 28 : 0, no data area is need. If 0 < N <=4, the ratio will be sizeof(cmd entry) : sizeof(datas) == 112Bytes : (N * 4096)Bytes = 28 : (N * 1024), so the max will be 28 : 1024. If N > 4, the sizeof(cmd entry) will be [(N - 4) *16 + 112] bytes, and its corresponding data size will be [N * 4096], so the ratio of sizeof(cmd entry) : sizeof(datas) == [(N - 4) * 16 + 112)Bytes : (N * 4096)Bytes == 4/1024 - 12/(N * 1024), so the max is about 4 : 1024. When N is bigger, the ratio will be smaller. As the initial patch, we will set the cmd area size to 2M, and the cmd area size to 32M. The TCMU will dynamically grows the data area from 0 to max 32M size as needed. The cmd area memory will be allocated through vmalloc(), and the data area's blocks will be allocated individually later when needed. The allocated data area block memory will be managed via radix tree. For now the bitmap still be the most efficient way to search and manage the block index, this could be update later. Signed-off-by: Xiubo Li Signed-off-by: Jianfei Hu Acked-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 338 ++++++++++++++++++++++++++------------ 1 file changed, 237 insertions(+), 101 deletions(-) commit 2cc12e2e8cb65aec9a95a3d3de4d70e7b6b8c881 Merge: 66acd7f 0ccecd9 Author: Linus Torvalds Date: Mon May 1 22:34:52 2017 -0700 Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Ingo Molnar: "A handful of small cleanups" * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/irq: Remove a redundant #ifdef directive x86/smp: Remove the redundant #ifdef CONFIG_SMP directive x86/smp: Reduce code duplication x86/pci-calgary: Use setup_timer() instead of open coding it. commit 66acd7fc9415bc05482b829e7de4073c1072b1de Merge: 3fb9268 2c4fd1a Author: Linus Torvalds Date: Mon May 1 22:33:43 2017 -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 CLang support related fix" * 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kbuild: Use cc-option to enable -falign-{jumps/loops} commit 3d035237a57777b7672eb116133da01493b607c1 Author: Hannes Reinecke Date: Fri Apr 28 10:04:04 2017 +0200 target: fixup error message in target_tg_pt_gp_tg_pt_gp_id_store() When setting up an ALUA target port group with an invalid ID the error message kstrtoul() returned -22 for tg_pt_gp_id is displayed, which is not really helpful. Convert it to something sane. And while we're at it, join the messages onto a single line. Signed-by: Hannes Reinecke Reviewed-by: Bart van Assche Signed-off-by: Nicholas Bellinger drivers/target/target_core_configfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c0dcafd8c52e0c36588d4d14c2ef4288830bc461 Author: Hannes Reinecke Date: Fri Apr 28 10:03:38 2017 +0200 target: fixup error message in target_tg_pt_gp_alua_access_type_store() When setting up a target the error message: Unable to do set ##_name ALUA state on non valid tg_pt_gp ID: 0 is displayed. Apparently concatenation doesn't work in a string; one should be using implicit string concatenation here. Signed-off-by: Hannes Reinecke Reviewed-by: Bart van Assche Signed-off-by: Nicholas Bellinger drivers/target/target_core_configfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ec5bf0ea83930b96addf6b78225bf0355459d7f Author: Bryant G. Ly Date: Fri Apr 21 20:40:50 2017 -0500 target/user: PGR Support This adds initial PGR support for just TCMU, since tcmu doesn't have the necessary IT_NEXUS info to process PGR in userspace, so have those commands be processed in kernel. HA support is not available yet, we will work on it if this patch is acceptable. Signed-off-by: Bryant G. Ly Signed-off-by: Nicholas Bellinger drivers/target/target_core_configfs.c | 10 ++++----- drivers/target/target_core_device.c | 38 +++++++++++++++++++++++++++++++++++ drivers/target/target_core_pr.c | 2 +- drivers/target/target_core_pscsi.c | 3 ++- include/target/target_core_backend.h | 1 + 5 files changed, 47 insertions(+), 7 deletions(-) commit c2d26f18dcbc84799457852292c66967ff6626f1 Author: Bryant G. Ly Date: Tue Apr 18 14:10:05 2017 -0500 target: Add WRITE_VERIFY_16 This patch addresses clients who needs write_verify_16 for large volume groups such as AIX. Signed-off-by: Bryant G. Ly Signed-off-by: Nicholas Bellinger drivers/target/target_core_sbc.c | 2 ++ include/scsi/scsi_proto.h | 1 + 2 files changed, 3 insertions(+) commit 38d454f0b5fab60d76eed5dcdfc7823d43d087ab Author: Christophe Vu-Brugier Date: Wed Apr 12 21:59:08 2017 +0200 Documentation/target: add an example script to configure an iSCSI target The script illustrates how to interact with configfs to create a very simple LIO iSCSI target with a file or block device backstore. The script can serve as a starting point for people that cannot use targetcli because Python is not available on their machine. Signed-off-by: Christophe Vu-Brugier Signed-off-by: Vincent Donnefort Signed-off-by: Nicholas Bellinger Documentation/target/target-export-device | 80 +++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit df6751f3401f86d87158279850aa9bedeef2d504 Author: Markus Elfring Date: Sun Apr 9 21:07:14 2017 +0200 target: Use kmalloc_array() in transport_kmap_data_sg() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f318aef55fed0968af42ceef3976ee7cd858d845 Author: Markus Elfring Date: Sun Apr 9 20:25:11 2017 +0200 target: Use kmalloc_array() in compare_and_write_callback() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data structure by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Nicholas Bellinger drivers/target/target_core_sbc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5d68fb72d3780555752bcf2526f759f953e08bc3 Author: Markus Elfring Date: Sun Apr 9 20:15:12 2017 +0200 target: Improve size determinations in two functions Replace the specification of two data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determinations a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Nicholas Bellinger drivers/target/target_core_rd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fbc4040bf67b10ee66097c9603550773a3bc5c06 Author: Markus Elfring Date: Sun Apr 9 19:20:26 2017 +0200 target: Delete error messages for failed memory allocations The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such statements here. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Nicholas Bellinger drivers/target/target_core_rd.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) commit 55ec409202ff347d22673d90e01a159d3bd6d9cd Author: Markus Elfring Date: Sun Apr 9 19:02:38 2017 +0200 target: Use kcalloc() in two functions * Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. * Replace the specification of data structures by pointer dereferences to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Nicholas Bellinger drivers/target/target_core_rd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3829f38169aaf38c764afba852e320d8f3b006de Author: Markus Elfring Date: Sun Apr 9 16:00:39 2017 +0200 iscsi-target: Improve size determinations in four functions Replace the specification of four data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determinations a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit c46e22f10612d91fb2cceef232e9d73c34be212a Author: Markus Elfring Date: Sun Apr 9 15:34:50 2017 +0200 iscsi-target: Delete error messages for failed memory allocations The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such statements here. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 37 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 27 deletions(-) commit f1725110324d97d841609fd0b3536eb3ead77086 Author: Markus Elfring Date: Sun Apr 9 15:06:00 2017 +0200 iscsi-target: Use kcalloc() in iscsit_allocate_iovecs() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. * Replace the specification of a data structure by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 056e8924a072d22007275dfb8b247bb814765b67 Author: Dmitry Monakhov Date: Fri Mar 31 19:53:36 2017 +0400 tcm: make pi data verification configurable Currently ramdisk and fileio always perform PI verification before and after backend IO. This approach is not very flexible. Because some one may want to postpone this work to other layers in IO stack. For example if we want to test blk_integrity_profile testcase: https://github.com/dmonakhov/xfstests/commit/dee408c868861d6b6871dbb3381facee7effdbe4 Signed-off-by: Dmitry Monakhov Signed-off-by: Nicholas Bellinger drivers/target/target_core_configfs.c | 34 ++++++++++++++++++++++++++++++++++ drivers/target/target_core_file.c | 6 ++++-- drivers/target/target_core_rd.c | 17 +++++++++-------- include/target/target_core_base.h | 1 + 4 files changed, 48 insertions(+), 10 deletions(-) commit f11b55d13563e9428c88c873f4f03a6bef11ec0a Author: Dmitry Monakhov Date: Fri Mar 31 19:53:35 2017 +0400 tcm_fileio: Prevent information leak for short reads If we failed to read data from backing file (probably because some one truncate file under us), we must zerofill cmd's data, otherwise it will be returned as is. Most likely cmd's data are unitialized pages from page cache. This result in information leak. (Change BUG_ON into -EINVAL se_cmd failure - nab) testcase: https://github.com/dmonakhov/xfstests/commit/e11a1b7b907ca67b1be51a1594025600767366d5 Signed-off-by: Dmitry Monakhov Signed-off-by: Nicholas Bellinger drivers/target/target_core_file.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 0e2eb7d12eaa8e391bf5615d4271bb87a649caaa Author: Bart Van Assche Date: Thu Mar 30 10:12:39 2017 -0700 target: Fix VERIFY and WRITE VERIFY command parsing Use the value of the BYTCHK field to determine the size of the Data-Out buffer. For VERIFY, honor the VRPROTECT, DPO and FUA fields. This patch avoids that LIO complains about a mismatch between the expected transfer length and the SCSI CDB length if the value of the BYTCHK field is 0. Signed-off-by: Bart Van Assche Cc: Max Lohrmann Cc: Signed-off-by: Nicholas Bellinger drivers/target/target_core_sbc.c | 71 +++++++++++++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 9 deletions(-) commit d65e655706e4827fb061daff399e07806b1223ad Author: Zhu Lingshan Date: Wed Mar 8 14:31:34 2017 +0800 target/pr: update PR out action code table This commit updated persistent revervation out service action code table in SPC-5 for development. Signed-off-by: Zhu Lingshan Signed-off-by: Nicholas Bellinger drivers/target/target_core_pr.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 5981c245a890db6a6e16fb6d3838cc9fc9fdf0ff Author: Elena Reshetova Date: Mon Mar 6 16:21:11 2017 +0200 target/iblock: convert iblock_req.pending from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Nicholas Bellinger drivers/target/target_core_iblock.c | 12 ++++++------ drivers/target/target_core_iblock.h | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) commit 3fb9268e43e7ab62adb5c6ddec58d3cb4767bd9a Merge: 12ca7c8 262fa73 Author: Linus Torvalds Date: Mon May 1 22:07:51 2017 -0700 Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm updates from Ingo Molnar: "The main changes in this cycle were: - unwinder fixes and enhancements - improve ftrace interaction with the unwinder - optimize the code footprint of WARN() and related debugging constructs - ... plus misc updates, cleanups and fixes" * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits) x86/unwind: Dump all stacks in unwind_dump() x86/unwind: Silence more entry-code related warnings x86/ftrace: Fix ebp in ftrace_regs_caller that screws up unwinder x86/unwind: Remove unused 'sp' parameter in unwind_dump() x86/unwind: Prepend hex mask value with '0x' in unwind_dump() x86/unwind: Properly zero-pad 32-bit values in unwind_dump() x86/unwind: Ensure stack pointer is aligned debug: Avoid setting BUGFLAG_WARNING twice x86/unwind: Silence entry-related warnings x86/unwind: Read stack return address in update_stack_state() x86/unwind: Move common code into update_stack_state() debug: Fix __bug_table[] in arch linker scripts debug: Add _ONCE() logic to report_bug() x86/debug: Define BUG() again for !CONFIG_BUG x86/debug: Implement __WARN() using UD0 x86/ftrace: Use Makefile logic instead of #ifdef for compiling ftrace_*.o x86/ftrace: Add -mfentry support to x86_32 with DYNAMIC_FTRACE set x86/ftrace: Clean up ftrace_regs_caller x86/ftrace: Add stack frame pointer to ftrace_caller x86/ftrace: Move the ftrace specific code out of entry_32.S ... commit aa1dca3bd96bfd0ddf6871fc1844bd12ccce50f1 Author: Eric Biggers Date: Tue May 2 00:49:54 2017 -0400 ext4: inherit encryption xattr before other xattrs When using both encryption and SELinux (or another feature that requires an xattr per file) on a filesystem with 256-byte inodes, each file's xattrs usually spill into an external xattr block. Currently, the xattrs are inherited in the order ACL, security, then encryption. Therefore, if spillage occurs, the encryption xattr will always end up in the external block. This is not ideal because the encryption xattrs contain a nonce, so they will always be unique and will prevent the external xattr blocks from being deduplicated. To improve the situation, change the inheritance order to encryption, ACL, then security. This gives the encryption xattr a better chance to be stored in-inode, allowing the other xattr(s) to be deduplicated. Note that it may be better for userspace to format the filesystem with 512-byte inodes in this case. However, it's not the default. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/ialloc.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 12ca7c8db30d36e0ba1d00d17fc8c85f9ebfdf47 Merge: a52bbaf 5ba039a Author: Linus Torvalds Date: Mon May 1 21:41:07 2017 -0700 Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 apic updates from Ingo Molnar: "Two small cleanups" * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/apic: Fix a comment in init_apic_mappings() x86/apic: Remove the SET_APIC_ID(x) macro commit a52bbaf4a3b81e07430a91ee37ea76557c2c02ed Merge: 16b7629 4797b7d Author: Linus Torvalds Date: Mon May 1 21:15:50 2017 -0700 Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpu updates from Ingo Molnar: "The biggest changes are an extension of the Intel RDT code to extend it with Intel Memory Bandwidth Allocation CPU support: MBA allows bandwidth allocation between cores, while CBM (already upstream) allows CPU cache partitioning. There's also misc smaller fixes and updates" * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits) x86/intel_rdt: Return error for incorrect resource names in schemata x86/intel_rdt: Trim whitespace while parsing schemata input x86/intel_rdt: Fix padding when resource is enabled via mount x86/intel_rdt: Get rid of anon union x86/cpu: Keep model defines sorted by model number x86/intel_rdt/mba: Add schemata file support for MBA x86/intel_rdt: Make schemata file parsers resource specific x86/intel_rdt/mba: Add info directory files for Memory Bandwidth Allocation x86/intel_rdt: Make information files resource specific x86/intel_rdt/mba: Add primary support for Memory Bandwidth Allocation (MBA) x86/intel_rdt/mba: Memory bandwith allocation feature detect x86/intel_rdt: Add resource specific msr update function x86/intel_rdt: Move CBM specific data into a struct x86/intel_rdt: Cleanup namespace to support multiple resource types Documentation, x86: Intel Memory bandwidth allocation x86/intel_rdt: Organize code properly x86/intel_rdt: Init padding only if a device exists x86/intel_rdt: Add cpus_list rdtgroup file x86/intel_rdt: Cleanup kernel-doc x86/intel_rdt: Update schemata read to show data in tabular format ... commit 16b76293c5c81e6345323d7aef41b26e8390f62d Merge: 3dee9fb da63b6b Author: Linus Torvalds Date: Mon May 1 20:51:12 2017 -0700 Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 boot updates from Ingo Molnar: "The biggest changes in this cycle were: - reworking of the e820 code: separate in-kernel and boot-ABI data structures and apply a whole range of cleanups to the kernel side. No change in functionality. - enable KASLR by default: it's used by all major distros and it's out of the experimental stage as well. - ... misc fixes and cleanups" * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (63 commits) x86/KASLR: Fix kexec kernel boot crash when KASLR randomization fails x86/reboot: Turn off KVM when halting a CPU x86/boot: Fix BSS corruption/overwrite bug in early x86 kernel startup x86: Enable KASLR by default boot/param: Move next_arg() function to lib/cmdline.c for later reuse x86/boot: Fix Sparse warning by including required header file x86/boot/64: Rename start_cpu() x86/xen: Update e820 table handling to the new core x86 E820 code x86/boot: Fix pr_debug() API braindamage xen, x86/headers: Add dependency to x86/boot/e820: Simplify e820__update_table() x86/boot/e820: Separate the E820 ABI structures from the in-kernel structures x86/boot/e820: Fix and clean up e820_type switch() statements x86/boot/e820: Rename the remaining E820 APIs to the e820__*() prefix x86/boot/e820: Remove unnecessary #include's x86/boot/e820: Rename e820_mark_nosave_regions() to e820__register_nosave_regions() x86/boot/e820: Rename e820_reserve_resources*() to e820__reserve_resources*() x86/boot/e820: Use bool in query APIs x86/boot/e820: Document e820__reserve_setup_data() x86/boot/e820: Clean up __e820__update_table() et al ... commit e3bf4c61da801c7967d0efff0c3f6b22d2c0e544 Author: David S. Miller Date: Mon May 1 20:26:02 2017 -0700 sparc64: Fix BPF JIT wrt. branches and ldimm64 instructions. Like other JITs, sparc64 maintains an array of instruction offsets but stores the entries off by one. This is done because jumps to the exit block are indexed to one past the last BPF instruction. So if we size the array by the program length, we need to record the previous instruction in order to stay within the array bounds. This is explained in ARM JIT commit 8eee539ddea0 ("arm64: bpf: fix out-of-bounds read in bpf2a64_offset()"). But this scheme requires a little bit of careful handling when the instruction before the branch destination is a 64-bit load immediate. It takes up 2 BPF instruction slots. Therefore, we have to fill in the array entry for the second half of the 64-bit load immediate instruction rather than for the one for the beginning of that instruction. Fixes: 7a12b5031c6b ("sparc64: Add eBPF JIT.") Signed-off-by: David S. Miller arch/sparc/net/bpf_jit_comp_64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3dee9fb2a4ced89a13a4d4b72b0b7360b701e566 Merge: 7c8c03b c6a9583 Author: Linus Torvalds Date: Mon May 1 20:48:33 2017 -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: "The main changes in this cycle were: - add the 'Corrected Errors Collector' kernel feature which collect and monitor correctable errors statistics and will preemptively (soft-)offline physical pages that have a suspiciously high error count. - handle MCE errors during kexec() more gracefully - factor out and deprecate the /dev/mcelog driver - ... plus misc fixes and cleanpus" * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Check MCi_STATUS[MISCV] for usable addr on Intel only ACPI/APEI: Use setup_deferrable_timer() x86/mce: Update notifier priority check x86/mce: Enable PPIN for Knights Landing/Mill x86/mce: Do not register notifiers with invalid prio x86/mce: Factor out and deprecate the /dev/mcelog driver RAS: Add a Corrected Errors Collector x86/mce: Rename mce_log to mce_log_buffer x86/mce: Rename mce_log()'s argument x86/mce: Init some CPU features early x86/mce: Handle broadcasted MCE gracefully with kexec commit 7c8c03bfc7b9f5211d8a69eab7fee99c9fb4f449 Merge: 6dc2cce fd76479 Author: Linus Torvalds Date: Mon May 1 20:23:17 2017 -0700 Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Ingo Molnar: "The main changes in this cycle were: Kernel side changes: - Kprobes and uprobes changes: - Make their trampolines read-only while they are used - Make UPROBES_EVENTS default-y which is the distro practice - Apply misc fixes and robustization to probe point insertion. - add support for AMD IOMMU events - extend hw events on Intel Goldmont CPUs - ... plus misc fixes and updates. Tooling side changes: - support s390 jump instructions in perf annotate (Christian Borntraeger) - vendor hardware events updates (Andi Kleen) - add argument support for SDT events in powerpc (Ravi Bangoria) - beautify the statx syscall arguments in 'perf trace' (Arnaldo Carvalho de Melo) - handle inline functions in callchains (Jin Yao) - enable sorting by srcline as key (Milian Wolff) - add 'brstackinsn' field in 'perf script' to reuse the x86 instruction decoder used in the Intel PT code to study hot paths to samples (Andi Kleen) - add PERF_RECORD_NAMESPACES so that the kernel can record information required to associate samples to namespaces, helping in container problem characterization. (Hari Bathini) - allow sorting by symbol_size in 'perf report' and 'perf top' (Charles Baylis) - in perf stat, make system wide (-a) the default option if no target was specified and one of following conditions is met: - no workload specified (current behaviour) - a workload is specified but all requested events are system wide ones, like uncore ones. (Jiri Olsa) - ... plus lots of other updates, enhancements, cleanups and fixes" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (235 commits) perf tools: Fix the code to strip command name tools arch x86: Sync cpufeatures.h tools arch: Sync arch/x86/lib/memcpy_64.S with the kernel tools: Update asm-generic/mman-common.h copy from the kernel perf tools: Use just forward declarations for struct thread where possible perf tools: Add the right header to obtain PERF_ALIGN() perf tools: Remove poll.h and wait.h from util.h perf tools: Remove string.h, unistd.h and sys/stat.h from util.h perf tools: Remove stale prototypes from builtin.h perf tools: Remove string.h from util.h perf tools: Remove sys/ioctl.h from util.h perf tools: Remove a few more needless includes from util.h perf tools: Include sys/param.h where needed perf callchain: Move callchain specific routines from util.[ch] perf tools: Add compress.h for the *_decompress_to_file() headers perf mem: Fix display of data source snoop indication perf debug: Move dump_stack() and sighandler_dump_stack() to debug.h perf kvm: Make function only used by 'perf kvm' static perf tools: Move timestamp routines from util.h to time-utils.h perf tools: Move units conversion/formatting routines to separate object ... commit 6dc2cce9321198172cd96f955a5fc798a4cc35a6 Merge: 207fb8c f3e4559 Author: Linus Torvalds Date: Mon May 1 19:57:58 2017 -0700 Merge branch 'x86-process-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pul x86/process updates from Ingo Molnar: "The main change in this cycle was to add the ARCH_[GET|SET]_CPUID prctl() ABI extension to control the availability of the CPUID instruction, analogously to the existing PR_GET|SET_TSC ABI that controls RDTSC. Motivation: the 'rr' user-space record-and-replay execution debugger would like to trap and emulate the CPUID instruction - which instruction is normally unprivileged. Trapping CPUID is possible on IvyBridge and later Intel CPUs - expose this hardware capability" * 'x86-process-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/syscalls/32: Ignore arch_prctl for other architectures um/arch_prctl: Fix fallout from x86 arch_prctl() rework x86/arch_prctl: Add ARCH_[GET|SET]_CPUID x86/cpufeature: Detect CPUID faulting support x86/syscalls/32: Wire up arch_prctl on x86-32 x86/arch_prctl: Add do_arch_prctl_common() x86/arch_prctl/64: Rename do_arch_prctl() to do_arch_prctl_64() x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl() x86/arch_prctl: Rename 'code' argument to 'option' x86/msr: Rename MISC_FEATURE_ENABLES to MISC_FEATURES_ENABLES x86/process: Optimize TIF_NOTSC switch x86/process: Correct and optimize TIF_BLOCKSTEP switch x86/process: Optimize TIF checks in __switch_to_xtra() commit 207fb8c3049cdc31de20ca9f91d0ae319125eb62 Merge: 3527d3e 59cd42c Author: Linus Torvalds Date: Mon May 1 19:36:00 2017 -0700 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: "The main changes in this cycle were: - a big round of FUTEX_UNLOCK_PI improvements, fixes, cleanups and general restructuring - lockdep updates such as new checks for lock_downgrade() - introduce the new atomic_try_cmpxchg() locking API and use it to optimize refcount code generation - ... plus misc fixes, updates and cleanups" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (38 commits) MAINTAINERS: Add FUTEX SUBSYSTEM futex: Clarify mark_wake_futex memory barrier usage futex: Fix small (and harmless looking) inconsistencies futex: Avoid freeing an active timer rtmutex: Plug preempt count leak in rt_mutex_futex_unlock() rtmutex: Fix more prio comparisons rtmutex: Fix PI chain order integrity sched,tracing: Update trace_sched_pi_setprio() sched/rtmutex: Refactor rt_mutex_setprio() rtmutex: Clean up sched/deadline/rtmutex: Dont miss the dl_runtime/dl_period update sched/rtmutex/deadline: Fix a PI crash for deadline tasks rtmutex: Deboost before waking up the top waiter locking/ww-mutex: Limit stress test to 2 seconds locking/atomic: Fix atomic_try_cmpxchg() semantics lockdep: Fix per-cpu static objects futex: Drop hb->lock before enqueueing on the rtmutex futex: Futex_unlock_pi() determinism futex: Rework futex_lock_pi() to use rt_mutex_*_proxy_lock() futex,rt_mutex: Restructure rt_mutex_finish_proxy_lock() ... commit 3527d3e9514f013f361fba29fd71858d9361049d Merge: 3711c94 21173d0 Author: Linus Torvalds Date: Mon May 1 19:12:53 2017 -0700 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: "The main changes in this cycle were: - another round of rq-clock handling debugging, robustization and fixes - PELT accounting improvements - CPU hotplug related ->cpus_allowed affinity handling fixes all around the tree - ... plus misc fixes, cleanups and updates" * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (35 commits) sched/x86: Update reschedule warning text crypto: N2 - Replace racy task affinity logic cpufreq/sparc-us2e: Replace racy task affinity logic cpufreq/sparc-us3: Replace racy task affinity logic cpufreq/sh: Replace racy task affinity logic cpufreq/ia64: Replace racy task affinity logic ACPI/processor: Replace racy task affinity logic ACPI/processor: Fix error handling in __acpi_processor_start() sparc/sysfs: Replace racy task affinity logic powerpc/smp: Replace open coded task affinity logic ia64/sn/hwperf: Replace racy task affinity logic ia64/salinfo: Replace racy task affinity logic workqueue: Provide work_on_cpu_safe() ia64/topology: Remove cpus_allowed manipulation sched/fair: Move the PELT constants into a generated header sched/fair: Increase PELT accuracy for small tasks sched/fair: Fix comments sched/Documentation: Add 'sched-pelt' tool sched/fair: Fix corner case in __accumulate_sum() sched/core: Remove 'task' parameter and rename tsk_restore_flags() to current_restore_flags() ... commit 3711c94fd6593318146348c940d81040acf9e877 Merge: 174ddfd 197dece Author: Linus Torvalds Date: Mon May 1 18:20:03 2017 -0700 Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI updates from Ingo Molnar: "The main changes in this cycle were: - move BGRT handling to drivers/acpi so it can be shared between x86 and ARM - bring the EFI stub's initrd and FDT allocation logic in line with the latest changes to the arm64 boot protocol - improvements and fixes to the EFI stub's command line parsing routines - randomize the virtual mapping of the UEFI runtime services on ARM/arm64 - ... and other misc enhancements, cleanups and fixes" * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/libstub/arm: Don't use TASK_SIZE when randomizing the RT space ef/libstub/arm/arm64: Randomize the base of the UEFI rt services region efi/libstub/arm/arm64: Disable debug prints on 'quiet' cmdline arg efi/libstub: Unify command line param parsing efi/libstub: Fix harmless command line parsing bug efi/arm32-stub: Allow boot-time allocations in the vmlinux region x86/efi: Clean up a minor mistake in comment efi/pstore: Return error code (if any) from efi_pstore_write() efi/bgrt: Enable ACPI BGRT handling on arm64 x86/efi/bgrt: Move efi-bgrt handling out of arch/x86 efi/arm-stub: Round up FDT allocation to mapping size efi/arm-stub: Correct FDT and initrd allocation rules for arm64 commit 4ca41cb2ae09bfd9f84f053b8b9966e1bb8accc4 Author: Ludovic Barre Date: Thu Apr 13 19:15:56 2017 +0200 dt-bindings: mtd: Document the STM32 QSPI bindings This patch adds documentation of device tree bindings for the STM32 QSPI controller. Signed-off-by: Ludovic Barre Acked-by: Rob Herring Signed-off-by: Brian Norris .../devicetree/bindings/mtd/stm32-quadspi.txt | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 47228ca57e845d3d9196eb4e232b7cf6217a9beb Merge: 57e363b 8abe904 Author: Brian Norris Date: Mon May 1 17:08:10 2017 -0700 Merge tag 'spi-nor/for-4.12-v2' of git://github.com/spi-nor/linux into MTD From Cyrille: """ This pull request contains the following notable changes: - fixes in the hisi SPI controller driver. - fixes in the intel SPI controller driver. - fixes in the Mediatek SPI controller driver. - fixes to some SPI flash memories not supported the Chip Erase command. - add support to some new memory parts (Winbond, Macronix, Micron, ESMT). - add new driver for the STM32 QSPI controller. """ commit 174ddfd5dfbfc2d91a45332f809977050ac3fdc5 Merge: 3cb6653 b94bf59 Author: Linus Torvalds Date: Mon May 1 16:15:18 2017 -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 departement delivers: - more year 2038 rework - a massive rework of the arm achitected timer - preparatory patches to allow NTP correction of clock event devices to avoid early expiry - the usual pile of fixes and enhancements all over the place" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (91 commits) timer/sysclt: Restrict timer migration sysctl values to 0 and 1 arm64/arch_timer: Mark errata handlers as __maybe_unused Clocksource/mips-gic: Remove redundant non devicetree init MIPS/Malta: Probe gic-timer via devicetree clocksource: Use GENMASK_ULL in definition of CLOCKSOURCE_MASK acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver clocksource: arm_arch_timer: add GTDT support for memory-mapped timer acpi/arm64: Add memory-mapped timer support in GTDT driver clocksource: arm_arch_timer: simplify ACPI support code. acpi/arm64: Add GTDT table parse driver clocksource: arm_arch_timer: split MMIO timer probing. clocksource: arm_arch_timer: add structs to describe MMIO timer clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT init call clocksource: arm_arch_timer: refactor arch_timer_needs_probing clocksource: arm_arch_timer: split dt-only rate handling x86/uv/time: Set ->min_delta_ticks and ->max_delta_ticks unicore32/time: Set ->min_delta_ticks and ->max_delta_ticks um/time: Set ->min_delta_ticks and ->max_delta_ticks tile/time: Set ->min_delta_ticks and ->max_delta_ticks score/time: Set ->min_delta_ticks and ->max_delta_ticks ... commit 3cb6653552ddd0b5670a445032ecb9f162e950ff Merge: 2dbf3d5 216646e Author: Linus Torvalds Date: Mon May 1 15:46:13 2017 -0700 Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "Nothing exciting from the irq side for this merge window: - a new driver for a Mediatek SoC - ACPI support for ARM GICV3 - support for shared nested interrupts - the usual pile of fixes and updates all over te place" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (28 commits) irqchip/mbigen: Fix return value check in mbigen_device_probe() irqchip/mips-gic: Replace static map with dynamic irqchip/mips-gic: Remove device IRQ domain irqchip/mips-gic: Separate IPI reservation & usage tracking genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs genirq: Use cpumask_available() for check of cpumask variable cpumask: Add helper cpumask_available() irqchip/irq-imx-gpcv2: Clear OF_POPULATED flag irqchip/atmel-aic5: Handle suspend to RAM irqchip: Add Mediatek mtk-cirq driver dt-bindings: mtk-cirq: Add binding document irqchip/gic-v3-its: Add IORT hook for platform MSI support irqchip/mbigen: Add ACPI support irqchip/mbigen: Introduce mbigen_of_create_domain() irqchip/mbigen: Drop module owner platform-msi: Make platform_msi_create_device_domain() ACPI aware irqchip/gicv3-its: platform-msi: Scan MADT to create platform msi domain irqchip/gicv3-its: platform-msi: Refactor its_pmsi_init() to prepare for ACPI irqchip/gicv3-its: platform-msi: Refactor its_pmsi_prepare() irqchip/gic-v3-its: Keep the include header files in alphabetic order ... commit 412445acb6cad4cef026daae37c4765fb9942c60 Author: Christoph Hellwig Date: Wed Apr 26 09:40:39 2017 +0200 dm: introduce a new DM_MAPIO_KILL return value This untangles the DM_MAPIO_* values returned from ->clone_and_map_rq from the error codes used by the block layer. Signed-off-by: Christoph Hellwig Signed-off-by: Mike Snitzer drivers/md/dm-rq.c | 12 +++++------- drivers/md/dm-target.c | 2 +- include/linux/device-mapper.h | 1 + 3 files changed, 7 insertions(+), 8 deletions(-) commit 7ed8578a96ad98231d8bf6388f776e034673e18a Author: Christoph Hellwig Date: Wed Apr 26 09:40:37 2017 +0200 dm rq: change ->rq_end_io calling conventions Instead of returning either a DM_ENDIO_* constant or an error code, add a new DM_ENDIO_DONE value that means keep errno as is. This allows us to easily keep the existing error code in case where we can't push back, and it also preparares for the new block level status codes with strict type checking. Signed-off-by: Christoph Hellwig Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 13 +++++++++---- drivers/md/dm-rq.c | 17 ++++++++++------- include/linux/device-mapper.h | 1 + 3 files changed, 20 insertions(+), 11 deletions(-) commit b79f10eefd4bc450a595b93c75e3a9d159ac3885 Author: Christoph Hellwig Date: Wed Apr 26 09:40:36 2017 +0200 dm mpath: merge do_end_io into multipath_end_io This simplifies the I/O completion path a bit. Signed-off-by: Christoph Hellwig Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 51 +++++++++++++++++---------------------------------- 1 file changed, 17 insertions(+), 34 deletions(-) commit 7e25a7606147bfe29a7421ff2cb332b07d3cee3a Merge: 9438b3e 390020a Author: Mike Snitzer Date: Mon May 1 18:18:04 2017 -0400 Merge branch 'dm-4.12' into dm-4.12-post-merge commit 2dbf3d5c32bf905c2575e5759f2ab6262ec9c6c5 Merge: a25fb85 01e7bc2 Author: Linus Torvalds Date: Mon May 1 15:02:19 2017 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32 Pull AVR32 removal from Hans-Christian Noren Egtvedt: "This will remove support for AVR32 architecture from the kernel and clean away the most obvious architecture related parts. Removing dead code in drivers is the next step" Notes from previous discussion about this: "The AVR32 architecture is not keeping up with the development of the kernel, and since it shares so much of the drivers with Atmel ARM SoC, it is starting to hinder these drivers to develop swiftly. Also, all AVR32 AP7 SoC processors are end of lifed from Atmel (now Microchip). Finally, the GCC toolchain is stuck at version 4.2.x, and has not received any patches since the last release from Atmel; 4.2.4-atmel.1.1.3.avr32linux.1. When building kernel v4.10, this toolchain is no longer able to properly link the network stack. Haavard and I have came to the conclusion that we feel keeping AVR32 on life support offers more obstacles for Atmel ARMs, than it gives joy to AVR32 users. I also suspect there are very few AVR32 users left today, if anybody at all" That discussion was acked by Andy Shevchenko, Boris Brezillon, Nicolas Ferre, and Haavard Skinnemoen. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32: mm: remove AVR32 arch special handling in mm/Kconfig lib: remove check for AVR32 arch in test_user_copy lib: remove AVR32 entry in Kconfig.debug compile with frame pointers scripts: remove AVR32 support from checkstack.pl docs: remove all references to AVR32 architecture avr32: remove support for AVR32 architecture commit a25fb8508c1b80dce742dbeaa4d75a1e9f2c5617 Author: Sergei Trofimovich Date: Mon May 1 11:51:55 2017 -0700 ia64: fix module loading for gcc-5.4 Starting from gcc-5.4+ gcc generates MLX instructions in more cases to refer local symbols: https://gcc.gnu.org/PR60465 That caused ia64 module loader to choke on such instructions: fuse: invalid slot number 1 for IMM64 The Linux kernel used to handle only case where relocation pointed to slot=2 instruction in the bundle. That limitation was fixed in linux by commit 9c184a073bfd ("[IA64] Fix 2.6 kernel for the new ia64 assembler") See http://sources.redhat.com/bugzilla/show_bug.cgi?id=1433 This change lifts the slot=2 restriction from the kernel module loader. Tested on 'fuse' and 'btrfs' kernel modules. Cc: Markus Elfring Cc: H J Lu Cc: Fenghua Yu Cc: Andrew Morton Bug: https://bugs.gentoo.org/601014 Tested-by: Émeric MASCHINO Signed-off-by: Sergei Trofimovich Signed-off-by: Tony Luck Signed-off-by: Linus Torvalds arch/ia64/kernel/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5db6db0d400edd8bec274e34960cfa22838e1df5 Merge: 5fab100 2fefc97 Author: Linus Torvalds Date: Mon May 1 14:41:04 2017 -0700 Merge branch 'work.uaccess' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull uaccess unification updates from Al Viro: "This is the uaccess unification pile. It's _not_ the end of uaccess work, but the next batch of that will go into the next cycle. This one mostly takes copy_from_user() and friends out of arch/* and gets the zero-padding behaviour in sync for all architectures. Dealing with the nocache/writethrough mess is for the next cycle; fortunately, that's x86-only. Same for cleanups in iov_iter.c (I am sold on access_ok() in there, BTW; just not in this pile), same for reducing __copy_... callsites, strn*... stuff, etc. - there will be a pile about as large as this one in the next merge window. This one sat in -next for weeks. -3KLoC" * 'work.uaccess' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (96 commits) HAVE_ARCH_HARDENED_USERCOPY is unconditional now CONFIG_ARCH_HAS_RAW_COPY_USER is unconditional now m32r: switch to RAW_COPY_USER hexagon: switch to RAW_COPY_USER microblaze: switch to RAW_COPY_USER get rid of padding, switch to RAW_COPY_USER ia64: get rid of copy_in_user() ia64: sanitize __access_ok() ia64: get rid of 'segment' argument of __do_{get,put}_user() ia64: get rid of 'segment' argument of __{get,put}_user_check() ia64: add extable.h powerpc: get rid of zeroing, switch to RAW_COPY_USER esas2r: don't open-code memdup_user() alpha: fix stack smashing in old_adjtimex(2) don't open-code kernel_setsockopt() mips: switch to RAW_COPY_USER mips: get rid of tail-zeroing in primitives mips: make copy_from_user() zero tail explicitly mips: clean and reorder the forest of macros... mips: consolidate __invoke_... wrappers ... commit 5fab10041b4389b61de7e7a49893190bae686241 Merge: 08be881 e481747 Author: Linus Torvalds Date: Mon May 1 14:18:05 2017 -0700 Merge tag 'devprop-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull generic device properties framework updates from Rafael Wysocki: "These add support for the ports and endpoints concepts, based on the existing DT support for them, to the generic device properties framework and update the ACPI _DSD properties code to recognize ports and endpoints accordingly. Specifics: - Extend the ACPI _DSD properties code and the generic device properties framework to support the concept of remote endponts (Mika Westerberg, Sakari Ailus). - Document the support for ports and endpoints in _DSD properties and extend the generic device properties framework to make it more suitable for the handling of ports and endpoints (Sakari Ailus)" * tag 'devprop-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: device property: Read strings using string array reading functions device property: fwnode_property_read_string_array() returns nr of strings device property: Fix reading pset strings using array access functions device property: fwnode_property_read_string_array() may return -EILSEQ ACPI / DSD: Document references, ports and endpoints device property: Add fwnode_get_next_parent() device property: Add support for fwnode endpoints device property: Make dev_fwnode() public of: Add of_fwnode_handle() to convert device nodes to fwnode_handle device property: Add fwnode_handle_get() device property: Add support for remote endpoints ACPI / property: Add support for remote endpoints device property: Add fwnode_get_named_child_node() ACPI / property: Add fwnode_get_next_child_node() device property: Add fwnode_get_parent() ACPI / property: Add possiblity to retrieve parent firmware node commit 1b2e87687d3f951a66900cab6f1583d94099d2f7 Author: David E. Box Date: Sat Apr 22 23:06:25 2017 -0700 x86/intel_idle: add Gemini Lake support Gemini Lake uses the same C-states as Broxton and also uses the IRTL MSR's to determine maximum C-state latency. Signed-off-by: David E. Box Acked-by: Len Brown Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 2 ++ 1 file changed, 2 insertions(+) commit 41dc750ea67f317c0deedde713d1728425524ef2 Author: Li, Fei Date: Thu Apr 27 01:47:25 2017 +0000 cpuidle: check dev before usage in cpuidle_use_deepest_state() In case of there is no cpuidle devices registered, dev will be null, and panic will be triggered like below; In this patch, add checking of dev before usage, like that done in cpuidle_idle_call. Panic without fix: [ 184.961328] BUG: unable to handle kernel NULL pointer dereference at (null) [ 184.961328] IP: cpuidle_use_deepest_state+0x30/0x60 ... [ 184.961328] play_idle+0x8d/0x210 [ 184.961328] ? __schedule+0x359/0x8e0 [ 184.961328] ? _raw_spin_unlock_irqrestore+0x28/0x50 [ 184.961328] ? kthread_queue_delayed_work+0x41/0x80 [ 184.961328] clamp_idle_injection_func+0x64/0x1e0 Fixes: bb8313b603eb8 (cpuidle: Allow enforcing deepest idle state selection) Signed-off-by: Li, Fei Tested-by: Shi, Feng Reviewed-by: Andy Shevchenko Cc: 4.10+ # 4.10+ Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 08be881064da126b8df4b96b0b3e2e307969a4a1 Merge: 0e285e9 52e70c8 Author: Linus Torvalds Date: Mon May 1 14:13:28 2017 -0700 Merge tag 'acpi-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These are some device enumeration code changes, updates of the AC and battery drivers to help them avoid attaching to devices that cannot be handled by them, new operation region driver for the Intel CHT Whiskey Cove PMIC, new sysfs entries for CPPC performance capabilities, a new _REV quirk blacklist entry and a couple of assorted minor fixes and cleanups. Specifics: - Update the core device enumeration code to make it more internally consistent and robust and drop the force_remove sysfs attribute that could be used to tell it to ignore errors on device hot-removal which was dangerous in general and no real and still relevant use cases for it could be found (Rafael Wysocki, Michal Hocko). - Make the core device enumeration code use _PXM to associate platform devices created by it with specific NUMA nodes (Shanker Donthineni). - Extend the CPPC library by adding more sysfs entries for performance capabilities to it and making it use the lowest nonlinear performance parameter (Prashanth Prakash). - Make the CPU online more consistent with CPU initialization in the ACPI processor driver (Prashanth Prakash). - Update the AC and battery drivers to help them avoid attaching to devices that cannot be handled by them and update the axp288_charger power supply driver to work correctly on ACPI systems without the INT3496 device (Hans de Goede). - Add an ACPI operation region driver for the Intel CHT Whiskey Cove PMIC and update the xpower operation region driver to work without IIO which isn't really necessary for it to work (Hans de Goede). - Add a new entry for Dell Inspiron 7537 to the _REV quirk blacklist (Kai Heng Feng). - Make the code in the ACPI video driver easier to follow by adding symbols and comments to it (Dmitry Frank). - Update ACPI documentation and drop a function that has no users from the tables-handling code (Cao jin, Baoquan He)" * tag 'acpi-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / PMIC: Stop xpower OPRegion handler relying on IIO ACPI / PMIC: Add opregion driver for Intel CHT Whiskey Cove PMIC ACPI / scan: Avoid enumerating devices more than once ACPI / scan: Apply default enumeration to devices with ACPI drivers power: supply: axp288_charger: Only wait for INT3496 device if present ACPI / AC: Add a blacklist with PMIC ACPI HIDs with a native charger driver ACPI / battery: Add a blacklist with PMIC ACPI HIDs with a native battery driver ACPI / battery: Fix acpi_battery_exit on acpi_battery_init_async errors ACPI / utils: Add new acpi_dev_present helper ACPI / video: add comments about subtle cases ACPI / video: get rid of magic numbers and use enum instead ACPI / doc: linuxized-acpica.txt: fix typos ACPI / blacklist: add _REV quirk for Dell Inspiron 7537 ACPI / tables: Drop acpi_parse_entries() which is not used ACPI / CPPC: add sysfs entries for CPPC perf capabilities ACPI / CPPC: Read lowest nonlinear perf in cppc_get_perf_caps() ACPI / platform: Update platform device NUMA node based on _PXM method ACPI / Processor: Drop setup_max_cpus check from acpi_processor_add() ACPI / scan: Drop support for force_remove commit 8ece1d83346bcc431090d59a2184276192189cdd Author: Hans de Goede Date: Sun Apr 30 22:54:16 2017 +0200 ACPI / power: Delay turning off unused power resources after suspend Commit 660b1113e0f3 (ACPI / PM: Fix consistency check for power resources during resume) introduced a check for ACPI power resources which have been turned on by the BIOS during suspend and turns these back off again. This is causing problems on a Dell Venue Pro 11 7130 (i5-4300Y) it causes the following messages to show up in dmesg: [ 131.014605] ACPI: Waking up from system sleep state S3 [ 131.150271] acpi LNXPOWER:07: Turning OFF [ 131.150323] acpi LNXPOWER:06: Turning OFF [ 131.150911] acpi LNXPOWER:00: Turning OFF [ 131.169014] ACPI : EC: interrupt unblocked [ 131.181811] xhci_hcd 0000:00:14.0: System wakeup disabled by ACPI [ 133.535728] pci_raw_set_power_state: 76 callbacks suppressed [ 133.535735] iwlwifi 0000:01:00.0: Refused to change power state, currently in D3 [ 133.597672] PM: noirq resume of devices complete after 2428.891 msecs Followed by a bunch of iwlwifi errors later on and the pcie device dropping from the bus (acpiphp thinks it has been unplugged). Disabling the turning off of unused power resources fixes this. Instead of adding a quirk for this system, this commit fixes this by moving the disabling of unused power resources to later in the resume sequence when the iwlwifi card has been moved out of D3 so the ref_count for its power resource no longer is 0. This new behavior seems to match the intend of the original commit which commit-msg says: "(... which means that no devices are going to need them any time soon) and we should turn them off". This also avoids power resources which we need when bringing devices out of D3 from getting bounced off and then back on again. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/power.c | 10 ++++++++++ drivers/acpi/sleep.c | 1 + drivers/acpi/sleep.h | 1 + 3 files changed, 12 insertions(+) commit 0e285e90887bcb248178d55960e1276188c657c9 Merge: 9410091 a1d2fcf Author: Linus Torvalds Date: Mon May 1 14:09:46 2017 -0700 Merge tag 'pm-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "This time the majority of changes go to the cpufreq subsystem (and to the intel_pstate driver in particular) and there are some updates in the generic power domains framework, cpuidle, tools and a couple of other places. One thing worth mentioning is that the intel_pstate's sysfs interface has been reworked to be more consistent with the general expectations of the cpufreq core and less confusing, hopefully for the better. Also, we have a new cpufreq driver for Tegra186 and new hardware support in intel_pstata and the Mediatek cpufreq driver. Apart from that, the AnalyzeSuspend utility for system suspend profiling gets a companion called AnalyzeBoot for the analogous profiling of system boot and they both go into one place under tools/power/pm-graph/. The rest is mostly fixes, cleanups and code reorganization. Specifics: - Rework the intel_pstate driver's sysfs interface to make it more straightforward and more intuitive (Rafael Wysocki). - Make intel_pstate support all processors which advertise HWP (hardware-managed P-states) to the kernel in all operation modes and make it use the load-based P-state selection algorithm on a wider range of systems in the active mode (Rafael Wysocki). - Add cpufreq driver for Tegra186 (Mikko Perttunen). - Add support for Gemini Lake SoCs to intel_pstate (David Box). - Add support for MT8176 and MT817x to the Mediatek cpufreq driver and clean up that driver a bit (Daniel Kurtz). - Clean up intel_pstate and optimize it slightly (Rafael Wysocki). - Update the schedutil cpufreq governor, mostly to fix a couple of issues with it related to specific workloads, and rework its sysfs tunable and initialization a bit (Rafael Wysocki, Viresh Kumar). - Fix minor issues in the imx6q, dbx500 and qoriq cpufreq drivers (Christophe Jaillet, Irina Tirdea, Leonard Crestez, Viresh Kumar, YuanTian Tang). - Add file patterns for cpufreq DT bindings to MAINTAINERS (Geert Uytterhoeven). - Add support for "always on" power domains to the genpd (generic power domains) framework and clean up that code somewhat (Ulf Hansson, Lina Iyer, Viresh Kumar). - Fix minor issues in the powernv cpuidle driver and clean it up (Anton Blanchard, Gautham Shenoy). - Move the AnalyzeSuspend utility under tools/power/pm-graph/ and add an analogous boot-profiling utility called AnalyzeBoot to it (Todd Brandt). - Add rk3328 support to the rockchip-io AVS (Adaptive Voltage Scaling) driver (David Wu). - Fix minor issues in the cpuidle core, the intel_pstate_tracer utility, the devfreq framework and the PM core documentation (Chanwoo Choi, Doug Smythies, Johan Hovold, Marcin Nowakowski)" * tag 'pm-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (56 commits) PM / runtime: Document autosuspend-helper side effects PM / runtime: Fix autosuspend documentation tools: power: pm-graph: Package makefile and man pages tools: power: pm-graph: AnalyzeBoot v2.0 tools: power: pm-graph: AnalyzeSuspend v4.6 cpufreq: Add Tegra186 cpufreq driver cpufreq: imx6q: Fix error handling code cpufreq: imx6q: Set max suspend_freq to avoid changes during suspend cpufreq: imx6q: Fix handling EPROBE_DEFER from regulator cpuidle: powernv: Avoid a branch in the core snooze_loop() loop cpuidle: powernv: Don't continually set thread priority in snooze_loop() cpuidle: powernv: Don't bounce between low and very low thread priority cpuidle: cpuidle-cps: remove unused variable tools/power/x86/intel_pstate_tracer: Adjust directory ownership cpufreq: schedutil: Use policy-dependent transition delays cpufreq: schedutil: Reduce frequencies slower PM / devfreq: Move struct devfreq_governor to devfreq directory PM / Domains: Ignore domain-idle-states that are not compatible cpufreq: intel_pstate: Add support for Gemini Lake powernv-cpuidle: Validate DT property array size ... commit e265eb3a30543a237b2ebc4e0422ac82e55b07e4 Merge: 85724ed b506335 Author: Shaohua Li Date: Mon May 1 14:09:21 2017 -0700 Merge branch 'md-next' into md-linus commit 9410091dd5b4097819fcbb6d63987c51f62c85fd Merge: ad1490b 310b481 Author: Linus Torvalds Date: Mon May 1 13:52:24 2017 -0700 Merge branch 'for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: "Nothing major. Two notable fixes are Li's second stab at fixing the long-standing race condition in the mount path and suppression of spurious warning from cgroup_get(). All other changes are trivial" * 'for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: mark cgroup_get() with __maybe_unused cgroup: avoid attaching a cgroup root to two different superblocks, take 2 cgroup: fix spurious warnings on cgroup_is_dead() from cgroup_sk_alloc() cgroup: move cgroup_subsys_state parent field for cache locality cpuset: Remove cpuset_update_active_cpus()'s parameter. cgroup: switch to BUG_ON() cgroup: drop duplicate header nsproxy.h kernel: convert css_set.refcount from atomic_t to refcount_t kernel: convert cgroup_namespace.count from atomic_t to refcount_t commit ad1490bcd2484a24f5b8d7ae18368b739f3e1e19 Merge: e69bbe7 c30fb26 Author: Linus Torvalds Date: Mon May 1 13:49:27 2017 -0700 Merge branch 'for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue update from Tejun Heo: "One trivial patch to use setup_deferrable_timer() instead of open-coding the initialization" * 'for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: use setup_deferrable_timer commit 57e363b8c45b6626b012f6ce39a2f70adf6b49fc Merge: da4b1ca 9d2ee0a Author: Brian Norris Date: Mon May 1 13:36:44 2017 -0700 Merge tag 'nand/for-4.12' of github.com:linux-nand/linux into MTD From Boris: """ This pull request contains: - some minor fixes/improvements on existing drivers (fsmc, gpio, ifc, davinci, brcmnand, omap) - a huge cleanup/rework of the denali driver accompanied with core fixes/improvements to simplify the driver code - a complete rewrite of the atmel driver to support new DT bindings make future evolution easier - the addition of per-vendor detection/initialization steps to avoid extending the nand_ids table with more extended-id entries """ commit 87f0faadc68534668802a85ae670435bc90830b3 Author: Doug Ledford Date: Mon May 1 16:35:59 2017 -0400 IB/SA: Add OPA addr header When importing the patch 57520751445b (IB/SA: Add OPA path record type), a new header file should have been added to the repo as part of the patch. However, as the patch didn't apply cleanly using git am, I instead used patch manually, and followed that up with git add -u, which misses new files. This adds the new file back in. Fixes: 57520751445b (IB/SA: Add OPA path record type) Signed-off-by: Doug Ledford include/rdma/opa_addr.h | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit e69bbe75de8ee0e732b8c009197f1a97e804d43c Merge: 85724ed 63ccc19 Author: Linus Torvalds Date: Mon May 1 13:34:49 2017 -0700 Merge branch 'for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata updates from Tejun Heo: "The biggest core change is removal of SCT WRITE SAME support, which never worked properly. Other than that, trivial updates in core code and specific embedded driver updates" * 'for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: libata: remove SCT WRITE SAME support libata: reject passthrough WRITE SAME requests dt-bindings: ata: add DT bindings for ahci-dm816 SATA controller ata: ahci: add support for DaVinci DM816 SATA controller pata: remove the at91 driver libata: make ata_sg_clean static over again libata: use setup_deferrable_timer ata: allow subsystem to be used on m32r and s390 archs Delete redundant return value check of platform_get_resource() ata: constify of_device_id structures commit 48e75b430670ebdbb00ba008e1d3690f61ab9824 Author: Florian Westphal Date: Mon May 1 22:18:01 2017 +0200 rhashtable: compact struct rhashtable_params By using smaller datatypes this (rather large) struct shrinks considerably (80 -> 48 bytes on x86_64). As this is embedded in other structs, this also rerduces size of several others, e.g. cls_fl_head or nft_hash. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller include/linux/rhashtable.h | 18 +++++++++--------- lib/rhashtable.c | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) commit 67fd38973513c341c84654ae2f819089b840a39b Author: Arnd Bergmann Date: Thu Apr 27 16:30:41 2017 +0200 block, dax: use correct format string in bdev_dax_supported The new message has an incorrect format string, causing a warning in some configurations: fs/block_dev.c: In function 'bdev_dax_supported': fs/block_dev.c:779:5: error: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Werror=format=] "error: dax access failed (%d)", len); This changes it to use the correct %ld instead of %d. Fixes: 2093f2e9dfec ("block, dax: convert bdev_dax_supported() to dax_direct_access()") Signed-off-by: Arnd Bergmann Signed-off-by: Dan Williams fs/block_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 565851c972b50612f3a4542e26879ffb3e906fc2 Author: Dan Williams Date: Sun Apr 30 06:57:01 2017 -0700 device-dax: fix sysfs attribute deadlock Usage of device_lock() for dax_region attributes is unnecessary and deadlock prone. It's unnecessary because the order of registration / un-registration guarantees that drvdata is always valid. It's deadlock prone because it sets up this situation: ndctl D 0 2170 2082 0x00000000 Call Trace: __schedule+0x31f/0x980 schedule+0x3d/0x90 schedule_preempt_disabled+0x15/0x20 __mutex_lock+0x402/0x980 ? __mutex_lock+0x158/0x980 ? align_show+0x2b/0x80 [dax] ? kernfs_seq_start+0x2f/0x90 mutex_lock_nested+0x1b/0x20 align_show+0x2b/0x80 [dax] dev_attr_show+0x20/0x50 ndctl D 0 2186 2079 0x00000000 Call Trace: __schedule+0x31f/0x980 schedule+0x3d/0x90 __kernfs_remove+0x1f6/0x340 ? kernfs_remove_by_name_ns+0x45/0xa0 ? remove_wait_queue+0x70/0x70 kernfs_remove_by_name_ns+0x45/0xa0 remove_files.isra.1+0x35/0x70 sysfs_remove_group+0x44/0x90 sysfs_remove_groups+0x2e/0x50 dax_region_unregister+0x25/0x40 [dax] devm_action_release+0xf/0x20 release_nodes+0x16d/0x2b0 devres_release_all+0x3c/0x60 device_release_driver_internal+0x17d/0x220 device_release_driver+0x12/0x20 unbind_store+0x112/0x160 ndctl/2170 is trying to acquire the device_lock() to read an attribute, and ndctl/2186 is holding the device_lock() while trying to drain all active attribute readers. Thanks to Yi Zhang for the reproduction script. Fixes: d7fe1a67f658 ("dax: add region 'id', 'size', and 'align' attributes") Cc: Reported-by: Yi Zhang Signed-off-by: Dan Williams drivers/dax/dax.c | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) commit 85724edecbdc19f53ed4b902fc3a32e4d1b61c9b Merge: 477d7ca 28c5fe9 Author: Linus Torvalds Date: Mon May 1 13:12:49 2017 -0700 Merge tag 'leds_for_4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED updates from Jacek Anaszewski: "New drivers: - add LED support for MT6323 PMIC - add LED support for Motorola CPCAP PMIC New features and improvements: - add LED trigger for all CPUs aggregated which is useful on tiny boards with more CPU cores than LED pins - add OF variants of LED registering functions as a preparation for adding generic support for Device Tree parsing - dell-led improvements and cleanups, followed by moving it to the x86 platform driver subsystem which is a more appropriate place for it - extend pca9532 Device Tree support by adding the LEDs 'default-state' property - extend pca963x Device Tree support by adding nxp,inverted-out property for inverting the polarity of the output - remove ACPI support for lp3952 since it relied on a non-official ACPI IDs" * tag 'leds_for_4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: pca9532: Extend pca9532 device tree support leds: cpcap: new driver mfd: cpcap: Add missing include dependencies leds: lp3952: Use 'if (ret)' pattern leds: lp3952: Remove ACPI support for lp3952 leds: mt6323: Fix an off by one bug in probe dt-bindings: leds: Add document bindings for leds-mt6323 leds: Add LED support for MT6323 PMIC leds: gpio: use OF variant of LED registering function leds: core: add OF variants of LED registering functions platform/x86: dell-wmi-led: fix coding style issues dell-led: move driver to drivers/platform/x86/dell-wmi-led.c dell-led: remove code related to mic mute LED platform/x86: dell-laptop: import dell_micmute_led_set() from drivers/leds/dell-led.c ALSA: hda - rename dell_led_set_func to dell_micmute_led_set_func ALSA: hda - use dell_micmute_led_set() instead of dell_app_wmi_led_set() dell-led: remove GUID check from dell_micmute_led_set() leds/trigger/cpu: Add LED trigger for all CPUs aggregated commit 477d7caeede0e3a933368440fc877b12c25dbb6d Merge: 6fb41cb cb710ab Author: Linus Torvalds Date: Mon May 1 13:10:03 2017 -0700 Merge branch 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: - new driver for Broadcom FlexRM controller - constify data structures of callback functions in some drivers - a few bug fixes uncovered by multi-threaded use of mailbox channels in blocking mode * 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: handle empty message in tx_tick mailbox: skip complete wait event if timer expired mailbox: always wait in mbox_send_message for blocking Tx mode mailbox: Remove depends on COMPILE_TEST for BCM_FLEXRM_MBOX mailbox: check ->last_tx_done for NULL in case of timer-based polling dt-bindings: Add DT bindings info for FlexRM ring manager mailbox: Add driver for Broadcom FlexRM ring manager dt-bindings: mailbox: Update doc with NSP PDC/mailbox support mailbox: bcm-pdc: Add Northstar Plus support to PDC driver mailbox: constify mbox_chan_ops structures commit 6fb41cbd7d82f7b9e41db6245f6a46c84ca3083e Merge: 5c6ba7d 2c1175c Author: Linus Torvalds Date: Mon May 1 13:07:02 2017 -0700 Merge tag 'for-linux-4.12' of git://github.com/cminyard/linux-ipmi Pull IPMI updates from Corey Minyard: "A few fixes of things in the IPMI area, the watchdog would have issues at panic time cause by a recently introduced change, a problem with device numbering, one possible panic in the I2C driver (destined for stable). Nothing earth-shattering, but some things that need to go in" * tag 'for-linux-4.12' of git://github.com/cminyard/linux-ipmi: ipmi/watchdog: fix wdog hang on panic waiting for ipmi response ipmi_si: use smi_num for init_name ipmi: bt-bmc: Add ast2500 compatible string ACPI / IPMI: change warning to debug on timeout ACPI / IPMI: allow ACPI_IPMI with IPMI_SSIF ipmi_ssif: use setup_timer ipmi: Fix kernel panic at ipmi_ssif_thread() commit 5c6ba7d53274b5e8b13ecbc727d8eb1ea4a2bcdc Merge: 7f2ebde 3026050 Author: Linus Torvalds Date: Mon May 1 13:04:39 2017 -0700 Merge tag 'hsi-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI fix from Sebastian Reichel: "Fix double free fix in ssi-protocol" * tag 'hsi-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: ssi_protocol: double free in ssip_pn_xmit() commit 7f2ebde737c933d75718a1fca933af4e9d53006b Merge: cdbfbba 6c38166 Author: Linus Torvalds Date: Mon May 1 13:02:00 2017 -0700 Merge tag 'for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "New drivers: - gemini-poweroff - cpcap-charger (for Motorola Droid 4) - battery-lego-ev3 (for LEGO Mindstorms EV3) New chip/feature support: - bq24190-charger: add runtime PM support - bq24190-charger: add bq24192i support - register masking for syscon-poweroff ... and misc small fixes & cleanups * tag 'for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (29 commits) power: supply: bq24190_charger: Use new extcon_register_notifier_all() power: supply: bq24190_charger: Longer delay while polling reset flag power: supply: bq24190_charger: Uniform pm_runtime_get() failure handling power: supply: bq24190_charger: Clean up extcon code power: supply: bq24190_charger: Limit over/under voltage fault logging power: supply: New driver for LEGO MINDSTORMS EV3 battery dt-bindings: power: supply: New bindings for LEGO MINDSTORMS EV3 battery power: supply: tps65217: remove debug messages for function calls power: supply: ltc2941-battery-gauge: Add OF device ID table power: supply: ltc2941-battery-gauge: Add vendor to compatibles in binding power: supply: charger-manager: simplify return statements power: supply: lp8788: prevent out of bounds array access power: supply: cpcap-charger: Add minimal CPCAP PMIC battery charger power: supply: bq24190_charger: Use extcon to determine ilimit, 5v boost power: supply: bq24190_charger: Add support for bq24192i power: supply: bq24190_charger: Use i2c-core irq-mapping code power: bq24190_charger: mark PM functions as __maybe_unused power: supply: sbs-charger: simplified bool function power: supply: ab8500: Replaced spaces with tabs in indent power: supply: bq25890: Use gpiod_get() ... commit e06422c43968916dc945018fd9220f60866470b1 Author: David S. Miller Date: Mon May 1 12:58:21 2017 -0700 bpf: Include bpf_endian.h in test_progs.c too. Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_progs.c | 1 + 1 file changed, 1 insertion(+) commit a0841609f658c77f066af9c61a2e13143564fcb4 Merge: 77f8f39 e679af6 Author: Jiri Kosina Date: Mon May 1 21:49:28 2017 +0200 Merge branches 'for-4.12/upstream' and 'for-4.12/klp-hybrid-consistency-model' into for-linus commit bc1bafbbe9b3558d7789ff151ef4f185b6ad21f3 Author: David S. Miller Date: Mon May 1 12:43:49 2017 -0700 bpf: Move endianness BPF helpers out of bpf_util.h We do not want to include things like stdio.h and friends into eBPF program builds. bpf_util.h is for host compiled programs, so eBPF C-code helpers don't really belong there. Add a new bpf_endian.h as a quick fix for this for now. Signed-off-by: David S. Miller tools/testing/selftests/bpf/bpf_endian.h | 23 +++++++++++++++++++++++ tools/testing/selftests/bpf/bpf_util.h | 19 ------------------- tools/testing/selftests/bpf/test_l4lb.c | 2 +- tools/testing/selftests/bpf/test_pkt_access.c | 2 +- 4 files changed, 25 insertions(+), 21 deletions(-) commit 8a038b83e012097a7ac6cfb9f6c5fac1da8fad6e Author: Martin Kepplinger Date: Mon May 1 10:13:47 2017 -0700 Input: ar1021_i2c - use BIT to check for a bit The MSB for the first byte of touch data transmission is always 1. Make it a little more obvious we're testing this bit by using BIT(7). Signed-off-by: Martin Kepplinger Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ar1021_i2c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 310b4816a5d8082416b4ab83e5a7b3cb92883a4d Author: Tejun Heo Date: Mon May 1 15:24:14 2017 -0400 cgroup: mark cgroup_get() with __maybe_unused a590b90d472f ("cgroup: fix spurious warnings on cgroup_is_dead() from cgroup_sk_alloc()") converted most cgroup_get() usages to cgroup_get_live() leaving cgroup_sk_alloc() the sole user of cgroup_get(). When !CONFIG_SOCK_CGROUP_DATA, this ends up triggering unused warning for cgroup_get(). Silence the warning by adding __maybe_unused to cgroup_get(). Reported-by: Stephen Rothwell Link: http://lkml.kernel.org/r/20170501145340.17e8ef86@canb.auug.org.au Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b506335e5d2b4ec687dde392a3bdbf7601778f1d Author: Shaohua Li Date: Mon May 1 12:15:07 2017 -0700 md/raid10: skip spare disk as 'first' disk Commit 6f287ca(md/raid10: reset the 'first' at the end of loop) ignores a case in reshape, the first rdev could be a spare disk, which shouldn't be accounted as the first disk since it doesn't include the offset info. Fix: 6f287ca(md/raid10: reset the 'first' at the end of loop) Cc: Guoqing Jiang Cc: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 390020ad2af9ca04844c4f3b1f299ad8746d84c8 Author: Mikulas Patocka Date: Sun Apr 30 17:34:53 2017 -0400 dm bufio: check new buffer allocation watermark every 30 seconds dm-bufio checks a watermark when it allocates a new buffer in __bufio_new(). However, it doesn't check the watermark when the user changes /sys/module/dm_bufio/parameters/max_cache_size_bytes. This may result in a problem - if the watermark is high enough so that all possible buffers are allocated and if the user lowers the value of "max_cache_size_bytes", the watermark will never be checked against the new value because no new buffer would be allocated. To fix this, change __evict_old_buffers() so that it checks the watermark. __evict_old_buffers() is called every 30 seconds, so if the user reduces "max_cache_size_bytes", dm-bufio will react to this change within 30 seconds and decrease memory consumption. Depends-on: 1b0fb5a5b2 ("dm bufio: avoid a possible ABBA deadlock") Cc: stable@vger.kernel.org Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 1b0fb5a5b2dc0dddcfa575060441a7176ba7ac37 Author: Mikulas Patocka Date: Sun Apr 30 17:33:26 2017 -0400 dm bufio: avoid a possible ABBA deadlock __get_memory_limit() tests if dm_bufio_cache_size changed and calls __cache_size_refresh() if it did. It takes dm_bufio_clients_lock while it already holds the client lock. However, lock ordering is violated because in cleanup_old_buffers() dm_bufio_clients_lock is taken before the client lock. This results in a possible deadlock and lockdep engine warning. Fix this deadlock by changing mutex_lock() to mutex_trylock(). If the lock can't be taken, it will be re-checked next time when a new buffer is allocated. Also add "unlikely" to the if condition, so that the optimizer assumes that the condition is false. Cc: stable@vger.kernel.org Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 5b8481fa42ac58484d633b558579e302aead64c1 Author: David S. Miller Date: Mon May 1 15:10:20 2017 -0400 ipv6: Need to export ipv6_push_frag_opts for tunneling now. Since that change also made the nfrag function not necessary for exports, remove it. Fixes: 89a23c8b528b ("ip6_tunnel: Fix missing tunnel encapsulation limit option") Signed-off-by: David S. Miller net/ipv6/exthdrs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 133bea04ff6fd715d8140edca9d6c7337249571b Author: Tim Wright Date: Mon May 1 17:30:08 2017 +0100 IB/mlx5: Add port_xmit_wait to counter registers read Add port_xmit_wait to the error counters read by mlx5_ib_process_mad to ensure sysfs port counter provides correct value for PortXmitWait. Otherwise the sysfs port_xmit_wait file always contains zero. The previous MAD_IFC implementation populated this counter, but it was removed during the migration to PPCNT for error counters (32-bit only). Signed-off-by: Tim Wright Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mad.c | 2 ++ include/linux/mlx5/mlx5_ifc.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 062d0f22a30c39840ea49b72cfcfc1aa4cc538fa Author: Michael Mera Date: Mon May 1 15:41:16 2017 +0900 IB/ocrdma: fix out of bounds access to local buffer In write to debugfs file 'resource_stats' the local buffer 'tmp_str' is written at index 'count-1' where 'count' is the size of the write, so potentially 0. This patch filters odd values for the write size/position to avoid this type of problem. Signed-off-by: Michael Mera Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b03ee4ca0cec348c84dccf08aaec2454c4d236c2 Author: Håkon Bugge Date: Fri Apr 28 13:06:54 2017 +0200 IB/mlx4: Fix incorrect order of formal and actual parameters The last two actual parameters when calling id_map_find_by_sl_id() from id_map_get() are swapped. However, the same formal parameters to id_map_get() have them swapped as well, inverting the effect of the first error. This commit improves readability, but makes no functional change to the code. Signed-off-by: Håkon Bugge Reviewed-by: Wengang Wang Reviewed-by: Knut Omang Acked-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 898782883501798284a10d1467b11dd2a48270cf Author: Håkon Bugge Date: Fri Apr 28 13:06:53 2017 +0200 IB/mlx4: Change flush logic so it adheres to the variable name Change and simplify the code to match the variable name. This commit improves readability but makes no functional change to the code. Signed-off-by: Håkon Bugge Suggested-by: Wengang Wang Reviewed-by: Wengang Wang Reviewed-by: Knut Omang Acked-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/cm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit aaf1be31b2ef1e51f3802373a7c6ca07605e51d1 Merge: 152afb9 931d182 Author: David S. Miller Date: Mon May 1 15:03:14 2017 -0400 Merge branch 'dsa-mv88e6xxx-802.1s-and-88E6390-VTU' Vivien Didelot says: ==================== net: dsa: mv88e6xxx: 802.1s and 88E6390 VTU This patch series adds support for the VLAN Table Unit (a.k.a. the VTU) to the 88E6390 family of Marvell Ethernet switch chips. The plumbing for the per VLAN Spanning Tree support is added as a side effect of the necessary refactoring. The patchset is split up so that no duplication of code is introduced. With this patchset applied, the mv88e6xxx driver has 2 new function pointers for the VTU GetNext and VTU Load/Purge operations (with 3 implementations), both handling programmation of 802.1q and 802.1s. On a ZII Rev C board (featuring 2 88E6390X chips) with all ports bridged together, we obtain the following hardware VLAN configuration: # cat /sys/class/net/br0/bridge/vlan_filtering 1 # cat /sys/class/net/br0/bridge/default_pvid 42 # bridge vlan add dev lan3 vid 666 # bridge vlan show port vlan ids lan1 42 PVID Egress Untagged lan1 42 PVID Egress Untagged lan2 42 PVID Egress Untagged lan2 42 PVID Egress Untagged lan3 42 PVID Egress Untagged 666 lan3 42 PVID Egress Untagged 666 lan4 42 PVID Egress Untagged lan4 42 PVID Egress Untagged lan5 42 PVID Egress Untagged lan5 42 PVID Egress Untagged lan6 42 PVID Egress Untagged lan6 42 PVID Egress Untagged lan7 42 PVID Egress Untagged lan7 42 PVID Egress Untagged lan8 42 PVID Egress Untagged lan8 42 PVID Egress Untagged br0 42 PVID Egress Untagged Below are the technical details for the different implementations. All switch families have up to 3 dedicated VTU Data registers used to program 802.1q and 802.1s, both using 2-bit values. On 88E6185 and 88E6352 families, port membership and state are adjacent, while the 88E6390 family share the same bits: Bits 88E6185/88E6352 88E6390 ----- ----------------- -------------------------- 0-1 Port 0 membership Port 0 membership or state 2-3 Port 0 state Port 1 membership or state 4-5 Port 1 membership Port 2 membership or state 6-7 Port 1 state Port 3 membership or state 8-9 Port 2 membership Port 4 membership or state 10-11 Port 2 state Port 5 membership or state ... ... ... The 88E6185 family programs all ports membership and state in a single VTU GetNext or Load/Purge operation. The 88E6352 family introduced an indirect Spanning Tree Unit table (a.k.a. STU) which requires additional STU GetNext and Load/Purge operations to read and write the ports state bits. The 88E6390 family also has an STU and requires data bits to be accessed before and after every single VTU or STU operation. Finally, the 88E6390 family introduced a 13th bit for the VLAN ID, which must be taken care of regardless the VTU operating mode. This means that iterating over the VTU now starts or ends with value 8191, not 4095. Patch 1 adds a max_vid field to the chip info structure. Patch 2 adds 802.1q and 802.1s data to the generic VTU entry structure. Patches 3 to 10 move helpers to a dedicated file (later made static). Patches 11 and 12 abstract handling of the STU behind VTU operations. Patches 13 and 14 add the new function pointers for VTU operations. Patches 15 and 18 polish the VTU code and add VTU support for 88E6390. Changes in v2: - add Reviewed-by tags - fix comments in 8/18 ==================== Signed-off-by: David S. Miller commit 931d18223998c5360b960d1ce247579f6152ad8f Author: Vivien Didelot Date: Mon May 1 14:05:27 2017 -0400 net: dsa: mv88e6xxx: add VTU support for 88E6390 The 6390 family of chips use only 2 of the 3 VTU Data registers to pack the MemberTag and PortState VLAN data. This means that they must be written or read before or after each VTU/STU operations. Implement this variant to add support for VTU with such chips. These chips have a 13th bit for the VID thus set their max_vid to 8191. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 18 +++++ drivers/net/dsa/mv88e6xxx/global1.h | 4 ++ drivers/net/dsa/mv88e6xxx/global1_vtu.c | 124 ++++++++++++++++++++++++++++++++ 3 files changed, 146 insertions(+) commit 1ac758648b574d3d01a648fc7018fc8b0bb7454a Author: Vivien Didelot Date: Mon May 1 14:05:26 2017 -0400 net: dsa: mv88e6xxx: support the VTU Page bit Newer chips such as the 88E6390 have a VTU Page bit in the VTU VID register to specify a 13th bit for the VID. This can be used to support 8K VLANs. When dumping the whole VTU, all VID bits must be set to one, including this VTU Page bit. Add support for VID greater than 4095. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global1_vtu.c | 7 +++++++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + 2 files changed, 8 insertions(+) commit 567aa59a8b055bb5853bc7e5d5f8ac191216c9c7 Author: Vivien Didelot Date: Mon May 1 14:05:25 2017 -0400 net: dsa: mv88e6xxx: simplify VTU entry getter Make the code which fetches or initializes a new VTU entry more concise. This allows us the get rid of the old underscore prefix naming. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 62 ++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 38 deletions(-) commit bf7d71c0451776143cdbd9a42a5bcbd6478da3c8 Author: Vivien Didelot Date: Mon May 1 14:05:24 2017 -0400 net: dsa: mv88e6xxx: make VTU helpers static Now that we have chip operations for VTU accesses, mark all helpers from global1_vtu.c as static. Only the various implementations of the GetNext, LoadPurge and Flush operations need to be exposed. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global1.h | 24 ----------------- drivers/net/dsa/mv88e6xxx/global1_vtu.c | 48 ++++++++++++++++----------------- 2 files changed, 24 insertions(+), 48 deletions(-) commit 0ad5daf6ba80af4a8d72b4284079357c4e3b9e4a Author: Vivien Didelot Date: Mon May 1 14:05:23 2017 -0400 net: dsa: mv88e6xxx: add VTU Load/Purge operation Add a new vtu_loadpurge operation to the chip info structure to differ the various implementations of the VTU accesses. Now that the STU handling is abstracted behind VTU operations, kill the obsolete MV88E6XXX_FLAG_STU flag. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 80 +++++++++++++-------------------- drivers/net/dsa/mv88e6xxx/global1.h | 4 ++ drivers/net/dsa/mv88e6xxx/global1_vtu.c | 66 +++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 10 +---- 4 files changed, 103 insertions(+), 57 deletions(-) commit f1394b78a602bae124a9b8473465ba48f4a5d5b2 Author: Vivien Didelot Date: Mon May 1 14:05:22 2017 -0400 net: dsa: mv88e6xxx: add VTU GetNext operation Add a new vtu_getnext operation to the chip info structure to differ the various implementations of the VTU accesses. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 82 ++++++++++++++------------------- drivers/net/dsa/mv88e6xxx/global1.h | 4 ++ drivers/net/dsa/mv88e6xxx/global1_vtu.c | 57 +++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 4 ++ 4 files changed, 99 insertions(+), 48 deletions(-) commit 021e64ff7676ad5183c1845d4b316df20175702a Author: Vivien Didelot Date: Mon May 1 14:05:21 2017 -0400 net: dsa: mv88e6xxx: load STU entry with VTU entry Now that the code writes both VTU and STU data when loading a VTU entry, load the corresponding STU entry at the same time. This allows us to get rid of the STU management in the _mv88e6xxx_vtu_new helper and thus remove the separate implementations of STU Load/Purge and STU GetNext, as well as the unused family checks. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 108 ++------------------------------------- 1 file changed, 4 insertions(+), 104 deletions(-) commit ef6fcea37f014ec54a0a9f7eaecc78cdb6ffc71e Author: Vivien Didelot Date: Mon May 1 14:05:20 2017 -0400 net: dsa: mv88e6xxx: get STU entry on VTU GetNext Now that the code reads both VTU and STU data on VTU GetNext operation, fetch the STU entry data of a VTU entry at the same time. The STU data bits are masked with the VTU data bits and they are now all read at the same time a VTU GetNext operation is issued. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 +- drivers/net/dsa/mv88e6xxx/global1.h | 2 ++ drivers/net/dsa/mv88e6xxx/global1_vtu.c | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) commit 66a8e1f93319b8e3f5b6e81c06a2534c1491157c Author: Vivien Didelot Date: Mon May 1 14:05:19 2017 -0400 net: dsa: mv88e6xxx: move STU GetNext operation Extract the generic portion of code to issue an STU GetNext operation, which will be used in other implementations. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 14 +------------- drivers/net/dsa/mv88e6xxx/global1.h | 2 ++ drivers/net/dsa/mv88e6xxx/global1_vtu.c | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 13 deletions(-) commit c499a64f349d063d8cdb40c0b96e84c35bbc414c Author: Vivien Didelot Date: Mon May 1 14:05:18 2017 -0400 net: dsa: mv88e6xxx: move VTU Data accessors The code to access the VTU Data registers currently only supports the 88E6185 family and alike: 2-bit membership adjacent to 2-bit port state. Even though the 88E6352 family introduced an indirect table to program the VLAN Spanning Tree states, the usage of the VTU Data registers remains the same regardless the VTU or STU operation. Now that the mv88e6xxx_vtu_entry structure contains both port membership and states data, factorize the code to access them in global1_vtu.c. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 88 +++------------------------------ drivers/net/dsa/mv88e6xxx/global1.h | 4 ++ drivers/net/dsa/mv88e6xxx/global1_vtu.c | 61 +++++++++++++++++++++++ 3 files changed, 72 insertions(+), 81 deletions(-) commit f169e5ee5f29f81c1c8d647fa6fb5387ee793131 Author: Vivien Didelot Date: Mon May 1 14:05:17 2017 -0400 net: dsa: mv88e6xxx: move generic VTU GetNext Even though every switch model has a different way to access the VTU Data bits, the base implementation of the VTU GetNext operation remains the same: wait, write the first VID to iterate from, start the operation, and read the next VID. Move this generic implementation into global1_vtu.c and abstract the handling of the start VID (similarly to the ATU GetNext implementation), before introducing a new chip operation for specific chips. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 31 ++----------------------------- drivers/net/dsa/mv88e6xxx/global1.h | 2 ++ drivers/net/dsa/mv88e6xxx/global1_vtu.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 29 deletions(-) commit 3afb4bde6fe8f2d43b2153cc2672d07477729cca Author: Vivien Didelot Date: Mon May 1 14:05:16 2017 -0400 net: dsa: mv88e6xxx: move VTU VID accessors Add helpers to access the VTU VID register in the global1_vtu.c file. At the same time, move mv88e6xxx_g1_vtu_vid_write at the beginning of _mv88e6xxx_vtu_loadpurge, which adds no functional changes but makes future patches simpler. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 57 +++++++++++++-------------------- drivers/net/dsa/mv88e6xxx/global1.h | 4 +++ drivers/net/dsa/mv88e6xxx/global1_vtu.c | 29 +++++++++++++++++ 3 files changed, 56 insertions(+), 34 deletions(-) commit d2ca1ea18db6a90475b983e65e8435632fe3d57e Author: Vivien Didelot Date: Mon May 1 14:05:15 2017 -0400 net: dsa: mv88e6xxx: move VTU SID accessors Add helpers to access the VTU SID register in the global1_vtu.c file. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 21 ++++++++------------- drivers/net/dsa/mv88e6xxx/global1.h | 4 ++++ drivers/net/dsa/mv88e6xxx/global1_vtu.c | 25 +++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 13 deletions(-) commit 8ee51f6b4f0819fd3d6a4143222be796779cf501 Author: Vivien Didelot Date: Mon May 1 14:05:14 2017 -0400 net: dsa: mv88e6xxx: move VTU FID accessors Add helpers to access the VTU FID register in the global1_vtu.c file. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 7 ++----- drivers/net/dsa/mv88e6xxx/global1.h | 4 ++++ drivers/net/dsa/mv88e6xxx/global1_vtu.c | 25 +++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 5 deletions(-) commit b486d7c95cc8336aa91813a156f9385439bde2fc Author: Vivien Didelot Date: Mon May 1 14:05:13 2017 -0400 net: dsa: mv88e6xxx: move VTU flush Move the VTU flush operation to global1_vtu.c and call it from a mv88e6xxx_vtu_setup helper, similarly to the ATU and PVT setup. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 28 ++++++++++++---------------- drivers/net/dsa/mv88e6xxx/global1.h | 1 + drivers/net/dsa/mv88e6xxx/global1_vtu.c | 13 +++++++++++++ 3 files changed, 26 insertions(+), 16 deletions(-) commit 332aa5ccc82005de9441c1b65ca546488c7f8730 Author: Vivien Didelot Date: Mon May 1 14:05:12 2017 -0400 net: dsa: mv88e6xxx: move VTU Operation accessors Move the helper functions to access the Global 1 VTU Operation register to a new global1_vtu.c file, and get rid of the old underscore prefix naming convention. This file will be extended will all VTU/STU related code. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/Makefile | 1 + drivers/net/dsa/mv88e6xxx/chip.c | 39 +++++++++------------------------ drivers/net/dsa/mv88e6xxx/global1.h | 3 +++ drivers/net/dsa/mv88e6xxx/global1_vtu.c | 33 ++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 29 deletions(-) commit bd00e053ae29d3215a9085b5c0add7298bbc417c Author: Vivien Didelot Date: Mon May 1 14:05:11 2017 -0400 net: dsa: mv88e6xxx: split VTU entry data member VLAN aware Marvell chips can program 802.1Q VLAN membership as well as 802.1s per VLAN Spanning Tree state using the same 3 VTU Data registers. Some chips such as 88E6185 use different Data registers offsets for ports state and membership, and program them in a single operation. Other chips such as 88E6352 use the same register layout but program them in distinct operations (an indirect table is used for 802.1s.) Newer chips such as 88E6390 use the same offsets for both state and membership in distinct operations, thus require multiple data accesses. To correctly abstract this, split the "data" structure member of mv88e6xxx_vtu_entry in two "state" and "member" members, before adding VTU support for newer chips. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 21 +++++++++++---------- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 3 ++- 2 files changed, 13 insertions(+), 11 deletions(-) commit 3cf3c8469f70d18f8bbcdf8361e62812ebc571cd Author: Vivien Didelot Date: Mon May 1 14:05:10 2017 -0400 net: dsa: mv88e6xxx: add max VID to info Some chips don't have a VLAN Table Unit, most of them do have a 4K table, some others as the 88E6390 family has a 13th bit for the VID. Add a new max_vid member to the info structure, used to check the presence of a VTU as well as the value used to iterate from in VTU GetNext operations. This makes the MV88E6XXX_FLAG_VTU obsolete, thus remove it. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 38 ++++++++++++++++++++++++++--------- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 13 ++---------- 2 files changed, 31 insertions(+), 20 deletions(-) commit 152afb9b45a8af4a93699a15925c392a28182a26 Author: Ilan Tayari Date: Sun Apr 30 16:51:19 2017 +0300 xfrm: Indicate xfrm_state offload errors Current code silently ignores driver errors when configuring IPSec offload xfrm_state, and falls back to host-based crypto. Fail the xfrm_state creation if the driver has an error, because the NIC offloading was explicitly requested by the user program. This will communicate back to the user that there was an error. Fixes: d77e38e612a0 ("xfrm: Add an IPsec hardware offloading API") Signed-off-by: Ilan Tayari Signed-off-by: David S. Miller net/xfrm/xfrm_user.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 67d349ed603d5ce4a6f1722b1736e2bcef0e8690 Author: Ilan Tayari Date: Sun Apr 30 16:34:38 2017 +0300 net/esp4: Fix invalid esph pointer crash Both esp_output and esp_xmit take a pointer to the ESP header and place it in esp_info struct prior to calling esp_output_head. Inside esp_output_head, the call to esp_output_udp_encap makes sure to update the pointer if it gets invalid. However, if esp_output_head itself calls skb_cow_data, the pointer is not updated and stays invalid, causing a crash after esp_output_head returns. Update the pointer if it becomes invalid in esp_output_head Fixes: fca11ebde3f0 ("esp4: Reorganize esp_output") Signed-off-by: Ilan Tayari Signed-off-by: David S. Miller net/ipv4/esp4.c | 1 + 1 file changed, 1 insertion(+) commit 0a49f2c31c3efbeb0de3e4b5598764887f629be2 Author: Sagi Grimberg Date: Sun Apr 23 14:31:42 2017 +0300 mlx5: Fix mlx5_ib_map_mr_sg mr length In case we got an initial sg_offset, we need to account for it in the mr length. Cc: stable@vger.kernel.org Fixes: ff2ba9936591 ("IB/core: Add passing an offset into the SG to ib_map_mr_sg") Signed-off-by: Sagi Grimberg Tested-by: Israel Rukshin Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89a23c8b528bd2c89f3981573d6cd7d23840c8a6 Author: Craig Gallek Date: Wed Apr 26 14:37:45 2017 -0400 ip6_tunnel: Fix missing tunnel encapsulation limit option The IPv6 tunneling code tries to insert IPV6_TLV_TNL_ENCAP_LIMIT and IPV6_TLV_PADN options when an encapsulation limit is defined (the default is a limit of 4). An MTU adjustment is done to account for these options as well. However, the options are never present in the generated packets. The issue appears to be a subtlety between IPV6_DSTOPTS and IPV6_RTHDRDSTOPTS defined in RFC 3542. When the IPIP tunnel driver was written, the encap limit options were included as IPV6_RTHDRDSTOPTS in dst0opt of struct ipv6_txoptions. Later, ipv6_push_nfrags_opts was (correctly) updated to require IPV6_RTHDR options when IPV6_RTHDRDSTOPTS are to be used. This caused the options to no longer be included in v6 encapsulated packets. The fix is to use IPV6_DSTOPTS (in dst1opt of struct ipv6_txoptions) instead. IPV6_DSTOPTS do not have the additional IPV6_RTHDR requirement. Fixes: 1df64a8569c7: ("[IPV6]: Add ip6ip6 tunnel driver.") Fixes: 333fad5364d6: ("[IPV6]: Support several new sockopt / ancillary data in Advanced API (RFC3542)") Signed-off-by: Craig Gallek Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cdbfbba98c151886a8e74116fbd8ba14e8200cb4 Merge: 89d1cf8 09d9d82 Author: Linus Torvalds Date: Mon May 1 11:50:57 2017 -0700 Merge tag 'hwmon-for-linus-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: - removed twl4030-madc driver - added ASPEED PWM/fan driver - various minor improvements and fixes in several drivers * tag 'hwmon-for-linus-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (36 commits) hwmon: (twl4030-madc) drop driver hwmon: (tmp103) Use SIMPLE_DEV_PM_OPS helper macro hwmon: (adt7475) set start bit in probe hwmon: (ina209) Handled signed registers hwmon: (lm87) Add OF device ID table hwmon: (lm87) Remove unused I2C devices driver_data drivers: hwmon: Support for ASPEED PWM/Fan tach Documentation: dt-bindings: Document bindings for ASPEED AST2400/AST2500 PWM and Fan tach controller device driver hwmon: (lm87) Allow channel data to be set from dts file Documentation: dtb: lm87: Add hwmon binding documentation hwmon: (ads7828) Accept optional parameters from device tree hwmon: (dell-smm) Add Dell XPS 15 9560 into DMI list hwmon: Constify str parameter of hwmon_ops->read_string dt: Add vendor prefix for Sensirion hwmon: (tmp421) Add OF device ID table hwmon: (tmp103) Add OF device ID table hwmon: (tmp102) Add OF device ID table hwmon: (stts751) Add OF device ID table hwmon: (ucd9200) Add OF device ID table hwmon: (ucd9000) Add OF device ID table ... commit a6a5993243550b09f620941dea741b7421fdf79c Author: Ding Tianhong Date: Sat Apr 29 10:38:48 2017 +0800 iov_iter: don't revert iov buffer if csum error The patch 327868212381 (make skb_copy_datagram_msg() et.al. preserve ->msg_iter on error) will revert the iov buffer if copy to iter failed, but it didn't copy any datagram if the skb_checksum_complete error, so no need to revert any data at this place. v2: Sabrina notice that return -EFAULT when checksum error is not correct here, it would confuse the caller about the return value, so fix it. Fixes: 327868212381 ("make skb_copy_datagram_msg() et.al. preserve->msg_iter on error") Cc: stable@vger.kernel.org # v4.11 Signed-off-by: Ding Tianhong Acked-by: Al Viro Signed-off-by: Wei Yongjun Signed-off-by: Al Viro net/core/datagram.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 8b03d1ed2c43a2ba5ef3381322ee4515b97381bf Merge: 73ba2d5 271393b Author: Dave Airlie Date: Tue May 2 04:46:01 2017 +1000 Merge branch 'linux-4.12' of git://github.com/skeggsb/linux into drm-next Some nouveau regression fixes. * 'linux-4.12' of git://github.com/skeggsb/linux: drm/nouveau/fb/gf100-: Fix 32 bit wraparound in new ram detection drm/nouveau/secboot/gm20b: fix the error return code in gm20b_secboot_tegra_read_wpr() drm/nouveau/kms: Increase max retries in scanout position queries. drm/nouveau/bios/bitP: check that table is long enough for optional pointers drm/nouveau/fifo/nv40: no ctxsw for pre-nv44 mpeg engine commit d52418502e288b5c7e9e2e6cf1de5f1d3d79d2e1 Author: Johannes Thumshirn Date: Thu Apr 6 14:49:44 2017 +0200 IB/rxe: Don't clamp residual length to mtu When reading a RDMA WRITE FIRST packet we copy the DMA length from the RDMA header into the qp->resp.resid variable for later use. Later in check_rkey() we clamp it to the MTU if the packet is an RDMA WRITE packet and has a residual length bigger than the MTU. Later in write_data_in() we subtract the payload of the packet from the residual length. If the packet happens to have a payload of exactly the MTU size we end up with a residual length of 0 despite the packet not being the last in the conversation. When the next packet in the conversation arrives, we don't have any residual length left and thus set the QP into an error state. This broke NVMe over Fabrics functionality over rdma_rxe.ko The patch was verified using the following test. # echo eth0 > /sys/module/rdma_rxe/parameters/add # nvme connect -t rdma -a 192.168.155.101 -s 1023 -n nvmf-test # mkfs.xfs -fK /dev/nvme0n1 meta-data=/dev/nvme0n1 isize=256 agcount=4, agsize=65536 blks = sectsz=4096 attr=2, projid32bit=1 = crc=0 finobt=0, sparse=0 data = bsize=4096 blocks=262144, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 ftype=1 log =internal log bsize=4096 blocks=2560, version=2 = sectsz=4096 sunit=1 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 # mount /dev/nvme0n1 /tmp/ [ 148.923263] XFS (nvme0n1): Mounting V4 Filesystem [ 148.961196] XFS (nvme0n1): Ending clean mount # dd if=/dev/urandom of=test.bin bs=1M count=128 128+0 records in 128+0 records out 134217728 bytes (134 MB, 128 MiB) copied, 0.437991 s, 306 MB/s # sha256sum test.bin cde42941f045efa8c4f0f157ab6f29741753cdd8d1cff93a6b03649d83c4129a test.bin # cp test.bin /tmp/ sha256sum /tmp/test.bin cde42941f045efa8c4f0f157ab6f29741753cdd8d1cff93a6b03649d83c4129a /tmp/test.bin Signed-off-by: Johannes Thumshirn Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: Max Gurtovoy Acked-by: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_resp.c | 2 -- 1 file changed, 2 deletions(-) commit 4c33bd1926ccbfad362d22208c23cc045c5c82af Author: Dasaratharaman Chandramouli Date: Thu Apr 27 19:06:02 2017 -0400 IB/SA: Add support to query OPA path records When the bit 26 of capmask2 field in OPA classport info query is set, SA will query for OPA path records instead of querying for IB path records. Note that OPA path records can only be queried by kernel ULPs. Userspace clients continue to query IB path records. Reviewed-by: Don Hiatt Reviewed-by: Ira Weiny Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 6 +- drivers/infiniband/core/sa_query.c | 274 ++++++++++++++++++++++++++++-- drivers/infiniband/ulp/ipoib/ipoib_main.c | 5 +- drivers/infiniband/ulp/srp/ib_srp.c | 6 +- include/rdma/ib_mad.h | 13 ++ 5 files changed, 285 insertions(+), 19 deletions(-) commit 57520751445b837c20a8e658e3dae3a7e7ddf45c Author: Dasaratharaman Chandramouli Date: Thu Apr 27 19:06:01 2017 -0400 IB/SA: Add OPA path record type Add opa_sa_path_rec to sa_path_rec data structure. The 'type' field in sa_path_rec identifies the type of the path record. Reviewed-by: Don Hiatt Reviewed-by: Ira Weiny Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 34 ++++++--- drivers/infiniband/core/sa_query.c | 4 +- drivers/infiniband/core/ucma.c | 22 +++++- drivers/infiniband/core/uverbs_marshall.c | 40 ++++++++-- drivers/infiniband/ulp/ipoib/ipoib_fs.c | 2 +- drivers/infiniband/ulp/ipoib/ipoib_main.c | 14 ++-- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- include/rdma/ib_sa.h | 121 +++++++++++++++++++++++++++--- 8 files changed, 197 insertions(+), 42 deletions(-) commit 9fdca4da4d8c83caefb9f2fd897d6a7bc355dfe6 Author: Dasaratharaman Chandramouli Date: Thu Apr 27 19:06:00 2017 -0400 IB/SA: Split struct sa_path_rec based on IB and ROCE specific fields sa_path_rec now contains a union of sa_path_rec_ib and sa_path_rec_roce based on the type of the path record. Note that fields applicable to path record type ROCE v1 and ROCE v2 fall under sa_path_rec_roce. Accessor functions are added to these fields so the caller doesn't have to know the type. Reviewed-by: Don Hiatt Reviewed-by: Ira Weiny Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 62 +++++++------ drivers/infiniband/core/cma.c | 22 +++-- drivers/infiniband/core/sa_query.c | 39 +++++--- drivers/infiniband/core/uverbs_marshall.c | 20 ++-- drivers/infiniband/ulp/ipoib/ipoib_fs.c | 6 +- drivers/infiniband/ulp/ipoib/ipoib_main.c | 11 ++- drivers/infiniband/ulp/srp/ib_srp.c | 7 +- include/rdma/ib_sa.h | 147 +++++++++++++++++++++++++++--- 8 files changed, 230 insertions(+), 84 deletions(-) commit dfa834e1d97e24c7d6b7c5b102728d69d6361501 Author: Dasaratharaman Chandramouli Date: Thu Apr 27 19:05:59 2017 -0400 IB/SA: Introduce path record specific types struct sa_path_rec has a gid_type field. This patch introduces a more generic path record specific type 'rec_type' which is either IB, ROCE v1 or ROCE v2. The patch also provides conversion functions to get a gid type from a path record type and vice versa Reviewed-by: Don Hiatt Reviewed-by: Ira Weiny Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 15 +++++++++++--- drivers/infiniband/core/cma.c | 16 +++++++++------ drivers/infiniband/core/sa_query.c | 14 ++++++++----- drivers/infiniband/core/uverbs_marshall.c | 2 +- include/rdma/ib_sa.h | 33 ++++++++++++++++++++++++++++++- 5 files changed, 64 insertions(+), 16 deletions(-) commit c2f8fc4ec4400901e5561d4815deca19f395deb6 Author: Dasaratharaman Chandramouli Date: Thu Apr 27 19:05:58 2017 -0400 IB/SA: Rename ib_sa_path_rec to sa_path_rec Rename ib_sa_path_rec to a more generic sa_path_rec. This is part of extending ib_sa to also support OPA path records in addition to the IB defined path records. Reviewed-by: Don Hiatt Reviewed-by: Ira Weiny Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 20 ++++++++++---------- drivers/infiniband/core/cma.c | 8 ++++---- drivers/infiniband/core/sa_query.c | 20 ++++++++++---------- drivers/infiniband/core/ucm.c | 6 +++--- drivers/infiniband/core/ucma.c | 2 +- drivers/infiniband/core/uverbs_marshall.c | 4 ++-- drivers/infiniband/ulp/ipoib/ipoib.h | 2 +- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 6 +++--- drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- drivers/infiniband/ulp/srp/ib_srp.h | 2 +- include/rdma/ib_cm.h | 14 +++++++------- include/rdma/ib_marshall.h | 4 ++-- include/rdma/ib_sa.h | 14 +++++++------- include/rdma/rdma_cm.h | 2 +- include/rdma/rdma_cm_ib.h | 2 +- 16 files changed, 55 insertions(+), 55 deletions(-) commit 82ffc226483cad8780c25c754da5d0013c88ff8c Author: Dasaratharaman Chandramouli Date: Thu Apr 27 19:05:57 2017 -0400 IB/CM: Add braces when using sizeof This patch adds braces around parameters to sizeof as called out by checkpatch Reviewed-by: Don Hiatt Reviewed-by: Ira Weiny Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 89d1cf89c88f4684a51bd1f3e3aff0ae32572292 Merge: 08c521a f8d5549 Author: Linus Torvalds Date: Mon May 1 11:36:00 2017 -0700 Merge tag 'edac_for_4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC updates from Borislav Petkov: - an EDAC driver for Cavium ThunderX RAS IP (Sergey Temerkhanov) - removal of DRAM error reporting through PCI SERR NMI (Borislav Petkov) - misc small fixes (Jan Glauber, Thor Thayer) * tag 'edac_for_4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: EDAC, ghes: Do not enable it by default EDAC: Rename report status accessors EDAC: Delete edac_stub.c EDAC: Update Kconfig help text EDAC: Remove EDAC_MM_EDAC EDAC: Issue tracepoint only when it is defined ACPI/extlog: Add EDAC dependency EDAC: Move edac_op_state to edac_mc.c EDAC: Remove edac_err_assert EDAC: Get rid of edac_handlers x86/nmi, EDAC: Get rid of DRAM error reporting thru PCI SERR NMI EDAC, highbank: Align Makefile directives EDAC, thunderx: Remove unused code EDAC, thunderx: Change LMC index calculation EDAC, altera: Fix peripheral warnings for Cyclone5 EDAC, thunderx: Fix L2C MCI interrupt disable EDAC, thunderx: Add Cavium ThunderX EDAC driver commit f9ed236c2aed30eef4b2c8025973631714655301 Merge: d5066c4 71653eb Author: David S. Miller Date: Mon May 1 14:34:46 2017 -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 2017-04-30 Here's one last batch of Bluetooth patches in the bluetooth-next tree targeting the 4.12 kernel. - Remove custom ECDH implementation and use new KPP API instead - Add protocol checks to hci_ldisc - Add module license to HCI UART Nokia H4+ driver - Minor fix for 32bit user space - 64 bit kernel combination Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 64b4646eaf3dab4cc7b3040d10d565a83654446f Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:30 2017 -0400 IB/core: Define 'opa' rdma_ah_attr type OPA ah_attr types allows core components to specify attributes that may be specific to opa devices. For instance, opa type ah_attr provides 32 bit lids enabling larger OPA fabric sizes. Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Sean Hefty Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit 44c58487d51a0dc43d96f1dc864f0461ec6a346a Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:29 2017 -0400 IB/core: Define 'ib' and 'roce' rdma_ah_attr types rdma_ah_attr can now be either ib or roce allowing core components to use one type or the other and also to define attributes unique to a specific type. struct ib_ah is also initialized with the type when its first created. This ensures that calls such as modify_ah dont modify the type of the address handle attribute. Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Sean Hefty Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 4 +- drivers/infiniband/core/multicast.c | 1 + drivers/infiniband/core/sa_query.c | 5 ++- drivers/infiniband/core/user_mad.c | 2 + drivers/infiniband/core/uverbs_cmd.c | 5 +++ drivers/infiniband/core/verbs.c | 13 ++++-- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 13 +++--- drivers/infiniband/hw/hfi1/verbs.c | 4 ++ drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 +- drivers/infiniband/hw/mlx4/ah.c | 25 +++++------ drivers/infiniband/hw/mlx4/mad.c | 2 + drivers/infiniband/hw/mlx4/qp.c | 16 +++---- drivers/infiniband/hw/mlx5/ah.c | 22 +++++----- drivers/infiniband/hw/mlx5/qp.c | 7 +-- drivers/infiniband/hw/mthca/mthca_av.c | 1 + drivers/infiniband/hw/mthca/mthca_mad.c | 1 + drivers/infiniband/hw/mthca/mthca_qp.c | 1 + drivers/infiniband/hw/ocrdma/ocrdma.h | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 6 ++- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 1 + drivers/infiniband/hw/qedr/qedr_cm.c | 2 +- drivers/infiniband/hw/qedr/verbs.c | 1 + drivers/infiniband/hw/qib/qib_verbs.c | 2 + drivers/infiniband/hw/vmw_pvrdma/pvrdma_misc.c | 5 ++- drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 9 ++-- drivers/infiniband/sw/rxe/rxe_av.c | 1 + drivers/infiniband/sw/rxe/rxe_verbs.c | 1 + drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 1 + drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c | 1 + include/rdma/ib_verbs.h | 58 ++++++++++++++++++++----- net/smc/smc_ib.c | 3 +- 31 files changed, 141 insertions(+), 76 deletions(-) commit d8966fcd4c25708c3a76ea7619644218373df639 Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:28 2017 -0400 IB/core: Use rdma_ah_attr accessor functions Modify core and driver components to use accessor functions introduced to access individual fields of rdma_ah_attr Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Sean Hefty Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 10 +- drivers/infiniband/core/cma.c | 3 +- drivers/infiniband/core/mad.c | 21 ++-- drivers/infiniband/core/mad_rmpp.c | 2 +- drivers/infiniband/core/multicast.c | 20 ++-- drivers/infiniband/core/sa_query.c | 40 ++++--- drivers/infiniband/core/user_mad.c | 32 +++--- drivers/infiniband/core/uverbs_cmd.c | 144 +++++++++++++----------- drivers/infiniband/core/uverbs_marshall.c | 25 ++-- drivers/infiniband/core/verbs.c | 45 ++++---- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 77 +++++++------ drivers/infiniband/hw/hfi1/driver.c | 4 +- drivers/infiniband/hw/hfi1/mad.c | 4 +- drivers/infiniband/hw/hfi1/qp.c | 12 +- drivers/infiniband/hw/hfi1/rc.c | 24 ++-- drivers/infiniband/hw/hfi1/ruc.c | 82 ++++++++------ drivers/infiniband/hw/hfi1/uc.c | 6 +- drivers/infiniband/hw/hfi1/ud.c | 51 +++++---- drivers/infiniband/hw/hfi1/verbs.c | 20 ++-- drivers/infiniband/hw/hfi1/verbs.h | 2 +- drivers/infiniband/hw/hns/hns_roce_ah.c | 57 ++++++---- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 115 ++++++++++--------- drivers/infiniband/hw/mlx4/ah.c | 115 +++++++++++-------- drivers/infiniband/hw/mlx4/mad.c | 43 ++++--- drivers/infiniband/hw/mlx4/mcg.c | 2 +- drivers/infiniband/hw/mlx4/qp.c | 92 +++++++-------- drivers/infiniband/hw/mlx5/ah.c | 54 +++++---- drivers/infiniband/hw/mlx5/qp.c | 86 +++++++------- drivers/infiniband/hw/mthca/mthca_av.c | 64 ++++++----- drivers/infiniband/hw/mthca/mthca_mad.c | 6 +- drivers/infiniband/hw/mthca/mthca_qp.c | 84 ++++++++------ drivers/infiniband/hw/ocrdma/ocrdma.h | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 54 +++++---- drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 21 ++-- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 38 +++---- drivers/infiniband/hw/qedr/qedr.h | 11 +- drivers/infiniband/hw/qedr/qedr_cm.c | 15 +-- drivers/infiniband/hw/qedr/qedr_cm.h | 2 +- drivers/infiniband/hw/qedr/verbs.c | 44 ++++---- drivers/infiniband/hw/qib/qib_mad.c | 5 +- drivers/infiniband/hw/qib/qib_qp.c | 2 +- drivers/infiniband/hw/qib/qib_rc.c | 21 ++-- drivers/infiniband/hw/qib/qib_ruc.c | 72 +++++++----- drivers/infiniband/hw/qib/qib_uc.c | 6 +- drivers/infiniband/hw/qib/qib_ud.c | 53 +++++---- drivers/infiniband/hw/qib/qib_verbs.c | 12 +- drivers/infiniband/hw/qib/qib_verbs.h | 2 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_misc.c | 32 +++--- drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 27 +++-- drivers/infiniband/sw/rdmavt/ah.c | 29 ++--- drivers/infiniband/sw/rdmavt/qp.c | 12 +- drivers/infiniband/sw/rxe/rxe_av.c | 24 ++-- drivers/infiniband/sw/rxe/rxe_qp.c | 12 +- drivers/infiniband/sw/rxe/rxe_verbs.c | 6 +- drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 59 +++++----- drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c | 10 +- net/smc/smc_ib.c | 8 +- 57 files changed, 1040 insertions(+), 881 deletions(-) commit 2224c47ace2387610f8cff0c562db2c6e63df026 Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:27 2017 -0400 IB/core: Add accessor functions for rdma_ah_attr fields These accessor functions are supposed to be used to get and set individual fields of struct rdma_ah_attr Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Sean Hefty Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 121 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) commit f988653a6b050bc4f24618222161681bf502b11c Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:26 2017 -0400 IB/PVRDMA: Rename ib_ah_attr related functions Functions pvrdma_ah_attr_to_ib and ib_ah_attr_to_pvrdma have been renamed so they are in sync wit the rename of the ib_ah_attr structure Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Sean Hefty Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/hw/vmw_pvrdma/pvrdma.h | 8 ++++---- drivers/infiniband/hw/vmw_pvrdma/pvrdma_misc.c | 8 ++++---- drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) commit 766b7f6cf0c0bc3a74403074b78c1a2f26cb3fd1 Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:25 2017 -0400 IB/mthca: Rename to_ib_ah_attr to to_rdma_ah_attr local function to_ib_ah_attr is renamed so it in sync with the rename of the ib_ah_attr structure Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Sean Hefty Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/hw/mthca/mthca_qp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 38349389fece9dc1509f43791e086009a1b79db4 Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:24 2017 -0400 IB/mlx5: Rename to_ib_ah_attr to to_rdma_ah_attr local function to_ib_ah_attr is renamed so it in sync with the rename of the ib_ah_attr structure Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Sean Hefty Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 71d53ab47ee6e1f54f98e03f28ee36353f8c7f31 Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:23 2017 -0400 IB/mlx4: Rename to_ib_ah_attr to to_rdma_ah_attr local function to_ib_ah_attr is renamed so it in sync with the rename of the ib_ah_attr structure Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Sean Hefty Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/qp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 365231593409fb79b11dd9bfcc27a29090bf9de6 Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:22 2017 -0400 IB/core: Rename ib_destroy_ah to rdma_destroy_ah Rename ib_destroy_ah to rdma_destroy_ah so its in sync with the rename of the ib address handle attribute Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Sean Hefty Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/agent.c | 4 ++-- drivers/infiniband/core/cm.c | 6 +++--- drivers/infiniband/core/mad_rmpp.c | 10 +++++----- drivers/infiniband/core/sa_query.c | 2 +- drivers/infiniband/core/user_mad.c | 4 ++-- drivers/infiniband/core/uverbs_cmd.c | 2 +- drivers/infiniband/core/uverbs_std_types.c | 2 +- drivers/infiniband/core/verbs.c | 4 ++-- drivers/infiniband/hw/mlx4/mad.c | 24 ++++++++++++------------ drivers/infiniband/hw/mthca/mthca_mad.c | 4 ++-- drivers/infiniband/hw/qib/qib_mad.c | 2 +- drivers/infiniband/sw/rdmavt/mad.c | 2 +- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 2 +- drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c | 6 +++--- drivers/infiniband/ulp/srpt/ib_srpt.c | 4 ++-- include/rdma/ib_verbs.h | 4 ++-- 16 files changed, 41 insertions(+), 41 deletions(-) commit bfbfd661c9ea2cceb5bb4de8b280ac8a37cf68c2 Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:21 2017 -0400 IB/core: Rename ib_query_ah to rdma_query_ah Rename ib_query_ah to rdma_query_ah so its in sync with the rename of the ib address handle attribute Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Sean Hefty Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/mad.c | 2 +- drivers/infiniband/core/mad_rmpp.c | 2 +- drivers/infiniband/core/verbs.c | 4 ++-- drivers/infiniband/hw/mlx4/mcg.c | 2 +- include/rdma/ib_verbs.h | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) commit 67b985b6c75530bd3dccd55d61d2c9027ab2ca38 Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:20 2017 -0400 IB/core: Rename ib_modify_ah to rdma_modify_ah Rename ib_modify_ah to rdma_modify_ah so its in sync with the rename of the ib address handle attribute Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Sean Hefty Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 4 ++-- include/rdma/ib_verbs.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 0a18cfe4f6d7dba135a04dc18633006ba5b51646 Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:19 2017 -0400 IB/core: Rename ib_create_ah to rdma_create_ah Rename ib_create_ah to rdma_create_ah so its in sync with the rename of the ib address handle attribute Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Sean Hefty Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 2 +- drivers/infiniband/core/sa_query.c | 2 +- drivers/infiniband/core/user_mad.c | 2 +- drivers/infiniband/core/verbs.c | 6 +++--- drivers/infiniband/hw/hfi1/verbs.c | 2 +- drivers/infiniband/hw/mlx4/mad.c | 8 ++++---- drivers/infiniband/hw/mthca/mthca_mad.c | 4 ++-- drivers/infiniband/hw/qib/qib_verbs.c | 2 +- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 2 +- drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c | 2 +- include/rdma/ib_verbs.h | 4 ++-- 11 files changed, 18 insertions(+), 18 deletions(-) commit 90898850ec4e7b3ba0f9a35cc7169ff19ff367a6 Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:18 2017 -0400 IB/core: Rename struct ib_ah_attr to rdma_ah_attr This patch simply renames struct ib_ah_attr to rdma_ah_attr as these fields specify attributes that are not necessarily specific to IB. Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Niranjana Vishwanathapura Reviewed-by: Sean Hefty Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 2 +- drivers/infiniband/core/mad.c | 2 +- drivers/infiniband/core/mad_rmpp.c | 2 +- drivers/infiniband/core/multicast.c | 2 +- drivers/infiniband/core/sa_query.c | 5 +++-- drivers/infiniband/core/user_mad.c | 4 ++-- drivers/infiniband/core/uverbs_cmd.c | 2 +- drivers/infiniband/core/uverbs_marshall.c | 2 +- drivers/infiniband/core/verbs.c | 12 ++++++------ drivers/infiniband/hw/bnxt_re/ib_verbs.c | 6 +++--- drivers/infiniband/hw/bnxt_re/ib_verbs.h | 6 +++--- drivers/infiniband/hw/cxgb3/iwch_provider.c | 2 +- drivers/infiniband/hw/cxgb4/provider.c | 2 +- drivers/infiniband/hw/hfi1/ud.c | 4 ++-- drivers/infiniband/hw/hfi1/verbs.c | 8 ++++---- drivers/infiniband/hw/hfi1/verbs.h | 2 +- drivers/infiniband/hw/hns/hns_roce_ah.c | 5 +++-- drivers/infiniband/hw/hns/hns_roce_device.h | 5 +++-- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 +- drivers/infiniband/hw/mlx4/ah.c | 10 ++++++---- drivers/infiniband/hw/mlx4/mad.c | 10 +++++----- drivers/infiniband/hw/mlx4/mcg.c | 4 ++-- drivers/infiniband/hw/mlx4/mlx4_ib.h | 6 +++--- drivers/infiniband/hw/mlx4/qp.c | 8 +++++--- drivers/infiniband/hw/mlx5/ah.c | 6 +++--- drivers/infiniband/hw/mlx5/mlx5_ib.h | 4 ++-- drivers/infiniband/hw/mlx5/qp.c | 7 ++++--- drivers/infiniband/hw/mthca/mthca_av.c | 4 ++-- drivers/infiniband/hw/mthca/mthca_dev.h | 4 ++-- drivers/infiniband/hw/mthca/mthca_mad.c | 2 +- drivers/infiniband/hw/mthca/mthca_provider.c | 2 +- drivers/infiniband/hw/mthca/mthca_qp.c | 7 ++++--- drivers/infiniband/hw/nes/nes_verbs.c | 3 ++- drivers/infiniband/hw/ocrdma/ocrdma.h | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 8 ++++---- drivers/infiniband/hw/ocrdma/ocrdma_ah.h | 6 +++--- drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 2 +- drivers/infiniband/hw/qedr/qedr.h | 4 ++-- drivers/infiniband/hw/qedr/qedr_cm.c | 2 +- drivers/infiniband/hw/qedr/verbs.c | 2 +- drivers/infiniband/hw/qedr/verbs.h | 2 +- drivers/infiniband/hw/qib/qib_ud.c | 4 ++-- drivers/infiniband/hw/qib/qib_verbs.c | 6 +++--- drivers/infiniband/hw/qib/qib_verbs.h | 2 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.h | 2 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma.h | 4 ++-- drivers/infiniband/hw/vmw_pvrdma/pvrdma_misc.c | 4 ++-- drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 2 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h | 2 +- drivers/infiniband/sw/rdmavt/ah.c | 8 ++++---- drivers/infiniband/sw/rdmavt/ah.h | 6 +++--- drivers/infiniband/sw/rxe/rxe_av.c | 8 ++++---- drivers/infiniband/sw/rxe/rxe_loc.h | 8 ++++---- drivers/infiniband/sw/rxe/rxe_verbs.c | 9 +++++---- drivers/infiniband/ulp/ipoib/ipoib.h | 2 +- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 2 +- drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +- drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 2 +- drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c | 2 +- include/rdma/ib_marshall.h | 2 +- include/rdma/ib_sa.h | 4 ++-- include/rdma/ib_verbs.h | 22 +++++++++++----------- include/rdma/rdma_cm.h | 2 +- include/rdma/rdma_vt.h | 8 ++++---- include/rdma/rdmavt_qp.h | 4 ++-- 66 files changed, 155 insertions(+), 144 deletions(-) commit eca7ddf965e0d6b0b1e4e6dea207f2015b65d367 Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:17 2017 -0400 IB/rxe: Initialize ib_ah_attr during query_ah Zero out ib_ah_attr before calling query_ah. Set ah_flags appropriately. Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Sean Hefty Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_av.c | 1 + drivers/infiniband/sw/rxe/rxe_verbs.c | 1 + 2 files changed, 2 insertions(+) commit 4ba66093bdc6316cd2fe48e74a54bfc29599322f Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:16 2017 -0400 IB/core: Check for global flag when using ah_attr Read/write grh fields of the ah_attr only if the ah_flags field has the IB_AH_GRH bit enabled Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Sean Hefty Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 80 +++++++++++++++++++------------ drivers/infiniband/core/uverbs_marshall.c | 12 +++-- 2 files changed, 57 insertions(+), 35 deletions(-) commit cf0b9395d084c0710a10e3e4ee8d6b4c87dfcd2d Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:15 2017 -0400 IB/core: Add braces when using sizeof This patch adds braces around parameters to sizeof as called out by checkpatch Reviewed-by: Don Hiatt Reviewed-by: Ira Weiny Reviewed-by: Sean Hefty Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_marshall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cfd519358f50e55d304eaf6539ebb07bdc3ac813 Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:14 2017 -0400 IB/IPoIB: Remove 'else' when the 'if' has a return. This patch fixes a checkpatch issue related to not having to use an 'else' if the 'if' path returns from the function. Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Sean Hefty Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit bef4211a7205e14c5355e51275846877cba82a04 Author: Dasaratharaman Chandramouli Date: Sat Apr 29 14:41:13 2017 -0400 IB/ocrdma: Add identifier names to function definitions Address a checkpatch issue on missing identifier names on function definitions. Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Sean Hefty Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_ah.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 08c521a2011ff492490aa9ed6cc574be4235ce2b Merge: 6947529 b06e13c Author: Linus Torvalds Date: Mon May 1 11:22:35 2017 -0700 Merge branch 'for-4.12/post-merge' of git://git.kernel.dk/linux-block Pull second round of block layer updates from Jens Axboe: - Further fixups to the NVMe APST code, from Andy. - Various fixes for (mostly) nvme-fc, from Christoph and James. - NVMe scsi fixes from Jon and Christoph. * 'for-4.12/post-merge' of git://git.kernel.dk/linux-block: (39 commits) nvme-scsi: remove nvme_trans_security_protocol nvme-lightnvm: add missing endianess conversion in nvme_nvm_end_io nvme-scsi: Consider LBA format in IO splitting calculation nvme-fc: avoid memory corruption caused by calling nvmf_free_options() twice lpfc: Fix memory corruption of the lpfc_ncmd->list pointers nvme: Add nvme_core.force_apst to ignore the NO_APST quirk nvme: Display raw APST configuration via DYNAMIC_DEBUG nvme: Fix APST comment lpfc revison 11.2.0.12 Fix Express lane queue creation. Update ABORT processing for NVMET. Fix implicit logo and RSCN handling for NVMET Add Fabric assigned WWN support. Fix max_sgl_segments settings for NVME / NVMET Fix crash after issuing lip reset Fix driver load issues when MRQ=8 Remove hba lock from NVMET issue WQE. Fix nvme initiator handling when not enabled. Fix driver usage of 128B WQEs when WQ_CREATE is V1. Fix driver unload/reload operation. ... commit 0119dc6132d2110df8f3545bd0ffe29aa0752d6b Author: Dan Carpenter Date: Sat Apr 22 13:43:33 2017 +0300 clk: x86: pmc-atom: Checking for IS_ERR() instead of NULL clkdev_hw_create() returns NULLs on error, it doesn't return error pointers. Fixes: 41ee7caf59e1 ("clk: x86: add "mclk" alias for Baytrail/Cherrytrail") Signed-off-by: Dan Carpenter Acked-by: Pierre-Louis Bossart Signed-off-by: Stephen Boyd drivers/clk/x86/clk-pmc-atom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d5066c467ee3b8eb8716e776584b3953a0bb218a Author: Liam Beguin Date: Mon May 1 11:02:01 2017 -0400 switchdev: documentation: fix whitespace issues Figure 1 is full of whitespaces; fix it Signed-off-by: Liam Beguin Signed-off-by: Sylvain Lemieux Acked-by: Ivan Vecera Signed-off-by: David S. Miller Documentation/networking/switchdev.txt | 70 +++++++++++++++++----------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit 694752922b12bd318aa80191bd9d8c3dcfb39055 Merge: a351e9b 9438b3e Author: Linus Torvalds Date: Mon May 1 10:39:57 2017 -0700 Merge branch 'for-4.12/block' of git://git.kernel.dk/linux-block Pull block layer updates from Jens Axboe: - Add BFQ IO scheduler under the new blk-mq scheduling framework. BFQ was initially a fork of CFQ, but subsequently changed to implement fairness based on B-WF2Q+, a modified variant of WF2Q. BFQ is meant to be used on desktop type single drives, providing good fairness. From Paolo. - Add Kyber IO scheduler. This is a full multiqueue aware scheduler, using a scalable token based algorithm that throttles IO based on live completion IO stats, similary to blk-wbt. From Omar. - A series from Jan, moving users to separately allocated backing devices. This continues the work of separating backing device life times, solving various problems with hot removal. - A series of updates for lightnvm, mostly from Javier. Includes a 'pblk' target that exposes an open channel SSD as a physical block device. - A series of fixes and improvements for nbd from Josef. - A series from Omar, removing queue sharing between devices on mostly legacy drivers. This helps us clean up other bits, if we know that a queue only has a single device backing. This has been overdue for more than a decade. - Fixes for the blk-stats, and improvements to unify the stats and user windows. This both improves blk-wbt, and enables other users to register a need to receive IO stats for a device. From Omar. - blk-throttle improvements from Shaohua. This provides a scalable framework for implementing scalable priotization - particularly for blk-mq, but applicable to any type of block device. The interface is marked experimental for now. - Bucketized IO stats for IO polling from Stephen Bates. This improves efficiency of polled workloads in the presence of mixed block size IO. - A few fixes for opal, from Scott. - A few pulls for NVMe, including a lot of fixes for NVMe-over-fabrics. From a variety of folks, mostly Sagi and James Smart. - A series from Bart, improving our exposed info and capabilities from the blk-mq debugfs support. - A series from Christoph, cleaning up how handle WRITE_ZEROES. - A series from Christoph, cleaning up the block layer handling of how we track errors in a request. On top of being a nice cleanup, it also shrinks the size of struct request a bit. - Removal of mg_disk and hd (sorry Linus) by Christoph. The former was never used by platforms, and the latter has outlived it's usefulness. - Various little bug fixes and cleanups from a wide variety of folks. * 'for-4.12/block' of git://git.kernel.dk/linux-block: (329 commits) block: hide badblocks attribute by default blk-mq: unify hctx delay_work and run_work block: add kblock_mod_delayed_work_on() blk-mq: unify hctx delayed_run_work and run_work nbd: fix use after free on module unload MAINTAINERS: bfq: Add Paolo as maintainer for the BFQ I/O scheduler blk-mq-sched: alloate reserved tags out of normal pool mtip32xx: use runtime tag to initialize command header scsi: Implement blk_mq_ops.show_rq() blk-mq: Add blk_mq_ops.show_rq() blk-mq: Show operation, cmd_flags and rq_flags names blk-mq: Make blk_flags_show() callers append a newline character blk-mq: Move the "state" debugfs attribute one level down blk-mq: Unregister debugfs attributes earlier blk-mq: Only unregister hctxs for which registration succeeded blk-mq-debugfs: Rename functions for registering and unregistering the mq directory blk-mq: Let blk_mq_debugfs_register() look up the queue name blk-mq: Register /queue/mq after having registered /queue ide-pm: always pass 0 error to ide_complete_rq in ide_do_devset ide-pm: always pass 0 error to __blk_end_request_all .. commit 062b1c19b879e7831cbceb599ab1d758f87eda40 Author: Max Filippov Date: Tue Jan 27 01:15:10 2015 +0300 xtensa: clean up access to spilled registers locations Define macros SPILL_SLOT* that return a reference to the stack location of the spill slot for specific register and use them instead of opencoded address calculations. Signed-off-by: Max Filippov arch/xtensa/include/asm/processor.h | 15 +++++++++++++++ arch/xtensa/kernel/process.c | 8 ++++---- arch/xtensa/kernel/signal.c | 10 +++++----- arch/xtensa/kernel/stacktrace.c | 35 ++++++++--------------------------- 4 files changed, 32 insertions(+), 36 deletions(-) commit a3e9af95f794d000debc2a5ba3186ba85a6e115f Author: Dan Williams Date: Mon May 1 10:00:02 2017 -0700 libnvdimm: restore "libnvdimm: band aid btt vs clear poison locking" This continues the 4.11 status quo of disabling of error clearing from the BTT I/O path. Toshi found that even though we have eliminated all the libnvdimm sources of sleeping-while-atomic triggers, we still have sleeping operations that will occur in the path to send the ACPI DSM to the DIMM to clear the error: BUG: sleeping function called from invalid context at mm/slab.h:432 in_atomic(): 1, irqs_disabled(): 0, pid: 13353, name: dd Call Trace: dump_stack+0x86/0xc3 ___might_sleep+0x17d/0x250 __might_sleep+0x4a/0x80 __kmalloc+0x1c0/0x2e0 acpi_os_allocate_zeroed+0x2d/0x2f acpi_evaluate_object+0x59/0x3b1 acpi_evaluate_dsm+0xbd/0x10c acpi_nfit_ctl+0x1ef/0x7c0 [nfit] ? nsio_rw_bytes+0x152/0x280 nvdimm_clear_poison+0x77/0x140 nsio_rw_bytes+0x18f/0x280 btt_write_pg+0x1d4/0x3d0 [nd_btt] btt_make_request+0x119/0x2d0 [nd_btt] A solution for tracking and handling media errors natively in the BTT is needed. Cc: Jeff Moyer Cc: Dave Jiang Cc: Vishal Verma Reported-by: Toshi Kani Signed-off-by: Dan Williams drivers/nvdimm/claim.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 61e29ec1c96f67605217c2a80441a75ff906db62 Author: Sebastian Reichel Date: Fri Apr 28 10:27:37 2017 -0700 Input: twl4030-pwrbutton - use input_set_capability() helper Cleanup driver slightly by using input_set_capability() instead of manually setting the required bits. Signed-off-by: Sebastian Reichel Signed-off-by: Dmitry Torokhov drivers/input/misc/twl4030-pwrbutton.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3071e9dd6cd3f2290d770117330f2c8b2e9a97e4 Author: Sebastian Reichel Date: Fri Apr 28 10:25:51 2017 -0700 Input: twl4030-pwrbutton - use correct device for irq request The interrupt should be requested for the platform device and not for the input device. Fixes: 7f9ce649d267 ("Input: twl4030-pwrbutton - simplify driver using devm_*") Signed-off-by: Sebastian Reichel Signed-off-by: Dmitry Torokhov drivers/input/misc/twl4030-pwrbutton.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e55057e82ad413603fd45eac3b83b80acde780e1 Author: Martin Kepplinger Date: Fri Apr 28 09:58:12 2017 -0700 Input: ar1021_i2c - enable touch mode during open The device could as well be in command mode, in which this driver cannot handle the device. When opening the device, let's make sure the device will be in the mode we expect it to be for this driver. Signed-off-by: Martin Kepplinger Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ar1021_i2c.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit b1e455260c9187b16dd4ebc428b817ebac322043 Author: Ido Schimmel Date: Sun Apr 30 19:47:14 2017 +0300 mlxsw: spectrum_router: Simplify VRF enslavement When a netdev is enslaved to a VRF master, its router interface (RIF) needs to be destroyed (if exists) and a new one created using the corresponding virtual router (VR). >From the driver's perspective, the above is equivalent to an inetaddr event sent for this netdev. Therefore, when a port netdev (or its uppers) are enslaved to a VRF master, call the same function that would've been called had a NETDEV_UP was sent for this netdev in the inetaddr notification chain. This patch also fixes a bug when a LAG netdev with an existing RIF is enslaved to a VRF. Before this patch, each LAG port would drop the reference on the RIF, but would re-join the same one (in the wrong VR) soon after. With this patch, the corresponding RIF is first destroyed and a new one is created using the correct VR. Fixes: 7179eb5acd59 ("mlxsw: spectrum_router: Add support for VRFs") Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 77 +++------------ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 10 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 107 +++++++++------------ 3 files changed, 63 insertions(+), 131 deletions(-) commit cedf90c0cc1250cfb95905b61dc36b37ec9d5395 Merge: 07ff2ed 0a0ab1d Author: David S. Miller Date: Mon May 1 11:47:10 2017 -0400 Merge tag 'mlx5-updates-2017-04-30' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux mlx5-updates-2017-04-30 Or says: ================ mlx5 neigh update This series (whose code name is 'neigh update') from Hadar, enhances the mlx5 TC IP tunnel offloads to deal with changes to tunnel destination neighbours used in offloaded flows which involved encapsulation. In order to keep track on the validity state of such neighbours, we register a netevent notifier callback and act on NEIGH_UPDATE events: if a neighbour becomes valid, offload the related flows to HW (the other way around when neigh becomes invalid) and similarly when a neigh mac addresses changes. Since this traffic is offloaded from the host OS, the neighbour for the IP tunnel destination can mistakenly become STALE and deleted by the kernel since its 'used' value wasn't changed. To address that, we proactively update the neighbour 'used' value every DELAY_PROBE_TIME seconds, using time stamps generated by the existing driver code for HW flow counters. We use the DELAY_PROBE_TIME_UPDATE event to adjust the frequency of the updates. Prior to the core of the series, there's a patch from Saeed that introduces an extendable vport representor implementation scheme. It provides a separation between the eswitch to the netdev related aspects of the representors. We would like to thank Ido Schimmel and Ilya Lesokhin for their coaching && advice through the long design and review cycles while we struggled to understand and (hopefully correctly) implement the locking around the different driver flows(..) . - Or. ================= Misc Updates: From Tariq: Some small performance and trivial code optimization for mlx5 netdev driver - Optimize poll ICOSQ completion queue - Use prefetchw when a write is to follow - Use u8 as ownership type in mlx5e_get_cqe() From Eran: - Disable LRO by default on specific setups From Eli: - Small cleanup for E-Switch to avoid redundant allocation Signed-off-by: David S. Miller commit 07ff2ed03bb874a5bb97361a5a07ee28f1afa574 Author: Mintz, Yuval Date: Sun Apr 30 12:14:44 2017 +0300 qed: Prevent warning without CONFIG_RFS_ACCEL After removing the PTP related initialization from slowpath start, the remaining PTT entry is required only in case CONFIG_RFS_ACCEL is set. Otherwise, it leads to a warning due to it being unused. Fixes: d179bd1699fc ("qed: Acquire/release ptt_ptp lock when enabling/disabling PTP") Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_main.c | 2 ++ 1 file changed, 2 insertions(+) commit a6e8ab8e729065f716790fb9429f53393f72d7b4 Merge: 332270f 20b1bd9 Author: David S. Miller Date: Mon May 1 11:42:16 2017 -0400 Merge branch 'qed-RoCE-fixes' Yuval Mintz says: ==================== qed: RoCE related pseudo-fixes This series contains multiple small corrections to the RoCE logic in qed plus some debug information and inter-module parameter meant to prevent issues further along. - #1, #6 Share information with protocol driver [either new or filling missing bits in existing API]. - #2, #3 correct error flows in qed. - #4 add debug related information. - #5 fixes a minor issue in the HW configuration. ==================== Signed-off-by: David S. Miller commit 20b1bd96e9f4feeffc9206284df3c6a4438e9ca8 Author: Ram Amrani Date: Sun Apr 30 11:49:10 2017 +0300 qed: output the DPM status and WID count Output to the RDMA driver whether DPM mode is enabled or disabled in the HW and if so what is the number of WIDs it supports Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 1 + drivers/net/ethernet/qlogic/qed/qed_dev.c | 4 +++- drivers/net/ethernet/qlogic/qed/qed_roce.c | 4 ++++ include/linux/qed/qed_roce_if.h | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) commit 107392b75ffc96a2418d5382e52b08c598575e1b Author: Ram Amrani Date: Sun Apr 30 11:49:09 2017 +0300 qed: align DPI configuration to HW requirements When calculating doorbell BAR partitioning round up the number of CPUs to the nearest power of 2 so the size of the DPI (per user section) configured in the hardware will be stored properly and not truncated. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 1 + drivers/net/ethernet/qlogic/qed/qed_dev.c | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) commit e015d58b44a93a3fd89ed910d68659dfdc57237c Author: Ram Amrani Date: Sun Apr 30 11:49:08 2017 +0300 qed: verify RoCE resource bitmaps are released Add mechanism to verify RoCE resources are released prior to freeing the bitmaps. If this is not the case, print what resources were not released. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_roce.c | 105 +++++++++++++++++++++-------- drivers/net/ethernet/qlogic/qed/qed_roce.h | 2 + 2 files changed, 80 insertions(+), 27 deletions(-) commit 105361943d3036f00f70a6621983b98673839591 Author: Ram Amrani Date: Sun Apr 30 11:49:07 2017 +0300 qed: add error handling flow to TID deregistratin posting failure If the posting of the ramrod for the purpose of TID deregistration fails, abort the deregistration operation without using the FW's return code. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_roce.c | 2 ++ 1 file changed, 2 insertions(+) commit ba0154e96449a5be3360d3a07bc4b6d476e2667e Author: Ram Amrani Date: Sun Apr 30 11:49:06 2017 +0300 qed: remove unused SQ error state The internal RoCE SQE QP state isn't being used. Instead we mark the QP as in regular error state. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_roce.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 793ea8a9c7b4b4383348a717cb5c86c1bbdba30a Author: Ram Amrani Date: Sun Apr 30 11:49:05 2017 +0300 qed: configure the RoCE max message size Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_roce.c | 2 ++ 1 file changed, 2 insertions(+) commit 332270fdc8b6fba07d059a9ad44df9e1a2ad4529 Author: Yonghong Song Date: Sat Apr 29 22:52:42 2017 -0700 bpf: enhance verifier to understand stack pointer arithmetic llvm 4.0 and above generates the code like below: .... 440: (b7) r1 = 15 441: (05) goto pc+73 515: (79) r6 = *(u64 *)(r10 -152) 516: (bf) r7 = r10 517: (07) r7 += -112 518: (bf) r2 = r7 519: (0f) r2 += r1 520: (71) r1 = *(u8 *)(r8 +0) 521: (73) *(u8 *)(r2 +45) = r1 .... and the verifier complains "R2 invalid mem access 'inv'" for insn #521. This is because verifier marks register r2 as unknown value after #519 where r2 is a stack pointer and r1 holds a constant value. Teach verifier to recognize "stack_ptr + imm" and "stack_ptr + reg with const val" as valid stack_ptr with new offset. Signed-off-by: Yonghong Song Acked-by: Martin KaFai Lau Acked-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 11 +++++++++++ tools/testing/selftests/bpf/test_verifier.c | 18 ++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) commit 452bae0aede774f87bf56c28b6dd50b72c78986c Author: Dan Williams Date: Fri Apr 28 22:05:14 2017 -0700 libnvdimm: fix nvdimm_bus_lock() vs device_lock() ordering A debug patch to turn the standard device_lock() into something that lockdep can analyze yielded the following: ====================================================== [ INFO: possible circular locking dependency detected ] 4.11.0-rc4+ #106 Tainted: G O ------------------------------------------------------- lt-libndctl/1898 is trying to acquire lock: (&dev->nvdimm_mutex/3){+.+.+.}, at: [] nd_attach_ndns+0x178/0x1b0 [libnvdimm] but task is already holding lock: (&nvdimm_bus->reconfig_mutex){+.+.+.}, at: [] nvdimm_bus_lock+0x21/0x30 [libnvdimm] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&nvdimm_bus->reconfig_mutex){+.+.+.}: lock_acquire+0xf6/0x1f0 __mutex_lock+0x88/0x980 mutex_lock_nested+0x1b/0x20 nvdimm_bus_lock+0x21/0x30 [libnvdimm] nvdimm_namespace_capacity+0x1b/0x40 [libnvdimm] nvdimm_namespace_common_probe+0x230/0x510 [libnvdimm] nd_pmem_probe+0x14/0x180 [nd_pmem] nvdimm_bus_probe+0xa9/0x260 [libnvdimm] -> #0 (&dev->nvdimm_mutex/3){+.+.+.}: __lock_acquire+0x1107/0x1280 lock_acquire+0xf6/0x1f0 __mutex_lock+0x88/0x980 mutex_lock_nested+0x1b/0x20 nd_attach_ndns+0x178/0x1b0 [libnvdimm] nd_namespace_store+0x308/0x3c0 [libnvdimm] namespace_store+0x87/0x220 [libnvdimm] In this case '&dev->nvdimm_mutex/3' mirrors '&dev->mutex'. Fix this by replacing the use of device_lock() with nvdimm_bus_lock() to protect nd_{attach,detach}_ndns() operations. Cc: Fixes: 8c2f7e8658df ("libnvdimm: infrastructure for btt devices") Reported-by: Yi Zhang Signed-off-by: Dan Williams drivers/nvdimm/btt_devs.c | 2 +- drivers/nvdimm/claim.c | 23 +++++++++++++++-------- drivers/nvdimm/dax_devs.c | 2 +- drivers/nvdimm/pfn_devs.c | 2 +- 4 files changed, 18 insertions(+), 11 deletions(-) commit 98da65d5e32583d89a1b1c760293b601816a98d3 Author: Michel Dänzer Date: Fri Apr 28 16:32:43 2017 -0400 Revert "drm/amdgpu: Refactor flip into prepare submit and submit. (v3)" This reverts commit cb341a319f7e66f879d69af929c3dadfc1a8f31e. The purpose of the refactor was for amdgpu_crtc_prepare/submit_flip to be used by the DC code, but that's no longer the case. Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 138 ++++++---------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 15 --- 2 files changed, 29 insertions(+), 124 deletions(-) commit 2faf26575350e49c1e242b7a464e9302f78b9b15 Author: Karim Eshapa Date: Mon May 1 15:58:08 2017 +0200 benet: Use time_before_eq for time comparison Use time_before_eq for time comparison more safe and dealing with timer wrapping to be future-proof. Signed-off-by: Karim Eshapa Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1a7fca63cd405fc77a9c9ce9291792f2a7d222a4 Author: Benjamin LaHaise Date: Mon May 1 09:58:40 2017 -0400 flower: check unused bits in MPLS fields Since several of the the netlink attributes used to configure the flower classifier's MPLS TC, BOS and Label fields have additional bits which are unused, check those bits to ensure that they are actually 0 as suggested by Jamal. Signed-off-by: Benjamin LaHaise Cc: David Miller Cc: Jamal Hadi Salim Cc: Simon Horman Cc: Jakub Kicinski Cc: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_flower.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) commit a01aa920b8e39069bb7ab352ce45f127238f1d26 Merge: edd7f4e 8eeef23 Author: David S. Miller Date: Mon May 1 10:46:50 2017 -0400 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. A large bunch of code cleanups, simplify the conntrack extension codebase, get rid of the fake conntrack object, speed up netns by selective synchronize_net() calls. More specifically, they are: 1) Check for ct->status bit instead of using nfct_nat() from IPVS and Netfilter codebase, patch from Florian Westphal. 2) Use kcalloc() wherever possible in the IPVS code, from Varsha Rao. 3) Simplify FTP IPVS helper module registration path, from Arushi Singhal. 4) Introduce nft_is_base_chain() helper function. 5) Enforce expectation limit from userspace conntrack helper, from Gao Feng. 6) Add nf_ct_remove_expect() helper function, from Gao Feng. 7) NAT mangle helper function return boolean, from Gao Feng. 8) ctnetlink_alloc_expect() should only work for conntrack with helpers, from Gao Feng. 9) Add nfnl_msg_type() helper function to nfnetlink to build the netlink message type. 10) Get rid of unnecessary cast on void, from simran singhal. 11) Use seq_puts()/seq_putc() instead of seq_printf() where possible, also from simran singhal. 12) Use list_prev_entry() from nf_tables, from simran signhal. 13) Remove unnecessary & on pointer function in the Netfilter and IPVS code. 14) Remove obsolete comment on set of rules per CPU in ip6_tables, no longer true. From Arushi Singhal. 15) Remove duplicated nf_conntrack_l4proto_udplite4, from Gao Feng. 16) Remove unnecessary nested rcu_read_lock() in __nf_nat_decode_session(). Code running from hooks are already guaranteed to run under RCU read side. 17) Remove deadcode in nf_tables_getobj(), from Aaron Conole. 18) Remove double assignment in nf_ct_l4proto_pernet_unregister_one(), also from Aaron. 19) Get rid of unsed __ip_set_get_netlink(), from Aaron Conole. 20) Don't propagate NF_DROP error to userspace via ctnetlink in __nf_nat_alloc_null_binding() function, from Gao Feng. 21) Revisit nf_ct_deliver_cached_events() to remove unnecessary checks, from Gao Feng. 22) Kill the fake untracked conntrack objects, use ctinfo instead to annotate a conntrack object is untracked, from Florian Westphal. 23) Remove nf_ct_is_untracked(), now obsolete since we have no conntrack template anymore, from Florian. 24) Add event mask support to nft_ct, also from Florian. 25) Move nf_conn_help structure to include/net/netfilter/nf_conntrack_helper.h. 26) Add a fixed 32 bytes scratchpad area for conntrack helpers. Thus, we don't deal with variable conntrack extensions anymore. Make sure userspace conntrack helper doesn't go over that size. Remove variable size ct extension infrastructure now this code got no more clients. From Florian Westphal. 27) Restore offset and length of nf_ct_ext structure to 8 bytes now that wraparound is not possible any longer, also from Florian. 28) Allow to get rid of unassured flows under stress in conntrack, this applies to DCCP, SCTP and TCP protocols, from Florian. 29) Shrink size of nf_conntrack_ecache structure, from Florian. 30) Use TCP_MAX_WSCALE instead of hardcoded 14 in TCP tracker, from Gao Feng. 31) Register SYNPROXY hooks on demand, from Florian Westphal. 32) Use pernet hook whenever possible, instead of global hook registration, from Florian Westphal. 33) Pass hook structure to ebt_register_table() to consolidate some infrastructure code, from Florian Westphal. 34) Use consume_skb() and return NF_STOLEN, instead of NF_DROP in the SYNPROXY code, to make sure device stats are not fooled, patch from Gao Feng. 35) Remove NF_CT_EXT_F_PREALLOC this kills quite some code that we don't need anymore if we just select a fixed size instead of expensive runtime time calculation of this. From Florian. 36) Constify nf_ct_extend_register() and nf_ct_extend_unregister(), from Florian. 37) Simplify nf_ct_ext_add(), this kills nf_ct_ext_create(), from Florian. 38) Attach NAT extension on-demand from masquerade and pptp helper path, from Florian. 39) Get rid of useless ip_vs_set_state_timeout(), from Aaron Conole. 40) Speed up netns by selective calls of synchronize_net(), from Florian Westphal. 41) Silence stack size warning gcc in 32-bit arch in snmp helper, from Florian. 42) Inconditionally call nf_ct_ext_destroy(), even if we have no extensions, to deal with the NF_NAT_MANIP_SRC case. Patch from Liping Zhang. ==================== Signed-off-by: David S. Miller commit 8abe904dc82772bf1635fcc5765433c672f0a875 Author: Guochun Mao Date: Wed Apr 5 16:37:42 2017 +0800 mtd: mtk-nor: set controller's address width according to nor flash When nor's size larger than 16MByte, nor's address width maybe set to 3 or 4, and controller should change address width according to nor's setting. Signed-off-by: Guochun Mao Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/mtk-quadspi.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 0d43d7ab277a048c4b1455ee00030933e1bd5fa3 Author: Ludovic Barre Date: Thu Apr 13 19:15:57 2017 +0200 mtd: spi-nor: add driver for STM32 quad spi flash controller The quadspi is a specialized communication interface targeting single, dual or quad SPI Flash memories. It can operate in any of the following modes: -indirect mode: all the operations are performed using the quadspi registers -read memory-mapped mode: the external Flash memory is mapped to the microcontroller address space and is seen by the system as if it was an internal memory Signed-off-by: Ludovic Barre Reviewed-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/Kconfig | 7 + drivers/mtd/spi-nor/Makefile | 1 + drivers/mtd/spi-nor/stm32-quadspi.c | 693 ++++++++++++++++++++++++++++++++++++ 3 files changed, 701 insertions(+) commit edd7f4efa8111efc279582290acc4d54d405748a Merge: d74a32a f76254a Author: David S. Miller Date: Mon May 1 10:42:38 2017 -0400 Merge branch 'bpf-samples-skb_mode-bug-fixes' Jesper Dangaard Brouer says: ==================== samples/bpf: two bug fixes to XDP_FLAGS_SKB_MODE attaching Two small bugfixes for: commit 3993f2cb983b ("samples/bpf: Add support for SKB_MODE to xdp1 and xdp_tx_iptunnel") ==================== Signed-off-by: David S. Miller commit f76254a845a661ccdb9fa246ee72197f90a8d3dd Author: Jesper Dangaard Brouer Date: Mon May 1 11:26:20 2017 +0200 samples/bpf: fix XDP_FLAGS_SKB_MODE detach for xdp_tx_iptunnel The xdp_tx_iptunnel program can be terminated in two ways, after N-seconds or via Ctrl-C SIGINT. The SIGINT code path does not handle detatching the correct XDP program, in-case the program was attached with XDP_FLAGS_SKB_MODE. Fix this by storing the XDP flags as a global variable, which is available for the SIGINT handler function. Fixes: 3993f2cb983b ("samples/bpf: Add support for SKB_MODE to xdp1 and xdp_tx_iptunnel") Signed-off-by: Jesper Dangaard Brouer Acked-by: Daniel Borkmann Reviewed-by: Andy Gospodarek Signed-off-by: David S. Miller samples/bpf/xdp_tx_iptunnel_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6387d0111ca4740b69a082a92fc373185af11133 Author: Jesper Dangaard Brouer Date: Mon May 1 11:26:15 2017 +0200 samples/bpf: fix SKB_MODE flag to be a 32-bit unsigned int The kernel side of XDP_FLAGS_SKB_MODE is unsigned, and the rtnetlink IFLA_XDP_FLAGS is defined as NLA_U32. Thus, userspace programs under samples/bpf/ should use the correct type. Fixes: 3993f2cb983b ("samples/bpf: Add support for SKB_MODE to xdp1 and xdp_tx_iptunnel") Signed-off-by: Jesper Dangaard Brouer Acked-by: Daniel Borkmann Reviewed-by: Andy Gospodarek Signed-off-by: David S. Miller samples/bpf/bpf_load.c | 3 ++- samples/bpf/bpf_load.h | 2 +- samples/bpf/xdp1_user.c | 8 ++++---- samples/bpf/xdp_tx_iptunnel_user.c | 8 ++++---- 4 files changed, 11 insertions(+), 10 deletions(-) commit d74a32acd59a8ccd8e209af3f4cf533e0359d355 Merge: 7333362 9861ce0 Author: David S. Miller Date: Mon May 1 10:35:48 2017 -0400 Merge branch 'xdp-netlink-ext-ack' Jakub Kicinski says: ==================== xdp: use netlink extended ACK reporting This series is an attempt to make XDP more user friendly by enabling exploiting the recently added netlink extended ACK reporting to carry messages to user space. David Ahern's iproute2 ext ack patches for ip link are sufficient to show the errors like this: Error: nfp: MTU too large w/ XDP enabled Where the message is coming directly from the driver. There could still be a bit of a leap for a complete novice from the message above to the right settings, but it's a big improvement over the standard "Invalid argument" message. v1/non-rfc: - add a separate macro in patch 1; - add KBUILD_MODNAME as part of the message (Daniel); - don't print the error to logs in patch 1. ==================== Signed-off-by: David S. Miller commit 9861ce039c2a4ff3e50eb7c679dadc15a8469e3f Author: Jakub Kicinski Date: Sun Apr 30 21:46:48 2017 -0700 virtio_net: make use of extended ack message reporting Try to carry error messages to the user via the netlink extended ack message attribute. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/virtio_net.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit d957c0f711aaeaac6bbffd82098737ac10b7985d Author: Jakub Kicinski Date: Sun Apr 30 21:46:47 2017 -0700 nfp: make use of extended ack message reporting Try to carry error messages to the user via the netlink extended ack message attribute. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 3 ++- .../net/ethernet/netronome/nfp/nfp_net_common.c | 22 +++++++++++++--------- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 4 ++-- 3 files changed, 17 insertions(+), 12 deletions(-) commit ddf9f970764f4390aba767e77fddaaced4a6760d Author: Jakub Kicinski Date: Sun Apr 30 21:46:46 2017 -0700 xdp: propagate extended ack to XDP setup Drivers usually have a number of restrictions for running XDP - most common being buffer sizes, LRO and number of rings. Even though some drivers try to be helpful and print error messages experience shows that users don't often consult kernel logs on netlink errors. Try to use the new extended ack mechanism to carry the message back to user space. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/netdevice.h | 10 ++++++++-- net/core/dev.c | 5 ++++- net/core/rtnetlink.c | 13 ++++++++----- 3 files changed, 20 insertions(+), 8 deletions(-) commit 45d9b378e85f1b00ac047626827c68589168936c Author: Jakub Kicinski Date: Sun Apr 30 21:46:45 2017 -0700 netlink: add NULL-friendly helper for setting extended ACK message As we propagate extended ack reporting throughout various paths in the kernel it may be that the same function is called with the extended ack parameter passed as NULL. One place where that happens is in drivers which have a centralized reconfiguration function called both from ndos and from ethtool_ops. Add a new helper for setting the error message in such conditions. Existing helper is left as is to encourage propagating the ext act fully wherever possible. It also makes it clear in the code which messages may be lost due to ext ack being NULL. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/netlink.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 73a757e63114dfd765f1c5d1ff7e994f123d0234 Author: Steven Rostedt (VMware) Date: Mon May 1 09:35:09 2017 -0400 ring-buffer: Return reader page back into existing ring buffer When reading the ring buffer for consuming, it is optimized for splice, where a page is taken out of the ring buffer (zero copy) and sent to the reading consumer. When the read is finished with the page, it calls ring_buffer_free_read_page(), which simply frees the page. The next time the reader needs to get a page from the ring buffer, it must call ring_buffer_alloc_read_page() which allocates and initializes a reader page for the ring buffer to be swapped into the ring buffer for a new filled page for the reader. The problem is that there's no reason to actually free the page when it is passed back to the ring buffer. It can hold it off and reuse it for the next iteration. This completely removes the interaction with the page_alloc mechanism. Using the trace-cmd utility to record all events (causing trace-cmd to require reading lots of pages from the ring buffer, and calling ring_buffer_alloc/free_read_page() several times), and also assigning a stack trace trigger to the mm_page_alloc event, we can see how many times the ring_buffer_alloc_read_page() needed to allocate a page for the ring buffer. Before this change: # trace-cmd record -e all -e mem_page_alloc -R stacktrace sleep 1 # trace-cmd report |grep ring_buffer_alloc_read_page | wc -l 9968 After this change: # trace-cmd record -e all -e mem_page_alloc -R stacktrace sleep 1 # trace-cmd report |grep ring_buffer_alloc_read_page | wc -l 4 Signed-off-by: Steven Rostedt (VMware) include/linux/ring_buffer.h | 2 +- kernel/trace/ring_buffer.c | 40 +++++++++++++++++++++++++++++++++--- kernel/trace/ring_buffer_benchmark.c | 2 +- kernel/trace/trace.c | 17 ++++++++++----- 4 files changed, 51 insertions(+), 10 deletions(-) commit f984409a00e7d9aa40af64d7c9619e5de3d980bf Author: Max Filippov Date: Mon Mar 16 14:40:14 2015 +0300 xtensa: use generic tracehooks Use tracehook_report_syscall_{entry,exit} instead of a local copy of it in do_syscall_trace. Allow tracehook to cancel syscall by returning invalid syscall number to the system_call function. Signed-off-by: Max Filippov arch/xtensa/kernel/entry.S | 3 ++- arch/xtensa/kernel/ptrace.c | 38 ++++++++++++-------------------------- 2 files changed, 14 insertions(+), 27 deletions(-) commit 0700ed072feffd65212e6a03840d19c4988d6820 Author: Max Filippov Date: Tue Jan 27 00:43:14 2015 +0300 xtensa: move internal ptrace definitions from uapi/asm to asm Stack frame layout diagram, kernel stack size and exception_handlers offsets are used by the kernel and are not supposed to be accessible to userspace. Move these definitions from uapi/asm/ptrace.h to asm/ptrace.h Signed-off-by: Max Filippov arch/xtensa/include/asm/ptrace.h | 39 ++++++++++++++++++++++++++++++++++ arch/xtensa/include/uapi/asm/ptrace.h | 40 ----------------------------------- 2 files changed, 39 insertions(+), 40 deletions(-) commit 1b47a683a04a93ad32786a23b7f88990b980346a Author: Max Filippov Date: Tue Jan 27 03:12:50 2015 +0300 xtensa: clean up xtensa/kernel/ptrace.c - make locally-used functions static; - drop meaningless comments and commented out code; - fix code style and alignment. Signed-off-by: Max Filippov arch/xtensa/kernel/ptrace.c | 144 ++++++++++++++++++++++---------------------- 1 file changed, 71 insertions(+), 73 deletions(-) commit d9c7710db90c0069ca5eebc060d4571aabea8f74 Author: Max Filippov Date: Tue Jan 27 00:27:05 2015 +0300 xtensa: drop unused fast_io_protect function fast_io_protect is not used anywhere, drop its definition. Signed-off-by: Max Filippov arch/xtensa/kernel/coprocessor.S | 24 ------------------------ 1 file changed, 24 deletions(-) commit cda3b01368391b48728b7edbbac0ca873b514367 Author: Phil Reid Date: Mon May 1 16:49:58 2017 +0800 power: supply: sbs-battery: Add alert callback To simplify the sbs-manager code and notification of battery removal use the i2c alert callback to notify the sbs-battery driver that an event has occurred. Signed-off-by: Phil Reid Signed-off-by: Sebastian Reichel drivers/power/supply/sbs-battery.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit cad87f097ca2d56093145c4becd487f5c186a612 Author: Sebastian Reichel Date: Mon May 1 13:55:25 2017 +0200 mailmap: add Sebastian Reichel Add two entries to map to my primary kernel address. Signed-off-by: Sebastian Reichel .mailmap | 2 ++ 1 file changed, 2 insertions(+) commit bfb8c6e495b9fc14c315e0f1550394b2137035b4 Merge: a351e9b cf8178f Author: Ingo Molnar Date: Mon May 1 13:40:23 2017 +0200 Merge branch 'x86/microcode' into x86/urgent, to pick up cleanup Signed-off-by: Ingo Molnar commit e9574c14fd11ba254633342ff8ea58664c2938e1 Author: Sebastian Reichel Date: Thu Apr 27 17:30:07 2017 +0200 power: supply: avoid unused twl4030-madc.h Avoid inclusion of unused twl4030-madc.h. This will allow twl4030-madc.h to be merged into the iio driver. Signed-off-by: Sebastian Reichel drivers/power/supply/rx51_battery.c | 1 - drivers/power/supply/twl4030_madc_battery.c | 1 - 2 files changed, 2 deletions(-) commit 7f93e1fa032bb5ee19b868b9649bc98c82553003 Author: Paul Kocialkowski Date: Tue Apr 25 17:09:05 2017 +0200 power: supply: sbs-battery: Correct supply status with current draw The status reported directly by the battery controller is not always reliable and should be corrected based on the current draw information. This implements such a correction with a dedicated function, called where the supply status is retrieved. Signed-off-by: Paul Kocialkowski Signed-off-by: Sebastian Reichel drivers/power/supply/sbs-battery.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 4df2cce4722d35eb35bb9371e7c9a600a84558f9 Author: Paul Kocialkowski Date: Tue Apr 25 17:09:04 2017 +0200 power: supply: sbs-battery: Don't ignore the first external power change A mechanism to ignore the first external power change notification was put in place years ago to ignore the power_supply_register notification. However, this doesn't apply to the current situation anymore, as the first notification is always the result of a legitimate power change. This removes this deprecated mechanism, which puts back the driver's state machine to a sane state (an ignored first notification previously caused a charging/discharging status inversion). Signed-off-by: Paul Kocialkowski Signed-off-by: Sebastian Reichel drivers/power/supply/sbs-battery.c | 10 ---------- 1 file changed, 10 deletions(-) commit 633e8799ddc09431be2744c4a1efdbda13af2b0b Author: Michael Trimarchi Date: Tue Apr 25 15:18:05 2017 +0200 power: supply: pda_power: move from timer to delayed_work This changed is needed to avoid locking problem during boot as shown: <5>[ 8.824096] Registering SWP/SWPB emulation handler <6>[ 8.977294] clock: disabling unused clocks to save power <3>[ 9.108154] BUG: sleeping function called from invalid context at kernel_albert/kernel/mutex.c:269 <3>[ 9.122894] in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: swapper/0 <4>[ 9.130249] 3 locks held by swapper/0/1: <4>[ 9.134613] #0: (&__lockdep_no_validate__){......}, at: [] __driver_attach+0x58/0xa8 <4>[ 9.144500] #1: (&__lockdep_no_validate__){......}, at: [] __driver_attach+0x68/0xa8 <4>[ 9.154357] #2: (&polling_timer){......}, at: [] run_timer_softirq+0x108/0x3ec <4>[ 9.163726] Backtrace: <4>[ 9.166473] [] (dump_backtrace+0x0/0x114) from [] (dump_stack+0x20/0x24) <4>[ 9.175811] r6:00203230 r5:0000010d r4:d782e000 r3:60000113 <4>[ 9.182250] [] (dump_stack+0x0/0x24) from [] (__might_sleep+0x10c/0x128) <4>[ 9.191650] [] (__might_sleep+0x0/0x128) from [] (mutex_lock_nested+0x34/0x36c) <4>[ 9.201660] r5:c02d5350 r4:d79a0c64 <4>[ 9.205688] [] (mutex_lock_nested+0x0/0x36c) from [] (regulator_set_current_limit+0x30/0x118) <4>[ 9.217071] [] (regulator_set_current_limit+0x0/0x118) from [] (update_charger+0x84/0xc4) <4>[ 9.228027] r7:d782fb20 r6:00000101 r5:c1767e94 r4:00000000 <4>[ 9.234436] [] (update_charger+0x0/0xc4) from [] (psy_changed+0x20/0x48) <4>[ 9.243804] r5:d782e000 r4:c1767e94 <4>[ 9.247802] [] (psy_changed+0x0/0x48) from [] (polling_timer_func+0x84/0xb8) <4>[ 9.257537] r4:c1767e94 r3:00000002 <4>[ 9.261566] [] (polling_timer_func+0x0/0xb8) from [] (run_timer_softirq+0x17c/0x3ec) <4>[ 9.272033] r4:c1767eb0 r3:00000000 <4>[ 9.276062] [] (run_timer_softirq+0x0/0x3ec) from [] (__do_softirq+0xf0/0x298) <4>[ 9.286010] [] (__do_softirq+0x0/0x298) from [] (irq_exit+0x98/0xa0) <4>[ 9.295013] [] (irq_exit+0x0/0xa0) from [] (handle_IRQ+0x60/0xc0) <4>[ 9.303680] r4:c1194e98 r3:c00bc778 <4>[ 9.307708] [] (handle_IRQ+0x0/0xc0) from [] (gic_handle_irq+0x34/0x68) <4>[ 9.316955] r8:000ac383 r7:d782fc3c r6:d782fc08 r5:c11936c4 r4:e0802100 <4>[ 9.324310] r3:c026ba48 <4>[ 9.327301] [] (gic_handle_irq+0x0/0x68) from [] (__irq_svc+0x40/0x74) <4>[ 9.336456] Exception stack(0xd782fc08 to 0xd782fc50) <4>[ 9.342041] fc00: d6e30e6c ac383627 00000000 ac383417 ea19c000 ea200000 <4>[ 9.351104] fc20: beffffff 00000667 000ac383 d6e30670 d6e3066c d782fc94 d782fbe8 d782fc50 <4>[ 9.360168] fc40: c026ba48 c001d1f0 00000113 ffffffff Fixes: b2998049cfae ("[BATTERY] pda_power platform driver") Signed-off-by: Michael Trimarchi Signed-off-by: Anthony Brandon Signed-off-by: Sebastian Reichel drivers/power/supply/pda_power.c | 49 ++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 22 deletions(-) commit adb69a3c4524693a32ba72533ee6d7a52e54989e Author: Hans de Goede Date: Fri Apr 14 20:32:58 2017 +0200 power: supply: max17042_battery: Add support for the SCOPE property Add support for the SCOPE property, always return SCOPE_SYSTEM, as the max170xx is used for the main battery on all known systems with a max170xx. Signed-off-by: Hans de Goede Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6d6b61eafca94146cedf7709974a7423df16a6f1 Author: Hans de Goede Date: Fri Apr 14 20:32:57 2017 +0200 power: supply: max17042_battery: Add support for the CHARGE_NOW property At least upower prefers the more precise charge_now sysfs value over capacity and the max17042 has the info, so lets export it. Signed-off-by: Hans de Goede Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2e015412a320e49aab4beaeb6262e93fdc0a42f2 Author: Hans de Goede Date: Fri Apr 14 20:32:56 2017 +0200 power: supply: max17042_battery: Add support for the CHARGE_FULL_DESIGN property The info is there, lets export it as a property. Signed-off-by: Hans de Goede Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d7d15fc67791c0e255f36345d02441c1716c2a1f Author: Hans de Goede Date: Fri Apr 14 20:32:55 2017 +0200 power: supply: max17042_battery: mAh readings depend on r_sns value The PROP_CHARGE_FULL code was hardcoded for the default sense resistor of 0.010 Ohm, make it use r_sns which contains the actual sense resistor value in micro-Ohms instead. Signed-off-by: Hans de Goede Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7bfc9397ff9690fbb0da44e1a0aeab953cb73b77 Author: Hans de Goede Date: Fri Apr 14 20:32:54 2017 +0200 power: supply: max17042_battery: Add support for the VOLT_MIN property The info is there, so lets export it, like we already do for VOLT_MAX. Signed-off-by: Hans de Goede Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ef7fcdaebfce56bd7f1ac3b916b5d587a3666f10 Author: Hans de Goede Date: Fri Apr 14 20:32:53 2017 +0200 power: supply: max17042_battery: Add support for the TECHNOLOGY attribute The max17042 is intended for Li-Ion or Li-Po batteries, add a TECHNOLOGY attribute to reflect this. Note this is hardcoded to Li-Ion as there is no way to tell the difference, and Lithium-Ion Polymer batteries are a sub-family of Lithium-Ion so Li-Ion technically is correct for both. Using Li-Ion for both is already done by many drivers and is much better then not providing any technology info at all. Suggested-by: Wolfgang Wiedmeyer Signed-off-by: Hans de Goede Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 4 ++++ 1 file changed, 4 insertions(+) commit dcdddda8fdd23048f2eaf54a18a33e9f225d8fb6 Author: Hans de Goede Date: Fri Apr 14 20:32:52 2017 +0200 power: supply: max17042_battery: Add external_power_changed callback If our supplier changes status, chances are we've changed status too, let any listeners know about this. Signed-off-by: Hans de Goede Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a9df22c00d7c2c9c2944c62f1b819de6c214660f Author: Hans de Goede Date: Fri Apr 14 20:32:51 2017 +0200 power: supply: max17042_battery: Add support for the STATUS property Userspace prefers the driver having a status property over having to guess itself. Specifically this will properly make the GNOME3 UI (and likely others) properly show discharging / charging / full status, instead of always showing discharging as status. Note that in the case there is no charger driver supplying the max17042, then a status of unknown will get returned. At least upower treats this the same as not having a status attribute, so in this case nothing changes from a userspace pov. Signed-off-by: Hans de Goede Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 46 +++++++++++++++++++++++++++++++++ include/linux/power/max17042_battery.h | 3 +++ 2 files changed, 49 insertions(+) commit 917362135b8a5c0680acf08807e9fc6179eb6c79 Author: Hans de Goede Date: Fri Apr 14 20:32:49 2017 +0200 power: supply: max17042_battery: Add default platform_data fallback data Some x86 machines use a max17047 fuel-gauge and x86 might be missing platform_data if not provided by SFI. This commit adds default platform_data as fallback option so that the driver can work on boards where no platform_data is provided. Since not all boards have a thermistor hooked up, set temp_min to 0 and change the health checks from temp <= temp_min to temp < temp_min to not trigger on such boards (where temp reads 0). Signed-off-by: Hans de Goede Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 60 +++++++++++++++++++++++++++++---- include/linux/power/max17042_battery.h | 6 +++- 2 files changed, 58 insertions(+), 8 deletions(-) commit 2814913c3136b41084a896c90062bd9b87672dff Author: Hans de Goede Date: Fri Apr 14 20:32:48 2017 +0200 power: supply: max17047_battery: The temp alert values are 8-bit 2's complement The temp alert values are 8-bit 2's complement, so sign-extend them before reporting them back to the caller. Signed-off-by: Hans de Goede Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c67c06939ee4a24fcad1235dd9632153533fdd4d Author: Hans de Goede Date: Fri Apr 14 20:32:47 2017 +0200 power: supply: max17042_battery: Use sign_extend32 instead of DIY code Use sign_extend32 to sign-extend variables where necessary instead of DIY code. Signed-off-by: Hans de Goede Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) commit 7f232af35620fe68746cb3da582062de965b286c Author: Colin Ian King Date: Sat Apr 29 22:56:49 2017 +0100 power: supply: ab8500_charger: spelling: "prechage" -> "precharge" trivial fix to spelling mistake in dev_error message. Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel drivers/power/supply/ab8500_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbfb8e1dcea0508f203535a92faea7a3ddf24558 Author: Stefan Roese Date: Thu Apr 27 14:21:41 2017 +0200 dmaengine: dmatest: Add check for supported buffer count (sg_buffers) When using dmatest with sg_buffers=128 I stumbled upon the problem, that the "map_cnt" variable of "struct dmaengine_unmap_data" was set to 0. "map_cnt" is an "u8" variable, resulting in an overrun when its value is set to src_cnt + dst_cnt, to twice the sg_buffer value. This patch adds a small check to dmatest, so that this confusing error is detected and the test is aborted. Signed-off-by: Stefan Roese Cc: Kedareswara rao Appana Cc: Vinod Koul Signed-off-by: Vinod Koul drivers/dma/dmatest.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 58532e66261e8cee52ac0abbe33c502b6e76f380 Author: Stefan Roese Date: Thu Apr 27 14:21:40 2017 +0200 dmaengine: dmatest: Select DMA_ENGINE_RAID as its needed for the slave_sg test To enable usage of multiple SG buffers via the sg_buffers= module parameter, lets select DMA_ENGINE_RAID via Kconfig when DMATEST is configured. Otherwise the dmatest will "BUG" when more than 1 buffer (total of 2 for src + dst) is configured via sg_buffers. Signed-off-by: Stefan Roese Cc: Kedareswara rao Appana Cc: Vinod Koul Signed-off-by: Vinod Koul drivers/dma/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 6254a6a94489c4be717f757bec7d3a372cba1b6e Author: Arnd Bergmann Date: Thu Apr 27 21:11:48 2017 +0200 power: supply: axp20x_usb_power: add IIO dependency When CONFIG_IIO=m and the axp20x_usb_power driver is built-in, we get a link time error: drivers/power/built-in.o: In function `axp20x_usb_power_get_property': undefined reference to `iio_read_channel_processed' drivers/power/built-in.o: In function `axp20x_usb_power_probe': undefined reference to `devm_iio_channel_get' undefined reference to `devm_iio_channel_get' This adds the same dependency that we already have for the AC power driver to the USB power driver. For consistency, I'm also moving the two closer together in the Kconfig file. Fixes: 33863c938caa ("power: supply: axp20x_usb_power: use IIO channels when available") Signed-off-by: Arnd Bergmann Signed-off-by: Sebastian Reichel drivers/power/supply/Kconfig | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 8b20839988f1ed5e534b270f3776709b640dc7e0 Author: Pan Bian Date: Mon Apr 24 16:22:08 2017 +0800 power: supply: isp1704: Fix unchecked return value of devm_kzalloc Function devm_kzalloc() will return a NULL pointer. However, in function isp1704_charger_probe(), the return value of devm_kzalloc() is directly used without validation. This may result in a bad memory access bug. Fixes: 34a109610e2a ("isp1704_charger: Add DT support") Signed-off-by: Pan Bian Reviewed-by: Pali Rohár Signed-off-by: Sebastian Reichel drivers/power/supply/isp1704_charger.c | 4 ++++ 1 file changed, 4 insertions(+) commit 756e142a4b3b25aac44eaa54ded125fce0e8fcc7 Author: Rahul Bedarkar Date: Fri Apr 21 16:37:57 2017 +0530 power: supply: generic-adc-battery: use SIMPLE_DEV_PM_OPS helper macro Replace ifdefs with SIMPLE_DEV_PM_OPS helper macro. Signed-off-by: Rahul Bedarkar Signed-off-by: Sebastian Reichel drivers/power/supply/generic-adc-battery.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit bb8fe8ea0067083e0452d5c67a4ab70ad72cc52f Author: Ryosuke Saito Date: Fri Apr 21 12:13:17 2017 +0900 power: supply: sbs-battery: fix the sbs interrupt request Since we use the default primary handler for the irq, IRQF_ONESHOT must be set. Otherwise the request fails and the following errors are displayed: genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq 129 sbs-battery 0-000b: Failed to request irq: -22 Signed-off-by: Ryosuke Saito Signed-off-by: Sebastian Reichel drivers/power/supply/sbs-battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46c202b5f25fb6fbd4af60ded133fa745b3601b3 Author: Quentin Schulz Date: Tue Apr 18 09:34:17 2017 +0200 power: supply: add battery driver for AXP20X and AXP22X PMICs The X-Powers AXP20X and AXP22X PMICs can have a battery as power supply. This patch adds the battery power supply driver to get various data from the PMIC, such as the battery status (charging, discharging, full, dead), current max limit, current current, battery capacity (in percentage), voltage max and min limits, current voltage and battery capacity (in Ah). This battery driver uses the AXP20X/AXP22X ADC driver as PMIC data provider. Signed-off-by: Quentin Schulz Acked-by: Jonathan Cameron Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai Signed-off-by: Sebastian Reichel drivers/power/supply/Kconfig | 12 + drivers/power/supply/Makefile | 1 + drivers/power/supply/axp20x_battery.c | 502 ++++++++++++++++++++++++++++++++++ 3 files changed, 515 insertions(+) commit 7221675c70d147f2ae6f044697dff046f3805224 Author: Quentin Schulz Date: Tue Apr 18 09:34:16 2017 +0200 dt-bindings: power: supply: add AXP20X/AXP22X battery DT binding The X-Powers AXP20X and AXP22X PMICs can have a battery as power supply. This patch adds the DT binding documentation for the battery power supply which gets various data from the PMIC, such as the battery status (charging, discharging, full, dead), current max limit, current current, battery capacity (in percentage), voltage max and min limits, current voltage and battery capacity (in Ah). Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard Acked-by: Rob Herring Acked-by: Chen-Yu Tsai Signed-off-by: Sebastian Reichel .../bindings/power/supply/axp20x_battery.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 1eb2869b3c90f4e7971515ddbe92f9e0d18827f5 Author: Liam Breck Date: Sun Apr 16 16:06:26 2017 -0700 power: supply: bq24190_charger: Deprecate battery class and replicate its features in charger The driver was registering two classes, bq24190-battery & -charger. Because the power supply framework cannot surface features from multiple drivers in a single class, a fuel gauge driver would create a third class, which some power management utilities cannot see. Deprecate the -battery class for future removal and replicate its features in -charger. Set /sys/class...-charger/online = pg_stat && !batfet_disable. If device_property "omit-battery-class" is set, don't register -battery. Cc: Tony Lindgren Cc: Hans de Goede Signed-off-by: Liam Breck Reviewed-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 146 +++++++++++++++++++++++++-------- 1 file changed, 111 insertions(+), 35 deletions(-) commit 2848e039c562a5278cd2ebc5b005c0f1a381b34e Author: Hans de Goede Date: Sun Apr 16 17:30:31 2017 +0200 power: supply: Make power_supply_am_i_supplied return -ENODEV if there are no suppliers It is sensible to assume that the hardware actually always has a way of charging the battery so when power_supply_am_i_supplied does not find any suppliers, that does not mean that there are none, but simply that no power_supply-drivers are registered / bound for any suppliers for the supply calling power_supply_am_i_supplied. At which point a fuel-gauge driver calling power_supply_am_i_supplied() cannot determine whether the battery is being charged or not. Allow a caller of power_supply_am_i_supplied to differentiate between there not being any suppliers, vs no suppliers being online by returning -ENODEV if there are no suppliers matching supplied_to / supplied_from, which allows fuel-gauge drivers to return POWER_SUPPLY_STATUS_UNKNOWN rather then POWER_SUPPLY_STATUS_DISCHARGING if there are no suppliers. Signed-off-by: Hans de Goede Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel drivers/power/supply/power_supply_core.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 8eeef2350453aa012d846457eb6ecd012a35d99b Author: Liping Zhang Date: Sat Apr 29 21:59:49 2017 +0800 netfilter: nf_ct_ext: invoke destroy even when ext is not attached For NF_NAT_MANIP_SRC, we will insert the ct to the nat_bysource_table, then remove it from the nat_bysource_table via nat_extend->destroy. But now, the nat extension is attached on demand, so if the nat extension is not attached, we will not be notified when the ct is destroyed, i.e. we may fail to remove ct from the nat_bysource_table. So just keep it simple, even if the extension is not attached, we will still invoke the related ext->destroy. And this will also preserve the flexibility for the future extension. Fixes: 9a08ecfe74d7 ("netfilter: don't attach a nat extension by default") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_extend.h | 7 +------ net/netfilter/nf_conntrack_extend.c | 8 ++------ 2 files changed, 3 insertions(+), 12 deletions(-) commit d1908ca8dcb1a045cf0626be4513a28933f46d5e Merge: 0e72f55 fb90e8d Author: Pablo Neira Ayuso Date: Mon May 1 11:45:47 2017 +0200 Merge tag 'ipvs3-for-v4.12' of http://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next Simon Horman says: ==================== Third Round of IPVS Updates for v4.12 please consider these enhancements to IPVS for v4.12. If it is too late for v4.12 then please consider them for v4.13. * Remove unused function * Correct comparison of unsigned value ==================== Signed-off-by: Pablo Neira Ayuso commit 0e72f55f3510e722e725c54678800e99853faa3b Author: Florian Westphal Date: Thu Apr 27 16:39:43 2017 +0200 netfilter: snmp: avoid stack size warning net/ipv4/netfilter/nf_nat_snmp_basic.c:1158:1: warning: the frame size of 1160 bytes is larger than 1024 bytes Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nf_nat_snmp_basic.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 19a2ee69c20255157738402b6fdbcf5d708dad80 Author: H. Nikolaus Schaller Date: Fri Apr 14 21:29:38 2017 +0200 power: supply: twl4030-charger: don't check if battery is present We can't assume that the battery is or stays present after probing on devices with replaceable battery. On some devices (e.g. GTA04 or OpenPanodra) it can be removed and even be hot swapped by the user while device continues to operate through external AC or USB power (as long as system power consumption remains below ca. 500mA as provided by USB). Under certain conditions it is possible to boot without battery. So it makes no sense to check for this situation during probe and make the charger driver (and its status reports) completely non-operational if the battery can be inserted later. Tested on: GTA04 and OpenPandora. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Sebastian Reichel drivers/power/supply/twl4030_charger.c | 36 ---------------------------------- 1 file changed, 36 deletions(-) commit 3fb319c2cdcd10f775f4d4a05a7d12fa1a5679c1 Author: H. Nikolaus Schaller Date: Fri Apr 14 20:25:56 2017 +0200 power: supply: twl4030-charger: add writable INPUT_CURRENT_LIMIT property Currently, the twl4030 charger defines its own max_current by directly creating sysfs nodes. It should use the input_current_limit property which is e.g. used by the bq24257 driver. This patch adds the input_current_property with the same semantics as the max_current property. The code to manage the max_current property is removed by a separate patch. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Sebastian Reichel drivers/power/supply/twl4030_charger.c | 59 ++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 6cf62a3b97e78ba41d31390e59a1ddc98a9e3622 Author: Hans de Goede Date: Fri Apr 14 18:52:33 2017 +0200 power: supply: bq24190_charger: Add disable-reset device-property Allow platform-code to disable the reset on probe and suspend/resume by setting a "disable-reset" boolean device property on the device. There are several reasons why the platform-code may want to disable the reset on probe and suspend/resume: 1) Resetting the charger should never be necessary it should always have sane values programmed. If it is running with invalid values while we are not running (system turned off or suspended) there is a big problem as that may lead to overcharging the battery. 2) The reset in suspend() is meant to put the charger back into default mode, but this is not necessary and not a good idea. If the charger has been programmed with a higher max charge_current / charge_voltage then putting it back in default-mode will reset those to the safe power-on defaults, leading to slower charging, or charging to a lower voltage (and thus not using the full capacity) while suspended which is undesirable. Reprogramming the max charge_current / charge_voltage after the reset will not help here as that will put the charger back in host mode and start the i2c watchdog if the host then does not do anything for 40s (iow if we're suspended for more then 40s) the watchdog expires resetting the device to default-mode, including resetting all the registers to there safe power-on defaults. So the only way to keep using custom charge settings while suspending is to keep the charger in its normal running state with the i2c watchdog disabled. This is fine as the charger will still automatically switch from constant current to constant voltage and stop charging when the battery is full. 3) Besides never being necessary resetting the charger also causes problems on systems where the charge voltage limit is set higher then the reset value, if this is the case and the charger is reset while charging and the battery voltage is between the 2 voltages, then about half the time the charger gets confused and claims to be charging (REG08 contains 0x64) but in reality the charger has decoupled itself from VBUS (Q1 off) and is drawing 0A from VBUS, leaving the system running from the battery. This last problem is happening on a GPD-win mini PC with a bq24292i charger chip combined with a max17047 fuel-gauge and a LiHV battery. I've checked and TI does not list any errata for the bq24292i which could explain this (there are no errata at all). Cc: Liam Breck Cc: Tony Lindgren Signed-off-by: Hans de Goede Acked-by: Liam Breck Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 3 +++ 1 file changed, 3 insertions(+) commit 039b40ee5854dc733cf786fee4a88e240a012115 Author: Florian Westphal Date: Mon Apr 24 15:37:41 2017 +0200 netfilter: nf_queue: only call synchronize_net twice if nf_queue is active nf_unregister_net_hook(s) can avoid a second call to synchronize_net, provided there is no nfqueue active in that net namespace (which is the common case). This also gets rid of the extra arg to nf_queue_nf_hook_drop(), normally this gets called during netns cleanup so no packets should be queued. For the rare case of base chain being unregistered or module removal while nfqueue is in use the extra hiccup due to the packet drops isn't a big deal. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_queue.h | 3 +-- net/netfilter/core.c | 21 ++++++++++++--------- net/netfilter/nf_internals.h | 2 +- net/netfilter/nf_queue.c | 7 +++++-- net/netfilter/nfnetlink_queue.c | 18 ++++++++---------- 5 files changed, 27 insertions(+), 24 deletions(-) commit c83fa19603bdaeef17b815713dbbe3230c8a34ee Author: Florian Westphal Date: Tue Apr 25 10:24:03 2017 +0200 netfilter: nf_log: don't call synchronize_rcu in nf_log_unset nf_log_unregister() (which is what gets called in the logger backends module exit paths) does a (required, module is removed) synchronize_rcu(). But nf_log_unset() is only called from pernet exit handlers. It doesn't free any memory so there appears to be no need to call synchronize_rcu. v2: Liping Zhang points out that nf_log_unregister() needs to be called after pernet unregister, else rmmod would become unsafe. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_log.c | 1 - net/netfilter/nfnetlink_log.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 933bd83ed60e80ebb1aeb64a2f7cd3190d2312e2 Author: Florian Westphal Date: Mon Apr 24 15:37:39 2017 +0200 netfilter: batch synchronize_net calls during hook unregister synchronize_net is expensive and slows down netns cleanup a lot. We have two APIs to unregister a hook: nf_unregister_net_hook (which calls synchronize_net()) and nf_unregister_net_hooks (calls nf_unregister_net_hook in a loop) Make nf_unregister_net_hook a wapper around new helper __nf_unregister_net_hook, which unlinks the hook but does not free it. Then, we can call that helper in nf_unregister_net_hooks and then call synchronize_net() only once. Andrey Konovalov reports this change improves syzkaller fuzzing speed at least twice. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/core.c | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) commit 084a275e4c9477c432b05e872c3a297eab41638a Author: Nicholas Piggin Date: Wed Oct 19 14:16:00 2016 +1100 powerpc/64: Allow CONFIG_RELOCATABLE if COMPILE_TEST This was a hack we added to work around the allmodconfig build breaking, see commit fb43e8477ed9 ("powerpc: Disable RELOCATABLE for COMPILE_TEST with PPC64"). Since we merged the thin archives support in commit 43c9127d94d6 ("powerpc: Add option to use thin archives") this hasn't been necessary, so remove it. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8915bcd68b2547c819b8a2a33c098121af9accb2 Author: Michael Neuling Date: Thu Mar 16 14:04:40 2017 +1100 powerpc/xmon: Teach xmon oops about radix vectors Currently if we take an oops caused by an 0x380 or 0x480 exception, we get a print which assumes SLB problems. With radix, these vectors have different meanings. This patch updates the oops message to reflect these different meanings. Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 01e7bc241d4cf8176cfc77ccd13988dc6f0414c4 Author: Hans-Christian Noren Egtvedt Date: Sun Apr 9 10:51:58 2017 +0200 mm: remove AVR32 arch special handling in mm/Kconfig AVR32 architecture has been removed from the Linux kernel sources, hence clean up the special handling setting two quicklists by default in mm/Kconfig. Signed-off-by: Hans-Christian Noren Egtvedt mm/Kconfig | 1 - 1 file changed, 1 deletion(-) commit cddbfbd448344dbfa0581307b0c4705e940b0743 Author: Hans-Christian Noren Egtvedt Date: Mon May 1 09:33:20 2017 +0200 lib: remove check for AVR32 arch in test_user_copy The AVR32 architecture support has been removed from the Linux kernel, hence remove all the check for this architecture in test_user_copy.c. Signed-off-by: Hans-Christian Noren Egtvedt lib/test_user_copy.c | 1 - 1 file changed, 1 deletion(-) commit 695c1208e0e497d4f0a0ef7a4bac0bd1e3de0f74 Author: Hans-Christian Noren Egtvedt Date: Sun Apr 9 10:45:27 2017 +0200 lib: remove AVR32 entry in Kconfig.debug compile with frame pointers AVR32 architecture has been removed from the Linux kernel sources, hence clean up the architecture related symbols in lib/Kconfig.debug. Signed-off-by: Hans-Christian Noren Egtvedt lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e06d1f8727ed615888937fcce23a31b40959708 Author: Hans-Christian Noren Egtvedt Date: Sun Feb 26 13:19:06 2017 +0100 scripts: remove AVR32 support from checkstack.pl The AVR32 architecture support has been removed from the kernel, hence remove the related bits from checkstack.pl script. Signed-off-by: Hans-Christian Noren Egtvedt Signed-off-by: Håvard Skinnemoen Signed-off-by: Nicolas Ferre Acked-by: Andy Shevchenko Acked-by: Boris Brezillon scripts/checkstack.pl | 5 ----- 1 file changed, 5 deletions(-) commit c0c74acbb60bdcba480777f1eb41d07461773312 Author: Hans-Christian Noren Egtvedt Date: Sun Feb 26 13:17:39 2017 +0100 docs: remove all references to AVR32 architecture The AVR32 architecture support has been removed from the Linux kernel, hence remove all references to it from Documentation. Signed-off-by: Hans-Christian Noren Egtvedt Signed-off-by: Håvard Skinnemoen Signed-off-by: Nicolas Ferre Acked-by: Andy Shevchenko Acked-by: Boris Brezillon Documentation/admin-guide/README.rst | 2 +- Documentation/admin-guide/kernel-parameters.rst | 1 - Documentation/admin-guide/kernel-parameters.txt | 3 +-- Documentation/features/core/BPF-JIT/arch-support.txt | 1 - Documentation/features/core/generic-idle-thread/arch-support.txt | 1 - Documentation/features/core/jump-labels/arch-support.txt | 1 - Documentation/features/core/tracehook/arch-support.txt | 1 - Documentation/features/debug/KASAN/arch-support.txt | 1 - Documentation/features/debug/gcov-profile-all/arch-support.txt | 1 - Documentation/features/debug/kgdb/arch-support.txt | 1 - Documentation/features/debug/kprobes-on-ftrace/arch-support.txt | 1 - Documentation/features/debug/kprobes/arch-support.txt | 1 - Documentation/features/debug/kretprobes/arch-support.txt | 1 - Documentation/features/debug/optprobes/arch-support.txt | 1 - Documentation/features/debug/stackprotector/arch-support.txt | 1 - Documentation/features/debug/uprobes/arch-support.txt | 1 - Documentation/features/debug/user-ret-profiler/arch-support.txt | 1 - Documentation/features/io/dma-api-debug/arch-support.txt | 1 - Documentation/features/io/dma-contiguous/arch-support.txt | 1 - Documentation/features/io/sg-chain/arch-support.txt | 1 - Documentation/features/lib/strncasecmp/arch-support.txt | 1 - Documentation/features/locking/cmpxchg-local/arch-support.txt | 1 - Documentation/features/locking/lockdep/arch-support.txt | 1 - Documentation/features/locking/queued-rwlocks/arch-support.txt | 1 - Documentation/features/locking/queued-spinlocks/arch-support.txt | 1 - Documentation/features/locking/rwsem-optimized/arch-support.txt | 1 - Documentation/features/perf/kprobes-event/arch-support.txt | 1 - Documentation/features/perf/perf-regs/arch-support.txt | 1 - Documentation/features/perf/perf-stackdump/arch-support.txt | 1 - Documentation/features/sched/numa-balancing/arch-support.txt | 1 - Documentation/features/seccomp/seccomp-filter/arch-support.txt | 1 - Documentation/features/time/arch-tick-broadcast/arch-support.txt | 1 - Documentation/features/time/clockevents/arch-support.txt | 1 - Documentation/features/time/context-tracking/arch-support.txt | 1 - Documentation/features/time/irq-time-acct/arch-support.txt | 1 - Documentation/features/time/modern-timekeeping/arch-support.txt | 1 - Documentation/features/time/virt-cpuacct/arch-support.txt | 1 - Documentation/features/vm/ELF-ASLR/arch-support.txt | 1 - Documentation/features/vm/PG_uncached/arch-support.txt | 1 - Documentation/features/vm/THP/arch-support.txt | 1 - Documentation/features/vm/TLB/arch-support.txt | 1 - Documentation/features/vm/huge-vmap/arch-support.txt | 1 - Documentation/features/vm/ioremap_prot/arch-support.txt | 1 - Documentation/features/vm/numa-memblock/arch-support.txt | 1 - Documentation/features/vm/pte_special/arch-support.txt | 1 - Documentation/media/v4l-drivers/soc-camera.rst | 2 +- 46 files changed, 3 insertions(+), 47 deletions(-) commit 26202873bb51fafdaa51be3e8de7aab9beb49f70 Author: Hans-Christian Noren Egtvedt Date: Sun Feb 26 12:56:39 2017 +0100 avr32: remove support for AVR32 architecture This patch drops support for AVR32 architecture from the Linux kernel. The AVR32 architecture is not keeping up with the development of the kernel, and since it shares so much of the drivers with Atmel ARM SoC, it is starting to hinder these drivers to develop swiftly. Also, all AVR32 AP7 SoC processors are end of lifed from Atmel (now Microchip). Finally, the GCC toolchain is stuck at version 4.2.x, and has not received any patches since the last release from Atmel; 4.2.4-atmel.1.1.3.avr32linux.1. When building kernel v4.10, this toolchain is no longer able to properly link the network stack. Haavard and I have came to the conclusion that we feel keeping AVR32 on life support offers more obstacles for Atmel ARMs, than it gives joy to AVR32 users. I also suspect there are very few AVR32 users left today, if anybody at all. Signed-off-by: Hans-Christian Noren Egtvedt Signed-off-by: Håvard Skinnemoen Signed-off-by: Nicolas Ferre Acked-by: Andy Shevchenko Acked-by: Boris Brezillon CREDITS | 8 + MAINTAINERS | 15 - arch/avr32/Kconfig | 288 --- arch/avr32/Kconfig.debug | 9 - arch/avr32/Makefile | 84 - arch/avr32/boards/atngw100/Kconfig | 65 - arch/avr32/boards/atngw100/Kconfig_mrmt | 80 - arch/avr32/boards/atngw100/Makefile | 3 - arch/avr32/boards/atngw100/evklcd10x.c | 178 -- arch/avr32/boards/atngw100/flash.c | 98 - arch/avr32/boards/atngw100/mrmt.c | 382 ---- arch/avr32/boards/atngw100/setup.c | 324 --- arch/avr32/boards/atstk1000/Kconfig | 109 - arch/avr32/boards/atstk1000/Makefile | 5 - arch/avr32/boards/atstk1000/atstk1000.h | 17 - arch/avr32/boards/atstk1000/atstk1002.c | 330 --- arch/avr32/boards/atstk1000/atstk1003.c | 162 -- arch/avr32/boards/atstk1000/atstk1004.c | 164 -- arch/avr32/boards/atstk1000/flash.c | 98 - arch/avr32/boards/atstk1000/setup.c | 127 -- arch/avr32/boards/favr-32/Kconfig | 22 - arch/avr32/boards/favr-32/Makefile | 1 - arch/avr32/boards/favr-32/flash.c | 98 - arch/avr32/boards/favr-32/setup.c | 366 --- arch/avr32/boards/hammerhead/Kconfig | 43 - arch/avr32/boards/hammerhead/Makefile | 1 - arch/avr32/boards/hammerhead/flash.c | 381 ---- arch/avr32/boards/hammerhead/flash.h | 6 - arch/avr32/boards/hammerhead/setup.c | 247 -- arch/avr32/boards/merisc/Kconfig | 5 - arch/avr32/boards/merisc/Makefile | 1 - arch/avr32/boards/merisc/display.c | 65 - arch/avr32/boards/merisc/flash.c | 139 -- arch/avr32/boards/merisc/merisc.h | 18 - arch/avr32/boards/merisc/merisc_sysfs.c | 64 - arch/avr32/boards/merisc/setup.c | 305 --- arch/avr32/boards/mimc200/Makefile | 1 - arch/avr32/boards/mimc200/flash.c | 143 -- arch/avr32/boards/mimc200/setup.c | 236 -- arch/avr32/boot/images/.gitignore | 4 - arch/avr32/boot/images/Makefile | 57 - arch/avr32/boot/u-boot/Makefile | 3 - arch/avr32/boot/u-boot/empty.S | 1 - arch/avr32/boot/u-boot/head.S | 83 - arch/avr32/configs/atngw100_defconfig | 142 -- arch/avr32/configs/atngw100_evklcd100_defconfig | 158 -- arch/avr32/configs/atngw100_evklcd101_defconfig | 157 -- arch/avr32/configs/atngw100_mrmt_defconfig | 136 -- arch/avr32/configs/atngw100mkii_defconfig | 144 -- .../avr32/configs/atngw100mkii_evklcd100_defconfig | 161 -- .../avr32/configs/atngw100mkii_evklcd101_defconfig | 160 -- arch/avr32/configs/atstk1002_defconfig | 157 -- arch/avr32/configs/atstk1003_defconfig | 137 -- arch/avr32/configs/atstk1004_defconfig | 135 -- arch/avr32/configs/atstk1006_defconfig | 160 -- arch/avr32/configs/favr-32_defconfig | 143 -- arch/avr32/configs/hammerhead_defconfig | 145 -- arch/avr32/configs/merisc_defconfig | 115 - arch/avr32/configs/mimc200_defconfig | 114 - arch/avr32/include/asm/Kbuild | 23 - arch/avr32/include/asm/addrspace.h | 43 - arch/avr32/include/asm/asm-offsets.h | 1 - arch/avr32/include/asm/asm.h | 102 - arch/avr32/include/asm/atomic.h | 243 -- arch/avr32/include/asm/barrier.h | 22 - arch/avr32/include/asm/bitops.h | 314 --- arch/avr32/include/asm/bug.h | 78 - arch/avr32/include/asm/bugs.h | 15 - arch/avr32/include/asm/cache.h | 38 - arch/avr32/include/asm/cacheflush.h | 132 -- arch/avr32/include/asm/checksum.h | 150 -- arch/avr32/include/asm/cmpxchg.h | 115 - arch/avr32/include/asm/current.h | 15 - arch/avr32/include/asm/dma-mapping.h | 14 - arch/avr32/include/asm/dma.h | 8 - arch/avr32/include/asm/elf.h | 105 - arch/avr32/include/asm/fb.h | 21 - arch/avr32/include/asm/ftrace.h | 1 - arch/avr32/include/asm/gpio.h | 6 - arch/avr32/include/asm/hardirq.h | 6 - arch/avr32/include/asm/hw_irq.h | 9 - arch/avr32/include/asm/io.h | 329 --- arch/avr32/include/asm/irq.h | 24 - arch/avr32/include/asm/irqflags.h | 61 - arch/avr32/include/asm/kdebug.h | 12 - arch/avr32/include/asm/kmap_types.h | 10 - arch/avr32/include/asm/kprobes.h | 54 - arch/avr32/include/asm/linkage.h | 7 - arch/avr32/include/asm/mmu.h | 10 - arch/avr32/include/asm/mmu_context.h | 150 -- arch/avr32/include/asm/module.h | 26 - arch/avr32/include/asm/ocd.h | 543 ----- arch/avr32/include/asm/page.h | 104 - arch/avr32/include/asm/pci.h | 8 - arch/avr32/include/asm/pgalloc.h | 102 - arch/avr32/include/asm/pgtable-2level.h | 48 - arch/avr32/include/asm/pgtable.h | 347 --- arch/avr32/include/asm/processor.h | 166 -- arch/avr32/include/asm/ptrace.h | 45 - arch/avr32/include/asm/serial.h | 13 - arch/avr32/include/asm/setup.h | 144 -- arch/avr32/include/asm/shmparam.h | 6 - arch/avr32/include/asm/signal.h | 31 - arch/avr32/include/asm/string.h | 17 - arch/avr32/include/asm/switch_to.h | 49 - arch/avr32/include/asm/syscalls.h | 21 - arch/avr32/include/asm/sysreg.h | 291 --- arch/avr32/include/asm/termios.h | 23 - arch/avr32/include/asm/thread_info.h | 103 - arch/avr32/include/asm/timex.h | 39 - arch/avr32/include/asm/tlb.h | 32 - arch/avr32/include/asm/tlbflush.h | 32 - arch/avr32/include/asm/traps.h | 23 - arch/avr32/include/asm/types.h | 19 - arch/avr32/include/asm/uaccess.h | 337 --- arch/avr32/include/asm/ucontext.h | 12 - arch/avr32/include/asm/unaligned.h | 21 - arch/avr32/include/asm/unistd.h | 44 - arch/avr32/include/asm/user.h | 65 - arch/avr32/include/uapi/asm/Kbuild | 36 - arch/avr32/include/uapi/asm/auxvec.h | 4 - arch/avr32/include/uapi/asm/byteorder.h | 9 - arch/avr32/include/uapi/asm/cachectl.h | 11 - arch/avr32/include/uapi/asm/msgbuf.h | 31 - arch/avr32/include/uapi/asm/posix_types.h | 37 - arch/avr32/include/uapi/asm/ptrace.h | 126 -- arch/avr32/include/uapi/asm/sembuf.h | 25 - arch/avr32/include/uapi/asm/setup.h | 16 - arch/avr32/include/uapi/asm/shmbuf.h | 42 - arch/avr32/include/uapi/asm/sigcontext.h | 34 - arch/avr32/include/uapi/asm/signal.h | 121 - arch/avr32/include/uapi/asm/socket.h | 95 - arch/avr32/include/uapi/asm/sockios.h | 13 - arch/avr32/include/uapi/asm/stat.h | 79 - arch/avr32/include/uapi/asm/swab.h | 35 - arch/avr32/include/uapi/asm/termbits.h | 196 -- arch/avr32/include/uapi/asm/termios.h | 49 - arch/avr32/include/uapi/asm/types.h | 13 - arch/avr32/include/uapi/asm/unistd.h | 347 --- arch/avr32/kernel/.gitignore | 1 - arch/avr32/kernel/Makefile | 15 - arch/avr32/kernel/asm-offsets.c | 24 - arch/avr32/kernel/avr32_ksyms.c | 70 - arch/avr32/kernel/cpu.c | 410 ---- arch/avr32/kernel/entry-avr32b.S | 877 -------- arch/avr32/kernel/head.S | 22 - arch/avr32/kernel/irq.c | 28 - arch/avr32/kernel/kprobes.c | 267 --- arch/avr32/kernel/module.c | 291 --- arch/avr32/kernel/nmi_debug.c | 83 - arch/avr32/kernel/ocd.c | 167 -- arch/avr32/kernel/process.c | 358 --- arch/avr32/kernel/ptrace.c | 357 --- arch/avr32/kernel/setup.c | 609 ----- arch/avr32/kernel/signal.c | 288 --- arch/avr32/kernel/stacktrace.c | 56 - arch/avr32/kernel/switch_to.S | 35 - arch/avr32/kernel/syscall-stubs.S | 153 -- arch/avr32/kernel/syscall_table.S | 347 --- arch/avr32/kernel/time.c | 161 -- arch/avr32/kernel/traps.c | 262 --- arch/avr32/kernel/vmlinux.lds.S | 89 - arch/avr32/lib/Makefile | 11 - arch/avr32/lib/__avr32_asr64.S | 31 - arch/avr32/lib/__avr32_lsl64.S | 31 - arch/avr32/lib/__avr32_lsr64.S | 31 - arch/avr32/lib/clear_user.S | 76 - arch/avr32/lib/copy_user.S | 119 - arch/avr32/lib/csum_partial.S | 47 - arch/avr32/lib/csum_partial_copy_generic.S | 99 - arch/avr32/lib/delay.c | 57 - arch/avr32/lib/findbit.S | 185 -- arch/avr32/lib/io-readsb.S | 49 - arch/avr32/lib/io-readsl.S | 24 - arch/avr32/lib/io-readsw.S | 43 - arch/avr32/lib/io-writesb.S | 52 - arch/avr32/lib/io-writesl.S | 20 - arch/avr32/lib/io-writesw.S | 38 - arch/avr32/lib/memcpy.S | 72 - arch/avr32/lib/memset.S | 72 - arch/avr32/lib/strncpy_from_user.S | 60 - arch/avr32/lib/strnlen_user.S | 67 - arch/avr32/mach-at32ap/Kconfig | 31 - arch/avr32/mach-at32ap/Makefile | 8 - arch/avr32/mach-at32ap/at32ap700x.c | 2368 -------------------- arch/avr32/mach-at32ap/clock.c | 334 --- arch/avr32/mach-at32ap/clock.h | 35 - arch/avr32/mach-at32ap/extint.c | 271 --- arch/avr32/mach-at32ap/hmatrix.c | 88 - arch/avr32/mach-at32ap/hsmc.c | 282 --- arch/avr32/mach-at32ap/hsmc.h | 127 -- arch/avr32/mach-at32ap/include/mach/at32ap700x.h | 245 -- arch/avr32/mach-at32ap/include/mach/board.h | 115 - arch/avr32/mach-at32ap/include/mach/chip.h | 19 - arch/avr32/mach-at32ap/include/mach/cpu.h | 23 - arch/avr32/mach-at32ap/include/mach/gpio.h | 45 - arch/avr32/mach-at32ap/include/mach/hmatrix.h | 55 - arch/avr32/mach-at32ap/include/mach/init.h | 18 - arch/avr32/mach-at32ap/include/mach/io.h | 38 - arch/avr32/mach-at32ap/include/mach/irq.h | 14 - arch/avr32/mach-at32ap/include/mach/pm.h | 27 - arch/avr32/mach-at32ap/include/mach/portmux.h | 30 - arch/avr32/mach-at32ap/include/mach/smc.h | 113 - arch/avr32/mach-at32ap/include/mach/sram.h | 30 - arch/avr32/mach-at32ap/intc.c | 200 -- arch/avr32/mach-at32ap/intc.h | 329 --- arch/avr32/mach-at32ap/pdc.c | 47 - arch/avr32/mach-at32ap/pio.c | 470 ---- arch/avr32/mach-at32ap/pio.h | 180 -- arch/avr32/mach-at32ap/pm-at32ap700x.S | 167 -- arch/avr32/mach-at32ap/pm.c | 243 -- arch/avr32/mach-at32ap/pm.h | 112 - arch/avr32/mach-at32ap/sdramc.h | 76 - arch/avr32/mm/Makefile | 6 - arch/avr32/mm/cache.c | 163 -- arch/avr32/mm/clear_page.S | 25 - arch/avr32/mm/copy_page.S | 28 - arch/avr32/mm/dma-coherent.c | 202 -- arch/avr32/mm/fault.c | 268 --- arch/avr32/mm/init.c | 125 -- arch/avr32/mm/ioremap.c | 93 - arch/avr32/mm/tlb.c | 375 ---- arch/avr32/oprofile/Makefile | 8 - arch/avr32/oprofile/backtrace.c | 81 - arch/avr32/oprofile/op_model_avr32.c | 236 -- include/uapi/linux/elf-em.h | 1 - 226 files changed, 8 insertions(+), 27045 deletions(-) commit 71389703839ebe9cb426c72d5f0bd549592e583c Author: Dan Williams Date: Fri Apr 28 10:23:37 2017 -0700 mm, zone_device: Replace {get, put}_zone_device_page() with a single reference to fix pmem crash The x86 conversion to the generic GUP code included a small change which causes crashes and data corruption in the pmem code - not good. The root cause is that the /dev/pmem driver code implicitly relies on the x86 get_user_pages() implementation doing a get_page() on the page refcount, because get_page() does a get_zone_device_page() which properly refcounts pmem's separate page struct arrays that are not present in the regular page struct structures. (The pmem driver does this because it can cover huge memory areas.) But the x86 conversion to the generic GUP code changed the get_page() to page_cache_get_speculative() which is faster but doesn't do the get_zone_device_page() call the pmem code relies on. One way to solve the regression would be to change the generic GUP code to use get_page(), but that would slow things down a bit and punish other generic-GUP using architectures for an x86-ism they did not care about. (Arguably the pmem driver was probably not working reliably for them: but nvdimm is an Intel feature, so non-x86 exposure is probably still limited.) So restructure the pmem code's interface with the MM instead: get rid of the get/put_zone_device_page() distinction, integrate put_zone_device_page() into __put_page() and and restructure the pmem completion-wait and teardown machinery: Kirill points out that the calls to {get,put}_dev_pagemap() can be removed from the mm fast path if we take a single get_dev_pagemap() reference to signify that the page is alive and use the final put of the page to drop that reference. This does require some care to make sure that any waits for the percpu_ref to drop to zero occur *after* devm_memremap_page_release(), since it now maintains its own elevated reference. This speeds up things while also making the pmem refcounting more robust going forward. Suggested-by: Kirill Shutemov Tested-by: Kirill Shutemov Signed-off-by: Dan Williams Reviewed-by: Logan Gunthorpe Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Jérôme Glisse Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/149339998297.24933.1129582806028305912.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Ingo Molnar drivers/dax/pmem.c | 2 +- drivers/nvdimm/pmem.c | 13 +++++++++++-- include/linux/mm.h | 14 -------------- kernel/memremap.c | 22 +++++++++------------- mm/swap.c | 10 ++++++++++ 5 files changed, 31 insertions(+), 30 deletions(-) commit 733336262b28d383cf72eba2287f1132deea4f47 Author: Abhishek Shah Date: Sun Apr 30 11:04:21 2017 +0530 net: phy: Allow BCM5481x PHYs to setup internal TX/RX clock delay This patch allows users to enable/disable internal TX and/or RX clock delay for BCM5481x series PHYs so as to satisfy RGMII timing specifications. On a particular platform, whether TX and/or RX clock delay is required depends on how PHY connected to the MAC IP. This requirement can be specified through "phy-mode" property in the platform device tree. Signed-off-by: Abhishek Shah Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/broadcom.c | 69 ++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 36 deletions(-) commit d832565032280bae2cbff4fdb4d2c793de60d5be Author: Colin Ian King Date: Sat Apr 29 22:38:57 2017 +0100 net: sunhme: fix spelling mistakes: "ParityErro" -> "ParityError" trivial fix to spelling mistakes in printk message. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunhme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b70de6d0266888b3743f03802502e43131043c8 Author: Scott Wood Date: Fri Apr 28 19:17:41 2017 -0500 bnx2x: Align RX buffers The bnx2x driver is not providing proper alignment on the receive buffers it passes to build_skb(), causing skb_shared_info to be misaligned. skb_shared_info contains an atomic, and while PPC normally supports unaligned accesses, it does not support unaligned atomics. Aligning the size of rx buffers will ensure that page_frag_alloc() returns aligned addresses. This can be reproduced on PPC by setting the network MTU to 1450 (or other non-multiple-of-4) and then generating sufficient inbound network traffic (one or two large "wget"s usually does it), producing the following oops: Unable to handle kernel paging request for unaligned access at address 0xc00000ffc43af656 Faulting instruction address: 0xc00000000080ef8c Oops: Kernel access of bad area, sig: 7 [#1] SMP NR_CPUS=2048 NUMA PowerNV Modules linked in: vmx_crypto powernv_rng rng_core powernv_op_panel leds_powernv led_class nfsd ip_tables x_tables autofs4 xfs lpfc bnx2x mdio libcrc32c crc_t10dif crct10dif_generic crct10dif_common CPU: 104 PID: 0 Comm: swapper/104 Not tainted 4.11.0-rc8-00088-g4c761da #2 task: c00000ffd4892400 task.stack: c00000ffd4920000 NIP: c00000000080ef8c LR: c00000000080eee8 CTR: c0000000001f8320 REGS: c00000ffffc33710 TRAP: 0600 Not tainted (4.11.0-rc8-00088-g4c761da) MSR: 9000000000009033 CR: 24082042 XER: 00000000 CFAR: c00000000080eea0 DAR: c00000ffc43af656 DSISR: 00000000 SOFTE: 1 GPR00: c000000000907f64 c00000ffffc33990 c000000000dd3b00 c00000ffcaf22100 GPR04: c00000ffcaf22e00 0000000000000000 0000000000000000 0000000000000000 GPR08: 0000000000b80008 c00000ffc43af636 c00000ffc43af656 0000000000000000 GPR12: c0000000001f6f00 c00000000fe1a000 000000000000049f 000000000000c51f GPR16: 00000000ffffef33 0000000000000000 0000000000008a43 0000000000000001 GPR20: c00000ffc58a90c0 0000000000000000 000000000000dd86 0000000000000000 GPR24: c000007fd0ed10c0 00000000ffffffff 0000000000000158 000000000000014a GPR28: c00000ffc43af010 c00000ffc9144000 c00000ffcaf22e00 c00000ffcaf22100 NIP [c00000000080ef8c] __skb_clone+0xdc/0x140 LR [c00000000080eee8] __skb_clone+0x38/0x140 Call Trace: [c00000ffffc33990] [c00000000080fb74] skb_clone+0x74/0x110 (unreliable) [c00000ffffc339c0] [c000000000907f64] packet_rcv+0x144/0x510 [c00000ffffc33a40] [c000000000827b64] __netif_receive_skb_core+0x5b4/0xd80 [c00000ffffc33b00] [c00000000082b2bc] netif_receive_skb_internal+0x2c/0xc0 [c00000ffffc33b40] [c00000000082c49c] napi_gro_receive+0x11c/0x260 [c00000ffffc33b80] [d000000066483d68] bnx2x_poll+0xcf8/0x17b0 [bnx2x] [c00000ffffc33d00] [c00000000082babc] net_rx_action+0x31c/0x480 [c00000ffffc33e10] [c0000000000d5a44] __do_softirq+0x164/0x3d0 [c00000ffffc33f00] [c0000000000d60a8] irq_exit+0x108/0x120 [c00000ffffc33f20] [c000000000015b98] __do_irq+0x98/0x200 [c00000ffffc33f90] [c000000000027f14] call_do_irq+0x14/0x24 [c00000ffd4923a90] [c000000000015d94] do_IRQ+0x94/0x110 [c00000ffd4923ae0] [c000000000008d90] hardware_interrupt_common+0x150/0x160 Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 1 + 1 file changed, 1 insertion(+) commit 58073b32b0f716cbd894d503ab2408db9d48aed6 Author: Arkadi Sharshevsky Date: Fri Apr 28 22:39:07 2017 +0300 net: bridge: Fix improper taking over HW learned FDB Commit 7e26bf45e4cb ("net: bridge: allow SW learn to take over HW fdb entries") added the ability to "take over an entry which was previously learned via HW when it shows up from a SW port". However, if an entry was learned via HW and then a control packet (e.g., ARP request) was trapped to the CPU, the bridge driver will update the entry and remove the externally learned flag, although the entry is still present in HW. Instead, only clear the externally learned flag in case of roaming. Fixes: 7e26bf45e4cb ("net: bridge: allow SW learn to take over HW fdb entries") Signed-off-by: Ido Schimmel Signed-off-by: Arkadi Sharashevsky Cc: Nikolay Aleksandrov Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_fdb.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit ba3f571d5dde27fc4ae83aabe2c06ff08087af49 Author: WANG Cong Date: Fri Apr 28 10:04:29 2017 -0700 ipv4: get rid of ip_ra_lock After commit 1215e51edad1 ("ipv4: fix a deadlock in ip_ra_control") we always take RTNL lock for ip_ra_control() which is the only place we update the list ip_ra_chain, so the ip_ra_lock is no longer needed. As Eric points out, BH does not need to disable either, RCU readers don't care. Signed-off-by: Cong Wang Acked-by: Hannes Frederic Sowa Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ip_sockglue.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 5010e948420ea1cff85f6c2f64ec7a011aea3d07 Author: Jesper Dangaard Brouer Date: Fri Apr 28 16:25:04 2017 +0200 samples/bpf: bpf_load.c detect and abort if ELF maps section size is wrong The struct bpf_map_def was extended in commit fb30d4b71214 ("bpf: Add tests for map-in-map") with member unsigned int inner_map_idx. This changed the size of the maps section in the generated ELF _kern.o files. Unfortunately the loader in bpf_load.c does not detect or handle this. Thus, older _kern.o files became incompatible, and caused hard-to-debug errors where the syscall validation rejected BPF_MAP_CREATE request. This patch only detect the situation and aborts load_bpf_file(). It also add code comments warning people that read this loader for inspiration for these pitfalls. Fixes: fb30d4b71214 ("bpf: Add tests for map-in-map") Signed-off-by: Jesper Dangaard Brouer Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/bpf_load.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) commit 39f37095990a39a0ee24f7621d06e9a6da6cd815 Author: Dan Carpenter Date: Fri Apr 28 16:03:48 2017 +0300 lwtunnel: fix error path in lwtunnel_fill_encap() We recently added a check to see if nla_nest_start() fails. There are two issues with that. First, if it fails then I don't think we should call nla_nest_cancel(). Second, it's slightly convoluted but the current code returns success but we should return -EMSGSIZE instead. Fixes: a50fe0ffd76f ("lwtunnel: check return value of nla_nest_start") Signed-off-by: Dan Carpenter Acked-by: David Ahern Signed-off-by: David S. Miller net/core/lwtunnel.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 77041e89ce3d4efb9e2364b6d27e97d4bbca74fc Author: Dan Carpenter Date: Fri Apr 28 15:57:15 2017 +0300 liquidio: silence a locking static checker warning Presumably we never hit this return, but static checkers complain that we need to unlock so we may as well fix that. Signed-off-by: Dan Carpenter Acked-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c | 1 + 1 file changed, 1 insertion(+) commit 66117a9d9a8ca948680d6554769ef9e88f936954 Author: Dan Carpenter Date: Fri Apr 28 15:56:09 2017 +0300 qed: Unlock on error in qed_vf_pf_acquire() My static checker complains that we're holding a mutex on this error path. Let's goto exit instead of returning directly. Fixes: b0bccb69eba3 ("qed: Change locking scheme for VF channel") Signed-off-by: Dan Carpenter Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_vf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c942c941d3e209fb8729d0c0f6322d55b5e0444 Merge: ba1d82e 804ffe5 Author: David S. Miller Date: Sun Apr 30 22:39:25 2017 -0400 Merge branch 'hns-deferred-probe' lipeng says: ==================== net: hns: bug fix for HNS driver This patchset add support defered dsaf probe when mdio and mbigen module is not insmod. For more details, please refer to individual patch. change log: V4 - > V5: 1. Float on net-next; 2. Delete patch "net: hns: fixed bug that skb used after kfree" from this patchset; V3 -> V4: 1. Delete redundant commit message; 2. Add Reviewed-by: Matthias Brugger ; V2 -> V3: 1. Check return value when platform_get_irq in hns_rcb_get_cfg; V1 -> V2: 1. Return appropriate errno in hns_mac_register_phy; ==================== Signed-off-by: David S. Miller commit 804ffe5c6197fc2696681c597ce096d93eb24af5 Author: lipeng Date: Fri Apr 28 14:49:47 2017 +0800 net: hns: support deferred probe when no mdio In the hip06 and hip07 SoCs, phy connect to mdio bus.The mdio module is probed with module_init, and, as such, is not guaranteed to probe before the HNS driver. So we need to support deferred probe. We check for probe deferral in the mac init, so we not init DSAF when there is no mdio, and free all resource, to later learn that we need to defer the probe. Signed-off-by: lipeng Reviewed-by: Yisen Zhuang Reviewed-by: Matthias Brugger Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 39 +++++++++++++++++++---- 1 file changed, 33 insertions(+), 6 deletions(-) commit 2fdd6bafe37db6b417c9609271db4ea5a92550c0 Author: lipeng Date: Fri Apr 28 14:49:46 2017 +0800 net: hns: support deferred probe when can not obtain irq In the hip06 and hip07 SoCs, the interrupt lines from the DSAF controllers are connected to mbigen hw module. The mbigen module is probed with module_init, and, as such, is not guaranteed to probe before the HNS driver. So we need to support deferred probe. Signed-off-by: lipeng Reviewed-by: Yisen Zhuang Reviewed-by: Matthias Brugger Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c | 4 +++- drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 8 +++++++- drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) commit ba1d82e681781d86de5938ffc3dbba482b45ec85 Merge: 1d11e73 dbf637f Author: David S. Miller Date: Sun Apr 30 22:37:01 2017 -0400 Merge branch 'nfp-XDP_TX-optimizations' Jakub Kicinski says: ==================== nfp: optimize XDP TX and small fixes This series optimizes the nfp XDP TX performance a little bit. I run quick tests on an Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz. Single core/queue performance for both touch and drop and touch and forward is above 20Mpps @64B packets, drop being 2Mpps faster. I think this is max for a single queue on the low power NFPs. There are also a few minor fixes included for code in net-next. ==================== Signed-off-by: David S. Miller commit dbf637ff3995bc134187bf64b390feab6125173c Author: Jakub Kicinski Date: Thu Apr 27 21:06:20 2017 -0700 nfp: provide 256 bytes of XDP headroom in all configurations For legacy reasons NFP FW may be compiled to DMA packets to a constant offset into the buffer and use the space before it for metadata. This ensures that packets data always start at a certain offset regardless of the amount of preceding metadata. If rx offset is set to 0 there may still be up to 64 bytes of metadata but metadata will start at the beginning of the buffer, instead of: data_start_offset = rx_offset - meta_len Even though we make the buffers larger to accommodate up to 64 bytes of metadata, if there is only N bytes of metadata, we will end up with N bytes of headroom and 64 - N bytes of tailroom. Therefore we can't rely on that space for XDP headroom. Make sure we always allocate full 256 bytes. This, unfortunately, means we can't fit the headroom on an u8 any more. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 4 ++-- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 13 +------------ 2 files changed, 3 insertions(+), 14 deletions(-) commit 85cb207ee34134313acbfb948ae8a7d65f1f19e9 Author: Jakub Kicinski Date: Thu Apr 27 21:06:19 2017 -0700 nfp: don't completely refuse to work with old flashes Right now the required Service Process ABI version is still tied to max ID of known commands. For new NSP commands we are adding we are checking if NSP version is recent enough on command-by-command basis. The driver doesn't have to force the device to have the very latest flash, anything newer than 0.8 should do. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d38df0d364c3a154065109eb855f8d15ecd0fae2 Author: Jakub Kicinski Date: Thu Apr 27 21:06:18 2017 -0700 nfp: avoid reading TX queue indexes from the device Reading TX queue indexes from the device memory on each interrupt is expensive. It's doubly expensive with XDP running since we have two TX rings to check there. If the software indexes indicate that the TX queue is completely empty, however, we don't need to look at the device completion index at all. The queuing CPU is doing a wmb() before kicking the device TX so we should be safe to assume on the CPU handling the completions will never see old value of the software copy of the index. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 92e68195ebe914ae8b34cfb92148385a50454806 Author: Jakub Kicinski Date: Thu Apr 27 21:06:17 2017 -0700 nfp: do simple XDP TX buffer recycling On the RX path we follow the "drop if allocation of replacement buffer fails" rule. With XDP we extended that to the TX action, so if XDP prog returned TX but allocation of replacement RX buffer failed, we will drop the packet. To improve our XDP TX performance extend the idea of rings being always full to XDP TX rings. Pre-fill the XDP TX rings with RX buffers, and when XDP prog returns TX action swap the RX buffer with the next buffer from the TX ring. XDP TX complete will no longer free the buffers but let them sit on the TX ring and wait for swap with RX buffer, instead. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 2 + .../net/ethernet/netronome/nfp/nfp_net_common.c | 140 ++++++++++++--------- 2 files changed, 85 insertions(+), 57 deletions(-) commit d78005a50f306edb000f0994f0470f151915cf90 Author: Jakub Kicinski Date: Thu Apr 27 21:06:16 2017 -0700 nfp: drop rx_ring param from buffer allocation We will soon allocate RX buffers for caching on XDP TX rings. The rx_ring parameter passed to nfp_net_rx_alloc_one() is not actually used, remove it. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 46c505188b788c050d28174c6e726835e057bb28 Author: Jakub Kicinski Date: Thu Apr 27 21:06:15 2017 -0700 nfp: replace -ENOTSUPP with -EOPNOTSUPP As Or points out in commit 423b3aecf290 ("net/mlx4: Change ENOTSUPP to EOPNOTSUPP"), ENOTSUPP is NFS specific error. Replace it with EOPNOTSUPP. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_bpf_jit.c | 24 +++++++++++----------- .../net/ethernet/netronome/nfp/nfp_net_common.c | 4 ++-- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 2 +- .../net/ethernet/netronome/nfp/nfp_net_offload.c | 12 +++++------ 4 files changed, 21 insertions(+), 21 deletions(-) commit 1d11e732e7d501c4a231f0b32cf8b81990592689 Author: Willem de Bruijn Date: Thu Apr 27 20:37:58 2017 -0400 virtio-net: use netif_tx_napi_add for tx napi Avoid hashing the tx napi struct into napi_hash[], which is used for busy polling receive queues. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b5082df8019ac47ff1e6b6454480e39d0223fc46 Author: David Howells Date: Thu Apr 27 22:40:23 2017 +0100 net: Initialise init_net.count to 1 Initialise init_net.count to 1 for its pointer from init_nsproxy lest someone tries to do a get_net() and a put_net() in a process in which current->ns_proxy->net_ns points to the initial network namespace. Signed-off-by: David Howells Signed-off-by: David S. Miller net/core/net_namespace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5e0740c445e6ae4026f5e52456ff8d0be9725183 Author: Girish Moodalbail Date: Thu Apr 27 14:11:53 2017 -0700 geneve: fix incorrect setting of UDP checksum flag Creating a geneve link with 'udpcsum' set results in a creation of link for which UDP checksum will NOT be computed on outbound packets, as can be seen below. 11: gen0: mtu 1500 qdisc noop state DOWN link/ether c2:85:27:b6:b4:15 brd ff:ff:ff:ff:ff:ff promiscuity 0 geneve id 200 remote 192.168.13.1 dstport 6081 noudpcsum Similarly, creating a link with 'noudpcsum' set results in a creation of link for which UDP checksum will be computed on outbound packets. Fixes: 9b4437a5b870 ("geneve: Unify LWT and netdev handling.") Signed-off-by: Girish Moodalbail Acked-by: Pravin B Shelar Acked-by: Lance Richardson Signed-off-by: David S. Miller drivers/net/geneve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4879789b1fd9764df4465e80096b31d9466de0b Merge: 90a1bb9 baf4d78 Author: David S. Miller Date: Sun Apr 30 22:30:13 2017 -0400 Merge branch 'vxlan-disabled-ipv6' Jiri Benc says: ==================== vxlan: do not error out on disabled IPv6 This patchset fixes a bug with metadata based tunnels when booted with ipv6.disable=1. ==================== Signed-off-by: David S. Miller commit baf4d7860771287f30fbe9b6b2dc18b04361439d Author: Jiri Benc Date: Thu Apr 27 21:24:36 2017 +0200 vxlan: do not output confusing error message The message "Cannot bind port X, err=Y" creates only confusion. In metadata based mode, failure of IPv6 socket creation is okay if IPv6 is disabled and no error message should be printed. But when IPv6 tunnel was requested, such failure is fatal. The vxlan_socket_create does not know when the error is harmless and when it's not. Instead of passing such information down to vxlan_socket_create, remove the message completely. It's not useful. We propagate the error code up to the user space and the port number comes from the user space. There's nothing in the message that the process creating vxlan interface does not know. Signed-off-by: Jiri Benc Signed-off-by: David S. Miller drivers/net/vxlan.c | 2 -- 1 file changed, 2 deletions(-) commit d074bf9600443403aa24fbc12c1f18eadc90f5aa Author: Jiri Benc Date: Thu Apr 27 21:24:35 2017 +0200 vxlan: correctly handle ipv6.disable module parameter When IPv6 is compiled but disabled at runtime, __vxlan_sock_add returns -EAFNOSUPPORT. For metadata based tunnels, this causes failure of the whole operation of bringing up the tunnel. Ignore failure of IPv6 socket creation for metadata based tunnels caused by IPv6 not being available. Fixes: b1be00a6c39f ("vxlan: support both IPv4 and IPv6 sockets in a single vxlan device") Signed-off-by: Jiri Benc Signed-off-by: David S. Miller drivers/net/vxlan.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 90a1bb98167c75b65e2a0527ef9200d172be3442 Author: Andy Shevchenko Date: Thu Apr 27 16:37:01 2017 +0300 bnx2x: Get rid of useless temporary variable Replace pattern int status; ... status = func(...); return status; by return func(...); No functional change intented. Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit b77f016726bded1fe3abb10272343d39df6b50f1 Author: Andy Shevchenko Date: Thu Apr 27 16:37:00 2017 +0300 bnx2x: Reuse bnx2x_null_format_ver() Reuse bnx2x_null_format_ver() in functions where it's appropriated instead of open coded variant. Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 55b218c12c1d03c6f415f6d3ce929741b15b2dd3 Author: Andy Shevchenko Date: Thu Apr 27 16:36:59 2017 +0300 bnx2x: Replace custom scnprintf() Use scnprintf() when printing version instead of custom open coded variants. Signed-off-by: Andy Shevchenko Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 79 +++--------------------- 1 file changed, 9 insertions(+), 70 deletions(-) commit 4750c7be5bcf2b2a6e0217d44499364ba67adec9 Merge: 5d4e344 c2701b3 Author: David S. Miller Date: Sun Apr 30 22:25:59 2017 -0400 Merge tag 'linux-can-next-for-4.12-20170427' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2017-04-25 this is a pull request of 1 patch for net-next/master. This patch by Oliver Hartkopp fixes the build of the broad cast manager with CONFIG_PROC_FS disabled. ==================== Signed-off-by: David S. Miller commit 5d4e3443287b28a6e9c3436adbadba2497880bd1 Author: Chenbo Feng Date: Wed Apr 26 16:41:23 2017 -0700 bpf: Fix inaccurate helper function description The description inside uapi/linux/bpf.h about bpf_get_socket_uid helper function is no longer valid. It returns overflowuid rather than 0 when failed. Signed-off-by: Chenbo Feng Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d68be71ea14d609a5f31534003319be5db422595 Author: Davide Caratti Date: Wed Apr 26 19:07:35 2017 +0200 tcp: fix access to sk->sk_state in tcp_poll() avoid direct access to sk->sk_state when tcp_poll() is called on a socket using active TCP fastopen with deferred connect. Use local variable 'state', which stores the result of sk_state_load(), like it was done in commit 00fd38d938db ("tcp: ensure proper barriers in lockless contexts"). Fixes: 19f6d3f3c842 ("net/tcp-fastopen: Add new API support") Signed-off-by: Davide Caratti Acked-by: Wei Wang Signed-off-by: David S. Miller net/ipv4/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1f496fd8f34a40458d0eda6be0655926559e546 Author: Eric Dumazet Date: Wed Apr 26 09:09:23 2017 -0700 bpf: restore skb->sk before pskb_trim() call While testing a fix [1] in ___pskb_trim(), addressing the WARN_ON_ONCE() in skb_try_coalesce() reported by Andrey, I found that we had an skb with skb->sk set but no skb->destructor. This invalidated heuristic found in commit 158f323b9868 ("net: adjust skb->truesize in pskb_expand_head()") and in cited patch. Considering the BUG_ON(skb->sk) we have in skb_orphan(), we should restrain the temporary setting to a minimal section. [1] https://patchwork.ozlabs.org/patch/755570/ net: adjust skb->truesize in ___pskb_trim() Fixes: 8f917bba0042 ("bpf: pass sk to helper functions") Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Cc: Andrey Konovalov Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: Willem de Bruijn Signed-off-by: David S. Miller net/core/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae3696c167cc04d32634c4af82f43b446c5176b0 Author: Alexandre Belloni Date: Wed Apr 26 12:06:28 2017 +0200 net: macb: fix phy interrupt parsing Since 83a77e9ec415, the phydev irq is explicitly set to PHY_POLL when there is no pdata. It doesn't work on DT enabled platforms because the phydev irq is already set by libphy before. Fixes: 83a77e9ec415 ("net: macb: Added PCI wrapper for Platform Driver.") Signed-off-by: Alexandre Belloni Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 72d622b42258a0ed0b6e8c0f40d7628de935d058 Author: Theodore Ts'o Date: Sun Apr 30 20:08:05 2017 -0400 ext4: replace BUG_ON with WARN_ONCE in ext4_end_bio() Add fallback code and a WARN_ONCE() call instead of a BUG_ON() in the ext4_end_bio() function. Signed-off-by: Theodore Ts'o fs/ext4/page-io.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit dddbd6ac8f25b2d61e3e1c7134e3b3e1b9cd8670 Author: Jan Kara Date: Sun Apr 30 18:29:10 2017 -0400 ext4: avoid unnecessary transaction stalls during writeback Currently ext4_writepages() submits all pages with transaction started. When no page needs block allocation or extent conversion we can submit all dirty pages in the inode while holding a single transaction handle and when device is congested this can take significant amount of time. Thus ext4_writepages() can block transaction commits for extended periods of time. Take for example a simple benchmark simulating PostgreSQL database (pgioperf in mmtest). The benchmark runs 16 processes doing random reads from a huge file, one process doing random writes to the huge file, and one process doing sequential writes to a small files and frequently running fsync. With unpatched kernel transaction commits take on average ~18s with standard deviation of ~41s, top 5 commit times are: 274.466639s, 126.467347s, 86.992429s, 34.351563s, 31.517653s. After this patch transaction commits take on average 0.1s with standard deviation of 0.15s, top 5 commit times are: 0.563792s, 0.519980s, 0.509841s, 0.471700s, 0.469899s [ Modified so we use an explicit do_map flag instead of relying on io_end not being allocated, the since io_end->inode is needed for I/O error handling. -- tytso ] Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 09d9d82745801ca69c00f91f89c8f047b586e8cc Author: Sebastian Reichel Date: Thu Apr 27 17:30:06 2017 +0200 hwmon: (twl4030-madc) drop driver This driver is no longer needed: * It has no mainline users * It has no DT support and OMAP is DT only * iio-hwmon can be used for madc, which also works with DT Signed-off-by: Sebastian Reichel Acked-by: Guenter Roeck Signed-off-by: Guenter Roeck drivers/hwmon/Kconfig | 10 ---- drivers/hwmon/Makefile | 1 - drivers/hwmon/twl4030-madc-hwmon.c | 118 ------------------------------------- 3 files changed, 129 deletions(-) commit 8dd5b698c27948503e0ceb6f824c18178e509098 Merge: 5b36d8f 3dfc3eb Author: David S. Miller Date: Sun Apr 30 11:33:37 2017 -0400 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-04-30 This series contains updates to i40e and i40evf only. Jake provides majority of the changes in this series, starting with the renaming of a flag to avoid confusion. Then renamed a variable to a more meaningful name to clarify what is actually being done and to reduce confusion. Amortizes the wait time when initializing or disabling lots of VFs by using i40e_reset_all_vfs() and i40e_vsi_stop_rings_no_wait(). Cleaned up a unnecessary delay since pci_disable_sriov() already has its own delay, so need to add a additional delay when removing VFs. Avoid using the same name flags for both vsi->state and pf->state, to make code review easier and assist future work to use the correct state field when checking bits. Use DECLARE_BITMAP() to ensure that we always allocate enough space for flags. Replace hw_disabled_flags with the new _AUTO_DISABLED flags, which are more readable because we are not setting an *_ENABLED flag to disable the feature. Alex corrects a oversight where we were not reprogramming the ports after a reset, which was causing us to lose all of the receive tunnel offloads. Arnd Bergmann moves the declaration of a local variable to avoid a warning seen on architectures with larger pages about an unused variable. ==================== Signed-off-by: David S. Miller commit 5b36d8f5e514c60a23d8f57d8e1eb5089d41bb09 Merge: c08bac0 68fe1d5 Author: David S. Miller Date: Sun Apr 30 11:30:13 2017 -0400 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2017-04-30 This series contains updates to e1000e only. Jarod Wilson fixes an issue where the workaround for 82574 & 82583 is needed for i218 as well, so set the appropriate flags. Sasha adds support for the upcoming new i219 devices for the client platform (CannonLake), which includes the support for 38.4MHz frequency to support PTP on CannonLake. ==================== Signed-off-by: David S. Miller commit 71653eb64bcca6110c42aadfd50b8d54d3a88079 Author: Marcel Holtmann Date: Sun Apr 30 06:51:41 2017 -0700 Bluetooth: Add selftest for ECDH key generation Since the ECDH key generation takes a different path, it needs to be tested as well. For this generate the public debug key from the private debug key and compare both. This also moves the seeding of the private key into the SMP calling code to allow for easier re-use of the ECDH key generation helper. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg net/bluetooth/ecdh_helper.c | 3 --- net/bluetooth/smp.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) commit f958315358bc37aede49dc3cd7e27e037994ae84 Author: Marcel Holtmann Date: Sun Apr 30 06:51:40 2017 -0700 Bluetooth: zero kpp input for key generation When generating new ECDH keys with kpp, the shared secret input needs to be set to NULL. Fix this by including kpp_request_set_input call. Fixes: 58771c1c ("Bluetooth: convert smp and selftest to crypto kpp API") Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg net/bluetooth/ecdh_helper.c | 1 + 1 file changed, 1 insertion(+) commit ae53b5dbafc9713359696a9cff7e25f2aeaafada Merge: 81bc8e3 a9bbb45 Author: Mark Brown Date: Sun Apr 30 22:17:44 2017 +0900 Merge remote-tracking branch 'regulator/topic/vctrl' into regulator-next commit 81bc8e386f394961b22cb0758c78cee8e0905233 Merge: 0603b37 264b88c c6182ac d6c1dc3 43594dd c635df4 Author: Mark Brown Date: Sun Apr 30 22:17:36 2017 +0900 Merge remote-tracking branches 'regulator/topic/notifier', 'regulator/topic/pfuze100', 'regulator/topic/settle', 'regulator/topic/tps65132' and 'regulator/topic/twl6030' into regulator-next commit 0603b37e1ea097f597aa405f6a91933dbbd58bec Merge: 59e4c63 f7d37bc 2f3c578 4549368 45a8617 c314341 Author: Mark Brown Date: Sun Apr 30 22:17:31 2017 +0900 Merge remote-tracking branches 'regulator/topic/helpers', 'regulator/topic/hi655x', 'regulator/topic/lm363x', 'regulator/topic/ltc3589' and 'regulator/topic/ltc3676' into regulator-next commit 59e4c636df102c914b03696df11ec5d988af5df1 Merge: bde1e61 0e69c2e af367af e85c5a1 5339c34 Author: Mark Brown Date: Sun Apr 30 22:17:25 2017 +0900 Merge remote-tracking branches 'regulator/topic/anatop', 'regulator/topic/arizona', 'regulator/topic/bd9571mvw-m' and 'regulator/topic/const' into regulator-next commit bde1e61b8e18a0654be78576ab2b0bdfeb5ca05d Merge: 6a8007c c93609a Author: Mark Brown Date: Sun Apr 30 22:17:23 2017 +0900 Merge remote-tracking branch 'regulator/topic/core' into regulator-next commit 6a8007c83a7bc5ccfa02b425f7463dab3dce686a Merge: 5a7ad11 0c08aaf 75f8811 c90722b Author: Mark Brown Date: Sun Apr 30 22:17:18 2017 +0900 Merge remote-tracking branches 'regulator/fix/isl9305', 'regulator/fix/rk808' and 'regulator/fix/tps65023' into regulator-linus commit 20d5c84bef067b7e804a163e2abca16c47125bad Merge: 258ced9 82bab88 5cf015d 870e0dd Author: Mark Brown Date: Sun Apr 30 22:16:48 2017 +0900 Merge remote-tracking branches 'asoc/topic/wm8960', 'asoc/topic/wm8978' and 'asoc/topic/zte-tdm' into asoc-next commit 258ced9d083f364572a4ecfdb6cdd188eff883af Merge: 7b7b384 ea22a26 c12c1aa fe3a980 fd9f069 b3bbef4 Author: Mark Brown Date: Sun Apr 30 22:16:41 2017 +0900 Merge remote-tracking branches 'asoc/topic/uda1380', 'asoc/topic/unregister', 'asoc/topic/ux500', 'asoc/topic/wm5100' and 'asoc/topic/wm8903' into asoc-next commit 7b7b3849577932830bf17b59988ebcc67537c042 Merge: 65fd525 bf3c6ef a03faba d7766aa 0636e8b 8405265 Author: Mark Brown Date: Sun Apr 30 22:16:37 2017 +0900 Merge remote-tracking branches 'asoc/topic/tegra', 'asoc/topic/tlv320aic23', 'asoc/topic/topology', 'asoc/topic/twl6040' and 'asoc/topic/txx9' into asoc-next commit 65fd5252b40c68177946001edf2078bbbefa2c83 Merge: ae17a14 9abe464 65ed0a8 3e086ed 9e85438 12dc0f3 Author: Mark Brown Date: Sun Apr 30 22:16:31 2017 +0900 Merge remote-tracking branches 'asoc/topic/sta529', 'asoc/topic/sti', 'asoc/topic/stm', 'asoc/topic/sunxi' and 'asoc/topic/tas2552' into asoc-next commit ae17a14f14079d1e23f8b9824d6bafce6af9fa3e Merge: fc180c0 aba611f 570c70a d27f3b4 adbdba3 71c314d Author: Mark Brown Date: Sun Apr 30 22:16:26 2017 +0900 Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/simple', 'asoc/topic/sirf' and 'asoc/topic/ssm4567' into asoc-next commit fc180c0eafd9c55237b84101853f87746ffc92cd Merge: 757fc30 f49efce 7952b4b 9ba2da5 7b87463 Author: Mark Brown Date: Sun Apr 30 22:16:21 2017 +0900 Merge remote-tracking branches 'asoc/topic/rockchip', 'asoc/topic/rt5514', 'asoc/topic/rt5645' and 'asoc/topic/rt5677' into asoc-next commit 757fc30a1a9711ac00d958d4c3386dd904bc1295 Merge: ccf9fc8 c869ce5 2261cf1 943b731 97c52eb Author: Mark Brown Date: Sun Apr 30 22:16:18 2017 +0900 Merge remote-tracking branches 'asoc/topic/nau8824', 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/qcom' into asoc-next commit ccf9fc86d63cbb5c46e96748f1937ce528f49ad2 Merge: 50946b2 56af0e4 7c0c200 362c594 babd658 Author: Mark Brown Date: Sun Apr 30 22:16:04 2017 +0900 Merge remote-tracking branches 'asoc/topic/max9878', 'asoc/topic/max98927', 'asoc/topic/mtk' and 'asoc/topic/nau8540' into asoc-next commit 50946b2aecf747e68a50eefa78f1ff9e009a6c0a Merge: 0f57c12 23aaf4c e6d56d2 8f7206d Author: Mark Brown Date: Sun Apr 30 22:16:01 2017 +0900 Merge remote-tracking branches 'asoc/topic/fsl-ssi', 'asoc/topic/hi6220' and 'asoc/topic/imx' into asoc-next commit 0f57c12ab467494f66c9d616358703ae8a5098d6 Merge: 99dd3c5 59c15fc 404785f 5ace37b 24dbd9e f2a3ee0 Author: Mark Brown Date: Sun Apr 30 22:15:55 2017 +0900 Merge remote-tracking branches 'asoc/topic/es7134', 'asoc/topic/es8328', 'asoc/topic/fsl', 'asoc/topic/fsl-asrc' and 'asoc/topic/fsl-esai' into asoc-next commit 99dd3c53f6a0350f17234baff728144cc981a8b7 Merge: 2f42a77 06bdf38 13023ff 8f42c23 ea2a2ad c9afc18 Author: Mark Brown Date: Sun Apr 30 22:15:50 2017 +0900 Merge remote-tracking branches 'asoc/topic/cs35l35', 'asoc/topic/cs53l30', 'asoc/topic/da7213', 'asoc/topic/dio2125' and 'asoc/topic/dwc' into asoc-next commit 2f42a776612d1c23b8b91d8a7074842ebe5e3b9a Merge: cce9b27 51a2c94 4898b61 e54fde6 381ca1d Author: Mark Brown Date: Sun Apr 30 22:15:45 2017 +0900 Merge remote-tracking branches 'asoc/topic/adsp', 'asoc/topic/ak4613', 'asoc/topic/au1761' and 'asoc/topic/blackfin' into asoc-next commit cce9b271e5e05ba43ce9332652ef309b9e44c87a Merge: 245e302 97c415a Author: Mark Brown Date: Sun Apr 30 22:15:43 2017 +0900 Merge remote-tracking branch 'asoc/topic/rt5665' into asoc-next commit 245e302a4d17d70f223882f6fbd2c4cb35059ca9 Merge: 0c2964c e8dffe6 Author: Mark Brown Date: Sun Apr 30 22:15:42 2017 +0900 Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next commit 0c2964cb38ef9dc44c11db7516bab00c1967e52e Merge: d872f04 081dc8a Author: Mark Brown Date: Sun Apr 30 22:15:41 2017 +0900 Merge remote-tracking branch 'asoc/topic/intel' into asoc-next commit d872f04606eec35de3bc4e409e186d01dacdd3d6 Merge: 9dfc539 991454e Author: Mark Brown Date: Sun Apr 30 22:15:40 2017 +0900 Merge remote-tracking branch 'asoc/topic/core' into asoc-next commit 9dfc53942d04875c4b2fd1706f5abf93957e7106 Merge: d0a906d 49b2e27 Author: Mark Brown Date: Sun Apr 30 22:15:37 2017 +0900 Merge remote-tracking branch 'asoc/fix/cs4271' into asoc-linus commit d0a906d3a1b4eedee4114f2e5f7842fbb462ae55 Merge: ec7f984 fc99d23 Author: Mark Brown Date: Sun Apr 30 22:15:36 2017 +0900 Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linus commit ec7f9844ef90ee3ac18194f24fa478577dcfc4ae Merge: 5a7ad11 dc9617c Author: Mark Brown Date: Sun Apr 30 22:15:35 2017 +0900 Merge tag 'asoc-fix-v4.11-rc7' into asoc-linus ASoC: Fixes for v4.11 A few last minute fixes for v4.11, the STI fix is relatively large but driver specific and has been cooking in -next for a little while now: - A fix from Takashi for some suspend/resume related crashes in the Intel drivers. - A fix from Mousumi Jana for issues with incorrectly created enumeration controls generated from topology files which could cause problems for userspace. - Fixes from Arnaud Pouliquen for some crashes due to races with the interrupt handler in the STI driver. # gpg: Signature made Wed 26 Apr 2017 00:27:33 KST # gpg: using RSA key ADE668AA675718B59FE29FEA24D68B725D5487D0 # gpg: issuer "broonie@kernel.org" # gpg: key 0D9EACE2CD7BEEBC: no public key for trusted key - skipped # gpg: key 0D9EACE2CD7BEEBC marked as ultimately trusted # gpg: key CCB0A420AF88CD16: no public key for trusted key - skipped # gpg: key CCB0A420AF88CD16 marked as ultimately trusted # gpg: key 162614E316005C11: no public key for trusted key - skipped # gpg: key 162614E316005C11 marked as ultimately trusted # gpg: key A730C53A5621E907: no public key for trusted key - skipped # gpg: key A730C53A5621E907 marked as ultimately trusted # gpg: key 276568D75C6153AD: no public key for trusted key - skipped # gpg: key 276568D75C6153AD marked as ultimately trusted # gpg: Good signature from "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] # gpg: aka "Mark Brown " [ultimate] commit 82bab88910ee358305a2f31ab30dad59f1b6421c Author: Daniel Baluta Date: Wed Apr 26 16:09:52 2017 +0300 ASoC: codec: wm8960: Relax bit clock computation when using PLL Bitclk is derived from sysclk using bclk_divs. Sysclk can be derived in two ways: (1) directly from MLCK (2) MCLK via PLL Commit 3c01b9ee2ab9d0d ("ASoC: codec: wm8960: Relax bit clock computation") relaxed bitclk computation when sysclk is directly derived from MCLK. Lets do the same thing when sysclk is derived via PLL. Signed-off-by: Daniel Baluta Signed-off-by: Mark Brown sound/soc/codecs/wm8960.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 66772eda0edbfbbbe7767a6b5d07e09dae84403d Author: Daniel Baluta Date: Wed Apr 26 16:09:51 2017 +0300 ASoC: codec: wm9860: avoid maybe-uninitialized warning The new PLL configuration code triggers a harmless warning: sound/soc/codecs/wm8960.c: In function 'wm8960_configure_clocking': sound/soc/codecs/wm8960.c:735:3: error: 'best_freq_out' may be used uninitialized in this function [-Werror=maybe-uninitialized] wm8960_set_pll(codec, freq_in, best_freq_out); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/wm8960.c:699:12: note: 'best_freq_out' was declared here Fix this by reworking the code such that: 1) When there is no PLL freq available return -EINVAL and make sure *bclk_idx, *dac_idx, *sysclk_idx are initialized with invalid values. 2) When there is a PLL freq available initialize *bclk_idx, *dac_idx and *sysclk_idx with correct values and immediately return the freq available. Fixes: 84fdc00d519f ("ASoC: codec: wm9860: Refactor PLL out freq search") Fixes: 303e8954af8d ("ASoC: codec: wm8960: Stop when a matching PLL freq is found") Suggested-by: Arnd Bergmann Signed-off-by: Daniel Baluta Acked-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/codecs/wm8960.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) commit 0a0ab1d2cc5d5e68191488235074b5b30d793bb7 Author: Eli Cohen Date: Tue Feb 28 16:52:21 2017 -0600 net/mlx5: E-Switch, Avoid redundant memory allocation struct esw_mc_addr is a small struct that can be part of struct mlx5_eswitch. Define it as a field and not as a pointer and save the kzalloc call and then error flow handling. Signed-off-by: Eli Cohen Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 20 ++------------------ drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 9 ++++++++- 2 files changed, 10 insertions(+), 19 deletions(-) commit 0f6e4cf67411631be7f010fdb5c2d82c0c8705c0 Author: Eran Ben Elisha Date: Wed Apr 26 13:42:04 2017 +0300 net/mlx5e: Disable HW LRO when PCI is slower than link on striding RQ We will activate the HW LRO only on servers with PCI BW > MAX LINK BW, or when PCI BW > 16Gbps. On other cases we do not want LRO by default as LRO sessions might get timeout and add redundant software overhead. Tested: ethtool -k | grep large-receive-offload On systems with and without the limitations. Signed-off-by: Eran Ben Elisha Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit b1b03bded1ee8b88ad85055a15d5f62ab6ddde44 Author: Tariq Toukan Date: Mon Apr 3 10:48:30 2017 +0300 net/mlx5e: Use u8 as ownership type in mlx5e_get_cqe() CQE ownership indication is as small as a single bit. Use u8 to speedup the comparison. Signed-off-by: Tariq Toukan Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ad78af9b88f3d12134d6406468e7798e65c385c0 Author: Tariq Toukan Date: Wed Feb 15 17:05:39 2017 +0200 net/mlx5e: Use prefetchw when a write is to follow "prefetchw()" prefetches the cacheline for write. Use it for skb->data, as soon we'll be copying the packet header there. Performance: Single-stream packet-rate tested with pktgen. Packets are dropped in tc level to zoom into driver data-path. Larger gain is expected for smaller packets, as less time is spent on handling SKB fragments, making the path shorter and the improvement more significant. --------------------------------------------- packet size | before | after | gain | 64B | 4,113,306 | 4,778,720 | 16% | 1024B | 3,633,819 | 3,950,593 | 8.7% | Signed-off-by: Tariq Toukan Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f5b1e47ee08f6c623db599b6c23ce7c20b79458 Author: Tariq Toukan Date: Wed Mar 29 11:46:10 2017 +0300 net/mlx5e: Optimize poll ICOSQ completion queue UMR operations are more frequent and important. Check them first, and add a compiler branch predictor hint. According to current design, ICOSQ CQ can contain at most one pending CQE per napi. Poll function is optimized accordingly. Performance: Single-stream packet-rate tested with pktgen. Packets are dropped in tc level to zoom into driver data-path. Larger gain is expected for larger packet sizes, as BW is higher and UMR posts are more frequent. --------------------------------------------- packet size | before | after | gain | 64B | 4,092,370 | 4,113,306 | 0.5% | 1024B | 3,421,435 | 3,633,819 | 6.2% | Signed-off-by: Tariq Toukan Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 62 ++++++++++++----------- 1 file changed, 33 insertions(+), 29 deletions(-) commit a2fa1fe5ad13e7f11b82291fc08bdc654fac741e Author: Hadar Hen Zion Date: Tue Feb 14 11:20:24 2017 +0200 net/mlx5e: Act on delay probe time updates The user can change delay_first_probe_time parameter through sysctl. Listen to NETEVENT_DELAY_PROBE_TIME_UPDATE notifications and update the intervals for updating the neighbours 'used' value periodic task and for flow HW counters query periodic task. Both of the intervals will be update only in case the new delay prob time value is lower the current interval. Since the driver saves only one min interval value and not per device, the users will be able to set lower interval value for updating neighbour 'used' value periodic task but they won't be able to schedule a higher interval for this periodic task. The used interval for scheduling neighbour 'used' value periodic task is the minimal delay prob time parameter ever seen by the driver. Signed-off-by: Hadar Hen Zion Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 39 ++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit f6dfb4c3f2161c23ab2939dd1b5f133dcdf147c6 Author: Hadar Hen Zion Date: Fri Feb 24 12:16:33 2017 +0200 net/mlx5e: Update neighbour 'used' state using HW flow rules counters When IP tunnel encapsulation rules are offloaded, the kernel can't see the traffic of the offloaded flow. The neighbour for the IP tunnel destination of the offloaded flow can mistakenly become STALE and deleted by the kernel since its 'used' value wasn't changed. To make sure that a neighbour which is used by the HW won't become STALE, we proactively update the neighbour 'used' value every DELAY_PROBE_TIME period, when packets were matched and counted by the HW for one of the tunnel encap flows related to this neighbour. The periodic task that updates the used neighbours is scheduled when a tunnel encap rule is successfully offloaded into HW and keeps re-scheduling itself as long as the representor's neighbours list isn't empty. Add, remove, lookup and status change operations done over the representor's neighbours list or the neighbour hash entry encaps list are all serialized by RTNL lock. Signed-off-by: Hadar Hen Zion Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 52 +++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 11 ++++ drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 58 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 3 ++ drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 5 ++ .../net/ethernet/mellanox/mlx5/core/fs_counters.c | 24 ++++++++- include/linux/mlx5/driver.h | 1 + 7 files changed, 152 insertions(+), 2 deletions(-) commit 232c001398ae8406dc0daf07b14e6ec9a5562719 Author: Hadar Hen Zion Date: Mon Mar 20 12:56:47 2017 +0200 net/mlx5e: Add support to neighbour update flow In order to offload TC encap rules, the driver does a lookup for the IP tunnel neighbour according to the output device and the destination IP given by the user. To keep tracking after the validity state of such neighbours, we keep the neighbours information (pair of device pointer and destination IP) in a hash table maintained at the relevant egress representor and register to get NETEVENT_NEIGH_UPDATE events. When getting neighbour update netevent, we search for a match among the cached neighbours entries used for encapsulation. In case the neighbour isn't valid, we can't offload the flow into the HW. We cache the flow (requested matching and actions) in the driver and offload the rule later, when the neighbour is resolved and becomes valid. When a flow is only cached in the driver and not offloaded into HW yet, we use EAGAIN return value to mark it internally, the TC ndo still returns success. Listen to kernel neighbour update netevents to trace relevant neighbours validity state: 1. If a neighbour becomes valid, offload the related rules to HW. 2. If the neighbour becomes invalid, remove the related rules from HW. 3. If the neighbour mac address was changed, update the encap header. Remove all the offloaded rules using the old encap header from the HW and insert new rules to HW with updated encap header. Access to the neighbors hash table is protected by RTNL lock of its caller or by the table's spinlock. Details of the locking/synchronization among the different actions applied on the neighbour table: Add/remove operations - protected by RTNL lock of its caller (all TC commands are protected by RTNL lock). Add and remove operations are initiated only when the user inserts/removes a TC rule into/from the driver. Lookup/remove operations - since the lookup operation is done from netevent notifier block, RTNL lock can't be used (atomic context). Use the table's spin lock to protect lookups from TC user removal operation. bh is used since netevent can be called from a softirq context. Lookup/add operations - The hash table access functions are taking care of the protection between lookup and add operations. When adding/removing encap headers and rules to/from the HW, RTNL lock is used. It can happen when: 1. The user inserts/removes a TC rule into/from the driver (TC commands are protected by RTNL lock of it's caller). 2. The driver gets neighbour notification event, which reports about neighbour validity status change. Before adding/removing encap headers and rules to/from the HW, RTNL lock is taken. A neighbour hash table entry should be freed when its encap list is empty. Since The neighbour update netevent notification schedules a neighbour update work that uses the neighbour hash entry, it can't be freed unconditionally when the encap list becomes empty during TC delete rule flow. Use reference count to protect from freeing neighbour hash table entry while it's still in use. When the user asks to unregister a netdvice used by one of the neigbours, neighbour removal notification is received. Then we take a reference on the neighbour and don't free it until the relevant encap entries (and flows) are marked as invalid (not offloaded) and removed from HW. As long as the encap entry is still valid (checked under RTNL lock) we can safely access the neighbour device saved on mlx5e_neigh struct. Signed-off-by: Hadar Hen Zion Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 230 +++++++++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 38 +++- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 202 +++++++++++++++---- drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 6 + drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 1 + 5 files changed, 434 insertions(+), 43 deletions(-) commit 37b498ff238549b30c9e70d4e45f522fd53b8994 Author: Hadar Hen Zion Date: Thu Feb 2 16:43:35 2017 +0200 net/mlx5e: Add neighbour hash table to the representors Add hash table to the representors which is to be used by the next patch to save neighbours information in the driver. In order to offload IP tunnel encapsulation rules, the driver must find the tunnel dst neighbour according to the output device and the destination address given by the user. The next patch will cache the neighbors information in the driver to allow support in neigh update flow for tunnel encap rules. The neighbour entries are also saved in a list so we easily iterate over them when querying statistics in order to provide 'used' feedback to the kernel neighbour NUD core. Signed-off-by: Hadar Hen Zion Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 107 +++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 30 +++++++ 2 files changed, 129 insertions(+), 8 deletions(-) commit 033354d501862ca1f58caa1e5c5775712e1bff17 Author: Hadar Hen Zion Date: Thu Feb 2 16:14:21 2017 +0200 net/mlx5e: Read neigh parameters with proper locking The nud_state and hardware address fields are protected by the neighbour lock, we should acquire it before accessing those parameters. Use this lock to avoid inconsistency between the neighbour validity state and it's hardware address. Signed-off-by: Hadar Hen Zion Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 0b67a38fe699ee60c56d193d33c9c7392cabaea7 Author: Hadar Hen Zion Date: Tue Feb 14 14:03:45 2017 +0200 net/mlx5e: Use flag to properly monitor a flow rule offloading state Instead of relaying on the 'flow->rule' pointer value which can be valid or invalid (in case the FW returns an error while trying to offload the rule), monitor the rule state using a flag. In downstream patch which adds support to IP tunneling neigh update flow, a TC rule could be cached in the driver and not offloaded into the HW. In this case, the flow handle pointer stays NULL. Check the offloaded flag to properly deal with rules which are currently not offloaded when querying rule statistics. This patch doesn't add any new functionality. Signed-off-by: Hadar Hen Zion Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 1a8552bd81af5f4f19b26ac58e8c85866d4f7de8 Author: Hadar Hen Zion Date: Thu Feb 2 15:01:02 2017 +0200 net/mlx5e: Remove output device parameter from create encap header helpers definition Passing output device parameter to the helper functions that deal with creation of encapsulation headers is redundant. Output device parameter can be defined inside those helpers, no need to pass it. Refactor the code by removing the parameter from the function signature. This patch doesn't change any functionality. Signed-off-by: Hadar Hen Zion Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 29 ++++++++++++------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit c1ae11521b1e87523553ddd3c1aa88be3d710c96 Author: Or Gerlitz Date: Tue Apr 25 16:19:26 2017 +0300 net/mlx5e: Move the encap entry structure from the eswitch header The encap entry structure isn't manipulated by the eswitch code, hence it can/needs to be removed from the eswitch header. Do that, and change it to have mlx5e_ prefix. This patch doesn't change any functionality. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 13 +++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 11 +++++------ drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 13 ------------- 3 files changed, 18 insertions(+), 19 deletions(-) commit 45247bf2985edd983bb241dfa71f0c17713c8e7b Author: Or Gerlitz Date: Tue Apr 25 15:30:08 2017 +0300 net/mlx5: Remove encap entry pointer from the eswitch flow attributes Encap wise, the tc eswitch flow attribute struct needs to have only the encap ID which is programmed later to the HW and none of the higher level encap params, fix that. This patch doesn't change any functionality. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 29 ++++++++++++---------- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 2 +- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +- 3 files changed, 18 insertions(+), 15 deletions(-) commit 1d447a39142e0eaf8526fcb37699e6b8cce5eaa8 Author: Saeed Mahameed Date: Mon Apr 24 12:36:42 2017 +0300 net/mlx5e: Extendable vport representor netdev private data Make representor netdev private data extendable by adding new struct "mlx5e_rep_priv" and use it as the rep netdev private data struct instead of directly pointing to mlx5_eswitch_rep. Added new en_rep.h header file to contain all representor related definitions and prototypes, and moved all representor specific logic into en_rep.c. Needed for downstream patches to extend representor functionality to support neighbour update. Signed-off-by: Saeed Mahameed Reviewed-by: Or Gerlitz drivers/net/ethernet/mellanox/mlx5/core/en.h | 20 --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 77 +++------- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 176 ++++++++++++++++------ drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 55 +++++++ drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 4 +- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 22 ++- 6 files changed, 224 insertions(+), 130 deletions(-) commit c869ce5aaf8f470c8cf32638e7cd498f57118fa5 Author: John Hsu Date: Thu Apr 27 11:22:50 2017 +0800 ASoC: nau8824: leave Class D gain at chip default Remove initial configuration of Class D gain for 1R and 2L. Leave them at the chip default. Signed-off-by: John Hsu Signed-off-by: John Hsu Signed-off-by: Mark Brown sound/soc/codecs/nau8824.c | 6 ------ 1 file changed, 6 deletions(-) commit 25535f7e0b418fe8b2251008cfcb05d272c2e8e0 Author: John Hsu Date: Thu Apr 27 11:15:37 2017 +0800 ASoC: nau8824: rename controls to match DAPM controls Rename the name of kcontrols to match up the DAPM widget controls. Signed-off-by: John Hsu Signed-off-by: John Hsu Signed-off-by: Mark Brown sound/soc/codecs/nau8824.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 081dc8ab46df85382658822e951ea79be87382b0 Author: Guneshwor Singh Date: Thu Apr 27 12:21:22 2017 +0530 ASoC: Intel: Skylake: Return negative error code skl_tplg_add_pipe() returned EEXIST instead of negative EEXIST, so fix that and handle the return value as well. Signed-off-by: Guneshwor Singh Signed-off-by: Vinod Koul Reviewed-by: Takashi Sakamoto Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 9ed4aefe6f5f7e1dfe6abe8b15cfc8c48963b6c0 Author: Vinod Koul Date: Thu Apr 27 12:21:21 2017 +0530 ASoC: Intel: Skylake: Fix unused variable warning With compiler option W=1, we have one more warning in the driver for 'set but unused variable', so remove the unused variable to fix it. sound/soc/intel/skylake/skl-pcm.c: In function ‘skl_platform_open’: sound/soc/intel/skylake/skl-pcm.c:954:26: warning: variable ‘runtime’ set but not used [-Wunused-but-set-variable] struct snd_pcm_runtime *runtime; Signed-off-by: Vinod Koul Reviewed-by: Takashi Sakamoto Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 2 -- 1 file changed, 2 deletions(-) commit 351d74e4d7eacaab2ed0092b855355d5e2907117 Author: Arnd Bergmann Date: Thu Apr 27 12:59:58 2017 +0200 ASoC: Intel: Skylake: fix uninitialized pointer use The error handling in bxt_sst_dsp_init() got changed in a way that it now derefences an uninitialized pointer when printing a warning about the device not being found: sound/soc/intel/skylake/bxt-sst.c: In function 'bxt_sst_dsp_init': sound/soc/intel/skylake/bxt-sst.c:567:14: error: 'skl' may be used uninitialized in this function [-Werror=maybe-uninitialized] As we do have a valid device pointer available at the call site, let's use that instead. Fixes: 9fe9c7119283 ("ASoC: Intel: Skylake: Move sst common initialization to a helper function") Signed-off-by: Arnd Bergmann Reviewed-by: Takashi Sakamoto Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65ed0a8d1f24abd79be149253025de8949321900 Author: Dan Carpenter Date: Fri Apr 28 16:22:10 2017 +0300 ASoC: sti: Fix error handling if of_clk_get() fails We intended to return here. The current code has a static checker warning because we set "ret" but don't use it. Fixes: 76c2145ded6b ("ASoC: sti: Add CPU DAI driver for playback") Signed-off-by: Dan Carpenter Acked-by: Arnaud POULIQUEN Signed-off-by: Mark Brown sound/soc/sti/uniperif_player.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49b2e27ab9f66b0a22c21980ad8118a4038324ae Author: Alexander Sverdlin Date: Sat Apr 29 12:19:33 2017 +0200 ASoC: cs4271: configure reset GPIO as output During reset "refactoring" the output configuration was lost. This commit repairs sound on EDB93XX boards. Fixes: 9a397f4 ("ASoC: cs4271: add regulator consumer support") Signed-off-by: Alexander Sverdlin Signed-off-by: Mark Brown Cc: # 4.6+ sound/soc/codecs/cs4271.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9afc1834e8132783772d73007706d3ae3848483 Author: Jose Abreu Date: Fri Apr 28 10:55:25 2017 +0100 ASoC: dwc: Disallow building designware_pcm as a module Designware PCM is an extension to Designware I2S and they are dependent on each other. For this reason, make Designware PCM a boolean which will compile with Desigwnare I2S module. The name of the module is not changed but the name of the files need to be changed. Also, without this commit we get errors when probbing designware_i2s module because of unspecified license: designware_pcm: module license 'unspecified' taints kernel. Disabling lock debugging due to kernel taint designware_pcm: Unknown symbol __rcu_read_lock (err 0) designware_pcm: Unknown symbol devm_snd_soc_register_platform (err 0) designware_pcm: Unknown symbol synchronize_rcu (err 0) designware_pcm: Unknown symbol __rcu_read_unlock (err 0) designware_pcm: Unknown symbol snd_soc_set_runtime_hwparams (err 0) So, this is really needed as a fix. Fixes: 79361b2b98b7 ("ASoC: dwc: Add PIO PCM extension") Signed-off-by: Lubomir Rintel Signed-off-by: Jose Abreu Signed-off-by: Mark Brown sound/soc/dwc/Kconfig | 4 +- sound/soc/dwc/Makefile | 6 +- sound/soc/dwc/designware_i2s.c | 753 ----------------------------------------- sound/soc/dwc/designware_pcm.c | 284 ---------------- sound/soc/dwc/dwc-i2s.c | 753 +++++++++++++++++++++++++++++++++++++++++ sound/soc/dwc/dwc-pcm.c | 281 +++++++++++++++ 6 files changed, 1039 insertions(+), 1042 deletions(-) commit 68fe1d5da548aab2b6b1c28a9137248d6ccfcc43 Author: Sasha Neftin Date: Thu Apr 6 10:27:03 2017 +0300 e1000e: Add Support for 38.4MHZ frequency Add support for 38.4MHz frequency is required for PTP on CannonLake. SYSTIM frequency adjustment attributes for TIMINCA are get/set dependent on the hardware clock frequency for a different types of adapters. 38.4MHz frequency supported by CannonLake and active once time synchronisation mechanism was enabled Changed abbreviation from Hz to HZ to be compliant checkpatch code style Signed-off-by: Sasha Neftin Reviewed-by: Raanan Avargil Reviewed-by: Dima Ruinskiy Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/e1000.h | 28 +++++++++-------- drivers/net/ethernet/intel/e1000e/netdev.c | 49 +++++++++++++++++++----------- 2 files changed, 48 insertions(+), 29 deletions(-) commit c8744f44aeaee1caf5d6595e9351702253260088 Author: Sasha Neftin Date: Thu Apr 6 10:26:47 2017 +0300 e1000e: Add Support for CannonLake The propagation of CannonLake mac type to driver functionality Signed-off-by: Sasha Neftin Reviewed-by: Raanan Avargil Reviewed-by: Dima Ruinskiy Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/ethtool.c | 10 ++-- drivers/net/ethernet/intel/e1000e/ich8lan.c | 82 +++++++++++++++-------------- drivers/net/ethernet/intel/e1000e/netdev.c | 29 +++++----- drivers/net/ethernet/intel/e1000e/ptp.c | 4 +- 4 files changed, 63 insertions(+), 62 deletions(-) commit 3a3173b9c37aa1f07f8a71021114ee29a5712acb Author: Sasha Neftin Date: Thu Apr 6 10:26:32 2017 +0300 e1000e: Initial Support for CannonLake i219 (6) and i219 (7) are the next LOM generations that will be available on the nextIntel Client platform (CannonLake) This patch provides the initial support for these devices Signed-off-by: Sasha Neftin Reviewed-by: Raanan Avargil Reviewed-by: Dima Ruinskiy Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/e1000.h | 4 +++- drivers/net/ethernet/intel/e1000e/hw.h | 5 +++++ drivers/net/ethernet/intel/e1000e/ich8lan.c | 20 ++++++++++++++++++++ drivers/net/ethernet/intel/e1000e/netdev.c | 5 +++++ 4 files changed, 33 insertions(+), 1 deletion(-) commit 10ed1e0bd144b5c3a92ca0c8fd06eb80b80649e5 Author: Jarod Wilson Date: Tue Jul 26 14:25:35 2016 -0400 e1000e: fix PTP on e1000_pch_lpt variants I've got reports that the Intel I-218V NIC in Intel NUC5i5RYH systems used as a PTP slave experiences random ~10 hour clock jumps, which are resolved if the same workaround for the 82574 and 82583 is employed, so set the appropriate flag2 in e1000_pch_lpt_info too. Reported-by: Rupesh Patel Signed-off-by: Jarod Wilson Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/ich8lan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3dfc3eb581645bc503c7940861f494a0d75615da Author: Arnd Bergmann Date: Wed Apr 19 19:29:48 2017 +0200 i40evf: hide unused variable On architectures with larger pages, we get a warning about an unused variable: drivers/net/ethernet/intel/i40evf/i40evf_main.c: In function 'i40evf_configure_rx': drivers/net/ethernet/intel/i40evf/i40evf_main.c:690:21: error: unused variable 'netdev' [-Werror=unused-variable] This moves the declaration into the #ifdef to avoid the warning. Fixes: dab86afdbbd1 ("i40e/i40evf: Change the way we limit the maximum frame size for Rx") Signed-off-by: Arnd Bergmann Acked-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 283aeafe6bf06af48068478eaf332f7a227e9af4 Author: Jacob Keller Date: Wed Apr 19 09:25:59 2017 -0400 i40evf: allocate queues before we setup the interrupts and q_vectors This matches the ordering of how we free stuff during reset and remove. It also makes logical sense because we set the interrupts based on the number of queues. Currently this doesn't really matter in practice. However a future patch moves the assignment of num_active_queues into i40evf_alloc_queues, which is required by i40evf_set_interrupt_capability. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 707636c6481696c3b73209c9a7f8c482f0748373 Author: Jacob Keller Date: Wed Apr 19 09:25:58 2017 -0400 i40evf: remove I40E_FLAG_FDIR_ATR_ENABLED The flag used by the common code and PF code is I40E_FLAG_FD_ATR_ENABLED, not *FDIR*. It turns out none of the txrx code actually shared with the VF driver actually checks the ATR flag. This is made even more obvious by the typo in the VF header file. Let's just remove the flag from the VF driver since it's not needed. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf.h | 1 - 1 file changed, 1 deletion(-) commit 47994c119a36e28e1779efabc92d6ab5329a6f75 Author: Jacob Keller Date: Wed Apr 19 09:25:57 2017 -0400 i40e: remove hw_disabled_flags in favor of using separate flag bits The hw_disabled_flags field was added as a way of signifying that a feature was automatically or temporarily disabled. However, we actually only use this for FDir features. Replace its use with new _AUTO_DISABLED flags instead. This is more readable, because you aren't setting an *_ENABLED flag to *disable* the feature. Additionally, clean up a few areas where we used these bits. First, we don't really need to set the auto-disable flag for ATR if we're fully disabling the feature via ethtool. Second, we should always clear the auto-disable bits in case they somehow got set when the feature was disabled. However, avoid displaying a message that we've re-enabled the feature. Third, we shouldn't be re-enabling ATR in the SB ntuple add flow, because it might have been disabled due to space constraints. Instead, we should just wait for the fdir_check_and_reenable to be called by the watchdog. Overall, this change allows us to simplify some code by removing an extra field we didn't need, and the result should make it more clear as to what we're actually doing with these flags. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 9 +---- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 6 +-- drivers/net/ethernet/intel/i40e/i40e_main.c | 53 +++++++++++++------------- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 22 ++++------- 4 files changed, 38 insertions(+), 52 deletions(-) commit 789f38ca70e0b2848472aaf5f278aa3deabd4a4e Author: Jacob Keller Date: Wed Apr 19 09:25:56 2017 -0400 i40evf: remove needless min_t() on num_online_cpus()*2 We already set pairs to the value of adapter->num_active_queues. This value is limited by vsi_res->num_queue_pairs and num_online_cpus(). This means that pairs by definition is already smaller than num_online_cpus()*2, so we don't even need to bother with this check. Lets just remove it and update the comment. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0da36b9774cc24bac4bff446edf49f31aa98a282 Author: Jacob Keller Date: Wed Apr 19 09:25:55 2017 -0400 i40e: use DECLARE_BITMAP for state fields Instead of assuming our flags fit within an unsigned long, use DECLARE_BITMAP which will ensure that we always allocate enough space. Additionally, use __I40E_STATE_SIZE__ markers as the last element of the enumeration so that the size of the BITMAP is compile-time assigned rather than programmer-time assigned. This ensures that potential future flag additions do not actually overrun the array. This is especially important as 32bit systems would only have 32bit longs instead of 64bit longs as we generally have assumed in the prior code. This change also removes a dereference of the state fields throughout the code, so it does have a bit of code churn. The conversions were automated using sed replacements with an alternation s/&(vsi->back|vsi|pf)->state/\1->state/ s/&adapter->vsi.state/adapter->vsi.state/ For debugfs, we modify the printing so that we can display chunks of the state value on new lines. This ensures that we can print the entire set of state values. Additionally, we now print them as 08lx to ensure that they display nicely. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 8 +- drivers/net/ethernet/intel/i40e/i40e_client.c | 16 +- drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 13 +- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 42 ++-- drivers/net/ethernet/intel/i40e/i40e_main.c | 233 ++++++++++----------- drivers/net/ethernet/intel/i40e/i40e_ptp.c | 4 +- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 14 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 18 +- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 8 +- drivers/net/ethernet/intel/i40evf/i40evf.h | 4 +- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 10 +- 11 files changed, 189 insertions(+), 181 deletions(-) commit d19cb64b9222a93498c9dc8447503bfa87863d99 Author: Jacob Keller Date: Fri Apr 21 13:38:05 2017 -0700 i40e: separate PF and VSI state flags Avoid using the same named flags for both vsi->state and pf->state. This makes code review easier, as it is more likely that future authors will use the correct state field when checking bits. Previous commits already found issues with at least one check, and possibly others may be incorrect. This reduces confusion as it is more clear what each flag represents, and which flags are valid for which state field. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 12 ++++- drivers/net/ethernet/intel/i40e/i40e_client.c | 4 +- drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 4 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 66 ++++++++++++------------- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 8 +-- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 8 +-- drivers/net/ethernet/intel/i40evf/i40evf.h | 7 ++- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 10 ++-- 8 files changed, 64 insertions(+), 55 deletions(-) commit 2318b4018a9c2773a13f4fdac64d5519679fc171 Author: Jacob Keller Date: Wed Apr 19 09:25:53 2017 -0400 i40e: remove unnecessary msleep() delay in i40e_free_vfs The delay was added because of a desire to ensure that the VF driver can finish up removing. However, pci_disable_sriov already has its own ssleep() call that will sleep for an entire second, so there is no reason to add extra delay on top of this by using msleep here. In practice, an msleep() won't have a huge impact on timing but there is no real value in keeping it, so lets just simplify the code and remove it. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 -- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) commit 707d088af33043642692d4522225cb9ca638e7ee Author: Jacob Keller Date: Wed Apr 19 09:25:52 2017 -0400 i40e: amortize wait time when disabling lots of VFs Just as we do in i40e_reset_all_vfs, save some time when freeing VFs by amortizing the wait time for stopping queues. We can use i40e_vsi_stop_rings_no_wait() to begin the process of stopping all the VF rings at once. Then, once we've started the process on each VF we can begin waiting for the VFs to stop. This helps reduce the total wait time by a large factor. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 1f190d9369487c1edfaea4d892231a62ea8206cc Author: Alexander Duyck Date: Wed Apr 19 09:25:51 2017 -0400 i40e: Reprogram port offloads after reset This patch corrects a major oversight in that we were not reprogramming the ports after a reset. As a result we completely lost all of the Rx tunnel offloads on receive including Rx checksum, RSS on inner headers, and ATR. The fix for this is pretty standard as all we needed to do is reset the filter bits to pending for all active filters and schedule the sync event. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 27826fd5d357d38b5cf834f9adcc70e6c2254d69 Author: Jacob Keller Date: Wed Apr 19 09:25:50 2017 -0400 i40e: rename index to port to avoid confusion The .index field of i40e_udp_port_config represents the udp port number. Rename this variable to port so that it is more obvious. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 2 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit 1b48437028603ec51d5a1eb276c941c866375a3e Author: Jacob Keller Date: Thu Apr 13 04:45:55 2017 -0400 i40e: make use of i40e_reset_all_vfs when initializing new VFs When allocating a large number of VFs, the driver previously used i40e_reset_vf in a sequence. Just as when performing a normal reset, this accumulates a large amount of delay for handling all of the VFs in sequence. This delay is mainly due to a hardware requirement to wait after initiating a reset on the VF. We recently added a new function, i40e_reset_all_vfs() which can be used to amortize the delay time, by first triggering all VF resets, then waiting once, and finally cleaning up and allocating the VFs. This is almost as good as truly running the resets in parallel. In order to avoid sending a spurious reset message to a client interface, we have a check to see whether we've assigned pf->num_alloc_vfs yet. This was originally intended as a way to distinguish the "initialization" case from the regular reset case. Unfortunately, this means that we can't directly use i40e_reset_all_vfs yet. Lets avoid this check of pf->num_alloc_vfs by replacing it with a proper VSI state bit which we can use instead. This makes the intention much clearer and allows us to re-use the i40e_reset_all_vfs function directly. Change-ID: I694279b37eb6b5a91b6670182d0c15d10244fd6e Signed-off-by: Jacob Keller Reviewed-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 10 +++++++--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) commit 6322e63c35d68eac9c4a5ed59ea1c6d1e2746892 Author: Jacob Keller Date: Thu Apr 13 04:45:54 2017 -0400 i40e: properly spell I40E_VF_STATE_* flags These flags represent the state of the VF at various times. Do not spell them as _STAT_ which can be confusing to readers who may think these refer to statistics. Change-ID: I6bc092cd472e8276896a1fd7498aced2084312df Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 98 +++++++++++----------- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 14 ++-- 4 files changed, 58 insertions(+), 58 deletions(-) commit 2d6f1da168e1d62c47f7d50135ac4cbd8411dcb1 Author: Dean Jenkins Date: Fri Apr 28 13:57:26 2017 +0100 Bluetooth: hci_ldisc: Add protocol check to hci_uart_tx_wakeup() Before attempting to schedule a work-item onto hu->write_work in hci_uart_tx_wakeup(), check that the Data Link protocol layer is still bound to the HCI UART driver. Failure to perform this protocol check causes a race condition between the work queue hu->write_work running hci_uart_write_work() and the Data Link protocol layer being unbound (closed) in hci_uart_tty_close(). Note hci_uart_tty_close() does have a "cancel_work_sync(&hu->write_work)" but it is ineffective because it cannot prevent work-items being added to hu->write_work after cancel_work_sync() has run. Therefore, add a check for HCI_UART_PROTO_READY into hci_uart_tx_wakeup() which prevents scheduling of the work queue when HCI_UART_PROTO_READY is in the clear state. However, note a small race condition remains because the hci_uart_tx_wakeup() thread can run in parallel with the hci_uart_tty_close() thread so it is possible that a schedule of hu->write_work can occur when HCI_UART_PROTO_READY is cleared. A complete solution needs locking of the threads which is implemented in a future commit. Signed-off-by: Dean Jenkins Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ldisc.c | 3 +++ 1 file changed, 3 insertions(+) commit 048e1bd3a27fbeb84ccdff52e165370c1339a193 Author: Dean Jenkins Date: Fri Apr 28 13:57:25 2017 +0100 Bluetooth: hci_ldisc: Add protocol check to hci_uart_dequeue() Before attempting to dequeue a Data Link protocol encapsulated message, check that the Data Link protocol is still bound to the HCI UART driver. This makes the code consistent with the usage of the other proto function pointers. Therefore, add a check for HCI_UART_PROTO_READY into hci_uart_dequeue() and return NULL if the Data Link protocol is not bound. This is needed for robustness as there is a scheduling race condition. hci_uart_write_work() is scheduled to run via work queue hu->write_work from hci_uart_tx_wakeup(). Therefore, there is a delay between scheduling hci_uart_write_work() to run and hci_uart_dequeue() running whereby the Data Link protocol layer could become unbound during the scheduling delay. In this case, without the check, the call to the unbound Data Link protocol layer dequeue function can crash. It is noted that hci_uart_tty_close() has a "cancel_work_sync(&hu->write_work)" statement but this only reduces the window of the race condition because it is possible for a new work-item to be added to work queue hu->write_work after the call to cancel_work_sync(). For example, Data Link layer retransmissions can be added to the work queue after the cancel_work_sync() has finished. Signed-off-by: Dean Jenkins Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ldisc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ab00f89fdff61975fa52a61608080ea7b8d8e800 Author: Dean Jenkins Date: Fri Apr 28 13:57:24 2017 +0100 Bluetooth: hci_ldisc: Add protocol check to hci_uart_send_frame() Before attempting to send a HCI message, check that the Data Link protocol is still bound to the HCI UART driver. This makes the code consistent with the usage of the other proto function pointers. Therefore, add a check for HCI_UART_PROTO_READY into hci_uart_send_frame() and return -EUNATCH if the Data Link protocol is not bound. This also allows hci_send_frame() to report the error of an unbound Data Link protocol layer. Therefore, it assists with diagnostics into why HCI messages are being sent when the Data Link protocol is not bound and avoids potential crashes. Signed-off-by: Dean Jenkins Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ldisc.c | 3 +++ 1 file changed, 3 insertions(+) commit 377a6eac58e3492fbf74fed0a5e40ee90ed73f8e Author: Frédéric Danis Date: Fri Apr 28 13:26:11 2017 +0200 Bluetooth: Add module license for HCI UART Nokia H4+ Fix the following error preventing to load Nokia H4+ module: kernel: [ 826.461619] hci_nokia: module license 'unspecified' taints kernel. kernel: [ 826.461629] Disabling lock debugging due to kernel taint kernel: [ 826.461836] hci_nokia: Unknown symbol gpiod_get_value_cansleep (err 0) kernel: [ 826.461876] hci_nokia: Unknown symbol devm_kmalloc (err 0) kernel: [ 826.461908] hci_nokia: Unknown symbol gpiod_set_value (err 0) kernel: [ 826.461937] hci_nokia: Unknown symbol serdev_device_set_baudrate (err 0) kernel: [ 826.461994] hci_nokia: Unknown symbol gpiod_set_value_cansleep (err 0) kernel: [ 826.462021] hci_nokia: Unknown symbol hci_uart_tx_wakeup (err 0) kernel: [ 826.462043] hci_nokia: Unknown symbol serdev_device_set_flow_control (err 0) kernel: [ 826.462064] hci_nokia: Unknown symbol gpiod_to_irq (err 0) kernel: [ 826.462085] hci_nokia: Unknown symbol serdev_device_open (err 0) kernel: [ 826.462106] hci_nokia: Unknown symbol gpiod_get_value (err 0) kernel: [ 826.462150] hci_nokia: Unknown symbol clk_prepare (err 0) kernel: [ 826.462182] hci_nokia: Unknown symbol pm_runtime_enable (err 0) kernel: [ 826.462204] hci_nokia: Unknown symbol h4_recv_buf (err 0) kernel: [ 826.462246] hci_nokia: Unknown symbol serdev_device_write_flush (err 0) kernel: [ 826.462268] hci_nokia: Unknown symbol serdev_device_get_tiocm (err 0) kernel: [ 826.462298] hci_nokia: Unknown symbol driver_unregister (err 0) kernel: [ 826.462318] hci_nokia: Unknown symbol serdev_device_wait_until_sent (err 0) kernel: [ 826.462347] hci_nokia: Unknown symbol __serdev_device_driver_register (err 0) kernel: [ 826.462384] hci_nokia: Unknown symbol serdev_device_set_tiocm (err 0) kernel: [ 826.462417] hci_nokia: Unknown symbol clk_get_rate (err 0) kernel: [ 826.462454] hci_nokia: Unknown symbol __pm_runtime_resume (err 0) kernel: [ 826.462486] hci_nokia: Unknown symbol serdev_device_close (err 0) kernel: [ 826.462524] hci_nokia: Unknown symbol cancel_work_sync (err 0) kernel: [ 826.462546] hci_nokia: Unknown symbol btbcm_set_bdaddr (err 0) kernel: [ 826.462567] hci_nokia: Unknown symbol clk_disable (err 0) kernel: [ 826.462610] hci_nokia: Unknown symbol __pm_runtime_disable (err 0) kernel: [ 826.462632] hci_nokia: Unknown symbol hci_uart_register_device (err 0) kernel: [ 826.462653] hci_nokia: Unknown symbol clk_enable (err 0) kernel: [ 826.462675] hci_nokia: Unknown symbol __pm_runtime_idle (err 0) kernel: [ 826.462700] hci_nokia: Unknown symbol clk_unprepare (err 0) Signed-off-by: Frédéric Danis Acked-by: Sebastian Reichel Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_nokia.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ab89f0bdd63a3721f7cd3f064f39fc4ac7ca14d4 Author: Szymon Janc Date: Mon Apr 24 18:25:04 2017 -0700 Bluetooth: Fix user channel for 32bit userspace on 64bit kernel Running 32bit userspace on 64bit kernel results in MSG_CMSG_COMPAT being defined as 0x80000000. This results in sendmsg failure if used from 32bit userspace running on 64bit kernel. Fix this by accounting for MSG_CMSG_COMPAT in flags check in hci_sock_sendmsg. Signed-off-by: Szymon Janc Signed-off-by: Marko Kiiskila Signed-off-by: Marcel Holtmann Cc: stable@vger.kernel.org net/bluetooth/hci_sock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 763d9a302ab18da0a0078c9788ed6566d0c974e3 Author: Salvatore Benedetto Date: Tue Apr 25 16:59:47 2017 +0100 Bluetooth: allocate data for kpp on heap Bluetooth would crash when computing ECDH keys with kpp if VMAP_STACK is enabled. Fix by allocating data passed to kpp on heap. Fixes: 58771c1c ("Bluetooth: convert smp and selftest to crypto kpp API") Signed-off-by: Salvatore Benedetto Signed-off-by: Marcel Holtmann net/bluetooth/ecdh_helper.c | 22 ++++++++++++++++------ net/bluetooth/selftest.c | 22 +++++++++++++++++----- 2 files changed, 33 insertions(+), 11 deletions(-) commit 216646e4d82e847791f0ba66c439dedd36cb119f Author: Wei Yongjun Date: Thu Apr 27 15:21:13 2017 +0000 irqchip/mbigen: Fix return value check in mbigen_device_probe() In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). Use devm_ioremap_resource() instead of devm_ioremap() to fix the IS_ERR() test issue. Fixes: 76e1f77f9c26 ("irqchip/mbigen: Introduce mbigen_of_create_domain()") Signed-off-by: Wei Yongjun Cc: Marc Zyngier Cc: Kefeng Wang Cc: Jason Cooper Link: http://lkml.kernel.org/r/20170427152113.31147-1-weiyj.lk@gmail.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-mbigen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e21c7316d8ddcf1fd679591d1427e937999a7cf5 Author: Roy Pledge Date: Mon Apr 17 16:55:19 2017 -0400 soc/fsl/qbman: Disable IRQs for deferred QBMan work Work for Congestion State Notifications (CSCN) and Message Ring (MR) handling is handled via the workqueue mechanism. This requires the driver to disable those IRQs before scheduling the work and re-enabling it once the work is completed so that the interrupt doesn't continually fire. Signed-off-by: Roy Pledge Signed-off-by: Scott Wood drivers/soc/fsl/qbman/qman.c | 5 +++++ 1 file changed, 5 insertions(+) commit 4ba251626ff1ac3447f9a05ecfcec7f85b6c8a91 Author: Valentin Longchamp Date: Fri Feb 17 11:29:47 2017 +0100 soc/fsl/qe: add EXPORT_SYMBOL for the 2 qe_tdm functions This allows to build the fsl_ucc_hdlc driver as a module. Signed-off-by: Valentin Longchamp Signed-off-by: Scott Wood drivers/soc/fsl/qe/qe_tdm.c | 2 ++ 1 file changed, 2 insertions(+) commit e5c5c8d23fef2a976afe724f30e34da31be09769 Author: Valentin Longchamp Date: Fri Feb 17 11:29:46 2017 +0100 soc/fsl/qe: only apply QE_General4 workaround on affected SoCs The QE_General4 workaround is only valid for the MPC832x and MPC836x SoCs. The other SoCs that embed a QUICC engine are not affected by this hardware bug and thus can use the computed divisors (this was successfully tested on the T1040). Similalry to what was done in commit 8ce795cb0c6b ("i2c: mpc: assign the correct prescaler from SVR") in order to avoid changes in the device tree nodes of the QE (with maybe a variant of the compatible property), the PVR reg is read out to find out if the workaround must be applied or not. Signed-off-by: Valentin Longchamp Signed-off-by: Scott Wood drivers/soc/fsl/qe/qe.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 2ccf80b7566cc035d903dd0ac5d7ebd25c2c1060 Author: Valentin Longchamp Date: Fri Feb 17 11:29:45 2017 +0100 soc/fsl/qe: round brg_freq to 1kHz granularity Because of integer computation rounding in u-boot (that sets the QE brg-frequency DTS prop), the clk value is 99999999 Hz even though it is 100 MHz. When setting brg clks that are exact divisors of 100 MHz, this small differnce plays a role and can result in lower clks to be output (for instance 20 MHz - divide by 5 - results in 16.666 MHz - divide by 6). This patch fixes that by "forcing" the brg_clk to the nearest kHz when the difference is below 2 integer rounding errors (i.e. 4). Signed-off-by: Valentin Longchamp Signed-off-by: Scott Wood drivers/soc/fsl/qe/qe.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b54ea82f01282253c85eb7e2fd2b6c96f7a027d8 Author: Christophe Leroy Date: Tue Feb 7 10:05:11 2017 +0100 soc/fsl/qe: get rid of immrbar_virt_to_phys() immrbar_virt_to_phys() is not used anymore Signed-off-by: Christophe Leroy Acked-by: Li Yang Signed-off-by: Scott Wood drivers/soc/fsl/qe/qe.c | 4 +--- include/soc/fsl/qe/immap_qe.h | 19 ------------------- 2 files changed, 1 insertion(+), 22 deletions(-) commit 8b8642af15ed14b9a7a34d3401afbcc274533e13 Author: Christophe Leroy Date: Tue Feb 7 10:05:09 2017 +0100 net: ethernet: ucc_geth: fix MEM_PART_MURAM mode Since commit 5093bb965a163 ("powerpc/QE: switch to the cpm_muram implementation"), muram area is not part of immrbar mapping anymore so immrbar_virt_to_phys() is not usable anymore. Fixes: 5093bb965a163 ("powerpc/QE: switch to the cpm_muram implementation") Signed-off-by: Christophe Leroy Acked-by: David S. Miller Acked-by: Li Yang Signed-off-by: Scott Wood drivers/net/ethernet/freescale/ucc_geth.c | 8 +++----- include/soc/fsl/qe/qe.h | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) commit 0997e378be1d888a5d093eeee55f842cdfe55ebe Author: Colin Ian King Date: Sat Apr 29 22:52:55 2017 +0100 ALSA: ali5451: fix spelling mistake in "ali_capture_preapre" trivial fix to spelling mistake in dev_warn message, "ali_capture_preapre" should be "ali_capture_prepare" Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/pci/ali5451/ali5451.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd615f69a18a9d4aa5ef02a1dc83f319f75da8e7 Author: LiuHailong Date: Tue Feb 7 10:35:52 2017 +0800 powerpc/64e: Fix hang when debugging programs with relocated kernel Debug interrupts can be taken during interrupt entry, since interrupt entry does not automatically turn them off. The kernel will check whether the faulting instruction is between [interrupt_base_book3e, __end_interrupts], and if so clear MSR[DE] and return. However, when the kernel is built with CONFIG_RELOCATABLE, it can't use LOAD_REG_IMMEDIATE(r14,interrupt_base_book3e) and LOAD_REG_IMMEDIATE(r15,__end_interrupts), as they ignore relocation. Thus, if the kernel is actually running at a different address than it was built at, the address comparison will fail, and the exception entry code will hang at kernel_dbg_exc. r2(toc) is also not usable here, as r2 still holds data from the interrupted context, so LOAD_REG_ADDR() doesn't work either. So we use the *name@got* to get the EV of two labels directly. Test programs test.c shows as follows: int main(int argc, char *argv[]) { if (access("/proc/sys/kernel/perf_event_paranoid", F_OK) == -1) printf("Kernel doesn't have perf_event support\n"); } Steps to reproduce the bug, for example: 1) ./gdb ./test 2) (gdb) b access 3) (gdb) r 4) (gdb) s Signed-off-by: Liu Hailong Signed-off-by: Jiang Xuexin Reviewed-by: Jiang Biao Reviewed-by: Liu Song Reviewed-by: Huang Jian [scottwood: cleaned up commit message, and specified bad behavior as a hang rather than an oops to correspond to mainline kernel behavior] Fixes: 1cb6e0649248 ("powerpc/book3e: support CONFIG_RELOCATABLE") Cc: # 4.4.x- Signed-off-by: Scott Wood arch/powerpc/kernel/exceptions-64e.S | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 960e6994ad9cf10ddd4d3680a2d6cf5159c93a83 Author: Joe Richey Date: Thu Apr 6 16:14:28 2017 -0700 fscrypt: Remove __packed from fscrypt_policy This commit removes __packed from fscrypt_policy as it does not contain any implicit padding and does not refer to an on-disk structure. Even though this is a change to a UAPI file, no users will be broken as the structure doesn't change. Signed-off-by: Joe Richey Signed-off-by: Theodore Ts'o include/uapi/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c8268def6127a9d9888b822a74becb80dfeab6f Author: Joe Richey Date: Thu Apr 6 16:14:05 2017 -0700 fscrypt: Move key structure and constants to uapi This commit exposes the necessary constants and structures for a userspace program to pass filesystem encryption keys into the keyring. The fscrypt_key structure was already part of the kernel ABI, this change just makes it so programs no longer have to redeclare these structures (like e4crypt in e2fsprogs currently does). Note that we do not expose the other FS_*_KEY_SIZE constants as they are not necessary. Only XTS is supported for contents_encryption_mode, so currently FS_MAX_KEY_SIZE bytes of key material must always be passed to the kernel. This commit also removes __packed from fscrypt_key as it does not contain any implicit padding and does not refer to an on-disk structure. Signed-off-by: Joe Richey Signed-off-by: Theodore Ts'o fs/crypto/fscrypt_private.h | 11 ----------- include/uapi/linux/fs.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 11 deletions(-) commit 4bfd036221c0bf75a0f475b05e22f7be9abc3101 Author: Eric Biggers Date: Tue Apr 4 14:43:34 2017 -0700 fscrypt: remove fscrypt_symlink_data_len() fscrypt_symlink_data_len() is never called and can be removed. Signed-off-by: Eric Biggers Reviewed-by: Richard Weinberger Signed-off-by: Theodore Ts'o include/linux/fscrypt_common.h | 11 ----------- 1 file changed, 11 deletions(-) commit cd39e4bac11125bc32ba6101b1ceb46ef773f4b6 Author: Eric Biggers Date: Tue Apr 4 14:39:41 2017 -0700 fscrypt: remove unnecessary checks for NULL operations The functions in fs/crypto/*.c are only called by filesystems configured with encryption support. Since the ->get_context(), ->set_context(), and ->empty_dir() operations are always provided in that case (and must be, otherwise there would be no way to get/set encryption policies, or in the case of ->get_context() even access encrypted files at all), there is no need to check for these operations being NULL and we can remove these unneeded checks. Signed-off-by: Eric Biggers Reviewed-by: Richard Weinberger Signed-off-by: Theodore Ts'o fs/crypto/keyinfo.c | 3 --- fs/crypto/policy.c | 11 +---------- 2 files changed, 1 insertion(+), 13 deletions(-) commit 85c8f176a6111ecde9c158109989dbd445a0e59a Author: Andrew Perepechko Date: Sun Apr 30 00:46:35 2017 -0400 ext4: preload block group descriptors With enabled meta_bg option block group descriptors reading IO is not sequential and requires optimization. Signed-off-by: Andrew Perepechko Signed-off-by: Theodore Ts'o fs/ext4/super.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1a20a63084be8fc5b0c1191231dfd311f7fc2afa Author: Eric Biggers Date: Sun Apr 30 00:40:44 2017 -0400 ext4: make ext4_shutdown() static Make the ext4_shutdown() function static, as suggested by running sparse ('make C=2 fs/ext4/'). This was the only such warning in fs/ext4/. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c9ec4beecac94cb450c8abb2ac8b7e8a79240ea Author: Darrick J. Wong Date: Sun Apr 30 00:36:53 2017 -0400 ext4: support GETFSMAP ioctls Support the GETFSMAP ioctls so that we can use the xfs free space management tools to probe ext4 as well. Note that this is a partial implementation -- we only report fixed-location metadata and free space; everything else is reported as "unknown". Signed-off-by: Darrick J. Wong Signed-off-by: Theodore Ts'o fs/ext4/Makefile | 10 +- fs/ext4/fsmap.c | 722 ++++++++++++++++++++++++++++++++++++++++++++ fs/ext4/fsmap.h | 69 +++++ fs/ext4/ioctl.c | 90 ++++++ fs/ext4/mballoc.c | 49 +++ fs/ext4/mballoc.h | 17 ++ fs/ext4/super.c | 1 + include/trace/events/ext4.h | 74 +++++ 8 files changed, 1027 insertions(+), 5 deletions(-) commit d0649f0416feb616d34d15e541716cb8a555e899 Author: Darrick J. Wong Date: Sun Apr 30 00:35:34 2017 -0400 vfs: add common GETFSMAP ioctl definitions Add the GETFSMAP headers to the VFS kernel headers Signed-off-by: Darrick J. Wong Signed-off-by: Theodore Ts'o include/uapi/linux/fsmap.h | 112 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) commit 7b4cc9787fe35b3ee2dfb1c35e22eafc32e00c33 Author: Eric Biggers Date: Sun Apr 30 00:10:50 2017 -0400 ext4: evict inline data when writing to memory map Currently the case of writing via mmap to a file with inline data is not handled. This is maybe a rare case since it requires a writable memory map of a very small file, but it is trivial to trigger with on inline_data filesystem, and it causes the 'BUG_ON(ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA));' in ext4_writepages() to be hit: mkfs.ext4 -O inline_data /dev/vdb mount /dev/vdb /mnt xfs_io -f /mnt/file \ -c 'pwrite 0 1' \ -c 'mmap -w 0 1m' \ -c 'mwrite 0 1' \ -c 'fsync' kernel BUG at fs/ext4/inode.c:2723! invalid opcode: 0000 [#1] SMP CPU: 1 PID: 2532 Comm: xfs_io Not tainted 4.11.0-rc1-xfstests-00301-g071d9acf3d1f #633 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-20170228_101828-anatol 04/01/2014 task: ffff88003d3a8040 task.stack: ffffc90000300000 RIP: 0010:ext4_writepages+0xc89/0xf8a RSP: 0018:ffffc90000303ca0 EFLAGS: 00010283 RAX: 0000028410000000 RBX: ffff8800383fa3b0 RCX: ffffffff812afcdc RDX: 00000a9d00000246 RSI: ffffffff81e660e0 RDI: 0000000000000246 RBP: ffffc90000303dc0 R08: 0000000000000002 R09: 869618e8f99b4fa5 R10: 00000000852287a2 R11: 00000000a03b49f4 R12: ffff88003808e698 R13: 0000000000000000 R14: 7fffffffffffffff R15: 7fffffffffffffff FS: 00007fd3e53094c0(0000) GS:ffff88003e400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fd3e4c51000 CR3: 000000003d554000 CR4: 00000000003406e0 Call Trace: ? _raw_spin_unlock+0x27/0x2a ? kvm_clock_read+0x1e/0x20 do_writepages+0x23/0x2c ? do_writepages+0x23/0x2c __filemap_fdatawrite_range+0x80/0x87 filemap_write_and_wait_range+0x67/0x8c ext4_sync_file+0x20e/0x472 vfs_fsync_range+0x8e/0x9f ? syscall_trace_enter+0x25b/0x2d0 vfs_fsync+0x1c/0x1e do_fsync+0x31/0x4a SyS_fsync+0x10/0x14 do_syscall_64+0x69/0x131 entry_SYSCALL64_slow_path+0x25/0x25 We could try to be smart and keep the inline data in this case, or at least support delayed allocation when allocating the block, but these solutions would be more complicated and don't seem worthwhile given how rare this case seems to be. So just fix the bug by calling ext4_convert_inline_data() when we're asked to make a page writable, so that any inline data gets evicted, with the block allocated immediately. Reported-by: Nick Alcock Cc: stable@vger.kernel.org Reviewed-by: Andreas Dilger Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6ba644b9fd8ce243687139dbd8ca918ad4b09f61 Author: Eric Biggers Date: Sun Apr 30 00:01:02 2017 -0400 ext4: remove ext4_xattr_check_entry() ext4_xattr_check_entry() was redundant with validation of the full xattr entries list in ext4_xattr_check_entries(), which all callers also did. ext4_xattr_check_entry() also didn't actually do correct validation; specifically, it never checked that the value doesn't overlap the xattr names, nor did it account for padding when checking whether the xattr value overflows the available space. So remove it to eliminate any potential confusion. Signed-off-by: Eric Biggers Reviewed-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) commit 2c4f9923374843384cfd3a2edc0f02c19a7a29e2 Author: Eric Biggers Date: Sat Apr 29 23:56:52 2017 -0400 ext4: rename ext4_xattr_check_names() to ext4_xattr_check_entries() ext4_xattr_check_names() actually validates both the xattr names and values, not just the names. So rename it to ext4_xattr_check_entries() to avoid confusion. Signed-off-by: Eric Biggers Reviewed-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ba7ea1d8f45383cb88858057e9bf60cd8cf3b898 Author: Eric Biggers Date: Sat Apr 29 23:53:17 2017 -0400 ext4: merge ext4_xattr_list() into ext4_listxattr() There's no difference between ext4_xattr_list() and ext4_listxattr(), so merge them together and just have ext4_listxattr(). Some years ago they took different arguments, but that's no longer the case. Signed-off-by: Eric Biggers Reviewed-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/xattr.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit d60061867303aa2fee516e9a34efc15e78d975a9 Author: Eric Biggers Date: Sat Apr 29 23:47:50 2017 -0400 ext4: constify static data that is never modified Constify static data in ext4 that is never (intentionally) modified so that it is placed in .rodata and benefits from memory protection. Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 4 ++-- fs/ext4/mballoc.c | 2 +- fs/ext4/super.c | 5 +++-- fs/ext4/sysfs.c | 8 ++++---- fs/ext4/xattr.c | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) commit 1bc0af600b011dbbf9bbf39664b858ea2e365729 Author: Eric Biggers Date: Sat Apr 29 23:27:26 2017 -0400 ext4: trim return value and 'dir' argument from ext4_insert_dentry() In the initial implementation of ext4 encryption, the filename was encrypted in ext4_insert_dentry(), which could fail and also required access to the 'dir' inode. Since then ext4 filename encryption has been changed to encrypt the filename earlier, so we can revert the additions to ext4_insert_dentry(). Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 9 ++++----- fs/ext4/inline.c | 2 +- fs/ext4/namei.c | 17 ++++++----------- 3 files changed, 11 insertions(+), 17 deletions(-) commit c08bac03d2894113bdb114e66e6ada009defb120 Merge: 4c042a8 e60ae00 Author: David S. Miller Date: Sat Apr 29 23:16:20 2017 -0400 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2017-04-29 This series contains updates to ixgbe and ixgbevf only, most notable is the addition of XDP support to our 10GbE drivers. Paul fixes ixgbe to acquire the PHY semaphore before accessing PHY registers when issuing a device reset. John adds XDP support (yeah!) for ixgbe. Emil fixes an issue by flushing the MACVLAN filters on VF reset to avoid conflicts with other VFs that may end up using the same MAC address. Also fixed a bug where ethtool -S displayed some empty fields for ixgbevf because it was using ixgbe_stats instead ixgbevf_stats for IXGBEVF_QUEUE_STATS_LEN. Tony adds the ability to specify a zero MAC address in order to clear the VF's MAC address from the RAR table. Also adds support for a new 1000Base-T device based on x550EM_X MAC type. Fixed an issue where the RSS key specified by the user would be over-written with a pre-existing value, so change the rss_key to a pointer so we can check to see if the key has a value set before attempting to set it. Fixed the logic for mailbox support for getting RETA and RSS values, which are only supported by 82599 and x540 devices. v2: fixed up patches #2 and #3 based on feedback from Jakub and to address build issues when page sizes are larger than 4k ==================== Signed-off-by: David S. Miller commit e60ae00361bf4e5ef08cde5a30f131cf287ffe30 Author: Tony Nguyen Date: Thu Apr 13 07:26:07 2017 -0700 ixgbevf: Check for RSS key before setting value The RSS key is being repopulated every time the interface is brought up regardless of whether there is an existing value. If the user sets the RSS key and the interface is brought up (e.g. reset), the user specified RSS key will be overwritten. This patch changes the rss_key to a pointer so we can check to see if the key has been populated and preserve it accordingly. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ethtool.c | 3 ++- drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 2 +- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 33 +++++++++++++++++++++-- 3 files changed, 34 insertions(+), 4 deletions(-) commit 82fb670c5fdd5662c406871a6c21ebd55ba68e45 Author: Tony Nguyen Date: Thu Apr 13 07:26:06 2017 -0700 ixgbevf: Fix errors in retrieving RETA and RSS from PF Mailbox support for getting RETA and RSS is available for only 82599 and x540; a previous patch reversed the logic and these adapters were returning not supported. Also, the NACK check in ixgbevf_get_rss_key_locked() was checking for the command IXGBE_VF_GET_RETA instead of IXGBE_VF_GET_RSS_KEY. This patch corrects both issues by correcting the logic and checking for the right command. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/vf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3dfbfc7ebb959d68b35d5ca3b7499cc73dc57261 Author: Tony Nguyen Date: Thu Apr 13 07:26:05 2017 -0700 ixgbe: Check for RSS key before setting value The RSS key is being repopulated every time the interface is brought up regardless of whether there is an existing value. If the user sets the RSS key and the interface is brought up (e.g. reset), the user specified RSS key will be overwritten. This patch changes the rss_key to a pointer so we can check to see if the key has been populated and preserve it accordingly. Signed-off-by: Tony Nguyen 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 | 30 ++++++++++++++++++++++-- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 +- 4 files changed, 31 insertions(+), 7 deletions(-) commit 8dc963e1cd245e67d6a9ffb8447fc88fb6eaa370 Author: Paul Greenwalt Date: Thu Apr 13 08:07:07 2017 -0400 ixgbe: Add 1000Base-T device based on X550EM_X MAC Add support for new 1000Base-T device based on X550EM_X MAC type. All PHY operations are disabled as the PHY is controlled by FW. Signed-off-by: Paul Greenwalt Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 45 ++++++++++++++++++++++++++- 4 files changed, 49 insertions(+), 1 deletion(-) commit 27bdc44cdb2a8d96322d5978895eaae881fb8c2d Author: Tony Nguyen Date: Wed Apr 12 13:35:22 2017 -0700 ixgbe: Allow setting zero MAC address for VF Currently, there is no logic that allows a VF's MAC address to be removed from the RAR table. Allow the user to specify a zero MAC address in order to clear the VF's MAC address from the RAR table. This functionality is also utilized by libvirt when removing VFs. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 28 +++++++++++++++++--------- 1 file changed, 18 insertions(+), 10 deletions(-) commit f87fc44770f54ff1b54d44ae9cec11f10efeca02 Author: Emil Tantilov Date: Thu Mar 30 20:49:02 2017 -0700 ixgbevf: fix size of queue stats length IXGBEVF_QUEUE_STATS_LEN is based on ixgebvf_stats, not ixgbe_stats. This change fixes a bug where ethtool -S displayed some empty fields. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e251ecf75226d5ff772df1ef170b8b981308dc68 Author: Emil Tantilov Date: Tue Mar 28 11:27:54 2017 -0700 ixgbe: clean macvlan MAC filter table on VF reset Flush the macvlan filters on VF reset to avoid conflict with other VFs that may end up using the same MAC address. The main change here is the call to ixgbe_set_vf_macvlan() with index 0. Moved ixgbe_set_vf_macvlan() in front of ixgbe_vf_reset_event() to avoid adding a prototype. Reported-by: Sritej Kanakadandi Sritej Rama Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 105 +++++++++++++------------ 1 file changed, 53 insertions(+), 52 deletions(-) commit 7379f97a4fce3c1aa3b80a85cb8440453bf30411 Author: John Fastabend Date: Tue Mar 28 09:47:03 2017 -0700 ixgbe: delay tail write to every 'n' packets Current XDP implementation hits the tail on every XDP_TX return code. This patch changes driver behavior to only hit the tail after packet processing is complete. With this patch I can run XDP drop programs @ 14+Mpps and XDP_TX programs are at ~13.5Mpps. Signed-off-by: John Fastabend Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 28 ++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit 33fdc82f08835de4c39a00657742f5b11db00d32 Author: John Fastabend Date: Mon Apr 24 03:30:18 2017 -0700 ixgbe: add support for XDP_TX action A couple design choices were made here. First I use a new ring pointer structure xdp_ring[] in the adapter struct instead of pushing the newly allocated XDP TX rings into the tx_ring[] structure. This means we have to duplicate loops around rings in places we want to initialize both TX rings and XDP rings. But by making it explicit it is obvious when we are using XDP rings and when we are using TX rings. Further we don't have to do ring arithmatic which is error prone. As a proof point for doing this my first patches used only a single ring structure and introduced bugs in FCoE code and macvlan code paths. Second I am aware this is not the most optimized version of this code possible. I want to get baseline support in using the most readable format possible and then once this series is included I will optimize the TX path in another series of patches. Signed-off-by: John Fastabend Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 19 +- drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 25 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 75 +++++- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 282 +++++++++++++++++++---- 4 files changed, 348 insertions(+), 53 deletions(-) commit 9247080816297de4e31abb684939c0e53e3a8a67 Author: John Fastabend Date: Mon Apr 24 03:30:17 2017 -0700 ixgbe: add XDP support for pass and drop actions Basic XDP drop support for ixgbe. Uses READ_ONCE/xchg semantics on XDP programs instead of RCU primitives as suggested by Daniel Borkmann and Alex Duyck. v2: fix the build issues seen w/ XDP when page sizes are larger than 4K and made minor fixes based on feedback from Jakub Kicinski Signed-off-by: John Fastabend Acked-by: Alexander Duyck Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 4 +- drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 169 +++++++++++++++++++---- 3 files changed, 148 insertions(+), 29 deletions(-) commit 5052b069acf73866d00077d8bc49983c3ee903e5 Author: Jan Kara Date: Sat Apr 29 21:07:30 2017 -0400 jbd2: fix dbench4 performance regression for 'nobarrier' mounts Commit b685d3d65ac7 "block: treat REQ_FUA and REQ_PREFLUSH as synchronous" removed REQ_SYNC flag from WRITE_FUA implementation. Since JBD2 strips REQ_FUA and REQ_FLUSH flags from submitted IO when the filesystem is mounted with nobarrier mount option, journal superblock writes ended up being async writes after this patch and that caused heavy performance regression for dbench4 benchmark with high number of processes. In my test setup with HP RAID array with non-volatile write cache and 32 GB ram, dbench4 runs with 8 processes regressed by ~25%. Fix the problem by making sure journal superblock writes are always treated as synchronous since they generally block progress of the journalling machinery and thus the whole filesystem. Fixes: b685d3d65ac791406e0dfd8779cc9b3707fea5a3 CC: stable@vger.kernel.org Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/jbd2/journal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c52c47e4b4fbe4284602fc2ccbfc4a4d8dc05b49 Author: Jan Kara Date: Sat Apr 29 20:12:16 2017 -0400 jbd2: Fix lockdep splat with generic/270 test I've hit a lockdep splat with generic/270 test complaining that: 3216.fsstress.b/3533 is trying to acquire lock: (jbd2_handle){++++..}, at: [] jbd2_log_wait_commit+0x0/0x150 but task is already holding lock: (jbd2_handle){++++..}, at: [] start_this_handle+0x35b/0x850 The underlying problem is that jbd2_journal_force_commit_nested() (called from ext4_should_retry_alloc()) may get called while a transaction handle is started. In such case it takes care to not wait for commit of the running transaction (which would deadlock) but only for a commit of a transaction that is already committing (which is safe as that doesn't wait for any filesystem locks). In fact there are also other callers of jbd2_log_wait_commit() that take care to pass tid of a transaction that is already committing and for those cases, the lockdep instrumentation is too restrictive and leading to false positive reports. Fix the problem by calling jbd2_might_wait_for_commit() from jbd2_log_wait_commit() only if the transaction isn't already committing. Fixes: 1eaa566d368b214d99cbb973647c1b0b8102a9ae Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/jbd2/journal.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 23f4984483623cf8621246004228f08fcabf51e4 Author: Dan Williams Date: Sat Apr 29 15:24:03 2017 -0700 libnvdimm: rework region badblocks clearing Toshi noticed that the new support for a region-level badblocks missed the case where errors are cleared due to BTT I/O. An initial attempt to fix this ran into a "sleeping while atomic" warning due to taking the nvdimm_bus_lock() in the BTT I/O path to satisfy the locking requirements of __nvdimm_bus_badblocks_clear(). However, that lock is not needed since we are not acting on any data that is subject to change under that lock. The badblocks instance has its own internal lock to handle mutations of the error list. So, in order to make it clear that we are just acting on region devices, rename __nvdimm_bus_badblocks_clear() to nvdimm_clear_badblocks_regions(). Eliminate the lock and consolidate all support routines for the new nvdimm_account_cleared_poison() in drivers/nvdimm/bus.c. Finally, to the opportunity to cleanup to some unnecessary casts, make the calling convention of nvdimm_clear_badblocks_regions() clearer by replacing struct resource with the minimal struct clear_badblocks_context, and use the DEVICE_ATTR macro. Cc: Dave Jiang Cc: Vishal Verma Reported-by: Toshi Kani Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 76 +++++++++++++++++++++++++++++++------------- drivers/nvdimm/region.c | 25 --------------- drivers/nvdimm/region_devs.c | 15 +++------ include/linux/libnvdimm.h | 3 -- 4 files changed, 59 insertions(+), 60 deletions(-) commit 9280cdd6fe5b8287a726d24cc1d558b96c8491d7 Author: Mark Charlebois Date: Fri Apr 28 15:15:12 2017 -0700 fs: compat: Remove warning from COMPATIBLE_IOCTL cmd in COMPATIBLE_IOCTL is always a u32, so cast it so there isn't a warning about an overflow in XFORM. From: Mark Charlebois Signed-off-by: Mark Charlebois Signed-off-by: Behan Webster Signed-off-by: Matthias Kaehlcke Acked-by: Arnd Bergmann Signed-off-by: Al Viro fs/compat_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b33540f9d751b565c270d23a077ee6d9fc9e1d5 Author: Al Viro Date: Sat Apr 29 17:42:25 2017 -0400 remove pointless extern of atime_need_update_rcu() Signed-off-by: Al Viro fs/internal.h | 2 -- 1 file changed, 2 deletions(-) commit 929562b144783b9212625305eadcbbd800809643 Author: Wei Yongjun Date: Tue Apr 25 14:35:42 2017 +0000 crypto: stm32 - Fix OF module alias information The module alias information passed to MODULE_DEVICE_TABLE() should use stm32_dt_ids instead of undefined sti_dt_ids. Fixes: b51dbe90912a ("crypto: stm32 - Support for STM32 CRC32 crypto module") Signed-off-by: Wei Yongjun Signed-off-by: Herbert Xu drivers/crypto/stm32/stm32_crc32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f18b82c3437a398562e748c22fcd2f71c2e230c Author: Trond Myklebust Date: Sat Apr 29 10:10:17 2017 -0400 pNFS: Ensure we commit the layout if it has been invalidated If the layout is being invalidated on the server, then we must invoke nfs_commit_inode() to ensure any commits to the DS get cleared out. Signed-off-by: Trond Myklebust fs/nfs/nfs42proc.c | 1 + fs/nfs/nfs4proc.c | 1 + fs/nfs/pnfs.c | 3 +++ 3 files changed, 5 insertions(+) commit 722f0b891198ab1f5f7b020e32c989a517ed0577 Author: Trond Myklebust Date: Sat Apr 29 10:27:18 2017 -0400 pNFS: Don't send COMMITs to the DSes if the server invalidated our layout If the layout was invalidated, then assume we should requeue all the pending writes for the DS in question. Signed-off-by: Trond Myklebust fs/nfs/pnfs_nfs.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 271393ba6e2ac384a14e581d34d5d72c5953e3c6 Author: Mario Kleiner Date: Sat Apr 29 06:11:30 2017 +0200 drm/nouveau/fb/gf100-: Fix 32 bit wraparound in new ram detection A missing u64 cast causes a 32-Bit wraparound from 4096 MiB to 0 MiB and therefore total 0 MiB VRAM detected if card has 4096 Mib per FBP. Signed-off-by: Mario Kleiner Reviewed-by: Karol Herbst Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48907c23ea3307a6b6368698c1e786152cd45588 Author: Wei Yongjun Date: Tue Apr 25 14:36:42 2017 +0000 drm/nouveau/secboot/gm20b: fix the error return code in gm20b_secboot_tegra_read_wpr() The error return code PTR_ERR(mc) is always 0 since mc is equal to 0 in this error handling case. Signed-off-by: Wei Yongjun Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60b95d709525e3ce1c51e1fc93175dcd1755d345 Author: Mario Kleiner Date: Mon Apr 24 01:59:34 2017 +0200 drm/nouveau/kms: Increase max retries in scanout position queries. So far we only allowed for 1 retry and just failed the query - and thereby high precision vblank timestamping - if we did not get a reasonable result, as such a failure wasn't considered all too horrible. There are a few NVidia gpu models out there which may need a bit more than 1 retry to get a successful query result under some conditions. Since Linux 4.4 the update code for vblank counter and timestamp in drm_update_vblank_count() changed so that the implementation assumes that high precision vblank timestamping of a kms driver either consistently succeeds or consistently fails for a given video mode and encoder/connector combo. Iow. switching from success to fail or vice versa on a modeset or connector change is ok, but spurious temporary failure for a given setup can confuse the core code and potentially cause bad miscounting of vblanks and confusion or hangs in userspace clients which rely on vblank stuff, e.g., desktop compositors. Therefore change the max retry count to a larger number - more than any gpu so far is known to need to succeed, but still low enough so that these queries which do also happen in vblank interrupt are still fast enough to be not disastrously long if something would go badly wrong with them. As such sporadic retries only happen seldom even on affected gpu's, this could mean a vblank irq could take a few dozen microseconds longer every few hours of uptime -- better than a desktop compositor randomly hanging every couple of hours or days of uptime in a hard to reproduce manner. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7cb78bab3671dbad08e5b2f5fd83a6dbda90fe5 Author: Ben Skeggs Date: Tue Apr 11 08:25:22 2017 +1000 drm/nouveau/bios/bitP: check that table is long enough for optional pointers Fixes OOB VBIOS accesses on some boards. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bios/boost.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bios/cstep.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bios/power_budget.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bios/vpstate.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit eef4988ab4c1a99e88e535502a67763a78d51515 Author: Ilia Mirkin Date: Mon Apr 3 22:46:14 2017 -0400 drm/nouveau/fifo/nv40: no ctxsw for pre-nv44 mpeg engine Signed-off-by: Ilia Mirkin drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c | 2 ++ 1 file changed, 2 insertions(+) commit 1519fccb34371594f6a629bfad69605bc6f9dde3 Author: Pablo Neira Ayuso Date: Fri Apr 28 16:54:37 2017 +0200 netfilter: update MAINTAINERS file Several updates on the MAINTAINERS section for Netfilter: 1) Add Florian Westphal, he's been part of the coreteam since October 2012. He's been dedicating tireless efforts to improve the Netfilter codebase, fix bugs and push ongoing new developments ever since. 2) Add http://www.nftables.org/ URL, currently pointing to http://www.netfilter.org. 3) Update project status from Supported to Maintained. Signed-off-by: Pablo Neira Ayuso Acked-by: Florian Westphal MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 37f8aa16da8e9239092429e7a6dadf352897a92d Author: Trond Myklebust Date: Sat Apr 29 00:02:37 2017 -0400 pNFS/flexfiles: Fix up the ff_layout_write_pagelist failure path If the attempt to write through pNFS fails, we need to use the same failure semantics as for the read path: If the FF_FLAGS_NO_IO_THRU_MDS flag is set or we have sufficient valid DSes, then we must retry through pNFS Fixes: d67ae825a59d ("pnfs/flexfiles: Add the FlexFile Layout Driver") Signed-off-by: Trond Myklebust fs/nfs/flexfilelayout/flexfilelayout.c | 11 ++++++++--- fs/nfs/pnfs.c | 14 +++++++++++++- 2 files changed, 21 insertions(+), 4 deletions(-) commit d66bb1607e2d8d384e53f3d93db5c18483c8c4f7 Author: Takashi Iwai Date: Fri Apr 28 15:00:15 2017 +0200 proc: Fix unbalanced hard link numbers proc_create_mount_point() forgot to increase the parent's nlink, and it resulted in unbalanced hard link numbers, e.g. /proc/fs shows one less than expected. Fixes: eb6d38d5427b ("proc: Allow creating permanently empty directories...") Cc: stable@vger.kernel.org Reported-by: Tristan Ye Signed-off-by: Takashi Iwai Signed-off-by: Eric W. Biederman fs/proc/generic.c | 1 + 1 file changed, 1 insertion(+) commit 6133406be1aabfb041f024109efc41756970800e Author: Paul Greenwalt Date: Mon Mar 13 05:47:56 2017 -0400 ixgbe: Acquire PHY semaphore before device reset A recent firmware change fixed an issue to acquire the PHY semaphore before accessing PHY registers. This led to a case where SW can issue a device reset clearing the MDIO registers. This patch makes SW acquire the PHY semaphore before issuing a device reset. Signed-off-by: Paul Greenwalt Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c | 8 ++++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 8 ++++++++ 2 files changed, 16 insertions(+) commit 2196f2716292c39b35c86f5238ed16a8978f9ad4 Author: Dasaratharaman Chandramouli Date: Fri Apr 28 19:20:26 2017 -0400 IB/SA: Add support to query opa classport info. For OPA devices, SA will query the OPA classport info instead of the IB defined classport info. opa classport info exposes additional information and capabilities that are specific to OPA devices. Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Reviewed-by: Dennis Dalessandro Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/sa_query.c | 182 ++++++++++++++++++++++++++++++++----- include/rdma/ib_sa.h | 1 + 2 files changed, 158 insertions(+), 25 deletions(-) commit 7699a6a36b82f22cb0b355c6411531abedf12964 Author: Dan Williams Date: Fri Apr 28 13:54:30 2017 -0700 acpi, nfit: kill ACPI_NFIT_DEBUG Inevitably when one actually needs to debug a DSM issue it's on a distribution kernel that has CONFIG_ACPI_NFIT_DEBUG=n. The config symbol was only there to avoid the compile error due to the missing fallback for print_hex_dump_debug in the CONFIG_DYNAMIC_DEBUG=n case. That was fixed with commit cdf17449af1d "hexdump: do not print debug dumps for !CONFIG_DEBUG", so the config symbol can just be dropped. Cc: Joe Perches Signed-off-by: Dan Williams drivers/acpi/nfit/Kconfig | 12 ------------ drivers/acpi/nfit/core.c | 21 ++++++++------------- 2 files changed, 8 insertions(+), 25 deletions(-) commit 8d13c0290655b883df9083a2a0af0d782bc38aef Author: Toshi Kani Date: Thu Apr 27 16:57:05 2017 -0600 libnvdimm: fix clear length of nvdimm_forget_poison() ND_CMD_CLEAR_ERROR command returns 'clear_err.cleared', the length of error actually cleared, which may be smaller than its requested 'len'. Change nvdimm_clear_poison() to call nvdimm_forget_poison() with 'clear_err.cleared' when this value is valid. Cc: Fixes: e046114af5fc ("libnvdimm: clear the internal poison_list when clearing badblocks") Cc: Dave Jiang Cc: Vishal Verma Signed-off-by: Toshi Kani Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6df97f85611cafc3ba9c093931a5fa3bc7dea897 Author: Darren Hart (VMware) Date: Fri Apr 28 09:36:28 2017 -0700 platform/x86: Make SILEAD_DMI depend on TOUCHSCREEN_SILEAD SILEAD_DMI provides platform specific data for the TOUCHSCREEN_SILEAD driver. Make this explicitly clear in the Kconfig depends. Remove INPUT as this is implied by TOUCHSCREEN_SILEAD. Signed-off-by: Darren Hart (VMware) Cc: Hans de Goede Cc: Andy Shevchenko Cc: Jean Delvare Reviewed-by: Dmitry Torokhov drivers/platform/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 208480bb273e15f42711bd47f70dc0fbfa2570b8 Author: Joerg Roedel Date: Wed Apr 26 15:49:57 2017 +0200 iommu: Remove trace-events include from iommu.h It is not needed there anymore. All places needing it are fixed. Signed-off-by: Joerg Roedel drivers/media/platform/mtk-vpu/mtk_vpu.c | 1 + include/linux/iommu.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) commit 461a6946b1f93f6720577fb06aa78e8cbd9291c9 Author: Joerg Roedel Date: Wed Apr 26 15:46:20 2017 +0200 iommu: Remove pci.h include from trace/events/iommu.h The include file does not need any PCI specifics, so remove that include. Also fix the places that relied on it. Signed-off-by: Joerg Roedel arch/arm64/mm/dma-mapping.c | 1 + drivers/infiniband/hw/qedr/main.c | 1 + drivers/iommu/fsl_pamu.h | 1 + drivers/iommu/rockchip-iommu.c | 1 + drivers/iommu/tegra-smmu.c | 1 + include/linux/dma-iommu.h | 1 + include/trace/events/iommu.h | 1 - 7 files changed, 6 insertions(+), 1 deletion(-) commit aa4656d9a4292018c9746dbad1dad5488e575232 Author: Dasaratharaman Chandramouli Date: Fri Apr 28 17:47:10 2017 -0400 IB/core: Move opa_class_port_info definition to header file Both opa_vnic and the hfi driver use the same opa_classport_info definition. We will also have ib_sa capable of querying opa class port info and would need this definition. Move it to ib_mad.h for everyone to use. Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/mad.c | 25 ------------------------- drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c | 25 ------------------------- include/rdma/ib_mad.h | 25 +++++++++++++++++++++++++ 3 files changed, 25 insertions(+), 50 deletions(-) commit 63ccc191649eb0f14a761074291551d0d2f85389 Author: Christoph Hellwig Date: Tue Apr 25 14:26:52 2017 +0200 libata: remove SCT WRITE SAME support This was already disabled a while ago because it caused I/O errors, and it's severly getting into the way of the discard / write zeroes rework. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 132 ++++++++++------------------------------------ include/linux/ata.h | 5 -- 2 files changed, 29 insertions(+), 108 deletions(-) commit 26b37b946a5c2658dbc37dd5d6df40aaa9685d70 Author: Laurent Pinchart Date: Fri May 15 02:00:02 2015 +0300 arm: dma-mapping: Don't override dma_ops in arch_setup_dma_ops() The arch_setup_dma_ops() function is in charge of setting dma_ops with a call to set_dma_ops(). set_dma_ops() is also called from - highbank and mvebu bus notifiers - dmabounce (to be replaced with swiotlb) - arm_iommu_attach_device (arm_iommu_attach_device is itself called from IOMMU and bus master device drivers) To allow the arch_setup_dma_ops() call to be moved from device add time to device probe time we must ensure that dma_ops already setup by any of the above callers will not be overriden. Aftering replacing dmabounce with swiotlb, converting IOMMU drivers to of_xlate and taking care of highbank and mvebu, the workaround should be removed. Signed-off-by: Sricharan R Signed-off-by: Laurent Pinchart Tested-by: Ralph Sennhauser Signed-off-by: Joerg Roedel arch/arm/mm/dma-mapping.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit c6ade20f5e50e188d20b711a618b20dd1d50457e Author: Christoph Hellwig Date: Tue Apr 25 13:39:54 2017 +0200 libata: reject passthrough WRITE SAME requests The WRITE SAME to TRIM translation rewrites the DATA OUT buffer. While the SCSI code accomodates for this by passing a read-writable buffer userspace applications don't cater for this behavior. In fact it can be used to rewrite e.g. a readonly file through mmap and should be considered as a security fix. Signed-off-by: Christoph Hellwig Cc: stable@vger.kernel.org Reviewed-by: Martin K. Petersen Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9732adc5d6520238223df16630f1f8cad2269317 Author: Zefan Li Date: Wed Apr 19 10:15:59 2017 +0800 cgroup: avoid attaching a cgroup root to two different superblocks, take 2 Commit bfb0b80db5f9 ("cgroup: avoid attaching a cgroup root to two different superblocks") is broken. Now we try to fix the race by delaying the initialization of cgroup root refcnt until a superblock has been allocated. Reported-by: Dmitry Vyukov Reported-by: Andrei Vagin Tested-by: Andrei Vagin Signed-off-by: Zefan Li Signed-off-by: Tejun Heo kernel/cgroup/cgroup-internal.h | 2 +- kernel/cgroup/cgroup-v1.c | 16 +++++++++++++++- kernel/cgroup/cgroup.c | 8 ++++---- 3 files changed, 20 insertions(+), 6 deletions(-) commit d49f2dedf33b8e7752ec66ac2b3b5bf4d7210943 Author: Lorenzo Pieralisi Date: Fri Apr 28 16:59:49 2017 +0100 ACPI/IORT: Fix CONFIG_IOMMU_API dependency The IOMMU probe deferral IORT rework had to add code in iort_iommu_configure() and iort_iommu_xlate() that requires the IOMMU_API to be selected in order to compile and work. Stub out the pieces of code that depend on CONFIG_IOMMU_API to be selected to prevent compilation failures such as: drivers/acpi/arm64/iort.c: In function 'iort_iommu_xlate': drivers/acpi/arm64/iort.c:647:22: error: 'struct iommu_fwspec' has no member named 'ops' by wrapping the code in static inline functions that provide a NOP implementation when CONFIG_IOMMU_API is not selected. Signed-off-by: Lorenzo Pieralisi Reported-by: Arnd Bergmann Cc: Arnd Bergmann Cc: Will Deacon Cc: Catalin Marinas Cc: Robin Murphy Cc: Joerg Roedel Cc: Sricharan R Signed-off-by: Joerg Roedel drivers/acpi/arm64/iort.c | 44 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 10 deletions(-) commit 4486740da2e1cb307f58e0e62f94c92ec7c101a1 Author: David E. Box Date: Sun Apr 23 07:15:20 2017 -0700 powercap: intel_rapl: Add support for Gemini Lake Gemini Lake RAPL support is similar to Goldmont. Signed-off-by: David E. Box Acked-by: Pan, Jacob jun Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl.c | 1 + 1 file changed, 1 insertion(+) commit 8e12188400668046870087fc278404a11c853061 Author: Qiuxu Zhuo Date: Fri Apr 28 01:16:15 2017 +0800 iommu/vt-d: Don't print the failure message when booting non-kdump kernel When booting a new non-kdump kernel, we have below failure message: [ 0.004000] DMAR-IR: IRQ remapping was enabled on dmar2 but we are not in kdump mode [ 0.004000] DMAR-IR: Failed to copy IR table for dmar2 from previous kernel [ 0.004000] DMAR-IR: IRQ remapping was enabled on dmar1 but we are not in kdump mode [ 0.004000] DMAR-IR: Failed to copy IR table for dmar1 from previous kernel [ 0.004000] DMAR-IR: IRQ remapping was enabled on dmar0 but we are not in kdump mode [ 0.004000] DMAR-IR: Failed to copy IR table for dmar0 from previous kernel [ 0.004000] DMAR-IR: IRQ remapping was enabled on dmar3 but we are not in kdump mode [ 0.004000] DMAR-IR: Failed to copy IR table for dmar3 from previous kernel For non-kdump case, we no need to copy IR table from previous kernel so it's nonthing actually failed. To be less alarming or misleading, do not print "DMAR-IR: Failed to copy IR table for dmar[0-9] from previous kernel" messages when booting non-kdump kernel. Signed-off-by: Qiuxu Zhuo Signed-off-by: Joerg Roedel drivers/iommu/intel_irq_remapping.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit c81a1a74037f61c578f6b8218b079aa434e300b4 Author: Michel Dänzer Date: Fri Apr 28 17:28:14 2017 +0900 drm/amdgpu: Make amdgpu_bo_reserve use uninterruptible waits for cleanup Some of these paths probably cannot be interrupted by a signal anyway. Those that can would fail to clean up things if they actually got interrupted. Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 8 ++++---- 16 files changed, 36 insertions(+), 36 deletions(-) commit 8b9242eddd51f17b8306d6c96172fd68ef1106c6 Author: Rex Zhu Date: Thu Apr 27 15:48:56 2017 +0800 drm/amd/powerplay: implement stop dpm task for vega10. Add functions to disable dpm for S3/S4. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 97 ++++++++++++++++++++++ .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 23 +++++ .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.h | 1 + .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 2 +- .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.h | 1 + 5 files changed, 123 insertions(+), 1 deletion(-) commit f8dc9476d9fe25b982e642a733967d7b5fbe5ae3 Author: Rex Zhu Date: Fri Apr 28 12:54:26 2017 +0800 drm/amd/powerplay: complete disable_smc_firmware_ctf_tasks. Disable ctf in eventmgr to fix S3/S4 support. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/eventmgr/eventsubchains.c | 2 +- drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c | 5 +++++ drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) commit 1dfc41d44c20dc3efbd0139d7f991d13c6daa875 Author: Rex Zhu Date: Thu Apr 27 15:46:35 2017 +0800 drm/amd/powerplay: add disable_smc_ctf callback in hwmgr. export disablesmcctf to eventmgr. need to disable temperature alert when s3/s4. otherwise, when resume back,enable temperature alert will fail. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 10 ++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 1 + drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h | 2 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + 4 files changed, 13 insertions(+), 1 deletion(-) commit 10e709cb296c98424c03408d23e3addeddcd4088 Author: Chunming Zhou Date: Thu Apr 27 15:13:52 2017 +0800 drm/amdgpu: fix deadlock of reservation between cs and gpu reset v2 the case could happen when gpu reset: 1. when gpu reset, cs can be continue until sw queue is full, then push job will wait with holding pd reservation. 2. gpu_reset routine will also need pd reservation to restore page table from their shadow. 3. cs is waiting for gpu_reset complete, but gpu reset is waiting for cs releases reservation. v2: handle amdgpu_cs_submit error path. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Reviewed-by: Junwei Zhang Reviewed-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++++ 1 file changed, 4 insertions(+) commit 44eb8c1b33619abc35cba0266ff497c843bd108d Author: Junwei Zhang Date: Thu Apr 27 16:27:43 2017 +0800 drm/amdgpu: bump version for exporting gpu info for gfx9 Signed-off-by: Junwei Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 408bfe7c3c5d036947b509356f494dc6b46025ff Author: Junwei Zhang Date: Thu Apr 27 11:12:07 2017 +0800 drm/amdgpu: export more gpu info for gfx9 v2: 64-bit aligned for gpu info v3: squash in wave_front_fix Signed-off-by: Ken Wang Signed-off-by: Junwei Zhang Reviewed-by: Alex Deucher Reviewed-by: Qiang Yu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 11 +++++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +++ include/uapi/drm/amdgpu_drm.h | 19 +++++++++++++++++++ 4 files changed, 37 insertions(+) commit 2c55b16bf0e1492ba662d884c81d324538cafce1 Author: Christian König Date: Thu Apr 27 17:13:39 2017 +0200 drm/amdgpu: remove unused and mostly unimplemented CGS functions v2 Those functions are all unused and some not even implemented. v2: keep cgs_get_pci_resource, it is used by the ACP driver. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 198 ----------------------- drivers/gpu/drm/amd/include/cgs_common.h | 270 ------------------------------- 2 files changed, 468 deletions(-) commit 00c4855ef874e41d6b9f9b19d1d1e04bc70f0b31 Author: Rex Zhu Date: Fri Apr 21 18:52:12 2017 +0800 drm/amd/powerplay: refine set pcie dpm default table on vega10. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) commit 97782cc93f4440ba2bc111b8c84644b304c56676 Author: Rex Zhu Date: Fri Apr 21 18:33:05 2017 +0800 drm/amd/powerplay: disable cks by default on vega10. run gpu test auto reboot when enable cks right now. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit effa290caa9fa23d13b4531fcf55142a107a3b2a Author: Rex Zhu Date: Fri Apr 21 17:26:07 2017 +0800 drm/amd/powerplay: correct UlvOffsetVid on Vega10. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 12d39245f6bea9dfddc29d75225a1d5ffc290186 Author: Alex Xie Date: Tue Apr 25 17:09:24 2017 -0400 drm/amdgpu: Fix use of interruptible waiting There is no good mechanism to handle the corresponding error. When signal interrupt happens, unpin is not called. As a result, inside AMDGPU, the statistic of pin size will be wrong. Signed-off-by: Alex Xie Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cca7ecb32b5920f05bb940cbe01dde19c0125620 Author: Alex Xie Date: Wed Apr 26 13:31:01 2017 -0400 drm/amdgpu: Fix use of interruptible waiting Either in cgs functions or for callers of cgs functions: 1. The signal interrupt can affect the expected behaviour 2. There is no good mechanism to handle the corresponding error 3. There is no chance of deadlock in these single BO waiting 4. There is no clear benefit for interruptible waiting 5. Future caller of these functions might have same issue. Signed-off-by: Alex Xie Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a6bef67e2abae4f19de8fb4ec34acb1df8156a75 Author: Chunming Zhou Date: Mon Apr 24 17:39:00 2017 +0800 drm/amdgpu: fix NULL pointer error [ 141.420491] BUG: unable to handle kernel NULL pointer dereference at 0000000000000030 [ 141.420532] IP: [] fence_remove_callback+0x11/0x60 [ 141.420563] PGD 20a030067 [ 141.420575] PUD 2088ca067 [ 141.420587] PMD 0 [ 141.420599] Oops: 0000 [#1] SMP [ 141.420612] Modules linked in: amdgpu(OE) ttm(OE) drm_kms_helper(E) drm(E) i2c_algo_bit(E) fb_sys_fops(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) rpcsec_gss_krb5(E) nfsv4(E) nfs(E) fscache(E) eeepc_wmi(E) asus_wmi(E) sparse_keymap(E) snd_hda_codec_realtek(E) video(E) snd_hda_codec_generic(E) snd_hda_codec_hdmi(E) snd_hda_intel(E) joydev(E) snd_hda_codec(E) snd_seq_midi(E) snd_seq_midi_event(E) snd_hda_core(E) snd_hwdep(E) snd_rawmidi(E) snd_pcm(E) kvm(E) irqbypass(E) crct10dif_pclmul(E) snd_seq(E) crc32_pclmul(E) ghash_clmulni_intel(E) snd_seq_device(E) snd_timer(E) aesni_intel(E) aes_x86_64(E) lrw(E) gf128mul(E) glue_helper(E) ablk_helper(E) cryptd(E) snd(E) soundcore(E) serio_raw(E) shpchp(E) i2c_piix4(E) i2c_designware_platform(E) 8250_dw(E) i2c_designware_core(E) mac_hid(E) binfmt_misc(E) [ 141.420948] nfsd(E) auth_rpcgss(E) nfs_acl(E) lockd(E) grace(E) sunrpc(E) parport_pc(E) ppdev(E) lp(E) parport(E) autofs4(E) hid_generic(E) usbhid(E) hid(E) psmouse(E) r8169(E) ahci(E) mii(E) libahci(E) wmi(E) [ 141.421042] CPU: 14 PID: 223 Comm: kworker/14:2 Tainted: G OE 4.9.0-custom #4 [ 141.421074] Hardware name: System manufacturer System Product Name/PRIME B350-PLUS, BIOS 0606 04/06/2017 [ 141.421146] Workqueue: events amd_sched_job_timedout [amdgpu] [ 141.421169] task: ffff88020b03ba80 task.stack: ffffc900016f4000 [ 141.421193] RIP: 0010:[] [] fence_remove_callback+0x11/0x60 [ 141.421229] RSP: 0018:ffffc900016f7d30 EFLAGS: 00010202 [ 141.421250] RAX: ffff8801c049fc00 RBX: ffff8801d4d8dc00 RCX: 0000000000000000 [ 141.421278] RDX: 0000000000000001 RSI: ffff8801c049fcc0 RDI: 0000000000000000 [ 141.421307] RBP: ffffc900016f7d48 R08: 0000000000000000 R09: 0000000000000000 [ 141.421334] R10: 00000020ed512a30 R11: 0000000000000001 R12: 0000000000000000 [ 141.421362] R13: ffff880209ba4ba0 R14: ffff880209ba4c58 R15: ffff8801c055cc60 [ 141.421390] FS: 0000000000000000(0000) GS:ffff88021ef80000(0000) knlGS:0000000000000000 [ 141.421421] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 141.421443] CR2: 0000000000000030 CR3: 000000020b554000 CR4: 00000000003406e0 [ 141.421471] Stack: [ 141.421480] ffff8801d4d8dc00 ffff880209ba4c48 ffff880209ba4ba0 ffffc900016f7d78 [ 141.421513] ffffffffa0697920 ffff880209ba0000 0000000000000000 ffff880209ba2770 [ 141.421549] ffff880209ba4b08 ffffc900016f7df0 ffffffffa05ce2ae ffffffffa0509eb7 [ 141.421583] Call Trace: [ 141.421628] [] amd_sched_hw_job_reset+0x50/0xb0 [amdgpu] [ 141.421676] [] amdgpu_gpu_reset+0x8e/0x690 [amdgpu] [ 141.421712] [] ? drm_printk+0x97/0xa0 [drm] [ 141.421770] [] amdgpu_job_timedout+0x46/0x50 [amdgpu] [ 141.421829] [] amd_sched_job_timedout+0x17/0x20 [amdgpu] [ 141.421859] [] process_one_work+0x153/0x3f0 [ 141.421884] [] worker_thread+0x12b/0x4b0 [ 141.421907] [] ? rescuer_thread+0x350/0x350 [ 141.421931] [] kthread+0xd3/0xf0 [ 141.421951] [] ? kthread_park+0x60/0x60 [ 141.421975] [] ret_from_fork+0x25/0x30 [ 141.421996] Code: ac 81 e8 a3 1f b0 ff 48 c7 c0 ea ff ff ff e9 48 ff ff ff 0f 1f 80 00 00 00 00 0f 1f 44 00 00 55 48 89 e5 41 55 41 54 49 89 fc 53 <48> 8b 7f 30 48 89 f3 e8 73 7c 26 00 48 8b 13 48 39 d3 41 0f 95 [ 141.422156] RIP [] fence_remove_callback+0x11/0x60 [ 141.422183] RSP [ 141.422197] CR2: 0000000000000030 [ 141.433483] ---[ end trace bc0949bf7ddd6d4b ]--- if the job is reset twice, then the parent could be NULL. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 82521316395a37a2ec1d7e396c055f3c7de9d93b Author: Roger.He Date: Fri Apr 21 13:08:43 2017 +0800 drm/amdgpu: validate shadow before restoring from it Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Roger.He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 21 +++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 1 + 3 files changed, 34 insertions(+) commit 4a9ed1009b8b01409bdda899c0ff0d7fd2c6d094 Author: Alex Xie Date: Mon Apr 24 15:33:16 2017 -0400 drm/amdgpu: Fix use of interruptible waiting 1. The signal interrupt can affect the expected behaviour. 2. There is no good mechanism to handle the corresponding error. When signal interrupt happens, unpin is not called. As a result, inside AMDGPU, the statistic of pin size will be wrong. Signed-off-by: Alex Xie Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d159f26caaa91c88e9078c69fd159be9cec3a005 Author: Alex Xie Date: Mon Apr 24 15:26:57 2017 -0400 drm/amdgpu: Real return value can be over-written when clean up Signed-off-by: Alex Xie Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit f3aa745eedc851742f6d6574ee2322c021b8f33c Author: Alex Xie Date: Mon Apr 24 14:27:00 2017 -0400 drm/amdgpu: Fix use of interruptible waiting 1. The signal interrupt can affect the expected behaviour. 2. There is no good mechanism to handle the corresponding error. Signed-off-by: Alex Xie Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d28479776fe932c32bda2366501fb2408557397 Author: Alex Xie Date: Mon Apr 24 13:53:04 2017 -0400 drm/amdgpu: Fix use of interruptible waiting 1. The signal interrupt can affect the expected behaviour. 2. There is no good mechanism to handle the corresponding error. Signed-off-by: Alex Xie Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a6901d7d7e49ad50d477cd8f8ef79d079b5c6c5 Author: Alex Xie Date: Mon Apr 24 13:52:41 2017 -0400 drm/amdgpu: Fix use of interruptible waiting 1. The signal interrupt can affect the expected behaviour. 2. There is no mechanism to handle the corresponding error. Signed-off-by: Alex Xie Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8ab25b4f51ffd2f859afaffa191d50a1eda4128f Author: Alex Xie Date: Mon Apr 24 13:30:43 2017 -0400 drm/amdgpu: Fix use of interruptible waiting If amdgpu_bo_reserve function is interrupted by signal, amdgpu_bo_kunmap function is not called. Signed-off-by: Alex Xie Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6b9a6c84b936e61f1ccff779494f3bd38775503 Author: Mario Kleiner Date: Mon Apr 24 01:33:09 2017 +0200 drm/radeon: Make display watermark calculations more accurate Avoid big roundoff errors in scanline/hactive durations for high pixel clocks, especially for >= 500 Mhz, and thereby program more accurate display fifo watermarks. This is a port of the corresponding amdgpu patch. Implemented for DCE 4,6,8. Tested on Evergreen/DCE-4 with Radeon HD-5770. Signed-off-by: Mario Kleiner Cc: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/cik.c | 10 +++++----- drivers/gpu/drm/radeon/evergreen.c | 10 +++++----- drivers/gpu/drm/radeon/si.c | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) commit ae45bbc2ba8f92b5a773fece6f5792f497c89282 Author: Mario Kleiner Date: Mon Apr 24 01:33:08 2017 +0200 drm/radeon: Avoid overflows/divide-by-zero in latency_watermark calculations. At dot clocks > approx. 250 Mhz, some of these calcs will overflow and cause miscalculation of latency watermarks, and for some overflows also divide-by-zero driver crash. Make calcs more overflow resistant. This is a direct port of the corresponding patch from amdgpu-kms, copy-paste for cik from dce-8 and si from dce-6, with a slightly simpler variant for evergreen dce-4/5. Only tested on DCE-4 evergreen with a Radeon HD-5770. Signed-off-by: Mario Kleiner Cc: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/cik.c | 19 +++---------------- drivers/gpu/drm/radeon/evergreen.c | 8 +------- drivers/gpu/drm/radeon/si.c | 19 +++---------------- 3 files changed, 7 insertions(+), 39 deletions(-) commit effaf848b957fbf72a3b6a1ad87f5e031eda0b75 Author: Mario Kleiner Date: Mon Apr 24 01:02:46 2017 +0200 drm/amdgpu: Add missing lb_vblank_lead_lines setup to DCE-6 path. This apparently got lost when implementing the new DCE-6 support and would cause failures in pageflip scheduling and timestamping. Signed-off-by: Mario Kleiner Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2f2429c38eddbc4f988589099fd86bb6bb65b7e4 Author: Pan Bian Date: Mon Apr 24 16:45:51 2017 +0800 drm/radeon: check return value of radeon_fence_emit Function radeon_fence_emit() returns -ENOMEM if there is no enough memory. And in this case, function radeon_ring_unlock_undo() rather than function radeon_ring_unlock_commit() should be called. However, in function radeon_test_create_and_emit_fence(), the return value of radeon_fence_emit() is ignored. This patch adds the check. Reviewed-by: Christian König Signed-off-by: Pan Bian Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_test.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c346fb74fb646352018800375c327ac35880b7e0 Author: Pan Bian Date: Mon Apr 24 16:38:05 2017 +0800 drm/radeon: check return value of radeon_ring_lock Function radeon_ring_lock() returns an errno on failure, and its return value should be validated. However, in functions r420_cp_errata_init() and r420_cp_errata_fini(), its return value is not checked. This patch adds the checks. Reviewed-by: Christian König Signed-off-by: Pan Bian Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/r420.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 91faed9ee150fb07b5b0e6601b96219a6c74301f Author: Frank Min Date: Mon Apr 17 11:19:45 2017 +0800 drm/amdgpu/soc15: enable UVD code path for sriov Enable UVD block for SRIOV. Signed-off-by: Frank Min Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6fa336a777712fac9da763d3df348fcfc96633f8 Author: Frank Min Date: Mon Apr 17 11:51:44 2017 +0800 drm/amdgpu/uvd7: add UVD hw init sequences for sriov Add UVD hw init. Signed-off-by: Frank Min Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 101 +++++++++++++++++++--------------- 1 file changed, 56 insertions(+), 45 deletions(-) commit beb2ced51b70a6cbccd8676b450e282fecf65565 Author: Frank Min Date: Mon Apr 17 11:45:35 2017 +0800 drm/amdgpu/uvd7: add uvd doorbell initialization for sriov Add UVD doorbell for SRIOV. Signed-off-by: Frank Min Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 247ac95141740157bd86d29819ff46e7ab396113 Author: Frank Min Date: Mon Apr 17 11:28:12 2017 +0800 drm/amdgpu/uvd7: add sriov uvd initialization sequences Add UVD initialization for SRIOV. Signed-off-by: Frank Min Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 246 ++++++++++++++++++++++++++++++++++ 1 file changed, 246 insertions(+) commit 7006dde2ef6110b11a76b0f972950d6da0ff3d6c Author: Xiangliang Yu Date: Fri Apr 21 16:21:41 2017 +0800 drm/amdgpu/vce4: replaced with virt_alloc_mm_table Used virt_alloc_mm_table function to allocate MM table memory. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) commit 904cd3891dd390b109c8146974b47fca78b97c98 Author: Xiangliang Yu Date: Fri Apr 21 15:40:25 2017 +0800 drm/amdgpu/virt: add two functions for MM table Add two functions to allocate & free MM table memory. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 46 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 2 ++ 2 files changed, 48 insertions(+) commit a92f5ec0c1341466bbfe98e1abc3cf5427ba4a67 Author: Frank Min Date: Sun Apr 16 13:37:07 2017 +0800 drm/amdgpu/vce4: move mm table constructions functions into mmsch header file Move mm table construction functions into mmsch header file so that UVD can reuse it. Signed-off-by: Frank Min Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mmsch_v1_0.h | 57 +++++++++++++ drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 143 ++++++++++---------------------- 2 files changed, 103 insertions(+), 97 deletions(-) commit b53b8cdac621da0a4bac5f83e0004dd9b74a9160 Author: Daniel Wang Date: Wed Apr 19 16:09:08 2017 +0800 drm/amdgpu/vce4: fix a PSP loading VCE issue Fixed PSP loading issue for sriov. Signed-off-by: Daniel Wang Signed-off-by: Xiangliang Yu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit e993ca4f3b18a649e20db387f09649694043b3d4 Author: Daniel Wang Date: Thu Apr 20 11:45:09 2017 +0800 drm/amdgpu/psp: skip loading SDMA/RLCG under SRIOV VF Now GPU hypervisor will load SDMA and RLCG ucode, so skip it in guest. Signed-off-by: Daniel Wang Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 51687759be93fbc553f2727e86be25c38126ba93 Author: Chunming Zhou Date: Mon Apr 24 17:09:15 2017 +0800 drm/amdgpu: fix gpu reset crash [ 413.687439] BUG: unable to handle kernel NULL pointer dereference at 0000000000000548 [ 413.687479] IP: [] to_live_kthread+0x5/0x60 [ 413.687507] PGD 1efd12067 [ 413.687519] PUD 1efd11067 [ 413.687531] PMD 0 [ 413.687543] Oops: 0000 [#1] SMP [ 413.687557] Modules linked in: amdgpu(OE) ttm(OE) drm_kms_helper(E) drm(E) i2c_algo_bit(E) fb_sys_fops(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) rpcsec_gss_krb5(E) nfsv4(E) nfs(E) fscache(E) snd_hda_codec_realtek(E) snd_hda_codec_generic(E) snd_hda_codec_hdmi(E) snd_hda_intel(E) eeepc_wmi(E) snd_hda_codec(E) asus_wmi(E) snd_hda_core(E) sparse_keymap(E) snd_hwdep(E) video(E) snd_pcm(E) snd_seq_midi(E) joydev(E) snd_seq_midi_event(E) snd_rawmidi(E) snd_seq(E) snd_seq_device(E) snd_timer(E) kvm(E) irqbypass(E) crct10dif_pclmul(E) snd(E) crc32_pclmul(E) ghash_clmulni_intel(E) soundcore(E) aesni_intel(E) aes_x86_64(E) lrw(E) gf128mul(E) glue_helper(E) ablk_helper(E) cryptd(E) shpchp(E) serio_raw(E) i2c_piix4(E) 8250_dw(E) i2c_designware_platform(E) i2c_designware_core(E) mac_hid(E) binfmt_misc(E) [ 413.687894] parport_pc(E) ppdev(E) lp(E) parport(E) nfsd(E) auth_rpcgss(E) nfs_acl(E) lockd(E) grace(E) sunrpc(E) autofs4(E) hid_generic(E) usbhid(E) hid(E) psmouse(E) ahci(E) r8169(E) mii(E) libahci(E) wmi(E) [ 413.687989] CPU: 13 PID: 1134 Comm: kworker/13:2 Tainted: G OE 4.9.0-custom #4 [ 413.688019] Hardware name: System manufacturer System Product Name/PRIME B350-PLUS, BIOS 0606 04/06/2017 [ 413.688089] Workqueue: events amd_sched_job_timedout [amdgpu] [ 413.688116] task: ffff88020f9657c0 task.stack: ffffc90001a88000 [ 413.688139] RIP: 0010:[] [] to_live_kthread+0x5/0x60 [ 413.688171] RSP: 0018:ffffc90001a8bd60 EFLAGS: 00010282 [ 413.688191] RAX: ffff88020f0073f8 RBX: ffff88020f000000 RCX: 0000000000000000 [ 413.688217] RDX: 0000000000000001 RSI: ffff88020f9670c0 RDI: 0000000000000000 [ 413.688243] RBP: ffffc90001a8bd78 R08: 0000000000000000 R09: 0000000000001000 [ 413.688269] R10: 0000006051b11a82 R11: 0000000000000001 R12: 0000000000000000 [ 413.688295] R13: ffff88020f002770 R14: ffff88020f004838 R15: ffff8801b23c2c60 [ 413.688321] FS: 0000000000000000(0000) GS:ffff88021ef40000(0000) knlGS:0000000000000000 [ 413.688352] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 413.688373] CR2: 0000000000000548 CR3: 00000001efd0f000 CR4: 00000000003406e0 [ 413.688399] Stack: [ 413.688407] ffffffff8109b304 ffff88020f000000 0000000000000070 ffffc90001a8bdf0 [ 413.688439] ffffffffa05ce29d ffffffffa052feb7 ffffffffa07b5820 ffffc90001a8bda0 [ 413.688470] ffffffff00000018 ffff8801bb88f060 0000000001a8bdb8 ffff88021ef59280 [ 413.688502] Call Trace: [ 413.688514] [] ? kthread_park+0x14/0x60 [ 413.688555] [] amdgpu_gpu_reset+0x7d/0x670 [amdgpu] [ 413.688589] [] ? drm_printk+0x97/0xa0 [drm] [ 413.688643] [] amdgpu_job_timedout+0x46/0x50 [amdgpu] [ 413.688700] [] amd_sched_job_timedout+0x17/0x20 [amdgpu] [ 413.688727] [] process_one_work+0x153/0x3f0 [ 413.688751] [] worker_thread+0x12b/0x4b0 [ 413.688773] [] ? do_syscall_64+0x6e/0x180 [ 413.688795] [] ? rescuer_thread+0x350/0x350 [ 413.688818] [] ? do_syscall_64+0x6e/0x180 [ 413.688839] [] kthread+0xd3/0xf0 [ 413.688858] [] ? kthread_park+0x60/0x60 [ 413.688881] [] ret_from_fork+0x25/0x30 [ 413.688901] Code: 25 40 d3 00 00 48 8b 80 48 05 00 00 48 89 e5 5d 48 8b 40 c8 48 c1 e8 02 83 e0 01 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 <48> 8b b7 48 05 00 00 55 48 89 e5 48 85 f6 74 31 8b 97 f8 18 00 [ 413.689045] RIP [] to_live_kthread+0x5/0x60 [ 413.689064] RSP [ 413.689076] CR2: 0000000000000548 [ 413.697985] ---[ end trace 0a314a64821f84e9 ]--- The root cause is some ring doesn't have scheduler, like KIQ ring Reviewed-by: Christian König Signed-off-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 6c98d31ee83ddd351e89d5e2002e678fdaf9d2af Author: Chunming Zhou Date: Fri Apr 21 17:58:42 2017 +0800 drm/amdgpu: fix no-vmid job [ 132.036658] amdgpu 0000:22:00.0: VM IB without ID [ 132.036709] [drm:amdgpu_job_run [amdgpu]] *ERROR* Error scheduling IBs (-22) [ 132.036755] [drm:amd_sched_main [amdgpu]] *ERROR* Failed to run job! root cause is fence is signaled during sync transfer. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23d2e5049c080abda50810d21c8be20b5d65d191 Author: Roger.He Date: Fri Apr 21 14:24:26 2017 +0800 drm/amdgpu: fix indent Reviewed-by: Alex Deucher Signed-off-by: Roger.He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 34 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 55ed8caf14fdfecf300d35cfe2e04b670b0191c1 Author: Chunming Zhou Date: Fri Apr 21 16:40:00 2017 +0800 drm/amdgpu: increase gtt size to 3GB by default v2 v2: address Alex's comment, add AMDGPU_DEFAULT_GTT_SIZE_MB. 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/gmc_v6_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 ++- 5 files changed, 9 insertions(+), 4 deletions(-) commit 5a0f3b5f6d798637b0af5d6d3ab3eb02063e0317 Author: Christian König Date: Fri Apr 21 10:05:56 2017 +0200 drm/amdgpu: fix VM clearing in amdgpu_gem_object_close We need to check if the VM is swapped out before trying to update it. Fixes: 23e0563e48f7 ("drm/amdgpu: clear freed mappings immediately when BO may be freed") Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 68 ++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 31 deletions(-) commit 05a72a2864c2b27471e9f5365448563c78f9b114 Author: Chunming Zhou Date: Thu Apr 13 16:16:51 2017 +0800 drm/amdgpu: add gtt print like vram when dump mm table V2 Signed-off-by: Chunming Zhou Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 9 +++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 10 +++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) commit 4fcae787866915161f22d627328fa8d2e13d215b Author: Christian König Date: Thu Apr 20 12:11:47 2017 +0200 drm/amdgpu: fix amdgpu_ttm_bo_eviction_valuable BOs not mapped into the GART are always valuable for an eviction. Otherwise we don't correctly swap them out on VRAM evictions during memory pressure. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 4bae05e196c518c2c95022fbdbee551bbc6893a5 Author: Rex Zhu Date: Thu Apr 20 16:33:23 2017 +0800 drm/amd/powerplay: Fix AVFS param. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit afc0255c9a5ecede2f235f4d117c2913059aa3c3 Author: Rex Zhu Date: Wed Apr 19 16:00:21 2017 +0800 drm/amd/powerplay: enable clock stretch feature on Vega10. Correctly calculate CKSVidOffset Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 2d5f5f949680bc02bd5f98ee9ec6d08f67e9ca4c Author: Rex Zhu Date: Thu Apr 20 16:38:36 2017 +0800 drm/amd/powerplay: enable pcie dpm on Vega10. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d475ce6296d702c16c96790a390ad7b4616f18b4 Author: Rex Zhu Date: Wed Apr 12 17:52:07 2017 +0800 drm/amd/powerplay: allocate fb for avfs fuse table on vega10. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 36 ++++++++++++++++++++++ .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h | 1 + 2 files changed, 37 insertions(+) commit 67131aa525d22fe21904bfd463520e98b5d67566 Author: Rex Zhu Date: Wed Apr 12 17:32:35 2017 +0800 drm/amd/powerplay: enable AGM logging while dpm disabled. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 -- drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) commit 42f72d0b3754a7ecf1208f90cef45ba89a89f2e7 Author: Huang Rui Date: Thu Apr 20 15:25:39 2017 +0800 drm/amd/powerplay: add error message to remind user updating firmware Signed-off-by: Huang Rui Reviewed-by: Evan Quan Reviewed-by: Edward O'Callaghan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 7ad87b96962a01830b0751d11a389b4039eb4460 Author: Alex Deucher Date: Mon Apr 24 13:51:52 2017 -0400 Revert "drm/amd/amdgpu: Set VCE/UVD off during late init" This leads to hangs on init. This reverts commit d1aff8ec49c3ece05cee9b6e63d44e96a420b068. drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ---- 1 file changed, 4 deletions(-) commit d0766e981b36608f9fe9b29985d4cd696099c3f8 Author: Zhang, Jerry Date: Wed Apr 19 09:53:29 2017 +0800 drm/amdgpu: PRT support for gfx9 (v3) Fix PRT handling on gfx9 v2: unify PRT bit for all ASICs v3: move PRT flag checking in amdgpu_vm_bo_split_mapping() Signed-off-by: Junwei Zhang Acked-by: David Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) commit fc6aa33da4b1043ad1b337d051770993418256d2 Author: Christian König Date: Wed Apr 19 14:41:19 2017 +0200 drm/amdgpu: fix amdgpu_vm_clear_freed v2 Use amdgpu_vm_bo_update_mapping() instead of amdgpu_vm_bo_split_mapping() here. We don't want any flags set in the cleared areas and splitting shouldn't be necessary. v2: fix typo in commit message Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e3c5e9826d60630236de105c05e7a58f12c45ab5 Author: Trigger Huang Date: Mon Apr 17 08:50:18 2017 -0400 drm/amdgpu: Destroy psp ring in hw_fini Fix issue that PSP initialization will fail if reload amdgpu module. That's because the PSP ring must be destroyed to be ready for the next time PSP initialization. Changes in v2: - Move psp_ring_destroy before all BOs free (suggested by Ray Huang). Changes in v3: - Check firmware load type, if it is not PSP, we should do nothing in fw_fini(), and of course will not destroy PSP ring too (suggested by Ray Huang). Signed-off-by: Trigger Huang Reviewed-by: Xiangliang Yu Reviewed-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 3 +++ drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 27 +++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/psp_v3_1.h | 2 ++ 4 files changed, 39 insertions(+), 2 deletions(-) commit e0b2f8cff15b2d20a427c381247a8ff6bb28d21e Author: Evan Quan Date: Wed Apr 12 17:34:26 2017 +0800 drm/amdgpu: update smu9 driver interface Updated interface between the driver and the SMU controller. Signed-off-by: Evan Quan Signed-off-by: Alex Deucher Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smu9_driver_if.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 775f55f1b5b65c6cfc52555d9a8b80de5429d21b Author: Tom St Denis Date: Wed Apr 19 11:03:04 2017 -0400 drm/amd/amdgpu: Print out ring name in dev_info So it's more obvious which rings are using which INV engines. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2bde7c32b1db162692f05c6be066b5bcd3d9fdbe Author: Hans de Goede Date: Fri Apr 21 13:48:08 2017 +0200 ACPI / PMIC: xpower: Fix power_table addresses The power table addresses should be contiguous, but there was a hole where 0x34 was missing. On most devices this is not a problem as addresses above 0x34 are used for the BUC# convertors which are not used in the DSDTs I've access to but after the BUC# convertors there is a field named GPI1 in the DSTDs, which does get used in some cases and ended up turning BUC6 on and off due to the wrong addresses, resulting in turning the entire device off (or causing it to reboot). Removing the hole in the addresses fixes this, fixing one of my Bay Trail tablets turning off while booting the mainline kernel. While at it add comments with the field names used in the DSDTs to make it easier to compare the register and bits used at each address with the datasheet. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/pmic/intel_pmic_xpower.c | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) commit e182e234c8658c0880401052fd364b1a1a59b03d Author: Tom St Denis Date: Wed Apr 19 09:02:41 2017 -0400 drm/amd/amdgpu: Change comp GFXv9 ring name to remove space umr expects the ring name to be a complete word. This also makes it consistent with GFXv7/8. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15ff510bbfd7170fa5af8924fe0503f4d116e7d2 Author: Tom St Denis Date: Wed Apr 19 09:01:42 2017 -0400 drm/amd/amdgpu: Change comp GFXv6 ring name to remove space umr expects the ring name to be a complete word. This also makes it consistent with GFXv7/8. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c4ecf48cfee8e138c6483bafd1425628a413315 Author: Trigger Huang Date: Mon Apr 17 10:56:02 2017 -0400 drm/amdgpu: Fix module unload hang by KIQ on Vega10 Apply commit 4e683cb2644f ("drm/amdgpu: Fix module unload hang by KIQ IRQ set")to vega10 V2: delete reduant kiq irq funcs type check (suggested by Rex.Zhu) Signed-off-by: Trigger Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 7ef69843def65bdbf69a5be784e6a9e080f22ef6 Author: Rex Zhu Date: Tue Apr 18 19:21:44 2017 +0800 drm/amdgpu: fix memory clock can't switch on CI. if we set only lowest mclk level enabled, when we enable uvd dpm during boot time, mclk will be fixed in the lowest level. the mclk switch will fail if try to enable other level of mclk at this time. so set all mclk levels enabled. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fb82afab134ab71b3b52224b6da12daea8662c28 Author: Xiangliang Yu Date: Fri Apr 14 17:43:02 2017 +0800 drm/amdgpu/gfx9: bypass clockgating setting For SRIOV doesn't need clockgating, bypass it. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +++ 1 file changed, 3 insertions(+) commit 98c24b24dfef209eb8bb164550e1567c7ba82c52 Author: Xiangliang Yu Date: Fri Apr 14 17:40:57 2017 +0800 drm/amdgpu/mmhub_v1: bypass clockgating setting For SRIOV doesn't need CG, so bypass it. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 3 +++ 1 file changed, 3 insertions(+) commit 8972e5d26996e3f04e1cf29b7d7edd3ec5614bf2 Author: Christian König Date: Mon Mar 6 13:34:57 2017 +0100 drm/amdgpu: fix coding style and printing in amdgpu_doorbell_init Based on commit "drm/radeon: remove useless and potentially wrong message". The size of the info printing is incorrect and the PCI subsystems prints the same info on boot anyway. Signed-off-by: Christian König Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit ee73164a0d8d2fd98f666a5dd35da1d9a19ec009 Author: Pixel Ding Date: Thu Feb 23 11:10:33 2017 +0800 drm/amdgpu/virt: don't check VALID bit for FLR completion message The interrupt after FLR is missed sometimes due to hardware reason, so guest driver get the notification of FLR completion via polling message. Then host doesn't write VALID bit to avoid sending interrupt, otherwise the completion will be handled twice. So there's a valid message without VALID bit for FLR completion, driver should handle it without checking. Signed-off-by: Pixel Ding Reviewed-by: Xiangliang Yu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit ad2fed9ad5907c35e132e43420a0e47ab22350f0 Author: Junwei Zhang Date: Thu Feb 23 11:01:40 2017 +0800 drm/amdgpu: fix double_offchip_lds_buf for gfx v6 Was incorrect for SI. Signed-off-by: Junwei Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2211a787dee798131a4774ee7df9aa758ebe07aa Author: Rex Zhu Date: Mon Apr 17 20:46:29 2017 +0800 drm/amd/powerplay: delete dead functions in vega10. Vega10 does not support AVFS BTC, remove function. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 30 ++-------------------- .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 9 ------- .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h | 1 - 3 files changed, 2 insertions(+), 38 deletions(-) commit 4bdcc4ea3ac11eddacbadd43128e1aba0122700b Author: Rex Zhu Date: Mon Apr 17 19:44:23 2017 +0800 drm/amd/amdgpu: coding style refine in sdma_v4_0.c Replace 8 spaces with tabs. correct {} braces, etc. Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 151 ++++++++++++++++----------------- 1 file changed, 75 insertions(+), 76 deletions(-) commit 79690b84db904669256fe3ef66dd175ce201817d Author: Rex Zhu Date: Mon Apr 17 18:46:57 2017 +0800 drm/amdgpu: Remove redundant itermediate return val in sdma_v4_0.c Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit aef1ba58f5c60ec2de38258cb76db7842ccb6e1b Author: Huang Rui Date: Mon Apr 17 15:32:52 2017 +0800 drm/ttm: cleanup unuse ret value The ret must be 0 here, otherwise, the function will return after init_mem_type. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b3124dfcce8147e1340a06952f32443dc7e102b1 Author: Huang Rui Date: Fri Apr 14 10:50:03 2017 +0800 drm/amdgpu: fix to print incorrect wptr address Signed-off-by: Huang Rui Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03161a6ecb7576492bb37e9bfc68a0330fc6a41d Author: Huang Rui Date: Thu Apr 13 16:12:26 2017 +0800 drm/amdgpu: fix dead lock if any ip block resume failed in s3 Driver must free the console lock whether driver resuming successful or not. Otherwise, fb_console will be always waiting for the lock and then cause system stuck. [ 244.405541] INFO: task kworker/0:0:4 blocked for more than 120 seconds. [ 244.405543] Tainted: G OE 4.9.0-custom #1 [ 244.405544] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 244.405541] INFO: task kworker/0:0:4 blocked for more than 120 seconds. [ 244.405543] Tainted: G OE 4.9.0-custom #1 [ 244.405544] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 244.405550] kworker/0:0 D 0 4 2 0x00080000 [ 244.405559] Workqueue: events console_callback [ 244.405564] ffff88045a2cfc00 0000000000000000 ffff880462b75940 ffffffff81c0e500 [ 244.405568] ffff880476419280 ffffc900018f7c90 ffffffff817dcf62 000000000000003c [ 244.405572] 0000000100000000 0000000000000002 ffff880462b75940 ffff880462b75940 [ 244.405573] Call Trace: [ 244.405580] [] ? __schedule+0x222/0x6a0 [ 244.405584] [] schedule+0x36/0x80 [ 244.405588] [] schedule_timeout+0x1fc/0x390 [ 244.405592] [] __down_common+0xa5/0xf8 [ 244.405598] [] ? put_prev_entity+0x48/0x710 [ 244.405601] [] __down+0x1d/0x1f [ 244.405606] [] down+0x41/0x50 [ 244.405611] [] console_lock+0x1a/0x40 [ 244.405614] [] console_callback+0x13/0x160 [ 244.405617] [] ? __schedule+0x22a/0x6a0 [ 244.405623] [] process_one_work+0x153/0x3f0 [ 244.405628] [] worker_thread+0x12b/0x4b0 [ 244.405633] [] ? rescuer_thread+0x350/0x350 [ 244.405637] [] kthread+0xd3/0xf0 [ 244.405641] [] ? kthread_park+0x60/0x60 [ 244.405645] [] ? kthread_park+0x60/0x60 [ 244.405649] [] ret_from_fork+0x25/0x30 Signed-off-by: Huang Rui Reviewed-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 8f12bbe6d94a51f3ae314c27cc7b9b315adfe383 Author: Christian König Date: Tue Apr 11 19:20:20 2017 +0200 drm/radeon: force the UVD DPB into VRAM as well Seems to be mandatory for WMV playback. Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=100510 Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_cs.c | 10 ++++++---- drivers/gpu/drm/radeon/radeon_uvd.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) commit 203eb0cb0eab990347e646c89a7134e60713133a Author: Alex Deucher Date: Mon Apr 10 15:36:32 2017 -0400 drm/amdgpu: bump version number to note race fix and new fence functionality fixed in: "drm/amdgpu:fix race condition" Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 080b24ebdf230c80fe63e64633c0d52aca5d1a8e Author: Alex Deucher Date: Mon Apr 10 15:32:43 2017 -0400 drm/amdgpu: fix spelling in header comment Reviewed-by: Christian König Signed-off-by: Alex Deucher include/uapi/drm/amdgpu_drm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f1bcf511f6e5f54fffa6365286af1e88b18f54c Author: Christian König Date: Fri Apr 7 17:43:19 2017 +0200 drm/amdgpu: trace vm hub during flush as well v2 Trace on which hub we are doing the flush. v2: fix typo in commit message Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 20 ++++++++++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) commit c5296d1401fb01ceb3a3cf781cc572b1847953c6 Author: Christian König Date: Fri Apr 7 15:31:13 2017 +0200 drm/amdgpu: trace the vmhub in grab_id as well Trace on which VMHUB we assigned an VMID. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 17 ++++++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) commit 87c910d806295df26069d0325f517ed72ce29d32 Author: Christian König Date: Thu Mar 30 16:56:20 2017 +0200 drm/amdgpu: allow concurrent VM flushes Enable concurrent VM flushes for Vega10. Signed-off-by: Christian König Acked-by: Alex Deucher Reviewed-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 50 +++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 22 deletions(-) commit 4789c463cb04d725170406873caaec5208c99eb9 Author: Christian König Date: Fri Mar 31 11:03:50 2017 +0200 drm/amdgpu: assign VM invalidation engine manually v2 For Vega10 we have 18 VM invalidation engines for each VMHUB. Start to assign them manually to the rings. v2: add a BUG_ON if we use to many engines Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 16 ++++++++++++++++ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 2 +- 6 files changed, 22 insertions(+), 5 deletions(-) commit 2e81984988adf8de92b7d3a14ba0fe8310d0bcf8 Author: Christian König Date: Thu Mar 30 16:50:47 2017 +0200 drm/amdgpu: invalidate only the currently needed VMHUB v2 Drop invalidating both hubs from each engine. v2: don't use hardcoded values Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 36 +++++------ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 60 +++++++++--------- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 111 +++++++++++++++------------------ drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 57 ++++++++--------- 5 files changed, 119 insertions(+), 148 deletions(-) commit 7645670decdb677e2f415ff91609d31e5d4777d8 Author: Christian König Date: Thu Apr 6 17:52:39 2017 +0200 drm/amdgpu: split VMID management by VMHUB This way GFX and MM won't fight for VMIDs any more. Initially disabled since we need to stop flushing all HUBS at the same time as well. Signed-off-by: Christian König Reviewed-by: Andres Rodriguez Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 82 ++++++++++++++++++------------ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 15 ++++-- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 +- 10 files changed, 69 insertions(+), 45 deletions(-) commit 4f618e737fafed22302d4b660eecfe1dce971b0f Author: Christian König Date: Thu Apr 6 15:18:21 2017 +0200 drm/amdgpu: drop VMID per ring tracking David suggested this a long time ago, instead of checking each ring just walk over all the VMIDs in reverse LRU order. Signed-off-by: Christian König Reviewed-by: Andres Rodriguez Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 17 +++-------------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 --- 2 files changed, 3 insertions(+), 17 deletions(-) commit 0eeb68b390377148e31f000db1c533a9a49bf950 Author: Christian König Date: Thu Mar 30 14:49:50 2017 +0200 drm/amdgpu: add VMHUB to ring association Add the info which ring belonging to which VMHUB. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 1 + 5 files changed, 8 insertions(+) commit 0381631299e54128be5180d0a169b06cd3ce1ba6 Author: Frank Min Date: Thu Apr 6 14:46:50 2017 +0800 drm/amdgpu/vce4: enable ring & ib test for sriov Now VCE block can work for SRIOV, enable ring & ib test. Signed-off-by: Frank Min Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 8 -------- 1 file changed, 8 deletions(-) commit a2f537e03b678887fdd8d0810b03ecad01ba5d36 Author: Xiangliang Yu Date: Thu Apr 6 14:43:48 2017 +0800 drm/amdgpu/vce4: workaround VCE ring test slow issue Add VCE ring test slow workaround for SRIOV. Signed-off-by: Frank Min Signed-off-by: Xiangliang Yu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 71f2af890a337dec5a792846a9db36943651e4d0 Author: Frank Min Date: Fri Apr 7 10:38:52 2017 +0800 drm/amdgpu/vce4: update VCE initialization sequence for SRIOV Update the initialization sequence of VCE to make VCE work. Signed-off-by: Frank Min Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit bc108ec78e2af5c7a5f6ef27e264b8093bd60e3b Author: Trigger Huang Date: Tue Apr 11 01:56:36 2017 -0400 drm/amdgpu: Fix firmware UCODE_ID_STORAGE issue (v2) In Tonga's virtualization environment, for firmware UCODE_ID_STORAGE, there is no actual firmware data, but we still need alloc a BO and tell the BO's mc address to HW, or world switch will hang on VFs. v2: fix coding style (Alex) Signed-off-by: Trigger Huang Reviewed-by: Xiangliang Yu Reviewed-by: Monk Liu Acked-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit cbcbea982af59d0a4c40dacfb6ff164a533fd1d9 Author: Huang Rui Date: Tue Apr 11 09:24:56 2017 +0800 drm/amdgpu: fix to add buffer funcs check This patch fixes the case when buffer funcs is empty and bo evict is executing. It must double check buffer funcs, otherwise, a NULL pointer dereference kernel panic will be encountered. BUG: unable to handle kernel NULL pointer dereference at 00000000000001a4 IP: [] amdgpu_evict_flags+0x3d/0xf0 [amdgpu] PGD 0 Oops: 0000 [#1] SMP Modules linked in: amdgpu(OE) ttm drm_kms_helper drm i2c_algo_bit fb_sys_fops syscopyarea sysfillrect sysimgblt fmem(OE) physmem_drv(OE) rpcsec_gss_krb5 nfsv4 nfs fscache intel_rapl x86_pkg_temp_thermal intel_powerclamp snd_hda_codec_realtek snd_hda_codec_hdmi snd_hda_codec_generic kvm_intel snd_hda_intel snd_hda_codec kvm snd_hda_core joydev eeepc_wmi asus_wmi sparse_keymap snd_hwdep snd_pcm irqbypass crct10dif_pclmul snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq crc32_pclmul snd_seq_device ghash_clmulni_intel aesni_intel aes_x86_64 snd_timer lrw gf128mul mei_me snd glue_helper ablk_helper cryptd tpm_infineon mei lpc_ich serio_raw soundcore shpchp mac_hid nfsd auth_rpcgss nfs_acl lockd grace coretemp sunrpc parport_pc ppdev lp parport autofs4 hid_generic mxm_wmi r8169 usbhid ahci psmouse libahci nvme mii hid nvme_core wmi video CPU: 3 PID: 1627 Comm: kworker/u8:17 Tainted: G OE 4.9.0-custom #1 Hardware name: ASUS All Series/Z87-A, BIOS 1802 01/28/2014 Workqueue: events_unbound async_run_entry_fn task: ffff88021e7057c0 task.stack: ffffc9000262c000 RIP: 0010:[] [] amdgpu_evict_flags+0x3d/0xf0 [amdgpu] RSP: 0018:ffffc9000262fb30 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff88021e8a5858 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffc9000262fb58 RDI: ffff88021e8a5800 RBP: ffffc9000262fb48 R08: 0000000000000000 R09: ffff88021e8a5814 R10: 000000001def8f01 R11: ffff88021def8c80 R12: ffffc9000262fb58 R13: ffff88021d2b1990 R14: 0000000000000000 R15: ffff88021e8a5858 FS: 0000000000000000(0000) GS:ffff88022ed80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000001a4 CR3: 0000000001c07000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Signed-off-by: Huang Rui Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 692bb1ac038a0b736c2b6e9bba41ac2da38e16cf Author: Huang Rui Date: Mon Apr 10 09:29:13 2017 +0800 drm/amdgpu: fix to clear ASIC INIT COMPLETE bit on resuming phase ASIC_INIT_COMPLETE bit must be cleared during S3 resuming phase, because VBIOS will check the bit to decide if execute ASIC_Init posting via kernel driver. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 7 +++++++ 2 files changed, 13 insertions(+) commit b4de2c5aab2d5cd84c2a648d825b0e48ca426e27 Author: Huang Rui Date: Mon Apr 10 15:29:42 2017 +0800 drm/amdgpu: do not free fence buf when driver probes. Fence buf needs to be used on suspend/resume phase. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4573f0f21d6c40a9426d0418646d87bbf77d6ab5 Author: Huang Rui Date: Mon Apr 10 14:40:51 2017 +0800 drm/amd/powerplay: fix suspend error on DPM disabled Don't fail if DPM is disabled. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 04434ab5120a362c11ae6e6cf196fc6a98c3365d Author: Hans de Goede Date: Fri Apr 21 09:35:07 2017 +0200 ACPI / LPSS: Call pwm_add_table() for Bay Trail PWM device On Bay Trail systems with a Crystal Cove PMIC the Crystal Cove's PWM is used to control the backlight brightness. On systems without one, the Crystal Cove SoC's PWM is used and we need to call pwm_add_table() so that the i915 driver can find the pwm for controlling the backlight. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_lpss.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 5e68ebd0ac4842977c127160f9ecf1a0099f502f Author: Viresh Kumar Date: Tue Apr 25 12:52:10 2017 +0530 PM / Domains: Add DT file to MAINTAINERS Add the power_domain.txt DT file to MAINTAINERS, otherwise get_maintainers.pl doesn't pick the right set of maintainers for changes to the DT file. Signed-off-by: Viresh Kumar Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit e841cfc9ff530d37617e589490caac59a1d94200 Author: Viresh Kumar Date: Tue Apr 25 12:48:21 2017 +0530 PM / Domains: Fix DT example The power-domain provider's #power-domain-cells field is set to 0 and yet the children is using an index to point the power domain. Fix it by removing the index field. Fixes: 70bb510e4279 (dt/bindings / PM/Domains: Update binding for PM domain idle states) Signed-off-by: Viresh Kumar Acked-by: Ulf Hansson Acked-by: Rob Herring Signed-off-by: Rafael J. Wysocki Documentation/devicetree/bindings/power/power_domain.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52e70c8af7e5d04e3fe431066f0530a17a8147c2 Merge: 168f4a6 8494206 2cff319 592c809 bf4f5bf Author: Rafael J. Wysocki Date: Fri Apr 28 23:18:22 2017 +0200 Merge branches 'acpi-power', 'acpi-blacklist', 'acpi-video' and 'acpi-doc' * acpi-power: power: supply: axp288_charger: Only wait for INT3496 device if present ACPI / AC: Add a blacklist with PMIC ACPI HIDs with a native charger driver ACPI / battery: Add a blacklist with PMIC ACPI HIDs with a native battery driver ACPI / battery: Fix acpi_battery_exit on acpi_battery_init_async errors ACPI / utils: Add new acpi_dev_present helper * acpi-blacklist: ACPI / blacklist: add _REV quirk for Dell Inspiron 7537 * acpi-video: ACPI / video: add comments about subtle cases ACPI / video: get rid of magic numbers and use enum instead * acpi-doc: ACPI / doc: linuxized-acpica.txt: fix typos commit 5d4dd65b1e98ff640c3bdb546a169e397805831e Author: Arnd Bergmann Date: Fri Apr 28 11:44:12 2017 +0200 of: fix unittest build without CONFIG_OF_OVERLAY We get a link error when the new tests are used by overlays are not: drivers/of/built-in.o: In function `unflatten_device_tree': (.init.text+0x967): undefined reference to `unittest_unflatten_overlay_base' This makes the #ifdef check match the symbols that lead to building the unittest_unflatten_overlay_base function. Fixes: 81d0848fc8d2 ("of: Add unit tests for applying overlays") Signed-off-by: Arnd Bergmann Reviewed-by: Frank Rowand Tested-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/of_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 168f4a6950daabe1b9ee3845d70220dda8205c94 Merge: 131b3a8 35b6873 2c74d84 2e5a7f7 Author: Rafael J. Wysocki Date: Fri Apr 28 23:17:55 2017 +0200 Merge branches 'acpi-processor', 'acpi-cppc' and 'acpi-pmic' * acpi-processor: ACPI / Processor: Drop setup_max_cpus check from acpi_processor_add() * acpi-cppc: ACPI / CPPC: add sysfs entries for CPPC perf capabilities ACPI / CPPC: Read lowest nonlinear perf in cppc_get_perf_caps() * acpi-pmic: ACPI / PMIC: Stop xpower OPRegion handler relying on IIO ACPI / PMIC: Add opregion driver for Intel CHT Whiskey Cove PMIC commit 131b3a8db237dc3dc12b098e1dbf2be3b8de3c27 Merge: 5a7ad11 c381fc3 f49c3f9 79f97c3 Author: Rafael J. Wysocki Date: Fri Apr 28 23:17:36 2017 +0200 Merge branches 'acpi-scan', 'acpi-tables' and 'acpi-platform' * acpi-scan: ACPI / scan: Avoid enumerating devices more than once ACPI / scan: Apply default enumeration to devices with ACPI drivers ACPI / scan: Drop support for force_remove * acpi-tables: ACPI / tables: Drop acpi_parse_entries() which is not used * acpi-platform: ACPI / platform: Update platform device NUMA node based on _PXM method commit a1d2fcfd80bef6cdc5675dcabe25587010720bdb Merge: 060d0fb 2244037 Author: Rafael J. Wysocki Date: Fri Apr 28 23:15:52 2017 +0200 Merge branch 'pm-tools' * pm-tools: tools: power: pm-graph: Package makefile and man pages tools: power: pm-graph: AnalyzeBoot v2.0 tools: power: pm-graph: AnalyzeSuspend v4.6 tools/power/x86/intel_pstate_tracer: Adjust directory ownership commit 060d0fbb437a83610268ff9863aa4a88c537dd7e Merge: 0807ee0 0baa91c bafdcde b539cc8 7db36b1 58b11f6 Author: Rafael J. Wysocki Date: Fri Apr 28 23:15:34 2017 +0200 Merge branches 'pm-cpuidle', 'pm-core', 'pm-domains', 'pm-avs' and 'pm-devfreq' * pm-cpuidle: cpuidle: powernv: Avoid a branch in the core snooze_loop() loop cpuidle: powernv: Don't continually set thread priority in snooze_loop() cpuidle: powernv: Don't bounce between low and very low thread priority cpuidle: cpuidle-cps: remove unused variable powernv-cpuidle: Validate DT property array size * pm-core: PM / runtime: Document autosuspend-helper side effects PM / runtime: Fix autosuspend documentation * pm-domains: PM / Domains: Ignore domain-idle-states that are not compatible PM / Domains: Don't warn about IRQ safe device for an always on PM domain PM / Domains: Respect errors from genpd's ->power_off() callback PM / Domains: Enable users of genpd to specify always on PM domains PM / Domains: Clean up code validating genpd's status PM / Domain: remove conditional from error case * pm-avs: PM / AVS: rockchip-io: add io selectors and supplies for rk3328 * pm-devfreq: PM / devfreq: Move struct devfreq_governor to devfreq directory commit 0807ee0f525470482ecb002c45abcceed37e24e5 Merge: 5a7ad11 2addac7 Author: Rafael J. Wysocki Date: Fri Apr 28 23:14:00 2017 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: (37 commits) cpufreq: Add Tegra186 cpufreq driver cpufreq: imx6q: Fix error handling code cpufreq: imx6q: Set max suspend_freq to avoid changes during suspend cpufreq: imx6q: Fix handling EPROBE_DEFER from regulator cpufreq: schedutil: Use policy-dependent transition delays cpufreq: schedutil: Reduce frequencies slower cpufreq: intel_pstate: Add support for Gemini Lake cpufreq: intel_pstate: Eliminate intel_pstate_get_min_max() cpufreq: intel_pstate: Do not walk policy->cpus cpufreq: intel_pstate: Introduce pid_in_use() cpufreq: intel_pstate: Drop struct cpu_defaults cpufreq: intel_pstate: Move cpu_defaults definitions cpufreq: intel_pstate: Add update_util callback to pstate_funcs cpufreq: intel_pstate: Use different utilization update callbacks cpufreq: intel_pstate: Modify check in intel_pstate_update_status() cpufreq: intel_pstate: Drop driver_registered variable cpufreq: intel_pstate: Skip unnecessary PID resets on init cpufreq: intel_pstate: Set HWP sampling interval once cpufreq: intel_pstate: Clean up intel_pstate_busy_pid_reset() cpufreq: intel_pstate: Fold intel_pstate_reset_all_pid() into the caller ... commit 2addac72afb304fa5aa57dbdd12659a8fd52d105 Merge: 2dee4b0 1b72e7f Author: Rafael J. Wysocki Date: Fri Apr 28 23:13:33 2017 +0200 Merge schedutil governor updates for v4.12. commit 2dee4b0e0b83c9d045d6cfe168d6798ead3fe33c Merge: 939dc6f 630e575 Author: Rafael J. Wysocki Date: Fri Apr 28 23:13:04 2017 +0200 Merge intel_pstate driver updates for v4.12. commit 60e22cffb53804e5331df4fa3892dacb6f57eb7a Author: Max Filippov Date: Wed Mar 29 19:53:49 2017 -0700 xtensa: use ITLB_HIT_BIT instead of hardcoded number There is ITLB_HIT_BIT macro, no need to use 0x8 to check for TLB hit. Signed-off-by: Max Filippov arch/xtensa/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d7b1eeb2ca039d04f1a1fcb241920cb112b4b52a Author: Monk Liu Date: Fri Apr 7 18:39:07 2017 +0800 drm/amdgpu:fix race condition sequence is protected by spinlock so don't access sequence in paramter seq when invoking this function. ~0 means to get the latest sequence number and 0 means none to get. Change-Id: Ib7a03f3cf5594deeb4ad333cc59b47a6bddfd1ad Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 3 +++ include/uapi/drm/amdgpu_drm.h | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) commit 5e78835abdabc303ba980f50e9f71039e7689cc9 Author: Tom St Denis Date: Fri Apr 7 07:53:53 2017 -0400 drm/amd/amdgpu: Port gfx9 driver over to new read/write macros Signed-off-by: Tom St Denis Acked-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 406 +++++++++++++++++----------------- 1 file changed, 203 insertions(+), 203 deletions(-) commit b1bb8c0118b3b9d44a6a31ea5242bdd9ed040a9b Author: Tom St Denis Date: Fri Apr 7 07:53:31 2017 -0400 drm/amd/amdgpu: Introduce new read/write macros for SOC15 Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 --- drivers/gpu/drm/amd/amdgpu/soc15_common.h | 20 +++++++++++++++++++- 2 files changed, 19 insertions(+), 4 deletions(-) commit 93ea9b9f7cec596adac13b944a122e4c69de18a4 Author: Huang Rui Date: Thu Mar 23 11:20:25 2017 +0800 drm/amdgpu: add hw_start and non-psp firmware loading into resume Rework in order to properly support suspend. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit be70bbda3fb9a1b876ed80e2ebc292203eb0ffec Author: Huang Rui Date: Tue Mar 21 18:36:57 2017 +0800 drm/amdgpu: split psp ring init function Rework in order to properly support suspend. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 115 ++++++++++++++++++++------------ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 3 + drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 11 ++- drivers/gpu/drm/amd/amdgpu/psp_v3_1.h | 2 + 4 files changed, 87 insertions(+), 44 deletions(-) commit f5cfef98f736f9aa42e9ad41e67b5abd96b77835 Author: Huang Rui Date: Tue Mar 21 18:02:04 2017 +0800 drm/amdgpu: split psp asd function Rework in order to properly support suspend. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 45 ++++++++++++++++----------------- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 5 +++- 2 files changed, 26 insertions(+), 24 deletions(-) commit 2b0c3aee2172451e9f982b25f3fdf59a1b687dc3 Author: Huang Rui Date: Wed Mar 22 10:16:05 2017 +0800 drm/amdgpu: use private memory to store psp firmware data Rework in order to properly support suspend. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 28 ++++++------------- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1 - drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 48 ++++++--------------------------- 3 files changed, 16 insertions(+), 61 deletions(-) commit 53a5cf57d819f12b2de365aa3137c9175a032608 Author: Huang Rui Date: Tue Mar 21 16:51:00 2017 +0800 drm/amdgpu: add psp firmware private memory Needed for proper suspend support. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 23 +++++++++++++++++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 6 ++++++ 2 files changed, 25 insertions(+), 4 deletions(-) commit 6f2b1fcccb6dad1d68c0955144af3ad56bacb25c Author: Huang Rui Date: Tue Mar 21 16:18:11 2017 +0800 drm/amdgpu: split psp tmr init function Rework in order to properly support suspend. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 6524e494a8acf1a281f349e6f726918d41b5a8de Author: Rex Zhu Date: Fri Apr 7 14:56:58 2017 +0800 drm/amd/powerplay: align with VBIOS to support new AVFS structure Align the driver with the latest vbios structures. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c | 21 ++--- drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.h | 24 +++--- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 91 ++++++++++++---------- 3 files changed, 68 insertions(+), 68 deletions(-) commit bc5150ef3331167f08adc9fd5c1f947bd5fdd1ff Author: Bob Moore Date: Wed Apr 26 16:20:17 2017 +0800 ACPICA: Update version to 20170303 ACPICA commit db13f9ffbdf16c0b4fb92d051c14c7b96f379f3f ACPICA commit c55bb526ac9233fe4abc5ea923e136354ce7779c Version 20170224. Version 20170303. Link: https://github.com/acpica/acpica/commit/db13f9ff Link: https://github.com/acpica/acpica/commit/c55bb526 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cf7adeca1f307b578021f227119495eecb1a510 Author: Bob Moore Date: Fri Apr 28 08:53:22 2017 +0800 ACPICA: iasl: add ASL conversion tool ACPICA commit c04d310039d3e0ed1cb62876fe7e596fbc75ab01 ACPICA commit a65c1df7e6b4bad8e37df822018c40c6c446add9 The key feature of this utility is that the original comments within the input ASL files are preserved during the conversion process, and included within the converted ASL+ file -- thus creating a transparent conversion of existing ASL files to ASL+ (ASL 2.0) This patch is an automatic generation of the ASL converter commit, Linux kernel isn't affected by the functionality provided in this commit, but requires the linuxized changes to support future ACPICA release automation. Link: https://github.com/acpica/acpica/commit/c04d3100 Link: https://github.com/acpica/acpica/commit/a65c1df7 Signed-off-by: Bob Moore Signed-off-by: Jung-uk Kim Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acconvert.h | 144 ++++++++++++++++++++++++++++++++++++++++ drivers/acpi/acpica/acglobal.h | 53 +++++++++++++++ drivers/acpi/acpica/aclocal.h | 99 ++++++++++++++++++++++----- drivers/acpi/acpica/acmacros.h | 35 ++++++++++ drivers/acpi/acpica/acopcode.h | 2 + drivers/acpi/acpica/amlcode.h | 4 +- drivers/acpi/acpica/psargs.c | 23 +++++++ drivers/acpi/acpica/psloop.c | 32 +++++++++ drivers/acpi/acpica/psobject.c | 38 +++++++++++ drivers/acpi/acpica/psopcode.c | 5 +- drivers/acpi/acpica/psopinfo.c | 2 +- drivers/acpi/acpica/pstree.c | 7 ++ drivers/acpi/acpica/psutils.c | 11 +++ drivers/acpi/acpica/utalloc.c | 50 ++++++++++++++ drivers/acpi/acpica/utdebug.c | 1 + include/acpi/acconfig.h | 1 + include/acpi/actbl2.h | 1 + 17 files changed, 490 insertions(+), 18 deletions(-) commit 2c1175c2e8e5487233cabde358a19577562ac83e Author: Robert Lippert Date: Thu Apr 20 16:49:47 2017 -0700 ipmi/watchdog: fix wdog hang on panic waiting for ipmi response Commit c49c097610fe ("ipmi: Don't call receive handler in the panic context") means that the panic_recv_free is not called during a panic and the atomic count does not drop to 0. Fix this by only expecting one decrement of the atomic variable which comes from panic_smi_free. Signed-off-by: Robert Lippert Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_watchdog.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 73ba2d5c2bd4ecfec8fe37f20e962889b8a4c972 Merge: 53cecf1 88326ef Author: Dave Airlie Date: Sat Apr 29 05:50:27 2017 +1000 Merge tag 'drm-intel-next-fixes-2017-04-27' of git://anongit.freedesktop.org/git/drm-intel into drm-next drm/i915 and gvt fixes for drm-next/v4.12 * tag 'drm-intel-next-fixes-2017-04-27' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: Confirm the request is still active before adding it to the await drm/i915: Avoid busy-spinning on VLV_GLTC_PW_STATUS mmio drm/i915/selftests: Allocate inode/file dynamically drm/i915: Fix system hang with EI UP masked on Haswell drm/i915: checking for NULL instead of IS_ERR() in mock selftests drm/i915: Perform link quality check unconditionally during long pulse drm/i915: Fix use after free in lpe_audio_platdev_destroy() drm/i915: Use the right mapping_gfp_mask for final shmem allocation drm/i915: Make legacy cursor updates more unsynced drm/i915: Apply a cond_resched() to the saturated signaler drm/i915: Park the signaler before sleeping drm/i915/gvt: fix a bounds check in ring_id_to_context_switch_event() drm/i915/gvt: Fix PTE write flush for taking runtime pm properly drm/i915/gvt: remove some debug messages in scheduler timer handler drm/i915/gvt: add mmio init for virtual display drm/i915/gvt: use directly assignment for structure copying drm/i915/gvt: remove redundant ring id check which cause significant CPU misprediction drm/i915/gvt: remove redundant platform check for mocs load/restore drm/i915/gvt: Align render mmio list to cacheline drm/i915/gvt: cleanup some too chatty scheduler message commit 53cecf1b0e301a881d0096568b58982d7474a8ae Merge: 97643d7 7a9d200 Author: Dave Airlie Date: Sat Apr 29 05:49:54 2017 +1000 Merge branch 'drm-vmwgfx-next' of git://people.freedesktop.org/~syeh/repos_linux into drm-next trivial patch. * 'drm-vmwgfx-next' of git://people.freedesktop.org/~syeh/repos_linux: drm/vmwgfx: Convert macro to octal representation commit 97643d75b053cd2aa7b23a93a474ed3690e34384 Merge: 6b14627 763656d Author: Dave Airlie Date: Sat Apr 29 05:48:45 2017 +1000 Merge branch 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-next Latest updates on Mali DP, adding support for colour management, plane scaling and power management. (these have been in -next for a while). * 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld: drm: mali-dp: use div_u64 for expensive 64-bit divisions drm: mali-dp: Check the mclk rate and allow up/down scaling drm: mali-dp: Enable image enhancement when scaling drm: mali-dp: Add plane upscaling support drm/mali-dp: Add core_id file to the sysfs interface drm: mali-dp: Add CTM support drm: mali-dp: enable gamma support drm: mali-dp: add malidp_crtc_state struct drm: mali-dp: add custom reset hook for planes drm: mali-dp: remove unused variable drm: mali-dp: add atomic_print_state for planes drm: mali-dp: Enable power management for the device. drm: mali-dp: Update the state of all planes before re-enabling active CRTCs. commit 4c042a80c1776477d8f13d0b214809a2eaedf01d Merge: cd5487fb f3515b5 Author: David S. Miller Date: Fri Apr 28 15:48:16 2017 -0400 Merge branch 'bpf-misc-next' Daniel Borkmann says: ==================== Misc BPF updates This set cleans up ldimm64 leftovers from early eBPF days and adds couple of test cases related to this to the verifier test suite. It also cleans up the kallsyms spinlock (had same patch also in queue) by relaxing it through switching to _bh variant. It fixes up test_progs in relation to htons/ntohs and adds accessor macros for the percpu tests in test_maps. ==================== Signed-off-by: David S. Miller commit f3515b5d0b718cceae9e67802cfa20d5e6f9b567 Author: Daniel Borkmann Date: Thu Apr 27 01:39:35 2017 +0200 bpf: provide a generic macro for percpu values for selftests To overcome bugs as described and fixed in 89087c456fb5 ("bpf: Fix values type used in test_maps"), provide a generic BPF_DECLARE_PERCPU() and bpf_percpu() accessor macro for all percpu map values used in tests. Declaring variables works as follows (also works for structs): BPF_DECLARE_PERCPU(uint32_t, my_value); They can then be accessed normally as uint32_t type through: bpf_percpu(my_value, ) For example: bpf_percpu(my_value, 0)++; Implicitly, we make sure that the passed type is allocated and aligned by gcc at least on a 8-byte boundary, so that it works together with the map lookup/update syscall for percpu maps. We use it as a usage example in test_maps, so that others are free to adapt this into their code when necessary. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/bpf_util.h | 7 +++++++ tools/testing/selftests/bpf/test_maps.c | 37 ++++++++++++++++++--------------- 2 files changed, 27 insertions(+), 17 deletions(-) commit 43bcf707ccdc79ee63edb953fcf72e6dc244cfa1 Author: Daniel Borkmann Date: Thu Apr 27 01:39:34 2017 +0200 bpf: fix _htons occurences in test_progs Dave reported that on sparc test_progs generates buggy swapped eth->h_proto protocol comparisons: 10: (15) if r3 == 0xdd86 goto pc+9 R0=imm2,min_value=2,max_value=2 R1=pkt(id=0,off=0,r=14) R2=pkt_end R3=inv R4=pkt(id=0,off=14,r=14) R5=inv56 R10=fp This is due to the unconditional ... #define htons __builtin_bswap16 #define ntohs __builtin_bswap16 ... in test_progs that causes this. Make use of asm/byteorder.h and use __constant_htons() where possible and only perform the bswap16 when on little endian in non-constant case. Fixes: 6882804c916b ("selftests/bpf: add a test for overlapping packet range checks") Fixes: 37821613626e ("selftests/bpf: add l4 load balancer test based on sched_cls") Reported-by: David S. Miller Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/bpf_util.h | 19 +++++++++++++++++++ tools/testing/selftests/bpf/test_l4lb.c | 11 +++++------ tools/testing/selftests/bpf/test_pkt_access.c | 6 +++--- tools/testing/selftests/bpf/test_progs.c | 10 ++++------ 4 files changed, 31 insertions(+), 15 deletions(-) commit d24f7c7fb91d94556936f2511035d1f123b449f4 Author: Hannes Frederic Sowa Date: Thu Apr 27 01:39:33 2017 +0200 bpf: bpf_lock on kallsysms doesn't need to be irqsave Hannes rightfully spotted that the bpf_lock doesn't need to be irqsave variant. We never perform any such updates where this would be necessary (neither right now nor in future), therefore relax this further. Signed-off-by: Hannes Frederic Sowa Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/core.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 728a853a44a0f01111883f95216e980722474c07 Author: Daniel Borkmann Date: Thu Apr 27 01:39:32 2017 +0200 bpf: add various test cases to verifier selftests Add several test cases around ldimm64, fp arithmetic and direct packet access. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_verifier.c | 137 ++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) commit 7e56fbd27b4bd6ab7d641f45bf23d2af654412f6 Author: Daniel Borkmann Date: Thu Apr 27 01:39:31 2017 +0200 bpf, x86_64/arm64: remove old ldimm64 artifacts from jits For both cases, the verifier is already rejecting such invalid formed instructions. Thus, remove these artifacts from old times and align it with ppc64, sparc64 and s390x JITs that don't have them in the first place. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller arch/arm64/net/bpf_jit_comp.c | 9 --------- arch/x86/net/bpf_jit_comp.c | 7 ------- 2 files changed, 16 deletions(-) commit b2518c78ce76896f0f8f7940bf02104b227e1709 Author: Toshi Kani Date: Tue Apr 25 17:04:13 2017 -0600 libnvdimm, pmem: fix a NULL pointer BUG in nd_pmem_notify The following BUG was observed when nd_pmem_notify() was called for a BTT device. The use of a pmem_device pointer is not valid with BTT. BUG: unable to handle kernel NULL pointer dereference at 0000000000000030 IP: nd_pmem_notify+0x30/0xf0 [nd_pmem] Call Trace: nd_device_notify+0x40/0x50 child_notify+0x10/0x20 device_for_each_child+0x50/0x90 nd_region_notify+0x20/0x30 nd_device_notify+0x40/0x50 nvdimm_region_notify+0x27/0x30 acpi_nfit_scrub+0x341/0x590 [nfit] process_one_work+0x197/0x450 worker_thread+0x4e/0x4a0 kthread+0x109/0x140 Fix nd_pmem_notify() by setting nd_region and badblocks pointers properly for BTT. Cc: Cc: Vishal Verma Fixes: 719994660c24 ("libnvdimm: async notification support") Signed-off-by: Toshi Kani Signed-off-by: Dan Williams drivers/nvdimm/pmem.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) commit ab630891ce0eb83dc6c37971b35b228fc9e225ca Author: Dan Williams Date: Fri Apr 21 13:28:12 2017 -0700 libnvdimm, region: sysfs trigger for nvdimm_flush() The nvdimm_flush() mechanism helps to reduce the impact of an ADR (asynchronous-dimm-refresh) failure. The ADR mechanism handles flushing platform WPQ (write-pending-queue) buffers when power is removed. The nvdimm_flush() mechanism performs that same function on-demand. When a pmem namespace is associated with a block device, an nvdimm_flush() is triggered with every block-layer REQ_FUA, or REQ_FLUSH request. These requests are typically associated with filesystem metadata updates. However, when a namespace is in device-dax mode, userspace (think database metadata) needs another path to perform the same flushing. In other words this is not required to make data persistent, but in the case of metadata it allows for a smaller failure domain in the unlikely event of an ADR failure. The new 'deep_flush' attribute is visible when the individual DIMMs backing a given interleave-set are described by platform firmware. In ACPI terms this is "NVDIMM Region Mapping Structures" and associated "Flush Hint Address Structures". Reads return "1" if the region supports triggering WPQ flushes on all DIMMs. Reads return "0" the flush operation is a platform nop, and in that case the attribute is read-only. Why sysfs and not an ioctl? An ioctl requires establishing a new ioctl function number space for device-dax. Given that this would be called on a device-dax fd an application could be forgiven for accidentally calling this on a filesystem-dax fd. Placing this interface in libnvdimm sysfs removes that potential for collision with a filesystem ioctl, and it keeps ioctls out of the generic device-dax implementation. Cc: Jeff Moyer Cc: Masayoshi Mizuma Signed-off-by: Dan Williams drivers/nvdimm/region_devs.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit cd5487fb9485934dfa0ad9d6b52c4da8e38318e6 Merge: cec3819 e892d2d Author: David S. Miller Date: Fri Apr 28 15:43:24 2017 -0400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2017-04-28 Just one patch to fix a misplaced spin_unlock_bh in an error path. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit a590b90d472f2c176c140576ee3ab44df7f67839 Author: Tejun Heo Date: Fri Apr 28 15:14:55 2017 -0400 cgroup: fix spurious warnings on cgroup_is_dead() from cgroup_sk_alloc() cgroup_get() expected to be called only on live cgroups and triggers warning on a dead cgroup; however, cgroup_sk_alloc() may be called while cloning a socket which is left in an empty and removed cgroup and thus may legitimately duplicate its reference on a dead cgroup. This currently triggers the following warning spuriously. WARNING: CPU: 14 PID: 0 at kernel/cgroup.c:490 cgroup_get+0x55/0x60 ... [] __warn+0xd3/0xf0 [] warn_slowpath_null+0x1e/0x20 [] cgroup_get+0x55/0x60 [] cgroup_sk_alloc+0x51/0xe0 [] sk_clone_lock+0x2db/0x390 [] inet_csk_clone_lock+0x16/0xc0 [] tcp_create_openreq_child+0x23/0x4b0 [] tcp_v6_syn_recv_sock+0x91/0x670 [] tcp_check_req+0x3a6/0x4e0 [] tcp_v6_rcv+0x693/0xa00 [] ip6_input_finish+0x59/0x3e0 [] ip6_input+0x32/0xb0 [] ip6_rcv_finish+0x57/0xa0 [] ipv6_rcv+0x318/0x4d0 [] __netif_receive_skb_core+0x2d7/0x9a0 [] __netif_receive_skb+0x16/0x70 [] netif_receive_skb_internal+0x23/0x80 [] napi_gro_frags+0x208/0x270 [] mlx4_en_process_rx_cq+0x74c/0xf40 [] mlx4_en_poll_rx_cq+0x30/0x90 [] net_rx_action+0x210/0x350 [] __do_softirq+0x106/0x2c7 [] irq_exit+0x9d/0xa0 [] do_IRQ+0x54/0xd0 [] common_interrupt+0x7f/0x7f [] cpuidle_enter+0x17/0x20 [] cpu_startup_entry+0x2a9/0x2f0 [] start_secondary+0xf1/0x100 This patch renames the existing cgroup_get() with the dead cgroup warning to cgroup_get_live() after cgroup_kn_lock_live() and introduces the new cgroup_get() which doesn't check whether the cgroup is live or dead. All existing cgroup_get() users except for cgroup_sk_alloc() are converted to use cgroup_get_live(). Fixes: d979a39d7242 ("cgroup: duplicate cgroup reference when cloning sockets") Cc: stable@vger.kernel.org # v4.5+ Cc: Johannes Weiner Reported-by: Chris Mason Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit e9b615186805e2c18a0ac76aca62c1543ecfdbb8 Author: Oleksij Rempel Date: Fri Apr 28 16:19:49 2017 +0200 platform/x86: asus-wmi: try to set als by default some laptops, for example ASUS UX330UAK, have brocken als_get function but working als_set funktion. In this case, ALS will stay turned off. Method (WMNB, 3, Serialized) { ... If (Local0 == 0x53545344) { ... If (IIA0 == 0x00050001) { If (!ALSP) { Return (0x02) } Local0 = (GALS & 0x10) <<<---- bug, should be: (GALS () & 0x10) If (Local0) { Return (0x00050001) } Else { Return (0x00050000) } } ..... If (Local0 == 0x53564544) { ... If (IIA0 == 0x00050001) { Return (ALSC (IIA1)) } ...... Method (GALS, 0, NotSerialized) { Local0 = Zero Local0 |= 0x20 If (ALAE) { Local0 |= 0x10 } Local1 = 0x0A Local1 <<= 0x08 Local0 |= Local1 Return (Local0) } Since it works without problems on Windows I assume ASUS WMI driver for Win never trying to get ALS state, and instead it is setting it by default to ON. This patch will do the same. Turn ALS on by default. Signed-off-by: Oleksij Rempel Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-nb-wmi.c | 13 +++++++++++++ drivers/platform/x86/asus-wmi.c | 12 ++++++++++++ drivers/platform/x86/asus-wmi.h | 1 + 3 files changed, 26 insertions(+) commit a8fe342856e5bce71a43201eb2870bd059483d2f Author: Jérémy Lefaure Date: Fri Apr 21 22:19:45 2017 -0400 platform/x86: asus-wmi: fix cpufv sysfs file permission The cpufv sysfs file is defined as readable by anyone even if the attribute does not have a show function. The result of every read is an IO error. This file should be write only. Signed-off-by: Jérémy Lefaure Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f9ac89f5ad613b462339e845aeb8494646fd9be2 Author: Lee, Chun-Yi Date: Fri Apr 28 16:23:59 2017 +0800 platform/x86: acer-wmi: setup accelerometer when ACPI device was found The 98d610c3739a patch was introduced since v4.11-rc1 that it causes that the accelerometer input device will not be created on workable machines because the HID string comparing logic is wrong. And, the patch doesn't prevent that the accelerometer input device be created on the machines that have no BST0001. That's because the acpi_get_devices() returns success even it didn't find any match device. This patch fixed the HID string comparing logic of BST0001 device. And, it also makes sure that the acpi_get_devices() returns acpi_handle for BST0001. Fixes: 98d610c3739a ("acer-wmi: setup accelerometer when machine has appropriate notify event") Reference: https://bugzilla.kernel.org/show_bug.cgi?id=193761 Reported-by: Samuel Sieb Signed-off-by: "Lee, Chun-Yi" Signed-off-by: Andy Shevchenko drivers/platform/x86/acer-wmi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit ccc7179f4d9467947c94f4302d61cd5143842fcd Author: Andy Shevchenko Date: Tue Feb 21 20:53:48 2017 +0100 platform/x86: ideapad-laptop: Add IdeaPad V310-15ISK to no_hw_rfkill Like other Lenovo models the IdeaPad V310-15ISK does not have an hw rfkill switch. This results in hard-blocked radios after boot, resulting in always blocked radios rendering them unusable. Add the IdeaPad V310-15ISK to the no_hw_rfkill DMI list and allows using the built-in radios. Signed-off-by: Andy Shevchenko drivers/platform/x86/ideapad-laptop.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 62a7b9c859d09af860c71cfbea4381061975ca72 Author: Kuppuswamy Sathyanarayanan Date: Sun Apr 9 15:00:21 2017 -0700 platform/x86: intel_pmc_ipc: use gcr mem base for S0ix counter read To maintain the uniformity in accessing GCR registers, this patch modifies the S0ix counter read function to use GCR address base instead of ipc address base. Signed-off-by: Kuppuswamy Sathyanarayanan Reviewed-by: Rajneesh Bhardwaj Tested-by: Shanth Murthy Signed-off-by: Andy Shevchenko arch/x86/include/asm/intel_pmc_ipc.h | 2 ++ drivers/platform/x86/intel_pmc_ipc.c | 10 +++------- 2 files changed, 5 insertions(+), 7 deletions(-) commit 9d855d468dc655d10be6cb52e36aa0bbfa6f515d Author: Kuppuswamy Sathyanarayanan Date: Sun Apr 9 15:00:20 2017 -0700 platform/x86: intel_pmc_ipc: Fix iTCO_wdt GCS memory mapping failure iTCO_wdt driver need access to PMC_CFG GCR register to modify the noreboot setting. Currently, this is done by passing PMC_CFG reg address as memory resource to watchdog driver and allowing it directly modify the PMC_CFG register. But currently PMC driver also has requirement to memory map the entire GCR register space in this driver. This causes mem request failure in watchdog driver. So this patch fixes this issue by adding API to update noreboot flag and passes them to watchdog driver via platform data. Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_pmc_ipc.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit 140c91b26ebc48d80c6ac3ef06953b17d7fb3785 Author: Kuppuswamy Sathyanarayanan Date: Sun Apr 9 15:00:19 2017 -0700 watchdog: iTCO_wdt: Add PMC specific noreboot update api In some SoCs, setting noreboot bit needs modification to PMC GC registers. But not all PMC drivers allow other drivers to memory map their GC region. This could create mem request conflict in watchdog driver. So this patch adds facility to allow PMC drivers to pass noreboot update function to watchdog drivers via platform data. Signed-off-by: Kuppuswamy Sathyanarayanan Acked-by: Guenter Roeck Signed-off-by: Andy Shevchenko drivers/watchdog/iTCO_wdt.c | 25 ++++++++++++++++++------- include/linux/platform_data/itco_wdt.h | 4 ++++ 2 files changed, 22 insertions(+), 7 deletions(-) commit f583a884afecb16fcb8200ebb9956ea369aff57f Author: Kuppuswamy Sathyanarayanan Date: Sun Apr 9 15:00:18 2017 -0700 watchdog: iTCO_wdt: cleanup set/unset no_reboot_bit functions iTCO_wdt no_reboot_bit set/unset functions has lot of common code between them. So merging these two functions into a single update function would remove these unnecessary code duplications. This patch fixes this issue by creating a no_reboot_bit update function to handle both set/unset functions. Also checking for iTCO version every time you make no_reboot_bit set/unset call is inefficient and makes the code look complex. This can be improved by performing this check once during device probe and selecting the appropriate no_reboot_bit update function. This patch fixes this issue by splitting the update function into multiple helper functions. Signed-off-by: Kuppuswamy Sathyanarayanan Reviewed-by: Guenter Roeck Signed-off-by: Andy Shevchenko drivers/watchdog/iTCO_wdt.c | 83 +++++++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 33 deletions(-) commit 496702068597ff29092e724301f77b91864454b3 Author: Kuppuswamy Sathyanarayanan Date: Sun Apr 9 15:00:17 2017 -0700 platform/x86: intel_pmc_ipc: Add pmc gcr read/write/update api's This patch adds API's to read/write/update PMC GC registers. PMC dependent devices like iTCO_wdt, Telemetry has requirement to acces GCR registers. These API's can be used for this purpose. Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Andy Shevchenko arch/x86/include/asm/intel_pmc_ipc.h | 21 +++++++ drivers/platform/x86/intel_pmc_ipc.c | 115 +++++++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+) commit e6749c89b4b0acaeddf4909eb75b7f6c8a4c15b2 Author: Kuppuswamy Sathyanarayanan Date: Sun Apr 9 15:00:16 2017 -0700 platform/x86: intel_pmc_ipc: fix gcr offset According to Broxton APL spec, PMC MIMO resources for Global Control Registers(GCR) are located at 4K(0x1000) offset from IPC base address. In this driver, PLAT_RESOURCE_GCR_OFFSET macro defines the offset of GCR region base address from IPC base address and its current value of 0x1008 is incorrect because it points to location for PMC_CFG register and not the GCR base address itself. GCR Base = IPC1 Base + 0x1000. This patch fixes this offset issue. Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_pmc_ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9216e0dcb5533a999d544d0af8661118e0588e1d Author: Pali Rohár Date: Sun Apr 23 21:40:47 2017 +0200 platform/x86: dell-laptop: Add keyboard backlight timeout AC settings When changing keyboard backlight state on new Dell laptops, firmware expects a new timeout AC value filled in Set New State SMBIOS call. Without it any change of keyboard backlight state on new Dell laptops fails. And user can see following error message in dmesg: dell_laptop: Setting old previous keyboard state failed leds dell::kbd_backlight: Setting an LED's brightness failed (-6) This patch adds support for retrieving current timeout AC values and also updating them. Current timeout value in sysfs is displayed based on current AC status, like current display brightness value. Detection if Dell laptop supports or not new timeout AC settings is done by checking existence of Keyboard Backlight with AC SMBIOS token (0x0451). Signed-off-by: Pali Rohár Acked-by: Mario Limonciello Tested-by: Arcadiy Ivanov [andy: fixed merge conflict with defined constants] Signed-off-by: Andy Shevchenko drivers/platform/x86/dell-laptop.c | 59 ++++++++++++++++++++++++++++++++++---- 1 file changed, 53 insertions(+), 6 deletions(-) commit 90a864b965e452ee2a15ed7b13f47142aeb4a40b Author: Arvind Yadav Date: Thu Mar 9 11:19:56 2017 +0530 platform/x86: dell-laptop: Handle return error form dell_get_intensity. Here, This patch is to handle a return error from dell_get_intensity. This change is done using Coccinelle. Signed-off-by: Arvind Yadav Acked-by: Pali Rohár Signed-off-by: Andy Shevchenko drivers/platform/x86/dell-laptop.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0b8dba15e909990e275631fa57255e74bbc766fc Author: Andy Shevchenko Date: Wed Apr 19 22:27:31 2017 +0300 platform/x86: hp-wireless: reuse module_acpi_driver There is a macro to register and unregister modules in simple cases, Let's use it and clean up the driver. Cc: Alex Hung Signed-off-by: Andy Shevchenko Reviewed-by: Darren Hart (VMware) drivers/platform/x86/hp-wireless.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) commit cec381919818a9a0cb85600b3c82404bdd38cf36 Merge: 2d2ab65 b34939b Author: David S. Miller Date: Fri Apr 28 14:41:15 2017 -0400 Merge tag 'mac80211-next-for-davem-2017-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Another set of patches for -next: * API support for concurrent scheduled scan requests * API changes for roaming reporting * BSS max idle support in mac80211 * API changes for TX status reporting in mac80211 * API changes for RX rate reporting in mac80211 * rewrite monitor logic to prepare for BPF filters * bugfix for rare devices without 2.4 GHz support * a bugfix for recent DFS changes * some further cleanups The API changes are actually at a nice time, since it's typically quiet just before the merge window, and trees can be synchronized easily during it. ==================== Signed-off-by: David S. Miller commit bcb85c887647c0f096b51ac2ee391ea792b14b9e Author: Jann Horn Date: Mon Apr 24 11:16:49 2017 +0200 KVM: Documentation: remove VM mmap documentation Since commit 80f5b5e700fa9c ("KVM: remove vm mmap method"), the VM mmap handler is gone. Remove the corresponding documentation. Signed-off-by: Jann Horn Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/api.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 3417f3528a2c7f8824cad7f0c35425961e98886b Author: Arnd Bergmann Date: Wed Apr 19 19:44:55 2017 +0200 clk: ti: divider: try to fix ti_clk_register_divider Commit 6c0afb503937 ("clk: ti: convert to use proper register definition for all accesses") converted all register accesses in the TI clk driver to use a proper struct instead of a void pointer casted struct that fits into a u32. Unfortunately, it missed a conversion here in the didivder code, leading to a compiler warning like so: drivers/clk/ti/divider.c: In function 'ti_clk_register_divider': drivers/clk/ti/divider.c:460:8: error: 'reg' may be used uninitialized in this function [-Werror=maybe-uninitialized] Treating a 'u32' variable as a structure leads to a stack overflow here, and the register address we pass down is never initialized. Convert this part of the code as well so things work properly. Fixes: 6c0afb503937 ("clk: ti: convert to use proper register definition for all accesses") Signed-off-by: Arnd Bergmann [sboyd@codeaurora.org: Fixed fixes tag, rewrote commit message, s/reg_setup/reg/] Signed-off-by: Stephen Boyd drivers/clk/ti/divider.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 94d595c56077fd8b0f61701e03fd4b3dc8c62038 Author: Dasaratharaman Chandramouli Date: Mon Mar 20 19:38:09 2017 -0400 IB/core: Add rdma_cap_opa_ah to expose opa address handles rdma_cap_opa_ah(..) enables core components to check if the corresponding port supports OPA extended addressing. Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit ee1c60b1bff8f258fa530def3459726f8e922caf Author: Dasaratharaman Chandramouli Date: Mon Mar 20 19:38:08 2017 -0400 IB/SA: Modify SA to implicitly cache Class Port info SA will query and cache class port info as part of its initialization. SA will also invalidate and refresh the cache based on specific events. Callers such as IPoIB and CM can query the SA to get the classportinfo information. Apart from making the caller code much simpler, this change puts the onus on the SA to query and maintain classportinfo much like how it maitains the address handle to the SM. Reviewed-by: Ira Weiny Reviewed-by: Don Hiatt Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 76 ++--------- drivers/infiniband/core/sa_query.c | 175 +++++++++++++++++-------- drivers/infiniband/ulp/ipoib/ipoib.h | 1 - drivers/infiniband/ulp/ipoib/ipoib_main.c | 71 ---------- drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 9 +- include/rdma/ib_sa.h | 12 +- 6 files changed, 137 insertions(+), 207 deletions(-) commit cb8637660ae8e4a1e240692582472bbac708da88 Author: Dasaratharaman Chandramouli Date: Mon Mar 20 19:38:07 2017 -0400 IB/SA: Move functions update_sm_ah() and ib_sa_event() Moving these will facilitate changes to these in the next patchs. This is strictly a move and there are no changes to the functions in any way. Reviewed-by: Don Hiatt Reviewed-by: Ira Weiny Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/sa_query.c | 172 ++++++++++++++++++------------------- 1 file changed, 86 insertions(+), 86 deletions(-) commit 680562b56939c8730c1beba9da2cf184c88a437e Author: Dasaratharaman Chandramouli Date: Mon Mar 20 19:38:06 2017 -0400 IB/SA: Remove unwanted braces This fixes a checkpatch issue. The fix is needed so that some of these functions can be moved around in the forthcoming patches Reviewed-by: Don Hiatt Reviewed-by: Ira Weiny Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/sa_query.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit dbb6c91fd8e0f32ff892cf72782f3650df2be811 Author: Dasaratharaman Chandramouli Date: Mon Mar 20 19:38:05 2017 -0400 IB/SA: Add braces when using sizeof This fixes a checkpatch issue. The fix is needed so that some of these functions can be moved around in the forthcoming patches Reviewed-by: Don Hiatt Reviewed-by: Ira Weiny Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/sa_query.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f96a318714496c01c6d3cecea06500f69e5c7edc Author: Dasaratharaman Chandramouli Date: Mon Mar 20 19:38:04 2017 -0400 IB/SA: Fix lines longer than 80 columns This fixes a checkpatch issue. The fix is needed so that some of these functions can be moved around in the forthcoming patches Reviewed-by: Don Hiatt Reviewed-by: Ira Weiny Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Doug Ledford drivers/infiniband/core/sa_query.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 4608e4c8f2417a5a2985da9890710033c434c387 Author: Dennis Dalessandro Date: Sun Apr 9 10:17:30 2017 -0700 IB/hfi1: Use bool in process_ecn The process_ecn intends to return a bool value. However it is doing so incorrectly by ANDing the fecn mask. The fecn bit is bit 31. Bool is not a native data type and is up to the compiler to implement how it sees fit. It is conceivable that this upper bit gets washed out. Fix by converting to a bool properly. Cc: stable@vger.kernel.org Fixes: Commit fd2b562edca6 ("IB/hfi1: Pull FECN/BECN processing to a common place") Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/hfi.h | 2 +- drivers/infiniband/hw/hfi1/rc.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 12220267645cb7d1f3f699218e0098629e932e1f Author: Ira Weiny Date: Sun Apr 9 10:17:24 2017 -0700 IB/hfi: Protect against writable mmap The device/port status is not intended to be changed from user space. Prevent a user from mapping them as write or execute. Reviewed-by: Dennis Dalessandro Signed-off-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 4 ++++ 1 file changed, 4 insertions(+) commit ee495ada5c5681e66c20e9927fa35252bdf7fba0 Author: Dennis Dalessandro Date: Sun Apr 9 10:17:18 2017 -0700 IB/hfi1: Fix unbalanced braces around else Add missing braces around else blocks in a few places to make checkpatch happy. Fixes: 7724105686e7 ("IB/hfi1: add driver files") Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 4 ++-- drivers/infiniband/hw/hfi1/init.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit 08af5916b3b0ace9c97e5bf5d89122a0c7aa5c58 Author: Dennis Dalessandro Date: Sun Apr 9 10:17:12 2017 -0700 IB/hfi1: Convert %Lx to %llx According to checkpatch %Lx is not standard C so remove it and use the suggested %llx. Fixes: 7724105686e7 ("IB/hfi1: add driver files") Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a498fbcd8714e21b2c4016ddd04b62d4ac501b18 Author: Dennis Dalessandro Date: Sun Apr 9 10:17:06 2017 -0700 IB/hfi1: Fix misspelling in comment Checkpatch flagged a misspelled word. Fix it. Fixes: 8764522e5251 ("staging/rdma/hfi1: Unexpected link up pkey values are not an error") Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53526500f301bfc2cde0cd6cf734ebce5020d6b7 Author: Neel Desai Date: Sun Apr 9 10:16:59 2017 -0700 IB/hfi1: Permanently enable P_Key checking in HFI Ingress and egress port P_Key checking should always be performed for HFIs. This patch will enable ingress and egress P_Key checking when the port is initialized and will ignore the P_Key information sent by the FM in the port info structure which is meant to be used only by the switch. Reviewed-by: Easwar Hariharan Reviewed-by: Dennis Dalessandro Signed-off-by: Neel Desai Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/init.c | 3 +++ drivers/infiniband/hw/hfi1/mad.c | 10 ---------- 2 files changed, 3 insertions(+), 10 deletions(-) commit 98b9ee2002a836acacd34df8df92184b83049df3 Author: Stuart Summers Date: Sun Apr 9 10:16:53 2017 -0700 IB/hfi1: Cache neighbor secure data after link up Secure data is transferred across the link during verify cap. This includes Neighbor Guid, Type, and Port Number. This transfer is not guaranteed to complete until the 8051 firmware has completed processing of the state_complete frame. Move the consumption of this data from verify cap handling to link up handling to ensure the data is finalized. Additionally, do not notify the SM that the link is up until after this data is actually available. Reviewed-by: Ira Weiny Reviewed-by: Easwar Hariharan Reviewed-by: Mike Marciniszyn Signed-off-by: Stuart Summers Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 27 +-------------------------- drivers/infiniband/hw/hfi1/hfi.h | 11 ++++++++++- drivers/infiniband/hw/hfi1/intr.c | 27 ++++++++++++++++----------- 3 files changed, 27 insertions(+), 38 deletions(-) commit 03e80e9a5738a6a93b9120dc2f068d11283d65c9 Author: Neel Desai Date: Sun Apr 9 10:16:47 2017 -0700 IB/hfi1: Adjust high temperature warning for QSFP cable When we receive a QSFP_HIGH_TEMP_ALARM or QSFP_HIGH_TEMP_WARNING interrupt, print a "QSFP cable temperature too high" message. Reviewed-by: Easwar Hariharan Reviewed-by: Dennis Dalessandro Signed-off-by: Neel Desai Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22546b741af8355cd2e16739b6af4a8f17081839 Author: Tadeusz Struk Date: Fri Apr 28 10:40:02 2017 -0700 IB/hfi1: Fix softlockup issue Soft lockups can occur because the mad processing on different CPUs acquire the spin lock dc8051_lock: [534552.835870] [] ? read_dev_port_cntr.isra.37+0x23/0x160 [hfi1] [534552.835880] [] read_dev_cntr+0x4f/0x60 [hfi1] [534552.835893] [] pma_get_opa_portstatus+0x64d/0x8c0 [hfi1] [534552.835904] [] hfi1_process_mad+0x48d/0x18c0 [hfi1] [534552.835908] [] ? __slab_free+0x81/0x2f0 [534552.835936] [] ? ib_mad_recv_done+0x21e/0xa30 [ib_core] [534552.835939] [] ? __kmalloc+0x1f3/0x240 [534552.835947] [] ib_mad_recv_done+0x2cb/0xa30 [ib_core] [534552.835955] [] __ib_process_cq+0x55/0xd0 [ib_core] [534552.835962] [] ib_cq_poll_work+0x20/0x60 [ib_core] [534552.835964] [] process_one_work+0x17b/0x470 [534552.835966] [] worker_thread+0x126/0x410 [534552.835969] [] ? rescuer_thread+0x460/0x460 [534552.835971] [] kthread+0xcf/0xe0 [534552.835974] [] ? kthread_create_on_node+0x140/0x140 [534552.835977] [] ret_from_fork+0x58/0x90 [534552.835980] [] ? kthread_create_on_node+0x140/0x140 This issue is made worse when the 8051 is busy and the reads take longer. Fix by using a non-spinning lock procure. Reviewed-by: Michael J. Ruhl Reviewed-by: Mike Marciszyn Signed-off-by: Tadeusz Struk Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 86 +++++++++++++++++++++++---------------- drivers/infiniband/hw/hfi1/hfi.h | 7 ++-- drivers/infiniband/hw/hfi1/init.c | 2 +- 3 files changed, 57 insertions(+), 38 deletions(-) commit b6eac931b9bb2bce4db7032c35b41e5e34ec22a5 Author: Mike Marciniszyn Date: Sun Apr 9 10:16:35 2017 -0700 IB/hfi1: Prevent kernel QP post send hard lockups The driver progress routines can call cond_resched() when a timeslice is exhausted and irqs are enabled. If the ULP had been holding a spin lock without disabling irqs and the post send directly called the progress routine, the cond_resched() could yield allowing another thread from the same ULP to deadlock on that same lock. Correct by replacing the current hfi1_do_send() calldown with a unique one for post send and adding an argument to hfi1_do_send() to indicate that the send engine is running in a thread. If the routine is not running in a thread, avoid calling cond_resched(). CC: # 4.7.x- Fixes: Commit 831464ce4b74 ("IB/hfi1: Don't call cond_resched in atomic mode when sending packets") Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/ruc.c | 26 ++++++++++++++++---------- drivers/infiniband/hw/hfi1/verbs.c | 4 ++-- drivers/infiniband/hw/hfi1/verbs.h | 6 ++++-- 3 files changed, 22 insertions(+), 14 deletions(-) commit 3d591099a0a2b45a50913130f0599ab838002fc3 Author: Don Hiatt Date: Sun Apr 9 10:16:28 2017 -0700 IB/hfi1: Use defines from common headers Move FECN and BECN related defines to common header files Reviewed-by: Dennis Dalessandro Signed-off-by: Don Hiatt Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/common.h | 6 ------ drivers/infiniband/hw/hfi1/driver.c | 8 ++++---- drivers/infiniband/hw/hfi1/hfi.h | 4 ++-- drivers/infiniband/hw/hfi1/rc.c | 2 +- drivers/infiniband/hw/hfi1/ruc.c | 2 +- drivers/infiniband/hw/hfi1/trace_ibhdrs.h | 8 ++++---- drivers/infiniband/hw/hfi1/ud.c | 2 +- include/rdma/ib_hdrs.h | 6 ++++++ 8 files changed, 19 insertions(+), 19 deletions(-) commit cb42705792d809b108c76f1c97665382dc89531e Author: Don Hiatt Date: Sun Apr 9 10:16:22 2017 -0700 IB/hfi1: Add functions to parse 9B headers These inline functions improve code readability by enabling callers to read specific fields from the header without knowledge of byte offsets. Reviewed-by: Dennis Dalessandro Signed-off-by: Don Hiatt Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/driver.c | 13 ++++---- drivers/infiniband/hw/hfi1/hfi.h | 3 +- drivers/infiniband/hw/hfi1/rc.c | 14 ++++----- drivers/infiniband/hw/hfi1/ruc.c | 24 +++++++-------- drivers/infiniband/hw/hfi1/trace.c | 5 ++-- drivers/infiniband/hw/hfi1/uc.c | 8 ++--- drivers/infiniband/hw/hfi1/ud.c | 14 ++++----- drivers/infiniband/hw/hfi1/verbs.c | 8 ++--- include/rdma/ib_hdrs.h | 60 +++++++++++++++++++++++++++++++++++++ 9 files changed, 102 insertions(+), 47 deletions(-) commit aad559c21d7b536444701cb798100d33ff027f70 Author: Dasaratharaman Chandramouli Date: Sun Apr 9 10:16:15 2017 -0700 IB/hfi1: Rename hdr2sc to hfi1_9B_get_sc5 The function really returned the 5-bit sc value from the header and rhf. hdr2sc didn't quite describe what it did. Reviewed-by: Dennis Dalessandro Reviewed-by: Don Hiatt Signed-off-by: Dasaratharaman Chandramouli Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/driver.c | 7 ++++--- drivers/infiniband/hw/hfi1/hfi.h | 2 +- drivers/infiniband/hw/hfi1/ud.c | 2 +- drivers/infiniband/hw/hfi1/verbs.c | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) commit 3ca4fbc84a17b5c4f6c675e60ec5d3470019a83a Author: Sebastian Sanchez Date: Sun Apr 9 10:16:09 2017 -0700 IB/hfi1: Return SC2VL mappings to FM with VL15 instead of ILLEGAL_VL VL15 in the SC2VL table is used to indicate an invalid SC for the FM, however, internally the driver remaps SCs from VL15 to ILLEGAL_VL to prevent error counts. This mapping confuses the FM when performing a sweep, making it return a table mismatch error. Have SMA convert ILLEGAL_VL to VL15 entries for the SC2VL table queries. Reviewed-by: Michael J. Ruhl Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/mad.c | 41 ++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) commit db730894f4f7e7afcaf31d17679ed58b4f781500 Author: Michael J. Ruhl Date: Sun Apr 9 10:16:03 2017 -0700 IB/hfi1: Validate the TID count before using it Improve the safety of the code by validating the user supplied tidcnt before use. Reviewed-by: Mitko Haralanov Reviewed-by: Dennis Dalessandro Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_exp_rcv.c | 3 +++ 1 file changed, 3 insertions(+) commit aad9ff97ddd774f03f5e055ade2b2d27a9c82ddb Author: Michael J. Ruhl Date: Sun Apr 9 10:15:57 2017 -0700 IB/rdmavt/hfi1/qib: Use the MGID and MLID for multicast addressing The Infiniband spec defines "A multicast address is defined by a MGID and a MLID" (section 10.5). The current code only uses the MGID for identifying multicast groups. Update the driver to be compliant with this definition. Reviewed-by: Ira Weiny Reviewed-by: Dasaratharaman Chandramouli Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/verbs.c | 2 +- drivers/infiniband/hw/qib/qib_verbs.c | 2 +- drivers/infiniband/sw/rdmavt/mcast.c | 61 +++++++++++++++++++++++++---------- include/rdma/rdma_vt.h | 3 +- include/rdma/rdmavt_qp.h | 7 +++- 5 files changed, 54 insertions(+), 21 deletions(-) commit 8561eae60ff9417a50fa1fb2b83ae950dc5c1e21 Author: Michael J. Ruhl Date: Sun Apr 9 10:15:51 2017 -0700 IB/core: For multicast functions, verify that LIDs are multicast LIDs The Infiniband spec defines "A multicast address is defined by a MGID and a MLID" (section 10.5). Currently the MLID value is not validated. Add check to verify that the MLID value is in the correct address range. Fixes: 0c33aeedb2cf ("[IB] Add checks to multicast attach and detach") Cc: stable@vger.kernel.org Reviewed-by: Ira Weiny Reviewed-by: Dasaratharaman Chandramouli Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 72fb70f5a34e7d1b095671cb2a5ad665db7c2312 Author: Michael J. Ruhl Date: Sun Apr 9 10:15:44 2017 -0700 IB/hfi1: Correct MulticastMask/CollectiveMask info to SMA output The FM uses the values of MulticastMask and CollectiveMask to determine the number of bits for net masks. The current values of 0 and 0 are incorrect. The values should be 4 and 1. Updated the necessary code to reflect the specified values. Reviewed-by: Sebastian Sanchez Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/common.h | 9 +++++++++ drivers/infiniband/hw/hfi1/mad.c | 5 +++++ 2 files changed, 14 insertions(+) commit 20c7840a77ddcb2ed2fbd66e8197db2868495751 Author: Michael J. Ruhl Date: Sun Apr 9 10:15:32 2017 -0700 IB/core: If the MGID/MLID pair is not on the list return an error A list of MGID/MLID pairs is built when doing a multicast attach. When the multicast detach is called, the list is searched, and regardless of the search outcome, the driver detach is called. If an MGID/MLID pair is not on the list, driver detach should not be called, and an error should be returned. Calling the driver without removing an MGID/MLID pair from the list can leave the core and driver out of sync. Fixes: f4e401562c11 ("IB/uverbs: track multicast group membership for userspace QPs") Cc: stable@vger.kernel.org Reviewed-by: Ira Weiny Reviewed-by: Leon Romanovsky Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 2443c6cc92ed8d01f942d389f9d6aff5e00f99f0 Author: Geliang Tang Date: Sat Apr 22 09:34:51 2017 +0800 IB/qib: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_iba6120.c | 10 ++++------ drivers/infiniband/hw/qib/qib_iba7220.c | 5 ++--- drivers/infiniband/hw/qib/qib_iba7322.c | 10 ++++------ drivers/infiniband/hw/qib/qib_init.c | 15 ++++++--------- 4 files changed, 16 insertions(+), 24 deletions(-) commit 79d9df5618d4dce3d7fefc88feb4b2e60897fd4a Author: Geliang Tang Date: Sat Apr 22 09:32:55 2017 +0800 IB/nes: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes_hw.c | 5 ++--- drivers/infiniband/hw/nes/nes_mgt.c | 5 ++--- drivers/infiniband/hw/nes/nes_verbs.c | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) commit 96ff2c11c5e8f22f88ecb2fd18e8c0546e3936ed Author: Geliang Tang Date: Sat Apr 22 09:32:54 2017 +0800 IB/i40iw: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_cm.c | 5 ++--- drivers/infiniband/hw/i40iw/i40iw_utils.c | 10 ++++------ 2 files changed, 6 insertions(+), 9 deletions(-) commit 1e0729348fdc1f0ecb1838a66da5592f6a6647f2 Author: Leon Romanovsky Date: Sat Apr 22 17:28:52 2017 +0300 IB/nes: Fix incorrect type in assignment Fix mismatch between types, wqe_words are in le32 format, while opcode in CPU format. The following sparse warnings are helped to find it: drivers/infiniband/hw/nes/nes_hw.c:3058:24: warning: incorrect type in assignment (different base types) drivers/infiniband/hw/nes/nes_hw.c:3058:24: expected unsigned int [unsigned] [assigned] [usertype] opcode drivers/infiniband/hw/nes/nes_hw.c:3058:24: got restricted __le32 CC: Faisal Latif Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 313e16d5afaf000bd3f7a80e328890f963a10366 Author: Leon Romanovsky Date: Sat Apr 22 17:28:51 2017 +0300 IB/usnic: Simplify the code to balance loc/unlock calls Simplify code in find_free_vf_and_create_qp_grp() to avoid sparse error regarding call to unlock in the block other than lock was called. drivers/infiniband/hw/usnic/usnic_ib_verbs.c:206:9: warning: context imbalance in 'find_free_vf_and_create_qp_grp' - different lock contexts for basic block CC: Christian Benvenuti Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 45 ++++++++++++++-------------- 1 file changed, 23 insertions(+), 22 deletions(-) commit f5029e752b0d8e4de81f9dfb7752c04ae1eecc69 Author: Leon Romanovsky Date: Sat Apr 22 17:28:50 2017 +0300 Ib/usnic: Explicitly include usnic headers Sparse tool complains about undeclared symbols in usnic_ib_verbs.c and usnic_ib_sysfs.c This is caused by lack of direct include of appropriate usnic_ib_verbs.h and usnic_ib_sysfs.h, where all these functions were declared. Simple include eliminates 30 warnings similar to the below one: drivers/infiniband/hw/usnic/usnic_ib_sysfs.c:304:6: warning: symbol 'usnic_ib_sysfs_unregister_usdev' was not declared. Should it be static? CC: Christian Benvenuti Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/usnic/usnic_ib_sysfs.c | 1 + drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 1 + 2 files changed, 2 insertions(+) commit 218271adca2a3033d6ac9e3a71dcf81d5543afc6 Author: Leon Romanovsky Date: Sat Apr 22 17:28:49 2017 +0300 Ib/core: Mark local uverbs_std_types functions to be static Functions declared in uverbs_std_types.c are local to that file, but they lack static declarations. This produces a lot of sparse warnings, like the one below: drivers/infiniband/core/uverbs_std_types.c:41:5: warning: symbol 'uverbs_free_ah' was not declared. Should it be static? So mark them as static. CC: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_std_types.c | 48 +++++++++++++++--------------- 1 file changed, 24 insertions(+), 24 deletions(-) commit 9ef63f31ad0ba28c68c8367e5b1cbba720fec597 Author: Pan Bian Date: Sun Apr 23 17:09:11 2017 +0800 iw_cxgb4: check return value of alloc_skb Function alloc_skb() will return a NULL pointer when there is no enough memory. However, the return value of alloc_skb() is directly used without validation in function send_fw_pass_open_req(). This patches checks the return value of alloc_skb() against NULL. Signed-off-by: Pan Bian Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 2 ++ 1 file changed, 2 insertions(+) commit 27b0b83233ced9e6b7448875a40382f7384daccd Author: Colin Ian King Date: Mon Apr 24 10:26:42 2017 +0100 IB/rxe: fix typo: "algorithmi" -> "algorithm" trivial fix to typo in pr_err message Signed-off-by: Colin Ian King Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdebfccd0ea6fc00c5ea8c832401111958bd24cf Author: Trond Myklebust Date: Thu Apr 27 15:30:00 2017 -0400 pNFS: Ensure we check layout validity before marking it for return pnfs_error_mark_layout_for_return needs to check that the layout is valid before calling pnfs_set_plh_return_info(). Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 4 ++++ 1 file changed, 4 insertions(+) commit 88bd4f862943205183c2fc20bbba103c71e9990b Author: Olga Kornievskaia Date: Wed Apr 26 14:21:22 2017 -0400 NFS4.1 handle interrupted slot reuse from ERR_DELAY If the RPC slot was interrupted and server replied to the next operation on the "reused" slot with ERR_DELAY, don't clear out the "interrupted" flag until we properly recover. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4edabfd7d0f7d39eeda8ffac76d9e884c22951d9 Author: Pan Bian Date: Sun Apr 23 14:49:41 2017 +0800 NFSv4: check return value of xdr_inline_decode Function xdr_inline_decode() will return a NULL pointer if the input buffer does not have long enough buffer to decode nbytes of data. However, in function decode_op_map(), the return value of xdr_inline_decode() is not validated before it is used. This patch adds a check to the return value of xdr_inline_decode(). Signed-off-by: Pan Bian Signed-off-by: Trond Myklebust fs/nfs/nfs4xdr.c | 2 ++ 1 file changed, 2 insertions(+) commit 209aa2308365387bc03905b7b4bb36c52ea1e696 Author: Artem Savkov Date: Fri Apr 21 21:35:51 2017 +0200 nfs/filelayout: fix NULL pointer dereference in fl_pnfs_update_layout() Calling pnfs_put_lset on an IS_ERR pointer results in a NULL pointer dereference like the one below. At the same time the check of retvalue of filelayout_check_deviceid() sets lseg to error, but does not free it before that. [ 3000.636161] BUG: unable to handle kernel NULL pointer dereference at 000000000000003c [ 3000.636970] IP: pnfs_put_lseg+0x29/0x100 [nfsv4] [ 3000.637420] PGD 4f23b067 [ 3000.637421] PUD 4a0f4067 [ 3000.637679] PMD 0 [ 3000.637937] [ 3000.638287] Oops: 0000 [#1] SMP [ 3000.638591] Modules linked in: nfs_layout_nfsv41_files nfsv3 nfnetlink_queue nfnetlink_log nfnetlink bluetooth rfkill rpcsec_gss_krb5 nfsv4 nfs fscache binfmt_misc arc4 md4 nls_utf8 cifs ccm dns_resolver rpcrdma ib_isert iscsi_target_mod ib_iser rdma_cm iw_cm libiscsi scsi_transport_iscsi ib_srpt target_core_mod ib_srp scsi_transport_srp ib_ipoib ib_ucm ib_uverbs ib_umad ib_cm ib_core nls_koi8_u nls_cp932 ts_kmp nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcspkr virtio_balloon ppdev virtio_rng parport_pc i2c_piix4 parport acpi_cpufreq nfsd auth_rpcgss nfs_acl lockd grace sunrpc xfs libcrc32c ata_generic pata_acpi virtio_blk virtio_net cirrus drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops crc32c_intel ata_piix ttm libata drm serio_raw [ 3000.645245] i2c_core virtio_pci virtio_ring virtio floppy dm_mirror dm_region_hash dm_log dm_mod [last unloaded: xt_u32] [ 3000.646360] CPU: 1 PID: 26402 Comm: date Not tainted 4.11.0-rc7.1.el7.test.x86_64 #1 [ 3000.647092] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 [ 3000.647638] task: ffff8800415ada00 task.stack: ffffc90000ff0000 [ 3000.648207] RIP: 0010:pnfs_put_lseg+0x29/0x100 [nfsv4] [ 3000.648696] RSP: 0018:ffffc90000ff39b8 EFLAGS: 00010246 [ 3000.649193] RAX: 0000000000000000 RBX: fffffffffffffff4 RCX: 00000000000d43be [ 3000.649859] RDX: 00000000000d43bd RSI: 0000000000000000 RDI: fffffffffffffff4 [ 3000.650530] RBP: ffffc90000ff39d8 R08: 000000000001e320 R09: ffffffffa05c35ce [ 3000.651203] R10: ffff88007fd1e320 R11: ffffea0001283d80 R12: 0000000001400040 [ 3000.651875] R13: ffff88004f77d9f0 R14: ffffc90000ff3cd8 R15: ffff8800417ade00 [ 3000.652546] FS: 00007fac4d5cd740(0000) GS:ffff88007fd00000(0000) knlGS:0000000000000000 [ 3000.653304] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3000.653849] CR2: 000000000000003c CR3: 000000004f080000 CR4: 00000000000406e0 [ 3000.654527] Call Trace: [ 3000.654771] fl_pnfs_update_layout.constprop.20+0x10c/0x150 [nfs_layout_nfsv41_files] [ 3000.655505] filelayout_pg_init_write+0x21d/0x270 [nfs_layout_nfsv41_files] [ 3000.656195] __nfs_pageio_add_request+0x11c/0x490 [nfs] [ 3000.656698] nfs_pageio_add_request+0xac/0x260 [nfs] [ 3000.657180] nfs_do_writepage+0x109/0x2e0 [nfs] [ 3000.657616] nfs_writepages_callback+0x16/0x30 [nfs] [ 3000.658096] write_cache_pages+0x26f/0x510 [ 3000.658495] ? nfs_do_writepage+0x2e0/0x2e0 [nfs] [ 3000.658946] ? _raw_spin_unlock_bh+0x1e/0x20 [ 3000.659357] ? wb_wakeup_delayed+0x5f/0x70 [ 3000.659748] ? __mark_inode_dirty+0x2eb/0x360 [ 3000.660170] nfs_writepages+0x84/0xd0 [nfs] [ 3000.660575] ? nfs_updatepage+0x571/0xb70 [nfs] [ 3000.661012] do_writepages+0x1e/0x30 [ 3000.661358] __filemap_fdatawrite_range+0xc6/0x100 [ 3000.661819] filemap_write_and_wait_range+0x41/0x90 [ 3000.662292] nfs_file_fsync+0x34/0x1f0 [nfs] [ 3000.662704] vfs_fsync_range+0x3d/0xb0 [ 3000.663065] vfs_fsync+0x1c/0x20 [ 3000.663385] nfs4_file_flush+0x57/0x80 [nfsv4] [ 3000.663813] filp_close+0x2f/0x70 [ 3000.664132] __close_fd+0x9a/0xc0 [ 3000.664453] SyS_close+0x23/0x50 [ 3000.664785] do_syscall_64+0x67/0x180 [ 3000.665162] entry_SYSCALL64_slow_path+0x25/0x25 [ 3000.665600] RIP: 0033:0x7fac4d0e1e90 [ 3000.665946] RSP: 002b:00007ffd54e90c88 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 3000.666679] RAX: ffffffffffffffda RBX: 00007fac4d3b5400 RCX: 00007fac4d0e1e90 [ 3000.667349] RDX: 0000000000000000 RSI: 00007fac4d5d9000 RDI: 0000000000000001 [ 3000.668031] RBP: 0000000000000000 R08: 00007fac4d3b6a00 R09: 00007fac4d5cd740 [ 3000.668709] R10: 00007ffd54e909e0 R11: 0000000000000246 R12: 0000000000000000 [ 3000.669385] R13: 00007fac4d3b5e80 R14: 0000000000000000 R15: 0000000000000000 [ 3000.670061] Code: 00 00 66 66 66 66 90 55 48 85 ff 48 89 e5 41 56 41 55 41 54 53 48 89 fb 0f 84 97 00 00 00 f6 05 16 8f bc ff 10 0f 85 a6 00 00 00 <4c> 8b 63 48 48 8d 7b 38 49 8b 84 24 90 00 00 00 4c 8d a8 88 00 [ 3000.671831] RIP: pnfs_put_lseg+0x29/0x100 [nfsv4] RSP: ffffc90000ff39b8 [ 3000.672462] CR2: 000000000000003c Signed-off-by: Artem Savkov Signed-off-by: Trond Myklebust fs/nfs/filelayout/filelayout.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f0bb2d44ca26b7090dc7bade8877b77005f07dfc Author: Dan Carpenter Date: Thu Apr 27 12:14:20 2017 +0300 IB/rdmavt: restore IRQs on error path in rvt_create_ah() We need to call spin_unlock_irqrestore() instead of vanilla spin_unlock() on this error path. Fixes: 119a8e708d16 ("IB/rdmavt: Add AH to rdmavt") Signed-off-by: Dan Carpenter Reviewed-by: Leon Romanovsky Acked-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/ah.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eea40b8f624f25cbc02d55f2d93203f60cee9341 Author: Paolo Abeni Date: Fri Apr 28 11:20:01 2017 +0200 infiniband: call ipv6 route lookup via the stub interface The infiniband address handle can be triggered to resolve an ipv6 address in response to MAD packets, regardless of the ipv6 module being disabled via the kernel command line argument. That will cause a call into the ipv6 routing code, which is not initialized, and a conseguent oops. This commit addresses the above issue replacing the direct lookup call with an indirect one via the ipv6 stub, which is properly initialized according to the ipv6 status (e.g. if ipv6 is disabled, the routing lookup fails gracefully) Cc: stable@vger.kernel.org # 3.12+ Signed-off-by: Paolo Abeni Signed-off-by: Doug Ledford drivers/infiniband/core/addr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b6acd71fefc92d13ac9a0f117101d1aab1102d18 Author: Amrani, Ram Date: Thu Apr 27 13:35:35 2017 +0300 RDMA/qedr: add support for send+invalidate in poll CQ Split the poll responder CQ into two functions. Add support for send+invalidate in poll CQ. Signed-off-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/qedr.h | 3 +- drivers/infiniband/hw/qedr/verbs.c | 98 ++++++++++++++++++++++++-------------- 2 files changed, 63 insertions(+), 38 deletions(-) commit 4dd72636c9e5a17b0d788ab1d8cc10ae25c69ea3 Author: Amrani, Ram Date: Thu Apr 27 13:35:34 2017 +0300 RDMA/qedr: destroy CQ only after HW releases it Wait for all relevant CNQ interrupts before freeing the CQ. Don't invoke completion handlers for a destroyed CQ. Signed-off-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/main.c | 11 +++++-- drivers/infiniband/hw/qedr/qedr.h | 2 ++ drivers/infiniband/hw/qedr/verbs.c | 64 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 2 deletions(-) commit 942b3b2c41196a24283dea3d87c83d2c4da99874 Author: Amrani, Ram Date: Thu Apr 27 13:35:33 2017 +0300 RDMA/qedr: enhance destroy flow for GSI QP Avoid attempting to release irrelevant (and unused) resources for GSI QP. Signed-off-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/verbs.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit f92faaba11d862ad91139486db24f801aeabd68c Author: Amrani, Ram Date: Thu Apr 27 13:35:32 2017 +0300 RDMA/qedr: properly check atomic capabilities After checking the path upwards towards root complex, actualy check root complex atomic_req capability, and not our own NIC. Verify that the PCIe device control register's atomic egress block is cleared in the path. Verify that the PCIe version is at least 2. Signed-off-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/main.c | 77 +++++++++++++++++++++++---------------- include/uapi/linux/pci_regs.h | 1 + 2 files changed, 47 insertions(+), 31 deletions(-) commit 08c4cf51e30f0a6977fa4be8d97f3e34d7fede0b Author: Amrani, Ram Date: Thu Apr 27 13:35:31 2017 +0300 RDMA/qedr: reset access control when registering a MR Signed-off-by: Ram Amrani Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/verbs.c | 2 ++ 1 file changed, 2 insertions(+) commit 2f9a0bec659700554744338bf780841f641cec40 Author: Geert Uytterhoeven Date: Thu Apr 27 14:33:05 2017 +0200 arm64: Print DT machine model in setup_machine_fdt() On arm32, the machine model specified in the device tree is printed during boot-up, courtesy of of_flat_dt_match_machine(). On arm64, of_flat_dt_match_machine() is not called, and the machine model information is not available from the kernel log. Print the machine model to make it easier to derive the machine model from an arbitrary kernel boot log. Acked-by: Will Deacon Signed-off-by: Geert Uytterhoeven Signed-off-by: Catalin Marinas arch/arm64/kernel/setup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 11270059e8d0b6f80801fac910c4ef751ca05c4c Author: Horia Geantă Date: Fri Apr 28 17:38:58 2017 +0300 staging: fsl-mc/dpio: add cpu <--> LE conversion for dpaa2_fd While dpaa2_fd.simple structure fields are marked __leXX, corresponding cpu_to_leXX / leXX_to_cpu conversions are missing. While here, fix dpaa2_fd_{get,set}_bpid such that BMT, IVP bits sharing the 16-bit field with BPID are not affected. Fixes: d3269bdc7ebc ("bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs") Signed-off-by: Horia Geantă Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/dpaa2-fd.h | 45 ++++++++++++++++--------------- 1 file changed, 24 insertions(+), 21 deletions(-) commit ec4d9227d79a6f0d1cedbbb8f023c92779c16551 Author: Ilia Sergachev Date: Fri Apr 28 17:30:55 2017 +0200 staging: ks7010: remove line continuations in quoted strings Checkpatch emits WARNING: Avoid line continuations in quoted strings. Remove line continuations - split strings using quotes. Signed-off-by: Ilia Sergachev Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) commit 3146c8f4de9b0858794a902f273aec13f168596e Merge: ef1b5da a5f40e8 Author: Bjorn Helgaas Date: Fri Apr 28 10:38:13 2017 -0500 Merge branch 'pci/remove' into next * pci/remove: PCI: Don't allow unbinding host controllers that aren't prepared commit a5f40e8098fe6d983fdb3beb7b50a8067c136141 Author: Brian Norris Date: Thu Apr 20 15:36:25 2017 -0500 PCI: Don't allow unbinding host controllers that aren't prepared Many PCI host controller drivers aren't prepared to have their devices unbound from them forcefully (e.g., through /sys/...//unbind), as they don't provide any driver .remove callback, where they'd detach the root bus, release resources, etc. Keeping the driver built in (i.e., not a loadable module) is not enough; and providing no .remove callback just means we don't do any teardown. To rule out the possibility of unbinding a device via sysfs, we need to set the ".suppress_bind_attrs" field. I found the suspect drivers via the following search: git grep -l platform_driver $(git grep -L -e '\.remove' -e suppress_bind_attrs drivers/pci/) Then I inspected them to ensure that (a) they set up a PCI bus in their probe() and (b) they don't have a remove() callback for undoing the setup Suggested-by: Bjorn Helgaas Signed-off-by: Brian Norris Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pci-imx6.c | 1 + drivers/pci/dwc/pci-layerscape.c | 1 + drivers/pci/dwc/pcie-armada8k.c | 1 + drivers/pci/dwc/pcie-artpec6.c | 1 + drivers/pci/dwc/pcie-designware-plat.c | 1 + drivers/pci/dwc/pcie-hisi.c | 2 ++ drivers/pci/dwc/pcie-spear13xx.c | 1 + drivers/pci/host/pci-ftpci100.c | 1 + drivers/pci/host/pci-host-generic.c | 1 + drivers/pci/host/pci-thunder-ecam.c | 1 + drivers/pci/host/pci-thunder-pem.c | 1 + drivers/pci/host/pci-versatile.c | 1 + drivers/pci/host/pci-xgene.c | 1 + 13 files changed, 14 insertions(+) commit ef1b5dad5a386885998d11eb45ca7fd183079965 Merge: 889e4dd 63af8f7 Author: Bjorn Helgaas Date: Fri Apr 28 10:36:12 2017 -0500 Merge branch 'pci/virtualization' into next * pci/virtualization: ixgbe: Use pcie_flr() instead of duplicating it IB/hfi1: Use pcie_flr() instead of duplicating it PCI: Call pcie_flr() from reset_chelsio_generic_dev() PCI: Call pcie_flr() from reset_intel_82599_sfp_virtfn() PCI: Export pcie_flr() PCI: Add sysfs sriov_drivers_autoprobe to control VF driver binding PCI: Avoid FLR for Intel 82579 NICs Conflicts: include/linux/pci.h commit 889e4dd916a1f4dc7f9e6220fed26d811e39ca71 Merge: 78f0983 d9c102d Author: Bjorn Helgaas Date: Fri Apr 28 10:34:34 2017 -0500 Merge branch 'pci/resource-mmap' into next * pci/resource-mmap: ia64: Use generic pci_mmap_resource_range() ia64: Remove redundant checks for WC in pci_mmap_page_range() ia64: Remove redundant valid_mmap_phys_addr_range() from pci_mmap_page_range() PCI: Add I/O BAR support to generic pci_mmap_resource_range() x86/PCI: Use generic pci_mmap_resource_range() unicore32/PCI: Use generic pci_mmap_resource_range() sh/PCI: Use generic pci_mmap_resource_range() parisc: Use generic pci_mmap_resource_range() mn10300/PCI: Use generic pci_mmap_resource_range() MIPS: PCI: Use generic pci_mmap_resource_range() cris/PCI: Use generic pci_mmap_resource_range() ARM/PCI: Use generic pci_mmap_resource_range() PCI: Add pci_mmap_resource_range() and use it for ARM64 PCI: Add BAR index argument to pci_mmap_page_range() PCI: Use BAR index in sysfs attr->private instead of resource pointer PCI: Add arch_can_pci_mmap_io() on architectures which can mmap() I/O space PCI: Move multiple declarations of pci_mmap_page_range() to PCI: Add arch_can_pci_mmap_wc() macro xtensa/PCI: Do not mmap PCI BARs to userspace as write-through PCI: Only allow WC mmap on prefetchable resources PCI: Fix another sanity check bug in /proc/pci mmap PCI: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms commit 78f098383a7abb1eb9dfd45346773fe80a65f05a Merge: acc886e e3adec7 Author: Bjorn Helgaas Date: Fri Apr 28 10:34:29 2017 -0500 Merge branch 'pci/resource' into next * pci/resource: PCI: Don't resize resources when realigning all devices in system PCI: Don't reassign resources that are already aligned PCI: Factor pci_reassigndev_resource_alignment() powerpc/powernv: Override pcibios_default_alignment() to force PCI devices to be page aligned PCI: Add pcibios_default_alignment() for arch-specific alignment control PCI: Fix calculation of bridge window's size and alignment PCI: Ignore requested alignment for IOV BARs PCI: Make PCI_ROM_ADDRESS_MASK a 32-bit constant commit acc886ec934980a45ae8962dbe88e221a40c77a2 Merge: c6a7a77 ea00353 Author: Bjorn Helgaas Date: Fri Apr 28 10:34:24 2017 -0500 Merge branch 'pci/pm' into next * pci/pm: PCI: Freeze PME scan before suspending devices PCI/PM: Don't sleep at all when d3_delay or d3cold_delay is zero commit c6a7a77cc4e62a2d9011f282ba69ffcafa7efdcc Merge: 94f543b 4bb6669 Author: Bjorn Helgaas Date: Fri Apr 28 10:34:19 2017 -0500 Merge branch 'pci/msi' into next * pci/msi: PCI/MSI: Use dev_printk() when possible of/pci: Remove unused MSI controller helpers PCI: mvebu: Remove useless MSI enabling code PCI: aardvark: Move to MSI handling using generic MSI support PCI/MSI: Make pci_msi_shutdown() and pci_msix_shutdown() static PCI/MSI: Stop disabling MSI/MSI-X in pci_device_shutdown() commit 94f543b276e99ca311903f1b9fac2db6d1f020d7 Merge: 13108c6 de5bbdd Author: Bjorn Helgaas Date: Fri Apr 28 10:34:14 2017 -0500 Merge branch 'pci/misc' into next * pci/misc: PCI: Change pci_host_common_probe() visibility PCI: Fix typo pci_cfg_access_lock() comment PCI: Include pci.h for struct pci_ops definition commit 13108c625b1db803b7b24702360a735fd764622f Merge: 0b0ee66 c4e649b Author: Bjorn Helgaas Date: Fri Apr 28 10:34:10 2017 -0500 Merge branch 'pci/irq' into next * pci/irq: PCI: Disable boot interrupt quirk for ASUS M2N-LR nvme/pci: Switch to pci_request_irq() PCI/irq: Add pci_request_irq() and pci_free_irq() helpers genirq: Return the IRQ name from free_irq() genirq: Fix indentation in remove_irq() commit 0b0ee66c4f4debaaf2f07662ad20a6e89b568c1e Merge: 27e9967 bc636ee Author: Bjorn Helgaas Date: Fri Apr 28 10:34:05 2017 -0500 Merge branch 'pci/ioremap' into next * pci/ioremap: PCI: versatile: Update PCI config space remap function PCI: keystone-dw: Update PCI config space remap function PCI: layerscape: Update PCI config space remap function PCI: hisi: Update PCI config space remap function PCI: tegra: Update PCI config space remap function PCI: xgene: Update PCI config space remap function PCI: armada8k: Update PCI config space remap function PCI: designware: Update PCI config space remap function PCI: iproc-platform: Update PCI config space remap function PCI: qcom: Update PCI config space remap function PCI: rockchip: Update PCI config space remap function PCI: spear13xx: Update PCI config space remap function PCI: xilinx-nwl: Update PCI config space remap function PCI: xilinx: Update PCI config space remap function PCI: ECAM: Map config region with pci_remap_cfgspace() PCI: Implement devm_pci_remap_cfgspace() devres: fix devm_ioremap_*() offset parameter kerneldoc description ARM: Implement pci_remap_cfgspace() interface ARM64: Implement pci_remap_cfgspace() interface linux/io.h: Add pci_remap_cfgspace() interface PCI: Remove __weak tag from pci_remap_iospace() commit 27e99676f0f15692d2b70efb8e697d9cf7091362 Merge: f503ee4 fce5d57 Author: Bjorn Helgaas Date: Fri Apr 28 10:34:00 2017 -0500 Merge branch 'pci/iommu' into next * pci/iommu: PCI: Add bridge DMA alias quirk for ITE 8893 bridge commit f503ee4cbef9c5459d9e176542e4d0e0ed3915f6 Merge: d060c6f 9b70ae4 Author: Bjorn Helgaas Date: Fri Apr 28 10:33:55 2017 -0500 Merge branch 'pci/enumeration' into next * pci/enumeration: PCI: Include PCI-to-PCIe bridges as "Downstream Ports" PCI: Improve __pci_read_base() robustness PCI: Short-circuit pci_device_is_present() for disconnected devices PCI/MSI: Skip disabling disconnected devices PCI: Don't attempt config access to disconnected devices PCI: Add device disconnected state PCI: Export PCI device config accessors commit d060c6fcef972e6a8d0898c55f1b7b6da89a6744 Merge: 1154768 52eabba Author: Bjorn Helgaas Date: Fri Apr 28 10:33:41 2017 -0500 Merge branch 'pci/switchtec' into next * pci/switchtec: switchtec: Add IOCTLs to the Switchtec driver switchtec: Add sysfs attributes to the Switchtec driver switchtec: Add user interface documentation MicroSemi Switchtec management interface driver Conflicts: drivers/pci/Kconfig commit 1154768ad342cc3ad295340130c1fad6869effa9 Merge: 9577367 cd18374 Author: Bjorn Helgaas Date: Fri Apr 28 10:33:15 2017 -0500 Merge branch 'pci/host-thunder' into next * pci/host-thunder: PCI/ACPI: Add ThunderX pass2.x 2nd node MCFG quirk PCI/ACPI: Tidy up MCFG quirk whitespace PCI: Avoid generating invalid ThunderX2 DMA aliases PCI: Add device flag PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT PCI: Apply Cavium ACS quirk only to CN81xx/CN83xx/CN88xx devices commit 95773672830d49ed6202bfa47cbb752823c96593 Merge: 443b1b0 b0308c5 Author: Bjorn Helgaas Date: Fri Apr 28 10:33:10 2017 -0500 Merge branch 'pci/host-rockchip' into next * pci/host-rockchip: PCI: rockchip: Modularize PCI: Export pci_remap_iospace() and pci_unmap_iospace() PCI: rockchip: Add remove() support PCI: rockchip: Set PCI_EXP_LNKSTA_SLC in the Root Port PCI: rockchip: Advertise 128-byte Read Completion Boundary support PCI: rockchip: Make 'return 0' more obvious in probe() PCI: rockchip: Unindent rockchip_pcie_set_power_limit() PCI: rockchip: Handle regulator_get_current_limit() failure correctly commit 443b1b06717275a10f4b36fb6330c85b7f37281f Merge: 24c53a6 b8e82c1 Author: Bjorn Helgaas Date: Fri Apr 28 10:33:05 2017 -0500 Merge branch 'pci/host-mvebu' into next * pci/host-mvebu: PCI: mvebu: Avoid changing the SCC bit in the Link Status register commit 24c53a66bd687a186f55f0845c08a6d073864798 Merge: 7284a62 e584b06c Author: Bjorn Helgaas Date: Fri Apr 28 10:33:00 2017 -0500 Merge branch 'pci/host-iproc' into next * pci/host-iproc: PCI: iproc: Add PCI_DOMAIN dependency to PCI Kconfig commit 7284a62dfd7066919bf9a7318f6dbc7b51a092db Merge: 4940421 7221547 Author: Bjorn Helgaas Date: Fri Apr 28 10:32:54 2017 -0500 Merge branch 'pci/host-imx6' into next * pci/host-imx6: PCI: imx6: Fix spelling mistake: "contol" -> "control" PCI: imx6: Do not switch speed if Gen2 is disabled PCI: imx6: Do not wait for speed change on i.MX7 PCI: imx6: Allow probe deferral by reset GPIO PCI: imx6: Add code to support i.MX7D commit 4940421013672aafdc8c372c17b5ddf63423c805 Merge: 66aa51c 24196f0 Author: Bjorn Helgaas Date: Fri Apr 28 10:32:50 2017 -0500 Merge branch 'pci/host-hv' into next * pci/host-hv: PCI: hv: Convert hv_pci_dev.refs from atomic_t to refcount_t PCI: hv: Allocate interrupt descriptors with GFP_ATOMIC PCI: hv: Specify CPU_AFFINITY_ALL for MSI affinity when >= 32 CPUs PCI: hv: Lock PCI bus on device eject PCI: hv: Properly handle PCI bus remove commit 66aa51ce8bbf285a9dc58ac2abbf2ec6a8a91a5c Merge: 9b2707c d3c68e0 Author: Bjorn Helgaas Date: Fri Apr 28 10:32:44 2017 -0500 Merge branch 'pci/host-faraday' into next * pci/host-faraday: PCI: faraday: Add Faraday Technology FTPCI100 PCI Host Bridge driver PCI: Add DT bindings for Faraday Technology PCI Host Bridge commit 9b2707ca56f98d1184857384ebecd23e1f06c807 Merge: c1ae3cf 2c949ce Author: Bjorn Helgaas Date: Fri Apr 28 10:32:33 2017 -0500 Merge branch 'pci/host-designware' into next * pci/host-designware: ARM: DRA7: clockdomain: Change the CLKTRCTRL of CM_PCIE_CLKSTCTRL to SW_WKUP MAINTAINERS: Add PCI Endpoint maintainer Documentation: PCI: Add userguide for PCI endpoint test function tools: PCI: Add sample test script to invoke pcitest tools: PCI: Add a userspace tool to test PCI endpoint Documentation: misc-devices: Add Documentation for pci-endpoint-test driver misc: Add host side PCI driver for PCI test function device PCI: Add device IDs for DRA74x and DRA72x dt-bindings: PCI: dra7xx: Add DT bindings to enable unaligned access PCI: dwc: dra7xx: Workaround for errata id i870 dt-bindings: PCI: dra7xx: Add DT bindings for PCI dra7xx EP mode PCI: dwc: dra7xx: Add EP mode support PCI: dwc: dra7xx: Facilitate wrapper and MSI interrupts to be enabled independently dt-bindings: PCI: Add DT bindings for PCI designware EP mode PCI: dwc: designware: Add EP mode support Documentation: PCI: Add binding documentation for pci-test endpoint function PCI: endpoint: functions: Add an EP function to test PCI Documentation: PCI: Add specification for the *PCI test* function device PCI: endpoint: Create configfs entry for EPC device and EPF driver Documentation: PCI: Guide to use PCI endpoint configfs PCI: endpoint: Introduce configfs entry for configuring EP functions Documentation: PCI: Guide to use PCI Endpoint Core Layer PCI: endpoint: Add EP core layer to enable EP controller and EP functions PCI: dwc: dra7xx: Push request_irq() call to the bottom of probe PCI: dwc: designware: Move _unroll configurations to a separate function PCI: dwc: all: Modify dbi accessors to access data of 4/2/1 bytes PCI: dwc: all: Modify dbi accessors to take dbi_base as argument PCI: dwc: artpec6: Populate cpu_addr_fixup ops PCI: dwc: dra7xx: Populate cpu_addr_fixup ops PCI: dwc: designware: Add new *ops* for CPU addr fixup PCI: dwc: Fix uninitialized variable in dw_handle_msi_irq() PCI: dwc: Unindent dw_handle_msi_irq() loop PCI: dwc: Fix dw_pcie_ops NULL pointer dereference PCI: dwc: Select PCI_HOST_COMMON for hisi PCI: thunder-pem: Fix legacy firmware PEM-specific resources PCI: thunder-pem: Add legacy firmware support for Cavium ThunderX host controller PCI: thunder-pem: Use Cavium assigned hardware ID for ThunderX host controller PCI: iproc: Save host bridge window resource in struct iproc_pcie PCI/ASPM: Always set link->downstream to avoid NULL dereference on remove PCI: Prevent VPD access for QLogic ISP2722 PCI: exynos: Initialize elbi_base even when using PHY framework commit 2c949ce38f4e81d7487f165fa3b8f77d74a2a6c4 Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:20 2017 +0530 ARM: DRA7: clockdomain: Change the CLKTRCTRL of CM_PCIE_CLKSTCTRL to SW_WKUP The PCIe programming sequence in TRM suggests CLKSTCTRL of PCIe should be set to SW_WKUP. There are no issues when CLKSTCTRL is set to HW_AUTO in RC mode. However in EP mode, the host system is not able to access the MEMSPACE and setting the CLKSTCTRL to SW_WKUP fixes it. Acked-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas arch/arm/mach-omap2/clockdomains7xx_data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f60b15b831b01973c71b54e82a258376f7593427 Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:19 2017 +0530 MAINTAINERS: Add PCI Endpoint maintainer Add maintainer for the newly introduced PCI Endpoint framework. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 16263d9e1dedb30ddca51d684f306cdc4294e705 Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:18 2017 +0530 Documentation: PCI: Add userguide for PCI endpoint test function Add documentation to help users use pci-epf-test function driver and pci_endpoint_test host driver for testing PCI. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas Documentation/PCI/00-INDEX | 2 + Documentation/PCI/endpoint/pci-test-howto.txt | 179 ++++++++++++++++++++++++++ 2 files changed, 181 insertions(+) commit 62cb0eff82d8c64b79d3cf46a995306551beeaf3 Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:17 2017 +0530 tools: PCI: Add sample test script to invoke pcitest Add a simple test script that invokes the pcitest userspace tool to perform all the PCI endpoint tests (BAR tests, interrupt tests, read tests, write tests and copy tests). Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas tools/pci/pcitest.sh | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 3f2ed813483452e3f8de56ec40c97c432c16dbf1 Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:16 2017 +0530 tools: PCI: Add a userspace tool to test PCI endpoint Add a userspace tool to invoke the ioctls exposed by the PCI endpoint test driver to perform various PCI tests. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas tools/pci/pcitest.c | 186 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 186 insertions(+) commit 0cfb512e4acc7049d36478221f55bf6053bd81a6 Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:15 2017 +0530 Documentation: misc-devices: Add Documentation for pci-endpoint-test driver Add Documentation for pci-endpoint-test driver. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas Documentation/misc-devices/pci-endpoint-test.txt | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 2c156ac71c6b2518f3d589190f2a8872a8764faf Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:14 2017 +0530 misc: Add host side PCI driver for PCI test function device Add PCI endpoint test driver that can verify base address register, legacy interrupt/MSI interrupt and read/write/copy buffers between host and device. The corresponding pci-epf-test function driver should be used on the EP side. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/misc/Kconfig | 7 + drivers/misc/Makefile | 1 + drivers/misc/pci_endpoint_test.c | 534 +++++++++++++++++++++++++++++++++++++++ include/uapi/linux/Kbuild | 1 + include/uapi/linux/pcitest.h | 19 ++ 5 files changed, 562 insertions(+) commit 984c307878f8924d743c419c79fdebbc19f1285e Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:13 2017 +0530 PCI: Add device IDs for DRA74x and DRA72x Add device IDs for DRA74x and DRA72x devices. These devices have configurable PCI endpoint. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas include/linux/pci_ids.h | 2 ++ 1 file changed, 2 insertions(+) commit 66abca1d9db24e9e0b0d031d9b246e440e26fdae Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:12 2017 +0530 dt-bindings: PCI: dra7xx: Add DT bindings to enable unaligned access Update device tree binding documentation of TI's dra7xx PCI controller to include property for enabling unaligned mem access. Signed-off-by: Kishon Vijay Abraham I Acked-by: Rob Herring Signed-off-by: Bjorn Helgaas Documentation/devicetree/bindings/pci/ti-pci.txt | 5 +++++ 1 file changed, 5 insertions(+) commit f7a2757f6cd0aa4e1075188a3a0081a583fcee24 Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:11 2017 +0530 PCI: dwc: dra7xx: Workaround for errata id i870 According to errata i870, access to the PCIe slave port that are not 32-bit aligned will result in incorrect mapping to TLP Address and Byte enable fields. Accessing non 32-bit aligned data causes incorrect data in the target buffer if memcpy is used. Implement the workaround for this errata here. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pci-dra7xx.c | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 40cc72e2b51f61956f965510ceba35bddb0c373f Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:09 2017 +0530 dt-bindings: PCI: dra7xx: Add DT bindings for PCI dra7xx EP mode Add device tree binding documentation for PCI dra7xx EP mode. Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas Documentation/devicetree/bindings/pci/ti-pci.txt | 37 +++++++++++++++++++----- 1 file changed, 30 insertions(+), 7 deletions(-) commit 608793e27b3313b2385af557c95d8e4207126670 Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:08 2017 +0530 PCI: dwc: dra7xx: Add EP mode support The PCIe controller integrated in dra7xx SoCs is capable of operating in endpoint mode. Add endpoint mode support to dra7xx driver. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/dwc/Kconfig | 31 +++++- drivers/pci/dwc/Makefile | 4 +- drivers/pci/dwc/pci-dra7xx.c | 197 +++++++++++++++++++++++++++++++++++--- drivers/pci/dwc/pcie-designware.h | 7 ++ 4 files changed, 221 insertions(+), 18 deletions(-) commit 5ffd90a035a273068a8bbef74a01ae923b80110b Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:07 2017 +0530 PCI: dwc: dra7xx: Facilitate wrapper and MSI interrupts to be enabled independently No functional change. Split dra7xx_pcie_enable_interrupts() into dra7xx_pcie_enable_wrapper_interrupts() and dra7xx_pcie_enable_msi_interrupts() so that wrapper interrupts and MSI interrupts can be enabled independently. This is in preparation for adding EP mode support to dra7xx driver since EP mode doesn't have to enable msi_interrupts. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pci-dra7xx.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit b12befecd7de905a05053eb6a266e3b97528c6d4 Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:06 2017 +0530 dt-bindings: PCI: Add DT bindings for PCI designware EP mode Add device tree binding documentation for PCI designware EP mode. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring .../devicetree/bindings/pci/designware-pcie.txt | 26 +++++++++++++++------- 1 file changed, 18 insertions(+), 8 deletions(-) commit f8aed6ec624fb436877a1a552393fd22510a5ff7 Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:05 2017 +0530 PCI: dwc: designware: Add EP mode support Add endpoint mode support to designware driver. This uses the EP Core layer introduced recently to add endpoint mode support. *Any* function driver can now use this designware device in order to achieve the EP functionality. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/dwc/Kconfig | 5 + drivers/pci/dwc/Makefile | 1 + drivers/pci/dwc/pcie-designware-ep.c | 342 +++++++++++++++++++++++++++++++++++ drivers/pci/dwc/pcie-designware.c | 125 +++++++++++++ drivers/pci/dwc/pcie-designware.h | 105 +++++++++++ 5 files changed, 578 insertions(+) commit 13570533813cf111bb49954392cca0c2c409e775 Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:04 2017 +0530 Documentation: PCI: Add binding documentation for pci-test endpoint function Add binding documentation for pci-test endpoint function that helps in adding and configuring pci-test endpoint function. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas Documentation/PCI/00-INDEX | 2 ++ .../PCI/endpoint/function/binding/pci-test.txt | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) commit e20c8a517f259cb4d258e10b0cd5d4b30d4167a0 Author: Brian Foster Date: Wed Apr 26 08:30:40 2017 -0700 xfs: wait on new inodes during quotaoff dquot release The quotaoff operation has a race with inode allocation that results in a livelock. An inode allocation that occurs before the quota status flags are updated acquires the appropriate dquots for the inode via xfs_qm_vop_dqalloc(). It then inserts the XFS_INEW inode into the perag radix tree, sometime later attaches the dquots to the inode and finally clears the XFS_INEW flag. Quotaoff expects to release the dquots from all inodes in the filesystem via xfs_qm_dqrele_all_inodes(). This invokes the AG inode iterator, which skips inodes in the XFS_INEW state because they are not fully constructed. If the scan occurs after dquots have been attached to an inode, but before XFS_INEW is cleared, the newly allocated inode will continue to hold a reference to the applicable dquots. When quotaoff invokes xfs_qm_dqpurge_all(), the reference count of those dquot(s) remain elevated and the dqpurge scan spins indefinitely. To address this problem, update the xfs_qm_dqrele_all_inodes() scan to wait on inodes marked on the XFS_INEW state. We wait on the inodes explicitly rather than skip and retry to avoid continuous retry loops due to a parallel inode allocation workload. Since quotaoff updates the quota state flags and uses a synchronous transaction before the dqrele scan, and dquots are attached to inodes after radix tree insertion iff quota is enabled, one INEW waiting pass through the AG guarantees that the scan has processed all inodes that could possibly hold dquot references. Reported-by: Eryu Guan Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_qm_syscalls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ae2c4ac2dd39b23a87ddb14ceddc3f2872c6aef5 Author: Brian Foster Date: Wed Apr 26 08:30:39 2017 -0700 xfs: update ag iterator to support wait on new inodes The AG inode iterator currently skips new inodes as such inodes are inserted into the inode radix tree before they are fully constructed. Certain contexts require the ability to wait on the construction of new inodes, however. The fs-wide dquot release from the quotaoff sequence is an example of this. Update the AG inode iterator to support the ability to wait on inodes flagged with XFS_INEW upon request. Create a new xfs_inode_ag_iterator_flags() interface and support a set of iteration flags to modify the iteration behavior. When the XFS_AGITER_INEW_WAIT flag is set, include XFS_INEW flags in the radix tree inode lookup and wait on them before the callback is executed. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_icache.c | 53 +++++++++++++++++++++++++++++++++++++++++++++-------- fs/xfs/xfs_icache.h | 8 ++++++++ 2 files changed, 53 insertions(+), 8 deletions(-) commit 756baca27fff3ecaeab9dbc7a5ee35a1d7bc0c7f Author: Brian Foster Date: Wed Apr 26 08:30:39 2017 -0700 xfs: support ability to wait on new inodes Inodes that are inserted into the perag tree but still under construction are flagged with the XFS_INEW bit. Most contexts either skip such inodes when they are encountered or have the ability to handle them. The runtime quotaoff sequence introduces a context that must wait for construction of such inodes to correctly ensure that all dquots in the fs are released. In anticipation of this, support the ability to wait on new inodes. Wake the appropriate bit when XFS_INEW is cleared. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_icache.c | 5 ++++- fs/xfs/xfs_inode.h | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) commit 8f720d9f892e0e223dab8400f03130bc208c72e7 Author: Amir Goldstein Date: Fri Apr 28 08:10:53 2017 -0700 xfs: publish UUID in struct super_block Copy the uuid of the filesystem to struct super_block s_uuid field, as several other filesystems already do. Copy regardless of the nouuid mount option, because other filesystems also do not guaranty uniqueness of the s_uuid field in super_block struct. Signed-off-by: Amir Goldstein Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_mount.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9438b3e080beccf6022138ea62192d55cc7dc4ed Author: Dan Williams Date: Thu Apr 27 14:46:26 2017 -0700 block: hide badblocks attribute by default Commit 99e6608c9e74 "block: Add badblock management for gendisks" allowed for drivers like pmem and software-raid to advertise a list of bad media areas. However, it inadvertently added a 'badblocks' to all block devices. Lets clean this up by having the 'badblocks' attribute not be visible when the driver has not populated a 'struct badblocks' instance in the gendisk. Cc: Jens Axboe Cc: Christoph Hellwig Cc: Martin K. Petersen Reported-by: Vishal Verma Signed-off-by: Dan Williams Tested-by: Vishal Verma Signed-off-by: Jens Axboe block/genhd.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f5337346cd8fe1b105f319b4b7fb06fe25c54480 Author: Florian Fainelli Date: Thu Apr 20 12:05:45 2017 -0700 arm64: pmu: Wire-up Cortex A53 L2 cache events and DTLB refills Add missing L2 cache events: read/write accesses and misses, as well as the DTLB refills. Acked-by: Will Deacon Signed-off-by: Florian Fainelli Signed-off-by: Catalin Marinas arch/arm64/kernel/perf_event.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1a41dbce0dedc2dbf136060f686e0c43d903b612 Merge: 7dde07e 1442f6f Author: Pablo Neira Ayuso Date: Fri Apr 28 16:22:11 2017 +0200 Merge tag 'ipvs-fixes-for-v4.11' of http://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs Simon Horman says: ==================== IPVS Fixes for v4.11 I would also like it considered for stable. * Explicitly forbid ipv6 service/dest creation if ipv6 mod is disabled to avoid oops caused by IPVS accesing IPv6 routing code in such circumstances. ==================== Signed-off-by: Pablo Neira Ayuso commit 2d2ab658d2debcb4c0e29c9e6f18e5683f3077bf Author: Herbert Xu Date: Fri Apr 28 14:10:48 2017 +0800 rhashtable: Do not lower max_elems when max_size is zero The commit 6d684e54690c ("rhashtable: Cap total number of entries to 2^31") breaks rhashtable users that do not set max_size. This is because when max_size is zero max_elems is also incorrectly set to zero instead of 2^31. This patch fixes it by only lowering max_elems when max_size is not zero. Fixes: 6d684e54690c ("rhashtable: Cap total number of entries to 2^31") Reported-by: Florian Fainelli Reported-by: kernel test robot Signed-off-by: Herbert Xu Signed-off-by: David S. Miller lib/rhashtable.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 21c6e939a9f6bb06fe616a87defec0f92a7c3df0 Author: Jens Axboe Date: Mon Apr 10 09:54:56 2017 -0600 blk-mq: unify hctx delay_work and run_work The only difference between ->run_work and ->delay_work, is that the latter is used to defer running a queue. This is done by marking the queue stopped, and scheduling ->delay_work to run sometime in the future. While the queue is stopped, direct runs or runs through ->run_work will not run the queue. If we combine the handlers, then we need to handle two things: 1) If a delayed/stopped run is scheduled, then we should not run the queue before that has been completed. 2) If a queue is delayed/stopped, the handler needs to restart the queue. Normally a run of a queue with the stopped bit set would be a no-op. Case 1 is handled by modifying a currently pending queue run to the deadline set by the caller of blk_mq_delay_queue(). Subsequent attempts to queue a queue run will find the work item already pending, and direct runs will see a stopped queue as before. Case 2 is handled by adding a new bit, BLK_MQ_S_START_ON_RUN, that tells the work handler that it should clear a stopped queue and run the handler. Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-core.c | 4 +--- block/blk-mq.c | 34 ++++++++++++++++++++++------------ include/linux/blk-mq.h | 3 +-- 3 files changed, 24 insertions(+), 17 deletions(-) commit 818cd1cbaa7b00bbc35452a76bebc681a65f1912 Author: Jens Axboe Date: Mon Apr 10 09:54:55 2017 -0600 block: add kblock_mod_delayed_work_on() This modifies (or adds, if not currently pending) an existing delayed work item. Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-core.c | 7 +++++++ include/linux/blkdev.h | 1 + 2 files changed, 8 insertions(+) commit 9f993737906b30d7b2454a38637d1f70ffd60f2f Author: Jens Axboe Date: Mon Apr 10 09:54:54 2017 -0600 blk-mq: unify hctx delayed_run_work and run_work They serve the exact same purpose. Get rid of the non-delayed work variant, and just run it without delay for the normal case. Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Ming Lei Signed-off-by: Jens Axboe block/blk-core.c | 2 +- block/blk-mq.c | 27 ++++++--------------------- include/linux/blk-mq.h | 3 +-- 3 files changed, 8 insertions(+), 24 deletions(-) commit 6a680783aaadd168557eec695374929ac066536f Author: Gregory CLEMENT Date: Wed Dec 14 17:43:48 2016 +0100 ARM64: dts: marvell: armada37xx: add pinctrl definition Start to populate the device tree of the Armada 37xx with the pincontrol configuration used on the board providing a dts. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-3720-db.dts | 8 +++++++ arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 31 ++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) commit afda007feda5cfe7463f3281dfeee703a5dc7ca3 Author: Gregory CLEMENT Date: Wed Apr 5 17:18:07 2017 +0200 ARM64: dts: marvell: Add pinctrl nodes for Armada 3700 Add the nodes for the two pin controller present in the Armada 37xx SoCs. Initially the node was named gpio1 using the same name that for the register range in the datasheet. However renaming it pinctr_nb (nb for North Bridge) makes more sens. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 42 ++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 3 deletions(-) commit 60ae36ad0340b1ba88530d6a5e141455dd3afd81 Author: Josef Bacik Date: Fri Apr 28 09:49:19 2017 -0400 nbd: fix use after free on module unload list_for_each_entry() isn't super safe if we're freeing the objects while we traverse the list. Also don't bother taking the extra reference, the module refcounting stuff will save us from having anybody messing with the device while we're trying to unload. Reported-by: Ming Lei Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 80a2ea9f85850f1cdae814be03b4a16c3d3abc00 Author: Theodore Ts'o Date: Fri Apr 28 09:51:54 2017 -0400 mm: retry writepages() on ENOMEM when doing an data integrity writeback Currently, file system's writepages() function must not fail with an ENOMEM, since if they do, it's possible for buffered data to be lost. This is because on a data integrity writeback writepages() gets called but once, and if it returns ENOMEM, if you're lucky the error will get reflected back to the userspace process calling fsync(). If you aren't lucky, the user is unmounting the file system, and the dirty pages will simply be lost. For this reason, file system code generally will use GFP_NOFS, and in some cases, will retry the allocation in a loop, on the theory that "kernel livelocks are temporary; data loss is forever". Unfortunately, this can indeed cause livelocks, since inside the writepages() call, the file system is holding various mutexes, and these mutexes may prevent the OOM killer from killing its targetted victim if it is also holding on to those mutexes. A better solution would be to allow writepages() to call the memory allocator with flags that give greater latitude to the allocator to fail, and then release its locks and return ENOMEM, and in the case of background writeback, the writes can be retried at a later time. In the case of data-integrity writeback retry after waiting a brief amount of time. Signed-off-by: Theodore Ts'o mm/page-writeback.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 7dde07e9c53617549d67dd3e1d791496d0d3868e Author: Dan Carpenter Date: Fri Apr 28 15:57:56 2017 +0300 netfilter: x_tables: unlock on error in xt_find_table_lock() According to my static checker we should unlock here before the return. That seems reasonable to me as well. Fixes" b9e69e127397 ("netfilter: xtables: don't hook tables by default") Signed-off-by: Dan Carpenter Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/x_tables.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bf290f8f98b1a22fe131fa517ef66efb846cf849 Author: Ulf Hansson Date: Fri Apr 28 12:10:36 2017 +0200 MAINTAINERS: bfq: Add Paolo as maintainer for the BFQ I/O scheduler Seems like this was forgotten in the bfq-series from Paolo. Let's do it now so people don't miss out involving Paolo for any future changes or when reporting bugs. Signed-off-by: Ulf Hansson Signed-off-by: Jens Axboe MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit a6f74e80f271b19ea709cbda55e8eb67e9ffccf2 Author: NeilBrown Date: Mon Apr 10 12:08:53 2017 +1000 cifs: don't check for failure from mempool_alloc() mempool_alloc() cannot fail if the gfp flags allow it to sleep, and both GFP_FS allows for sleeping. So these tests of the return value from mempool_alloc() cannot be needed. Signed-off-by: NeilBrown Signed-off-by: Steve French fs/cifs/misc.c | 14 +++++--------- fs/cifs/smb2transport.c | 30 +++++++++++++----------------- fs/cifs/transport.c | 32 ++++++++++++++------------------ 3 files changed, 32 insertions(+), 44 deletions(-) commit 7d0c234fd2e1c9ca3fa032696c0c58b1b74a9e0b Author: Sachin Prabhu Date: Wed Apr 26 17:10:17 2017 +0100 Do not return number of bytes written for ioctl CIFS_IOC_COPYCHUNK_FILE commit 620d8745b35d ("Introduce cifs_copy_file_range()") changes the behaviour of the cifs ioctl call CIFS_IOC_COPYCHUNK_FILE. In case of successful writes, it now returns the number of bytes written. This return value is treated as an error by the xfstest cifs/001. Depending on the errno set at that time, this may or may not result in the test failing. The patch fixes this by setting the return value to 0 in case of successful writes. Fixes: commit 620d8745b35d ("Introduce cifs_copy_file_range()") Reported-by: Eryu Guan Signed-off-by: Sachin Prabhu Acked-by: Pavel Shilovsky Cc: stable@vger.kernel.org Signed-off-by: Steve French fs/cifs/ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cd8c42968ee651b69e00f8661caff32b0086e82d Author: Sachin Prabhu Date: Wed Apr 26 14:05:46 2017 +0100 Fix match_prepath() Incorrect return value for shares not using the prefix path means that we will never match superblocks for these shares. Fixes: commit c1d8b24d1819 ("Compare prepaths when comparing superblocks") Cc: stable@vger.kernel.org Signed-off-by: Sachin Prabhu Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/connect.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit a627f025eb0534052ff451427c16750b3530634c Author: yangbo lu Date: Thu Apr 20 14:58:29 2017 +0800 mmc: sdhci-of-esdhc: limit SD clock for ls1012a/ls1046a The ls1046a datasheet specified that the max SD clock frequency for eSDHC SDR104/HS200 was 167MHz, and the ls1012a datasheet specified it's 125MHz for ls1012a. So this patch is to add the limitation. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-esdhc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit b34939b9836950d261610132853311054b507247 Author: Arend Van Spriel Date: Fri Apr 28 13:40:28 2017 +0100 cfg80211: add request id to cfg80211_sched_scan_*() api Have proper request id filled in the SCHED_SCAN_RESULTS and SCHED_SCAN_STOPPED notifications toward user-space by having the driver provide it through the api. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath6kl/cfg80211.c | 2 +- drivers/net/wireless/ath/ath6kl/wmi.c | 2 +- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 4 +- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 6 +-- drivers/net/wireless/marvell/mwifiex/main.c | 2 +- drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | 2 +- drivers/net/wireless/marvell/mwifiex/sta_event.c | 2 +- drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 2 +- include/net/cfg80211.h | 11 ++-- net/mac80211/pm.c | 2 +- net/mac80211/scan.c | 4 +- net/mac80211/util.c | 2 +- net/wireless/core.c | 2 +- net/wireless/core.h | 4 +- net/wireless/scan.c | 63 +++++++++++----------- net/wireless/trace.h | 26 ++++++--- 16 files changed, 77 insertions(+), 59 deletions(-) commit b1711c17c2633a1deb2e67589bf497afa7681e92 Author: Juan Antonio Pedreira Martos Date: Fri Apr 28 13:25:37 2017 +0200 staging: vt6656: use tabs instead of spaces Fix a checkpatch error: CODE_INDENT (code indent should use tabs where possible). Signed-off-by: Juan Antonio Pedreira Martos Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/rxtx.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 817bf56ae7f005fdbba2ca90788806ef3fefea9b Author: Fabrizio Perria Date: Fri Apr 28 08:05:30 2017 -0400 staging: android: ion: Fix unnecessary initialization of static variable Fix checkpatch warning: removed unnecessary initialization of static variable "heap_id" to 0 in source file "ioc.c". Signed-off-by: Fabrizio Perria Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6eeabd8b2b8a2a495cbdec754b9ddc9c4f811fa8 Author: Colin Ian King Date: Fri Apr 14 15:25:40 2017 +0100 staging: media: atomisp: fix range checking on clk_num The range checking on clk_num is incorrect; fix these so that invalid clk_num values are detected correctly. Detected by static analysis with by PVS-Studio Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/platform/clock/vlv2_plat_clock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8ed78a154ec463a0f72f2421b93750aef9692cab Author: Luis Oliveira Date: Wed Apr 19 13:44:28 2017 +0100 staging: media: atomisp: fix misspelled word in comment This fix "overrided", the correct past tense form of "override" is "overridden". Signed-off-by: Luis Oliveira Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/ov2680.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b686ccd2ea6351473537ad1baf19252fbbceade Author: Fabian Frederick Date: Fri Apr 28 13:10:39 2017 +0100 staging: media: atomisp: kmap() can't fail There's no need to check kmap() return value because it won't fail. If it's highmem mapping, it will receive virtual address or a new one; if it's lowmem, all kernel pages are already being mapped. (Thanks to Jan Kara for explanations) Signed-off-by: Fabian Frederick Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) commit 5795a9a5fed75a729444f9d83fab597ec131d282 Author: Arnd Bergmann Date: Fri Apr 28 13:10:31 2017 +0100 staging: atomisp: remove #ifdef for runtime PM functions The runtime power management functions are called from the reset handler even if CONFIG_PM is disabled, leading to a link error: drivers/staging/built-in.o: In function `atomisp_reset': (.text+0x4cd1c): undefined reference to `atomisp_runtime_suspend' drivers/staging/built-in.o: In function `atomisp_reset': (.text+0x4cd3a): undefined reference to `atomisp_mrfld_power_down' drivers/staging/built-in.o: In function `atomisp_reset': (.text+0x4cd58): undefined reference to `atomisp_mrfld_power_up' drivers/staging/built-in.o: In function `atomisp_reset': (.text+0x4cd77): undefined reference to `atomisp_runtime_resume' Removing the #ifdef around the PM functions avoids the problem, and lets us simplify it further. The __maybe_unused annotation is needed to ensure the compiler can silently drop the unused callbacks. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Arnd Bergmann Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 5162e1ae0c58dcf98ae322a92d60360142d0ae00 Author: Arnd Bergmann Date: Fri Apr 28 13:10:23 2017 +0100 staging: atomisp: satm include directory is gone After the satm kernel was removed, we should no longer add the directory to the search path. This was found with a 'make W=1' warning: cc1: error: drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/satm/: No such file or directory [-Werror=missing-include-dirs] Fixes: 184f8e0981ef ("atomisp: remove satm kernel") Signed-off-by: Arnd Bergmann Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/Makefile | 1 - 1 file changed, 1 deletion(-) commit 31d677a9cab0cf532b21c8896f4906b96423c07b Author: Alan Cox Date: Fri Apr 28 13:10:13 2017 +0100 atomisp: remove some more unused files The extra list contains some which are used and some which are not. At this point I think we can safely remove those that are simply not used. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../staging/media/atomisp/pci/atomisp2/Makefile | 11 - .../media/atomisp/pci/atomisp2/hmm/hmm_bo_dev.c | 333 --------------------- .../media/atomisp/pci/atomisp2/hrt/device_access.c | 116 ------- .../media/atomisp/pci/atomisp2/hrt/memory_access.c | 103 ------- 4 files changed, 563 deletions(-) commit 08674e986293c36dcb078702009760291bec4f2c Author: Alan Cox Date: Fri Apr 28 13:10:01 2017 +0100 atomisp: remove hmm_load/store/clear indirections We have a layer of un-needed wrapping here that can go. In addition there are some functions that don't exist and one that isn't used which can also go. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 4 ++-- .../media/atomisp/pci/atomisp2/atomisp_fops.c | 4 ++-- .../pci/atomisp2/css2400/ia_css_memory_access.c | 15 ++++++------ .../atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.c | 27 ---------------------- .../atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.h | 20 ---------------- .../media/atomisp/pci/atomisp2/hrt/memory_access.c | 6 ++--- 6 files changed, 15 insertions(+), 61 deletions(-) commit f5a6ddaad4f49292b93a6c34825590a72391d0ab Author: Alan Cox Date: Fri Apr 28 13:09:46 2017 +0100 atomisp: kill off mmgr_free This is just another wrapper layer around hmm_free that servers no purpose in this driver. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.c | 6 +++--- .../pci/atomisp2/css2400/base/refcount/src/refcount.c | 8 ++++---- .../hive_isp_css_include/memory_access/memory_access.h | 10 ++-------- .../atomisp/pci/atomisp2/css2400/ia_css_memory_access.c | 6 ------ .../css2400/isp/kernels/sdis/sdis_1.0/ia_css_sdis.host.c | 2 +- .../css2400/isp/kernels/sdis/sdis_2/ia_css_sdis2.host.c | 2 +- .../pci/atomisp2/css2400/runtime/binary/src/binary.c | 2 +- .../pci/atomisp2/css2400/runtime/frame/src/frame.c | 2 +- .../atomisp2/css2400/runtime/isp_param/src/isp_param.c | 2 +- .../pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c | 6 +++--- .../pci/atomisp2/css2400/runtime/spctrl/src/spctrl.c | 6 +++--- .../staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 4 ++-- .../media/atomisp/pci/atomisp2/css2400/sh_css_params.c | 16 ++++++++-------- .../media/atomisp/pci/atomisp2/hrt/memory_access.c | 7 ------- 14 files changed, 30 insertions(+), 49 deletions(-) commit b83cc378dfc46a06efecd14d2e5c687a2ac335d2 Author: Alan Cox Date: Fri Apr 28 13:09:33 2017 +0100 atomisp: clean up the hmm init/cleanup indirections We don't need any of these indirections as we only support one MMU type. Start by getting rid of the init/clear/free ones. The init ordering check we already pushed down in a previous patch. The allocation side is more complicated so leave it for now. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../media/atomisp/pci/atomisp2/atomisp_v4l2.c | 6 ++--- .../pci/atomisp2/css2400/ia_css_memory_access.c | 2 +- .../staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 4 ++-- .../atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.c | 26 ---------------------- .../atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.h | 5 ----- .../media/atomisp/pci/atomisp2/hrt/memory_access.c | 4 ++-- 6 files changed, 8 insertions(+), 39 deletions(-) commit ec58cbed3f8879ae9d9447f49ff3cd57f315f5d8 Author: Alan Cox Date: Fri Apr 28 13:09:23 2017 +0100 atomisp: handle allocation calls before init in the hmm layer Currently the code handles this in the abstraction above. We want to remove that abstraction so begin by pushing down the sanity check. Unfortunately at this point we can't simply fix the init order. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 5 +++++ 1 file changed, 5 insertions(+) commit 92ac903a9c5f2f2b20b12c094fdcd1aaa3ff3410 Author: Ioana Radulescu Date: Fri Apr 28 04:50:34 2017 -0500 staging: fsl-dpaa2/eth: Add maintainer for Ethernet driver Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 4704b4df3241f6f2900f9875943456b2b0c5ccb4 Author: Ioana Radulescu Date: Fri Apr 28 04:50:33 2017 -0500 staging: fsl-dpaa2/eth: Add TODO file Add a list of TODO items for the Ethernet driver Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/TODO | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 5636187b60823616a8d0ecb4f379438dae1aa511 Author: Ioana Radulescu Date: Fri Apr 28 04:50:32 2017 -0500 staging: fsl-dpaa2/eth: Add trace points Add trace events in significant places of the data path. Useful for debuggging. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/Makefile | 3 + .../staging/fsl-dpaa2/ethernet/dpaa2-eth-trace.h | 185 +++++++++++++++++++++ drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 21 +++ drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 2 + 4 files changed, 211 insertions(+) commit 85047abd06a2249ea8ab5cf839a3a5f83d94c79c Author: Ioana Radulescu Date: Fri Apr 28 04:50:31 2017 -0500 staging: fsl-dpaa2/eth: Add driver specific stats Add custom statistics to be reported via ethtool -S. These include driver specific per-cpu statistics as well as queue and channel counters. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 42 ++++++++++++++++++- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 36 ++++++++++++++++ drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c | 49 +++++++++++++++++++++- 3 files changed, 123 insertions(+), 4 deletions(-) commit 341967401e449845db532af72b67487f9cb79867 Author: Ioana Radulescu Date: Fri Apr 28 04:50:30 2017 -0500 staging: fsl-dpaa2/eth: Add ethtool support Add support for several ethtool operations: show hardware statistics, get/set link settings, get hash configuration. Signed-off-by: Ioana Radulescu Signed-off-by: Bogdan Hamciuc Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/Makefile | 2 +- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 6 + drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 6 + drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c | 234 +++++++++++++++++++++ 4 files changed, 247 insertions(+), 1 deletion(-) commit 6e2387e8f19ed5f7ea47dec74675f256188f0b1f Author: Ioana Radulescu Date: Fri Apr 28 04:50:29 2017 -0500 staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver Introduce the DPAA2 Ethernet driver, which manages Datapath Network Interface (DPNI) objects discovered on the MC bus. In addition to DPNIs, the Ethernet driver uses several other MC objects to build a network interface abstraction: buffer pools (DPBPs), I/O Portals (DPIOs) and concentrators (DPCONs). A more detailed description of the driver can be found in the associated README file. Signed-off-by: Ioana Radulescu Signed-off-by: Bogdan Hamciuc Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/Makefile | 2 +- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 2455 ++++++++++++++++++++++++ drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 304 +++ 3 files changed, 2760 insertions(+), 1 deletion(-) commit 0352d1d852017953a5bdc5d735e3b9ff24fe63bd Author: Ioana Radulescu Date: Fri Apr 28 04:50:28 2017 -0500 staging: fsl-dpaa2/eth: Add APIs for DPNI objects Add the command build/parse APIs for operating on DPNI objects through the DPAA2 Management Complex. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/fsl-dpaa2/Kconfig | 17 + drivers/staging/fsl-dpaa2/Makefile | 5 + drivers/staging/fsl-dpaa2/ethernet/Makefile | 7 + drivers/staging/fsl-dpaa2/ethernet/dpkg.h | 176 +++ drivers/staging/fsl-dpaa2/ethernet/dpni-cmd.h | 541 +++++++++ drivers/staging/fsl-dpaa2/ethernet/dpni.c | 1595 +++++++++++++++++++++++++ drivers/staging/fsl-dpaa2/ethernet/dpni.h | 832 +++++++++++++ drivers/staging/fsl-dpaa2/ethernet/net.h | 480 ++++++++ 10 files changed, 3656 insertions(+) commit 9425f00e6225b289995e5b7f00f41fa1d5316835 Author: Ioana Radulescu Date: Fri Apr 28 04:50:27 2017 -0500 staging: fsl-dpaa2/eth: Add Ethernet driver overview document Add a README file describing the driver architecture, components and I/O interface. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/README | 186 ++++++++++++++++++++++++++++++ 1 file changed, 186 insertions(+) commit 24999f3338efd42873ca8c5537b86fca456d2330 Author: Ioana Radulescu Date: Fri Apr 28 04:50:26 2017 -0500 staging: fsl-mc: bus: add DPCON object APIs This patch adds the command building/parsing wrapper functions for the DPCON object. The binary interface version is v3.2. A DPCON (DataPath Concentrator) is an aggregator object that allows ingress frames from multiple hardware queues to be seen as coming from a single source, from the CPU point of view. Signed-off-by: Ioana Radulescu Signed-off-by: Ioana Ciornei Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/Makefile | 3 +- drivers/staging/fsl-mc/bus/dpcon-cmd.h | 69 ++++--- drivers/staging/fsl-mc/bus/dpcon.c | 317 +++++++++++++++++++++++++++++++++ drivers/staging/fsl-mc/include/dpcon.h | 115 ++++++++++++ 4 files changed, 480 insertions(+), 24 deletions(-) commit c96d886d7b2efaba804a125e95c0f599a4c9974e Author: Horia Geantă Date: Sat Apr 22 09:44:49 2017 +0300 staging: fsl-mc: bus: dpio: fix alter FQ state command When checking the response verb, the valid bit should be masked out, since its value flips depending on what Response Register (RR0 /RR1) it's been read from. Fixes: 321eecb06bfb ("bus: fsl-mc: dpio: add QBMan portal APIs for DPAA2") Signed-off-by: Horia Geantă Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpio/qbman-portal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit add2e1e585875b42ac745c05bf0e7f029ee31ea2 Author: Michael Ellerman Date: Fri Apr 28 21:57:22 2017 +1000 powerpc/mm/hash: Fix off-by-one in comment about kernel contexts ids Michal Suchánek noticed a comment in book3s/64/mmu-hash.h about the context ids we use for the kernel was inconsistent with the code and other comments in the same file. It should read 1-4 not 1-5. While we're touching it, update "address" to "addresses" which makes more sense as it's referring to more than one address below. Reported-by: Michal Suchánek Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu-hash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6e1f6adce8068620f728f717f90f4899b5ac83f Author: Alexey Kardashevskiy Date: Fri Mar 24 17:37:21 2017 +1100 powerpc/pseries: Enable VFIO This enables VFIO on pseries host in order to allow VFIO in nested guest under PR KVM or DPDK in a HV guest. This adds support of the VFIO_SPAPR_TCE_IOMMU type. This adds exchange() callback to allow TCE updates by the SPAPR TCE IOMMU driver in VFIO. This initializes DMA32 window parameters in iommu_table_group as as this does not implement VFIO_SPAPR_TCE_v2_IOMMU and VFIO_SPAPR_TCE_IOMMU just reuses the existing DMA32 window. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/iommu.c | 40 ++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) commit e49a6a2173346d316c0e65d054a3cda89d57cb53 Author: Alexey Kardashevskiy Date: Thu Apr 13 17:05:27 2017 +1000 powerpc/powernv: Fix iommu table size calculation hook for small tables When the userspace requests a small TCE table (which takes less than the system page size) and more than 1 TCE level, the existing code returns a single page size which is a bug as each additional TCE level requires at least one page and this is what pnv_pci_ioda2_table_alloc_pages() does. And we end up seeing WARN_ON(!ret && ((*ptbl)->it_allocated_size != table_size)) in drivers/vfio/vfio_iommu_spapr_tce.c. This replaces incorrect _ALIGN_UP() (which aligns zero up to zero) with max_t() to fix the bug. Besides removing WARN_ON(), there should be no other changes in behaviour. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 82eae1afbbdcaf2d716f88025736dc2d6f7afbf0 Author: Alexey Kardashevskiy Date: Mon Mar 27 19:27:37 2017 +1100 powerpc/powernv: Check kzalloc() return value in pnv_pci_table_alloc pnv_pci_table_alloc() ignores possible failure from kzalloc_node(), this adds a check. There are 2 callers of pnv_pci_table_alloc(), one already checks for tbl!=NULL, this adds WARN_ON() to the other path which only happens during boot time in IODA1 and not expected to fail. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 3 +++ arch/powerpc/platforms/powernv/pci.c | 3 +++ 2 files changed, 6 insertions(+) commit b71c9ffb140556004caf7ba27083f9d90ae8d14b Author: Nicholas Piggin Date: Sat Nov 26 14:26:10 2016 +1100 powerpc: Add arch/powerpc/tools directory Move a couple of existing scripts under there. Remove scripts directory: a script is a tool, a tool is not a script. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/Makefile | 2 +- arch/powerpc/Makefile.postlink | 2 +- arch/powerpc/relocs_check.sh | 61 ----------------------- arch/powerpc/scripts/gcc-check-mprofile-kernel.sh | 23 --------- arch/powerpc/tools/gcc-check-mprofile-kernel.sh | 23 +++++++++ arch/powerpc/tools/relocs_check.sh | 61 +++++++++++++++++++++++ 6 files changed, 86 insertions(+), 86 deletions(-) commit f188d0524d7e09f7ec801df9761dc1d898b1a1c0 Author: Nicholas Piggin Date: Sat Nov 26 14:26:09 2016 +1100 powerpc: Use the new post-link pass to check relocations Currently powerpc has to introduce a dependency on its default build target zImage in order to run a relocation check pass over the linked vmlinux. This is deficient because the check is not run if the plain vmlinux target is built, or if one of the other boot targets is built. Switch to using the kbuild post-link pass, added in commit fbe6e37dab97 ("kbuild: add arch specific post-link Makefile") in order to run this check. In future powerpc will use this to do more complicated operations, but initially using it for something simple is a good first step. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/Makefile | 11 ----------- arch/powerpc/Makefile.postlink | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 11 deletions(-) commit 1cd6ed7c2e35a716dcf1347c33f58a7ce7d1414f Author: Nicholas Piggin Date: Tue Dec 20 04:30:11 2016 +1000 powerpc/xmon: Wait for secondaries before IPI'ing on system reset An externally triggered system reset (e.g., via QEMU nmi command, or pseries reset button) can cause system reset interrupts on all CPUs. In case this causes xmon to be entered, it is undesirable for the primary (first) CPU into xmon to trigger an NMI IPI to others, because this may cause a nested system reset interrupt. So spin for a time waiting for secondaries to join xmon before performing the NMI IPI, similarly to what the crash dump code does. Signed-off-by: Nicholas Piggin [mpe: Only do it when we come in from system reset, not via sysrq etc.] Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) commit 102c05e8dc4f75a573437e2ce50b2559f3db8d5e Author: Nicholas Piggin Date: Tue Dec 20 04:30:10 2016 +1000 powerpc/pseries: Implement NMI IPI with H_SIGNAL_SYS_RESET Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/ras.c | 4 ++++ arch/powerpc/platforms/pseries/smp.c | 23 ++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) commit c64af6458e2e2ddf86aff559837d3925fbf9cbb5 Author: Nicholas Piggin Date: Tue Dec 20 04:30:09 2016 +1000 powerpc: Add struct smp_ops_t.cause_nmi_ipi operation Have the NMI IPI code use this op when the platform defines it. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/smp.h | 1 + arch/powerpc/kernel/smp.c | 3 +++ arch/powerpc/platforms/85xx/smp.c | 1 + arch/powerpc/platforms/86xx/mpc86xx_smp.c | 1 + arch/powerpc/platforms/chrp/smp.c | 1 + arch/powerpc/platforms/powermac/smp.c | 1 + arch/powerpc/platforms/powernv/smp.c | 1 + arch/powerpc/platforms/pseries/smp.c | 1 + 8 files changed, 10 insertions(+) commit ddd703ca06ede1b2d01ed1b0cb8d4315ab808099 Author: Nicholas Piggin Date: Tue Dec 20 04:30:08 2016 +1000 powerpc: Add NMI IPI infrastructure Add a simple NMI IPI system that handles concurrency and reentrancy. The platform does not have to implement a true non-maskable interrupt, the default is to simply use the debugger break IPI message. This has now been co-opted for a general IPI message, and users (debugger and crash) have been reimplemented on top of the NMI system. Signed-off-by: Nicholas Piggin [mpe: Incorporate incremental fixes from Nick] Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 5 + arch/powerpc/include/asm/smp.h | 14 +- arch/powerpc/kernel/smp.c | 243 +++++++++++++++++++++++++++----- arch/powerpc/platforms/cell/interrupt.c | 2 +- arch/powerpc/platforms/ps3/smp.c | 4 +- 5 files changed, 226 insertions(+), 42 deletions(-) commit 2b4f3ac5642672595ef6f71d1572b32475e94863 Author: Nicholas Piggin Date: Tue Dec 20 04:30:07 2016 +1000 powerpc: Mark system reset as an NMI with nmi_enter/exit() System reset is a non-maskable interrupt from Linux's point of view (occurs under local_irq_disable()), so it should use nmi_enter/exit. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/traps.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit b1ee8a3de5790777f325416ad97340428d8ae25f Author: Nicholas Piggin Date: Tue Dec 20 04:30:06 2016 +1000 powerpc/64s: Dedicated system reset interrupt stack The system reset interrupt is used for crash/debug situations, so it is desirable to have as little impact on the normal state of the system as possible. Currently it uses the current kernel stack to process the exception. This stores into the stack which may be involved with the crash. The stack pointer may be corrupted, or it may have overflowed. Avoid or minimise these problems by creating a dedicated NMI stack for the system reset interrupt to use. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 13 +++++++++++++ arch/powerpc/include/asm/paca.h | 3 ++- arch/powerpc/kernel/asm-offsets.c | 1 + arch/powerpc/kernel/exceptions-64s.S | 8 +++++--- arch/powerpc/kernel/setup_64.c | 5 +++++ arch/powerpc/xmon/xmon.c | 1 + 6 files changed, 27 insertions(+), 4 deletions(-) commit c4f3b52ce7b16824befb16ab3d045c891b08b7db Author: Nicholas Piggin Date: Tue Dec 20 04:30:05 2016 +1000 powerpc/64s: Disallow system reset vs system reset reentrancy In preparation for using a dedicated stack for system reset interrupts, prevent a nested system reset from recovering, in order to simplify code that is called in crash/debug path. This allows a system reset interrupt to just use the base stack pointer. Keep an in_nmi nesting counter similarly to the in_mce counter. Consider the interrrupt non-recoverable if it is taken inside another system reset. Interrupt nesting could be allowed similarly to MCE, but system reset is a special case that's not for normal operation, so simplicity wins until there is requirement for nested system reset interrupts. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 6 ++++++ arch/powerpc/include/asm/paca.h | 5 ++++- arch/powerpc/kernel/asm-offsets.c | 1 + arch/powerpc/kernel/exceptions-64s.S | 37 +++++++++++++++++++++++++++----- arch/powerpc/kernel/traps.c | 8 ++++++- arch/powerpc/xmon/xmon.c | 1 + 6 files changed, 51 insertions(+), 7 deletions(-) commit a3d96f70c14773d0928c6a54fd278138f0868572 Author: Nicholas Piggin Date: Tue Dec 20 04:30:04 2016 +1000 powerpc/64s: Fix system reset vs general interrupt reentrancy The system reset interrupt can occur when MSR_EE=0, and it currently uses the PACA_EXGEN save area. Some PACA_EXGEN interrupts have a window where MSR_RI=1 and MSR_EE=0 when the save area is still in use. A system reset interrupt in this window can lead to undetected corruption when the save area gets overwritten. This patch introduces PACA_EXNMI save area for system reset exceptions, which closes this corruption window. It's also helpful to retain the EXGEN state for debugging situations, even if not considering the recoverability aspect. This patch also moves the PACA_EXMC area down to a less frequently used part of the paca with the new save area. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 14 +++++++------- arch/powerpc/include/asm/paca.h | 6 +++++- arch/powerpc/kernel/asm-offsets.c | 1 + arch/powerpc/kernel/exceptions-64s.S | 9 ++++++--- 4 files changed, 19 insertions(+), 11 deletions(-) commit a4087a4d38981bef3de7dd814493df202919cd2e Author: Nicholas Piggin Date: Tue Dec 20 04:30:03 2016 +1000 powerpc/64s: Exception macro for stack frame and initial register save This code is common to a few exceptions, and another user will be added. This causes a trivial change to generated code: - 604: std r9,416(r1) - 608: mfspr r11,314 - 60c: std r11,368(r1) - 610: mfspr r12,315 + 604: mfspr r11,314 + 608: mfspr r12,315 + 60c: std r9,416(r1) + 610: std r11,368(r1) machine_check_powernv_early could also use this, but that requires non trivial changes to generated code, so that's for another patch. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 16 ++++++++++------ arch/powerpc/kernel/exceptions-64s.S | 13 ++++--------- 2 files changed, 14 insertions(+), 15 deletions(-) commit 83a980f7f4769c0673f0f966350d1db26993a193 Author: Nicholas Piggin Date: Tue Dec 20 04:30:02 2016 +1000 powerpc/64s: Add exception macro that does not enable RI Subsequent patches will add more non-RI variant exceptions, so create a macro for it rather than open-code it. This does not change generated instructions. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 15 +++++++++++++++ arch/powerpc/kernel/exceptions-64s.S | 17 ++++------------- 2 files changed, 19 insertions(+), 13 deletions(-) commit 6e83985b0f6e30b928eee26eb41d276814a698aa Author: Nicholas Piggin Date: Mon Mar 20 16:31:49 2017 +1000 powerpc/cbe: Do not process external or decremeter interrupts from sreset Cell will wake from low power state at the system reset interrupt, with the event encoded in SRR1, rather than waking at the interrupt vector that corresponds to that event. The system reset handler for this platform decodes SRR1 event reason and calls the interrupt handler to process it directly from the system reset handlre. A subsequent change will treat the system reset interrupt as a Linux NMI with its own per-CPU stack, and this will no longer work. Remove the external and decrementer handlers from the system reset handler. - The external exception remains raised and will fire again at the EE interrupt vector when system reset returns. - The decrementer is set to 1 so it will be raised again and fire when the system reset returns. It is possible to branch to an idle handler from the system reset interrupt (like POWER does), then restore a normal stack and restore this optimisation. But simplicity wins for now. Tested-by: Michael Ellerman Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/platforms/cell/pervasive.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 461e96a3374892d551fe270a975f33836c7f7d72 Author: Nicholas Piggin Date: Mon Mar 20 16:31:48 2017 +1000 powerpc/pasemi: Do not process external or decrementer interrupts from sreset PA Semi will wake from low power state at the system reset interrupt, with the event encoded in SRR1, rather than waking at the interrupt vector that corresponds to that event. The system reset handler for this platform decodes SRR1 event reason and calls the interrupt handler to process it directly from the system reset handlre. A subsequent change will treat the system reset interrupt as a Linux NMI with its own per-CPU stack, and this will no longer work. Remove the external and decrementer handlers from the system reset handler. - The external exception remains raised and will fire again at the EE interrupt vector when system reset returns. - The decrementer is set to 1 so it will be raised again and fire when the system reset returns. It is possible to branch to an idle handler from the system reset interrupt (like POWER does), then restore a normal stack and restore this optimisation. But simplicity wins for now. Tested-by: Christian Zigotzky Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/platforms/pasemi/idle.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit e145ac451eb68b51e0ede4c131bd5a539fb675b6 Author: yangbo lu Date: Wed Apr 26 10:45:49 2017 +0800 mmc: sdhci-of-esdhc: poll ESDHC_CLOCK_STABLE bit with udelay The loop to poll ESDHC_CLOCK_STABLE bit with mdelay would waste time because the time to stabilize is much less than 1 ms. This patch is to use udelay instead to avoid time wasting. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-esdhc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 7ecb36442d12f197310a336a0e963badd238f35e Author: Kenneth Hsu Date: Sun Apr 23 10:37:02 2017 -0700 staging: rtl8723bs: declare private function as static This fixes a sparse warning regarding an undeclared symbol. Since the function is private to rtw_recv.c, it should be declared as static. Signed-off-by: Kenneth Hsu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_recv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a04b9b47ae587e088439495f31ca740d92191a75 Author: Hu Ziji Date: Fri Apr 28 10:35:15 2017 +0800 mmc: sdhci-xenon: Fix default value of LOGIC_TIMING_ADJUST for eMMC5.0 PHY The default value of LOGIC_TIMING_ADJUST register in eMMC 5.0 PHY is different from that in eMMC 5.1 PHY. Set the specific value for that register in eMMC 5.0 PHY. Signed-off-by: Hu Ziji Reported-by: Jisheng Zhang Tested-by: Jisheng Zhang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-xenon-phy.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4cc59dffa9cb579613776cad5b777236210496d8 Author: Hu Ziji Date: Fri Apr 28 10:34:59 2017 +0800 mmc: sdhci-xenon: Fix the work flow in xenon_remove(). sdhci_remove_host() might execute SOFT_RESET_ALL. Inside xenon_remove(), Xenon SDHC should be enabled during sdhci_remove_host(). Move xenon_sdhc_unprepare after sdhci_remove_host() such that Xenon SDHC is disabled after sdhci_remove_host() completes. Signed-off-by: Hu Ziji Reported-by: Jisheng Zhang Tested-by: Jisheng Zhang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-xenon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b58f45c8fc301fe83ee28cad3e64686c19e78f1c Author: Johan Hovold Date: Wed Apr 26 12:23:04 2017 +0200 staging: gdm724x: gdm_mux: fix use-after-free on module unload Make sure to deregister the USB driver before releasing the tty driver to avoid use-after-free in the USB disconnect callback where the tty devices are deregistered. Fixes: 61e121047645 ("staging: gdm7240: adding LTE USB driver") Cc: stable # 3.12 Cc: Won Kang Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_mux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ea82fc151c5c092afb08a72289252c359ac88f45 Author: Bingyu Zhou Date: Wed Apr 19 19:47:41 2017 +0800 staging: rtl8723bs: Fix assignment in if condition in os_dep/sdio_intf.c ERROR: do not use assignment in if condition Detected by scripts/checkpatch.pl -f Signed-off-by: Bingyu Zhou Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 3292bae3b4b6ca392a3f40fcb8135ed9b55206ed Author: Ian Chard Date: Fri Apr 28 10:04:58 2017 +0100 staging: rtl8188eu: embedded function name style fixes Replace a couple of function names embedded in trace messages with __func__. One of them had a typo anyway. Signed-off-by: Ian Chard Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 784047eb2d3405a35087af70cba46170c5576b25 Author: Dan Carpenter Date: Sat Apr 22 13:47:23 2017 +0300 staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data() The "len" could be as low as -14 so we should check for negatives. Fixes: 9a7fe54ddc3a ("staging: r8188eu: Add source files for new driver - part 1") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e38a017bf080d47376db340e94b9c2ffc47eb9b4 Author: Avraham Stern Date: Wed Apr 26 10:58:47 2017 +0300 mac80211: Add support for BSS max idle period element Parse the BSS max idle period element and set the BSS configuration accordingly so the driver can use this information to configure the max idle period and to use protected management frames for keep alive when required. The BSS max idle period element is defined in IEEE802.11-2016, section 9.4.2.79 Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/linux/ieee80211.h | 28 +++++++++++++++++++++++++++- include/net/mac80211.h | 14 +++++++++++++- net/mac80211/ieee80211_i.h | 1 + net/mac80211/mlme.c | 14 +++++++++++++- net/mac80211/util.c | 9 +++++++++ 5 files changed, 63 insertions(+), 3 deletions(-) commit 29ce6ecbb83c9185d76e3a7c340c9702d2a54961 Author: Avraham Stern Date: Wed Apr 26 10:58:49 2017 +0300 cfg80211: unify cfg80211_roamed() and cfg80211_roamed_bss() cfg80211_roamed() and cfg80211_roamed_bss() take the same arguments except that cfg80211_roamed() requires the BSSID and cfg80211_roamed_bss() requires the bss entry. Unify the two functions by using a struct for driver initiated roaming information so that either the BSSID or the bss entry can be passed as an argument to the unified function. Signed-off-by: Avraham Stern [modified the ath6k, brcm80211, rndis and wlan-ng drivers accordingly] Signed-off-by: Luca Coelho [modify brcmfmac to remove the useless cast, spotted by Arend] Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath6kl/cfg80211.c | 10 ++- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 13 +++- drivers/net/wireless/rndis_wlan.c | 19 +++-- drivers/staging/wlan-ng/cfg80211.c | 7 +- include/net/cfg80211.h | 58 +++++++------- net/wireless/core.h | 12 +-- net/wireless/nl80211.c | 18 +++-- net/wireless/nl80211.h | 5 +- net/wireless/sme.c | 90 +++++++++------------- net/wireless/util.c | 4 +- 10 files changed, 115 insertions(+), 121 deletions(-) commit 21a8e9dd52b64f0170bad208293ef8c30c3c1403 Author: Mohammed Shafi Shajakhan Date: Thu Apr 27 12:45:38 2017 +0530 mac80211: Fix possible sband related NULL pointer de-reference Existing API 'ieee80211_get_sdata_band' returns default 2 GHz band even if the channel context configuration is NULL. This crashes for chipsets which support 5 Ghz alone when it tries to access members of 'sband'. Channel context configuration can be NULL in multivif case and when channel switch is in progress (or) when it fails. Fix this by replacing the API 'ieee80211_get_sdata_band' with 'ieee80211_get_sband' which returns a NULL pointer for sband when the channel configuration is NULL. An example scenario is as below: In multivif mode (AP + STA) with drivers like ath10k, when we do a channel switch in the AP vif (which has a number of clients connected) and a STA vif which is connected to some other AP, when the channel switch in AP vif fails, while the STA vifs tries to connect to the other AP, there is a window where the channel context is NULL/invalid and this results in a crash while the clients connected to the AP vif tries to reconnect and this race is very similar to the one investigated by Michal in https://patchwork.kernel.org/patch/3788161/ and this does happens with hardware that supports 5Ghz alone after long hours of testing with continuous channel switch on the AP vif ieee80211 phy0: channel context reservation cannot be finalized because some interfaces aren't switching wlan0: failed to finalize CSA, disconnecting wlan0-1: deauthenticating from 8c:fd:f0:01:54:9c by local choice (Reason: 3=DEAUTH_LEAVING) WARNING: CPU: 1 PID: 19032 at net/mac80211/ieee80211_i.h:1013 sta_info_alloc+0x374/0x3fc [mac80211] [] (sta_info_alloc [mac80211]) [] (ieee80211_add_station [mac80211])) [] (nl80211_new_station [cfg80211]) Unable to handle kernel NULL pointer dereference at virtual address 00000014 pgd = d5f4c000 Internal error: Oops: 17 [#1] PREEMPT SMP ARM PC is at sta_info_alloc+0x380/0x3fc [mac80211] LR is at sta_info_alloc+0x37c/0x3fc [mac80211] [] (sta_info_alloc [mac80211]) [] (ieee80211_add_station [mac80211]) [] (nl80211_new_station [cfg80211])) Cc: Michal Kazior Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Johannes Berg net/mac80211/cfg.c | 30 +++++++++++++++++------------- net/mac80211/ibss.c | 6 +++++- net/mac80211/ieee80211_i.h | 36 +++++++++++++++++++++--------------- net/mac80211/mesh.c | 29 ++++++++++++++++++++--------- net/mac80211/mesh_plink.c | 37 ++++++++++++++++++++++++++----------- net/mac80211/mlme.c | 14 ++++++++++++-- net/mac80211/rate.c | 4 +++- net/mac80211/sta_info.c | 13 +++++++++---- net/mac80211/tdls.c | 29 +++++++++++++++++++---------- net/mac80211/tx.c | 5 ++++- net/mac80211/util.c | 6 +++--- 11 files changed, 139 insertions(+), 70 deletions(-) commit f78d76699fe73d6a5faf344b327e7a54bfb1b1de Author: Colin Ian King Date: Fri Apr 21 17:19:31 2017 +0100 staging: rtl8192u: fix spelling mistake in variable name *attentuation Fix the spelling of a bunch of variables, from *attentuation to *attenuation. No functional change. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U.h | 8 ++--- drivers/staging/rtl8192u/r8192U_core.c | 10 +++--- drivers/staging/rtl8192u/r8192U_dm.c | 56 +++++++++++++++++----------------- drivers/staging/rtl8192u/r819xU_phy.c | 34 ++++++++++----------- 4 files changed, 54 insertions(+), 54 deletions(-) commit 86d7726dd14c4a30d30aaa94a30c7e3c6b5c0805 Author: Jakub Jedelsky Date: Tue Apr 11 10:19:08 2017 +0200 staging: rtl8192u: fix incorrect assignments Fixing warnings found by sparse on rtl8192u/ieee80211. drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1318:45: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1318:45: expected unsigned short [unsigned] [usertype] len drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1318:45: got restricted __be16 [usertype] drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1481:40: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1481:40: expected restricted __le16 drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1481:40: got int drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1483:40: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1483:40: expected restricted __le16 drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1483:40: got int drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1487:45: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1487:45: expected restricted __le16 drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1487:45: gotunsigned short [unsigned] [usertype] Signed-off-by: Jakub Jedelsky Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b13f6683ed4f42b2b4bed86ca2dec4ba478af47c Merge: 096ff2d e5afdf9 Author: Michael Ellerman Date: Fri Apr 28 20:19:37 2017 +1000 Merge branch 'topic/ppc-kvm' into next Merge the topic branch we were sharing with kvm-ppc, Paul has also merged it. commit 785185f4a3cf024c778312ec4a1f34126319d890 Author: kbuild test robot Date: Sun Apr 23 12:26:23 2017 +0300 staging: ccree: fix ifnullfree.cocci warnings drivers/staging/ccree/ssi_hash.c:317:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:320:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:323:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:373:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:375:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:377:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:379:3-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:381:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/staging/ccree/ssi_hash.c:383:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. NULL check before some freeing functions is not needed. Based on checkpatch warning "kfree(NULL) is safe this check is probably not required" and kfreeaddr.cocci by Julia Lawall. Generated by: scripts/coccinelle/free/ifnullfree.cocci Signed-off-by: Gilad Ben-Yossef Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_hash.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) commit eba44af3c325d16678a6dbff975ab9dfc6369187 Author: kbuild test robot Date: Sun Apr 23 12:26:22 2017 +0300 staging: ccree: fix ifnullfree.cocci warnings drivers/staging/ccree/ssi_buffer_mgr.c:530:3-19: 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: Gilad Ben-Yossef Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_buffer_mgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9cbd7dca45993cfe56357a75bf054b0b25860cca Author: kbuild test robot Date: Sun Apr 23 12:26:21 2017 +0300 staging: ccree: fix array_size.cocci warnings drivers/staging/ccree/ssi_sysfs.c:319:34-35: WARNING: Use ARRAY_SIZE drivers/staging/ccree/ssi_sysfs.c:429:34-35: WARNING: Use ARRAY_SIZE Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element Semantic patch information: This makes an effort to find cases where ARRAY_SIZE can be used such as where there is a division of sizeof the array by the sizeof its first element or by any indexed element or the element type. It replaces the division of the two sizeofs by ARRAY_SIZE. Generated by: scripts/coccinelle/misc/array_size.cocci Signed-off-by: Gilad Ben-Yossef Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_sysfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 401c31130ae68d2b65f8ba0892c8238c68138e03 Author: kbuild test robot Date: Sun Apr 23 12:26:20 2017 +0300 staging: ccree: fix semicolon.cocci warnings drivers/staging/ccree/ssi_request_mgr.c:623:3-4: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Gilad Ben-Yossef Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_request_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65d4c8a76b8ae7ece1eb6ed4c40f2f6fa35c29c0 Author: kbuild test robot Date: Sun Apr 23 12:26:19 2017 +0300 staging: ccree: fix platform_no_drv_owner.cocci warnings drivers/staging/ccree/ssi_driver.c:484:6-11: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Gilad Ben-Yossef Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_driver.c | 1 - 1 file changed, 1 deletion(-) commit abb5f0c6026816f4f8e4b68d4d4dc329c239cf36 Author: Gilad Ben-Yossef Date: Sun Apr 23 12:26:18 2017 +0300 staging: ccree: remove useless NULL test of field Remove kbuild test robot reported NULL check for a struct field address. Signed-off-by: Gilad Ben-Yossef Reported-by: kbuild test robot Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_buffer_mgr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a35f1eb4622a22d28ee8bc7ad53ba448b8f219bd Author: Gilad Ben-Yossef Date: Sun Apr 23 12:26:16 2017 +0300 staging: ccree: add DT bindings for Arm CryptoCell This adds DT bindings for the Arm TrustZone CryptoCell cryptographic accelerator IP. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/crypto/arm-cryptocell.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 27e1b65aceef7b051bcfa74e1020f82a2210ed95 Author: Gilad Ben-Yossef Date: Sun Apr 23 12:26:15 2017 +0300 staging: ccree: add TODO list Add TODO list for moving out of staging tree for ccree crypto driver Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/TODO | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 1660998033e1f180768b58b0f037da9292d1adda Author: Gilad Ben-Yossef Date: Sun Apr 23 12:26:14 2017 +0300 staging: ccree: add FIPS support Add FIPS mode support to CryptoCell driver Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/Kconfig | 9 + drivers/staging/ccree/Makefile | 1 + drivers/staging/ccree/ssi_aead.c | 6 + drivers/staging/ccree/ssi_cipher.c | 52 + drivers/staging/ccree/ssi_driver.c | 19 +- drivers/staging/ccree/ssi_driver.h | 2 + drivers/staging/ccree/ssi_fips.c | 65 ++ drivers/staging/ccree/ssi_fips.h | 70 ++ drivers/staging/ccree/ssi_fips_data.h | 315 ++++++ drivers/staging/ccree/ssi_fips_ext.c | 96 ++ drivers/staging/ccree/ssi_fips_ll.c | 1681 +++++++++++++++++++++++++++++++ drivers/staging/ccree/ssi_fips_local.c | 369 +++++++ drivers/staging/ccree/ssi_fips_local.h | 77 ++ drivers/staging/ccree/ssi_hash.c | 21 +- drivers/staging/ccree/ssi_request_mgr.c | 2 + 15 files changed, 2783 insertions(+), 2 deletions(-) commit fe0a1951b36d28391e8ec5f7297e7288b72e7aca Author: Gilad Ben-Yossef Date: Sun Apr 23 12:26:13 2017 +0300 staging: ccree: add AEAD support Add CryptoCell AEAD support Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/Kconfig | 1 + drivers/staging/ccree/Makefile | 2 +- drivers/staging/ccree/cc_crypto_ctx.h | 21 + drivers/staging/ccree/ssi_aead.c | 2826 ++++++++++++++++++++++++++++++++ drivers/staging/ccree/ssi_aead.h | 120 ++ drivers/staging/ccree/ssi_buffer_mgr.c | 899 ++++++++++ drivers/staging/ccree/ssi_buffer_mgr.h | 4 + drivers/staging/ccree/ssi_driver.c | 11 + drivers/staging/ccree/ssi_driver.h | 4 + 9 files changed, 3887 insertions(+), 1 deletion(-) commit a4d826b94a634e7319c212d8ab1d8cbcf783d0f2 Author: Gilad Ben-Yossef Date: Sun Apr 23 12:26:12 2017 +0300 staging: ccree: add IV generation support Add CryptoCell IV hardware generation support. This patch adds the needed support to drive the HW but does not expose the ability via the kernel crypto API yet. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/Makefile | 2 +- drivers/staging/ccree/ssi_buffer_mgr.c | 2 + drivers/staging/ccree/ssi_cipher.c | 11 ++ drivers/staging/ccree/ssi_cipher.h | 1 + drivers/staging/ccree/ssi_driver.c | 9 + drivers/staging/ccree/ssi_driver.h | 7 + drivers/staging/ccree/ssi_ivgen.c | 301 ++++++++++++++++++++++++++++++++ drivers/staging/ccree/ssi_ivgen.h | 72 ++++++++ drivers/staging/ccree/ssi_pm.c | 2 + drivers/staging/ccree/ssi_request_mgr.c | 33 +++- 10 files changed, 438 insertions(+), 2 deletions(-) commit 302ef8ebb4b2ca10b06268c2ef5fbc4d1f061a51 Author: Gilad Ben-Yossef Date: Sun Apr 23 12:26:11 2017 +0300 staging: ccree: add skcipher support Add CryptoCell skcipher support Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/Kconfig | 8 + drivers/staging/ccree/Makefile | 2 +- drivers/staging/ccree/cc_crypto_ctx.h | 21 + drivers/staging/ccree/ssi_buffer_mgr.c | 147 ++++ drivers/staging/ccree/ssi_buffer_mgr.h | 16 + drivers/staging/ccree/ssi_cipher.c | 1440 ++++++++++++++++++++++++++++++++ drivers/staging/ccree/ssi_cipher.h | 88 ++ drivers/staging/ccree/ssi_driver.c | 14 + drivers/staging/ccree/ssi_driver.h | 30 + 9 files changed, 1765 insertions(+), 1 deletion(-) commit 50cfbbb7e627b868f3cf6882d2a9210bb8428737 Author: Gilad Ben-Yossef Date: Sun Apr 23 12:26:10 2017 +0300 staging: ccree: add ahash support Add CryptoCell async. hash and HMAC support. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/Kconfig | 6 + drivers/staging/ccree/Makefile | 2 +- drivers/staging/ccree/cc_crypto_ctx.h | 22 + drivers/staging/ccree/hash_defs.h | 78 + drivers/staging/ccree/ssi_buffer_mgr.c | 311 +++- drivers/staging/ccree/ssi_buffer_mgr.h | 6 + drivers/staging/ccree/ssi_driver.c | 11 +- drivers/staging/ccree/ssi_driver.h | 4 +- drivers/staging/ccree/ssi_hash.c | 2732 ++++++++++++++++++++++++++++++++ drivers/staging/ccree/ssi_hash.h | 101 ++ drivers/staging/ccree/ssi_pm.c | 4 + 11 files changed, 3263 insertions(+), 14 deletions(-) commit abefd6741d540fc624e73a2a3bdef2397bcbd064 Author: Gilad Ben-Yossef Date: Sun Apr 23 12:26:09 2017 +0300 staging: ccree: introduce CryptoCell HW driver Introduce basic low level Arm TrustZone CryptoCell HW support. This first patch doesn't actually register any Crypto API transformations, these will follow up in the next patch. This first revision supports the CC 712 REE component. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/ccree/Kconfig | 19 + drivers/staging/ccree/Makefile | 2 + drivers/staging/ccree/cc_bitops.h | 62 +++ drivers/staging/ccree/cc_crypto_ctx.h | 235 ++++++++++ drivers/staging/ccree/cc_hal.h | 30 ++ drivers/staging/ccree/cc_hw_queue_defs.h | 603 +++++++++++++++++++++++++ drivers/staging/ccree/cc_lli_defs.h | 57 +++ drivers/staging/ccree/cc_pal_log.h | 188 ++++++++ drivers/staging/ccree/cc_pal_log_plat.h | 33 ++ drivers/staging/ccree/cc_pal_types.h | 97 ++++ drivers/staging/ccree/cc_pal_types_plat.h | 29 ++ drivers/staging/ccree/cc_regs.h | 106 +++++ drivers/staging/ccree/dx_crys_kernel.h | 180 ++++++++ drivers/staging/ccree/dx_env.h | 224 ++++++++++ drivers/staging/ccree/dx_host.h | 155 +++++++ drivers/staging/ccree/dx_reg_base_host.h | 34 ++ drivers/staging/ccree/dx_reg_common.h | 26 ++ drivers/staging/ccree/hw_queue_defs_plat.h | 43 ++ drivers/staging/ccree/ssi_buffer_mgr.c | 537 +++++++++++++++++++++++ drivers/staging/ccree/ssi_buffer_mgr.h | 79 ++++ drivers/staging/ccree/ssi_config.h | 61 +++ drivers/staging/ccree/ssi_driver.c | 499 +++++++++++++++++++++ drivers/staging/ccree/ssi_driver.h | 183 ++++++++ drivers/staging/ccree/ssi_pm.c | 144 ++++++ drivers/staging/ccree/ssi_pm.h | 46 ++ drivers/staging/ccree/ssi_pm_ext.c | 60 +++ drivers/staging/ccree/ssi_pm_ext.h | 33 ++ drivers/staging/ccree/ssi_request_mgr.c | 680 +++++++++++++++++++++++++++++ drivers/staging/ccree/ssi_request_mgr.h | 60 +++ drivers/staging/ccree/ssi_sram_mgr.c | 138 ++++++ drivers/staging/ccree/ssi_sram_mgr.h | 80 ++++ drivers/staging/ccree/ssi_sysfs.c | 440 +++++++++++++++++++ drivers/staging/ccree/ssi_sysfs.h | 54 +++ 35 files changed, 5220 insertions(+) commit f55a6d457b215e5a382d6001a166ae2089fc81b6 Author: Arnd Bergmann Date: Fri Apr 21 22:59:16 2017 +0200 staging: rtl8723bs: rework debug configuration handling I ran into this warning during randconfig testing: drivers/staging/rtl8723bs/os_dep/rtw_proc.c: In function 'rtw_adapter_proc_deinit': drivers/staging/rtl8723bs/os_dep/rtw_proc.c:738:25: error: unused variable 'drv_proc' [-Werror=unused-variable] drivers/staging/rtl8723bs/os_dep/rtw_proc.c: In function 'rtw_adapter_proc_replace': drivers/staging/rtl8723bs/os_dep/rtw_proc.c:762:25: error: unused variable 'drv_proc' [-Werror=unused-variable] The problem is that the code procfs code gets built even when CONFIG_PROC_FS is disabled, but some functions are turned into empty stubs then. This is easily addressed by adding an #ifdef around the definition of the CONFIG_PROC_DEBUG macro. However, I could not bear looking at the macro name that clashes with the Kconfig name space, so I also renamed it to simply PROC_DEBUG, along with the other rtl8723bs specific CONFIG_DEBUG_* macros that I renamed the same way. This is consistent with how we handle the same checks in the non-staging rtlwifi driver. As the code path for !CONFIG_PROC_DEBUG had not been tested properly, it turned out to be incorrect and requires adding 'static inline' annotations for the stub handlers, and moving some variables around. Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 ++ drivers/staging/rtl8723bs/core/rtw_debug.c | 11 +++----- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 6 ++--- drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 4 +-- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 12 ++++++--- drivers/staging/rtl8723bs/include/autoconf.h | 16 +++++++----- drivers/staging/rtl8723bs/include/rtw_debug.h | 12 ++++----- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 32 +++++++++++------------ drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 6 ++--- drivers/staging/rtl8723bs/os_dep/rtw_proc.c | 4 +-- drivers/staging/rtl8723bs/os_dep/rtw_proc.h | 16 ++++++------ 11 files changed, 62 insertions(+), 59 deletions(-) commit c45112e467ab0a5dbc13f36b0420518e1ee9c072 Author: Arnd Bergmann Date: Wed Apr 19 19:16:26 2017 +0200 staging: rtl8723bs: fix empty-body warning The newly added driver causes lots of warnings like drivers/staging/rtl8723bs/core/rtw_recv.c: In function 'validate_recv_frame': drivers/staging/rtl8723bs/core/rtw_recv.c:1602:4: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] DBG_COUNTER(adapter->rx_logs.core_rx_pre_data_handled); drivers/staging/rtl8723bs/core/rtw_xmit.c: In function 'update_attrib': drivers/staging/rtl8723bs/core/rtw_xmit.c:726:3: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_unknown); drivers/staging/rtl8723bs/hal/HalPhyRf.c: In function 'ODM_TXPowerTrackingCallback_ThermalMeter': drivers/staging/rtl8723bs/hal/HalPhyRf.c:146:4: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] drivers/staging/rtl8723bs/hal/HalPhyRf.c:529:6: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] drivers/staging/rtl8723bs/hal/HalPhyRf.c:559:6: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] When DBG_COUNTER() etc is defined as a non-empty macro, we get the intended behavior and no warning. Using no_printk() for printing helper functions as the added advantage of compile-time checking format strings Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h | 9 +++++---- drivers/staging/rtl8723bs/hal/odm_debug.h | 15 ++++++++------- drivers/staging/rtl8723bs/include/rtw_debug.h | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) commit b40f7808a0edcb63aeb619b37b7b870cc5bb8c39 Author: Christophe Colin Date: Sun Apr 23 21:55:25 2017 +0200 staging: fbtft: fix open parentheses alignment Modify the code indentations to fix the checkpatch issues. Signed-off-by: Christophe Colin Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-sysfs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 0c8f4650eaef96794fe5d581e73968ad3050323f Author: Dhananjay Balan Date: Mon Apr 24 15:15:53 2017 +0200 staging: olpc_dcon: style fixes removes hardcoded function name and uses __func__ to print info. Signed-off-by: Dhananjay Balan Signed-off-by: Greg Kroah-Hartman drivers/staging/olpc_dcon/olpc_dcon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1442f6f7c1b77de1c508318164a527e240c24a4d Author: Paolo Abeni Date: Thu Apr 20 11:44:16 2017 +0200 ipvs: explicitly forbid ipv6 service/dest creation if ipv6 mod is disabled When creating a new ipvs service, ipv6 addresses are always accepted if CONFIG_IP_VS_IPV6 is enabled. On dest creation the address family is not explicitly checked. This allows the user-space to configure ipvs services even if the system is booted with ipv6.disable=1. On specific configuration, ipvs can try to call ipv6 routing code at setup time, causing the kernel to oops due to fib6_rules_ops being NULL. This change addresses the issue adding a check for the ipv6 module being enabled while validating ipv6 service operations and adding the same validation for dest operations. According to git history, this issue is apparently present since the introduction of ipv6 support, and the oops can be triggered since commit 09571c7ae30865ad ("IPVS: Add function to determine if IPv6 address is local") Fixes: 09571c7ae30865ad ("IPVS: Add function to determine if IPv6 address is local") Signed-off-by: Paolo Abeni Acked-by: Julian Anastasov Signed-off-by: Simon Horman net/netfilter/ipvs/ip_vs_ctl.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 17475c50bea854ba4e0da8198b98d921be2285cb Author: Ian Chard Date: Thu Apr 27 09:28:06 2017 +0100 staging: wlan-ng: break long line in p80211req.c Fix a style warning for a line over 80 characters long. Signed-off-by: Ian Chard Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211req.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 05c0cf88bec588a7cb34de569acd871ceef26760 Author: Malcolm Priestley Date: Sat Apr 22 11:14:58 2017 +0100 staging: vt6656: use off stack for in buffer USB transfers. Since 4.9 mandated USB buffers to be heap allocated. This causes the driver to fail. Create buffer for USB transfers. Signed-off-by: Malcolm Priestley Cc: # v4.9+ Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/usbpipe.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 12ecd24ef93277e4e5feaf27b0b18f2d3828bc5e Author: Malcolm Priestley Date: Sat Apr 22 11:14:57 2017 +0100 staging: vt6656: use off stack for out buffer USB transfers. Since 4.9 mandated USB buffers be heap allocated this causes the driver to fail. Since there is a wide range of buffer sizes use kmemdup to create allocated buffer. Signed-off-by: Malcolm Priestley Cc: # v4.9+ Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/usbpipe.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 00916cfc61779a80e378f431d668a4508421b330 Author: Chewie Lin Date: Wed Apr 19 00:58:35 2017 -0700 drivers:staging:vt6656: remove usb_device_reset in main_usb.c: Removed the usb_device_reset(), replace with call to usb_reset_device() directly. Plus it removes the confusing function name and addressed the checkpatch warning. This change also swaps string in the dev_warn() call with __func__ argument to "vt6656_probe" instead of literal string "usb_reset_device". WARNING: Prefer using "%s", __func__ to embedded function names #417: FILE: main_usb.c:417: + "usb_device_reset fail status=%d\n", status); total: 0 errors, 1 warnings, 1058 lines checked And after fix: main_usb.c has no obvious style problems and is ready for submission. Signed-off-by: Chewie Lin Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/main_usb.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 9e96652756ad647b7bcc03cb99ffc9756d7b5f93 Author: Pan Bian Date: Sun Apr 23 19:53:58 2017 +0800 staging: wilc1000: fix unchecked return value Function dev_alloc_skb() will return a NULL pointer if there is no enough memory. However, in function WILC_WFI_mon_xmit(), its return value is used without validation. This may result in a bad memory access bug. This patch fixes the bug. Signed-off-by: Pan Bian Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/linux_mon.c | 2 ++ 1 file changed, 2 insertions(+) commit fb90e8dedb465bd06512f718b139ed8680d26dbe Author: Aaron Conole Date: Wed Apr 12 16:38:12 2017 -0400 ipvs: change comparison on sync_refresh_period The sync_refresh_period variable is unsigned, so it can never be < 0. Signed-off-by: Aaron Conole Signed-off-by: Simon Horman net/netfilter/ipvs/ip_vs_sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65ba101ebc3b80500882b6bf3502823e24a99f90 Author: Aaron Conole Date: Mon Apr 10 15:50:44 2017 -0400 ipvs: remove unused function ip_vs_set_state_timeout There are no in-tree callers of this function and it isn't exported. Signed-off-by: Aaron Conole Signed-off-by: Simon Horman include/net/ip_vs.h | 2 -- net/netfilter/ipvs/ip_vs_proto.c | 22 ---------------------- 2 files changed, 24 deletions(-) commit 3c2bf0bd08123f3497bd3e84bd9088c937b0cb40 Author: Sameer Wadgaonkar Date: Tue Apr 18 16:55:25 2017 -0400 staging: unisys: visorhba: fix s-Par to boot with option CONFIG_VMAP_STACK set to y The root issue is that we are not allowed to have items on the stack being passed to "DMA" like operations. In this case we have a vmcall and an inline completion of scsi command. This patch fixes the issue by moving the variables on stack in do_scsi_nolinuxstat() to heap memory. Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorhba/visorhba_main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit bb1fb8ac399f75fccf3da5c7430a40bb0e5f01c8 Author: Sameer Wadgaonkar Date: Tue Apr 18 16:55:24 2017 -0400 staging: unisys: visorbus: fix s-Par to boot with option CONFIG_VMAP_STACK set to y The root issue is that we are not allowed to have items on the stack being passed to "DMA" like operations. In this case we have vmcall operation that was using parameters from the stack. This patch fixes the issue by moving the variables on stack in issue_vmcall_io_controlvm_addr() to vmcall_controlvm_addr struct. Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 33 +++++++++++++++----------- 1 file changed, 19 insertions(+), 14 deletions(-) commit 372b9f22763915ea32d19f6397f6292d2667e2bf Author: David Kershner Date: Tue Apr 18 16:55:23 2017 -0400 staging: unisys: visorbus: remove POSTCODE from visorchipset_init Remove POSTCODEs from visorchipset_init and replace them with dev_err when needed. Since there are no more POSTCODEs in the code, we can get rid of the data in the header file as well. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 4 +- drivers/staging/unisys/visorbus/vmcallinterface.h | 104 ---------------------- 2 files changed, 1 insertion(+), 107 deletions(-) commit 0f7453af972be6532b56d056cc91e7310a8094fb Author: David Kershner Date: Tue Apr 18 16:55:22 2017 -0400 staging: unisys: visorbus: remove postcodes in setup_crash_devices_work_queue Replace postcodes with dev_err in the function setup_crash_device_work_queue. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 33 +++++++++++--------------- 1 file changed, 14 insertions(+), 19 deletions(-) commit d9b89ef189a876a37032b8cc1fea4a80018d371d Author: David Kershner Date: Tue Apr 18 16:55:21 2017 -0400 staging: unisys: visorbus: refactor setup_crash_devices_work_queue The if statement was sending us down the happy path with the error path in the else. This can be simplified by having the if be the error and just falling through with the good path. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 03662df8114fa74cbd4e993c7e0ca1360db603a3 Author: David Kershner Date: Tue Apr 18 16:55:20 2017 -0400 staging: unisys: visorbus: get rid of POSTCODES in my_device_changestate Replace POSTCODEs with dev_err in the function my_device_changestate. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit a8c26e4bc219ded38cc59a9bbfcfee6c2abb666f Author: David Kershner Date: Tue Apr 18 16:55:19 2017 -0400 staging: unisys: visorbus: remove POSTCODE from my_device_create Replace the POSTCODEs with dev_err in my_device_create. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit 71a0265d2781c19d2f25520bc6a8f54e0224c692 Author: David Kershner Date: Tue Apr 18 16:55:18 2017 -0400 staging: unisys: visorbus: remove POSTCODE from bus_configure Remove the POSTCODE logging from bus_configure, replace it with an error message if we fail dumping the errno. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 055bc9093b3feb50378665f71236fdeca620f814 Author: David Kershner Date: Tue Apr 18 16:55:17 2017 -0400 staging: unisys: visorbus: remove POSTCODEs from bus_create Removed the POSTCODEs from the function bus_create. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 35301b87628df68a554d63b4baa864644008a97c Author: David Kershner Date: Tue Apr 18 16:55:16 2017 -0400 staging: unisys: visorbus: get rid of POSTCODEs in save_crash_msg Replace POSTCODES in save_crash_msg with dev_err handling. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 804aab3be13915ce72da8000ad00694ae90f7bf2 Author: David Kershner Date: Tue Apr 18 16:55:15 2017 -0400 staging: unisys: visorbus: remove postcodes in visorbus_init Remove the POSTCODES in visorbus_init. Since there are no more POSTCODES in visorbus_main.c we can remove the reference to the vmcallinterface header file. No need for vmcallinterface in visorbus_main.c Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 81aaca2f5de6f4b72a15e2fbb19fa7e4fff329e4 Author: David Kershner Date: Tue Apr 18 16:55:14 2017 -0400 staging: unisys: visorbus: remove noisy postcode from visorchipset_exit The postcodes in visorchipset_exit were not displaying errors, they can just be removed. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 4 ---- 1 file changed, 4 deletions(-) commit 5e259c4b0667edb1c3d24d9f698465e496d2c569 Author: David Kershner Date: Tue Apr 18 16:55:13 2017 -0400 staging: unisys: visorbus: remove noisy postcode in bus_destroy Since kzalloc will display error the postcode becomes redundant, it can be removed. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 3 --- 1 file changed, 3 deletions(-) commit 646c7eb5d207538a8b655a40f4bbc27a56c1bb73 Author: David Kershner Date: Tue Apr 18 16:55:12 2017 -0400 staging: unisys: visorbus: remove noisy postcodes Get rid of postcodes from visorbus_main.c that are just informational. They were not logging errors, we don't need to replace them with anything. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) commit 450333f10a074517c167a129b92496a070ada0d4 Author: David Kershner Date: Tue Apr 18 16:55:11 2017 -0400 staging: unisys: visorbus: remove POSTCODE in create_bus_instance Remove postcodes from create_bus_instance. If there is an error log it with dev_err. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 402a343a24f5ed6fb9f88255d5b916be2fa3b32e Author: David Kershner Date: Tue Apr 18 16:55:10 2017 -0400 staging: unisys: visorbus: remove POSTCODE from chispet_init Get rid of the postcodes from the function chipset_init. They were being noisy, so don't replace them with errors. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 -- 1 file changed, 2 deletions(-) commit ebdc1b883352b4db8d28afc9af3e5d2f81b2e4ff Author: David Kershner Date: Tue Apr 18 16:55:09 2017 -0400 staging: unisys: visorbus: remove POSTCODE from create_visor_device Remove POSTCODES from create_visor_device, when we fail log an error with dev_err. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 8c8c975f37b2097cd23b7394fff0192c073b808f Author: David Kershner Date: Tue Apr 18 16:55:08 2017 -0400 staging: unisys: visorbus: remove NORETRY Allow retry when allocating memory. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9b2cae6decb94a222190a2096f1188af5ed68554 Author: David Kershner Date: Tue Apr 18 16:55:07 2017 -0400 staging: unisys: visorbus: handle visorchannel_write errors in code Catch and report back errors when visorchannel_write fails. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 35 ++++++++++++-------------- 1 file changed, 16 insertions(+), 19 deletions(-) commit 04dbc09b255ec0be67e6b0f7bf114675ac143cd9 Author: David Kershner Date: Tue Apr 18 16:55:06 2017 -0400 staging: unisys: visorbus: add timeout to controlvm_periodic_work Limit the amount that gets pulled from the queue on each try so we don't get stuck in an infinite loop if something has gone wrong with the s-Par firmware. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d02bde9d37bc00376727a2b422ee95323bbcd6d6 Author: David Kershner Date: Tue Apr 18 16:55:05 2017 -0400 staging: unisys: visorbus: update comment Comment was outdated and did not reflect what was actually happening. Update the comment to reflect reality. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 027b03e7171857cf017ad1f338525738be8a25ca Author: David Kershner Date: Tue Apr 18 16:55:04 2017 -0400 staging: unisys: visorbus: fixed indentation Moved the brace to the left to fix the indentation issue. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1d28da7a2d28bfb18bd9aa12afaeee7c2cf6d11 Author: David Kershner Date: Tue Apr 18 16:55:03 2017 -0400 staging; unisys: visorbus: replace uint32 with int Shouldn't use uint32 in the kernel, it can be replaced with int here. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54149b4c1458ec9a70788f66fe0f02790639f216 Author: David Kershner Date: Tue Apr 18 16:55:02 2017 -0400 staging: unisys: visornic: remove keyword inline from function Functions in c files don't need to be inlined, get rid of the keyword. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c0e65f83a933ec86b0c22c973e1a0363b30a176 Author: David Kershner Date: Tue Apr 18 16:55:01 2017 -0400 staging: unisys: visorbus: combine response functions into a single one There are several different controlvm response functions, consolidate them to one so we can simplify error handling. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 53 +++++++++++--------------- 1 file changed, 22 insertions(+), 31 deletions(-) commit 0743ce5904684ba5ea995e7a675cf1ede674d084 Author: Tobin C. Harding Date: Thu Apr 27 11:25:27 2017 +1000 staging: ks7010: fix enumeration tags Driver header declares enumeration types without tags. Using informative tags makes the code easier to understand and eliminates the need to comment the enum. Add tags to enumeration types. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit f730fb19dd5fca3ccf1af9e80e4455c76bf46f28 Author: Tobin C. Harding Date: Thu Apr 27 11:25:26 2017 +1000 staging: ks7010: add enum multicast_filter_type Driver uses preprocessor directives to define multicast filter constants. These can be defined using an enumeration type. Doing so adds to the readability and gives the assists the compiler. Add enumeration type multicast_filter_type to replace preprocessor defined constants. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 72f78682da2af5fa57f89f39d4c789123288274d Author: Tobin C. Harding Date: Thu Apr 27 11:25:25 2017 +1000 staging: ks7010: clean up macro ps_confirm_wait_inc Macro includes commented out code. Removing dead code line enables braces to be removed. Macro is easier to read if the code is clean. Clean up macro ps_confirm_wait_inc. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e04f2ec6c3266336784919d719b12ab67edaa74a Author: Tobin C. Harding Date: Thu Apr 27 11:25:24 2017 +1000 staging: ks7010: continue from loop on unmatched mac Inside loop, code block is guarded with an 'if' statement. Instead of guarding the block we can invert the 'if' statement conditional and continue the loop. Doing so allows subsequent code indentation to be reduced and aids the readability of the code. Invert 'if' statement conditional, continue loop if new conditional evaluates to true. Reduce subsequent code indentation level. Do not change program logic. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 2b0d92b265324cfe42839a23cb46677bb0112c2c Author: Tobin C. Harding Date: Thu Apr 27 11:25:23 2017 +1000 staging: ks7010: remove cast from netdev_priv() The returned pointer from netdev_priv() (void *) does not need to be cast. Remove unnecessary cast of void * returned by netdev_priv(). Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 184 ++++++++++++----------------------- 1 file changed, 64 insertions(+), 120 deletions(-) commit 8fb8e05ccafaa0e09fd93d9bffd0b4037cc36317 Author: Tobin C. Harding Date: Thu Apr 27 11:25:22 2017 +1000 staging: ks7010: make abbreviation mgmt uniform Driver currently uses abbreviations 'mgt' and 'mngmt' for 'management'. Also 'power' is sometimes abbreviated to 'pow' and other times not. It makes the code easier to read and easier to modify if one abbreviation is used throughout the driver. 'mgmt' is widely accepted as an abbreviation of 'management'. 'power' can be spelled out in full, the extra two characters aids readability without an excessive cost. Make abbreviation of 'management' uniform across the driver, function names, preprocessor defined constants, and enumeration types. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 4 ++-- drivers/staging/ks7010/ks_hostif.c | 32 +++++++++++++------------- drivers/staging/ks7010/ks_hostif.h | 17 +++++++------- drivers/staging/ks7010/ks_wlan.h | 2 +- drivers/staging/ks7010/ks_wlan_net.c | 44 ++++++++++++++++++------------------ 5 files changed, 49 insertions(+), 50 deletions(-) commit 27476f01d311ebbb4847f32f8258f2be25d8aea6 Author: Tobin C. Harding Date: Thu Apr 27 11:25:21 2017 +1000 staging: ks7010: fix checkpatch LINE_SPACING Checkpatch emits CHECK: Please don't use multiple blank lines. Remove multiple blank lines. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 1 - 1 file changed, 1 deletion(-) commit 63c31af3e5efa8ebe0aaa60de183fb94989420f8 Author: Tobin C. Harding Date: Thu Apr 27 11:25:20 2017 +1000 staging: ks7010: add enum sleep_mode_type Driver uses preprocessor directives to define SLP_ASLEEP and SLP_ACTIVE. These can be defined using an enumeration type. Doing so adds to the readability and gives the usual compiler benefits of having an enum. Functions that currently accept integer types can now use the new enumeration type, further aiding readability. Add enumeration type sleep_mode_type. Update code that handles sleep mode to use the new enumeration type. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 7 ++++--- drivers/staging/ks7010/ks_hostif.h | 8 +++++--- 2 files changed, 9 insertions(+), 6 deletions(-) commit 0e24eb8abf93a2e80ecbe97419d2d1fe089a7386 Author: Tobin C. Harding Date: Thu Apr 27 11:25:19 2017 +1000 staging: ks7010: abstract connection status Host interface connection status is handled using a 32 bit type. Top byte is used as for FORCE_DISCONNECT status, low bits are used for connect/disconnect status. Driver masks and checks integers to ascertain status. If functions are defined to do the masking and equality check then the details of how the status integer is used are abstracted away. This makes the code easier to read. Also future updates to the status handling will be easier because the code is in one place. Driver currently uses the CONNECT_STATUS and DISCONNECT_STATUS as values, as apposed to opaque values. Because of this driver code checks for equality with CONNECT_STATUS and DISCONNECT_STATUS as apposed to negating a single check (ie 'foo != CONNECT_STATUS). In order to maintain the current functionality we define two separate functions is_connect_status() and is_disconnect_status(). Add functions to abstract the status integer check. Update all sites that do the check manually to use the newly defined functions. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 2 +- drivers/staging/ks7010/ks_hostif.c | 24 ++++++++++++------------ drivers/staging/ks7010/ks_wlan.h | 2 ++ drivers/staging/ks7010/ks_wlan_net.c | 27 ++++++++++++++++++++++++--- 4 files changed, 39 insertions(+), 16 deletions(-) commit 11ce16da7b0f5335c7622ccc7c8151a387b44853 Author: Tobin C. Harding Date: Thu Apr 27 11:25:18 2017 +1000 staging: ks7010: add hostif_generic_request() Driver contains duplicate code. Host interface has numerous request functions which allocate memory for a request header. Each request header is different but all contain, as the first member, a hostif_hdr structure. This structure has size and event members which need to be set. By defining a helper function to allocate the memory and set the initial hostif_hdr members code duplication is reduced. Add function to allocate memory for a host interface request. Set 'size' and 'event' members. Remove duplicate code using newly defined function. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 173 ++++++++++++------------------------- 1 file changed, 57 insertions(+), 116 deletions(-) commit 95e72fba95fd1d9b9ef3ab080aafe1076f42a10a Author: Tobin C. Harding Date: Thu Apr 27 11:25:17 2017 +1000 staging: ks7010: clean memory allocation Memory allocation code contains unneeded debug statements, failed kmalloc() calls typically do not require a debug message. Introduction of a local 'size' variable allows kmalloc() call to be marginally cleaner, still uses magic numbers but these require a more substantial fix. Moving the magic numbers onto a single line opens the way for further refactoring. Clean memory allocation code, remove debug statements. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 8215fc607f50c516ceeb47fac046c3e4ea7acc4e Author: Tobin C. Harding Date: Thu Apr 27 11:25:16 2017 +1000 staging: ks7010: remove duplicate code Current switch statement has duplicate code in branches. This code can be put after the switch statement so as to remove the duplication. Move code to after switch statement, remove duplicate code. Make error branch return so as not to execute the moved code block. Do not change the program logic. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) commit 08484ef41927a52fbd0d46c5cd19a65535d768ea Author: Tobin C. Harding Date: Thu Apr 27 11:25:15 2017 +1000 staging: ks7010: remove magic numbers Driver includes magic numbers. Defining constants or using existing constants aids the readability of the code. Magic number '12' is used for two ethernet addresses (6 bytes each). ETH_ALEN is already defined within the kernel to 6. We can us the expression '2 * ETH_ALEN' to make this code explicit. Magic number '20' refers to the data size, in bytes, of a struct ether_hdr (described in eap_packet.h). We can define a constant for this purpose, making the code explicit and easier to read. Define constant. Remove magic numbers, using newly defined constant and/or expression using existing kernel constant. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/eap_packet.h | 2 ++ drivers/staging/ks7010/ks_hostif.c | 25 ++++++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) commit 8cd1dbe1db97ad74c5265e09c3490eeb7986f623 Author: Tobin C. Harding Date: Thu Apr 27 11:25:14 2017 +1000 staging: ks7010: move skb null check near allocation Currently, after allocating an sk_buff, driver fills the sk_buff within code block guarded by a NULL check on the sk_buff. If a NULL check is done immediately after the allocation, and code returns on error, then the subsequent code need not be guarded and the level of indentation may be reduced. This aids the readability of the code and makes explicit the error path. Check for NULL directly after allocating the sk_buff, return if allocation fails. Reduce indentation of subsequent code. Do not change the program logic. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 80 ++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 38 deletions(-) commit 69f3fecc49cabaadf4839dda4227427fc15b4c7e Author: Tobin C. Harding Date: Thu Apr 27 11:25:13 2017 +1000 staging: ks7010: remove unused local variable eap_key Code declares and assigns to a local variable that is never used, it can be safely removed. Remove unused local variable. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 208c66f2fb3d9cd398386785aae116753a27e8c4 Author: Tobin C. Harding Date: Thu Apr 27 11:25:12 2017 +1000 staging: ks7010: remove unnecessary address check Currently source and destination ethernet addresses are checked twice, once in hostif_data_indication() and then again in hostif_data_indication_wpa(). The second of these functions is called from the first right after the address check is done. This check is a duplicate and is unnecessary. Remove unnecessary duplicate address check. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 4 ---- 1 file changed, 4 deletions(-) commit 6d27f590112f356310a853f3b7dc6843cd72f786 Author: Valentin Vidic Date: Wed Apr 26 12:48:31 2017 +0200 staging: lustre: remove void function return All statements removed from the end of void functions as reported by checkpatch. Signed-off-by: Valentin Vidic Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 1 - drivers/staging/lustre/lustre/lmv/lproc_lmv.c | 1 - drivers/staging/lustre/lustre/lov/lov_obd.c | 1 - 3 files changed, 3 deletions(-) commit 6c707d4febfb7bcc9628a38bc8e2d9b690486414 Author: Paolo Cretaro Date: Tue Apr 25 22:14:29 2017 +0200 staging: android: ion: Remove whitespace before quoted newline Fix checkpatch.pl warning about unnecessary whitespace before a quoted newline. Signed-off-by: Paolo Cretaro Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_chunk_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c034a43e72dda58e4a184d71f5502ef356e04453 Author: Yueyao Zhu Date: Thu Apr 27 14:09:58 2017 -0700 staging: typec: Fairchild FUSB302 Type-c chip driver Fairchild FUSB302 Type-C chip driver that works with Type-C Port Controller Manager to provide USB PD and USB Type-C functionalities. Signed-off-by: Yueyao Zhu Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/Kconfig | 2 + drivers/staging/typec/Makefile | 1 + drivers/staging/typec/fusb302/Kconfig | 7 + drivers/staging/typec/fusb302/Makefile | 1 + drivers/staging/typec/fusb302/TODO | 6 + drivers/staging/typec/fusb302/fusb302.c | 1815 +++++++++++++++++++++++++++ drivers/staging/typec/fusb302/fusb302_reg.h | 186 +++ 7 files changed, 2018 insertions(+) commit 74e656d6b0551999194b5ab1e45ff8b1e82b898e Author: Guenter Roeck Date: Thu Apr 27 14:09:57 2017 -0700 staging: typec: Type-C Port Controller Interface driver (tcpci) The port controller interface driver interconnects the Type-C Port Manager with a Type-C Port Controller Interface (TCPCI) compliant port controller. Signed-off-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/Kconfig | 11 + drivers/staging/typec/Makefile | 1 + drivers/staging/typec/TODO | 3 + drivers/staging/typec/tcpci.c | 526 +++++++++++++++++++++++++++++++++++++++++ drivers/staging/typec/tcpci.h | 133 +++++++++++ 5 files changed, 674 insertions(+) commit f0690a25a140b853b1842fa80faf828601bb47e8 Author: Guenter Roeck Date: Thu Apr 27 14:09:56 2017 -0700 staging: typec: USB Type-C Port Manager (tcpm) This driver implements the USB Type-C Power Delivery state machine for both source and sink ports. Alternate mode support is not fully implemented. The driver attaches to the USB Type-C class code implemented in the following patches. usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY usb: USB Type-C connector class This driver only implements the state machine. Lower level drivers are responsible for - Reporting VBUS status and activating VBUS - Setting CC lines and providing CC line status - Setting line polarity - Activating and deactivating VCONN - Setting the current limit - Activating and deactivating PD message transfers - Sending and receiving PD messages The driver provides both a functional API as well as callbacks for lower level drivers. Signed-off-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 2 +- drivers/staging/typec/Kconfig | 11 + drivers/staging/typec/Makefile | 1 + drivers/staging/typec/TODO | 12 + drivers/staging/typec/pd.h | 281 ++++ drivers/staging/typec/pd_bdo.h | 31 + drivers/staging/typec/pd_vdo.h | 249 +++ drivers/staging/typec/tcpm.c | 3465 ++++++++++++++++++++++++++++++++++++++++ drivers/staging/typec/tcpm.h | 150 ++ 10 files changed, 4203 insertions(+), 1 deletion(-) commit 5fe49a9d11644f4aa9034c7eedbcfc6e52373e10 Author: Felix Fietkau Date: Wed Apr 26 17:11:37 2017 +0200 mac80211: add ieee80211_tx_status_ext This allows the driver to pass in struct ieee80211_tx_status directly. Make ieee80211_tx_status_noskb a wrapper around it. As with ieee80211_tx_status_noskb, there is no _ni variant of this call, because it probably won't be needed. Even if the driver won't provide any extra status info other than what's in struct ieee80211_tx_info already, it can optimize status reporting this way by passing in the station pointer. Signed-off-by: Felix Fietkau [use C99 initializers] Signed-off-by: Johannes Berg include/net/mac80211.h | 31 +++++++++++++++++++-- net/mac80211/status.c | 74 +++++++++++++++++++++++++++++++------------------- 2 files changed, 74 insertions(+), 31 deletions(-) commit eefebd3164604a19744dca3df08e050999031d74 Author: Felix Fietkau Date: Wed Apr 26 17:11:36 2017 +0200 mac80211: move ieee80211_tx_status_noskb below ieee80211_tx_status Makes further cleanups more readable Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/mac80211/status.c | 116 +++++++++++++++++++++++++------------------------- 1 file changed, 58 insertions(+), 58 deletions(-) commit 18fb84d986b398c59be6729f38f1c4bbbe8c4e9a Author: Felix Fietkau Date: Wed Apr 26 17:11:35 2017 +0200 mac80211: make rate control tx status API more extensible Rename .tx_status_noskb to .tx_status_ext and pass a new on-stack struct ieee80211_tx_status instead of struct ieee80211_tx_info. This struct can be used to pass extra information, e.g. for dynamic tx power control Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg include/net/mac80211.h | 20 +++++++++++++---- net/mac80211/rate.c | 22 +++++++++++++++++++ net/mac80211/rate.h | 44 +++----------------------------------- net/mac80211/rc80211_minstrel.c | 6 +++--- net/mac80211/rc80211_minstrel_ht.c | 10 ++++----- net/mac80211/status.c | 11 ++++++++-- 6 files changed, 58 insertions(+), 55 deletions(-) commit dcba665b1f4a5e986f22ac4230d536341d3ea5da Author: Johannes Berg Date: Wed Apr 26 14:51:20 2017 +0200 mac80211: use bitfield macros for encoded rate Instead of hand-coding the bit manipulations, use the bitfield macros to generate the code for the encoded bitrate. Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 26 +++++++++++++----------- net/mac80211/sta_info.h | 54 ++++++++++++++++++++++++++++++++----------------- 2 files changed, 50 insertions(+), 30 deletions(-) commit 8613c94815fcdd358638a22fed50c3f172042aa2 Author: Johannes Berg Date: Wed Apr 26 13:51:41 2017 +0200 mac80211: rename ieee80211_rx_status::vht_nss to just nss This field will need to be used again for HE, so rename it now. Again, mostly done with this spatch: @@ expression status; @@ -status->vht_nss +status->nss @@ expression status; @@ -status.vht_nss +status.nss Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath10k/htt_rx.c | 6 +++--- drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 2 +- drivers/net/wireless/mac80211_hwsim.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c | 2 +- include/net/mac80211.h | 4 ++-- net/mac80211/rx.c | 8 ++++---- net/mac80211/sta_info.h | 2 +- net/mac80211/util.c | 4 ++-- 9 files changed, 16 insertions(+), 16 deletions(-) commit da6a4352e7c867f81d7336f6517e819b3cce06bf Author: Johannes Berg Date: Wed Apr 26 12:14:59 2017 +0200 mac80211: separate encoding/bandwidth from flags We currently use a lot of flags that are mutually incompatible, separate this out into actual encoding and bandwidth enum values. Much of this again done with spatch, with manual post-editing, mostly to add the switch statements and get rid of the conversions. @@ expression status; @@ -status->enc_flags |= RX_ENC_FLAG_80MHZ +status->bw = RATE_INFO_BW_80 @@ expression status; @@ -status->enc_flags |= RX_ENC_FLAG_40MHZ +status->bw = RATE_INFO_BW_40 @@ expression status; @@ -status->enc_flags |= RX_ENC_FLAG_20MHZ +status->bw = RATE_INFO_BW_20 @@ expression status; @@ -status->enc_flags |= RX_ENC_FLAG_160MHZ +status->bw = RATE_INFO_BW_160 @@ expression status; @@ -status->enc_flags |= RX_ENC_FLAG_5MHZ +status->bw = RATE_INFO_BW_5 @@ expression status; @@ -status->enc_flags |= RX_ENC_FLAG_10MHZ +status->bw = RATE_INFO_BW_10 @@ expression status; @@ -status->enc_flags |= RX_ENC_FLAG_VHT +status->encoding = RX_ENC_VHT @@ expression status; @@ -status->enc_flags |= RX_ENC_FLAG_HT +status->encoding = RX_ENC_HT @@ expression status; @@ -status.enc_flags |= RX_ENC_FLAG_VHT +status.encoding = RX_ENC_VHT @@ expression status; @@ -status.enc_flags |= RX_ENC_FLAG_HT +status.encoding = RX_ENC_HT @@ expression status; @@ -(status->enc_flags & RX_ENC_FLAG_HT) +(status->encoding == RX_ENC_HT) @@ expression status; @@ -(status->enc_flags & RX_ENC_FLAG_VHT) +(status->encoding == RX_ENC_VHT) @@ expression status; @@ -(status->enc_flags & RX_ENC_FLAG_5MHZ) +(status->bw == RATE_INFO_BW_5) @@ expression status; @@ -(status->enc_flags & RX_ENC_FLAG_10MHZ) +(status->bw == RATE_INFO_BW_10) @@ expression status; @@ -(status->enc_flags & RX_ENC_FLAG_40MHZ) +(status->bw == RATE_INFO_BW_40) @@ expression status; @@ -(status->enc_flags & RX_ENC_FLAG_80MHZ) +(status->bw == RATE_INFO_BW_80) @@ expression status; @@ -(status->enc_flags & RX_ENC_FLAG_160MHZ) +(status->bw == RATE_INFO_BW_160) Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath10k/htt_rx.c | 32 ++++++------- drivers/net/wireless/ath/ath5k/base.c | 4 +- drivers/net/wireless/ath/ath9k/ar9003_mac.c | 1 + drivers/net/wireless/ath/ath9k/common.c | 8 ++-- drivers/net/wireless/ath/ath9k/debug_sta.c | 2 +- drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 3 +- drivers/net/wireless/ath/ath9k/mac.c | 1 + drivers/net/wireless/ath/ath9k/mac.h | 2 + drivers/net/wireless/ath/ath9k/recv.c | 4 +- drivers/net/wireless/ath/carl9170/rx.c | 4 +- .../wireless/broadcom/brcm80211/brcmsmac/main.c | 4 +- drivers/net/wireless/intel/iwlegacy/4965-mac.c | 2 +- drivers/net/wireless/intel/iwlwifi/dvm/rx.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 10 ++-- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 10 ++-- drivers/net/wireless/mac80211_hwsim.c | 4 +- drivers/net/wireless/marvell/mwl8k.c | 12 ++--- drivers/net/wireless/mediatek/mt7601u/mac.c | 4 +- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 4 +- drivers/net/wireless/ralink/rt2x00/rt2x00queue.h | 2 + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 8 ++-- .../net/wireless/realtek/rtlwifi/rtl8188ee/trx.c | 4 +- .../net/wireless/realtek/rtlwifi/rtl8192ce/trx.c | 4 +- .../net/wireless/realtek/rtlwifi/rtl8192cu/trx.c | 8 ++-- .../net/wireless/realtek/rtlwifi/rtl8192de/trx.c | 4 +- .../net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 4 +- .../net/wireless/realtek/rtlwifi/rtl8192se/trx.c | 4 +- .../net/wireless/realtek/rtlwifi/rtl8723ae/trx.c | 4 +- .../net/wireless/realtek/rtlwifi/rtl8723be/trx.c | 4 +- .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.c | 8 ++-- drivers/net/wireless/st/cw1200/txrx.c | 2 +- drivers/net/wireless/ti/wlcore/rx.c | 2 +- include/net/mac80211.h | 37 +++++++-------- net/mac80211/ibss.c | 4 +- net/mac80211/ieee80211_i.h | 4 +- net/mac80211/rx.c | 55 +++++++++++++--------- net/mac80211/scan.c | 8 ++-- net/mac80211/sta_info.h | 29 +++++------- net/mac80211/util.c | 43 +++++++++-------- 40 files changed, 182 insertions(+), 171 deletions(-) commit 7fdd69c5af2160236e97668bc1fb7d70855c66ae Author: Johannes Berg Date: Wed Apr 26 11:13:00 2017 +0200 mac80211: clean up rate encoding bits in RX status In preparation for adding support for HE rates, clean up the driver report encoding for rate/bandwidth reporting on RX frames. Much of this patch was done with the following spatch: @@ expression status; @@ -status->flag & (RX_FLAG_HT | RX_FLAG_VHT) +status->enc_flags & (RX_ENC_FLAG_HT | RX_ENC_FLAG_VHT) @@ assignment operator op; expression status; @@ -status->flag op RX_FLAG_SHORTPRE +status->enc_flags op RX_ENC_FLAG_SHORTPRE @@ expression status; @@ -status->flag & RX_FLAG_SHORTPRE +status->enc_flags & RX_ENC_FLAG_SHORTPRE @@ assignment operator op; expression status; @@ -status->flag op RX_FLAG_HT +status->enc_flags op RX_ENC_FLAG_HT @@ expression status; @@ -status->flag & RX_FLAG_HT +status->enc_flags & RX_ENC_FLAG_HT @@ assignment operator op; expression status; @@ -status->flag op RX_FLAG_40MHZ +status->enc_flags op RX_ENC_FLAG_40MHZ @@ expression status; @@ -status->flag & RX_FLAG_40MHZ +status->enc_flags & RX_ENC_FLAG_40MHZ @@ assignment operator op; expression status; @@ -status->flag op RX_FLAG_SHORT_GI +status->enc_flags op RX_ENC_FLAG_SHORT_GI @@ expression status; @@ -status->flag & RX_FLAG_SHORT_GI +status->enc_flags & RX_ENC_FLAG_SHORT_GI @@ assignment operator op; expression status; @@ -status->flag op RX_FLAG_HT_GF +status->enc_flags op RX_ENC_FLAG_HT_GF @@ expression status; @@ -status->flag & RX_FLAG_HT_GF +status->enc_flags & RX_ENC_FLAG_HT_GF @@ assignment operator op; expression status; @@ -status->flag op RX_FLAG_VHT +status->enc_flags op RX_ENC_FLAG_VHT @@ expression status; @@ -status->flag & RX_FLAG_VHT +status->enc_flags & RX_ENC_FLAG_VHT @@ assignment operator op; expression status; @@ -status->flag op RX_FLAG_STBC_MASK +status->enc_flags op RX_ENC_FLAG_STBC_MASK @@ expression status; @@ -status->flag & RX_FLAG_STBC_MASK +status->enc_flags & RX_ENC_FLAG_STBC_MASK @@ assignment operator op; expression status; @@ -status->flag op RX_FLAG_LDPC +status->enc_flags op RX_ENC_FLAG_LDPC @@ expression status; @@ -status->flag & RX_FLAG_LDPC +status->enc_flags & RX_ENC_FLAG_LDPC @@ assignment operator op; expression status; @@ -status->flag op RX_FLAG_10MHZ +status->enc_flags op RX_ENC_FLAG_10MHZ @@ expression status; @@ -status->flag & RX_FLAG_10MHZ +status->enc_flags & RX_ENC_FLAG_10MHZ @@ assignment operator op; expression status; @@ -status->flag op RX_FLAG_5MHZ +status->enc_flags op RX_ENC_FLAG_5MHZ @@ expression status; @@ -status->flag & RX_FLAG_5MHZ +status->enc_flags & RX_ENC_FLAG_5MHZ @@ assignment operator op; expression status; @@ -status->vht_flag op RX_VHT_FLAG_80MHZ +status->enc_flags op RX_ENC_FLAG_80MHZ @@ expression status; @@ -status->vht_flag & RX_VHT_FLAG_80MHZ +status->enc_flags & RX_ENC_FLAG_80MHZ @@ assignment operator op; expression status; @@ -status->vht_flag op RX_VHT_FLAG_160MHZ +status->enc_flags op RX_ENC_FLAG_160MHZ @@ expression status; @@ -status->vht_flag & RX_VHT_FLAG_160MHZ +status->enc_flags & RX_ENC_FLAG_160MHZ @@ assignment operator op; expression status; @@ -status->vht_flag op RX_VHT_FLAG_BF +status->enc_flags op RX_ENC_FLAG_BF @@ expression status; @@ -status->vht_flag & RX_VHT_FLAG_BF +status->enc_flags & RX_ENC_FLAG_BF @@ assignment operator op; expression status, STBC; @@ -status->flag op STBC << RX_FLAG_STBC_SHIFT +status->enc_flags op STBC << RX_ENC_FLAG_STBC_SHIFT @@ assignment operator op; expression status; @@ -status.flag op RX_FLAG_SHORTPRE +status.enc_flags op RX_ENC_FLAG_SHORTPRE @@ expression status; @@ -status.flag & RX_FLAG_SHORTPRE +status.enc_flags & RX_ENC_FLAG_SHORTPRE @@ assignment operator op; expression status; @@ -status.flag op RX_FLAG_HT +status.enc_flags op RX_ENC_FLAG_HT @@ expression status; @@ -status.flag & RX_FLAG_HT +status.enc_flags & RX_ENC_FLAG_HT @@ assignment operator op; expression status; @@ -status.flag op RX_FLAG_40MHZ +status.enc_flags op RX_ENC_FLAG_40MHZ @@ expression status; @@ -status.flag & RX_FLAG_40MHZ +status.enc_flags & RX_ENC_FLAG_40MHZ @@ assignment operator op; expression status; @@ -status.flag op RX_FLAG_SHORT_GI +status.enc_flags op RX_ENC_FLAG_SHORT_GI @@ expression status; @@ -status.flag & RX_FLAG_SHORT_GI +status.enc_flags & RX_ENC_FLAG_SHORT_GI @@ assignment operator op; expression status; @@ -status.flag op RX_FLAG_HT_GF +status.enc_flags op RX_ENC_FLAG_HT_GF @@ expression status; @@ -status.flag & RX_FLAG_HT_GF +status.enc_flags & RX_ENC_FLAG_HT_GF @@ assignment operator op; expression status; @@ -status.flag op RX_FLAG_VHT +status.enc_flags op RX_ENC_FLAG_VHT @@ expression status; @@ -status.flag & RX_FLAG_VHT +status.enc_flags & RX_ENC_FLAG_VHT @@ assignment operator op; expression status; @@ -status.flag op RX_FLAG_STBC_MASK +status.enc_flags op RX_ENC_FLAG_STBC_MASK @@ expression status; @@ -status.flag & RX_FLAG_STBC_MASK +status.enc_flags & RX_ENC_FLAG_STBC_MASK @@ assignment operator op; expression status; @@ -status.flag op RX_FLAG_LDPC +status.enc_flags op RX_ENC_FLAG_LDPC @@ expression status; @@ -status.flag & RX_FLAG_LDPC +status.enc_flags & RX_ENC_FLAG_LDPC @@ assignment operator op; expression status; @@ -status.flag op RX_FLAG_10MHZ +status.enc_flags op RX_ENC_FLAG_10MHZ @@ expression status; @@ -status.flag & RX_FLAG_10MHZ +status.enc_flags & RX_ENC_FLAG_10MHZ @@ assignment operator op; expression status; @@ -status.flag op RX_FLAG_5MHZ +status.enc_flags op RX_ENC_FLAG_5MHZ @@ expression status; @@ -status.flag & RX_FLAG_5MHZ +status.enc_flags & RX_ENC_FLAG_5MHZ @@ assignment operator op; expression status; @@ -status.vht_flag op RX_VHT_FLAG_80MHZ +status.enc_flags op RX_ENC_FLAG_80MHZ @@ expression status; @@ -status.vht_flag & RX_VHT_FLAG_80MHZ +status.enc_flags & RX_ENC_FLAG_80MHZ @@ assignment operator op; expression status; @@ -status.vht_flag op RX_VHT_FLAG_160MHZ +status.enc_flags op RX_ENC_FLAG_160MHZ @@ expression status; @@ -status.vht_flag & RX_VHT_FLAG_160MHZ +status.enc_flags & RX_ENC_FLAG_160MHZ @@ assignment operator op; expression status; @@ -status.vht_flag op RX_VHT_FLAG_BF +status.enc_flags op RX_ENC_FLAG_BF @@ expression status; @@ -status.vht_flag & RX_VHT_FLAG_BF +status.enc_flags & RX_ENC_FLAG_BF @@ assignment operator op; expression status, STBC; @@ -status.flag op STBC << RX_FLAG_STBC_SHIFT +status.enc_flags op STBC << RX_ENC_FLAG_STBC_SHIFT @@ @@ -RX_FLAG_STBC_SHIFT +RX_ENC_FLAG_STBC_SHIFT Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath10k/htt_rx.c | 46 ++++----- drivers/net/wireless/ath/ath5k/base.c | 6 +- drivers/net/wireless/ath/ath9k/ar9003_mac.c | 6 +- drivers/net/wireless/ath/ath9k/common.c | 9 +- drivers/net/wireless/ath/ath9k/debug_sta.c | 6 +- drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 6 +- drivers/net/wireless/ath/ath9k/mac.c | 14 +-- drivers/net/wireless/ath/ath9k/mac.h | 2 +- drivers/net/wireless/ath/ath9k/recv.c | 8 +- drivers/net/wireless/ath/carl9170/rx.c | 8 +- drivers/net/wireless/ath/wcn36xx/txrx.c | 2 +- drivers/net/wireless/broadcom/b43/xmit.c | 2 +- .../wireless/broadcom/brcm80211/brcmsmac/main.c | 10 +- drivers/net/wireless/intel/iwlegacy/3945.c | 2 +- drivers/net/wireless/intel/iwlegacy/4965-mac.c | 8 +- drivers/net/wireless/intel/iwlwifi/dvm/rx.c | 10 +- drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 24 ++--- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 24 ++--- drivers/net/wireless/intersil/p54/txrx.c | 2 +- drivers/net/wireless/mac80211_hwsim.c | 8 +- drivers/net/wireless/marvell/mwl8k.c | 16 +-- drivers/net/wireless/mediatek/mt7601u/mac.c | 12 +-- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 4 +- drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 3 +- drivers/net/wireless/ralink/rt2x00/rt2x00queue.h | 1 + drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c | 2 +- drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 2 +- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 10 +- .../net/wireless/realtek/rtlwifi/rtl8188ee/trx.c | 4 +- .../net/wireless/realtek/rtlwifi/rtl8192ce/trx.c | 4 +- .../net/wireless/realtek/rtlwifi/rtl8192cu/trx.c | 8 +- .../net/wireless/realtek/rtlwifi/rtl8192de/trx.c | 4 +- .../net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 4 +- .../net/wireless/realtek/rtlwifi/rtl8192se/trx.c | 4 +- .../net/wireless/realtek/rtlwifi/rtl8723ae/trx.c | 4 +- .../net/wireless/realtek/rtlwifi/rtl8723be/trx.c | 4 +- .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.c | 10 +- drivers/net/wireless/st/cw1200/txrx.c | 2 +- drivers/net/wireless/ti/wl1251/rx.c | 2 +- drivers/net/wireless/ti/wlcore/rx.c | 2 +- include/net/mac80211.h | 108 ++++++++++----------- net/mac80211/ibss.c | 4 +- net/mac80211/ieee80211_i.h | 2 +- net/mac80211/rx.c | 58 +++++------ net/mac80211/scan.c | 8 +- net/mac80211/sta_info.h | 16 +-- net/mac80211/util.c | 22 ++--- 47 files changed, 261 insertions(+), 262 deletions(-) commit b86c86aa9805b25ee70071d084e618b2c40641b5 Author: Dan Carpenter Date: Wed Apr 26 22:08:15 2017 +0300 gpio: f7188x: Add a missing break A break statement was obviously intended here. Fixes: d69843e416d3 ("gpio: f7188x: Add F71889A GPIO support.") Signed-off-by: Dan Carpenter Signed-off-by: Linus Walleij drivers/gpio/gpio-f7188x.c | 1 + 1 file changed, 1 insertion(+) commit 7b4ccb3c466f62bbf2f4dd5d6a143d945a6f3051 Author: Geert Uytterhoeven Date: Tue Apr 25 19:36:25 2017 +0200 soc: renesas: Provide dummy rcar_rst_read_mode_pins() for compile-testing If the R-Car RST driver is not included, compile-testing R-Car clock drivers fails with a link error: undefined reference to `rcar_rst_read_mode_pins' To fix this, provide a dummy version. Use the exact same test logic as in drivers/soc/renesas/Makefile, as there is no Kconfig symbol (yet) to control compilation of the R-Car RST driver. Fixes: 527c02f66d263d2e ("soc: renesas: Add R-Car RST driver") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman include/linux/soc/renesas/rcar-rst.h | 5 +++++ 1 file changed, 5 insertions(+) commit 1aa2faf52f76d49669f6613b9521618ab2bc63b2 Author: Sean Wang Date: Wed Apr 26 17:25:45 2017 +0800 pinctrl: mediatek: Add missing pinctrl bindings for mt7623 Add missing pinctrl binding these which would be used in devicetree related files. Signed-off-by: Sean Wang Signed-off-by: Linus Walleij include/dt-bindings/pinctrl/mt7623-pinfunc.h | 30 ++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) commit 83977443938122baeed28dc9f078db3da9855f7c Author: David Rivshin Date: Mon Apr 24 18:56:50 2017 -0400 gpio: omap: return error if requested debounce time is not possible omap_gpio_debounce() does not validate that the requested debounce is within a range it can handle. Instead it lets the register value wrap silently, and always returns success. This can lead to all sorts of unexpected behavior, such as gpio_keys asking for a too-long debounce, but getting a very short debounce in practice. Fix this by returning -EINVAL if the requested value does not fit into the register field. If there is no debounce clock available at all, return -ENOTSUPP. Fixes: e85ec6c3047b ("gpio: omap: fix omap2_set_gpio_debounce") Cc: # 4.3+ Signed-off-by: David Rivshin Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 9384793036afb7529c1c564e839ef4356271d68e Author: Marek Vasut Date: Tue Apr 25 20:32:09 2017 +0200 gpio: Add ROHM BD9571MWV-M PMIC GPIO driver Add driver for the GPIO block in the ROHM BD9571MWV-W MFD PMIC. This block is pretty trivial and supports setting GPIO direction as Input/Output and in case of Output, supports setting value. Signed-off-by: Marek Vasut Cc: linux-gpio@vger.kernel.org Cc: Geert Uytterhoeven Cc: Linus Walleij Reviewed-by: Linus Walleij Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 11 ++++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-bd9571mwv.c | 144 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 156 insertions(+) commit c312c2c333b88145b3073cf5acd8362af3f0cc6e Author: Wei Yongjun Date: Tue Apr 25 11:29:30 2017 +0000 pinctrl: artpec6: Fix return value check in artpec6_pmx_probe() In case of error, the function pinctrl_register() returns ERR_PTR() not NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun Acked-by: Jesper Nilsson Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-artpec6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 881ebd229f4a5ea88f269c1225245e50db9ba303 Author: Kuppuswamy Sathyanarayanan Date: Mon Apr 24 12:15:04 2017 -0700 gpio: gpio-wcove: fix GPIO IRQ status mask According to Whiskey Cove PMIC spec, bit 7 of GPIOIRQ0_REG belongs to battery IO. So we should skip this bit when checking for GPIO IRQ pending status. Otherwise, wcove_gpio_irq_handler() might go into the infinite loop until IRQ "pending" status becomes 0. This patch fixes this issue. Signed-off-by: Kuppuswamy Sathyanarayanan Acked-by: Mika Westerberg Acked-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-wcove.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit da63b6b20077469bd6bd96e07991ce145fc4fbc4 Author: Baoquan He Date: Thu Apr 27 15:42:20 2017 +0800 x86/KASLR: Fix kexec kernel boot crash when KASLR randomization fails Dave found that a kdump kernel with KASLR enabled will reset to the BIOS immediately if physical randomization failed to find a new position for the kernel. A kernel with the 'nokaslr' option works in this case. The reason is that KASLR will install a new page table for the identity mapping, while it missed building it for the original kernel location if KASLR physical randomization fails. This only happens in the kexec/kdump kernel, because the identity mapping has been built for kexec/kdump in the 1st kernel for the whole memory by calling init_pgtable(). Here if physical randomizaiton fails, it won't build the identity mapping for the original area of the kernel but change to a new page table '_pgtable'. Then the kernel will triple fault immediately caused by no identity mappings. The normal kernel won't see this bug, because it comes here via startup_32() and CR3 will be set to _pgtable already. In startup_32() the identity mapping is built for the 0~4G area. In KASLR we just append to the existing area instead of entirely overwriting it for on-demand identity mapping building. So the identity mapping for the original area of kernel is still there. To fix it we just switch to the new identity mapping page table when physical KASLR succeeds. Otherwise we keep the old page table unchanged just like "nokaslr" does. Signed-off-by: Baoquan He Signed-off-by: Dave Young Acked-by: Kees Cook Cc: Borislav Petkov Cc: Dave Jiang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Garnier Cc: Thomas Gleixner Cc: Yinghai Lu Link: http://lkml.kernel.org/r/1493278940-5885-1-git-send-email-bhe@redhat.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/kaslr.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 3a7d2fd16c57a1ef47dc2891171514231c9c7c6e Author: Kees Cook Date: Thu Apr 27 15:53:21 2017 -0700 pstore: Solve lockdep warning by moving inode locks Lockdep complains about a possible deadlock between mount and unlink (which is technically impossible), but fixing this improves possible future multiple-backend support, and keeps locking in the right order. The lockdep warning could be triggered by unlinking a file in the pstore filesystem: -> #1 (&sb->s_type->i_mutex_key#14){++++++}: lock_acquire+0xc9/0x220 down_write+0x3f/0x70 pstore_mkfile+0x1f4/0x460 pstore_get_records+0x17a/0x320 pstore_fill_super+0xa4/0xc0 mount_single+0x89/0xb0 pstore_mount+0x13/0x20 mount_fs+0xf/0x90 vfs_kern_mount+0x66/0x170 do_mount+0x190/0xd50 SyS_mount+0x90/0xd0 entry_SYSCALL_64_fastpath+0x1c/0xb1 -> #0 (&psinfo->read_mutex){+.+.+.}: __lock_acquire+0x1ac0/0x1bb0 lock_acquire+0xc9/0x220 __mutex_lock+0x6e/0x990 mutex_lock_nested+0x16/0x20 pstore_unlink+0x3f/0xa0 vfs_unlink+0xb5/0x190 do_unlinkat+0x24c/0x2a0 SyS_unlinkat+0x16/0x30 entry_SYSCALL_64_fastpath+0x1c/0xb1 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sb->s_type->i_mutex_key#14); lock(&psinfo->read_mutex); lock(&sb->s_type->i_mutex_key#14); lock(&psinfo->read_mutex); Reported-by: Marta Lofstedt Reported-by: Chris Wilson Signed-off-by: Kees Cook Acked-by: Namhyung Kim fs/pstore/inode.c | 37 +++++++++++++++++++++++++++---------- fs/pstore/internal.h | 5 ++++- fs/pstore/platform.c | 10 +++++----- 3 files changed, 36 insertions(+), 16 deletions(-) commit a37c45cd82e62a361706b9688a984a3a63957321 Author: Michael Davidson Date: Tue Apr 25 15:47:35 2017 -0700 kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS The Linux Kernel relies on GCC's acceptance of inline assembly as an opaque object which will not have any validation performed on the content. The current behaviour in LLVM is to perform validation of the contents by means of parsing the input if the MC layer can handle it. Disable clangs integrated assembler and use the GNU assembler instead. Wording-mostly-from: Saleem Abdulrasool Signed-off-by: Michael Davidson Signed-off-by: Matthias Kaehlcke Signed-off-by: Masahiro Yamada Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 81d0848fc8d2058c4cc645d971435c889869433b Author: Frank Rowand Date: Tue Apr 25 17:09:54 2017 -0700 of: Add unit tests for applying overlays Existing overlay unit tests examine individual pieces of the overlay code. The new tests target the entire process of applying an overlay. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/fdt.c | 14 +- drivers/of/of_private.h | 12 + drivers/of/unittest-data/Makefile | 17 +- drivers/of/unittest-data/overlay.dts | 53 ++++ drivers/of/unittest-data/overlay_bad_phandle.dts | 20 ++ drivers/of/unittest-data/overlay_base.dts | 80 ++++++ drivers/of/unittest.c | 317 +++++++++++++++++++++++ 7 files changed, 505 insertions(+), 8 deletions(-) commit 331f741679564720a49ccf355012e1a8a45686ec Author: Frank Rowand Date: Tue Apr 25 17:09:53 2017 -0700 of: per-file dtc compiler flags The dtc compiler version that adds initial support was available in 4.11-rc1. Add the ability to set an additional dtc compiler flag is needed by overlays. Signed-off-by: Frank Rowand Acked-by: Masahiro Yamada Signed-off-by: Rob Herring scripts/Makefile.lib | 2 ++ 1 file changed, 2 insertions(+) commit fb7dcf723dd2cb1d5d8f2f49c3023130938848e3 Merge: db4b0df 5af5099 Author: Paul Mackerras Date: Fri Apr 28 08:23:16 2017 +1000 Merge remote-tracking branch 'remotes/powerpc/topic/xive' into kvm-ppc-next This merges in the powerpc topic/xive branch to bring in the code for the in-kernel XICS interrupt controller emulation to use the new XIVE (eXternal Interrupt Virtualization Engine) hardware in the POWER9 chip directly, rather than via a XICS emulation in firmware. Signed-off-by: Paul Mackerras commit db4b0dfab7b016f5514442046d86a9727ee87f12 Author: Denis Kirjanov Date: Wed Mar 29 06:55:37 2017 -0400 KVM: PPC: Book3S HV: Avoid preemptibility warning in module initialization With CONFIG_DEBUG_PREEMPT, get_paca() produces the following warning in kvmppc_book3s_init_hv() since it calls debug_smp_processor_id(). There is no real issue with the xics_phys field. If paca->kvm_hstate.xics_phys is non-zero on one cpu, it will be non-zero on them all. Therefore this is not fixing any actual problem, just the warning. [ 138.521188] BUG: using smp_processor_id() in preemptible [00000000] code: modprobe/5596 [ 138.521308] caller is .kvmppc_book3s_init_hv+0x184/0x350 [kvm_hv] [ 138.521404] CPU: 5 PID: 5596 Comm: modprobe Not tainted 4.11.0-rc3-00022-gc7e790c #1 [ 138.521509] Call Trace: [ 138.521563] [c0000007d018b810] [c0000000023eef10] .dump_stack+0xe4/0x150 (unreliable) [ 138.521694] [c0000007d018b8a0] [c000000001f6ec04] .check_preemption_disabled+0x134/0x150 [ 138.521829] [c0000007d018b940] [d00000000a010274] .kvmppc_book3s_init_hv+0x184/0x350 [kvm_hv] [ 138.521963] [c0000007d018ba00] [c00000000191d5cc] .do_one_initcall+0x5c/0x1c0 [ 138.522082] [c0000007d018bad0] [c0000000023e9494] .do_init_module+0x84/0x240 [ 138.522201] [c0000007d018bb70] [c000000001aade18] .load_module+0x1f68/0x2a10 [ 138.522319] [c0000007d018bd20] [c000000001aaeb30] .SyS_finit_module+0xc0/0xf0 [ 138.522439] [c0000007d018be30] [c00000000191baec] system_call+0x38/0xfc Signed-off-by: Denis Kirjanov Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed6473ddc704a2005b9900ca08e236ebb2d8540a Author: Trond Myklebust Date: Wed Apr 26 11:55:27 2017 -0400 NFSv4: Fix callback server shutdown We want to use kthread_stop() in order to ensure the threads are shut down before we tear down the nfs_callback_info in nfs_callback_down. Tested-and-reviewed-by: Kinglong Mee Reported-by: Kinglong Mee Fixes: bb6aeba736ba9 ("NFSv4.x: Switch to using svc_set_num_threads()...") Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields fs/nfs/callback.c | 24 ++++++++++++++++-------- include/linux/sunrpc/svc.h | 1 + net/sunrpc/svc.c | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 8 deletions(-) commit 9e0d87680d689f1758185851c3da6eafb16e71e1 Author: Trond Myklebust Date: Wed Apr 26 11:55:26 2017 -0400 SUNRPC: Refactor svc_set_num_threads() Refactor to separate out the functions of starting and stopping threads so that they can be used in other helpers. Signed-off-by: Trond Myklebust Tested-and-reviewed-by: Kinglong Mee Signed-off-by: J. Bruce Fields net/sunrpc/svc.c | 96 ++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 58 insertions(+), 38 deletions(-) commit df807fffaabde625fa9adb82e3e5b88cdaa5709a Author: Kinglong Mee Date: Thu Apr 27 11:13:38 2017 +0800 NFSv4.x/callback: Create the callback service through svc_create_pooled As the comments for svc_set_num_threads() said, " Destroying threads relies on the service threads filling in rqstp->rq_task, which only the nfs ones do. Assumes the serv has been created using svc_create_pooled()." If creating service through svc_create(), the svc_pool_map_put() will be called in svc_destroy(), but the pool map isn't used. So that, the reference of pool map will be drop, the next using of pool map will get a zero npools. [ 137.992130] divide error: 0000 [#1] SMP [ 137.992148] Modules linked in: nfsd(E) nfsv4 nfs fscache fuse tun bridge stp llc ip_set nfnetlink vmw_vsock_vmci_transport vsock snd_seq_midi snd_seq_midi_event vmw_balloon coretemp crct10dif_pclmul crc32_pclmul ppdev ghash_clmulni_intel intel_rapl_perf joydev snd_ens1371 gameport snd_ac97_codec ac97_bus snd_seq snd_pcm snd_rawmidi snd_timer snd_seq_device snd soundcore parport_pc parport nfit acpi_cpufreq tpm_tis tpm_tis_core tpm vmw_vmci i2c_piix4 shpchp auth_rpcgss nfs_acl lockd(E) grace sunrpc(E) xfs libcrc32c vmwgfx drm_kms_helper ttm crc32c_intel drm e1000 mptspi scsi_transport_spi serio_raw mptscsih mptbase ata_generic pata_acpi [last unloaded: nfsd] [ 137.992336] CPU: 0 PID: 4514 Comm: rpc.nfsd Tainted: G E 4.11.0-rc8+ #536 [ 137.992777] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/02/2015 [ 137.993757] task: ffff955984101d00 task.stack: ffff9873c2604000 [ 137.994231] RIP: 0010:svc_pool_for_cpu+0x2b/0x80 [sunrpc] [ 137.994768] RSP: 0018:ffff9873c2607c18 EFLAGS: 00010246 [ 137.995227] RAX: 0000000000000000 RBX: ffff95598376f000 RCX: 0000000000000002 [ 137.995673] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff9559944aec00 [ 137.996156] RBP: ffff9873c2607c18 R08: ffff9559944aec28 R09: 0000000000000000 [ 137.996609] R10: 0000000001080002 R11: 0000000000000000 R12: ffff95598376f010 [ 137.997063] R13: ffff95598376f018 R14: ffff9559944aec28 R15: ffff9559944aec00 [ 137.997584] FS: 00007f755529eb40(0000) GS:ffff9559bb600000(0000) knlGS:0000000000000000 [ 137.998048] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 137.998548] CR2: 000055f3aecd9660 CR3: 0000000084290000 CR4: 00000000001406f0 [ 137.999052] Call Trace: [ 137.999517] svc_xprt_do_enqueue+0xef/0x260 [sunrpc] [ 138.000028] svc_xprt_received+0x47/0x90 [sunrpc] [ 138.000487] svc_add_new_perm_xprt+0x76/0x90 [sunrpc] [ 138.000981] svc_addsock+0x14b/0x200 [sunrpc] [ 138.001424] ? recalc_sigpending+0x1b/0x50 [ 138.001860] ? __getnstimeofday64+0x41/0xd0 [ 138.002346] ? do_gettimeofday+0x29/0x90 [ 138.002779] write_ports+0x255/0x2c0 [nfsd] [ 138.003202] ? _copy_from_user+0x4e/0x80 [ 138.003676] ? write_recoverydir+0x100/0x100 [nfsd] [ 138.004098] nfsctl_transaction_write+0x48/0x80 [nfsd] [ 138.004544] __vfs_write+0x37/0x160 [ 138.004982] ? selinux_file_permission+0xd7/0x110 [ 138.005401] ? security_file_permission+0x3b/0xc0 [ 138.005865] vfs_write+0xb5/0x1a0 [ 138.006267] SyS_write+0x55/0xc0 [ 138.006654] entry_SYSCALL_64_fastpath+0x1a/0xa9 [ 138.007071] RIP: 0033:0x7f7554b9dc30 [ 138.007437] RSP: 002b:00007ffc9f92c788 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 138.007807] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f7554b9dc30 [ 138.008168] RDX: 0000000000000002 RSI: 00005640cd536640 RDI: 0000000000000003 [ 138.008573] RBP: 00007ffc9f92c780 R08: 0000000000000001 R09: 0000000000000002 [ 138.008918] R10: 0000000000000064 R11: 0000000000000246 R12: 0000000000000004 [ 138.009254] R13: 00005640cdbf77a0 R14: 00005640cdbf7720 R15: 00007ffc9f92c238 [ 138.009610] Code: 0f 1f 44 00 00 48 8b 87 98 00 00 00 55 48 89 e5 48 83 78 08 00 74 10 8b 05 07 42 02 00 83 f8 01 74 40 83 f8 02 74 19 31 c0 31 d2 b7 88 00 00 00 5d 89 d0 48 c1 e0 07 48 03 87 90 00 00 00 c3 [ 138.010664] RIP: svc_pool_for_cpu+0x2b/0x80 [sunrpc] RSP: ffff9873c2607c18 [ 138.011061] ---[ end trace b3468224cafa7d11 ]--- Signed-off-by: Kinglong Mee Signed-off-by: J. Bruce Fields fs/nfs/callback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bb0e9cb04c82d6bf0e72f3207307d621083b801 Author: Stan Drozd Date: Fri Apr 21 13:16:03 2017 +0200 docs: Fix a couple typos This commit gets rid of some minor errors in Documentation/: * cputopology.txt: drawes -> drawers * debugging-via-ohci1394.txt: remove an unnecessary line break * static-keys: statemnts -> statements * zorro.txt: busses -> buses Signed-off-by: Stan Drozd Signed-off-by: Jonathan Corbet Documentation/cputopology.txt | 2 +- Documentation/debugging-via-ohci1394.txt | 4 ++-- Documentation/static-keys.txt | 2 +- Documentation/zorro.txt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 1c4f128ed1cbadcfcb3c2d654b39268d592f716f Author: Stan Drozd Date: Fri Apr 21 13:07:10 2017 +0200 docs: Fix a spelling error in vfio-mediated-device.txt This commit fixes a repeated "the" in vfio-mediated-device.txt and reflows the paragraph. Signed-off-by: Stan Drozd Signed-off-by: Jonathan Corbet Documentation/vfio-mediated-device.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e884dbcb3c8cc829ca434248ea0aeb5c4198eef3 Author: Stan Drozd Date: Fri Apr 21 12:58:52 2017 +0200 docs: Fix a spelling error in ioctl-number.txt This commit fixes a misspelled header name in the ioctl numbers list Signed-off-by: Stan Drozd Signed-off-by: Jonathan Corbet Documentation/ioctl/ioctl-number.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83e676c90134106106c251a13dff3209ae46f8ed Author: Tobias Klauser Date: Fri Apr 21 15:59:04 2017 +0200 MAINTAINERS: update file entry for HSI subsystem The HSI documentation was moved into Documentation/driver-api/hsi.rst in commit 5e995786850e ("docs: split up serial-interfaces.rst"). Update the corresponding file entry in MAINTAINERS. Signed-off-by: Tobias Klauser Signed-off-by: Jonathan Corbet MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 041939c1ec54208b42f5cd819209173d52a29d34 Author: Ankit Kumar Date: Thu Apr 27 17:03:13 2017 +0530 pstore: Fix flags to enable dumps on powerpc After commit c950fd6f201a kernel registers pstore write based on flag set. Pstore write for powerpc is broken as flags(PSTORE_FLAGS_DMESG) is not set for powerpc architecture. On panic, kernel doesn't write message to /fs/pstore/dmesg*(Entry doesn't gets created at all). This patch enables pstore write for powerpc architecture by setting PSTORE_FLAGS_DMESG flag. Fixes: c950fd6f201a ("pstore: Split pstore fragile flags") Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Ankit Kumar Signed-off-by: Kees Cook arch/powerpc/kernel/nvram_64.c | 1 + 1 file changed, 1 insertion(+) commit 3509d048c8a813a8f903ffd5f8dc5ca66e3d8716 Author: Geliang Tang Date: Thu Mar 23 21:15:13 2017 +0800 pstore: Remove unused vmalloc.h in pmsg Since the vmalloc code has been removed from write_pmsg() in the commit "5bf6d1b pstore/pmsg: drop bounce buffer", remove the unused header vmalloc.h. Signed-off-by: Geliang Tang Signed-off-by: Kees Cook fs/pstore/pmsg.c | 1 - 1 file changed, 1 deletion(-) commit e221c1f0fe2590042b4f8c3a8ccccd8e7bed2c31 Merge: 899dc83 47d272f Author: David S. Miller Date: Thu Apr 27 17:15:54 2017 -0400 Merge tag 'wireless-drivers-next-for-davem-2017-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.12 Few remaining patches for 4.12 submitted during the last week. Major changes: iwlwifi * the firmware for 7265D and 3168 NICs is frozen at version 29 * more support for the upcoming A000 series ==================== Signed-off-by: David S. Miller commit bce19f9d232b71c4eef9ca7d0947035bbb922cef Merge: c2a9c7a a7e3b97 Author: Chris Mason Date: Thu Apr 27 14:13:09 2017 -0700 Merge branch 'for-chris-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux into for-linus-4.12 commit 86331f39a5935b092d3ea59446d416563ed05d16 Author: Bart Van Assche Date: Thu Apr 27 10:11:26 2017 -0700 dm mpath: make it easier to detect unintended I/O request flushes I/O errors triggered by multipathd incorrectly not enabling the no-flush flag for DM_DEVICE_SUSPEND or DM_DEVICE_RESUME are hard to debug. Add more logging to make it easier to debug this. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 25 +++++++++++++++++++++---- drivers/md/dm.c | 2 ++ 2 files changed, 23 insertions(+), 4 deletions(-) commit 9a8ac3ae682e8760afebab71556a9a8d1b18f906 Author: Bart Van Assche Date: Thu Apr 27 10:11:25 2017 -0700 dm mpath: cleanup QUEUE_IF_NO_PATH bit manipulation by introducing assign_bit() No functional change but makes the code easier to read. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) commit ca5beb76c32af33e5be4e01c85c8bd5a067c4543 Author: Bart Van Assche Date: Thu Apr 27 10:11:24 2017 -0700 dm mpath: micro-optimize the hot path relative to MPATHF_QUEUE_IF_NO_PATH Instead of checking MPATHF_QUEUE_IF_NO_PATH, MPATHF_SAVED_QUEUE_IF_NO_PATH and the no_flush flag to decide whether or not to push back a request (or bio) if there are no paths available, only clear MPATHF_QUEUE_IF_NO_PATH in queue_if_no_path() if no_flush has not been set. The result is that only a single bit has to be tested in the hot path to decide whether or not a request must be pushed back and also that m->lock does not have to be taken in the hot path. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 70 ++++++++------------------------------------------- 1 file changed, 11 insertions(+), 59 deletions(-) commit 7e0d574f2683a2346c978613a72ff07afc89b17a Author: Bart Van Assche Date: Thu Apr 27 10:11:23 2017 -0700 dm: introduce enum dm_queue_mode to cleanup related code Introduce an enumeration type for the queue mode. This patch does not change any functionality but makes the DM code easier to read. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Mike Snitzer drivers/md/dm-core.h | 2 +- drivers/md/dm-ioctl.c | 2 +- drivers/md/dm-mpath.c | 5 ++++- drivers/md/dm-table.c | 14 +++++++------- drivers/md/dm.c | 11 +++++++---- drivers/md/dm.h | 8 ++++---- include/linux/device-mapper.h | 14 ++++++++------ 7 files changed, 32 insertions(+), 24 deletions(-) commit b194679fac3067e785f432109c69759aa75b038c Author: Bart Van Assche Date: Thu Apr 27 10:11:22 2017 -0700 dm mpath: verify __pg_init_all_paths locking assumptions at runtime Verify at runtime that __pg_init_all_paths() is called with multipath.lock held if lockdep is enabled. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 2 ++ 1 file changed, 2 insertions(+) commit 1ea0654e46eb62acc379000be2f16350101ebf85 Author: Bart Van Assche Date: Thu Apr 27 10:11:21 2017 -0700 dm: verify suspend_locking assumptions at runtime Ensure that the assumptions about the caller holding suspend_lock are checked at runtime if lockdep is enabled. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Mike Snitzer drivers/md/dm-table.c | 4 ++++ drivers/md/dm.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit 73cbca6a637eb88738ea5a5cd6a611bbbca8ac19 Author: Bart Van Assche Date: Thu Apr 27 10:11:20 2017 -0700 dm block manager: remove an unused argument from dm_block_manager_create() The 'cache_size' argument of dm_block_manager_create() has never been used. Remove it along with the definitions of the constants passed as the 'cache_size' argument. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Mike Snitzer drivers/md/dm-cache-metadata.c | 3 --- drivers/md/dm-era-target.c | 2 -- drivers/md/dm-thin-metadata.c | 2 -- drivers/md/persistent-data/dm-block-manager.c | 1 - drivers/md/persistent-data/dm-block-manager.h | 2 +- 5 files changed, 1 insertion(+), 9 deletions(-) commit 23a601248958fa4142d49294352fe8d1fdf3e509 Author: Bart Van Assche Date: Thu Apr 27 10:11:19 2017 -0700 dm rq: check blk_mq_register_dev() return value in dm_mq_init_request_queue() Otherwise the request-based DM blk-mq request_queue will be put into service without being properly exported via sysfs. Cc: stable@vger.kernel.org Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Signed-off-by: Mike Snitzer drivers/md/dm-rq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit c1d7ecf7ca11d0edd3085262c8597203440d056c Author: Bart Van Assche Date: Thu Apr 27 10:11:16 2017 -0700 dm mpath: delay requeuing while path initialization is in progress Requeuing a request immediately while path initialization is ongoing causes high CPU usage, something that is undesired. Hence delay requeuing while path initialization is in progress. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Cc: Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 7083abbbfc4fa706ff72d27d33a5214881979336 Author: Bart Van Assche Date: Thu Apr 27 10:11:15 2017 -0700 dm mpath: avoid that path removal can trigger an infinite loop If blk_get_request() fails, check whether the failure is due to a path being removed. If that is the case, fail the path by triggering a call to fail_path(). This avoids that the following scenario can be encountered while removing paths: * CPU usage of a kworker thread jumps to 100%. * Removing the DM device becomes impossible. Delay requeueing if blk_get_request() returns -EBUSY or -EWOULDBLOCK, and the queue is not dying, because in these cases immediate requeuing is inappropriate. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 43ac9b84a399bc10210a2d9f4e0778b7c6059c07 Author: Xiao Ni Date: Thu Apr 27 16:28:49 2017 +0800 md/raid1: Use a new variable to count flighting sync requests In new barrier codes, raise_barrier waits if conf->nr_pending[idx] is not zero. After all the conditions are true, the resync request can go on be handled. But it adds conf->nr_pending[idx] again. The next resync request hit the same bucket idx need to wait the resync request which is submitted before. The performance of resync/recovery is degraded. So we should use a new variable to count sync requests which are in flight. I did a simple test: 1. Without the patch, create a raid1 with two disks. The resync speed: Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util sdb 0.00 0.00 166.00 0.00 10.38 0.00 128.00 0.03 0.20 0.20 0.00 0.19 3.20 sdc 0.00 0.00 0.00 166.00 0.00 10.38 128.00 0.96 5.77 0.00 5.77 5.75 95.50 2. With the patch, the result is: sdb 2214.00 0.00 766.00 0.00 185.69 0.00 496.46 2.80 3.66 3.66 0.00 1.03 79.10 sdc 0.00 2205.00 0.00 769.00 0.00 186.44 496.52 5.25 6.84 0.00 6.84 1.30 100.10 Suggested-by: Shaohua Li Signed-off-by: Xiao Ni Acked-by: Coly Li Signed-off-by: Shaohua Li drivers/md/raid1.c | 7 ++++--- drivers/md/raid1.h | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) commit 89bfce763e43fa4897e0d3af6b29ed909df64cfd Author: Bart Van Assche Date: Thu Apr 27 10:11:14 2017 -0700 dm mpath: split and rename activate_path() to prepare for its expanded use activate_path() is renamed to activate_path_work() which now calls activate_or_offline_path(). activate_or_offline_path() will be used by the next commit. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 899dc833f09e5dae3288e6908d6eea1759b2eb50 Merge: 26d31ac d179bd1 Author: David S. Miller Date: Thu Apr 27 16:51:35 2017 -0400 Merge branch 'qed-ptp-enhancements' Sudarsana Reddy Kalluru says: ==================== qed*: PTP enhancements. The patch series contains set of enhancements for qed/qede ptp implementation. Patches (1)-(3) adds resource locking implementation to allow PTP functionality only on the first detected ethernet PF of the port. The change is required as the adapter currently supports only one instance of the PTP client on a given port. Patch (4) removes the un-needed header file. Patch (5) moves the ptt-lock get/release logic to the ptp specific code. Please consider applying this series to "net-next" branch. ==================== Signed-off-by: David S. Miller commit d179bd1699fccd9d5b9bc38470bab7343a441ea0 Author: sudarsana.kalluru@cavium.com Date: Wed Apr 26 09:00:53 2017 -0700 qed: Acquire/release ptt_ptp lock when enabling/disabling PTP. Move the code for acquiring/releasing ptt_ptp lock to ptp specific implementations i.e., ptp_enable()/disable() respectively. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 7 +++++-- drivers/net/ethernet/qlogic/qed/qed_main.c | 12 ------------ drivers/net/ethernet/qlogic/qed/qed_ptp.c | 15 ++++++++++++++- 3 files changed, 19 insertions(+), 15 deletions(-) commit 6a3ff0db13110fad9ecaf9554e0a1f93c5d7b774 Author: sudarsana.kalluru@cavium.com Date: Wed Apr 26 09:00:52 2017 -0700 qed: Remove the un-needed ptp header file. The patch deletes the qed_ptp.h file which is not required. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ptp.c | 1 - drivers/net/ethernet/qlogic/qed/qed_ptp.h | 47 ------------------------------- 2 files changed, 48 deletions(-) commit 035744975aecf9b8e02920d93027a432c51062d1 Author: sudarsana.kalluru@cavium.com Date: Wed Apr 26 09:00:51 2017 -0700 qede: Add support for PTP resource locking. The patch adds necessary changes to the driver to use qed resource locking functionality. Currently the ptp initialization is spread between driver probe/open implementations, associated APIs are qede_ptp_register_phc()/qede_ptp_start(). Clubbed this functionality into single API qed_ptp_enable() to simplify the usage of qed resource locking implementation. The new API will be invoked in the probe path. Similarly the ptp clean-up code is moved to qede_ptp_disable() which gets invoked in the driver unload path. 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 | 18 +--- drivers/net/ethernet/qlogic/qede/qede_ptp.c | 150 +++++++++++++-------------- drivers/net/ethernet/qlogic/qede/qede_ptp.h | 6 +- 3 files changed, 75 insertions(+), 99 deletions(-) commit db82f70e4c3e0901ba1e5c0eecbd913133261985 Author: sudarsana.kalluru@cavium.com Date: Wed Apr 26 09:00:50 2017 -0700 qed: Add support for PTP resource locking. The patch adds support for per-port resource lock in favour of PTP. PTP module acquires/releases the MFW resource lock while enabling/ disabling the PTP on the interface. The PF instance which has the ownership of this resource lock will get the exclusive access to the PTP clock functionality on the port. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 1 + drivers/net/ethernet/qlogic/qed/qed_dev.c | 14 +++++ drivers/net/ethernet/qlogic/qed/qed_mcp.h | 4 ++ drivers/net/ethernet/qlogic/qed/qed_ptp.c | 87 +++++++++++++++++++++++++++++++ 4 files changed, 106 insertions(+) commit f470f22cfa3d42f357ed404a06ec77aa09ddb05b Author: sudarsana.kalluru@cavium.com Date: Wed Apr 26 09:00:49 2017 -0700 qed: Add support for MFW resource locking. The patch adds API for default initialization of the MFW resource locking. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 12 ++---------- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 30 ++++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_mcp.h | 18 +++++++++++++++++- 3 files changed, 49 insertions(+), 11 deletions(-) commit 97681f9b086ac4009ed914fdc56b0ebbfafe8b3d Author: Toshi Kani Date: Tue Apr 25 15:16:51 2017 -0600 libnvdimm: fix phys_addr for nvdimm_clear_poison nvdimm_clear_poison() expects a physical address, not an offset. Fix nsio_rw_bytes() to call nvdimm_clear_poison() with a physical address. Signed-off-by: Toshi Kani Cc: Dave Jiang Cc: Vishal Verma Reviewed-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/claim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 26d31ac11fa47a0ee8dc4c64136ea34feda57e3e Author: David Ahern Date: Wed Apr 26 07:58:22 2017 -0700 net: vrf: Do not allow looback to be moved to a VRF Moving the loopback into a VRF breaks networking for the default VRF. Since the VRF device is the loopback for VRF domains, there is no reason to move the loopback. Given the repercussions, block attempts to set lo into a VRF. Signed-off-by: David Ahern Reviewed-by: Greg Rose Signed-off-by: David S. Miller drivers/net/vrf.c | 6 ++++++ 1 file changed, 6 insertions(+) commit adeb45cbb5057731ce9c47aad93756135d7947bf Author: Wei Yongjun Date: Wed Apr 26 14:03:50 2017 +0000 fib_rules: fix error return code Fix to return error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Fixes: 622ec2c9d524 ("net: core: add UID to flows, rules, and routes") Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller net/core/fib_rules.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 99f906e9ad7b6e79ffeda30f45906a8448b9d6a2 Author: Mike Manning Date: Wed Apr 26 14:48:09 2017 +0100 bridge: add per-port broadcast flood flag Support for l2 multicast flood control was added in commit b6cb5ac8331b ("net: bridge: add per-port multicast flood flag"). It allows broadcast as it was introduced specifically for unknown multicast flood control. But as broadcast is a special case of multicast, this may also need to be disabled. For this purpose, introduce a flag to disable the flooding of received l2 broadcasts. This approach is backwards compatible and provides flexibility in filtering for the desired packet types. Cc: Nikolay Aleksandrov Signed-off-by: Mike Manning Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/if_bridge.h | 1 + include/uapi/linux/if_link.h | 1 + net/bridge/br_forward.c | 24 +++++++++++++++++------- net/bridge/br_if.c | 2 +- net/bridge/br_netlink.c | 3 +++ net/bridge/br_sysfs_if.c | 2 ++ 6 files changed, 25 insertions(+), 8 deletions(-) commit 06b4fc520d21b7a6327983d64373505859672e91 Author: Gao Feng Date: Wed Apr 26 19:04:04 2017 +0800 net: fib: Decrease one unnecessary rt cache flush in fib_disable_ip The func fib_flush already flushes the rt cache if necessary, so it is not necessary to invoke rt_cache_flush again in fib_disable_ip. Signed-off-by: Gao Feng Signed-off-by: David S. Miller net/ipv4/fib_frontend.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1514dc857f8ebbeb44da09236efa133ed6e15615 Author: Guillaume Nault Date: Wed Apr 26 11:54:47 2017 +0200 l2tp: remove useless device duplication test in l2tp_eth_create() There's no need to verify that cfg->ifname is unique at this point. register_netdev() will return -EEXIST if asked to create a device with a name that's alrealy in use. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_eth.c | 6 ------ 1 file changed, 6 deletions(-) commit 0575c86b5dd596253bdfc0365b570d67b1a12523 Author: Zhang Shengju Date: Wed Apr 26 17:49:38 2017 +0800 net: remove unnecessary carrier status check Since netif_carrier_on() will do nothing if device's carrier is already on, so it's unnecessary to do carrier status check. It's the same for netif_carrier_off(). Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller net/core/dev.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 8ecbc40ada116f2f7d6b61cd646802c87b7c5c7d Author: Zhang Shengju Date: Wed Apr 26 11:05:12 2017 +0800 net: update comment for netif_dormant() function This patch updates the comment for netif_dormant() function to reflect the intended usage. Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller include/linux/netdevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 900a9020af7a023f9b64c919fddf8a7486108962 Author: Arnd Bergmann Date: Tue Apr 18 15:55:51 2017 +0200 arm64: sunxi: always enable reset controller The sunxi clk driver causes a link error when the reset controller subsystem is disabled: drivers/clk/built-in.o: In function `sun4i_ve_clk_setup': :(.init.text+0xd040): undefined reference to `reset_controller_register' drivers/clk/built-in.o: In function `sun4i_a10_display_init': :(.init.text+0xe5e0): undefined reference to `reset_controller_register' drivers/clk/built-in.o: In function `sunxi_usb_clk_setup': :(.init.text+0x10074): undefined reference to `reset_controller_register' We already force it to be enabled on arm32 and some other arm64 platforms, but not on arm64/sunxi. This adds the respective Kconfig statements to also select it here. Signed-off-by: Arnd Bergmann Acked-by: Maxime Ripard arch/arm64/Kconfig.platforms | 2 ++ 1 file changed, 2 insertions(+) commit 3c0e3abd5ee59acbcbd5d8fc624eaf63f6e7b53c Author: Orson Zhai Date: Fri Apr 21 11:47:20 2017 +0800 arm64: dts: Add basic DT to support Spreadtrum's SP9860G SC9860G is a 8 cores of A53 SoC with 4G LTE support SoC from Spreadtrum. According to regular hierarchy of sprd dts, whale2.dtsi contains SoC peripherals IP nodes, sc9860.dtsi contains stuff related to ARM core stuff and sp9860g dts is for the board level. Signed-off-by: Orson Zhai Signed-off-by: Chunyan Zhang Reviewed-by: Mathieu Poirier Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/sprd/Makefile | 3 +- arch/arm64/boot/dts/sprd/sc9860.dtsi | 569 ++++++++++++++++++++++++++++++ arch/arm64/boot/dts/sprd/sp9860g-1h10.dts | 56 +++ arch/arm64/boot/dts/sprd/whale2.dtsi | 71 ++++ 4 files changed, 698 insertions(+), 1 deletion(-) commit b6942b68f85ed3161c91741791ec6f1779574919 Merge: d12523f 7574f67 Author: Arnd Bergmann Date: Thu Apr 27 21:49:14 2017 +0200 Merge branch 'for_4.12/soc-pmdomain-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/drivers Pull "Keystone mangled URLs fixed" from Santosh Shilimkar * 'for_4.12/soc-pmdomain-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: soc: pm-domain: Fix the mangled urls commit b9f34da74e1c4b5f2574333277cd8d8f53bad056 Merge: 6d14b5a 6a611d1 Author: Arnd Bergmann Date: Thu Apr 27 21:47:50 2017 +0200 Merge tag 'samsung-dt-4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Pull "Fix DTC warnings in Exynos ARMv7 Device Tree sources." from Krzysztof Kozłowski: * tag 'samsung-dt-4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Use - instead of @ for DT OPP entries commit 052bc8fc8f6de1d015ed7714a77ad65c9d9b2e4f Merge: ae706be 684c581 Author: Arnd Bergmann Date: Thu Apr 27 21:45:13 2017 +0200 Merge tag 'samsung-dt64-4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt64 Pull "Second update of Samsung DeviceTree ARM64 for v4.12" from Krzysztof Kozłowski: - Fix DTC warnings in Exynos ARM64 Device Tree sources. - Add panel node to TM2E board. * tag 'samsung-dt64-4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: Use - instead of @ for DT OPP entries arm64: dts: exynos: Add support for s6e3hf2 panel device on TM2e board commit ae706bebd6a172a6adf9f63d1a77b8ed49e998a6 Merge: d0815df f9936c4 Author: Arnd Bergmann Date: Thu Apr 27 21:43:42 2017 +0200 Merge tag 'juno-fixes-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/dt64 Pull "ARMv8 Juno DT fixes for v4.12" from Sudeep Holla: 1. Couple of fixes to remove device tree warnings introduced with recently added checks in DTC 2. Add information about L1 and L2 caches to Juno device trees as CCSIDR-based cacheinfo probing is now removed * tag 'juno-fixes-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: juno: add information about L1 and L2 caches arm64: dts: juno: fix few unit address format warnings arm64: dts: juno: fix PCI bus dtc warnings commit 6d14b5a0baa3f8e987a27762c60a2c7a7b31288c Merge: 28a59b6 e6a7efa Author: Arnd Bergmann Date: Thu Apr 27 21:40:15 2017 +0200 Merge tag 'vexpress-dt-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/dt Pull "ARMv7 VExpress DT fix for v4.12" from Sudeep Holla: A single fix to remove device tree warnings introduced with recently added checks in DTC * tag 'vexpress-dt-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: ARM: dts: vexpress: fix few unit address format warnings commit 36b5a5152119cd08760067ca31d8577de993c490 Author: Jose Abreu Date: Wed Feb 22 18:19:35 2017 +0000 arc: axs10x: Fix ARC PGU default clock frequency Default clock frequency for ARC PGU does not match any existing HDMI mode, instead the default value matches a DVI mode. Change the clock frequency to 74.25MHz so that it matches HDMI mode 1280x720@60Hz Signed-off-by: Jose Abreu Cc: Carlos Palminha Cc: Alexey Brodkin Cc: Rob Herring Cc: Vineet Gupta Cc: devicetree@vger.kernel.org Cc: linux-snps-arc@lists.infradead.org Cc: linux-kernel@vger.kernel.org Acked-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/boot/dts/axs10x_mb.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8581984ffd917736ab3630c0f07bb5b218411e3 Author: Jose Abreu Date: Wed Feb 22 18:19:34 2017 +0000 arc: axs10x: Add DT bindings for I2S audio playback This patch adds the necessary DT bindings to get HDMI audio output in ARC AXS10x SDP. The bindings for I2S controller were added as well as the bindings for simple audio card. Signed-off-by: Jose Abreu Cc: Carlos Palminha Cc: Alexey Brodkin Cc: Rob Herring Cc: Vineet Gupta Cc: devicetree@vger.kernel.org Cc: linux-snps-arc@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Vineet Gupta arch/arc/boot/dts/axs10x_mb.dtsi | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 4617f564c06117c7d1b611be49521a4430042287 Author: Adrian Salido Date: Thu Apr 27 10:32:55 2017 -0700 dm ioctl: prevent stack leak in dm ioctl call When calling a dm ioctl that doesn't process any data (IOCTL_FLAGS_NO_PARAMS), the contents of the data field in struct dm_ioctl are left initialized. Current code is incorrectly extending the size of data copied back to user, causing the contents of kernel stack to be leaked to user. Fix by only copying contents before data and allow the functions processing the ioctl to override. Cc: stable@vger.kernel.org Signed-off-by: Adrian Salido Reviewed-by: Alasdair G Kergon Signed-off-by: Mike Snitzer drivers/md/dm-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c3781951c9a155a56e5eed567349118374cc315 Author: Lukas Czerner Date: Thu Apr 27 08:59:36 2017 -0700 xfs: Allow user to kill fstrim process fstrim can take really long time on big, slow device or on file system with a lots of allocation groups. Currently there is no way for the user to cancell the operation. This patch makes it possible for the user to kill fstrim pocess by adding the check for fatal_signal_pending() in xfs_trim_extents(). Signed-off-by: Lukas Czerner Reported-by: Zdenek Kabelac Reviewed-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_discard.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit b06e13c38dbd5a03e945ce711f6909c91888f507 Merge: c35e30b 7569b90 Author: Jens Axboe Date: Thu Apr 27 11:33:01 2017 -0600 Merge branch 'nvme-4.12' of git://git.infradead.org/nvme into for-4.12/post-merge Christoph writes: "A couple more updates for 4.12. The biggest pile is fc and lpfc updates from James, but there are various small fixes and cleanups as well." Fixes up a few merge issues, and also a warning in lpfc_nvmet_rcv_unsol_abort() if CONFIG_NVME_TARGET_FC isn't enabled. Signed-off-by: Jens Axboe commit 3993f2cb983b2100409851f7b2abb21d685ea19c Author: David Ahern Date: Thu Apr 27 09:11:13 2017 -0700 samples/bpf: Add support for SKB_MODE to xdp1 and xdp_tx_iptunnel Add option to xdp1 and xdp_tx_iptunnel to insert xdp program in SKB_MODE: - update set_link_xdp_fd to take a flags argument that is added to the RTM_SETLINK message - Add -S option to xdp1 and xdp_tx_iptunnel user code. When passed in XDP_FLAGS_SKB_MODE is set in the flags arg passed to set_link_xdp_fd Signed-off-by: David Ahern Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/bpf_load.c | 19 +++++++++++++++--- samples/bpf/bpf_load.h | 2 +- samples/bpf/xdp1_user.c | 40 ++++++++++++++++++++++++++++++-------- samples/bpf/xdp_tx_iptunnel_user.c | 13 +++++++++---- 4 files changed, 58 insertions(+), 16 deletions(-) commit 63af8f7a8293b94787763c933abfd21ba852807f Author: Christoph Hellwig Date: Fri Apr 14 21:11:28 2017 +0200 ixgbe: Use pcie_flr() instead of duplicating it Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas Acked-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 84ff1bcc2e25f1ddf5b350c4fa718ca01fdd88e9 Author: Mikulas Patocka Date: Wed Apr 26 18:39:47 2017 -0400 dm integrity: use previously calculated log2 of sectors_per_block The log2 of sectors_per_block was already calculated, so we don't have to use the ilog2 function. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6625d903253eb6f003849823e22d7b8de5bfb5b2 Author: Mikulas Patocka Date: Thu Apr 27 11:49:33 2017 -0400 dm integrity: use hex2bin instead of open-coded variant Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit e944e03e336f7ffa02aabc71291933d93dcd077c Author: Andy Shevchenko Date: Thu Apr 27 16:52:04 2017 +0300 dm crypt: replace custom implementation of hex2bin() There is no need to have a duplication of the generic library, i.e. hex2bin(). Replace the open coded variant. Signed-off-by: Andy Shevchenko Tested-by: Milan Broz Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) commit 6d684e54690caef45cf14051ddeb7c71beeb681b Author: Herbert Xu Date: Thu Apr 27 13:44:51 2017 +0800 rhashtable: Cap total number of entries to 2^31 When max_size is not set or if it set to a sufficiently large value, the nelems counter can overflow. This would cause havoc with the automatic shrinking as it would then attempt to fit a huge number of entries into a tiny hash table. This patch fixes this by adding max_elems to struct rhashtable to cap the number of elements. This is set to 2^31 as nelems is not a precise count. This is sufficiently smaller than UINT_MAX that it should be safe. When max_size is set max_elems will be lowered to at most twice max_size as is the status quo. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller include/linux/rhashtable.h | 5 +++-- lib/rhashtable.c | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) commit 4b726e81dab2cefefd2c1cb00e3074ac0eec4b15 Author: Eric Dumazet Date: Wed Apr 26 21:10:55 2017 -0700 tcp: tcp_rack_reo_timeout() must update tp->tcp_mstamp I wrongly assumed tp->tcp_mstamp was up to date at the time tcp_rack_reo_timeout() was called. It is not true, since we only update tcp->tcp_mstamp when receiving a packet (as initially done in commit 69e996c58a35 ("tcp: add tp->tcp_mstamp field") tcp_rack_reo_timeout() being called by a timer and not an incoming packet, we need to refresh tp->tcp_mstamp Fixes: 7c1c7308592f ("tcp: do not pass timestamp to tcp_rack_detect_loss()") Signed-off-by: Eric Dumazet Cc: Soheil Hassas Yeganeh Cc: Neal Cardwell Cc: Yuchung Cheng Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_recovery.c | 1 + 1 file changed, 1 insertion(+) commit b5fe223a4bd0217a657ff084e48752c367a8a55f Author: Paul E. McKenney Date: Thu Apr 27 07:52:35 2017 -0700 srcu: Adjust default auto-expediting holdoff The default value for the kernel boot parameter srcutree.exp_holdoff is 50 microseconds, which is too long for good Tree SRCU performance (compared to Classic SRCU) on the workloads tested by Mike Galbraith. This commit therefore sets the default value to 25 microseconds, which shows excellent results in Mike's testing. Reported-by: Mike Galbraith Signed-off-by: Paul E. McKenney Tested-by: Mike Galbraith kernel/rcu/srcutree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c24a7be2110ddac2ab75abcded76c62dccb6b1f0 Merge: 70f3aac 1edb632 Author: Paolo Bonzini Date: Thu Apr 27 17:33:14 2017 +0200 Merge tag 'kvm-arm-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/ARM Changes for v4.12. Changes include: - Using the common sysreg definitions between KVM and arm64 - Improved hyp-stub implementation with support for kexec and kdump on the 32-bit side - Proper PMU exception handling - Performance improvements of our GIC handling - Support for irqchip in userspace with in-kernel arch-timers and PMU support - A fix for a race condition in our PSCI code Conflicts: Documentation/virtual/kvm/api.txt include/uapi/linux/kvm.h commit 275292d3a3d62670b1b13484707b74e5239b4bb0 Author: Matt Ranostay Date: Thu Apr 27 00:52:32 2017 -0700 iio: proximity: as3935: fix AS3935_INT mask AS3935 interrupt mask has been incorrect so valid lightning events would never trigger an buffer event. Also noise interrupt should be BIT(0). Fixes: 24ddb0e4bba4 ("iio: Add AS3935 lightning sensor support") CC: stable@vger.kernel.org Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/proximity/as3935.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 70f3aac964ae2bc9a0a1d5d65a62e258591ade18 Author: Jim Mattson Date: Wed Apr 26 08:53:46 2017 -0700 kvm: nVMX: Remove superfluous VMX instruction fault checks According to the Intel SDM, "Certain exceptions have priority over VM exits. These include invalid-opcode exceptions, faults based on privilege level*, and general-protection exceptions that are based on checking I/O permission bits in the task-state segment (TSS)." There is no need to check for faulting conditions that the hardware has already checked. * These include faults generated by attempts to execute, in virtual-8086 mode, privileged instructions that are not recognized in that mode. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 57 ++++++++++++++---------------------------------------- 1 file changed, 14 insertions(+), 43 deletions(-) commit 6ed071f051e12cf7baa1b69d3becb8f232fdfb7b Author: Ladi Prosek Date: Tue Apr 25 16:42:44 2017 +0200 KVM: x86: fix emulation of RSM and IRET instructions On AMD, the effect of set_nmi_mask called by emulate_iret_real and em_rsm on hflags is reverted later on in x86_emulate_instruction where hflags are overwritten with ctxt->emul_flags (the kvm_set_hflags call). This manifests as a hang when rebooting Windows VMs with QEMU, OVMF, and >1 vcpu. Instead of trying to merge ctxt->emul_flags into vcpu->arch.hflags after an instruction is emulated, this commit deletes emul_flags altogether and makes the emulator access vcpu->arch.hflags using two new accessors. This way all changes, on the emulator side as well as in functions called from the emulator and accessing vcpu state with emul_to_vcpu, are preserved. More details on the bug and its manifestation with Windows and OVMF: It's a KVM bug in the interaction between SMI/SMM and NMI, specific to AMD. I believe that the SMM part explains why we started seeing this only with OVMF. KVM masks and unmasks NMI when entering and leaving SMM. When KVM emulates the RSM instruction in em_rsm, the set_nmi_mask call doesn't stick because later on in x86_emulate_instruction we overwrite arch.hflags with ctxt->emul_flags, effectively reverting the effect of the set_nmi_mask call. The AMD-specific hflag of interest here is HF_NMI_MASK. When rebooting the system, Windows sends an NMI IPI to all but the current cpu to shut them down. Only after all of them are parked in HLT will the initiating cpu finish the restart. If NMI is masked, other cpus never get the memo and the initiating cpu spins forever, waiting for hal!HalpInterruptProcessorsStarted to drop. That's the symptom we observe. Fixes: a584539b24b8 ("KVM: x86: pass the whole hflags field to emulator and back") Signed-off-by: Ladi Prosek Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_emulate.h | 4 +++- arch/x86/kvm/emulate.c | 16 +++++++++------- arch/x86/kvm/x86.c | 15 ++++++++++++--- 3 files changed, 24 insertions(+), 11 deletions(-) commit 83896c68fd32895ba4ff685c4df9d1e794dfb4fe Author: Naresh Kamboju Date: Wed Apr 26 15:39:37 2017 +0530 selftests: create cpufreq kconfig fragments For the better test coverage of cpufreq driver code these extra configurations are needed. Enable cpufreq governors and stats. Signed-off-by: Naresh Kamboju Acked-by: Viresh Kumar Signed-off-by: Shuah Khan tools/testing/selftests/cpufreq/config | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit eebed11a3d6b013054b130665b48620a969062e9 Author: Shuah Khan Date: Fri Apr 21 16:26:16 2017 -0600 selftests: x86: override clean in lib.mk to fix warnings Add override with EXTRA_CLEAN for lib.mk clean to fix the following warnings from clean target run. Makefile:44: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean' Signed-off-by: Shuah Khan tools/testing/selftests/x86/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8ab02e0962bf91126797fefb9775dd1ffa54d29d Author: Shuah Khan Date: Fri Apr 21 16:25:25 2017 -0600 selftests: sync: override clean in lib.mk to fix warnings Add override with EXTRA_CLEAN for lib.mk clean to fix the following warnings from clean target run. Makefile:24: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean' Signed-off-by: Shuah Khan tools/testing/selftests/sync/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit de0c6742ffd89b48970fefc8ccf9f5ac43ba17c6 Author: Shuah Khan Date: Fri Apr 21 16:24:09 2017 -0600 selftests: splice: override clean in lib.mk to fix warnings Add override with EXTRA_CLEAN for lib.mk clean to fix the following warnings from clean target run. Makefile:8: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean' Signed-off-by: Shuah Khan tools/testing/selftests/splice/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 339318080b028fe347c279672da63c1cd5e52044 Author: Jens Axboe Date: Thu Apr 27 07:45:46 2017 -0600 blk-mq-sched: alloate reserved tags out of normal pool At least one driver, mtip32xx, has a hard coded dependency on the value of the reserved tag used for internal commands. While that should really be fixed up, for now let's ensure that we just bypass the scheduler tags an allocation marked as reserved. They are used for house keeping or error handling, so we can safely ignore them in the scheduler. Tested-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq-sched.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a4e84aae8139aca9fbfbced1f45c51ca81b57488 Author: Ming Lei Date: Thu Apr 27 07:45:18 2017 -0600 mtip32xx: use runtime tag to initialize command header mtip32xx supposes that 'request_idx' passed to .init_request() is tag of the request, and use that as request's tag to initialize command header. After MQ IO scheduler is in, request tag assigned isn't same with the request index anymore, so cause strange hardware failure on mtip32xx, even whole system panic is triggered. This patch fixes the issue by initializing command header via request's real tag. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) commit 7a97cec26b94c909f4cbad2dc3186af3e457a522 Author: Paolo Bonzini Date: Thu Apr 27 14:33:43 2017 +0200 KVM: mark requests that need synchronization kvm_make_all_requests() provides a synchronization that waits until all kicked VCPUs have acknowledged the kick. This is important for KVM_REQ_MMU_RELOAD as it prevents freeing while lockless paging is underway. This patch adds the synchronization property into all requests that are currently being used with kvm_make_all_requests() in order to preserve the current behavior and only introduce a new framework. Removing it from requests where it is not necessary is left for future patches. Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/arm/include/asm/kvm_host.h | 2 +- arch/arm64/include/asm/kvm_host.h | 2 +- arch/x86/include/asm/kvm_host.h | 6 +++--- include/linux/kvm_host.h | 9 +++++---- virt/kvm/kvm_main.c | 25 ++++++++++++++++++++++--- 5 files changed, 32 insertions(+), 12 deletions(-) commit 096ff2ddba83bf022d593a3096d683e57c4befb0 Author: Naveen N. Rao Date: Tue Apr 25 19:25:54 2017 +0530 powerpc/ftrace/64: Split further based on -mprofile-kernel Split ftrace_64.S further retaining the core ftrace 64-bit aspects in ftrace_64.S and moving ftrace_caller() and ftrace_graph_caller() into separate files based on -mprofile-kernel. The livepatch routines are all now contained within the mprofile file. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/trace/Makefile | 5 + arch/powerpc/kernel/trace/ftrace_64.S | 306 +------------------------ arch/powerpc/kernel/trace/ftrace_64_mprofile.S | 272 ++++++++++++++++++++++ arch/powerpc/kernel/trace/ftrace_64_pg.S | 68 ++++++ 4 files changed, 346 insertions(+), 305 deletions(-) commit 7853f9c029ac9134df42ea9e0d6bc600180f268d Author: Naveen N. Rao Date: Tue Apr 25 19:25:53 2017 +0530 powerpc: Split ftrace bits into a separate file entry_*.S now includes a lot more than just kernel entry/exit code. As a first step at cleaning this up, let's split out the ftrace bits into separate files. Also move all related tracing code into a new trace/ subdirectory. No functional changes. Suggested-by: Michael Ellerman Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/Makefile | 9 +- arch/powerpc/kernel/entry_32.S | 107 ------ arch/powerpc/kernel/entry_64.S | 378 ------------------- arch/powerpc/kernel/ftrace.c | 620 -------------------------------- arch/powerpc/kernel/trace/Makefile | 24 ++ arch/powerpc/kernel/trace/ftrace.c | 620 ++++++++++++++++++++++++++++++++ arch/powerpc/kernel/trace/ftrace_32.S | 118 ++++++ arch/powerpc/kernel/trace/ftrace_64.S | 389 ++++++++++++++++++++ arch/powerpc/kernel/trace/trace_clock.c | 15 + arch/powerpc/kernel/trace_clock.c | 15 - 10 files changed, 1167 insertions(+), 1128 deletions(-) commit 2505820f7ce2da2ef4ca5bd02fc239df0ba87c9f Author: Christophe Leroy Date: Tue Apr 18 08:20:15 2017 +0200 powerpc/mm: Rename table dump file name Page table dump debugfs file is named 'kernel_page_tables' on all other architectures implementing it, while is is named 'kernel_pagetables' on powerpc. This patch renames it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/mm/dump_linuxpagetables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78a18dbf0104641662d6c28e6832cc24776ba2bc Author: Christophe Leroy Date: Thu Apr 13 14:41:40 2017 +0200 powerpc/mm: On PPC32, display 32 bits addresses in page table dump Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/mm/dump_linuxpagetables.c | 5 +++++ 1 file changed, 5 insertions(+) commit fd893fe56a1307d348fe5c077eb9b654288ce0c5 Author: Christophe Leroy Date: Fri Apr 14 07:45:16 2017 +0200 powerpc/mm: Fix missing page attributes in page table dump On some targets, _PAGE_RW is 0 and this is _PAGE_RO which is used. There is also _PAGE_SHARED that is missing. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/pgtable.h | 1 + arch/powerpc/mm/dump_linuxpagetables.c | 9 +++++++++ 2 files changed, 10 insertions(+) commit 6c01bbd2cf8cbc1906818b402b10bca2283c4e7e Author: Christophe Leroy Date: Tue Apr 18 08:20:13 2017 +0200 powerpc/mm: Fix page table dump build on PPC32 On PPC32 (eg. mpc885_ads_defconfig), page table dump compilation fails as follows. This is because the memory layout is slightly different on PPC32. This patch adapts it. arch/powerpc/mm/dump_linuxpagetables.c: In function 'walk_pagetables': arch/powerpc/mm/dump_linuxpagetables.c:369:10: error: 'KERN_VIRT_START' undeclared (first use in this function) ... Fixes: 8eb07b187000d ("powerpc/mm: Dump linux pagetables") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/mm/dump_linuxpagetables.c | 59 +++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 11 deletions(-) commit a5998fcb92552a18713b6aa5c146aa400e4d75ee Author: Aneesh Kumar K.V Date: Wed Apr 26 21:38:17 2017 +1000 powerpc/mm/radix: Optimise tlbiel flush all case _tlbiel_pid() is called with a ric (Radix Invalidation Control) argument of either RIC_FLUSH_TLB or RIC_FLUSH_ALL. RIC_FLUSH_ALL says to invalidate the entire TLB and the Page Walk Cache (PWC). To flush the whole TLB, we have to iterate over each set (congruence class) of the TLB. Currently we do that and pass RIC_FLUSH_ALL each time. That is not incorrect but it means we flush the PWC 128 times, when once would suffice. Fix it by doing the first flush with the ric value we're passed, and then if it was RIC_FLUSH_ALL, we downgrade it to RIC_FLUSH_TLB, because we know we have just flushed the PWC and don't need to do it again. Signed-off-by: Aneesh Kumar K.V [mpe: Split out of combined patch, tweak logic, rewrite change log] Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb-radix.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit cf4f08bed876fbc50e64da92d2e1cfdf7653ddb2 Author: Aneesh Kumar K.V Date: Wed Apr 26 21:38:30 2017 +1000 powerpc/mm/radix: Optimise Page Walk Cache flush Currently we implement flushing of the page walk cache (PWC) by calling _tlbiel_pid() with a RIC (Radix Invalidation Control) value of 1 which says to only flush the PWC. But _tlbiel_pid() loops over each set (congruence class) of the TLB, which is not necessary when we're just flushing the PWC. In fact the set argument is ignored for a PWC flush, so essentially we're just flushing the PWC 127 extra times for no benefit. Fix it by adding tlbiel_pwc() which just does a single flush of the PWC. Signed-off-by: Aneesh Kumar K.V [mpe: Split out of combined patch, drop _ in name, rewrite change log] Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb-radix.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 178f02ffafafc59d4d4b135242e5cc1515743680 Author: Radim Krčmář Date: Wed Apr 26 22:32:26 2017 +0200 KVM: return if kvm_vcpu_wake_up() did wake up the VCPU No need to kick a VCPU that we have just woken up. Signed-off-by: Radim Krčmář Reviewed-by: Andrew Jones Signed-off-by: Paolo Bonzini include/linux/kvm_host.h | 2 +- virt/kvm/kvm_main.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) commit cde9af6e79046e12cd08d161139b1d5e57e9fbac Author: Andrew Jones Date: Wed Apr 26 22:32:24 2017 +0200 KVM: add explicit barrier to kvm_vcpu_kick kvm_vcpu_kick() must issue a general memory barrier prior to reading vcpu->mode in order to ensure correctness of the mutual-exclusion memory barrier pattern used with vcpu->requests. While the cmpxchg called from kvm_vcpu_kick(): kvm_vcpu_kick kvm_arch_vcpu_should_kick kvm_vcpu_exiting_guest_mode cmpxchg implies general memory barriers before and after the operation, that implication is only valid when cmpxchg succeeds. We need an explicit barrier for when it fails, otherwise a VCPU thread on its entry path that reads zero for vcpu->requests does not exclude the possibility the requesting thread sees !IN_GUEST_MODE when it reads vcpu->mode. kvm_make_all_cpus_request already had a barrier, so we remove it, as now it would be redundant. Signed-off-by: Andrew Jones Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 2 +- include/linux/kvm_host.h | 6 ++++++ virt/kvm/kvm_main.c | 3 --- 3 files changed, 7 insertions(+), 4 deletions(-) commit f8d5549df25e3961d6bd2ae36d3e0b08614660d9 Author: Borislav Petkov Date: Wed Apr 26 12:22:08 2017 +0200 EDAC, ghes: Do not enable it by default Leave it to the user to decide whether to enable this or not. Otherwise, platform-specific drivers won't initialize (currently, EDAC supports only a single platform driver loaded). Signed-off-by: Borislav Petkov drivers/edac/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 6c6e8360b34d59d2f687a1649e61173742dbc891 Author: Radim Krčmář Date: Wed Apr 26 22:32:23 2017 +0200 KVM: perform a wake_up in kvm_make_all_cpus_request We want to have kvm_make_all_cpus_request() to be an optmized version of kvm_for_each_vcpu(i, vcpu, kvm) { kvm_make_request(vcpu, request); kvm_vcpu_kick(vcpu); } and kvm_vcpu_kick() wakes up the target vcpu. We know which requests do not need the wake up and use it to optimize the loop. Thanks to that, this patch doesn't change the behavior of current users (the all don't need the wake up) and only prepares for future where the wake up is going to be needed. I think that most requests do not need the wake up, so we would flip the bit then. Later on, kvm_make_request() will take care of kicking too, using this bit to make the decision whether to kick or not. Signed-off-by: Radim Krčmář Reviewed-by: Andrew Jones Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 3 +++ 1 file changed, 3 insertions(+) commit 930f7fd6da77ed9476a538345513460fd304aaf5 Author: Radim Krčmář Date: Wed Apr 26 22:32:22 2017 +0200 KVM: mark requests that do not need a wakeup Some operations must ensure that the guest is not running with stale data, but if the guest is halted, then the update can wait until another event happens. kvm_make_all_requests() currently doesn't wake up, so we can mark all requests used with it. First 8 bits were arbitrarily reserved for request numbers. Most uses of requests have the request type as a constant, so a compiler will optimize the '&'. An alternative would be to have an inline function that would return whether the request needs a wake-up or not, but I like this one better even though it might produce worse assembly. Signed-off-by: Radim Krčmář Reviewed-by: Andrew Jones Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini arch/arm/include/asm/kvm_host.h | 2 +- arch/arm64/include/asm/kvm_host.h | 2 +- arch/x86/include/asm/kvm_host.h | 6 +++--- include/linux/kvm_host.h | 12 +++++++----- 4 files changed, 12 insertions(+), 10 deletions(-) commit 75aaafb79f73516b69d5639ad30a72d72e75c8b4 Author: Radim Krčmář Date: Wed Apr 26 22:32:21 2017 +0200 KVM: remove #ifndef CONFIG_S390 around kvm_vcpu_wake_up The #ifndef was protecting a missing halt_wakeup stat, but that is no longer necessary. Acked-by: Christian Borntraeger Signed-off-by: Radim Krčmář Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 2 -- 1 file changed, 2 deletions(-) commit 1bd2009e7334a9900c88f7016207619d2f86f884 Author: Radim Krčmář Date: Wed Apr 26 22:32:20 2017 +0200 KVM: x86: always use kvm_make_request instead of set_bit Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář Reviewed-by: Andrew Jones Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 72875d8a4d92f6f37e051be522b2252fd49bd50e Author: Radim Krčmář Date: Wed Apr 26 22:32:19 2017 +0200 KVM: add kvm_{test,clear}_request to replace {test,clear}_bit Users were expected to use kvm_check_request() for testing and clearing, but request have expanded their use since then and some users want to only test or do a faster clear. Make sure that requests are not directly accessed with bit operations. Reviewed-by: Christian Borntraeger Signed-off-by: Radim Krčmář Reviewed-by: Andrew Jones Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini arch/mips/kvm/emulate.c | 2 +- arch/powerpc/kvm/book3s_pr.c | 2 +- arch/powerpc/kvm/book3s_pr_papr.c | 2 +- arch/powerpc/kvm/booke.c | 4 ++-- arch/powerpc/kvm/powerpc.c | 2 +- arch/s390/kvm/kvm-s390.c | 2 +- arch/x86/kvm/vmx.c | 2 +- arch/x86/kvm/x86.c | 8 ++++---- include/linux/kvm_host.h | 14 ++++++++++++-- 9 files changed, 24 insertions(+), 14 deletions(-) commit cf9bdd35779e36a5bfc23ec292d6e1c23435878d Merge: e891a32 e000b8e Author: Paolo Bonzini Date: Thu Apr 27 14:11:07 2017 +0200 Merge tag 'kvm-s390-next-4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: MSA8 feature for guests - Detect all function codes for KMA and export the features for use in the cpu model commit 5af50993850a48ba749b122173d789ea90976c72 Author: Benjamin Herrenschmidt Date: Wed Apr 5 17:54:56 2017 +1000 KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller This patch makes KVM capable of using the XIVE interrupt controller to provide the standard PAPR "XICS" style hypercalls. It is necessary for proper operations when the host uses XIVE natively. This has been lightly tested on an actual system, including PCI pass-through with a TG3 device. Signed-off-by: Benjamin Herrenschmidt [mpe: Cleanup pr_xxx(), unsplit pr_xxx() strings, etc., fix build failures by adding KVM_XIVE which depends on KVM_XICS and XIVE, and adding empty stubs for the kvm_xive_xxx() routines, fixup subject, integrate fixes from Paul for building PR=y HV=n] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kvm_book3s_asm.h | 2 + arch/powerpc/include/asm/kvm_host.h | 28 +- arch/powerpc/include/asm/kvm_ppc.h | 74 ++ arch/powerpc/include/asm/xive.h | 9 +- arch/powerpc/kernel/asm-offsets.c | 10 + arch/powerpc/kvm/Kconfig | 5 + arch/powerpc/kvm/Makefile | 4 +- arch/powerpc/kvm/book3s.c | 75 +- arch/powerpc/kvm/book3s_hv.c | 51 +- arch/powerpc/kvm/book3s_hv_builtin.c | 103 ++ arch/powerpc/kvm/book3s_hv_rm_xics.c | 10 +- arch/powerpc/kvm/book3s_hv_rm_xive.c | 47 + arch/powerpc/kvm/book3s_hv_rmhandlers.S | 62 +- arch/powerpc/kvm/book3s_rtas.c | 21 +- arch/powerpc/kvm/book3s_xics.c | 35 +- arch/powerpc/kvm/book3s_xics.h | 7 + arch/powerpc/kvm/book3s_xive.c | 1893 +++++++++++++++++++++++++++++ arch/powerpc/kvm/book3s_xive.h | 256 ++++ arch/powerpc/kvm/book3s_xive_template.c | 503 ++++++++ arch/powerpc/kvm/irq.h | 1 + arch/powerpc/kvm/powerpc.c | 17 +- arch/powerpc/platforms/powernv/opal.c | 1 + arch/powerpc/sysdev/xive/common.c | 142 ++- arch/powerpc/sysdev/xive/native.c | 86 +- include/linux/kvm_host.h | 1 - virt/kvm/kvm_main.c | 4 - 26 files changed, 3358 insertions(+), 89 deletions(-) commit ab6241ae07c3c698543b565e4ea41995a29a3f62 Author: Dan Carpenter Date: Thu Apr 27 00:04:31 2017 +0300 input: touchscreen: mxs-lradc: || vs && typos These tests are meaningless as is because "adapt" can't possibly be both less than 1 and greater than 32. Fixes: d81ca730e3e4 ("input: touchscreen: mxs-lradc: Add support for touchscreen") Signed-off-by: Dan Carpenter Acked-by: Dmitry Torokhov Signed-off-by: Lee Jones drivers/input/touchscreen/mxs-lradc-ts.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d096ae4bb0fa3116fdd4941c65fc577f76ad453c Author: Icenowy Zheng Date: Mon Apr 17 19:57:42 2017 +0800 dt-bindings: Add AXP803's regulator info AXP803 have the most regulators in currently supported AXP PMICs. Add info for the regulators in the dt-bindings document. Signed-off-by: Icenowy Zheng Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/axp20x.txt | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 1578353e05cd23b10a9e5e8d1626e5bd0849d873 Author: Icenowy Zheng Date: Mon Apr 17 19:57:40 2017 +0800 mfd: axp20x: Support AXP803 variant AXP803 is a new PMIC chip produced by X-Powers, usually paired with A64 via RSB bus. The PMIC itself is like AXP288, but with RSB support and dedicated VBUS and ACIN. Add support for it in the axp20x mfd driver. Currently only power key function is supported. Signed-off-by: Icenowy Zheng Signed-off-by: Lee Jones drivers/mfd/axp20x-rsb.c | 1 + drivers/mfd/axp20x.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/axp20x.h | 40 ++++++++++++++++++++++- 3 files changed, 119 insertions(+), 1 deletion(-) commit 19b465e9560c5fb415f1d1159ae8a580b731436b Author: Icenowy Zheng Date: Mon Apr 17 19:57:39 2017 +0800 dt-bindings: Add device tree binding for X-Powers AXP803 PMIC AXP803 is a PMIC produced by Shenzhen X-Powers, with either I2C or RSB bus. Add a compatible for it. Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/axp20x.txt | 2 ++ 1 file changed, 2 insertions(+) commit 7366709c5ab72841bd6f74b0cf3fab5ca368ac23 Author: Icenowy Zheng Date: Mon Apr 17 19:57:38 2017 +0800 dt-bindings: Make AXP20X compatible strings one per line In the binding documentation of AXP20X mfd, the compatible strings used to be listed for three per line, which leads to some mess when trying to add AXP803 compatible string (as we have already AXP806 and AXP809 compatibles, which is after AXP803 in ascending order). Make the compatible strings one per line, so that inserting a new compatible string will be directly a new line. Signed-off-by: Icenowy Zheng Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/axp20x.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit db43b8d04d7a9fa0ac18db6de2c4741dcefbcc0b Author: Pan Bian Date: Sun Apr 23 20:29:24 2017 +0800 mfd: intel_soc_pmic_core: Fix unchecked return value unction devm_regmap_init_i2c() returns an ERR_PTR on errors, and its return value should be checked before it is dereferenced. However, in function intel_soc_pmic_i2c_probe(), the return value of function devm_regmap_init_i2c() is used without validation. This patch fixes it. Signed-off-by: Pan Bian Signed-off-by: Lee Jones drivers/mfd/intel_soc_pmic_core.c | 3 +++ 1 file changed, 3 insertions(+) commit d1f4f01a994b13e7cc3d682b816de7fc7e3463d9 Author: Martin Kepplinger Date: Mon Apr 10 11:37:18 2017 +0200 mfd: menelaus: Remove obsolete local_irq_disable() and local_irq_enable() Since commit e6229bec25be ("rtc: make rtc_update_irq callable with irqs enabled") rtc_update_irq() is callable with irqs enabled, see the rtc drivers. So update this accordingly. Signed-off-by: Martin Kepplinger Acked-by: Aaro Koskinen Signed-off-by: Lee Jones drivers/mfd/menelaus.c | 4 ---- 1 file changed, 4 deletions(-) commit 76d3341b63a2ba173e7163c48918ec45934df98b Author: Tony Lindgren Date: Sat Apr 15 10:05:09 2017 -0700 mfd: omap-usb-tll: Configure ULPIAUTOIDLE The idle mode needs to be only disabled for UTMIAUTOIDLE while ULPIAUTOIDLE can be enabled. This matches the TLL_CHANNEL_CONF_i register configuration for ehci-tll in the Motorola Linux kernel tree for Wrigley 3G LTE modem on droid 4 and the modem still stays responsive. Signed-off-by: Tony Lindgren Acked-by: Roger Quadros Signed-off-by: Lee Jones drivers/mfd/omap-usb-tll.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8b8a84c54aff4256d592dc18346c65ecf6811b45 Author: Tony Lindgren Date: Sat Apr 15 10:05:08 2017 -0700 mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode Commit 16fa3dc75c22 ("mfd: omap-usb-tll: HOST TLL platform driver") added support for USB TLL, but uses OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF bit the wrong way. The comments in the code are correct, but the inverted use of OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF causes the register to be enabled instead of disabled unlike what the comments say. Without this change the Wrigley 3G LTE modem on droid 4 EHCI bus can be only pinged few times before it stops responding. Fixes: 16fa3dc75c22 ("mfd: omap-usb-tll: HOST TLL platform driver") Signed-off-by: Tony Lindgren Acked-by: Roger Quadros Signed-off-by: Lee Jones drivers/mfd/omap-usb-tll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5b086abe08cb88533cf2c14f7d8b22636657e28 Author: Willis Monroe Date: Tue Apr 11 09:10:06 2017 -0700 mfd: palmas: Fixed spelling mistake in error message Fixed a small spelling mistake ("updat" -> "update") in an error message. Signed-off-by: Willis Monroe Signed-off-by: Lee Jones drivers/mfd/palmas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6450cb0388ee58659be5a54a7bfe5bff09532c7 Author: Mika Westerberg Date: Mon Apr 10 13:28:45 2017 +0300 mfd: lpc_ich: Add support for Intel Gemini Lake SoC Like Intel Apollo Lake, Gemini Lake exposes the serial SPI flash device BAR through hidden P2SB PCI device. We use the same mechanism than Apollo Lake to read the BAR and pass it to the driver. Signed-off-by: Mika Westerberg Signed-off-by: Lee Jones drivers/mfd/lpc_ich.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ac03fec1d7d889192cce35edac6fef6026a4d6a1 Author: Daniel Lezcano Date: Fri Mar 17 08:58:50 2017 +0100 mfd: hi655x: Add the clock cell to provide WiFi and Bluetooth The hi655x is a PMIC with regulator but also provides a clock for the WiFi and the bluetooth which is missing in the current implementation. Add the clock cell so it can be used in the next patch via the dts. Signed-off-by: Daniel Lezcano Signed-off-by: Lee Jones drivers/mfd/hi655x-pmic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b5238b41858229b2dcb684cd71d81f4c6d6311c0 Author: Andy Shevchenko Date: Tue Apr 4 15:38:56 2017 +0300 mfd: intel_soc_pmic: Fix a mess with compilation units Crystal Cove and Whiskey Cove are two different PMICs which are installed on Intel Atom SoC based platforms. Moreover there are two independent drivers that by some reason were supposed (*) to get into one kernel module. Fix the mess by clarifying Kconfig option for Crystal Cove and split Whiskey Cove out of it. (*) It looks like the configuration was never tested with INTEL_SOC_PMIC=n. The line in Makefile is actually wrong. Cc: "Rafael J. Wysocki" (supporter:ACPI) Acked-by: Linus Walleij Acked-by: Zhang Rui Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/acpi/Kconfig | 2 +- drivers/gpio/Kconfig | 2 +- drivers/mfd/Kconfig | 15 +++++++++++++-- drivers/mfd/Makefile | 2 +- drivers/platform/x86/Kconfig | 2 +- drivers/thermal/Kconfig | 2 +- 6 files changed, 18 insertions(+), 7 deletions(-) commit 90f447170c6f283a80a729ff92aabecdb2206cbe Author: Marek Szyprowski Date: Thu Mar 23 09:03:27 2017 +0100 mfd: exynos-lpass: Add runtime PM support Convert exisitng lpass-suspend/resume callbacks into runtime PM callbacks. This way Exynos LPASS driver will be ready for use with power domains enabled. LPASS will be runtime resumed/suspended as a result of its child devices runtime PM transitions. Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Acked-by: Sylwester Nawrocki Signed-off-by: Lee Jones drivers/mfd/exynos-lpass.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit cb710ab1d8a23f68ff8f45aedf3e552bb90e70de Author: Sudeep Holla Date: Tue Mar 21 11:30:16 2017 +0000 mailbox: handle empty message in tx_tick We already check if the message is empty before calling the client tx_done callback. Calling completion on a wait event is also invalid if the message is empty. This patch moves the existing empty message check earlier. Fixes: 2b6d83e2b8b7 ("mailbox: Introduce framework for mailbox") Signed-off-by: Sudeep Holla Signed-off-by: Jassi Brar drivers/mailbox/mailbox.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cc6eeaa3029a6dbcb4ad41b1f92876483bd88965 Author: Sudeep Holla Date: Tue Mar 21 11:30:15 2017 +0000 mailbox: skip complete wait event if timer expired If a wait_for_completion_timeout() call returns due to a timeout, complete() can get called after returning from the wait which is incorrect and can cause subsequent transmissions on a channel to fail. Since the wait_for_completion_timeout() sees the completion variable is non-zero caused by the erroneous/spurious complete() call, and it immediately returns without waiting for the time as expected by the client. This patch fixes the issue by skipping complete() call for the timer expiry. Fixes: 2b6d83e2b8b7 ("mailbox: Introduce framework for mailbox") Reported-by: Alexey Klimov Signed-off-by: Sudeep Holla Signed-off-by: Jassi Brar drivers/mailbox/mailbox.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c61b781ee084e69855477d23dd33e7e6caad652c Author: Sudeep Holla Date: Tue Mar 21 11:30:14 2017 +0000 mailbox: always wait in mbox_send_message for blocking Tx mode There exists a race when msg_submit return immediately as there was an active request being processed which may have completed just before it's checked again in mbox_send_message. This will result in return to the caller without waiting in mbox_send_message even when it's blocking Tx. This patch fixes the issue by waiting for the completion always if Tx is in blocking mode. Fixes: 2b6d83e2b8b7 ("mailbox: Introduce framework for mailbox") Reported-by: Alexey Klimov Signed-off-by: Sudeep Holla Reviewed-by: Alexey Klimov Signed-off-by: Jassi Brar drivers/mailbox/mailbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 207c6e36f122ebb1164d611c9f34f128313f47d5 Author: Joerg Roedel Date: Wed Apr 26 15:39:28 2017 +0200 iommu: Move report_iommu_fault() to iommu.c The function is in no fast-path, there is no need for it to be static inline in a header file. This also removes the need to include iommu trace-points in iommu.h. Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 42 ++++++++++++++++++++++++++++++++++++++++++ include/linux/iommu.h | 41 ++--------------------------------------- 2 files changed, 44 insertions(+), 39 deletions(-) commit e8245c1b1a3bb8474f91c69ccd13637d3589bb2c Author: Joerg Roedel Date: Wed Apr 26 15:34:06 2017 +0200 iommu: Include device.h in iommu.h We make use of 'struct device' in iommu.h, so include device.h to make it available explicitly. Re-order the other headers while at it. Signed-off-by: Joerg Roedel include/linux/iommu.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 629e014bb8349fcf7c1e4df19a842652ece1c945 Author: Christoph Hellwig Date: Thu Apr 27 09:42:25 2017 +0200 fs: completely ignore unknown open flags Currently we just stash anything we got into file->f_flags, and the report it in fcntl(F_GETFD). This patch just clears out all unknown flags so that we don't pass them to the fs or report them. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/open.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 80f18379a7c350c011d30332658aa15fe49a8fa5 Author: Christoph Hellwig Date: Thu Apr 27 09:42:24 2017 +0200 fs: add a VALID_OPEN_FLAGS Add a central define for all valid open flags, and use it in the uniqueness check. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/fcntl.c | 14 ++++---------- include/linux/fcntl.h | 6 ++++++ 2 files changed, 10 insertions(+), 10 deletions(-) commit c414df12bdf7a3e730512ed3971e9d90a494cfa9 Author: Marek Szyprowski Date: Thu Mar 23 09:03:26 2017 +0100 mfd: exynos-lpass: Add missing remove() function Disable device on driver remove and release allocated regmap. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Acked-by: Sylwester Nawrocki Acked-for-MFD-by: Lee Jones Signed-off-by: Lee Jones drivers/mfd/exynos-lpass.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 8f1be5bd14e8faf5a1255a32621601bb11a96232 Author: Marek Szyprowski Date: Thu Mar 23 09:03:25 2017 +0100 mfd: exynos-lpass: Add support for clocks Exynos LPASS requires some clocks to be enabled to make any access to its registers. This patch adds code for handling such clocks. For current set of registers it is enough to keep sfr0_ctrl clock enabled. Till now it worked only because those clocks were enabled by bootloader and driver probe() happened before they were disabled by clock core because of lack of users. Handling those clocks is also needed to make it possible to enable support for audio power domain. This patch requires adding sfr0_ctrl clock to device tree. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Acked-by: Sylwester Nawrocki Acked-by: Rob Herring Acked-for-MFD-by: Lee Jones Signed-off-by: Lee Jones .../devicetree/bindings/mfd/samsung,exynos5433-lpass.txt | 6 ++++++ drivers/mfd/exynos-lpass.c | 10 ++++++++++ 2 files changed, 16 insertions(+) commit addebf1588ab812b891651ef5fba194659f71ea5 Author: Marek Szyprowski Date: Thu Mar 23 09:03:24 2017 +0100 mfd: exynos-lpass: Remove pad retention control Pad retention should be controlled from pin control driver, so remove it from Exynos LPASS driver. After this change, no more access to PMU regmap is needed, so remove also the code for handling PMU regmap. Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Acked-by: Sylwester Nawrocki Acked-by: Rob Herring Acked-for-MFD-by: Lee Jones Signed-off-by: Lee Jones .../devicetree/bindings/mfd/samsung,exynos5433-lpass.txt | 2 -- drivers/mfd/exynos-lpass.c | 16 ---------------- include/linux/mfd/syscon/exynos5-pmu.h | 3 --- 3 files changed, 21 deletions(-) commit 0e34d5de961d5a8a84cf77878ca871c6e8104620 Author: Quentin Schulz Date: Tue Apr 4 08:34:41 2017 +0200 iio: adc: add support for X-Powers AXP20X and AXP22X PMICs ADCs The X-Powers AXP20X and AXP22X PMICs have multiple ADCs. They expose the battery voltage, battery charge and discharge currents, AC-in and VBUS voltages and currents, 2 GPIOs muxable in ADC mode and PMIC temperature. This adds support for most of AXP20X and AXP22X ADCs. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai Reviewed-by: Jonathan Cameron Signed-off-by: Lee Jones drivers/iio/adc/Kconfig | 10 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/axp20x_adc.c | 617 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 628 insertions(+) commit be269180c9335c257a2763c3fd3a44e65c90c1f0 Author: Tony Lindgren Date: Mon Apr 3 20:15:56 2017 -0700 mfd: cpcap: Fix bad use of IRQ sense register The cpcap INTS registers are for getting the value of the line, not for configuring the type. Fixes: 56e1d40d3bea ("mfd: cpcap: Add minimal support") Reviewed-By: Sebastian Reichel Tested-by: Sebastian Reichel Signed-off-by: Tony Lindgren Signed-off-by: Lee Jones drivers/mfd/motorola-cpcap.c | 1 - 1 file changed, 1 deletion(-) commit 5a88d4120029601a0868e20774382d312952d3b5 Author: Tony Lindgren Date: Mon Apr 3 20:15:55 2017 -0700 mfd: cpcap: Use ack_invert interrupts We should use ack_invert as the int_read_and_clear() in the Motorola kernel tree does "ireg_val & ~mreg_val" before writing to the mask register. Fixes: 56e1d40d3bea ("mfd: cpcap: Add minimal support") Tested-by: Sebastian Reichel Signed-off-by: Tony Lindgren Signed-off-by: Lee Jones drivers/mfd/motorola-cpcap.c | 3 +++ 1 file changed, 3 insertions(+) commit ac89473213c602b98172d92e40f5e78032b1aba0 Author: Tony Lindgren Date: Mon Apr 3 20:15:54 2017 -0700 mfd: cpcap: Fix interrupt to use level interrupt I made a mistake assuming the device tree configuration for interrupt triggering was somehow passed to the SPI device but it's not. In the Motorola Linux kernel tree CPCAP PMIC is configured as a rising edge triggered interrupt, but then then it's interrupt handler keeps looping until the GPIO line goes down. So the CPCAP interrupt is clearly a level interrupt and not an edge interrupt. Earlier when I tried to configure it as level interrupt using the device tree, I did not account that the triggering only gets passed to the SPI core and it also needs to be specified in the CPCAP driver when we do devm_regmap_add_irq_chip(). Fixes: 56e1d40d3bea ("mfd: cpcap: Add minimal support") Signed-off-by: Tony Lindgren Acked-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/motorola-cpcap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d5db2a3a207451a8b11802c4d5f45a8931d996c Author: Quentin Schulz Date: Wed Apr 5 11:06:28 2017 +0200 dt-bindings: input: touschcreen: Remove sun4i documentation This patch removes the sun4i touchscreen controller binding documentation since it has been merged with the sun4i GPADC binding documentation. Signed-off-by: Quentin Schulz Acked-by: Rob Herring Acked-by: Dmitry Torokhov Signed-off-by: Lee Jones .../bindings/input/touchscreen/sun4i.txt | 38 ---------------------- 1 file changed, 38 deletions(-) commit fe37c4b98173ec4b82d3b225d4a7c4d40f77f304 Author: Quentin Schulz Date: Wed Apr 5 11:06:27 2017 +0200 dt-bindings: mfd: Add A33 GPADC binding This patch adds documentation for the A33 GPADC binding. Signed-off-by: Quentin Schulz Acked-by: Rob Herring Signed-off-by: Lee Jones .../devicetree/bindings/mfd/sun4i-gpadc.txt | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit b4aeceb694a3ba353c0531f3b075642905c6b523 Author: Quentin Schulz Date: Wed Apr 5 10:10:55 2017 +0200 mfd: axp20x: Add MFD cells for AXP20X and AXP22X battery driver The X-Powers AXP20X and AXP22X PMICs can have a battery as power supply. This patch adds the AXP20X/AXP22X battery driver to the MFD cells of the AXP209, AXP221 and AXP223 MFD. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones drivers/mfd/axp20x.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 656211b1dfb9e0b68d4e634931432e29a6facf46 Author: Steve Twiss Date: Mon Apr 3 15:46:40 2017 +0100 mfd: Add support for DA9061 MFD support for DA9061 is provided as part of the DA9062 device driver. The registers header file adds two new chip variant IDs defined in DA9061 and DA9062 hardware. The core header file adds new software enumerations for listing the valid DA9061 IRQs and a da9062_compatible_types enumeration for distinguishing between DA9061/62 devices in software. The core source code adds a new .compatible of_device_id entry. This is extended from DA9062 to support both "dlg,da9061" and "dlg,da9062". The .data entry now holds a reference to the enumerated device type. A new regmap_irq_chip model is added for DA9061 and this supports the new list of regmap_irq entries. A new mfd_cell da9061_devs[] array lists the new sub system components for DA9061. Support is added for a new DA9061 regmap_config which lists the correct readable, writable and volatile ranges for this chip. The probe function uses the device tree compatible string to switch on the da9062_compatible_types and configure the correct mfd cells, irq chip and regmap config. Kconfig is updated to reflect support for DA9061 and DA9062 PMICs. Signed-off-by: Steve Twiss Signed-off-by: Lee Jones drivers/mfd/Kconfig | 5 +- drivers/mfd/da9062-core.c | 427 +++++++++++++++++++++++++++++++++-- include/linux/mfd/da9062/core.h | 29 ++- include/linux/mfd/da9062/registers.h | 5 +- 4 files changed, 443 insertions(+), 23 deletions(-) commit e1569fb64e5efb31b835ac8e76bf1c18313da8e5 Author: Steve Twiss Date: Tue Mar 28 15:43:31 2017 +0100 dt-bindings: mfd: DA9062/61 MFD binding Extend existing DA9062 binding information to include the DA9061 PMIC for MFD core and regulators. Add a da9062-onkey link to the existing onkey binding file. Add a da9062-thermal link to the new temperature monitoring binding file. Delete the da9062-watchdog section and replace it with a link to the new DA9061/62 binding information file. Acked-by: Rob Herring Signed-off-by: Steve Twiss Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/da9062.txt | 49 +++++++++++++++++------- 1 file changed, 36 insertions(+), 13 deletions(-) commit b97eef5d77b53662b06603c1b18e21968029c925 Author: Hugues Fruchet Date: Fri Mar 31 10:12:39 2017 +0200 mfd: stmpe: Fix bit clearing on STMPE1600 GPIO bits clearing on pins assigned to STMPE1600 had no effects due to missing "clear registers" settings within stmpe1600_regs[]. STMPE1600 does not have dedicated "clear registers", but single "set/clear registers", hence stmpe1600_regs[] "clear registers" (STMPE_IDX_GPCR_XXX) must be set to same value as "set registers" (STMPE_IDX_GPSR_XXX), ie STMPE1600_REG_GPSR_XXX. Signed-off-by: Hugues Fruchet Reviewed-by: Patrice Chotard Signed-off-by: Lee Jones drivers/mfd/stmpe.c | 2 ++ 1 file changed, 2 insertions(+) commit b4ccc4d2e82f7c7f8304f44544bdefcd16234582 Author: Kuppuswamy Sathyanarayanan Date: Thu Mar 30 16:35:40 2017 -0700 mfd: bxtwc: Remove unnecessary i2c_addr checks in ipc calls In the following code block, BXTWC_DEVICE1_ADDR value is already fixed and hence there no need to check for if (!i2c_addr) in every ipc read/write calls. Even if this check is required it can be moved to probe function. i2c_addr = BXTWC_DEVICE1_ADDR; if (!i2c_addr) { dev_err(pmic->dev, "I2C address not set\n"); return -EINVAL; } This patch remove this extra check and adds some NULL parameter checks. Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Lee Jones drivers/mfd/intel_soc_pmic_bxtwc.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 4407319d8fff93308c2afe40e7c2a7dc564ec122 Author: Boris Brezillon Date: Thu Mar 16 09:30:34 2017 +0100 memory: atmel-ebi: Add PM ops Add a ->resume() hook to make sure the EBI dev configs are correctly restored when resuming the platform. Signed-off-by: Boris Brezillon Acked-by: Nicolas Ferre Signed-off-by: Lee Jones drivers/memory/atmel-ebi.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit aaa572b945876619ebd114d5a456d1250f267b9a Author: Boris Brezillon Date: Thu Mar 16 09:30:33 2017 +0100 memory: atmel-ebi: Add missing ->numcs assignment ebid->numcs is never assigned, set it to numcs after allocating the EBI dev object. Signed-off-by: Boris Brezillon Acked-by: Nicolas Ferre Signed-off-by: Lee Jones drivers/memory/atmel-ebi.c | 1 + 1 file changed, 1 insertion(+) commit 9453fa4694156108d37bb2d03658286ce85ca4f0 Author: Boris Brezillon Date: Thu Mar 16 09:30:32 2017 +0100 memory: atmel-ebi: Change naming scheme The EBI block is not only available on at91 SoCs, but also on avr32 ones. Change the structure and function prefixes from at91_ebi to atmel_ebi to match this fact and make the prefix and driver name consistent. Signed-off-by: Boris Brezillon Acked-by: Nicolas Ferre Signed-off-by: Lee Jones drivers/memory/atmel-ebi.c | 120 ++++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 60 deletions(-) commit 0d69080d9e01d5d60f1887def2080ce3f66f5856 Author: Boris Brezillon Date: Thu Mar 16 09:30:31 2017 +0100 mfd: syscon: atmel-smc: Remove unused helpers/macros All macros prefixed with AT91[SAM9]_SMC have been replaced by equivalent definitions prefixed with ATMEL_SMC, and the at91sam9_smc_xxxx() helpers are no longer used. Drop these definitions before someone starts using them again. Signed-off-by: Boris Brezillon Acked-by: Nicolas Ferre Signed-off-by: Lee Jones include/linux/mfd/syscon/atmel-smc.h | 152 ----------------------------------- 1 file changed, 152 deletions(-) commit d9f81dad161f3f0b339a65e0e6ac5db898119027 Author: Boris Brezillon Date: Thu Mar 16 09:30:30 2017 +0100 memory: atmel-ebi: Stop using reg_field objects for simple things Turn the ->ebi_csa reg field into a simple offset that can be used with with the matrix regmap. Using reg fields was overkill for this use case. Signed-off-by: Boris Brezillon Acked-by: Nicolas Ferre Signed-off-by: Lee Jones drivers/memory/atmel-ebi.c | 55 +++++++++++----------------------------------- 1 file changed, 13 insertions(+), 42 deletions(-) commit 8eb8c7d844b9da6301542627eaaae28f4d20cb75 Author: Boris Brezillon Date: Thu Mar 16 09:30:29 2017 +0100 memory: atmel-ebi: Simplify SMC config code New helpers/macros have been to atmel-smc.h introduced to simplify SMC regs manipulation. Rework the code to use those helpers, and simplify the ->xlate_config(), ->get_config() and ->apply_config() implementations. SMC configs are now stored in a struct atmel_smc_cs_conf object that directly contains registers values, which should help implementing ->suspend()/->resume() hooks. We can also get rid of those regmap fields (and the associated ->init() hook) which are not longer needed thanks to the atmel_[h]smc_cs_conf_{apply,get}() helpers. Signed-off-by: Boris Brezillon Acked-by: Nicolas Ferre Signed-off-by: Lee Jones drivers/memory/Kconfig | 1 + drivers/memory/atmel-ebi.c | 430 +++++++++++++-------------------------------- 2 files changed, 128 insertions(+), 303 deletions(-) commit fe9d7cb22ef3a26a74e49730c0efdbdae4b17d4b Author: Boris Brezillon Date: Thu Mar 16 09:30:28 2017 +0100 mfd: syscon: atmel-smc: Add new helpers to ease SMC regs manipulation These new helpers + macro definitions are meant to replace the old ones which are unpractical to use. Note that the macros and function prefixes have been intentionally changed to ATMEL_[H]SMC_XX and atmel_[h]smc_ to reflect the fact that this IP is also embedded in avr32 SoCs (and not only in at91 ones). Signed-off-by: Boris Brezillon Acked-by: Nicolas Ferre Signed-off-by: Lee Jones drivers/mfd/Kconfig | 4 + drivers/mfd/Makefile | 1 + drivers/mfd/atmel-smc.c | 314 +++++++++++++++++++++++++++++++++++ include/linux/mfd/syscon/atmel-smc.h | 87 ++++++++++ 4 files changed, 406 insertions(+) commit 119d53d44cb0da2e3140106a9e359fc53bd6d837 Author: Belen Sarabia Date: Sat Mar 25 19:26:47 2017 +0100 mfd: ipaq-micro: Delete redundant return value check of platform_get_resource() devm_ioremap_resource does checks on the resource. No need to duplicate this in the driver. Signed-off-by: Belén Sarabia Signed-off-by: Lee Jones drivers/mfd/ipaq-micro.c | 3 --- 1 file changed, 3 deletions(-) commit 85fdaf8eb9bbec1f0f8a52fd5d85659d60738816 Author: Keerthy Date: Thu Nov 10 10:39:18 2016 +0530 mfd: palmas: Reset the POWERHOLD mux during power off POWERHOLD signal has higher priority over the DEV_ON bit. So power off will not happen if the POWERHOLD is held high. Hence reset the MUX to GPIO_7 mode to release the POWERHOLD and the DEV_ON bit to take effect to power off the PMIC. PMIC Power off happens in dire situations like thermal shutdown so irrespective of the POWERHOLD setting go ahead and turn off the powerhold. Currently poweroff is broken on boards that have powerhold enabled. This fixes poweroff on those boards. Signed-off-by: Keerthy Signed-off-by: Lee Jones drivers/mfd/palmas.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit f5139c27e734bf8458c0afc60ef86e45517e1126 Author: Julia Cartwright Date: Tue Mar 21 17:43:06 2017 -0500 mfd: tc6393xb: Make use of raw_spinlock variants The tc6393xb mfd driver currently implements an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Signed-off-by: Lee Jones drivers/mfd/tc6393xb.c | 52 +++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 9fe8c2dfe165f18873042d25ef430e18c97b1dae Author: Julia Cartwright Date: Tue Mar 21 17:43:05 2017 -0500 mfd: t7l66xb: Make use of raw_spinlock variants The t7l66xb mfd driver currently implements an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Signed-off-by: Lee Jones drivers/mfd/t7l66xb.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 93ad4471912029f7519c23da56538a5d54552124 Author: Julia Cartwright Date: Tue Mar 21 17:43:04 2017 -0500 mfd: asic3: Make use of raw_spinlock variants The asic3 mfd driver currently implements an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Signed-off-by: Lee Jones drivers/mfd/asic3.c | 56 ++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit 0c227c51b98c03c6e7fb4f342f930cf576292064 Author: Andy Shevchenko Date: Fri Mar 17 17:37:15 2017 +0200 mfd: intel_soc_pmic_bxtwc: Rename header to follow c-file For better understanding of relationship between headers and modules rename: intel_bxtwc.h -> intel_soc_pmic_bxtwc.h While here, remove file name from the file itself. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/mfd/intel_soc_pmic_bxtwc.c | 2 +- include/linux/mfd/intel_bxtwc.h | 67 -------------------------------- include/linux/mfd/intel_soc_pmic_bxtwc.h | 67 ++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 68 deletions(-) commit f1e34ad849ad78770af067fd8e409e61b018f9d0 Author: Andy Shevchenko Date: Fri Mar 17 17:37:14 2017 +0200 mfd: intel_soc_pmic_bxtwc: Move inclusion to c-file There is no need to include intel_soc_pmic.h into header which doesn't require it. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/mfd/intel_soc_pmic_bxtwc.c | 1 + include/linux/mfd/intel_bxtwc.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) commit ef84f885e03763c963dbb5d36389d33ce50576f2 Author: Charles Keepax Date: Wed Mar 15 14:58:38 2017 +0000 mfd: arizona: Refactor arizona_poll_reg Currently, we specify the timeout in terms of the number of polls but it is more clear from a user of the functions perspective to specify the timeout directly in milliseconds, as such update the function to these new semantics. Additionally, arizona_poll_reg essentially hard-codes regmap_read_poll_timeout, update the implementation to use regmap_read_poll_timeout. We still keep arizona_poll_reg around as regmap_read_poll_timeout is a macro so rather than expand this for each caller keep it wrapped in arizona_poll_reg. Whilst we are doing this make the timeouts a little more generous as the previous system had a bit more slack as it was done as a delay per iteration of the loop whereas regmap_read_poll_timeout compares ktime's. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona-core.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit f9657b8f75473ce0488c750677bfef46751dd5e1 Author: Charles Keepax Date: Wed Mar 15 14:58:37 2017 +0000 mfd: arizona: Display register addresses in hex Register addresses are normally displayed in hex throughout the Arizona driver. Update the arizona_poll_reg function to follow this convention. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit de4ea10ad7bd86445875bab25596016544f827ca Author: Charles Keepax Date: Wed Mar 15 14:58:36 2017 +0000 mfd: arizona: Remove duplicate set of ret variable arizona_poll_reg already returns ETIMEDOUT if we don't see the expected register changes before the time out, so remove pointless local setting of ETIMEDOUT. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona-core.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 81d30eda98fd8e29a6e002f6938cb746f75ca14f Author: Joe Perches Date: Thu Feb 16 23:11:36 2017 -0800 mfd: Convert remaining uses of pr_warning to pr_warn To enable eventual removal of pr_warning This makes pr_warn use consistent for drivers/mfd Prior to this patch, there were 4 uses of pr_warning and 9 uses of pr_warn in drivers/mfd Signed-off-by: Joe Perches Signed-off-by: Lee Jones drivers/mfd/db8500-prcmu.c | 2 +- drivers/mfd/sta2x11-mfd.c | 4 ++-- drivers/mfd/twl4030-power.c | 7 ++----- 3 files changed, 5 insertions(+), 8 deletions(-) commit 040fc9b1df118016bf5410d21feb72e9371aeb11 Author: Sean Wang Date: Mon Mar 20 14:47:27 2017 +0800 mfd: mt6397: Align the placement at which the mfd_cell of LED is defined Align the placement as which the mfd_cell of LED is defined as the other members done on the structure. Signed-off-by: Sean Wang Signed-off-by: Lee Jones drivers/mfd/mt6397-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 74772a300a2af09a1a94d5658e586f670bdca402 Author: Sean Wang Date: Mon Mar 20 14:47:25 2017 +0800 dt-bindings: mfd: Add the description for LED as the sub module This patch adds description for LED as the sub-module on MT6397/MT6323 multifunction device. Signed-off-by: Sean Wang Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/mt6397.txt | 1 + 1 file changed, 1 insertion(+) commit 976023701d1f1fda5e19983f38113bd67e881f64 Author: Quentin Schulz Date: Mon Mar 20 09:16:53 2017 +0100 mfd: axp20x: Add CHRG_CTRL1/2/3 to writeable regs for AXP20X/AXP22X The CHRG_CTRL1 and CHRG_CTRL2 registers are made for controlling different battery charging settings such as the constant current charge value. The AXP22X also have a third register CHRG_CTRL3 which has settings for battery charging too. This adds the CHRG_CTRL1, CHRG_CTRL2 and CHRG_CTRL3 registers to the list of writeable registers for AXP20X and AXP22X PMICs. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones drivers/mfd/axp20x.c | 2 ++ 1 file changed, 2 insertions(+) commit 95c4f5319817a158c5d9bc8057a366c4758a0dc7 Author: Quentin Schulz Date: Mon Mar 20 09:16:48 2017 +0100 mfd: axp20x: Add AC power supply cells for AXP22X PMICs The X-Powers AXP20X and AXP22X PMICs expose the status of AC power supply. This adds the AC power supply driver to the MFD cells of the AXP22X PMICs. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-By: Sebastian Reichel Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones drivers/mfd/axp20x.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 4d5e5c34a04d2e73f74fd7eae7018ddfba841fc1 Author: Quentin Schulz Date: Mon Mar 20 09:16:47 2017 +0100 mfd: axp20x: Add ADC cells for AXP20X and AXP22X PMICs This adds the AXP20X/AXP22x ADCs driver to the mfd cells of the AXP209, AXP221 and AXP223 MFD. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones drivers/mfd/axp20x.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ed7311f0d089553f39ff3e1e2d9f55f94324c42f Author: Quentin Schulz Date: Mon Mar 20 09:16:45 2017 +0100 mfd: axp20x: Correct name of temperature data ADC registers The registers 0x56 and 0x57 of AXP22X PMIC store the value of the internal temperature of the PMIC. This patch modifies the name of these registers from AXP22X_PMIC_ADC_H/L to AXP22X_PMIC_TEMP_H/L so their purpose is clearer. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Lee Jones drivers/mfd/axp20x.c | 2 +- include/linux/mfd/axp20x.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 0ec69542aa7362f7c939c9a33c6f50850d68f7eb Author: Andrew F. Davis Date: Wed Mar 15 12:05:34 2017 -0500 mfd: tps65912: Fix variable name for SPI remove The SPI interface is mostly a copy/paste from the I2C interface with some minor renaming for consistency. "Client" is an I2C specific term that was left in the SPI remove path, rename this here. Signed-off-by: Andrew F. Davis Signed-off-by: Lee Jones drivers/mfd/tps65912-spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 66da627e0cf4e06817e78a6641e39372e20a30f7 Author: Thor Thayer Date: Wed Feb 22 11:10:15 2017 -0600 dt-bindings: mfd: Add Altera Arria10 SR Reset Controller bindings This patch adds documentation for the Altera A10-SR Reset Controller DT bindings. Signed-off-by: Thor Thayer Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/altera-a10sr.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) commit dd47e97244709aab3edda281e0876c0b86bbe07c Author: Thor Thayer Date: Wed Feb 22 11:10:18 2017 -0600 mfd: altr_a10sr: Add Arria10 DevKit Reset Controller Add Peripheral PHY Reset Controller to the Arria10 Development Kit System Resource Chip's MFD. Signed-off-by: Thor Thayer Signed-off-by: Lee Jones drivers/mfd/altera-a10sr.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8fafcd99bde2db25022a10f3d35759395a7e3d3c Author: Andy Shevchenko Date: Mon Mar 13 19:53:01 2017 +0200 mfd: intel-lpss: Remove left over variable After commit 028af5941dd8 ("mfd: intel-lpss: Pass SDA hold time to I2C host controller driver") the driver still has a non-used variable. Remove it here. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Lee Jones drivers/mfd/intel-lpss-acpi.c | 4 ---- 1 file changed, 4 deletions(-) commit ca691f7118087a652e4d6c83a30f5ed6d5acbf14 Author: Doug Anderson Date: Wed Mar 1 12:58:32 2017 +0100 mfd: cros ec: spi: Increase wait time to 200ms This is a sucky change to bump up the time we'll wait for the EC. Why is it sucky? If 200ms for a transfer is a common thing it will have a massively bad impact on keyboard responsiveness. It still seems like a good idea to do this, though, because we have a gas gauge that claims that in an extreme case it could stretch the i2c clock for 144ms. It's not a common case so it shouldn't affect responsiveness, but it can happen. It's much better to have a single slow keyboard response than to start returning errors when we don't have to. In newer EC designs we should probably implement a virtual battery to respond to the kernel to insulate the kernel from these types of issues. Signed-off-by: Doug Anderson Signed-off-by: Enric Balletbo i Serra Signed-off-by: Lee Jones drivers/mfd/cros_ec_spi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit d5aa11bfe9cebb4a3912b11748fd84aa15454229 Author: Milo Kim Date: Tue Feb 28 15:45:15 2017 +0900 mfd: Add TI LMU driver TI LMU (Lighting Management Unit) driver supports lighting devices below. LM3532, LM3631, LM3632, LM3633, LM3695 and LM3697. LMU devices have common features. - I2C interface for accessing device registers - Hardware enable pin control - Backlight brightness control - Notifier for hardware fault monitoring - Regulators for LCD display bias It contains fault monitor, backlight, LED and regulator driver. LMU fault monitor ----------------- LM3633 and LM3697 provide hardware monitoring feature. It enables open or short circuit detection. After monitoring is done, each device should be re-initialized. Notifier is used for this case. Separate patch for 'ti-lmu-fault-monitor' will be sent later. Backlight --------- It's handled by TI LMU backlight consolidated driver and chip dependent data. Separate patchset will be sent later. LED indicator ------------- LM3633 has 6 indicator LEDs. Programmable dimming pattern is also supported. Separate patch for 'leds-lm3633' will be sent later. Regulator --------- LM3631 has 5 regulators for the display bias. LM3632 supports 3 regulators. One consolidated driver enables it. The lm363x regulator driver is already upstreamed. Signed-off-by: Milo Kim Tested-by: Tony Lindgren Signed-off-by: Lee Jones drivers/mfd/Kconfig | 12 ++ drivers/mfd/Makefile | 2 + drivers/mfd/ti-lmu.c | 259 +++++++++++++++++++++++++++++++++ include/linux/mfd/ti-lmu-register.h | 280 ++++++++++++++++++++++++++++++++++++ include/linux/mfd/ti-lmu.h | 87 +++++++++++ 5 files changed, 640 insertions(+) commit 287cce719d85311f61d1b6b7f7b0d93f7907cd46 Author: Milo Kim Date: Tue Feb 28 15:45:14 2017 +0900 dt-bindings: mfd: Add TI LMU device binding information This patch describes overall binding for TI LMU MFD devices. Signed-off-by: Milo Kim Acked-by: Rob Herring Acked-by: Tony Lindgren Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/ti-lmu.txt | 243 +++++++++++++++++++++++ 1 file changed, 243 insertions(+) commit c0369698e6455c734a772e3acb09cff9a0c8ed9f Author: Rask Ingemann Lambertsen Date: Wed Feb 22 20:42:02 2017 +0100 mfd: axp20x: Add support for dts property "xpowers,master-mode" commit b101829a029a ("mfd: axp20x: Fix AXP806 access errors on cold boot") was intended to fix the case where a board uses an AXP806 in slave mode, but the boot loader leaves it in master mode for lack of AXP806 support. But now the driver breaks on boards where the PMIC is operating in master mode. This patch lets the driver use the new device tree property "xpowers,master-mode" to set the correct operating mode for the board. Fixes: 8824ee857348 ("mfd: axp20x: Add support for AXP806 PMIC") Signed-off-by: Rask Ingemann Lambertsen Signed-off-by: Lee Jones drivers/mfd/axp20x.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 8461cf20d17e0090e9236b73d25b31be4f7fadc5 Author: Rask Ingemann Lambertsen Date: Wed Feb 22 20:41:02 2017 +0100 dt-bindings: mfd: axp20x: Add "xpowers,master-mode" property for AXP806 PMICs commit b101829a029a ("mfd: axp20x: Fix AXP806 access errors on cold boot") was intended to fix the case where a board uses an AXP806 in slave mode, but the boot loader leaves it in master mode for lack of AXP806 support. But now the driver breaks on boards where the PMIC is operating in master mode. To let the device tree describe which mode of operation is needed, this patch introduces a new property "xpowers,master-mode". Fixes: 204ae2963e10 ("mfd: axp20x: Add bindings for AXP806 PMIC") Signed-off-by: Rask Ingemann Lambertsen Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/axp20x.txt | 3 +++ 1 file changed, 3 insertions(+) commit 159ee7578a7453f3496268950a78a507cf7ac379 Author: Andy Shevchenko Date: Tue Feb 21 13:09:14 2017 +0200 mfd: intel_soc_pmic_core: Remove unnecessary function Since commit 845c877009cf ("i2c / ACPI: Assign IRQ for devices that have GpioInt automatically") I2C core assigns interrupt line to I2C slave devices with regarding to GpioInt() resources. There is no need to repeat this in the driver. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/mfd/intel_soc_pmic_core.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) commit ae6816ba0f594edb194d108cfa0dedceb59fb0ff Author: Fabrice Gasnier Date: Wed Feb 15 09:04:32 2017 +0100 mfd: stm32-timers: Fix max register STM32 timers register bank size is 0x400. Fix regmap max_register. Signed-off-by: Fabrice Gasnier Acked-by: Benjamin Gaignard Signed-off-by: Lee Jones drivers/mfd/stm32-timers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 118f6523793d99b3634455e9721836ea5e0592b9 Author: Borislav Petkov Date: Thu Feb 2 21:59:35 2017 +0100 mfd: rtsx: Convert forgotten dev_info() statement to pcr_dbg() It is a debugging statement so make it be issued only then. No functionality change. Signed-off-by: Borislav Petkov Signed-off-by: Lee Jones drivers/mfd/rtsx_pcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad48ed0c5763dc08931407e455dff5acdbe96e81 Author: Adam Ford Date: Sun Jan 29 06:40:15 2017 -0600 mfd: twl4030-power: Fix pmic for boards that need vmmc1 on reboot At least two different omap3630/3730 boards booting from MMC1 fail to reboot if the "ti,twl4030-power-idle-osc-off" or "ti,twl4030-power-idle" compatible flags are set. This patch will keep the vmmc1 powered up during reboot allowing the bootloader to load. Signed-off-by: Adam Ford Signed-off-by: Lee Jones drivers/mfd/twl4030-power.c | 1 + 1 file changed, 1 insertion(+) commit f8b7ce67070ae6fe643e1319174ffe02e2e51cf7 Author: Fabrice Gasnier Date: Wed Feb 1 17:41:46 2017 +0100 mfd: stm32-timers: Fix driver removal Add missing of_platform_depopulate() upon driver removal. Signed-off-by: Fabrice Gasnier Signed-off-by: Lee Jones drivers/mfd/stm32-timers.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f36c1f62700ef9b2e913339e3b9e0d5ef8c618b0 Author: Priyalee Kushwaha Date: Fri Feb 3 18:05:43 2017 +0000 mfd: lpc_ich: Add PCI ID for Intel Cougar Mountain SoC This patches adds the first minimal support to the upstream Linux tree. Signed-off-by: Priyalee Kushwaha Signed-off-by: Alan Cox Signed-off-by: Lee Jones drivers/mfd/lpc_ich.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e04653a9dcf4d98defe2149c885382e5cc72082f Author: Archana Patni Date: Wed Feb 1 17:22:03 2017 +0100 mfd: cros_ec: Add ACPI GPE handler for LID0 devices This patch installs an ACPI GPE handler for LID0 ACPI device to indicate ACPI core that this GPE should stay enabled for lid to work in suspend to idle path. Signed-off-by: Archana Patni Signed-off-by: Thierry Escande Signed-off-by: Lee Jones drivers/mfd/Makefile | 4 +- drivers/mfd/cros_ec.c | 15 ++++-- drivers/mfd/cros_ec_acpi_gpe.c | 103 +++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/cros_ec.h | 18 +++++++ 4 files changed, 136 insertions(+), 4 deletions(-) commit 18973ceb89d5022992e5707e2b0a268ddc39b7e0 Merge: 9f7c7ce b2d4764 6d99971 4f9ab0c f7f6c06 e1d7eb0 Author: Lee Jones Date: Thu Apr 27 09:24:41 2017 +0100 Merge branches 'ib-mfd-gpio-4.12', 'ib-mfd-iio-input-4.12', 'ib-mfd-input-4.12', 'ib-mfd-leds-4.12', 'ib-mfd-phy-4.12' and 'ib-mfd-pinctrl-samsung-4.12' into ibs-for-mfd-merged commit c2701b370e6b4d0022043691b5ac7adad015e4fc Author: Oliver Hartkopp Date: Wed Apr 26 20:14:34 2017 +0200 can: fix CAN BCM build with CONFIG_PROC_FS disabled The introduced namespace support moved the BCM variables for procfs into a per-net data structure. This leads to a build failure with disabled procfs: on x86_64: when CONFIG_PROC_FS is not enabled: ../net/can/bcm.c:1541:14: error: 'struct netns_can' has no member named 'bcmproc_dir' ../net/can/bcm.c:1601:14: error: 'struct netns_can' has no member named 'bcmproc_dir' ../net/can/bcm.c:1696:11: error: 'struct netns_can' has no member named 'bcmproc_dir' ../net/can/bcm.c:1707:15: error: 'struct netns_can' has no member named 'bcmproc_dir' http://marc.info/?l=linux-can&m=149321842526524&w=2 Reported-by: Randy Dunlap Signed-off-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde net/can/bcm.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 7569b90a228ed7dfdc1f92f2c98d7a1b041f22eb Author: Christoph Hellwig Date: Tue Apr 25 18:56:44 2017 +0200 nvme-scsi: remove nvme_trans_security_protocol This function just returns the same error code and sense data as the default statement in the switch in the caller. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch drivers/nvme/host/scsi.c | 13 ------------- 1 file changed, 13 deletions(-) commit 96fd20cf3f1620d699db43cd08745f1e57e1072a Merge: d160a72 22607d6 Author: Ingo Molnar Date: Thu Apr 27 07:41:37 2017 +0200 Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull RCU updates from Paul E. McKenney: "This series greatly reduces the performance degradation of Tree SRCU on a CPU-hotplug stress test. The effect was not subtle: Mike Galbraith measured Classic SRCU at 55 seconds and Tree SRCU at more than 16 -minutes- for this test. Mike collected ftrace data that showed that Classic SRCU was auto-expediting invocations of synchronize_srcu() that found SRCU completely idle. This series therefore adds this auto-expedite capability to Tree SRCU, bringing the performance shortfall to less than ten seconds, which is a great improvement over the initial shortfall of 15 minutes." Signed-off-by: Ingo Molnar commit d0790fb6e5bc5a6bb923de9c2be7fc210d6b689b Merge: 284c43e 152c1c8 Author: Martin Schwidefsky Date: Thu Apr 27 07:29:40 2017 +0200 Merge branch 's390forkvm' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into features Pull cpacf changes for KVM from Jason Herne: Add query support for the KMA instruction. commit 020c2833dbc76b4069c9a9886b71511052d160df Author: Eric Biggers Date: Sat Mar 25 21:02:18 2017 -0700 fs: remove _submit_bh() _submit_bh() allowed submitting a buffer_head for I/O using custom bio_flags. It used to be used by jbd to set BIO_SNAP_STABLE, introduced by commit 713685111774 ("mm: make snapshotting pages for stable writes a per-bio operation"). However, the code and flag has since been removed and no _submit_bh() users remain. These days, bio_flags are mostly used internally by the block layer to track the state of bio's. As such, it doesn't really make sense for filesystems to use them instead of op_flags when wanting special behavior for block requests. Therefore, remove _submit_bh() and trim the bio_flags argument from submit_bh_wbc(). Cc: Darrick J. Wong Signed-off-by: Eric Biggers Signed-off-by: Al Viro fs/buffer.c | 19 +++++-------------- include/linux/buffer_head.h | 2 -- 2 files changed, 5 insertions(+), 16 deletions(-) commit cda37124f4e95ad5ccb11394a5802b0972668b32 Author: Eric Biggers Date: Sat Mar 25 21:15:37 2017 -0700 fs: constify tree_descr arrays passed to simple_fill_super() simple_fill_super() is passed an array of tree_descr structures which describe the files to create in the filesystem's root directory. Since these arrays are never modified intentionally, they should be 'const' so that they are placed in .rodata and benefit from memory protection. This patch updates the function signature and all users, and also constifies tree_descr.name. Signed-off-by: Eric Biggers Signed-off-by: Al Viro drivers/infiniband/hw/qib/qib_fs.c | 2 +- drivers/xen/xenfs/super.c | 4 ++-- fs/binfmt_misc.c | 2 +- fs/debugfs/inode.c | 2 +- fs/fuse/control.c | 2 +- fs/libfs.c | 2 +- fs/nfsd/nfsctl.c | 2 +- fs/tracefs/inode.c | 2 +- include/linux/fs.h | 5 +++-- kernel/bpf/inode.c | 2 +- security/inode.c | 2 +- security/selinux/selinuxfs.c | 4 ++-- security/smack/smackfs.c | 2 +- 13 files changed, 17 insertions(+), 16 deletions(-) commit a0c111b49bbe11c3970bc668600e3b61fbbb7fca Author: Geliang Tang Date: Sun Apr 9 09:32:14 2017 +0800 fs: drop duplicate header percpu-rwsem.h Drop duplicate header percpu-rwsem.h from linux/fs.h. Signed-off-by: Geliang Tang Signed-off-by: Al Viro include/linux/fs.h | 1 - 1 file changed, 1 deletion(-) commit a80f2d2224544f708b50091b18753f4b530f70c1 Author: Fabian Frederick Date: Mon Apr 24 22:13:10 2017 +0200 fs/affs: bugfix: Write files greater than page size on OFS Previous AFFS patch fixed OFS write operations but unveiled another bug: files greater than 4KB are being created with a wrong size resulting in errors like the following: dd if=/dev/zero of=file bs=4097 count=1 cp file /mnt/affs/ cp: error writing '/mnt/affs/file': Bad address Signed-off-by: Fabian Frederick Signed-off-by: Al Viro fs/affs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 077e073e8f9ebc6bdd3f3f0324b16db07147a232 Author: Fabian Frederick Date: Mon Apr 24 22:12:57 2017 +0200 fs/affs: bugfix: enable writes on OFS disks We called unconditionally affs_bread_ino() with create 0 resulting in "error (device ...): get_block(): strange block request 0" when trying to write on AFFS OFS format. This patch adds create parameter to that function. 0 for affs_readpage_ofs() 1 for affs_write_begin_ofs() Bug was found here: https://bugzilla.kernel.org/show_bug.cgi?id=114961 Signed-off-by: Fabian Frederick Signed-off-by: Al Viro fs/affs/file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a9d6cfb70f71e3d7fb4fe90db40f965e7096bdab Author: Fabian Frederick Date: Sat Apr 15 08:55:11 2017 +0200 fs/affs: remove node generation check node generation has to be stored on disk. AFAICS we won't be able to manage it on AFFS. This patch removes relevant check in affs_nfs_get_inode() Signed-off-by: Fabian Frederick Signed-off-by: Al Viro fs/affs/namei.c | 5 ----- 1 file changed, 5 deletions(-) commit d2d58e0e0d6c750941147e505f4263239427e359 Author: Fabian Frederick Date: Sat Apr 15 08:54:56 2017 +0200 fs/affs: import amigaffs.h Have that file in global include/linux is not needed. Signed-off-by: Fabian Frederick Signed-off-by: Al Viro fs/affs/affs.h | 2 +- fs/affs/amigaffs.h | 144 +++++++++++++++++++++++++++++++++++++++++++++++ include/linux/amigaffs.h | 144 ----------------------------------------------- 3 files changed, 145 insertions(+), 145 deletions(-) commit f1bf90724de652efdf493ea877ee050e7e6091c4 Author: Fabian Frederick Date: Sat Apr 15 08:54:36 2017 +0200 fs/affs: bugfix: make symbolic links work again AFFS symbolic links were broken since kernel 2.6.29 Problem was bisected to the following commit ebd09abbd969 ("vfs: ensure page symlinks are NUL-terminated") commit 035146851cfa ("vfs: introduce helper function to safely NUL-terminate symlinks") AFFS wasn't setting inode size when reading symbolic link from disk or creating a new one. Result was zero allocation in pagecache. ln -s file symlink ls -lrt file symlink -> This patch adds inode isize information on inode get and symbolic link addition. Signed-off-by: Fabian Frederick Signed-off-by: Al Viro fs/affs/inode.c | 1 + fs/affs/namei.c | 1 + 2 files changed, 2 insertions(+) commit b1513c35317c106a1588f3ab32f6888f0e2afd71 Merge: 78a57b4 f832460 Author: David S. Miller Date: Wed Apr 26 22:39:08 2017 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Signed-off-by: David S. Miller commit 22607d66bbc3e81140d3bcf08894f4378eb36428 Author: Paul E. McKenney Date: Tue Apr 25 14:03:11 2017 -0700 srcu: Specify auto-expedite holdoff time On small systems, in the absence of readers, expedited SRCU grace periods can complete in less than a microsecond. This means that an eight-CPU system can have all CPUs doing synchronize_srcu() in a tight loop and almost always expedite. This might actually be desirable in some situations, but in general it is a good way to needlessly burn CPU cycles. And in those situations where it is desirable, your friend is the function synchronize_srcu_expedited(). For other situations, this commit adds a kernel parameter that specifies a holdoff between completing the last SRCU grace period and auto-expediting the next. If the next grace period starts before the holdoff expires, auto-expediting is disabled. The holdoff is 50 microseconds by default, and can be tuned to the desired number of nanoseconds. A value of zero disables auto-expediting. Signed-off-by: Paul E. McKenney Tested-by: Mike Galbraith Documentation/admin-guide/kernel-parameters.txt | 8 ++++++++ include/linux/srcutree.h | 1 + kernel/rcu/srcutree.c | 18 +++++++++++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) commit 2da4b2a7fd8de52c44fa83c59f00d38a0d90caae Author: Paul E. McKenney Date: Tue Apr 25 11:34:40 2017 -0700 srcu: Expedite first synchronize_srcu() when idle Classic SRCU in effect expedites the first synchronize_srcu() when SRCU is idle, and Mike Galbraith demonstrated that some use cases do in fact rely on this behavior. In particular, Mike showed that Steven Rostedt's hotplug stress script takes 55 seconds with Classic SRCU and more than 16 -minutes- when running Tree SRCU. Assuming that each Tree SRCU's call to synchronize_srcu() takes four milliseconds, this implies that Steven's test invokes synchronize_srcu() in isolation, but more than once per 200 microseconds. Mike used ftrace to demonstrate that the time between successive calls to synchronize_srcu() ranged from 118 to 342 microseconds, with one outlier at 80 milliseconds. This data clearly indicates that Tree SRCU needs to expedite the first invocation of synchronize_srcu() during an SRCU idle period. This commit therefor introduces a srcu_might_be_idle() function that probabilistically checks whether or not SRCU is idle. This function is used by synchronize_rcu() as an additional criterion in deciding whether or not to expedite. (Hat trick to Peter Zijlstra for his earlier suggestion that this might in fact be a problem. Which for all I know might have motivated Mike to look into it.) Reported-by: Mike Galbraith Signed-off-by: Paul E. McKenney Tested-by: Mike Galbraith kernel/rcu/srcutree.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) commit 1e9a038b7fe9a8c10ef1238f4e695d5fbe0dd594 Author: Paul E. McKenney Date: Mon Apr 24 16:02:09 2017 -0700 srcu: Expedited grace periods with reduced memory contention Commit f60d231a87c5 ("srcu: Crude control of expedited grace periods") introduced a per-srcu_struct atomic counter to track outstanding requests for grace periods. This works, but represents a memory-contention bottleneck. This commit therefore uses the srcu_node combining tree to remove this bottleneck. This commit adds new ->srcu_gp_seq_needed_exp fields to the srcu_data, srcu_node, and srcu_struct structures, which track the farthest-in-the-future grace period that must be expedited, which in turn requires that all nearer-term grace periods also be expedited. Requests for expediting start with the srcu_data structure, run up through the srcu_node tree, and end at the srcu_struct structure. Note that it may be necessary to expedite a grace period that just now started, and this is handled by a new srcu_funnel_exp_start() function, which is invoked when the grace period itself is already in its way, but when that grace period was not marked as expedited. A new srcu_get_delay() function returns zero if there is at least one expedited SRCU grace period in flight, or SRCU_INTERVAL otherwise. This function is used to calculate delays: Normal grace periods are allowed to extend in order to cover more requests with a given grace-period computation, which decreases per-request overhead. Signed-off-by: Paul E. McKenney Tested-by: Mike Galbraith include/linux/srcutree.h | 4 +- kernel/rcu/srcutree.c | 135 +++++++++++++++++++++++++++++++++-------------- 2 files changed, 98 insertions(+), 41 deletions(-) commit e7731da36f107e87b0ea137265ebcc991972e14c Author: Colin Ian King Date: Tue Apr 25 22:37:10 2017 +0100 scsi: qla4xxx: fix spelling mistake: "Tempalate" -> "Template" trivial fix to spelling mistake in DEBUG2 debug message Signed-off-by: Colin Ian King Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qla4xxx/ql4_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9385c5be5ce03d023a1cd860376aed7fd1f3a5b3 Author: Colin Ian King Date: Tue Apr 25 18:36:19 2017 +0100 scsi: stex: make S6flag static This module specific flag can be made static as it does not need to be in global scope. Signed-off-by: Colin Ian King Acked-by: Charles Chiou Signed-off-by: Martin K. Petersen drivers/scsi/stex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0e3a6acdebc5b98c65a379460df1b4b2fe6c0d3 Author: Wei Yongjun Date: Wed Apr 26 15:43:59 2017 +1000 scsi: mac_esp: fix to pass correct device identity to free_irq() free_irq() expects the same device identity that was passed to corresponding request_irq(), otherwise the IRQ is not freed. Signed-off-by: Wei Yongjun Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen drivers/scsi/mac_esp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8e8ab1e4c1e0879f21e39504bf7fc01c0b5865f Author: Bob Moore Date: Wed Apr 26 16:19:10 2017 +0800 ACPICA: Local cache support: Allow small cache objects ACPICA commit 9c54b8bbd483421ef2fef5225c00f1655b4a491c Remove apparently arbitrary restriction on the size of the cache objects to 16 (in acpi_os_create_cache). Now, the input object size must be simply non-zero. Link: https://github.com/acpica/acpica/commit/9c54b8bb Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bee900db6d4d9822d8ce6b44f77d23a3c0aa3131 Author: David E. Box Date: Wed Apr 26 16:18:55 2017 +0800 ACPICA: Disassembler: Do not unconditionally remove temporary names ACPICA commit c46f496df41e53a368f877f88b70bdfc9bd6fdbe Change the Switch disassembly code to check if the conversion can be done before removing temporary (_T_x) names. Prevents invalid disassembly of AML created by older compilers (circa 2005). Link: https://github.com/acpica/acpica/commit/c46f496d Link: https://bugs.acpica.org/show_bug.cgi?id=1358 Link: https://bugs.acpica.org/show_bug.cgi?id=1360 Reported-by: racerrehabman@gmail.com Signed-off-by: David E. Box Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/aclocal.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit bb1e23e66e6237ff7a1824b37366540a89149c33 Author: Lv Zheng Date: Wed Apr 26 16:18:49 2017 +0800 ACPICA: iasl: Fix IORT SMMU GSI disassembling ACPICA commit 637b88de24a78c20478728d9d66632b06fcaa5bf If the IORT template is compiled and then iort.aml binary disassembled to iort.dsl, SMMUv1 node lists incorrect offset for SMMU_Nsg_cfg_irpt Interrupt: [0ECh 0236 8] SMMU_Nsg_irpt Interrupt : 0000000000000000 [0ECh 0236 8] SMMU_Nsg_cfg_irpt Interrupt : 0000000000000000 This is because iasl hasn't implemented SMMU GSI decoding yet. This patch fixes this issue by preparing structures for decoding IORT SMMU GSI. ACPICA BZ 1340, reported by Alexei Fedorov, fixed by Lv Zheng. Link: https://github.com/acpica/acpica/commit/637b88de Link: https://bugs.acpica.org/show_bug.cgi?id=1340 Reported-by: Alexei Fedorov Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki include/acpi/actbl2.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9ff5a21a50301ef16aeb2e3937867de7eb0af030 Author: Bob Moore Date: Wed Apr 26 16:18:40 2017 +0800 ACPICA: Cleanup AML opcode definitions, no functional change ACPICA commit ec969d38fef3be95358e65f0dd071b5f2c045b6b This change is a cleanup and further standardization of the AML opcode defines in amlcode.h Improves the readability and maintainability of the source code. Link: https://github.com/acpica/acpica/commit/ec969d38 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/amlcode.h | 97 ++++++++++++++++++----------------------- drivers/acpi/acpica/dbxface.c | 2 +- drivers/acpi/acpica/dscontrol.c | 2 +- drivers/acpi/acpica/dsmthdat.c | 3 +- drivers/acpi/acpica/dsobject.c | 15 ++++--- drivers/acpi/acpica/dsopcode.c | 4 +- drivers/acpi/acpica/dsutils.c | 8 ++-- drivers/acpi/acpica/dswexec.c | 2 +- drivers/acpi/acpica/dswload2.c | 2 +- drivers/acpi/acpica/exmisc.c | 16 +++---- drivers/acpi/acpica/exnames.c | 4 +- drivers/acpi/acpica/exoparg1.c | 17 ++++---- drivers/acpi/acpica/exoparg2.c | 4 +- drivers/acpi/acpica/exoparg6.c | 16 +++---- drivers/acpi/acpica/exresolv.c | 3 +- drivers/acpi/acpica/exstore.c | 5 ++- drivers/acpi/acpica/exstoren.c | 2 +- drivers/acpi/acpica/nsaccess.c | 2 +- drivers/acpi/acpica/nsutils.c | 6 +-- drivers/acpi/acpica/psargs.c | 6 +-- drivers/acpi/acpica/psloop.c | 2 +- drivers/acpi/acpica/psopcode.c | 10 ++--- drivers/acpi/acpica/psparse.c | 6 +-- drivers/acpi/acpica/pstree.c | 2 +- 24 files changed, 114 insertions(+), 122 deletions(-) commit 069f9bf454a61d6fafa415dc2a8713938196d650 Author: Lv Zheng Date: Wed Apr 26 16:18:33 2017 +0800 ACPICA: Debugger: Add interpreter blocking mark for single-step mode ACPICA commit 91af5d18cd40b35f9d5568fb95fc403ff12474e5 When the single-step mode is used, evaluation is actually split by the single-step command prompts, so this patch correctly marks the evaluation segment with interpreter lock release/acquire. This in return fixes an issue that in the single-step command prompt, commands requiring to hold the namespace lock (ex. namespace) cannot be executed. ACPICA BZ 1362, fixed by Lv Zheng. Link: https://github.com/acpica/acpica/commit/91af5d18 Link: https://bugs.acpica.org/show_bug.cgi?id=1362 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dbxface.c | 3 +++ 1 file changed, 3 insertions(+) commit 1f67ef69941e252d5a3558426338a84acce73d89 Author: Colin Ian King Date: Wed Apr 26 16:18:25 2017 +0800 ACPICA: debugger: fix memory leak on Pathname ACPICA commit 1db14dc88f308119634d77ab9dcb6586b9fe4777 On the error return path when acpi_get_object_info fails the allocated pathname is not free'd leading to a memory leak. Free pathname to fix this. Link: https://github.com/acpica/acpica/commit/1db14dc8 Signed-off-by: Colin Ian King Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dbmethod.c | 1 + 1 file changed, 1 insertion(+) commit ed7f8bc91a8df96662b21accc9a5abe2c292014a Author: Bob Moore Date: Wed Apr 26 16:18:16 2017 +0800 ACPICA: Update for automatic repair code for objects returned by evaluate_object ACPICA commit 6b58810b9aad7358fbf1a0f4057fefa8d29838d3 This change fixes two instances where the repair code made an incorrect assumption about how reference counts are assigned to package objects. Resolves issues where a warning was issued about a "large reference count" -- which usually indicates an attempt to delete an object that has previously been poisoned and released into the object cache. Link: https://github.com/acpica/acpica/commit/6b58810b Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/nsrepair.c | 16 +++------------- drivers/acpi/acpica/nsrepair2.c | 6 +----- 2 files changed, 4 insertions(+), 18 deletions(-) commit 3b2d69114fefa474fca542e51119036dceb4aa6f Author: Seunghun Han Date: Wed Apr 26 16:18:08 2017 +0800 ACPICA: Namespace: fix operand cache leak ACPICA commit a23325b2e583556eae88ed3f764e457786bf4df6 I found some ACPI operand cache leaks in ACPI early abort cases. Boot log of ACPI operand cache leak is as follows: >[ 0.174332] ACPI: Added _OSI(Module Device) >[ 0.175504] ACPI: Added _OSI(Processor Device) >[ 0.176010] ACPI: Added _OSI(3.0 _SCP Extensions) >[ 0.177032] ACPI: Added _OSI(Processor Aggregator Device) >[ 0.178284] ACPI: SCI (IRQ16705) allocation failed >[ 0.179352] ACPI Exception: AE_NOT_ACQUIRED, Unable to install System Control Interrupt handler (20160930/evevent-131) >[ 0.180008] ACPI: Unable to start the ACPI Interpreter >[ 0.181125] ACPI Error: Could not remove SCI handler (20160930/evmisc-281) >[ 0.184068] kmem_cache_destroy Acpi-Operand: Slab cache still has objects >[ 0.185358] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.10.0-rc3 #2 >[ 0.186820] Hardware name: innotek gmb_h virtual_box/virtual_box, BIOS virtual_box 12/01/2006 >[ 0.188000] Call Trace: >[ 0.188000] ? dump_stack+0x5c/0x7d >[ 0.188000] ? kmem_cache_destroy+0x224/0x230 >[ 0.188000] ? acpi_sleep_proc_init+0x22/0x22 >[ 0.188000] ? acpi_os_delete_cache+0xa/0xd >[ 0.188000] ? acpi_ut_delete_caches+0x3f/0x7b >[ 0.188000] ? acpi_terminate+0x5/0xf >[ 0.188000] ? acpi_init+0x288/0x32e >[ 0.188000] ? __class_create+0x4c/0x80 >[ 0.188000] ? video_setup+0x7a/0x7a >[ 0.188000] ? do_one_initcall+0x4e/0x1b0 >[ 0.188000] ? kernel_init_freeable+0x194/0x21a >[ 0.188000] ? rest_init+0x80/0x80 >[ 0.188000] ? kernel_init+0xa/0x100 >[ 0.188000] ? ret_from_fork+0x25/0x30 When early abort is occurred due to invalid ACPI information, Linux kernel terminates ACPI by calling acpi_terminate() function. The function calls acpi_ns_terminate() function to delete namespace data and ACPI operand cache (acpi_gbl_module_code_list). But the deletion code in acpi_ns_terminate() function is wrapped in ACPI_EXEC_APP definition, therefore the code is only executed when the definition exists. If the define doesn't exist, ACPI operand cache (acpi_gbl_module_code_list) is leaked, and stack dump is shown in kernel log. This causes a security threat because the old kernel (<= 4.9) shows memory locations of kernel functions in stack dump, therefore kernel ASLR can be neutralized. To fix ACPI operand leak for enhancing security, I made a patch which removes the ACPI_EXEC_APP define in acpi_ns_terminate() function for executing the deletion code unconditionally. Link: https://github.com/acpica/acpica/commit/a23325b2 Signed-off-by: Seunghun Han Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/nsutils.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 2e337c72a3c24f0cf9bf639dc93de0f887d56dba Author: Bob Moore Date: Wed Apr 26 16:18:02 2017 +0800 ACPICA: Fix several incorrect invocations of ACPICA return macro ACPICA commit 521bedc49b42e59116de1b54dcd95d30d36cac90 Not needed since there is no function tracing for the validation function in hwvalid.c Link: https://github.com/acpica/acpica/commit/521bedc4 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/hwvalid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1b8f77aa0deca22a995a4bdd65914aa24bda0386 Author: Bob Moore Date: Wed Apr 26 16:17:56 2017 +0800 ACPICA: Fix a module for excessive debug output ACPICA commit 5ecc479f62a57ab1e9d25ec3b0b84682fdf8a543 hwvalid.c - no trace needed for validate I/O function. Link: https://github.com/acpica/acpica/commit/5ecc479f Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/hwvalid.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a20286249e4120c7997353ff8980248302c653b5 Author: Bob Moore Date: Wed Apr 26 16:17:50 2017 +0800 ACPICA: Update some function headers, no funtional change ACPICA commit 57c1b2d3e2f9ff7f465b0f08bfb38294101fe0b3 utxferror, update function headers. Link: https://github.com/acpica/acpica/commit/57c1b2d3 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utxferror.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit da28e1955d7fc228870f437693cfae8ce486ad9f Author: Bob Moore Date: Wed Apr 26 16:17:43 2017 +0800 ACPICA: Disassembler: Enhance resource descriptor detection ACPICA commit ba5020b2dbe1538e4ccd7ac2dfd8843a690c007f This change enhances the detection of resource descriptors within a buffer object. For the end_tag opcode, the second byte is defined to be either a checksum or zero. All known ASL compilers insert a zero for this byte. The disassembler now ensures this byte is zero before deciding that a buffer should be disassembled to a resource descriptor. This helps eliminate incorrect decisions when attempting to disassemble a buffer to a resource descriptor. Link: https://github.com/acpica/acpica/commit/ba5020b2 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utresrc.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f481973d5efdb63b7c6ca6b0ecd2b8462556a461 Author: Mahesh Rajashekhara Date: Wed Apr 5 16:14:16 2017 +0530 scsi: aacraid: pci_alloc_consistent() failures on ARM64 There were pci_alloc_consistent() failures on ARM64 platform. Use dma_alloc_coherent() with GFP_KERNEL flag DMA memory allocations. Signed-off-by: Mahesh Rajashekhara [hch: tweaked indentation, removed memsets] Signed-off-by: Christoph Hellwig Acked-by: Dave Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aachba.c | 13 ++++++------- drivers/scsi/aacraid/commctrl.c | 6 ++++-- drivers/scsi/aacraid/comminit.c | 3 +-- drivers/scsi/aacraid/commsup.c | 20 +++++++++++--------- drivers/scsi/aacraid/linit.c | 8 ++++---- drivers/scsi/aacraid/rx.c | 16 +++++++++------- 6 files changed, 35 insertions(+), 31 deletions(-) commit 0de0e198bc7191a0e46cf71f66fec4d07ca91396 Author: Dan Williams Date: Tue Apr 25 12:58:31 2017 -0700 ACPI / sysfs: fix acpi_get_table() leak / acpi-sysfs denial of service Reading an ACPI table through the /sys/firmware/acpi/tables interface more than 65,536 times leads to the following log message: ACPI Error: Table ffff88033595eaa8, Validation count is zero after increment (20170119/tbutils-423) ...and the table being unavailable until the next reboot. Add the missing acpi_put_table() so the table ->validation_count is decremented after each read. Reported-by: Anush Seetharaman Fixes: 174cc7187e6f "ACPICA: Tables: Back port acpi_get_table_with_size() ..." Signed-off-by: Dan Williams Cc: 4.10+ # 4.10+ Signed-off-by: Rafael J. Wysocki drivers/acpi/sysfs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 6cf161150d815da0ee8cff158b185bc33dca3a34 Author: Tomohiro Kusumi Date: Wed Apr 26 20:28:58 2017 +0300 scsi: ufs: make ufshcd_get_lists_status() register operation obvious It could be just cmp 0xe instead of >>1 and cmp 0x7, with readable code. Signed-off-by: Tomohiro Kusumi Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 11 +---------- drivers/scsi/ufs/ufshci.h | 4 ++++ 2 files changed, 5 insertions(+), 10 deletions(-) commit d7e2ddd5e502c93dc29114cf6de5fba339b28e4d Author: Tomohiro Kusumi Date: Thu Apr 20 15:01:44 2017 +0300 scsi: ufs: use MASK_EE_STATUS MASK_EE_STATUS added by 66ec6d59 was unused, but it seems to have been defined to do this. Signed-off-by: Tomohiro Kusumi Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 58dd8abfad028633d36e2ba81109bd62f6e6e215 Author: Hanjun Guo Date: Sat Apr 22 11:23:44 2017 +0800 i2c: designware: Add ACPI HID for Hisilicon Hip07/08 I2C controller Add ACPI HID HISI02A1 and HISI02A2 for Hisilicon Hip07/08, which have different clock frequency. Signed-off-by: Hanjun Guo Acked-by: Jarkko Nikula Signed-off-by: Rafael J. Wysocki drivers/i2c/busses/i2c-designware-platdrv.c | 2 ++ 1 file changed, 2 insertions(+) commit 6e14cf361a0cf3bbe0026557427a7eb2f64d3157 Author: Hanjun Guo Date: Sat Apr 22 11:23:43 2017 +0800 ACPI / APD: Add clock frequency for Hisilicon Hip07/08 I2C controller I2C clock frequency of Designware ip for Hisilicon Hip07 is 200M, but 250M for Hip08, use two ACPI IDs to differentiate them. Signed-off-by: Hanjun Guo Reviewed-by: Kefeng Wang Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_apd.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 753a448c27a0238dc1db58cd6954e8ef511a97e1 Author: Hans de Goede Date: Fri Apr 21 12:47:41 2017 +0200 ACPI / bus: Add INT0002 to list of always-present devices The INT0002 device is necessary to clear wakeup interrupt sources on Cherry Trail devices, without it we get nobody cared IRQ msgs and some systems don't properly resume at all without it. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/x86/utils.c | 5 +++++ 1 file changed, 5 insertions(+) commit b7ecf663c75eed1e764f57281f9508c49c18516e Author: Hans de Goede Date: Fri Apr 21 12:47:40 2017 +0200 ACPI / bus: Introduce a list of ids for "always present" devices Several Bay / Cherry Trail devices (all of which ship with Windows 10) hide the LPSS PWM controller in ACPI, typically the _STA method looks like this: Method (_STA, 0, NotSerialized) // _STA: Status { If (OSID == One) { Return (Zero) } Return (0x0F) } Where OSID is some dark magic seen in all Cherry Trail ACPI tables making the machine behave differently depending on which OS it *thinks* it is booting, this gets set in a number of ways which we cannot control, on some newer machines it simple hardcoded to "One" aka win10. This causes the PWM controller to get hidden, which means Linux cannot control the backlight level on cht based tablets / laptops. Since loading the driver for this does no harm (the only in kernel user of it is the i915 driver, which will only uses it when it needs it), this commit makes acpi_bus_get_status() always set status to ACPI_STA_DEFAULT for the LPSS PWM device, fixing the lack of backlight control. Signed-off-by: Hans de Goede [ rjw: Rename the new file to utils.c ] Signed-off-by: Rafael J. Wysocki drivers/acpi/Makefile | 1 + drivers/acpi/bus.c | 5 +++ drivers/acpi/x86/utils.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++ include/acpi/acpi_bus.h | 9 +++++ 4 files changed, 100 insertions(+) commit bfd20f1cc85010d2f2d77e544da05cd8c149ba9b Author: Shaohua Li Date: Wed Apr 26 09:18:35 2017 -0700 x86, iommu/vt-d: Add an option to disable Intel IOMMU force on IOMMU harms performance signficantly when we run very fast networking workloads. It's 40GB networking doing XDP test. Software overhead is almost unaware, but it's the IOTLB miss (based on our analysis) which kills the performance. We observed the same performance issue even with software passthrough (identity mapping), only the hardware passthrough survives. The pps with iommu (with software passthrough) is only about ~30% of that without it. This is a limitation in hardware based on our observation, so we'd like to disable the IOMMU force on, but we do want to use TBOOT and we can sacrifice the DMA security bought by IOMMU. I must admit I know nothing about TBOOT, but TBOOT guys (cc-ed) think not eabling IOMMU is totally ok. So introduce a new boot option to disable the force on. It's kind of silly we need to run into intel_iommu_init even without force on, but we need to disable TBOOT PMR registers. For system without the boot option, nothing is changed. Signed-off-by: Shaohua Li Signed-off-by: Joerg Roedel Documentation/admin-guide/kernel-parameters.txt | 9 +++++++++ arch/x86/kernel/tboot.c | 3 +++ drivers/iommu/intel-iommu.c | 18 ++++++++++++++++++ include/linux/dma_remapping.h | 1 + 4 files changed, 31 insertions(+) commit e5f2e0671e7ffb0723c5d96684d8fa1ea2403074 Author: Luca Coelho Date: Wed Apr 26 10:58:54 2017 +0300 mac80211: make multicast variable a bool in ieee80211_accept_frame() The multicast variable in the ieee80211_accept_frame() function is treated as a boolean, but defined as int. Fix that. Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a199068230bd8074f2e39025a2216390ea5b829 Author: Johannes Berg Date: Wed Apr 26 10:58:53 2017 +0300 mac80211: disentangle iflist_mtx and chanctx_mtx At least on iwlwifi, sometimes lockdep complains that we can lock chanctx_mtx -> mvm.mutex -> iflist_mtx (due to iterate_interfaces) and iflist_mtx -> chanctx_mtx Remove the latter dependency in mac80211 by using the RTNL that we already hold in one case, and can relatively easily achieve in the other case. Signed-off-by: Johannes Berg net/mac80211/cfg.c | 6 +----- net/mac80211/main.c | 2 ++ net/mac80211/util.c | 9 ++++++--- 3 files changed, 9 insertions(+), 8 deletions(-) commit cf147085fdda044622973a12e4e06f1c753ab677 Author: Emmanuel Grumbach Date: Wed Apr 26 10:58:51 2017 +0300 mac80211: don't parse encrypted management frames in ieee80211_frame_acked ieee80211_frame_acked is called when a frame is acked by the peer. In case this is a management frame, we check if this an SMPS frame, in which case we can update our antenna configuration. When we parse the management frame we look at the category in case it is an action frame. That byte sits after the IV in case the frame was encrypted. This means that if the frame was encrypted, we basically look at the IV instead of looking at the category. It is then theorically possible that we think that an SMPS action frame was acked where really we had another frame that was encrypted. Since the only management frame whose ack needs to be tracked is the SMPS action frame, and that frame is not a robust management frame, it will never be encrypted. The easiest way to fix this problem is then to not look at frames that were encrypted. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/status.c | 1 + 1 file changed, 1 insertion(+) commit f6601e176c8b01bc545959c091778343a8c66951 Author: Johannes Berg Date: Wed Apr 26 10:58:52 2017 +0300 ieee80211: fix kernel-doc parsing errors Some of the enum definitions are unnamed but there's still an attempt at documenting them - that doesn't work. Name them to make that work. Signed-off-by: Johannes Berg include/linux/ieee80211.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2ead3235fd7128347a60a3942b3e2048834d62aa Author: Luca Coelho Date: Wed Apr 26 10:58:48 2017 +0300 ieee80211: add FT-802.1X AKM suite selector Add the definition for FT-8021.1X AKM selector as defined in IEEE Std 802.11-2016, table 9-133. Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/linux/ieee80211.h | 1 + 1 file changed, 1 insertion(+) commit 1cbf41dbacb6c8decdf8d838bbf5ca5b448a269f Author: Luca Coelho Date: Wed Apr 26 10:58:46 2017 +0300 ieee80211: add SUITE_B AKM selectors Add the definitions for SUITE_B and SUITE_B_192 AKM selectors as defined in IEEE802.11REVmc_D5.0, table 9-132. Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/linux/ieee80211.h | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 3a3ecf1d5971b1f272124b445ef2d6b6ad3074fd Author: Arend Van Spriel Date: Fri Apr 21 13:05:02 2017 +0100 cfg80211: add request id parameter to .sched_scan_stop() signature For multiple scheduled scan support the driver needs to know which scheduled scan request is being stopped. Pass the request id in the .sched_scan_stop() callback. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath6kl/cfg80211.c | 2 +- .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 +++--- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +- include/net/cfg80211.h | 15 ++++++++------- net/mac80211/cfg.c | 3 ++- net/wireless/rdev-ops.h | 6 +++--- net/wireless/scan.c | 2 +- net/wireless/trace.h | 10 +++++----- 8 files changed, 24 insertions(+), 22 deletions(-) commit 3007e3529ce1efd9c370a7b81633e45f730ae35b Author: Arend Van Spriel Date: Fri Apr 21 13:05:01 2017 +0100 nl80211: add support for BSSIDs in scheduled scan matchsets This patch allows for the scheduled scan request to specify matchsets for specific BSSIDs. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel [docs, netlink policy fix] Signed-off-by: Johannes Berg include/net/cfg80211.h | 6 +++++- include/uapi/linux/nl80211.h | 4 ++++ net/wireless/nl80211.c | 40 ++++++++++++++++++++++++++++++---------- 3 files changed, 39 insertions(+), 11 deletions(-) commit ca986ad9bcd3893c8b0b4cc2cafcc8cf1554409c Author: Arend Van Spriel Date: Fri Apr 21 13:05:00 2017 +0100 nl80211: allow multiple active scheduled scan requests This patch implements the idea to have multiple scheduled scan requests running concurrently. It mainly illustrates how to deal with the incoming request from user-space in terms of backward compatibility. In order to use multiple scheduled scans user-space needs to provide a flag attribute NL80211_ATTR_SCHED_SCAN_MULTI to indicate support. If not the request is treated as a legacy scan. Drivers currently supporting scheduled scan are now indicating they support a single scheduled scan request. This obsoletes WIPHY_FLAG_SUPPORTS_SCHED_SCAN. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel [clean up netlink destroy path to avoid allocations, code cleanups] Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath6kl/cfg80211.c | 2 +- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +- drivers/net/wireless/ti/wlcore/main.c | 2 +- include/net/cfg80211.h | 9 +- include/uapi/linux/nl80211.h | 12 ++- net/wireless/core.c | 29 +++--- net/wireless/core.h | 11 +- net/wireless/nl80211.c | 63 ++++++++--- net/wireless/rdev-ops.h | 2 +- net/wireless/scan.c | 115 +++++++++++++++++---- net/wireless/trace.h | 18 ++-- 13 files changed, 205 insertions(+), 64 deletions(-) commit ab81007a7b519d72f3c26d753a9fe1ffd27edc20 Author: Johannes Berg Date: Wed Apr 26 07:43:41 2017 +0200 cfg80211: simplify netlink socket owner interface deletion There's no need to allocate a portid structure and then, for each of those, walk the interfaces - we can just add a flag to each interface and walk those directly. Due to padding in the struct, we can even do it without any memory cost, and it even simplifies the code. Signed-off-by: Johannes Berg include/net/cfg80211.h | 6 ++++-- net/wireless/core.c | 26 ++++---------------------- net/wireless/core.h | 8 -------- net/wireless/nl80211.c | 22 +++++----------------- 4 files changed, 13 insertions(+), 49 deletions(-) commit 0eebd005dd07c162e6af053be0ab440dd766b1d5 Author: Bart Van Assche Date: Wed Apr 26 13:47:57 2017 -0700 scsi: Implement blk_mq_ops.show_rq() Show the SCSI CDB for pending SCSI commands in /sys/kernel/debug/block/*/mq/*/dispatch and */rq_list. An example of how SCSI commands are displayed by this code: ffff8801703245c0 {.op=READ, .cmd_flags=META PRIO, .rq_flags=DONTPREP IO_STAT STATS, .tag=14, .internal_tag=-1, .cmd=Read(10) 28 00 2a 81 1b 30 00 00 08 00} Signed-off-by: Bart Van Assche Reviewed-by: Omar Sandoval Cc: Martin K. Petersen Cc: James Bottomley Cc: Hannes Reinecke Cc: Signed-off-by: Jens Axboe drivers/scsi/Makefile | 1 + drivers/scsi/scsi_debugfs.c | 13 +++++++++++++ drivers/scsi/scsi_debugfs.h | 4 ++++ drivers/scsi/scsi_lib.c | 4 ++++ 4 files changed, 22 insertions(+) commit 2836ee4b1acbe7b396219d0677426885f14cd792 Author: Bart Van Assche Date: Wed Apr 26 13:47:56 2017 -0700 blk-mq: Add blk_mq_ops.show_rq() This new callback function will be used in the next patch to show more information about SCSI requests. Signed-off-by: Bart Van Assche Reviewed-by: Omar Sandoval Cc: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 6 +++++- include/linux/blk-mq.h | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) commit 8658dca8bd5666f50e02400f844079e520641d8c Author: Bart Van Assche Date: Wed Apr 26 13:47:55 2017 -0700 blk-mq: Show operation, cmd_flags and rq_flags names Show the operation name, .cmd_flags and .rq_flags as names instead of numbers. Signed-off-by: Bart Van Assche Reviewed-by: Omar Sandoval Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 69 insertions(+), 3 deletions(-) commit fd07dc81850e8bf26046bf7ccd7430211c9c5910 Author: Bart Van Assche Date: Wed Apr 26 13:47:54 2017 -0700 blk-mq: Make blk_flags_show() callers append a newline character This patch does not change any functionality but makes it possible to produce a single line of output with multiple flag-to-name translations. Signed-off-by: Bart Van Assche Reviewed-by: Omar Sandoval Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 65ca1ca32ca359e9d75a6fd293128d188dfc0d8a Author: Bart Van Assche Date: Wed Apr 26 13:47:53 2017 -0700 blk-mq: Move the "state" debugfs attribute one level down Move the "state" attribute from the top level to the "mq" directory as requested by Omar. Signed-off-by: Bart Van Assche Reviewed-by: Omar Sandoval Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit e869b5462f83bcc771a3301fa7c8de47ed8c74f5 Author: Bart Van Assche Date: Wed Apr 26 13:47:52 2017 -0700 blk-mq: Unregister debugfs attributes earlier We currently call blk_mq_free_queue() from blk_cleanup_queue() before we unregister the debugfs attributes for that queue in blk_release_queue(). This leaves a window open during which accessing most of the mq debugfs attributes would cause a use-after-free. Additionally, the "state" attribute allows running the queue, which we should not do after the queue has entered the "dead" state. Fix both cases by unregistering the debugfs attributes before freeing queue resources starts. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f05d1ba7871a2c20ca9ebb303aac89c9296d1f58 Author: Bart Van Assche Date: Wed Apr 26 13:47:51 2017 -0700 blk-mq: Only unregister hctxs for which registration succeeded Hctx unregistration involves calling kobject_del(). kobject_del() must not be called if kobject_add() has not been called. Hence in the error path only unregister hctxs for which registration succeeded. Signed-off-by: Bart Van Assche Cc: Omar Sandoval Cc: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-sysfs.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 62d6c9496a2bded5262ac9f675b27facb3cd4ce8 Author: Bart Van Assche Date: Wed Apr 26 13:47:50 2017 -0700 blk-mq-debugfs: Rename functions for registering and unregistering the mq directory Since the blk_mq_debugfs_*register_hctxs() functions register and unregister all attributes under the "mq" directory, rename these into blk_mq_debugfs_*register_mq(). Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 8 ++++---- block/blk-mq-sysfs.c | 6 +++--- block/blk-mq.h | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) commit 4c9e4019f1880bea7ae6e9603d14c2ed0f1c4e23 Author: Bart Van Assche Date: Wed Apr 26 13:47:49 2017 -0700 blk-mq: Let blk_mq_debugfs_register() look up the queue name A later patch will move the call of blk_mq_debugfs_register() to a function to which the queue name is not passed as an argument. To avoid having to add a 'name' argument to multiple callers, let blk_mq_debugfs_register() look up the queue name. Signed-off-by: Bart Van Assche Reviewed-by: Omar Sandoval Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 5 +++-- block/blk-mq-sysfs.c | 2 +- block/blk-mq.h | 5 ++--- 3 files changed, 6 insertions(+), 6 deletions(-) commit 2d0364c8c1a97a1d44760895a982221c06af0f35 Author: Bart Van Assche Date: Wed Apr 26 13:47:48 2017 -0700 blk-mq: Register /queue/mq after having registered /queue A later patch in this series will modify blk_mq_debugfs_register() such that it uses q->kobj.parent to determine the name of a request queue. Hence make sure that that pointer is initialized before blk_mq_debugfs_register() is called. To avoid lock inversion, protect sysfs / debugfs registration with the queue sysfs_lock instead of the global mutex all_q_mutex. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-sysfs.c | 35 ++++++++++++++++++++++++++++------- block/blk-mq.h | 1 + block/blk-sysfs.c | 6 +++--- 3 files changed, 32 insertions(+), 10 deletions(-) commit d852ed98f62e0d44f594adb850b3d6cedb5c9292 Author: Arnd Bergmann Date: Fri Apr 21 23:42:54 2017 +0200 usb: host: xhci: remove #ifdef around PM functions The #ifdef is slightly wrong as it doesn't cover the xhci_priv_resume_quirk() function, causing a harmless warning: drivers/usb/host/xhci-plat.c:58:12: error: 'xhci_priv_resume_quirk' defined but not used [-Werror=unused-function] static int xhci_priv_resume_quirk(struct usb_hcd *hcd) A simpler way to do this correctly is to use __maybe_unused annotations that let the compiler silently drop the functions when there is no reference. Fixes: b0c69b4bace3 ("usb: host: plat: Enable xHCI plat runtime PM") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 12 ++++-------- drivers/usb/host/xhci.h | 5 ----- 2 files changed, 4 insertions(+), 13 deletions(-) commit 2a76f89fa58c769241cfc21f2614705591519ae3 Author: Wei Yongjun Date: Tue Apr 25 03:11:48 2017 +0000 firmware: google memconsole: Fix return value check in platform_memconsole_init() In case of error, the function platform_device_register_simple() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: d384d6f43d1e ("firmware: google memconsole: Add coreboot support") Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/memconsole-coreboot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 856c634dd204581710157d539a37b7340fb60894 Author: Wei Yongjun Date: Wed Apr 26 13:42:52 2017 +0000 firmware: Google VPD: Fix return value check in vpd_platform_init() In case of error, the function platform_device_register_simple() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 049a59db34eb ("firmware: Google VPD sysfs driver") Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/vpd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 78a57b482aa53b040fbc2b2ef0208b54f004161b Author: Willem de Bruijn Date: Tue Apr 25 15:59:17 2017 -0400 virtio-net: on tx, only call napi_disable if tx napi is on As of tx napi, device down (`ip link set dev $dev down`) hangs unless tx napi is enabled. Else napi_enable is not called, so napi_disable will spin on test_and_set_bit NAPI_STATE_SCHED. Only call napi_disable if tx napi is enabled. Fixes: 5a719c2552ca ("virtio-net: transmit napi") Reported-by: Jason Wang Signed-off-by: Willem de Bruijn Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 96395cbbc7e94cbbe4f76cf64cf122fabc19123d Author: Arnaldo Carvalho de Melo Date: Wed Apr 26 15:49:21 2017 -0300 tools lib string: Adopt prefixcmp() from perf and subcmd Both had copies originating from git.git, move those to tools/lib/string.c, getting both tools/lib/subcmd/ and tools/perf/ to use it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-uidwtticro1qhttzd2rkrkg1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/string.h | 2 ++ tools/lib/string.c | 9 +++++++++ tools/lib/subcmd/help.c | 1 + tools/lib/subcmd/parse-options.c | 1 + tools/lib/subcmd/subcmd-util.h | 9 --------- tools/perf/util/strbuf.c | 9 --------- tools/perf/util/util.h | 2 -- 7 files changed, 13 insertions(+), 20 deletions(-) commit 1f7fe5d492a4f3f7ed74b8e15548ced38f5a59be Merge: 4c5e7a2 1bb3c73 Author: David S. Miller Date: Wed Apr 26 14:49:16 2017 -0400 Merge branch 'ibmvnic-Move-sub-crq-init-out-of-interrupt-context' Nathan Fontenot says: ==================== ibmvnic: Move sub crq init out of interrupt context The sub crqs are currently intialized in interrupt context when handling a crq response fromn the vios server. There is no reason they must be initialized there. Moving the initialization of the sub crqs to the ibmvnic_init routine allows us to do the initialization outside of interrupt context and make all of the allocations with GFP_KERNEL instead of GFP_ATOMIC. ==================== Signed-off-by: David S. Miller commit 1bb3c739ad2c0030792cd527f30865accc50c460 Author: Nathan Fontenot Date: Tue Apr 25 15:01:10 2017 -0400 ibmvnic: Move initialization of sub crqs to ibmvnic_init The sub crq structures are initialized in interrupt context while handling the response to crqs when negotiating capabilities for the driver. The sub crqs do not need to be initialized at this point and can be moved to being done from ibmvnic_init. Moving the init of the sub crqs to ibmvnic_init also allows use to allocate the memory with GFP_KERNEL instead of GFP_ATOMIC. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit d346b9bc4f652ddaf29b2d80ec7fc75d3b07124e Author: Nathan Fontenot Date: Tue Apr 25 15:01:04 2017 -0400 ibmvnic: Split initialization of scrqs to its own routine Split the sending of capability request crqs and the initialization of sub crqs into their own routines. This is a first step to moving the allocation of sub-crqs out of interrupt context. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 101 ++++++++++++++++++++----------------- 1 file changed, 54 insertions(+), 47 deletions(-) commit 4c5e7a2c0501bd531aad1d0378c589a92cb3cc31 Author: Florian Fainelli Date: Tue Apr 25 11:33:03 2017 -0700 dt-bindings: mdio: Clarify binding document The described GPIO reset property is applicable to *all* child PHYs. If we have one reset line per PHY present on the MDIO bus, these automatically become properties of the child PHY nodes. Finally, indicate how the RESET pulse width must be defined, which is the maximum value of all individual PHYs RESET pulse widths determined by reading their datasheets. Fixes: 69226896ad63 ("mdio_bus: Issue GPIO RESET to PHYs.") Signed-off-by: Florian Fainelli Reviewed-by: Roger Quadros Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/mdio.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 4629498336e48516f5a03ee2788701f1d3f20168 Merge: 038a3e8 645f4c6 Author: David S. Miller Date: Wed Apr 26 14:44:39 2017 -0400 Merge branch 'tcp-do-not-use-tcp_time_stamp-for-rcv-autotuning' Eric Dumazet says: ==================== tcp: do not use tcp_time_stamp for rcv autotuning Some devices or linux distributions use HZ=100 or HZ=250 TCP receive buffer autotuning has poor behavior caused by this choice. Since autotuning happens after 4 ms or 10 ms, short distance flows get their receive buffer tuned to a very high value, but after an initial period where it was frozen to (too small) initial value. With BBR (or other CC allowing to increase BDP), we are willing to increase tcp_rmem[2], but this receive autotuning defect is a blocker for hosts dealing with gazillions of TCP flows in the data centers, since many of them have inflated RCVBUF. Risk of OOM is too high. Note that TSO autodefer, tcp cubic, and TCP TS options (RFC 7323) also suffer from our dependency to jiffies (via tcp_time_stamp). We have ongoing efforts to improve all that in the future. ==================== Signed-off-by: David S. Miller commit 645f4c6f2ebd040688cc2a5f626ffc909e66ccf2 Author: Eric Dumazet Date: Tue Apr 25 10:15:41 2017 -0700 tcp: switch rcv_rtt_est and rcvq_space to high resolution timestamps Some devices or distributions use HZ=100 or HZ=250 TCP receive buffer autotuning has poor behavior caused by this choice. Since autotuning happens after 4 ms or 10 ms, short distance flows get their receive buffer tuned to a very high value, but after an initial period where it was frozen to (too small) initial value. With tp->tcp_mstamp introduction, we can switch to high resolution timestamps almost for free (at the expense of 8 additional bytes per TCP structure) Note that some TCP stacks use usec TCP timestamps where this patch makes even more sense : Many TCP flows have < 500 usec RTT. Hopefully this finer TS option can be standardized soon. Tested: HZ=100 kernel ./netperf -H lpaa24 -t TCP_RR -l 1000 -- -r 10000,10000 & Peer without patch : lpaa24:~# ss -tmi dst lpaa23 ... skmem:(r0,rb8388608,...) rcv_rtt:10 rcv_space:3210000 minrtt:0.017 Peer with the patch : lpaa23:~# ss -tmi dst lpaa24 ... skmem:(r0,rb428800,...) rcv_rtt:0.069 rcv_space:30000 minrtt:0.017 We can see saner RCVBUF, and more precise rcv_rtt information. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller include/linux/tcp.h | 12 ++++++------ net/ipv4/tcp.c | 2 +- net/ipv4/tcp_input.c | 28 +++++++++++++++++----------- 3 files changed, 24 insertions(+), 18 deletions(-) commit a6db50b81e3f20b2b692bbddd35d9484057eae9d Author: Eric Dumazet Date: Tue Apr 25 10:15:40 2017 -0700 tcp: remove ack_time from struct tcp_sacktag_state It is no longer needed, everything uses tp->tcp_mstamp instead. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 4 ---- 1 file changed, 4 deletions(-) commit 7e0ca8a4c19c5fbaa802ffd609f5f9ab9249af5d Author: Eric Dumazet Date: Tue Apr 25 10:15:39 2017 -0700 tcp: use tp->tcp_mstamp in tcp_clean_rtx_queue() Following patch will remove ack_time from struct tcp_sacktag_state Same info is now found in tp->tcp_mstamp Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2329f102d846214e449941289c7009e16be01a0 Author: Eric Dumazet Date: Tue Apr 25 10:15:38 2017 -0700 tcp: do not pass timestamp to tcp_rack_advance() No longer needed, since tp->tcp_mstamp holds the information. This is needed to remove sack_state.ack_time in a following patch. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller include/net/tcp.h | 3 +-- net/ipv4/tcp_input.c | 6 ++---- net/ipv4/tcp_recovery.c | 5 ++--- 3 files changed, 5 insertions(+), 9 deletions(-) commit 88d5c65098e5d15f2cea81f90bb6ecc167e1aa3b Author: Eric Dumazet Date: Tue Apr 25 10:15:37 2017 -0700 tcp: do not pass timestamp to tcp_rate_gen() No longer needed, since tp->tcp_mstamp holds the information. This is needed to remove sack_state.ack_time in a following patch. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller include/net/tcp.h | 2 +- net/ipv4/tcp_input.c | 3 +-- net/ipv4/tcp_rate.c | 7 ++++--- 3 files changed, 6 insertions(+), 6 deletions(-) commit 1317a9d69f5fa0f5417237772f55a4aac49f7921 Author: Eric Dumazet Date: Tue Apr 25 10:15:36 2017 -0700 tcp: do not pass timestamp to tcp_fastretrans_alert() Not used anymore now tp->tcp_mstamp holds the information. This is needed to remove sack_state.ack_time in a following patch. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit efab8f85826afbbfe4b0ca9208e006aabbd2df3a Author: Eric Dumazet Date: Tue Apr 25 10:15:35 2017 -0700 tcp: do not pass timestamp to tcp_rack_identify_loss() Not used anymore now tp->tcp_mstamp holds the information. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 128eda86bebeacefb0fcc64cab0155aa76857c92 Author: Eric Dumazet Date: Tue Apr 25 10:15:34 2017 -0700 tcp: do not pass timestamp to tcp_rack_mark_lost() This is no longer used, since tcp_rack_detect_loss() takes the timestamp from tp->tcp_mstamp Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller include/net/tcp.h | 2 +- net/ipv4/tcp_input.c | 2 +- net/ipv4/tcp_recovery.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 7c1c7308592f0f261836a96e37b7835ffd10d85b Author: Eric Dumazet Date: Tue Apr 25 10:15:33 2017 -0700 tcp: do not pass timestamp to tcp_rack_detect_loss() We can use tp->tcp_mstamp as it contains a recent timestamp. This removes a call to skb_mstamp_get() from tcp_rack_reo_timeout() Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_recovery.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 69e996c58a35db9ca79b3f021a15bcd22202e1c0 Author: Eric Dumazet Date: Tue Apr 25 10:15:32 2017 -0700 tcp: add tp->tcp_mstamp field We want to use precise timestamps in TCP stack, but we do not want to call possibly expensive kernel time services too often. tp->tcp_mstamp is guaranteed to be updated once per incoming packet. We will use it in the following patches, removing specific skb_mstamp_get() calls, and removing ack_time from struct tcp_sacktag_state. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller include/linux/tcp.h | 1 + net/ipv4/tcp_input.c | 3 +++ 2 files changed, 4 insertions(+) commit 3caeafce5392a8eba7b36d0d097d403cacc66e2d Author: Arnaldo Carvalho de Melo Date: Wed Apr 26 15:40:31 2017 -0300 perf units: Move parse_tag_value() to units.[ch] Its basically to do units handling, so move to a more appropriately named object. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-90ob9vfepui24l8l2makhd9u@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/units.c | 29 +++++++++++++++++++++++++++++ tools/perf/util/units.h | 7 +++++++ tools/perf/util/util.c | 27 --------------------------- tools/perf/util/util.h | 7 ------- 4 files changed, 36 insertions(+), 34 deletions(-) commit 038a3e858de4e3ddf42c330a22b7efcddbc0a81a Author: Florian Westphal Date: Tue Apr 25 11:41:34 2017 +0200 rhashtable: remove insecure_max_entries param no users in the tree, insecure_max_entries is always set to ht->p.max_size * 2 in rhtashtable_init(). Replace only spot that uses it with a ht->p.max_size check. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller include/linux/rhashtable.h | 6 ++---- lib/rhashtable.c | 6 ------ 2 files changed, 2 insertions(+), 10 deletions(-) commit 907bfcd8d8a616ca794ba187f6bf1b0e12b3a8dd Author: Dan Carpenter Date: Fri Apr 14 22:11:53 2017 +0300 orangefs: handle zero size write in debugfs If we write zero bytes to this debugfs file, then it will cause an underflow when we do copy_from_user(buf, ubuf, count - 1). Debugfs can normally only be written to by root so the impact of this is low. Signed-off-by: Dan Carpenter Signed-off-by: Mike Marshall fs/orangefs/orangefs-debugfs.c | 3 +++ 1 file changed, 3 insertions(+) commit b5a9d61eebdd0016ccb383b25a5c3d04977a6549 Author: Martin Brandenburg Date: Tue Apr 25 15:38:07 2017 -0400 orangefs: do not wait for timeout if umounting When the computer is turned off, all the processes are killed and then all the filesystems are umounted. OrangeFS should not wait for the userspace daemon to come back in that case. This only works for plain umount(2). To actually take advantage of this interactively, `umount -f' is needed; otherwise umount will issue a statfs first, which will wait for the userspace daemon to come back. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/waitqueue.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit b7a57ccab891584d00ae03dce1176b2d4cbe08e7 Author: Martin Brandenburg Date: Tue Apr 25 15:38:06 2017 -0400 orangefs: return from orangefs_devreq_read quickly if possible It is not necessary to take the lock and search through the request list if the list is empty. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/devorangefs-req.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9d286b0d8207a70d7e0ffbd5be864ff7a62de05a Author: Martin Brandenburg Date: Tue Apr 25 15:38:05 2017 -0400 orangefs: ensure the userspace component is unmounted if mount fails If the mount is aborted after userspace has been asked to mount, userspace must be told to unmount. Ordinarily orangefs_kill_sb does the unmount. However it cannot be called if the superblock has not been set up. This is a very narrow window. The NULL fs_id is not unmounted. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/orangefs-utils.c | 35 ----------------------------------- fs/orangefs/super.c | 28 +++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 36 deletions(-) commit 53950ef541675df48c219a8d665111a0e68dfc2f Author: Martin Brandenburg Date: Tue Apr 25 15:38:04 2017 -0400 orangefs: do not check possibly stale size on truncate Let the server figure this out because our size might be out of date or not present. The bug was that xfs_io -f -t -c "pread -v 0 100" /mnt/foo echo "Test" > /mnt/foo xfs_io -f -t -c "pread -v 0 100" /mnt/foo fails because the second truncate did not happen if nothing had requested the size after the write in echo. Thus i_size was zero (not present) and the orangefs_setattr though i_size was zero and there was nothing to do. Signed-off-by: Martin Brandenburg Cc: stable@vger.kernel.org Signed-off-by: Mike Marshall fs/orangefs/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 68a24a6cc4a6025e111c282186a2506281d79b4b Author: Martin Brandenburg Date: Tue Apr 25 15:38:03 2017 -0400 orangefs: implement statx Fortunately OrangeFS has had a getattr request mask for a long time. The server basically has two difficulty levels for attributes. Fetching any attribute except size requires communicating with the metadata server for that handle. Since all the attributes are right there, it makes sense to return them all. Fetching the size requires communicating with every I/O server (that the file is distributed across). Therefore if asked for anything except size, get everything except size, and if asked for size, get everything. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/file.c | 6 +++-- fs/orangefs/inode.c | 16 +++++++---- fs/orangefs/namei.c | 3 +++ fs/orangefs/orangefs-kernel.h | 4 ++- fs/orangefs/orangefs-utils.c | 63 +++++++++++++++++++++++++++++-------------- 5 files changed, 64 insertions(+), 28 deletions(-) commit 7b796ae37092ef520641b3a96c211c1cc67a0346 Author: Martin Brandenburg Date: Tue Apr 25 15:38:02 2017 -0400 orangefs: remove ORANGEFS_READDIR macros They are clones of the ORANGEFS_ITERATE macros in use elsewhere. Delete ORANGEFS_ITERATE_NEXT which is a hack previously used by readdir. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/dir.c | 8 ++++---- fs/orangefs/protocol.h | 9 ++------- 2 files changed, 6 insertions(+), 11 deletions(-) commit 480e3e532e31666a18520a7964bb4095d7a16b9a Author: Martin Brandenburg Date: Tue Apr 25 15:38:01 2017 -0400 orangefs: support very large directories This works by maintaining a linked list of pages which the directory has been read into rather than one giant fixed-size buffer. This replaces code which limits the total directory size to the total amount that could be returned in one server request. Since filenames are usually considerably shorter than the maximum, the old code could usually handle several server requests before running out of space. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/dir.c | 273 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 185 insertions(+), 88 deletions(-) commit 72f66b8329310b810dc9b70b08af728812d2e6c1 Author: Martin Brandenburg Date: Tue Apr 25 15:38:00 2017 -0400 orangefs: support llseek on directories This and the previous commit fix xfstests generic/257. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/dir.c | 50 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 14 deletions(-) commit 382f4581e67f57209c7aa67e39f26ba076306a2e Author: Martin Brandenburg Date: Tue Apr 25 15:37:59 2017 -0400 orangefs: rewrite readdir to fix several bugs In the past, readdir assumed that the user buffer will be large enough that all entries from the server will fit. If this was not true, entries would be skipped. Since it works now, request 512 entries rather than 96 per server operation. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/dir.c | 528 ++++++++++++++------------------------- fs/orangefs/downcall.h | 16 +- fs/orangefs/orangefs-dev-proto.h | 7 +- 3 files changed, 197 insertions(+), 354 deletions(-) commit 17930b252cd6f31163c259eaa99dd8aa630fb9ba Author: Martin Brandenburg Date: Tue Apr 25 15:37:58 2017 -0400 orangefs: do not set getattr_time on orangefs_lookup Since orangefs_lookup calls orangefs_iget which calls orangefs_inode_getattr, getattr_time will get set. Signed-off-by: Martin Brandenburg Cc: stable@vger.kernel.org Signed-off-by: Mike Marshall fs/orangefs/namei.c | 2 -- 1 file changed, 2 deletions(-) commit e675c5ec51fe2554719a7b6bcdbef0a770f2c19b Author: Martin Brandenburg Date: Tue Apr 25 15:37:57 2017 -0400 orangefs: clean up oversize xattr validation Also don't check flags as this has been validated by the VFS already. Fix an off-by-one error in the max size checking. Stop logging just because userspace wants to write attributes which do not fit. This and the previous commit fix xfstests generic/020. Signed-off-by: Martin Brandenburg Cc: stable@vger.kernel.org Signed-off-by: Mike Marshall fs/orangefs/xattr.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) commit a956af337b9ff25822d9ce1a59c6ed0c09fc14b9 Author: Martin Brandenburg Date: Tue Apr 25 15:37:56 2017 -0400 orangefs: fix bounds check for listxattr Signed-off-by: Martin Brandenburg Cc: stable@vger.kernel.org Signed-off-by: Mike Marshall fs/orangefs/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 418ce3eb66885e409eb3fef5c19bd037435241c5 Author: Martin Brandenburg Date: Tue Apr 25 15:37:55 2017 -0400 orangefs: remove unused get_fsid_from_ino Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/orangefs-kernel.h | 5 ----- 1 file changed, 5 deletions(-) commit 5068b52f732157385d9dccd205bc4043da3a3cce Author: Arnaldo Carvalho de Melo Date: Wed Apr 26 15:31:57 2017 -0300 perf ui gtk: Move gtk .so name to the only place where it is used No need to pollute util.h with this. Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/n/tip-kec0chbdtgrd71o3oi2kz2zt@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/setup.c | 3 +++ tools/perf/util/util.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) commit 7de96c3e759e49b1d176722ed26c14c057bac34f Author: Arnaldo Carvalho de Melo Date: Wed Apr 26 15:27:52 2017 -0300 perf tools: Move HAS_BOOL define to where perl headers are used This is a perl specific hack, so move it from util.h to where perl headers are used. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-4igctbinuom2sr6g4b03jqht@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/scripting-engines/trace-event-perl.c | 4 +++- tools/perf/util/util.h | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) commit 7f6733c3c648ddd6cf459c1b80ad388a95452955 Author: Paul E. McKenney Date: Tue Apr 18 17:17:35 2017 -0700 srcu: Make rcutorture writer stalls print SRCU GP state In the past, SRCU was simple enough that there was little point in making the rcutorture writer stall messages print the SRCU grace-period number state. With the advent of Tree SRCU, this has changed. This commit therefore makes Classic, Tiny, and Tree SRCU report this state to rcutorture as needed. Signed-off-by: Paul E. McKenney Tested-by: Mike Galbraith include/linux/srcuclassic.h | 14 ++++++++++++++ include/linux/srcutiny.h | 12 ++++++++++++ include/linux/srcutree.h | 4 ++++ kernel/rcu/rcutorture.c | 8 +++++--- kernel/rcu/srcutree.c | 13 +++++++++++++ kernel/rcu/tree.c | 12 ++++-------- 6 files changed, 52 insertions(+), 11 deletions(-) commit c7e88067c1ae89e7bcbed070fb2c4e30bc39b51f Author: Paul E. McKenney Date: Tue Apr 18 16:01:46 2017 -0700 srcu: Exact tracking of srcu_data structures containing callbacks The current Tree SRCU implementation schedules a workqueue for every srcu_data covered by a given leaf srcu_node structure having callbacks, even if only one of those srcu_data structures actually contains callbacks. This is clearly inefficient for workloads that don't feature callbacks everywhere all the time. This commit therefore adds an array of masks that are used by the leaf srcu_node structures to track exactly which srcu_data structures contain callbacks. Signed-off-by: Paul E. McKenney Tested-by: Mike Galbraith include/linux/srcutree.h | 4 ++++ kernel/rcu/srcutree.c | 29 +++++++++++++++++++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) commit c373fff7bd252ec36e8a895c58a584088f1d38bc Author: Trond Myklebust Date: Wed Apr 26 12:26:22 2017 -0400 NFSv4: Don't special case "launder" If the client receives a fatal server error from nfs_pageio_add_request(), then we should always truncate the page on which the error occurred. Signed-off-by: Trond Myklebust fs/nfs/file.c | 2 +- fs/nfs/write.c | 27 +++++++++++---------------- include/linux/nfs_fs.h | 14 +------------- 3 files changed, 13 insertions(+), 30 deletions(-) commit 54551d85ad48b5b5f5735b9b76c147096828b626 Author: Trond Myklebust Date: Wed Apr 26 12:21:49 2017 -0400 NFS: Add a few more fatal I/O errors to nfs_error_is_fatal() EACCES, EDQUOT, EFBIG and ESTALE are all fatal errors as far as NFS I/O is concerned. They need to be reported back to the application. Signed-off-by: Trond Myklebust fs/nfs/internal.h | 4 ++++ 1 file changed, 4 insertions(+) commit 763656d30b3d220a52e4b2bd1fc174a4cd6c0f43 Author: Arnd Bergmann Date: Tue Apr 25 21:56:53 2017 +0200 drm: mali-dp: use div_u64 for expensive 64-bit divisions On 32-bit machines, we can't divide 64-bit integers: drivers/gpu/drm/arm/malidp_crtc.o: In function `malidp_crtc_atomic_check': malidp_crtc.c:(.text.malidp_crtc_atomic_check+0x3c0): undefined reference to `__aeabi_uldivmod' malidp_crtc.c:(.text.malidp_crtc_atomic_check+0x3dc): undefined reference to `__aeabi_uldivmod' This calls the div_u64 function explicitly instead. Fixes: 4cea4e9f6690 ("drm: mali-dp: Add plane upscaling support") Signed-off-by: Arnd Bergmann drivers/gpu/drm/arm/malidp_crtc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 2fefc97b2180518bac923fba3f79fdca1f41dc15 Author: Al Viro Date: Wed Apr 5 19:17:18 2017 -0400 HAVE_ARCH_HARDENED_USERCOPY is unconditional now Signed-off-by: Al Viro arch/arm/Kconfig | 1 - arch/arm64/Kconfig | 1 - arch/ia64/Kconfig | 1 - arch/mips/Kconfig | 1 - arch/parisc/Kconfig | 1 - arch/powerpc/Kconfig | 1 - arch/s390/Kconfig | 1 - arch/sparc/Kconfig | 1 - arch/x86/Kconfig | 1 - security/Kconfig | 9 --------- 10 files changed, 18 deletions(-) commit 701cac61d0250912b89cbc28589969530179099a Author: Al Viro Date: Wed Apr 5 19:15:53 2017 -0400 CONFIG_ARCH_HAS_RAW_COPY_USER is unconditional now all architectures converted Signed-off-by: Al Viro arch/Kconfig | 3 --- arch/alpha/Kconfig | 1 - arch/arc/Kconfig | 1 - arch/arm/Kconfig | 1 - arch/arm64/Kconfig | 1 - arch/avr32/Kconfig | 1 - arch/blackfin/Kconfig | 1 - arch/c6x/Kconfig | 1 - arch/cris/Kconfig | 1 - arch/frv/Kconfig | 1 - arch/h8300/Kconfig | 1 - arch/hexagon/Kconfig | 1 - arch/ia64/Kconfig | 1 - arch/m32r/Kconfig | 1 - arch/m68k/Kconfig | 1 - arch/metag/Kconfig | 1 - arch/microblaze/Kconfig | 1 - arch/mips/Kconfig | 1 - arch/mn10300/Kconfig | 1 - arch/nios2/Kconfig | 1 - arch/openrisc/Kconfig | 1 - arch/parisc/Kconfig | 1 - arch/powerpc/Kconfig | 1 - arch/s390/Kconfig | 1 - arch/score/Kconfig | 1 - arch/sh/Kconfig | 1 - arch/sparc/Kconfig | 1 - arch/tile/Kconfig | 1 - arch/um/Kconfig.common | 1 - arch/unicore32/Kconfig | 1 - arch/x86/Kconfig | 1 - arch/xtensa/Kconfig | 1 - include/asm-generic/uaccess.h | 41 ----------------------------------------- include/linux/uaccess.h | 7 ++----- lib/Makefile | 4 +--- 35 files changed, 3 insertions(+), 83 deletions(-) commit eea86b637a15bc4d4bd518b11330ac96baa6b73d Merge: bf7af0c ec022681 e13909a 4de5b63 92430da e5c1540 50e9ab9 86944ee 0c7e9a8 48f666c 33ab2da ac4691f b3622d3 9a67734 29be02e 840db3f d491afb 2260ea8 19dbf70 de51d6c ab89866 f64fd18 3448890 3709600 dc14253 f98f48e 31af2f3 23504ba a668ce3 2ef59f2 beba3a2 7d4914d Author: Al Viro Date: Wed Apr 26 12:06:59 2017 -0400 Merge branches 'uaccess.alpha', 'uaccess.arc', 'uaccess.arm', 'uaccess.arm64', 'uaccess.avr32', 'uaccess.bfin', 'uaccess.c6x', 'uaccess.cris', 'uaccess.frv', 'uaccess.h8300', 'uaccess.hexagon', 'uaccess.ia64', 'uaccess.m32r', 'uaccess.m68k', 'uaccess.metag', 'uaccess.microblaze', 'uaccess.mips', 'uaccess.mn10300', 'uaccess.nios2', 'uaccess.openrisc', 'uaccess.parisc', 'uaccess.powerpc', 'uaccess.s390', 'uaccess.score', 'uaccess.sh', 'uaccess.sparc', 'uaccess.tile', 'uaccess.um', 'uaccess.unicore32', 'uaccess.x86' and 'uaccess.xtensa' into work.uaccess commit 9a677341cd8de01a9eaf2c24a4b735939e507943 Author: Al Viro Date: Tue Mar 21 12:02:25 2017 -0400 m32r: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/m32r/Kconfig | 1 + arch/m32r/include/asm/uaccess.h | 98 +++-------------------------------------- arch/m32r/kernel/m32r_ksyms.c | 2 - arch/m32r/lib/usercopy.c | 22 --------- 4 files changed, 8 insertions(+), 115 deletions(-) commit 3e086edfe0c73daaabd929b926bbe26536272d9a Author: olivier moysan Date: Mon Apr 10 17:19:56 2017 +0200 ASoC: stm32: add SAI driver This patch implements SAI ASoC driver for STM32. Signed-off-by: olivier moysan Signed-off-by: Mark Brown sound/soc/Kconfig | 1 + sound/soc/Makefile | 1 + sound/soc/stm/Kconfig | 8 + sound/soc/stm/Makefile | 6 + sound/soc/stm/stm32_sai.c | 115 ++++++ sound/soc/stm/stm32_sai.h | 200 ++++++++++ sound/soc/stm/stm32_sai_sub.c | 884 ++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 1215 insertions(+) commit b45c4f117b002a902e8b9f52eaf542e3e82c36a8 Author: olivier moysan Date: Mon Apr 10 17:19:55 2017 +0200 ASoC: stm32: add bindings for SAI This patch adds documentation of device tree bindings for the STM32 SAI ASoC driver. Signed-off-by: olivier moysan Signed-off-by: Mark Brown .../devicetree/bindings/sound/st,stm32-sai.txt | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) commit a7e3b975a0f9296162b72ac6ab7fad9631a07630 Author: Filipe Manana Date: Mon Apr 3 10:45:46 2017 +0100 Btrfs: fix reported number of inode blocks Currently when there are buffered writes that were not yet flushed and they fall within allocated ranges of the file (that is, not in holes or beyond eof assuming there are no prealloc extents beyond eof), btrfs simply reports an incorrect number of used blocks through the stat(2) system call (or any of its variants), regardless of mount options or inode flags (compress, compress-force, nodatacow). This is because the number of blocks used that is reported is based on the current number of bytes in the vfs inode plus the number of dealloc bytes in the btrfs inode. The later covers bytes that both fall within allocated regions of the file and holes. Example scenarios where the number of reported blocks is wrong while the buffered writes are not flushed: $ mkfs.btrfs -f /dev/sdc $ mount /dev/sdc /mnt/sdc $ xfs_io -f -c "pwrite -S 0xaa 0 64K" /mnt/sdc/foo1 wrote 65536/65536 bytes at offset 0 64 KiB, 16 ops; 0.0000 sec (259.336 MiB/sec and 66390.0415 ops/sec) $ sync $ xfs_io -c "pwrite -S 0xbb 0 64K" /mnt/sdc/foo1 wrote 65536/65536 bytes at offset 0 64 KiB, 16 ops; 0.0000 sec (192.308 MiB/sec and 49230.7692 ops/sec) # The following should have reported 64K... $ du -h /mnt/sdc/foo1 128K /mnt/sdc/foo1 $ sync # After flushing the buffered write, it now reports the correct value. $ du -h /mnt/sdc/foo1 64K /mnt/sdc/foo1 $ xfs_io -f -c "falloc -k 0 128K" -c "pwrite -S 0xaa 0 64K" /mnt/sdc/foo2 wrote 65536/65536 bytes at offset 0 64 KiB, 16 ops; 0.0000 sec (520.833 MiB/sec and 133333.3333 ops/sec) $ sync $ xfs_io -c "pwrite -S 0xbb 64K 64K" /mnt/sdc/foo2 wrote 65536/65536 bytes at offset 65536 64 KiB, 16 ops; 0.0000 sec (260.417 MiB/sec and 66666.6667 ops/sec) # The following should have reported 128K... $ du -h /mnt/sdc/foo2 192K /mnt/sdc/foo2 $ sync # After flushing the buffered write, it now reports the correct value. $ du -h /mnt/sdc/foo2 128K /mnt/sdc/foo2 So the number of used file blocks is simply incorrect, unlike in other filesystems such as ext4 and xfs for example, but only while the buffered writes are not flushed. Fix this by tracking the number of delalloc bytes that fall within holes and beyond eof of a file, and use instead this new counter when reporting the number of used blocks for an inode. Another different problem that exists is that the delalloc bytes counter is reset when writeback starts (by clearing the EXTENT_DEALLOC flag from the respective range in the inode's iotree) and the vfs inode's bytes counter is only incremented when writeback finishes (through insert_reserved_file_extent()). Therefore while writeback is ongoing we simply report a wrong number of blocks used by an inode if the write operation covers a range previously unallocated. While this change does not fix this problem, it does minimizes it a lot by shortening that time window, as the new dealloc bytes counter (new_delalloc_bytes) is only decremented when writeback finishes right before updating the vfs inode's bytes counter. Fully fixing this second problem is not trivial and will be addressed later by a different patch. Signed-off-by: Filipe Manana fs/btrfs/btrfs_inode.h | 7 ++++++ fs/btrfs/extent_io.h | 1 + fs/btrfs/file.c | 62 ++++++++++++++++++++++++++++++++++++++++++---- fs/btrfs/inode.c | 67 ++++++++++++++++++++++++++++++++++++++++---------- 4 files changed, 119 insertions(+), 18 deletions(-) commit e1cbfd7bf6dabdac561c75d08357571f44040a45 Author: Filipe Manana Date: Tue Apr 4 20:31:00 2017 +0100 Btrfs: send, fix file hole not being preserved due to inline extent Normally we don't have inline extents followed by regular extents, but there's currently at least one harmless case where this happens. For example, when the page size is 4Kb and compression is enabled: $ mkfs.btrfs -f /dev/sdb $ mount -o compress /dev/sdb /mnt $ xfs_io -f -c "pwrite -S 0xaa 0 4K" -c "fsync" /mnt/foobar $ xfs_io -c "pwrite -S 0xbb 8K 4K" -c "fsync" /mnt/foobar In this case we get a compressed inline extent, representing 4Kb of data, followed by a hole extent and then a regular data extent. The inline extent was not expanded/converted to a regular extent exactly because it represents 4Kb of data. This does not cause any apparent problem (such as the issue solved by commit e1699d2d7bf6 ("btrfs: add missing memset while reading compressed inline extents")) except trigger an unexpected case in the incremental send code path that makes us issue an operation to write a hole when it's not needed, resulting in more writes at the receiver and wasting space at the receiver. So teach the incremental send code to deal with this particular case. The issue can be currently triggered by running fstests btrfs/137 with compression enabled (MOUNT_OPTIONS="-o compress" ./check btrfs/137). Signed-off-by: Filipe Manana Reviewed-by: Liu Bo fs/btrfs/send.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit be2d253cc98244765323a7c94cc1ac5cd5a17072 Author: Filipe Manana Date: Mon Apr 3 15:57:17 2017 +0100 Btrfs: fix extent map leak during fallocate error path If the call to btrfs_qgroup_reserve_data() failed, we were leaking an extent map structure. The failure can happen either due to an -ENOMEM condition or, when quotas are enabled, due to -EDQUOT for example. Signed-off-by: Filipe Manana Reviewed-by: David Sterba fs/btrfs/file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1c81ba237bcecad9bc885a1ddcf02d725ea38482 Author: Filipe Manana Date: Wed Mar 8 16:43:49 2017 +0000 Btrfs: fix incorrect space accounting after failure to insert inline extent When using compression, if we fail to insert an inline extent we incorrectly end up attempting to free the reserved data space twice, once through extent_clear_unlock_delalloc(), because we pass it the flag EXTENT_DO_ACCOUNTING, and once through a direct call to btrfs_free_reserved_data_space_noquota(). This results in a trace like the following: [ 834.576240] ------------[ cut here ]------------ [ 834.576825] WARNING: CPU: 2 PID: 486 at fs/btrfs/extent-tree.c:4316 btrfs_free_reserved_data_space_noquota+0x60/0x9f [btrfs] [ 834.579501] Modules linked in: btrfs crc32c_generic xor raid6_pq ppdev i2c_piix4 acpi_cpufreq psmouse tpm_tis parport_pc pcspkr serio_raw tpm_tis_core sg parport evdev i2c_core tpm button loop autofs4 ext4 crc16 jbd2 mbcache sr_mod cdrom sd_mod ata_generic virtio_scsi ata_piix virtio_pci libata virtio_ring virtio scsi_mod e1000 floppy [last unloaded: btrfs] [ 834.592116] CPU: 2 PID: 486 Comm: kworker/u32:4 Not tainted 4.10.0-rc8-btrfs-next-37+ #2 [ 834.593316] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.1-0-gb3ef39f-prebuilt.qemu-project.org 04/01/2014 [ 834.595273] Workqueue: btrfs-delalloc btrfs_delalloc_helper [btrfs] [ 834.596103] Call Trace: [ 834.596103] dump_stack+0x67/0x90 [ 834.596103] __warn+0xc2/0xdd [ 834.596103] warn_slowpath_null+0x1d/0x1f [ 834.596103] btrfs_free_reserved_data_space_noquota+0x60/0x9f [btrfs] [ 834.596103] compress_file_range.constprop.42+0x2fa/0x3fc [btrfs] [ 834.596103] ? submit_compressed_extents+0x3a7/0x3a7 [btrfs] [ 834.596103] async_cow_start+0x32/0x4d [btrfs] [ 834.596103] btrfs_scrubparity_helper+0x187/0x3e7 [btrfs] [ 834.596103] btrfs_delalloc_helper+0xe/0x10 [btrfs] [ 834.596103] process_one_work+0x273/0x4e4 [ 834.596103] worker_thread+0x1eb/0x2ca [ 834.596103] ? rescuer_thread+0x2b6/0x2b6 [ 834.596103] kthread+0x100/0x108 [ 834.596103] ? __list_del_entry+0x22/0x22 [ 834.596103] ret_from_fork+0x2e/0x40 [ 834.611656] ---[ end trace 719902fe6bdef08f ]--- So fix this by not calling directly btrfs_free_reserved_data_space_noquota() if an error happened. Signed-off-by: Filipe Manana fs/btrfs/inode.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a315e68f6e8b3006c29482dbfc4d928f098c449c Author: Filipe Manana Date: Mon Mar 6 23:04:20 2017 +0000 Btrfs: fix invalid attempt to free reserved space on failure to cow range When attempting to COW a file range (we are starting writeback and doing COW), if we manage to reserve an extent for the range we will write into but fail after reserving it and before creating the respective ordered extent, we end up in an error path where we attempt to decrement the data space's bytes_may_use counter after we already did it while reserving the extent, leading to a warning/trace like the following: [ 847.621524] ------------[ cut here ]------------ [ 847.625441] WARNING: CPU: 5 PID: 4905 at fs/btrfs/extent-tree.c:4316 btrfs_free_reserved_data_space_noquota+0x60/0x9f [btrfs] [ 847.633704] Modules linked in: btrfs crc32c_generic xor raid6_pq acpi_cpufreq i2c_piix4 ppdev psmouse tpm_tis serio_raw pcspkr parport_pc tpm_tis_core i2c_core sg [ 847.644616] CPU: 5 PID: 4905 Comm: xfs_io Not tainted 4.10.0-rc8-btrfs-next-37+ #2 [ 847.648601] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.1-0-gb3ef39f-prebuilt.qemu-project.org 04/01/2014 [ 847.648601] Call Trace: [ 847.648601] dump_stack+0x67/0x90 [ 847.648601] __warn+0xc2/0xdd [ 847.648601] warn_slowpath_null+0x1d/0x1f [ 847.648601] btrfs_free_reserved_data_space_noquota+0x60/0x9f [btrfs] [ 847.648601] btrfs_clear_bit_hook+0x140/0x258 [btrfs] [ 847.648601] clear_state_bit+0x87/0x128 [btrfs] [ 847.648601] __clear_extent_bit+0x222/0x2b7 [btrfs] [ 847.648601] clear_extent_bit+0x17/0x19 [btrfs] [ 847.648601] extent_clear_unlock_delalloc+0x3b/0x6b [btrfs] [ 847.648601] cow_file_range.isra.39+0x387/0x39a [btrfs] [ 847.648601] run_delalloc_nocow+0x4d7/0x70e [btrfs] [ 847.648601] ? arch_local_irq_save+0x9/0xc [ 847.648601] run_delalloc_range+0xa7/0x2b5 [btrfs] [ 847.648601] writepage_delalloc.isra.31+0xb9/0x15c [btrfs] [ 847.648601] __extent_writepage+0x249/0x2e8 [btrfs] [ 847.648601] extent_write_cache_pages.constprop.33+0x28b/0x36c [btrfs] [ 847.648601] ? arch_local_irq_save+0x9/0xc [ 847.648601] ? mark_lock+0x24/0x201 [ 847.648601] extent_writepages+0x4b/0x5c [btrfs] [ 847.648601] ? btrfs_writepage_start_hook+0xed/0xed [btrfs] [ 847.648601] btrfs_writepages+0x28/0x2a [btrfs] [ 847.648601] do_writepages+0x23/0x2c [ 847.648601] __filemap_fdatawrite_range+0x5a/0x61 [ 847.648601] filemap_fdatawrite_range+0x13/0x15 [ 847.648601] btrfs_fdatawrite_range+0x20/0x46 [btrfs] [ 847.648601] start_ordered_ops+0x19/0x23 [btrfs] [ 847.648601] btrfs_sync_file+0x136/0x42c [btrfs] [ 847.648601] vfs_fsync_range+0x8c/0x9e [ 847.648601] vfs_fsync+0x1c/0x1e [ 847.648601] do_fsync+0x31/0x4a [ 847.648601] SyS_fsync+0x10/0x14 [ 847.648601] entry_SYSCALL_64_fastpath+0x18/0xad [ 847.648601] RIP: 0033:0x7f5b05200800 [ 847.648601] RSP: 002b:00007ffe204f71c8 EFLAGS: 00000246 ORIG_RAX: 000000000000004a [ 847.648601] RAX: ffffffffffffffda RBX: ffffffff8109637b RCX: 00007f5b05200800 [ 847.648601] RDX: 00000000008bd0a0 RSI: 00000000008bd2e0 RDI: 0000000000000003 [ 847.648601] RBP: ffffc90001d67f98 R08: 000000000000ffff R09: 000000000000001f [ 847.648601] R10: 00000000000001f6 R11: 0000000000000246 R12: 0000000000000046 [ 847.648601] R13: ffffc90001d67f78 R14: 00007f5b054be740 R15: 00007f5b054be740 [ 847.648601] ? trace_hardirqs_off_caller+0x3f/0xaa [ 847.685787] ---[ end trace 2a4a3e15382508e8 ]--- So fix this by not attempting to decrement the data space info's bytes_may_use counter if we already reserved the extent and an error happened before creating the ordered extent. We are already correctly freeing the reserved extent if an error happens, so there's no additional measure needed. Signed-off-by: Filipe Manana Reviewed-by: Liu Bo fs/btrfs/extent_io.h | 4 +++- fs/btrfs/inode.c | 59 +++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 45 insertions(+), 18 deletions(-) commit 524272607e882d04e6d1a70d41fcbed819445ab9 Author: Qu Wenruo Date: Wed Mar 8 10:25:52 2017 +0800 btrfs: Handle delalloc error correctly to avoid ordered extent hang [BUG] If run_delalloc_range() returns error and there is already some ordered extents created, btrfs will be hanged with the following backtrace: Call Trace: __schedule+0x2d4/0xae0 schedule+0x3d/0x90 btrfs_start_ordered_extent+0x160/0x200 [btrfs] ? wake_atomic_t_function+0x60/0x60 btrfs_run_ordered_extent_work+0x25/0x40 [btrfs] btrfs_scrubparity_helper+0x1c1/0x620 [btrfs] btrfs_flush_delalloc_helper+0xe/0x10 [btrfs] process_one_work+0x2af/0x720 ? process_one_work+0x22b/0x720 worker_thread+0x4b/0x4f0 kthread+0x10f/0x150 ? process_one_work+0x720/0x720 ? kthread_create_on_node+0x40/0x40 ret_from_fork+0x2e/0x40 [CAUSE] |<------------------ delalloc range --------------------------->| | OE 1 | OE 2 | ... | OE n | |<>| |<---------- cleanup range --------->| || \_=> First page handled by end_extent_writepage() in __extent_writepage() The problem is caused by error handler of run_delalloc_range(), which doesn't handle any created ordered extents, leaving them waiting on btrfs_finish_ordered_io() to finish. However after run_delalloc_range() returns error, __extent_writepage() won't submit bio, so btrfs_writepage_end_io_hook() won't be triggered except the first page, and btrfs_finish_ordered_io() won't be triggered for created ordered extents either. So OE 2~n will hang forever, and if OE 1 is larger than one page, it will also hang. [FIX] Introduce btrfs_cleanup_ordered_extents() function to cleanup created ordered extents and finish them manually. The function is based on existing btrfs_endio_direct_write_update_ordered() function, and modify it to act just like btrfs_writepage_endio_hook() but handles specified range other than one page. After fix, delalloc error will be handled like: |<------------------ delalloc range --------------------------->| | OE 1 | OE 2 | ... | OE n | |<>|<-------- ----------->|<------ old error handler --------->| || || || \_=> Cleaned up by cleanup_ordered_extents() \_=> First page handled by end_extent_writepage() in __extent_writepage() Signed-off-by: Qu Wenruo Reviewed-by: Filipe Manana Reviewed-by: Liu Bo Signed-off-by: Filipe Manana fs/btrfs/inode.c | 63 ++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 15 deletions(-) commit 4dbd80fb9176f23c78cecd0a8285001cd2066425 Author: Qu Wenruo Date: Wed Mar 8 10:25:51 2017 +0800 btrfs: Fix metadata underflow caused by btrfs_reloc_clone_csum error [BUG] When btrfs_reloc_clone_csum() reports error, it can underflow metadata and leads to kernel assertion on outstanding extents in run_delalloc_nocow() and cow_file_range(). BTRFS info (device vdb5): relocating block group 12582912 flags data BTRFS info (device vdb5): found 1 extents assertion failed: inode->outstanding_extents >= num_extents, file: fs/btrfs//extent-tree.c, line: 5858 Currently, due to another bug blocking ordered extents, the bug is only reproducible under certain block group layout and using error injection. a) Create one data block group with one 4K extent in it. To avoid the bug that hangs btrfs due to ordered extent which never finishes b) Make btrfs_reloc_clone_csum() always fail c) Relocate that block group [CAUSE] run_delalloc_nocow() and cow_file_range() handles error from btrfs_reloc_clone_csum() wrongly: (The ascii chart shows a more generic case of this bug other than the bug mentioned above) |<------------------ delalloc range --------------------------->| | OE 1 | OE 2 | ... | OE n | |<----------- cleanup range --------------->| |<----------- ----------->| \/ btrfs_finish_ordered_io() range So error handler, which calls extent_clear_unlock_delalloc() with EXTENT_DELALLOC and EXTENT_DO_ACCOUNT bits, and btrfs_finish_ordered_io() will both cover OE n, and free its metadata, causing metadata under flow. [Fix] The fix is to ensure after calling btrfs_add_ordered_extent(), we only call error handler after increasing the iteration offset, so that cleanup range won't cover any created ordered extent. |<------------------ delalloc range --------------------------->| | OE 1 | OE 2 | ... | OE n | |<----------- ----------->|<---------- cleanup range --------->| \/ btrfs_finish_ordered_io() range Signed-off-by: Qu Wenruo Reviewed-by: Filipe Manana Reviewed-by: Liu Bo fs/btrfs/inode.c | 51 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 12 deletions(-) commit 282ec0ea65dab88fda51b5b9b649958ae42f4ac0 Merge: d8f5207 c687c46 251831b Author: Mark Brown Date: Wed Apr 26 15:58:22 2017 +0100 Merge remote-tracking branches 'spi/topic/ti-qspi' and 'spi/topic/xlp' into spi-next commit d8f520727f769164fa6ff0ad4a4d965336966999 Merge: fbdd1b2 91b46346 9006a7b 3288d5c bfca761 905e0b5 Author: Mark Brown Date: Wed Apr 26 15:58:16 2017 +0100 Merge remote-tracking branches 'spi/topic/spidev', 'spi/topic/spidev-test', 'spi/topic/sunxi', 'spi/topic/tegra' and 'spi/topic/test' into spi-next commit fbdd1b2affbd56f51aaa2a32073410133ca247f2 Merge: a2d5eda e542f7e 8126135 1017f42 3c85871 68c97b9 Author: Mark Brown Date: Wed Apr 26 15:58:10 2017 +0100 Merge remote-tracking branches 'spi/topic/loopback', 'spi/topic/omap2-mcspi', 'spi/topic/orion', 'spi/topic/pl022' and 'spi/topic/sc18is602' into spi-next commit a2d5eda07224680cb711677eff014ea15d809aae Merge: 2536374 f974cf5 500a32a fbad6c2 f72efa7 a5b0443 Author: Mark Brown Date: Wed Apr 26 15:58:04 2017 +0100 Merge remote-tracking branches 'spi/topic/devprop', 'spi/topic/fsl', 'spi/topic/fsl-dspi', 'spi/topic/imx' and 'spi/topic/lantiq' into spi-next commit 2536374352ab112e5ea2ef8ce0cfa0e9cfa63112 Merge: 42b1ead e538007 7ab2463 b42a33b 1234e83 Author: Mark Brown Date: Wed Apr 26 15:57:59 2017 +0100 Merge remote-tracking branches 'spi/topic/atmel', 'spi/topic/bcm63xx', 'spi/topic/cadence' and 'spi/topic/davinci' into spi-next commit 42b1eadf4ead6e7d68f47cd985daa244823c96d3 Merge: fbf3d36 833bfad Author: Mark Brown Date: Wed Apr 26 15:57:58 2017 +0100 Merge remote-tracking branch 'spi/topic/core' into spi-next commit fbf3d36cb4c960b27b9c2e391d24127c5ec17a3a Merge: 5a7ad11 400c18e ad2fca0 849794c Author: Mark Brown Date: Wed Apr 26 15:57:52 2017 +0100 Merge remote-tracking branches 'spi/fix/dw', 'spi/fix/lantiq' and 'spi/fix/pl022' into spi-linus commit 284c43e6af415515865d2900d18d1382979c777c Author: Harald Freudenberger Date: Wed Apr 26 13:56:41 2017 +0200 s390/crypt: use the correct module alias for paes_s390. For automatic module loading (e.g. as it is used with cryptsetup) an alias "paes" for the paes_s390 kernel module is needed. Correct the paes_s390 module alias from "aes-all" to "paes". Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/crypto/paes_s390.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6726009af555129c57dfbbf80a1fcf4d5a36ba0 Author: Sodhi, VunnyX Date: Tue Apr 25 12:18:24 2017 +0530 ASoC: Intel: Skylake: Add loadable module support on KBL platform Kabylake platform expects modules in a library manifest. After loading base firmware library manifest is loaded using load library IPC. This is followed by module load using load multiple modules IPC. Signed-off-by: Sodhi, VunnyX Signed-off-by: G Kranthi Signed-off-by: Subhransu S. Prusty Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-ipc.c | 2 ++ sound/soc/intel/skylake/skl-sst.c | 64 +++++++++++++++++++++++++++++++---- 2 files changed, 60 insertions(+), 6 deletions(-) commit 100e7f396ddf9abd76d5ec93f689be00187512f9 Author: Subhransu S. Prusty Date: Tue Apr 25 12:18:23 2017 +0530 ASoC: Intel: Skylake: Modify load_lib_ipc arguments for a nowait version Kabylake uses code loader dma and wait on notification instead of ipc reply for load library ipc status. So modify the argument of skl_sst_ipc_load_library to check on flag to wait for ipc reply. Signed-off-by: Subhransu S. Prusty Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 2 +- sound/soc/intel/skylake/skl-sst-ipc.c | 8 ++++++-- sound/soc/intel/skylake/skl-sst-ipc.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) commit 89b0d8a5bae91cb8ef23b1834c97d1db367f2db6 Author: Subhransu S. Prusty Date: Tue Apr 25 12:18:22 2017 +0530 ASoC: Intel: Skylake: Register dsp_fw_ops for kabylake For audio kabylake is same as skylake except the module load approach. This patch registers different dsp_fw_ops for kabylake and next patch adds the module load support for kabylake. Signed-off-by: Subhransu S. Prusty Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 2 +- sound/soc/intel/skylake/skl-sst-dsp.h | 3 +++ sound/soc/intel/skylake/skl-sst.c | 30 ++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) commit 4e0277d226b578be99cf8899fd1442bf11873d12 Author: G Kranthi Date: Tue Apr 25 12:18:21 2017 +0530 ASoC: Intel: Skylake: Modify arguments to reuse module transfer function Kabylake also uses code loader dma for module load and library load. skl_transfer_module can be reused. Modify the arguments to include library index to be passed to lib load ipc and module/lib check to use correct ipc for lib/module load. Signed-off-by: G Kranthi Signed-off-by: Subhransu S. Prusty Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit ebe8907687c052b36839b5f9ed09005db4fbe83c Author: Subhransu S. Prusty Date: Tue Apr 25 12:18:20 2017 +0530 ASoC: Intel: Skylake: Commonize library load request firmware, strip extended manifest and release library changes are common to kabylake and APL. So move these common code to utils to be reused in later patches for kabylake library load. Signed-off-by: Subhransu S. Prusty Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 38 ++++------------------------- sound/soc/intel/skylake/skl-sst-dsp.h | 7 +++++- sound/soc/intel/skylake/skl-sst-utils.c | 43 +++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 34 deletions(-) commit 9fe9c71192832a1c63fb94120cb6c2541aca694f Author: G Kranthi Date: Tue Apr 25 12:18:19 2017 +0530 ASoC: Intel: Skylake: Move sst common initialization to a helper function Some skl sst context are not dependent of platform and initializing them independently for each platform can lead to errors. So optimize by moving them to a helper function and platform specific init code can call this. Signed-off-by: G Kranthi Signed-off-by: Subhransu S. Prusty Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 28 +++++-------------------- sound/soc/intel/skylake/skl-sst-dsp.h | 3 +++ sound/soc/intel/skylake/skl-sst-utils.c | 37 +++++++++++++++++++++++++++++++++ sound/soc/intel/skylake/skl-sst.c | 32 ++++++---------------------- 4 files changed, 51 insertions(+), 49 deletions(-) commit dfeabded04962ed2de9dca489de228801df25de6 Author: John Hsu Date: Thu Apr 20 17:25:11 2017 +0800 ASoC: nau8824: new driver Add driver for NAU88L24. Signed-off-by: John Hsu Signed-off-by: John Hsu Signed-off-by: Mark Brown .../devicetree/bindings/sound/nau8824.txt | 88 + sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/nau8824.c | 1837 ++++++++++++++++++++ sound/soc/codecs/nau8824.h | 466 +++++ 5 files changed, 2398 insertions(+) commit a5bf5fc060b0095ebd6f1886da8ec482697176fa Author: Wei Yongjun Date: Tue Apr 25 03:30:04 2017 +0000 pinctrl: artpec6: Remove .owner field for driver Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-artpec6.c | 1 - 1 file changed, 1 deletion(-) commit b42a33bd93fe0b2438511b1c7c00cfd47e17841b Author: Moritz Fischer Date: Tue Apr 25 11:30:14 2017 -0700 spi: cadence: Allow for GPIO pins to be used as chipselects This adds support for using GPIOs for chipselects as described by the default dt-bindings. Signed-off-by: Moritz Fischer Signed-off-by: Mark Brown drivers/spi/spi-cadence.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 1608fd1ca3b9357ea20ffc3a8ad2d1e4b78301a6 Author: Christoph Hellwig Date: Wed Apr 26 09:34:22 2017 +0200 ide-pm: always pass 0 error to ide_complete_rq in ide_do_devset The caller only looks at the scsi_request result field anyway. Signed-off-by: Christoph Hellwig Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Jens Axboe drivers/ide/ide-devsets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce210e92238e976143c07a2d19d18c8919cb16a1 Author: Christoph Hellwig Date: Wed Apr 26 09:34:21 2017 +0200 ide-pm: always pass 0 error to __blk_end_request_all ide_pm_execute_rq exectures a PM request synchronously, and in the failure case where it calls __blk_end_request_all it never checks the error field passed to the end_io callback, so don't bother setting it. Signed-off-by: Christoph Hellwig Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Jens Axboe drivers/ide/ide-pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d188b90c48e418e102a1f42872b13dfe386ab6a7 Author: Christoph Hellwig Date: Wed Apr 26 09:34:20 2017 +0200 scsi_transport_sas: always pass 0 error to blk_end_request_all The SAS transport queues are only used by bsg, and bsg always looks at the scsi_request results and never add the error passed in the end_io callback. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/scsi/scsi_transport_sas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88326ef05b262f681d837ecf65db10a7edb609f1 Author: Chris Wilson Date: Sat Apr 22 09:15:37 2017 +0100 drm/i915: Confirm the request is still active before adding it to the await Although we do check the completion-status of the request before actually adding a wait on it (either to its submit fence or its completion dma-fence), we currently do not check before adding it to the dependency lists. In fact, without checking for a completed request we may try to use the signaler after it has been retired and its dependency tree freed: [ 60.044057] BUG: KASAN: use-after-free in __list_add_valid+0x1d/0xd0 at addr ffff880348c9e6a0 [ 60.044118] Read of size 8 by task gem_exec_fence/530 [ 60.044164] CPU: 1 PID: 530 Comm: gem_exec_fence Tainted: G E 4.11.0-rc7+ #46 [ 60.044226] Hardware name: ��������������������������������� ���������������������������������/���������������������������������, BIOS RYBDWi35.86A.0246.2 [ 60.044290] Call Trace: [ 60.044337] dump_stack+0x4d/0x6a [ 60.044383] kasan_object_err+0x21/0x70 [ 60.044435] kasan_report+0x225/0x4e0 [ 60.044488] ? __list_add_valid+0x1d/0xd0 [ 60.044534] ? kasan_kmalloc+0xad/0xe0 [ 60.044587] __asan_load8+0x5e/0x70 [ 60.044639] __list_add_valid+0x1d/0xd0 [ 60.044788] __i915_priotree_add_dependency+0x67/0x130 [i915] [ 60.044895] i915_gem_request_await_request+0xa8/0x370 [i915] [ 60.044974] i915_gem_request_await_dma_fence+0x129/0x140 [i915] [ 60.045049] i915_gem_do_execbuffer.isra.37+0xb0a/0x26b0 [i915] [ 60.045077] ? save_stack+0xb1/0xd0 [ 60.045105] ? save_stack_trace+0x1b/0x20 [ 60.045132] ? save_stack+0x46/0xd0 [ 60.045158] ? kasan_kmalloc+0xad/0xe0 [ 60.045184] ? __kmalloc+0xd8/0x670 [ 60.045229] ? drm_ioctl+0x359/0x640 [drm] [ 60.045256] ? SyS_ioctl+0x41/0x70 [ 60.045330] ? i915_vma_move_to_active+0x540/0x540 [i915] [ 60.045360] ? tty_insert_flip_string_flags+0xa1/0xf0 [ 60.045387] ? tty_flip_buffer_push+0x63/0x70 [ 60.045414] ? remove_wait_queue+0xa9/0xc0 [ 60.045441] ? kasan_unpoison_shadow+0x35/0x50 [ 60.045467] ? kasan_kmalloc+0xad/0xe0 [ 60.045494] ? kasan_check_write+0x14/0x20 [ 60.045568] i915_gem_execbuffer2+0xdb/0x2a0 [i915] [ 60.045616] drm_ioctl+0x359/0x640 [drm] [ 60.045705] ? i915_gem_execbuffer+0x5a0/0x5a0 [i915] [ 60.045751] ? drm_version+0x150/0x150 [drm] [ 60.045778] ? compat_start_thread+0x60/0x60 [ 60.045805] ? plist_del+0xda/0x1a0 [ 60.045833] do_vfs_ioctl+0x12e/0x910 [ 60.045860] ? ioctl_preallocate+0x130/0x130 [ 60.045886] ? pci_mmcfg_check_reserved+0xc0/0xc0 [ 60.045913] ? vfs_write+0x196/0x240 [ 60.045939] ? __fget_light+0xa7/0xc0 [ 60.045965] SyS_ioctl+0x41/0x70 [ 60.045991] entry_SYSCALL_64_fastpath+0x17/0x98 [ 60.046017] RIP: 0033:0x7feb2baefc47 [ 60.046042] RSP: 002b:00007fff56d28e58 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 60.046075] RAX: ffffffffffffffda RBX: 00007fff56d290a8 RCX: 00007feb2baefc47 [ 60.046102] RDX: 00007fff56d29050 RSI: 00000000c0406469 RDI: 0000000000000003 [ 60.046129] RBP: 00007fff56d29050 R08: 000055ecc4cd27d0 R09: 00007feb2bda8600 [ 60.046154] R10: 0000000000000073 R11: 0000000000000246 R12: 00000000c0406469 [ 60.046177] R13: 0000000000000003 R14: 000000000000000f R15: 0000000000000099 [ 60.046203] Object at ffff880348c9e680, in cache i915_dependency size: 64 [ 60.046225] Allocated: [ 60.046246] PID = 530 [ 60.046269] save_stack_trace+0x1b/0x20 [ 60.046292] save_stack+0x46/0xd0 [ 60.046318] kasan_kmalloc+0xad/0xe0 [ 60.046343] kasan_slab_alloc+0x12/0x20 [ 60.046368] kmem_cache_alloc+0xab/0x650 [ 60.046445] i915_gem_request_await_request+0x88/0x370 [i915] [ 60.046559] i915_gem_request_await_dma_fence+0x129/0x140 [i915] [ 60.046705] i915_gem_do_execbuffer.isra.37+0xb0a/0x26b0 [i915] [ 60.046849] i915_gem_execbuffer2+0xdb/0x2a0 [i915] [ 60.046936] drm_ioctl+0x359/0x640 [drm] [ 60.046987] do_vfs_ioctl+0x12e/0x910 [ 60.047038] SyS_ioctl+0x41/0x70 [ 60.047090] entry_SYSCALL_64_fastpath+0x17/0x98 [ 60.047139] Freed: [ 60.047179] PID = 530 [ 60.047223] save_stack_trace+0x1b/0x20 [ 60.047269] save_stack+0x46/0xd0 [ 60.047317] kasan_slab_free+0x72/0xc0 [ 60.047366] kmem_cache_free+0x39/0x160 [ 60.047512] i915_gem_request_retire+0x83f/0x930 [i915] [ 60.047657] i915_gem_request_alloc+0x166/0x600 [i915] [ 60.047799] i915_gem_do_execbuffer.isra.37+0xad8/0x26b0 [i915] [ 60.047897] i915_gem_execbuffer2+0xdb/0x2a0 [i915] [ 60.047942] drm_ioctl+0x359/0x640 [drm] [ 60.047968] do_vfs_ioctl+0x12e/0x910 [ 60.047993] SyS_ioctl+0x41/0x70 [ 60.048019] entry_SYSCALL_64_fastpath+0x17/0x98 [ 60.048044] Memory state around the buggy address: [ 60.048066] ffff880348c9e580: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 60.048105] ffff880348c9e600: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 60.048138] >ffff880348c9e680: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 60.048170] ^ [ 60.048191] ffff880348c9e700: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 60.048225] ffff880348c9e780: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc Note to hit the use-after-free requires us to be passed back a request via a fence-array, that is from explicit fencing accumulated into a sync-file fence-array. Fixes: 52e542090701 ("drm/i915/scheduler: Record all dependencies upon request construction") Testcase: igt/gem_exec_fence/expired-history Signed-off-by: Chris Wilson Reviewed-by: Michał Winiarski Reviewed-by: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170422081537.6468-1-chris@chris-wilson.co.uk (cherry picked from commit ade0b0c965f59176daddbef9c4717354034f9bce) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_request.c | 3 +++ 1 file changed, 3 insertions(+) commit 96dabe99cae8a1b5fc645f213eeac928541d3899 Author: Chris Wilson Date: Fri Apr 21 14:58:15 2017 +0100 drm/i915: Avoid busy-spinning on VLV_GLTC_PW_STATUS mmio The busy-spin, as the first stage of intel_wait_for_register(), is currently under suspicion for causing: [ 62.034926] NMI watchdog: Watchdog detected hard LOCKUP on cpu 1 [ 62.034928] Modules linked in: i2c_dev i915 intel_gtt drm_kms_helper prime_numbers [ 62.034932] CPU: 1 PID: 183 Comm: kworker/1:2 Not tainted 4.11.0-rc7+ #471 [ 62.034933] Hardware name: / , BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015 [ 62.034934] Workqueue: pm pm_runtime_work [ 62.034936] task: ffff880275a04ec0 task.stack: ffffc900002d8000 [ 62.034936] RIP: 0010:__intel_wait_for_register_fw+0x77/0x1a0 [i915] [ 62.034937] RSP: 0018:ffffc900002dbc38 EFLAGS: 00000082 [ 62.034939] RAX: ffffc90003530094 RBX: 0000000000130094 RCX: 0000000000000001 [ 62.034940] RDX: 00000000000000a1 RSI: ffff88027fd15e58 RDI: 0000000000000000 [ 62.034941] RBP: ffffc900002dbc78 R08: 0000000000000002 R09: 0000000000000000 [ 62.034942] R10: ffffc900002dbc18 R11: ffff880276429dd0 R12: ffff8802707c0000 [ 62.034943] R13: 00000000000000a0 R14: 0000000000000000 R15: 00000000fffefc10 [ 62.034945] FS: 0000000000000000(0000) GS:ffff88027fd00000(0000) knlGS:0000000000000000 [ 62.034945] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 62.034947] CR2: 00007ffd3cd98ff8 CR3: 0000000274c19000 CR4: 00000000001006e0 [ 62.034947] Call Trace: [ 62.034948] intel_wait_for_register+0x77/0x140 [i915] [ 62.034949] vlv_suspend_complete+0x23/0x5b0 [i915] [ 62.034950] intel_runtime_suspend+0x16c/0x2a0 [i915] [ 62.034950] pci_pm_runtime_suspend+0x50/0x180 [ 62.034951] ? pci_pm_runtime_resume+0xa0/0xa0 [ 62.034952] __rpm_callback+0xc5/0x210 [ 62.034953] rpm_callback+0x1f/0x80 [ 62.034953] ? pci_pm_runtime_resume+0xa0/0xa0 [ 62.034954] rpm_suspend+0x118/0x580 [ 62.034955] pm_runtime_work+0x64/0x90 [ 62.034956] process_one_work+0x1bb/0x3e0 [ 62.034956] worker_thread+0x46/0x4f0 [ 62.034957] ? __schedule+0x18b/0x610 [ 62.034958] kthread+0xff/0x140 [ 62.034958] ? process_one_work+0x3e0/0x3e0 [ 62.034959] ? kthread_create_on_node+ and related hard lockups in CI for byt and bsw. Note this effectively reverts commits 41ce405e6894 and b27366958869 ("drm/i915: Convert wait_for(I915_READ(reg)) to intel_wait_for_register()") v2: Convert bool allow into a u32 mask for clarity and repeat the comment on vlv rc6 timing to justify the 3ms timeout used for the wait (Ville) Fixes: 41ce405e6894 ("drm/i915: Convert wait_for(I915_READ(reg)) to intel_wait_for_register()") Fixes: b27366958869 ("drm/i915: Convert wait_for(I915_READ(reg)) to intel_wait_for_register()") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100718 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Ville Syrjälä Cc: Tomi Sarvela Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170421135815.11897-1-chris@chris-wilson.co.uk Tested-by: Tomi Sarvela (cherry picked from commit 3dd14c04d77d7d702de5aa7157df4cc9417329f3) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.c | 46 +++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 22 deletions(-) commit b162d47e142581bfae356d9474856c972c40adbe Author: Chris Wilson Date: Wed Apr 19 10:41:17 2017 +0100 drm/i915/selftests: Allocate inode/file dynamically Avoid having too large a stack by creating the fake struct inode/file on the heap instead. drivers/gpu/drm/i915/selftests/mock_drm.c: In function 'mock_file': drivers/gpu/drm/i915/selftests/mock_drm.c:46:1: error: the frame size of 1328 bytes is larger than 1280 bytes [-Werror=frame-larger-than=] drivers/gpu/drm/i915/selftests/mock_drm.c: In function 'mock_file_free': drivers/gpu/drm/i915/selftests/mock_drm.c:54:1: error: the frame size of 1312 bytes is larger than 1280 bytes [-Werror=frame-larger-than=] Reported-by: Arnd Bergmann Fixes: 66d9cb5d805a ("drm/i915: Mock the GEM device for self-testing") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Matthew Auld Cc: Arnd Bergmann Acked-by: Arnd Bergmann Link: http://patchwork.freedesktop.org/patch/msgid/20170419094143.16922-2-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen (cherry picked from commit 2310b3c952c5dc56c2e08f71b907b8e23ab3270d) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/selftests/mock_drm.c | 45 ++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 13 deletions(-) commit acf2dc2266b99be9103b5c35acbb8f9fe923bf3d Author: Mika Kuoppala Date: Thu Apr 13 14:15:27 2017 +0300 drm/i915: Fix system hang with EI UP masked on Haswell Previously with commit a9c1f90c8e17 ("drm/i915: Don't mask EI UP interrupt on IVB|SNB") certain, seemingly unrelated bit (GEN6_PM_RP_UP_EI_EXPIRED) was needed to be unmasked for IVB and SNB in order to prevent system hang with chained batchbuffers. Our CI was seeing incomplete results with tests that used chained batches and it was found out that HSW needs to have this same bit unmasked to reliably survive chained batches. Always unmask GEN6_PM_RP_UP_EI_EXPIRED on Haswell to prevent system hang with batch chaining. Testcase: igt/gem_exec_fence/nb-await-default Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100672 Cc: Chris Wilson Cc: stable@vger.kernel.org Signed-off-by: Mika Kuoppala Acked-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1492082127-29007-1-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 3396a273851c14634b98bb27be37508b06df94f4) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5af9e672b84f006695b820f791f2eceecca59bbc Author: Dan Carpenter Date: Thu Apr 13 22:52:17 2017 +0300 drm/i915: checking for NULL instead of IS_ERR() in mock selftests i915_gem_request_alloc() uses error pointers. It never returns NULLs. Fixes: 0daf0113cff6 ("drm/i915: Mock infrastructure for request emission") Signed-off-by: Dan Carpenter Link: http://patchwork.freedesktop.org/patch/msgid/20170413195217.GA26108@mwanda Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson (cherry picked from commit be02f7556447a0dee672acb5e462f03377b98ae8) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/selftests/mock_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dea655939837034f04992cef480162949b7cc19f Author: Ville Syrjälä Date: Wed Apr 12 22:30:17 2017 +0300 drm/i915: Perform link quality check unconditionally during long pulse Apparently some DP sinks are a little nuts and cause HPD to drop intermittently during modesets. This happens eg. on an ASUS PB287Q. In oder to recover from this we can't really use the previous connector status to determine if the link needs retraining, so let's just ignore that piece of information and do the retrain unconditionally. We do of course still check whether the link is supposed to be running or not. To actually get read out the EDID and update things properly we also need to nuke the goto out added by commit 7d23e3c37bb3 ("drm/i915: Cleaning up intel_dp_hpd_pulse"). I'm actually not sure why that was there. Perhaps to avoid an EDID read if the connector status didn't appear to change, but that sort of thing is quite racy and would have failed anyway if we failed to keep up with the hotplugs (if we missed the HPD down in between two HPD ups). And now that we take this codepath unconditionally we definitely need to drop the goto as otherwise we would never do the EDID read. v2: Drop the goto that made us skip EDID reads entirely. Doh! v3: Rebase due to locking changes s/apparely/apparently/ in the comment (Chris) Cc: stable@vger.kernel.org Cc: Manasi Navare Cc: Palmer Dabbelt Reported-by: Palmer Dabbelt Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99766 References: https://lists.freedesktop.org/archives/intel-gfx/2017-February/119779.html Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170412193017.21029-1-ville.syrjala@linux.intel.com (cherry picked from commit 1a36147bb93921651f7fbd7a6e522da6c349081b) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dp.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit dde7b00e4c85db74a4ae02ec31752cc8be3c75f1 Author: Chris Wilson Date: Wed Apr 12 09:02:51 2017 +0100 drm/i915: Fix use after free in lpe_audio_platdev_destroy() [31908.547136] BUG: KASAN: use-after-free in intel_lpe_audio_teardown+0x78/0xb0 [i915] at addr ffff8801f7788358 [31908.547297] Read of size 8 by task drv_selftest/3781 [31908.547405] CPU: 0 PID: 3781 Comm: drv_selftest Tainted: G BU W 4.10.0+ #451 [31908.547553] Hardware name: / , BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015 [31908.547682] Call Trace: [31908.547772] dump_stack+0x68/0x9f [31908.547857] kasan_object_err+0x1c/0x70 [31908.547947] kasan_report_error+0x1f1/0x4f0 [31908.548038] ? kfree+0xaa/0x170 [31908.548121] kasan_report+0x34/0x40 [31908.548211] ? klist_children_get+0x20/0x30 [31908.548472] ? intel_lpe_audio_teardown+0x78/0xb0 [i915] [31908.548567] __asan_load8+0x5e/0x70 [31908.548824] intel_lpe_audio_teardown+0x78/0xb0 [i915] [31908.549080] intel_audio_deinit+0x28/0x80 [i915] [31908.549315] i915_driver_unload+0xe4/0x360 [i915] [31908.549551] ? i915_driver_load+0x1d70/0x1d70 [i915] [31908.549651] ? trace_hardirqs_on+0xd/0x10 [31908.549885] i915_pci_remove+0x23/0x30 [i915] [31908.549978] pci_device_remove+0x5c/0x100 [31908.550069] device_release_driver_internal+0x1db/0x2e0 [31908.550165] driver_detach+0x68/0xc0 [31908.550256] bus_remove_driver+0x8b/0x150 [31908.550346] driver_unregister+0x3e/0x60 [31908.550439] pci_unregister_driver+0x1d/0x110 [31908.550531] ? find_module_all+0x7a/0xa0 [31908.550791] i915_exit+0x1a/0x87 [i915] [31908.550881] SyS_delete_module+0x264/0x2c0 [31908.550971] ? free_module+0x430/0x430 [31908.551064] ? trace_hardirqs_off_caller+0x16/0x110 [31908.551159] ? trace_hardirqs_on_caller+0x16/0x280 [31908.551256] ? trace_hardirqs_on_thunk+0x1a/0x1c [31908.551350] entry_SYSCALL_64_fastpath+0x1c/0xb1 [31908.551440] RIP: 0033:0x7f1d67312ec7 [31908.551520] RSP: 002b:00007ffebe34e888 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 [31908.551650] RAX: ffffffffffffffda RBX: ffffffff811123f6 RCX: 00007f1d67312ec7 [31908.551743] RDX: 0000000000000000 RSI: 0000000000000800 RDI: 0000560d0af476b8 [31908.551837] RBP: ffff880233d87f98 R08: 0000000000000000 R09: 00007ffebe34e8b8 [31908.551930] R10: 00007f1d68adf8c0 R11: 0000000000000206 R12: 0000000000000000 [31908.552023] R13: 0000560d0af46440 R14: 0000000000000034 R15: 00007ffebe34d860 [31908.552121] ? trace_hardirqs_off_caller+0x16/0x110 [31908.552217] Object at ffff8801f7788000, in cache kmalloc-2048 size: 2048 [31908.552306] Allocated: [31908.552377] PID = 3781 [31908.552456] save_stack_trace+0x16/0x20 [31908.552539] kasan_kmalloc+0xee/0x190 [31908.552627] __kmalloc+0xdb/0x1b0 [31908.552713] platform_device_alloc+0x27/0x90 [31908.552804] platform_device_register_full+0x36/0x220 [31908.553066] intel_lpe_audio_init+0x41e/0x570 [i915] [31908.553320] intel_audio_init+0xd/0x40 [i915] [31908.553552] i915_driver_load+0x13f5/0x1d70 [i915] [31908.553788] i915_pci_probe+0x65/0xe0 [i915] [31908.553881] pci_device_probe+0xda/0x140 [31908.553969] driver_probe_device+0x400/0x660 [31908.554058] __driver_attach+0x11c/0x120 [31908.554147] bus_for_each_dev+0xe6/0x150 [31908.554237] driver_attach+0x26/0x30 [31908.554325] bus_add_driver+0x26b/0x3b0 [31908.554412] driver_register+0xce/0x190 [31908.554502] __pci_register_driver+0xaf/0xc0 [31908.554589] 0xffffffffa0550063 [31908.554675] do_one_initcall+0x8b/0x1e0 [31908.554764] do_init_module+0x102/0x325 [31908.554852] load_module+0x3aad/0x45e0 [31908.554944] SyS_finit_module+0x169/0x1a0 [31908.555033] entry_SYSCALL_64_fastpath+0x1c/0xb1 [31908.555119] Freed: [31908.555188] PID = 3781 [31908.555266] save_stack_trace+0x16/0x20 [31908.555349] kasan_slab_free+0xb0/0x180 [31908.555436] kfree+0xaa/0x170 [31908.555520] platform_device_release+0x76/0x80 [31908.555610] device_release+0x45/0xe0 [31908.555698] kobject_put+0x11f/0x260 [31908.555785] put_device+0x12/0x20 [31908.555871] platform_device_unregister+0x1b/0x20 [31908.556135] intel_lpe_audio_teardown+0x5c/0xb0 [i915] [31908.556390] intel_audio_deinit+0x28/0x80 [i915] [31908.556622] i915_driver_unload+0xe4/0x360 [i915] [31908.556858] i915_pci_remove+0x23/0x30 [i915] [31908.556948] pci_device_remove+0x5c/0x100 [31908.557037] device_release_driver_internal+0x1db/0x2e0 [31908.557129] driver_detach+0x68/0xc0 [31908.557217] bus_remove_driver+0x8b/0x150 [31908.557304] driver_unregister+0x3e/0x60 [31908.557394] pci_unregister_driver+0x1d/0x110 [31908.557653] i915_exit+0x1a/0x87 [i915] [31908.557741] SyS_delete_module+0x264/0x2c0 [31908.557834] entry_SYSCALL_64_fastpath+0x1c/0xb1 [31908.557919] Memory state around the buggy address: [31908.558005] ffff8801f7788200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [31908.558127] ffff8801f7788280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [31908.558255] >ffff8801f7788300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [31908.558374] ^ [31908.558467] ffff8801f7788380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [31908.558595] ffff8801f7788400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb v2: Just leak the memory (8 bytes) as freeing it ourselves is not safe, and we need to coordinate a proper fix in platform_device itself. Fixes: eef57324d926 ("drm/i915: setup bridge for HDMI LPE audio driver") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99952 Signed-off-by: Chris Wilson Cc: Pierre-Louis Bossart Cc: Jerome Anand Cc: Jani Nikula Cc: Takashi Iwai Link: http://patchwork.freedesktop.org/patch/msgid/20170412080251.30648-1-chris@chris-wilson.co.uk Reviewed-by: Takashi Iwai Reviewed-by: Ville Syrjälä (cherry picked from commit 48ae80741da4b8a26b6df0f765713912bc7cc480) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_lpe_audio.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 45b21cfeb22087795f0b49397fbe529efeb99baf Author: Michael Ellerman Date: Wed Apr 26 17:32:38 2017 +1000 powerpc/powernv: Fix oops on P9 DD1 in cause_ipi() Recently we merged the native xive support for Power9, and then separately some reworks for doorbell IPI support. In isolation both series were OK, but the merged result had a bug in one case. On P9 DD1 we use pnv_p9_dd1_cause_ipi() which tries to use doorbells, and then falls back to the interrupt controller. However the fallback is implemented by calling icp_ops->cause_ipi. But now that xive support is merged we might be using xive, in which case icp_ops is not initialised, it's a xics specific structure. This leads to an oops such as: Unable to handle kernel paging request for data at address 0x00000028 Oops: Kernel access of bad area, sig: 11 [#1] NIP pnv_p9_dd1_cause_ipi+0x74/0xe0 LR smp_muxed_ipi_message_pass+0x54/0x70 To fix it, rather than using icp_ops which might be NULL, have both xics and xive set smp_ops->cause_ipi, and then in the powernv code we save that as ic_cause_ipi before overriding smp_ops->cause_ipi. For paranoia add a WARN_ON() to check if somehow smp_ops->cause_ipi is NULL. Fixes: b866cc2199d6 ("powerpc: Change the doorbell IPI calling convention") Tested-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/smp.c | 12 ++++++++---- arch/powerpc/sysdev/xics/xics-common.c | 3 +++ 2 files changed, 11 insertions(+), 4 deletions(-) commit bdb57b8dca8e77f85c4cd9aecabd0591e6b26b2d Author: Chris Wilson Date: Wed Apr 5 23:15:14 2017 +0100 drm/i915: Use the right mapping_gfp_mask for final shmem allocation Many sightings report the greater prevalence of allocation failures. This is all due to the incorrect use of mapping_gfp_constraint(), so remove it in favour of just querying the mapping_gfp_mask() which are the exact gfp_t we wanted in the first place. We still do expect a higher chance of reporting ENOMEM, as that is the intention of using __GFP_NORETRY -- to fail rather than oom after having reclaimed from our bo caches, and having done a direct|kswapd reclaim pass. Reported-by: Jason Ekstrand Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100594 Fixes: 24f8e00a8a2e ("drm/i915: Prefer to report ENOMEM rather than incur the oom for gfx allocations") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170405221514.23251-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen (cherry picked from commit b268d9fe0f10544f5f7a1b7015e2b97075e6215d) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 440df938b482801c62722cc9460ee55b9a4bd847 Author: Ville Syrjälä Date: Wed Mar 29 17:21:23 2017 +0300 drm/i915: Make legacy cursor updates more unsynced We're clearing the legacy_cursor_update flag before calling drm_atomic_helper_setup_commit() which means the helper will wait for the flip to complete before cleaning up the framebuffers. That's not what we want for the legacy cursor, so let's clear the flag after setting up the commit. Also toss in a FIXME about solving these problems in a nicer way using the fabled vblank workers. v2: Also unsync with legacy page flips Cc: Maarten Lankhorst Cc: Daniel Vetter Cc: Uwe Kleine-König Cc: Rafael Ristovski Fixes: a5509abda48e ("drm/i915: Fix legacy cursor vs. watermarks for ILK-BDW") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170329142123.5923-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst (cherry picked from commit 895203044067af64400cedbc055898bcec98d102) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) commit d445aaaac0879a4c4400bf59f20465ba3e8445f1 Author: Chris Wilson Date: Tue Apr 4 13:05:31 2017 +0100 drm/i915: Apply a cond_resched() to the saturated signaler If the engine is continually completing nops, we can saturate the signaler and keep it working indefinitely. This angers the NMI watchdog! A good example is to disable semaphores on snb and run igt/gem_exec_nop - the parallel, multi-engine workloads are more than sufficient to hog the CPU, preventing the system from even processing ICMP echo replies. v2: Tvrtko dug into cond_resched() on x86 and found that it only depended upon preempt_count and not tif_need_resched() - which means that we would always call schedule() at that point. Fixes: c81d46138da6 ("drm/i915: Convert trace-irq to the breadcrumb waiter") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170404120531.10737-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin (cherry picked from commit a7980a640cbd339aa80f406d1786a275a2c320bc) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_breadcrumbs.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 1676a2b35cd5a548da17d1106fb0d4d238c0d191 Author: Chris Wilson Date: Mon Apr 3 11:51:24 2017 +0100 drm/i915: Park the signaler before sleeping If the signal to park arrives before we sleep, then we need to check kthread_should_park() before sleeping to avoid missing the signal. Otherwise, if the signal arrives whilst we are processing completed requests, we will reset the current->state back to TASK_INTERRUPTIBLE and so miss the wakeup. Fixes: fe3288b5da2c ("drm/i915: Park the breadcrumbs signaler across a GPU reset") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170403105124.8969-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin (cherry picked from commit b1becb88268beb72df6495e35d3d76c138d215bb) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_breadcrumbs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ca2958f14c4706d5dced95f4f7dfe2bdd1b268de Author: Steven Rostedt (VMware) Date: Thu Apr 20 14:20:19 2017 -0400 selftests: ftrace: Allow some event trigger tests to run in an instance Some of the event triggers can run fine in an instance. Have them tested in one as well. The ones that still need work are the snapshot, stacktrace and traceon/off triggers, as they don't currently pass a handle to the trace_array they are attached to. But that can be for a future project. Acked-by: Masami Hiramatsu Acked-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) tools/testing/selftests/ftrace/test.d/trigger/trigger-eventonoff.tc | 1 + tools/testing/selftests/ftrace/test.d/trigger/trigger-filter.tc | 1 + tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc | 1 + tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc | 1 + tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc | 1 + 5 files changed, 5 insertions(+) commit 03c201759e9726ca6abaf8cabac936fd62c2543f Author: Steven Rostedt (VMware) Date: Thu Apr 20 13:44:32 2017 -0400 selftests: ftrace: Have some basic tests run in a tracing instance too Some of the basic ftrace selftests should also be run in an instance. These test a quick case of running all tracers in the available_tracers file within the instance. The other is testing the clock used for the instance. Acked-by: Masami Hiramatsu Acked-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) tools/testing/selftests/ftrace/test.d/00basic/basic2.tc | 1 + tools/testing/selftests/ftrace/test.d/00basic/basic3.tc | 1 + 2 files changed, 2 insertions(+) commit 35df6a894e5b282f725743a8cb9dd7ed8d63e320 Author: Steven Rostedt (VMware) Date: Thu Apr 20 13:39:40 2017 -0400 selftests: ftrace: Have event tests also run in an tracing instance The ftrace selftests of events: event-enable, event-pid, and subsystem-enable can all be run inside an instance. Change their tests to do both a toplevel run an an instance run. Acked-by: Masami Hiramatsu Acked-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) tools/testing/selftests/ftrace/test.d/event/event-enable.tc | 1 + tools/testing/selftests/ftrace/test.d/event/event-pid.tc | 1 + tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc | 1 + 3 files changed, 3 insertions(+) commit 6df0fee3e8ab6a612a971c5f837e61149448eae8 Author: Steven Rostedt (VMware) Date: Thu Apr 20 13:32:56 2017 -0400 selftests: ftrace: Make func_event_triggers and func_traceonoff_triggers tests do instances Both the func_event_triggers and func_traceonoff_triggers tests can be performed in both the toplevel instance as well as for individual instances. Have their tests run in both cases. Acked-by: Masami Hiramatsu Acked-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc | 1 + tools/testing/selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc | 1 + 2 files changed, 2 insertions(+) commit b5b77be812de78265e794523bf4e969fadf581be Author: Steven Rostedt (VMware) Date: Thu Apr 20 12:53:18 2017 -0400 selftests: ftrace: Allow some tests to be run in a tracing instance An tracing instance has several of the same capabilities as the top level instance, but may be implemented slightly different. Instead of just writing tests that duplicat the same test cases of the top level instance, allow a test to be written for both the top level as well as for an instance. If a test case can be run in both the top level as well as in an tracing instance directory, then it should add a tag "# flags: instance" in the header of the test file. Then after all tests have run, any test that has an instance flag set, will run again within a tracing instance. Link: http://lkml.kernel.org/r/20170421233850.1d0e9e05@gandalf.local.home Cc: Shuah Khan Acked-by: Namhyung Kim Acked-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) tools/testing/selftests/ftrace/ftracetest | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 4a99f3c83dc493c8ea84693d78cd792839c8aa64 Author: Amir Goldstein Date: Mon Apr 24 22:26:40 2017 +0300 ovl: do not set overlay.opaque on non-dir create The optimization for opaque dir create was wrongly being applied also to non-dir create. Fixes: 97c684cc9110 ("ovl: create directories inside merged parent opaque") Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi Cc: # v4.10 fs/overlayfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e000b8e0968dd7bfa09c444607ce1e48e57aafd3 Author: Jason J. Herne Date: Mon Mar 20 09:57:42 2017 -0400 s390: kvm: Cpu model support for msa6, msa7 and msa8 msa6 and msa7 require no changes. msa8 adds kma instruction and feature area. Signed-off-by: Jason J. Herne Reviewed-by: Christian Borntraeger Signed-off-by: Christian Borntraeger Documentation/virtual/kvm/devices/vm.txt | 3 ++- arch/s390/include/uapi/asm/kvm.h | 3 ++- arch/s390/kvm/kvm-s390.c | 4 ++++ arch/s390/tools/gen_facilities.c | 1 + tools/arch/s390/include/uapi/asm/kvm.h | 3 ++- 5 files changed, 11 insertions(+), 3 deletions(-) commit 0850e9219bd0d8fc337adb88c350b878f0dcbaa7 Merge: 730cd63 152c1c8 Author: Christian Borntraeger Date: Wed Apr 26 14:18:20 2017 +0200 Merge branch 's390forkvm' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux commit 152c1c8d60ebedce8cc912c12f9be9ceca6c6671 Author: Jason J. Herne Date: Thu Feb 2 08:25:19 2017 -0500 s390/cpacf: Introduce kma instruction Provide a kma instruction definition for use by callers of __cpacf_query. Signed-off-by: Jason J. Herne Reviewed-by: Christian Borntraeger Signed-off-by: Christian Borntraeger arch/s390/include/asm/cpacf.h | 1 + 1 file changed, 1 insertion(+) commit b112a2df28e6b5238ae4e68821ddd706a476d28c Author: Jason J. Herne Date: Tue Feb 21 09:00:54 2017 -0500 s390/cpacf: query instructions use unique parameters for compatibility with KMA The new KMA instruction requires unique parameters. Update __cpacf_query to generate a compatible assembler instruction. Signed-off-by: Jason J. Herne Acked-by: Harald Freudenberger Signed-off-by: Christian Borntraeger arch/s390/include/asm/cpacf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bbcb478e3fefa5d9acff6a5311073fae0809a9c3 Author: Harald Freudenberger Date: Fri Feb 24 09:10:05 2017 +0100 s390/trng: Introduce s390 TRNG device driver. This patch introduces a new device driver s390-trng for the s390 platform which exploits the new PRNO TRNG cpacf subfunction. The true-random-number-generator is accessible from userspace, by default visible as /dev/trng. The driver also registers at the kernel build-in hwrng API to feed the hwrng with fresh entropy data. This generic device driver for hardware random data is visible from userspace as /dev/hwrng. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/char/hw_random/Kconfig | 14 ++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/s390-trng.c | 268 +++++++++++++++++++++++++++++++++++++ 3 files changed, 283 insertions(+) commit 4c637cd8de43416c1b1eef6113e7aa06abacf18d Author: Harald Freudenberger Date: Fri Mar 17 10:46:31 2017 +0100 s390/crypto: Provide s390 specific arch random functionality. This patch introduces s390 specific arch random functionality. There exists a generic kernel API for arch specific random number implementation (see include/linux/random.h). Here comes the header file and a very small static code part implementing the arch_random_* API based on the TRNG subfunction coming with the reworked PRNG instruction. The arch random implementation hooks into the kernel initialization and checks for availability of the TRNG function. In accordance to the arch random API all functions return false if the TRNG is not available. Otherwise the new high quality entropy source provides fresh random on each invocation. The s390 arch random feature build is controlled via CONFIG_ARCH_RANDOM. This config option located in arch/s390/Kconfig is enabled by default and appears as entry "s390 architectural random number generation API" in the submenu "Processor type and features" for s390 builds. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/Kbuild | 2 +- arch/s390/Kconfig | 15 +++++++++ arch/s390/crypto/Makefile | 1 + arch/s390/crypto/arch_random.c | 31 +++++++++++++++++ arch/s390/include/asm/archrandom.h | 69 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 117 insertions(+), 1 deletion(-) commit f75fa65d70e2423a03c1b7391bfca410d554b1c5 Author: Harald Freudenberger Date: Tue Feb 28 08:59:22 2017 +0100 s390/crypto: Add new subfunctions to the cpacf PRNO function. There is a new TRNG extension in the subcodes for the cpacf PRNO function. This patch introduces new defines and a new cpacf_trng inline function to provide these new features for other kernel code parts. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/include/asm/cpacf.h | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) commit 985a9d20daa67e1983910fcf6e4f348ce8eed086 Author: Harald Freudenberger Date: Fri Feb 24 10:11:54 2017 +0100 s390/crypto: Renaming PPNO to PRNO. The PPNO (Perform Pseudorandom Number Operation) instruction has been renamed to PRNO (Perform Random Number Operation). To avoid confusion and conflicts with future extensions with this instruction (like e.g. provide a true random number generator) this patch renames all occurences in cpacf.h and adjusts the only exploiter code which is the prng device driver and one line in the s390 kvm feature check. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/crypto/prng.c | 42 +++++++++++++++++++++--------------------- arch/s390/include/asm/cpacf.h | 20 ++++++++++---------- arch/s390/kvm/kvm-s390.c | 2 +- 3 files changed, 32 insertions(+), 32 deletions(-) commit 1366def38b6ab574dd0dbf95e308c7d115e73796 Author: Heiko Carstens Date: Mon Apr 24 15:27:35 2017 +0200 s390/pageattr: avoid unnecessary page table splitting The kernel page table splitting code will split page tables even for features the CPU does not support. E.g. a CPU may not support the NX feature. In order to avoid this, remove those bits from the flags parameter that correlate with unsupported CPU features within __set_memory(). In addition add an early exit if the flags parameter does not have any bits set afterwards. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/mm/pageattr.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 24af6c4e4e0f6e9803bec8dca0f7748afbb2bbf0 Author: Ard Biesheuvel Date: Tue Feb 21 22:12:57 2017 +0000 arm64: module: split core and init PLT sections The arm64 module PLT code allocates all PLT entries in a single core section, since the overhead of having a separate init PLT section is not justified by the small number of PLT entries usually required for init code. However, the core and init module regions are allocated independently, and there is a corner case where the core region may be allocated from the VMALLOC region if the dedicated module region is exhausted, but the init region, being much smaller, can still be allocated from the module region. This leads to relocation failures if the distance between those regions exceeds 128 MB. (In fact, this corner case is highly unlikely to occur on arm64, but the issue has been observed on ARM, whose module region is much smaller). So split the core and init PLT regions, and name the latter ".init.plt" so it gets allocated along with (and sufficiently close to) the .init sections that it serves. Also, given that init PLT entries may need to be emitted for branches that target the core module, modify the logic that disregards defined symbols to only disregard symbols that are defined in the same section as the relocated branch instruction. Since there may now be two PLT entries associated with each entry in the symbol table, we can no longer hijack the symbol::st_size fields to record the addresses of PLT entries as we emit them for zero-addend relocations. So instead, perform an explicit comparison to check for duplicate entries. Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/include/asm/module.h | 9 +++- arch/arm64/kernel/module-plts.c | 108 +++++++++++++++++++++++----------------- arch/arm64/kernel/module.c | 2 +- arch/arm64/kernel/module.lds | 1 + 4 files changed, 72 insertions(+), 48 deletions(-) commit 47d272f0f9887343f4e4d31bb22910b141b96654 Merge: 9cc4b7c 2910849 Author: Kalle Valo Date: Wed Apr 26 14:21:00 2017 +0300 Merge tag 'iwlwifi-next-for-kalle-2017-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next One more pull-request intended for 4.12. These are the changes: * The firmware for 7265D and 3168 NICs is frozen at version 29; * Sari continues working heavily on support for A000 series; * A bunch of fixes; * Some cleanups here and there; commit bdf95923086fb359ccb44c815724c3ace1611c90 Author: Sunil Goutham Date: Tue Apr 25 15:27:52 2017 +0530 iommu/arm-smmu: Return IOVA in iova_to_phys when SMMU is bypassed For software initiated address translation, when domain type is IOMMU_DOMAIN_IDENTITY i.e SMMU is bypassed, mimic HW behavior i.e return the same IOVA as translated address. This patch is an extension to Will Deacon's patchset "Implement SMMU passthrough using the default domain". Signed-off-by: Sunil Goutham Acked-by: Will Deacon Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu-v3.c | 3 +++ drivers/iommu/arm-smmu.c | 3 +++ 2 files changed, 6 insertions(+) commit d2718d1365f7fce624fd7ed163f60532f92ed016 Author: Gregory CLEMENT Date: Wed Apr 5 17:18:03 2017 +0200 arm64: marvell: enable the Armada 37xx pinctrl driver This commit makes sure the driver for the Armada 37xx pin controller is enabled. Signed-off-by: Gregory CLEMENT arch/arm64/Kconfig.platforms | 5 +++++ 1 file changed, 5 insertions(+) commit ca169cc2f9e1f8ed9c867b197a49d6dd05e5436d Author: Kailang Yang Date: Tue Apr 25 16:17:40 2017 +0800 ALSA: hda/realtek - Add Dual Codecs support for Lenovo P520/420 Lenovo P520/420 build with two codecs. ALC233 for front panel. ALC662 for rear panel. This patch will rename capture name for slove conflicts. And create a card longname for UCM profile. Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit c92a90a5060a84e4a180af6b60aa0fb3a5e46c64 Merge: 6d80594 11ce4b3 Author: Russell King Date: Wed Apr 26 10:59:49 2017 +0100 Merge branches 'fixes' and 'misc' into for-next commit 11ce4b33aedc65198d7bc9669344ebca5ee36a41 Author: Grygorii Strashko Date: Tue Apr 25 21:20:52 2017 +0100 ARM: 8672/1: mm: remove tasklist locking from update_sections_early() The below backtrace can be observed on -rt kernel with CONFIG_DEBUG_MODULE_RONX (4.9 kernel CONFIG_DEBUG_RODATA) option enabled: BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:993 in_atomic(): 1, irqs_disabled(): 128, pid: 14, name: migration/0 1 lock held by migration/0/14: #0: (tasklist_lock){+.+...}, at: [] update_sections_early+0x24/0xdc irq event stamp: 38 hardirqs last enabled at (37): [] _raw_spin_unlock_irq+0x24/0x68 hardirqs last disabled at (38): [] multi_cpu_stop+0xd8/0x138 softirqs last enabled at (0): [] copy_process.part.5+0x238/0x1b64 softirqs last disabled at (0): [< (null)>] (null) Preemption disabled at: [] cpu_stopper_thread+0x80/0x10c CPU: 0 PID: 14 Comm: migration/0 Not tainted 4.9.21-rt16-02220-g49e319c #15 Hardware name: Generic DRA74X (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xa8/0xd4) [] (dump_stack) from [] (___might_sleep+0x1bc/0x2ac) [] (___might_sleep) from [] (__rt_spin_lock+0x1c/0x30) [] (__rt_spin_lock) from [] (rt_read_lock+0x54/0x68) [] (rt_read_lock) from [] (update_sections_early+0x24/0xdc) [] (update_sections_early) from [] (__fix_kernmem_perms+0x10/0x1c) [] (__fix_kernmem_perms) from [] (multi_cpu_stop+0x100/0x138) [] (multi_cpu_stop) from [] (cpu_stopper_thread+0x88/0x10c) [] (cpu_stopper_thread) from [] (smpboot_thread_fn+0x174/0x31c) [] (smpboot_thread_fn) from [] (kthread+0xf0/0x108) [] (kthread) from [] (ret_from_fork+0x14/0x3c) Freeing unused kernel memory: 1024K (c0d00000 - c0e00000) The stop_machine() is called with cpus = NULL from fix_kernmem_perms() and mark_rodata_ro() which means only one CPU will execute update_sections_early() while all other CPUs will spin and wait. Hence, it's safe to remove tasklist locking from update_sections_early(). As part of this change also mark functions which are local to this module as static. Signed-off-by: Grygorii Strashko Acked-by: Laura Abbott Acked-by: Kees Cook Signed-off-by: Russell King arch/arm/mm/init.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit b70cd406d7fe9976962d621d8c60d324eb47d284 Author: Vladimir Murzin Date: Mon Apr 24 10:41:53 2017 +0100 ARM: 8671/1: V7M: Preserve registers across switch from Thread to Handler mode According to ARMv7 ARM, when exception is taken content of r0-r3, r12 is unknown (see ExceptionTaken() pseudocode). Even though existent implementations keep these register unchanged, preserve them to be in line with architecture. Reported-by: Dobromir Stefanov Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/mm/proc-v7m.S | 2 ++ 1 file changed, 2 insertions(+) commit 6d80594936914e798b1b54b3bfe4bd68d8418966 Author: Vladimir Murzin Date: Mon Apr 24 10:40:48 2017 +0100 ARM: 8670/1: V7M: Do not corrupt vector table around v7m_invalidate_l1 call We save/restore registers around v7m_invalidate_l1 to address pointed by r12, which is vector table, so the first eight entries are overwritten with a garbage. We already have stack setup at that stage, so use it to save/restore register. Fixes: 6a8146f420be ("ARM: 8609/1: V7M: Add support for the Cortex-M7 processor") Cc: Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/mm/proc-v7m.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f563dab41733c0e73202a8a5977b441715dc9946 Author: Greg Kroah-Hartman Date: Wed Apr 26 11:43:39 2017 +0200 goldfish_pipe: fix build warning about using too much stack. The new goldfish_pipe code used too much stack space in the transfer_max_buffers() call. As the function is serialized with a lock, let's make the buffer static to not use the stack for the large buffer. Reported-by: kbuild test robot Cc: Yurii Zubrytskyi Cc: Jin Qian Signed-off-by: Greg Kroah-Hartman drivers/platform/goldfish/goldfish_pipe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 726ea1a8ea96b2bba34ee2073b58f0770800701c Author: Jin Qian Date: Thu Apr 20 16:05:11 2017 +0200 goldfish_pipe: An implementation of more parallel pipe This is a driver code for a redesigned android pipe. Currently it works for x86 and x64 emulators with the following performance results: ADB push to /dev/null, Ubuntu, 400 MB file, times are for (1 / 10 / 100) parallel adb commands x86 adb push: (4.4s / 11.5s / 2m10s) -> (2.8s / 6s / 51s) x64 adb push: (7s / 15s / (too long, 6m+) -> (2.7s / 6.2s / 52s) ADB pull and push to /data/ have the same %% of speedup More importantly, I don't see any signs of slowdowns when run in parallel with Antutu benchmark, so it is definitely making much better job at multithreading. Signed-off-by: Yurii Zubrytskyi Signed-off-by: Jin Qian Signed-off-by: Greg Kroah-Hartman drivers/platform/goldfish/goldfish_pipe.c | 970 ++++++++++++++++++++---------- 1 file changed, 641 insertions(+), 329 deletions(-) commit dd17cc7bf8b9447f5612c3887b84a88eeb5e3dff Author: Matthew Gerlach Date: Mon Apr 24 16:34:22 2017 -0500 fpga fr br: update supported version numbers The value in the version register of the altera freeze bridge controller changed from the beta value of 2 to the value of 0xad000003 in the official release of the IP. This patch supports the old and new version numbers, and the driver's probe function will fail if neither of the supported versions is found. Signed-off-by: Matthew Gerlach Reviewed-by: Moritz Fischer Signed-off-by: Alan Tull Signed-off-by: Greg Kroah-Hartman drivers/fpga/altera-freeze-bridge.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit e73bbf64907c88d3bb811756fc25548131524035 Author: Tobias Klauser Date: Mon Apr 24 16:34:21 2017 -0500 fpga: region: release FPGA region reference in error path If fpga_region_get_manager() fails in fpga_region_program_fpga(), a reference to the fpga_manager instance previously acquired through fpga_region_get() is retained. Make sure to properly release it in the error case by using a separate jump label which will call fpga_region_put() in before returning. Signed-off-by: Tobias Klauser Acked-by: Moritz Fischer Signed-off-by: Alan Tull Signed-off-by: Greg Kroah-Hartman drivers/fpga/fpga-region.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d721f9bbe6a7d9543f560053f8be5237e7db18e9 Author: Tobias Klauser Date: Mon Apr 24 16:34:20 2017 -0500 fpga altera-hps2fpga: disable/unprepare clock on error in alt_fpga_bridge_probe() If either _alt_hps2fpga_enable_set() or fpga_bridge_register() fail in alt_fpga_bridge_probe(), the clock remains enabled and prepared. Also, in the error path for _alt_hps2fpga_enable_set() a call to fpga_bridge_unregister() is made even though the bridge was not registered yet. Remove the unnecessary call to fpga_bridge_unregister() and call clk_disable_unprepare() in both error paths in order to make sure the clock gets properly disabled and unprepared. Signed-off-by: Tobias Klauser Acked-by: Moritz Fischer Signed-off-by: Alan Tull Signed-off-by: Greg Kroah-Hartman drivers/fpga/altera-hps2fpga.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 139752a210544dd02bac5c21322751de300ece93 Author: Tomas Winkler Date: Thu Apr 20 09:49:03 2017 +0300 mei: drop the TODO from samples The TODO file is not relevant anymore and it's just a leftover from the time the driver was in the staging tree. Signed-off-by: Tomas Winkler Reviewed-by: Alexander Usyskin Signed-off-by: Greg Kroah-Hartman samples/mei/TODO | 2 -- 1 file changed, 2 deletions(-) commit 9f41ebfb7e395650f001c2f711833ef1a37ac0d4 Author: Arnd Bergmann Date: Tue Apr 25 22:04:53 2017 +0200 usb: musb: don't mark of_dev_auxdata as initdata The probe function is not __init since it can be called for deferred probing or when unbinding/rebinding the device, and therefore it must not reference objects in __initdata, as pointed out by this link time warning: WARNING: drivers/usb/musb/da8xx.o(.text+0x9d4): Section mismatch in reference from the function da8xx_probe() to the (unknown reference) .init.data:(unknown) This removes the annotation. Reported-by: Olof's autobuilder Fixes: d6299b6efbf6 ("usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/da8xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 942a48730faf149ccbf3e12ac718aee120bb3529 Author: Maksim Salau Date: Tue Apr 25 22:49:21 2017 +0300 usb: misc: legousbtower: Fix buffers on stack Allocate buffers on HEAP instead of STACK for local structures that are to be received using usb_control_msg(). Signed-off-by: Maksim Salau Tested-by: Alfredo Rafael Vicente Boix ; Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/legousbtower.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) commit f8a77153b0cb6eef34f16670df678dae49ce3776 Merge: ab6eb21 c821ee6 Author: Jani Nikula Date: Wed Apr 26 12:19:55 2017 +0300 Merge tag 'gvt-next-fixes-2017-04-20' of https://github.com/01org/gvt-linux into drm-intel-next-fixes gvt-next-fixes-2017-04-20 - some code optimization from Changbin - debug message cleanup after QoS merge - misc fixes for display mmio init, reset vgpu warning, etc. Signed-off-by: Jani Nikula commit 9cc4b7cb86cbcc6330a3faa8cd65268cd2d3c227 Author: James Hughes Date: Tue Apr 25 10:15:06 2017 +0100 brcmfmac: Make skb header writable before use The driver was making changes to the skb_header without ensuring it was writable (i.e. uncloned). This patch also removes some boiler plate header size checking/adjustment code as that is also handled by the skb_cow_header function used to make header writable. Signed-off-by: James Hughes Acked-by: Arend van Spriel Signed-off-by: Kalle Valo .../net/wireless/broadcom/brcm80211/brcmfmac/core.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 455a1eb4654c24560eb9dfc634f29cba3d87601e Author: James Hughes Date: Mon Apr 24 12:40:50 2017 +0100 brcmfmac: Ensure pointer correctly set if skb data location changes The incoming skb header may be resized if header space is insufficient, which might change the data adddress in the skb. Ensure that a cached pointer to that data is correctly set by moving assignment to after any possible changes. Signed-off-by: James Hughes Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9dc7efd3978aa67ae598129d2a3f240b390ce508 Author: Pan Bian Date: Mon Apr 24 08:40:28 2017 +0800 rndis_wlan: add return value validation Function create_singlethread_workqueue() will return a NULL pointer if there is no enough memory, and its return value should be validated before using. However, in function rndis_wlan_bind(), its return value is not checked. This may cause NULL dereference bugs. This patch fixes it. Signed-off-by: Pan Bian Signed-off-by: Kalle Valo drivers/net/wireless/rndis_wlan.c | 4 ++++ 1 file changed, 4 insertions(+) commit dc3f89c38a8406554ffeffa370aad086a9c5e9de Author: Pan Bian Date: Sun Apr 23 21:19:38 2017 +0800 libertas: check return value of alloc_workqueue Function alloc_workqueue() will return a NULL pointer if there is no enough memory, and its return value should be validated before using. However, in function if_spi_probe(), its return value is not checked. This may result in a NULL dereference bug. This patch fixes the bug. Signed-off-by: Pan Bian Signed-off-by: Kalle Valo drivers/net/wireless/marvell/libertas/if_spi.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5fb01e91daf84ad1e50edfcf63116ecbe31e7ba7 Author: Pan Bian Date: Sun Apr 23 15:00:23 2017 +0800 mt7601u: check return value of alloc_skb Function alloc_skb() will return a NULL pointer if there is no enough memory. However, in function mt7601u_mcu_msg_alloc(), its return value is not validated before it is used. This patch fixes it. Signed-off-by: Pan Bian Acked-by: Jakub Kicinski Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt7601u/mcu.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 2f6ae79cb04bb7f9b4be3f1c32b6fda35bf976bc Author: Maksim Salau Date: Sat Apr 22 20:03:06 2017 +0300 orinoco_usb: Fix buffer on stack Allocate buffer on HEAP instead of STACK for a local variable that is to be sent using usb_control_msg(). Signed-off-by: Maksim Salau Signed-off-by: Kalle Valo drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit bea35f90dbb13c08389993847019b44047862952 Author: Colin Ian King Date: Sat Apr 22 14:21:49 2017 +0100 orinoco: fix spelling mistake: "Registerred" -> "Registered" trivial fix to spelling mistake in dbg_dbg message Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/intersil/orinoco/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46cfa2148e7371c537efff1a1c693e58f523089d Author: Larry Finger Date: Sun Apr 16 19:32:07 2017 -0500 rtlwifi: rtl8821ae: setup 8812ae RFE according to device type Current channel switch implementation sets 8812ae RFE reg value assuming that device always has type 2. Extend possible RFE types set and write corresponding reg values. Source for new code is http://dlcdnet.asus.com/pub/ASUS/wireless/PCE-AC51/DR_PCE_AC51_20232801152016.zip Signed-off-by: Maxim Samoylov Signed-off-by: Larry Finger Cc: Stable Cc: Yan-Hsuan Chuang Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 122 ++++++++++++++++++--- .../net/wireless/realtek/rtlwifi/rtl8821ae/reg.h | 1 + 2 files changed, 107 insertions(+), 16 deletions(-) commit d529a4ad91efcf68b65440c6555895fd7ad5a08e Author: Vasilis Liaskovitis Date: Tue Apr 25 10:26:44 2017 +0200 HID: usbhid: Add HID_QUIRK_NOGET for Aten CS-1758 KVM switch Like other switches, the Aten CS-1758 KVM switch needs a quirk to avoid spewing errors: [12599018.071059] usb 5-2: input irq status -75 received [12599018.079053] usb 5-2: input irq status -75 received Signed-off-by: Vasilis Liaskovitis Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/usbhid/hid-quirks.c | 1 + 2 files changed, 2 insertions(+) commit dbd68d8e84c606673ebbcf15862f8c155fa92326 Author: Andy Lutomirski Date: Sat Apr 22 00:01:22 2017 -0700 x86/mm: Fix flush_tlb_page() on Xen flush_tlb_page() passes a bogus range to flush_tlb_others() and expects the latter to fix it up. native_flush_tlb_others() has the fixup but Xen's version doesn't. Move the fixup to flush_tlb_others(). AFAICS the only real effect is that, without this fix, Xen would flush everything instead of just the one page on remote vCPUs in when flush_tlb_page() was called. Signed-off-by: Andy Lutomirski Reviewed-by: Boris Ostrovsky Cc: Andrew Morton Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Konrad Rzeszutek Wilk Cc: Linus Torvalds Cc: Michal Hocko Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Fixes: e7b52ffd45a6 ("x86/flush_tlb: try flush_tlb_single one by one in flush_tlb_range") Link: http://lkml.kernel.org/r/10ed0e4dfea64daef10b87fb85df1746999b4dba.1492844372.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/mm/tlb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ce27374fabf553153c3f53efcaa9bfab9216bd8c Author: Andy Lutomirski Date: Sat Apr 22 00:01:21 2017 -0700 x86/mm: Make flush_tlb_mm_range() more predictable I'm about to rewrite the function almost completely, but first I want to get a functional change out of the way. Currently, if flush_tlb_mm_range() does not flush the local TLB at all, it will never do individual page flushes on remote CPUs. This seems to be an accident, and preserving it will be awkward. Let's change it first so that any regressions in the rewrite will be easier to bisect and so that the rewrite can attempt to change no visible behavior at all. The fix is simple: we can simply avoid short-circuiting the calculation of base_pages_to_flush. As a side effect, this also eliminates a potential corner case: if tlb_single_page_flush_ceiling == TLB_FLUSH_ALL, flush_tlb_mm_range() could have ended up flushing the entire address space one page at a time. Signed-off-by: Andy Lutomirski Acked-by: Dave Hansen Cc: Andrew Morton Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Michal Hocko Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/4b29b771d9975aad7154c314534fec235618175a.1492844372.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/mm/tlb.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 29961b59a51f8c6838a26a45e871a7ed6771809b Author: Andy Lutomirski Date: Sat Apr 22 00:01:20 2017 -0700 x86/mm: Remove flush_tlb() and flush_tlb_current_task() I was trying to figure out what how flush_tlb_current_task() would possibly work correctly if current->mm != current->active_mm, but I realized I could spare myself the effort: it has no callers except the unused flush_tlb() macro. Signed-off-by: Andy Lutomirski Cc: Andrew Morton Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Michal Hocko Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/e52d64c11690f85e9f1d69d7b48cc2269cd2e94b.1492844372.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/tlbflush.h | 9 --------- arch/x86/mm/tlb.c | 17 ----------------- 2 files changed, 26 deletions(-) commit 9ccee2373f0658f234727700e619df097ba57023 Author: Andy Lutomirski Date: Sat Apr 22 00:01:19 2017 -0700 x86/vm86/32: Switch to flush_tlb_mm_range() in mark_screen_rdonly() mark_screen_rdonly() is the last remaining caller of flush_tlb(). flush_tlb_mm_range() is potentially faster and isn't obsolete. Compile-tested only because I don't know whether software that uses this mechanism even exists. Signed-off-by: Andy Lutomirski Cc: Andrew Morton Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Michal Hocko Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Sasha Levin Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/791a644076fc3577ba7f7b7cafd643cc089baa7d.1492844372.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/vm86_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a08ecfe74d7796ddc92ec312d3b7eaeba5a7c22 Author: Florian Westphal Date: Thu Apr 20 10:11:35 2017 +0200 netfilter: don't attach a nat extension by default nowadays the NAT extension only stores the interface index (used to purge connections that got masqueraded when interface goes down) and pptp nat information. Previous patches moved nf_ct_nat_ext_add to those places that need it. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_nat.h | 2 +- net/ipv4/netfilter/nf_nat_l3proto_ipv4.c | 4 +--- net/ipv6/netfilter/nf_nat_l3proto_ipv6.c | 4 +--- net/netfilter/nf_nat_core.c | 6 ------ 4 files changed, 3 insertions(+), 13 deletions(-) commit 2fe7c321ab54d391dffb98911f5fb5cd315d6526 Author: Florian Westphal Date: Thu Apr 20 10:11:34 2017 +0200 netfilter: pptp: attach nat extension when needed make sure nat extension gets added if the master conntrack is subject to NAT. This will be required once the nat core stops adding it by default. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nf_nat_pptp.c | 25 +++++++++++++++++++++---- net/netfilter/nf_conntrack_pptp.c | 12 ++++++++++-- 2 files changed, 31 insertions(+), 6 deletions(-) commit ff459018d7cb13e43ee2f857949c26b235ccd9a5 Author: Florian Westphal Date: Thu Apr 20 10:11:33 2017 +0200 netfilter: masquerade: attach nat extension if not present Currently the nat extension is always attached as soon as nat module is loaded. However, most NAT uses do not need the nat extension anymore. Prepare to remove the add-nat-by-default by making those places that need it attach it if its not present yet. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nf_nat_masquerade_ipv4.c | 5 +++-- net/ipv6/netfilter/nf_nat_masquerade_ipv6.c | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) commit 22d4536d2c836f74421d01d534b3117223a822a0 Author: Florian Westphal Date: Thu Apr 20 09:54:24 2017 +0200 netfilter: conntrack: handle initial extension alloc via krealloc krealloc(NULL, ..) is same as kmalloc(), so we can avoid special-casing the initial allocation after the prealloc removal (we had to use ->alloc_len as the initial allocation size). This also means we do not zero the preallocated memory anymore; only offsets[]. Existing code makes sure the new (used) extension space gets zeroed out. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_extend.c | 51 +++++++++++-------------------------- 1 file changed, 15 insertions(+), 36 deletions(-) commit 23f671a1b56a4493075ab7263c78c526ac12a592 Author: Florian Westphal Date: Thu Apr 20 09:54:23 2017 +0200 netfilter: conntrack: mark extension structs as const Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_extend.h | 4 ++-- net/netfilter/nf_conntrack_acct.c | 2 +- net/netfilter/nf_conntrack_ecache.c | 2 +- net/netfilter/nf_conntrack_extend.c | 4 ++-- net/netfilter/nf_conntrack_helper.c | 2 +- net/netfilter/nf_conntrack_labels.c | 2 +- net/netfilter/nf_conntrack_seqadj.c | 2 +- net/netfilter/nf_conntrack_timeout.c | 2 +- net/netfilter/nf_conntrack_timestamp.c | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) commit 54044b1f0204da158a6a395bd02b63bb02ffff98 Author: Florian Westphal Date: Thu Apr 20 09:54:22 2017 +0200 netfilter: conntrack: remove prealloc support It was used by the nat extension, but since commit 7c9664351980 ("netfilter: move nat hlist_head to nf_conn") its only needed for connections that use MASQUERADE target or a nat helper. Also it seems a lot easier to preallocate a fixed size instead. With default settings, conntrack first adds ecache extension (sysctl defaults to 1), so we get 40(ct extension header) + 24 (ecache) == 64 byte on x86_64 for initial allocation. Followup patches can constify the extension structs and avoid the initial zeroing of the entire extension area. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_extend.h | 6 ---- net/netfilter/nf_conntrack_extend.c | 49 +++-------------------------- net/netfilter/nf_nat_core.c | 1 - 3 files changed, 4 insertions(+), 52 deletions(-) commit 495dcb56d09ddb63afe30e799af41876c3f061cc Author: Gao Feng Date: Thu Apr 20 14:01:45 2017 +0800 netfilter: SYNPROXY: Return NF_STOLEN instead of NF_DROP during handshaking Current SYNPROXY codes return NF_DROP during normal TCP handshaking, it is not friendly to caller. Because the nf_hook_slow would treat the NF_DROP as an error, and return -EPERM. As a result, it may cause the top caller think it meets one error. For example, the following codes are from cfv_rx_poll() err = netif_receive_skb(skb); if (unlikely(err)) { ++cfv->ndev->stats.rx_dropped; } else { ++cfv->ndev->stats.rx_packets; cfv->ndev->stats.rx_bytes += skb_len; } When SYNPROXY returns NF_DROP, then netif_receive_skb returns -EPERM. As a result, the cfv driver would treat it as an error, and increase the rx_dropped counter. So use NF_STOLEN instead of NF_DROP now because there is no error happened indeed, and free the skb directly. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/ipt_SYNPROXY.c | 21 ++++++++++++++------- net/ipv6/netfilter/ip6t_SYNPROXY.c | 20 ++++++++++++++------ 2 files changed, 28 insertions(+), 13 deletions(-) commit aee12a0a3727e16fb837367c4755cb6daaf45109 Author: Florian Westphal Date: Thu Apr 20 00:45:48 2017 +0200 ebtables: remove nf_hook_register usage Similar to ip_register_table, pass nf_hook_ops to ebt_register_table(). This allows to handle hook registration also via pernet_ops and allows us to avoid use of legacy register_hook api. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/linux/netfilter_bridge/ebtables.h | 6 ++- net/bridge/netfilter/ebtable_broute.c | 4 +- net/bridge/netfilter/ebtable_filter.c | 15 ++------ net/bridge/netfilter/ebtable_nat.c | 15 ++------ net/bridge/netfilter/ebtables.c | 61 +++++++++++++++++++------------ 5 files changed, 50 insertions(+), 51 deletions(-) commit 1a0ed0ad4812a59a19f3bdb237601389214d1ed1 Author: Florian Westphal Date: Thu Apr 20 00:42:07 2017 +0200 netfilter: decnet: only register hooks in init namespace looks like decnet isn't namespacified in first place, so restrict hook registration to the initial namespace. Prepares for eventual removal of legacy nf_register_hook() api. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/decnet/netfilter/dn_rtmsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit efe41606184ef33efde1d708eaf7d0fad9e06694 Author: Florian Westphal Date: Wed Apr 19 18:25:22 2017 +0200 ipvs: convert to use pernet nf_hook api nf_(un)register_hooks has to maintain an internal hook list to add/remove those hooks from net namespaces as they are added/deleted. ipvs already uses pernet_ops, so we can switch to the (more recent) pernet hook api instead. Compile tested only. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_core.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 1fefe14725c7cc7c720f9f8af2bc3bef13fd7d39 Author: Florian Westphal Date: Wed Apr 19 18:14:04 2017 +0200 netfilter: synproxy: only register hooks when needed Defer registration of the synproxy hooks until the first SYNPROXY rule is added. Also means we only register hooks in namespaces that need it. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_synproxy.h | 2 + net/ipv4/netfilter/ipt_SYNPROXY.c | 73 ++++++++++++++------------- net/ipv6/netfilter/ip6t_SYNPROXY.c | 73 ++++++++++++++------------- 3 files changed, 80 insertions(+), 68 deletions(-) commit e6ab9c4d437764c7fb728d428dc9e717cdb183d0 Author: Kirill A. Shutemov Date: Tue Apr 25 12:25:57 2017 +0300 x86/mm/64: Fix crash in remove_pagetable() remove_pagetable() does page walk using p*d_page_vaddr() plus cast. It's not canonical approach -- we usually use p*d_offset() for that. It works fine as long as all page table levels are present. We broke the invariant by introducing folded p4d page table level. As result, remove_pagetable() interprets PMD as PUD and it leads to crash: BUG: unable to handle kernel paging request at ffff880300000000 IP: memchr_inv+0x60/0x110 PGD 317d067 P4D 317d067 PUD 3180067 PMD 33f102067 PTE 8000000300000060 Let's fix this by using p*d_offset() instead of p*d_page_vaddr() for page walk. Reported-by: Dan Williams Tested-by: Dan Williams Signed-off-by: Kirill A. Shutemov Cc: Andy Lutomirski Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Fixes: f2a6a7050109 ("x86: Convert the rest of the code to support p4d_t") Link: http://lkml.kernel.org/r/20170425092557.21852-1-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/init_64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 35fa70dfd6e6f270d7aabb3470855208b11ac9fb Author: Dan Carpenter Date: Thu Apr 20 13:26:18 2017 +0300 iio: adc: Max9611: checking for ERR_PTR instead of NULL in probe devm_iio_device_alloc() doesn't return ERR_PTRs, it returns NULLs. Fixes: 69780a3bbc0b ("iio: adc: Add Maxim max9611 ADC driver") Signed-off-by: Dan Carpenter Signed-off-by: Jonathan Cameron drivers/iio/adc/max9611.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 262fa734a0023a43391f9bd4a4099487b8393f35 Author: Josh Poimboeuf Date: Tue Apr 25 20:48:52 2017 -0500 x86/unwind: Dump all stacks in unwind_dump() Currently unwind_dump() dumps only the most recently accessed stack. But it has a few issues. In some cases, 'first_sp' can get out of sync with 'stack_info', causing unwind_dump() to start from the wrong address, flood the printk buffer, and eventually read a bad address. In other cases, dumping only the most recently accessed stack doesn't give enough data to diagnose the error. Fix both issues by dumping *all* stacks involved in the trace, not just the last one. Signed-off-by: Josh Poimboeuf 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 Fixes: 8b5e99f02264 ("x86/unwind: Dump stack data on warnings") Link: http://lkml.kernel.org/r/016d6a9810d7d1bfc87ef8c0e6ee041c6744c909.1493171120.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/unwind_frame.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) commit b0d50c7b5d807ce6f7ba58e42b260e92bd7d88fb Author: Josh Poimboeuf Date: Tue Apr 25 20:48:51 2017 -0500 x86/unwind: Silence more entry-code related warnings Borislav Petkov reported the following unwinder warning: WARNING: kernel stack regs at ffffc9000024fea8 in udevadm:92 has bad 'bp' value 00007fffc4614d30 unwind stack type:0 next_sp: (null) mask:0x6 graph_idx:0 ffffc9000024fea8: 000055a6100e9b38 (0x55a6100e9b38) ffffc9000024feb0: 000055a6100e9b35 (0x55a6100e9b35) ffffc9000024feb8: 000055a6100e9f68 (0x55a6100e9f68) ffffc9000024fec0: 000055a6100e9f50 (0x55a6100e9f50) ffffc9000024fec8: 00007fffc4614d30 (0x7fffc4614d30) ffffc9000024fed0: 000055a6100eaf50 (0x55a6100eaf50) ffffc9000024fed8: 0000000000000000 ... ffffc9000024fee0: 0000000000000100 (0x100) ffffc9000024fee8: ffff8801187df488 (0xffff8801187df488) ffffc9000024fef0: 00007ffffffff000 (0x7ffffffff000) ffffc9000024fef8: 0000000000000000 ... ffffc9000024ff10: ffffc9000024fe98 (0xffffc9000024fe98) ffffc9000024ff18: 00007fffc4614d00 (0x7fffc4614d00) ffffc9000024ff20: ffffffffffffff10 (0xffffffffffffff10) ffffc9000024ff28: ffffffff811c6c1f (SyS_newlstat+0xf/0x10) ffffc9000024ff30: 0000000000000010 (0x10) ffffc9000024ff38: 0000000000000296 (0x296) ffffc9000024ff40: ffffc9000024ff50 (0xffffc9000024ff50) ffffc9000024ff48: 0000000000000018 (0x18) ffffc9000024ff50: ffffffff816b2e6a (entry_SYSCALL_64_fastpath+0x18/0xa8) ... It unwinded from an interrupt which came in right after entry code called into a C syscall handler, before it had a chance to set up the frame pointer, so regs->bp still had its user space value. Add a check to silence warnings in such a case, where an interrupt has occurred and regs->sp is almost at the end of the stack. Reported-by: Borislav Petkov Tested-by: Borislav Petkov Signed-off-by: Josh Poimboeuf 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 Fixes: c32c47c68a0a ("x86/unwind: Warn on bad frame pointer") Link: http://lkml.kernel.org/r/c695f0d0d4c2cfe6542b90e2d0520e11eb901eb5.1493171120.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/unwind_frame.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 6272c0de13abf1480f701d38288f28a11b4301c4 Author: Matt Ranostay Date: Fri Apr 14 16:38:19 2017 -0700 iio: proximity: as3935: recalibrate RCO after resume According to the datasheet the RCO must be recalibrated on every power-on-reset. Also remove mutex locking in the calibration function since callers other than the probe function (which doesn't need it) will have a lock. Fixes: 24ddb0e4bba4 ("iio: Add AS3935 lightning sensor support") Cc: George McCollister Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/proximity/as3935.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 83c4919058459c32138a1ebe35f72b7013a9ddbc Author: Michael Ellerman Date: Wed Apr 26 15:57:19 2017 +1000 powerpc/powernv: Fix missing attr initialisation in opal_export_attrs() In opal_export_attrs() we dynamically allocate some bin_attributes. They're allocated with kmalloc() and although we initialise most of the fields, we don't initialise write() or mmap(), and in particular we don't initialise the lockdep related fields in the embedded struct attribute. This leads to a lockdep warning at boot: BUG: key c0000000f11906d8 not in .data! WARNING: CPU: 0 PID: 1 at ../kernel/locking/lockdep.c:3136 lockdep_init_map+0x28c/0x2a0 ... Call Trace: lockdep_init_map+0x288/0x2a0 (unreliable) __kernfs_create_file+0x8c/0x170 sysfs_add_file_mode_ns+0xc8/0x240 __machine_initcall_powernv_opal_init+0x60c/0x684 do_one_initcall+0x60/0x1c0 kernel_init_freeable+0x2f4/0x3d4 kernel_init+0x24/0x160 ret_from_kernel_thread+0x5c/0xb0 Fix it by kzalloc'ing the attr, which fixes the uninitialised write() and mmap(), and calling sysfs_bin_attr_init() on it to initialise the lockdep fields. Fixes: 11fe909d2362 ("powerpc/powernv: Add OPAL exports attributes to sysfs") Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b409946b2a3c1ddcde75e5f35a77e03f4d354be0 Author: Michael Ellerman Date: Tue Apr 25 20:49:24 2017 +1000 powerpc/mm: Fix possible out-of-bounds shift in arch_mmap_rnd() The recent patch to add runtime configuration of the ASLR limits added a bug in arch_mmap_rnd() where we may shift an integer (32-bits) by up to 33 bits, leading to undefined behaviour. In practice it exhibits as every process seg faulting instantly, presumably because the rnd value hasn't been restricited by the modulus at all. We didn't notice because it only happens under certain kernel configurations and if the number of bits is actually set to a large value. Fix it by switching to unsigned long. Fixes: 9fea59bd7ca5 ("powerpc/mm: Add support for runtime configuration of ASLR limits") Reported-by: Balbir Singh Reviewed-by: Kees Cook Signed-off-by: Michael Ellerman arch/powerpc/mm/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fdb980fb17c6a474614dd984b500418a2811d9e7 Author: Andy Shevchenko Date: Tue Apr 25 22:36:38 2017 +0300 dmaengine: virt-dma: Convert to use list_for_each_entry_safe() Use list_for_each_entry_safe() instead of open coding variants. Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/virt-dma.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 8bf8f2e8c786f37991bd27332c75edcc524d2232 Author: Nicholas Piggin Date: Wed Apr 19 05:12:16 2017 +1000 powerpc/64s: Revert setting of LPCR[LPES] on POWER9 The XIVE enablement patches included a change to set the LPES (Logical Partitioning Environment Selector) bit (bit # 3) in LPCR (Logical Partitioning Control Register) on POWER9 hosts. This bit sets external interrupts to guest delivery mode, which uses SRR0/1. The host's EE interrupt handler is written to expect HSRR0/1 (for earlier CPUs). This should be fine because XIVE is configured not to deliver EEs to the host (Hypervisor Virtulization Interrupt is used instead) so the EE handler should never be executed. However a bug in interrupt controller code, hardware, or odd configuration of a simulator could result in the host getting an EE incorrectly. Keeping the EE delivery mode matching the host EE handler prevents strange crashes due to using the wrong exception registers. KVM will configure the LPCR to set LPES prior to running a guest so that EEs are delivered to the guest using SRR0/1. Fixes: 08a1e650cc ("powerpc: Fixup LPCR:PECE and HEIC setting on POWER9") Signed-off-by: Nicholas Piggin [mpe: Massage change log to avoid referring to LPES0 which is now renamed LPES] Signed-off-by: Michael Ellerman arch/powerpc/kernel/cpu_setup_power.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 35a2442189015bf540197906e745c7b7c100f28c Merge: bb3393d 2be1fce Author: Trond Myklebust Date: Tue Apr 25 18:42:48 2017 -0400 Merge tag 'nfs-rdma-4.12-1' of git://git.linux-nfs.org/projects/anna/nfs-rdma NFS: NFS over RDMA Client Side Changes New Features: - Break RDMA connections after a connection timeout - Support for unloading the underlying device driver Bugfixes and cleanups: - Mark the receive workqueue as "read-mostly" - Silence warnings caused by ENOBUFS - Update a comment in xdr_init_decode_pages() - Remove rpcrdma_buffer->rb_pool. commit e56efe9322c5bec9ad4f301c8102fcd630694b4c Author: Colin Ian King Date: Sat Apr 8 18:09:59 2017 +0100 lockd: remove redundant check on block A null check followed by a return is being performed already, so block is always non-null at the second check on block, hence we can remove this redundant null-check (Detected by PVS-Studio). Also re-work comment to clean up a check-patch warning. Signed-off-by: Colin Ian King Signed-off-by: J. Bruce Fields fs/lockd/svclock.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit dadf3e435debb85dfcf28c157012047153a21a97 Author: Chuck Lever Date: Sun Apr 9 13:07:21 2017 -0400 svcrdma: Clean out old XDR encoders Clean up: These have been replaced and are no longer used. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 4 -- net/sunrpc/xprtrdma/svc_rdma_marshal.c | 70 ---------------------------------- 2 files changed, 74 deletions(-) commit 2cf32924c68a22783e6f630e1b5345a80aa1a376 Author: Chuck Lever Date: Sun Apr 9 13:07:13 2017 -0400 svcrdma: Remove the req_map cache req_maps are no longer used by the send path and can thus be removed. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 34 +------------ net/sunrpc/xprtrdma/svc_rdma_sendto.c | 68 -------------------------- net/sunrpc/xprtrdma/svc_rdma_transport.c | 84 -------------------------------- 3 files changed, 1 insertion(+), 185 deletions(-) commit 68cc4636bbbca89b9fedcf46d8b6bee444fc5e4e Author: Chuck Lever Date: Sun Apr 9 13:07:05 2017 -0400 svcrdma: Remove unused RDMA Write completion handler Clean up. All RDMA Write completions are now handled by svc_rdma_wc_write_ctx. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 1 - net/sunrpc/xprtrdma/svc_rdma_transport.c | 18 ------------------ 2 files changed, 19 deletions(-) commit ded8d19641a605232ab48f5d27f542648beba3cc Author: Chuck Lever Date: Sun Apr 9 13:06:57 2017 -0400 svcrdma: Reduce size of sge array in struct svc_rdma_op_ctxt The sge array in struct svc_rdma_op_ctxt is no longer used for sending RDMA Write WRs. It need only accommodate the construction of Send and Receive WRs. The maximum inline size is the largest payload it needs to handle now. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 9 +++++++-- net/sunrpc/xprtrdma/svc_rdma.c | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) commit f5821c76b2c9c2fb98b276c0bf6a101bfe9050a3 Author: Chuck Lever Date: Sun Apr 9 13:06:49 2017 -0400 svcrdma: Clean up RPC-over-RDMA backchannel reply processing Replace C structure-based XDR decoding with pointer arithmetic. Pointer arithmetic is considered more portable. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 2 +- net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 18 ++++++++++++++---- net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 27 +++++++++++++++------------ 3 files changed, 30 insertions(+), 17 deletions(-) commit 4757d90b15d851b9986bfca745eacc176359c13d Author: Chuck Lever Date: Sun Apr 9 13:06:41 2017 -0400 svcrdma: Report Write/Reply chunk overruns Observed at Connectathon 2017. If a client has underestimated the size of a Write or Reply chunk, the Linux server writes as much payload data as it can, then it recognizes there was a problem and closes the connection without sending the transport header. This creates a couple of problems: <> The client never receives indication of the server-side failure, so it continues to retransmit the bad RPC. Forward progress on the transport is blocked. <> The reply payload pages are not moved out of the svc_rqst, thus they can be released by the RPC server before the RDMA Writes have completed. The new rdma_rw-ized helpers return a distinct error code when a Write/Reply chunk overrun occurs, so it's now easy for the caller (svc_rdma_sendto) to recognize this case. Instead of dropping the connection, post an RDMA_ERROR message. The client now sees an RDMA_ERROR and can properly terminate the RPC transaction. As part of the new logic, set up the same delayed release for these payload pages as would have occurred in the normal case. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_sendto.c | 58 +++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) commit 6b19cc5ca2f78ebc88f5d39ba6a94197bb392fcc Author: Chuck Lever Date: Sun Apr 9 13:06:33 2017 -0400 svcrdma: Clean up RDMA_ERROR path Now that svc_rdma_sendto has been renovated, svc_rdma_send_error can be refactored to reduce code duplication and remove C structure- based XDR encoding. It is also relocated to the source file that contains its only caller. This is a refactoring change only. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: J. Bruce Fields include/linux/sunrpc/rpc_rdma.h | 3 ++ include/linux/sunrpc/svc_rdma.h | 5 ---- net/sunrpc/xprtrdma/svc_rdma_marshal.c | 19 ------------ net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 52 ++++++++++++++++++++++++++++++++- net/sunrpc/xprtrdma/svc_rdma_sendto.c | 43 --------------------------- 5 files changed, 54 insertions(+), 68 deletions(-) commit 9a6a180b7867ceceeeab88a6f011bac23174b939 Author: Chuck Lever Date: Sun Apr 9 13:06:25 2017 -0400 svcrdma: Use rdma_rw API in RPC reply path The current svcrdma sendto code path posts one RDMA Write WR at a time. Each of these Writes typically carries a small number of pages (for instance, up to 30 pages for mlx4 devices). That means a 1MB NFS READ reply requires 9 ib_post_send() calls for the Write WRs, and one for the Send WR carrying the actual RPC Reply message. Instead, use the new rdma_rw API. The details of Write WR chain construction and memory registration are taken care of in the RDMA core. svcrdma can focus on the details of the RPC-over-RDMA protocol. This gives three main benefits: 1. All Write WRs for one RDMA segment are posted in a single chain. As few as one ib_post_send() for each Write chunk. 2. The Write path can now use FRWR to register the Write buffers. If the device's maximum page list depth is large, this means a single Write WR is needed for each RPC's Write chunk data. 3. The new code introduces support for RPCs that carry both a Write list and a Reply chunk. This combination can be used for an NFSv4 READ where the data payload is large, and thus is removed from the Payload Stream, but the Payload Stream is still larger than the inline threshold. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 1 - net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 6 +- net/sunrpc/xprtrdma/svc_rdma_sendto.c | 696 ++++++++++++++--------------- net/sunrpc/xprtrdma/svc_rdma_transport.c | 2 + 4 files changed, 350 insertions(+), 355 deletions(-) commit f13193f50b64e2e0c87706b838d6b9895626a892 Author: Chuck Lever Date: Sun Apr 9 13:06:16 2017 -0400 svcrdma: Introduce local rdma_rw API helpers The plan is to replace the local bespoke code that constructs and posts RDMA Read and Write Work Requests with calls to the rdma_rw API. This shares code with other RDMA-enabled ULPs that manages the gory details of buffer registration and posting Work Requests. Some design notes: o The structure of RPC-over-RDMA transport headers is flexible, allowing multiple segments per Reply with arbitrary alignment, each with a unique R_key. Write and Send WRs continue to be built and posted in separate code paths. However, one whole chunk (with one or more RDMA segments apiece) gets exactly one ib_post_send and one work completion. o svc_xprt reference counting is modified, since a chain of rdma_rw_ctx structs generates one completion, no matter how many Write WRs are posted. o The current code builds the transport header as it is construct- ing Write WRs. I've replaced that with marshaling of transport header data items in a separate step. This is because the exact structure of client-provided segments may not align with the components of the server's reply xdr_buf, or the pages in the page list. Thus parts of each client-provided segment may be written at different points in the send path. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 11 + net/sunrpc/Kconfig | 1 + net/sunrpc/xprtrdma/Makefile | 2 +- net/sunrpc/xprtrdma/svc_rdma_rw.c | 512 +++++++++++++++++++++++++++++++ net/sunrpc/xprtrdma/svc_rdma_transport.c | 4 + 5 files changed, 529 insertions(+), 1 deletion(-) commit c238c4c034f857d12d7efbf9934d96b8bb68fbc7 Author: Chuck Lever Date: Sun Apr 9 13:06:08 2017 -0400 svcrdma: Clean up svc_rdma_get_inv_rkey() Replace C structure-based XDR decoding with more portable code that instead uses pointer arithmetic. This is a refactoring change only. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_sendto.c | 39 +++++++++++++++-------------------- 1 file changed, 17 insertions(+), 22 deletions(-) commit c55ab0707b2817046ad48d6c87a6b764119a2458 Author: Chuck Lever Date: Sun Apr 9 13:06:00 2017 -0400 svcrdma: Add helper to save pages under I/O Clean up: extract the logic to save pages under I/O into a helper to add a big documenting comment without adding clutter in the send path. This is a refactoring change only. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_sendto.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit b623589dbacbc786c2fffc85113a1dc1a331e2ca Author: Chuck Lever Date: Sun Apr 9 13:05:52 2017 -0400 svcrdma: Eliminate RPCRDMA_SQ_DEPTH_MULT The Send Queue depth is temporarily reduced to 1 SQE per credit. The new rdma_rw API does an internal computation, during QP creation, to increase the depth of the Send Queue to handle RDMA Read and Write operations. This change has to come before the NFSD code paths are updated to use the rdma_rw API. Without this patch, rdma_rw_init_qp() increases the size of the SQ too much, resulting in memory allocation failures during QP creation. Signed-off-by: Chuck Lever Reviewed-by: Christoph Hellwig Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 1 - net/sunrpc/xprtrdma/svc_rdma.c | 2 -- net/sunrpc/xprtrdma/svc_rdma_transport.c | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) commit 6e6092ca305ad785c605d7e313727aad96c228a5 Author: Chuck Lever Date: Sun Apr 9 13:05:44 2017 -0400 svcrdma: Add svc_rdma_map_reply_hdr() Introduce a helper to DMA-map a reply's transport header before sending it. This will in part replace the map vector cache. Signed-off-by: Chuck Lever Reviewed-by: Christoph Hellwig Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 3 ++ net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 36 ++++++------------ net/sunrpc/xprtrdma/svc_rdma_sendto.c | 61 +++++++++++++++++++++++------- 3 files changed, 62 insertions(+), 38 deletions(-) commit 17f5f7f506aaca985b95df7ef7fc2ff49c36a8e9 Author: Chuck Lever Date: Sun Apr 9 13:05:36 2017 -0400 svcrdma: Move send_wr to svc_rdma_op_ctxt Clean up: Move the ib_send_wr off the stack, and move common code to post a Send Work Request into a helper. This is a refactoring change only. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc_rdma.h | 4 ++ net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 11 +---- net/sunrpc/xprtrdma/svc_rdma_sendto.c | 64 ++++++++++++++++++------------ 3 files changed, 44 insertions(+), 35 deletions(-) commit 99bbf6ecc694dfe0b026e15359c5aa2a60b97a93 Author: NeilBrown Date: Wed Mar 15 12:40:44 2017 +1100 NFS: don't try to cross a mountpount when there isn't one there. consider the sequence of commands: mkdir -p /import/nfs /import/bind /import/etc mount --bind / /import/bind mount --make-private /import/bind mount --bind /import/etc /import/bind/etc exportfs -o rw,no_root_squash,crossmnt,async,no_subtree_check localhost:/ mount -o vers=4 localhost:/ /import/nfs ls -l /import/nfs/etc You would not expect this to report a stale file handle. Yet it does. The manipulations under /import/bind cause the dentry for /etc to get the DCACHE_MOUNTED flag set, even though nothing is mounted on /etc. This causes nfsd to call nfsd_cross_mnt() even though there is no mountpoint. So an upcall to mountd for "/etc" is performed. The 'crossmnt' flag on the export of / causes mountd to report that /etc is exported as it is a descendant of /. It assumes the kernel wouldn't ask about something that wasn't a mountpoint. The filehandle returned identifies the filesystem and the inode number of /etc. When this filehandle is presented to rpc.mountd, via "nfsd.fh", the inode cannot be found associated with any name in /etc/exports, or with any mountpoint listed by getmntent(). So rpc.mountd says the filehandle doesn't exist. Hence ESTALE. This is fixed by teaching nfsd not to trust DCACHE_MOUNTED too much. It is just a hint, not a guarantee. Change nfsd_mountpoint() to return '1' for a certain mountpoint, '2' for a possible mountpoint, and 0 otherwise. Then change nfsd_crossmnt() to check if follow_down() actually found a mountpount and, if not, to avoid performing a lookup if the location is not known to certainly require an export-point. Signed-off-by: NeilBrown Signed-off-by: J. Bruce Fields fs/nfsd/vfs.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit 2f10fdcb6a1c5f26246339d3b606131fae483c44 Author: NeilBrown Date: Thu Mar 23 16:57:36 2017 +0800 nfsd4: remove pointless strdup_if_nonnull kstrdup() already checks for NULL. (Brought to our attention by Jason Yann noticing (from sparse output) that it should have been declared static.) Signed-off-by: NeilBrown Reported-by: Jason Yan Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) commit 16719199a43f0740113041fb34a0854b1d7f2111 Author: Dmitry V. Levin Date: Wed Mar 1 03:12:03 2017 +0300 uapi: fix linux/nfsd/cld.h userspace compilation errors Include and consistently use types it provides to fix the following linux/nfsd/cld.h userspace compilation errors: /usr/include/linux/nfsd/cld.h:40:2: error: unknown type name 'uint16_t' uint16_t cn_len; /* length of cm_id */ /usr/include/linux/nfsd/cld.h:46:2: error: unknown type name 'uint8_t' uint8_t cm_vers; /* upcall version */ /usr/include/linux/nfsd/cld.h:47:2: error: unknown type name 'uint8_t' uint8_t cm_cmd; /* upcall command */ /usr/include/linux/nfsd/cld.h:48:2: error: unknown type name 'int16_t' int16_t cm_status; /* return code */ /usr/include/linux/nfsd/cld.h:49:2: error: unknown type name 'uint32_t' uint32_t cm_xid; /* transaction id */ /usr/include/linux/nfsd/cld.h:51:3: error: unknown type name 'int64_t' int64_t cm_gracetime; /* grace period start time */ Signed-off-by: Dmitry V. Levin Signed-off-by: J. Bruce Fields include/uapi/linux/nfsd/cld.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 51f567777799c9d85a778302b9eb61cf15214a98 Author: J. Bruce Fields Date: Thu Apr 6 22:36:31 2017 -0400 nfsd: check for oversized NFSv2/v3 arguments A client can append random data to the end of an NFSv2 or NFSv3 RPC call without our complaining; we'll just stop parsing at the end of the expected data and ignore the rest. Encoded arguments and replies are stored together in an array of pages, and if a call is too large it could leave inadequate space for the reply. This is normally OK because NFS RPC's typically have either short arguments and long replies (like READ) or long arguments and short replies (like WRITE). But a client that sends an incorrectly long reply can violate those assumptions. This was observed to cause crashes. So, insist that the argument not be any longer than we expect. Also, several operations increment rq_next_page in the decode routine before checking the argument size, which can leave rq_next_page pointing well past the end of the page array, causing trouble later in svc_free_pages. As followup we may also want to rewrite the encoding routines to check more carefully that they aren't running off the end of the page array. Reported-by: Tuomas Haanpää Reported-by: Ari Kauppi Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/nfs3xdr.c | 23 +++++++++++++++++------ fs/nfsd/nfsxdr.c | 13 ++++++++++--- include/linux/sunrpc/svc.h | 3 +-- 3 files changed, 28 insertions(+), 11 deletions(-) commit d618ebaf0aa83d175658aea5291e0c459d471d39 Author: Chao Yu Date: Tue Apr 25 00:21:35 2017 +0800 f2fs: enable small discard by default This patch start to enable 4K granularity small discard by default when realtime discard is on, so, in seriously fragmented space, small size discard can be issued in time to avoid useless storage space occupying of invalid filesystem's data, then performance of flash storage can be recovered. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 4 ++-- fs/f2fs/segment.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 34e159da418be46986456daf21a339932f349b63 Author: Chao Yu Date: Tue Apr 25 00:21:34 2017 +0800 f2fs: delay awaking discard thread It's better to delay awaking discard thread while queuing discard commands in checkpoint, it will help to give more chances for merging big and small discard. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 66a82d1fc7e058b28189fe068f2a5efd9abc719a Author: Yunlei He Date: Sat Apr 22 18:06:26 2017 +0800 f2fs: seperate read nat page from nat_tree_lock This patch seperate nat page read io from nat_tree_lock. -lock_page -get_node_info() -current_nat_addr ...... -> write_checkpoint -get_meta_page Because we lock node page, we can make sure no other threads modify this nid concurrently. So we just obtain current_nat_addr under nat_tree_lock, node info is always same in both nat pack. Signed-off-by: Yunlei He Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit d3bb910c15d75ee3340311c64a1c05985bb663a3 Author: Sheng Yong Date: Sat Apr 22 10:39:20 2017 +0800 f2fs: fix multiple f2fs_add_link() having same name for inline dentry Commit 88c5c13a5027 (f2fs: fix multiple f2fs_add_link() calls having same name) does not cover the scenario where inline dentry is enabled. In that case, F2FS_I(dir)->task will be NULL, and __f2fs_add_link will lookup dentries one more time. This patch fixes it by moving the assigment of current task to a upper level to cover both normal and inline dentry. Cc: Fixes: 88c5c13a5027 (f2fs: fix multiple f2fs_add_link() calls having same name) Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 7acedaf5c4355f812cfef883ac28bf15f7d9205e Author: Eric Dumazet Date: Tue Apr 25 11:36:52 2017 -0700 net: move xdp_prog field in RX cache lines (struct net_device, xdp_prog) field should be moved in RX cache lines, reducing latencies when a single packet is received on idle host, since netif_elide_gro() needs it. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/netdevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb3393d5b3594a6f9c2e670ec59a2bb8daf92ccc Author: Trond Myklebust Date: Tue Apr 25 16:25:06 2017 -0400 NFSv3: nfs3_nlm_alloc_call should be declared static Fix compiler warnings. Signed-off-by: Trond Myklebust fs/nfs/nfs3proc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6abccd1bfee49e491095772fd5aa9e96d915ae52 Author: Dan Williams Date: Fri Jan 13 14:14:23 2017 -0800 x86, dax, pmem: remove indirection around memcpy_from_pmem() memcpy_from_pmem() maps directly to memcpy_mcsafe(). The wrapper serves no real benefit aside from affording a more generic function name than the x86-specific 'mcsafe'. However this would not be the first time that x86 terminology leaked into the global namespace. For lack of better name, just use memcpy_mcsafe() directly. This conversion also catches a place where we should have been using plain memcpy, acpi_nfit_blk_single_io(). Cc: Cc: Jan Kara Cc: Jeff Moyer Cc: Ingo Molnar Cc: Christoph Hellwig Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Matthew Wilcox Cc: Ross Zwisler Acked-by: Tony Luck Signed-off-by: Dan Williams arch/x86/include/asm/pmem.h | 5 ----- arch/x86/include/asm/string_64.h | 1 + drivers/acpi/nfit/core.c | 3 +-- drivers/nvdimm/claim.c | 2 +- drivers/nvdimm/pmem.c | 2 +- include/linux/pmem.h | 23 ----------------------- include/linux/string.h | 8 ++++++++ 7 files changed, 12 insertions(+), 32 deletions(-) commit d4b29fd78ea6fc2be219be3af1a992149b4ff0f6 Author: Dan Williams Date: Fri Jan 27 17:22:03 2017 -0800 block: remove block_device_operations ->direct_access() Now that all the producers and consumers of dax interfaces have been converted to using dax_operations on a dax_device, remove the block device direct_access enabling. Signed-off-by: Dan Williams arch/powerpc/sysdev/axonram.c | 23 ++++------------------ drivers/block/brd.c | 15 --------------- drivers/md/dm.c | 13 ------------- drivers/nvdimm/pmem.c | 10 ---------- drivers/s390/block/dcssblk.c | 16 --------------- fs/block_dev.c | 45 ------------------------------------------- include/linux/blkdev.h | 17 ---------------- 7 files changed, 4 insertions(+), 135 deletions(-) commit 2093f2e9dfec98e561c83e807910267bcbd8bb7b Author: Dan Williams Date: Sat Apr 1 16:02:38 2017 -0700 block, dax: convert bdev_dax_supported() to dax_direct_access() Kill of the final user of bdev_direct_access() and struct blk_dax_ctl. Signed-off-by: Dan Williams fs/block_dev.c | 48 ++++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) commit cccbce67158290537cc671cbd4c1564876485a65 Author: Dan Williams Date: Fri Jan 27 13:31:42 2017 -0800 filesystem-dax: convert to dax_direct_access() Now that a dax_device is plumbed through all dax-capable drivers we can switch from block_device_operations to dax_operations for invoking ->direct_access. This also lets us kill off some usages of struct blk_dax_ctl on the way to its eventual removal. Suggested-by: Christoph Hellwig Signed-off-by: Dan Williams fs/dax.c | 277 +++++++++++++++++++++++++++++----------------------- fs/iomap.c | 3 +- include/linux/dax.h | 6 +- 3 files changed, 162 insertions(+), 124 deletions(-) commit a41fe02b6bba853a29c864d00fd161bbe6cfc715 Author: Dan Williams Date: Fri Jan 27 14:13:15 2017 -0800 Revert "block: use DAX for partition table reads" commit d1a5f2b4d8a1 ("block: use DAX for partition table reads") was part of a stalled effort to allow dax mappings of block devices. Since then the device-dax mechanism has filled the role of dax-mapping static device ranges. Now that we are moving ->direct_access() from a block_device operation to a dax_inode operation we would need block devices to map and carry their own dax_inode reference. Unless / until we decide to revive dax mapping of raw block devices through the dax_inode scheme, there is no need to carry read_dax_sector(). Its removal in turn allows for the removal of bdev_direct_access() and should have been included in commit 223757016837 ("block_dev: remove DAX leftovers"). Cc: Jeff Moyer Signed-off-by: Dan Williams block/partition-generic.c | 17 ++--------------- fs/dax.c | 20 -------------------- include/linux/dax.h | 6 ------ 3 files changed, 2 insertions(+), 41 deletions(-) commit fa5d932c323e8e0d9b24b3517997d15b36d1607d Author: Dan Williams Date: Fri Jan 27 12:04:59 2017 -0800 ext2, ext4, xfs: retrieve dax_device for iomap operations In preparation for converting fs/dax.c to use dax_direct_access() instead of bdev_direct_access(), add the plumbing to retrieve the dax_device associated with a given block_device. Signed-off-by: Dan Williams fs/ext2/inode.c | 9 ++++++++- fs/ext4/inode.c | 9 ++++++++- fs/xfs/xfs_iomap.c | 10 ++++++++++ include/linux/iomap.h | 1 + 4 files changed, 27 insertions(+), 2 deletions(-) commit 817bf40265459578abc36c6bd53e27775b5c7ec4 Author: Dan Williams Date: Wed Apr 12 13:37:44 2017 -0700 dm: teach dm-targets to use a dax_device + dax_operations Arrange for dm to lookup the dax services available from member devices. Update the dax-capable targets, linear and stripe, to route dax operations to the underlying device. Changes the target-internal ->direct_access() method to more closely align with the dax_operations ->direct_access() calling convention. Cc: Toshi Kani Reviewed-by: Mike Snitzer Signed-off-by: Dan Williams drivers/md/dm-linear.c | 27 +++++++++++++-------------- drivers/md/dm-snap.c | 6 +++--- drivers/md/dm-stripe.c | 29 ++++++++++++++--------------- drivers/md/dm-target.c | 6 +++--- drivers/md/dm.c | 16 ++++++---------- include/linux/device-mapper.h | 7 ++++--- 6 files changed, 43 insertions(+), 48 deletions(-) commit 2be1fce95e5b017dd7d23ca039d58cbefd0221e6 Author: Chuck Lever Date: Tue Apr 11 13:24:07 2017 -0400 xprtrdma: Remove rpcrdma_buffer::rb_pool Since commit 1e465fd4ff47 ("xprtrdma: Replace send and receive arrays"), this field is no longer used. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/xprt_rdma.h | 1 - 1 file changed, 1 deletion(-) commit 7ecce75fc3c52590950bc5e68eac0f00e50e8ce4 Author: Chuck Lever Date: Tue Apr 11 13:23:59 2017 -0400 sunrpc: Fix xdr_init_decode_pages() documenting comment Clean up. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0031e47c76ec5ce5b4f64f2750a535a36040c82b Author: Chuck Lever Date: Tue Apr 11 13:23:51 2017 -0400 xprtrdma: Squelch ENOBUFS warnings When ro_map is out of buffers, that's not a permanent error, so don't report a problem. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 7d7fa9b5509649ee1732fde0c643bea53f8db364 Author: Chuck Lever Date: Tue Apr 11 13:23:43 2017 -0400 xprtrdma: Annotate receive workqueue Micro-optimize the receive workqueue by marking it's anchor "read- mostly." Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56a6bd154ddd60f7d01d6c0a5c272c1224d16b46 Author: Chuck Lever Date: Tue Apr 11 13:23:34 2017 -0400 xprtrdma: Revert commit d0f36c46deea Device removal is now adequately supported. Pinning the underlying device driver to prevent removal while an NFS mount is active is no longer necessary. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) commit a9b0e381caa965bc9b00dad1e593c502f48f8c3d Author: Chuck Lever Date: Tue Apr 11 13:23:26 2017 -0400 xprtrdma: Restore transport after device removal After a device removal, enable the transport connect worker to restore normal operation if there is another device with connectivity to the server. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 1890896b4e01e3858db71fa55a8edf85e15f9946 Author: Chuck Lever Date: Tue Apr 11 13:23:18 2017 -0400 xprtrdma: Refactor rpcrdma_ep_connect I'm about to add another arm to if (ep->rep_connected != 0) It will be cleaner to use a switch statement here. We'll be looking for a couple of specific errnos, or "anything else," basically to sort out the difference between a normal reconnect and recovery from device removal. This is a refactoring change only. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 109 +++++++++++++++++++++++++------------------- 1 file changed, 63 insertions(+), 46 deletions(-) commit bebd031866caa404c522e91bb6fd0c69be04c707 Author: Chuck Lever Date: Tue Apr 11 13:23:10 2017 -0400 xprtrdma: Support unplugging an HCA from under an NFS mount The device driver for the underlying physical device associated with an RPC-over-RDMA transport can be removed while RPC-over-RDMA transports are still in use (ie, while NFS filesystems are still mounted and active). The IB core performs a connection event upcall to request that consumers free all RDMA resources associated with a transport. There may be pending RPCs when this occurs. Care must be taken to release associated resources without leaving references that can trigger a subsequent crash if a signal or soft timeout occurs. We rely on the caller of the transport's ->close method to ensure that the previous RPC task has invoked xprt_release but the transport remains write-locked. A DEVICE_REMOVE upcall forces a disconnect then sleeps. When ->close is invoked, it destroys the transport's H/W resources, then wakes the upcall, which completes and allows the core driver unload to continue. BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=266 Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/transport.c | 29 +++++++++++++--- net/sunrpc/xprtrdma/verbs.c | 74 ++++++++++++++++++++++++++++++++++++++--- net/sunrpc/xprtrdma/xprt_rdma.h | 7 ++++ 3 files changed, 101 insertions(+), 9 deletions(-) commit 91a10c52975a8c89e146a4f740e64cd147ba8e8a Author: Chuck Lever Date: Tue Apr 11 13:23:02 2017 -0400 xprtrdma: Use same device when mapping or syncing DMA buffers When the underlying device driver is reloaded, ia->ri_device will be replaced. All cached copies of that device pointer have to be updated as well. Commit 54cbd6b0c6b9 ("xprtrdma: Delay DMA mapping Send and Receive buffers") added the rg_device field to each regbuf. As part of handling a device removal, rpcrdma_dma_unmap_regbuf is invoked on all regbufs for a transport. Simply calling rpcrdma_dma_map_regbuf for each Receive buffer after the driver has been reloaded should reinitialize rg_device correctly for every case except rpcrdma_wc_receive, which still uses rpcrdma_rep::rr_device. Ensure the same device that was used to map a Receive buffer is also used to sync it in rpcrdma_wc_receive by using rg_device there instead of rr_device. This is the only use of rr_device, so it can be removed. The use of regbufs in the send path is also updated, for completeness. Fixes: 54cbd6b0c6b9 ("xprtrdma: Delay DMA mapping Send and ... ") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 4 ++-- net/sunrpc/xprtrdma/verbs.c | 12 ++++++------ net/sunrpc/xprtrdma/xprt_rdma.h | 7 ++++++- 3 files changed, 14 insertions(+), 9 deletions(-) commit fff09594edf5e9b8595a2cefdc07e54b70f81729 Author: Chuck Lever Date: Tue Apr 11 13:22:54 2017 -0400 xprtrdma: Refactor rpcrdma_ia_open() In order to unload a device driver and reload it, xprtrdma will need to close a transport's interface adapter, and then call rpcrdma_ia_open again, possibly finding a different interface adapter. Make rpcrdma_ia_open safe to call on the same transport multiple times. This is a refactoring change only. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/transport.c | 6 +++--- net/sunrpc/xprtrdma/verbs.c | 46 ++++++++++++++++++++--------------------- net/sunrpc/xprtrdma/xprt_rdma.h | 7 ++++++- 3 files changed, 32 insertions(+), 27 deletions(-) commit 33849792cbcdae2b04819cfb09fe3dca0a84a11e Author: Chuck Lever Date: Tue Apr 11 13:22:46 2017 -0400 xprtrdma: Detect unreachable NFS/RDMA servers more reliably Current NFS clients rely on connection loss to determine when to retransmit. In particular, for protocols like NFSv4, clients no longer rely on RPC timeouts to drive retransmission: NFSv4 servers are required to terminate a connection when they need a client to retransmit pending RPCs. When a server is no longer reachable, either because it has crashed or because the network path has broken, the server cannot actively terminate a connection. Thus NFS clients depend on transport-level keepalive to determine when a connection must be replaced and pending RPCs retransmitted. However, RDMA RC connections do not have a native keepalive mechanism. If an NFS/RDMA server crashes after a client has sent RPCs successfully (an RC ACK has been received for all OTW RDMA requests), there is no way for the client to know the connection is moribund. In addition, new RDMA requests are subject to the RPC-over-RDMA credit limit. If the client has consumed all granted credits with NFS traffic, it is not allowed to send another RDMA request until the server replies. Thus it has no way to send a true keepalive when the workload has already consumed all credits with pending RPCs. To address this, forcibly disconnect a transport when an RPC times out. This prevents moribund connections from stopping the detection of failover or other configuration changes on the server. Note that even if the connection is still good, retransmitting any RPC will trigger a disconnect thanks to this logic in xprt_rdma_send_request: /* Must suppress retransmit to maintain credits */ if (req->rl_connect_cookie == xprt->connect_cookie) goto drop_connection; req->rl_connect_cookie = xprt->connect_cookie; Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/transport.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit e2a4f4fbefc5e5b7b4435f73711b7be94f780584 Author: Chuck Lever Date: Tue Apr 11 13:22:38 2017 -0400 sunrpc: Export xprt_force_disconnect() xprt_force_disconnect() is already invoked from the socket transport. I want to invoke xprt_force_disconnect() from the RPC-over-RDMA transport, which is a separate module from sunrpc.ko. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprt.c | 1 + 1 file changed, 1 insertion(+) commit 9378b274e1eb6925db315e345f48850d2d5d9789 Author: Chuck Lever Date: Tue Apr 11 13:22:29 2017 -0400 xprtrdma: Cancel refresh worker during buffer shutdown Trying to create MRs while the transport is being torn down can cause a crash. Fixes: e2ac236c0b65 ("xprtrdma: Allocate MRs on demand") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 1 + 1 file changed, 1 insertion(+) commit 86f917adea2dc0ef440a248601e48154dc48e6d0 Author: Eric Biggers Date: Thu Mar 30 22:18:48 2017 -0700 dm crypt: remove obsolete references to per-CPU state dm-crypt used to use separate crypto transforms for each CPU, but this is no longer the case. To avoid confusion, fix up obsolete comments and rename setup_essiv_cpu(). Signed-off-by: Eric Biggers Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 291084951825e1efca081926b10bf3ff7e872476 Author: Sara Sharon Date: Sun Jan 8 16:45:46 2017 +0200 iwlwifi: adjust NVM parsing APIs for new a000 method In a000 devices we will get all nvm data from the firmware, and can save most of the parsing. Export two APIs that op mode will still use. Adjust API of init_sbands to be independent of NVM file structure so it can be used by op mode as well. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 32 +++++++++------------- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h | 16 ++++++++++- 2 files changed, 28 insertions(+), 20 deletions(-) commit d8a130b02d0caa9a8f0c14db11d84320ffc62c57 Author: Johannes Berg Date: Mon Mar 6 15:49:00 2017 +0100 iwlwifi: pcie: apply no-reclaim logic only to group 0 When applying no-reclaim logic to commands other than the group zero for legacy commands, commands such as 0x1c (TX_CMD in group 0) can't be used in any other group. Fix that by applying this logic only for group 0 - it's not and should never be needed for any other groups. Reported-by: Sharon Dvir Reported-by: Shaul Triebitz Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f99a6abe59e096cc2c753e667c19f22022e3bef4 Author: Sara Sharon Date: Sun Mar 5 18:35:02 2017 +0200 iwlwifi: mvm: memset binding before setting values The changes in commit 9415af7f306b ("iwlwifi: mvm: support new binding API") assigned values that were later memset to 0. Move the memset earlier. Fixes: 9415af7f306b ("iwlwifi: mvm: support new binding API") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/binding.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a1a5787730455609473fb5a9d86eee05af347a3b Author: Sara Sharon Date: Sun Mar 5 11:38:58 2017 +0200 iwlwifi: rename wait_for_tx_queues_empty Rename current wait_tx_queue_empty to wait_tx_queues_empty since it waits for multiple queues (up to 32). Next patch will add a wait for single TX queue which is needed for gen2 to be scalable for 512. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/dvm/lib.c | 2 +- drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 8 ++++---- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 14 +++++++------- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) commit e982bc2ca87fc5e663c85356c65fb66d2ab50843 Author: Sara Sharon Date: Thu Feb 23 14:19:45 2017 +0200 iwlwifi: move to 512 queues Avoid using the old define since it will enlarge necessary structs for previous HW. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 6 +++--- 5 files changed, 8 insertions(+), 6 deletions(-) commit ced19f26968dc5cbcf870ae6856f8d7b789a7016 Author: Sara Sharon Date: Mon Feb 6 19:09:32 2017 +0200 iwlwifi: mvm: support station type API Support change to ADD_STA API to support station types. Each station is assigned its type. This simplifies FW handling of the broadcast and multicast stations: * broadcast station is identified by its type and not the mac address. * multicast queue is no longer treated differently. The opening and closing of it is done by referring to its station. There is no need to specify it in the MAC command. * When disabling TX to all station driver can disable the traffic on multicast station, so FW doesn't have to do it. Change is backward compatible. Change the order of adding and removing the stations according to FW requirements. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 2 + .../net/wireless/intel/iwlwifi/mvm/fw-api-mac.h | 5 +- .../net/wireless/intel/iwlwifi/mvm/fw-api-sta.h | 24 ++++++- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 6 +- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 31 +++++--- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 84 +++++++++++++++++++--- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 7 +- 7 files changed, 132 insertions(+), 27 deletions(-) commit ff4143ccff314b22f03666c1d8eccd4de967df2c Author: Steven J. Hill Date: Mon Apr 24 13:41:58 2017 -0500 MIPS: Octeon: cavium_octeon_defconfig: Enable Octeon MMC Enable the Octeon MMC driver in the defconfig. Signed-off-by: Steven J. Hill Acked-by: Ralf Baechle Signed-off-by: Ulf Hansson arch/mips/configs/cavium_octeon_defconfig | 5 +++++ 1 file changed, 5 insertions(+) commit 34e10860ae8dc8ab675ba84529c280ff922855e3 Author: Sara Sharon Date: Thu Feb 23 13:15:07 2017 +0200 iwlwifi: mvm: remove references to queue_info in new TX path Most of the fields aren't needed in new TX path. Enlarging the struct to 512 queues will consume a lot of memory. Remove all references to the struct in the new TX path. Move mac80211 queue mapping outside, since it will be needed per queue for TVQM mode. Add warning in paths that shouldn't be hit. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 96 +++++++++++++++----------- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 5 +- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 58 +++++++++------- 5 files changed, 96 insertions(+), 71 deletions(-) commit b9410b186f7129bde5dd5b20475105f17fedb452 Author: Liad Kaufman Date: Tue Feb 28 17:15:47 2017 +0200 iwlwifi: gen2: support nmi triggering from host For gen2 there is a new register. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-io.c | 3 +++ drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 1 + 2 files changed, 4 insertions(+) commit 06a1e85e66bac2b65b4953124b4f1b2c4aebb39f Author: Johannes Berg Date: Tue Feb 28 22:45:25 2017 +0100 iwlwifi: remove module loading failure message When CONFIG_DEBUG_TEST_DRIVER_REMOVE is set, iwlwifi crashes when the opmode module cannot be loaded, due to completing the completion before using drv->dev, which can then already be freed. Fix this by removing the (fairly useless) message. Moving the completion later causes a deadlock instead, so that's not an option. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53d515ec677a1903bb507b81dc12ae6922846c1b Author: Johannes Berg Date: Tue Feb 28 16:44:16 2017 +0100 iwlwifi: don't leak memory on allocation failure If we fail to allocate the small chunk of memory for the pieces of the firmware file, we leak the whole firmware image instead... Since the allocation failure is really unlikely, just bail out at that point instead. Remove the error message at the label since we now (and actually have been) use it for various reasons. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit b0fa818e6c5f48bfbc3dfe1317754390b88446c1 Author: Johannes Berg Date: Tue Feb 28 16:42:10 2017 +0100 iwlwifi: pcie: remove superfluous trans->dev assignment This struct member is already assigned in the previous call to iwl_trans_alloc(), so assigning the same value again is superfluous - remove it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 1 - 1 file changed, 1 deletion(-) commit 0fc9bf7add0f2d1a370c688dabc9846ad187c044 Author: Sara Sharon Date: Wed Feb 22 12:08:19 2017 +0200 iwlwifi: mvm: use defines instead of variables for shared dwell times Most of the dwells are constant across different scan types. Use defines instead of depending on scan type. This is needed as preparation to having different scan type per band. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 55 ++++++++++----------------- 1 file changed, 20 insertions(+), 35 deletions(-) commit e609474c890d72823c6d3e3e636871a3ed8f453c Author: Sara Sharon Date: Thu Feb 23 22:42:01 2017 +0200 iwlwifi: mvm: remove color definition We use the full station field as sta_id, and never use the color. FW are about to clean the color out, so those defines are incorrect now (and were redundant before). Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-sta.h | 14 -------------- 1 file changed, 14 deletions(-) commit 6862fcee2feb3c5334239377160d463aee3da932 Author: Sara Sharon Date: Wed Feb 22 19:34:17 2017 +0200 iwlwifi: mvm: move internally to use bigger INVALID_TXQ We can't use IEEE80211_INVAL_HW_QUEUE to mark a queue as invalid since 255 will be a valid value for a TVQM queue index. Use IWL_MVM_INVALID_QUEUE instead for accessing txq_id. reserved_queue can stay a u8 since reserved_queue is not used when TVQM is enabled. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 12 ++++++------ drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 6 +++--- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) commit 127f60bfa98f30f7f47ae362b9807f0d223cbcc2 Author: Johannes Berg Date: Thu Apr 13 15:50:27 2017 +0200 mac80211: rewrite monitor mode delivery logic The monitor mode delivery logic makes it hard to add any kind of filtering in an efficient way, because the monitor SKB is created first and then passed to all interfaces. Rewrite the logic to create the monitor SKB the first time it's actually needed, and then keep delivering it. Signed-off-by: Johannes Berg net/mac80211/rx.c | 151 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 92 insertions(+), 59 deletions(-) commit cd50ac0f31d111cf6c2a7b953a67703d5522ef55 Author: Vasanthakumar Thiagarajan Date: Tue Apr 18 17:39:19 2017 +0530 cfg80211: Fix dfs state propagation for non-DFS center channel When part of a bigger bandwidth (160 MHz) channel falls in DFS channel range it is possible that the center frequency may not necessarily be a radar channel. Remove the sanity check on channel flag for IEEE80211_CHAN_RADAR in regulatory_propagate_dfs_state(), this should fix the dfs state propagation for non-DFS center freq which has DFS channels in it's bandwidth, should also fix unnecessary WARN_ON() spam in regulatory_propagate_dfs_state(). Fixes: 8976672736d6 ("cfg80211: Share Channel DFS state across wiphys of same DFS domain") Reported-by: Johannes Berg Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Johannes Berg net/wireless/reg.c | 3 --- 1 file changed, 3 deletions(-) commit cc47dd684ee04f9f49f081002a74ef1ba9d14cc8 Author: Jason Gunthorpe Date: Thu Apr 6 16:33:14 2017 -0600 IB/vmw_pvrdma: Spare annotate imm_data imm_data is copied directly from the ib_send_wr and ib_wc which have it marked as __be32, copy that mark into the uapi structures as well. Signed-off-by: Jason Gunthorpe Tested-by: Adit Ranadive Acked-by: Adit Ranadive Signed-off-by: Doug Ledford include/uapi/rdma/vmw_pvrdma-abi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a6598813a4c5bad76322bee2323dc549e7d7180d Author: Trond Myklebust Date: Tue Apr 25 12:06:00 2017 -0400 NFS: Don't write back further requests if there is a pending write error If the server has already returned a fatal write error that the user has not yet received on this file, then don't write back the other pages. Instead, act as if they have been sent, and have returned with the same error. Signed-off-by: Trond Myklebust fs/nfs/write.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit 6aeafd05eca9bc8ab6b03d7e56d09ffd18190f44 Author: Trond Myklebust Date: Tue Apr 25 11:26:53 2017 -0400 pNFS: Fix use after free issues in pnfs_do_read() The assumption should be that if the caller returns PNFS_ATTEMPTED, then hdr has been consumed, and so we should not be testing hdr->task.tk_status. If the caller returns PNFS_TRY_AGAIN, then we need to recoalesce and free hdr. Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit db570d7deafb47ee635981f403a6531844c18ba5 Author: Artemy Kovalyov Date: Wed Apr 5 09:23:59 2017 +0300 IB/mlx5: Add ODP support to MW Internally MW implemented as KLM MKey and filled by userspace UMR postsends. Handle pagefault trigered by operations on this MKeys. Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + drivers/infiniband/hw/mlx5/mr.c | 1 + drivers/infiniband/hw/mlx5/odp.c | 161 +++++++++++++++++++++++++---------- 3 files changed, 120 insertions(+), 43 deletions(-) commit 1b7dbc26fcb4822787d6a183d78384a866508d2f Author: Artemy Kovalyov Date: Wed Apr 5 09:23:58 2017 +0300 IB/mlx5: Extract page fault code To make page fault handling code more flexible split pagefault_single_data_segment() function. Keep MR resolution in pagefault_single_data_segment() and move actual updates into pagefault_single_mr(). Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/odp.c | 203 ++++++++++++++++++++------------------- 1 file changed, 104 insertions(+), 99 deletions(-) commit 0008b84ea9afe6ec255c09044e8090cb76babc80 Author: Artemy Kovalyov Date: Wed Apr 5 09:23:57 2017 +0300 IB/umem: Add support to huge ODP Add IB_ACCESS_HUGETLB ib_reg_mr flag. Hugetlb region registered with this flag will use single translation entry per huge page. Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/umem.c | 2 +- drivers/infiniband/core/umem_odp.c | 19 +++++++++++++++++-- include/rdma/ib_umem_odp.h | 6 ++++-- include/rdma/ib_verbs.h | 1 + 4 files changed, 23 insertions(+), 5 deletions(-) commit b2ac91885b9f137fd7ed35593a72bcee9e049ba8 Author: Artemy Kovalyov Date: Wed Apr 5 09:23:56 2017 +0300 IB/mlx5: Add contiguous ODP support Currenlty ODP supports only regular MMU pages. Add ODP support for regions consisting of physically contiguous chunks of arbitrary order (huge pages for instance) to improve performance. Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mem.c | 9 ++++----- drivers/infiniband/hw/mlx5/odp.c | 28 +++++++++++++++------------- 2 files changed, 19 insertions(+), 18 deletions(-) commit 403cd12e2cf759ead5cbdcb62bf9872b9618d400 Author: Artemy Kovalyov Date: Wed Apr 5 09:23:55 2017 +0300 IB/umem: Add contiguous ODP support Currenlty ODP supports only regular MMU pages. Add ODP support for regions consisting of physically contiguous chunks of arbitrary order (huge pages for instance) to improve performance. Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/umem_odp.c | 50 +++++++++++++++++++++++--------------- include/rdma/ib_umem.h | 4 +-- 2 files changed, 33 insertions(+), 21 deletions(-) commit 4df4a5bac3264efa0595b52b2a9cd5274b32f0d4 Author: Artemy Kovalyov Date: Wed Apr 5 09:23:54 2017 +0300 IB/mlx5: Decrease verbosity level of ODP errors Decrease verbosity level of ODP error flows messages to debug level. Remove one redundant print since debug level message already exists in this flow. Fixes: d9aaed838765 ('{net,IB}/mlx5: Refactor page fault handling') Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/odp.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 523791d7c5eb4533ded3ba3de3517431243c0de5 Author: Artemy Kovalyov Date: Wed Apr 5 09:23:53 2017 +0300 IB/mlx5: Fix implicit MR GC When implicit MR's leaf MKey becomes unused, i.e. when it's last page being released my MMU invalidation it is marked as "dying" and scheduled for release by garbage collector. Currentle consequent page fault may remove "dying" flag. Treat leaf MKey as non-existent once it was scheduled to removal by GC. Fixes: 81713d3788d2 ('IB/mlx5: Add implicit MR support') Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/odp.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 438b228e03740957d94198417d28a6ebea6672ed Author: Artemy Kovalyov Date: Wed Apr 5 09:23:52 2017 +0300 IB/mlx5: Fix UMR size calculation Translation table updates of large UMR may require multiple post send operations. The last operations can be in various lengths, but current code set them to be the same length. Fixes: 7d0cc6edcc70 ('IB/mlx5: Add MR cache for large UMR regions') Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bd174fc2ca63f1c833a09f930796d789fb1f5361 Author: Artemy Kovalyov Date: Wed Apr 5 09:23:51 2017 +0300 IB/mlx5: Fix function updating xlt emergency path In memory shortage path we fall back to use spare buffer. mlx5_ib_update_xlt() called from ib_uverbs_reg_mr when ibmr.ucontext not initialized yet. Scenario how to test it: 1. trigger memory exhaustion so __get_free_pages(GFP_KERNEL, 4) will fail 2. register MR 3. there should be no kernel oops Fixes: 7d0cc6edcc70 ('IB/mlx5: Add MR cache for large UMR regions') Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e7e1193e28a1428e857f3f44870ec2dbd615e6a Author: Artemy Kovalyov Date: Wed Apr 5 09:23:50 2017 +0300 IB: Replace ib_umem page_size by page_shift Size of pages are held by struct ib_umem in page_size field. It is better to store it as an exponent, because page size by nature is always power-of-two and used as a factor, divisor or ilog2's argument. The conversion of page_size to be page_shift allows to have portable code and avoid following error while compiling on ARM: ERROR: "__aeabi_uldivmod" [drivers/infiniband/core/ib_core.ko] undefined! CC: Selvin Xavier CC: Steve Wise CC: Lijun Ou CC: Shiraz Saleem CC: Adit Ranadive CC: Dennis Dalessandro CC: Ram Amrani Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Acked-by: Ram Amrani Acked-by: Shiraz Saleem Acked-by: Selvin Xavier Acked-by: Selvin Xavier Acked-by: Adit Ranadive Signed-off-by: Doug Ledford drivers/infiniband/core/umem.c | 15 ++++++--------- drivers/infiniband/core/umem_odp.c | 12 ++++++------ drivers/infiniband/hw/bnxt_re/ib_verbs.c | 12 ++++++------ drivers/infiniband/hw/cxgb3/iwch_provider.c | 4 ++-- drivers/infiniband/hw/cxgb4/mem.c | 4 ++-- drivers/infiniband/hw/hns/hns_roce_cq.c | 3 +-- drivers/infiniband/hw/hns/hns_roce_mr.c | 9 +++++---- drivers/infiniband/hw/hns/hns_roce_qp.c | 3 +-- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 10 +++++----- drivers/infiniband/hw/mlx4/cq.c | 2 +- drivers/infiniband/hw/mlx4/mr.c | 6 +++--- drivers/infiniband/hw/mlx4/qp.c | 2 +- drivers/infiniband/hw/mlx4/srq.c | 2 +- drivers/infiniband/hw/mlx5/mem.c | 4 ++-- drivers/infiniband/hw/mlx5/odp.c | 2 +- drivers/infiniband/hw/mthca/mthca_provider.c | 5 ++--- drivers/infiniband/hw/nes/nes_verbs.c | 4 ++-- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 15 ++++++--------- drivers/infiniband/hw/qedr/verbs.c | 8 ++++---- drivers/infiniband/hw/vmw_pvrdma/pvrdma_misc.c | 2 +- drivers/infiniband/sw/rdmavt/mr.c | 8 ++++---- drivers/infiniband/sw/rxe/rxe_mr.c | 8 +++----- include/rdma/ib_umem.h | 4 ++-- 23 files changed, 67 insertions(+), 77 deletions(-) commit e2af3fabedbfc84fcecc7337cd4f0f031a51fa63 Author: Sara Sharon Date: Wed Feb 22 19:35:10 2017 +0200 iwlwifi: mvm: map cab_queue to different txq_id cab_queue can now get bigger than u8, since in TVQM we will support 512 queues.. Support it by maintaining internal mapping between the actual number and mac80211 queue (IWL_MVM_DQA_GCAST_QUEUE). For pre-a000 the internal queue will be the same as the mac80211 queue. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 5 +++++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 2 ++ 4 files changed, 11 insertions(+), 2 deletions(-) commit d4a7e708978af611a9c3a972bd4b7f877022f98b Author: Haim Dreyfuss Date: Thu Feb 2 14:49:50 2017 +0200 iwlwifi: mvm: Ignore wifi mcc update in the driver while associated Wifi mcc (mobile country code) update is forbidden while associated. Currently, FW prevents these updates and the driver is unaware to this logic. From now on, the FW sends every wifi mcc update to the driver. The driver in his turn needs to decide whether to ignore it or not, depends on the association state. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 9 ++++++-- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 29 ++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) commit 396952ee9f1bf77720cef4a15f1e3be3425430e9 Author: Sara Sharon Date: Wed Feb 22 19:40:55 2017 +0200 iwlwifi: mvm: don't reserve queue in TVQM mode The reserved queue is never used, save the trouble. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 6 +++++- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) commit c9be849d37f1ec3bea8591f63b33bd2cb1a4bafe Author: Liad Kaufman Date: Wed Feb 22 14:39:10 2017 +0200 iwlwifi: pcie: support debug applying on a000 hw Allow configuring debug destination on a000 HW. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c | 4 ++++ drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 1 + drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) commit 7daa7624e3adeba0955141d95eef9d66c78e945f Author: Johannes Berg Date: Fri Feb 24 12:02:22 2017 +0100 iwlwifi: mvm: avoid variable shadowing Remove an extra variable 'queue' that already exists. Also, since there are no code paths that use 'queue' without intializing it, remove the unnecessary zero initialization. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 21c433a74b6b94538d01ea18d66195018136efd6 Author: Christoph Hellwig Date: Tue Apr 25 14:36:19 2017 -0500 IB/hfi1: Use pcie_flr() instead of duplicating it Tested-by: Jakub Byczkowski Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas Acked-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 4 ++-- drivers/infiniband/hw/hfi1/hfi.h | 1 - drivers/infiniband/hw/hfi1/pcie.c | 30 ------------------------------ 3 files changed, 2 insertions(+), 33 deletions(-) commit 5311a2476ef3e7ea4bc32d4f5f9ed118be624194 Author: Dor Shaish Date: Mon Feb 20 16:05:57 2017 +0200 iwlwifi: mvm: freeze 7265D and 3168 on API version 29 iwl7265D and iwl3168 are frozen on API version 29. Set the MAX API allowed level to 29 from now on. Signed-off-by: Dor Shaish Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-7000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8d2216be285135c7281e09dc07738b62782fad9c Author: Zhu Yanjun Date: Fri Mar 31 23:42:55 2017 -0400 IB/core: change the return type to void The function ib_unregister_mad_agent always returns zero. And this returned value is not checked. As such, chane the return type to void. CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun Reviewed-by: Yuval Shaia Reviewed-by: Hal Rosenstock Signed-off-by: Doug Ledford drivers/infiniband/core/mad.c | 3 +-- include/rdma/ib_mad.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit 2c15b73ab47a7e15722cab48cb64da29df234412 Author: Selvin Xavier Date: Tue Apr 4 01:30:38 2017 -0700 MAINTAINERS: Update ocrdma module status Since ocrdma driver is not going to be updated with any new development activity, except for critical bug fixes reported by partners or customers, changing the module status to "Odd Fixes". Also, updating the web page info and the maintainers email addresses. Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford MAINTAINERS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e8ea95af879e1c2bdf160e9bfd1c8db013454421 Author: Ira Weiny Date: Fri Mar 31 13:04:51 2017 -0400 IB/hfi: Fix up comments in engine mapping Fix off by 1 error in comments documenting the sdma and send context mappings. Signed-off-by: Ira Weiny Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/pio.h | 26 +++++++++++----------- drivers/infiniband/hw/hfi1/sdma.h | 46 +++++++++++++++++++-------------------- 2 files changed, 36 insertions(+), 36 deletions(-) commit 3d35d32d1fd9e2595e737f8c7e7d21e3489b6482 Author: Geert Uytterhoeven Date: Sun Mar 12 14:16:53 2017 +0100 MAINTAINERS: Add file patterns for infiniband device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven Cc: Doug Ledford Cc: Sean Hefty Cc: Hal Rosenstock Cc: linux-rdma@vger.kernel.org Acked-by: Doug Ledford Signed-off-by: Doug Ledford MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 4f7f4dcfff2c19debbcdbcc861c325610a15e0c5 Author: Vlad Tsyrklevich Date: Fri Mar 24 15:55:17 2017 -0400 infiniband/uverbs: Fix integer overflows The 'num_sge' variable is verfied to be smaller than the 'sge_count' variable; however, since both are user-controlled it's possible to cause an integer overflow for the kmalloc multiply on 32-bit platforms (num_sge and sge_count are both defined u32). By crafting an input that causes a smaller-than-expected allocation it's possible to write controlled data out-of-bounds. Signed-off-by: Vlad Tsyrklevich Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 5b0ff9a00755d4d9c209033a77f1ed8f3186fe5c Author: Arnd Bergmann Date: Fri Mar 24 23:02:48 2017 +0100 infiniband: hns: avoid gcc-7.0.1 warning for uninitialized data hns_roce_v1_cq_set_ci() calls roce_set_bit() on an uninitialized field, which will then change only a few of its bits, causing a warning with the latest gcc: infiniband/hw/hns/hns_roce_hw_v1.c: In function 'hns_roce_v1_cq_set_ci': infiniband/hw/hns/hns_roce_hw_v1.c:1854:23: error: 'doorbell[1]' is used uninitialized in this function [-Werror=uninitialized] roce_set_bit(doorbell[1], ROCEE_DB_OTHERS_H_ROCEE_DB_OTH_HW_SYNS_S, 1); The code is actually correct since we always set all bits of the port_vlan field, but gcc correctly points out that the first access does contain uninitialized data. This initializes the field to zero first before setting the individual bits. Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver") Signed-off-by: Arnd Bergmann Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 + 1 file changed, 1 insertion(+) commit 7221547e55b7929e4d46983f6f3ca15f36ee4dac Author: Colin Ian King Date: Fri Apr 21 08:02:30 2017 +0100 PCI: imx6: Fix spelling mistake: "contol" -> "control" Trivial fix to spelling mistake in dev_err message Signed-off-by: Colin Ian King Signed-off-by: Bjorn Helgaas Acked-by: Richard Zhu drivers/pci/dwc/pci-imx6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f06ee95ce6b0b09c30e9344ca736d00d068c435c Author: Dhananjay Balan Date: Mon Apr 24 15:54:05 2017 +0200 staging: most: aim-sound style fixess Replace hardcoded function name with __func__ Signed-off-by: Dhananjay Balan Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-sound/sound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa3a13dfe9c562ce7076c2952bcca66894d464ae Author: Paolo Cretaro Date: Sat Apr 22 00:47:59 2017 +0200 staging: android: ion: Replace spaces with tabs for indentation Fix checkpatch ERRORs: code indent should use tabs where possible. Signed-off-by: Paolo Cretaro Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_cma_heap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 98521b3869f8d6b4b9d2fdad8a56059e819ae002 Author: Arnaldo Carvalho de Melo Date: Tue Apr 25 15:45:35 2017 -0300 perf memswap: Split the byteswap memory range wrappers from util.[ch] Just one more step into splitting util.[ch] to reduce the includes hell. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-navarr9mijkgwgbzu464dwam@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/Build | 1 + tools/perf/util/header.c | 1 + tools/perf/util/intel-pt.c | 1 + tools/perf/util/memswap.c | 24 ++++++++++++++++++++++++ tools/perf/util/memswap.h | 7 +++++++ tools/perf/util/session.c | 1 + tools/perf/util/util.c | 22 ---------------------- tools/perf/util/util.h | 3 --- 8 files changed, 35 insertions(+), 25 deletions(-) commit be223d577578c38c09f5dc9dd1fda8b5f0c91320 Author: Okash Khawaja Date: Sat Apr 22 09:00:28 2017 +0100 staging: speakup: add send_xchar and tiocmset methods This adds two methods to spk_synth struct: send_xchar and tiocmset, and creates serial implementation for each of them. It takes existing code in apollo, audptr and spkout which already fits the behaviour of send_xchar and tiocmset. In follow-up patches there will be TTY-based implementations of these methods. Then migrating the synths to TTY will include repointing these methods to their TTY implementations Rest of the changes simply make use of serial implementation of these two functions. Signed-off-by: Okash Khawaja Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/serialio.c | 23 +++++++++++++++++++++++ drivers/staging/speakup/speakup_apollo.c | 5 ++--- drivers/staging/speakup/speakup_audptr.c | 9 +-------- drivers/staging/speakup/speakup_spkout.c | 9 +-------- drivers/staging/speakup/spk_types.h | 2 ++ 5 files changed, 29 insertions(+), 19 deletions(-) commit a455178e59f2b3591840cc543cf637424bd572d7 Author: Pan Bian Date: Sun Apr 23 17:52:55 2017 +0800 staging: comedi: addi_apci_3xxx: check return value Function pci_ioremap_bar() will return a NULL pointer if there is no enough memory. However, in function apci3xxx_auto_attach(), the return value of function pci_ioremap_bar() is not validated. This may result in NULL dereference in following access to dev->mmio. This patch fixes the bug. Signed-off-by: Pan Bian Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/addi_apci_3xxx.c | 2 ++ 1 file changed, 2 insertions(+) commit 255364f7b8a0fee3fb642b3e1521e943dd67bfb3 Author: Ian Abbott Date: Thu Apr 20 19:05:14 2017 +0100 staging: comedi: support vm_access_process for mmap'd buffer If a process that has mmap'd a COMEDI buffer is being run under a debugger such as GDB, the buffer contents are inaccessible from the debugger. Support the `access()` VM operation to allow the buffer contents to be accessed by another process. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_buf.c | 24 ++++++++++++++++++++++++ drivers/staging/comedi/comedi_fops.c | 15 +++++++++++++++ drivers/staging/comedi/comedi_internal.h | 2 ++ 3 files changed, 41 insertions(+) commit 5ab8c689f7c0c97e98b8014b7f0ede386bef5aaf Author: Arnaldo Carvalho de Melo Date: Tue Apr 25 15:30:47 2017 -0300 perf tools: Move event prototypes from util.h to event.h More needs to be done to have the actual functions and variables in a smaller .c file that can then be included in the python binding, avoiding dragging more stuff into it. Link: http://lkml.kernel.org/n/tip-uecxz7cqkssouj7tlxrkqpl4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 1 + tools/perf/builtin-top.c | 2 +- tools/perf/builtin-trace.c | 1 + tools/perf/perf.c | 1 + tools/perf/tests/hists_cumulate.c | 1 + tools/perf/tests/hists_filter.c | 1 + tools/perf/tests/hists_output.c | 1 + tools/perf/util/event.c | 1 + tools/perf/util/event.h | 8 ++++++++ tools/perf/util/evsel.c | 1 + tools/perf/util/util.h | 8 -------- 11 files changed, 17 insertions(+), 9 deletions(-) commit 50b6778c44e426d7ef7ae30e06314f511faf383a Author: Petr Mladek Date: Mon Oct 17 17:39:32 2016 +0200 IB/fmr_pool: Convert the cleanup thread into kthread worker API Kthreads are currently implemented as an infinite loop. Each has its own variant of checks for terminating, freezing, awakening. In many cases it is unclear to say in which state it is and sometimes it is done a wrong way. The plan is to convert kthreads into kthread_worker or workqueues API. It allows to split the functionality into separate operations. It helps to make a better structure. Also it defines a clean state where no locks are taken, IRQs blocked, the kthread might sleep or even be safely migrated. The kthread worker API is useful when we want to have a dedicated single thread for the work. It helps to make sure that it is available when needed. Also it allows a better control, e.g. define a scheduling priority. This patch converts the frm_pool kthread into the kthread worker API because I am not sure how busy the thread is. It is well possible that it does not need a dedicated kthread and workqueues would be perfectly fine. Well, the conversion between kthread worker API and workqueues is pretty trivial. The patch moves one iteration from the kthread into the work function. It is queued only when there is a pending work. Therefore we do not need to compare flush_ser and req_ser at the beginning. On the contrary, the same work could be queued only once at a time. Therefore it has to re-queue itself if some requests are pending. Otherwise, wake_up_process() is replaced by queuing the work. Important: The change is only compile tested. I did not find an easy way how to check it in a real life. Signed-off-by: Petr Mladek TO: Doug Ledford CC: Sean Hefty CC: Hal Rosenstock CC: linux-rdma@vger.kernel.org Signed-off-by: Doug Ledford drivers/infiniband/core/fmr_pool.c | 49 +++++++++++++++----------------------- 1 file changed, 19 insertions(+), 30 deletions(-) commit 4d6f28591fe415fc5233e9148c66a1b81ad17425 Author: Yuval Shaia Date: Tue Mar 14 16:01:57 2017 +0200 {net,IB}/{rxe,usnic}: Utilize generic mac to eui32 function This logic seems to be duplicated in (at least) three separate files. Move it to one place so code can be re-use. Signed-off-by: Yuval Shaia Reviewed-by: Leon Romanovsky drivers/infiniband/hw/usnic/usnic_common_util.h | 11 +++------- drivers/infiniband/sw/rxe/rxe.c | 4 +++- drivers/infiniband/sw/rxe/rxe_loc.h | 2 -- drivers/infiniband/sw/rxe/rxe_net.c | 28 ------------------------- drivers/infiniband/sw/rxe/rxe_verbs.c | 4 +++- include/net/addrconf.h | 22 +++++++++++++++---- 6 files changed, 27 insertions(+), 44 deletions(-) commit a7c81326ca3af41cdd5ab9a65d5d5880df66e84c Author: Yuval Shaia Date: Wed Mar 1 22:09:09 2017 +0200 IB/usnic: Remove unused functions Signed-off-by: Yuval Shaia Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/usnic/usnic_common_util.h | 29 ------------------------- 1 file changed, 29 deletions(-) commit 05a24b9b7fe6ad58315044d11f343cc6e36073af Author: Colin Ian King Date: Thu Feb 23 11:22:53 2017 +0000 IB/iser: fix spelling mistake: "unexepected" -> "unexpected" trivial fix to spelling mistake in iser_err error message Signed-off-by: Colin Ian King Reviewed-by: Max Gurtovoy Acked-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/ulp/iser/iser_initiator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e821303c428eedcc20746224d590b11c7000a7e5 Author: Ganesh Goudar Date: Thu Feb 23 12:31:43 2017 +0530 iw_cxgb4: Use dsgl by default Enable the use of dsgl by default and determine whether dsgl is supported from lld info. Signed-off-by: Steve Wise Signed-off-by: Bharat Potnuri Signed-off-by: Ganesh Goudar Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/mem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 19445816996d1a89682c37685fe95959631d9f32 Author: Bjørn Mork Date: Fri Apr 21 10:01:29 2017 +0200 USB: Revert "cdc-wdm: fix "out-of-sync" due to missing notifications" This reverts commit 833415a3e781 ("cdc-wdm: fix "out-of-sync" due to missing notifications") There have been several reports of wdm_read returning unexpected EIO errors with QMI devices using the qmi_wwan driver. The reporters confirm that reverting prevents these errors. I have been unable to reproduce the bug myself, and have no explanation to offer either. But reverting is the safe choice here, given that the commit was an attempt to work around a firmware problem. Living with a firmware problem is still better than adding driver bugs. Reported-by: Kasper Holtze Reported-by: Aleksander Morgado Reported-by: Daniele Palmas Cc: # v4.9+ Fixes: 833415a3e781 ("cdc-wdm: fix "out-of-sync" due to missing notifications") Signed-off-by: Bjørn Mork Acked-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-wdm.c | 103 ++------------------------------------------ 1 file changed, 4 insertions(+), 99 deletions(-) commit 3d6159640da9c9175d1ca42f151fc1a14caded59 Author: Alexey Brodkin Date: Thu Apr 13 15:33:34 2017 +0300 usb: Make sure usb/phy/of gets built-in DWC3 driver uses of_usb_get_phy_mode() which is implemented in drivers/usb/phy/of.c and in bare minimal configuration it might not be pulled in kernel binary. In case of ARC or ARM this could be easily reproduced with "allnodefconfig" +CONFIG_USB=m +CONFIG_USB_DWC3=m. On building all ends-up with: ---------------------->8------------------ Kernel: arch/arm/boot/Image is ready Kernel: arch/arm/boot/zImage is ready Building modules, stage 2. MODPOST 5 modules ERROR: "of_usb_get_phy_mode" [drivers/usb/dwc3/dwc3.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 ---------------------->8------------------ Signed-off-by: Alexey Brodkin Cc: Greg Kroah-Hartman Cc: Masahiro Yamada Cc: Geert Uytterhoeven Cc: Nicolas Pitre Cc: Thomas Gleixner Cc: Felipe Balbi Cc: Felix Fietkau Cc: Jeremy Kerr Cc: linux-snps-arc@lists.infradead.org Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/Makefile | 1 + 1 file changed, 1 insertion(+) commit 1022ccdb1f7e13a13c5ab115c60fbbea70d7e291 Author: Phillip Potter Date: Thu Apr 20 20:53:48 2017 +0100 USB: storage: e-mail update in drivers/usb/storage/unusual_devs.h Updates the e-mail address of Phillip Potter, updater of the Nokia 6288 entry in drivers/usb/storage/unusual_devs.h Signed-off-by: Phillip Potter Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/unusual_devs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25d9baa47505ead1bcae7334991363c3bbfa1831 Author: Christoph Hellwig Date: Fri Apr 21 08:26:57 2017 +0200 nvme-lightnvm: add missing endianess conversion in nvme_nvm_end_io Found by sparse. Signed-off-by: Christoph Hellwig Reviewed-by: Matias Bjørling drivers/nvme/host/lightnvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fad1fd46ccf3ee283052e948cf91edd0cd9b1c7 Author: Jon Derrick Date: Mon Apr 24 18:02:43 2017 -0600 nvme-scsi: Consider LBA format in IO splitting calculation The current command submission code uses a sector-based value when considering the maximum number of blocks per command. With a 4k-formatted namespace and a command exceeding max hardware limits, this calculation doesn't split IOs which should be split and fails in the nvme layer. This patch fixes that calculation and enables IO splitting in these circumstances. Signed-off-by: Jon Derrick Reviewed-by: Jens Axboe Signed-off-by: Christoph Hellwig drivers/nvme/host/scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 374cb8610ac15737acb65ca0293c21dc2205662b Author: Doug Ledford Date: Tue Apr 25 14:00:59 2017 -0400 RDMA/bnxt_re: Use IS_ERR_OR_NULL where appropriate Constructs such as if (ptr && !IS_ERR(ptr)) can be shorted to just !IS_ERR_OR_NULL(ptr) instead. Make substitutions in the bnxt_re driver where appropriate. Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit de41447aac034c4acc8d9d1ddbdcb7ce4e8a3f6f Author: Ewan D. Milne Date: Mon Apr 24 13:24:16 2017 -0400 nvme-fc: avoid memory corruption caused by calling nvmf_free_options() twice Do not call nvmf_free_options() from the nvme_fc_ctlr destructor if nvme_fc_create_ctrl() returns an error, because nvmf_create_ctrl() frees the options when an error is returned. Signed-off-by: Ewan D. Milne Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bbe3012b73b592dfe5f4340a14373840f51887b6 Author: James Smart Date: Fri Apr 21 17:49:08 2017 -0700 lpfc: Fix memory corruption of the lpfc_ncmd->list pointers lpfc was changing the private pointer that is set/maintained by the nvme_fc transport. This caused two issues: a) the transport, on teardown may erroneous attempt to free whatever address was set; and b) lfpc uses any value set in lpfc_nvme_fcp_abort() and assumes its a valid io request. Correct issue by properly defining a context structure for lpfc. Lpfc also updated to clear the private context structure on io completion. Since this bug caused scrutiny of the way lpfc moves local request structures between lists, also cleaned up list_del()'s to list_del_inits()'s. This is a nvme-specific bug. The patch was cut against the linux-block tree, for-4.12/block tree. It should be pulled in through that tree. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/scsi/lpfc/lpfc_nvme.c | 17 +++++++++++------ drivers/scsi/lpfc/lpfc_nvme.h | 4 ++++ 2 files changed, 15 insertions(+), 6 deletions(-) commit 5e1fc7c5ba00599ccd7096eef3e9fd3362c1230f Author: Wei Yongjun Date: Tue Apr 25 11:36:50 2017 +0000 drivers: net: xgene-v2: Fix error return code in xge_mdio_config() Fix to return error code -ENODEV from the no PHY found error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene-v2/mdio.c | 1 + 1 file changed, 1 insertion(+) commit ebbd1dfb2620fb95e1d850286c80068766222276 Author: Colin Ian King Date: Fri Feb 17 15:35:22 2017 +0000 RDMA/bnxt_re: remove redundant initialization of rc to zero rc is initialized to zero but is then updated by calls to bnxt_qplib_free_fast_reg_page_list and/or bnxt_qpliob_free_mrw so the initialization is redundant and can be removed. Detected with CoverityScan, CID#1408448 ("Unused Value") Signed-off-by: Colin Ian King Reviewed-by: Laurence Oberman Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5cdae3291f7be7a34e75affe4c0ec1f7f328b64 Author: David S. Miller Date: Tue Apr 18 15:36:58 2017 -0400 net: Generic XDP This provides a generic SKB based non-optimized XDP path which is used if either the driver lacks a specific XDP implementation, or the user requests it via a new IFLA_XDP_FLAGS value named XDP_FLAGS_SKB_MODE. It is arguable that perhaps I should have required something like this as part of the initial XDP feature merge. I believe this is critical for two reasons: 1) Accessibility. More people can play with XDP with less dependencies. Yes I know we have XDP support in virtio_net, but that just creates another depedency for learning how to use this facility. I wrote this to make life easier for the XDP newbies. 2) As a model for what the expected semantics are. If there is a pure generic core implementation, it serves as a semantic example for driver folks adding XDP support. One thing I have not tried to address here is the issue of XDP_PACKET_HEADROOM, thanks to Daniel for spotting that. It seems incredibly expensive to do a skb_cow(skb, XDP_PACKET_HEADROOM) or whatever even if the XDP program doesn't try to push headers at all. I think we really need the verifier to somehow propagate whether certain XDP helpers are used or not. v5: - Handle both negative and positive offset after running prog - Fix mac length in XDP_TX case (Alexei) - Use rcu_dereference_protected() in free_netdev (kbuild test robot) v4: - Fix MAC header adjustmnet before calling prog (David Ahern) - Disable LRO when generic XDP is installed (Michael Chan) - Bypass qdisc et al. on XDP_TX and record the event (Alexei) - Do not perform generic XDP on reinjected packets (DaveM) v3: - Make sure XDP program sees packet at MAC header, push back MAC header if we do XDP_TX. (Alexei) - Elide GRO when generic XDP is in use. (Alexei) - Add XDP_FLAG_SKB_MODE flag which the user can use to request generic XDP even if the driver has an XDP implementation. (Alexei) - Report whether SKB mode is in use in rtnl_xdp_fill() via XDP_FLAGS attribute. (Daniel) v2: - Add some "fall through" comments in switch statements based upon feedback from Andrew Lunn - Use RCU for generic xdp_prog, thanks to Johannes Berg. Tested-by: Andy Gospodarek Tested-by: Jesper Dangaard Brouer Tested-by: David Ahern Signed-off-by: David S. Miller include/linux/netdevice.h | 8 +++ include/uapi/linux/if_link.h | 4 +- net/core/dev.c | 155 +++++++++++++++++++++++++++++++++++++++++-- net/core/gro_cells.c | 2 +- net/core/rtnetlink.c | 40 ++++++----- 5 files changed, 187 insertions(+), 22 deletions(-) commit 4da2b1eb230ba4ad19b58984dc52e05b1073df5f Author: Finn Thain Date: Sun Apr 2 17:08:05 2017 +1000 scsi: mac_esp: Replace bogus memory barrier with spinlock Commit da244654c66e ("[SCSI] mac_esp: fix for quadras with two esp chips") added mac_scsi_esp_intr() to handle the IRQ lines from a pair of on-board ESP chips (a normal shared IRQ did not work). Proper mutual exclusion was missing from that patch. This patch fixes race conditions between comparison and assignment of esp_chips[] pointers. Signed-off-by: Finn Thain Reviewed-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/mac_esp.c | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) commit 62d57f20ff6d9715c5d7605c5b6b1a2e6f4fbbd8 Author: Colin Ian King Date: Mon Apr 24 18:04:18 2017 +0100 scsi: fcoe: make fcoe_e_d_tov and fcoe_r_a_tov static These module parameter variables don't need global scope, make them static Signed-off-by: Colin Ian King Acked-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/fcoe/fcoe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 868ed5a5b73f7cc18432ffe6e8d8addd395e91a1 Author: Damien Le Moal Date: Mon Apr 24 16:51:15 2017 +0900 scsi: sd_zbc: Do not write lock zones for reset Resetting a zone write pointer is equivalent to discarding sectors: after a reset, the zone sectors will contain zeros (or the format pattern). So there is no need for mutual exclusion between a zone reset and write. Similarly to discard, make it the responsability of the user to properly synchronize between reset and write (as is done now for discard and write). Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sd_zbc.c | 42 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) commit f70532406aa4193e484b1e3c4d7d613f39257a44 Author: Bart Van Assche Date: Mon Apr 24 16:51:14 2017 +0900 scsi: sd_zbc: Remove superfluous assignments A value is assigned to the variable 'capacity' in sd_zbc_read_zones() but that value is never used. Hence remove the variable 'capacity'. [Damien: There is no need to initialize to 0 the variable 'ret' in sd_zbc_read_zones()] Signed-off-by: Bart Van Assche Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sd_zbc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a90dfdc2dea1ce8ab87e3949c3c6bab3c1e36137 Author: Damien Le Moal Date: Mon Apr 24 16:51:13 2017 +0900 scsi: sd: sd_zbc: Rename sd_zbc_setup_write_cmnd Rename sd_zbc_setup_write_cmnd() to sd_zbc_write_lock_zone() to be clear about what the function actually does. To be consistent, also rename sd_zbc_cancel_write_cmnd() to sd_zbc_write_unlock_zone(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 6 +++--- drivers/scsi/sd.h | 8 ++++---- drivers/scsi/sd_zbc.c | 12 ++++-------- 3 files changed, 11 insertions(+), 15 deletions(-) commit 2908769c35fbd3de7b874b60b95ba81546e3c920 Author: Damien Le Moal Date: Mon Apr 24 16:51:12 2017 +0900 scsi: Improve scsi_get_sense_info_fld Use get_unaligned_be32 and get_unaligned_be64 to obtain values from the sense buffer instead of open coding the operations. Also change the function return value to a bool and fix the function signature declaration to remove spaces triggering checkpatch warnings. No functional change is introduced by this patch. Signed-off-by: Damien Le Moal Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_error.c | 38 +++++++++++++++----------------------- include/scsi/scsi_eh.h | 4 ++-- 2 files changed, 17 insertions(+), 25 deletions(-) commit d227ec267ff4fa91ac2db9965d5392cf825be511 Author: Christoph Hellwig Date: Mon Apr 24 19:05:12 2017 -0400 scsi: sd: Cleanup sd_done sense data handling Use a switch for the sense key, and remove two pointless variables that are only used once. [mkp: Added UNMAP comment and removed good_bytes based on comment from Damien] Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 5136a4fd5832af12ec5e5961c52a27a524a0a9d9 Author: Wei Yongjun Date: Tue Apr 25 16:15:30 2017 +0000 lightnvm: fix possible memory leak in pblk_bb_discovery() 'blks' is malloced in pblk_bb_discovery() and should be freed before leaving from the nvm_get_tgt_bb_tbl() error handling cases, otherwise it will cause memory leak. Also skip assign blks to rlun->bb_list when error. Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target") Signed-off-by: Wei Yongjun Reviewed-by: Javier González Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c4cf1acdb186436b88cc9aeaf08322bc49fec183 Author: Darrick J. Wong Date: Thu Apr 20 15:09:05 2017 -0700 xfs: better log intent item refcount checking Use ASSERTs on the log intent item refcounts so that we fail noisily if anyone tries to double-free the item. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_bmap_item.c | 1 + fs/xfs/xfs_extfree_item.c | 1 + fs/xfs/xfs_refcount_item.c | 1 + fs/xfs/xfs_rmap_item.c | 1 + 4 files changed, 4 insertions(+) commit 20e8a063786050083fe05b4f45be338c60b49126 Author: Brian Foster Date: Fri Apr 21 12:40:44 2017 -0700 xfs: fix up quotacheck buffer list error handling The quotacheck error handling of the delwri buffer list assumes the resident buffers are locked and doesn't clear the _XBF_DELWRI_Q flag on the buffers that are dequeued. This can lead to assert failures on buffer release and possibly other locking problems. Move this code to a delwri queue cancel helper function to encapsulate the logic required to properly release buffers from a delwri queue. Update the helper to clear the delwri queue flag and call it from quotacheck. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf.c | 24 ++++++++++++++++++++++++ fs/xfs/xfs_buf.h | 1 + fs/xfs/xfs_qm.c | 7 +------ 3 files changed, 26 insertions(+), 6 deletions(-) commit 27af1bbf524459962d1477a38ac6e0b7f79aaecc Author: Christoph Hellwig Date: Fri Apr 21 11:24:42 2017 -0700 xfs: remove xfs_trans_ail_delete_bulk xfs_iflush_done uses an on-stack variable length array to pass the log items to be deleted to xfs_trans_ail_delete_bulk. On-stack VLAs are a nasty gcc extension that can lead to unbounded stack allocations, but fortunately we can easily avoid them by simply open coding xfs_trans_ail_delete_bulk in xfs_iflush_done, which is the only caller of it except for the single-item xfs_trans_ail_delete. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_inode_item.c | 29 +++++++++++--------- fs/xfs/xfs_trans_ail.c | 71 ++++++++++++++++++++++++------------------------- fs/xfs/xfs_trans_priv.h | 15 +++-------- 3 files changed, 55 insertions(+), 60 deletions(-) commit 3f88a15ae0f15f8dec3b10a55d02d1c1defa73c6 Author: Christoph Hellwig Date: Fri Apr 21 11:24:42 2017 -0700 xfs: don't use bool values in trace buffers Using bool values produces sparse warnings of this form: fs/xfs/./xfs_trace.h:2252:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1) fs/xfs/./xfs_trace.h:2252:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1) fs/xfs/./xfs_trace.h:2278:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1) fs/xfs/./xfs_trace.h:2278:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1) fs/xfs/./xfs_trace.h:2307:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1) Just use a char instead to fix those up. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_trace.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 12e4a381c5cefa4bf54547cb51d98241a54e29f3 Author: Darrick J. Wong Date: Sun Apr 23 10:45:21 2017 -0700 xfs: fix getfsmap userspace memory corruption while setting OF_LAST At the end of a getfsmap call, we will set FMR_OF_LAST in the last struct fsmap that was handed in by userspace if we've truly run out of space mapping record (as opposed to simply running out of space in the user array). Unfortunately, fmh_entries is the wrong check for whether or not we've filled out anything in the user array because the ioctl provides that fmh_count==0 sets fmh_entries without filling out the user array. Therefore we end up writing things into user memory areas that we weren't given, and kaboom. Since Christoph amended the getfsmap structure to track the number of fsmap entries we've actually filled out, use that as part of deciding if we have to set the OF_LAST flag. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d17e14cc052ecebb572d4546c7deeddc0c6e040 Author: Christoph Hellwig Date: Fri Apr 21 11:24:41 2017 -0700 xfs: fix __user annotations for xfs_ioc_getfsmap By passing the whole fsmap_head structure and an index we can get the user point annotations right for the embedded variable sized array in struct fsmap_head. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong [darrick: change idx to unsigned int] Signed-off-by: Darrick J. Wong fs/xfs/xfs_ioctl.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e2a641922a3592b5ea226624d5abeb13eb49622c Author: Christoph Hellwig Date: Fri Apr 21 11:24:40 2017 -0700 xfs: corruption needs to respect endianess too! At least if we want to be able to recognize the pattern. Add a missing byte swap to the corruption injection case in xlog_sync. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef2b67ecf8ddbcb30f98f7ce6876872fb3e925f6 Author: Christoph Hellwig Date: Fri Apr 21 11:24:40 2017 -0700 xfs: use NULL instead of 0 to initialize a pointer in xfs_ioc_getfsmap Found by sparse. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fad5656b2247244c9fe4f30d63e4c190c5725840 Author: Christoph Hellwig Date: Fri Apr 21 11:24:39 2017 -0700 xfs: use NULL instead of 0 to initialize a pointer in xfs_getfsmap Found by sparse. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_fsmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c1d9e4a61590c2a4d657d1deddd1674f1565097 Author: Christoph Hellwig Date: Thu Apr 20 09:42:48 2017 -0700 xfs: simplify validation of the unwritten extent bit XFS only supports the unwritten extent bit in the data fork, and only if the file system has a version 5 superblock or the unwritten extent feature bit. We currently have two routines that validate the invariant: xfs_check_nostate_extents which return -EFSCORRUPTED when it's not met, and xfs_validate_extent that triggers and assert in debug build. Both of them iterate over all extents of an inode fork when called, which isn't very efficient. This patch instead adds a new helper that verifies the invariant one extent at a time, and calls it from the places where we iterate over all extents to converted them from or two the in-memory format. The callers then return -EFSCORRUPTED when reading invalid extents from disk, or trigger an assert when writing them to disk. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 16 +------- fs/xfs/libxfs/xfs_bmap.h | 2 - fs/xfs/libxfs/xfs_bmap_btree.c | 26 ------------ fs/xfs/libxfs/xfs_bmap_btree.h | 21 ++++++---- fs/xfs/libxfs/xfs_format.h | 8 ---- fs/xfs/libxfs/xfs_inode_fork.c | 90 ++++++++++++------------------------------ 6 files changed, 41 insertions(+), 122 deletions(-) commit 37f7f9bbf3b914e94f81426f6f59a3f97f4dc562 Author: Christoph Hellwig Date: Wed Apr 19 15:19:49 2017 -0700 xfs: remove unused values from xfs_exntst_t We only ever use the normal and unwritten states. And the actual ondisk format (this enum isn't despite being in xfs_format.h) only has space for the unwritten bit anyway. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_format.h | 1 - 1 file changed, 1 deletion(-) commit 895e9bfc9e36c8e39ea4d2129dc2cbde1aafec99 Author: Christoph Hellwig Date: Wed Apr 19 15:19:45 2017 -0700 xfs: remove the unused XFS_MAXLINK_1 define Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_format.h | 2 -- 1 file changed, 2 deletions(-) commit 4f1adf3373f072246c14119b2aa6dfb4d6510a43 Author: Eric Sandeen Date: Wed Apr 19 15:19:32 2017 -0700 xfs: more do_div cleanups On some architectures do_div does the pointer compare trick to make sure that we've sent it an unsigned 64-bit number. (Why unsigned? I don't know.) Fix up the few places that squawk about this; in xfs_bmap_wants_extents() we just used a bare int64_t so change that to unsigned. In xfs_adjust_extent_unmap_boundaries() all we wanted was the mod, and we have an xfs-specific function to handle that w/o side effects, which includes proper casting for do_div. In xfs_daddr_to_ag[b]no, we were using the wrong type anyway; XFS_BB_TO_FSBT returns a block in the filesystem, so use xfs_rfsblock_t not xfs_daddr_t, and gain the unsignedness from that type as a bonus. Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 2 +- fs/xfs/xfs_bmap_util.c | 5 +---- fs/xfs/xfs_mount.h | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) commit 90115407c5847828d82af9bc139f690600a36219 Author: Eric Sandeen Date: Wed Apr 19 12:55:57 2017 -0700 xfs: remove use of do_div with 32-bit dividend in quota The kbuild test robot caught this; in debug code we have another caller of do_div with a 32-bit dividend (j) which is caught now that we are using the kernel-supplied do_div. None of the values used here are 64-bit; just use simple division. Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_qm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 42bf9dba40086e3d18dc29eb379f13df219d3f22 Author: Hou Tao Date: Fri Apr 14 11:43:27 2017 -0700 xfs: remove the trailing newline used in the fmt parameter of TP_printk The trailing newlines wil lead to extra newlines in the trace file which looks like the following output, so remove them. >kworker/4:1H-1508 [004] .... 47879.101608: xfs_discard_extent: dev 8:0 > >kworker/u16:2-238 [004] .... 47879.101725: xfs_extent_busy_clear: dev 8:0 Signed-off-by: Hou Tao Reviewed-by: Darrick J. Wong [darrick: fix the getfsmap tracepoints too] Signed-off-by: Darrick J. Wong fs/xfs/xfs_trace.h | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit cb52ee334a45ae6c78a3999e4b473c43ddc528f4 Author: Brian Foster Date: Thu Apr 20 08:06:47 2017 -0700 xfs: prevent multi-fsb dir readahead from reading random blocks Directory block readahead uses a complex iteration mechanism to map between high-level directory blocks and underlying physical extents. This mechanism attempts to traverse the higher-level dir blocks in a manner that handles multi-fsb directory blocks and simultaneously maintains a reference to the corresponding physical blocks. This logic doesn't handle certain (discontiguous) physical extent layouts correctly with multi-fsb directory blocks. For example, consider the case of a 4k FSB filesystem with a 2 FSB (8k) directory block size and a directory with the following extent layout: EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL 0: [0..7]: 88..95 0 (88..95) 8 1: [8..15]: 80..87 0 (80..87) 8 2: [16..39]: 168..191 0 (168..191) 24 3: [40..63]: 5242952..5242975 1 (72..95) 24 Directory block 0 spans physical extents 0 and 1, dirblk 1 lies entirely within extent 2 and dirblk 2 spans extents 2 and 3. Because extent 2 is larger than the directory block size, the readahead code erroneously assumes the block is contiguous and issues a readahead based on the physical mapping of the first fsb of the dirblk. This results in read verifier failure and a spurious corruption or crc failure, depending on the filesystem format. Further, the subsequent readahead code responsible for walking through the physical table doesn't correctly advance the physical block reference for dirblk 2. Instead of advancing two physical filesystem blocks, the first iteration of the loop advances 1 block (correctly), but the subsequent iteration advances 2 more physical blocks because the next physical extent (extent 3, above) happens to cover more than dirblk 2. At this point, the higher-level directory block walking is completely off the rails of the actual physical layout of the directory for the respective mapping table. Update the contiguous dirblock logic to consider the current offset in the physical extent to avoid issuing directory readahead to unrelated blocks. Also, update the mapping table advancing code to consider the current offset within the current dirblock to avoid advancing the mapping reference too far beyond the dirblock. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_dir2_readdir.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 023cc840b40fad95c6fe26fff1d380a8c9d45939 Author: Eric Sandeen Date: Thu Apr 13 15:15:47 2017 -0700 xfs: handle array index overrun in xfs_dir2_leaf_readbuf() Carlos had a case where "find" seemed to start spinning forever and never return. This was on a filesystem with non-default multi-fsb (8k) directory blocks, and a fragmented directory with extents like this: 0:[0,133646,2,0] 1:[2,195888,1,0] 2:[3,195890,1,0] 3:[4,195892,1,0] 4:[5,195894,1,0] 5:[6,195896,1,0] 6:[7,195898,1,0] 7:[8,195900,1,0] 8:[9,195902,1,0] 9:[10,195908,1,0] 10:[11,195910,1,0] 11:[12,195912,1,0] 12:[13,195914,1,0] ... i.e. the first extent is a contiguous 2-fsb dir block, but after that it is fragmented into 1 block extents. At the top of the readdir path, we allocate a mapping array which (for this filesystem geometry) can hold 10 extents; see the assignment to map_info->map_size. During readdir, we are therefore able to map extents 0 through 9 above into the array for readahead purposes. If we count by 2, we see that the last mapped index (9) is the first block of a 2-fsb directory block. At the end of xfs_dir2_leaf_readbuf() we have 2 loops to fill more readahead; the outer loop assumes one full dir block is processed each loop iteration, and an inner loop that ensures that this is so by advancing to the next extent until a full directory block is mapped. The problem is that this inner loop may step past the last extent in the mapping array as it tries to reach the end of the directory block. This will read garbage for the extent length, and as a result the loop control variable 'j' may become corrupted and never fail the loop conditional. The number of valid mappings we have in our array is stored in map->map_valid, so stop this inner loop based on that limit. There is an ASSERT at the top of the outer loop for this same condition, but we never made it out of the inner loop, so the ASSERT never fired. Huge appreciation for Carlos for debugging and isolating the problem. Debugged-and-analyzed-by: Carlos Maiolino Signed-off-by: Eric Sandeen Tested-by: Carlos Maiolino Reviewed-by: Carlos Maiolino Reviewed-by: Bill O'Donnell Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_dir2_readdir.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit a008c31c7ef9a4106dbadf21b3bcb7e89826a5d7 Author: Chandan Rajendra Date: Wed Apr 12 11:03:20 2017 -0700 iomap_dio_rw: Prevent reading file data beyond iomap_dio->i_size On a ppc64 machine executing overlayfs/019 with xfs as the lower and upper filesystem causes the following call trace, WARNING: CPU: 2 PID: 8034 at /root/repos/linux/fs/iomap.c:765 .iomap_dio_actor+0xcc/0x420 Modules linked in: CPU: 2 PID: 8034 Comm: fsstress Tainted: G L 4.11.0-rc5-next-20170405 #100 task: c000000631314880 task.stack: c0000003915d4000 NIP: c00000000035a72c LR: c00000000035a6f4 CTR: c00000000035a660 REGS: c0000003915d7570 TRAP: 0700 Tainted: G L (4.11.0-rc5-next-20170405) MSR: 800000000282b032 CR: 24004284 XER: 00000000 CFAR: c0000000006f7190 SOFTE: 1 GPR00: c00000000035a6f4 c0000003915d77f0 c0000000015a3f00 000000007c22f600 GPR04: 000000000022d000 0000000000002600 c0000003b2d56360 c0000003915d7960 GPR08: c0000003915d7cd0 0000000000000002 0000000000002600 c000000000521cc0 GPR12: 0000000024004284 c00000000fd80a00 000000004b04ae64 ffffffffffffffff GPR16: 000000001000ca70 0000000000000000 c0000003b2d56380 c00000000153d2b8 GPR20: 0000000000000010 c0000003bc87bac8 0000000000223000 000000000022f5ff GPR24: c0000003b2d56360 000000000000000c 0000000000002600 000000000022d000 GPR28: 0000000000000000 c0000003915d7960 c0000003b2d56360 00000000000001ff NIP [c00000000035a72c] .iomap_dio_actor+0xcc/0x420 LR [c00000000035a6f4] .iomap_dio_actor+0x94/0x420 Call Trace: [c0000003915d77f0] [c00000000035a6f4] .iomap_dio_actor+0x94/0x420 (unreliable) [c0000003915d78f0] [c00000000035b9f4] .iomap_apply+0xf4/0x1f0 [c0000003915d79d0] [c00000000035c320] .iomap_dio_rw+0x230/0x420 [c0000003915d7ae0] [c000000000512a14] .xfs_file_dio_aio_read+0x84/0x160 [c0000003915d7b80] [c000000000512d24] .xfs_file_read_iter+0x104/0x130 [c0000003915d7c10] [c0000000002d6234] .__vfs_read+0x114/0x1a0 [c0000003915d7cf0] [c0000000002d7a8c] .vfs_read+0xac/0x1a0 [c0000003915d7d90] [c0000000002d96b8] .SyS_read+0x58/0x100 [c0000003915d7e30] [c00000000000b8e0] system_call+0x38/0xfc Instruction dump: 78630020 7f831b78 7ffc07b4 7c7ce039 40820360 a13d0018 2f890003 419e0288 2f890004 419e00a0 2f890001 419e02a8 <0fe00000> 3b80fffb 38210100 7f83e378 The above problem can also be recreated on a regular xfs filesystem using the command, $ fsstress -d /mnt -l 1000 -n 1000 -p 1000 The reason for the call trace is, 1. When 'reserving' blocks for delayed allocation , XFS reserves more blocks (i.e. past file's current EOF) than required. This is done because XFS assumes that userspace might write more data and hence 'reserving' more blocks might lead to the file's new data being stored contiguously on disk. 2. The in-memory 'struct xfs_bmbt_irec' mapping the file's last extent would then cover the prealloc-ed EOF blocks in addition to the regular blocks. 3. When flushing the dirty blocks to disk, we only flush data till the file's EOF. But before writing out the dirty data, we allocate blocks on the disk for holding the file's new data. This allocation includes the blocks that are part of the 'prealloc EOF blocks'. 4. Later, when the last reference to the inode is being closed, XFS frees the unused 'prealloc EOF blocks' in xfs_inactive(). In step 3 above, When allocating space on disk for the delayed allocation range, the space allocator might sometimes allocate less blocks than required. If such an allocation ends right at the current EOF of the file, We will not be able to clear the "delayed allocation" flag for the 'prealloc EOF blocks', since we won't have dirty buffer heads associated with that range of the file. In such a situation if a Direct I/O read operation is performed on file range [X, Y] (where X < EOF and Y > EOF), we flush dirty data in the range [X, Y] and invalidate page cache for that range (Refer to iomap_dio_rw()). Later for performing the Direct I/O read, XFS obtains the extent items (which are still cached in memory) for the file range. When doing so we are not supposed to get an extent item with IOMAP_DELALLOC flag set, since the previous "flush" operation should have converted any delayed allocation data in the range [X, Y]. Hence we end up hitting a WARN_ON_ONCE(1) statement in iomap_dio_actor(). This commit fixes the bug by preventing the read operation from going beyond iomap_dio->i_size. Reported-by: Santhosh G Signed-off-by: Chandan Rajendra Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/iomap.c | 3 +++ 1 file changed, 3 insertions(+) commit 7590632a33ef2d264665576d3d54e50f906fa758 Author: Christoph Hellwig Date: Tue Apr 11 16:45:57 2017 -0700 xfs: remove bmap block allocation retries Now that reflink operations don't set the firstblock value we don't need the workarounds for non-NULL firstblock values without a prior allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 29 ----------------------------- fs/xfs/libxfs/xfs_bmap_btree.c | 17 ----------------- 2 files changed, 46 deletions(-) commit bf8eadbacb24e321c99bbdd901589942712810d1 Author: Christoph Hellwig Date: Tue Apr 11 16:45:56 2017 -0700 xfs: remove xfs_bmap_remap_alloc The main thing that xfs_bmap_remap_alloc does is fixing the AGFL, similar to what we do in the space allocator. But the reflink code doesn't touch the allocation btree unlike the normal space allocator, so we couldn't care less about the state of the AGFL. So remove xfs_bmap_remap_alloc and just handle the di_nblocks update in the caller. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 60 ++---------------------------------------------- fs/xfs/xfs_trace.h | 25 -------------------- 2 files changed, 2 insertions(+), 83 deletions(-) commit 6ebd5a4413e2afd1b1129135e1cf4a84092550e2 Author: Christoph Hellwig Date: Tue Apr 11 16:45:55 2017 -0700 xfs: introduce xfs_bmapi_remap Add a new helper to be used for reflink extent list additions instead of funneling them through xfs_bmapi_write and overloading the firstblock member in struct xfs_bmalloca and struct xfs_alloc_args. With some small changes to xfs_bmap_remap_alloc this also means we do not need a xfs_bmalloca structure for this case at all. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 157 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 112 insertions(+), 45 deletions(-) commit 6d04558f9fa9d16c4aba7243030f22ef0c1bbf32 Author: Christoph Hellwig Date: Tue Apr 11 16:45:54 2017 -0700 xfs: pass individual arguments to xfs_bmap_add_extent_hole_real For the reflink case we'd much rather pass the required arguments than faking up a struct xfs_bmalloca. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 123 ++++++++++++++++++++++++----------------------- 1 file changed, 64 insertions(+), 59 deletions(-) commit 39e07daa46e34c724ad33f903d166a0a62c20900 Author: Christoph Hellwig Date: Tue Apr 11 16:45:53 2017 -0700 xfs: remove attr fork handling in xfs_bmap_finish_one We never do COW operations for the attr fork, so don't pretend we handle them. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 52813fb13ff90bd9c39a93446cbf1103c290b6e9 Author: Christoph Hellwig Date: Tue Apr 11 16:45:52 2017 -0700 xfs: fix integer truncation in xfs_bmap_remap_alloc bno should be a xfs_fsblock_t, which is 64-bit wides instead of a xfs_aglock_t, which truncates the value to 32 bits. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5bc9c3c5432f5531a58e6fdd9f6c6587f2137b3 Author: Guoqing Jiang Date: Mon Apr 24 15:58:04 2017 +0800 md: clear WantReplacement once disk is removed We can clear 'WantReplacement' flag directly no matter it's replacement existed or not since the semantic is same as before. Also since the disk is removed from array, then it is straightforward to remove 'WantReplacement' flag and the comments in raid10/5 can be removed as well. Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/raid1.c | 6 +++--- drivers/md/raid10.c | 8 ++------ drivers/md/raid5.c | 9 +++------ 3 files changed, 8 insertions(+), 15 deletions(-) commit 2f7878c06e2d227aa5c405ddde356403b83e3509 Author: Wei Yongjun Date: Tue Apr 25 07:07:18 2017 +0000 qed: fix invalid use of sizeof in qed_alloc_qm_data() sizeof() when applied to a pointer typed expression gives the size of the pointer, not that of the pointed data. Fixes: b5a9ee7cf3be ("qed: Revise QM configuration") Signed-off-by: Wei Yongjun Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8fe45924387be6b5c1be59a7eb330790c61d5d10 Author: Teng Qin Date: Mon Apr 24 19:00:37 2017 -0700 bpf: map_get_next_key to return first key on NULL When iterating through a map, we need to find a key that does not exist in the map so map_get_next_key will give us the first key of the map. This often requires a lot of guessing in production systems. This patch makes map_get_next_key return the first key when the key pointer in the parameter is NULL. Signed-off-by: Teng Qin Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/trace/events/bpf.h | 10 +++++++--- kernel/bpf/arraymap.c | 2 +- kernel/bpf/hashtab.c | 9 +++++---- kernel/bpf/syscall.c | 20 ++++++++++++-------- tools/testing/selftests/bpf/test_maps.c | 29 +++++++++++++++++++++++++---- 5 files changed, 50 insertions(+), 20 deletions(-) commit 472ecf084a7687347f79720c83881c07407bfd8b Author: Mike Maloney Date: Mon Apr 24 21:29:11 2017 -0400 selftests/net: Fix broken test case in psock_fanout The error return falue form sock_fanout_open is -1, not zero. One test case was checking for 0 instead of -1. Tested: Built and tested in clean client. Signed-off-by: Mike Maloney Signed-off-by: David S. Miller tools/testing/selftests/net/psock_fanout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 799dbe3e1ce312801cf8755a45bbdd6557560ec4 Author: Ivan Khoronzhuk Date: Mon Apr 24 23:54:06 2017 +0300 net: ethernet: ti: netcp_core: remove unused compl queue mapping This code is unused and probably was unintentionally left while moving completion queue mapping in submit function. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp_core.c | 4 ---- 1 file changed, 4 deletions(-) commit 51c6bd7cbe0366b642d8ac90d98739c39ab091a9 Author: Shuah Khan Date: Fri Apr 21 18:01:51 2017 -0600 selftests: gpio: fix clean target to remove all generated files and dirs gpio test creates executables, object files, and include directory under selftests directory. Enhance clean target to remove all files it generates. Signed-off-by: Shuah Khan tools/testing/selftests/gpio/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 26d5ad3b96cf9c2a161c8e685e427966c91c587b Author: Shuah Khan Date: Fri Apr 21 18:00:39 2017 -0600 selftests: add gpio generated files to .gitignore gpio test generates files in selftests directory. Add them to .gitignore. Signed-off-by: Shuah Khan tools/testing/selftests/.gitignore | 4 ++++ 1 file changed, 4 insertions(+) commit c1a9f80e048cd0fc492e8a49dcb952317d0e97ce Merge: 3678427 eaf3c0c Author: David S. Miller Date: Tue Apr 25 11:49:33 2017 -0400 Merge branch 'qed-vf-tunnel' Manish Chopra says: ==================== qed/qede: VF tunnelling support With this series VFs can run vxlan/geneve/gre tunnels over it. Please consider applying this series to "net-next" ==================== Signed-off-by: David S. Miller commit eaf3c0c6b4e307e5c7e6cbeb8c5a17be7feee249 Author: Chopra, Manish Date: Mon Apr 24 10:00:49 2017 -0700 qed - VF tunnelling support [VXLAN/GENEVE/GRE] This patch adds hardware channel APIs support between VF and PF for tunnelling configuration for the VFs. According to that configuration VFs can run VXLAN/GENEVE/GRE tunnels over it with tunnel features offloaded. Using these APIs VF can also request for UDP ports configuration to the PF, although PF and it's child VFs share the same port. Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 1 + drivers/net/ethernet/qlogic/qed/qed_dev.c | 15 +- drivers/net/ethernet/qlogic/qed/qed_l2.c | 3 - drivers/net/ethernet/qlogic/qed/qed_main.c | 8 + drivers/net/ethernet/qlogic/qed/qed_sp_commands.c | 3 + drivers/net/ethernet/qlogic/qed/qed_sriov.c | 217 ++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_vf.c | 149 +++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_vf.h | 54 ++++++ 8 files changed, 446 insertions(+), 4 deletions(-) commit 97379f15c21e7ae27eb1ecf84adcace42c960c87 Author: Chopra, Manish Date: Mon Apr 24 10:00:48 2017 -0700 qed/qede: Add UDP ports in bulletin board This patch adds support for UDP ports in bulletin board to notify UDP ports change to the VFs Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 19 +++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_sriov.c | 23 +++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_sriov.h | 9 +++++++++ drivers/net/ethernet/qlogic/qed/qed_vf.c | 16 ++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_vf.h | 4 +++- drivers/net/ethernet/qlogic/qede/qede.h | 1 + drivers/net/ethernet/qlogic/qede/qede_filter.c | 11 +++++++++++ drivers/net/ethernet/qlogic/qede/qede_main.c | 1 + include/linux/qed/qed_eth_if.h | 1 + 9 files changed, 84 insertions(+), 1 deletion(-) commit 327a2b750c486c8e8f390dcff888881ad54d2f23 Author: Chopra, Manish Date: Mon Apr 24 10:00:47 2017 -0700 qede: Configure UDP ports in local context. This patch configures UDP ports locally instead of configuring them in deferred context which would be helpful in synchronizing UDP ports configuration for VFs which will be enabled in further patches. Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede.h | 2 - drivers/net/ethernet/qlogic/qede/qede_filter.c | 67 ++++++++++++++++++++------ drivers/net/ethernet/qlogic/qede/qede_main.c | 19 -------- 3 files changed, 52 insertions(+), 36 deletions(-) commit 369bfd4ec77f1668e48d395e95849d29fccaa4c3 Author: Chopra, Manish Date: Mon Apr 24 10:00:46 2017 -0700 qede: Disable tunnel offloads for non offloaded UDP ports This patch disables tunnel offloads via ndo_features_check() if given UDP port is not offloaded to hardware. This in turn allows to run multiple tunnel interfaces using different UDP ports. Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_fp.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 19489c7f0d9040ed2ffc23747e14af95dba479d2 Author: Chopra, Manish Date: Mon Apr 24 10:00:45 2017 -0700 qed/qede: Enable tunnel offloads based on hw configuration This patch enables tunnel feature offloads based on hw configuration at initialization time instead of enabling them always. Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_main.c | 15 +++++++++++ drivers/net/ethernet/qlogic/qede/qede_filter.c | 6 +++++ drivers/net/ethernet/qlogic/qede/qede_main.c | 36 ++++++++++++++++++-------- include/linux/qed/qed_if.h | 5 ++++ 4 files changed, 51 insertions(+), 11 deletions(-) commit 1996843012629825e4a2c339fedef1f7eade87bc Author: Chopra, Manish Date: Mon Apr 24 10:00:44 2017 -0700 qed: refactor tunnelling - API/Structs This patch changes the tunnel APIs to use per tunnel info instead of using bitmasks for all tunnels and also uses single struct to hold the data to prepare multiple variant of tunnel configuration ramrods to be sent to the hardware. Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 30 +- drivers/net/ethernet/qlogic/qed/qed_dev.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_dev_api.h | 2 +- drivers/net/ethernet/qlogic/qed/qed_l2.c | 15 +- drivers/net/ethernet/qlogic/qed/qed_main.c | 24 +- drivers/net/ethernet/qlogic/qed/qed_sp.h | 4 +- drivers/net/ethernet/qlogic/qed/qed_sp_commands.c | 327 +++++++++++----------- 7 files changed, 207 insertions(+), 197 deletions(-) commit 337f1e366c75ec88d9bbae59c0703d4289458b29 Author: Shuah Khan Date: Fri Apr 21 16:22:10 2017 -0600 selftests: powerpc: override clean in lib.mk to fix warnings Add override for lib.mk clean to fix the following warnings from clean target run. Makefile:63: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean' Signed-off-by: Shuah Khan tools/testing/selftests/powerpc/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6dd89010ff3620d60fc9d604218791641d06831c Author: Shuah Khan Date: Fri Apr 21 16:19:50 2017 -0600 selftests: gpio: override clean in lib.mk to fix warnings Add override for lib.mk clean to fix the following warnings from clean target run. Makefile:11: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean' Signed-off-by: Shuah Khan tools/testing/selftests/gpio/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b1c0f540c8e6944a8cae1bcbab60068fb7b40734 Author: Shuah Khan Date: Fri Apr 21 16:12:22 2017 -0600 selftests: futex: override clean in lib.mk to fix warnings Add override for lib.mk clean to fix the following warnings from clean target run. Makefile:36: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean' Signed-off-by: Shuah Khan tools/testing/selftests/futex/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit df6438f9a726c8f803e03708c83928e439fd5e2f Author: Shuah Khan Date: Fri Apr 21 16:07:51 2017 -0600 selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean Define CLEAN macro to allow Makefiles to override common clean target in lib.mk. This will help fix the following failures: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean' Fixes: 88baa78d1f31 ("selftests: remove duplicated all and clean target") Signed-off-by: Shuah Khan Acked-by: Michael Ellerman tools/testing/selftests/lib.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8edd210d9b121681f7e69dc087ae80d7043008e9 Author: Shuah Khan Date: Fri Apr 21 15:35:31 2017 -0600 selftests: splice: fix clean target to not remove default_file_splice_read.sh splice clean target removes the shell script default_file_splice_read.sh that runs the splice test. Fix it to not remove this file. Signed-off-by: Shuah Khan tools/testing/selftests/splice/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36784277c59bdfce8b90233c85e957ae4ee702fc Merge: e0ee84d a485c2b Author: David S. Miller Date: Tue Apr 25 11:41:57 2017 -0400 Merge branch 'l2tpeth-info' Guillaume Nault says: ==================== l2tp: add informations about l2tpeth interfaces in /sys Patch #1 lets userspace retrieve the naming scheme of an l2tpeth interface, using /sys/class/net//name_assign_type. Patch #2 adds the DEVTYPE field in /sys/class/net//uevent so that userspace can reliably know if a device is an l2tpeth interface. ==================== Signed-off-by: David S. Miller commit a485c2b877619935f7346146791f0d22f5da723a Author: Guillaume Nault Date: Mon Apr 24 14:16:07 2017 +0200 l2tp: define "l2tpeth" device type Export type of l2tpeth interfaces to userspace (/sys/class/net//uevent). Signed-off-by: Guillaume Nault Acked-by: James Chapman Signed-off-by: David S. Miller net/l2tp/l2tp_eth.c | 5 +++++ 1 file changed, 5 insertions(+) commit c39855febc0e7332db389fd4017ab163589b1b20 Author: Guillaume Nault Date: Mon Apr 24 14:16:06 2017 +0200 l2tp: set name_assign_type for devices created by l2tp_eth.c Export naming scheme used when creating l2tpeth interfaces (/sys/class/net//name_assign_type). This let userspace know if the device's name has been generated automatically or defined manually. Signed-off-by: Guillaume Nault Acked-by: James Chapman Signed-off-by: David S. Miller net/l2tp/l2tp_eth.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 12dc0f3b1ee599d3951698a2927c584700840b03 Author: Fabio Estevam Date: Mon Apr 24 21:43:49 2017 -0300 ASoC: tas2552: Propagate the error code in suspend/resume tas2552_suspend() and tas2552_resume() currently always return success, even though they may fail. Fix this behaviour by always propagating the error code. Signed-off-by: Fabio Estevam Reviewed-by: Dan Murphy Signed-off-by: Mark Brown sound/soc/codecs/tas2552.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cb67d7651676e8c8f2e40587ef591da057806c57 Author: Pierre-Louis Bossart Date: Mon Apr 24 16:34:33 2017 -0500 ASoC: bytcr_rt5640: log quirk configuration errors Now that quirks can be overridden with a module parameter, log errors so that non-sensical quirks introduced by mistake are identified. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 100 +++++++++++++++++++++++++--------- 1 file changed, 75 insertions(+), 25 deletions(-) commit 0b2c9f88b94cd40f6a27641f0bac02a7ba185e39 Author: Takashi Iwai Date: Mon Apr 24 23:34:30 2017 +0200 ASoC: bytcr_rt5640: Fix a typo and quirk parameter type The previous patch for adding the quirk module option had a typo in its info print, which results in a weird output. Also, the parameter type should be rather unsigned int instead of signed int. Fixes: 9f2cf73ed65b ("ASoC: bytcr_rt5640: Allow quirk set via module option") Reported-by: Pierre-Louis Bossart Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e85c5a153fe237f261838fc9638c28f19e0f27c1 Author: Marek Vasut Date: Mon Apr 24 17:21:30 2017 +0200 regulator: Add ROHM BD9571MWV-M PMIC regulator driver Add driver for the regulator block in the ROHM BD9571MWV-W MFD PMIC. This block supports three voltage monitors, VD18, VD25, VD33 for the 1V8, 2V5, 3V3 voltage rails and a single voltage regulator for the DVFS rail. Signed-off-by: Marek Vasut Signed-off-by: Mark Brown drivers/regulator/Kconfig | 11 ++ drivers/regulator/Makefile | 1 + drivers/regulator/bd9571mwv-regulator.c | 178 ++++++++++++++++++++++++++++++++ 3 files changed, 190 insertions(+) commit f72efa7e690ab5c4068ccba31c4da032bc45c29c Author: Leif Middelschulte Date: Sun Apr 23 21:19:58 2017 +0200 spi-imx: Implements handling of the SPI_READY mode flag. This patch implements consideration of the SPI_READY mode flag as defined in spi.h. It extends the device tree bindings to support the values defined by the reference manual for the DRCTL field. Thus supporting edge-triggered and level-triggered bursts. Signed-off-by: Leif Middelschulte Signed-off-by: Mark Brown .../devicetree/bindings/spi/fsl-imx-cspi.txt | 7 +++++++ drivers/spi/spi-imx.c | 20 ++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) commit af367afafb5ba7ae26defd35e4ba42cfe157ef72 Author: Richard Fitzgerald Date: Tue Apr 18 11:43:54 2017 +0100 regulator: arizona-ldo1: Factor out generic initialization In preparation for sharing this driver with Madera codecs, factor out the parts of initialization that aren't dependent on struct arizona. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown drivers/regulator/arizona-ldo1.c | 114 ++++++++++++++++++++++----------------- 1 file changed, 66 insertions(+), 48 deletions(-) commit 80a55f41aef4ee808f53f1a356491d7eaeefdd3c Author: Richard Fitzgerald Date: Tue Apr 18 11:43:53 2017 +0100 regulator: arizona-ldo1: Make arizona_ldo1 independent of struct arizona In preparation for supporting Madera codecs, remove the dependency on struct arizona in the regulator callbacks and struct arizona_ldo1. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown drivers/regulator/arizona-ldo1.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit aaa84e6a0399df374634c42590e644a698fcc3ff Author: Richard Fitzgerald Date: Tue Apr 18 11:43:52 2017 +0100 regulator: arizona-ldo1: Move pdata into a separate structure In preparation for sharing this driver with Madera, move the pdata for the LDO1 regulator out of struct arizona_pdata into a dedicated pdata struct for this driver. As a result the code in arizona_ldo1_of_get_pdata() can be made independent of struct arizona. This patch also updates the definition of struct arizona_pdata and the use of this pdata in mach-crag6410-module.c Signed-off-by: Richard Fitzgerald Acked-by: Krzysztof Kozlowski Acked-by: Lee Jones Signed-off-by: Mark Brown arch/arm/mach-s3c64xx/mach-crag6410-module.c | 8 ++++-- drivers/regulator/arizona-ldo1.c | 39 +++++++++++++++------------- include/linux/mfd/arizona/pdata.h | 4 +-- include/linux/regulator/arizona-ldo1.h | 24 +++++++++++++++++ 4 files changed, 53 insertions(+), 22 deletions(-) commit 7d8d14b51921cbfe082a796e55c22d0c1dd8fc26 Author: Richard Fitzgerald Date: Tue Apr 18 11:43:51 2017 +0100 regulator: arizona-micsupp: Factor out generic initialization In preparation for sharing this driver with Madera codecs, factor out the parts of initialization that aren't dependent on struct arizona. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown drivers/regulator/arizona-micsupp.c | 82 +++++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 36 deletions(-) commit e165983e5102c953d68bd935048e95567564e438 Author: Richard Fitzgerald Date: Tue Apr 18 11:43:50 2017 +0100 regulator: arizona-micsupp: Make arizona_micsupp independent of struct arizona In preparation for supporting Madera codecs, remove the dependency on struct arizona in the regulator callbacks and struct arizona_micsupp. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown drivers/regulator/arizona-micsupp.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 22161f3eb65dc29434325736c4d780908fe3bf6a Author: Richard Fitzgerald Date: Tue Apr 18 11:43:49 2017 +0100 regulator: arizona-micsupp: Move pdata into a separate structure In preparation for sharing this driver with Madera, move the pdata for the micsupp regulator out of struct arizona_pdata into a dedicated pdata struct for this driver. As a result the code in arizona_micsupp_of_get_pdata() can be made independent of struct arizona. This patch also updates the definition of struct arizona_pdata and the use of this pdata in mach-crag6410-module.c Signed-off-by: Richard Fitzgerald Acked-by: Lee Jones Signed-off-by: Mark Brown MAINTAINERS | 1 + drivers/regulator/arizona-micsupp.c | 21 +++++++++++---------- include/linux/mfd/arizona/pdata.h | 3 ++- include/linux/regulator/arizona-micsupp.h | 21 +++++++++++++++++++++ 4 files changed, 35 insertions(+), 11 deletions(-) commit 7e6425968bf742b9772aa5bae1250158c9312e31 Author: Richard Fitzgerald Date: Tue Apr 18 11:43:48 2017 +0100 regulator: arizona: Split KConfig options for LDO1 and MICSUPP regulators The CS47L24 Arizona codec and most Madera codecs do not have a LDO1 regulator. Split the LDO1 and MICSUPP regulators into separate KConfig options so the LDO1 is only built into the kernel if needed. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown drivers/regulator/Kconfig | 14 +++++++++++--- drivers/regulator/Makefile | 3 ++- 2 files changed, 13 insertions(+), 4 deletions(-) commit 9095bf25ea08135a5b74875dd0e3eeaddc4218a0 Merge: cdf4275 c1ae3cf Author: Mark Brown Date: Tue Apr 25 16:35:35 2017 +0100 Merge tag 'v4.11-rc1' into regulator-arizona Linux 4.11-rc1 commit e0ee84ded79623ac063a4e817367d61ab7650b6c Author: Jamal Hadi Salim Date: Sun Apr 23 13:17:28 2017 -0400 net sched actions: Complete the JUMPX opcode per discussion at netconf/netdev: When we have an action that is capable of branching (example a policer), we can achieve a continuation of the action graph by programming a "continue" where we find an exact replica of the same filter rule with a lower priority and the remainder of the action graph. When you have 100s of thousands of filters which require such a feature it gets very inefficient to do two lookups. This patch completes a leftover feature of action codes. Its time has come. Example below where a user labels packets with a different skbmark on ingress of a port depending on whether they have/not exceeded the configured rate. This mark is then used to make further decisions on some egress port. #rate control, very low so we can easily see the effect sudo $TC actions add action police rate 1kbit burst 90k \ conform-exceed pipe/jump 2 index 10 # skbedit index 11 will be used if the user conforms sudo $TC actions add action skbedit mark 11 ok index 11 # skbedit index 12 will be used if the user does not conform sudo $TC actions add action skbedit mark 12 ok index 12 #lets bind the user .. sudo $TC filter add dev $ETH parent ffff: protocol ip prio 8 u32 \ match ip dst 127.0.0.8/32 flowid 1:10 \ action police index 10 \ action skbedit index 11 \ action skbedit index 12 #run a ping -f and see what happens.. # jhs@foobar:~$ sudo $TC -s filter ls dev $ETH parent ffff: protocol ip filter pref 8 u32 filter pref 8 u32 fh 800: ht divisor 1 filter pref 8 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:10 (rule hit 2800 success 1005) match 7f000008/ffffffff at 16 (success 1005 ) action order 1: police 0xa rate 1Kbit burst 23440b mtu 2Kb action pipe/jump 2 overhead 0b ref 2 bind 1 installed 207 sec used 122 sec Action statistics: Sent 84420 bytes 1005 pkt (dropped 0, overlimits 721 requeues 0) backlog 0b 0p requeues 0 action order 2: skbedit mark 11 pass index 11 ref 2 bind 1 installed 204 sec used 122 sec Action statistics: Sent 60564 bytes 721 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 action order 3: skbedit mark 12 pass index 12 ref 2 bind 1 installed 201 sec used 122 sec Action statistics: Sent 23856 bytes 284 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 Not bad, about 28% non-conforming packets.. Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/act_api.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit b3230e80a6d115d2eb50fe3f4794ad04d84766de Author: Trond Myklebust Date: Tue Apr 25 10:56:19 2017 -0400 pNFS: Ensure we check layout segment validity in the pg_init() callback If we have a layout segment cached in pgio->pg_lseg, we should check it for validity before reusing it in a new RPC request. Otherwise, if we recoalesce, we can end up looping forever. Signed-off-by: Trond Myklebust fs/nfs/filelayout/filelayout.c | 2 ++ fs/nfs/flexfilelayout/flexfilelayout.c | 2 ++ fs/nfs/pnfs.c | 13 +++++++++++++ fs/nfs/pnfs.h | 1 + 4 files changed, 18 insertions(+) commit 45a6f3bca64ac8f462a275f351dcc3f032073d92 Merge: 3133822 b655f0e Author: David S. Miller Date: Tue Apr 25 10:52:47 2017 -0400 Merge tag 'linux-can-next-for-4.12-20170425' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2017-04-25 this is a pull request of 21 patches for net-next/master. There are 4 patches by Stephane Grosjean for the PEAK PCAN-PCIe FD CAN-FD boards. The next 7 patches are by Mario Huettel, which add support for M_CAN IP version >= v3.1.x to the m_can driver. A patch by Remigiusz Kołłątaj adds support for the Microchip CAN BUS Analyzer. 8 patches by Oliver Hartkopp complete the initial CAN network namespace support. Wei Yongjun's patch for the ti_hecc driver fixes the return value check in the probe function. ==================== Signed-off-by: David S. Miller commit 6db81643fe41f51cf9f6fd10558b8b323d9198ba Author: Arnaldo Carvalho de Melo Date: Tue Apr 25 11:45:59 2017 -0300 perf buildid: Move prototypes from util.h to build-id.h Where they belong. Link: http://lkml.kernel.org/n/tip-94m3dziejxgo7k0488q3mqjm@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/sdt.c | 1 - tools/perf/util/build-id.h | 4 ++++ tools/perf/util/util.h | 3 --- 3 files changed, 4 insertions(+), 4 deletions(-) commit 3133822f5ac13b04c2ca46f27cfe74606bbd4a6d Author: Florian Westphal Date: Thu Apr 20 18:08:15 2017 +0200 ipvlan: use pernet operations and restrict l3s hooks to master netns commit 4fbae7d83c98c30efc ("ipvlan: Introduce l3s mode") added registration of netfilter hooks via nf_register_hooks(). This API provides the illusion of 'global' netfilter hooks by placing the hooks in all current and future network namespaces. In case of ipvlan the hook appears to be only needed in the namespace that contains the ipvlan master device (i.e., usually init_net), so placing them in all namespaces is not needed. This switches ipvlan driver to pernet operations, and then only registers hooks in namespaces where a ipvlan master device is set to l3s mode. Extra care has to be taken when the master device is moved to another namespace, as we might have to 'move' the netfilter hooks too. This is done by storing the namespace the ipvlan port was created in. On REGISTER event, do (un)register operations in the old/new namespaces. This will also allow removal of the nf_register_hooks() in a future patch. Cc: Mahesh Bandewar Signed-off-by: Florian Westphal Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan.h | 2 + drivers/net/ipvlan/ipvlan_main.c | 83 ++++++++++++++++++++++++++++++++-------- 2 files changed, 70 insertions(+), 15 deletions(-) commit faa9a08397f5034efad75b06879ac0ead83bd714 Author: Mark Rutland Date: Tue Apr 25 12:08:50 2017 +0100 arm64: pmuv3: handle pmuv3+ Commit f1b36dcb5c316c27 ("arm64: pmuv3: handle !PMUv3 when probing") is a little too restrictive, and prevents the use of of backwards compatible PMUv3 extenstions, which have a PMUver value other than 1. For instance, ARMv8.1 PMU extensions (as implemented by ThunderX2) are reported with PMUver value 4. Per the usual ID register principles, at least 0x1-0x7 imply a PMUv3-compatible PMU. It's not currently clear whether 0x8-0xe imply the same. For the time being, treat the value as signed, and with 0x1-0x7 treated as meaning PMUv3 is implemented. This may be relaxed by future patches. Reported-by: Jayachandran C Tested-by: Jayachandran C Acked-by: Will Deacon Signed-off-by: Mark Rutland Signed-off-by: Catalin Marinas arch/arm64/kernel/perf_event.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 4ff33aafd32e084f5ee7faa54ba06e95f8b1b8af Author: Amir Goldstein Date: Tue Apr 25 14:29:35 2017 +0300 fanotify: don't expose EOPENSTALE to userspace When delivering an event to userspace for a file on an NFS share, if the file is deleted on server side before user reads the event, user will not get the event. If the event queue contained several events, the stale event is quietly dropped and read() returns to user with events read so far in the buffer. If the event queue contains a single stale event or if the stale event is a permission event, read() returns to user with the kernel internal error code 518 (EOPENSTALE), which is not a POSIX error code. Check the internal return value -EOPENSTALE in fanotify_read(), just the same as it is checked in path_openat() and drop the event in the cases that it is not already dropped. This is a reproducer from Marko Rauhamaa: Just take the example program listed under "man fanotify" ("fantest") and follow these steps: ============================================================== NFS Server NFS Client(1) NFS Client(2) ============================================================== # echo foo >/nfsshare/bar.txt # cat /nfsshare/bar.txt foo # ./fantest /nfsshare Press enter key to terminate. Listening for events. # rm -f /nfsshare/bar.txt # cat /nfsshare/bar.txt read: Unknown error 518 cat: /nfsshare/bar.txt: Operation not permitted ============================================================== where NFS Client (1) and (2) are two terminal sessions on a single NFS Client machine. Reported-by: Marko Rauhamaa Tested-by: Marko Rauhamaa Cc: Cc: Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fanotify/fanotify_user.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit e2ef147686751f1a08143bb7b3bda629cceb9369 Author: Sharon Dvir Date: Tue Feb 21 11:12:12 2017 +0200 iwlwifi: mvm: handle possible BIOS bug In iwl_mvm_sar_get_ewrd_table() In case of a BIOS bug, n_profiles might be 0 thus we need to return an error value. Found by Klocwork. Signed-off-by: Sharon Dvir Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 3287bb1088d5470b2057ad3fefb9f3dae586515f Author: Mordechai Goodstein Date: Sun Feb 12 12:20:52 2017 +0200 iwlwifi: mvm: scan: avoid "big" prints Delete the scanned channel results. No need in it we get it any way when logging. The print only clogs up the ftrace print buffer. Signed-off-by: Mordechai Goodstein Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 31 ++++----------------------- 1 file changed, 4 insertions(+), 27 deletions(-) commit 6323f474902e372623d73486c1ad30eb40d6604f Author: Peng Fan Date: Fri Apr 21 17:03:36 2017 +0800 iommu/arm-smmu: Correct sid to mask From code "SMR mask 0x%x out of range for SMMU", so, we need to use mask, not sid. Signed-off-by: Peng Fan Cc: Will Deacon Cc: Robin Murphy Acked-by: Will Deacon Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d2ee0a60b8bd9bef2a0082c533736d6a7b39873 Author: Kamal Dasu Date: Fri Mar 3 16:16:53 2017 -0500 mtd: nand: brcmnand: Check flash #WP pin status before nand erase/program On brcmnand controller v6.x and v7.x, the #WP pin is controlled through the NAND_WP bit in CS_SELECT register. The driver currently assumes that toggling the #WP pin is instantaneously enabling/disabling write-protection, but it actually takes some time to propagate the new state to the internal NAND chip logic. This behavior is sometime causing data corruptions when an erase/program operation is executed before write-protection has really been disabled. Fixes: 27c5b17cd1b1 ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller") Signed-off-by: Kamal Dasu Signed-off-by: Boris Brezillon drivers/mtd/nand/brcmnand/brcmnand.c | 61 ++++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 3 deletions(-) commit 65a2c1caa70f71690dcb5afd8fc6afe67fcde599 Author: Sekhar Nori Date: Thu Mar 30 20:09:30 2017 +0530 mtd: nand: davinci: add comment on NAND subpage write status on keystone Add a comment clarifying that NAND subpage write on keystone works, but is not being enabled in the interest of backward compatibility. Signed-off-by: Sekhar Nori Signed-off-by: Boris Brezillon drivers/mtd/nand/davinci_nand.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 2d283ede59869159f4bb84ae689258c5caffce54 Author: Roger Quadros Date: Thu Mar 30 10:37:50 2017 +0300 mtd: nand: omap2: Fix partition creation via cmdline mtdparts commit c9711ec5250b ("mtd: nand: omap: Clean up device tree support") caused the parent device name to be changed from "omap2-nand.0" to ".nand" (e.g. 30000000.nand on omap3 platforms). This caused mtd->name to be changed as well. This breaks partition creation via mtdparts passed by u-boot as it uses "omap2-nand.0" for the mtd-id. Fix this by explicitly setting the mtd->name to "omap2-nand." if it isn't already set by nand_set_flash_node(). CS number is the NAND controller instance ID. Fixes: c9711ec5250b ("mtd: nand: omap: Clean up device tree support") Cc: # 4.7+ Reported-by: Leto Enrico Reported-by: Adam Ford Suggested-by: Boris Brezillon Tested-by: Adam Ford Signed-off-by: Roger Quadros Signed-off-by: Boris Brezillon drivers/mtd/nand/omap2.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 038e8ad6eb720d0b362183f1c30470c1e0797e39 Author: Christophe Jaillet Date: Tue Apr 11 07:22:52 2017 +0200 mtd: nand: NULL terminate a of_device_id table of_device_id tables should be NULL terminated. Fixes: 07b23e3db9ed ("mtd: nand: Cleanup/rework the atmel_nand driver") Signed-off-by: Christophe JAILLET Signed-off-by: Boris Brezillon drivers/mtd/nand/atmel/nand-controller.c | 1 + 1 file changed, 1 insertion(+) commit 70106ddaf31150a57dc00b3d7d5167f693b521ef Author: Dan Carpenter Date: Tue Apr 4 11:15:46 2017 +0300 mtd: nand: Fix a couple error codes We accidentally return 1 on error instead of proper error codes. Fixes: 07b23e3db9ed ("mtd: nand: Cleanup/rework the atmel_nand driver") Signed-off-by: Dan Carpenter Signed-off-by: Boris Brezillon drivers/mtd/nand/atmel/nand-controller.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 477544c62a84d3bacd9f90ba75ffc16c04d78071 Author: Masahiro Yamada Date: Thu Mar 30 17:15:05 2017 +0900 mtd: nand: allow drivers to request minimum alignment for passed buffer In some cases, nand_do_{read,write}_ops is passed with unaligned ops->datbuf. Drivers using DMA will be unhappy about unaligned buffer. The new struct member, buf_align, represents the minimum alignment the driver require for the buffer. If the buffer passed from the upper MTD layer does not have enough alignment, nand_do_*_ops will use bufpoi. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 10 ++++++++-- include/linux/mtd/nand.h | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) commit 3deb9979c7319bc7846d1aac528a9db85162960a Author: Masahiro Yamada Date: Thu Mar 30 17:15:04 2017 +0900 mtd: nand: allocate aligned buffers if NAND_OWN_BUFFERS is unset Some NAND controllers are using DMA engine requiring a specific buffer alignment. The core provides no guarantee on the nand_buffers pointers, which forces some drivers to allocate their own buffers and pass the NAND_OWN_BUFFERS flag. Rework the nand_buffers allocation logic to allocate each buffer independently. This should make most NAND controllers/DMA engine happy, and allow us to get rid of these custom buf allocation in NAND controller drivers. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) commit e7beeeec854c40c28caa53bd84fdf26e9e459f06 Author: Masahiro Yamada Date: Thu Mar 30 15:45:57 2017 +0900 mtd: nand: denali: allow to override revision number Commit 271707b1d817 ("mtd: nand: denali: max_banks calculation changed in revision 5.1") added a revision check to support the new max_banks encoding. Its git-log states "The encoding of max_banks changed in Denali revision 5.1". There are exceptional cases, for example, the revision register on some UniPhier SoCs says the IP is 5.0 but the max_banks is encoded in the new format. This IP updates the resister specification from time to time (often breaking the backward compatibility), but the revision number is not incremented correctly. The max_banks is not only the case that needs revision checking. Let's allow to override an incorrect revision number. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 23 +++++++++++++---------- drivers/mtd/nand/denali.h | 3 +-- drivers/mtd/nand/denali_dt.c | 5 ++++- 3 files changed, 18 insertions(+), 13 deletions(-) commit 3f5c35819fc37d5f35680a55327c940b6e8fad41 Author: Masahiro Yamada Date: Thu Mar 30 15:45:56 2017 +0900 mtd: nand: denali_dt: use pdev instead of ofdev for platform_device "pdev" is much more often used to point a platform_device, so this will help the driver code look consistent across the kernel. While we are here, fix "line over 80 characters" coding style violations. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali_dt.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit 60d920d32ca40660e382cf9ccbc236599a49e607 Author: Masahiro Yamada Date: Thu Mar 30 15:45:55 2017 +0900 mtd: nand: denali_dt: remove dma-mask DT property The driver sets appropriate DMA mask. Delete the "dma-mask" DT property. See [1] for negative comments for this binding. [1] https://lkml.org/lkml/2016/2/8/57 Signed-off-by: Masahiro Yamada Acked-by: Rob Herring Signed-off-by: Boris Brezillon Documentation/devicetree/bindings/mtd/denali-nand.txt | 2 -- drivers/mtd/nand/denali_dt.c | 9 --------- 2 files changed, 11 deletions(-) commit 210a2c876fe02c9440569c9282af43e7a85562e3 Author: Masahiro Yamada Date: Thu Mar 30 15:45:54 2017 +0900 mtd: nand: denali: support 64bit capable DMA engine The current driver only supports the DMA engine up to 32 bit physical address, but there also exists 64 bit capable DMA engine for this IP. The data DMA setup sequence is completely different, so I added the 64 bit DMA code as a new function denali_setup_dma64(). The 32 bit one has been renamed to denali_setup_dma32(). Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 39 +++++++++++++++++++++++++++++++++++---- drivers/mtd/nand/denali.h | 1 + 2 files changed, 36 insertions(+), 4 deletions(-) commit a56609c4c3f34de76d905e39160511b3c53310ac Author: Masahiro Yamada Date: Thu Mar 30 15:45:53 2017 +0900 mtd: nand: denali_dt: enable HW_ECC_FIXUP for Altera SOCFPGA variant There are various customizable parameters, so several variants for this IP. A generic compatible like "denali,denali-nand-dt" is useless. Moreover, there are multiple things wrong with this string. (Refer to Rob's comment [1]) The "denali,denali-nand-dt" was added by Altera for the SOCFPGA port. Replace it with a more specific string "altr,socfpga-denali-nand". There are no users (in upstream) of the old compatible string. The Denali IP on SOCFPGA incorporates the hardware ECC fixup engine. So, this capability should be associated with the compatible. [1] https://lkml.org/lkml/2016/12/1/450 Signed-off-by: Masahiro Yamada Acked-by: Rob Herring Signed-off-by: Boris Brezillon Documentation/devicetree/bindings/mtd/denali-nand.txt | 5 +++-- drivers/mtd/nand/denali_dt.c | 14 ++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) commit 24715c749b2ff5545f0316e7ad8b65026f9e9612 Author: Masahiro Yamada Date: Thu Mar 30 15:45:52 2017 +0900 mtd: nand: denali: support HW_ECC_FIXUP capability Some old versions of the Denali IP (perhaps used only for Intel?) detects ECC errors and provides correct data via a register, but does not touch the transferred data. So, the software must fixup the data in the buffer according to the provided ECC correction information. Newer versions perform ECC correction before transferring the data. No more software intervention is needed. The ECC_ERROR_ADDRESS and ECC_CORRECTION_INFO registers were deprecated. Instead, the number of corrected bit-flips are reported via the ECC_COR_INFO register. When an uncorrectable ECC error happens, a status flag is set to the INTR_STATUS and ECC_COR_INFO registers. As is often the case with this IP, the register view of INTR_STATUS had broken compatibility. For older versions (SW ECC fixup): bit 0: ECC_TRANSACTION_DONE bit 1: ECC_ERR For newer versions (HW ECC fixup): bit 0: ECC_UNCOR_ERR bit 1: Reserved Due to this difference, the irq_mask must be fixed too. The existing handle_ecc() has been renamed to denali_sw_ecc_fixup() for clarification. What is unfortunate with this feature is we can not know the total number of corrected/uncorrected errors in a page. The register ECC_COR_INFO reports the maximum of per-sector bitflips. This is useful for ->read_page return value, but ecc_stats.{corrected,failed} increments may not be precise. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 52 ++++++++++++++++++++++++++++++++++++++++------- drivers/mtd/nand/denali.h | 14 +++++++++++-- 2 files changed, 57 insertions(+), 9 deletions(-) commit d29109be2e8d4a102d8304d7b8bb0d6dfe5e1d27 Author: Masahiro Yamada Date: Thu Mar 30 15:45:51 2017 +0900 mtd: nand: denali: fix erased page checking This part is wrong in multiple ways: [1] is_erased() is called against "buf" twice, so the OOB area is not checked at all. The second call should check chip->oob_poi. [2] This code block is nested by double "if (check_erase_page)". The inner one is redundant. [3] The ECC_ERROR_ADDRESS register reports which sector(s) had uncorrectable ECC errors. It is pointless to check the whole page if only one sector contains errors. [4] Unfortunately, the Denali ECC correction engine has already manipulated the data buffer before it decides the bitflips are uncorrectable. That is, not all of the data are 0xFF after an erased page is processed by the ECC engine. The current is_erased() helper could report false-positive ECC errors. Actually, a certain mount of bitflips are allowed in an erased page. The core framework provides nand_check_erased_ecc_chunk() that takes the threshold into account. Let's use this. This commit reworks the code to solve those problems. Please note the erased page checking is implemented as a separate helper function instead of embedding it in the loop in handle_ecc(). The reason is that OOB data are needed for the erased page checking, but the controller can not start a new transaction until all ECC error information is read out from the registers. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 77 ++++++++++++++++++++++++++++++----------------- 1 file changed, 50 insertions(+), 27 deletions(-) commit 20d48595f8857c9b7e0d31d9734ebe18d63faea1 Author: Masahiro Yamada Date: Thu Mar 30 15:45:50 2017 +0900 mtd: nand: denali: fix bitflips calculation in handle_ecc() This function is wrong in multiple ways: [1] Counting corrected bytes instead of corrected bits. The following code is counting the number of corrected _bytes_. /* correct the ECC error */ buf[offset] ^= err_cor_value; mtd->ecc_stats.corrected++; bitflips++; What the core framework expects is the number of corrected _bits_. They can be different if multiple bitflips occur within one byte. [2] total number of errors instead of max of per-sector errors The core framework expects that corrected errors are counted per sector, then the max value should be taken. The current code simply iterates over the whole page, i.e. counts the total number of correction in the page. This means "too many bitflips" is triggered earlier than it should be, i.e. the NAND device is worn out sooner. Besides those bugs, this function is unreadable due to the deep nesting. Notice the whole code in this function is wrapped in if (irq_status & INTR__ECC_ERR), so this conditional can be moved out of the function. Also, use shorter names for local variables. Re-work the function to fix all the issues. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 141 +++++++++++++++++++++++----------------------- 1 file changed, 71 insertions(+), 70 deletions(-) commit 8927ad394b0653329184863e3d44958f67705e84 Author: Masahiro Yamada Date: Thu Mar 30 15:45:49 2017 +0900 mtd: nand: denali: remove meaningless pipeline read-ahead operation The pipeline read-ahead function of the Denali IP enables continuous reading from the device; while data is being read out by a CPU, the controller maintains additional commands for streaming data from the device. This will reduce the latency of the second page or later. This feature is obviously no help for per-page accessors of Linux NAND driver interface. In the current implementation, the pipeline command is issued to load a single page, then data are read out immediately. The use of the pipeline operation is not adding any advantage, but just adding complexity to the code. Remove. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 42 +++--------------------------------------- 1 file changed, 3 insertions(+), 39 deletions(-) commit 8aabdf376f2baafbaaceeee1f3f7f7dca70f8e0b Author: Masahiro Yamada Date: Thu Mar 30 15:45:48 2017 +0900 mtd: nand: denali: allow to override mtd->name from label DT property Commit 28309572aac4 ("mtd: name the mtd device with an optional label property") allow us to identify a chip in a user-friendly way. If nand_set_flash_node() picks up the "label" from DT, let's respect it. Otherwise, let it fallback to the current name "denali-nand". Signed-off-by: Masahiro Yamada Suggested-by: Boris Brezillon Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 07604686e808cd93d352172806a7828860f048f5 Author: Masahiro Yamada Date: Thu Mar 30 15:45:47 2017 +0900 mtd: nand: relax ecc.read_page() return value for uncorrectable ECC The comment for ecc.read_page() requires that it should return "0 if bitflips uncorrectable". Actually, drivers could return positive values when uncorrectable bitflips occur. For example, nand_read_page_swecc() is the case. If ecc.correct() returns -EBADMSG for the first ECC sector, and a positive value for the second one, nand_read_page_swecc() returns a positive max_bitflips and increments ecc_stats.failed for the same page. The requirement can be relaxed by tweaking nand_do_read_ops(). Move the max_bitflips calculation below the retry. Signed-off-by: Masahiro Yamada Suggested-by: Boris Brezillon Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 3 +-- include/linux/mtd/nand.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit f107d7a43923a83d837b3ea3c7b7de58cd014bbd Author: Boris Brezillon Date: Thu Mar 16 09:02:42 2017 +0100 mtd: nand: Remove unused chip->write_page() hook The last/only user of the chip->write_page() hook (the Atmel NAND controller driver) has been reworked and is no longer specifying a custom ->write_page() implementation. Drop this hook before someone else start abusing it. Signed-off-by: Boris Brezillon Reviewed-by: Masahiro Yamada drivers/mtd/nand/nand_base.c | 12 +++++------- include/linux/mtd/nand.h | 4 ---- 2 files changed, 5 insertions(+), 11 deletions(-) commit 82d0bf3417bd4a8f98b54da72d80c19d3d227800 Author: Boris Brezillon Date: Thu Mar 16 09:02:41 2017 +0100 mtd: nand: atmel: Document the new DT bindings The old NAND bindings were not exactly describing the hardware topology and were preventing definitions of several NAND chips under the same NAND controller. New bindings address these limitations and should be preferred over the old ones for new SoCs/boards. Old bindings are still supported for backward compatibility but are marked deprecated in the doc. Signed-off-by: Boris Brezillon Reviewed-by: Nicolas Ferre Acked-by: Rob Herring .../devicetree/bindings/mtd/atmel-nand.txt | 107 ++++++++++++++++++++- 1 file changed, 106 insertions(+), 1 deletion(-) commit f88fc122cc34c2545dec9562eaab121494e401ef Author: Boris Brezillon Date: Thu Mar 16 09:02:40 2017 +0100 mtd: nand: Cleanup/rework the atmel_nand driver This is a complete rewrite of the driver whose main purpose is to support the new DT representation where the NAND controller node is now really visible in the DT and appears under the EBI bus. With this new representation, we can add other devices under the EBI bus without risking pinmuxing conflicts (the NAND controller is under the EBI bus logic and as such, share some of its pins with other devices connected on this bus). Even though the goal of this rework was not necessarily to add new features, the new driver has been designed with this in mind. With a clearer separation between the different blocks and different IP revisions, adding new functionalities should be easier (we already have plans to support SMC timing configuration so that we no longer have to rely on the configuration done by the bootloader/bootstrap). Also note that we no longer have a custom ->cmdfunc() implementation, which means we can now benefit from new features added in the core implementation for free (support for new NAND operations for example). The last thing that we gain with this rework is support for multi-chips and multi-dies chips, thanks to the clean NAND controller <-> NAND devices representation. During this transition we also dropped support for AVR32 SoCs which should soon disappear from mainline (removal of the AVR32 arch is planned for 4.12). This new driver has been tested on several platforms (at91sam9261, at91sam9g45, at91sam9x5, sama5d3 and sama5d4) to make sure it did not introduce regressions, and it's worth mentioning that old bindings are still supported (which partly explain the positive diffstat). Signed-off-by: Boris Brezillon Acked-by: Nicolas Ferre MAINTAINERS | 2 +- drivers/mtd/nand/Kconfig | 6 +- drivers/mtd/nand/Makefile | 2 +- drivers/mtd/nand/atmel/Makefile | 4 + drivers/mtd/nand/atmel/nand-controller.c | 2196 ++++++++++++++++++++++++++ drivers/mtd/nand/atmel/pmecc.c | 1020 ++++++++++++ drivers/mtd/nand/atmel/pmecc.h | 73 + drivers/mtd/nand/atmel_nand.c | 2479 ------------------------------ drivers/mtd/nand/atmel_nand_ecc.h | 163 -- drivers/mtd/nand/atmel_nand_nfc.h | 103 -- 10 files changed, 3298 insertions(+), 2750 deletions(-) commit e3df1e4b51e5e54637355db7d732fedf271530e7 Author: Sharon Dvir Date: Tue Feb 21 10:41:31 2017 +0200 iwlwifi: mvm: check if returned value is NULL While freeing inactive queue, check mvmsta to be valid before dereferencing it. Found by Klocwork. Signed-off-by: Sharon Dvir Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 2 ++ 1 file changed, 2 insertions(+) commit 8d9e29972836b75eb74f533594999500a4c7cc19 Author: Maarten Maathuis Date: Mon Apr 24 23:35:21 2017 +0200 platform/x86: intel-vbtn: add volume up and down Tested on HP Elite X2 1012 G1. Matches event report of Lenovo Helix 2 (https://www.spinics.net/lists/ibm-acpi-devel/msg03982.html). Signed-off-by: Maarten Maathuis [andy: fixed indentation of comments and massaged title of the change] Signed-off-by: Andy Shevchenko drivers/platform/x86/intel-vbtn.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8c5f47b15c5c1537c000e3a4c92c82c5bbf521a4 Author: Johannes Berg Date: Mon Feb 20 17:47:04 2017 +0100 iwlwifi: mvm: make iwl_run_unified_mvm_ucode() static There's no need to have iwl_run_unified_mvm_ucode() be exposed to other parts of the code since the logic to pick it over the normal code in iwl_run_init_mvm_ucode() can just be done in that function itself. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 155 ++++++++++++++------------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 - drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 5 +- 3 files changed, 80 insertions(+), 81 deletions(-) commit 77e409455f4171e24e95774cc80419f68b07af2f Author: Sara Sharon Date: Wed Jan 11 11:58:38 2017 +0200 iwlwifi: mvm: support new rate flags Rates were changed to adapt to HE. Change is backward compatible. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-rs.h | 28 +++++++++++++++++----- drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 11 ++++----- drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 4 ++-- 4 files changed, 31 insertions(+), 16 deletions(-) commit 9b11c7912d00d0e5fe0d7f8973b77dac4f69d3df Author: Martin Schwidefsky Date: Mon Apr 24 18:14:48 2017 +0200 s390/mm: simplify arch_get_unmapped_area[_topdown] With TASK_SIZE now reflecting the maximum size of the address space for a process the code for arch_get_unmapped_area[_topdown] can be simplified. Just let the logic pick a suitable address and deal with the page table upgrade after the address has been selected. Signed-off-by: Martin Schwidefsky arch/s390/mm/mmap.c | 89 +++++++++++++++++++---------------------------------- 1 file changed, 32 insertions(+), 57 deletions(-) commit 3622d3e77ecef090b5111e3c5423313f11711dfa Author: Mauro Carvalho Chehab Date: Wed Apr 19 09:58:22 2017 -0300 [media] ov2640: print error if devm_*_optional*() fails devm_gpiod_get_optional() can return -ENOSYS if GPIOLIB is disabled, causing probe to fail. Warn the user if this happens. Acked-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit 9dd2ab609eef736d5639e0de1bcc2e71e714b28e Author: Dave Johnson Date: Mon Apr 24 09:11:24 2017 -0400 netfilter: Wrong icmp6 checksum for ICMPV6_TIME_EXCEED in reverse SNATv6 path When recalculating the outer ICMPv6 checksum for a reverse path NATv6 such as ICMPV6_TIME_EXCEED nf_nat_icmpv6_reply_translation() was accessing data beyond the headlen of the skb for non-linear skb. This resulted in incorrect ICMPv6 checksum as garbage data was used. Patch replaces csum_partial() with skb_checksum() which supports non-linear skbs similar to nf_nat_icmp_reply_translation() from ipv4. Signed-off-by: Dave Johnson Signed-off-by: Pablo Neira Ayuso net/ipv6/netfilter/nf_nat_l3proto_ipv6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 277a292835c196894ef895d5e1fd6170bb916f55 Author: Liping Zhang Date: Sun Apr 23 18:29:30 2017 +0800 netfilter: nft_dynset: continue to next expr if _OP_ADD succeeded Currently, after adding the following nft rules: # nft add set x target1 { type ipv4_addr \; flags timeout \;} # nft add rule x y set add ip daddr timeout 1d @target1 counter the counters will always be zero despite of the elements are added to the dynamic set "target1" or not, as we will break the nft expr traversal unconditionally: # nft list ruleset ... set target1 { ... elements = { 8.8.8.8 expires 23h59m53s} } chain output { ... set add ip daddr timeout 1d @target1 counter packets 0 bytes 0 ^ ^ ... } Since we add the elements to the set successfully, we should continue to the next expression. Additionally, if elements are added to "flow table" successfully, we will _always_ continue to the next expr, even if the operation is _OP_ADD. So it's better to keep them to be consistent. Fixes: 22fe54d5fefc ("netfilter: nf_tables: add support for dynamic set updates") Reported-by: Robert White Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_dynset.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cf3cb246e277d98987aa8d62ef2730dbee2f5fa7 Author: Linus Lüssing Date: Wed Apr 19 21:47:33 2017 +0200 bridge: ebtables: fix reception of frames DNAT-ed to bridge device/port When trying to redirect bridged frames to the bridge device itself or a bridge port (brouting) via the dnat target then this currently fails: The ethernet destination of the frame is dnat'ed to the MAC address of the bridge device or port just fine. However, the IP code drops it in the beginning of ip_input.c/ip_rcv() as the dnat target left the skb->pkt_type as PACKET_OTHERHOST. Fixing this by resetting skb->pkt_type to an appropriate type after dnat'ing. Signed-off-by: Linus Lüssing Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebt_dnat.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit e739c5bb20bebb74028d9262255dc1e470b60fcf Author: Olimpiu Dejeu Date: Tue Mar 21 12:58:48 2017 -0400 backlight: Add support for Arctic Sand LED backlight driver chips This driver provides support for the Arctic Sand arc2c0608 chip, and provides a framework to support future devices. Signed-off-by: Olimpiu Dejeu Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones drivers/video/backlight/Kconfig | 7 + drivers/video/backlight/Makefile | 1 + drivers/video/backlight/arcxcnn_bl.c | 419 +++++++++++++++++++++++++++++++++++ 3 files changed, 427 insertions(+) commit ce9d22573d85341c987f997461ac712e4dbe47b1 Author: Olimpiu Dejeu Date: Tue Mar 21 12:58:47 2017 -0400 dt-bindings: backlight: arcxcnn: Supply bindings for Arctic Sand backlight Signed-off-by: Olimpiu Dejeu Acked-by: Rob Herring Acked-by: Daniel Thompson Signed-off-by: Lee Jones .../bindings/leds/backlight/arcxcnn_bl.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit b655f0e96d4061eac42dea2dccd37a3348d1f3f3 Author: Wei Yongjun Date: Tue Apr 25 06:44:05 2017 +0000 can: ti_hecc: fix return value check in ti_hecc_probe() In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: dabf54dd1c63 ("can: ti_hecc: Convert TI HECC driver to DT only driver") Signed-off-by: Wei Yongjun Signed-off-by: Marc Kleine-Budde drivers/net/can/ti_hecc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e6e267b08fb5fe02311b54498a2545b7aad9f1bb Author: Wei Yongjun Date: Tue Apr 25 06:34:46 2017 +0000 mmc: sdhci-xenon: Remove redundant dev_err call in get_dt_pad_ctrl_data() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-xenon-phy.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 5e64ebc1c242523b491b5b5e5eba59243bb970cb Author: Oliver Hartkopp Date: Tue Apr 25 08:19:45 2017 +0200 can: enable module auto loading for virtual CAN interfaces Autoload the vcan module when a vcan instance is to be created by 'ip link add type vcan' Signed-off-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde drivers/net/can/vcan.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a8f820a380a2a06fc4fe1a54159067958f800929 Author: Oliver Hartkopp Date: Tue Apr 25 08:19:44 2017 +0200 can: add Virtual CAN Tunnel driver (vxcan) Similar to the virtual ethernet driver veth, vxcan implements a local CAN traffic tunnel between two virtual CAN network devices. See Kconfig entry for details. Signed-off-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde drivers/net/can/Kconfig | 18 +++ drivers/net/can/Makefile | 1 + drivers/net/can/vxcan.c | 316 +++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/can/vxcan.h | 12 ++ 4 files changed, 347 insertions(+) commit 1ef83310b81551079af992c4cbb5e089dd1397be Author: Oliver Hartkopp Date: Tue Apr 25 08:19:43 2017 +0200 can: network namespace support for CAN gateway The CAN gateway was not implemented as per-net in the initial network namespace support by Mario Kicherer (8e8cda6d737d). This patch enables the CAN gateway to be used in different namespaces. Signed-off-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde include/net/netns/can.h | 3 +++ net/can/gw.c | 72 ++++++++++++++++++++++++++++++------------------- 2 files changed, 47 insertions(+), 28 deletions(-) commit 384317ef4187f59a1cb7a6163444d757340b3bb4 Author: Oliver Hartkopp Date: Tue Apr 25 08:19:42 2017 +0200 can: network namespace support for CAN_BCM protocol The CAN_BCM protocol and its procfs entries were not implemented as per-net in the initial network namespace support by Mario Kicherer (8e8cda6d737d). This patch adds the missing per-net functionality for the CAN BCM. Signed-off-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde include/net/netns/can.h | 1 + net/can/bcm.c | 90 +++++++++++++++++++++++++++++++------------------ 2 files changed, 58 insertions(+), 33 deletions(-) commit cb5635a3677679666e4e81ecbb209d32f13dedcd Author: Oliver Hartkopp Date: Tue Apr 25 08:19:41 2017 +0200 can: complete initial namespace support The statistics and its proc output was not implemented as per-net in the initial network namespace support by Mario Kicherer (8e8cda6d737d). This patch adds the missing per-net statistics for the CAN subsystem. Signed-off-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde include/linux/can/core.h | 4 +- include/net/netns/can.h | 5 ++ net/can/af_can.c | 71 +++++++++++++----------- net/can/af_can.h | 5 -- net/can/proc.c | 141 +++++++++++++++++++++++++---------------------- 5 files changed, 121 insertions(+), 105 deletions(-) commit f2e72f43e7686720ddc5112fab2f5f71f47dc5e6 Author: Oliver Hartkopp Date: Tue Apr 25 08:19:40 2017 +0200 can: remove obsolete definitions can_rx_alldev_list is a per-net data structure now. Remove it's definition here and can_rx_dev_list too. Signed-off-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde net/can/af_can.h | 4 ---- 1 file changed, 4 deletions(-) commit 48452c169d5ddfdbff4af556016dd9e1f47d762b Author: Oliver Hartkopp Date: Tue Apr 25 08:19:39 2017 +0200 can: remove obsolete pernet_operations definitions The namespace support for the CAN subsystem does not need any additional memory. So when ".size = 0" there's no extra memory allocated by the system. And therefore ".id" is obsolete too. Signed-off-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde net/can/af_can.c | 4 ---- 1 file changed, 4 deletions(-) commit a7bbd28f04ce4df26f07e96c4a743d529da99348 Author: Oliver Hartkopp Date: Tue Apr 25 08:19:38 2017 +0200 can: fix memory leak in initial namespace support The can_rx_alldev_list is a per-net data structure now and allocated in can_pernet_init(). Make sure the memory is free'd in can_pernet_exit() too. Signed-off-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde net/can/af_can.c | 2 ++ 1 file changed, 2 insertions(+) commit 51f3baad7de943780ce0c17bd7975df567dd6e14 Author: Remigiusz Kołłątaj Date: Fri Apr 14 20:32:28 2017 +0200 can: mcba_usb: Add support for Microchip CAN BUS Analyzer SocketCAN driver for Microchip CAN BUS Analyzer (http://www.microchip.com/development-tools/) Changes in v4: - possible memory leak fixed in mcba_usb_write_bulk_callback - LED support added - failure handling in mcba_usb_probe improved - C99 initializers for structs on stack Changes in v3: - improved/simplified CAN ID conversion - functions for transmission of skb and cmd separated - fixed/improved netif_stop_queue handling - style/cosmetic corrections Changes in v2: - Termination handling reimplemented to fit new netlink API (IFLA_CAN_TERMINATION) - Bitrate handling reimplemented to fit new netlink API (IFLA_CAN_BITRATE) - CAN ID conversion refactored (changed from macro to inline functions) - CAN DLC handling using get_can_dlc() - Endianness handling for can_speed introduced - Debugging removed - Redundant error prints removed - Style/cosmetic corrections (i.e. macro names, redefs, inits etc.) Signed-off-by: Remigiusz Kołłątaj Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/Kconfig | 6 + drivers/net/can/usb/Makefile | 1 + drivers/net/can/usb/mcba_usb.c | 904 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 911 insertions(+) commit 10c1c3975a6663375b38e67949722ba029201395 Author: Mario Huettel Date: Sat Apr 8 14:10:15 2017 +0200 can: m_can: Enable TX FIFO Handling for M_CAN IP version >= v3.1.x * Added defines for TX Event FIFO Element * Adapted ndo_start_xmit function. For versions >= v3.1.x it uses the TX FIFO to optimize the data throughput. It stores the echo skb at the same index as in the M_CAN's TX FIFO. The frame's message marker is set to this index. This message marker is received in the TX Event FIFO after the message was successfully transmitted. It is used to echo the correct echo skb back to the network stack. * Added m_can_echo_tx_event function. It reads all received message markers in the TX Event FIFO and loops back the corresponding echo skbs. * ISR checks for new TX Event Entry interrupt for version >= 3.1.x. Signed-off-by: Mario Huettel Reviewed-by: Oliver Hartkopp Tested-by: Quentin Schulz Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 188 +++++++++++++++++++++++++++++++++++------- 1 file changed, 159 insertions(+), 29 deletions(-) commit 428479e4714ce786629a009c66b4340a3ba651ce Author: Mario Huettel Date: Sat Apr 8 14:10:14 2017 +0200 can: m_can: Configuration for TX and TX event FIFOs * TX/TX Event FIFO sizes are configured for version >= v3.1.x Signed-off-by: Mario Huettel Tested-by: Quentin Schulz Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) commit b03cfc5bb0e11f88988e5da2805867e468d03ca1 Author: Mario Huettel Date: Sat Apr 8 14:10:13 2017 +0200 can: m_can: Enable M_CAN version dependent initialization This patch adapts the initialization of the M_CAN. So it can be used with all versions >= 3.0.x. Changes: * Added version element to m_can_priv structure to hold M_CAN version. * Renamed bittiming structs for version 3.0.x * Added new bittiming structs for version >= 3.1.x * Function alloc_m_can_dev takes 2 new arguments. The TX FIFO size and the base address of the module. * Chip configuration for CAN_CTRLMODE_LOOPBACK is changed: Enabled CCCR_MON bit. In combination with TEST_LBCK it activates the internal loopback mode. Leaving CCCR_MON '0' results in external loopback mode. * Clocks are temporarily enabled by platform_propbe function in order to allow read access to the Core Release register and the Control Register. Registers are used to detect M_CAN version and optional Non-ISO Feature. Initialization of M_CAN for version >= 3.1.x: * TX FIFO of M_CAN is used to transmit frames. The driver does not need to stop the tx queue after each frame sent. * Initialization of TX Event FIFO is added. * NON-ISO is fixed for all M_CAN versions < 3.2.x. Version 3.2.x _can_ have the NISO (Non-ISO) bit which can switch the mode of the M_CAN to Non-ISO mode. This bit does not have to be writeable. Therefore it is checked. If it is writable Non-ISO support is added to the controllers supported CAN modes. New Functions: * Function to check the Core Release version. The read value determines the behaviour of the driver. * Function to check if the NISO bit for version >= 3.2.x is implemented. Signed-off-by: Mario Huettel Reviewed-by: Oliver Hartkopp Tested-by: Quentin Schulz Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 340 +++++++++++++++++++++++++++++++++--------- 1 file changed, 269 insertions(+), 71 deletions(-) commit 5e1bd15a3767b2962595698e849ab59936ce6c33 Author: Mario Huettel Date: Sat Apr 8 14:10:12 2017 +0200 can: m_can: Updated register defines to newest version * Updated register defines to newest M_CAN version (v3.2.1). * Changed defines in the whole code. Signed-off-by: Mario Huettel Reviewed-by: Oliver Hartkopp Tested-by: Quentin Schulz Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 190 +++++++++++++++++++++++++++--------------- 1 file changed, 125 insertions(+), 65 deletions(-) commit ee8c3f6f75671c9172133636aebabf14dbc80066 Author: Mario Huettel Date: Sat Apr 8 14:10:11 2017 +0200 can: m_can: Removed virtual address from print The virtual address of the device was printed. I removed it because it leaks internal information. Signed-off-by: Mario Huettel Tested-by: Quentin Schulz Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8f265895df44148135ee545f406de76d669dbfd9 Author: Mario Huettel Date: Sat Apr 8 14:10:10 2017 +0200 can: m_can: Removed initialization of FIFO water marks FIFO water marks disabled because the driver doesn't handle water mark events. Signed-off-by: Mario Huettel Reviewed-by: Oliver Hartkopp Tested-by: Quentin Schulz Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 52973810b54bb569fa3baf14d0ff9bfa3e0f68f9 Author: Mario Huettel Date: Sat Apr 8 14:10:09 2017 +0200 can: m_can: Disabled Interrupt Line 1 * Disabled interrupt line 1. The driver didn't use it. Signed-off-by: Mario Huettel Tested-by: Quentin Schulz Signed-off-by: Marc Kleine-Budde drivers/net/can/m_can/m_can.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8ac8321e4a7981312348413b9ec314fd93d71a0c Author: Stephane Grosjean Date: Thu Jan 19 16:31:07 2017 +0100 can: peak: add support for PEAK PCAN-PCIe FD CAN-FD boards This patch adds the support of the PCAN-PCI Express FD boards made by PEAK-System, for computers using the PCI Express slot. The PCAN-PCI Express FD has one or two CAN FD channels, depending on the model. A galvanic isolation of the CAN ports protects the electronics of the card and the respective computer against disturbances of up to 500 Volts. The PCAN-PCI Express FD can be operated with ambient temperatures in a range of -40 to +85 °C. Such boards run an extented version of the CAN-FD IP running into USB CAN-FD interfaces from PEAK-System, so this patch adds several new commands and their corresponding data types to the PEAK CAN-FD common definitions header file too. Signed-off-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde drivers/net/can/Kconfig | 1 + drivers/net/can/Makefile | 1 + drivers/net/can/peak_canfd/Kconfig | 13 + drivers/net/can/peak_canfd/Makefile | 5 + drivers/net/can/peak_canfd/peak_canfd.c | 801 ++++++++++++++++++++++++ drivers/net/can/peak_canfd/peak_canfd_user.h | 55 ++ drivers/net/can/peak_canfd/peak_pciefd_main.c | 842 ++++++++++++++++++++++++++ include/linux/can/dev/peak_canfd.h | 65 ++ 8 files changed, 1783 insertions(+) commit c3df7c5755ee1a53cd56a4efcf3426334ab9eea4 Author: Stephane Grosjean Date: Thu Jan 19 16:31:06 2017 +0100 can: peak: move header file to new can common subdir The CAN-FD IP from PEAK-System runs into several kinds of PC CAN-FD interfaces. Up to now, only the USB CAN-FD adapters were supported by the Kernel. In order to prepare the adding of some new non-USB CAN-FD interfaces, this patch moves - and rename - the IP definitions file from its private (usb) sub-directory into a - newly created - CAN specific one. Signed-off-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/peak_usb/pcan_ucan.h | 243 ----------------------------- drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 2 +- include/linux/can/dev/peak_canfd.h | 243 +++++++++++++++++++++++++++++ 3 files changed, 244 insertions(+), 244 deletions(-) commit 113ab88b2b689b431904e1d753e20390529ed204 Author: Stephane Grosjean Date: Thu Jan 19 16:31:05 2017 +0100 can: peak: fix usage of const qualifier in pointers args Fixes the usage of the const qualifier in the memory pointer arguments of the declared inline functions. By changing the line containing "const", this patch also changes the name of the arg into a more usual one. Signed-off-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/peak_usb/pcan_ucan.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 81c5e13d90db1eb1bf326e5b1f6293a0d85e966d Author: Stephane Grosjean Date: Thu Jan 19 16:31:04 2017 +0100 can: peak: fix usage of usb specific data type This patch fixes the wrong usage of a specific USB data type into a common header file. This common header file is intended to define the common data types and values that define access to the PEAK-System CAN-FD IP, whatever the PC interface is. Signed-off-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/peak_usb/pcan_ucan.h | 5 ++--- drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 23 ++++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) commit dfc28b110d4f42953147204bc627b3c64205ed19 Author: Wei Yongjun Date: Tue Apr 25 03:14:09 2017 +0000 mmc: cavium: Use module_pci_driver to simplify the code Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun Acked-by: Jan Glauber Signed-off-by: Ulf Hansson drivers/mmc/host/cavium-thunderx.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit ee71d16d22bb268c1f6a64ef6d3654ace5f1e8c7 Author: Martin Schwidefsky Date: Thu Apr 20 14:43:51 2017 +0200 s390/mm: make TASK_SIZE independent from the number of page table levels The TASK_SIZE for a process should be maximum possible size of the address space, 2GB for a 31-bit process and 8PB for a 64-bit process. The number of page table levels required for a given memory layout is a consequence of the mapped memory areas and their location. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/mman.h | 4 ---- arch/s390/include/asm/processor.h | 9 +++++---- arch/s390/kvm/kvm-s390.c | 4 ++-- arch/s390/mm/gmap.c | 2 +- arch/s390/mm/gup.c | 2 +- arch/s390/mm/mmap.c | 31 ++++++++++++------------------- arch/s390/mm/pgalloc.c | 2 -- 7 files changed, 21 insertions(+), 33 deletions(-) commit 543b334d145e59d4379ccdde312bc30c470b1087 Author: Jean Delvare Date: Mon Apr 24 22:07:10 2017 -0600 virtio_blk: Fix English description of VIRTIO_BLK_SCSI Signed-off-by: Jean Delvare Fixes: 97b50a654d5d ("virtio_blk: make SCSI passthrough support configurable") Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/block/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c35e30b4727b390ce7a6dd7ead31335320c2b83e Author: Andy Lutomirski Date: Fri Apr 21 16:19:24 2017 -0700 nvme: Add nvme_core.force_apst to ignore the NO_APST quirk We're probably going to be stuck quirking APST off on an over-broad range of devices for 4.11. Let's make it easy to override the quirk for testing. Signed-off-by: Andy Lutomirski Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit fb0dc3993b537e12ce63511d535ff86efff13c8f Author: Andy Lutomirski Date: Fri Apr 21 16:19:23 2017 -0700 nvme: Display raw APST configuration via DYNAMIC_DEBUG Debugging APST is currently a bit of a pain. This gives optional simple log messages that describe the APST state. The easiest way to use this is probably with the nvme_core.dyndbg=+p module parameter. Signed-off-by: Andy Lutomirski Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 76e4ad09a30cfb589eb436ad067f4abecb82cc04 Author: Andy Lutomirski Date: Fri Apr 21 16:19:22 2017 -0700 nvme: Fix APST comment There was a typo in the description of the timeout heuristic. Signed-off-by: Andy Lutomirski Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9fd363a6cbfae24ffaa00ac6fd3ce8e271acaf1 Merge: a44f53f 8f9cedc Author: Jens Axboe Date: Mon Apr 24 22:03:14 2017 -0600 Merge branch 'master' into for-4.12/post-merge commit 86a5df1495cce7ed7357af0a3e1f439867ed1c64 Merge: 14933dc bdb12e0 Author: David S. Miller Date: Mon Apr 24 23:55:20 2017 -0400 Merge branch 'virtio-net-tx-napi' Willem de Bruijn says: ==================== virtio-net tx napi Add napi for virtio-net transmit completion processing. Changes: v2 -> v3: - convert __netif_tx_trylock to __netif_tx_lock on tx napi poll ensure that the handler always cleans, to avoid deadlock - unconditionally clean in start_xmit avoid adding an unnecessary "if (use_napi)" branch - remove virtqueue_disable_cb in patch 5/5 a noop in the common event_idx based loop - document affinity_hint_set constraint v1 -> v2: - disable by default - disable unless affinity_hint_set because cache misses add up to a third higher cycle cost, e.g., in TCP_RR tests. This is not limited to the patch that enables tx completion cleaning in rx napi. - use trylock to avoid contention between tx and rx napi - keep interrupts masked during xmit_more (new patch 5/5) this improves cycles especially for multi UDP_STREAM, which does not benefit from cleaning tx completions on rx napi. - move free_old_xmit_skbs (new patch 3/5) to avoid forward declaration not changed: - deduplicate virnet_poll_tx and virtnet_poll_txclean they look similar, but have differ too much to make it worthwhile. - delay netif_wake_subqueue for more than 2 + MAX_SKB_FRAGS evaluated, but made no difference - patch 1/5 RFC -> v1: - dropped vhost interrupt moderation patch: not needed and likely expensive at light load - remove tx napi weight - always clean all tx completions - use boolean to toggle tx-napi, instead - only clean tx in rx if tx-napi is enabled - then clean tx before rx - fix: add missing braces in virtnet_freeze_down - testing: add 4KB TCP_RR + UDP test results Based on previous patchsets by Jason Wang: [RFC V7 PATCH 0/7] enable tx interrupts for virtio-net http://lkml.iu.edu/hypermail/linux/kernel/1505.3/00245.html Before commit b0c39dbdc204 ("virtio_net: don't free buffers in xmit ring") the virtio-net driver would free transmitted packets on transmission of new packets in ndo_start_xmit and, to catch the edge case when no new packet is sent, also in a timer at 10HZ. A timer can cause long stalls. VIRTIO_F_NOTIFY_ON_EMPTY avoids stalls due to low free descriptor count. It does not address a stalls due to low socket SO_SNDBUF. Increasing timer frequency decreases that stall time, but increases interrupt rate and, thus, cycle count. Currently, with no timer, packets are freed only at ndo_start_xmit. Latency of consume_skb is now unbounded. To avoid a deadlock if a sock reaches SO_SNDBUF, packets are orphaned on tx. This breaks TCP small queues. Reenable TCP small queues by removing the orphan. Instead of using a timer, convert the driver to regular tx napi. This does not have the unresolved stall issue and does not have any frequency to tune. By keeping interrupts enabled by default, napi increases tx interrupt rate. VIRTIO_F_EVENT_IDX avoids sending an interrupt if one is already unacknowledged, so makes this more feasible today. Combine that with an optimization that brings interrupt rate back in line with the existing version for most workloads: Tx completion cleaning on rx interrupts elides most explicit tx interrupts by relying on the fact that many rx interrupts fire. Tested by running {1, 10, 100} {TCP, UDP} STREAM, RR, 4K_RR benchmarks from a guest to a server on the host, on an x86_64 Haswell. The guest runs 4 vCPUs pinned to 4 cores. vhost and the test server are pinned to a core each. All results are the median of 5 runs, with variance well < 10%. Used neper (github.com/google/neper) as test process. Napi increases single stream throughput, but increases cycle cost. The optimizations bring this down. The previous patchset saw a regression with UDP_STREAM, which does not benefit from cleaning tx interrupts in rx napi. This regression is now gone for 10x, 100x. Remaining difference is higher 1x TCP_STREAM, lower 1x UDP_STREAM. The latest results are with process, rx napi and tx napi affine to the same core. All numbers are lower than the previous patchset. upstream napi TCP_STREAM: 1x: Mbps 27816 39805 Gcycles 274 285 10x: Mbps 42947 42531 Gcycles 300 296 100x: Mbps 31830 28042 Gcycles 279 269 TCP_RR Latency (us): 1x: p50 21 21 p99 27 27 Gcycles 180 167 10x: p50 40 39 p99 52 52 Gcycles 214 211 100x: p50 281 241 p99 411 337 Gcycles 218 226 TCP_RR 4K: 1x: p50 28 29 p99 34 36 Gcycles 177 167 10x: p50 70 71 p99 85 134 Gcycles 213 214 100x: p50 442 611 p99 802 785 Gcycles 237 216 UDP_STREAM: 1x: Mbps 29468 26800 Gcycles 284 293 10x: Mbps 29891 29978 Gcycles 285 312 100x: Mbps 30269 30304 Gcycles 318 316 UDP_RR: 1x: p50 19 19 p99 23 23 Gcycles 180 173 10x: p50 35 40 p99 54 64 Gcycles 245 237 100x: p50 234 286 p99 484 473 Gcycles 224 214 Note that GSO is enabled, so 4K RR still translates to one packet per request. Lower throughput at 100x vs 10x can be (at least in part) explained by looking at bytes per packet sent (nstat). It likely also explains the lower throughput of 1x for some variants. upstream: N=1 bytes/pkt=16581 N=10 bytes/pkt=61513 N=100 bytes/pkt=51558 at_rx: N=1 bytes/pkt=65204 N=10 bytes/pkt=65148 N=100 bytes/pkt=56840 ==================== Acked-by: Michael S. Tsirkin commit bdb12e0d2ffc84a0248788cdf6cfbff86ee34602 Author: Willem de Bruijn Date: Mon Apr 24 13:49:30 2017 -0400 virtio-net: keep tx interrupts disabled unless kick Tx napi mode increases the rate of transmit interrupts. Suppress some by masking interrupts while more packets are expected. The interrupts will be reenabled before the last packet is sent. This optimization reduces the througput drop with tx napi for unidirectional flows such as UDP_STREAM that do not benefit from cleaning tx completions in the the receive napi handler. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller drivers/net/virtio_net.c | 3 +++ 1 file changed, 3 insertions(+) commit 7b0411ef4aa69c9256d6a2c289d0a2b320414633 Author: Willem de Bruijn Date: Mon Apr 24 13:49:29 2017 -0400 virtio-net: clean tx descriptors from rx napi Amortize the cost of virtual interrupts by doing both rx and tx work on reception of a receive interrupt if tx napi is enabled. With VIRTIO_F_EVENT_IDX, this suppresses most explicit tx completion interrupts for bidirectional workloads. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller drivers/net/virtio_net.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit ea7735d97ba9064c448664429e249991ccd8aa77 Author: Willem de Bruijn Date: Mon Apr 24 13:49:28 2017 -0400 virtio-net: move free_old_xmit_skbs An upcoming patch will call free_old_xmit_skbs indirectly from virtnet_poll. Move the function above this to avoid having to introduce a forward declaration. This is a pure move: no code changes. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller drivers/net/virtio_net.c | 60 ++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) commit b92f1e6751a6aaaf0b1e05128661ce0f23ed3695 Author: Willem de Bruijn Date: Mon Apr 24 13:49:27 2017 -0400 virtio-net: transmit napi Convert virtio-net to a standard napi tx completion path. This enables better TCP pacing using TCP small queues and increases single stream throughput. The virtio-net driver currently cleans tx descriptors on transmission of new packets in ndo_start_xmit. Latency depends on new traffic, so is unbounded. To avoid deadlock when a socket reaches its snd limit, packets are orphaned on tranmission. This breaks socket backpressure, including TSQ. Napi increases the number of interrupts generated compared to the current model, which keeps interrupts disabled as long as the ring has enough free descriptors. Keep tx napi optional and disabled for now. Follow-on patches will reduce the interrupt cost. Signed-off-by: Willem de Bruijn Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 76 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 67 insertions(+), 9 deletions(-) commit e4e8452a4ab304913c4b4242ba06bc4624f14a84 Author: Willem de Bruijn Date: Mon Apr 24 13:49:26 2017 -0400 virtio-net: napi helper functions Prepare virtio-net for tx napi by converting existing napi code to use helper functions. This also deduplicates some logic. Signed-off-by: Willem de Bruijn Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 65 ++++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 30 deletions(-) commit 14933dc8d9964e46f1d5bd2a4dfe3d3be8e420e0 Author: David S. Miller Date: Mon Apr 24 19:42:34 2017 -0700 sparc64: Improve 64-bit constant loading in eBPF JIT. Doing a full 64-bit decomposition is really stupid especially for simple values like 0 and -1. But if we are going to optimize this, go all the way and try for all 2 and 3 instruction sequences not requiring a temporary register as well. First we do the easy cases where it's a zero or sign extended 32-bit number (sethi+or, sethi+xor, respectively). Then we try to find a range of set bits we can load simply then shift up into place, in various ways. Then we try negating the constant and see if we can do a simple sequence using that with a xor at the end. (f.e. the range of set bits can't be loaded simply, but for the negated value it can) The final optimized strategy involves 4 instructions sequences not needing a temporary register. Otherwise we sadly fully decompose using a temp.. Example, from ALU64_XOR_K: 0x0000ffffffff0000 ^ 0x0 = 0x0000ffffffff0000: 0000000000000000 : 0: 9d e3 bf 50 save %sp, -176, %sp 4: 01 00 00 00 nop 8: 90 10 00 18 mov %i0, %o0 c: 13 3f ff ff sethi %hi(0xfffffc00), %o1 10: 92 12 63 ff or %o1, 0x3ff, %o1 ! ffffffff 14: 93 2a 70 10 sllx %o1, 0x10, %o1 18: 15 3f ff ff sethi %hi(0xfffffc00), %o2 1c: 94 12 a3 ff or %o2, 0x3ff, %o2 ! ffffffff 20: 95 2a b0 10 sllx %o2, 0x10, %o2 24: 92 1a 60 00 xor %o1, 0, %o1 28: 12 e2 40 8a cxbe %o1, %o2, 38 2c: 9a 10 20 02 mov 2, %o5 30: 10 60 00 03 b,pn %xcc, 3c 34: 01 00 00 00 nop 38: 9a 10 20 01 mov 1, %o5 ! 1 3c: 81 c7 e0 08 ret 40: 91 eb 40 00 restore %o5, %g0, %o0 Signed-off-by: David S. Miller arch/sparc/net/bpf_jit_comp_64.c | 249 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 245 insertions(+), 4 deletions(-) commit 58771c1cb0023fdd744e76d6cad7716dc4f579ee Author: Salvatore Benedetto Date: Mon Apr 24 13:13:20 2017 +0100 Bluetooth: convert smp and selftest to crypto kpp API * Convert both smp and selftest to crypto kpp API * Remove module ecc as no more required * Add ecdh_helper functions for wrapping kpp async calls This patch has been tested *only* with selftest, which is called on module loading. Signed-off-by: Salvatore Benedetto Signed-off-by: Marcel Holtmann net/bluetooth/Kconfig | 1 + net/bluetooth/Makefile | 2 +- net/bluetooth/ecc.c | 816 -------------------------------------------- net/bluetooth/ecc.h | 54 --- net/bluetooth/ecdh_helper.c | 223 ++++++++++++ net/bluetooth/ecdh_helper.h | 27 ++ net/bluetooth/selftest.c | 6 +- net/bluetooth/smp.c | 8 +- 8 files changed, 259 insertions(+), 878 deletions(-) commit ac4691fac8ad9bbb72268b6e4c73a168e670a196 Author: Al Viro Date: Tue Mar 28 01:28:09 2017 -0400 hexagon: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/hexagon/Kconfig | 1 + arch/hexagon/include/asm/uaccess.h | 23 ++++++++++------------- arch/hexagon/kernel/hexagon_ksyms.c | 4 ++-- arch/hexagon/mm/copy_from_user.S | 2 +- arch/hexagon/mm/copy_to_user.S | 2 +- 5 files changed, 15 insertions(+), 17 deletions(-) commit aea415b1d10ea25779a100da639b3e3989080971 Author: Marcos Paulo de Souza Date: Mon Apr 24 16:19:49 2017 -0700 Input: add uinput documentation Add description of uinput module with a few examples. Signed-off-by: Marcos Paulo de Souza Signed-off-by: Dmitry Torokhov Documentation/input/input_uapi.rst | 1 + Documentation/input/uinput.rst | 245 +++++++++++++++++++++++++++++++++++++ 2 files changed, 246 insertions(+) commit 433db3e260bc8134d4a46ddf20b3668937e12556 Author: Vinícius Tinti Date: Mon Apr 24 13:04:58 2017 -0700 kbuild: Add support to generate LLVM assembly files Add rules to kbuild in order to generate LLVM assembly files with the .ll extension when using clang. # from c code make CC=clang kernel/pid.ll Signed-off-by: Vinícius Tinti Signed-off-by: Behan Webster Signed-off-by: Matthias Kaehlcke Signed-off-by: Masahiro Yamada .gitignore | 1 + Makefile | 5 +++++ scripts/Makefile.build | 8 ++++++++ 3 files changed, 14 insertions(+) commit 9eb3c95896a337256489124857157f49616d2c6b Author: Andrew Donnellan Date: Mon Apr 24 14:07:41 2017 +0300 builddeb: fix typo Signed-off-by: Andrew Donnellan Signed-off-by: Riku Voipio Signed-off-by: Masahiro Yamada scripts/package/builddeb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d349923857d7b4e1892d48b7c4e00ebaf635df9 Author: Riku Voipio Date: Mon Apr 24 14:07:40 2017 +0300 builddeb: Update a few outdated and hardcoded strings The builddeb script has some hardcoded references to Linux version 2.6 which is ancient. Drop Provides as the virtual packages provided are not useful anymore. Leave the Provides for linux-kernel-headers, as someone might still be referring to it. While at it, updated copyright date and drop Standards-Version: since the package isn't Debian Standards compliant anyways. Cc: Timo Sigurdsson Signed-off-by: Riku Voipio Signed-off-by: Masahiro Yamada scripts/package/builddeb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit bc042fdfbb92b5b13421316b4548e2d6e98eed37 Author: Dan Williams Date: Mon Apr 24 15:43:05 2017 -0700 libnvdimm, region: fix flush hint detection crash In the case where a dimm does not have any associated flush hints the ndrd->flush_wpq array may be uninitialized leading to crashes with the following signature: BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 IP: region_visible+0x10f/0x160 [libnvdimm] Call Trace: internal_create_group+0xbe/0x2f0 sysfs_create_groups+0x40/0x80 device_add+0x2d8/0x650 nd_async_device_register+0x12/0x40 [libnvdimm] async_run_entry_fn+0x39/0x170 process_one_work+0x212/0x6c0 ? process_one_work+0x197/0x6c0 worker_thread+0x4e/0x4a0 kthread+0x10c/0x140 ? process_one_work+0x6c0/0x6c0 ? kthread_create_on_node+0x60/0x60 ret_from_fork+0x31/0x40 Cc: Reviewed-by: Jeff Moyer Fixes: f284a4f23752 ("libnvdimm: introduce nvdimm_flush() and nvdimm_has_flush()") Signed-off-by: Dan Williams drivers/nvdimm/region_devs.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 6eadc61224666dcc79763dc21749b5f809d82140 Author: Damien Le Moal Date: Mon Apr 24 16:51:10 2017 +0900 scsi: sd: Improve sd_completed_bytes Re-shuffle the code to be more efficient by not initializing variables upfront (i.e. do it only when necessary). Also replace the do_div calls with calls to sectors_to_logical(). No functional change is introduced by this patch. [mkp: bytes_to_logical()] Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 51 +++++++++++++++++++++++++++------------------------ drivers/scsi/sd.h | 5 +++++ 2 files changed, 32 insertions(+), 24 deletions(-) commit e3a724edeec3836ed44675a6587a6db7b6b68dbe Author: David S. Miller Date: Mon Apr 24 15:56:21 2017 -0700 sparc64: Support cbcond instructions in eBPF JIT. cbcond combines a compare with a branch into a single instruction. The limitations are: 1) Only newer chips support it 2) For immediate compares we are limited to 5-bit signed immediate values 3) The branch displacement is limited to 10-bit signed 4) We cannot use it for JSET Also, cbcond (unlike all other sparc control transfers) lacks a delay slot. Currently we don't have a useful instruction we can push into the delay slot of normal branches. So using cbcond pretty much always increases code density, and is therefore a win. Signed-off-by: David S. Miller arch/sparc/net/bpf_jit_comp_64.c | 238 ++++++++++++++++++++++++++++++--------- 1 file changed, 184 insertions(+), 54 deletions(-) commit 7529fbb0080d67bc45a3cdad91574cdd0f8a31cf Author: Damien Le Moal Date: Mon Apr 24 16:51:09 2017 +0900 scsi: sd: Fix function descriptions Fix argument names and description of function documentation comments. No functional change is introduced by this patch. [mkp: verbify] Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit b1391a5bf83a593bbe92d1f9bddaf563be5c7c9d Author: Sinan Kaya Date: Fri Apr 7 15:06:18 2017 -0400 scsi: mpt3sas: remove redundant wmb Due to relaxed ordering requirements on multiple architectures, drivers are required to use wmb/rmb/mb combinations when they need to guarantee observability between the memory and the HW. The mpt3sas driver is already using wmb() for this purpose. However, it issues a writel following wmb(). writel() function on arm/arm64 arhictectures have an embedded wmb() call inside. This results in unnecessary performance loss and code duplication. writel already guarantees ordering for both cpu and bus. we don't need additional wmb() Signed-off-by: Sinan Kaya Acked-by: Sreekanth Reddy Reviewed-by: Brian King Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 2 -- 1 file changed, 2 deletions(-) commit cfd2aff711aa9de301258d322a0b5a3c64010220 Author: Hannes Reinecke Date: Mon Apr 24 11:22:32 2017 +0200 scsi: mpt: Move scsi_remove_host() out of mptscsih_remove_host() Commit c5ce0abeb628 ("scsi: sas: move scsi_remove_host call...") moved the call to scsi_remove_host() into sas_remove_host(), but forgot to modify the mpt drivers. Fixes: c5ce0abeb628 ("scsi: sas: move scsi_remove_host call into sas_remove_host") Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/message/fusion/mptfc.c | 7 ++++++- drivers/message/fusion/mptscsih.c | 2 -- drivers/message/fusion/mptspi.c | 10 +++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) commit e791ce27c3f6a1d3c746fd6a8f8e36c9540ec6f9 Author: Hannes Reinecke Date: Mon Apr 24 10:26:36 2017 +0200 scsi: sg: reset 'res_in_use' after unlinking reserved array Once the reserved page array is unused we can reset the 'res_in_use' state; here we can do a lazy update without holding the mutex as we only need to check against concurrent access, not concurrent release. [mkp: checkpatch] Fixes: 1bc0eb044615 ("scsi: sg: protect accesses to 'reserved' page array") Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 2 ++ 1 file changed, 2 insertions(+) commit 4bd13a077172a1a509115993ebe2082f327f1609 Author: Alexey Khoroshilov Date: Mon Apr 24 02:01:00 2017 +0300 scsi: mvumi: remove code handling zero scsi_sg_count(scmd) case As Christoph Hellwig noted, SCSI commands that transfer data always have a SG entry. The patch removes dead code in mvumi_make_sgl(), mvumi_complete_cmd() and mvumi_timed_out() that handle zero scsi_sg_count(scmd) case. Also the patch adds pci_unmap_sg() on failure path in mvumi_make_sgl(). Signed-off-by: Alexey Khoroshilov Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/mvumi.c | 85 ++++++++++++++++------------------------------------ 1 file changed, 26 insertions(+), 59 deletions(-) commit 6b8accea1b03da5f03e6dcd589f7024c4f4ee445 Author: Colin Ian King Date: Sat Apr 22 14:02:02 2017 +0100 scsi: fusion: fix spelling mistake: "Persistancy" -> "Persistency" trivial fix to spelling mistake Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/message/fusion/mptbase.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edb88cef0570914375d461107759cf0d6d677ed5 Author: Arnd Bergmann Date: Sat Apr 22 00:02:31 2017 +0200 scsi: pmcraid: use normal copy_from_user As pointed out by Al Viro for my previous series, the driver has no need to call access_ok() and __copy_from_user()/__copy_to_user(). Changing it to regular copy_from_user()/copy_to_user() simplifies the code without any real downsides, making it less error-prone at best. This patch by itself also addresses the warning about the access_ok() macro on MIPS, but both fixes improve the code, so ideally we apply them both. Signed-off-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/pmcraid.c | 40 +++++++--------------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) commit 144b139c96200c51248b8701a1ef4a6bebd3dc8c Author: Arnd Bergmann Date: Thu Apr 20 19:54:48 2017 +0200 scsi: pmcraid: fix minor sparse warnings pmcraid_minor is only used in this one file and should be 'static' as suggested by sparse: drivers/scsi/pmcraid.c:80:1: warning: symbol 'pmcraid_minor' was not declared. Should it be static? In Linux coding style, a literal '0' integer should not be used to represent a NULL pointer: drivers/scsi/pmcraid.c:348:29: warning: Using plain integer as NULL pointer drivers/scsi/pmcraid.c:4824:49: warning: Using plain integer as NULL pointer Signed-off-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/pmcraid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 45c80be614b094459f2c699353080e4f8059f610 Author: Arnd Bergmann Date: Thu Apr 20 19:54:47 2017 +0200 scsi: pmcraid: fix endianess sparse annotations The use of le32_to_cpu() etc in this driver looks completely arbitrary. It may have made sense at some point, but it is not applied consistently, so this driver presumably won't work on big-endian kernel builds. Unfortunately it's unclear whether the type names or the calls to le32_to_cpu() are the correct ones. I'm taking educated guesses here and assume that most of the __le32 and __le16 annotations are correct, adding the conversion helpers whereever we access those fields. The exceptions are the 'fw_version' field that is always accessed as big-endian, so I'm changing the type here, and the 'hrrq' values that are accessed as little-endian, so I'm changing those the other way. None of these changes should have any effect on little-endian architectures like x86, but it addresses the sparse warnings. Signed-off-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/pmcraid.c | 95 +++++++++++++++++++++++++------------------------- drivers/scsi/pmcraid.h | 8 ++--- 2 files changed, 51 insertions(+), 52 deletions(-) commit 3397623b370494fd7e0bca62b7578051482d058d Author: Arnd Bergmann Date: Thu Apr 20 19:54:45 2017 +0200 scsi: pmcraid: use __iomem pointers for ioctl argument kernelci.org reports a new compile warning for old code in the pmcraid driver: arch/mips/include/asm/uaccess.h:138:21: warning: passing argument 1 of '__access_ok' makes pointer from integer without a cast [-Wint-conversion] The warning got introduced by a cleanup to the access_ok() helper that requires the argument to be a pointer, where the old version silently accepts 'unsigned long' arguments as it still does on most other architectures. The new behavior in MIPS however seems absolutely sensible, and so far I could only find one other file with the same issue, so the best solution seems to be to clean up the pmcraid driver. This makes the driver consistently use 'void __iomem *' pointers for passing around the address of the user space ioctl arguments, which gets rid of the kernelci warning as well as several sparse warnings. Fixes: f0a955f4eeec ("mips: sanitize __access_ok()") Cc: Alexander Viro Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen drivers/scsi/pmcraid.c | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) commit 91402608641823fdfd8e18042f20c1a449108514 Author: Christoph Hellwig Date: Sun Apr 23 10:33:23 2017 +0200 scsi: pmcraid: fix lock imbalance in pmcraid_reset_reload() sparse found a bug that has always been present since the driver was merged: drivers/scsi/pmcraid.c:2353:12: warning: context imbalance in 'pmcraid_reset_reload' - different lock contexts for basic block Fix this by using a common unlock goto label, and also reduce the indentation level in the function. Signed-off-by: Christoph Hellwig Reported-by: Arnd Bergmann Signed-off-by: Martin K. Petersen drivers/scsi/pmcraid.c | 59 ++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 31 deletions(-) commit fd7647979a3948dae4fc6f25dbbdf9ba269bed78 Merge: e720c19 9d43f5e Author: Ingo Molnar Date: Mon Apr 24 23:31:35 2017 +0200 Merge tag 'perf-core-for-mingo-4.12-20170424' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: User visible changes: - Fix display of data source snoop indication in 'perf mem' (Andi Kleen) - Fix the code to strip command name from /proc/PID/stat (Jiri Olsa) Infrastructure changes: - Continue the disentanglement of headers, specially util.h (Arnaldo Carvalho de Melo) - Synchronize some header files with the kernel (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 8979b02aaf1d6de8d52cc143aa4da961ed32e5a2 Author: Stefan Berger Date: Mon Apr 17 21:58:26 2017 -0400 tpm: Fix reference count to main device The main device is currently not properly released due to one additional reference to the 'devs' device which is only released in case of a TPM 2. So, also get the additional reference only in case of a TPM2. Fixes: fdc915f7f719 ("tpm: expose spaces via a device link /dev/tpmrm") Signed-off-by: Stefan Berger Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-chip.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e6aef069b6e97790cb127d5eeb86ae9ff0b7b0e3 Author: Jerry Snitselaar Date: Mon Mar 27 08:46:04 2017 -0700 tpm_tis: convert to using locality callbacks This patch converts tpm_tis to use of the new tpm class ops request_locality, and relinquish_locality. With the move to using the callbacks, release_locality is changed so that we now release the locality even if there is no request pending. This required some changes to the tpm_tis_core_init code path to make sure locality is requested when needed: - tpm2_probe code path will end up calling request/release through callbacks, so request_locality prior to tpm2_probe not needed. - probe_itpm makes calls to tpm_tis_send_data which no longer calls request_locality, so add request_locality prior to tpm_tis_send_data calls. Also drop release_locality call in middleof probe_itpm, and keep locality until release_locality called at end of probe_itpm. Cc: Peter Huewe Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Cc: Marcel Selhorst Signed-off-by: Jerry Snitselaar Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis_core.c | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) commit fd5c78694f3f1c875e293de7a641ba8a3d60d00d Author: Petr Vandrovec Date: Wed Mar 29 00:43:30 2017 -0700 tpm: fix handling of the TPM 2.0 event logs When TPM2 log has entries with more than 3 digests, or with digests not listed in the log header, log gets misparsed, eventually leading to kernel complaint that code tried to vmalloc 512MB of memory (I have no idea what would happen on bigger system). So code should not parse only first 3 digests: both event header and event itself are already in memory, so we can parse any number of digests, as long as we do not try to parse whole memory when given count of 0xFFFFFFFF. So this change: * Rejects event entry with more digests than log header describes. Digest types should be unique, and all should be described in log header, so there cannot be more digests in the event than in the header. * Reject event entry with digest that is not described in the log header. In theory code could hardcode information about digest IDs already assigned by TCG, but if firmware authors cannot get event log format right, why should anyone believe that they got event log content right. Cc: stable@vger.kernel.org Fixes: 4d23cc323cdb ("tpm: add securityfs support for TPM 2.0 firmware event log") Signed-off-by: Petr Vandrovec Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm2_eventlog.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 3b395d67d9d6c20d142f6a1618c44577d3d79347 Author: Jarkko Sakkinen Date: Wed Apr 5 14:07:24 2017 +0300 tpm_crb: remove a cruft constant Remove a useless constant that slipped through me when I did the code review. This commit fixes the issue. Cc: Jiandi An Fixes: 69c558de63c7 ("tpm/tpm_crb: Enable TPM CRB interface for ARM64") Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 3 +-- include/acpi/actbl2.h | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) commit 7574f67eb457bbd053e5addae665c187f309668b Author: Santosh Shilimkar Date: Mon Apr 24 14:17:35 2017 -0700 soc: pm-domain: Fix the mangled urls Signed-off-by: Santosh Shilimkar drivers/soc/ti/ti_sci_pm_domains.c | 2 +- include/dt-bindings/genpd/k2g.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 17586188276980ff10d1244a35aeb31ae199705e Author: Naveen N. Rao Date: Sun Apr 23 22:53:43 2017 +0530 kallsyms: Use bounded strnchr() when parsing string When parsing for the format, we use strchr() to look for the separator, when we know that the module name can't be longer than MODULE_NAME_LEN. Enforce the same using strnchr(). Signed-off-by: Naveen N. Rao Reviewed-by: Masami Hiramatsu Signed-off-by: Jessica Yu kernel/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4e649b09f55595e6df6da5465a5b3cfc93557c1 Author: Stefan Assmann Date: Wed Apr 19 09:22:45 2017 +0200 PCI: Disable boot interrupt quirk for ASUS M2N-LR The ASUS M2N-LR should not trigger boot interrupt quirks although it carries an Intel 6702PXH. On this board the boot interrupt quirks cause incorrect IRQ assignments and should be disabled. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=43074 Tested-by: Solomon Peachy Signed-off-by: Stefan Assmann Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 0e43d1009d64afcc57bfb5155f1a36c395fac178 Merge: e390b55 dfc5be0 Author: David S. Miller Date: Mon Apr 24 16:20:20 2017 -0400 Merge branch 'bpf-misc-cleanups' Alexander Alemayhu says: ==================== Misc BPF cleanup while looking into making the Makefile in samples/bpf better handle O= I saw several warnings when running `make clean && make samples/bpf/`. This series reduces those warnings. ==================== Signed-off-by: David S. Miller commit dfc5be0dc0f83e70919a8ec59c122709a30f791e Author: Alexander Alemayhu Date: Mon Apr 24 15:31:08 2017 +0200 samples/bpf: check before defining offsetof Fixes the following warning samples/bpf/test_lru_dist.c:28:0: warning: "offsetof" redefined #define offsetof(TYPE, MEMBER) ((size_t)&((TYPE *)0)->MEMBER) In file included from ./tools/lib/bpf/bpf.h:25:0, from samples/bpf/libbpf.h:5, from samples/bpf/test_lru_dist.c:24: /usr/lib/gcc/x86_64-redhat-linux/6.3.1/include/stddef.h:417:0: note: this is the location of the previous definition #define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER) Signed-off-by: Alexander Alemayhu Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/test_lru_dist.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4784726f69ffa3e076d502a5885d753ccb24a82d Author: Alexander Alemayhu Date: Mon Apr 24 15:31:07 2017 +0200 samples/bpf: add static to function with no prototype Fixes the following warning samples/bpf/cookie_uid_helper_example.c: At top level: samples/bpf/cookie_uid_helper_example.c:276:6: warning: no previous prototype for ‘finish’ [-Wmissing-prototypes] void finish(int ret) ^~~~~~ HOSTLD samples/bpf/per_socket_stats_example Signed-off-by: Alexander Alemayhu Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/cookie_uid_helper_example.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69b6a7f743d3dac773f9a4c7b1786164ae329490 Author: Alexander Alemayhu Date: Mon Apr 24 15:31:06 2017 +0200 samples/bpf: add -Wno-unknown-warning-option to clang I was initially going to remove '-Wno-address-of-packed-member' because I thought it was not supposed to be there but Daniel suggested using '-Wno-unknown-warning-option'. This silences several warnings similiar to the one below warning: unknown warning option '-Wno-address-of-packed-member' [-Wunknown-warning-option] 1 warning generated. clang -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/6.3.1/include -I./arch/x86/include -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h \ -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \ -Wno-compare-distinct-pointer-types \ -Wno-gnu-variable-sized-type-not-at-end \ -Wno-address-of-packed-member -Wno-tautological-compare \ -O2 -emit-llvm -c samples/bpf/xdp_tx_iptunnel_kern.c -o -| llc -march=bpf -filetype=obj -o samples/bpf/xdp_tx_iptunnel_kern.o $ clang --version clang version 3.9.1 (tags/RELEASE_391/final) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/bin Signed-off-by: Alexander Alemayhu Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/Makefile | 1 + 1 file changed, 1 insertion(+) commit e390b55d5aefe2b51569068b2a505d19d72afbf1 Author: Daniel Borkmann Date: Mon Apr 24 22:14:35 2017 +0200 bpf: make bpf_xdp_adjust_head support mandatory Now that also the last in-tree user of the xdp_adjust_head bit has been removed, we can remove the flag from struct bpf_prog altogether. This, at the same time, also makes sure that any future driver for XDP comes with bpf_xdp_adjust_head() support right away. A rejection based on this flag would also mean that tail calls couldn't be used with such driver as per c2002f983767 ("bpf: fix checking xdp_adjust_head on tail calls") fix, thus lets not allow for it in the first place. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/filter.h | 3 +-- kernel/bpf/verifier.c | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) commit 4086d3f61b6573f65ddc13fc375c0c7b0ac482a0 Author: Hou Pengyang Date: Fri Apr 21 12:41:48 2017 +0000 f2fs: skip encrypted inode in ASYNC IPU policy Async request may be throttled in block layer, so page for async may keep WRITE_BACK for a long time. For encrytped inode, we need wait on page writeback no matter if the device supports BDI_CAP_STABLE_WRITES. This may result in a higher waiting page writeback time for async encrypted inode page. This patch skips IPU for encrypted inode's updating write. Signed-off-by: Hou Pengyang Signed-off-by: Jaegeuk Kim fs/f2fs/segment.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a788189305df9fa617e5e26dc0914d80d981cd57 Author: Jaegeuk Kim Date: Thu Apr 20 13:51:57 2017 -0700 f2fs: fix out-of free segments This patch also reverts d0db7703ac1 ("f2fs: do SSR in higher priority"). This patch fixes out of free segments caused by many small file creation by 1) mkfs -s 1 2G 2) mount 3) untar - preoduce 60000 small files burstly 4) sync - flush node pages - flush imeta Here, when we do f2fs_balance_fs, we missed # of imeta blocks, resulting in skipping to check has_not_enough_free_secs. Another test is done by 1) mkfs -s 12 2G 2) mount 3) untar - preoduce 60000 small files burstly 4) sync - flush node pages - flush imeta In this case, this patch also fixes wrong block allocation under large section size. Reported-by: William Brana Cc: Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 3 ++- fs/f2fs/inode.c | 3 ++- fs/f2fs/segment.c | 26 +++++++++++++++++++++----- 3 files changed, 25 insertions(+), 7 deletions(-) commit 29fa6c567855eb92d21122162029c5709892106b Author: Jaegeuk Kim Date: Wed Apr 19 17:36:38 2017 -0700 f2fs: add parentheses for macro variables more This patch adds parentheses for macro variables more in include/linux/f2fs_fs.h. Signed-off-by: Jaegeuk Kim include/linux/f2fs_fs.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d66450e77350d47ac865a56fec4a62dfcc7756ae Author: Arnd Bergmann Date: Wed Apr 19 19:38:33 2017 +0200 f2fs: improve definition of statistic macros With a recent addition of f2fs_lookup_extent_tree(), we get a warning about the use of empty macros: fs/f2fs/extent_cache.c: In function 'f2fs_lookup_extent_tree': fs/f2fs/extent_cache.c:358:32: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] stat_inc_rbtree_node_hit(sbi); A good way to avoid the warning and make the code more robust is to define all no-op macros as 'do { } while (0)'. Fixes: 54c2258cd63a ("f2fs: extract rb-tree operation infrastructure") Signed-off-by: Arnd Bergmann Reivewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 58 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) commit 91ec701a553cb3de470fd471c6fefe3ad1125455 Author: Pan Bian Date: Sun Apr 23 20:04:04 2017 +0800 qlcnic: fix unchecked return value Function pci_find_ext_capability() may return 0, which is an invalid address. In function qlcnic_sriov_virtid_fn(), its return value is used without validation. This may result in invalid memory access bugs. This patch fixes the bug. Signed-off-by: Pan Bian Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 2 ++ 1 file changed, 2 insertions(+) commit d579324998a39fa6e13edea2f06506840df9b729 Author: Jaegeuk Kim Date: Tue Apr 18 15:03:15 2017 -0700 f2fs: assign allocation hint for warm/cold data This patch gives slower device region to warm/cold data area more eagerly. Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 5 +++++ 1 file changed, 5 insertions(+) commit d07efb507779171bd670e8a12f283a3e245cde08 Author: Jaegeuk Kim Date: Tue Apr 18 13:47:25 2017 -0700 f2fs: fix _IOW usage This patch fixes wrong _IOW usage. Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e066b83c9b40f3a6951fb693ef0943fa1dfc40c2 Author: Jaegeuk Kim Date: Thu Apr 13 15:17:00 2017 -0700 f2fs: add ioctl to flush data from faster device to cold area This patch adds an ioctl to flush data in faster device to cold area. User can give device number and number of segments to move. It doesn't move it if there is only one device. The parameter looks like: struct f2fs_flush_device { u32 dev_num; /* device number to flush */ u32 segments; /* # of segments to flush */ }; Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 11 +++++++-- fs/f2fs/file.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- fs/f2fs/gc.c | 42 ++++++++++++++++++++++----------- fs/f2fs/segment.c | 14 +++++++---- fs/f2fs/segment.h | 7 +++++- 5 files changed, 120 insertions(+), 23 deletions(-) commit 2a39e7aa8a98f777f0732ca7125b6c9668791760 Author: Pan Bian Date: Sun Apr 23 17:38:35 2017 +0800 wan: pc300too: abort path on failure In function pc300_pci_init_one(), on the ioremap error path, function pc300_pci_remove_one() is called to free the allocated memory. However, the path is not terminated, and the freed memory will be used later, resulting in use-after-free bugs. This path fixes the bug. Signed-off-by: Pan Bian Signed-off-by: David S. Miller drivers/net/wan/pc300too.c | 1 + 1 file changed, 1 insertion(+) commit 78302fd405769c9a9379e9adda119d533dce2eed Author: Pan Bian Date: Sun Apr 23 15:09:19 2017 +0800 tipc: check return value of nlmsg_new Function nlmsg_new() will return a NULL pointer if there is no enough memory, and its return value should be checked before it is used. However, in function tipc_nl_node_get_monitor(), the validation of the return value of function nlmsg_new() is missed. This patch fixes the bug. Signed-off-by: Pan Bian Signed-off-by: David S. Miller net/tipc/node.c | 2 ++ 1 file changed, 2 insertions(+) commit a50fe0ffd76fbd17af36209a16caf0b8ad901fef Author: Pan Bian Date: Sun Apr 23 14:28:37 2017 +0800 lwtunnel: check return value of nla_nest_start Function nla_nest_start() may return a NULL pointer on error. However, in function lwtunnel_fill_encap(), the return value of nla_nest_start() is not validated before it is used. This patch checks the return value of nla_nest_start() against NULL. Signed-off-by: Pan Bian Signed-off-by: David S. Miller net/core/lwtunnel.c | 2 ++ 1 file changed, 2 insertions(+) commit 01d95843335c6d7bb7d100c0083165f489c6e50b Author: Steven J. Hill Date: Mon Apr 24 13:41:57 2017 -0500 mmc: cavium: Add MMC support for Octeon SOCs. Add platform driver for Octeon SOCs. Signed-off-by: Steven J. Hill Signed-off-by: David Daney Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 10 ++ drivers/mmc/host/Makefile | 2 + drivers/mmc/host/cavium-octeon.c | 351 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 363 insertions(+) commit dceb9781dcad8b9bdb88b9f7c06b2e47f5ad789e Author: Steven J. Hill Date: Mon Apr 24 13:41:56 2017 -0500 mmc: cavium: Fix detection of block or byte addressing. Use the mmc_card_is_blockaddr() function to properly detect if the card uses byte or block addressing. Signed-off-by: Steven J. Hill Acked-by: David Daney Signed-off-by: Ulf Hansson drivers/mmc/host/cavium.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33e6d74d65c358270f00d228877178964aab84b3 Author: Ulf Hansson Date: Mon Apr 24 13:41:55 2017 -0500 mmc: core: Export API to allow hosts to get the card address Some hosts controllers, like Cavium, needs to know whether the card operates in byte- or block-address mode. Therefore export a new API, mmc_card_is_blockaddr(), which provides this information. Signed-off-by: Ulf Hansson Signed-off-by: Steven J. Hill Acked-by: David Daney drivers/mmc/core/core.c | 6 ++++++ include/linux/mmc/card.h | 2 ++ 2 files changed, 8 insertions(+) commit f328c76e568d13c9fee21b5cf7411c96285f0f89 Author: jiajie.hao@mediatek.com Date: Sun Apr 23 17:38:27 2017 +0800 mmc: sdio: Fix sdio wait busy implement limitation The host may issue an I/O abort by writing to the CCCR at any time during I/O read operation via CMD52. And host may need suspend transcation during write busy stage in SDIO suspend/resume scenario. >From other side, a card may accept CMD52 during data transfer phase. Previous implement would block issuing above command in busy stage. It cause function driver can't implement as proper way and has no opportunity to do some coverage in error case via I/O abort etc. We need bypass some necessary operation during busy check stage. Signed-off-by: Jiajie Hao Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 4 +++- drivers/mmc/core/sdio_ops.h | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) commit d9370424c9482d0ca2722627309c6f6bae131d97 Author: Haibo Chen Date: Tue Apr 18 18:05:31 2017 +0800 mmc: sdhci-esdhc-imx: reset tuning circuit when power on mmc card USDHC tuning circuit should be reset before every time card enumeration or re-enumeration. SD3.0 card need tuning. For SDR104 card, when system suspend in standby mode, and then resume back, the IO timing is still SDR104(tuned) which may result in card re-enumeration fail in low card speed(400khz) for some cards. And we did meet the issue that in certain probability, SDR104 card meet mmc command CRC/Timeout error when send CMD2 during mmc bus resume. This patch reset the tuning circuit when the ios timing is MMC_TIMING_LEGACY/MMC_TIMING_MMC_HS/MMC_TIMING_SD_HS, which means both mmc_power_up() and mmc_power_off() will reset the tuning circuit. Signed-off-by: Haibo Chen Acked-by: Dong Aisheng Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc-imx.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit a82d12b8d5a626e30d2f15627079abdaa2e77c05 Author: Colin Ian King Date: Tue Apr 11 14:37:43 2017 +0100 clk: apn806: fix spelling mistake: "mising" -> "missing" trivial fix to spelling mistake in dev_warn message Signed-off-by: Colin Ian King Acked-by: Stephen Boyd Signed-off-by: Ulf Hansson drivers/clk/mvebu/ap806-system-controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b236f37b0fa88fac93e6782fd25cbf9907e5048 Author: yangbo lu Date: Thu Apr 20 16:14:44 2017 +0800 mmc: sdhci-of-esdhc: add delay between tuning cycles It's observed that eSDHC needed delay between tuning cycles for HS200 successful tuning. This patch is to set 1ms delay for that. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-esdhc.c | 1 + 1 file changed, 1 insertion(+) commit 83b600b8de0e83661a8f40091a7966fac052a21b Author: Adrian Hunter Date: Thu Apr 20 16:14:43 2017 +0800 mmc: sdhci: Control the delay between tuning commands The delay between tuning commands for SD cards is not part of the specification. A driver that needs it probably needs it for eMMC too, whereas most drivers would probably like to set it to 0. Make it a host member (host->tuning_delay) that defaults to the existing behaviour. Drivers can set it to zero to eliminate the delay, or set it to a positive value to always have a delay. Signed-off-by: Adrian Hunter Signed-off-by: Yangbo Lu Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 11 ++++++++--- drivers/mmc/host/sdhci.h | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) commit ba49cbd0936e12eac245c0fb420a291e8505f639 Author: yangbo lu Date: Thu Apr 20 16:14:42 2017 +0800 mmc: sdhci-of-esdhc: add tuning support eSDHC uses tuning block for tuning procedure. So the tuning block control register must be configured properly before tuning. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc.h | 5 +++++ drivers/mmc/host/sdhci-of-esdhc.c | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) commit ea35645a3c66a74af92d3bbb4eb131220fc3e58a Author: yangbo lu Date: Thu Apr 20 16:14:41 2017 +0800 mmc: sdhci-of-esdhc: add support for signal voltage switch eSDHC supports signal voltage switch from 3.3v to 1.8v by eSDHC_PROCTL[VOLT_SEL] bit. This bit changes the value of output signal SDHC_VS, and there must be a control circuit out of eSDHC to change the signal voltage according to SDHC_VS output signal. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc.h | 1 + drivers/mmc/host/sdhci-of-esdhc.c | 74 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) commit 19c3a0ef65adf090cb592dfe3e575f40322c88d8 Author: yangbo lu Date: Thu Apr 20 16:14:40 2017 +0800 mmc: sdhci-of-esdhc: add peripheral clock support eSDHC could select peripheral clock or platform clock as clock source by the PCS bit of eSDHC Control Register, and this bit couldn't be reset by software reset for all. In default, the platform clock is used. But we have to use peripheral clock since it has a higher frequency to support eMMC HS200 mode and SD UHS-I mode. This patch is to add peripheral clock support and use it instead of platform clock if it's declared in eSDHC dts node. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc.h | 1 + drivers/mmc/host/sdhci-of-esdhc.c | 73 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 72 insertions(+), 2 deletions(-) commit a72016a44703476bdb3567a13695938566e8f413 Author: Adrian Hunter Date: Wed Apr 19 15:48:55 2017 +0300 mmc: sdhci-pci: Allow for 3 bytes from Intel DSM The DSM used by some Intel controllers can return a 3 byte package. Allow for that by using memcpy to copy the bytes. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3fcc78340f3a9bef2be7ad54258b06e1f177d3fd Author: Dan Carpenter Date: Thu Apr 13 22:47:48 2017 +0300 mmc: cavium: Fix a shift wrapping bug "dat" is a u64 and "shift" starts as 54 so this is a shift wrapping bug. Signed-off-by: Dan Carpenter Signed-off-by: Ulf Hansson drivers/mmc/host/cavium.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe79018aa4c3af7d74e48b9a9b117da9fb6cf353 Author: Jan Glauber Date: Thu Apr 13 14:10:51 2017 +0200 mmc: cavium: Check pointer before de-reference Add a pointer check to prevent this smatch warning: drivers/mmc/host/cavium.c:803 cvm_mmc_request() error: we previously assumed 'cmd->data' could be null (see line 782) This is a theoretical fix because MMC_CMD_ADTC seems to imply that cmd->data is not null. Nevertheless checking cmd->data before using it improves readability. Signed-off-by: Jan Glauber Signed-off-by: Ulf Hansson drivers/mmc/host/cavium.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c34d1579de4665d9613691bc37aebb7ca86d535d Author: Jan Glauber Date: Thu Apr 13 14:10:50 2017 +0200 mmc: cavium: Remove redundant pointer check Remove redundant mmc->card check reported by smatch: drivers/mmc/host/cavium.c:694 cvm_mmc_dma_request() warn: variable dereferenced before check 'mmc->card' (see line 675) Signed-off-by: Jan Glauber Signed-off-by: Ulf Hansson drivers/mmc/host/cavium.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79ed05e329c34c68ab2a87f729e666fcf208fdad Author: Heiner Kallweit Date: Fri Apr 7 21:22:44 2017 +0200 mmc: meson-gx: add support for descriptor chain mode So far a bounce buffer is used to serialize the scatterlist(s). This overhead can be avoided by switching to descriptor chain mode. As result the performance is drastically improved. On a Odroid-C2 with a 128 GB eMMC module raw reads reach 140 MB/s. Prerequisite for descriptor chain mode is that all scatterlist buffers are 8 byte aligned for 64-bit DMA. That's not always the case, at least the brcmfmac SDIO WiFi driver is known to cause problems. Therefore, for each request, check upfront whether all scatterlist buffers are 8 byte aligned and fall back to bounce buffer mode if that's not the case. Signed-off-by: Heiner Kallweit Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 172 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 156 insertions(+), 16 deletions(-) commit 0b6ed71c3e95abf6cd1dbfc53919defdce3449f5 Author: Heiner Kallweit Date: Tue Apr 4 21:11:17 2017 +0200 mmc: meson-gx: add basic tuning for rx clock phase This patch adds basic tuning which changes the rx clock phase only until a working setting is found. On a Odroid C2 with 128GB eMMC card and 200 MHz MMC clock only 180° rx clock phase make the system boot w/o CRC errors. With other MMC devices / clock speeds this might be different, therefore don't change the driver config in general. When retuning skip the currently active parameter set. This avoids the current problematic config to be chosen again if it causes CRC errors just occasionally. Signed-off-by: Heiner Kallweit Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit c08bcb6c90068d8eacffdb8b5f77916de5481a72 Author: Heiner Kallweit Date: Tue Apr 4 21:03:22 2017 +0200 mmc: meson-gx: introduce struct meson_tuning_params Introduce struct meson_tuning_params for storing the clock phase configurations. There's no functional change because tx and rx clock phase were implicitely set to CLK_PHASE_0 before. Signed-off-by: Heiner Kallweit Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 06c9ccb78e68e2e9b69e736fc0a39fb13be49b74 Author: Winkler, Tomas Date: Sun Apr 2 23:56:03 2017 +0300 mmc: core: add proper be32 annotation Annotate big endian values correctly and make sparse happy. In mmc_app_send_scr remove scr function parameter as it was updating card->raw_scr anyway. Signed-off-by: Tomas Winkler Signed-off-by: Ulf Hansson drivers/mmc/core/mmc_ops.c | 8 ++++---- drivers/mmc/core/sd.c | 4 ++-- drivers/mmc/core/sd_ops.c | 19 +++++++++---------- drivers/mmc/core/sd_ops.h | 2 +- 4 files changed, 16 insertions(+), 17 deletions(-) commit 861183f115cd80db7efebf5516f4e7a424c13abd Author: Piotr Sroka Date: Tue Apr 11 12:13:38 2017 +0100 mmc: sdhci-cadence: add parsing sdhci properties Add calling sdhci_get_of_property function to parse sdhci properties. Signed-off-by: Piotr Sroka Acked-by: Adrian Hunter Reviewed-by: Masahiro Yamada Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-cadence.c | 2 ++ 1 file changed, 2 insertions(+) commit ec5ab8933772c87f24ad62a4a602fe8949f423c2 Author: Dan Carpenter Date: Mon Apr 10 16:54:17 2017 +0300 mmc: host: omap_hsmmc: checking for NULL instead of IS_ERR() devm_pinctrl_get() returns error pointers, it never returns NULL. Fixes: 455e5cd6f736 ("mmc: omap_hsmmc: Pin remux workaround to support SDIO interrupt on AM335x") Signed-off-by: Dan Carpenter Reviewed-by: Kishon Vijay Abraham I Signed-off-by: Ulf Hansson drivers/mmc/host/omap_hsmmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 511fc93d2ceb71d92071bdc950c4959ed3ac741b Author: Hu Ziji Date: Thu Mar 30 17:23:02 2017 +0200 MAINTAINERS: add entry for Marvell Xenon MMC Host Controller drivers Add maintainer entry for Marvell Xenon eMMC/SD/SDIO Host Controller drivers. Signed-off-by: Hu Ziji Signed-off-by: Gregory CLEMENT Signed-off-by: Ulf Hansson MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 298269c602b54dd56e1424cb8e706fc30bc7d489 Author: Hu Ziji Date: Thu Mar 30 17:23:01 2017 +0200 mmc: sdhci-xenon: Add SoC PHY PAD voltage control Some SoCs have PHY PAD outside Xenon IP. PHY PAD voltage should match signalling voltage in use. Add generic SoC PHY PAD voltage control interface. Implement Aramda-3700 SoC PHY PAD voltage control. Signed-off-by: Hu Ziji Tested-by: Russell King Signed-off-by: Gregory CLEMENT Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-xenon-phy.c | 110 ++++++++++++++++++++++++++++++++++++- drivers/mmc/host/sdhci-xenon.c | 2 + drivers/mmc/host/sdhci-xenon.h | 2 + 3 files changed, 113 insertions(+), 1 deletion(-) commit 06c8b667ff5b984ac3aa901c4928e4a427987a56 Author: Hu Ziji Date: Thu Mar 30 17:23:00 2017 +0200 mmc: sdhci-xenon: Add support to PHYs of Marvell Xenon SDHC Marvell Xenon eMMC/SD/SDIO Host Controller contains PHY. Multiple types of PHYs are supported. Add support to multiple types of PHYs init and configuration. Add register definitions of PHYs. Xenon PHY cannot fit in kernel common PHY framework. Xenon SDHC PHY register is a part of Xenon SDHC register set. Besides, MMC initialization has to call several PHY functions to complete timing setting. Those PHY setting functions have to access SDHC registers and know current MMC setting, such as bus width, clock frequency and speed mode. As a result, implement Xenon PHY in MMC host directory. Signed-off-by: Hu Ziji Signed-off-by: Gregory CLEMENT Signed-off-by: Ulf Hansson drivers/mmc/host/Makefile | 2 +- drivers/mmc/host/sdhci-xenon-phy.c | 727 +++++++++++++++++++++++++++++++++++++ drivers/mmc/host/sdhci-xenon.c | 9 +- drivers/mmc/host/sdhci-xenon.h | 39 ++ 4 files changed, 774 insertions(+), 3 deletions(-) commit 3a3748dba881ed23ba8465dd6d66a267af89cdc0 Author: Hu Ziji Date: Thu Mar 30 17:22:59 2017 +0200 mmc: sdhci-xenon: Add Marvell Xenon SDHC core functionality Add Xenon eMMC/SD/SDIO host controller core functionality. Add Xenon specific initialization process. Add Xenon specific mmc_host_ops APIs. Add Xenon specific register definitions. Add CONFIG_MMC_SDHCI_XENON support in drivers/mmc/host/Kconfig. Marvell Xenon SDHC conforms to SD Physical Layer Specification Version 3.01 and is designed according to the guidelines provided in the SD Host Controller Standard Specification Version 3.00. Signed-off-by: Hu Ziji Signed-off-by: Gregory CLEMENT Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 8 + drivers/mmc/host/Makefile | 3 + drivers/mmc/host/sdhci-xenon.c | 541 +++++++++++++++++++++++++++++++++++++++++ drivers/mmc/host/sdhci-xenon.h | 60 +++++ 4 files changed, 612 insertions(+) commit 66c659cf5cda6f21c0f7832b735c180a9f99a790 Author: Hu Ziji Date: Thu Mar 30 17:22:58 2017 +0200 dt: bindings: Add bindings for Marvell Xenon SD Host Controller Marvell Xenon SDHC can support eMMC/SD/SDIO. Add Xenon-specific properties. Also add properties for Xenon PHY setting. Signed-off-by: Hu Ziji Signed-off-by: Gregory CLEMENT Acked-by: Rob Herring Signed-off-by: Ulf Hansson .../bindings/mmc/marvell,xenon-sdhci.txt | 170 +++++++++++++++++++++ 1 file changed, 170 insertions(+) commit 2f05b6ab5fa7f279015c70f625ec5c532781eb2b Author: Hu Ziji Date: Thu Mar 30 17:22:57 2017 +0200 mmc: sdhci: Export sdhci_enable_sdio_irq() from sdhci.c Export sdhci_enable_sdio_irq() from sdhci.c. Thus vendor SDHC driver can implement its specific SDIO irq control. Signed-off-by: Hu Ziji Signed-off-by: Gregory CLEMENT Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 3 ++- drivers/mmc/host/sdhci.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit c376ea9e46215fbfa09b371f79c821fa5a51f26e Author: Hu Ziji Date: Thu Mar 30 17:22:56 2017 +0200 mmc: sdhci: Export sdhci_start_signal_voltage_switch() in sdhci.c Export sdhci_start_signal_voltage_switch() from sdhci.c. Thus vendor sdhci driver can implement its own signal voltage switch routine. Signed-off-by: Hu Ziji Signed-off-by: Gregory CLEMENT Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 5 +++-- drivers/mmc/host/sdhci.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) commit 6a6d4ceb7be0c72b2190f4b6b9d5d8982957fc04 Author: Hu Ziji Date: Thu Mar 30 17:22:55 2017 +0200 mmc: sdhci: Export sdhci_set_ios() from sdhci.c Export sdhci_set_ios() in sdhci.c. Thus vendor sdhci driver can implement its own set_ios() routine. Signed-off-by: Hu Ziji Signed-off-by: Gregory CLEMENT Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 3 ++- drivers/mmc/host/sdhci.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit b92a3bcc7c3ca4ee8d228f033de32aefff3c74a4 Author: Gregory CLEMENT Date: Thu Mar 30 17:22:54 2017 +0200 clk: apn806: Turn the eMMC clock as optional for dts backwards compatible First version of the binding didn't have the eMMC clock. This patch allows to not registering the eMMC clock if it is not present in the device tree. Then the device tree can be backwards compatible. Suggested-by: Stephen Boyd Signed-off-by: Gregory CLEMENT Signed-off-by: Ulf Hansson drivers/clk/mvebu/ap806-system-controller.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit a8309cedcdce94fc6e36d49d0bf8e75d5813ebc6 Author: Konstantin Porotchkin Date: Thu Mar 30 17:22:53 2017 +0200 clk: apn806: Add eMMC clock to system controller driver Add fixed clock of 400MHz to system controller driver. This clock is used as SD/eMMC clock source. Signed-off-by: Konstantin Porotchkin Reviewed-by: Omri Itach Reviewed-by: Hanna Hawa [fixed up conflicts, added error handling --rmk] Signed-off-by: Russell King Acked-by: Stephen Boyd Signed-off-by: Gregory CLEMENT Signed-off-by: Ulf Hansson arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 3 ++- drivers/clk/mvebu/ap806-system-controller.c | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) commit 25fc846503738c3d4ca886cfee4b4ff4415d0cec Author: Jan Glauber Date: Thu Mar 30 17:31:28 2017 +0200 MAINTAINERS: Add entry for Cavium MMC driver Signed-off-by: Jan Glauber Signed-off-by: David Daney Signed-off-by: Steven J. Hill Signed-off-by: Ulf Hansson MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4ce944074e5e2cb7ee48ff36608d65d0bc9c7647 Author: Jan Glauber Date: Thu Mar 30 17:31:27 2017 +0200 mmc: cavium: Support DDR mode for eMMC devices Add support for switching to DDR mode for eMMC devices. Signed-off-by: Jan Glauber Signed-off-by: Ulf Hansson drivers/mmc/host/cavium.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit cd76e5c565e82af62f708120068ec5d226d98c95 Author: Jan Glauber Date: Thu Mar 30 17:31:26 2017 +0200 mmc: cavium: Add scatter-gather DMA support Add Support for the scatter-gather DMA available in the ThunderX MMC units. Up to 16 DMA requests can be processed together. Signed-off-by: Jan Glauber Signed-off-by: Ulf Hansson drivers/mmc/host/cavium-thunderx.c | 5 +- drivers/mmc/host/cavium.c | 104 +++++++++++++++++++++++++++++++++++-- drivers/mmc/host/cavium.h | 28 +++++++--- 3 files changed, 127 insertions(+), 10 deletions(-) commit 166bac38c3c569508e695aca99fdc2def2ae2198 Author: Jan Glauber Date: Thu Mar 30 17:31:25 2017 +0200 mmc: cavium: Add MMC PCI driver for ThunderX SOCs Add a platform driver for ThunderX ARM SOCs. Signed-off-by: Jan Glauber Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 11 +++ drivers/mmc/host/Makefile | 2 + drivers/mmc/host/cavium-thunderx.c | 195 +++++++++++++++++++++++++++++++++++++ drivers/mmc/host/cavium.h | 7 ++ 4 files changed, 215 insertions(+) commit ba3869ff32e4a671b0f9baa73900f9e2bfeb0414 Author: Jan Glauber Date: Thu Mar 30 17:31:24 2017 +0200 mmc: cavium: Add core MMC driver for Cavium SOCs This core driver will be used by a MIPS platform driver or by an ARM64 PCI driver. The core driver implements the mmc_host_ops and slot probe & remove functions. Callbacks are provided to allow platform specific interrupt enable and bus locking. The host controller supports: - up to 4 slots that can contain sd-cards or eMMC chips - 1, 4 and 8 bit bus width - SDR and DDR - transfers up to 52 Mhz (might be less when multiple slots are used) - DMA read/write - multi-block read/write (but not stream mode) Voltage is limited to 3.3v and shared for all slots (vmmc and vmmcq). A global lock for all MMC devices is required because the host controller is shared. Signed-off-by: Jan Glauber Signed-off-by: David Daney Signed-off-by: Steven J. Hill Signed-off-by: Ulf Hansson drivers/mmc/host/cavium.c | 982 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/mmc/host/cavium.h | 192 +++++++++ 2 files changed, 1174 insertions(+) commit dc5aee3f9f454c35d4e092873b103dc791119e0e Author: Jan Glauber Date: Thu Mar 30 17:31:23 2017 +0200 dt-bindings: mmc: Add Cavium SOCs MMC bindings Add description of Cavium Octeon and ThunderX SOC device tree bindings. CC: Ulf Hansson CC: Rob Herring CC: Mark Rutland CC: devicetree@vger.kernel.org Signed-off-by: Jan Glauber Signed-off-by: David Daney Signed-off-by: Steven J. Hill Acked-by: Rob Herring Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/cavium-mmc.txt | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 67b8360acc0d717c46af3008fc10dcc5c91f7745 Author: Linus Walleij Date: Tue Mar 28 10:40:31 2017 +0200 mmc: core: refactor mmc_request_done() We have this construction: if (a && b && !c) finalize; else block; finalize; Which is equivalent by boolean logic to: if (!a || !b || c) block; finalize; Which is simpler code. Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit 0e72f95bf329dea7985f0f4ac81cc888e8b79797 Author: Linus Walleij Date: Tue Mar 28 10:40:30 2017 +0200 mmc: core: refactor asynchronous request finalization mmc_wait_for_data_req_done() is called in exactly one place, and having it spread out is making things hard to oversee. Factor this function into mmc_finalize_areq(). Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 86 +++++++++++++++++++------------------------------ 1 file changed, 33 insertions(+), 53 deletions(-) commit 5744d50d2d9e7efdae4b5d13cd71f49256ada6ba Author: Linus Walleij Date: Tue Mar 28 10:40:29 2017 +0200 mmc: core: move some code in mmc_start_areq() "previous" is a better name for the variable storing the previous asynchronous request, better than the opaque name "data" atleast. We see that we assign the return status to the returned variable on all code paths, so we might as well just do that immediately after calling mmc_finalize_areq(). Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit f34bdd2f7e2881090f566a2f93b0d8e1189091e0 Author: Adrian Hunter Date: Mon Mar 13 14:36:43 2017 +0200 mmc: core: Factor out mrq preparation from mmc_start_request() In preparation to reuse the code for CQE support. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) commit 4b67e63faaa21eab225bc3827a9d06e6ae54bdc7 Author: Adrian Hunter Date: Mon Mar 13 14:36:42 2017 +0200 mmc: core: Factor out debug prints from mmc_start_request() In preparation to reuse the code for CQE support. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) commit ca5717f7ceef3c0aa76e2f77acb95ec3a93470c8 Author: Adrian Hunter Date: Mon Mar 13 14:36:41 2017 +0200 mmc: block: Factor out data preparation Factor out data preparation into a separate function mmc_blk_data_prep() which can be re-used for command queuing. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 151 +++++++++++++++++++++++++---------------------- 1 file changed, 82 insertions(+), 69 deletions(-) commit 9cb38f7a2d0aab5730ac18117ab2f5c9e3d4a826 Author: Adrian Hunter Date: Mon Mar 13 14:36:40 2017 +0200 mmc: block: Change mmc_apply_rel_rw() to get block address from the request mmc_apply_rel_rw() will be used by Software Command Queuing also. In that case the command argument is not the block address so change mmc_apply_rel_rw() to get block address from the request. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 025e3d5fe157e8a12ed4ab59d0e147046c87cbd9 Author: Adrian Hunter Date: Mon Mar 13 14:36:39 2017 +0200 mmc: block: Disable Command Queue while RPMB is used RPMB does not allow Command Queue commands. Disable and re-enable the Command Queue when switching. Note that the driver only switches partitions when the queue is empty. Signed-off-by: Adrian Hunter Reviewed-by: Harjani Ritesh Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 46 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 8 deletions(-) commit 9d4579a85c84340044b10ffa6cd576397f59dc93 Author: Adrian Hunter Date: Mon Mar 13 14:36:38 2017 +0200 mmc: mmc_test: Disable Command Queue while mmc_test is used Normal read and write commands may not be used while the command queue is enabled. Disable the Command Queue when mmc_test is probed and re-enable it when it is removed. Signed-off-by: Adrian Hunter Reviewed-by: Harjani Ritesh Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/mmc.c | 7 +++++++ drivers/mmc/core/mmc_test.c | 14 ++++++++++++++ include/linux/mmc/card.h | 2 ++ 3 files changed, 23 insertions(+) commit b658af718465cd1e8011c8da281befdfc2debefd Author: Adrian Hunter Date: Mon Mar 13 14:36:37 2017 +0200 mmc: mmc: Add functions to enable / disable the Command Queue Add helper functions to enable or disable the Command Queue. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson Documentation/mmc/mmc-dev-attrs.txt | 1 + drivers/mmc/core/mmc.c | 2 ++ drivers/mmc/core/mmc_ops.c | 28 ++++++++++++++++++++++++++++ drivers/mmc/core/mmc_ops.h | 2 ++ include/linux/mmc/card.h | 1 + 5 files changed, 34 insertions(+) commit 7b410d074b253a44624497a18e73f666a9574f37 Author: Adrian Hunter Date: Mon Mar 13 14:36:36 2017 +0200 mmc: queue: Share mmc request array between partitions eMMC can have multiple internal partitions that are represented as separate disks / queues. However switching between partitions is only done when the queue is empty. Consequently the array of mmc requests that are queued can be shared between partitions saving memory. Keep a pointer to the mmc request queue on the card, and use that instead of allocating a new one for each partition. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 11 ++- drivers/mmc/core/queue.c | 234 ++++++++++++++++++++++++++++------------------- drivers/mmc/core/queue.h | 2 + include/linux/mmc/card.h | 5 + 4 files changed, 156 insertions(+), 96 deletions(-) commit cdf8a6fb48882651049e468e6b16956fb83db86c Author: Adrian Hunter Date: Mon Mar 13 14:36:35 2017 +0200 mmc: block: Introduce queue semantics Change from viewing the requests in progress as 'current' and 'previous', to viewing them as a queue. The current request is allocated to the first free slot. The presence of incomplete requests is determined from the count (mq->qcnt) of entries in the queue. Non-read-write requests (i.e. discards and flushes) are not added to the queue at all and require no special handling. Also no special handling is needed for the MMC_BLK_NEW_REQUEST case. As well as allowing an arbitrarily sized queue, the queue thread function is significantly simpler. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 66 ++++++++++++++++++++++++++---------------- drivers/mmc/core/queue.c | 75 ++++++++++++++++++++++++++++++------------------ drivers/mmc/core/queue.h | 10 +++++-- 3 files changed, 95 insertions(+), 56 deletions(-) commit 8ddfe07e18c9c82f7567d3cfbd68d8b59764d015 Author: Adrian Hunter Date: Mon Mar 13 14:36:34 2017 +0200 mmc: block: Use local var for mqrq_cur A subsequent patch will remove 'mq->mqrq_cur'. Prepare for that by assigning it to a local variable. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit e584e07502131fb13e5879f3f2077c29377b08eb Author: Sergio Prado Date: Fri Mar 31 20:50:56 2017 -0300 mmc: host: s3cmci: allow probing from device tree Allows configuring Samsung S3C24XX MMC/SD/SDIO controller using a device tree. Signed-off-by: Sergio Prado [Arnd: fix broken conditional expression] Signed-off-by: Arnd Bergmann Signed-off-by: Ulf Hansson drivers/mmc/host/s3cmci.c | 257 +++++++++++++++++++++++----------------------- 1 file changed, 126 insertions(+), 131 deletions(-) commit d5cc7c80bafca02e9150a2af5ccab1aa0aa8be20 Author: Sergio Prado Date: Fri Mar 31 20:50:55 2017 -0300 dt-bindings: mmc: add DT binding for S3C24XX MMC/SD/SDIO controller Adds the device tree bindings description for Samsung S3C24XX MMC/SD/SDIO controller, used as a connectivity interface with external MMC, SD and SDIO storage mediums. Acked-by: Rob Herring Signed-off-by: Sergio Prado Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/samsung,s3cmci.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit c2c49a2e2bf3758ac429c5ac9941a855b75b5e22 Author: Azhar Shaikh Date: Wed Mar 29 11:16:33 2017 -0700 mmc: sdhci-pci: Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel controllers Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel SD card controllers. Signed-off-by: Azhar Shaikh Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit d3e974074f66a258c9fea12defb9ce1914ef4e4c Author: Azhar Shaikh Date: Wed Mar 29 11:16:32 2017 -0700 mmc: sdhci-acpi: Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel controllers Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel SD card controllers. Signed-off-by: Azhar Shaikh Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-acpi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 75c7fd96d0e51e8d652767e910a79aad67fe9826 Author: Heiner Kallweit Date: Mon Mar 27 22:02:32 2017 +0200 mmc: meson-gx: factor out setting response configuration bits Factor out setting the response configuration bits thus further reducing complexity of function meson_mmc_start_cmd. Signed-off-by: Heiner Kallweit Reviewed-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit 3d03f6a99a8de552e094445dde341ca4b4d4326a Author: Heiner Kallweit Date: Mon Mar 27 21:57:11 2017 +0200 mmc: meson-gx: factor out setting block size Factor out setting the block size. This also contributes to reducing complexity of function meson_mmc_start_cmd. Signed-off-by: Heiner Kallweit Reviewed-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 42 ++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) commit edf985790659503eedd5736ba89ad7e9fd754cf0 Author: Piotr Sroka Date: Tue Mar 21 14:33:26 2017 +0000 mmc: sdhci-cadence: refactor probe function Use added dev variable for devm_clk_get. Signed-off-by: Piotr Sroka Reviewed-by: Masahiro Yamada Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-cadence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a89c472d8b55c5afc4c79e6e3d1338730034eb01 Author: Piotr Sroka Date: Tue Mar 21 14:33:11 2017 +0000 mmc: sdhci-cadence: Update PHY delay configuration DTS properties are used instead of fixed data because PHY settings can be different for different chips/boards. Signed-off-by: Piotr Sroka Reviewed-by: Masahiro Yamada Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-cadence.c | 53 ++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 7 deletions(-) commit 6f4b0919020a482e41af4e715efaa79f45f6cde6 Author: Piotr Sroka Date: Tue Mar 21 14:33:01 2017 +0000 dt-bindings: mmc: add description of PHY delays for sdhci-cadence DTS properties are used instead of fixed data because PHY settings can be different for different chips/boards. Add description of new DLL PHY delays. Signed-off-by: Piotr Sroka Reviewed-by: Masahiro Yamada Acked-by: Rob Herring Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/sdhci-cadence.txt | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit a0f8243229ed071c8da0ea7cedc1b7bf1b1515da Author: Piotr Sroka Date: Tue Mar 21 14:32:16 2017 +0000 mmc: sdhci-cadence: Fix writing PHY delay Add polling for ACK to be sure that data are written to PHY register. Signed-off-by: Piotr Sroka Reviewed-by: Masahiro Yamada Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-cadence.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit bf3240bada0211b4a555d75f027181c8432b2d20 Author: Stefan Wahren Date: Sat Mar 25 13:17:00 2017 +0000 mmc: bcm2835: Fix possible NULL ptr dereference in bcm2835_request This fixes a NULL pointer dereference in case of a MMC request with a set block count command and no data. Reported-by: Dan Carpenter Signed-off-by: Stefan Wahren Tested-by: Peter Robinson Reviewed-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/bcm2835.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit feeef096a770d288c943c1759785bd9d4f9247b7 Author: Heiner Kallweit Date: Sun Mar 26 20:45:56 2017 +0200 mmc: use new core function mmc_get_dma_dir Use new core function mmc_get_dma_dir(). Signed-off-by: Heiner Kallweit Signed-off-by: Ulf Hansson drivers/mmc/host/android-goldfish.c | 10 ++-------- drivers/mmc/host/atmel-mci.c | 30 +++++++++++------------------- drivers/mmc/host/davinci_mmc.c | 14 ++++---------- drivers/mmc/host/dw_mmc.c | 14 +++----------- drivers/mmc/host/jz4740_mmc.c | 9 ++------- drivers/mmc/host/mmc_spi.c | 5 +---- drivers/mmc/host/mmci.c | 20 ++++++++------------ drivers/mmc/host/moxart-mmc.c | 8 +++----- drivers/mmc/host/mtk-sd.c | 8 ++------ drivers/mmc/host/mvsdio.c | 11 +++++------ drivers/mmc/host/omap_hsmmc.c | 17 ++++------------- drivers/mmc/host/s3cmci.c | 4 ++-- drivers/mmc/host/sdhci.c | 9 +++------ drivers/mmc/host/sunxi-mmc.c | 14 +++----------- 14 files changed, 53 insertions(+), 120 deletions(-) commit 6335d68349a85382cc55a5260d5bfda85f8e24a8 Author: Heiner Kallweit Date: Sun Mar 26 20:41:32 2017 +0200 mmc: core: add mmc_get_dma_dir Add function for determining DMA direction to core. Signed-off-by: Heiner Kallweit Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson include/linux/mmc/host.h | 6 ++++++ 1 file changed, 6 insertions(+) commit e5e4a3eb131f79af49f48a741807318c32f29427 Author: Heiner Kallweit Date: Sat Mar 25 11:28:13 2017 +0100 mmc: meson-gx: add CMD23 mode CMD23 mode (use "set block count" command before transferring multiple data blocks) typically is more performant as host / card know upfront how many data blocks to expect. Therefore add support for this mode to the driver. Signed-off-by: Heiner Kallweit Reviewed-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 4eee86c3d825109ed91555a553fbdb927592f009 Author: Heiner Kallweit Date: Sat Mar 25 11:26:18 2017 +0100 mmc: meson-gx: switch to dynamic timeout values Currently we use a fixed timeout of 4s for all data transfers. Switch to dynamic timeout values by making use of data->timeout_ns. Signed-off-by: Heiner Kallweit Reviewed-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit f016c67629c818ca6a39f4d6e35d85d9e930eacc Author: Heiner Kallweit Date: Sat Mar 25 11:24:41 2017 +0100 mmc: meson-gx: use per port interrupt names So far the driver name is used as interrupt description, therefore in /proc/interrupts it's not possible to tell which interrupt belongs to which port. Change this by switching to NULL what causes the default (device name) to be used. In our case that's the DT node name. Signed-off-by: Heiner Kallweit Reviewed-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1231e7eb62224235bb92a2a39cb35c89afd474af Author: Heiner Kallweit Date: Sat Mar 25 11:23:24 2017 +0100 mmc: meson-gx: use bitfield macros Use GENMASK consistently for all bit masks and switch to using the bitfield macros FIELD_GET and FIELD_PREP. This hides parts of the complexity of dealing with bit fields. Signed-off-by: Heiner Kallweit Reviewed-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 94 ++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 54 deletions(-) commit 8cc35289227c5cbb8811048519c1703e2137d421 Author: Shawn Lin Date: Fri Mar 24 15:50:12 2017 +0800 mmc: sdhci: clarify the get_timeout_clock callback Currently the get_timeout_clock callback doesn't clearly have a statement that it needs the variant drivers to return the timeout clock rate in kHz if the SDHCI_TIMEOUT_CLK_UNIT isn't present, otherwise the variant drivers should return it in MHz. It's also very likely that further variant drivers which are going to use this callback will be confused by this situation. Given the fact that moderm sdhci variant hosts are very prone to get the timeout clock from common clock framework (actually the only three users did that), it's more natural to return the value in Hz and we make an explicit comment there. Then we put the unit conversion inside the sdhci core. Thus will improve the code and prevent further misuses. Reported-by: Anssi Hannula Signed-off-by: Shawn Lin Acked-by: Masahiro Yamada Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-cadence.c | 4 ++-- drivers/mmc/host/sdhci-of-arasan.c | 17 +---------------- drivers/mmc/host/sdhci.c | 16 +++++++++------- drivers/mmc/host/sdhci.h | 1 + 4 files changed, 13 insertions(+), 25 deletions(-) commit bd675698e8eece61c02a5e436e6d5d5ac1180e46 Author: Icenowy Zheng Date: Thu Mar 16 21:29:03 2017 +0800 mmc: sunxi: change controller error info to debug level The controller's errors are usually normal (for example, for MMC or SDIO cards, some errors are expected to happen; and for boards without a dedicated card detect pin the error info will even flood console and hide other normal messages) and hard to understand. Change their print level to debug, thus it won't be shown to generic users. Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a744c6fe13beef87cd541f1dcaffe97f2af0c908 Author: Heiner Kallweit Date: Wed Mar 22 22:34:01 2017 +0100 mmc: meson-gx: simplify setting timeout configuration parameters We don't need variable cmd_cfg_timeout, so remove it and simplify the code a little. Signed-off-by: Heiner Kallweit Signed-off-by: Ulf Hansson Reviewed-by: Kevin Hilman drivers/mmc/host/meson-gx-mmc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 2c8d96a46dfd45b724465e53a5a9542bcb78cfce Author: Heiner Kallweit Date: Wed Mar 22 22:33:53 2017 +0100 mmc: meson-gx: improve setting data->bytes_xfered Centralize setting data->bytes_xfered in one place and make sure that the number of transfererd bytes is set only if we receive the end-of-chain interrupt and there was no error. Signed-off-by: Heiner Kallweit Signed-off-by: Ulf Hansson Reviewed-by: Kevin Hilman drivers/mmc/host/meson-gx-mmc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 1f8066d90739ebfdf70a5debbc5fed22fdd17465 Author: Heiner Kallweit Date: Wed Mar 22 22:33:50 2017 +0100 mmc: meson-gx: improve response reading Response reading can be slightly improved by doing it in just one place. Signed-off-by: Heiner Kallweit Signed-off-by: Ulf Hansson Reviewed-by: Kevin Hilman drivers/mmc/host/meson-gx-mmc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit a322febe37432443b8d0adb0b630a9f91961152c Author: Heiner Kallweit Date: Wed Mar 22 22:33:47 2017 +0100 mmc: meson-gx: improve variable usage in meson_mmc_start_cmd Simplify the code by using two variables instead of a struct sd_emmc_desc. Signed-off-by: Heiner Kallweit Signed-off-by: Ulf Hansson Reviewed-by: Kevin Hilman drivers/mmc/host/meson-gx-mmc.c | 55 ++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 31 deletions(-) commit 00412ddc4ae929419a64bc9766205aac0467e664 Author: Heiner Kallweit Date: Wed Mar 22 22:33:44 2017 +0100 mmc: meson-gx: replace cmd->data in meson_mmc_start_cmd Replace cmd->data with a local variable to simplify code a little. Signed-off-by: Heiner Kallweit Signed-off-by: Ulf Hansson Reviewed-by: Kevin Hilman drivers/mmc/host/meson-gx-mmc.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit ec31e53c2aab68b93381b194f70626f082bbc9d0 Author: Heiner Kallweit Date: Wed Mar 22 22:18:37 2017 +0100 mmc: meson-gx: remove unneeded configuration bit resets The variables holding the configuration bits are zero-initialized. So we can remove all bit resets. Signed-off-by: Heiner Kallweit Signed-off-by: Ulf Hansson Reviewed-by: Kevin Hilman drivers/mmc/host/meson-gx-mmc.c | 5 ----- 1 file changed, 5 deletions(-) commit 1ede5cb88a29bba1aad1b68965c5fc8e00b20ed9 Author: yong mao Date: Wed Mar 15 15:26:40 2017 +0800 mmc: mediatek: Use data tune for CMD line tune If we don't select a set of better parameters for our emmc host, It may easily occur CMD response CRC error. And also it may cause cannot boot up issue. Fot getting a set of better parameters, our emmc host supports data tune mechanism.Therefore, our emmc driver also should change to use data tune for CMD line. Because our emmc host use the different clock source to sample the CMD signal between HS200 and HS400 mode, the parameters are also different between these two modes. Separate cmd internal delay for HS200/HS400 mode. This change can fix "System can not boot up" issue. Signed-off-by: Yong Mao Signed-off-by: Chaotian Jing Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 168 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 152 insertions(+), 16 deletions(-) commit 50fde5637b6b66555036bd815c01e0aa38d38859 Author: yong mao Date: Wed Mar 15 15:26:38 2017 +0800 mmc: dt-bindings: update Mediatek MMC bindings Add description for mediatek,hs200-cmd-int-delay Add description for mediatek,hs400-cmd-int-delay Add description for mediatek,hs400-cmd-resp-sel-rising Signed-off-by: Yong Mao Acked-by: Rob Herring Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/mtk-sd.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 7aceaf566e1d6f7bf29516d680ee883697909cc7 Author: Heiner Kallweit Date: Wed Mar 22 21:59:29 2017 +0100 mmc: sdio: improve mmc_io_rw_extended Improve mmc_io_rw_extended a little: - using DIV_ROUND_UP achieves the same but is better readable - simplify code by using sg_set_buf - simplify one statement by using -= operator Signed-off-by: Heiner Kallweit Signed-off-by: Ulf Hansson drivers/mmc/core/sdio_ops.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 474e25e15f508889d4f8c672ab54323743ee595b Author: Chris Brandt Date: Wed Mar 22 10:42:09 2017 -0400 mmc: sh_mmcif: Document r7s72100 DT bindings Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Acked-by: Rob Herring Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/renesas,mmcif.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 43b0b361b0170030603cf76f70b099f3323edcf3 Author: Masaharu Hayakawa Date: Fri Mar 17 10:04:50 2017 +0100 mmc: tmio: always get number of taps Current code gets number of taps only once and keeps the value. This is not correct, we need to obtain it every time before executing tuning, so remove the outer if-block. Signed-off-by: Masaharu Hayakawa [wsa: extracted from a larger patch and reworded commit message] Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_pio.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 5f07ef8f603ace496ca8c20eef446c5ae7a10474 Author: Wolfram Sang Date: Thu Mar 16 11:56:02 2017 +0100 mmc: tmio: always unmap DMA before waiting for interrupt In the (maybe academical) case, we don't get a DATAEND interrupt after DMA completed, we will wait endlessly for the completion to complete. This is not bad per se, since we have a more generic completion tracking a timeout. In that rare case, however, the DMA buffer will not get unmapped and we have a leak. Reorder the code, so unmapping will always take place. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_dma.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 48d685a2ec2bc5852cf117b558dce9e90da36601 Author: Adrian Hunter Date: Mon Mar 20 19:50:53 2017 +0200 mmc: sdhci-pci: Move a function to avoid later forward declaration Move a function to avoid having to forward declare it in a subsequent patch. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci-pci-core.c | 76 +++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 38 deletions(-) commit 966d696a622b47663ae866df08d54a4a1d3ec39c Author: Adrian Hunter Date: Mon Mar 20 19:50:52 2017 +0200 mmc: sdhci-pci: Add runtime suspend/resume callbacks Add runtime suspend/resume callbacks to match suspend/resume callbacks. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci-pci-core.c | 98 +++++++++++++++++++++++---------------- drivers/mmc/host/sdhci-pci.h | 4 ++ 2 files changed, 62 insertions(+), 40 deletions(-) commit 30cf2803b268f2bcce91fbaa19cee6d04b14bd86 Author: Adrian Hunter Date: Mon Mar 20 19:50:51 2017 +0200 mmc: sdhci-pci: Let suspend/resume callbacks replace default callbacks The suspend / resume callbacks lack the flexibility to allow a device to specify a different function entirely. Change them around so that device functions are called directly and they in turn can call the default implementations if needed. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci-pci-core.c | 170 ++++++++++++++++++++--------------- drivers/mmc/host/sdhci-pci-o2micro.c | 2 +- drivers/mmc/host/sdhci-pci.h | 4 + 3 files changed, 104 insertions(+), 72 deletions(-) commit b7813f0fe9535cd9536102b9ac663a669f9be131 Author: Adrian Hunter Date: Mon Mar 20 19:50:50 2017 +0200 mmc: sdhci-pci: Conditionally compile pm sleep functions It is confusing to have some parts of suspend / resume under conditional compilation and some parts not. Use conditional compilation everywhere. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci-pci-core.c | 10 ++++++++++ drivers/mmc/host/sdhci-pci-o2micro.c | 2 ++ drivers/mmc/host/sdhci-pci.h | 2 ++ 3 files changed, 14 insertions(+) commit 1cb0a58ec70402bab49bdb4c5d152e82fd82200e Author: Adrian Hunter Date: Mon Mar 20 19:50:49 2017 +0200 mmc: sdhci-pci: Do not use suspend/resume callbacks with runtime pm Do not use suspend/resume callbacks with runtime pm. It doesn't make sense and isn't being used, so remove. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci-pci-core.c | 12 ------------ 1 file changed, 12 deletions(-) commit 61c951dedce6aa4dbc5456730233c30ac0d30d5d Author: Adrian Hunter Date: Mon Mar 20 19:50:48 2017 +0200 mmc: sdhci-pci: Let devices define how to add the host SDHCI provides more flexibility than simply calling sdhci_add_host(). Make that available by allowing devices to specify their own ->add_host() function. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci-pci-core.c | 5 ++++- drivers/mmc/host/sdhci-pci.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit f12e39dbf3e6eb521435085712addc131d803bfd Author: Adrian Hunter Date: Mon Mar 20 19:50:47 2017 +0200 mmc: sdhci: Add CQE support Add an interrupt hook and helper functions for enabling, disabling and delivering interrupts to a CQE. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci.c | 130 +++++++++++++++++++++++++++++++++++++++++++++-- drivers/mmc/host/sdhci.h | 19 +++++++ 2 files changed, 146 insertions(+), 3 deletions(-) commit f5c1ab821b96419261e7676efb1a355e9d735faf Author: Adrian Hunter Date: Mon Mar 20 19:50:46 2017 +0200 mmc: sdhci: Factor out sdhci_set_default_irqs Factor out sdhci_set_default_irqs(). Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 4180ffa81779551a25772efae1128ac5a9689536 Author: Adrian Hunter Date: Mon Mar 20 19:50:45 2017 +0200 mmc: sdhci: Add sdhci_cleanup_host Add sdhci_cleanup_host() to cleanup __sdhci_add_host(). Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci.c | 37 ++++++++++++++++++++++++++----------- drivers/mmc/host/sdhci.h | 1 + 2 files changed, 27 insertions(+), 11 deletions(-) commit 15becf68b86741be282880196f1e5155b1a9a033 Author: Adrian Hunter Date: Mon Mar 20 19:50:44 2017 +0200 mmc: sdhci: Get rid of 'extern' in header file Get rid of unnecessary 'extern' in header file. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci.h | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit d28981727dccd0e1e867deceaa709bc89f1a5ebc Author: Adrian Hunter Date: Mon Mar 20 19:50:43 2017 +0200 mmc: sdhci: Export sdhci_dumpregs Export sdhci_dumpregs so that it can be called by drivers. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci.c | 3 ++- drivers/mmc/host/sdhci.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 85ad90e2f819a5c7f5d1005da32660eff7680abf Author: Adrian Hunter Date: Mon Mar 20 19:50:42 2017 +0200 mmc: sdhci: Improve register dump print format Ensure all prints start with the mmc host name, and the text all lines up. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci.c | 104 ++++++++++++++++++++++++----------------------- 1 file changed, 53 insertions(+), 51 deletions(-) commit c71024de98f4b596112be9c2698b2d8000382a5a Author: Adrian Hunter Date: Mon Mar 20 19:50:41 2017 +0200 mmc: sdhci: Use sdhci_readl() not readl() in sdhci_dumpregs() Use sdhci io wrappers consistently. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7962302fc3f5b3b31523b518a2dc47849fb7bd06 Author: Adrian Hunter Date: Mon Mar 20 19:50:40 2017 +0200 mmc: sdhci: Add response register to register dump Add response register to register dump. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f421865d5b4ce57013040fb1700edceb43a14b42 Author: Adrian Hunter Date: Mon Mar 20 19:50:39 2017 +0200 mmc: sdhci: Improve debug print format Ensure all debug prints start with the mmc host name. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit 2a85ef25bee6910f4de510c5b574c81e87f38b05 Author: Adrian Hunter Date: Mon Mar 20 19:50:38 2017 +0200 mmc: sdhci: Reduce spin lock usage in sdhci_execute_tuning Tuning execution is already synchronized with respect to other host operations by upper layers "claiming" the host, which also takes care of runtime pm. There can be no requests in progress. Retain the spin lock usage only for ensuring that sending tuning commands is synchronized with respect to the interrupt handler. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci.c | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) commit d1e4f74f911daee4d69b5fd0c81902f7d37de579 Author: Adrian Hunter Date: Mon Mar 20 19:50:37 2017 +0200 mmc: sdhci: Do not use spin lock in set_ios paths The spin lock is not necessary in set_ios. Anything that is racing with changes to the I/O state is already broken. The mmc core already provides synchronization via "claiming" the host. So remove spin_lock and friends from sdhci_set_ios and related callbacks. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci-msm.c | 8 -------- drivers/mmc/host/sdhci-of-arasan.c | 6 ------ drivers/mmc/host/sdhci-of-at91.c | 2 -- drivers/mmc/host/sdhci-pci-core.c | 4 ---- drivers/mmc/host/sdhci-pxav3.c | 5 +---- drivers/mmc/host/sdhci-s3c.c | 4 ---- drivers/mmc/host/sdhci.c | 9 --------- 7 files changed, 1 insertion(+), 37 deletions(-) commit 0c62e6752d0c769aae41bfade6258e5f9aedbe2d Author: Adrian Hunter Date: Mon Mar 20 19:50:36 2017 +0200 mmc: sdhci: Remove ->select_drive_strength() callback Drivers can use the host operation directly, so remove this now unused callback. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci-pci-core.c | 20 -------------------- drivers/mmc/host/sdhci-pci.h | 4 ---- drivers/mmc/host/sdhci.c | 14 -------------- drivers/mmc/host/sdhci.h | 4 ---- 4 files changed, 42 deletions(-) commit 51ced59cc02e0d08f61772c888480b9b1749cef1 Author: Adrian Hunter Date: Mon Mar 20 19:50:35 2017 +0200 mmc: sdhci-pci: Use ACPI DSM to get driver strength for some Intel devices Make use of an Intel ACPI _DSM that provides eMMC driver strength. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci-pci-core.c | 77 +++++++-------------------------------- drivers/mmc/host/sdhci-pci-data.c | 3 -- 2 files changed, 14 insertions(+), 66 deletions(-) commit c959a6b00ff589c652373e27bced5a700bd450f2 Author: Adrian Hunter Date: Mon Mar 20 19:50:34 2017 +0200 mmc: sdhci-pci: Don't re-tune with runtime pm for some Intel devices Make use of an Intel ACPI _DSM that indicates if re-tuning is needed after D3. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci-pci-core.c | 90 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) commit ac9f67b5800b9a96987ec602a34dd256a92ac7ca Author: Adrian Hunter Date: Mon Mar 20 19:50:33 2017 +0200 mmc: sdhci-pci: Let devices define their own private data Let devices define their own private data to facilitate device-specific operations. The size of the private structure is specified in the sdhci_pci_fixes structure, then sdhci_pci_probe_slot() will allocate extra space for it, and sdhci_pci_priv() can be used to get a reference to it. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci-pci-core.c | 3 ++- drivers/mmc/host/sdhci-pci.h | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit d38dcad4e7b48f3d68d5d058f8f4f52a99862e6e Author: Adrian Hunter Date: Mon Mar 20 19:50:32 2017 +0200 mmc: sdhci: Let drivers decide whether to use mmc_retune_needed() with pm Devices might save and restore tuning values so that re-tuning might not be needed after a pm transition. Let drivers decide by pushing the mmc_retune_needed() logic down to them. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci-acpi.c | 12 ++++++++++-- drivers/mmc/host/sdhci-brcmstb.c | 3 +++ drivers/mmc/host/sdhci-esdhc-imx.c | 6 ++++++ drivers/mmc/host/sdhci-of-arasan.c | 3 +++ drivers/mmc/host/sdhci-of-at91.c | 3 +++ drivers/mmc/host/sdhci-of-esdhc.c | 3 +++ drivers/mmc/host/sdhci-pci-core.c | 22 ++++++++++++++++++---- drivers/mmc/host/sdhci-pci.h | 2 ++ drivers/mmc/host/sdhci-pltfm.c | 3 +++ drivers/mmc/host/sdhci-pxav3.c | 5 +++++ drivers/mmc/host/sdhci-s3c.c | 6 ++++++ drivers/mmc/host/sdhci-sirf.c | 3 +++ drivers/mmc/host/sdhci-spear.c | 3 +++ drivers/mmc/host/sdhci-st.c | 6 +++++- drivers/mmc/host/sdhci.c | 4 ---- 15 files changed, 73 insertions(+), 11 deletions(-) commit 5a436cc0af6202265de0d2d2d35f1b4fd85caf3b Author: Adrian Hunter Date: Mon Mar 20 19:50:31 2017 +0200 mmc: sdhci: Optimize delay loops The delay loops for reset and clock enable always take at least 1 ms because they use mdelay(1). However they can take a lot less time e.g. less than 50us. Use ktime and reduce the delay to 10 microseconds per loop. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Tested-by: Ludovic Desroches drivers/mmc/host/sdhci.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 660fc733bd7436f4fa1a351376493e635514ed64 Author: Eric Anholt Date: Wed Mar 8 10:19:03 2017 +0100 mmc: bcm2835: Add new driver for the sdhost controller. The 2835 has two SD controllers: The Arasan sdhci controller (supported by the iproc driver) and a custom sdhost controller. This patch adds a driver for the latter. The sdhci controller supports both sdcard and sdio. The sdhost controller supports the sdcard only, but has better performance. Also note that the rpi3 has sdio wifi, so driving the sdcard with the sdhost controller allows to use the sdhci controller for wifi support. The configuration is done by devicetree via pin muxing. Both SD controller are available on the same pins (2 pin groups = pin 22 to 27 + pin 48 to 53). So it's possible to use both SD controllers at the same time with different pin groups. The code was originally written by Phil Elwell in the downstream Rasbperry Pi tree. In preparation for the upstream merge it was cleaned up and the code base was moderized by Eric Anholt, Stefan Wahren and Gerd Hoffmann. Signed-off-by: Eric Anholt Signed-off-by: Stefan Wahren Signed-off-by: Gerd Hoffmann Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 14 + drivers/mmc/host/Makefile | 1 + drivers/mmc/host/bcm2835.c | 1465 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1480 insertions(+) commit ebdb4d8e0d2577bd8e1d0d54e1c2e9445bdc90e6 Author: Eric Anholt Date: Wed Mar 8 10:19:01 2017 +0100 dt-bindings: Add binding for brcm,bcm2835-sdhost. This is the other SD controller on the platform, which can be swapped to the role of SD card host using pin muxing. Signed-off-by: Eric Anholt Signed-off-by: Gerd Hoffmann Acked-by: Rob Herring Signed-off-by: Ulf Hansson .../bindings/mmc/brcm,bcm2835-sdhost.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 8e11b284eaa86863f700216e4d3c87e7d7b3f44c Author: tcharding Date: Wed Mar 15 19:48:04 2017 +1100 mmc: core: simplify return code File contains multiple functions doing variations on the same thing, sdio_readb(), sdio_writeb()f, sdio_readw(), sdio_writew() etc. Although the functions have very similar logic the code is laid out in a variety of ways. This makes it overly complicated to read. There is a already a nice clean chunk of code, if we use this format for all instances then we will have cleaned up the code, reduced the line count and lessened the cognitive load required while reading. Less lines equals less bugs. Pick the most simple and clear code flow and change all functions to be the same. Signed-off-by: Tobin C. Harding Signed-off-by: Ulf Hansson drivers/mmc/core/sdio_io.c | 42 +++++++++++++----------------------------- 1 file changed, 13 insertions(+), 29 deletions(-) commit 9b980d950e5bcdce6dbc15a9c00ff960beeea28b Author: tcharding Date: Wed Mar 15 19:48:03 2017 +1100 mmc: core: guard dereference of optional parameter Various functions take as parameter an optional pointer. Pointer should be guarded with non-NULL check before dereferencing. Add non-NULL check before dereference of pointer. Signed-off-by: Tobin C. Harding Signed-off-by: Ulf Hansson drivers/mmc/core/sdio_io.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit ce473d5b49d6ef76d35e6d00daa8c5a8fed85943 Author: Michał Zegan Date: Tue Mar 14 21:05:20 2017 +0100 mmc: meson-gx: fix error path when driver initialization fails before enabling clocks This patch fixes the case where meson_mmc_probe function fails before core_clk is enabled. Originally, that would result in a try to disable the core clock, and if it was not already enabled, it would result in a kernel warning. This issue is similar to the one with div_clk. Fix it by introducing another error path used only between successfully enabling the core clock, and successfully enabling the div clock. That would ensure that core clock is disabled only if it was enabled before. Signed-off-by: Michał Zegan Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e8ce6742f809bcb1bbc8d9ce27d72ee1de7a551a Author: Thierry Reding Date: Tue Mar 14 20:01:52 2017 +0100 dt-bindings: mmc: tegra: Document Tegra186 compatible string The SDHCI controller found on Tegra186 in very similar to the controller found on earlier generations of Tegra. Signed-off-by: Thierry Reding Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt | 1 + 1 file changed, 1 insertion(+) commit 4166b3036e930fab7328688d26770a20752e76f0 Author: Thierry Reding Date: Tue Mar 14 20:01:51 2017 +0100 dt-bindings: mmc: tegra: Reformat compatible string list The list of compatible strings is somewhat difficult to read and extend. Reformat it into a list to make it more easily extensible. While at it, also remove the "plus one of the above" clause because it isn't actually valid. Signed-off-by: Thierry Reding Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 9449659d66e2ce03069e89212f5000925058a533 Author: Jisheng Zhang Date: Fri Mar 10 11:17:33 2017 +0800 mmc: sdhci-st: remove unnecessary platform_set_drvdata() call sdhci_pltfm_init() has already set the platform drvdata for us, remove the unnecessary platform_set_drvdata() call. Signed-off-by: Jisheng Zhang Acked-by: Patrice Chotard Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-st.c | 2 -- 1 file changed, 2 deletions(-) commit 0092faf5a871db6b6d730bf54c0ad28575edfb6a Author: Jisheng Zhang Date: Fri Mar 10 11:17:32 2017 +0800 mmc: sdhci-pxav2: remove unnecessary platform_set_drvdata() call sdhci_pltfm_init() has already set the platform drvdata for us, remove the unnecessary platform_set_drvdata() call. Signed-off-by: Jisheng Zhang Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pxav2.c | 2 -- 1 file changed, 2 deletions(-) commit d36f47c54b297f22b766d31422b2044b08473924 Author: Jisheng Zhang Date: Fri Mar 10 11:17:31 2017 +0800 mmc: sdhci-pxav3: remove unnecessary platform_set_drvdata() call sdhci_pltfm_init() has already set the platform drvdata for us, remove the unnecessary platform_set_drvdata() call. Signed-off-by: Jisheng Zhang Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pxav3.c | 2 -- 1 file changed, 2 deletions(-) commit d12990f9900f49e7f834b0d2cf6ccebcf4cb698f Author: Piotr Sroka Date: Mon Mar 6 08:28:41 2017 +0000 mmc: sdhci-cadence: add HS400 enhanced strobe support Add support for HS400ES mode to Cadence SDHCI driver. Signed-off-by: Piotr Sroka Reviewed-by: Masahiro Yamada Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-cadence.c | 57 +++++++++++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 7 deletions(-) commit 4346b7c7941d4f98214af01d04850c91a706322e Author: Thierry Reding Date: Wed Mar 8 20:00:40 2017 +0100 mmc: tegra: Add Tegra186 support The SDHCI controller found on NVIDIA Tegra186 SoCs is very similar to the one on prior generations of Tegra and can be supported by the same driver. Acked-by: Adrian Hunter Signed-off-by: Thierry Reding Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 20567be9d2e64c3f8302ae66d9ca69899d1c5e8a Author: Thierry Reding Date: Wed Mar 8 20:00:39 2017 +0100 mmc: tegra: Support module reset The device tree binding for the SDHCI controller found on Tegra SoCs specifies that a reset control can be provided by the device tree. No code was ever added to support the module reset, which can cause the driver to try and access registers from a module that's in reset. On most Tegra SoC generations doing so would cause a hang. Note that it's unlikely to see this happen because on most platforms these resets will have been deasserted by the bootloader. However the portability can be improved by making sure the driver deasserts the reset before accessing any registers. Since resets are synchronous on Tegra SoCs, the platform driver needs to implement a custom ->remove() callback now to make sure the clock is disabled after the reset is asserted. Acked-by: Adrian Hunter Signed-off-by: Thierry Reding Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 43 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) commit a01fc2a295af6418d665d8f9c18af6017a929065 Author: Michał Zegan Date: Sat Feb 18 18:06:47 2017 +0100 mmc: meson-gx: remove mmc host on device removal The mmc host was added in meson_mmc_probe, but never removed in meson_mmc_remove. Fix that by removing the host before deallocating other resources. Signed-off-by: Michał Zegan Tested-by: Michał Zegan Acked-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 2 ++ 1 file changed, 2 insertions(+) commit eb7c00e1461124ad0e85f1a9a3954d7164809c13 Author: Wolfram Sang Date: Tue Mar 14 11:09:19 2017 +0100 mmc: host: tmio: fill in response from auto cmd12 After we received the dataend interrupt, R1 response register carries the value from the automatically generated stop command. Report that info back to the MMC block layer, so we will be notified in case of e.g. ECC errors which happened during the last transfer. Reviewed-by: Simon Horman Tested-by: Yoshihiro Shimoda Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_pio.c | 3 +++ 1 file changed, 3 insertions(+) commit 022f731e03d190d0e4f52f2b1bd90fae0eadd56d Author: Wolfram Sang Date: Tue Mar 14 11:09:18 2017 +0100 mmc: host: tmio: don't BUG on unsupported stop commands Halting the kernel on an unsupported stop command seems overkill, report the error and say what we already did (due to autocmd12) instead. Reviewed-by: Simon Horman Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_pio.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit d8acd16c84c32a65a291e8f16ba4cb3b6d182e30 Author: Wolfram Sang Date: Tue Mar 14 11:09:17 2017 +0100 mmc: host: tmio: fix minor typos in comments Making sure we match the actual register names. Reviewed-by: Simon Horman Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9afcbf4a6f1995f3b47088764eaef7b56154beb9 Author: Wolfram Sang Date: Tue Mar 14 11:09:16 2017 +0100 mmc: host: tmio: use defines for CTL_STOP_INTERNAL_ACTION values Reviewed-by: Simon Horman Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc.h | 4 ++++ drivers/mmc/host/tmio_mmc_pio.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) commit 52ad9a8e854ca13151f4af8140297f73d49e318a Author: Wolfram Sang Date: Fri Feb 17 19:22:41 2017 +0100 mmc: tmio: ensure end of DMA and SD access are in sync The current code assumes that DMA is finished before SD access end is flagged. Thus, it schedules the 'dma_complete' tasklet in the SD card interrupt routine when DATAEND is set. The assumption is not safe, though. Even by mounting an SD card, it can be seen that sometimes DMA complete is first, sometimes DATAEND. It seems they are usually close enough timewise to not cause problems. However, a customer reported that with CMD53 sometimes things really break apart. As a result, the BSP has a patch which introduces flags for both events and makes sure both flags are set before scheduling the tasklet. The customer accepted the patch, yet it doesn't seem a proper upstream solution to me. This patch refactors the code to replace the tasklet with already existing and more lightweight mechanisms. First of all, we set the callback in a DMA descriptor to automatically get notified when DMA is done. In the callback, we then use a completion to make sure the SD access has already ended. Then, we proceed as before. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc.h | 2 +- drivers/mmc/host/tmio_mmc_dma.c | 58 ++++++++++++++++++++++++----------------- drivers/mmc/host/tmio_mmc_pio.c | 4 +-- 3 files changed, 37 insertions(+), 27 deletions(-) commit 21b22284619bbb201775c125af53f2834eb91674 Author: Alexey Khoroshilov Date: Sat Feb 11 01:54:46 2017 +0300 mmc: sdhci-pxav2: add error handling of clk_prepare_enable() There is no check if clk_prepare_enable() succeed in sdhci_pxav2_probe(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pxav2.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit bb11eff1f1820b9f3bf6578af18b3d18094e7f54 Author: Heiner Kallweit Date: Sat Mar 4 13:37:46 2017 +0100 mmc: meson-gx: replace magic timeout numbers with constants Replace timeout magic numbers with proper constants. Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7cdcc480e4c32b0480233adb196a573ef538a6b6 Author: Heiner Kallweit Date: Sat Mar 4 13:36:45 2017 +0100 mmc: meson-gx: remove member mrq from struct meson_host Struct mmc_command includes a reference to the related mmc_request. Therefore we don't have to store mrq separately in struct meson_host. And we can remove some now unneeded WARN_ON's. Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) commit c01d1219ace5768c18eb33f28d06937819f65b13 Author: Heiner Kallweit Date: Sat Mar 4 13:35:13 2017 +0100 mmc: meson-gx: improve initial configuration Config values which are not changed during runtime we can set in the probe function already. The block size setting is overwritten later in meson_mmc_start_cmd anyway if needed, so it doesn't harm if we remove this setting in meson_mmc_set_ios. In addition write config register only if configuration changed. Don't change the location of clock initialization as in an earlier version of the patch, this change causes a hang. This issue was reported and fix suggested by: Helmut Klein Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit 7b9ebad38fe64644714826966c9a164d90d1c408 Author: Heiner Kallweit Date: Sat Mar 4 13:26:24 2017 +0100 mmc: meson-gx: remove unneeded devm_kstrdup in meson_mmc_clk_init CLK core does a deep copy of init.name, therefore it's fully ok to provide a local variable. Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cac3a47855c24bf060e58977473747ef3de7dedf Author: Heiner Kallweit Date: Sat Mar 4 13:25:14 2017 +0100 mmc: meson-gx: fix error path in meson_mmc_clk_init / meson_mmc_probe The condition should be "if (ret)" as the disable/unprepare is supposed to be executed if the previous command fails. In addition adjust the error path in probe to properly deal with the case that cfg_div_clk can be registered successfully but enable/prepare fails. In this case we shouldn't call clk_disable_unprepare. Reported-by: Michał Zegan Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit e9883ef228e5c128d34143ae87c97f555f79620c Author: Heiner Kallweit Date: Sat Mar 4 13:24:09 2017 +0100 mmc: meson-gx: remove member parent_mux from struct meson_host Member mux_parent isn't used outside meson_mmc_clk_init. So remove it and replace it with a local variable in meson_mmc_clk_init. Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 7558c11378dd0ff1525a0cca5180804f6428af20 Author: Heiner Kallweit Date: Sat Mar 4 13:22:57 2017 +0100 mmc: meson-gx: remove unneeded variable in meson_mmc_clk_init Because the DT requires a fixed number of mux parent clocks, variable mux_parent_count can be replaced with constant MUX_CLK_NUM_PARENTS, so remove it. Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9a1da4df8502dd658db850650137d401b1fe123d Author: Heiner Kallweit Date: Sat Mar 4 13:21:54 2017 +0100 mmc: meson-gx: remove unused members irq, ocr_mask from struct meson_host Member ocr_mask is never used and member irq we can replace with a local variable in meson_mmc_probe. So let's remove both members. Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 3d6c991b3dc9b632de5623adf980ecec399008f3 Author: Heiner Kallweit Date: Sat Mar 4 13:20:44 2017 +0100 mmc: meson-gx: make two functions return void The return value of meson_mmc_request_done and meson_mmc_read_resp isn't used, so make both functions return void. Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 94d765bbfb1910ef8db5699d19907a0756a99d03 Author: Heiner Kallweit Date: Sat Mar 4 13:19:23 2017 +0100 mmc: meson-gx: simplify bounce buffer setting in meson_mmc_start_cmd Core ensures that there are no commands with cmd->data being set and nothing to transfer. And we don't have to reset bit CMD_CFG_DATA_NUM because cmd_cfg was zero-initialized and this bit isn't set. Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit bc2dcc1a2a5e3e796b71f742d6d241ba0523739b Author: Shawn Lin Date: Fri Feb 17 10:59:52 2017 +0800 mmc: dw_mmc: improve dw_mci_reset a bit Too much condition iteration makes the code less readable. Slightly improve it. Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) commit 4dba18defb4c7bbea8af85913cd2dc506178389a Author: Shawn Lin Date: Fri Feb 17 10:59:44 2017 +0800 mmc: dw_mmc: move mci_send_cmd forward to avoid declaration No functional change intended. Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 81 +++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 41 deletions(-) commit 132b3b6aa61864ef9f4fa21e88f2e9dab6caeec3 Author: Shawn Lin Date: Fri Feb 17 10:59:35 2017 +0800 mmc: dw_mmc: remove declaration of dw_mci_card_busy No need to declar it there, remove it. Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 2 -- 1 file changed, 2 deletions(-) commit 671fa142fc034b0fb5c067afe8f0bbc64979f074 Author: Shawn Lin Date: Fri Feb 17 10:56:42 2017 +0800 mmc: dw_mmc: move dw_mci_get_cd forward to avoid declaration No functional change intended. Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 83 +++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 42 deletions(-) commit 8e6db1f65510d57d666fe4d414550bb357c11e0e Author: Shawn Lin Date: Fri Feb 17 10:56:41 2017 +0800 mmc: dw_mmc: move dw_mci_ctrl_reset forward to avoid declaration No functional change intended. Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit 4e7392b2ac6ed95b4ccacdec2f2e9e8e00c929c4 Author: Shawn Lin Date: Fri Feb 17 10:56:40 2017 +0800 mmc: dw_mmc: move dw_mci_reset forward to avoid declaration No functional change intended. Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 131 +++++++++++++++++++++++----------------------- 1 file changed, 65 insertions(+), 66 deletions(-) commit b6d2d81c5c2de6b3c69da3be9b2044dd008dbe45 Author: Shawn Lin Date: Fri Feb 17 10:56:39 2017 +0800 mmc: dw_mmc: improve the timeout polling code Just use the readl_poll_timeout{_atomic} to avold open coding them. Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 92 ++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 53 deletions(-) commit d1ac3ff008fb9a48f91fc15920b4c8db24c0f03e Author: Gilad Ben-Yossef Date: Sun Feb 19 14:46:07 2017 +0200 dm verity: switch to using asynchronous hash crypto API Use of the synchronous digest API limits dm-verity to using pure CPU based algorithm providers and rules out the use of off CPU algorithm providers which are normally asynchronous by nature, potentially freeing CPU cycles. This can reduce performance per Watt in situations such as during boot time when a lot of concurrent file accesses are made to the protected volume. Signed-off-by: Gilad Ben-Yossef CC: Eric Biggers CC: Ondrej Mosnáček Tested-by: Milan Broz Signed-off-by: Mike Snitzer drivers/md/dm-verity-fec.c | 4 +- drivers/md/dm-verity-target.c | 201 +++++++++++++++++++++++++++++------------- drivers/md/dm-verity.h | 23 +++-- 3 files changed, 157 insertions(+), 71 deletions(-) commit a1b89132dc4f61071bdeaab92ea958e0953380a1 Author: Tim Murray Date: Fri Apr 21 11:11:36 2017 +0200 dm crypt: use WQ_HIGHPRI for the IO and crypt workqueues Running dm-crypt with workqueues at the standard priority results in IO competing for CPU time with standard user apps, which can lead to pipeline bubbles and seriously degraded performance. Move to using WQ_HIGHPRI workqueues to protect against that. Signed-off-by: Tim Murray Signed-off-by: Enric Balletbo i Serra Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c82feeec9a014b72c4ffea36648cfb6f81cc1b73 Author: Ondrej Kozina Date: Mon Apr 24 14:21:53 2017 +0200 dm crypt: rewrite (wipe) key in crypto layer using random data The message "key wipe" used to wipe real key stored in crypto layer by rewriting it with zeroes. Since commit 28856a9 ("crypto: xts - consolidate sanity check for keys") this no longer works in FIPS mode for XTS. While running in FIPS mode the crypto key part has to differ from the tweak key. Fixes: 28856a9 ("crypto: xts - consolidate sanity check for keys") Cc: stable@vger.kernel.org Signed-off-by: Ondrej Kozina Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 06eb061f48594aa369f6e852b352410298b317a8 Author: Bart Van Assche Date: Fri Apr 7 16:50:44 2017 -0700 dm mpath: requeue after a small delay if blk_get_request() fails If blk_get_request() returns ENODEV then multipath_clone_and_map() causes a request to be requeued immediately. This can cause a kworker thread to spend 100% of the CPU time of a single core in __blk_mq_run_hw_queue() and also can cause device removal to never finish. Avoid this by only requeuing after a delay if blk_get_request() fails. Additionally, reduce the requeue delay. Cc: stable@vger.kernel.org # 4.9+ Signed-off-by: Bart Van Assche Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 5 ++--- drivers/md/dm-rq.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) commit 117aceb030307dcd431fdcff87ce988d3016c34a Author: Somasundaram Krishnasamy Date: Fri Apr 7 12:14:55 2017 -0700 dm era: save spacemap metadata root after the pre-commit When committing era metadata to disk, it doesn't always save the latest spacemap metadata root in superblock. Due to this, metadata is getting corrupted sometimes when reopening the device. The correct order of update should be, pre-commit (shadows spacemap root), save the spacemap root (newly shadowed block) to in-core superblock and then the final commit. Cc: stable@vger.kernel.org Signed-off-by: Somasundaram Krishnasamy Signed-off-by: Mike Snitzer drivers/md/dm-era-target.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 948f581a53b704b984aa20df009f0a2b4cf7f907 Author: Dennis Yang Date: Tue Apr 18 15:27:06 2017 +0800 dm thin: fix a memory leak when passing discard bio down dm-thin does not free the discard_parent bio after all chained sub bios finished. The following kmemleak report could be observed after pool with discard_passdown option processes discard bios in linux v4.11-rc7. To fix this, we drop the discard_parent bio reference when its endio (passdown_endio) called. unreferenced object 0xffff8803d6b29700 (size 256): comm "kworker/u8:0", pid 30349, jiffies 4379504020 (age 143002.776s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 01 00 00 00 00 00 00 f0 00 00 00 00 00 00 00 00 ................ backtrace: [] kmemleak_alloc+0x49/0xa0 [] kmem_cache_alloc+0xb4/0x100 [] mempool_alloc_slab+0x10/0x20 [] mempool_alloc+0x55/0x150 [] bio_alloc_bioset+0xb9/0x260 [] process_prepared_discard_passdown_pt1+0x40/0x1c0 [dm_thin_pool] [] break_up_discard_bio+0x1a9/0x200 [dm_thin_pool] [] process_discard_cell_passdown+0x24/0x40 [dm_thin_pool] [] process_discard_bio+0xdd/0xf0 [dm_thin_pool] [] do_worker+0xa76/0xd50 [dm_thin_pool] [] process_one_work+0x139/0x370 [] worker_thread+0x61/0x450 [] kthread+0xd6/0xf0 [] ret_from_fork+0x3f/0x70 [] 0xffffffffffffffff Cc: stable@vger.kernel.org Signed-off-by: Dennis Yang Signed-off-by: Mike Snitzer drivers/md/dm-thin.c | 1 + 1 file changed, 1 insertion(+) commit bc636ee94501aedef744f96c57bb2e29cf21aa39 Author: Lorenzo Pieralisi Date: Wed Apr 19 17:49:10 2017 +0100 PCI: versatile: Update PCI config space remap function PCI configuration space should be mapped with a memory region type that generates on the CPU host bus non-posted write transations. Update the driver to use the devm_ioremap_nopost* interface to make sure the correct memory mappings for PCI configuration space are used. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Rob Herring drivers/pci/host/pci-versatile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 89874a1a6e64b6be8e442b1d52a447e2b730ebbd Author: Lorenzo Pieralisi Date: Wed Apr 19 17:49:09 2017 +0100 PCI: keystone-dw: Update PCI config space remap function PCI configuration space should be mapped with a memory region type that generates on the CPU host bus non-posted write transations. Update the driver to use the devm_pci_remap_cfg* interface to make sure the correct memory mappings for PCI configuration space are used. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Murali Karicheri drivers/pci/dwc/pci-keystone-dw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01bd489dba01bcc58b23c669b437330039639c75 Author: Lorenzo Pieralisi Date: Wed Apr 19 17:49:08 2017 +0100 PCI: layerscape: Update PCI config space remap function PCI configuration space should be mapped with a memory region type that generates on the CPU host bus non-posted write transations. Update the driver to use the devm_pci_remap_cfg* interface to make sure the correct memory mappings for PCI configuration space are used. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Mingkai Hu Cc: Minghuan Lian Cc: Roy Zang drivers/pci/dwc/pci-layerscape.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e313a447e73527ef99bd54bc58071956970ca491 Author: Lorenzo Pieralisi Date: Wed Apr 19 17:49:07 2017 +0100 PCI: hisi: Update PCI config space remap function PCI configuration space should be mapped with a memory region type that generates on the CPU host bus non-posted write transations. Update the driver to use the devm_pci_remap_cfg* interface to make sure the correct memory mappings for PCI configuration space are used. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Gabriele Paoloni Signed-off-by: Bjorn Helgaas Cc: Zhou Wang drivers/pci/dwc/pcie-hisi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 3e02dc439b2bcb9911abb1632029a15590ba3b97 Author: Lorenzo Pieralisi Date: Wed Apr 19 17:49:06 2017 +0100 PCI: tegra: Update PCI config space remap function PCI configuration space should be mapped with a memory region type that generates on the CPU host bus non-posted write transations. Update the driver to use correct memory mapping attributes to map config space regions to enforce configuration space non-posted writes behaviour. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Thierry Reding drivers/pci/host/pci-tegra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 26b758f775a368653b9ecb3f7c06b9ec34ccb1be Author: Lorenzo Pieralisi Date: Wed Apr 19 17:49:05 2017 +0100 PCI: xgene: Update PCI config space remap function PCI configuration space should be mapped with a memory region type that generates on the CPU host bus non-posted write transations. Update the driver to use the devm_pci_remap_cfg* interface to make sure the correct memory mappings for PCI configuration space are used. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Tanmay Inamdar drivers/pci/host/pci-xgene.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 53dfa17dfed84fe1adf00a4ff817789737ead410 Author: Lorenzo Pieralisi Date: Wed Apr 19 17:49:04 2017 +0100 PCI: armada8k: Update PCI config space remap function PCI configuration space should be mapped with a memory region type that generates on the CPU host bus non-posted write transations. Update the driver to use the devm_pci_remap_cfg* interface to make sure the correct memory mappings for PCI configuration space are used. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Thomas Petazzoni drivers/pci/dwc/pcie-armada8k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc7b0d495589e03607a925a60a3c969debbc4746 Author: Lorenzo Pieralisi Date: Wed Apr 19 17:49:03 2017 +0100 PCI: designware: Update PCI config space remap function PCI configuration space should be mapped with a memory region type that generates on the CPU host bus non-posted write transations. Update the driver to use the devm_pci_remap_cfg* interface to make sure the correct memory mappings for PCI configuration space are used. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Jingoo Han Cc: Joao Pinto drivers/pci/dwc/pcie-designware-host.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 868564da658b58ab8864124428fa8fff970bf2bd Author: Lorenzo Pieralisi Date: Wed Apr 19 17:49:02 2017 +0100 PCI: iproc-platform: Update PCI config space remap function PCI configuration space should be mapped with a memory region type that generates on the CPU host bus non-posted write transations. Update the driver to use the devm_pci_remap_cfg* interface to make sure the correct memory mappings for PCI configuration space are used. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Ray Jui Cc: Jon Mason drivers/pci/host/pcie-iproc-platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 10c736f784cb0dad0dce6ce938878a754676bc89 Author: Lorenzo Pieralisi Date: Wed Apr 19 17:49:01 2017 +0100 PCI: qcom: Update PCI config space remap function PCI configuration space should be mapped with a memory region type that generates on the CPU host bus non-posted write transations. Update the driver to use the devm_pci_remap_cfg* interface to make sure the correct memory mappings for PCI configuration space are used. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Stanimir Varbanov drivers/pci/dwc/pcie-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 995b76e48fe3cba4820ca42b4e0726cc5715a952 Author: Lorenzo Pieralisi Date: Wed Apr 19 17:49:00 2017 +0100 PCI: rockchip: Update PCI config space remap function PCI configuration space should be mapped with a memory region type that generates on the CPU host bus non-posted write transations. Update the driver to use the devm_pci_remap_cfg* interface to make sure the correct memory mappings for PCI configuration space are used. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Wenrui Li Cc: Shawn Lin drivers/pci/host/pcie-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05043c89ef067ec3c067e89afad8c98974e7a234 Author: Lorenzo Pieralisi Date: Wed Apr 19 17:48:59 2017 +0100 PCI: spear13xx: Update PCI config space remap function PCI configuration space should be mapped with a memory region type that generate on the CPU host bus non-posted write transations. Update the driver to use the devm_pci_remap_cfg* interface to make sure the correct memory mappings for PCI configuration space are used. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Pratyush Anand drivers/pci/dwc/pcie-spear13xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd00f084ed1d501c8cb391c6d98b4f31b2a9a3e2 Author: Lorenzo Pieralisi Date: Wed Apr 19 17:48:58 2017 +0100 PCI: xilinx-nwl: Update PCI config space remap function PCI configuration space should be mapped with a memory region type that generates on the CPU host bus non-posted write transations. Update the driver to use the devm_pci_remap_cfg* interface to make sure the correct memory mappings for PCI configuration space are used. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Bharat Kumar Gogada Cc: Michal Simek drivers/pci/host/pcie-xilinx-nwl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb21f9e82009b8bce01aa242f15c1acbebbd76e2 Author: Lorenzo Pieralisi Date: Wed Apr 19 17:48:57 2017 +0100 PCI: xilinx: Update PCI config space remap function PCI configuration space should be mapped with a memory region type that generates on the CPU host bus non-posted write transations. Update the driver to use the devm_pci_remap_cfg* interface to make sure the correct memory mappings for PCI configuration space are used. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Bharat Kumar Gogada Cc: Michal Simek drivers/pci/host/pcie-xilinx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 053497cec7daecd50313190786872191586ff68c Author: Lorenzo Pieralisi Date: Wed Apr 19 17:48:56 2017 +0100 PCI: ECAM: Map config region with pci_remap_cfgspace() The current ECAM kernel implementation uses ioremap() to map the ECAM configuration space memory region; this is not safe in that on some architectures the ioremap interface provides mappings that allow posted write transactions. This, as highlighted in the PCIe specifications (4.0 - Rev0.3, "Ordering Considerations for the Enhanced Configuration Address Mechanism"), can create ordering issues for software because posted writes transactions on the CPU host bus are non posted in the PCI express fabric. Update the ioremap() interface to use pci_remap_cfgspace() whose mapping attributes guarantee that non-posted writes transactions are issued for memory writes within the ECAM memory mapped address region. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Jayachandran C drivers/pci/ecam.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 490cb6ddb17df5ef5f5eb33c9a34f3033b31c204 Author: Lorenzo Pieralisi Date: Wed Apr 19 17:48:55 2017 +0100 PCI: Implement devm_pci_remap_cfgspace() The introduction of the pci_remap_cfgspace() interface allows PCI host controller drivers to map PCI config space through a dedicated kernel interface. Current PCI host controller drivers use the devm_ioremap_*() devres interfaces to map PCI configuration space regions so in order to update them to the new pci_remap_cfgspace() mapping interface a new set of devres interfaces should be implemented so that PCI host controller drivers can make use of them. Introduce two new functions in the PCI kernel layer and Devres documentation: - devm_pci_remap_cfgspace() - devm_pci_remap_cfg_resource() so that PCI host controller drivers can make use of them to map PCI configuration space regions. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Jonathan Corbet Documentation/driver-model/devres.txt | 6 ++- drivers/pci/pci.c | 82 +++++++++++++++++++++++++++++++++++ include/linux/pci.h | 5 +++ 3 files changed, 91 insertions(+), 2 deletions(-) commit 6524754eff305760d0b31dac468e78057a56f47e Author: Lorenzo Pieralisi Date: Wed Apr 19 17:48:54 2017 +0100 devres: fix devm_ioremap_*() offset parameter kerneldoc description The offset parameter in the devres devm_ioremap_*() functions kerneldoc entries is erroneously defined as BUS offset whereas it is actually a resource address. Since it is actually misleading, fix the devres devm_ioremap_* offset parameter kerneldoc entry by replacing BUS offset with a more suitable description (ie Resource address). Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Tejun Heo lib/devres.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b9cdbe6e39351f0ba6cc0c5bc218443f0898e123 Author: Lorenzo Pieralisi Date: Wed Apr 19 17:48:53 2017 +0100 ARM: Implement pci_remap_cfgspace() interface The PCI bus specification (rev 3.0, 3.2.5 "Transaction Ordering and Posting") defines rules for PCI configuration space transactions ordering and posting, that state that configuration writes have to be non-posted transactions. Current ioremap interface on ARM provides mapping functions that provide "bufferable" writes transactions (ie ioremap uses MT_DEVICE memory type) aka posted writes, so PCI host controller drivers have no arch interface to remap PCI configuration space with memory attributes that comply with the PCI specifications for configuration space. Implement an ARM specific pci_remap_cfgspace() interface that allows to map PCI config memory regions with MT_UNCACHED memory type (ie strongly ordered - non-posted writes), providing a remap function that complies with PCI specifications for config space transactions. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Arnd Bergmann Cc: Russell King arch/arm/include/asm/io.h | 10 ++++++++++ arch/arm/mm/ioremap.c | 7 +++++++ arch/arm/mm/nommu.c | 12 ++++++++++++ 3 files changed, 29 insertions(+) commit f1e209b7f80288a711268af9054a04d3f6900a6b Author: Lorenzo Pieralisi Date: Wed Apr 19 17:48:52 2017 +0100 ARM64: Implement pci_remap_cfgspace() interface The PCI bus specification (rev 3.0, 3.2.5 "Transaction Ordering and Posting") defines rules for PCI configuration space transactions ordering and posting, that state that configuration writes are non-posted transactions. This rule is reinforced by the ARM v8 architecture reference manual (issue A.k, Early Write Acknowledgment) that explicitly recommends that No Early Write Acknowledgment attribute should be used to map PCI configuration (write) transactions. Current ioremap interface on ARM64 implements mapping functions where the Early Write Acknowledgment hint is enabled, so they cannot be used to map PCI configuration space in a PCI specs compliant way. Implement an ARM64 specific pci_remap_cfgspace() interface that allows to map PCI config region with nGnRnE attributes, providing a remap function that complies with PCI specifications and the ARMv8 architecture reference manual recommendations. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Acked-by: Catalin Marinas Cc: Will Deacon arch/arm64/include/asm/io.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7d1fedb6e96a960aa91e4ff70714c3fb09195a5a Author: Vinothkumar Raja Date: Thu Apr 6 22:09:38 2017 -0400 dm btree: fix for dm_btree_find_lowest_key() dm_btree_find_lowest_key() is giving incorrect results. find_key() traverses the btree correctly for finding the highest key, but there is an error in the way it traverses the btree for retrieving the lowest key. dm_btree_find_lowest_key() fetches the first key of the rightmost block of the btree instead of fetching the first key from the leftmost block. Fix this by conditionally passing the correct parameter to value64() based on the @find_highest flag. Cc: stable@vger.kernel.org Signed-off-by: Erez Zadok Signed-off-by: Vinothkumar Raja Signed-off-by: Nidhi Panpalia Signed-off-by: Mike Snitzer drivers/md/persistent-data/dm-btree.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 09d36071cfbc1fec9c93a30704b687829ee5efef Merge: 0d688a0 90fdc56 Author: David S. Miller Date: Mon Apr 24 14:35:45 2017 -0400 Merge branch 'nfp-dma-adjust_head-fixes' Jakub Kicinski says: ==================== nfp: DMA flags, adjust head and fixes This series takes advantage of Alex's DMA_ATTR_SKIP_CPU_SYNC to make XDP packet modifications "correct" from DMA API point of view. It also allows us to parse the metadata before we run XDP at no additional DMA sync cost. That way we can get rid of the metadata memcpy, and remove the last upstream user of bpf_prog->xdp_adjust_head. David's patch adds a way to read capabilities from the management firmware. There are also two net-next fixes. Patch 4 which fixes what seems to be a result of a botched rebase on my part. Patch 5 corrects locking when state of ethernet ports is being refreshed. v3: move the sync from alloc func to the actual give to hw func v2: sync rx buffers before giving them to the card (Alex) ==================== Signed-off-by: David S. Miller commit 90fdc561b08ce292f1d39a62f70012f150583b98 Author: Jakub Kicinski Date: Sat Apr 22 20:17:56 2017 -0700 nfp: remove the refresh of all ports optimization The code refreshing the eth port state was trying to update state of all ports of the card. Unfortunately to safely walk the port list we would have to hold the port lock, which we can't due to lock ordering constraints against rtnl. Make the per-port sync refresh and async refresh of all ports completely separate routines. Fixes: 172f638c93dd ("nfp: add port state refresh") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 3 +- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 13 +++-- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 67 +++++++++++++++------- 3 files changed, 58 insertions(+), 25 deletions(-) commit ee200a7377fb6ce5ea6d631af0905883f0dca6d2 Author: Jakub Kicinski Date: Sat Apr 22 20:17:55 2017 -0700 nfp: fix free list buffer size reporting XDP headroom should not be included in free list buffer size. Fixes: 6fe0c3b43804 ("nfp: add support for xdp_adjust_head()") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 010e2f9cc5b0a9cb730e3238b06dbad54a577816 Author: David Brunecz Date: Sat Apr 22 20:17:54 2017 -0700 nfp: add NSP routine to get static information Retrieve identifying information from the NSP. For now it only contains versions of firmware subcomponents. Signed-off-by: David Brunecz Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/netronome/nfp/nfp_main.c | 7 ++ drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h | 1 + .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 7 ++ .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h | 24 ++++++ .../ethernet/netronome/nfp/nfpcore/nfp_nsp_cmds.c | 89 ++++++++++++++++++++++ 6 files changed, 129 insertions(+) commit e524a6a9cdc979a45da7532645786469a48de2e3 Author: Jakub Kicinski Date: Sat Apr 22 20:17:53 2017 -0700 nfp: parse metadata prepend before XDP runs Calling memcpy to shift metadata out of the way for XDP to run seems like an overkill. The most common metadata contents are 8 bytes containing type and flow hash. Simply parse the metadata before we run XDP. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 6 ++ .../net/ethernet/netronome/nfp/nfp_net_common.c | 67 +++++++++++----------- 2 files changed, 40 insertions(+), 33 deletions(-) commit 5cd4fbeab21b89e08df4590b2020f2e5f60c0d19 Author: Jakub Kicinski Date: Sat Apr 22 20:17:52 2017 -0700 nfp: make use of the DMA_ATTR_SKIP_CPU_SYNC attr DMA unmap may destroy changes CPU made to the buffer. To make XDP run correctly on non-x86 platforms we should use the DMA_ATTR_SKIP_CPU_SYNC attribute. Thanks to using the attribute we can now push the sync operation to the common code path from XDP handler. A little bit of variable name reshuffling is required to bring the code back to readable state. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_common.c | 53 ++++++++++++++-------- 1 file changed, 35 insertions(+), 18 deletions(-) commit e36215d87f301f9567c8c99fd34e6c3521a94ddf Author: Matthias Kaehlcke Date: Mon Apr 17 11:05:03 2017 -0700 dm ioctl: remove double parentheses The extra pair of parantheses is not needed and causes clang to generate warnings about the DM_DEV_CREATE_CMD comparison in validate_params(). Also remove another double parentheses that doesn't cause a warning. Signed-off-by: Matthias Kaehlcke Signed-off-by: Mike Snitzer drivers/md/dm-ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d688a0d337628ded9bb05c99f35fac7424af4f8 Merge: 3ec21b6 a577d8f Author: David S. Miller Date: Mon Apr 24 14:30:47 2017 -0400 Merge branch 'cls_flower-MPLS' Benjamin LaHaise says: ==================== flower: add MPLS matching support This patch series adds support for parsing MPLS flows in the flow dissector and the flower classifier. Each of the MPLS TTL, BOS, TC and Label fields can be used for matching. v2: incorporate style feedback, move #defines to linux/include/mpls.h Note: this omits Jiri's request to remove tabs between the type and field names in struct declarations. This would be inconsistent with numerous other struct definitions. ==================== Signed-off-by: David S. Miller commit a577d8f793ff2fd514915686079e3c09bcf0df11 Author: Benjamin LaHaise Date: Sat Apr 22 16:52:47 2017 -0400 cls_flower: add support for matching MPLS fields (v2) Add support to the tc flower classifier to match based on fields in MPLS labels (TTL, Bottom of Stack, TC field, Label). Signed-off-by: Benjamin LaHaise Signed-off-by: Benjamin LaHaise Reviewed-by: Jakub Kicinski Cc: "David S. Miller" Cc: Simon Horman Cc: Jamal Hadi Salim Cc: Cong Wang Cc: Jiri Pirko Cc: Eric Dumazet Cc: Hadar Hen Zion Cc: Gao Feng Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/uapi/linux/pkt_cls.h | 5 +++ net/sched/cls_flower.c | 74 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) commit 029c1ecbb2429cf08c7bd2de81e929f81feea914 Author: Benjamin LaHaise Date: Sat Apr 22 16:52:46 2017 -0400 flow_dissector: add mpls support (v2) Add support for parsing MPLS flows to the flow dissector in preparation for adding MPLS match support to cls_flower. Signed-off-by: Benjamin LaHaise Signed-off-by: Benjamin LaHaise Reviewed-by: Jakub Kicinski Cc: "David S. Miller" Cc: Simon Horman Cc: Jamal Hadi Salim Cc: Cong Wang Cc: Jiri Pirko Cc: Eric Dumazet Cc: Hadar Hen Zion Cc: Gao Feng Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/linux/mpls.h | 5 +++++ include/net/flow_dissector.h | 8 ++++++++ net/core/flow_dissector.c | 25 ++++++++++++++++++++++--- 3 files changed, 35 insertions(+), 3 deletions(-) commit 3ec21b6580792c9890e265a46488afbe7dabc5d6 Merge: bc95cd8 59450f8 Author: David S. Miller Date: Mon Apr 24 14:27:18 2017 -0400 Merge branch 'tcp-fastopen-middlebox-fixes' Wei Wang says: ==================== net/tcp_fastopen: Fix for various TFO firewall issues Currently there are still some firewall issues in the middlebox which make the middlebox drop packets silently for TFO sockets. This kind of issue is hard to be detected by the end client. This patch series tries to detect such issues in the kernel and disable TFO temporarily. More details about the issues and the fixes are included in the following patches. ==================== Signed-off-by: David S. Miller commit 59450f8d83cb6743178c7996a6c6fc78ff3e6db9 Author: Wei Wang Date: Thu Apr 20 14:45:48 2017 -0700 net/tcp_fastopen: Remove mss check in tcp_write_timeout() Christoph Paasch from Apple found another firewall issue for TFO: After successful 3WHS using TFO, server and client starts to exchange data. Afterwards, a 10s idle time occurs on this connection. After that, firewall starts to drop every packet on this connection. The fix for this issue is to extend existing firewall blackhole detection logic in tcp_write_timeout() by removing the mss check. Signed-off-by: Wei Wang Acked-by: Yuchung Cheng Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_timer.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 46c2fa39877ed70415ee2b1acfb9129e956f6de4 Author: Wei Wang Date: Thu Apr 20 14:45:47 2017 -0700 net/tcp_fastopen: Add snmp counter for blackhole detection This counter records the number of times the firewall blackhole issue is detected and active TFO is disabled. Signed-off-by: Wei Wang Acked-by: Yuchung Cheng Acked-by: Neal Cardwell Signed-off-by: David S. Miller include/net/tcp.h | 2 +- include/uapi/linux/snmp.h | 1 + net/ipv4/proc.c | 1 + net/ipv4/tcp_fastopen.c | 5 +++-- net/ipv4/tcp_input.c | 4 ++-- 5 files changed, 8 insertions(+), 5 deletions(-) commit cf1ef3f0719b4dcb74810ed507e2a2540f9811b4 Author: Wei Wang Date: Thu Apr 20 14:45:46 2017 -0700 net/tcp_fastopen: Disable active side TFO in certain scenarios Middlebox firewall issues can potentially cause server's data being blackholed after a successful 3WHS using TFO. Following are the related reports from Apple: https://www.nanog.org/sites/default/files/Paasch_Network_Support.pdf Slide 31 identifies an issue where the client ACK to the server's data sent during a TFO'd handshake is dropped. C ---> syn-data ---> S C <--- syn/ack ----- S C (accept & write) C <---- data ------- S C ----- ACK -> X S [retry and timeout] https://www.ietf.org/proceedings/94/slides/slides-94-tcpm-13.pdf Slide 5 shows a similar situation that the server's data gets dropped after 3WHS. C ---- syn-data ---> S C <--- syn/ack ----- S C ---- ack --------> S S (accept & write) C? X <- data ------ S [retry and timeout] This is the worst failure b/c the client can not detect such behavior to mitigate the situation (such as disabling TFO). Failing to proceed, the application (e.g., SSL library) may simply timeout and retry with TFO again, and the process repeats indefinitely. The proposed solution is to disable active TFO globally under the following circumstances: 1. client side TFO socket detects out of order FIN 2. client side TFO socket receives out of order RST We disable active side TFO globally for 1hr at first. Then if it happens again, we disable it for 2h, then 4h, 8h, ... And we reset the timeout to 1hr if a client side TFO sockets not opened on loopback has successfully received data segs from server. And we examine this condition during close(). The rational behind it is that when such firewall issue happens, application running on the client should eventually close the socket as it is not able to get the data it is expecting. Or application running on the server should close the socket as it is not able to receive any response from client. In both cases, out of order FIN or RST will get received on the client given that the firewall will not block them as no data are in those frames. And we want to disable active TFO globally as it helps if the middle box is very close to the client and most of the connections are likely to fail. Also, add a debug sysctl: tcp_fastopen_blackhole_detect_timeout_sec: the initial timeout to use when firewall blackhole issue happens. This can be set and read. When setting it to 0, it means to disable the active disable logic. Signed-off-by: Wei Wang Acked-by: Yuchung Cheng Acked-by: Neal Cardwell Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 8 +++ include/linux/tcp.h | 1 + include/net/tcp.h | 6 ++ net/ipv4/sysctl_net_ipv4.c | 21 +++++++ net/ipv4/tcp.c | 1 + net/ipv4/tcp_fastopen.c | 101 +++++++++++++++++++++++++++++++++ net/ipv4/tcp_input.c | 23 ++++++-- net/ipv4/tcp_ipv4.c | 3 + 8 files changed, 160 insertions(+), 4 deletions(-) commit 684c581f10f5e21976d9dcd85a190f37ddc843dd Author: Viresh Kumar Date: Thu Apr 20 16:25:07 2017 +0530 arm64: dts: exynos: Use - instead of @ for DT OPP entries Compiling the DT file with W=1, DTC warns like follows: Warning (unit_address_vs_reg): Node /opp_table0/opp@1000000000 has a unit name, but no reg property Fix this by replacing '@' with '-' as the OPP nodes will never have a "reg" property. Reported-by: Krzysztof Kozlowski Reported-by: Masahiro Yamada Suggested-by: Mark Rutland Signed-off-by: Viresh Kumar Reviewed-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring [k.kozlowski: Split patch per ARM and ARM64] Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433-bus.dtsi | 48 ++++++++++++------------- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 50 +++++++++++++------------- 2 files changed, 49 insertions(+), 49 deletions(-) commit bc95cd8e8b2fc779b96ed4d7a2608c6a0e8dc240 Merge: 58c4c6a 8bf3198 Author: David S. Miller Date: Mon Apr 24 14:11:10 2017 -0400 Merge tag 'mlx5-updates-2017-04-22' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2017-04-22 Sparse and compiler warnings fixes from Stephen Hemminger. From Roi Dayan and Or Gerlitz, Add devlink and mlx5 support for controlling E-Switch encapsulation mode, this knob will enable HW support for applying encapsulation/decapsulation to VF traffic as part of SRIOV e-switch offloading. ==================== Signed-off-by: David S. Miller commit 58c4c6a3f7cb3a142674ba34e7e67e2d585b9787 Author: David Ahern Date: Sat Apr 22 09:33:16 2017 -0700 net: add rcu locking when changing early demux systemd-sysctl is triggering a suspicious RCU usage message when net.ipv4.tcp_early_demux or net.ipv4.udp_early_demux is changed via a sysctl config file: [ 33.896184] =============================== [ 33.899558] [ ERR: suspicious RCU usage. ] [ 33.900624] 4.11.0-rc7+ #104 Not tainted [ 33.901698] ------------------------------- [ 33.903059] /home/dsa/kernel-2.git/net/ipv4/sysctl_net_ipv4.c:305 suspicious rcu_dereference_check() usage! [ 33.905724] other info that might help us debug this: [ 33.907656] rcu_scheduler_active = 2, debug_locks = 0 [ 33.909288] 1 lock held by systemd-sysctl/143: [ 33.910373] #0: (sb_writers#5){.+.+.+}, at: [] file_start_write+0x45/0x48 [ 33.912407] stack backtrace: [ 33.914018] CPU: 0 PID: 143 Comm: systemd-sysctl Not tainted 4.11.0-rc7+ #104 [ 33.915631] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [ 33.917870] Call Trace: [ 33.918431] dump_stack+0x81/0xb6 [ 33.919241] lockdep_rcu_suspicious+0x10f/0x118 [ 33.920263] proc_configure_early_demux+0x65/0x10a [ 33.921391] proc_udp_early_demux+0x3a/0x41 add rcu locking to proc_configure_early_demux. Fixes: dddb64bcb3461 ("net: Add sysctl to toggle early demux for tcp and udp") Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/sysctl_net_ipv4.c | 3 +++ 1 file changed, 3 insertions(+) commit 6bd3d1929246bb0cf4f3bd6e25a0ba442b0de845 Author: Peter Tirsek Date: Tue Apr 18 12:39:58 2017 -0500 netfilter: xt_socket: Fix broken IPv6 handling Commit 834184b1f3a4 ("netfilter: defrag: only register defrag functionality if needed") used the outdated XT_SOCKET_HAVE_IPV6 macro which was removed earlier in commit 8db4c5be88f6 ("netfilter: move socket lookup infrastructure to nf_socket_ipv{4,6}.c"). With that macro never being defined, the xt_socket match emits an "Unknown family 10" warning when used with IPv6: WARNING: CPU: 0 PID: 1377 at net/netfilter/xt_socket.c:160 socket_mt_enable_defrag+0x47/0x50 [xt_socket] Unknown family 10 Modules linked in: xt_socket nf_socket_ipv4 nf_socket_ipv6 nf_defrag_ipv4 [...] CPU: 0 PID: 1377 Comm: ip6tables-resto Not tainted 4.10.10 #1 Hardware name: [...] Call Trace: ? __warn+0xe7/0x100 ? socket_mt_enable_defrag+0x47/0x50 [xt_socket] ? socket_mt_enable_defrag+0x47/0x50 [xt_socket] ? warn_slowpath_fmt+0x39/0x40 ? socket_mt_enable_defrag+0x47/0x50 [xt_socket] ? socket_mt_v2_check+0x12/0x40 [xt_socket] ? xt_check_match+0x6b/0x1a0 [x_tables] ? xt_find_match+0x93/0xd0 [x_tables] ? xt_request_find_match+0x20/0x80 [x_tables] ? translate_table+0x48e/0x870 [ip6_tables] ? translate_table+0x577/0x870 [ip6_tables] ? walk_component+0x3a/0x200 ? kmalloc_order+0x1d/0x50 ? do_ip6t_set_ctl+0x181/0x490 [ip6_tables] ? filename_lookup+0xa5/0x120 ? nf_setsockopt+0x3a/0x60 ? ipv6_setsockopt+0xb0/0xc0 ? sock_common_setsockopt+0x23/0x30 ? SyS_socketcall+0x41d/0x630 ? vfs_read+0xfa/0x120 ? do_fast_syscall_32+0x7a/0x110 ? entry_SYSENTER_32+0x47/0x71 This patch brings the conditional back in line with how the rest of the file handles IPv6. Fixes: 834184b1f3a4 ("netfilter: defrag: only register defrag functionality if needed") Signed-off-by: Peter Tirsek Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64f3967c7aacbfa1f0614cdb1a23e3f7e76eb61b Author: Liping Zhang Date: Mon Apr 17 21:18:58 2017 +0800 netfilter: ctnetlink: acquire ct->lock before operating nf_ct_seqadj We should acquire the ct->lock before accessing or modifying the nf_ct_seqadj, as another CPU may modify the nf_ct_seqadj at the same time during its packet proccessing. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_netlink.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 53b56da83d7899de375a9de153fd7f5397de85e6 Author: Liping Zhang Date: Mon Apr 17 21:18:57 2017 +0800 netfilter: ctnetlink: make it safer when updating ct->status After converting to use rcu for conntrack hash, one CPU may update the ct->status via ctnetlink, while another CPU may process the packets and update the ct->status. So the non-atomic operation "ct->status |= status;" via ctnetlink becomes unsafe, and this may clear the IPS_DYING_BIT bit set by another CPU unexpectedly. For example: CPU0 CPU1 ctnetlink_change_status __nf_conntrack_find_get old = ct->status nf_ct_gc_expired - nf_ct_kill - test_and_set_bit(IPS_DYING_BIT new = old | status; - ct->status = new; <-- oops, _DYING_ is cleared! Now using a series of atomic bit operation to solve the above issue. Also note, user shouldn't set IPS_TEMPLATE, IPS_SEQ_ADJUST directly, so make these two bits be unchangable too. If we set the IPS_TEMPLATE_BIT, ct will be freed by nf_ct_tmpl_free, but actually it is alloced by nf_conntrack_alloc. If we set the IPS_SEQ_ADJUST_BIT, this may cause the NULL pointer deference, as the nfct_seqadj(ct) maybe NULL. Last, add some comments to describe the logic change due to the commit a963d710f367 ("netfilter: ctnetlink: Fix regression in CTA_STATUS processing"), which makes me feel a little confusing. Fixes: 76507f69c44e ("[NETFILTER]: nf_conntrack: use RCU for conntrack hash") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_conntrack_common.h | 13 ++++++--- net/netfilter/nf_conntrack_netlink.c | 33 ++++++++++++++++------ 2 files changed, 33 insertions(+), 13 deletions(-) commit 88be4c09d9008f9ff337cbf48c5d0f06c8f872e7 Author: Liping Zhang Date: Mon Apr 17 21:18:56 2017 +0800 netfilter: ctnetlink: fix deadlock due to acquire _expect_lock twice Currently, ctnetlink_change_conntrack is always protected by _expect_lock, but this will cause a deadlock when deleting the helper from a conntrack, as the _expect_lock will be acquired again by nf_ct_remove_expectations: CPU0 ---- lock(nf_conntrack_expect_lock); lock(nf_conntrack_expect_lock); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by lt-conntrack_gr/12853: #0: (&table[i].mutex){+.+.+.}, at: [] nfnetlink_rcv_msg+0x399/0x6a9 [nfnetlink] #1: (nf_conntrack_expect_lock){+.....}, at: [] ctnetlink_new_conntrack+0x17f/0x408 [nf_conntrack_netlink] Call Trace: dump_stack+0x85/0xc2 __lock_acquire+0x1608/0x1680 ? ctnetlink_parse_tuple_proto+0x10f/0x1c0 [nf_conntrack_netlink] lock_acquire+0x100/0x1f0 ? nf_ct_remove_expectations+0x32/0x90 [nf_conntrack] _raw_spin_lock_bh+0x3f/0x50 ? nf_ct_remove_expectations+0x32/0x90 [nf_conntrack] nf_ct_remove_expectations+0x32/0x90 [nf_conntrack] ctnetlink_change_helper+0xc6/0x190 [nf_conntrack_netlink] ctnetlink_new_conntrack+0x1b2/0x408 [nf_conntrack_netlink] nfnetlink_rcv_msg+0x60a/0x6a9 [nfnetlink] ? nfnetlink_rcv_msg+0x1b9/0x6a9 [nfnetlink] ? nfnetlink_bind+0x1a0/0x1a0 [nfnetlink] netlink_rcv_skb+0xa4/0xc0 nfnetlink_rcv+0x87/0x770 [nfnetlink] Since the operations are unrelated to nf_ct_expect, so we can drop the _expect_lock. Also note, after removing the _expect_lock protection, another CPU may invoke nf_conntrack_helper_unregister, so we should use rcu_read_lock to protect __nf_conntrack_helper_find invoked by ctnetlink_change_helper. Fixes: ca7433df3a67 ("netfilter: conntrack: seperate expect locking from nf_conntrack_lock") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_netlink.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 14e567615679a9999ce6bf4f23d6c9e00f03e00e Author: Liping Zhang Date: Mon Apr 17 21:18:55 2017 +0800 netfilter: ctnetlink: drop the incorrect cthelper module request First, when creating a new ct, we will invoke request_module to try to load the related inkernel cthelper. So there's no need to call the request_module again when updating the ct helpinfo. Second, ctnetlink_change_helper may be called with rcu_read_lock held, i.e. rcu_read_lock -> nfqnl_recv_verdict -> nfqnl_ct_parse -> ctnetlink_glue_parse -> ctnetlink_glue_parse_ct -> ctnetlink_change_helper. But the request_module invocation may sleep, so we can't call it with the rcu_read_lock held. Remove it now. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_netlink.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit ad0cb27ce99ccffcfd4e0b08ea2ee01f440e8eac Merge: 11a9ec4 d160b74 Author: David S. Miller Date: Mon Apr 24 14:05:40 2017 -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 2017-04-22 Here are some more Bluetooth patches (and one 802.15.4 patch) in the bluetooth-next tree targeting the 4.12 kernel. Most of them are pure fixes. Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 54a5f9d9abab639039eb7288bdc26c9c67f4e79b Author: Liping Zhang Date: Sat Apr 15 23:37:36 2017 +0800 netfilter: nft_set_bitmap: free dummy elements when destroy the set We forget to free dummy elements when deleting the set. So when I was running nft-test.py, I saw many kmemleak warnings: kmemleak: 1344 new suspected memory leaks ... # cat /sys/kernel/debug/kmemleak unreferenced object 0xffff8800631345c8 (size 32): comm "nft", pid 9075, jiffies 4295743309 (age 1354.815s) hex dump (first 32 bytes): f8 63 13 63 00 88 ff ff 88 79 13 63 00 88 ff ff .c.c.....y.c.... 04 0c 00 00 00 00 00 00 00 00 00 00 08 03 00 00 ................ backtrace: [] kmemleak_alloc+0x4a/0xa0 [] __kmalloc+0x164/0x310 [] nft_set_elem_init+0x3d/0x1b0 [nf_tables] [] nft_add_set_elem+0x45a/0x8c0 [nf_tables] [] nf_tables_newsetelem+0x105/0x1d0 [nf_tables] [] nfnetlink_rcv+0x414/0x770 [nfnetlink] [] netlink_unicast+0x1f6/0x310 [] netlink_sendmsg+0x306/0x3b0 ... Fixes: e920dde516088 ("netfilter: nft_set_bitmap: keep a list of dummy elements") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_bitmap.c | 5 +++++ 1 file changed, 5 insertions(+) commit 66e5a6b18bd09d0431e97cd3c162e76c5c2aebba Author: Liping Zhang Date: Sat Apr 15 19:27:42 2017 +0800 netfilter: nf_ct_helper: permit cthelpers with different names via nfnetlink cthelpers added via nfnetlink may have the same tuple, i.e. except for the l3proto and l4proto, other fields are all zero. So even with the different names, we will also fail to add them: # nfct helper add ssdp inet udp # nfct helper add tftp inet udp nfct v1.4.3: netlink error: File exists So in order to avoid unpredictable behaviour, we should: 1. cthelpers can be selected by nft ct helper obj or xt_CT target, so report error if duplicated { name, l3proto, l4proto } tuple exist. 2. cthelpers can be selected by nf_ct_tuple_src_mask_cmp when nf_ct_auto_assign_helper is enabled, so also report error if duplicated { l3proto, l4proto, src-port } tuple exist. Also note, if the cthelper is added from userspace, then the src-port will always be zero, it's invalid for nf_ct_auto_assign_helper, so there's no need to check the second point listed above. Fixes: 893e093c786c ("netfilter: nf_ct_helper: bail out on duplicated helpers") Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_helper.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit cf5d70918877c6a6655dc1e92e2ebb661ce904fd Author: Jarno Rajahalme Date: Fri Apr 14 14:26:38 2017 -0700 openvswitch: Delete conntrack entry clashing with an expectation. Conntrack helpers do not check for a potentially clashing conntrack entry when creating a new expectation. Also, nf_conntrack_in() will check expectations (via init_conntrack()) only if a conntrack entry can not be found. The expectation for a packet which also matches an existing conntrack entry will not be removed by conntrack, and is currently handled inconsistently by OVS, as OVS expects the expectation to be removed when the connection tracking entry matching that expectation is confirmed. It should be noted that normally an IP stack would not allow reuse of a 5-tuple of an old (possibly lingering) connection for a new data connection, so this is somewhat unlikely corner case. However, it is possible that a misbehaving source could cause conntrack entries be created that could then interfere with new related connections. Fix this in the OVS module by deleting the clashing conntrack entry after an expectation has been matched. This causes the following nf_conntrack_in() call also find the expectation and remove it when creating the new conntrack entry, as well as the forthcoming reply direction packets to match the new related connection instead of the old clashing conntrack entry. Fixes: 7f8a436eaa2c ("openvswitch: Add conntrack action") Reported-by: Yang Song Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Signed-off-by: Pablo Neira Ayuso net/openvswitch/conntrack.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit 470acf55a021713869b9bcc967268ac90c8a0fac Author: Gao Feng Date: Fri Apr 14 10:00:08 2017 +0800 netfilter: xt_CT: fix refcnt leak on error path There are two cases which causes refcnt leak. 1. When nf_ct_timeout_ext_add failed in xt_ct_set_timeout, it should free the timeout refcnt. Now goto the err_put_timeout error handler instead of going ahead. 2. When the time policy is not found, we should call module_put. Otherwise, the related cthelper module cannot be removed anymore. It is easy to reproduce by typing the following command: # iptables -t raw -A OUTPUT -p tcp -j CT --helper ftp --timeout xxx Signed-off-by: Gao Feng Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_CT.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 11a9ec43302fc8d7fca0dc26b75234c20ff4c464 Author: Colin Ian King Date: Sat Apr 22 13:22:01 2017 +0100 net: netcp: fix spelling mistake: "memomry" -> "memory" Trivial fix to spelling mistake in dev_err message and rejoin line. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp_ethss.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4cc17bcf7f39088b5b68e3689f1653184c7e7ad4 Author: Geliang Tang Date: Sat Apr 22 09:21:10 2017 +0800 net: atheros: atl1: use offset_in_page() macro Use offset_in_page() macro instead of open-coding. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller drivers/net/ethernet/atheros/atlx/atl1.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 4dd42b94b4d25c0f99ee9ba0748dd315653b6a34 Merge: 1206455 9e54e32 Author: David S. Miller Date: Mon Apr 24 13:54:48 2017 -0400 Merge branch 'bnxt_en-misc-next' Michael Chan says: ==================== bnxt_en: Updates for net-next. Miscellaneous updates include passing DCBX RoCE VLAN priority to firmware, checking one more new firmware flag before allowing DCBX to run on the host, adding 100Gbps speed support, adding check to disallow speed settings on Multi-host NICs, and a minor fix for reporting VF attributes. ==================== Signed-off-by: David S. Miller commit 9e54e322ded40f424dcb5a13508e2556919ce12a Author: Deepak Khungar Date: Fri Apr 21 20:11:26 2017 -0400 bnxt_en: Restrict a PF in Multi-Host mode from changing port PHY configuration This change restricts the PF in multi-host mode from setting any port level PHY configuration. The settings are controlled by firmware in Multi-Host mode. Signed-off-by: Deepak Khungar Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 13 +++++++++---- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 +++- 2 files changed, 12 insertions(+), 5 deletions(-) commit 7d63818a35851cf00867248d5ab50a8fe8df5943 Author: Michael Chan Date: Fri Apr 21 20:11:25 2017 -0400 bnxt_en: Check the FW_LLDP_AGENT flag before allowing DCBX host agent. Check the additional flag in bnxt_hwrm_func_qcfg() before allowing DCBX to be done in host mode. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 38a21b34aacd4db7b7b74c61afae42ea6718448d Author: Deepak Khungar Date: Fri Apr 21 20:11:24 2017 -0400 bnxt_en: Add 100G link speed reporting for BCM57454 ASIC in ethtool Added support for 100G link speed reporting for Broadcom BCM57454 ASIC in ethtool command. Signed-off-by: Deepak Khungar Signed-off-by: Ray Jui Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +++-- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 ++ drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 14 +++++++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) commit f0249056eaf2b9a17b2b76a6e099e9b7877e187d Author: Michael Chan Date: Fri Apr 21 20:11:23 2017 -0400 bnxt_en: Fix VF attributes reporting. The .ndo_get_vf_config() is returning the wrong qos attribute. Fix the code that checks and reports the qos and spoofchk attributes. The BNXT_VF_QOS and BNXT_VF_LINK_UP flags should not be set by default during init. time. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit a82fba8dbfb522bd19b1644bf599135680fd0122 Author: Michael Chan Date: Fri Apr 21 20:11:22 2017 -0400 bnxt_en: Pass DCB RoCE app priority to firmware. When the driver gets the RoCE app priority set/delete call through DCBNL, the driver will send the information to the firmware to set up the priority VLAN tag for RDMA traffic. [ New version using the common ETH_P_IBOE constant in if_ether.h ] Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c | 108 +++++++++++++++++++++++++- drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.h | 1 + 2 files changed, 108 insertions(+), 1 deletion(-) commit 120645513f55a4ac5543120d9e79925d30a0156f Author: Jarno Rajahalme Date: Fri Apr 21 16:48:06 2017 -0700 openvswitch: Add eventmask support to CT action. Add a new optional conntrack action attribute OVS_CT_ATTR_EVENTMASK, which can be used in conjunction with the commit flag (OVS_CT_ATTR_COMMIT) to set the mask of bits specifying which conntrack events (IPCT_*) should be delivered via the Netfilter netlink multicast groups. Default behavior depends on the system configuration, but typically a lot of events are delivered. This can be very chatty for the NFNLGRP_CONNTRACK_UPDATE group, even if only some types of events are of interest. Netfilter core init_conntrack() adds the event cache extension, so we only need to set the ctmask value. However, if the system is configured without support for events, the setting will be skipped due to extension not being found. Signed-off-by: Jarno Rajahalme Reviewed-by: Greg Rose Acked-by: Joe Stringer Signed-off-by: David S. Miller include/uapi/linux/openvswitch.h | 12 ++++++++++++ net/openvswitch/conntrack.c | 27 +++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) commit abd0a4f2b41812e9ba334945e256909e3d28da57 Author: Jarno Rajahalme Date: Fri Apr 21 16:48:05 2017 -0700 openvswitch: Typo fix. Fix typo in a comment. Signed-off-by: Jarno Rajahalme Acked-by: Greg Rose Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd9f069d876d6a96eb0f731b1e293145352d5f4f Author: Colin Ian King Date: Sat Apr 22 13:28:42 2017 +0100 ASoC: wm5100: fix spelling mistake: "micropone" -> "microphone" Trivial fix to spelling mistake in dev_err message Signed-off-by: Colin Ian King Acked-by: Linus Walleij Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm5100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f2cf73ed65b598514e4858ca3d602710718ab93 Author: Takashi Iwai Date: Sun Apr 23 09:22:56 2017 +0200 ASoC: bytcr_rt5640: Allow quirk set via module option The bytcr-rt5640 driver has a few quirk setups depending on the board, where the quirk value is set by DMI matching. When you have a new device to add the support, you often experience to try the different quirk by trial-and-error. Or, you may have a development model that still has no proper DMI string. In either case, you'd need to compile the driver at each time. This patch introduces a module option to override the quirk value on the fly. User can boot like snd-soc-sst-bytcr-rt5640.quirk=0x4004 to override the default value without recompilation. It's a raw value, so user needs to check the source code for the meaning of each bit. Signed-off-by: Takashi Iwai Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 861886d338f7dd802be972e770a695bba62f397a Author: Takashi Iwai Date: Mon Apr 24 08:54:42 2017 +0200 ASoC: Call snd_soc_set_dmi_name() unconditionally Since recently UCM can pick up a configuration specific to the board via card longname field, and we introduced a helper function snd_soc_set_dmi_name() for that. So far, it was used only in one place (sound/soc/intel/boards/broadwell.c), but it should be more widely applied. This patch puts a big hammer for that: it lets snd_soc_register_card() calling snd_soc_set_dmi_name() unconditionally, so that all x86 devices get the better longname string. This would have no impact for other systems without DMI support, as snd_soc_set_dmi_name() is no-op on them. Signed-off-by: Takashi Iwai Acked-by: Liam Girdwood Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/broadwell.c | 3 --- sound/soc/soc-core.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) commit 1f5a4535db41bd2bb8d1a15f098cb2921d6c1317 Author: Takashi Iwai Date: Mon Apr 24 08:54:41 2017 +0200 ASoC: Provide a dummy wrapper of snd_soc_set_dmi_name() For systems without DMI, it makes no sense to have the code. Signed-off-by: Takashi Iwai Acked-by: Liam Girdwood Acked-by: Vinod Koul Signed-off-by: Mark Brown include/sound/soc.h | 8 ++++++++ sound/soc/soc-core.c | 2 ++ 2 files changed, 10 insertions(+) commit 8f7206d69ab8c8fb8620566338d54c4b9b80477a Author: Fabio Estevam Date: Sun Apr 23 20:20:33 2017 -0300 ASoC: imx-wm8962: Remove global variables Currently the following variables are global: - card_priv, sample_rate and sample_format ,which is not a good idea as it prevents the usage of multiple instances. Make sample_rate and sample_format part of the imx_priv structure and allocate imx_priv via the standard devm_kzalloc() mechanism inside the probe function. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/fsl/imx-wm8962.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) commit bfca76185d9bd5b3de562bf5023e5d3dddaa9dce Author: Colin Ian King Date: Sun Apr 23 18:14:36 2017 +0100 spi: tegra: fix spelling mistake: "trasfer" -> "transfer" trivial fix to spelling mistake in dbg_err messages Signed-off-by: Colin Ian King Signed-off-by: Mark Brown drivers/spi/spi-tegra114.c | 2 +- drivers/spi/spi-tegra20-sflash.c | 2 +- drivers/spi/spi-tegra20-slink.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit cd183740480f045600aa1fa38fe70809b5498f05 Author: Tomasz Nowicki Date: Wed Mar 29 14:16:13 2017 +0200 PCI/ACPI: Add ThunderX pass2.x 2nd node MCFG quirk Currently SoCs pass2.x do not emulate EA headers for ACPI boot method at all. However, for pass2.x some devices (like EDAC) advertise incorrect base addresses in their BARs which results in driver probe failure during resource request. Since all problematic blocks are on 2nd NUMA node under domain 10 add necessary quirk entry to obtain BAR addresses correction using EA header emulation. Fixes: 44f22bd91e88 ("PCI: Add MCFG quirks for Cavium ThunderX pass2.x host controller") Signed-off-by: Tomasz Nowicki Signed-off-by: Bjorn Helgaas Acked-by: Robert Richter CC: stable@vger.kernel.org # v4.10+ drivers/acpi/pci_mcfg.c | 1 + 1 file changed, 1 insertion(+) commit 6df3d9e2af9cd68a84b26733191dd800070f2c4d Merge: 6a32a44 7f5b030 Author: David S. Miller Date: Mon Apr 24 12:52:15 2017 -0400 Merge branch 'ibmvnic-updates-and-fixes' Nathan Fontenot says: ==================== ibmvnic: Additional updates and bug fixes This set of patches is an additional set of updates and bug fixes to the ibmvnic driver which applies on top of the previous set of updates sent out on 4/19. ==================== Signed-off-by: David S. Miller commit 7f5b030830fecc4a2a235804a15b395720b48a24 Author: Thomas Falcon Date: Fri Apr 21 15:39:16 2017 -0400 ibmvnic: Free skb's in cases of failure in transmit When an error is encountered during transmit we need to free the skb instead of returning TX_BUSY. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 3ca1993264503957f81f3846598b16601b1e9457 Author: Nathan Fontenot Date: Fri Apr 21 15:39:10 2017 -0400 ibmvnic: Validate napi exist before disabling them Validate that the napi structs exist before trying to disable them at driver close. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 53da09e92910f675ebb93921007428a3c2a024fb Author: Nathan Fontenot Date: Fri Apr 21 15:39:04 2017 -0400 ibmvnic: Add set_link_state routine for setting adapter link state Create a common routine for setting the link state for the vnic adapter. This update moves the sending of the crq and waiting for the link state response to a common place. The new routine also adds handling of resending the crq in cases of getting a partial success response. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 71 ++++++++++++++++++++++++++++++-------- drivers/net/ethernet/ibm/ibmvnic.h | 1 + 2 files changed, 58 insertions(+), 14 deletions(-) commit 5d5e84eb7276d30a21257515a83b34d1ef77f99b Author: Nathan Fontenot Date: Fri Apr 21 15:38:58 2017 -0400 ibmvnic: Move initialization of the stats token to ibmvnic_open We should be initializing the stats token in the same place we initialize the other resources for the driver. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 2f9de9bac625ae08e9ea132e8dc08cfbe9fb67d2 Author: Nathan Fontenot Date: Fri Apr 21 15:38:52 2017 -0400 ibmvnic: Only retrieve error info if present When handling a fatal error in the driver, there can be additional error information provided by the vios. This information is not always present, so only retrieve the additional error information when present. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 71 +++++++++++++++++++++++++++----------- 1 file changed, 51 insertions(+), 20 deletions(-) commit 6052d5e2a1961b59dd942b52d3bf2b395d023644 Author: Murilo Fossa Vicentini Date: Fri Apr 21 15:38:46 2017 -0400 ibmvnic: Insert header on VLAN tagged received frame This patch addresses a modification in the PAPR+ specification which now defines a previously reserved value for vNIC capabilities. It indicates whether the system firmware performs a VLAN header stripping on all VLAN tagged received frames, in case it does, the behavior expected is for the ibmvnic driver to be responsible for inserting the VLAN header. Reported-by: Manvanthara B. Puttashankar Signed-off-by: Murilo Fossa Vicentini Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 21 ++++++++++++++++++++- drivers/net/ethernet/ibm/ibmvnic.h | 2 ++ 2 files changed, 22 insertions(+), 1 deletion(-) commit 7f3c6e6b905018d07228fe0f43f0ef1359e7196d Author: Thomas Falcon Date: Fri Apr 21 15:38:40 2017 -0400 ibmvnic: Set real number of rx queues Along with 5 TX queues, 5 RX queues are allocated at the beginning of device probe. However, only the real number of TX queues is set. Configure the real number of RX queues as well. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 6a32a44d1e3d10c79abd9ef59ee34b46e00f242b Merge: 6922689 28be04f Author: David S. Miller Date: Mon Apr 24 12:46:28 2017 -0400 Merge branch 'packet-fanout-unique-id' Mike Maloney says: ==================== packet: Add option to create new fanout group with unique id. Fanout uses a per net global namespace. A process that intends to create a new fanout group can accidentally join an existing group. It is not possible to detect this. Add a socket option to specify on the first call to setsockopt(..., PACKET_FANOUT, ...) to ensure that a new group is created. Also add tests. ==================== Signed-off-by: David S. Miller commit 28be04f5c1c95bdf5614af19f7faf7d4fb781fa6 Author: Mike Maloney Date: Fri Apr 21 10:56:12 2017 -0400 selftests/net: add tests for PACKET_FANOUT_FLAG_UNIQUEID Create two groups with PACKET_FANOUT_FLAG_UNIQUEID, add a socket to one. Ensure that the groups can only be joined if all options are consistent with the original except for this flag. Signed-off-by: Mike Maloney Acked-by: Willem de Bruijn Signed-off-by: David S. Miller tools/testing/selftests/net/psock_fanout.c | 95 ++++++++++++++++++++++++++---- 1 file changed, 84 insertions(+), 11 deletions(-) commit 4a69a864209e9ab436d4a58e8028ac96cc873d15 Author: Mike Maloney Date: Fri Apr 21 10:56:11 2017 -0400 packet: add PACKET_FANOUT_FLAG_UNIQUEID to assign new fanout group id. Fanout uses a per net global namespace. A process that intends to create a new fanout group can accidentally join an existing group. It is not possible to detect this. Add socket option PACKET_FANOUT_FLAG_UNIQUEID. When specified the supplied fanout group id must be set to 0, and the kernel chooses an id that is not already in use. This is an ephemeral flag so that other sockets can be added to this group using setsockopt, but NOT specifying this flag. The current getsockopt(..., PACKET_FANOUT, ...) can be used to retrieve the new group id. We assume that there are not a lot of fanout groups and that this is not a high frequency call. The method assigns ids starting at zero and increases until it finds an unused id. It keeps track of the last assigned id, and uses it as a starting point to find new ids. Signed-off-by: Mike Maloney Acked-by: Willem de Bruijn Signed-off-by: David S. Miller include/uapi/linux/if_packet.h | 1 + net/packet/af_packet.c | 44 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) commit 2e7a721714b9cdca539da78a0eb1f59dbe4020ac Author: Mike Maloney Date: Fri Apr 21 10:56:10 2017 -0400 selftests/net: cleanup unused parameter in psock_fanout sock_fanout_open no longer sets the size of packet_socket ring, so stop passing the parameter. Signed-off-by: Mike Maloney Acked-by: Willem de Bruijn Signed-off-by: David S. Miller tools/testing/selftests/net/psock_fanout.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 9d43f5e8df6804ae271407500af9062e9278167a Author: Jiri Olsa Date: Thu Apr 20 11:24:30 2017 +0200 perf tools: Fix the code to strip command name Recent commit broke command name strip in perf_event__get_comm_ids function. It replaced left to right search for '\n' with rtrim, which actually does right to left search. It occasionally caught earlier '\n' and kept trash in the command name. Keeping the ltrim, but moving back the left to right '\n' search instead of the rtrim. Signed-off-by: Jiri Olsa Acked-by: Taeung Song Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yao Jin Fixes: bdd97ca63faa ("perf tools: Refactor the code to strip command name with {l,r}trim()") Link: http://lkml.kernel.org/r/20170420092430.29657-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit fb7b75619641d778c2b778748ca5cdf2718cc024 Author: Arnaldo Carvalho de Melo Date: Mon Apr 24 12:19:08 2017 -0300 tools arch x86: Sync cpufeatures.h To catch changes made in: 90218ac77d05 ("x86/cpufeature: Detect CPUID faulting support") No changes needed in the tools using this file at this time. Cc: Kyle Huey Cc: Thomas Gleixner Link: http://lkml.kernel.org/n/tip-qiqsj5qg2ljbsbfre2zaf9v4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) commit e883d09c9eb2ffddfd057c17e6a0cef446ec8c9b Author: Arnaldo Carvalho de Melo Date: Mon Apr 24 11:58:54 2017 -0300 tools arch: Sync arch/x86/lib/memcpy_64.S with the kernel Just a minor fix done in: Fixes: 26a37ab319a2 ("x86/mce: Fix copy/paste error in exception table entries") Cc: Tony Luck Link: http://lkml.kernel.org/n/tip-ni9jzdd5yxlail6pq8cuexw2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/lib/memcpy_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04ec75e0befbc60ff473ca1a593cad7501729526 Author: Arnaldo Carvalho de Melo Date: Tue Oct 25 17:02:11 2016 -0300 tools: Update asm-generic/mman-common.h copy from the kernel To get the changes in the commit Fixes: 3209f68b3ca4 ("statx: Include a mask for stx_attributes in struct statx") Silencing this perf build warning: Warning: tools/include/uapi/linux/stat.h differs from kernel No need to change the statx syscall beautifiers in 'perf trace' at this time. Cc: Adrian Hunter Cc: Al Viro Cc: David Ahern Cc: David Howells Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-y8bgiyzuvura62lffvh1zbg9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/stat.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e7ff8920e62f0188e77b1dc5dc5d9a7322c342d7 Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 21:34:35 2017 -0300 perf tools: Use just forward declarations for struct thread where possible Removing various instances of unnecessary includes, reducing the maze of header dependencies. Link: http://lkml.kernel.org/n/tip-hwu6eyuok9pc57alookyzmsf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm/util/unwind-libdw.c | 1 + tools/perf/arch/x86/util/unwind-libdw.c | 1 + tools/perf/builtin-c2c.c | 1 + tools/perf/builtin-inject.c | 1 + tools/perf/builtin-mem.c | 1 + tools/perf/builtin-timechart.c | 1 + tools/perf/ui/browsers/hists.c | 1 + tools/perf/ui/stdio/hist.c | 1 + tools/perf/util/build-id.c | 1 + tools/perf/util/hist.c | 1 + tools/perf/util/session.c | 1 + tools/perf/util/session.h | 3 +-- tools/perf/util/sort.c | 1 + tools/perf/util/sort.h | 3 ++- tools/perf/util/unwind-libdw.h | 6 ++++-- 15 files changed, 19 insertions(+), 5 deletions(-) commit e8b3ae40151e94e30a82c2cf8efa5ab4f99c8abf Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 21:33:07 2017 -0300 perf tools: Add the right header to obtain PERF_ALIGN() The util/event.h header needs PERF_ALIGN(), but wasn't including linux/kernel.h, where it is defined, instead it was getting it by luck by including map.h, which it doesn't need at all. Fix it by including the right header. Link: http://lkml.kernel.org/n/tip-nf3t9blzm5ncoxsczi8oy9mx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4208735d8de58f1cbc2e0009d87514ce06681e5a Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 19:06:30 2017 -0300 perf tools: Remove poll.h and wait.h from util.h Not needed in this header, added to the places that need poll(), wait() and a few other prototypes. Link: http://lkml.kernel.org/n/tip-i39c7b6xmo1vwd9wxp6fmkl0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/tests/intel-cqm.c | 1 + tools/perf/builtin-ftrace.c | 1 + tools/perf/builtin-kvm.c | 1 + tools/perf/builtin-record.c | 2 ++ tools/perf/builtin-stat.c | 1 + tools/perf/builtin-trace.c | 1 + tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/event-times.c | 1 + tools/perf/util/debug.c | 1 + tools/perf/util/help-unknown-cmd.c | 1 + tools/perf/util/llvm-utils.c | 1 + tools/perf/util/util.h | 2 -- 12 files changed, 12 insertions(+), 2 deletions(-) commit 7a8ef4c4b5fd5c578da4dadbcb1c5da650426c74 Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 20:57:47 2017 -0300 perf tools: Remove string.h, unistd.h and sys/stat.h from util.h Not needed in this header, added to the places that need FILE, putchar(), access() and a few other prototypes. Link: http://lkml.kernel.org/n/tip-xxtdsl6nsna82j7puwbdjqhs@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/subcmd/help.h | 1 + tools/perf/arch/arm/util/cs-etm.c | 1 + tools/perf/arch/arm64/util/dwarf-regs.c | 1 + tools/perf/builtin-help.c | 4 ++++ tools/perf/builtin-mem.c | 3 +++ tools/perf/builtin-report.c | 3 +++ tools/perf/builtin-script.c | 3 +++ tools/perf/builtin-stat.c | 3 +++ tools/perf/builtin-version.c | 3 ++- tools/perf/perf.c | 3 +++ tools/perf/tests/attr.c | 3 +++ tools/perf/tests/bpf.c | 2 ++ tools/perf/tests/parse-events.c | 3 +++ tools/perf/util/build-id.c | 2 ++ tools/perf/util/color.h | 2 ++ tools/perf/util/config.c | 3 +++ tools/perf/util/dso.c | 3 +++ tools/perf/util/event.c | 3 +++ tools/perf/util/header.c | 3 +++ tools/perf/util/machine.c | 3 +++ tools/perf/util/pmu.c | 1 + tools/perf/util/probe-file.c | 3 +++ tools/perf/util/strlist.c | 1 + tools/perf/util/util.c | 1 + tools/perf/util/util.h | 3 --- 25 files changed, 57 insertions(+), 4 deletions(-) commit a3b70b3bb34296a63b43614f13991111eccbb44a Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 20:46:41 2017 -0300 perf tools: Remove stale prototypes from builtin.h Some, like prune_packed_objects() are clearly git specific, others don't have implementations and some are used in just one place, make them static. Link: http://lkml.kernel.org/n/tip-faj3c5dnttf3hurv4pujut8n@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin.h | 4 ---- tools/perf/perf.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) commit 72f7c4d22ccf7c7e78aa80ea3285e77404b31913 Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 19:06:30 2017 -0300 perf tools: Remove string.h from util.h Not needed in this header, added to the places that need strdup, strcmp and a few other prototypes. Link: http://lkml.kernel.org/n/tip-t24yy85xnlv55kyosrum2ubs@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/comm.c | 1 + tools/perf/util/namespaces.c | 1 + tools/perf/util/util.h | 1 - tools/perf/util/xyarray.c | 2 ++ 4 files changed, 4 insertions(+), 1 deletion(-) commit 86a5e0c2028899465a129d87f60fe4018c5ae839 Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 19:03:14 2017 -0300 perf tools: Remove sys/ioctl.h from util.h Not needed in this header, added to the places that need 'struct winsize' and the ioctl defines. Link: http://lkml.kernel.org/n/tip-2pznlli3146y4242otlcm70m@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evlist.c | 1 + tools/perf/util/evsel.c | 1 + tools/perf/util/parse-events.c | 1 + tools/perf/util/top.h | 2 +- tools/perf/util/util.h | 1 - 5 files changed, 4 insertions(+), 2 deletions(-) commit bf6733432dd8d92ffd687d6ce014a37923ba8105 Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 18:58:26 2017 -0300 perf tools: Remove a few more needless includes from util.h Link: http://lkml.kernel.org/n/tip-sb2zu21d6h42e5qnsrtl6wuu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/util.h | 4 ---- 1 file changed, 4 deletions(-) commit 391e42060098a743a87380ed02bf4c8126742b04 Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 18:51:14 2017 -0300 perf tools: Include sys/param.h where needed As it is going away from util.h, where it is not needed. This is mostly for things like MAXPATHLEN, MAX() and MIN(), these later two probably should go away in favor of its kernel sources replacements. Link: http://lkml.kernel.org/n/tip-z1666f3fl3fqobxvjr5o2r39@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 1 + tools/perf/builtin-script.c | 1 + tools/perf/tests/attr.c | 1 + tools/perf/tests/code-reading.c | 1 + tools/perf/util/config.c | 1 + tools/perf/util/header.c | 1 + tools/perf/util/hist.c | 1 + tools/perf/util/parse-events.c | 1 + tools/perf/util/util.h | 1 - 9 files changed, 8 insertions(+), 1 deletion(-) commit 56e2e05644a9494e8ba3165182dcdf43d40cc6a2 Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 18:38:33 2017 -0300 perf callchain: Move callchain specific routines from util.[ch] Where they belong, no point in leaving those in the generic "util" files. Link: http://lkml.kernel.org/n/tip-ljx3iiip1hlfa7a7apjem7ph@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/callchain.c | 103 +++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/python.c | 13 ++++++ tools/perf/util/util.c | 104 -------------------------------------------- tools/perf/util/util.h | 4 -- 4 files changed, 116 insertions(+), 108 deletions(-) commit 69226896ad636b94f6d2e55d75ff21a29c4de83b Author: Roger Quadros Date: Fri Apr 21 16:15:38 2017 +0300 mdio_bus: Issue GPIO RESET to PHYs. Some boards [1] leave the PHYs at an invalid state during system power-up or reset thus causing unreliability issues with the PHY which manifests as PHY not being detected or link not functional. To fix this, these PHYs need to be RESET via a GPIO connected to the PHY's RESET pin. Some boards have a single GPIO controlling the PHY RESET pin of all PHYs on the bus whereas some others have separate GPIOs controlling individual PHY RESETs. In both cases, the RESET de-assertion cannot be done in the PHY driver as the PHY will not probe till its reset is de-asserted. So do the RESET de-assertion in the MDIO bus driver. [1] - am572x-idk, am571x-idk, a437x-idk Signed-off-by: Roger Quadros Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/mdio.txt | 33 ++++++++++++++++++ drivers/net/phy/mdio_bus.c | 47 ++++++++++++++++++++++++++ drivers/of/of_mdio.c | 7 ++++ include/linux/phy.h | 7 ++++ 4 files changed, 94 insertions(+) commit 15769ff8b6d560a358761598aad5fc413ce2251b Merge: ac2291c 82dfb54 Author: David S. Miller Date: Mon Apr 24 12:35:57 2017 -0400 Merge branch 'VSOCK-add-vsockmon' Stefan Hajnoczi says: ==================== VSOCK: vsockmon virtual device to monitor AF_VSOCK sockets. v5: * Change vsock_deliver_tap() API to avoid unnecessary skb creation [Jorgen] * Fix skb leak when no taps are registered [Jorgen] * s/cpu_to_le16(pkt->hdr.op)/le16_to_cpu(pkt->hdr.op)/ [Michael] * Add af_vsock_tap.c and vsockmon.[ch] to MAINTAINERS * checkpatch.pl and sparse fixes v4: * Add explicit reserved padding field to struct af_vsockmon_hdr and drop __attribute__((packed)) [Michael, DaveM] * Call synchronize_net() before module_put() [Michael] v3: * Hook virtio_transport.c (guest driver), not just drivers/vhost/vsock.c (host driver) * Fix DEFAULT_MTU macro definition [Zhu Yanjun] * Rename af_vsockmon_hdr->t field ->transport for clarity * Update .ndo_get_stats64() return type since it has changed * Include missing header in af_vsock_tap.c This is a continuation of Gerard Garcia's work on the vsockmon packet capture interface for AF_VSOCK. Packet capture is an essential feature for network communication. Gerard began addressing this feature gap in his Google Summer of Code 2016 project. I have cleaned up, rebased, and retested the v2 series he posted previously. The design follows the nlmon packet capture interface closely. This is because vsock has the same problem as netlink: there is no netdev on which packets can be captured. The nlmon driver is a synthetic netdev purely for the purpose of enabling packet capture. We follow the same approach here with vsockmon. See include/uapi/linux/vsockmon.h in this series for details on the packet layout. How to try it: 1. Build tcpdump with vsockmon patches: $ git clone -b vsock https://github.com/stefanha/libpcap $ (cd libcap && ./configure && make) $ git clone -b vsock https://github.com/stefanha/tcpdump $ (cd tcpdump && ./configure && make) 2. Build nc-vsock (a netcat-like tool): $ git clone https://github.com/stefanha/nc-vsock $ (cd nc-vsock && make) 3. Launch a virtual machine: # modprobe vhost_vsock # qemu-system-x86_64 -M accel=kvm -m 1024 -cpu host \ -drive if=virtio,file=test.img,format=raw \ -device vhost-vsock-pci,guest-cid=3 (Assumes guest is running a kernel with this patch) 4. Capture AF_VSOCK traffic in guest and/or host: # modprobe vsockmon # ip link add type vsockmon # ip link set vsockmon0 up # tcpdump -i vsockmon0 -vvv 5. Communicate! (host)$ nc-vsock -l 1234 (guest)$ nc-vsock 2 1234 ==================== Signed-off-by: David S. Miller commit 82dfb540aeb277d945bf646ff780493b8a520d8a Author: Gerard Garcia Date: Fri Apr 21 10:10:46 2017 +0100 VSOCK: Add virtio vsock vsockmon hooks The virtio drivers deal with struct virtio_vsock_pkt. Add virtio_transport_deliver_tap_pkt(pkt) for handing packets to the vsockmon device. We call virtio_transport_deliver_tap_pkt(pkt) from net/vmw_vsock/virtio_transport.c and drivers/vhost/vsock.c instead of common code. This is because the drivers may drop packets before handing them to common code - we still want to capture them. Signed-off-by: Gerard Garcia Signed-off-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: David S. Miller drivers/vhost/vsock.c | 8 +++++ include/linux/virtio_vsock.h | 1 + net/vmw_vsock/virtio_transport.c | 3 ++ net/vmw_vsock/virtio_transport_common.c | 64 +++++++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+) commit 0b2e66448ba20eb30ea62345d6beb9ee2a1ce06b Author: Gerard Garcia Date: Fri Apr 21 10:10:45 2017 +0100 VSOCK: Add vsockmon device Add vsockmon virtual network device that receives packets from the vsock transports and exposes them to user space. Based on the nlmon device. Signed-off-by: Gerard Garcia Signed-off-by: Stefan Hajnoczi Signed-off-by: David S. Miller MAINTAINERS | 2 + drivers/net/Kconfig | 8 ++ drivers/net/Makefile | 1 + drivers/net/vsockmon.c | 170 ++++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/Kbuild | 1 + include/uapi/linux/vsockmon.h | 60 +++++++++++++++ 6 files changed, 242 insertions(+) commit 531b374834c891ae2abf800693074df35a7d1a36 Author: Gerard Garcia Date: Fri Apr 21 10:10:44 2017 +0100 VSOCK: Add vsockmon tap functions Add tap functions that can be used by the vsock transports to deliver packets to vsockmon virtual network devices. Signed-off-by: Gerard Garcia Signed-off-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: David S. Miller MAINTAINERS | 1 + include/net/af_vsock.h | 13 +++++ include/uapi/linux/if_arp.h | 1 + net/vmw_vsock/Makefile | 2 +- net/vmw_vsock/af_vsock_tap.c | 114 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 130 insertions(+), 1 deletion(-) commit 02101cb3f5a269c006c5b93f3c603dc31e473859 Author: Thierry Reding Date: Mon Apr 24 13:56:49 2017 +0200 pinctrl: tegra: xusb: Silence sparse warnings Commit 53d2a715c240 ("phy: Add Tegra XUSB pad controller support") added a new driver for the XUSB pad controller that implements a more flexible devicetree binding. In order to preserve backwards compatibility the old driver can be probed if the obsolete bindings are detected. In order to hide the legacy code, these prototypes were defined in a header private to the new driver. This has the disadvantage of making the sparse code checker complain about the missing declarations when compiling the old driver and suggesting to make the functions static. Avoid these sparse warnings by adding local prototype declarations into the compatibility driver. Signed-off-by: Thierry Reding Signed-off-by: Linus Walleij drivers/pinctrl/tegra/pinctrl-tegra-xusb.c | 4 ++++ 1 file changed, 4 insertions(+) commit e41f3207be87a0f6aa4f3fe8246414e2e89fe464 Merge: 5e55352 5f4c8ca Author: Linus Walleij Date: Mon Apr 24 18:34:49 2017 +0200 Merge tag 'sh-pfc-for-v4.12-tag3' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.12 (take three) - Miscellaneous fixes for R-Car M2-W and R-Car E2. commit 5e5535213f69c84a8d5b3df75964539c3549c6b5 Author: Colin Ian King Date: Fri Apr 21 13:07:13 2017 +0100 ARM: at91/at91-pinctrl documentation: fix spelling mistake: "contoller" -> "controller" trivial fix to spelling mistake in documentation Signed-off-by: Colin Ian King Acked-by: Nicolas Ferre Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa2f60ffa0e0a33406ef9538635a57ac499965ae Author: Anders Darander Date: Fri Apr 21 14:46:31 2017 +0200 gpio: DT bindings, move tca9554 from pcf857x to pca953x The TCA9554 is similar to the PCA9554. Update the DT binding docs. Signed-off-by: Anders Darander Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/gpio-pca953x.txt | 1 + Documentation/devicetree/bindings/gpio/gpio-pcf857x.txt | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 1b9a0c25065c174134494d1ca91f4da8430e6902 Author: Anders Darander Date: Fri Apr 21 14:46:30 2017 +0200 gpio: move tca9554 from pcf857x to pca953x The TCA9554 doesn't work with the pcf857x driver, trying to change the direction gives a NAK bailout error. TCA9554 is similar to the PCA9554, thus change the driver. Signed-off-by: Anders Darander Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-pca953x.c | 1 + drivers/gpio/gpio-pcf857x.c | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) commit ac2291ce1f17a99c052378927f2d3bcd6b0045a6 Merge: 970cf1d a059783 Author: David S. Miller Date: Mon Apr 24 12:25:01 2017 -0400 Merge tag 'wireless-drivers-next-for-davem-2017-04-21' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.12 Quite a lot of patches for rtlwifi and iwlwifi this time, but changes also for other active wireless drivers. Major changes: ath9k * add support for Dell Wireless 1601 PCI device * add debugfs file to manually override noise floor ath10k * bump up FW API to 6 for a new QCA6174 firmware branch wil6210 * support 8 kB RX buffers iwlwifi * work to support A000 devices continues * add support for FW API 30 * add Geographical and Dynamic Specific Absorption Rate (SAR) support * support a few new PCI device IDs rtlwifi * work on adding Bluetooth coexistance support, not finished yet ==================== Signed-off-by: David S. Miller commit 970cf1d2a6c89e9fe8d94b118a76d071de7e543a Merge: 9b53816 49632b58 Author: David S. Miller Date: Mon Apr 24 12:20:05 2017 -0400 Merge branch 'qed-dcb-enhancements' Sudarsana Reddy Kalluru says: ==================== qed*: Dcbx/dcbnl enhancements. The series has set of enhancements for dcbx/dcbnl implementation of qed/qede drivers. - Patches (1) & (3) capture the sematic and debug changes. - Patch (2) adds the driver support for populating RoCEv2 dcb data. - Patch (4) adds the required support for reading/configuring the IEEE selection field (SF). - Patch (5) adds the support for configuring the static dcbx mode. Please consider applying this to 'net-next' branch. ==================== Signed-off-by: David S. Miller commit 49632b5822ea2af0e9531f8d20dcd5fb786093a9 Author: sudarsana.kalluru@cavium.com Date: Thu Apr 20 22:31:20 2017 -0700 qed: Add support for static dcbx. The patch adds driver support for static/local dcbx mode. In this mode adapter brings up the dcbx link with locally configured parameters instead of performing the dcbx negotiation with the peer. The feature is useful when peer device/switch doesn't support dcbx. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 24 +++++++++++++++++++----- include/linux/qed/qed_if.h | 1 + 2 files changed, 20 insertions(+), 5 deletions(-) commit 05a79f925d7494a7a9a72d25943a3541b1c54066 Author: sudarsana.kalluru@cavium.com Date: Thu Apr 20 22:31:19 2017 -0700 qed: Support dcbnl IEEE selector field. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 53 ++++++++++++++++++++++----- drivers/net/ethernet/qlogic/qede/qede_dcbnl.c | 5 +++ 2 files changed, 49 insertions(+), 9 deletions(-) commit dfbeb85f2fe6093ac7deb5dd40f4fd6c75b9fc78 Author: sudarsana.kalluru@cavium.com Date: Thu Apr 20 22:31:18 2017 -0700 qed: Add additional DCBx debug messages. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 449ad505e9d2f420b7bf590a708c101ff587593e Author: sudarsana.kalluru@cavium.com Date: Thu Apr 20 22:31:17 2017 -0700 qed: Separate RoCE DCBx support for V2. In the older firmware there was no distinction between RoCE and RoCEv2 whereas the newer firmware (8.15.3.0) allows us to configure each independently. Driver need to populate the RoCEv2 data in its specific structure. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 270837b399f7ab7602f473fa514fe1138b308ec0 Author: sudarsana.kalluru@cavium.com Date: Thu Apr 20 22:31:16 2017 -0700 qed: Cleanup DCBx unnecessary parameters. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 38 ++++++++++++------------------ drivers/net/ethernet/qlogic/qed/qed_dcbx.h | 2 +- drivers/net/ethernet/qlogic/qed/qed_dev.c | 2 +- 3 files changed, 17 insertions(+), 25 deletions(-) commit 9119fedddb5b630eec3f3e39c4e382d9f60cca07 Author: Mikulas Patocka Date: Wed Apr 19 10:52:54 2017 -0400 dm: remove dummy dm_table definition This dummy structure definition was required for RCU macros, but it isn't required anymore, so delete it. The dummy definition confuses the crash tool, see: https://www.redhat.com/archives/dm-devel/2017-April/msg00197.html Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-ioctl.c | 8 -------- 1 file changed, 8 deletions(-) commit 583fe7474c05ee5523e14ef791ea59604cd846dc Author: Mikulas Patocka Date: Tue Apr 18 16:51:54 2017 -0400 dm crypt: fix large block integrity support Previously, dm-crypt could use blocks composed of multiple 512b sectors but it created integrity profile for each 512b sector (it padded it with zeroes). Fix dm-crypt so that the integrity profile is sent for each block not each sector. The user must use the same block size in the DM crypt and integrity targets. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 9d609f85b7eb96697ae22ad1d47a3a3920174ba8 Author: Mikulas Patocka Date: Tue Apr 18 16:51:52 2017 -0400 dm integrity: support larger block sizes The DM integrity block size can now be 512, 1k, 2k or 4k. Using larger blocks reduces metadata handling overhead. The block size can be configured at table load time using the "block_size:" option; where is expressed in bytes (defult is still 512 bytes). It is safe to use larger block sizes with DM integrity, because the DM integrity journal makes sure that the whole block is updated atomically even if the underlying device doesn't support atomic writes of that size (e.g. 4k block ontop of a 512b device). Depends-on: 2859323e ("block: fix blk_integrity_register to use template's interval_exp if not 0") Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Documentation/device-mapper/dm-integrity.txt | 5 + drivers/md/dm-integrity.c | 219 +++++++++++++++++++++------ 2 files changed, 179 insertions(+), 45 deletions(-) commit 56b67a4f292f14548f4046979d46d07bcf8ba971 Author: Mikulas Patocka Date: Tue Apr 18 16:51:50 2017 -0400 dm integrity: various small changes and cleanups Some coding style changes. Fix a bug that the array test_tag has insufficient size if the digest size of internal has is bigger than the tag size. The function __fls is undefined for zero argument, this patch fixes undefined behavior if the user sets zero interleave_sectors. Fix the limit of optional arguments to 8. Don't allocate crypt_data on the stack to avoid a BUG with debug kernel. Rename all optional argument names to have underscores rather than dashes. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Documentation/device-mapper/dm-integrity.txt | 20 ++--- drivers/md/dm-integrity.c | 116 ++++++++++++++------------- 2 files changed, 72 insertions(+), 64 deletions(-) commit e2460f2a4bc740fae9e23f14d653cf53e90b3f9a Author: Mikulas Patocka Date: Tue Apr 18 16:51:48 2017 -0400 dm: mark targets that pass integrity data A dm-crypt on dm-integrity device incorrectly advertises an integrity profile on the DM crypt device. It can be seen in the files "/sys/block/dm-*/integrity/*" that both dm-integrity and dm-crypt target advertise the integrity profile. That is incorrect, only the dm-integrity target should advertise the integrity profile. A general problem in DM is that if we have a DM device that depends on another device with an integrity profile, the upper device will always advertise the integrity profile, even when the target driver doesn't support handling integrity data. Most targets don't support integrity data, so we provide a whitelist of targets that support it (linear, delay and striped). The targets that support passing integrity data to the lower device are marked with the flag DM_TARGET_PASSES_INTEGRITY. The DM core will now advertise integrity data on a DM device only if all the targets support the integrity data. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-delay.c | 1 + drivers/md/dm-linear.c | 1 + drivers/md/dm-stripe.c | 1 + drivers/md/dm-table.c | 7 +++++++ drivers/md/dm.c | 16 +++++++++++++--- include/linux/device-mapper.h | 6 ++++++ 6 files changed, 29 insertions(+), 3 deletions(-) commit 3c12016910061c2a19d985fba7f7dec19d6a3a09 Author: Mikulas Patocka Date: Tue Apr 18 16:51:46 2017 -0400 dm table: replace while loops with for loops Also remove some unnecessary use of uninitialized_var(). Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-table.c | 63 ++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 31 deletions(-) commit 9b5381637e2baecf14433452d349ca44db72e9e5 Merge: e2989ee 55c05dd Author: David S. Miller Date: Mon Apr 24 11:53:53 2017 -0400 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2017-04-20 This series contains updates to e1000, e1000e, igb/vf and ixgb. Tobias Klauser cleans up e1000, ixgb and igbvf from having a local function or structure for netdev stats. Bernd Faust fixes an issue for 82579 devices, where the clock frequency was being incorrectly set for these devices. These devices only support 96MHz, so make sure they are set to use only that. Yury Kylulin extends the work Jake and Alex did for ixgbe in MAC filter handling into the igb driver. Kim Tatt Chuah enables igb to wake up by packet and to read the necessary Wake Up Status (WUS) and Wake Up Packet Memory (WUPM) registers. ==================== Signed-off-by: David S. Miller commit d160a727c40e7175aa642137910a3fda46262fc8 Author: Paul E. McKenney Date: Sun Apr 23 12:50:59 2017 -0700 srcu: Make SRCU be built by default SRCU is optional, and included only if there is a "select SRCU" in effect. However, we now have Tiny SRCU, so this commit defaults CONFIG_SRCU=y. Reported-by: kbuild test robot Signed-off-by: Paul E. McKenney init/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 611f0afee0e87eb6d184e7f58aa20d18d291d169 Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 16:29:38 2017 -0300 perf tools: Add compress.h for the *_decompress_to_file() headers Out of util.h, the implementations were already in separate files, that are built conditionally. Link: http://lkml.kernel.org/n/tip-0ur7szxsb59f8758kfe63prb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/compress.h | 12 ++++++++++++ tools/perf/util/dso.c | 1 + tools/perf/util/lzma.c | 1 + tools/perf/util/util.h | 8 -------- tools/perf/util/zlib.c | 1 + 5 files changed, 15 insertions(+), 8 deletions(-) commit 166ebdd2442660e7f942d657fc5e629000e58ec3 Author: Andi Kleen Date: Wed Apr 19 10:49:40 2017 -0700 perf mem: Fix display of data source snoop indication 'perf mem report' doesn't display the data source snoop indication correctly. In the kernel API the definition is: #define PERF_MEM_SNOOP_NONE 0x02 /* no snoop */ #define PERF_MEM_SNOOP_HIT 0x04 /* snoop hit */ #define PERF_MEM_SNOOP_MISS 0x08 /* snoop miss */ but the table used by the perf tools exchanged "Hit" and "Miss": "None", "Miss", "Hit", Fix the table in perf. Signed-off-by: Andi Kleen Cc: Jiri Olsa Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20170419174940.13641-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/mem-events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c2b7cac78e17886e8089389a570a290c9b5ca67 Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 16:21:59 2017 -0300 perf debug: Move dump_stack() and sighandler_dump_stack() to debug.h Two more out of util.h. Link: http://lkml.kernel.org/n/tip-polkuxm1cpr06lbgue5pyqum@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/debug.c | 32 +++++++++++++++++++++++++++++++- tools/perf/util/debug.h | 3 +++ tools/perf/util/util.c | 31 ------------------------------- tools/perf/util/util.h | 3 --- 4 files changed, 34 insertions(+), 35 deletions(-) commit bb8c16db43e48f2012c3ae8c7d682f834c5986d9 Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 16:15:13 2017 -0300 perf kvm: Make function only used by 'perf kvm' static No need to have this polluting util.h, it was polluted enough already. Link: http://lkml.kernel.org/n/tip-wfdidqlwbvi5y0s61kv6z2gn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kvm.c | 14 ++++++++++++++ tools/perf/util/util.c | 14 -------------- tools/perf/util/util.h | 1 - 3 files changed, 14 insertions(+), 15 deletions(-) commit 61a929870d1ce9c7ac34644bfd5aa9a8bf67818c Author: Jan Kara Date: Mon Apr 24 16:49:16 2017 +0200 ext4: Improve comments in ext4_quota_{on|off}() Improve comments in ext4_quota_{on|off}() to explain that returning success despite ext4_journal_start() failing is deliberate. Signed-off-by: Jan Kara fs/ext4/super.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit f4edce1afd537327012189c1481ad66260b195ff Author: Dan Carpenter Date: Fri Apr 21 13:52:20 2017 +0300 fsnotify: remove a stray unlock We recently shifted this code around, so we're no longer holding the lock on this path. Fixes: 755b5bc681eb ("fsnotify: Remove indirection from mark list addition") Signed-off-by: Dan Carpenter Signed-off-by: Jan Kara fs/notify/mark.c | 1 - 1 file changed, 1 deletion(-) commit 4726a2c37199f1a982e9a943a23c73530d891e66 Author: Paul Gortmaker Date: Wed Apr 19 15:59:05 2017 -0400 pinctrl: make artpec6 explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/pinctrl/Kconfig:config PINCTRL_ARTPEC6 drivers/pinctrl/Kconfig: bool "Axis ARTPEC-6 pin controller driver" ...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. 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: Lars Persson Cc: Niklas Cassel Cc: linux-arm-kernel@axis.com Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Acked-by: Jesper Nilsson Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-artpec6.c | 12 ------------ 1 file changed, 12 deletions(-) commit 5c26eac43a0b708083ebd99e0ba57c9b268cef84 Author: Fabian Frederick Date: Sun Apr 23 20:58:34 2017 +0200 udf: use kmap_atomic for memcpy copying Use temporary mapping for memory copying operations. To avoid any sleeping problem, mark_inode_dirty(inode) was moved after kunmap() in udf_adinicb_readpage() down_write(&iinfo->i_data_sem) set before kmap_atomic() in udf_expand_file_adinicb() Signed-off-by: Fabian Frederick Signed-off-by: Jan Kara fs/udf/file.c | 10 +++++----- fs/udf/inode.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) commit 6ff6b2b32924d53519948e270cb9f5549408c039 Author: Fabian Frederick Date: Sun Apr 23 20:58:15 2017 +0200 udf: use octal for permissions According to commit f90774e1fd27 ("checkpatch: look for symbolic permissions and suggest octal instead") Signed-off-by: Fabian Frederick Signed-off-by: Jan Kara fs/udf/inode.c | 14 +++++++------- fs/udf/namei.c | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) commit 9765ad134a00a01cbcc69c78ff6defbfad209bc5 Author: David Gibson Date: Wed Apr 19 16:38:26 2017 +1000 powerpc/mm: Ensure IRQs are off in switch_mm() powerpc expects IRQs to already be (soft) disabled when switch_mm() is called, as made clear in the commit message of 9c1e105238c4 ("powerpc: Allow perf_counters to access user memory at interrupt time"). Aside from any race conditions that might exist between switch_mm() and an IRQ, there is also an unconditional hard_irq_disable() in switch_slb(). If that isn't followed at some point by an IRQ enable then interrupts will remain disabled until we return to userspace. It is true that when switch_mm() is called from the scheduler IRQs are off, but not when it's called by use_mm(). Looking closer we see that last year in commit f98db6013c55 ("sched/core: Add switch_mm_irqs_off() and use it in the scheduler") this was made more explicit by the addition of switch_mm_irqs_off() which is now called by the scheduler, vs switch_mm() which is used by use_mm(). Arguably it is a bug in use_mm() to call switch_mm() in a different context than it expects, but fixing that will take time. This was discovered recently when vhost started throwing warnings such as: BUG: sleeping function called from invalid context at kernel/mutex.c:578 in_atomic(): 0, irqs_disabled(): 1, pid: 10768, name: vhost-10760 no locks held by vhost-10760/10768. irq event stamp: 10 hardirqs last enabled at (9): _raw_spin_unlock_irq+0x40/0x80 hardirqs last disabled at (10): switch_slb+0x2e4/0x490 softirqs last enabled at (0): copy_process+0x5e8/0x1260 softirqs last disabled at (0): (null) Call Trace: show_stack+0x88/0x390 (unreliable) dump_stack+0x30/0x44 __might_sleep+0x1c4/0x2d0 mutex_lock_nested+0x74/0x5c0 cgroup_attach_task_all+0x5c/0x180 vhost_attach_cgroups_work+0x58/0x80 [vhost] vhost_worker+0x24c/0x3d0 [vhost] kthread+0xec/0x100 ret_from_kernel_thread+0x5c/0xd4 Prior to commit 04b96e5528ca ("vhost: lockless enqueuing") (Aug 2016) the vhost_worker() would do a spin_unlock_irq() not long after calling use_mm(), which had the effect of reenabling IRQs. Since that commit removed the locking in vhost_worker() the body of the vhost_worker() loop now runs with interrupts off causing the warnings. This patch addresses the problem by making the powerpc code mirror the x86 code, ie. we disable interrupts in switch_mm(), and optimise the scheduler case by defining switch_mm_irqs_off(). Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: David Gibson [mpe: Flesh out/rewrite change log, add stable] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mmu_context.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit e76ca27790a514590af782f83f6eae49e0ccf8c9 Author: Tyrel Datwyler Date: Mon Apr 17 20:24:39 2017 -0400 powerpc/sysfs: Fix reference leak of cpu device_nodes present at boot For CPUs present at boot each logical CPU acquires a reference to the associated device node of the core. This happens in register_cpu() which is called by topology_init(). The result of this is that we end up with a reference held by each thread of the core. However, these references are never freed if the CPU core is DLPAR removed. This patch fixes the reference leaks by acquiring and releasing the references in the CPU hotplug callbacks un/register_cpu_online(). With this patch symmetric reference counting is observed with both CPUs present at boot, and those DLPAR added after boot. Fixes: f86e4718f24b ("driver/core: cpu: initialize of_node in cpu's device struture") Cc: stable@vger.kernel.org # v3.12+ Signed-off-by: Tyrel Datwyler Signed-off-by: Michael Ellerman arch/powerpc/kernel/sysfs.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 68baf692c435339e6295cb470ea5545cbc28160e Author: Tyrel Datwyler Date: Mon Apr 17 20:21:40 2017 -0400 powerpc/pseries: Fix of_node_put() underflow during DLPAR remove Historically struct device_node references were tracked using a kref embedded as a struct field. Commit 75b57ecf9d1d ("of: Make device nodes kobjects so they show up in sysfs") (Mar 2014) refactored device_nodes to be kobjects such that the device tree could by more simply exposed to userspace using sysfs. Commit 0829f6d1f69e ("of: device_node kobject lifecycle fixes") (Mar 2014) followed up these changes to better control the kobject lifecycle and in particular the referecne counting via of_node_get(), of_node_put(), and of_node_init(). A result of this second commit was that it introduced an of_node_put() call when a dynamic node is detached, in of_node_remove(), that removes the initial kobj reference created by of_node_init(). Traditionally as the original dynamic device node user the pseries code had assumed responsibilty for releasing this final reference in its platform specific DLPAR detach code. This patch fixes a refcount underflow introduced by commit 0829f6d1f6, and recently exposed by the upstreaming of the recount API. Messages like the following are no longer seen in the kernel log with this patch following DLPAR remove operations of cpus and pci devices. rpadlpar_io: slot PHB 72 removed refcount_t: underflow; use-after-free. ------------[ cut here ]------------ WARNING: CPU: 5 PID: 3335 at lib/refcount.c:128 refcount_sub_and_test+0xf4/0x110 Fixes: 0829f6d1f69e ("of: device_node kobject lifecycle fixes") Cc: stable@vger.kernel.org # v3.15+ Signed-off-by: Tyrel Datwyler [mpe: Make change log commit references more verbose] Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/dlpar.c | 1 - 1 file changed, 1 deletion(-) commit 856736466806ceb72c7402eb0f06bea8f5b83c5a Author: Michael Ellerman Date: Mon Apr 24 10:35:14 2017 +1000 powerpc/xmon: Deindent the SLB dumping logic Currently the code that dumps SLB entries uses a double-nested if. This means the actual dumping logic is a bit squashed. Deindent it by using continue. Signed-off-by: Michael Ellerman Reviewed-by: Rashmica Gupta Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) commit 9fc849144c80091252551a4897782ed5321d654a Merge: 9a914aa 24bd909 Author: Michael Ellerman Date: Tue Apr 25 00:24:04 2017 +1000 Merge branch 'topic/kprobes' into next Although most of these kprobes patches are powerpc specific, there's a couple that touch generic code (with Acks). At the moment there's one conflict with acme's tree, but it's not too bad. Still just in case some other conflicts show up, we've put these in a topic branch so another tree could merge some or all of it if necessary. commit 64c6a71126fdeb2d60e193b93e24ea5ffa9c40ba Author: Charles Keepax Date: Wed Apr 19 10:30:44 2017 +0100 gpio: arizona: Correct check whether the pin is an input The logic to check if the pin is an input or output whilst testing if we need to read the register value from the hardware or not is currently inverted. Remove the erroneous not from the if statement. Fixes: 11598d174050 ("gpio: arizona: Correct handling for reading input GPIOs") Signed-off-by: Charles Keepax Signed-off-by: Linus Walleij drivers/gpio/gpio-arizona.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42fcb203e3a8682c41b6a22d2b3fd1457b407fb9 Author: Nandor Han Date: Thu Apr 13 13:27:50 2017 +0300 gpio: Add XRA1403 DTS binding documentation Add the XRA1403 DTS binding documentation. Signed-off-by: Nandor Han Acked-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/gpio-xra1403.txt | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 39c382a3109400f5abb5adc2040510e75f93b4cb Author: Rahul Bedarkar Date: Sun Apr 23 19:40:51 2017 +0530 hwmon: (tmp103) Use SIMPLE_DEV_PM_OPS helper macro Replace ifdefs with SIMPLE_DEV_PM_OPS helper macro. Signed-off-by: Rahul Bedarkar Acked-by: Heiko Schocher Signed-off-by: Guenter Roeck drivers/hwmon/tmp103.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 7b7df5204d6fd6316495e6becfbc6277bf1371cc Author: Nandor Han Date: Thu Apr 13 13:27:48 2017 +0300 dt-bindings: add exar to vendor prefixes list Add Exar Corporation to vendors list. Signed-off-by: Nandor Han Acked-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 7c2d176fe3f8dce632b948f79c7e89916ffe2c70 Author: Kuppuswamy Sathyanarayanan Date: Fri Apr 14 10:29:25 2017 -0700 gpio: gpio-wcove: fix irq pending status bit width Whiskey cove PMIC has three GPIO banks with total number of 13 GPIO pins. But when checking for the pending status, for_each_set_bit() uses bit width of 7 and hence it only checks the status for first 7 GPIO pins missing to check/clear the status of rest of the GPIO pins. This patch fixes this issue. Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Linus Walleij drivers/gpio/gpio-wcove.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e57d05520f9c89cf7616fc8c65dafb1ceb7a4c63 Author: Geliang Tang Date: Sat Apr 22 09:18:05 2017 +0800 dma-debug: use offset_in_page() macro Use offset_in_page() macro instead of open-coding. Signed-off-by: Geliang Tang Signed-off-by: Vinod Koul lib/dma-debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b70e52cacb3bff1cc6fae36a89e0fa9d33fe31a7 Author: Geliang Tang Date: Sat Apr 22 09:18:04 2017 +0800 dmaengine: mv_xor: use offset_in_page() macro Use offset_in_page() macro instead of open-coding. Signed-off-by: Geliang Tang Signed-off-by: Vinod Koul drivers/dma/mv_xor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f62e5f613e124911b955e4a804a5fceb37c82993 Author: Geliang Tang Date: Sat Apr 22 09:18:03 2017 +0800 dmaengine: dmatest: use offset_in_page() macro Use offset_in_page() macro instead of open-coding. Signed-off-by: Geliang Tang Signed-off-by: Vinod Koul drivers/dma/dmatest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5664aa1c9ef59895eee1af15e36140d09d20714d Author: Jisheng Zhang Date: Thu Apr 13 17:46:39 2017 +0800 gpio: dwapb: use dwapb_read instead of readl_relaxed Commit 67809b974a07 ("GPIO: gpio-dwapb: Change readl&writel to dwapb_read&dwapb_write") missed this readl_relaxed() usage, I'm not sure the reason, maybe for performance reason? But if we do care the performance, we could use the relaxed io in dwapb_read and dwapb_write. Signed-off-by: Jisheng Zhang Signed-off-by: Linus Walleij drivers/gpio/gpio-dwapb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0639d39fe977608a60e45fb51e25c17661a7ec0 Author: Andrew Jeffery Date: Fri Apr 7 22:27:13 2017 +0930 pinctrl: aspeed: g5: Add pinconf support Testing for pinctrl-aspeed-g5 was performed on an AST2500EVB system, using the strategy outlined in the commit message for the change to the Aspeed pinctrl core. Signed-off-by: Andrew Jeffery Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 153 ++++++++++++++++++++++++++++- 1 file changed, 152 insertions(+), 1 deletion(-) commit 47b50b3743cd6a9c2a90372181cfc9ee5b10186d Author: Andrew Jeffery Date: Fri Apr 7 22:27:12 2017 +0930 pinctrl: aspeed: g4: Add pinconf support Testing for pinctrl-aspeed-g4 was performed on an OpenPOWER Palmetto system, using the strategy outlined in the commit message for the change to the Aspeed pinctrl core. Signed-off-by: Andrew Jeffery Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c | 117 ++++++++++++++++++++++++++++- 1 file changed, 116 insertions(+), 1 deletion(-) commit 7f354fd13877aae8abcd7b5a389cc85e3d2e4ed1 Author: Andrew Jeffery Date: Fri Apr 7 22:27:11 2017 +0930 pinctrl: aspeed: Add core pinconf support Several pinconf parameters have a fairly straight-forward mapping onto the Aspeed pin controller. These include management of pull-down bias, drive-strength, and some debounce configuration. Pin biasing largely is managed on a per-GPIO-bank basis, aside from the ADC and RMII/RGMII pins. As the bias configuration for each pin in a bank maps onto a single per-bank bit, configuration tables will be introduced to describe the ranges of pins and the supported pinconf parameter. The use of tables also helps with the sparse support of pinconf properties, and the fact that not all GPIO banks support biasing or drive-strength configuration. Further, as the pin controller uses a consistent approach for bias and drive strength configuration at the register level, a second table is defined for looking up the the bit-state required to enable or query the provided configuration. Testing for pinctrl-aspeed-g4 was performed on an OpenPOWER Palmetto system, and pinctrl-aspeed-g5 on an AST2500EVB as well as under QEMU. The test method was to set the appropriate bits via devmem and verify the result through the controller's pinconf-pins debugfs file. This simultaneously validates the get() path and half of the set() path. The remainder of the set() path was validated by configuring a handful of pins via the devicetree with the supported pinconf properties and verifying the appropriate registers were touched. Signed-off-by: Andrew Jeffery Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed.c | 211 ++++++++++++++++++++++++++++++++ drivers/pinctrl/aspeed/pinctrl-aspeed.h | 28 +++++ 2 files changed, 239 insertions(+) commit c3bafe017c3bd3f68c21637ce4b78963edf56ec5 Author: Andrew Jeffery Date: Fri Apr 7 22:29:02 2017 +0930 gpio: aspeed: Add open-source and open-drain support As per the datasheet, manage the IO and value states to implement open-source/open-drain, but do this by falling back to gpiolib's emulation. This commit simply makes the behaviour explicit for clarity, rather than relying on the implicit return of -ENOTSUPP to trigger the emulation. Signed-off-by: Andrew Jeffery Signed-off-by: Linus Walleij drivers/gpio/gpio-aspeed.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5ae4cb94b3133d00857bb2909dae779782db40cb Author: Andrew Jeffery Date: Fri Apr 7 22:29:01 2017 +0930 gpio: aspeed: Add debounce support Each GPIO in the Aspeed GPIO controller can choose one of four input debounce states: to disable debouncing for an input, or select from one of three programmable debounce timer values. Each GPIO in a four-bank-set is assigned one bit in each of two debounce configuration registers dedicated to the set, and selects a debounce state by configuring the two bits to select one of the four options. The limitation on debounce timer values is managed by mapping offsets onto a configured timer value and keeping count of the number of users a timer has. Timer values are configured on a first-come-first-served basis. A small twist in the hardware design is that the debounce configuration register numbering is reversed with respect to the binary representation of the debounce timer of interest (i.e. debounce register 1 represents bit 1, and debounce register 2 represents bit 0 of the timer numbering). Tested on an AST2500EVB with additional inspection under QEMU's romulus-bmc machine. Signed-off-by: Andrew Jeffery Signed-off-by: Linus Walleij drivers/gpio/gpio-aspeed.c | 281 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 276 insertions(+), 5 deletions(-) commit 9d7163f5167fa60e71071ab6dcb60da0f7230beb Author: Andrew Jeffery Date: Fri Apr 7 22:29:00 2017 +0930 gpio: aspeed: dt: Add optional clocks property We need a reference to the HPLL to calculate debounce cycles. If the clocks property is not supplied in the GPIO node then the consumer should deny any debounce requests. Signed-off-by: Andrew Jeffery Acked-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/gpio-aspeed.txt | 1 + 1 file changed, 1 insertion(+) commit cea956551f1f0edb2d64a0320785705e400ae5f1 Author: Andrew Jeffery Date: Fri Apr 7 22:28:59 2017 +0930 gpio: aspeed: dt: Fix description alignment in bindings document Signed-off-by: Andrew Jeffery Acked-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/gpio-aspeed.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6de2185bc70781efd8ec26ff45329b57288d1880 Author: Andrew Jeffery Date: Fri Apr 7 22:27:10 2017 +0930 pinctrl: aspeed: Document pinconf in devicetree bindings Signed-off-by: Andrew Jeffery Acked-by: Rob Herring Acked-by: Joel Stanley Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/pinctrl-aspeed.txt | 40 +++++++++++++++++----- 1 file changed, 31 insertions(+), 9 deletions(-) commit 94bfc9be6de327318a12e3174d3075db6c8079b4 Author: Alexandre TORGUE Date: Fri Apr 7 14:43:02 2017 +0200 pinctrl: Add st,stm32f469-pinctrl compatible to stm32-pinctrl Add new compatible for stm32f469 MCU. Signed-off-by: Alexandre TORGUE Acked-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt | 1 + 1 file changed, 1 insertion(+) commit c2e7f82d336a451ebb904b8bf9a5a558cf16c39b Author: Mihail Atanassov Date: Mon Feb 13 15:09:01 2017 +0000 drm: mali-dp: Check the mclk rate and allow up/down scaling When downscaling, mclk needs to be sufficiently higher than pxlclk in order to be able to fetch the higher-resolution data and produce output pixels. When not scaling, or when upscaling, mclk can be equal to pxlclk. Since the driver doesn't control mclk, just ensure that the requirement is satisfied with the current clock rate. Signed-off-by: Mihail Atanassov Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_crtc.c | 23 ++++++------- drivers/gpu/drm/arm/malidp_hw.c | 70 +++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/arm/malidp_hw.h | 4 +++ 3 files changed, 85 insertions(+), 12 deletions(-) commit 0274e6a0ba9a4994a449fcd3483ef530027e152f Author: Mihail Atanassov Date: Mon Feb 6 12:20:56 2017 +0000 drm: mali-dp: Enable image enhancement when scaling Apply image enhacement when we are upscaling by a factor of 2 or more in either direction. Signed-off-by: Mihail Atanassov Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_crtc.c | 7 ++++++- drivers/gpu/drm/arm/malidp_drv.c | 3 +++ drivers/gpu/drm/arm/malidp_hw.h | 20 ++++++++++++++++++++ drivers/gpu/drm/arm/malidp_regs.h | 13 +++++++++++++ 4 files changed, 42 insertions(+), 1 deletion(-) commit 28ce675b74742cae1c815970347267b45dc73a8a Author: Mihail Atanassov Date: Mon Feb 13 15:14:05 2017 +0000 drm: mali-dp: Add plane upscaling support Enable the scaling engine for upscaling a single plane using the polyphase scaler. No image enhancement support or downscaling yet*, and composition result scaling is not implemented. * Downscaling a plane requires mclk > pxlclk. Signed-off-by: Mihail Atanassov Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_crtc.c | 80 +++++++++++++++++++++ drivers/gpu/drm/arm/malidp_drv.c | 47 ++++++++++++ drivers/gpu/drm/arm/malidp_drv.h | 3 + drivers/gpu/drm/arm/malidp_hw.c | 140 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/arm/malidp_hw.h | 45 ++++++++++++ drivers/gpu/drm/arm/malidp_planes.c | 73 ++++++++++++++----- drivers/gpu/drm/arm/malidp_regs.h | 36 ++++++++++ 7 files changed, 407 insertions(+), 17 deletions(-) commit ca028dbb1836f5a0529a6e5536ee2b2d7027b825 Author: Alexandre TORGUE Date: Fri Apr 7 14:43:01 2017 +0200 pinctrl: stm32: Add STM32F469 MCU support This patch which adds STM32F469 pinctrl and GPIO support, relies on the generic STM32 pinctrl driver. Signed-off-by: Alexandre TORGUE Signed-off-by: Linus Walleij drivers/pinctrl/stm32/Kconfig | 6 + drivers/pinctrl/stm32/Makefile | 1 + drivers/pinctrl/stm32/pinctrl-stm32f469.c | 1578 +++++++++++++++++++++++++++++ 3 files changed, 1585 insertions(+) commit 269fcf3666a34cf741257238b5f89903ed8ba710 Author: Alexandre TORGUE Date: Fri Apr 7 14:42:59 2017 +0200 Documentation: dt: Remove ngpios from stm32-pinctrl binding Remove "ngpios" bindings definition as it is no more used in stm32 pinctrl driver. Signed-off-by: Alexandre TORGUE Acked-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt | 2 -- 1 file changed, 2 deletions(-) commit 4a4e5f6f77e5d7a0a8930a36082dc9cc966ec514 Author: Alexandre TORGUE Date: Fri Apr 7 17:10:09 2017 +0200 pinctrl: stm32: replace device_initcall() with arch_initcall() Pinctrl has to be registered earlier. Mainly to register bank irqdomain earlier as other devices could use interrupts from those irqdomain. Signed-off-by: Alexandre TORGUE Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32f429.c | 6 +++++- drivers/pinctrl/stm32/pinctrl-stm32f746.c | 7 ++++++- drivers/pinctrl/stm32/pinctrl-stm32h743.c | 6 +++++- 3 files changed, 16 insertions(+), 3 deletions(-) commit 1dc9d289154bd8751b5a2b69698a819742026ce4 Author: Alexandre TORGUE Date: Fri Apr 7 14:42:58 2017 +0200 pinctrl: stm32: add possibility to use gpio-ranges to declare bank range Use device tree entries to declare gpio range. It will allow to use no contiguous gpio bank and holes inside a bank. Signed-off-by: Alexandre TORGUE Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32.c | 115 +++++++++++++++++++--------------- 1 file changed, 65 insertions(+), 50 deletions(-) commit 5715092a458c1ac5f7befc1a3dd7660ccfcebcf1 Author: Gregory CLEMENT Date: Wed Apr 5 17:18:05 2017 +0200 pinctrl: armada-37xx: Add gpio support GPIO management is pretty simple and is part of the same IP than the pin controller for the Armada 37xx SoCs. This patch adds the GPIO support to the pinctrl-armada-37xx.c file, it also allows sharing common functions between the gpiolib and the pinctrl drivers. Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 128 +++++++++++++++++++++++++--- 1 file changed, 114 insertions(+), 14 deletions(-) commit 9842119a238bfb92cbab63258dabb54f0e7b111b Author: Marc Zyngier Date: Mon Apr 24 09:04:03 2017 +0100 arm64: Add CNTFRQ_EL0 trap handler We now trap accesses to CNTVCT_EL0 when the counter is broken enough to require the kernel to mediate the access. But it turns out that some existing userspace (such as OpenMPI) do probe for the counter frequency, leading to an UNDEF exception as CNTVCT_EL0 and CNTFRQ_EL0 share the same control bit. The fix is to handle the exception the same way we do for CNTVCT_EL0. Fixes: a86bd139f2ae ("arm64: arch_timer: Enable CNTVCT_EL0 trap if workaround is enabled") Reported-by: Hanjun Guo Tested-by: Hanjun Guo Reviewed-by: Hanjun Guo Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas arch/arm64/include/asm/esr.h | 4 ++++ arch/arm64/kernel/traps.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+) commit 6fbc8798d9461c0ff22fab9fbaddde13de815941 Author: Thadeu Lima de Souza Cascardo Date: Tue Apr 4 05:56:32 2017 -0300 tty: fix comment for __tty_alloc_driver() Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Jiri Kosina drivers/tty/tty_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b3b3b49b9961401331a1b496db5bec5c7b41ae6 Author: Viresh Kumar Date: Thu Mar 23 17:00:05 2017 +0530 init/main: properly align the multi-line comment Add a tab before it to follow standard practices. Also add the missing full stop '.'. Signed-off-by: Viresh Kumar Signed-off-by: Jiri Kosina init/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6623f1c6150c09ce946c8e27a4c814d64919495b Author: Viresh Kumar Date: Thu Mar 23 17:00:04 2017 +0530 init/main: Fix double "the" in comment s/the\ the/the Signed-off-by: Viresh Kumar Signed-off-by: Jiri Kosina init/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73dbd4a4230216b6a5540a362edceae0c9b4876b Author: Pan Bian Date: Sun Apr 23 18:23:21 2017 +0800 iommu/amd: Fix incorrect error handling in amd_iommu_bind_pasid() In function amd_iommu_bind_pasid(), the control flow jumps to label out_free when pasid_state->mm and mm is NULL. And mmput(mm) is called. In function mmput(mm), mm is referenced without validation. This will result in a NULL dereference bug. This patch fixes the bug. Signed-off-by: Pan Bian Fixes: f0aac63b873b ('iommu/amd: Don't hold a reference to mm_struct') Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a2a251f110576b1d89efbd0662677d7e7db21a8 Author: Stephan Mueller Date: Mon Apr 24 11:15:23 2017 +0200 crypto: algif_aead - Require setkey before accept(2) Some cipher implementations will crash if you try to use them without calling setkey first. This patch adds a check so that the accept(2) call will fail with -ENOKEY if setkey hasn't been done on the socket yet. Fixes: 400c40cf78da ("crypto: algif - add AEAD support") Cc: Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/algif_aead.c | 157 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 149 insertions(+), 8 deletions(-) commit a368f43d6e3a001e684e9191a27df384fbff12f5 Author: Giovanni Cabiddu Date: Fri Apr 21 21:54:30 2017 +0100 crypto: scomp - add support for deflate rfc1950 (zlib) Add scomp backend for zlib-deflate compression algorithm. This backend outputs data using the format defined in rfc1950 (raw deflate surrounded by zlib header and footer). Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu crypto/deflate.c | 61 ++++++++++++++++++++++++++++++++------------- crypto/testmgr.c | 10 ++++++++ crypto/testmgr.h | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 129 insertions(+), 17 deletions(-) commit 3de4f5e1a5dbe1a36d1e8a08ee1978f44c4b739b Author: Giovanni Cabiddu Date: Fri Apr 21 21:54:29 2017 +0100 crypto: scomp - allow registration of multiple scomps Add crypto_register_scomps and crypto_unregister_scomps to allow the registration of multiple implementations with one call. Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu crypto/scompress.c | 29 +++++++++++++++++++++++++++++ include/crypto/internal/scompress.h | 3 +++ 2 files changed, 32 insertions(+) commit 6263b51eb3190d30351360fd168959af7e3a49a9 Author: Gary R Hook Date: Fri Apr 21 10:50:14 2017 -0500 crypto: ccp - Change ISR handler method for a v5 CCP The CCP has the ability to perform several operations simultaneously, but only one interrupt. When implemented as a PCI device and using MSI-X/MSI interrupts, use a tasklet model to service interrupts. By disabling and enabling interrupts from the CCP, coupled with the queuing that tasklets provide, we can ensure that all events (occurring on the device) are recognized and serviced. This change fixes a problem wherein 2 or more busy queues can cause notification bits to change state while a (CCP) interrupt is being serviced, but after the queue state has been evaluated. This results in the event being 'lost' and the queue hanging, waiting to be serviced. Since the status bits are never fully de-asserted, the CCP never generates another interrupt (all bits zero -> one or more bits one), and no further CCP operations will be executed. Cc: # 4.9.x+ Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v5.c | 111 ++++++++++++++++++++++++---------------- 1 file changed, 67 insertions(+), 44 deletions(-) commit 7b537b24e76a1e8e6d7ea91483a45d5b1426809b Author: Gary R Hook Date: Fri Apr 21 10:50:05 2017 -0500 crypto: ccp - Change ISR handler method for a v3 CCP The CCP has the ability to perform several operations simultaneously, but only one interrupt. When implemented as a PCI device and using MSI-X/MSI interrupts, use a tasklet model to service interrupts. By disabling and enabling interrupts from the CCP, coupled with the queuing that tasklets provide, we can ensure that all events (occurring on the device) are recognized and serviced. This change fixes a problem wherein 2 or more busy queues can cause notification bits to change state while a (CCP) interrupt is being serviced, but after the queue state has been evaluated. This results in the event being 'lost' and the queue hanging, waiting to be serviced. Since the status bits are never fully de-asserted, the CCP never generates another interrupt (all bits zero -> one or more bits one), and no further CCP operations will be executed. Cc: # 4.9.x+ Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v3.c | 120 +++++++++++++++++++++++----------------- drivers/crypto/ccp/ccp-dev.h | 3 + drivers/crypto/ccp/ccp-pci.c | 2 + 3 files changed, 75 insertions(+), 50 deletions(-) commit 7c6c0dc7bb45be9931e432b9c525f72aecdc908a Author: Colin Ian King Date: Fri Apr 21 12:13:49 2017 +0100 crypto: crypto4xx - rename ce_ring_contol to ce_ring_control trivial spelling mistake, missing r, rename to ce_ring_control Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.c | 2 +- drivers/crypto/amcc/crypto4xx_reg_def.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6175ca2ba7d2c4265d6d5590d699fbd907b24708 Author: Milan Broz Date: Fri Apr 21 13:03:06 2017 +0200 crypto: testmgr - Allow ecb(cipher_null) in FIPS mode The cipher_null is not a real cipher, FIPS mode should not restrict its use. It is used for several tests (for example in cryptsetup testsuite) and also temporarily for reencryption of not yet encrypted device in cryptsetup-reencrypt tool. Problem is easily reproducible with cryptsetup benchmark -c null Signed-off-by: Milan Broz Acked-by: Stephan Müller Signed-off-by: Herbert Xu crypto/testmgr.c | 1 + 1 file changed, 1 insertion(+) commit 50c7512fd7496129d774ccabf32537e9a45be186 Author: Liviu Dudau Date: Wed Apr 5 11:55:26 2017 +0100 drm/mali-dp: Add core_id file to the sysfs interface Add a core_id file in the driver's sysfs directory, exposing the hardware CORE ID. This is useful to allow userspace to discover the hardware version used. Signed-off-by: Mihail Atanassov Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_drv.c | 35 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/arm/malidp_drv.h | 1 + 2 files changed, 36 insertions(+) commit 6954f24588ebddc2e3c840103f02d1fe7e65a2d6 Author: Mihail Atanassov Date: Mon Feb 13 12:49:03 2017 +0000 drm: mali-dp: Add CTM support All DPs have a COLORADJ matrix which is applied prior to output gamma. Attach that to the CTM property. Also, ensure the input CTM's coefficients can fit in the DP registers' Q3.12 format. Signed-off-by: Mihail Atanassov Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_crtc.c | 64 +++++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/arm/malidp_drv.c | 35 ++++++++++++++++++++- drivers/gpu/drm/arm/malidp_drv.h | 1 + drivers/gpu/drm/arm/malidp_hw.h | 1 + drivers/gpu/drm/arm/malidp_regs.h | 1 + 5 files changed, 98 insertions(+), 4 deletions(-) commit 02725d31371b66b97bc58b2a81f0c6dc40970598 Author: Mihail Atanassov Date: Wed Feb 1 14:48:50 2017 +0000 drm: mali-dp: enable gamma support Add gamma via the DRM GAMMA_LUT/GAMMA_LUT_SIZE CRTC properties. The expected LUT size is 4096 in order to produce as accurate a set of segments as possible. This version uses only the green channel's gamma curve to set the hardware curve on DP550/650. For the sake of simplicity, it uses the same table of coefficients for all 3 curves on DP500. Signed-off-by: Mihail Atanassov Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_crtc.c | 122 ++++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/arm/malidp_drv.c | 51 ++++++++++++++++ drivers/gpu/drm/arm/malidp_drv.h | 1 + drivers/gpu/drm/arm/malidp_hw.c | 3 + drivers/gpu/drm/arm/malidp_hw.h | 6 ++ drivers/gpu/drm/arm/malidp_regs.h | 22 ++++++- 6 files changed, 196 insertions(+), 9 deletions(-) commit 99665d07218345647875fea9ad4979bbe297c104 Author: Mihail Atanassov Date: Wed Feb 1 14:48:49 2017 +0000 drm: mali-dp: add malidp_crtc_state struct Add a custom CRTC state struct to enable storing driver's private state. This patch only adds the base drm_crtc_state struct and the atomic functions that handle it. Signed-off-by: Mihail Atanassov Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_crtc.c | 52 ++++++++++++++++++++++++++++++++++++--- drivers/gpu/drm/arm/malidp_drv.h | 6 +++++ 2 files changed, 55 insertions(+), 3 deletions(-) commit fe10cd677c07d11494267f74f3c04a1a5fd179c0 Author: Mihail Atanassov Date: Thu Dec 1 12:19:58 2016 +0000 drm: mali-dp: add custom reset hook for planes Now that we are using a custom plane state in mali-dp, we need a bespoke reset that takes into account the larger structure. Signed-off-by: Mihail Atanassov [Updated commit message] Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_planes.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit c03c17c1f462681fd57f253eee28b26627c1df80 Author: Arnd Bergmann Date: Tue Mar 28 16:07:58 2017 +0200 drm: mali-dp: remove unused variable The newly introduced function causes a harmless build warning: drivers/gpu/drm/arm/malidp_planes.c: In function 'malidp_plane_atomic_print_state': drivers/gpu/drm/arm/malidp_planes.c:98:23: error: unused variable 'mp' [-Werror=unused-variable] The variable serves no purpose here and can be removed. Fixes: 242f43b69c61 ("drm: mali-dp: add atomic_print_state for planes") Signed-off-by: Arnd Bergmann Acked-by: Liviu Dudau Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_planes.c | 1 - 1 file changed, 1 deletion(-) commit 88d4d90fe04cecddff6dc2d74cda34b3271d692e Author: Mihail Atanassov Date: Mon Jan 23 15:12:02 2017 +0000 drm: mali-dp: add atomic_print_state for planes Add function to dump the state of the plane. Signed-off-by: Mihail Atanassov Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_planes.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 85f6421889eca68ceb0a0403c4c00b2eaf3c16e0 Author: Liviu Dudau Date: Wed Mar 22 10:44:57 2017 +0000 drm: mali-dp: Enable power management for the device. Enable runtime and system Power Management. Clocks are now managed from malidp_crtc_{enable,disable} functions. Suspend-to-RAM tested as working on Juno. Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_crtc.c | 14 ++++- drivers/gpu/drm/arm/malidp_drv.c | 128 +++++++++++++++++++++++++++++++------- drivers/gpu/drm/arm/malidp_drv.h | 1 + drivers/gpu/drm/arm/malidp_hw.h | 5 ++ 4 files changed, 125 insertions(+), 23 deletions(-) commit 46f1d42f273836a3b8840637b9ee3d98a528ffd2 Author: Liviu Dudau Date: Wed Mar 22 10:39:48 2017 +0000 drm: mali-dp: Update the state of all planes before re-enabling active CRTCs. Mali DP needs to have all the planes that are becoming inactive in the new state disabled before re-enabling the active CRTC, otherwise we start streaming out data from old pointers in memory. Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_drv.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 87466ccd9401c4ac3971c437b7f634444fa7ace2 Author: Gregory CLEMENT Date: Wed Apr 5 17:18:04 2017 +0200 pinctrl: armada-37xx: Add pin controller support for Armada 37xx The Armada 37xx SoC come with 2 pin controllers: one on the south bridge (managing 28 pins) and one on the north bridge (managing 36 pins). At the hardware level the controller configure the pins by group and not pin by pin. This constraint is reflected in the design of the driver: only the group related functions are implemented. Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/pinctrl/Makefile | 2 +- drivers/pinctrl/mvebu/Kconfig | 7 + drivers/pinctrl/mvebu/Makefile | 3 +- drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 648 ++++++++++++++++++++++++++++ 4 files changed, 658 insertions(+), 2 deletions(-) commit f13980e4083854aa0cebd502a413857e7b302075 Author: Gregory CLEMENT Date: Wed Apr 5 17:18:02 2017 +0200 pinctrl: dt-bindings: Add documentation for Armada 37xx pin controllers Document the device tree binding for the pin controllers found on the Armada 37xx SoCs. Update the binding documention of the xtal clk which is a subnode of this syscon node. Signed-off-by: Gregory CLEMENT Acked-by: Rob Herring [Fixed gpios node] Signed-off-by: Linus Walleij .../bindings/clock/armada3700-xtal-clock.txt | 7 +- .../pinctrl/marvell,armada-37xx-pinctrl.txt | 183 +++++++++++++++++++++ 2 files changed, 187 insertions(+), 3 deletions(-) commit 5037c22c53603acd4e8c465d750fdd604c600bd3 Merge: e525f8a 129cc19 Author: Martin Schwidefsky Date: Mon Apr 24 11:17:06 2017 +0200 Merge tag 'vfio-ccw-20170413' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into features Pull vfio-ccw fixes from Cornelia Huck: Two fixes for the new vfio-ccw support. commit 757642f9a584e893f3f4e50c99b674ee8a3ed363 Author: Andrew Lunn Date: Fri Apr 14 17:40:52 2017 +0200 gpio: mvebu: Add limited PWM support Armada 370/XP devices can 'blink' GPIO lines with a configurable on and off period. This can be modelled as a PWM. However, there are only two sets of PWM configuration registers for all the GPIO lines. This driver simply allows a single GPIO line per GPIO chip of 32 lines to be used as a PWM. Attempts to use more return EBUSY. Due to the interleaving of registers it is not simple to separate the PWM driver from the GPIO driver. Thus the GPIO driver has been extended with a PWM driver. Signed-off-by: Andrew Lunn URL: https://patchwork.ozlabs.org/patch/427287/ URL: https://patchwork.ozlabs.org/patch/427295/ [Ralph Sennhauser: * Port forward * Merge PWM portion into gpio-mvebu.c * Switch to atomic PWM API * Add new compatible string marvell,armada-370-xp-gpio * Update and merge documentation patch * Update MAINTAINERS] Signed-off-by: Ralph Sennhauser Tested-by: Andrew Lunn Acked-by: Thierry Reding Acked-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/gpio-mvebu.txt | 32 ++ MAINTAINERS | 2 + drivers/gpio/gpio-mvebu.c | 327 ++++++++++++++++++++- 3 files changed, 349 insertions(+), 12 deletions(-) commit 0ca4921fe9cbbc1c35bd924907552b38f0009840 Author: Andy Shevchenko Date: Mon Mar 27 14:37:09 2017 +0300 pinctrl: core: Make pinctrl_init_controller() static pinctrl_init_controller() is not used outside core.c, thus make it static and prevent compiler to warn. drivers/pinctrl/core.c:1943:21: warning: no previous prototype for ‘pinctrl_init_controller’ [-Wmissing-prototypes] struct pinctrl_dev *pinctrl_init_controller(struct pinctrl_desc *pctldesc, ^~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 24bd909e94776ecce95291bff910f14c78ac4a43 Author: Naveen N. Rao Date: Wed Apr 19 18:22:28 2017 +0530 powerpc/kprobes: Prefer ftrace when probing function entry KPROBES_ON_FTRACE avoids much of the overhead of regular kprobes as it eliminates the need for a trap, as well as the need to emulate or single-step instructions. Though OPTPROBES provides us with similar performance, we have limited optprobes trampoline slots. As such, when asked to probe at a function entry, default to using the ftrace infrastructure. With: # cd /sys/kernel/debug/tracing # echo 'p _do_fork' > kprobe_events before patch: # cat ../kprobes/list c0000000000daf08 k _do_fork+0x8 [DISABLED] c000000000044fc0 k kretprobe_trampoline+0x0 [OPTIMIZED] and after patch: # cat ../kprobes/list c0000000000d074c k _do_fork+0xc [DISABLED][FTRACE] c0000000000412b0 k kretprobe_trampoline+0x0 [OPTIMIZED] Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 1b32cd1715378c9a3856df4a80920f8e241f914c Author: Naveen N. Rao Date: Wed Apr 19 18:22:27 2017 +0530 powerpc: Introduce a new helper to obtain function entry points kprobe_lookup_name() is specific to the kprobe subsystem and may not always return the function entry point (in a subsequent patch for KPROBES_ON_FTRACE). For looking up function entry points, introduce a separate helper and use it in optprobes.c Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/include/asm/code-patching.h | 41 ++++++++++++++++++++++++++++++++ arch/powerpc/kernel/optprobes.c | 6 ++--- 2 files changed, 44 insertions(+), 3 deletions(-) commit ead514d5fb30a0889d51c0f0e35c3e346165a955 Author: Naveen N. Rao Date: Wed Apr 19 18:22:26 2017 +0530 powerpc/kprobes: Add support for KPROBES_ON_FTRACE Allow kprobes to be placed on ftrace _mcount() call sites. This optimization avoids the use of a trap, by riding on ftrace infrastructure. This depends on HAVE_DYNAMIC_FTRACE_WITH_REGS which depends on MPROFILE_KERNEL, which is only currently enabled on powerpc64le with newer toolchains. Based on the x86 code by Masami. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman .../debug/kprobes-on-ftrace/arch-support.txt | 2 +- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/kprobes.h | 10 ++ arch/powerpc/kernel/Makefile | 3 + arch/powerpc/kernel/kprobes-ftrace.c | 104 +++++++++++++++++++++ arch/powerpc/kernel/kprobes.c | 8 +- 6 files changed, 126 insertions(+), 2 deletions(-) commit 2f59be5b970b503ca8db1cb723b155e455ebac8e Author: Naveen N. Rao Date: Wed Apr 19 18:22:24 2017 +0530 powerpc/ftrace: Restore LR from pt_regs Pass the real LR to the ftrace handler. This is needed for KPROBES_ON_FTRACE for the pre handlers. Also, with KPROBES_ON_FTRACE, the link register may be updated by the pre handlers or by a registed kretprobe. Honor updated LR by restoring it from pt_regs, rather than from the stack save area. Live patch and function graph continue to work fine with this change. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 899f35fabeea0d51fbfa146aaeaa9fc8f3b00292 Author: Herbert Xu Date: Mon Apr 24 16:09:50 2017 +0800 Revert "crypto: arm64/sha - Add constant operand modifier to ASM_EXPORT" This reverts commit 42ae2922a68ac8d68927ccb052b486f34e5fba71. It causes a regression with older versions of gcc. The consensus is that this should instead be fixed in clang. Reported-by: Paul Gortmaker Signed-off-by: Herbert Xu arch/arm64/crypto/sha1-ce-glue.c | 2 +- arch/arm64/crypto/sha2-ce-glue.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 51f397642c890e6c54e2532110c84519f1d12e4c Author: James Smart Date: Fri Apr 21 16:05:06 2017 -0700 lpfc revison 11.2.0.12 Update lpfc version to reflect this set of changes. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e04e21afa82ef024416f5413b5bdb66e0505bcd Author: James Smart Date: Fri Apr 21 16:05:05 2017 -0700 Fix Express lane queue creation. The older sli4 adapters only supported the 64 byte WQE entry size. The new adapter (fw) support both 64 and 128 byte WQE entry sizies. The Express lane WQ was not being created with the 128 byte WQE sizes when it was supported. Not having the right WQE size created for the express lane work queue caused the the firmware to overwrite the lun indentifier in the FCP header. This patch correctly creates the express lane work queue with the supported size. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_init.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 86c6737963e1c6019168512743908c8ee4e80f06 Author: James Smart Date: Fri Apr 21 16:05:04 2017 -0700 Update ABORT processing for NVMET. The driver with nvme had this routine stubbed. Right now XRI_ABORTED_CQE is not handled and the FC NVMET Transport has a new API for the driver. Missing code path, new NVME abort API Update ABORT processing for NVMET There are 3 new FC NVMET Transport API/ template routines for NVMET: lpfc_nvmet_xmt_fcp_release This NVMET template callback routine called to release context associated with an IO This routine is ALWAYS called last, even if the IO was aborted or completed in error. lpfc_nvmet_xmt_fcp_abort This NVMET template callback routine called to abort an exchange that has an IO in progress nvmet_fc_rcv_fcp_req When the lpfc driver receives an ABTS, this NVME FC transport layer callback routine is called. For this case there are 2 paths thru the driver: the driver either has an outstanding exchange / context for the XRI to be aborted or not. If not, a BA_RJT is issued otherwise a BA_ACC NVMET Driver abort paths: There are 2 paths for aborting an IO. The first one is we receive an IO and decide not to process it because of lack of resources. An unsolicated ABTS is immediately sent back to the initiator as a response. lpfc_nvmet_unsol_fcp_buffer lpfc_nvmet_unsol_issue_abort (XMIT_SEQUENCE_WQE) The second one is we sent the IO up to the NVMET transport layer to process, and for some reason the NVME Transport layer decided to abort the IO before it completes all its phases. For this case there are 2 paths thru the driver: the driver either has an outstanding TSEND/TRECEIVE/TRSP WQE or no outstanding WQEs are present for the exchange / context. lpfc_nvmet_xmt_fcp_abort if (LPFC_NVMET_IO_INP) lpfc_nvmet_sol_fcp_issue_abort (ABORT_WQE) lpfc_nvmet_sol_fcp_abort_cmp else lpfc_nvmet_unsol_fcp_issue_abort lpfc_nvmet_unsol_issue_abort (XMIT_SEQUENCE_WQE) lpfc_nvmet_unsol_fcp_abort_cmp Context flags: LPFC_NVMET_IOP - his flag signifies an IO is in progress on the exchange. LPFC_NVMET_XBUSY - this flag indicates the IO completed but the firmware is still busy with the corresponding exchange. The exchange should not be reused until after a XRI_ABORTED_CQE is received for that exchange. LPFC_NVMET_ABORT_OP - this flag signifies an ABORT_WQE was issued on the exchange. LPFC_NVMET_CTX_RLS - this flag signifies a context free was requested, but we are deferring it due to an XBUSY or ABORT in progress. A ctxlock is added to the context structure that is used whenever these flags are set/read within the context of an IO. The LPFC_NVMET_CTX_RLS flag is only set in the defer_relase routine when the transport has resolved all IO associated with the buffer. The flag is cleared when the CTX is associated with a new IO. An exchange can has both an LPFC_NVMET_XBUSY and a LPFC_NVMET_ABORT_OP condition active simultaneously. Both conditions must complete before the exchange is freed. When the abort callback (lpfc_nvmet_xmt_fcp_abort) is envoked: If there is an outstanding IO, the driver will issue an ABORT_WQE. This should result in 3 completions for the exchange: 1) IO cmpl with XB bit set 2) Abort WQE cmpl 3) XRI_ABORTED_CQE cmpl For this scenerio, after completion #1, the NVMET Transport IO rsp callback is called. After completion #2, no action is taken with respect to the exchange / context. After completion #3, the exchange context is free for re-use on another IO. If there is no outstanding activity on the exchange, the driver will send a ABTS to the Initiator. Upon completion of this WQE, the exchange / context is freed for re-use on another IO. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_crtn.h | 7 + drivers/scsi/lpfc/lpfc_debugfs.c | 53 ++++-- drivers/scsi/lpfc/lpfc_hw4.h | 3 + drivers/scsi/lpfc/lpfc_init.c | 52 +++--- drivers/scsi/lpfc/lpfc_mbox.c | 7 +- drivers/scsi/lpfc/lpfc_nvme.c | 45 +++-- drivers/scsi/lpfc/lpfc_nvmet.c | 348 +++++++++++++++++++++++++++++++-------- drivers/scsi/lpfc/lpfc_nvmet.h | 10 +- drivers/scsi/lpfc/lpfc_sli.c | 7 +- drivers/scsi/lpfc/lpfc_sli4.h | 2 +- 10 files changed, 409 insertions(+), 125 deletions(-) commit 1c5b12f76301b86d0e5828c7d11ec7c36ffd0195 Author: James Smart Date: Fri Apr 21 16:05:03 2017 -0700 Fix implicit logo and RSCN handling for NVMET NVMET didn't have any RSCN handling at all and would not execute implicit LOGO when receiving a PLOGI from an rport that NVMET had in state UNMAPPED. Clean up the logic in lpfc_nlp_state_cleanup for initiators (FCP and NVME). NVMET should not respond to RSCN including allocating new ndlps so this code was conditionalized when nvmet_support is true. The check for NLP_RCV_PLOGI in lpfc_setup_disc_node was moved below the check for nvmet_support to allow the NVMET to recover initiator nodes correctly. The implicit logo was introduced with lpfc_rcv_plogi when NVMET gets a PLOGI on an ndlp in UNMAPPED state. The RSCN handling was modified to not respond to an RSCN in NVMET. Instead NVMET sends a GID_FT and determines if an NVMEP_INITIATOR it has is UNMAPPED but no longer in the zone membership. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_ct.c | 68 +++++++++++++++++++++++++++++--------- drivers/scsi/lpfc/lpfc_disc.h | 1 + drivers/scsi/lpfc/lpfc_els.c | 23 ++++++------- drivers/scsi/lpfc/lpfc_hbadisc.c | 62 ++++++++++++++++++++++------------ drivers/scsi/lpfc/lpfc_nportdisc.c | 8 +++-- 5 files changed, 110 insertions(+), 52 deletions(-) commit aeb3c8170bf7f177ab4825b751a1773594636ebf Author: James Smart Date: Fri Apr 21 16:05:02 2017 -0700 Add Fabric assigned WWN support. Adding support for Fabric assigned WWPN and WWNN. Firmware sends first FLOGI to fabric with vendor version changes. On link up driver gets updated service parameter with FAWWN assigned port name. Driver sends 2nd FLOGI with updated fawwpn and modifies the vport->fc_portname in driver. Note: Soft wwpn will not be allowed when fawwpn is enabled. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc.h | 2 ++ drivers/scsi/lpfc/lpfc_attr.c | 8 ++++++++ drivers/scsi/lpfc/lpfc_els.c | 8 +++++--- drivers/scsi/lpfc/lpfc_hbadisc.c | 24 ++++++++++++++++++------ drivers/scsi/lpfc/lpfc_hw.h | 3 +++ drivers/scsi/lpfc/lpfc_hw4.h | 1 + drivers/scsi/lpfc/lpfc_init.c | 31 ++++++++++++++++++++++++++++--- 7 files changed, 65 insertions(+), 12 deletions(-) commit 4d4c4a4ac756e7a0198259a49eeaf0d4a0e9a4fb Author: James Smart Date: Fri Apr 21 16:05:01 2017 -0700 Fix max_sgl_segments settings for NVME / NVMET Cannot set NVME segment counts to a large number The existing module parameter lpfc_sg_seg_cnt is used for both SCSI and NVME. Limit the module parameter lpfc_sg_seg_cnt to 128 with the default being 64 for both NVME and NVMET, assuming NVME is enabled in the driver for that port. The driver will set max_sgl_segments in the NVME/NVMET template to lpfc_sg_seg_cnt + 1. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc.h | 3 ++- drivers/scsi/lpfc/lpfc_nvme.c | 18 ++++++++++++++---- drivers/scsi/lpfc/lpfc_nvmet.c | 19 +++++++++++++++---- 3 files changed, 31 insertions(+), 9 deletions(-) commit 9d3d340d19d36b923d768f25c66cedc900d8ad90 Author: James Smart Date: Fri Apr 21 16:05:00 2017 -0700 Fix crash after issuing lip reset When RPI is not available, driver sends WQE with invalid RPI value and rejected by HBA. lpfc 0000:82:00.3: 1:3154 BLS ABORT RSP failed, data: x3/xa0320008 and lpfc :2753 PLOGI failure DID:FFFFFA Status:x3/xa0240008 In this case, driver accesses rpi_ids array out of bounds. Fix: Check return value of lpfc_sli4_alloc_rpi(). Do not allocate lpfc_nodelist entry if RPI is not available. When RPI is not available, we will get discovery timeouts and command drops for some of the vports as seen below. lpfc :0273 Unexpected discovery timeout, vport State x0 lpfc :0230 Unexpected timeout, hba link state x5 lpfc :0111 Dropping received ELS cmd Data: x0 xc90c55 x0 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_bsg.c | 4 ++++ drivers/scsi/lpfc/lpfc_crtn.h | 2 +- drivers/scsi/lpfc/lpfc_els.c | 35 ++++++++-------------------- drivers/scsi/lpfc/lpfc_hbadisc.c | 47 +++++++++++++++++++++++++++++--------- drivers/scsi/lpfc/lpfc_init.c | 49 +++++++++++++++++++++------------------- drivers/scsi/lpfc/lpfc_sli.c | 3 +-- drivers/scsi/lpfc/lpfc_vport.c | 3 +-- 7 files changed, 79 insertions(+), 64 deletions(-) commit 2b7824d00d9cae2e625dcf6b004c5d738a9c8df4 Author: James Smart Date: Fri Apr 21 16:04:59 2017 -0700 Fix driver load issues when MRQ=8 The symptom is that the driver will fail to login to the fabric. The reason is because it is out of iocb resources. There is a one to one relationship between MRQs (receive buffers for NVMET-FC) and iocbs and the default number of IOCBs was not accounting for the number of MRQs that were being created. This fix aligns the number of MRQ resources with the total resources so that it can handle fabric events when needed. Also the initialization of ctxlock to be on FCP commands, NOT LS commands. And modified log messages so that the log output can be correlated with the analyzer trace. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_init.c | 12 ++++++++---- drivers/scsi/lpfc/lpfc_nvme.c | 23 ++++++++++++----------- drivers/scsi/lpfc/lpfc_nvmet.c | 6 +++--- 3 files changed, 23 insertions(+), 18 deletions(-) commit 59c6e13ecd50fdb2d872617d194e05f2c31f26d7 Author: James Smart Date: Fri Apr 21 16:04:58 2017 -0700 Remove hba lock from NVMET issue WQE. Unnecessary lock is taken. ring lock should be sufficient to protect the work queue submission. This was noticed when doing performance testing. The hbalock is not needed to issue io to the nvme work queue. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_nvmet.c | 4 ---- 1 file changed, 4 deletions(-) commit 4410a67a9e53d3cf8d1b88169c642d91f1292fb2 Author: James Smart Date: Fri Apr 21 16:04:57 2017 -0700 Fix nvme initiator handling when not enabled. Fix nvme initiator handline when CONFIG_LPFC_NVME_INITIATOR is not enabled. With update nvme upstream driver sources, loading the driver with nvme enabled resulting in this Oops. BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 IP: lpfc_nvme_update_localport+0x23/0xd0 [lpfc] PGD 0 Oops: 0000 [#1] SMP CPU: 0 PID: 10256 Comm: lpfc_worker_0 Tainted Hardware name: ... task: ffff881028191c40 task.stack: ffff880ffdf00000 RIP: 0010:lpfc_nvme_update_localport+0x23/0xd0 [lpfc] RSP: 0018:ffff880ffdf03c20 EFLAGS: 00010202 Cause: As the initiator driver completes discovery at different stages, it call lpfc_nvme_update_localport to hint that the DID and role may have changed. In the implementation of lpfc_nvme_update_localport, the driver was not validating the localport or the lport during the execution of the update_localport routine. With the recent upstream additions to the driver, the create_localport routine didn't run and so the localport was NULL causing the page-fault Oops. Fix: Add the CONFIG_LPFC_NVME_INITIATOR preprocessor inclusions to lpfc_nvme_update_localport to turn off all routine processing when the running kernel does not have NVME configured. Add NULL pointer checks on the localport and lport in lpfc_nvme_update_localport and dump messages if they are NULL and just exit. Also one alingment issue fixed. Repalces the ifdef with the IS_ENABLED macro. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_attr.c | 2 +- drivers/scsi/lpfc/lpfc_nvme.c | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) commit 3f247de750b8dd8f50a2c1390e2a1238790a9dff Author: James Smart Date: Fri Apr 21 16:04:56 2017 -0700 Fix driver usage of 128B WQEs when WQ_CREATE is V1. There are two versions of a structure for queue creation and setup that the driver shares with FW. The driver was only treating as version 0. Verify WQ_CREATE with 128B WQEs in V0 and V1. Code review of another bug showed the driver passing 128B WQEs and 8 pages in WQ CREATE and V0. Code inspection/instrumentation showed that the driver uses V0 in WQ_CREATE and if the caller passes queue->entry_size 128B, the driver sets the hdr_version to V1 so all is good. When I tested the V1 WQ_CREATE, the mailbox failed causing the driver to unload. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_sli.c | 3 +++ 1 file changed, 3 insertions(+) commit d1f525aaa4d7e575a655365b6ae01a2a1c5fb321 Author: James Smart Date: Fri Apr 21 16:04:55 2017 -0700 Fix driver unload/reload operation. There are couple of different load/unload issues fixed with this patch. One of the issues was reported by Junichi Nomura, a patch was submitted by Johannes Thumsrhirn which did fix one of the problems but the fix in this patch separates the pring free from the queue free and does not set the parameter passed in to NULL. issues: (1) driver could not be unloaded and reloaded without some Oops or Panic occurring. (2) The driver was panicking because of a corruption in the Memory Manager when the iocb list was getting allocated. Root cause for the memory corruption was a double free of the Work Queue ring pointer memory - Freed once in the lpfc_sli4_queue_free when the CQ was destroyed and again in lpfc_sli4_queue_free when the WQ was destroyed. The pring free and the queue free were separated, the pring free was moved to the wq destroy routine because it a better fit logically to delete the ring with the wq. The checkpatch flagged several alignmenet issues that were also corrected with this patch. The mboxq was never initialed correctly before it was used by the driver this patch corrects that issue. Reported-by: Junichi Nomura Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Tested-by: Junichi Nomura drivers/scsi/lpfc/lpfc_init.c | 46 +++++++++++++++++++++++-------------------- drivers/scsi/lpfc/lpfc_sli.c | 7 ++++++- 2 files changed, 31 insertions(+), 22 deletions(-) commit c07f10cd56ae30d3f1f1c89c81dffd6fe6bb2223 Author: James Smart Date: Fri Apr 21 16:04:54 2017 -0700 Fix PRLI ACC rsp for NVME PRLI ACC from target is FCP oriented. Word 0 was wrong. This was noticed by another nvmet-fc vendor that was testing the lpfc nvme-fc initiator with their target. Verified results with analyzer. PRLI BC B5 56 56 22 61 04 00 00 61 00 00 01 29 00 00 20 00 00 00 00 10 FF FF 00 00 00 00 20 14 00 18 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 9C D8 DA C9 BC 95 75 75 ACC BC B5 56 56 23 61 00 00 00 61 04 00 01 98 00 00 30 00 00 00 00 10 00 18 00 00 00 00 02 14 00 18 28 00 01 00 00 00 00 00 00 00 00 00 00 00 00 18 00 00 00 00 B0 6B 07 57 BC B5 75 75 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_els.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit afbb38fedaa25935b963b07cc10f72a25bb3acbb Author: James Smart Date: Fri Apr 21 16:04:53 2017 -0700 Fix extra line print in rqpair debug print. An extra blank line was being added the the rqpair printing. Remove the extra line feed. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_debugfs.c | 2 -- 1 file changed, 2 deletions(-) commit eafe89f556ef1fe1b07ab8c1b4ce453ca1da1e41 Author: James Smart Date: Fri Apr 21 16:04:52 2017 -0700 Remove NULL ptr check before kfree. The check for NULL ptr is not necessary, kfree will check it. Removing NULL ptr check. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_debugfs.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 06909bb91f6477db3dd40d5c5fe0364cd114a918 Author: James Smart Date: Fri Apr 21 16:04:51 2017 -0700 Remove unused defines for NVME PostBuf. These defines for the posting of buffers for nvmet target were not used. Removing the unused defines. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_nvme.h | 3 --- 1 file changed, 3 deletions(-) commit 0ef699684cfaaa8d3b7993e12d5a2066dbb1d6e9 Author: James Smart Date: Fri Apr 21 16:04:50 2017 -0700 Fix spelling in comments. Comment should have said Repost. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_sli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8c0a7793523e607bace8e457aa1bad0b16215ad Author: James Smart Date: Fri Apr 21 16:04:49 2017 -0700 Add debug messages for nvme/fcp resource allocation. The xri resources are split into pools for NVME and FCP IO when NVME is enabled. There was not message in the log that identified this allocation. Added debug message to log XRI split. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_init.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c154e750d38e561e076e9d2fc6ffaa18820f4fa1 Author: James Smart Date: Fri Apr 21 16:04:48 2017 -0700 Fix log message in completion path. In the lpfc_nvme_io_cmd_wqe_cmpl routine the driver was printing two pointers and the DID for the rport whenever an IO completed on a now that had transitioned to a non active state. There is no need to print the node pointer address for a node that is not active the DID should be enough to debug. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_nvme.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ba43c4d0fe5ab053c058fd7e2402eb8ba1c41074 Author: James Smart Date: Fri Apr 21 16:04:47 2017 -0700 Fix rejected nvme LS Req. In this case, the NVME initiator is sending an LS REQ command on an NDLP that is not MAPPED. The FW rejects it. The lpfc_nvme_ls_req routine checks for a NULL ndlp pointer but does not check the NDLP state. This allows the routine to send an LS IO when the ndlp is disconnected. Check the ndlp for NULL, actual node, Target and MAPPED or Initiator and UNMAPPED. This avoids Fabric nodes getting the Create Association or Create Connection commands. Initiators are free to Reject either Create. Also some of the messages numbers in lpfc_nvme_ls_req were changed because they were already used in other log messages. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_nvme.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 975ff31c77348c567b4c12418d456446c50006dd Author: James Smart Date: Fri Apr 21 16:04:46 2017 -0700 Fix nvme unregister port timeout. During some link event testing it was observed that the wait_for_completion_timeout in the lpfc_nvme_unregister_port was timing out all the time. The initiator is claiming the nvme_fc_unregister_remoteport upcall is not completing the unregister in the time allotted. [ 2186.151317] lpfc 0000:07:00.0: 0:(0):6169 Unreg nvme wait failed 0 The wait_for_completion_timeout returns 0 when the wait has been outstanding for the jiffies passed by the caller. In this error message, the nvme initiator passed value 5 - meaning 5 jiffies - and this is just wrong. Calculate 5 seconds in Jiffies and pass that value from the current jiffies. Also the log message for the unregister timeout was reduced because timeout failure is the same as timeout. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_nvme.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit a44e4e8b6bf22926be6ed63f99def5e62953ac08 Author: James Smart Date: Fri Apr 21 16:04:45 2017 -0700 Standardize nvme SGL segment count Standardize default SGL segment count for nvme target and initiator The driver needs to make them the same for clarity. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn drivers/scsi/lpfc/lpfc_nvme.h | 4 +--- drivers/scsi/lpfc/lpfc_nvmet.c | 2 +- drivers/scsi/lpfc/lpfc_nvmet.h | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) commit 610793fe2b1c7ced8ca5c06a8d8e892aae72c3f2 Merge: fc7438b 56798e6 Author: Takashi Iwai Date: Mon Apr 24 09:24:15 2017 +0200 Merge branch 'topic/hda-dual-codecs' into for-next commit 36b8890e91690fa392fa0bf7913fed79b156c194 Author: Christoph Hellwig Date: Fri Apr 21 10:37:25 2017 +0200 nvmet-fcloop: mark two symbols static Found by sparse. Signed-off-by: Christoph Hellwig Reviewed-by: James Smart Reviewed-by: Johannes Thumshirn drivers/nvme/target/fcloop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8ad76cf10012b625800a9764c5af08dbc0948ff7 Author: Christoph Hellwig Date: Fri Apr 21 10:43:13 2017 +0200 nvmet-fc: properly endian swap sq_head Found by sparse. Signed-off-by: Christoph Hellwig Reviewed-by: James Smart Reviewed-by: Johannes Thumshirn drivers/nvme/target/fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f63688a610958a410e9cab7b4d41b77a29912379 Author: Christoph Hellwig Date: Fri Apr 21 10:42:23 2017 +0200 nvmet-fc: mark the sqhd field as __le16 That's what it's used as. Found by sparse. Signed-off-by: Christoph Hellwig Reviewed-by: James Smart Reviewed-by: Johannes Thumshirn drivers/nvme/target/fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f5e118848118d132b1dabdbb9687ea140756c1e Author: Christoph Hellwig Date: Fri Apr 21 10:40:22 2017 +0200 nvmet-fc: fix endianess annoations for nvmet_fc_format_rsp_hdr The passed in desc_len is a big endian value, so mark it as such. Found by sparse. Signed-off-by: Christoph Hellwig Reviewed-by: James Smart Reviewed-by: Johannes Thumshirn drivers/nvme/target/fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edba98dd46fb6dca98d3e6913a86e1d54f02c440 Author: Christoph Hellwig Date: Fri Apr 21 10:37:59 2017 +0200 nvmet-fc: mark nvmet_fc_handle_fcp_rqst static Found by sparse. Signed-off-by: Christoph Hellwig Reviewed-by: James Smart Reviewed-by: Johannes Thumshirn drivers/nvme/target/fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit baee29ac17e6363c9ec843de6b83afc95932e9c4 Author: Christoph Hellwig Date: Fri Apr 21 10:44:06 2017 +0200 nvme-fc: mark two symbols static Found by sparse. Signed-off-by: Christoph Hellwig Reviewed-by: James Smart Reviewed-by: Johannes Thumshirn drivers/nvme/host/fc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 61bff8ef0088459e32bc0a7cc8c23144d324df90 Author: James Smart Date: Sun Apr 23 08:30:08 2017 -0700 nvme_fc: add controller reset support This patch actually does quite a few things. When looking to add controller reset support, the organization modeled after rdma was very fragmented. rdma duplicates the reset and teardown paths and does different things to the block layer on the two paths. The code to build up the controller is also duplicated between the initial creation and the reset/error recovery paths. So I decided to make this sane. I reorganized the controller creation and teardown so that there is a connect path and a disconnect path. Initial creation obviously uses the connect path. Controller teardown will use the disconnect path, followed last access code. Controller reset will use the disconnect path to stop operation, and then the connect path to re-establish the controller. Along the way, several things were fixed - aens were not properly set up. They are allocated differently from the per-request structure on the blk queues. - aens were oddly torn down. the prior patch corrected to abort, but we still need to dma unmap and free relative elements. - missed a few ref counting points: in aen completion and on i/o's that fail - controller initial create failure paths were still confused vs teardown before converting to ref counting vs after we convert to refcounting. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 1049 +++++++++++++++++++++++++++++++----------------- 1 file changed, 675 insertions(+), 374 deletions(-) commit 78a7ac260e38d511d3f62a9e574cf34aac48d7d3 Author: James Smart Date: Sun Apr 23 08:30:07 2017 -0700 nvme_fc: add aen abort to teardown Add abort support for aens. Commonized the op abort to apply to aen or real ios (caused some reorg/routine movement). Abort path sets termination flag in prep for next patch that will be watching i/o abort completion before proceeding with controller teardown. Now that we're aborting aens, the "exit" code that simply cleared out their context no longer applies. Also clarified how we detect an AEN vs a normal io - by a flag, not by whether a rq exists or the a rqno is out of range. Note: saw some interesting cases where if the queues are stopped and we're waiting for the aborts, the core layer can call the complete_rq callback for the io. So the io completion synchronizes link side completion with possible blk layer completion under error. Signed-off-by: James Smart Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 191 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 139 insertions(+), 52 deletions(-) commit 458f280d716d3205214c8bb5d4271bd54e939a61 Author: James Smart Date: Sun Apr 23 08:30:06 2017 -0700 nvme_fc: fix command id check The code validates the command_id in the response to the original sqe command. But prior code was using the rq->rqno as the sqe command id. The core layer overwrites what the transport set there originally. Use the actual sqe content. Signed-off-by: James Smart Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 677df9d4615a2db6774cd0e8951bf7404b858b3b Author: Paul E. McKenney Date: Sun Apr 23 09:22:05 2017 -0700 srcu: Fix Kconfig botch when SRCU not selected If the CONFIG_SRCU option is not selected, for example, when building arch/tile allnoconfig, the following build errors appear: kernel/rcu/tree.o: In function `srcu_online_cpu': tree.c:(.text+0x4248): multiple definition of `srcu_online_cpu' kernel/rcu/srcutree.o:srcutree.c:(.text+0x2120): first defined here kernel/rcu/tree.o: In function `srcu_offline_cpu': tree.c:(.text+0x4250): multiple definition of `srcu_offline_cpu' kernel/rcu/srcutree.o:srcutree.c:(.text+0x2160): first defined here The corresponding .config file shows CONFIG_TREE_SRCU=y, but no sign of CONFIG_SRCU, which fatally confuses SRCU's #ifdefs, resulting in the above errors. The reason this occurs is the folowing line in init/Kconfig's definition for TREE_SRCU: default y if !TINY_RCU && !CLASSIC_SRCU If CONFIG_CLASSIC_SRCU=n, as it will be in for allnoconfig, and if CONFIG_SMP=y, then we will get CONFIG_TREE_SRCU=y but no CONFIG_SRCU, as seen in the .config file, and which will result in the above errors. This error did not show up during rcutorture testing because rcutorture forces CONFIG_SRCU=y, as it must to prevent build errors in rcutorture.c. This commit therefore conditions TREE_SRCU (and TINY_SRCU, while it is at it) with SRCU, like this: default y if SRCU && !TINY_RCU && !CLASSIC_SRCU Reported-by: kbuild test robot Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney Link: http://lkml.kernel.org/r/20170423162205.GP3956@linux.vnet.ibm.com Signed-off-by: Ingo Molnar init/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e892d2d40445a14a19530a2be8c489b87bcd7c19 Author: Steffen Klassert Date: Mon Apr 24 07:33:56 2017 +0200 esp: Fix misplaced spin_unlock_bh. A recent commit moved esp_alloc_tmp() out of a lock protected region, but forgot to remove the unlock from the error path. This patch removes the forgotten unlock. While at it, remove some unneeded error assignments too. Fixes: fca11ebde3f0 ("esp4: Reorganize esp_output") Fixes: 383d0350f2cc ("esp6: Reorganize esp_output") Reported-by: Dan Carpenter Signed-off-by: Steffen Klassert net/ipv4/esp4.c | 6 +----- net/ipv6/esp6.c | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) commit 57192245bc074710ea1a128d39ecc429455ac815 Author: Marc Gonzalez Date: Fri Apr 21 10:43:20 2017 +0200 dmaengine: sun4i: fix invalid argument The "pchans_used" field is an unsigned long array. for_each_clear_bit_from() expects an unsigned long pointer, not an array address. $ make C=2 drivers/dma/sun4i-dma.o CHECK drivers/dma/sun4i-dma.c drivers/dma/sun4i-dma.c:241:9: warning: incorrect type in argument 1 (different base types) drivers/dma/sun4i-dma.c:241:9: expected unsigned long const *p drivers/dma/sun4i-dma.c:241:9: got unsigned long ( * )[1] Signed-off-by: Marc Gonzalez Acked-by: Maxime Ripard Signed-off-by: Vinod Koul drivers/dma/sun4i-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ba4fcdf0f4068407e98cd9cc0f230c2dd8d56de Author: Gao Feng Date: Wed Apr 19 09:47:22 2017 +0800 module: Unify the return value type of try_module_get The prototypes of try_module_get are different with different macro. When enable module and module unload, it returns bool, but others not. Make the return type for try_module_get consistent across all module config options. Signed-off-by: Gao Feng [jeyu: slightly amended changelog to make it clearer] Signed-off-by: Jessica Yu include/linux/module.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 68747c5f3d81771cfc8be2ae98f70a1aea9175c3 Author: Geliang Tang Date: Sun Apr 9 09:41:30 2017 +0800 dmaengine: ioat: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Reviewed-by: Dan Williams Signed-off-by: Vinod Koul drivers/dma/ioat/init.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 296617581eac713b3fda588216ae6d16d1e76dd5 Author: Lidong Zhong Date: Fri Apr 21 15:21:38 2017 +0800 md/raid1/10: remove unused queue A queue is declared and get from the disk of the array, but it's not used anywhere. So removing it from the source. Signed-off-by: Lidong Zhong Acted-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/raid1.c | 3 --- drivers/md/raid10.c | 2 -- 2 files changed, 5 deletions(-) commit a44f53faf4674d84cba79f7ee574584e18ab8744 Author: Javier González Date: Sat Apr 22 01:32:49 2017 +0200 lightnvm: pblk: fix erase counters on error fail When block erases fail, these blocks are marked bad. The number of valid blocks in the line was not updated, which could cause an infinite loop on the erase path. Fix this atomic counter and, in order to avoid taking an irq lock on the interrupt context, make the erase counters atomic too. Also, in the case that a significant number of blocks become bad in a line, the result is the double shared metadata buffer (emeta) to stop the pipeline until all metadata is flushed to the media. Increase the number of metadata lines from 2 to 4 to avoid this case. Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target" Signed-off-by: Javier González Reviewed-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 28 +++++++++++++++++++--------- drivers/lightnvm/pblk-gc.c | 2 +- drivers/lightnvm/pblk-init.c | 9 ++++++--- drivers/lightnvm/pblk-map.c | 4 ++-- drivers/lightnvm/pblk-rl.c | 6 ++++-- drivers/lightnvm/pblk-write.c | 4 ++-- drivers/lightnvm/pblk.h | 6 +++--- 7 files changed, 37 insertions(+), 22 deletions(-) commit be388d9fbd4e09582e31c3ee82a022e368208ae3 Author: Javier González Date: Sat Apr 22 01:32:48 2017 +0200 lightnvm: pblk: free metadata on line alloc failure When a line allocation fails, for example, due to having too many bad blocks, free its metadata correctly. Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target" Signed-off-by: Javier González Reviewed-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 33db9fd46ea8e3e6d4757d99a3f97bd1a0c919f3 Author: Javier González Date: Sat Apr 22 01:32:47 2017 +0200 lightnvm: pblk: fix memory leak on error path When write recovery fails, Free memory for the recovery structure. Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target" Signed-off-by: Javier González Reviewed-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-write.c | 3 +++ 1 file changed, 3 insertions(+) commit f3236cef5a206c27a624b8a813ddc1ebc4c6637a Author: Javier González Date: Sat Apr 22 01:32:46 2017 +0200 lightnvm: pblk: fix bad error check Fix bad error check Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target" Signed-off-by: Javier González Reviewed-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3dc001f343659e4732b4ff6da1c28edbd56c6e15 Author: Javier González Date: Sat Apr 22 01:32:45 2017 +0200 lightnvm: pblk: fix race condition on line retry When a pblk line fails (or is recovered), make sure to take the line management lock. Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target" Signed-off-by: Javier González Reviewed-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e2989ee9746b3f2e78d1a39bbc402d884e8b8bf1 Author: Alexei Starovoitov Date: Sun Apr 23 09:01:00 2017 -0700 bpf, doc: update list of architectures that do eBPF JIT update the list and remove 'in the future' statement, since all still alive 64-bit architectures now do eBPF JIT. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller Documentation/networking/filter.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 2859323e35ab5fc42f351fbda23ab544eaa85945 Author: Mike Snitzer Date: Sat Apr 22 17:22:09 2017 -0400 block: fix blk_integrity_register to use template's interval_exp if not 0 When registering an integrity profile: if the template's interval_exp is not 0 use it, otherwise use the ilog2() of logical block size of the provided gendisk. This fixes a long-standing DM linear target bug where it cannot pass integrity data to the underlying device if its logical block size conflicts with the underlying device's logical block size. Cc: stable@vger.kernel.org Reported-by: Mikulas Patocka Signed-off-by: Mike Snitzer Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe block/blk-integrity.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 05d7839aa290901429d8edcd8f7974c9df2bcaa5 Author: Dawei Chien Date: Tue Feb 21 20:26:52 2017 +0800 thermal: mt8173: minor mtk_thermal.c cleanups If thermal bank with 4 sensors, thermal driver should read TEMP_MSR3. However, currently thermal driver would not read TEMP_MSR3 since mt8173 thermal driver only use 3 sensors on each thermal bank at the same time, so this patch would not effect temperature. Only if mt mt8173 thermal driver use 4 sensors on any thermal bank, would read third sensor two times, and lose fourth sensor of vale. cc: stable@vger.kernel.org Fixes: b7cf0053738c ("thermal: Add Mediatek thermal driver for mt2701.") Reviewed-by: Matthias Brugger Signed-off-by: Dawei Chien Signed-off-by: Eduardo Valentin drivers/thermal/mtk_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6892cf07e7337776c0b006db3b96a96bf071acb7 Author: Rafał Miłecki Date: Mon Apr 17 23:04:16 2017 +0200 thermal: bcm2835: move to the broadcom subdirectory We already have 2 Broadcom drivers and at least 1 more is coming. This made us create broadcom subdirectory where bcm2835 should be moves now. Acked-by: Florian Fainelli Signed-off-by: Rafał Miłecki Signed-off-by: Eduardo Valentin drivers/thermal/Kconfig | 8 - drivers/thermal/Makefile | 1 - drivers/thermal/bcm2835_thermal.c | 314 ----------------------------- drivers/thermal/broadcom/Kconfig | 8 + drivers/thermal/broadcom/Makefile | 1 + drivers/thermal/broadcom/bcm2835_thermal.c | 314 +++++++++++++++++++++++++++++ 6 files changed, 323 insertions(+), 323 deletions(-) commit cb9b323b5395d0d0cea2922d4f8ad588cf064f46 Author: Rafał Miłecki Date: Mon Apr 17 23:02:01 2017 +0200 thermal: broadcom: ns: specify myself as MODULE_AUTHOR Just in case someone uses modinfo to find (blame) me. Signed-off-by: Rafał Miłecki Signed-off-by: Eduardo Valentin drivers/thermal/broadcom/ns-thermal.c | 1 + 1 file changed, 1 insertion(+) commit 9a914aa6824ac5d5fd3195ed422f31540a0ab767 Author: Naveen N. Rao Date: Wed Apr 19 20:59:52 2017 +0530 powerpc/kprobes: Blacklist common exception handlers Blacklist all the exception common/OOL handlers as the kernel stack is not yet setup, which means we can't take a trap at this point. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/include/asm/head-64.h | 1 + 1 file changed, 1 insertion(+) commit 7aa5b018bf36f733345f8814393b48011110b555 Author: Naveen N. Rao Date: Wed Apr 19 20:59:51 2017 +0530 powerpc/kprobes: Blacklist exception handlers Introduce __head_end to mark end of the early fixed sections and use it to blacklist all exception handlers from kprobes. mpe: We do not need to do anything special for relocatable kernels, where the exception vectors are split from the main kernel, as the split vectors are already excluded by the check for kernel_text_address(). Signed-off-by: Naveen N. Rao [mpe: Move __head_end outside #ifdef 64-bit to unbreak the 32-bit build] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/sections.h | 2 ++ arch/powerpc/kernel/kprobes.c | 9 +++++++++ arch/powerpc/kernel/vmlinux.lds.S | 2 ++ 3 files changed, 13 insertions(+) commit 71f6e58e5efe09b98a1862d4c25976e8f7763b67 Author: Naveen N. Rao Date: Wed Apr 12 16:48:51 2017 +0530 powerpc/kprobes: Convert __kprobes to NOKPROBE_SYMBOL() Along similar lines as commit 9326638cbee2 ("kprobes, x86: Use NOKPROBE_SYMBOL() instead of __kprobes annotation"), convert __kprobes annotation to either NOKPROBE_SYMBOL() or nokprobe_inline. The latter forces inlining, in which case the caller needs to be added to NOKPROBE_SYMBOL(). Also: - blacklist arch_deref_entry_point(), and - convert a few regular inlines to nokprobe_inline in lib/sstep.c A key benefit is the ability to detect such symbols as being blacklisted. Before this patch: $ cat /sys/kernel/debug/kprobes/blacklist | grep read_mem $ perf probe read_mem Failed to write event: Invalid argument Error: Failed to add events. $ dmesg | tail -1 [ 3736.112815] Could not insert probe at _text+10014968: -22 After patch: $ cat /sys/kernel/debug/kprobes/blacklist | grep read_mem 0xc000000000072b50-0xc000000000072d20 read_mem $ perf probe read_mem read_mem is blacklisted function, skip it. Added new events: (null):(null) (on read_mem) probe:read_mem (on read_mem) You can now use it in all perf tools, such as: perf record -e probe:read_mem -aR sleep 1 $ grep " read_mem" /proc/kallsyms c000000000072b50 t read_mem c0000000005f3b40 t read_mem $ cat /sys/kernel/debug/kprobes/list c0000000005f3b48 k read_mem+0x8 [DISABLED] Acked-by: Masami Hiramatsu Signed-off-by: Naveen N. Rao [mpe: Minor change log formatting, fix up some conflicts] Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 55 +++++++++++++++++---------- arch/powerpc/lib/code-patching.c | 4 +- arch/powerpc/lib/sstep.c | 82 +++++++++++++++++++++------------------- 3 files changed, 81 insertions(+), 60 deletions(-) commit 700e64377c2c8e2406e9c4c1632e2eabdb3a95a1 Author: Naveen N. Rao Date: Wed Apr 19 18:22:23 2017 +0530 powerpc/ftrace: Move stack setup and teardown code into ftrace_graph_caller() Move the stack setup and teardown code into ftrace_graph_caller(). This way, we don't incur the cost of setting it up unless function graph is enabled for this function. Also, remove the extraneous LR restore code after the function graph stub. LR has previously been restored and neither livepatch_handler() nor ftrace_graph_caller() return back here. Signed-off-by: Naveen N. Rao [mpe: Drop bad change to non-mprofile-kernel version of ftrace_graph_caller] Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit d08f8a28bcc8c2004a7186839148fc9aadd5cc6f Author: Naveen N. Rao Date: Wed Apr 19 18:21:06 2017 +0530 powerpc/kprobes: Remove duplicate saving of MSR set_current_kprobe() already saves regs->msr into kprobe_saved_msr. Remove the redundant save. Signed-off-by: Naveen N. Rao Reviewed-by: Masami Hiramatsu Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 1 - 1 file changed, 1 deletion(-) commit 9cba253df42f6138b48ea88f1fa35ae8a7fd5225 Author: Nicholas Piggin Date: Wed Apr 19 23:05:51 2017 +1000 powerpc/64s: Simplify POWER9 DD1 idle workaround code The idle workaround does not need to load PACATOC, and it does not need to be called within a nested function that requires LR to be saved. Load the PACATOC at entry to the idle wakeup. It does not matter which PACA this comes from, so it's okay to call before the workaround. Then apply the workaround to get the right PACA. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/feature-fixups.h | 3 +++ arch/powerpc/kernel/idle_book3s.S | 16 +++++----------- 2 files changed, 8 insertions(+), 11 deletions(-) commit 0d7720a24234cefa8b318b1a3cf0b302a51faec9 Author: Nicholas Piggin Date: Wed Apr 19 23:05:50 2017 +1000 powerpc/64s: Idle POWER8 avoid full state loss recovery where possible If not all threads were in winkle, full state loss recovery is not necessary and can be avoided. A previous patch removed this optimisation due to some complexity with the implementation. Re-implement it by counting the number of threads in winkle with the per-core idle state. Only restore full state loss if all threads were in winkle. This has a small window of false positives right before threads execute winkle and just after they wake up, when the winkle count does not reflect the true number of threads in winkle. This is not a significant problem in comparison with even the minimum winkle duration. For correctness, a false positive is not a problem (only false negatives would be). Reviewed-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cpuidle.h | 32 ++++++++++++-- arch/powerpc/kernel/idle_book3s.S | 89 +++++++++++++++++++++++++++++++++++--- 2 files changed, 112 insertions(+), 9 deletions(-) commit e420249d44d02e9fc110087ed8feddc38b13528c Author: Nicholas Piggin Date: Wed Apr 19 23:05:49 2017 +1000 powerpc/64s: Idle do not hold reservation longer than required When taking the core idle state lock, grab it immediately like a regular lock, rather than adding more tests in there. Holding the lock keeps it stable, so there is no need to do it whole holding the reservation. Reviewed-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit adbcf8d74f4609e142b01520afa173bfe911122b Author: Nicholas Piggin Date: Wed Apr 19 23:05:48 2017 +1000 powerpc/64s: Expand core idle state bits In preparation for adding more bits to the core idle state word, move the lock bit up, and unlock by flipping the lock bit rather than masking off all but the thread bits. Add branch hints for atomic operations while we're here. Reviewed-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cpuidle.h | 4 ++-- arch/powerpc/kernel/idle_book3s.S | 33 +++++++++++++++++---------------- 2 files changed, 19 insertions(+), 18 deletions(-) commit 1945bc4549e5cb1f9aa873ec29191aa54dc851d2 Author: Nicholas Piggin Date: Wed Apr 19 23:05:47 2017 +1000 powerpc/64s: Fix POWER9 machine check handler from stop state The ISA specifies power save wakeup due to a machine check exception can cause a machine check interrupt (rather than the usual system reset interrupt). The machine check handler copes with this by doing low level machine check recovery without restoring full state from idle, then queues up a machine check event for logging, then directly executes the same idle instruction it woke from. This minimises the work done before recovery is performed. The problem is that it requires machine specific instructions and knowledge of the book3s idle code. Currently it only has code to handle POWER8 idle, so POWER9 crashes when trying to execute the P8 idle instructions which don't exist in ISAv3.0B. cpu 0x0: Vector: e40 (Emulation Assist) at [c0000000008f3810] pc: c000000000008380: machine_check_handle_early+0x130/0x2f0 lr: c00000000053a098: stop_loop+0x68/0xd0 sp: c0000000008f3a90 msr: 9000000000081001 current = 0xc0000000008a1080 paca = 0xc00000000ffd0000 softe: 0 irq_happened: 0x01 pid = 0, comm = swapper/0 Instead of going to sleep after recovery, do the usual idle wakeup and state restoration by calling into the normal idle wakeup path. This reuses the normal idle wakeup paths. Reviewed-by: Gautham R. Shenoy Reviewed-by: Mahesh J Salgaonkar Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/reg.h | 1 + arch/powerpc/kernel/exceptions-64s.S | 79 ++++++++++++++++++++---------------- arch/powerpc/kernel/idle_book3s.S | 25 ++++++++++++ 3 files changed, 70 insertions(+), 35 deletions(-) commit 10101aa9aa9d2e6b403610de196945ecbf93cf06 Author: Nicholas Piggin Date: Wed Apr 19 23:05:46 2017 +1000 powerpc/64s: Use alternative feature patching This reduces the number of nops for POWER8. Reviewed-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 544686cae8e4f5bbcd153998dcaf4a3d5b94e6be Author: Nicholas Piggin Date: Wed Apr 19 23:05:45 2017 +1000 powerpc/64s: Stop using bit in HSPRG0 to test winkle The POWER8 idle code has a neat trick of programming the power on engine to restore a low bit into HSPRG0, so idle wakeup code can test and see if it has been programmed this way and therefore lost all state. Restore time can be reduced if winkle has not been reached. However this messes with our r13 PACA pointer, and requires HSPRG0 to be written to. It also optimizes the slowest and most uncommon case at the expense of another SPR write in the common nap state wakeup. Remove this complexity and assume winkle sleeps always require a state restore. This speedup could be made entirely contained within the winkle idle code by counting per-core winkles and setting a thread bitmap when all have gone to winkle. Reviewed-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 13 ++----------- arch/powerpc/kernel/exceptions-64s.S | 21 +++------------------ arch/powerpc/kernel/idle_book3s.S | 27 ++++++++++----------------- arch/powerpc/platforms/powernv/idle.c | 13 ------------- 4 files changed, 15 insertions(+), 59 deletions(-) commit bf0153c143a694e7bb3b28d92eafd8b3ef6db870 Author: Nicholas Piggin Date: Wed Apr 19 23:05:44 2017 +1000 powerpc/64s: Move remaining system reset idle code into idle_book3s.S No functional change. Reviewed-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 26 +-------------- arch/powerpc/kernel/idle_book3s.S | 64 ++++++++++++++++++++++++------------ 2 files changed, 44 insertions(+), 46 deletions(-) commit 6dd29b3df975582ef429b5b93c899e6575785940 Author: Ingo Molnar Date: Sun Apr 23 11:37:17 2017 +0200 Revert "x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation" This reverts commit 2947ba054a4dabbd82848728d765346886050029. Dan Williams reported dax-pmem kernel warnings with the following signature: WARNING: CPU: 8 PID: 245 at lib/percpu-refcount.c:155 percpu_ref_switch_to_atomic_rcu+0x1f5/0x200 percpu ref (dax_pmem_percpu_release [dax_pmem]) <= 0 (0) after switching to atomic ... and bisected it to this commit, which suggests possible memory corruption caused by the x86 fast-GUP conversion. He also pointed out: " This is similar to the backtrace when we were not properly handling pud faults and was fixed with this commit: 220ced1676c4 "mm: fix get_user_pages() vs device-dax pud mappings" I've found some missing _devmap checks in the generic get_user_pages_fast() path, but this does not fix the regression [...] " So given that there are known bugs, and a pretty robust looking bisection points to this commit suggesting that are unknown bugs in the conversion as well, revert it for the time being - we'll re-try in v4.13. Reported-by: Dan Williams Cc: Andrew Morton Cc: Borislav Petkov Cc: Catalin Marinas Cc: Kirill A. Shutemov Cc: Linus Torvalds Cc: Michal Hocko Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: aneesh.kumar@linux.vnet.ibm.com Cc: dann.frazier@canonical.com Cc: dave.hansen@intel.com Cc: steve.capper@linaro.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/arm/Kconfig | 2 +- arch/arm64/Kconfig | 2 +- arch/powerpc/Kconfig | 2 +- arch/x86/Kconfig | 3 - arch/x86/include/asm/mmu_context.h | 12 + arch/x86/include/asm/pgtable-3level.h | 47 ---- arch/x86/include/asm/pgtable.h | 53 ---- arch/x86/include/asm/pgtable_64.h | 16 +- arch/x86/mm/Makefile | 2 +- arch/x86/mm/gup.c | 496 ++++++++++++++++++++++++++++++++++ mm/Kconfig | 2 +- mm/gup.c | 10 +- 12 files changed, 519 insertions(+), 128 deletions(-) commit 58d30c36d472b75e8e9962d6a640be19d9389128 Merge: 94836ec f209410 Author: Ingo Molnar Date: Sun Apr 23 11:12:44 2017 +0200 Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull RCU updates from Paul E. McKenney: - Documentation updates. - Miscellaneous fixes. - Parallelize SRCU callback handling (plus overlapping patches). Signed-off-by: Ingo Molnar commit 2563a70c3b2acc4f60083e2aaf1102f8dba73649 Author: Nicholas Piggin Date: Wed Apr 19 23:05:43 2017 +1000 powerpc/64s: Remove unnecessary relocation branch from idle handler The system reset idle handler system_reset_idle_common is relocated, so relocation is not required to branch to kvm_start_guest. The superfluous relocation does not result in incorrect code, but it does not compile outside of exception-64s.S (with fixed section definitions). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 8 -------- arch/powerpc/kernel/exceptions-64s.S | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) commit 785f11aa595bc3d4e74096cbd598ada54ecc0d81 Author: Behan Webster Date: Fri Apr 21 11:20:01 2017 -0700 kbuild: Add better clang cross build support Add cross target to CC if using clang. Also add custom gcc toolchain path for fallback gcc tools. Clang will fallback to using things like ld, as, and libgcc if (respectively) one of the llvm linkers isn't available, the integrated assembler is turned off, or an appropriately cross-compiled version of compiler-rt isn't available. To this end, you can specify the path to this fallback gcc toolchain with GCC_TOOLCHAIN. Signed-off-by: Behan Webster Reviewed-by: Jan-Simon Möller Reviewed-by: Mark Charlebois Signed-off-by: Greg Hackmann Signed-off-by: Matthias Kaehlcke Signed-off-by: Masahiro Yamada Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) commit a0ae981eba8f07dbc74bce38fd3a462b69a5bc8e Author: Masahiro Yamada Date: Thu Apr 13 07:25:21 2017 +0900 kbuild: drop -Wno-unknown-warning-option from clang options Since commit c3f0d0bc5b01 ("kbuild, LLVMLinux: Add -Werror to cc-option to support clang"), cc-option and friends work nicely for clang. However, -Wno-unknown-warning-option makes clang happy with any unknown warning options even if -Werror is specified. Once -Wno-unknown-warning-option is added, any succeeding call of cc-disable-warning is evaluated positive, then unknown warning options are accepted. This should be dropped. Signed-off-by: Masahiro Yamada Makefile | 1 - scripts/Makefile.extrawarn | 1 - 2 files changed, 2 deletions(-) commit cf0c3e68aa81f992b0301f62e341b710d385bf68 Author: Jeroen Hofstee Date: Fri Apr 21 15:21:11 2017 +0900 kbuild: fix asm-offset generation to work with clang KBuild abuses the asm statement to write to a file and clang chokes about these invalid asm statements. Hack it even more by fooling this is actual valid asm code. [masahiro: Import Jeroen's work for U-Boot: http://patchwork.ozlabs.org/patch/375026/ Tweak sed script a little to avoid garbage '#' for GCC case, like #define NR_PAGEFLAGS 23 /* __NR_PAGEFLAGS # */ ] Signed-off-by: Jeroen Hofstee Signed-off-by: Masahiro Yamada Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke include/linux/kbuild.h | 6 +++--- scripts/Makefile.lib | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) commit 7dd47b95b0f54f2057d40af6e66d477e3fe95d13 Author: Masahiro Yamada Date: Fri Apr 21 15:21:10 2017 +0900 kbuild: consolidate redundant sed script ASM offset generation This part ended up in redundant code after touched by multiple people. [1] Commit 3234282f33b2 ("x86, asm: Fix CFI macro invocations to deal with shortcomings in gas") added parentheses for defined expressions to support old gas for x86. [2] Commit a22dcdb0032c ("x86, asm: Fix ancient-GAS workaround") split the pattern into two to avoid parentheses for non-numeric expressions. [3] Commit 95a2f6f72d37 ("Partially revert patch that encloses asm-offset.h numbers in brackets") removed parentheses from numeric expressions as well because parentheses in MN10300 assembly have a special meaning (pointer access). Apparently, there is a conflict between [1] and [3]. After all, [3] took precedence, and a long time has passed since then. Now, merge the two patterns again because the first one is covered by the other. Signed-off-by: Masahiro Yamada Reviewed-by: Matthias Kaehlcke scripts/Makefile.lib | 1 - 1 file changed, 1 deletion(-) commit b0c47807d31deccdfb78a22a0d04dd9785bdb9d3 Author: David S. Miller Date: Sat Apr 22 12:31:05 2017 -0700 bpf: Add sparc support to tools and samples. Signed-off-by: David S. Miller Acked-by: Daniel Borkmann samples/bpf/bpf_helpers.h | 19 +++++++++++++++++++ tools/build/feature/test-bpf.c | 3 +++ tools/lib/bpf/bpf.c | 2 ++ 3 files changed, 24 insertions(+) commit 7a12b5031c6b947cc13918237ae652b536243b76 Author: David S. Miller Date: Mon Apr 17 18:44:36 2017 -0700 sparc64: Add eBPF JIT. This is an eBPF JIT for sparc64. All major features are supported. All tests under tools/testing/selftests/bpf/ pass. Signed-off-by: David S. Miller arch/sparc/Kconfig | 3 +- arch/sparc/net/bpf_jit_32.h | 2 +- arch/sparc/net/bpf_jit_64.h | 66 +++ arch/sparc/net/bpf_jit_asm_32.S | 7 - arch/sparc/net/bpf_jit_asm_64.S | 162 +++++- arch/sparc/net/bpf_jit_comp_32.c | 49 -- arch/sparc/net/bpf_jit_comp_64.c | 1195 +++++++++++++++++++++++++++++++++++++- 7 files changed, 1424 insertions(+), 60 deletions(-) commit 6b3d4eec7f34c21df80191bfd72657404dad0f0a Author: David S. Miller Date: Mon Apr 17 18:25:07 2017 -0700 sparc: Split BPF JIT into 32-bit and 64-bit. This is in preparation for adding the 64-bit eBPF JIT. Signed-off-by: David S. Miller arch/sparc/net/Makefile | 2 +- arch/sparc/net/bpf_jit.h | 68 ---- arch/sparc/net/bpf_jit_32.h | 68 ++++ arch/sparc/net/bpf_jit_asm.S | 208 ---------- arch/sparc/net/bpf_jit_asm_32.S | 208 ++++++++++ arch/sparc/net/bpf_jit_asm_64.S | 1 + arch/sparc/net/bpf_jit_comp.c | 815 --------------------------------------- arch/sparc/net/bpf_jit_comp_32.c | 815 +++++++++++++++++++++++++++++++++++++++ arch/sparc/net/bpf_jit_comp_64.c | 1 + 9 files changed, 1094 insertions(+), 1092 deletions(-) commit 8bf3198a5e394ed6815aeb8fedaf49722986bbd3 Author: Stephen Hemminger Date: Fri Apr 21 11:15:57 2017 -0700 mlx5: fix warning about missing prototype Fix sparse warning about missing prototypes. The rx/tx code path defines functions with prototypes in ipoib.h. Signed-off-by: Stephen Hemminger Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 1 + 2 files changed, 2 insertions(+) commit a7082ef066f022c9bdeaae8d23ec2c119fecf7d9 Author: Stephen Hemminger Date: Fri Apr 21 11:15:56 2017 -0700 mlx5: hide unused functions Fix sparse warnings in recent ipoib support. The RDMA functions are not used yet, hide behind #ifdef. Based on comment, they will eventually be local so make static. Signed-off-by: Stephen Hemminger Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 7768d1971de676b0e12f57450ba7a6b38ff4cfb2 Author: Roi Dayan Date: Sun Sep 25 14:27:17 2016 +0300 net/mlx5: E-Switch, Add control for encapsulation Implement the devlink e-switch encapsulation control set and get callbacks. Apply the value set by the user on the switchdev offloads mode when creating the fast FDB table where offloaded rules will be set. Signed-off-by: Roi Dayan Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 5 ++ drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 3 ++ .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 63 +++++++++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 + 4 files changed, 71 insertions(+), 2 deletions(-) commit 1967ce6ea5c8a03e5f963b639fe33ece60b2dc91 Author: Or Gerlitz Date: Wed Feb 15 12:13:02 2017 +0200 net/mlx5: E-Switch, Refactor fast path FDB table creation in switchdev mode Refactor the creation of the fast path FDB table that holds the offloaded rules in SRIOV switchdev mode into it's own function. This will be used in the next patch to be able and re-create the table under different settings without going through legacy mode. This patch doesn't change any functionality. Signed-off-by: Or Gerlitz Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 69 +++++++++++++++------- 1 file changed, 49 insertions(+), 20 deletions(-) commit f43e9b069aeaf0f3d51fa30ddc9c0003e86623b8 Author: Roi Dayan Date: Sun Sep 25 13:52:44 2016 +0300 net/devlink: Add E-Switch encapsulation control This is an e-switch global knob to enable HW support for applying encapsulation/decapsulation to VF traffic as part of SRIOV e-switch offloading. The actual encap/decap is carried out (along with the matching and other actions) per offloaded e-switch rules, e.g as done when offloading the TC tunnel key action. Signed-off-by: Roi Dayan Reviewed-by: Or Gerlitz Acked-by: Jiri Pirko Signed-off-by: Saeed Mahameed include/net/devlink.h | 2 ++ include/uapi/linux/devlink.h | 7 +++++++ net/core/devlink.c | 26 +++++++++++++++++++++++--- 3 files changed, 32 insertions(+), 3 deletions(-) commit 5d05e81516cfe7606ee0cd8278fe225314dccfbe Author: Arnd Bergmann Date: Wed Apr 19 19:52:43 2017 +0200 rtc: sh: mark PM functions as unused The sh_rtc_set_irq_wake() function is only called from the suspend/resume handlers that may be hidden, causing a harmless warning: drivers/rtc/rtc-sh.c:724:13: error: 'sh_rtc_set_irq_wake' defined but not used [-Werror=unused-function] static void sh_rtc_set_irq_wake(struct device *dev, int enabled) The most reliable way to avoid the warning is to remove the existing #ifdef and mark the two functions as __maybe_unused so the compiler can silently drop all three when there is no reference. Fixes: dab5aec64bf5 ("rtc: sh: add support for rza series") Signed-off-by: Arnd Bergmann Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sh.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e73ef755fbb90b04f0cf494071b2be6bafcafbdc Author: Dan Carpenter Date: Wed Apr 12 11:32:53 2017 +0300 rtc: hid-sensor-time: remove some dead code devm_rtc_device_register() doesn't ever return NULL so there is no need to check. Signed-off-by: Dan Carpenter Signed-off-by: Alexandre Belloni drivers/rtc/rtc-hid-sensor-time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d160b74da85a4ec072b076db056e27ba7246eba0 Author: Dean Jenkins Date: Thu Apr 20 18:06:41 2017 +0100 Bluetooth: hci_ldisc: Add missing clear HCI_UART_PROTO_READY Ensure that HCI_UART_PROTO_READY is cleared before close(hu) is called which closes the Data Link protocol layer. Therefore, add the missing bit clear of HCI_UART_PROTO_READY to hci_uart_init_work() so that the flag is cleared when hci_register_dev fails. Without the fix, the functions of the Data Link protocol layer could potentially be accessed after that layer has been closed. This could lead to a crash as memory would have been freed in that layer. Signed-off-by: Dean Jenkins Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ldisc.c | 1 + 1 file changed, 1 insertion(+) commit a225b8c70af9368cfcb52a3608bc862bc88a7801 Author: Dean Jenkins Date: Thu Apr 20 18:06:40 2017 +0100 Bluetooth: hci_ldisc: Ensure hu->hdev set to NULL before freeing hdev When hci_register_dev() fails, hu->hdev should be set to NULL before freeing hdev. This avoids potential use of hu->hdev after it has been freed. This commit sets hu->hdev to NULL before calling hci_free_dev() in error handling scenarios in hci_uart_init_work() and hci_uart_register_dev(). Signed-off-by: Dean Jenkins Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ldisc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cb926520e18e6aecc63614b8aa2e40d431aa29cd Author: Dean Jenkins Date: Thu Apr 20 18:06:39 2017 +0100 Bluetooth: hci_ldisc: Add missing return in hci_uart_init_work() If hci_register_dev() returns an error in hci_uart_init_work() then the HCI_UART_REGISTERED bit gets erroneously set due to a missing return statement. Therefore, add the missing return statement. The consequence of the missing return is that the HCI UART is not registered but HCI_UART_REGISTERED is set which allows the code to think that hu->hdev is safe to access but hu->hdev has been freed so could lead to a crash. Signed-off-by: Dean Jenkins Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ldisc.c | 1 + 1 file changed, 1 insertion(+) commit eee6044f6694ae21f6f4b8e5ce4f13dbda0c112b Author: Arnd Bergmann Date: Wed Apr 19 19:32:25 2017 +0200 ieee802154: don't select COMMON_CLK A device driver must not select the COMMON_CLK subsystem, as that conflicts with platforms that provide a legacy implementation of the clk API: drivers/clk/clk.o: In function `clk_enable': clk.c:(.text.clk_enable+0x0): multiple definition of `clk_enable' arch/arm/mach-sa1100/clock.o:clock.c:(.text.clk_enable+0x0): first defined here drivers/clk/clk.o: In function `clk_round_rate': clk.c:(.text.clk_round_rate+0x0): multiple definition of `clk_round_rate' arch/arm/mach-sa1100/clock.o:clock.c:(.text.clk_round_rate+0x0): first defined here drivers/clk/clk.o: In function `clk_get_parent': clk.c:(.text.clk_get_parent+0x0): multiple definition of `clk_get_parent' arch/arm/mach-sa1100/clock.o:clock.c:(.text.clk_get_parent+0x0): first defined here drivers/clk/clk.o: In function `clk_get_rate': clk.c:(.text.clk_get_rate+0x0): multiple definition of `clk_get_rate' This changes the 'select' into 'depends on', as all other similar drivers do. Fixes: d931acd575d6 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver") Signed-off-by: Arnd Bergmann Signed-off-by: Marcel Holtmann drivers/net/ieee802154/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fb78fb6c6ad3751cce18d37e773d07858c1ced9 Author: Arnd Bergmann Date: Wed Apr 19 19:50:18 2017 +0200 Bluetooth: try to improve CONFIG_SERIAL_DEV_BUS dependency With CONFIG_SERIAL_DEV_BUS=m, the hci_serdev.o file does not actually get built into hci_uart.o as the Makefile doesn't pick it up, leading to a link error with anything referring to it: ERROR: "hci_uart_register_device" [drivers/bluetooth/hci_nokia.ko] undefined! scripts/Makefile.modpost:91: recipe for target '__modpost' failed Changing this in the Makefile would cause another problem when hci_uart itself is built-in and cannot reference symbols from the serdev module. This tries to address both problems by introducing a new hidden Kconfig symbol that controls both the compilation of hci_serdev.o and whether the Nokia driver can be selected. This seems to address the problem for me, though there might be a better way to do it. Fixes: 7bb318680e86 ("Bluetooth: add nokia driver") Signed-off-by: Arnd Bergmann Signed-off-by: Marcel Holtmann drivers/bluetooth/Kconfig | 8 +++++++- drivers/bluetooth/Makefile | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) commit f2edd9f67b8bdbe8cc3bc5c0ba4992e511147642 Author: Sebastian Reichel Date: Sat Apr 15 23:54:13 2017 +0200 Bluetooth: hci_ll: Fix NULL pointer deref on FW upload failure Avoid NULL pointer dereference occurring due to freeing skb containing an error pointer. It can easily be triggered by using the driver with broken uart (i.e. due to misconfigured pinmuxing). Fixes: 371805522f87 ("bluetooth: hci_uart: add LL protocol serdev driver support") Signed-off-by: Sebastian Reichel Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ll.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6c478ae9204b489f6228e4b535c6ac72851e06d8 Author: Eric W. Biederman Date: Mon Apr 17 22:10:04 2017 -0500 signal: Make kill_proc_info static There are no users outside of signal.c so make the function static so the compiler and other developers have that information. Signed-off-by: "Eric W. Biederman" include/linux/sched/signal.h | 1 - kernel/signal.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit fb796707d7a6c9b24fdf80b9b4f24fa5ffcf0ec5 Merge: 1f4407e 94836ec Author: David S. Miller Date: Fri Apr 21 20:23:53 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Both conflict were simple overlapping changes. In the kaweth case, Eric Dumazet's skb_cow() bug fix overlapped the conversion of the driver in net-next to use in-netdev stats. Signed-off-by: David S. Miller commit ee7d74339df71015ae5b98d91393ea80b72a4546 Author: Markus Elfring Date: Wed Apr 19 21:08:54 2017 +0200 clk: mvebu: Use kcalloc() in two functions * Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. * Replace the specification of data types by pointer dereferences to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/mvebu/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 23826e240ad82727635eb84fff1211dd2ff750fb Author: Markus Elfring Date: Wed Apr 19 20:15:21 2017 +0200 clk: mvebu: Use kcalloc() in of_cpu_clk_setup() Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/mvebu/clk-cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 24f8186eb8d69a3a0d856ce59fb4f19ae23ff23a Author: Markus Elfring Date: Thu Apr 20 10:04:00 2017 +0200 clk: nomadik: Delete error messages for a failed memory allocation in two functions The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such statements here. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/clk-nomadik.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit add3151133b9ae3bcfd97eab04d9a50b6606453c Author: Markus Elfring Date: Thu Apr 20 09:45:04 2017 +0200 clk: nomadik: Use seq_puts() in nomadik_src_clk_show() A string which did not contain a data format specification should be put into a sequence. Thus use the corresponding function "seq_puts". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/clk-nomadik.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1808a3201965c430b70cb9236ff80d2cad403452 Author: Markus Elfring Date: Thu Apr 20 09:30:52 2017 +0200 clk: Improve a size determination in two functions Replace the specification of two data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/clk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4d32758671527761e6ee94568b8e32925c4bc682 Author: Markus Elfring Date: Thu Apr 20 08:45:43 2017 +0200 clk: Replace four seq_printf() calls by seq_putc() Four single characters should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/clk.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 56f2150a841ca0915d43e7b9033a4557bc829cc0 Author: Markus Elfring Date: Thu Apr 20 07:34:54 2017 +0200 clk: si5351: Delete an error message for a failed memory allocation in si5351_i2c_probe() The script "checkpatch.pl" pointed information out like the following. * CHECK: Comparison to NULL could be written "!drvdata" Thus adjust this expression. * WARNING: Possible unnecessary 'out of memory' message Thus remove such a statement here. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/clk-si5351.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9a78b16972fba06bc8d303282a6b96f5061fd16a Author: Markus Elfring Date: Wed Apr 19 22:37:30 2017 +0200 clk: si5351: Use devm_kcalloc() in si5351_i2c_probe() Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "devm_kcalloc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/clk-si5351.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1e5c844441e6dbf2e2433384ac835b712c35c533 Author: Markus Elfring Date: Wed Apr 19 19:43:03 2017 +0200 clk: at91: Use kcalloc() in of_at91_clk_pll_get_characteristics() Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/at91/clk-pll.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7c2adaf11036654e4a5f5da0bf09916901f3e1ec Author: John Crispin Date: Mon Jan 23 13:48:27 2017 +0100 reset: mediatek: Add MT2701 ethsys reset controller include file Add the missing reset bits of the ethsys core to the mt2701-reset include file, so that we can reference them from within a devicetree file. Signed-off-by: John Crispin Signed-off-by: Stephen Boyd include/dt-bindings/reset/mt2701-resets.h | 7 +++++++ 1 file changed, 7 insertions(+) commit db9c4a1e6581e45976526eb45c032a73f944dd8a Author: John Crispin Date: Mon Jan 23 13:48:26 2017 +0100 clk: mediatek: add mt2701 ethernet reset The ethernet clock core has a reset register that is currently not exposed to the user. Fix this by adding the missing registration code. Signed-off-by: John Crispin Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt2701-eth.c | 2 ++ 1 file changed, 2 insertions(+) commit de000a88c159268e6bf8ac9c06de7d0a5f19f644 Merge: b68adc2 7149c1b Author: Stephen Boyd Date: Fri Apr 21 19:19:46 2017 -0700 Merge tag 'sunxi-clk-for-4.12-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into HEAD Pull Allwinner clock changes, take 2 from Maxime Ripard: A few minor bug and comment fixes, plus some fixes for the PRCM CCU driver merged in the prior pull request * tag 'sunxi-clk-for-4.12-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: a80: Fix audio PLL comment not matching actual code clk: sunxi-ng: Fix round_rate/set_rate multiplier minimum mismatch clk: sunxi-ng: use 1 as fallback for minimum multiplier clk: sunxi-ng: fix PRCM CCU CLK_NUMBER value clk: sunxi-ng: fix PRCM CCU ir clk parent commit b68adc23bc3d0c81a08b69cf1ba0bf0405c9d868 Author: Daniel Lezcano Date: Mon Apr 17 19:19:25 2017 +0200 clk: hi6220: Add the hi655x's pmic clock The hi655x multi function device is a PMIC providing regulators. The PMIC also provides a clock for the WiFi and the Bluetooth, let's implement this clock in order to add it in the hi655x MFD and allow proper wireless initialization. Signed-off-by: Daniel Lezcano [sboyd@codeaurora.org: Remove clkdev usage] Signed-off-by: Stephen Boyd drivers/clk/Kconfig | 8 +++ drivers/clk/Makefile | 1 + drivers/clk/clk-hi655x.c | 126 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 135 insertions(+) commit fc04f27dfc4280ef35540ab40fa14c24ff8cc799 Author: Arnd Bergmann Date: Wed Apr 19 19:44:56 2017 +0200 clk: ti: fix building without legacy omap3 When CONFIG_ATAGS or CONFIG_OMAP3 is disabled, we get a build error: In file included from include/linux/clk-provider.h:15:0, from drivers/clk/ti/clk.c:19: drivers/clk/ti/clk.c: In function 'ti_clk_add_aliases': drivers/clk/ti/clk.c:438:29: error: 'simple_clk_match_table' undeclared (first use in this function); did you mean 'simple_attr_write'? Moving the match table down fixes it. Fixes: c17435c56bb1 ("clk: ti: add API for creating aliases automatically for simple clock types") Signed-off-by: Arnd Bergmann Acked-by: Tero Kristo Signed-off-by: Stephen Boyd drivers/clk/ti/clk.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2158a09395b3751db99663b2efdcce0ae09ca133 Author: Arnd Bergmann Date: Wed Apr 19 23:43:10 2017 +0200 clk: ti: fix linker error with !SOC_OMAP4 When none of the OMAP4-generation SoCs are enabled, we run into a link error for am43xx/am43xx: drivers/clk/ti/dpll.o: In function `of_ti_am3_dpll_x2_setup': dpll.c:(.init.text+0xd8): undefined reference to `clkhwops_omap4_dpllmx' This is easily fixed by adding another #ifdef. While looking at the code, I also spotted another problem with the assignment of hw_ops variable that is not used again later. I'm changing this to setting clk_hw->ops instead, which I guess is what was intended here. Fixes: 473adbf4e028 ("clk: ti: dpll44xx: fix clksel register initialization") Signed-off-by: Arnd Bergmann Acked-by: Tero Kristo [sboyd@codeaurora.org: Replaced fixes tag with correct one] Signed-off-by: Stephen Boyd drivers/clk/ti/dpll.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 659226eb630ff522b30d8b8a82c9e722756e6bd4 Author: Dan Carpenter Date: Fri Apr 21 16:49:56 2017 -0600 lightnvm: don't print a warning for ADDR_EMPTY Reading from ADDR_EMPTY is out of bounds. The current code generates a static checker warning because we check for out of bounds "lba" before we check for ADDR_EMPTY, so the second check is always false. It looks like we intended ADDR_EMPTY to be a no-op without printing a warning. Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target") Signed-off-by: Dan Carpenter Reviewed-by: Javier González Signed-off-by: Jens Axboe drivers/lightnvm/pblk-read.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5bf1e1ee6269f4db307bdfce45d196d6c9bc818a Author: Dan Carpenter Date: Fri Apr 21 16:48:40 2017 -0600 lightnvm: potential underflow in pblk_read_rq() This is a static checker fix, and perhaps not a real bug. The static checker thinks that nr_secs could be negative. It would result in zeroing more memory than intended. Anyway, even if it's not a bug, changing this variable to unsigned makes the code easier to audit. Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target") Signed-off-by: Dan Carpenter Reviewed-by: Javier González Signed-off-by: Jens Axboe drivers/lightnvm/pblk-read.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58688a7525b6b4224347f5d1c16d92e4a3db2559 Author: Tobias Regnery Date: Thu Apr 20 14:51:59 2017 +0200 platform/x86: INT33FE: add i2c dependency With CONFIG_I2C=m and CONFIG_INTEL_CHT_INT33FE=y we see the following link errors: drivers/built-in.o: In function 'cht_int33fe_remove': intel_cht_int33fe.c:(.text+0x391f6e): undefined reference to 'i2c_unregister_device' intel_cht_int33fe.c:(.text+0x391f76): undefined reference to 'i2c_unregister_device' intel_cht_int33fe.c:(.text+0x391f7d): undefined reference to 'i2c_unregister_device' drivers/built-in.o: In function 'cht_int33fe_probe': intel_cht_int33fe.c:(.text+0x392147): undefined reference to 'i2c_acpi_new_device' intel_cht_int33fe.c:(.text+0x392185): undefined reference to 'i2c_acpi_new_device' intel_cht_int33fe.c:(.text+0x3921bd): undefined reference to 'i2c_acpi_new_device' intel_cht_int33fe.c:(.text+0x3921d9): undefined reference to 'i2c_unregister_device' intel_cht_int33fe.c:(.text+0x3921e8): undefined reference to 'i2c_unregister_device' drivers/built-in.o: In function 'cht_int33fe_driver_init': intel_cht_int33fe.c:(.init.text+0x2386d): undefined reference to 'i2c_register_driver' drivers/built-in.o: In function 'cht_int33fe_driver_exit': intel_cht_int33fe.c:(.exit.text+0x206e): undefined reference to 'i2c_del_driver' Fix this by adding a kconfig dependency on the I2C subsystem. Fixes: 1cd706df8a9c ("platform/x86: Add Intel Cherry Trail ACPI INT33FE device driver") Signed-off-by: Tobias Regnery Reviewed-by: Hans de Goede Signed-off-by: Darren Hart (VMware) drivers/platform/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cad4ea546b1a8a700d269e41ac5db182057d7a32 Author: Eric W. Biederman Date: Wed Apr 12 17:22:14 2017 -0500 rlimit: Properly call security_task_setrlimit Modify do_prlimit to call security_task_setrlimit passing the task whose rlimit we are changing not the tsk->group_leader. In general this should not matter as the lsms implementing security_task_setrlimit apparmor and selinux both examine the task->cred to see what should be allowed on the destination task. That task->cred is shared between tasks created with CLONE_THREAD unless thread keyrings are in play, in which case both apparmor and selinux create duplicate security contexts. So the only time when it will matter which thread is passed to security_task_setrlimit is if one of the threads of a process performs an operation that changes only it's credentials. At which point if a thread has done that we don't want to hide that information from the lsms. So fix the call of security_task_setrlimit. With the removal of tsk->group_leader this makes the code slightly faster, more comprehensible and maintainable. Signed-off-by: "Eric W. Biederman" kernel/sys.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 19b7ccf8651df09d274671b53039c672a52ad84d Author: Ilya Dryomov Date: Tue Apr 18 18:43:20 2017 +0200 block: get rid of blk_integrity_revalidate() Commit 25520d55cdb6 ("block: Inline blk_integrity in struct gendisk") introduced blk_integrity_revalidate(), which seems to assume ownership of the stable pages flag and unilaterally clears it if no blk_integrity profile is registered: if (bi->profile) disk->queue->backing_dev_info->capabilities |= BDI_CAP_STABLE_WRITES; else disk->queue->backing_dev_info->capabilities &= ~BDI_CAP_STABLE_WRITES; It's called from revalidate_disk() and rescan_partitions(), making it impossible to enable stable pages for drivers that support partitions and don't use blk_integrity: while the call in revalidate_disk() can be trivially worked around (see zram, which doesn't support partitions and hence gets away with zram_revalidate_disk()), rescan_partitions() can be triggered from userspace at any time. This breaks rbd, where the ceph messenger is responsible for generating/verifying CRCs. Since blk_integrity_{un,}register() "must" be used for (un)registering the integrity profile with the block layer, move BDI_CAP_STABLE_WRITES setting there. This way drivers that call blk_integrity_register() and use integrity infrastructure won't interfere with drivers that don't but still want stable pages. Fixes: 25520d55cdb6 ("block: Inline blk_integrity in struct gendisk") Cc: "Martin K. Petersen" Cc: Christoph Hellwig Cc: Mike Snitzer Cc: stable@vger.kernel.org # 4.4+, needs backporting Tested-by: Dan Williams Signed-off-by: Ilya Dryomov Signed-off-by: Jens Axboe block/blk-integrity.c | 19 ++----------------- block/partition-generic.c | 1 - fs/block_dev.c | 1 - include/linux/genhd.h | 2 -- 4 files changed, 2 insertions(+), 21 deletions(-) commit 1f4407e2548827e3e6e7b943640a2da90c611306 Author: David S. Miller Date: Fri Apr 21 15:59:52 2017 -0400 net: Remove NET_CORE_BUDGET_USECS from sysctl binary interface. We are not supposed to add new entries to this thing any more. Thanks to Eric Dumazet for noticing this. Signed-off-by: David S. Miller include/uapi/linux/sysctl.h | 1 - kernel/sysctl_binary.c | 1 - 2 files changed, 2 deletions(-) commit 4abdf38d206fdc22f7a3f7bf79eef78734ec84ab Author: Chris Packham Date: Sat Apr 22 07:08:09 2017 +1200 hwmon: (adt7475) set start bit in probe The ADT7475 and ADT7476 have the STRT bit cleared by default[1]. Before any monitoring activities the STRT bit needs to be set. Logically this needs to happen before any of the sensors are read so the probe() function seems the best place for it. [1] - https://www.onsemi.com/pub/Collateral/ADT7475-D.PDF Signed-off-by: Chris Packham Signed-off-by: Guenter Roeck drivers/hwmon/adt7475.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 239c599a5f553d65ddc933d06bbbed95aaad9dd0 Author: Arnd Bergmann Date: Fri Apr 21 18:22:40 2017 +0200 net: dsa: LAN9303: add I2C dependency With CONFIG_I2C=m and NET_DSA_SMSC_LAN9303=y, we run into a link error: drivers/base/regmap/regmap-i2c.o: In function `regmap_smbus_byte_reg_read': regmap-i2c.c:(.text.regmap_smbus_byte_reg_read+0x18): undefined reference to `i2c_smbus_read_byte_data' drivers/base/regmap/regmap-i2c.o: In function `regmap_smbus_byte_reg_write': regmap-i2c.c:(.text.regmap_smbus_byte_reg_write+0x18): undefined reference to `i2c_smbus_write_byte_data' drivers/base/regmap/regmap-i2c.o: In function `regmap_smbus_word_reg_read': regmap-i2c.c:(.text.regmap_smbus_word_reg_read+0x18): undefined reference to `i2c_smbus_read_word_data' drivers/base/regmap/regmap-i2c.o: In function `regmap_smbus_word_read_swapped': regmap-i2c.c:(.text.regmap_smbus_word_read_swapped+0x18): undefined reference to `i2c_smbus_read_word_data' drivers/base/regmap/regmap-i2c.o: In function `regmap_smbus_word_write_swapped': This adds a Kconfig dependency to avoid the broken configuration. Fixes: be4e119f9914 ("net: dsa: LAN9303: add I2C managed mode support") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/dsa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdaf9c40b2d1d67617b259c59ce1858eda54b4ce Author: Joe Schaack Date: Tue Apr 18 07:15:50 2017 -0500 hwmon: (ina209) Handled signed registers The shunt voltage and current registers are signed 16-bit values so handle them as such. Signed-off-by: Joe Schaack Reviewed-by: Aaron Sierra Signed-off-by: Guenter Roeck drivers/hwmon/ina209.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 69e3948aaa559670da2662ad9d5cbc782bfc6885 Merge: ea8ffc0 4ea2063 Author: David S. Miller Date: Fri Apr 21 15:29:40 2017 -0400 Merge tag 'nfc-next-4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next Samuel Ortiz says: ==================== NFC 4.12 pull request This is the NFC pull request for 4.12. We have: - Improvements for the pn533 command queue handling and device registration order. - Removal of platform data for the pn544 and st21nfca drivers. - Additional device tree options to support more trf7970a hardware options. - Support for Sony's RC-S380P through the port100 driver. - Removal of the obsolte nfcwilink driver. - Headers inclusion cleanups (miscdevice.h, unaligned.h) for many drivers. ==================== Signed-off-by: David S. Miller commit ea8ffc0818d8a47ffda423f61f1d8ad1caca8986 Author: Mahesh Bandewar Date: Thu Apr 20 12:49:24 2017 -0700 bonding: fix wq initialization for links created via netlink Earlier patch 4493b81bea ("bonding: initialize work-queues during creation of bond") moved the work-queue initialization from bond_open() to bond_create(). However this caused the link those are created using netlink 'create bond option' (ip link add bondX type bond); create the new trunk without initializing work-queues. Prior to the above mentioned change, ndo_open was in both paths and things worked correctly. The consequence is visible in the report shared by Joe Stringer - I've noticed that this patch breaks bonding within namespaces if you're not careful to perform device cleanup correctly. Here's my repro script, you can run on any net-next with this patch and you'll start seeing some weird behaviour: ip netns add foo ip li add veth0 type veth peer name veth0+ netns foo ip li add veth1 type veth peer name veth1+ netns foo ip netns exec foo ip li add bond0 type bond ip netns exec foo ip li set dev veth0+ master bond0 ip netns exec foo ip li set dev veth1+ master bond0 ip netns exec foo ip addr add dev bond0 192.168.0.1/24 ip netns exec foo ip li set dev bond0 up ip li del dev veth0 ip li del dev veth1 The second to last command segfaults, last command hangs. rtnl is now permanently locked. It's not a problem if you take bond0 down before deleting veths, or delete bond0 before deleting veths. If you delete either end of the veth pair as per above, either inside or outside the namespace, it hits this problem. Here's some kernel logs: [ 1221.801610] bond0: Enslaving veth0+ as an active interface with an up link [ 1224.449581] bond0: Enslaving veth1+ as an active interface with an up link [ 1281.193863] bond0: Releasing backup interface veth0+ [ 1281.193866] bond0: the permanent HWaddr of veth0+ - 16:bf:fb:e0:b8:43 - is still in use by bond0 - set the HWaddr of veth0+ to a different address to avoid conflicts [ 1281.193867] ------------[ cut here ]------------ [ 1281.193873] WARNING: CPU: 0 PID: 2024 at kernel/workqueue.c:1511 __queue_delayed_work+0x13f/0x150 [ 1281.193873] Modules linked in: bonding veth openvswitch nf_nat_ipv6 nf_nat_ipv4 nf_nat autofs4 nfsd auth_rpcgss nfs_acl binfmt_misc nfs lockd grace sunrpc fscache ppdev vmw_balloon coretemp psmouse serio_raw vmwgfx ttm drm_kms_helper vmw_vmci netconsole parport_pc configfs drm i2c_piix4 fb_sys_fops syscopyarea sysfillrect sysimgblt shpchp mac_hid nf_conntrack_ipv6 nf_defrag_ipv6 nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack libcrc32c lp parport hid_generic usbhid hid mptspi mptscsih e1000 mptbase ahci libahci [ 1281.193905] CPU: 0 PID: 2024 Comm: ip Tainted: G W 4.10.0-bisect-bond-v0.14 #37 [ 1281.193906] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 09/30/2014 [ 1281.193906] Call Trace: [ 1281.193912] dump_stack+0x63/0x89 [ 1281.193915] __warn+0xd1/0xf0 [ 1281.193917] warn_slowpath_null+0x1d/0x20 [ 1281.193918] __queue_delayed_work+0x13f/0x150 [ 1281.193920] queue_delayed_work_on+0x27/0x40 [ 1281.193929] bond_change_active_slave+0x25b/0x670 [bonding] [ 1281.193932] ? synchronize_rcu_expedited+0x27/0x30 [ 1281.193935] __bond_release_one+0x489/0x510 [bonding] [ 1281.193939] ? addrconf_notify+0x1b7/0xab0 [ 1281.193942] bond_netdev_event+0x2c5/0x2e0 [bonding] [ 1281.193944] ? netconsole_netdev_event+0x124/0x190 [netconsole] [ 1281.193947] notifier_call_chain+0x49/0x70 [ 1281.193948] raw_notifier_call_chain+0x16/0x20 [ 1281.193950] call_netdevice_notifiers_info+0x35/0x60 [ 1281.193951] rollback_registered_many+0x23b/0x3e0 [ 1281.193953] unregister_netdevice_many+0x24/0xd0 [ 1281.193955] rtnl_delete_link+0x3c/0x50 [ 1281.193956] rtnl_dellink+0x8d/0x1b0 [ 1281.193960] rtnetlink_rcv_msg+0x95/0x220 [ 1281.193962] ? __kmalloc_node_track_caller+0x35/0x280 [ 1281.193964] ? __netlink_lookup+0xf1/0x110 [ 1281.193966] ? rtnl_newlink+0x830/0x830 [ 1281.193967] netlink_rcv_skb+0xa7/0xc0 [ 1281.193969] rtnetlink_rcv+0x28/0x30 [ 1281.193970] netlink_unicast+0x15b/0x210 [ 1281.193971] netlink_sendmsg+0x319/0x390 [ 1281.193974] sock_sendmsg+0x38/0x50 [ 1281.193975] ___sys_sendmsg+0x25c/0x270 [ 1281.193978] ? mem_cgroup_commit_charge+0x76/0xf0 [ 1281.193981] ? page_add_new_anon_rmap+0x89/0xc0 [ 1281.193984] ? lru_cache_add_active_or_unevictable+0x35/0xb0 [ 1281.193985] ? __handle_mm_fault+0x4e9/0x1170 [ 1281.193987] __sys_sendmsg+0x45/0x80 [ 1281.193989] SyS_sendmsg+0x12/0x20 [ 1281.193991] do_syscall_64+0x6e/0x180 [ 1281.193993] entry_SYSCALL64_slow_path+0x25/0x25 [ 1281.193995] RIP: 0033:0x7f6ec122f5a0 [ 1281.193995] RSP: 002b:00007ffe69e89c48 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 1281.193997] RAX: ffffffffffffffda RBX: 00007ffe69e8dd60 RCX: 00007f6ec122f5a0 [ 1281.193997] RDX: 0000000000000000 RSI: 00007ffe69e89c90 RDI: 0000000000000003 [ 1281.193998] RBP: 00007ffe69e89c90 R08: 0000000000000000 R09: 0000000000000003 [ 1281.193999] R10: 00007ffe69e89a10 R11: 0000000000000246 R12: 0000000058f14b9f [ 1281.193999] R13: 0000000000000000 R14: 00000000006473a0 R15: 00007ffe69e8e450 [ 1281.194001] ---[ end trace 713a77486cbfbfa3 ]--- Fixes: 4493b81bea ("bonding: initialize work-queues during creation of bond") Reported-by: Joe Stringer Tested-by: Joe Stringer Signed-off-by: Mahesh Bandewar Acked-by: Andy Gospodarek Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 2 +- drivers/net/bonding/bond_netlink.c | 5 +++++ include/net/bonding.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) commit b18b745397e0154795b2d5504def5ccd090b893c Author: Alexander Kochetkov Date: Thu Apr 20 16:29:34 2017 +0300 net: arc_emac: switch to phy_start()/phy_stop() Currently driver use phy_start_aneg() in arc_emac_open() to bring up PHY. But phy_start() function is more appropriate for this purposes. Besides that it call phy_start_aneg() as part of PHY startup sequence it also can correctly bring up PHY from error and suspended states. So the patch replace phy_start_aneg() to phy_start(). Also the patch add call to phy_stop() to arc_emac_stop() to allow the PHY device to be fully suspended when the interface is unused. Signed-off-by: Alexander Kochetkov Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/arc/emac_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8494206dc5587c3204d12965c88cbf5f726ef94d Merge: fe8c470 6c4c9a9 Author: Rafael J. Wysocki Date: Fri Apr 21 21:12:57 2017 +0200 Merge back power-related ACPI material for v4.12. commit 6b633e82b0f902a4cceb9bcdcb5bb31d04ca6264 Merge: 7799932 8f92e03 Author: David S. Miller Date: Fri Apr 21 15:11:28 2017 -0400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2017-04-20 This adds the basic infrastructure for IPsec hardware offloading, it creates a configuration API and adjusts the packet path. 1) Add the needed netdev features to configure IPsec offloads. 2) Add the IPsec hardware offloading API. 3) Prepare the ESP packet path for hardware offloading. 4) Add gso handlers for esp4 and esp6, this implements the software fallback for GSO packets. 5) Add xfrm replay handler functions for offloading. 6) Change ESP to use a synchronous crypto algorithm on offloading, we don't have the option for asynchronous returns when we handle IPsec at layer2. 7) Add a xfrm validate function to validate_xmit_skb. This implements the software fallback for non GSO packets. 8) Set the inner_network and inner_transport members of the SKB, as well as encapsulation, to reflect the actual positions of these headers, and removes them only once encryption is done on the payload. From Ilan Tayari. 9) Prepare the ESP GRO codepath for hardware offloading. 10) Fix incorrect null pointer check in esp6. From Colin Ian King. 11) Fix for the GSO software fallback path to detect the fallback correctly. From Ilan Tayari. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 77999328b5fbccca674b3d71a346289e17b4c7cf Author: Steffen Klassert Date: Thu Apr 20 10:36:32 2017 +0200 MAINTAINERS: Add new IPsec offloading files. This adds two new files to IPsec maintenance scope: net/ipv4/esp4_offload.c net/ipv6/ip6_offload.c Signed-off-by: Steffen Klassert Signed-off-by: David S. Miller MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8d77bb8276062ff2d991bec71389520dd0156cc3 Author: Rakesh Pandit Date: Thu Apr 20 21:23:56 2017 +0300 lightnvm: propagate pblk_init return to userspace From userspace calling ioctl(NVM_DEV_CREATE) was returning ENOMEM for invalid arguments even though pblk (pblk_init) was returning correctly -EINVAL to nvm_create_tgt inside core. This patch propagates the correct return value to userspace. Because pblk was introduced recently this only needs to go in 4.12. Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target") Signed-off-by: Rakesh Pandit Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 072cec7797b16c454156da737923a393322dc848 Merge: 76bb5db 3480756 Author: David S. Miller Date: Fri Apr 21 14:13:11 2017 -0400 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-04-19 This series contains updates to i40e and i40evf only, most notable being the addition of trace points for BPF programs. Tobias Klauser updates i40evf to use net_device stats struct instead of a local private copy. Preethi updates the VF driver to not enable receive checksum offload by default for tunneled packets. Alex fixes an issue he introduced when he converted the code over to using the length field to determine if a descriptor was done or not. Mitch adds the ability to dump additional information on the VFs, which is not available through 'ip link show' using debugfs. Scott adds trace points to the drivers so that BPF programs can be attached for feature testing and verification. Jingjing adds admin queue functions for Pipeline Personalization Profile commands. Jake does most of the heavy lifting in this series, starting with the a reduction in the scope of the RTNL lock being held while resetting VFs to allow multiple PFs to reset in a timely manner. Factored out the direct queue modification so that we are able to re-use the code. Reduced the wait time for admin queue commands to complete, since we were waiting a minimum of a millisecond, when in practice the admin queue command is processed often much faster. Cleaned up code (flag) we never use. Make the code to resetting all the VFs optimized for parallel computing instead of the current way is a serialized fashion, to help reduce the time it takes. ==================== Signed-off-by: David S. Miller commit 4f757f3cbf54edef7b75c68d6d6d2f1a0ca08d2e Author: Al Viro Date: Sat Apr 15 17:31:22 2017 -0400 make sure that mntns_install() doesn't end up with referral for root new flag: LOOKUP_DOWN. If the starting point is overmounted, cross into whatever's mounted on top, triggering referrals et.al. Use that instead of follow_down_one() loop in mntns_install(), handle errors properly. Signed-off-by: Al Viro fs/namei.c | 38 ++++++++++++++++++++++++++++++++++++++ fs/namespace.c | 18 +++++++++++------- include/linux/namei.h | 1 + 3 files changed, 50 insertions(+), 7 deletions(-) commit 93893862fb7ba704ec5a6872a294c9cc2b0d4ca3 Author: Al Viro Date: Sat Apr 15 17:29:14 2017 -0400 path_init(): don't bother with checking MAY_EXEC for LOOKUP_ROOT we'll hit that check in link_path_walk() anyway. Signed-off-by: Al Viro fs/namei.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 159b095628851966b5fbf2637b0c40709911ca88 Author: Al Viro Date: Sat Apr 15 15:58:56 2017 -0400 make sure that fchdir() won't accept referral points, etc. Signed-off-by: Al Viro fs/open.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit abc25a693091e61537e40dfe24e8ee5deaf08208 Author: Bart Van Assche Date: Fri Apr 21 12:00:40 2017 -0600 blk-mq: Fix preempt count imbalance Avoid that the following kernel bug gets triggered: BUG: sleeping function called from invalid context at ./include/linux/buffer_head.h:349 in_atomic(): 1, irqs_disabled(): 0, pid: 8019, name: find CPU: 10 PID: 8019 Comm: find Tainted: G W I 4.11.0-rc4-dbg+ #2 Call Trace: dump_stack+0x68/0x93 ___might_sleep+0x16e/0x230 __might_sleep+0x4a/0x80 __ext4_get_inode_loc+0x1e0/0x4e0 ext4_iget+0x70/0xbc0 ext4_iget_normal+0x2f/0x40 ext4_lookup+0xb6/0x1f0 lookup_slow+0x104/0x1e0 walk_component+0x19a/0x330 path_lookupat+0x4b/0x100 filename_lookup+0x9a/0x110 user_path_at_empty+0x36/0x40 vfs_statx+0x67/0xc0 SYSC_newfstatat+0x20/0x40 SyS_newfstatat+0xe/0x10 entry_SYSCALL_64_fastpath+0x18/0xad This happens since the big if/else in blk_mq_make_request() doesn't have final else section that also drops the ctx. Add that. Fixes: b00c53e8f411 ("blk-mq: fix schedule-while-atomic with scheduler attached") Signed-off-by: Bart Van Assche Cc: Omar Sandoval Added a bit more to the commit log. Signed-off-by: Jens Axboe block/blk-mq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 76bb5db5c749dfe19d779aac076133e821b859dd Author: stephen hemminger Date: Wed Apr 19 15:22:02 2017 -0700 netvsc: fix use after free on module removal The NAPI data structure is embedded in the netvsc_device structure and is freed when device is closed. There is still a reference (in NAPI list) to this which causes a crash in netif_napi_del when device is removed. Fix by managing NAPI instances correctly. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 9 +++++---- drivers/net/hyperv/rndis_filter.c | 9 ++++++--- 2 files changed, 11 insertions(+), 7 deletions(-) commit dfb05553a55d89e6daae9cb9abfdf4751e14d72d Merge: b1d9fc4 4392053 Author: David S. Miller Date: Fri Apr 21 13:58:16 2017 -0400 Merge branch 'tc-filter-cleanup-destroy-delete' Cong Wang says: ==================== net_sched: clean up tc filter destroy and delete logic The first patch fixes a potenial race condition, the second one is pure cleanup. ==================== Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 4392053879717edb0c4756a3878c0274267e237b Author: WANG Cong Date: Wed Apr 19 14:21:22 2017 -0700 net_sched: remove useless NULL to tp->root There is no need to NULL tp->root in ->destroy(), since tp is going to be freed very soon, and existing readers are still safe to read them. For cls_route, we always init its tp->root, so it can't be NULL, we can drop more useless code. Cc: Daniel Borkmann Cc: John Fastabend Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_fw.c | 1 - net/sched/cls_route.c | 15 --------------- net/sched/cls_rsvp.h | 4 ---- 3 files changed, 20 deletions(-) commit 763dbf6328e41de7a55851baf5ee49e367552531 Author: WANG Cong Date: Wed Apr 19 14:21:21 2017 -0700 net_sched: move the empty tp check from ->destroy() to ->delete() We could have a race condition where in ->classify() path we dereference tp->root and meanwhile a parallel ->destroy() makes it a NULL. Daniel cured this bug in commit d936377414fa ("net, sched: respect rcu grace period on cls destruction"). This happens when ->destroy() is called for deleting a filter to check if we are the last one in tp, this tp is still linked and visible at that time. The root cause of this problem is the semantic of ->destroy(), it does two things (for non-force case): 1) check if tp is empty 2) if tp is empty we could really destroy it and its caller, if cares, needs to check its return value to see if it is really destroyed. Therefore we can't unlink tp unless we know it is empty. As suggested by Daniel, we could actually move the test logic to ->delete() so that we can safely unlink tp after ->delete() tells us the last one is just deleted and before ->destroy(). Fixes: 1e052be69d04 ("net_sched: destroy proto tp when all filters are gone") Cc: Roi Dayan Cc: Daniel Borkmann Cc: John Fastabend Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/net/sch_generic.h | 4 +-- net/sched/cls_api.c | 27 +++++++++--------- net/sched/cls_basic.c | 10 +++---- net/sched/cls_bpf.c | 11 ++++---- net/sched/cls_cgroup.c | 8 ++---- net/sched/cls_flow.c | 10 +++---- net/sched/cls_flower.c | 10 ++----- net/sched/cls_fw.c | 29 +++++++++++-------- net/sched/cls_matchall.c | 7 ++--- net/sched/cls_route.c | 29 +++++++++---------- net/sched/cls_rsvp.h | 32 +++++++++++---------- net/sched/cls_tcindex.c | 14 +++++----- net/sched/cls_u32.c | 71 +++++++++++++++++++++++++++-------------------- 13 files changed, 134 insertions(+), 128 deletions(-) commit 5ecda13711b3bd4a750b5740897bf13d1720de7c Author: Al Viro Date: Thu Apr 13 14:13:36 2017 -0400 generic_file_read_iter(): make use of iov_iter_revert() Signed-off-by: Al Viro mm/filemap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 639a93a521c759ddb32cc875f3ea1965072b2cbc Author: Al Viro Date: Thu Apr 13 14:10:15 2017 -0400 generic_file_direct_write(): make use of iov_iter_revert() Signed-off-by: Al Viro mm/filemap.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit c63ed807d1fca901d6b463deb3ceeced4969384e Author: Al Viro Date: Thu Apr 13 03:12:24 2017 -0400 orangefs: use iov_iter_revert() Signed-off-by: Al Viro fs/orangefs/file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3b6d4dbf09d12fdef8c8388962ae9a2da6890a47 Author: Al Viro Date: Fri Feb 17 23:17:41 2017 -0500 sctp: switch to copy_from_iter_full() Signed-off-by: Al Viro net/sctp/sm_make_chunk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1c512a7ca943575a3fbca6d6366d41e5c7c7d539 Author: Al Viro Date: Fri Feb 17 23:16:09 2017 -0500 net/9p: switch to copy_from_iter_full() Signed-off-by: Al Viro net/9p/client.c | 5 ++--- net/9p/protocol.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) commit 3073f070a137e140e3faefa87f2446a8deffc07f Author: Al Viro Date: Fri Feb 17 23:13:25 2017 -0500 switch memcpy_from_msg() to copy_from_iter_full() Signed-off-by: Al Viro include/linux/skbuff.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc88e3b4c8c9c473c5e0bc65bcf0d3666ee1e022 Author: Al Viro Date: Wed Apr 12 23:09:32 2017 -0400 rds: make use of iov_iter_revert() net/rds/recv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b1d9fc41aab11f9520b2e0d57ae872e2ec5d6f32 Author: Daniel Borkmann Date: Wed Apr 19 23:01:17 2017 +0200 bpf: add napi_id read access to __sk_buff Add napi_id access to __sk_buff for socket filter program types, tc program types and other bpf_convert_ctx_access() users. Having access to skb->napi_id is useful for per RX queue listener siloing, f.e. in combination with SO_ATTACH_REUSEPORT_EBPF and when busy polling is used, meaning SO_REUSEPORT enabled listeners can then select the corresponding socket at SYN time already [1]. The skb is marked via skb_mark_napi_id() early in the receive path (e.g., napi_gro_receive()). Currently, sockets can only use SO_INCOMING_NAPI_ID from 6d4339028b35 ("net: Introduce SO_INCOMING_NAPI_ID") as a socket option to look up the NAPI ID associated with the queue for steering, which requires a prior sk_mark_napi_id() after the socket was looked up. Semantics for the __sk_buff napi_id access are similar, meaning if skb->napi_id is < MIN_NAPI_ID (e.g. outgoing packets using sender_cpu), then an invalid napi_id of 0 is returned to the program, otherwise a valid non-zero napi_id. [1] http://netdevconf.org/2.1/slides/apr6/dumazet-BUSY-POLLING-Netdev-2.1.pdf Suggested-by: Eric Dumazet 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 ++++++++++++++ tools/include/uapi/linux/bpf.h | 1 + tools/testing/selftests/bpf/test_verifier.c | 3 +++ 4 files changed, 19 insertions(+) commit 73e64fa4f417b22d8d5521999a631ced8e2d442e Author: K. Y. Srinivasan Date: Wed Apr 19 13:53:49 2017 -0700 netvsc: Deal with rescinded channels correctly We will not be able to send packets over a channel that has been rescinded. Make necessary adjustments so we can properly cleanup even when the channel is rescinded. This issue can be trigerred in the NIC hot-remove path. Signed-off-by: K. Y. Srinivasan Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 87e978edacf53b239add5a307c8db09164856437 Merge: ca1cb28 d76e0fe Author: David S. Miller Date: Fri Apr 21 13:33:55 2017 -0400 Merge branch 'ibmvnic-updates-and-bug-fixes' Nathan Fontenot says: ==================== ibmvnic: Updates and bug fixes This set of patches is a series of updates to remove some unneeded and unused code in the driver as well as bug fixes for the ibmvnic driver. ==================== Signed-off-by: David S. Miller commit d76e0fec7e03ab29f0dd68a89364225c98bd5568 Author: Nathan Fontenot Date: Wed Apr 19 13:45:22 2017 -0400 ibmvnic: Remove unused bouce buffer The bounce buffer is not used in the ibmvnic driver, just get rid of it. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 53 -------------------------------------- drivers/net/ethernet/ibm/ibmvnic.h | 4 --- 2 files changed, 57 deletions(-) commit 7f7adc5060a787b15587062274d2dec4912f3588 Author: Nathan Fontenot Date: Wed Apr 19 13:45:16 2017 -0400 ibmvnic: Allocate zero-filled memory for sub crqs Update the allocation of memory for the sub crq structs and their associated pages to allocate zero-filled memory. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit dd9c20fa07ba5cfb5a0ab3181d68530506610605 Author: Brian King Date: Wed Apr 19 13:45:10 2017 -0400 ibmvnic: Disable irq prior to close Add some code to call disable_irq on all the vnic interface's irqs. This fixes a crash observed when closing an active interface, as seen in the oops below when we try to access a buffer in the interrupt handler which we've already freed. Unable to handle kernel paging request for data at address 0x00000001 Faulting instruction address: 0xd000000003886824 Oops: Kernel access of bad area, sig: 11 [#1] SMP NR_CPUS=2048 NUMA pSeries Modules linked in: ibmvnic(OEN) rpadlpar_io(X) rpaphp(X) tcp_diag udp_diag inet_diag unix_diag af_packet_diag netlink_diag rpcsec_ Supported: No, Unsupported modules are loaded CPU: 8 PID: 0 Comm: swapper/8 Tainted: G OE NX 4.4.49-92.11-default #1 task: c00000007f990110 ti: c0000000fffa0000 task.ti: c00000007f9b8000 NIP: d000000003886824 LR: d000000003886824 CTR: c0000000007eff60 REGS: c0000000fffa3a70 TRAP: 0300 Tainted: G OE NX (4.4.49-92.11-default) MSR: 8000000000009033 CR: 22008042 XER: 20000008 CFAR: c000000000008468 DAR: 0000000000000001 DSISR: 40000000 SOFTE: 0 GPR00: d000000003886824 c0000000fffa3cf0 d000000003894118 0000000000000000 GPR04: 0000000000000000 0000000000000000 c000000001249da0 0000000000000000 GPR08: 000000000000000e 0000000000000000 c0000000ccb00000 d000000003889180 GPR12: c0000000007eff60 c000000007af4c00 0000000000000001 c0000000010def30 GPR16: c00000007f9b8000 c000000000b98c30 c00000007f9b8080 c000000000bab858 GPR20: 0000000000000005 0000000000000000 c0000000ff5d7e80 c0000000f809f648 GPR24: c0000000ff5d7ec8 0000000000000000 0000000000000000 c0000000ccb001a0 GPR28: 000000000000000a c0000000f809f600 c0000000fd4cd900 c0000000f9cd5b00 NIP [d000000003886824] ibmvnic_interrupt_tx+0x114/0x380 [ibmvnic] LR [d000000003886824] ibmvnic_interrupt_tx+0x114/0x380 [ibmvnic] Call Trace: [c0000000fffa3cf0] [d000000003886824] ibmvnic_interrupt_tx+0x114/0x380 [ibmvnic] (unreliable) [c0000000fffa3dd0] [c000000000132940] __handle_irq_event_percpu+0x90/0x2e0 [c0000000fffa3e90] [c000000000132bcc] handle_irq_event_percpu+0x3c/0x90 [c0000000fffa3ed0] [c000000000132c88] handle_irq_event+0x68/0xc0 [c0000000fffa3f00] [c000000000137edc] handle_fasteoi_irq+0xec/0x250 [c0000000fffa3f30] [c000000000131b04] generic_handle_irq+0x54/0x80 [c0000000fffa3f60] [c000000000011190] __do_irq+0x80/0x1d0 [c0000000fffa3f90] [c0000000000248d8] call_do_irq+0x14/0x24 [c00000007f9bb9e0] [c000000000011380] do_IRQ+0xa0/0x120 [c00000007f9bba40] [c000000000002594] hardware_interrupt_common+0x114/0x180 Signed-off-by: Brian King Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 3748905599cbbb37bf90f818109151809de5241c Author: Nathan Fontenot Date: Wed Apr 19 13:45:04 2017 -0400 ibmvnic: Correct crq and resource releasing We should not be releasing the crq's when calling close for the adapter, these need to remain open to facilitate operations such as updating the mac address. The crq's should be released in the adpaters remove routine. Additionally, we need to call release_reources from remove. This corrects the scenario of trying to remove an adapter that has only been probed. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 661a26227621b9a602a816fa29451e53c5ba006b Author: Nathan Fontenot Date: Wed Apr 19 13:44:58 2017 -0400 ibmvnic: Remove inflight list The inflight list used to track memory that is allocated for crq that are inflight is not needed. The one piece of the inflight list that does need to be cleaned at module exit is the error buffer list which is already attached to the adapter struct. This patch removes the inflight list and moves checking the error buffer list to ibmvnic_remove. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 98 ++++++++------------------------------ drivers/net/ethernet/ibm/ibmvnic.h | 9 ---- 2 files changed, 19 insertions(+), 88 deletions(-) commit ed7ecbf700616d83ac5eea060638a2471c37e465 Author: Brian King Date: Wed Apr 19 13:44:53 2017 -0400 ibmvnic: Do not disable IRQ after scheduling tasklet Since the primary CRQ is only used for service functions and not in the performance path, simplify the code a bit and avoid disabling the IRQ. Signed-off-by: Brian King Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) commit 58c8c0c096611f6a1d43ed24e320494bf894a66e Author: Brian King Date: Wed Apr 19 13:44:47 2017 -0400 ibmvnic: Fixup atomic API usage Replace a couple of modifications of an atomic followed by a read of the atomic, which is no longer atomic, to use atomic_XX_return variants to avoid race conditions. Signed-off-by: Brian King Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 59af56c25bc34d4e98820c694d48fd5145fb6e4f Author: Brian King Date: Wed Apr 19 13:44:41 2017 -0400 ibmvnic: Unmap longer term buffer before free Make sure we unregister long term buffers from the adapter prior to DMA unmapping it and freeing the buffer. Failure to do so could result in a DMA to a now invalid address. Signed-off-by: Brian King Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 993a82b0ff03b356c0001561ca7035b02c5e7bae Author: Murilo Fossa Vicentini Date: Wed Apr 19 13:44:35 2017 -0400 ibmvnic: Fix ibmvnic_change_mac_addr struct format The ibmvnic_change_mac_addr struct alignment was not matching the defined format in PAPR+, it had the reserved and return code fields swapped. As a consequence, the CHANGE_MAC_ADDR_RSP commands were being improperly handled and executed even when the operation wasn't successfully completed by the system firmware. Also changing the endianness of the debug message to make it easier to parse the CRQ content. Signed-off-by: Murilo Fossa Vicentini Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 5 +++-- drivers/net/ethernet/ibm/ibmvnic.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit ffa738555b917c5b78f2dc1aa4f29078c605bb94 Author: Thomas Falcon Date: Wed Apr 19 13:44:29 2017 -0400 ibmvnic: Report errors when failing to release sub-crqs Add reporting of errors when releasing sub-crqs fails. Signed-off-by: Thomas Falcon Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 6 ++++++ 1 file changed, 6 insertions(+) commit aba611fc4c69896f1355ff0b8ff0ff21c9b5b6fb Author: Sylwester Nawrocki Date: Fri Apr 21 19:19:50 2017 +0200 ASoC: samsung: Add Odroid ASoC machine driver This dedicated driver allows to support SoC specific clock settings and helps to ensure proper number of channels gets negotiated in multicodec system configurations. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/samsung/Kconfig | 8 ++ sound/soc/samsung/Makefile | 2 + sound/soc/samsung/odroid.c | 219 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 229 insertions(+) commit 92c9f05ebc7290e638c7b1b85288918c4fc65d4e Author: Sylwester Nawrocki Date: Fri Apr 21 19:19:49 2017 +0200 ASoC: Add Odroid sound DT bindings documentation This patch adds DT binding documentation for Odroid XU3/4 sound subsystem. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown .../devicetree/bindings/sound/samsung,odroid.txt | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 8a246230bd2e822f440ebf4e7424fabb4d42da24 Author: Fathi Boudra Date: Fri Mar 31 11:41:30 2017 +0300 selftests: gpio: add config fragment for gpio-mockup The gpio test requires to insert the gpio mockup module (CONFIG_GPIO_MOCKUP). The gpio mockup driver depends on gpiolib (CONFIG_GPIOLIB). CONFIG_GPIO_SYSFS is selected automatically by the gpio mockup driver. Tested on x86_64 and arm64 with defconfig and kselftest-merge. Signed-off-by: Fathi Boudra Signed-off-by: Shuah Khan tools/testing/selftests/gpio/config | 2 ++ 1 file changed, 2 insertions(+) commit ca1cb28da00448fdbddc99ee6d410f461bb619b5 Author: Arnd Bergmann Date: Wed Apr 19 19:30:59 2017 +0200 liquidio: remove unnecessary variable assignment gcc points out an useless assignment that was added during code refactoring: drivers/net/ethernet/cavium/liquidio/lio_ethtool.c: In function 'octnet_intrmod_callback': drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:1315:59: error: parameter 'oct_dev' set but not used [-Werror=unused-but-set-parameter] This is harmless but can clearly be remove to avoid the warning. Fixes: 50c0add534d2 ("liquidio: refactor interrupt moderation code") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 2 -- 1 file changed, 2 deletions(-) commit b13f76664d68b9b9fc0827c5dcfe6811232db5f7 Author: Fathi Boudra Date: Wed Mar 22 20:04:58 2017 +0200 selftests: breakpoints: allow to cross-compile for aarch64/arm64 To build breakpoint_test_arm64, ARCH value is only tested for "aarch64". It covers only the native build because it's computed from uname -m output. For cross-compilation, ARCH is set to arm64 and prevent to cross-compile the test. Fix the test to allow both native and cross-compilation of the test. Note: glibc is missing several of the TRAP_* constants in the userspace definitions. Specifically TRAP_BRANCH and TRAP_HWBKPT. See https://sourceware.org/bugzilla/show_bug.cgi?id=21286 Signed-off-by: Fathi Boudra Tested-by: Naresh Kamboju Signed-off-by: Shuah Khan tools/testing/selftests/breakpoints/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 584f34f1721c3b5d2f8488b4afee1186a3f41cf7 Author: SeongJae Park Date: Fri Apr 14 08:44:46 2017 +0900 selftests/Makefile: Add missed PHONY targets `selftests/Makefile` is defining only `install` as entire PHONY target though there are few more PHONY targets including `run_tests`. This commit defines them as the PHONY targets. Signed-off-by: SeongJae Park Signed-off-by: Shuah Khan tools/testing/selftests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7acf8a1e8a28b3d7407a8d8061a7d0766cfac2f4 Author: Matthew Whitehead Date: Wed Apr 19 12:37:10 2017 -0400 Replace 2 jiffies with sysctl netdev_budget_usecs to enable softirq tuning Constants used for tuning are generally a bad idea, especially as hardware changes over time. Replace the constant 2 jiffies with sysctl variable netdev_budget_usecs to enable sysadmins to tune the softirq processing. Also document the variable. For example, a very fast machine might tune this to 1000 microseconds, while my regression testing 486DX-25 needs it to be 4000 microseconds on a nearly idle network to prevent time_squeeze from being incremented. Version 2: changed jiffies to microseconds for predictable units. Signed-off-by: Matthew Whitehead Signed-off-by: David S. Miller Documentation/sysctl/net.txt | 11 ++++++++++- include/linux/netdevice.h | 1 + include/uapi/linux/sysctl.h | 1 + kernel/sysctl_binary.c | 1 + net/core/dev.c | 4 +++- net/core/sysctl_net_core.c | 8 ++++++++ 6 files changed, 24 insertions(+), 2 deletions(-) commit ff80d9152fd71c07d4e80eccfa135880c44aef0f Author: SeongJae Park Date: Fri Apr 14 08:49:21 2017 +0900 selftests/vm/run_vmtests: Fix wrong comment A comment in `run_vmtests` is wrong because it is saying `128MB + 128MB == 258MB`. This commit fixes the comment. Signed-off-by: SeongJae Park Signed-off-by: Shuah Khan tools/testing/selftests/vm/run_vmtests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6a13fafa85d11282dd88945fe9b60f51b88ef65 Author: SeongJae Park Date: Fri Apr 14 08:43:16 2017 +0900 selftests/Makefile: Add missed closing `"` in comment A comment for make command usage in `selftets/Makefile` has opening `"` but no closing `"`. This commit adds the missed `"` in the comment. Signed-off-by: SeongJae Park Signed-off-by: Shuah Khan tools/testing/selftests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20da848f8e5c2d911ee65dda1776d0f2a2408e01 Merge: 8e6c181 9830ad4 Author: David S. Miller Date: Fri Apr 21 13:21:32 2017 -0400 Merge branch 'iptunnel-policy-based-routing' Craig Gallek says: ==================== ip_tunnel: Allow policy-based routing through tunnels iproute2 changes to follow. Example usage: ip link add gre-test type gre local 10.0.0.1 remote 10.0.0.2 fwmark 0x4 ip -detail link show gre-test ... ip link set gre-test type gre fwmark 0 ==================== Signed-off-by: David S. Miller commit 9830ad4c6a7f8db18d3b0933875937e36470987d Author: Craig Gallek Date: Wed Apr 19 12:30:54 2017 -0400 ip_tunnel: Allow policy-based routing through tunnels This feature allows the administrator to set an fwmark for packets traversing a tunnel. This allows the use of independent routing tables for tunneled packets without the use of iptables. There is no concept of per-packet routing decisions through IPv4 tunnels, so this implementation does not need to work with per-packet route lookups as the v6 implementation may (with IP6_TNL_F_USE_ORIG_FWMARK). Further, since the v4 tunnel ioctls share datastructures (which can not be trivially modified) with the kernel's internal tunnel configuration structures, the mark attribute must be stored in the tunnel structure itself and passed as a parameter when creating or changing tunnel attributes. Signed-off-by: Craig Gallek Signed-off-by: David S. Miller include/net/ip_tunnels.h | 5 +++-- net/ipv4/ip_gre.c | 24 +++++++++++++++++------- net/ipv4/ip_tunnel.c | 27 +++++++++++++++++---------- net/ipv4/ip_vti.c | 20 +++++++++++++++----- net/ipv4/ipip.c | 24 +++++++++++++++++------- net/ipv6/sit.c | 37 ++++++++++++++++++++++++------------- 6 files changed, 93 insertions(+), 44 deletions(-) commit 0a473b82cb23e7a35c4be6e9765c8487a65e8f55 Author: Craig Gallek Date: Wed Apr 19 12:30:53 2017 -0400 ip6_tunnel: Allow policy-based routing through tunnels This feature allows the administrator to set an fwmark for packets traversing a tunnel. This allows the use of independent routing tables for tunneled packets without the use of iptables. Signed-off-by: Craig Gallek Signed-off-by: David S. Miller include/net/ip6_tunnel.h | 2 ++ include/uapi/linux/if_tunnel.h | 3 +++ net/ipv6/ip6_gre.c | 14 +++++++++++++- net/ipv6/ip6_tunnel.c | 15 ++++++++++++++- net/ipv6/ip6_vti.c | 10 +++++++++- 5 files changed, 41 insertions(+), 3 deletions(-) commit f8a05a1d01d9bb8aba78339d1e4b559e5db3b716 Merge: 95c55ff e02ab02 Author: Jens Axboe Date: Fri Apr 21 11:14:22 2017 -0600 Merge branch 'nvme-4.12' of git://git.infradead.org/nvme into for-4.12/block Christoph writes: This is the current NVMe pile: virtualization extensions, lots of FC updates and various misc bits. There are a few more FC bits that didn't make the cut, but we'd like to get this request out before the merge window for sure. commit 97c52eb969718f0231f197937eb0418e7514aba3 Author: Linus Walleij Date: Wed Apr 5 10:34:10 2017 +0200 ASoC: qcom: move clock names into LPASS variant struct The clock names for the two supported codecs are either "mi2s-*" name variants generated by code. This naming scheme does not work for platforms like MSM8660 which has I2S channels named CODEC_I2S_SPKR (rather than just "MI2S tertiary" and other repetitive names) and consequently have clocks named "codec-i2s-spkr-osr-clk" and similar. Skip the runtime generation of clock names and replace it with name lookup tables encoded into the variant data. Signed-off-by: Linus Walleij Signed-off-by: Mark Brown sound/soc/qcom/lpass-apq8016.c | 12 ++++++++++++ sound/soc/qcom/lpass-cpu.c | 22 +++++++--------------- sound/soc/qcom/lpass-ipq806x.c | 6 ++++++ sound/soc/qcom/lpass.h | 2 ++ 4 files changed, 27 insertions(+), 15 deletions(-) commit c687c46e9e4527c4b4d82bc3cca58c1b08bcfb83 Author: Vignesh R Date: Tue Apr 11 17:22:25 2017 +0530 spi: spi-ti-qspi: Use bounce buffer if read buffer is not DMA'ble Flash filesystems like JFFS2, UBIFS and MTD block layer can provide vmalloc'd or kmap'd buffers that cannot be mapped using dma_map_sg() and can potentially be in memory region above 32bit addressable region(ie buffers belonging to memory region backed by LPAE) of DMA, implement spi_flash_can_dma() interface to inform SPI core not to map such buffers. When buffers are not mapped for DMA, then use a pre allocated bounce buffer(64K = typical flash erase sector size) to read from flash and then do a copy to actual destination buffer. This is approach is much faster than using memcpy using CPU and also reduces CPU load. With this patch, UBIFS read speed is ~18MB/s and CPU utilization <20% on DRA74 Rev H EVM. Performance degradation is negligible when compared with non bounce buffer case while using UBIFS. Signed-off-by: Vignesh R Signed-off-by: Mark Brown drivers/spi/spi-ti-qspi.c | 66 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 59 insertions(+), 7 deletions(-) commit 2bca34455b257d75080d87e800ae14afe49001bf Author: Vignesh R Date: Tue Apr 11 17:22:24 2017 +0530 spi: Add can_dma like interface for spi_flash_read Add an interface analogous to ->can_dma() for spi_flash_read() interface. This will enable SPI controller drivers to inform SPI core when not to do DMA mappings. Signed-off-by: Vignesh R Signed-off-by: Mark Brown drivers/spi/spi.c | 2 +- include/linux/spi/spi.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 06bdf385f66a53b335b324e28a43788b03e6f3e3 Author: Charles Keepax Date: Thu Apr 13 16:52:09 2017 +0100 ASoC: cs35l35: Allow user to configure IMON SCALE On the chip the IMON signal is a full 24-bits however normally only some of the bits will be sent over the bus. The chip provides a field to select which bits of the IMON will be sent back, this is the only feedback signal that has this feature. Add an additional entry to the cirrus,imon device tree property to allow the IMON scale parameter to be passed. Signed-off-by: Charles Keepax Acked-by: Brian Austin Acked-by: Rob Herring Signed-off-by: Mark Brown .../devicetree/bindings/sound/cs35l35.txt | 4 ++-- include/sound/cs35l35.h | 1 + sound/soc/codecs/cs35l35.c | 22 +++++++++++++++------- sound/soc/codecs/cs35l35.h | 3 +++ 4 files changed, 21 insertions(+), 9 deletions(-) commit 550b349af0f0e33fedb252aca8dc144299aca308 Author: Dan Carpenter Date: Fri Apr 14 22:11:20 2017 +0300 ASoC: Intel: Skylake: Fix a couple user after free bugs We need to use the _safe() version of list_for_each_entry() here because of the kfree(modules). Fixes: b8c722ddd548 ("ASoC: Intel: Skylake: Add support for deferred DSP module bind") Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 4 ++-- sound/soc/intel/skylake/skl-topology.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 24dbd9edb668e2376ce871199f5ee4fd59c62276 Author: Stefan Agner Date: Wed Apr 19 23:36:07 2017 -0700 ASoC: fsl_asrc_dma: use correct direction enum type The direction argument is of type enum dma_transfer_direction, and not enum dma_data_direction. The enumeration values are the same so this did not had an effect in practise. Signed-off-by: Stefan Agner Acked-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/fsl_asrc_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1b65df5a232a2bd39a9b9e48b88a2b87cddef55 Author: Noa Osherovich Date: Thu Apr 20 20:53:33 2017 +0300 IB/mlx5: Add support for active_width and active_speed in RoCE Add missing calculation and translation of active_width and active_speed for RoCE. Fixes: 3f89a643eb295 ('IB/mlx5: Extend query_device/port to ...') Signed-off-by: Noa Osherovich Signed-off-by: Eran Ben Elisha Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 72 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 5 deletions(-) commit 362c59436c143edbcdd4cc2ee0e9856eb6a93bc4 Author: Arnd Bergmann Date: Thu Apr 20 10:15:20 2017 +0200 ASoC: mediatek: add I2C dependency for CS42XX8 We should not select drivers that depend on I2C when that is disabled, as it results in a build error: warning: (SND_SOC_MT2701_WM8960) selects SND_SOC_WM8960 which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && I2C) sound/soc/codecs/wm8960.c:1469:1: error: data definition has no type or storage class [-Werror] sound/soc/codecs/wm8960.c:1469:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int] Fixes: 8625c1dbd876 ("ASoC: mediatek: Add mt2701-wm8960 machine driver") Signed-off-by: Arnd Bergmann Acked-by: Ryder Lee Signed-off-by: Mark Brown sound/soc/mediatek/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6a33532affd14c12688c0e9b2e773e8b2550f3b Author: Dan Carpenter Date: Thu Apr 20 13:17:02 2017 +0300 ASoC: Intel: Skylake: Uninitialized variable in probe_codec() My static checker complains that if snd_hdac_bus_get_response() returns -EIO then "res" is uninitialized. Fix this by initializing it to -1 so that the error is handled correctly. Fixes: d8c2dab8381d ("ASoC: Intel: Add Skylake HDA audio driver") Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50f22fd8ecf9001f2813ed0255a26e95f18bb870 Author: Noa Osherovich Date: Thu Apr 20 20:53:32 2017 +0300 IB/mlx5: Set mlx5_query_roce_port's return value to void In case of an error, the properties reported to user are zeroed out, so no need for a return value. Signed-off-by: Noa Osherovich Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit e8dffe6c2004278c588b3bb441a3dbe998a3f2e4 Author: Marek Vasut Date: Fri Apr 21 00:41:20 2017 +0000 ASoC: rsnd: Fix possible NULL pointer dereference 25165f79adc76b812bfb4d8f2ab120aafb28d0e6 ("ASoC: rsnd: enable clock-frequency for both 44.1kHz/48kHz") supports both 44.1kHz/48kHz clock-frequency settings for ADG which will be used for AUDIO_OLKOUTn. But some board doesn't need it, thus, it is not mandatory. But, above patch didn't care about the case of "clock-frequency" DT property was not present. This patch ignores ADG settings if AUDIO_OLKOUTn was not used. Signed-off-by: Marek Vasut [Kuninori: tidyup not to break non AUDIO_OLKOUTn case] Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/adg.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit ced414a14f709fc0af60bd381ba8a566dc566869 Author: Bjorn Helgaas Date: Fri Apr 21 11:42:54 2017 -0500 PCI/ACPI: Tidy up MCFG quirk whitespace With no blank lines, it's not obvious where the macro definitions end and the uses begin. Add some blank lines and reorder the ThunderX definitions. No functional change intended. Signed-off-by: Bjorn Helgaas CC: stable@vger.kernel.org # v4.10+ drivers/acpi/pci_mcfg.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 12113a35ada6bba074836d3d26671213e12069bf Author: Noa Osherovich Date: Thu Apr 20 20:53:31 2017 +0300 IB/core: Add HDR speed enum Add high data rate speed to the ib_port_speed enumeration. Signed-off-by: Noa Osherovich Signed-off-by: Eran Ben Elisha Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/sysfs.c | 4 ++++ include/rdma/ib_verbs.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 12f8fedef2ec94c783f929126b20440a01512c14 Author: Moni Shoua Date: Thu Apr 20 13:26:54 2017 +0300 IB/mlx5: Set correct SL in completion for RoCE There is a difference when parsing a completion entry between Ethernet and IB ports. When link layer is Ethernet the bits describe the type of L3 header in the packet. In the case when link layer is Ethernet and VLAN header is present the value of SL is equal to the 3 UP bits in the VLAN header. If VLAN header is not present then the SL is undefined and consumer of the completion should check if IB_WC_WITH_VLAN is set. While that, this patch also fills the vlan_id field in the completion if present. Signed-off-by: Moni Shoua Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/cq.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 61c0ddbe97721d69ace947d1afa956b7646bcdc9 Author: Moni Shoua Date: Sun Apr 16 07:31:34 2017 +0300 IB/cma: Send MRA for reply messages Current implementation of RDMA_CM sends MRA (Message Receipt Acknowledgment) only for request messages but not for response messages. As a result, a slow active side of the connection may send a ready-to-use message to the passive side in a delay that is too long for the passive side to wait for. This patch adds a call to ib_send_cm_mra() upon receiving a response message and by this tells the other side to modify the service timeout to a bigger value, 16 times than before. As in the request case, MRA for reply will be sent only if a duplicate response has arrived. Signed-off-by: Moni Shoua Reviewed-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 3 +++ 1 file changed, 3 insertions(+) commit e1f24a79f424ddb03828de7c0152668c9a30146e Author: Parav Pandit Date: Sun Apr 16 07:29:29 2017 +0300 IB/mlx5: Support congestion related counters This patch adds support to query the congestion related hardware counters through new command and links them with other hw counters being available in hw_counters sysfs location. In order to reuse existing infrastructure it renames related q_counter data structures to more generic counters to reflect q_counters and congestion counters and maybe some other counters in the future. New hardware counters: * rp_cnp_handled - CNP packets handled by the reaction point * rp_cnp_ignored - CNP packets ignored by the reaction point * np_cnp_sent - CNP packets sent by notification point to respond to CE marked RoCE packets * np_ecn_marked_roce_packets - CE marked RoCE packets received by notification point It also avoids returning ENOSYS which is specific for invalid system call and produces the following checkpatch.pl warning. WARNING: ENOSYS means 'invalid syscall nr' and nothing else + return -ENOSYS; Signed-off-by: Parav Pandit Reviewed-by: Eli Cohen Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/cmd.c | 11 +++ drivers/infiniband/hw/mlx5/cmd.h | 2 + drivers/infiniband/hw/mlx5/main.c | 172 ++++++++++++++++++++++++----------- drivers/infiniband/hw/mlx5/mlx5_ib.h | 7 +- drivers/infiniband/hw/mlx5/qp.c | 7 +- include/linux/mlx5/mlx5_ifc.h | 18 ++-- 6 files changed, 150 insertions(+), 67 deletions(-) commit a43402af1e34654ec3b693239330ff8cf6feaaae Author: Leon Romanovsky Date: Sat Apr 15 18:47:25 2017 +0300 IB/mthca: Check validity of output parameter pointer The mthca driver didn't check supplied pointer to functions mthca_cmd_poll() and mthca_cmd_wait(). This caused to the following smatch errors: drivers/infiniband/hw/mthca/mthca_cmd.c:371 mthca_cmd_poll() error: we previously assumed 'out_param' could be null (see line 353) drivers/infiniband/hw/mthca/mthca_cmd.c:454 mthca_cmd_wait() error: we previously assumed 'out_param' could be null (see line 432) In reality all callers of these functions are setting out_is_imm flag are providing pointer too. However it is better to check again to remove smatch errors to achieve warning free subsystem. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mthca/mthca_cmd.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit a22ed86cff363b2fdcdcd70e2412d8fc14ce905f Author: Slava Shwartsman Date: Mon Apr 3 13:13:52 2017 +0300 IB/mlx5: Add drop flow steering rule support A drop rule is described by an action drop and no destination. If a user specified IB_FLOW_SPEC_ACTION_DROP then set the action to MLX5_FLOW_CONTEXT_ACTION_DROP and clear the destination. Signed-off-by: Slava Shwartsman Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit 483a3966b570529a910dc2a02deac0036e642309 Author: Slava Shwartsman Date: Mon Apr 3 13:13:51 2017 +0300 IB/core: Introduce drop flow specification This flow steering specification identifies flow for drop by the HW. If user create a flow only with the drop specification, then all the packets that hit this flow will be dropped, otherwise the HW will drop only the packets that match the other L2/L3/L4 specifications. Signed-off-by: Slava Shwartsman Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs.h | 1 + drivers/infiniband/core/uverbs_cmd.c | 7 +++++++ include/rdma/ib_verbs.h | 7 +++++++ include/uapi/rdma/ib_user_verbs.h | 11 +++++++++++ 4 files changed, 26 insertions(+) commit 19cc75249adc61401aa4b21a6654e0a7f7ea8fe2 Author: Ariel Levkovich Date: Mon Apr 3 13:11:03 2017 +0300 IB/mlx5: Use IP version matching to classify IP traffic This change adds the ability for flow steering to classify IPv4/6 packets with MPLS tag (Ethertype 0x8847 and 0x8848) as standard IP packets and hit IPv4/6 classifed steering rules. When user added a flow rule with IP classification, driver was implicitly adding ethertype matching to the created rule in order to distinguish between IPv4 and IPv6 protocols. Since IP packets with MPLS tag header have MPLS ethertype, they missed the rule and ended up hitting the default filters. Such behavior prevented from MPLS packets to undergo inbound traffic load balancing flows (if such were defined by configuring RSS) to achieve higher throughput - the way that non-MPLS IP packets performed. Since our device is able to look past the MPLS tag and identify the next protocol we introduce this solution which replaces Ethertype matching by the device's capability to perform IP version parsing and matching in order to distinguish between IPv4 and IPv6. Therefore, whenever a flow with IP spec is added and device support IP version matching, driver will implicitly add IP version matching to the rule (Based on the IP spec type) without Ethertype matching which will cause relevant MPLS tagged packets to hit this rule as well. Otherwise (device doesn't support IP version matching), we fall back to setting Ethertype matching. If the user's filters specify an L2 ethertype and an IP spec the rule will then match both the ethertype and the IP version. The device's support for IP version matching is reported by the device via dedicated capability bit in query_device_cap and named outer/inner_ip_version. Signed-off-by: Ariel Levkovich Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 66 +++++++++++++++++++++++++++++---------- include/linux/mlx5/mlx5_ifc.h | 6 ++-- 2 files changed, 52 insertions(+), 20 deletions(-) commit 0f750966dca8ad3999e759e516f601d0d8acc8e1 Author: Ariel Levkovich Date: Mon Apr 3 13:11:02 2017 +0300 IB/mlx5: Add inner spec and IPv6 validation in user's flow attribute list This change fixes an incomplete validation of the user's flow attributes list. Previous implementation validated only matching of IPv4 Ethertype to IPv4 spec of outer headers (in case both Ethernet with specified Ethertype and IP specs were present) and lacked the validation of: 1. Matching of IPv6 Ethertype in Ethernet spec (if such exists) to an IPv6 protocol spec (if such exists). 2. Validation of Ethertype to IP protocol matching on inner headers specs. Which could cause some combinations of unmatching Ethernet and IP protocols to pass validation and apply on the device. The fix adds validation of IPv6 Ethertype and IP spec as well as performing the scan on both outer and inner attributes. Fixes: 038d2ef87572 ("Add flow steering support") Signed-off-by: Ariel Levkovich Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 44 ++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 10 deletions(-) commit 44f2e99ecdb76cb91293dd822fbe3952b8db5345 Author: Bodong Wang Date: Wed Mar 29 06:12:14 2017 +0300 IB/mlx5: Fix wrong use of kfree at bad flow in create_cq_user The kfree was called to free cqb, while it should free *cqb. Fixes: 1cbe6fc86ccf ("IB/mlx5: Add support for CQE compressing") Signed-off-by: Bodong Wang Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00b7c2abb6a25437be472b9402feb90ab32798ae Author: Maor Gottlieb Date: Wed Mar 29 06:09:01 2017 +0300 IB/mlx5: Enlarge autogroup flow table In order to enlarge the flow group size to 8k, we decrease the number of flow group types to 6 and increase the flow table size to 64k. Flow group size is calculated as follow: group_size = table_size / (#group_types + 1) Fixes: 038d2ef87572 ('IB/mlx5: Add flow steering support') Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dac388ef4cc7a9250e59b4093b78e33da9495c6d Author: Maor Gottlieb Date: Wed Mar 29 06:09:00 2017 +0300 IB/mlx5: Check supported flow table size Check that the required flow table size is supported by device. Return ENOMEM error if no space left. In addition change the create flow table routine to return ENOMEM instead of ENOSPC. Fixes: 038d2ef87572 ('IB/mlx5: Add flow steering support') Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 1377661298d2820d675553d186c31b6f46c140d0 Author: Maor Gottlieb Date: Wed Mar 29 06:03:03 2017 +0300 IB/mlx5: Change vma from shared to private Anonymous VMA (->vm_ops == NULL) cannot be shared, otherwise it would lead to SIGBUS. Remove the shared flags from the vma after we change it to be anonymous. This is easily reproduced by doing modprobe -r while running a user-space application such as raw_ethernet_bw. Fixes: 7c2344c3bbf97 ('IB/mlx5: Implements disassociate_ucontext API') Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 1 + 1 file changed, 1 insertion(+) commit ecc7d83be3243835c9396a1a2fb8ce95f205207b Author: Maor Gottlieb Date: Wed Mar 29 06:03:02 2017 +0300 IB/mlx5: Take write semaphore when changing the vma struct When the driver disassociate user context, it changes the vma to anonymous by setting the vm_ops to null and zap the vma ptes. In order to avoid race in the kernel, we need to take write lock before we change the vma entries. Fixes: 7c2344c3bbf97 ('IB/mlx5: Implements disassociate_ucontext API') Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ca37a664a8e4e9988b220988ceb4d79e3316f195 Author: Maor Gottlieb Date: Wed Mar 29 06:03:01 2017 +0300 IB/mlx4: Change vma from shared to private Anonymous VMA (->vm_ops == NULL) cannot be shared, otherwise it would lead to SIGBUS. Remove the shared flags from the vma after we change it to be anonymous. This is easily reproduced by doing modprobe -r while running a user-space application such as raw_ethernet_bw. Fixes: ae184ddeca5db ('IB/mlx4_ib: Disassociate support') Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 2 ++ 1 file changed, 2 insertions(+) commit 22c3653d04bd0c67b75e99d85e0c0bdf83947df5 Author: Maor Gottlieb Date: Wed Mar 29 06:03:00 2017 +0300 IB/mlx4: Take write semaphore when changing the vma struct When the driver disassociate user context, it changes the vma to anonymous by setting the vm_ops to null and zap the vma ptes. In order to avoid race in the kernel, we need to take write lock before we change the vma entries. Fixes: ae184ddeca5db ('IB/mlx4_ib: Disassociate support') Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fb7a91746af18b2ebf596778b38a709cdbc488d3 Author: Jack Morgenstein Date: Tue Mar 21 12:57:06 2017 +0200 IB/mlx4: Reduce SRIOV multicast cleanup warning message to debug level A warning message during SRIOV multicast cleanup should have actually been a debug level message. The condition generating the warning does no harm and can fill the message log. In some cases, during testing, some tests were so intense as to swamp the message log with these warning messages, causing a stall in the console message log output task. This stall caused an NMI to be sent to all CPUs (so that they all dumped their stacks into the message log). Aside from the message flood causing an NMI, the tests all passed. Once the message flood which caused the NMI is removed (by reducing the warning message to debug level), the NMI no longer occurs. Sample message log (console log) output illustrating the flood and resultant NMI (snippets with comments and modified with ... instead of hex digits, to satisfy checkpatch.pl): _mlx4_ib_mcg_port_cleanup: ... WARNING: group refcount 1!!!... *** About 4000 almost identical lines in less than one second *** _mlx4_ib_mcg_port_cleanup: ... WARNING: group refcount 1!!!... INFO: rcu_sched detected stalls on CPUs/tasks: { 17} (...) *** { 17} above indicates that CPU 17 was the one that stalled *** sending NMI to all CPUs: ... NMI backtrace for cpu 17 CPU: 17 PID: 45909 Comm: kworker/17:2 Hardware name: HP ProLiant DL360p Gen8, BIOS P71 09/08/2013 Workqueue: events fb_flashcursor task: ffff880478...... ti: ffff88064e...... task.ti: ffff88064e...... RIP: 0010:[ffffffff81......] [ffffffff81......] io_serial_in+0x15/0x20 RSP: 0018:ffff88064e257cb0 EFLAGS: 00000002 RAX: 0000000000...... RBX: ffffffff81...... RCX: 0000000000...... RDX: 0000000000...... RSI: 0000000000...... RDI: ffffffff81...... RBP: ffff88064e...... R08: ffffffff81...... R09: 0000000000...... R10: 0000000000...... R11: ffff88064e...... R12: 0000000000...... R13: 0000000000...... R14: ffffffff81...... R15: 0000000000...... FS: 0000000000......(0000) GS:ffff8804af......(0000) knlGS:000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080...... CR2: 00007f2a2f...... CR3: 0000000001...... CR4: 0000000000...... DR0: 0000000000...... DR1: 0000000000...... DR2: 0000000000...... DR3: 0000000000...... DR6: 00000000ff...... DR7: 0000000000...... Stack: ffff88064e...... ffffffff81...... ffffffff81...... 0000000000...... ffffffff81...... ffff88064e...... ffffffff81...... ffffffff81...... ffffffff81...... ffff88064e...... ffffffff81...... 0000000000...... Call Trace: [] wait_for_xmitr+0x3b/0xa0 [] serial8250_console_putchar+0x1c/0x30 [] ? serial8250_console_write+0x140/0x140 [] uart_console_write+0x3a/0x80 [] serial8250_console_write+0xae/0x140 [] call_console_drivers.constprop.15+0x91/0xf0 [] console_unlock+0x3bf/0x400 [] fb_flashcursor+0x5d/0x140 [] ? bit_clear+0x120/0x120 [] process_one_work+0x17b/0x470 [] worker_thread+0x11b/0x400 [] ? rescuer_thread+0x400/0x400 [] kthread+0xcf/0xe0 [] ? kthread_create_on_node+0x140/0x140 [] ret_from_fork+0x58/0x90 [] ? kthread_create_on_node+0x140/0x140 Code: 48 89 e5 d3 e6 48 63 f6 48 03 77 10 8b 06 5d c3 66 0f 1f 44 00 00 66 66 66 6 As indicated in the stack trace above, the console output task got swamped. Fixes: b9c5d6a64358 ("IB/mlx4: Add multicast group (MCG) paravirtualization for SR-IOV") Cc: # v3.6+ Signed-off-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/mcg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 99e68909d5aba1861897fe7afc3306c3c81b6de0 Author: Jack Morgenstein Date: Tue Mar 21 12:57:05 2017 +0200 IB/mlx4: Fix ib device initialization error flow In mlx4_ib_add, procedure mlx4_ib_alloc_eqs is called to allocate EQs. However, in the mlx4_ib_add error flow, procedure mlx4_ib_free_eqs is not called to free the allocated EQs. Fixes: e605b743f33d ("IB/mlx4: Increase the number of vectors (EQs) available for ULPs") Cc: # v3.4+ Signed-off-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 1 + 1 file changed, 1 insertion(+) commit dd77abf8a03a1ebd4dd3ddebecce312dcb0d1af1 Author: Majd Dibbiny Date: Sun Mar 19 11:01:28 2017 +0200 IB/mlx4: Support RAW Ethernet when RoCE is disabled On some environments, such as certain SR-IOV VF configurations, RoCE isn't supported for mlx4 Ethernet ports. Currently the driver will not open IB device on that port. This is problematic since we do want user-space RAW Ethernet QPs functionality to remain in place. For that end, enhance the relevant driver flows such that we do create a device instance in that case. Signed-off-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 26 +++++++++++--------------- include/linux/mlx4/device.h | 3 +-- 2 files changed, 12 insertions(+), 17 deletions(-) commit b312be3d87e4c80872cbea869e569175c5eb0f9a Author: Jack Morgenstein Date: Sun Mar 19 10:55:57 2017 +0200 IB/core: Fix sysfs registration error flow The kernel commit cited below restructured ib device management so that the device kobject is initialized in ib_alloc_device. As part of the restructuring, the kobject is now initialized in procedure ib_alloc_device, and is later added to the device hierarchy in the ib_register_device call stack, in procedure ib_device_register_sysfs (which calls device_add). However, in the ib_device_register_sysfs error flow, if an error occurs following the call to device_add, the cleanup procedure device_unregister is called. This call results in the device object being deleted -- which results in various use-after-free crashes. The correct cleanup call is device_del -- which undoes device_add without deleting the device object. The device object will then (correctly) be deleted in the ib_register_device caller's error cleanup flow, when the caller invokes ib_dealloc_device. Fixes: 55aeed06544f6 ("IB/core: Make ib_alloc_device init the kobject") Cc: # v4.2+ Signed-off-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4be3a4fa51f432ef045546d16f25c68a1ab525b9 Author: Parav Pandit Date: Sun Mar 19 10:55:55 2017 +0200 IB/core: Fix kernel crash during fail to initialize device This patch fixes the kernel crash that occurs during ib_dealloc_device() called due to provider driver fails with an error after ib_alloc_device() and before it can register using ib_register_device(). This crashed seen in tha lab as below which can occur with any IB device which fails to perform its device initialization before invoking ib_register_device(). This patch avoids touching cache and port immutable structures if device is not yet initialized. It also releases related memory when cache and port immutable data structure initialization fails during register_device() state. [81416.561946] BUG: unable to handle kernel NULL pointer dereference at (null) [81416.570340] IP: ib_cache_release_one+0x29/0x80 [ib_core] [81416.576222] PGD 78da66067 [81416.576223] PUD 7f2d7c067 [81416.579484] PMD 0 [81416.582720] [81416.587242] Oops: 0000 [#1] SMP [81416.722395] task: ffff8807887515c0 task.stack: ffffc900062c0000 [81416.729148] RIP: 0010:ib_cache_release_one+0x29/0x80 [ib_core] [81416.735793] RSP: 0018:ffffc900062c3a90 EFLAGS: 00010202 [81416.741823] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000 [81416.749785] RDX: 0000000000000000 RSI: 0000000000000282 RDI: ffff880859fec000 [81416.757757] RBP: ffffc900062c3aa0 R08: ffff8808536e5ac0 R09: ffff880859fec5b0 [81416.765708] R10: 00000000536e5c01 R11: ffff8808536e5ac0 R12: ffff880859fec000 [81416.773672] R13: 0000000000000000 R14: ffff8808536e5ac0 R15: ffff88084ebc0060 [81416.781621] FS: 00007fd879fab740(0000) GS:ffff88085fac0000(0000) knlGS:0000000000000000 [81416.790522] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [81416.797094] CR2: 0000000000000000 CR3: 00000007eb215000 CR4: 00000000003406e0 [81416.805051] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [81416.812997] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [81416.820950] Call Trace: [81416.824226] ib_device_release+0x1e/0x40 [ib_core] [81416.829858] device_release+0x32/0xa0 [81416.834370] kobject_cleanup+0x63/0x170 [81416.839058] kobject_put+0x25/0x50 [81416.843319] ib_dealloc_device+0x25/0x40 [ib_core] [81416.848986] mlx5_ib_add+0x163/0x1990 [mlx5_ib] [81416.854414] mlx5_add_device+0x5a/0x160 [mlx5_core] [81416.860191] mlx5_register_interface+0x8d/0xc0 [mlx5_core] [81416.866587] ? 0xffffffffa09e9000 [81416.870816] mlx5_ib_init+0x15/0x17 [mlx5_ib] [81416.876094] do_one_initcall+0x51/0x1b0 [81416.880861] ? __vunmap+0x85/0xd0 [81416.885113] ? kmem_cache_alloc_trace+0x14b/0x1b0 [81416.890768] ? vfree+0x2e/0x70 [81416.894762] do_init_module+0x60/0x1fa [81416.899441] load_module+0x15f6/0x1af0 [81416.904114] ? __symbol_put+0x60/0x60 [81416.908709] ? ima_post_read_file+0x3d/0x80 [81416.913828] ? security_kernel_post_read_file+0x6b/0x80 [81416.920006] SYSC_finit_module+0xa6/0xf0 [81416.924888] SyS_finit_module+0xe/0x10 [81416.929568] entry_SYSCALL_64_fastpath+0x1a/0xa9 [81416.935089] RIP: 0033:0x7fd879494949 [81416.939543] RSP: 002b:00007ffdbc1b4e58 EFLAGS: 00000202 ORIG_RAX: 0000000000000139 [81416.947982] RAX: ffffffffffffffda RBX: 0000000001b66f00 RCX: 00007fd879494949 [81416.955965] RDX: 0000000000000000 RSI: 000000000041a13c RDI: 0000000000000003 [81416.963926] RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000001b652a0 [81416.971861] R10: 0000000000000003 R11: 0000000000000202 R12: 00007ffdbc1b3e70 [81416.979763] R13: 00007ffdbc1b3e50 R14: 0000000000000005 R15: 0000000000000000 [81417.008005] RIP: ib_cache_release_one+0x29/0x80 [ib_core] RSP: ffffc900062c3a90 [81417.016045] CR2: 0000000000000000 Fixes: 55aeed0654 ("IB/core: Make ib_alloc_device init the kobject") Fixes: 7738613e7c ("IB/core: Add per port immutable struct to ib_device") Cc: # v4.2+ Reviewed-by: Daniel Jurgens Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/device.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit 7a9d2001a16f11d30a1e128a067cf1aef2a99a70 Author: Øyvind A. Holm Date: Mon Apr 3 22:06:24 2017 +0200 drm/vmwgfx: Convert macro to octal representation Change "S_IRUSR | S_IWUSR" to "0600", it's easier to parse mentally. This change should be part of commit 50f837371dd9 ("drm/vmwgfx: Revert "drm/vmwgfx: Replace numeric parameter like 0444 with macro""), but the patch was truncated somewhere in the patch route, so add the missing change. Extract from the original commit message: commit 50f837371dd9aea5470c06d5d10bc9ca3e8155b6 Author: Øyvind A. Holm Date: Thu Mar 23 14:54:48 2017 -0700 drm/vmwgfx: Revert "drm/vmwgfx: Replace numeric parameter like 0444 with macro" This reverts commit 2d8e60e8b074 ("drm/vmwgfx: Replace numeric parameter like 0444 with macro") The commit belongs to the series of 1285 patches sent to LKML on 2016-08-02, it changes the representation of file permissions from the octal value "0600" to "S_IRUSR | S_IWUSR". The general consensus was that the changes does not increase readability, quite the opposite; 0600 is easier to parse mentally than S_IRUSR | S_IWUSR. Signed-off-by: Øyvind A. Holm Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 889ef45cd4b64cc4fd6dbebecddb8ea4df8cc1e7 Author: Jan Glauber Date: Fri Apr 21 16:43:55 2017 +0200 i2c: thunderx: Enable HWMON class probing Set I2C_CLASS_HWMON to enable automatic probing of BMC devices by the ipmi-ssif driver. Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-thunderx-pcidrv.c | 1 + 1 file changed, 1 insertion(+) commit b0308c5419607c77e5be3c9d388b120ed471037b Author: Brian Norris Date: Thu Mar 9 18:46:17 2017 -0800 PCI: rockchip: Modularize Now that we've exported pci_remap_iospace() and added proper remove() support, there's no reason this can't be a loadable module. Signed-off-by: Brian Norris Signed-off-by: Bjorn Helgaas Acked-by: Shawn Lin drivers/pci/host/Kconfig | 2 +- drivers/pci/host/pcie-rockchip.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) commit 3026050179a3a9a6f5c892c414b5e36ecf092081 Author: Dan Carpenter Date: Fri Apr 21 13:39:09 2017 +0300 HSI: ssi_protocol: double free in ssip_pn_xmit() If skb_pad() fails then it frees skb and we don't need to free it again at the end of the function. Fixes: dc7bf5d7 ("HSI: Introduce driver for SSI Protocol") Signed-off-by: Dan Carpenter Signed-off-by: Sebastian Reichel drivers/hsi/clients/ssi_protocol.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f90b0875463e450c5dcb714fb887720ecb53a600 Author: Brian Norris Date: Thu Mar 9 18:46:16 2017 -0800 PCI: Export pci_remap_iospace() and pci_unmap_iospace() These are useful for PCIe host drivers, and those drivers can be modules. [bhelgaas: don't remove __weak; it's removed elsewhere] Signed-off-by: Brian Norris Signed-off-by: Bjorn Helgaas Acked-by: Shawn Lin drivers/pci/pci.c | 2 ++ 1 file changed, 2 insertions(+) commit 073d3dbe9a7c38888d8dafe09df421b174a6cffa Author: Brian Norris Date: Thu Mar 9 18:46:15 2017 -0800 PCI: rockchip: Add remove() support Currently, if we try to unbind the platform device, the remove will succeed, but the removal won't undo most of the registration, leaving partially-configured PCI devices in the system. This allows, for example, a simple 'lspci' to crash the system, as it will try to touch the freed (via devm_*) driver structures, e.g., on RK3399: # echo f8000000.pcie > /sys/bus/platform/drivers/rockchip-pcie/unbind # lspci So let's implement device remove(). Signed-off-by: Brian Norris Signed-off-by: Bjorn Helgaas Acked-by: Shawn Lin drivers/pci/host/pcie-rockchip.c | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) commit 3e31a490e01a6e67cbe9f6e1df2f3ff0fbf48972 Author: Feras Daoud Date: Sun Mar 19 11:18:55 2017 +0200 IB/ipoib: Fix deadlock between ipoib_stop and mcast join flow Before calling ipoib_stop, rtnl_lock should be taken, then the flow clears the IPOIB_FLAG_ADMIN_UP and IPOIB_FLAG_OPER_UP flags, and waits for mcast completion if IPOIB_MCAST_FLAG_BUSY is set. On the other hand, the flow of multicast join task initializes a mcast completion, sets the IPOIB_MCAST_FLAG_BUSY and calls ipoib_mcast_join. If IPOIB_FLAG_OPER_UP flag is not set, this call returns EINVAL without setting the mcast completion and leads to a deadlock. ipoib_stop | | | clear_bit(IPOIB_FLAG_ADMIN_UP) | | | Context Switch | | ipoib_mcast_join_task | | | spin_lock_irq(lock) | | | init_completion(mcast) | | | set_bit(IPOIB_MCAST_FLAG_BUSY) | | | Context Switch | | clear_bit(IPOIB_FLAG_OPER_UP) | | | spin_lock_irqsave(lock) | | | Context Switch | | ipoib_mcast_join | return (-EINVAL) | | | spin_unlock_irq(lock) | | | Context Switch | | ipoib_mcast_dev_flush | wait_for_completion(mcast) | ipoib_stop will wait for mcast completion for ever, and will not release the rtnl_lock. As a result panic occurs with the following trace: [13441.639268] Call Trace: [13441.640150] [] schedule+0x29/0x70 [13441.641038] [] schedule_timeout+0x239/0x2d0 [13441.641914] [] ? complete+0x47/0x50 [13441.642765] [] ? flush_workqueue_prep_pwqs+0x16d/0x200 [13441.643580] [] wait_for_completion+0x116/0x170 [13441.644434] [] ? wake_up_state+0x20/0x20 [13441.645293] [] ipoib_mcast_dev_flush+0x150/0x190 [ib_ipoib] [13441.646159] [] ipoib_ib_dev_down+0x37/0x60 [ib_ipoib] [13441.647013] [] ipoib_stop+0x75/0x150 [ib_ipoib] Fixes: 08bc327629cb ("IB/ipoib: fix for rare multicast join race condition") Signed-off-by: Feras Daoud Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 9a9b8112699d78e7f317019b37f377e90023f3ed Author: Feras Daoud Date: Sun Mar 19 11:18:54 2017 +0200 IB/ipoib: Update broadcast object if PKey value was changed in index 0 Update the broadcast address in the priv->broadcast object when the Pkey value changes in index 0, otherwise the multicast GID value will keep the previous value of the PKey, and will not be updated. This leads to interface state down because the interface will keep the old PKey value. For example, in SR-IOV environment, if the PF changes the value of PKey index 0 for one of the VFs, then the VF receives PKey change event that triggers heavy flush. This flush calls update_parent_pkey that update the broadcast object and its relevant members. If in this case the multicast GID will not be updated, the interface state will be down. Fixes: c2904141696e ("IPoIB: Fix pkey change flow for virtualization environments") Signed-off-by: Feras Daoud Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_ib.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 75f9e4adb56fbb8ffaab7d316f0c02df00e4b755 Author: kbuild test robot Date: Fri Apr 21 13:02:57 2017 +0800 ASoC: rsnd: fix semicolon.cocci warnings sound/soc/sh/rcar/adg.c:462:54-55: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Fengguang Wu Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/adg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e69c2eceb7c71327086c6f48db42a0ba2378cbb Author: Dong Aisheng Date: Fri Apr 21 10:53:52 2017 +0800 regulator: anatop: make regulator name property required We actually can't allow the missing of the regualor name, thus update the binding doc to make regulator-name property to be required. Acked-by: Rob Herring Signed-off-by: Dong Aisheng Signed-off-by: Mark Brown Documentation/devicetree/bindings/regulator/anatop-regulator.txt | 1 + 1 file changed, 1 insertion(+) commit 3bbb5b8234161db431992e5d1f8b7cb88ad9dec3 Author: Christophe Leroy Date: Fri Apr 21 16:56:10 2017 +0200 video: console: Remove reference to CONFIG_8xx CONFIG_8xx is deprecated and should soon be removed in favor of CONFIG_PPC_8xx. Signed-off-by: Christophe Leroy Cc: "David S. Miller" Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/console/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e9caa2a3b56ccf62cc5bc29e480652bddec6a80 Author: Martin Kaiser Date: Fri Apr 21 16:47:11 2017 +0200 dt-bindings: display: imx: entry for AUS mode Allow setting AUS mode for a display from the device tree. Use an optional boolean property. AUS mode can be set only on imx21 and compatible chipsets. Signed-off-by: Martin Kaiser Acked-by: Rob Herring Cc: Sascha Hauer Cc: Mark Rutland Signed-off-by: Bartlomiej Zolnierkiewicz Documentation/devicetree/bindings/display/imx/fsl,imx-fb.txt | 2 ++ 1 file changed, 2 insertions(+) commit b62ea4112ce3746664dcc2f232d03461f0e6f3c7 Author: Martin Kaiser Date: Fri Apr 21 16:47:11 2017 +0200 video: fbdev: imxfb: support AUS mode Some displays require setting AUS mode in the LDCD AUS Mode Control Register to work with the imxfb driver. Like the value of the Panel Configuration Register, the AUS mode setting depends on the display mode. Allow setting AUS mode from the device tree by adding a boolean property. Make this property optional to keep the DT ABI stable. AUS mode can be set only on imx21 and compatible chipsets. Signed-off-by: Martin Kaiser Cc: Sascha Hauer Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/imxfb.c | 17 +++++++++++++++++ include/linux/platform_data/video-imxfb.h | 1 + 2 files changed, 18 insertions(+) commit 95c55ff425faa190fd8ba55090fbdf33d8b2f0ae Author: Jens Axboe Date: Fri Apr 21 08:46:44 2017 -0600 mtip32xx: fix dereference of stack garbage We need to get the command payload from the request before we attempt to dereference it. Fixes: 4dda4735c581 ("mtip32xx: add a status field to struct mtip_cmd") Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 1 + 1 file changed, 1 insertion(+) commit 4ed6ad1eb30e20baf819ae4090b7978519beb3a9 Author: yonatanc Date: Thu Apr 20 20:55:56 2017 +0300 IB/rxe: Cache dst in QP instead of getting it for each send In RC QP there is no need to resolve the outgoing interface for each packet, as this does not change during QP life cycle. Instead cache the interface on the socket and use that one. This improves performance by 12% by sparing redundant calls to rxe_find_route. ib_send_bw -d rxe0 -x 1 -n 9000 -e -s $((1024 * 1024 )) -l 100 ---------------------------------------------------------------------------------------- | | bytes | iterations | BW peak[MB/sec] | BW average[MB/sec] | MsgRate[Mpps] | ---------------------------------------------------------------------------------------- | before | 1048576 | 9000 | inf | 551.21 | 0.000551 | | after | 1048576 | 9000 | inf | 615.54 | 0.000616 | ---------------------------------------------------------------------------------------- Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Yonatan Cohen Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_net.c | 55 ++++++++++++++++++++++++++++++++++--- drivers/infiniband/sw/rxe/rxe_qp.c | 8 ++++++ 2 files changed, 59 insertions(+), 4 deletions(-) commit cee2688e3cd60e0d1ab2f049e31cf11fa3f62540 Author: yonatanc Date: Thu Apr 20 20:55:55 2017 +0300 IB/rxe: Offload CRC calculation when possible Use CPU ability to perform CRC calculations, by replacing direct calls to crc32_le() with crypto_shash_updata(). The overall performance gain measured with ib_send_bw tool is 10% and it was tested on "Intel CPU ES-2660 v2 @ 2.20Ghz" CPU. ib_send_bw -d rxe0 -x 1 -n 9000 -e -s $((1024 * 1024 )) -l 100 --------------------------------------------------------------------------------------------- | | bytes | iterations | BW peak[MB/sec] | BW average[MB/sec] | MsgRate[Mpps] | --------------------------------------------------------------------------------------------- | crc32_le | 1048576 | 9000 | inf | 497.60 | 0.000498 | | CRC offload | 1048576 | 9000 | inf | 546.70 | 0.000547 | --------------------------------------------------------------------------------------------- Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Yonatan Cohen Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/Kconfig | 1 + drivers/infiniband/sw/rxe/rxe.c | 2 ++ drivers/infiniband/sw/rxe/rxe.h | 20 ++++++++++++++++++++ drivers/infiniband/sw/rxe/rxe_icrc.c | 6 +++--- drivers/infiniband/sw/rxe/rxe_mr.c | 6 ++++-- drivers/infiniband/sw/rxe/rxe_recv.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_req.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_verbs.c | 9 +++++++++ drivers/infiniband/sw/rxe/rxe_verbs.h | 1 + 9 files changed, 44 insertions(+), 9 deletions(-) commit f30cb757f680f965ba8a2e53cb3588052a01aeb5 Author: Benjamin Coddington Date: Tue Apr 11 12:50:12 2017 -0400 NFS: Always wait for I/O completion before unlock NFS attempts to wait for read and write completion before unlocking in order to ensure that the data returned was protected by the lock. When this waiting is interrupted by a signal, the unlock may be skipped, and messages similar to the following are seen in the kernel ring buffer: [20.167876] Leaked locks on dev=0x0:0x2b ino=0x8dd4c3: [20.168286] POSIX: fl_owner=ffff880078b06940 fl_flags=0x1 fl_type=0x0 fl_pid=20183 [20.168727] POSIX: fl_owner=ffff880078b06680 fl_flags=0x1 fl_type=0x0 fl_pid=20185 For NFSv3, the missing unlock will cause the server to refuse conflicting locks indefinitely. For NFSv4, the leftover lock will be removed by the server after the lease timeout. This patch fixes this issue by skipping the usual wait in nfs_iocounter_wait if the FL_CLOSE flag is set when signaled. Instead, the wait happens in the unlock RPC task on the NFS UOC rpc_waitqueue. For NFSv3, use lockd's new nlmclnt_operations along with nfs_async_iocounter_wait to defer NLM's unlock task until the lock context's iocounter reaches zero. For NFSv4, call nfs_async_iocounter_wait() directly from unlock's current rpc_call_prepare. Signed-off-by: Benjamin Coddington Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust fs/nfs/file.c | 10 +++++----- fs/nfs/nfs3proc.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- fs/nfs/nfs4proc.c | 9 +++++++++ 3 files changed, 67 insertions(+), 6 deletions(-) commit b1ece737f44f91dca8f4829cf0b442e752e406db Author: Benjamin Coddington Date: Tue Apr 11 12:50:11 2017 -0400 lockd: Introduce nlmclnt_operations NFS would enjoy the ability to modify the behavior of the NLM client's unlock RPC task in order to delay the transmission of the unlock until IO that was submitted under that lock has completed. This ability can ensure that the NLM client will always complete the transmission of an unlock even if the waiting caller has been interrupted with fatal signal. For this purpose, a pointer to a struct nlmclnt_operations can be assigned in a nfs_module's nfs_rpc_ops that will install those nlmclnt_operations on the nlm_host. The struct nlmclnt_operations defines three callback operations that will be used in a following patch: nlmclnt_alloc_call - used to call back after a successful allocation of a struct nlm_rqst in nlmclnt_proc(). nlmclnt_unlock_prepare - used to call back during NLM unlock's rpc_call_prepare. The NLM client defers calling rpc_call_start() until this callback returns false. nlmclnt_release_call - used to call back when the NLM client's struct nlm_rqst is freed. Signed-off-by: Benjamin Coddington Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust fs/lockd/clntlock.c | 1 + fs/lockd/clntproc.c | 26 +++++++++++++++++++++++++- fs/nfs/client.c | 1 + fs/nfs/nfs3proc.c | 2 +- fs/nfs/proc.c | 2 +- include/linux/lockd/bind.h | 24 ++++++++++++++++++++++-- include/linux/lockd/lockd.h | 2 ++ include/linux/nfs_xdr.h | 1 + 8 files changed, 54 insertions(+), 5 deletions(-) commit 7d6ddf88c4db372689c8aa65ea652d0514d66c06 Author: Benjamin Coddington Date: Tue Apr 11 12:50:10 2017 -0400 NFS: Add an iocounter wait function for async RPC tasks By sleeping on a new NFS Unlock-On-Close waitqueue, rpc tasks may wait for a lock context's iocounter to reach zero. The rpc waitqueue is only woken when the open_context has the NFS_CONTEXT_UNLOCK flag set in order to mitigate spurious wake-ups for any iocounter reaching zero. Signed-off-by: Benjamin Coddington Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust fs/nfs/client.c | 1 + fs/nfs/pagelist.c | 34 +++++++++++++++++++++++++++++++++- include/linux/nfs_fs.h | 1 + include/linux/nfs_fs_sb.h | 1 + include/linux/nfs_page.h | 1 + 5 files changed, 37 insertions(+), 1 deletion(-) commit 50f2112cf7a3e62a8d33838eb205d5fef306457a Author: Benjamin Coddington Date: Tue Apr 11 12:50:09 2017 -0400 locks: Set FL_CLOSE when removing flock locks on close() Set FL_CLOSE in fl_flags as in locks_remove_posix() when clearing locks. NFS will check for this flag to ensure an unlock is sent in a following patch. Fuse handles flock and posix locks differently for FL_CLOSE, and so requires a fixup to retain the existing behavior for flock. Signed-off-by: Benjamin Coddington Reviewed-by: Jeff Layton Acked-by: Miklos Szeredi Signed-off-by: Trond Myklebust fs/fuse/file.c | 2 +- fs/locks.c | 2 +- include/linux/fs.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) commit e12937279c8b07798651de7f5c8c52974c699931 Author: Benjamin Coddington Date: Tue Apr 11 12:50:08 2017 -0400 NFS: Move the flock open mode check into nfs_flock() We only need to check lock exclusive/shared types against open mode when flock() is used on NFS, so move it into the flock-specific path instead of checking it for all locks. Signed-off-by: Benjamin Coddington Reviewed-by: Christoph Hellwig Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust fs/nfs/file.c | 18 ++++++++++++++++-- fs/nfs/nfs4proc.c | 14 -------------- 2 files changed, 16 insertions(+), 16 deletions(-) commit 12a16d15b67c66fc0a8274d094a270e4fbaed3eb Author: Benjamin Coddington Date: Tue Apr 11 12:50:07 2017 -0400 NFS4: remove a redundant lock range check flock64_to_posix_lock() is already doing this check Signed-off-by: Benjamin Coddington Reviewed-by: Jeff Layton Reviewed-by: Christoph Hellwig Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 3 --- 1 file changed, 3 deletions(-) commit 0d38ac8a8be1c8f65a63187b60ea92dbd938c332 Author: Parav Pandit Date: Sun Mar 19 11:20:57 2017 +0200 IB/rxe: Do not export module's private function Function rxe_rcv is used internally in RXE and don't need to be exported. This patch removes such export declaration. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_recv.c | 1 - 1 file changed, 1 deletion(-) commit 99fc12f60edb9cace424a4021720fa50013c0c56 Author: Parav Pandit Date: Sun Mar 19 11:20:56 2017 +0200 IB/rxe: Avoid accessing timers for non RC QPs This patch avoids RNR NAK timer and retransmit timer initialization and cleanup for non RC QPs (such as UD QP, GSI QP). Reviewed-by: Moni Shoua Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_qp.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 0b1e5b99a48b5b810e3e38f1d6e0d39306b99ec0 Author: Yonatan Cohen Date: Fri Mar 10 18:23:56 2017 +0200 IB/rxe: Add port protocol stats Expose new counters using the get_hw_stats callback. We expose the following counters: +---------------------+----------------------------------------+ | Name | Description | |---------------------+----------------------------------------| |sent_pkts | number of sent pkts | |---------------------+----------------------------------------| |rcvd_pkts | number of received packets | |---------------------+----------------------------------------| |out_of_sequence | number of errors due to packet | | | transport sequence number | |---------------------+----------------------------------------| |duplicate_request | number of received duplicated packets. | | | A request that previously executed is | | | named duplicated. | |---------------------+----------------------------------------| |rcvd_rnr_err | number of received RNR by completer | |---------------------+----------------------------------------| |send_rnr_err | number of sent RNR by responder | |---------------------+----------------------------------------| |rcvd_seq_err | number of out of sequence packets | | | received | |---------------------+----------------------------------------| |ack_deffered | number of deferred handling of ack | | | packets. | |---------------------+----------------------------------------| |retry_exceeded_err | number of times retry exceeded | |---------------------+----------------------------------------| |completer_retry_err | number of times completer decided to | | | retry | |---------------------+----------------------------------------| |send_err | number of failed send packet | +---------------------+----------------------------------------+ Signed-off-by: Yonatan Cohen Reviewed-by: Moni Shoua Reviewed-by: Andrew Boyer Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/Makefile | 3 +- drivers/infiniband/sw/rxe/rxe_comp.c | 14 +++++- drivers/infiniband/sw/rxe/rxe_hw_counters.c | 78 +++++++++++++++++++++++++++++ drivers/infiniband/sw/rxe/rxe_hw_counters.h | 61 ++++++++++++++++++++++ drivers/infiniband/sw/rxe/rxe_loc.h | 2 + drivers/infiniband/sw/rxe/rxe_recv.c | 2 + drivers/infiniband/sw/rxe/rxe_resp.c | 5 ++ drivers/infiniband/sw/rxe/rxe_verbs.c | 3 ++ drivers/infiniband/sw/rxe/rxe_verbs.h | 8 +++ 9 files changed, 174 insertions(+), 2 deletions(-) commit e02ab0230489461fd9fdd8028841dae6f03a4874 Author: Junxiong Guan Date: Fri Apr 21 12:59:07 2017 +0200 nvme: let dm-mpath distinguish nvme error codes Currently most IOs which return the nvme error codes are retried on the other path if those IOs returns EIO from NVMe driver. This patch let Multipath distinguish nvme media error codes and some generic or cmd-specific nvme error codes so that multipath will not retry those kinds of IO, to save bandwidth. Signed-off-by: Junxiong Guan Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 7776db1ccc123d5944a8c170c9c45f7e91d49643 Author: Keith Busch Date: Fri Feb 24 17:59:28 2017 -0500 nvme/pci: Poll CQ on timeout If an IO timeout occurs, it's helpful to know if the controller did not post a completion or the driver missed an interrupt. While we never expect the latter, this patch will make it possible to tell the difference so we don't have to guess. Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig Tested-by: Johannes Thumshirn Reviewed-by: Johannes Thumshirn drivers/nvme/host/pci.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 4363135761e085fbb5ddb16dfbd4322a4d2e5037 Author: James Smart Date: Wed Apr 12 15:15:18 2017 -0700 nvmet_fc: Change traddr field separator to a colon The FC-NVME spec revised syntax to avoid comma separators. Sync with the change in the parser for traddr on port attachments. Signed-off-by: James Smart Signed-off-by: Sagi Grimberg drivers/nvme/target/fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d64daf7dcd851b249717ac88e2d4989f9ad2467 Author: James Smart Date: Tue Apr 11 11:35:09 2017 -0700 nvme_fc: Add ls aborts on remote port teardown remoteport teardown never aborted the LS opertions. Add support. Signed-off-by: James Smart Signed-off-by: Sagi Grimberg drivers/nvme/host/fc.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit c913a8b0d4c564e62c2a767d089378a3d2ffa00c Author: James Smart Date: Tue Apr 11 11:35:08 2017 -0700 nvme_fc: Move LS's to rport Link LS's on the remoteport rather than the controller. LS's are between nport's. Makes more sense, especially on async teardown where the controller is torn down regardless of the LS (LS is more of a notifier to the target of the teardown), to have them on the remoteport. While revising ls send/done routines, issues were seen relative to refcounting and cleanup, especially in async path. Reworked these code paths. Signed-off-by: James Smart Signed-off-by: Sagi Grimberg drivers/nvme/host/fc.c | 119 +++++++++++++++++++++++++++---------------------- 1 file changed, 65 insertions(+), 54 deletions(-) commit 568ad51e5d32c7f0a8e3138bc9df2badfcce0304 Author: James Smart Date: Tue Apr 11 11:32:32 2017 -0700 nvmet_fc: add missing reference in add_port Add missing reference in add_port Signed-off-by: James Smart Signed-off-by: Sagi Grimberg drivers/nvme/target/fc.c | 1 + 1 file changed, 1 insertion(+) commit a97ec51b37efacb84f286979876675a8143035b0 Author: James Smart Date: Tue Apr 11 11:32:31 2017 -0700 nvmet_fc: Rework target side abort handling target transport: ---------------------- There are cases when there is a need to abort in-progress target operations (writedata) so that controller termination or errors can clean up. That can't happen currently as the abort is another target op type, so it can't be used till the running one finishes (and it may not). Solve by removing the abort op type and creating a separate downcall from the transport to the lldd to request an io to be aborted. The transport will abort ios on queue teardown or io errors. In general the transport tries to call the lldd abort only when the io state is idle. Meaning: ops that transmit data (readdata or rsp) will always finish their transmit (or the lldd will see a state on the link or initiator port that fails the transmit) and the done call for the operation will occur. The transport will wait for the op done upcall before calling the abort function, and as the io is idle, the io can be cleaned up immediately after the abort call; Similarly, ios that are not waiting for data or transmitting data must be in the nvmet layer being processed. The transport will wait for the nvmet layer completion before calling the abort function, and as the io is idle, the io can be cleaned up immediately after the abort call; As for ops that are waiting for data (writedata), they may be outstanding indefinitely if the lldd doesn't see a condition where the initiatior port or link is bad. In those cases, the transport will call the abort function and wait for the lldd's op done upcall for the operation, where it will then clean up the io. Additionally, if a lldd receives an ABTS and matches it to an outstanding request in the transport, A new new transport upcall was created to abort the outstanding request in the transport. The transport expects any outstanding op call (readdata or writedata) will completed by the lldd and the operation upcall made. The transport doesn't act on the reported abort (e.g. clean up the io) until an op done upcall occurs, a new op is attempted, or the nvmet layer completes the io processing. fcloop: ---------------------- Updated to support the new target apis. On fcp io aborts from the initiator, the loopback context is updated to NULL out the half that has completed. The initiator side is immediately called after the abort request with an io completion (abort status). On fcp io aborts from the target, the io is stopped and the initiator side sees it as an aborted io. Target side ops, perhaps in progress while the initiator side is done, continue but noop the data movement as there's no structure on the initiator side to reference. patch also contains: ---------------------- Revised lpfc to support the new abort api commonized rsp buffer syncing and nulling of private data based on calling paths. errors in op done calls don't take action on the fod. They're bad operations which implies the fod may be bad. Signed-off-by: James Smart Signed-off-by: Sagi Grimberg drivers/nvme/target/fc.c | 205 ++++++++++++++++++++++++++++++----------- drivers/nvme/target/fcloop.c | 152 +++++++++++++++++++++++++----- drivers/scsi/lpfc/lpfc_nvmet.c | 49 +++++----- include/linux/nvme-fc-driver.h | 25 +++-- 4 files changed, 325 insertions(+), 106 deletions(-) commit ce79bfc2c7b415f0f296adc59a54c9c781d63617 Author: James Smart Date: Tue Apr 11 11:32:30 2017 -0700 nvme_fcloop: split job struct from transport for req_release Current design has the fcloop job struct, used for both initiator and target processing, allocated as part of the initiator request structure. On aborts, the initiator side (based on the request) may terminate, yet the target side wants to continue processing. the target side can't do that if the initiator side goes away. Revise fcloop to allocate an independent target side structure when it starts an io from the initiator. Added a lock to the request struct as well to synchronize pointer updates on abort calls. Modified target downcalls to recognize conditions where initiator has aborted the io (thus nulled the pointer between job structs), thus avoid referencing sgl lists which are gone and no longer making upcalls to the initiator. In conditions where the targetport is no longer connected, have the initiator return an access failure rather than simulating a command completion. Signed-off-by: James Smart Signed-off-by: Sagi Grimberg drivers/nvme/target/fcloop.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 19b58d9473e8e3d38e7f3602a07c8febfbd07bc1 Author: James Smart Date: Tue Apr 11 11:32:29 2017 -0700 nvmet_fc: add req_release to lldd api With the advent of the opdone calls changing context, the lldd can no longer assume that once the op->done call returns for RSP operations that the request struct is no longer being accessed. As such, revise the lldd api for a req_release callback that the transport will call when the job is complete. This will also be used with abort cases. Fixed text in api header for change in io complete semantics. Revised lpfc to support the new req_release api. Signed-off-by: James Smart Signed-off-by: Sagi Grimberg drivers/nvme/target/fc.c | 8 +++-- drivers/nvme/target/fcloop.c | 15 ++++++--- drivers/scsi/lpfc/lpfc_nvmet.c | 73 +++++++++++++++++++++++++++++++++++++++--- drivers/scsi/lpfc/lpfc_nvmet.h | 7 ++-- include/linux/nvme-fc-driver.h | 57 ++++++++++++++++++++------------- 5 files changed, 124 insertions(+), 36 deletions(-) commit 39498faef7c02f9f6de4060ccdc7e8975a6e690b Author: James Smart Date: Tue Apr 11 11:32:28 2017 -0700 nvmet_fc: add target feature flags for upcall isr contexts Two new feature flags were added to control whether upcalls to the transport result in context switches or stay in the calling context. NVMET_FCTGTFEAT_CMD_IN_ISR: By default, if the flag is not set, the transport assumes the lldd is in a non-isr context and in the cpu context it should be for the io queue. As such, the cmd handler is called directly in the calling context. If the flag is set, indicating the upcall is an isr context, the transport mandates a transition to a workqueue. The workqueue assigned to the queue is used for the context. NVMET_FCTGTFEAT_OPDONE_IN_ISR By default, if the flag is not set, the transport assumes the lldd is in a non-isr context and in the cpu context it should be for the io queue. As such, the fcp operation done callback is called directly in the calling context. If the flag is set, indicating the upcall is an isr context, the transport mandates a transition to a workqueue. The workqueue assigned to the queue is used for the context. Updated lpfc for flags Signed-off-by: James Smart Signed-off-by: Sagi Grimberg drivers/nvme/target/fc.c | 37 ++++++++++++++++++++++++++++++++++--- drivers/nvme/target/fcloop.c | 5 +++-- drivers/scsi/lpfc/lpfc_nvmet.c | 4 +++- include/linux/nvme-fc-driver.h | 16 ++++++++++++++++ 4 files changed, 56 insertions(+), 6 deletions(-) commit 1c05cf9058027dd80630d54aa3527eb2e3152e80 Author: Logan Gunthorpe Date: Tue Apr 18 17:32:15 2017 -0600 nvmet: convert from kmap to nvmet_copy_from_sgl This is safer as it doesn't rely on the data being stored in a single page in an sgl. It also aids our effort to start phasing out users of sg_page. See [1]. For this we kmalloc some memory, copy to it and free at the end. Note: we can't allocate this memory on the stack as the kbuild test robot reports some frame size overflows on i386. [1] https://lwn.net/Articles/720053/ Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Reviewed-by: Max Gurtovoy Signed-off-by: Sagi Grimberg drivers/nvme/target/fabrics-cmd.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) commit f9f38e33389c019ec880f6825119c94867c1fde0 Author: Helen Koike Date: Mon Apr 10 12:51:07 2017 -0300 nvme: improve performance for virtual NVMe devices This change provides a mechanism to reduce the number of MMIO doorbell writes for the NVMe driver. When running in a virtualized environment like QEMU, the cost of an MMIO is quite hefy here. The main idea for the patch is provide the device two memory location locations: 1) to store the doorbell values so they can be lookup without the doorbell MMIO write 2) to store an event index. I believe the doorbell value is obvious, the event index not so much. Similar to the virtio specification, the virtual device can tell the driver (guest OS) not to write MMIO unless you are writing past this value. FYI: doorbell values are written by the nvme driver (guest OS) and the event index is written by the virtual device (host OS). The patch implements a new admin command that will communicate where these two memory locations reside. If the command fails, the nvme driver will work as before without any optimizations. Contributions: Eric Northup Frank Swiderski Ted Tso Keith Busch Just to give an idea on the performance boost with the vendor extension: Running fio [1], a stock NVMe driver I get about 200K read IOPs with my vendor patch I get about 1000K read IOPs. This was running with a null device i.e. the backing device simply returned success on every read IO request. [1] Running on a 4 core machine: fio --time_based --name=benchmark --runtime=30 --filename=/dev/nvme0n1 --nrfiles=1 --ioengine=libaio --iodepth=32 --direct=1 --invalidate=1 --verify=0 --verify_fatal=0 --numjobs=4 --rw=randread --blocksize=4k --randrepeat=false Signed-off-by: Rob Nelson [mlin: port for upstream] Signed-off-by: Ming Lin [koike: updated for upstream] Signed-off-by: Helen Koike Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch drivers/nvme/host/pci.c | 143 +++++++++++++++++++++++++++++++++++++++++++++++- include/linux/nvme.h | 13 +++++ 2 files changed, 154 insertions(+), 2 deletions(-) commit 81c1cd98351bec779c4587865b62bfbac72ee811 Author: Keith Busch Date: Tue Apr 4 18:18:12 2017 -0400 nvme/pci: Don't set reserved SQ create flags The QPRIO field is only valid if weighted round robin arbitration is used, and this driver doesn't enable that controller configuration option. Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e6c1812e632ae3b54a1a9da759cad762f633e11 Author: Florian Fainelli Date: Thu Apr 20 15:47:22 2017 -0700 net: dsa: Remove redundant NULL dst check tag_lan9303.c does check for a NULL dst but that's already checked by dsa_switch_rcv() one layer above. Signed-off-by: Florian Fainelli Acked-by: Juergen Borleis Signed-off-by: David S. Miller net/dsa/tag_lan9303.c | 5 ----- 1 file changed, 5 deletions(-) commit c5ce0abeb62845352d7428d6b82e5b52e8728f12 Author: Johannes Thumshirn Date: Fri Apr 21 14:11:41 2017 +0200 scsi: sas: move scsi_remove_host call into sas_remove_host Move scsi_remove_host call into sas_remove_host and remove it from SAS HBA drivers, so we don't mess up the ordering. This solves an issue with double deleting sysfs entries that was introduced by the change of sysfs behaviour from commit bcdde7e221a8 ("sysfs: make __sysfs_remove_dir() recursive"). [mkp: addressed checkpatch complaints] Signed-off-by: Johannes Thumshirn Suggested-by: Christoph Hellwig Cc: Hannes Reinecke Cc: James Bottomley Cc: Jinpu Wang Cc: John Garry Reviewed-by: Christoph Hellwig Reviewed-by: Jinpu Wang Signed-off-by: Martin K. Petersen drivers/scsi/aic94xx/aic94xx_init.c | 1 - drivers/scsi/hisi_sas/hisi_sas_main.c | 1 - drivers/scsi/isci/init.c | 1 - drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 - drivers/scsi/mvsas/mv_init.c | 1 - drivers/scsi/pm8001/pm8001_init.c | 1 - drivers/scsi/scsi_transport_sas.c | 8 ++++++-- 7 files changed, 6 insertions(+), 8 deletions(-) commit 20961065a88a7ac8f7d7c8f256028304b55fa0b7 Author: Colin Ian King Date: Tue Feb 21 16:27:11 2017 +0000 scsi: BusLogic: fix incorrect spelling of adatper_reset_req Trivial fix to spelling mistake, adatper_reset_req should be adapter_reset_req. Also break up very long seq_printf statement into multiple lines. Signed-off-by: Colin Ian King Acked-by: Khalid Aziz Signed-off-by: Martin K. Petersen drivers/scsi/BusLogic.c | 14 +++++++++++--- drivers/scsi/BusLogic.h | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) commit b34b10a725e22980a331c796577e368ebb5ed895 Author: Kees Cook Date: Thu Apr 20 15:00:02 2017 -0700 scsi: bfa: use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. This also initializes the array members using the enum used to look up __port_action entries. Signed-off-by: Kees Cook Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/bfa/bfa_fcs_lport.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit 99c749a4c4f4ea2c9eee01f81f79bdbf26c3914e Author: Jens Axboe Date: Fri Apr 21 07:55:42 2017 -0600 blk-stat: kill blk_stat_rq_ddir() No point in providing and exporting this helper. There's just one (real) user of it, just use rq_data_dir(). Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq.c | 2 +- block/blk-stat.c | 6 ------ block/blk-stat.h | 11 ----------- block/blk-wbt.c | 7 ++++++- 4 files changed, 7 insertions(+), 19 deletions(-) commit f2094107ac82bf867184efd77cee30b6a98e2e20 Merge: b26cfc4 bfd090b bcbfdd0 Author: Paul E. McKenney Date: Fri Apr 21 06:00:13 2017 -0700 Merge branches 'doc.2017.04.12a', 'fixes.2017.04.19a' and 'srcu.2017.04.21a' into HEAD doc.2017.04.12a: Documentation updates fixes.2017.04.19a: Miscellaneous fixes srcu.2017.04.21a: Parallelize SRCU callback handling commit bcbfdd01dce5556a952fae84ef16fd0f12525e7b Author: Paul E. McKenney Date: Tue Apr 11 15:50:41 2017 -0700 rcu: Make non-preemptive schedule be Tasks RCU quiescent state Currently, a call to schedule() acts as a Tasks RCU quiescent state only if a context switch actually takes place. However, just the call to schedule() guarantees that the calling task has moved off of whatever tracing trampoline that it might have been one previously. This commit therefore plumbs schedule()'s "preempt" parameter into rcu_note_context_switch(), which then records the Tasks RCU quiescent state, but only if this call to schedule() was -not- due to a preemption. To avoid adding overhead to the common-case context-switch path, this commit hides the rcu_note_context_switch() check under an existing non-common-case check. Suggested-by: Steven Rostedt Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 11 ++++++++--- include/linux/rcutiny.h | 13 +++++++++---- include/linux/rcutree.h | 5 +++-- kernel/rcu/tree.c | 22 +++++++++++++++++++++- kernel/rcu/update.c | 1 + kernel/sched/core.c | 2 +- 6 files changed, 43 insertions(+), 11 deletions(-) commit 0497b489b8255054f113fd31faeb72f6dbc50a68 Author: Paul E. McKenney Date: Tue Apr 18 10:28:31 2017 -0700 srcu: Expedite srcu_schedule_cbs_snp() callback invocation Although Tree SRCU does reduce delays when there is at least one synchronize_srcu_expedited() invocation pending, srcu_schedule_cbs_snp() still waits for SRCU_INTERVAL before invoking callbacks. Since synchronize_srcu_expedited() now posts a callback and waits for that callback to do a wakeup, this destroys the expedited nature of synchronize_srcu_expedited(). This destruction became apparent to Marc Zyngier in the guise of a guest-OS bootup slowdown from five seconds to no fewer than forty seconds. This commit therefore invokes callbacks immediately at the end of the grace period when there is at least one synchronize_srcu_expedited() invocation pending. This brought Marc's guest-OS bootup times back into the realm of reason. Reported-by: Marc Zyngier Signed-off-by: Paul E. McKenney Tested-by: Marc Zyngier kernel/rcu/srcutree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit da915ad5cf25b5f5d358dd3670c3378d8ae8c03e Author: Paul E. McKenney Date: Wed Apr 5 09:01:53 2017 -0700 srcu: Parallelize callback handling Peter Zijlstra proposed using SRCU to reduce mmap_sem contention [1,2], however, there are workloads that could result in a high volume of concurrent invocations of call_srcu(), which with current SRCU would result in excessive lock contention on the srcu_struct structure's ->queue_lock, which protects SRCU's callback lists. This commit therefore moves SRCU to per-CPU callback lists, thus greatly reducing contention. Because a given SRCU instance no longer has a single centralized callback list, starting grace periods and invoking callbacks are both more complex than in the single-list Classic SRCU implementation. Starting grace periods and handling callbacks are now handled using an srcu_node tree that is in some ways similar to the rcu_node trees used by RCU-bh, RCU-preempt, and RCU-sched (for example, the srcu_node tree shape is controlled by exactly the same Kconfig options and boot parameters that control the shape of the rcu_node tree). In addition, the old per-CPU srcu_array structure is now named srcu_data and contains an rcu_segcblist structure named ->srcu_cblist for its callbacks (and a spinlock to protect this). The srcu_struct gets an srcu_gp_seq that is used to associate callback segments with the corresponding completion-time grace-period number. These completion-time grace-period numbers are propagated up the srcu_node tree so that the grace-period workqueue handler can determine whether additional grace periods are needed on the one hand and where to look for callbacks that are ready to be invoked. The srcu_barrier() function must now wait on all instances of the per-CPU ->srcu_cblist. Because each ->srcu_cblist is protected by ->lock, srcu_barrier() can remotely add the needed callbacks. In theory, it could also remotely start grace periods, but in practice doing so is complex and racy. And interestingly enough, it is never necessary for srcu_barrier() to start a grace period because srcu_barrier() only enqueues a callback when a callback is already present--and it turns out that a grace period has to have already been started for this pre-existing callback. Furthermore, it is only the callback that srcu_barrier() needs to wait on, not any particular grace period. Therefore, a new rcu_segcblist_entrain() function enqueues the srcu_barrier() function's callback into the same segment occupied by the last pre-existing callback in the list. The special case where all the pre-existing callbacks are on a different list (because they are in the process of being invoked) is handled by enqueuing srcu_barrier()'s callback into the RCU_DONE_TAIL segment, relying on the done-callbacks check that takes place after all callbacks are inovked. Note that the readers use the same algorithm as before. Note that there is a separate srcu_idx that tells the readers what counter to increment. This unfortunately cannot be combined with srcu_gp_seq because they need to be incremented at different times. This commit introduces some ugly #ifdefs in rcutorture. These will go away when I feel good enough about Tree SRCU to ditch Classic SRCU. Some crude performance comparisons, courtesy of a quickly hacked rcuperf asynchronous-grace-period capability: Callback Queuing Overhead ------------------------- # CPUS Classic SRCU Tree SRCU ------ ------------ --------- 2 0.349 us 0.342 us 16 31.66 us 0.4 us 41 --------- 0.417 us The times are the 90th percentiles, a statistic that was chosen to reject the overheads of the occasional srcu_barrier() call needed to avoid OOMing the test machine. The rcuperf test hangs when running Classic SRCU at 41 CPUs, hence the line of dashes. Despite the hacks to both the rcuperf code and that statistics, this is a convincing demonstration of Tree SRCU's performance and scalability advantages. [1] https://lwn.net/Articles/309030/ [2] https://patchwork.kernel.org/patch/5108281/ Signed-off-by: Paul E. McKenney [ paulmck: Fix initialization if synchronize_srcu_expedited() called first. ] include/linux/rcu_segcblist.h | 42 ++- include/linux/srcutree.h | 80 ++++-- kernel/rcu/rcutorture.c | 20 +- kernel/rcu/srcutree.c | 642 +++++++++++++++++++++++++++++++++--------- kernel/rcu/tree.c | 6 + kernel/rcu/tree.h | 8 + 6 files changed, 647 insertions(+), 151 deletions(-) commit 9fea59bd7ca541e5d0851f0b6dbca83c60ea90cd Author: Michael Ellerman Date: Fri Apr 21 00:36:20 2017 +1000 powerpc/mm: Add support for runtime configuration of ASLR limits Add powerpc support for mmap_rnd_bits and mmap_rnd_compat_bits, which are two sysctls that allow a user to configure the number of bits of randomness used for ASLR. Because of the way the Kconfig for ARCH_MMAP_RND_BITS is defined, we have to construct at least the MIN value in Kconfig, vs in a header which would be more natural. Given that we just go ahead and do it all in Kconfig. At least according to the code (the documentation makes no mention of it), the value is defined as the number of bits of randomisation *of the page*, not the address. This makes some sense, with larger page sizes more of the low bits are forced to zero, which would reduce the randomisation if we didn't take the PAGE_SIZE into account. However it does mean the min/max values have to change depending on the PAGE_SIZE in order to actually limit the amount of address space consumed by the randomisation. The result of that is that we have to define the default values based on both 32-bit vs 64-bit, but also the configured PAGE_SIZE. Furthermore now that we have 128TB address space support on Book3S, we also have to take that into account. Finally we can wire up the value in arch_mmap_rnd(). Signed-off-by: Michael Ellerman Signed-off-by: Bhupesh Sharma Tested-by: Bhupesh Sharma Reviewed-by: Kees Cook Reviewed-by: Aneesh Kumar K.V arch/powerpc/Kconfig | 44 ++++++++++++++++++++++++++++++++++++++++++++ arch/powerpc/mm/mmap.c | 11 ++++++----- 2 files changed, 50 insertions(+), 5 deletions(-) commit 6ade8694f471d847500c7cec152cc15171cef5d5 Author: Paul E. McKenney Date: Thu Apr 20 17:30:06 2017 -0700 kvm: Move srcu_struct fields to end of struct kvm Parallelizing SRCU callback handling will increase the size of srcu_struct, which will move the kvm structure's kvm_arch field out of reach of powerpc's current assembly code, which will result in the following sort of build error: arch/powerpc/kvm/book3s_hv_rmhandlers.S:617: Error: operand out of range (0x000000000000b328 is not between 0xffffffffffff8000 and 0x0000000000007fff) This commit moves the srcu_struct fields in the kvm structure to follow the kvm_arch field, which will allow powerpc's assembly code to continue to be able to reach the kvm_arch field. Reported-by: Stephen Rothwell Reported-by: Michael Ellerman Reported-by: kbuild test robot Suggested-by: Paolo Bonzini Signed-off-by: Paul E. McKenney Tested-by: Michael Ellerman Acked-by: Paolo Bonzini [ paulmck: Moved this commit to precede SRCU callback parallelization, and reworded the commit log into future tense, all in the name of bisectability. ] include/linux/kvm_host.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 116591fe3eef11c6f06b662c9176385f13891183 Author: Gary R Hook Date: Thu Apr 20 15:24:22 2017 -0500 crypto: ccp - Disable interrupts early on unload Ensure that we disable interrupts first when shutting down the driver. Cc: # 4.9.x+ Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v5.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 56467cb11cf8ae4db9003f54b3d3425b5f07a10a Author: Gary R Hook Date: Thu Apr 20 15:24:09 2017 -0500 crypto: ccp - Use only the relevant interrupt bits Each CCP queue can product interrupts for 4 conditions: operation complete, queue empty, error, and queue stopped. This driver only works with completion and error events. Cc: # 4.9.x+ Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v5.c | 9 +++++---- drivers/crypto/ccp/ccp-dev.h | 5 ++--- 2 files changed, 7 insertions(+), 7 deletions(-) commit 7701d1ff8ed1b8d71dcccf1ae47470fe22942373 Author: Sean Wang Date: Fri Apr 21 00:24:26 2017 +0800 hwrng: mtk - Add driver for hardware random generator on MT7623 SoC This patch adds support for hardware random generator on MT7623 SoC and should also work on other similar Mediatek SoCs. Currently, the driver is already tested successfully with rng-tools. Signed-off-by: Sean Wang Reviewed-by: PrasannaKumar Muralidharan Signed-off-by: Herbert Xu drivers/char/hw_random/Kconfig | 14 ++++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/mtk-rng.c | 168 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 183 insertions(+) commit c2b06bcd4b5f8e9a64b5e266441cc61ebfb2a4a5 Author: Sean Wang Date: Fri Apr 21 00:24:25 2017 +0800 dt-bindings: hwrng: Add Mediatek hardware random generator bindings Document the devicetree bindings for Mediatek random number generator which could be found on MT7623 SoC or other similar Mediatek SoCs. Signed-off-by: Sean Wang Acked-by: Rob Herring Signed-off-by: Herbert Xu Documentation/devicetree/bindings/rng/mtk-rng.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 0f89f6e188fa929b6de49c00c73f5731a6bd6bac Author: Michael Ellerman Date: Thu Apr 20 15:35:09 2017 +1000 crypto: crct10dif-vpmsum - Fix missing preempt_disable() In crct10dif_vpmsum() we call enable_kernel_altivec() without first disabling preemption, which is not allowed. It used to be sufficient just to call pagefault_disable(), because that also disabled preemption. But the two were decoupled in commit 8222dbe21e79 ("sched/preempt, mm/fault: Decouple preemption from the page fault logic") in mid 2015. The crct10dif-vpmsum code inherited this bug from the crc32c-vpmsum code on which it was modelled. So add the missing preempt_disable/enable(). We should also call disable_kernel_fp(), although it does nothing by default, there is a debug switch to make it active and all enables should be paired with disables. Fixes: b01df1c16c9a ("crypto: powerpc - Add CRC-T10DIF acceleration") Acked-by: Daniel Axtens Signed-off-by: Michael Ellerman Signed-off-by: Herbert Xu arch/powerpc/crypto/crct10dif-vpmsum_glue.c | 3 +++ 1 file changed, 3 insertions(+) commit a9943a0ad19f4a23bb5c4217df0fb37feb7ac339 Author: Giovanni Cabiddu Date: Wed Apr 19 14:27:18 2017 +0100 crypto: testmgr - replace compression known answer test Compression implementations might return valid outputs that do not match what specified in the test vectors. For this reason, the testmgr might report that a compression implementation failed the test even if the data produced by the compressor is correct. This implements a decompress-and-verify test for acomp compression tests rather than a known answer test. Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu crypto/testmgr.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit 3ce5bc72eb88c02b23374c0e4f619ada27e47552 Author: Giovanni Cabiddu Date: Wed Apr 19 14:23:05 2017 +0100 crypto: acomp - allow registration of multiple acomps Add crypto_register_acomps and crypto_unregister_acomps to allow the registration of multiple implementations with one call. Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu crypto/acompress.c | 29 +++++++++++++++++++++++++++++ include/crypto/internal/acompress.h | 3 +++ 2 files changed, 32 insertions(+) commit b2a1d2717910452d002e958019546cdf8c0bf065 Author: Markus Elfring Date: Wed Apr 19 10:30:47 2017 +0200 hwrng: n2 - Use devm_kcalloc() in n2rng_probe() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". * Replace the specification of a data structure by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Acked-by: Shannon Nelson Signed-off-by: Herbert Xu drivers/char/hw_random/n2-drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ec1bca941a36961933484be0fce3e71981815bad Author: Christophe Jaillet Date: Thu Apr 13 20:25:15 2017 +0200 crypto: chcr - Fix error handling related to 'chcr_alloc_shash' Up to now, 'crypto_alloc_shash()' may return a valid pointer, an error pointer or NULL (in case of invalid parameter) Update it to always return an error pointer in case of error. It now returns ERR_PTR(-EINVAL) instead of NULL in case of invalid parameter. This simplifies error handling. Also fix a crash in 'chcr_authenc_setkey()' if 'chcr_alloc_shash()' returns an error pointer and the "goto out" path is taken. Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 69b348449bda0f9588737539cfe135774c9939a7 Author: Jason A. Donenfeld Date: Wed Apr 12 10:40:19 2017 +0200 padata: get_next is never NULL Per Dan's static checker warning, the code that returns NULL was removed in 2010, so this patch updates the comments and fixes the code assumptions. Signed-off-by: Jason A. Donenfeld Reported-by: Dan Carpenter Acked-by: Steffen Klassert Signed-off-by: Herbert Xu kernel/padata.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit c46ea13f55b629a26d5dd4a22688a5f88cff0906 Author: Krzysztof Kozlowski Date: Tue Apr 11 20:08:35 2017 +0200 crypto: exynos - Add new Exynos RNG driver Replace existing hw_ranndom/exynos-rng driver with a new, reworked one. This is a driver for pseudo random number generator block which on Exynos4 chipsets must be seeded with some value. On newer Exynos5420 chipsets it might seed itself from true random number generator block but this is not implemented yet. New driver is a complete rework to use the crypto ALGAPI instead of hw_random API. Rationale for the change: 1. hw_random interface is for true RNG devices. 2. The old driver was seeding itself with jiffies which is not a reliable source for randomness. 3. Device generates five random 32-bit numbers in each pass but old driver was returning only one 32-bit number thus its performance was reduced. Compatibility with DeviceTree bindings is preserved. New driver does not use runtime power management but manually enables and disables the clock when needed. This is preferred approach because using runtime PM just to toggle clock is huge overhead. Another difference is reseeding itself with generated random data periodically and during resuming from system suspend (previously driver was re-seeding itself again with jiffies). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephan Müller Reviewed-by: PrasannaKumar Muralidharan Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Herbert Xu MAINTAINERS | 8 + drivers/char/hw_random/Kconfig | 14 -- drivers/char/hw_random/Makefile | 1 - drivers/char/hw_random/exynos-rng.c | 231 --------------------- drivers/crypto/Kconfig | 15 ++ drivers/crypto/Makefile | 1 + drivers/crypto/exynos-rng.c | 389 ++++++++++++++++++++++++++++++++++++ 7 files changed, 413 insertions(+), 246 deletions(-) commit ed067d4a859ff696373324c5061392e013a7561a Author: Krzysztof Kozlowski Date: Tue Apr 11 20:08:34 2017 +0200 linux/kernel.h: Add ALIGN_DOWN macro Few parts of kernel define their own macro for aligning down so provide a common define for this, with the same usage and assumptions as existing ALIGN. Convert also three existing implementations to this one. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu arch/metag/kernel/stacktrace.c | 2 -- drivers/gpu/drm/udl/udl_fb.c | 2 +- include/linux/kernel.h | 1 + include/video/udlfb.h | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) commit 7e207d8550644c1076ceb070f40abf52701253ec Author: Wei Yongjun Date: Tue Apr 11 16:04:09 2017 +0000 crypto: caam - fix error return code in caam_qi_init() Fix to return error code -ENOMEM from the kmem_cache_create() error handling case instead of 0(err is 0 here), as done elsewhere in this function. Fixes: 67c2315def06 ("crypto: caam - add Queue Interface (QI) backend support") Signed-off-by: Wei Yongjun Acked-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/qi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e93708dabc0e999c7ffcf1e8661b68d96de24fd Author: Harsh Jain Date: Mon Apr 10 18:24:01 2017 +0530 crypto: chcr - Add fallback for AEAD algos Fallback to sw when I AAD length greater than 511 II Zero length payload II No of sg entries exceeds Request size. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 219 +++++++++++++++++++++++------------ drivers/crypto/chelsio/chcr_algo.h | 4 + drivers/crypto/chelsio/chcr_crypto.h | 3 +- 3 files changed, 151 insertions(+), 75 deletions(-) commit 72a56ca97dc163a7a10a654aab6635e30e781070 Author: Harsh Jain Date: Mon Apr 10 18:24:00 2017 +0530 crypto: chcr - Fix txq ids. The patch fixes a critical issue to map txqid with flows on the hardware appropriately, if tx queues created are more than flows configured then txqid shall map within the range of hardware flows configured. This ensure that un-mapped txqid does not remain un-handled. The patch also segregated the rxqid and txqid for clarity. Signed-off-by: Atul Gupta Reviewed-by: Ganesh Goudar Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 47 +++++++++++++++---------- drivers/crypto/chelsio/chcr_core.h | 2 ++ drivers/crypto/chelsio/chcr_crypto.h | 3 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 9 +++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 1 + drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 3 +- 6 files changed, 44 insertions(+), 21 deletions(-) commit 0a7bd30c1b7fca5f1443f1bc2dfdc2681d315359 Author: Harsh Jain Date: Mon Apr 10 18:23:59 2017 +0530 crypto: chcr - Set hmac_ctrl bit to use HW register HMAC_CFG[456] Use hmac_ctrl bit value saved in setauthsize callback. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) commit e29abda591b517be47df7479962ce6baee302a85 Author: Harsh Jain Date: Mon Apr 10 18:23:58 2017 +0530 crypto: chcr - Increase priority of AEAD algos. templates(gcm,ccm etc) inherit priority value of driver to calculate its priority. In some cases template priority becomes more than driver priority for same algo. Without this patch we will not be able to use driver authenc algos. It will be good if it pushed in stable kernel. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 12 ++++++++++-- drivers/crypto/chelsio/chcr_crypto.h | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) commit 63a761eef55759c0bc725739fe575193c09fa4ef Author: Wolfram Sang Date: Thu Apr 20 12:04:33 2017 +0200 i2c: rcar: clarify PM handling with more comments PM handling is correct but might be a bit subtle. Add some comments for clarification. Signed-off-by: Wolfram Sang Acked-by: Kuninori Morimoto Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-rcar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ae481cc139658e89eb3ea671dd00b67bd87f01a3 Author: Wolfram Sang Date: Tue Apr 18 20:38:35 2017 +0200 i2c: rcar: fix resume by always initializing registers before transfer Resume failed because of uninitialized registers. Instead of adding a resume callback, we simply initialize registers before every transfer. This lightweight change is more robust and will keep us safe if we ever need support for power domains or dynamic frequency changes. Signed-off-by: Wolfram Sang Acked-by: Kuninori Morimoto Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-rcar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8c91fd5ee64241d96c9cad97669389bacd10f4ea Author: Colin Ian King Date: Fri Apr 21 07:56:53 2017 +0100 i2c: tegra: fix spelling mistake: "contoller" -> "controller" trivial fix to spelling mistake in MODULE_DESCRIPTION text Signed-off-by: Colin Ian King Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra-bpmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b371f866d9e1eebd6048c644b4a0e78eb951c3b3 Author: Andrzej Hajda Date: Fri Feb 24 14:36:00 2017 +0100 i2c: exynos5: use core helper to get driver data Driver core provides of_device_get_match_data which can be used to get driver data instead of custom helper. Signed-off-by: Andrzej Hajda Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-exynos5.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 70c8c4e9bf3b586516b0cd224bb3aed008efc300 Author: Andrzej Hajda Date: Fri Feb 24 12:16:02 2017 +0100 i2c: exynos5: de-duplicate error logs on clock setup In case of clock setup error it is enough to log it once. Moreover patch simplifies clock setup routines. Signed-off-by: Andrzej Hajda Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-exynos5.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) commit b9d5b31a0dee47e3a1351589d361443e66f4f125 Author: Andrzej Hajda Date: Fri Feb 24 12:16:01 2017 +0100 i2c: exynos5: simplify clock frequency handling There is no need to keep separate settings for high and fast speed clock. Signed-off-by: Andrzej Hajda Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-exynos5.c | 45 +++++++++++----------------------------- 1 file changed, 12 insertions(+), 33 deletions(-) commit b917d4fd5050e46979835486a70c99b5cb688689 Author: Andrzej Hajda Date: Thu Feb 23 17:47:26 2017 +0100 i2c: exynos5: simplify timings calculation Instead of using cryptic loop direct calculation of timings can be used. Signed-off-by: Andrzej Hajda Tested-by: Javier Martinez Canillas Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-exynos5.c | 40 ++++++++++++++-------------------------- 1 file changed, 14 insertions(+), 26 deletions(-) commit f855b2f544d664cfa3055edb7ffd20e9ae0e2dce Author: Oliver O'Halloran Date: Wed Apr 12 03:42:31 2017 +1000 powerpc/mm: Wire up ioremap_cache() The default implementation of ioremap_cache() is aliased to ioremap(). On powerpc ioremap() creates cache-inhibited mappings by default which is almost certainly not what you wanted. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/include/asm/io.h | 2 ++ 1 file changed, 2 insertions(+) commit e891a32e7ae0c6ba57959799c0ac84681616eeef Author: Marcelo Tosatti Date: Mon Apr 17 12:51:37 2017 -0300 KVM: x86: remove irq disablement around KVM_SET_CLOCK/KVM_GET_CLOCK The disablement of interrupts at KVM_SET_CLOCK/KVM_GET_CLOCK attempts to disable software suspend from causing "non atomic behaviour" of the operation: Add a helper function to compute the kernel time and convert nanoseconds back to CPU specific cycles. Note that these must not be called in preemptible context, as that would mean the kernel could enter software suspend state, which would cause non-atomic operation. However, assume the kernel can enter software suspend at the following 2 points: ktime_get_ts(&ts); 1. hypothetical_ktime_get_ts(&ts) monotonic_to_bootbased(&ts); 2. monotonic_to_bootbased() should be correct relative to a ktime_get_ts(&ts) performed after point 1 (that is after resuming from software suspend), hypothetical_ktime_get_ts() Therefore it is also correct for the ktime_get_ts(&ts) before point 1, which is ktime_get_ts(&ts) = hypothetical_ktime_get_ts(&ts) + time-to-execute-suspend-code Note CLOCK_MONOTONIC does not count during suspension. So remove the irq disablement, which causes the following warning on -RT kernels: With this reasoning, and the -RT bug that the irq disablement causes (because spin_lock is now a sleeping lock), remove the IRQ protection as it causes: [ 1064.668109] in_atomic(): 0, irqs_disabled(): 1, pid: 15296, name:m [ 1064.668110] INFO: lockdep is turned off. [ 1064.668110] irq event stamp: 0 [ 1064.668112] hardirqs last enabled at (0): [< (null)>] ) [ 1064.668116] hardirqs last disabled at (0): [] c0 [ 1064.668118] softirqs last enabled at (0): [] c0 [ 1064.668118] softirqs last disabled at (0): [< (null)>] ) [ 1064.668121] CPU: 13 PID: 15296 Comm: qemu-kvm Not tainted 3.10.0-1 [ 1064.668121] Hardware name: Dell Inc. PowerEdge R730/0H21J3, BIOS 5 [ 1064.668123] ffff8c1796b88000 00000000afe7344c ffff8c179abf3c68 f3 [ 1064.668125] ffff8c179abf3c90 ffffffff930ccb3d ffff8c1b992b3610 f0 [ 1064.668126] 00007ffc1a26fbc0 ffff8c179abf3cb0 ffffffff9375f694 f0 [ 1064.668126] Call Trace: [ 1064.668132] [] dump_stack+0x19/0x1b [ 1064.668135] [] __might_sleep+0x12d/0x1f0 [ 1064.668138] [] rt_spin_lock+0x24/0x60 [ 1064.668155] [] __get_kvmclock_ns+0x36/0x110 [k] [ 1064.668159] [] ? futex_wait_queue_me+0x103/0x10 [ 1064.668171] [] kvm_arch_vm_ioctl+0xa2/0xd70 [k] [ 1064.668173] [] ? futex_wait+0x1ac/0x2a0 v2: notice get_kvmclock_ns with the same problem (Pankaj). v3: remove useless helper function (Pankaj). Signed-off-by: Marcelo Tosatti Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) commit 668fffa3f838edfcb1679f842f7ef1afa61c3e9a Author: Michael S. Tsirkin Date: Fri Apr 21 12:27:17 2017 +0200 kvm: better MWAIT emulation for guests Guests that are heavy on futexes end up IPI'ing each other a lot. That can lead to significant slowdowns and latency increase for those guests when running within KVM. If only a single guest is needed on a host, we have a lot of spare host CPU time we can throw at the problem. Modern CPUs implement a feature called "MWAIT" which allows guests to wake up sleeping remote CPUs without an IPI - thus without an exit - at the expense of never going out of guest context. The decision whether this is something sensible to use should be up to the VM admin, so to user space. We can however allow MWAIT execution on systems that support it properly hardware wise. This patch adds a CAP to user space and a KVM cpuid leaf to indicate availability of native MWAIT execution. With that enabled, the worst a guest can do is waste as many cycles as a "jmp ." would do, so it's not a privilege problem. We consciously do *not* expose the feature in our CPUID bitmap, as most people will want to benefit from sleeping vCPUs to allow for over commit. Reported-by: "Gabriel L. Somlo" Signed-off-by: Michael S. Tsirkin [agraf: fix amd, change commit message] Signed-off-by: Alexander Graf Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/api.txt | 9 +++++++++ arch/x86/kvm/svm.c | 7 +++++-- arch/x86/kvm/vmx.c | 6 ++++-- arch/x86/kvm/x86.c | 3 +++ arch/x86/kvm/x86.h | 36 ++++++++++++++++++++++++++++++++++++ include/uapi/linux/kvm.h | 1 + 6 files changed, 58 insertions(+), 4 deletions(-) commit db2336a80489e7c3c7728cefd9be58fac5ecfb39 Author: Kyle Huey Date: Mon Mar 20 01:16:28 2017 -0700 KVM: x86: virtualize cpuid faulting Hardware support for faulting on the cpuid instruction is not required to emulate it, because cpuid triggers a VM exit anyways. KVM handles the relevant MSRs (MSR_PLATFORM_INFO and MSR_MISC_FEATURES_ENABLE) and upon a cpuid-induced VM exit checks the cpuid faulting state and the CPL. kvm_require_cpl is even kind enough to inject the GP fault for us. Signed-off-by: Kyle Huey Reviewed-by: David Matlack [Return "1" from kvm_emulate_cpuid, it's not void. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/cpuid.c | 3 +++ arch/x86/kvm/cpuid.h | 11 +++++++++++ arch/x86/kvm/emulate.c | 7 +++++++ arch/x86/kvm/x86.c | 26 ++++++++++++++++++++++++++ 5 files changed, 49 insertions(+) commit bd17117bb2af60d4bc44e0f9c859e800a3d99722 Merge: ec594c4 730cd63 Author: Paolo Bonzini Date: Fri Apr 21 12:47:47 2017 +0200 Merge tag 'kvm-s390-next-4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: Guarded storage fixup and keyless subset mode - detect and use the keyless subset mode (guests without storage keys) - fix vSIE support for sdnxc - fix machine check data for guarded storage commit ec594c47101cacf8c0fe693a68b972ecb8f5848f Merge: 8afd74c feafd13 Author: Paolo Bonzini Date: Fri Apr 21 12:47:31 2017 +0200 Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD commit e525f8a6e696210d15f8b8277d4da12fc4add299 Author: Martin Schwidefsky Date: Thu Apr 20 13:54:11 2017 +0200 s390/gs: add regset for the guarded storage broadcast control block The guarded storage interface allows to register a control block for each thread that is activated with the guarded storage broadcast event. To retrieve the complete state of a process from the kernel a register set for the stored broadcast control block is required. Signed-off-by: Martin Schwidefsky arch/s390/kernel/ptrace.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/elf.h | 1 + 2 files changed, 47 insertions(+) commit 8afd74c2961a7544b0d73fad2d92f2cb65502e99 Merge: fe0e80b f3e4559 Author: Paolo Bonzini Date: Fri Apr 21 11:55:06 2017 +0200 Merge branch 'x86/process' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into HEAD Required for KVM support of the CPUID faulting feature. Signed-off-by: Paolo Bonzini commit fe0e80befd4d3a62d40f24b98b17483ea00ef2dd Author: David Hildenbrand Date: Fri Mar 10 12:47:13 2017 +0100 KVM: VMX: drop vmm_exclusive module parameter vmm_exclusive=0 leads to KVM setting X86_CR4_VMXE always and calling VMXON only when the vcpu is loaded. X86_CR4_VMXE is used as an indication in cpu_emergency_vmxoff() (called on kdump) if VMXOFF has to be called. This is obviously not the case if both are used independtly. Calling VMXOFF without a previous VMXON will result in an exception. In addition, X86_CR4_VMXE is used as a mean to test if VMX is already in use by another VMM in hardware_enable(). So there can't really be co-existance. If the other VMM is prepared for co-existance and does a similar check, only one VMM can exist. If the other VMM is not prepared and blindly sets/clears X86_CR4_VMXE, we will get inconsistencies with X86_CR4_VMXE. As we also had bug reports related to clearing of vmcs with vmm_exclusive=0 this seems to be pretty much untested. So let's better drop it. While at it, directly move setting/clearing X86_CR4_VMXE into kvm_cpu_vmxon/off. Signed-off-by: David Hildenbrand Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) commit 730cd632c4e485b90f97fe998e300045da094938 Author: Farhan Ali Date: Fri Feb 24 16:12:56 2017 -0500 KVM: s390: Support keyless subset guest mode If the KSS facility is available on the machine, we also make it available for our KVM guests. The KSS facility bypasses storage key management as long as the guest does not issue a related instruction. When that happens, the control is returned to the host, which has to turn off KSS for a guest vcpu before retrying the instruction. Signed-off-by: Corey S. McQuay Signed-off-by: Farhan Ali Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 2 ++ arch/s390/include/uapi/asm/kvm.h | 1 + arch/s390/kvm/intercept.c | 3 +++ arch/s390/kvm/kvm-s390.c | 8 +++++++- arch/s390/kvm/kvm-s390.h | 1 + arch/s390/kvm/priv.c | 19 +++++++++++++------ arch/s390/kvm/vsie.c | 6 +++++- 7 files changed, 32 insertions(+), 8 deletions(-) commit 71cb1bf66ef0d1d36ff3f04150450df9dd8af654 Author: Farhan Ali Date: Thu Feb 23 13:39:17 2017 -0500 s390/sclp: Detect KSS facility Let's detect the keyless subset facility. Signed-off-by: Farhan Ali Reviewed-by: Cornelia Huck Reviewed-by: Christian Borntraeger Acked-by: Martin Schwidefsky Signed-off-by: Christian Borntraeger arch/s390/include/asm/sclp.h | 1 + drivers/s390/char/sclp_early.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 56798e6b3a2264b58d50b93cfd66586ede77d661 Author: Takashi Iwai Date: Tue Apr 11 08:10:52 2017 +0200 ALSA: hda - Use a helper function for renaming kctl names Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 7beb3a6e9335d13872f24566b451f8371edd238f Author: Takashi Iwai Date: Mon Apr 10 18:05:52 2017 +0200 ALSA: hda - Support Gigabyte Gaming board with dual Realtek codecs This patch adds some workarounds to make Gigabyte GA-AX370 Gaming 5 board working without the conflicts of kctls, etc. In general, the dual codec configs result in the conflicts of the following stuff: - Master controls - Capture controls - Analog loopback controls In addition, the auto-mute and the auto-mic can't work well among multiple codecs. The current "solution" is to disable all these features, and use UCM for a better PulseAudio management. For a dedicated UCM profile, the patch overrides the card longname so that the system an get a unique profile path. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195305 Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 61 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit dc912c303517b01960dcee6875a78b2999f7c098 Author: Steven Rostedt (VMware) Date: Thu Apr 20 17:22:36 2017 -0400 x86/ftrace: Fix ebp in ftrace_regs_caller that screws up unwinder Fengguang Wu's zero day bot triggered a stack unwinder dump. This can be easily triggered when CONFIG_FRAME_POINTERS is enabled and -mfentry is in use on x86_32. ># cd /sys/kernel/debug/tracing ># echo 'p:schedule schedule' > kprobe_events ># echo stacktrace > events/kprobes/schedule/trigger This is because the code that implemented fentry in the ftrace_regs_caller tried to use the least amount of #ifdefs, and modified ebp when CC_USE_FENTRY was defined to point to the parent ip as it does when CC_USE_FENTRY is not defined. But when CONFIG_FRAME_POINTERS is set, it corrupts the ebp register for this frame while doing the tracing. NOTE, it does not corrupt ebp in any other way. It is just a bad frame pointer when calling into the tracing infrastructure. The original ebp is restored before returning from the fentry call. But if a stack trace is performed inside the tracing, the unwinder will notice the bad ebp. Instead of toying with ebp with CC_USING_FENTRY, just slap the parent ip into the second parameter (%edx), and have an #else that does it the original way. The unwinder will unfortunately miss the function being traced, as the stack frame is not set up yet for it, as it is for x86_64. But fixing that is a bit more complex and did not work before anyway. This has been tested with and without FRAME_POINTERS being set while using -mfentry, as well as using an older compiler that uses mcount. Analyzed-by: Josh Poimboeuf Fixes: 644e0e8dc76b ("x86/ftrace: Add -mfentry support to x86_32 with DYNAMIC_FTRACE set") Reported-by: kernel test robot Signed-off-by: Steven Rostedt (VMware) Cc: Masami Hiramatsu Cc: Josh Poimboeuf Link: https://lists.01.org/pipermail/lkp/2017-April/006165.html Link: http://lkml.kernel.org/r/20170420172236.7af7f6e5@gandalf.local.home Signed-off-by: Thomas Gleixner arch/x86/kernel/ftrace_32.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fc7438b1eb12b6c93d7b7a62423779eb5dfc673c Author: Mikhail Paulyshka Date: Fri Apr 21 08:52:42 2017 +0200 ALSA: hda - Fix headset microphone detection for ASUS N551 and N751 Headset microphone does not work out of the box on ASUS Nx51 laptops. This patch fixes it. Patch tested on Asus N551 laptop. Asus N751 part is not tested, but according to [1] this laptop uses the same audiosystem. 1. https://bugzilla.kernel.org/show_bug.cgi?id=117781 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195437 Signed-off-by: Mikhail Paulyshka Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 6b1462700b4a6a1244c018cdd2fa97ded43090a0 Merge: cb2e77c f9b67f0 Author: Dave Airlie Date: Fri Apr 21 13:51:59 2017 +1000 Merge tag 'drm-misc-next-fixes-2017-04-20' of git://anongit.freedesktop.org/git/drm-misc into drm-next drm-misc-next-fixes-2017-04-20 Core changes: - Maintain sti via drm-misc (Vincent) - Rename dma_buf_ops->kmap_* to avoid naming collision (Logan) Driver changes: - Fix UHD displays on stih407 (Vincent) - Fix uninitialized var return in atmel-hlcdc (Dan) * tag 'drm-misc-next-fixes-2017-04-20' of git://anongit.freedesktop.org/git/drm-misc: dma-buf: Rename dma-ops to prevent conflict with kunmap_atomic macro drm: atmel-hlcdc: Uninitialized return in atmel_hlcdc_create_outputs() drm/sti: fix GDP size to support up to UHD resolution MAINTAINERS: add drm/sti driver into drm-misc commit 339e7575ade5e961eed3f93609db65bc9d15fc2c Author: Doug Ledford Date: Thu Apr 20 22:18:54 2017 -0400 cxgb4: Convert PDBG to pr_debug the second A couple spots were missed in the original patch to implement this change. Add those spots. Fixes: a9a42886d0b3 (cxgb4: Convert PDBG to pr_debug) Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dcc19d28091a86d5baf78e3fbb32e3fc3de524be Author: Steven Rostedt (VMware) Date: Thu Apr 20 11:59:18 2017 -0400 tracing/ftrace: Allow for instances to trigger their own stacktrace probes Have the stacktrace function trigger probe trigger stack traces within the instance that they were added to in the set_ftrace_filter. ># cd /sys/kernel/debug/tracing ># mkdir instances/foo ># cd instances/foo ># echo schedule:stacktrace:1 > set_ftrace_filter ># cat trace # tracer: nop # # entries-in-buffer/entries-written: 1/1 #P:4 # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / delay # TASK-PID CPU# |||| TIMESTAMP FUNCTION # | | | |||| | | -0 [001] .N.2 202.585010: => => schedule => schedule_preempt_disabled => do_idle => cpu_startup_entry => start_secondary => verify_cpu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_functions.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 2290f2c589285d0031e3b7445afff8949f3fdbb6 Author: Steven Rostedt (VMware) Date: Thu Apr 20 11:46:03 2017 -0400 tracing/ftrace: Allow for the traceonoff probe be unique to instances Have the traceon/off function probe triggers affect only the instance they are set in. This required making the trace_on/off accessible for other files in the tracing directory. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 4 ++-- kernel/trace/trace.h | 2 ++ kernel/trace/trace_functions.c | 21 +++++++++++---------- 3 files changed, 15 insertions(+), 12 deletions(-) commit cab5037950821caa1301df0223de657c6ee202a8 Author: Steven Rostedt (VMware) Date: Thu Apr 20 11:34:06 2017 -0400 tracing/ftrace: Enable snapshot function trigger to work with instances Modify the snapshot probe trigger to work with instances. This way the snapshot function trigger will only affect the instance that it is added to in the set_ftrace_filter file. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) commit d2afd57a4b96f3824220bbb8c067558ca215543f Author: Steven Rostedt (VMware) Date: Thu Apr 20 11:31:35 2017 -0400 tracing/ftrace: Allow instances to have their own function probes Pass around the local trace_array that is the descriptor for tracing instances, when enabling and disabling probes. This by default sets the enable/disable of event probe triggers to work with instances. The other probes will need some more work to get them working with instances. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6e4443199e5354255e8a4c1e8e5cfc8ef064c3ce Author: Steven Rostedt (VMware) Date: Wed Apr 19 22:39:44 2017 -0400 tracing/ftrace: Add a better way to pass data via the probe functions With the redesign of the registration and execution of the function probes (triggers), data can now be passed from the setup of the probe to the probe callers that are specific to the trace_array it is on. Although, all probes still only affect the toplevel trace array, this change will allow for instances to have their own probes separated from other instances and the top array. That is, something like the stacktrace probe can be set to trace only in an instance and not the toplevel trace array. This isn't implement yet, but this change sets the ground work for the change. When a probe callback is triggered (someone writes the probe format into set_ftrace_filter), it calls register_ftrace_function_probe() passing in init_data that will be used to initialize the probe. Then for every matching function, register_ftrace_function_probe() will call the probe_ops->init() function with the init data that was passed to it, as well as an address to a place holder that is associated with the probe and the instance. The first occurrence will have a NULL in the pointer. The init() function will then initialize it. If other probes are added, or more functions are part of the probe, the place holder will be passed to the init() function with the place holder data that it was initialized to the last time. Then this place_holder is passed to each of the other probe_ops functions, where it can be used in the function callback. When the probe_ops free() function is called, it can be called either with the rip of the function that is being removed from the probe, or zero, indicating that there are no more functions attached to the probe, and the place holder is about to be freed. This gives the probe_ops a way to free the data it assigned to the place holder if it was allocade during the first init call. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 25 +++++++--- kernel/trace/trace.c | 38 ++++++++------ kernel/trace/trace.h | 8 +-- kernel/trace/trace_events.c | 110 +++++++++++++++++++++++------------------ kernel/trace/trace_functions.c | 79 ++++++++++++++++------------- 5 files changed, 153 insertions(+), 107 deletions(-) commit 7b60f3d8761561d95d7e962522d6338143fc2329 Author: Steven Rostedt (VMware) Date: Tue Apr 18 14:50:39 2017 -0400 ftrace: Dynamically create the probe ftrace_ops for the trace_array In order to eventually have each trace_array instance have its own unique set of function probes (triggers), the trace array needs to hold the ops and the filters for the probes. This is the first step to accomplish this. Instead of having the private data of the probe ops point to the trace_array, create a separate list that the trace_array holds. There's only one private_data for a probe, we need one per trace_array. The probe ftrace_ops will be dynamically created for each instance, instead of being static. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 192 ++++++++++++++++++++++++++++++----------- kernel/trace/trace.c | 2 +- kernel/trace/trace.h | 5 +- kernel/trace/trace_events.c | 2 +- kernel/trace/trace_functions.c | 2 +- 5 files changed, 146 insertions(+), 57 deletions(-) commit b5f081b563a6cdcb85a543df8c851951a8978275 Author: Steven Rostedt (VMware) Date: Mon Apr 10 22:30:05 2017 -0400 tracing: Pass the trace_array into ftrace_probe_ops functions Pass the trace_array associated to a ftrace_probe_ops into the probe_ops func(), init() and free() functions. The trace_array is the descriptor that describes a tracing instance. This will help create the infrastructure that will allow having function probes unique to tracing instances. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 13 +++++++++---- kernel/trace/trace.c | 14 ++++++++------ kernel/trace/trace.h | 3 +++ kernel/trace/trace_events.c | 16 +++++++++------- kernel/trace/trace_functions.c | 35 ++++++++++++++++++++++------------- 5 files changed, 51 insertions(+), 30 deletions(-) commit 04ec7bb642b77374b53731b795b5654b5aff1c00 Author: Steven Rostedt (VMware) Date: Wed Apr 5 13:12:55 2017 -0400 tracing: Have the trace_array hold the list of registered func probes Add a link list to the trace_array to hold func probes that are registered. Currently, all function probes are the same for all instances as it was before, that is, only the top level trace_array holds the function probes. But this lays the ground work to have function probes be attached to individual instances, and having the event trigger only affect events in the given instance. But that work is still to be done. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 41 +++++++++++++++++++++++++++++------------ kernel/trace/trace.c | 6 ++++-- kernel/trace/trace.h | 13 ++++++++++--- kernel/trace/trace_events.c | 5 ++--- kernel/trace/trace_functions.c | 21 +++++++++++---------- 5 files changed, 56 insertions(+), 30 deletions(-) commit 8d70725e452cac9796e9025ccd79c45ffcc4d109 Author: Steven Rostedt (VMware) Date: Wed Apr 5 13:36:18 2017 -0400 ftrace: If the hash for a probe fails to update then free what was initialized If the ftrace_hash_move_and_update_ops() fails, and an ops->free() function exists, then it needs to be called on all the ops that were added by this registration. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit eee8ded131f15e0f5b1897c9c4a7687fabd28822 Author: Steven Rostedt (VMware) Date: Tue Apr 4 21:31:28 2017 -0400 ftrace: Have the function probes call their own function Now that the function probes have their own ftrace_ops, there's no reason to continue using the ftrace_func_hash to find which probe to call in the function callback. The ops that is passed in to the function callback is part of the probe_ops to call. Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 4 +- kernel/trace/ftrace.c | 225 +++++++++++++++++++++---------------------------- kernel/trace/trace.h | 1 + 3 files changed, 101 insertions(+), 129 deletions(-) commit 1ec3a81a0cf4236b644282794932c4eda9c1714a Author: Steven Rostedt (VMware) Date: Tue Apr 4 18:16:29 2017 -0400 ftrace: Have each function probe use its own ftrace_ops Have the function probes have their own ftrace_ops, and remove the trace_probe_ops. This simplifies some of the ftrace infrastructure code. Individual entries for each function is still allocated for the use of the output for set_ftrace_filter, but they will be removed soon too. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 246 ++++++++++++++++++++------------------------------ kernel/trace/trace.h | 1 + 2 files changed, 99 insertions(+), 148 deletions(-) commit d3d532d798c5720055ab02a10bf7829a33c3645a Author: Steven Rostedt (VMware) Date: Tue Apr 4 16:44:43 2017 -0400 ftrace: Have unregister_ftrace_function_probe_func() return a value Currently unregister_ftrace_function_probe_func() is a void function. It does not give any feedback if an error occurred or no item was found to remove and nothing was done. Change it to return status and success if it removed something. Also update the callers to return that feedback to the user. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 14 +++++++++++--- kernel/trace/trace.c | 6 ++---- kernel/trace/trace.h | 2 +- kernel/trace/trace_events.c | 3 +-- kernel/trace/trace_functions.c | 6 ++---- 5 files changed, 17 insertions(+), 14 deletions(-) commit e16b35ddb840788e023fac2482b61c0b6bf98057 Author: Steven Rostedt (VMware) Date: Tue Apr 4 14:46:56 2017 -0400 ftrace: Add helper function ftrace_hash_move_and_update_ops() The processes of updating a ops filter_hash is a bit complex, and requires setting up an old hash to perform the update. This is done exactly the same in two locations for the same reasons. Create a helper function that does it in one place. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 105 +++++++++++++++++++++++++------------------------- 1 file changed, 53 insertions(+), 52 deletions(-) commit 1a48df0041c2756194e700affb0e2ff084092e28 Author: Steven Rostedt (VMware) Date: Tue Apr 4 10:27:51 2017 -0400 ftrace: Remove data field from ftrace_func_probe structure No users of the function probes uses the data field anymore. Remove it, and change the init function to take a void *data parameter instead of a void **data, because the init will just get the data that the registering function was received, and there's no state after it is called. The other functions for ftrace_probe_ops still take the data parameter, but it will currently only be passed NULL. It will stay as a parameter for future data to be passed to these functions. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 11 ++++------- kernel/trace/trace.c | 4 ++-- kernel/trace/trace.h | 2 +- kernel/trace/trace_events.c | 5 ++--- kernel/trace/trace_functions.c | 4 ++-- 5 files changed, 11 insertions(+), 15 deletions(-) commit 02b77e2afb492420cabb117f3bbd7452d4b4ed06 Author: Steven Rostedt (VMware) Date: Tue Apr 4 10:04:26 2017 -0400 ftrace: Remove printing of data in showing of a function probe None of the probe users uses the data field anymore of the entry. They all have their own print() function. Remove showing the data field in the generic function as the data field will be going away. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 78f78e07d51e440d01e6b1aef172883821193771 Author: Steven Rostedt (VMware) Date: Tue Apr 4 13:39:59 2017 -0400 ftrace: Remove unused unregister_ftrace_function_probe_all() function There are no users of unregister_ftrace_function_probe_all(). The only probe function that is used is unregister_ftrace_function_probe_func(). Rename the internal static function __unregister_ftrace_function_probe() to unregister_ftrace_function_probe_func() and make it global. Also remove the PROBE_TEST_FUNC as it would be always set. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 22 +++------------------- kernel/trace/trace.h | 1 - 2 files changed, 3 insertions(+), 20 deletions(-) commit 0fe7e7e3f8391d4c9260b41cdb15c7917cb2e5b3 Author: Steven Rostedt (VMware) Date: Tue Apr 4 09:56:26 2017 -0400 ftrace: Remove unused unregister_ftrace_function_probe() function Nothing calls unregister_ftrace_function_probe(). Remove it as well as the flag PROBE_TEST_DATA, as this function was the only one to set it. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 18 +++--------------- kernel/trace/trace.h | 3 --- 2 files changed, 3 insertions(+), 18 deletions(-) commit fe014e24b6adfecdf8b3d0de1ef4d55a3eaf2b50 Author: Steven Rostedt (VMware) Date: Mon Apr 3 23:22:41 2017 -0400 ftrace: Convert the rest of the function trigger over to the mapping functions As the data pointer for individual ips will soon be removed and no longer passed to the callback function probe handlers, convert the rest of the function trigger counters over to the new ftrace_func_mapper helper functions. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_functions.c | 123 ++++++++++++++++++++++++++++------------- 1 file changed, 85 insertions(+), 38 deletions(-) commit 1a93f8bd19bd24f9b41136e70188d8f4de90c6a2 Author: Steven Rostedt (VMware) Date: Mon Apr 3 22:09:43 2017 -0400 tracing: Have the snapshot trigger use the mapping helper functions As the data pointer for individual ips will soon be removed and no longer passed to the callback function probe handlers, convert the snapshot trigger counter over to the new ftrace_func_mapper helper functions. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 52 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 8 deletions(-) commit 41794f190780c28784fa62b22001691e5876d149 Author: Steven Rostedt (VMware) Date: Mon Apr 3 20:58:35 2017 -0400 ftrace: Added ftrace_func_mapper for function probe triggers In order to move the ops to the function probes directly, they need a way to map function ips to their own data without depending on the infrastructure of the function probes, as the data field will be going away. New helper functions are added that are based on the ftrace_hash code. ftrace_func_mapper functions are there to let the probes map ips to their data. These can be allocated by the probe ops, and referenced in the function callbacks. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 141 ++++++++++++++++++++++++++++++++++++++++++++ kernel/trace/trace.h | 14 +++++ kernel/trace/trace_events.c | 70 +++++++++++++++++----- 3 files changed, 210 insertions(+), 15 deletions(-) commit bca6c8d0480a8aa5c86f8f416db96c71f6b79e29 Author: Steven Rostedt (VMware) Date: Mon Apr 3 18:18:47 2017 -0400 ftrace: Pass probe ops to probe function In preparation to cleaning up the probe function registration code, the "data" parameter will eventually be removed from the probe->func() call. Instead it will receive its own "ops" function, in which it can set up its own data that it needs to map. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 2 +- kernel/trace/trace.c | 6 ++++-- kernel/trace/trace.h | 1 + kernel/trace/trace_events.c | 8 +++++--- kernel/trace/trace_functions.c | 24 ++++++++++++++++-------- 5 files changed, 27 insertions(+), 14 deletions(-) commit e51a9896794bbb819d89b803e5a8446199034853 Author: Steven Rostedt (VMware) Date: Mon Apr 3 17:43:49 2017 -0400 ftrace: Remove unused "flags" field from struct ftrace_func_probe Nothing uses "flags" in the ftrace_func_probe descriptor. Remove it. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 1 - 1 file changed, 1 deletion(-) commit 92a68fa047ca5b8e1991af2d50b23ad9452613cd Author: Steven Rostedt (VMware) Date: Fri Mar 31 19:21:41 2017 -0400 ftrace: Move the function commands into the tracing directory As nothing outside the tracing directory uses the function command mechanism, I'm moving the prototypes out of the include/linux/ftrace.h and into the local kernel/trace/trace.h header. I plan on making them hook to the trace_array structure which is local to kernel/trace, and I do not want to expose it to the rest of the kernel. This requires that the command functions must also be local to tracing. But luckily nothing else uses them. Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 19 ------------------- kernel/trace/trace.h | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 19 deletions(-) commit 1cc1f17aab7e596d0a7373fc1ed11dbddfa82bc9 Author: Josef Bacik Date: Thu Apr 20 15:47:01 2017 -0400 nbd: set the max segments to USHRT_MAX I lack the basic understanding of what segments mean, so we were being limited to 512kib requests even with higher max_sectors sizes set. Setting the maximum number of segments to unlimited allows us to actually have arbitrarily large IO's go through NBD. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 1 + 1 file changed, 1 insertion(+) commit 3e441845caf1c9591b5b961f34ff1a37d023c9e2 Author: Ralf Baechle Date: Fri Apr 21 03:28:18 2017 +0200 MIPS: Sibyte: Fix Kconfig warning. warning: (SB1XXX_CORELIS) selects DEBUG_INFO which has unmet direct dependencies (DEBUG_KERNEL && !COMPILE_TEST) Signed-off-by: Ralf Baechle arch/mips/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1d590081e3f77b364e8563d3edf83ca245a51d9 Author: Ralf Baechle Date: Fri Apr 21 03:14:51 2017 +0200 MIPS: Sibyte: Export symbol periph_rev to sb1250-mac network driver. This fixes the following modpost error: ERROR: "periph_rev" [drivers/net/ethernet/broadcom/sb1250-mac.ko] undefined! Signed-off-by: Ralf Baechle arch/mips/sibyte/bcm1480/setup.c | 1 + arch/mips/sibyte/sb1250/setup.c | 1 + 2 files changed, 2 insertions(+) commit a98e1788b005fbbf3f74f6f2325c743872dc583f Author: Ralf Baechle Date: Fri Apr 21 03:06:06 2017 +0200 NET: sb1250-mac: Add missing MODULE_LICENSE() As per comment, the code has always been GPLv2 licensed. This fixes the follwoing modpost warning: WARNING: modpost: missing MODULE_LICENSE() in drivers/net/ethernet/broadcom/sb1250-mac.o Signed-off-by: Ralf Baechle drivers/net/ethernet/broadcom/sb1250-mac.c | 1 + 1 file changed, 1 insertion(+) commit 55c05dd0295d8334a987c82cc57abe60a5d49f37 Author: Tobias Klauser Date: Thu Apr 6 08:45:22 2017 +0200 igbvf: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct igbvf_adapter, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igbvf/igbvf.h | 1 - drivers/net/ethernet/intel/igbvf/netdev.c | 26 +++++--------------------- 2 files changed, 5 insertions(+), 22 deletions(-) commit b90fa8763560aab7c75697fb324ffc73fb813ecc Author: Kim Tatt Chuah Date: Mon Mar 27 08:44:35 2017 +0800 igb: Enable reading of wake up packet Currently, in igb_resume(), igb driver ignores the Wake Up Status (WUS) and Wake Up Packet Memory (WUPM) registers. This patch enables the igb driver to read the WUPM if the controller was woken by a wake up packet that is not more than 128 bytes long (maximum WUPM size), then pass it up the kernel network stack. Signed-off-by: Kim Tatt Chuah Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/e1000_defines.h | 21 +++++++++++++++ drivers/net/ethernet/intel/igb/igb_main.c | 36 +++++++++++++++++++++++++- 2 files changed, 56 insertions(+), 1 deletion(-) commit 4827cc37796a02ece7097e01dad8e08f537ac815 Author: Yury Kylulin Date: Tue Mar 7 11:20:26 2017 +0300 igb/igbvf: Add VF MAC filter request capabilities Add functionality for the VF to request up to 3 additional MAC filters. This is done using existing E1000_VF_SET_MAC_ADDR message, but with additional message info - E1000_VF_MAC_FILTER_CLR to clear all unicast MAC filters previously set for this VF and E1000_VF_MAC_FILTER_ADD to add MAC filter. Additional filters can be added only in case if administrator did not set VF MAC explicitly and allowed to change default MAC to the VF. Due to the limited number of RAR entries reserve at least 3 MAC filters for the PF. If SRIOV is supported by the NIC after this change RAR entries starting from 1 to (RAR MAX ENTRIES - NUM SRIOV VFS) will be used for PF and VF MAC filters. Signed-off-by: Yury Kylulin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/e1000_mbx.h | 4 + drivers/net/ethernet/intel/igb/igb.h | 12 +++ drivers/net/ethernet/intel/igb/igb_main.c | 147 ++++++++++++++++++++++++++--- drivers/net/ethernet/intel/igbvf/igbvf.h | 2 + drivers/net/ethernet/intel/igbvf/mbx.h | 4 + drivers/net/ethernet/intel/igbvf/netdev.c | 44 ++++++++- drivers/net/ethernet/intel/igbvf/vf.c | 41 ++++++++ drivers/net/ethernet/intel/igbvf/vf.h | 1 + 8 files changed, 240 insertions(+), 15 deletions(-) commit 83c21335c87622215f3daa59e670cf6467baa869 Author: Yury Kylulin Date: Tue Mar 7 11:20:25 2017 +0300 igb: improve MAC filter handling Using the work which was done for ixgbe driver by Jacob Keller commit 5d7daa35b9eb ("ixgbe: improve mac filter handling") and Alexander Duyck commit 0f079d22834a ("ixgbe: Use __dev_uc_sync and __dev_uc_unsync for unicast addresses") and out-of-tree igb driver add functionality to manage (add and delete) MAC filters. Signed-off-by: Yury Kylulin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb.h | 11 ++ drivers/net/ethernet/intel/igb/igb_main.c | 246 ++++++++++++++++++++++-------- 2 files changed, 192 insertions(+), 65 deletions(-) commit 5313eeccd2d7f486be4e5c7560e3e2be239ec8f7 Author: Bernd Faust Date: Thu Feb 16 19:42:07 2017 +0100 e1000e: fix timing for 82579 Gigabit Ethernet controller After an upgrade to Linux kernel v4.x the hardware timestamps of the 82579 Gigabit Ethernet Controller are different than expected. The values that are being read are almost four times as big as before the kernel upgrade. The difference is that after the upgrade the driver sets the clock frequency to 25MHz, where before the upgrade it was set to 96MHz. Intel confirmed that the correct frequency for this network adapter is 96MHz. Signed-off-by: Bernd Faust Acked-by: Sasha Neftin Acked-by: Jacob Keller Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/netdev.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 246665db3bcdb36dbba91a64b1e560dcf948a994 Author: Bart Van Assche Date: Thu Apr 20 16:25:19 2017 -0700 blk-mq: Remove blk_mq_sched_move_to_dispatch() commit c13660a08c8b ("blk-mq-sched: change ->dispatch_requests() to ->dispatch_request()") removed the last user of this function. Hence also remove the function itself. Signed-off-by: Bart Van Assche Cc: Omar Sandoval Cc: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-sched.c | 16 ---------------- block/blk-mq-sched.h | 3 --- 2 files changed, 19 deletions(-) commit 5feeacdd4a75bc6e5c6c613ae09ef07bc5dfd05a Author: Jens Axboe Date: Thu Apr 20 17:23:13 2017 -0600 blk-mq: add might_sleep check to blk_mq_get_driver_tag() If the caller passes in wait=true, it has to be able to block for a driver tag. We just had a bug where flush insertion would block on tag allocation, while we had preempt disabled. Ensure that we catch cases like that earlier next time. Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-mq.c | 2 ++ 1 file changed, 2 insertions(+) commit 541c1662ba2076b5f28b32294c9718b56f27b645 Author: Tobias Klauser Date: Wed Feb 15 12:08:20 2017 +0100 ixgb: Omit private ndo_get_stats function ixgb_get_stats() just returns dev->stats so we can leave it out altogether and let dev_get_stats() do the job. Suggested-by: Joe Perches Signed-off-by: Tobias Klauser Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgb/ixgb_main.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 14cf2ddf089c897ed660f5b4fbfd00872f0fc619 Author: Tobias Klauser Date: Wed Feb 15 12:08:11 2017 +0100 e1000: Omit private ndo_get_stats function e1000_get_stats() just returns dev->stats so we can leave it out altogether and let dev_get_stats() do the job. Suggested-by: Joe Perches Signed-off-by: Tobias Klauser Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000/e1000_main.c | 15 --------------- 1 file changed, 15 deletions(-) commit 0206319fdfee7c36b97aa6c0561bab206132f813 Author: Stephen Bates Date: Thu Apr 20 16:59:11 2017 -0600 blk-mq: Fix poll_stat for new size-based bucketing. Fixes an issue where the size of the poll_stat array in request_queue does not match the size expected by the new size based bucketing for IO completion polling. Fixes: 720b8ccc4500 ("blk-mq: Add a polling specific stats function") Signed-off-by: Stephen Bates Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 15 +++++++++------ block/blk-mq.c | 2 -- include/linux/blkdev.h | 5 ++++- 3 files changed, 13 insertions(+), 9 deletions(-) commit b00c53e8f411a0b2be036c41852c6858541afbf7 Author: Jens Axboe Date: Thu Apr 20 16:40:36 2017 -0600 blk-mq: fix schedule-while-atomic with scheduler attached We must have dropped the ctx before we call blk_mq_sched_insert_request() with can_block=true, otherwise we risk that a flush request can block on insertion if we are currently out of tags. [ 47.667190] BUG: scheduling while atomic: jbd2/sda2-8/2089/0x00000002 [ 47.674493] Modules linked in: x86_pkg_temp_thermal btrfs xor zlib_deflate raid6_pq sr_mod cdre [ 47.690572] Preemption disabled at: [ 47.690584] [] blk_mq_sched_get_request+0x6c/0x280 [ 47.701764] CPU: 1 PID: 2089 Comm: jbd2/sda2-8 Not tainted 4.11.0-rc7+ #271 [ 47.709630] Hardware name: Dell Inc. PowerEdge T630/0NT78X, BIOS 2.3.4 11/09/2016 [ 47.718081] Call Trace: [ 47.720903] dump_stack+0x4f/0x73 [ 47.724694] ? blk_mq_sched_get_request+0x6c/0x280 [ 47.730137] __schedule_bug+0x6c/0xc0 [ 47.734314] __schedule+0x559/0x780 [ 47.738302] schedule+0x3b/0x90 [ 47.741899] io_schedule+0x11/0x40 [ 47.745788] blk_mq_get_tag+0x167/0x2a0 [ 47.750162] ? remove_wait_queue+0x70/0x70 [ 47.754901] blk_mq_get_driver_tag+0x92/0xf0 [ 47.759758] blk_mq_sched_insert_request+0x134/0x170 [ 47.765398] ? blk_account_io_start+0xd0/0x270 [ 47.770679] blk_mq_make_request+0x1b2/0x850 [ 47.775766] generic_make_request+0xf7/0x2d0 [ 47.780860] submit_bio+0x5f/0x120 [ 47.784979] ? submit_bio+0x5f/0x120 [ 47.789631] submit_bh_wbc.isra.46+0x10d/0x130 [ 47.794902] submit_bh+0xb/0x10 [ 47.798719] journal_submit_commit_record+0x190/0x210 [ 47.804686] ? _raw_spin_unlock+0x13/0x30 [ 47.809480] jbd2_journal_commit_transaction+0x180a/0x1d00 [ 47.815925] kjournald2+0xb6/0x250 [ 47.820022] ? kjournald2+0xb6/0x250 [ 47.824328] ? remove_wait_queue+0x70/0x70 [ 47.829223] kthread+0x10e/0x140 [ 47.833147] ? commit_timeout+0x10/0x10 [ 47.837742] ? kthread_create_on_node+0x40/0x40 [ 47.843122] ret_from_fork+0x29/0x40 Fixes: a4d907b6a33b ("blk-mq: streamline blk_mq_make_request") Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 6e91b74d56e169797ecf8ba64def28d6f2fd5003 Author: Herton R. Krzesinski Date: Thu Apr 20 15:57:28 2017 -0300 Documentation: allow installing man pages to a user defined directory Documentation/DocBook/Makefile hard codes the prefixed path to which you can install the built man pages (/usr/local prefix). That's unfortunate since the user may want to install to another prefix or location (for example, a distribution packaging the man pages may want to install to a random temporary location in the build process). Be flexible and allow the prefixed path to which we install man pages to be changed with the INSTALL_MAN_PATH environment variable (and use the same default as other similar variables like INSTALL_HDR_PATH). Signed-off-by: Herton R. Krzesinski Signed-off-by: Jonathan Corbet Documentation/DocBook/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit d73350568cc773863d2587b06c4d7362e4df92c7 Author: Jacob Pan Date: Fri Apr 14 11:19:24 2017 -0700 Doc/PM: Sync with intel_powerclamp code behavior Commit feb6cd6a0f9f ("thermal/intel_powerclamp: stop sched tick in forced idle") changed how idle injection accouting, so we need to update the documentation accordingly. This patch also expands more details on the behavior of cur_state. Signed-off-by: Jacob Pan Reported-by: Wang, Xiaolong Signed-off-by: Jonathan Corbet Documentation/thermal/intel_powerclamp.txt | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 50c28f803a2353d87ecce7412f3d6ae5cb80cd88 Author: Mauro Carvalho Chehab Date: Sun Apr 16 21:51:10 2017 -0300 zr364xx.rst: usb/devices is now at /sys/kernel/debug/ The /proc/bus/usb/devices got moved to sysfs. It is now sitting at: /sys/kernel/debug/usb/devices Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/media/v4l-drivers/zr364xx.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96801b35f07ec85ffd4bb542e4b0d5122d32fc9d Author: Mauro Carvalho Chehab Date: Sun Apr 16 21:51:09 2017 -0300 usb.rst: move documentation from proc_usb_info.txt to USB ReST book The contents of proc_usb_info.txt complements what's there at driver-api usb book. Yet, it is outdated, as it still refers to the USB character devices as usbfs. So, move the contents to usb.rst, adjusting it to point to the right places. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/driver-api/usb/usb.rst | 439 ++++++++++++++++++++++++++++++++--- Documentation/usb/proc_usb_info.txt | 390 ------------------------------- 2 files changed, 405 insertions(+), 424 deletions(-) commit 9b06f754133c6b22c9753586c3c2708bc509ff64 Author: Mauro Carvalho Chehab Date: Sun Apr 16 21:51:08 2017 -0300 convert philips.txt to ReST and add to media docs The philips.txt file were at the wrong place: it should be, instead, at Documentation/media. Move and convert it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/media/v4l-drivers/index.rst | 1 + Documentation/media/v4l-drivers/philips.rst | 245 ++++++++++++++++++++++++++++ drivers/media/usb/pwc/philips.txt | 236 --------------------------- 3 files changed, 246 insertions(+), 236 deletions(-) commit 8a6a285d61fd0d602859c945892927ef87d26895 Author: Mauro Carvalho Chehab Date: Sun Apr 16 21:51:06 2017 -0300 docs-rst: usb: update old usbfs-related documentation There's no usbfs anymore. The old features are now either exported to /dev/bus/usb or via debugfs. Update documentation accordingly, pointing to the new places where the character devices and usb/devices are now placed. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/driver-api/usb/usb.rst | 180 ++++++++++++---------------------- Documentation/networking/cdc_mbim.txt | 2 +- Documentation/usb/acm.txt | 2 +- Documentation/usb/gadget_serial.txt | 4 +- Documentation/usb/proc_usb_info.txt | 20 ++-- 5 files changed, 74 insertions(+), 134 deletions(-) commit 720b8ccc45002708c7db1165f72a2d3c6996dba0 Author: Stephen Bates Date: Fri Apr 7 06:24:03 2017 -0600 blk-mq: Add a polling specific stats function Rather than bucketing IO statisics based on direction only we also bucket based on the IO size. This leads to improved polling performance. Update the bucket callback function and use it in the polling latency estimation. Signed-off-by: Stephen Bates Signed-off-by: Jens Axboe block/blk-mq.c | 45 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) commit a37244e4cc5766af68004ad6249fcd0e4694b441 Author: Stephen Bates Date: Thu Apr 20 15:29:16 2017 -0600 blk-stat: convert blk-stat bucket callback to signed In order to allow for filtering of IO based on some other properties of the request than direction we allow the bucket function to return an int. If the bucket callback returns a negative do no count it in the stats accumulation. Signed-off-by: Stephen Bates Fixed up Kyber scheduler stat callback. Signed-off-by: Jens Axboe block/blk-stat.c | 6 ++++-- block/blk-stat.h | 9 +++++---- block/kyber-iosched.c | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) commit 675e508f53e2cc0b1ab750a0ff2b477ccbab4cfb Author: Trond Myklebust Date: Thu Apr 20 16:58:50 2017 -0400 pNFS: unexport nfs4_pnfs_v3_ds_connect_unload It is not used outside the NFSv4 module. Signed-off-by: Trond Myklebust fs/nfs/pnfs_nfs.c | 1 - 1 file changed, 1 deletion(-) commit b94196888feaedc93d659572f556207f1564acd6 Author: Trond Myklebust Date: Thu Apr 20 16:53:58 2017 -0400 pNFS: Unexport pnfs_put_lseg_locked and _pnfs_return_layout They are not used outside the NFSv4 module. Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 2 -- 1 file changed, 2 deletions(-) commit 73504740df253b653ba7df4bd98e170b72cfd58b Author: Trond Myklebust Date: Thu Apr 20 16:48:14 2017 -0400 pNFS: Remove unused layout driver callbacks encode_layoutreturn and encode_layoutcommit are now unused. Let's remove them. Signed-off-by: Trond Myklebust fs/nfs/nfs4xdr.c | 17 ++++------------- fs/nfs/pnfs.h | 5 ----- 2 files changed, 4 insertions(+), 18 deletions(-) commit 4418b27b525b688777b27b9aa8e7b43de7ac037a Author: Markus Elfring Date: Thu Feb 16 09:30:55 2017 +0100 IB/hns: Use kcalloc() in hns_roce_buddy_init() * Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. * Replace the specification of data types by pointer dereferences to make the corresponding size determinations a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_mr.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit e1d717de5d17157a87d33de87c4fec52ccf35639 Author: Markus Elfring Date: Thu Feb 16 08:50:11 2017 +0100 IB/hns: Use kmalloc_array() in hns_roce_cmd_use_events() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data structure by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 527376c89caf59537d8e5c9f14d7caa940bd563b Author: Darren Hart (VMware) Date: Wed Apr 19 18:54:45 2017 -0700 platform/x86: hp-wmi: Cleanup exit paths Several exit paths were more complex than they needed to be. Remove superfluous conditionals, use labels common cleanup, do not shadow negative error codes. Signed-off-by: Darren Hart (VMware) Tested-by: Carlo Caione Reviewed-by: Andy Shevchenko drivers/platform/x86/hp-wmi.c | 63 ++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 30 deletions(-) commit a055f9ecb5b4d0cb8b33ba664363a2ed7804a6c7 Author: Darren Hart (VMware) Date: Wed Apr 19 18:11:33 2017 -0700 platform/x86: hp-wmi: Do not shadow errors in sysfs show functions The new hp_wmi_read_int function returns a negative value in case of error, pass this on directly rather than always replacing it with -EINVAL. Signed-off-by: Darren Hart (VMware) Tested-by: Carlo Caione Reviewed-by: Andy Shevchenko drivers/platform/x86/hp-wmi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c21ee12f460c33fcc12fe162c9ab98f3c58073aa Author: Darren Hart (VMware) Date: Wed Apr 19 17:26:38 2017 -0700 platform/x86: hp-wmi: Use DEVICE_ATTR_(RO|RW) helper macros Use the DEVICE_ATTR_(RO|RW) macros, ranaming the show and store functions accordingly. Signed-off-by: Darren Hart (VMware) Tested-by: Carlo Caione Reviewed-by: Andy Shevchenko drivers/platform/x86/hp-wmi.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit f9cf3b2880cc41ec2b44aa24fa156bffe934f9c7 Author: Darren Hart (VMware) Date: Wed Apr 19 17:03:38 2017 -0700 platform/x86: hp-wmi: Refactor dock and tablet state fetchers Both dock and tablet use the HPWMI_HARDWARE_QUERY, but require different masks. Rather than using two functions with magic masks, define the masks, and use a common accessor. Signed-off-by: Darren Hart (VMware) Tested-by: Carlo Caione Reviewed-by: Andy Shevchenko drivers/platform/x86/hp-wmi.c | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) commit c7ef144c12033052c956ca9d80b2dfc19c73d939 Author: Darren Hart (VMware) Date: Wed Apr 19 18:00:01 2017 -0700 platform/x86: hp-wmi: Cleanup wireless get_(hw|sw)state functions Use the new hp_wmi_read_int() function and add a WARN_ONCE() to the TBD regarding passing the error through. These are used in a null return function unfortunately. Signed-off-by: Darren Hart (VMware) Tested-by: Carlo Caione Reviewed-by: Andy Shevchenko drivers/platform/x86/hp-wmi.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit ea621d9fe372b4a6ca2b513c13a37c24a668c35f Author: Darren Hart (VMware) Date: Wed Apr 19 16:26:06 2017 -0700 platform/x86: hp-wmi: Refactor redundant HPWMI_READ functions Several functions perform the same WMI read int with different query arguments. Refactor this into a single hp_wmi_read_int function. Signed-off-by: Darren Hart (VMware) Tested-by: Carlo Caione Reviewed-by: Andy Shevchenko drivers/platform/x86/hp-wmi.c | 82 +++++++++++++------------------------------ 1 file changed, 24 insertions(+), 58 deletions(-) commit 6905e5a5c8d552ace1d65cacb43499a0eb1e0b89 Author: Dan Carpenter Date: Wed Apr 19 12:59:15 2017 +0300 net/mlx5e: IPoIB, Fix error handling in mlx5_rdma_netdev_alloc() The labels were out of order, so it either could result in an Oops or a leak. Fixes: 48935bbb7ae8 ("net/mlx5e: IPoIB, Add netdevice profile skeleton") Signed-off-by: Dan Carpenter Acked-by: Leon Romanovsky Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d8193cff33906e24ac1830ecb2ca95833d058a3a Author: Darren Hart (VMware) Date: Wed Apr 19 15:42:01 2017 -0700 platform/x86: hp-wmi: Standardize enum usage for constants Use enums consistently throughout the hp-wmi driver for groups of related constants. Use hex and align the assignment within groups. Move the *QUERY constants into an enum, create a new enum defining the READ, WRITE, and ODM constants and use them instead of 0 and 1 at the call sites. Set the command directly instead of using the ternary operator since both 1 and 3 as previously documented would result in the command being set to 0x2. Signed-off-by: Darren Hart (VMware) Tested-by: Carlo Caione Reviewed-by: Andy Shevchenko drivers/platform/x86/hp-wmi.c | 132 +++++++++++++++++++++++------------------- 1 file changed, 74 insertions(+), 58 deletions(-) commit 97b20ef784388753becb41b27876a048e905fe9b Author: NeilBrown Date: Thu Apr 13 08:53:48 2017 +1000 md: handle read-only member devices better. 1/ If an array has any read-only devices when it is started, the array itself must be read-only 2/ A read-only device cannot be added to an array after it is started. 3/ Setting an array to read-write should not succeed if any member devices are read-only Reported-and-Tested-by: Nanda Kishore Chinnaram Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) commit db6f0289f59950548ae86982ca9a84423a58401c Author: Markus Elfring Date: Fri Feb 10 21:45:38 2017 +0100 IB/hfi1: Coding style improvement (make sizeof use safer) Replace the specification of a data structure by a reference to the desired member as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_sdma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e036c2006c77c750d0f553e1b484b029e231d7ee Author: Markus Elfring Date: Fri Feb 10 08:50:45 2017 +0100 IB/hfi1: Remove intermediate var in hfi1_user_sdma_alloc_queues() * Pass a product for a call of the function "vmalloc_user" without storing it in an intermediate variable. * Delete the local variable "memsize" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_sdma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 147d84e1e3a0d0920004362d3f4f6d2d24581508 Author: Markus Elfring Date: Thu Feb 9 16:06:12 2017 +0100 IB/hfi1: Use kcalloc() in hfi1_user_sdma_alloc_queues() * Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus reuse the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_sdma.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 4076e5187ddc2aac7b66c72c3cb365aeee1f8b28 Author: Markus Elfring Date: Thu Feb 9 15:30:53 2017 +0100 IB/hfi1: Use kcalloc() in hfi1_user_exp_rcv_init() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus reuse the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_exp_rcv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f6ca26f26837f90727a1450f010a1638834e34e1 Author: Dan Carpenter Date: Wed Apr 19 12:54:33 2017 +0300 qede: allocate enough data for ->arfs_fltr_bmap We've got the number of longs, yes, but we should multiply by sizeof(long) to get the number of bytes needed. Fixes: e4917d46a653 ("qede: Add aRFS support") Signed-off-by: Dan Carpenter Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d6ecf32805502cf76c61084c83a08ac42f9be4e5 Author: Chema Gonzalez Date: Tue Apr 18 19:22:23 2017 -0700 tcp_cubic: fix typo in module param description Signed-off-by: Chema Gonzalez Signed-off-by: David S. Miller net/ipv4/tcp_cubic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b603aa4d3287e910fb79a511953ac150a8d3dde4 Author: Jamal Hadi Salim Date: Tue Apr 18 21:24:00 2017 -0400 Add Jiri Pirko as TC subsystem co-maintainer Signed-off-by: Jamal Hadi Salim Acked-by: Jiri Pirko Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 7ab273be23e6cadedfd680556758e77bf522807b Author: Jamal Hadi Salim Date: Tue Apr 18 21:23:59 2017 -0400 Add Cong Wang as TC subsystem co-maintainer Signed-off-by: Jamal Hadi Salim Acked-by: Cong Wang Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 09eb03f0598a9ef7e0d5eb440c6b7c15685f0cbf Author: Tobias Klauser Date: Tue Apr 18 15:40:03 2017 +0200 fpga: region: add missing DT documentation for config complete timeout Commit 42d5ec954719 ("fpga: add config complete timeout") introduced the config complete property but didn't include the corresponding DT binding documentation. Add it now. Signed-off-by: Tobias Klauser Reviewed-by: Moritz Fischer Signed-off-by: Rob Herring Documentation/devicetree/bindings/fpga/fpga-region.txt | 2 ++ 1 file changed, 2 insertions(+) commit a9a42886d0b3b989166472b7ea59b1c157d90f9b Author: Joe Perches Date: Thu Feb 9 14:23:51 2017 -0800 cxgb4: Convert PDBG to pr_debug Use a more typical logging style. Miscellanea: o Obsolete the c4iw_debug module parameter o Coalesce formats o Realign arguments Signed-off-by: Joe Perches Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 303 +++++++++++++++++---------------- drivers/infiniband/hw/cxgb4/cq.c | 71 ++++---- drivers/infiniband/hw/cxgb4/device.c | 58 +++---- drivers/infiniband/hw/cxgb4/ev.c | 29 ++-- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 44 +++-- drivers/infiniband/hw/cxgb4/mem.c | 28 +-- drivers/infiniband/hw/cxgb4/provider.c | 38 ++--- drivers/infiniband/hw/cxgb4/qp.c | 91 +++++----- drivers/infiniband/hw/cxgb4/resource.c | 46 ++--- drivers/infiniband/hw/cxgb4/t4.h | 22 +-- 10 files changed, 368 insertions(+), 362 deletions(-) commit 700456bd25946ef531773d1ad2dd511e1cc4515e Author: Joe Perches Date: Thu Feb 9 14:23:50 2017 -0800 cxgb4: Use more common logging style Convert printks to pr_ Miscellanea: o Coalesce formats o Realign arguments Signed-off-by: Joe Perches Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 84 +++++++++++++++------------------- drivers/infiniband/hw/cxgb4/cq.c | 8 ++-- drivers/infiniband/hw/cxgb4/device.c | 83 ++++++++++++++------------------- drivers/infiniband/hw/cxgb4/ev.c | 10 ++-- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 6 +++ drivers/infiniband/hw/cxgb4/mem.c | 6 +-- drivers/infiniband/hw/cxgb4/provider.c | 4 +- drivers/infiniband/hw/cxgb4/qp.c | 5 +- drivers/infiniband/hw/cxgb4/resource.c | 18 +++----- drivers/infiniband/hw/cxgb4/t4.h | 2 +- 10 files changed, 97 insertions(+), 129 deletions(-) commit b7b37ee0e137c8384c6cb3a37c4621649d5acdf6 Author: Joe Perches Date: Thu Feb 9 14:23:49 2017 -0800 cxgb3: Convert PDBG to pr_debug Using the normal mechanism, not an indirected one, is clearer. Miscellanea: o Coalesce formats o Realign arguments Signed-off-by: Joe Perches Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb3/cxio_dbg.c | 35 ++--- drivers/infiniband/hw/cxgb3/cxio_hal.c | 174 ++++++++++++------------ drivers/infiniband/hw/cxgb3/cxio_hal.h | 2 - drivers/infiniband/hw/cxgb3/cxio_resource.c | 20 +-- drivers/infiniband/hw/cxgb3/iwch.c | 6 +- drivers/infiniband/hw/cxgb3/iwch_cm.c | 203 ++++++++++++++-------------- drivers/infiniband/hw/cxgb3/iwch_cm.h | 18 +-- drivers/infiniband/hw/cxgb3/iwch_cq.c | 14 +- drivers/infiniband/hw/cxgb3/iwch_ev.c | 15 +- drivers/infiniband/hw/cxgb3/iwch_mem.c | 2 +- drivers/infiniband/hw/cxgb3/iwch_provider.c | 101 +++++++------- drivers/infiniband/hw/cxgb3/iwch_provider.h | 9 +- drivers/infiniband/hw/cxgb3/iwch_qp.c | 60 ++++---- 13 files changed, 329 insertions(+), 330 deletions(-) commit 46b2d4e8eca752003b903e68c3bec6b15fd7eba0 Author: Joe Perches Date: Thu Feb 9 14:23:48 2017 -0800 cxgb3: Use more common logging style Convert printks to pr_ Miscellanea: o Coalesce formats o Realign arguments Signed-off-by: Joe Perches Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb3/cxio_hal.c | 27 ++++++------ drivers/infiniband/hw/cxgb3/cxio_hal.h | 9 +++- drivers/infiniband/hw/cxgb3/cxio_resource.c | 5 ++- drivers/infiniband/hw/cxgb3/iwch.c | 13 +++--- drivers/infiniband/hw/cxgb3/iwch_cm.c | 66 ++++++++++++----------------- drivers/infiniband/hw/cxgb3/iwch_cq.c | 7 ++- drivers/infiniband/hw/cxgb3/iwch_ev.c | 11 +++-- drivers/infiniband/hw/cxgb3/iwch_provider.c | 11 ++--- drivers/infiniband/hw/cxgb3/iwch_qp.c | 7 ++- 9 files changed, 70 insertions(+), 86 deletions(-) commit a5f62ca68f6ac4b3159c6b584a1a1669132d98dc Merge: 0bd8406 18a8cc9 Author: David S. Miller Date: Thu Apr 20 16:10:31 2017 -0400 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2017-04-18 This series contains updates to mainly ixgbe with only one ixgbevf change. Usha adds a check to ensure the creation of number of VF's is valid based on the traffic classes configured, all to avoid transmit hangs. Joe Perches reduces the use of pr_cont since the output can be interleaved by other processes. Tony cleans up the code overwriting the KX4 config, which is configured by the NVM. Adds a check for MMNGC.MNG_VETO, to resolve an issue where we were getting a link loss for the BMC when loading the driver. Don fixes up SGMII x553 config details which were missed in earlier implementations. Added support for x552 XFI backplane interface support. Cleaned up an unused define, which was causing confusion on supported devices. Emil fixes a link issue on KR parts by making sure the default setting is set. Refactors the code so that the code for allocating memory for the list of MAC addresses that the VFs can use into its own function. Made some code cleans to help readability and ensure notification of SRIOV being enabled is done upon completion. Fixed an issue where if we failed to allocate vfinfo in __ixgbe_enable_sriov() the driver would crash with a NULL pointer dereference. Philippe Reynes updates ixgbevf to use the new API for {get|set}_link_ksettings. Alex increases the headroom allocation when using build_skb() on a system with 4K pages. Fixed an issue in ixgbe_dump() where we were no longer clearing the status bit. ==================== Signed-off-by: David S. Miller commit 7c2a3e944821bf8324976886b97fed8a7025eb3d Author: Perr Zhang Date: Thu Apr 20 12:58:40 2017 +0800 arm: Documentation: update a path name the path in the example cmd is out of date, and the path for now is also mentioned in the same file Signed-off-by: Perr Zhang Signed-off-by: Jonathan Corbet Documentation/arm/mem_alignment | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b9355a2692621be80f95ac31e16d2c16c1c07c9 Author: Andrew Clayton Date: Thu Apr 20 14:04:15 2017 +0100 docs: process/4.Coding.rst: Fix a couple of document refs In Documentation/process/4.Coding.rst there were a couple of paragraphs that spilled over the 80 character line length. This was likely caused when the document was converted to reStructuredText. Re-flow the paragraphs and make the document references proper reStructuredText :ref: links. This also adds the appropriate reStructuredText file heading to kernel-parameters.rst as referenced by the kernel-parameters link in this patch. Signed-off-by: Andrew Clayton Reviewed-by: Jani Nikula Signed-off-by: Jonathan Corbet Documentation/admin-guide/kernel-parameters.rst | 2 ++ Documentation/process/4.Coding.rst | 17 +++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) commit 6d22323b2e9f95f99aa6f3e93c302f8100277078 Author: Christoph Hellwig Date: Wed Apr 12 18:01:08 2017 +0200 nfs: remove the objlayout driver The objlayout code has been in the tree, but it's been unmaintained and no server product for it actually ever shipped. Signed-off-by: Christoph Hellwig Signed-off-by: Trond Myklebust Documentation/admin-guide/kernel-parameters.txt | 6 - Documentation/filesystems/nfs/pnfs.txt | 37 -- fs/nfs/Kconfig | 5 - fs/nfs/Makefile | 1 - fs/nfs/objlayout/Kbuild | 5 - fs/nfs/objlayout/objio_osd.c | 675 ---------------------- fs/nfs/objlayout/objlayout.c | 706 ------------------------ fs/nfs/objlayout/objlayout.h | 183 ------ fs/nfs/objlayout/pnfs_osd_xdr_cli.c | 415 -------------- 9 files changed, 2033 deletions(-) commit 0bd84065b19bca12f07f288c8ea470e2c1b2de7a Author: subashab@codeaurora.org Date: Tue Apr 18 11:39:41 2017 -0600 net: ipv6: Fix UDP early demux lookup with udp_l3mdev_accept=0 David Ahern reported that 5425077d73e0c ("net: ipv6: Add early demux handler for UDP unicast") breaks udp_l3mdev_accept=0 since early demux for IPv6 UDP was doing a generic socket lookup which does not require an exact match. Fix this by making UDPv6 early demux match connected sockets only. v1->v2: Take reference to socket after match as suggested by Eric v2->v3: Add comment before break Fixes: 5425077d73e0c ("net: ipv6: Add early demux handler for UDP unicast") Reported-by: David Ahern Signed-off-by: Subash Abhinov Kasiviswanathan Cc: Eric Dumazet Acked-by: David Ahern Tested-by: David Ahern Signed-off-by: David S. Miller net/ipv6/udp.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 8ad0921b8a526f64a2bdf7fe17b82dd2db84f152 Merge: d02e93d 0f9fa83 Author: David S. Miller Date: Thu Apr 20 15:42:11 2017 -0400 Merge branch 'tcp_poll-flakes' Eric Dumazet says: ==================== tcp: address two poll() flakes Some packetdrill tests are failing when host kernel is using ASAN or other debugging infrastructure. I was able to fix the flakes by making sure we were not sending wakeup events too soon. ==================== Signed-off-by: David S. Miller commit 0f9fa831aecfc297b7b45d4f046759bcefcf87f0 Author: Eric Dumazet Date: Tue Apr 18 09:45:52 2017 -0700 tcp: remove poll() flakes with FastOpen When using TCP FastOpen for an active session, we send one wakeup event from tcp_finish_connect(), right before the data eventually contained in the received SYNACK is queued to sk->sk_receive_queue. This means that depending on machine load or luck, poll() users might receive POLLOUT events instead of POLLIN|POLLOUT To fix this, we need to move the call to sk->sk_state_change() after the (optional) call to tcp_rcv_fastopen_synack() Signed-off-by: Eric Dumazet Acked-by: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 3d4762639dd36a5f0f433f0c9d82e9743dc21a33 Author: Eric Dumazet Date: Tue Apr 18 09:45:51 2017 -0700 tcp: remove poll() flakes when receiving RST When a RST packet is processed, we send two wakeup events to interested polling users. First one by a sk->sk_error_report(sk) from tcp_reset(), followed by a sk->sk_state_change(sk) from tcp_done(). Depending on machine load and luck, poll() can either return POLLERR, or POLLIN|POLLOUT|POLLERR|POLLHUP (this happens on 99 % of the cases) This is probably fine, but we can avoid the confusion by reordering things so that we have more TCP fields updated before the first wakeup. This might even allow us to remove some barriers we added in the past. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d02e93d6471c44cc80e407f2c9791bc00fed2e91 Merge: fada43c 9d41acc Author: David S. Miller Date: Thu Apr 20 15:32:32 2017 -0400 Merge branch 'mlxsw-flow-based-forwarding-OVS' Jiri Pirko says: ==================== mlxsw: Allow flow based forwarding in OVS This patchset does some fixes so the HW is setup correctly to do flow-based (ACL based) forwarding for OVS-enslaved port. The first patch is just trivial fix spotted on the way. Patches 2-4 take care of proper FID setup which HW needs in order to for ACL based forwarding. The 7th patch (with dependency of patch 5 and 6) takes care of proper setup of ports that are enslaved in OVS. The last patch implements new FID miss trap that is used to push packets belonging to unknown flows to kernel and userspace. ==================== Signed-off-by: David S. Miller commit 9d41accc1e917d071497d749e9686ba6db91517e Author: Jiri Pirko Date: Tue Apr 18 16:55:38 2017 +0200 mlxsw: spectrum: Add FID miss trap When there is no FID set for a specific packet, the HW will drop it. However, by default these packets are useful to be delivered to CPU as it can inspect them and program HW accordingly. So add this trap. This would only ever happen when port is enslaved to an OVS master. Otherwise, packets would be dropped during VLAN / STP filtering, before FID classification. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 + drivers/net/ethernet/mellanox/mlxsw/trap.h | 1 + 2 files changed, 2 insertions(+) commit 2b94e58df58c93e5d74714d7cb5ac924e2089118 Author: Jiri Pirko Date: Tue Apr 18 16:55:37 2017 +0200 mlxsw: spectrum: Allow ports to work under OVS master >From now on, a port can become a slave of OVS master. All vlans are enabled, STP state is set to "forwarding". It is up to the OVS userspace daemon to setup the flows either in kernel or in HW using TC flower offload. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 62 +++++++++++++++++++++- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 4 +- 2 files changed, 64 insertions(+), 2 deletions(-) commit 5be661412762bbef45a55eaf1e6847258d69b3a4 Author: Jiri Pirko Date: Tue Apr 18 16:55:36 2017 +0200 net: add netif_is_ovs_port helper To find out if a netdev is an OVS port. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller include/linux/netdevice.h | 5 +++++ 1 file changed, 5 insertions(+) commit 93cd081305092929a8be1ebed9eb5bcbe54e4b7d Author: Jiri Pirko Date: Tue Apr 18 16:55:35 2017 +0200 mlxsw: spectrum: Teach mlxsw_sp_port_vlan_set to accept any vlan range So far, mlxsw_sp_port_vlan_set range is limited by MLXSW_REG_SPVM_REC_MAX_COUNT. In spectrum_switchdev code this is wrapped up by a helper function which actually does multiple calls to FW for bigger ranges. Move the code into mlxsw_sp_port_vlan_set and use it always. That allows caller not to care about the range. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 25 ++++++++++++++-- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 33 ++++------------------ 2 files changed, 29 insertions(+), 29 deletions(-) commit cedbb8b25948764689385075fce793e63fab9973 Author: Jiri Pirko Date: Tue Apr 18 16:55:34 2017 +0200 mlxsw: spectrum_flower: Set dummy FID before forward action HW requires the FID to be valid in order for the forward action to work. So regardless of the current FID validity, just set the dummy FID which would do the trick. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 5 +++++ 1 file changed, 5 insertions(+) commit 202d6f423c8a9600d645becf8a0b6ba908411c3f Author: Jiri Pirko Date: Tue Apr 18 16:55:33 2017 +0200 mlxsw: spectrum: Add dummy FID initialization For forwarding using ACL action, HW needs a valid FID to be setup. It does not actually use it, so it can be any valid FID. So create a dummy FID only for this purpose. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 21 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 +++- 2 files changed, 24 insertions(+), 1 deletion(-) commit ac44dd43d8c99f33552ddb0c96a4624b143f505d Author: Jiri Pirko Date: Tue Apr 18 16:55:32 2017 +0200 mlxsw: spectrum: Implement action to set FID Implement part of multipurpose Virtual Router and Forwarding Domain Action that takes care of setting up FID. We need to use it to be able to forward packets using ACL action when no FID is associated on RX. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller .../mellanox/mlxsw/core_acl_flex_actions.c | 44 ++++++++++++++++++++++ .../mellanox/mlxsw/core_acl_flex_actions.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 7 ++++ 4 files changed, 55 insertions(+) commit b51df799f6a804297c7cb4f0d19570c4ae3d19b3 Author: Jiri Pirko Date: Tue Apr 18 16:55:31 2017 +0200 mlxsw: spectrum: Fix indent in mlxsw_sp_netdevice_port_upper_event Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fada43ccc84e225fe8d3804878a4028def7f85a5 Author: Niklas Cassel Date: Tue Apr 18 14:39:53 2017 +0200 bindings: net: stmmac: add missing note about LPI interrupt The hardware has a LPI interrupt. There is already code in the stmmac driver to parse and handle the interrupt. However, this information was missing from the DT binding. At the same time, improve the description of the existing interrupts. Signed-off-by: Niklas Cassel Acked-By: Joao Pinto Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/stmmac.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 1f504ec9896ba682270c2ffc119f93eb8ac064ee Author: Tobias Klauser Date: Tue Apr 18 11:27:00 2017 +0200 bpf: remove reference to sock_filter_ext from kerneldoc comment struct sock_filter_ext didn't make it into the tree and is now called struct bpf_insn. Reword the kerneldoc comment for bpf_convert_filter() accordingly. Signed-off-by: Tobias Klauser Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cd565b4b51e5fe258d6ce9ddc167ee51f3044ba5 Author: Erez Shitrit Date: Mon Apr 10 11:22:30 2017 +0300 IB/IPoIB: Support acceleration options callbacks IPoIB driver now uses the new set of callback functions. If the hardware provider supports the new ipoib_options implementation, the driver uses the callbacks in its data path flows, otherwise it uses the driver default implementation for all data flows in its code. The default implementation wasn't change and it is exactly as it was before introduction of acceleration support. Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib.h | 29 +++-- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 52 +++++---- drivers/infiniband/ulp/ipoib/ipoib_main.c | 145 +++++++++++++++++++------ drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 15 ++- drivers/infiniband/ulp/ipoib/ipoib_netlink.c | 2 +- drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 16 ++- drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 5 +- 7 files changed, 188 insertions(+), 76 deletions(-) commit c1048aff7e62bc561603fd14ad84b975ad7085b6 Author: Erez Shitrit Date: Mon Apr 10 11:22:29 2017 +0300 IB/IPoIB: Use defined function for netdev_priv function Make ipoib_priv point to netdev_priv where the code calls netdev_priv. Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib.h | 11 ++-- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 67 ++++++++++---------- drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 6 +- drivers/infiniband/ulp/ipoib/ipoib_fs.c | 4 +- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 46 +++++++------- drivers/infiniband/ulp/ipoib/ipoib_main.c | 84 +++++++++++++------------- drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 24 ++++---- drivers/infiniband/ulp/ipoib/ipoib_netlink.c | 11 ++-- drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 8 +-- drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 4 +- 10 files changed, 136 insertions(+), 129 deletions(-) commit 10adcbd2d5a085dad89ca2857e436a907c435273 Author: Erez Shitrit Date: Mon Apr 10 11:22:28 2017 +0300 IB/IPoIB: Rename qpn to be dqpn in ipoib_send and post_send functions Change of function parameter name from qpn to be dqpn. Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib.h | 2 +- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) commit 7ce1a3ee02642a9677662d0786732027ff729cda Author: Erez Shitrit Date: Mon Apr 10 11:22:27 2017 +0300 IB/IPoIB: Separate control from HW operation on ipoib_open/stop ndo This patch is preparing the netdev part at the IPoIB driver to be able to use the ipoib_options. It deals with the two flows from the .ndo: ipoib_open and ipoib_stop. The code is rearranged as follows: * All operations which deal with the hardware resources, (for example change QP state, post-receive etc.) are performed in one place. * All operations that are control oriented (like restart multicast task, start the reap_ah etc.) are performed in separate place. The functions that deal with the hardware resources now located at __ipoib_ib_dev_open for the ipoib_open flow and __ipoib_ib_dev_stop for ipoib_stop. Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib.h | 2 +- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 230 +++++++++++++++++------------- drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +- 3 files changed, 131 insertions(+), 103 deletions(-) commit 515ed4f3aab4e8a0855d0cdfd9753a419ccfb297 Author: Erez Shitrit Date: Mon Apr 10 11:22:26 2017 +0300 IB/IPoIB: Separate control and data related initializations This patch prepares init and teardown flows so we can call them through ipoib_options function pointers. It arranges that area of code as the following: * All operations which deal with the resource allocation/deletion are performed in one place. * All operations that are control oriented, meaning that they are not connected to a specific hardware, are performed in a separate place. The operations for allocation of hardware resources are now in the function ipoib_dev_init_default, and the deletion of all the resources are in ipoib_dev_uninit_default The only exception is the creation of the PD object, which is used both for resource allocation (create QP etc.) and for control flows like creating AH. It also does: * Move creation of rx_ring and tx_ring to be in the resources allocation area. * Move the function ipoib_ib_dev_open that does the open device to the control area instead of the dev_init which creates resources. Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib.h | 3 +- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 38 +++------- drivers/infiniband/ulp/ipoib/ipoib_main.c | 116 ++++++++++++++++++++++++----- drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 40 +--------- 4 files changed, 109 insertions(+), 88 deletions(-) commit f0ad83ac58468e3807e72e929317519b69bcde1c Author: Niranjana Vishwanathapura Date: Mon Apr 10 11:22:25 2017 +0300 IB/IPoIB: Introduce RDMA netdev interface and IPoIB structs Add RDMA netdev interface to ib device structure allowing RDMA netdev devices to be allocated by ib clients. The idea is to allow to providers to optimize IPoIB data path. New struct that includes functions and data member is exposed. It exposes set of callback functions for handling data path flows in IPoIB driver. Each provider can support these set of functions in order to optimize its specific data path, and let IPoIB to leverage its data path. There is an assumption, that providers should give the full set of functions and not only part of them, in order to work properly. Signed-off-by: Erez Shitrit Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 64551ede6cd1c9f814951914e23ef1d2a9498f71 Author: Vishwanathapura, Niranjana Date: Wed Apr 12 20:29:30 2017 -0700 IB/hfi1: VNIC SDMA support HFI1 VNIC SDMA support enables transmission of VNIC packets over SDMA. Map VNIC queues to SDMA engines and support halting and wakeup of the VNIC queues. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/Makefile | 2 +- drivers/infiniband/hw/hfi1/hfi.h | 1 + drivers/infiniband/hw/hfi1/init.c | 1 + drivers/infiniband/hw/hfi1/vnic.h | 28 +++ drivers/infiniband/hw/hfi1/vnic_main.c | 24 ++- drivers/infiniband/hw/hfi1/vnic_sdma.c | 323 +++++++++++++++++++++++++++++++++ 6 files changed, 376 insertions(+), 3 deletions(-) commit 2280740f01aee0883a2885f332aee27449390a4b Author: Vishwanathapura, Niranjana Date: Wed Apr 12 20:29:29 2017 -0700 IB/hfi1: Virtual Network Interface Controller (VNIC) HW support HFI1 HW specific support for VNIC functionality. Dynamically allocate a set of contexts for VNIC when the first vnic port is instantiated. Allocate VNIC contexts from user contexts pool and return them back to the same pool while freeing up. Set aside enough MSI-X interrupts for VNIC contexts and assign them when the contexts are allocated. On the receive side, use an RSM rule to spread TCP/UDP streams among VNIC contexts. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andrzej Kacprowski Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/aspm.h | 15 +- drivers/infiniband/hw/hfi1/chip.c | 291 +++++++++++++++++++++++++----- drivers/infiniband/hw/hfi1/chip.h | 2 + drivers/infiniband/hw/hfi1/debugfs.c | 10 +- drivers/infiniband/hw/hfi1/driver.c | 52 ++++-- drivers/infiniband/hw/hfi1/file_ops.c | 27 ++- drivers/infiniband/hw/hfi1/hfi.h | 29 ++- drivers/infiniband/hw/hfi1/init.c | 29 +-- drivers/infiniband/hw/hfi1/mad.c | 10 +- drivers/infiniband/hw/hfi1/pio.c | 19 +- drivers/infiniband/hw/hfi1/pio.h | 8 +- drivers/infiniband/hw/hfi1/sysfs.c | 4 +- drivers/infiniband/hw/hfi1/user_exp_rcv.c | 8 +- drivers/infiniband/hw/hfi1/user_pages.c | 5 +- drivers/infiniband/hw/hfi1/verbs.c | 6 +- drivers/infiniband/hw/hfi1/vnic.h | 3 + drivers/infiniband/hw/hfi1/vnic_main.c | 245 ++++++++++++++++++++++++- include/rdma/opa_port_info.h | 3 +- 18 files changed, 661 insertions(+), 105 deletions(-) commit f26c5719b2d7b00de69eb83eb1c1c831759fdc9b Author: Dan Williams Date: Wed Apr 12 12:35:44 2017 -0700 dm: add dax_device and dax_operations support Allocate a dax_device to represent the capacity of a device-mapper instance. Provide a ->direct_access() method via the new dax_operations indirection that mirrors the functionality of the current direct_access support via block_device_operations. Once fs/dax.c has been converted to use dax_operations the old dm_blk_direct_access() will be removed. A new helper dm_dax_get_live_target() is introduced to separate some of the dm-specifics from the direct_access implementation. This enabling is only for the top-level dm representation to upper layers. Converting target direct_access implementations is deferred to a separate patch. Cc: Toshi Kani Reviewed-by: Mike Snitzer Signed-off-by: Dan Williams drivers/md/Kconfig | 1 + drivers/md/dm-core.h | 1 + drivers/md/dm.c | 84 +++++++++++++++++++++++++++++++++++-------- include/linux/device-mapper.h | 1 + 4 files changed, 73 insertions(+), 14 deletions(-) commit b0686260fecaa924d8eff2ace94bee70506bc308 Author: Dan Williams Date: Thu Jan 26 20:37:35 2017 -0800 dax: introduce dax_direct_access() Replace bdev_direct_access() with dax_direct_access() that uses dax_device and dax_operations instead of a block_device and block_device_operations for dax. Once all consumers of the old api have been converted bdev_direct_access() will be deleted. Given that block device partitioning decisions can cause dax page alignment constraints to be violated this also introduces the bdev_dax_pgoff() helper. It handles calculating a logical pgoff relative to the dax_device and also checks for page alignment. Signed-off-by: Dan Williams block/Kconfig | 1 + drivers/dax/super.c | 39 +++++++++++++++++++++++++++++++++++++++ fs/block_dev.c | 14 ++++++++++++++ include/linux/blkdev.h | 1 + include/linux/dax.h | 2 ++ 5 files changed, 57 insertions(+) commit d8f07aee3f2fd959878bf614d4e984900018eb9e Author: Dan Williams Date: Thu Jan 26 23:30:05 2017 -0800 block: kill bdev_dax_capable() This is leftover dead code that has since been replaced by bdev_dax_supported(). Signed-off-by: Dan Williams fs/block_dev.c | 24 ------------------------ include/linux/blkdev.h | 1 - 2 files changed, 25 deletions(-) commit 260f32adb88dadfaac29f47f761a088238ca164c Author: Trond Myklebust Date: Thu Apr 20 14:33:06 2017 -0400 pNFS/flexfiles: Check the result of nfs4_pnfs_ds_connect The check in nfs4_ff_layout_prepare_ds() seems to be missing. Signed-off-by: Trond Myklebust Fixes: a33e4b036d461 ("pNFS: return status from nfs4_pnfs_ds_connect") Cc: Weston Andros Adamson Cc: stable@vger.kernel.org # v4.11 fs/nfs/flexfilelayout/flexfilelayoutdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1edb632133efb6226b6bef3e7d9fa8c7134ac4e2 Author: Marc Zyngier Date: Thu Apr 20 16:02:21 2017 +0100 ARM: KVM: Fix idmap stub entry when running Thumb-2 code When entering the hyp stub implemented in the idmap, we try to be mindful of the fact that we could be running a Thumb-2 kernel by adding 1 to the address we compute. Unfortunately, the assembler also knows about this trick, and has already generated an address that has bit 0 set in the litteral pool. Our superfluous correction ends up confusing the CPU entierely, as we now branch to the stub in ARM mode instead of Thumb, and on a possibly unaligned address for good measure. From that point, nothing really good happens. The obvious fix in to remove this stupid target PC correction. Fixes: 6bebcecb6c5b ("ARM: KVM: Allow the main HYP code to use the init hyp stub implementation") Reported-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/hyp/hyp-entry.S | 1 - 1 file changed, 1 deletion(-) commit caf7df12272118e0274c8353bcfeaf60c7743a47 Author: Christoph Hellwig Date: Thu Apr 20 16:03:16 2017 +0200 block: remove the errors field from struct request Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Acked-by: Roger Pau Monné Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Jens Axboe block/blk-core.c | 14 +------------- block/blk-exec.c | 3 +-- block/blk-mq.c | 10 +++------- block/blk-timeout.c | 1 - include/linux/blkdev.h | 2 -- include/trace/events/block.h | 17 +++++++---------- kernel/trace/blktrace.c | 26 ++++++++++++-------------- 7 files changed, 24 insertions(+), 49 deletions(-) commit cee4b7ce3f9161c88f7255a3d73c1c4d5bbabea7 Author: Christoph Hellwig Date: Thu Apr 20 16:03:15 2017 +0200 blktrace: remove the unused block_rq_abort tracepoint Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe include/trace/events/block.h | 44 ++++++++++---------------------------------- kernel/trace/blktrace.c | 9 --------- 2 files changed, 10 insertions(+), 43 deletions(-) commit c877f42498aba4736ca9a66b1af5115ee613e05d Author: Christoph Hellwig Date: Thu Apr 20 16:03:14 2017 +0200 swim3: remove (commented out) printing of req->errors Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/block/swim3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c8e90782e15bc9e0a0ccbbc99a03eec206ac300c Author: Christoph Hellwig Date: Thu Apr 20 16:03:13 2017 +0200 ataflop: switch from req->errors to req->error_count Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/block/ataflop.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 4590879596bf8fbec68929e8f58dcf453d68cc0d Author: Christoph Hellwig Date: Thu Apr 20 16:03:12 2017 +0200 floppy: switch from req->errors to req->error_count Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/block/floppy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e26738e037f34aedfe05e412f442833f44f4a6e5 Author: Christoph Hellwig Date: Thu Apr 20 16:03:11 2017 +0200 block: add a error_count field to struct request This is for the legacy floppy and ataflop drivers that currently abuse ->errors for this purpose. It's stashed away in a union to not grow the struct size, the other fields are either used by modern drivers for different purposes or the I/O scheduler before queing the I/O to drivers. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe include/linux/blkdev.h | 1 + 1 file changed, 1 insertion(+) commit 453f83418d04ed98be0f28868aad74c3dbdfb2be Author: Christoph Hellwig Date: Thu Apr 20 16:03:10 2017 +0200 blk-mq: simplify __blk_mq_complete_request Merge blk_mq_ipi_complete_request and blk_mq_stat_add into their only caller. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) commit 08e0029aa2a4acdd365613ce88a1184e5351a8a1 Author: Christoph Hellwig Date: Thu Apr 20 16:03:09 2017 +0200 blk-mq: remove the error argument to blk_mq_complete_request Now that all drivers that call blk_mq_complete_requests have a ->complete callback we can remove the direct call to blk_mq_end_request, as well as the error argument to blk_mq_complete_request. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-mq.c | 15 +++------------ drivers/block/loop.c | 4 ++-- drivers/block/mtip32xx/mtip32xx.c | 4 ++-- drivers/block/nbd.c | 4 ++-- drivers/block/null_blk.c | 2 +- drivers/block/virtio_blk.c | 2 +- drivers/block/xen-blkfront.c | 2 +- drivers/md/dm-rq.c | 2 +- drivers/nvme/host/core.c | 2 +- drivers/nvme/host/nvme.h | 2 +- drivers/scsi/scsi_lib.c | 2 +- include/linux/blk-mq.h | 2 +- 12 files changed, 17 insertions(+), 26 deletions(-) commit 2609587c1eeb4ff484e6c9a746aa3627b9a2649c Author: Christoph Hellwig Date: Thu Apr 20 16:03:08 2017 +0200 xen-blkfront: don't use req->errors xen-blkfron is the last users using rq->errros for passing back error to blk-mq, and I'd like to get rid of that. In the longer run the driver should be moving more of the completion processing into .complete, but this is the minimal change to move forward for now. Signed-off-by: Christoph Hellwig Acked-by: Roger Pau Monné Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Jens Axboe drivers/block/xen-blkfront.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) commit 4dda4735c581db6ee8e8c0dcc8b94563dfafff2f Author: Christoph Hellwig Date: Thu Apr 20 16:03:07 2017 +0200 mtip32xx: add a status field to struct mtip_cmd Instead of using req->errors, which will go away. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 16 +++++++++------- drivers/block/mtip32xx/mtip32xx.h | 1 + 2 files changed, 10 insertions(+), 7 deletions(-) commit 1e388ae0b93b28d17d62aa954db4fd2b356b5825 Author: Christoph Hellwig Date: Thu Apr 20 16:03:06 2017 +0200 nbd: don't use req->errors Add a nbd-specific field instead. Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 8fc77980584035d816472070e8238200aa9c5c6c Author: Christoph Hellwig Date: Thu Apr 20 16:03:05 2017 +0200 dm mpath: don't check for req->errors We'll get all proper errors reported through ->end_io and ->errors will go away soon. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/md/dm-mpath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0af413a45cbbf179a87fef0576882a8e6006244 Author: Christoph Hellwig Date: Thu Apr 20 16:03:04 2017 +0200 dm rq: don't pass irrelevant error code to blk_mq_complete_request dm never uses rq->errors, so there is no need to pass an error argument to blk_mq_complete_request. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe drivers/md/dm-rq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb1a61a3639f0726161d780299da6177ab35f9f9 Author: Christoph Hellwig Date: Thu Apr 20 16:03:03 2017 +0200 null_blk: don't pass always-0 req->errors to blk_mq_complete_request Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/block/null_blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe2cb2905c3dc872158e7ce30df05d72c3989645 Author: Christoph Hellwig Date: Thu Apr 20 16:03:02 2017 +0200 loop: zero-fill bio on the submitting cpu In thruth I've just audited which blk-mq drivers don't currently have a complete callback, but I think this change is at least borderline useful. Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Signed-off-by: Jens Axboe drivers/block/loop.c | 30 ++++++++++++++---------------- drivers/block/loop.h | 1 + 2 files changed, 15 insertions(+), 16 deletions(-) commit 17d5363b83f8c73ef9109f75a4a9b578f31d842f Author: Christoph Hellwig Date: Thu Apr 20 16:03:01 2017 +0200 scsi: introduce a result field in struct scsi_request This passes on the scsi_cmnd result field to users of passthrough requests. Currently we abuse req->errors for this purpose, but that field will go away in its current form. Note that the old IDE code abuses the errors field in very creative ways and stores all kinds of different values in it. I didn't dare to touch this magic, so the abuses are brought forward 1:1. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/bsg-lib.c | 8 ++++---- block/bsg.c | 12 +++++------ block/scsi_ioctl.c | 14 ++++++------- drivers/block/cciss.c | 42 +++++++++++++++++++------------------- drivers/block/pktcdvd.c | 2 +- drivers/block/virtio_blk.c | 2 +- drivers/cdrom/cdrom.c | 2 +- drivers/ide/ide-atapi.c | 10 ++++----- drivers/ide/ide-cd.c | 20 +++++++++--------- drivers/ide/ide-cd_ioctl.c | 2 +- drivers/ide/ide-devsets.c | 4 ++-- drivers/ide/ide-dma.c | 2 +- drivers/ide/ide-eh.c | 36 ++++++++++++++++---------------- drivers/ide/ide-floppy.c | 10 ++++----- drivers/ide/ide-io.c | 10 ++++----- drivers/ide/ide-ioctls.c | 4 ++-- drivers/ide/ide-park.c | 2 +- drivers/ide/ide-pm.c | 8 ++++---- drivers/ide/ide-tape.c | 4 ++-- drivers/ide/ide-taskfile.c | 6 +++--- drivers/scsi/osd/osd_initiator.c | 4 ++-- drivers/scsi/osst.c | 2 +- drivers/scsi/qla2xxx/qla_bsg.c | 6 +++--- drivers/scsi/scsi_lib.c | 15 +++++++------- drivers/scsi/scsi_transport_sas.c | 2 +- drivers/scsi/sg.c | 2 +- drivers/scsi/st.c | 6 +++--- drivers/target/target_core_pscsi.c | 2 +- fs/nfsd/blocklayout.c | 4 ++-- include/linux/ide.h | 2 +- include/scsi/scsi_request.h | 1 + 31 files changed, 123 insertions(+), 123 deletions(-) commit d19633d5375b8f4735c389c80865dfbf0474992a Author: Christoph Hellwig Date: Thu Apr 20 16:03:00 2017 +0200 virtio_blk: don't use req->errors Remove passing req->errors (which at that point is always 0) to blk_mq_complete_request, and rely on the virtio status code for the serial number passthrough request. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/block/virtio_blk.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit a1a6e62b79d70dee85522d791f1a5b20e1c2cc17 Author: Christoph Hellwig Date: Thu Apr 20 16:02:59 2017 +0200 virtio: fix spelling of virtblk_scsi_request_done Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe drivers/block/virtio_blk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 65ba6b54e7c1fe7751388f5da6ad87c2d1bee3ae Author: Christoph Hellwig Date: Thu Apr 20 16:02:58 2017 +0200 nvme: make nvme_error_status private Currently it's used by the lighnvm passthrough ioctl, but we'd like to make it private in preparation of block layer specific error code. Lighnvm already returns the real NVMe status anyway, so I think we can just limit it to returning -EIO for any status set. This will need a careful audit from the lightnvm folks, though. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 3 +-- drivers/nvme/host/lightnvm.c | 6 +++--- drivers/nvme/host/nvme.h | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) commit 27fa9bc54541dabc3fabe1c520d342f5add0379b Author: Christoph Hellwig Date: Thu Apr 20 16:02:57 2017 +0200 nvme: split nvme status from block req->errors We want our own clearly defined error field for NVMe passthrough commands, and the request errors field is going away in its current form. Just store the status and result field in the nvme_request field from hardirq completion context (using a new helper) and then generate a Linux errno for the block layer only when we actually need it. Because we can't overload the status value with a negative error code for cancelled command we now have a flags filed in struct nvme_request that contains a bit for this condition. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 50 +++++++++++++++++++++++++++----------------- drivers/nvme/host/fc.c | 10 ++++----- drivers/nvme/host/lightnvm.c | 9 +++++--- drivers/nvme/host/nvme.h | 33 +++++++++++++---------------- drivers/nvme/host/pci.c | 11 +++++----- drivers/nvme/host/rdma.c | 5 ++--- drivers/nvme/target/loop.c | 7 ++----- 7 files changed, 65 insertions(+), 60 deletions(-) commit d663b69ff378e4990e35e274ab0813c4641ab564 Author: Christoph Hellwig Date: Thu Apr 20 16:02:56 2017 +0200 nvme-fc: fix status code handling in nvme_fc_fcpio_done nvme_complete_async_event expects the little endian status code including the phase bit, and a new completion handler I plan to introduce will do so as well. Change the status variable into the little endian format with the phase bit used in the NVMe CQE to fix / enable this. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b7819b9259185dcdcc81eb32182a4dc13d695738 Author: Christoph Hellwig Date: Thu Apr 20 16:02:55 2017 +0200 block: remove the blk_execute_rq return value The function only returns -EIO if rq->errors is non-zero, which is not very useful and lets a large number of callers ignore the return value. Just let the callers figure out their error themselves. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-exec.c | 8 +------- block/scsi_ioctl.c | 3 ++- drivers/block/virtio_blk.c | 3 ++- drivers/cdrom/cdrom.c | 3 ++- drivers/ide/ide-atapi.c | 3 ++- drivers/ide/ide-cd.c | 3 ++- drivers/ide/ide-cd_ioctl.c | 3 ++- drivers/ide/ide-devsets.c | 4 ++-- drivers/ide/ide-disk.c | 3 +-- drivers/ide/ide-ioctls.c | 7 ++++--- drivers/ide/ide-park.c | 3 ++- drivers/ide/ide-pm.c | 3 ++- drivers/ide/ide-taskfile.c | 4 ++-- drivers/scsi/osd/osd_initiator.c | 5 ++++- fs/nfsd/blocklayout.c | 5 +++-- include/linux/blkdev.h | 2 +- 16 files changed, 34 insertions(+), 28 deletions(-) commit 75a500ef6ecb6266d4d1347fc7eb4b298b566b3b Author: Christoph Hellwig Date: Thu Apr 20 16:02:54 2017 +0200 pd: don't check blk_execute_rq return value. The driver never sets req->errors, so blk_execute_rq will always return 0. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/block/paride/pd.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 56e0d71ef12f026d96213e45a662bde6bbff4676 Author: Trond Myklebust Date: Sat Apr 15 19:20:01 2017 -0400 NFSv4: Fix a hang in OPEN related to server reboot If the server fails to return the attributes as part of an OPEN reply, and then reboots, we can end up hanging. The reason is that the client attempts to send a GETATTR in order to pick up the missing OPEN call, but fails to release the slot first, causing reboot recovery to deadlock. Signed-off-by: Trond Myklebust Fixes: 2e80dbe7ac51a ("NFSv4.1: Close callback races for OPEN, LAYOUTGET...") Cc: stable@vger.kernel.org # v4.8+ fs/nfs/nfs4proc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7c4cc30024946dae9530cd6dc0d8d4eb40fca173 Author: Jan Kara Date: Wed Apr 12 12:24:49 2017 +0200 bdi: Drop 'parent' argument from bdi_register[_va]() Drop 'parent' argument of bdi_register() and bdi_register_va(). It is always NULL. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe drivers/mtd/mtdcore.c | 2 +- fs/super.c | 2 +- include/linux/backing-dev.h | 9 ++++----- mm/backing-dev.c | 13 +++++-------- 4 files changed, 11 insertions(+), 15 deletions(-) commit 2e82b84c01d9438d86079980e22e036eee71e754 Author: Jan Kara Date: Wed Apr 12 12:24:48 2017 +0200 block: Remove unused functions Now that all backing_dev_info structure are allocated separately, we can drop some unused functions. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe include/linux/backing-dev.h | 5 ---- mm/backing-dev.c | 56 +++++---------------------------------------- 2 files changed, 6 insertions(+), 55 deletions(-) commit c1844d536dafa5f2cddf4b4841a3634f80a27666 Author: Jan Kara Date: Wed Apr 12 12:24:47 2017 +0200 fs: Remove SB_I_DYNBDI flag Now that all bdi structures filesystems use are properly refcounted, we can remove the SB_I_DYNBDI flag. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe drivers/mtd/mtdsuper.c | 1 - fs/gfs2/ops_fstype.c | 1 - fs/nfs/super.c | 1 - fs/nilfs2/super.c | 1 - fs/super.c | 5 +---- include/linux/fs.h | 3 --- 6 files changed, 1 insertion(+), 11 deletions(-) commit 99edd4580b7444f57d7494e6433cdbdb08d5a19d Author: Jan Kara Date: Wed Apr 12 12:24:46 2017 +0200 ubifs: Convert to separately allocated bdi Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Richard Weinberger CC: Artem Bityutskiy CC: Adrian Hunter CC: linux-mtd@lists.infradead.org Acked-by: Richard Weinberger Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/ubifs/super.c | 25 +++++++++---------------- fs/ubifs/ubifs.h | 3 --- 2 files changed, 9 insertions(+), 19 deletions(-) commit 0db10944a76ba09f37d43b99d0fe085a18307f22 Author: Jan Kara Date: Wed Apr 12 12:24:45 2017 +0200 nfs: Convert to separately allocated bdi Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Anna Schumaker CC: linux-nfs@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Acked-by: Trond Myklebust Signed-off-by: Jens Axboe fs/nfs/client.c | 10 ---------- fs/nfs/internal.h | 6 +++--- fs/nfs/super.c | 34 +++++++++++++++++++--------------- fs/nfs/write.c | 13 ++++++------- include/linux/nfs_fs_sb.h | 1 - 5 files changed, 28 insertions(+), 36 deletions(-) commit a0349ec00f3cb8a9401d065e5db3a5d738e94a89 Author: Jan Kara Date: Wed Apr 12 12:24:44 2017 +0200 ncpfs: Convert to separately allocated bdi Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Petr Vandrovec Acked-by: Petr Vandrovec Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/ncpfs/inode.c | 8 ++------ fs/ncpfs/ncp_fs_sb.h | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) commit 0546c537b15ff171edd43dd97d31a69babdac9ff Author: Jan Kara Date: Wed Apr 12 12:24:43 2017 +0200 nilfs2: Convert to properly refcounting bdi Similarly to set_bdev_super() NILFS2 just used block device reference to bdi. Convert it to properly getting bdi reference. The reference will get automatically dropped on superblock destruction. CC: linux-nilfs@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Acked-by: Ryusuke Konishi Signed-off-by: Jens Axboe fs/nilfs2/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 95fe66de9f0de24f08e875a67722a3d612cd9f2f Author: Jan Kara Date: Wed Apr 12 12:24:42 2017 +0200 gfs2: Convert to properly refcounting bdi Similarly to set_bdev_super() GFS2 just used block device reference to bdi. Convert it to properly getting bdi reference. The reference will get automatically dropped on superblock destruction. CC: Steven Whitehouse CC: Bob Peterson CC: cluster-devel@redhat.com Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/gfs2/ops_fstype.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 7fbbe972c3ec63a3391997e0cef09964f9236088 Author: Jan Kara Date: Wed Apr 12 12:24:41 2017 +0200 fuse: Get rid of bdi_initialized It is not needed anymore since bdi is initialized whenever superblock exists. CC: Miklos Szeredi CC: linux-fsdevel@vger.kernel.org Suggested-by: Miklos Szeredi Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/fuse/dev.c | 5 ++--- fs/fuse/fuse_i.h | 3 --- fs/fuse/inode.c | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) commit 5f7f7543f52eee03ed35c9d671fbb1cdbd4bc9b5 Author: Jan Kara Date: Wed Apr 12 12:24:40 2017 +0200 fuse: Convert to separately allocated bdi Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Miklos Szeredi CC: linux-fsdevel@vger.kernel.org Acked-by: Miklos Szeredi Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/fuse/dev.c | 8 ++++---- fs/fuse/fuse_i.h | 3 --- fs/fuse/inode.c | 42 +++++++++++++----------------------------- 3 files changed, 17 insertions(+), 36 deletions(-) commit c7f014771b18e002fed373838fe14cf2065f3499 Author: Jan Kara Date: Wed Apr 12 12:24:39 2017 +0200 exofs: Convert to separately allocated bdi Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Boaz Harrosh CC: Benny Halevy Acked-by: Boaz Harrosh Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/exofs/exofs.h | 1 - fs/exofs/super.c | 17 ++++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) commit a5695a79088653c73c92ae8d48658cbc49f31884 Author: Jan Kara Date: Wed Apr 12 12:24:38 2017 +0200 coda: Convert to separately allocated bdi Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Jan Harkes CC: coda@cs.cmu.edu CC: codalist@coda.cs.cmu.edu Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/coda/inode.c | 11 ++++------- include/linux/coda_psdev.h | 1 - 2 files changed, 4 insertions(+), 8 deletions(-) commit fa06052d637bf3a76f18cd2304048b866af4096e Author: Jan Kara Date: Wed Apr 12 12:24:37 2017 +0200 mtd: Convert to dynamically allocated bdi infrastructure MTD already allocates backing_dev_info dynamically. Convert it to use generic infrastructure for this including proper refcounting. We drop mtd->backing_dev_info as its only use was to pass mtd_bdi pointer from one file into another and if we wanted to keep that in a clean way, we'd have to make mtd hold and drop bdi reference as needed which seems pointless for passing one global pointer... CC: David Woodhouse CC: Brian Norris CC: linux-mtd@lists.infradead.org Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe drivers/mtd/mtdcore.c | 23 ++++++++++++----------- drivers/mtd/mtdsuper.c | 7 ++++++- include/linux/mtd/mtd.h | 5 ----- 3 files changed, 18 insertions(+), 17 deletions(-) commit edd3ba94c4e5ef6ec045d5730d365d557fb54f98 Author: Jan Kara Date: Wed Apr 12 12:24:36 2017 +0200 afs: Convert to separately allocated bdi Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: David Howells CC: linux-afs@lists.infradead.org Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/afs/internal.h | 1 - fs/afs/super.c | 5 ++++- fs/afs/volume.c | 8 -------- 3 files changed, 4 insertions(+), 10 deletions(-) commit e836818bd9ec580b65d1970e588f9ba892a88f5c Author: Jan Kara Date: Wed Apr 12 12:24:35 2017 +0200 ecryptfs: Convert to separately allocated bdi Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Tyler Hicks CC: ecryptfs@vger.kernel.org Acked-by: Tyler Hicks Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/ecryptfs/ecryptfs_kernel.h | 1 - fs/ecryptfs/main.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) commit 851ea0860986961f32774e34753ad80e5fd545a1 Author: Jan Kara Date: Wed Apr 12 12:24:34 2017 +0200 cifs: Convert to separately allocated bdi Allocate struct backing_dev_info separately instead of embedding it inside superblock. This unifies handling of bdi among users. CC: Steve French CC: linux-cifs@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/cifs/cifs_fs_sb.h | 1 - fs/cifs/cifsfs.c | 7 ++++++- fs/cifs/connect.c | 10 ---------- 3 files changed, 6 insertions(+), 12 deletions(-) commit 09dc9fc24ba714a6d29349e49ec616edcb3ce560 Author: Jan Kara Date: Wed Apr 12 12:24:33 2017 +0200 ceph: Convert to separately allocated bdi Allocate struct backing_dev_info separately instead of embedding it inside client structure. This unifies handling of bdi among users. CC: Ilya Dryomov CC: "Yan, Zheng" CC: Sage Weil CC: ceph-devel@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/ceph/addr.c | 6 +++--- fs/ceph/debugfs.c | 2 +- fs/ceph/super.c | 35 +++++++++++++---------------------- fs/ceph/super.h | 2 -- 4 files changed, 17 insertions(+), 28 deletions(-) commit 9e11ceee23f25b6bb03de97ad1b729784f09538c Author: Jan Kara Date: Wed Apr 12 12:24:32 2017 +0200 btrfs: Convert to separately allocated bdi Allocate struct backing_dev_info separately instead of embedding it inside superblock. This unifies handling of bdi among users. CC: Chris Mason CC: Josef Bacik CC: David Sterba CC: linux-btrfs@vger.kernel.org Reviewed-by: Liu Bo Reviewed-by: David Sterba Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/btrfs/ctree.h | 1 - fs/btrfs/disk-io.c | 36 +++++++----------------------------- fs/btrfs/super.c | 7 +++++++ 3 files changed, 14 insertions(+), 30 deletions(-) commit 71304feba33f4b007cdb5cbbbe24c0e8d87ff689 Author: Jan Kara Date: Wed Apr 12 12:24:31 2017 +0200 9p: Convert to separately allocated bdi Allocate struct backing_dev_info separately instead of embedding it inside session. This unifies handling of bdi among users. CC: Eric Van Hensbergen CC: Ron Minnich CC: Latchesar Ionkov CC: v9fs-developer@lists.sourceforge.net Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/9p/v9fs.c | 10 +--------- fs/9p/v9fs.h | 1 - fs/9p/vfs_super.c | 15 ++++++++++++--- 3 files changed, 13 insertions(+), 13 deletions(-) commit 9594caf216dc0fe3e318b34af0127276db661241 Author: Jan Kara Date: Wed Apr 12 12:24:30 2017 +0200 lustre: Convert to separately allocated bdi Allocate struct backing_dev_info separately instead of embedding it inside superblock. This unifies handling of bdi among users. CC: Oleg Drokin CC: Andreas Dilger CC: James Simmons CC: lustre-devel@lists.lustre.org Reviewed-by: Andreas Dilger Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe .../staging/lustre/lustre/include/lustre_disk.h | 4 ---- drivers/staging/lustre/lustre/llite/llite_lib.c | 24 +++------------------- 2 files changed, 3 insertions(+), 25 deletions(-) commit 13eec2363ef07c40dec84662ad17148f7a333a21 Author: Jan Kara Date: Wed Apr 12 12:24:29 2017 +0200 fs: Get proper reference for s_bdi So far we just relied on block device to hold a bdi reference for us while the filesystem is mounted. While that works perfectly fine, it is a bit awkward that we have a pointer to a refcounted structure in the superblock without proper reference. So make s_bdi hold a proper reference to block device's BDI. No filesystem using mount_bdev() actually changes s_bdi so this is safe and will make bdev filesystems work the same way as filesystems needing to set up their private bdi. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/super.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit fca39346a55bb7196888ffc77d9e3557340d1d0b Author: Jan Kara Date: Wed Apr 12 12:24:28 2017 +0200 fs: Provide infrastructure for dynamic BDIs in filesystems Provide helper functions for setting up dynamically allocated backing_dev_info structures for filesystems and cleaning them up on superblock destruction. CC: linux-mtd@lists.infradead.org CC: linux-nfs@vger.kernel.org CC: Petr Vandrovec CC: linux-nilfs@vger.kernel.org CC: cluster-devel@redhat.com CC: osd-dev@open-osd.org CC: codalist@coda.cs.cmu.edu CC: linux-afs@lists.infradead.org CC: ecryptfs@vger.kernel.org CC: linux-cifs@vger.kernel.org CC: ceph-devel@vger.kernel.org CC: linux-btrfs@vger.kernel.org CC: v9fs-developer@lists.sourceforge.net CC: lustre-devel@lists.lustre.org Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/super.c | 49 ++++++++++++++++++++++++++++++++++++++++ include/linux/backing-dev-defs.h | 2 +- include/linux/fs.h | 6 +++++ 3 files changed, 56 insertions(+), 1 deletion(-) commit 62bf42adc4f3d5f564d11c36f90dab31f0652d33 Author: Jan Kara Date: Wed Apr 12 12:24:27 2017 +0200 bdi: Export bdi_alloc_node() and bdi_put() MTD will want to call bdi_alloc_node() and bdi_put() directly. Export these functions. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe mm/backing-dev.c | 2 ++ 1 file changed, 2 insertions(+) commit 5af110b2fb59eda9ba22ff1057f36bd96e340e09 Author: Jan Kara Date: Wed Apr 12 12:24:26 2017 +0200 block: Unregister bdi on last reference drop Most users will want to unregister bdi when dropping last reference to a bdi. Only a few users (like block devices) want to play more complex tricks with bdi registration and unregistration. So unregister bdi when the last reference to bdi is dropped and just make sure we don't unregister the bdi the second time if it is already unregistered. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe mm/backing-dev.c | 2 ++ 1 file changed, 2 insertions(+) commit baf7a616d537f577d33b7d9986f40532e2bd9f66 Author: Jan Kara Date: Wed Apr 12 12:24:25 2017 +0200 bdi: Provide bdi_register_va() and bdi_alloc() Add function that registers bdi and takes va_list instead of variable number of arguments. Add bdi_alloc() as simple wrapper for NUMA-unaware users allocating BDI. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Jens Axboe include/linux/backing-dev.h | 6 ++++++ mm/backing-dev.c | 20 +++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) commit fbe77c30e9abcb3429380dec622439991a718e31 Author: Benjamin Coddington Date: Wed Apr 19 10:11:35 2017 -0400 NFS: move rw_mode to nfs_pageio_header Let's try to have it in a cacheline in nfs4_proc_pgio_rpc_prepare(). Signed-off-by: Benjamin Coddington Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 2 +- fs/nfs/pagelist.c | 8 +++----- fs/nfs/read.c | 9 ++++++--- fs/nfs/write.c | 8 +++++--- include/linux/nfs_page.h | 4 ++-- include/linux/nfs_xdr.h | 1 + 6 files changed, 18 insertions(+), 14 deletions(-) commit 8ef9b0b9e1c02879c9a41246437a23f513e4378b Author: Benjamin Coddington Date: Wed Apr 19 10:11:34 2017 -0400 NFS: move nfs_pgarray_set() to open code Since commit 00bfa30abe86 ("NFS: Create a common pgio_alloc and pgio_release function"), nfs_pgarray_set() has only a single caller. Let's open code it. Signed-off-by: Benjamin Coddington Signed-off-by: Trond Myklebust fs/nfs/pagelist.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) commit ae97aa524ef495b6276fd26f5d5449fb22975d7c Author: Benjamin Coddington Date: Wed Apr 19 10:11:33 2017 -0400 NFS: Use GFP_NOIO for two allocations in writeback Prevent a deadlock that can occur if we wait on allocations that try to write back our pages. Signed-off-by: Benjamin Coddington Fixes: 00bfa30abe869 ("NFS: Create a common pgio_alloc and pgio_release...") Cc: stable@vger.kernel.org # 3.16+ Signed-off-by: Trond Myklebust fs/nfs/pagelist.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 028f43bc64401ead2bf86adcef1b7ffdbb170509 Merge: 0ef9059 bbf67e4 Author: David S. Miller Date: Thu Apr 20 13:54:40 2017 -0400 Merge tag 'mac80211-next-for-davem-2017-04-18' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== My last pull request has been a while, we now have: * connection quality monitoring with multiple thresholds * support for FILS shared key authentication offload * pre-CAC regulatory compliance - only ETSI allows this * sanity check for some rate confusion that hit ChromeOS (but nobody else uses it, evidently) * some documentation updates * lots of cleanups ==================== Signed-off-by: David S. Miller commit 1f84ccdf37d0db3a70714d02d51b0b6d45887fb8 Author: Fred Isaman Date: Fri Apr 14 14:24:28 2017 -0400 NFS: Fix use after free in write error path Signed-off-by: Fred Isaman Fixes: 0bcbf039f6b2b ("nfs: handle request add failure properly") Cc: stable@vger.kernel.org # v4.5+ Signed-off-by: Trond Myklebust fs/nfs/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43b7d964ed30dbca5c83c90cb010985b429ec4f9 Author: Benjamin Coddington Date: Fri Apr 14 12:29:54 2017 -0400 NFS: Fix missing pg_cleanup after nfs_pageio_cond_complete() Commit a7d42ddb3099727f58366fa006f850a219cce6c8 ("nfs: add mirroring support to pgio layer") moved pg_cleanup out of the path when there was non-sequental I/O that needed to be flushed. The result is that for layouts that have more than one layout segment per file, the pg_lseg is not cleared, so we can end up hitting the WARN_ON_ONCE(req_start >= seg_end) in pnfs_generic_pg_test since the pg_lseg will be pointing to that previously-flushed layout segment. Signed-off-by: Benjamin Coddington Fixes: a7d42ddb3099 ("nfs: add mirroring support to pgio layer") Signed-off-by: Trond Myklebust fs/nfs/pagelist.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0ef9059d4117e92f35525ce260b1f8eca2b569fa Merge: 8dc7d11 dc70058 Author: David S. Miller Date: Thu Apr 20 13:48:55 2017 -0400 Merge branch 'dsa-LAN9303' Juergen Borleis says: ==================== net: dsa: add SMSC/Microchip LAN9303 three port ethernet switch driver The LAN9303 is a three port 10/100 ethernet switch with integrated phys for the two external ethernet ports. The third port is an RMII/MII interface to a host master network interface (e.g. fixed link). While the LAN9303 device itself supports offload packet processing, this driver does not make use of it yet. This driver just configures the device to provide two separate network interfaces (which is the default state of a DSA device). Please note: the "MDIO managed mode" driver part isn't tested yet. I have used and tested the "I2C managed mode" only. Changes in v6: - fix support to use the driver as a module (core, i2c and mdio) - license info added in all parts of the driver (for module support) Changes in v5: - add missing include file to 'net/dsa/tag_lan9303.c' Changes in v4: - rebased on net-next, 'net/dsa/tag_lan9303.c' adapted to changed API Changes in v3: - 'ds_to_lan9303()' removed - special PHY reg MII_LAN911X_SPECIAL_CONTROL_STATUS mapping removed - compatible strings for I2C and MDIO are now different - MDIO-managed-mode devicetree binding added (still compile time tested only) Changes in v2: - code moved to 'drivers/net/dsa' - timeouts in completion wait loops - macros instead of various magic numbers - development code removed - devicetree property names changed - devicetree example adapted - tried to avoid to mix 'switching' and 'forwarding'... Comments are welcome. ==================== Signed-off-by: David S. Miller commit dc7005831523d674be11a98f3256e0cc871157d6 Author: Juergen Beisert Date: Tue Apr 18 10:48:27 2017 +0200 net: dsa: LAN9303: add MDIO managed mode support When the LAN9303 device is in MDIO manged mode, all register accesses must be done via MDIO. Please note: this code is compile time tested only due to the absence of such configured hardware. It is based on a patch from Stefan Roese from 2014. Signed-off-by: Juergen Borleis CC: devicetree@vger.kernel.org CC: robh+dt@kernel.org CC: mark.rutland@arm.com CC: sr@denx.de Acked-by: Rob Herring Signed-off-by: David S. Miller .../devicetree/bindings/net/dsa/lan9303.txt | 45 ++++++- drivers/net/dsa/Kconfig | 8 ++ drivers/net/dsa/Makefile | 1 + drivers/net/dsa/lan9303_mdio.c | 148 +++++++++++++++++++++ 4 files changed, 201 insertions(+), 1 deletion(-) commit be4e119f991451a3f3385b4d167c016c6eb49e78 Author: Juergen Beisert Date: Tue Apr 18 10:48:26 2017 +0200 net: dsa: LAN9303: add I2C managed mode support In this mode the switch device and the internal phys will be managed via I2C interface. The MDIO interface is still supported, but for the (emulated) CPU port only. Signed-off-by: Juergen Borleis CC: devicetree@vger.kernel.org CC: robh+dt@kernel.org CC: mark.rutland@arm.com Acked-by: Rob Herring Signed-off-by: David S. Miller .../devicetree/bindings/net/dsa/lan9303.txt | 62 +++++++++++ drivers/net/dsa/Kconfig | 16 +++ drivers/net/dsa/Makefile | 2 + drivers/net/dsa/lan9303_i2c.c | 113 +++++++++++++++++++++ 4 files changed, 193 insertions(+) commit a1292595e006075792d6961fcb7de5e862a77aa8 Author: Juergen Beisert Date: Tue Apr 18 10:48:25 2017 +0200 net: dsa: add new DSA switch driver for the SMSC-LAN9303 The SMSC/Microchip LAN9303 is an ethernet switch device with one CPU port and two external ethernet ports with built-in phys. This driver uses the DSA framework, but is currently only capable of separating the two external ports. There is no offload support yet. Signed-off-by: Juergen Borleis Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/lan9303-core.c | 879 +++++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/lan9303.h | 19 + 2 files changed, 898 insertions(+) commit e8fe177a62feaf576cd9869d9bfedf9c9574bb12 Author: Juergen Beisert Date: Tue Apr 18 10:48:24 2017 +0200 net: dsa: add support for the SMSC-LAN9303 tagging format To define the outgoing port and to discover the incoming port a regular VLAN tag is used by the LAN9303. But its VID meaning is 'special'. This tag handler/filter depends on some hardware features which must be enabled in the device to provide and make use of this special VLAN tag to control the destination and the source of an ethernet packet. Signed-off-by: Juergen Borleis Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 1 + net/dsa/Kconfig | 4 ++ net/dsa/Makefile | 1 + net/dsa/dsa.c | 3 ++ net/dsa/dsa_priv.h | 3 ++ net/dsa/tag_lan9303.c | 141 ++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 153 insertions(+) commit 1613976bbdc560b5ed906af9976ae476996550c3 Author: Martin Kepplinger Date: Thu Apr 20 10:41:27 2017 -0700 dt-bindings: input: add bindings document for ar1021_i2c driver Add a simple binding document describing the supported devices and the I2C bus address. Signed-off-by: Martin Kepplinger Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/touchscreen/ar1021.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit cd81abdfd4ef0cf065517d0f82b4563b214027d0 Author: Rahul Bedarkar Date: Thu Apr 20 10:36:18 2017 -0700 dt-bindings: input: rotary-encoder: fix typo s/rollove/rollover/ Signed-off-by: Rahul Bedarkar Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/rotary-encoder.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62b2417e84ba0734d3f4f95a17e6f5f0be54d75a Author: NeilBrown Date: Mon Apr 10 12:19:40 2017 +1000 sunrpc: don't check for failure from mempool_alloc() When mempool_alloc() is allowed to sleep (GFP_NOIO allows sleeping) it cannot fail. So rpc_alloc_task() cannot fail, so rpc_new_task doesn't need to test for failure. Consequently rpc_new_task() cannot fail, so the callers don't need to test. Signed-off-by: NeilBrown Signed-off-by: Trond Myklebust net/sunrpc/clnt.c | 8 -------- net/sunrpc/sched.c | 5 ----- 2 files changed, 13 deletions(-) commit 518662e0fcb9fa241fe90a337b59bc5066b2a930 Author: NeilBrown Date: Mon Apr 10 12:22:09 2017 +1000 NFS: fix usage of mempools. When passed GFP flags that allow sleeping (such as GFP_NOIO), mempool_alloc() will never return NULL, it will wait until memory is available. This means that we don't need to handle failure, but that we do need to ensure one thread doesn't call mempool_alloc() twice on the one pool without queuing or freeing the first allocation. If multiple threads did this during times of high memory pressure, the pool could be exhausted and a deadlock could result. pnfs_generic_alloc_ds_commits() attempts to allocate from the nfs_commit_mempool while already holding an allocation from that pool. This is not safe. So change nfs_commitdata_alloc() to take a flag that indicates whether failure is acceptable. In pnfs_generic_alloc_ds_commits(), accept failure and handle it as we currently do. Else where, do not accept failure, and do not handle it. Even when failure is acceptable, we want to succeed if possible. That means both - using an entry from the pool if there is one - waiting for direct reclaim is there isn't. We call mempool_alloc(GFP_NOWAIT) to achieve the first, then kmem_cache_alloc(GFP_NOIO|__GFP_NORETRY) to achieve the second. Each of these can fail, but together they do the best they can without blocking indefinitely. The objects returned by kmem_cache_alloc() will still be freed by mempool_free(). This is safe as mempool_alloc() uses exactly the same function to allocate objects (since the mempool was created with mempool_create_slab_pool()). The object returned by mempool_alloc() and kmem_cache_alloc() are indistinguishable so mempool_free() will handle both identically, either adding to the pool or calling kmem_cache_free(). Also, don't test for failure when allocating from nfs_wdata_mempool. Signed-off-by: NeilBrown Signed-off-by: Trond Myklebust fs/nfs/pnfs_nfs.c | 16 +++++----------- fs/nfs/write.c | 35 +++++++++++++++++++++-------------- include/linux/nfs_fs.h | 2 +- 3 files changed, 27 insertions(+), 26 deletions(-) commit f6148713b24107c478ce532a4be8e5c58437c80e Author: Anna Schumaker Date: Fri Apr 7 14:15:23 2017 -0400 NFS: Clean up nfs4_proc_get_lease_time() Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit e917f0d1cee17b7a4316ac336ac6beb2d5916806 Author: Anna Schumaker Date: Fri Apr 7 14:15:22 2017 -0400 NFS: Clean up _nfs4_proc_exchange_id() Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit c7ae763903df4d8a2c907588274b4887d04d2413 Author: Anna Schumaker Date: Fri Apr 7 14:15:21 2017 -0400 NFS: Clean up nfs4_proc_bind_one_conn_to_session() Returning errors directly even lets us remove the goto Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 3183783bbb5f57e183b99f593de7159898f91fdd Author: Anna Schumaker Date: Fri Apr 7 14:15:20 2017 -0400 NFS: Remove extra dprintk()s from nfs4namespace.c Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs4namespace.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 539fd1d1f43414bd7a886147c475fa09a3cc528a Author: Anna Schumaker Date: Fri Apr 7 14:15:19 2017 -0400 NFS: Clean up nfs4_get_rootfh() Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs4getroot.c | 3 --- 1 file changed, 3 deletions(-) commit 4fe6b366d9a2694970f26dcda7026390c5d0d7c7 Author: Anna Schumaker Date: Fri Apr 7 14:15:18 2017 -0400 NFS: Remove extra dprintk()s from nfs4client.c Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs4client.c | 62 +++++++++-------------------------------------------- 1 file changed, 10 insertions(+), 52 deletions(-) commit 1073d9b49ae4ede7682320168a209d46f70508bf Author: Anna Schumaker Date: Fri Apr 7 14:15:17 2017 -0400 NFS: Clean up nfs4_init_server() Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs4client.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 2dc42c0d60e0104f7cd8beee3871f953565392ff Author: Anna Schumaker Date: Fri Apr 7 14:15:16 2017 -0400 NFS: Clean up nfs4_set_client() If we cut out the dprintk()s, then we can return error codes directly and cut out the goto. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs4client.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 8da0f93438ca4a03f23d8f3275b253b0897c8833 Author: Anna Schumaker Date: Fri Apr 7 14:15:15 2017 -0400 NFS: Clean up nfs4_check_server_scope() Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs4client.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit ddfa0d4860347bfc491929af2750088bb75c5462 Author: Anna Schumaker Date: Fri Apr 7 14:15:14 2017 -0400 NFS: Clean up nfs4_check_serverowner_major_id() Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs4client.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 14d1bbb0ca425c4fdd9a38eaac346c028661b752 Author: Anna Schumaker Date: Fri Apr 7 14:15:13 2017 -0400 NFS: Create a common nfs4_match_client() function This puts all the common code in a single place for the walk_client_list() functions. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs4client.c | 119 ++++++++++++++++++++++++---------------------------- 1 file changed, 55 insertions(+), 64 deletions(-) commit 5b6d3ff605d1b00ce8138da4091c527d9ad48729 Author: Anna Schumaker Date: Fri Apr 7 14:15:12 2017 -0400 NFS: Clean up nfs4_check_serverowner_minor_id() Once again, we can remove the function and compare integer values directly. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs4client.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) commit f251fd9e71890bcfdc838f36c10b1b57a87356ec Author: Anna Schumaker Date: Fri Apr 7 14:15:11 2017 -0400 NFS: Clean up nfs4_match_clientids() If we cut out the dprintk()s, then we don't even need this to be a separate function. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs4client.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) commit 5be1810a8dc12573b89602867bc0dc1057e7f79f Author: Anna Schumaker Date: Fri Apr 7 14:15:10 2017 -0400 NFS: Clean up nfs42_layoutstat_done() Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/nfs42proc.c | 2 -- 1 file changed, 2 deletions(-) commit e36d48e9e2c38e7d31c41e41b21f1f47b61250a9 Author: Anna Schumaker Date: Fri Apr 7 14:15:09 2017 -0400 NFS: Remove extra dprintk()s from namespace.c Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/namespace.c | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) commit fe4f844d49768909150d9c91e283106adcd9a1ea Author: Anna Schumaker Date: Fri Apr 7 14:15:08 2017 -0400 NFS: Clean up nfs_direct_commit_complete() Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/direct.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit beeb53380138231eacdf4fcbf78275d94db26f7f Author: Anna Schumaker Date: Fri Apr 7 14:15:07 2017 -0400 NFS: Remove nfs_direct_readpage_release() Just remove the function and have the caller use nfs_release_request() instead. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/direct.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 4cbb976821a1e79dea9e0c69d2bafd078a3cd345 Author: Anna Schumaker Date: Fri Apr 7 14:15:06 2017 -0400 NFS: Clean up extra dprintk()s in client.c Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/client.c | 45 +++------------------------------------------ 1 file changed, 3 insertions(+), 42 deletions(-) commit 2844b6aecf9ec797fde6787a59bca258d06377c3 Author: Anna Schumaker Date: Fri Apr 7 14:15:05 2017 -0400 NFS: Clean up nfs_init_client() We always call nfs_mark_client_ready() even if nfs_create_rpc_client() returns an error, so we can rearrange nfs_init_client() to mark the client ready from a single place. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/client.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 36718a669e0507d2590af2a3730d58402d1f03f7 Author: Anna Schumaker Date: Fri Apr 7 14:15:04 2017 -0400 NFS: Remove extra dprintk()s from callback_xdr.c Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/callback_xdr.c | 11 ----------- 1 file changed, 11 deletions(-) commit 3d0bfaa60dead8e47ede8d08c82cdf393214955d Author: Anna Schumaker Date: Fri Apr 7 14:15:03 2017 -0400 NFS: Clean up encode_cb_sequence_res() Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/callback_xdr.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 535ece2b8e4b0edf9f18be2d103d19f833fa8b7f Author: Anna Schumaker Date: Fri Apr 7 14:15:02 2017 -0400 NFS: Clean up decode_notify_lock_args() Let's cut out the goto and return any errors immedately Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/callback_xdr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 1796549ad48c43dbe40408de39c7afcacbd43f0b Author: Anna Schumaker Date: Fri Apr 7 14:15:01 2017 -0400 NFS: Clean up decode_cb_sequence_args() Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/callback_xdr.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) commit c79d56d2148d94e8158f242560d0d7253c22b5f5 Author: Anna Schumaker Date: Fri Apr 7 14:15:00 2017 -0400 NFS: Clean up decode_layoutrecall_args() Additionally, this change lets us cut out the goto by returning errors immediately. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/callback_xdr.c | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) commit 135a4ea0d9b8a3fe538c309e0073c17893e47298 Author: Anna Schumaker Date: Fri Apr 7 14:14:59 2017 -0400 NFS: Clean up decode_recall_args() Removing the dprintk() lets us simplify the function by returning status codes directly, rather than using a goto. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/callback_xdr.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 56938bb77a5f2cfa8c5d99029022ed2bbc0aef4a Author: Anna Schumaker Date: Fri Apr 7 14:14:58 2017 -0400 NFS: Clean up decode_getattr_args() Removing the dprintk() lets us return the status value directly, rather than jumping to a label if an error occurs. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/callback_xdr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit be55f1bca7cf1021a1f4417e2d5f48bdc32e0bd2 Author: Anna Schumaker Date: Fri Apr 7 14:14:57 2017 -0400 NFS: Remove extra dprintk()s from callback_proc.c Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/callback_proc.c | 22 ---------------------- 1 file changed, 22 deletions(-) commit 5694a4f848be23e3df758fc2317880c7f9f823d4 Author: Anna Schumaker Date: Fri Apr 7 14:14:56 2017 -0400 NFS: Clean up nfs4_callback_layoutrecall() In addition to removing the dprintk(), this patch also initializes "res" to the default return value instead of doing this through an else condition. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/callback_proc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 1a916ce0497847ce4a1b21c63383a3653c613055 Author: Anna Schumaker Date: Fri Apr 7 14:14:55 2017 -0400 NFS: Clean up do_callback_layoutrecall() Removing the dprintk()s lets us simplify the function by removing the else condition entirely and returning the status of initiate_{file,bulk}_draining() directly. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust fs/nfs/callback_proc.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit a7878ca140084ec267ede48fce64d7e60f6d873e Author: Tigran Mkrtchyan Date: Tue Apr 4 15:12:51 2017 +0200 nfs: flexfilelayout: remove v3-only data server limitation Flexfilelayout supports data servers which talk NFS v3 and v4.{0,1,2}. However, this code path is disabled and v3 only servers are accepted. This change removes this limitation. Signed-off-by: Tigran Mkrtchyan Signed-off-by: Trond Myklebust fs/nfs/flexfilelayout/flexfilelayoutdev.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit b044f64513843e960f4b8d8e2e042abca1b7c029 Author: Benjamin Coddington Date: Fri Mar 10 17:07:46 2017 -0500 NFS: switch back to to ->iterate() NFS has some optimizations for readdir to choose between using READDIR or READDIRPLUS based on workload, and which NFS operation to use is determined by subsequent interactions with lookup, d_revalidate, and getattr. Concurrent use of nfs_readdir() via ->iterate_shared() can cause those optimizations to repeatedly invalidate the pagecache used to store directory entries during readdir(), which causes some very bad performance for directories with many entries (more than about 10000). There's a couple ways to fix this in NFS, but no fix would be as simple as going back to ->iterate() to serialize nfs_readdir(), and neither fix I tested performed as well as going back to ->iterate(). The first required taking the directory's i_lock for each entry, with the result of terrible contention. The second way adds another flag to the nfs_inode, and so keeps the optimizations working for large directories. The difference from using ->iterate() here is that much more memory is consumed for a given workload without any performance gain. The workings of nfs_readdir() are such that concurrent users are serialized within read_cache_page() waiting to retrieve pages of entries from the server. By serializing this work in iterate_dir() instead, contention for cache pages is reduced. Waiting processes can have an uncontended pass at the entirety of the directory's pagecache once previous processes have completed filling it. v2 - Keep the bits needed for parallel lookup Signed-off-by: Benjamin Coddington Signed-off-by: Trond Myklebust fs/nfs/dir.c | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) commit 8dc7d11f1dbd3659bfba371aeb72b539db12a2d1 Author: Greg Thelen Date: Mon Apr 17 23:21:35 2017 -0700 net/mlx4: suppress 'may be used uninitialized' warning gcc 4.8.4 complains that mlx4_SW2HW_MPT_wrapper() uses an uninitialized 'mpt' variable: drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'mlx4_SW2HW_MPT_wrapper': drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2802:12: warning: 'mpt' may be used uninitialized in this function [-Wmaybe-uninitialized] mpt->mtt = mtt; I think this warning is a false complaint. mpt is only used when mr_res_start_move_to() return zero, and in all such cases it initializes mpt. But apparently gcc cannot see that. Initialize mpt to avoid the warning. Signed-off-by: Greg Thelen Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf25ae78fc50010f66b9be945017796da34c434d Author: Guoqing Jiang Date: Mon Apr 17 17:11:05 2017 +0800 md/raid10: wait up frozen array in handle_write_completed Since nr_queued is changed, we need to call wake_up here if the array is already frozen and waiting for condition "nr_pending == nr_queued + extra" to be true. And commit 824e47daddbf ("RAID1: avoid unnecessary spin locks in I/O barrier code") which has already added the wake_up for raid1. Signed-off-by: Guoqing Jiang Reviewed-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid10.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3bf9310a573d923483526b25c6ec32233748a989 Author: Darren Hart (VMware) Date: Thu Apr 13 11:05:42 2017 -0700 platform/x86: hp-wmi: Cleanup local variable declarations Declare like types on one line. Order declarations in decreasing length where possible. Signed-off-by: Darren Hart (VMware) Tested-by: Carlo Caione Reviewed-by: Andy Shevchenko drivers/platform/x86/hp-wmi.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit fc6d2a3ca59d5656d5b0ac3b25ecf493e4614abd Author: Artur Paszkiewicz Date: Wed Apr 19 10:48:06 2017 +0200 uapi: fix linux/raid/md_p.h userspace compilation error Use __le32 and __le64 instead of u32 and u64. This fixes klibc build error: In file included from /klibc/usr/klibc/../include/sys/md.h:30:0, from /klibc/usr/kinit/do_mounts_md.c:19: /linux-next/usr/include/linux/raid/md_p.h:414:51: error: 'u32' undeclared here (not in a function) (PPL_HEADER_SIZE - PPL_HDR_RESERVED - 4 * sizeof(u32) - sizeof(u64)) Reported-by: Greg Thelen Reported-by: Nigel Croxon Tested-by: Greg Thelen Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li include/uapi/linux/raid/md_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5e4027e056c3027f682f0d69fe9fd75083b65f8 Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 16:12:39 2017 -0300 perf tools: Move timestamp routines from util.h to time-utils.h We already have a header for time utilities, so use it. Link: http://lkml.kernel.org/n/tip-sijzpbvutlg0c3oxn49hy9ca@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-buildid-cache.c | 1 + tools/perf/builtin-kvm.c | 1 + tools/perf/builtin-record.c | 1 + tools/perf/util/time-utils.c | 25 +++++++++++++++++++++++++ tools/perf/util/time-utils.h | 7 +++++++ tools/perf/util/util.c | 25 ------------------------- tools/perf/util/util.h | 6 ------ 7 files changed, 35 insertions(+), 31 deletions(-) commit 58db1d6e7d5d24afa2d32e916fd6f6b6d240ba93 Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 16:05:56 2017 -0300 perf tools: Move units conversion/formatting routines to separate object Out of util.h, to disentangle it a bit more. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-vpksyj3w5fk9t8s6mxmkajyr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 1 + tools/perf/builtin-report.c | 1 + tools/perf/tests/unit_number__scnprintf.c | 2 +- tools/perf/ui/browsers/hists.c | 1 + tools/perf/util/Build | 1 + tools/perf/util/evlist.c | 1 + tools/perf/util/python-ext-sources | 1 + tools/perf/util/units.c | 39 +++++++++++++++++++++++++++++++ tools/perf/util/units.h | 10 ++++++++ tools/perf/util/util.c | 35 --------------------------- tools/perf/util/util.h | 3 --- 11 files changed, 56 insertions(+), 39 deletions(-) commit 9607ad3a63871b074a57ce1facd04a230c38725c Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 15:49:18 2017 -0300 perf tools: Add signal.h to places using its definitions And remove it from util.h, disentangling it a bit more. Link: http://lkml.kernel.org/n/tip-2zg9s5nx90yde64j3g4z2uhk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/tests/intel-cqm.c | 1 + tools/perf/builtin-inject.c | 1 + tools/perf/builtin-kvm.c | 1 + tools/perf/builtin-record.c | 1 + tools/perf/builtin-report.c | 1 + tools/perf/builtin-script.c | 1 + tools/perf/builtin-stat.c | 1 + tools/perf/builtin-top.c | 1 + tools/perf/builtin-trace.c | 1 + tools/perf/perf.c | 1 + tools/perf/trace/beauty/signum.c | 1 + tools/perf/ui/gtk/annotate.c | 1 + tools/perf/ui/gtk/hists.c | 1 + tools/perf/util/evlist.c | 1 + tools/perf/util/evlist.h | 1 + tools/perf/util/util.c | 1 + tools/perf/util/util.h | 1 - 17 files changed, 16 insertions(+), 1 deletion(-) commit 3dfed9102694227aa763b9984c50d72de796d39b Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 13:28:30 2017 -0300 perf unwind: Provide only forward declarations for pointer types No need to drag the headers, helps in untangling them and reducing build time. Link: http://lkml.kernel.org/n/tip-l8soqph92duyw5jdha0fij8b@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/unwind.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 6a611d149a9a1eff7c89e81bab018e4121cce17e Author: Viresh Kumar Date: Thu Apr 20 16:25:07 2017 +0530 ARM: dts: exynos: Use - instead of @ for DT OPP entries Compiling the DT file with W=1, DTC warns like follows: Warning (unit_address_vs_reg): Node /opp_table0/opp@1000000000 has a unit name, but no reg property Fix this by replacing '@' with '-' as the OPP nodes will never have a "reg" property. Reported-by: Krzysztof Kozlowski Reported-by: Masahiro Yamada Suggested-by: Mark Rutland Signed-off-by: Viresh Kumar Reviewed-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring [k.kozlowski: Split patch per ARM and ARM64] Signed-off-by: Krzysztof Kozlowski .../devicetree/bindings/devfreq/exynos-bus.txt | 46 +++++++-------- arch/arm/boot/dts/exynos3250.dtsi | 46 +++++++-------- arch/arm/boot/dts/exynos4210.dtsi | 32 +++++------ arch/arm/boot/dts/exynos4412-prime.dtsi | 4 +- arch/arm/boot/dts/exynos4412.dtsi | 66 +++++++++++----------- arch/arm/boot/dts/exynos5420.dtsi | 40 ++++++------- arch/arm/boot/dts/exynos5800.dtsi | 56 +++++++++--------- .../boot/dts/exynos/exynos5433-tm2-common.dtsi | 43 +++++++++++++- arch/arm64/boot/dts/exynos/exynos5433-tm2.dts | 17 ++++++ arch/arm64/boot/dts/exynos/exynos5433-tm2e.dts | 18 ++++++ 10 files changed, 221 insertions(+), 147 deletions(-) commit d4829ea6035b89dcddfdcb72d325ca2139f23730 Author: Vishwanathapura, Niranjana Date: Wed Apr 12 20:29:28 2017 -0700 IB/hfi1: OPA_VNIC RDMA netdev support Add support to create and free OPA_VNIC rdma netdev devices. Implement netstack interface functionality including xmit_skb, receive side NAPI etc. Also implement rdma netdev control functions. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andrzej Kacprowski Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/Makefile | 2 +- drivers/infiniband/hw/hfi1/driver.c | 25 +- drivers/infiniband/hw/hfi1/hfi.h | 27 +- drivers/infiniband/hw/hfi1/init.c | 9 +- drivers/infiniband/hw/hfi1/vnic.h | 153 ++++++++ drivers/infiniband/hw/hfi1/vnic_main.c | 644 +++++++++++++++++++++++++++++++++ 6 files changed, 853 insertions(+), 7 deletions(-) commit 1bd671ab3fb99932fc8692463eabbb237b6bcef1 Author: Vishwanathapura, Niranjana Date: Wed Apr 12 20:29:27 2017 -0700 IB/opa-vnic: VNIC Ethernet Management Agent (VEMA) function OPA VEMA function interfaces with the Infiniband MAD stack to exchange the management information packets with the Ethernet Manager (EM). It interfaces with the OPA VNIC netdev function to SET/GET the management information. The information exchanged with the EM includes class port details, encapsulation configuration, various counters, unicast and multicast MAC list and the MAC table. It also supports sending traps to the EM. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Sadanand Warrier Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Sudeep Dutt Signed-off-by: Doug Ledford drivers/infiniband/ulp/opa_vnic/Makefile | 2 +- drivers/infiniband/ulp/opa_vnic/opa_vnic_ethtool.c | 12 + .../infiniband/ulp/opa_vnic/opa_vnic_internal.h | 17 +- drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c | 1078 ++++++++++++++++++++ .../infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c | 2 +- 5 files changed, 1106 insertions(+), 5 deletions(-) commit cfd34f8eb0641dc41450c218790a3e260ea55b0d Author: Vishwanathapura, Niranjana Date: Wed Apr 12 20:29:26 2017 -0700 IB/opa-vnic: VNIC Ethernet Management Agent (VEMA) interface OPA VNIC EMA interface functions are the management interfaces to the OPA VNIC netdev. Add support to add and remove VNIC ports. Implement the required GET/SET management interface functions and processing of new management information. Add support to send trap notifications upon various events like interface status change, unicast/multicast mac list update and mac address change. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Sadanand Warrier Signed-off-by: Doug Ledford drivers/infiniband/ulp/opa_vnic/Makefile | 3 +- drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h | 4 + .../infiniband/ulp/opa_vnic/opa_vnic_internal.h | 44 +++ drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c | 142 +++++++- .../infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c | 390 +++++++++++++++++++++ 5 files changed, 581 insertions(+), 2 deletions(-) commit 174e03d7e6c0a2d4257921234a8b7ae44ad58199 Author: Vishwanathapura, Niranjana Date: Wed Apr 12 20:29:25 2017 -0700 IB/opa-vnic: VNIC MAC table support OPA VNIC MAC table contains the MAC address to DLID mappings provided by the Ethernet manager. During transmission, the MAC table provides the MAC address to DLID translation. Implement MAC table using simple hash list. Also provide support to update/query the MAC table by Ethernet manager. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Sadanand Warrier Signed-off-by: Doug Ledford drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.c | 236 +++++++++++++++++++++ .../infiniband/ulp/opa_vnic/opa_vnic_internal.h | 51 +++++ drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c | 4 + 3 files changed, 291 insertions(+) commit 009b7dd40c2c0f14dc860182dcf35a36f540b229 Author: Vishwanathapura, Niranjana Date: Wed Apr 12 20:29:24 2017 -0700 IB/opa-vnic: VNIC statistics support OPA VNIC driver statistics support maintains various counters including standard netdev counters and the Ethernet manager defined counters. Add the Ethtool hook to read the counters. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Doug Ledford drivers/infiniband/ulp/opa_vnic/opa_vnic_ethtool.c | 110 +++++++++++++++++++++ .../infiniband/ulp/opa_vnic/opa_vnic_internal.h | 4 + drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c | 18 ++++ 3 files changed, 132 insertions(+) commit 72dc7614406e884aeae8c1554bf267943a0acaba Author: Vishwanathapura, Niranjana Date: Wed Apr 12 20:29:23 2017 -0700 IB/opa-vnic: VNIC Ethernet Management (EM) structure definitions Define VNIC EM MAD structures and the associated macros. These structures are used for information exchange between VNIC EM agent (EMA) on the host and the Ethernet manager. These include the virtual ethernet switch (vesw) port information, vesw port mac table, summay and error counters, vesw port interface mac lists and the EMA trap. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Sadanand Warrier Signed-off-by: Doug Ledford drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h | 423 +++++++++++++++++++++ .../infiniband/ulp/opa_vnic/opa_vnic_internal.h | 33 ++ 2 files changed, 456 insertions(+) commit 7d6f728c677e9d01b42d3cc9eb9ef40a2de92ea3 Author: Vishwanathapura, Niranjana Date: Wed Apr 12 20:29:22 2017 -0700 IB/opa-vnic: Virtual Network Interface Controller (VNIC) netdev OPA VNIC netdev function supports Ethernet functionality over Omni-Path fabric by encapsulating Ethernet packets inside Omni-Path packet header. It allocates a rdma netdev device and interfaces with the network stack to provide standard Ethernet network interfaces. It overrides HFI1 device's netdev operations where it is required. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Sadanand Warrier Signed-off-by: Sudeep Dutt Signed-off-by: Andrzej Kacprowski Signed-off-by: Doug Ledford MAINTAINERS | 7 + drivers/infiniband/Kconfig | 1 + drivers/infiniband/ulp/Makefile | 1 + drivers/infiniband/ulp/opa_vnic/Kconfig | 8 + drivers/infiniband/ulp/opa_vnic/Makefile | 6 + drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.c | 239 +++++++++++++++++++++ drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h | 62 ++++++ drivers/infiniband/ulp/opa_vnic/opa_vnic_ethtool.c | 65 ++++++ .../infiniband/ulp/opa_vnic/opa_vnic_internal.h | 186 ++++++++++++++++ drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c | 227 +++++++++++++++++++ 10 files changed, 802 insertions(+) commit 62e4594940da086b74cc47d7031b38a455483d07 Author: Vishwanathapura, Niranjana Date: Wed Apr 12 20:29:21 2017 -0700 IB/opa-vnic: Virtual Network Interface Controller (VNIC) interface Define OPA VNIC interface between hardware independent VNIC functionality and the hardware dependent VNIC functionality. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 1 + include/rdma/opa_vnic.h | 141 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+) commit 2fc77572649163f8d669389e87217cc99942847a Author: Vishwanathapura, Niranjana Date: Wed Apr 12 20:29:20 2017 -0700 IB/opa-vnic: RDMA NETDEV interface Add rdma netdev interface to ib device structure allowing rdma netdev devices to be allocated by ib clients. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit c73690ca16b1dd17b5e45d23fb2d76d083fb03bf Author: Vishwanathapura, Niranjana Date: Wed Apr 12 20:29:19 2017 -0700 IB/opa-vnic: Virtual Network Interface Controller (VNIC) documentation Add OPA VNIC design document explaining the VNIC architecture and the driver design. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Doug Ledford Documentation/infiniband/opa_vnic.txt | 153 ++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) commit 019e7db8f346880005850367532490e9848c007b Author: Hoegeun Kwon Date: Tue Apr 18 17:40:36 2017 +0900 arm64: dts: exynos: Add support for s6e3hf2 panel device on TM2e board This patch adds the panel device tree node for s6e3hf2 display controller to TM2e dts. Signed-off-by: Hoegeun Kwon Reviewed-by: Andrzej Hajda Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433-tm2e.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 23790ba2d775698ed44ef37b8c72b94c73ae5a6c Merge: 70d40b3 db1b5dd Author: Doug Ledford Date: Thu Apr 20 12:00:41 2017 -0400 Merge branch 'k.o/for-4.12' into k.o/for-4.12-rdma-netdevice commit db1b5ddd53365a07a7754803bdba370ebb84ba19 Author: Matan Barak Date: Tue Apr 18 12:03:42 2017 +0300 IB/core: Rename uverbs event file structure Previously, ib_uverbs_event_file was suffixed by _file as it contained the actual file information. Since it's now only used as base struct for ib_uverbs_async_event_file and ib_uverbs_completion_event_file, we change its name to ib_uverbs_event_queue. This represents its logical role better. Fixes: 1e7710f3f656 ('IB/core: Change completion channel to use the reworked objects schema') Signed-off-by: Matan Barak Reviewed-by: Sean Hefty Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs.h | 21 ++--- drivers/infiniband/core/uverbs_cmd.c | 8 +- drivers/infiniband/core/uverbs_main.c | 132 ++++++++++++++--------------- drivers/infiniband/core/uverbs_std_types.c | 20 ++--- 4 files changed, 91 insertions(+), 90 deletions(-) commit e0fcc61113c17a2eae0dea7e9e67ac71849475b5 Author: Matan Barak Date: Tue Apr 18 12:03:41 2017 +0300 IB/core: Don't use is_async in event files to infer events size Previously, we inferred the events size in ib_uverbs_event_read by using the is_async flag. Instead of that, we pass the event size directly. Fixes: 1e7710f3f656 ('IB/core: Change completion channel to use the reworked objects schema') Signed-off-by: Matan Barak Reviewed-by: Sean Hefty Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_main.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit c52d8114d1a58f6fe4bfb9af39d262dd8f21e50e Author: Matan Barak Date: Tue Apr 18 12:03:40 2017 +0300 IB/core: A small refactor in destroy WQ handler Instead of having uverbs_uobject_put both in the error flow and the good flow, we unite them. Fixes: fd3c7904db6e ('IB/core: Change idr objects to use the new schema') Signed-off-by: Matan Barak Reviewed-by: Sean Hefty Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit d9edfc5a4f81165e64d4ad6e423a8554c88dd0de Author: Matan Barak Date: Tue Apr 18 12:03:39 2017 +0300 IB/core: Nullify ib_uobject during allocation Currently, we initialize all fields of ib_uobject straight after allocation. Therefore, a kmalloc was sufficient. Since ib_uobject could be embedded in a type specific structure, we nullify it to spare programmer errors. Fixes: 3832125624b7 ('IB/core: Add support for idr types') Signed-off-by: Matan Barak Signed-off-by: Doug Ledford drivers/infiniband/core/rdma_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f025c48958104868a9fceb04696cdfdb056794c9 Author: Matan Barak Date: Tue Apr 18 12:03:38 2017 +0300 IB/core: Don't pass the lock state to _rdma_remove_commit_uobject The only scenario where this function was called while the lock is already taken is in the context cleanup scenario. Thus, in order not to pass the lock state to this function, we just call the remove logic straight from the cleanup context function. Fixes: 3832125624b7 ('IB/core: Add support for idr types') Signed-off-by: Matan Barak Reviewed-by: Sean Hefty Signed-off-by: Doug Ledford drivers/infiniband/core/rdma_core.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 30004b861afd99aebf34237373cb8ee9e890418e Author: Matan Barak Date: Tue Apr 18 12:03:37 2017 +0300 IB/core: Rename write flag to exclusive in rdma_core We rename the "write" flags to "exclusive", as it's used for both WRITE and DESTROY actions. Fixes: 3832125624b7 ('IB/core: Add support for idr types') Signed-off-by: Matan Barak Reviewed-by: Sean Hefty Signed-off-by: Doug Ledford drivers/infiniband/core/rdma_core.c | 60 +++++++++++++++++++------------------ include/rdma/uverbs_types.h | 33 ++++++++++---------- 2 files changed, 48 insertions(+), 45 deletions(-) commit 2bc19cd5fdb5ff2c681761e81cc9044eb2ee753a Author: Jens Axboe Date: Thu Apr 20 09:41:36 2017 -0600 blk-throttle: fix unused variable warning with BLK_DEV_THROTTLING_LOW=n We trigger this warning: block/blk-throttle.c: In function ‘blk_throtl_bio’: block/blk-throttle.c:2042:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret; ^~~ since we only assign 'ret' if BLK_DEV_THROTTLING_LOW is off, we never check it. Reported-by: Bart Van Assche Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-throttle.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 659b3394eb67a5e274d7e7348633b508510a5c8f Author: Jens Axboe Date: Thu Apr 20 09:37:05 2017 -0600 bfq: fix compile error if CONFIG_CGROUPS=n If we don't have CGROUPS enabled, the compile ends in the following misery: In file included from ../block/bfq-iosched.c:105:0: ../block/bfq-iosched.h:819:22: error: array type has incomplete element type extern struct cftype bfq_blkcg_legacy_files[]; ^ ../block/bfq-iosched.h:820:22: error: array type has incomplete element type extern struct cftype bfq_blkg_files[]; ^ Move the declarations under the right ifdef. Reported-by: Randy Dunlap Signed-off-by: Jens Axboe block/bfq-iosched.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8ebe0e20bf483de2860073898f08cbdf855e93e0 Merge: 6fc091f 31c5d19 Author: Greg Kroah-Hartman Date: Thu Apr 20 17:22:51 2017 +0200 Merge tag 'usb-serial-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for v4.12-rc1 Here are the USB-serial updates for 4.12, including: - support for devices with up to 16 ports (e.g. some Moxa devices) - support for endpoint sanity checks in core, which allows for code sharing and avoids allocating resources for rejected interfaces - support for endpoint-port remapping, which allows some driver hacks to be removed as well as omninet to use the generic write implementation - removal of an obsolete tty open-race workaround which prevented a port from being opened immediately after having been registered - generic-driver support for interfaces with just a bulk-in endpoint - improved ftdi_sio event-char and latency-timer handling - improved ftdi_sio support for some broken BM chips Included are also various clean ups and a new ftdi_sio device id. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold commit 3ba8775f64484a2b56bf3c88d09a186d819fa348 Author: zhichang.yuan Date: Tue Apr 18 20:51:48 2017 +0800 iommu: Make iommu_bus_notifier return NOTIFY_DONE rather than error code In iommu_bus_notifier(), when action is BUS_NOTIFY_ADD_DEVICE, it will return 'ops->add_device(dev)' directly. But ops->add_device will return ERR_VAL, such as -ENODEV. These value will make notifier_call_chain() not to traverse the remain nodes in struct notifier_block list. This patch revises iommu_bus_notifier() to return NOTIFY_DONE when some errors happened in ops->add_device(). Signed-off-by: zhichang.yuan Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b0990fbbbd147da2096b24f2d462abe02ca251fd Author: Amir Goldstein Date: Sat Apr 8 14:49:07 2017 +0300 ovl: check IS_APPEND() on real upper inode For overlay file open, check IS_APPEND() on the real upper inode inside d_real(), because the overlay inode does not have the S_APPEND flag and IS_APPEND() can only be checked at open time. Note that because overlayfs does not copy up the chattr inode flags (i.e. S_APPEND, S_IMMUTABLE), the IS_APPEND() check is only relevant for upper inodes that were set with chattr +a and not to lower inodes that had chattr +a before copy up. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit 78757af6518a35bdc22b4e7f660ff9dbbeba35d7 Author: Amir Goldstein Date: Sat Apr 8 14:49:06 2017 +0300 vfs: ftruncate check IS_APPEND() on real upper inode ftruncate an overlayfs inode was checking IS_APPEND() on overlay inode, but overlay inode does not have the S_APPEND flag. Check IS_APPEND() on real upper inode instead. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/open.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 33006cdf9c038dca9b3d4c148a509de851a66ea9 Author: Kees Cook Date: Wed Mar 29 14:02:19 2017 -0700 ovl: Use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. For these cases, use { }, which will be zero-filled, instead of undesignated NULLs. Signed-off-by: Kees Cook Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 4 ++-- fs/overlayfs/util.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 7b9f6da175f9387ebfc202f35e0d39514899ab19 Merge: 9868879 1debdc8 Author: David S. Miller Date: Thu Apr 20 10:35:33 2017 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net A function in kernel/bpf/syscall.c which got a bug fix in 'net' was moved to kernel/bpf/verifier.c in 'net-next'. Signed-off-by: David S. Miller commit fd8e2d4b393252505783656471465c7f85f3c0a9 Author: Suman Anna Date: Wed Apr 12 00:21:32 2017 -0500 omap3isp: Remove iommu_group related code The OMAP IOMMU driver has added the support for IOMMU groups internally, and the ISP device is automatically linked to the appropriate IOMMU group. So, remove the explicit function calls that creates/deletes an iommu_group and adds the ISP device to this group. Cc: Laurent Pinchart Signed-off-by: Suman Anna Signed-off-by: Joerg Roedel drivers/media/platform/omap3isp/isp.c | 17 ----------------- drivers/media/platform/omap3isp/isp.h | 1 - 2 files changed, 18 deletions(-) commit 28ae1e3e14f32c70913e4ebf4aeff7959ed03f84 Author: Joerg Roedel Date: Wed Apr 12 00:21:31 2017 -0500 iommu/omap: Add iommu-group support Support for IOMMU groups will become mandatory for drivers, so add it to the omap iommu driver. Signed-off-by: Joerg Roedel [s-anna@ti.com: minor error cleanups] Signed-off-by: Suman Anna Signed-off-by: Joerg Roedel drivers/iommu/omap-iommu.c | 39 ++++++++++++++++++++++++++++++++++++++- drivers/iommu/omap-iommu.h | 1 + 2 files changed, 39 insertions(+), 1 deletion(-) commit 01611fe8478bf582af0c33d5853137dd25b72f2f Author: Joerg Roedel Date: Wed Apr 12 00:21:30 2017 -0500 iommu/omap: Make use of 'struct iommu_device' Modify the driver to register individual iommus and establish links between devices and iommus in sysfs. Signed-off-by: Joerg Roedel [s-anna@ti.com: fix some cleanup issues during failures] Signed-off-by: Suman Anna Signed-off-by: Joerg Roedel drivers/iommu/omap-iommu.c | 30 ++++++++++++++++++++++++++++++ drivers/iommu/omap-iommu.h | 2 ++ 2 files changed, 32 insertions(+) commit ede1c2e7d4dc49fb1591e1754db9d53fabbd4b8b Author: Joerg Roedel Date: Wed Apr 12 00:21:29 2017 -0500 iommu/omap: Store iommu_dev pointer in arch_data Instead of finding the matching IOMMU for a device using string comparision functions, store the pointer to the iommu_dev in arch_data during the omap_iommu_add_device callback and reset it during the omap_iommu_remove_device callback functions. Signed-off-by: Joerg Roedel [s-anna@ti.com: few minor cleanups] Signed-off-by: Suman Anna Signed-off-by: Joerg Roedel drivers/iommu/omap-iommu.c | 56 +++++++++++++++++++--------------------------- drivers/iommu/omap-iommu.h | 2 -- 2 files changed, 23 insertions(+), 35 deletions(-) commit e73b7afe4e8ca5ec4304a9e1d5009755a85fff91 Author: Joerg Roedel Date: Wed Apr 12 00:21:28 2017 -0500 iommu/omap: Move data structures to omap-iommu.h The internal data-structures are scattered over various header and C files. Consolidate them in omap-iommu.h. While at this, add the kerneldoc comment for the missing iommu domain variable and revise the iommu_arch_data name. Signed-off-by: Joerg Roedel [s-anna@ti.com: revise kerneldoc comments] Signed-off-by: Suman Anna Signed-off-by: Joerg Roedel drivers/iommu/omap-iommu.c | 16 ---------------- drivers/iommu/omap-iommu.h | 33 ++++++++++++++++++++++++++++++++ include/linux/platform_data/iommu-omap.h | 17 ---------------- 3 files changed, 33 insertions(+), 33 deletions(-) commit 49a57ef7f8492ef985ee1ecdb927ca78a6b2f308 Author: Suman Anna Date: Wed Apr 12 00:21:27 2017 -0500 iommu/omap: Drop legacy-style device support All the supported boards that have OMAP IOMMU devices do support DT boot only now. So, drop the support for the non-DT legacy-style devices from the OMAP IOMMU driver. Couple of the fields from the iommu platform data would no longer be required, so they have also been cleaned up. The IOMMU platform data is still needed though for performing reset management properly in a multi-arch environment. Signed-off-by: Suman Anna Signed-off-by: Joerg Roedel drivers/iommu/omap-iommu.c | 30 ++++++++++++++---------------- include/linux/platform_data/iommu-omap.h | 3 --- 2 files changed, 14 insertions(+), 19 deletions(-) commit abaa7e5b054aae567861628b74dbc7fbf8ed79e8 Author: Suman Anna Date: Wed Apr 12 00:21:26 2017 -0500 iommu/omap: Register driver before setting IOMMU ops Move the registration of the OMAP IOMMU platform driver before setting the IOMMU callbacks on the platform bus. This causes the IOMMU devices to be probed first before the .add_device() callback is invoked for all registered devices, and allows the iommu_group support to be added to the OMAP IOMMU driver. While at this, also check for the return status from bus_set_iommu. Signed-off-by: Suman Anna Signed-off-by: Joerg Roedel drivers/iommu/omap-iommu.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 316ca8804ea84a782d5ba2163711ebb22116ff5a Author: Lorenzo Pieralisi Date: Mon Apr 10 16:51:06 2017 +0530 ACPI/IORT: Remove linker section for IORT entries probing The IORT linker section introduced by commit 34ceea275f62 ("ACPI/IORT: Introduce linker section for IORT entries probing") was needed to make sure SMMU drivers are registered (and therefore probed) in the kernel before devices using the SMMU have a chance to probe in turn. Through the introduction of deferred IOMMU configuration the linker section based IORT probing infrastructure is not needed any longer, in that device/SMMU probe dependencies are managed through the probe deferral mechanism, making the IORT linker section infrastructure unused, so that it can be removed. Remove the unused IORT linker section probing infrastructure from the kernel to complete the ACPI IORT IOMMU configure probe deferral mechanism implementation. Tested-by: Hanjun Guo Reviewed-by: Robin Murphy Signed-off-by: Lorenzo Pieralisi Cc: Sricharan R Signed-off-by: Joerg Roedel drivers/acpi/arm64/iort.c | 2 -- include/asm-generic/vmlinux.lds.h | 1 - include/linux/acpi_iort.h | 3 --- 3 files changed, 6 deletions(-) commit f6810c15cf973fc640ac8029951ff59f547b8a5e Author: Robin Murphy Date: Mon Apr 10 16:51:05 2017 +0530 iommu/arm-smmu: Clean up early-probing workarounds Now that the appropriate ordering is enforced via probe-deferral of masters in core code, rip it all out and bask in the simplicity. Tested-by: Hanjun Guo Acked-by: Will Deacon Signed-off-by: Robin Murphy [Sricharan: Rebased on top of ACPI IORT SMMU series] Signed-off-by: Sricharan R Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu-v3.c | 46 +----------------- drivers/iommu/arm-smmu.c | 110 +++++++++++++++++++------------------------- 2 files changed, 49 insertions(+), 107 deletions(-) commit b913efe78a7ce1b2e64af7e5dc3a03748b997c61 Author: Sricharan R Date: Mon Apr 10 16:51:04 2017 +0530 arm64: dma-mapping: Remove the notifier trick to handle early setting of dma_ops With arch_setup_dma_ops now being called late during device's probe after the device's iommu is probed, the notifier trick required to handle the early setup of dma_ops before the iommu group gets created is not required. So removing the notifier's here. Tested-by: Marek Szyprowski Tested-by: Hanjun Guo Acked-by: Will Deacon Signed-off-by: Sricharan R [rm: clean up even more] Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel arch/arm64/mm/dma-mapping.c | 142 ++++++-------------------------------------- 1 file changed, 18 insertions(+), 124 deletions(-) commit 5a1bb638d5677053c7addcb228b56da6fccb5d68 Author: Sricharan R Date: Mon Apr 10 16:51:03 2017 +0530 drivers: acpi: Handle IOMMU lookup failure with deferred probing or error This is an equivalent to the DT's handling of the iommu master's probe with deferred probing when the corrsponding iommu is not probed yet. The lack of a registered IOMMU can be caused by the lack of a driver for the IOMMU, the IOMMU device probe not having been performed yet, having been deferred, or having failed. The first case occurs when the firmware describes the bus master and IOMMU topology correctly but no device driver exists for the IOMMU yet or the device driver has not been compiled in. Return NULL, the caller will configure the device without an IOMMU. The second and third cases are handled by deferring the probe of the bus master device which will eventually get reprobed after the IOMMU. The last case is currently handled by deferring the probe of the bus master device as well. A mechanism to either configure the bus master device without an IOMMU or to fail the bus master device probe depending on whether the IOMMU is optional or mandatory would be a good enhancement. Tested-by: Hanjun Guo Reviewed-by: Robin Murphy [Lorenzo: Added fixes for dma_coherent_mask overflow, acpi_dma_configure called multiple times for same device] Signed-off-by: Lorenzo Pieralisi Signed-off-by: Sricharan R Signed-off-by: Joerg Roedel drivers/acpi/arm64/iort.c | 33 ++++++++++++++++++++++++++++++++- drivers/acpi/scan.c | 11 ++++++++--- drivers/base/dma-mapping.c | 2 +- include/acpi/acpi_bus.h | 2 +- include/linux/acpi.h | 7 +++++-- 5 files changed, 47 insertions(+), 8 deletions(-) commit 7b07cbefb68d486febf47e13b570fed53d9296b4 Author: Laurent Pinchart Date: Mon Apr 10 16:51:02 2017 +0530 iommu: of: Handle IOMMU lookup failure with deferred probing or error Failures to look up an IOMMU when parsing the DT iommus property need to be handled separately from the .of_xlate() failures to support deferred probing. The lack of a registered IOMMU can be caused by the lack of a driver for the IOMMU, the IOMMU device probe not having been performed yet, having been deferred, or having failed. The first case occurs when the device tree describes the bus master and IOMMU topology correctly but no device driver exists for the IOMMU yet or the device driver has not been compiled in. Return NULL, the caller will configure the device without an IOMMU. The second and third cases are handled by deferring the probe of the bus master device which will eventually get reprobed after the IOMMU. The last case is currently handled by deferring the probe of the bus master device as well. A mechanism to either configure the bus master device without an IOMMU or to fail the bus master device probe depending on whether the IOMMU is optional or mandatory would be a good enhancement. Tested-by: Marek Szyprowski Reviewed-by: Robin Murphy Acked-by: Rob Herring Signed-off-by: Laurent Pichart Signed-off-by: Sricharan R Signed-off-by: Joerg Roedel drivers/base/dma-mapping.c | 5 +++-- drivers/iommu/of_iommu.c | 4 ++-- drivers/of/device.c | 9 +++++++-- include/linux/of_device.h | 9 ++++++--- 4 files changed, 18 insertions(+), 9 deletions(-) commit 09515ef5ddad71c7820e5e428da418b709feeb26 Author: Sricharan R Date: Mon Apr 10 16:51:01 2017 +0530 of/acpi: Configure dma operations at probe time for platform/amba/pci bus devices Configuring DMA ops at probe time will allow deferring device probe when the IOMMU isn't available yet. The dma_configure for the device is now called from the generic device_attach callback just before the bus/driver probe is called. This way, configuring the DMA ops for the device would be called at the same place for all bus_types, hence the deferred probing mechanism should work for all buses as well. pci_bus_add_devices (platform/amba)(_device_create/driver_register) | | pci_bus_add_device (device_add/driver_register) | | device_attach device_initial_probe | | __device_attach_driver __device_attach_driver | driver_probe_device | really_probe | dma_configure Similarly on the device/driver_unregister path __device_release_driver is called which inturn calls dma_deconfigure. This patch changes the dma ops configuration to probe time for both OF and ACPI based platform/amba/pci bus devices. Tested-by: Marek Szyprowski Tested-by: Hanjun Guo Reviewed-by: Robin Murphy Acked-by: Rob Herring Acked-by: Bjorn Helgaas (drivers/pci part) Acked-by: Rafael J. Wysocki Signed-off-by: Sricharan R Signed-off-by: Joerg Roedel drivers/acpi/glue.c | 5 ----- drivers/base/dd.c | 9 +++++++++ drivers/base/dma-mapping.c | 40 ++++++++++++++++++++++++++++++++++++++++ drivers/of/platform.c | 5 +---- drivers/pci/probe.c | 28 ---------------------------- include/linux/dma-mapping.h | 12 ++++++++++++ 6 files changed, 62 insertions(+), 37 deletions(-) commit efc8551a276faab19d85079da02c5fb602b0dcbe Author: Sricharan R Date: Mon Apr 10 16:51:00 2017 +0530 of: device: Fix overflow of coherent_dma_mask Size of the dma-range is calculated as coherent_dma_mask + 1 and passed to arch_setup_dma_ops further. It overflows when the coherent_dma_mask is set for full 64 bits 0xFFFFFFFFFFFFFFFF, resulting in size getting passed as 0 wrongly. Fix this by passsing in max(mask, mask + 1). Note that in this case when the mask is set to full 64bits, we will be passing the mask itself to arch_setup_dma_ops instead of the size. The real fix for this should be to make arch_setup_dma_ops receive the mask and handle it, to be done in the future. Reviewed-by: Robin Murphy Acked-by: Rob Herring Signed-off-by: Sricharan R Signed-off-by: Joerg Roedel drivers/of/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d9029d440e40b276c0691caed1de10c42d96bef Author: Lorenzo Pieralisi Date: Mon Apr 10 16:50:59 2017 +0530 ACPI/IORT: Add function to check SMMUs drivers presence The IOMMU probe deferral implementation requires a mechanism to detect if drivers for SMMU components are built-in in the kernel to detect whether IOMMU configuration for a given device should be deferred (ie SMMU drivers present but still not probed) or not (drivers not present). Add a simple function to IORT to detect if SMMU drivers for SMMU components managed by IORT are built-in in the kernel. Tested-by: Hanjun Guo Signed-off-by: Lorenzo Pieralisi Reviewed-by: Robin Murphy Cc: Sricharan R Signed-off-by: Joerg Roedel drivers/acpi/arm64/iort.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 3f1866779cf8338e1c8bd32e5f6f5424795ef191 Author: Laurent Pinchart Date: Mon Apr 10 16:50:58 2017 +0530 of: dma: Make of_dma_deconfigure() public As part of moving DMA initializing to probe time the of_dma_deconfigure() function will need to be called from different source files. Make it public and move it to drivers/of/device.c where the of_dma_configure() function is. Tested-by: Marek Szyprowski Reviewed-by: Robin Murphy Acked-by: Rob Herring Signed-off-by: Laurent Pinchart Signed-off-by: Joerg Roedel drivers/of/device.c | 12 ++++++++++++ drivers/of/platform.c | 5 ----- include/linux/of_device.h | 3 +++ 3 files changed, 15 insertions(+), 5 deletions(-) commit d7b0558230e444f29488fcee0b0b561015d16f8a Author: Robin Murphy Date: Mon Apr 10 16:50:57 2017 +0530 iommu/of: Prepare for deferred IOMMU configuration IOMMU configuration represents unchanging properties of the hardware, and as such should only need happen once in a device's lifetime, but the necessary interaction with the IOMMU device and driver complicates exactly when that point should be. Since the only reasonable tool available for handling the inter-device dependency is probe deferral, we need to prepare of_iommu_configure() to run later than it is currently called (i.e. at driver probe rather than device creation), to handle being retried, and to tell whether a not-yet present IOMMU should be waited for or skipped (by virtue of having declared a built-in driver or not). Tested-by: Marek Szyprowski Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/of_iommu.c | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) commit 2a0c57545a291f257cd231b1c4b18285b84608d8 Author: Robin Murphy Date: Mon Apr 10 16:50:56 2017 +0530 iommu/of: Refactor of_iommu_configure() for error handling In preparation for some upcoming cleverness, rework the control flow in of_iommu_configure() to minimise duplication and improve the propogation of errors. It's also as good a time as any to switch over from the now-just-a-compatibility-wrapper of_iommu_get_ops() to using the generic IOMMU instance interface directly. Tested-by: Marek Szyprowski Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/of_iommu.c | 83 +++++++++++++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 30 deletions(-) commit 8c9ff1addad515037abc1b14684f9d6fd480c247 Author: Colin Ian King Date: Thu Apr 20 15:07:18 2017 +0100 block, bfq: don't dereference bic before null checking it The call to bfq_check_ioprio_change will dereference bic, however, the null check for bic is after this call. Move the the null check on bic to before the call to avoid any potential null pointer dereference issues. Detected by CoverityScan, CID#1430138 ("Dereference before null check") Signed-off-by: Colin Ian King Signed-off-by: Jens Axboe block/bfq-iosched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 75ba4ada8286d415bcaab993ce1f11125b8aa13e Author: Rakesh Pandit Date: Thu Apr 20 08:17:47 2017 -0600 ligtnvm: fix double blk_put_queue on same queue On an error path in NVM_DEV_CREATE ioctl blk_put_queue is being called twice: one via blk_cleanup_queue and another via put_disk. Straight fix seems to remove queue pointer so that disk_release never ends up caling blk_put_queue again. [ 391.808827] WARNING: CPU: 1 PID: 1250 at lib/refcount.c:128 refcount_sub_and_test+0x70/0x80 [ 391.808830] refcount_t: underflow; use-after-free. [ 391.808832] Modules linked in: nf_conntrack_netbios_ns............ [ 391.809052] CPU: 1 PID: 1250 Comm: nvme Not tainted......... [ 391.809057] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5-0-ge51488c-20140602_164612-nilsson.home.kraxel.org 04/01/2014 [ 391.809060] Call Trace: [ 391.809079] dump_stack+0x63/0x86 [ 391.809094] __warn+0xcb/0xf0 [ 391.809103] warn_slowpath_fmt+0x5f/0x80 [ 391.809118] refcount_sub_and_test+0x70/0x80 [ 391.809125] refcount_dec_and_test+0x11/0x20 [ 391.809136] kobject_put+0x1f/0x60 [ 391.809149] blk_put_queue+0x15/0x20 [ 391.809159] disk_release+0xae/0xf0 [ 391.809172] device_release+0x32/0x90 [ 391.809184] kobject_release+0x6a/0x170 [ 391.809196] kobject_put+0x2f/0x60 [ 391.809206] put_disk+0x17/0x20 [ 391.809219] nvm_ioctl_dev_create.isra.16+0x897/0xa30 [ 391.809236] nvm_ctl_ioctl+0x23c/0x4c0 [ 391.809248] do_vfs_ioctl+0xa3/0x5f0 [ 391.809258] SyS_ioctl+0x79/0x90 [ 391.809271] entry_SYSCALL_64_fastpath+0x1a/0xa9 [ 391.809280] RIP: 0033:0x7f5d3ef363c7 [ 391.809286] RSP: 002b:00007ffc72ed8d78 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 [ 391.809296] RAX: ffffffffffffffda RBX: 00007ffc72edb552 RCX: 00007f5d3ef363c7 [ 391.809301] RDX: 00007ffc72ed8d90 RSI: 0000000040804c22 RDI: 0000000000000003 [ 391.809306] RBP: 0000000000000001 R08: 0000000000000020 R09: 0000000000000001 [ 391.809311] R10: 000000000000053f R11: 0000000000000206 R12: 0000000000000000 [ 391.809316] R13: 0000000000000000 R14: 00007ffc72edb58d R15: 00007ffc72edb581 Signed-off-by: Rakesh Pandit Reviewed-by: Matias Bjørling Fixes: 7d1ef2f408ab "lightnvm: fix cleanup order of disk on init error" Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 1 + 1 file changed, 1 insertion(+) commit 6b12e71dd46489c66405fd95c1daab8b9679e069 Author: Marek Vasut Date: Sun Apr 16 20:01:11 2017 +0200 of: Add vendor prefix for ROHM Semiconductor ROHM Semiconductor Co., Ltd. offer PMICs, touchscreen controllers etc. http://www.rohm.com/web/global/ Signed-off-by: Marek Vasut Cc: Rob Herring Cc: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 8ada00a650ec7ec639fb72964f0e4eba928786f8 Author: Matt Redfearn Date: Thu Apr 20 10:07:36 2017 +0100 irqchip/mips-gic: Replace static map with dynamic Commit 4cfffcfa5106 ("irqchip/mips-gic: Fix local interrupts") fixed local interrupts by creating virq mappings for them all at startup. Unfortunately this change broke legacy IRQ controllers in the same system, such as the i8259 on the Malta platform, as it allocates virq numbers that were expected to be available for the legacy controller. Instead of creating the mappings statically when the GIC is probed, re-introduce the irq domain .map function, removed by commit e875bd66dfb ("irqchip/mips-gic: Fix local interrupts") and use it to set up the irq handler and chip. Since a good deal of the required functionality is already implemented by gic_irq_domain_alloc, repurpose that function for gic_irq_domain_map and add a new gic_irq_domain_alloc which wraps gic_irq_domain_map with the necessary conversion. This change fixes the legacy interrupt controller of the Malta platform without breaking the perf interrupt fixed by commit e875bd66dfb ("irqchip/mips-gic: Fix local interrupts"). Signed-off-by: Matt Redfearn Cc: linux-mips@linux-mips.org Cc: Jason Cooper Cc: Marc Zyngier Cc: Ralf Baechle Link: http://lkml.kernel.org/r/1492679256-14513-4-git-send-email-matt.redfearn@imgtec.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-mips-gic.c | 60 +++++++++++++----------------------------- 1 file changed, 18 insertions(+), 42 deletions(-) commit b87281e7f205eda08c911fdacd27d4d2f01daa09 Author: Paul Burton Date: Thu Apr 20 10:07:35 2017 +0100 irqchip/mips-gic: Remove device IRQ domain In commit c98c1822ee13 ("irqchip/mips-gic: Add device hierarchy domain") Qais indicates that he felt having a separate device IRQ domain was cleaner, but along with everyone else I'm aware of touching this driver I disagree. Remove the separate device IRQ domain so that we simply have the main GIC IRQ domain used for devices, and an IPI IRQ domain as a child. The logic for handling the device interrupts & IPIs is cleanly separated into the appropriate domain ops, making it much easier to reason about what the driver is doing than the previous approach where the 2 child domains had to call up to their parent, which had to handle both types of interrupt & had all sorts of weird & wonderful duplication or outright clobbering of setup performed by multiple domains. Signed-off-by: Paul Burton Signed-off-by: Matt Redfearn Cc: linux-mips@linux-mips.org Cc: Jason Cooper Cc: Marc Zyngier Cc: Ralf Baechle Link: http://lkml.kernel.org/r/1492679256-14513-3-git-send-email-matt.redfearn@imgtec.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-mips-gic.c | 290 +++++++++++++---------------------------- 1 file changed, 93 insertions(+), 197 deletions(-) commit f8dcd9e81797ae24acc44c84f0eb3b9e6cee9791 Author: Paul Burton Date: Thu Apr 20 10:07:34 2017 +0100 irqchip/mips-gic: Separate IPI reservation & usage tracking Since commit 2af70a962070 ("irqchip/mips-gic: Add a IPI hierarchy domain") introduced the GIC IPI IRQ domain we have tracked both reservation of interrupts & their use with a single bitmap - ipi_resrv. If an interrupt is reserved for use as an IPI but not actually in use then the appropriate bit is set in ipi_resrv. If an interrupt is either not reserved for use as an IPI or has been allocated as one then the appropriate bit is clear in ipi_resrv. Unfortunately this means that checking whether a bit is set in ipi_resrv to prevent IPI interrupts being allocated for use with a device is broken, because if the interrupt has been allocated as an IPI first then its bit will be clear. Fix this by separating the tracking of IPI reservation & usage, introducing a separate ipi_available bitmap for the latter. This means that ipi_resrv will now always have bits set corresponding to all interrupts reserved for use as IPIs, whether or not they have been allocated yet, and therefore that checking it when allocating device interrupts works as expected. Fixes: 2af70a962070 ("irqchip/mips-gic: Add a IPI hierarchy domain") Signed-off-by: Paul Burton Signed-off-by: Matt Redfearn Cc: linux-mips@linux-mips.org Cc: Jason Cooper Cc: Marc Zyngier Cc: Ralf Baechle Link: http://lkml.kernel.org/r/1492679256-14513-2-git-send-email-matt.redfearn@imgtec.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-mips-gic.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 7a258ff04f9d5fe549fed6d03931a0236587047e Merge: 382bd4d f61143c Author: Thomas Gleixner Date: Thu Apr 20 16:05:13 2017 +0200 Merge branch 'linus' into irq/core Pick up upstream fixes to avoid conflicts with pending patches. commit 4797b7dfdfcf457075c36743d71e2b0feeaaa20f Author: Vikas Shivappa Date: Wed Apr 19 16:50:04 2017 -0700 x86/intel_rdt: Return error for incorrect resource names in schemata When schemata parses the resource names it does not return an error if it detects incorrect resource names and fails quietly. This happens because for_each_enabled_rdt_resource(r) leaves "r" pointing beyond the end of the rdt_resources_all[] array, and the check for !r->name results in an out of bounds access. Split the resource parsing part into a helper function to avoid the issue. [ tglx: Made it readable by splitting the parser loop out into a function ] Reported-by: Prakhya, Sai Praneeth Signed-off-by: Vikas Shivappa Tested-by: Prakhya, Sai Praneeth Cc: fenghua.yu@intel.com Cc: tony.luck@intel.com Cc: ravi.v.shankar@intel.com Cc: vikas.shivappa@intel.com Link: http://lkml.kernel.org/r/1492645804-17465-4-git-send-email-vikas.shivappa@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/intel_rdt_schemata.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 634b0e0491d6f6e882b922eb41c278d01a743bab Author: Vikas Shivappa Date: Wed Apr 19 16:50:03 2017 -0700 x86/intel_rdt: Trim whitespace while parsing schemata input Schemata is displayed in tabular format which introduces some whitespace to show data in a tabular format. Writing back the same data fails as the parser does not handle the whitespace. Trim the leading and trailing whitespace before parsing. Reported-by: Prakhya, Sai Praneeth Signed-off-by: Vikas Shivappa Tested-by: Prakhya, Sai Praneeth Cc: fenghua.yu@intel.com Cc: tony.luck@intel.com Cc: ravi.v.shankar@intel.com Cc: vikas.shivappa@intel.com Link: http://lkml.kernel.org/r/1492645804-17465-3-git-send-email-vikas.shivappa@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/intel_rdt_schemata.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit adcbdd70309dba5a12a9d8158deb6a62a6d5fc98 Author: Vikas Shivappa Date: Wed Apr 19 16:50:02 2017 -0700 x86/intel_rdt: Fix padding when resource is enabled via mount Currently max width of 'resource name' and 'resource data' is being initialized based on 'enabled resources' during boot. But the mount can enable different capable resources at a later time which upsets the tabular format of schemata. Fix this to be based on 'all capable' resources. Signed-off-by: Vikas Shivappa Tested-by: Prakhya, Sai Praneeth Cc: fenghua.yu@intel.com Cc: tony.luck@intel.com Cc: ravi.v.shankar@intel.com Cc: vikas.shivappa@intel.com Link: http://lkml.kernel.org/r/1492645804-17465-2-git-send-email-vikas.shivappa@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/intel_rdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48f52d1a8ca9f1aff3ffad8e35b6c56eafa17b9b Author: Christoph Hellwig Date: Fri Apr 14 21:11:27 2017 +0200 PCI: Call pcie_flr() from reset_chelsio_generic_dev() Instead of copy & pasting and old version of the code. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit c8d8096abc84b544dd4f37f12e929d5f8aadd160 Author: Christoph Hellwig Date: Fri Apr 14 21:11:26 2017 +0200 PCI: Call pcie_flr() from reset_intel_82599_sfp_virtfn() The 82599 quirk contained an outdated copy of the FLR code. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit a60a2b73ba69abca26653fff157b0fd8947bc498 Author: Christoph Hellwig Date: Fri Apr 14 21:11:25 2017 +0200 PCI: Export pcie_flr() Currently we opencode the FLR sequence in lots of place; export a core helper instead. We split out the probing for FLR support as all the non-core callers already know their hardware. Note that in the new pci_has_flr() function the quirk check has been moved before the capability check as there is no point in reading the capability in this case. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 39 ++++++++++++++++++++++++++++----------- include/linux/pci.h | 1 + 2 files changed, 29 insertions(+), 11 deletions(-) commit 0e7df22401a3dfd403b26dea62dd00e0598b538b Author: Bodong Wang Date: Thu Apr 13 01:51:40 2017 +0300 PCI: Add sysfs sriov_drivers_autoprobe to control VF driver binding Sometimes it is not desirable to bind SR-IOV VFs to drivers. This can save host side resource usage by VF instances that will be assigned to VMs. Add a new PCI sysfs interface "sriov_drivers_autoprobe" to control that from the PF. To modify it, echo 0/n/N (disable probe) or 1/y/Y (enable probe) to: /sys/bus/pci/devices//sriov_drivers_autoprobe Note that this must be done before enabling VFs. The change will not take effect if VFs are already enabled. Simply, one can disable VFs by setting sriov_numvfs to 0, choose whether to probe or not, and then re-enable the VFs by restoring sriov_numvfs. [bhelgaas: changelog, ABI doc] Signed-off-by: Bodong Wang Signed-off-by: Eli Cohen Signed-off-by: Bjorn Helgaas Reviewed-by: Gavin Shan Reviewed-by: Alex Williamson Documentation/ABI/testing/sysfs-bus-pci | 22 ++++++++++++++++++++++ Documentation/PCI/pci-iov-howto.txt | 12 ++++++++++++ drivers/pci/iov.c | 1 + drivers/pci/pci-driver.c | 22 ++++++++++++++++++---- drivers/pci/pci-sysfs.c | 28 ++++++++++++++++++++++++++++ drivers/pci/pci.h | 1 + 6 files changed, 82 insertions(+), 4 deletions(-) commit d9c102de2caa733c3e718e1b032cd154a9994326 Author: David Woodhouse Date: Fri Apr 7 12:10:53 2017 +0200 ia64: Use generic pci_mmap_resource_range() Now that we eliminated the different behaviour in separately-reviewable commits, we can switch IA64 to the generic implementation. Signed-off-by: David Woodhouse Tested-by: Tony Luck arch/ia64/include/asm/pci.h | 1 + arch/ia64/pci/pci.c | 30 ------------------------------ 2 files changed, 1 insertion(+), 30 deletions(-) commit fcdb10d6b179fde41ca94d032afda8f4ed796b8e Author: David Woodhouse Date: Fri Apr 7 12:01:00 2017 +0200 ia64: Remove redundant checks for WC in pci_mmap_page_range() For a PCI MMIO BAR, phys_mem_access_prot() should always return UC or WC. And while a mixture of cached and uncached mappings is forbidden, we were already mixing WC and UC, which is OK. Just do as we're asked. Signed-off-by: David Woodhouse Tested-by: Tony Luck arch/ia64/pci/pci.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit 61eee41ae135517392d05cbf1177523a02f12727 Author: David Woodhouse Date: Fri Apr 7 11:22:42 2017 +0200 ia64: Remove redundant valid_mmap_phys_addr_range() from pci_mmap_page_range() We know we are within a valid MMIO BAR by the time this function gets called; there's no need to check. Signed-off-by: David Woodhouse Tested-by: Tony Luck arch/ia64/pci/pci.c | 3 --- 1 file changed, 3 deletions(-) commit 2bea36fd1af440e1853e431459a0bf929266cd52 Author: David Woodhouse Date: Wed Apr 12 13:26:08 2017 +0100 PCI: Add I/O BAR support to generic pci_mmap_resource_range() This will need to call into an arch-provided pci_iobar_pfn() function. Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas drivers/pci/mmap.c | 12 ++++++++---- include/linux/pci.h | 4 ++++ 2 files changed, 12 insertions(+), 4 deletions(-) commit 5c2d5ce2ab4bd716b2125f15b2e0879143ac0563 Author: David Woodhouse Date: Wed Apr 12 13:26:07 2017 +0100 x86/PCI: Use generic pci_mmap_resource_range() Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas arch/x86/include/asm/pci.h | 1 + arch/x86/pci/i386.c | 48 ---------------------------------------------- 2 files changed, 1 insertion(+), 48 deletions(-) commit 69c701ec1f97315dc0f482699f370887448e150e Author: David Woodhouse Date: Wed Apr 12 13:26:06 2017 +0100 unicore32/PCI: Use generic pci_mmap_resource_range() Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas arch/unicore32/include/asm/pci.h | 1 + arch/unicore32/kernel/pci.c | 24 ------------------------ 2 files changed, 1 insertion(+), 24 deletions(-) commit adf7bde63f049ab0c3284a67898055bb11614c15 Author: David Woodhouse Date: Wed Apr 12 13:26:05 2017 +0100 sh/PCI: Use generic pci_mmap_resource_range() Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas arch/sh/drivers/pci/pci.c | 22 ---------------------- arch/sh/include/asm/pci.h | 1 + 2 files changed, 1 insertion(+), 22 deletions(-) commit 6a94ca14c389b00515b026cd35bcd074dec6f7ff Author: David Woodhouse Date: Wed Apr 12 13:26:04 2017 +0100 parisc: Use generic pci_mmap_resource_range() Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas arch/parisc/include/asm/pci.h | 1 + arch/parisc/kernel/pci.c | 29 ----------------------------- 2 files changed, 1 insertion(+), 29 deletions(-) commit 903bdbe271217f656d13767d8a3e74b8aabc54c2 Author: David Woodhouse Date: Wed Apr 12 13:26:03 2017 +0100 mn10300/PCI: Use generic pci_mmap_resource_range() This was setting vma->vm_flags |= VM_LOCKED. Not sure why... Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas Reviewed-by: David Howells arch/mn10300/include/asm/pci.h | 1 + arch/mn10300/unit-asb2305/pci-asb2305.c | 24 ------------------------ 2 files changed, 1 insertion(+), 24 deletions(-) commit 35368f80403d32a993587c7f26cd3bcede3ed202 Author: David Woodhouse Date: Wed Apr 12 13:26:02 2017 +0100 MIPS: PCI: Use generic pci_mmap_resource_range() Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas arch/mips/include/asm/pci.h | 2 +- arch/mips/pci/pci.c | 25 ------------------------- 2 files changed, 1 insertion(+), 26 deletions(-) commit 3efdd5fe0a363e308ed61d020f14371dfb5aab4a Author: David Woodhouse Date: Wed Apr 12 13:26:01 2017 +0100 cris/PCI: Use generic pci_mmap_resource_range() Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas Acked-by: Jesper Nilsson arch/cris/arch-v32/drivers/pci/bios.c | 23 ----------------------- arch/cris/include/asm/pci.h | 1 + 2 files changed, 1 insertion(+), 23 deletions(-) commit 00d2904ffeac067d7fe29c04edcfa0216102b4c2 Author: David Woodhouse Date: Wed Apr 12 13:26:00 2017 +0100 ARM/PCI: Use generic pci_mmap_resource_range() Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas arch/arm/include/asm/pci.h | 1 + arch/arm/kernel/bios32.c | 20 -------------------- 2 files changed, 1 insertion(+), 20 deletions(-) commit f719582435afe9c7985206e42d804ea6aa315d33 Author: David Woodhouse Date: Wed Apr 12 13:25:59 2017 +0100 PCI: Add pci_mmap_resource_range() and use it for ARM64 Starting to leave behind the legacy of the pci_mmap_page_range() interface which takes "user-visible" BAR addresses. This takes just the resource and offset. For now, both APIs coexist and depending on the platform, one is implemented as a wrapper around the other. Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas Documentation/filesystems/sysfs-pci.txt | 10 ++-- arch/arm64/include/asm/pci.h | 2 + drivers/pci/Makefile | 2 +- drivers/pci/mmap.c | 95 +++++++++++++++++++++++++++++++++ drivers/pci/pci-sysfs.c | 13 ++--- drivers/pci/pci.h | 4 +- include/linux/pci.h | 19 +++++-- 7 files changed, 125 insertions(+), 20 deletions(-) commit f66e225828c1b046c7db1db65b0dd2d135f6a2da Author: David Woodhouse Date: Wed Apr 12 13:25:58 2017 +0100 PCI: Add BAR index argument to pci_mmap_page_range() In all cases we know which BAR it is. Passing it in means that arch code (or generic code; watch this space) won't have to go looking for it again. Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas arch/arm/kernel/bios32.c | 3 ++- arch/cris/arch-v32/drivers/pci/bios.c | 3 ++- arch/ia64/pci/pci.c | 3 ++- arch/microblaze/pci/pci-common.c | 2 +- arch/mips/pci/pci.c | 3 ++- arch/mn10300/unit-asb2305/pci-asb2305.c | 3 ++- arch/parisc/kernel/pci.c | 3 ++- arch/powerpc/kernel/pci-common.c | 3 ++- arch/sh/drivers/pci/pci.c | 3 ++- arch/sparc/kernel/pci.c | 6 +++--- arch/unicore32/kernel/pci.c | 3 ++- arch/x86/pci/i386.c | 3 ++- arch/xtensa/kernel/pci.c | 3 ++- drivers/pci/pci-sysfs.c | 2 +- drivers/pci/proc.c | 2 +- include/linux/pci.h | 3 ++- 16 files changed, 30 insertions(+), 18 deletions(-) commit dca40b186b757c7f9a05f870f69e0dfaeca59d7b Author: David Woodhouse Date: Wed Apr 12 13:25:57 2017 +0100 PCI: Use BAR index in sysfs attr->private instead of resource pointer We store the pointer, and then on *every* use of it we loop over the device's resources to find out the index. That's kind of silly. Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas drivers/pci/pci-sysfs.c | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) commit c0edbd4a1693600d6eb9e2faad452638c35391f7 Author: Chen Yu Date: Sun Apr 16 23:43:30 2017 +0800 x86/irq: Optimize free vector check in the CPU offline path Before offlining a CPU its required to check whether there are enough free irq vectors available so interrupts can be migrated away from the CPU. This check is executed whether its required or not and neither stops searching when the number of required free vectors are reached. Bypass the free vector check if the current CPU has no irq to migrate and leave the for_each_online_cpu() loop when the free vector count reaches the number of required vectors. Suggested-by: Thomas Gleixner Signed-off-by: Chen Yu Cc: Prarit Bhargava Cc: Len Brown Cc: "Rafael J. Wysocki" Link: http://lkml.kernel.org/r/1492357410-510-1-git-send-email-yu.c.chen@intel.com Signed-off-by: Thomas Gleixner arch/x86/kernel/irq.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 22d8b3dec214cd43a773f621f95d254c50d2a092 Author: Naveen N. Rao Date: Wed Apr 19 18:21:05 2017 +0530 powerpc/kprobes: Emulate instructions on kprobe handler re-entry On kprobe handler re-entry, try to emulate the instruction rather than single stepping always. Acked-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1cabd2f8f720a0ed612139547acb655495b23e8b Author: Naveen N. Rao Date: Wed Apr 19 18:21:04 2017 +0530 powerpc/kprobes: Factor out code to emulate instruction into a helper Factor out code to emulate instruction into a try_to_emulate() helper function. This makes no functional changes. Acked-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 52 ++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 21 deletions(-) commit a64e3f35a45f4a84148d0ba30a3c75c4c7076928 Author: Naveen N. Rao Date: Wed Mar 8 13:56:07 2017 +0530 powerpc/kretprobes: Override default function entry offset With ABIv2, we offset 8 bytes into a function to get at the local entry point. mpe: NB this function is currently not called, the change to generic code to call it is being merged via the tip tree. Acked-by: Ananth N Mavinakayanahalli Acked-by: Michael Ellerman Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 290e3070762ac80e5fc4087d8c4de7e3f1d90aca Author: Naveen N. Rao Date: Wed Apr 19 18:21:01 2017 +0530 powerpc/kprobes: Fix handling of function offsets on ABIv2 commit 239aeba76409 ("perf powerpc: Fix kprobe and kretprobe handling with kallsyms on ppc64le") changed how we use the offset field in struct kprobe on ABIv2. perf now offsets from the global entry point if an offset is specified and otherwise chooses the local entry point. Fix the same in kernel for kprobe API users. We do this by extending kprobe_lookup_name() to accept an additional parameter to indicate the offset specified with the kprobe registration. If offset is 0, we return the local function entry and return the global entry point otherwise. With: # cd /sys/kernel/debug/tracing/ # echo "p _do_fork" >> kprobe_events # echo "p _do_fork+0x10" >> kprobe_events before this patch: # cat ../kprobes/list c0000000000d0748 k _do_fork+0x8 [DISABLED] c0000000000d0758 k _do_fork+0x18 [DISABLED] c0000000000412b0 k kretprobe_trampoline+0x0 [OPTIMIZED] and after: # cat ../kprobes/list c0000000000d04c8 k _do_fork+0x8 [DISABLED] c0000000000d04d0 k _do_fork+0x10 [DISABLED] c0000000000412b0 k kretprobe_trampoline+0x0 [OPTIMIZED] Acked-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 4 ++-- arch/powerpc/kernel/optprobes.c | 4 ++-- include/linux/kprobes.h | 2 +- kernel/kprobes.c | 7 ++++--- 4 files changed, 9 insertions(+), 8 deletions(-) commit 49e0b4658fe6aab5bf6bfe0738a86c1895930ad1 Author: Naveen N. Rao Date: Wed Apr 19 18:21:00 2017 +0530 kprobes: Convert kprobe_lookup_name() to a function The macro is now pretty long and ugly on powerpc. In the light of further changes needed here, convert it to a __weak variant to be over-ridden with a nicer looking function. Suggested-by: Masami Hiramatsu Acked-by: Masami Hiramatsu Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kprobes.h | 53 ---------------------------------- arch/powerpc/kernel/kprobes.c | 58 ++++++++++++++++++++++++++++++++++++++ arch/powerpc/kernel/optprobes.c | 4 +-- include/linux/kprobes.h | 1 + kernel/kprobes.c | 20 ++++++------- 5 files changed, 69 insertions(+), 67 deletions(-) commit a460246c70d1ac25a0717112e7a167240c7aca1a Author: Masami Hiramatsu Date: Wed Apr 19 18:22:25 2017 +0530 kprobes: Skip preparing optprobe if the probe is ftrace-based Skip preparing optprobe if the probe is ftrace-based, since anyway, it must not be optimized (or already optimized by ftrace). Tested-by: Naveen N. Rao Signed-off-by: Masami Hiramatsu Signed-off-by: Michael Ellerman kernel/kprobes.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit e3a973c69b3e3d877db982ff11f930cf845fe728 Author: Takashi Sakamoto Date: Fri Apr 14 23:06:54 2017 +0900 ALSA: fireface: obsolete usage of ktime_set() for zero assignment In development period for Linux v4.10, ktime_t became an alias of s64, instead of union. I forgot it. We can just assign zero, instead of usage of ktime_set(0, 0). Fixes: 19174295788 ("ALSA: fireface: add transaction support") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/ff-transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b94bf594cf8ed67cdd0439e70fa939783471597a Author: Myungho Jung Date: Wed Apr 19 15:24:50 2017 -0700 timer/sysclt: Restrict timer migration sysctl values to 0 and 1 timer_migration sysctl acts as a boolean switch, so the allowed values should be restricted to 0 and 1. Add the necessary extra fields to the sysctl table entry to enforce that. [ tglx: Rewrote changelog ] Signed-off-by: Myungho Jung Link: http://lkml.kernel.org/r/1492640690-3550-1-git-send-email-mhjungk@gmail.com Signed-off-by: Thomas Gleixner kernel/sysctl.c | 2 ++ kernel/time/timer.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit eb64522100a1d4adc89bce11b935a30c4401e234 Author: Arnd Bergmann Date: Wed Apr 19 19:37:09 2017 +0200 arm64/arch_timer: Mark errata handlers as __maybe_unused In some rare randconfig builds, we end up with two functions being entirely unused: drivers/clocksource/arm_arch_timer.c:342:12: error: 'erratum_set_next_event_tval_phys' defined but not used [-Werror=unused-function] static int erratum_set_next_event_tval_phys(unsigned long evt, drivers/clocksource/arm_arch_timer.c:335:12: error: 'erratum_set_next_event_tval_virt' defined but not used [-Werror=unused-function] static int erratum_set_next_event_tval_virt(unsigned long evt, We could add an #ifdef around them, but we would already have to check for several symbols there and there is a chance this would get more complicated over time, so marking them as __maybe_unused is the simplest way to avoid the harmless warnings. Fixes: 01d3e3ff2608 ("arm64: arch_timer: Rework the set_next_event workarounds") Signed-off-by: Arnd Bergmann Acked-by: Marc Zyngier Acked-by: Daniel Lezcano Cc: Mark Rutland Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: Christoffer Dall Link: http://lkml.kernel.org/r/20170419173737.3846098-1-arnd@arndb.de Signed-off-by: Thomas Gleixner drivers/clocksource/arm_arch_timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 58bb100a9de10329ca0d63484e76f27c257e9a2e Author: Matt Redfearn Date: Wed Apr 19 13:26:46 2017 +0100 Clocksource/mips-gic: Remove redundant non devicetree init Malta was the only platform probing this driver from platform code without using device tree. With that code removed, gic_clocksource_init is redundant so remove it. Signed-off-by: Matt Redfearn Cc: linux-mips@linux-mips.org Cc: Jason Cooper Cc: Paul Burton Cc: Daniel Lezcano Cc: Ralf Baechle Link: http://lkml.kernel.org/r/1492604806-23420-2-git-send-email-matt.redfearn@imgtec.com Signed-off-by: Thomas Gleixner drivers/clocksource/mips-gic-timer.c | 13 ------------- include/linux/irqchip/mips-gic.h | 1 - 2 files changed, 14 deletions(-) commit 4287adec7212d48fb878a45400fd7e11a198462c Author: Matt Redfearn Date: Wed Apr 19 13:26:45 2017 +0100 MIPS/Malta: Probe gic-timer via devicetree The Malta platform is the only platform remaining to probe the GIC clocksource via gic_clocksource_init. This route hardcodes an expected virq number based on MIPS_GIC_IRQ_BASE, which can be fragile to the eventual virq layout. Instread, probe the driver using the preferred and more modern devicetree method. Before the driver is probed, set the "clock-frequency" property of the devicetree node to the value detected by Malta platform code. Signed-off-by: Matt Redfearn Cc: linux-mips@linux-mips.org Cc: James Hogan Cc: Daniel Lezcano Cc: Ralf Baechle Link: http://lkml.kernel.org/r/1492604806-23420-1-git-send-email-matt.redfearn@imgtec.com Signed-off-by: Thomas Gleixner arch/mips/mti-malta/malta-time.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit 0773cea37470f8e080c510fe720fc356cf35df3a Author: Matthias Kaehlcke Date: Tue Apr 18 16:30:37 2017 -0700 clocksource: Use GENMASK_ULL in definition of CLOCKSOURCE_MASK Besides reusing existing code this removes the special case handling for 64-bit masks, which causes clang to raise a shift count overflow warning due to https://bugs.llvm.org//show_bug.cgi?id=10030. Suggested-by: Dmitry Torokhov Signed-off-by: Matthias Kaehlcke Cc: Grant Grundler Cc: Greg Hackmann Cc: Michael Davidson Cc: John Stultz Link: http://lkml.kernel.org/r/20170418233037.70990-1-mka@chromium.org Signed-off-by: Thomas Gleixner include/linux/clocksource.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa824e1340e79d26976c9f942add29edf612a67b Author: Claudio Imbrenda Date: Thu Apr 20 10:03:46 2017 +0200 s390/kvm: Add use_cmma field to mm_context_t Add use_cmma field to mm_context_t, like we do for storage keys. Signed-off-by: Claudio Imbrenda Acked-by: Janosch Frank Reviewed-by: Christian Borntraeger Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky arch/s390/include/asm/mmu.h | 2 ++ arch/s390/include/asm/mmu_context.h | 1 + 2 files changed, 3 insertions(+) commit 2d42f9477320befd33846c4083cab898998cdee5 Author: Claudio Imbrenda Date: Thu Apr 20 10:03:45 2017 +0200 s390/kvm: Add PGSTE manipulation functions Add PGSTE manipulation functions: * set_pgste_bits sets specific bits in a PGSTE * get_pgste returns the whole PGSTE * pgste_perform_essa manipulates a PGSTE to set specific storage states * ESSA_[SG]ET_* macros used to indicate the action for manipulate_pgste Signed-off-by: Claudio Imbrenda Reviewed-by: Janosch Frank Reviewed-by: Christian Borntraeger Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky arch/s390/include/asm/page-states.h | 19 +++++ arch/s390/include/asm/pgtable.h | 16 +++- arch/s390/mm/page-states.c | 3 +- arch/s390/mm/pgtable.c | 153 ++++++++++++++++++++++++++++++++++++ 4 files changed, 185 insertions(+), 6 deletions(-) commit 6192c41fc608b0a58d5540b015aa1672c266f3c5 Author: David Howells Date: Tue Apr 4 16:54:30 2017 +0100 Annotate hardware config module parameters in sound/pci/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in sound/pci/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: Jaroslav Kysela cc: Takashi Iwai cc: alsa-devel@alsa-project.org sound/pci/als4000.c | 2 +- sound/pci/cmipci.c | 6 +++--- sound/pci/ens1370.c | 2 +- sound/pci/riptide/riptide.c | 6 +++--- sound/pci/sonicvibes.c | 2 +- sound/pci/via82xx.c | 2 +- sound/pci/ymfpci/ymfpci.c | 6 +++--- 7 files changed, 13 insertions(+), 13 deletions(-) commit 232b0b0829fa4f22172750a6e2a36867583da285 Author: David Howells Date: Tue Apr 4 16:54:30 2017 +0100 Annotate hardware config module parameters in sound/oss/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in sound/oss/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: Jaroslav Kysela cc: Takashi Iwai cc: Andrew Veliath cc: alsa-devel@alsa-project.org sound/oss/ad1848.c | 8 ++++---- sound/oss/aedsp16.c | 12 ++++++------ sound/oss/mpu401.c | 4 ++-- sound/oss/msnd_pinnacle.c | 20 ++++++++++---------- sound/oss/opl3.c | 2 +- sound/oss/pas2_card.c | 18 +++++++++--------- sound/oss/pss.c | 14 +++++++------- sound/oss/sb_card.c | 10 +++++----- sound/oss/trix.c | 18 +++++++++--------- sound/oss/uart401.c | 4 ++-- sound/oss/uart6850.c | 4 ++-- sound/oss/waveartist.c | 8 ++++---- 12 files changed, 61 insertions(+), 61 deletions(-) commit e992ef5705c1e154acb248869b39e0be4c003a8b Author: David Howells Date: Tue Apr 4 16:54:30 2017 +0100 Annotate hardware config module parameters in sound/isa/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in sound/isa/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: Jaroslav Kysela cc: Takashi Iwai cc: alsa-devel@alsa-project.org sound/isa/ad1848/ad1848.c | 6 +++--- sound/isa/adlib.c | 2 +- sound/isa/cmi8328.c | 12 ++++++------ sound/isa/cmi8330.c | 20 ++++++++++---------- sound/isa/cs423x/cs4231.c | 12 ++++++------ sound/isa/cs423x/cs4236.c | 18 +++++++++--------- sound/isa/es1688/es1688.c | 12 ++++++------ sound/isa/es18xx.c | 12 ++++++------ sound/isa/galaxy/galaxy.c | 16 ++++++++-------- sound/isa/gus/gusclassic.c | 8 ++++---- sound/isa/gus/gusextreme.c | 16 ++++++++-------- sound/isa/gus/gusmax.c | 8 ++++---- sound/isa/gus/interwave.c | 10 +++++----- sound/isa/msnd/msnd_pinnacle.c | 20 ++++++++++---------- sound/isa/opl3sa2.c | 16 ++++++++-------- sound/isa/opti9xx/miro.c | 14 +++++++------- sound/isa/opti9xx/opti92x-ad1848.c | 14 +++++++------- sound/isa/sb/jazz16.c | 12 ++++++------ sound/isa/sb/sb16.c | 14 +++++++------- sound/isa/sb/sb8.c | 6 +++--- sound/isa/sc6000.c | 12 ++++++------ sound/isa/sscape.c | 12 ++++++------ sound/isa/wavefront/wavefront.c | 18 +++++++++--------- 23 files changed, 145 insertions(+), 145 deletions(-) commit b11ce420c5dfc966061bc20f576c85504bb69712 Author: David Howells Date: Tue Apr 4 16:54:30 2017 +0100 Annotate hardware config module parameters in sound/drivers/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in sound/drivers/. Suggested-by: Alan Cox Signed-off-by: David Howells Acked-by: Takashi Iwai cc: Jaroslav Kysela cc: alsa-devel@alsa-project.org sound/drivers/mpu401/mpu401.c | 4 ++-- sound/drivers/mtpav.c | 4 ++-- sound/drivers/serial-u16550.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit b90fe0c4e0ceb52c78c17f3cfa1ff8e79275028d Author: David Howells Date: Tue Apr 4 16:54:29 2017 +0100 Annotate hardware config module parameters in fs/pstore/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in fs/pstore/. Suggested-by: Alan Cox Signed-off-by: David Howells Acked-by: Kees Cook cc: Anton Vorontsov cc: Colin Cross cc: Tony Luck fs/pstore/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d1c93ce21832825acc48595a6fec8cfdb3e1453 Author: David Howells Date: Tue Apr 4 16:54:29 2017 +0100 Annotate hardware config module parameters in drivers/watchdog/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/watchdog/. Suggested-by: Alan Cox Signed-off-by: David Howells Reviewed-by: Guenter Roeck cc: Wim Van Sebroeck cc: Zwane Mwaikambo cc: linux-watchdog@vger.kernel.org drivers/watchdog/cpu5wdt.c | 2 +- drivers/watchdog/eurotechwdt.c | 4 ++-- drivers/watchdog/pc87413_wdt.c | 2 +- drivers/watchdog/sc1200wdt.c | 2 +- drivers/watchdog/wdt.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) commit c729203defa7e6672ff6a5e503066351ac3928cb Author: David Howells Date: Tue Apr 4 16:54:29 2017 +0100 Annotate hardware config module parameters in drivers/video/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/video/. Suggested-by: Alan Cox Signed-off-by: David Howells Acked-by: Bartlomiej Zolnierkiewicz cc: Tomi Valkeinen cc: linux-fbdev@vger.kernel.org drivers/video/fbdev/arcfb.c | 8 ++++---- drivers/video/fbdev/n411.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) commit 3b60daf86b133f0b15e3eb9b767c6c1752af2bd6 Author: David Howells Date: Tue Apr 4 16:54:29 2017 +0100 Annotate hardware config module parameters in drivers/tty/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/tty/. Suggested-by: Alan Cox Signed-off-by: David Howells Acked-by: Greg Kroah-Hartman cc: Jiri Slaby cc: linux-serial@vger.kernel.org drivers/tty/cyclades.c | 4 ++-- drivers/tty/moxa.c | 2 +- drivers/tty/mxser.c | 2 +- drivers/tty/rocket.c | 10 +++++----- drivers/tty/serial/8250/8250_core.c | 4 ++-- drivers/tty/synclink.c | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) commit ea38fd72fb5f065e3f655d388193db3476820482 Author: David Howells Date: Tue Apr 4 16:54:28 2017 +0100 Annotate hardware config module parameters in drivers/staging/vme/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/staging/vme/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: Martyn Welch cc: Manohar Vanga cc: Greg Kroah-Hartman cc: devel@driverdev.osuosl.org drivers/staging/vme/devices/vme_pio2_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dbf05cb05f61145069d01ca9c6a896159184af88 Author: David Howells Date: Tue Apr 4 16:54:28 2017 +0100 Annotate hardware config module parameters in drivers/staging/speakup/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/staging/speakup/. Suggested-by: Alan Cox Signed-off-by: David Howells Acked-by: Greg Kroah-Hartman cc: speakup@linux-speakup.org cc: devel@driverdev.osuosl.org drivers/staging/speakup/speakup_acntpc.c | 2 +- drivers/staging/speakup/speakup_dtlk.c | 2 +- drivers/staging/speakup/speakup_keypc.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 32820d8abd4d9502208697f0d26a3f8761b5868f Author: David Howells Date: Tue Apr 4 16:54:28 2017 +0100 Annotate hardware config module parameters in drivers/staging/media/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/staging/media/. Suggested-by: Alan Cox Signed-off-by: David Howells Acked-by: Greg Kroah-Hartman Acked-by: Mauro Carvalho Chehab cc: linux-media@vger.kernel.org cc: devel@driverdev.osuosl.org drivers/staging/media/lirc/lirc_sir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88f06b76e462119cb694c3ff13d7d343c49d2569 Author: David Howells Date: Tue Apr 4 16:54:27 2017 +0100 Annotate hardware config module parameters in drivers/scsi/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/scsi/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: "Juergen E. Fischer" cc: "James E.J. Bottomley" cc: "Martin K. Petersen" cc: Dario Ballabio cc: Finn Thain cc: Michael Schmitz cc: Achim Leubner cc: linux-scsi@vger.kernel.org drivers/scsi/aha152x.c | 4 ++-- drivers/scsi/aha1542.c | 2 +- drivers/scsi/g_NCR5380.c | 8 ++++---- drivers/scsi/gdth.c | 2 +- drivers/scsi/qlogicfas.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) commit 9149ba1fc2276181c7f80969d349ea25a7f9fe1f Author: David Howells Date: Tue Apr 4 16:54:27 2017 +0100 Annotate hardware config module parameters in drivers/pcmcia/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/pcmcia/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: linux-pcmcia@lists.infradead.org drivers/pcmcia/i82365.c | 8 ++++---- drivers/pcmcia/tcic.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit 01b961b70dde53b3a5b5062670a19d566e67e78e Author: David Howells Date: Tue Apr 4 16:54:27 2017 +0100 Annotate hardware config module parameters in drivers/pci/hotplug/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/pci/hotplug/. Suggested-by: Alan Cox Signed-off-by: David Howells Acked-by: Bjorn Helgaas cc: Scott Murray cc: linux-pci@vger.kernel.org drivers/pci/hotplug/cpcihp_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8fc074dd388112890684b614be1e58335890b27 Author: David Howells Date: Tue Apr 4 16:54:27 2017 +0100 Annotate hardware config module parameters in drivers/parport/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/parport/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: Sudip Mukherjee drivers/parport/parport_pc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 767c13e610d5775be00423c1ce046c1eb9616a21 Author: David Howells Date: Tue Apr 4 16:54:27 2017 +0100 Annotate hardware config module parameters in drivers/net/wireless/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/net/wireless/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: Kalle Valo cc: linux-wireless@vger.kernel.org cc: netdev@vger.kernel.org drivers/net/wireless/cisco/airo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit af28a03c1b1eae4d7c97f4bd0c6326522c8a3bc9 Author: David Howells Date: Tue Apr 4 16:54:27 2017 +0100 Annotate hardware config module parameters in drivers/net/wan/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/net/wan/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: "Jan \"Yenya\" Kasprzak" cc: netdev@vger.kernel.org drivers/net/wan/cosa.c | 6 +++--- drivers/net/wan/hostess_sv11.c | 6 +++--- drivers/net/wan/sbni.c | 4 ++-- drivers/net/wan/sealevel.c | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) commit 4f06e652721da79e032d3ba38bc1589bd553a5fc Author: David Howells Date: Tue Apr 4 16:54:26 2017 +0100 Annotate hardware config module parameters in drivers/net/irda/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/net/irda/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: Samuel Ortiz cc: netdev@vger.kernel.org drivers/net/irda/ali-ircc.c | 6 +++--- drivers/net/irda/nsc-ircc.c | 6 +++--- drivers/net/irda/smsc-ircc2.c | 10 +++++----- drivers/net/irda/w83977af_ir.c | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) commit b658e5d854d4e9015d83133a826ec734770deefb Author: David Howells Date: Tue Apr 4 16:54:26 2017 +0100 Annotate hardware config module parameters in drivers/net/hamradio/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/net/hamradio/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: Thomas Sailer cc: Joerg Reuter cc: linux-hams@vger.kernel.org cc: netdev@vger.kernel.org drivers/net/hamradio/baycom_epp.c | 2 +- drivers/net/hamradio/baycom_par.c | 2 +- drivers/net/hamradio/baycom_ser_fdx.c | 4 ++-- drivers/net/hamradio/baycom_ser_hdx.c | 4 ++-- drivers/net/hamradio/dmascc.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) commit df29840815a6aaa6a1ab8d85d7745a1a6fc25de0 Author: David Howells Date: Tue Apr 4 16:54:26 2017 +0100 Annotate hardware config module parameters in drivers/net/ethernet/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/net/ethernet/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: Steffen Klassert cc: Jaroslav Kysela cc: netdev@vger.kernel.org cc: linux-parisc@vger.kernel.org drivers/net/ethernet/3com/3c509.c | 2 +- drivers/net/ethernet/3com/3c59x.c | 4 ++-- drivers/net/ethernet/8390/ne.c | 4 ++-- drivers/net/ethernet/8390/smc-ultra.c | 4 ++-- drivers/net/ethernet/8390/wd.c | 8 ++++---- drivers/net/ethernet/amd/lance.c | 6 +++--- drivers/net/ethernet/amd/ni65.c | 6 +++--- drivers/net/ethernet/cirrus/cs89x0.c | 6 +++--- drivers/net/ethernet/dec/tulip/de4x5.c | 2 +- drivers/net/ethernet/hp/hp100.c | 2 +- drivers/net/ethernet/realtek/atp.c | 4 ++-- drivers/net/ethernet/smsc/smc9194.c | 4 ++-- 12 files changed, 26 insertions(+), 26 deletions(-) commit e43f2c52a07793cb97e4a963a5b90d4af311c3d5 Author: David Howells Date: Tue Apr 4 16:54:25 2017 +0100 Annotate hardware config module parameters in drivers/net/can/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/net/can/. Suggested-by: Alan Cox Signed-off-by: David Howells Acked-by: Marc Kleine-Budde cc: Wolfgang Grandegger cc: linux-can@vger.kernel.org cc: netdev@vger.kernel.org drivers/net/can/cc770/cc770_isa.c | 8 ++++---- drivers/net/can/sja1000/sja1000_isa.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit 06a5128a29b3d67fadff5d9593d79b815d8b34d8 Author: David Howells Date: Tue Apr 4 16:54:25 2017 +0100 Annotate hardware config module parameters in drivers/net/arcnet/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/net/arcnet/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: Michael Grzeschik cc: netdev@vger.kernel.org drivers/net/arcnet/com20020-isa.c | 4 ++-- drivers/net/arcnet/com90io.c | 4 ++-- drivers/net/arcnet/com90xx.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 6621f85d79775f71de9623fdfc9135fc494d6863 Author: David Howells Date: Tue Apr 4 16:54:25 2017 +0100 Annotate hardware config module parameters in drivers/net/appletalk/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/net/appletalk/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: Arnaldo Carvalho de Melo cc: netdev@vger.kernel.org drivers/net/appletalk/cops.c | 6 +++--- drivers/net/appletalk/ltpc.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit dac562fc5ff4956d779029d2ae379e34c791f011 Author: David Howells Date: Tue Apr 4 16:54:25 2017 +0100 Annotate hardware config module parameters in drivers/mmc/host/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/mmc/host/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: Pierre Ossman cc: Ulf Hansson cc: linux-mmc@vger.kernel.org drivers/mmc/host/wbsd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4f1927dcbf79f6c7c153c8ec9beeb17364649f0c Author: David Howells Date: Tue Apr 4 16:54:24 2017 +0100 Annotate hardware config module parameters in drivers/misc/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/misc/. Suggested-by: Alan Cox Signed-off-by: David Howells Acked-by: Greg Kroah-Hartman cc: Arnd Bergmann drivers/misc/dummy-irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a8fc6a3cebb0dde27584603c5c4b5c72c6d810f Author: David Howells Date: Tue Apr 4 16:54:24 2017 +0100 Annotate hardware config module parameters in drivers/media/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/media/. Suggested-by: Alan Cox Signed-off-by: David Howells Acked-by: Mauro Carvalho Chehab cc: mjpeg-users@lists.sourceforge.net cc: linux-media@vger.kernel.org drivers/media/pci/zoran/zoran_card.c | 2 +- drivers/media/rc/serial_ir.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit b9351f7e51dbbf1d850281142a55d848301d482d Author: David Howells Date: Tue Apr 4 16:54:24 2017 +0100 Annotate hardware config module parameters in drivers/isdn/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/isdn/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: Karsten Keil cc: netdev@vger.kernel.org drivers/isdn/hardware/avm/b1isa.c | 4 ++-- drivers/isdn/hardware/avm/t1isa.c | 4 ++-- drivers/isdn/hisax/config.c | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) commit f6b12d04346cfcc926756ded982c91c25eff0333 Author: David Howells Date: Tue Apr 4 16:54:23 2017 +0100 Annotate hardware config module parameters in drivers/input/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/input/. Suggested-by: Alan Cox Signed-off-by: David Howells Acked-by: Dmitry Torokhov cc: linux-input@vger.kernel.org drivers/input/mouse/inport.c | 2 +- drivers/input/mouse/logibm.c | 2 +- drivers/input/touchscreen/mk712.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 8863b3e785b8054b981760e26e63a25897467c42 Author: David Howells Date: Tue Apr 4 16:54:23 2017 +0100 Annotate hardware config module parameters in drivers/iio/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/iio/. Suggested-by: Alan Cox Signed-off-by: David Howells Acked-by: William Breathitt Gray Acked-by: Jonathan Cameron cc: linux-iio@vger.kernel.org drivers/iio/adc/stx104.c | 2 +- drivers/iio/dac/cio-dac.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c78babcc7d25ffd44a579c796fb4e9a313c0b127 Author: David Howells Date: Tue Apr 4 16:54:23 2017 +0100 Annotate hardware config module parameters in drivers/i2c/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/i2c/. Suggested-by: Alan Cox Signed-off-by: David Howells Acked-by: Wolfram Sang Acked-by: Jean Delvare cc: linux-i2c@vger.kernel.org drivers/i2c/busses/i2c-ali15x3.c | 2 +- drivers/i2c/busses/i2c-elektor.c | 6 +++--- drivers/i2c/busses/i2c-parport-light.c | 4 ++-- drivers/i2c/busses/i2c-pca-isa.c | 4 ++-- drivers/i2c/busses/i2c-piix4.c | 2 +- drivers/i2c/busses/i2c-sis5595.c | 2 +- drivers/i2c/busses/i2c-viapro.c | 2 +- drivers/i2c/busses/scx200_acb.c | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) commit d759f906794b3b2894780870227c3c05895d83c1 Author: David Howells Date: Tue Apr 4 16:54:22 2017 +0100 Annotate hardware config module parameters in drivers/gpio/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/gpio/. Suggested-by: Alan Cox Signed-off-by: David Howells Acked-by: William Breathitt Gray Acked-by: Linus Walleij cc: Alexandre Courbot cc: linux-gpio@vger.kernel.org drivers/gpio/gpio-104-dio-48e.c | 4 ++-- drivers/gpio/gpio-104-idi-48.c | 4 ++-- drivers/gpio/gpio-104-idio-16.c | 4 ++-- drivers/gpio/gpio-gpio-mm.c | 2 +- drivers/gpio/gpio-ws16c48.c | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) commit 40059ec6701bd10d7d972ed302cca61cf8b6f2cf Author: David Howells Date: Tue Apr 4 16:54:22 2017 +0100 Annotate hardware config module parameters in drivers/cpufreq/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/cpufreq/. Suggested-by: Alan Cox Signed-off-by: David Howells Acked-by: "Rafael J. Wysocki" Acked-by: Viresh Kumar cc: linux-pm@vger.kernel.org drivers/cpufreq/speedstep-smi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc9c617557cd0442294138188ac8611659768a10 Author: David Howells Date: Tue Apr 4 16:54:22 2017 +0100 Annotate hardware config module parameters in drivers/clocksource/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/clocksource/. [Note: With regard to cs5535-clockevt.c, Thomas Gleixner asked whether the timer_irq parameter is required for the driver to work on anything other than arbitrary hardware which has it mapped to 0. Jens Rottmann replied that the parameter defaults to 0, which means: 1. autodetect (=keep IRQ BIOS has set up) 2. if that fails use CONFIG_CS5535_MFGPT_DEFAULT_IRQ (see drivers/misc/cs5535-mfgpt.c: cs5535_mfgpt_set_irq()) Jens further noted that there may not be any systems that have CS5535/36 devices that support EFI and secure boot.] Suggested-by: Alan Cox Signed-off-by: David Howells cc: Daniel Lezcano cc: Thomas Gleixner cc: Jens Rottmann cc: linux-kernel@vger.kernel.org drivers/clocksource/cs5535-clockevt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c37ab5e51792a5419bdc84804aec6379cb43adb Author: David Howells Date: Tue Apr 4 16:54:22 2017 +0100 Annotate hardware config module parameters in drivers/char/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/char/. Suggested-by: Alan Cox Signed-off-by: David Howells Acked-by: Greg Kroah-Hartman cc: Arnd Bergmann drivers/char/applicom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 94b599bc07c3c4f365f546218918dcbc363111b2 Author: David Howells Date: Tue Apr 4 16:54:21 2017 +0100 Annotate hardware config module parameters in drivers/char/mwave/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/char/mwave/. Suggested-by: Alan Cox Signed-off-by: David Howells drivers/char/mwave/mwavedd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 684497bfe8b4485325554b96b160b5ddb6e9ebaf Author: David Howells Date: Tue Apr 4 16:54:21 2017 +0100 Annotate hardware config module parameters in drivers/char/ipmi/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/char/ipmi/. Suggested-by: Alan Cox Signed-off-by: David Howells Reviewed-by: Corey Minyard cc: openipmi-developer@lists.sourceforge.net drivers/char/ipmi/ipmi_si_intf.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a0597834dc0e1af68f48f92b31617b360a14dfc8 Author: Tomislav Požega Date: Tue Apr 18 11:52:07 2017 +0200 rt2800: fix mt7620 E2 channel registers update RF register 47 and 54 values according to vendor driver Signed-off-by: Tomislav Požega Signed-off-by: Daniel Golle Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4bd96b5d3379b00164f454084bbe0ea7d9f752a7 Author: Tomislav Požega Date: Tue Apr 18 11:32:35 2017 +0200 rt2800: fix mt7620 vco calibration registers Use register values from init LNA function instead of the ones from restore LNA function. Apply register values based on rx path configuration. Signed-off-by: Tomislav Požega Signed-off-by: Daniel Golle Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2031badabf269067f9bc581fea946a27229e4030 Author: Daniel Golle Date: Mon Apr 17 21:32:12 2017 +0200 rt2800: do VCO calibration after programming ALC Somehow AP doesn't come up and the first scan fails if we don't do VCO calibration every time. The vendor driver duplicates the VCO calibration function into the channel switching logic, we can do the same with less duplication. Signed-off-by: Daniel Golle Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 ++ 1 file changed, 2 insertions(+) commit 225a644aae03ffe2ec186cd994cd5ab241130035 Author: Daniel Golle Date: Mon Apr 17 21:30:12 2017 +0200 rt2800: fix LNA gain assignment for MT7620 The base value used for MT7620 differs from Rt5392 which resulted in quite bad RX signal quality. Fix this by using the correct base value as well as the LNA calibration values for HT20. Reported-by: Tom Psyborg Signed-off-by: Daniel Golle Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 5b560525add78e15fd5b75e5d03ea1ff988e6747 Author: Marc Zyngier Date: Thu Apr 20 11:16:20 2017 +0100 ARM: hyp-stub: Fix Thumb-2 compilation The assembler defaults to emiting the short form of ADR, leading to an out-of-range immediate. Using the wide version solves this issue. Fixes: bc845e4fbbbb ("ARM: KVM: Implement HVC_RESET_VECTORS stub hypercall in the init code") Reported-by: Arnd Bergmann Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kernel/hyp-stub.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa8323bf49f5c92363fe7c3c80b6b342f5430baa Author: Arnd Bergmann Date: Wed Apr 19 19:51:29 2017 +0200 ALSA: firewire-motu: mark trace helpers as __maybe_unused Two functions were introduced for the purpose of tracing but cause warnings when tracing is disabled: sound/firewire/motu/amdtp-motu.c:284:13: error: 'copy_message' defined but not used [-Werror=unused-function] static void copy_message(u64 *frames, __be32 *buffer, unsigned int data_blocks, sound/firewire/motu/amdtp-motu.c:271:13: error: 'copy_sph' defined but not used [-Werror=unused-function] static void copy_sph(u32 *frames, __be32 *buffer, unsigned int data_blocks, Marking them as __maybe_unused will do the right thing here. Fixes: 17909c1b3058 ("ALSA: firewire-motu: add tracepoints for SPH in IEC 61883-1 fashion") Fixes: c6b0b9e65f09 ("ALSA: firewire-motu: add tracepoints for messages for unique protocol") Signed-off-by: Arnd Bergmann Signed-off-by: Takashi Iwai sound/firewire/motu/amdtp-motu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 2e5a7f71095be27064c140faf6cecdab585ff198 Author: Hans de Goede Date: Wed Apr 19 15:07:00 2017 +0200 ACPI / PMIC: Stop xpower OPRegion handler relying on IIO The intel_pmic_xpower code provides an OPRegion handler, which must be available before other drivers using it are loaded, which can only be ensured if both the mfd and opregion drivers are built in, which is why the Kconfig option for intel_pmic_xpower is a bool. The use of IIO is causing trouble for generic distro configs here as distros will typically want to build IIO drivers as modules and there really is no reason to use IIO here. The reading of the ADC value is a single regmap_bulk_read, which is already protected against races by the regmap-lock. This commit removes the use of IIO, allowing distros to enable the driver without needing to built IIO in and also actually simplifies the code. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/Kconfig | 2 +- drivers/acpi/pmic/intel_pmic_xpower.c | 21 ++++----------------- 2 files changed, 5 insertions(+), 18 deletions(-) commit ac2c4936e9ec76f1d5c4cd2afdc8258769635b7a Author: Hans de Goede Date: Wed Apr 19 15:06:59 2017 +0200 ACPI / PMIC: Add opregion driver for Intel CHT Whiskey Cove PMIC Add opregion driver for Intel CHT Whiskey Cove PMIC, based on various non upstreamed CHT Whiskey Cove PMIC patches. This does not include support for the Thermal opregion (DPTF) due to lacking documentation. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/Kconfig | 6 + drivers/acpi/Makefile | 1 + drivers/acpi/pmic/intel_pmic_chtwc.c | 280 +++++++++++++++++++++++++++++++++++ 3 files changed, 287 insertions(+) commit 6f05d0761af612e04572ba4d65b4c0274a88444f Author: Abel Vesa Date: Mon Apr 3 23:58:54 2017 +0100 ARM: 8668/1: ftrace: Fix dynamic ftrace with DEBUG_RODATA and !FRAME_POINTER The support for dynamic ftrace with CONFIG_DEBUG_RODATA involves overriding the weak arch_ftrace_update_code() with a variant which makes the kernel text writable around the patching. This override was however added under the CONFIG_OLD_MCOUNT ifdef, and CONFIG_OLD_MCOUNT is only enabled if frame pointers are enabled. This leads to non-functional dynamic ftrace (ftrace triggers a WARN_ON()) when CONFIG_DEBUG_RODATA is enabled and CONFIG_FRAME_POINTER is not. Move the override out of that ifdef and into the CONFIG_DYNAMIC_FTRACE ifdef where it belongs. Fixes: 80d6b0c2eed2a ("ARM: mm: allow text and rodata sections to be read-only") Suggested-by: Nicolai Stange Suggested-by: Rabin Vincent Signed-off-by: Abel Vesa Acked-by: Rabin Vincent Signed-off-by: Russell King arch/arm/kernel/ftrace.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit b089c31c519c3906c14801b6ec483e18a5152a50 Author: Jon Medhurst Date: Mon Apr 10 11:13:59 2017 +0100 ARM: 8667/3: Fix memory attribute inconsistencies when using fixmap To cope with the variety in ARM architectures and configurations, the pagetable attributes for kernel memory are generated at runtime to match the system the kernel finds itself on. This calculated value is stored in pgprot_kernel. However, when early fixmap support was added for ARM (commit a5f4c561b3b1) the attributes used for mappings were hard coded because pgprot_kernel is not set up early enough. Unfortunately, when fixmap is used after early boot this means the memory being mapped can have different attributes to existing mappings, potentially leading to unpredictable behaviour. A specific problem also exists due to the hard coded values not include the 'shareable' attribute which means on systems where this matters (e.g. those with multiple CPU clusters) the cache contents for a memory location can become inconsistent between CPUs. To resolve these issues we change fixmap to use the same memory attributes (from pgprot_kernel) that the rest of the kernel uses. To enable this we need to refactor the initialisation code so build_mem_type_table() is called early enough. Note, that relies on early param parsing for memory type overrides passed via the kernel command line, so we need to make sure this call is still after parse_early_params(). [ardb: keep early_fixmap_init() before param parsing, for earlycon] Fixes: a5f4c561b3b1 ("ARM: 8415/1: early fixmap support for earlycon") Cc: # v4.3+ Tested-by: afzal mohammed Signed-off-by: Jon Medhurst Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King arch/arm/include/asm/fixmap.h | 2 +- arch/arm/kernel/setup.c | 4 ++-- arch/arm/mm/mmu.c | 16 +++++++++++++--- 3 files changed, 16 insertions(+), 6 deletions(-) commit 296f827d8a3ec5f57252717844146499e2c81155 Author: Rahul Bedarkar Date: Tue Apr 18 14:04:36 2017 +0530 MAINTAINERS: Update email-id of Rahul Bedarkar I'm no longer with Imagination Technologies. I am still interested in maintaining or reviewing DTS patches for Ci40 if any. Update email-id to an active one. Signed-off-by: Rahul Bedarkar Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15990/ Signed-off-by: Ralf Baechle MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9b67f0014cba18f1aabb6fa9272335a043eb6fd Author: Logan Gunthorpe Date: Wed Apr 19 13:36:10 2017 -0600 dma-buf: Rename dma-ops to prevent conflict with kunmap_atomic macro Seeing the kunmap_atomic dma_buf_ops share the same name with a macro in highmem.h, the former can be aliased if any dma-buf user includes that header. I'm personally trying to include highmem.h inside scatterlist.h and this breaks the dma-buf code proper. Christoph Hellwig suggested [1] renaming it and pushing this patch ASAP. To maintain consistency I've renamed all four of kmap* and kunmap* to be map* and unmap*. (Even though only kmap_atomic presently conflicts.) [1] https://www.spinics.net/lists/target-devel/msg15070.html Signed-off-by: Logan Gunthorpe Reviewed-by: Sinclair Yeh Acked-by: Daniel Vetter Acked-by: Sumit Semwal Signed-off-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/1492630570-879-1-git-send-email-logang@deltatee.com drivers/dma-buf/dma-buf.c | 16 ++++++++-------- drivers/gpu/drm/armada/armada_gem.c | 8 ++++---- drivers/gpu/drm/drm_prime.c | 8 ++++---- drivers/gpu/drm/i915/i915_gem_dmabuf.c | 8 ++++---- drivers/gpu/drm/i915/selftests/mock_dmabuf.c | 8 ++++---- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 8 ++++---- drivers/gpu/drm/tegra/gem.c | 8 ++++---- drivers/gpu/drm/udl/udl_dmabuf.c | 8 ++++---- drivers/gpu/drm/vmwgfx/vmwgfx_prime.c | 8 ++++---- drivers/media/v4l2-core/videobuf2-dma-contig.c | 4 ++-- drivers/media/v4l2-core/videobuf2-dma-sg.c | 4 ++-- drivers/media/v4l2-core/videobuf2-vmalloc.c | 4 ++-- drivers/staging/android/ion/ion.c | 8 ++++---- include/linux/dma-buf.h | 22 +++++++++++----------- 14 files changed, 61 insertions(+), 61 deletions(-) commit 0b16e0e98e95df6728328fb77b7cb86e5781a666 Merge: 500fc34 c0c345d Author: Kalle Valo Date: Thu Apr 20 11:16:06 2017 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.12. Major changes: ath9k * add support for Dell Wireless 1601 PCI device * add debugfs file to manually override noise floor ath10k * bump up FW API to 6 for a new QCA6174 firmware branch wil6210 * support 8 kB RX buffers commit 21173d0b4d2a0b9e9e5f3155cf2cfc5781a6f4b1 Author: Prarit Bhargava Date: Tue Apr 18 08:25:05 2017 -0400 sched/x86: Update reschedule warning text Modify the reschedule warning to output the offline CPU number and use a better debug message. Signed-off-by: Prarit Bhargava Cc: Andrew Morton Cc: Daniel Bristot de Oliveira Cc: Hidehiro Kawai Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1492518305-3808-1-git-send-email-prarit@redhat.com [ Tweaked the warning message. ] Signed-off-by: Ingo Molnar arch/x86/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07590a7d4030c159b9a0d7171f81049a9ce23245 Merge: afa7a17 1b5ad16 Author: Ingo Molnar Date: Thu Apr 20 10:07:18 2017 +0200 Merge tag 'perf-core-for-mingo-4.12-20170419' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core cleanups from Arnaldo Carvalho de Melo: - Introduce new header files out of the hodge-podge that util/util.h became, trying to disentangle the includes hell that all C projects end up growing. This should help in build times, as changes to seemingly unrelated files (util.h included tons of headers) won't trigger a rebuild of most object files. - Use equivalent facilities found in the kernel source code base originated tools/include/ header files, such as __stringify(), ARRAY_SIZE, that has extra checks (__must_be_array()), etc. - For that get some more files from the kernel sources, like include/linux/bug.h, some just with the bits needed at this time. - Use the headers where facilities declared in them are used, such as PRIxu(32,64) macros (inttypes.h), errno defines (errno.h), etc. - Remove various leftovers from the initial code base we copied from git.git: FLEX_ARRAY, etc. Signed-off-by: Arnaldo Carvalho de Melo commit afa7a17f3aafb64647ba4cd38e20f3d678c7949b Merge: e720c19 e9ea1e7 Author: Ingo Molnar Date: Thu Apr 20 10:07:12 2017 +0200 Merge branch 'WIP.x86/process' into perf/core commit fba4f472b33aa81ca1836f57d005455261e9126f Author: Tiantian Feng Date: Wed Apr 19 18:18:39 2017 +0200 x86/reboot: Turn off KVM when halting a CPU A CPU in VMX root mode will ignore INIT signals and will fail to bring up the APs after reboot. Therefore, on a panic we disable VMX on all CPUs before rebooting or triggering kdump. Do this when halting the machine as well, in case a firmware-level reboot does not perform a cold reset for all processors. Without doing this, rebooting the host may hang. Signed-off-by: Tiantian Feng Signed-off-by: Xishi Qiu [ Rewritten commit message. ] Signed-off-by: Paolo Bonzini Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kvm@vger.kernel.org Link: http://lkml.kernel.org/r/20170419161839.30550-1-pbonzini@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/smp.c | 3 +++ 1 file changed, 3 insertions(+) commit d594aa0277e541bb997aef0bc0a55172d8138340 Author: Ashish Kalra Date: Wed Apr 19 20:50:15 2017 +0530 x86/boot: Fix BSS corruption/overwrite bug in early x86 kernel startup The minimum size for a new stack (512 bytes) setup for arch/x86/boot components when the bootloader does not setup/provide a stack for the early boot components is not "enough". The setup code executing as part of early kernel startup code, uses the stack beyond 512 bytes and accidentally overwrites and corrupts part of the BSS section. This is exposed mostly in the early video setup code, where it was corrupting BSS variables like force_x, force_y, which in-turn affected kernel parameters such as screen_info (screen_info.orig_video_cols) and later caused an exception/panic in console_init(). Most recent boot loaders setup the stack for early boot components, so this stack overwriting into BSS section issue has not been exposed. Signed-off-by: Ashish Kalra Cc: Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170419152015.10011-1-ashishkalra@Ashishs-MacBook-Pro.local Signed-off-by: Ingo Molnar arch/x86/boot/boot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 500fc34f38e6686fe5e53065446a60f31a7534b6 Merge: f9558f5 718ceb2 Author: Kalle Valo Date: Thu Apr 20 11:01:23 2017 +0300 Merge tag 'iwlwifi-next-for-kalle-2017-04-19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Another series of patches intended for v4.12. These are the changes: * Heavy work for the A000 device series; * Some cleanup patches; * A few fixes; * Dynamic SAR support; * Geographical SAR support; * Support a few new PCI device IDs; commit f6ab4d59a5fe205f12287e515a43fc5e6de779b1 Author: Finn Thain Date: Sat Apr 8 19:51:15 2017 -0400 nubus: Add MVC and VSC video card definitions Also move the NUBUS_DRHW_APPLE_JET definition, for numerical order. Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven include/uapi/linux/nubus.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f42e5550967a3e1e39dc0b1c4e2e7d903e764d5d Author: Finn Thain Date: Sat Apr 8 19:51:15 2017 -0400 nubus: Clean up whitespace Signed-off-by: Finn Thain [geert: rebased] Signed-off-by: Geert Uytterhoeven drivers/nubus/nubus.c | 310 ++++++++++++++++++++++++-------------------------- 1 file changed, 148 insertions(+), 162 deletions(-) commit 71ae40e4cf3323b89ea910b82947d5e5e08c94bf Author: David Huggins-Daines Date: Sat Apr 8 19:51:15 2017 -0400 nubus: Clean up printk calls Some long forgotten changes from the linux-mac68k CVS: Fix swapped DrvrSW and DrvrHW values in printk message. Suppress debug printk messages. Avoid console_loglevel misuse. The original commits are these: http://linux-mac68k.cvs.sourceforge.net/viewvc/linux-mac68k/linux-mac68k/drivers/nubus/nubus.c?r1=1.22.2.1&r2=1.22.2.2&pathrev=linux-2_2 http://linux-mac68k.cvs.sourceforge.net/viewvc/linux-mac68k/linux-mac68k/drivers/nubus/nubus.c?r1=1.21&r2=1.22&pathrev=linux-2_2 The CVS commits fell short of removing all of the misuse of console_loglevel in nubus_add_board() so I finished the job. I've also added some missing message severity levels and converted a printk loop to the MAC address "%pM" format specifier. Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven drivers/nubus/nubus.c | 149 ++++++++++++++++++++++---------------------------- 1 file changed, 65 insertions(+), 84 deletions(-) commit e36b9913e00b39ff4afcacff947bc99d305aaac0 Author: David Huggins-Daines Date: Sat Apr 8 19:51:15 2017 -0400 nubus: Fix nubus_rewinddir A long forgotten fix from the linux-mac68k CVS: Initialize dir->done pointer in nubus_rewinddir(). The original commit is here: http://linux-mac68k.cvs.sourceforge.net/viewvc/linux-mac68k/linux-mac68k/drivers/nubus/nubus.c?r1=1.22&r2=1.22.2.1&pathrev=linux-2_2 Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven drivers/nubus/nubus.c | 2 ++ 1 file changed, 2 insertions(+) commit af2325024fe2dcbb9722d1b4c253a377076b1eed Author: Finn Thain Date: Sat Apr 8 19:51:15 2017 -0400 m68k/mac: Clarify IOP message alloc/free confusion The alloc/free metaphor used for IOP messages is misleading and can cause mistakes like the pointless msg2 temporary variable. Use a more meaningful name to help simplify the code. Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/mac/iop.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit a9373f40ac3a5aac4b9a199a15331708616e8947 Author: Finn Thain Date: Sat Apr 8 19:51:15 2017 -0400 m68k/mac: Adopt platform_device_register_simple() These changes save 1014 bytes according to scripts/bloat-o-meter. Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/mac/config.c | 49 ++++++++++++------------------------------------- 1 file changed, 12 insertions(+), 37 deletions(-) commit 889121b404d9e313fb9ebeb99b25ff4a24e6a7f7 Author: Geert Uytterhoeven Date: Sat Apr 8 19:51:15 2017 -0400 m68k/mac: Modernize printing of kernel messages Convert from printk() to pr_*(). Signed-off-by: Geert Uytterhoeven [FT: Adjusted log message severity levels and retained bootinfo log] Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/mac/config.c | 12 +++++------- arch/m68k/mac/misc.c | 23 +++++++++-------------- 2 files changed, 14 insertions(+), 21 deletions(-) commit 4629a173aa10a5044597a15c6d9690be78969f5b Author: Geert Uytterhoeven Date: Sat Apr 8 19:51:15 2017 -0400 m68k/mac: IOP - Modernize printing of kernel messages - Introduce helpers for printing debug messages, incl. dummies for validating format strings when debugging is disabled, - Convert from printk() to pr_*(), - Add missing continuations, - Drop superfluous casts. Signed-off-by: Geert Uytterhoeven [FT: Renamed pr_iop* macros, adjusted log message severity and eliminated DEBUG_IOP] Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/mac/iop.c | 74 +++++++++++++++++++++-------------------------------- 1 file changed, 29 insertions(+), 45 deletions(-) commit f9558f5fc86b614f905e4f86aed750b433056688 Author: Yan-Hsuan Chuang Date: Sat Apr 15 15:32:00 2017 -0500 rtlwifi: btcoex: 21a 2ant: wifi is linking action When wifi is under scanning/linking/roaming, do not run the reset of the coex mechanism because these activities are important for wifi, just run the linking process and return. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 67cbe62a27dcc100484fde60c9ac1d89eaac911f Author: Yan-Hsuan Chuang Date: Sat Apr 15 15:31:59 2017 -0500 rtlwifi: btcoex: 21a 2ant: just return when wifi is under ips If wifi is in power saving mode, do nothing. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu --- drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 6 ++++++ 1 file changed, 6 insertions(+) Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 63a7e8109b2cd0bd73dac3ee503430e3030eee10 Author: Yan-Hsuan Chuang Date: Sat Apr 15 15:31:58 2017 -0500 rtlwifi: btcoex: 21a 2ant: do not limit rx agg size For bt profiling, we do not need to limit the rx agg size. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 1 - 1 file changed, 1 deletion(-) commit 97632f8c0a934b5f01383db0cc8a1c2ac6cf4e2c Author: Yan-Hsuan Chuang Date: Sat Apr 15 15:31:57 2017 -0500 rtlwifi: btcoex: 21a 2ant: macro for bt rssi threshold Using macro to control the bt threshold. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c129bc843b629623580c248e9f7f91c1f503dc9d Author: Yan-Hsuan Chuang Date: Sat Apr 15 15:31:56 2017 -0500 rtlwifi: btcoex: 21a 2ant: dec bt power according to bt rssi and set tdma Check the bt rssi first and decrease it if the bt rssi is too high. Then set the tdma and coex table. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 140 +++++++-------------- 1 file changed, 48 insertions(+), 92 deletions(-) commit f76184d024571c9f39d66a38bedfab33e6322039 Author: Yan-Hsuan Chuang Date: Sat Apr 15 15:31:55 2017 -0500 rtlwifi: btcoex: 21a 2ant: notify fw the number of APs Use h2c to tell the firmware if the number of AP is more than 10 or not. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit a4162ea71b39667e0393480080819be095fc7a33 Author: Yan-Hsuan Chuang Date: Sat Apr 15 15:31:54 2017 -0500 rtlwifi: btcoex: 21a 2ant: monitor extra wifi rssi to examine network status Here we monitor one more wifi rssi to check the status of the network and set the coex table instead of the legacy way. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 51 +++++++++------------- 1 file changed, 21 insertions(+), 30 deletions(-) commit 0fcad45bdbf7b013dabc3a09026ad47f01ea5fd2 Author: Yan-Hsuan Chuang Date: Sat Apr 15 15:31:53 2017 -0500 rtlwifi: btcoex: 21a 2ant: add multiport action for p2p/miracast For p2p/miracast, the wifi may have multiple ports for different roles. Under this, we need extra settings for turning off the tdma and proper coex table parameters. We monnitor the number of links on a port to determine if it is for p2p/miracast or not. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 137cc90f094a53496a8b497e54e2d699291eaa7a Author: Yan-Hsuan Chuang Date: Sat Apr 15 15:31:52 2017 -0500 rtlwifi: btcoex: 21a 2ant: set tdma based on rssi state amd limit rx agg size Monitor the rssi state to set the tdma and limit rx aggregation size to fit the bt profiling. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 51 ++++++++++------------ 1 file changed, 23 insertions(+), 28 deletions(-) commit f0557cf062c7d7f220aa89fbdc037d208e4ad11b Author: Yan-Hsuan Chuang Date: Sat Apr 15 15:31:51 2017 -0500 rtlwifi: btcoex: 21a 2ant: fix some coding style issues Fix some ident and naming for linux coding style. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 70a8adef7108f3b8773c35b80fbd46d9d7df92b3 Author: Yan-Hsuan Chuang Date: Sat Apr 15 15:31:50 2017 -0500 rtlwifi: btcoex: 21a 2ant: more combinations of wifi/bt rssi state For bt a2dp, we need to check more rssi state combinations to have better voice quality. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 97 +++++++++++++++------- 1 file changed, 65 insertions(+), 32 deletions(-) commit 10c2e1cc15e4e2202413eae601dd229682cb9bea Author: Yan-Hsuan Chuang Date: Sat Apr 15 15:31:49 2017 -0500 rtlwifi: btcoex: 21a 2ant: force wifi to use RF path A Let the wifi use main antenna to have higher power. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 2 ++ 1 file changed, 2 insertions(+) commit 124e50ff6582a45668c18984e6371f3ca5a30ba7 Author: Yan-Hsuan Chuang Date: Sat Apr 15 15:31:48 2017 -0500 rtlwifi: btcoex: 21a 2ant: add threshold to examine bt rssi The threshold is used to adjust the base line for the rssi state. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1a2534930e9ec51fe459dc5dd592e496ecd99750 Author: Yan-Hsuan Chuang Date: Sat Apr 15 15:31:47 2017 -0500 rtlwifi: btcoex: 21a 2ant: turn on sw dac swing and check if is sco_only Use software dac swing and double check if it is sco_only to set the tdma for voice quality. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 55 ++++++++++------------ 1 file changed, 24 insertions(+), 31 deletions(-) commit 3f775d5cee7966e41354a45377e34b9c01cf1f79 Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:07:10 2017 -0500 rtlwifi: btcoex: 21a 2ant: refine tdma duration adjust function 1. Add more cases to adjust the wifi duration and add a case with the max interval of 3 for some future uses. 2. rename tdma_adj -> ps_tdma_du_adj to indicate that this member is for power saving tdma duration adjustment Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 968 +++++++++++++++++++-- .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.h | 3 +- 2 files changed, 893 insertions(+), 78 deletions(-) commit 20ec48e51d252daa5c829061b7af596faf75209b Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:07:09 2017 -0500 rtlwifi: btcoex: 21a 2ant: fix invalid argument passed The dac swing level should be an unsigned 32-bit value rather than boolean. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3506bc286abe0f3ba2344c8df8a4f688eef6221f Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:07:08 2017 -0500 rtlwifi: btcoex: 21a 2ant: action for wifi is idle/linking/common Depending on the state of wifi, we need to set different tdma and coex table parameters to make wfi and bt coexist smoothly. Otherwise the bt may have low sound quality or mouse lag, which mean bad user experience. The same problem may occur on wifi also, if could disconnect or lose some important packets. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 240 +++++++++++++-------- 1 file changed, 145 insertions(+), 95 deletions(-) commit 4b764919268783ac0b31bcd16699704310f76b5a Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:07:07 2017 -0500 rtlwifi: btcoex: 21a 2ant: tdma cases for low wifi/bt rssi If the wifi or bt has low rssi, they need extra parameter settings for the tdma. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 91 +++++++++++++++++++++- 1 file changed, 89 insertions(+), 2 deletions(-) commit 8189d81890c150a6268a4660d24cabd603a3a540 Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:07:06 2017 -0500 rtlwifi: btcoex: 21a 2ant: slot time fine tune Tune the wifi/bt slot time to get better performance. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 52 +++++++++++----------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 8c670a1b1daeb5c7d2628e0d74fc3594af443a36 Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:07:05 2017 -0500 rtlwifi: btcoex: 21a 2ant: let PTA circuit control the switch Register 0xcb4 determines if the PTA circuit can control the swtich Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 1 - 1 file changed, 1 deletion(-) commit aae1e8f5a0f05e0965b56a3cf6bfd2686577e817 Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:07:04 2017 -0500 rtlwifi: btcoex: 21a 2ant: set coex table and tdma when bt inquiry Instead of just setting the coex table directly, we check if the wifi is under some important activity (scanning|roaming|linking) and mark the packets as high priority in that case. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 51 +++++++++++++++++++--- 1 file changed, 44 insertions(+), 7 deletions(-) commit 9153c11cefa3905a3299d2d7b83d9330cf90f5d2 Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:07:03 2017 -0500 rtlwifi: btcoex: 21a 2ant: ignore wifi if it is at 5G band When wifi is at 5G band, it does not intefere with 2.4G bt signal, hence we can just ignore it and transmit normally as nothing happened. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 1 + 1 file changed, 1 insertion(+) commit 3fd7ba4c764c0b6b13e6d764d7761ea3cec12745 Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:07:02 2017 -0500 rtlwifi: btcoex: 21a 2ant: check if wifi status changed Monitor wifi status and check if it is changed. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 41 ++++++++++++++++++++++ .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.h | 5 +++ 2 files changed, 46 insertions(+) commit d4acd81ed268fed257e8a8b4a40511bebc817244 Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:07:01 2017 -0500 rtlwifi: btcoex: 21a 2ant: centralized control of coex table Gather multiple coex table settings into a function coex_table_with_type() and control the coex table according the type value as put in switch-case expression. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 116 +++++++++++++++++---- .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.h | 2 + 2 files changed, 99 insertions(+), 19 deletions(-) commit d09199eb20382a2dd5e61afecd647784cc9697eb Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:07:00 2017 -0500 rtlwifi: btcoex: 21a 2ant: do not check wifi bandwidth Remove workaround for HT40 issues for RF low pass filter. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 10 ---------- 1 file changed, 10 deletions(-) commit d9158ea1d1bde5f01c03fa92f3a88b7fb39153e4 Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:06:59 2017 -0500 rtlwifi: btcoex: 21a 2ant: check power save state before pstdma The power_save_state function checks the state of power saving. For tdma settings, the wifi sends nullfunc to pretend enter power saving and then bt can transmit. Hence the coex needs to check the power status before set the pstdma function. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 119 +++++++++++++++++---- .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.h | 5 + 2 files changed, 104 insertions(+), 20 deletions(-) commit 5a81969c1cc3a19a65ebbd9f31f844b0a5060d25 Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:06:58 2017 -0500 rtlwifi: btcoex: 21a 2ant: suffer less tx penalty from retry Change h2c parameter to decrease tx penalty. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7cc7f1a18bccea1e278045b133d91265baa3eb11 Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:06:57 2017 -0500 rtlwifi: btcoex: 21a 2ant: move from bt_stack_info to bt_link_info Gather variables to the 8821a2ant coex structure. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 112 ++++++++++----------- 1 file changed, 55 insertions(+), 57 deletions(-) commit aed6b11e4fc2134ccd4db4d1a41b2cc8fed980f3 Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:06:56 2017 -0500 rtlwifi: btcoex: 21a 2ant: finer adjustment of bt power Originally we only increase/decrease bt power in a fixed power gap, this patch makes us be able to modify bt power for multiple power gaps and we can precisely adjust the bt power. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 51 ++++++++++------------ .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.h | 4 +- 2 files changed, 26 insertions(+), 29 deletions(-) commit 4b1f6eaac344ed0895a9ed5dc71b4f6945e255ca Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:06:55 2017 -0500 rtlwifi: btcoex: 21a 2ant: update bt profiling information This function updates the information of bt profiling to help us decide the network status and dispatch the resource properly. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 51 +++++++++++++++++++++- 1 file changed, 49 insertions(+), 2 deletions(-) commit eebc58782eff0253934b834934ab5ba385e5390e Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:06:54 2017 -0500 rtlwifi: btcoex: 21a 2ant: monitor wifi counter to check network status If there are a lot of low-rate packets, then the connection of wifi is unstable. If so, we should switch resource to bt to have a higher transmission quality, or wifi resource will be wasted Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 38 ++++++++++++++++++++++ .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.h | 10 ++++++ 2 files changed, 48 insertions(+) commit 4776d349071d6cf85886e85721f71599b832bf72 Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:06:53 2017 -0500 rtlwifi: btcoex: 21a 2ant: monitor if bt is slave or not We monitor the packet counter to guess if the bt is slave or not, and when bt is slave, it may receive packet at any time, so we will have to take care about it Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 930d2bf242d6abdfe8226a3b585007127fbb0f99 Author: Yan-Hsuan Chuang Date: Thu Apr 13 13:06:52 2017 -0500 rtlwifi: btcoex: 21a 2ant: limit rx aggregation size to avoid bt interrupt Larger packets have higher opportunity to be interrupt by bt signal. In order to shorten the transmission time, control the packet aggregation size. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit bf30171b22c56567d44117592ec376aef1e47a6f Author: Brian Norris Date: Wed Apr 19 10:12:35 2017 -0700 MAINTAINERS: update Amitkumar's email address His email is bouncing, and he'd like to use this new one. Cc: Amitkumar Karwar Cc: Nishant Sarmukadam Cc: Ganapathi Bhat Cc: Xinming Hu Signed-off-by: Brian Norris Signed-off-by: Kalle Valo MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb9e67bee3ab7111513130c516ffe378d885c0d0 Author: Brian Norris Date: Fri Apr 14 14:51:20 2017 -0700 mwifiex: don't leak 'chan_stats' on reset 'chan_stats' is (re)allocated in _mwifiex_fw_dpc() -> mwifiex_init_channel_scan_gap(), which is called whenever the device is initialized -- at probe or at reset. But we only free it in we completely unregister the adapter, meaning we leak a copy of it during every reset. Let's free it in the shutdown / removal paths instead (and in the error-handling path), to avoid the leak. Ideally, we can eventually unify much of mwifiex_shutdown_sw() and mwifiex_remove_card() (way too much copy-and-paste) to reduce the burden on bugfixes like this. But that's work for tomorrow. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 35e67d3d58b955fe35d78ce439b4fa996a9eadcd Author: Brian Norris Date: Fri Apr 14 14:51:19 2017 -0700 mwifiex: pcie: clear outstanding work when resetting When we shut down the device (i.e., during 'reset'), we cancel any outstanding work, but we don't clear any work-related flags. This can cause problems if, e.g., we begin to queue a new firmware dump or card reset while the other one is in progress. That might leave work_flags with a stale value, and we might begin one of these *after* we've completely reset the device. That doesn't make sense, because all firmware context will have been lost by then. This fixes some forms of cascading failures, where I: (a) force a firmware dump (cat /sys/kernel/debug/mwifiex/mlan0/device_dump) (b) run a Wifi scan in parallel (iw mlan0 scan) (c) the scan times out due to (a) hogging the interface (d) the command timeout triggers another firmware dump and a reset [*] (e) the 2nd firmware dump flag persists across the reset (f) as soon as the interface comes back up, we trigger the pending firmware dump (g) subsequent commands time out again, while we are processing the firmware dump; return to (d) [*] Note that automatic card_reset() support is not yet implemented for the mwifiex PCIe driver, so we won't hit *exactly* this behavior yet. But we can see similarly-confusing behaviors today. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 2 ++ 1 file changed, 2 insertions(+) commit 9ae3fbd109d9d89c442a3412e41fc532a9829ea8 Author: Brian Norris Date: Fri Apr 14 14:51:18 2017 -0700 mwifiex: reset timeout flag when resetting device If we reset because of a command timeout, we should reset this flag. Otherwise, we might erroneously think the next command after reset is timing out, and trigger another reset. The above behavior effectively neuters the automatic card_reset() behavior, as it means we will never recover from a command timeout properly (and in fact, we might enter an infinite loop: timeout -> reset -> (fake) timeout -> reset -> ... This fixes a bug introduced with introduction of PCIe function level reset support, but it was carried into the SDIO driver when it was converted to use the same codepaths. And this is currently mostly a problem only in the SDIO driver, because it's the only one with automatic card_reset() support (e.g., on command timeout). But it will be a problem for PCIe too, as I'm working on supporting automatic card_reset() for PCIe. Fixes: c742e623e941 ("mwifiex: sdio card reset enhancement") Fixes: 4c5dae59d2e9 ("mwifiex: add PCIe function level reset support") Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 1 + 1 file changed, 1 insertion(+) commit 3c8cb9ad032d737b874e402c59eb51e3c991a144 Author: Brian Norris Date: Fri Apr 14 14:51:17 2017 -0700 mwifiex: pcie: fix cmd_buf use-after-free in remove/reset Command buffers (skb's) are allocated by the main driver, and freed upon the last use. That last use is often in mwifiex_free_cmd_buffer(). In the meantime, if the command buffer gets used by the PCI driver, we map it as DMA-able, and store the mapping information in the 'cb' memory. However, if a command was in-flight when resetting the device (and therefore was still mapped), we don't get a chance to unmap this memory until after the core has cleaned up its command handling. Let's keep a refcount within the PCI driver, so we ensure the memory only gets freed after we've finished unmapping it. Noticed by KASAN when forcing a reset via: echo 1 > /sys/bus/pci/.../reset The same code path can presumably be exercised in remove() and shutdown(). [ 205.390377] mwifiex_pcie 0000:01:00.0: info: shutdown mwifiex... [ 205.400393] ================================================================== [ 205.407719] BUG: KASAN: use-after-free in mwifiex_unmap_pci_memory.isra.14+0x4c/0x100 [mwifiex_pcie] at addr ffffffc0ad471b28 [ 205.419040] Read of size 16 by task bash/1913 [ 205.423421] ============================================================================= [ 205.431625] BUG skbuff_head_cache (Tainted: G B ): kasan: bad access detected [ 205.439815] ----------------------------------------------------------------------------- [ 205.439815] [ 205.449534] INFO: Allocated in __build_skb+0x48/0x114 age=1311 cpu=4 pid=1913 [ 205.456709] alloc_debug_processing+0x124/0x178 [ 205.461282] ___slab_alloc.constprop.58+0x528/0x608 [ 205.466196] __slab_alloc.isra.54.constprop.57+0x44/0x54 [ 205.471542] kmem_cache_alloc+0xcc/0x278 [ 205.475497] __build_skb+0x48/0x114 [ 205.479019] __netdev_alloc_skb+0xe0/0x170 [ 205.483244] mwifiex_alloc_cmd_buffer+0x68/0xdc [mwifiex] [ 205.488759] mwifiex_init_fw+0x40/0x6cc [mwifiex] [ 205.493584] _mwifiex_fw_dpc+0x158/0x520 [mwifiex] [ 205.498491] mwifiex_reinit_sw+0x2c4/0x398 [mwifiex] [ 205.503510] mwifiex_pcie_reset_notify+0x114/0x15c [mwifiex_pcie] [ 205.509643] pci_reset_notify+0x5c/0x6c [ 205.513519] pci_reset_function+0x6c/0x7c [ 205.517567] reset_store+0x68/0x98 [ 205.521003] dev_attr_store+0x54/0x60 [ 205.524705] sysfs_kf_write+0x9c/0xb0 [ 205.528413] INFO: Freed in __kfree_skb+0xb0/0xbc age=131 cpu=4 pid=1913 [ 205.535064] free_debug_processing+0x264/0x370 [ 205.539550] __slab_free+0x84/0x40c [ 205.543075] kmem_cache_free+0x1c8/0x2a0 [ 205.547030] __kfree_skb+0xb0/0xbc [ 205.550465] consume_skb+0x164/0x178 [ 205.554079] __dev_kfree_skb_any+0x58/0x64 [ 205.558304] mwifiex_free_cmd_buffer+0xa0/0x158 [mwifiex] [ 205.563817] mwifiex_shutdown_drv+0x578/0x5c4 [mwifiex] [ 205.569164] mwifiex_shutdown_sw+0x178/0x310 [mwifiex] [ 205.574353] mwifiex_pcie_reset_notify+0xd4/0x15c [mwifiex_pcie] [ 205.580398] pci_reset_notify+0x5c/0x6c [ 205.584274] pci_dev_save_and_disable+0x24/0x6c [ 205.588837] pci_reset_function+0x30/0x7c [ 205.592885] reset_store+0x68/0x98 [ 205.596324] dev_attr_store+0x54/0x60 [ 205.600017] sysfs_kf_write+0x9c/0xb0 ... [ 205.800488] Call trace: [ 205.802980] [] dump_backtrace+0x0/0x190 [ 205.808415] [] show_stack+0x20/0x28 [ 205.813506] [] dump_stack+0xa4/0xcc [ 205.818598] [] print_trailer+0x158/0x168 [ 205.824120] [] object_err+0x4c/0x5c [ 205.829210] [] kasan_report+0x334/0x500 [ 205.834641] [] check_memory_region+0x20/0x14c [ 205.840593] [] __asan_loadN+0x14/0x1c [ 205.845879] [] mwifiex_unmap_pci_memory.isra.14+0x4c/0x100 [mwifiex_pcie] [ 205.854282] [] mwifiex_pcie_delete_cmdrsp_buf+0x94/0xa8 [mwifiex_pcie] [ 205.862421] [] mwifiex_pcie_free_buffers+0x11c/0x158 [mwifiex_pcie] [ 205.870302] [] mwifiex_pcie_down_dev+0x70/0x80 [mwifiex_pcie] [ 205.877736] [] mwifiex_shutdown_sw+0x190/0x310 [mwifiex] [ 205.884658] [] mwifiex_pcie_reset_notify+0xd4/0x15c [mwifiex_pcie] [ 205.892446] [] pci_reset_notify+0x5c/0x6c [ 205.898048] [] pci_dev_save_and_disable+0x24/0x6c [ 205.904350] [] pci_reset_function+0x30/0x7c [ 205.910134] [] reset_store+0x68/0x98 [ 205.915312] [] dev_attr_store+0x54/0x60 [ 205.920750] [] sysfs_kf_write+0x9c/0xb0 [ 205.926182] [] kernfs_fop_write+0x184/0x1f8 [ 205.931963] [] __vfs_write+0x6c/0x17c [ 205.937221] [] vfs_write+0xf0/0x1c4 [ 205.942310] [] SyS_write+0x78/0xd8 [ 205.947312] [] el0_svc_naked+0x24/0x28 ... [ 205.998268] ================================================================== This bug has been around in different forms for a while. It was sort of noticed in commit 955ab095c51a ("mwifiex: Do not kfree cmd buf while unregistering PCIe"), but it just fixed the double-free, without acknowledging the potential for use-after-free. Fixes: fc3314609047 ("mwifiex: use pci_alloc/free_consistent APIs for PCIe") Cc: Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 7 +++++++ 1 file changed, 7 insertions(+) commit efde6648a618025a8fe1bc550d7ba569e44dc2fe Author: Xinming Hu Date: Thu Apr 13 13:10:33 2017 -0700 mwifiex: pcie: extract wifi part from combo firmware during function level reset A separate wifi-only firmware was download during pcie function level reset. It is in fact the tail part of wifi/bt combo firmware. Per Brian's and Dmitry's suggestion, this patch extract the wifi part from combo firmware. After that, the mrvl/pcie8997_wlan_v4.bin image in linux-firmware repo is redundant (though I guess we keep it around to support older kernels). Signed-off-by: Xinming Hu Signed-off-by: Ganapathi Bhat Signed-off-by: Cathy Luo Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/fw.h | 18 +++++ drivers/net/wireless/marvell/mwifiex/pcie.c | 114 ++++++++++++++++++++++++++-- drivers/net/wireless/marvell/mwifiex/pcie.h | 3 +- 3 files changed, 127 insertions(+), 8 deletions(-) commit 127ee1db09707856dc4915afc60886561644585d Author: Xinming Hu Date: Thu Apr 13 06:48:21 2017 +0000 mwifiex: pcie: correct scratch register name This patch correct pcie scratch register name, to keep the same with chipset side definition. Signed-off-by: Xinming Hu Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 4 ++-- drivers/net/wireless/marvell/mwifiex/pcie.h | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) commit ef6c7d3cb731e3aa6a4ce8d501b97df73ea40b4e Author: Xinming Hu Date: Thu Apr 13 06:48:20 2017 +0000 mwifiex: fall back mwifiex_dbg to pr_info when adapter->dev not set mwifiex_dbg will do nothing before adapter->dev get assigned. several logs lost in this case. it can be avoided by fall back to pr_info. Signed-off-by: Xinming Hu Reviewed-by: Brian Norris Reviewed-by: Dmitry Torokhov Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 625b4dba57b256943a1714c7783e3cfbb52ce5c3 Author: Xinming Hu Date: Thu Apr 13 06:48:19 2017 +0000 mwifiex: remove unnecessary wakeup interrupt number sanity check If wakeup interrupt handler is called, we know that the wakeup interrupt number is valid, there is no need to check it. Signed-off-by: Xinming Hu Signed-off-by: Cathy Luo Reviewed-by: Dmitry Torokhov Reviewed-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 7e2f18f06408ff56d7f75e68de8064777137b319 Author: Brian Norris Date: Wed Apr 5 15:26:40 2017 -0700 mwifiex: MAC randomization should not be persistent nl80211 provides the NL80211_SCAN_FLAG_RANDOM_ADDR for every scan request that should be randomized; the absence of such a flag means we should not randomize. However, mwifiex was stashing the latest randomization request and *always* using it for future scans, even those that didn't set the flag. Let's zero out the randomization info whenever we get a scan request without NL80211_SCAN_FLAG_RANDOM_ADDR. I'd prefer to remove priv->random_mac entirely (and plumb the randomization MAC properly through the call sequence), but the spaghetti is a little difficult to unravel here for me. Fixes: c2a8f0ff9c6c ("mwifiex: support random MAC address for scanning") Cc: # 4.9+ Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a050d20d024dc3e1b988e715e2d811aaa3d5c39c Author: Nicholas Piggin Date: Thu Apr 13 19:45:48 2017 +1000 powerpc/64s: Use relon prolog for EXC_VIRT_OOL_MASKABLE_HV handlers Hypervisor Virtualization and Directed Hypervisor Doorbell interrupt handlers use the macro EXC_VIRT_OOL_MASKABLE_HV for their relocation-on handlers, which calls MASKABLE_RELON_EXCEPTION_HV_OOL, which uses the *real mode* interrupt prolog. This means we needlessly rfid from virtual mode to virtual mode. For POWER8 it only affects doorbell IPIs. Context switch microbenchmark between threads with snooze disabled (which causes IPI) gets about 3% faster, about 370 cycles. Should be more important on POWER9 with global doorbells and HVI for host interrupts. Use the RELON variant instead to reduce overhead. Fixes: 1707dd1613 ("powerpc: Save CFAR before branching in interrupt entry paths") Signed-off-by: Nicholas Piggin [mpe: Fold some more detail into the change log] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26e42a020471ffc9a4086feb3900976a49cff42b Merge: 821596a ca9ae5e Author: Thomas Gleixner Date: Thu Apr 20 08:28:34 2017 +0200 Merge tag 'arch-timer-gtdt' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux into timers/core Pull arch timer GTDT support from Mark Rutland - arch_timer cleanups and refactoring - new common GTDT parser - GTDT-based MMIO arch_timer support - GTDT-based SBSA watchdog support Fix up a trivial pr_err() conflict. commit 686978b15cef8314c3b3f38f0124e070b98eae37 Author: Michael Ellerman Date: Thu Apr 20 14:43:19 2017 +1000 powerpc/xive: Fix missing check of rc != OPAL_BUSY Dan Carpenter noticed that the code in __xive_native_disable_queue() has a for loop with an unconditional break in the middle, which doesn't make a lot of sense. What the code's supposed to do is loop as long as OPAL says it's busy, if we get any other return code, either success or failure, then we should break the loop. So add the missing check. Fixes: 243e25112d06 ("powerpc/xive: Native exploitation of the XIVE interrupt controller") Reported-by: Dan Carpenter Signed-off-by: Michael Ellerman arch/powerpc/sysdev/xive/native.c | 1 + 1 file changed, 1 insertion(+) commit 718ceb22a0ccd0b3a02a4bd401d944a1eb16f3ce Author: Johannes Berg Date: Wed Apr 19 10:30:47 2017 +0200 iwlwifi: pcie: free context info in case of failures If iwl_pcie_ctxt_info_init_fw_sec() fails, the previous allocated DMA memory needs to be freed (it even goes out of scope immediately.) Do that to prevent the leak. Fixes: eda50cde58de ("iwlwifi: pcie: add context information support") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 97b00d877bb8c2e499b9d0c07b65bd92b4e91ddd Author: Johannes Berg Date: Wed Apr 19 10:26:02 2017 +0200 iwlwifi: pcie: fix mutex leak in gen2 start If the context info fails to be allocated, the mutex isn't unlocked properly, fix that. Fixes: eda50cde58de ("iwlwifi: pcie: add context information support") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9b1ea16763d37080892e4425831ca9c6298f4f5c Author: Sara Sharon Date: Sun Feb 19 17:00:58 2017 +0200 iwlwifi: mvm: allow block ack response without data When FW fails to get block ack, it will send the notification with 0 items in the TFD queue elements. Allow this and handle accordingly. Fixes: c46e7724bfe9 ("iwlwifi: mvm: support new BA notification response") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 4 ++++ 1 file changed, 4 insertions(+) commit cb2e77c1d53366696a7f47dbcedba99603ca1b55 Merge: 856ee92 2da042a Author: Dave Airlie Date: Thu Apr 20 13:19:34 2017 +1000 Merge tag 'sunxi-drm-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-next Allwinner DRM changes for 4.12 Not any functional changes, but a lot of preliminary rework in order to support multiple display pipelines. * tag 'sunxi-drm-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: (26 commits) MAINTAINERS: Add sun4i-drm git repo drm/sun4i: Pass pointer for underlying backend into layer init drm/sun4i: Pass pointers for associated backend and tcon into crtc init drm/sun4i: tv: Get tcon and backend pointers from associated crtc drm/sun4i: Use embedded tcon pointer to get the tcon's output port node drm/sun4i: Fix tcon channel 0 comment about backporch = backporch + hsync drm/sun4i: Fix TCON clock and regmap initialization sequence drm/sun4i: Grab reserved memory region drm/sun4i: Add backend and tcon pointers to sun4i_crtc drm/sun4i: Add backend pointer to sun4i_layer drm/sun4i: rgb: Pass tcon pointer when initializing RGB encoder drm/sun4i: tv: Switch to drm_of_find_possible_crtcs drm/sun4i: Drop hardcoded .possible_crtcs values from layers drm/sun4i: Drop primary layer pointer from sun4i_drv drm/sun4i: Initialize crtc from tcon bind function drm/sun4i: Move layers from sun4i_drv to sun4i_crtc drm/sun4i: Add end of list element for sun4i_layers_init's returned list drm/sun4i: Set drm_crtc.port to the underlying TCON's output port node drm/sun4i: Make sunxi_rgb2yuv_coef constant drm/sun4i: Make sun4i_crtc_init return ERR_PTR style error codes ... commit 7ecaeaffd72ada135016564c08f5aa0b0be338f7 Author: Colin Ian King Date: Sat Apr 8 18:28:42 2017 +0100 scsi: aic7xxx: fix order of arguments in function prototype The vendor/device and subvendor/subdevice arguments to the function prototype ahc_9005_subdevinfo_valid are in the wrong order and need to be swapped to fix this. Detected with PVS-Studio studio. Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/scsi/aic7xxx/aic7xxx_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c7c3524ce79e275dd3042de5045d7a10245d3888 Author: Christoph Hellwig Date: Thu Apr 13 10:02:56 2017 +0200 scsi: bfa: remove bfa_module_s madness Just call the functions directly and remove a giant pile of boilerplate code. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/bfa/bfa_core.c | 66 ++++++++-------- drivers/scsi/bfa/bfa_fcpim.c | 37 ++------- drivers/scsi/bfa/bfa_ioc.c | 30 ++----- drivers/scsi/bfa/bfa_modules.h | 101 +++++++++++------------- drivers/scsi/bfa/bfa_svc.c | 172 +++++------------------------------------ 5 files changed, 108 insertions(+), 298 deletions(-) commit efacae6d4c095a5a99a012713089def1c5ad8906 Author: Kees Cook Date: Wed Mar 29 13:59:23 2017 -0700 scsi: qedi: qedf: Use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. For these cases, terminate the list with { }, which will be zero-filled, instead of undesignated NULLs. Signed-off-by: Kees Cook Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/qedf/qedf_debugfs.c | 2 +- drivers/scsi/qedi/qedi_debugfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit feafd13c96d6e2998d3da81bb55db379fcf02499 Author: Thomas Huth Date: Wed Apr 5 15:58:51 2017 +0200 KVM: PPC: Book3S PR: Do not fail emulation with mtspr/mfspr for unknown SPRs According to the PowerISA 2.07, mtspr and mfspr should not always generate an illegal instruction exception when being used with an undefined SPR, but rather treat the instruction as a NOP or inject a privilege exception in some cases, too - depending on the SPR number. Also turn the printk here into a ratelimited print statement, so that the guest can not flood the dmesg log of the host by issueing lots of illegal mtspr/mfspr instruction here. Signed-off-by: Thomas Huth Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_emulate.c | 34 ++++++++++++++++++++++++++-------- arch/powerpc/kvm/emulate.c | 8 ++++++++ 2 files changed, 34 insertions(+), 8 deletions(-) commit 121f80ba68f1a5779a36d7b3247206e60e0a7418 Author: Alexey Kardashevskiy Date: Wed Mar 22 15:21:56 2017 +1100 KVM: PPC: VFIO: Add in-kernel acceleration for VFIO This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT and H_STUFF_TCE requests targeted an IOMMU TCE table used for VFIO without passing them to user space which saves time on switching to user space and back. This adds H_PUT_TCE/H_PUT_TCE_INDIRECT/H_STUFF_TCE handlers to KVM. KVM tries to handle a TCE request in the real mode, if failed it passes the request to the virtual mode to complete the operation. If it a virtual mode handler fails, the request is passed to the user space; this is not expected to happen though. To avoid dealing with page use counters (which is tricky in real mode), this only accelerates SPAPR TCE IOMMU v2 clients which are required to pre-register the userspace memory. The very first TCE request will be handled in the VFIO SPAPR TCE driver anyway as the userspace view of the TCE table (iommu_table::it_userspace) is not allocated till the very first mapping happens and we cannot call vmalloc in real mode. If we fail to update a hardware IOMMU table unexpected reason, we just clear it and move on as there is nothing really we can do about it - for example, if we hot plug a VFIO device to a guest, existing TCE tables will be mirrored automatically to the hardware and there is no interface to report to the guest about possible failures. This adds new attribute - KVM_DEV_VFIO_GROUP_SET_SPAPR_TCE - to the VFIO KVM device. It takes a VFIO group fd and SPAPR TCE table fd and associates a physical IOMMU table with the SPAPR TCE table (which is a guest view of the hardware IOMMU table). The iommu_table object is cached and referenced so we do not have to look up for it in real mode. This does not implement the UNSET counterpart as there is no use for it - once the acceleration is enabled, the existing userspace won't disable it unless a VFIO container is destroyed; this adds necessary cleanup to the KVM_DEV_VFIO_GROUP_DEL handler. This advertises the new KVM_CAP_SPAPR_TCE_VFIO capability to the user space. This adds real mode version of WARN_ON_ONCE() as the generic version causes problems with rcu_sched. Since we testing what vmalloc_to_phys() returns in the code, this also adds a check for already existing vmalloc_to_phys() call in kvmppc_rm_h_put_tce_indirect(). This finally makes use of vfio_external_user_iommu_id() which was introduced quite some time ago and was considered for removal. Tests show that this patch increases transmission speed from 220MB/s to 750..1020MB/s on 10Gb network (Chelsea CXGB3 10Gb ethernet card). Signed-off-by: Alexey Kardashevskiy Acked-by: Alex Williamson Reviewed-by: David Gibson Signed-off-by: Paul Mackerras Documentation/virtual/kvm/devices/vfio.txt | 18 +- arch/powerpc/include/asm/kvm_host.h | 8 + arch/powerpc/include/asm/kvm_ppc.h | 4 + arch/powerpc/kvm/book3s_64_vio.c | 306 ++++++++++++++++++++++++++++- arch/powerpc/kvm/book3s_64_vio_hv.c | 201 ++++++++++++++++++- arch/powerpc/kvm/powerpc.c | 2 + include/uapi/linux/kvm.h | 6 + virt/kvm/vfio.c | 105 ++++++++++ 8 files changed, 645 insertions(+), 5 deletions(-) commit b1af23d836f811137d504d14d4cbdd01929dec34 Author: Alexey Kardashevskiy Date: Wed Mar 22 15:21:55 2017 +1100 KVM: PPC: iommu: Unify TCE checking This reworks helpers for checking TCE update parameters in way they can be used in KVM. This should cause no behavioral change. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Acked-by: Michael Ellerman Signed-off-by: Paul Mackerras arch/powerpc/include/asm/iommu.h | 20 +++++++++++++++----- arch/powerpc/include/asm/kvm_ppc.h | 6 ++++-- arch/powerpc/kernel/iommu.c | 37 +++++++++++++------------------------ arch/powerpc/kvm/book3s_64_vio_hv.c | 31 +++++++------------------------ 4 files changed, 39 insertions(+), 55 deletions(-) commit da6f59e19233efdda58f196afbae8e05f6030d7f Author: Alexey Kardashevskiy Date: Wed Mar 22 15:21:54 2017 +1100 KVM: PPC: Use preregistered memory API to access TCE list VFIO on sPAPR already implements guest memory pre-registration when the entire guest RAM gets pinned. This can be used to translate the physical address of a guest page containing the TCE list from H_PUT_TCE_INDIRECT. This makes use of the pre-registrered memory API to access TCE list pages in order to avoid unnecessary locking on the KVM memory reverse map as we know that all of guest memory is pinned and we have a flat array mapping GPA to HPA which makes it simpler and quicker to index into that array (even with looking up the kernel page tables in vmalloc_to_phys) than it is to find the memslot, lock the rmap entry, look up the user page tables, and unlock the rmap entry. Note that the rmap pointer is initialized to NULL where declared (not in this patch). If a requested chunk of memory has not been preregistered, this will fall back to non-preregistered case and lock rmap. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_vio_hv.c | 58 +++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 16 deletions(-) commit 503bfcbe18576a79be0bc5173b23b530845e704a Author: Alexey Kardashevskiy Date: Wed Mar 22 15:21:53 2017 +1100 KVM: PPC: Pass kvm* to kvmppc_find_table() The guest view TCE tables are per KVM anyway (not per VCPU) so pass kvm* there. This will be used in the following patches where we will be attaching VFIO containers to LIOBNs via ioctl() to KVM (rather than to VCPU). Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_ppc.h | 2 +- arch/powerpc/kvm/book3s_64_vio.c | 7 ++++--- arch/powerpc/kvm/book3s_64_vio_hv.c | 13 +++++++------ 3 files changed, 12 insertions(+), 10 deletions(-) commit e91aa8e6ecd5e8193df6dec109f9d5deda5c7317 Author: Alexey Kardashevskiy Date: Wed Mar 22 15:21:52 2017 +1100 KVM: PPC: Enable IOMMU_API for KVM_BOOK3S_64 permanently It does not make much sense to have KVM in book3s-64 and not to have IOMMU bits for PCI pass through support as it costs little and allows VFIO to function on book3s KVM. Having IOMMU_API always enabled makes it unnecessary to have a lot of "#ifdef IOMMU_API" in arch/powerpc/kvm/book3s_64_vio*. With those ifdef's we could have only user space emulated devices accelerated (but not VFIO) which do not seem to be very useful. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 4898d3f49b5b156c33f0ae0f49ede417ab86195e Author: Alexey Kardashevskiy Date: Wed Mar 22 15:21:51 2017 +1100 KVM: PPC: Reserve KVM_CAP_SPAPR_TCE_VFIO capability number This adds a capability number for in-kernel support for VFIO on SPAPR platform. The capability will tell the user space whether in-kernel handlers of H_PUT_TCE can handle VFIO-targeted requests or not. If not, the user space must not attempt allocating a TCE table in the host kernel via the KVM_CREATE_SPAPR_TCE KVM ioctl because in that case TCE requests will not be passed to the user space which is desired action in the situation like that. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Paul Mackerras include/uapi/linux/kvm.h | 1 + 1 file changed, 1 insertion(+) commit 644d2d6fef56f981bca008ba0253dc419d2ede39 Merge: 3762d45 e5afdf9 Author: Paul Mackerras Date: Thu Apr 20 11:38:33 2017 +1000 Merge remote-tracking branch 'remotes/powerpc/topic/ppc-kvm' into kvm-ppc-next This merges in the commits in the topic/ppc-kvm branch of the powerpc tree to get the changes to arch/powerpc which subsequent patches will rely on. Signed-off-by: Paul Mackerras commit 3762d45aa71d546cc0afa29da2f1cd360c099484 Author: Alexey Kardashevskiy Date: Thu Apr 13 17:04:20 2017 +1000 KVM: PPC: Align the table size to system page size At the moment the userspace can request a table smaller than a page size and this value will be stored as kvmppc_spapr_tce_table::size. However the actual allocated size will still be aligned to the system page size as alloc_page() is used there. This aligns the table size up to the system page size. It should not change the existing behaviour but when in-kernel TCE acceleration patchset reaches the upstream kernel, this will allow small TCE tables be accelerated as well: PCI IODA iommu_table allocator already aligns the size and, without this patch, an IOMMU group won't attach to LIOBN due to the mismatching table size. Reviewed-by: David Gibson Signed-off-by: Alexey Kardashevskiy Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_vio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96df2267695199b9377bd641c7eb68c393b81b0b Author: Alexey Kardashevskiy Date: Fri Mar 24 17:49:22 2017 +1100 KVM: PPC: Book3S PR: Preserve storage control bits PR KVM page fault handler performs eaddr to pte translation for a guest, however kvmppc_mmu_book3s_64_xlate() does not preserve WIMG bits (storage control) in the kvmppc_pte struct. If PR KVM is running as a second level guest under HV KVM, and PR KVM tries inserting HPT entry, this fails in HV KVM if it already has this mapping. This preserves WIMG bits between kvmppc_mmu_book3s_64_xlate() and kvmppc_mmu_map_page(). Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kvm/book3s_64_mmu.c | 1 + arch/powerpc/kvm/book3s_64_mmu_host.c | 2 ++ arch/powerpc/kvm/book3s_pr.c | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) commit bd9166ffe624000140fc6b606b256df01fc0d060 Author: Alexey Kardashevskiy Date: Fri Mar 24 17:48:10 2017 +1100 KVM: PPC: Book3S PR: Exit KVM on failed mapping At the moment kvmppc_mmu_map_page() returns -1 if mmu_hash_ops.hpte_insert() fails for any reason so the page fault handler resumes the guest and it faults on the same address again. This adds distinction to kvmppc_mmu_map_page() to return -EIO if mmu_hash_ops.hpte_insert() failed for a reason other than full pteg. At the moment only pSeries_lpar_hpte_insert() returns -2 if plpar_pte_enter() failed with a code other than H_PTEG_FULL. Other mmu_hash_ops.hpte_insert() instances can only fail with -1 "full pteg". With this change, if PR KVM fails to update HPT, it can signal the userspace about this instead of returning to guest and having the very same page fault over and over again. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_host.c | 5 ++++- arch/powerpc/kvm/book3s_pr.c | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) commit 9eecec126e006768c21ba2b4588ce5b0e23fda0b Author: Alexey Kardashevskiy Date: Fri Mar 24 17:47:13 2017 +1100 KVM: PPC: Book3S PR: Get rid of unused local variable @is_mmio has never been used since introduction in commit 2f4cf5e42d13 ("Add book3s.c") from 2009. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_pr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 37655490db757a8ef9141830428485395b86e8fa Author: Markus Elfring Date: Fri Jan 20 16:30:18 2017 +0100 KVM: PPC: e500: Use kcalloc() in e500_mmu_host_init() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Paul Mackerras arch/powerpc/kvm/e500_mmu_host.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a1c52e1c7cb9fb8714b89b7bb5773c498e39e38b Author: Markus Elfring Date: Fri Jan 20 11:00:08 2017 +0100 KVM: PPC: Book3S HV: Use common error handling code in kvmppc_clr_passthru_irq() Add a jump target so that a bit of exception handling can be better reused at the end of this function. Signed-off-by: Markus Elfring Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 9b5ab0051306033b0b1e83dd72e1f84a0c8dd4bf Author: Paul Mackerras Date: Thu Mar 23 11:55:16 2017 +1100 KVM: PPC: Add MMIO emulation for remaining floating-point instructions For completeness, this adds emulation of the lfiwax and lfiwzx instructions. With this, all floating-point load and store instructions as of Power ISA V2.07 are emulated. Signed-off-by: Paul Mackerras arch/powerpc/include/asm/ppc-opcode.h | 2 ++ arch/powerpc/kvm/emulate_loadstore.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) commit ceba57df43a25ede55a96a795703c46022b1d1d0 Author: Paul Mackerras Date: Tue Mar 21 15:43:47 2017 +1100 KVM: PPC: Emulation for more integer loads and stores This adds emulation for the following integer loads and stores, thus enabling them to be used in a guest for accessing emulated MMIO locations. - lhaux - lwaux - lwzux - ldu - lwa - stdux - stwux - stdu - ldbrx - stdbrx Previously, most of these would cause an emulation failure exit to userspace, though ldu and lwa got treated incorrectly as ld, and stdu got treated incorrectly as std. This also tidies up some of the formatting and updates the comment listing instructions that still need to be implemented. With this, all integer loads and stores that are defined in the Power ISA v2.07 are emulated, except for those that are permitted to trap when used on cache-inhibited or write-through mappings (and which do in fact trap on POWER8), that is, lmw/stmw, lswi/stswi, lswx/stswx, lq/stq, and l[bhwdq]arx/st[bhwdq]cx. Signed-off-by: Paul Mackerras arch/powerpc/include/asm/ppc-opcode.h | 5 ++ arch/powerpc/kvm/emulate_loadstore.c | 135 ++++++++++++++++++++++------------ 2 files changed, 91 insertions(+), 49 deletions(-) commit 91242fd1a3eb96e4efe43bdf96c2fcec97fdf4ff Author: Alexey Kardashevskiy Date: Fri Mar 17 19:31:38 2017 +1100 KVM: PPC: Add MMIO emulation for stdx (store doubleword indexed) This adds missing stdx emulation for emulated MMIO accesses by KVM guests. This allows the Mellanox mlx5_core driver from recent kernels to work when MMIO emulation is enforced by userspace. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Paul Mackerras arch/powerpc/include/asm/ppc-opcode.h | 1 + arch/powerpc/kvm/emulate_loadstore.c | 6 ++++++ 2 files changed, 7 insertions(+) commit 6f63e81bda98cbb549b01faf978884692ded438d Author: Bin Lu Date: Tue Feb 21 21:12:36 2017 +0800 KVM: PPC: Book3S: Add MMIO emulation for FP and VSX instructions This patch provides the MMIO load/store emulation for instructions of 'double & vector unsigned char & vector signed char & vector unsigned short & vector signed short & vector unsigned int & vector signed int & vector double '. The instructions that this adds emulation for are: - ldx, ldux, lwax, - lfs, lfsx, lfsu, lfsux, lfd, lfdx, lfdu, lfdux, - stfs, stfsx, stfsu, stfsux, stfd, stfdx, stfdu, stfdux, stfiwx, - lxsdx, lxsspx, lxsiwax, lxsiwzx, lxvd2x, lxvw4x, lxvdsx, - stxsdx, stxsspx, stxsiwx, stxvd2x, stxvw4x [paulus@ozlabs.org - some cleanups, fixes and rework, make it compile for Book E, fix build when PR KVM is built in] Signed-off-by: Bin Lu Signed-off-by: Paul Mackerras arch/powerpc/include/asm/disassemble.h | 5 + arch/powerpc/include/asm/kvm_host.h | 23 +++ arch/powerpc/include/asm/kvm_ppc.h | 7 + arch/powerpc/include/asm/ppc-opcode.h | 50 +++++ arch/powerpc/kvm/emulate_loadstore.c | 335 ++++++++++++++++++++++++++++++++- arch/powerpc/kvm/powerpc.c | 318 ++++++++++++++++++++++++++++++- 6 files changed, 731 insertions(+), 7 deletions(-) commit 3480756f2cb93c9245e831a4f46ff6ed19c41031 Author: Jacob Keller Date: Thu Apr 13 04:45:53 2017 -0400 i40e: use i40e_stop_rings_no_wait to implement PORT_SUSPENDED state This state bit was added as a way for DCB to avoid having to wait for the queues to disable when handling LLDP events. The logic for this was burried deep within stop Tx and stop Rx queue code. First, let's rename it so that it does not appear to only affect Tx when infact it modifies both Tx and Rx flow. Second we can move it up into the i40e_stop_rings() function, and we can simply re-use the i40e_stop_rings_no_wait() so that we don't have to bury the implementation as deep into the call stack. An alternative might be to remove the state bit and instead attempt to shut down everything directly in DCP flow. This, however, is not ideal because it creates yet another separate shutdown routine that we'd have to maintain. In the current implementation any changes will be made to both flows. Change-ID: I68e1ccb901af320862bca395e9c9746f08e8b17c Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 2 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 16 ++++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) commit e4b433f4a74196476ccf226e450c4582428641c1 Author: Jacob Keller Date: Thu Apr 13 04:45:52 2017 -0400 i40e: reset all VFs in parallel when rebuilding PF When there are a lot of active VFs, it can take multiple seconds to finish resetting all of them during certain flows., which can cause some VFs to fail to wait long enough for the reset to occur. The user might see messages like "Never saw reset" or "Reset never finished" and the VF driver will stop functioning properly. The naive solution would be to simply increase the wait timer. We can get much more clever. Notice that i40e_reset_vf is run in a serialized fashion, and includes lots of delays. There are two prominent delays which take most of the time. First, when we begin resetting VFs, we have multiple 10ms delays which accrue because we reset each VF in a serial fashion. These delays accumulate to almost 4 seconds when handling the maximum number of VFs (128). Secondly, there is a massive 50ms delay for each time we disable queues on a VSI. This delay is necessary to allow HW to finish disabling queues before we restore functionality. However, just like with the first case, we are paying the cost for each VF, rather than disabling all VFs and waiting once. Both of these can be fixed, but required some previous refactoring to handle the special case. First, we will need the i40e_vsi_wait_queues_disabled function which was previously DCB specific. Second, we will need to implement our own i40e_vsi_stop_rings_no_wait function which will handle the stopping of rings without the delays. Finally, implement an i40e_reset_all_vfs function, which will first start the reset of all VFs, and pay the wait cost all at once, rather than serially waiting for each VF before we start processing then next one. After the VF has been reset, we'll disable all the VF queues, and then wait for them to disable. Again, we'll organize the flow such that we pay the wait cost only once. Finally, after we've disabled queues we'll go ahead and begin restoring VF functionality. The result is reducing the wait time by a large factor and ensuring that VFs do not timeout when waiting in the VF driver. Change-ID: Ia6e8cf8d98131b78aec89db78afb8d905c9b12be Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 2 + drivers/net/ethernet/intel/i40e/i40e_main.c | 32 +++++-- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 100 +++++++++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 1 + 4 files changed, 129 insertions(+), 6 deletions(-) commit 9dc2e417383815bc6b8239ae2714d145c167b5c8 Author: Jacob Keller Date: Thu Apr 13 04:45:51 2017 -0400 i40e: split some code in i40e_reset_vf into helpers A future patch is going to want to re-use some of the code in i40e_reset_vf, so lets break up the beginning and ending parts into their own helper functions. The first function will be used to initialize the reset on a VF, while the second function will be used to finalize the reset and restore functionality. Change-ID: I48df808b8bf09de3c2ed8c521f57b3f0ab9e5907 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 109 ++++++++++++++------- 1 file changed, 72 insertions(+), 37 deletions(-) commit 1de81c2d07abeed32e9cbe54bf19a79c6fc8e3ff Author: Jacob Keller Date: Thu Apr 13 04:45:50 2017 -0400 i40e: remove I40E_FLAG_IN_NETPOLL entirely This flag was originally intended to be used to let some driver code know when we were running from netpoll. Ultimately this was not necessary and we never used it. Let's remove it Change-ID: I43b72483d91c1638071d2a7f389ab171ec5b796a Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf.h | 2 -- 1 file changed, 2 deletions(-) commit 307d927967007acef98cfd3f0639c7a4bf234ede Author: Paul Mackerras Date: Wed Mar 22 21:02:08 2017 +1100 KVM: PPC: Provide functions for queueing up FP/VEC/VSX unavailable interrupts This provides functions that can be used for generating interrupts indicating that a given functional unit (floating point, vector, or VSX) is unavailable. These functions will be used in instruction emulation code. Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_ppc.h | 3 +++ arch/powerpc/kvm/book3s.c | 18 ++++++++++++++++++ arch/powerpc/kvm/booke.c | 5 +++++ 3 files changed, 26 insertions(+) commit 9e3f23f44f3294f794802e3fee2ba03214451a95 Author: Jacob Keller Date: Thu Apr 13 04:45:49 2017 -0400 i40e: reduce wait time for adminq command completion When sending an adminq command, we wait for the command to complete in a loop. This loop waits for an entire millisecond, when in practice the adminq command is processed often much faster. Change the loop to use i40e_usec_delay instead, and wait for 50 usecs each time instead. This appears to be about the minimum time required, based on some manual observation and testing. The primary benefit of this change is reducing latency of various operations in the PF driver, especially when related to having a large number of VFs enabled. For example, on Linux, when instantiating 128 VFs, the time to finish the operation dropped from about 9 seconds down to under 6 seconds. Additionally, the time it takes to finish a PF reset with 128 VFs dropped from 5.1 seconds down to 0.7 seconds. As the examples above show, a significant portion of the delay is wasted waiting for admiqn operations which have already finished. This patch shouldn't cause impact to functionality, as we still check and keep waiting until the command does get processed. The only expected change is an increase in CPU utilization as we now check for completion far more times. However, in practice the commands appear to generally be complete within the first delay window anyways. Change-ID: If8af8388e100da0a14eaf9e1af3afadf73a958cf Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq.c | 4 ++-- drivers/net/ethernet/intel/i40e/i40e_adminq.h | 2 +- drivers/net/ethernet/intel/i40evf/i40e_adminq.c | 4 ++-- drivers/net/ethernet/intel/i40evf/i40e_adminq.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit e8d2f4c674571b2b2d8a58405196d4a390996e33 Author: Jacob Keller Date: Thu Apr 13 04:45:48 2017 -0400 i40e: fix CONFIG_BUSY checks in i40e_set_settings function The check for I40E_CONFIG_BUSY state bit in the i40e_set_link_ksettings function is fishy. First we can notice a few things about the check here. First a similar check was introduced by commit 'c7d05ca89f8e ("i40e: driver ethtool core")' Later a commit introducing the link settings was added by commit 'bf9c71417f72 ("i40e: Implement set_settings for ethtool")' However, this second check was against vsi->state instead of pf->state, and also failed to set the bit, it only checks. That indicates the locking was not quite correct. The only other place that the state bit in vsi->state gets used is to protect the filter list. Since this code does not care about the mac filter list, and seems clear the original code should have set the pf->state bit. Fix these issues by using pf->state correctly, and by actually setting the bit so that we properly lock as expected. Since these checks occur while holding the rtnl_lock(), lets also add a timeout so that we don't potentially softlock the system. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 38 ++++++++++++++++++++------ 1 file changed, 29 insertions(+), 9 deletions(-) commit c768e490640dbb928d1c8a5f7b437a334d0cde44 Author: Jacob Keller Date: Thu Apr 13 04:45:47 2017 -0400 i40e: factor out queue control from i40e_vsi_control_(tx|rx) A future patch will need to be able to handle controlling queues without waiting until all VSIs are handled. Factor out the direct queue modification so that we can easily re-use this code. The result is also a bit easier to read since we don't embed multiple single-letter loop counters. Change-ID: Id923cbfa43127b1c24d8ed4f809b1012c736d9ac Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 139 ++++++++++++++++++---------- 1 file changed, 89 insertions(+), 50 deletions(-) commit 024b05f4246e281ef50e019eff0fc53aedf069ac Author: Jacob Keller Date: Thu Apr 13 04:45:46 2017 -0400 i40e: don't hold RTNL lock while waiting for VF reset to finish We made some effort to reduce the RTNL lock scope when resetting and rebuilding the PF. Unfortunately we still held the RTNL lock during the VF reset operation, which meant that multiple PFs could not reset in parallel due to the global lock. For now, further reduce the scope by not holding the RTNL lock while resetting VFs. This allows multiple PFs to reset in a timely manner. Change-ID: I2fbf823a0063f24dff67676cad09f0bbf83ee4ce Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 1d5c960c5ef565bc799a28d1fc4873e124adad6a Author: Jingjing Wu Date: Thu Apr 13 04:45:45 2017 -0400 i40e: new AQ commands Add admin queue functions for Pipeline Personalization Profile AQ commands: - Write Recipe Command buffer (Opcode: 0x0270) - Get Applied Profiles list (Opcode: 0x0271) Change-ID: I558b4145364140f624013af48d4bbf79d21ebb0d Signed-off-by: Jingjing Wu Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 34 ++++ drivers/net/ethernet/intel/i40e/i40e_common.c | 212 +++++++++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_prototype.h | 17 ++ drivers/net/ethernet/intel/i40e/i40e_type.h | 80 ++++++++ .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 34 ++++ drivers/net/ethernet/intel/i40evf/i40e_common.c | 212 +++++++++++++++++++++ drivers/net/ethernet/intel/i40evf/i40e_prototype.h | 17 ++ drivers/net/ethernet/intel/i40evf/i40e_type.h | 80 ++++++++ 8 files changed, 686 insertions(+) commit ed0980c4401a21148d2fb9f4f6dd6132a4cc7599 Author: Scott Peterson Date: Thu Apr 13 04:45:44 2017 -0400 i40e/i40evf: Add tracepoints This patch adds tracepoints to the i40e and i40evf drivers to which BPF programs can be attached for feature testing and verification. It's expected that an attached BPF program will identify and count or log some interesting subset of traffic. The bcc-tools package is helpful there for containing all the BPF arcana in a handy Python wrapper. Though you can make these tracepoints log trace messages, the messages themselves probably won't be very useful (other to verify the tracepoint is being called while you're debugging your BPF program). The idea here is that tracepoints have such low performance cost when disabled that we can leave these in the upstream drivers. This may eventually enable the instrumentation of unmodified customer systems should the need arise to verify a NIC feature is working as expected. In general this enables one set of feature verification tools to be used on these drivers whether they're built with the kernel or separately. Users are advised against using these tracepoints for anything other than a diagnostic tool. They have a performance impact when enabled, and their exact placement and form may change as we see how well they work in practice for the purposes above. Change-ID: Id6014a7322c0e6d08068114dd20bd156f2f6435e Signed-off-by: Scott Peterson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/Makefile | 3 + drivers/net/ethernet/intel/i40e/i40e_main.c | 6 + drivers/net/ethernet/intel/i40e/i40e_trace.h | 229 ++++++++++++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_txrx.c | 9 + drivers/net/ethernet/intel/i40evf/Makefile | 3 + drivers/net/ethernet/intel/i40evf/i40e_trace.h | 229 ++++++++++++++++++++++++ drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 9 + drivers/net/ethernet/intel/i40evf/i40evf_main.c | 7 + 8 files changed, 495 insertions(+) commit 9a87182c4b69f7ca3ce764bbb4f72641e5a3b2b2 Author: Bart Van Assche Date: Wed Apr 19 14:01:28 2017 -0700 block: Optimize ioprio_best() Since ioprio_best() translates IOPRIO_CLASS_NONE into IOPRIO_CLASS_BE and since lower numerical priority values represent a higher priority a simple numerical comparison is sufficient. Signed-off-by: Bart Van Assche Reviewed-by: Adam Manzanares Tested-by: Adam Manzanares Reviewed-by: Christoph Hellwig Cc: Matias Bjørling Signed-off-by: Jens Axboe block/ioprio.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 0be0dee64eacd950f8e4b6c45adb5a92392eaaaf Author: Bart Van Assche Date: Wed Apr 19 14:01:27 2017 -0700 block: Inline blk_rq_set_prio() Since only a single caller remains, inline blk_rq_set_prio(). Initialize req->ioprio even if no I/O priority has been set in the bio nor in the I/O context. Signed-off-by: Bart Van Assche Reviewed-by: Adam Manzanares Tested-by: Adam Manzanares Reviewed-by: Christoph Hellwig Cc: Matias Bjørling Signed-off-by: Jens Axboe block/blk-core.c | 7 ++++++- include/linux/blkdev.h | 14 -------------- 2 files changed, 6 insertions(+), 15 deletions(-) commit 9460e28022ed8e81c2eea2d3e5531eb199cb1475 Author: Bart Van Assche Date: Wed Apr 19 14:01:26 2017 -0700 lightnvm: Use blk_init_request_from_bio() instead of open-coding it This patch changes the behavior of the lightnvm driver as follows: * REQ_FAILFAST_MASK is set for read-ahead requests. * If no I/O priority has been set in the bio, the I/O priority is copied from the I/O context. * The rq_disk member is initialized if bio->bi_bdev != NULL. * The bio sector offset is copied into req->__sector instead of retaining the value -1 set by blk_mq_alloc_request(). * req->errors is initialized to zero. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Matias Bjørling Cc: Adam Manzanares Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 2644a3ccee1e5a86d6581949e5d11bd76b3135a4 Author: Bart Van Assche Date: Wed Apr 19 14:01:25 2017 -0700 null_blk: Use blk_init_request_from_bio() instead of open-coding it This patch changes the behavior of the null_blk driver for the LightNVM mode as follows: * REQ_FAILFAST_MASK is set for read-ahead requests. * If no I/O priority has been set in the bio, the I/O priority is copied from the I/O context. * The rq_disk member is initialized if bio->bi_bdev != NULL. * req->errors is initialized to zero. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Matias Bjørling Cc: Adam Manzanares Signed-off-by: Jens Axboe drivers/block/null_blk.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit da8d7f079b868ceab830309f80efc69d350576f3 Author: Bart Van Assche Date: Wed Apr 19 14:01:24 2017 -0700 block: Export blk_init_request_from_bio() Export this function such that it becomes available to block drivers. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Matias Bjørling Cc: Adam Manzanares Signed-off-by: Jens Axboe block/blk-core.c | 5 +++-- block/blk-mq.c | 2 +- block/blk.h | 1 - include/linux/blkdev.h | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) commit 3118025a070f3346a3f23cbb8e9039ff567a6c46 Author: Mitch Williams Date: Wed Apr 12 07:16:52 2017 -0400 i40e: dump VF information in debugfs Dump some internal state about VFs through debugfs. This provides information not available with 'ip link show'. To use, write "dump vf " to the command file, or just "dump vf" to dump information on all of the VFs. Change-ID: Ibe32b7f4ae55d4358c0b903217475f708ada1ecd Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 51 ++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 0e626ff7ccbfc43c6cc4aeea611c40b899682382 Author: Alexander Duyck Date: Mon Apr 10 05:18:43 2017 -0400 i40e: Fix support for flow director programming status This patch fixes an issue I introduced when I converted the code over to using the length field to determine if a descriptor was done or not. It turns out that we are also processing programming descriptors in the Rx path and need to have these processed even though the length field will be 0 on these packets. What will happen with a programming descriptor is that we will receive a descriptor that has the SPH bit set, and the header length and packet length fields cleared. To account for this we should be checking for the bit for split header being set even though we aren't actually using header split. This bit is set in the length field to indicate if a programming descriptor response is contained in the descriptor. Since we don't support header split we don't need to perform the extra checks of using a fixed value for the entire length field. In addition I am moving the function for checking if a filter is a programming status filter into the i40e_txrx.c file since there is no longer support for FCoE it doesn't make sense to keep this file in i40e.h. Change-ID: I12c359c3dc70adb9d6b92b27324bb2c7f04c1a06 Signed-off-by: Alexander Duyck Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 15 -------- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 50 ++++++++++++++++++++------- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 9 ++--- 3 files changed, 43 insertions(+), 31 deletions(-) commit 53240e99dbbfe69a6b3ca808a6d15eea744be169 Author: alice michael Date: Thu Apr 6 05:59:34 2017 -0400 i40e/i40evf: Remove VF Rx csum offload for tunneled packets Rx checksum offload for tunneled packets was never being negotiated or requested by VF. This capability was assumed by default and enabled in current hardware for VF. Going forward, this feature needs to be disabled or advanced ptypes should be negotiated with PF in the future. Change-ID: I9e54cfa8a90e03ab6956db4412f1e337ccd2c2e0 Signed-off-by: Preethi Banala Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 7 ------- 1 file changed, 7 deletions(-) commit 4a0a3abfd951943f770f5306d32f8640f55568c4 Author: Tobias Klauser Date: Thu Apr 6 08:46:28 2017 +0200 i40evf: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct i40evf_adapter, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf.h | 1 - drivers/net/ethernet/intel/i40evf/i40evf_main.c | 16 ---------------- .../net/ethernet/intel/i40evf/i40evf_virtchnl.c | 22 +++++++++++----------- 3 files changed, 11 insertions(+), 28 deletions(-) commit daf0cd445a218314f9461d67d4f2b9c24cdd534b Author: Cathy Avery Date: Mon Apr 17 14:37:46 2017 -0400 scsi: storvsc: Add support for FC rport. Included in the current storvsc driver for Hyper-V is the ability to access luns on an FC fabric via a virtualized fiber channel adapter exposed by the Hyper-V host. The driver also attaches to the FC transport to allow host and port names to be published under /sys/class/fc_host/hostX. Current customer tools running on the VM require that these names be available in the well known standard location under fc_host/hostX. This patch stubs in an rport per fc_host and sets its rport role as FC_PORT_ROLE_FCP_DUMMY_INITIATOR to indicate to the fc_transport that it is a pseudo rport in order to scan the scsi stack via echo "- - -" > /sys/class/scsi_host/hostX/scan. Signed-off-by: Cathy Avery Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 0c3ae2664766ec892992a686e48ead94784ef54c Author: Cathy Avery Date: Mon Apr 17 14:37:45 2017 -0400 scsi: scsi_transport_fc: Add dummy initiator role to rport This patch allows scsi drivers that expose virturalized fibre channel devices but that do not expose rports to successfully rescan the scsi bus via echo "- - -" > /sys/class/scsi_host/hostX/scan. Drivers can create a pseudo rport and indicate FC_PORT_ROLE_FCP_DUMMY_INITIATOR as the rport's role in fc_rport_identifiers. This insures that a valid scsi_target_id is assigned to the newly created rport and it can meet the requirements of fc_user_scan_tgt calling scsi_scan_target. Signed-off-by: Cathy Avery Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_fc.c | 10 ++++++---- include/scsi/scsi_transport_fc.h | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) commit 25d1d50e23275e141e3a3fe06c25a99f4c4bf4e0 Author: David Gibson Date: Thu Apr 13 12:13:00 2017 +1000 scsi: virtio_scsi: Always try to read VPD pages Passed through SCSI targets may have transfer limits which come from the host SCSI controller or something on the host side other than the target itself. To make this work properly, the hypervisor can adjust the target's VPD information to advertise these limits. But for that to work, the guest has to look at the VPD pages, which we won't do by default if it is an SPC-2 device, even if it does actually support it. This adds a workaround to address this, forcing devices attached to a virtio-scsi controller to always check the VPD pages. This is modelled on a similar workaround for the storvsc (Hyper-V) SCSI controller, although that exists for slightly different reasons. A specific case which causes this is a volume from IBM's IPR RAID controller (which presents as an SPC-2 device, although it does support VPD) passed through with qemu's 'scsi-block' device. [mkp: fixed typo] Signed-off-by: David Gibson Acked-by: Paolo Bonzini Signed-off-by: Martin K. Petersen drivers/scsi/virtio_scsi.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit da4b1caa49cbfac4e5be2c4b080b8d01b04358dd Author: Rafał Miłecki Date: Thu Mar 30 17:58:53 2017 +0200 mtd: physmap_of: use OF helpers for reading strings OF core code provides helpers for counting strings and reading them so use them instead of doing this manually. This simplifies the code a bit. Signed-off-by: Rafał Miłecki Reviewed-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/maps/physmap_of_core.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) commit 7a2765f6e82063f348ebce78c28eceff741689d4 Author: Dan Williams Date: Thu Jan 26 13:54:35 2017 -0800 dcssblk: add dax_operations support Setup a dax_dev to have the same lifetime as the dcssblk block device and add a ->direct_access() method that is equivalent to dcssblk_direct_access(). Once fs/dax.c has been converted to use dax_operations the old dcssblk_direct_access() will be removed. Reported-by: Gerald Schaefer Acked-by: Gerald Schaefer Signed-off-by: Dan Williams drivers/s390/block/Kconfig | 1 + drivers/s390/block/dcssblk.c | 55 ++++++++++++++++++++++++++++++++++++-------- 2 files changed, 47 insertions(+), 9 deletions(-) commit 1647b9b959c7b1b3c20e8efa2c40529e7dce756a Author: Dan Williams Date: Wed Jan 25 16:54:45 2017 -0800 brd: add dax_operations support Setup a dax_inode to have the same lifetime as the brd block device and add a ->direct_access() method that is equivalent to brd_direct_access(). Once fs/dax.c has been converted to use dax_operations the old brd_direct_access() will be removed. Signed-off-by: Dan Williams drivers/block/Kconfig | 1 + drivers/block/brd.c | 65 ++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 55 insertions(+), 11 deletions(-) commit 60fcd55cc236dbb3d6587f48120f00f59cb08540 Author: Dan Williams Date: Wed Jan 25 15:25:11 2017 -0800 axon_ram: add dax_operations support Setup a dax_device to have the same lifetime as the axon_ram block device and add a ->direct_access() method that is equivalent to axon_ram_direct_access(). Once fs/dax.c has been converted to use dax_operations the old axon_ram_direct_access() will be removed. Reported-by: Gerald Schaefer Signed-off-by: Dan Williams arch/powerpc/platforms/Kconfig | 1 + arch/powerpc/sysdev/axonram.c | 48 ++++++++++++++++++++++++++++++++++++------ 2 files changed, 43 insertions(+), 6 deletions(-) commit c1d6e828a35df524df2af277eedd1471d05e4f4c Author: Dan Williams Date: Tue Jan 24 23:02:09 2017 -0800 pmem: add dax_operations support Setup a dax_device to have the same lifetime as the pmem block device and add a ->direct_access() method that is equivalent to pmem_direct_access(). Once fs/dax.c has been converted to use dax_operations the old pmem_direct_access() will be removed. Signed-off-by: Dan Williams drivers/dax/dax.h | 7 ----- drivers/nvdimm/Kconfig | 1 + drivers/nvdimm/pmem.c | 61 ++++++++++++++++++++++++++++++++--------- drivers/nvdimm/pmem.h | 7 +++-- include/linux/dax.h | 6 ++++ tools/testing/nvdimm/pmem-dax.c | 21 +++++++------- 6 files changed, 70 insertions(+), 33 deletions(-) commit 6568b08b77816cda2a95919c7494108d983d5941 Author: Dan Williams Date: Tue Jan 24 18:44:18 2017 -0800 dax: introduce dax_operations Track a set of dax_operations per dax_device that can be set at alloc_dax() time. These operations will be used to stop the abuse of block_device_operations for communicating dax capabilities to filesystems. It will also be used to replace the "pmem api" and move pmem-specific cache maintenance, and other dax-driver-specific filesystem-dax operations, to dax device methods. In particular this allows us to stop abusing __copy_user_nocache(), via memcpy_to_pmem(), with a driver specific replacement. This is a standalone introduction of the operations. Follow on patches convert each dax-driver and teach fs/dax.c to use ->direct_access() from dax_operations instead of block_device_operations. Suggested-by: Christoph Hellwig Signed-off-by: Dan Williams drivers/dax/dax.h | 4 +++- drivers/dax/device.c | 6 +++++- drivers/dax/super.c | 6 +++++- include/linux/dax.h | 10 ++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) commit 72058005411ffddcae6c06f7b691d635489132af Author: Dan Williams Date: Wed Apr 19 15:14:31 2017 -0700 dax: add a facility to lookup a dax device by 'host' device name For the current block_device based filesystem-dax path, we need a way for it to lookup the dax_device associated with a block_device. Add a 'host' property of a dax_device that can be used for this purpose. It is a free form string, but for a dax_device associated with a block device it is the bdev name. This is a stop-gap until filesystems are able to mount on a dax-inode directly. Signed-off-by: Dan Williams drivers/dax/dax.h | 2 +- drivers/dax/device.c | 2 +- drivers/dax/super.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++--- include/linux/dax.h | 1 + 4 files changed, 86 insertions(+), 6 deletions(-) commit bafdcde73be7d462129cecfc339d3a6abcba91d2 Author: Johan Hovold Date: Mon Apr 10 13:38:25 2017 +0200 PM / runtime: Document autosuspend-helper side effects Document the fact that the autosuspend delay and enable helpers may change the power.usage_count and resume or suspend a device depending on the values of power.autosuspend_delay and power.use_autosuspend. Note that this means that a driver must disable autosuspend before disabling runtime pm on probe errors and on driver unbind if the device is to be suspended upon return (as a negative delay may otherwise keep the device resumed). Signed-off-by: Johan Hovold Acked-by: Tony Lindgren Signed-off-by: Rafael J. Wysocki Documentation/power/runtime_pm.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 72ec2e17f9f7f7f6082ec57183080726eb3523e3 Author: Johan Hovold Date: Mon Apr 10 13:38:24 2017 +0200 PM / runtime: Fix autosuspend documentation Update the autosuspend documentation which claimed that the autosuspend delay is not taken into account when using the non-autosuspend helper functions, something which is no longer true since commit d66e6db28df3 ("PM / Runtime: Respect autosuspend when idle triggers suspend"). This specifically means that drivers must now disable autosuspend before disabling runtime pm in probe error paths and remove callbacks if pm_runtime_put_sync was being used to suspend the device before returning. (If an idle callback can prevent suspend, pm_runtime_put_sync_suspend must be used instead of pm_runtime_put_sync as before.) Also remove the claim that the autosuspend helpers behave "just like the non-autosuspend counterparts", something which have never really been true as some of the latter use idle notifications. Signed-off-by: Johan Hovold Acked-by: Tony Lindgren Signed-off-by: Rafael J. Wysocki Documentation/power/runtime_pm.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 22440373e11ad3fba0b33a9bded1531469a72551 Author: Todd E Brandt Date: Fri Apr 7 11:05:37 2017 -0700 tools: power: pm-graph: Package makefile and man pages BootGraph and SleepGraph man pages - includes full descriptions of tool arguments and commands - includes examples of common use cases Makefile - no build required, used only for install - installs man pages and tools as libraries with links - includes an uninstall Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki tools/power/pm-graph/Makefile | 28 +++++ tools/power/pm-graph/bootgraph.8 | 132 +++++++++++++++++++++ tools/power/pm-graph/sleepgraph.8 | 243 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 403 insertions(+) commit c4980cee82efb4fef8afac3675cb25fba3baca34 Author: Todd E Brandt Date: Fri Apr 7 11:05:36 2017 -0700 tools: power: pm-graph: AnalyzeBoot v2.0 First release into the kernel tools source - pulls in analyze_suspend.py as as library, same html formatting - supplants scripts/bootgraph.pl, outputs HTML instead of SVG - enables automatic reboot and collection for easy timeline capture - enables ftrace callgraph collection from early boot Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki tools/power/pm-graph/analyze_boot.py | 824 +++++++++++++++++++++++++++++++++++ 1 file changed, 824 insertions(+) commit bc167c7de8886f08b3d8266b176eefaa9f22cd80 Author: Todd E Brandt Date: Fri Apr 7 11:05:35 2017 -0700 tools: power: pm-graph: AnalyzeSuspend v4.6 Moved from scripts into tools, and updated from 4.5 to 4.6 - Changed the tool title to SleepGraph - Reformatted the code so analyze_suspend can be used as a library - Reorganized all html/js/css handling code to be used by other tools - upgraded the -summary feature to work faster with better readability Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki scripts/analyze_suspend.py | 5235 ------------------------------ tools/power/pm-graph/analyze_suspend.py | 5309 +++++++++++++++++++++++++++++++ 2 files changed, 5309 insertions(+), 5235 deletions(-) commit 939dc6f51e90c95a7d88034da48b747f01873bce Author: Mikko Perttunen Date: Tue Apr 11 11:09:15 2017 +0300 cpufreq: Add Tegra186 cpufreq driver Add a new cpufreq driver for Tegra186 (and likely later). The CPUs are organized into two clusters, Denver and A57, with two and four cores respectively. CPU frequency can be adjusted by writing the desired rate divisor and a voltage hint to a special per-core register. The frequency of each core can be set individually; however, this is just a hint as all CPUs in a cluster will run at the maximum rate of non-idle CPUs in the cluster. Signed-off-by: Mikko Perttunen Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/Kconfig.arm | 6 + drivers/cpufreq/Makefile | 1 + drivers/cpufreq/tegra186-cpufreq.c | 275 +++++++++++++++++++++++++++++++++++++ 3 files changed, 282 insertions(+) commit eafca851639038a7863910e7fac869f5c8bdfb9d Author: Christophe Jaillet Date: Sun Apr 9 09:33:52 2017 +0200 cpufreq: imx6q: Fix error handling code According to the previous error handling code, it is likely that 'goto out_free_opp' is expected here in order to avoid a memory leak in error handling path. Signed-off-by: Christophe JAILLET Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/imx6q-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5aa1599ff039a68a5c43e9aa74973f40b1065746 Author: Leonard Crestez Date: Tue Apr 4 20:04:12 2017 +0300 cpufreq: imx6q: Set max suspend_freq to avoid changes during suspend If the cpufreq driver tries to modify voltage/freq during suspend/resume it might need to control an external PMIC via I2C or SPI but those devices might be already suspended. This issue is likely to happen whenever the LDOs have their vin-supply set. To avoid this scenario we just increase cpufreq to the maximum before suspend. Signed-off-by: Leonard Crestez Reviewed-by: Lucas Stach Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/imx6q-cpufreq.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 54cad2fce71f3ed2995bfc6d17d4ea5c898f20b1 Author: Irina Tirdea Date: Tue Apr 4 20:04:11 2017 +0300 cpufreq: imx6q: Fix handling EPROBE_DEFER from regulator If there are any errors in getting the cpu0 regulators, the driver returns -ENOENT. In case the regulators are not yet available, the devm_regulator_get calls will return -EPROBE_DEFER, so that the driver can be probed later. If we return -ENOENT, the driver will fail its initialization and will not try to probe again (when the regulators become available). Return the actual error received from regulator_get in probe. Print a differentiated message in case we need to probe the device later and in case we actually failed. Also add a message to inform when the driver has been successfully registered. Signed-off-by: Irina Tirdea Signed-off-by: Leonard Crestez Reviewed-by: Lucas Stach Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/imx6q-cpufreq.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 0baa91cb73e296242edad89cfe3f60c59ab8a95a Author: Anton Blanchard Date: Tue Apr 4 07:54:14 2017 +1000 cpuidle: powernv: Avoid a branch in the core snooze_loop() loop When in the snooze_loop() we want to take up the least amount of resources. On my version of gcc (6.3), we end up with an extra branch because it predicts snooze_timeout_en to be false, whereas it is almost always true. Use likely() to avoid the branch and be a little nicer to the other non idle threads on the core. Signed-off-by: Anton Blanchard Reviewed-by: Vaidyanathan Srinivasan Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle-powernv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26eb48a9faf241abd60aa546e6beb896011667c1 Author: Anton Blanchard Date: Tue Apr 4 07:54:13 2017 +1000 cpuidle: powernv: Don't continually set thread priority in snooze_loop() The powerpc64 kernel exception handlers have preserved thread priorities for a long time now, so there is no need to continually set it. Just set it once on entry and once exit. Signed-off-by: Anton Blanchard Reviewed-by: Vaidyanathan Srinivasan Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle-powernv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79b578111febef642143669254b243ffbcf64ea9 Author: Anton Blanchard Date: Tue Apr 4 07:54:12 2017 +1000 cpuidle: powernv: Don't bounce between low and very low thread priority The core of snooze_loop() continually bounces between low and very low thread priority. Changing thread priorities is an expensive operation that can negatively impact other threads on a core. All CPUs that can run PowerNV support very low priority, so we can avoid the change completely. Signed-off-by: Anton Blanchard Reviewed-by: Vaidyanathan Srinivasan Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle-powernv.c | 1 - 1 file changed, 1 deletion(-) commit 02018b3929a23acdd452b986e7c8aeca4529d492 Author: Marcin Nowakowski Date: Wed Apr 19 13:20:54 2017 +0200 cpuidle: cpuidle-cps: remove unused variable 'core' in cps_cpuidle_init has never been used and is unnecessary, so remove the dead code. Signed-off-by: Marcin Nowakowski Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle-cps.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c381fc3a1bbfc9d780048a0b94afd162e4c3815b Author: Rafael J. Wysocki Date: Mon Apr 17 01:20:48 2017 +0200 ACPI / scan: Avoid enumerating devices more than once acpi_bus_attach() does not check the visited flag for devices that have been enumerated already and some of them may be enumerated for multiple times as a result, because some callers of acpi_bus_scan() don't check the visited flag either. For this reason, modify acpi_bus_attach() to check the visited flag and avoid enumerating devices that have already been enumerated. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg Reviewed-by: Joey Lee drivers/acpi/scan.c | 2 ++ 1 file changed, 2 insertions(+) commit f5beabfe61794d9a9d9549d387cda2bffd81e504 Author: Rafael J. Wysocki Date: Mon Apr 17 01:19:50 2017 +0200 ACPI / scan: Apply default enumeration to devices with ACPI drivers The current code in acpi_bus_attach() is inconsistent with respect to device objects with ACPI drivers bound to them, as it allows ACPI drivers to bind to device objects with existing "physical" device companions, but it doesn't allow "physical" device objects to be created for ACPI device objects with ACPI drivers bound to them. Thus, in some cases, the outcome depends on the ordering of events which is confusing at best. For this reason, modify acpi_bus_attach() to call acpi_default_enumeration() for device objects with the pnp.type.platform_id flag set regardless of whether or not any ACPI drivers are bound to them. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg Reviewed-by: Joey Lee drivers/acpi/scan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d313876925f3e7a480a02773fd333bcab9202d5e Author: Carlo Caione Date: Wed Apr 19 22:36:39 2017 +0200 platform/x86: hp-wmi: Do not shadow error values All the helper functions (i.e. hp_wmi_dock_state, hp_wmi_tablet_state, ...) using hp_wmi_perform_query to perform an HP WMI query shadow the returned value in case of error. We return -EINVAL only when the HP WMI query returns a positive value (the specific error code) to not mix this up with the actual value returned by the helper function. Suggested-by: Andy Shevchenko Signed-off-by: Carlo Caione Signed-off-by: Darren Hart (VMware) drivers/platform/x86/hp-wmi.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 6c4c9a9a4a294a2e85784d0eaf6a4f833ee99752 Author: Hans de Goede Date: Wed Apr 19 14:02:12 2017 +0200 power: supply: axp288_charger: Only wait for INT3496 device if present On some devices with an axp288 pmic setting vbus path based on the id-pin is handled by an ACPI _AIE interrupt on the gpio and the INT3496 device is disabled. Instead of returning -EPROBE_DEFER on these devices waiting for the never to show up INT3496 device, check for its presence and only request and monitor the matching extcon if the device is there, otherwise let the firmware handle the vbus path control. Signed-off-by: Hans de Goede Acked-by: Sebastian Reichel Signed-off-by: Rafael J. Wysocki drivers/power/supply/axp288_charger.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit af3ec837b84befedde35a2239f873f6cd7c09e68 Author: Hans de Goede Date: Wed Apr 19 14:02:11 2017 +0200 ACPI / AC: Add a blacklist with PMIC ACPI HIDs with a native charger driver On some systems we have a native PMIC driver which provides Mains monitoring, while the ACPI ac driver is broken on these systems due to bad DSTDs or because we do not support the proprietary and undocumented ACPI opregions these ACPI battery devices rely on (e.g. BMOP opregion). This leads for example to a ADP1 power_supply which reports itself as always online even if no mains are connected. This commit adds a blacklist with PMIC ACPI HIDs for which we've a native charger or extcon driver and makes the ACPI ac driver not register itself when a PMIC on this list is present. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/ac.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit dccfae6d4f4c2cfa1fdc3bf55755fcad02184b99 Author: Hans de Goede Date: Wed Apr 19 14:02:10 2017 +0200 ACPI / battery: Add a blacklist with PMIC ACPI HIDs with a native battery driver On some systems we have a native PMIC driver which provides battery monitoring, while the ACPI battery driver is broken on these systems due to bad DSDTs or because we do not support the proprietary and undocumented ACPI opregions these ACPI battery devices rely on (e.g. BMOP opregion). This leads to there being 2 battery power_supply-s registed like this: ~$ acpi Battery 0: Charging, 84%, 00:49:39 until charged Battery 1: Unknown, 0%, rate information unavailable Even if the ACPI battery where to function fine (which on systems where we have a native PMIC driver it often doesn't) we still do not want to export the same battery to userspace twice. This commit adds a blacklist with PMIC ACPI HIDs for which we've a native battery driver and makes the ACPI battery driver not register itself when a PMIC on this list is present. Link: https://bugzilla.kernel.org/show_bug.cgi?id=194811 Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/battery.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit bc39fbcf9c782970263bdc5b428e4a755db16efb Author: Hans de Goede Date: Wed Apr 19 14:02:09 2017 +0200 ACPI / battery: Fix acpi_battery_exit on acpi_battery_init_async errors The acpi_lock_battery_dir() / acpi_bus_register_driver() calls in acpi_battery_init_async() may fail. Check that they succeeded before undoing them. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/battery.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 8661423eea1a1b58417014716e3f1ba286072379 Author: Hans de Goede Date: Wed Apr 19 14:02:08 2017 +0200 ACPI / utils: Add new acpi_dev_present helper acpi_dev_found just iterates over all ACPI-ids and sees if one matches. This means that it will return true for devices which are in the DSDT but disabled (their _STA method returns 0). For some drivers it is useful to be able to check if a certain HID is not only present in the namespace, but also actually present as in acpi_device_is_present() will return true for the device. For example because if a certain device is present then the driver will want to use an extcon or IIO ADC channel provided by that device. This commit adds a new acpi_dev_present helper which drivers can use to this end. Like acpi_dev_found, acpi_dev_present take a HID as argument, but it also has 2 extra optional arguments to only check for an ACPI device with a specific UID and/or HRV value. This makes it more generic and allows it to replace custom code doing similar checks in several places. Arguably acpi_dev_present is what acpi_dev_found should have been, but there are too many users to just change acpi_dev_found without the risk of breaking something. Signed-off-by: Hans de Goede Reviewed-by: Lukas Wunner Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/acpi/utils.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ include/acpi/acpi_bus.h | 1 + include/linux/acpi.h | 5 ++++ 3 files changed, 72 insertions(+) commit 592c8095b834c86b0cc780de6501d156e0e92e36 Author: Dmitry Frank Date: Wed Apr 19 13:36:18 2017 +0300 ACPI / video: add comments about subtle cases The comment for acpi_video_bqc_quirk is by Felipe Contreras, taken from the git history. Signed-off-by: Dmitry Frank Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_video.c | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) commit b3bb6d6a0fe1c893fbcaaac8bf97c49f6ec6684e Author: Cyrille Pitchen Date: Wed Apr 19 22:43:52 2017 +0200 MAINTAINERS: change email address from atmel.com to wedev4u.fr Switch to my alternative address as primary address. Signed-off-by: Cyrille Pitchen Signed-off-by: Brian Norris MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4a8aad8e070e54e486666cc8bb97d69dc81adfb Author: Geliang Tang Date: Tue Dec 20 21:54:33 2016 +0800 mtd: mtdswap: use MTDSWAP_ECNT_MIN/MAX Since macros MTDSWAP_ECNT_MIN() and MTDSWAP_ECNT_MAX() have been defined in mtdswap.c, use them instead of open-coding. Signed-off-by: Geliang Tang Acked-by: Marek Vasut Signed-off-by: Brian Norris drivers/mtd/mtdswap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e8348dc554f108f603101bc49ff897f0c9313c23 Author: Joe Perches Date: Thu Feb 16 23:11:37 2017 -0800 drivers/mtd: Convert remaining uses of pr_warning to pr_warn To enable eventual removal of pr_warning This makes pr_warn use consistent for drivers/mtd Prior to this patch, there were 7 uses of pr_warning and 31 uses of pr_warn in drivers/mtd Signed-off-by: Joe Perches Signed-off-by: Brian Norris drivers/mtd/chips/cfi_cmdset_0002.c | 12 ++++++++---- drivers/mtd/nand/cmx270_nand.c | 4 ++-- drivers/mtd/ofpart.c | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) commit a897bf138c9b4435e17444efcc8269e9577f5165 Author: Alexandre Belloni Date: Wed Apr 19 22:05:48 2017 +0200 rtc: m41t80: Add proper compatible for rv4162 The correct compatible for the rv4162 (microcrystal,rv4162) was not used upstream and so was not added by eb235c561d04e. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 5 +++++ 1 file changed, 5 insertions(+) commit d1c7073bce91fec5af71a8026636a0735f0c867c Author: Michał Kępień Date: Fri Apr 7 15:07:13 2017 +0200 platform/x86: fujitsu-laptop: simplify error handling in acpi_fujitsu_laptop_add() As LED class devices registered by fujitsu-laptop no longer depend on the platform device, two function calls inside acpi_fujitsu_laptop_add() can be rearranged in order to simplify error handling. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 30943e1484aab78d83ddfb706bca65c5d8092bfb Author: Michał Kępień Date: Fri Apr 7 15:07:12 2017 +0200 platform/x86: fujitsu-laptop: do not log LED registration failures If acpi_fujitsu_laptop_leds_register() returns an error, the latter will become the return value of acpi_fujitsu_laptop_add(), which in turn will be reported by driver core. Simplify code by replacing pr_err() calls with return statements. Return 0 instead of result when no errors occur in order to make the code easier to read. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 81f6821f3f7e231b83dca1fb44bf9ddaa3313421 Author: Michał Kępień Date: Fri Apr 7 15:07:11 2017 +0200 platform/x86: fujitsu-laptop: switch to managed LED class devices Use devm_led_classdev_register() for registering LED class devices in order to simplify cleanup and remove LED-related fields with the "_registered" suffix from struct fujitsu_laptop. This also fixes a cleanup bug: with non-managed LED class devices, if e.g. two supported LEDs are detected, the first one gets registered successfully but the second one does not, acpi_fujitsu_laptop_add() will return an error, but the successfully registered LED will never get unregistered. Change the parent device for LED class devices to the FUJ02E3 ACPI device due to this being the logically correct relationship as LED class devices do not depend on any facility provided by the platform device registered by fujitsu-laptop, which was their parent until now. Each managed LED class device is automatically unregistered when the last reference to its parent device is dropped. Taking the parent change described above into account, LED class devices registered by fujitsu-laptop will be unregistered after acpi_fujitsu_laptop_remove() is called. During unregistration, LED brightness is reset to LED_OFF by LED core, so do not set the acpi_handle field of struct fujitsu_laptop to NULL inside acpi_fujitsu_laptop_remove() to prevent call_fext_func() from generating errors upon module removal. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 55 +++++++---------------------------- 1 file changed, 11 insertions(+), 44 deletions(-) commit e33ca45ca8fe130d10dda07391c967a8a3851f3a Author: Michał Kępień Date: Fri Apr 7 15:07:10 2017 +0200 platform/x86: fujitsu-laptop: reorganize LED-related code Move around LED definitions and callbacks to eliminate the need for forward declarations and ensure code is organized LED-wise, not action-wise. Reorder assignments inside designated initializers so that they are in the same order as struct led_classdev fields in include/linux/leds.h. Adjust whitespace to make checkpatch happy. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 261 ++++++++++++++++------------------ 1 file changed, 124 insertions(+), 137 deletions(-) commit 7adb7b129ac0359b49a8406376a5aee8ce754b97 Author: Michał Kępień Date: Fri Apr 7 15:07:09 2017 +0200 platform/x86: fujitsu-laptop: refactor LED registration Move a long section of code responsible for registering LEDs out of acpi_fujitsu_laptop_add() to improve readability and ensure proper cleanup of platform device and kfifo e.g. when two supported LEDs are detected, the first one gets registered successfully but the second one does not. This makes the result variable in acpi_fujitsu_laptop_add() redundant, so remove it. Adjust whitespace to make checkpatch happy. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 128 +++++++++++++++++++--------------- 1 file changed, 70 insertions(+), 58 deletions(-) commit d89bcc83e7090ac09c3f9712d9b9db9f1f1d8189 Author: Michał Kępień Date: Fri Apr 7 15:07:08 2017 +0200 platform/x86: fujitsu-laptop: select LEDS_CLASS Follow common subsystem practice of selecting LEDS_CLASS instead of riddling module code with #ifdefs. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/Kconfig | 2 +- drivers/platform/x86/fujitsu-laptop.c | 14 +------------- 2 files changed, 2 insertions(+), 14 deletions(-) commit f4d1047914ea05e0f8393944da18f6ee5dad24c4 Author: Liad Kaufman Date: Sun Feb 19 10:42:40 2017 +0200 iwlwifi: a000: fix memory offsets and lengths Memory offsets and lengths for A000 HW is different than currently specified. Fixes: e34d975e40ff ("iwlwifi: Add a000 HW family support") Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 730a18912bcbde0b94ae7f1b554a9908b3424a22 Author: Sara Sharon Date: Tue Feb 7 18:37:40 2017 +0200 iwlwifi: mvm: support changing band for phy context In a000 CDB firmware, we cannot update phy context to a different band - we must first remove it and add it again. Support this flow for all a000 devices since we may have various combinations that cause us to fail regardless if CDB is active. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) commit 9dfa21517a75d6c06d9e9a92814101eaebba168b Author: Sara Sharon Date: Tue Feb 14 14:58:21 2017 +0200 iwlwifi: mvm: flip address 4 of AMSDU frames Address 4 is reversed as well. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 2220fb2960b72915e7fd9da640a4695dceff238c Author: Emmanuel Grumbach Date: Mon Feb 13 11:29:16 2017 +0200 iwlwifi: split the handler and the wake parts of the notification infra The notification infrastructure (iwl_notification_wait_* functions) allows to wait until a list of notifications will come up from the firmware and to run a special handler (notif_wait handler) when those are received. The operation mode notifies the notification infrastructure about any Rx being received by the mean of iwl_notification_wait_notify() which will do two things: 1) call the notif_wait handler 2) wakeup the thread that was waiting for the notification Typically, only after those two steps happened, the operation mode will run its own handler for the notification that was received from the firmware. This means that the thread that was waiting for that notification can be running before the operation mode's handler was called. When the operation mode's handler is ASYNC, things get even worse since the thread that was waiting for the notification isn't even guaranteed that the ASYNC callback was added to async_handlers_list before it starts to run. This means that even calling iwl_mvm_wait_for_async_handlers() can't guarantee that absolutely everything related to that notification has run. The following can happen: Thread sending the command Operation mode's Rx path -------------------------- ------------------------ iwl_init_notification_wait() iwl_mvm_send_cmd() iwl_mvm_rx_common() iwl_notification_wait_notify() iwl_mvm_wait_for_async_handlers() // Possibly free some data // structure list_add_tail(async_handlers_list); schedule_work(async_handlers_wk); // Access the freed structure Split the 'run notif_wait's handler' and the 'wake up the thread' parts to fix this. This allows the operation mode to do the following: Thread sending the command Operation mode's Rx path -------------------------- ------------------------ iwl_init_notification_wait() iwl_mvm_send_cmd() iwl_mvm_rx_common() iwl_notification_wait() // Will run the notif_wait's handler list_add_tail(async_handlers_list); schedule_work(async_handlers_wk); iwl_notification_notify() iwl_mvm_wait_for_async_handlers() This way, the waiter is guaranteed that all the handlers have been run (if SYNC), or at least enqueued (if ASYNC) by the time it wakes up. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/iwl-notif-wait.c | 10 ++++----- .../net/wireless/intel/iwlwifi/iwl-notif-wait.h | 25 +++++++++++++++++----- 2 files changed, 24 insertions(+), 11 deletions(-) commit cb2de6bb4f129683673da907b71344d59a38c55a Author: Sara Sharon Date: Mon Feb 13 13:36:31 2017 +0200 iwlwifi: mvm: dump frames early on invalid rate Currently when rate isn't found (invalid rate or CCK rate in high band) driver is assigning rate -1, which causes mac80211 to dump it later with the cryptic rate value of 0xFF. Instead, warn early and dump the frame in mvm. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 13 ++++++++++--- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 18 +++++++++++++----- 2 files changed, 23 insertions(+), 8 deletions(-) commit bc0294696456365f1e80fa8a0a6e13d076316b30 Author: Sara Sharon Date: Mon Feb 13 13:17:11 2017 +0200 iwlwifi: mvm: disable RX queue notification for a000 devices For a000 devices, we don't really have multi RX queue for now, until we have the RX queue configuration API. Disable RX queue notification for now. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4399caaa70bb30f538fc0c3b08a7a8f128ca5f12 Author: Sara Sharon Date: Sun Dec 11 10:32:42 2016 +0200 iwlwifi: mvm: support init extended command When we load firmware in extended mode (as we do by default for now) driver should send a command what kind of commands ucode should stop and wait for before proceeding with phy calibrations. Support this command. Currently we only do NVM access - so mark this bit only. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 23 +++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 15 +++++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 + 3 files changed, 39 insertions(+) commit a6bff3cb19b7d57e297a11d844ffb71be9fd9d80 Author: Haim Dreyfuss Date: Thu Jan 19 12:00:46 2017 +0200 iwlwifi: mvm: add GEO_TX_POWER_LIMIT cmd for geographic tx power table To utilize the maximum allowed tx power, an additional table was added to the BIOS. The table consists of up to seven different regions (currently only three are in use). Each region contains per band: 1. Maximum allowed tx power on the band. 2. Tx power offset for chain A. 3. Tx power offset for chain B. On init flow driver reads this table by means of ACPI and passes it to the firmware with GEO_TX_POWER_LIMIT cmd. The firmware will use this table to enhance tx power with the offset in the relevant table as well as verifying it does not violate the maximum allowed tx power. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/mvm/fw-api-power.h | 43 +++++++- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 112 +++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 5 + drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 + 5 files changed, 160 insertions(+), 2 deletions(-) commit 528709b081dbf2bc86de072280a11634918c1e53 Author: Luca Coelho Date: Mon Feb 13 09:48:17 2017 +0200 iwlwifi: pcie: remove RSA race workaround This workaround is not needed anymore. Remove it. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 46 ------------------------- 1 file changed, 46 deletions(-) commit 386f49361a356f3f5c6afe076b9a61b54ac16a3f Author: Sara Sharon Date: Sun Jan 22 17:17:19 2017 +0200 iwlwifi: support a000 CDB product Identify and load FW for a000 CDB product. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 20 ++++++++++++++++---- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 5 ++++- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 7 ++++--- 3 files changed, 24 insertions(+), 8 deletions(-) commit fa1f2b617a94ff734fe2d5136bbda4e4f2d22635 Author: Sara Sharon Date: Thu Jan 26 12:40:25 2017 +0200 iwlwifi: mvm: support change to a000 smem API API was changed once more to support 2 LMACs. Adapt to change while preserving current functionality. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 2 + drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 41 +++- drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 287 ++++++++++++++---------- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 53 +++-- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 11 +- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 2 +- 6 files changed, 241 insertions(+), 155 deletions(-) commit f27588938a585d38f2ed9e7398b24d0a2b421abf Author: Tzipi Peres Date: Sun Feb 12 11:08:08 2017 +0200 iwlwifi: add four new 8265 and 8275 series PCI IDs Add one new PCI ID for the 8265 series. Add three new PCI ID for the 8275 series. Signed-off-by: Tzipi Peres Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 4 ++++ 1 file changed, 4 insertions(+) commit e71ca5ea7466a7a38bb6cd83388623e47f62467b Author: Emmanuel Grumbach Date: Wed Feb 8 14:53:32 2017 +0200 iwlwifi: mvm: provide the actual number of frames for the SP len In the end, the firmware doesn't want the SP len as present in the WMM IE, but rather the actual number of frames. Fixes: bd3c6cf901a8 ("iwlwifi: mvm: tell the firmware about the U-APSD parameters") Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d43eab6632df3a5b5bfc79025860dc4583ed0f4 Author: Sara Sharon Date: Thu Feb 2 12:51:39 2017 +0200 iwlwifi: mvm: ignore BAID for SN smaller than SSN When we get SN that is smaller than SSN of the aggregation, we shouldn't apply any reordering on them. Further more, HW NSSN will be zeroed, which can cause us to make some invalid decisions. Detect the situation and invalidate the BAID. Fixes: b915c10174fb ("iwlwifi: mvm: add reorder buffer per queue") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 30 +++++++++++++++++++++------ drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 1 + 3 files changed, 27 insertions(+), 6 deletions(-) commit 0f17e1bb8447f1cd2228c363a86c36340b87fa08 Author: David Spinadel Date: Wed Jan 4 09:30:24 2017 +0200 iwlwifi: mvm: change TX_CMD_SEC_KEY_FROM_TABLE value Change the value of TX_CMD_SEC_KEY_FROM_TABLE flag in TX_CMD security flags to accommodate a FW API change. Bump min API for 9000 series devices to 30 to keep the driver aligned aligned the FW. Signed-off-by: David Spinadel Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a56cb4f0d826359d98adf12cb5e0a2de35e8aa59 Author: Sara Sharon Date: Tue Jan 31 14:36:10 2017 +0200 iwlwifi: mvm: work around HW issue with AMSDU de-aggregation Seems like HW is reversing addr3 in the MAC header of de-aggregated AMSDU. Reverse it back. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 7 +++++++ 1 file changed, 7 insertions(+) commit bbf049d92a718ddba70d72388dcdea5304a3f723 Author: Sara Sharon Date: Thu May 19 16:19:22 2016 +0300 iwlwifi: mvm: do not turn on RX_FLAG_AMSDU_MORE This flag is used for mac80211 reordering. As we do reordering ourselves, turning it on is misleading and pointless. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 3 --- 1 file changed, 3 deletions(-) commit 5a4aa895521bb0f7148e34de69059799f9cb1690 Author: Liad Kaufman Date: Wed Feb 1 16:21:32 2017 +0200 iwlwifi: mvm: remove unneeded reg write in iwl_mvm_up() Not only that this write is not needed (as FW does this itself), on newer HW this register is write protected so trying to write there will cause problems. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 3 --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 4 ---- 2 files changed, 7 deletions(-) commit 310181ec34e20134dc1b1c8b5e62605af83b1777 Author: Sara Sharon Date: Tue Jan 17 14:27:48 2017 +0200 iwlwifi: move to TVQM mode In TVQM firmware returns the value of the queue ID and code should accept it. The TX queue config API was changed. Move to new API. This has to be done in parallel in mvm and pcie. Do not move yet to 512 queues since there are some opens with enabling it. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 38 ++++--- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 + drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 124 ++++++++++++++++------ drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 63 +++++++---- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 70 +++++++----- 5 files changed, 202 insertions(+), 96 deletions(-) commit 12db294c7872eeb0e3ff595cd985e369325dde0e Author: Sara Sharon Date: Tue Jan 17 14:28:21 2017 +0200 iwlwifi: mvm: support new TX response for TVQM In TVQM mode the TX responses were changed to include queue number since legacy TX queue number retrieval cannot be scaled up to 512 queues. Support this change. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 42 ++++++++++------------ drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 4 ++- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 10 ++++++ drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 34 +++++++++++++++--- 4 files changed, 61 insertions(+), 29 deletions(-) commit b8e8d7cee32291a0cfdf813e45317b9d4d1b9574 Author: Sara Sharon Date: Tue Jan 17 14:14:29 2017 +0200 iwlwifi: pcie: get rid of txq id assignment In TVQM mode the queue ID is assigned after enablement. Get rid of assuming pre-defined TX queue ID in functions that will be used by TVQM allocation path. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 4 +- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 50 +++++++++++++--------- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 33 +++++++------- 3 files changed, 47 insertions(+), 40 deletions(-) commit 6a90f85a696429ebe89777c6c895fd98fb36dc9b Author: Luca Coelho Date: Wed Jan 25 18:57:26 2017 +0200 iwlwifi: mvm: remove unnecessary label in iwl_mvm_handle_rx_statistics() The "invalid" label was a bit ugly and unnecessary. Remove it. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 13a3a39052aa42ed7e8ca2540366169584ae321f Author: Sara Sharon Date: Tue Nov 29 13:49:59 2016 +0200 iwlwifi: pcie: alloc queues dynamically Change queue allocation to be dynamic. On transport init only the command queue is being allocated. Other queues are allocated on demand. This is due to the huge amount of queues we will soon enable (512) and as a preparation for TX Virtual Queue Manager feature (TVQM), where firmware will assign the actual queue number on demand. This includes also allocation of the byte count table per queue and not as a contiguous chunk of memory. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 13 +- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 5 +- .../net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 5 +- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 179 +++++++++++++++++++-- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 68 ++------ 6 files changed, 199 insertions(+), 73 deletions(-) commit 77c09bc87278d8ccf224c4177e7168022cdd92a9 Author: Sara Sharon Date: Mon Dec 12 12:48:48 2016 +0200 iwlwifi: pcie: introduce new stop_device This function is basically the same as gen1, except for clean ups of old devices configuration that are never used in a000 configuration. It will also help with refactoring rf_kill later on. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 5 + .../net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 147 +++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 18 +-- 3 files changed, 161 insertions(+), 9 deletions(-) commit b2a3b1c1044cb686d3b975fa36e42f477b2aa386 Author: Sara Sharon Date: Sun Dec 11 11:36:38 2016 +0200 iwlwifi: pcie: prepare for dynamic queue allocation In a000 transport we will allocate queues dynamically. Right now queue are allocated as one big chunk of memory and accessed as such. The dynamic allocation of the queues will require accessing the queues as pointers. In order to keep simplicity of pre-a000 tx queues handling, keep allocating and freeing the memory in the same style, but move to access the queues in the various functions as individual pointers. Dynamic allocation for the a000 devices will be in a separate patch. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/pcie/ctxt-info.c | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 3 +- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 4 +- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 12 ++-- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 14 ++-- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 81 +++++++++++----------- 6 files changed, 58 insertions(+), 58 deletions(-) commit 43e9cdc268cbc462d88d6b48dbc36b34429b782b Author: Sara Sharon Date: Tue Nov 29 13:19:25 2016 +0200 iwlwifi: pcie: remove block and freeze operations from new transport New transport will be used only by op modes that supports buffer station offload - hence those will never be called. Clean it up. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 3 --- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 22 +++------------------- 2 files changed, 3 insertions(+), 22 deletions(-) commit 4822929388df78c57f85bc4f8aca781e268da44f Author: Sara Sharon Date: Thu Dec 8 12:05:58 2016 +0200 iwlwifi: pcie: support new write pointer width In a000 devices we have 16 bytes for the TFD index and 16 for the queue, in order to support 512 queues. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ca60da2eb41641183c9a1b85a7de26f1327ba356 Author: Sara Sharon Date: Thu Dec 8 13:22:55 2016 +0200 iwlwifi: pcie: support host commands in new transport Code is basically the same, with a cleanups of old narrow host command, ampg workarounds, some cosmetic stuff, and usage of TFH functions when accessing TFD queues. This enables also the cleanup of iwl_pcie_tfd_set_tb() since now it won't be called anywhere in the a000 data path Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 2 + drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 386 +++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 24 +- 4 files changed, 396 insertions(+), 18 deletions(-) commit cefe13af25275eabc6d2ad4f6b67ee7b06f94c5f Author: Sara Sharon Date: Tue Jan 24 15:50:35 2017 +0200 iwlwifi: pcie: rewrite TFD creation Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 215 +++++++++------------- 1 file changed, 82 insertions(+), 133 deletions(-) commit b97277ccc61d11d354b6a7d027c6316cadc76676 Author: Sara Sharon Date: Tue Jan 24 15:29:57 2017 +0200 iwlwifi: pcie: support new TX command Move to use the correct structure. Remove code referring to old command. Update DMA locations. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 4 ++-- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 10 +--------- 2 files changed, 3 insertions(+), 11 deletions(-) commit 066fd29a2fa366fd87c3d1da4cd25f4dfdece1bc Author: Sara Sharon Date: Tue Jan 24 14:53:11 2017 +0200 iwlwifi: pcie: cleanup old transport code from gen2 Cleanup code that is irrelevant for a000 devices. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 4 - drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 195 +++------------------ drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 8 +- 3 files changed, 30 insertions(+), 177 deletions(-) commit cfbeb5982467f38bdde2d522b3d457d5fc94ab0c Author: Goodstein, Mordechay Date: Mon Nov 21 10:26:36 2016 +0200 iwlwifi: mvm: move new API code to the end By moving all the code that depends on the new API we avoid unnecessary indentation in the code. Signed-off-by: Mordechai Goodstein Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 69 +++++++++++++++-------------- 1 file changed, 36 insertions(+), 33 deletions(-) commit c80eb570f8ce188e92a1693774a24d0f227985b5 Author: Emmanuel Grumbach Date: Thu Jan 12 15:43:57 2017 +0200 iwlwifi: mvm: tell the firmware about the U-APSD parameters Newer firmware versions will be able to handle all the WMM-PS flows internally when we act as a GO. The firwmare relies on the fact that the drivers puts frames for different peers in different queues (DQA) to achieve this. The driver will not be aware of the power state of the peers anymore. Tell the firmware about the WMM-PS parameters of earch peer that connects to us so that it can know what are the trigger-enabled ACs, the delivery-enableds ACs and the Service Period length. This API change is backward compatible since older firmware versions will simply ignore the newly added values. Since we don't support ieee80211 TSPECs for now, just copy the trigger-enabled ACs to the delivery enabled ones. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-sta.h | 11 ++++++----- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 10 ++++++---- 2 files changed, 12 insertions(+), 9 deletions(-) commit fd2103570125be186cdb0115abc2fecb6e582aa4 Author: Luca Coelho Date: Tue Jan 24 09:40:43 2017 +0200 iwlwifi: mvm: remove unnecessary debugging from UMAC scan There are several occasions where a scan of the same type is requested concurrently, so logging every time this happens is just noisy and unnecessary. Remove the logging for these cases. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit ab6c644539e98be3d73702c84f8f9efc789391f0 Author: Sara Sharon Date: Tue Nov 1 12:37:49 2016 +0200 iwlwifi: pcie: copy TX functions to new transport This is just a copy-paste in order to make changes tracking easier. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 13 + drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 519 +++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 38 +- 4 files changed, 540 insertions(+), 32 deletions(-) commit c65f4e03fc46c646f81cc659e501969ca48c3220 Author: Sara Sharon Date: Tue Dec 13 16:10:28 2016 +0200 iwlwifi: mvm: support moving to mgmt tid For a000 FW moved to 15 as management TID. The change for us is fairly local - translate old TID to 15 when enabling and disabling a queue, and make sure to cover it also on TX responses. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 9 ++++++--- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) commit bb49701b41deff0a8edd297357b23ffe833099eb Author: Sara Sharon Date: Thu Sep 29 14:52:40 2016 +0300 iwlwifi: mvm: support a000 SCD queue configuration a000 devices queue management is going to change significantly. We will have 512 queues. Those queues will be assigned number by the firmware and not by the driver. In addition, due to SN offload having TX queue shared between TIDs is impossible Also, the ADD_STA command no longer updates queues status. The only point of changing queue in the SCD queue config API. From driver perspective we have here a new design: Queue sharing and inactivity checks are disabled. Once this is done, the only paths that call scd_queue_cfg command are paths that alloc and release TX queues - which will make future accommodation to queue number assignment by FW easier. Since allocating 512 queues statically is not advisable, transport will allocate the queue on demand, fill the command with DRAM data and send it. This is reflected in the new transport API. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/mvm/fw-api-sta.h | 5 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 62 ++++++++++++++++++++-- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 ++ drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 39 +++++++++++--- 4 files changed, 96 insertions(+), 13 deletions(-) commit 6b35ff91572f7fc42ec0026f512a8d274071163b Author: Sara Sharon Date: Thu Sep 29 14:36:19 2016 +0300 iwlwifi: pcie: introduce a000 TX queues management In a000 devices the TX handling is different in a few ways: * Queues are allocated dynamically * DQA is enabled by default * Driver shouldn't access TFH registers - ucode configures it all in SCD_QUEUE_CFG command Support all this in a new API with op mode, where op mode sends the command, transport will allocate the queue dynamically, fill in DMA properties, send the command to FW and get the ID back. Current implementation only sets the new transport API and fills the DMA properties. Future patches will complete the other parts. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/Makefile | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 70 ++++++++- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 6 + drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 6 +- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 162 +++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 8 +- 6 files changed, 240 insertions(+), 14 deletions(-) commit c47de665751027781fe07fba1959911ab194add4 Author: Sara Sharon Date: Thu Sep 29 17:28:33 2016 +0300 iwlwifi: mvm: support new TX API Support the new TX command API for a000 devices. Command is a very slim version of current TX command. Generalize iwl_mvm_tx_mpdu to get rid of TX command dependencies. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 42 +++++++++++++- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 66 ++++++++++++++++------ 2 files changed, 91 insertions(+), 17 deletions(-) commit 6996490501ed8011964e1b1403ae2d104337843c Author: Luca Coelho Date: Thu Jan 12 12:43:12 2017 +0200 iwlwifi: mvm: add support for EWRD (Dynamic SAR) ACPI table Dynamic SAR allows changing TX power limits at runtime to comply with SAR regulations on multiple form factors (e.g. tablet vs. clamshell mode). To support this, a new table was added to ACPI, which is called Extended Wireless Regulatory Descriptor (EWRD). This table allows OEMs to define different TX power profiles for each form-factor or usage mode. Read this new table and store it in our SAR profiles table, in preparation for Dynamic SAR support. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 114 +++++++++++++++++++++++---- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 11 ++- 2 files changed, 108 insertions(+), 17 deletions(-) commit 42ce76d615e7cb2b57be90ce0f357604a7903253 Author: Luca Coelho Date: Wed Jan 11 23:36:30 2017 +0200 iwlwifi: mvm: spin off SAR profile selection function For dynamic SAR, we will need to select the current profile from different places. In preparation for that, spin the profile selection code out of iwl_mvm_sar_init(). Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 4 ++ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 73 +++++++++++++++++++--------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 + 3 files changed, 56 insertions(+), 22 deletions(-) commit c386dacb4ed681f26f6965b3e0f0448eeabfbb13 Author: Haim Dreyfuss Date: Wed Dec 28 15:58:22 2016 +0200 iwlwifi: mvm: refactor SAR init to prepare for dynamic SAR We are adding support for dynamic TX power tables for SAR (specific absorption rate) compliance. Currently, we only support a single (static) TX power table, which is read from ACPI, and use it statically. To prepare for more tables that can be switched dynamically, refactor the SAR init flow to allow reusage and add the current static table as a single entry in an array of tables. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 155 ++++++++++++++++----------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 17 ++- 2 files changed, 107 insertions(+), 65 deletions(-) commit 09a2e25d10cd85d981fb19fdcf1bc460f1706e22 Author: Sara Sharon Date: Mon Dec 19 14:10:35 2016 +0200 iwlwifi: mvm: disable multi-queue for a000 devices Firmware isn't configuring multi RX queue hardware yet in the self init mode. Disable it for now until we have an API that enables it. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a0b4828c20ce9ab34e6ae8be0148eb55e6a89193 Author: Sara Sharon Date: Thu Jan 12 16:01:11 2017 +0200 iwlwifi: mvm: use same scan API for all a000 devices API will be the same regardless of FW compilation. CDB related values will be filled in only for CDB. Cahneg code and names accordingly. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/mvm/fw-api-scan.h | 14 ++-- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 80 ++++++++++++---------- 2 files changed, 51 insertions(+), 43 deletions(-) commit 0ae988125d777ce5b564cf73e6d83c471e32aff9 Author: Sara Sharon Date: Wed Jan 4 14:53:58 2017 +0200 iwlwifi: mvm: prepare for station count change In a000 devices we will support up to 32 stations. The max station define is used also for invalid station marking which makes finding usages of actual maximum station pretty hard to sort through - change it to be a different define in order to make future changes easier. Use also ARRAY_SIZE intead of define when possible. Do not move yet to 32 stations until firmware do it though. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/coex.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 2 +- .../net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 2 +- .../net/wireless/intel/iwlwifi/mvm/fw-api-mac.h | 4 ++- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 6 ++--- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 6 ++--- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 16 ++++++------ drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 12 ++++----- drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 4 +-- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/sf.c | 6 ++--- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 30 +++++++++++----------- drivers/net/wireless/intel/iwlwifi/mvm/tdls.c | 22 ++++++++-------- drivers/net/wireless/intel/iwlwifi/mvm/tof.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 6 ++--- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 2 +- 18 files changed, 66 insertions(+), 62 deletions(-) commit dd48847763a79f0382e0383c85bbe01f3cd57a10 Author: Sara Sharon Date: Sun Jan 15 17:08:40 2017 +0200 iwlwifi: cleanup unused function iwl_has_secure_boot() isn't getting called anywhere. Clean it up. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-config.h | 10 ---------- 1 file changed, 10 deletions(-) commit c5a719ee575ccace15eb9ad49c13c2750946c303 Author: Sara Sharon Date: Tue Nov 15 10:20:48 2016 +0200 iwlwifi: mvm: add queues after adding station Currently aux & broadcast queues are added before calling add station, which results with a SCD_QUEUE_CFG command sent with a station id unknown yet to fw. While this works for pre-a000 firmware, the a000 fw requires the order to be reversed. The reason the change is only for a000 devices and not for previous devices is that we cannot reverse the order since the tfd_queue_mask containing the aux queue will cause FW to assert on adding a queue mask with a queue that is not enabled. This is not a problem in a000 fw since the tfd_queue_mask was removed from the add sta API. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 104 +++++++++++++-------------- 1 file changed, 52 insertions(+), 52 deletions(-) commit d6be9c1d0b2e9b1d4722de2d6e5dabeff56c88a5 Author: Sara Sharon Date: Thu Jan 12 11:31:25 2017 +0200 iwlwifi: mvm: read new secure boot registers Addresses were changed for a000 devices. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 13 ++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) commit c7f82ea8605627b3088f166d9f4a5ca7857e8383 Author: Colin Ian King Date: Mon Mar 20 11:51:23 2017 +0000 i2c: designware-baytrail: fix potential null pointer dereference on dev The assignment to addr requires a call to get_sem_addr that dereferences dev, however, this dereference occurs before a null pointer check on dev. Move this assignment after the null check on dev to avoid a potential null pointer dereference. Detected by CoverityScan, CID#1419700 ("Dereference before null check") Fixes: fd476fa22a1f432 ("i2c: designware-baytrail: Add support for cherrytrail") Signed-off-by: Colin Ian King Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-baytrail.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cf9ea8ca4a0bea7eda12f8fb04dc34146839a215 Author: Lorenzo Pieralisi Date: Wed Apr 19 17:48:51 2017 +0100 linux/io.h: Add pci_remap_cfgspace() interface The PCI specifications (Rev 3.0, 3.2.5 "Transaction Ordering and Posting") mandate non-posted configuration transactions. As further highlighted in the PCIe specifications (4.0 - Rev0.3, "Ordering Considerations for the Enhanced Configuration Access Mechanism"), through ECAM and ECAM-derivative configuration mechanism, the memory mapped transactions from the host CPU into Configuration Requests on the PCI express fabric may create ordering problems for software because writes to memory address are typically posted transactions (unless the architecture can enforce through virtual address mapping non-posted write transactions behaviour) but writes to Configuration Space are not posted on the PCI express fabric. Current DT and ACPI host bridge controllers map PCI configuration space (ECAM and ECAM-derivative) into the virtual address space through ioremap() calls, that are non-cacheable device accesses on most architectures, but may provide "bufferable" or "posted" write semantics in architecture like eg ARM/ARM64 that allow ioremap'ed regions writes to be buffered in the bus connecting the host CPU to the PCI fabric; this behaviour, as underlined in the PCIe specifications, may trigger transactions ordering rules and must be prevented. Introduce a new generic and explicit API to create a memory mapping for ECAM and ECAM-derivative config space area that defaults to ioremap_nocache() (which should provide a sane default behaviour) but still allowing architectures on which ioremap_nocache() results in posted write transactions to override the function call with an arch specific implementation that complies with the PCI specifications for configuration transactions. [bhelgaas: fold in #ifdef CONFIG_PCI wrapper] Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Arnd Bergmann Cc: Will Deacon Cc: Russell King Cc: Catalin Marinas include/linux/io.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 7b309aef0463340d3ad5449d1f605d14e10a4225 Author: Lorenzo Pieralisi Date: Wed Apr 19 17:48:50 2017 +0100 PCI: Remove __weak tag from pci_remap_iospace() pci_remap_iospace() is marked as a weak symbol even though no architecture is currently overriding it; given that its implementation internals have already code paths that are arch specific (ie PCI_IOBASE and ioremap_page_range() attributes) there is no need to leave the weak symbol in the kernel since the same functionality can be achieved by customizing per-arch the corresponding functionality. Remove the __weak symbol from pci_remap_iospace(). Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Acked-by: Arnd Bergmann drivers/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd698d24b1b5790d0a22d44a0705dabd47235ad4 Author: chin.yew.tan@intel.com Date: Tue Mar 28 16:48:02 2017 +0800 i2c: designware: Get selected speed mode sda-hold-time via ACPI Sda-hold-time is an important parameter for tuning i2c to meet the electrical specification especially for high speed. I2C with incorrect sda-hold-time may cause lost arbitration error. Instead of loading all speed mode settings, only selected speed mode settings are loaded. Signed-off-by: Tan Chin Yew Reviewed-by: Andy Shevchenko Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-platdrv.c | 31 ++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) commit 8c925b263584e5a37244297ea9bd072020265fd4 Author: Linus Walleij Date: Thu Mar 30 17:36:39 2017 +0200 mtd: physmap_of: really fix the physmap add-ons The current way of building the of_physmap add-ons result in just the add-on being in the object code, and not the actual core implementation and regress the Gemini and Versatile. Bake the physmap_of.o object by baking physmap_of_core.o and adding the Versatile and/or Gemini add-ons to the final object. Rename the source file physmap_of_core.c to get the desired build components. Suggested-by: Boris Brezillon Fixes: 4f04f68e1598 ("mtd: physmap_of: fixup gemini/versatile dependencies") Signed-off-by: Linus Walleij Acked-by: Boris Brezillon Signed-off-by: Brian Norris drivers/mtd/maps/Makefile | 10 +- drivers/mtd/maps/physmap_of.c | 389 ------------------------------------- drivers/mtd/maps/physmap_of_core.c | 389 +++++++++++++++++++++++++++++++++++++ 3 files changed, 393 insertions(+), 395 deletions(-) commit 4a67c9fde04fc1b6752fa68c495310ca3ed29eeb Author: Rafał Miłecki Date: Fri Mar 31 11:11:48 2017 +0200 mtd: use dev_of_node helper in mtd_get_of_node This allows better compile-time optimizations with CONFIG_OF disabled. Signed-off-by: Rafał Miłecki Acked-by: Boris Brezillon Signed-off-by: Brian Norris include/linux/mtd/mtd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8918821f370467937afdda4bf7aa6c9c1a732be5 Author: Colin Ian King Date: Thu Feb 23 00:34:00 2017 +0000 jffs2: fix spelling mistake: "requestied" -> "requested" trivial fix to spelling mistake in JFFS2_ERROR message Signed-off-by: Colin Ian King [Brian: also fix 'an' -> 'a'] Signed-off-by: Brian Norris fs/jffs2/readinode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34675d67032ae568331a2a230973c7b58ddcaf9d Author: Markus Elfring Date: Tue Apr 18 11:15:56 2017 +0200 clk: hi3620: Fix a typo in one variable name The script "checkpatch.pl" pointed information out like the following. CHECK: 'seperated' may be misspelled - perhaps 'separated'? Thus rename the affected variable. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clk-hi3620.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3cda284b77cba833baea9a0f5e256a34d249761f Author: Markus Elfring Date: Tue Apr 18 10:50:53 2017 +0200 clk: hi3620: Delete error messages for a failed memory allocation in two functions The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such statements here. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clk-hi3620.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 28c5fe99016d28f15d1b825df8acb1558a3a63a1 Author: Felix Brack Date: Thu Apr 13 09:51:38 2017 +0200 leds: pca9532: Extend pca9532 device tree support This patch extends the device tree support for the pca9532 by adding the leds 'default-state' property. Signed-off-by: Felix Brack Signed-off-by: Jacek Anaszewski .../devicetree/bindings/leds/leds-pca9532.txt | 10 ++++++++ drivers/leds/leds-pca9532.c | 27 +++++++++++++++++++++- include/linux/leds-pca9532.h | 4 ++-- 3 files changed, 38 insertions(+), 3 deletions(-) commit 2a03d49922fa2b89ceaa7d14b657c8a8e6bc7000 Merge: c99a30d f6cfec8 Author: Wolfram Sang Date: Wed Apr 19 20:19:03 2017 +0200 Merge tag 'i2c-mux/for-4.12-2' of https://github.com/peda-r/i2c-mux into i2c/for-4.12 Pull in trivial change from the i2c-mux subsubsystem: "I thought Mauro would take this patch, but then he just added a tag. So, here's a late incremental pull request for v4.12-rc1..." commit ef697902a1328e4a205585612c98f476f25b97ef Author: Arnd Bergmann Date: Wed Apr 19 19:39:13 2017 +0200 lightnvm: assume 64-bit lba numbers The driver uses both u64 and sector_t to refer to offsets, and assigns between the two. This causes one harmless warning when sector_t is 32-bit: drivers/lightnvm/pblk-rb.c: In function 'pblk_rb_write_entry_gc': include/linux/lightnvm.h:215:20: error: large integer implicitly truncated to unsigned type [-Werror=overflow] drivers/lightnvm/pblk-rb.c:324:22: note: in expansion of macro 'ADDR_EMPTY' As the driver is already doing this inconsistently, changing the type won't make it worse and is an easy way to avoid the warning. Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target") Signed-off-by: Arnd Bergmann Signed-off-by: Jens Axboe drivers/lightnvm/pblk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04485987f05388ffec04cdab7808ba26db30c9b8 Author: Hou Pengyang Date: Tue Apr 18 11:57:16 2017 +0000 f2fs: introduce async IPU policy This patch introduces an ASYNC IPU policy. Under senario of large # of async updating(e.g. log writing in Android), disk would be seriously fragmented, and higher frequent gc would be triggered. This patch uses IPU to rewrite the async update writting, since async is NOT sensitive to io latency. Signed-off-by: Hou Pengyang fs/f2fs/data.c | 2 +- fs/f2fs/file.c | 2 +- fs/f2fs/segment.h | 12 +++++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) commit d84d1cbdec6b5d9ba391079a111572197db66d54 Author: Chao Yu Date: Tue Apr 18 19:27:39 2017 +0800 f2fs: add undiscard blocks stat This patch adds to account undiscard blocks. Signed-off-by: Chao Yu fs/f2fs/debug.c | 5 +++-- fs/f2fs/f2fs.h | 2 ++ fs/f2fs/segment.c | 9 +++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) commit 001c584cca6fce8e91f19eca88781b8c16d1ea42 Author: Chao Yu Date: Tue Apr 18 19:23:39 2017 +0800 f2fs: unlock cp_rwsem early for IPU writes For IPU writes, there won't be any udpates in dnode page since we will reuse old block address instead of allocating new one, so we don't need to lock cp_rwsem during IPU IO submitting. Signed-off-by: Chao Yu fs/f2fs/data.c | 6 +++++- fs/f2fs/f2fs.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) commit df0f6b44dd59cd07aa3ff583dee04b3b563648d0 Author: Chao Yu Date: Mon Apr 17 18:21:43 2017 +0800 f2fs: introduce __check_rb_tree_consistence Introduce __check_rb_tree_consistence to check consistence of rb-tree based discard cache in runtime. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 32 ++++++++++++++++++++++++++++++++ fs/f2fs/f2fs.h | 2 ++ fs/f2fs/segment.c | 15 +++++++++++++-- 3 files changed, 47 insertions(+), 2 deletions(-) commit 0243a5f9daf149654dc68c49783b27760f513cc1 Author: Chao Yu Date: Sat Apr 15 14:09:38 2017 +0800 f2fs: trace __submit_discard_cmd Add an even class f2fs_discard for introducing f2fs_queue_discard, then use f2fs_{queue,issue}_discard to trace __{queue,submit}_discard_cmd. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 4 +++- include/trace/events/f2fs.h | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) commit ba48a33ef6faa573257b2a4181329f2d1eaafed9 Author: Chao Yu Date: Sat Apr 15 14:09:37 2017 +0800 f2fs: in prior to issue big discard Keep issuing big size discard in prior instead of the one with random size, so that we expect that it will help to: - be quick to recycle unused large space in flash storage device. - give a chance for a) wait to merge small piece discards into bigger one, or b) avoid issuing discards while they have being reallocated by SSR. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 7 ++++++- fs/f2fs/segment.c | 54 +++++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 45 insertions(+), 16 deletions(-) commit 46f84c2c058784f42f2d021df79384ec66cdb256 Author: Chao Yu Date: Sat Apr 15 14:09:36 2017 +0800 f2fs: clean up discard_cmd_control structure Avoid long variable name in discard_cmd_control structure, no logic change. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 8 ++++---- fs/f2fs/segment.c | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) commit 004b68621897f06aa2817e7438469d23f4a3a284 Author: Chao Yu Date: Fri Apr 14 23:24:55 2017 +0800 f2fs: use rb-tree to track pending discard commands Introduce rb-tree based discard cache infrastructure to speed up lookup and merge operation of discard entry. Signed-off-by: Chao Yu [Jaegeuk Kim: initialize dc to avoid build warning] Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 15 ++-- fs/f2fs/f2fs.h | 48 ++++++++++- fs/f2fs/segment.c | 223 ++++++++++++++++++++++++++++++++++++++++--------- 3 files changed, 236 insertions(+), 50 deletions(-) commit 6fc091fb0459ade939a795bfdcaf645385b951d4 Author: Peter Chen Date: Wed Apr 19 16:55:52 2017 +0300 usb: host: xhci: print correct command ring address Print correct command ring address using 'val_64'. Cc: stable Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 314eaf7dec13b975e51c8faf980f7b0f4e20b3e9 Author: Peter Chen Date: Wed Apr 19 16:55:51 2017 +0300 usb: host: xhci: delete sp_dma_buffers for scratchpad We already have sp_array to store each scratch buffer address for xHC, it doesn't need another sp_dma_buffers array to store it. Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 18 ++++-------------- drivers/usb/host/xhci.h | 1 - 2 files changed, 4 insertions(+), 15 deletions(-) commit 724e882daeb67d58d04a3d0f8cccdd33775bb9bb Author: Peter Chen Date: Wed Apr 19 16:55:50 2017 +0300 usb: host: xhci: using correct specification chapter reference for DCBAAP Using correct specification chapter reference for DCBAAP (Device Context Base Address Array Pointer). Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77d45b4500967de674b8f75a9a91f58d57d5704d Author: Christoph Hellwig Date: Wed Apr 19 16:55:49 2017 +0300 xhci: switch to pci_alloc_irq_vectors Use the modern API to request MSI or MSI-X interrupts, which allows us to get rid of the msix_entries array, as well as cleaning up the cleanup code. Signed-off-by: Christoph Hellwig Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 100 ++++++++++++++---------------------------------- drivers/usb/host/xhci.h | 1 - 2 files changed, 29 insertions(+), 72 deletions(-) commit 435cc1138ec94af7497ea68c8eb8b0c17cfcf002 Author: Yoshihiro Shimoda Date: Wed Apr 19 16:55:48 2017 +0300 usb: host: xhci-plat: set resume_quirk() for R-Car controllers This patch sets resume_quirk() for R-Car controllers to re-download the firmware in resume timing. Otherwise, if the controller's power is down in suspend timing, the firmware in the controller goes away, and then the controller doesn't work after resume. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 3 +++ drivers/usb/host/xhci-rcar.c | 11 +++++++++++ drivers/usb/host/xhci-rcar.h | 6 ++++++ 3 files changed, 20 insertions(+) commit 98c0a3ffa30c4b389257f7e7ee80ab9e90b78924 Author: Yoshihiro Shimoda Date: Wed Apr 19 16:55:47 2017 +0300 usb: host: xhci-plat: add resume_quirk() This patch adds resume_quirk() to do platform specific process in resume timing. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 15 +++++++++++++++ drivers/usb/host/xhci-plat.h | 1 + 2 files changed, 16 insertions(+) commit 835e4241e714fbd659838618466766b132823da3 Author: Yoshihiro Shimoda Date: Wed Apr 19 16:55:46 2017 +0300 usb: host: xhci-plat: enable clk in resume timing This patch enables the clk in resume timing when device_may_wakeup() is false. Otherwise, kernel panic happens when R-Car resumes the system from Suspend-to-RAM because the clk is disabled. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit b0c69b4bace3703a29e08dda2b5a10e1073cb9cd Author: Baolin Wang Date: Wed Apr 19 16:55:45 2017 +0300 usb: host: plat: Enable xHCI plat runtime PM Enable the xHCI plat runtime PM for parent device to suspend/resume xHCI. Also call pm_runtime_forbid() in probe() function to force users to explicitly enable runtime pm using power/control in sysfs, in case some parent devices didn't implement runtime PM callbacks. [set do_wakeup to true when runtime suspending -Mathias] Signed-off-by: Baolin Wang Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 53 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 7 deletions(-) commit e3adec72a3c50b733eb277a9f93c044f59ff55eb Author: Yongji Xie Date: Mon Apr 10 19:58:14 2017 +0800 PCI: Don't resize resources when realigning all devices in system The "pci=resource_alignment" argument aligns BARs of designated devices by artificially increasing their size. Increasing the size increases the alignment and prevents other resources from being assigned in the same alignment region, e.g., in the same page, but it can break drivers that use the BAR size to locate things, e.g., ilo_map_device() does this: off = pci_resource_len(pdev, bar) - 0x2000; The new pcibios_default_alignment() interface allows an arch to request that *all* BARs in the system be aligned to a larger size. In this case, we don't need to artificially increase the resource size because we know every BAR of every device will be realigned, so nothing will share the same alignment region. Use IORESOURCE_STARTALIGN to request realignment of PCI BARs when we know we're realigning all BARs in the system. [bhelgaas: comment, changelog] Signed-off-by: Yongji Xie Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 59 ++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 16 deletions(-) commit 0dde1c08d1b9dea01cefb327dba8a6e3ae795214 Author: Bjorn Helgaas Date: Mon Apr 17 15:20:58 2017 -0500 PCI: Don't reassign resources that are already aligned The "pci=resource_alignment=" kernel argument designates devices for which we want alignment greater than is required by the PCI specs. Previously we set IORESOURCE_UNSET for every MEM resource of those devices, even if the resource was *already* sufficiently aligned. If a resource is already sufficiently aligned, leave it alone and don't try to reassign it. Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) commit 81a5e70e0de55707c3184d186b2103b5bb9377ec Author: Bjorn Helgaas Date: Fri Apr 14 14:12:06 2017 -0500 PCI: Factor pci_reassigndev_resource_alignment() Pull the BAR size adjustment out into a new function, pci_request_resource_alignment(), and add a comment about how and why we increase the resource size and alignment. Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 69 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 22 deletions(-) commit 382746376993cfa6d6c4e546c67384201c0f3a82 Author: Yongji Xie Date: Mon Apr 10 19:58:13 2017 +0800 powerpc/powernv: Override pcibios_default_alignment() to force PCI devices to be page aligned Override pcibios_default_alignment() to set default alignment to PAGE_SIZE for all PCI devices on PowerNV platform. Thus sub-page BARs would not share a page and could be mapped into guest when VFIO passthrough them. Signed-off-by: Yongji Xie Signed-off-by: Bjorn Helgaas arch/powerpc/include/asm/machdep.h | 2 ++ arch/powerpc/kernel/pci-common.c | 8 ++++++++ arch/powerpc/platforms/powernv/pci-ioda.c | 7 +++++++ 3 files changed, 17 insertions(+) commit 0a701aa6378496ea54fb065c68b41d918e372e94 Author: Yongji Xie Date: Mon Apr 10 19:58:12 2017 +0800 PCI: Add pcibios_default_alignment() for arch-specific alignment control When VFIO passes through a PCI device to a guest, it does not allow the guest to mmap BARs that are smaller than PAGE_SIZE unless it can reserve the rest of the page (see vfio_pci_probe_mmaps()). This is because a page might contain several small BARs for unrelated devices and a guest should not be able to access all of them. VFIO emulates guest accesses to non-mappable BARs, which is functional but slow. On systems with large page sizes, e.g., PowerNV with 64K pages, BARs are more likely to share a page and performance is more likely to be a problem. Add a weak function to set default alignment for all PCI devices. An arch can override it to force the PCI core to place memory BARs on their own pages. Signed-off-by: Yongji Xie Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 781de7ade6c3ccc5efca9c635d64c1c07427a6d1 Author: Markus Elfring Date: Tue Apr 18 10:30:04 2017 +0200 clk: hi3620: Use kcalloc() in hi3620_mmc_clk_init() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clk-hi3620.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 840e56326fd90a435644ee0eeba99f4cddd31759 Author: Markus Elfring Date: Tue Apr 18 10:12:32 2017 +0200 clk: hisilicon: Delete error messages for failed memory allocations in hisi_clk_init() The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such statements here. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clk.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 8d9bdc46c780325414af7f09827c78c69f9b1e3d Author: Markus Elfring Date: Tue Apr 18 10:15:19 2017 +0200 clk: hisilicon: Use devm_kmalloc_array() in hisi_clk_alloc() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7b9bae176a5c63fb467149174c11a48f3b3c5947 Author: Markus Elfring Date: Tue Apr 18 09:25:47 2017 +0200 clk: hisilicon: Use kcalloc() in hisi_clk_init() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b3da896e2f325f8fef29f698d9cbdbb0e821a474 Author: Kuninori Morimoto Date: Tue Apr 18 02:20:03 2017 +0000 clk: cs2000: select 12.20 High Accuracy on LFRatioCfg cs2000 can select Static/Dynamic ratio based Frequency Synthesizer Mode, it can select 20.12 High Multiplier interpret for 32-bit User Defined Ratio if Dynamic ratio mode. Otherwise it should select 12.20 High Accuracy mode. Current cs2000 is supporting Static ratio mode only, so it should select 12.20 High Accuracy mode, not 20.12 High Multiplier mode. This patch fixes it. Signed-off-by: Kuninori Morimoto Signed-off-by: Stephen Boyd drivers/clk/clk-cs2000-cp.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit b295a015cdfdbf36ce87076dbac8a490f2797cad Author: Kuninori Morimoto Date: Tue Apr 18 02:19:37 2017 +0000 clk: cs2000: tidyup DEVICE_CFG2 settings DEVICE_CFG2 can select ratio from user defined ratio and LOCKCLK is for it. But current driver sets fixed 0 value. This patch fixes it. Note is that current cs2000 driver is using/supporting only ratio0 (= ch0) now. DEVICE_CFG2 can select STATIC/DYNAMIC ratio mode, and current cs2000 driver is selecting STATIC mode, but it was not understandable on current code. This patch also solve this issue. Signed-off-by: Kuninori Morimoto Signed-off-by: Stephen Boyd drivers/clk/clk-cs2000-cp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit d127967a7b18598b8922bf9a4b984fae899787dc Author: Kuninori Morimoto Date: Tue Apr 18 02:18:19 2017 +0000 clk: cs2000: enable clock skipping mode CLK_IN skipping mode allows the PLL to maintain lock even when the CLK_IN signal has missing pulses for up to 20 ms (t CS) at a time. This patch enables it Signed-off-by: Kuninori Morimoto Signed-off-by: Stephen Boyd drivers/clk/clk-cs2000-cp.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4a43e35d19c1379c255a8abab3d6303ed382dcf1 Author: Stanimir Varbanov Date: Thu Feb 9 17:20:30 2017 +0200 clk: qcom: add parent for venus core0 and core1 gdsc's Make venus_gdsc parent of venus gdsc core0 and core1. Signed-off-by: Stanimir Varbanov Signed-off-by: Stephen Boyd drivers/clk/qcom/mmcc-msm8996.c | 2 ++ 1 file changed, 2 insertions(+) commit 41ee7caf59e1c68d696162523cdf1fa7f717a731 Author: Pierre-Louis Bossart Date: Mon Feb 20 14:23:56 2017 -0600 clk: x86: add "mclk" alias for Baytrail/Cherrytrail Due to timing requirements, TI and Conexant manage the audio reference clock from their ASoC codec drivers using the "mclk" string. This patch adds another lookup for the "pmc_plt_clk_3" clock to avoid Intel-specific tests in those codec drivers and use code as-is. To avoid a leak, clk_add_alias() is not used in this patch. Instead the lookup is created manually as part of the .probe() step and dropped in the .remove() step. "pmc_plt_clk_3" is used exclusively for audio on all known Baytrail/CherryTrail designs and is e.g. routed on the MCLK (pin 26) of the MinnowBoardMAX Turbot LSE connector. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Stephen Boyd drivers/clk/x86/clk-pmc-atom.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8973aa4aecac223548366ca81818309a0f0efa6d Author: Bharat Kumar Reddy Gooty Date: Mon Mar 20 18:12:14 2017 -0400 clk: ns2: Correct SDIO bits Corrected the bits for power and iso. Signed-off-by: Bharat Kumar Reddy Gooty Signed-off-by: Jon Mason Fixes: f7225a83 ("clk: ns2: add clock support for Broadcom Northstar 2 SoC") Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-ns2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46a7253df472721e97cc9d9d088d223aed6f870a Author: Srinivas Kandagatla Date: Tue Mar 21 10:12:59 2017 +0000 clk: qcom: clk-smd-rpm: fix rate for branch clks during handoff rpm branch clk rate should requested as either 0 or 1 but not INT_MAX. This patch fixes rate request for branch clocks during clk handoff. Suggested-by: Bjorn Andersson Signed-off-by: Srinivas Kandagatla Signed-off-by: Stephen Boyd drivers/clk/qcom/clk-smd-rpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e24f5287cd88ebd0df524b55b70b1fcd6d76d8c6 Author: Stefan Agner Date: Mon Apr 10 14:00:14 2017 -0700 clk: imx7d: fix USDHC NAND clock The USDHC NAND root clock is not gated by any CCM clock gate. Remove the bogus gate definition. Signed-off-by: Stefan Agner Acked-by: Dong Aisheng Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx7d.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 25165f79adc76b812bfb4d8f2ab120aafb28d0e6 Author: Kuninori Morimoto Date: Wed Apr 19 00:45:52 2017 +0000 ASoC: rsnd: enable clock-frequency for both 44.1kHz/48kHz Current clock-frequency allows only 1 clock, but ADG can handle both 44.1kHz/48kHz base clocks. This patch enables these. On Salvator-X board, AUDIO_CLKOUT which is generated by ADG is connected to ak4613 MCKI, and it should be synchronized with LRCK. Thus, we need both 44.1kHz/48kHz base clock-frequency. Otherwise, either one sounds strange in high frequency sound. Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/adg.c | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) commit 9ca5e57d78446c8bd42adff3dcae693703f91d9c Author: Kuninori Morimoto Date: Wed Apr 19 00:41:24 2017 +0000 ASoC: rsnd: rsnd_mod_make_sure() is not under DEBUG rsnd_mod_make_sure() will be used any situation, thus, under DEBUG is not realistic. This patch move it to non DEBUG area Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 2 -- sound/soc/sh/rcar/rsnd.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) commit bfd090be14edeff2040b65f1a396c5343a0210c5 Author: Paul E. McKenney Date: Wed Feb 8 14:49:27 2017 -0800 rcu: Fix typo in PER_RCU_NODE_PERIOD header comment This commit just changes a "the the" to "the" to reduce repetition. Reported-by: Michalis Kokologiannakis Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5455a7f6a8dc66a354c6dbf0a9f40e7cdacd11db Author: Nicholas Mc Guire Date: Sat Mar 25 20:46:02 2017 +0100 rcu: Use true/false in assignment to bool This commit makes the parse_rcu_nocb_poll() function assign true (rather than the constant 1) to the bool variable rcu_nocb_poll. Signed-off-by: Nicholas Mc Guire Signed-off-by: Paul E. McKenney kernel/rcu/tree_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50dc7def4a9e05d1329e0cc129a5146821130998 Author: Nicholas Mc Guire Date: Sat Mar 25 20:46:01 2017 +0100 rcu: Use bool value directly The beenonline variable is declared bool so there is no need for an explicit comparison, especially not against the constant zero. Signed-off-by: Nicholas Mc Guire Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6bb7ff175ea63dffebadd3f0e921618332809af9 Author: Paul E. McKenney Date: Sat Mar 25 10:19:50 2017 -0700 torture: Use correct path for Kconfig fragment for duplicates Currently, the rcutorture scripting will give an error message if running a duplicate scenario that happens also to have a non-existent build directory (b1, b2, ... in the rcutorture directory). Worse yet, if the build directory has already been created and used for a real build, the script will silently grab the wrong Kconfig fragment, which could cause confusion to the poor sap (me) analyzing old test results. At least the actual test runs correctly... This commit therefore accesses the Kconfig fragment from the results directory corresponding to the first of the duplicate scenarios, for which a build was actually carried out. This prevents both the messages and at least one form of later confusion. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit deb34f3643980832c03bdfb315d5a7e3371bd269 Author: Paul E. McKenney Date: Thu Mar 23 13:21:30 2017 -0700 rcu: Improve comments for hotplug/suspend/hibernate functions Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) commit 48ac34666ff76843d8743db1cc78b303759916f1 Author: Michael S. Tsirkin Date: Mon Feb 27 21:14:19 2017 +0200 hlist_add_tail_rcu disable sparse warning sparse is unhappy about this code in hlist_add_tail_rcu: struct hlist_node *i, *last = NULL; for (i = hlist_first_rcu(h); i; i = hlist_next_rcu(i)) last = i; This is because hlist_next_rcu and hlist_next_rcu return __rcu pointers. It's a false positive - it's a write side primitive and so does not need to be called in a read side critical section. The following trivial patch disables the warning without changing the behaviour in any way. Note: __hlist_for_each_rcu would also remove the warning but it would be confusing since it calls rcu_derefence and is designed to run in the rcu read side critical section. Signed-off-by: Michael S. Tsirkin Reviewed-by: Steven Rostedt (VMware) Signed-off-by: Paul E. McKenney include/linux/rculist.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d1e4f01d09b88c6df3e9f6b8ca5f1a3882069ccc Author: Paul E. McKenney Date: Wed Feb 8 14:58:41 2017 -0800 rcu: Remove obsolete comment from rcu_future_gp_cleanup() header The rcu_nocb_gp_cleanup() function is now invoked elsewhere, so this commit drags this comment into the year 2017. Reported-by: Michalis Kokologiannakis Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 024828800926dcb385b094e2438151647c3f8251 Author: Paul E. McKenney Date: Fri Feb 3 09:27:00 2017 -0800 rcu: Make RCU_FANOUT_LEAF help text more explicit about skew_tick If you set RCU_FANOUT_LEAF too high, you can get lock contention on the leaf rcu_node, and you should boot with the skew_tick kernel parameter set in order to avoid this lock contention. This commit therefore upgrades the RCU_FANOUT_LEAF help text to explicitly state this. Signed-off-by: Paul E. McKenney init/Kconfig | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 468d01bec544286bb5283f012b95b5b84636565b Author: Paul E. McKenney Date: Thu Feb 2 11:40:15 2017 -0800 types: Update obsolete callback_head comment The comment header for callback_head (and thus for rcu_head) states that the bottom two bits of a pointer to these structures must be zero. This is obsolete: The new requirement is that only the bottom bit need be zero. This commit therefore updates this comment. Signed-off-by: Paul E. McKenney include/linux/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b21401307a6a705688faf1bc9e6e02663708ec1 Author: Thomas Petazzoni Date: Mon Apr 17 14:46:45 2017 +0200 clk: spear: fix ADC clock definition on SPEAr600 There is no SPEAr600 device named "adc". Instead, the description of the ADC was recently added to the Device Tree, and the device name is "d820b000.adc", so we should associate the ADC gatable clock to this device name. Signed-off-by: Thomas Petazzoni Acked-by: Viresh Kumar Signed-off-by: Stephen Boyd drivers/clk/spear/spear6xx_clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5dd63efda3d07b50c0feda6fb4796bece237e61 Author: Paul E. McKenney Date: Tue Jan 31 07:45:13 2017 -0800 lockdep: Use "WARNING" tag on lockdep splats This commit changes lockdep splats to begin lines with "WARNING" and to use pr_warn() instead of printk(). This change eases scripted analysis of kernel console output. Reported-by: Dmitry Vyukov Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney Acked-by: Dmitry Vyukov Reviewed-by: Josh Triplett kernel/locking/lockdep.c | 86 +++++++++++++++++++++--------------------- kernel/locking/rtmutex-debug.c | 9 +++-- 2 files changed, 48 insertions(+), 47 deletions(-) commit 4898b61e40d62ca1652af40935dbbb5d2e5fd93d Author: Kuninori Morimoto Date: Wed Apr 19 00:40:38 2017 +0000 ASoC: ak4613: use snd_soc_update_bits() to avoid Reserve bit on I/O CTRL Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4613.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 96596aa06628e86ea0e1c08c34b0ccc7619e43ac Author: Kevin-CW Chen Date: Sat Apr 8 09:20:30 2017 +0800 clk: mediatek: add clk support for MT6797 Add MT6797 clock support, include topckgen, apmixedsys, infracfg and subsystem clocks Signed-off-by: Kevin-CW Chen Signed-off-by: Mars Cheng Tested-by: Matthias Brugger Signed-off-by: Stephen Boyd drivers/clk/mediatek/Kconfig | 32 ++ drivers/clk/mediatek/Makefile | 5 + drivers/clk/mediatek/clk-mt6797-img.c | 76 ++++ drivers/clk/mediatek/clk-mt6797-mm.c | 136 +++++++ drivers/clk/mediatek/clk-mt6797-vdec.c | 93 +++++ drivers/clk/mediatek/clk-mt6797-venc.c | 78 ++++ drivers/clk/mediatek/clk-mt6797.c | 714 +++++++++++++++++++++++++++++++++ 7 files changed, 1134 insertions(+) commit 2b51f514a23563b036d5ab16e9212285c14d21e8 Author: Kevin-CW Chen Date: Sat Apr 8 09:20:28 2017 +0800 dt-bindings: arm: mediatek: document clk bindings for MT6797 This patch adds the binding documentation for apmixedsys, imgsys, infracfg, mmsys, topckgen, vdecsys and vencsys for MT6797. Signed-off-by: Kevin-CW Chen Signed-off-by: Mars Cheng Acked-by: Rob Herring Signed-off-by: Stephen Boyd Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt | 1 + Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt | 1 + Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt | 1 + Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt | 1 + Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt | 1 + Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt | 1 + Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt | 3 ++- 7 files changed, 8 insertions(+), 1 deletion(-) commit d0fac02563d4fccaaf7c112f314cc5ad39aabdee Author: Christoph Hellwig Date: Wed Apr 12 12:13:59 2017 +0200 block: make __blk_end_bidi_request private blk_insert_flush should be using __blk_end_request to start with. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-core.c | 2 +- block/blk-flush.c | 2 +- block/blk.h | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) commit fa1a15c08e23cb89c5837915b1989909bce47456 Author: Christoph Hellwig Date: Wed Apr 12 12:13:58 2017 +0200 block: remove blk_end_request_cur This function is not used anywhere in the kernel. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe block/blk-core.c | 18 ------------------ include/linux/blkdev.h | 1 - 2 files changed, 19 deletions(-) commit 314fe91b4a99949bb720501ba74d2228093bbf47 Author: Christoph Hellwig Date: Wed Apr 12 12:13:57 2017 +0200 block: remove blk_end_request_err and __blk_end_request_err Both functions are entirely unused. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe block/blk-core.c | 39 --------------------------------------- include/linux/blkdev.h | 2 -- 2 files changed, 41 deletions(-) commit ddc34434e424197fc9418e89cf9b805b9aa480fe Merge: 40e00ef df0225a Author: Stephen Boyd Date: Wed Apr 19 09:16:59 2017 -0700 Merge branch 'clk-mt6797' into clk-next * clk-mt6797: clk: mediatek: add mt6797 clock IDs commit df0225a45a8818396d01a3bbd6d1310c25401de2 Author: Mars Cheng Date: Sat Apr 8 09:20:29 2017 +0800 clk: mediatek: add mt6797 clock IDs Signed-off-by: Mars Cheng Signed-off-by: Stephen Boyd include/dt-bindings/clock/mt6797-clk.h | 281 +++++++++++++++++++++++++++++++++ 1 file changed, 281 insertions(+) commit 40e00eff796d997de8041893829b5ffa785508e8 Author: Dong Aisheng Date: Tue Apr 11 10:37:49 2017 +0800 clk: imx7d: add the missing ipg_root_clk Add the missing ipg_root_clk which actually is already used by many orphan clks in current tree. Cc: Shawn Guo Cc: Fabio Estevam Reviewed-by: Stefan Agner Tested-by: Stefan Agner Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx7d.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9a6e904226b26716424bf4ad5b69d591b68119fb Author: Dong Aisheng Date: Tue Apr 11 10:37:48 2017 +0800 clk: clk-imx7d: fix ahb clk definition MX7D ahb clk actually has no LPCG gate, current LPCG offset 0x4200 used actually is for adc, not ahb. After fix, correct ocram_s_clk parent accordingly as well. Cc: Shawn Guo Cc: Fabio Estevam Reviewed-by: Stefan Agner Tested-by: Stefan Agner Signed-off-by: Dong Aisheng Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx7d.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1193e14fddbb5abe4fed49874ab3aab5d4f33b2c Author: Alexey Firago Date: Fri Apr 7 12:12:24 2017 +0300 clk: vc5: Add support for IDT VersaClock 5P49V5935 Update IDT VersaClock 5 driver to support 5P49V5935. This chip has two clock inputs (internal XTAL or external CLKIN), four fractional dividers (FODs) and five clock outputs (four universal clock outputs and one reference clock output at OUT0_SELB_I2C). Current driver supports up to 2 FODs and up to 3 clock outputs. This patch sets max number of supported FODs to 4 and max number of supported clock outputs to 5. Signed-off-by: Alexey Firago Reviewed-by: Marek Vasut Signed-off-by: Stephen Boyd drivers/clk/clk-versaclock5.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit a330b6f5d1aee83fb2554d00ad33877b91a74c0c Author: Alexey Firago Date: Fri Apr 7 12:12:23 2017 +0300 clk: vc5: Add bindings for IDT VersaClock 5P49V5935 IDT VersaClock 5 5P49V5935 has 4 clock outputs, 4 fractional dividers. Input clock source can be taken from either integrated crystal or from external reference clock. Signed-off-by: Alexey Firago Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/idt,versaclock5.txt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 9adddb01ce5f71ae5c26b8aff01335d40be55133 Author: Alexey Firago Date: Fri Apr 7 12:12:22 2017 +0300 clk: vc5: Add structure to describe particular chip features Introduce vc5_chip_info structure to describe features of a particular VC5 chip (id, number of FODs, number of outputs, flags). For now flags are only used to indicate if chip has internal XTAL. vc5_chip_info is set on probe from the matched of_device_id->data. Also add defines to specify maximum number of FODs and clock outputs supported by the driver. With these changes it should be easier to extend driver to support more VC5 models. Signed-off-by: Alexey Firago Reviewed-by: Marek Vasut Signed-off-by: Stephen Boyd drivers/clk/clk-versaclock5.c | 65 +++++++++++++++++++++++++++++++------------ 1 file changed, 47 insertions(+), 18 deletions(-) commit 8b3afdfa48c70144479a2a5ca51a66e96ec60934 Author: Juergen Gross Date: Wed Apr 19 08:47:06 2017 -0700 Input: xen-kbdfront - add module parameter for setting resolution Add a parameter for setting the resolution of xen-kbdfront in order to be able to cope with a (virtual) frame buffer of arbitrary resolution. While at it remove the pointless second reading of parameters from Xenstore in the device connection phase: all parameters are available during device probing already and that is where they should be read. Signed-off-by: Juergen Gross Signed-off-by: Dmitry Torokhov drivers/input/misc/xen-kbdfront.c | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) commit 8062b4aafc67376fb55c0438f26410d0563459ec Merge: e609f9f cb54596 Author: Stephen Boyd Date: Wed Apr 19 09:02:00 2017 -0700 Merge tag 'sunxi-clk-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-next Pull Allwinner clock patches for 4.12 from Maxime Ripard: Support for the new H5 SoC and the PRCM block found in a number of SoCs as well, plus the usual chunk of fixes and minor enhancements. * tag 'sunxi-clk-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: Display index when clock registration fails clk: sunxi-ng: a33: Add offset and minimum value for DDR1 PLL N factor clk: sunxi-ng: a80: Remodel CPU cluster PLLs as N-type multiplier clocks clk: sunxi-ng: mult: Support PLL lock detection clk: sunxi-ng: add support for PRCM CCUs dt-bindings: update device tree binding for Allwinner PRCM CCUs clk: sunxi-ng: sun5i: Fix mux width for csi clock clk: sunxi-ng: tighten SoC deps on explicit AllWinner SoCs clk: sunxi-ng: add Allwinner H5 CCU support for H3 CCU driver clk: sunxi-ng: gate: Support common pre-dividers commit 1b5ad16c7aa7177512ce141e345ff36b9f1a6136 Author: Arnaldo Carvalho de Melo Date: Tue Apr 18 15:39:45 2017 -0300 perf tools: Ditch unused strchrnul() reimplementation Remnants from the git codebase. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-kwaez3uxo1w9f8v5r7etl0w6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/util.h | 16 ---------------- 1 file changed, 16 deletions(-) commit 1eae20c1d40acf7676aa799b48f747d9b28bf352 Author: Arnaldo Carvalho de Melo Date: Tue Apr 18 12:33:30 2017 -0300 perf tools: Remove regex.h and fnmatch.h from util.h The users of regex and fnmatch functions should include those headers instead. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-ixzm5kuamsq1ixbkuv6kmwzj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-report.c | 1 + tools/perf/util/machine.c | 1 + tools/perf/util/sort.c | 1 + tools/perf/util/sort.h | 2 +- tools/perf/util/util.h | 2 -- 5 files changed, 4 insertions(+), 3 deletions(-) commit 76b31a29ddaf2fa5f0a70458c214bed02a4a70e9 Author: Arnaldo Carvalho de Melo Date: Tue Apr 18 12:26:44 2017 -0300 perf tools: Remove include dirent.h from util.h The files using the dirent.h routines should instead include it, reducing the includes hell that lead to longer build times. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-42g2f4z6nfg7mdb2ae97n7tj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 1 + tools/perf/tests/dso-data.c | 1 + tools/perf/tests/parse-events.c | 1 + tools/perf/ui/browsers/hists.c | 1 + tools/perf/util/build-id.c | 1 + tools/perf/util/cpumap.c | 1 + tools/perf/util/event.c | 1 + tools/perf/util/machine.c | 1 + tools/perf/util/parse-events.c | 1 + tools/perf/util/util.c | 1 + tools/perf/util/util.h | 2 +- 11 files changed, 11 insertions(+), 1 deletion(-) commit 767fe71b2d576762c77873021abd95c0a18538e3 Author: Arnaldo Carvalho de Melo Date: Tue Apr 18 12:20:19 2017 -0300 perf tools: Remove misplaced __maybe_unused in some functions Those args _are_ being used. Link: http://lkml.kernel.org/n/tip-yi9s00ki1i1tcc704v042957@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/build-id.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 20a9ed280dde6292c529dfdaaf9ce743ef71bb1f Author: Arnaldo Carvalho de Melo Date: Tue Apr 18 11:44:58 2017 -0300 perf tools: Use api/fs/tracing_path.h where needed Instead of getting it out of luck from util.h, where it isn't needed at all. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-0bqugg5lc5ksla1v4m0dnmc1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-ftrace.c | 1 + tools/perf/tests/parse-events.c | 1 + tools/perf/util/util.h | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) commit 6dcca6df4b73d409628c7b4464c63d4eb9d4d13a Author: Arnaldo Carvalho de Melo Date: Tue Apr 18 11:42:23 2017 -0300 perf tools: No need to include bitops.h in util.h When we switched to the kernel's roundup_pow_of_two we forgot to remove this include from util.h, do it now. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: 91529834d1de ("perf evlist: Use roundup_pow_of_two") Link: http://lkml.kernel.org/n/tip-kfye5rxivib6155cltx0bw4h@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/util.h | 1 - 1 file changed, 1 deletion(-) commit 9a3993d408bc61b839de1a2c6c783477a04860bb Author: Arnaldo Carvalho de Melo Date: Tue Apr 18 11:33:48 2017 -0300 perf tools: Move path related functions to util/path.h Disentangling util.h header mess a bit more. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-aj6je8ly377i4upedmjzdsq6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 1 + tools/perf/tests/mmap-thread-lookup.c | 1 + tools/perf/tests/openat-syscall-all-cpus.c | 4 ++++ tools/perf/tests/openat-syscall.c | 3 +++ tools/perf/ui/setup.c | 1 + tools/perf/util/build-id.c | 1 + tools/perf/util/counts.c | 1 + tools/perf/util/dso.c | 1 + tools/perf/util/path.c | 28 +++++++++++++++++++++++++++- tools/perf/util/path.h | 9 +++++++++ tools/perf/util/symbol.c | 1 + tools/perf/util/symbol.h | 2 +- tools/perf/util/unwind-libdw.c | 1 + tools/perf/util/util.c | 10 ---------- tools/perf/util/util.h | 16 ---------------- 15 files changed, 52 insertions(+), 28 deletions(-) commit b0742e90f5ab904aa835350c28bcec48e9109379 Author: Arnaldo Carvalho de Melo Date: Tue Apr 18 11:08:10 2017 -0300 perf tools: Don't include terminal handling headers in util.h Continuing the disentanglement, mostly the TUI needs CTRL(c), that is in sys/ttydefaults.h and term.c needs the termios headers. And term.h needs to be added to a few places too. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-il19zna7qj9ytavdbwlipc7t@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kvm.c | 1 + tools/perf/builtin-top.c | 1 + tools/perf/ui/browsers/annotate.c | 1 + tools/perf/ui/browsers/header.c | 2 ++ tools/perf/ui/browsers/hists.c | 1 + tools/perf/util/parse-events.c | 2 +- tools/perf/util/term.c | 6 +++++- tools/perf/util/util.h | 4 ---- 8 files changed, 12 insertions(+), 6 deletions(-) commit 8ec20b176c4be72d067fa18e33a4f156d1da9bc8 Author: Arnaldo Carvalho de Melo Date: Tue Apr 18 10:57:25 2017 -0300 perf str{filter,list}: Disentangle headers There are places where we just need a forward declaration, and others were we need to include strlist.h and/or strfilter.h, reducing the impact of changes in headers on the build time, do it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-zab42gbiki88y9k0csorxekb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-report.c | 1 - tools/perf/builtin-timechart.c | 1 - tools/perf/util/bpf-loader.c | 1 + tools/perf/util/build-id.c | 1 + tools/perf/util/build-id.h | 4 +++- tools/perf/util/evsel_fprintf.c | 1 + tools/perf/util/jitdump.c | 1 - tools/perf/util/map.c | 1 - tools/perf/util/parse-events.c | 1 + tools/perf/util/probe-event.c | 1 + tools/perf/util/probe-event.h | 7 +++++-- tools/perf/util/probe-file.c | 1 + tools/perf/util/probe-file.h | 6 ++++-- tools/perf/util/probe-finder.c | 1 + tools/perf/util/sort.c | 1 + tools/perf/util/sort.h | 1 - tools/perf/util/util.h | 3 ++- 17 files changed, 22 insertions(+), 11 deletions(-) commit a43783aeec5fac8ef372ff8c0a5bbb3056fc0604 Author: Arnaldo Carvalho de Melo Date: Tue Apr 18 10:46:11 2017 -0300 perf tools: Include errno.h where needed Removing it from util.h, part of an effort to disentangle the includes hell, that makes changes to util.h or something included by it to cause a complete rebuild of the tools. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-ztrjy52q1rqcchuy3rubfgt2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm64/util/dwarf-regs.c | 1 + tools/perf/arch/powerpc/util/kvm-stat.c | 1 + tools/perf/arch/powerpc/util/perf_regs.c | 1 + tools/perf/arch/s390/util/kvm-stat.c | 1 + tools/perf/arch/x86/tests/intel-cqm.c | 1 + tools/perf/arch/x86/tests/perf-time-to-tsc.c | 1 + tools/perf/arch/x86/util/auxtrace.c | 1 + tools/perf/arch/x86/util/intel-bts.c | 1 + tools/perf/arch/x86/util/intel-pt.c | 1 + tools/perf/arch/x86/util/kvm-stat.c | 1 + tools/perf/arch/x86/util/perf_regs.c | 1 + tools/perf/builtin-annotate.c | 1 + tools/perf/builtin-buildid-cache.c | 1 + tools/perf/builtin-buildid-list.c | 1 + tools/perf/builtin-c2c.c | 1 + tools/perf/builtin-diff.c | 1 + tools/perf/builtin-ftrace.c | 1 + tools/perf/builtin-help.c | 1 + tools/perf/builtin-inject.c | 1 + tools/perf/builtin-kmem.c | 1 + tools/perf/builtin-kvm.c | 1 + tools/perf/builtin-lock.c | 1 + tools/perf/builtin-record.c | 1 + tools/perf/builtin-report.c | 1 + tools/perf/builtin-sched.c | 1 + tools/perf/builtin-script.c | 1 + tools/perf/builtin-stat.c | 1 + tools/perf/builtin-timechart.c | 1 + tools/perf/builtin-trace.c | 1 + tools/perf/perf.c | 1 + tools/perf/tests/attr.c | 1 + tools/perf/tests/backward-ring-buffer.c | 1 + tools/perf/tests/bpf.c | 1 + tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/code-reading.c | 1 + tools/perf/tests/event-times.c | 1 + tools/perf/tests/evsel-roundtrip-name.c | 1 + tools/perf/tests/hists_link.c | 1 + tools/perf/tests/mmap-basic.c | 1 + tools/perf/tests/openat-syscall-all-cpus.c | 1 + tools/perf/tests/openat-syscall-tp-fields.c | 1 + tools/perf/tests/openat-syscall.c | 1 + tools/perf/tests/parse-events.c | 1 + tools/perf/tests/perf-record.c | 1 + tools/perf/tests/pmu.c | 1 + tools/perf/tests/sdt.c | 1 + tools/perf/tests/sw-clock.c | 1 + tools/perf/tests/switch-tracking.c | 1 + tools/perf/tests/task-exit.c | 1 + tools/perf/ui/browsers/hists.c | 1 + tools/perf/util/annotate.c | 1 + tools/perf/util/auxtrace.h | 1 + tools/perf/util/bpf-loader.c | 1 + tools/perf/util/bpf-loader.h | 2 ++ tools/perf/util/bpf-prologue.c | 1 + tools/perf/util/bpf-prologue.h | 2 ++ tools/perf/util/build-id.c | 1 + tools/perf/util/c++/clang-c.h | 1 + tools/perf/util/cloexec.c | 1 + tools/perf/util/comm.c | 1 + tools/perf/util/config.c | 1 + tools/perf/util/counts.c | 1 + tools/perf/util/data-convert-bt.c | 1 + tools/perf/util/data.c | 1 + tools/perf/util/drv_configs.c | 1 + tools/perf/util/dso.c | 1 + tools/perf/util/dwarf-aux.c | 1 + tools/perf/util/env.c | 1 + tools/perf/util/event.c | 1 + tools/perf/util/evlist.c | 1 + tools/perf/util/evsel.c | 1 + tools/perf/util/header.c | 1 + tools/perf/util/hist.c | 1 + tools/perf/util/intel-bts.c | 1 + tools/perf/util/jitdump.c | 1 + tools/perf/util/lzma.c | 1 + tools/perf/util/machine.c | 1 + tools/perf/util/ordered-events.c | 1 + tools/perf/util/parse-events.c | 1 + tools/perf/util/pmu.c | 1 + tools/perf/util/probe-file.c | 1 + tools/perf/util/quote.c | 1 + tools/perf/util/record.c | 1 + tools/perf/util/session.c | 1 + tools/perf/util/sort.c | 1 + tools/perf/util/stat.c | 1 + tools/perf/util/strbuf.c | 1 + tools/perf/util/strfilter.c | 1 + tools/perf/util/symbol-minimal.c | 1 + tools/perf/util/thread-stack.c | 1 + tools/perf/util/thread.c | 1 + tools/perf/util/thread_map.c | 1 + tools/perf/util/unwind-libunwind-local.c | 1 + tools/perf/util/util.h | 1 - tools/perf/util/vdso.c | 2 +- 95 files changed, 96 insertions(+), 2 deletions(-) commit a067558e2fa72445e8f6e6b2dd372a82afae6e49 Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 16:51:59 2017 -0300 perf tools: Move extra string util functions to util/string2.h Moving them from util.h, where they don't belong. Since libc already have string.h, name it slightly differently, as string2.h. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-eh3vz5sqxsrdd8lodoro4jrw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/mem-functions.c | 1 + tools/perf/builtin-script.c | 1 + tools/perf/builtin-stat.c | 1 + tools/perf/builtin-trace.c | 1 + tools/perf/ui/browser.c | 1 + tools/perf/ui/browsers/hists.c | 1 + tools/perf/ui/gtk/hists.c | 1 + tools/perf/ui/stdio/hist.c | 1 + tools/perf/util/annotate.c | 1 + tools/perf/util/dso.c | 1 + tools/perf/util/dwarf-aux.c | 1 + tools/perf/util/event.c | 2 +- tools/perf/util/header.c | 1 + tools/perf/util/parse-events.c | 2 +- tools/perf/util/pmu.c | 1 + tools/perf/util/probe-event.c | 1 + tools/perf/util/probe-file.c | 1 + tools/perf/util/probe-finder.c | 1 + tools/perf/util/strfilter.c | 2 +- tools/perf/util/string.c | 16 +++++++++------ tools/perf/util/string2.h | 42 ++++++++++++++++++++++++++++++++++++++++ tools/perf/util/thread_map.c | 1 + tools/perf/util/util.h | 32 ------------------------------ 23 files changed, 72 insertions(+), 41 deletions(-) commit 632a5cabea21eb079b788d2bb4a9318bd6fff5e1 Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 16:30:49 2017 -0300 perf tools: Move srcline definitions to separate header Out of util.h into a new file, srcline.h Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-ludnlm4djqcdjziekzr4s3u9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 1 + tools/perf/ui/stdio/hist.c | 1 + tools/perf/util/hist.c | 1 + tools/perf/util/map.c | 1 + tools/perf/util/sort.h | 1 + tools/perf/util/srcline.c | 1 + tools/perf/util/srcline.h | 34 ++++++++++++++++++++++++++++++++++ tools/perf/util/util.h | 27 --------------------------- 8 files changed, 40 insertions(+), 27 deletions(-) commit fea013928cdcf81fbe0bfbf9e2eed1c7da2d62c2 Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 16:23:22 2017 -0300 perf tools: Move print_binary definitions to separate files Continuing the split of util.[ch] into more manageable bits. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-5eu367rwcwnvvn7fz09l7xpb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 1 + tools/perf/builtin-trace.c | 1 + tools/perf/tests/is_printable_array.c | 2 +- tools/perf/util/Build | 1 + tools/perf/util/debug.c | 1 + tools/perf/util/print_binary.c | 55 ++++++++++++++++++++++ tools/perf/util/print_binary.h | 28 +++++++++++ tools/perf/util/python-ext-sources | 1 + tools/perf/util/python.c | 1 + .../util/scripting-engines/trace-event-python.c | 1 + tools/perf/util/util.c | 54 --------------------- tools/perf/util/util.h | 23 --------- 12 files changed, 91 insertions(+), 78 deletions(-) commit a12a4e023a55f058178afea1ada3ce7bf4db94c3 Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 16:22:30 2017 -0300 tools include: Include missing headers for fls() and types in linux/log2.h Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-7wj865zidu5ylf87i6i7v6z7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/log2.h | 3 +++ 1 file changed, 3 insertions(+) commit 3d689ed6099a1a11c38bb78aff7498e78e287e0b Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 16:10:49 2017 -0300 perf tools: Move sane ctype stuff from util.h to sane_ctype.h More stuff that came from git, out of the hodge-podge that is util.h Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-e3lana4gctz3ub4hn4y29hkw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/symbol/kallsyms.c | 1 + tools/perf/arch/common.c | 2 ++ tools/perf/builtin-kmem.c | 2 ++ tools/perf/builtin-sched.c | 2 ++ tools/perf/builtin-script.c | 2 ++ tools/perf/builtin-stat.c | 2 ++ tools/perf/builtin-top.c | 2 ++ tools/perf/builtin-trace.c | 2 ++ tools/perf/tests/code-reading.c | 3 ++- tools/perf/ui/browser.c | 1 + tools/perf/ui/browsers/hists.c | 2 ++ tools/perf/ui/browsers/map.c | 2 ++ tools/perf/ui/stdio/hist.c | 2 +- tools/perf/util/annotate.c | 2 ++ tools/perf/util/auxtrace.c | 5 ++-- tools/perf/util/build-id.c | 1 + tools/perf/util/config.c | 2 ++ tools/perf/util/cpumap.c | 2 ++ tools/perf/util/ctype.c | 2 +- tools/perf/util/data-convert-bt.c | 1 + tools/perf/util/debug.c | 2 ++ tools/perf/util/demangle-java.c | 2 ++ tools/perf/util/event.c | 1 + tools/perf/util/evsel.c | 2 ++ tools/perf/util/header.c | 2 ++ tools/perf/util/jitdump.c | 2 ++ tools/perf/util/machine.c | 4 ++- tools/perf/util/probe-event.c | 2 ++ tools/perf/util/probe-finder.h | 2 +- tools/perf/util/sane_ctype.h | 51 +++++++++++++++++++++++++++++++++++++ tools/perf/util/strfilter.c | 2 ++ tools/perf/util/string.c | 2 ++ tools/perf/util/symbol-elf.c | 3 ++- tools/perf/util/symbol.c | 1 + tools/perf/util/trace-event-parse.c | 3 ++- tools/perf/util/util.c | 2 ++ tools/perf/util/util.h | 46 --------------------------------- 37 files changed, 114 insertions(+), 55 deletions(-) commit 28a9bb9621d9f8b4328048297cd306e09fbbf175 Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 15:39:06 2017 -0300 perf tools: Ditch unused PATH_SEP, STRIP_EXTENSION Should make sense for windows, where git is supported. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-lzxlhmqrizk72d0zcsreggy8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/perf.c | 10 ---------- tools/perf/util/util.h | 16 ---------------- 2 files changed, 26 deletions(-) commit aa8cc2f6b5faae3511ea229846d8e54bd8df40d1 Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 15:36:40 2017 -0300 perf tools: Replace STR() calls with __stringify() Both do the same thing, the later is the one we get from linux/stringify.h, i.e. we now use the same function name/practice as the kernel sources. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-w2sxa5o4bfx7fjrd5mu4zmke@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm/util/dwarf-regs.c | 4 ++-- tools/perf/arch/arm64/util/dwarf-regs.c | 3 ++- tools/perf/arch/powerpc/util/dwarf-regs.c | 5 +++-- tools/perf/util/cgroup.c | 5 +++-- tools/perf/util/jitdump.c | 3 ++- tools/perf/util/util.h | 3 --- 6 files changed, 12 insertions(+), 11 deletions(-) commit c3dca1a1c0ec51f384515f7e6f3b4e289a1dea2f Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 15:25:00 2017 -0300 perf tools: Remove PRI[xu] macros from perf.h We get them from inttypes.h. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-qla4e4mwbf1oewafp1ee2etd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/util.h | 20 -------------------- 1 file changed, 20 deletions(-) commit fd20e8111cc0e51ce12fb8ee17c863088fe95065 Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 15:23:08 2017 -0300 perf tools: Including missing inttypes.h header Needed to use the PRI[xu](32,64) formatting macros. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-wkbho8kaw24q67dd11q0j39f@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/tests/perf-time-to-tsc.c | 1 + tools/perf/bench/numa.c | 1 + tools/perf/builtin-c2c.c | 1 + tools/perf/builtin-diff.c | 1 + tools/perf/builtin-kallsyms.c | 1 + tools/perf/builtin-kmem.c | 1 + tools/perf/builtin-kvm.c | 1 + tools/perf/builtin-lock.c | 1 + tools/perf/builtin-mem.c | 1 + tools/perf/builtin-record.c | 1 + tools/perf/builtin-report.c | 1 + tools/perf/builtin-sched.c | 1 + tools/perf/builtin-script.c | 1 + tools/perf/builtin-stat.c | 1 + tools/perf/builtin-timechart.c | 1 + tools/perf/builtin-trace.c | 1 + tools/perf/tests/attr.c | 1 + tools/perf/tests/code-reading.c | 1 + tools/perf/tests/dwarf-unwind.c | 1 + tools/perf/tests/event-times.c | 1 + tools/perf/tests/hists_common.c | 1 + tools/perf/tests/mmap-basic.c | 1 + tools/perf/tests/mmap-thread-lookup.c | 1 + tools/perf/tests/openat-syscall-all-cpus.c | 1 + tools/perf/tests/openat-syscall.c | 1 + tools/perf/tests/perf-record.c | 1 + tools/perf/tests/sample-parsing.c | 1 + tools/perf/tests/sw-clock.c | 1 + tools/perf/tests/unit_number__scnprintf.c | 1 + tools/perf/tests/vmlinux-kallsyms.c | 1 + tools/perf/ui/browsers/annotate.c | 1 + tools/perf/ui/browsers/hists.c | 1 + tools/perf/ui/gtk/annotate.c | 2 +- tools/perf/ui/hist.c | 1 + tools/perf/util/annotate.c | 1 + tools/perf/util/auxtrace.c | 1 + tools/perf/util/callchain.c | 1 + tools/perf/util/data-convert-bt.c | 1 + tools/perf/util/debug.c | 1 + tools/perf/util/dwarf-aux.c | 1 + tools/perf/util/event.c | 1 + tools/perf/util/evlist.c | 1 + tools/perf/util/evsel.c | 1 + tools/perf/util/evsel_fprintf.c | 1 + tools/perf/util/header.c | 1 + tools/perf/util/intel-bts.c | 1 + tools/perf/util/intel-pt.c | 1 + tools/perf/util/machine.c | 1 + tools/perf/util/ordered-events.c | 1 + tools/perf/util/probe-event.c | 1 + tools/perf/util/probe-finder.c | 1 + tools/perf/util/scripting-engines/trace-event-perl.c | 1 + tools/perf/util/scripting-engines/trace-event-python.c | 1 + tools/perf/util/session.c | 1 + tools/perf/util/sort.c | 1 + tools/perf/util/srcline.c | 1 + tools/perf/util/stat.c | 1 + tools/perf/util/unwind-libunwind-local.c | 1 + tools/perf/util/util.c | 1 + 59 files changed, 59 insertions(+), 1 deletion(-) commit b640985fe40c7446fa5db467e747fbac5c081c86 Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 12:13:25 2017 -0300 perf tools: Remove unused macros from util.h TYPEOF(), for instance, was only used by MSB() that wasn't used at all, besides typeof() is used in many places, should be the preferred way. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-golox8oa2w1oq28snki14z6s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/util.h | 12 ------------ 1 file changed, 12 deletions(-) commit 68289cbd83eaa20faef7cc818121bc8e769065de Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 12:01:36 2017 -0300 tools include: Drop ARRAY_SIZE() definition from linux/hashtable.h As tools/include/linux/kernel.h has it now, with the goodies present in the kernel.h counterpart, i.e. checking that the parameter is an array at build time. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-v0b41ivu6z6dyugbq9ffa9ez@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/hashtable.h | 4 ---- 1 file changed, 4 deletions(-) commit 0061459744cb985ef31a484bcd9b2fc3cfd01c1b Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 11:58:55 2017 -0300 objtool: Drop ARRAY_SIZE() definition, tools/include/linux/kernel.h has it now And with the goodies present in the kernel.h counterpart, i.e. checking that the parameter is an array at build time. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-roiwxwgwgld4kygn65if60wa@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/objtool/builtin-check.c | 3 +-- tools/objtool/objtool.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 877a7a11050ee4d465364c57f8fbf78f6b1a2559 Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 11:39:06 2017 -0300 perf tools: Add include where ARRAY_SIZE() is used To pave the way for further cleanups where linux/kernel.h may stop being included in some header. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-qqxan6tfsl6qx3l0v3nwgjvk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/numa.c | 1 + tools/perf/builtin-help.c | 1 + tools/perf/builtin-kmem.c | 1 + tools/perf/builtin-kvm.c | 1 + tools/perf/builtin-lock.c | 1 + tools/perf/builtin-sched.c | 1 + tools/perf/builtin-script.c | 1 + tools/perf/builtin-timechart.c | 1 + tools/perf/builtin-trace.c | 1 + tools/perf/perf.c | 1 + tools/perf/tests/bpf.c | 1 + tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/clang.c | 1 + tools/perf/tests/code-reading.c | 1 + tools/perf/tests/dso-data.c | 1 + tools/perf/tests/evsel-roundtrip-name.c | 1 + tools/perf/tests/hists_common.c | 1 + tools/perf/tests/hists_cumulate.c | 1 + tools/perf/tests/hists_filter.c | 1 + tools/perf/tests/hists_link.c | 1 + tools/perf/tests/hists_output.c | 1 + tools/perf/tests/is_printable_array.c | 1 + tools/perf/tests/mmap-basic.c | 1 + tools/perf/tests/parse-events.c | 2 +- tools/perf/tests/parse-no-sample-id-all.c | 1 + tools/perf/tests/pmu.c | 1 + tools/perf/tests/sample-parsing.c | 1 + tools/perf/ui/browsers/annotate.c | 1 + tools/perf/ui/tui/setup.c | 1 + tools/perf/util/annotate.c | 1 + tools/perf/util/bpf-loader.c | 1 + tools/perf/util/data-convert-bt.c | 1 + tools/perf/util/dso.c | 1 + tools/perf/util/dwarf-regs.c | 1 + tools/perf/util/event.c | 1 + tools/perf/util/evlist.h | 1 + tools/perf/util/mem-events.c | 1 + tools/perf/util/perf-hooks.c | 1 + tools/perf/util/session.h | 1 + tools/perf/util/sort.c | 1 + tools/perf/util/symbol.c | 1 + tools/perf/util/thread.c | 1 + 42 files changed, 42 insertions(+), 1 deletion(-) commit 8607c1ee734d12f62c6a46abef13a510e25a1839 Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 11:29:26 2017 -0300 tools include: Move ARRAY_SIZE() to linux/kernel.h To match the kernel, then look for places redefining it to make it use this version, which checks that its parameter is an array at build time. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-txlcf1im83bcbj6kh0wxmyy8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/kernel.h | 3 +++ tools/perf/util/util.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) commit f6441aff8946f7fd6ab730d7eb9eba18a9ebeba4 Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 11:25:00 2017 -0300 tools include: Adopt __same_type() and __must_be_array() from the kernel Will be used to adopt the more stringent version of ARRAY_SIZE(), the one in the kernel sources. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-d85dpvay1hoqscpezlntyd8x@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/compiler-gcc.h | 3 +++ tools/include/linux/compiler.h | 5 +++++ 2 files changed, 8 insertions(+) commit 379d61b1c7d42512cded04d372f15a7e725db9e1 Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 11:23:41 2017 -0300 tools include: Introduce linux/bug.h, from the kernel sources With just what we will need in the upcoming changesets, the BUILD_BUG_ON_ZERO() definition. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-lw8zg7x6ttwcvqhp90mwe3vo@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/bug.h | 10 ++++++++++ tools/perf/MANIFEST | 1 + 2 files changed, 11 insertions(+) commit 7909675daf55e8222b40e5e162bbc9d633bd5bac Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 11:08:20 2017 -0300 perf tools: Remove FLEX_ARRAY definition We rely on symbol->name[0] since the beginning of tools/perf/, never having received any complaint about it, also all the containers build perf just fine, so remove this git codebase remnant. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-jsjpgojut8e22o2gtz83augk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-help.c | 4 ++-- tools/perf/util/util.h | 22 ---------------------- 2 files changed, 2 insertions(+), 24 deletions(-) commit 4c38c8f5d2c8c48dcf502cd039f30cb1f82fe63c Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 12:49:58 2017 -0300 perf unwind arm64: Add missing errno.h header Since it uses EINVAL unconditionally, it needs to also unconditionally include errno.h. Detected when recent changes made errno.h not be included by chance when tools/perf/arch/arm64/util/unwind-libunwind.c gets included by tools/perf/util/libunwind/arm64.c. Putting this changeset just before that change so that we don't lose bisectability on arm64. Cc: Adrian Hunter Cc: David Ahern Cc: Jean Pihet Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: 8ab596afb97b ("perf tools ARM64: Wire up perf_regs and unwind support") Link: http://lkml.kernel.org/n/tip-60zjev2o1locp5ivod38epa2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm64/util/unwind-libunwind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5cd5b1bdfb0137d0e814a51ff203d72c76b9f375 Author: Jerónimo Borque Date: Wed Apr 19 12:09:50 2017 -0300 ALSA: hda - Add HP ZBook 15u G3 Conexant CX20724 GPIO mute leds The HP ZBook 15u G3 has a Conexant CX20724 with mute led on GPIO1 and mic mute led on GPIO2. Adding CXT_FIXUP_MUTE_LED_GPIO inspired on patch_realtek's one. Signed-off-by: Jerónimo Borque Signed-off-by: Takashi Iwai sound/pci/hda/patch_conexant.c | 81 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit ca9ae5ec4ef0ed13833b03297ab319676965492c Author: Fu Wei Date: Sat Apr 1 01:51:05 2017 +0800 acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver This driver adds support for parsing SBSA Generic Watchdog timer in GTDT, parse all info in SBSA Generic Watchdog Structure in GTDT, and creating a platform device with that information. This allows the operating system to obtain device data from the resource of platform device. The platform device named "sbsa-gwdt" can be used by the ARM SBSA Generic Watchdog driver. Signed-off-by: Fu Wei Signed-off-by: Hanjun Guo Tested-by: Xiongfeng Wang Reviewed-by: Lorenzo Pieralisi Signed-off-by: Mark Rutland drivers/acpi/arm64/gtdt.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) commit c2743a36765d337fad589b5c30b47c297a207194 Author: Fu Wei Date: Sat Apr 1 01:51:04 2017 +0800 clocksource: arm_arch_timer: add GTDT support for memory-mapped timer The patch add memory-mapped timer register support by using the information provided by the new GTDT driver of ACPI. Signed-off-by: Fu Wei Reviewed-by: Hanjun Guo [Mark: verify CNTFRQ, only register the first frame] Signed-off-by: Mark Rutland drivers/clocksource/arm_arch_timer.c | 79 ++++++++++++++++++++++++++++++++++-- 1 file changed, 76 insertions(+), 3 deletions(-) commit a712c3ed9b8a4565a200f3e8e09c42079b1666b3 Author: Fu Wei Date: Sat Apr 1 01:51:03 2017 +0800 acpi/arm64: Add memory-mapped timer support in GTDT driver On platforms booting with ACPI, architected memory-mapped timers' configuration data is provided by firmware through the ACPI GTDT static table. The clocksource architected timer kernel driver requires a firmware interface to collect timer configuration and configure its driver. this infrastructure is present for device tree systems, but it is missing on systems booting with ACPI. Implement the kernel infrastructure required to parse the static ACPI GTDT table so that the architected timer clocksource driver can make use of it on systems booting with ACPI, therefore enabling the corresponding timers configuration. Signed-off-by: Fu Wei Signed-off-by: Hanjun Guo Acked-by: Lorenzo Pieralisi [Mark: restructure error handling] Signed-off-by: Mark Rutland drivers/acpi/arm64/gtdt.c | 157 ++++++++++++++++++++++++++++++++++++++++++++++ include/linux/acpi.h | 1 + 2 files changed, 158 insertions(+) commit 122868b378094853b376f3e2ac833bcee078eb3c Author: Gao Feng Date: Wed Apr 19 09:23:42 2017 +0800 netfilter: tcp: Use TCP_MAX_WSCALE instead of literal 14 The window scale may be enlarged from 14 to 15 according to the itef draft https://tools.ietf.org/html/draft-nishida-tcpm-maxwin-03. Use the macro TCP_MAX_WSCALE to support it easily with TCP stack in the future. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto_tcp.c | 7 +++---- net/netfilter/nf_synproxy_core.c | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) commit be7be6e161a218e92c4e46b97ba59c1e40cfea9c Author: Florian Westphal Date: Tue Apr 18 17:49:56 2017 +0200 netfilter: ipvs: fix incorrect conflict resolution The commit ab8bc7ed864b9c4f1fcb00a22bbe4e0f66ce8003 ("netfilter: remove nf_ct_is_untracked") changed the line if (ct && !nf_ct_is_untracked(ct) && nfct_nat(ct)) { to if (ct && nfct_nat(ct)) { meanwhile, the commit 41390895e50bc4f28abe384c6b35ac27464a20ec ("netfilter: ipvs: don't check for presence of nat extension") from ipvs-next had changed the same line to if (ct && !nf_ct_is_untracked(ct) && (ct->status & IPS_NAT_MASK)) { When ipvs-next got merged into nf-next, the merge resolution took the first version, dropping the conversion of nfct_nat(). While this doesn't cause a problem at the moment, it will once we stop adding the nat extension by default. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_ftp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 01026edef9062b7d26ace74a5b4a5a33a2399501 Author: Florian Westphal Date: Tue Apr 18 17:27:32 2017 +0200 nefilter: eache: reduce struct size from 32 to 24 byte Only "cache" needs to use ulong (its used with set_bit()), missed can use u16. Also add build-time assertion to ensure event bits fit. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_ecache.h | 4 ++-- include/uapi/linux/netfilter/nf_conntrack_common.h | 3 +++ net/netfilter/nf_conntrack_ecache.c | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) commit c6dd940b1f747bee62865e348d360f602057196e Author: Florian Westphal Date: Sun Apr 16 22:08:53 2017 +0200 netfilter: allow early drop of assured conntracks If insertion of a new conntrack fails because the table is full, the kernel searches the next buckets of the hash slot where the new connection was supposed to be inserted at for an entry that hasn't seen traffic in reply direction (non-assured), if it finds one, that entry is is dropped and the new connection entry is allocated. Allow the conntrack gc worker to also remove *assured* conntracks if resources are low. Do this by querying the l4 tracker, e.g. tcp connections are now dropped if they are no longer established (e.g. in finwait). This could be refined further, e.g. by adding 'soft' established timeout (i.e., a timeout that is only used once we get close to resource exhaustion). Cc: Jozsef Kadlecsik Signed-off-by: Florian Westphal Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_l4proto.h | 3 ++ net/netfilter/nf_conntrack_core.c | 49 ++++++++++++++++++++++++++++ net/netfilter/nf_conntrack_proto_dccp.c | 16 +++++++++ net/netfilter/nf_conntrack_proto_sctp.c | 16 +++++++++ net/netfilter/nf_conntrack_proto_tcp.c | 18 ++++++++++ 5 files changed, 102 insertions(+) commit b3a5db109e0670d6d168e9cd9de4d272a68f7c35 Author: Florian Westphal Date: Sun Apr 16 01:29:19 2017 +0200 netfilter: conntrack: use u8 for extension sizes again commit 223b02d923ecd7c84cf9780bb3686f455d279279 ("netfilter: nf_conntrack: reserve two bytes for nf_ct_ext->len") had to increase size of the extension offsets because total size of the extensions had increased to a point where u8 did overflow. 3 years later we've managed to diet extensions a bit and we no longer need u16. Furthermore we can now add a compile-time assertion for this problem. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_extend.h | 4 ++-- net/netfilter/nf_conntrack_core.c | 33 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) commit faec865db9a79e7452d7fc01a4a409b06d02b479 Author: Florian Westphal Date: Sun Apr 16 01:29:18 2017 +0200 netfilter: remove last traces of variable-sized extensions get rid of the (now unused) nf_ct_ext_add_length define and also rename the function to plain nf_ct_ext_add(). Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_extend.h | 8 +------- net/netfilter/nf_conntrack_extend.c | 16 +++++++--------- 2 files changed, 8 insertions(+), 16 deletions(-) commit 9f0f3ebeda47a5518817f33c40f6d3ea9c0275b8 Author: Florian Westphal Date: Sun Apr 16 01:29:17 2017 +0200 netfilter: helpers: remove data_len usage for inkernel helpers No need to track this for inkernel helpers anymore as NF_CT_HELPER_BUILD_BUG_ON checks do this now. All inkernel helpers know what kind of structure they stored in helper->data. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_helper.h | 11 ++++++----- net/netfilter/nf_conntrack_ftp.c | 6 ++---- net/netfilter/nf_conntrack_h323_main.c | 4 ---- net/netfilter/nf_conntrack_helper.c | 6 ++---- net/netfilter/nf_conntrack_irc.c | 2 +- net/netfilter/nf_conntrack_pptp.c | 1 - net/netfilter/nf_conntrack_sane.c | 6 ++---- net/netfilter/nf_conntrack_sip.c | 12 ++++-------- net/netfilter/nf_conntrack_tftp.c | 4 ++-- 9 files changed, 19 insertions(+), 33 deletions(-) commit 157ffffeb5dc1b5bbeeef4d4349ab65ba5f42f4e Author: Florian Westphal Date: Sun Apr 16 01:29:16 2017 +0200 netfilter: nfnetlink_cthelper: reject too large userspace allocation requests Userspace should not abuse the kernel to store large amounts of data, reject requests larger than the private area can accommodate. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_cthelper.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit dcf67740f22d31be685d7172f05b289c8243ea12 Author: Florian Westphal Date: Sun Apr 16 01:29:15 2017 +0200 netfilter: helper: add build-time asserts for helper data size add a 32 byte scratch area in the helper struct instead of relying on variable sized helpers plus compile-time asserts to let us know if 32 bytes aren't enough anymore. Not having variable sized helpers will later allow to add BUILD_BUG_ON for the total size of conntrack extensions -- the helper extension is the only one that doesn't have a fixed size. The (useless!) NF_CT_HELPER_BUILD_BUG_ON(0); are added so that in case someone adds a new helper and copy-pastes from one that doesn't store private data at least some indication that this macro should be used somehow is there... Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_helper.h | 5 ++++- net/netfilter/nf_conntrack_amanda.c | 2 ++ net/netfilter/nf_conntrack_ftp.c | 2 ++ net/netfilter/nf_conntrack_h323_main.c | 2 ++ net/netfilter/nf_conntrack_netbios_ns.c | 2 ++ net/netfilter/nf_conntrack_pptp.c | 2 ++ net/netfilter/nf_conntrack_sane.c | 2 ++ net/netfilter/nf_conntrack_sip.c | 2 ++ net/netfilter/nf_conntrack_tftp.c | 2 ++ 9 files changed, 20 insertions(+), 1 deletion(-) commit 906535b04671c84ec8731030d4968570d8d2a16c Author: Florian Westphal Date: Sun Apr 16 01:29:14 2017 +0200 netfilter: conntrack: move helper struct to nf_conntrack_helper.h its definition is not needed in nf_conntrack.h. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack.h | 19 ------------------- include/net/netfilter/nf_conntrack_helper.h | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 19 deletions(-) commit 694a0055f039bc1d73aba10606ea74e798d2d759 Author: Florian Westphal Date: Sat Apr 15 19:26:10 2017 +0200 netfilter: nft_ct: allow to set ctnetlink event types of a connection By default the kernel emits all ctnetlink events for a connection. This allows to select the types of events to generate. This can be used to e.g. only send DESTROY events but no NEW/UPDATE ones and will work even if sysctl net.netfilter.nf_conntrack_events is set to 0. This was already possible via iptables' CT target, but the nft version has the advantage that it can also be used with already-established conntracks. The added nf_ct_is_template() check isn't a bug fix as we only support mark and labels (and unlike ecache the conntrack core doesn't copy those). Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 2 ++ net/netfilter/nft_ct.c | 25 ++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) commit cffcd9df10daa753610d79f018466f9c61603b97 Author: Marc Zyngier Date: Mon Apr 10 10:19:44 2017 +0100 KVM: arm/arm64: vgic-v3: Fix off-by-one LR access When iterating over the used LRs, be careful not to try to access an unused LR, or even an unimplemented one if you're unlucky... Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/hyp/vgic-v3-sr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff567614d58551b650a2375b50be368fbfed5cd5 Author: Marc Zyngier Date: Wed Apr 19 12:15:26 2017 +0100 KVM: arm/arm64: vgic-v3: De-optimize VMCR save/restore when emulating a GICv2 When emulating a GICv2-on-GICv3, special care must be taken to only save/restore VMCR_EL2 when ICC_SRE_EL1.SRE is cleared. Otherwise, all Group-0 interrupts end-up being delivered as FIQ, which is probably not what the guest expects, as demonstrated here with an unhappy EFI: FIQ Exception at 0x000000013BD21CC4 This means that we cannot perform the load/put trick when dealing with VMCR_EL2 (because the host has SRE set), and we have to deal with it in the world-switch. Fortunately, this is not the most common case (modern guests should be able to deal with GICv3 directly), and the performance is not worse than what it was before the VMCR optimization. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/hyp/vgic-v3-sr.c | 8 ++++++-- virt/kvm/arm/vgic/vgic-v3.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) commit 6c7a5dce22b3f3cc44be098e2837fa6797edb8b8 Author: Andrew Jones Date: Tue Apr 18 17:59:58 2017 +0200 KVM: arm/arm64: fix races in kvm_psci_vcpu_on Fix potential races in kvm_psci_vcpu_on() by taking the kvm->lock mutex. In general, it's a bad idea to allow more than one PSCI_CPU_ON to process the same target VCPU at the same time. One such problem that may arise is that one PSCI_CPU_ON could be resetting the target vcpu, which fills the entire sys_regs array with a temporary value including the MPIDR register, while another looks up the VCPU based on the MPIDR value, resulting in no target VCPU found. Resolves both races found with the kvm-unit-tests/arm/psci unit test. Reviewed-by: Marc Zyngier Reviewed-by: Christoffer Dall Reported-by: Levente Kurusa Suggested-by: Christoffer Dall Signed-off-by: Andrew Jones Cc: stable@vger.kernel.org Signed-off-by: Christoffer Dall arch/arm/kvm/psci.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit f79d209405fada700047245ed1a152bab8d6535e Author: Fu Wei Date: Sat Apr 1 01:51:02 2017 +0800 clocksource: arm_arch_timer: simplify ACPI support code. The patch update arm_arch_timer driver to use the function provided by the new GTDT driver of ACPI. By this way, arm_arch_timer.c can be simplified, and separate all the ACPI GTDT knowledge from this timer driver. Signed-off-by: Fu Wei Signed-off-by: Hanjun Guo Tested-by: Xiongfeng Wang Reviewed-by: Hanjun Guo Tested-by: Hanjun Guo Signed-off-by: Mark Rutland drivers/clocksource/arm_arch_timer.c | 40 +++++++++--------------------------- 1 file changed, 10 insertions(+), 30 deletions(-) commit 5f1ae4ebe578319a0cd5dae9591dd426070be106 Author: Fu Wei Date: Sat Apr 1 01:51:01 2017 +0800 acpi/arm64: Add GTDT table parse driver This patch adds support for parsing arch timer info in GTDT, provides some kernel APIs to parse all the PPIs and always-on info in GTDT and export them. By this driver, we can simplify arm_arch_timer drivers, and separate the ACPI GTDT knowledge from it. Signed-off-by: Fu Wei Signed-off-by: Hanjun Guo Acked-by: Rafael J. Wysocki Tested-by: Xiongfeng Wang Reviewed-by: Hanjun Guo Tested-by: Hanjun Guo Acked-by: Lorenzo Pieralisi Signed-off-by: Mark Rutland arch/arm64/Kconfig | 1 + drivers/acpi/arm64/Kconfig | 3 + drivers/acpi/arm64/Makefile | 1 + drivers/acpi/arm64/gtdt.c | 157 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/acpi.h | 6 ++ 5 files changed, 168 insertions(+) commit c389d701dfb70154edf896f0f9c40d2857ca2d90 Author: Fu Wei Date: Sat Apr 1 01:51:00 2017 +0800 clocksource: arm_arch_timer: split MMIO timer probing. Currently the code to probe MMIO architected timers mixes DT parsing with actual poking of hardware. This makes the code harder than necessary to understand, and makes it difficult to add support for probing via ACPI. This patch splits the DT parsing from HW probing. The DT parsing now lives in arch_timer_mem_of_init(), which fills in an arch_timer_mem structure that it hands to probing functions that can be reused for ACPI support. Since the rate detection logic will be slight different when using ACPI, the probing is performed as a number of steps. This results in more code for the moment, and some arguably redundant work, but simplifies matters considerably when ACPI support is added. Signed-off-by: Fu Wei [Mark: refactor the probing split] Signed-off-by: Mark Rutland drivers/clocksource/arm_arch_timer.c | 189 +++++++++++++++++++++++++++-------- 1 file changed, 145 insertions(+), 44 deletions(-) commit b3251b8fd12337bf04bce46d4af35988742eef95 Author: Fu Wei Date: Sat Apr 1 01:50:59 2017 +0800 clocksource: arm_arch_timer: add structs to describe MMIO timer In preparation for ACPI GTDT support, this patch adds structs to describe the MMIO timers indepedent of the firmware interface. Subsequent patches will use these to split the FW/HW probing logic, so that the HW probing logic can be shared by ACPI and DT. Signed-off-by: Fu Wei Reviewed-by: Hanjun Guo Signed-off-by: Mark Rutland include/clocksource/arm_arch_timer.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit ca0e1b5214eee56a7fc4c7a5399323ab0bad73ef Author: Fu Wei Date: Wed Mar 22 00:31:15 2017 +0800 clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT init call To cleanly split code paths specific to ACPI or DT at a higher level, this patch removes arch_timer_init(), folding the relevant parts of its logic into existing callers. This pathes the way for further rework, and saves a few lines. Signed-off-by: Fu Wei Reviewed-by: Hanjun Guo [Mark: reword commit message] Signed-off-by: Mark Rutland drivers/clocksource/arm_arch_timer.c | 46 ++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 25 deletions(-) commit 13bf6992fe5496d56101b5d57fbdae2ee91184f2 Author: Fu Wei Date: Wed Mar 22 00:31:14 2017 +0800 clocksource: arm_arch_timer: refactor arch_timer_needs_probing When booting with DT, it's possible for timer nodes to be probed in any order. Some common initialisation needs to occur after all nodes have been probed, and arch_timer_common_init() has code to detect when this has happened. This logic is DT-specific, and it would be best to factor it out of the common code that will be shared with ACPI. This patch folds this into the existing arch_timer_needs_probing(), which is renamed to arch_timer_needs_of_probing(), and no longer takes any arguments. This is only called when using DT, and not when using ACPI, which will have a deterministic probe order. Signed-off-by: Fu Wei Reviewed-by: Hanjun Guo [Mark: reword commit message] Signed-off-by: Mark Rutland drivers/clocksource/arm_arch_timer.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit 5d3dfa96c7a202f3a70ebeb6f8bb5005c1547250 Author: Fu Wei Date: Wed Mar 22 00:31:13 2017 +0800 clocksource: arm_arch_timer: split dt-only rate handling For historical reasons, rate detection when probing via DT is somewhat convoluted. We tried to package this up in arch_timer_detect_rate(), but with the addition of ACPI worse, and gets in the way of stringent rate checking when ACPI is used. This patch makes arch_timer_detect_rate() specific to DT, ripping out ACPI logic. In preparation for rework of the MMIO timer probing, the reading of the relevant CNTFRQ register is factored out to callers. The function is then renamed to arch_timer_of_configure_rate(), which better represents its new place in the world. Comments are added in the DT and ACPI probe paths to explain this. Signed-off-by: Fu Wei [Mark: reword commit message] Signed-off-by: Mark Rutland drivers/clocksource/arm_arch_timer.c | 41 ++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 18 deletions(-) commit 100815522c672a27c71bd2267b1cd41cd131e30c Author: Christoph Hellwig Date: Wed Apr 12 18:01:06 2017 +0200 block: remove the osdblk driver This was just a proof of concept user for the SCSI OSD library, and never had any real users. Signed-off-by: Christoph Hellwig Acked-by: Boaz Harrosh Signed-off-by: Jens Axboe drivers/block/Kconfig | 16 -- drivers/block/Makefile | 1 - drivers/block/osdblk.c | 693 ------------------------------------------------- 3 files changed, 710 deletions(-) commit 8330cdb0fe55c9a9a8e440e56c19233229e0e259 Author: Jan Kara Date: Wed Apr 19 11:33:27 2017 +0200 block: Make writeback throttling defaults consistent for SQ devices When CFQ is used as an elevator, it disables writeback throttling because they don't play well together. Later when a different elevator is chosen for the device, writeback throttling doesn't get enabled again as it should. Make sure CFQ enables writeback throttling (if it should be enabled by default) when we switch from it to another IO scheduler. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe block/blk-sysfs.c | 19 +------------------ block/blk-wbt.c | 19 +++++++++++++++++++ block/blk-wbt.h | 4 ++++ block/elevator.c | 3 +++ 4 files changed, 27 insertions(+), 18 deletions(-) commit ea25da48086d3bbebf3a2eeff387ea00ed96f5c4 Author: Paolo Valente Date: Wed Apr 19 08:48:24 2017 -0600 block, bfq: split bfq-iosched.c into multiple source files The BFQ I/O scheduler features an optimal fair-queuing (proportional-share) scheduling algorithm, enriched with several mechanisms to boost throughput and reduce latency for interactive and real-time applications. This makes BFQ a large and complex piece of code. This commit addresses this issue by splitting BFQ into three main, independent components, and by moving each component into a separate source file: 1. Main algorithm: handles the interaction with the kernel, and decides which requests to dispatch; it uses the following two further components to achieve its goals. 2. Scheduling engine (Hierarchical B-WF2Q+ scheduling algorithm): computes the schedule, using weights and budgets provided by the above component. 3. cgroups support: handles group operations (creation, destruction, move, ...). Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/Makefile | 3 +- block/bfq-cgroup.c | 1139 +++++++++++++++ block/bfq-iosched.c | 3925 +++------------------------------------------------ block/bfq-iosched.h | 942 +++++++++++++ block/bfq-wf2q.c | 1616 +++++++++++++++++++++ 5 files changed, 3869 insertions(+), 3756 deletions(-) commit 6fa3e8d34204d532268ddb4dc5d2a904197c972d Author: Paolo Valente Date: Wed Apr 12 18:23:21 2017 +0200 block, bfq: remove all get and put of I/O contexts When a bfq queue is set in service and when it is merged, a reference to the I/O context associated with the queue is taken. This reference is then released when the queue is deselected from service or split. More precisely, the release of the reference is postponed to when the scheduler lock is released, to avoid nesting between the scheduler and the I/O-context lock. In fact, such nesting would lead to deadlocks, because of other code paths that take the same locks in the opposite order. This postponing of I/O-context releases does complicate code. This commit addresses these issue by modifying involved operations in such a way to not need to get the above I/O-context references any more. Then it also removes any get and release of these references. Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 143 +++++++++------------------------------------------- 1 file changed, 23 insertions(+), 120 deletions(-) commit e1b2324dd065880a3200098fe3637ac171c296e6 Author: Arianna Avanzini Date: Wed Apr 12 18:23:20 2017 +0200 block, bfq: handle bursts of queue activations Many popular I/O-intensive services or applications spawn or reactivate many parallel threads/processes during short time intervals. Examples are systemd during boot or git grep. These services or applications benefit mostly from a high throughput: the quicker the I/O generated by their processes is cumulatively served, the sooner the target job of these services or applications gets completed. As a consequence, it is almost always counterproductive to weight-raise any of the queues associated to the processes of these services or applications: in most cases it would just lower the throughput, mainly because weight-raising also implies device idling. To address this issue, an I/O scheduler needs, first, to detect which queues are associated with these services or applications. In this respect, we have that, from the I/O-scheduler standpoint, these services or applications cause bursts of activations, i.e., activations of different queues occurring shortly after each other. However, a shorter burst of activations may be caused also by the start of an application that does not consist in a lot of parallel I/O-bound threads (see the comments on the function bfq_handle_burst for details). In view of these facts, this commit introduces: 1) an heuristic to detect (only) bursts of queue activations caused by services or applications consisting in many parallel I/O-bound threads; 2) the prevention of device idling and weight-raising for the queues belonging to these bursts. Signed-off-by: Arianna Avanzini Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 404 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 389 insertions(+), 15 deletions(-) commit e01eff01d5c81f4dbba186299b16b08aa7316d5b Author: Paolo Valente Date: Wed Apr 12 18:23:19 2017 +0200 block, bfq: boost the throughput with random I/O on NCQ-capable HDDs This patch is basically the counterpart, for NCQ-capable rotational devices, of the previous patch. Exactly as the previous patch does on flash-based devices and for any workload, this patch disables device idling on rotational devices, but only for random I/O. In fact, only with these queues disabling idling boosts the throughput on NCQ-capable rotational devices. To not break service guarantees, idling is disabled for NCQ-enabled rotational devices only when the same symmetry conditions considered in the previous patches hold. Signed-off-by: Paolo Valente Signed-off-by: Arianna Avanzini Signed-off-by: Jens Axboe block/bfq-iosched.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit bf2b79e7c4b312aa6e1c661fb27e0dc4dd42f2c2 Author: Paolo Valente Date: Wed Apr 12 18:23:18 2017 +0200 block, bfq: boost the throughput on NCQ-capable flash-based devices This patch boosts the throughput on NCQ-capable flash-based devices, while still preserving latency guarantees for interactive and soft real-time applications. The throughput is boosted by just not idling the device when the in-service queue remains empty, even if the queue is sync and has a non-null idle window. This helps to keep the drive's internal queue full, which is necessary to achieve maximum performance. This solution to boost the throughput is a port of commits a68bbdd and f7d7b7a for CFQ. As already highlighted in a previous patch, allowing the device to prefetch and internally reorder requests trivially causes loss of control on the request service order, and hence on service guarantees. Fortunately, as discussed in detail in the comments on the function bfq_bfqq_may_idle(), if every process has to receive the same fraction of the throughput, then the service order enforced by the internal scheduler of a flash-based device is relatively close to that enforced by BFQ. In particular, it is close enough to let service guarantees be substantially preserved. Things change in an asymmetric scenario, i.e., if not every process has to receive the same fraction of the throughput. In this case, to guarantee the desired throughput distribution, the device must be prevented from prefetching requests. This is exactly what this patch does in asymmetric scenarios. Signed-off-by: Paolo Valente Signed-off-by: Arianna Avanzini Signed-off-by: Jens Axboe block/bfq-iosched.c | 154 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 106 insertions(+), 48 deletions(-) commit 1de0c4cd9ea65f99910ae0b77fce2cd1a8e5de01 Author: Arianna Avanzini Date: Wed Apr 12 18:23:17 2017 +0200 block, bfq: reduce idling only in symmetric scenarios A seeky queue (i..e, a queue containing random requests) is assigned a very small device-idling slice, for throughput issues. Unfortunately, given the process associated with a seeky queue, this behavior causes the following problem: if the process, say P, performs sync I/O and has a higher weight than some other processes doing I/O and associated with non-seeky queues, then BFQ may fail to guarantee to P its reserved share of the throughput. The reason is that idling is key for providing service guarantees to processes doing sync I/O [1]. This commit addresses this issue by allowing the device-idling slice to be reduced for a seeky queue only if the scenario happens to be symmetric, i.e., if all the queues are to receive the same share of the throughput. [1] P. Valente, A. Avanzini, "Evolution of the BFQ Storage I/O Scheduler", Proceedings of the First Workshop on Mobile System Technologies (MST-2015), May 2015. http://algogroup.unimore.it/people/paolo/disk_sched/mst-2015.pdf Signed-off-by: Arianna Avanzini Signed-off-by: Riccardo Pizzetti Signed-off-by: Samuele Zecchini Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 287 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 280 insertions(+), 7 deletions(-) commit 36eca894832351feed9072d0f97eb06fc9482ca4 Author: Arianna Avanzini Date: Wed Apr 12 18:23:16 2017 +0200 block, bfq: add Early Queue Merge (EQM) A set of processes may happen to perform interleaved reads, i.e., read requests whose union would give rise to a sequential read pattern. There are two typical cases: first, processes reading fixed-size chunks of data at a fixed distance from each other; second, processes reading variable-size chunks at variable distances. The latter case occurs for example with QEMU, which splits the I/O generated by a guest into multiple chunks, and lets these chunks be served by a pool of I/O threads, iteratively assigning the next chunk of I/O to the first available thread. CFQ denotes as 'cooperating' a set of processes that are doing interleaved I/O, and when it detects cooperating processes, it merges their queues to obtain a sequential I/O pattern from the union of their I/O requests, and hence boost the throughput. Unfortunately, in the following frequent case, the mechanism implemented in CFQ for detecting cooperating processes and merging their queues is not responsive enough to handle also the fluctuating I/O pattern of the second type of processes. Suppose that one process of the second type issues a request close to the next request to serve of another process of the same type. At that time the two processes would be considered as cooperating. But, if the request issued by the first process is to be merged with some other already-queued request, then, from the moment at which this request arrives, to the moment when CFQ controls whether the two processes are cooperating, the two processes are likely to be already doing I/O in distant zones of the disk surface or device memory. CFQ uses however preemption to get a sequential read pattern out of the read requests performed by the second type of processes too. As a consequence, CFQ uses two different mechanisms to achieve the same goal: boosting the throughput with interleaved I/O. This patch introduces Early Queue Merge (EQM), a unified mechanism to get a sequential read pattern with both types of processes. The main idea is to immediately check whether a newly-arrived request lets some pair of processes become cooperating, both in the case of actual request insertion and, to be responsive with the second type of processes, in the case of request merge. Both types of processes are then handled by just merging their queues. Signed-off-by: Arianna Avanzini Signed-off-by: Mauro Andreolini Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 881 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 840 insertions(+), 41 deletions(-) commit cfd69712a101f528caad1529e64834e31e5dff62 Author: Paolo Valente Date: Wed Apr 12 18:23:15 2017 +0200 block, bfq: reduce latency during request-pool saturation This patch introduces an heuristic that reduces latency when the I/O-request pool is saturated. This goal is achieved by disabling device idling, for non-weight-raised queues, when there are weight- raised queues with pending or in-flight requests. In fact, as explained in more detail in the comment on the function bfq_bfqq_may_idle(), this reduces the rate at which processes associated with non-weight-raised queues grab requests from the pool, thereby increasing the probability that processes associated with weight-raised queues get a request immediately (or at least soon) when they need one. Along the same line, if there are weight-raised queues, then this patch halves the service rate of async (write) requests for non-weight-raised queues. Signed-off-by: Paolo Valente Signed-off-by: Arianna Avanzini Signed-off-by: Jens Axboe block/bfq-iosched.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 3 deletions(-) commit bcd5642607ab9195e22a1617d92fb82698d44448 Author: Paolo Valente Date: Wed Apr 12 18:23:14 2017 +0200 block, bfq: preserve a low latency also with NCQ-capable drives I/O schedulers typically allow NCQ-capable drives to prefetch I/O requests, as NCQ boosts the throughput exactly by prefetching and internally reordering requests. Unfortunately, as discussed in detail and shown experimentally in [1], this may cause fairness and latency guarantees to be violated. The main problem is that the internal scheduler of an NCQ-capable drive may postpone the service of some unlucky (prefetched) requests as long as it deems serving other requests more appropriate to boost the throughput. This patch addresses this issue by not disabling device idling for weight-raised queues, even if the device supports NCQ. This allows BFQ to start serving a new queue, and therefore allows the drive to prefetch new requests, only after the idling timeout expires. At that time, all the outstanding requests of the expired queue have been most certainly served. [1] P. Valente and M. Andreolini, "Improving Application Responsiveness with the BFQ Disk I/O Scheduler", Proceedings of the 5th Annual International Systems and Storage Conference (SYSTOR '12), June 2012. Slightly extended version: http://algogroup.unimore.it/people/paolo/disk_sched/bfq-v1-suite- results.pdf Signed-off-by: Paolo Valente Signed-off-by: Arianna Avanzini Signed-off-by: Jens Axboe block/bfq-iosched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 77b7dcead36d15d7af9159f2a5f91149c5887634 Author: Paolo Valente Date: Wed Apr 12 18:23:13 2017 +0200 block, bfq: reduce I/O latency for soft real-time applications To guarantee a low latency also to the I/O requests issued by soft real-time applications, this patch introduces a further heuristic, which weight-raises (in the sense explained in the previous patch) also the queues associated to applications deemed as soft real-time. To be deemed as soft real-time, an application must meet two requirements. First, the application must not require an average bandwidth higher than the approximate bandwidth required to playback or record a compressed high-definition video. Second, the request pattern of the application must be isochronous, i.e., after issuing a request or a batch of requests, the application must stop issuing new requests until all its pending requests have been completed. After that, the application may issue a new batch, and so on. As for the second requirement, it is critical to require also that, after all the pending requests of the application have been completed, an adequate minimum amount of time elapses before the application starts issuing new requests. This prevents also greedy (i.e., I/O-bound) applications from being incorrectly deemed, occasionally, as soft real-time. In fact, if *any amount of time* is fine, then even a greedy application may, paradoxically, meet both the above requirements, if: (1) the application performs random I/O and/or the device is slow, and (2) the CPU load is high. The reason is the following. First, if condition (1) is true, then, during the service of the application, the throughput may be low enough to let the application meet the bandwidth requirement. Second, if condition (2) is true as well, then the application may occasionally behave in an apparently isochronous way, because it may simply stop issuing requests while the CPUs are busy serving other processes. To address this issue, the heuristic leverages the simple fact that greedy applications issue *all* their requests as quickly as they can, whereas soft real-time applications spend some time processing data after each batch of requests is completed. In particular, the heuristic works as follows. First, according to the above isochrony requirement, the heuristic checks whether an application may be soft real-time, thereby giving to the application the opportunity to be deemed as such, only when both the following two conditions happen to hold: 1) the queue associated with the application has expired and is empty, 2) there is no outstanding request of the application. Suppose that both conditions hold at time, say, t_c and that the application issues its next request at time, say, t_i. At time t_c the heuristic computes the next time instant, called soft_rt_next_start in the code, such that, only if t_i >= soft_rt_next_start, then both the next conditions will hold when the application issues its next request: 1) the application will meet the above bandwidth requirement, 2) a given minimum time interval, say Delta, will have elapsed from time t_c (so as to filter out greedy application). The current value of Delta is a little bit higher than the value that we have found, experimentally, to be adequate on a real, general-purpose machine. In particular we had to increase Delta to make the filter quite precise also in slower, embedded systems, and in KVM/QEMU virtual machines (details in the comments on the code). If the application actually issues its next request after time soft_rt_next_start, then its associated queue will be weight-raised for a relatively short time interval. If, during this time interval, the application proves again to meet the bandwidth and isochrony requirements, then the end of the weight-raising period for the queue is moved forward, and so on. Note that an application whose associated queue never happens to be empty when it expires will never have the opportunity to be deemed as soft real-time. Signed-off-by: Paolo Valente Signed-off-by: Arianna Avanzini Signed-off-by: Jens Axboe block/bfq-iosched.c | 342 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 323 insertions(+), 19 deletions(-) commit 44e44a1b329ed37a98bc41ab21fb6897d5a922ac Author: Paolo Valente Date: Wed Apr 12 18:23:12 2017 +0200 block, bfq: improve responsiveness This patch introduces a simple heuristic to load applications quickly, and to perform the I/O requested by interactive applications just as quickly. To this purpose, both a newly-created queue and a queue associated with an interactive application (we explain in a moment how BFQ decides whether the associated application is interactive), receive the following two special treatments: 1) The weight of the queue is raised. 2) The queue unconditionally enjoys device idling when it empties; in fact, if the requests of a queue are sync, then performing device idling for the queue is a necessary condition to guarantee that the queue receives a fraction of the throughput proportional to its weight (see [1] for details). For brevity, we call just weight-raising the combination of these two preferential treatments. For a newly-created queue, weight-raising starts immediately and lasts for a time interval that: 1) depends on the device speed and type (rotational or non-rotational), and 2) is equal to the time needed to load (start up) a large-size application on that device, with cold caches and with no additional workload. Finally, as for guaranteeing a fast execution to interactive, I/O-related tasks (such as opening a file), consider that any interactive application blocks and waits for user input both after starting up and after executing some task. After a while, the user may trigger new operations, after which the application stops again, and so on. Accordingly, the low-latency heuristic weight-raises again a queue in case it becomes backlogged after being idle for a sufficiently long (configurable) time. The weight-raising then lasts for the same time as for a just-created queue. According to our experiments, the combination of this low-latency heuristic and of the improvements described in the previous patch allows BFQ to guarantee a high application responsiveness. [1] P. Valente, A. Avanzini, "Evolution of the BFQ Storage I/O Scheduler", Proceedings of the First Workshop on Mobile System Technologies (MST-2015), May 2015. http://algogroup.unimore.it/people/paolo/disk_sched/mst-2015.pdf Signed-off-by: Paolo Valente Signed-off-by: Arianna Avanzini Signed-off-by: Jens Axboe Documentation/block/bfq-iosched.txt | 9 + block/bfq-iosched.c | 740 ++++++++++++++++++++++++++++++++---- 2 files changed, 675 insertions(+), 74 deletions(-) commit c074170e65995706be78e8c57ed2017c638d5464 Author: Paolo Valente Date: Wed Apr 12 18:23:11 2017 +0200 block, bfq: add more fairness with writes and slow processes This patch deals with two sources of unfairness, which can also cause high latencies and throughput loss. The first source is related to write requests. Write requests tend to starve read requests, basically because, on one side, writes are slower than reads, whereas, on the other side, storage devices confuse schedulers by deceptively signaling the completion of write requests immediately after receiving them. This patch addresses this issue by just throttling writes. In particular, after a write request is dispatched for a queue, the budget of the queue is decremented by the number of sectors to write, multiplied by an (over)charge coefficient. The value of the coefficient is the result of our tuning with different devices. The second source of unfairness has to do with slowness detection: when the in-service queue is expired, BFQ also controls whether the queue has been "too slow", i.e., has consumed its last-assigned budget at such a low rate that it would have been impossible to consume all of this budget within the maximum time slice T_max (Subsec. 3.5 in [1]). In this case, the queue is always (over)charged the whole budget, to reduce its utilization of the device. Both this overcharge and the slowness-detection criterion may cause unfairness. First, always charging a full budget to a slow queue is too coarse. It is much more accurate, and this patch lets BFQ do so, to charge an amount of service 'equivalent' to the amount of time during which the queue has been in service. As explained in more detail in the comments on the code, this enables BFQ to provide time fairness among slow queues. Secondly, because of ZBR, a queue may be deemed as slow when its associated process is performing I/O on the slowest zones of a disk. However, unless the process is truly too slow, not reducing the disk utilization of the queue is more profitable in terms of disk throughput than the opposite. A similar problem is caused by logical block mapping on non-rotational devices. For this reason, this patch lets a queue be charged time, and not budget, only if the queue has consumed less than 2/3 of its assigned budget. As an additional, important benefit, this tolerance allows BFQ to preserve enough elasticity to still perform bandwidth, and not time, distribution with little unlucky or quasi-sequential processes. Finally, for the same reasons as above, this patch makes slowness detection itself much less harsh: a queue is deemed slow only if it has consumed its budget at less than half of the peak rate. [1] P. Valente and M. Andreolini, "Improving Application Responsiveness with the BFQ Disk I/O Scheduler", Proceedings of the 5th Annual International Systems and Storage Conference (SYSTOR '12), June 2012. Slightly extended version: http://algogroup.unimore.it/people/paolo/disk_sched/bfq-v1-suite- results.pdf Signed-off-by: Paolo Valente Signed-off-by: Arianna Avanzini Signed-off-by: Jens Axboe block/bfq-iosched.c | 120 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 85 insertions(+), 35 deletions(-) commit ab0e43e9cea047873599bc8041cd6278781fd4e0 Author: Paolo Valente Date: Wed Apr 12 18:23:10 2017 +0200 block, bfq: modify the peak-rate estimator Unless the maximum budget B_max that BFQ can assign to a queue is set explicitly by the user, BFQ automatically updates B_max. In particular, BFQ dynamically sets B_max to the number of sectors that can be read, at the current estimated peak rate, during the maximum time, T_max, allowed before a budget timeout occurs. In formulas, if we denote as R_est the estimated peak rate, then B_max = T_max ∗ R_est. Hence, the higher R_est is with respect to the actual device peak rate, the higher the probability that processes incur budget timeouts unjustly is. Besides, a too high value of B_max unnecessarily increases the deviation from an ideal, smooth service. Unfortunately, it is not trivial to estimate the peak rate correctly: because of the presence of sw and hw queues between the scheduler and the device components that finally serve I/O requests, it is hard to say exactly when a given dispatched request is served inside the device, and for how long. As a consequence, it is hard to know precisely at what rate a given set of requests is actually served by the device. On the opposite end, the dispatch time of any request is trivially available, and, from this piece of information, the "dispatch rate" of requests can be immediately computed. So, the idea in the next function is to use what is known, namely request dispatch times (plus, when useful, request completion times), to estimate what is unknown, namely in-device request service rate. The main issue is that, because of the above facts, the rate at which a certain set of requests is dispatched over a certain time interval can vary greatly with respect to the rate at which the same requests are then served. But, since the size of any intermediate queue is limited, and the service scheme is lossless (no request is silently dropped), the following obvious convergence property holds: the number of requests dispatched MUST become closer and closer to the number of requests completed as the observation interval grows. This is the key property used in this new version of the peak-rate estimator. Signed-off-by: Paolo Valente Signed-off-by: Arianna Avanzini Signed-off-by: Jens Axboe block/bfq-iosched.c | 497 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 372 insertions(+), 125 deletions(-) commit 54b604567fbfa1a35a44c2ac4a35c959d277adc2 Author: Paolo Valente Date: Wed Apr 12 18:23:09 2017 +0200 block, bfq: improve throughput boosting The feedback-loop algorithm used by BFQ to compute queue (process) budgets is basically a set of three update rules, one for each of the main reasons why a queue may be expired. If many processes suddenly switch from sporadic I/O to greedy and sequential I/O, then these rules are quite slow to assign large budgets to these processes, and hence to achieve a high throughput. On the opposite side, BFQ assigns the maximum possible budget B_max to a just-created queue. This allows a high throughput to be achieved immediately if the associated process is I/O-bound and performs sequential I/O from the beginning. But it also increases the worst-case latency experienced by the first requests issued by the process, because the larger the budget of a queue waiting for service is, the later the queue will be served by B-WF2Q+ (Subsec 3.3 in [1]). This is detrimental for an interactive or soft real-time application. To tackle these throughput and latency problems, on one hand this patch changes the initial budget value to B_max/2. On the other hand, it re-tunes the three rules, adopting a more aggressive, multiplicative increase/linear decrease scheme. This scheme trades latency for throughput more than before, and tends to assign large budgets quickly to processes that are or become I/O-bound. For two of the expiration reasons, the new version of the rules also contains some more little improvements, briefly described below. *No more backlog.* In this case, the budget was larger than the number of sectors actually read/written by the process before it stopped doing I/O. Hence, to reduce latency for the possible future I/O requests of the process, the old rule simply set the next budget to the number of sectors actually consumed by the process. However, if there are still outstanding requests, then the process may have not yet issued its next request just because it is still waiting for the completion of some of the still outstanding ones. If this sub-case holds true, then the new rule, instead of decreasing the budget, doubles it, proactively, in the hope that: 1) a larger budget will fit the actual needs of the process, and 2) the process is sequential and hence a higher throughput will be achieved by serving the process longer after granting it access to the device. *Budget timeout*. The original rule set the new budget to the maximum value B_max, to maximize throughput and let all processes experiencing budget timeouts receive the same share of the device time. In our experiments we verified that this sudden jump to B_max did not provide sensible benefits; rather it increased the latency of processes performing sporadic and short I/O. The new rule only doubles the budget. [1] P. Valente and M. Andreolini, "Improving Application Responsiveness with the BFQ Disk I/O Scheduler", Proceedings of the 5th Annual International Systems and Storage Conference (SYSTOR '12), June 2012. Slightly extended version: http://algogroup.unimore.it/people/paolo/disk_sched/bfq-v1-suite- results.pdf Signed-off-by: Paolo Valente Signed-off-by: Arianna Avanzini Signed-off-by: Jens Axboe block/bfq-iosched.c | 87 +++++++++++++++++++++++++---------------------------- 1 file changed, 41 insertions(+), 46 deletions(-) commit e21b7a0b988772e82e7147e1c659a5afe2ae003c Author: Arianna Avanzini Date: Wed Apr 12 18:23:08 2017 +0200 block, bfq: add full hierarchical scheduling and cgroups support Add complete support for full hierarchical scheduling, with a cgroups interface. Full hierarchical scheduling is implemented through the 'entity' abstraction: both bfq_queues, i.e., the internal BFQ queues associated with processes, and groups are represented in general by entities. Given the bfq_queues associated with the processes belonging to a given group, the entities representing these queues are sons of the entity representing the group. At higher levels, if a group, say G, contains other groups, then the entity representing G is the parent entity of the entities representing the groups in G. Hierarchical scheduling is performed as follows: if the timestamps of a leaf entity (i.e., of a bfq_queue) change, and such a change lets the entity become the next-to-serve entity for its parent entity, then the timestamps of the parent entity are recomputed as a function of the budget of its new next-to-serve leaf entity. If the parent entity belongs, in its turn, to a group, and its new timestamps let it become the next-to-serve for its parent entity, then the timestamps of the latter parent entity are recomputed as well, and so on. When a new bfq_queue must be set in service, the reverse path is followed: the next-to-serve highest-level entity is chosen, then its next-to-serve child entity, and so on, until the next-to-serve leaf entity is reached, and the bfq_queue that this entity represents is set in service. Writeback is accounted for on a per-group basis, i.e., for each group, the async I/O requests of the processes of the group are enqueued in a distinct bfq_queue, and the entity associated with this queue is a child of the entity associated with the group. Weights can be assigned explicitly to groups and processes through the cgroups interface, differently from what happens, for single processes, if the cgroups interface is not used (as explained in the description of the previous patch). In particular, since each node has a full scheduler, each group can be assigned its own weight. Signed-off-by: Fabio Checconi Signed-off-by: Paolo Valente Signed-off-by: Arianna Avanzini Signed-off-by: Jens Axboe Documentation/block/bfq-iosched.txt | 17 +- block/Kconfig.iosched | 10 + block/bfq-iosched.c | 2568 ++++++++++++++++++++++++++++++----- include/linux/blkdev.h | 2 +- 4 files changed, 2213 insertions(+), 384 deletions(-) commit aee69d78dec0ffdf82e35d57c626e80dddc314d5 Author: Paolo Valente Date: Wed Apr 19 08:29:02 2017 -0600 block, bfq: introduce the BFQ-v0 I/O scheduler as an extra scheduler We tag as v0 the version of BFQ containing only BFQ's engine plus hierarchical support. BFQ's engine is introduced by this commit, while hierarchical support is added by next commit. We use the v0 tag to distinguish this minimal version of BFQ from the versions containing also the features and the improvements added by next commits. BFQ-v0 coincides with the version of BFQ submitted a few years ago [1], apart from the introduction of preemption, described below. BFQ is a proportional-share I/O scheduler, whose general structure, plus a lot of code, are borrowed from CFQ. - Each process doing I/O on a device is associated with a weight and a (bfq_)queue. - BFQ grants exclusive access to the device, for a while, to one queue (process) at a time, and implements this service model by associating every queue with a budget, measured in number of sectors. - After a queue is granted access to the device, the budget of the queue is decremented, on each request dispatch, by the size of the request. - The in-service queue is expired, i.e., its service is suspended, only if one of the following events occurs: 1) the queue finishes its budget, 2) the queue empties, 3) a "budget timeout" fires. - The budget timeout prevents processes doing random I/O from holding the device for too long and dramatically reducing throughput. - Actually, as in CFQ, a queue associated with a process issuing sync requests may not be expired immediately when it empties. In contrast, BFQ may idle the device for a short time interval, giving the process the chance to go on being served if it issues a new request in time. Device idling typically boosts the throughput on rotational devices, if processes do synchronous and sequential I/O. In addition, under BFQ, device idling is also instrumental in guaranteeing the desired throughput fraction to processes issuing sync requests (see [2] for details). - With respect to idling for service guarantees, if several processes are competing for the device at the same time, but all processes (and groups, after the following commit) have the same weight, then BFQ guarantees the expected throughput distribution without ever idling the device. Throughput is thus as high as possible in this common scenario. - Queues are scheduled according to a variant of WF2Q+, named B-WF2Q+, and implemented using an augmented rb-tree to preserve an O(log N) overall complexity. See [2] for more details. B-WF2Q+ is also ready for hierarchical scheduling. However, for a cleaner logical breakdown, the code that enables and completes hierarchical support is provided in the next commit, which focuses exactly on this feature. - B-WF2Q+ guarantees a tight deviation with respect to an ideal, perfectly fair, and smooth service. In particular, B-WF2Q+ guarantees that each queue receives a fraction of the device throughput proportional to its weight, even if the throughput fluctuates, and regardless of: the device parameters, the current workload and the budgets assigned to the queue. - The last, budget-independence, property (although probably counterintuitive in the first place) is definitely beneficial, for the following reasons: - First, with any proportional-share scheduler, the maximum deviation with respect to an ideal service is proportional to the maximum budget (slice) assigned to queues. As a consequence, BFQ can keep this deviation tight not only because of the accurate service of B-WF2Q+, but also because BFQ *does not* need to assign a larger budget to a queue to let the queue receive a higher fraction of the device throughput. - Second, BFQ is free to choose, for every process (queue), the budget that best fits the needs of the process, or best leverages the I/O pattern of the process. In particular, BFQ updates queue budgets with a simple feedback-loop algorithm that allows a high throughput to be achieved, while still providing tight latency guarantees to time-sensitive applications. When the in-service queue expires, this algorithm computes the next budget of the queue so as to: - Let large budgets be eventually assigned to the queues associated with I/O-bound applications performing sequential I/O: in fact, the longer these applications are served once got access to the device, the higher the throughput is. - Let small budgets be eventually assigned to the queues associated with time-sensitive applications (which typically perform sporadic and short I/O), because, the smaller the budget assigned to a queue waiting for service is, the sooner B-WF2Q+ will serve that queue (Subsec 3.3 in [2]). - Weights can be assigned to processes only indirectly, through I/O priorities, and according to the relation: weight = 10 * (IOPRIO_BE_NR - ioprio). The next patch provides, instead, a cgroups interface through which weights can be assigned explicitly. - If several processes are competing for the device at the same time, but all processes and groups have the same weight, then BFQ guarantees the expected throughput distribution without ever idling the device. It uses preemption instead. Throughput is then much higher in this common scenario. - ioprio classes are served in strict priority order, i.e., lower-priority queues are not served as long as there are higher-priority queues. Among queues in the same class, the bandwidth is distributed in proportion to the weight of each queue. A very thin extra bandwidth is however guaranteed to the Idle class, to prevent it from starving. - If the strict_guarantees parameter is set (default: unset), then BFQ - always performs idling when the in-service queue becomes empty; - forces the device to serve one I/O request at a time, by dispatching a new request only if there is no outstanding request. In the presence of differentiated weights or I/O-request sizes, both the above conditions are needed to guarantee that every queue receives its allotted share of the bandwidth (see Documentation/block/bfq-iosched.txt for more details). Setting strict_guarantees may evidently affect throughput. [1] https://lkml.org/lkml/2008/4/1/234 https://lkml.org/lkml/2008/11/11/148 [2] P. Valente and M. Andreolini, "Improving Application Responsiveness with the BFQ Disk I/O Scheduler", Proceedings of the 5th Annual International Systems and Storage Conference (SYSTOR '12), June 2012. Slightly extended version: http://algogroup.unimore.it/people/paolo/disk_sched/bfq-v1-suite- results.pdf Signed-off-by: Fabio Checconi Signed-off-by: Paolo Valente Signed-off-by: Arianna Avanzini Signed-off-by: Jens Axboe Documentation/block/00-INDEX | 2 + Documentation/block/bfq-iosched.txt | 517 +++++ block/Kconfig.iosched | 11 + block/Makefile | 1 + block/bfq-iosched.c | 4166 +++++++++++++++++++++++++++++++++++ 5 files changed, 4697 insertions(+) commit ebb16d0d1b326c252fef9f339a7322ee44ed104f Author: Josef Bacik Date: Tue Apr 18 16:22:51 2017 -0400 nbd: set the max segment size to UINT_MAX NBD doesn't care about limiting the segment size, let the user push the largest bio's they want. This allows us to control the request size solely through max_sectors_kb. Signed-off-by: Josef Bacik Reviewed-by: Ming Lei Signed-off-by: Jens Axboe drivers/block/nbd.c | 1 + 1 file changed, 1 insertion(+) commit 6af3847329191db7716309217bde152c3cacc13d Merge: a2c9790 89515d0 Author: Jens Axboe Date: Wed Apr 19 08:14:34 2017 -0600 Merge branch 'stable/for-jens-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-4.12/block Konrad writes: It has one fix - to emit an uevent whenever the size of the guest disk image changes. commit c0c345d4cacc6a1f39d4856f37dcf6e34f51a5e4 Author: Mohammed Shafi Shajakhan Date: Wed Apr 12 23:19:37 2017 +0530 ath: Fix updating radar flags for coutry code India As per latest regulatory update for India, channel 52, 56, 60, 64 is no longer restricted to DFS. Enabling DFS/no infra flags in driver results in applying all DFS related restrictions (like doing CAC etc before this channel moves to 'available state') for these channels even though the country code is programmed as 'India' in he hardware, fix this by relaxing the frequency range while applying RADAR flags only if the country code is programmed to India. If the frequency range needs to modified based on different country code, ath_is_radar_freq can be extended/modified dynamically. Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/regd.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit b90189759a7ff92aa47e8878f6b5a9f868e19895 Author: Simon Wunderlich Date: Thu Mar 23 14:30:48 2017 +0100 ath9k: add noise floor override option Introduce a debugfs option to manually override the noise floor, ignoring the automatically tuned noise floor of the driver/hw. In my tests with a AR9580 based module and a tx99 5 MHz interferer, I could tune the noisefloor to -95 dBm or above to allow communication again. The automatic noise floor calibration sometimes could adapt to the situation as well, but not reliably and permanently. I would consider this "feature" experimental and interesting for people debugging the noise floor calibration or other effects of the hardware. Signed-off-by: Simon Wunderlich Signed-off-by: Mathias Kretschmer Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/calib.c | 5 ++- drivers/net/wireless/ath/ath9k/debug.c | 62 ++++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath9k/hw.h | 1 + 3 files changed, 67 insertions(+), 1 deletion(-) commit 28a59b6166d39a527fe6b4cbfec8db3a47801f6e Author: Thomas Petazzoni Date: Mon Apr 17 14:46:44 2017 +0200 arm: spear6xx: add DT description of the ADC on SPEAr600 The SPEAr600 has a built-in ADC, which already has a Device Tree binding described in Documentation/devicetree/bindings/staging/iio/adc/spear-adc.txt. This commit adds the description in the SPEAr600 Device Tree of this ADC device. Signed-off-by: Thomas Petazzoni Acked-by: Viresh Kumar Signed-off-by: Olof Johansson arch/arm/boot/dts/spear600.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8590b4e0180bc33461805a8cd80d4d0564fa38e3 Author: Thomas Petazzoni Date: Mon Apr 17 14:46:43 2017 +0200 arm: spear6xx: remove unneeded pinctrl properties in spear600-evb The spear6xx doesn't have a pinctrl driver, since the pinmux is globally defined through a single register, generally configured by the firmware/bootloader. Therefore, the pinctrl related properties in spear600-evb.dts are not necessary. Signed-off-by: Thomas Petazzoni Acked-by: Viresh Kumar Signed-off-by: Olof Johansson arch/arm/boot/dts/spear600-evb.dts | 4 ---- 1 file changed, 4 deletions(-) commit 4e7adc294ef319d0e57e4b8638af7800be1b0a88 Author: Thomas Petazzoni Date: Mon Apr 17 14:46:42 2017 +0200 arm: spear6xx: switch spear600-evb to the new flash partition DT binding This commit moves spear600-evb.dts to use the new flash partition Device Tree binding documented in Documentation/devicetree/bindings/mtd/partition.txt. As this Device Tree binding document says: "For backwards compatibility partitions as direct subnodes of the mtd device are supported. This use is discouraged." Signed-off-by: Thomas Petazzoni Acked-by: Viresh Kumar Signed-off-by: Olof Johansson arch/arm/boot/dts/spear600-evb.dts | 54 ++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 25 deletions(-) commit d37c74a570bf0c20fd0d1a78950714e7c47f37ce Author: Thomas Petazzoni Date: Mon Apr 17 14:46:41 2017 +0200 arm: spear6xx: fix spaces in spear600-evb.dts This commit fixes a minor coding style issue in spear600-evb.dts: missing spaces around equal sign. Signed-off-by: Thomas Petazzoni Acked-by: Viresh Kumar Signed-off-by: Olof Johansson arch/arm/boot/dts/spear600-evb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d72c2f27fc5739e2f10bb54b21e858b341b0d5b Author: Thomas Petazzoni Date: Mon Apr 17 14:46:40 2017 +0200 arm: spear6xx: use node labels in spear600-evb.dts Now that we have introduced node labels in spear600.dtsi, we can use them for spear600-evb.dts. Signed-off-by: Thomas Petazzoni Acked-by: Viresh Kumar Signed-off-by: Olof Johansson arch/arm/boot/dts/spear600-evb.dts | 156 ++++++++++++++++++------------------- 1 file changed, 76 insertions(+), 80 deletions(-) commit 85a390b0e2190d0c8f3a6691ca2799e9364e91ca Author: Thomas Petazzoni Date: Mon Apr 17 14:46:39 2017 +0200 arm: spear6xx: add labels to various nodes in spear600.dtsi Having labels allows to more easily reference nodes in .dts files including spear600.dtsi. Signed-off-by: Thomas Petazzoni Acked-by: Viresh Kumar Signed-off-by: Olof Johansson arch/arm/boot/dts/spear600.dtsi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 98e53cfaf755309c66d840f95d5b39186629c44d Merge: dd726fc 10ebb57 Author: Olof Johansson Date: Wed Apr 19 07:07:50 2017 -0700 Merge tag 'mvebu-defconfig64-4.12-2' of git://git.infradead.org/linux-mvebu into next/arm64 mvebu defconfig64 for 4.12 (part 2) Select two new drivers for ARM64 mvebu SoCs: - Xenon SDHCI controller on Armada 37xx and Armada 7K/8K - Safexcel crypto engine on Armada 7K/8K * tag 'mvebu-defconfig64-4.12-2' of git://git.infradead.org/linux-mvebu: arm64: defconfig: enable the Safexcel crypto engine as a module arm64: configs: enable SDHCI driver for Xenon Signed-off-by: Olof Johansson commit aad1fd7f7677d05013b5fe247a5a6e1464c69a0f Author: Ryan Hsu Date: Tue Apr 11 14:04:48 2017 -0700 ath10k: bump up FW API to 6 For QCA6174 hw3.0, since WLAN.RM.4.4-00022-QCARMSWPZ-2, it starts to support the board ID information from otp, with some devices released on the market that didn't calibrated with OTP, will have 0 for board ID information, which cause the backward compatibility issue and was fixed in commit 'd2e202c06ca4 ("ath10k: ignore configuring the incorrect board_id")' So bump the fw api version to differentiate the latest firmware support. Signed-off-by: Ryan Hsu Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/hw.h | 5 ++++- drivers/net/wireless/ath/ath10k/pci.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit ad8618cb9c2e948b3607f3e0a20ee0fe2707d9ae Merge: 43ba923 97bae47 Author: Olof Johansson Date: Wed Apr 19 07:06:04 2017 -0700 Merge tag 'aspeed-4.12-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into next/defconfig Aspeed defconfig updates for 4.12 Add newly unstreamed drivers to the defconfigs for the Aspeed SoCs. The defconfigs are reworked to be useful for development and testing of OpenBMC on these systems. * tag 'aspeed-4.12-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: ARM: configs: aspeed: Add new drivers ARM: configs: aspeed: Update configs for BMC systems ARM: aspeed: Add CONFIG_SPI_ASPEED_SMC Signed-off-by: Olof Johansson commit a4aab099cc9e7c4c94b8a0973b2a483c69b541e3 Author: Mohammed Shafi Shajakhan Date: Mon Apr 10 21:08:17 2017 +0530 ath10k: fix spectral scan for QCA99X0 family of chipsets spectral_bin length (number of bins per fft sample) is usually a value where (2^n = value), n is an integer. All of the QCA99X0 family of chipsets seems to report a spectral_bin length of 2^n + 'm' bytes, where m = 4, 12 based on the chipset. This 'm' bytes seems to carry some radar related info which is currently discarded only for 'bin_len = 68' bytes. Extend this discarding of irrelevant 'bin_len' for QCA9984, QCA9888, IPQ4019 as well by introducing a hardware parameter 'spectral_bin_discard'. Also for QCA988X based family of chipsets which doesn't seem to have this issue and also for some of the hardware which I have not tested like QCA6174/QCA9377 the existing behaviour is retained as it is. Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 12 ++++++++++++ drivers/net/wireless/ath/ath10k/hw.h | 3 +++ drivers/net/wireless/ath/ath10k/spectral.c | 26 +++++++++++++++++--------- 3 files changed, 32 insertions(+), 9 deletions(-) commit 17e310b8eef519c998b7ed80f11c212a86785dea Merge: 1bbecc8 398dbc7 Author: Olof Johansson Date: Wed Apr 19 07:04:21 2017 -0700 Merge tag 'davinci-for-v4.12/soc-3' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/soc Add clock for CPPI 4.1 DMA engine thats part of USB OTG subsystem on DA830 and DA850. This builds on top of the pull request sent earlier: https://www.spinics.net/lists/arm-kernel/msg573985.html * tag 'davinci-for-v4.12/soc-3' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: Add clock for CPPI 4.1 DMA engine Signed-off-by: Olof Johansson commit 1bbecc8cd0a4192ec2a30f6cb3e6f4bd166f576a Merge: d7718c1 b32de9d Author: Olof Johansson Date: Wed Apr 19 07:03:33 2017 -0700 Merge tag 'at91-ab-4.12-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/soc SoC for 4.12: - huge PM cleanup - Move SoC detection to its own driver * tag 'at91-ab-4.12-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: at91: move SoC detection to its own driver ARM: at91: pm: correct typo ARM: at91: pm: Remove at91_pm_set_standby ARM: at91: pm: Merge all at91sam9*_pm_init ARM: at91: pm: Tie the USB clock mask to the pmc ARM: at91: pm: Tie the memory controller type to the ramc id ARM: at91: pm: Workaround DDRSDRC self-refresh bug with LPDDR1 memories. ARM: at91: pm: Simplify at91rm9200_standby ARM: at91: pm: Use struct at91_pm_data in pm_suspend.S ARM: at91: pm: Move global variables into at91_pm_data ARM: at91: pm: Move at91_ramc_read/write to pm.c ARM: at91: pm: Cleanup headers MAINTAINERS: Add memory drivers to AT91 entry MAINTAINERS: Update AT91 entry ARM: at91: pm: cpu_idle: switch DDR to power-down mode Revert "ARM: at91/dt: sama5d2: Use new compatible for ohci node" Signed-off-by: Olof Johansson commit d7718c147a89783ec3bf1735f724ca32174393dd Merge: ab57c2b f147140 Author: Olof Johansson Date: Wed Apr 19 07:02:50 2017 -0700 Merge tag 'hisi-armv7-soc-for-4.12' of git://github.com/hisilicon/linux-hisi into next/soc ARM: mach-hisi: Hisilicon SoC updates for 4.12 - Fix the error return code in hip04_smp_init * tag 'hisi-armv7-soc-for-4.12' of git://github.com/hisilicon/linux-hisi: ARM: hisi: fix error return code in hip04_smp_init() Signed-off-by: Olof Johansson commit ab57c2b4948eb02108b26b9c3410a811bae5e352 Merge: e7d2b85 ff8abc2 Author: Olof Johansson Date: Wed Apr 19 07:01:18 2017 -0700 Merge tag 'imx-soc-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/soc i.MX SoC changes for 4.12: - A correction on mmdc_pmu_write_accesses event definition. - Add new axi_id perf command to support MMDC filter memory usage profiling. - Set correct SPI chip_select in platform device registration, so that spi-imx driver code can be improved to use chip_select directly for harwdare setup instead of indirectly via the cs_gpio mapping array. - Disable APIS bus supervisor protect for i.MX25, since the default configuration doesn't work for a few peripherals accessed through SDMA. - Add compatible check for the secondary generation of I2SE i.MX28 Duckbill board support. * tag 'imx-soc-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: mxs: add support for I2SE Duckbill 2 boards ARM: i.MX25: globally disable supervisor protect ARM: imx: set correct chip_select in platform setup ARM: imx: Add AXI address filter support for MMDC profiling ARM: imx: Fix mmdc_pmu_write_accesses event definition Signed-off-by: Olof Johansson commit 627871b71c89a6ec12fbed75063f238e0c7127b2 Author: Matthias Kaehlcke Date: Thu Apr 6 14:21:35 2017 -0700 ath9k: Add cast to u8 to FREQ2FBIN macro The macro results are assigned to u8 variables/fields. Adding the cast fixes plenty of clang warnings about "implicit conversion from 'int' to 'u8'". Signed-off-by: Matthias Kaehlcke Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/eeprom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd726fcb6bf01916b993de52fed9391942c3b6bd Merge: 309ed7e 0edf179 Author: Olof Johansson Date: Wed Apr 19 06:59:38 2017 -0700 Merge tag 'samsung-soc64-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/arm64 Samsung ARM64 update for v4.12: 1. Exynos power management drivers support now ARMv8 SoC - Exynos5433 - so select them in ARCH_EXYNOS. 2. Enable few Exynos drivers for supported ARMv8 SoCs. * tag 'samsung-soc64-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: defconfig: Enable video, DRM and LPASS drivers for Exynos5433 and Exynos7 arm64: exynos: Enable Exynos PMU and PM domains drivers Signed-off-by: Olof Johansson commit 050fd820dc177a77f6f74a152db22fff25a35032 Author: Damien Thébault Date: Thu Apr 6 13:51:10 2017 +0200 ath9k: Add Dell Wireless 1601 with wowlan capability Add the Dell Wireless 1601 card as an AR9462 in the ath9k pci list. Note that the wowlan feature is supported and has been tested successfully. Signed-off-by: Damien Thébault Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit d12523f14ed615d093053cbfc46e3b257b1b9810 Merge: 32d8b52 a0ebf66 Author: Olof Johansson Date: Wed Apr 19 06:58:33 2017 -0700 Merge tag 'samsung-drivers-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/drivers Samsung SoC drivers update for v4.12 - split building of the PMU driver between ARMv7 and ARMv8. * tag 'samsung-drivers-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: soc: samsung: Do not build ARMv7 PMU drivers on ARMv8 Signed-off-by: Olof Johansson commit b7dcf68f383a05567bd16a390907b67022a62d3d Author: Dan Carpenter Date: Thu Apr 6 08:12:20 2017 +0300 ath9k: off by one in ath9k_hw_nvram_read_array() The > should be >= or we read one space beyond the end of the array. Fixes: ab5c4f71d8c7 ("ath9k: allow to load EEPROM content via firmware API") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32d8b52b900c88dfe8d83e38c73eba3dcf00e901 Merge: 63466c4 fcb8708 Author: Olof Johansson Date: Wed Apr 19 06:56:18 2017 -0700 Merge tag 'renesas-sysc-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers Renesas ARM Based SoC Sysc Updates for v4.12 * Add support for R-Car H3 ES2.0 * tag 'renesas-sysc-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: soc: renesas: rcar-sysc: Add support for R-Car H3 ES2.0 soc: renesas: rcar-sysc: Add support for fixing up power area tables soc: renesas: Register SoC device early base: soc: Allow early registration of a single SoC device base: soc: Let soc_device_match() return no match when called too early Signed-off-by: Olof Johansson commit 214b8b8e0ebdd09bbecd05e71b8cc417fc190156 Merge: d6d9ac9 ffdc394 Author: Olof Johansson Date: Wed Apr 19 06:50:30 2017 -0700 Merge tag 'alpine-dt-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/atenart/linux into next/dt Alpine DT changes for 4.12 A bunch of clean up for Alpine device trees, nothing fancy. * tag 'alpine-dt-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/atenart/linux: ARM: dts: alpine: add valid clock-frequency values ARM: dts: alpine: add spaces before the uart node units. ARM: dts: alpine: remove 0x's from the uart1 node unit address ARM: dts: alpine: fix PCIe node name Signed-off-by: Olof Johansson commit d6d9ac9e48e442e0931ab83b6cc61060bae1b1b3 Merge: 5fadb51 f3d1f759 Author: Olof Johansson Date: Wed Apr 19 06:49:58 2017 -0700 Merge tag 'mvebu-dt-4.12-3' of git://git.infradead.org/linux-mvebu into next/dt mvebu dt for 4.12 (part 3) Use label for USB and SATA nodes on Armada 38x * tag 'mvebu-dt-4.12-3' of git://git.infradead.org/linux-mvebu: ARM: dts: armada-38x: label USB and SATA nodes Signed-off-by: Olof Johansson commit 5fadb51017032463ff548bb33649ad79e95fecdd Merge: 16101f0 78a2569 Author: Olof Johansson Date: Wed Apr 19 06:49:18 2017 -0700 Merge tag 'aspeed-4.12-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into next/dt Aspeed devicetree updates for 4.12 Updates to the device tree to include upstreamed drivers: - SPI flash controller - Watchdog - ADC In addition we describe some of the clocks so that upstream kernels can boot on hardware. * tag 'aspeed-4.12-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: arm: dts: aspeed: Describe ADCs for AST2400/AST2500 ARM: dts: aspeed: romulus: Add UART1 ARM: dts: aspeed: Update watchdog compatible strings ARM: dts: aspeed: Add a fastread property ARM: dts: aspeed: Add SPI controller bindings to Romulus ARM: dts: aspeed: Make G4 clocks fixed ARM: dts: aspeed: Make G5 clocks fixed ARM: dts: aspeed: add SPI controller bindings Signed-off-by: Olof Johansson commit 16101f05101b8917f41ce18d26131a592f67ddb1 Merge: 77f2369 b4e1566 Author: Olof Johansson Date: Wed Apr 19 06:48:32 2017 -0700 Merge tag 'omap-for-v4.12/dt-pt2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt Second set of devicetree changes for omaps for v4.12 merge window to configure various devices: - Enable DCAN on am57xx-idk - Enable CPSW ethernet0 and 1 on am335x-icev2 - Non-critical fix for droid 4 PMIC interrupt triggering - Stop disabling SRAM and GPMC on droid 4 - Configure CPCAP PMIC related devices on droid 4 for ADC, charger and USB PHY. The charger and USB PHY drivers are still being discussed, but the binding for them has been acked by Rob and Sebastian so they should be safe to merge together with the ADC driver in Linux next that they depend on * tag 'omap-for-v4.12/dt-pt2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: omap4-droid4: Add CPCAP PMIC OTG PHY configuration ARM: dts: omap4-droid4: Add CPCAP PMIC battery charger configuration ARM: dts: omap4-droid4: Add CPCAP PMIC ADC configuration ARM: dts: omap4-droid4: Stop disabling SRAM and GPMC ARM: dts: omap4-droid4: Fix interrupt triggering for cpcap ARM: dts: am335x-icev2: Add CPSW ethernet0 and ethernet1 ARM: dts: am57xx-idk: Add DCAN support Signed-off-by: Olof Johansson commit 77f236978918822dc4af1fd010eff1f791b1cf58 Merge: a43315e d3df1ec Author: Olof Johansson Date: Wed Apr 19 06:47:46 2017 -0700 Merge tag 'at91-ab-4.12-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/dt DT for 4.12: - Add SFRBU on sama5d2 - DT improvements for sama5d2_xplained, sama5d3_xplained, at91sam9x5ek and Axentia TSE-850 * tag 'at91-ab-4.12-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: dts: at91: sama5d3_xplained: not all ADC channels are available ARM: dts: at91: sama5d3_xplained: fix ADC vref ARM: dts: at91: add envelope detector mux to the Axentia TSE-850 ARM: dts: at91: Disable SPI on at91sam9x5ek to allow MCI1 to work. ARM: dts: at91: Fix matrix compatible ARM: dts: at91: sama5d2_xplained: enable RTC wakeup ARM: dts: at91: sama5d2: add sfrbu Signed-off-by: Olof Johansson commit a43315e3ddc31d55fe6f9cabac734d145d03d0b4 Merge: b633b31 e48d9e7 Author: Olof Johansson Date: Wed Apr 19 06:45:59 2017 -0700 Merge tag 'imx-dt-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt i.MX device tree updates for 4.12: - New board support: I2SE's i.MX28 Duckbill-2 boards, Gateworks Ventana i.MX6 GW5903/GW5904, Zodiac Inflight Innovations RDU2 board, Engicam i.CoreM6 Quad/Dual OpenFrame modules, Boundary Device i.MX6 Quad Plus SOM. - Improve compatible string for i.MX50 eSDHC, i.MX7S SRC devices and i.MX6SX UART device. - Add interrupts for switch and PHY devices on VF610 ZII Devel C board. - Add LVDS, LCD backlight, touchscreen and SAI2 support for i.MX6 icore, geam, and isiot boards. - A series from Lucas Stach to improve i.MX6Q Plus device tree and add PRE/PRG devices. - A series from Stefan Agner to update imx7-colibri device tree regarding to display, PMIC/regulator support. - Fix PCI bus DTC warnings seen with the latest compiler. - Set default phy_type and dr_mode for i.MX25 USBOTG port. - A couple of small improvements on i.MX25 pin function DT header. - Add audio support for imx6q-cm-fx6 board using Wolfson wm8731 codec which is muxed to SSI2 device. - Other random updates, small fixes and trivial cleanups. * tag 'imx-dt-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (56 commits) ARM: dts: imx6q-utilite-pro: add hpd gpio ARM: dts: imx6qp-sabresd: Set reg_arm regulator supply ARM: dts: imx6qdl-sabresd: Set LDO regulator supply ARM: dts: imx: add Gateworks Ventana GW5903 support ARM: dts: i.MX25: add AIPS control registers ARM: dts: imx7-colibri: add Carrier Board 3.3V/5V regulators ARM: dts: imx7-colibri: remove 1.8V fixed regulator ARM: dts: imx7-colibri: allow to disable Ethernet rail ARM: dts: imx7-colibri: fix PMIC voltages ARM: dts: imx7-colibri: use OF graph to describe the display ARM: dts: imx6qp-nitrogen6_som2: add Quad Plus variant of the SOM ARM: dts: imx6q-icore: Add touchscreen node ARM: dts: vf610-zii-dev-rev-b: change switch2 label ARM: dts: imx6ul-[geam|isiot]: Add sai2 node ARM: dts: imx6ul-isiot-common: Add touchscreen node ARM: dts: imx6ul-isiot: Add i2c nodes ARM: dts: imx6ul-isiot: Add imx6ul-isiot-common.dtsi ARM: dts: imx6ul-isiot: Add backlight support for lcdif ARM: dts: imx6ul-geam: Add backlight support for lcdif ARM: dts: imx6: add ZII RDU2 boards ... Signed-off-by: Olof Johansson commit b633b314061ea26cefa2600bf4d353a462f0c7aa Merge: 6daf2aa 8150773 Author: Olof Johansson Date: Wed Apr 19 06:45:10 2017 -0700 Merge tag 'v4.12-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt Support for the usb-sata controller on the rock2 and another new rk3288 board, the phyCORE som and its PCM-947 carrier board from Phytec. * tag 'v4.12-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: Add support for PCM-947 carrier board dt-bindings: Document Phytec phyCORE-RK3288 RDK ARM: dts: rockchip: Add support for phyCORE-RK3288 SoM ARM: dts: rockchip: Enable sata support on rock2 square Signed-off-by: Olof Johansson commit 6daf2aab1ca801a2e8a42537aadad26fd321e90d Merge: 1071937 a114632 Author: Olof Johansson Date: Wed Apr 19 06:44:37 2017 -0700 Merge tag 'samsung-dt-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt Samsung DeviceTree ARM update for v4.12: 1. Enhancements to PCIe nodes on Exynos5440. 2. Fix thermal values on some of Exynos5420 boards like Odroid XU3. 3. Add proper clock frequency properties to DSI nodes. 4. Fix watchdog reset on Exynos4412. 5. Fix watchdog infinite interrupt in soft mode on Exynos4210, Exynos5440, S3C64xx and S5Pv210. 6. Enable watchdog on Exynos4 and S3C SoCs. * tag 'samsung-dt-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: add HDMI controller phandle to exynos4.dtsi ARM: dts: s5pv210: Fix infinite interrupt in soft mode ARM: dts: s3c64xx: Fix infinite interrupt in soft mode ARM: dts: exynos: Fix infinite interrupt in soft mode on Exynos4210 and Exynos5440 ARM: dts: exynos: Enable watchdog on all Exynos4 boards ARM: dts: s3c64xx: Enable watchdog on all S3C64xx boards ARM: dts: exynos: Fix watchdog reset on Exynos4412 ARM: dts: exynos: Add the burst and esc clock frequency properties to DSI node ARM: dts: exynos: Do not ignore real-world fuse values for thermal zone 0 on Exynos5420 ARM: dts: exynos: Add phy-pcie node for pcie to Exynos5440 Signed-off-by: Olof Johansson commit 107193765b3ee737a272da41967f33abaf487046 Merge: a51ed6c 34240c2 Author: Olof Johansson Date: Wed Apr 19 06:43:54 2017 -0700 Merge tag 'mvebu-dt-4.12-2' of git://git.infradead.org/linux-mvebu into next/dt mvebu dt for 4.12 (part 2) Use disk-activity trigger for armada-385-linksys Keep dts alphabetically ordered for clearfog (Armada 388) * tag 'mvebu-dt-4.12-2' of git://git.infradead.org/linux-mvebu: ARM: dts: armada-385-linksys: disk-activity trigger for all ARM: dts: clearfog: keep dts alphabetically ordered Signed-off-by: Olof Johansson commit a51ed6cfb223ec5e7ab2c2c6e6bf50490b7e6323 Merge: 9ef0f50 eb77d72 Author: Olof Johansson Date: Wed Apr 19 06:43:08 2017 -0700 Merge tag 'renesas-dt2-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Second Round of Renesas ARM Based SoC DT Updates for v4.12 Corrections: * Correct clock frequency of X2 DU clock input for r8a7791/koelsch board * Correct Z clock for r8a7792 SoC * Correct parent of SSI[0-9] clocks for r8a779[013] SoCs * Correct ethernet clock parent on r7s72100 SoC * Correct DU clock for r8a7794/silk board Cleanups: * Drop _clk suffix from external CAN clock node name on r8a779[01] SoCs Enhancements: * Enable rtc r7s72100/genmai board * Add Z2 clock for r8a7794 SoC * Add DU clock for r8a7794 SoC * Add power-domains to SDHI for r8a7794 and r7s72100 SoCs * Add reset control properties for r8a774[35] SoCs * tag 'renesas-dt2-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (22 commits) ARM: dts: r8a7791: Drop _clk suffix from external CAN clock node name ARM: dts: r8a7790: Drop _clk suffix from external CAN clock node name ARM: dts: genmai: Enable rtc and rtc_x1 clock ARM: dts: rskrza1: add rtc DT support ARM: dts: rskrza1: set rtc_x1 clock value ARM: dts: r7s72100: add rtc to device tree ARM: dts: r7s72100: add RTC_X clock inputs to device tree ARM: dts: r7s72100: add rtc clock to device tree ARM: dts: koelsch: Correct clock frequency of X2 DU clock input ARM: dts: r8a7794: Add Z2 clock ARM: dts: r8a7792: Correct Z clock ARM: dts: r8a7793: Correct parent of SSI[0-9] clocks ARM: dts: r8a7791: Correct parent of SSI[0-9] clocks ARM: dts: r8a7790: Correct parent of SSI[0-9] clocks ARM: dts: r7s72100: fix ethernet clock parent ARM: dts: silk: Correct clock of DU1 ARM: dts: alt: Correct clock of DU1 ARM: dts: r8a7794: Correct clock of DU1 ARM: dts: r8a7794: Add DU1 clock to device tree ARM: dts: r7s72100: add power-domains to sdhi ... Signed-off-by: Olof Johansson commit 9ef0f50a23237f8a710e49ab7c411efce18831f6 Merge: e1851247 21677ec Author: Olof Johansson Date: Wed Apr 19 06:42:08 2017 -0700 Merge tag 'qcom-dts-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt Qualcomm Device Tree Changes for v4.12 * Add Coresight components for MSM8974 * Fixup MSM8974 ADSP XO clk and add RPMCC node * Fix typo in APQ8060 * Add SDCs on MSM8660 * Revert MSM8974 USB gadget change due to issues * tag 'qcom-dts-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: Revert "ARM: dts: qcom: msm8974: Add USB gadget nodes" ARM: dts: qcom: msm8974: Add RPMCC DT node ARM: dts: fix typo on APQ8060 Dragonboard ARM: dts: add SDC2 and SDC4 to the MSM8660 family ARM: dts: msm8974: Hook up adsp-pil's xo clock ARM: dts: qcom: Add msm8974 CoreSight components Signed-off-by: Olof Johansson commit 63466c49cbdfb8bef64965c8744e462335b2609d Merge: 912c9fb 71ce843 Author: Olof Johansson Date: Wed Apr 19 06:41:21 2017 -0700 Merge tag 'zte-drivers-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/drivers ZTE driver updates for 4.12: It includes a couple of small cleanups on zx296718 power domain drivers. * tag 'zte-drivers-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: zte: pm_domains: Remove .owner field for driver soc: zte: pm_domains: Remove redundant dev_err call in zx2967_pd_probe() Signed-off-by: Olof Johansson commit 912c9fbe6645196823dd82e0866070c0d424214b Merge: 7b02065 44c43c9 Author: Olof Johansson Date: Wed Apr 19 06:38:32 2017 -0700 Merge tag 'imx-drivers-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/drivers i.MX drivers updates for 4.12: - A series from Lucas Stach which partly rewrites the imx gpc driver to support multiple power domains, and moves the related code from imx platform into drivers folder. - A series from Dong Aisheng which fixes the issues with Lucas' code changes and improves things. - Add workaround for i.MX6QP hardware erratum ERR009619 that is PRE clocks may be stalled during the power up sequencing of the PU power domain. - Add imx-gpcv2 driver to support power domains managed by GPCv2 IP block found on i.MX7 series of SoCs. * tag 'imx-drivers-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx: gpc: add workaround for i.MX6QP to the GPC PD driver dt-bindings: imx-gpc: add i.MX6 QuadPlus compatible soc: imx: gpc: add defines for domain index soc: imx: Add GPCv2 power gating driver dt-bindings: Add GPCv2 power gating driver soc: imx: gpc: remove unnecessary readable_reg callback dt-bindings: imx-gpc: correct the DOMAIN_INDEX using soc: imx: gpc: keep PGC_X_CTRL name align with reference manual soc: imx: gpc: fix comment when power up domain soc: imx: gpc: fix imx6sl gpc power domain regression soc: imx: gpc: fix domain_index sanity check issue soc: imx: gpc: fix the wrong using of regmap cache soc: imx: gpc: fix gpc clk get error handling soc: imx: move PGC handling to a new GPC driver dt-bindings: add multidomain support to i.MX GPC DT binding Signed-off-by: Olof Johansson commit 7b020654e56a9607c5316afe205490c25e7548f1 Merge: 5397b5c ba3fae0 Author: Olof Johansson Date: Wed Apr 19 06:37:24 2017 -0700 Merge tag 'arm-to-clk-icst' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/drivers This moves the ICST helper library from arch/arm to drivers/clk * tag 'arm-to-clk-icst' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM/clk: move the ICST library to drivers/clk ARM: plat-versatile: remove stale clock header Signed-off-by: Olof Johansson commit 5397b5c45c49d4813a64aeb3a42ac39b055af3ee Merge: 55de807 b182cc4 Author: Olof Johansson Date: Wed Apr 19 06:36:13 2017 -0700 Merge tag 'qcom-drivers-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/drivers Qualcomm ARM Based Driver Updates for v4.12 * Add SCM APIs for restore_sec_cfg and iommu secure page table * tag 'qcom-drivers-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: firmware: qcom_scm: add two scm calls for iommu secure page table firmware/qcom: add qcom_scm_restore_sec_cfg() Signed-off-by: Olof Johansson commit 43ba9236b4bbbe5677808af162428fafde197318 Merge: b0d4076 25ea820 Author: Olof Johansson Date: Wed Apr 19 06:35:46 2017 -0700 Merge tag 'omap-for-v4.12/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/defconfig Defconfig updates for omaps for v4.12 merge window. Mostly to update to use new ti-cpufreq driver, the rest is just to enable drivers found on various devices: - Update to use ti-cpufreq driver that we now have - Enable SATA for ti81xx as a loadable module - Enable Ethernet PHY for DP83848 - Enable modem related modules for PPP, QMI and USB ACM as loadable modules - Enable droid 4 related drivers as lodable modules except for PMIC and regulator so eMMC can be used for root * tag 'omap-for-v4.12/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: omap2plus_defconfig: Enable droid 4 devices ARM: omap2plus_defconfig: Add QMI, ACM and PPP as loadable modules ARM: omap2plus_defconfig: Enable TI Ethernet PHY ARM: omap2plus_defconfig: enable ahci-dm816 module ARM: omap2plus_defconfig: Enable support for ti-cpufreq Signed-off-by: Olof Johansson commit b0d40760da516f37ef24bf534325b010132c3ca1 Merge: cbc54d6 c5054a9 Author: Olof Johansson Date: Wed Apr 19 06:35:07 2017 -0700 Merge tag 'imx-defconfig-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/defconfig i.MX defconfig updates for 4.12: - Enable MAX11801 and HID_MULTITOUCH touch drivers. - Enable SMSC_PHY driver, as imx6sl-evk board has a LAN8720A ethernet phy supported by it. * tag 'imx-defconfig-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx_v6_v7_defconfig: Select SMSC_PHY ARM: imx_v6_v7_defconfig: Select hid-multitouchdriver ARM: imx_v6_v7_defconfig: Select max11801_ts touchscreen driver Signed-off-by: Olof Johansson commit cbc54d67bfb7e80f9f3893b8a6e04e141ed9f1bf Merge: 286d3ac fd2694a Author: Olof Johansson Date: Wed Apr 19 06:34:27 2017 -0700 Merge tag 'samsung-defconfig-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/defconfig Samsung defconfig ARM update for v4.12: 1. Enable DYNAMIC_DEBUG because it is useful for debugging. 2. Increase CMA memory region to allow handling H.264 1080p videos. * tag 'samsung-defconfig-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: exynos_defconfig: Increase CONFIG_CMA_SIZE_MBYTES to 96 ARM: exynos_defconfig: Enable DYNAMIC_DEBUG and get rid of old ext3 Signed-off-by: Olof Johansson commit d0815dfd91e7d877f9a23a4ef46aeec9851115db Merge: 08fd8c9 7ba2ef7 Author: Olof Johansson Date: Wed Apr 19 06:33:26 2017 -0700 Merge tag 'mvebu-dt64-4.12-2' of git://git.infradead.org/linux-mvebu into next/dt64 mvebu dt64 for 4.12 (part 2) - crypto engine description for the Armada 7k/8k SoCs and the boards using it - SDHCI description for the Armada 37xx and 7k/8k SoCs and the boards using it * tag 'mvebu-dt64-4.12-2' of git://git.infradead.org/linux-mvebu: arm64: marvell: dts: enable the crypto engine on the Armada 8040 DB arm64: marvell: dts: enable the crypto engine on the Armada 7040 DB arm64: marvell: dts: add crypto engine description for 7k/8k arm64: dts: marvell: add sdhci support for Armada 7K/8K arm64: dts: marvell: add eMMC support for Armada 37xx Signed-off-by: Olof Johansson commit 08fd8c9567ca6d2bd9c22ad468b53ebaa87f91a9 Merge: b42f455 d4e1eae Author: Olof Johansson Date: Wed Apr 19 06:33:20 2017 -0700 Merge tag 'hisi-arm64-dt-for-4.12' of git://github.com/hisilicon/linux-hisi into next/dt64 ARM64: DT: Hisilicon SoC DT updates for 4.12 - Reset the hi6220 mmc hosts to avoid hang - Add the binding for the hi3798cv200 SoC and the poplar board - Add basic dts files to support the hi3798cv200 poplar board - Enable the Mbigen, XGE, RoCE and SAS for the hip07 d05 board - Add driver strength MACRO for the hi3660 SoC - Add the pinctrl dtsi file for hikey960 board to configure the pins * tag 'hisi-arm64-dt-for-4.12' of git://github.com/hisilicon/linux-hisi: arm64: dts: hisi: add pinctrl dtsi file for HiKey960 development board arm64: dts: hisi: add drive strength levels of the pins for Hi3660 SoC arm64: dts: hisi: enable the NIC and SAS for the hip07-d05 board arm64: dts: hisi: add SAS nodes for the hip07 SoC arm64: dts: hisi: add RoCE nodes for the hip07 SoC arm64: dts: hisi: add network related nodes for the hip07 SoC arm64: dts: hisi: add mbigen nodes for the hip07 SoC arm64: dts: hisilicon: add dts files for hi3798cv200-poplar board dt-bindings: arm: hisilicon: add bindings for hi3798cv200 SoC and Poplar board arm64: dts: hi6220: Reset the mmc hosts Signed-off-by: Olof Johansson commit b42f45558e77724cb53e8885b26596ffa4f71434 Merge: 13ed63b f006aaf Author: Olof Johansson Date: Wed Apr 19 06:33:14 2017 -0700 Merge tag 'zte-dt64-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt64 ZTE arm64 device tree updates for 4.12: - Add mmc devices for ZX296718 SoC and enable those available on zx296718-evb board. - Add VOU controller device, output devices HDMI and TVENC, and enable display support for zx296718-evb board. - Remove pll_vga clock from ZX296718 device tree, as it's not a fixed rate clock. * tag 'zte-dt64-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: zte: add tvenc device for zx296718 arm64: dts: zte: add vou and hdmi devices for zx296718 arm64: dts: zte: add mmc devices for zx296718 arm64: dts: zte: remove zx296718 pll_vga clock Signed-off-by: Olof Johansson commit 13ed63b6cbdf3b99abf47fd92325a18dc6282152 Merge: ab71907 6678254 Author: Olof Johansson Date: Wed Apr 19 06:33:08 2017 -0700 Merge tag 'imx-dt64-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt64 Freescale arm64 device tree updates for 4.12: - Add support of LS2088A SoC, which is a derivative of existing LS2080A SoC, and the major difference is on ARM cores. - Add support of LS1088A SoC which includes eight Cortex-A53 cores with 32 KB L1 D-cache and I-cache respectively. - Add crypto and thermal device support for LS1012A platform. - Add ECC register region for SATA device on LS1012A, LS1043A and LS1046A platforms. * tag 'imx-dt64-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: arm: Add entry for FSL LS1088A RDB, QDS boards dt-bindings: clockgen: Add compatible string for LS1088A arm64: dts: Add support for FSL's LS1088A SoC arm64: dts: ls1012a: add crypto node arm64: dts: ls1012a: add thermal monitor node arm64: dts: updated sata node on ls1012a platform arm64: dts: added ecc register address to sata node on ls1046a arm64: dts: added ecc register address to sata node on ls1043a arm64: dts: freescale: ls2088a: Add DTS support for FSL's LS2088A SoC arm64: dts: freescale: ls2080a: Split devicetree for code resuability dt-bindings: Add compatible for LS2088A QDS and RDB board Signed-off-by: Olof Johansson commit ab719074fa14666139376d6b6e5e0e75325d582f Merge: eeef69c 2f513bd Author: Olof Johansson Date: Wed Apr 19 06:33:03 2017 -0700 Merge tag 'v4.12-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt64 Basic support for new rk3328, a 4-core Cortex-A53 soc and a fix for the default memory definition on the px5 eval board. While the bootloader should already override it with the actual amount, it's better to not carry around wrong values. * tag 'v4.12-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: fix the memory size of PX5 Evaluation board arm64: dts: rockchip: add RK3328 eavluation board devicetree dt-bindings: document rockchip rk3328-evb board arm64: dts: rockchip: add core dtsi file for RK3328 SoCs dt-bindings: add binding for rk3328-grf Signed-off-by: Olof Johansson commit eeef69c9eba4171397ea45db5a296775aa88e582 Merge: c3acc32 e3c0754 Author: Olof Johansson Date: Wed Apr 19 06:32:57 2017 -0700 Merge tag 'samsung-dt64-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/dt64 Samsung DeviceTree ARM64 update for v4.12: 1. Add IR, touchscreen and panel to TM2/TM2E boards. 2. Add proper clock frequency properties to DSI nodes. * tag 'samsung-dt64-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: Add the burst and esc clock frequency properties to DSI node arm64: dts: exynos: Add support for S6E3HA2 panel device on TM2 board arm64: dts: exynos: Add stmfts touchscreen node for TM2 and TM2E arm64: dts: exynos: Enable ir-spi in the TM2 and TM2E boards Signed-off-by: Olof Johansson commit c3acc32d6f04fe4912e382865733f7c4c463509a Merge: f6b7167 6922bd7 Author: Olof Johansson Date: Wed Apr 19 06:32:49 2017 -0700 Merge tag 'renesas-arm64-dt2-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt64 Second Round of Renesas ARM64 Based SoC DT Updates for v4.12 Corrections: * r8a7795: Correct SATA device size to 2MiB for r8a7795 SoC Cleanup: * Drop _clk suffix from X12 clock node name for r8a7795 SoC Enhancements: * Add reset control properties for r8a779[56] * tag 'renesas-arm64-dt2-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: dts: r8a7795: salvator-x: Drop _clk suffix from X12 clock node name arm64: dts: r8a7796: Add reset control properties arm64: dts: r8a7795: Add reset control properties arm64: dts: r8a7795: Correct SATA device size to 2MiB Signed-off-by: Olof Johansson commit f6b71673e14f512834071b3f3bee600590e3198c Merge: 3d3949d 6c8583d Author: Olof Johansson Date: Wed Apr 19 06:32:42 2017 -0700 Merge tag 'qcom-arm64-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/dt64 Qualcomm ARM64 Updates for v4.12 * Fixup MSM8996 SMP2P and add ADSP PIL / SLPI SMP2P node * Replace PMU compatible w/ A53 specific one * Add APQ8016 ramoops * Update MSM8916 hexagon node * Add PM8994 RTC * tag 'qcom-arm64-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: dts: msm8996: Add ADSP PIL node arm64: dts: qcom: pm8994: Add rtc node arm64: dts: apq8016-sbc: Add ramoops arm64: dts: qcom: msm8916: Update hexagon node arm64: dts: msm8996: Add SLPI SMP2P dt node. arm64: dts: qcom: Replace PMU compatible with a53 specific one arm64: dts: qcom: msm8996: Fixup smp2p node Signed-off-by: Olof Johansson commit 3d3949df4e16e8dc501e66b3cf078984fd1b23b6 Merge: 2149ed8 18236a1 Author: Olof Johansson Date: Wed Apr 19 06:32:35 2017 -0700 Merge tag 'tegra-for-4.12-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt64 arm64: tegra: Device tree changes for v4.12-rc1 This adds a bunch of features for Tegra186, such as PMC, ethernet, I2C, SDHCI and GPIO. It also enables various features on the P2771 devkit. A small fix is made to the compatible string list for the flow controller on Tegra132 and the IOMMU is enabled for host1x on Tegra210. * tag 'tegra-for-4.12-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Update the Tegra132 flowctrl compatible string arm64: tegra: Add GPU node for Tegra186 arm64: tegra: Enable IOMMU for host1x on Tegra210 arm64: tegra: Enable VIC on Tegra210 arm64: tegra: Add GPIO expanders on P2771 arm64: tegra: Add power monitors on P2771 arm64: tegra: Add GPIO keys on P2771 arm64: tegra: Enable current monitors on P3310 arm64: tegra: Enable SD/MMC slot on P2771 arm64: tegra: Enable SDHCI controllers on P3110 arm64: tegra: Add initial power tree for P3310 arm64: tegra: Enable ethernet on P3310 arm64: tegra: Enable I2C controllers on P3310 arm64: tegra: Invert the PMC interrupt on P3310 arm64: tegra: Add ethernet support for Tegra186 arm64: tegra: Add PMC controller on Tegra186 Signed-off-by: Olof Johansson commit e1851247a0afd097623508884ea2b42cc972428c Merge: a9465b5 bf594a8 Author: Olof Johansson Date: Wed Apr 19 06:28:42 2017 -0700 Merge tag 'tegra-for-4.12-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt dt-bindings: Updates for v4.12-rc1 This contains an update for the flow controller device tree binding as well as the addition of the binding for the GP10B GPU found on the new Tegra186 (Parker) SoC. * tag 'tegra-for-4.12-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: Add documentation for GP10B GPU dt-bindings: tegra: Update compatible strings for Tegra flowctrl Signed-off-by: Olof Johansson commit 286d3ac582e9082af096407562a2b522f5c8a367 Merge: 9479f95 8067669 Author: Olof Johansson Date: Wed Apr 19 06:27:10 2017 -0700 Merge tag 'qcom-defconfig-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/defconfig Qualcomm ARM Based defconfig Updates for v4.12 * Enable QCOM remoteproc and related drivers * tag 'qcom-defconfig-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: ARM: qcom_defconfig: Enable Qualcomm remoteproc and related drivers Signed-off-by: Olof Johansson commit 55de8075956e9fe41b9a6f30c790859f6ba85b26 Merge: fe8fee6 1fd09e5 Author: Olof Johansson Date: Wed Apr 19 06:16:25 2017 -0700 Merge tag 'tegra-for-4.12-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers soc/tegra: Core SoC changes for v4.12-rc1 This contains PMC support for Tegra186 as well as a proper driver for the flow controller found on SoCs up to Tegra210. This also turns the fuse driver into an explicitly non-modular driver. * tag 'tegra-for-4.12-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: Add initial flowctrl support for Tegra132/210 soc/tegra: flowctrl: Add basic platform driver soc/tegra: Move Tegra flowctrl driver ARM: tegra: Remove unnecessary inclusion of flowctrl header soc: tegra: make fuse-tegra explicitly non-modular soc/tegra: Fix link errors with PMC disabled soc/tegra: Implement Tegra186 PMC support Signed-off-by: Olof Johansson commit c58ab5376a0f46fd3356786f4b146894df40f22b Merge: 6b62a00 89d39a6 Author: Olof Johansson Date: Wed Apr 19 06:12:14 2017 -0700 Merge tag 'tegra-for-4.12-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/fixes-non-critical ARM: tegra: Maintainer changes for v4.12-rc1 Stephen has been focussing on other areas of the open source community within NVIDIA, but Jon has been helping out with the kernel development for a while now. Replace Stephen's entry with one from Jon. Secondly, Alex has unfortunately left the company and therefore won't be serving as a Tegra maintainer any longer. * tag 'tegra-for-4.12-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: MAINTAINERS: tegra: Remove self as maintainer MAINTAINERS: tegra: Replace Stephen with Jon Signed-off-by: Olof Johansson commit fe8fee6901059801c3b53a0f8e28274b2dade65e Merge: 1dfe461 ae3874c Author: Olof Johansson Date: Wed Apr 19 05:58:02 2017 -0700 Merge tag 'arm-soc-pmdomain' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/drivers ARM SOC PM domain support for 4.12 Dave Gerlach (5): PM / Domains: Add generic data pointer to genpd data struct PM / Domains: Do not check if simple providers have phandle cells dt-bindings: Add TI SCI PM Domains soc: ti: Add ti_sci_pm_domains driver ARM: keystone: Drop PM domain support for k2g * tag 'arm-soc-pmdomain' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: ARM: keystone: Drop PM domain support for k2g soc: ti: Add ti_sci_pm_domains driver dt-bindings: Add TI SCI PM Domains PM / Domains: Do not check if simple providers have phandle cells PM / Domains: Add generic data pointer to genpd data struct Signed-off-by: Olof Johansson commit 9b70ae4951746146838b474c3a90722666edf4c1 Author: Bjorn Helgaas Date: Wed Apr 19 07:44:51 2017 -0500 PCI: Include PCI-to-PCIe bridges as "Downstream Ports" A PCI/PCI-X to PCI Express bridge, sometimes referred to as a "reverse bridge", is a bridge with conventional PCI or PCI-X on its primary side and a PCI Express Port on its secondary (downstream) side. That PCIe Port is a Downstream Port and could be connected to a slot, just like a Root Port or a Switch Downstream Port. Make pcie_downstream_port() return true for them, so we can access the Slot registers in the PCIe capability. Signed-off-by: Bjorn Helgaas drivers/pci/access.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2149ed8d6fcd43cf99a10c3304f84286d64f6eed Merge: 6929f0f d7bb5b9 Author: Olof Johansson Date: Wed Apr 19 05:39:41 2017 -0700 Merge tag 'sunxi-dt-h5-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt64 Allwinner H5 DT changes for 4.12 H5 patches for 4.12, which are mostly related to reworking the H3 DTSI to be usable on the arm64 H5 DTSI, that shares almost everything with the H3 but the CPU cores. We then have patches to support the H5 boards on top. * tag 'sunxi-dt-h5-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: sunxi: h3/h5: switch apb0-related clocks to r_ccu arm64: allwinner: h5: enable USB OTG on Orange Pi PC 2 board arm64: allwinner: h5: add support for the Orange Pi PC 2 board arm64: allwinner: h5: add Allwinner H5 .dtsi ARM: sunxi: h3/h5: add usb_otg and OHCI/EHCI for usbc0 on H3/H5 arm: sun8i: h3: split Allwinner H3 .dtsi arm: sun8i: h3: correct the GIC compatible in H3 to gic-400 arm: sun8i: h3: drop pinctrl-a10.h inclusion for H3 DTSI arm: sun8i: h3: drop skeleton.dtsi inclusion in H3 DTSI Signed-off-by: Olof Johansson commit a9465b581da59ea20daadfa9c0c0d69053cedd85 Merge: ec4c22e 72897fa Author: Olof Johansson Date: Wed Apr 19 05:39:05 2017 -0700 Merge tag 'sunxi-dt-h3-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Allwinner H3 DT changes for 4.12 H3 patches for 4.12, which are mostly related to reworking the H3 DTSI to be usable on the arm64 H5 DTSI, that shares almost everything with the H3 but the CPU cores. We also have some new device addition (USB, mostly) that would conflict otherwise. * tag 'sunxi-dt-h3-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: sun8i: h2+: enable USB OTG for Orange Pi Zero board ARM: sun8i: h3: enable USB OTG on Orange Pi One ARM: sunxi: h3/h5: add usb_otg and OHCI/EHCI for usbc0 on H3/H5 arm: sun8i: h3: split Allwinner H3 .dtsi arm: sun8i: h3: correct the GIC compatible in H3 to gic-400 arm: sun8i: h3: drop pinctrl-a10.h inclusion for H3 DTSI arm: sun8i: h3: drop skeleton.dtsi inclusion in H3 DTSI Signed-off-by: Olof Johansson commit 6929f0f6a49f56565fd0d2f87dafa5c7bcd970ba Merge: dd85108 ec42790 Author: Olof Johansson Date: Wed Apr 19 05:37:37 2017 -0700 Merge tag 'sunxi-dt64-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt64 Allwinner arm64 DT changes for 4.12 Some patches to enable the PRCM block in the A64 * tag 'sunxi-dt64-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: allwinner: a64: add R_PIO pinctrl node arm64: allwinner: a64: add r_ccu node Signed-off-by: Olof Johansson commit ec4c22e7c348885ab2d928e3ee1cac04e91fb19d Merge: 1409ce0 367d2b0 Author: Olof Johansson Date: Wed Apr 19 05:37:06 2017 -0700 Merge tag 'sunxi-dt-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Allwinner DT changes for 4.12 As usual a number of changes, among which: - All the sun5i DTSI has been reworked based on the new documentation and the IPs that are actually found in all those SoCs. Part of that rework also brought the GR8 DTSI to include sun5i.dtsi - Mali devfreq and thermal throttling support on the A33 - AC power supplies for the AXP209 and AXP22X PMIC - CAN support for the A20 - CPUFreq-based thermal throttling for the A33 - New board: NanoPi NEO Air * tag 'sunxi-dt-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (38 commits) ARM: sun8i: sina33: add highest OPP of CPUs ARM: sun8i: a33: Add devfreq-based GPU cooling ARM: sun8i: a33: add CPU thermal throttling ARM: sun8i: a33: add thermal sensor ARM: dts: sun7i: fix device node ordering ARM: dts: sun4i: fix device node ordering ARM: dts: sun7i: Add can0_pins_a pinctrl settings ARM: dts: sun7i: Add CAN node ARM: dts: sun4i: Add can0_pins_a pinctrl settings ARM: dts: sun4i: Add CAN node ARM: sun7i: cubietruck: enable ACIN und USB power supply subnode ARM: dts: sun5i: Add interrupt for display backend dt-bindings: display: sun4i: Add display backend interrupt to device tree binding ARM: dts: sun7i: Use axp209.dtsi on A20-OLinuXino-Micro ARM: dts: sun6i: sina31s: Enable SPDIF out ARM: sun8i: sina33: add cpu-supply ARM: sun8i: a33: add all operating points ARM: sun5i: chip: enable ACIN power supply subnode ARM: dts: sun8i: sina33: enable ACIN power supply subnode ARM: dtsi: axp22x: add AC power supply subnode ... Signed-off-by: Olof Johansson commit 9479f95f320cb35cce17859d2c3a5d29679dad50 Merge: ee93732 7cae7ef Author: Olof Johansson Date: Wed Apr 19 05:34:53 2017 -0700 Merge tag 'sunxi-defconfig-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/defconfig Allwinner defconfig changes for 4.12 Some patches to enable new modules in the defconfig. * tag 'sunxi-defconfig-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: multi_v7_defconfig: Switch AXP20x driver from module to built-in ARM: multi_v7_defconfig: Enable AC100 RTC driver ARM: multi_v7_defconfig: Switch sunxi RSB driver from module to built-in ARM: sunxi_defconfig: Enable AC100 RTC driver Signed-off-by: Olof Johansson commit e7d2b85722f3fab353ceffd2974a875a7a777e7d Merge: 3384d2f 87c586a Author: Olof Johansson Date: Wed Apr 19 05:34:06 2017 -0700 Merge tag 'sunxi-core-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/soc Allwinner core changes for 4.12 A change to our MAINTAINERS entry to reflect the new git tree, and a select in our KConfig option to enable the device frequency scaling. * tag 'sunxi-core-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: MAINTAINERS: Update the Allwinner sunXi entry ARM: sunxi: Select PM_OPP Signed-off-by: Olof Johansson commit 309ed7e6e4497ee55bc242cfc6517d805eeb1893 Merge: e1c98a2 565fbac Author: Olof Johansson Date: Wed Apr 19 05:32:46 2017 -0700 Merge tag 'sunxi-config64-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/arm64 Allwinner arm64 config changes for 4.12 Two patches to change our Kconfig option and add new options in the defconfig. * tag 'sunxi-config64-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: defconfig: add Allwinner USB PHY arm64: only select PINCTRL for Allwinner platforms Signed-off-by: Olof Johansson commit ee93732978a98fd6c1c86268fa2f0a0a7f4c74e5 Merge: d08c78f b685b26 Author: Olof Johansson Date: Wed Apr 19 05:31:55 2017 -0700 Merge tag 'socfpga_defconfig_updates_for_v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/defconfig SoCFPGA defconfig updates for v4.12 - enables TSE(Triple-Speed-Ethernet) support * tag 'socfpga_defconfig_updates_for_v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: socfpga: updates for socfpga_defconfig Signed-off-by: Olof Johansson commit 1409ce036cf265ab536cbd1308678bcf4558f4b8 Merge: b68d58a81 7fed0cb Author: Olof Johansson Date: Wed Apr 19 05:31:20 2017 -0700 Merge tag 'socfpga_dts_for_v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/dt SoCFPGA DTS updates for v4.12 - Clean-up: - Add clock/memory nodes - Add labels for CPU nodes - Remove unused unit names and reg - Remove unused skeleton.dtsi - Add support for PMU - Add QSPI for sodia board - Add Reset controller for Arria10 * tag 'socfpga_dts_for_v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: dts: socfpga: Add Devkit A10-SR Reset Controller ARM: dts: socfpga: sodia: enable qspi ARM: dts: socfpga: Add support for PMU ARM: dts: socfpga: Add labels for CPU nodes ARM: dts: socfpga: Do not include skeleton.dtsi ARM: dts: socfpga: Remove unit name for LEDs in EBV SOCrates ARM: dts: socfpga: Remove unneeded reg from stmpe_touchscreen ARM: dts: socfpga: Remove unneeded unit names ARM: dts: socfpga: Add unit name to memory nodes ARM: dts: socfpga: Add unit name to clock nodes Signed-off-by: Olof Johansson commit 1dfe46166f18e332bfb22d9d1217b533fa82a464 Merge: f10e8bf 23ade39 Author: Olof Johansson Date: Wed Apr 19 05:30:35 2017 -0700 Merge tag 'reset-for-4.12-2' of git://git.pengutronix.de/git/pza/linux into next/drivers Reset controller changes for v4.12, part 2 Add reset lines for the NAND and eMMC contollers on LD11/LD20 SoCs. * tag 'reset-for-4.12-2' of git://git.pengutronix.de/git/pza/linux: reset: uniphier: add NAND and eMMC reset control Signed-off-by: Olof Johansson commit dd851084754b57fdb0b6c4e1168a2289105499d5 Merge: 9720a9a b212117 Author: Olof Johansson Date: Wed Apr 19 05:29:37 2017 -0700 Merge tag 'amlogic-dt64-redo' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt64 Amlogic 64-bit DT updates for v4.12 - pinctrl: new pins for audio - clocks: more clocks exposed for GFX, audio - new board: Khadas Vim (S905X) - new board: HwaCom AmazeTV (S905X) - ethernet phy: add GPIO resets * tag 'amlogic-dt64-redo' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: (41 commits) ARM64: dts: meson-gx: Add support for HDMI output ARM64: dts: meson-gx: Add shared CMA dma memory pool ARM64: dts: meson-gxbb-odroidc2: Enable SARADC node dt-bindings: clock: gxbb-clkc: Add GXL compatible variant clk: meson-gxbb: Expose GP0 dt-bindings clock id clk: meson-gxbb: Add MALI clock IDS dt-bindings: clk: gxbb: expose i2s output clock gates ARM64: dts: meson-gxl: add spdif output pins ARM64: dts: meson-gxl: add i2s output pins ARM64: dts: meson-gxbb: add spdif output pins ARM64: dts: meson-gxbb: add i2s output pins ARM64: dts: meson-gxbb: Add USB Hub GPIO hog ARM: dts: meson8b: Add gpio-ranges properties ARM: dts: meson8: Add gpio-ranges properties ARM64: dts: meson-gxl: Add gpio-ranges properties ARM64: dts: meson-gxbb: Add gpio-ranges properties ARM64: dts: meson-gx: Add Mali nodes for GXBB and GXL ARM64: dts: meson-gxl: Add missing pinctrl pins groups ARM64: dts: meson-gx: Prepend GX generic compatible like other nodes ARM64: dts: meson-gx: empty line cleanup ... Signed-off-by: Olof Johansson commit d08c78fa10d238bc5359814653bfc9eb10ce8132 Merge: 336a8b1 2e5d77e Author: Olof Johansson Date: Wed Apr 19 05:29:00 2017 -0700 Merge tag 'davinci-for-v4.12/defconfig-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/defconfig Shift to the newly introduced PalmChip PATA driver for DaVinci. * tag 'davinci-for-v4.12/defconfig-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci_all_defconfig: convert to use libata PATA Signed-off-by: Olof Johansson commit b68d58a816971dd9dad3aea2832b6f8b151a7796 Merge: ed50c48 96f2447 Author: Olof Johansson Date: Wed Apr 19 05:28:30 2017 -0700 Merge tag 'davinci-for-v4.12/dt-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/dt A clean-up device-tree patch to ensure pinmux entry reuse. * tag 'davinci-for-v4.12/dt-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: dts: da850: move spi0_cs3_pin pinconf node Signed-off-by: Olof Johansson commit 3384d2f651c42e922188fc6730bd322c19801d2d Merge: f0008e9 28d4d1d Author: Olof Johansson Date: Wed Apr 19 05:27:39 2017 -0700 Merge tag 'davinci-for-v4.12/soc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/soc Add platform support needed for the newly introduced PalmChip PATA driver. * tag 'davinci-for-v4.12/soc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: add pata_bk3710 libata driver support Signed-off-by: Olof Johansson commit f10e8bff8252c7e9711d0bb86c2d2ef35c0ff151 Merge: be6beaa 396ff64 Author: Olof Johansson Date: Wed Apr 19 05:26:34 2017 -0700 Merge tag 'davinci-for-v4.12/drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/drivers This adds a new driver for PalmChip PATA controller found on DM6446 and DM6467 SoCs. This should eventually replace the driver in IDE subsystem. The patches have been acked by ATA maintainer. * tag 'davinci-for-v4.12/drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: pata_bk3710: clear status bits of BMISP on chipset initialization pata_bk3710: disable IORDY Timer on chipset initialization ata: add Palmchip BK3710 PATA controller driver Signed-off-by: Olof Johansson commit 336a8b145e94db90b11a5ef1c338531d3fd3014e Merge: f799969 a1365c4 Author: Olof Johansson Date: Wed Apr 19 05:25:52 2017 -0700 Merge tag 'stm32-defconfig-for-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into next/defconfig STM32 defconfig updates for v4.12, round 1. Highlights: ---------- - Enable I2C - Add config fragment for RAM start point * tag 'stm32-defconfig-for-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: configs: Add new config fragment to change RAM start point ARM: configs: stm32: Add I2C support Signed-off-by: Olof Johansson commit d552a2b9b33eafdb5eb16c643e745deb564dda7f Author: Bob Peterson Date: Mon Feb 6 08:28:32 2017 -0500 GFS2: Non-recursive delete Implement truncate/delete as a non-recursive algorithm. The older algorithm was implemented with recursion to strip off each layer at a time (going by height, starting with the maximum height. This version tries to do the same thing but without recursion, and without needing to allocate new structures or lists in memory. For example, say you want to truncate a very large file to 1 byte, and its end-of-file metapath is: 0.505.463.428. The starting metapath would be 0.0.0.0. Since it's a truncate to non-zero, it needs to preserve that byte, and all metadata pointing to it. So it would start at 0.0.0.0, look up all its metadata buffers, then free all data blocks pointed to at the highest level. After that buffer is "swept", it moves on to 0.0.0.1, then 0.0.0.2, etc., reading in buffers and sweeping them clean. When it gets to the end of the 0.0.0 metadata buffer (for 4K blocks the last valid one is 0.0.0.508), it backs up to the previous height and starts working on 0.0.1.0, then 0.0.1.1, and so forth. After it reaches the end and sweeps 0.0.1.508, it continues with 0.0.2.0, and so on. When that height is exhausted, and it reaches 0.0.508.508 it backs up another level, to 0.1.0.0, then 0.1.0.1, through 0.1.0.508. So it has to keep marching backwards and forwards through the metadata until it's all swept clean. Once it has all the data blocks freed, it lowers the strip height, and begins the process all over again, but with one less height. This time it sweeps 0.0.0 through 0.505.463. When that's clean, it lowers the strip height again and works to free 0.505. Eventually it strips the lowest height, 0. For a delete or truncate to 0, all metadata for all heights of 0.0.0.0 would be freed. For a truncate to 1 byte, 0.0.0.0 would be preserved. This isn't much different from normal integer incrementing, where an integer gets incremented from 0000 (0.0.0.0) to 3021 (3.0.2.1). So 0000 gets increments to 0001, 0002, up to 0009, then on to 0010, 0011 up to 0099, then 0100 and so forth. It's just that each "digit" goes from 0 to 508 (for a total of 509 pointers) rather than from 0 to 9. Note that the dinode will only have 483 pointers due to the dinode structure itself. Also note: this is just an example. These numbers (509 and 483) are based on a standard 4K block size. Smaller block sizes will yield smaller numbers of indirect pointers accordingly. The truncation process is accomplished with the help of two major functions and a few helper functions. Functions do_strip and recursive_scan are obsolete, so removed. New function sweep_bh_for_rgrps cleans a buffer_head pointed to by the given metapath and height. By cleaning, I mean it frees all blocks starting at the offset passed in metapath. It starts at the first block in the buffer pointed to by the metapath and identifies its resource group (rgrp). From there it frees all subsequent block pointers that lie within that rgrp. If it's already inside a transaction, it stays within it as long as it can. In other words, it doesn't close a transaction until it knows it's freed what it can from the resource group. In this way, multiple buffers may be cleaned in a single transaction, as long as those blocks in the buffer all lie within the same rgrp. If it's not in a transaction, it starts one. If the buffer_head has references to blocks within multiple rgrps, it frees all the blocks inside the first rgrp it finds, then closes the transaction. Then it repeats the cycle: identifies the next unfreed block, uses it to find its rgrp, then starts a new transaction for that set. It repeats this process repeatedly until the buffer_head contains no more references to any blocks past the given metapath. Function trunc_dealloc has been reworked into a finite state automaton. It has basically 3 active states: DEALLOC_MP_FULL, DEALLOC_MP_LOWER, and DEALLOC_FILL_MP: The DEALLOC_MP_FULL state implies the metapath has a full set of buffers out to the "shrink height", and therefore, it can call function sweep_bh_for_rgrps to free the blocks within the highest height of the metapath. If it's just swept the lowest level (or an error has occurred) the state machine is ended. Otherwise it proceeds to the DEALLOC_MP_LOWER state. The DEALLOC_MP_LOWER state implies we are finished with a given buffer_head, which may now be released, and therefore we are then missing some buffer information from the metapath. So we need to find more buffers to read in. In most cases, this is just a matter of releasing the buffer_head and moving to the next pointer from the previous height, so it may be read in and swept as well. If it can't find another non-null pointer to process, it checks whether it's reached the end of a height and needs to lower the strip height, or whether it still needs move forward through the previous height's metadata. In this state, all zero-pointers are skipped. From this state, it can only loop around (once more backing up another height) or, once a valid metapath is found (one that has non-zero pointers), proceed to state DEALLOC_FILL_MP. The DEALLOC_FILL_MP state implies that we have a metapath but not all its buffers are read in. So we must proceed to read in buffer_heads until the metapath has a valid buffer for every height. If the previous state backed us up 3 heights, we may need to read in a buffer, increment the height, then repeat the process until buffers have been read in for all required heights. If it's successful reading a buffer, and it's at the highest height we need, it proceeds back to the DEALLOC_MP_FULL state. If it's unable to fill in a buffer, (encounters a hole, etc.) it tries to find another non-zero block pointer. If they're all zero, it lowers the height and returns to the DEALLOC_MP_LOWER state. If it finds a good non-null pointer, it loops around and reads it in, while keeping the metapath in lock-step with the pointers it examines. The state machine runs until the truncation request is satisfied. Then any transactions are ended, the quota and statfs data are updated, and the function is complete. Helper function metaptr1 was introduced to be an easy way to determine the start of a buffer_head's indirect pointers. Helper function lookup_mp_height was introduced to find a metapath index and read in the buffer that corresponds to it. In this way, function lookup_metapath becomes a simple loop to call it for every height. Helper function fillup_metapath is similar to lookup_metapath except it can do partial lookups. If the state machine backed up multiple levels (like 2999 wrapping to 3000) it needs to find out the next starting point and start issuing metadata reads at that point. Helper function hptrs is a shortcut to determine how many pointers should be expected in a buffer. Height 0 is the dinode which has fewer pointers than the others. Signed-off-by: Bob Peterson fs/gfs2/bmap.c | 741 +++++++++++++++++++++++++++++++++++---------------------- fs/gfs2/rgrp.c | 7 - fs/gfs2/rgrp.h | 7 + 3 files changed, 463 insertions(+), 292 deletions(-) commit f0008e9b6c57cfd302465d509232937ae809decb Merge: b69bad7 c6ed0f3 Author: Olof Johansson Date: Wed Apr 19 05:23:33 2017 -0700 Merge tag 'stm32-soc-for-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into next/soc STM32 SOC updates for v4.12, round 1. Highlights: ---------- - Create a dedicated Kconfig for STM32 machine - Add support of STM32H743 MCU * tag 'stm32-soc-for-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: stm32: Add a new SOC - STM32H743 ARM: stm32: Introduce MACH_STM32H743 flag ARM: stm32: create dedicated kconfig for STM32 machine Signed-off-by: Olof Johansson commit ed50c4855eb388d7b1e0b03836e434aba1945072 Merge: a47e346 21b825e Author: Olof Johansson Date: Wed Apr 19 05:22:29 2017 -0700 Merge tag 'stm32-dt-for-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into next/dt STM32 DT updates for v4.12, round 1 Highlights: ---------- - ADD RTC support on STM32F746 MCU - Enable RTC on STM32F746 Eval board - Enable clocks on STM32F746 MCU - Enable DMA, pwm1 and pwm3 on STM32F429I Eval - Add support of STM32H743 MCU and his Eval board - Enable USB HS and FS on STM32F469 Disco board * tag 'stm32-dt-for-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: dt-bindings: Document the STM32 USB OTG DWC2 core binding ARM: dts: stm32: Enable USB HS in FS mode (embedded phy) on stm32f429-disco ARM: dts: stm32: Enable USB FS on stm32f469-disco ARM: dts: stm32: Add USB FS support for STM32F429 MCU ARM: dts: stm32: Add STM32H743 MCU and STM32H743i-EVAL board ARM: dts: stm32: Enable pwm1 and pwm3 on stm32f429i-eval ARM: dts: stm32: Enable dma by default on stm32f4 adc ARM: dts: stm32: enable RTC on stm32746g-eval ARM: dts: stm32: Add RTC support for STM32F746 MCU ARM: dts: stm32: set HSE_RTC clock frequency to 1 MHz on stm32f746 dt-bindings: mfd: Add STM32F7 RCC numeric constants into DT include file ARM: dts: stm32: Enable clocks for STM32F746 MCU Signed-off-by: Olof Johansson commit f799969e16690f86c758fa068ba696c31d08879a Author: Heiko Stuebner Date: Mon Apr 3 12:22:12 2017 +0200 multi_v7_defconfig: make Rockchip usb2-phy built-in The phy is necessary for the dwc2 controllers driving the usb ports on all arm32 Rockchip socs. Both the dwc2 as well as usb downstream drivers (mass-storage as well as usb networking) are already built-in, so only the phy is missing to allow booting from usb-devices without to much hassle. Signed-off-by: Heiko Stuebner Signed-off-by: Olof Johansson arch/arm/configs/multi_v7_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be6beaa8d1a89616df6cbf31a3b0adbf15b2fa55 Merge: 3ed0b8a c511fa3 Author: Olof Johansson Date: Wed Apr 19 05:21:35 2017 -0700 Merge tag 'scpi-update-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/drivers SCPI update for v4.12 Single patch to optimise the completion initialisation using reinit_* API instead of full initialisation on each and every transfer. * tag 'scpi-update-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scpi: reinit completion instead of full init_completion() Signed-off-by: Olof Johansson commit 139c279fb9423833fb730ccb07e549b5a9183f44 Author: Jan Kara Date: Wed Apr 12 08:53:42 2017 +0200 quota: Remove dquot_quotactl_ops Nobody uses them anymore. Signed-off-by: Jan Kara fs/quota/dquot.c | 12 ------------ include/linux/quotaops.h | 1 - 2 files changed, 13 deletions(-) commit a480b5bebdeac6831f44f598616197fb1d37f987 Author: Jan Kara Date: Tue Apr 11 16:51:34 2017 +0200 reiserfs: Remove i_attrs_to_sd_attrs() Now that all places setting inode->i_flags that should be reflected in on-disk flags are gone, we can remove i_attrs_to_sd_attrs() call. Signed-off-by: Jan Kara fs/reiserfs/inode.c | 27 +-------------------------- fs/reiserfs/ioctl.c | 1 - fs/reiserfs/reiserfs.h | 1 - 3 files changed, 1 insertion(+), 28 deletions(-) commit a73415a8a5c260b1543fafe01c6dfb254c454ec0 Author: Jan Kara Date: Tue Apr 11 16:43:51 2017 +0200 reiserfs: Remove useless setting of i_flags reiserfs_new_inode() clears IMMUTABLE and APPEND flags from a symlink i_flags however a few lines below in sd_attrs_to_i_attrs() we will happily overwrite i_flags with whatever we inherited from the directory. Since this behavior is there for ages just remove the useless setting of i_flags. Signed-off-by: Jan Kara fs/reiserfs/inode.c | 4 ---- 1 file changed, 4 deletions(-) commit 7ba4a2e8b85a211ab6a74c19d9188e70d0e866de Author: Jan Kara Date: Tue Apr 11 16:37:49 2017 +0200 jfs: Remove jfs_get_inode_flags() Now that all places setting inode->i_flags that should be reflected in on-disk flags are gone, we can remove jfs_get_inode_flags() call. Signed-off-by: Jan Kara fs/jfs/ioctl.c | 2 -- fs/jfs/jfs_imap.c | 1 - fs/jfs/jfs_inode.c | 18 ------------------ fs/jfs/jfs_inode.h | 1 - 4 files changed, 22 deletions(-) commit 420768d31960fd4398d4553e79cab8af3db2e9ee Author: Jan Kara Date: Tue Apr 11 16:33:50 2017 +0200 ext2: Remove ext2_get_inode_flags() Now that all places setting inode->i_flags that should be reflected in on-disk flags are gone, we can remove ext2_get_inode_flags() call. Reviewed-by: Andreas Dilger Signed-off-by: Jan Kara fs/ext2/ext2.h | 1 - fs/ext2/inode.c | 20 -------------------- fs/ext2/ioctl.c | 1 - 3 files changed, 22 deletions(-) commit 38eae95ddc1964b42fc6d313a1bd17c43e3d08f1 Author: Jan Kara Date: Thu Apr 6 15:44:23 2017 +0200 ext4: Remove ext4_get_inode_flags() Now that all places setting inode->i_flags that should be reflected in on-disk flags are gone, we can remove ext4_get_inode_flags() call. Reviewed-by: Andreas Dilger Signed-off-by: Jan Kara fs/ext4/ext4.h | 1 - fs/ext4/inode.c | 26 -------------------------- fs/ext4/ioctl.c | 2 -- 3 files changed, 29 deletions(-) commit aad6cde9adf4879840cc86bc89ed9cdcee615aae Author: Jan Kara Date: Tue Apr 11 16:29:12 2017 +0200 quota: Stop setting IMMUTABLE and NOATIME flags on quota files Currently we set IMMUTABLE and NOATIME flags on quota files to stop userspace from messing with them. Now that all filesystems set these flags in their quota_on handlers, we can stop setting the flags in generic quota code. This will allow filesystems to stop copying i_flags to their on-disk flags on various occasions. Reviewed-by: Andreas Dilger Signed-off-by: Jan Kara fs/quota/dquot.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 12fd086d3946f753fe0d3db01c2cd037a7d76f4e Author: Jan Kara Date: Tue Apr 11 16:21:01 2017 +0200 jfs: Set flags on quota files directly Currently immutable and noatime flags on quota files are set by quota code which requires us to copy inode->i_flags to our on disk version of quota flags in GETFLAGS ioctl and copy_to_dinode(). Move to setting / clearing these on-disk flags directly to save that copying. Signed-off-by: Jan Kara fs/jfs/super.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 2 deletions(-) commit 161f3b74479b1e486fc784111491023a5bc57bf7 Author: Jan Kara Date: Thu Apr 6 17:02:09 2017 +0200 ext2: Set flags on quota files directly Currently immutable and noatime flags on quota files are set by quota code which requires us to copy inode->i_flags to our on disk version of quota flags in GETFLAGS ioctl and __ext2_write_inode(). Move to setting / clearing these on-disk flags directly to save that copying. Signed-off-by: Jan Kara fs/ext2/super.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 76 insertions(+), 2 deletions(-) commit 33eb928a9e21fb32221db4290d579753ecf2b80e Author: Jan Kara Date: Thu Apr 6 16:34:53 2017 +0200 reiserfs: Set flags on quota files directly Currently immutable and noatime flags on quota files are set by quota code which requires us to copy inode->i_flags to our on disk version of quota flags in GETFLAGS ioctl and when writing stat item. Move to setting / clearing these on-disk flags directly to save that copying. Signed-off-by: Jan Kara fs/reiserfs/super.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 3 deletions(-) commit 957153fce8d226612de05938ca18101b7d608328 Author: Jan Kara Date: Thu Apr 6 15:40:06 2017 +0200 ext4: Set flags on quota files directly Currently immutable and noatime flags on quota files are set by quota code which requires us to copy inode->i_flags to our on disk version of quota flags in GETFLAGS ioctl and ext4_do_update_inode(). Move to setting / clearing these on-disk flags directly to save that copying. Signed-off-by: Jan Kara fs/ext4/super.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 56 insertions(+), 6 deletions(-) commit a47e34668046ad2029deb8110c41926af04e4142 Merge: 3f5099f 6eb0d80 Author: Olof Johansson Date: Wed Apr 19 05:20:54 2017 -0700 Merge branch 'sti-dt-for-v4.12-round1' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti into next/dt * 'sti-dt-for-v4.12-round1' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti: ARM: dts: STiH407-family: update rproc node names to avoid conflict ARM: dts: STiH407-family: fix spi nodes Signed-off-by: Olof Johansson commit 9eb9db3a0f92b75ec710066202e0b2accb45afa9 Author: Songjun Wu Date: Mon Apr 17 06:07:57 2017 -0300 [media] atmel-isc: Fix the static checker warning Initialize the pointer 'fmt' before the start of the loop. Reported-by: Dan Carpenter Signed-off-by: Songjun Wu Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc.c | 1 + 1 file changed, 1 insertion(+) commit d72b196f96e2afad1656c9332da7ffe3b07e17cb Author: Frank Schaefer Date: Sun Apr 16 14:35:46 2017 -0300 [media] ov2640: add support for MEDIA_BUS_FMT_YVYU8_2X8 and MEDIA_BUS_FMT_VYUY8_2X8 Signed-off-by: Frank Schäfer Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 7f140fc2064bcd23e0490d8210650e2ef21c1c89 Author: Frank Schaefer Date: Sun Apr 16 14:35:45 2017 -0300 [media] ov2640: fix vflip control Enabling vflip currently causes wrong colors. It seems that (at least with the current sensor setup) REG04_VFLIP_IMG only changes the vertical readout direction. Because pixels are arranged RGRG... in odd lines and GBGB... in even lines, either a one line shift or even/odd line swap is required, too, but apparently this doesn't happen. I finally figured out that this can be done manually by setting REG04_VREF_EN. Looking at hflip, it turns out that bit REG04_HREF_EN is set there permanetly, but according to my tests has no effect on the pixel readout order. So my conclusion is that the current documentation of sensor register 0x04 is wrong (has changed after preliminary datasheet version 2.2). I'm pretty sure that automatic vertical line shift/switch can be enabled, too, but until anyone finds ot how this works, we have to stick with manual switching. Signed-off-by: Frank Schäfer Cc: stable Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f65cc104c498ad820efb13e3a24fe36af872f17a Merge: 6859e21 3dd0c8d Author: James Morris Date: Wed Apr 19 22:00:15 2017 +1000 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity into next commit 38eeb491cf81dc8552d8b2e29f4f1807cb6e4d11 Author: Frank Schaefer Date: Sun Apr 16 14:35:44 2017 -0300 [media] ov2640: fix duplicate width+height returning from ov2640_select_win() ov2640_select_win() returns height and width values as part of struct ov2640_win_size, so there is no point in modifying the passed height and width parameters, too. Signed-off-by: Frank Schäfer Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 2f7711b2ad3b2e2aa3e9e3db4d3a2887e38b52b3 Author: Frank Schaefer Date: Sun Apr 16 14:35:43 2017 -0300 [media] ov2640: add missing write to size change preamble HSIZE and VSIZE bits 0 to 2 and HSIZE bit 11 are encoded in DSP register SIZEL. Signed-off-by: Frank Schäfer Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 3 +++ 1 file changed, 3 insertions(+) commit 06dd8f7791ed9ec284a847ee5089850c00d71fd8 Author: Frank Schaefer Date: Sun Apr 16 14:35:42 2017 -0300 [media] ov2640: add information about DSP register 0xc7 According to ov2640 software application notes, there are two Automatic White Balance (AWB) modes, which are selected by DSP register 0xc7: 1) Simple AWB: assumes the average color is gray + independent from lens - doesn't work well if captured area contains unbalanced colors (e.g. large blue background) 2) Advanced AWB: uses color temperature information + more accurate, works with all image contents - lens specific, requires calibration Signed-off-by: Frank Schäfer Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d81638eadded798819c6ad3d31575f2ae7ac8929 Author: Frank Schaefer Date: Sun Apr 16 14:35:41 2017 -0300 [media] ov2640: improve banding filter register definitions/documentation - add missing initialisation of sensor register COM25 (2 MSBs of banding filter AEC values) - add macros for setting the banding filter AEC values - add definitions for sensor register 0x5a, which is documented in Omnivisions software application notes Signed-off-by: Frank Schäfer Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 534dca983e3a9b8ea461104d4072d2a646acefdf Author: Frank Schaefer Date: Sun Apr 16 14:35:40 2017 -0300 [media] ov2640: fix init sequence alignment While we are at it, remove a misleading comment (copy/paste mistake) Signed-off-by: Frank Schäfer Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit a463ea990d2138ca93027b006be96a0324b77fe4 Author: Mauro Carvalho Chehab Date: Wed Apr 19 08:43:49 2017 -0300 [media] ov2640: make GPIOLIB an optional dependency As warned by kbuild test robot: warning: (VIDEO_EM28XX_V4L2) selects VIDEO_OV2640 which has unmet direct dependencies (MEDIA_SUPPORT && VIDEO_V4L2 && I2C && GPIOLIB && MEDIA_CAMERA_SUPPORT) The em28xx driver can use ov2640, but it doesn't depend (or use) the GPIOLIB in order to power off/on the sensor. So, as we want to allow both usages with and without GPIOLIB, make its dependency optional. Reported-by: kbuild test robot Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 2 +- drivers/media/i2c/ov2640.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) commit 26ecfe01790381c4caa65ec9cce484c623f092c4 Author: Arend Van Spriel Date: Fri Apr 14 22:27:37 2017 +0100 brcmfmac: only build fwsignal module for CONFIG_BRCMFMAC_PROTO_BCDC The fwsignal module is only referenced by the bcdc module and part of the bcdc protocol. So only build it when CONFIG_BRCMFMAC_PROTO_BCDC is selected. Fixes: acf8ac41dd73 ("brcmfmac: remove reference to fwsignal data from struct brcmf_pub") Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 26c7e7bc50b85465c934140a5009d61551e51057 Author: Colin Ian King Date: Wed Apr 12 11:04:13 2017 -0300 [media] xc5000: fix spelling mistake: "calibration" Trivial fix to spelling mistake on calibration, make Self lowercase and re-join multiple lined printk since checkpatch allows this coding style. Signed-off-by: Colin Ian King Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/xc5000.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5c45d4a9876b0027318800e930fa36df41b86270 Author: Mauro Carvalho Chehab Date: Sun Apr 9 07:56:08 2017 -0300 [media] vidioc-queryctrl.rst: fix menu/int menu references The documentation incorrectly mentions MENU and INTEGER_MENU at struct v4l2_querymenu table as if they were flags. They're not: they're types. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f9936c4abf63106e0bcc3d82098dd1cfc3dc5290 Author: Sudeep Holla Date: Thu Apr 13 10:05:38 2017 +0100 arm64: dts: juno: add information about L1 and L2 caches Commit a8d4636f96ad ("arm64: cacheinfo: Remove CCSIDR-based cache information probing") removed mechanism to extract cache information based on CCSIDR register as the architecture explicitly states no inference about the actual sizes of caches based on CCSIDR registers. Commit 9a802431c527 ("arm64: cacheinfo: add support to override cache levels via device tree") had already provided options to override cache information from the device tree. This patch adds the information about L1 and L2 caches on all variants of Juno platform. Cc: Will Deacon Cc: Liviu Dudau Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-r1.dts | 42 +++++++++++++++++++++++++++++++++++++ arch/arm64/boot/dts/arm/juno-r2.dts | 42 +++++++++++++++++++++++++++++++++++++ arch/arm64/boot/dts/arm/juno.dts | 42 +++++++++++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+) commit 72cc19938f2761529cb9dfb9788bfd9e7cc6bfb2 Author: Sudeep Holla Date: Wed Apr 12 18:26:21 2017 +0100 arm64: dts: juno: fix few unit address format warnings This patch fixes the following set of warnings on juno. smb@08000000 unit name should not have leading 0s sysctl@020000 simple-bus unit address format error, expected "20000" apbregs@010000 simple-bus unit address format error, expected "10000" mmci@050000 simple-bus unit address format error, expected "50000" kmi@060000 simple-bus unit address format error, expected "60000" kmi@070000 simple-bus unit address format error, expected "70000" wdt@0f0000 simple-bus unit address format error, expected "f0000" Acked-by: Liviu Dudau Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-base.dtsi | 2 +- arch/arm64/boot/dts/arm/juno-motherboard.dtsi | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit 8d1d3d004c1c5386a0c7cf2e49b9de841ec4484b Author: Helen Fornazier Date: Thu Apr 6 16:25:15 2017 -0300 [media] media-entity: only call dev_dbg_obj if mdev is not NULL Fix kernel Oops NULL pointer deference Call dev_dbg_obj only after checking if gobj->mdev is not NULL Signed-off-by: Helen Koike Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e6a7efad7921f12ea8112f16681e47fb30c7d975 Author: Sudeep Holla Date: Thu Apr 13 18:12:24 2017 +0100 ARM: dts: vexpress: fix few unit address format warnings This patch fixes the following set of warnings on vexpress platforms: sysreg@010000 simple-bus unit address format error, expected "10000" sysctl@020000 simple-bus unit address format error, expected "20000" i2c@030000 simple-bus unit address format error, expected "30000" aaci@040000 simple-bus unit address format error, expected "40000" mmci@050000 simple-bus unit address format error, expected "50000" kmi@060000 simple-bus unit address format error, expected "60000" kmi@070000 simple-bus unit address format error, expected "70000" uart@090000 simple-bus unit address format error, expected "90000" uart@0a0000 simple-bus unit address format error, expected "a0000" uart@0b0000 simple-bus unit address format error, expected "b0000" uart@0c0000 simple-bus unit address format error, expected "c0000" wdt@0f0000 simple-bus unit address format error, expected "f0000" Cc: Lorenzo Pieralisi Acked-by: Liviu Dudau Signed-off-by: Sudeep Holla arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/vexpress-v2m.dtsi | 24 ++++++++++++------------ arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dts | 2 +- arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts | 18 +++++++++--------- arch/arm/boot/dts/vexpress-v2p-ca5s.dts | 2 +- arch/arm/boot/dts/vexpress-v2p-ca9.dts | 2 +- 6 files changed, 36 insertions(+), 36 deletions(-) commit 242b0c4cc96f97d0a3b96343acd21613b63fa4a6 Author: Mauro Carvalho Chehab Date: Wed Apr 19 08:01:18 2017 -0300 [media] pixfmt-meta-vsp1-hgo.rst: remove spurious '-' Remove spurious '-' in the VSP1 hgo table. This resulted in a weird dot character that also caused the row to be double-height. We used to have it on other tables, but we got rid of them on changeset 8ed29e302dd1 ("[media] subdev-formats.rst: remove spurious '-'"). Fixes: 14d665387165 ("[media] v4l: Define a pixel format for the R-Car VSP1 1-D histogram engine") Signed-off-by: Mauro Carvalho Chehab .../media/uapi/v4l/pixfmt-meta-vsp1-hgo.rst | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) commit f6cfec891622f7bc3fb04170b7d7cb8bfebc82a7 Author: Peter Rosin Date: Mon Apr 3 09:35:31 2017 +0200 [media] cx231xx: stop double error reporting i2c_mux_add_adapter already logs a message on failure. Reviewed-by: Wolfram Sang Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Peter Rosin drivers/media/usb/cx231xx/cx231xx-i2c.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 5bc3ebc3c6f57c2b30126f113bc35ec95c6f5b5d Author: Mauro Carvalho Chehab Date: Wed Apr 19 07:48:56 2017 -0300 [media] mtk-vcodec: avoid warnings because of empty macros Remove those gcc warnings: drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c: In function 'mtk_vcodec_dec_pw_on': drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c:114:51: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] mtk_v4l2_err("pm_runtime_get_sync fail %d", ret); ^ By adding braces. Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/mtk_vcodec_util.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit ca80d5d0a8175c9be04cfbce24180b8f5e0a744b Author: Nicholas Piggin Date: Wed Apr 19 12:27:38 2017 +1000 powerpc/64s: Remove SAO feature from Power9 DD1 Power9 DD1 does not implement SAO. Although it's not widely used, its presence or absence is visible to user space via arch_validate_prot() so it's moderately important that we get the value right. Fixes: 7dccfbc325bb ("powerpc/book3s: Add a cpu table entry for different POWER9 revs") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 03d67e706fc0cbae4871d82b8c1defd76f3cefd8 Author: Lucas Stach Date: Wed Apr 5 10:11:15 2017 -0300 [media] coda: bump maximum number of internal framebuffers to 17 The h.264 standard allows up to 16 reference frame for the high profile and we need one additional internal framebuffer when the VDOA is in use. Lift the current maximum of 8 internal framebuffers to allow playback of those video streams. Signed-off-by: Lucas Stach Acked-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83bb5869859d5f88f85f7b29c47ba7fe877a1b34 Author: Minghsiu Tsai Date: Wed Apr 5 07:54:29 2017 -0300 [media] media: mtk-vcodec: remove informative log Driver is stable. Remove DEBUG definition from driver. There are debug message in /var/log/messages if DEBUG is defined, such as: [MTK_V4L2] level=0 fops_vcodec_open(),170: decoder capability 0 [MTK_V4L2] level=0 fops_vcodec_open(),177: 16000000.vcodec decoder [0] [MTK_V4L2] level=0 fops_vcodec_release(),200: [0] decoder Signed-off-by: Minghsiu Tsai Acked-by: Tiffany Lin Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/mtk_vcodec_util.h | 1 - 1 file changed, 1 deletion(-) commit d485ef43072e543e81c08276999987039dfa2755 Author: Dmitry Frank Date: Wed Apr 19 12:48:07 2017 +0300 ACPI / video: get rid of magic numbers and use enum instead The first two items in the _BCL method response are special: - Level when machine has full power - Level when machine is on batteries - .... actual supported levels go there .... So this commits adds an enum and uses its descriptive elements throughout the code, instead of magic numbers. Signed-off-by: Dmitry Frank Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_video.c | 110 +++++++++++++++++++++++++++------------------- 1 file changed, 66 insertions(+), 44 deletions(-) commit 8ed29e302dd116c286c541cc39e548db88458ddc Author: Hans Verkuil Date: Mon Apr 3 07:05:45 2017 -0300 [media] subdev-formats.rst: remove spurious '-' Remove spurious duplicate '-' in the Bayer Formats description. This resulted in a weird dot character that also caused the row to be double-height. The - character was probably used originally as indicator of an unused bit, but as the number of columns was increased it was never used for the new columns. Other tables do not use '-' either, so just remove it. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/subdev-formats.rst | 240 ++++++++++++------------ 1 file changed, 120 insertions(+), 120 deletions(-) commit 2384d2d7adc41463a69d3eb0720896cc2d5d1f55 Author: Nicholas Piggin Date: Wed Apr 19 12:27:37 2017 +1000 powerpc/64s: Remove ICSWX feature from Power9 Power9 does not implement the icswx instruction. This CPU feature is not visible to userspace and is only used in the CONFIG_PPC_ICSWX code, which is generally not enabled, and can only be triggered by other code using icswx, which should not happen on Power9 systems in the first place. So impact should be minimal. Fixes: c3ab300ea5 ("powerpc: Add POWER9 cputable entry") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 2 +- arch/powerpc/platforms/Kconfig.cputype | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit bf4f5bf131b67ef821e14de4ea92556e4d1fc852 Author: Cao jin Date: Wed Apr 19 10:07:56 2017 +0800 ACPI / doc: linuxized-acpica.txt: fix typos Fix some typos in the linuxized-acpica.txt document. Signed-off-by: Cao jin [ rjw: Subject / changelog ] Signed-off-by: Rafael J. Wysocki Documentation/acpi/linuxized-acpica.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c6a9583fb41c8bd017f643d5bc90a0fe0a92fe43 Author: Borislav Petkov Date: Tue Apr 18 20:39:24 2017 +0200 x86/mce: Check MCi_STATUS[MISCV] for usable addr on Intel only mce_usable_address() does a bunch of basic sanity checks to verify whether the address reported with the error is usable for further processing. However, we do check MCi_STATUS[MISCV] and that is not needed on AMD as that bit says that there's additional information about the logged error in the MCi_MISCj banks. But we don't need that to know whether the address is usable - we only need to know whether the physical address is valid - i.e., ADDRV. On Intel the MISCV bit is needed to perform additional checks to determine whether the reported address is a physical one, etc. Signed-off-by: Borislav Petkov Cc: Yazen Ghannam Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20170418183924.6agjkebilwqj26or@pd.tnic Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/mcheck/mce.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 950e252cb469f323740d78e4907843acef89eedb Author: Alyssa Milburn Date: Sat Apr 1 14:34:49 2017 -0300 [media] dw2102: limit messages to buffer size Otherwise the i2c transfer functions can read or write beyond the end of stack or heap buffers. Signed-off-by: Alyssa Milburn Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dw2102.c | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit a12b8ab8c5ff7ccd7b107a564743507c850a441d Author: Alyssa Milburn Date: Sat Apr 1 14:34:32 2017 -0300 [media] ttusb2: limit messages to buffer size Otherwise ttusb2_i2c_xfer can read or write beyond the end of static and heap buffers. Signed-off-by: Alyssa Milburn Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/ttusb2.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit f2080b9ac3c450c06a380237e6338f1e43468665 Author: Madhavan Srinivasan Date: Tue Apr 11 07:21:10 2017 +0530 powerpc/perf: Add Power8 mem_access event to sysfs Patch add "mem_access" event to sysfs. This as-is not a raw event supported by Power8 pmu. Instead, it is formed based on raw event encoding specificed in isa207-common.h. Primary PMU event used here is PM_MRK_INST_CMPL. This event tracks only the completed marked instructions. Random sampling mode (MMCRA[SM]) with Random Instruction Sampling (RIS) is enabled to mark type of instructions. With Random sampling in RLS mode with PM_MRK_INST_CMPL event, the LDST /DATA_SRC fields in SIER identifies the memory hierarchy level (eg: L1, L2 etc) statisfied a data-cache miss for a marked instruction. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/power8-events-list.h | 6 ++++++ arch/powerpc/perf/power8-pmu.c | 2 ++ 2 files changed, 8 insertions(+) commit d148c94c27a87213f995f0a7519b231719cfb919 Author: Madhavan Srinivasan Date: Tue Apr 11 07:21:09 2017 +0530 powerpc/perf: Support to export SIERs bit in Power9 Patch to export SIER bits to userspace via perf_mem_data_src and perf_sample_data struct. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/power9-pmu.c | 2 ++ 1 file changed, 2 insertions(+) commit 453ce7a9432ee0bf3199072aa62f4c1895a195b1 Author: Madhavan Srinivasan Date: Tue Apr 11 07:21:08 2017 +0530 powerpc/perf: Support to export SIERs bit in Power8 Patch to export SIER bits to userspace via perf_mem_data_src and perf_sample_data struct. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/power8-pmu.c | 2 ++ 1 file changed, 2 insertions(+) commit 170a315f41c647ce826e389c64047ee1f4cd2dde Author: Madhavan Srinivasan Date: Tue Apr 11 07:21:07 2017 +0530 powerpc/perf: Support to export MMCRA[TEC*] field to userspace Threshold feature when used with MMCRA [Threshold Event Counter Event], MMCRA[Threshold Start event] and MMCRA[Threshold End event] will update MMCRA[Threashold Event Counter Exponent] and MMCRA[Threshold Event Counter Multiplier] with the corresponding threshold event count values. Patch to export MMCRA[TECX/TECM] to userspace in 'weight' field of struct perf_sample_data. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/include/asm/perf_event_server.h | 1 + arch/powerpc/perf/core-book3s.c | 4 ++++ arch/powerpc/perf/isa207-common.c | 8 ++++++++ arch/powerpc/perf/isa207-common.h | 10 ++++++++++ 4 files changed, 23 insertions(+) commit 79e96f8f930d425ab48c511f8a6db16ca7fc68b1 Author: Madhavan Srinivasan Date: Tue Apr 11 07:21:06 2017 +0530 powerpc/perf: Export memory hierarchy info to user space The LDST field and DATA_SRC in SIER identifies the memory hierarchy level (eg: L1, L2 etc), from which a data-cache miss for a marked instruction was satisfied. Use the 'perf_mem_data_src' object to export this hierarchy level to user space. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/include/asm/perf_event_server.h | 2 + arch/powerpc/perf/core-book3s.c | 4 ++ arch/powerpc/perf/isa207-common.c | 74 ++++++++++++++++++++++++++++ arch/powerpc/perf/isa207-common.h | 16 +++++- 4 files changed, 95 insertions(+), 1 deletion(-) commit 8c5073db0ee680c7e70e123918c9b260e49f757d Author: Sukadev Bhattiprolu Date: Tue Apr 11 07:21:05 2017 +0530 powerpc/perf: Define big-endian version of perf_mem_data_src perf_mem_data_src is a union that is initialized in the kernel via the ->val field and accessed by userspace via the mem_xxx bitfields. For this to work correctly on big endian platforms, we need a big-endian definition for the bitfields. Currently on a big endian system, if a user requests PERF_SAMPLE_DATA_SRC (perf report -d), they will get the default value from perf_sample_data_init(), which is PERF_MEM_NA. The value for PERF_MEM_NA is constructed using shifts: /* TLB access */ #define PERF_MEM_TLB_NA 0x01 /* not available */ ... #define PERF_MEM_TLB_SHIFT 26 #define PERF_MEM_S(a, s) \ (((__u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT) #define PERF_MEM_NA (PERF_MEM_S(OP, NA) |\ PERF_MEM_S(LVL, NA) |\ PERF_MEM_S(SNOOP, NA) |\ PERF_MEM_S(LOCK, NA) |\ PERF_MEM_S(TLB, NA)) Which works out as: ((0x01 << 0) | (0x01 << 5) | (0x01 << 19) | (0x01 << 24) | (0x01 << 26)) Which means the PERF_MEM_NA value comes out of the kernel as 0x5080021 in CPU endian. But then in the perf tool, the code uses the bitfields to inspect the value, and currently the bitfields are defined using little endian ordering. So eg. in perf_mem__tlb_scnprintf() we see: data_src->val = 0x5080021 op = 0x0 lvl = 0x0 snoop = 0x0 lock = 0x0 dtlb = 0x0 rsvd = 0x5080021 Because of the way the perf tool code is written this is still displayed to the user as "N/A", so there is no bug visible at the UI level. Currently there are no big endian architectures which export a meaningful value (ie. other than PERF_MEM_NA), so the extent of the bug on big endian platforms is that the PERF_MEM_NA value is exported incorrectly as described above. Subsequent patches will add support on big endian powerpc for populating the data source value. This patch does a minimal fix of adding big endian definition of the bitfields to match the values that are already exported by the kernel on big endian. And it makes no change on little endian. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Madhavan Srinivasan Acked-by: Peter Zijlstra (Intel) Signed-off-by: Michael Ellerman include/uapi/linux/perf_event.h | 16 ++++++++++++++++ tools/include/uapi/linux/perf_event.h | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) commit e889e96e98e8da97bd39e46b7253615eabe14397 Author: Alexey Kardashevskiy Date: Tue Apr 11 17:54:57 2017 +1000 powerpc/iommu: Do not call PageTransHuge() on tail pages The CMA pages migration code does not support compound pages at the moment so it performs few tests before proceeding to actual page migration. One of the tests - PageTransHuge() - has VM_BUG_ON_PAGE(PageTail()) as it is designed to be called on head pages only. Since we also test for PageCompound(), and it contains PageTail() and PageHead(), we can simplify the check by leaving just PageCompound() and therefore avoid possible VM_BUG_ON_PAGE. Fixes: 2e5bbb5461f1 ("KVM: PPC: Book3S HV: Migrate pinned pages out of CMA") Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Alexey Kardashevskiy Acked-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/mm/mmu_context_iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 321f7d29e5163d7f1c9c0b705acc45bd1be34aa6 Author: Aneesh Kumar K.V Date: Tue Apr 18 12:31:27 2017 +0530 powerpc/mmap: Any hint > 128TB searches the full VA space As part of the new large address space support, processes start out life with a 128TB virtual address space. However when calling mmap() a process can pass a hint address, and if that hint is > 128TB the kernel will use the full 512TB address space to try and satisfy the mmap() request. Currently we have a check that the hint is > 128TB and < 512TB (TASK_SIZE), which was added as an optimisation to avoid updating addr_limit unnecessarily and also to avoid calling slice_flush_segments() on all CPUs more than necessary. However this has the user-visible side effect that an mmap() hint above 512TB does not search the full address space unless a preceding mmap() used a hint value > 128TB && < 512TB. So fix it to treat any hint above 128TB as a hint to search the full address space, instead of checking the hint against TASK_SIZE, we instead check if the addr_limit is already == TASK_SIZE. This also brings the ABI in-line with what is proposed on x86. ie, that a hint address above 128TB up to and including (2^64)-1 is an indication to search the full address space. Fixes: f4ea6dcb08ea2c (powerpc/mm: Enable mappings above 128TB) Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/mmap.c | 6 ++++-- arch/powerpc/mm/slice.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) commit 41e20d959e5919c70058369323cefa57428b7aaf Author: Matthew R. Ochs Date: Fri Mar 24 11:03:19 2017 -0500 cxl: Enable PCI device IDs for future IBM CXL adapters Add support for future IBM Coherent Accelerator (CXL) devices with an IDs of 0x0623 and 0x0628. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/pci.c | 2 ++ 1 file changed, 2 insertions(+) commit 95dbdf4fa09823e35b29eab8f7093984daa6a913 Author: Nicholas Piggin Date: Mon Apr 17 00:21:19 2017 +1000 powerpc/64s: Minor fix for MCE TLB flush for radix The TLB flush for radix first flushes TLB for radix configuration, then flushes for hash configuration. The second flush is unnecessary but does not affect correctness. Fixes: 1a472c9dba6b9 ("powerpc/mm/radix: Add tlbflush routines") Signed-off-by: Nicholas Piggin Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/kernel/mce_power.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit be77e999e3937322b7e15274b8fc7da309a040a0 Author: Aneesh Kumar K.V Date: Fri Apr 14 00:48:21 2017 +0530 powerpc/mm/radix: Use mm->task_size for boundary checking instead of addr_limit We don't init addr_limit correctly for 32 bit applications. So default to using mm->task_size for boundary condition checking. We use addr_limit to only control free space search. This makes sure that we do the right thing with 32 bit applications. We should consolidate the usage of TASK_SIZE/mm->task_size and mm->context.addr_limit later. This partially reverts commit fbfef9027c2a7ad (powerpc/mm: Switch some TASK_SIZE checks to use mm_context addr_limit). Fixes: fbfef9027c2a ("powerpc/mm: Switch some TASK_SIZE checks to use mm_context addr_limit") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/hugetlbpage-radix.c | 4 ++-- arch/powerpc/mm/mmap.c | 8 ++++---- arch/powerpc/mm/slice.c | 4 ++-- arch/powerpc/mm/subpage-prot.c | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) commit 8d1b48ef580097e111c2644e6fc6041b9784d218 Author: Nicholas Piggin Date: Wed Apr 19 05:12:16 2017 +1000 powerpc/64s: Revert setting of LPCR[LPES] on POWER9 The XIVE enablement patches included a change to set the LPES (Logical Partitioning Environment Selector) bit (bit # 3) in LPCR (Logical Partitioning Control Register) on POWER9 hosts. This bit sets external interrupts to guest delivery mode, which uses SRR0/1. The host's EE interrupt handler is written to expect HSRR0/1 (for earlier CPUs). This should be fine because XIVE is configured not to deliver EEs to the host (Hypervisor Virtulization Interrupt is used instead) so the EE handler should never be executed. However a bug in interrupt controller code, hardware, or odd configuration of a simulator could result in the host getting an EE incorrectly. Keeping the EE delivery mode matching the host EE handler prevents strange crashes due to using the wrong exception registers. KVM will configure the LPCR to set LPES prior to running a guest so that EEs are delivered to the guest using SRR0/1. Fixes: 08a1e650cc ("powerpc: Fixup LPCR:PECE and HEIC setting on POWER9") Signed-off-by: Nicholas Piggin [mpe: Massage change log to avoid referring to LPES0 which is now renamed LPES] Signed-off-by: Michael Ellerman arch/powerpc/kernel/cpu_setup_power.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7237c75b2717d59ebf2c2595d416e16a160154e1 Author: Geliang Tang Date: Tue Apr 18 20:45:28 2017 +0200 ACPI/APEI: Use setup_deferrable_timer() Use setup_deferrable_timer() instead of init_timer_deferrable() to simplify the code. Signed-off-by: Geliang Tang Tested-by: Tyler Baicar Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: linux-acpi@vger.kernel.org Link: http://lkml.kernel.org/r/3afa5498142ef68256023257dad37b9f8352e65e.1489060803.git.geliangtang@gmail.com Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner drivers/acpi/apei/ghes.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5f2c467c54f5437e35b79fa10c73295d1e0ff586 Author: Hans Verkuil Date: Mon Apr 17 08:05:10 2017 -0300 [media] cec: add MEDIA_CEC_RC config option Add an explicit config option to select whether the CEC remote control messages are to be passed on to the RC subsystem or not. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/Kconfig | 8 +++++++- drivers/media/cec/cec-adap.c | 4 ++-- drivers/media/cec/cec-core.c | 12 ++++++------ 3 files changed, 15 insertions(+), 9 deletions(-) commit ee7e987133c381dceea3acab27f1350936f5ec1f Author: Hans Verkuil Date: Mon Apr 17 07:54:37 2017 -0300 [media] cec.h: merge cec-edid.h into cec.h Drop the separate cec-edid.h header and merge it into cec.h. There was really no need to have a separate header for this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 1 - drivers/media/cec/cec-edid.c | 2 +- drivers/media/cec/cec-notifier.c | 1 + drivers/media/platform/s5p-cec/s5p_cec.c | 1 - include/media/cec-edid.h | 133 ------------------------------- include/media/cec-notifier.h | 2 +- include/media/cec.h | 102 +++++++++++++++++++++++- 7 files changed, 104 insertions(+), 138 deletions(-) commit 56a263aaa0a5f58d70517fae2bdd63fc1e17efec Author: Hans Verkuil Date: Mon Apr 17 07:44:35 2017 -0300 [media] cec: Kconfig cleanup The Kconfig options for the CEC subsystem were a bit messy. In addition there were two cec sources (cec-edid.c and cec-notifier.c) that were outside of the media/cec directory, which was weird. Move those sources to media/cec as well. The cec-edid and cec-notifier functionality is now part of the cec module and these are no longer separate modules. Also remove the MEDIA_CEC_EDID config option and include it with the main CEC config option (which defined CEC_EDID anyway). Added static inlines to cec-edid.h for dummy functions when CEC_CORE isn't defined. CEC drivers should now depend on CEC_CORE. CEC drivers that need the cec-notifier functionality must explicitly select CEC_NOTIFIER. The s5p-cec and stih-cec drivers depended on VIDEO_DEV instead of CEC_CORE, fix that as well. Signed-off-by: Hans Verkuil Acked-by: Benjamin Gaignard Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 2 - drivers/media/Kconfig | 26 ++--- drivers/media/Makefile | 14 +-- drivers/media/cec-edid.c | 171 ------------------------------- drivers/media/cec-notifier.c | 129 ----------------------- drivers/media/cec/Kconfig | 13 +++ drivers/media/cec/Makefile | 8 +- drivers/media/cec/cec-edid.c | 167 ++++++++++++++++++++++++++++++ drivers/media/cec/cec-notifier.c | 129 +++++++++++++++++++++++ drivers/media/i2c/Kconfig | 9 +- drivers/media/platform/Kconfig | 56 +++++----- drivers/media/platform/vivid/Kconfig | 3 +- drivers/media/usb/pulse8-cec/Kconfig | 2 +- drivers/media/usb/rainshadow-cec/Kconfig | 2 +- include/media/cec-edid.h | 29 ++++++ include/media/cec.h | 2 +- 16 files changed, 387 insertions(+), 375 deletions(-) commit aa4f853461aab5f526a312bf418091a95626632b Author: Josh Poimboeuf Date: Tue Apr 18 08:12:58 2017 -0500 x86/unwind: Remove unused 'sp' parameter in unwind_dump() The 'sp' parameter to unwind_dump() is unused. Remove it. Signed-off-by: Josh Poimboeuf 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 Link: http://lkml.kernel.org/r/08cb36b004629f6bbcf44c267ae4a609242ebd0b.1492520933.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/unwind_frame.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4ea3d7410c3597910071182a6bc258c015942887 Author: Josh Poimboeuf Date: Tue Apr 18 08:12:57 2017 -0500 x86/unwind: Prepend hex mask value with '0x' in unwind_dump() In unwind_dump(), the stack mask value is printed in hex, but is confusingly not prepended with '0x'. Signed-off-by: Josh Poimboeuf 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 Link: http://lkml.kernel.org/r/e7fe41be19d73c9f99f53082486473febfe08ffa.1492520933.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/unwind_frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b135b234644c9881eee4f5d5683da0f4524722f Author: Josh Poimboeuf Date: Tue Apr 18 08:12:56 2017 -0500 x86/unwind: Properly zero-pad 32-bit values in unwind_dump() On x86-32, 32-bit stack values printed by unwind_dump() are confusingly zero-padded to 16 characters (64 bits): unwind stack type:0 next_sp: (null) mask:a graph_idx:0 f50cdebc: 00000000f50cdec4 (0xf50cdec4) f50cdec0: 00000000c40489b7 (irq_exit+0x87/0xa0) ... Instead, base the field width on the size of a long integer so that it looks right on both x86-32 and x86-64. x86-32: unwind stack type:1 next_sp: (null) mask:0x2 graph_idx:0 c0ee9d98: c0ee9de0 (init_thread_union+0x1de0/0x2000) c0ee9d9c: c043fd90 (__save_stack_trace+0x50/0xe0) ... x86-64: unwind stack type:1 next_sp: (null) mask:0x2 graph_idx:0 ffffffff81e03b88: ffffffff81e03c10 (init_thread_union+0x3c10/0x4000) ffffffff81e03b90: ffffffff81048f8e (__save_stack_trace+0x5e/0x100) ... Reported-by: H. Peter Anvin Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/36b743812e7eb291d74af4e5067736736622daad.1492520933.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/unwind_frame.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 31c5d1922b90ddc1da6a6ddecef7cd31f17aa32b Author: Marek Vasut Date: Tue Apr 18 20:07:56 2017 +0200 USB: serial: ftdi_sio: add device ID for Microsemi/Arrow SF2PLUS Dev Kit This development kit has an FT4232 on it with a custom USB VID/PID. The FT4232 provides four UARTs, but only two are used. The UART 0 is used by the FlashPro5 programmer and UART 2 is connected to the SmartFusion2 CortexM3 SoC UART port. Note that the USB VID is registered to Actel according to Linux USB VID database, but that was acquired by Microsemi. Signed-off-by: Marek Vasut Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 1 + drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++ 2 files changed, 7 insertions(+) commit 4f37fa549d0de7aee547783752e70f877a49b0c9 Author: Johan Hovold Date: Tue Apr 18 14:42:28 2017 +0200 USB: serial: constify static arrays Declare three immutable static driver arrays as const. Signed-off-by: Johan Hovold drivers/usb/serial/io_edgeport.c | 6 +++--- drivers/usb/serial/mos7720.c | 2 +- drivers/usb/serial/usb_debug.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 8f92e03ecca390beed3d5ccc81023d050f0369fd Author: Ilan Tayari Date: Wed Apr 19 08:41:01 2017 +0300 esp4/6: Fix GSO path for non-GSO SW-crypto packets If esp*_offload module is loaded, outbound packets take the GSO code path, being encapsulated at layer 3, but encrypted in layer 2. validate_xmit_xfrm calls esp*_xmit for that. esp*_xmit was wrongfully detecting these packets as going through hardware crypto offload, while in fact they should be encrypted in software, causing plaintext leakage to the network, and also dropping at the receiver side. Perform the encryption in esp*_xmit, if the SA doesn't have a hardware offload_handle. Also, align esp6 code to esp4 logic. Fixes: fca11ebde3f0 ("esp4: Reorganize esp_output") Fixes: 383d0350f2cc ("esp6: Reorganize esp_output") Signed-off-by: Ilan Tayari Signed-off-by: Steffen Klassert net/ipv4/esp4_offload.c | 4 ++-- net/ipv6/esp6_offload.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) commit ffa6f571e4e20bbe5b3d8b5e112e66b3b6c29632 Author: Colin Ian King Date: Tue Apr 18 15:06:53 2017 +0100 esp6: fix incorrect null pointer check on xo The check for xo being null is incorrect, currently it is checking for non-null, it should be checking for null. Detected with CoverityScan, CID#1429349 ("Dereference after null check") Fixes: 7862b4058b9f ("esp: Add gso handlers for esp4 and esp6") Signed-off-by: Colin Ian King Signed-off-by: Steffen Klassert net/ipv6/esp6_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea98ab34c4339bc638fa394bf1bf0c6863fa88f4 Author: Maurizio Lombardi Date: Tue Apr 18 11:55:51 2017 +0200 scsi: lpfc: fix potential buffer overflow. This patch fixes a potential buffer overflow in lpfc_nvme_info_show(). Signed-off-by: Maurizio Lombardi Reviewed-by: Ewan D. Milne Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cb22bdc8cd5a7a4fdb9a02a64a29bb81a95e6738 Author: Varun Prakash Date: Mon Apr 17 21:32:41 2017 +0530 scsi: cxgb4i: update module description Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eea422709fd89aec27be408f451557ebedd19f11 Author: Colin Ian King Date: Fri Apr 14 14:58:02 2017 +0100 scsi: fc: remove redundant check of an unsigned long being less than zero The check for an unsigned long being less than zero is always false so it is a redundant check and can be removed. Detected by static analysis with by PVS-Studio Signed-off-by: Colin Ian King Reviewed-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c66d9393f583778e8dc1ee6a69c5bbe9ab28eaa Author: NeilBrown Date: Mon Apr 10 12:15:13 2017 +1000 scsi: ibmvfc: don't check for failure from mempool_alloc() mempool_alloc() cannot fail when passed GFP_NOIO or any other gfp setting that is permitted to sleep. So remove this pointless code. Signed-off-by: NeilBrown Acked-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi/ibmvfc.c | 6 ------ 1 file changed, 6 deletions(-) commit 856ee92e8602bd86d34388ac08381c5cb3918756 Merge: a6a5c98 4f7d029 Author: Dave Airlie Date: Wed Apr 19 11:07:14 2017 +1000 Merge tag 'v4.11-rc7' into drm-next Backmerge Linux 4.11-rc7 from Linus tree, to fix some conflicts that were causing problems with the rerere cache in drm-tip. commit 010a522cf2d9a01612b8a95abd787e70ae123ea6 Author: Doug Smythies Date: Mon Apr 17 17:12:13 2017 -0700 tools/power/x86/intel_pstate_tracer: Adjust directory ownership The intel_pstate_tracer.py script only needs to be run as root when it is also used to actually acquire the trace data that it will post process. Otherwise it is generally preferable that it be run as a regular user. If run the first time as root the results directory will be incorrect for any subsequent run as a regular user. For any run as root the specific testname subdirectory will not allow any subsequent file saves by a regular user. Typically, and for example, the regular user might be attempting to save a .csv file converted to a spreadsheet with added calculations or graphs. Set the directories and files owner and groups IDs to be the regular user, if required. Signed-off-by: Doug Smythies Acked-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki .../x86/intel_pstate_tracer/intel_pstate_tracer.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 2cff319e9666f534a7538aa1f4178d1f799b068a Author: Kai Heng Feng Date: Wed Apr 12 16:12:45 2017 +0800 ACPI / blacklist: add _REV quirk for Dell Inspiron 7537 The battery can only be detected after AC power adapter event. Adding the machine to acpi_rev_dmi_table[] can work around this issue. Link: https://bugs.launchpad.net/bugs/1678590 Link: https://bugzilla.kernel.org/show_bug.cgi?id=105721 Signed-off-by: Kai-Heng Feng Signed-off-by: Rafael J. Wysocki drivers/acpi/blacklist.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f49c3f90a31f6e19ef3343dcc8809dac1019b59e Author: Baoquan He Date: Fri Apr 7 16:22:47 2017 +0800 ACPI / tables: Drop acpi_parse_entries() which is not used Function acpi_parse_entries() is not used any more and if necessary, acpi_table_parse_entries() can be used instead of it, so drop it. Signed-off-by: Baoquan He [ rjw: Subject / changelog ] Signed-off-by: Rafael J. Wysocki drivers/acpi/tables.c | 16 ---------------- include/linux/acpi.h | 4 ---- 2 files changed, 20 deletions(-) commit 6859e21e816d8c97a0f3af6162d5ada145e6821d Merge: fa5b5b2 af96f0d Author: James Morris Date: Wed Apr 19 08:35:01 2017 +1000 Merge branch 'smack-for-4.12' of git://github.com/cschaufler/smack-next into next commit fa5b5b26e25cbab819e0955f948e8a6d5363f06f Merge: 30a8325 cae303d Author: James Morris Date: Wed Apr 19 08:30:08 2017 +1000 Merge branch 'stable-4.12' of git://git.infradead.org/users/pcmoore/selinux into next commit 18a8cc9815746b8f0ae6f78733877d3846058d1c Author: Alexander Duyck Date: Thu Mar 2 15:01:36 2017 -0800 ixgbe: Fix output from ixgbe_dump I just found that when we had changed the Rx path to check for length instead of the DD bit we introduced an issue in ixgbe_dump since we were no longer clearing the status bits. To correct this I am updating ixgbe_dump to look for the length bits in the descriptor since that is what we are using in the Rx path. Fixes: c3630cc40b4f ("ixgbe: Use length to determine if descriptor is done") Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2c74d8473d19c159a3c3eabaa4819e110c97e8ec Author: Prakash, Prashanth Date: Wed Mar 29 13:50:00 2017 -0600 ACPI / CPPC: add sysfs entries for CPPC perf capabilities Computed delivered performance using CPPC feedback counters are in the CPPC abstract scale, whereas cppc_cpufreq driver operates in KHz scale. Exposing the CPPC performance capabilities (highest,lowest, nominal, lowest non-linear) will allow userspace to figure out the conversion factor from CPPC abstract scale to KHz. Also rename ctr_wrap_time to wraparound_time so that show_cppc_data() macro will work with it. Signed-off-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 61 ++++++++++++++++++++++++++---------------------- include/acpi/cppc_acpi.h | 2 +- 2 files changed, 34 insertions(+), 29 deletions(-) commit 368520a6b2dd232ea5743a6acd9f056bc30e05b4 Author: Prakash, Prashanth Date: Wed Mar 29 13:49:59 2017 -0600 ACPI / CPPC: Read lowest nonlinear perf in cppc_get_perf_caps() Read lowest non linear perf in cppc_get_perf_caps so that it can be exposed via sysfs to the usespace. Lowest non linear perf is the lowest performance level at which nonlinear power savings are achieved. Signed-off-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 19 +++++++++++-------- include/acpi/cppc_acpi.h | 1 + 2 files changed, 12 insertions(+), 8 deletions(-) commit 7cb671e7a34d73b29df77d0b53492277744e57e7 Author: Alex Williamson Date: Mon Apr 17 16:07:06 2017 -0600 vfio/type1: Reduce repetitive calls in vfio_pin_pages_remote() vfio_pin_pages_remote() is typically called to iterate over a range of memory. Testing CAP_IPC_LOCK is relatively expensive, so it makes sense to push it up to the caller, which can then repeatedly call vfio_pin_pages_remote() using that value. This can show nearly a 20% improvement on the worst case path through VFIO_IOMMU_MAP_DMA with contiguous page mapping disabled. Testing RLIMIT_MEMLOCK is much more lightweight, but we bring it along on the same principle and it does seem to show a marginal improvement. Reviewed-by: Peter Xu Reviewed-by: Kirti Wankhede Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_type1.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 80dbe1fbafbf469fd19862f0d400b769bff0ee46 Author: Alex Williamson Date: Sun Apr 16 15:57:18 2017 -0600 vfio/type1: Prune vfio_pin_page_external() With vfio_lock_acct() testing the locked memory limit under mmap_sem, it's redundant to do it here for a single page. We can also reorder our tests such that we can avoid testing for reserved pages if we're not doing accounting and let vfio_lock_acct() test the process CAP_IPC_LOCK. Finally, this function oddly returns 1 on success. Update to return zero on success, -errno on error. Since the function only pins a single page, there's no need to return the number of pages pinned. N.B. vfio_pin_pages_remote() can pin a large contiguous range of pages before calling vfio_lock_acct(). If we were to similarly remove the extra test there, a user could temporarily pin far more pages than they're allowed. Suggested-by: Kirti Wankhede Suggested-by: Eric Auger Reviewed-by: Kirti Wankhede Reviewed-by: Peter Xu Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_type1.c | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) commit d40d30c5aa5227546030d3d7b0a6a38c6c85933a Author: Jaegeuk Kim Date: Fri Apr 14 15:46:23 2017 -0700 f2fs: avoid dirty node pages in check_only recovery In the check_only mode, we should not make any dirty node pages. Otherwise, we can get this panic: F2FS-fs (nvme0n1p1): Need to recover fsync data ------------[ cut here ]------------ kernel BUG at fs/f2fs/node.c:2204! CPU: 7 PID: 19923 Comm: mount Tainted: G OE 4.9.8 #2 RIP: 0010:[] [] flush_nat_entries+0x43b/0x7d0 [f2fs] Call Trace: [] ? __f2fs_submit_merged_bio+0x5a/0xd0 [f2fs] [] ? __f2fs_submit_merged_bio+0x5a/0xd0 [f2fs] [] ? __f2fs_submit_merged_bio+0x8b/0xd0 [f2fs] [] ? up_write+0x1f/0x40 [] ? __f2fs_submit_merged_bio+0x8b/0xd0 [f2fs] [] write_checkpoint+0x2f4/0xf20 [f2fs] [] ? trace_hardirqs_on+0xd/0x10 [] ? f2fs_sync_fs+0x79/0x190 [f2fs] [] ? f2fs_sync_fs+0x79/0x190 [f2fs] [] f2fs_sync_fs+0x85/0x190 [f2fs] [] f2fs_balance_fs_bg+0x7e/0x1c0 [f2fs] [] f2fs_write_node_pages+0x34/0x350 [f2fs] [] ? __lock_is_held+0x52/0x70 [] do_writepages+0x21/0x30 [] __writeback_single_inode+0x61/0x760 [] ? _raw_spin_unlock+0x27/0x40 [] writeback_single_inode+0xd5/0x190 [] write_inode_now+0x99/0xc0 [] iput+0x1f6/0x2c0 [] f2fs_fill_super+0xc32/0x10c0 [f2fs] [] mount_bdev+0x182/0x1b0 [] ? f2fs_commit_super+0x100/0x100 [f2fs] [] f2fs_mount+0x15/0x20 [f2fs] [] mount_fs+0x38/0x170 [] vfs_kern_mount+0x6b/0x160 [] do_mount+0x1be/0xd60 Signed-off-by: Jaegeuk Kim fs/f2fs/recovery.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 541ea69a909739229962ef2c762074550a56fc0c Author: Alexander Duyck Date: Thu Mar 2 15:01:05 2017 -0800 ixgbe: Add support for maximum headroom when using build_skb This patch increases the headroom allocated when using build_skb on a system with 4K pages. Specifically the breakdown of headroom versus cache size is as follows: L1 Cache Size Headroom 64 192 64, NET_IP_ALIGN == 2 194 128 128 128, NET_IP_ALIGN == 2 130 256 512 256, NET_IP_ALIGN == 2 258 I stopped at supporting only a cache line size of 256 as that was the largest cache size I could find supported in the kernel. With this we are guaranteeing at least 128 bytes of headroom to spare in the frame. This should be enough for us to insert a couple of IPv6 headers if needed which is likely enough room for anything XDP should need. I'm leaving the padding for systems with pages larger than 4K unmodified for now. XDP currently isn't really setup to work on those types of systems so we can cross that bridge when we get there. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 55 ++++++++++++++++++++++++--- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 +-- 2 files changed, 53 insertions(+), 8 deletions(-) commit f4a6374ba46132896154397ce3c559ccb0d15e60 Author: Tony Nguyen Date: Wed Mar 1 11:52:09 2017 -0800 ixgbe: add check for VETO bit when configuring link for KR We did not have a check in place for MMNGC.MNG_VETO when setting up link on X550EM_X KR devices which resulted in link loss for the BMC when loading the driver. This patch adds a check for ixgbe_check_reset_blocked() in setup_link() since in that case there is no PHY reset function. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 3 +++ 1 file changed, 3 insertions(+) commit 9668c93616b2eb9f615adac024c111fb47455554 Author: Philippe Reynes Date: Tue Feb 7 16:56:33 2017 +0100 ixgbevf: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ethtool.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 7ee814d7a6c449e2e96f76f1acb2b7d47dab108c Author: Don Skidmore Date: Thu Feb 2 14:38:46 2017 -0500 ixgbe: Remove unused define Remove the Marvell 1145 PHY define as we have never had a device that supports it and have no plan to in the future. The existence of this define has caused confusing on whether or not this PHY was supported by ixgbe. Signed-off-by: Don Skidmore Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 3 --- 1 file changed, 3 deletions(-) commit 5c11f00ddac2c030827cdecf9c2d3678cbd3137b Author: Emil Tantilov Date: Fri Jan 20 14:11:56 2017 -0800 ixgbe: do not use adapter->num_vfs when setting VFs via module parameter Avoid setting adapter->num_vfs early in the init code path when using the max_vfs module parameter by passing it to ixgbe_enable_sriov() as a function parameter. This fixes an issue where if we failed to allocate vfinfo in __ixgbe_enable_sriov() the driver will crash with NULL pointer in ixgbe_disable_sriov() when attempting to free the vfinfo struct based on adapter->num_vfs. Also it cleans up the assignment of adapter->num_vfs since now it will only be set in __ixgbe_enable_sriov() and cleared in ixgbe_disable_sriov(). Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 50 +++++++++++++------------- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h | 2 +- 3 files changed, 28 insertions(+), 30 deletions(-) commit da614d042ac236e5db52c56c7d7d8accd325dd40 Author: Emil Tantilov Date: Fri Jan 20 14:11:50 2017 -0800 ixgbe: return early instead of wrap block in if statement Since we exit at the end of the block, we can save a level of indentation by performing an early return, and make the next several sections of code more legible, with fewer 80 character line breaks. Also moved allocating vfinfo at the beginning and the notification for enabling SRIOV at the end of the function when we know that it will succeed. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 85 +++++++++++++------------- 1 file changed, 41 insertions(+), 44 deletions(-) commit 2bc0972988c770dce093584ffd641856e3b18c5c Author: Emil Tantilov Date: Fri Jan 20 14:11:45 2017 -0800 ixgbe: move num_vfs_macvlans allocation into separate function Move the code allocating memory for list of MAC addresses that the VFs can use for MACVLAN into its own function. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 48 ++++++++++++++++---------- 1 file changed, 29 insertions(+), 19 deletions(-) commit 5b9d3cfb6b362a407d0c1ced588b962c5c934f24 Author: Emil Tantilov Date: Thu Jan 19 15:55:12 2017 -0800 ixgbe: add default setup_link for x550em_a MAC type Add default setting for mac->ops.setup_link on x550em_a MAC types. This fixes a link issue on KR parts. Signed-off-by: Emil Tantilov 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 8e5c9c534f7da526529124d43b3a87b245587f92 Author: Don Skidmore Date: Fri Dec 30 21:13:18 2016 -0500 ixgbe: list X553 backplane speeds correctly We forgot to indicate some of the supported speed on the X553 backplane. This patch attempts to correct for that. Signed-off-by: Don Skidmore Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 5 +++++ drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 14 ++++++++++++++ 2 files changed, 19 insertions(+) commit ea00353f36b64375518662a8ad15e39218a1f324 Author: Lukas Wunner Date: Tue Apr 18 20:44:30 2017 +0200 PCI: Freeze PME scan before suspending devices Laurent Pinchart reported that the Renesas R-Car H2 Lager board (r8a7790) crashes during suspend tests. Geert Uytterhoeven managed to reproduce the issue on an M2-W Koelsch board (r8a7791): It occurs when the PME scan runs, once per second. During PME scan, the PCI host bridge (rcar-pci) registers are accessed while its module clock has already been disabled, leading to the crash. One reproducer is to configure s2ram to use "s2idle" instead of "deep" suspend: # echo 0 > /sys/module/printk/parameters/console_suspend # echo s2idle > /sys/power/mem_sleep # echo mem > /sys/power/state Another reproducer is to write either "platform" or "processors" to /sys/power/pm_test. It does not (or is less likely) to happen during full system suspend ("core" or "none") because system suspend also disables timers, and thus the workqueue handling PME scans no longer runs. Geert believes the issue may still happen in the small window between disabling module clocks and disabling timers: # echo 0 > /sys/module/printk/parameters/console_suspend # echo platform > /sys/power/pm_test # Or "processors" # echo mem > /sys/power/state (Make sure CONFIG_PCI_RCAR_GEN2 and CONFIG_USB_OHCI_HCD_PCI are enabled.) Rafael Wysocki agrees that PME scans should be suspended before the host bridge registers become inaccessible. To that end, queue the task on a workqueue that gets frozen before devices suspend. Rafael notes however that as a result, some wakeup events may be missed if they are delivered via PME from a device without working IRQ (which hence must be polled) and occur after the workqueue has been frozen. If that turns out to be an issue in practice, it may be possible to solve it by calling pci_pme_list_scan() once directly from one of the host bridge's pm_ops callbacks. Stacktrace for posterity: PM: Syncing filesystems ... [ 38.566237] done. PM: Preparing system for sleep (mem) Freezing user space processes ... [ 38.579813] (elapsed 0.001 seconds) done. Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. PM: Suspending system (mem) PM: suspend of devices complete after 152.456 msecs PM: late suspend of devices complete after 2.809 msecs PM: noirq suspend of devices complete after 29.863 msecs suspend debug: Waiting for 5 second(s). Unhandled fault: asynchronous external abort (0x1211) at 0x00000000 pgd = c0003000 [00000000] *pgd=80000040004003, *pmd=00000000 Internal error: : 1211 [#1] SMP ARM Modules linked in: CPU: 1 PID: 20 Comm: kworker/1:1 Not tainted 4.9.0-rc1-koelsch-00011-g68db9bc814362e7f #3383 Hardware name: Generic R8A7791 (Flattened Device Tree) Workqueue: events pci_pme_list_scan task: eb56e140 task.stack: eb58e000 PC is at pci_generic_config_read+0x64/0x6c LR is at rcar_pci_cfg_base+0x64/0x84 pc : [] lr : [] psr: 600d0093 sp : eb58fe98 ip : c041d750 fp : 00000008 r10: c0e2283c r9 : 00000000 r8 : 600d0013 r7 : 00000008 r6 : eb58fed6 r5 : 00000002 r4 : eb58feb4 r3 : 00000000 r2 : 00000044 r1 : 00000008 r0 : 00000000 Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user Control: 30c5387d Table: 6a9f6c80 DAC: 55555555 Process kworker/1:1 (pid: 20, stack limit = 0xeb58e210) Stack: (0xeb58fe98 to 0xeb590000) fe80: 00000002 00000044 fea0: eb6f5800 c041d9b0 eb58feb4 00000008 00000044 00000000 eb78a000 eb78a000 fec0: 00000044 00000000 eb9aff00 c0424bf0 eb78a000 00000000 eb78a000 c0e22830 fee0: ea8a6fc0 c0424c5c eaae79c0 c0424ce0 eb55f380 c0e22838 eb9a9800 c0235fbc ff00: eb55f380 c0e22838 eb55f380 eb9a9800 eb9a9800 eb58e000 eb9a9824 c0e02100 ff20: eb55f398 c02366c4 eb56e140 eb5631c0 00000000 eb55f380 c023641c 00000000 ff40: 00000000 00000000 00000000 c023a928 cd105598 00000000 40506a34 eb55f380 ff60: 00000000 00000000 dead4ead ffffffff ffffffff eb58ff74 eb58ff74 00000000 ff80: 00000000 dead4ead ffffffff ffffffff eb58ff90 eb58ff90 eb58ffac eb5631c0 ffa0: c023a844 00000000 00000000 c0206d68 00000000 00000000 00000000 00000000 ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 3a81336c 10ccd1dd [] (pci_generic_config_read) from [] (pci_bus_read_config_word+0x58/0x80) [] (pci_bus_read_config_word) from [] (pci_check_pme_status+0x34/0x78) [] (pci_check_pme_status) from [] (pci_pme_wakeup+0x28/0x54) [] (pci_pme_wakeup) from [] (pci_pme_list_scan+0x58/0xb4) [] (pci_pme_list_scan) from [] (process_one_work+0x1bc/0x308) [] (process_one_work) from [] (worker_thread+0x2a8/0x3e0) [] (worker_thread) from [] (kthread+0xe4/0xfc) [] (kthread) from [] (ret_from_fork+0x14/0x2c) Code: ea000000 e5903000 f57ff04f e3a00000 (e5843000) ---[ end trace 667d43ba3aa9e589 ]--- Fixes: df17e62e5bff ("PCI: Add support for polling PME state on suspended legacy PCI devices") Reported-and-tested-by: Laurent Pinchart Reported-and-tested-by: Geert Uytterhoeven Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Reviewed-by: Laurent Pinchart Acked-by: Rafael J. Wysocki Cc: stable@vger.kernel.org # 2.6.37+ Cc: Mika Westerberg Cc: Niklas Söderlund Cc: Simon Horman Cc: Yinghai Lu Cc: Matthew Garrett drivers/pci/pci.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 18e01ee75f4533cddd774b8618e20d26d7d0d958 Author: Don Skidmore Date: Fri Dec 30 21:07:58 2016 -0500 ixgbe: Add X552 XFI backplane support This patch add support for X552 XFI backplane interface. The XFI backplane requires a custom tuned link. HW/FW owns the link config for XF backplane and SW must not interfere with it. Signed-off-by: Don Skidmore Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 2 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 14 ++++++++++++++ 4 files changed, 18 insertions(+) commit 18bda0d93b633a238cc4df257e39c36ea8b1dccf Author: Don Skidmore Date: Fri Dec 30 21:07:14 2016 -0500 ixgbe: Complete support for X553 sgmii The initial patches supporting X553 sgmii forgot some details. This patch should cover those missing spots. Signed-off-by: Don Skidmore Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 29 +++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) commit 5fbf5addad987028d31d69863c7ec8ed776562cb Author: Tony Nguyen Date: Tue Nov 1 13:58:27 2016 -0700 ixgbe: Remove driver config for KX4 PHY The KX4 PHY is configured by the NVM. Currently, the driver is overwriting the config; remove the code associated with KX4 configuration. Signed-off-by: Tony Nguyen Tested-by: Krishneil Singh drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 3 +- drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 12 -------- drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 40 +-------------------------- 3 files changed, 3 insertions(+), 52 deletions(-) commit 9868879f293c599ce13b584c5bd8800312970781 Author: Stefan Agner Date: Mon Apr 17 13:54:34 2017 -0700 net: cx89x0: move attribute declaration before struct keyword The attribute declaration is typically before the definition. Move the __maybe_unused attribute declaration before the struct keyword. Signed-off-by: Stefan Agner Signed-off-by: David S. Miller drivers/net/ethernet/cirrus/cs89x0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 332f235836082fe7d3d890409ed6a20e0ea0d923 Author: Joe Perches Date: Tue Jan 3 07:28:11 2017 -0800 ixgbe: Remove pr_cont uses As pr_cont output can be interleaved by other processes, using pr_cont should be avoided where possible. Miscellanea: - Use a temporary pointer to hold the next descriptions and consolidate the pr_cont uses - Use the temporary buffer to hold the 8 u32 register values and emit those in a single go - Coalesce formats and logging neatening around those changes - Fix a defective output for the rx ring entry description when also emitting rx_buffer_info data This reduces overall object size a tiny bit too. $ size drivers/net/ethernet/intel/ixgbe/*.o* text data bss dec hex filename 62167 728 12 62907 f5bb drivers/net/ethernet/intel/ixgbe/ixgbe_main.o.new 62273 728 12 63013 f625 drivers/net/ethernet/intel/ixgbe/ixgbe_main.o.old Signed-off-by: Joe Perches Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 84 +++++++++++++++------------ 1 file changed, 47 insertions(+), 37 deletions(-) commit bf8d9dfb9beeeef48f0444eb02198a09d5a52954 Author: Sriharsha Basavapatna Date: Mon Apr 17 21:33:13 2017 +0530 be2net: VxLAN offload should be re-enabled when only 1 UDP port is left We disable VxLAN offload when more than 1 UDP port is added to the driver, since Skyhawk doesn't support offload with multiple ports. The existing driver design expects the user to delete all port configurations and create a configuration with a single UDP port for VxLAN offload to be re-enabled. Remove this restriction by tracking the ports added and re-enabling offload when ports get deleted and only 1 port is left. Signed-off-by: Sriharsha Basavapatna Reviewed-by: Sathya Perla Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be.h | 12 ++- drivers/net/ethernet/emulex/benet/be_main.c | 134 +++++++++++++++++++--------- 2 files changed, 102 insertions(+), 44 deletions(-) commit e05ddafd896fccb4568db01fe4de812ca1e6f353 Author: Iyappan Subramanian Date: Mon Apr 17 16:47:55 2017 -0700 drivers: net: xgene-v2: Extend ethtool statistics This patch adds extended statistics reporting to ethtool. In summary, this patch, - adds ethtool.h with the statistics register definitions - adds 'struct xge_gstrings_extd_stats' to gather extended stats - modifies xge_get_strings(), get_sset_count() and get_ethtool_stats() accordingly - moves 'struct xge_gstrings_stats' to ethtool.h Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene-v2/ethtool.c | 78 ++++++++++++++++++++++++++--- drivers/net/ethernet/apm/xgene-v2/ethtool.h | 78 +++++++++++++++++++++++++++++ drivers/net/ethernet/apm/xgene-v2/mac.h | 3 -- drivers/net/ethernet/apm/xgene-v2/main.h | 2 +- 4 files changed, 151 insertions(+), 10 deletions(-) commit b5d8acbb8781269cd4e2b986c9b0b884c0ed836a Author: Usha Ketineni Date: Fri Dec 23 10:08:14 2016 -0800 ixgbe: Avoid Tx hang by not allowing more than the number of VFs supported. When DCB is enabled, add checks to ensure creation of number of VF's is valid based on the traffic classes configured by the device. Signed-off-by: Usha Ketineni Tested-by: Ronald Bynoe Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 26 +++++++++++++++++++++++--- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h | 3 +++ 2 files changed, 26 insertions(+), 3 deletions(-) commit c9c75143a5962c4c26d2f2c99b7a6e06f421f5e1 Author: Yongji Xie Date: Mon Apr 10 19:58:11 2017 +0800 PCI: Fix calculation of bridge window's size and alignment In case that one device's alignment is greater than its size, we may get an incorrect size and alignment for its bus's memory window in pbus_size_mem(). Fix this case. Signed-off-by: Yongji Xie Signed-off-by: Bjorn Helgaas drivers/pci/setup-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ea629d873f3e140fb2e3181c30413e485ee9002b Author: Yongji Xie Date: Wed Feb 15 14:50:22 2017 +0800 PCI: Ignore requested alignment for IOV BARs We would call pci_reassigndev_resource_alignment() before pci_init_capabilities(). So the requested alignment would never work for IOV BARs. Furthermore, it's meaningless to request additional alignment for IOV BARs, the IOV BAR alignment is only determined by the VF BAR size. Signed-off-by: Yongji Xie Signed-off-by: Bjorn Helgaas Reviewed-by: Gavin Shan drivers/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76dc52684d0f72971d9f6cc7d5ae198061b715bd Author: Matthias Kaehlcke Date: Fri Apr 14 13:38:02 2017 -0700 PCI: Make PCI_ROM_ADDRESS_MASK a 32-bit constant A 64-bit value is not needed since a PCI ROM address consists in 32 bits. This fixes a clang warning about "implicit conversion from 'unsigned long' to 'u32'". Also remove now unnecessary casts to u32 from __pci_read_base() and pci_std_update_resource(). Signed-off-by: Matthias Kaehlcke Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 2 +- drivers/pci/setup-res.c | 2 +- include/uapi/linux/pci_regs.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit de5bbdd01cf9ee3cd4586b5a970d3ea015c6d7e3 Author: Marc Gonzalez Date: Tue Apr 18 14:21:04 2017 -0500 PCI: Change pci_host_common_probe() visibility pci_host_common_probe() is defined when CONFIG_PCI_HOST_COMMON=y; therefore the function declaration should match that. drivers/pci/host/pcie-tango.c:300:9: error: implicit declaration of function 'pci_host_common_probe' Signed-off-by: Marc Gonzalez Signed-off-by: Bjorn Helgaas include/linux/pci-ecam.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc5205ef46231e848562c9275933d7b359f515ba Author: Marc Gonzalez Date: Mon Apr 10 19:46:54 2017 +0200 PCI: Improve __pci_read_base() robustness Local variables 'l' and 'sz' are uninitialized. Normally, they would be initialized by pci_read_config_dword() but when an error occurs, some drivers immediately return an error code, which leaves the argument uninitialized. Provide a safe initial value to make the code more robust. Signed-off-by: Marc Gonzalez Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ff199cb48b4af6f29a1bf15d92d93f44a22eeb4 Author: Christoph Hellwig Date: Thu Apr 13 09:06:43 2017 +0200 nvme/pci: Switch to pci_request_irq() Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas Reviewed-by: Thomas Gleixner Reviewed-by: Keith Busch drivers/nvme/host/pci.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) commit e44adf05b85e5a9d1d224f5ecde1c1c5e5371e36 Author: Laura Abbott Date: Tue Apr 18 11:27:14 2017 -0700 staging/android: Update Ion TODO list Most of the items have been taken care of by a clean up series. Remove the completed items and add a few new ones. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/TODO | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) commit 804ca94a98237e12ad8fabf7cdc566f14b05b7df Author: Laura Abbott Date: Tue Apr 18 11:27:13 2017 -0700 staging: android: ion: Set query return value This never got set in the ioctl. Properly set a return value of 0 on success. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 1 + 1 file changed, 1 insertion(+) commit 15c6098cfec543687164a05faeb859f8e4f7480b Author: Laura Abbott Date: Tue Apr 18 11:27:12 2017 -0700 staging: android: ion: Remove ion_handle and ion_client ion_handle was introduced as an abstraction to represent a reference to a buffer via an ion_client. As frameworks outside of Ion evolved, the dmabuf emerged as the preferred standard for use in the kernel. This has made the ion_handle an unnecessary abstraction and prone to race conditions. ion_client is also now only used internally. We have enough mechanisms for race conditions and leaks already so just drop ion_handle and ion_client. This also includes ripping out most of the debugfs infrastructure since much of that was tied to clients and handles. The debugfs infrastructure was prone to give confusing data (orphaned allocations) so it can be replaced with something better if people actually want it. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion-ioctl.c | 53 +-- drivers/staging/android/ion/ion.c | 701 ++------------------------------ drivers/staging/android/ion/ion.h | 77 +--- drivers/staging/android/uapi/ion.h | 25 +- 4 files changed, 51 insertions(+), 805 deletions(-) commit e3b914bc7eb6bcecc5b597ee6e31fc40442c291f Author: Laura Abbott Date: Tue Apr 18 11:27:11 2017 -0700 staging: android: ion: Drop ion_map_kernel interface Nobody uses this interface externally. Drop it. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 59 --------------------------------------- 1 file changed, 59 deletions(-) commit 2f87f50b234038ff91f67b4a98f2289ff630563a Author: Laura Abbott Date: Tue Apr 18 11:27:10 2017 -0700 staging: android: ion: Rework heap registration/enumeration The current model of Ion heap registration is based on the outdated model of board files. The replacement for board files (devicetree) isn't a good replacement for what Ion wants to do. In actuality, Ion wants to show what memory is available in the system for something else to figure out what to use. Switch to a model where Ion creates its device unconditionally and heaps are registed as available regions. Currently, only system and CMA heaps are converted over to the new model. Carveout and chunk heaps can be converted over when someone wants to figure out how. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/Kconfig | 25 +++++++++ drivers/staging/android/ion/Makefile | 7 +-- drivers/staging/android/ion/ion.c | 28 +++++----- drivers/staging/android/ion/ion.h | 40 +------------- drivers/staging/android/ion/ion_carveout_heap.c | 10 ---- drivers/staging/android/ion/ion_chunk_heap.c | 9 ---- drivers/staging/android/ion/ion_cma_heap.c | 24 +++++++-- drivers/staging/android/ion/ion_heap.c | 71 ------------------------- drivers/staging/android/ion/ion_system_heap.c | 38 ++++++++----- 9 files changed, 85 insertions(+), 167 deletions(-) commit eb9751dbe6aaff217769d6bf2adc8eea684714a1 Author: Laura Abbott Date: Tue Apr 18 11:27:09 2017 -0700 staging: android: ion: Collapse internal header files Ion current has ion_priv.h and ion.h as header files. ion.h was intended to be used for public APIs but Ion never ended up really having anything public. Combine the two headers so there is only one internal header. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion-ioctl.c | 1 - drivers/staging/android/ion/ion.c | 1 - drivers/staging/android/ion/ion.h | 479 ++++++++++++++++++++---- drivers/staging/android/ion/ion_carveout_heap.c | 1 - drivers/staging/android/ion/ion_chunk_heap.c | 1 - drivers/staging/android/ion/ion_cma_heap.c | 1 - drivers/staging/android/ion/ion_heap.c | 1 - drivers/staging/android/ion/ion_page_pool.c | 3 +- drivers/staging/android/ion/ion_priv.h | 453 ---------------------- drivers/staging/android/ion/ion_system_heap.c | 1 - 10 files changed, 402 insertions(+), 540 deletions(-) commit ddeb587b94654e9d7b5f3a4ff5c3620affca9053 Author: Laura Abbott Date: Tue Apr 18 11:27:08 2017 -0700 staging: android: ion: Get rid of ion_phys_addr_t Once upon a time, phys_addr_t was not everywhere in the kernel. These days it is used enough places that having a separate Ion type doesn't make sense. Remove the extra type and just use phys_addr_t directly. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.h | 12 ++---------- drivers/staging/android/ion/ion_carveout_heap.c | 10 +++++----- drivers/staging/android/ion/ion_chunk_heap.c | 6 +++--- drivers/staging/android/ion/ion_heap.c | 4 ++-- 4 files changed, 12 insertions(+), 20 deletions(-) commit b0c7cb2623ede9823850945ba1e9eb442fd668a7 Author: Laura Abbott Date: Tue Apr 18 11:27:07 2017 -0700 staging: android: ion: Break the ABI in the name of forward progress Several of the Ion ioctls were designed in such a way that they necessitate compat ioctls. We're breaking a bunch of other ABIs and cleaning stuff up anyway so let's follow the ioctl guidelines and clean things up while everyone is busy converting things over anyway. As part of this, also remove the useless alignment field from the allocation structure. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/Makefile | 3 - drivers/staging/android/ion/compat_ion.c | 152 ------------------------------- drivers/staging/android/ion/compat_ion.h | 29 ------ drivers/staging/android/ion/ion-ioctl.c | 1 - drivers/staging/android/ion/ion.c | 5 +- drivers/staging/android/uapi/ion.h | 19 ++-- 6 files changed, 11 insertions(+), 198 deletions(-) commit 62b3a094cb9e4a3c5a5be4a20b72e0ced3af0e31 Author: Laura Abbott Date: Tue Apr 18 11:27:06 2017 -0700 staging: android: ion: Stop butchering the DMA address Now that we have proper caching, stop setting the DMA address manually. It should be set after properly calling dma_map. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit 5f0d5a3ae7cff0d7fa943c199c3a2e44f23e1fac Author: Paul E. McKenney Date: Wed Jan 18 02:53:44 2017 -0800 mm: Rename SLAB_DESTROY_BY_RCU to SLAB_TYPESAFE_BY_RCU A group of Linux kernel hackers reported chasing a bug that resulted from their assumption that SLAB_DESTROY_BY_RCU provided an existence guarantee, that is, that no block from such a slab would be reallocated during an RCU read-side critical section. Of course, that is not the case. Instead, SLAB_DESTROY_BY_RCU only prevents freeing of an entire slab of blocks. However, there is a phrase for this, namely "type safety". This commit therefore renames SLAB_DESTROY_BY_RCU to SLAB_TYPESAFE_BY_RCU in order to avoid future instances of this sort of confusion. Signed-off-by: Paul E. McKenney Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrew Morton Cc: Acked-by: Johannes Weiner Acked-by: Vlastimil Babka [ paulmck: Add comments mentioning the old name, as requested by Eric Dumazet, in order to help people familiar with the old name find the new one. ] Acked-by: David Rientjes Documentation/RCU/00-INDEX | 2 +- Documentation/RCU/rculist_nulls.txt | 6 +++--- Documentation/RCU/whatisRCU.txt | 3 ++- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem_request.h | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 2 +- fs/jbd2/journal.c | 2 +- fs/signalfd.c | 2 +- include/linux/dma-fence.h | 4 ++-- include/linux/slab.h | 6 ++++-- include/net/sock.h | 2 +- kernel/fork.c | 4 ++-- kernel/signal.c | 2 +- mm/kasan/kasan.c | 6 +++--- mm/kmemcheck.c | 2 +- mm/rmap.c | 4 ++-- mm/slab.c | 6 +++--- mm/slab.h | 4 ++-- mm/slab_common.c | 6 +++--- mm/slob.c | 6 +++--- mm/slub.c | 12 ++++++------ net/dccp/ipv4.c | 2 +- net/dccp/ipv6.c | 2 +- net/ipv4/tcp_ipv4.c | 2 +- net/ipv6/tcp_ipv6.c | 2 +- net/llc/af_llc.c | 2 +- net/llc/llc_conn.c | 4 ++-- net/llc/llc_sap.c | 2 +- net/netfilter/nf_conntrack_core.c | 8 ++++---- net/smc/af_smc.c | 2 +- 30 files changed, 57 insertions(+), 54 deletions(-) commit 204f672255c228ef7a66c29ae48123778da938a1 Author: Laura Abbott Date: Tue Apr 18 11:27:05 2017 -0700 staging: android: ion: Use CMA APIs directly When CMA was first introduced, its primary use was for DMA allocation and the only way to get CMA memory was to call dma_alloc_coherent. This put Ion in an awkward position since there was no device structure readily available and setting one up messed up the coherency model. These days, CMA can be allocated directly from the APIs. Switch to using this model to avoid needing a dummy device. This also mitigates some of the caching problems (e.g. dma_alloc_coherent only returning uncached memory). Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/Kconfig | 7 +++ drivers/staging/android/ion/Makefile | 3 +- drivers/staging/android/ion/ion_cma_heap.c | 97 ++++++++---------------------- drivers/staging/android/ion/ion_heap.c | 4 ++ 4 files changed, 39 insertions(+), 72 deletions(-) commit e4231bcda72daef497af45e195a33daa0f9357d0 Author: Laura Abbott Date: Tue Apr 18 11:27:04 2017 -0700 cma: Introduce cma_for_each_area Frameworks (e.g. Ion) may want to iterate over each possible CMA area to allow for enumeration. Introduce a function to allow a callback. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman include/linux/cma.h | 2 ++ mm/cma.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) commit f318dd083c8128c50e48ceb8c3e812e52800fc4f Author: Laura Abbott Date: Tue Apr 18 11:27:03 2017 -0700 cma: Store a name in the cma structure Frameworks that may want to enumerate CMA heaps (e.g. Ion) will find it useful to have an explicit name attached to each region. Store the name in each CMA structure. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman arch/powerpc/kvm/book3s_hv_builtin.c | 3 ++- drivers/base/dma-contiguous.c | 5 +++-- include/linux/cma.h | 4 +++- mm/cma.c | 17 +++++++++++++++-- mm/cma.h | 1 + mm/cma_debug.c | 2 +- 6 files changed, 25 insertions(+), 7 deletions(-) commit 704e8953d3e9db29d5d93c0bf6973d86fe15e679 Author: Christoph Hellwig Date: Thu Apr 13 09:06:42 2017 +0200 PCI/irq: Add pci_request_irq() and pci_free_irq() helpers These are small wrappers around request_threaded_irq() and free_irq(), which dynamically allocate space for the device name so that drivers don't need to keep static buffers for these around. Additionally it works with device-relative vector numbers to make the usage easier, and force the IRQF_SHARED flag on given that it has no runtime overhead and should be supported by all PCI devices. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas Reviewed-by: Thomas Gleixner drivers/pci/irq.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++- include/linux/pci.h | 6 ++++++ 2 files changed, 66 insertions(+), 1 deletion(-) commit 25ce4be72411867e0471908ee9319599035cc624 Author: Christoph Hellwig Date: Thu Apr 13 09:06:41 2017 +0200 genirq: Return the IRQ name from free_irq() This allows callers to get back at them instead of having to store it in another variable. Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas Reviewed-by: Thomas Gleixner include/linux/interrupt.h | 2 +- kernel/irq/manage.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) commit a7e60e55d73c39df7bcfedb6ccf9b6b1100d960d Author: Christoph Hellwig Date: Thu Apr 13 09:06:40 2017 +0200 genirq: Fix indentation in remove_irq() Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas Reviewed-by: Thomas Gleixner kernel/irq/manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dad81a2026841b5e2651aab58a7398c13cc05847 Author: Paul E. McKenney Date: Sat Mar 25 17:23:44 2017 -0700 srcu: Introduce CLASSIC_SRCU Kconfig option The TREE_SRCU rewrite is large and a bit on the non-simple side, so this commit helps reduce risk by allowing the old v4.11 SRCU algorithm to be selected using a new CLASSIC_SRCU Kconfig option that depends on RCU_EXPERT. The default is to use the new TREE_SRCU and TINY_SRCU algorithms, in order to help get these the testing that they need. However, if your users do not require the update-side scalability that is to be provided by TREE_SRCU, select RCU_EXPERT and then CLASSIC_SRCU to revert back to the old classic SRCU algorithm. Signed-off-by: Paul E. McKenney include/linux/srcu.h | 2 + include/linux/srcuclassic.h | 101 ++++++++ init/Kconfig | 21 +- kernel/rcu/Makefile | 3 +- kernel/rcu/rcutorture.c | 2 +- kernel/rcu/srcu.c | 347 ++++++++++++++----------- kernel/rcu/srcutree.c | 613 ++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 934 insertions(+), 155 deletions(-) commit 32071141b2448458479932fe726ce892cbe1b4e4 Author: Paul E. McKenney Date: Sat Mar 25 11:34:42 2017 -0700 srcutorture: Print Tiny SRCU reader statistics The srcu_torture_stats() function is adapted to the specific srcu_struct layout traditionally used by SRCU. This commit therefore adds support for Tiny SRCU. Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit d8be81735aa89413b333de488251f0e64e2be591 Author: Paul E. McKenney Date: Sat Mar 25 09:59:38 2017 -0700 srcu: Create a tiny SRCU In response to automated complaints about modifications to SRCU increasing its size, this commit creates a tiny SRCU that is used in SMP=n && PREEMPT=n builds. Signed-off-by: Paul E. McKenney include/linux/srcu.h | 69 ++------------- include/linux/srcutiny.h | 81 ++++++++++++++++++ include/linux/srcutree.h | 91 ++++++++++++++++++++ init/Kconfig | 12 +++ kernel/rcu/Makefile | 3 +- kernel/rcu/rcutorture.c | 2 + kernel/rcu/srcutiny.c | 215 +++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 411 insertions(+), 62 deletions(-) commit dde8da6cffe73dab81aca3855e717e40db35178c Author: Paul E. McKenney Date: Sat Mar 25 10:42:07 2017 -0700 mm: Use static initialization for "srcu" The MM-notifier code currently dynamically initializes the srcu_struct named "srcu" at subsys_initcall() time, and includes a BUG_ON() to check this initialization in do_mmu_notifier_register(). Unfortunately, there is no foolproof way to verify that an srcu_struct has been initialized, given the possibility of an srcu_struct being allocated on the stack or on the heap. This means that creating an srcu_struct_is_initialized() function is not a reasonable course of action. Nor is peppering do_mmu_notifier_register() with SRCU-specific #ifdefs an attractive alternative. This commit therefore uses DEFINE_STATIC_SRCU() to initialize this srcu_struct at compile time, thus eliminating both the subsys_initcall()-time initialization and the runtime BUG_ON(). Signed-off-by: Paul E. McKenney Cc: Cc: Andrew Morton Cc: Ingo Molnar Cc: Michal Hocko Cc: "Peter Zijlstra (Intel)" Cc: Vegard Nossum mm/mmu_notifier.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit f60d231a87c5c9f23f10e69996f396d46f5bf901 Author: Paul E. McKenney Date: Fri Mar 24 13:46:33 2017 -0700 srcu: Crude control of expedited grace periods SRCU's implementation of expedited grace periods has always assumed that the SRCU instance is idle when the expedited request arrives. This commit improves this a bit by maintaining a count of the number of outstanding expedited requests, thus allowing prior non-expedited grace periods accommodate these requests by shifting to expedited mode. However, any non-expedited wait already in progress will still wait for the full duration. Improved control of expedited grace periods is planned, but one step at a time. Signed-off-by: Paul E. McKenney include/linux/srcu.h | 1 + kernel/rcu/srcu.c | 84 ++++++++++++++++++++++++++++------------------------ 2 files changed, 47 insertions(+), 38 deletions(-) commit 80a7956fe36c2ee40c6ff12c77926d267802b7c8 Author: Paul E. McKenney Date: Wed Mar 22 15:26:18 2017 -0700 srcu: Merge ->srcu_state into ->srcu_gp_seq Updating ->srcu_state and ->srcu_gp_seq will lead to extremely complex race conditions given multiple callback queues, so this commit takes advantage of the two-bit state now available in rcu_seq counters to store the state in the bottom two bits of ->srcu_gp_seq. Signed-off-by: Paul E. McKenney include/linux/srcu.h | 5 +---- kernel/rcu/rcu.h | 10 ++++++++++ kernel/rcu/srcu.c | 55 +++++++++++++++++++++++++++++++++------------------- 3 files changed, 46 insertions(+), 24 deletions(-) commit f1ec57a462314f3d1cd0c9c8a04979228aa9d38c Author: Paul E. McKenney Date: Tue Mar 21 10:35:57 2017 -0700 srcu: Allow a second bit in rcu_seq for SRCU state This commit increases the number of reserved bits at the bottom of an rcu_seq grace-period counter from one to two, as will be needed to accommodate SRCU's three-state grace periods. Signed-off-by: Paul E. McKenney kernel/rcu/rcu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 031aeee000e895247eafa4233c2d193dd39d4ea2 Author: Paul E. McKenney Date: Tue Mar 21 07:28:14 2017 -0700 srcu: Improve rcu_seq grace-period-counter abstraction The expedited grace-period code contains several open-coded shifts know the format of an rcu_seq grace-period counter, which is not particularly good style. This commit therefore creates a new rcu_seq_ctr() function that extracts the counter portion of the counter, and an rcu_seq_state() function that extracts the low-order state bit. This commit prepares for SRCU callback parallelization, which will require two state bits. Signed-off-by: Paul E. McKenney kernel/rcu/rcu.h | 29 +++++++++++++++++++++++++---- kernel/rcu/tree_exp.h | 9 ++++----- 2 files changed, 29 insertions(+), 9 deletions(-) commit 91e27c356c96d760f5c283f05627ed976377debb Author: Paul E. McKenney Date: Wed Mar 15 16:34:11 2017 -0700 srcu: Fix bogus try_check_zero() comment Signed-off-by: Paul E. McKenney kernel/rcu/srcu.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit e95d68d2127716c7d6fb144bb19ef48ce9f37393 Author: Paul E. McKenney Date: Wed Mar 15 13:11:11 2017 -0700 srcu: Make num_rcu_lvl[] array be external This commit makes the num_rcu_lvl[] array external so that SRCU can make use of it for initializing its upcoming srcu_node tree. Signed-off-by: Paul E. McKenney kernel/rcu/rcu.h | 1 + kernel/rcu/tree.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit efbe451d46af62369226e42b98dbcd95b6940a63 Author: Paul E. McKenney Date: Wed Mar 15 13:07:53 2017 -0700 srcu: Move rcu_node traversal macros to rcu.h This commit moves rcu_for_each_node_breadth_first(), rcu_for_each_nonleaf_node_breadth_first(), and rcu_for_each_leaf_node() from kernel/rcu/tree.h to kernel/rcu/rcu.h so that SRCU can access them. This commit is code-movement only. Signed-off-by: Paul E. McKenney kernel/rcu/rcu.h | 35 +++++++++++++++++++++++++++++++++++ kernel/rcu/tree.h | 35 ----------------------------------- 2 files changed, 35 insertions(+), 35 deletions(-) commit 41f5c63178b7ca3d775638710b752b81b433fc86 Author: Paul E. McKenney Date: Wed Mar 15 12:59:17 2017 -0700 rcu: Remove redundant levelcnt[] array from rcu_init_one() The levelcnt[] array is identical to num_rcu_lvl[], so this commit removes levelcnt[]. Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 2b34c43cc1671c59bad6dd1682ae3ee4f0919eb7 Author: Paul E. McKenney Date: Tue Mar 14 14:29:53 2017 -0700 srcu: Move rcu_init_levelspread() to rcu_tree_node.h This commit moves the rcu_init_levelspread() function from kernel/rcu/tree.c to kernel/rcu/rcu.h so that SRCU can access it. This is another step towards enabling SRCU to create its own combining tree. This commit is code-movement only, give or take knock-on adjustments. Signed-off-by: Paul E. McKenney include/linux/rcu_node_tree.h | 3 --- kernel/rcu/rcu.h | 36 ++++++++++++++++++++++++++++++++++++ kernel/rcu/srcu.c | 1 + kernel/rcu/tree.c | 25 ------------------------- kernel/rcu/tree_trace.c | 1 + 5 files changed, 38 insertions(+), 28 deletions(-) commit f2425b4efb0c69e77c0b9666b605ae4a1ecaae47 Author: Paul E. McKenney Date: Tue Mar 14 12:42:30 2017 -0700 srcu: Move combining-tree definitions for SRCU's benefit This commit moves the C preprocessor code that defines the default shape of the rcu_node combining tree to a new include/linux/rcu_node_tree.h file as a first step towards enabling SRCU to create its own combining tree, which in turn enables SRCU to implement per-CPU callback handling, thus avoiding contention on the lock currently guarding the single list of callbacks. Note that users of SRCU still need to know the size of the srcu_struct structure, hence include/linux rather than kernel/rcu. This commit is code-movement only. Signed-off-by: Paul E. McKenney include/linux/rcu_node_tree.h | 102 ++++++++++++++++++++++++++++++++++++++++++ kernel/rcu/tree.h | 71 +---------------------------- 2 files changed, 103 insertions(+), 70 deletions(-) commit 8660b7d8a545227fd9ee80508aa82528ea9947d7 Author: Paul E. McKenney Date: Mon Mar 13 16:48:18 2017 -0700 srcu: Use rcu_segcblist to track SRCU callbacks This commit switches SRCU from custom-built callback queues to the new rcu_segcblist structure. This change associates grace-period sequence numbers with groups of callbacks, which will be needed for efficient processing of per-CPU callbacks. Signed-off-by: Paul E. McKenney include/linux/rcu_segcblist.h | 678 ++++++++++++++++++++++++++++++++++++++++++ include/linux/srcu.h | 24 +- kernel/rcu/rcu.h | 6 + kernel/rcu/rcu_segcblist.h | 670 ----------------------------------------- kernel/rcu/srcu.c | 159 ++-------- kernel/rcu/tree.h | 2 +- 6 files changed, 721 insertions(+), 818 deletions(-) commit ac367c1c621b75689f6d5cd8301d364ba2c9f292 Author: Paul E. McKenney Date: Sat Mar 11 07:14:06 2017 -0800 srcu: Add grace-period sequence numbers This commit adds grace-period sequence numbers, which will be used to handle mid-boot grace periods and per-CPU callback lists. Signed-off-by: Paul E. McKenney include/linux/srcu.h | 1 + kernel/rcu/srcu.c | 27 +++++++++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) commit c2a8ec0778b2ca0d360ba9b5cac7fcd5ddfe798f Author: Paul E. McKenney Date: Fri Mar 10 15:31:55 2017 -0800 srcu: Move to state-based grace-period sequencing The current SRCU grace-period processing might never reach the last portion of srcu_advance_batches(). This is OK given the current implementation, as the first portion, up to the try_check_zero() following the srcu_flip() is sufficient to drive grace periods forward. However, it has the unfortunate side-effect of making it impossible to determine when a given grace period has ended, and it will be necessary to efficiently trace ends of grace periods in order to efficiently handle per-CPU SRCU callback lists. This commit therefore adds states to the SRCU grace-period processing, so that the end of a given SRCU grace period is marked by the transition to the SRCU_STATE_DONE state. Signed-off-by: Paul E. McKenney include/linux/srcu.h | 10 ++++- kernel/rcu/srcu.c | 111 ++++++++++++++++++++++++++++----------------------- 2 files changed, 69 insertions(+), 52 deletions(-) commit c6e56f593ac2df436700527c3488d4ed224c3acf Author: Paul E. McKenney Date: Thu Mar 9 16:16:42 2017 -0800 srcu: Push srcu_advance_batches() fastpath into common case This commit simplifies the SRCU state machine by pushing the srcu_advance_batches() idle-SRCU fastpath into the common case. This is done by giving srcu_reschedule() a delay parameter, which is zero in the call from srcu_advance_batches(). This commit is a step towards numbering callbacks in order to efficiently handle per-CPU callback lists. Signed-off-by: Paul E. McKenney kernel/rcu/srcu.c | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) commit f010ed82c7ba8b30f30872800100ad6b6efe2a6a Author: Dmitry Vyukov Date: Sun Mar 5 12:17:31 2017 -0800 rcu: Fix warning in rcu_seq_end() The rcu_seq_end() function increments seq signifying completion of a grace period, after that checks that the seq is even and wakes _synchronize_rcu_expedited(). The _synchronize_rcu_expedited() function uses wait_event() to wait for even seq. The problem is that wait_event() can return as soon as seq becomes even without waiting for the wakeup. In such case the warning in rcu_seq_end() can falsely fire if the next expedited grace period starts before the check. Check that seq has good value before incrementing it. Signed-off-by: Dmitry Vyukov Cc: syzkaller@googlegroups.com Cc: linux-kernel@vger.kernel.org Cc: Paul E. McKenney Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: josh@joshtriplett.org Cc: jiangshanlai@gmail.com Signed-off-by: Paul E. McKenney --- syzkaller-triggered warning: WARNING: CPU: 0 PID: 4832 at kernel/rcu/tree.c:3533 rcu_seq_end+0x110/0x140 kernel/rcu/tree.c:3533 CPU: 0 PID: 4832 Comm: kworker/0:3 Not tainted 4.10.0+ #276 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: events wait_rcu_exp_gp Call Trace: __dump_stack lib/dump_stack.c:15 [inline] dump_stack+0x2ee/0x3ef lib/dump_stack.c:51 panic+0x1fb/0x412 kernel/panic.c:179 __warn+0x1c4/0x1e0 kernel/panic.c:540 warn_slowpath_null+0x2c/0x40 kernel/panic.c:583 rcu_seq_end+0x110/0x140 kernel/rcu/tree.c:3533 rcu_exp_gp_seq_end kernel/rcu/tree_exp.h:36 [inline] rcu_exp_wait_wake+0x8a9/0x1330 kernel/rcu/tree_exp.h:517 rcu_exp_sel_wait_wake kernel/rcu/tree_exp.h:559 [inline] wait_rcu_exp_gp+0x83/0xc0 kernel/rcu/tree_exp.h:570 process_one_work+0xc06/0x1c20 kernel/workqueue.c:2096 worker_thread+0x223/0x19c0 kernel/workqueue.c:2230 kthread+0x326/0x3f0 kernel/kthread.c:227 ret_from_fork+0x31/0x40 arch/x86/entry/entry_64.S:430 --- kernel/rcu/rcu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c345825c899df0751b01143b159ddaefb91a220 Author: Paul E. McKenney Date: Sat Mar 4 12:33:53 2017 -0800 rcu: Expedited wakeups need to be fully ordered Expedited grace periods use workqueue handlers that wake up the requesters, but there is no lock mediating this wakeup. Therefore, memory barriers are required to ensure that the handler's memory references are seen by all to occur before synchronize_*_expedited() returns to its caller. Possibly detected by syzkaller. Reported-by: Dmitry Vyukov Signed-off-by: Paul E. McKenney kernel/rcu/tree_exp.h | 2 ++ 1 file changed, 2 insertions(+) commit 2e8c28c2dd96c6f1f2d454a4e4b928385841e247 Author: Paul E. McKenney Date: Mon Feb 20 14:57:17 2017 -0800 srcu: Move rcu_seq_start() and friends to rcu.h This commit moves rcu_seq_start(), rcu_seq_end(), rcu_seq_snap(), and rcu_seq_done() from kernel/rcu/tree.c to kernel/rcu/rcu.h. This will allow SRCU to use these functions, which in turn will allow SRCU to move from a single global callback queue to a per-CPU callback queue. Signed-off-by: Paul E. McKenney kernel/rcu/rcu.h | 40 ++++++++++++++++++++++++++++++++++++++++ kernel/rcu/tree.c | 35 ----------------------------------- 2 files changed, 40 insertions(+), 35 deletions(-) commit bdcabf4c7db719129ca6cb94b02f50aa4726c952 Author: Paul E. McKenney Date: Wed Feb 15 17:50:50 2017 -0800 rcu: Add single-element dequeue functions to rcu_segcblist This commit adds single-element dequeue functions to rcu_segcblist. These are less efficient than using the extract and insert functions, but allow more precise debugging code. These functions are thus expected to be used only in debug builds, for example, CONFIG_PROVE_RCU. Signed-off-by: Paul E. McKenney kernel/rcu/rcu_segcblist.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit b5eaeaa509d30812049f9e1c05446d564e91616b Author: Paul E. McKenney Date: Fri Feb 10 14:50:46 2017 -0800 srcu: Allow early boot use of synchronize_srcu() This commit checks for pre-scheduler state, and if that early in the boot process, synchronize_srcu() and friends are no-ops. Signed-off-by: Paul E. McKenney kernel/rcu/srcu.c | 2 ++ 1 file changed, 2 insertions(+) commit 900b1028ec388e50c98200641ae4274794c807cf Author: Paul E. McKenney Date: Fri Feb 10 14:32:54 2017 -0800 srcu: Allow SRCU to access rcu_scheduler_active This is primarily a code-movement commit in preparation for allowing SRCU to handle early-boot SRCU grace periods. Signed-off-by: Paul E. McKenney include/linux/rcutiny.h | 6 +++--- kernel/rcu/tiny_plugin.h | 9 +++++---- kernel/rcu/tree.c | 2 +- kernel/rcu/tree_exp.h | 12 ----------- kernel/rcu/update.c | 52 +++++++++++++++++++++++++++++++----------------- 5 files changed, 43 insertions(+), 38 deletions(-) commit 15fecf89e46a962ccda583d919e25d9da7bf0723 Author: Paul E. McKenney Date: Wed Feb 8 12:36:42 2017 -0800 srcu: Abstract multi-tail callback list handling RCU has only one multi-tail callback list, which is implemented via the nxtlist, nxttail, nxtcompleted, qlen_lazy, and qlen fields in the rcu_data structure, and whose operations are open-code throughout the Tree RCU implementation. This has been more or less OK in the past, but upcoming callback-list optimizations in SRCU could really use a multi-tail callback list there as well. This commit therefore abstracts the multi-tail callback list handling into a new kernel/rcu/rcu_segcblist.h file, and uses this new API. The simple head-and-tail pointer callback list is also abstracted and applied everywhere except for the NOCB callback-offload lists. (Yes, the plan is to apply them there as well, but this commit is already bigger than would be good.) Signed-off-by: Paul E. McKenney kernel/rcu/rcu_segcblist.h | 625 +++++++++++++++++++++++++++++++++++++++++++++ kernel/rcu/tree.c | 348 ++++++++----------------- kernel/rcu/tree.h | 41 +-- kernel/rcu/tree_plugin.h | 54 ++-- kernel/rcu/tree_trace.c | 21 +- 5 files changed, 780 insertions(+), 309 deletions(-) commit b8c78d3afc6aac1c722af3bec18959c6bd93231c Author: Paul E. McKenney Date: Fri Feb 3 09:54:05 2017 -0800 rcu: Default RCU_FANOUT_LEAF to 16 unless explicitly changed If the RCU_EXPERT Kconfig option is not set (the default), then the RCU_FANOUT_LEAF Kconfig option will not be defined, which will cause the leaf-level rcu_node tree fanout to default to 32 on 32-bit systems and 64 on 64-bit systems. This can result in excessive lock contention. This commit therefore changes the computation of the leaf-level rcu_node tree fanout so that the result will be 16 unless an explicit Kconfig or kernel-boot setting says otherwise. Reported-by: Peter Zijlstra Signed-off-by: Paul E. McKenney kernel/rcu/tree.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 9226b10d78ffe7895549045fe388dc5e73b87eac Author: Paul E. McKenney Date: Fri Jan 27 14:17:50 2017 -0800 rcu: Place guard on rcu_all_qs() and rcu_note_context_switch() actions The rcu_all_qs() and rcu_note_context_switch() do a series of checks, taking various actions to supply RCU with quiescent states, depending on the outcomes of the various checks. This is a bit much for scheduling fastpaths, so this commit creates a separate ->rcu_urgent_qs field in the rcu_dynticks structure that acts as a global guard for these checks. Thus, in the common case, rcu_all_qs() and rcu_note_context_switch() check the ->rcu_urgent_qs field, find it false, and simply return. Signed-off-by: Paul E. McKenney Cc: Peter Zijlstra .../Design/Data-Structures/Data-Structures.html | 11 ++++++- kernel/rcu/tree.c | 38 ++++++++++++++-------- kernel/rcu/tree.h | 3 +- kernel/rcu/tree_exp.h | 2 ++ kernel/rcu/tree_plugin.h | 8 +++-- 5 files changed, 44 insertions(+), 18 deletions(-) commit 0f9be8cabbc343218dd2807af7308656be113045 Author: Paul E. McKenney Date: Fri Jan 27 13:17:02 2017 -0800 rcu: Eliminate flavor scan in rcu_momentary_dyntick_idle() The rcu_momentary_dyntick_idle() function scans the RCU flavors, checking that one of them still needs a quiescent state before doing an expensive atomic operation on the ->dynticks counter. However, this check reduces overhead only after a rare race condition, and increases complexity. This commit therefore removes the scan and the mechanism enabling the scan. Signed-off-by: Paul E. McKenney .../Design/Data-Structures/Data-Structures.html | 4 +- kernel/rcu/tree.c | 62 +++++----------------- kernel/rcu/tree.h | 3 +- 3 files changed, 15 insertions(+), 54 deletions(-) commit 9577df9a3122af08fff84b8a1a60dccf524a3891 Author: Paul E. McKenney Date: Thu Jan 26 16:18:07 2017 -0800 rcu: Pull rcu_qs_ctr into rcu_dynticks structure The rcu_qs_ctr variable is yet another isolated per-CPU variable, so this commit pulls it into the pre-existing rcu_dynticks per-CPU structure. Signed-off-by: Paul E. McKenney .../RCU/Design/Data-Structures/Data-Structures.html | 12 ++++++++++-- kernel/rcu/tree.c | 15 ++++++--------- kernel/rcu/tree.h | 3 ++- kernel/rcu/tree_trace.c | 4 +--- 4 files changed, 19 insertions(+), 15 deletions(-) commit abb06b99484a9f5af05c7147c289faf835f68e8e Author: Paul E. McKenney Date: Thu Jan 26 13:45:38 2017 -0800 rcu: Pull rcu_sched_qs_mask into rcu_dynticks structure The rcu_sched_qs_mask variable is yet another isolated per-CPU variable, so this commit pulls it into the pre-existing rcu_dynticks per-CPU structure. Signed-off-by: Paul E. McKenney .../RCU/Design/Data-Structures/Data-Structures.html | 9 ++++++++- kernel/rcu/tree.c | 12 +++++------- kernel/rcu/tree.h | 1 + 3 files changed, 14 insertions(+), 8 deletions(-) commit 88a4976d0e37c0797ff3e6579a5f91cb7dced90d Author: Paul E. McKenney Date: Mon Jan 23 12:04:46 2017 -0800 rcu: Semicolon inside RCU_TRACE() for tree.c The current use of "RCU_TRACE(statement);" can cause odd bugs, especially where "statement" is a local-variable declaration, as it can leave a misplaced ";" in the source code. This commit therefore converts these to "RCU_TRACE(statement;)", which avoids the misplaced ";". Reported-by: Josh Triplett Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6c8c148542cf947cd95afb2c385310ce47111427 Author: Paul E. McKenney Date: Mon Jan 23 12:02:09 2017 -0800 rcu: Semicolon inside RCU_TRACE() for Tiny RCU The current use of "RCU_TRACE(statement);" can cause odd bugs, especially where "statement" is a local-variable declaration, as it can leave a misplaced ";" in the source code. This commit therefore converts these to "RCU_TRACE(statement;)", which avoids the misplaced ";". Reported-by: Josh Triplett Signed-off-by: Paul E. McKenney kernel/rcu/tiny.c | 20 ++++++++++---------- kernel/rcu/tiny_plugin.h | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) commit dffd06a7566b379be13a831b27a55bf5b0a7dea5 Author: Paul E. McKenney Date: Mon Jan 23 11:55:43 2017 -0800 rcu: Semicolon inside RCU_TRACE() for rcu.h The current use of "RCU_TRACE(statement);" can cause odd bugs, especially where "statement" is a local-variable declaration, as it can leave a misplaced ";" in the source code. This commit therefore converts these to "RCU_TRACE(statement;)", which avoids the misplaced ";". Reported-by: Josh Triplett Signed-off-by: Paul E. McKenney kernel/rcu/rcu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 15c68f7f6341da1693a60440338dd4aa8836da48 Author: Paul E. McKenney Date: Thu Jan 19 13:40:09 2017 -0800 srcu: Check for tardy grace-period activity in cleanup_srcu_struct() Users of SRCU are obliged to complete all grace-period activity before invoking cleanup_srcu_struct(). This means that all calls to either synchronize_srcu() or synchronize_srcu_expedited() must have returned, and all calls to call_srcu() must have returned, and the last call to call_srcu() must have been followed by a call to srcu_barrier(). Furthermore, the caller must have done something to prevent any further calls to synchronize_srcu(), synchronize_srcu_expedited(), and call_srcu(). Therefore, if there has ever been an invocation of call_srcu() on the srcu_struct in question, the sequence of events must be as follows: 1. Prevent any further calls to call_srcu(). 2. Wait for any pre-existing call_srcu() invocations to return. 3. Invoke srcu_barrier(). 4. It is now safe to invoke cleanup_srcu_struct(). On the other hand, if there has ever been a call to synchronize_srcu() or synchronize_srcu_expedited(), the sequence of events must be as follows: 1. Prevent any further calls to synchronize_srcu() or synchronize_srcu_expedited(). 2. Wait for any pre-existing synchronize_srcu() or synchronize_srcu_expedited() invocations to return. 3. It is now safe to invoke cleanup_srcu_struct(). If there have been calls to all both types of functions (call_srcu() and either of synchronize_srcu() and synchronize_srcu_expedited()), then the caller must do the first three steps of the call_srcu() procedure above and the first two steps of the synchronize_s*() procedure above, and only then invoke cleanup_srcu_struct(). Note that cleanup_srcu_struct() does some probabilistic checks for the caller failing to follow these procedures, in which case cleanup_srcu_struct() does WARN_ON() and avoids freeing the per-CPU structures associated with the specified srcu_struct structure. Reported-by: Paolo Bonzini Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett kernel/rcu/srcu.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 312ec92daee499f4f1be86aaf07d6d9bfdaed795 Author: Dmitry Torokhov Date: Tue Apr 18 11:08:33 2017 -0700 ARM: pxa/raumfeld: fix compile error in rotary controller resources When switching rotary controlelr from plain IRQ number to IRQ resource, I messed up the syntax. Fixes: d422be5f62ef ("Input: eeti_ts - expect platform code to set ... ") Reported-by: kbuild test robot Signed-off-by: Dmitry Torokhov arch/arm/mach-pxa/raumfeld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 153292e24aeb0ac9489cf5d19abf8357f5f20cb9 Author: Dmitry Torokhov Date: Mon Apr 17 20:23:05 2017 -0700 Input: xpad - do not suggest writing to Dominic Do not recommend people write to Dominic, rather everyone should be using linux-input mailing list. Signed-off-by: Dmitry Torokhov Documentation/input/devices/xpad.rst | 6 ------ 1 file changed, 6 deletions(-) commit cc985822a0b6dbe68ad6cfa641b19c1d303ab455 Author: Paul E. McKenney Date: Thu Jan 19 13:33:17 2017 -0800 srcu: Consolidate batch checking into rcu_all_batches_empty() The srcu_reschedule() function invokes rcu_batch_empty() on each of the four rcu_batch structures in the srcu_struct in question twice. Given that this check will also be needed in cleanup_srcu_struct(), this commit consolidates these four checks into a new rcu_all_batches_empty() function. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett kernel/rcu/srcu.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 77e5849688670280b173bb9e0544e9da7b2acc36 Author: Paul E. McKenney Date: Sat Jan 14 13:32:50 2017 -0800 rcu: Make arch select smp_mb__after_unlock_lock() strength The definition of smp_mb__after_unlock_lock() is currently smp_mb() for CONFIG_PPC and a no-op otherwise. It would be better to instead provide an architecture-selectable Kconfig option, and select the strength of smp_mb__after_unlock_lock() based on that option. This commit therefore creates ARCH_WEAK_RELEASE_ACQUIRE, has PPC select it, and bases the definition of smp_mb__after_unlock_lock() on this new ARCH_WEAK_RELEASE_ACQUIRE Kconfig option. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney Cc: Peter Zijlstra Cc: Will Deacon Cc: Boqun Feng Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Acked-by: Michael Ellerman Cc: Reviewed-by: Josh Triplett arch/Kconfig | 3 +++ arch/powerpc/Kconfig | 1 + include/linux/rcupdate.h | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) commit b8c17e6664c461e4aed545a943304c3b32dd309c Author: Paul E. McKenney Date: Tue Nov 8 14:25:21 2016 -0800 rcu: Maintain special bits at bottom of ->dynticks counter Currently, IPIs are used to force other CPUs to invalidate their TLBs in response to a kernel virtual-memory mapping change. This works, but degrades both battery lifetime (for idle CPUs) and real-time response (for nohz_full CPUs), and in addition results in unnecessary IPIs due to the fact that CPUs executing in usermode are unaffected by stale kernel mappings. It would be better to cause a CPU executing in usermode to wait until it is entering kernel mode to do the flush, first to avoid interrupting usemode tasks and second to handle multiple flush requests with a single flush in the case of a long-running user task. This commit therefore reserves a bit at the bottom of the ->dynticks counter, which is checked upon exit from extended quiescent states. If it is set, it is cleared and then a new rcu_eqs_special_exit() macro is invoked, which, if not supplied, is an empty single-pass do-while loop. If this bottom bit is set on -entry- to an extended quiescent state, then a WARN_ON_ONCE() triggers. This bottom bit may be set using a new rcu_eqs_special_set() function, which returns true if the bit was set, or false if the CPU turned out to not be in an extended quiescent state. Please note that this function refuses to set the bit for a non-nohz_full CPU when that CPU is executing in usermode because usermode execution is tracked by RCU as a dyntick-idle extended quiescent state only for nohz_full CPUs. Reported-by: Andy Lutomirski Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett include/linux/rcutiny.h | 5 ++++ kernel/rcu/tree.c | 77 +++++++++++++++++++++++++++++++++++++++---------- kernel/rcu/tree.h | 1 + 3 files changed, 67 insertions(+), 16 deletions(-) commit 400c18e3dc86e04ef5afec9b86a8586ca629b9e9 Author: Marek Vasut Date: Tue Apr 18 20:09:06 2017 +0200 spi: dw: Disable clock after unregistering the host The dw_mmio driver disables the block clock before unregistering the host. The code unregistering the host may access the SPI block registers. If register access happens with block clock disabled, this may lead to a bus hang. Disable the clock after unregistering the host to prevent such situation. This bug was observed on Altera Cyclone V SoC. Signed-off-by: Marek Vasut Cc: Andy Shevchenko Cc: Mark Brown Signed-off-by: Mark Brown drivers/spi/spi-dw-mmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4116c97689b9b1732ac5b68afd922406f9fc842e Merge: f482066 88a286f Author: David S. Miller Date: Tue Apr 18 14:11:10 2017 -0400 Merge branch 'ftgmac100-batch5-features' Benjamin Herrenschmidt says: ==================== ftgmac100: Rework batch 5 - Features This is the third spin of the fifth and last batch of updates to the ftgmac100 driver. This contains a few additional "features" such as: - Support for ethtool n-way reset - Multicast filtering & promisc support - Vlan offload - netpoll And a couple of misc bits. This also adds the device-tree binding documentation. v2. - Addresses review comments and adds a new patch fixing a theorical ordering issue in my new NAPI poll implementation - Add a bug fix (Patch 8/9) for a potential ordering issue in the new NAPI poll code. v3. - Rebase on net-next (fix conflict with an unrelated #include change series) - Update DT bindings better describing accepted phy-mode values ==================== Signed-off-by: David S. Miller commit 88a286f7e9df643e211debe55a7aa206d2332763 Author: Benjamin Herrenschmidt Date: Tue Apr 18 08:37:06 2017 +1000 ftgmac100: Document device-tree binding Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller .../devicetree/bindings/net/ftgmac100.txt | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit ccaf725a1fd7904ed3e771ed178c2aa1ccb21509 Author: Benjamin Herrenschmidt Date: Tue Apr 18 08:37:05 2017 +1000 ftgmac100: Fix potential ordering issue in NAPI poll We need to ensure the loads from the descriptor are done after the MMIO store clearing the interrupts has completed, otherwise we might still miss work. A read back from the MMIO register will "push" the posted store and ioread32 has a barrier on weakly aordered architectures that will order subsequent accesses. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 33de693248b45640c0d894c2454a9909f2e81ffd Author: Benjamin Herrenschmidt Date: Tue Apr 18 08:37:04 2017 +1000 ftgmac100: Display the discovered PHY device info Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 3 +++ 1 file changed, 3 insertions(+) commit abcc3eb00e10af3a0c5df90ce515ebde5fc12319 Author: Benjamin Herrenschmidt Date: Tue Apr 18 08:37:03 2017 +1000 ftgmac100: Allow configuration of phy interface via device-tree This uses the standard phy-mode property Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 42 +++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) commit 030d9828703ec7ecc09d09d39fb68b72f45b05e7 Author: Benjamin Herrenschmidt Date: Tue Apr 18 08:37:02 2017 +1000 ftgmac100: Add netpoll support Just call the interrupt handler with interrupts locally disabled Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 0fb9968876c386697170bc468633f4a9e2041a91 Author: Benjamin Herrenschmidt Date: Tue Apr 18 08:37:01 2017 +1000 ftgmac100: Add vlan HW offload The chip supports HW vlan tag insertion and extraction. Add support for it. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 46 +++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) commit f48b3c0d5b6ab4d88db75e45e1ea38074e2765c9 Author: Benjamin Herrenschmidt Date: Tue Apr 18 08:37:00 2017 +1000 ftgmac100: Add ndo_set_rx_mode() and support for multicast & promisc This adds the ndo_set_rx_mode() callback to configure the multicast filters, promisc and allmulti options. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 52 ++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 7c8e5141ca633ae6dc7489dc85cabcfed2144a2d Author: Benjamin Herrenschmidt Date: Tue Apr 18 08:36:59 2017 +1000 ftgmac100: Add pause frames configuration and support Hopefully my understanding of how the hardware works is correct, as the documentation isn't completely clear. So far I have seen no obvious issue. Pause seem to also work with NC-SI. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 96 +++++++++++++++++++++++++++++++- drivers/net/ethernet/faraday/ftgmac100.h | 7 +++ 2 files changed, 102 insertions(+), 1 deletion(-) commit e98233a6192d75d695b0972dc955d6561e46964f Author: Benjamin Herrenschmidt Date: Tue Apr 18 08:36:58 2017 +1000 ftgmac100: Add ethtool n-way reset call A non-wired up implementation accidentally made its way in a previous patch (Make ring sizes configurable via ethtool). This removes it and wires up the generic phy_ethtool_nway_reset instead. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit e854d8b2a82ef76521ad2bed68211fde0511d417 Author: David Woodhouse Date: Wed Apr 12 13:25:56 2017 +0100 PCI: Add arch_can_pci_mmap_io() on architectures which can mmap() I/O space This is relatively esoteric, and knowing that we don't have it makes life easier in some cases rather than just an eventual -EINVAL from pci_mmap_page_range(). Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas Documentation/filesystems/sysfs-pci.txt | 3 ++- arch/microblaze/include/asm/pci.h | 3 ++- arch/powerpc/include/asm/pci.h | 1 + arch/sparc/include/asm/pci_64.h | 1 + arch/xtensa/include/asm/pci.h | 3 ++- drivers/pci/pci-sysfs.c | 13 ++++++++----- drivers/pci/proc.c | 11 +++++++---- include/linux/pci.h | 3 +++ 8 files changed, 26 insertions(+), 12 deletions(-) commit 11df19546fe4a6135cdae62e96a1e25b3fabf6ea Author: David Woodhouse Date: Wed Apr 12 13:25:55 2017 +0100 PCI: Move multiple declarations of pci_mmap_page_range() to We can declare it even on platforms where it isn't going to be defined. There's no need to have it littered through the various files. Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas arch/arm/include/asm/pci.h | 2 -- arch/cris/include/asm/pci.h | 3 --- arch/ia64/include/asm/pci.h | 2 -- arch/microblaze/include/asm/pci.h | 3 --- 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 | 3 --- arch/sh/include/asm/pci.h | 3 +-- arch/sparc/include/asm/pci_64.h | 4 ---- arch/unicore32/include/asm/pci.h | 2 -- arch/x86/include/asm/pci.h | 4 ---- arch/xtensa/include/asm/pci.h | 4 ---- include/linux/pci.h | 7 +++++++ 14 files changed, 8 insertions(+), 38 deletions(-) commit ae749c7ab475de2c9c427058db19921c91846e89 Author: David Woodhouse Date: Wed Apr 12 13:25:54 2017 +0100 PCI: Add arch_can_pci_mmap_wc() macro Most of the almost-identical versions of pci_mmap_page_range() silently ignore the 'write_combine' argument and give uncached mappings. Yet we allow the PCIIOC_WRITE_COMBINE ioctl in /proc/bus/pci, expose the 'resourceX_wc' file in sysfs, and allow an attempted mapping to apparently succeed. To fix this, introduce a macro arch_can_pci_mmap_wc() which indicates whether the platform can do a write-combining mapping. On x86 this ends up being pat_enabled(), while the few other platforms that support it can just set it to a literal '1'. Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas Documentation/filesystems/sysfs-pci.txt | 4 ++++ arch/ia64/include/asm/pci.h | 2 ++ arch/powerpc/include/asm/pci.h | 5 +++-- arch/x86/include/asm/pci.h | 2 ++ drivers/pci/pci-sysfs.c | 4 ++-- drivers/pci/proc.c | 15 ++++++++------- include/linux/pci.h | 4 ++++ 7 files changed, 25 insertions(+), 11 deletions(-) commit 03a064b431eb5cb0a91012699ac1e4d6302b327d Author: David Woodhouse Date: Wed Apr 12 13:25:53 2017 +0100 xtensa/PCI: Do not mmap PCI BARs to userspace as write-through These should be uncached, not write-through. Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas arch/xtensa/kernel/pci.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit cef4d02305a06be581bb7f4353446717a1b319ec Author: David Woodhouse Date: Wed Apr 12 13:25:52 2017 +0100 PCI: Only allow WC mmap on prefetchable resources The /proc/bus/pci mmap interface allows the user to specify whether they want WC or not. Don't let them do so on non-prefetchable BARs. Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org drivers/pci/proc.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 17caf56731311c9596e7d38a70c88fcb6afa6a1b Author: David Woodhouse Date: Wed Apr 12 13:25:51 2017 +0100 PCI: Fix another sanity check bug in /proc/pci mmap Don't match MMIO maps with I/O BARs and vice versa. Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org drivers/pci/proc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit fbeea237af65c6dceca00886aba30839bc986fd7 Author: Charles Keepax Date: Tue Apr 18 18:32:52 2017 +0100 ASoC: cs35l35: Correct some register defaults Correct some minor errors in the register defaults. Signed-off-by: Charles Keepax Acked-by: Brian Austin Signed-off-by: Mark Brown sound/soc/codecs/cs35l35.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 833bfade96561216aa2129516a5926a0326860a2 Author: Hauke Mehrtens Date: Mon Apr 17 01:38:05 2017 +0200 spi: double time out tolerance The generic SPI code calculates how long the issued transfer would take and adds 100ms in addition to the timeout as tolerance. On my 500 MHz Lantiq Mips SoC I am getting timeouts from the SPI like this when the system boots up: m25p80 spi32766.4: SPI transfer timed out blk_update_request: I/O error, dev mtdblock3, sector 2 SQUASHFS error: squashfs_read_data failed to read block 0x6e After increasing the tolerance for the timeout to 200ms I haven't seen these SPI transfer time outs any more. The Lantiq SPI driver in use here has an extra work queue in between, which gets triggered when the controller send the last word and the hardware FIFOs used for reading and writing are only 8 words long. Signed-off-by: Hauke Mehrtens Signed-off-by: Mark Brown drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbabd829fe76a72a6444f64361cf8b2a9848639d Author: Dan Williams Date: Tue Apr 18 09:56:31 2017 -0700 acpi, nfit: fix module unload vs workqueue shutdown race The workqueue may still be running when the devres callbacks start firing to deallocate an acpi_nfit_desc instance. Stop and flush the workqueue before letting any other devres de-allocations proceed. Reported-by: Linda Knippers Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 76 ++++++++++++++++++++++++---------------- drivers/acpi/nfit/nfit.h | 1 + tools/testing/nvdimm/test/nfit.c | 4 +++ 3 files changed, 51 insertions(+), 30 deletions(-) commit f4820661a906af68a571814b8c6b91d91da48b6f Merge: 5f8ddea a0c51cf Author: David S. Miller Date: Tue Apr 18 13:55:11 2017 -0400 Merge branch 'marvell-static-code-analysis' Markus Elfring says: ==================== Ethernet-Marvell: Fine-tuning for several function implementations Several update suggestions were taken into account from static source code analysis. ==================== Signed-off-by: David S. Miller commit a0c51cf10720348001bc5fbcd1b521e8622efda1 Author: Markus Elfring Date: Mon Apr 17 16:15:12 2017 +0200 sky2: Use seq_puts() in sky2_debug_show() A string which did not contain a data format specification should be put into a sequence. Thus use the corresponding function "seq_puts". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/sky2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca735bd83f2d076a0a9ad8aeeb054737e3e0063f Author: Markus Elfring Date: Mon Apr 17 16:08:39 2017 +0200 skge: Adjust a null pointer check in skge_down() The script "checkpatch.pl" pointed information out like the following. Comparison to NULL could be written "!skge->mem". Thus fix the affected source code place. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/skge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d77566247d62660b74fbd233a00b8aee76f3bfdb Author: Markus Elfring Date: Mon Apr 17 15:43:08 2017 +0200 skge: Use seq_puts() in skge_debug_show() A string which did not contain a data format specification should be put into a sequence. Thus use the corresponding function "seq_puts". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/skge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8273f0a34cb87f0131101bab37655ee8fc05b54c Author: Markus Elfring Date: Mon Apr 17 15:23:45 2017 +0200 net: pxa168_eth: Adjust four checks for null pointers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code places. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/pxa168_eth.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 91acebedbd7a6c76fdc0911366f0ada523fee645 Author: Markus Elfring Date: Mon Apr 17 14:32:14 2017 +0200 net: pxa168_eth: Use kcalloc() in two functions Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/pxa168_eth.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit dbbb2f034b5a5c1da368e4ac7e85a4ee4922f57b Author: Markus Elfring Date: Mon Apr 17 14:07:52 2017 +0200 net: mvpp2: Adjust a null pointer check in mvpp2_egress_enable() The script "checkpatch.pl" pointed information out like the following. Comparison to NULL could be written "txq->descs". Thus fix the affected source code place. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9fd0e342383033efc8a19deb068c4e30e10bf77 Author: Markus Elfring Date: Mon Apr 17 13:50:35 2017 +0200 net: mvpp2: Rename a jump label in mvpp2_prs_vlan_add() Adjust jump labels according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c9a7e1206a36bdf0e9a64cdbb133bbc8b3d66cdb Author: Markus Elfring Date: Mon Apr 17 13:03:49 2017 +0200 net: mvpp2: Rename a jump label in mvpp2_prs_double_vlan_add() Adjust jump labels according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 20b1e16ef08642245d15b22386a2a02dca9a7384 Author: Markus Elfring Date: Mon Apr 17 12:58:33 2017 +0200 net: mvpp2: Rename a jump label in mvpp2_txq_init() Adjust jump labels according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 32bae631141be2c4a16e6e8a6412234e6f21b3fc Author: Markus Elfring Date: Mon Apr 17 11:36:34 2017 +0200 net: mvpp2: Rename a jump label in mvpp2_tx_frag_process() Adjust jump labels according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit dfd4240a52e6f0a925f4b9e0c41effba4ad83d1f Author: Markus Elfring Date: Mon Apr 17 11:20:41 2017 +0200 net: mvpp2: Adjust three error messages Use the word "failed" in the string for three function calls. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c117554712ce68dfa62f070bdd70b5776d2de52d Author: Markus Elfring Date: Mon Apr 17 11:10:47 2017 +0200 net: mvpp2: Rename a jump label in two functions Adjust jump labels according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 8a52488bc0b9c33f3520882e1986bce6b9b3af00 Author: Markus Elfring Date: Mon Apr 17 10:52:02 2017 +0200 net: mvpp2: Fix a jump label position in mvpp2_rx() The script "checkpatch.pl" pointed out that labels should not be indented. Thus delete two horizontal tabs before the jump label "err_drop_frame" in the function "mvpp2_rx". Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd6aaf5535a6782b04e84ea575d65e95d2e7acbc Author: Markus Elfring Date: Mon Apr 17 10:40:32 2017 +0200 net: mvpp2: Improve a size determination in two functions Replace the specification of two data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c5b2ce24f3d27366135d542a98b596c056cb75f3 Author: Markus Elfring Date: Mon Apr 17 10:30:29 2017 +0200 net: mvpp2: Improve 27 size determinations Replace the specification of data structures by references to a local variable as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 54 ++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) commit 37df25e83b18f20c4152d08777430222a8166125 Author: Markus Elfring Date: Mon Apr 17 09:12:34 2017 +0200 net: mvpp2: Improve another size determination in mvpp2_prs_default_init() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81f915eb3ff2908d0f6dc6b0d15e589577214516 Author: Markus Elfring Date: Mon Apr 17 09:06:33 2017 +0200 net: mvpp2: Improve another size determination in mvpp2_bm_init() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03bfffdef421fd8ff795aa1cf16d1a0d78cb5f0e Author: Markus Elfring Date: Mon Apr 17 08:55:42 2017 +0200 net: mvpp2: Improve another size determination in mvpp2_port_probe() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d7ce3cec279da510fb06c46534e5b2668cd71b84 Author: Markus Elfring Date: Mon Apr 17 08:48:23 2017 +0200 net: mvpp2: Improve another size determination in mvpp2_init() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b92e5945bdfed7051e03f2d03f3c5d3555416f3 Author: Markus Elfring Date: Mon Apr 17 08:38:32 2017 +0200 net: mvpp2: Improve two size determinations in mvpp2_probe() Replace the specification of two data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 02c91ece4ee644fbe87933a870c660c0e8413d41 Author: Markus Elfring Date: Mon Apr 17 08:09:07 2017 +0200 net: mvpp2: Use kmalloc_array() in mvpp2_txq_init() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data structure by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f95936cca6a8410ebdaf164bc5d3ade9e1de5bdb Author: Markus Elfring Date: Sun Apr 16 22:45:33 2017 +0200 net: mvneta: Adjust six checks for null pointers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code places. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d441b688a1bce8e2e1b43d8090738c306dd09131 Author: Markus Elfring Date: Sun Apr 16 22:11:22 2017 +0200 net: mvneta: Use kmalloc_array() in mvneta_txq_init() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5d6312ed57a909c86bb9472b2bbc012539392e7d Author: Markus Elfring Date: Sun Apr 16 21:45:38 2017 +0200 net: mvneta: Improve two size determinations in mvneta_init() Replace the specification of two data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2911063011fc7adcb43c93e9c3e9dc7798f459f5 Author: Markus Elfring Date: Sun Apr 16 21:23:19 2017 +0200 net: mvneta: Use devm_kmalloc_array() in mvneta_init() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit c90722b54a4f5e21ac59301ed9a6dbaa439bdb16 Author: Richard Cochran Date: Mon Apr 17 10:23:36 2017 +0200 regulator: tps65023: Fix inverted core enable logic. Commit 43530b69d758328d3ffe6ab98fd640463e8e3667 ("regulator: Use regmap_read/write(), regmap_update_bits functions directly") intended to replace working inline helper functions with standard regmap calls. However, it also inverted the set/clear logic of the "CORE ADJ Allowed" bit. That patch was clearly never tested, since without that bit cleared, the core VDCDC1 voltage output does not react to I2C configuration changes. This patch fixes the issue by clearing the bit as in the original, correct implementation. Note for stable back porting that, due to subsequent driver churn, this patch will not apply on every kernel version. Fixes: 43530b69d758 ("regulator: Use regmap_read/write(), regmap_update_bits functions directly") Signed-off-by: Richard Cochran Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/regulator/tps65023-regulator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d7766aa57ab0084498add21ddbf99547116f6b71 Author: Colin Ian King Date: Sat Apr 15 18:49:54 2017 +0100 ASoC: topology: use j for internal loop counter Currently variable i is being for 2 nested for loops. Fix this by using integer loop counter j for the inside for loop. Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/soc-topology.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e53800787a251d67e532fadf72886be0661aba12 Author: Quentin Schulz Date: Fri Apr 14 10:22:43 2017 +0200 spi: atmel: add deepest PM support to SAMA5D2 This adds deepest (Backup+Self-Refresh) PM support to the ATMEL SAMA5D2 SoC's SPI controller. When resuming from deepest state, it is required to restore MR register as the registers are lost since VDD core has been shut down when entering deepest state on the SAMA5D2. Signed-off-by: Quentin Schulz Acked-by: Alexandre Belloni Acked-by: Nicolas Ferre Signed-off-by: Mark Brown drivers/spi/spi-atmel.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit ec19b85913486993d7d6f747beed1a711afd47d8 Author: Steven Rostedt (VMware) Date: Fri Mar 31 19:01:14 2017 -0400 ftrace: Move the probe function into the tracing directory As nothing outside the tracing directory uses the function probes mechanism, I'm moving the prototypes out of the include/linux/ftrace.h and into the local kernel/trace/trace.h header. I plan on making them hook to the trace_array structure which is local to kernel/trace, and I do not want to expose it to the rest of the kernel. This requires that the probe functions must also be local to tracing. But luckily nothing else uses them. Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 24 ------------------------ kernel/trace/trace.h | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 24 deletions(-) commit 5f8ddeab10ce45d3d3de8ae7ea8811512845c497 Author: Florian Westphal Date: Sun Apr 16 02:55:09 2017 +0200 rhashtable: remove insecure_elasticity commit 83e7e4ce9e93c3 ("mac80211: Use rhltable instead of rhashtable") removed the last user that made use of 'insecure_elasticity' parameter, i.e. the default of 16 is used everywhere. Replace it with a constant. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller include/linux/rhashtable.h | 21 ++++++++++++++++----- lib/rhashtable.c | 17 +---------------- 2 files changed, 17 insertions(+), 21 deletions(-) commit a9064f676ed6de7bf3a07e26fc19494d48fa4619 Author: Steven Rostedt (VMware) Date: Tue Apr 18 11:22:38 2017 -0400 selftests: ftrace: Add test to test reading of set_ftrace_file The set_ftrace_file lists both functions that are filtered, as well as function probes (triggers) that are attached to a function, like traceon or stacktrace, etc. The reading of this file is not as trivial as most pseudo files are, and there's been various bugs that have appeared in the past when there's a mix of probes and functions listed. There's also a difference when reading the file using dd with a block size of 1. This test performs the following: o Resets set_ftrace_filter o Makes sure only "#### all functions enabled ####" is listed (All checks uses cat, and dd with bs=1 and bs=100) o Adds a traceon trigger to schedule o Checks if only "#### all function enabled ####" and the trigger is there. o Adds tracing of schedule o Checks if only schedule and the trigger is there o Adds tracing of do_IRQ as well o Checks if only schedule, do_IRQ and the trigger is there o Adds a traceon trigger to do_IRQ o Checks if only schedule, do_IRQ and both triggers are there o Removes tracing of do_IRQ o Checks if only schedule and both triggers are there o Removes tracing of schedule o Checks if only "#### all functions enabled ####" and both triggers are there o Removes the triggers o Checks if only "#### all functions enabled ####" is there o Adds tracing of schedule o Checks if only schedule is there o Adds tracing of do_IRQ o Checks if only schedule and do_IRQ are there Signed-off-by: Steven Rostedt (VMware) .../ftrace/test.d/ftrace/func_set_ftrace_file.tc | 132 +++++++++++++++++++++ 1 file changed, 132 insertions(+) commit d8b39e1d983efeb6c5835bcdd477e9c7cf1110fd Author: Steven Rostedt (VMware) Date: Mon Apr 17 18:05:53 2017 -0400 selftests: ftrace: Add a test to test function triggers to start and stop tracing This adds a test to test the function tiggers traceon and traceoff to make sure that it starts and stops tracing when a function is hit. The test performs the following: o Enables all events o Writes schedule:traceoff into set_ftrace_filter o Makes sure the tigger exists in the file o Makes sure the trace file no longer grows o Makes sure that tracing_on is now zero o Clears the trace file o Makes sure it's still empty o Removes the trigger o Makes sure tracing is still off (tracing_on is zero) o Writes schedule:traceon into set_ftrace_filter o Makes sure the trace file is no longer empty o Makes sure that tracing_on file is set to one o Removes the trigger o Makes sure the trigger is no longer there o Writes schedule:traceoff:3 into set_ftrace_filter o Makes sure that tracing_on turns off . Writes 1 into tracing_on . Makes sure that it turns off 2 more times o Writes 1 into tracing_on o Makes sure that tracing_on is still a one Signed-off-by: Steven Rostedt (VMware) .../test.d/ftrace/func_traceonoff_triggers.tc | 171 +++++++++++++++++++++ 1 file changed, 171 insertions(+) commit 43bb45da82f94fffd5fb816e1fd2453561747c8b Author: Steven Rostedt (VMware) Date: Mon Apr 17 17:33:50 2017 -0400 selftests: ftrace: Add a selftest to test event enable/disable func trigger This adds a test to enable and disable trace events via the function triggers. It tests enabling and disabling the sched:sched_switch event via the the event_enable and event_disable function triggers attached to the schedule() kernel function. The test does the following: o disable all events o disables or enables the sched_switch event o writes schedule:event_enable/disable:sched:sched_switch into set_ftrace_filter o 5 times it checks to make sure: . Writes 0/1 into the sched_switch/enable . Checks that the sched_switch/enable goes back to 1/0 o Resets the events o writes schedule:event_enable/disable:sched:sched_switch:3 into set_ftrace_filter o Does a loop of 3 to see that sched_switch/enable file gets updated o Makes sure the sched_switch/enable stops getting updated Signed-off-by: Steven Rostedt (VMware) .../ftrace/test.d/ftrace/func_event_triggers.tc | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+) commit 8e5e19c1b98394c2cdc186a4b0be422fe6e7217a Author: Steven Rostedt (VMware) Date: Mon Apr 17 17:30:08 2017 -0400 selftests: ftrace: Add a way to reset triggers in the set_ftrace_filter file Just writing into the set_ftrace_filter file does not reset triggers, even though it can reset the function list. Triggers require writing the trigger name with a "!" prepended. It's worse that it requires the number if the trigger has a count associated to it. Add a reset_ftrace_filter function to the ftrace self tests to allow for the tests to have a generic way to clear them. It also resets any functions that are listed in that file as well. Signed-off-by: Steven Rostedt (VMware) tools/testing/selftests/ftrace/test.d/functions | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 3a9ca1e2cba02365d93a8cf7bdda04c05a637f1b Merge: b89f04c 6c80138 Author: David S. Miller Date: Tue Apr 18 13:39:51 2017 -0400 Merge branch 'sctp-dup-stream-reconf-events' Xin Long says: ==================== sctp: add proper process for duplicated stream reconf requests Now sctp stream reconf will process a request again even if it's seqno is less than asoc->strreset_inseq. It may cause a replay attack. This patchset is to avoid it by add proper process for all duplicated stream reconf requests. ==================== Signed-off-by: David S. Miller commit 6c80138773efff75ee9598b4ebcd7aa0e3a5a2a3 Author: Xin Long Date: Sat Apr 15 22:00:29 2017 +0800 sctp: process duplicated strreset asoc request correctly This patch is to fix the replay attack issue for strreset asoc requests. When a duplicated strreset asoc request is received, reply it with bad seqno if it's seqno < asoc->strreset_inseq - 2, and reply it with the result saved in asoc if it's seqno >= asoc->strreset_inseq - 2. But note that if the result saved in asoc is performed, the sender's next tsn and receiver's next tsn for the response chunk should be set. It's safe to get them from asoc. Because if it's changed, which means the peer has received the response already, the new response with wrong tsn won't be accepted by peer. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/stream.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit d0f025e611581169c81e3c0fc44b5133d12748dd Author: Xin Long Date: Sat Apr 15 22:00:28 2017 +0800 sctp: process duplicated strreset in and addstrm in requests correctly This patch is to fix the replay attack issue for strreset and addstrm in requests. When a duplicated strreset in or addstrm in request is received, reply it with bad seqno if it's seqno < asoc->strreset_inseq - 2, and reply it with the result saved in asoc if it's seqno >= asoc->strreset_inseq - 2. For strreset in or addstrm in request, if the receiver side processes it successfully, a strreset out or addstrm out request(as a response for that request) will be sent back to peer. reconf_time will retransmit the out request even if it's lost. So when receiving a duplicated strreset in or addstrm in request and it's result was performed, it shouldn't reply this request, but drop it instead. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/stream.c | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) commit e4dc99c7c21ba456fd72a70ada5d8d5f3850bcf5 Author: Xin Long Date: Sat Apr 15 22:00:27 2017 +0800 sctp: process duplicated strreset out and addstrm out requests correctly Now sctp stream reconf will process a request again even if it's seqno is less than asoc->strreset_inseq. If one request has been done successfully and some data chunks have been accepted and then a duplicated strreset out request comes, the streamin's ssn will be cleared. It will cause that stream will never receive chunks any more because of unsynchronized ssn. It allows a replay attack. A similar issue also exists when processing addstrm out requests. It will cause more extra streams being added. This patch is to fix it by saving the last 2 results into asoc. When a duplicated strreset out or addstrm out request is received, reply it with bad seqno if it's seqno < asoc->strreset_inseq - 2, and reply it with the result saved in asoc if it's seqno >= asoc->strreset_inseq - 2. Note that it saves last 2 results instead of only last 1 result, because two requests can be sent together in one chunk. And note that when receiving a duplicated request, the receiver side will still reply it even if the peer has received the response. It's safe, As the response will be dropped by the peer. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/structs.h | 1 + net/sctp/stream.c | 39 +++++++++++++++++++++++++++++---------- 2 files changed, 30 insertions(+), 10 deletions(-) commit df47c0a638b07dab18b202b307506e4b86b02e9a Merge: d47e538 ed3730c Author: Greg Kroah-Hartman Date: Tue Apr 18 19:38:38 2017 +0200 Merge tag 'iio-fixes-for-4.11e' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Fifth set of IIO fixes for the 4.11 cycle. As these are rather late in the cycle, they may sneak over into 4.12. There is a fix for a regression caused by another fix (hid sensors hardware seems to vary a lot in how various corner cases are handled). * ad7303 - fix channel description. Numeric values were being passed as characters presumably leading to garbage from the userspace interface. * as3935 - the write data macro was wrong so fix it. * bmp280 - incorrect handling of negative values as being unsigned broke humidity calculation. * hid-sensor - Restore the poll and hysteresis values after resume as some hardware doesn't do it. * stm32-trigger - buglet in reading the sampling frequency commit 8b06b884cd98f7ec8b5028680b99fabfb7b3e192 Author: Dan Williams Date: Thu Apr 13 23:14:34 2017 -0700 tools/testing/nvdimm: fix nfit_test shutdown crash Keep the nfit_test instances alive until after nfit_test_teardown(), as we may be doing resource lookups until the final un-registrations have completed. This fixes crashes of the form. BUG: unable to handle kernel NULL pointer dereference at 0000000000000038 IP: __release_resource+0x12/0x90 Call Trace: remove_resource+0x23/0x40 __wrap_remove_resource+0x29/0x30 [nfit_test_iomap] acpi_nfit_remove_resource+0xe/0x10 [nfit] devm_action_release+0xf/0x20 release_nodes+0x16d/0x2b0 devres_release_all+0x3c/0x60 device_release+0x21/0x90 kobject_release+0x6a/0x170 kobject_put+0x2f/0x60 put_device+0x17/0x20 platform_device_unregister+0x20/0x30 nfit_test_exit+0x36/0x960 [nfit_test] Reported-by: Linda Knippers Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 67e03ff3f32ffeb8f425d80627f3054b60bac0b7 Author: Nicole Faerber Date: Mon Apr 17 10:04:08 2017 -0500 ASoC: codecs: rt5670: add Thinkpad Tablet 10 quirk The Thinkpad Tablet tablet has a similar audio setup as the Intel Braswell platform. A quirk is needed to detect the platform and setup the platform data properly: Manufacturer: LENOVO Product Name: 20C1CTO1WW Version: ThinkPad 10 Manufacturer: LENOVO Product Name: 20C3001VHH Version: ThinkPad 10 Manufacturer: LENOVO Product Name: 20C10024GE Version: ThinkPad Tablet B Manufacturer: LENOVO Product Name: 20359 Version: Lenovo Miix 2 10 Signed-off-by: Nicole Faerber Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/codecs/rt5670.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit beb5989a8c6c6867b4e873cca2a66d31f977368f Author: Pierre-Louis Bossart Date: Mon Apr 17 10:04:07 2017 -0500 ASoC: Intel: Atom: update Thinkpad 10 quirk There are multiple skews of the same Lenovo audio hardware based on the Realtek RT5670 codec. Manufacturer: LENOVO Product Name: 20C1CTO1WW Version: ThinkPad 10 Manufacturer: LENOVO Product Name: 20C3001VHH Version: ThinkPad 10 Manufacturer: LENOVO Product Name: 20C10024GE Version: ThinkPad Tablet B Manufacturer: LENOVO Product Name: 20359 Version: Lenovo Miix 2 10 For all these devices, the same quirk is used to force the machine driver to be based on RT5670 instead of RT5640 as indicated by the BIOS. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96691 Tested-by: Nicole Faerber Tested-by: Viacheslav Ostroukh Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit babd658503a69c423aeab440f7d385f03ac54f7e Author: John Hsu Date: Tue Apr 18 10:32:04 2017 +0800 ASoC: nau8540: fix tab conversion problem Fix the tab converting to space problem. Signed-off-by: John Hsu Signed-off-by: Mark Brown sound/soc/codecs/nau8540.c | 1224 ++++++++++++++++++++++---------------------- sound/soc/codecs/nau8540.h | 310 +++++------ 2 files changed, 767 insertions(+), 767 deletions(-) commit 20c994e4d806e0c656b5fe0d14b17896b73a086c Author: Matthias Kaehlcke Date: Mon Apr 3 12:46:36 2017 -0700 frv: Use OFFSET macro in DEF_*REG() Avoid code duplication by using OFFSET() in DEF_*REG() instead of replicating the macro. Signed-off-by: Matthias Kaehlcke Reviewed-by: David Howells Signed-off-by: Masahiro Yamada arch/frv/kernel/asm-offsets.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 049a59db34eb4c41a0231f983f180053db8f80d4 Author: Wei-Ning Huang Date: Wed Apr 12 18:56:19 2017 +0200 firmware: Google VPD sysfs driver This patch introduces the Google Vital Product Data driver. This driver reads Vital Product Data from coreboot tables and then creates the corresponding sysfs entries under /sys/firmware/vpd to provide easy access for userspace programs (does not require flashrom). The sysfs is structured as follow: /sys/firmware/vpd |-- ro | |-- key1 | `-- key2 |-- ro_raw |-- rw | `-- key1 `-- rw_raw Where ro_raw and rw_raw contain the raw VPD partition. The files under ro and rw correspond to the key name in the VPD and the the file content is the value for the key. Signed-off-by: Wei-Ning Huang Signed-off-by: Thierry Escande Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/Kconfig | 7 + drivers/firmware/google/Makefile | 3 + drivers/firmware/google/vpd.c | 332 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 342 insertions(+) commit ad2ac9d5c5e0e5fa7e21575d3cd9d0227803ea99 Author: Wei-Ning Huang Date: Wed Apr 12 18:56:18 2017 +0200 firmware: Google VPD: import lib_vpd source files This patch imports lib_vpd.h and vpd_decode.c from the Chromium Vital Product Data project. This library is used to parse VPD sections obtained from coreboot table entries describing Chromebook devices product data. Only the sections of type VPD_TYPE_STRING are decoded. The VPD string sections in the coreboot tables contain the type (1 byte set to 0x01 for strings), the key length, the key ascii array, the value length, and the value ascii array. The key and value arrays are not null terminated. Signed-off-by: Wei-Ning Huang Signed-off-by: Thierry Escande Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/vpd_decode.c | 99 ++++++++++++++++++++++++++++++++++++ drivers/firmware/google/vpd_decode.h | 58 +++++++++++++++++++++ 2 files changed, 157 insertions(+) commit b8475cbee5ab2eac05f9cd5dbcc94c453d3cbf10 Author: Tyrel Datwyler Date: Mon Apr 17 20:29:17 2017 -0400 of: fix "/cpus" reference leak in of_numa_parse_cpu_nodes() The call to of_find_node_by_path("/cpus") returns the cpus device_node with its reference count incremented. There is no matching of_node_put() call in of_numa_parse_cpu_nodes() which results in a leaked reference to the "/cpus" node. This patch adds an of_node_put() to release the reference. fixes: 298535c00a2c ("of, numa: Add NUMA of binding implementation.") Signed-off-by: Tyrel Datwyler Acked-by: David Daney Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: Rob Herring drivers/of/of_numa.c | 2 ++ 1 file changed, 2 insertions(+) commit b899830506740faf509f3bb51d3d1e50102aed40 Author: Rafael J. Wysocki Date: Tue Apr 18 15:49:06 2017 +0200 platform/x86: intel-hid: Add missing ->thaw callback The intel-hid driver is missing a PM ->thaw callback allowing the device to go back to the operational state after creating a hibernation image or when there is an image restoration error during resume. The lack of the ->thaw callback basically means that all events signaled by the device are discarded after a hibernation image has been created which may be problematic, for example, if the image cannot be saved (eg. due to an I/O issue with storage). Signed-off-by: Rafael J. Wysocki Signed-off-by: Darren Hart (VMware) drivers/platform/x86/intel-hid.c | 1 + 1 file changed, 1 insertion(+) commit 9e18308a5dcc2250a271e598dfe0d917b5522475 Author: Michael Davidson Date: Fri Apr 14 14:15:09 2017 -0700 misc: lkdtm: Add volatile to intentional NULL pointer reference Add a volatile qualifier where a NULL pointer is deliberately dereferenced to trigger a panic. Without the volatile qualifier clang will issue the following warning: "indirection of non-volatile null pointer will be deleted, not trap [-Wnull-dereference]" and replace the pointer reference with a __builtin_trap() (which generates a ud2 instruction on x86_64). Signed-off-by: Michael Davidson Signed-off-by: Matthias Kaehlcke Acked-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/misc/lkdtm_bugs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e1c21f486944bf92f2a981f23ee811a45f5eaff Author: Nicolas Pitre Date: Wed Apr 12 18:37:17 2017 -0400 serial: small Makefile reordering Move 21285 entry down alongside other UART drivers to be more consistent with the rest of the file. It is kept before 8250 though, to preserve the existing link ordering between those two. Signed-off-by: Nicolas Pitre Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a1235b3eb10086b8420f37bbb6c29436f55940ba Author: Nicolas Pitre Date: Wed Apr 12 18:37:16 2017 -0400 tty: split job control support into a file of its own This makes it easier for job control to become optional and/or usable independently from tty_io.c, as well as providing a nice purpose separation. No logical changes from this patch. Signed-off-by: Nicolas Pitre Signed-off-by: Greg Kroah-Hartman drivers/tty/Makefile | 2 +- drivers/tty/tty_io.c | 547 +-------------------------------------------- drivers/tty/tty_jobctrl.c | 554 ++++++++++++++++++++++++++++++++++++++++++++++ include/linux/tty.h | 6 + 4 files changed, 572 insertions(+), 537 deletions(-) commit fff0a2ca3a061c230b0e905e7586267a517538ac Author: Nicolas Pitre Date: Wed Apr 12 18:37:15 2017 -0400 tty: move baudrate handling code to a file of its own To allow reuse without the rest of the tty_ioctl code. No logical changes from this patch. Signed-off-by: Nicolas Pitre Signed-off-by: Greg Kroah-Hartman drivers/tty/Makefile | 3 +- drivers/tty/tty_baudrate.c | 232 +++++++++++++++++++++++++++++++++++++++++++++ drivers/tty/tty_ioctl.c | 222 ------------------------------------------- 3 files changed, 234 insertions(+), 223 deletions(-) commit 0c688614dcce84dfdbb305fd1c399c06cecea745 Author: Nicolas Pitre Date: Wed Apr 12 18:37:14 2017 -0400 console: move console_init() out of tty_io.c All the console driver handling code lives in printk.c. Move console_init() there as well so console support can still be used when the TTY code is configured out. No logical changes from this patch. Signed-off-by: Nicolas Pitre Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 24 ------------------------ include/linux/console.h | 2 ++ include/linux/tty.h | 7 ++++--- init/main.c | 2 +- kernel/printk/printk.c | 24 ++++++++++++++++++++++++ 5 files changed, 31 insertions(+), 28 deletions(-) commit ee0fe833d96793853335844b6d99fb76bd12cbeb Author: Alyssa Milburn Date: Sat Apr 1 14:34:08 2017 -0300 [media] zr364xx: enforce minimum size when reading header This code copies actual_length-128 bytes from the header, which will underflow if the received buffer is too small. Signed-off-by: Alyssa Milburn Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/zr364xx/zr364xx.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 821117dc21083a99dd99174c10848d70ff43de29 Author: Alyssa Milburn Date: Sat Apr 1 14:33:42 2017 -0300 [media] digitv: limit messages to buffer size Return an error rather than memcpy()ing beyond the end of the buffer. Internal callers use appropriate sizes, but digitv_i2c_xfer may not. Signed-off-by: Alyssa Milburn Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/digitv.c | 3 +++ 1 file changed, 3 insertions(+) commit 72f1b85a045e3db4d21e9531bdc605157fa224a7 Author: Marc Gonzalez Date: Mon Apr 10 11:47:09 2017 +0200 serial: 8250_early: Add earlycon support for Palmchip UART Define an OF early console for Palmchip UART, which can be enabled by passing "earlycon" on the boot command line. Signed-off-by: Marc Gonzalez Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_early.c | 24 ++++++++++++++++++++++++ drivers/tty/serial/8250/8250_port.c | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) commit 5a0722b898f851b9ef108ea7babc529e4efc773d Author: Timur Tabi Date: Thu Apr 13 08:55:08 2017 -0500 tty: pl011: use "qdf2400_e44" as the earlycon name for QDF2400 E44 Define a new early console name for Qualcomm Datacenter Technologies QDF2400 SOCs affected by erratum 44, instead of piggy-backing on "pl011". Previously, to enable traditional (non-SPCR) earlycon, the documentation said to specify "earlycon=pl011,
,qdf2400_e44", but the code was broken and this didn't actually work. So instead, the method for specifying the E44 work-around with traditional earlycon is "earlycon=qdf2400_e44,
". Both methods of earlycon are now enabled with the same function. Fixes: e53e597fd4c4 ("tty: pl011: fix earlycon work-around for QDF2400 erratum 44") Signed-off-by: Timur Tabi Cc: stable # 4.11 Tested-by: Shanker Donthineni Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) commit e8357cdec3d1b6b42566ce3bc960e5e10c2b3787 Author: Ezequiel Garcia Date: Sat Mar 25 16:14:15 2017 -0300 [media] media: stk1160: Add Kconfig help on snd-usb-audio requirement The Kconfig currently makes no reference to the snd-usb-audio driver, which supports audio capture for this type of devices. Just in case, let's make sure the requirement is mentioned in the description. Signed-off-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/stk1160/Kconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d47e5382358021303b47a0977c7472fdda1eeb40 Merge: 18125dc0 d454ae2 Author: Greg Kroah-Hartman Date: Tue Apr 18 17:13:31 2017 +0200 Merge tag 'iio-for-4.12d' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Fourth set of IIO new device support, features and cleanups for the 4.12 cycle New device support * max1117, 1118 and 1119 - new ADC driver * max9611 - new ADC driver * pm8xxx hk/xoadc - new driver with some shared features broken out from the SPMI vadc. * sun4i-gpadc - A33 thermal sensor support (with associated rework) * stm32-dac - new driver and bindings * stm32 trigger - enable support of quadrature encoder device and counter modes Features * apds9960 - use the runtime pm for normal suspend * stm32-adc - add opition to sest resolution via devicetree * xoadc - augment DT bindings to deal with some weird mux cases Cleanups * ad5933 - protect direct mode using claim and release helpers * ade7759 - S_IRUGO and friends to octal in two goes * adis16203 - drop unnecessary brackets * hid-sensor - fix unbalanced pm_runtieme_enable error when probing after remove * lsm6dsx - use actual part numbers for device name when known - simplify data read pin parsing * mpu3050 - avoid double reporting errors commit c762efd323ca5ba9c6dbcf8975cb6f46a27a2fff Author: Arushi Singhal Date: Wed Mar 22 01:26:09 2017 -0300 [media] staging: media: omap4iss: Replace a bit shift by a use of BIT This patch replaces bit shifting on 1 with the BIT(x) macro. This was done with coccinelle: @@ constant c; @@ -1 << c +BIT(c) Signed-off-by: Arushi Singhal Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/omap4iss/iss_csi2.c | 2 +- drivers/staging/media/omap4iss/iss_ipipe.c | 2 +- drivers/staging/media/omap4iss/iss_ipipeif.c | 2 +- drivers/staging/media/omap4iss/iss_resizer.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 89515d0255c918e08aa4085956c79bf17615fda5 Author: Marc Olson Date: Tue Apr 11 12:24:09 2017 -0700 blkfront: add uevent for size change When a blkfront device is resized from dom0, emit a KOBJ_CHANGE uevent to notify the guest about the change. This allows for custom udev rules, such as automatically resizing a filesystem, when an event occurs. With this patch you get these udev KERNEL[577.206230] change /devices/vbd-51728/block/xvdb (block) UDEV [577.226218] change /devices/vbd-51728/block/xvdb (block) Signed-off-by: Marc Olson Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 3 +++ 1 file changed, 3 insertions(+) commit 158f0328af86a99d64073851967a02694bff987d Author: Daniel Scheller Date: Sun Mar 19 12:26:39 2017 -0300 [media] dvb-frontends/cxd2841er: define symbol_rate_min/max in T/C fe-ops Fixes "w_scan -f c" complaining with This dvb driver is *buggy*: the symbol rate limits are undefined - please report to linuxtv.org) Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/cxd2841er.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0b6e9ea041e6c932f5b3a86fae2d60cbcfad4dd2 Author: Seth Forshee Date: Wed Jul 2 16:29:19 2014 -0500 fuse: Add support for pid namespaces When the userspace process servicing fuse requests is running in a pid namespace then pids passed via the fuse fd are not being translated into that process' namespace. Translation is necessary for the pid to be useful to that process. Since no use case currently exists for changing namespaces all translations can be done relative to the pid namespace in use when fuse_conn_init() is called. For fuse this translates to mount time, and for cuse this is when /dev/cuse is opened. IO for this connection from another namespace will return errors. Requests from processes whose pid cannot be translated into the target namespace will have a value of 0 for in.h.pid. File locking changes based on previous work done by Eric Biederman. Signed-off-by: Seth Forshee Signed-off-by: Miklos Szeredi fs/fuse/dev.c | 15 +++++++++++---- fs/fuse/file.c | 22 +++++++++++++++++----- fs/fuse/fuse_i.h | 4 ++++ fs/fuse/inode.c | 3 +++ 4 files changed, 35 insertions(+), 9 deletions(-) commit 095fc40ace5ffccd306f39fdd1a40b4faa41b8a0 Author: Elena Reshetova Date: Fri Mar 3 11:04:05 2017 +0200 fuse: convert fuse_conn.count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Miklos Szeredi fs/fuse/fuse_i.h | 2 +- fs/fuse/inode.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit ec99f6d31f2590a4c0ff2dae8fb1fa27f0647a42 Author: Elena Reshetova Date: Fri Mar 3 11:04:04 2017 +0200 fuse: convert fuse_req.count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Miklos Szeredi fs/fuse/dev.c | 9 ++++----- fs/fuse/fuse_i.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) commit 4e8c2eb54327a6f8b0ef6d6afb28ab24b721dbe0 Author: Elena Reshetova Date: Fri Mar 3 11:04:03 2017 +0200 fuse: convert fuse_file.count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Miklos Szeredi fs/fuse/file.c | 8 ++++---- fs/fuse/fuse_i.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) commit 79f97c3051e16b117b47e0586a368c4f54a82909 Author: Shanker Donthineni Date: Wed Mar 29 06:39:19 2017 -0500 ACPI / platform: Update platform device NUMA node based on _PXM method The optional _PXM method evaluates to an integer that identifies the proximity domain of a device object. On ACPI based kernel boot, the field numa_node in 'struct device' is always set to -1 irrespective of _PXM value that is specified in the ACPI device object. But in case of device-tree based kernel boot the numa_node field is populated and reflects to a DT property that is specified in DTS according to the below document. https://www.kernel.org/doc/Documentation/devicetree/bindings/numa.txt http://lxr.free-electrons.com/source/drivers/of/device.c#L54 Without this patch dev_to_node() always returns -1 for all platform devices. This patch adds support for the ACPI _PXM method and updates the platform device NUMA node id using acpi_get_node() which provides the PXM-to-NUMA mapping information. The individual platform device drivers should be able to use the NUMA-aware memory allocation functions kmalloc_node() and alloc_pages_node() to improve performance. Signed-off-by: Shanker Donthineni Reviewed-by: Hanjun Guo Tested-by: Jiandi An [ rjw: Subject / changelog ] Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_platform.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 21470e32ca7f976bf131aa3c7b54019d07f7d821 Author: Mauro Carvalho Chehab Date: Sun Apr 16 21:51:07 2017 -0300 usb: fix some references for /proc/bus/usb Since when we got rid of usbfs, the /proc/bus/usb is now elsewhere. Fix references for it. Signed-off-by: Mauro Carvalho Chehab Acked-by: Serge Hallyn Signed-off-by: Greg Kroah-Hartman drivers/media/usb/pwc/philips.txt | 2 +- drivers/usb/class/Kconfig | 2 +- drivers/usb/class/usblp.c | 2 +- drivers/usb/core/devices.c | 4 ++-- drivers/usb/storage/unusual_devs.h | 2 +- include/linux/usb.h | 2 +- include/uapi/linux/capability.h | 2 +- include/uapi/linux/usb/ch9.h | 3 ++- tools/usb/usbip/README | 2 +- 9 files changed, 11 insertions(+), 10 deletions(-) commit ac9d947683c1b508f798f0c87c51cfb7b9f1eee5 Merge: 593bc46 a932a80 Author: Greg Kroah-Hartman Date: Tue Apr 18 16:52:20 2017 +0200 Merge tag 'usb-ci-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next Peter writes: Two changes for this v4.12-rc1: - Add sysfs entry for role switch - Update gadget state after gadget back from suspend commit 35b68735988447485074cfa862710e49c082c013 Author: Prakash, Prashanth Date: Thu Mar 23 15:21:53 2017 -0600 ACPI / Processor: Drop setup_max_cpus check from acpi_processor_add() When maxcpus=X kernel argument is used, we parse the ACPI tables only for the first X cpus. The per-cpu ACPI data include the _PSD tables which gives information about related cpus. cppc_cpufreq and acpi-cpufreq parses the table once during init to deduce the related cpus. If a user brings a new cpu online after boot the related cpu data becomes incorrect. acpi_get_psd_map() in acpi_cppc.c returns error if it fails to find the parsed ACPI data for possible CPU resulting in cppc_cpufreq initialization failure. With this change we will probe all possible CPUs prior to cpufreq initialization, but will bring only setup_max_cpus online. nr_cpus kernel parameter can be used to restict even parsing per-cpu ACPI tables. Signed-off-by: Prashanth Prakash [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_processor.c | 5 ----- 1 file changed, 5 deletions(-) commit 593bc4622a98c172dbb939103aef917d1800a663 Author: Alexandre Bailon Date: Sun Apr 16 23:21:18 2017 -0500 usb: musb: musb_cppi41: Workaround DMA stall issue during teardown The DMA may hang up if a teardown is initiated while an endpoint is still active (Advisory 2.3.27 of DA8xx errata). To workaround this issue, add a delay before to initiate the teardown. Signed-off-by: Alexandre Bailon Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/da8xx.c | 2 +- drivers/usb/musb/musb_core.h | 1 + drivers/usb/musb/musb_cppi41.c | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) commit d6299b6efbf66c27d2d8cda009e6d49b53dc4cfe Author: Alexandre Bailon Date: Sun Apr 16 23:21:17 2017 -0500 usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx Currently, only the PIO mode is supported. This add support of CPPI 4.1 to DA8xx. As in DA8xx the CPPI 4.1 DMA is a part of the USBSS, create the CPPI 4.1 device as a child of USB. Signed-off-by: Alexandre Bailon [b-liu@ti.com: minor tweak in the commit log] Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/Kconfig | 4 ++-- drivers/usb/musb/da8xx.c | 43 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 44 insertions(+), 3 deletions(-) commit aa2fb8862522690ffd7cfc42a3643d4b08ee4b46 Author: Alexandre Bailon Date: Sun Apr 16 23:21:16 2017 -0500 usb: musb: Use shared irq In the DA8xx, USB and CPPI 4.1 are sharing the same interrupt line. Update the driver to request a shared irq. Signed-off-by: Alexandre Bailon Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5332b000707b0b415291901846c4a8fc24f6a2e Author: Ivan Safonov Date: Sun Apr 16 23:21:15 2017 -0500 usb: musb: cppi_dma.c: use DIV_ROUND_UP macro in cppi_next_(r|t)x_segment() DIV_ROUND_UP is bit useful than series of "/" and "%" operations. Replace "/%" sequence with DIV_ROUND_UP macro. Signed-off-by: Ivan Safonov Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/cppi_dma.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit ec1dafe8ec5f846d6b1b280309d8b03d25b096fd Author: Mathias Nyman Date: Thu Apr 13 14:01:04 2017 +0300 xhci: use correct flags for spin_lock_irqrestore() when setting port power commit a6ff6cbf1fab ("usb: xhci: Add helper function xhci_set_power_on().") created a helper to control port power that needs to be called with xhci->lock held and interrupts disabled. It released the lock with spin_unlock_irqrestore using a new zero flag variable instead of the original flag from spin_lock_irqsave. This regression triggered a static checker warning about bogus flags, and a null pointer dereference on armada-385. Fix it by passing a pointer to the correct flags and using it instead Fixes: a6ff6cbf1fab ("usb: xhci: Add helper function xhci_set_power_on().") Cc: Guoqing Zhang Reported-by: Ralph Sennhauser Tested-by: Ralph Sennhauser Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 90ad4052e85cece1bbae064ff4b14088de35df29 Author: Masahiro Yamada Date: Fri Apr 14 15:17:26 2017 +0900 kbuild: avoid conflict between -ffunction-sections and -pg on gcc-4.7 Arnd Bergmann reported: "When ftrace is enabled and we build with gcc-4.7 or older, we get a warning for each file on architectures that select CONFIG_LD_DEAD_CODE_DATA_ELIMINATION: warning: -ffunction-sections disabled; it makes profiling impossible [enabled by default] " Since commit c3f0d0bc5b01 ("kbuild, LLVMLinux: Add -Werror to cc-option to support clang"), warnings are treated as errors in cc-option checks. CC_FLAGS_FTRACE is blindly added to KBUILD_CFLAGS, so $(call cc-option,-ffunction-sections,) should be moved below it in order to detect the conflict between the two options. Reported-by: Arnd Bergmann Signed-off-by: Masahiro Yamada Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c2a9c7ab475bc3aaf06521a39ac65bc48c8cad4f Author: Anand Jain Date: Thu Apr 6 11:22:53 2017 +0800 btrfs: check if the device is flush capable The block layer call chain from submit_bio will check if the write cache is enabled for the given queue before submitting the flush. This will add a code to fail fast if its not. Signed-off-by: Anand Jain Reviewed-by: David Sterba [ updated changelog to reflect current code stat, blkdev_issue_flush is not used yet ] Signed-off-by: David Sterba fs/btrfs/disk-io.c | 4 ++++ 1 file changed, 4 insertions(+) commit 13e88e1560d6014838e2dd9f8b9cf8ec9a8d86e6 Author: Anand Jain Date: Thu Apr 6 11:22:52 2017 +0800 btrfs: delete unused member nobarriers The last consumer of nobarriers is removed by the commit [1] and sync won't fail with EOPNOTSUPP anymore. Thus, now when write cache is write through it just return success without actually transpiring such a request to the block device/lun. [1] commit b25de9d6da49b1a8760a89672283128aa8c78345 block: remove BIO_EOPNOTSUPP And, as the device/lun write cache state may change dynamically saving such as state won't help either. So deleting the member nobarriers. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 3 --- fs/btrfs/volumes.h | 1 - 2 files changed, 4 deletions(-) commit 24196f0c7d4bba093dfa8074507f31509970319f Author: Elena Reshetova Date: Tue Apr 18 09:02:48 2017 -0500 PCI: hv: Convert hv_pci_dev.refs from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Reviewed-by: Stephen Hemminger drivers/pci/host/pci-hyperv.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 28d70e237dac905cd8d1896af10216b7d2bced24 Author: Qu Wenruo Date: Fri Apr 14 08:35:55 2017 +0800 btrfs: scrub: Fix RAID56 recovery race condition When scrubbing a RAID5 which has recoverable data corruption (only one data stripe is corrupted), sometimes scrub will report more csum errors than expected. Sometimes even unrecoverable error will be reported. The problem can be easily reproduced by the following steps: 1) Create a btrfs with RAID5 data profile with 3 devs 2) Mount it with nospace_cache or space_cache=v2 To avoid extra data space usage. 3) Create a 128K file and sync the fs, unmount it Now the 128K file lies at the beginning of the data chunk 4) Locate the physical bytenr of data chunk on dev3 Dev3 is the 1st data stripe. 5) Corrupt the first 64K of the data chunk stripe on dev3 6) Mount the fs and scrub it The correct csum error number should be 16 (assuming using x86_64). Larger csum error number can be reported in a 1/3 chance. And unrecoverable error can also be reported in a 1/10 chance. The root cause of the problem is RAID5/6 recover code has race condition, due to the fact that full scrub is initiated per device. While for other mirror based profiles, each mirror is independent with each other, so race won't cause any big problem. For example: Corrupted | Correct | Correct | | Scrub dev3 (D1) | Scrub dev2 (D2) | Scrub dev1(P) | ------------------------------------------------------------------------ Read out D1 |Read out D2 |Read full stripe | Check csum |Check csum |Check parity | Csum mismatch |Csum match, continue |Parity mismatch | handle_errored_block | |handle_errored_block | Read out full stripe | | Read out full stripe| D1 csum error(err++) | | D1 csum error(err++)| Recover D1 | | Recover D1 | So D1's csum error is accounted twice, just because handle_errored_block() doesn't have enough protection, and race can happen. On even worse case, for example D1's recovery code is re-writing D1/D2/P, and P's recovery code is just reading out full stripe, then we can cause unrecoverable error. This patch will use previously introduced lock_full_stripe() and unlock_full_stripe() to protect the whole scrub_handle_errored_block() function for RAID56 recovery. So no extra csum error nor unrecoverable error. Reported-by: Goffredo Baroncelli Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/scrub.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 0966a7b1300f953b04b436aa82486d3d1b17c96d Author: Qu Wenruo Date: Fri Apr 14 08:35:54 2017 +0800 btrfs: scrub: Introduce full stripe lock for RAID56 Unlike mirror based profiles, RAID5/6 recovery needs to read out the whole full stripe. And if we don't do proper protection, it can easily cause race condition. Introduce 2 new functions: lock_full_stripe() and unlock_full_stripe() for RAID5/6. Which store a rb_tree of mutexes for full stripes, so scrub callers can use them to lock a full stripe to avoid race. Signed-off-by: Qu Wenruo Reviewed-by: Liu Bo Reviewed-by: David Sterba [ minor comment adjustments ] Signed-off-by: David Sterba fs/btrfs/ctree.h | 17 ++++ fs/btrfs/extent-tree.c | 11 +++ fs/btrfs/scrub.c | 223 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 251 insertions(+) commit fa7aede2ab5f54352c7aec056930dd17b28f3a78 Author: Deepa Dinamani Date: Fri Apr 7 17:57:05 2017 -0700 btrfs: Use ktime_get_real_ts for root ctime btrfs_root_item maintains the ctime for root updates. This is not part of vfs_inode. Since current_time() uses struct inode* as an argument as Linus suggested, this cannot be used to update root times unless, we modify the signature to use inode. Since btrfs uses nanosecond time granularity, it can also use ktime_get_real_ts directly to obtain timestamp for the root. It is necessary to use the timespec time api here because the same btrfs_set_stack_timespec_*() apis are used for vfs inode times as well. These can be transitioned to using timespec64 when btrfs internally changes to use timespec64 as well. Signed-off-by: Deepa Dinamani Acked-by: David Sterba Reviewed-by: Arnd Bergmann Signed-off-by: David Sterba fs/btrfs/root-tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9986277e0e4ce10fd37bf853fe22ba429a967a45 Author: Dan Carpenter Date: Tue Apr 11 11:57:15 2017 +0300 Btrfs: handle only applicable errors returned by btrfs_get_extent btrfs_get_extent() never returns NULL pointers, so this code introduces a static checker warning. The btrfs_get_extent() is a bit complex, but trust me that it doesn't return NULLs and also if it did we would trigger the BUG_ON(!em) before the last return statement. Signed-off-by: Dan Carpenter [ updated subject ] Signed-off-by: David Sterba fs/btrfs/file.c | 16 ++++------------ fs/btrfs/inode.c | 25 +++++++++++-------------- 2 files changed, 15 insertions(+), 26 deletions(-) commit 82bafb38c2d6bf3b9ab91bde448c08b8154660c1 Author: Qu Wenruo Date: Mon Feb 27 15:10:33 2017 +0800 btrfs: qgroup: Fix qgroup corruption caused by inode_cache mount option [BUG] The easist way to reproduce the bug is: ------ # mkfs.btrfs -f $dev -n 16K # mount $dev $mnt -o inode_cache # btrfs quota enable $mnt # btrfs quota rescan -w $mnt # btrfs qgroup show $mnt qgroupid rfer excl -------- ---- ---- 0/5 32.00KiB 32.00KiB ^^ Twice the correct value ------ And fstests/btrfs qgroup test group can easily detect them with inode_cache mount option. Although some of them are false alerts since old test cases are using fixed golden output. While new test cases will use "btrfs check" to detect qgroup mismatch. [CAUSE] Inode_cache mount option will make commit_fs_roots() to call btrfs_save_ino_cache() to update fs/subvol trees, and generate new delayed refs. However we call btrfs_qgroup_prepare_account_extents() too early, before commit_fs_roots(). This makes the "old_roots" for newly generated extents are always NULL. For freeing extent case, this makes both new_roots and old_roots to be empty, while correct old_roots should not be empty. This causing qgroup numbers not decreased correctly. [FIX] Modify the timing of calling btrfs_qgroup_prepare_account_extents() to just before btrfs_qgroup_account_extents(), and add needed delayed_refs handler. So qgroup can handle inode_map mount options correctly. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/transaction.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit e884f4f06e89616ba32badcc7d87762e39a792e5 Author: Anand Jain Date: Tue Apr 4 18:40:19 2017 +0800 btrfs: use q which is already obtained from bdev_get_queue We have already assigned q from bdev_get_queue() so use it. And rearrange the code for better view. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 42c61ab6760f5f6929ebf5a73b7e32b9aa51fbd5 Author: Liu Bo Date: Mon Apr 3 13:45:24 2017 -0700 Btrfs: switch to div64_u64 if with a u64 divisor This is fixing code pieces where we use div_u64 when passing a u64 divisor. Cc: David Sterba Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 2 +- fs/btrfs/scrub.c | 4 ++-- fs/btrfs/volumes.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) commit 972d7219398651aaf7ae086b4f17c3416b51c7db Author: Liu Bo Date: Mon Apr 3 13:45:33 2017 -0700 Btrfs: update scrub_parity to use u64 stripe_len Commit 3d8da6781760 ("Btrfs: fix divide error upon chunk's stripe_len") changed stripe_len in struct map_lookup to u64, but didn't update stripe_len in struct scrub_parity. This updates the type and switches to div64_u64_rem to match u64 divisor. Cc: David Sterba Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/scrub.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c725328c55443f150577efcf445a7924687342e4 Author: Liu Bo Date: Wed Mar 29 10:53:58 2017 -0700 Btrfs: enable repair during read for raid56 profile Now that scrub can fix data errors with the help of parity for raid56 profile, repair during read is able to as well. Although the mirror num in raid56 scenario has different meanings, i.e. 0 or 1: read data directly > 1: do recover with parity, it could be fit into how we repair bad block during read. The trick is to use BTRFS_MAP_READ instead of BTRFS_MAP_WRITE to get the device and position on it. Cc: David Sterba Tested-by: Qu Wenruo Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) commit 619a974292387343c817f5a36e9df6daeb3ccc60 Author: David Sterba Date: Wed Mar 29 20:48:44 2017 +0200 btrfs: use clear_page where appropriate There's a helper to clear whole page, with a arch-specific optimized code. The replaced cases do not seem to be in performace critical code, but we still might get some percent gain. Signed-off-by: David Sterba fs/btrfs/free-space-cache.c | 2 +- fs/btrfs/scrub.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e501bfe323356ea3f7ef79d4b0d95389b70a7193 Author: Qu Wenruo Date: Wed Mar 29 09:33:22 2017 +0800 btrfs: Prevent scrub recheck from racing with dev replace scrub_setup_recheck_block() calls btrfs_map_sblock() and then accesses bbio without protection of bio_counter. This can lead to use-after-free if racing with dev replace cancel. Fix it by increasing bio_counter before calling btrfs_map_sblock() and decreasing the bio_counter when corresponding recover is finished. Cc: Liu Bo Reported-by: Liu Bo Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/scrub.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit ae6529c35bcc1c65c12131cef2aea63d8e2ea950 Author: Qu Wenruo Date: Wed Mar 29 09:33:21 2017 +0800 btrfs: Wait for in-flight bios before freeing target device for raid56 When raid56 dev-replace is cancelled by running scrub, we will free target device without waiting for in-flight bios, causing the following NULL pointer deference or general protection failure. BUG: unable to handle kernel NULL pointer dereference at 00000000000005e0 IP: generic_make_request_checks+0x4d/0x610 CPU: 1 PID: 11676 Comm: kworker/u4:14 Tainted: G O 4.11.0-rc2 #72 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.10.2-20170228_101828-anatol 04/01/2014 Workqueue: btrfs-endio-raid56 btrfs_endio_raid56_helper [btrfs] task: ffff88002875b4c0 task.stack: ffffc90001334000 RIP: 0010:generic_make_request_checks+0x4d/0x610 Call Trace: ? generic_make_request+0xc7/0x360 generic_make_request+0x24/0x360 ? generic_make_request+0xc7/0x360 submit_bio+0x64/0x120 ? page_in_rbio+0x4d/0x80 [btrfs] ? rbio_orig_end_io+0x80/0x80 [btrfs] finish_rmw+0x3f4/0x540 [btrfs] validate_rbio_for_rmw+0x36/0x40 [btrfs] raid_rmw_end_io+0x7a/0x90 [btrfs] bio_endio+0x56/0x60 end_workqueue_fn+0x3c/0x40 [btrfs] btrfs_scrubparity_helper+0xef/0x620 [btrfs] btrfs_endio_raid56_helper+0xe/0x10 [btrfs] process_one_work+0x2af/0x720 ? process_one_work+0x22b/0x720 worker_thread+0x4b/0x4f0 kthread+0x10f/0x150 ? process_one_work+0x720/0x720 ? kthread_create_on_node+0x40/0x40 ret_from_fork+0x2e/0x40 RIP: generic_make_request_checks+0x4d/0x610 RSP: ffffc90001337bb8 In btrfs_dev_replace_finishing(), we will call btrfs_rm_dev_replace_blocked() to wait bios before destroying the target device when scrub is finished normally. However when dev-replace is aborted, either due to error or cancelled by scrub, we didn't wait for bios, this can lead to use-after-free if there are bios holding the target device. Furthermore, for raid56 scrub, at least 2 places are calling btrfs_map_sblock() without protection of bio_counter, leading to the problem. This patch fixes the problem: 1) Wait for bio_counter before freeing target device when canceling replace 2) When calling btrfs_map_sblock() for raid56, use bio_counter to protect the call. Cc: Liu Bo Signed-off-by: Qu Wenruo Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 2 ++ fs/btrfs/raid56.c | 14 ++++++++++++++ fs/btrfs/scrub.c | 5 +++++ 3 files changed, 21 insertions(+) commit 9a33944bdf075ca93062cde206cb25e62044890e Author: Qu Wenruo Date: Wed Mar 29 09:33:20 2017 +0800 btrfs: scrub: Don't append on-disk pages for raid56 scrub In the following situation, scrub will calculate wrong parity to overwrite the correct one: RAID5 full stripe: Before | Dev 1 | Dev 2 | Dev 3 | | Data stripe 1 | Data stripe 2 | Parity Stripe | --------------------------------------------------- 0 | 0x0000 (Bad) | 0xcdcd | 0x0000 | --------------------------------------------------- 4K | 0xcdcd | 0xcdcd | 0x0000 | ... | 0xcdcd | 0xcdcd | 0x0000 | --------------------------------------------------- 64K After scrubbing dev3 only: | Dev 1 | Dev 2 | Dev 3 | | Data stripe 1 | Data stripe 2 | Parity Stripe | --------------------------------------------------- 0 | 0xcdcd (Good) | 0xcdcd | 0xcdcd (Bad) | --------------------------------------------------- 4K | 0xcdcd | 0xcdcd | 0x0000 | ... | 0xcdcd | 0xcdcd | 0x0000 | --------------------------------------------------- 64K The reason is that after raid56 read rebuild rbio->stripe_pages are all correctly recovered (0xcd for data stripes). However when we check and repair parity in scrub_parity_check_and_repair(), we will append pages in sparity->spages list to rbio->bio_pages[], which contains old on-disk data. And when we submit parity data to disk, we calculate parity using rbio->bio_pages[] first, if rbio->bio_pages[] not found, then fallback to rbio->stripe_pages[]. The patch fix it by not appending pages from sparity->spages. So finish_parity_scrub() will use rbio->stripe_pages[] which is correct. Signed-off-by: Qu Wenruo Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/scrub.c | 4 ---- 1 file changed, 4 deletions(-) commit d51ea5dd222d13dc46c76b2446aa59c4183e3922 Author: Qu Wenruo Date: Mon Mar 13 15:52:09 2017 +0800 btrfs: qgroup: Re-arrange tracepoint timing to co-operate with reserved space tracepoint Newly introduced qgroup reserved space trace points are normally nested into several common qgroup operations. While some other trace points are not well placed to co-operate with them, causing confusing output. This patch re-arrange trace_btrfs_qgroup_release_data() and trace_btrfs_qgroup_free_delayed_ref() trace points so they are triggered before reserved space ones. Signed-off-by: Qu Wenruo Reviewed-by: Jeff Mahoney Signed-off-by: David Sterba fs/btrfs/qgroup.c | 10 +++++----- fs/btrfs/qgroup.h | 6 +----- 2 files changed, 6 insertions(+), 10 deletions(-) commit 3159fe7baef3a50fc332455e252d8a01a18f1ff1 Author: Qu Wenruo Date: Mon Mar 13 15:52:08 2017 +0800 btrfs: qgroup: Add trace point for qgroup reserved space Introduce the following trace points: qgroup_update_reserve qgroup_meta_reserve These trace points are handy to trace qgroup reserve space related problems. Also export btrfs_qgroup structure, as now we directly pass btrfs_qgroup structure to trace points, so that structure needs to be exported. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/qgroup.c | 52 +++++++------------------------------------- fs/btrfs/qgroup.h | 44 +++++++++++++++++++++++++++++++++++++ include/trace/events/btrfs.h | 44 +++++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+), 44 deletions(-) commit 825ad4c96432a3908625dd1a79d6528e969e1a09 Author: David Sterba Date: Tue Mar 28 14:45:22 2017 +0200 btrfs: drop redundant parameters from btrfs_map_sblock All callers pass 0 for mirror_num and 1 for need_raid_map. Signed-off-by: David Sterba fs/btrfs/scrub.c | 6 +++--- fs/btrfs/volumes.c | 6 ++---- fs/btrfs/volumes.h | 3 +-- 3 files changed, 6 insertions(+), 9 deletions(-) commit bcc8e07f9ef1cb3a302bed1d41d27ca72eaacc33 Author: David Sterba Date: Tue Mar 28 14:35:42 2017 +0200 btrfs: sink GFP flags parameter to tree_mod_log_insert_root All (1) callers pass the same value. Signed-off-by: David Sterba fs/btrfs/ctree.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 176ef8f5e662a79471f437839cd9a0c5b95b1e8d Author: David Sterba Date: Tue Mar 28 14:35:01 2017 +0200 btrfs: sink GFP flags parameter to tree_mod_log_insert_move All (1) callers pass the same value. Signed-off-by: David Sterba fs/btrfs/ctree.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit abad60c6013d62f4ddd19667260e2e4a957a9c2a Author: Liu Bo Date: Wed Mar 29 10:54:26 2017 -0700 Btrfs: fix wrong failed mirror_num of read-repair on raid56 In raid56 scenario, after trying parity recovery, we didn't set mirror_num for btrfs_bio with failed mirror_num, hence end_bio_extent_readpage() will report a random mirror_num in dmesg log. Cc: David Sterba Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/raid56.c | 5 +++++ 1 file changed, 5 insertions(+) commit 1bcd7aa17fc1fa29009feec3e0ac4230d0d9f700 Author: Liu Bo Date: Wed Mar 29 10:55:16 2017 -0700 Btrfs: set scrub page's io_error if failing to submit io Scrub repairs data by the unit called scrub_block, which may contain several pages. Scrub always tries to look up a good copy of a whole block, but if there's no such copy, it tries to do repair page by page. If we don't set page's io_error when checking this bad copy, in the last step, we may skip this page when repairing bad copy from good copy. Cc: David Sterba Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/scrub.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 171938e528079deced3226a17dcab12121312a64 Author: David Sterba Date: Tue Mar 28 14:44:21 2017 +0200 btrfs: track exclusive filesystem operation in flags There are several operations, usually started from ioctls, that cannot run concurrently. The status is tracked in mutually_exclusive_operation_running as an atomic_t. We can easily track the status as one of the per-filesystem flag bits with same synchronization guarantees. The conversion replaces: * atomic_xchg(..., 1) -> test_and_set_bit(FLAG, ...) * atomic_set(..., 0) -> clear_bit(FLAG, ...) Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/ctree.h | 7 +++++-- fs/btrfs/dev-replace.c | 5 ++--- fs/btrfs/ioctl.c | 33 +++++++++++++++------------------ fs/btrfs/volumes.c | 6 +++--- 4 files changed, 25 insertions(+), 26 deletions(-) commit 48a89bc4f2ceab87bc858a8eb189636b09c846a7 Author: Goldwyn Rodrigues Date: Mon Mar 27 12:29:57 2017 -0500 btrfs: qgroups: Retry after commit on getting EDQUOT We are facing the same problem with EDQUOT which was experienced with ENOSPC. Not sure if we require a full ticketing system such as ENOSPC, but here is a quick fix, which may be too big a hammer. Quotas are reserved during the start of an operation, incrementing qg->reserved. However, it is written to disk in a commit_transaction which could take as long as commit_interval. In the meantime there could be deletions which are not accounted for because deletions are accounted for only while committed (free_refroot). So, when we get a EDQUOT flush the data to disk and try again. This fixes fstests btrfs/139. Here is a sample script which shows this issue. DEVICE=/dev/vdb MOUNTPOINT=/mnt TESTVOL=$MOUNTPOINT/tmp QUOTA=5 PROG=btrfs DD_BS="4k" DD_COUNT="256" RUN_TIMES=5000 mkfs.btrfs -f $DEVICE mount -o commit=240 $DEVICE $MOUNTPOINT $PROG subvolume create $TESTVOL $PROG quota enable $TESTVOL $PROG qgroup limit ${QUOTA}G $TESTVOL typeset -i DD_RUN_GOOD typeset -i QUOTA function _check_cmd() { if [[ ${?} > 0 ]]; then echo -n "$(date) E: Running previous command" echo ${*} echo "Without sync" $PROG qgroup show -pcreFf ${TESTVOL} echo "With sync" $PROG qgroup show -pcreFf --sync ${TESTVOL} exit 1 fi } while true; do DD_RUN_GOOD=$RUN_TIMES while (( ${DD_RUN_GOOD} != 0 )); do dd if=/dev/zero of=${TESTVOL}/quotatest${DD_RUN_GOOD} bs=${DD_BS} count=${DD_COUNT} _check_cmd "dd if=/dev/zero of=${TESTVOL}/quotatest${DD_RUN_GOOD} bs=${DD_BS} count=${DD_COUNT}" DD_RUN_GOOD=(${DD_RUN_GOOD}-1) done $PROG qgroup show -pcref $TESTVOL echo "----------- Cleanup ---------- " rm $TESTVOL/quotatest* done Signed-off-by: Goldwyn Rodrigues Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/qgroup.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit de47c9d3ff875a3cb1251af35ee8d30afaca78bd Author: Edmund Nadolski Date: Thu Mar 16 10:04:34 2017 -0600 btrfs: replace hardcoded value with SEQ_LAST macro Define the SEQ_LAST macro to replace (u64)-1 in places where said value triggers a special-case ref search behavior. Signed-off-by: Edmund Nadolski Reviewed-by: Jeff Mahoney Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/backref.c | 16 ++++++++-------- fs/btrfs/ctree.h | 2 ++ fs/btrfs/qgroup.c | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) commit f58d88b336c1c83a35d6b2582d45cd87cb2ca406 Author: Edmund Nadolski Date: Thu Mar 16 10:04:33 2017 -0600 btrfs: provide enumeration for __merge_refs mode argument Replace hardcoded numeric values for __merge_refs 'mode' argument with descriptive constants. Signed-off-by: Edmund Nadolski Reviewed-by: Jeff Mahoney Signed-off-by: David Sterba fs/btrfs/backref.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit f486135ebab4fb91366a1e41fb15ed3036ad0cf9 Author: David Sterba Date: Wed Mar 15 16:17:03 2017 +0100 btrfs: remove unused qgroup members from btrfs_trans_handle The members have been effectively unused since "Btrfs: rework qgroup accounting" (fcebe4562dec83b3), there's no substitute for assert_qgroups_uptodate so it's removed as well. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 1 - fs/btrfs/qgroup.c | 12 ------------ fs/btrfs/qgroup.h | 1 - fs/btrfs/tests/btrfs-tests.c | 1 - fs/btrfs/transaction.c | 3 --- fs/btrfs/transaction.h | 2 -- 6 files changed, 20 deletions(-) commit 994a5d2bc758792f1808d7b112990a14182ef847 Author: David Sterba Date: Wed Mar 15 16:39:59 2017 +0100 btrfs: remove local blocksize variable in reada_find_extent The name is misleading and the local variable serves no purpose. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/reada.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 5721b8ad260f6ed15e3c82447981dd7a2f4bdf72 Author: David Sterba Date: Thu Mar 2 19:43:30 2017 +0100 btrfs: remove redundant parameter from reada_start_machine_dev We can read fs_info from dev. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/reada.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 0ceaf282137f261abf634f96b15c535baa6a9c93 Author: David Sterba Date: Thu Mar 2 19:43:30 2017 +0100 btrfs: remove redundant parameter from reada_find_zone We can read fs_info from dev. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/reada.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d48d71aa9977473b6515bb48933617a06cdc7be9 Author: David Sterba Date: Thu Mar 2 19:43:30 2017 +0100 btrfs: remove redundant parameter from btree_readahead_hook We can read fs_info from eb. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 +-- fs/btrfs/disk-io.c | 4 ++-- fs/btrfs/reada.c | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) commit 7ef70b4d9987a78d39c4e40a02093493333e5408 Author: David Sterba Date: Thu Mar 2 18:54:52 2017 +0100 btrfs: preallocate radix tree node for global readahead tree We can preallocate the node so insertion does not have to do that under the lock. The GFP flags for the global radix tree are initialized to GFP_NOFS & ~__GFP_DIRECT_RECLAIM but we can use GFP_KERNEL, because readahead is optional and not on any critical writeout path. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/disk-io.c | 2 +- fs/btrfs/reada.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit cc8385b59e17d489814d54d6a846aba7051fdea5 Author: David Sterba Date: Thu Mar 2 18:54:52 2017 +0100 btrfs: preallocate radix tree node for readahead We can preallocate the node so insertion does not have to do that under the lock. The GFP flags for the per-device radix tree are initialized to GFP_NOFS & ~__GFP_DIRECT_RECLAIM but we can use GFP_KERNEL, same as an allocation above anyway, but also because readahead is optional and not on any critical writeout path. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/reada.c | 7 +++++++ fs/btrfs/volumes.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) commit 261cc2cca0a8c1d817be65434052feb1db1fd961 Author: Hans van Kranenburg Date: Wed Mar 8 18:58:43 2017 +0100 Btrfs: consistent usage of types in balance_args The btrfs_balance_args are only used for the balance ioctl, so use __u instead of __le here for consistency. The __le usage was introduced in bc3094673f22d and dee32d0ac3719 and was probably a result of copy/pasting when the code was written. The usage of __le did not break anything, but it's unnecessary. Also, this change makes the code less confusing for the careful reader. Signed-off-by: Hans van Kranenburg Reviewed-by: David Sterba Signed-off-by: David Sterba include/uapi/linux/btrfs.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4d339d01063a248b3deb3aff94aaf53be6e84e08 Author: Goldwyn Rodrigues Date: Sat Mar 4 12:32:50 2017 -0600 btrfs: No need to check !(flags & MS_RDONLY) twice Code cleanup. The code block is for !(*flags & MS_RDONLY). We don't need to check it again. Signed-off-by: Goldwyn Rodrigues Reviewed-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/super.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1a79c1f2466bb54b329155b2b6910f386dc5aa9d Author: Liu Bo Date: Mon Mar 6 13:49:02 2017 -0800 Btrfs: update comments in cache_save_setup We also don't bother to flush free space cache while with free space tree. Cc: David Sterba Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 539b50d2f68944e7c1184c68da5c535499cbccfe Author: Liu Bo Date: Tue Mar 14 13:34:01 2017 -0700 Btrfs: convert BUG_ON to WARN_ON These two BUG_ON()s would never be true, ensured by callers' logic. Reviewed-by: Qu Wenruo Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/volumes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2b19a1fef7be743505f7af6ae47065a2253d6f4e Author: Liu Bo Date: Tue Mar 14 13:34:00 2017 -0700 Btrfs: helper for ops that requires full stripe This adds a helper to show directly whether ops require full stripe. Reviewed-by: Qu Wenruo Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/volumes.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 6fad823f4998cdff49c443891a0acc9f1bc289f9 Author: Liu Bo Date: Tue Mar 14 13:33:59 2017 -0700 Btrfs: do not add extra mirror when dev_replace target dev is not available With this, we can avoid allocating memory for dev replace copies if the target dev is not available. Reviewed-by: Qu Wenruo Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/volumes.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 73c0f228250ff7fc1d662b64123f2aea9d04ca7e Author: Liu Bo Date: Tue Mar 14 13:33:58 2017 -0700 Btrfs: handle operations for device replace separately Since this part is mostly independent, this moves it to a separate function. Reviewed-by: Qu Wenruo Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/volumes.c | 179 +++++++++++++++++++++++++++++------------------------ 1 file changed, 98 insertions(+), 81 deletions(-) commit 5ab56090b8824c79748931f322f71da1d702fa08 Author: Liu Bo Date: Tue Mar 14 13:33:57 2017 -0700 Btrfs: introduce a function to get extra mirror from replace As the part of getting extra mirror in __btrfs_map_block is independent, this puts it into a separate function. Reviewed-by: Qu Wenruo Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/volumes.c | 161 +++++++++++++++++++++++++++++------------------------ 1 file changed, 89 insertions(+), 72 deletions(-) commit 0b3d4cd371edb6c4ef47f3fb0cb55bdd9aa471c1 Author: Liu Bo Date: Tue Mar 14 13:33:56 2017 -0700 Btrfs: separate DISCARD from __btrfs_map_block Since DISCARD is not as important as an operation like write, we don't copy it to target device during replace, and it makes __btrfs_map_block less complex. Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/volumes.c | 289 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 175 insertions(+), 114 deletions(-) commit 592d92eeab3770b2525d2fc5589b205c9f8c33e3 Author: Liu Bo Date: Tue Mar 14 13:33:55 2017 -0700 Btrfs: create a helper for getting chunk map We have similar code here and there, this merges them into a helper. Signed-off-by: Liu Bo Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 3 +- fs/btrfs/volumes.c | 163 +++++++++++++++++---------------------------------- fs/btrfs/volumes.h | 2 +- 3 files changed, 57 insertions(+), 111 deletions(-) commit 09ed2f165cb3449237dec842b3564044e12d22cb Author: Liu Bo Date: Fri Mar 10 11:09:48 2017 -0800 Btrfs: add file item tracepoints While debugging truncate problems, I found that these tracepoints could help us quickly know what went wrong. Two sets of tracepoints are created to track regular/prealloc file item and inline file item respectively, I put inline as a separate one since what inline file items cares about are way less than the regular one. This adds four tracepoints: - btrfs_get_extent_show_fi_regular - btrfs_get_extent_show_fi_inline - btrfs_truncate_show_fi_regular - btrfs_truncate_show_fi_inline Cc: David Sterba Signed-off-by: Liu Bo Reviewed-by: David Sterba [ formatting adjustments ] Signed-off-by: David Sterba fs/btrfs/inode.c | 15 +++++ include/trace/events/btrfs.h | 139 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+) commit dec95574f4e6545c701420b950278dc6f55d0368 Author: Elena Reshetova Date: Fri Mar 3 10:55:26 2017 +0200 btrfs: convert btrfs_raid_bio.refs from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David Sterba fs/btrfs/raid56.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 99f4cdb16f80e1b30392b479d852036f87394b20 Author: Elena Reshetova Date: Fri Mar 3 10:55:25 2017 +0200 btrfs: convert scrub_ctx.refs from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David Sterba fs/btrfs/scrub.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 78a764504d1e11411bec0e068c5d9e0a417aff08 Author: Elena Reshetova Date: Fri Mar 3 10:55:24 2017 +0200 btrfs: convert scrub_parity.refs from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David Sterba fs/btrfs/scrub.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 186debd6ede29da9d51cffdb93cadee66e4e1e23 Author: Elena Reshetova Date: Fri Mar 3 10:55:23 2017 +0200 btrfs: convert scrub_block.refs from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David Sterba fs/btrfs/scrub.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6f615018b35fb5ea1ce49673079fc637a0b6be70 Author: Elena Reshetova Date: Fri Mar 3 10:55:21 2017 +0200 btrfs: convert scrub_recover.refs from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David Sterba fs/btrfs/scrub.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a50299ae7cc4ba7268749e144e7c16321c25e3b3 Author: Elena Reshetova Date: Fri Mar 3 10:55:20 2017 +0200 btrfs: convert compressed_bio.pending_bios from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David Sterba fs/btrfs/compression.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit b7ac31b7b2ebd735b7b67c85711ef6d16648051a Author: Elena Reshetova Date: Fri Mar 3 10:55:19 2017 +0200 btrfs: convert extent_state.refs from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David Sterba fs/btrfs/extent_io.c | 14 +++++++------- fs/btrfs/extent_io.h | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) commit 0700cea7c8b387c8c6bc4de79b197baa0b3fc4a3 Author: Elena Reshetova Date: Fri Mar 3 10:55:18 2017 +0200 btrfs: convert btrfs_root.refs from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/disk-io.c | 2 +- fs/btrfs/disk-io.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 089e77e10d7e44a007101cf7323dc7bda66172f4 Author: Elena Reshetova Date: Fri Mar 3 10:55:17 2017 +0200 btrfs: convert btrfs_delayed_item.refs from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 18 +++++++++--------- fs/btrfs/delayed-inode.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) commit 6de5f18e7b0da0cdd265eda047a0bc4f48260bcb Author: Elena Reshetova Date: Fri Mar 3 10:55:16 2017 +0200 btrfs: convert btrfs_delayed_node.refs from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 28 ++++++++++++++-------------- fs/btrfs/delayed-inode.h | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) commit 6df8cdf5bda221f268ac23940bce589ad176993d Author: Elena Reshetova Date: Fri Mar 3 10:55:15 2017 +0200 btrfs: convert btrfs_delayed_ref_node.refs from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David Sterba fs/btrfs/backref.c | 2 +- fs/btrfs/delayed-ref.c | 8 ++++---- fs/btrfs/delayed-ref.h | 8 +++++--- fs/btrfs/disk-io.c | 2 +- fs/btrfs/extent-tree.c | 6 +++--- 5 files changed, 14 insertions(+), 12 deletions(-) commit 1e4f4714d59e3fdcde29ee12d40d2e96875a026f Author: Elena Reshetova Date: Fri Mar 3 10:55:14 2017 +0200 btrfs: convert btrfs_caching_control.count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 ++- fs/btrfs/extent-tree.c | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) commit e76edab7f059bc1047c1865141e2709d70e74852 Author: Elena Reshetova Date: Fri Mar 3 10:55:13 2017 +0200 btrfs: convert btrfs_ordered_extent.refs from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David Sterba fs/btrfs/ordered-data.c | 18 +++++++++--------- fs/btrfs/ordered-data.h | 2 +- include/trace/events/btrfs.h | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) commit 490b54d6fb75f6ffd0471ec58bb38a992e2b40cd Author: Elena Reshetova Date: Fri Mar 3 10:55:12 2017 +0200 btrfs: convert extent_map.refs from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David Sterba fs/btrfs/extent_io.c | 4 ++-- fs/btrfs/extent_map.c | 10 +++++----- fs/btrfs/extent_map.h | 3 ++- fs/btrfs/tree-log.c | 2 +- fs/btrfs/volumes.c | 2 +- include/trace/events/btrfs.h | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) commit 9b64f57ddf8673d29fafb3405d4aa1e93f5a4cd7 Author: Elena Reshetova Date: Fri Mar 3 10:55:11 2017 +0200 btrfs: convert btrfs_transaction.use_count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David Sterba fs/btrfs/disk-io.c | 2 +- fs/btrfs/extent-tree.c | 2 +- fs/btrfs/ordered-data.c | 2 +- fs/btrfs/transaction.c | 20 ++++++++++---------- fs/btrfs/transaction.h | 4 +++- 5 files changed, 16 insertions(+), 14 deletions(-) commit 140475ae4ad10d140bb69572499b1ff87367e807 Author: Elena Reshetova Date: Fri Mar 3 10:55:10 2017 +0200 btrfs: convert btrfs_bio.refs from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: David Sterba fs/btrfs/volumes.c | 8 ++++---- fs/btrfs/volumes.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit f95fda8751b7b243c810805d1deaae502716d8fb Author: Liu Bo Date: Thu Mar 2 18:41:19 2017 -0800 Btrfs: remove ASSERT in btrfs_truncate_inode_items After 76b42abbf748 ("Btrfs: fix data loss after truncate when using the no-holes feature"), For either NO_HOLES or inline extents, we've set last_size to newsize to avoid data loss after remount or inode got evicted and read again, thus, we don't need this check anymore. Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/inode.c | 7 ------- 1 file changed, 7 deletions(-) commit 14506127979a5a3d0c5d9b4cc76ce9d4ec23b717 Author: Adam Borowski Date: Tue Mar 7 23:34:44 2017 +0100 btrfs: fix a bogus warning when converting only data or metadata If your filesystem has, eg, data:raid0 metadata:raid1, and you run "btrfs balance -dconvert=raid1", the meta.target field will be uninitialized. That's otherwise ok, as it's unused except for this warning. Thus, let's use the existing set of raid levels for the comparison. As a side effect, non-convert balances will now nag about data>metadata. Signed-off-by: Adam Borowski Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/volumes.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit aeea4c10a88c9ec405072cecb18939b0a9c876f6 Author: Dmitry V. Levin Date: Thu Mar 2 22:42:38 2017 +0300 MAINTAINERS: add btrfs file entries for include directories Add file entries for btrfs header files. Signed-off-by: Dmitry V. Levin Acked-by: David Sterba Signed-off-by: David Sterba MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 18125dc003bd4fbb95c37d5be796f3536df445df Author: Martin Karamihov Date: Mon Apr 17 20:00:25 2017 +0300 staging: rtl8192u: fix incorrect type in assignment in ieee80211_tx.c This patch fixes the following sparse warning: ieee80211_tx.c:174:36: incorrect type in assignment (different base types) ieee80211_tx.c:174:36: expected unsigned short [unsigned] [short] [usertype] ieee80211_tx.c:174:36: got restricted __be16 [usertype] by adding left side cast to __be16. Signed-off-by: Martin Karamihov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df93c720e1910ba154b025288dc6945a0b0aa729 Author: Aishwarya Pant Date: Sat Apr 15 18:08:39 2017 +0530 staging: rtl8188eu: fix sparse signedness warnings in rtw_generate_ie Changed the type of wpa_ie_len from (int *) to (unsigned int *) in the function rtw_get_wpa_ie(..) to suppress signedness mismatch warnings in rtw_generate_ie of the type- drivers/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60: warning: incorrect type in argument 2 (different signedness) drivers/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60: expected int *wpa_ie_len drivers/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60: got unsigned int * Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 2 +- drivers/staging/rtl8188eu/include/ieee80211.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8321643cccd1fde463f890cddb853209c08db7d7 Author: Aishwarya Pant Date: Sat Apr 15 18:08:10 2017 +0530 staging: rtl8188eu: fix sparse signedness warnings in rtw_set_ie Changed the type of sz from (int) to (unsigned int) to suppress signedness mismatch warnings of the type- drivers/staging/rtl8188eu//core/rtw_ieee80211.c:258:97: warning: incorrect type in argument 5 (different signedness) drivers/staging/rtl8188eu//core/rtw_ieee80211.c:258:97: expected unsigned int [usertype] *frlen drivers/staging/rtl8188eu//core/rtw_ieee80211.c:258:97: got int * Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit af27bea4627358815b773fa2c31dabad62457308 Author: Aishwarya Pant Date: Sat Apr 15 18:07:42 2017 +0530 staging: rtl8188eu: fix sparse signedness warnings in rtw_get_ie Changed the type of len from (int *) to (unsigned int *) in the function rtw_get_ie(..) and wherever this function is called to suppress signedness mismatch warnings of the type- drivers/staging/rtl8188eu//core/rtw_ap.c:78:60: warning: incorrect type in argument 3 (different signedness) drivers/staging/rtl8188eu//core/rtw_ap.c:78:60: expected int *len drivers/staging/rtl8188eu//core/rtw_ap.c:78:60: got unsigned int * Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 2 +- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 10 +++++----- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 14 +++++++------- drivers/staging/rtl8188eu/core/rtw_xmit.c | 3 +-- drivers/staging/rtl8188eu/include/ieee80211.h | 4 ++-- 5 files changed, 16 insertions(+), 17 deletions(-) commit d9c7dd5db1d0f6f212072625781dddbbe6e253d7 Author: Colin Ian King Date: Thu Apr 13 16:46:36 2017 +0100 staging: rtl8723bs: clean up identical code on an if statement The two different paths for an if statement are identical and hence we can just replace it with the single statement. Detected by CoverityScan, CID#1428443 ("Identical code for different branches") Signed-off-by: Colin Ian King Reviewed-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit ff8d351d71f3261c964ce90d43ce6907e79e5fc4 Author: Colin Ian King Date: Thu Apr 13 15:13:46 2017 +0100 staging: rtl8723bs: remove redundant comparisons of unsigned ints with >= 0 The comparison of mode >= 0 is redundant as mode is a u32 and this is always true. Remove this redundant code. Detected with CoverityScan ("Unsigned compared against 0") Signed-off-by: Colin Ian King Reviewed-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_debug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit baa7a586b5b4195268d53c5a69bbcd7db4ce19f2 Author: Kevin Wern Date: Tue Apr 11 18:17:02 2017 -0400 staging: media/platform/bcm2835: remove gstreamer workaround Gstreamer's v4l2src reacted poorly to certain outputs from the bcm2835 video driver's ioctl ops function vidioc_enum_framesizes, so a workaround was created that could be activated by user input. This workaround would replace the driver's ioctl ops struct with another, similar struct--only with no function pointed to by vidioc_enum_framesizes. With no response, gstreamer would attempt to continue with some default settings that happened to work better. However, this bug has been fixed in gstreamer since 2014, so we shouldn't include this workaround in the stable version of the driver. Signed-off-by: Kevin Wern Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/TODO | 5 -- .../vc04_services/bcm2835-camera/bcm2835-camera.c | 60 ---------------------- 2 files changed, 65 deletions(-) commit 7c1c43615d784833f84d27e26d2fd046dea5f435 Author: Tobin C. Harding Date: Tue Apr 18 10:35:42 2017 +1000 staging: ks7010: fix checkpatch SPLIT_STRING Checkpatch emits WARNING: quoted string split across lines. Concatenate string onto single line. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f1e79f4b96c1fa21dfbfda48d511cc88c84e875f Author: Tobin C. Harding Date: Tue Apr 18 10:35:41 2017 +1000 staging: ks7010: refactor SDIO read/write helpers Driver SDIO code uses helper functions to do IO to the SDIO device. Current helpers handle IO of a single byte as well as multi-byte. Driver predominately uses single byte IO. If the common case is made simple it simplifies the whole driver. The common case can be made simple by splitting the multi-byte and single byte calls into separate functions, i.e 4 functions in total, read single byte, read multi-byte, write single byte, write multi-byte. Also, we need to handle the debug code. Currently debug calls after read/write fail access the IO buffer. This buffer, at best, does not hold useful data on the error path, at worst is uninitialized and holds garbage. Split read/write helper functions into two functions each, one for single byte IO and one for multi-byte IO. Fix all call sites. Do not change the program logic. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 187 +++++++++++++++-------------------- 1 file changed, 81 insertions(+), 106 deletions(-) commit a9d58d9ad8b48c9363cb157f41e92ba144462990 Author: Tobin C. Harding Date: Tue Apr 18 10:35:40 2017 +1000 staging: ks7010: fix checkpatch LINE_SPACING Checkpatch emits CHECK: Please don't use multiple blank lines. Remove multiple blank lines. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 1 - 1 file changed, 1 deletion(-) commit 132f541532efb9d4d716eaa719ecfc9eb2cb95fc Author: Tobin C. Harding Date: Tue Apr 18 10:35:39 2017 +1000 staging: ks7010: fix checkpatch SPACE_BEFORE_TAB Checkpatch emits WARNING: please, no space before tabs. Remove space before tabs. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0dd30a74b9dd69858721da0c695ccc293fffe973 Author: Tobin C. Harding Date: Tue Apr 18 10:35:38 2017 +1000 staging: ks7010: remove err_ from non-error path label goto label includes 'err_' suffix but is executed on non-error paths. Remove err_ suffix from goto label. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e61e73d71b48911009fb5bbd5f85ff579c4a9a79 Author: Tobin C. Harding Date: Tue Apr 18 10:35:37 2017 +1000 staging: ks7010: clean up SDIO source comments SDIO code currently has a number of unneeded comments. Following kernel coding style we do not need extraneous comments, especially on code where it is clear what is being done. Spelling typos can be fixed. Remove unnecessary comments, fix typos in comments. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) commit 3dfb942f0370bac72eb73568514da2c48fb8905f Author: Tobin C. Harding Date: Tue Apr 18 10:35:36 2017 +1000 staging: ks7010: add struct comment to ks_sdio_card ks_sdio_card structure description does not have a kernel doc format comment. Add kernel doc format comment to struct ks_sdio_card. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 18bd6dd1f849105b0aca7666d8eb3528b8cd8a8e Author: Tobin C. Harding Date: Tue Apr 18 10:35:35 2017 +1000 staging: ks7010: move hw info into dev private data Currently driver uses a hardware information struct description to group some SDIO related functionality (work, work queue, sdio private data pointer). This structure is then embedded in the device private data structure. Having nested structures described in different header files means that to view the device private data programmers must open two header files. This structure could be embedded anonymously in the device private data and achieve the same result (grouping of function specific to SDIO) without the need to open multiple headers. However, the SDIO private data structure already has various different data and pointers, adding the embedded structure adds little extra meaning and lengthens all the dereferences throughout the driver, often meaning addition line breaks and braces. We can increase readability and reduce code complexity by moving the hardware information data and pointers to directly be within the device private data structure description. While preparing for this refactoring it was noted that the identifier currently used for the delayed work is 'rw_wq', this is confusing since the 'wq' suffix typically means 'work queue'. This identifier would be more meaningful if it used the suffix 'dwork' as does the declaration of queue_delayed_work() (include/linux/workqueue.h). The identifier for the work queue is currently 'ks7010sdio_wq'. This identifier can be shortened without loss of meaning because there is only one work queue within the driver. Identifier 'wq' is typical within in-tree driver code and aptly describes the pointer. Current pointer to the SDIO private data is identified by 'sdio_card', this is sufficiently meaningful from within the hw_info structure but once the hw_info_t structure is removed the pointer would be better to have a prefix appended to it to retain the prior level of meaning. Move members from struct hw_info_t to struct ks_wlan_private. Rename identifiers; struct delayed_work pointer 'rw_wq' to 'rw_dwork'. struct workqueue_struct pointer 'ks7010sdio_wq' to 'wq'. struct ks_sdio_card pointer 'sdio_card' to 'ks_sdio_card'. Remove structure description hw_info_t. Fix init/destroy calls. Fix all call sites, SDIO private data access calls, and queuing calls. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 70 +++++++++++++++--------------------- drivers/staging/ks7010/ks7010_sdio.h | 6 ---- drivers/staging/ks7010/ks_hostif.c | 6 ++-- drivers/staging/ks7010/ks_wlan.h | 5 ++- 4 files changed, 34 insertions(+), 53 deletions(-) commit 321dabdc746d995a962d02dd81ecf23ddc3b3169 Author: Tobin C. Harding Date: Tue Apr 18 10:35:34 2017 +1000 staging: ks7010: move tasklet_struct to ks_wlan_private Currently a pointer to the tasklet_struct used for bottom half processing on the receive path is within the hw_info_t structure. This structure is then embedded in the device private data structure. Having the tasklet_struct nested does not add meaning to the device private data, device private data already (and typically) has various data relating to the device, there is no real need to separate the tasklet_struct to a SDIO specific structure. While not adding allot of extra meaning having the nested structure means the programmer must open two header files to read the description of the device private data, the code would be easier to read if the device private data struct description was not spread over two files. Move tasklet_struct out of sdio header file and into the device private data structure description. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 10 ++++------ drivers/staging/ks7010/ks7010_sdio.h | 1 - drivers/staging/ks7010/ks_wlan.h | 1 + 3 files changed, 5 insertions(+), 7 deletions(-) commit 07e483c14bd5d149b1c214562654798a5be104b0 Author: Tobin C. Harding Date: Tue Apr 18 10:35:33 2017 +1000 staging: ks7010: rename wakeup work struct struct work_struct uses identifier ks_wlan_wakeup_task, this is confusing because the 'task' suffix implies that this is a tasklet_struct instead of a work struct. Suffix 'work' would be more clear. The code would be easier to read if it followed the principle of least surprise and used the 'work' suffix for a work_struct identifier. Rename work_struct structure 'ks_wlan_wakeup_task' to 'wakeup_work'. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 14 +++++++------- drivers/staging/ks7010/ks_wlan.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) commit b9ca8bb4e4c1dbe2f064f1ffe1cb771538d2a5ff Author: Tobin C. Harding Date: Tue Apr 18 10:35:32 2017 +1000 staging: ks7010: clean up SDIO header comments SDIO header file does not use kernel doc format struct comments. Adding them aids readability and enables documentation to be built from the source code. Other comments may be tidied up as we do this. Add kernel format struct comments. Tidy up comments. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.h | 46 ++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 12 deletions(-) commit 055da4f9b95dd2a50c653b5a4559b9186081fb75 Author: Tobin C. Harding Date: Tue Apr 18 10:35:31 2017 +1000 staging: ks7010: fix complete_handler complete_handler() takes void * types as parameters. void * parameters are then cast to struct types. Call sites for this function either pass in NULL or pointers to the struct types cast to void *. This casting is unnecessary and can be removed. Struct tx_device_buffer (which contains a pointer member to the complete_handler() function) has as member 'ks_wlan_priv *priv' this is unnecessary, we always have a pointer to this struct there is no need to store it here. The complete_handler can be more clearly defined by using struct pointer types instead of void * types. The code is currently unnecessarily complex, storing and passing extraneous pointer parameters. Remove unnecessary parameters, unnecessary casting to/from 'void *'. Fix all call sites involving complete_handler(). Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 21 +++++++++++---------- drivers/staging/ks7010/ks7010_sdio.h | 6 +++--- drivers/staging/ks7010/ks_hostif.c | 35 ++++++++++++++++------------------- drivers/staging/ks7010/ks_hostif.h | 7 ++++--- drivers/staging/ks7010/ks_wlan_net.c | 12 ++++-------- 5 files changed, 38 insertions(+), 43 deletions(-) commit 68711cebcbb4dd7f5c05245715eefa4f4d4be760 Author: Tobin C. Harding Date: Tue Apr 18 10:35:30 2017 +1000 staging: ks7010: replace defines with enum types Header has multiple constants defined using preprocessor directive. In the cases where these are an integer progression an enumeration type can be used. Doing so adds documentation to the code and makes the usage explicit. Maintain original constant value, this value is returned by the device. Replace (integer progression) preprocessor constants with enumeration type. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit bfee6a231903b1f1f8d72cc638be6862d7099377 Author: Tobin C. Harding Date: Tue Apr 18 10:35:29 2017 +1000 staging: ks7010: create reg_status_type enum type SDIO header currently defines unused constants READ_STATUS_BUSY and WRITE_STATUS_IDLE. There are reciprocal constants that are used READ_STATUS_IDLE and WRITE_STATUS_BUSY. We can roll these into a single enumeration type and remove the two that are unused. Add enumeration type containing IDLE/BUSY pair that are currently used within the SDIO source. Change source to use new enum types. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 6 +++--- drivers/staging/ks7010/ks7010_sdio.h | 14 ++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) commit 4330887f2e7406b671549db58f3cf7d76baa52cd Author: Darryl T. Agostinelli Date: Wed Apr 12 20:36:15 2017 -0500 staging: greybus: uart.c: Remove include linux/serial.h $ make includecheck | grep staging ./drivers/staging/greybus/uart.c: linux/serial.h is included more than once. Signed-off-by: Darryl T. Agostinelli Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 1 - 1 file changed, 1 deletion(-) commit 6163904e0102f6bf06077893e3930aa08f6e62f5 Author: Darryl T. Agostinelli Date: Wed Apr 12 20:36:14 2017 -0500 staging: greybus: light.c: Remove include linux/version.h Fixes: $ make versioncheck | grep staging ./drivers/staging/greybus/light.c: 15 linux/version.h not needed. Signed-off-by: Darryl T. Agostinelli Reviewed-by: Rui Miguel Silva Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 1 - 1 file changed, 1 deletion(-) commit 54094ee81262b4b9700e786e88fe5bda4edb51fc Author: Skanda Guruanand Date: Sat Apr 15 17:48:59 2017 -0700 staging: lustre: Fix sparse endianness warnings cast to restricted __le64 and __le32 The struct lu_dirpage elements in lustre_idl.h file are modified to __le64 and __le32 types since the elements are always converted from litte endian to processor native format in mdc_request.c file. Following warnings are removed by this fix. drivers/staging/lustre/lustre/mdc/mdc_request.c:958:42: warning: cast to restricted __le64 drivers/staging/lustre/lustre/mdc/mdc_request.c:959:42: warning: cast to restricted __le64 drivers/staging/lustre/lustre/mdc/mdc_request.c:962:42: warning: cast to restricted __le64 drivers/staging/lustre/lustre/mdc/mdc_request.c:963:42: warning: cast to restricted __le64 drivers/staging/lustre/lustre/mdc/mdc_request.c:985:50: warning: cast to restricted __le32 drivers/staging/lustre/lustre/mdc/mdc_request.c:1193:24: warning: cast to restricted __le64 drivers/staging/lustre/lustre/mdc/mdc_request.c:1328:25: warning: cast to restricted __le64 drivers/staging/lustre/lustre/mdc/mdc_request.c:1329:23: warning: cast to restricted __le64 drivers/staging/lustre/lustre/mdc/mdc_request.c:1332:25: warning: cast to restricted __le64 drivers/staging/lustre/lustre/mdc/mdc_request.c:1333:23: warning: cast to restricted __le64 Signed-off-by: Skanda Guruanand Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 983ca9b321a99c30f81d519b05837245f3180299 Author: Craig Inches Date: Thu Apr 13 10:24:41 2017 +0100 Staging: lustre cleanup macros in libcfs_private.h This resolves a checkpatch warning that "Single statement macros should not use a do {} while (0) loop" by removing the loop and adjusting line length accordingly. Signed-off-by: Craig Inches Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman .../lustre/include/linux/libcfs/libcfs_private.h | 51 +++++++--------------- 1 file changed, 15 insertions(+), 36 deletions(-) commit 2e2fd6be427547143356a3f0faf1e5247c86c6a0 Author: Alexandre Bailon Date: Sun Mar 26 18:58:23 2017 +0200 staging: greybus: make cport_quiesce() method optional The cport_quiesce() method is mandatory in the case of the es2 Greybus hd controller to shutdown the cports on the es2 controller. In order to add support of another controller which may not need to shutdown its cports, make the cport_quiesce() optional, and check if the controller implement it before to use it. Signed-off-by: Alexandre Bailon Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/connection.c | 3 +++ 1 file changed, 3 insertions(+) commit 4064771da8d10118075abdcd4b1c70144ac975b7 Author: Paul Gortmaker Date: Wed Apr 12 21:57:55 2017 -0400 staging/media: make atomisp vlv2_plat_clock explicitly non-modular The Makefile / Kconfig currently controlling compilation of this code is: clock/Makefile:obj-$(CONFIG_INTEL_ATOMISP) += vlv2_plat_clock.o atomisp/Kconfig:menuconfig INTEL_ATOMISP atomisp/Kconfig: bool "Enable support to Intel MIPI camera drivers" ...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 was already not in use by this 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: Mauro Carvalho Chehab Cc: Greg Kroah-Hartman Cc: Alan Cox Cc: linux-media@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Paul Gortmaker Signed-off-by: Greg Kroah-Hartman .../media/atomisp/platform/clock/vlv2_plat_clock.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit cf3112e91076453cd90af3b9e2a292331c3c21b2 Author: Greg Kroah-Hartman Date: Tue Apr 18 13:20:22 2017 +0200 staging: atomisp: remove odd 'list' file This removes a strange 'list' file in drivers/staging/media/atomisp/pci/atomisp2/ that was not being used for anything. Cc: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/list | 182 ------------------------ 1 file changed, 182 deletions(-) commit e6642ef052d8b183c2d34d765603f79e6985ae29 Author: Greg Kroah-Hartman Date: Tue Apr 18 13:19:16 2017 +0200 staging: atomisp: fix build breakage from files going away Previous patches deleted files, but the Makefile still referenced their .o files. Fix this up by removing them in the Makefile. Reported-by: Stephen Rothwell Cc: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/Makefile | 2 -- 1 file changed, 2 deletions(-) commit 418d59ef229290a1da80aa25222f9da2ac2fa6a5 Author: Dan Carpenter Date: Sat Apr 15 22:21:42 2017 +0300 drm: atmel-hlcdc: Uninitialized return in atmel_hlcdc_create_outputs() It's not possible for endpoint to be zero so the test doesn't work. If we break on the first iteration through the loop then endpoint is 1 and "ret" is uninitialized. Fixes: ebc944613567 ("drm: convert drivers to use drm_of_find_panel_or_bridge") Signed-off-by: Dan Carpenter Signed-off-by: Boris Brezillon Link: http://patchwork.freedesktop.org/patch/msgid/20170415192142.GA6416@mwanda drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c821ee6d2bb4cfc9991bf285f53103cde9d3593a Author: Dan Carpenter Date: Thu Apr 13 22:48:28 2017 +0300 drm/i915/gvt: fix a bounds check in ring_id_to_context_switch_event() There are two bugs here. The && should be || and the > is off by one so it should be >= ARRAY_SIZE(). Fixes: 8453d674ae7e ("drm/i915/gvt: vGPU execlist virtualization") Signed-off-by: Dan Carpenter Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/execlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6807c84652b0b7e2e198e50a9ad47ef41b236e59 Author: Ingo Molnar Date: Tue Apr 18 11:08:12 2017 +0200 x86: Enable KASLR by default KASLR is mature (and important) enough to be enabled by default on x86. Also enable it by default in the defconfigs. Acked-by: Thomas Gleixner Cc: Baoquan He Cc: Borislav Petkov Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Yinghai Lu Cc: dan.j.williams@intel.com Cc: dave.jiang@intel.com Cc: dyoung@redhat.com Cc: "H. Peter Anvin" Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/Kconfig | 6 +++--- arch/x86/configs/i386_defconfig | 2 ++ arch/x86/configs/x86_64_defconfig | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) commit bbf67e450a5dc2a595e1e7a67b4869f1a7f5a338 Author: Matthias Kaehlcke Date: Mon Apr 17 15:59:52 2017 -0700 nl80211: Fix enum type of variable in nl80211_put_sta_rate() rate_flg is of type 'enum nl80211_attrs', however it is assigned with 'enum nl80211_rate_info' values. Change the type of rate_flg accordingly. Signed-off-by: Matthias Kaehlcke Signed-off-by: Johannes Berg net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4ac6f2e53e568a77a2eb3710efd99ca08634c0a Author: Matthias Kaehlcke Date: Mon Apr 17 13:59:53 2017 -0700 mac80211: ibss: Fix channel type enum in ieee80211_sta_join_ibss() cfg80211_chandef_create() expects an 'enum nl80211_channel_type' as channel type however in ieee80211_sta_join_ibss() NL80211_CHAN_WIDTH_20_NOHT is passed in two occasions, which is of the enum type 'nl80211_chan_width'. Change the value to NL80211_CHAN_NO_HT (20 MHz, non-HT channel) of the channel type enum. Signed-off-by: Matthias Kaehlcke Signed-off-by: Johannes Berg net/mac80211/ibss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa1702dd162f420bf85ecef0c77686ef0dbc1496 Author: Matthias Kaehlcke Date: Thu Apr 13 10:05:04 2017 -0700 cfg80211: Fix array-bounds warning in fragment copy __ieee80211_amsdu_copy_frag intentionally initializes a pointer to array[-1] to increment it later to valid values. clang rightfully generates an array-bounds warning on the initialization statement. Initialize the pointer to array[0] and change the algorithm from increment before to increment after consume. Signed-off-by: Matthias Kaehlcke Signed-off-by: Johannes Berg net/wireless/util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f64331d58045b05e5af581284884d5df9b26c031 Author: Johannes Berg Date: Thu Apr 13 13:28:18 2017 +0200 mac80211: keep a separate list of monitor interfaces that are up In addition to keeping monitor interfaces on the regular list of interfaces, keep those that are up and not in cooked mode on a separate list. This saves having to iterate all interfaces when delivering to monitor interfaces. Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 3 +++ net/mac80211/iface.c | 19 +++++++++++++++++-- net/mac80211/main.c | 1 + net/mac80211/rx.c | 11 +---------- 4 files changed, 22 insertions(+), 12 deletions(-) commit f51b17c8d90f85456579c3192ab59ee031835634 Author: Baoquan He Date: Mon Apr 17 21:34:56 2017 +0800 boot/param: Move next_arg() function to lib/cmdline.c for later reuse next_arg() will be used to parse boot parameters in the x86/boot/compressed code, so move it to lib/cmdline.c for better code reuse. No change in functionality. Signed-off-by: Baoquan He Cc: Andrew Morton Cc: Gustavo Padovan Cc: Jens Axboe Cc: Jessica Yu Cc: Johannes Berg Cc: Josh Triplett Cc: Larry Finger Cc: Linus Torvalds Cc: Niklas Söderlund Cc: Peter Zijlstra Cc: Petr Mladek Cc: Rasmus Villemoes Cc: Thomas Gleixner Cc: dan.j.williams@intel.com Cc: dave.jiang@intel.com Cc: dyoung@redhat.com Cc: keescook@chromium.org Cc: zijun_hu Link: http://lkml.kernel.org/r/1492436099-4017-2-git-send-email-bhe@redhat.com Signed-off-by: Ingo Molnar include/linux/kernel.h | 1 + kernel/params.c | 52 --------------------------------------------- lib/cmdline.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 52 deletions(-) commit e335bb51cc15e80ac180701a0d335ef1c050828e Author: Josh Poimboeuf Date: Mon Apr 17 08:44:00 2017 -0500 x86/unwind: Ensure stack pointer is aligned With frame pointers disabled, on some older versions of GCC (like 4.8.3), it's possible for the stack pointer to get aligned at a half-word boundary: 00000000000004d0 : 4d0: 41 57 push %r15 4d2: 41 56 push %r14 4d4: 41 55 push %r13 4d6: 41 54 push %r12 4d8: 55 push %rbp 4d9: 53 push %rbx 4da: 48 83 ec 24 sub $0x24,%rsp In such a case, the unwinder ends up reading the entire stack at the wrong alignment. Then the last read goes past the end of the stack, hitting the stack guard page: BUG: stack guard page was hit at ffffc900217c4000 (stack is ffffc900217c0000..ffffc900217c3fff) kernel stack overflow (page fault): 0000 [#1] SMP ... Fix it by ensuring the stack pointer is properly aligned before unwinding. Reported-by: Jirka Hladky Signed-off-by: Josh Poimboeuf Acked-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Fixes: 7c7900f89770 ("x86/unwind: Add new unwind interface and implementations") Link: http://lkml.kernel.org/r/cff33847cc9b02fa548625aa23268ac574460d8d.1492436590.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/dumpstack.c | 2 +- arch/x86/kernel/unwind_guess.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 415601b1917be0e3b53306d410be659b429241a9 Author: Borislav Petkov Date: Tue Apr 18 09:33:28 2017 +0200 x86/mce: Update notifier priority check Update the check which enforces the registration of MCE decoder notifier callbacks with valid priority only, to include mcelog's priority. Reported-by: kernel test robot Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephen Rothwell Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Cc: lkp@01.org Link: http://lkml.kernel.org/r/20170418073820.i6kl5tggcntwlisa@pd.tnic Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96b08fd6080efdfa8f6125cffc6742a2235d92f1 Author: Arend Van Spriel Date: Thu Apr 13 13:06:27 2017 +0100 nl80211: add request id in scheduled scan event messages For multi-scheduled scan support in subsequent patch a request id will be added. This patch add this request id to the scheduled scan event messages. For now the request id will always be zero. With multi-scheduled scan its value will inform user-space to which scan the event relates. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Johannes Berg include/net/cfg80211.h | 2 ++ net/wireless/nl80211.c | 23 +++++++++++------------ net/wireless/nl80211.h | 3 +-- net/wireless/scan.c | 5 ++--- 4 files changed, 16 insertions(+), 17 deletions(-) commit d074e0b84ac577655d7f4d3cd9b20065db1def30 Merge: 1f242a3 87d0e1a Author: Kalle Valo Date: Tue Apr 18 09:41:45 2017 +0300 Merge tag 'iwlwifi-next-for-kalle-2017-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Patches intended for v4.12: * Some small fixes here and there; * The usual cleanups and small improvements; * Work to support A000 devices continues; * New FW API version; * Some debugging improvements; commit 699896278e2d8e911406ba92c1207dbfe7d6055f Author: Mauro Carvalho Chehab Date: Mon Apr 17 20:08:44 2017 -0700 Input: xpad - don't use literal blocks inside footnotes Unfortunately, Sphinx (or LaTeX) can't handle literal blocks inside footnotes. So, just use normal text for the two literal code-blocks that documents the output of /sys/kernel/debug/usb/devices for xpad devices. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/devices/xpad.rst | 51 ++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 26 deletions(-) commit f56408c96077ff21a88deff8e173583becb7b375 Author: Mauro Carvalho Chehab Date: Mon Apr 17 20:07:42 2017 -0700 Input: xpad - note that usb/devices is now at /sys/kernel/debug/ The /proc/bus/usb/devices got moved to sysfs. It is now sitting at: /sys/kernel/debug/usb/devices Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/devices/xpad.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ad6493800b08791bd7ea1a578b8c8b14dfecec0d Author: Dmitry Torokhov Date: Sat Apr 15 15:16:50 2017 -0700 Input: docs - freshen up introduction Stop saying that API is experimental and that only USB is supported, acknowledge that evdev is the preferred interface, and remove paragraph encouraging people sending snail mail to Vojtech :) along with his email. Signed-off-by: Dmitry Torokhov Documentation/input/event-codes.rst | 2 + Documentation/input/input.rst | 253 +++++++++++++--------------- Documentation/input/joydev/joystick-api.rst | 2 + Documentation/input/joydev/joystick.rst | 2 + 4 files changed, 127 insertions(+), 132 deletions(-) commit b08c118cde9dfd92f1f3c90544a682ee8b2ea740 Author: Dmitry Torokhov Date: Thu Apr 6 18:08:42 2017 -0700 Input: docs - split input docs into kernel- and user-facing Split input documentation into several groups: kernel- and user-facing, and notes about individual device drivers. Move device drivers docs into a separate subdirectory. Signed-off-by: Dmitry Torokhov Documentation/input/alps.rst | 387 ---------- Documentation/input/amijoy.rst | 263 ------- Documentation/input/appletouch.rst | 94 --- Documentation/input/atarikbd.rst | 820 --------------------- Documentation/input/bcm5974.rst | 70 -- Documentation/input/cma3000_d0x.rst | 139 ---- Documentation/input/cs461x.rst | 49 -- Documentation/input/devices/alps.rst | 387 ++++++++++ Documentation/input/devices/amijoy.rst | 263 +++++++ Documentation/input/devices/appletouch.rst | 94 +++ Documentation/input/devices/atarikbd.rst | 820 +++++++++++++++++++++ Documentation/input/devices/bcm5974.rst | 70 ++ Documentation/input/devices/cma3000_d0x.rst | 139 ++++ Documentation/input/devices/cs461x.rst | 43 ++ Documentation/input/devices/edt-ft5x06.rst | 54 ++ Documentation/input/devices/elantech.rst | 841 +++++++++++++++++++++ Documentation/input/devices/gpio-tilt.rst | 103 +++ Documentation/input/devices/iforce-protocol.rst | 381 ++++++++++ Documentation/input/devices/index.rst | 19 + Documentation/input/devices/joystick-parport.rst | 611 +++++++++++++++ Documentation/input/devices/ntrig.rst | 137 ++++ Documentation/input/devices/rotary-encoder.rst | 131 ++++ Documentation/input/devices/sentelic.rst | 901 +++++++++++++++++++++++ Documentation/input/devices/walkera0701.rst | 128 ++++ Documentation/input/devices/xpad.rst | 240 ++++++ Documentation/input/devices/yealink.rst | 225 ++++++ Documentation/input/edt-ft5x06.rst | 54 -- Documentation/input/elantech.rst | 841 --------------------- Documentation/input/gamepad.rst | 10 +- Documentation/input/gpio-tilt.rst | 103 --- Documentation/input/iforce-protocol.rst | 381 ---------- Documentation/input/index.rst | 39 +- Documentation/input/input-programming.rst | 5 +- Documentation/input/input_kapi.rst | 17 + Documentation/input/input_uapi.rst | 21 + Documentation/input/joystick-parport.rst | 611 --------------- Documentation/input/ntrig.rst | 137 ---- Documentation/input/rotary-encoder.rst | 131 ---- Documentation/input/sentelic.rst | 901 ----------------------- Documentation/input/walkera0701.rst | 128 ---- Documentation/input/xpad.rst | 242 ------ Documentation/input/yealink.rst | 238 ------ 42 files changed, 5634 insertions(+), 5634 deletions(-) commit 6c6d5752da5c9594e527e81062180bcf814ef1a0 Author: Dmitry Torokhov Date: Thu Apr 6 17:23:39 2017 -0700 Input: docs - note that MT-A protocol is obsolete Everyone should be using multitouch protocol B (slotted) now. Signed-off-by: Dmitry Torokhov Documentation/input/multi-touch-protocol.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4c79e98be5a9c0bf8fce183cfbe63624514502ef Author: Dmitry Torokhov Date: Thu Apr 6 16:17:37 2017 -0700 Input: docs - update joystick documentation a bit Consolidate use instructions and userspace API notes into the same chapter; remove completely obsolete references, move into a separate subdirectory. Signed-off-by: Dmitry Torokhov Documentation/input/index.rst | 6 +- Documentation/input/joydev/index.rst | 18 + Documentation/input/joydev/joystick-api.rst | 346 +++++++++++++++ Documentation/input/joydev/joystick.rst | 583 +++++++++++++++++++++++++ Documentation/input/joystick-api.rst | 326 -------------- Documentation/input/joystick-parport.rst | 12 +- Documentation/input/joystick.rst | 631 ---------------------------- 7 files changed, 955 insertions(+), 967 deletions(-) commit 15e591a7171affc50682720198586f2ba5d53bb7 Author: Dmitry Torokhov Date: Thu Apr 6 14:49:23 2017 -0700 Input: docs - remove disclaimer/GPL notice This is just a part of kernel documentation, it does not require explicit license notice. Signed-off-by: Dmitry Torokhov Documentation/input/index.rst | 21 --------------------- 1 file changed, 21 deletions(-) commit b8ccf31737516babf761f9b91a7cc83e8b35cdfe Author: Dmitry Torokhov Date: Thu Apr 6 12:48:41 2017 -0700 Input: fix "Game console" heading level in joystick documentation The heading level should be the same as for other devices. Signed-off-by: Dmitry Torokhov Documentation/input/joystick.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01ef6601727d897d6fc9225175158121c36e6b4a Author: Dmitry Torokhov Date: Wed Apr 5 17:13:22 2017 -0700 Input: rotary-encoder - remove references to platform data from docs The driver has been converted to use generic device properties, so stop referring to platform data. Signed-off-by: Dmitry Torokhov Documentation/input/rotary-encoder.rst | 85 ++++++++++++++++++---------------- 1 file changed, 44 insertions(+), 41 deletions(-) commit b8a91560964f19f03c6cb0afc218dafc85b21f4c Author: Dmitry Torokhov Date: Wed Apr 5 16:28:55 2017 -0700 Input: move documentation for Amiga CD32 Move the documentation for Amiga CD32 together with other parallel port joysticks. Signed-off-by: Dmitry Torokhov Documentation/input/cd32.rst | 24 --------------------- Documentation/input/index.rst | 1 - Documentation/input/joystick-parport.rst | 37 ++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 25 deletions(-) commit d27158c0cf080c85753f34e7a20a91c3ba20a0b9 Author: Eric W. Biederman Date: Thu Mar 30 19:26:35 2017 -0500 signal: Remove unused definition of sig_user_definied Signed-off-by: "Eric W. Biederman" include/linux/signal.h | 4 ---- 1 file changed, 4 deletions(-) commit 2caeda7e6ad401a1a3cac23c69fb766cf4739efe Author: Eric W. Biederman Date: Mon Apr 17 18:20:36 2017 -0500 ia64: Remove unused IA64_TASK_SIGHAND_OFFSET and IA64_SIGHAND_SIGLOCK_OFFSET These defines are never used so remove them to make it clear there is not assembly code that needs to be updated that uses those fields. Signed-off-by: "Eric W. Biederman" arch/ia64/kernel/asm-offsets.c | 4 ---- 1 file changed, 4 deletions(-) commit 2bcb9883664590867c87c19667e8738a0f675bf2 Author: Eric W. Biederman Date: Mon Aug 8 09:34:24 2016 -0500 ipc: Remove unused declaration of recompute_msgmni The function recompute_msgmni was removed a while ago but it is still declared in a header file remove it. Signed-off-by: "Eric W. Biederman" ipc/util.h | 2 -- 1 file changed, 2 deletions(-) commit 1cd706df8a9c93f4c7234f285e316a239d6d27ea Author: Hans de Goede Date: Thu Apr 6 09:24:36 2017 +0200 platform/x86: Add Intel Cherry Trail ACPI INT33FE device driver The INT33FE ACPI device has a CRS table with I2cSerialBusV2 resources for 3 devices: Maxim MAX17047 Fuel Gauge Controller, FUSB302 USB Type-C Controller and PI3USB30532 USB switch. This commit adds a driver for this ACPI device which instantiates i2c-clients for these, so that the standard i2c drivers for these chips can bind to the them. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Darren Hart (VMware) drivers/platform/x86/Kconfig | 13 +++ drivers/platform/x86/Makefile | 1 + drivers/platform/x86/intel_cht_int33fe.c | 143 +++++++++++++++++++++++++++++++ 3 files changed, 157 insertions(+) commit 86074b85c48cc9c821aa6197306d307d314c0063 Merge: 298747b d1d84bb Author: Darren Hart (VMware) Date: Mon Apr 17 15:30:28 2017 -0700 Merge branch 'i2c/for-INT33FE' Merge branch 'i2c/for-INT33FE' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git to prepare for an incoming INT33FE driver. Signed-off-by: Darren Hart (VMware) commit 30a83251dd8b7e3566be9ea8c4921bafc21bee8f Merge: 622f6e3 4cd4ca7 Author: James Morris Date: Tue Apr 18 07:37:51 2017 +1000 Merge tag 'keys-next-20170412' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into next commit 560642d9ab5c37451ee43989dd9a35037ab5ab8d Author: Namhyung Kim Date: Mon Apr 17 11:44:29 2017 +0900 selftests: ftrace: Add -l/--logdir option In my virtual machine setup, running ftracetest failed on creating LOG_DIR on a read-only filesystem. It'd be convenient to provide an option to specify a different directory as log directory. Link: http://lkml.kernel.org/r/20170417024430.21194-4-namhyung@kernel.org Cc: Ingo Molnar Acked-by: Masami Hiramatsu Cc: Shuah Khan Signed-off-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) tools/testing/selftests/ftrace/ftracetest | 5 +++++ 1 file changed, 5 insertions(+) commit 1e10486ffee0a5b060c58b9c8c712422f7b88b3b Author: Namhyung Kim Date: Mon Apr 17 11:44:28 2017 +0900 ftrace: Add 'function-fork' trace option The function-fork option is same as event-fork that it tracks task fork/exit and set the pid filter properly. This can be useful if user wants to trace selected tasks including their children only. Link: http://lkml.kernel.org/r/20170417024430.21194-3-namhyung@kernel.org Signed-off-by: Namhyung Kim Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 37 +++++++++++++++++++++++++++++++++++++ kernel/trace/trace.c | 5 ++++- kernel/trace/trace.h | 6 +++++- 3 files changed, 46 insertions(+), 2 deletions(-) commit 495ab569d0845065016617edcf07a75db96c3ef0 Author: Frank Schaefer Date: Sat Apr 15 07:05:04 2017 -0300 [media] em28xx: add support for V4L2_PIX_FMT_SRGGB8 Adding support for SRGGB8 is as simple as adding a new entry at struct em28xx_fmt. Signed-off-by: Frank Schäfer Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-video.c | 5 +++++ 1 file changed, 5 insertions(+) commit a7b8e9a5b3224883c2ab996717d6b808c46c81b3 Author: Frank Schaefer Date: Sat Apr 15 07:05:03 2017 -0300 [media] em28xx: shed some light on video input formats CbYCrY has been identified by looking into the tvp5150 driver and the saa7115 datasheet. YUV formats have been verified with em2765 + ov2640 (VAD Laplace webcam). RGB8 formats have been verified with em2710/em2820 + mt9v011 (Silvercrest webcam 1.3mpix). I also did some cross-checking with these two camera devices and 0x08-0x0b are at least 16 bits per pixel formats on em2710/em2820, too, and 0x0c-0x0f are at least 8 bits per pixel formats on em2765, too. Signed-off-by: Frank Schäfer Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-camera.c | 10 ++++------ drivers/media/usb/em28xx/em28xx-reg.h | 18 ++++++++++++++++++ drivers/media/usb/em28xx/em28xx-video.c | 2 +- 3 files changed, 23 insertions(+), 7 deletions(-) commit 85316cf8da9e808f28c81343a050f489ac03e20e Author: Frank Schaefer Date: Sat Apr 15 07:05:02 2017 -0300 [media] em28xx: don't treat device as webcam if an unknown sensor is detected With an unknown sensor, norm_maxw() and norm_maxh() return 0 as max. height and width values, which causes a devide by zero in size_to_scale(). Of course we could use speculative default values for unknown sensors, but the chance that the device works at this resolution without any driver/setup is very low and therefore not worth the efforts. Instead, just don't treat the device as camera. A message will then be printed to the log that the device isn't supported. Signed-off-by: Frank Schäfer Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit bb42fc4ad442d4de78b4a16233db98a5396988ff Author: Frank Schaefer Date: Sat Apr 15 07:05:01 2017 -0300 [media] em28xx: add missing auto-selections for build With MEDIA_SUBDRV_AUTOSELECT enabled in the kernel config, the em28xx driver currently does't select some used subdrivers. Fix this by adding the missing auto-selections to the Kconfig file. Signed-off-by: Frank Schäfer Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/Kconfig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2437aeb497ef43bff7f887aba4c45dd0ced61a4c Author: Frank Schaefer Date: Sat Apr 15 07:05:00 2017 -0300 [media] em28xx: get rid of the dummy clock source The v4l2 dummy clock has been added with commit fc5d0f8a8878 ("V4L2: em28xx: register a V4L2 clock source") to be able to use the ov2640 soc_camera driver. Since commit 46796cfcd346 ("ov2640: use standard clk and enable it") it is no longer required. Signed-off-by: Frank Schäfer Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-camera.c | 30 ++++++------------------------ drivers/media/usb/em28xx/em28xx-video.c | 6 ------ drivers/media/usb/em28xx/em28xx.h | 1 - 3 files changed, 6 insertions(+), 31 deletions(-) commit 4d58443696a8e2a4bcae3fc6d32b0bee71ad9fa1 Author: Frank Schaefer Date: Sun Apr 16 14:41:52 2017 -0300 [media] em28xx: simplify ID-reading from Micron sensors Use i2c_smbus_read_word_data() instead of i2c_master_send() and i2c_master_recv() for reading the ID of Micorn sensors. i2c_smbus_read_word_data() assumes that byes are in little-endian, so, it uses: data->word = msgbuf1[0] | (msgbuf1[1] << 8); However, Micron datasheet describes the ID as if they were read in big-endian. So, we need to change the byte order in order to match the ID number as described on their datasheets. Signed-off-by: Frank Schäfer Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-camera.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) commit e7080d4471d805d921a9ea21b32f911a91e248cb Author: Jasmin J Date: Fri Mar 17 23:04:20 2017 -0300 [media] media/dvb-core: Race condition when writing to CAM It started with a sporadic message in syslog: "CAM tried to send a buffer larger than the ecount size" This message is not the fault itself, but a consecutive fault, after a read error from the CAM. This happens only on several CAMs, several hardware, and of course sporadic. It is a consecutive fault, if the last read from the CAM did fail. I guess this will not happen on all CAMs, but at least it did on mine. There was a write error to the CAM and during the re-initialization procedure, the CAM finished the last read, although it got a RS. The write error to the CAM happened because a race condition between HC write, checking DA and FR. This patch added an additional check for DA(RE), just after checking FR. It is important to read the CAMs status register again, to give the CAM the necessary time for a proper reaction to HC. Please note the description within the source code (patch below). [mchehab@s-opensource.com: make checkpatch happy] Signed-off-by: Jasmin jessich Tested-by: Ralph Metzler Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_ca_en50221.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit b73bb2ab97eb7840d0f4fc285936024100f59a6d Author: Daniel Scheller Date: Tue Mar 14 19:22:37 2017 -0300 [media] dvb-frontends/drxk: don't log errors on unsupported operation mode When fe_ops.read_status is called and no channel is tuned (yet), the subsequent calls to get_lock_status() causes the kernel log to be filled with drxk: Error -22 on get_lock_status which either means a NULL pointer was passed for the p_lock_status var, or neither QAM nor OFDM/DVBT operation mode are active. Instead of filling the kernel log in the latter case, print out a message to the debug level and return 0 (this isn't used in the calling drxk_get_stats() anyway). Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/drxk_hard.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0c4089f80cb34329b5393825926308ba333abc67 Author: Geert Uytterhoeven Date: Sun Mar 12 10:16:56 2017 -0300 MAINTAINERS: Add file patterns for media device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven Reviewed-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit a1aae088e7f9dbd97164bbacc2b624d9bacd98a3 Author: simran singhal Date: Fri Mar 10 02:13:12 2017 -0300 [media] staging: lirc_zilog: Clean up tests if NULL returned on failure Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...); ... - e == NULL + !e Signed-off-by: simran singhal Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_zilog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6eb1951d53a3eeb8cefa101b8022f5f6572f9d5d Author: Sakari Ailus Date: Thu Mar 9 12:19:32 2017 -0300 [media] docs-rst: media: better document refcount in struct dvb_frontend The refcount field was added to the struct but it was not properly documented. Document it. [mchehab@s-opensource.com: fix a merge conflict] Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b89f04c61efe3b7756434d693b9203cc0cce002e Author: Chonggang Li Date: Sun Apr 16 12:02:18 2017 -0700 bonding: deliver link-local packets with skb->dev set to link that packets arrived on Bonding driver changes the skb->dev to the bonding-master before passing the packet to stack for further processing. This, however does not make sense for the link-local packets and it loses "the link info" once its skb->dev is changed to bonding-master. This patch changes this behavior for link-local packets by not changing the skb->dev to the bonding-master and maintaining it as it is, i.e. the link on which the packet arrived. Signed-off-by: Chonggang Li Signed-off-by: Mahesh Bandewar Signed-off-by: Maciej Żenczykowski Signed-off-by: Jay Vosburgh Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 3 +++ 1 file changed, 3 insertions(+) commit 30b2db3174bc58ddbedd034579d7aae61f3ad6ef Author: Sakari Ailus Date: Thu Mar 9 07:22:11 2017 -0300 [media] docs-rst: Make the CSI-2 bus initialisation documentation match reality Update the CSI-2 bus documentation to tell that the LP-11 mode is not mandatory as there are transmitters that cannot be explicitly set to LP-11 mode. Instead, say that this what the transmitter drivers shall do if possible. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/csi2.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c21ef3e343ae916ad3cfd4dc6ef6791c1f80a010 Author: David Ahern Date: Sun Apr 16 09:48:24 2017 -0700 net: rtnetlink: plumb extended ack to doit function Add netlink_ext_ack arg to rtnl_doit_func. Pass extack arg to nlmsg_parse for doit functions that call it directly. This is the first step to using extended error reporting in rtnetlink. >From here individual subsystems can be updated to set netlink_ext_ack as needed. Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 4 ++-- include/net/fib_rules.h | 6 ++++-- include/net/rtnetlink.h | 3 ++- net/bridge/br_mdb.c | 6 ++++-- net/can/gw.c | 6 ++++-- net/core/fib_rules.c | 10 ++++++---- net/core/neighbour.c | 15 +++++++++------ net/core/net_namespace.c | 10 ++++++---- net/core/rtnetlink.c | 42 ++++++++++++++++++++++++++---------------- net/dcb/dcbnl.c | 5 +++-- net/decnet/dn_dev.c | 12 ++++++++---- net/decnet/dn_fib.c | 10 ++++++---- net/decnet/dn_route.c | 6 ++++-- net/ipv4/devinet.c | 13 ++++++++----- net/ipv4/fib_frontend.c | 6 ++++-- net/ipv4/ipmr.c | 10 ++++++---- net/ipv4/route.c | 5 +++-- net/ipv6/addrconf.c | 20 ++++++++++++-------- net/ipv6/addrlabel.c | 12 ++++++++---- net/ipv6/route.c | 11 +++++++---- net/mpls/af_mpls.c | 9 ++++++--- net/phonet/pn_netlink.c | 10 ++++++---- net/qrtr/qrtr.c | 5 +++-- net/sched/act_api.c | 5 +++-- net/sched/cls_api.c | 5 +++-- net/sched/sch_api.c | 15 +++++++++------ 26 files changed, 162 insertions(+), 99 deletions(-) commit 9ccaed4bfd4f186e8350ffc7d8f188f8d2991fd9 Author: Dan Williams Date: Thu Apr 13 22:48:46 2017 -0700 acpi, nfit: limit ->flush_probe() to initialization work The nvdimm probe flushing mechanism gives userspace a sync point where it knows all asynchronous driver probe sequences have completed. However, it need not wait for other asynchronous actions, like on-demand address-range-scrub. Track the init work separately from other work in the workqueue, and only flush the former. Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 7 +++++++ drivers/acpi/nfit/nfit.h | 1 + 2 files changed, 8 insertions(+) commit caa603aae0cc0b6f25fa4673de067f625faaf47f Author: Dan Williams Date: Fri Apr 14 10:27:11 2017 -0700 acpi, nfit: collate health state flags Be tolerant of cases where the BIOS provided NFIT does not consistently set the flags in all NVDIMM Region Mapping structures associated with a given dimm. Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 1499934dcd15a7c9aca1467025b78f6675032849 Author: Dan Williams Date: Thu Apr 13 19:46:36 2017 -0700 acpi, nfit: support "map failed" dimms Stop requiring dimms be successfully mapped into a system-physical-address range. For provisioning and hardware remediation purposes the kernel should account for failed devices in sysfs. If possible it should still allow management commands to be sent to the device. Reported-by: Toshi Kani Tested-by: Toshi Kani Reported-by: Linda Knippers Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 53 +++++++++++++++++++++++++++++++++++++----------- drivers/acpi/nfit/nfit.h | 2 +- 2 files changed, 42 insertions(+), 13 deletions(-) commit ac40b675c74b9243069aba3a5799481dbcb9d2ef Author: Dan Williams Date: Thu Apr 13 15:17:38 2017 -0700 tools/testing/nvdimm: test acpi 6.1 health state flags Add a simulated dimm with an ACPI_NFIT_MEM_MAP_FAILED indication, and set the ACPI_NFIT_MEM_HEALTH_ENABLED flag on all the dimms where nfit_test simulates health events, but spread it out over several redundant memdev entries to test that the nfit driver coalesces all the flags. Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) commit af3b5158b89d3bab9be881113417558c71b71ca4 Author: David Lebrun Date: Sun Apr 16 12:27:14 2017 +0200 ipv6: sr: fix BUG due to headroom too small after SRH push When a locally generated packet receives an SRH with two or more segments, the remaining headroom is too small to push an ethernet header. This patch ensures that the headroom is large enough after SRH push. The BUG generated the following trace. [ 192.950285] skbuff: skb_under_panic: text:ffffffff81809675 len:198 put:14 head:ffff88006f306400 data:ffff88006f3063fa tail:0xc0 end:0x2c0 dev:A-1 [ 192.952456] ------------[ cut here ]------------ [ 192.953218] kernel BUG at net/core/skbuff.c:105! [ 192.953411] invalid opcode: 0000 [#1] PREEMPT SMP [ 192.953411] Modules linked in: [ 192.953411] CPU: 5 PID: 3433 Comm: ping6 Not tainted 4.11.0-rc3+ #237 [ 192.953411] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014 [ 192.953411] task: ffff88007c2d42c0 task.stack: ffffc90000ef4000 [ 192.953411] RIP: 0010:skb_panic+0x61/0x70 [ 192.953411] RSP: 0018:ffffc90000ef7900 EFLAGS: 00010286 [ 192.953411] RAX: 0000000000000085 RBX: 00000000000086dd RCX: 0000000000000201 [ 192.953411] RDX: 0000000080000201 RSI: ffffffff81d104c5 RDI: 00000000ffffffff [ 192.953411] RBP: ffffc90000ef7920 R08: 0000000000000001 R09: 0000000000000000 [ 192.953411] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 192.953411] R13: ffff88007c5a4000 R14: ffff88007b363d80 R15: 00000000000000b8 [ 192.953411] FS: 00007f94b558b700(0000) GS:ffff88007fd40000(0000) knlGS:0000000000000000 [ 192.953411] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 192.953411] CR2: 00007fff5ecd5080 CR3: 0000000074141000 CR4: 00000000001406e0 [ 192.953411] Call Trace: [ 192.953411] skb_push+0x3b/0x40 [ 192.953411] eth_header+0x25/0xc0 [ 192.953411] neigh_resolve_output+0x168/0x230 [ 192.953411] ? ip6_finish_output2+0x242/0x8f0 [ 192.953411] ip6_finish_output2+0x242/0x8f0 [ 192.953411] ? ip6_finish_output2+0x76/0x8f0 [ 192.953411] ip6_finish_output+0xa8/0x1d0 [ 192.953411] ip6_output+0x64/0x2d0 [ 192.953411] ? ip6_output+0x73/0x2d0 [ 192.953411] ? ip6_dst_check+0xb5/0xc0 [ 192.953411] ? dst_cache_per_cpu_get.isra.2+0x40/0x80 [ 192.953411] seg6_output+0xb0/0x220 [ 192.953411] lwtunnel_output+0xcf/0x210 [ 192.953411] ? lwtunnel_output+0x59/0x210 [ 192.953411] ip6_local_out+0x38/0x70 [ 192.953411] ip6_send_skb+0x2a/0xb0 [ 192.953411] ip6_push_pending_frames+0x48/0x50 [ 192.953411] rawv6_sendmsg+0xa39/0xf10 [ 192.953411] ? __lock_acquire+0x489/0x890 [ 192.953411] ? __mutex_lock+0x1fc/0x970 [ 192.953411] ? __lock_acquire+0x489/0x890 [ 192.953411] ? __mutex_lock+0x1fc/0x970 [ 192.953411] ? tty_ioctl+0x283/0xec0 [ 192.953411] inet_sendmsg+0x45/0x1d0 [ 192.953411] ? _copy_from_user+0x54/0x80 [ 192.953411] sock_sendmsg+0x33/0x40 [ 192.953411] SYSC_sendto+0xef/0x170 [ 192.953411] ? entry_SYSCALL_64_fastpath+0x5/0xc2 [ 192.953411] ? trace_hardirqs_on_caller+0x12b/0x1b0 [ 192.953411] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 192.953411] SyS_sendto+0x9/0x10 [ 192.953411] entry_SYSCALL_64_fastpath+0x1f/0xc2 [ 192.953411] RIP: 0033:0x7f94b453db33 [ 192.953411] RSP: 002b:00007fff5ecd0578 EFLAGS: 00000246 ORIG_RAX: 000000000000002c [ 192.953411] RAX: ffffffffffffffda RBX: 00007fff5ecd16e0 RCX: 00007f94b453db33 [ 192.953411] RDX: 0000000000000040 RSI: 000055a78352e9c0 RDI: 0000000000000003 [ 192.953411] RBP: 00007fff5ecd1690 R08: 000055a78352c940 R09: 000000000000001c [ 192.953411] R10: 0000000000000000 R11: 0000000000000246 R12: 000055a783321e10 [ 192.953411] R13: 000055a7839890c0 R14: 0000000000000004 R15: 0000000000000000 [ 192.953411] Code: 00 00 48 89 44 24 10 8b 87 c4 00 00 00 48 89 44 24 08 48 8b 87 d8 00 00 00 48 c7 c7 90 58 d2 81 48 89 04 24 31 c0 e8 4f 70 9a ff <0f> 0b 0f 1f 00 66 2e 0f 1f 84 00 00 00 00 00 48 8b 97 d8 00 00 [ 192.953411] RIP: skb_panic+0x61/0x70 RSP: ffffc90000ef7900 [ 193.000186] ---[ end trace bd0b89fabdf2f92c ]--- [ 193.000951] Kernel panic - not syncing: Fatal exception in interrupt [ 193.001137] Kernel Offset: disabled [ 193.001169] ---[ end Kernel panic - not syncing: Fatal exception in interrupt Fixes: 19d5a26f5ef8de5dcb78799feaf404d717b1aac3 ("ipv6: sr: expand skb head only if necessary") Signed-off-by: David Lebrun Signed-off-by: David S. Miller net/ipv6/seg6_iptunnel.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7a7a9bd7aceea77dc2397bc58a1e88197ed759cb Author: Ilan Tayari Date: Sun Apr 16 11:00:07 2017 +0300 gso: Validate assumption of frag_list segementation Commit 07b26c9454a2 ("gso: Support partial splitting at the frag_list pointer") assumes that all SKBs in a frag_list (except maybe the last one) contain the same amount of GSO payload. This assumption is not always correct, resulting in the following warning message in the log: skb_segment: too many frags For example, mlx5 driver in Striding RQ mode creates some RX SKBs with one frag, and some with 2 frags. After GRO, the frag_list SKBs end up having different amounts of payload. If this frag_list SKB is then forwarded, the aforementioned assumption is violated. Validate the assumption, and fall back to software GSO if it not true. Fixes: 07b26c9454a2 ("gso: Support partial splitting at the frag_list pointer") Signed-off-by: Ilan Tayari Signed-off-by: Ilya Lesokhin Signed-off-by: David S. Miller net/core/skbuff.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit edb12f2d72d735acfb3aa53bbda64b1827042209 Author: Xin Long Date: Sat Apr 15 21:56:57 2017 +0800 sctp: get list_of_streams of strreset outreq earlier Now when processing strreset out responses, it gets outreq->list_of_streams only when result is performed. But if result is not performed, str_p will be NULL. It will cause panic in sctp_ulpevent_make_stream_reset_event if nums is not 0. This patch is to fix it by getting outreq->list_of_streams earlier, and also to improve some codes for the strreset inreq process. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/stream.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9fd0f315631f3d3677cbd44966749cb63e55058a Author: Chenbo Feng Date: Fri Apr 14 18:25:26 2017 -0700 Add uid and cookie bpf helper to cg_skb_func_proto BPF helper functions get_socket_cookie and get_socket_uid can be used for network traffic classifications, among others. Expose them also to programs of type BPF_PROG_TYPE_CGROUP_SKB. As of commit 8f917bba0042 ("bpf: pass sk to helper functions") the required skb->sk function is available at both cgroup bpf ingress and egress hooks. With these two new helper, cg_skb_func_proto is effectively the same as sk_filter_func_proto. Change since V1: Instead of add the helper to cg_skb_func_proto, redirect the cg_skb_func_proto to sk_filter_func_proto since all helper function in sk_filter_func_proto are applicable to cg_skb_func_proto now. Signed-off-by: Chenbo Feng Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller net/core/filter.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit b980b117c9ff17226937128a15692a18c9a28ed6 Author: Steven Rostedt (VMware) Date: Tue Apr 11 18:25:08 2017 -0400 tracing: Have the trace_event benchmark thread call cond_resched_rcu_qs() The trace_event benchmark thread runs in kernel space in an infinite loop while also calling cond_resched() in case anything else wants to schedule in. Unfortunately, on a PREEMPT kernel, that makes it a nop, in which case, this will never voluntarily schedule. That will cause synchronize_rcu_tasks() to forever block on this thread, while it is running. This is exactly what cond_resched_rcu_qs() is for. Use that instead. Acked-by: "Paul E. McKenney" Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_benchmark.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit f3c9d40ee12926f330a1dfebce0bebadd1406ba6 Author: Simon Xiao Date: Fri Apr 14 14:42:58 2017 -0700 hv_netvsc: change netvsc device default duplex to FULL The netvsc device supports full duplex by default. This warnings in log from bonding device which did not like seeing UNKNOWN duplex. Signed-off-by: Simon Xiao Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 776e726bfb3493f71bb11759f7a60f1b0f6dd2d2 Author: stephen hemminger Date: Fri Apr 14 14:42:57 2017 -0700 netvsc: fix RCU warning in get_stats The statistics functionis called with RTNL held during probe but with RCU held during access from /proc and elsewhere. This is safe so update the lockdep annotation. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1dbba4cb8df73844ea0d7c1fd11e1ea35f1670b7 Author: Dan Carpenter Date: Fri Apr 14 22:10:41 2017 +0300 net: phy: test the right variable in phy_write_mmd() This is a copy and paste buglet. We meant to test for ->write_mmd but we test for ->read_mmd. Fixes: 1ee6b9bc6206 ("net: phy: make phy_(read|write)_mmd() generic MMD accessors") Signed-off-by: Dan Carpenter Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/phy-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 450cc8cce23d0db11b19fa89973ddb6d5edd010c Merge: d584fec 019aa56 Author: David S. Miller Date: Mon Apr 17 15:00:57 2017 -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 2017-04-14 Here's the main batch of Bluetooth & 802.15.4 patches for the 4.12 kernel. - Many fixes to 6LoWPAN, in particular for BLE - New CA8210 IEEE 802.15.4 device driver (accounting for most of the lines of code added in this pull request) - Added Nokia Bluetooth (UART) HCI driver - Some serdev & TTY changes that are dependencies for the Nokia driver (with acks from relevant maintainers and an agreement that these come through the bluetooth tree) - Support for new Intel Bluetooth device - Various other minor cleanups/fixes here and there Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit e609f9f23e57f6af1c8f0b5759a87f9db3521eb1 Merge: 83dd720 e759030 Author: Stephen Boyd Date: Mon Apr 17 11:29:18 2017 -0700 Merge branch 'clk-fixes' into clk-next * clk-fixes: clk: sunxi-ng: a33: gate then ungate PLL CPU clk after rate change clk: sunxi-ng: Add clk notifier to gate then ungate PLL clocks clk: sunxi-ng: fix build failure in ccu-sun9i-a80 driver clk: sunxi-ng: fix build error without CONFIG_RESET_CONTROLLER clk: stm32f4: fix: exclude values 0 and 1 for PLLQ commit 45a2329367386342d41ea9414c88b023f5a79055 Author: Jayachandran C Date: Thu Apr 13 20:30:45 2017 +0000 PCI: Avoid generating invalid ThunderX2 DMA aliases On Cavium ThunderX2 arm64 SoCs (formerly known as Broadcom Vulcan), the PCI topology is slightly unusual. For a multi-node system, it looks like: 00:00.0 PCI bridge to [bus 01-1e] 01:0a.0 PCI-to-PCIe bridge to [bus 02-04] 02:00.0 PCIe Root Port bridge to [bus 03-04] (XLATE_ROOT) 03:00.0 PCIe Endpoint pci_for_each_dma_alias() assumes IOMMU translation is done at the root of the PCI hierarchy. It generates 03:00.0, 01:0a.0, and 00:00.0 as DMA aliases for 03:00.0 because buses 01 and 00 are non-PCIe buses that don't carry the Requester ID. Because the ThunderX2 IOMMU is at 02:00.0, the Requester IDs 01:0a.0 and 00:00.0 are never valid for the endpoint. This quirk stops alias generation at the XLATE_ROOT bridge so we won't generate 01:0a.0 or 00:00.0. The current IOMMU code only maps the last alias (this is a separate bug in itself). Prior to this quirk, we only created IOMMU mappings for the invalid Requester ID 00:00:0, which never matched any DMA transactions. With this quirk, we create IOMMU mappings for a valid Requester ID, which fixes devices with no aliases but leaves devices with aliases still broken. The last alias for the endpoint is also used by the ARM GICv3 MSI-X code. Without this quirk, the GIC Interrupt Translation Tables are setup with the invalid Requester ID, and the MSI-X generated by the device fails to be translated and routed. Link: https://bugzilla.kernel.org/show_bug.cgi?id=195447 Signed-off-by: Jayachandran C Signed-off-by: Bjorn Helgaas Reviewed-by: Robin Murphy Acked-by: David Daney drivers/pci/quirks.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit d584fec634a4426ad476657383d3a9049565f884 Merge: 82960ff 3a5795b Author: David S. Miller Date: Mon Apr 17 13:55:54 2017 -0400 Merge branch 'bpf-lru-perf' Martin KaFai Lau says: ==================== bpf: LRU performance and test-program improvements The first 4 patches make a few improvements to the LRU tests. Patch 5/6 is to improve the performance of BPF_F_NO_COMMON_LRU map. Patch 6/6 adds an example in using LRU map with map-in-map. ==================== Signed-off-by: David S. Miller commit 3a5795b83d578cc542a92c94399946258cf1a2af Author: Martin KaFai Lau Date: Fri Apr 14 10:30:30 2017 -0700 bpf: lru: Add map-in-map LRU example This patch adds a map-in-map LRU example. If we know only a subset of cores will use the LRU, we can allocate a common LRU list per targeting core and store it into an array-of-hashs. It allows using the common LRU map with map-update performance comparable to the BPF_F_NO_COMMON_LRU map but without wasting memory on the unused cores that we know they will never access the LRU map. BPF_F_NO_COMMON_LRU: > map_perf_test 32 8 10000000 10000000 | awk '{sum += $3}END{print sum}' 9234314 (9.23M/s) map-in-map LRU: > map_perf_test 512 8 1260000 80000000 | awk '{sum += $3}END{print sum}' 9962743 (9.96M/s) Notes that the max_entries for the map-in-map LRU test is 1260000 which is the max_entries for each inner LRU map. 8 processes have been started, so 8 * 1260000 = 10080000 (~10M) which is close to what is used in the BPF_F_NO_COMMON_LRU test. Signed-off-by: Martin KaFai Lau Signed-off-by: David S. Miller samples/bpf/map_perf_test_kern.c | 34 ++++++++++++++++++++-- samples/bpf/map_perf_test_user.c | 62 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+), 3 deletions(-) commit 695ba2651a2ecbb336145f9cc033c85b9c6a5cee Author: Martin KaFai Lau Date: Fri Apr 14 10:30:29 2017 -0700 bpf: lru: Lower the PERCPU_NR_SCANS from 16 to 4 After doing map_perf_test with a much bigger BPF_F_NO_COMMON_LRU map, the perf report shows a lot of time spent in rotating the inactive list (i.e. __bpf_lru_list_rotate_inactive): > map_perf_test 32 8 10000 1000000 | awk '{sum += $3}END{print sum}' 19644783 (19M/s) > map_perf_test 32 8 10000000 10000000 | awk '{sum += $3}END{print sum}' 6283930 (6.28M/s) By inactive, it usually means the element is not in cache. Hence, there is a need to tune the PERCPU_NR_SCANS value. This patch finds a better number of elements to scan during each list rotation. The PERCPU_NR_SCANS (which is defined the same as PERCPU_FREE_TARGET) decreases from 16 elements to 4 elements. This change only affects the BPF_F_NO_COMMON_LRU map. The test_lru_dist does not show meaningful difference between 16 and 4. Our production L4 load balancer which uses the LRU map for conntrack-ing also shows little change in cache hit rate. Since both benchmark and production data show no cache-hit difference, PERCPU_NR_SCANS is lowered from 16 to 4. We can consider making it configurable if we find a usecase later that shows another value works better and/or use a different rotation strategy. After this change: > map_perf_test 32 8 10000000 10000000 | awk '{sum += $3}END{print sum}' 9240324 (9.2M/s) i.e. 6.28M/s -> 9.2M/s The test_lru_dist has not shown meaningful difference: > test_lru_dist zipf.100k.a1_01.out 4000 1: nr_misses: 31575 (Before) vs 31566 (After) > test_lru_dist zipf.100k.a0_01.out 40000 1 nr_misses: 67036 (Before) vs 67031 (After) Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/bpf_lru_list.c | 2 +- tools/testing/selftests/bpf/test_lru_map.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9fd63d05f3e8476282cd8c484eb34d3f6be54f40 Author: Martin KaFai Lau Date: Fri Apr 14 10:30:28 2017 -0700 bpf: Allow bpf sample programs (*_user.c) to change bpf_map_def The current bpf_map_def is statically defined during compile time. This patch allows the *_user.c program to change it during runtime. It is done by adding load_bpf_file_fixup_map() which takes a callback. The callback will be called before creating each map so that it has a chance to modify the bpf_map_def. The current usecase is to change max_entries in map_perf_test. It is interesting to test with a much bigger map size in some cases (e.g. the following patch on bpf_lru_map.c). However, it is hard to find one size to fit all testing environment. Hence, it is handy to take the max_entries as a cmdline arg and then configure the bpf_map_def during runtime. This patch adds two cmdline args. One is to configure the map's max_entries. Another is to configure the max_cnt which controls how many times a syscall is called. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/bpf_load.c | 114 +++++++++++++++++++++++++----- samples/bpf/bpf_load.h | 13 ++++ samples/bpf/map_perf_test_user.c | 148 ++++++++++++++++++++++++--------------- 3 files changed, 201 insertions(+), 74 deletions(-) commit bf8db5d243a103ccd3f6d82a110e2302608e248c Author: Martin KaFai Lau Date: Fri Apr 14 10:30:27 2017 -0700 bpf: lru: Refactor LRU map tests in map_perf_test One more LRU test will be added later in this patch series. In this patch, we first move all existing LRU map tests into a single syscall (connect) first so that the future new LRU test can be added without hunting another syscall. One of the map name is also changed from percpu_lru_hash_map to nocommon_lru_hash_map to avoid the confusion with percpu_hash_map. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/map_perf_test_kern.c | 43 +++++++++++++++++++++++--------- samples/bpf/map_perf_test_user.c | 53 +++++++++++++++++++++++++++------------- 2 files changed, 67 insertions(+), 29 deletions(-) commit 6467acbc70f011d5852f60f6e04825a268c8e8b0 Author: Martin KaFai Lau Date: Fri Apr 14 10:30:26 2017 -0700 bpf: lru: Cleanup test_lru_map.c This patch does the following cleanup on test_lru_map.c 1) Fix indentation (Replace spaces by tabs) 2) Remove redundant BPF_F_NO_COMMON_LRU test 3) Simplify some comments Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_lru_map.c | 32 +++++++++--------------------- 1 file changed, 9 insertions(+), 23 deletions(-) commit 9746f85686849df107c899f34188f977e78154b0 Author: Martin KaFai Lau Date: Fri Apr 14 10:30:25 2017 -0700 bpf: lru: Add test_lru_sanity6 for BPF_F_NO_COMMON_LRU test_lru_sanity3 is not applicable to BPF_F_NO_COMMON_LRU. It just happens to work when PERCPU_FREE_TARGET == 16. This patch: 1) Disable test_lru_sanity3 for BPF_F_NO_COMMON_LRU 2) Add test_lru_sanity6 to test list rotation for the BPF_F_NO_COMMON_LRU map. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_lru_map.c | 70 +++++++++++++++++++++++++++--- 1 file changed, 65 insertions(+), 5 deletions(-) commit 82960fff09bc394e2a33d5369969410699c04861 Author: Jisheng Zhang Date: Fri Apr 14 19:07:32 2017 +0800 net: mvneta: fix failed to suspend if WOL is enabled Recently, suspend/resume and WOL support are added into mvneta driver. If we enable WOL, then we get some error as below on Marvell BG4CT platforms during suspend: [ 184.149723] dpm_run_callback(): mdio_bus_suspend+0x0/0x50 returns -16 [ 184.149727] PM: Device f7b62004.mdio-mi:00 failed to suspend: error -16 -16 means -EBUSY, phy_suspend() will return -EBUSY if it finds the device has WOL enabled. We fix this issue by properly setting the netdev's power.can_wakeup and power.wakeup, i.e 1. in mvneta_mdio_probe(), call device_set_wakeup_capable() to set power.can_wakeup if the phy support WOL. 2. in mvneta_ethtool_set_wol(), call device_set_wakeup_enable() to set power.wakeup if WOL has been successfully enabled in phy. Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit cab93af0ed6a12b63ebf0ebca37e6d8efd399114 Author: Nikolay Aleksandrov Date: Fri Apr 14 13:49:34 2017 +0300 net: bridge: notify on hw fdb takeover Recently we added support for SW fdbs to take over HW ones, but that results in changing a user-visible fdb flag thus we need to send a notification, also it's consistent with how HW takes over SW entries. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_fdb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f5001ceab8996d76880004381c188b3b96c8c7af Author: WANG Cong Date: Thu Apr 13 11:38:02 2017 -0700 kcm: remove a useless copy_from_user() struct kcm_clone only contains fd, and kcm_clone() only writes this struct, so there is no need to copy it from user. Cc: Tom Herbert Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/kcm/kcmsock.c | 4 ---- 1 file changed, 4 deletions(-) commit 6b2af241f0766a9d2c01dfa4e5aece433b51ff70 Author: Jiri Pirko Date: Thu Apr 13 18:13:51 2017 +0200 MAINTAINERS: rename TC entry and add couple of header files The section is not specific only to "TC classifiers", but applies to the whole TC subsystem. Also, add couple of forgotten headers. Signed-off-by: Jiri Pirko Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller MAINTAINERS | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 786df9c2a4216e64e5b7c321405d706036a76ba3 Author: Russell King Date: Thu Apr 13 16:49:20 2017 +0100 net: phy: simplify phy_supported_speeds() Simplify the loop in phy_supported_speeds(). Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/phy.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit d06130377c4826624681505c0bb45bfd6eb7cd4f Author: Russell King Date: Thu Apr 13 16:49:15 2017 +0100 net: phy: improve phylib correctness for non-autoneg settings phylib has some undesirable behaviour when forcing a link mode through ethtool. phylib uses this code: idx = phy_find_valid(phy_find_setting(phydev->speed, phydev->duplex), features); to find an index in the settings table. phy_find_setting() starts at index 0, and scans upwards looking for an exact speed and duplex match. When it doesn't find it, it returns MAX_NUM_SETTINGS - 1, which is 10baseT-Half duplex. phy_find_valid() then scans from the point (and effectively only checks one entry) before bailing out, returning MAX_NUM_SETTINGS - 1. phy_sanitize_settings() then sets ->speed to SPEED_10 and ->duplex to DUPLEX_HALF whether or not 10baseT-Half is supported or not. This goes against all the comments against these functions, and 10baseT-Half may not even be supported by the hardware. Rework these functions, introducing a new method of scanning the table. There are two modes of lookup that phylib wants: exact, and inexact. - in exact mode, we return either an exact match or failure - in inexact mode, we return an exact match if it exists, a match at the highest speed that is not greater than the requested speed (ignoring duplex), or failing that, the lowest supported speed, or failure. The biggest difference is that we always check whether the entry is supported before further consideration, so all unsupported entries are not considered as candidates. This results in arguably saner behaviour, better matches the comments, and is probably what users would expect. This becomes important as ethernet speeds increase, PHYs exist which do not support the 10Mbit speeds, and half-duplex is likely to become obsolete - it's already not even an option on 10Gbit and faster links. Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/phy.c | 109 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 66 insertions(+), 43 deletions(-) commit 8ea3e439115a50b1927a4d035b2f84c46fc61c42 Author: stephen hemminger Date: Thu Apr 13 08:40:53 2017 -0700 Subject: net: allow configuring default qdisc Since 3.12 it has been possible to configure the default queuing discipline via sysctl. This patch adds ability to configure the default queue discipline in kernel configuration. This is useful for environments where configuring the value from userspace is difficult to manage. The default is still the same as before (pfifo_fast) and it is possible to change after kernel init with sysctl. This is similar to how TCP congestion control works. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller net/sched/Kconfig | 45 +++++++++++++++++++++++++++++++++++++++++++++ net/sched/sch_api.c | 9 +++++++++ 2 files changed, 54 insertions(+) commit 7ca9511813c991f44b9e1b94aeeee488df401580 Merge: 53a759c e4917d4 Author: David S. Miller Date: Mon Apr 17 13:06:19 2017 -0400 Merge branch 'qed-arfs' Manish Chopra says: ==================== qed/qede: aRFS support This series adds support for Accelerated Flow Steering in qede driver for TCP/UDP over IPv4/IPv6 protocols. Please consider applying this series to "net-next" ==================== Signed-off-by: David S. Miller commit e4917d46a6537c5bf05acc2e42df3b67d87775e4 Author: Chopra, Manish Date: Thu Apr 13 04:54:45 2017 -0700 qede: Add aRFS support This patch adds support for aRFS for TCP and UDP protocols with IPv4/IPv6. Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede.h | 22 +- drivers/net/ethernet/qlogic/qede/qede_filter.c | 441 +++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qede/qede_main.c | 50 ++- 3 files changed, 508 insertions(+), 5 deletions(-) commit d51e4af5c2092c48a06ceaf2323b13a39a2df4ee Author: Chopra, Manish Date: Thu Apr 13 04:54:44 2017 -0700 qed: aRFS infrastructure support This patch adds necessary APIs to interface with qede aRFS support in successive patch. It also reserves separate PTT entry for aRFS, [as being in fastpath flow] for hardware access instead of trying to acquire it at run time from the ptt pool. Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 2 + drivers/net/ethernet/qlogic/qed/qed_cxt.c | 13 +- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 187 +++++++++++++++++++++ .../net/ethernet/qlogic/qed/qed_init_fw_funcs.c | 129 ++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_l2.c | 133 +++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_l2.h | 8 + drivers/net/ethernet/qlogic/qed/qed_main.c | 26 +++ drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 8 + drivers/net/ethernet/qlogic/qed/qed_sp.h | 1 + include/linux/qed/qed_eth_if.h | 8 + include/linux/qed/qed_if.h | 7 + 11 files changed, 519 insertions(+), 3 deletions(-) commit 53a759c89b7924b2cd218b40fa4b51f9220f20b1 Author: Martin Wetterwald Date: Thu Apr 13 10:08:44 2017 +0200 smsc95xx: Add comments to the registers definition This chip is used by a lot of embedded devices and also by the Raspberry Pi 1, 2 & 3 which were created to promote the study of computer sciences. Students wanting to learn kernel / network device driver programming through those devices can only rely on the Linux kernel driver source to make their own. This commit adds a lot of comments to the registers definition to expand the register names. Cc: Steve Glendinning Cc: Microchip Linux Driver Support CC: David Miller Signed-off-by: Martin Wetterwald Reviewed-by: Andrew Lunn Acked-by: Steve Glendinning Acked-by: Woojung Huh Signed-off-by: David S. Miller drivers/net/usb/smsc95xx.c | 4 +- drivers/net/usb/smsc95xx.h | 490 +++++++++++++++++++++++++-------------------- 2 files changed, 280 insertions(+), 214 deletions(-) commit 57240d007816486131bee88cd474c2a71f0fe224 Author: R. Parameswaran Date: Wed Apr 12 18:31:04 2017 -0700 l2tp: device MTU setup, tunnel socket needs a lock The MTU overhead calculation in L2TP device set-up merged via commit b784e7ebfce8cfb16c6f95e14e8532d0768ab7ff needs to be adjusted to lock the tunnel socket while referencing the sub-data structures to derive the socket's IP overhead. Reported-by: Guillaume Nault Tested-by: Guillaume Nault Signed-off-by: R. Parameswaran Signed-off-by: David S. Miller include/linux/net.h | 2 +- net/l2tp/l2tp_eth.c | 2 ++ net/socket.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) commit 801b25f104647d44dc5b5cce2c72e2283b3757de Author: Al Viro Date: Sat Apr 8 18:54:38 2017 -0400 fs/compat.c: trim unused includes Signed-off-by: Al Viro fs/compat.c | 31 ------------------------------- 1 file changed, 31 deletions(-) commit f50298556436ef0f32257b8ea19b112f9028b0a5 Author: Al Viro Date: Sat Apr 8 18:18:48 2017 -0400 move compat_rw_copy_check_uvector() over to fs/read_write.c Signed-off-by: Al Viro fs/compat.c | 76 --------------------------------------------------------- fs/read_write.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 76 deletions(-) commit 2b8910264a7fec4599b620e5206eb877a207f40a Author: Al Viro Date: Sat Apr 8 18:16:56 2017 -0400 fhandle: move compat syscalls from compat.c Signed-off-by: Al Viro fs/compat.c | 12 ------------ fs/fhandle.c | 13 +++++++++++++ fs/internal.h | 2 -- 3 files changed, 13 insertions(+), 14 deletions(-) commit e35d49f637d5ce3d7bb6c735a8d18727e3101f9d Author: Al Viro Date: Sat Apr 8 18:15:12 2017 -0400 open: move compat syscalls from compat.c Signed-off-by: Al Viro fs/compat.c | 18 ------------------ fs/open.c | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 18 deletions(-) commit ac565de31c950723539af55542c7507bc1faa60a Author: Al Viro Date: Sat Apr 8 18:13:00 2017 -0400 stat: move compat syscalls from compat.c Signed-off-by: Al Viro fs/compat.c | 83 ---------------------------------------------------------- fs/stat.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 83 deletions(-) commit 80f0cce6aadebf6caf74d1f8ceb4b008ca72a9e9 Author: Al Viro Date: Sat Apr 8 18:10:56 2017 -0400 fcntl: move compat syscalls from compat.c Signed-off-by: Al Viro fs/compat.c | 154 ---------------------------------------------------------- fs/fcntl.c | 157 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 157 insertions(+), 154 deletions(-) commit 0460b2a28b4b39cdd1ca9a420126353b27ebc954 Author: Al Viro Date: Sat Apr 8 18:10:08 2017 -0400 readdir: move compat syscalls from compat.c Signed-off-by: Al Viro fs/compat.c | 162 --------------------------------------------------------- fs/readdir.c | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 165 insertions(+), 162 deletions(-) commit 4ada54ee7a4b7bc2de6ef1117e41aeeb8aa4f6bb Author: Al Viro Date: Sat Apr 8 18:08:15 2017 -0400 statfs: move compat syscalls from compat.c Signed-off-by: Al Viro fs/compat.c | 138 ----------------------------------------------------------- fs/statfs.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+), 138 deletions(-) commit 1a060ba3c862bfc03e35112ff3a1434acb6de8e8 Author: Al Viro Date: Sat Apr 8 18:04:59 2017 -0400 utimes: move compat syscalls from compat.c Signed-off-by: Al Viro fs/compat.c | 58 ----------------------------------------------------- fs/utimes.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 61 insertions(+), 63 deletions(-) commit e99ca56ce03dd90991025878152bae8b53484147 Author: Al Viro Date: Sat Apr 8 16:50:24 2017 -0400 move compat select-related syscalls to fs/select.c Signed-off-by: Al Viro fs/compat.c | 368 -------------------------------------------- fs/select.c | 421 ++++++++++++++++++++++++++++++++++++++++++++++++++- include/linux/poll.h | 56 ------- 3 files changed, 419 insertions(+), 426 deletions(-) commit 2611dc1939569718c65ffd59c8fb9ba7474d026c Author: Al Viro Date: Sat Apr 8 14:34:51 2017 -0400 Remove compat_sys_getdents64() Unlike normal compat syscall variants, it is needed only for biarch architectures that have different alignement requirements for u64 in 32bit and 64bit ABI *and* have __put_user() that won't handle a store of 64bit value at 32bit-aligned address. We used to have one such (ia64), but its biarch support has been gone since 2010 (after being broken in 2008, which went unnoticed since nobody had been using it). It had escaped removal at the same time only because back in 2004 a patch that switched several syscalls on amd64 from private wrappers to generic compat ones had switched to use of compat_sys_getdents64(), which hadn't needed (or used) a compat wrapper on amd64. Let's bury it - it's at least 7 years overdue. Signed-off-by: Al Viro arch/arm64/include/asm/unistd.h | 1 - arch/arm64/include/asm/unistd32.h | 2 +- arch/x86/entry/syscalls/syscall_32.tbl | 2 +- arch/x86/include/asm/unistd.h | 1 - fs/compat.c | 91 ---------------------------------- include/linux/compat.h | 5 -- include/uapi/asm-generic/unistd.h | 3 +- 7 files changed, 3 insertions(+), 102 deletions(-) commit 4a6e3c5def13c91adf2acc613837001f09af3baa Author: David Ahern Date: Wed Apr 12 11:49:04 2017 -0700 net: ipv6: send unsolicited NA on admin up ndisc_notify is the ipv6 equivalent to arp_notify. When arp_notify is set to 1, gratuitous arp requests are sent when the device is brought up. The same is expected when ndisc_notify is set to 1 (per ndisc_notify in Documentation/networking/ip-sysctl.txt). The NA is not sent on NETDEV_UP event; add it. Fixes: 5cb04436eef6 ("ipv6: add knob to send unsolicited ND on link-layer address change") Signed-off-by: David Ahern Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv6/ndisc.c | 2 ++ 1 file changed, 2 insertions(+) commit 1b72e7fd304639f1cd49d1e11955c4974936d88c Author: Rafael J. Wysocki Date: Tue Apr 11 00:20:41 2017 +0200 cpufreq: schedutil: Use policy-dependent transition delays Make the schedutil governor take the initial (default) value of the rate_limit_us sysfs attribute from the (new) transition_delay_us policy parameter (to be set by the scaling driver). That will allow scaling drivers to make schedutil use smaller default values of rate_limit_us and reduce the default average time interval between consecutive frequency changes. Make intel_pstate set transition_delay_us to 500. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/intel_pstate.c | 2 ++ include/linux/cpufreq.h | 7 +++++++ kernel/sched/cpufreq_schedutil.c | 15 ++++++++++----- 3 files changed, 19 insertions(+), 5 deletions(-) commit 1c13f7aaaab12a01d7bf530539780e40a0ff24d4 Author: Alexandre-Xavier Labonté-Lamoureux Date: Sat Feb 25 05:03:38 2017 -0300 [media] em28xx: Add new USB ID eb1a:5051 Add new usbid eb1a:5051 for the Ion Video 2 PC MKII, Startech svid2usb23 and Raygo R12-41373. Signed-off-by: Alexandre-Xavier Labonté-Lamoureux Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-cards.c | 2 ++ 1 file changed, 2 insertions(+) commit f81a18d860a22b0c56d4dac51752f475cf840144 Author: Christophe JAILLET Date: Wed Feb 22 19:32:19 2017 -0300 [media] tm6000: Fix resource freeing in 'tm6000_prepare_isoc()' 'usb_free_urb(urb)' is a no-op, because urb is known to be NULL. It is likelly that releasing resources allocated by 'tm6000_alloc_urb_buffers()' just a few lines above is expected here. This has been spotted by the following coccinelle script: @@ expression ret, x, e; identifier f; @@ * if (x == NULL) { ... when != x = e; ( * f(<+...x...+>); | * ret = f(<+...x...+>); ) ... } Signed-off-by: Christophe JAILLET Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/tm6000/tm6000-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0746c1ad334825c3d828fcc47c0cbf404523d1e Author: Javier Martinez Canillas Date: Wed Feb 22 13:11:28 2017 -0300 [media] tc358743: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 609d0468b4a897bdf6471e9a2173981bcecb6ec6 Author: Gustavo A. R. Silva Date: Tue Feb 21 00:49:59 2017 -0300 [media] media: pci: saa7164: remove dead code Remove dead code. The following line of code is never reached: return SAA_OK; Addresses-Coverity-ID: 114283 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Peter Senna Tschudin Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/saa7164/saa7164-cmd.c | 2 -- 1 file changed, 2 deletions(-) commit 393a8e76dc8bef26d8875208eeb7304771cd74f4 Author: Gustavo A. R. Silva Date: Tue Feb 21 00:46:58 2017 -0300 [media] media: pci: saa7164: remove unnecessary code Remove unnecessary variable 'loop'. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Peter Senna Tschudin Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/saa7164/saa7164-cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9ae05fd1e7910f046ecf15ae702f6a33a698bf82 Author: Javier Martinez Canillas Date: Mon Feb 20 17:16:16 2017 -0300 [media] et8ek8: Export OF device ID as module aliases The I2C core always reports a MODALIAS of the form i2c: even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. Before this patch: $ modinfo drivers/media/i2c/et8ek8/et8ek8.ko | grep alias alias: i2c:et8ek8 After this patch: $ modinfo drivers/media/i2c/et8ek8/et8ek8.ko | grep alias alias: i2c:et8ek8 alias: of:N*T*Ctoshiba,et8ek8C* alias: of:N*T*Ctoshiba,et8ek8 Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/et8ek8/et8ek8_driver.c | 1 + 1 file changed, 1 insertion(+) commit 650497f1efdc47ef7f1bc7eea1dbeda026a08676 Author: Bhumika Goyal Date: Sun Feb 19 15:04:41 2017 -0300 [media] media: pci: constify stv0299_config structures Declare stv0299_config structures as const as they are only passed as an argument to the function dvb_attach. dvb_attach calls its first argument on the rest of its arguments. The first argument of dvb_attach in the changed cases is stv0299_attach and the parameter of this function to which the object references are passed is of type const. So, stv0299_config structures having this property can be made const. First line shows the file size before patching and second one shows size after patching. text data bss dec hex filename 9572 926 40 10538 292a media/pci/dm1105/dm1105.o 9636 862 40 10538 292a media/pci/dm1105/dm1105.o 15133 5408 0 20541 503d media/pci/ttpci/budget-av.o 15389 5152 0 20541 503d media/pci/ttpci/budget-av.o 15703 2326 36 18065 4691 media/pci/ttpci/budget-ci.o 15767 2262 36 18065 4691 media/pci/ttpci/budget-ci.o 10555 1918 4 12477 30bd drivers/media/pci/ttpci/budget.o 10683 1822 4 12509 30dd drivers/media/pci/ttpci/budget.o Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/dm1105/dm1105.c | 2 +- drivers/media/pci/ttpci/budget-av.c | 8 ++++---- drivers/media/pci/ttpci/budget-ci.c | 2 +- drivers/media/pci/ttpci/budget.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) commit a2c97909f97ef32b76e856572fba4f77e1885fe6 Author: Josef Bacik Date: Thu Apr 6 17:02:07 2017 -0400 nbd: add a flag to destroy an nbd device on disconnect For ease of management it would be nice for users to specify that the device node for a nbd device is destroyed once it is disconnected and there are no more users. Add a client flag and enable this operation to happen. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 30 ++++++++++++++++++++++++++++++ include/uapi/linux/nbd.h | 6 +++++- 2 files changed, 35 insertions(+), 1 deletion(-) commit c6a4759ea0c9a7e7661f34f6943dafb1c6ae1b1c Author: Josef Bacik Date: Thu Apr 6 17:02:06 2017 -0400 nbd: add device refcounting In order to support deleting the device on disconnect we need to refcount the actual nbd_device struct. So add the refcounting framework and change how we free the normal devices at rmmod time so we can catch reference leaks. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 104 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 86 insertions(+), 18 deletions(-) commit 47d902b90a32a42a3d33aef3a02170fc6f70aa23 Author: Josef Bacik Date: Thu Apr 6 17:02:05 2017 -0400 nbd: add a status netlink command Allow users to query the status of existing nbd devices. Right now this only returns whether or not the device is connected, but could be extended in the future to include more information. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 108 +++++++++++++++++++++++++++++++++++++++ include/uapi/linux/nbd-netlink.h | 25 +++++++++ 2 files changed, 133 insertions(+) commit 560bc4b39952ed77cdb0000992e9415b0ee89edb Author: Josef Bacik Date: Thu Apr 6 17:02:04 2017 -0400 nbd: handle dead connections Sometimes we like to upgrade our server without making all of our clients freak out and reconnect. This patch provides a way to specify a dead connection timeout to allow us to pause all requests and wait for new connections to be opened. With this in place I can take down the nbd server for less than the dead connection timeout time and bring it back up and everything resumes gracefully. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 63 +++++++++++++++++++++++++++++++++++++--- include/uapi/linux/nbd-netlink.h | 1 + 2 files changed, 60 insertions(+), 4 deletions(-) commit 2516ab1543fdd1f9d08385d73cae51f668a9f3dc Author: Josef Bacik Date: Thu Apr 6 17:02:03 2017 -0400 nbd: only clear the queue on device teardown When running a disconnect torture test I noticed that sometimes we would crash with a negative ref count on our queue. This was because we were ending the same request twice. Turns out we were racing with NBD_CLEAR_SOCK clearing the requests as well as the teardown of the device clearing the requests. So instead make the ioctl only shutdown the sockets and make it so that we only ever run nbd_clear_que from the device teardown. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 799f9a38bc9f5551819fd118a82826df0a8525cf Author: Josef Bacik Date: Thu Apr 6 17:02:02 2017 -0400 nbd: multicast dead link notifications Provide a mechanism to notify userspace that there's been a link problem on a NBD device. This will allow userspace to re-establish a connection and provide the new socket to the device without disrupting the device. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 89 ++++++++++++++++++++++++++++++++++------ include/uapi/linux/nbd-netlink.h | 6 ++- 2 files changed, 81 insertions(+), 14 deletions(-) commit b7aa3d39385dc2d95899f9e379623fef446a2acd Author: Josef Bacik Date: Thu Apr 6 17:02:01 2017 -0400 nbd: add a reconfigure netlink command We want to be able to reconnect dead connections to existing block devices, so add a reconfigure netlink command. We will also allow users to change their timeout on the fly, but everything else will require a disconnect and reconnect. You won't be able to add more connections either, simply replace dead connections with new more lively connections. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 141 +++++++++++++++++++++++++++++++++++++++ include/uapi/linux/nbd-netlink.h | 1 + 2 files changed, 142 insertions(+) commit e46c7287b1c27683a8e30ca825fb98e2b97f1099 Author: Josef Bacik Date: Thu Apr 6 17:02:00 2017 -0400 nbd: add a basic netlink interface The existing ioctl interface for configuring NBD devices is a bit cumbersome and hard to extend. The other problem is we leave a userspace app sitting in it's syscall until the device disconnects, which is less than ideal. This patch introduces a netlink interface for adding and disconnecting nbd devices. This has the benefits of being easily extendable without breaking older userspace applications, and allows us to configure a nbd device without leaving a userspace app sitting waiting for the device to disconnect. With this interface we also gain the ability to configure more devices than are preallocated at insmod time. We also have gained the ability to not specify a particular device and be provided one for us so that userspace doesn't need to find a free device to configure. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 316 +++++++++++++++++++++++++++++++++++---- include/uapi/linux/nbd-netlink.h | 69 +++++++++ 2 files changed, 359 insertions(+), 26 deletions(-) commit 29eaadc0364943b6352e8994158febcb699c9f9b Author: Josef Bacik Date: Thu Apr 6 17:01:59 2017 -0400 nbd: stop using the bdev everywhere In preparation for the upcoming netlink interface we need to not rely on already having the bdev for the NBD device we are doing operations on. Instead of passing the bdev around, just use it in places where we know we already have the bdev. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 92 +++++++++++++++++++++-------------------------------- 1 file changed, 37 insertions(+), 55 deletions(-) commit 5ea8d10802ec4c153a6e21eebaf412e2abd29736 Author: Josef Bacik Date: Thu Apr 6 17:01:58 2017 -0400 nbd: separate out the config information In order to properly refcount the various aspects of a NBD device we need to separate out the configuration elements of the nbd device. The configuration of a NBD device has a different lifetime from the actual device, so it doesn't make sense to bundle these two concepts. Add a config_refs to keep track of the configuration structure, that way we can be sure that we never access it when we've torn down the device. Add a new nbd_config structure to hold all of the transient configuration information. Finally create this when we open the device so that it is in place when we start to configure the device. This has a nice side-effect of fixing a long standing problem where you could end up with a half-configured nbd device that needed to be "disconnected" in order to be usable again. Now once we close our device the configuration will be discarded. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 437 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 263 insertions(+), 174 deletions(-) commit f3733247ae7c5fc0fa4c7303438f9e18a6ebb5ec Author: Josef Bacik Date: Thu Apr 6 17:01:57 2017 -0400 nbd: handle single path failures gracefully Currently if we have multiple connections and one of them goes down we will tear down the whole device. However there's no reason we need to do this as we could have other connections that are working fine. Deal with this by keeping track of the state of the different connections, and if we lose one we mark it as dead and send all IO destined for that socket to one of the other healthy sockets. Any outstanding requests that were on the dead socket will timeout and be re-submitted properly. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 151 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 125 insertions(+), 26 deletions(-) commit 9b1355d5e3f094ef671033f38c4357cd1455c571 Author: Josef Bacik Date: Thu Apr 6 17:01:56 2017 -0400 nbd: put socket in error cases When adding a new socket we look it up and then try to add it to our configuration. If any of those steps fail we need to make sure we put the socket so we don't leak them. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 713be96a89c581665ba8378d42b4958a9574e367 Author: Bhumika Goyal Date: Sun Feb 19 14:39:06 2017 -0300 [media] pci: mantis: constify mb86a16_config structure Declare mb86a16_config structure as const as it is either passed as an argument to the function dvb_attach or is dereferenced. dvb_attach calls its first argument on the rest of its arguments. The first argument of dvb_attach in the changed case is mb86a16_attach and the parameter of this function to which the object reference is passed is of type const. So, mb86a16_config structures having this property can be made const. Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/mantis/mantis_vp1034.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0244fd78231db16a9b0e44ac76da6a6208dc5ad4 Author: Bhumika Goyal Date: Sun Feb 19 14:29:07 2017 -0300 [media] cx88: constify mb86a16_config structure Declare mb86a16_config structure as const as it is only passed as an argument to the function dvb_attach. dvb_attach calls its first argument on the rest of its arguments. The first argument of dvb_attach in the changed case is mb86a16_attach and the parameter of this function to which the object reference is passed is of type const. So, mb86a16_config structures having this property can be made const. Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx88/cx88-dvb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f558461335922afeb21650a3bddb1b58d183ab7f Author: Bhumika Goyal Date: Sun Feb 19 10:06:38 2017 -0300 [media] saa7134: constify nxt200x_config structures Declare nxt200x_config structures as const as they are only passed as an argument to the function dvb_attach. dvb_attach calls its first argument on the rest of its arguments. The first argument of dvb_attach in the changed cases is nxt200x_attach and the parameter of this function to which the object references are passed is of type const. So, nxt200x_config structures having this property can be made const. File size before: text data bss dec hex filename 21320 3776 16 25112 6218 saa7134/saa7134-dvb.o File size after: text data bss dec hex filename 21384 3744 16 25144 6238 saa7134/saa7134-dvb.o Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/saa7134/saa7134-dvb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c5db7475a8e22c345f3442b7e4c4ab96d99dacf3 Author: Bhumika Goyal Date: Sun Feb 19 09:59:52 2017 -0300 [media] b2c2: constify nxt200x_config structure Declare nxt200x_config structure as const as it is only passed as an argument to the function dvb_attach. dvb_attach calls its first argument on the rest of its arguments. The first argument of dvb_attach in the changed case is nxt200x_attach and the parameter of this function to which the object reference is passed is of type const. So, nxt200x_config structures having this property can be made const. File size before: text data bss dec hex filename 7566 568 0 8134 1fc6 common/b2c2/flexcop-fe-tuner.o File size after: text data bss dec hex filename 7582 536 0 8118 1fb6 common/b2c2/flexcop-fe-tuner.o Signed-off-by: Bhumika Goyal Signed-off-by: Mauro Carvalho Chehab drivers/media/common/b2c2/flexcop-fe-tuner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf05b65a9fe5f6a6dd3e72cab2aacd8b5b96e41d Author: Ben Hutchings Date: Fri Feb 17 22:30:51 2017 -0200 [media] dvb-usb-dibusb-mc-common: Add MODULE_LICENSE dvb-usb-dibusb-mc-common is licensed under GPLv2, and if we don't say so then it won't even load since it needs a GPL-only symbol. Fixes: e91455a1495a ("[media] dvb-usb: split out common parts of dibusb") Reported-by: Dominique Dumont Cc: stable@vger.kernel.org # 4.9+ Signed-off-by: Ben Hutchings Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dibusb-mc-common.c | 2 ++ 1 file changed, 2 insertions(+) commit 21f9f2ef7c12dcefbdadaf96382bf547f84f23b3 Author: Colin Ian King Date: Fri Feb 17 14:17:30 2017 -0200 [media] Staging: media/lirc: don't call put_ir_rx on rx twice There is an exit path where rx is kfree'd on put_ir_rx and then a jump to label out_put_xx will again kfree it with another call to put_ir_rx. Fix this by adding a new label that avoids this 2nd call to put_ir_rx for this specific case. Detected with CoverityScan, CID#145119 ("Use after free") Signed-off-by: Colin Ian King Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_zilog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 70d40b366d2f7c2facaa3bc20f26e562e91ce94d Merge: f72860a 93d576a Author: David S. Miller Date: Mon Apr 17 11:08:33 2017 -0400 Merge branch 'mlx5-RDMA-netdevice' Saeed Mahameed says: ==================== Mellanox, mlx5 RDMA net device support This series provides the lower level mlx5 support of RDMA netdevice creation API [1] suggested and introduced by Intel's HFI OPA VNIC netdevice driver [2], to enable IPoIB mlx5 RDMA netdevice creation. mlx5 IPoIB RDMA netdev will serve as an acceleration netdevice for the current IPoIB ULP generic netdevice, providing: - mlx5 RSS support. - mlx5 HW RX,TX offloads (checksum, TSO, LRO, etc ..). - Full mlx5 HW features transparent to the ULP itself. The idea here is to reuse and benefit from the already implemented mlx5e netdevice management and channels API for both etherent and RDMA netdevices, since both IPoIB and Ethernet netdevices share same common mlx5 HW resources (with some small exceptions) and share most of the control/data path logic, it is more natural to have them share the same code. The differences between IPoIB and Ethernet netdevices can be summarized to: Steering: In mlx5, IPoIB traffic is sent and received from an underlay special QP, and in Ethernet the traffic is handled by vports and vport steering is managed by e-switch or FW. For IPoIB traffic to get steered correctly the only thing we need to do is to create RSS HW contexts for RX and TX HW contexts for TX (similar to mlx5e) with the underlay QP attached to them (underlay QP will be 0 in case of Ethernet). RX,TX: Since IPoIB traffic is different, slightly modified RX and TX handlers are required, still we do some code reuse in data path via common helper functions. All of the other generic netdevice and mlx5 aspects will be shared between mlx5 Ethernet and IPoIB netdevices, e.g. - Channels creation and handling (RQs,SQs,CQs, NAPI, interrupt moderation, etc..) - Offloads, checksum, GRO, LRO, TSO, and more. - netdevice logic and non Ethernet specific ndos (open/close, etc..) In order to achieve what we want: In patchet 1 to 3, Erez added the supported for underlay QP in mlx5_ifc and refactored the mlx5 steering code to accept the underlay QP as a parameter for creating steering objects and enabled flow steering for IB link. Then we are going to use the mlx5e netdevice profile, which is already used to separate between NIC and VF representors netdevices, to create new type of IPoIB netdevice profile. For that, one small refactoring is required to make mlx5e netdevice profile management more genetic and agnostic to link type which is done in patch #4. In patch #5, we introduce ipoib.c to host all of mlx5 IPoIB (mlx5i) specific logic and a skeleton for the IPoIB mlx5 netdevice profile, and we will start filling it in next patches, using mlx5e already existing APIs. Patch #6 and #7, Implement init/cleanup RX mlx5i netdev profile handlers to create mlx5 RSS resources, same as mlx5e but without vlan and L2 steering tables. Patch #8, Implement init/cleanup TX mlx5i netdev profile handlers, to create TX resources same as mlx5e but with one TC (tc = 0) support. Patch #9, Implement mlx5i open/close ndos, where we reuese the mlx5e channels API, to start/stop TX/RX channels. Patch #10, Create the underlay QP and attach it to mlx5i RSS and TX HW contexts. Patch #11 and #12, Break down the mlx5e xmit flow into smaller helper function and implement the mlx5i IPoIB xmit routine. Patch #13 and #14, Have an RX handler per netdevice profile. We already do this before this series in a non clean way to separate between NIC netdev and VF representor RX handlers, in patch 13 we make the RX handler generic and bound to a profile and in patch 14 we implement the IPoIB RX handlers. Patch #15, Small cleanup to avoid e-switch with IPoIB netdev. In order to enable mlx5 IPoIB, a merge between the IPoIB RDMA netdev offolad support [3] - which was alread submitted to the rdma mailing list - and this series is required plus an extra small patch [4] which will connect between both sides and actually enables the offload. Once both patch-sets are merged into linux we will have to submit the extra small patch [4], to enable the feature. Thanks, Saeed. [1] https://patchwork.kernel.org/patch/9676637/ [2] https://lwn.net/Articles/715453/ https://patchwork.kernel.org/patch/9587815/ [3] https://patchwork.kernel.org/patch/9672069/ [4] https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git/commit/?id=0141db6a686e32294dee015b7d07706162ba48d8 ==================== Signed-off-by: David S. Miller commit 93d576af3cc8a20f94c96448ef6cf4c21d552fa0 Author: Erez Shitrit Date: Thu Apr 13 06:37:06 2017 +0300 hw/mlx5: Add New bit to check over QP creation Add check for bit IB_QP_CREATE_NETIF_QP while creating QP. Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/infiniband/hw/mlx5/qp.c | 1 + 1 file changed, 1 insertion(+) commit 955bc48081805c053aa53943b2904cb68569a364 Author: Saeed Mahameed Date: Thu Apr 13 06:37:05 2017 +0300 net/mlx5e: E-switch vport manager is valid for ethernet only Currently the driver support only ethernet eswitch, and we want to protect downstream IPoIB netdev from trying to access it in IB link. Signed-off-by: Saeed Mahameed Reviewed-by: Erez Shitrit Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 9d6bd752c63c17419855bce1992e7b75af7370eb Author: Saeed Mahameed Date: Thu Apr 13 06:37:04 2017 +0300 net/mlx5e: IPoIB, RX handler Implement IPoIB RX SKB handler. Signed-off-by: Saeed Mahameed Reviewed-by: Erez Shitrit Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 78 +++++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 2 + drivers/net/ethernet/mellanox/mlx5/core/ipoib.h | 1 + 3 files changed, 81 insertions(+) commit 20fd0c193ff6384717a6d500aa0e737a81c6a1fa Author: Saeed Mahameed Date: Thu Apr 13 06:37:03 2017 +0300 net/mlx5e: RX handlers per netdev profile In order to have different RX handler per profile, fix and refactor the current code to take the rx handler directly from the netdevice profile rather than computing it on runtime as it was done with the switchdev mode representor rx handler. This will also remove the current wrong assumption in mlx5e_alloc_rq code that mlx5e_priv->ppriv is of the type vport_rep. Signed-off-by: Saeed Mahameed Reviewed-by: Erez Shitrit Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 5 +++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 28 ++++++++++++++--------- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 4 +++- 3 files changed, 24 insertions(+), 13 deletions(-) commit 258545449b7b410727b516b782256f8a3bde8bf2 Author: Saeed Mahameed Date: Thu Apr 13 06:37:02 2017 +0300 net/mlx5e: IPoIB, Xmit flow Implement mlx5e's IPoIB SKB transmit using the helper functions provided by mlx5e ethernet tx flow, the only difference in the code between mlx5e_xmit and mlx5i_xmit is that IPoIB has some extra fields to fill (UD datagram segment) in the TX descriptor (WQE) and it doesn't need to have any vlan handling. Signed-off-by: Saeed Mahameed Reviewed-by: Erez Shitrit Signed-off-by: David S. Miller drivers/infiniband/hw/mlx5/mlx5_ib.h | 10 --- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 87 +++++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 10 +++ drivers/net/ethernet/mellanox/mlx5/core/ipoib.h | 3 + include/linux/mlx5/qp.h | 10 +++ 5 files changed, 110 insertions(+), 10 deletions(-) commit 77bdf8950b3cd17c780b4e5a2803806a9f573f51 Author: Saeed Mahameed Date: Thu Apr 13 06:37:01 2017 +0300 net/mlx5e: Xmit flow break down Break current mlx5e xmit flow into smaller blocks (helper functions) in order to reuse them for IPoIB SKB transmission. Signed-off-by: Saeed Mahameed Reviewed-by: Erez Shitrit Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7 +- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 199 +++++++++++++--------- 3 files changed, 119 insertions(+), 89 deletions(-) commit ec8fd927b7a9006425f34dc51880e9fed582c4a7 Author: Saeed Mahameed Date: Thu Apr 13 06:37:00 2017 +0300 net/mlx5e: IPoIB, Underlay QP Create IPoIB underlay QP needed by the IPoIB netdevice profile for RSS and TX HW context to perform on IPoIB traffic. Reset the underlay QP on dev_uninit ndo to stop IPoIB traffic going through this QP when the ULP IPoIB decides to cleanup. Implement attach/detach mcast RDMA netdev callbacks for later RDMA netdev use. Signed-off-by: Saeed Mahameed Reviewed-by: Erez Shitrit Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 126 +++++++++++++++++++++++- 1 file changed, 124 insertions(+), 2 deletions(-) commit 603f4a45214d602f27749ad8b3bb6bd767dac2d5 Author: Saeed Mahameed Date: Thu Apr 13 06:36:59 2017 +0300 net/mlx5e: IPoIB, Basic netdev ndos open/close Implement open/close of IPoIB netdevice ndos using mlx5e's channels API to manage data path resources (RQs/SQs/CQs). Set IPoIB netdev address on dev_init ndo. Signed-off-by: Saeed Mahameed Reviewed-by: Erez Shitrit Signed-off-by: David S. Miller 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/ipoib.c | 90 ++++++++++++++++++++++- 3 files changed, 93 insertions(+), 3 deletions(-) commit 5426a0b2746a629eed8608397a385f34081f3f66 Author: Saeed Mahameed Date: Thu Apr 13 06:36:58 2017 +0300 net/mlx5e: IPoIB, TX TIS creation Modify mlx5e tis creation function to accept underlay qp number, which will be needed by IPoIB. Implement mlx5i (IPoIB) tx init/cleanup netdevice profile flows to create one TIS with the IPoIB underlay qp, for IPoIB TX SQs. Signed-off-by: Saeed Mahameed Reviewed-by: Erez Shitrit Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 ++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 18 ++++++++++-------- drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 14 ++++++++++++-- 3 files changed, 26 insertions(+), 10 deletions(-) commit bc81b9d3267c4d23d829e9af88b21eb46d9d388b Author: Saeed Mahameed Date: Thu Apr 13 06:36:57 2017 +0300 net/mlx5e: IPoIB, RSS flow steering tables Like the mlx5e ethernet mode, on IPoIB mode we need to create RX steering tables, but IPoIB do not require MAC and VLAN steering tables so the only tables we create in here are: 1. TTC Table (Traffic Type Classifier table for RSS steering) 2. ARFS Table (for accelerated RFS support) Creation of those tables is identical to mlx5e ethernet mode, hence the use of mlx5e_create_ttc_table and mlx5e_arfs_create_tables. Signed-off-by: Saeed Mahameed Reviewed-by: Erez Shitrit Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 +++ drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 7 ++-- drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 46 +++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 3 deletions(-) commit 8f493ffd88eac1b45685f0f21005b65352320b8a Author: Saeed Mahameed Date: Thu Apr 13 06:36:56 2017 +0300 net/mlx5e: IPoIB, RX steering RSS RQTs and TIRs Implement IPoIB RX RSS (RQTs and TIRs) HW objects creation, All we do here is simply reuse the mlx5e implementation to create direct and indirect (RSS) steering HW objects. For that we just expose mlx5e_{create,destroy}_{direct,indirect}_{rqt,tir} functions into en.h and call them from ipoib.c in init/cleanup_rx IPoIB netdevice profile callbacks. Signed-off-by: Saeed Mahameed Reviewed-by: Erez Shitrit Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 12 ++++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 56 ++++++++++++----------- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 17 ++----- drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 42 +++++++++++++++-- 4 files changed, 83 insertions(+), 44 deletions(-) commit 48935bbb7ae8bd4157a84fe12da48cd8d337c40a Author: Saeed Mahameed Date: Thu Apr 13 06:36:55 2017 +0300 net/mlx5e: IPoIB, Add netdevice profile skeleton Create mlx5e IPoIB netdevice profile skeleton in the new ipoib.c file with empty implementation. Downstream patches will provide the full mlx5 rdma netdevice acceleration support for IPoIB into this new file, by using the mlx5e netdevice profile and new mlx5_channels APIs and infrastructures. Same as already done in mlx5e NIC netdevice and switchdev mode VF representors. Signed-off-by: Saeed Mahameed Reviewed-by: Erez Shitrit Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 7 + 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 | 9 -- drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 181 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/ipoib.h | 50 ++++++ 6 files changed, 249 insertions(+), 9 deletions(-) commit 2c3b5beec46ab0d77c94828eb15170b333ae769a Author: Saeed Mahameed Date: Thu Apr 13 06:36:54 2017 +0300 net/mlx5e: More generic netdev management API In preparation for mlx5e RDMA net_device support, here we generalize mlx5e_attach/detach in a way that those functions will be agnostic to link type. For that we move ethernet specific NIC net device logic out of those functions into {nic,rep}_{enable/disable} mlx5e NIC and representor profiles callbacks. Also some of the logic was moved only to NIC profile since it is not right to have this logic for representor net device (e.g. set port MTU). Signed-off-by: Saeed Mahameed Reviewed-by: Erez Shitrit Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 15 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 160 +++++++++++----------- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 12 +- 3 files changed, 96 insertions(+), 91 deletions(-) commit ffdb8827ec31f63f5db242937c3233bedfeb8702 Author: Erez Shitrit Date: Thu Apr 13 06:36:53 2017 +0300 net/mlx5: Enable flow-steering for IB link Get the relevant capabilities if supports ipoib_enhanced_offloads and init the flow steering table accordingly. Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 11 ++++------- drivers/net/ethernet/mellanox/mlx5/core/fw.c | 3 ++- 2 files changed, 6 insertions(+), 8 deletions(-) commit b3ba51498bddd72a526d9067b8b0ecf4932ce57e Author: Erez Shitrit Date: Thu Apr 13 06:36:52 2017 +0300 net/mlx5: Refactor create flow table method to accept underlay QP IB flow tables need the underlay qp to perform flow steering. Here we change the API of the flow tables creation to accept the underlay QP number as a parameter in order to support IB (IPoIB) flow steering. Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c | 10 ++- drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 25 +++++-- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 5 +- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 16 +++-- drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 8 +++ drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 84 +++++++++++++--------- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 1 + include/linux/mlx5/fs.h | 14 ++-- 8 files changed, 113 insertions(+), 50 deletions(-) commit 500a3d0ded5ee41072d0f084bff938747ee0c125 Author: Erez Shitrit Date: Thu Apr 13 06:36:51 2017 +0300 net/mlx5: Add IPoIB enhanced offloads bits to mlx5_ifc New capability bit: ipoib_enhanced_offloads, indicates new ability for UD QP to do RSS and enhanced IPoIB offloads and acceleration. Add underlay_qpn to the TIS and flow_table objects In order to support SET_ROOT command, to connect between IPoIB QPs and flow steering tables. Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller include/linux/mlx5/mlx5_ifc.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit f72860afa2e32cdc674cbdd7f354f8fb62e908a6 Author: Haiyang Zhang Date: Wed Apr 12 11:45:18 2017 -0700 hv_netvsc: Exclude non-TCP port numbers from vRSS hashing Azure hosts are not supporting non-TCP port numbers in vRSS hashing for now. For example, UDP packet loss rate will be high if port numbers are also included in vRSS hash. So, we created this patch to use only IP numbers for hashing in non-TCP traffic. Signed-off-by: Haiyang Zhang Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) commit 8db91f6a9b2ff2bb5355ad11c668fe63eb8ae0c3 Author: Haiyang Zhang Date: Wed Apr 12 11:35:05 2017 -0700 hv_netvsc: Fix the queue index computation in forwarding case If the outgoing skb has a RX queue mapping available, we use the queue number directly, other than put it through Send Indirection Table. Signed-off-by: Haiyang Zhang Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 2 +- drivers/net/hyperv/netvsc_drv.c | 44 ++++++++++++++++++++++++++++------------- 2 files changed, 31 insertions(+), 15 deletions(-) commit a6a71f19fe5e05a90e0bd2487b87aba60a7bfbe0 Author: Vivien Didelot Date: Wed Apr 12 12:45:03 2017 -0400 net: dsa: isolate legacy code This patch moves as is the legacy DSA code from dsa.c to legacy.c, except the few shared symbols which remain in dsa.c. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/net/dsa.h | 4 +- net/dsa/Makefile | 2 +- net/dsa/dsa.c | 768 +------------------------------------------------ net/dsa/dsa_priv.h | 4 + net/dsa/legacy.c | 818 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 828 insertions(+), 768 deletions(-) commit fcdc71257923263d042236eaf62bae5e033757b5 Author: Steven Rostedt (VMware) Date: Mon Apr 17 10:22:29 2017 -0400 ftrace: Fix indexing of t_hash_start() from t_next() t_hash_start() does not increment *pos, where as t_next() must. But when t_next() does increment *pos, it must still pass in the original *pos to t_hash_start() otherwise it will skip the first instance: # cd /sys/kernel/debug/tracing # echo schedule:traceoff > set_ftrace_filter # echo do_IRQ:traceoff > set_ftrace_filter # echo call_rcu > set_ftrace_filter # cat set_ftrace_filter call_rcu schedule:traceoff:unlimited do_IRQ:traceoff:unlimited The above called t_hash_start() from t_start() as there was only one function (call_rcu), but if we add another function: # echo xfrm_policy_destroy_rcu >> set_ftrace_filter # cat set_ftrace_filter call_rcu xfrm_policy_destroy_rcu do_IRQ:traceoff:unlimited The "schedule:traceoff" disappears. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 56b27d4dd3eccff618be2f8417aef86f59a2c0d4 Author: Joe Perches Date: Fri Feb 17 05:11:35 2017 -0200 [media] drivers/media: Convert remaining use of pr_warning to pr_warn To enable eventual removal of pr_warning This makes pr_warn use consistent for drivers/media Prior to this patch, there was 1 use of pr_warning and 310 uses of pr_warn in drivers/media Signed-off-by: Joe Perches Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sh_vou.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2c4fd1ac3ff167c91272dc43c7bfd2269ef61557 Author: Matthias Kaehlcke Date: Thu Apr 13 10:26:09 2017 -0700 x86/kbuild: Use cc-option to enable -falign-{jumps/loops} clang currently does not support these optimizations, only enable them when they are available. Signed-off-by: Matthias Kaehlcke Cc: Greg Hackmann Cc: Linus Torvalds Cc: Masahiro Yamada Cc: Michael Davidson Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: grundler@chromium.org Link: http://lkml.kernel.org/r/20170413172609.118122-1-mka@chromium.org Signed-off-by: Ingo Molnar arch/x86/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 197decefdb79d6f1350ba0316ce26ba737372d0c Author: Ard Biesheuvel Date: Mon Apr 17 10:32:01 2017 +0100 efi/libstub/arm: Don't use TASK_SIZE when randomizing the RT space As reported by James, Catalin and Mark, commit: e69176d68d26 ("ef/libstub/arm/arm64: Randomize the base of the UEFI rt services region") ... results in a crash in the firmware, regardless of whether KASLR is in effect or not and whether the firmware implements EFI_RNG_PROTOCOL or not. Mark has identified the root cause to be the inappropriate use of TASK_SIZE in the stub, which arm64 defines as: #define TASK_SIZE (test_thread_flag(TIF_32BIT) ? \ TASK_SIZE_32 : TASK_SIZE_64) and testing thread flags at this point results in the dereference of pointers in uninitialized structures. So instead, introduce a preprocessor symbol EFI_RT_VIRTUAL_LIMIT and define it to TASK_SIZE_64 on arm64 and TASK_SIZE on ARM, both of which are compile time constants. Also, change the 'headroom' variable to static const to force an error if this might change in the future. Tested-by: Mark Rutland Tested-by: James Morse Tested-by: Catalin Marinas Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170417093201.10181-2-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/libstub/arm-stub.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 821596a50aba6873ff4ea8fdf2b1515638c3c8a3 Merge: 2886a73 6f9c890 Author: Thomas Gleixner Date: Mon Apr 17 10:55:14 2017 +0200 Merge branch 'clockevents/4.12' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clockevents updates from Daniel Lezcano - Provide a framework to handle errata gracefuly for arm_arch_timer (Mark Zyngier) - Clarify the DT properties for the rockchip timer and add the clocksource as an alternative to the bogus architected timer (Alexander Kochetkov) - Rename the Gemini timer to Faraday timer fttmr010 and provide a specific initialization for Gemini (Linus Walleij) - Add missing newlines in the error message in the timers (Rafał Miłecki) - Read the clock once and implement the delay timer on Orion (Russell King) commit a5f8661df0190f206ec73bd42b756d889c16150d Author: Mauro Carvalho Chehab Date: Sun Apr 16 21:51:11 2017 -0300 ALSA: usb-audio: replace /proc/bus/usb by /dev/bus/usb The /proc/bus/usb devices don't exist anymore, since when we got rid of usbfs. Those devices are now seen at /dev/bus/usb. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Takashi Iwai sound/usb/usx2y/us122l.c | 2 +- sound/usb/usx2y/usX2Yhwdep.c | 2 +- sound/usb/usx2y/usx2yhwdeppcm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit a83827d04f081b1a73845553c7f60ab9cfd13767 Author: Thomas Gleixner Date: Mon Apr 17 09:57:10 2017 +0200 x86/intel_rdt: Get rid of anon union gcc-4.4.3 fails to statically initialize members of a anon union. See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 The storage saving is not really worth it and aside of that it will catch usage of the cache member for bandwidth and vice versa easier. Fixes: 05b93417ce5b ("x86/intel_rdt/mba: Add primary support for Memory Bandwidth Allocation (MBA)") Reported-by: Fengguang Wu Signed-off-by: Thomas Gleixner arch/x86/include/asm/intel_rdt.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e720c19e0d5412f45736d62258d21dc7b056c4ad Merge: fd583ad 16eb813 Author: Ingo Molnar Date: Mon Apr 17 10:11:09 2017 +0200 Merge tag 'perf-core-for-mingo-4.12-20170413' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes Arnaldo Carvalho de Melo: User visible changes: - Fix 'perf stat' bug in handling events in error state (Stephane Eranian) Documentation changes: - Add usage of --no-syscalls in 'perf trace' man page (Ravi Bangoria) Infrastructure changes: - Pass PYTHON config to feature detection (David Carrillo-Cisneros) - Disable JVMTI if no ELF support available (David Carrillo-Cisneros) - Fix feature detection redefinion of build flags (David Carrillo-Cisneros) - Hint missing file when tool tips fail to load (David Carrillo-Cisneros) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 15a0654851382faaf41a8da6d4e10201091246b9 Merge: 7f1534e 4f7d029 Author: Greg Kroah-Hartman Date: Mon Apr 17 09:07:37 2017 +0200 Merge 4.11-rc7 into tty-next We want the tty patch revert in here to handle merges and future work properly. Signed-off-by: Greg Kroah-Hartman commit 01a2197485a9917216ad67ced4bafed9f7942f5a Author: Eric W. Biederman Date: Thu Apr 13 10:32:16 2017 -0500 posix-timers: Correct sanity check in posix_cpu_nsleep CPUCLOCK_PID(which_clock) is a pid value from userspace so compare it against task_pid_vnr, not current->pid. As task_pid_vnr is in the tasks pid value in the tasks pid namespace, and current->pid is in the initial pid namespace. Signed-off-by: "Eric W. Biederman" kernel/time/posix-cpu-timers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b54807fa52ae21bdf6bad72b0f00fd400af412eb Author: Eric W. Biederman Date: Fri Mar 24 08:38:20 2017 -0500 sysctl: Remove dead register_sysctl_root The function no longer does anything. The is only a single caller of register_sysctl_root when semantically there should be two. Remove this function so that if someone decides this functionality is needed again it will be obvious all of the callers of setup_sysctl_set need to be audited and modified appropriately. Signed-off-by: "Eric W. Biederman" fs/proc/proc_sysctl.c | 4 ---- include/linux/sysctl.h | 1 - net/sysctl_net.c | 1 - 3 files changed, 6 deletions(-) commit 5ed8a1c19d4655e6ca5768266b2f51a9d58b8a76 Merge: 39b64aa 630e575 Author: Rafael J. Wysocki Date: Mon Apr 17 01:13:02 2017 +0200 Merge branch 'intel_pstate' into pm-cpufreq-sched commit 4ea206395d3aede32bab94a75ec573530486fa44 Author: Al Viro Date: Mon Apr 17 00:42:22 2017 +0200 nfc: fix get_unaligned_...() misuses * if a local variable of type uint16_t is unaligned, your compiler is FUBAR * the whole point of get_unaligned_... is to avoid memcpy + ..._to_cpu(). Using it *after* memcpy() (into aligned object, no less) is pointless. Signed-off-by: Al Viro Signed-off-by: Samuel Ortiz drivers/nfc/nfcmrvl/fw_dnld.c | 5 ++--- drivers/nfc/nxp-nci/i2c.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) commit 8b55d7581fc5dccc658b9a169879c46dda807d5e Author: Michał Mirosław Date: Thu Apr 6 05:49:02 2017 +0200 NFC: pn533: use constant off-stack buffer for sending acks fix for WARN: usb 3-2.4.1: NFC: Exchanging data failed (error 0x13) llcp: nfc_llcp_recv: err -5 llcp: nfc_llcp_symm_timer: SYMM timeout ------------[ cut here ]------------ WARNING: CPU: 1 PID: 26397 at .../drivers/usb/core/hcd.c:1584 usb_hcd_map_urb_for_dma+0x370/0x550 transfer buffer not dma capable [...] Workqueue: events nfc_llcp_timeout_work [nfc] Call Trace: ? dump_stack+0x46/0x5a ? __warn+0xb9/0xe0 ? warn_slowpath_fmt+0x5a/0x80 ? usb_hcd_map_urb_for_dma+0x370/0x550 ? usb_hcd_submit_urb+0x2fb/0xa60 ? dequeue_entity+0x3f2/0xc30 ? pn533_usb_send_ack+0x5d/0x80 [pn533_usb] ? pn533_usb_abort_cmd+0x13/0x20 [pn533_usb] ? pn533_dep_link_down+0x32/0x70 [pn533] ? nfc_dep_link_down+0x87/0xd0 [nfc] [...] usb 3-2.4.1: NFC: Exchanging data failed (error 0x13) llcp: nfc_llcp_recv: err -5 llcp: nfc_llcp_symm_timer: SYMM timeout Signed-off-by: Michał Mirosław Signed-off-by: Samuel Ortiz drivers/nfc/pn533/i2c.c | 2 +- drivers/nfc/pn533/usb.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 77f8f39a2e463eca89a19b916189d0e4e38f75d8 Author: Josh Poimboeuf Date: Thu Apr 13 17:59:15 2017 -0500 livepatch: add missing printk newlines Add missing newlines to some pr_err() strings. Signed-off-by: Josh Poimboeuf Acked-by: Miroslav Benes Acked-by: Jessica Yu Signed-off-by: Jiri Kosina kernel/livepatch/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c99a30d8c4d5e26e69fe3c01c4caf7b6f309e026 Merge: 879bce2 d1d84bb Author: Wolfram Sang Date: Sun Apr 16 22:03:54 2017 +0200 Merge branch 'i2c/for-INT33FE' into i2c/for-4.12 Pull in the immutable branch with I2C ACPI core extensions to support the INT33FE driver. commit d1d84bb95364ed604015c2b788caaf3dbca0262f Author: Hans de Goede Date: Wed Apr 5 00:03:34 2017 +0200 i2c: core: Allow drivers to disable i2c-core irq mapping By default the i2c-core will try to get an irq with index 0 on ACPI / of instantiated devices. This is troublesome on some ACPI systems where the irq info at index 0 in the CRS table may contain nonsense and/or point to an irqchip for which there is no Linux driver. If this happens then before this commit the driver's probe method would never get called because i2c_device_probe will try to get an irq by calling acpi_dev_gpio_irq_get which will always return -EPROBE in this case, as it waits for a matching irqchip driver to load. Thus causing the driver to not get a chance to bind. This commit adds a new disable_i2c_core_irq_mapping flag to struct i2c_driver which a driver can set to tell the core to skip irq mapping. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/i2c-core.c | 6 +++--- include/linux/i2c.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) commit 605f8fc2244236f8d6bf15bcc0586644af3a32e7 Author: Hans de Goede Date: Wed Apr 5 00:03:33 2017 +0200 i2c: core: Add new i2c_acpi_new_device helper function By default the i2c subsys creates an i2c-client for the first I2cSerialBus resource of an acpi_device, but some acpi_devices have multiple I2cSerialBus resources and we may want to instantiate i2c-clients for the others. This commit adds a new i2c_acpi_new_device function which can be used to create an i2c-client for any I2cSerialBus resource of an acpi_device. Note that the other resources may even be on a different i2c bus, so just retrieving the client address is not enough. Here is an example DSDT excerpt from such a device: Device (WIDR) { Name (_HID, "INT33FE" /* XPOWER Battery Device */) Name (_CID, "INT33FE" /* XPOWER Battery Device */) Name (_DDN, "WC PMIC Battery Device") Name (RBUF, ResourceTemplate () { I2cSerialBusV2 (0x005E, ControllerInitiated, 0x000186A0, AddressingMode7Bit, "\\_SB.PCI0.I2C7", 0x00, ResourceConsumer, , Exclusive, ) I2cSerialBusV2 (0x0036, ControllerInitiated, 0x000186A0, AddressingMode7Bit, "\\_SB.PCI0.I2C1", 0x00, ResourceConsumer, , Exclusive, ) I2cSerialBusV2 (0x0022, ControllerInitiated, 0x00061A80, AddressingMode7Bit, "\\_SB.PCI0.I2C1", 0x00, ResourceConsumer, , Exclusive, ) I2cSerialBusV2 (0x0054, ControllerInitiated, 0x00061A80, AddressingMode7Bit, "\\_SB.PCI0.I2C1", 0x00, ResourceConsumer, , Exclusive, ) GpioInt (Level, ActiveLow, Exclusive, PullNone, 0x0000, "\\_SB.PCI0.I2C7.PMI5", 0x00, ResourceConsumer, , ) { // Pin list 0x0012 } GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone, 0x0000, "\\_SB.GPO1", 0x00, ResourceConsumer, , ) { // Pin list 0x0005 } GpioInt (Level, ActiveLow, Exclusive, PullNone, 0x0000, "\\_SB.PCI0.I2C7.PMI5", 0x00, ResourceConsumer, , ) { // Pin list 0x0013 } }) Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings { Return (RBUF) /* \_SB_.PCI0.I2C7.WIDR.RBUF */ } } Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/i2c-core.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/i2c.h | 7 +++++++ 2 files changed, 56 insertions(+) commit 417f784379c2b582d96bde2b438dc1ecb0abd7c3 Author: Hans de Goede Date: Wed Apr 5 00:03:32 2017 +0200 i2c: core: Allow getting ACPI info by index Modify struct i2c_acpi_lookup and i2c_acpi_fill_info() to allow using them to get the info from a certain index in the ACPI-resource list rather then taking the first I2cSerialBus resource. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/i2c-core.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 879bce228526c500bff3ed8ffec7bf89d98a9e11 Author: Geliang Tang Date: Sun Apr 9 09:41:31 2017 +0800 i2c: img-scb: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-img-scb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e058e7a4bc89104540a8a303682248614b5df6f1 Author: Edgar Cherkasov Date: Tue Apr 4 19:18:27 2017 +0300 i2c: i2c-scmi: add a MS HID Description of the problem: - i2c-scmi driver contains only two identifiers "SMBUS01" and "SMBUSIBM"; - the fist HID (SMBUS01) is clearly defined in "SMBus Control Method Interface Specification, version 1.0": "Each device must specify 'SMBUS01' as its _HID and use a unique _UID value"; - unfortunately, BIOS vendors (like AMI) seem to ignore this requirement and implement "SMB0001" HID instead of "SMBUS01"; - I speculate that they do this because only "SMB0001" is hard coded in Windows SMBus driver produced by Microsoft. This leads to following situation: - SMBus works out of box in Windows but not in Linux; - board vendors are forced to add correct "SMBUS01" HID to BIOS to make SMBus work in Linux. Moreover the same board vendors complain that tools (3-rd party ASL compiler) do not like the "SMBUS01" identifier and produce errors. So they need to constantly patch the compiler for each new version of BIOS. As it is very unlikely that BIOS vendors implement a correct HID in future, I would propose to consider whether it is possible to work around the problem by adding MS HID to the Linux i2c-scmi driver. v2: move the definition of the new HID to the driver itself. Signed-off-by: Edgar Cherkasov Signed-off-by: Michael Brunner Acked-by: Viktor Krasnov Reviewed-by: Jean Delvare Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-scmi.c | 4 ++++ 1 file changed, 4 insertions(+) commit 69e620f866c983d59d7d41d74a08d39528161473 Merge: cda816d dbed8a8 Author: Wolfram Sang Date: Sun Apr 16 21:44:37 2017 +0200 Merge branch 'i2c-mux/for-next' of https://github.com/peda-r/i2c-mux into i2c/for-4.12 Pull in changes from the i2c-mux subsubsystem: "Here are a new LTC4306/5 driver, a fix needed by the RT kernel and some error message cleanup." commit b0fcb4b413028376894feaaaf62bcb09ab1b52f2 Author: Mathias Kresin Date: Thu Apr 13 09:23:54 2017 +0200 mtd: spi-nor: enable stateless 4b op codes for mx25u25635f All required stateless 4-byte op codes are supported by this flash chip. The stateless 4-byte support can't be autodetected due to a missing 4-byte Address Instruction Table in SFDP. Fixes hangs on reboot for SoCs expecting the flash chip in 3byte mode. Signed-off-by: Mathias Kresin Acked-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c6286f26301ad154a1c10fb6e68925493dd28ba Author: Dan Carpenter Date: Sat Apr 15 20:55:53 2017 +0200 lightnvm: fix some error code in pblk-init.c There were a bunch of places in pblk_lines_init() where we didn't set an error code. And in pblk_writer_init() we accidentally return 1 instead of a correct error code, which would result in a Oops later. Fixes: 11a5d6fdf919 ("lightnvm: physical block device (pblk) target") Signed-off-by: Dan Carpenter Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 2a79efd833dd51c4362af655b9b011393c423f18 Author: Dan Carpenter Date: Sat Apr 15 20:55:52 2017 +0200 lightnvm: fix some WARN() messages WARN_ON() takes a condition, not an error message. I slightly tweaked some conditions so hopefully it's more clear. Signed-off-by: Dan Carpenter Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-read.c | 12 ++++++------ drivers/lightnvm/pblk-recovery.c | 2 +- drivers/lightnvm/pblk-write.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) commit 503ec94eca4f49c0a18d67bb60445fe998a601ae Author: Dan Carpenter Date: Sat Apr 15 20:55:51 2017 +0200 lightnvm: pblk-gc: fix an error pointer dereference in init These labels are reversed so we could end up dereferencing an error pointer or leaking. Fixes: 7f347ba6bb3a ("lightnvm: physical block device (pblk) target") Signed-off-by: Dan Carpenter Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a4bd217b432685d6a177c28a2af187f041c473b7 Author: Javier González Date: Sat Apr 15 20:55:50 2017 +0200 lightnvm: physical block device (pblk) target This patch introduces pblk, a host-side translation layer for Open-Channel SSDs to expose them like block devices. The translation layer allows data placement decisions, and I/O scheduling to be managed by the host, enabling users to optimize the SSD for their specific workloads. An open-channel SSD has a set of LUNs (parallel units) and a collection of blocks. Each block can be read in any order, but writes must be sequential. Writes may also fail, and if a block requires it, must also be reset before new writes can be applied. To manage the constraints, pblk maintains a logical to physical address (L2P) table, write cache, garbage collection logic, recovery scheme, and logic to rate-limit user I/Os versus garbage collection I/Os. The L2P table is fully-associative and manages sectors at a 4KB granularity. Pblk stores the L2P table in two places, in the out-of-band area of the media and on the last page of a line. In the cause of a power failure, pblk will perform a scan to recover the L2P table. The user data is organized into lines. A line is data striped across blocks and LUNs. The lines enable the host to reduce the amount of metadata to maintain besides the user data and makes it easier to implement RAID or erasure coding in the future. pblk implements multi-tenant support and can be instantiated multiple times on the same drive. Each instance owns a portion of the SSD - both regarding I/O bandwidth and capacity - providing I/O isolation for each case. Finally, pblk also exposes a sysfs interface that allows user-space to peek into the internals of pblk. The interface is available at /dev/block/*/pblk/ where * is the block device name exposed. This work also contains contributions from: Matias Bjørling Simon A. F. Lund Young Tack Jin Huaicheng Li Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe Documentation/lightnvm/pblk.txt | 21 + drivers/lightnvm/Kconfig | 9 + drivers/lightnvm/Makefile | 5 + drivers/lightnvm/pblk-cache.c | 114 +++ drivers/lightnvm/pblk-core.c | 1655 ++++++++++++++++++++++++++++++++++++++ drivers/lightnvm/pblk-gc.c | 555 +++++++++++++ drivers/lightnvm/pblk-init.c | 949 ++++++++++++++++++++++ drivers/lightnvm/pblk-map.c | 136 ++++ drivers/lightnvm/pblk-rb.c | 852 ++++++++++++++++++++ drivers/lightnvm/pblk-read.c | 529 ++++++++++++ drivers/lightnvm/pblk-recovery.c | 998 +++++++++++++++++++++++ drivers/lightnvm/pblk-rl.c | 182 +++++ drivers/lightnvm/pblk-sysfs.c | 507 ++++++++++++ drivers/lightnvm/pblk-write.c | 411 ++++++++++ drivers/lightnvm/pblk.h | 1121 ++++++++++++++++++++++++++ 15 files changed, 8044 insertions(+) commit 6eb082452df1218e9c0ce1168c456f839ce5acb2 Author: Javier González Date: Sat Apr 15 20:55:49 2017 +0200 lightnvm: convert sprintf into strlcpy Convert sprintf calls to strlcpy in order to make possible buffer overflow more obvious. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d788c59be5fa98ef41cc4dbab8e0cd8a29df082c Author: Javier González Date: Sat Apr 15 20:55:48 2017 +0200 lightnvm: fix type checks on rrpc sector_t is always unsigned, therefore avoid < 0 checks on it. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/rrpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5d30f3bd5578cd02c9aaf273e854d89b1ca91bb8 Author: Javier González Date: Sat Apr 15 20:55:47 2017 +0200 lightnvm: clean unused variable Clean unused variable on lightnvm core. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 3 --- 1 file changed, 3 deletions(-) commit 46b160ceda405746c10d0e73d3a73fb5219f7fd3 Author: Javier González Date: Sat Apr 15 20:55:46 2017 +0200 lightnvm: make nvm_free static Prefix the nvm_free static function with a missing static keyword. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4af3f75d7992dd0dc49da95fbc039fa3806fba4f Author: Javier González Date: Sat Apr 15 20:55:45 2017 +0200 lightnvm: allow to init targets on factory mode Target initialization has two responsibilities: creating the target partition and instantiating the target. This patch enables to create a factory partition (e.g., do not trigger recovery on the given target). This is useful for target development and for being able to restore the device state at any moment in time without requiring a full-device erase. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 14 +++++++++++--- drivers/lightnvm/rrpc.c | 3 ++- include/linux/lightnvm.h | 3 ++- include/uapi/linux/lightnvm.h | 4 ++++ 4 files changed, 19 insertions(+), 5 deletions(-) commit e85292feb98ca8ba4dcd6b5d33e1214a4b54512d Author: Javier González Date: Sat Apr 15 20:55:44 2017 +0200 lightnvm: bad type conversion for nvme control bits The NVMe I/O command control bits are 16 bytes, but is interpreted as 32 bytes in the lightnvm user I/O data path. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d1ef2f408abecc05f9dfaec1095098a090879dc Author: Javier González Date: Sat Apr 15 20:55:43 2017 +0200 lightnvm: fix cleanup order of disk on init error Reorder disk allocation such that the disk structure can be put safely. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit edee1bdd66bf0fda46a176bc3ee5c992dbbc466e Author: Javier González Date: Sat Apr 15 20:55:42 2017 +0200 lightnvm: double-clear of dev->lun_map on target init error The dev->lun_map bits are cleared twice if an target init error occurs. First in the target clean routine, and then next in the nvm_tgt_create error function. Make sure that it is only cleared once by extending nvm_remove_tgt_devi() with a clear bit, such that clearing of bits can ignored when cleaning up a successful initialized target. Signed-off-by: Javier González Fix style. Signed-off-by: Matias Bjørling Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit b0e0306ce14180baee00cea9be5600eef6750af8 Author: NeilBrown Date: Sat Apr 15 20:55:41 2017 +0200 lightnvm: don't check for failure from mempool_alloc() mempool_alloc() cannot fail if the gfp flags allow it to sleep, and both GFP_KERNEL and GFP_NOIO allows for sleeping. So rrpc_move_valid_pages() and rrpc_make_rq() don't need to test the return value. Signed-off-by: NeilBrown Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/rrpc.c | 9 --------- 1 file changed, 9 deletions(-) commit 48d663a314489f136a46abf8e3f0d014d7769209 Author: Matias Bjørling Date: Sat Apr 15 20:55:40 2017 +0200 lightnvm: enable nvme size compile asserts The asserts in _nvme_nvm_check_size are not compiled due to the function not begin called. Make sure that it is called, and also fix the wrong sizes of asserts for nvme_nvm_addr_format, and nvme_nvm_bb_tbl, which checked for number of bits instead of bytes. Reported-by: Scott Bauer Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7a3de2b33f5213c423a59aeaaae2249196b4b5cc Author: Javier González Date: Sat Apr 15 20:55:39 2017 +0200 lightnvm: free reverse device map Free the reverse mapping table correctly on target tear down Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit a7737f39c70d9c63ba530d6316724d7be67de541 Author: Javier González Date: Sat Apr 15 20:55:38 2017 +0200 lightnvm: rename scrambler controller hint According to the OCSSD 1.2 specification, the 0x200 hint enables the media scrambler for the read/write opcode, providing that the controller has been correctly configured by the firmware. Rename the macro to represent this meaning. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe include/linux/lightnvm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17912c49edfa6ab552329bf63d1b757eb874673b Author: Javier González Date: Sat Apr 15 20:55:37 2017 +0200 lightnvm: submit erases using the I/O path Until now erases have been submitted as synchronous commands through a dedicated erase function. In order to enable targets implementing asynchronous erases, refactor the erase path so that it uses the normal async I/O submission functions. If a target requires sync I/O, it can implement it internally. Also, adapt rrpc to use the new erase path. Signed-off-by: Javier González Fixed spelling error. Signed-off-by: Matias Bjørling Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 54 +++++++++++++++++++++++++++----------------- drivers/lightnvm/rrpc.c | 3 +-- drivers/nvme/host/lightnvm.c | 32 ++++++++------------------ include/linux/lightnvm.h | 8 +++---- 4 files changed, 47 insertions(+), 50 deletions(-) commit 2849a7becb9586a09553680a8b752fdb517b26e3 Author: Scott Bauer Date: Sat Apr 15 20:55:36 2017 +0200 nvme/lightnvm: Prevent small buffer overflow in nvme_nvm_identify There are two closely named structs in lightnvm: struct nvme_nvm_addr_format and struct nvme_addr_format. The first struct has 4 reserved bytes at the end, the second does not. (gdb) p sizeof(struct nvme_nvm_addr_format) $1 = 16 (gdb) p sizeof(struct nvm_addr_format) $2 = 12 In the nvme_nvm_identify function we memcpy from the larger struct to the smaller struct. We incorrectly pass the length of the larger struct and overflow by 4 bytes, lets not do that. Signed-off-by: Scott Bauer Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/nvme/host/lightnvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 654a01b78846b96527263acb2fc373371c281896 Author: Christophe JAILLET Date: Sat Apr 15 20:55:35 2017 +0200 lightnvm: Fix error handling According to error handling in this function, it is likely that going to 'out' was expected here. Signed-off-by: Christophe JAILLET Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/rrpc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6b6cbc1471676402565e958674523d06213b82d7 Merge: ce07183 1bf4b12 Author: David S. Miller Date: Sat Apr 15 21:16:30 2017 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Conflicts were simply overlapping changes. In the net/ipv4/route.c case the code had simply moved around a little bit and the same fix was made in both 'net' and 'net-next'. In the net/sched/sch_generic.c case a fix in 'net' happened at the same time that a new argument was added to qdisc_hash_add(). Signed-off-by: David S. Miller commit acceb72e90624ec6c3f2fc62e72dab892cd075da Author: Steven Rostedt (VMware) Date: Fri Apr 14 17:45:45 2017 -0400 ftrace: Fix removing of second function probe When two function probes are added to set_ftrace_filter, and then one of them is removed, the update to the function locations is not performed, and the record keeping of the function states are corrupted, and causes an ftrace_bug() to occur. This is easily reproducable by adding two probes, removing one, and then adding it back again. # cd /sys/kernel/debug/tracing # echo schedule:traceoff > set_ftrace_filter # echo do_IRQ:traceoff > set_ftrace_filter # echo \!do_IRQ:traceoff > /debug/tracing/set_ftrace_filter # echo do_IRQ:traceoff > set_ftrace_filter Causes: ------------[ cut here ]------------ WARNING: CPU: 2 PID: 1098 at kernel/trace/ftrace.c:2369 ftrace_get_addr_curr+0x143/0x220 Modules linked in: [...] CPU: 2 PID: 1098 Comm: bash Not tainted 4.10.0-test+ #405 Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v02.05 05/07/2012 Call Trace: dump_stack+0x68/0x9f __warn+0x111/0x130 ? trace_irq_work_interrupt+0xa0/0xa0 warn_slowpath_null+0x1d/0x20 ftrace_get_addr_curr+0x143/0x220 ? __fentry__+0x10/0x10 ftrace_replace_code+0xe3/0x4f0 ? ftrace_int3_handler+0x90/0x90 ? printk+0x99/0xb5 ? 0xffffffff81000000 ftrace_modify_all_code+0x97/0x110 arch_ftrace_update_code+0x10/0x20 ftrace_run_update_code+0x1c/0x60 ftrace_run_modify_code.isra.48.constprop.62+0x8e/0xd0 register_ftrace_function_probe+0x4b6/0x590 ? ftrace_startup+0x310/0x310 ? debug_lockdep_rcu_enabled.part.4+0x1a/0x30 ? update_stack_state+0x88/0x110 ? ftrace_regex_write.isra.43.part.44+0x1d3/0x320 ? preempt_count_sub+0x18/0xd0 ? mutex_lock_nested+0x104/0x800 ? ftrace_regex_write.isra.43.part.44+0x1d3/0x320 ? __unwind_start+0x1c0/0x1c0 ? _mutex_lock_nest_lock+0x800/0x800 ftrace_trace_probe_callback.isra.3+0xc0/0x130 ? func_set_flag+0xe0/0xe0 ? __lock_acquire+0x642/0x1790 ? __might_fault+0x1e/0x20 ? trace_get_user+0x398/0x470 ? strcmp+0x35/0x60 ftrace_trace_onoff_callback+0x48/0x70 ftrace_regex_write.isra.43.part.44+0x251/0x320 ? match_records+0x420/0x420 ftrace_filter_write+0x2b/0x30 __vfs_write+0xd7/0x330 ? do_loop_readv_writev+0x120/0x120 ? locks_remove_posix+0x90/0x2f0 ? do_lock_file_wait+0x160/0x160 ? __lock_is_held+0x93/0x100 ? rcu_read_lock_sched_held+0x5c/0xb0 ? preempt_count_sub+0x18/0xd0 ? __sb_start_write+0x10a/0x230 ? vfs_write+0x222/0x240 vfs_write+0xef/0x240 SyS_write+0xab/0x130 ? SyS_read+0x130/0x130 ? trace_hardirqs_on_caller+0x182/0x280 ? trace_hardirqs_on_thunk+0x1a/0x1c entry_SYSCALL_64_fastpath+0x18/0xad RIP: 0033:0x7fe61c157c30 RSP: 002b:00007ffe87890258 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: ffffffff8114a410 RCX: 00007fe61c157c30 RDX: 0000000000000010 RSI: 000055814798f5e0 RDI: 0000000000000001 RBP: ffff8800c9027f98 R08: 00007fe61c422740 R09: 00007fe61ca53700 R10: 0000000000000073 R11: 0000000000000246 R12: 0000558147a36400 R13: 00007ffe8788f160 R14: 0000000000000024 R15: 00007ffe8788f15c ? trace_hardirqs_off_caller+0xc0/0x110 ---[ end trace 99fa09b3d9869c2c ]--- Bad trampoline accounting at: ffffffff81cc3b00 (do_IRQ+0x0/0x150) Cc: stable@vger.kernel.org Fixes: 59df055f1991 ("ftrace: trace different functions with a different tracer") Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 59cd42c29618c45cd3c56da43402b14f611888dd Author: Darren Hart (VMware) Date: Fri Apr 14 15:46:08 2017 -0700 MAINTAINERS: Add FUTEX SUBSYSTEM Add a MAINTAINERS block for the FUTEX SUBSYSTEM which includes the core kernel code, include headers, testing code, and Documentation. Excludes arch files, and higher level test code. I added tglx and mingo as M as they have made the tip commits and peterz and myself as R. Signed-off-by: Darren Hart (VMware) Cc: Peter Zijlstra Cc: Shuah Khan Cc: Arnaldo Carvalho de Melo Link: http://lkml.kernel.org/r/20170414224608.GA5180@fury Signed-off-by: Thomas Gleixner MAINTAINERS | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 38fcd06e9b7f6855db1f3ebac5e18b8fdb467ffd Author: Darren Hart (VMware) Date: Fri Apr 14 15:31:38 2017 -0700 futex: Clarify mark_wake_futex memory barrier usage Clarify the scenario described in mark_wake_futex requiring the smp_store_release(). Update the comment to explicitly refer to the plist_del now under __unqueue_futex() (previously plist_del was in the same function as the comment). Signed-off-by: Darren Hart (VMware) Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170414223138.GA4222@fury Signed-off-by: Thomas Gleixner kernel/futex.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 382bd4de61827dbaaf5fb4fb7b1f4be4a86505e7 Author: Hans de Goede Date: Sat Apr 15 12:08:31 2017 +0200 genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs When requesting a shared irq with IRQF_TRIGGER_NONE then the irqaction flags get filled with the trigger type from the irq_data: if (!(new->flags & IRQF_TRIGGER_MASK)) new->flags |= irqd_get_trigger_type(&desc->irq_data); On the first setup_irq() the trigger type in irq_data is NONE when the above code executes, then the irq is started up for the first time and then the actual trigger type gets established, but that's too late to fix up new->flags. When then a second user of the irq requests the irq with IRQF_TRIGGER_NONE its irqaction's triggertype gets set to the actual trigger type and the following check fails: if (!((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) Resulting in the request_irq failing with -EBUSY even though both users requested the irq with IRQF_SHARED | IRQF_TRIGGER_NONE Fix this by comparing the new irqaction's trigger type to the trigger type stored in the irq_data which correctly reflects the actual trigger type being used for the irq. Suggested-by: Thomas Gleixner Signed-off-by: Hans de Goede Acked-by: Marc Zyngier Link: http://lkml.kernel.org/r/20170415100831.17073-1-hdegoede@redhat.com Signed-off-by: Thomas Gleixner kernel/irq/manage.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d1b25279c1a3fe99a14b3afc6d590e218f854b10 Merge: d170fe7 9d4b5bd Author: Thomas Gleixner Date: Sat Apr 15 15:31:11 2017 +0200 Merge tag 'irqchip-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates from Marc Zyngier - Unify gemini and moxa irqchips under the faraday banner - Extend mtk-sysirq to deal with multiple MMIO regions - ACPI/IORT support for GICv3 ITS platform MSI - ACPI support for mbigen - Add mtk-cirq wakeup interrupt controller driver - Atmel aic5 suspend support - Allow GPCv2 to be probed both as an irqchip and a device commit 73810a069120aa831debb4d967310ab900f628ad Author: Thomas Gleixner Date: Thu Apr 13 10:20:23 2017 +0200 crypto: N2 - Replace racy task affinity logic spu_queue_register() needs to invoke setup functions on a particular CPU. This is achieved by temporarily setting the affinity of the calling user space thread to the requested CPU and reset it to the original affinity afterwards. That's racy vs. CPU hotplug and concurrent affinity settings for that thread resulting in code executing on the wrong CPU and overwriting the new affinity setting. Replace it by using work_on_cpu_safe() which guarantees to run the code on the requested CPU or to fail in case the CPU is offline. Signed-off-by: Thomas Gleixner Acked-by: Herbert Xu Acked-by: "David S. Miller" Cc: Fenghua Yu Cc: Tony Luck Cc: "Rafael J. Wysocki" Cc: Peter Zijlstra Cc: Benjamin Herrenschmidt Cc: Sebastian Siewior Cc: Lai Jiangshan Cc: Viresh Kumar Cc: linux-crypto@vger.kernel.org Cc: Michael Ellerman Cc: Tejun Heo Cc: Len Brown Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1704131019420.2408@nanos Signed-off-by: Thomas Gleixner drivers/crypto/n2_core.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit 12699ac53a2e5fbd1fd7c164b11685d55c8aa28b Author: Thomas Gleixner Date: Thu Apr 13 10:22:43 2017 +0200 cpufreq/sparc-us2e: Replace racy task affinity logic The access to the HBIRD_ESTAR_MODE register in the cpu frequency control functions must happen on the target CPU. This is achieved by temporarily setting the affinity of the calling user space thread to the requested CPU and reset it to the original affinity afterwards. That's racy vs. CPU hotplug and concurrent affinity settings for that thread resulting in code executing on the wrong CPU and overwriting the new affinity setting. Replace it by a straight forward smp function call. Signed-off-by: Thomas Gleixner Acked-by: Viresh Kumar Cc: Fenghua Yu Cc: Tony Luck Cc: Herbert Xu Cc: "Rafael J. Wysocki" Cc: Peter Zijlstra Cc: Benjamin Herrenschmidt Cc: Sebastian Siewior Cc: linux-pm@vger.kernel.org Cc: Lai Jiangshan Cc: Michael Ellerman Cc: Tejun Heo Cc: "David S. Miller" Cc: Len Brown Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1704131020280.2408@nanos Signed-off-by: Thomas Gleixner drivers/cpufreq/sparc-us2e-cpufreq.c | 45 +++++++++++++++++------------------- 1 file changed, 21 insertions(+), 24 deletions(-) commit 9fe24c4e92d3963d92d7d383e28ed098bd5689d8 Author: Thomas Gleixner Date: Wed Apr 12 22:07:37 2017 +0200 cpufreq/sparc-us3: Replace racy task affinity logic The access to the safari config register in the CPU frequency functions must be executed on the target CPU. This is achieved by temporarily setting the affinity of the calling user space thread to the requested CPU and reset it to the original affinity afterwards. That's racy vs. CPU hotplug and concurrent affinity settings for that thread resulting in code executing on the wrong CPU and overwriting the new affinity setting. Replace it by a straight forward smp function call. Signed-off-by: Thomas Gleixner Acked-by: Viresh Kumar Cc: Fenghua Yu Cc: Tony Luck Cc: Herbert Xu Cc: "Rafael J. Wysocki" Cc: Peter Zijlstra Cc: Benjamin Herrenschmidt Cc: Sebastian Siewior Cc: linux-pm@vger.kernel.org Cc: Lai Jiangshan Cc: Michael Ellerman Cc: Tejun Heo Cc: "David S. Miller" Cc: Len Brown Link: http://lkml.kernel.org/r/20170412201043.047558840@linutronix.de Signed-off-by: Thomas Gleixner drivers/cpufreq/sparc-us3-cpufreq.c | 46 +++++++++++++------------------------ 1 file changed, 16 insertions(+), 30 deletions(-) commit 205dcc1ecbc566cbc20acf246e68de3b080b3ecf Author: Thomas Gleixner Date: Wed Apr 12 22:07:36 2017 +0200 cpufreq/sh: Replace racy task affinity logic The target() callback must run on the affected cpu. This is achieved by temporarily setting the affinity of the calling thread to the requested CPU and reset it to the original affinity afterwards. That's racy vs. concurrent affinity settings for that thread resulting in code executing on the wrong CPU. Replace it by work_on_cpu(). All call pathes which invoke the callbacks are already protected against CPU hotplug. Signed-off-by: Thomas Gleixner Acked-by: Viresh Kumar Cc: Fenghua Yu Cc: Tony Luck Cc: Herbert Xu Cc: "Rafael J. Wysocki" Cc: Peter Zijlstra Cc: Benjamin Herrenschmidt Cc: Sebastian Siewior Cc: linux-pm@vger.kernel.org Cc: Lai Jiangshan Cc: Michael Ellerman Cc: Tejun Heo Cc: "David S. Miller" Cc: Len Brown Link: http://lkml.kernel.org/r/20170412201042.958216363@linutronix.de Signed-off-by: Thomas Gleixner drivers/cpufreq/sh-cpufreq.c | 45 ++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) commit 38f05ed04beb276f780fcd2b5c0b78c76d0b3c0c Author: Thomas Gleixner Date: Wed Apr 12 22:55:03 2017 +0200 cpufreq/ia64: Replace racy task affinity logic The get() and target() callbacks must run on the affected cpu. This is achieved by temporarily setting the affinity of the calling thread to the requested CPU and reset it to the original affinity afterwards. That's racy vs. concurrent affinity settings for that thread resulting in code executing on the wrong CPU and overwriting the new affinity setting. Replace it by work_on_cpu(). All call pathes which invoke the callbacks are already protected against CPU hotplug. Signed-off-by: Thomas Gleixner Acked-by: Viresh Kumar Cc: Fenghua Yu Cc: Tony Luck Cc: Herbert Xu Cc: "Rafael J. Wysocki" Cc: Peter Zijlstra Cc: Benjamin Herrenschmidt Cc: Sebastian Siewior Cc: linux-pm@vger.kernel.org Cc: Lai Jiangshan Cc: Michael Ellerman Cc: Tejun Heo Cc: "David S. Miller" Cc: Len Brown Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1704122231100.2548@nanos Signed-off-by: Thomas Gleixner drivers/cpufreq/ia64-acpi-cpufreq.c | 92 ++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 53 deletions(-) commit 8153f9ac43897f9f4786b30badc134fcc1a4fb11 Author: Thomas Gleixner Date: Wed Apr 12 22:07:34 2017 +0200 ACPI/processor: Replace racy task affinity logic acpi_processor_get_throttling() requires to invoke the getter function on the target CPU. This is achieved by temporarily setting the affinity of the calling user space thread to the requested CPU and reset it to the original affinity afterwards. That's racy vs. CPU hotplug and concurrent affinity settings for that thread resulting in code executing on the wrong CPU and overwriting the new affinity setting. acpi_processor_get_throttling() is invoked in two ways: 1) The CPU online callback, which is already running on the target CPU and obviously protected against hotplug and not affected by affinity settings. 2) The ACPI driver probe function, which is not protected against hotplug during modprobe. Switch it over to work_on_cpu() and protect the probe function against CPU hotplug. Signed-off-by: Thomas Gleixner Cc: Fenghua Yu Cc: Tony Luck Cc: Herbert Xu Cc: "Rafael J. Wysocki" Cc: Peter Zijlstra Cc: Benjamin Herrenschmidt Cc: Sebastian Siewior Cc: Lai Jiangshan Cc: linux-acpi@vger.kernel.org Cc: Viresh Kumar Cc: Michael Ellerman Cc: Tejun Heo Cc: "David S. Miller" Cc: Len Brown Link: http://lkml.kernel.org/r/20170412201042.785920903@linutronix.de Signed-off-by: Thomas Gleixner drivers/acpi/processor_driver.c | 7 ++++- drivers/acpi/processor_throttling.c | 62 +++++++++++++++++++++---------------- 2 files changed, 42 insertions(+), 27 deletions(-) commit a5cbdf693a60d5b86d4d21dfedd90f17754eb273 Author: Thomas Gleixner Date: Wed Apr 12 22:07:33 2017 +0200 ACPI/processor: Fix error handling in __acpi_processor_start() When acpi_install_notify_handler() fails the cooling device stays registered and the sysfs files created via acpi_pss_perf_init() are leaked and the function returns success. Undo acpi_pss_perf_init() and return a proper error code. Signed-off-by: Thomas Gleixner Cc: Fenghua Yu Cc: Tony Luck Cc: Herbert Xu Cc: "Rafael J. Wysocki" Cc: Peter Zijlstra Cc: Benjamin Herrenschmidt Cc: Sebastian Siewior Cc: Lai Jiangshan Cc: linux-acpi@vger.kernel.org Cc: Viresh Kumar Cc: Michael Ellerman Cc: Tejun Heo Cc: "David S. Miller" Cc: Len Brown Link: http://lkml.kernel.org/r/20170412201042.695499645@linutronix.de Signed-off-by: Thomas Gleixner drivers/acpi/processor_driver.c | 3 +++ 1 file changed, 3 insertions(+) commit ea875ec94eafb858990f3fe9528501f983105653 Author: Thomas Gleixner Date: Thu Apr 13 10:17:07 2017 +0200 sparc/sysfs: Replace racy task affinity logic The mmustat_enable sysfs file accessor functions must run code on the target CPU. This is achieved by temporarily setting the affinity of the calling user space thread to the requested CPU and reset it to the original affinity afterwards. That's racy vs. concurrent affinity settings for that thread resulting in code executing on the wrong CPU and overwriting the new affinity setting. Replace it by using work_on_cpu() which guarantees to run the code on the requested CPU. Protection against CPU hotplug is not required as the open sysfs file already prevents the removal from the CPU offline callback. Using the hotplug protected version would actually be wrong because it would deadlock against a CPU hotplug operation of the CPU associated to the sysfs file in progress. Signed-off-by: Thomas Gleixner Acked-by: David S. Miller Cc: fenghua.yu@intel.com Cc: tony.luck@intel.com Cc: herbert@gondor.apana.org.au Cc: rjw@rjwysocki.net Cc: peterz@infradead.org Cc: benh@kernel.crashing.org Cc: bigeasy@linutronix.de Cc: jiangshanlai@gmail.com Cc: sparclinux@vger.kernel.org Cc: viresh.kumar@linaro.org Cc: mpe@ellerman.id.au Cc: tj@kernel.org Cc: lenb@kernel.org Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1704131001270.2408@nanos Signed-off-by: Thomas Gleixner arch/sparc/kernel/sysfs.c | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) commit 6d11b87d55eb75007a3721c2de5938f5bbf607fb Author: Thomas Gleixner Date: Wed Apr 12 22:07:31 2017 +0200 powerpc/smp: Replace open coded task affinity logic Init task invokes smp_ops->setup_cpu() from smp_cpus_done(). Init task can run on any online CPU at this point, but the setup_cpu() callback requires to be invoked on the boot CPU. This is achieved by temporarily setting the affinity of the calling user space thread to the requested CPU and reset it to the original affinity afterwards. That's racy vs. CPU hotplug and concurrent affinity settings for that thread resulting in code executing on the wrong CPU and overwriting the new affinity setting. That's actually not a problem in this context as neither CPU hotplug nor affinity settings can happen, but the access to task_struct::cpus_allowed is about to restricted. Replace it with a call to work_on_cpu_safe() which achieves the same result. Signed-off-by: Thomas Gleixner Acked-by: Michael Ellerman Cc: Fenghua Yu Cc: Tony Luck Cc: Herbert Xu Cc: "Rafael J. Wysocki" Cc: Peter Zijlstra Cc: Benjamin Herrenschmidt Cc: Sebastian Siewior Cc: Lai Jiangshan Cc: Viresh Kumar Cc: Tejun Heo Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Cc: "David S. Miller" Cc: Len Brown Link: http://lkml.kernel.org/r/20170412201042.518053336@linutronix.de Signed-off-by: Thomas Gleixner arch/powerpc/kernel/smp.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 9feb42ac88b516e378b9782e82b651ca5bed95c4 Author: Thomas Gleixner Date: Thu Apr 6 14:56:18 2017 +0200 ia64/sn/hwperf: Replace racy task affinity logic sn_hwperf_op_cpu() which is invoked from an ioctl requires to run code on the requested cpu. This is achieved by temporarily setting the affinity of the calling user space thread to the requested CPU and reset it to the original affinity afterwards. That's racy vs. CPU hotplug and concurrent affinity settings for that thread resulting in code executing on the wrong CPU and overwriting the new affinity setting. Replace it by using work_on_cpu_safe() which guarantees to run the code on the requested CPU or to fail in case the CPU is offline. Signed-off-by: Thomas Gleixner Cc: Fenghua Yu Cc: Tony Luck Cc: linux-ia64@vger.kernel.org Cc: Herbert Xu Cc: "Rafael J. Wysocki" Cc: Peter Zijlstra Cc: Benjamin Herrenschmidt Cc: Sebastian Siewior Cc: Lai Jiangshan Cc: Viresh Kumar Cc: Michael Ellerman Cc: Tejun Heo Cc: "David S. Miller" Cc: Len Brown Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1704122251450.2548@nanos Signed-off-by: Thomas Gleixner arch/ia64/sn/kernel/sn2/sn_hwperf.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 67cb85fdcee7fbc61c09c00360d1a4ae37641db4 Author: Thomas Gleixner Date: Wed Apr 12 22:07:29 2017 +0200 ia64/salinfo: Replace racy task affinity logic Some of the file operations in /proc/sal require to run code on the requested cpu. This is achieved by temporarily setting the affinity of the calling user space thread to the requested CPU and reset it to the original affinity afterwards. That's racy vs. CPU hotplug and concurrent affinity settings for that thread resulting in code executing on the wrong CPU and overwriting the new affinity setting. Replace it by using work_on_cpu_safe() which guarantees to run the code on the requested CPU or to fail in case the CPU is offline. Signed-off-by: Thomas Gleixner Cc: Fenghua Yu Cc: Tony Luck Cc: linux-ia64@vger.kernel.org Cc: Herbert Xu Cc: "Rafael J. Wysocki" Cc: Peter Zijlstra Cc: Benjamin Herrenschmidt Cc: Sebastian Siewior Cc: Lai Jiangshan Cc: Viresh Kumar Cc: Michael Ellerman Cc: Tejun Heo Cc: "David S. Miller" Cc: Len Brown Link: http://lkml.kernel.org/r/20170412201042.341863457@linutronix.de Signed-off-by: Thomas Gleixner arch/ia64/kernel/salinfo.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) commit 0e8d6a9336b487a1dd6f1991ff376e669d4c87c6 Author: Thomas Gleixner Date: Wed Apr 12 22:07:28 2017 +0200 workqueue: Provide work_on_cpu_safe() work_on_cpu() is not protected against CPU hotplug. For code which requires to be either executed on an online CPU or to fail if the CPU is not available the callsite would have to protect against CPU hotplug. Provide a function which does get/put_online_cpus() around the call to work_on_cpu() and fails the call with -ENODEV if the target CPU is not online. Preparatory patch to convert several racy task affinity manipulations. Signed-off-by: Thomas Gleixner Acked-by: Tejun Heo Cc: Fenghua Yu Cc: Tony Luck Cc: Herbert Xu Cc: "Rafael J. Wysocki" Cc: Peter Zijlstra Cc: Benjamin Herrenschmidt Cc: Sebastian Siewior Cc: Lai Jiangshan Cc: Viresh Kumar Cc: Michael Ellerman Cc: "David S. Miller" Cc: Len Brown Link: http://lkml.kernel.org/r/20170412201042.262610721@linutronix.de Signed-off-by: Thomas Gleixner include/linux/workqueue.h | 5 +++++ kernel/workqueue.c | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit 048c9b954e20396e0c45ee778466994d1be2e612 Author: Thomas Gleixner Date: Wed Apr 12 22:07:27 2017 +0200 ia64/topology: Remove cpus_allowed manipulation The CPU hotplug callback fiddles with the cpus_allowed pointer to pin the calling thread on the plugged CPU. That's already guaranteed by the hotplug core code. Remove it. Signed-off-by: Thomas Gleixner Cc: Fenghua Yu Cc: Tony Luck Cc: linux-ia64@vger.kernel.org Cc: Herbert Xu Cc: "Rafael J. Wysocki" Cc: Peter Zijlstra Cc: Benjamin Herrenschmidt Cc: Sebastian Siewior Cc: Lai Jiangshan Cc: Viresh Kumar Cc: Michael Ellerman Cc: Tejun Heo Cc: "David S. Miller" Cc: Len Brown Link: http://lkml.kernel.org/r/20170412201042.174518069@linutronix.de Signed-off-by: Thomas Gleixner arch/ia64/kernel/topology.c | 6 ------ 1 file changed, 6 deletions(-) commit ab8bc7ed864b9c4f1fcb00a22bbe4e0f66ce8003 Author: Florian Westphal Date: Fri Apr 14 20:31:09 2017 +0200 netfilter: remove nf_ct_is_untracked This function is now obsolete and always returns false. This change has no effect on generated code. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/ip_vs.h | 4 ++-- include/net/netfilter/nf_conntrack.h | 5 ----- include/net/netfilter/nf_conntrack_core.h | 2 +- net/ipv4/netfilter/nf_nat_l3proto_ipv4.c | 4 ---- net/ipv4/netfilter/nf_socket_ipv4.c | 2 +- net/ipv6/netfilter/nf_nat_l3proto_ipv6.c | 4 ---- net/netfilter/ipvs/ip_vs_ftp.c | 3 +-- net/netfilter/ipvs/ip_vs_nfct.c | 4 ++-- net/netfilter/ipvs/ip_vs_xmit.c | 8 ++++---- net/netfilter/nf_conntrack_netlink.c | 12 +----------- net/netfilter/xt_HMARK.c | 2 +- net/netfilter/xt_cluster.c | 3 --- net/netfilter/xt_connlabel.c | 2 +- net/netfilter/xt_connmark.c | 4 ++-- net/netfilter/xt_ipvs.c | 2 +- net/openvswitch/conntrack.c | 5 ----- 16 files changed, 17 insertions(+), 49 deletions(-) commit cc41c84b7e7f2d7f6698bccc84890943fd021265 Author: Florian Westphal Date: Fri Apr 14 20:31:08 2017 +0200 netfilter: kill the fake untracked conntrack objects resurrect an old patch from Pablo Neira to remove the untracked objects. Currently, there are four possible states of an skb wrt. conntrack. 1. No conntrack attached, ct is NULL. 2. Normal (kmem cache allocated) ct attached. 3. a template (kmalloc'd), not in any hash tables at any point in time 4. the 'untracked' conntrack, a percpu nf_conn object, tagged via IPS_UNTRACKED_BIT in ct->status. Untracked is supposed to be identical to case 1. It exists only so users can check -m conntrack --ctstate UNTRACKED vs. -m conntrack --ctstate INVALID e.g. attempts to set connmark on INVALID or UNTRACKED conntracks is supposed to be a no-op. Thus currently we need to check ct == NULL || nf_ct_is_untracked(ct) in a lot of places in order to avoid altering untracked objects. The other consequence of the percpu untracked object is that all -j NOTRACK (and, later, kfree_skb of such skbs) result in an atomic op (inc/dec the untracked conntracks refcount). This adds a new kernel-private ctinfo state, IP_CT_UNTRACKED, to make the distinction instead. The (few) places that care about packet invalid (ct is NULL) vs. packet untracked now need to test ct == NULL vs. ctinfo == IP_CT_UNTRACKED, but all other places can omit the nf_ct_is_untracked() check. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/ip_vs.h | 6 +-- include/net/netfilter/nf_conntrack.h | 10 +---- include/uapi/linux/netfilter/nf_conntrack_common.h | 6 ++- net/ipv4/netfilter/nf_dup_ipv4.c | 3 +- net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 3 +- net/ipv6/netfilter/nf_dup_ipv6.c | 3 +- net/netfilter/nf_conntrack_core.c | 48 +++------------------- net/netfilter/nf_nat_core.c | 3 -- net/netfilter/nft_ct.c | 14 +++---- net/netfilter/xt_CT.c | 16 ++++---- net/netfilter/xt_conntrack.c | 11 +++-- net/netfilter/xt_state.c | 13 +++--- 12 files changed, 39 insertions(+), 97 deletions(-) commit 6e354a5e565110c3a0eb7da3788340d4809a42b6 Author: Gao Feng Date: Thu Apr 13 09:35:49 2017 +0800 netfilter: ecache: Refine the nf_ct_deliver_cached_events 1. Remove single !events condition check to deliver the missed event even though there is no new event happened. Consider this case: 1) nf_ct_deliver_cached_events is invoked at the first time, the event is failed to deliver, then the missed is set. 2) nf_ct_deliver_cached_events is invoked again, but there is no any new event happened. The missed event is lost really. It would try to send the missed event again after remove this check. And it is ok if there is no missed event because the latter check !((events | missed) & e->ctmask) could avoid it. 2. Correct the return value check of notify->fcn. When send the event successfully, it returns 0, not postive value. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_ecache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7025bac47fba90cb39a53c011ee78f7f66d72793 Author: Gao Feng Date: Wed Apr 12 18:33:03 2017 +0800 netfilter: nf_nat: Fix return NF_DROP in nfnetlink_parse_nat_setup The __nf_nat_alloc_null_binding invokes nf_nat_setup_info which may return NF_DROP when memory is exhausted, so convert NF_DROP to -ENOMEM to make ctnetlink happy. Or ctnetlink_setup_nat treats it as a success when one error NF_DROP happens actully. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_nat_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a702ece3b186dcf3577c33747359be13352951b6 Merge: db268d4 e241137 Author: Pablo Neira Ayuso Date: Sat Apr 15 10:54:40 2017 +0200 Merge tag 'ipvs2-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next Simon Horman says: ==================== Second Round of IPVS Updates for v4.12 please consider these clean-ups and enhancements to IPVS for v4.12. * Removal unused variable * Use kzalloc where appropriate * More efficient detection of presence of NAT extension ==================== Signed-off-by: Pablo Neira Ayuso Conflicts: net/netfilter/ipvs/ip_vs_ftp.c commit db268d4dfdb9025eaf98ec88c99b38fbba172c43 Author: Aaron Conole Date: Mon Apr 10 15:52:37 2017 -0400 ipset: remove unused function __ip_set_get_netlink There are no in-tree callers. Signed-off-by: Aaron Conole Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso net/netfilter/ipset/ip_set_core.c | 8 -------- 1 file changed, 8 deletions(-) commit f2fe89061d79706eca5c47e4efdc09bbc171e74a Author: Helen Koike Date: Fri Apr 7 14:55:19 2017 -0300 [media] vimc: Virtual Media Controller core, capture and sensor First version of the Virtual Media Controller. Add a simple version of the core of the driver, the capture and sensor nodes in the topology, generating a grey image in a hardcoded format. Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil [hans.verkuil@cisco.com: fix small typo in Kconfig] Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 + drivers/media/platform/Kconfig | 2 + drivers/media/platform/Makefile | 1 + drivers/media/platform/vimc/Kconfig | 14 + drivers/media/platform/vimc/Makefile | 3 + drivers/media/platform/vimc/vimc-capture.c | 498 +++++++++++++++++++++ drivers/media/platform/vimc/vimc-capture.h | 28 ++ drivers/media/platform/vimc/vimc-core.c | 695 +++++++++++++++++++++++++++++ drivers/media/platform/vimc/vimc-core.h | 112 +++++ drivers/media/platform/vimc/vimc-sensor.c | 276 ++++++++++++ drivers/media/platform/vimc/vimc-sensor.h | 28 ++ 11 files changed, 1665 insertions(+) commit 3c2472a3c54895ecd6717a6454cd87994afdadea Author: Ramiro Oliveira Date: Wed Mar 22 09:30:27 2017 -0300 [media] media: i2c: Add support for OV5647 sensor The OV5647 sensor from Omnivision supports up to 2592x1944 @ 15 fps, RAW 8 and RAW 10 output formats, and MIPI CSI-2 interface. The driver adds support for 640x480 RAW 8. Signed-off-by: Ramiro Oliveira Acked-by: Sakari Ailus Reviewed-by: Vladimir Zapolskiy Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 7 + drivers/media/i2c/Kconfig | 11 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov5647.c | 634 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 653 insertions(+) commit 3bebcc4d6a9f8ed8020c7d1123199691b2dd989b Author: Ramiro Oliveira Date: Wed Mar 22 09:30:26 2017 -0300 [media] Documentation: DT: Add OV5647 bindings Create device tree bindings documentation. Signed-off-by: Ramiro Oliveira Acked-by: Rob Herring Reviewed-by: Vladimir Zapolskiy Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/ov5647.txt | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 9cae97221aabfb3ca5daaa424a66c9d8eee1ff59 Author: Todor Tomov Date: Tue Apr 11 08:28:46 2017 -0300 [media] media: Add a driver for the ov5645 camera sensor The ov5645 sensor from Omnivision supports up to 2592x1944 and CSI2 interface. The driver adds support for the following modes: - 1280x960 - 1920x1080 - 2592x1944 Output format is packed 8bit UYVY. Signed-off-by: Todor Tomov Reviewed-by: Laurent Pinchart Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 12 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov5645.c | 1345 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1358 insertions(+) commit 09c716af36e6741032ebbe5e0502f65abc245b17 Author: Todor Tomov Date: Tue Apr 11 08:28:30 2017 -0300 [media] media: i2c/ov5645: add the device tree binding document Add the document for ov5645 device tree binding. Signed-off-by: Todor Tomov Reviewed-by: Laurent Pinchart Acked-by: Sakari Ailus Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/ov5645.txt | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 6c1c0afd19317a15d6f2ae4965a73be7240aba18 Author: Hans Verkuil Date: Mon Apr 10 16:18:06 2017 -0300 [media] vsp1: set V4L2_CTRL_FLAG_MODIFY_LAYOUT for histogram controls The two histogram controls will modify the layout of the metadata, so this flag should be set. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_hgo.c | 2 ++ 1 file changed, 2 insertions(+) commit aacfed858fcafe888dccc6cbc6ce378a7488c6c7 Author: Hans Verkuil Date: Mon Apr 10 16:17:06 2017 -0300 [media] buffer.rst: clarify how V4L2_CTRL_FLAG_MODIFY_LAYOUT/GRABBER are used Explain when the V4L2_CTRL_FLAG_MODIFY_LAYOUT and V4L2_CTRL_FLAG_MODIFY_GRABBER flags should be used. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/buffer.rst | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit c0e681f5b08a9659202d835d901b59ff1efa919e Author: Hans Verkuil Date: Mon Apr 10 16:16:16 2017 -0300 [media] v4l2-ctrls.c: set V4L2_CTRL_FLAG_MODIFY_LAYOUT for ROTATE The rotate control will modify the layout by definition. Always set this flag. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6df8be763115a0ce6b486ea304742e5646f74287 Author: Hans Verkuil Date: Mon Apr 10 16:15:26 2017 -0300 [media] videodev.h: add V4L2_CTRL_FLAG_MODIFY_LAYOUT Add new flag to indicate that changing this control will change the buffer/mediabus layout as well. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/videodev2.h | 1 + 1 file changed, 1 insertion(+) commit bf587efff165e0563cc9d2227e49eeba7eb50434 Author: Hans Verkuil Date: Mon Apr 10 16:14:25 2017 -0300 [media] vidioc-queryctrl.rst: document V4L2_CTRL_FLAG_MODIFY_LAYOUT Document this new control flag. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 13 +++++++++++++ Documentation/media/videodev2.h.rst.exceptions | 1 + 2 files changed, 14 insertions(+) commit 0ac702d5b903d441ef64e61f453de7c0ce1322fa Author: Niklas Söderlund Date: Tue Sep 6 11:38:56 2016 -0300 [media] v4l: vsp1: Add HGT support The HGT is a Histogram Generator Two-Dimensions. It computes a weighted frequency histograms for hue and saturation areas over a configurable region of the image with optional subsampling. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/Makefile | 2 +- drivers/media/platform/vsp1/vsp1.h | 3 + drivers/media/platform/vsp1/vsp1_drv.c | 32 ++++- drivers/media/platform/vsp1/vsp1_entity.c | 14 ++ drivers/media/platform/vsp1/vsp1_hgt.c | 222 ++++++++++++++++++++++++++++++ drivers/media/platform/vsp1/vsp1_hgt.h | 42 ++++++ drivers/media/platform/vsp1/vsp1_pipe.c | 16 +++ drivers/media/platform/vsp1/vsp1_pipe.h | 2 + drivers/media/platform/vsp1/vsp1_regs.h | 9 ++ drivers/media/platform/vsp1/vsp1_video.c | 6 + 10 files changed, 343 insertions(+), 5 deletions(-) commit 5deb1c04c9f2cc3fe4b355a55a8fad244683a54a Author: Niklas Söderlund Date: Tue Sep 6 11:38:55 2016 -0300 [media] v4l: Define a pixel format for the R-Car VSP1 2-D histogram engine The format is used on the R-Car VSP1 video queues that carry 2-D histogram statistics data. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/meta-formats.rst | 1 + .../media/uapi/v4l/pixfmt-meta-vsp1-hgt.rst | 120 +++++++++++++++++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/videodev2.h | 3 +- 4 files changed, 124 insertions(+), 1 deletion(-) commit f2421521de185c0281799712863db8e23d29a375 Author: Laurent Pinchart Date: Wed Feb 24 20:40:22 2016 -0300 [media] v4l: vsp1: Add HGO support The HGO is a Histogram Generator One-Dimension. It computes per-channel histograms over a configurable region of the image with optional subsampling. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/Makefile | 2 +- drivers/media/platform/vsp1/vsp1.h | 3 + drivers/media/platform/vsp1/vsp1_drv.c | 42 ++++-- drivers/media/platform/vsp1/vsp1_entity.c | 16 +++ drivers/media/platform/vsp1/vsp1_hgo.c | 228 ++++++++++++++++++++++++++++++ drivers/media/platform/vsp1/vsp1_hgo.h | 45 ++++++ drivers/media/platform/vsp1/vsp1_pipe.c | 16 +++ drivers/media/platform/vsp1/vsp1_pipe.h | 2 + drivers/media/platform/vsp1/vsp1_regs.h | 20 ++- drivers/media/platform/vsp1/vsp1_video.c | 6 + 10 files changed, 367 insertions(+), 13 deletions(-) commit 14d66538716574f8899b22bff24a68301e65f08d Author: Laurent Pinchart Date: Sun Apr 10 04:37:48 2016 -0300 [media] v4l: Define a pixel format for the R-Car VSP1 1-D histogram engine The format is used on the R-Car VSP1 video queues that carry 1-D histogram statistics data. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/meta-formats.rst | 15 ++ .../media/uapi/v4l/pixfmt-meta-vsp1-hgo.rst | 168 +++++++++++++++++++++ Documentation/media/uapi/v4l/pixfmt.rst | 1 + drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/videodev2.h | 3 + 5 files changed, 188 insertions(+) commit 98eee2550f7b5e800641e90469f400a8c06fde73 Author: Laurent Pinchart Date: Wed Sep 7 09:36:31 2016 -0300 [media] v4l: vsp1: Fix HGO and HGT routing register addresses The addresses are incorrect, fix them. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_regs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c8663c8e15c95a351296d9d284b0cad5d373234c Author: Laurent Pinchart Date: Wed Sep 7 09:09:53 2016 -0300 [media] v4l: vsp1: Support histogram generators in pipeline configuration Histogram generators are single-pad entities that branch as leaf nodes at any point in the pipeline. Make sure that pipeline traversal and routing configuration support them correctly. Support for the actual HGO and HGT operation will come later. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_drm.c | 2 +- drivers/media/platform/vsp1/vsp1_drv.c | 4 +- drivers/media/platform/vsp1/vsp1_entity.c | 124 ++++++++++++++++++++++++++---- drivers/media/platform/vsp1/vsp1_entity.h | 8 +- drivers/media/platform/vsp1/vsp1_pipe.c | 6 +- drivers/media/platform/vsp1/vsp1_video.c | 18 ++--- 6 files changed, 134 insertions(+), 28 deletions(-) commit 99362e32332b5ce591a67a632073668754f28b0d Author: Laurent Pinchart Date: Wed Sep 7 08:58:49 2016 -0300 [media] v4l: vsp1: Add histogram support The histogram common code will be used to implement support for both the HGO and HGT histogram computation engines. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 1 + drivers/media/platform/vsp1/Makefile | 1 + drivers/media/platform/vsp1/vsp1_histo.c | 646 +++++++++++++++++++++++++++++++ drivers/media/platform/vsp1/vsp1_histo.h | 84 ++++ 4 files changed, 732 insertions(+) commit fb9ffa6a7f7ef39cc0f14f417b66411be5492512 Author: Laurent Pinchart Date: Tue Apr 12 19:40:46 2016 -0300 [media] v4l: Add metadata buffer type and format The metadata buffer type is used to transfer metadata between userspace and kernelspace through a V4L2 buffers queue. It comes with a new metadata capture capability and format description. Signed-off-by: Laurent Pinchart Tested-by: Guennadi Liakhovetski Acked-by: Sakari Ailus Acked-by: Hans Verkuil [hans.verkuil@cisco.com: removed left-over 'experimental' note] [hans.verkuil@cisco.com: add newline after _v4l2-meta-format label] Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/buffer.rst | 3 ++ Documentation/media/uapi/v4l/dev-meta.rst | 58 ++++++++++++++++++++++++ Documentation/media/uapi/v4l/devices.rst | 1 + Documentation/media/uapi/v4l/vidioc-querycap.rst | 3 ++ Documentation/media/videodev2.h.rst.exceptions | 2 + drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 19 ++++++++ drivers/media/v4l2-core/v4l2-dev.c | 16 ++++--- drivers/media/v4l2-core/v4l2-ioctl.c | 34 ++++++++++++++ drivers/media/v4l2-core/videobuf2-v4l2.c | 3 ++ include/media/v4l2-ioctl.h | 17 +++++++ include/trace/events/v4l2.h | 1 + include/uapi/linux/videodev2.h | 13 ++++++ 12 files changed, 164 insertions(+), 6 deletions(-) commit 3e9a0e0bfafdf6c28c520d43fd64c5775d04662f Author: Laurent Pinchart Date: Mon Jun 20 06:07:08 2016 -0300 [media] v4l: vsp1: wpf: Implement rotation support Some WPF instances, on Gen3 devices, can perform 90° rotation when writing frames to memory. Implement support for this using the V4L2_CID_ROTATE control. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_rpf.c | 2 +- drivers/media/platform/vsp1/vsp1_rwpf.c | 5 + drivers/media/platform/vsp1/vsp1_rwpf.h | 7 +- drivers/media/platform/vsp1/vsp1_video.c | 12 +- drivers/media/platform/vsp1/vsp1_wpf.c | 205 +++++++++++++++++++++++-------- 5 files changed, 177 insertions(+), 54 deletions(-) commit 99bb078eee469f7284b1dca36cf9edf7af1a92bf Author: Laurent Pinchart Date: Sun Feb 26 09:44:18 2017 -0300 [media] v4l: Clearly document interactions between formats, controls and buffers V4L2 exposes parameters that influence buffers sizes through the format ioctls (VIDIOC_G_FMT, VIDIOC_TRY_FMT, VIDIOC_S_FMT, and possibly VIDIOC_G_SELECTION and VIDIOC_S_SELECTION). Other parameters not part of the format structure may also influence buffer sizes or buffer layout in general. One existing such parameter is rotation, which is implemented by the V4L2_CID_ROTATE control and thus exposed through the V4L2 control ioctls. The interaction between those parameters and buffers is currently only partially specified by the V4L2 API. In particular interactions between controls and buffers isn't specified at all. The behaviour of the VIDIOC_S_FMT and VIDIOC_S_SELECTION ioctls when buffers are allocated is also not fully specified. This patch clearly defines and documents the interactions between formats, selections, controls and buffers. The preparatory discussions for the documentation change considered completely disallowing controls that change the buffer size or layout, in favour of extending the format API with a new ioctl that would bundle those controls with format information. The idea has been rejected, as this would essentially be a restricted version of the upcoming request API that wouldn't bring any additional value. Another option we have considered was to mandate the use of the request API to modify controls that influence buffer size or layout. This has also been rejected on the grounds that requiring the request API to change rotation even when streaming is stopped would significantly complicate implementation of drivers and usage of the V4L2 API for applications. Applications will however be required to use the upcoming request API to change at runtime formats or controls that influence the buffer size or layout, because of the need to synchronize buffers with the formats and controls. Otherwise there would be no way to interpret the content of a buffer correctly. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/buffer.rst | 110 ++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) commit aa23c0533c340fe37f290fa7fd112713434942a6 Author: Hans Verkuil Date: Mon May 4 07:25:51 2015 -0300 [media] ov2640: avoid calling ov2640_select_win() twice Simplify ov2640_set_params and ov2640_set_fmt. Signed-off-by: Hans Verkuil Acked-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 34b92def75da204c1cb75d43f55bc99ac371531a Author: Hans Verkuil Date: Mon May 4 07:25:55 2015 -0300 [media] ov9740: avoid calling ov9740_res_roundup() twice Simplify ov9740_s_fmt. Signed-off-by: Hans Verkuil Reported-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/ov9740.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit 137526904b1afae67c94150c214a0530c87e3d14 Author: Hans Verkuil Date: Mon May 4 07:25:54 2015 -0300 [media] ov9640: avoid calling ov9640_res_roundup() twice Simplify ov9640_s_fmt and ov9640_set_fmt Signed-off-by: Hans Verkuil Acked-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/ov9640.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) commit 08c4627c798b8c3c693438a2f61547920f39d333 Author: Hans Verkuil Date: Mon May 4 07:25:53 2015 -0300 [media] ov772x: avoid calling ov772x_select_params() twice Merge ov772x_s_fmt into ov772x_set_fmt. Signed-off-by: Hans Verkuil Acked-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/ov772x.c | 41 +++++++++++------------------------ 1 file changed, 13 insertions(+), 28 deletions(-) commit b174eb750e182ce28b1ab647dd724fc9bf8b17fb Author: Hans Verkuil Date: Mon May 4 07:25:52 2015 -0300 [media] ov5642: avoid calling ov5642_find_datafmt() twice Simplify ov5642_set_fmt(). Signed-off-by: Hans Verkuil Reported-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/ov5642.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20efc1e9fc43e7e8a57996a6b2d1ca747363a738 Author: Hans Verkuil Date: Mon May 4 07:25:50 2015 -0300 [media] mt9v022: avoid calling mt9v022_find_datafmt() twice Simplify mt9v022_s_fmt and mt9v022_set_fmt. Signed-off-by: Hans Verkuil Acked-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/mt9v022.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 961f0ab75e3ec67541ae5f2b2cca7b12b138cd83 Author: Hans Verkuil Date: Mon May 4 07:25:49 2015 -0300 [media] mt9m001: avoid calling mt9m001_find_datafmt() twice Simplify mt9m001_s_fmt and mt9m001_set_fmt. Signed-off-by: Hans Verkuil Acked-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/mt9m001.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1d3d64370e0894ee9816d0c3b385a41044921b3f Author: Hans Verkuil Date: Mon May 4 07:25:48 2015 -0300 [media] imx074: avoid calling imx074_find_datafmt() twice Simplify imx074_set_fmt(). Signed-off-by: Hans Verkuil Reported-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/imx074.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a2824c72ab5d9b2b93d49461f09d5ae342d994c Author: Stefan Brüns Date: Thu Feb 16 22:55:31 2017 -0200 [media] si2157: Add support for Si2141-A10 The Si2141 needs two distinct commands for powerup/reset, otherwise it will not respond to chip revision requests. It also needs a firmware to run properly. Cc: Evgeny Plehov Signed-off-by: Stefan Brüns Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/si2157.c | 23 +++++++++++++++++++++-- drivers/media/tuners/si2157_priv.h | 2 ++ 2 files changed, 23 insertions(+), 2 deletions(-) commit 297e14d5c6b6b51ccb79986b5e1dbbf8b7bd92bc Author: Antti Palosaari Date: Thu Apr 6 09:17:42 2017 -0300 [media] si2157: revert si2157: Si2141/2151 tuner support 'Reset' loop does not look correct. I tested it very many times and it never repeated those commands. If problem, it tries to solve, really occurs on some situations better solution should be find out. There is another patch which does not have such hackish looking loop. Lets change to it. Cc: Evgeny Plehov Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/si2157.c | 70 ++++---------------------------------- drivers/media/tuners/si2157_priv.h | 2 -- 2 files changed, 6 insertions(+), 66 deletions(-) commit f202f65dd4d1dba1d3fb9c48c6a5b0725367881d Merge: 1315f01 6895baa Author: Rafael J. Wysocki Date: Sat Apr 15 00:25:28 2017 +0200 Merge back ACPICA changes for v4.12. commit c97ad0fc4f075a9c1ba669963cfd4da062bbb683 Merge: c4a3fa2 69a07f1 Author: Rafael J. Wysocki Date: Sat Apr 15 00:23:36 2017 +0200 Merge back cpufreq core changes for v4.12. commit 27d6b97786ffd42be235553156c9bd4f075922aa Merge: f406270 ffc10d8 Author: Rafael J. Wysocki Date: Sat Apr 15 00:22:00 2017 +0200 Merge back ACPI namespace scan code changes for v4.12. commit 58b11f6712562e37e7ad61903958f235cca80132 Merge: 39da7c5 3ea6b70 Author: Rafael J. Wysocki Date: Sat Apr 15 00:20:16 2017 +0200 Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq Pull devfreq changes for v4.12 from MyungJoo Ham. * 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq: PM / devfreq: Move struct devfreq_governor to devfreq directory commit a6869e3a76f46b26a2b208882701fa17537b18cd Author: Nick Dyer Date: Fri Apr 14 14:44:08 2017 -0700 Input: synaptics-rmi4 - enable IRQ operation in F34 V7 The polled firmware update proved unreliable when testing on S7817. Use attention to signal commands are complete. Signed-off-by: Nick Dyer Tested-by: Chris Healy Acked-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_f34.c | 27 +++++++--- drivers/input/rmi4/rmi_f34.h | 7 +-- drivers/input/rmi4/rmi_f34v7.c | 117 ++++++++++++++++++++++------------------- 3 files changed, 83 insertions(+), 68 deletions(-) commit 25670fb0373013ad9cdb2676afb468e4d88e1d53 Author: Nick Dyer Date: Fri Apr 14 14:43:25 2017 -0700 Input: synaptics-rmi4 - change F12 clip to inactive border debug The data in F12_2D_Ctrl8 corresponds to the inactive border width used by the RMI device. It is not in pixel units and should not be treated as a clip value. Signed-off-by: Nick Dyer Tested-by: Chris Healy Acked-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_f12.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 72fe38704c92e63459dd362cd27f9b32a63bbb48 Author: Nick Dyer Date: Fri Apr 14 14:42:44 2017 -0700 Input: synaptics-rmi4 - use dev_driver_string when registering interrupt When IRQ handling was moved to rmi_driver in 3aeed5b the naming of the interrupt changed from "rmi4_i2c" to "2-0020" (or similar). This patch restores the previous behaviour and makes the interrupt easier to identify in /proc/interrupts. Signed-off-by: Nick Dyer Tested-by: Chris Healy Acked-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2886a734081ed31f3279550ea9d50ef1d84a84e6 Merge: ad19638 6fc4649 Author: Thomas Gleixner Date: Fri Apr 14 23:03:09 2017 +0200 Merge branch 'fortglx/4.12/time' of https://git.linaro.org/people/john.stultz/linux into timers/core Merge timer updates from John Stultz: A preparatory patch series for correcting the clock event devices via NTP to avoid early timer expiry and reprogramming. commit 0ccecd95e797f0c383a43278fcca74d47cd8a785 Author: Dou Liyang Date: Mon Apr 10 16:05:00 2017 +0800 x86/irq: Remove a redundant #ifdef directive The call to irq_ctx_init() is wrapped in #ifdef CONFIG_X86_32. The declaration of irq_ctx_init in irq.h provides already a stub inline for the X86_32=n case. Remove the redundant #ifdef in the code. [ tglx: Massaged changelog ] Signed-off-by: Dou Liyang Link: http://lkml.kernel.org/r/1491811500-30307-1-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner arch/x86/kernel/irqinit.c | 2 -- 1 file changed, 2 deletions(-) commit 7b6e106276fcc803e397f9b1bd4c272055c7cf5a Author: Dou Liyang Date: Sun Apr 9 18:46:46 2017 +0800 x86/smp: Remove the redundant #ifdef CONFIG_SMP directive The !CONFIG_X86_LOCAL_APIC section in smp.h wraps the define of hard_smp_processor_id() into #ifndef CONFIG_SMP. But Kconfig has: config X86_LOCAL_APIC def_bool y depends on X86_64 || SMP || X86_32_NON_STANDARD ... Therefore SMP can't be 'y' when X86_LOCAL_APIC == 'n'. Remove the redundant #ifndef CONFIG_SMP. [ tglx: Massaged changelog ] Signed-off-by: Dou Liyang Cc: jaswinder@infradead.org Link: http://lkml.kernel.org/r/1491734806-15413-2-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/smp.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 0f08c3b22996c91cff62c96cf4b3db88902e12a9 Author: Dou Liyang Date: Sun Apr 9 18:46:45 2017 +0800 x86/smp: Reduce code duplication The CONFIG_X86_32_SMP and CONFIG_X86_64_SMP sections in smp.h contain duplicate defines. Merge them and only put the difference into an #ifdeff'ed section. [ tglx: Massaged changelog ] Signed-off-by: Dou Liyang Cc: jaswinder@infradead.org Link: http://lkml.kernel.org/r/1491734806-15413-1-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/smp.h | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit ffab9385b314d62039a4a5df29703fc264e85e08 Author: Dan Williams Date: Thu Apr 13 15:05:30 2017 -0700 acpi, nfit: add support for acpi 6.1 dimm state flags Add support for the ACPI_NFIT_MEM_MAP_FAILED ("map_fail") and ACPI_NFIT_MEM_HEALTH_ENABLED ("smart_notify") health state flags. The "map_fail" flag identifies DIMMs that were not mapped into one or more physical address ranges. The "health_notify" flag indicates whether platform firmware will send notifications when there is new SMART health data to consume. Acked-by: Toshi Kani Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e88da7998d7dc7b40dbe3ac85d9a5d6f91cc2d13 Author: Dan Williams Date: Thu Apr 13 14:37:39 2017 -0700 Revert "libnvdimm: band aid btt vs clear poison locking" This reverts commit 4aa5615e080a "libnvdimm: band aid btt vs clear poison locking". Now that poison list locking has been converted to a spinlock and poison list entry allocation during i/o has been converted to GFP_NOWAIT, revert the band-aid that disabled error clearing from btt i/o. Cc: Vishal Verma Cc: Dave Jiang Signed-off-by: Dan Williams drivers/nvdimm/claim.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 6fc46497a9fb283c4f8e8d04ae4f0bf3c0041f7e Author: Nicolai Stange Date: Thu Mar 30 22:04:58 2017 +0200 x86/uv/time: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Currently, the x86's uv rtc clockevent device is initialized as follows: clock_event_device_uv.min_delta_ns = NSEC_PER_SEC / sn_rtc_cycles_per_second; clock_event_device_uv.max_delta_ns = clocksource_uv.mask * (NSEC_PER_SEC / sn_rtc_cycles_per_second); This translates to a ->min_delta_ticks value of 1 and a ->max_delta_ticks value of clocksource_uv.mask. Initialize ->min_delta_ticks and ->max_delta_ticks with these values respectively. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: Mike Travis Cc: Dimitri Sivanich Signed-off-by: Nicolai Stange Signed-off-by: John Stultz arch/x86/platform/uv/uv_time.c | 2 ++ 1 file changed, 2 insertions(+) commit 16c125b6c2c58a77756f099605724a2b11aea2d1 Author: Nicolai Stange Date: Thu Mar 30 22:01:13 2017 +0200 unicore32/time: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the unicore32 arch's clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Guan Xuetao Signed-off-by: Nicolai Stange Signed-off-by: John Stultz arch/unicore32/kernel/time.c | 2 ++ 1 file changed, 2 insertions(+) commit 8ab3a284a6348f4160a93051d1ed69692589a5c8 Author: Nicolai Stange Date: Thu Mar 30 21:59:42 2017 +0200 um/time: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the uml arch's clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Richard Weinberger Cc: Jeff Dike Cc: user-mode-linux-devel@lists.sourceforge.net Signed-off-by: Nicolai Stange Signed-off-by: John Stultz arch/um/kernel/time.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 45b586ef231abf29bff2b91efb74c10d01a0d79c Author: Nicolai Stange Date: Thu Mar 30 21:57:43 2017 +0200 tile/time: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Currently, the tile's timer clockevent device is initialized as follows: evt->max_delta_ns = clockevent_delta2ns(MAX_TICK, evt); and .min_delta_ns = 1000, The first one translates to a ->max_delta_ticks value of MAX_TICK. For the latter, note that the clockevent core will superimpose a minimum of 1us by itself -- setting ->min_delta_ticks to 1 is safe here. Initialize ->min_delta_ticks and ->max_delta_ticks with these values. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Chris Metcalf Signed-off-by: Nicolai Stange Signed-off-by: John Stultz arch/tile/kernel/time.c | 2 ++ 1 file changed, 2 insertions(+) commit c5d710654c0eb9a33d32aadea4863442461cf847 Author: Nicolai Stange Date: Thu Mar 30 21:55:55 2017 +0200 score/time: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the score arch's clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Chen Liqin Cc: Lennox Wu Signed-off-by: Nicolai Stange Signed-off-by: John Stultz arch/score/kernel/time.c | 2 ++ 1 file changed, 2 insertions(+) commit 06c546110b0dafbc96c6eaf00aaa5835a18408c1 Author: Nicolai Stange Date: Thu Mar 30 21:54:55 2017 +0200 s390/time: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Currently, the s390's CPU timer clockevent device is initialized as follows: cd->min_delta_ns = 1; cd->max_delta_ns = LONG_MAX; Note that the device's time to cycle conversion factor, i.e. cd->mult / (2^cd->shift), is approx. equal to 4. Hence, this would translate to cd->min_delta_ticks = 4; cd->max_delta_ticks = 4 * LONG_MAX; However, a minimum value of 1ns is in the range of noise anyway and the clockevent core will take care of this by increasing it to 1us or so. Furthermore, 4*LONG_MAX would overflow the unsigned long argument the clockevent devices gets programmed with. Thus, initialize ->min_delta_ticks with 1 and ->max_delta_ticks with ULONG_MAX. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: David Hildenbrand Cc: linux-s390@vger.kernel.org Signed-off-by: Nicolai Stange Signed-off-by: John Stultz arch/s390/kernel/time.c | 2 ++ 1 file changed, 2 insertions(+) commit 5f664e2b1bb1325c350192ead3f305742fcc79c7 Author: Nicolai Stange Date: Thu Mar 30 21:48:28 2017 +0200 mn10300/cevt-mn10300: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the mn10300 arch's clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: David Howells Cc: linux-am33-list@redhat.com Signed-off-by: Nicolai Stange Signed-off-by: John Stultz arch/mn10300/kernel/cevt-mn10300.c | 2 ++ 1 file changed, 2 insertions(+) commit e1e5fc150da4233f2bf9c143068e1a673071a68f Author: Nicolai Stange Date: Thu Mar 30 21:42:20 2017 +0200 c6x/timer64: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the c6x arch's clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Mark Salter Cc: Aurelien Jacquiot Cc: linux-c6x-dev@linux-c6x.org Signed-off-by: Nicolai Stange Signed-off-by: John Stultz arch/c6x/platforms/timer64.c | 2 ++ 1 file changed, 2 insertions(+) commit 18154c5c978bbd3a77f05a66421c362374edca57 Author: Nicolai Stange Date: Thu Mar 30 21:41:09 2017 +0200 blackfin: time-ts: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the blackfin arch's clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Steven Miao Signed-off-by: Nicolai Stange Signed-off-by: John Stultz arch/blackfin/kernel/time-ts.c | 4 ++++ 1 file changed, 4 insertions(+) commit 747d04b30e5285d8fc81db6a20b745bde3830798 Author: Nicolai Stange Date: Sun Mar 26 15:44:03 2017 +0200 x86/apic/timer: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the x86 arch's apic clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: "H. Peter Anvin" Cc: x86@kernel.org CC: Dou Liyang Cc: Gu Zheng Signed-off-by: Nicolai Stange Signed-off-by: John Stultz arch/x86/kernel/apic/apic.c | 4 ++++ 1 file changed, 4 insertions(+) commit e4db9253d6b4c1d927254f1c4bef875573229502 Author: Nicolai Stange Date: Thu Mar 30 21:47:32 2017 +0200 MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the MIPS arch's clockevent drivers initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from these drivers. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Ralf Baechle Cc: Keguang Zhang Cc: John Crispin Acked-by: Ralf Baechle Signed-off-by: Nicolai Stange Signed-off-by: John Stultz arch/mips/alchemy/common/time.c | 4 +++- arch/mips/jz4740/time.c | 2 ++ arch/mips/kernel/cevt-bcm1480.c | 2 ++ arch/mips/kernel/cevt-ds1287.c | 2 ++ arch/mips/kernel/cevt-gt641xx.c | 2 ++ arch/mips/kernel/cevt-sb1250.c | 2 ++ arch/mips/kernel/cevt-txx9.c | 2 ++ arch/mips/loongson32/common/time.c | 2 ++ arch/mips/loongson64/common/cs5536/cs5536_mfgpt.c | 2 ++ arch/mips/loongson64/loongson-3/hpet.c | 2 ++ arch/mips/ralink/cevt-rt3352.c | 2 ++ arch/mips/sgi-ip27/ip27-timer.c | 2 ++ 12 files changed, 25 insertions(+), 1 deletion(-) commit 547733c58dc3d2a50af762d4fdaf1d552e6b31cd Author: Nicolai Stange Date: Thu Mar 30 22:10:21 2017 +0200 clockevents/drivers/atlas7: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the timer-atlas7 clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Barry Song Cc: linux-arm-kernel@lists.infradead.org Acked-by: Daniel Lezcano Signed-off-by: Nicolai Stange Signed-off-by: John Stultz drivers/clocksource/timer-atlas7.c | 2 ++ 1 file changed, 2 insertions(+) commit bb2e94ac0cf4628f5e5f778c8de4a376dac43558 Author: Nicolai Stange Date: Thu Mar 30 22:09:12 2017 +0200 clockevents/drivers/sh_cmt: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the sh_cmt clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Acked-by: Daniel Lezcano Signed-off-by: Nicolai Stange Signed-off-by: John Stultz drivers/clocksource/sh_cmt.c | 2 ++ 1 file changed, 2 insertions(+) commit 6cf57ae8cd9916efa889dc030b1010571b4567ab Author: Nicolai Stange Date: Thu Mar 30 22:08:49 2017 +0200 x86/numachip timer: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the numachip clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Acked-by: Daniel Lezcano Signed-off-by: Nicolai Stange Signed-off-by: John Stultz drivers/clocksource/numachip.c | 2 ++ 1 file changed, 2 insertions(+) commit c7438ba1133f9cccf230d63e7f978b5a71d468ff Author: Nicolai Stange Date: Thu Mar 30 22:08:20 2017 +0200 clockevents/drivers/metag: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the metag_generic clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: James Hogan Acked-by: Daniel Lezcano Signed-off-by: Nicolai Stange Signed-off-by: John Stultz drivers/clocksource/metag_generic.c | 2 ++ 1 file changed, 2 insertions(+) commit 8317b53fbe32439c56ba83ad4435b641799b2ce8 Author: Nicolai Stange Date: Thu Mar 30 22:07:49 2017 +0200 clockevents/drivers/dw_apb: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the dw_apb clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Acked-by: Daniel Lezcano Signed-off-by: Nicolai Stange Signed-off-by: John Stultz drivers/clocksource/dw_apb_timer.c | 2 ++ 1 file changed, 2 insertions(+) commit a60a9fb8fb52768bd19cd8c0893f4c0432acb10e Author: Nicolai Stange Date: Thu Mar 30 21:43:32 2017 +0200 hexagon/time: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the hexagon arch's clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Richard Kuo Cc: linux-hexagon@vger.kernel.org Acked-by: Richard Kuo Signed-off-by: Nicolai Stange Signed-off-by: John Stultz arch/hexagon/kernel/time.c | 2 ++ 1 file changed, 2 insertions(+) commit b77f41618c2647e80ee45d6609d95b3d4a10e372 Author: Nicolai Stange Date: Thu Mar 30 22:03:41 2017 +0200 x86/lguest/timer: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the x86 arch's lguest clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Rusty Russell Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: Paul Bolle Cc: Andy Lutomirski Cc: Juergen Gross Cc: "Luis R. Rodriguez" Cc: lguest@lists.ozlabs.org Acked-by: Rusty Russell Signed-off-by: Nicolai Stange Signed-off-by: John Stultz arch/x86/lguest/boot.c | 2 ++ 1 file changed, 2 insertions(+) commit 7fd534247d1b6fcd399ab70f04db39047724898a Author: Nicolai Stange Date: Thu Mar 30 21:56:47 2017 +0200 sparc/time: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the sparc arch's clockevent drivers initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from these drivers. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Acked-by: David S. Miller Signed-off-by: Nicolai Stange Signed-off-by: John Stultz arch/sparc/kernel/time_32.c | 2 ++ arch/sparc/kernel/time_64.c | 2 ++ 2 files changed, 4 insertions(+) commit 115631c350bfd3b9cbc0aff75b3975e17c83d3d9 Author: Nicolai Stange Date: Thu Mar 30 21:53:17 2017 +0200 powerpc/time: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the powerpc arch's clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Oliver O'Halloran Cc: linuxppc-dev@lists.ozlabs.org Acked-by: Michael Ellerman (powerpc) Signed-off-by: Nicolai Stange Signed-off-by: John Stultz arch/powerpc/kernel/time.c | 2 ++ 1 file changed, 2 insertions(+) commit 33ae7a9b6c23cdffe7449ddf1a992117262b939b Author: Nicolai Stange Date: Thu Mar 30 21:44:31 2017 +0200 m68k/coldfire/pit: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the m68k arch's coldfire clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Greg Ungerer CC: Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org Acked-by: Greg Ungerer Signed-off-by: Nicolai Stange Signed-off-by: John Stultz arch/m68k/coldfire/pit.c | 2 ++ 1 file changed, 2 insertions(+) commit 3d18d661aaad5a22f4d37a0592acc9d784f2a11b Author: Nicolai Stange Date: Thu Mar 30 22:06:42 2017 +0200 x86/xen/time: Set ->min_delta_ticks and ->max_delta_ticks In preparation for making the clockevents core NTP correction aware, all clockevent device drivers must set ->min_delta_ticks and ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a clockevent device's rate is going to change dynamically and thus, the ratio of ns to ticks ceases to stay invariant. Make the x86 arch's xen clockevent driver initialize these fields properly. This patch alone doesn't introduce any change in functionality as the clockevents core still looks exclusively at the (untouched) ->min_delta_ns and ->max_delta_ns. As soon as this has changed, a followup patch will purge the initialization of ->min_delta_ns and ->max_delta_ns from this driver. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Daniel Lezcano Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Boris Ostrovsky Cc: Juergen Gross Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: xen-devel@lists.xenproject.org Reviewed-by: Boris Ostrovsky Signed-off-by: Nicolai Stange Signed-off-by: John Stultz arch/x86/xen/time.c | 4 ++++ 1 file changed, 4 insertions(+) commit a88086e09876f468356cfec5319ff62004e36a1b Author: Dan Carpenter Date: Thu Apr 13 22:42:31 2017 +0300 net: off by one in inet6_pton() If "scope_len" is sizeof(scope_id) then we would put the NUL terminator one space beyond the end of the buffer. Fixes: b1a951fe469e ("net/utils: generic inet_pton_with_scope helper") Signed-off-by: Dan Carpenter Signed-off-by: Jens Axboe net/core/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00e043936e9a1c274c29366c7ecd9e17c79418e6 Author: Omar Sandoval Date: Fri Apr 14 01:00:02 2017 -0700 blk-mq: introduce Kyber multiqueue I/O scheduler The Kyber I/O scheduler is an I/O scheduler for fast devices designed to scale to multiple queues. Users configure only two knobs, the target read and synchronous write latencies, and the scheduler tunes itself to achieve that latency goal. The implementation is based on "tokens", built on top of the scalable bitmap library. Tokens serve as a mechanism for limiting requests. There are two tiers of tokens: queueing tokens and dispatch tokens. A queueing token is required to allocate a request. In fact, these tokens are actually the blk-mq internal scheduler tags, but the scheduler manages the allocation directly in order to implement its policy. Dispatch tokens are device-wide and split up into two scheduling domains: reads vs. writes. Each hardware queue dispatches batches round-robin between the scheduling domains as long as tokens are available for that domain. These tokens can be used as the mechanism to enable various policies. The policy Kyber uses is inspired by active queue management techniques for network routing, similar to blk-wbt. The scheduler monitors latencies and scales the number of dispatch tokens accordingly. Queueing tokens are used to prevent starvation of synchronous requests by asynchronous requests. Various extensions are possible, including better heuristics and ionice support. The new scheduler isn't set as the default yet. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe Documentation/block/kyber-iosched.txt | 14 + block/Kconfig.iosched | 9 + block/Makefile | 1 + block/kyber-iosched.c | 719 ++++++++++++++++++++++++++++++++++ 4 files changed, 743 insertions(+) commit c05f8525f67b7d6489b0502211d4ed35622d9beb Author: Omar Sandoval Date: Fri Apr 14 01:00:01 2017 -0700 blk-mq-sched: make completed_request() callback more useful Currently, this callback is called right after put_request() and has no distinguishable purpose. Instead, let's call it before put_request() as soon as I/O has completed on the request, before we account it in blk-stat. With this, Kyber can enable stats when it sees a latency outlier and make sure the outlier gets accounted. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-sched.h | 11 +++-------- block/blk-mq.c | 5 ++++- include/linux/elevator.h | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) commit 5b72727299307e53888277729f980ab03264dac8 Author: Omar Sandoval Date: Fri Apr 14 01:00:00 2017 -0700 blk-mq: export helpers blk_mq_finish_request() is required for schedulers that define their own put_request(). blk_mq_run_hw_queue() is required for schedulers that hold back requests to be run later. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq.c | 2 ++ include/linux/blk-mq.h | 1 + 2 files changed, 3 insertions(+) commit 229a92873f3afc20b0d91aaaec08cbc11689dd8b Author: Omar Sandoval Date: Fri Apr 14 00:59:59 2017 -0700 blk-mq: add shallow depth option for blk_mq_get_tag() Wire up the sbitmap_get_shallow() operation to the tag code so that a caller can limit the number of tags available to it. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-tag.c | 5 ++++- block/blk-mq.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit c05e66733788118377c21a913c1bc7b64bccc167 Author: Omar Sandoval Date: Fri Apr 14 00:59:58 2017 -0700 sbitmap: add sbitmap_get_shallow() operation This operation supports the use case of limiting the number of bits that can be allocated for a given operation. Rather than setting aside some bits at the end of the bitmap, we can set aside bits in each word of the bitmap. This means we can keep the allocation hints spread out and support sbitmap_resize() nicely at the cost of lower granularity for the allowed depth. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe include/linux/sbitmap.h | 55 ++++++++++++++++++++++++++++++++++++ lib/sbitmap.c | 75 ++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 123 insertions(+), 7 deletions(-) commit 84253394927c4352652d0b118ad9583f5646959b Author: Christoph Hellwig Date: Thu Apr 6 13:28:46 2017 +0200 remove the mg_disk driver This drivers was added in 2008, but as far as a I can tell we never had a single platform that actually registered resources for the platform driver. It's also been unmaintained for a long time and apparently has a ATA mode that can be driven using the IDE/libata subsystem. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe Documentation/blockdev/mflash.txt | 84 --- drivers/block/Kconfig | 17 - drivers/block/Makefile | 1 - drivers/block/mg_disk.c | 1110 ------------------------------------- include/linux/mg_disk.h | 45 -- 5 files changed, 1257 deletions(-) commit ad19638463a4b5c909fcebf0f19358c4bf4fed48 Author: Deepa Dinamani Date: Sun Mar 26 12:04:18 2017 -0700 time: Change k_clock nsleep() to use timespec64 struct timespec is not y2038 safe on 32 bit machines. Replace uses of struct timespec with struct timespec64 in the kernel. The syscall interfaces themselves will be changed in a separate series. Note that the restart_block parameter for nanosleep has also been left unchanged and will be part of syscall series noted above. Signed-off-by: Deepa Dinamani Cc: y2038@lists.linaro.org Cc: john.stultz@linaro.org Cc: arnd@arndb.de Link: http://lkml.kernel.org/r/1490555058-4603-8-git-send-email-deepa.kernel@gmail.com Signed-off-by: Thomas Gleixner include/linux/hrtimer.h | 2 +- include/linux/posix-timers.h | 2 +- kernel/compat.c | 6 ++++-- kernel/time/alarmtimer.c | 7 ++++--- kernel/time/hrtimer.c | 10 ++++++---- kernel/time/posix-cpu-timers.c | 36 ++++++++++++++++++------------------ kernel/time/posix-stubs.c | 6 ++++-- kernel/time/posix-timers.c | 10 ++++++---- 8 files changed, 44 insertions(+), 35 deletions(-) commit 5f252b325625c13db1dbc76ac6cdb49ee3bd062e Author: Deepa Dinamani Date: Sun Mar 26 12:04:17 2017 -0700 time: Change k_clock timer_set() and timer_get() to use timespec64 struct timespec is not y2038 safe on 32 bit machines. Replace uses of struct timespec with struct timespec64 in the kernel. struct itimerspec internally uses struct timespec. Use struct itimerspec64 which uses struct timespec64. The syscall interfaces themselves will be changed in a separate series. Signed-off-by: Deepa Dinamani Cc: y2038@lists.linaro.org Cc: john.stultz@linaro.org Cc: arnd@arndb.de Link: http://lkml.kernel.org/r/1490555058-4603-7-git-send-email-deepa.kernel@gmail.com Signed-off-by: Thomas Gleixner drivers/char/mmtimer.c | 20 ++++++++++---------- include/linux/posix-timers.h | 12 ++++++------ kernel/time/alarmtimer.c | 14 +++++++------- kernel/time/posix-clock.c | 21 +++++++-------------- kernel/time/posix-cpu-timers.c | 28 ++++++++++++++++------------ kernel/time/posix-timers.c | 37 +++++++++++++++++++++---------------- 6 files changed, 67 insertions(+), 65 deletions(-) commit 0fe6afe3834ba13d75fa1168f0f66f08b427e1c0 Author: Deepa Dinamani Date: Sun Mar 26 12:04:16 2017 -0700 time: Change k_clock clock_set() to use timespec64 struct timespec is not y2038 safe on 32 bit machines. Replace uses of struct timespec with struct timespec64 in the kernel. The syscall interfaces themselves will be changed in a separate series. Signed-off-by: Deepa Dinamani Cc: y2038@lists.linaro.org Cc: john.stultz@linaro.org Cc: arnd@arndb.de Link: http://lkml.kernel.org/r/1490555058-4603-6-git-send-email-deepa.kernel@gmail.com Signed-off-by: Thomas Gleixner drivers/char/mmtimer.c | 2 +- include/linux/posix-timers.h | 2 +- kernel/time/posix-clock.c | 5 ++--- kernel/time/posix-cpu-timers.c | 2 +- kernel/time/posix-timers.c | 11 +++++------ 5 files changed, 10 insertions(+), 12 deletions(-) commit d2e3e0ca5df7f4ffe90a04790b3be20485df056a Author: Deepa Dinamani Date: Sun Mar 26 12:04:15 2017 -0700 time: Change k_clock clock_getres() to use timespec64 struct timespec is not y2038 safe on 32 bit machines. Replace uses of struct timespec with struct timespec64 in the kernel. The syscall interfaces themselves will be changed in a separate series. The clock_getres() interface has also been changed to use timespec64 even though this particular interface is not affected by the y2038 problem. This helps verification for internal kernel code for y2038 readiness by getting rid of time_t/ timeval/ timespec completely. Signed-off-by: Deepa Dinamani Cc: y2038@lists.linaro.org Cc: john.stultz@linaro.org Cc: arnd@arndb.de Link: http://lkml.kernel.org/r/1490555058-4603-5-git-send-email-deepa.kernel@gmail.com Signed-off-by: Thomas Gleixner drivers/char/mmtimer.c | 2 +- include/linux/posix-timers.h | 2 +- kernel/time/alarmtimer.c | 2 +- kernel/time/posix-clock.c | 9 +++------ kernel/time/posix-cpu-timers.c | 6 +++--- kernel/time/posix-timers.c | 10 ++++++---- 6 files changed, 15 insertions(+), 16 deletions(-) commit 3c9c12f4b4610dba864038c7822b427816f5893c Author: Deepa Dinamani Date: Sun Mar 26 12:04:14 2017 -0700 time: Change k_clock clock_get() to use timespec64 struct timespec is not y2038 safe on 32 bit machines. Replace uses of struct timespec with struct timespec64 in the kernel. The syscall interfaces themselves will be changed in a separate series. Signed-off-by: Deepa Dinamani Cc: y2038@lists.linaro.org Cc: john.stultz@linaro.org Cc: arnd@arndb.de Link: http://lkml.kernel.org/r/1490555058-4603-4-git-send-email-deepa.kernel@gmail.com Signed-off-by: Thomas Gleixner drivers/char/mmtimer.c | 4 ++-- include/linux/posix-timers.h | 2 +- include/linux/timekeeping.h | 5 +++++ kernel/time/alarmtimer.c | 4 ++-- kernel/time/posix-clock.c | 9 +++------ kernel/time/posix-cpu-timers.c | 10 +++++----- kernel/time/posix-stubs.c | 9 ++++++--- kernel/time/posix-timers.c | 32 +++++++++++++++++--------------- 8 files changed, 41 insertions(+), 34 deletions(-) commit d340266e19ddb70dbd608f9deedcfb35fdb9d419 Author: Deepa Dinamani Date: Sun Mar 26 12:04:13 2017 -0700 time: Change posix clocks ops interfaces to use timespec64 struct timespec is not y2038 safe on 32 bit machines. The posix clocks apis use struct timespec directly and through struct itimerspec. Replace the posix clock interfaces to use struct timespec64 and struct itimerspec64 instead. Also fix up their implementations accordingly. Note that the clock_getres() interface has also been changed to use timespec64 even though this particular interface is not affected by the y2038 problem. This helps verification for internal kernel code for y2038 readiness by getting rid of time_t/ timeval/ timespec. Signed-off-by: Deepa Dinamani Cc: arnd@arndb.de Cc: y2038@lists.linaro.org Cc: netdev@vger.kernel.org Cc: Richard Cochran Cc: john.stultz@linaro.org Link: http://lkml.kernel.org/r/1490555058-4603-3-git-send-email-deepa.kernel@gmail.com Signed-off-by: Thomas Gleixner drivers/ptp/ptp_clock.c | 18 +++++++----------- include/linux/posix-clock.h | 10 +++++----- kernel/time/posix-clock.c | 34 ++++++++++++++++++++++++---------- 3 files changed, 36 insertions(+), 26 deletions(-) commit 2ac00f17b2e110c67ed2af3713bc04aec62e4608 Author: Deepa Dinamani Date: Sun Mar 26 12:04:12 2017 -0700 time: Delete do_sys_setimeofday() struct timespec is not y2038 safe on 32 bit machines and needs to be replaced with struct timespec64. do_sys_timeofday() is just a wrapper function. Replace all calls to this function with direct calls to do_sys_timeofday64() instead and delete do_sys_timeofday(). Signed-off-by: Deepa Dinamani Cc: y2038@lists.linaro.org Cc: john.stultz@linaro.org Cc: arnd@arndb.de Cc: linux-alpha@vger.kernel.org Link: http://lkml.kernel.org/r/1490555058-4603-2-git-send-email-deepa.kernel@gmail.com Signed-off-by: Thomas Gleixner arch/alpha/kernel/osf_sys.c | 4 +++- include/linux/timekeeping.h | 15 --------------- kernel/compat.c | 4 ++-- kernel/time/posix-stubs.c | 5 ++++- kernel/time/posix-timers.c | 5 ++++- kernel/time/time.c | 4 ++-- 6 files changed, 15 insertions(+), 22 deletions(-) commit c238f2343441e3995d2d4e993de42b072d005f4a Author: Andy Shevchenko Date: Thu Mar 16 17:50:45 2017 +0200 x86/cpu: Keep model defines sorted by model number For better maintenance keep it sorted by numeric model ID. Add new lines to seperate model groups. Signed-off-by: Andy Shevchenko Cc: Dave Hansen Link: http://lkml.kernel.org/r/20170316155045.50389-1-andriy.shevchenko@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/intel-family.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d170fe7dd992b313d4851ae5ab77ee7a51ed8c72 Author: Matthias Kaehlcke Date: Wed Apr 12 11:20:30 2017 -0700 genirq: Use cpumask_available() for check of cpumask variable This fixes the following clang warning when CONFIG_CPUMASK_OFFSTACK=n: kernel/irq/manage.c:839:28: error: address of array 'desc->irq_common_data.affinity' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] Signed-off-by: Matthias Kaehlcke Cc: Grant Grundler Cc: Rusty Russell Cc: Greg Hackmann Cc: Michael Davidson Cc: Andrew Morton Link: http://lkml.kernel.org/r/20170412182030.83657-2-mka@chromium.org Signed-off-by: Thomas Gleixner kernel/irq/manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7e30f01a9e221067bb4b579e3cfc25cd2617467 Author: Matthias Kaehlcke Date: Wed Apr 12 11:20:29 2017 -0700 cpumask: Add helper cpumask_available() With CONFIG_CPUMASK_OFFSTACK=y cpumask_var_t is a struct cpumask pointer, otherwise a struct cpumask array with a single element. Some code dealing with cpumasks needs to validate that a cpumask_var_t is not a NULL pointer when CONFIG_CPUMASK_OFFSTACK=y. This is typically done by performing the check always, regardless of the underlying type of cpumask_var_t. This works in both cases, however clang raises a warning like this when CONFIG_CPUMASK_OFFSTACK=n: kernel/irq/manage.c:839:28: error: address of array 'desc->irq_common_data.affinity' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] Add the inline helper cpumask_available() which only performs the pointer check if CONFIG_CPUMASK_OFFSTACK=y. Signed-off-by: Matthias Kaehlcke Cc: Grant Grundler Cc: Rusty Russell Cc: Greg Hackmann Cc: Michael Davidson Cc: Andrew Morton Link: http://lkml.kernel.org/r/20170412182030.83657-1-mka@chromium.org Signed-off-by: Thomas Gleixner include/linux/cpumask.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 021cbc1edadf466d088da1345264e1840c6665d3 Author: Martin Kepplinger Date: Fri Apr 14 10:14:06 2017 -0700 Input: ar1021_i2c - highlight support for AR1020 ar1021_i2c also supports the ar1020 device I'm using. This is tested. They also share the same datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/40001393C.pdf So let users see that they have a compatible in front of them by adding AR1020 to the driver's description. Signed-off-by: Martin Kepplinger Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/Kconfig | 6 +++--- drivers/input/touchscreen/ar1021_i2c.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 61e977b7a43111909a4513529187f56726abda9e Author: Dmitry Torokhov Date: Thu Apr 13 16:36:42 2017 -0700 Input: ar1021_i2c - do not force raising edge IRQ trigger We should not be forcing edge triggered interrupt, but rather let platform decide the kind of trigger it needs to use. Also, the driver is not quite safe with regard to edge-triggered interrupts as it does not try to kick the controller after requesting/enabling IRQ. Reviewed-By: Christian Gmeiner Tested-by: Martin Kepplinger Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ar1021_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95123fc43560d6f4a60e74f72836e63cd8848f76 Author: Dmitry Torokhov Date: Mon Dec 12 15:32:57 2016 -0800 Input: ar1021_i2c - fix too long name in driver's device table The name field in structure i2c_device_id is 20 characters, and we expect it to be NULL-terminated, however we are trying to stuff it with 21 bytes and thus NULL-terminator is lost. This causes issues when one creates device with name "MICROCHIP_AR1021_I2C" as i2c core cuts off the last "C", and automatic module loading by alias does not work as result. The -I2C suffix in the device name is superfluous, we know what bus we are dealing with, so let's drop it. Also, no other driver uses capitals, and the manufacturer name is normally not included, except in very rare cases of incompatible name collisions. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116211 Fixes: dd4cae8bf166 ("Input: Add Microchip AR1021 i2c touchscreen") Reviewed-By: Christian Gmeiner Tested-by: Martin Kepplinger Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ar1021_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7952b4baff402ddca1a263380bfd142f10290eb8 Author: Douglas Anderson Date: Fri Apr 14 09:40:32 2017 -0700 ASoC: rt5514: Unconfuse the rt5514 at probe / resume time The rt5514 can get confused and incorrectly detect a start bit if the SCL/SDA lines happen to both go low and then high again. This situation has been seen to happen at reboot time and is also theoretically possible during suspend/resume if the rt5514 keeps power but we shut down the i2c connection. When this happens the rt5514 is confused about the state of the i2c bus and won't recognize its own address. That will lead to the rt5514 incorrectly NAKing the first transfer. A single i2c transfer to any address should be enough to get the rt5514 out of this funky state. It is currently believed that this problem should be fixed in the rt5514 driver itself because it seems that the i2c controller in the rt5514 is easily confused. Most i2c devices wouldn't detect a start bit in this case. Signed-off-by: Douglas Anderson Signed-off-by: Mark Brown sound/soc/codecs/rt5514.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 0a78b248c3324fbbba49f74e2c93e0f436583788 Author: Douglas Anderson Date: Fri Apr 14 09:40:31 2017 -0700 ASoC: rt5514: Avoid relying on uninitialized "val" value In rt5514_i2c_probe() if the regmap_read(RT5514_VENDOR_ID2) fails then "val" may be left as uninitialized. Current code relies on "val" not being RT5514_DEVICE_ID, but that's potentially unsafe. Let's check for errors from regmap_read() and also explicitly init the value do we're not passing a possibly uninitialized int to printk. Signed-off-by: Douglas Anderson Signed-off-by: Mark Brown sound/soc/codecs/rt5514.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d0c02e14e48be94dd312ff6edffab9f9e6acd480 Author: Douglas Anderson Date: Fri Apr 14 09:40:30 2017 -0700 ASoC: rt5514: Mark rt5514_i2c_driver as static There's no reason for rt5514_i2c_driver to be non-static. Signed-off-by: Douglas Anderson Signed-off-by: Mark Brown sound/soc/codecs/rt5514.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4af5924c02818ca170bb6902dbb883687b969aeb Author: Dong Aisheng Date: Fri Apr 14 22:32:43 2017 +0800 regulator: anatop: make sure regulator name is properly defined For anatop regulator we must have a name accordingly. Make sure the name is properly checked before using it to avoid a possible kernel NULL point crash. Signed-off-by: Dong Aisheng Signed-off-by: Mark Brown drivers/regulator/anatop-regulator.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit c93609ab3924cc974fc90001fb6aa250a8900a3c Author: Mark Brown Date: Tue Apr 11 21:31:40 2017 +0100 regulator: core: Allow dummy regulators for supplies Rather than just not resolving the supply when there is explicitly no supply mapping fall through and allow a dummy supply to be substituted. This fixes issues with constant retries reported by Dong Aisheng. Signed-off-by: Mark Brown Tested-by: Dong Aisheng Reviewed-by: Dong Aisheng drivers/regulator/core.c | 8 -------- 1 file changed, 8 deletions(-) commit 43fc99f293cc802866bea904ca2f1f8573f236f7 Author: Mark Brown Date: Thu Apr 13 18:36:59 2017 +0100 regulator: core: Only propagate voltage changes to if it can change voltages When we are propagating voltage changes to parent regulators don't bother if the parent does not have permission to change voltages. This simplifies error checking in the function for cases where the regulator lacks some of the voltage operations. Reported-by: Dong Aisheng Tested-by: Dong Aisheng Reviewed-by: Dong Aisheng Signed-off-by: Mark Brown drivers/regulator/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a9bbb453b50c91295ab362e4832eb37fd4e6785d Author: Axel Lin Date: Fri Apr 14 10:50:43 2017 +0800 regulator: vctrl: Fix out of bounds array access for vctrl->vtable Current code only allocates rdesc->n_voltages entries for vctrl->vtable. Thus use rdesc->n_voltages instead of n_voltages in the for loop. While at it, also switch to use devm_kcalloc instead of devm_kmalloc_array + __GFP_ZERO flag and fix the argument order. Signed-off-by: Axel Lin Signed-off-by: Mark Brown drivers/regulator/vctrl-regulator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 43594dd453f082d36336ea8338cd9c2d28c1691a Author: kbuild test robot Date: Fri Apr 14 04:57:35 2017 +0800 regulator: tps65132: fix platform_no_drv_owner.cocci warnings drivers/regulator/tps65132-regulator.c:274:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu Acked-by: Laxman Dewangan Signed-off-by: Mark Brown drivers/regulator/tps65132-regulator.c | 1 - 1 file changed, 1 deletion(-) commit ed3730c435f1a9f9559ed7762035d22d8a95adfe Author: Andreas Klinger Date: Mon Apr 10 19:00:01 2017 +0200 IIO: bmp280-core.c: fix error in humidity calculation While calculating the compensation of the humidity there are negative values interpreted as unsigned because of unsigned variables used. These values as well as the constants need to be casted to signed as indicated by the documentation of the sensor. Signed-off-by: Andreas Klinger Acked-by: Linus Walleij Reviewed-by: Matt Ranostay Cc: Signed-off-by: Jonathan Cameron drivers/iio/pressure/bmp280-core.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit d454ae2edbfefabe7903c4f6881d1db8fea4b9f7 Author: Matt Ranostay Date: Wed Apr 12 19:16:57 2017 -0700 iio: light: apds9960: add system-wide suspend APDS9960 can safely force runtime suspend if the system wants to enter system-wide suspend Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/light/apds9960.c | 2 ++ 1 file changed, 2 insertions(+) commit 4d4b30526eb88c4528ddfa8c113961c1ac178479 Author: Fabrice Gasnier Date: Mon Apr 10 17:49:50 2017 +0200 iio: dac: add support for stm32 DAC Add support for STMicroelectronics STM32 DAC. It's a 12-bit, voltage output digital-to-analog converter. It has two output channels, each with its own converter. It supports 8 bits or 12bits left/right aligned data format. Only 12bits right-aligned is used here. It has built-in noise or triangle waveform generator, and supports external triggers for conversions. Each channel can be used independently, with separate trigger, then separate IIO devices are used to handle this. Core driver is intended to share common resources such as clock, reset, reference voltage and registers. Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/dac/Kconfig | 15 ++ drivers/iio/dac/Makefile | 2 + drivers/iio/dac/stm32-dac-core.c | 180 +++++++++++++++++++++ drivers/iio/dac/stm32-dac-core.h | 51 ++++++ drivers/iio/dac/stm32-dac.c | 334 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 582 insertions(+) commit 48428d17325291f5be8c0420efca7e312587d9ad Author: Fabrice Gasnier Date: Mon Apr 10 17:49:49 2017 +0200 dt-bindings: iio: stm32-dac: Add support for STM32 DAC Document STMicroelectronics STM32 DAC (digital-to-analog converter). Signed-off-by: Fabrice Gasnier Acked-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/dac/st,stm32-dac.txt | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 298747b7579f5bbbced793d997b333fd10a24921 Author: Carlo Caione Date: Sun Apr 9 15:56:08 2017 +0200 platform/x86: hp-wmi: Fix detection for dock and tablet mode The current driver code is not checking for the error values returned by 'hp_wmi_dock_state()' and 'hp_wmi_tablet_state()' before passing the returned values down to 'input_report_switch()'. This error code is being translated to '1' in the input subsystem, reporting the wrong status. The biggest problem caused by this issue is that several laptops are wrongly reported by the driver as docked, preventing them to be put to sleep using the LID (and in most cases they are not even dockable). With this patch we create the report switches only if we are able to read the dock and tablet mode status correctly from ACPI. Signed-off-by: Carlo Caione Signed-off-by: Darren Hart (VMware) drivers/platform/x86/hp-wmi.c | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) commit c7dfc2facbd69dad89b75e13c608da709668dcd0 Author: Carlo Caione Date: Sun Apr 9 15:56:07 2017 +0200 platform/x86: hp-wmi: Fix error value for hp_wmi_tablet_state hp_wmi_tablet_state() fails to return the correct error code when hp_wmi_perform_query() returns the HP WMI query specific error code that is a positive value. Signed-off-by: Carlo Caione Signed-off-by: Darren Hart (VMware) drivers/platform/x86/hp-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ddf9ee4084b68def495e63bb7e05d6b767e414d1 Author: René Hickersberger?= Date: Thu Apr 13 15:51:37 2017 +0200 Staging: iio: accel: adis16203: fixed a brace coding style issue Fixed a brace coding style issue. Signed-off-by: René Hickersberger Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16203.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 835d89e92fa77b6a1effea3db80202e1ffec413a Author: Christophe JAILLET Date: Fri Apr 14 08:08:03 2017 +0200 md-cluster: Fix a memleak in an error handling path We know that 'bm_lockres' is NULL here, so 'lockres_free(bm_lockres)' is a no-op. According to resource handling in case of error a few lines below, it is likely that 'bitmap_free(bitmap)' was expected instead. Fixes: b98938d16a10 ("md-cluster: introduce cluster_check_sync_size") Signed-off-by: Christophe JAILLET Reviewed-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md-cluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf23527798cfc0274fb1444c34289da8c4e866a0 Author: Lorenzo Bianconi Date: Sun Apr 9 20:03:37 2017 +0200 iio: imu: st_lsm6dsx: simplify data ready pin parsing Simplify st_lsm6dsx_of_get_drdy_pin routine since of_property_read_u32 error conditions are already managed in st_lsm6dsx_get_drdy_reg() Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 64e8ed3d4a6dcd6139a869a3e760e625cb0d3022 Author: Vikas Shivappa Date: Fri Apr 7 17:33:57 2017 -0700 x86/intel_rdt/mba: Add schemata file support for MBA Add support to update the MBA bandwidth values for the domains via the schemata file. - Verify that the bandwidth value is valid - Round to the next control step depending on the bandwidth granularity of the hardware - Convert the bandwidth to delay values and write the delay values to the corresponding domain PQOS_MSRs. [ tglx: Massaged changelog ] Signed-off-by: Vikas Shivappa Cc: ravi.v.shankar@intel.com Cc: tony.luck@intel.com Cc: fenghua.yu@intel.com Cc: vikas.shivappa@intel.com Link: http://lkml.kernel.org/r/1491611637-20417-9-git-send-email-vikas.shivappa@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/intel_rdt.h | 1 + arch/x86/kernel/cpu/intel_rdt.c | 2 ++ arch/x86/kernel/cpu/intel_rdt_schemata.c | 43 ++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) commit c6ea67de52c29a8b45e5fc7569fc4336bfd557b0 Author: Vikas Shivappa Date: Fri Apr 7 17:33:56 2017 -0700 x86/intel_rdt: Make schemata file parsers resource specific The schemata files are the user space interface to update resource controls. The parser is hardwired to support only cache resources, which do not fit the requirements of memory resources. Add a function pointer for a parser to the struct rdt_resource and switch the cache parsing over. [ tglx: Massaged changelog ] Signed-off-by: Vikas Shivappa Cc: ravi.v.shankar@intel.com Cc: tony.luck@intel.com Cc: fenghua.yu@intel.com Cc: vikas.shivappa@intel.com Link: http://lkml.kernel.org/r/1491611637-20417-8-git-send-email-vikas.shivappa@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/intel_rdt.h | 6 ++++++ arch/x86/kernel/cpu/intel_rdt.c | 8 ++++++++ arch/x86/kernel/cpu/intel_rdt_schemata.c | 31 +++++++++++++++++-------------- 3 files changed, 31 insertions(+), 14 deletions(-) commit db69ef65636e6da135680d75d8646bd7e76136bc Author: Vikas Shivappa Date: Fri Apr 7 17:33:55 2017 -0700 x86/intel_rdt/mba: Add info directory files for Memory Bandwidth Allocation The files in the info directory for MBA are as follows: num_closids The maximum number of CLOSids available for MBA min_bandwidth The minimum memory bandwidth percentage value bandwidth_gran The granularity of the bandwidth control in percent for the particular CPU SKU. Intermediate values entered are rounded off to the previous control step available. Available bandwidth control steps are minimum_bandwidth + N * bandwidth_gran. delay_linear When set, the OS writes a linear percentage based value to the control MSRs ranging from minimum_bandwidth to 100 percent. This value is informational and has no influence on the values written to the schemata files. The values written to the schemata are always bandwidth percentage that is requested. Signed-off-by: Vikas Shivappa Cc: ravi.v.shankar@intel.com Cc: tony.luck@intel.com Cc: fenghua.yu@intel.com Cc: vikas.shivappa@intel.com Link: http://lkml.kernel.org/r/1491611637-20417-7-git-send-email-vikas.shivappa@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/intel_rdt.h | 1 + arch/x86/kernel/cpu/intel_rdt.c | 1 + arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 62 ++++++++++++++++++++++++++++++-- 3 files changed, 62 insertions(+), 2 deletions(-) commit 6a507a6ad8a6955a7d57255377edcef576823749 Author: Vikas Shivappa Date: Fri Apr 7 17:33:54 2017 -0700 x86/intel_rdt: Make information files resource specific Cache allocation and memory bandwidth allocation require different information files in the resctrl/info directory, but the current implementation does not allow to have files per resource. Add the necessary fields to the resource struct and assign the files dynamically depending on the resource type. Signed-off-by: Vikas Shivappa Cc: ravi.v.shankar@intel.com Cc: tony.luck@intel.com Cc: fenghua.yu@intel.com Cc: vikas.shivappa@intel.com Link: http://lkml.kernel.org/r/1491611637-20417-6-git-send-email-vikas.shivappa@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/intel_rdt.h | 6 ++++++ arch/x86/kernel/cpu/intel_rdt.c | 1 + arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 18 ++++++++++++++---- 3 files changed, 21 insertions(+), 4 deletions(-) commit 05b93417ce5b924c6652de19fdcc27439ab37c90 Author: Vikas Shivappa Date: Fri Apr 7 17:33:53 2017 -0700 x86/intel_rdt/mba: Add primary support for Memory Bandwidth Allocation (MBA) The MBA feature details like minimum bandwidth supported, bandwidth granularity etc are obtained via executing CPUID with EAX=10H ,ECX=3. Setup and initialize the MBA specific extensions to data structures like global list of RDT resources, RDT resource structure and RDT domain structure. [ tglx: Split out the seperate structure and the CBM related parts ] Signed-off-by: Vikas Shivappa Cc: ravi.v.shankar@intel.com Cc: tony.luck@intel.com Cc: fenghua.yu@intel.com Cc: vikas.shivappa@intel.com Link: http://lkml.kernel.org/r/1491611637-20417-5-git-send-email-vikas.shivappa@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/intel_rdt.h | 24 ++++++++++- arch/x86/kernel/cpu/intel_rdt.c | 89 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 110 insertions(+), 3 deletions(-) commit ab66a33b032eb5b8186aeaf648127bce829c9efd Author: Vikas Shivappa Date: Fri Apr 7 17:33:52 2017 -0700 x86/intel_rdt/mba: Memory bandwith allocation feature detect Detect MBA feature if CPUID.(EAX=10H, ECX=0):EBX.L2[bit 3] = 1. Add supporting data structures to detect feature details which is done in later patch using CPUID with EAX=10H, ECX= 3. Signed-off-by: Vikas Shivappa Cc: ravi.v.shankar@intel.com Cc: tony.luck@intel.com Cc: fenghua.yu@intel.com Cc: vikas.shivappa@intel.com Link: http://lkml.kernel.org/r/1491611637-20417-4-git-send-email-vikas.shivappa@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/cpufeatures.h | 2 ++ arch/x86/include/asm/intel_rdt.h | 8 ++++++++ arch/x86/kernel/cpu/intel_rdt.c | 4 ++++ arch/x86/kernel/cpu/scattered.c | 1 + 4 files changed, 15 insertions(+) commit 0921c54769bac209b302027384e9dc081198c8f5 Author: Thomas Gleixner Date: Fri Apr 14 14:14:31 2017 +0200 x86/intel_rdt: Add resource specific msr update function Updating of Cache and Memory bandwidth QOS MSRs is different. Add a function pointer to struct rdt_resource and convert the cache part over. Based on Vikas all in one patch^Wmess. Signed-off-by: Thomas Gleixner Cc: ravi.v.shankar@intel.com Cc: tony.luck@intel.com Cc: fenghua.yu@intel.com Cc: vikas.shivappa@intel.com arch/x86/include/asm/intel_rdt.h | 63 +++++++++++++++++---------------- arch/x86/kernel/cpu/intel_rdt.c | 75 +++++++++++++++++++++++++++------------- 2 files changed, 84 insertions(+), 54 deletions(-) commit d3e11b4d6ffd363747ac6e6b5522baa9ca5a20c0 Author: Thomas Gleixner Date: Fri Apr 14 13:00:36 2017 +0200 x86/intel_rdt: Move CBM specific data into a struct Memory bandwidth allocation requires different information than cache allocation. To avoid a lump of data in struct rdt_resource, move all cache related information into a seperate structure and add that to struct rdt_resource. Sanitize the data types while at it. Signed-off-by: Thomas Gleixner Cc: ravi.v.shankar@intel.com Cc: tony.luck@intel.com Cc: fenghua.yu@intel.com Cc: vikas.shivappa@intel.com arch/x86/include/asm/intel_rdt.h | 49 ++++++++++-------- arch/x86/kernel/cpu/intel_rdt.c | 88 +++++++++++++++++--------------- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 2 +- arch/x86/kernel/cpu/intel_rdt_schemata.c | 9 ++-- 4 files changed, 83 insertions(+), 65 deletions(-) commit 2545e9f51ea860736c4dc1e90a44ed75e9c91e3b Author: Vikas Shivappa Date: Fri Apr 7 17:33:51 2017 -0700 x86/intel_rdt: Cleanup namespace to support multiple resource types Lot of data structures and functions are named after cache specific resources(named after cbm, cache etc). In many cases other non cache resources may need to share the same data structures/functions. Generalize such naming to prepare to add more resources like memory bandwidth. Signed-off-by: Vikas Shivappa Cc: ravi.v.shankar@intel.com Cc: tony.luck@intel.com Cc: fenghua.yu@intel.com Cc: vikas.shivappa@intel.com Link: http://lkml.kernel.org/r/1491611637-20417-3-git-send-email-vikas.shivappa@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/intel_rdt.h | 22 +++++++++++----------- arch/x86/kernel/cpu/intel_rdt.c | 28 ++++++++++++++-------------- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 16 ++++++++-------- arch/x86/kernel/cpu/intel_rdt_schemata.c | 20 ++++++++++---------- 4 files changed, 43 insertions(+), 43 deletions(-) commit a9cad3d4f046bbd8f096b78d220c8d7074c2e93f Author: Vikas Shivappa Date: Fri Apr 7 17:33:50 2017 -0700 Documentation, x86: Intel Memory bandwidth allocation Update the 'intel_rdt_ui' documentation to have Memory bandwidth(b/w) allocation interface usage. Signed-off-by: Vikas Shivappa Cc: ravi.v.shankar@intel.com Cc: tony.luck@intel.com Cc: fenghua.yu@intel.com Cc: vikas.shivappa@intel.com Link: http://lkml.kernel.org/r/1491611637-20417-2-git-send-email-vikas.shivappa@linux.intel.com Signed-off-by: Thomas Gleixner Documentation/x86/intel_rdt_ui.txt | 107 ++++++++++++++++++++++++++++++------- 1 file changed, 87 insertions(+), 20 deletions(-) commit 70a1ee92564d079b4c7a375b244a6c849b81f12f Author: Thomas Gleixner Date: Fri Apr 14 14:07:47 2017 +0200 x86/intel_rdt: Organize code properly Having init functions at random places in the middle of the code is unintuitive. Move them close to the init routine and mark them __init. Signed-off-by: Thomas Gleixner Cc: ravi.v.shankar@intel.com Cc: tony.luck@intel.com Cc: fenghua.yu@intel.com Cc: vikas.shivappa@intel.com arch/x86/kernel/cpu/intel_rdt.c | 92 ++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 47 deletions(-) commit 06b57e4550d400c2e7dcafbde6fdb1fcb6fcdcee Author: Thomas Gleixner Date: Fri Apr 14 14:06:26 2017 +0200 x86/intel_rdt: Init padding only if a device exists If no device exists it's pointless to calculate the padding data for the schemata files. Signed-off-by: Thomas Gleixner Cc: ravi.v.shankar@intel.com Cc: tony.luck@intel.com Cc: fenghua.yu@intel.com Cc: vikas.shivappa@intel.com arch/x86/kernel/cpu/intel_rdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b4bac145b9d21200312287da09d2e29d1ff674e8 Author: Chen Guanqiao Date: Sun Apr 9 23:21:00 2017 +0800 iio:meter:ade7759: Removing use of deprecated macros (S_IRUGO, S_IWUSR) This fixes the coding style issue of using (S_IWUSR | S_IRUGO) in place of 4-digit octal numbers. Signed-off-by: Chen Guanqiao Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7759.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 984fb2443091d51e196662cdaddfe2823b2778ec Author: Narcisa Ana Maria Vasile Date: Sun Apr 9 13:40:07 2017 +0300 staging: iio: ad5933: Protect DIRECT mode using claim/release helpers This device operates in DIRECT_MODE and BUFFER_HARDWARE mode. Replace usages of iio_dev->mlock with iio_device_{claim|release}_direct_mode() helper functions to guarantee DIRECT mode and consequently protect BUFFER mode too. Add and use a device private lock to protect against conflicting access of the state data. This helps with IIO subsystem redefining iio_dev->mlock to be used by the IIO core only for protecting device operating mode changes. ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. Protect changing of attributes inside ad5933_store(). Attributes can no longer be changed while in buffered mode. Remove lock from ad5933_work() because buffer mode should be enabled when we reach this, and claiming DIRECT mode in all the other places should protect it. Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Jonathan Cameron drivers/staging/iio/impedance-analyzer/ad5933.c | 50 ++++++++++++++----------- 1 file changed, 28 insertions(+), 22 deletions(-) commit a9e9c7153e96ee7f2777b3d5d99a23bf74dcaa21 Author: Akinobu Mita Date: Wed Mar 29 01:34:48 2017 +0900 iio: adc: add max1117/max1118/max1119 ADC driver This adds max1117/max1118/max1119 8-bit, dual-channel ADC driver. This new driver uses the zero length spi_transfers with the cs_change flag set and/or the non-zero delay_usecs. 1. The zero length transfer with the spi_transfer.cs_change set is required in order to select CH1. The chip select line must be brought high and low again without transfer. 2. The zero length transfer with the spi_transfer.delay_usecs > 0 is required for waiting the conversion to be complete. The conversion begins with the falling edge of the chip select. During the conversion process, SCLK is ignored. These two usages are unusual. But the spi controller drivers that use a default implementation of transfer_one_message() are likely to work. (I've tested this adc driver with spi-omap2-mcspi and spi-xilinx) On the other hand, some spi controller drivers that have their own transfer_one_message() may not work. But at least for the zero length transfer with delay_usecs > 0, I'm proposing a new testcase for the spi-loopback-test that can test whether the delay_usecs setting has taken effect. Acked-by: Rob Herring Signed-off-by: Akinobu Mita Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Cc: Rob Herring Cc: Mark Rutland Cc: Mark Brown Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/max1118.txt | 21 ++ drivers/iio/adc/Kconfig | 12 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/max1118.c | 307 +++++++++++++++++++++ 4 files changed, 341 insertions(+) commit d97a913206379fe978a20a127ec76aaafbf65ef1 Author: Chen Guanqiao Date: Sun Apr 9 12:30:26 2017 +0800 iio:meter:ade7759: Removing use of deprecated macros (S_IRUGO, S_IWUSR, S_IXUGO) Removing use of deprecated macros(S_IRUGO, S_IWUSR, S_IXUGO), and replace with 4 digit octal. Signed-off-by: Chen Guanqiao Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7759.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 2a830a45ffb05d1aa8d7866235501f635678bec6 Author: Benjamin Gaignard Date: Tue Apr 4 09:47:52 2017 +0200 iio: stm32 trigger: Add counter enable modes Device counting could be controlled by the level or the edges of a trigger. in_count0_enable_mode attibute allow to set the control mode. Signed-off-by: Benjamin Gaignard Signed-off-by: Jonathan Cameron .../ABI/testing/sysfs-bus-iio-timer-stm32 | 25 ++++++++ drivers/iio/trigger/stm32-timer-trigger.c | 70 ++++++++++++++++++++++ 2 files changed, 95 insertions(+) commit 4adec7da0536a345d901d7ba55b6c93a14eeeaff Author: Benjamin Gaignard Date: Tue Apr 4 09:47:51 2017 +0200 iio: stm32 trigger: Add quadrature encoder device One of the features of STM32 trigger hardware block is a quadrature encoder that can counts up/down depending of the levels and edges of the selected external pins. This patch allow to read/write the counter, get it direction, set/get quadrature modes and get scale factor. When counting up preset value is the limit of the counter. When counting down the counter start from preset value down to 0. This preset value could be set/get by using /sys/bus/iio/devices/iio:deviceX/in_count0_preset attribute. Signed-off-by: Benjamin Gaignard Reviewed-by: William Breathitt Gray Signed-off-by: Jonathan Cameron .../ABI/testing/sysfs-bus-iio-timer-stm32 | 46 +++- drivers/iio/trigger/stm32-timer-trigger.c | 244 ++++++++++++++++++++- include/linux/mfd/stm32-timers.h | 2 + 3 files changed, 282 insertions(+), 10 deletions(-) commit 84ca8e364acb26aba3292bc113ca8ed4335380fd Author: Matt Ranostay Date: Thu Apr 13 23:21:56 2017 -0700 iio: proximity: as3935: fix as3935_write AS3935_WRITE_DATA macro bit is incorrect and the actual write sequence is two leading zeros. Cc: George McCollister Signed-off-by: Matt Ranostay Cc: Signed-off-by: Jonathan Cameron drivers/iio/proximity/as3935.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ce420fd4251809b4c3119b3b20c8b13bd8eba150 Author: Pavel Roskin Date: Thu Apr 13 14:54:23 2017 -0700 iio: dac: ad7303: fix channel description realbits, storagebits and shift should be numbers, not ASCII characters. Signed-off-by: Pavel Roskin Reviewed-by: Lars-Peter Clausen Cc: Signed-off-by: Jonathan Cameron drivers/iio/dac/ad7303.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ae369e559f16c5245d6b987c43799179af16e4d6 Author: Takashi Sakamoto Date: Fri Apr 14 16:46:32 2017 +0900 ALSA: firewire-tascam: support drain callback for MIDI playback substream ALSA driver for TASCAM FireWire series transfers MIDI messages in system workqueue. In current design of the driver, applications should wait for sequence of transmission when they close ALSA rawmidi character devices. However, when considering design of rawmidi interface, it's preferable to wait in drain ioctl. This commit adds support for the drain ioctl to wait for the end of the transmission. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam-midi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1f94205d2225339c77e64d5872ec575ee2815720 Author: Takashi Sakamoto Date: Fri Apr 14 16:46:31 2017 +0900 ALSA: firewire-tascam: move message parameters for async midi port Units on TASCAM FireWire series handle MIDI messages with support for running status. Drivers for the series should remember current running status and transfer valid MIDI messages. For this purpose, current ALSA driver for the series has some members in its top-level structure. This is due to better abstraction of async midi port. Nowadays, the abstraction was localized just for the driver. This commit moves the members to structure for async midi port. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam-midi.c | 3 --- sound/firewire/tascam/tascam-transaction.c | 33 +++++++++++++++--------------- sound/firewire/tascam/tascam.h | 4 ++-- 3 files changed, 19 insertions(+), 21 deletions(-) commit 3e7dc65ca001a6e40e78b912c6146ec013a3b49a Author: Takashi Sakamoto Date: Fri Apr 14 16:46:30 2017 +0900 ALSA: firewire-tascam: initialize parameters at open of rawmidi character devices In current design of ALSA driver for TASCAM FireWire series, initialization of members in asymc midi port structure is done at device probing. Some of the members should be initialized every time to use rawmidi devices because they're changed in sequence of transmission for MIDI messages. This commit adds a new function to initialize them. Invariant parameters during object lifetime are kept as is. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam-midi.c | 2 ++ sound/firewire/tascam/tascam-transaction.c | 16 ++++------------ sound/firewire/tascam/tascam.h | 3 +-- 3 files changed, 7 insertions(+), 14 deletions(-) commit 98a00d3602a1c50a397893c5de26dbbe7d77804a Author: Takashi Sakamoto Date: Fri Apr 14 16:46:29 2017 +0900 ALSA: firewire-tascam: use fixed-length array for message cache to async midi port ALSA driver for TASCAM FireWire series internally allocates 4 byte buffer for asynchronous transaction to transfer MIDI messages. However, the buffer can be allocated with memory object of parent structure. This commit adds 4 byte array as a member of the structure and obsoletes the redundant allocation. This is deallocated with memory object of parent structure. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam-transaction.c | 15 --------------- sound/firewire/tascam/tascam.h | 4 ++-- 2 files changed, 2 insertions(+), 17 deletions(-) commit 27badc4c10da29b884f1ac7cc9ce13e849ce8be4 Author: Takashi Sakamoto Date: Fri Apr 14 16:46:28 2017 +0900 ALSA: firewire-tascam: use the same address for asynchronous transaction for MIDI message Units on TASCAM FireWire series receive MIDI messages by asynchronous transactions on IEEE 1394 bus. Although the transaction is sent to a certain register, current ALSA driver for this series has a redundant design. This commit use the same address for the transaction. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam-transaction.c | 9 ++++----- sound/firewire/tascam/tascam.h | 3 +-- 2 files changed, 5 insertions(+), 7 deletions(-) commit 38d5826142496a6e0c21fa3fdb48fa910008c159 Author: Takashi Sakamoto Date: Fri Apr 14 16:46:27 2017 +0900 ALSA: firewire-tascam: send fixed-length transaction for async midi port TASCAM FireWire series uses asynchronous transactions with fixed length payload for MIDI messaging. On the other hand, ALSA driver for the series has a redundant design to handle different length of payload. This commit removes the redundant abstraction. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam-transaction.c | 22 +++++++--------------- sound/firewire/tascam/tascam.h | 3 +-- 2 files changed, 8 insertions(+), 17 deletions(-) commit 9bae2150d0144e0be423367e5385442141979213 Author: Takashi Sakamoto Date: Fri Apr 14 16:46:26 2017 +0900 ALSA: firewire-tascam: remove callback function from async midi port As a result of localization of async midi port, ALSA driver for TASCAM FireWire series can call helper function directly instead of callback registration. This commit removes the redundant design. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam-transaction.c | 8 +++----- sound/firewire/tascam/tascam.h | 9 +-------- 2 files changed, 4 insertions(+), 13 deletions(-) commit 531f471834227d0321110c071ea352bb14aca36d Author: Takashi Sakamoto Date: Fri Apr 14 16:46:25 2017 +0900 ALSA: firewire-lib/firewire-tascam: localize async midi port In Linux kernel 4.4, firewire-lib got a feature called as 'async midi port' for transmission of MIDI message via IEEE 1394 asynchronous communication, however actual consumer of this feature is ALSA driver for TASCAM FireWire series only. When adding this feature, I assumed that ALSA driver for Digi00x might also be a consumer, actually it's not. This commit moves the feature from firewire-lib to firewire-tascam module. Two minor kernel APIs are removed. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/lib.c | 141 ----------------------------- sound/firewire/lib.h | 54 ----------- sound/firewire/tascam/tascam-transaction.c | 125 +++++++++++++++++++++++++ sound/firewire/tascam/tascam.h | 45 +++++++++ 4 files changed, 170 insertions(+), 195 deletions(-) commit db2f814194eb5898b6e0a2de9700ef204f4d040f Author: Alexandre Belloni Date: Sat Apr 8 17:22:02 2017 +0200 rtc: ds1307: Add m41t0 to OF device ID table m41t0 was added to the I2C device ID table but not the OF table. Fix that. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8566f70c8a90f3914b06e934852596ba94aaa381 Author: Stefan Agner Date: Thu Mar 23 16:54:57 2017 -0700 rtc: ds1307: support m41t0 variant The m41t0 variant is very similar to the already supported m41t00 variant, with the notable exception of the oscillator fail bit. The data sheet notes: If the oscillator fail (OF) bit is internally set to a '1,' this indicates that the oscillator has either stopped, or was stopped for some period of time and can be used to judge the validity of the clock and date data. The bit will get cleared with a regular write of the system time, so no changes are needed to clear it. Signed-off-by: Stefan Agner Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 + drivers/rtc/rtc-ds1307.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) commit 03a32da5ca63d418ab95063b06687e00a6df9855 Author: Tony Lindgren Date: Sun Mar 26 20:34:23 2017 -0700 rtc: cpcap: fix improper use of IRQ_NONE for request_threaded_irq There's a funny typo where IRQ_NONE is used instead of IRQF_TRIGGER_NONE for request_threaded_irq(). Let's fix it before it gets copied elsewhere. Fixes: dd3bf50b35e3 ("rtc: cpcap: new rtc driver") Signed-off-by: Tony Lindgren Reviewed-By: Sebastian Reichel Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cpcap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a1e23a42f1bdc00e32fc4869caef12e4e6272f26 Author: Hans de Goede Date: Sat Mar 18 14:45:49 2017 +0100 rtc: cmos: Do not assume irq 8 for rtc when there are no legacy irqs On some systems (e.g. Intel Bay Trail systems) the legacy PIC is not used, in this case virq 8 will be a random irq, rather then hw_irq 8 from the PIC. Requesting virq 8 in this case will not help us to get alarm irqs and may cause problems for other drivers which actually do need virq 8, for example on an Asus Transformer T100TA this leads to: [ 28.745155] genirq: Flags mismatch irq 8. 00000088 (mmc0) vs. 00000080 (rtc0) [ 28.753700] mmc0: Failed to request IRQ 8: -16 [ 28.975934] sdhci-acpi: probe of 80860F14:01 failed with error -16 This commit fixes this by making the rtc-cmos driver continue without using an irq rather then claiming irq 8 when no irq is specified in the pnp-info and there are no legacy-irqs. Signed-off-by: Hans de Goede Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cmos.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 7ee06cb2f840a96be46233181ed4557901a74385 Author: Hans de Goede Date: Sat Apr 8 19:54:20 2017 +0200 x86: i8259: export legacy_pic symbol The classic PC rtc-coms driver has a workaround for broken ACPI device nodes for it which lack an irq resource. This workaround used to unconditionally hardcode the irq to 8 in these cases. This was causing irq conflict problems on systems without a legacy-pic so a recent patch added an if (nr_legacy_irqs()) guard to the workaround to avoid this irq conflict. nr_legacy_irqs() uses the legacy_pic symbol under the hood causing an undefined symbol error if the rtc-cmos code is build as a module. This commit exports the legacy_pic symbol to fix this. Cc: rtc-linux@googlegroups.com Cc: alexandre.belloni@free-electrons.com Signed-off-by: Hans de Goede Signed-off-by: Alexandre Belloni arch/x86/kernel/i8259.c | 1 + 1 file changed, 1 insertion(+) commit ace2fb5a8b65d6aba530068ea9331f18e10ef565 Author: Colin King Date: Thu Apr 13 16:59:12 2017 +0100 x86/boot/e820: Remove a redundant self assignment Remove a redundant self assignment of table->nr_entries, it does nothing and is an artifact of code simplification re-work. Detected by CoverityScan, CID#1428450 ("Self assignment") Fixes: 441ac2f33dd7 ("x86/boot/e820: Simplify e820__update_table()") Signed-off-by: Colin Ian King Cc: kernel-janitors@vger.kernel.org Cc: Denys Vlasenko Link: http://lkml.kernel.org/r/20170413155912.12078-1-colin.king@canonical.com Signed-off-by: Thomas Gleixner arch/x86/kernel/e820.c | 1 - 1 file changed, 1 deletion(-) commit 9ea74f7c70cd5e408f1cfbda0e6836929f820d49 Author: Piotr Luc Date: Thu Apr 13 22:10:56 2017 +0200 x86/mce: Enable PPIN for Knights Landing/Mill Intel Xeon Phi processors (KNL and KNM) support PPIN as well, so add their CPUIDs to the whitelist of supported processors. Signed-off-by: Piotr Luc Signed-off-by: Borislav Petkov Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20170408172004.8463-1-piotr.luc@intel.com Link: http://lkml.kernel.org/r/20170413201056.10525-1-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/mcheck/mce_intel.c | 3 +++ 1 file changed, 3 insertions(+) commit fd583ad1563bec5f00140e1f2444adbcd331caad Author: Kan Liang Date: Tue Apr 4 15:14:06 2017 -0400 perf/x86: Fix spurious NMI with PEBS Load Latency event Spurious NMIs will be observed with the following command: while :; do perf record -bae "cpu/umask=0x01,event=0xcd,ldlat=0x80/pp" -e "cpu/umask=0x03,event=0x0/" -e "cpu/umask=0x02,event=0x0/" -e cycles,branches,cache-misses -e cache-references -- sleep 10 done The bug was introduced by commit: 8077eca079a2 ("perf/x86/pebs: Add workaround for broken OVFL status on HSW+") That commit clears the status bits for the counters used for PEBS events, by masking the whole 64 bits pebs_enabled. However, only the low 32 bits of both status and pebs_enabled are reserved for PEBS-able counters. For status bits 32-34 are fixed counter overflow bits. For pebs_enabled bits 32-34 are for PEBS Load Latency. In the test case, the PEBS Load Latency event and fixed counter event could overflow at the same time. The fixed counter overflow bit will be cleared by mistake. Once it is cleared, the fixed counter overflow never be processed, which finally trigger spurious NMI. Correct the PEBS enabled mask by ignoring the non-PEBS bits. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Fixes: 8077eca079a2 ("perf/x86/pebs: Add workaround for broken OVFL status on HSW+") Link: http://lkml.kernel.org/r/1491333246-3965-1-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 2 +- arch/x86/events/intel/ds.c | 2 +- arch/x86/events/perf_event.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) commit 18c5c7c6186eb17c5814c095ddcbb5002aec4d74 Merge: a8d11cd f2200ac Author: Ingo Molnar Date: Fri Apr 14 10:30:28 2017 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 94ffac5d847cfd790bb37b7cef1cad803743985e Author: Peter Zijlstra Date: Fri Apr 7 09:04:07 2017 +0200 futex: Fix small (and harmless looking) inconsistencies During (post-commit) review Darren spotted a few minor things. One (harmless AFAICT) type inconsistency and a comment that wasn't as clear as hoped. Reported-by: Darren Hart (VMWare) Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Darren Hart (VMware) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/futex.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 97181f9bd57405b879403763284537e27d46963d Author: Thomas Gleixner Date: Mon Apr 10 18:03:36 2017 +0200 futex: Avoid freeing an active timer Alexander reported a hrtimer debug_object splat: ODEBUG: free active (active state 0) object type: hrtimer hint: hrtimer_wakeup (kernel/time/hrtimer.c:1423) debug_object_free (lib/debugobjects.c:603) destroy_hrtimer_on_stack (kernel/time/hrtimer.c:427) futex_lock_pi (kernel/futex.c:2740) do_futex (kernel/futex.c:3399) SyS_futex (kernel/futex.c:3447 kernel/futex.c:3415) do_syscall_64 (arch/x86/entry/common.c:284) entry_SYSCALL64_slow_path (arch/x86/entry/entry_64.S:249) Which was caused by commit: cfafcd117da0 ("futex: Rework futex_lock_pi() to use rt_mutex_*_proxy_lock()") ... losing the hrtimer_cancel() in the shuffle. Where previously the hrtimer_cancel() was done by rt_mutex_slowlock() we now need to do it manually. Reported-by: Alexander Levin Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Fixes: cfafcd117da0 ("futex: Rework futex_lock_pi() to use rt_mutex_*_proxy_lock()") Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1704101802370.2906@nanos Signed-off-by: Ingo Molnar kernel/futex.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0ba78a95a6629975ff16545ae868fa1bb38f786a Merge: def34ea a232591 Author: Ingo Molnar Date: Fri Apr 14 10:29:40 2017 +0200 Merge branch 'linus' into locking/core, to pick up fixes Signed-off-by: Ingo Molnar commit 283e2ed3990c36c00403b62b264ebfabaf931104 Author: Peter Zijlstra Date: Tue Apr 11 11:08:42 2017 +0200 sched/fair: Move the PELT constants into a generated header Now that we have a tool to generate the PELT constants in C form, use its output as a separate header. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 21 +++------------------ kernel/sched/sched-pelt.h | 13 +++++++++++++ 2 files changed, 16 insertions(+), 18 deletions(-) commit bb0bd044e65c2bf0f26b29613fcc441dfdeedf14 Author: Peter Zijlstra Date: Mon Apr 10 13:20:45 2017 +0200 sched/fair: Increase PELT accuracy for small tasks We truncate (and loose) the lower 10 bits of runtime in ___update_load_avg(), this means there's a consistent bias to under-account tasks. This is esp. significant for small tasks. Cure this by only forwarding last_update_time to the point we've actually accounted for, leaving the remainder for the next time. Reported-by: Morten Rasmussen Signed-off-by: Peter Zijlstra (Intel) Acked-by: Morten Rasmussen Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3841cdc31099fe3b84c93903c63e3d60348c0ea1 Author: Peter Zijlstra Date: Mon Apr 10 12:47:33 2017 +0200 sched/fair: Fix comments Historically our periods (or p) argument in PELT denoted the number of full periods (what is now d2). However recent patches have changed this to the total decay (previously p+1), leading to a confusing discrepancy between comments and code. Try and clarify things by making periods (in code) and p (in comments) be the same thing (again). Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 76d034edcf658e3c74fd90b149882ab1464e4af9 Author: Yuyang Du Date: Mon Feb 13 05:44:22 2017 +0800 sched/Documentation: Add 'sched-pelt' tool Add a user-space program to compute/generate the PELT constants. The kernel/sched/sched-pelt.h header will contain the output of this program. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bsegall@google.com Cc: dietmar.eggemann@arm.com Cc: matt@codeblueprint.co.uk Cc: morten.rasmussen@arm.com Cc: pjt@google.com Cc: umgwanakikbuti@gmail.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1486935863-25251-2-git-send-email-yuyang.du@intel.com Signed-off-by: Ingo Molnar Documentation/scheduler/sched-pelt.c | 108 +++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) commit 05296e7535d67ba4926b543a09cf5d430a815cb6 Author: Peter Zijlstra Date: Fri Mar 31 10:51:41 2017 +0200 sched/fair: Fix corner case in __accumulate_sum() Paul noticed that in the (periods >= LOAD_AVG_MAX_N) case in __accumulate_sum(), the returned contribution value (LOAD_AVG_MAX) is incorrect. This is because at this point, the decay_load() on the old state -- the first step in accumulate_sum() -- will not have resulted in 0, and will therefore result in a sum larger than the maximum value of our series. Obviously broken. Note that: decay_load(LOAD_AVG_MAX, LOAD_AVG_MAX_N) = 1 (345 / 32) 47742 * - ^ = ~27 2 Not to mention that any further contribution from the d3 segment (our new period) would also push it over the maximum. Solve this by noting that we can write our c2 term: p c2 = 1024 \Sum y^n n=1 In terms of our maximum value: inf inf p max = 1024 \Sum y^n = 1024 ( \Sum y^n + \Sum y^n + y^0 ) n=0 n=p+1 n=1 Further note that: inf inf inf ( \Sum y^n ) y^p = \Sum y^(n+p) = \Sum y^n n=0 n=0 n=p Combined that gives us: p c2 = 1024 \Sum y^n n=1 inf inf = 1024 ( \Sum y^n - \Sum y^n - y^0 ) n=0 n=p+1 = max - (max y^(p+1)) - 1024 Further simplify things by dealing with p=0 early on. Reported-by: Paul Turner Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yuyang Du Cc: linux-kernel@vger.kernel.org Fixes: a481db34b9be ("sched/fair: Optimize ___update_sched_avg()") Signed-off-by: Ingo Molnar kernel/sched/fair.c | 75 ++++++++++++++--------------------------------------- 1 file changed, 19 insertions(+), 56 deletions(-) commit 4f22b8954b13f6a75d57498b49084fc409257c61 Author: Tobin C. Harding Date: Wed Apr 12 09:56:50 2017 +1000 staging: ks7010: remove unused spin_lock Driver SDIO private data structure description includes a spin_lock that is never used. This data structure only contains a pointer to the sdio_func and a pointer to the main device private data. A spin_lock is not required here. Remove unused spin_lock. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 1 - drivers/staging/ks7010/ks7010_sdio.h | 1 - 2 files changed, 2 deletions(-) commit d2729c6e94e4d9ff108e2a27d3884fd67c954776 Author: Tobin C. Harding Date: Wed Apr 12 09:56:49 2017 +1000 staging: ks7010: remove unused structure description Driver SDIO header describes a structure that is never used. It can be safely removed. Remove unused structure description. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.h | 6 ------ 1 file changed, 6 deletions(-) commit cf10e78e1b297f9a314be1e3d2a3cab184a120d7 Author: Tobin C. Harding Date: Wed Apr 12 09:56:48 2017 +1000 staging: ks7010: remove unused read_buf Driver SDIO code allocates memory for a buffer that is never used. It can be safely removed. Remove unused buffer, including allocation and freeing of memory. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 14 +++----------- drivers/staging/ks7010/ks7010_sdio.h | 1 - 2 files changed, 3 insertions(+), 12 deletions(-) commit fa125ae482085650d5740af355bdcb5532865295 Author: Tobin C. Harding Date: Wed Apr 12 09:56:47 2017 +1000 staging: ks7010: remove unused completion Driver SDIO code initializes a completion that is never used. It can be safely removed. Remove unused completion. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 1 - drivers/staging/ks7010/ks7010_sdio.h | 1 - 2 files changed, 2 deletions(-) commit 2e85ccf13a724fd6e9bdc50ffe105d68fbbb0ef5 Author: Colin Ian King Date: Tue Apr 11 22:21:47 2017 +0100 staging: rtl8723bs: ensure cmd is large enough for %4s scanf format char array cmd is being scanned in using a %4s scanf format specifier and so cmd must be an array of 5 chars. Increase size to 5 chars to ensure we don't have an overflow. Detected with static analysis by cppcheck: "(error) Width 4 given in format string (no. 1) is larger than destination buffer 'cmd[4]', use %3s to prevent overflowing it." Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/rtw_proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73bd2eaa8785df85a90212c0841541231cc8e723 Author: Dan Carpenter Date: Wed Apr 12 11:31:53 2017 +0300 staging: lustre: checking for NULL instead if IS_ERR lustre_cfg_new() returns error pointers and never NULL. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/obd_config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f26dee15103f4040bfe21c910131db0cfe6624fc Author: Peter Zijlstra Date: Mon Apr 10 10:49:39 2017 +0200 debug: Avoid setting BUGFLAG_WARNING twice Dan reported that his static checking complains about BUGFLAG_WARNING being set on both sides of the bitwise-or, it figures that that might've been an unintentional mistake. Since there are no architectures that implement __WARN_TAINT() (I converted them all to implement __WARN_FLAGS()), and all __WARN_FLAGS() implementations already set BUGFLAG_WARNING, we can remove the bit from BUGFLAG_TAINT() and make Dan's checker happy. Reported-by: Dan Carpenter Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170410084939.4bwhrvpmauwfzauq@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar include/asm-generic/bug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8b7a92318b6d7779f6d8e9aa6ba0e3de01a8943 Author: Josh Poimboeuf Date: Wed Apr 12 13:47:12 2017 -0500 x86/unwind: Silence entry-related warnings A few people have reported unwinder warnings like the following: WARNING: kernel stack frame pointer at ffffc90000fe7ff0 in rsync:1157 has bad value (null) unwind stack type:0 next_sp: (null) mask:2 graph_idx:0 ffffc90000fe7f98: ffffc90000fe7ff0 (0xffffc90000fe7ff0) ffffc90000fe7fa0: ffffffffb7000f56 (trace_hardirqs_off_thunk+0x1a/0x1c) ffffc90000fe7fa8: 0000000000000246 (0x246) ffffc90000fe7fb0: 0000000000000000 ... ffffc90000fe7fc0: 00007ffe3af639bc (0x7ffe3af639bc) ffffc90000fe7fc8: 0000000000000006 (0x6) ffffc90000fe7fd0: 00007f80af433fc5 (0x7f80af433fc5) ffffc90000fe7fd8: 00007ffe3af638e0 (0x7ffe3af638e0) ffffc90000fe7fe0: 00007ffe3af638e0 (0x7ffe3af638e0) ffffc90000fe7fe8: 00007ffe3af63970 (0x7ffe3af63970) ffffc90000fe7ff0: 0000000000000000 ... ffffc90000fe7ff8: ffffffffb7b74b9a (entry_SYSCALL_64_after_swapgs+0x17/0x4f) This warning can happen when unwinding a code path where an interrupt occurred in x86 entry code before it set up the first stack frame. Silently ignore any warnings for this case. Reported-by: Daniel Borkmann Reported-by: Dave Jones Signed-off-by: Josh Poimboeuf Acked-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Fixes: c32c47c68a0a ("x86/unwind: Warn on bad frame pointer") Link: http://lkml.kernel.org/r/dbd6838826466a60dc23a52098185bc973ce2f1e.1492020577.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/unwind.h | 1 + arch/x86/kernel/unwind_frame.c | 36 +++++++++++++++++++++++++++--------- 2 files changed, 28 insertions(+), 9 deletions(-) commit 6bcdf9d51b9892dd5c6892d50cf5e9628efb8062 Author: Josh Poimboeuf Date: Wed Apr 12 13:47:11 2017 -0500 x86/unwind: Read stack return address in update_stack_state() Instead of reading the return address when unwind_get_return_address() is called, read it from update_stack_state() and store it in the unwind state. This enables the next patch to check the return address from unwind_next_frame() so it can detect an entry code frame. Signed-off-by: Josh Poimboeuf Acked-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Daniel Borkmann Cc: Dave Jones Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/af0c5e4560c49c0343dca486ea26c4fa92bc4e35.1492020577.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/unwind.h | 1 + arch/x86/kernel/unwind_frame.c | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) commit 5ed8d8bb38c5dcd78de540182cedb0fb19399aab Author: Josh Poimboeuf Date: Wed Apr 12 13:47:10 2017 -0500 x86/unwind: Move common code into update_stack_state() The __unwind_start() and unwind_next_frame() functions have some duplicated functionality. They both call decode_frame_pointer() and set state->regs and state->bp accordingly. Move that functionality to a common place in update_stack_state(). Signed-off-by: Josh Poimboeuf Acked-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Daniel Borkmann Cc: Dave Jones Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/a2ee4801113f6d2300d58f08f6b69f85edf4eb43.1492020577.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/unwind_frame.c | 119 +++++++++++++++++++---------------------- 1 file changed, 55 insertions(+), 64 deletions(-) commit 33a2e390c4405f003fae5494c87dda45354b43cc Author: Valerio Genovese Date: Sun Apr 2 21:43:46 2017 +0200 staging: media: atomisp: i2c: removed unnecessary white space before comma in memset() Removed extra space before comma in memset() as a part of checkpatch.pl fix-up. Signed-off-by: Valerio Genovese Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/gc0310.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d7cd91da45b11046c587fbaec9f42116e1cca93 Author: Arnd Bergmann Date: Wed Mar 29 23:12:21 2017 +0200 staging: atomisp: avoid false-positive maybe-uninitialized warning In combination with CONFIG_PROFILE_ANNOTATED_BRANCHES=y, the unlikely() inside of the WARN() macro becomes too complex for gcc to see that we don't use the output arguments of mt9m114_to_res() are used correctly: drivers/staging/media/atomisp/i2c/mt9m114.c: In function 'mt9m114_get_fmt': drivers/staging/media/atomisp/i2c/mt9m114.c:817:13: error: 'height' may be used uninitialized in this function [-Werror=maybe-uninitialized] int width, height; ^~~~~~ drivers/staging/media/atomisp/i2c/mt9m114.c: In function 'mt9m114_s_exposure_selection': drivers/staging/media/atomisp/i2c/mt9m114.c:1179:13: error: 'height' may be used uninitialized in this function [-Werror=maybe-uninitialized] Without WARN_ON(), there is no problem, so by simply replacing it with v4l2_err(), the warnings go away. The WARN() output is also not needed here, as we'd probably catch the problem before even getting here, and other checks for the same condition already use v4l2_err. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/mt9m114.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 7afe8f84f7938b1ba9ea3c5296ebcc8a7fb210eb Author: Alan Cox Date: Wed Apr 12 19:22:46 2017 +0100 atomisp: remove UDS kernel code UDS is another layer which actually boils down to some trivial assignments so remove it so inline the code. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../ia_css_isp_params.c | 12 ++++---- .../ia_css_isp_params.c | 12 ++++---- .../ia_css_isp_params.c | 12 ++++---- .../isp/kernels/uds/uds_1.0/ia_css_uds.host.c | 35 ---------------------- .../isp/kernels/uds/uds_1.0/ia_css_uds.host.h | 33 -------------------- .../css2400/runtime/debug/src/ia_css_debug.c | 2 +- .../atomisp/pci/atomisp2/css2400/sh_css_params.c | 2 +- 7 files changed, 23 insertions(+), 85 deletions(-) commit fdeb24d4a758e1a7269e742bde4cb2953d3dfa07 Author: Alan Cox Date: Wed Apr 12 19:22:35 2017 +0100 atomisp: remove xnr3_0_5 and xnr3_0_11 These are not used in the driver so can go away. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../staging/media/atomisp/pci/atomisp2/Makefile | 4 - .../kernels/xnr/xnr3_0_11/ia_css_xnr3_0_11.host.c | 155 --------------------- .../kernels/xnr/xnr3_0_11/ia_css_xnr3_0_11.host.h | 58 -------- .../kernels/xnr/xnr3_0_11/ia_css_xnr3_0_11_param.h | 50 ------- .../kernels/xnr/xnr3_0_11/ia_css_xnr3_0_11_types.h | 33 ----- .../kernels/xnr/xnr3_0_5/ia_css_xnr3_0_5.host.c | 154 -------------------- .../kernels/xnr/xnr3_0_5/ia_css_xnr3_0_5.host.h | 59 -------- .../kernels/xnr/xnr3_0_5/ia_css_xnr3_0_5_param.h | 50 ------- .../kernels/xnr/xnr3_0_5/ia_css_xnr3_0_5_types.h | 33 ----- 9 files changed, 596 deletions(-) commit 37fd9c35e67b3a91c52dd721ca1bf3a7cbf81237 Author: Alan Cox Date: Wed Apr 12 19:22:25 2017 +0100 atomisp: remove fixedbds kernel code This is a whole pile of code that wraps a single assignment. Remove it and put the assignment in the caller. Once we have the kernels sorted we should revisit these and remove all the pointless 1 item structs that go with it. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../ia_css_isp_params.c | 11 ++--- .../ia_css_isp_params.c | 11 ++--- .../ia_css_isp_params.c | 11 ++--- .../fixedbds/fixedbds_1.0/ia_css_fixedbds.host.c | 47 ---------------------- .../fixedbds/fixedbds_1.0/ia_css_fixedbds.host.h | 37 ----------------- .../atomisp/pci/atomisp2/css2400/sh_css_params.c | 2 +- 6 files changed, 19 insertions(+), 100 deletions(-) commit bcd1f8a45e7d5804e4f7bd78a91348cfce3cb74a Author: Steffen Klassert Date: Fri Apr 14 10:07:49 2017 +0200 xfrm: Prepare the GRO codepath for hardware offloading. On IPsec hardware offloading, we already get a secpath with valid state attached when the packet enters the GRO handlers. So check for hardware offload and skip the state lookup in this case. Signed-off-by: Steffen Klassert net/ipv4/esp4_offload.c | 42 ++++++++++++++++++++++------------------- net/ipv6/esp6_offload.c | 42 ++++++++++++++++++++++------------------- net/xfrm/xfrm_input.c | 50 ++++++++++++++++++++++++------------------------- 3 files changed, 71 insertions(+), 63 deletions(-) commit f1bd7d659ef0ba0f18c6f6afe7bbbd2410acffa0 Author: Ilan Tayari Date: Fri Apr 14 10:07:39 2017 +0200 xfrm: Add encapsulation header offsets while SKB is not encrypted Both esp4 and esp6 used to assume that the SKB payload is encrypted and therefore the inner_network and inner_transport offsets are not relevant. When doing crypto offload in the NIC, this is no longer the case and the NIC driver needs these offsets so it can do TX TCP checksum offloading. This patch sets the inner_network and inner_transport members of the SKB, as well as encapsulation, to reflect the actual positions of these headers, and removes them only once encryption is done on the payload. Signed-off-by: Ilan Tayari Signed-off-by: Steffen Klassert net/ipv4/xfrm4_mode_transport.c | 2 ++ net/ipv4/xfrm4_mode_tunnel.c | 3 +++ net/ipv6/xfrm6_mode_transport.c | 1 + net/ipv6/xfrm6_mode_tunnel.c | 3 +++ net/xfrm/xfrm_output.c | 2 ++ 5 files changed, 11 insertions(+) commit f6e27114a60a0afdec40db1bf7f6da37b565745a Author: Steffen Klassert Date: Fri Apr 14 10:07:28 2017 +0200 net: Add a xfrm validate function to validate_xmit_skb When we do IPsec offloading, we need a fallback for packets that were targeted to be IPsec offloaded but rerouted to a device that does not support IPsec offload. For that we add a function that checks the offloading features of the sending device and and flags the requirement of a fallback before it calls the IPsec output function. The IPsec output function adds the IPsec trailer and does encryption if needed. Signed-off-by: Steffen Klassert include/net/xfrm.h | 6 ++++++ net/core/dev.c | 3 +++ net/xfrm/xfrm_device.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) commit 184f8e0981ef37a63fc0c3203f8546768c1d7b87 Author: Alan Cox Date: Wed Apr 12 19:22:13 2017 +0100 atomisp: remove satm kernel This isn't used so it can go in the bitbucket. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../staging/media/atomisp/pci/atomisp2/Makefile | 1 - .../css2400/isp/kernels/satm/ia_css_satm.host.c | 27 ----------------- .../css2400/isp/kernels/satm/ia_css_satm.host.h | 29 ------------------ .../css2400/isp/kernels/satm/ia_css_satm_param.h | 30 ------------------- .../css2400/isp/kernels/satm/ia_css_satm_types.h | 35 ---------------------- 5 files changed, 122 deletions(-) commit d6f2b5715945654d9d299e3ccd90e3d9733a60bd Author: Alan Cox Date: Wed Apr 12 19:21:59 2017 +0100 atomisp: remove contiguous handling The base hmm MMU code doesn't support contiguous allocations (they BUG), so remove support from them from the higher levels of the heirarchy. We still need to unwind all these layers but it turns out that some of the init order stuff is rather sensitive and the simple cleanup breaks everything Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../pci/atomisp2/css2400/ia_css_memory_access.c | 31 +++++++--------------- .../atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.c | 11 -------- .../atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.h | 3 --- .../media/atomisp/pci/atomisp2/hrt/memory_access.c | 31 +++++----------------- 4 files changed, 15 insertions(+), 61 deletions(-) commit 94853b658afceb36a639edd5add6d17b62dc812b Author: Alan Cox Date: Wed Apr 12 19:21:44 2017 +0100 atomisp: remove sh_css_malloc indirections where we can Where we know the buffer size is reasonably constrained we can just use kmalloc, and where it will be large vmalloc. This still leaves a pile in the middle. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 92 +++++++++++----------- .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 29 ++++--- .../pci/atomisp2/css2400/sh_css_host_data.c | 8 +- .../pci/atomisp2/css2400/sh_css_param_shading.c | 8 +- 4 files changed, 72 insertions(+), 65 deletions(-) commit da22013f7df4e1f49b03d763aae7b12b1cd805d7 Author: Alan Cox Date: Wed Apr 12 19:21:33 2017 +0100 atomisp: remove indirection from sh_css_malloc We have one hard coded set of behaviour so unpick the indirection and function pointers. This isn't the whole story. A lot of the callers are known sizes and use cases so we can switch them directly to kmalloc later on. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../atomisp/pci/atomisp2/atomisp_compat_css20.c | 3 -- .../atomisp/pci/atomisp2/css2400/ia_css_env.h | 19 +------- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 52 ++++++++++------------ 3 files changed, 25 insertions(+), 49 deletions(-) commit b3859c8ebffe26ddf7aec0b23a83389d6f2419f9 Author: Steffen Klassert Date: Fri Apr 14 10:07:19 2017 +0200 esp: Use a synchronous crypto algorithm on offloading. We need a fallback algorithm for crypto offloading to a NIC. This is because packets can be rerouted to other NICs that don't support crypto offloading. The fallback is going to be implemented at layer2 where we know the final output device but can't handle asynchronous returns fron the crypto layer. Signed-off-by: Steffen Klassert net/ipv4/esp4.c | 12 ++++++++++-- net/ipv6/esp6.c | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) commit d7dbefc45cf5517a0cf9a0391316fab0abe71bd2 Author: Steffen Klassert Date: Fri Apr 14 10:07:01 2017 +0200 xfrm: Add xfrm_replay_overflow functions for offloading This patch adds functions that handles IPsec sequence numbers for GSO segments and TSO offloading. We need to calculate and update the sequence numbers based on the segments that GSO/TSO will generate. We need this to keep software and hardware sequence number counter in sync. Signed-off-by: Steffen Klassert net/xfrm/xfrm_replay.c | 159 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 157 insertions(+), 2 deletions(-) commit 7862b4058b9f10c9177f347e7d981511bac87213 Author: Steffen Klassert Date: Fri Apr 14 10:06:50 2017 +0200 esp: Add gso handlers for esp4 and esp6 This patch extends the xfrm_type by an encap function pointer and implements esp4_gso_encap and esp6_gso_encap. These functions doing the basic esp encapsulation for a GSO packet. In case the GSO packet needs to be segmented in software, we add gso_segment functions. This codepath is going to be used on esp hardware offloads. Signed-off-by: Steffen Klassert net/ipv4/esp4.c | 10 +++++- net/ipv4/esp4_offload.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++ net/ipv6/esp6.c | 8 +++-- net/ipv6/esp6_offload.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++ net/xfrm/xfrm_replay.c | 3 +- 5 files changed, 203 insertions(+), 4 deletions(-) commit 383d0350f2cc5e5b3a2003c46e15c0b98432037b Author: Steffen Klassert Date: Fri Apr 14 10:06:42 2017 +0200 esp6: Reorganize esp_output We need a fallback for ESP at layer 2, so split esp6_output into generic functions that can be used at layer 3 and layer 2 and use them in esp_output. We also add esp6_xmit which is used for the layer 2 fallback. Signed-off-by: Steffen Klassert include/net/esp.h | 3 + net/ipv6/esp6.c | 264 +++++++++++++++++++++++++----------------------- net/ipv6/esp6_offload.c | 103 +++++++++++++++++++ 3 files changed, 246 insertions(+), 124 deletions(-) commit fca11ebde3f0d1c637550a9b231caa385ce35749 Author: Steffen Klassert Date: Fri Apr 14 10:06:33 2017 +0200 esp4: Reorganize esp_output We need a fallback for ESP at layer 2, so split esp_output into generic functions that can be used at layer 3 and layer 2 and use them in esp_output. We also add esp_xmit which is used for the layer 2 fallback. Signed-off-by: Steffen Klassert include/net/esp.h | 16 +++ net/ipv4/esp4.c | 341 ++++++++++++++++++++++++++---------------------- net/ipv4/esp4_offload.c | 102 +++++++++++++++ 3 files changed, 301 insertions(+), 158 deletions(-) commit 83fceac0504fbcbe2aad420f7791ed740cc20612 Author: Alan Cox Date: Wed Apr 12 19:21:22 2017 +0100 atomisp: unwrap the _ex malloc/free functions We are not using these for debugging or debug logging so remove the defines, trim and rename the functions. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 15 +++------------ .../atomisp/pci/atomisp2/css2400/sh_css_internal.h | 17 ++++------------- 2 files changed, 7 insertions(+), 25 deletions(-) commit b35530650fcd9a61dfc57846d777f5cd77cd4abc Author: Alan Cox Date: Wed Apr 12 19:21:05 2017 +0100 atomisp: remove most of the uses of atomisp_kernel_malloc They can be replaced by kmalloc. There are a few that do need to pick kmalloc or vmalloc. Those we leave for the moment. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../atomisp/pci/atomisp2/atomisp_compat_css20.c | 4 --- .../media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 34 +++++++++++----------- .../atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c | 8 ++--- .../atomisp/pci/atomisp2/hmm/hmm_reserved_pool.c | 14 ++++----- 4 files changed, 28 insertions(+), 32 deletions(-) commit 5eb328740de1425f95fc5ff34dac26f3850c3711 Author: Daeseok Youn Date: Wed Apr 12 19:20:49 2017 +0100 staging: atomisp: move mipi_info assignment to next line in __get_asd_from_port() The line which is initializing mipi_info variable is too long to read. It would be placed in next line. Signed-off-by: Daeseok Youn Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 7eb21a88185d2cf9ad0257534cef4ebd9ad2725b Author: Daeseok Youn Date: Wed Apr 12 19:20:36 2017 +0100 staging: atomisp: replace "&isp->asd[i]" with "asd" in __get_asd_from_port() The address of isp->asd[i] is already assigned to local "asd" variable. "&isp->asd[i]" would be replaced with just "asd". Signed-off-by: Daeseok Youn Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 287666dfe83577a1c3407028b1b1a57137bea4fa Author: Daeseok Youn Date: Wed Apr 12 19:20:22 2017 +0100 staging: atomisp: remove enable_isp_irq function and add disable_isp_irq Enable/Disable ISP irq is switched with "enable" parameter of enable_isp_irq(). It would be better splited to two such as enable_isp_irq()/disable_isp_irq(). But the enable_isp_irq() is no use in atomisp_cmd.c file. So remove the enable_isp_irq() function and add disable_isp_irq function only. Signed-off-by: Daeseok Youn Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 36 ++++++---------------- 1 file changed, 9 insertions(+), 27 deletions(-) commit f1fbed0e89303e6100085ea1dfb25d8413ca06ec Author: Steffen Klassert Date: Fri Apr 14 10:06:21 2017 +0200 esp6: Remame esp_input_done2 We are going to export the ipv4 and the ipv6 version of esp_input_done2. They are not static anymore and can't have the same name. So rename the ipv6 version to esp6_input_done2. Signed-off-by: Steffen Klassert net/ipv6/esp6.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 31991c8cbfd7d61a9caa75e42c89b760f1a353f9 Author: Colin Ian King Date: Wed Apr 12 19:20:10 2017 +0100 staging/atomisp: fix spelling mistake: "falied" -> "failed" trivial fix to spelling mistake in dev_err error message Signed-off-by: Colin Ian King Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7469cd3c7f1520e1901f147f8152aa31d3c335cd Author: Daeseok Youn Date: Wed Apr 12 19:20:01 2017 +0100 staging: atomisp: use local variable to reduce number of references Define new local variable to reduce the number of reference. The new local variable is added to save the addess of dfs and used in atomisp_freq_scaling() function. Signed-off-by: Daeseok Youn Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 37 ++++++++++++---------- 1 file changed, 20 insertions(+), 17 deletions(-) commit d77e38e612a017480157fe6d2c1422f42cb5b7e3 Author: Steffen Klassert Date: Fri Apr 14 10:06:10 2017 +0200 xfrm: Add an IPsec hardware offloading API This patch adds all the bits that are needed to do IPsec hardware offload for IPsec states and ESP packets. We add xfrmdev_ops to the net_device. xfrmdev_ops has function pointers that are needed to manage the xfrm states in the hardware and to do a per packet offloading decision. Joint work with: Ilan Tayari Guy Shapiro Yossi Kuperman Signed-off-by: Guy Shapiro Signed-off-by: Ilan Tayari Signed-off-by: Yossi Kuperman Signed-off-by: Steffen Klassert include/linux/netdevice.h | 14 +++++ include/net/xfrm.h | 65 +++++++++++++++++++++- include/uapi/linux/xfrm.h | 8 +++ net/ipv4/esp4.c | 7 +-- net/ipv4/xfrm4_output.c | 3 +- net/ipv6/esp6.c | 4 +- net/ipv6/xfrm6_output.c | 9 ++- net/xfrm/Makefile | 3 +- net/xfrm/xfrm_device.c | 138 +++++++++++++++++++++++++++++++++++++++++++++- net/xfrm/xfrm_input.c | 41 +++++++++++++- net/xfrm/xfrm_output.c | 44 +++++++++++++-- net/xfrm/xfrm_policy.c | 10 ++-- net/xfrm/xfrm_state.c | 74 +++++++++++++++++++++++++ net/xfrm/xfrm_user.c | 28 ++++++++++ 14 files changed, 424 insertions(+), 24 deletions(-) commit c35fe4106b928d0a5909cfdac53c1db559b24299 Author: Steffen Klassert Date: Fri Apr 14 10:06:01 2017 +0200 xfrm: Add mode handlers for IPsec on layer 2 This patch adds a gso_segment and xmit callback for the xfrm_mode and implement these functions for tunnel and transport mode. Signed-off-by: Steffen Klassert include/net/xfrm.h | 10 ++++++++++ net/ipv4/xfrm4_mode_transport.c | 32 ++++++++++++++++++++++++++++++++ net/ipv4/xfrm4_mode_tunnel.c | 25 +++++++++++++++++++++++++ net/ipv6/xfrm6_mode_transport.c | 33 +++++++++++++++++++++++++++++++++ net/ipv6/xfrm6_mode_tunnel.c | 24 ++++++++++++++++++++++++ 5 files changed, 124 insertions(+) commit 21f42cc95f07c1d7827b339c04442e147411e44b Author: Steffen Klassert Date: Fri Apr 14 10:05:53 2017 +0200 xfrm: Move device notifications to a sepatate file This is needed for the upcomming IPsec device offloading. Signed-off-by: Steffen Klassert include/net/xfrm.h | 1 + net/xfrm/Makefile | 2 +- net/xfrm/xfrm_device.c | 43 +++++++++++++++++++++++++++++++++++++++++++ net/xfrm/xfrm_policy.c | 17 +---------------- 4 files changed, 46 insertions(+), 17 deletions(-) commit 9d389d7f84bbb3a294eb05f7dfe2076e291fc150 Author: Steffen Klassert Date: Fri Apr 14 10:05:44 2017 +0200 xfrm: Add a xfrm type offload. We add a struct xfrm_type_offload so that we have the offloaded codepath separated to the non offloaded codepath. With this the non offloade and the offloaded codepath can coexist. Signed-off-by: Steffen Klassert include/net/xfrm.h | 28 +++++++++++++++----- net/xfrm/xfrm_state.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+), 6 deletions(-) commit c7ef8f0c020ac43c8a692bf989017c06ab1fdf0f Author: Steffen Klassert Date: Fri Apr 14 10:05:36 2017 +0200 net: Add ESP offload features This patch adds netdev features to configure IPsec offloads. Signed-off-by: Steffen Klassert include/linux/netdev_features.h | 8 +++++++- include/linux/netdevice.h | 1 + include/linux/skbuff.h | 2 ++ net/core/ethtool.c | 3 +++ 4 files changed, 13 insertions(+), 1 deletion(-) commit d3df1ec06353e51fc44563d2e7e18d42811af290 Author: Ludovic Desroches Date: Mon Apr 10 10:25:17 2017 +0200 ARM: dts: at91: sama5d3_xplained: not all ADC channels are available Remove ADC channels that are not available by default on the sama5d3_xplained board (resistor not populated) in order to not create confusion. Signed-off-by: Ludovic Desroches Cc: # 3.16+ Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d3_xplained.dts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9cdd31e5913c1f86dce7e201b086155b3f24896b Author: Ludovic Desroches Date: Mon Apr 10 10:25:16 2017 +0200 ARM: dts: at91: sama5d3_xplained: fix ADC vref The voltage reference for the ADC is not 3V but 3.3V since it is connected to VDDANA. Signed-off-by: Ludovic Desroches Cc: # 3.16+ Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d3_xplained.dts | 1 + 1 file changed, 1 insertion(+) commit e67cedc92812d6c270be0bd227d0757e4f25bcff Author: Peter Rosin Date: Fri Mar 17 23:24:46 2017 +0100 ARM: dts: at91: add envelope detector mux to the Axentia TSE-850 The envelope detector can analyze 6 different signals, selectable with a mux controlled by three gpio pins. Signed-off-by: Peter Rosin Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-tse850-3.dts | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit 1900d947b5ebac3c9f67d45b30f1b002131b8057 Merge: 1e0f8f6 dfb00a5 Author: Takashi Iwai Date: Fri Apr 14 09:01:04 2017 +0200 Merge branch 'for-linus' into for-next Back-merge to prepare for applying more FireWire updates. commit 1e0f8f68f764b93e8d2d0e87e23532f2186a23a1 Author: Takashi Sakamoto Date: Fri Apr 14 13:13:50 2017 +0900 ALSA: usb-line6: constify snd_kcontrol_new strucutre array In kernel APIs of ALSA control interface, drivers can create a control element set by a call of snd_ctl_new1() with a template. This template is known to have const qualifier in general cases. This commit adds the qualifier to template array, for safer program and runtime. Application of this change moves the symbol from .data section to .rodata section. Cc: Bhumika Goyal Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/usb/line6/pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d4208c1a73ab30e05da142e0f05b2b02fc26fc9 Author: Miguel Bernal Marin Date: Thu Mar 16 00:59:57 2017 -0600 scsi: storvsc: remove return at end of void function storvsc_on_channel_callback is a void function and the return statement at the end is not useful. Found with checkpatch. Signed-off-by: Miguel Bernal Marin Reviewed-by: K. Y. Srinivasan Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 2 -- 1 file changed, 2 deletions(-) commit e04085285b829dc922e78768a9abb390a8caed31 Author: Miguel Bernal Marin Date: Thu Mar 16 00:58:23 2017 -0600 scsi: storvsc: Prefer kcalloc over kzalloc with multiply Use kcalloc for allocating an array instead of kzalloc with multiply, kcalloc is the preferred API. Found with checkpatch. Signed-off-by: Miguel Bernal Marin Reviewed-by: K. Y. Srinivasan Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1dd0c0e4fd02dc5e5bfaf89bd4656aabe4ae3cb3 Author: Matthew R. Ochs Date: Wed Apr 12 14:16:02 2017 -0500 scsi: cxlflash: Introduce hardware queue steering As an enhancement to distribute requests to multiple hardware queues, add the infrastructure to hash a SCSI command into a particular hardware queue. Support the following scenarios when deriving which queue to use: single queue, tagging when SCSI-MQ enabled, and simple hash via CPU ID when SCSI-MQ is disabled. Rather than altering the existing send API, the derived hardware queue is stored in the AFU command where it can be used for sending a command to the chosen hardware queue. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 12 ++++- drivers/scsi/cxlflash/main.c | 120 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 126 insertions(+), 6 deletions(-) commit 3065267a80c88d775e8eb34196280e8eee33322f Author: Matthew R. Ochs Date: Wed Apr 12 14:15:53 2017 -0500 scsi: cxlflash: Add hardware queues attribute As staging for supporting multiple hardware queues, add an attribute to show and set the current number of hardware queues for the host. Support specifying a hard limit or a CPU affinitized value. This will allow the number of hardware queues to be tuned by a system administrator. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 10 ++-- drivers/scsi/cxlflash/main.c | 112 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 106 insertions(+), 16 deletions(-) commit bfc0bab172cabf3bb25c48c4c521b317ff4a909d Author: Uma Krishnan Date: Wed Apr 12 14:15:42 2017 -0500 scsi: cxlflash: Support multiple hardware queues Introduce multiple hardware queues to improve legacy I/O path performance. Each hardware queue is comprised of a master context and associated I/O resources. The hardware queues are initially implemented as a static array embedded in the AFU. This will be transitioned to a dynamic allocation in a later series to improve the memory footprint of the driver. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 41 ++-- drivers/scsi/cxlflash/main.c | 426 ++++++++++++++++++++++++-------------- drivers/scsi/cxlflash/superpipe.c | 6 +- 3 files changed, 309 insertions(+), 164 deletions(-) commit e2ef33fa5958c51ebf0c6f18db19fe927e2185fa Author: Matthew R. Ochs Date: Wed Apr 12 14:15:29 2017 -0500 scsi: cxlflash: Improve asynchronous interrupt processing The method used to decode asynchronous interrupts involves unnecessary loops to match up bits that are set with corresponding entries in the asynchronous interrupt information table. This algorithm is wasteful and does not scale well as new status bits are supported. As an improvement, use the for_each_set_bit() service to iterate over the asynchronous status bits and refactor the information table such that it can be indexed by bit position. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 94 ++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 52 deletions(-) commit fcc87e74a987dc9c0c85f53546df944ede76486a Author: Matthew R. Ochs Date: Wed Apr 12 14:15:20 2017 -0500 scsi: cxlflash: Fix warnings/errors As a general cleanup, address all reasonable checkpatch warnings and errors. These include enforcement of comment styles and including named identifiers in function prototypes. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 27 ++++++++++----------- drivers/scsi/cxlflash/sislite.h | 27 +++++++++++---------- drivers/scsi/cxlflash/superpipe.h | 51 ++++++++++++++++++++++----------------- drivers/scsi/cxlflash/vlun.h | 2 +- 4 files changed, 57 insertions(+), 50 deletions(-) commit cd41e18daf1a21fea5a195a5a74c97c6b183c15a Author: Matthew R. Ochs Date: Wed Apr 12 14:15:11 2017 -0500 scsi: cxlflash: Fix power-of-two validations Validation statements to enforce assumptions about specific defines are not being evaluated by the compiler due to the fact that they reside in a routine that is not used. To activate them, call the routine as part of module initialization. As an additional, related cleanup, remove the now-defunct CXLFLASH_NUM_CMDS. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 7 +------ drivers/scsi/cxlflash/main.c | 1 + 2 files changed, 2 insertions(+), 6 deletions(-) commit 50b787f7235efbd074bbdf4315e0cc261d85b4d7 Author: Matthew R. Ochs Date: Wed Apr 12 14:15:02 2017 -0500 scsi: cxlflash: Remove unnecessary DMA mapping Devices supported by the cxlflash driver are fully coherent and do not require a bus address mapping. Avoid unnecessary path length by using the virtual address and length already present in the scatter-gather entry. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 323e33428ea23bfb1ae5010b18b4540048b2ad51 Author: Matthew R. Ochs Date: Wed Apr 12 14:14:51 2017 -0500 scsi: cxlflash: Fence EEH during probe An EEH during probe can lead to a crash as the recovery thread races with the probe thread. To avoid this issue, introduce new states to fence out EEH recovery until probe has completed. Also ensure the reset wait queue is flushed during device removal to avoid orphaned threads. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 2 ++ drivers/scsi/cxlflash/main.c | 25 +++++++++++++++++++++---- drivers/scsi/cxlflash/superpipe.c | 8 +++++--- 3 files changed, 28 insertions(+), 7 deletions(-) commit 1cd7fabc82eb06c834956113ff287f8848811fb8 Author: Matthew R. Ochs Date: Wed Apr 12 14:14:41 2017 -0500 scsi: cxlflash: Support up to 4 ports Update the driver to allow for future cards with 4 ports. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 78 ++++++++++++++++++++++++++++++++++++++++- drivers/scsi/cxlflash/sislite.h | 6 ++-- 2 files changed, 80 insertions(+), 4 deletions(-) commit 565180723294b06b3e60030033847277b9d6d4bb Author: Matthew R. Ochs Date: Wed Apr 12 14:14:28 2017 -0500 scsi: cxlflash: SISlite updates to support 4 ports Update the SISlite header to support 4 ports as outlined in the SISlite specification. Address fallout from structure renames and refreshed organization throughout the driver. Determine the number of ports supported by a card from the global port selection mask register reset value. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 25 ++++++++--- drivers/scsi/cxlflash/main.c | 77 +++++++++++++++++++++++++-------- drivers/scsi/cxlflash/sislite.h | 96 ++++++++++++++++++++++++++++------------- 3 files changed, 141 insertions(+), 57 deletions(-) commit 0aa14887c60c27e3385295ee85f5ac079ae2ffb5 Author: Matthew R. Ochs Date: Wed Apr 12 14:14:17 2017 -0500 scsi: cxlflash: Hide FC internals behind common access routine As staging to support FC-related updates to the SISlite specification, introduce helper routines to obtain references to FC resources that exist within the global map. This will allow changes to the underlying global map structure without impacting existing code paths. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 14 ++++++++ drivers/scsi/cxlflash/main.c | 72 +++++++++++++++++++++++------------------- drivers/scsi/cxlflash/vlun.c | 16 +++++----- 3 files changed, 61 insertions(+), 41 deletions(-) commit 8fa4f1770d56af6f0a5a862f1fd298a4eeea94f3 Author: Matthew R. Ochs Date: Wed Apr 12 14:14:05 2017 -0500 scsi: cxlflash: Remove port configuration assumptions At present, the cxlflash driver only supports hardware with two FC ports. The code was initially designed with this assumption and is dependent on having two FC ports - adding more ports will break logic within the driver. To mitigate this issue, remove the existing port assumptions and transition the code to support more than two ports. As a side effect, clarify the interpretation of the DK_CXLFLASH_ALL_PORTS_ACTIVE flag. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen Documentation/powerpc/cxlflash.txt | 5 +++ drivers/scsi/cxlflash/common.h | 4 ++ drivers/scsi/cxlflash/lunmgt.c | 4 +- drivers/scsi/cxlflash/main.c | 13 +++--- drivers/scsi/cxlflash/sislite.h | 2 +- drivers/scsi/cxlflash/superpipe.c | 2 +- drivers/scsi/cxlflash/superpipe.h | 3 -- drivers/scsi/cxlflash/vlun.c | 89 +++++++++++++++++++++++++------------- 8 files changed, 77 insertions(+), 45 deletions(-) commit 78ae028e823701148e4915759459ee79597ea8ec Author: Matthew R. Ochs Date: Wed Apr 12 14:13:50 2017 -0500 scsi: cxlflash: Support dynamic number of FC ports Transition from a static number of FC ports to a value that is derived during probe. For now, a static value is used but this will later be based on the type of card being configured. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 7 ++-- drivers/scsi/cxlflash/main.c | 71 ++++++++++++++++++++++++--------------- drivers/scsi/cxlflash/main.h | 2 -- drivers/scsi/cxlflash/sislite.h | 1 + drivers/scsi/cxlflash/superpipe.h | 2 +- 5 files changed, 51 insertions(+), 32 deletions(-) commit 3b225cd32a05b627a6ca366f364a824beaabecc5 Author: Matthew R. Ochs Date: Wed Apr 12 14:13:34 2017 -0500 scsi: cxlflash: Update sysfs helper routines to pass config structure As staging for future function, pass the config pointer instead of the AFU pointer for port-related sysfs helper routines. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit cba06e6de4038cd44a3e93a92ad982c372b8a14e Author: Matthew R. Ochs Date: Wed Apr 12 14:13:20 2017 -0500 scsi: cxlflash: Implement IRQ polling for RRQ processing Currently, RRQ processing takes place on hardware interrupt context. This can be a heavy burden in some environments due to the overhead encountered while completing RRQ entries. In an effort to improve system performance, use the IRQ polling API to schedule this processing on softirq context. This function will be disabled by default until starting values can be established for the hardware supported by this driver. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 8 +++ drivers/scsi/cxlflash/main.c | 123 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 127 insertions(+), 4 deletions(-) commit f918b4a8e6f8bb59c44045f85d10fd9cc7e5a4c0 Author: Matthew R. Ochs Date: Wed Apr 12 14:12:55 2017 -0500 scsi: cxlflash: Serialize RRQ access and support offlevel processing As further staging to support processing the HRRQ by other means, access to the HRRQ needs to be serialized by a disabled lock. This will allow safe access in other non-hardware interrupt contexts. In an effort to minimize the period where interrupts are disabled, support is added to queue up commands harvested from the RRQ such that they can be processed with hardware interrupts enabled. While this doesn't offer any improvement with processing on a hardware interrupt it will help when IRQ polling is supported and the command completions can execute on softirq context. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/common.h | 2 ++ drivers/scsi/cxlflash/main.c | 42 +++++++++++++++++++++++++++++++++++------- 2 files changed, 37 insertions(+), 7 deletions(-) commit 76a6ebbeef26b004c36a0c8ee0496bae5428fc31 Author: Matthew R. Ochs Date: Wed Apr 12 14:11:44 2017 -0500 scsi: cxlflash: Separate RRQ processing from the RRQ interrupt handler In order to support processing the HRRQ by other means (e.g. polling), the processing portion of the current RRQ interrupt handler needs to be broken out into a separate routine. This will allow RRQ processing from places other than the RRQ hardware interrupt handler. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit 0d4bd8fea472e6bd2c7ff031cd8952f85d7b0bb0 Author: Colin Ian King Date: Wed Apr 12 15:12:35 2017 +0100 scsi: snic: fix spelling mistake: "Cann't" -> "Cannot" Trivial fix to spelling mistake in SNIC_ERR error message text, one cannot have "Cann't". Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/scsi/snic/snic_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a932a8041ff9941a244619555f1c75ecf299f662 Author: Peter Chen Date: Mon Mar 27 10:54:27 2017 +0800 usb: chipidea: core: add sysfs group Sometimes, the user needs to adjust some properties for controllers, eg the role for controller, we add sysfs group for them. The attribute 'role' is used to switch host/gadget role dynamically, the uewr can read the current role, and write the other role compare to current one to finish the switch. Signed-off-by: Peter Chen .../ABI/testing/sysfs-platform-chipidea-usb2 | 9 +++ drivers/usb/chipidea/core.c | 64 +++++++++++++++++++++- drivers/usb/chipidea/udc.c | 2 + 3 files changed, 72 insertions(+), 3 deletions(-) commit 809c2d9a3b81f0ad9732d8ded0e91b3a97a81685 Author: Aaron Conole Date: Wed Apr 12 16:32:54 2017 -0400 netfilter: nf_conntrack: remove double assignment The protonet pointer will unconditionally be rewritten, so just do the needed assignment first. Signed-off-by: Aaron Conole Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 79250568276ff648f3fc0afc6cc47b677d108e16 Author: Aaron Conole Date: Wed Apr 12 16:12:28 2017 -0400 netfilter: nf_tables: remove double return statement Signed-off-by: Aaron Conole Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 2 -- 1 file changed, 2 deletions(-) commit ffff885832101543c002cef7abcab0fd27a9aee1 Author: Jayachandran C Date: Thu Apr 13 20:30:44 2017 +0000 PCI: Add device flag PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT Add a new quirk flag PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT to limit the DMA alias search to go no further than the bridge where the IOMMU unit is attached. The flag will be used to indicate a bridge device which forwards the address translation requests to the IOMMU, i.e., where the interrupt and DMA requests leave the PCIe hierarchy and go into the system blocks. Usually this happens at the PCI RC, so this flag is not needed. But on systems where there are bridges that introduce aliases above the IOMMU, this flag prevents pci_for_each_dma_alias() from generating aliases that the IOMMU will never see. The function pci_for_each_dma_alias() is updated to stop when it see a bridge with this flag set. Link: https://bugzilla.kernel.org/show_bug.cgi?id=195447 Signed-off-by: Jayachandran C Signed-off-by: Bjorn Helgaas Reviewed-by: Robin Murphy Acked-by: David Daney drivers/pci/search.c | 4 ++++ include/linux/pci.h | 2 ++ 2 files changed, 6 insertions(+) commit 6c381663bb3b4febc15b2fb33f046f0b986ce5c5 Author: Hans de Goede Date: Thu Apr 13 14:04:11 2017 +0200 power: supply: bq24190_charger: Use new extcon_register_notifier_all() When I submitted the extcon handling I had a patch pending for the extcon sub-system for extcon_register_notifier to take -1 as cable id for listening for all type cable events on an extcon with a single notifier. In the end it was decided to instead add a new extcon_register_notifier_all function for this, switch to using this. Signed-off-by: Hans de Goede Acked-by: Liam Breck Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ddaa00ee63e184d86d3963ce3014ae04a6a4fce2 Merge: 61489b0 815429b Author: Sebastian Reichel Date: Fri Apr 14 01:41:45 2017 +0200 Merge remote-tracking branch 'chanwoo-extcon/ib-extcon-4.12' into psy-next commit 61489b0f9fa835cd2fef67ae26790cdf64b6b1c7 Author: Liam Breck Date: Tue Apr 11 04:59:57 2017 -0700 power: supply: bq24190_charger: Longer delay while polling reset flag On chip reset, polling loop used udelay(10) which is too short to be useful. Instead, use usleep_range(100, 200). Signed-off-by: Liam Breck Acked-by: Tony Lindgren Acked-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit e3ebc381a966f7fb41b13c2823ff96f9d6d7a377 Author: Liam Breck Date: Tue Apr 11 04:59:56 2017 -0700 power: supply: bq24190_charger: Uniform pm_runtime_get() failure handling On pm_runtime_get() failure, always emit an error message. Prevent unbalanced pm_runtime_get by calling: pm_runtime_put_noidle() in irq handler pm_runtime_put_sync() on any probe() failure Rename probe() out labels instead of renumbering them. Fixes: 13d6fa8447fa ("power: bq24190_charger: Use PM runtime autosuspend") Signed-off-by: Liam Breck Acked-by: Tony Lindgren Reviewed-by: Hans de Goede Acked-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 37 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 18 deletions(-) commit 03add17fe338af82a28b41bda6afeb3b25c0a323 Author: Liam Breck Date: Tue Apr 11 04:59:55 2017 -0700 power: supply: bq24190_charger: Clean up extcon code Polishing and fixes for initial extcon patch. Fixes: 4db249b6f3b4 ("power: supply: bq24190_charger: Use extcon to determine ilimit, 5v boost") Cc: Tony Lindgren Signed-off-by: Liam Breck Acked-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 84 +++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 38 deletions(-) commit d63d07c6fc25182af6d3ab5b3b8737b0c1025ebd Author: Liam Breck Date: Tue Apr 11 04:59:54 2017 -0700 power: supply: bq24190_charger: Limit over/under voltage fault logging If the charger is unplugged before the battery is full we may see an over/under voltage fault. Ignore this rather then emitting a message or uevent. This fixes messages like these getting logged on charger unplug + replug: bq24190-charger 15-006b: Fault: boost 0, charge 1, battery 0, ntc 0 bq24190-charger 15-006b: Fault: boost 0, charge 0, battery 0, ntc 0 Cc: Tony Lindgren Cc: Hans de Goede Signed-off-by: Liam Breck Acked-by: Tony Lindgren Reviewed-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 53db88586acd39400665d32914d1bb7b3da07276 Author: David Lechner Date: Tue Apr 11 16:05:22 2017 -0500 power: supply: New driver for LEGO MINDSTORMS EV3 battery This adds a new driver for the LEGO MINDSTORMS EV3 battery. The EV3 is an embedded ARM device that can use 6 AA batteries or a special rechargeable Li-ion battery pack. The rechargeable battery pack presses a special key switch in the battery compartment to indicate that it is present. The EV3 is only capable of monitoring battery voltage and current. The charging circuit is built into the rechargeable battery pack and there is no way to communicate with is, so we can't provide any information about charging status. When not using the rechargeable battery pack, it is most common to use alkaline batteries to power the device, but it is also common for people to use rechargeable NiMH batteries. Since there is not a way to automatically differentiate between these, the technology property is made writable. Signed-off-by: David Lechner Signed-off-by: Sebastian Reichel drivers/power/supply/Kconfig | 6 + drivers/power/supply/Makefile | 1 + drivers/power/supply/lego_ev3_battery.c | 228 ++++++++++++++++++++++++++++++++ 3 files changed, 235 insertions(+) commit 11ecb0d234ea7f3b33760281fd4113115c71d5f7 Author: David Lechner Date: Tue Apr 11 16:05:21 2017 -0500 dt-bindings: power: supply: New bindings for LEGO MINDSTORMS EV3 battery This add a new device tree binding for LEGO MINDSTORMS EV3 battery. The EV3 has some built-in capability for monitoring the attached battery. Signed-off-by: David Lechner Acked-by: Rob Herring Signed-off-by: Sebastian Reichel .../bindings/power/supply/lego_ev3_battery.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 53a022d0c1625db0f8e4a29f2913dfdbf4bb7152 Author: Enric Balletbo i Serra Date: Mon Apr 3 18:44:45 2017 +0200 power: supply: tps65217: remove debug messages for function calls Equivalent information can be nowadays obtained using function tracer. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Sebastian Reichel drivers/power/supply/tps65217_charger.c | 4 ---- 1 file changed, 4 deletions(-) commit 9697277ed52980629774ffa603404ee44600154e Author: Javier Martinez Canillas Date: Wed Mar 29 12:00:57 2017 -0400 power: supply: ltc2941-battery-gauge: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Sebastian Reichel drivers/power/supply/ltc2941-battery-gauge.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit c67c372ca667eef047538eb3456f87ea94bd2949 Author: Javier Martinez Canillas Date: Wed Mar 29 12:00:56 2017 -0400 power: supply: ltc2941-battery-gauge: Add vendor to compatibles in binding The DT binding document for LTC2941 and LTC2943 battery gauges did not use a vendor prefix in the listed compatible strings. The driver says that the manufacturer is Linear Technology which is "lltc" in vendor-prefixes.txt. There isn't an upstream Device Tree source file that has nodes defined for these devices, so there's no need to keep the old compatible strings. Signed-off-by: Javier Martinez Canillas Acked-by: Rob Herring Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/power/supply/ltc2941.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dc6ea7d4cd780414facb9d201434f47abd197917 Author: Andi Shyti Date: Thu Mar 30 00:13:57 2017 +0900 power: supply: charger-manager: simplify return statements Some trivial improvements on the returning value of the functions: - remove unnecessary goto labels that just return, return immediately, instead. - do not initialize when not needed. - return the value from the calling function that fails instead of politically choosing -EINVAL. Signed-off-by: Andi Shyti Signed-off-by: Sebastian Reichel drivers/power/supply/charger-manager.c | 35 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 21 deletions(-) commit bdd9968d35f7fcdb76089347d1529bf079534214 Author: Giedrius Statkevičius Date: Sat Mar 25 18:00:49 2017 +0200 power: supply: lp8788: prevent out of bounds array access val might become 7 in which case stime[7] (array of length 7) would be accessed during the scnprintf call later and that will cause issues. Obviously, string concatenation is not intended here so just a comma needs to be added to fix the issue. Fixes: 98a276649358 ("power_supply: Add new lp8788 charger driver") Signed-off-by: Giedrius Statkevičius Acked-by: Milo Kim Signed-off-by: Sebastian Reichel drivers/power/supply/lp8788-charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c9888e3c1925ef4b18a04f71fa3a8228a648a08 Author: Tony Lindgren Date: Sun Mar 26 20:25:13 2017 -0700 power: supply: cpcap-charger: Add minimal CPCAP PMIC battery charger The custom CPCAP PMIC used on Motorola phones such as Droid 4 has a USB battery charger. It can optionally also have a companion chip that is used for wireless charging. The charger on CPCAP also can feed VBUS for the USB host mode. This can be handled by the existing kernel phy_companion interface. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Signed-off-by: Tony Lindgren Acked-by: Rob Herring Signed-off-by: Sebastian Reichel .../bindings/power/supply/cpcap-charger.txt | 37 ++ drivers/power/supply/Kconfig | 8 + drivers/power/supply/Makefile | 1 + drivers/power/supply/cpcap-charger.c | 681 +++++++++++++++++++++ 4 files changed, 727 insertions(+) commit da26580f4eb81f3614cf5e3af43155fb45d118fc Author: Hans de Goede Date: Thu Mar 23 09:32:35 2017 +0100 power: supply: bq24190_charger: Use extcon to determine ilimit, 5v boost Add support for monitoring an extcon device with USB SDP/CDP/DCP and HOST cables and adjust ilimit and enable/disable the 5V boost converter accordingly. This is necessary on systems where the PSEL pin is hardwired high and ILIM needs to be set by software based on the detected charger type, as well as on systems where the 5V boost converter is used, as that always needs to be enabled from software. Cc: Liam Breck Cc: Tony Lindgren Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/Kconfig | 1 + drivers/power/supply/bq24190_charger.c | 109 +++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) commit 99c88eb244aa6b61cc0c4ca6e6b6b9c7ce00cc53 Author: Hans de Goede Date: Wed Mar 22 15:55:31 2017 +0100 power: supply: bq24190_charger: Add support for bq24192i The bq24192 and bq24192i are mostly identical to the bq24190, TI even published a single datasheet for all 3 of them. The difference between the bq24190 and bq24192[i] is the way charger-type detection is done, the bq24190 is to be directly connected to the USB a/b lines, where as the the bq24192[i] has a gpio which should be driven high/low externally depending on the type of charger connected, from a register level access pov there is no difference. The differences between the bq24192 and bq24192i are: 1) Lower default charge rate on the bq24192i 2) Pre-charge-current can be max 640 mA on the bq24192i On x86/ACPI systems the code which instantiates the i2c client may not know the exact variant being used, so instead of coding the model-id in the i2c_id struct and bailing if it does not match, check the reported model-id matches one of the supported variants. This commit only adds support for the bq24192i as I don't have a bq24192 to test with, adding support for the bq24192 should be as simple as also accepting its model-id in the model-id test. Cc: Liam Breck Cc: Tony Lindgren Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 01c0e0a28da749e80cb7d549f75a5f52e2f40d0e Author: Hans de Goede Date: Wed Mar 22 15:55:30 2017 +0100 power: supply: bq24190_charger: Use i2c-core irq-mapping code The i2c-core already maps of irqs before calling the driver's probe function and there are no in tree users of bq24190_platform_data->gpio_int. Remove the redundant custom irq-mapping code and just use client->irq. Cc: Liam Breck Cc: Tony Lindgren Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 66 ++-------------------------------- include/linux/power/bq24190_charger.h | 16 --------- 2 files changed, 3 insertions(+), 79 deletions(-) commit b98074e2adc21b52b59e2c7889f58d0c9f6fd8e5 Author: Arnd Bergmann Date: Mon Mar 20 14:14:15 2017 +0100 power: bq24190_charger: mark PM functions as __maybe_unused Without CONFIG_PM, we get a harmless warning: drivers/power/supply/bq24190_charger.c:1514:12: error: 'bq24190_runtime_resume' defined but not used [-Werror=unused-function] drivers/power/supply/bq24190_charger.c:1501:12: error: 'bq24190_runtime_suspend' defined but not used [-Werror=unused-function] To avoid the warning, we can mark all four PM functions as __maybe_unused, which also lets us remove the incorrect #ifdef. Fixes: 3d8090cba638 ("power: bq24190_charger: Check the interrupt status on resume") Signed-off-by: Arnd Bergmann Acked-by: Tony Lindgren Acked-by: Liam Breck Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit dba83476966b725736f99afb7d80c945c06ba6dc Author: Daniel Perez Date: Wed Feb 15 16:46:21 2017 +0100 power: supply: sbs-charger: simplified bool function Signed-off-by: Daniel Perez Signed-off-by: Sebastian Reichel drivers/power/supply/sbs-charger.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit d71472465a883b37c52283c96fa0f924127a2e71 Author: Munir Contractor Date: Sun Feb 19 18:19:53 2017 -0500 power: supply: ab8500: Replaced spaces with tabs in indent This patch fixes 4 checkpatch.pl errors on lines 433 to 436: ERROR: code indent should use tabs where possible Signed-off-by: Munir Contractor Signed-off-by: Sebastian Reichel drivers/power/supply/ab8500_bmdata.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 867758793a765b568a28b4973321875752c662bf Author: Andy Shevchenko Date: Mon Feb 20 19:12:23 2017 +0200 power: supply: bq25890: Use gpiod_get() Since index is always 0, replace gpiod_get_index() by gpiod_get(). Signed-off-by: Andy Shevchenko Signed-off-by: Sebastian Reichel drivers/power/supply/bq25890_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbe5c2878955a1d4fd11c04203002bcf60e7d7d7 Author: Enric Balletbo i Serra Date: Thu Feb 23 16:35:04 2017 +0100 dt-bindings: power/supply: rename max8925_batter.txt to max8925_battery.txt Fix the max8925_batter typo in the file name. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Sebastian Reichel .../bindings/power/supply/max8925_batter.txt | 18 ------------------ .../bindings/power/supply/max8925_battery.txt | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 18 deletions(-) commit 420b2d443b7ee2a6a8c0d4fab887a641f83e76af Author: Dmitry Torokhov Date: Wed Mar 1 15:44:53 2017 -0800 power: supply: twl4030_charger: remove incorrect __exit markups Even if bus is not hot-pluggable, the devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes. Signed-off-by: Dmitry Torokhov Signed-off-by: Sebastian Reichel drivers/power/supply/twl4030_charger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f7a388d6cd1ccebfe7d2850ae4d33f84e954e96b Author: Linus Walleij Date: Sun Mar 12 23:36:21 2017 +0100 power: reset: Add a driver for the Gemini poweroff The Gemini (SL3516) SoC has a special power controller block that only deal with shutting down the system. If you do not register a driver and activate the block, the power button on the systems utilizing this SoC will do an uncontrolled power cut, which is why it is important to have a special poweroff driver. The most basic functionality is to just shut down the system by writing a special bit in the control register after the system has reached pm_poweroff. It also handles the poweroff from a button or other sources: When the poweroff button is pressed, or a signal is sent to poweroff from an infrared remote control, or when the RTC fires a special alarm (!) the system emits an interrupt. At this point, Linux must acknowledge the interrupt and proceed to do an orderly shutdown of the system. After adding this driver, pressing the poweroff button gives this dmesg: root@gemini:/ root@gemini:/ gemini-poweroff 4b000000.power-controller: poweroff button pressed calling shutdown scripts.. setting /dev/rtc0 from system time unmounting file systems... umount: tmpfs busy - remounted read-only umount: can't unmount /: Invalid argument The system is going down NOW! Sent SIGTERM to all processes Sent SIGKILL to all processes Requesting system poweroff uhci_hcd 0000:00:09.1: HCRESET not completed yet! uhci_hcd 0000:00:09.0: HCRESET not completed yet! reboot: Power down gemini-poweroff 4b000000.power-controller: Gemini power off Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Cc: linux-pm@vger.kernel.org Cc: Sebastian Reichel Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel drivers/power/reset/Kconfig | 9 ++ drivers/power/reset/Makefile | 1 + drivers/power/reset/gemini-poweroff.c | 160 ++++++++++++++++++++++++++++++++++ 3 files changed, 170 insertions(+) commit ba443b5ab454a9b5f49229a94b2dadf06ac8b79e Author: Linus Walleij Date: Sun Mar 12 23:36:01 2017 +0100 power: reset: Add Gemini poweroff DT bindings This adds device tree bindings to the power management controller in the Gemini SoC. Cc: devicetree@vger.kernel.org Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Acked-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel .../devicetree/bindings/power/reset/gemini-poweroff.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit da28122c82fc60c34b19cf9d3879fd2548657028 Author: Javier Martinez Canillas Date: Wed Mar 15 00:43:49 2017 -0300 power: supply: max17040: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Sebastian Reichel drivers/power/supply/max17040_battery.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f2c199db477efd8233e75b2d69bac8be8640308d Author: Guy Shapiro Date: Tue Feb 7 17:56:05 2017 +0200 power: reset: syscon-poweroff: add a mask property Make the syscon-poweroff driver accept value and mask instead of just value. Prior to this patch, the property name for the value was 'mask'. If only the mask property is defined on a node, maintain compatibility by using it as the value. Signed-off-by: Guy Shapiro Acked-by: Rob Herring Signed-off-by: Sebastian Reichel .../bindings/power/reset/syscon-poweroff.txt | 11 +++++++++-- drivers/power/reset/syscon-poweroff.c | 19 ++++++++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-) commit f385e6e2a153233033aa348766bac21125651d05 Author: Tony Lindgren Date: Wed Feb 8 15:13:01 2017 -0800 power: bq24190_charger: Use PM runtime autosuspend We can get quite a few interrupts when the battery is trickle charging. Let's enable PM runtime autosuspend to avoid constantly toggling device driver PM runtime state. Let's use a 600 ms timeout as that's how long the USB chager detection might take. Acked-by: Mark Greer Acked-by: Liam Breck Signed-off-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 156 ++++++++++++++++++++++++--------- 1 file changed, 114 insertions(+), 42 deletions(-) commit 35c3c196d3948d6862b19112d19b8dda880083ff Author: Tony Lindgren Date: Wed Feb 8 15:13:00 2017 -0800 power: bq24190_charger: Check the interrupt status on resume Some SoCs like omap3 can configure GPIO irqs to use Linux generic dedicated wakeirq support. If the dedicated wakeirq is configured, the SoC will use a always-on interrupt controller to produce wake-up events. If bq24190 is configured for dedicated wakeirq, we need to check the interrupt status on PM runtime resume. This is because the Linux generic wakeirq will call pm_runtime_resume() on the device on a wakeirq. And as the bq24190 interrupt is falling edge sensitive and only active for 250 us, there will be no device interrupt seen by the runtime SoC IRQ controller. Note that this can cause spurious interrupts on omap3 devices with bq24190 connected to gpio banks 2 - 5 as there's a glitch on those pins waking from off mode as listed in "Advisory 1.45". Devices with this issue should not configure the optional wakeirq interrupt in the dts file. Acked-by: Mark Greer Acked-by: Liam Breck Signed-off-by: Tony Lindgren Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 62 ++++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 10 deletions(-) commit 2b8713e14be5712956e10121000c5417c225ddfd Author: SeongJae Park Date: Fri Apr 14 01:58:49 2017 +0900 selftests/vm/run_vmtests: Polish output text Few currently running test notification messages from run_vmtests output have mismatched highlight lines. This commit fixes them to fit in length. Signed-off-by: SeongJae Park Signed-off-by: Shuah Khan tools/testing/selftests/vm/run_vmtests | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 05844f83132250d47514721b6801791972745082 Author: Colin Ian King Date: Wed Apr 12 14:48:17 2017 +0100 selftests/timers: fix spelling mistake: "Asynchronous" trivial fix to spelling mistake in printed message. Signed-off-by: Colin Ian King Signed-off-by: Shuah Khan tools/testing/selftests/timers/clocksource-switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3b454f694db663773bc22002e10909afe9c1739 Author: Dave Jiang Date: Thu Apr 13 14:25:17 2017 -0700 libnvdimm: fix clear poison locking with spinlock and GFP_NOWAIT allocation The following warning results from holding a lane spinlock, preempt_disable(), or the btt map spinlock and then trying to take the reconfig_mutex to walk the poison list and potentially add new entries. BUG: sleeping function called from invalid context at kernel/locking/mutex. c:747 in_atomic(): 1, irqs_disabled(): 0, pid: 17159, name: dd [..] Call Trace: dump_stack+0x85/0xc8 ___might_sleep+0x184/0x250 __might_sleep+0x4a/0x90 __mutex_lock+0x58/0x9b0 ? nvdimm_bus_lock+0x21/0x30 [libnvdimm] ? __nvdimm_bus_badblocks_clear+0x2f/0x60 [libnvdimm] ? acpi_nfit_forget_poison+0x79/0x80 [nfit] ? _raw_spin_unlock+0x27/0x40 mutex_lock_nested+0x1b/0x20 nvdimm_bus_lock+0x21/0x30 [libnvdimm] nvdimm_forget_poison+0x25/0x50 [libnvdimm] nvdimm_clear_poison+0x106/0x140 [libnvdimm] nsio_rw_bytes+0x164/0x270 [libnvdimm] btt_write_pg+0x1de/0x3e0 [nd_btt] ? blk_queue_enter+0x30/0x290 btt_make_request+0x11a/0x310 [nd_btt] ? blk_queue_enter+0xb7/0x290 ? blk_queue_enter+0x30/0x290 generic_make_request+0x118/0x3b0 A spinlock is introduced to protect the poison list. This allows us to not having to acquire the reconfig_mutex for touching the poison list. The add_poison() function has been broken out into two helper functions. One to allocate the poison entry and the other to apppend the entry. This allows us to unlock the poison_lock in non-I/O path and continue to be able to allocate the poison entry with GFP_KERNEL. We will use GFP_NOWAIT in the I/O path in order to satisfy being in atomic context. Reviewed-by: Vishal Verma Signed-off-by: Dave Jiang Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 7 +++--- drivers/nvdimm/core.c | 56 ++++++++++++++++++++++++++++------------------- drivers/nvdimm/nd-core.h | 1 + include/linux/libnvdimm.h | 2 -- 4 files changed, 38 insertions(+), 28 deletions(-) commit 5389023421b8f719fe4f1e6abd3f0bd0e571866e Author: Taehee Yoo Date: Tue Mar 28 00:28:50 2017 +0900 netfilter: nat: remove rcu_read_lock in __nf_nat_decode_session. __nf_nat_decode_session is called from nf_nat_decode_session as decodefn. before calling decodefn, it already set rcu_read_lock. so rcu_read_lock in __nf_nat_decode_session can be removed. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_nat_core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 0cfef2b7410b64d7a430947e0b533314c4f97153 Author: Alex Williamson Date: Thu Apr 13 14:10:15 2017 -0600 vfio/type1: Remove locked page accounting workqueue If the mmap_sem is contented then the vfio type1 IOMMU backend will defer locked page accounting updates to a workqueue task. This has a few problems and depending on which side the user tries to play, they might be over-penalized for unmaps that haven't yet been accounted or race the workqueue to enter more mappings than they're allowed. The original intent of this workqueue mechanism seems to be focused on reducing latency through the ioctl, but we cannot do so at the cost of correctness. Remove this workqueue mechanism and update the callers to allow for failure. We can also now recheck the limit under write lock to make sure we don't exceed it. vfio_pin_pages_remote() also now necessarily includes an unwind path which we can jump to directly if the consecutive page pinning finds that we're exceeding the user's memory limits. This avoids the current lazy approach which does accounting and mapping up to the fault, only to return an error on the next iteration to unwind the entire vfio_dma. Cc: stable@vger.kernel.org Reviewed-by: Peter Xu Reviewed-by: Kirti Wankhede Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_type1.c | 110 +++++++++++++++++++--------------------- 1 file changed, 51 insertions(+), 59 deletions(-) commit 05aa43cce0e287a87e686931d65707953bc60d07 Author: Alex Hung Date: Thu Apr 6 17:32:16 2017 +0100 platform/x86: hp-wireless: add Xiaomi's hardware id to the supported list The airplane mode button on Xiaomi's new laptops are the same as HP laptops. This is tested on Xiaomi Notebook Air 13. Signed-off-by: Alex Hung [dvhart: Dropped module init/exit info messages] Signed-off-by: Darren Hart (VMware) drivers/platform/x86/hp-wireless.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5b7bb3a79da05a5f49445c13f240e286a3d5b8a8 Author: Hans de Goede Date: Sun Apr 9 11:07:44 2017 +0200 platform/x86: silead_dmi: Add touchscreen info for Surftab Wintron 7.0 Add touchscreen info for the Trekstor Surftab Wintron 7.0 ST70416-6 tablet. Signed-off-by: Hans de Goede Signed-off-by: Darren Hart (VMware) drivers/platform/x86/silead_dmi.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 5abca06c21bce9b65c1a9bf8b26d8f1711aca94a Author: Axel Lin Date: Thu Apr 13 20:55:50 2017 +0800 regulator: tps65132: Fix off-by-one for .max_register setting TPS65132_REG_CONTROL(0xFF) is the latest valid register. Signed-off-by: Axel Lin Signed-off-by: Mark Brown drivers/regulator/tps65132-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bf944548169f6153c3d3778cf983cb5db251a0e Author: Dong Aisheng Date: Wed Apr 12 09:58:47 2017 +0800 regulator: anatop: set default voltage selector for pcie Set the initial voltage selector for vddpcie in case it's disabled by default. This fixes the below warning: 20c8000.anatop:regulator-vddpcie: Failed to read a valid default voltage selector. anatop_regulator: probe of 20c8000.anatop:regulator-vddpcie failed with error -22 Cc: Liam Girdwood Cc: Mark Brown Cc: Shawn Guo Cc: Sascha Hauer Cc: Robin Gong Cc: Richard Zhu Signed-off-by: Richard Zhu Signed-off-by: Dong Aisheng Signed-off-by: Mark Brown drivers/regulator/anatop-regulator.c | 5 +++++ 1 file changed, 5 insertions(+) commit ce07183282975026716107d36fd3f5f93de76668 Merge: fb9eb89 fe52145 Author: David S. Miller Date: Thu Apr 13 13:58:23 2017 -0400 Merge branch 'netlink_ext_ACK' Johannes Berg says: ==================== netlink extended ACK reporting Changes since v4: * use __NLMSGERR_ATTR_MAX instead of NUM_NLMSGERR_ATTRS Changes since v3: * Add NLM_F_CAPPED and NLM_F_ACK_TLVS flags, to allow entirely stateless parsing of the ACK messages by looking at the new flags. Need to check NLM_F_ACK_TLVS first, since capping can be done in kernels before this patchset without setting the flag. * Remove "missing_attr" functionality - this can obviously be added back rather easily, but I'd rather have more discussion about the nesting problem there. * Improve documentation of NLMSGERR_ATTR_OFFS * Improve message structure documentation, documenting that the request message is always capped for success cases * fix nlmsg_len of the outer message by calling nlmsg_end() * fix memcpy() of the request in success cases, going back to the original code that I'd changed before due to the payload adjustments that I reverted when introducing tlvlen Changes since v2: * add NUM_NLMSGERR_ATTRS, NLMSGERR_ATTR_MAX * fix cookie length to 20 (sha-1 length) * move struct members for cookie to patch 3 where they should be * another cleanup suggested by David Ahern Changes since v1: * credit Pablo and Jamal * incorporate suggestion from David Ahern * fix compilation in decnet ==================== Signed-off-by: David S. Miller commit fe52145f91fe81b994e4622f6b9c3a0f22643363 Author: Johannes Berg Date: Wed Apr 12 14:34:08 2017 +0200 netlink: pass extended ACK struct where available This is an add-on to the previous patch that passes the extended ACK structure where it's already available by existing genl_info or extack function arguments. This was done with this spatch (with some manual adjustment of indentation): @@ expression A, B, C, D, E; identifier fn, info; @@ fn(..., struct genl_info *info, ...) { ... -nlmsg_parse(A, B, C, D, E, NULL) +nlmsg_parse(A, B, C, D, E, info->extack) ... } @@ expression A, B, C, D, E; identifier fn, info; @@ fn(..., struct genl_info *info, ...) { <... -nla_parse_nested(A, B, C, D, NULL) +nla_parse_nested(A, B, C, D, info->extack) ...> } @@ expression A, B, C, D, E; identifier fn, extack; @@ fn(..., struct netlink_ext_ack *extack, ...) { <... -nlmsg_parse(A, B, C, D, E, NULL) +nlmsg_parse(A, B, C, D, E, extack) ...> } @@ expression A, B, C, D, E; identifier fn, extack; @@ fn(..., struct netlink_ext_ack *extack, ...) { <... -nla_parse(A, B, C, D, E, NULL) +nla_parse(A, B, C, D, E, extack) ...> } @@ expression A, B, C, D, E; identifier fn, extack; @@ fn(..., struct netlink_ext_ack *extack, ...) { ... -nlmsg_parse(A, B, C, D, E, NULL) +nlmsg_parse(A, B, C, D, E, extack) ... } @@ expression A, B, C, D; identifier fn, extack; @@ fn(..., struct netlink_ext_ack *extack, ...) { <... -nla_parse_nested(A, B, C, D, NULL) +nla_parse_nested(A, B, C, D, extack) ...> } @@ expression A, B, C, D; identifier fn, extack; @@ fn(..., struct netlink_ext_ack *extack, ...) { <... -nlmsg_validate(A, B, C, D, NULL) +nlmsg_validate(A, B, C, D, extack) ...> } @@ expression A, B, C, D; identifier fn, extack; @@ fn(..., struct netlink_ext_ack *extack, ...) { <... -nla_validate(A, B, C, D, NULL) +nla_validate(A, B, C, D, extack) ...> } @@ expression A, B, C; identifier fn, extack; @@ fn(..., struct netlink_ext_ack *extack, ...) { <... -nla_validate_nested(A, B, C, NULL) +nla_validate_nested(A, B, C, extack) ...> } Signed-off-by: Johannes Berg Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller crypto/crypto_user.c | 2 +- drivers/net/team/team.c | 3 ++- net/ieee802154/nl802154.c | 10 +++++----- net/netfilter/ipvs/ip_vs_ctl.c | 2 +- net/netfilter/nfnetlink.c | 2 +- net/netlink/genetlink.c | 2 +- net/nfc/netlink.c | 2 +- net/tipc/bearer.c | 14 +++++++------- net/tipc/net.c | 2 +- net/tipc/node.c | 8 ++++---- net/wireless/nl80211.c | 33 ++++++++++++++++++--------------- net/xfrm/xfrm_user.c | 2 +- 12 files changed, 43 insertions(+), 39 deletions(-) commit fceb6435e85298f747fee938415057af837f5a8a Author: Johannes Berg Date: Wed Apr 12 14:34:07 2017 +0200 netlink: pass extended ACK struct to parsing functions Pass the new extended ACK reporting struct to all of the generic netlink parsing functions. For now, pass NULL in almost all callers (except for some in the core.) Signed-off-by: Johannes Berg Signed-off-by: David S. Miller crypto/crypto_user.c | 2 +- drivers/block/drbd/drbd_nla.c | 2 +- drivers/infiniband/core/addr.c | 2 +- drivers/infiniband/core/iwpm_util.c | 6 +- drivers/infiniband/core/sa_query.c | 4 +- drivers/net/macsec.c | 10 +-- drivers/net/team/team.c | 2 +- drivers/net/veth.c | 3 +- drivers/net/wireless/ath/ath10k/testmode.c | 4 +- drivers/net/wireless/ath/ath6kl/testmode.c | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 3 +- drivers/net/wireless/mac80211_hwsim.c | 4 +- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 4 +- drivers/net/wireless/ti/wlcore/testmode.c | 3 +- drivers/net/wireless/ti/wlcore/vendor_cmd.c | 4 +- include/net/genetlink.h | 8 ++- include/net/netlink.h | 33 +++++++--- include/net/rtnetlink.h | 3 +- lib/nlattr.c | 28 +++++--- net/8021q/vlan_netlink.c | 3 +- net/bridge/br_mdb.c | 3 +- net/bridge/br_netlink.c | 4 +- net/bridge/br_netlink_tunnel.c | 4 +- net/can/gw.c | 2 +- net/core/fib_rules.c | 4 +- net/core/lwt_bpf.c | 5 +- net/core/neighbour.c | 8 +-- net/core/net_namespace.c | 4 +- net/core/rtnetlink.c | 47 ++++++++------ net/dcb/dcbnl.c | 57 ++++++++--------- net/decnet/dn_dev.c | 4 +- net/decnet/dn_fib.c | 6 +- net/decnet/dn_route.c | 2 +- net/ieee802154/nl802154.c | 29 ++++----- net/ipv4/devinet.c | 12 ++-- net/ipv4/fib_frontend.c | 3 +- net/ipv4/ip_tunnel_core.c | 5 +- net/ipv4/ipmr.c | 3 +- net/ipv4/route.c | 3 +- net/ipv6/addrconf.c | 16 +++-- net/ipv6/addrlabel.c | 4 +- net/ipv6/ila/ila_lwt.c | 3 +- net/ipv6/route.c | 6 +- net/ipv6/seg6_iptunnel.c | 2 +- net/mpls/af_mpls.c | 5 +- net/mpls/mpls_iptunnel.c | 2 +- net/netfilter/ipset/ip_set_core.c | 27 ++++---- net/netfilter/ipvs/ip_vs_ctl.c | 12 ++-- net/netfilter/nf_conntrack_netlink.c | 27 ++++---- net/netfilter/nf_conntrack_proto_dccp.c | 2 +- net/netfilter/nf_conntrack_proto_sctp.c | 6 +- net/netfilter/nf_conntrack_proto_tcp.c | 3 +- net/netfilter/nf_nat_core.c | 5 +- net/netfilter/nf_tables_api.c | 27 ++++---- net/netfilter/nfnetlink.c | 11 ++-- net/netfilter/nfnetlink_acct.c | 3 +- net/netfilter/nfnetlink_cthelper.c | 12 ++-- net/netfilter/nfnetlink_cttimeout.c | 3 +- net/netfilter/nfnetlink_queue.c | 2 +- net/netfilter/nft_compat.c | 2 +- net/netlabel/netlabel_cipso_v4.c | 19 +++--- net/netlink/genetlink.c | 2 +- net/nfc/netlink.c | 5 +- net/openvswitch/datapath.c | 2 +- net/openvswitch/flow_netlink.c | 4 +- net/openvswitch/vport-vxlan.c | 3 +- net/phonet/pn_netlink.c | 6 +- net/qrtr/qrtr.c | 2 +- net/sched/act_api.c | 20 +++--- net/sched/act_bpf.c | 2 +- net/sched/act_connmark.c | 3 +- net/sched/act_csum.c | 2 +- net/sched/act_gact.c | 2 +- net/sched/act_ife.c | 4 +- net/sched/act_ipt.c | 2 +- net/sched/act_mirred.c | 2 +- net/sched/act_nat.c | 2 +- net/sched/act_pedit.c | 4 +- net/sched/act_police.c | 2 +- net/sched/act_sample.c | 2 +- net/sched/act_simple.c | 2 +- net/sched/act_skbedit.c | 2 +- net/sched/act_skbmod.c | 2 +- net/sched/act_tunnel_key.c | 3 +- net/sched/act_vlan.c | 2 +- net/sched/cls_api.c | 2 +- net/sched/cls_basic.c | 2 +- net/sched/cls_bpf.c | 3 +- net/sched/cls_cgroup.c | 2 +- net/sched/cls_flow.c | 2 +- net/sched/cls_flower.c | 3 +- net/sched/cls_fw.c | 2 +- net/sched/cls_matchall.c | 4 +- net/sched/cls_route.c | 2 +- net/sched/cls_rsvp.h | 2 +- net/sched/cls_tcindex.c | 2 +- net/sched/cls_u32.c | 2 +- net/sched/em_meta.c | 2 +- net/sched/ematch.c | 2 +- net/sched/sch_api.c | 10 +-- net/sched/sch_atm.c | 2 +- net/sched/sch_cbq.c | 4 +- net/sched/sch_choke.c | 2 +- net/sched/sch_codel.c | 2 +- net/sched/sch_drr.c | 2 +- net/sched/sch_dsmark.c | 4 +- net/sched/sch_fq.c | 2 +- net/sched/sch_fq_codel.c | 3 +- net/sched/sch_gred.c | 4 +- net/sched/sch_hfsc.c | 2 +- net/sched/sch_hhf.c | 2 +- net/sched/sch_htb.c | 4 +- net/sched/sch_netem.c | 2 +- net/sched/sch_pie.c | 2 +- net/sched/sch_qfq.c | 3 +- net/sched/sch_red.c | 2 +- net/sched/sch_sfb.c | 2 +- net/sched/sch_tbf.c | 2 +- net/switchdev/switchdev.c | 2 +- net/tipc/bearer.c | 14 ++-- net/tipc/link.c | 2 +- net/tipc/net.c | 4 +- net/tipc/netlink.c | 3 +- net/tipc/netlink_compat.c | 32 +++++----- net/tipc/node.c | 12 ++-- net/tipc/socket.c | 2 +- net/tipc/udp_media.c | 7 +- net/wireless/nl80211.c | 78 ++++++++++++----------- net/xfrm/xfrm_user.c | 6 +- 129 files changed, 477 insertions(+), 391 deletions(-) commit ba0dc5f6e0ba5a5d2f575bcdb35e5d1960cf7c04 Author: Johannes Berg Date: Wed Apr 12 14:34:06 2017 +0200 netlink: allow sending extended ACK with cookie on success Now that we have extended error reporting and a new message format for netlink ACK messages, also extend this to be able to return arbitrary cookie data on success. This will allow, for example, nl80211 to not send an extra message for cookies identifying newly created objects, but return those directly in the ACK message. The cookie data size is currently limited to 20 bytes (since Jamal talked about using SHA1 for identifiers.) Thanks to Jamal Hadi Salim for bringing up this idea during the discussions. Signed-off-by: Johannes Berg Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller include/linux/netlink.h | 7 +++++++ include/uapi/linux/netlink.h | 4 ++++ net/netlink/af_netlink.c | 33 ++++++++++++++++++++++----------- 3 files changed, 33 insertions(+), 11 deletions(-) commit 7ab606d1609dd6dfeae9c8ad0a8a4e051d831e46 Author: Johannes Berg Date: Wed Apr 12 14:34:05 2017 +0200 genetlink: pass extended ACK report down Pass the extended ACK reporting struct down from generic netlink to the families, using the existing struct genl_info for simplicity. Also add support to set the extended ACK information from generic netlink users. Signed-off-by: Johannes Berg Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller include/net/genetlink.h | 12 ++++++++++++ net/netlink/genetlink.c | 6 ++++-- 2 files changed, 16 insertions(+), 2 deletions(-) commit 2d4bc93368f5a0ddb57c8c885cdad9c9b7a10ed5 Author: Johannes Berg Date: Wed Apr 12 14:34:04 2017 +0200 netlink: extended ACK reporting Add the base infrastructure and UAPI for netlink extended ACK reporting. All "manual" calls to netlink_ack() pass NULL for now and thus don't get extended ACK reporting. Big thanks goes to Pablo Neira Ayuso for not only bringing up the whole topic at netconf (again) but also coming up with the nlattr passing trick and various other ideas. Signed-off-by: Johannes Berg Reviewed-by: David Ahern Signed-off-by: David S. Miller crypto/crypto_user.c | 3 +- drivers/infiniband/core/netlink.c | 5 +-- drivers/scsi/scsi_netlink.c | 2 +- include/linux/netlink.h | 26 +++++++++++++- include/net/netlink.h | 3 +- include/uapi/linux/netlink.h | 32 ++++++++++++++++++ kernel/audit.c | 2 +- net/core/rtnetlink.c | 3 +- net/core/sock_diag.c | 3 +- net/decnet/netfilter/dn_rtmsg.c | 2 +- net/hsr/hsr_netlink.c | 4 +-- net/netfilter/ipset/ip_set_core.c | 2 +- net/netfilter/nfnetlink.c | 22 ++++++------ net/netlink/af_netlink.c | 71 ++++++++++++++++++++++++++++++++++----- net/netlink/af_netlink.h | 1 + net/netlink/genetlink.c | 3 +- net/xfrm/xfrm_user.c | 3 +- 17 files changed, 153 insertions(+), 34 deletions(-) commit fb9eb899a6dc663e4a2deed9af2ac28f507d0ffb Author: Mahesh Bandewar Date: Tue Apr 11 22:36:00 2017 -0700 bonding: handle link transition from FAIL to UP correctly When link transitions from LINK_FAIL to LINK_UP, the commit phase is not called. This leads to an erroneous state causing slave-link state to get stuck in "going down" state while its speed and duplex are perfectly fine. This issue is a side-effect of splitting link-set into propose and commit phases introduced by de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring") This patch fixes these issues by calling commit phase whenever link state change is proposed. Fixes: de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring") Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d4d49bc145e830fdcfdcfba9ef4b7db5d0b1f8a7 Author: Jie Deng Date: Wed Apr 12 13:10:06 2017 +0800 net: dwc-xlgmac: add the initial ethtool support It is necessary to provide ethtool support for displaying and modifying parameters of dwc-xlgmac. Signed-off-by: Jie Deng Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/Makefile | 3 +- drivers/net/ethernet/synopsys/dwc-xlgmac-common.c | 1 + drivers/net/ethernet/synopsys/dwc-xlgmac-ethtool.c | 275 +++++++++++++++++++++ drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c | 4 +- drivers/net/ethernet/synopsys/dwc-xlgmac-net.c | 22 +- drivers/net/ethernet/synopsys/dwc-xlgmac.h | 11 + 6 files changed, 312 insertions(+), 4 deletions(-) commit 332518706195007f9fbafa69652aa5b3cf72df24 Author: Radim Krčmář Date: Thu Apr 13 18:39:18 2017 +0200 KVM: nVMX: fix AD condition when handling EPT violation I have introduced this bug when applying and simplifying Paolo's patch as we agreed on the list. The original was "x &= ~y; if (z) x |= y;". Here is the story of a bad workflow: A maintainer was already testing with the intended change, but it was applied only to a testing repo on a different machine. When the time to push tested patches to kvm/next came, he realized that this change was missing and quickly added it to the maintenance repo, didn't test again (because the change is trivial, right), and pushed the world to fire. Fixes: ae1e2d1082ae ("kvm: nVMX: support EPT accessed/dirty bits") Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 019aa56b7df8a796b2c01a56269a370ad3442ec7 Author: Rob Herring Date: Thu Apr 13 10:03:53 2017 -0500 arm64: dts: hikey: add WL1835 Bluetooth device node This adds the serial slave device for the WL1835 Bluetooth interface. Signed-off-by: Rob Herring Cc: Wei Xu Cc: Mark Rutland Signed-off-by: Marcel Holtmann arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 371805522f870986144fcd88727a47858e364a2c Author: Rob Herring Date: Thu Apr 13 10:03:52 2017 -0500 bluetooth: hci_uart: add LL protocol serdev driver support Turns out that the LL protocol and the TI-ST are the same thing AFAICT. The TI-ST adds firmware loading, GPIO control, and shared access for NFC, FM radio, etc. For now, we're only implementing what is needed for BT. This mirrors other drivers like BCM and Intel, but uses the new serdev bus. The firmware loading is greatly simplified by using existing infrastructure to send commands. It may be a bit slower than the original code using synchronous functions, but the real bottleneck is likely doing firmware load at 115.2kbps. Signed-off-by: Rob Herring Cc: Marcel Holtmann Cc: Gustavo Padovan Cc: Johan Hedberg Cc: linux-bluetooth@vger.kernel.org Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ll.c | 262 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 261 insertions(+), 1 deletion(-) commit 31927e5a52847761c1f2797a7ea53b6a75bdc518 Author: Rob Herring Date: Thu Apr 13 10:03:51 2017 -0500 bluetooth: hci_uart: remove unused hci_uart_init_tty There are no users of hci_uart_init_tty, so remove it. Signed-off-by: Rob Herring Cc: Marcel Holtmann Cc: Gustavo Padovan Cc: Johan Hedberg Cc: linux-bluetooth@vger.kernel.org Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ldisc.c | 19 ------------------- drivers/bluetooth/hci_uart.h | 1 - 2 files changed, 20 deletions(-) commit f0c660e04f6167e8f229055d3e872d5ca0edeb9f Author: Rob Herring Date: Thu Apr 13 10:03:50 2017 -0500 dt-bindings: net: Add TI WiLink shared transport binding Add serial slave device binding for the TI WiLink series of Bluetooth/FM/GPS devices. Signed-off-by: Rob Herring Cc: Mark Rutland Cc: netdev@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Marcel Holtmann .../devicetree/bindings/net/ti,wilink-st.txt | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 7ed14d973f7c6742f4827fbbf6730cbe20888b8b Author: Gao Feng Date: Wed Apr 12 12:34:03 2017 +0800 net: ipv4: Refine the ipv4_default_advmss 1. Don't get the metric RTAX_ADVMSS of dst. There are two reasons. 1) Its caller dst_metric_advmss has already invoke dst_metric_advmss before invoke default_advmss. 2) The ipv4_default_advmss is used to get the default mss, it should not try to get the metric like ip6_default_advmss. 2. Use sizeof(tcphdr)+sizeof(iphdr) instead of literal 40. 3. Define one new macro IPV4_MAX_PMTU instead of 65535 according to RFC 2675, section 5.1. Signed-off-by: Gao Feng Signed-off-by: David S. Miller include/net/ip.h | 2 ++ net/ipv4/route.c | 12 ++++-------- 2 files changed, 6 insertions(+), 8 deletions(-) commit 29b904a0dd925bf2e3bcb45e478f21138b5efe3f Merge: b6518e6 27b3b55 Author: David S. Miller Date: Thu Apr 13 13:16:35 2017 -0400 Merge branch 'rtnetlink-cleanup-user-notifications' David Ahern says: ==================== rtnetlink: Cleanup user notifications for netdev events Vlad's recent patch to add the event type to rtnetlink notifications points out a number of redundant or unnecessary notifications sent to userspace for events that are essentially internal to the kernel. Trim the list to put a dent in the notification storm. v2 - rebased to top of net-next with IFLA_EVENT patch reverted - dropped removal NETDEV_CHANGEINFODATA since it is intentionally only to send a message to userspace - dropped NOTIFY_PEERS since Vlad's says it is needed for macvlans - add patches to remove NETDEV_CHANGEUPPER and NETDEV_CHANGE_TX_QUEUE_LEN from the event list ==================== Signed-off-by: David S. Miller commit 27b3b551d8a7af98423b4a2b0d033013c08d812c Author: David Ahern Date: Tue Apr 11 17:02:47 2017 -0700 rtnetlink: Do not generate notifications for NETDEV_CHANGE_TX_QUEUE_LEN event Changing tx queue length generates identical messages: [LINK]22: dummy1: mtu 1500 qdisc noqueue state UNKNOWN group default link/ether 02:04:f4:b7:5c:d2 brd ff:ff:ff:ff:ff:ff promiscuity 0 dummy numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 [LINK]22: dummy1: mtu 1500 qdisc noqueue state UNKNOWN group default link/ether 02:04:f4:b7:5c:d2 brd ff:ff:ff:ff:ff:ff promiscuity 0 dummy numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 Remove NETDEV_CHANGE_TX_QUEUE_LEN from the list of notifiers that generate notifications. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 1 - 1 file changed, 1 deletion(-) commit b6b36eb23a46bd927ffc9d9a3c911965c1be7c36 Author: David Ahern Date: Tue Apr 11 17:02:46 2017 -0700 rtnetlink: Do not generate notifications for NETDEV_CHANGEUPPER event NETDEV_CHANGEUPPER is an internal event; do not generate userspace notifications. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 1 - 1 file changed, 1 deletion(-) commit aed073590970137c5937f10c1dff5379d30083a3 Author: David Ahern Date: Tue Apr 11 17:02:45 2017 -0700 rtnetlink: Do not generate notifications for CHANGELOWERSTATE event CHANGELOWERSTATE is an internal event; do not generate userspace notifications. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 1 - 1 file changed, 1 deletion(-) commit bf2c2984d3f4d22b8617df1b0103bab9b7970902 Author: David Ahern Date: Tue Apr 11 17:02:44 2017 -0700 rtnetlink: Do not generate notifications for PRECHANGEUPPER event PRECHANGEUPPER is an internal event; do not generate userspace notifications. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 1 - 1 file changed, 1 deletion(-) commit aef091ae58aab340afb6f4d6a835037e66fa56a1 Author: David Ahern Date: Tue Apr 11 17:02:43 2017 -0700 rtnetlink: Do not generate notifications for POST_TYPE_CHANGE event Changing the master device for a link generates many messages; the one generated for POST_TYPE_CHANGE is redundant: [LINK]11: dummy1: mtu 1500 qdisc noqueue master br1 state UNKNOWN group default link/ether 02:02:02:02:02:03 brd ff:ff:ff:ff:ff:ff [LINK]11: dummy1: mtu 1500 qdisc noqueue master br1 state UNKNOWN group default link/ether 02:02:02:02:02:03 brd ff:ff:ff:ff:ff:ff Remove POST_TYPE_CHANGE from the list of notifiers that generate notifications. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 1 - 1 file changed, 1 deletion(-) commit cd8966e75ed3c6b41a37047a904617bc44fa481f Author: David Ahern Date: Tue Apr 11 17:02:42 2017 -0700 rtnetlink: Do not generate notifications for CHANGEADDR event Changing hardware address generates redundant messages: [LINK]11: dummy1: mtu 1500 qdisc noqueue state UNKNOWN group default link/ether 02:02:02:02:02:02 brd ff:ff:ff:ff:ff:ff [LINK]11: dummy1: mtu 1500 qdisc noqueue state UNKNOWN group default link/ether 02:02:02:02:02:02 brd ff:ff:ff:ff:ff:ff Do not send a notification for the CHANGEADDR notifier. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 1 - 1 file changed, 1 deletion(-) commit 46ede612c7a3e1558c98345b611baf636d3ea65f Author: David Ahern Date: Tue Apr 11 17:02:41 2017 -0700 rtnetlink: Do not generate notification for UDP_TUNNEL_PUSH_INFO NETDEV_UDP_TUNNEL_PUSH_INFO is an internal notifier; nothing userspace can do so don't generate a netlink notification. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 1 - 1 file changed, 1 deletion(-) commit 085e1a65f04fb05941de0a071c8d70246cd03178 Author: David Ahern Date: Tue Apr 11 17:02:40 2017 -0700 rtnetlink: Do not generate notifications for MTU events Changing MTU on a link currently causes 3 messages to be sent to userspace: [LINK]11: dummy1: mtu 1490 qdisc noqueue state UNKNOWN group default link/ether f2:52:5c:6d:21:f3 brd ff:ff:ff:ff:ff:ff [LINK]11: dummy1: mtu 1500 qdisc noqueue state UNKNOWN group default link/ether f2:52:5c:6d:21:f3 brd ff:ff:ff:ff:ff:ff [LINK]11: dummy1: mtu 1500 qdisc noqueue state UNKNOWN group default link/ether f2:52:5c:6d:21:f3 brd ff:ff:ff:ff:ff:ff Remove the messages sent for PRE_CHANGE_MTU and CHANGE_MTU netdev events. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 2 -- 1 file changed, 2 deletions(-) commit 5c495d6201fb0efafcf6e26b3c82a7bd01ec1b69 Author: Michał Kępień Date: Wed Apr 5 08:49:10 2017 +0200 platform/x86: fujitsu-laptop: remove redundant fields from struct fujitsu_bl The dev field of struct fujitsu_bl is assigned in acpi_fujitsu_bl_add(), but never used afterwards. brightness_changed is set in get_lcd_level() and then its value is only printed in a debug message, so it does not influence execution flow. Remove both fields as they are redundant. Update the aforementioned debug message. Adjust whitespace to make checkpatch happy. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 5959ddd02be4e435da866ee065187f5c8bccea28 Author: Michał Kępień Date: Wed Apr 5 08:49:09 2017 +0200 platform/x86: fujitsu-laptop: account for backlight power when determining brightness The comment for the get_brightness backlight device callback in include/linux/backlight.h states that it should "return the current backlight brightness (accounting for power, fb_blank etc.)". fujitsu-laptop violates that premise by simply returning the value to which ACPI function GBLL evaluates to. Make sure 0 is returned when backlight power is turned off. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d75a4a972ad1ed6d1326c63ae2fb0f9586161b4d Author: Michał Kępień Date: Wed Apr 5 08:49:08 2017 +0200 platform/x86: fujitsu-laptop: do not log set_lcd_level() failures in bl_update_status() Any set_lcd_level() call can fail for one of two reasons: either requested brightness is outside the allowed range or the ACPI method used for setting brightness level is not available. For bl_update_status(), the first case is handled by backlight core, which means bl_update_status() will not even be called if requested brightness is outside the allowed range. The second case will be logged anyway by set_lcd_level() itself, so there is no point in generating another message in bl_update_status(). Remove the superfluous debug message along with a local variable that is now redundant. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit f7c4c3fad5937bef41696d39422fb7773accf912 Author: Michał Kępień Date: Wed Apr 5 08:49:07 2017 +0200 platform/x86: fujitsu-laptop: ignore errors when setting backlight power Not all Fujitsu laptops support controlling backlight power through the FUJ02E3 ACPI device. Remove the debug message informing about a failed attempt to set backlight power as it may be confusing and the return value of call_fext_func() is logged anyway. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit b4bb0cfdb00e97f8a4804dc93777a65869084078 Author: Michał Kępień Date: Wed Apr 5 08:49:06 2017 +0200 platform/x86: fujitsu-laptop: make disable_brightness_adjust a boolean Due to the way the disable_brightness_adjust module parameter is currently handled in acpi_fujitsu_bl_add(), it can only be set to either 0 or 1, which effectively makes it a boolean. Emphasize that by changing module parameter type to bool. Do not announce parameter value in a debug message as it can be dynamically changed via sysfs and its current value can also be read from there. Clean up module parameter description. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit e06e4831d51decc23419b6c3d045f9c8c876da7d Author: Michał Kępień Date: Wed Apr 5 08:49:05 2017 +0200 platform/x86: fujitsu-laptop: clean up use_alt_lcd_levels handling The value of each module parameter can be changed on the fly via sysfs. However, the current way of handling use_alt_lcd_levels prevents the user from dynamically switching from a value of 0 or 1 back to autodetection as the latter is only performed upon ACPI device instantiation. Fix this by moving autodetection (in a simplified form) to set_lcd_level() and changing module parameter type to int. Do not announce autodetection results in a debug message as current value of use_alt_lcd_levels can simply be read from sysfs. Clarify module parameter description. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit bd079a2cc5afe3d980f054a72bc08dbbe17c216c Author: Michał Kępień Date: Wed Apr 5 08:49:04 2017 +0200 platform/x86: fujitsu-laptop: sync brightness in set_lcd_level() When using brightness keys and backlight device's sysfs interface alternately, an incorrect input event might be generated for a brightness key press. Consider the following sequence of events: 1. Set backlight brightness to 6 using brightness keys. 2. Write 4 to /sys/class/backlight/fujitsu-laptop/brightness. 3. Press the "brightness up" key. The input event generated in this scenario would be KEY_BRIGHTNESSDOWN, because before step 3 brightness_level would still be at 6. As the new brightness level is established using GBLL, it would evaluate to 5 (SBLL/SBL2 sets it to 4 in step 2 and pressing the "brightness up" key increases it by 1). This in turn would cause acpi_fujitsu_bl_notify() to observe a 6 -> 5 change, i.e. a decrease in brightness, while screen brightness would in fact be increased. Fix this by updating brightness_level in set_lcd_level. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 2 ++ 1 file changed, 2 insertions(+) commit a8779c35b6b4a68489037d804df91c8d2b136218 Author: Michał Kępień Date: Wed Apr 5 08:49:03 2017 +0200 platform/x86: fujitsu-laptop: simplify set_lcd_level() acpi_execute_simple_method() takes a method parameter which tells it to look for the given method underneath the given handle, so calling acpi_get_handle() beforehand is redundant. Replace the call to acpi_get_handle() with a call to acpi_execute_simple_method(), thus eliminating the need for a local variable storing the handle. Update debug message to reflect this change. Also do not assign a default value to status as it has no influence on execution flow. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit e32c50ba5ae9f2b817e72aa8609ec25ab29b20dd Author: Michał Kępień Date: Wed Apr 5 08:49:02 2017 +0200 platform/x86: fujitsu-laptop: merge set_lcd_level_alt() into set_lcd_level() Depending on the value of the use_alt_lcd_levels module parameter, one of two functions is used for setting LCD brightness level. These functions are almost identical and only differ in the name of the ACPI method they call. Instead of checking the value of use_alt_lcd_levels at each call site, move that check to set_lcd_level() and get rid of set_lcd_level_alt(). Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 54 +++++++++++------------------------ 1 file changed, 16 insertions(+), 38 deletions(-) commit a1aabd5f3609dfa460050402c677620312bc2876 Author: Michał Kępień Date: Wed Apr 5 08:49:01 2017 +0200 platform/x86: fujitsu-laptop: switch to a managed backlight device Use a managed backlight device to get rid of acpi_fujitsu_bl_remove(). Change the parent of the backlight device from NULL to the FUJ02B1 ACPI device as the latter is required for the backlight device to work. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) commit 07acf62a40f2410a00ed058db225c8f959ff8695 Author: Michał Kępień Date: Wed Apr 5 08:49:00 2017 +0200 platform/x86: fujitsu-laptop: only handle backlight when appropriate The backlight part of fujitsu-laptop is only used by laptops which are incapable of using the standard ACPI video interface for handling brightness changes. Conversely, on laptops which are capable of using the latter, no vendor-specific ACPI calls should be made unless explicitly requested by the user. Bail out immediately from acpi_fujitsu_bl_add() unless using the vendor-specific interface was either explicitly requested by the user or automatically selected by the kernel. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 09b29e1eda78d81218cf2304495c551d7714e0b0 Author: Michał Kępień Date: Thu Apr 6 08:46:10 2017 +0200 platform/x86: fujitsu-laptop: update debug message logged by call_fext_func() Update debug message logged when the acpi_evaluate_integer() call inside call_fext_func() fails so that it covers a broader set of possible errors. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d27a7e299daaf5d984cd671db99424660895586d Author: Andy Shevchenko Date: Wed Apr 5 19:05:28 2017 +0300 platform/x86: intel_scu_ipc: Introduce intel_scu_ipc_raw_command() A new call to SCU intel_scu_ipc_raw_command() writes SPTR and DPTR registers before sending a command. Signed-off-by: Andy Shevchenko arch/x86/include/asm/intel_scu_ipc.h | 8 ++++- drivers/platform/x86/intel_scu_ipc.c | 63 ++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) commit 74bc77a3db0f68609c4c7641e010fd85e4c77a36 Author: Andy Shevchenko Date: Wed Apr 5 19:05:27 2017 +0300 platform/x86: intel_scu_ipc: Introduce SCU_DEVICE() macro For better maintainability and readability introduce a macro for device ID table. No functional change intended. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_scu_ipc.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) commit 07ac1af3fc3e11f5b0948597aaad78d30c45a289 Author: Andy Shevchenko Date: Wed Apr 5 19:05:26 2017 +0300 platform/x86: intel_scu_ipc: Remove redundant subarch check The driver is bound to the devices based on their PCI IDs. There is no need to do an additional check. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_scu_ipc.c | 5 ----- 1 file changed, 5 deletions(-) commit 822e423e62d0f07574e3aaaa7e2c15ffab7815cc Author: Andy Shevchenko Date: Wed Apr 5 19:05:25 2017 +0300 platform/x86: intel_scu_ipc: Rearrange init sequence Device pointer is used as a flag that everything is prepared. Nevertheless the assignment happened quite before and there is a window when a caller can get weird results or even crashes since not all fields are initialized yet. Rearrange initialization sequence in ->probe() to prepare everything before use. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_scu_ipc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit ac207ded45f52b2a122eb947f3e1ab908c4a7ce8 Author: Andy Shevchenko Date: Wed Apr 5 19:05:24 2017 +0300 platform/x86: intel_scu_ipc: Platform data is mandatory Fail ->probe() if there is no platform data supplied. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_scu_ipc.c | 2 ++ 1 file changed, 2 insertions(+) commit f22265b61585c18c4aaa37e0bcc7f72a6db7a715 Author: Dmitry Torokhov Date: Mon Apr 3 20:25:14 2017 -0700 platform/x86: silead_dmi - abort early if DMI does not match There is no point in registering I2C bus notifier if DMI data does not match. Signed-off-by: Dmitry Torokhov Reviewed-by: Hans de Goede [andy: updated due to previous patch changed] Signed-off-by: Andy Shevchenko drivers/platform/x86/silead_dmi.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit e1053963984318f67c60c629664c5f09b93cc1c4 Author: Dmitry Torokhov Date: Mon Apr 3 20:25:13 2017 -0700 platform/x86: silead_dmi - do not treat all devices as i2c_clients I2C bus has both i2c clients and adapter devices, so we must be careful in notifier code and verify that we are actually dealing with an i2c client before using it as such. Fixes: cef9dd85acd7 ("platform/x86: add support for devices with Silead...") Signed-off-by: Dmitry Torokhov Reviewed-by: Hans de Goede [andy: simplified silead_ts_dmi_add_props() change] Signed-off-by: Andy Shevchenko drivers/platform/x86/silead_dmi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit f35823619db8bbaa2afea8705f239c3cecb9d22f Author: Santeri Toivonen Date: Tue Apr 4 21:09:00 2017 +0300 platform/x86: asus-nb-wmi: Add wapf4 quirk for the X302UA Asus laptop X302UA starts up with Wi-Fi disabled, without a way to enable it. Set wapf=4 to fix the problem. Signed-off-by: Santeri Toivonen Signed-off-by: Darren Hart (VMware) drivers/platform/x86/asus-nb-wmi.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f68e492c068872b7174a7fdde27f9119ba04aee5 Author: Michał Kępień Date: Mon Apr 3 11:38:59 2017 +0200 platform/x86: fujitsu-laptop: rename call_fext_func() arguments Rename call_fext_func() arguments so that each argument's name signifies its role: - cmd -> func: sub-function to call (flags, buttons etc.), - arg0 -> op: operation to perform (get, set, get capabilities etc.), - arg1 -> feature: feature to act on (e.g. which LED), if relevant, - arg2 -> state: state to set (e.g. LED on or off), if relevant. Adjust whitespace to make checkpatch happy. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 17e23555616116e1668e83029d26354c2479c78b Author: Michał Kępień Date: Mon Apr 3 11:38:58 2017 +0200 platform/x86: fujitsu-laptop: simplify call_fext_func() acpi_evaluate_integer() takes a pathname parameter which contains the name of the entity to evaluate underneath the given handle, so calling acpi_get_handle() beforehand is redundant. Replace the call to acpi_get_handle() with a call to acpi_evaluate_integer(), thus eliminating the need for a local variable storing the handle. Adjust whitespace to make checkpatch happy. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit b10664105df0d26d1150f90ac508be0125fe5b42 Author: Michał Kępień Date: Mon Apr 3 11:38:57 2017 +0200 platform/x86: fujitsu-laptop: clean up local variables in call_fext_func() Set values of FUNC call parameters in a designated initializer. Do not initialize status and handle variables as the values these are initialized to have no influence on execution flow. Use an array variable instead of the address of the first element of that array. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 1cf034ccf93852c299288415e4105043d02227d0 Author: Michał Kępień Date: Mon Mar 20 10:32:24 2017 +0100 platform/x86: fujitsu-laptop: remove keycode fields from struct fujitsu_bl Remove the keycode[1-5] fields from struct fujitsu_bl as they are not needed any more as a result of the sparse keymap migration. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 6 ------ 1 file changed, 6 deletions(-) commit f8c94ecd8f6adf241f7cbfdc3e004e94b0238fc8 Author: Michał Kępień Date: Mon Mar 20 10:32:23 2017 +0100 platform/x86: fujitsu-laptop: model-dependent sparse keymap overrides Some laptop models need to have different keycodes assigned to hotkey scancodes. Change the sparse keymap upon a DMI match, before the hotkey input device is setup. Instead of using three different callbacks in the DMI match table, simplify code by using the driver_data field of struct dmi_system_id to supply the requested keymap to a common callback. Also merge keymaps for S6410 and S6420 as they are identical. Rename fujitsu_dmi_table to fujitsu_laptop_dmi_table to emphasize it is no longer used by the backlight part of fujitsu-laptop. Adjust whitespace to make checkpatch happy. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 111 +++++++++++++++++----------------- 1 file changed, 55 insertions(+), 56 deletions(-) commit 527483a8e1cf6c78b4e15545d57013d9a958482a Author: Michał Kępień Date: Mon Mar 20 10:32:22 2017 +0100 platform/x86: fujitsu-laptop: use a sparse keymap for hotkey event generation Simplify hotkey event generation by using a sparse keymap. As sparse keymap operates on scancodes instead of keycodes, adjust variable names and debug messages accordingly. This patch only handles the default keymap for clarity. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe [dvhart: correct flag passed to call_fext_func in acpi_fujitsu_laptop_notify] Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 111 +++++++++++++--------------------- 1 file changed, 41 insertions(+), 70 deletions(-) commit f66735f8f8fb8d18e41288a74e73dc5e354331c9 Author: Michał Kępień Date: Mon Mar 20 10:32:21 2017 +0100 platform/x86: fujitsu-laptop: switch to a managed hotkey input device Use a managed input device for hotkey events in order to simplify two error paths and one cleanup function while also reducing the number of local variables required. Remove double assignment to make checkpatch happy. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 55 ++++++++++++----------------------- 1 file changed, 19 insertions(+), 36 deletions(-) commit 11182dbca5cd5270efac5af610c9f483cbc233da Author: Michał Kępień Date: Mon Mar 20 10:32:20 2017 +0100 platform/x86: fujitsu-laptop: refactor hotkey input device setup Simplify error handling in acpi_fujitsu_laptop_add() by moving code responsible for setting up the input device to a separate function. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 74 ++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 31 deletions(-) commit f22526723775f4de1b37335a63b80fb2b00ba4ef Author: Michał Kępień Date: Mon Mar 20 10:32:19 2017 +0100 platform/x86: fujitsu-laptop: use a sparse keymap for brightness key events Simplify brightness key event generation by using a sparse keymap. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/Kconfig | 1 + drivers/platform/x86/fujitsu-laptop.c | 31 +++++++++++++++---------------- 2 files changed, 16 insertions(+), 16 deletions(-) commit f8a399dcfae913e773cbef6a940755953cdd70a3 Author: Michał Kępień Date: Mon Mar 20 10:32:18 2017 +0100 platform/x86: fujitsu-laptop: switch to a managed backlight input device Use a managed input device for brightness events in order to simplify two error paths and one cleanup function while also reducing the number of local variables required. Remove double assignment to make checkpatch happy. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 47 +++++++++++------------------------ 1 file changed, 14 insertions(+), 33 deletions(-) commit 7d134e43a2ac729888bb752f8dba5f8bbb5c938a Author: Michał Kępień Date: Mon Mar 20 10:32:17 2017 +0100 platform/x86: fujitsu-laptop: refactor backlight input device setup Simplify error handling in acpi_fujitsu_bl_add() by moving code responsible for setting up the input device to a separate function. Signed-off-by: Michał Kępień Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 64 +++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 26 deletions(-) commit 674b5d58366e3f319520a89785c292a60aacb702 Merge: 6b8e7d8 ab76838 Author: Darren Hart Date: Wed Mar 29 12:19:42 2017 -0700 Merge branch 'linux-leds/dell-laptop-changes-for-4.12' Merge branch 'dell-laptop-changes-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git to avoid linux-next merge conflict with dell-laptop.c. Signed-off-by: Darren Hart (VMware) commit 6b8e7d8f6881109dedfcf721d72f6bc822f4c580 Author: Hans de Goede Date: Wed Mar 22 16:55:54 2017 +0100 platform/x86: silead_dmi: Add entry for Insyde 7W tablets Add an entry providing the necessary info to make the touchscreen work on various tablets based on the Insyde 7W whitebox tablet. This has been tested on a DEXP Ursus 7W tablet. Signed-off-by: Hans de Goede Signed-off-by: Darren Hart (VMware) drivers/platform/x86/silead_dmi.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit ae3111585e750403003e876eecd88d5db882940f Author: Hans de Goede Date: Wed Mar 22 16:55:53 2017 +0100 platform/x86: silead_dmi: Constify properties arrays Now that device_add_properties takes a const property_entry * rather then a non-const one we can constify the properties arrays. Signed-off-by: Hans de Goede Signed-off-by: Darren Hart (VMware) drivers/platform/x86/silead_dmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9c656b07997f518ab407dd990aaf55f358337bd6 Author: Hans de Goede Date: Thu Mar 16 11:55:35 2017 +0100 platform/x86: dell-*: Call new led hw_changed API on kbd brightness change Make dell-wmi notify on hotkey kbd brightness changes, listen for this in dell-laptop and call led_classdev_notify_brightness_hw_changed. This will allow userspace to monitor (poll) for brightness changes on these LEDs caused by the hotkey. Signed-off-by: Hans de Goede Acked-by: Pali Rohár Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-laptop.c | 32 +++++++++++++++++++++++++++++++- drivers/platform/x86/dell-wmi.c | 4 ++++ 2 files changed, 35 insertions(+), 1 deletion(-) commit e5bf5df7858e2339d277427129139995628c49a7 Author: Hans de Goede Date: Thu Mar 16 11:55:34 2017 +0100 platform/x86: dell-laptop: Protect kbd_state against races The kbd led code has multiple entry points each of which modifies the kbd_state by reading it, modifying a copy, writing the copy and on error setting the modified copy writing back the original state. This is racy, so add a mutex protection the read-modify-write cycle on each of the entry points. Signed-off-by: Hans de Goede Reviewed-by: Pali Rohár Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-laptop.c | 112 +++++++++++++++++++++++++------------ 1 file changed, 76 insertions(+), 36 deletions(-) commit 1c7e28246e986a789a55f52ff681bf8d5d1dcada Author: Hans de Goede Date: Thu Mar 16 11:55:33 2017 +0100 platform/x86: dell-laptop: Refactor kbd_led_triggers_store() Return -EINVAL immediately on invalid input, rather then doing the straight path in an if block and returning -EINVAL at the end of the function. Signed-off-by: Hans de Goede Reviewed-by: Pali Rohár Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-laptop.c | 63 +++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 31 deletions(-) commit 504b02593fc5c24575d7d50d1b388b5ecf9354ee Author: Hans de Goede Date: Thu Mar 16 11:55:32 2017 +0100 platform/x86: dell-*: Add a generic dell-laptop notifier chain There are several cases where events handled in one of the dell-* drivers need to be propagated to another dell-* driver. This commit adds 3 generic functions: dell_laptop_register_notifier() dell_laptop_unregister_notifier() dell_laptop_call_notifier() It currently only defines 1 action: DELL_LAPTOP_KBD_BACKLIGHT_BRIGHTNESS_CHANGED Which is intended to propagate kbd_backlight_brightness_changed wmi events from dell-wmi to dell-laptop (which contains the actual kbd backlight driver). These functions are put in dell-smbios as both dell-wmi and dell-laptop use smbios functions and I do not want to put the notifier head in either driver, as that will make the 2 drivers depend on each other. Signed-off-by: Hans de Goede Acked-by: Pali Rohár Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-smbios.c | 20 ++++++++++++++++++++ drivers/platform/x86/dell-smbios.h | 11 +++++++++++ 2 files changed, 31 insertions(+) commit b6518e6a0086fc152f9a35ac5062930788f8b4bc Author: David Daney Date: Tue Apr 11 14:30:52 2017 -0700 tools: bpf_jit_disasm: Add option to dump JIT image to a file. When debugging the JIT on an embedded platform or cross build environment, libbfd may not be available, making it impossible to run bpf_jit_disasm natively. Add an option to emit a binary image of the JIT code to a file. This file can then be disassembled off line. Typical usage in this case might be (pasting mips64 dmesg output to cat command): $ cat > jit.raw $ bpf_jit_disasm -f jit.raw -O jit.bin $ mips64-linux-gnu-objdump -D -b binary -m mips:isa64r2 -EB jit.bin Signed-off-by: David Daney Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/net/bpf_jit_disasm.c | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) commit fe6af0e1229e2d22a798fb7375ff0e58670073d3 Author: Niklas Cassel Date: Mon Apr 10 20:33:29 2017 +0200 net: stmmac: set total length of the packet to be transmitted in TDES3 Field FL/TPL in register TDES3 is not correctly set on GMAC4. TX appears to be functional on GMAC 4.10a even if this field is not set, however, to avoid relying on undefined behavior, set the length in TDES3. The field has a different meaning depending on if the TSE bit in TDES3 is set or not (TSO). However, regardless of the TSE bit, the field is not optional. The field is already set correctly when the TSE bit is set. Since there is no limit for the number of descriptors that can be used for a single packet, the field should be set to the sum of the buffers contained in: [ ... ... ], which should be equal to skb->len. Signed-off-by: Niklas Cassel Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/chain_mode.c | 6 +++--- drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 3 ++- drivers/net/ethernet/stmicro/stmmac/enh_desc.c | 2 +- drivers/net/ethernet/stmicro/stmmac/norm_desc.c | 2 +- drivers/net/ethernet/stmicro/stmmac/ring_mode.c | 9 ++++++--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +++-- 7 files changed, 17 insertions(+), 12 deletions(-) commit 6b254afd2ef384b21aeaf166ddc957fe1083a7e2 Author: Ganesh Goudar Date: Mon Apr 10 21:26:18 2017 +0530 cxgb4: save tid while creating server filter Save the filter tid while creating the server filter, which is used later to retrieve the corresponding filter instance while handling the filter reply. Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 97512ceafaacf8cdb96d6a36ae55e8335c0a9e55 Merge: 45ce1d2 46fa8bc Author: Thierry Reding Date: Thu Apr 13 17:41:50 2017 +0200 Merge branch 'for-4.12/drivers' into for-next commit 45ce1d23fa4db5ab6e2ba00e886f5154556666b8 Merge: c1ae3cf a900152 Author: Thierry Reding Date: Thu Apr 13 17:41:49 2017 +0200 Merge branch 'for-4.11/fixes' into for-next commit 46fa8bc08744c373d405a87430e0b3e13ae94b4c Author: Laxman Dewangan Date: Thu Apr 13 19:40:27 2017 +0530 pwm: tegra: Read PWM clock source rate in driver init It is required to know the PWM clock source frequency to calculate the PWM period. In driver, the clock source frequency of the PWM does not get change and, hence, get the clock source frequency in driver init. Get this values later for period calculation from pwm_config(). This will help in avoiding the clock call for getting clock rate in the pwm_config() each time. Signed-off-by: Laxman Dewangan Signed-off-by: Thierry Reding drivers/pwm/pwm-tegra.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c40c461e1944b9cfb520e04184ec1e5c80fb210b Author: Sven Van Asbroeck Date: Thu Apr 13 08:58:11 2017 -0400 pwm: pca9685: Fix GPIO-only operation GPIO-only driver operation never clears the SLEEP bit, which can cause the GPIOs to become unusable. Example: 1. user requests first PWM -> driver clears SLEEP bit 2. user frees last PWM -> driver sets SLEEP bit 3. user requests GPIO 4. user switches GPIO on -> output does not turn on because SLEEP bit is set Prevent this behaviour by letting the runtime PM framework control the SLEEP bit. This will put the chip to SLEEP if no PWMs/GPIOs are exported or in use. Fixes: bccec89f0a35 ("Allow any of the 16 PWMs to be used as a GPIO") Reported-by: Sven Van Asbroeck Signed-off-by: Sven Van Asbroeck Suggested-by: Mika Westerberg Reviewed-by: Mika Westerberg Signed-off-by: Thierry Reding drivers/pwm/pwm-pca9685.c | 112 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 79 insertions(+), 33 deletions(-) commit 6db249db5ed9c09e396ed77811853cbd63415f0a Author: kbuild test robot Date: Thu Apr 13 04:54:42 2017 +0800 pwm: mediatek: Don't explicitly set .owner drivers/pwm/pwm-mediatek.c:210:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: John Crispin Signed-off-by: Fengguang Wu Signed-off-by: Thierry Reding drivers/pwm/pwm-mediatek.c | 1 - 1 file changed, 1 deletion(-) commit 6db78b201b3fa3611b9557f0d677cd4560358f9d Author: Thierry Reding Date: Wed Apr 12 18:29:23 2017 +0200 pwm: tegra: Avoid potential overflow for short periods For very short periods, the result of the division might overflow the unsigned long hz variable (on 32-bit architectures). Avoid that by making it an unsigned long long. While at it, also remove an unneeded local variable whose only purpose is to store a temporary computation. Acked-by: Laxman Dewangan Signed-off-by: Thierry Reding drivers/pwm/pwm-tegra.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 19ec50839d2574430cba6cb76ac3e8c5a1094d2a Merge: d92be7a 96cb434 Author: David S. Miller Date: Thu Apr 13 10:59:12 2017 -0400 Merge branch 'mvmdio-updates' Russell King says: ==================== mvmdio updates This series of patches update mvmdio for Armada 8k CP110. A number of issues were found: 1. The driver fails to disable an interrupt when something goes wrong in the probe function. 2. The interrupt is specified in DT to be optional, but the driver unconditionally writes to the interrupt mask register, which may not exist. 3. The DT binding specifies "reg: address and length of the SMI register" however, when supporting the interrupt, the size must cover the interrupt register as well. Update the binding documentation with this information that was previously omitted. 4. If the register size is too small, have the driver print an error and disable use of the interrupt. 5. Armada 8k needs three clocks for the MDIO interface, otherwise the SoC hangs (since it is part of one of the ethernet interfaces.) GOP clock, MG core clock and MG clock are needed on 8k. Augment the binding and driver to allow three clocks to be specified. ==================== Signed-off-by: David S. Miller commit 96cb4342382290c935d933a08feb57d6d0183071 Author: Russell King Date: Mon Apr 10 16:28:31 2017 +0100 net: mvmdio: allow up to three clocks to be specified for orion-mdio Allow up to three clocks to be specified and enabled for the orion-mdio interface, which are required for this interface to be accessible on Armada 8k platforms. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) commit 6d6a331f44a18accbff5f693d03f2842b0e8c581 Author: Russell King Date: Mon Apr 10 16:28:25 2017 +0100 dt-bindings: allow up to three clocks for orion-mdio Armada 8040 needs three clocks to be enabled for MDIO accesses to work. Update the binding to allow the extra clocks to be specified. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/marvell-orion-mdio.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a51e2c9da44acad7494ac3f57c48f296890cbe2a Author: Russell King Date: Mon Apr 10 16:28:20 2017 +0100 net: mvmdio: disable interrupt if resource size is too small Disable the MDIO interrupt, falling back to polled mode, if the resource size does not allow us to access the interrupt registers. All current DT bindings use a size of 0x84, which allows access, but verifying it is good practice. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2c26122e2c8d9b76b98995a7bd9f13a79dacfabe Author: Russell King Date: Mon Apr 10 16:28:15 2017 +0100 dt-bindings: correct marvell orion MDIO binding document Correct the Marvell Orion MDIO binding document to properly reflect the cases where an interrupt is present. Augment the examples to show this. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller .../devicetree/bindings/net/marvell-orion-mdio.txt | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 7093a9702e00274fde609d634010a5833b45b229 Author: Russell King Date: Mon Apr 10 16:28:09 2017 +0100 net: mvmdio: fix interrupt disable in remove path The pre-existing write to disable interrupts on the remove path happens whether we have an interrupt or not. While this may seem to be a good idea, this driver is re-used in many different implementations, some where the binding only specifies four bytes of register space. This access causes us to access registers outside of the binding. Make it conditional on the interrupt being present, which is the same condition used when enabling the interrupt in the first place. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 37282485dd4c95c4a637cfa263a0753216f1ec24 Author: Russell King Date: Mon Apr 10 16:28:04 2017 +0100 net: mvmdio: disable interrupts in driver failure path When the mvmdio driver has an interrupt, it enables the "done" interrupt after requesting its interrupt handler. However, probe failure results in the interrupt being left enabled. Disable it on the failure path. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 2 ++ 1 file changed, 2 insertions(+) commit 16eb81365b70266c17d1141ef9b32c3110b22d17 Author: David Carrillo-Cisneros Date: Tue Apr 11 23:49:19 2017 -0700 Revert "perf tools: Fix include of linux/mman.h" In https://lkml.org/lkml/2017/2/2/16 I reported a build error that I believed was caused by wrong uapi includes. The synthom was fixed by Arnaldo in: commit 2f7db5557994 ("perf tools: Fix include of linux/mman.h") but I was wrong attributing the problem to the uapi include. The root cause was that I was using ARCH=x86_64, hence using the wrong uapi include path. This explains why no one else ran into this build problem. Signed-off-by: David Carrillo-Cisneros Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: He Kuang Cc: Masami Hiramatsu Cc: Paul Turner Cc: Peter Zijlstra Cc: Simon Que Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/20170412064919.92449-8-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 570eda03213a216a88566c0da7bfe175832cfaa4 Author: David Carrillo-Cisneros Date: Tue Apr 11 23:49:16 2017 -0700 perf util: Hint missing file when tool tips fail to load Besides memory allocation failure, tips.txt may fail to load because the file is not found (a more likely cause). Communicate that to the user in tips failure warning. Signed-off-by: David Carrillo-Cisneros Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: He Kuang Cc: Masami Hiramatsu Cc: Paul Turner Cc: Peter Zijlstra Cc: Simon Que Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/20170412064919.92449-5-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9961aa665b70e47d6c80141c4a2482266010f246 Author: David Carrillo-Cisneros Date: Tue Apr 11 23:49:14 2017 -0700 tools build: Fix feature detection redefinion of build flags This change is a follow up of https://lkml.org/lkml/2017/2/2/16 The patch above avoided redefining CC, CXX and PKG_CONFIG in feature detection. The patch was not merged due to a unsolved concern with the -MD flag. Later, commit c8c188679ccf ("tools build: Use the same CC for feature detection and actual build") did the change for CC and CXX but not PKG_CONFIG. This patch makes PKG_CONFIG consistent with CC and CXX and moves the -MD to CFLAGS, as suggested by Jiri in the thread above. Signed-off-by: David Carrillo-Cisneros Cc: Alexander Shishkin Cc: Andi Kleen Cc: He Kuang Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Paul Turner Cc: Peter Zijlstra Cc: Simon Que Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/20170412064919.92449-3-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/build/feature/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e5e992a7c184c2121adf37bdf292a516af81dbbb Author: David Carrillo-Cisneros Date: Wed Apr 12 10:07:45 2017 -0700 perf tools: Disable JVMTI if no ELF support available The build of JVMTI depends on LIBELF (-lelf). Make Makefile.conf check this dependendancy and notify user when not present. v2: Comma nitpicking. Signed-off-by: David Carrillo-Cisneros Tested-by: Kim Phillips Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: He Kuang Cc: Masami Hiramatsu Cc: Paul Turner Cc: Peter Zijlstra Cc: Simon Que Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/20170412170745.26620-1-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1f242a3de702d5a19c479685d35b050837122724 Author: Daniel Golle Date: Mon Apr 10 15:29:45 2017 +0200 rt2x00: reverse external PA capability flag logic Consequently refer to external PA instead of inverting the logic and use an internal PA capability flag which is a bit confusing. Currently this is used for Rt3352 only, but MT7620A also allows for an external PA which will be supported by a follow up patch. Signed-off-by: Daniel Golle Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 40 +++++++++++++------------- drivers/net/wireless/ralink/rt2x00/rt2x00.h | 4 +-- 2 files changed, 22 insertions(+), 22 deletions(-) commit 4da5e7ea135283ca57be96991d5bca96438c99ad Author: Yan-Hsuan Chuang Date: Mon Apr 10 11:23:10 2017 -0500 rtlwifi: btcoex: 21a 1ant: avoid LPS/IPS mismatch for pnp notify When driver is going to sleep, it does not leave LPS/IPS, thus the BTCoex may have mismatch when driver wakes up. To avoid that, BTCoex needs to clear the IPS/LPS state when it receives a pnp notify, then it can properly set up the hw when driver wakes up. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit da0fd9ccb4325bcc95532d15e553bdb355a56e5f Author: Yan-Hsuan Chuang Date: Mon Apr 10 11:23:09 2017 -0500 rtlwifi: btcoex: 21a 1ant: do not switch antenna when wifi is under 5G channel When wifi is on a 5G channel, the 5G signal will not interfere bt 2.4G signal, and they can transmit simultaneously, hence there is no need to switch antenna between wifi and bt. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 64 +++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) commit cb52b118594703db75f6caace7e318aa18a118ba Author: Yan-Hsuan Chuang Date: Mon Apr 10 11:23:08 2017 -0500 rtlwifi: btcoex: 21a 1ant: monitor bt profiling when scan When wifi is scanning and not connected, set the tdma and coex table properly to control the priority of the packets to make the wifi bt coexistence operate smoothly Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 29 ++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) commit ee828085176ed679d1f8ec4c7ca386b73ab2ee51 Author: Yan-Hsuan Chuang Date: Mon Apr 10 11:23:07 2017 -0500 rtlwifi: btcoex: 21a 1ant: consider more cases when bt inquiry With bt inquiry, the wifi may start as a softap or the wifi and bt are busy, we take these scenarios into consider to avoid bt inquiry to degrade the performance of the network Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 75 +++++++++++++++++----- .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.h | 1 + 2 files changed, 60 insertions(+), 16 deletions(-) commit 19afb92222af081597747a2fc51638e36968bf4d Author: Yan-Hsuan Chuang Date: Mon Apr 10 11:23:06 2017 -0500 rtlwifi: btcoex: 21a 1ant: move bt_disabled to global struct Move the bt disable flag to a global structure to indicate that bt is turned off. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 24 ++++++++++------------ .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.h | 1 + 2 files changed, 12 insertions(+), 13 deletions(-) commit bcdffd050c80a72465a8736aacdd614f583a5fb3 Author: Yan-Hsuan Chuang Date: Mon Apr 10 11:23:05 2017 -0500 rtlwifi: btcoex: 21a 1ant: If wifi only, do not initiate coex mechanism If the device has wifi mode only, there is no need to initiate the hardware for wifi and bt coexistence, so just return to avoid it. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit edf8fa7b66f0e7b74806439581b2b5ae72a8b8d3 Author: Yan-Hsuan Chuang Date: Mon Apr 10 11:23:04 2017 -0500 rtlwifi: btcoex: 21a 1ant: action when associating/authenticating When wifi is associating or authenticating, set the coex table for wifi to establish link. These packets should have higher priority. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 33 ++++++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) commit 06a75324d5436b99c3a727d32b964732835e86a1 Author: Yan-Hsuan Chuang Date: Mon Apr 10 11:23:03 2017 -0500 rtlwifi: btcoex: 21a 1ant: add multi port action for miracast and P2P To support miracast and P2P, the chip may operate under concurrent mode, In this situation, do not aggregate tx packet and properly set the rx aggregation size. We detect it by monitoring the number of link established. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit 4f78287e5ed9ca9326b0df7a7dcf048a7d32be67 Author: Yan-Hsuan Chuang Date: Mon Apr 10 11:23:02 2017 -0500 rtlwifi: btcoex: 21a 1ant: set antenna control path for PTA Set antenna control path if PTA is in control of the packet path of wifi and bt. If wifi is turned off, tell the PTA about it. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit e605103c443eaafdb760aecf00d512f8b6d988f0 Author: Yan-Hsuan Chuang Date: Mon Apr 10 11:23:01 2017 -0500 rtlwifi: btcoex: 21a 1ant: remove setting for 2 antennas The antenna position setting is useless for 1 antenna chip. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 6 ------ 1 file changed, 6 deletions(-) commit f0c40cf09dd12e8ebd1a05695d41eacef007076e Author: Yan-Hsuan Chuang Date: Mon Apr 10 11:23:00 2017 -0500 rtlwifi: btcoex: 21a 1ant: mask profile bit for connect-ilde Mask out the connect-idle bit. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3121b4ddd1817b7177c0747835e652ef9b733cd9 Author: Yan-Hsuan Chuang Date: Mon Apr 10 11:22:59 2017 -0500 rtlwifi: btcoex: 21a 1ant: coex table setting for new fw For newer fw, the coex table setting needs to be modified to operate correctly. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 19baccc4561fc7dc18ff79e14bdfa86bd0b34abc Author: Yan-Hsuan Chuang Date: Mon Apr 10 11:22:58 2017 -0500 rtlwifi: btcoex: 21a 1ant: add function to check wifi status This function checks if wifi has changed its statusi. It will be needed in the future. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 1bdd83392f7f7719e99bf8d2c0ead60639ce6f3b Author: Yan-Hsuan Chuang Date: Mon Apr 10 11:22:57 2017 -0500 rtlwifi: btcoex: 21a 1ant: fw settings for softap mode For ap mode, adjust fw settings to operate properly. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 25 ++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit f4a23e194ef370baddf3b3ea74b418fa63f08869 Author: Yan-Hsuan Chuang Date: Thu Apr 6 15:19:58 2017 -0500 rtlwifi: btcoex: 23b 2ant: some hi-prio pkt will cause hid_exist Clear the hid_exist flag by monitoring the packet counter. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 588a290b4642de9996a83d95474528f08ffe882a Author: Yan-Hsuan Chuang Date: Thu Apr 6 15:19:57 2017 -0500 rtlwifi: btcoex: 23b 2ant: notify more bt information These bt information are displayed in display coex Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 20 ++++++++++++++++++++ .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.h | 2 ++ .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 15 +++++++++++++++ 3 files changed, 37 insertions(+) commit 110944027627071cab79c968dbb8dfec3b337b54 Author: Yan-Hsuan Chuang Date: Thu Apr 6 15:19:56 2017 -0500 rtlwifi: btcoex: 23b 2ant: fine tune for bt hid_a2dp Let bt control the aggregation size to improve stability. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e6689824a4c6d4275662f989c65a529c6f7a9f2 Author: Yan-Hsuan Chuang Date: Thu Apr 6 15:19:55 2017 -0500 rtlwifi: btcoex: 23b 2ant: fine tune for bt pan_edr_a2dp If we don't limit the rx aggregation size, and set tdma instead, the bt profile can get more stable. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6dcf041eabd1136abc46574092985acc86be99c0 Author: Yan-Hsuan Chuang Date: Thu Apr 6 15:19:54 2017 -0500 rtlwifi: btcoex: 23b 2ant: before firmware ready settings Before firmware is ready, set GNT_BT to high to let bt transmit Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 38 ++++++++++++++++++++++ .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 2 ++ 2 files changed, 40 insertions(+) commit 4e6becc0448b936c24bccacf39a94f8a1cf81e21 Author: Yan-Hsuan Chuang Date: Thu Apr 6 15:19:53 2017 -0500 rtlwifi: btcoex: 23b 2ant: power on settings for coex When power on, the wifi could be initiating, force the antenna to transmit bt packets to avoid bt unstable problems Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 31 ++++++++++++++++++++++ .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 1 + 2 files changed, 32 insertions(+) commit 7558668d05366b5747cd5223e87913083450b8bf Author: Yan-Hsuan Chuang Date: Thu Apr 6 15:19:52 2017 -0500 rtlwifi: btcoex: 23b 2ant: wifi is not actually off in mp mode In mp mode, the wifi will not turn off and still has control of the PTA, so the driver needs to distinguish whether it is mp mode or not Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 10 ++++++++++ drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 1 + 2 files changed, 11 insertions(+) commit ae889ebc76c95892dc7b10f15bf7a5cb9e1c6684 Author: Yan-Hsuan Chuang Date: Thu Apr 6 15:19:51 2017 -0500 rtlwifi: btcoex: 23b 2ant: need those information when scan For scan notify, we need to supervise some registers to make sure that coexistence is operating as we expected. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit acb9c779ecc56c27a15f7ef0400d0509802357b6 Author: Yan-Hsuan Chuang Date: Thu Apr 6 15:19:50 2017 -0500 rtlwifi: btcoex: 23b 2ant: remove debugging code for 0x948 Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 6 ------ drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.h | 2 -- 2 files changed, 8 deletions(-) commit 2037b83c12d1535cab7e73181c34e353ffb94700 Author: Yan-Hsuan Chuang Date: Thu Apr 6 15:19:49 2017 -0500 rtlwifi: btcoex: 23b 2ant: treat too many low prio packets as retry Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 5 +++++ 1 file changed, 5 insertions(+) commit 470eec1a3d0ab2087d42b1b0a9dd1d4c04b1824f Author: Yan-Hsuan Chuang Date: Thu Apr 6 15:19:48 2017 -0500 rtlwifi: btcoex: 23b 2ant: set coex table when wifi is idle When wifi is idle, the bt should have more resource to transmit. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 61 ++++++++++++++++------ 1 file changed, 44 insertions(+), 17 deletions(-) commit 83cded7a1ef075ecebc08d5d92f2891288dbbe30 Author: Yan-Hsuan Chuang Date: Tue Apr 4 11:50:06 2017 -0500 rtlwifi: btcoex: 23b 2ant: set coex table when wifi is linking When wifi is under linking process, those packets are important. Mark them as high priority to protect the linking process Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit c5e2113613bcf2693a9d7e54e1f54b27194a935c Author: Yan-Hsuan Chuang Date: Tue Apr 4 11:50:05 2017 -0500 rtlwifi: btcoex: 23b 2ant: turn off antenna when rssi is too high/low For 2-antenna combo card, the signal of the neighbor antenna could be over noise level and cause be severe interference. So we monitor the rssi and turn off one of the antennas when the other is transmitting and the rssi level is beyond a threshold. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 332 +++++++++++++++++---- .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.h | 7 + 2 files changed, 282 insertions(+), 57 deletions(-) commit a8570896b962dc2b8e7787c59a45521e64b187e2 Author: Yan-Hsuan Chuang Date: Tue Apr 4 11:50:04 2017 -0500 rtlwifi: btcoex: 23b 2ant: turn off ps and tdma mechanism when in concurrent mode When wifi is in concurrent mode, we can not distinguish if it is the real PS or just a fake one by sending null data, so we turn it off in case of miracast scenario. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 46 ++++++++++++++++++++++ .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 1 + 2 files changed, 47 insertions(+) commit bcd37f4a0831fb4f3f7e1c9c7baccdf3d97b7064 Author: Yan-Hsuan Chuang Date: Tue Apr 4 11:50:03 2017 -0500 rtlwifi: btcoex: 23b 2ant: let bt transmit when hw initialisation done During hw initialisation, wifi may be ready after bt has already been ready, which causes bt to act abnormally. To avoid this, set GNT_BT to high during hw init. Signed-off-by: Yan-Hsuan Chuang Cc: Stable Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 45 +++++++++++++++------- 1 file changed, 31 insertions(+), 14 deletions(-) commit 3b4fa04d8efdf24f331e1d590090b8cfe9007182 Author: Yan-Hsuan Chuang Date: Tue Apr 4 11:50:02 2017 -0500 rtlwifi: btcoex: 23b 2ant: tell fw if external or internal switch is used Some chips use an external antenna switch, but fw may not realize it. Here we tell fw exactly that which type of switch we are using. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit a0f430b3eaefc180b9b04f3579ed90a354765f39 Author: Yan-Hsuan Chuang Date: Tue Apr 4 11:50:01 2017 -0500 rtlwifi: btcoex: 23b 2ant: workaround for bt a2dp and hid For a2dp and hid, we need extra process to avoid voice degradation Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 2 ++ 1 file changed, 2 insertions(+) commit 684df42cd59711d9077ca4a1980c0b9b084c0b4c Author: Yan-Hsuan Chuang Date: Tue Apr 4 11:50:00 2017 -0500 rtlwifi: btcoex: 23b 2ant: check more cases when bt is queuing If bt is queing, we need to set the packet priority properly. Originally we only consider if wifi was connected or not, but now we also consider if bt is under abnormal scan or wifi is scanning, roaming or linking, and set the coex table. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 24 +++++++++++++++++++--- .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.h | 1 + 2 files changed, 22 insertions(+), 3 deletions(-) commit 609d59acb68ab5175768b818438ea2c95ab9a980 Author: Yan-Hsuan Chuang Date: Tue Apr 4 11:49:59 2017 -0500 rtlwifi: btcoex: 23b 2ant: add pnp notidy to avoid LPS/IPS mismatch When driver is going to sleep, it does not leave LPS/IPS, thus the BTCoex may have mismatch when driver wakes up. To avoid that, BTCoex needs to clear the IPS/LPS state when it receives a pnp notify, then it can properly set up the hw when driver wakes up. Signed-off-by: Yan-Hsuan Chuang Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit b59f02fb7f44cd9c7b159f87c84c1e53e00e03a2 Author: Yan-Hsuan Chuang Date: Tue Apr 4 11:49:58 2017 -0500 rtlwifi: btcoex: 23b 2ant: fix PTA unstable problem when hw init In the hardware initialisation stage, the PTA circuits may be unstable, so we reset it after 6 secs to fix the problem. Signed-off-by: Yan-Hsuan Chuang Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 41 ++++++++-------------- .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.h | 2 ++ 2 files changed, 16 insertions(+), 27 deletions(-) commit 1712952beabb4f8f5071336b4cc744365efc9b2b Author: Yan-Hsuan Chuang Date: Tue Apr 4 11:49:57 2017 -0500 rtlwifi: btcoex: 23b 2ant: more cases for adjusting tdma duration These cases are for the btcoex to tune the performance Signed-off-by: Yan-Hsuan Chuang Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 766 +++++++++++++++++++++ 1 file changed, 766 insertions(+) commit 5a347a48467b3c94ad66ead8addb8a29f117dc59 Author: Yan-Hsuan Chuang Date: Tue Apr 4 11:49:56 2017 -0500 rtlwifi: btcoex: 23b 2ant: detect ap num and set GNT_BT properly If ap num < 10, let wifi and bt transmit simultaneously, otherwise set wifi into standy when bt is transmitting Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit b91ed731393bc3fe9da3a0d909d6a3fdf7685232 Author: Yan-Hsuan Chuang Date: Tue Apr 4 11:49:55 2017 -0500 rtlwifi: btcoex: 23b 2ant: rename tdma_adj_type to ps_tdma_du_adj_type The variable is for PS tdma duration adjust, so rename it to clearly to specify its usage. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 30 +++++++++++----------- .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.h | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) commit b01127b268339fe12d3e1cbda4ceef1e89e0a086 Author: Yan-Hsuan Chuang Date: Tue Apr 4 11:49:54 2017 -0500 rtlwifi: btcoex: 23b 2ant: check PS state before setting tdma duration For time division multiple access, the wifi and bt take turns to transmit, but we need to let AP know that wifi is under standby mode by sending null data to "pretend" entering power saving state using lps rpwm. But, the fw does not know if it is the actual power saving mode or just a fake one to cheat to the AP. Hence, before fw setting the tdma duration, the fw needs the driver to check the power saving state first. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 95 ++++++++++++++++++++++ .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.h | 6 ++ 2 files changed, 101 insertions(+) commit 6ea51fc708aedcf411f355de65a704ecda501bc4 Author: Arend Van Spriel Date: Thu Apr 6 13:14:42 2017 +0100 brcmfmac: only add channels and ssids once in scan request When receiving pno results there may be duplicate channels and/or ssids. Assure each is added only once when preparing the internal escan request. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 6594e1e8343645fe849a2ad42fcab94e2cf5b2c0 Author: Arend Van Spriel Date: Thu Apr 6 13:14:41 2017 +0100 brcmfmac: remove bogus check in scheduled scan result handler Checking whether the address of an array element is null is bogus so removing it. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 ------ 1 file changed, 6 deletions(-) commit 4835f37e3bafc138f8bfa3cbed2920dd56fed283 Author: Arend Van Spriel Date: Thu Apr 6 13:14:40 2017 +0100 brcmfmac: add length checks in scheduled scan result handler Assure the event data buffer is long enough to hold the array of netinfo items and that SSID length does not exceed the maximum of 32 characters as per 802.11 spec. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit acf8ac41dd733508b9e77483f96e53610c87fa64 Author: Arend Van Spriel Date: Thu Apr 6 13:14:39 2017 +0100 brcmfmac: remove reference to fwsignal data from struct brcmf_pub The fwsignal module is part of the bcdc protocol and as such does its instance data is not needed in core structure. Moving it into struct brcmf_bcdc instead. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 35 +++++++++++---- .../wireless/broadcom/brcm80211/brcmfmac/bcdc.h | 1 + .../wireless/broadcom/brcm80211/brcmfmac/core.h | 2 - .../broadcom/brcm80211/brcmfmac/fwsignal.c | 51 ++++++++++------------ .../broadcom/brcm80211/brcmfmac/fwsignal.h | 4 +- 5 files changed, 54 insertions(+), 39 deletions(-) commit fc0471e3e884a13d293afae53917ef8ff33b8ae5 Author: Arend Van Spriel Date: Thu Apr 6 13:14:38 2017 +0100 brcmfmac: ignore interfaces when fwsignal is disabled When brcmf_fws_add_interface() is called the struct brcmf_if::fws_desc field is initialized regardless the state of the fwsignal functionality, ie. the fcmode. This is not needed when fcmode is NONE, which is the default mode. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffb9f18ad8f0e5e1d88c56478bf24e6464c96eee Author: Arend Van Spriel Date: Thu Apr 6 13:14:37 2017 +0100 brcmfmac: rename brcmf_fws_{de,}init to brcmf_fws{at,de}tach This is a non-functional change to align the fwsignal module to the naming pattern used throughout the driver. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 4 ++-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c | 6 +++--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) commit 6e84ab604bdedaa16239bd1c6e5fcb5660309f02 Author: Heiner Kallweit Date: Wed Apr 5 20:33:26 2017 +0200 brcmfmac: properly align buffers on certain platforms with 64 bit DMA Systems with 64 bit DMA at least partially require buffers to be used for DMA to be 8-byte-aligned. One example is Amlogic Meson GX. Switching the MMC/SDIO driver for this platform to SG DMA mode resulted in problems due to unaligned buffers. Fortunately the brcmfmac driver has a global define for the alignment. Changing it to 8 fixed the issues with Meson GX. Suggested-by: Helmut Klein Tested-by: Helmut Klein Signed-off-by: Heiner Kallweit Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 4 ++++ 1 file changed, 4 insertions(+) commit ecd7eb7c2bcf99f6c23d68ad56ce15949da848a1 Author: Ganapathi Bhat Date: Tue Apr 4 10:16:28 2017 +0530 mwifiex: Fix invalid port issue We have to use start port, for TX/RX of single packet, instead of current aggregating port. This will fix SDIO CMD53(TX/RX) returning -ETIMEDOUT and halting the data path. Fixes: 0cb52aac4d19 ("mwifiex: do not set multiport flag for tx/rx single packet") Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 739cf305512cb852e852099f9e12dd66bf4df076 Author: Ravi Bangoria Date: Thu Apr 13 11:32:12 2017 +0530 perf trace: Add usage of --no-syscalls in man page perf trace supports --no-syscalls option but it's not listed in the man page. (Though, I see an example using --no-syscalls in EXAMPLES section.) Committer note: The --no-syscalls option tells 'perf trace' not to automagically ask for raw_syscalls:sys_{enter,exit} to then format it in a strace like way. This become more used as 'perf trace' got support for arbitrary events, such as tracepoints, so more and more we use: # perf trace --no-syscalls -e nmi:* 0.000 nmi:nmi_handler:perf_event_nmi_handler() delta_ns: 36649 handled: 1) 0.019 nmi:nmi_handler:nmi_cpu_backtrace_handler() delta_ns: 2907 handled: 0) 0.676 nmi:nmi_handler:perf_event_nmi_handler() delta_ns: 9401 handled: 1) 0.680 nmi:nmi_handler:nmi_cpu_backtrace_handler() delta_ns: 288 handled: 0) 0.701 nmi:nmi_handler:perf_event_nmi_handler() delta_ns: 4977 handled: 1) 0.703 nmi:nmi_handler:nmi_cpu_backtrace_handler() delta_ns: 67 handled: 0) 0.736 nmi:nmi_handler:perf_event_nmi_handler() delta_ns: 8549 handled: 1) ^C# Signed-off-by: Ravi Bangoria Cc: Alexander Shishkin Cc: Alexis Berlemont Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1492063332-5745-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-trace.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit db49a71798a38f3ddf3f3462703328dca39b1ac7 Author: Stephane Eranian Date: Wed Apr 12 11:23:01 2017 -0700 perf stat: Fix bug in handling events in error state (This is a patch has been sitting in the Intel CQM/CMT driver series for a while, despite not depend on it. Sending it now independently since the series is being discarded.) When an event is in error state, read() returns 0 instead of sizeof() buffer. In certain modes, such as interval printing, ignoring the 0 return value may cause bogus count deltas to be computed and thus invalid results printed. This patch fixes this problem by modifying read_counters() to mark the event as not scaled (scaled = -1) to force the printout routine to show . Signed-off-by: Stephane Eranian Reviewed-by: David Carrillo-Cisneros Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Mathieu Poirier Cc: Paul Turner Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/20170412182301.44406-1-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 12 +++++++++--- tools/perf/util/evsel.c | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) commit 270e2dc9b8031dd2ed31f6b86ed80340b1b889c2 Author: Michael Ellerman Date: Wed Apr 5 12:44:51 2017 +1000 powerpc/pseries: Always enable SMP when building pseries The pseries platform supports Power4 and later CPUs, all of which are multithreaded and/or multicore. In practice no one ever builds a SMP=n kernel for these machines. So as we did for powernv, have the pseries platform imply SMP=y. Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 40e275653e2cdb5be5aa828d31cc96eb0eef3346 Author: Michael Ellerman Date: Wed Apr 5 12:44:50 2017 +1000 powerpc/powernv: Always enable SMP when building powernv The powernv platform supports Power7 and later CPUs, all of which are multithreaded and multicore. As such we never build a SMP=n kernel for those machines, other than possibly for debugging or running in a simulator. In the debugging case we can get a similar effect by booting with nr_cpus=1, or there's always the option of building a custom kernel with SMP hacked out. For running in simulators the code size reduction from building without SMP is not particularly important, what matters is the number of instructions executed. A quick test shows that a SMP=y kernel takes ~6% more instructions to boot to a shell. Booting with nr_cpus=1 recovers about half that deficit. On the flip side, keeping the SMP=n kernel building can be a pain at times. And although we've mostly kept it building in recent years, no one is regularly testing that the SMP=n kernel actually boots and works well on these machines. Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ebbe9d7d3a2ca0d62f1a2c08c7e7a3e0a88cf999 Author: Michael Ellerman Date: Wed Apr 5 12:44:49 2017 +1000 powerpc: Allow platforms to force-enable CONFIG_SMP Of the 64-bit Book3S platforms, only powermac supports booting on an actual non-SMP system. The other platforms can be built with SMP disabled, but it doesn't make a lot of sense given the CPUs they support are all multicore or multithreaded. So give platforms the option of forcing SMP=y. Signed-off-by: Michael Ellerman arch/powerpc/platforms/Kconfig.cputype | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 590c369e7ecc00be736be39ae0c62d1b5d563a51 Author: Michael Ellerman Date: Thu Apr 13 23:14:36 2017 +1000 powerpc: Drop include of linux/io.h from asm/io.h Currently powerpc's asm/io.h includes linux/io.h, and linux/io.h includes asm/io.h. This can cause problems because depending on which is included first the order of definitions between the two files will change. The include of linux/io.h was added back in 2008 in commit b41e5fffe8b8 ("[POWERPC] devres: Add devm_ioremap_prot()"). It's not entirely clear it was needed then, but devm_ioremap_prot() has since been removed entirely as unused, in dedd24a12fe6 ("powerpc: Remove unused devm_ioremap_prot()"). So it seems to be unnecessary and can potentially cause problems, so remove the include of linux/io.h from asm/io.h Signed-off-by: Michael Ellerman arch/powerpc/include/asm/io.h | 2 -- 1 file changed, 2 deletions(-) commit 6b3edefefa6752df57ad636f26baa1b0a502ddab Author: Nicholas Piggin Date: Thu Apr 13 20:16:24 2017 +1000 powerpc/powernv: POWER9 support for msgsnd/doorbell IPI POWER9 requires msgsync for receiver-side synchronization, and a DD1 workaround restricts IPIs to core-local. Signed-off-by: Nicholas Piggin [mpe: Drop no longer needed asm feature macro changes] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/dbell.h | 3 +++ arch/powerpc/include/asm/ppc-opcode.h | 2 ++ arch/powerpc/platforms/powernv/smp.c | 28 ++++++++++++++++++++++++++-- 3 files changed, 31 insertions(+), 2 deletions(-) commit a5adf282461fb6048973ca3aec590495bdbc33f1 Author: Nicholas Piggin Date: Thu Apr 13 20:16:23 2017 +1000 powerpc/64s: Avoid a branch for ppc_msgsnd IPIs are a pretty hot path and we already have the ability to do asm feature patching, so use it. Signed-off-by: Nicholas Piggin [mpe: Change log detail] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/dbell.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b87ac0218355a83abb899a0022bb2e5252879fc0 Author: Nicholas Piggin Date: Thu Apr 13 20:16:22 2017 +1000 powerpc: Introduce msgsnd/doorbell barrier primitives POWER9 changes requirements and adds new instructions for synchronization. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/dbell.h | 22 ++++++++++++++++++++++ arch/powerpc/include/asm/smp.h | 1 + arch/powerpc/kernel/dbell.c | 8 +++++--- arch/powerpc/kernel/smp.c | 10 ++++++++-- 4 files changed, 36 insertions(+), 5 deletions(-) commit b866cc2199d6a6cdcefe4acfe4cfca3ac3c6d38e Author: Nicholas Piggin Date: Thu Apr 13 20:16:21 2017 +1000 powerpc: Change the doorbell IPI calling convention Change the doorbell callers to know about their msgsnd addressing, rather than have them set a per-cpu target data tag at boot that gets sent to the cause_ipi functions. The data is only used for doorbell IPI functions, no other IPI types, so it makes sense to keep that detail local to doorbell. Have the platform code understand doorbell IPIs, rather than the interrupt controller code understand them. Platform code can look at capabilities it has available and decide which to use. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/dbell.h | 9 ++---- arch/powerpc/include/asm/smp.h | 3 +- arch/powerpc/include/asm/xics.h | 2 +- arch/powerpc/kernel/dbell.c | 52 ++++++++++++++++++++++++++++++---- arch/powerpc/kernel/smp.c | 17 ++++------- arch/powerpc/platforms/85xx/smp.c | 11 ++----- arch/powerpc/platforms/powermac/smp.c | 2 +- arch/powerpc/platforms/powernv/smp.c | 23 ++++++++++----- arch/powerpc/platforms/pseries/smp.c | 27 +++++++----------- arch/powerpc/sysdev/xics/icp-hv.c | 2 +- arch/powerpc/sysdev/xics/icp-native.c | 12 +------- arch/powerpc/sysdev/xics/icp-opal.c | 2 +- arch/powerpc/sysdev/xics/xics-common.c | 3 -- arch/powerpc/sysdev/xive/common.c | 6 ++-- 14 files changed, 92 insertions(+), 79 deletions(-) commit 9b7ff0c6586bc0541ebcd1ff6773b11a49f1a058 Author: Nicholas Piggin Date: Fri Apr 7 11:27:44 2017 +1000 powerpc/64s: Add SCV FSCR bit for ISA v3.0 Add the bit definition and use it in facility_unavailable_exception() so we can intelligently report the cause if we take a fault for SCV. This doesn't actually enable SCV. Signed-off-by: Nicholas Piggin [mpe: Drop whitespace changes to the existing entries, flush out change log] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/reg.h | 2 ++ arch/powerpc/kernel/traps.c | 1 + 2 files changed, 3 insertions(+) commit 794464f4dea0b13dacad267c06a01fc9c24f713a Author: Nicholas Piggin Date: Fri Apr 7 11:27:43 2017 +1000 powerpc/64s: Add msgp facility unavailable log string Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/traps.c | 1 + 1 file changed, 1 insertion(+) commit 5f8122611b35c563a7c907485aafd8d4682e9184 Author: Aneesh Kumar K.V Date: Wed Apr 12 10:10:22 2017 +0530 powerpc/mm/hash: Don't open code VMALLOC_INDEX We have a #define for it, so use it. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/slb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f24be42aab37c6d07c05126673138e06223a6399 Author: Christophe Lombard Date: Wed Apr 12 16:34:07 2017 +0200 cxl: Add psl9 specific code The new Coherent Accelerator Interface Architecture, level 2, for the IBM POWER9 brings new content and features: - POWER9 Service Layer - Registers - Radix mode - Process element entry - Dedicated-Shared Process Programming Model - Translation Fault Handling - CAPP - Memory Context ID If a valid mm_struct is found the memory context id is used for each transaction associated with the process handle. The PSL uses the context ID to find the corresponding process element. Signed-off-by: Christophe Lombard Acked-by: Frederic Barrat [mpe: Fixup comment formatting, unsplit long strings] Signed-off-by: Michael Ellerman Documentation/powerpc/cxl.txt | 15 ++- drivers/misc/cxl/context.c | 19 +++- drivers/misc/cxl/cxl.h | 138 +++++++++++++++++++--- drivers/misc/cxl/debugfs.c | 19 ++++ drivers/misc/cxl/fault.c | 64 +++++++---- drivers/misc/cxl/guest.c | 8 +- drivers/misc/cxl/irq.c | 51 +++++++++ drivers/misc/cxl/native.c | 224 ++++++++++++++++++++++++++++++++++-- drivers/misc/cxl/pci.c | 259 +++++++++++++++++++++++++++++++++++++++--- drivers/misc/cxl/trace.h | 43 +++++++ 10 files changed, 764 insertions(+), 76 deletions(-) commit abd1d99bb3da42d6c7341c14986f5b8f4dcc6bd5 Author: Christophe Lombard Date: Fri Apr 7 16:11:58 2017 +0200 cxl: Isolate few psl8 specific calls Point out the specific Coherent Accelerator Interface Architecture, level 1, registers. Code and functions specific to PSL8 (CAIA1) must be framed. Signed-off-by: Christophe Lombard Acked-by: Frederic Barrat [mpe: Don't split long strings, it makes them hard to grep for] Signed-off-by: Michael Ellerman drivers/misc/cxl/context.c | 28 +++++++++++--------- drivers/misc/cxl/cxl.h | 35 +++++++++++++++++++------ drivers/misc/cxl/debugfs.c | 6 +++-- drivers/misc/cxl/native.c | 39 ++++++++++++++++++---------- drivers/misc/cxl/pci.c | 64 +++++++++++++++++++++++++++++++--------------- 5 files changed, 116 insertions(+), 56 deletions(-) commit 64663f372c72cedeba1b1dc86df9cc159ae5a93d Author: Christophe Lombard Date: Fri Apr 7 16:11:57 2017 +0200 cxl: Rename some psl8 specific functions Rename a few functions, changing the '_psl' suffix to '_psl8', to make clear that the implementation is psl8 specific. Those functions will have an equivalent implementation for the psl9 in a later patch. Signed-off-by: Christophe Lombard Reviewed-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 26 ++++++++++---------- drivers/misc/cxl/debugfs.c | 6 ++--- drivers/misc/cxl/guest.c | 2 +- drivers/misc/cxl/irq.c | 2 +- drivers/misc/cxl/native.c | 12 +++++----- drivers/misc/cxl/pci.c | 60 +++++++++++++++++++++++----------------------- 6 files changed, 54 insertions(+), 54 deletions(-) commit bdd2e7150644fee4de7167a3e08294ef32eeda11 Author: Christophe Lombard Date: Fri Apr 7 16:11:56 2017 +0200 cxl: Update implementation service layer The service layer API (in cxl.h) lists some low-level functions whose implementation is different on PSL8, PSL9 and XSL: - Init implementation for the adapter and the afu. - Invalidate TLB/SLB. - Attach process for dedicated/directed models. - Handle psl interrupts. - Debug registers for the adapter and the afu. - Traces. Each environment implements its own functions, and the common code uses them through function pointers, defined in cxl_service_layer_ops. Signed-off-by: Christophe Lombard Reviewed-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 40 +++++++++++++++++++++++---------- drivers/misc/cxl/debugfs.c | 16 +++++++------- drivers/misc/cxl/guest.c | 2 +- drivers/misc/cxl/irq.c | 2 +- drivers/misc/cxl/native.c | 54 ++++++++++++++++++++++++++------------------- drivers/misc/cxl/pci.c | 55 +++++++++++++++++++++++++++++++++------------- 6 files changed, 110 insertions(+), 59 deletions(-) commit 6dd2d23403396d8e6d153a6c9db56e1a1012bad8 Author: Christophe Lombard Date: Fri Apr 7 16:11:55 2017 +0200 cxl: Keep track of mm struct associated with a context The mm_struct corresponding to the current task is acquired each time an interrupt is raised. So to simplify the code, we only get the mm_struct when attaching an AFU context to the process. The mm_count reference is increased to ensure that the mm_struct can't be freed. The mm_struct will be released when the context is detached. A reference on mm_users is not kept to avoid a circular dependency if the process mmaps its cxl mmio and forget to unmap before exiting. The field glpid (pid of the group leader associated with the pid), of the structure cxl_context, is removed because it's no longer useful. Signed-off-by: Christophe Lombard Reviewed-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/api.c | 17 +++++++++-- drivers/misc/cxl/context.c | 21 +++++++++++-- drivers/misc/cxl/cxl.h | 10 ++++-- drivers/misc/cxl/fault.c | 76 ++++------------------------------------------ drivers/misc/cxl/file.c | 15 +++++++-- drivers/misc/cxl/main.c | 12 ++------ 6 files changed, 61 insertions(+), 90 deletions(-) commit 66ef20c7834b7df18168b12a57ef01c6ae0d1a81 Author: Christophe Lombard Date: Fri Apr 7 16:11:54 2017 +0200 cxl: Remove unused values in bare-metal environment. The two previously fields pid and tid, located in the structure cxl_irq_info, are only used in the guest environment. To avoid confusion, it's not necessary to fill the fields in the bare-metal environment. Pid_tid is now renamed to 'reserved' to avoid undefined behavior on bare-metal. The PSL Process and Thread Identification Register (CXL_PSL_PID_TID_An) is only used when attaching a dedicated process for PSL8 only. This register goes away in CAIA2. Signed-off-by: Christophe Lombard Reviewed-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 20 ++++---------------- drivers/misc/cxl/hcalls.c | 6 +++--- drivers/misc/cxl/native.c | 5 ----- 3 files changed, 7 insertions(+), 24 deletions(-) commit aba81433b50350fde68bf80fe9f75d671e15b5ae Author: Christophe Lombard Date: Fri Apr 7 16:11:53 2017 +0200 cxl: Read vsec perst load image This bit is used to cause a flash image load for programmable CAIA-compliant implementation. If this bit is set to ‘0’, a power cycle of the adapter is required to load a programmable CAIA-com- pliant implementation from flash. This field will be used by the following patches. Signed-off-by: Christophe Lombard Reviewed-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/pci.c | 1 + 1 file changed, 1 insertion(+) commit a02c24a321583e7970393488834501e15a69b656 Author: Javier Martinez Canillas Date: Wed Apr 12 21:21:39 2017 -0300 hwmon: (lm87) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/lm87.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0439bf71c383a6b5a325dfd30414539b87ddf933 Author: Javier Martinez Canillas Date: Wed Apr 12 21:21:38 2017 -0300 hwmon: (lm87) Remove unused I2C devices driver_data The I2C device ID entries set a .driver_data but this data is never looked up by the driver. So don't set it and also remove the enum. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/lm87.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3161adddf309e4c5f362d77f92206dd340fea67d Author: Maya Erez Date: Wed Apr 5 14:58:14 2017 +0300 wil6210: prevent access to 11AD device if resume fails In case wil6210 resume fails, wil6210 suspend function will try to access the suspended device in the next kernel suspend. To prevent that, add wil_status_suspended flag to indicate if the device is already suspended and clear it only if the resume succeeds. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/pm.c | 16 ++++++++++++++-- drivers/net/wireless/ath/wil6210/wil6210.h | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) commit 98a830a98dab6d474190bec72c4a4ad0f7f9bf75 Author: Dedy Lansky Date: Wed Apr 5 14:58:13 2017 +0300 wil6210: fix array out of bounds access in pmc Array index 'i' is used before limits check. Fix this by doing limits check first. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/pmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bd50e2688a7812754e964231c850e8414751df1d Author: Maya Erez Date: Wed Apr 5 14:58:12 2017 +0300 wil6210: remove HALP voting in debugfs ioblob debugfs ioblob function is called by the FW logs scripts to copy the FW logs via PCIe. As the FW logs collection is done in parallel to the operational 11AD actions, the HALP voting can take place during 11AD reset flow and other sensitive scenarios. To prevent that, remove HALP voting from the ioblob function. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/debugfs.c | 5 ++--- drivers/net/wireless/ath/wil6210/main.c | 17 ----------------- drivers/net/wireless/ath/wil6210/wil6210.h | 6 ------ 3 files changed, 2 insertions(+), 26 deletions(-) commit 0f6edfe2bbbb59d161580cb4870fcc46f5490f85 Author: Dedy Lansky Date: Wed Apr 5 14:58:11 2017 +0300 wil6210: fix memory access violation in wil_memcpy_from/toio_32 In case count is not multiple of 4, there is a read access in wil_memcpy_toio_32() from outside src buffer boundary. In wil_memcpy_fromio_32(), in case count is not multiple of 4, there is a write access to outside dst io memory boundary. Fix these issues with proper handling of the last 1 to 4 copied bytes. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/main.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 4d4f8132f72b78d1260ec9afa94c3b44deb12adf Author: Hamad Kadmany Date: Wed Apr 5 14:58:10 2017 +0300 wil6210: fix check for sparrow D0 FW file Driver fails to load FW for sparrow D0 devices in some cases. Fix this by returning correct value from wil_fw_verify_file_exists when D0 FW file is not detected for any reason. Signed-off-by: Hamad Kadmany Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/fw_inc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a3839fbcf0351e8192429f1cc1c499799465737f Author: Maya Erez Date: Wed Apr 5 14:58:09 2017 +0300 wil6210: protect against sporadic interrupt during suspend flow During the suspend flow, wil6210 HW can send sporadic interrupts, while PCIe bus is not operational. To prevent that, keep the interrupts disabled during the suspend flow and re-enable them only after PCIe enablement in resume. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/pm.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit b819447dfc4bd120c9d6cd8521252d544fce8fe7 Author: Hamad Kadmany Date: Wed Apr 5 14:58:08 2017 +0300 wil6210: fix protection against connections during reset Existing code that ignores connection events during reset flow will never take effect since it locks the same mutex taken by the reset flow. In addition, in case of unsolicited disconnect events ignore those as well since device is about to get reset. Signed-off-by: Hamad Kadmany Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/wmi.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 90ffabb08b7d0627239c7dd53c3c7065a158508c Author: Dedy Lansky Date: Wed Apr 5 14:58:07 2017 +0300 wil6210: align to latest auto generated wmi.h Align to latest version of the auto generated wmi file describing the interface with FW Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/wmi.h | 73 ++++++++++++++++++++++++---------- 1 file changed, 52 insertions(+), 21 deletions(-) commit 52a457020a89158f4eb886544165dc162ca9a35e Author: Lior David Date: Wed Apr 5 14:58:06 2017 +0300 wil6210: support 8KB RX buffers The 11ad spec requires 11ad devices to be able to receive 8KB packets over the air. Currently this is only possible by loading the driver with mtu_max=7912 but this also forces a smaller block ACK window size which reduces performance for stations which transmit normal sized packets (<2KB). Fix this problem as follows: 1. Add a module parameter rx_large_buf that when set, will allocate 8KB RX buffers regardless of mtu_max setting. 2. When receiving block ACK request agree to any window size not above our maximum, regardless of the mtu_max setting. This means if the other side transmits small packets (2KB) it can still set up block ACK with a large window size, and get better performance. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/rx_reorder.c | 12 ++++++++++-- drivers/net/wireless/ath/wil6210/txrx.c | 24 ++++++++++++++++++++++-- drivers/net/wireless/ath/wil6210/wil6210.h | 2 ++ drivers/net/wireless/ath/wil6210/wmi.c | 3 ++- 4 files changed, 36 insertions(+), 5 deletions(-) commit 8b068c032a5cbe6f80168e0ecf2c9625c8d14d90 Author: Lazar Alexei Date: Wed Apr 5 14:58:05 2017 +0300 wil6210: restore power save state after internal FW reset The power save profile is set to default state in case of FW reset, regardless of the state before the reset took place. Fix this by saving the current power save profile and restore it in case of FW reset. Signed-off-by: Lazar Alexei Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 12 +----------- drivers/net/wireless/ath/wil6210/main.c | 24 ++++++++++++++++++++++++ drivers/net/wireless/ath/wil6210/wil6210.h | 4 ++++ 3 files changed, 29 insertions(+), 11 deletions(-) commit 82e9f646555442d63e47155171592ee790275ea3 Author: Hamad Kadmany Date: Wed Apr 5 14:58:04 2017 +0300 wil6210: fix sequence for scan-abort during reset Communication with FW must be done before wil->status is initialized in order to properly handle cases where communication with FW halts during reset sequence. Signed-off-by: Hamad Kadmany Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 62ca0690cd495bb7c1414cdf0cf790c2922a1d79 Author: Mohammed Shafi Shajakhan Date: Tue Apr 4 22:22:56 2017 +0530 ath10k: fix compile time sanity check for CE4 buffer size In 'ath10k_ce_alloc_pipe' the compile time sanity check to ensure that there is sufficient buffers in CE4 for HTT Tx MSDU descriptors, but this did not take into account of the case with 'peer flow control' enabled, fix this. Cc: Michal Kazior Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 169345d40d0fa05c4fdcec67835b008d24cfcf26 Author: Joe Perches Date: Thu Mar 30 15:57:23 2017 -0700 ath6kl: add __printf verification to ath6kl_dbg Fix fallout too. Signed-off-by: Joe Perches Reviewed-by: Steve deRosier Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath6kl/debug.h | 2 ++ drivers/net/wireless/ath/ath6kl/htc_pipe.c | 2 +- drivers/net/wireless/ath/ath6kl/wmi.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) commit 6f79309acc32b025064a496dbfcd4c70c557294e Author: Thierry Reding Date: Mon Apr 3 18:05:21 2017 +0200 gpio: Use unsigned int for interrupt numbers Interrupt numbers are never negative, zero serves as the special invalid value. Signed-off-by: Thierry Reding Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 6 +++--- include/linux/gpio/driver.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 7149c1becddf49022fe0aad2fa395377cd8f753e Author: Chen-Yu Tsai Date: Fri Mar 24 16:33:07 2017 +0800 clk: sunxi-ng: a80: Fix audio PLL comment not matching actual code We ignore the d1 and d2 dividers in the audio PLL, and force them to 1 (register value 0) at probe time. However the comment preceding the audio PLL definition says we enforce the default value, which is not the same. Fix the preceding comment to match what we do in code. Fixes: b8eb71dcdd08 ("clk: sunxi-ng: Add A80 CCU") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun9i-a80.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 95ad8ed9c87fae043c347ba6cba05aabe5b04d76 Author: Chen-Yu Tsai Date: Fri Mar 24 16:33:06 2017 +0800 clk: sunxi-ng: Fix round_rate/set_rate multiplier minimum mismatch In commit 2beaa601c849 ("clk: sunxi-ng: Implement minimum for multipliers"), the multiplier minimums in the set_rate callback for NM and NKMP style clocks were not updated. This patch fixes them to match their round_rate callbacks. Fixes: 2beaa601c849 ("clk: sunxi-ng: Implement minimum for multipliers") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_nkmp.c | 4 ++-- drivers/clk/sunxi-ng/ccu_nm.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 4162c5ce52e593acd6b53efa09eb945650e2e729 Author: Chen-Yu Tsai Date: Fri Mar 24 16:33:05 2017 +0800 clk: sunxi-ng: use 1 as fallback for minimum multiplier A zero multiplier does not make sense for clocks. Use 1 as the minimum when a multiplier minimum isn't specified. Fixes: 2beaa601c849 ("clk: sunxi-ng: Implement minimum for multipliers") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_nk.c | 8 ++++---- drivers/clk/sunxi-ng/ccu_nkm.c | 8 ++++---- drivers/clk/sunxi-ng/ccu_nkmp.c | 4 ++-- drivers/clk/sunxi-ng/ccu_nm.c | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) commit 1d5e9f80ab021e3e1f9436627a4ad07a143ccb2c Author: Johannes Berg Date: Thu Apr 13 10:31:16 2017 +0200 mac80211_hwsim: use per-interface power level When channel contexts are used, there's no global power level (the power_level is always 0). Use the per-interface TX power in mac80211_hwsim to have a proper setting for both cases. This fixes the bgscan_simple and bgscan_learn test cases when the number of channels advertised by hwsim is >1 by default. Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 65f1d6007e999f3a3dda1ba5f264447529247697 Author: Johannes Berg Date: Wed Apr 12 12:36:31 2017 +0200 mac80211: use common code for monitor options in add/change Refactor the code to have common code for changing monitor options when adding and changing virtual interfaces. This will make it easier to add BPF filters to both paths. Note that this code carefully checks the error conditions first and only then applies the changes, to guarantee atomicity. Signed-off-by: Johannes Berg net/mac80211/cfg.c | 122 ++++++++++++++++++++++++++++------------------------- 1 file changed, 64 insertions(+), 58 deletions(-) commit 1db77596e4c6b653f3cd001073a14dd09b8deb4a Author: Johannes Berg Date: Wed Apr 12 11:36:31 2017 +0200 cfg80211: refactor nl80211 monitor option parsing Refactor the parsing of monitor flags and the MU-MIMO options. This will allow adding more things cleanly in the future and also allows setting the latter already when creating a monitor interface. Signed-off-by: Johannes Berg net/wireless/nl80211.c | 126 +++++++++++++++++++++++++++---------------------- 1 file changed, 70 insertions(+), 56 deletions(-) commit 818a986e4ebacea2020622e48c8bc04b7f500d89 Author: Johannes Berg Date: Wed Apr 12 11:23:28 2017 +0200 cfg80211: move add/change interface monitor flags into params Instead passing both flags, which can be NULL, and vif_params, which are never NULL, move the flags into the vif_params and use BIT(0), which is invalid from userspace, to indicate that the flags were changed. While updating all drivers, fix a small bug in wil6210 where it was setting the flags to 0 instead of leaving them unchanged. Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath6kl/cfg80211.c | 3 +- drivers/net/wireless/ath/wil6210/cfg80211.c | 11 +++---- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 12 ++++---- .../net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 3 +- .../net/wireless/broadcom/brcm80211/brcmfmac/p2p.h | 2 +- drivers/net/wireless/intersil/orinoco/cfg.c | 2 +- drivers/net/wireless/marvell/libertas/cfg.c | 2 +- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 27 ++++++++--------- drivers/net/wireless/marvell/mwifiex/main.c | 7 ++--- drivers/net/wireless/marvell/mwifiex/main.h | 1 - drivers/net/wireless/rndis_wlan.c | 4 +-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 3 +- drivers/staging/wlan-ng/cfg80211.c | 2 +- include/net/cfg80211.h | 8 +++-- net/mac80211/cfg.c | 15 +++++----- net/wireless/core.h | 2 +- net/wireless/nl80211.c | 34 ++++++++++++---------- net/wireless/rdev-ops.h | 9 +++--- net/wireless/util.c | 4 +-- net/wireless/wext-compat.c | 2 +- 20 files changed, 73 insertions(+), 80 deletions(-) commit 8c5e68894450d3bb7471e426e2eec9a8472bb660 Author: Johannes Berg Date: Wed Apr 12 10:46:13 2017 +0200 mac80211: correct MU-MIMO monitor follow functionality The MU-MIMO monitor follow functionality is broken because it doesn't clear the MU-MIMO owner even if both follow features are disabled. Fix that, and while at it move the code into a new helper function. Call this also when creating a new monitor interface to prepare for an upcoming cfg80211 change allowing that. Signed-off-by: Johannes Berg net/mac80211/cfg.c | 78 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 58 insertions(+), 20 deletions(-) commit b0265024b8b5fb35d1e1a1da6be65399e33e122e Author: Johannes Berg Date: Wed Apr 12 10:43:49 2017 +0200 cfg80211: allow leaving MU-MIMO monitor configuration unchanged When changing monitor parameters, not setting the MU-MIMO attributes should mean that they're not changed - it's documented that to turn the feature off it's necessary to set all-zero group membership and an invalid follow-address. This isn't implemented. Fix this by making the parameters pointers, stop reusing the macaddr struct member, and documenting that NULL pointers mean unchanged. Signed-off-by: Johannes Berg include/net/cfg80211.h | 9 ++++++--- net/mac80211/cfg.c | 8 ++++---- net/wireless/nl80211.c | 8 +++----- 3 files changed, 13 insertions(+), 12 deletions(-) commit 30841f5cdeccd24c4a68b9df681b3ef11b0dda53 Author: Johannes Berg Date: Tue Apr 11 15:38:56 2017 +0200 mac80211: drop frames too short for FCS earlier Instead of dropping such frames only when removing the monitor info, drop them earlier (keeping the warning) and simplify removing monitor info. While at it, make that function return void. Signed-off-by: Johannes Berg net/mac80211/rx.c | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) commit 2f410f88c0a1c7e19762918d2614f506a7b63a82 Author: Vincent Abriou Date: Thu Mar 23 15:44:52 2017 +0100 drm/sti: fix GDP size to support up to UHD resolution On stih407-410 chip family the GDP layers are able to support up to UHD resolution (3840 x 2160). Signed-off-by: Vincent Abriou Acked-by: Lee Jones Tested-by: Lee Jones Link: http://patchwork.freedesktop.org/patch/msgid/1490280292-30466-1-git-send-email-vincent.abriou@st.com drivers/gpu/drm/sti/sti_gdp.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit db8b1590a315689f4075c852d3e4eb6ec45ec697 Author: Vincent Abriou Date: Mon Apr 10 16:52:38 2017 +0200 MAINTAINERS: add drm/sti driver into drm-misc drm/sti driver is now part of drm-misc as a small driver. Signed-off-by: Vincent Abriou Acked-by: Benjamin Gaignard Link: http://patchwork.freedesktop.org/patch/msgid/1491835958-30229-1-git-send-email-vincent.abriou@st.com MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7bb318680e868cd049922f6761170b42ff89687d Author: Sebastian Reichel Date: Thu Apr 13 02:26:59 2017 +0200 Bluetooth: add nokia driver This adds a driver for the Nokia H4+ protocol, which is used at least on the Nokia N9, N900 & N950. Signed-off-by: Sebastian Reichel Signed-off-by: Marcel Holtmann drivers/bluetooth/Kconfig | 12 + drivers/bluetooth/Makefile | 2 + drivers/bluetooth/hci_nokia.c | 820 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 834 insertions(+) commit 1286be270e9a9edaf534856b1143a06f0dd1f30d Author: Sebastian Reichel Date: Thu Apr 13 02:26:58 2017 +0200 dt-bindings: net: bluetooth: Add nokia-bluetooth Add binding document for serial bluetooth chips using Nokia H4+ protocol. Acked-by: Rob Herring Signed-off-by: Sebastian Reichel Signed-off-by: Marcel Holtmann .../devicetree/bindings/net/nokia-bluetooth.txt | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit a87a4d23e86b7ff9b3f1300774c942de139ba16a Author: Ander Conselvan De Oliveira Date: Thu Apr 13 13:05:35 2017 +0530 ALSA: hda: Move common haswell init to a helper Geminilake vendor nid is different from other Skylake variants, but rest of the initialization code is same. So a variable is added in hdmi_spec to store the platform specific vendor nid and move the initialization code to a helper function to be used by both platform specific init. Fixes: 126cfa2f5e15 ("ALSA: hda: Add Geminilake HDMI codec ID") Signed-off-by: Ander Conselvan De Oliveira Signed-off-by: Subhransu S. Prusty Signed-off-by: Jaikrishna Nemallapudi Cc: Senthilnathan Veppur Cc: Vinod Koul Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit 93f56de259376d7e4fff2b2d104082e1fa66e237 Author: Matthias Kaehlcke Date: Thu Apr 6 16:31:41 2017 -0700 mac80211: Fix clang warning about constant operand in logical operation When clang detects a non-boolean constant in a logical operation it generates a 'constant-logical-operand' warning. In ieee80211_try_rate_control_ops_get() the result of strlen() is used in a logical operation, clang resolves the expression to an (integer) constant at compile time when clang's builtin strlen function is used. Change the condition to check for strlen() > 0 to make the constant operand boolean and thus avoid the warning. Signed-off-by: Matthias Kaehlcke Signed-off-by: Johannes Berg net/mac80211/rate.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5ad59bf0960b807f01cb6ef8c54f68b3476a1546 Author: Zhenyu Wang Date: Wed Apr 12 16:24:57 2017 +0800 drm/i915/gvt: Fix PTE write flush for taking runtime pm properly Make sure to take runtime pm when write PTE flush which ensure to write to hw properly. This fixes warning during mdev/vgpu creation which will do ggtt reset. ------------[ cut here ]------------ WARNING: CPU: 1 PID: 9375 at drivers/gpu/drm/i915/intel_drv.h:1748 fwtable_write32+0x1c2/0x1e0 [i915] RPM wakelock ref not held during HW access Call Trace: ? dump_stack+0x5c/0x81 ? __warn+0xbe/0xe0 ? warn_slowpath_fmt+0x5a/0x80 ? wake_up_klogd+0x37/0x40 ? vprintk_emit+0x2ef/0x370 ? fwtable_write32+0x1c2/0x1e0 [i915] ? gtt_set_entry64+0xbb/0xd0 [i915] ? intel_vgpu_reset_ggtt+0x88/0xf0 [i915] ? intel_vgpu_init_gtt+0xa5/0x4f0 [i915] ? intel_gvt_create_vgpu+0x1b5/0x250 [i915] ? kobject_put+0x1b/0x50 ? intel_vgpu_create+0x4e/0x130 [kvmgt] ? mdev_device_create+0x186/0x2a0 [mdev] ? create_store+0xba/0xe0 [mdev] ? create_store+0xba/0xe0 [mdev] ? kernfs_fop_write+0x109/0x1a0 ? kernfs_fop_write+0x109/0x1a0 ? __vfs_write+0x33/0x160 ? __fput+0x161/0x1d0 ? vfs_write+0xb0/0x190 ? SyS_write+0x52/0xc0 ? exit_to_usermode_loop+0x7a/0xa0 ? entry_SYSCALL_64_fastpath+0x1e/0xad v2: remove unrelated oops info v3: change to take runtime pm for ggtt reset instead of get/put for each pte write flush Fixes: d650ac060237 ("drm/i915/gvt: reset the GGTT entry when vGPU created") Cc: Ping Gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 5 +++++ 1 file changed, 5 insertions(+) commit 954180aa69325feade02fa79f056fe1561f31fbb Author: Zhenyu Wang Date: Wed Apr 12 14:22:50 2017 +0800 drm/i915/gvt: remove some debug messages in scheduler timer handler As those debug messages might appear in every timer call for scheduler, it's too noisy, eat too much log and aren't meaningful. So remove them. Cc: Ping Gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/sched_policy.c | 7 +------ drivers/gpu/drm/i915/gvt/scheduler.c | 5 +---- 2 files changed, 2 insertions(+), 10 deletions(-) commit 7b6be8444e0f0dd675b54d059793423d3c9b4c03 Author: Dan Williams Date: Tue Apr 11 09:49:49 2017 -0700 dax: refactor dax-fs into a generic provider of 'struct dax_device' instances We want dax capable drivers to be able to publish a set of dax operations [1]. However, we do not want to further abuse block_devices to advertise these operations. Instead we will attach these operations to a dax device and add a lookup mechanism to go from block device path to a dax device. A dax capable driver like pmem or brd is responsible for registering a dax device, alongside a block device, and then a dax capable filesystem is responsible for retrieving the dax device by path name if it wants to call dax_operations. For now, we refactor the dax pseudo-fs to be a generic facility, rather than an implementation detail, of the device-dax use case. Where a "dax device" is just an inode + dax infrastructure, and "Device DAX" is a mapping service layered on top of that base 'struct dax_device'. "Filesystem DAX" is then a mapping service that layers a filesystem on top of that same base device. Filesystem DAX is associated with a block_device for now, but perhaps directly to a dax device in the future, or for new pmem-only filesystems. [1]: https://lkml.org/lkml/2017/1/19/880 Suggested-by: Christoph Hellwig Signed-off-by: Dan Williams drivers/Makefile | 2 +- drivers/dax/Kconfig | 10 +- drivers/dax/Makefile | 5 +- drivers/dax/dax.c | 864 -------------------------------------------- drivers/dax/dax.h | 20 +- drivers/dax/device-dax.h | 25 ++ drivers/dax/device.c | 709 ++++++++++++++++++++++++++++++++++++ drivers/dax/pmem.c | 2 +- drivers/dax/super.c | 303 ++++++++++++++++ include/linux/dax.h | 3 + tools/testing/nvdimm/Kbuild | 10 +- 11 files changed, 1070 insertions(+), 883 deletions(-) commit 5f0694b300b9fb8409272c550418c22e0e57314a Author: Dan Williams Date: Mon Jan 30 21:43:10 2017 -0800 device-dax: rename 'dax_dev' to 'dev_dax' In preparation for introducing a struct dax_device type to the kernel global type namespace, rename dax_dev to dev_dax. A 'dax_device' instance will be a generic device-driver object for any provider of dax functionality. A 'dev_dax' object is a device-dax-driver local / internal instance. Signed-off-by: Dan Williams drivers/dax/dax.c | 206 ++++++++++++++++++++++++++--------------------------- drivers/dax/dax.h | 4 +- drivers/dax/pmem.c | 8 +-- 3 files changed, 109 insertions(+), 109 deletions(-) commit 762026203c0b87b1088342b664e67ca7c45fb7c4 Author: Oliver O'Halloran Date: Wed Apr 12 01:59:36 2017 +1000 device-dax: improve fault handler debug output A couple of minor improvements to the debug output in the fault handlers: a) Print the region alignment and fault size when we sent a SIGBUS because the region alignment is greater than the fault size. b) Fix the message in the PFN_{DEV|MAP} check. c) Additionally print the fault size enum value in the huge fault handler. Signed-off-by: Oliver O'Halloran Signed-off-by: Dan Williams drivers/dax/dax.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 54eafcc9e339affb8982fd21e1fc4aa4a036655b Author: Pushkar Jambhlekar Date: Tue Apr 11 09:12:25 2017 -0700 device-dax: fix dax_dev_huge_fault() unknown fault size handling The default case for dax_dev_huge_fault() fault size handling mistakenly returns when it should unlock. This is not a problem in practice since the only three possible fault sizes are handled. Going forward, if the core mm adds a new fault size beyond pte, pmd, or pud device-dax should abort VM_FAULT_SIGBUS requests not VM_FAULT_FALLBACK since device-dax guarantees a configured fault granularity for all faults. Signed-off-by: Pushkar Jambhlekar Signed-off-by: Dan Williams drivers/dax/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bfca9acf1a5df0ff98fbf47e363adb48612bb7ec Merge: 92a3fa0 11e63f6 Author: Dan Williams Date: Wed Apr 12 21:59:01 2017 -0700 Merge branch 'for-4.11/libnvdimm' into for-4.12/dax commit efebc711180f7fed701f6e23f23814fcfda7fbfc Author: Dave Jiang Date: Fri Apr 7 15:33:36 2017 -0700 device-dax, tools/testing/nvdimm: enable device-dax with mock resources Provide a replacement pgoff_to_phys() that translates an nfit_test resource (allocated by vmalloc()) to a pfn. Signed-off-by: Dave Jiang Reviewed-by: Johannes Thumshirn Signed-off-by: Dan Williams drivers/dax/dax-private.h | 61 ++++++++++++++++++++++++++++++++++++++++++ drivers/dax/dax.c | 52 +++++------------------------------ tools/testing/nvdimm/Kbuild | 3 ++- tools/testing/nvdimm/dax-dev.c | 49 +++++++++++++++++++++++++++++++++ 4 files changed, 118 insertions(+), 47 deletions(-) commit 006358b35c73ab75544fb4509483a81ef1a9c0b2 Author: Dave Jiang Date: Fri Apr 7 15:33:31 2017 -0700 libnvdimm: add support for clear poison list and badblocks for device dax Providing mechanism to clear poison list via the ndctl ND_CMD_CLEAR_ERROR call. We will update the poison list and also the badblocks at region level if the region is in dax mode or in pmem mode and not active. In other words we force badblocks to be cleared through write requests if the address is currently accessed through a block device, otherwise it can only be done via the ioctl+dsm path. Signed-off-by: Dave Jiang Reviewed-by: Johannes Thumshirn Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 83 ++++++++++++++++++++++++++++++++++++++++++----- drivers/nvdimm/core.c | 17 +++++++--- drivers/nvdimm/region.c | 25 ++++++++++++++ include/linux/libnvdimm.h | 7 +++- 4 files changed, 118 insertions(+), 14 deletions(-) commit 802f4be6feee3f0395c26ac9717da5b15f6b8fec Author: Dave Jiang Date: Fri Apr 7 15:33:25 2017 -0700 libnvdimm: Add 'resource' sysfs attribute to regions Adding sysfs attribute in order to export the physical address of the region. This is for supporting of user app poison clear via ND_IOCTL_CLEAR_ERROR. Signed-off-by: Dave Jiang Reviewed-by: Johannes Thumshirn Signed-off-by: Dan Williams drivers/nvdimm/region_devs.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 6a6bef90425e8cba7c53919d923240559b7f247c Author: Dave Jiang Date: Fri Apr 7 15:33:20 2017 -0700 libnvdimm: add mechanism to publish badblocks at the region level badblocks sysfs file will be export at region level. When nvdimm event notifier happens for NVDIMM_REVALIATE_POISON, the badblocks in the region will be updated. Signed-off-by: Dave Jiang Reviewed-by: Johannes Thumshirn Signed-off-by: Dan Williams drivers/nvdimm/nd.h | 1 + drivers/nvdimm/region.c | 24 ++++++++++++++++++++++++ drivers/nvdimm/region_devs.c | 19 +++++++++++++++++++ 3 files changed, 44 insertions(+) commit 3c87f372695592bf86e9dab7b1ec7d439fda577b Author: Dan Williams Date: Mon Apr 3 13:52:14 2017 -0700 acpi, nfit: fix acpi_get_table leak Calls to acpi_get_table() must be paired with acpi_put_table() to undo the mapping established by acpi_tb_acquire_table(). It turns out this has no effect in practice since the NFIT will already be mapped to support the /sys/firmware/acpi/tables/NFIT attribute in sysfs. Fixes: 6b11d1d67713 ("ACPI / osl: Remove acpi_get_table_with_size()/early_acpi_os_unmap_memory() users") Cc: Lv Zheng Reported-by: Ross Zwisler Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f2668fa7f6fbb0dfa4eb2e571f8ec0c34bc66b6f Author: Linda Knippers Date: Tue Mar 7 16:35:14 2017 -0500 acpi, nfit: remove unnecessary newline The newline in MODULE_PARM_DESC causes modinfo to print the parameter data type on a separate line, which is different from all the other module parameters and could potentially cause a problem for someone parsing the output of modinfo. Signed-off-by: Linda Knippers Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba650cfcf94090a528fb9d8be467d17308311121 Author: Linda Knippers Date: Tue Mar 7 16:35:13 2017 -0500 acpi, nfit: allow specifying a default DSM family Provide the ability to request a default DSM family. If it is not supported, then fall back to the normal discovery order. This is helpful for testing platforms that support multiple DSM families. It will also allow administrators to request the DSM family that their management tools support, which may not be the first one found using the current discovery order. Signed-off-by: Linda Knippers Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 095ab4b39f91b475b07c0028c7a6a25e3cea2a86 Author: Linda Knippers Date: Tue Mar 7 16:35:12 2017 -0500 acpi, nfit: allow override of built-in bitmasks for nvdimm DSMs As it is today, we can't enable or test new NVDIMM management functions provided by new firmware and tools without changing the kernel. We also can't prevent documented DSM functions from being called in the case of buggy firmware. This patch provides a module parameter that overrides the DSM function mask that is built into the kernel. If the "disable_vendor_specific" module parameter is also used we ignore the new parameter. Signed-off-by: Linda Knippers Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit ffc10d82ff5df7087a9b737de55a69ac4f89bf56 Author: Michal Hocko Date: Mon Apr 3 09:40:23 2017 +0200 ACPI / scan: Drop support for force_remove /sys/firmware/acpi/hotplug/force_remove was presumably added to support auto offlining in the past. This is, however, inherently dangerous for some hotplugable resources like memory. The memory offlining fails when the memory is still in use and cannot be dropped or migrated. If we ignore the failure we are basically allowing for subtle memory corruption or a crash. We have actually noticed the later while hitting BUG() during the memory hotremove (remove_memory): ret = walk_memory_range(PFN_DOWN(start), PFN_UP(start + size - 1), NULL, check_memblock_offlined_cb); if (ret) BUG(); it took us quite non-trivial time realize that the customer had force_remove enabled. Even if the BUG was removed here and we could propagate the error up the call chain it wouldn't help at all because then we would hit a crash or a memory corruption later and harder to debug. So force_remove is unfixable for the memory hotremove. We haven't checked other hotplugable resources to be prone to a similar problems. Remove the force_remove functionality because it is not fixable currently. Keep the sysfs file and report an error if somebody tries to enable it. Encourage users to report about the missing functionality and work with them with an alternative solution. Reviewed-by: Lee, Chun-Yi Signed-off-by: Michal Hocko Signed-off-by: Rafael J. Wysocki Documentation/ABI/obsolete/sysfs-firmware-acpi | 8 ++++++++ Documentation/ABI/testing/sysfs-firmware-acpi | 10 ---------- drivers/acpi/internal.h | 2 -- drivers/acpi/scan.c | 16 +++------------- drivers/acpi/sysfs.c | 9 +++++---- 5 files changed, 16 insertions(+), 29 deletions(-) commit 39b64aa1c007b98727db9f501266454fa403166c Author: Rafael J. Wysocki Date: Thu Mar 30 23:36:41 2017 +0200 cpufreq: schedutil: Reduce frequencies slower The schedutil governor reduces frequencies too fast in some situations which cases undesirable performance drops to appear. To address that issue, make schedutil reduce the frequency slower by setting it to the average of the value chosen during the previous iteration of governor computations and the new one coming from its frequency selection formula. Link: https://bugzilla.kernel.org/show_bug.cgi?id=194963 Reported-by: John Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar kernel/sched/cpufreq_schedutil.c | 3 +++ 1 file changed, 3 insertions(+) commit a6a5c983b35e579071370d4eb2b4ed8ad5c18da9 Merge: ab6eb21 8cb68c8 Author: Dave Airlie Date: Thu Apr 13 10:15:45 2017 +1000 Merge tag 'drm-misc-next-fixes-2017-04-12' of git://anongit.freedesktop.org/git/drm-misc into drm-next drm-misc-next-fixes-2017-04-12 Core changes: - Fix off-by-one bug in get_property ioctl for enums/bitmasks (Daniel) Driver changes: - Add mode_fixup to dw-hdmi bridge driver to ensure mode is validated (Romain) * tag 'drm-misc-next-fixes-2017-04-12' of git://anongit.freedesktop.org/git/drm-misc: drm: Fix get_property logic fumble drm: dw-hdmi: Implement the mode_fixup drm helper commit e469b23cdec0fc8c49102882920e3951530e1740 Merge: 72f941a 162b270 Author: Ralf Baechle Date: Thu Apr 13 00:48:47 2017 +0200 Merge branch '4.11-fixes' into mips-for-linux-next commit 72f941af88a543e6a038c75b8467903b7812239c Author: Paul Burton Date: Thu Mar 30 14:27:02 2017 -0700 MIPS: Remove confusing else statement in __do_page_fault() Commit 41c594ab65fc ("[MIPS] MT: Improved multithreading support.") added an else case to an if statement in do_page_fault() (which has since gained 2 leading underscores) for some unclear reason. If the condition in the if statement evaluates true then we execute a goto & branch elsewhere anyway, so the else has no effect. Combined with an #if 0 block with misleading indentation introduced in the same commit it makes the code less clear than it could be. Remove the unnecessary else statement & de-indent the printk within the #if 0 block in order to make the code easier for humans to parse. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15842/ Signed-off-by: Ralf Baechle arch/mips/mm/fault.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 84bbabc3a452e8085cfbd745ff0bff2b89074417 Author: Juergen Gross Date: Wed Apr 12 16:36:34 2017 +0200 x86/mm: Fix dump pagetables for 4 levels of page tables Commit fdd3d8ce0ea62 ("x86/dump_pagetables: Add support for 5-level paging") introduced an error for dumping with only 4 levels by setting PGD_LEVEL_MULT to a wrong value. This is leading to e.g. addresses printed as "(null)" for ranges: x86/mm: Found insecure W+X mapping at address (null)/(null) Make PGD_LEVEL_MULT a multiple of PTRS_PER_P4D instead of PTRS_PER_PUD Fixes: fdd3d8ce0ea62 ("x86/dump_pagetables: Add support for 5-level paging") Signed-off-by: Juergen Gross Reviewed-by: Kirill A. Shutemov Link: http://lkml.kernel.org/r/20170412143634.6846-1-jgross@suse.com Signed-off-by: Thomas Gleixner arch/x86/mm/dump_pagetables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e64889823d58305a5ddb2828ae0a988c59e87d7e Author: Paul Burton Date: Thu Mar 30 12:06:13 2017 -0700 MIPS: Stengthen IPI IRQ domain sanity check Commit fbde2d7d8290 ("MIPS: Add generic SMP IPI support") introduced a sanity check that an IPI IRQ domain can be found during boot, in order to ensure that IPIs are able to be set up in systems using such domains. However it was added at a point where systems may have used an IPI IRQ domain in some situations but not others, and we could not know which were the case until runtime, so commit 578bffc82ec5 ("MIPS: Don't BUG_ON when no IPI domain is found") made that check simply skip IPI init if no domain were found in order to fix the boot for systems such as QEMU Malta. We now use IPI IRQ domains for the MIPS CPU interrupt controller, which means systems which make use of IPI IRQ domains will always do so when running on multiple CPUs. As a result we now strengthen the sanity check to ensure that an IPI IRQ domain is found when multiple CPUs are present in the system. Signed-off-by: Paul Burton Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15838/ Signed-off-by: Ralf Baechle arch/mips/kernel/smp.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 1eed40043579608e16509c43eeeb3a53a8a42378 Author: Paul Burton Date: Thu Mar 30 12:06:12 2017 -0700 MIPS: smp-mt: Use CPU interrupt controller IPI IRQ domain support Remove the smp-mt IPI code that supported single-core multithreaded systems and instead make use of the IPI IRQ domain support provided by the MIPS CPU interrupt controller driver. This removes some less than nice code, the horrible split between arch & board code and the duplication that led to within board code. The lantiq portion of this patch has only been compile tested. Malta has been tested & is functional. Signed-off-by: Paul Burton Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15837/ Signed-off-by: Ralf Baechle arch/mips/kernel/smp-mt.c | 49 ++---------------------- arch/mips/lantiq/irq.c | 52 -------------------------- arch/mips/mti-malta/malta-int.c | 83 ++--------------------------------------- 3 files changed, 8 insertions(+), 176 deletions(-) commit 3838a547fda22a37faab5770d01acd72aaeabbf6 Author: Paul Burton Date: Thu Mar 30 12:06:11 2017 -0700 irqchip: mips-cpu: Introduce IPI IRQ domain support Introduce support for registering an IPI IRQ domain suitable for use by systems using the MIPS MT (multithreading) ASE within a single core. This will allow for such systems to be supported generically, without the current kludge of IPI code split between the MIPS arch & the malta board support code. Signed-off-by: Paul Burton Acked-by: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15836/ Signed-off-by: Ralf Baechle drivers/irqchip/Kconfig | 2 + drivers/irqchip/irq-mips-cpu.c | 125 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 119 insertions(+), 8 deletions(-) commit 131735afc1838997da2c151b614b13f0352cf448 Author: Paul Burton Date: Thu Mar 30 12:06:10 2017 -0700 irqchip: mips-cpu: Prepare for non-legacy IRQ domains The various struct irq_chip callbacks in the MIPS CPU interrupt controller driver have been calculating the hardware interrupt number by subtracting MIPS_CPU_IRQ_BASE from the virq number. This presumes a linear mapping beginning from MIPS_CPU_IRQ_BASE, and this will not hold once an IPI IRQ domain is introduced. Switch to using the hwirq field of struct irq_data which already contains the hardware interrupt number instead of attempting to calculate it. Similarly, plat_irq_dispatch calculated the virq number by adding MIPS_CPU_IRQ_BASE to the hardware interrupt number. Ready this for the introduction of an IPI IRQ domain by instead using irq_linear_revmap. Signed-off-by: Paul Burton Acked-by: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15835/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-cpu.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit c0cfbe6941085f2ebd58e645c10f8836b6d28fe9 Author: Paul Burton Date: Thu Mar 30 12:06:09 2017 -0700 irqchip: mips-cpu: Replace magic 0x100 with IE_SW0 Replace use of the magic number 0x100 (ie. bit 8) with the more explanatory IE_SW0 (ie. interrupt enable for software interrupt 0) or C_SW0 (ie. cause bit for software interrupt 0) as appropriate. Signed-off-by: Paul Burton Acked-by: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15834/ Signed-off-by: Ralf Baechle drivers/irqchip/irq-mips-cpu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ebf003f0cfb3705e60d40dedc3ec949176c741af Author: Matthias Kaehlcke Date: Wed Apr 12 12:43:52 2017 -0700 kbuild: Consolidate header generation from ASM offset information Largely redundant code is used in different places to generate C headers from offset information extracted from assembly language output. Consolidate the code in Makefile.lib and use this instead. Signed-off-by: Matthias Kaehlcke Signed-off-by: Masahiro Yamada Kbuild | 25 ------------------------- arch/ia64/kernel/Makefile | 26 ++------------------------ scripts/Makefile.lib | 28 ++++++++++++++++++++++++++++ scripts/mod/Makefile | 28 ++-------------------------- 4 files changed, 32 insertions(+), 75 deletions(-) commit af22a610bc38508d5ea760507d31be6b6983dfa8 Author: Carlo Caione Date: Thu Apr 6 12:18:17 2017 +0200 HID: asus: support backlight on USB keyboards The latest USB keyboards shipped on several ASUS laptop models (including ROG laptop models such as GL702VMK) have the keyboards backlight controlled by the keyboard firmware. The firmware implements at least 3 different commands: - Init command (to use when the system starts) - Configuration command (to get keyboard status/information) - Backlight level control (to change the level of the keyboard light) With this patch we create the usual 'asus::kbd_backlight' led class entry to control the keyboard backlight. [jkosina@suse.cz: remove pointless cancel_work_sync() call while handling an error in asus_kbd_register_leds(), as spotted by Benjamin] Signed-off-by: Carlo Caione Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 1 + drivers/hid/hid-asus.c | 183 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 183 insertions(+), 1 deletion(-) commit 6748cb3c299de1ffbe56733647b01dbcc398c419 Author: Behan Webster Date: Mon Mar 27 18:19:09 2017 -0700 kbuild: use -Oz instead of -Os when using clang This generates smaller resulting object code when compiled with clang. Signed-off-by: Behan Webster Signed-off-by: Matthias Kaehlcke Signed-off-by: Masahiro Yamada Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ab6eb211b07a42a6346e284056422fd9a8576a99 Merge: d455937 e4bac40 Author: Dave Airlie Date: Thu Apr 13 06:17:40 2017 +1000 Merge tag 'drm/panel/for-4.12-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/panel: Changes for v4.12-rc1 This contains two new drivers for a Sitronix and a Samsung panel as well as two new panels supported by the panel-simple driver. * tag 'drm/panel/for-4.12-rc1' of git://anongit.freedesktop.org/tegra/linux: drm/panel: simple: Add support for Winstar WF35LTIACD devicetree: add vendor prefix for Winstar Display Corp. drm/panel: Add driver for sitronix ST7789V LCD controller dt-bindings: display: panel: Add bindings for the Sitronix ST7789V panel drm/panel: Add support for S6E3HA2 panel driver on TM2 board dt-bindings: Add support for Samsung s6e3ha2 panel binding drm/panel: simple: Add support for Ampire AM-480272H3TMQW-T01H dt-bindings: Add Ampire AM-480272H3TMQW-T01H panel commit 081f36a8c2e0ae56f33ba6b12389b290a49b6508 Author: Sebastian Reichel Date: Tue Mar 28 17:59:37 2017 +0200 Bluetooth: hci_serdev: allow modular drivers For bluetooth protocol driver only supporting serdev it makes sense to follow common practice and built them into their own module. Such modules need access to hci_uart_register_device and hci_uart_tx_wakeup for using the common protocol helpers. Signed-off-by: Sebastian Reichel Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ldisc.c | 1 + drivers/bluetooth/hci_serdev.c | 1 + 2 files changed, 2 insertions(+) commit 52b318e6196169e5ff8a52371833cd5a9dba05d1 Author: Sebastian Reichel Date: Tue Mar 28 17:59:36 2017 +0200 Bluetooth: hci_serdev: do not open device in hci open The device driver may need to communicate with the UART device while the Bluetooth device is closed (e.g. due to interrupts). Acked-by: Pavel Machek Signed-off-by: Sebastian Reichel Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_serdev.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 82f5169bf3d3b5d8f7f7c437d2d83435173cb638 Author: Rob Herring Date: Tue Mar 28 17:59:35 2017 +0200 Bluetooth: hci_uart: add serdev driver support library This adds library functions for serdev based BT drivers. This is largely copied from hci_ldisc.c and modified to use serdev calls. There's a little bit of duplication, but I avoided intermixing this as the ldisc code should eventually go away. Signed-off-by: Rob Herring Cc: Marcel Holtmann Cc: Gustavo Padovan Cc: Johan Hedberg Cc: linux-bluetooth@vger.kernel.org Acked-by: Pavel Machek [Fix style issues reported by Pavel] Signed-off-by: Sebastian Reichel Signed-off-by: Marcel Holtmann drivers/bluetooth/Makefile | 1 + drivers/bluetooth/hci_serdev.c | 361 +++++++++++++++++++++++++++++++++++++++++ drivers/bluetooth/hci_uart.h | 4 + 3 files changed, 366 insertions(+) commit aeac30140694824f26d14655271e1dcf3e32fd49 Author: Sebastian Reichel Date: Tue Mar 28 17:59:34 2017 +0200 Bluetooth: hci_uart: add support for word alignment This will be used by Nokia's H4+ protocol, which uses 2-byte aligned packets. Acked-by: Pavel Machek Signed-off-by: Sebastian Reichel Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_h4.c | 17 +++++++++++++++++ drivers/bluetooth/hci_ldisc.c | 4 ++++ drivers/bluetooth/hci_uart.h | 3 +++ 3 files changed, 24 insertions(+) commit 756db778748949f6403b727fc6251674dbfcb1a2 Author: Sebastian Reichel Date: Tue Mar 28 17:59:33 2017 +0200 serdev: add helpers for cts and rts handling Add serdev helper functions for handling of cts and rts lines using the serdev's tiocm functions. Acked-by: Rob Herring Signed-off-by: Sebastian Reichel Acked-by: Greg Kroah-Hartman Signed-off-by: Marcel Holtmann include/linux/serdev.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 5659dab26f09a60db8bd1600e1ce89802fab1c7f Author: Sebastian Reichel Date: Tue Mar 28 17:59:32 2017 +0200 serdev: implement get/set tiocm Add method for getting and setting tiocm. Acked-by: Pavel Machek Acked-by: Rob Herring Signed-off-by: Sebastian Reichel Acked-by: Greg Kroah-Hartman Signed-off-by: Marcel Holtmann drivers/tty/serdev/core.c | 22 ++++++++++++++++++++++ drivers/tty/serdev/serdev-ttyport.c | 24 ++++++++++++++++++++++++ include/linux/serdev.h | 13 +++++++++++++ 3 files changed, 59 insertions(+) commit b3f80c8f75efb2e6a817a0e48bf36cd30685a138 Author: Sebastian Reichel Date: Tue Mar 28 17:59:31 2017 +0200 serdev: add serdev_device_wait_until_sent Add method, which waits until the transmission buffer has been sent. Note, that the change in ttyport_write_wakeup is related, since tty_wait_until_sent will hang without that change. Acked-by: Rob Herring Acked-by: Pavel Machek Signed-off-by: Sebastian Reichel Acked-by: Greg Kroah-Hartman Signed-off-by: Marcel Holtmann drivers/tty/serdev/core.c | 11 +++++++++++ drivers/tty/serdev/serdev-ttyport.c | 18 ++++++++++++++---- include/linux/serdev.h | 3 +++ 3 files changed, 28 insertions(+), 4 deletions(-) commit 2f09276769a1f9c515e7767284fb188198ddfed7 Author: Sebastian Reichel Date: Tue Mar 28 17:59:30 2017 +0200 tty: serial: omap: add UPF_BOOT_AUTOCONF flag for DT init The UPF_BOOT_AUTOCONF flag is needed for proper flow control support. Acked-by: Pavel Machek Signed-off-by: Sebastian Reichel Acked-by: Greg Kroah-Hartman Signed-off-by: Marcel Holtmann drivers/tty/serial/omap-serial.c | 3 +++ 1 file changed, 3 insertions(+) commit 258695222bdb89071aebe60554f5246927817a89 Author: Patrik Flykt Date: Tue Apr 11 22:21:03 2017 +0300 bluetooth: Do not set IFF_POINTOPOINT The IPv6 stack needs to send and receive Neighbor Discovery messages. Remove the IFF_POINTOPOINT flag. Signed-off-by: Patrik Flykt Acked-by: Jukka Rissanen Reviewed-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann net/bluetooth/6lowpan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 814f1b243d2c63928f6aa72d66bec0e5fae2f4a9 Author: Luiz Augusto von Dentz Date: Tue Apr 11 22:21:02 2017 +0300 Bluetooth: 6lowpan: Set tx_queue_len to DEFAULT_TX_QUEUE_LEN Make netdev queue packets if we run out of credits. Signed-off-by: Luiz Augusto von Dentz Acked-by: Jukka Rissanen Signed-off-by: Marcel Holtmann net/bluetooth/6lowpan.c | 2 ++ 1 file changed, 2 insertions(+) commit 8a505b7f39f7fb2d3a2b25bfaa2f18d2ce010eef Author: Luiz Augusto von Dentz Date: Tue Apr 11 22:21:01 2017 +0300 Bluetooth: L2CAP: Add l2cap_le_flowctl_send Consolidate code sending data to LE CoC channels and adds proper accounting of packets sent, the remaining credits and how many packets are queued. Signed-off-by: Luiz Augusto von Dentz Acked-by: Jukka Rissanen Signed-off-by: Marcel Holtmann net/bluetooth/l2cap_core.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit f183e52b8ef3d62c795b0fe2228400ac48f6cae6 Author: Luiz Augusto von Dentz Date: Tue Apr 11 22:21:00 2017 +0300 Bluetooth: 6lowpan: Use netif APIs to flow control Rely on netif_wake_queue and netif_stop_queue to flow control when transmit resources are unavailable. Signed-off-by: Luiz Augusto von Dentz Acked-by: Jukka Rissanen Signed-off-by: Marcel Holtmann net/bluetooth/6lowpan.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit e1008f95e1e7762fade7ccbc973247a3b32edddb Author: Luiz Augusto von Dentz Date: Tue Apr 11 22:20:59 2017 +0300 Bluetooth: 6lowpan: Don't drop packets when run out of credits Since l2cap_chan_send will now queue the packets there is no point in checking the credits anymore. Signed-off-by: Luiz Augusto von Dentz Acked-by: Jukka Rissanen Signed-off-by: Marcel Holtmann net/bluetooth/6lowpan.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 24dcbf66220564cdb23129aa3854b49532b1a9d8 Author: Luiz Augusto von Dentz Date: Tue Apr 11 22:20:58 2017 +0300 6lowpan: Don't set IFF_NO_QUEUE There is no point in setting IFF_NO_QUEUE should already have taken care of setting it if tx_queue_len is not set, in fact this may actually disable queue for interfaces that require it and do set tx_queue_len. Signed-off-by: Luiz Augusto von Dentz Acked-by: Jukka Rissanen Signed-off-by: Marcel Holtmann net/6lowpan/core.c | 1 - 1 file changed, 1 deletion(-) commit 03732141bf23378b31e266a1da5a8f51f9e35cbe Author: Luiz Augusto von Dentz Date: Mon Apr 3 17:48:57 2017 +0300 Bluetooth: L2CAP: Don't return -EAGAIN if out of credits Just keep queueing them into TX queue since the caller might just have to do the same and there is no impact in adding another packet to the TX queue even if there aren't any credits to transmit them. Signed-off-by: Luiz Augusto von Dentz Acked-by: Jukka Rissanen Signed-off-by: Marcel Holtmann net/bluetooth/l2cap_core.c | 3 --- 1 file changed, 3 deletions(-) commit da75fdc6bdccaf99220757cd1ac33cec72cfebb1 Author: Luiz Augusto von Dentz Date: Mon Apr 3 17:48:56 2017 +0300 Bluetooth: 6lowpan: Print errors during recv_pkt This makes should make it more clear why a packet is being dropped. Signed-off-by: Luiz Augusto von Dentz Acked-by: Jukka Rissanen Signed-off-by: Marcel Holtmann net/bluetooth/6lowpan.c | 2 ++ 1 file changed, 2 insertions(+) commit 27ce68a37b0bd86123571e1e76b9bdb362d109e0 Author: Luiz Augusto von Dentz Date: Mon Apr 3 17:48:55 2017 +0300 Bluetooth: 6lowpan: Remove unnecessary peer lookup During chan_recv_cb there is already a peer lookup which can be passed to recv_pkt directly instead of the channel. Signed-off-by: Luiz Augusto von Dentz Acked-by: Jukka Rissanen Signed-off-by: Marcel Holtmann net/bluetooth/6lowpan.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit c8ba804437d6311f61e4ca77a1cf43ce6a17bd21 Author: Xinming Hu Date: Fri Mar 31 14:32:32 2017 +0800 Bluetooth: btmrvl: remove unnecessary wakeup interrupt number sanity check Sanity check of interrupt number in interrupt handler is unnecessary and confusion, remove it. Reported-by: Guenter Roeck Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_sdio.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 6eb7bd66830c1e1919aa4006d7eb288873b0f806 Author: Xinming Hu Date: Fri Mar 31 14:32:31 2017 +0800 Bluetooth: btmrvl: disable platform wakeup interrupt in suspend failure path Host sleep handshake with device might been fail, disable platform wakeup interrupt in this case. Reported-by: Guenter Roeck Signed-off-by: Xinming Hu Signed-off-by: Amitkumar Karwar Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_sdio.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6dea44f5acc3d63fbaa992146e92252329d9a2be Author: Michael Scott Date: Tue Mar 28 23:10:18 2017 -0700 Bluetooth: 6lowpan: fix use after free in chan_suspend/resume A status field in the skb_cb struct was storing a channel status based on channel suspend/resume events. This stored status was then used to return EAGAIN if there were packet sending issues in snd_pkt(). The issue is that the skb has been freed by the time the callback to 6lowpan's suspend/resume was called. So, this generates a "use after free" issue that was noticed while running kernel tests with KASAN debug enabled. Let's eliminate the status field entirely as we can use the channel tx_credits to indicate whether we should return EAGAIN when handling packets. Signed-off-by: Michael Scott Acked-by: Jukka Rissanen Signed-off-by: Marcel Holtmann net/bluetooth/6lowpan.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) commit d2891c4d071d807f01cc911dc42a68f4568d65cf Author: Michael Scott Date: Tue Mar 28 23:10:54 2017 -0700 Bluetooth: 6lowpan: fix delay work init in add_peer_chan() When adding 6lowpan devices very rapidly we sometimes see a crash: [23122.306615] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.9.0-43-arm64 #1 Debian 4.9.9.linaro.43-1 [23122.315400] Hardware name: HiKey Development Board (DT) [23122.320623] task: ffff800075443080 task.stack: ffff800075484000 [23122.326551] PC is at expire_timers+0x70/0x150 [23122.330907] LR is at run_timer_softirq+0xa0/0x1a0 [23122.335616] pc : [] lr : [] pstate: 600001c5 This was due to add_peer_chan() unconditionally initializing the lowpan_btle_dev->notify_peers delayed work structure, even if the lowpan_btle_dev passed into add_peer_chan() had previously been initialized. Normally, this would go unnoticed as the delayed work timer is set for 100 msec, however when calling add_peer_chan() faster than 100 msec it clears out a previously queued delay work causing the crash above. To fix this, let add_peer_chan() know when a new lowpan_btle_dev is passed in so that it only performs the delay work initialization when needed. Signed-off-by: Michael Scott Acked-by: Jukka Rissanen Signed-off-by: Marcel Holtmann net/bluetooth/6lowpan.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit dcb9cfaa5ea9aa0ec08aeb92582ccfe3e4c719a9 Author: Johan Hovold Date: Wed Mar 29 18:15:28 2017 +0200 Bluetooth: hci_intel: add missing tty-device sanity check Make sure to check the tty-device pointer before looking up the sibling platform device to avoid dereferencing a NULL-pointer when the tty is one end of a Unix98 pty. Fixes: 74cdad37cd24 ("Bluetooth: hci_intel: Add runtime PM support") Fixes: 1ab1f239bf17 ("Bluetooth: hci_intel: Add support for platform driver") Cc: stable # 4.3 Cc: Loic Poulain Signed-off-by: Johan Hovold Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_intel.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 95065a61e9bf25fb85295127fba893200c2bbbd8 Author: Johan Hovold Date: Wed Mar 29 18:15:27 2017 +0200 Bluetooth: hci_bcm: add missing tty-device sanity check Make sure to check the tty-device pointer before looking up the sibling platform device to avoid dereferencing a NULL-pointer when the tty is one end of a Unix98 pty. Fixes: 0395ffc1ee05 ("Bluetooth: hci_bcm: Add PM for BCM devices") Cc: stable # 4.3 Cc: Frederic Danis Signed-off-by: Johan Hovold Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 941825e11424f00f9a76c944c16f677aadfe3515 Author: Colin Ian King Date: Wed Mar 29 18:05:40 2017 +0100 ieee802154: ca8210: Add checks for kmalloc allocation failures Ensure we don't end up with a null pointer dereferences by checking for for allocation failures. Allocate by sizeof(*ptr) rather than the type to fix checkpack warnings. Also merge multiple lines into one line for the kmalloc call. Detected by CoverityScan, CID#1422435 ("Dereference null return value") Signed-off-by: Colin Ian King Signed-off-by: Marcel Holtmann drivers/net/ieee802154/ca8210.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit f1554b7b2c27cedee6c772dab954629987690110 Author: prasanna karthik Date: Tue Mar 28 19:44:00 2017 +0000 Bluetooth: btmrvl: cleanup code in return from btmrvl_sdio_suspend() Else is not generally useful after a break or return Signed-off-by: Prasanna Karthik Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_sdio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fa0eaf840adc3df8df914ee211502bc3e5d57508 Author: Colin Ian King Date: Tue Mar 28 13:11:29 2017 +0100 6lowpan: fix assignment of peer_addr The data from peer->chan->dst is not being copied to peer_addr, the current code just updates the pointer and not the contents of what it points to. Fix this with the intended assignment. Detected by CoverityScan, CID#1422111 ("Parse warning (PW.PARAM_SET_BUT_NOT_USED)") Fixes: fb6f2f606ce8 ("6lowpan: Fix IID format for Bluetooth") Signed-off-by: Colin Ian King Reviewed-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann net/bluetooth/6lowpan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b1cfcbd282498f7db452175222b68b96421e409 Author: Harry Morris Date: Tue Mar 28 13:09:00 2017 +0100 ieee802154: Add entry in MAINTAINTERS for CA8210 driver Signed-off-by: Harry Morris Acked-by: Stefan Schmidt Signed-off-by: Marcel Holtmann MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit ab3916f7fe9dd52026566fb534f5834683f0d578 Author: Harry Morris Date: Tue Mar 28 13:08:59 2017 +0100 ieee802154: Add device tree documentation for CA8210 Signed-off-by: Harry Morris Acked-by: Stefan Schmidt Signed-off-by: Marcel Holtmann .../devicetree/bindings/net/ieee802154/ca8210.txt | 28 ++++++++++++++++++++++ .../devicetree/bindings/vendor-prefixes.txt | 1 + 2 files changed, 29 insertions(+) commit ded845a781a578dfb0b5b2c138e5a067aa3b1242 Author: Harry Morris Date: Tue Mar 28 13:08:58 2017 +0100 ieee802154: Add CA8210 IEEE 802.15.4 device driver Add driver source and config for softMAC implementation of Cascoda's CA8210 IEEE 802.15.4 transceiver device. The driver mimics a common PHY-only implementation despite the CA8210 being a hardMAC device which exposes a SAP interface to the fully integrated MAC. The chip is a modem-only device with an integrated processor which runs the 802.15.4 MAC. The chip communicates via full-duplex SPI with additional pins for NIRQ and NRESET. The chip can also output its 16MHz clock to a GPIO with a configurable divider. The driver can be configured to implement a debugfs node that provides access to the SAP-based API to drive mechanisms not currently supported by the standard kernel interface. Signed-off-by: Harry Morris Signed-off-by: Marcel Holtmann drivers/net/ieee802154/Kconfig | 22 + drivers/net/ieee802154/Makefile | 1 + drivers/net/ieee802154/ca8210.c | 3240 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 3263 insertions(+) commit 212d71833315c65644efc46223db61dee7b3c68e Author: Andy Shevchenko Date: Fri Mar 10 14:28:20 2017 +0200 Bluetooth: hci_bcm: Support platform enumeration Until now the driver supports only ACPI enumeration. Nevertheless Intel Edison SoM has Broadcom Wi-Fi + BT chip and neither ACPI nor DT enumeration mechanism. Enable pure platform driver in order to support Intel Edison SoM. Cc: Jarkko Nikula Signed-off-by: Andy Shevchenko Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 50 ++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 17 deletions(-) commit 17e41ea6db92226df1acbe18e48b36bf59780d32 Author: Jeffy Chen Date: Fri Feb 24 14:24:30 2017 +0800 Bluetooth: btmrvl: wake system up when receives a wake irq Currrently we are disabling this wake irq after receiving it. If this happens before we finish suspend and the pm event check is disabled, the system will continue suspending, and this irq would not work again. We may need to abort system suspend to avoid that. Signed-off-by: Jeffy Chen Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_sdio.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 017789f37b9b5ade5850c9d81c33a5b2b91ef087 Author: Jeffy Chen Date: Fri Feb 24 14:24:29 2017 +0800 Bluetooth: btusb: wake system up when receives a wake irq Currrently we are disabling this wake irq after receiving it. If this happens before we finish suspend and the pm event check is disabled, the system will continue suspending, and this irq would not work again. We may need to abort system suspend to avoid that. Signed-off-by: Jeffy Chen Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 2 ++ 1 file changed, 2 insertions(+) commit abed84a0d53bac543771849af07a9a6254ce93b7 Author: Larry Finger Date: Sun Feb 19 20:04:57 2017 -0600 Bluetooth: btrtl: Change message for missing config file The message concerning missing config files for 8723b, 8821a, and 8761a should have been issued with BT_INFO() rather than BT_ERR() as this condition is not fatal. After looking at that code, I have reworked the logic to log such messages only if the device needs such a config file. At the moment, only the 8822b fits that description. Signed-off-by: Larry Finger Acked-by: 陆朱伟 Signed-off-by: Marcel Holtmann drivers/bluetooth/btrtl.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 1eef1c35006e69755330e721bf0789bbe0b1f7d3 Author: Gabriel Date: Mon Feb 20 12:32:22 2017 -0500 Bluetooth: Added support for Rivet Networks Killer 1535 Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 1 + 1 file changed, 1 insertion(+) commit b48c3b59a32932d80e3032e2e97eb2751208390a Author: Jonas Holmberg Date: Thu Feb 23 15:17:02 2017 +0100 Bluetooth: Change initial min and max interval Use the initial connection interval recommended in Bluetooth Specification v4.2 (30ms - 50ms). Signed-off-by: Jonas Holmberg Signed-off-by: Marcel Holtmann net/bluetooth/hci_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cd50361c21b788a29f4661a6c49260eac2b13435 Author: Colin Ian King Date: Wed Mar 1 15:10:53 2017 +0000 Bluetooth: fix assignments on error variable err Variable err is being initialized to zero and then later being set to the error return from the call to hci_req_run_skb; hence we can remove the redundant initialization to zero. Also on two occassions err is not being set from the error return from the call to hci_req_run_skb, so add these missing assignments. Signed-off-by: Colin Ian King Signed-off-by: Marcel Holtmann net/bluetooth/amp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6c7bb7ebb58c0e17b11aebf928ffc5c295959a01 Author: Tedd Ho-Jeong An Date: Mon Mar 6 15:38:35 2017 -0800 Bluetooth: hci_intel: Add support Intel Bluetooth device 9160/9260 for UART This patch adds support for Intel Bluetooth device 9160/9260 also known as ThunderPeak(ThP) for UART. Signed-off-by: Tedd Ho-Jeong An Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_intel.c | 1 + 1 file changed, 1 insertion(+) commit b7da6a69defd195da66bfd6b35efeb376a252557 Author: Tedd Ho-Jeong An Date: Mon Mar 6 15:38:32 2017 -0800 Bluetooth: hci_intel: Fix firmware file name to use hw_variant The format of Intel Bluetooth firmware for bootloader product is ibt--.sfi and .ddc. This patch uses a hw_variant value read from the device during runtime to form the firmware filenames instead of using a constant value, so it can support multiple prouducts. Signed-off-by: Tedd Ho-Jeong An Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_intel.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit de766142e3a5fcb67096e24ca4233a7f60999468 Author: Marcel Holtmann Date: Mon Mar 6 15:38:28 2017 -0800 Bluetooth: btusb: Add support for Intel Bluetooth devices 9160/9260 [8087:0025] The new Bluetooth devices 9160/9260 (also known as ThunderPeak) devices from Intel use the same firmware loading mechanism as previous generation. So include the new USB product identifier and whitelist the hardware variant. T: Bus=02 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#= 8 Spd=12 MxCh= 0 D: Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=8087 ProdID=0025 Rev= 0.02 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms Bluetooth: hci0: Bootloader revision 0.1 build 42 week 52 2015 Bluetooth: hci0: Device revision is 2 Bluetooth: hci0: Secure boot is enabled Bluetooth: hci0: OTP lock is disabled Bluetooth: hci0: API lock is disabled Bluetooth: hci0: Debug lock is disabled Bluetooth: hci0: Minimum firmware build 1 week 10 2014 < HCI Command: Read Local Version Information (0x04|0x0001) plen 0 > HCI Event: Command Complete (0x0e) plen 12 Read Local Version Information (0x04|0x0001) ncmd 1 Status: Success (0x00) HCI version: Bluetooth 5.0 (0x09) - Revision 256 (0x0100) LMP version: Bluetooth 5.0 (0x09) - Subversion 256 (0x0100) Manufacturer: Intel Corp. (2) Based on original patch from Jaya Praveen G Signed-off-by: Marcel Holtmann Tested-by: Tedd Ho-Jeong An Signed-off-by: Tedd Ho-Jeong An Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 2 ++ 1 file changed, 2 insertions(+) commit 9268834b60c0b08101c7a8522b6901cf4cd57a14 Author: Tedd Ho-Jeong An Date: Mon Mar 6 15:38:26 2017 -0800 Bluetooth: Use switch statement for Intel hardware variants Multiple new hardware variants are planned and the simple if statement would get really complicated and unreadable. So instead replace it with a simple switch statement. The change is applied to both USB and UART. Based-on-patch-by: Marcel Holtmann Signed-off-by: Tedd Ho-Jeong An Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 10 +++++++--- drivers/bluetooth/hci_intel.c | 17 +++++++++++------ 2 files changed, 18 insertions(+), 9 deletions(-) commit d8edd9ed156a1a840f1b1c2dbbf458684d6eea6e Author: Marcin Kraglak Date: Wed Mar 8 14:09:41 2017 +0100 Bluetooth: L2CAP: Fix L2CAP_CR_SCID_IN_USE value Fix issue found during L2CAP qualification test TP/LE/CFC/BV-20-C. Signed-off-by: Marcin Kraglak Signed-off-by: Marcel Holtmann include/net/bluetooth/l2cap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27bfbc21a0c0f711fa5382de026c7c0700c9ea28 Author: Dean Jenkins Date: Fri Mar 10 11:34:46 2017 +0000 Bluetooth: Avoid bt_accept_unlink() double unlinking There is a race condition between a thread calling bt_accept_dequeue() and a different thread calling bt_accept_unlink(). Protection against concurrency is implemented using sk locking. However, sk locking causes serialisation of the bt_accept_dequeue() and bt_accept_unlink() threads. This serialisation can cause bt_accept_dequeue() to obtain the sk from the parent list but becomes blocked waiting for the sk lock held by the bt_accept_unlink() thread. bt_accept_unlink() unlinks sk and this thread releases the sk lock unblocking bt_accept_dequeue() which potentially runs bt_accept_unlink() again on the same sk causing a crash. The attempt to double unlink the same sk from the parent list can cause a NULL pointer dereference crash due to bt_sk(sk)->parent becoming NULL on the first unlink, followed by the second unlink trying to execute bt_sk(sk)->parent->sk_ack_backlog-- in bt_accept_unlink() which crashes. When sk is in the parent list, bt_sk(sk)->parent will be not be NULL. When sk is removed from the parent list, bt_sk(sk)->parent is set to NULL. Therefore, add a defensive check for bt_sk(sk)->parent not being NULL to ensure that sk is still in the parent list after the sk lock has been taken in bt_accept_dequeue(). If bt_sk(sk)->parent is detected as being NULL then restart the loop so that the loop variables are refreshed to use the latest values. This is necessary as list_for_each_entry_safe() is not thread safe so causing a risk of an infinite loop occurring as sk could point to itself. In addition, in bt_accept_dequeue() increase the sk reference count to protect against early freeing of sk. Early freeing can be possible if the bt_accept_unlink() thread calls l2cap_sock_kill() or rfcomm_sock_kill() functions before bt_accept_dequeue() gets the sk lock. For test purposes, the probability of failure can be increased by putting a msleep of 1 second in bt_accept_dequeue() between getting the sk and waiting for the sk lock. This exposes the fact that the loop list_for_each_entry_safe(p, n, &bt_sk(parent)->accept_q) is not safe from threads that unlink sk from the list in parallel with the loop which can cause sk to become stale within the loop. Signed-off-by: Dean Jenkins Signed-off-by: Marcel Holtmann net/bluetooth/af_bluetooth.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit e163376220169170f3945703a600083f1792aaf8 Author: Dean Jenkins Date: Fri Mar 10 11:34:45 2017 +0000 Bluetooth: Handle bt_accept_enqueue() socket atomically There is a small risk that bt_accept_unlink() runs concurrently with bt_accept_enqueue() on the same socket. This scenario could potentially lead to a NULL pointer dereference of the socket's parent member because the socket can be on the list but the socket's parent member is not yet updated by bt_accept_enqueue(). Therefore, add socket locking inside bt_accept_enqueue() so that the socket is added to the list AND the parent's socket address is set in the socket's parent member. The socket locking ensures that the socket is on the list with a valid non-NULL parent member. Signed-off-by: Dean Jenkins Signed-off-by: Marcel Holtmann net/bluetooth/af_bluetooth.c | 2 ++ 1 file changed, 2 insertions(+) commit 459848564f5186bf033a5c1cc33c2cb3b284066e Author: Geliang Tang Date: Sat Mar 11 08:46:58 2017 +0800 Bluetooth: bluecard: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Marcel Holtmann drivers/bluetooth/bluecard_cs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9dae2e030319811e9cdaa260faaa151cf0866186 Author: Luiz Augusto von Dentz Date: Sun Mar 12 10:19:38 2017 +0200 6lowpan: Fix IID format for Bluetooth According to RFC 7668 U/L bit shall not be used: https://wiki.tools.ietf.org/html/rfc7668#section-3.2.2 [Page 10]: In the figure, letter 'b' represents a bit from the Bluetooth device address, copied as is without any changes on any bit. This means that no bit in the IID indicates whether the underlying Bluetooth device address is public or random. |0 1|1 3|3 4|4 6| |0 5|6 1|2 7|8 3| +----------------+----------------+----------------+----------------+ |bbbbbbbbbbbbbbbb|bbbbbbbb11111111|11111110bbbbbbbb|bbbbbbbbbbbbbbbb| +----------------+----------------+----------------+----------------+ Because of this the code cannot figure out the address type from the IP address anymore thus it makes no sense to use peer_lookup_ba as it needs the peer address type. Signed-off-by: Luiz Augusto von Dentz Reviewed-by: Stefan Schmidt Acked-by: Jukka Rissanen Signed-off-by: Marcel Holtmann include/net/6lowpan.h | 4 --- net/bluetooth/6lowpan.c | 79 ++++++++----------------------------------------- net/ipv6/addrconf.c | 6 +++- 3 files changed, 17 insertions(+), 72 deletions(-) commit fa09ae661fb5ab6f9826545d5128f2b7393bcf4a Author: Luiz Augusto von Dentz Date: Sun Mar 12 10:19:37 2017 +0200 6lowpan: Use netdev addr_len to determine lladdr len This allow technologies such as Bluetooth to use its native lladdr which is eui48 instead of eui64 which was expected by functions like lowpan_header_decompress and lowpan_header_compress. Signed-off-by: Luiz Augusto von Dentz Reviewed-by: Stefan Schmidt Signed-off-by: Marcel Holtmann include/net/6lowpan.h | 19 +++++++++++++++++++ net/6lowpan/iphc.c | 49 ++++++++++++++++++++++++++++++++++++++----------- net/bluetooth/6lowpan.c | 42 ++++++------------------------------------ 3 files changed, 63 insertions(+), 47 deletions(-) commit 8a7a4b476719df1e06f8eae837b13bdf79908843 Author: Alexander Aring Date: Sun Mar 12 10:19:36 2017 +0200 ipv6: addrconf: fix 48 bit 6lowpan autoconfiguration This patch adds support for 48 bit 6LoWPAN address length autoconfiguration which is the case for BTLE 6LoWPAN. Signed-off-by: Alexander Aring Signed-off-by: Luiz Augusto von Dentz Reviewed-by: Stefan Schmidt Acked-by: David S. Miller Signed-off-by: Marcel Holtmann net/ipv6/addrconf.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 94e4a68039cc0c9d6e5cf708819cb8c7e770ebbf Author: Alexander Aring Date: Sun Mar 12 10:19:35 2017 +0200 6lowpan: iphc: override l2 packet information The skb->pkt_type need to be set by L2, but on 6LoWPAN there exists L2 e.g. BTLE which doesn't has multicast addressing. If it's a multicast or not is detected by IPHC headers multicast bit. The IPv6 layer will evaluate this pkt_type, so we force set this type while uncompressing. Should be okay for 802.15.4 as well. Signed-off-by: Alexander Aring Reviewed-by: Stefan Schmidt Signed-off-by: Marcel Holtmann net/6lowpan/iphc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit be054fc830ff70aced3533fffc6b851fa604d241 Author: Patrik Flykt Date: Sun Mar 12 10:19:34 2017 +0200 6lowpan: Set MAC address length according to LOWPAN_LLTYPE Set MAC address length according to the 6LoWPAN link layer in use. Bluetooth Low Energy uses 48 bit addressing while IEEE802.15.4 uses 64 bits. Signed-off-by: Patrik Flykt Reviewed-by: Stefan Schmidt Signed-off-by: Marcel Holtmann net/6lowpan/core.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit c259d1413b195c57e708f324eed41668a37ba6ec Author: Patrik Flykt Date: Sun Mar 12 10:19:33 2017 +0200 bluetooth: Set 6 byte device addresses Set BTLE MAC addresses that are 6 bytes long and not 8 bytes that are used in other places with 6lowpan. Signed-off-by: Patrik Flykt Signed-off-by: Luiz Augusto von Dentz Reviewed-by: Stefan Schmidt Signed-off-by: Marcel Holtmann net/bluetooth/6lowpan.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 730ce397cd38e1cce257a44493b6c90edf102824 Author: John Keeping Date: Wed Mar 15 12:20:05 2017 +0000 Bluetooth: hci_bcm: Fix clock (un)prepare The hci_bcm driver currently does not prepare/unprepare the clock and goes directly to enable, but as the documentation for clk_enable says, clk_prepare must be called before clk_enable. Signed-off-by: John Keeping Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dab6b5daeeb3e70bfb2ed2d6d6f02dd387e3b338 Author: Elena Reshetova Date: Fri Mar 17 13:12:46 2017 +0200 Bluetooth: convert rfcomm_dlc.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Marcel Holtmann include/net/bluetooth/rfcomm.h | 8 +++++--- net/bluetooth/rfcomm/core.c | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) commit 9232259913022c1ab96f7bf2b87598b89b942f1f Author: Colin Ian King Date: Tue Mar 21 12:20:28 2017 +0000 Bluetooth: btmrvl: fix spelling mistake: "unregester" -> "unregister" trivial fix to spelling mistake in debug message Signed-off-by: Colin Ian King Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d29fd17218515387c1eb36740f0f6f03d0d264d4 Author: Jaegeuk Kim Date: Wed Apr 12 12:02:00 2017 -0700 f2fs: fix not to set fsync/dentry mark Otherwise, we can see stale fsync/dentry mark given by previous calls, resulting in giving up roll-forward recovery due to wrong dentry mark. Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 3 +++ 1 file changed, 3 insertions(+) commit 6c3acd97572b2414075503aa79f305c1d6268114 Author: Jaegeuk Kim Date: Wed Apr 12 10:01:33 2017 -0700 f2fs: allocate hot_data for atomic writes We'd better allocate atomic writes to hot_data zone. Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 1 + 1 file changed, 1 insertion(+) commit 309738835451739dc019dc3d5bb4c93d487ff36b Author: Jaegeuk Kim Date: Tue Apr 11 19:15:33 2017 -0700 f2fs: give time to flush dirty pages for checkpoint If all the threads are waiting for checkpoint, we have no chance to flush required dirty pages. Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 3 +++ 1 file changed, 3 insertions(+) commit 9bb02c3627f46e50246bf7ab957b56ffbef623cb Author: Jaegeuk Kim Date: Tue Apr 11 19:01:26 2017 -0700 f2fs: fix fs corruption due to zero inode page This patch fixes the following scenario. - f2fs_create/f2fs_mkdir - write_checkpoint - f2fs_mark_inode_dirty_sync - block_operations - f2fs_lock_all - f2fs_sync_inode_meta - f2fs_unlock_all - sync_inode_metadata - f2fs_lock_op - f2fs_write_inode - update_inode_page - get_node_page return -ENOENT - new_inode_page - fill_node_footer - f2fs_mark_inode_dirty_sync - ... - f2fs_unlock_op - f2fs_inode_synced - f2fs_lock_all - do_checkpoint In this checkpoint, we can get an inode page which contains zeros having valid node footer only. Cc: Signed-off-by: Jaegeuk Kim fs/f2fs/inode.c | 2 +- fs/f2fs/namei.c | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) commit a54455f5eeb8d65455a27b3ace99f9af295b2897 Author: Chao Yu Date: Mon Mar 27 18:14:05 2017 +0800 f2fs: shrink blk plug region Don't use blk plug covering area where there won't be any IOs being issued. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ca452b95e3be1cbd86ee60165de640d27ddca8b7 Author: Paul Burton Date: Thu Mar 30 13:51:59 2017 -0700 MIPS: Remove CONFIG_ARCH_HAS_ILOG2_U{32,64} We declare CONFIG_ARCH_HAS_ILOG2_U32 & CONFIG_ARCH_HAS_ILOG2_U64 in Kconfig, but they are always false since nothing ever selects them. The generic fls-based implementation is efficient for MIPS anyway. Remove the redundant Kconfig entries. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15840/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 8 -------- 1 file changed, 8 deletions(-) commit f110cc4f9b2b456501c839d02412544c9656c2cc Author: Matt Redfearn Date: Fri Mar 31 16:21:24 2017 +0100 MIPS: generic: Enable Root FS on NFS in generic_defconfig The generic_defconfig is used for platforms like SEAD3 which do not usually have fixed storage available, therefore NFS is the preferred location of the RFS. When the upstream kernel defconfig is built & tested on platforms such as SEAD3 this leads to essentially false failures when the RFS fails to mount. There is little harm in having this feature enabled by default, so enable it in the defconfig. Kernel autoconfiguration & DHCP must also be selected to allow RFS on NFS. Signed-off-by: Matt Redfearn Cc: James Hogan Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15853/ Signed-off-by: Ralf Baechle arch/mips/configs/generic_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 78b6350dcaadb03b4a2970b16387227ba6744876 Author: NeilBrown Date: Wed Apr 12 16:26:13 2017 +1000 md: support disabling of create-on-open semantics. md allows a new array device to be created by simply opening a device file. This make it difficult to remove the device and udev is likely to open the device file as part of processing the REMOVE event. There is an alternate mechanism for creating arrays by writing to the new_array module parameter. When using tools that work with this parameter, it is best to disable the old semantics. This new module parameter allows that. Signed-off-by: NeilBrown Acted-by: Coly Li Signed-off-by: Shaohua Li drivers/md/md.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 039b7225e6e98783a7a7e79c52b29c437f29967d Author: NeilBrown Date: Wed Apr 12 16:26:13 2017 +1000 md: allow creation of mdNNN arrays via md_mod/parameters/new_array The intention when creating the "new_array" parameter and the possibility of having array names line "md_HOME" was to transition away from the old way of creating arrays and to eventually only use this new way. The "old" way of creating array is to create a device node in /dev and then open it. The act of opening creates the array. This is problematic because sometimes the device node can be opened when we don't want to create an array. This can easily happen when some rule triggered by udev looks at a device as it is being destroyed. The node in /dev continues to exist for a short period after an array is stopped, and opening it during this time recreates the array (as an inactive array). Unfortunately no clear plan for the transition was created. It is now time to fix that. This patch allows devices with numeric names, like "md999" to be created by writing to "new_array". This will only work if the minor number given is not already in use. This will allow mdadm to support the creation of arrays with numbers > 511 (currently not possible) by writing to new_array. mdadm can, at some point, use this approach to create *all* arrays, which will allow the transition to only using the new-way. Signed-off-by: NeilBrown Acted-by: Coly Li Signed-off-by: Shaohua Li drivers/md/md.c | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) commit 405a353a0e20d09090ad96147da6afad9b0ce056 Author: Ladi Prosek Date: Thu Apr 6 15:22:20 2017 +0200 KVM: x86: Add MSR_AMD64_DC_CFG to the list of ignored MSRs Hyper-V writes 0x800000000000 to MSR_AMD64_DC_CFG when running on AMD CPUs as recommended in erratum 383, analogous to our svm_init_erratum_383. By ignoring the MSR, this patch enables running Hyper-V in L1 on AMD. Signed-off-by: Ladi Prosek Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 2 ++ 1 file changed, 2 insertions(+) commit 5a48a622718cbd2d26d449f38ba40a2b5f7212cf Author: Wanpeng Li Date: Tue Apr 11 02:49:21 2017 -0700 x86/kvm: virt_xxx memory barriers instead of mandatory barriers virt_xxx memory barriers are implemented trivially using the low-level __smp_xxx macros, __smp_xxx is equal to a compiler barrier for strong TSO memory model, however, mandatory barriers will unconditional add memory barriers, this patch replaces the rmb() in kvm_steal_clock() by virt_rmb(). Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kernel/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bd8fab39cd4fe429f161dfc86bf64993d5c17320 Author: Denis Plotnikov Date: Fri Apr 7 12:09:53 2017 +0300 KVM: x86: fix maintaining of kvm_clock stability on guest CPU hotplug VCPU TSC synchronization is perfromed in kvm_write_tsc() when the TSC value being set is within 1 second from the expected, as obtained by extrapolating of the TSC in already synchronized VCPUs. This is naturally achieved on all VCPUs at VM start and resume; however on VCPU hotplug it is not: the newly added VCPU is created with TSC == 0 while others are well ahead. To compensate for that, consider host-initiated kvm_write_tsc() with TSC == 0 a special case requiring synchronization regardless of the current TSC on other VCPUs. Signed-off-by: Denis Plotnikov Reviewed-by: Roman Kagan Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit c5e8ec8e9beffb9481dba27ab5048c03c8585d7d Author: Denis Plotnikov Date: Fri Apr 7 12:09:52 2017 +0300 KVM: x86: remaster kvm_write_tsc code Reuse existing code instead of using inline asm. Make the code more concise and clear in the TSC synchronization part. Signed-off-by: Denis Plotnikov Reviewed-by: Roman Kagan Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 52 +++++++++++++--------------------------------------- 1 file changed, 13 insertions(+), 39 deletions(-) commit 900ab14ca93dce3f95fdb2bd9c4b654d4d5f2571 Author: David Hildenbrand Date: Fri Apr 7 10:50:41 2017 +0200 KVM: x86: use irqchip_kernel() to check for pic+ioapic Although the current check is not wrong, this check explicitly includes the pic. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/irq_comm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5e7cf52e102d267646af0ea3dc10a4fd4e51b7d Author: David Hildenbrand Date: Fri Apr 7 10:50:40 2017 +0200 KVM: x86: simplify pic_ioport_read() Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/i8259.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 84a5c79e7048b94100d28f313b00dcbbe457c398 Author: David Hildenbrand Date: Fri Apr 7 10:50:39 2017 +0200 KVM: x86: set data directly in picdev_read() Now it looks almost as picdev_write(). Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/i8259.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 9fecaa9e32ae7370878e5967d8874b6f58360b10 Author: David Hildenbrand Date: Fri Apr 7 10:50:38 2017 +0200 KVM: x86: drop picdev_in_range() We already have the exact same checks a couple of lines below. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/i8259.c | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) commit dc24d1d2cbfa3f69c74825253d5931d1ff499205 Author: David Hildenbrand Date: Fri Apr 7 10:50:37 2017 +0200 KVM: x86: make kvm_pic_reset() static Not used outside of i8259.c, so let's make it static. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/i8259.c | 2 +- arch/x86/kvm/irq.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit e21d1758b0377c9b1351d76fb36ecd34ca72880d Author: David Hildenbrand Date: Fri Apr 7 10:50:36 2017 +0200 KVM: x86: simplify pic_unlock() We can easily compact this code and get rid of one local variable. Reviewed-by: Peter Xu Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/i8259.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 8c6b7828c24a69416bcb639d5760c6eaa351fdf9 Author: David Hildenbrand Date: Fri Apr 7 10:50:35 2017 +0200 KVM: x86: cleanup return handling in setup_routing_entry() Let's drop the goto and return the error value directly. Suggested-by: Peter Xu Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář virt/kvm/irqchip.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 43ae312ca18a0d6d1a363295fa6a2a14a12605e8 Author: David Hildenbrand Date: Fri Apr 7 10:50:34 2017 +0200 KVM: x86: drop goto label in kvm_set_routing_entry() No need for the goto label + local variable "r". Reviewed-by: Peter Xu Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/irq_comm.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 993225adf4af20a0e50e37c3d4894b79c98e01c9 Author: David Hildenbrand Date: Fri Apr 7 10:50:33 2017 +0200 KVM: x86: rename kvm_vcpu_request_scan_ioapic() Let's rename it into a proper arch specific callback. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/ioapic.c | 2 +- include/linux/kvm_host.h | 4 ++-- virt/kvm/eventfd.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit ca8ab3f8959c141b89dd682daafd2e64b01c295d Author: David Hildenbrand Date: Fri Apr 7 10:50:32 2017 +0200 KVM: x86: directly call kvm_make_scan_ioapic_request() in ioapic.c We know there is an ioapic, so let's call it directly. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/ioapic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d62f270b2d5015d30d7f58f8429a5a26993b22a8 Author: David Hildenbrand Date: Fri Apr 7 10:50:31 2017 +0200 KVM: x86: remove all-vcpu request from kvm_ioapic_init() kvm_ioapic_init() is guaranteed to be called without any created VCPUs, so doing an all-vcpu request results in a NOP. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/ioapic.c | 2 -- 1 file changed, 2 deletions(-) commit 445ee82d7a9752a2ab3b678fc348c91a54c1782e Author: David Hildenbrand Date: Fri Apr 7 10:50:30 2017 +0200 KVM: x86: KVM_IRQCHIP_PIC_MASTER only has 8 pins Currently, one could set pin 8-15, implicitly referring to KVM_IRQCHIP_PIC_SLAVE. Get rid of the two local variables max_pin and delta on the way. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/irq_comm.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 49f520b99af13d8cafec6f227dabf6acf236c887 Author: David Hildenbrand Date: Fri Apr 7 10:50:29 2017 +0200 KVM: x86: push usage of slots_lock down Let's just move it to the place where it is actually needed. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/i8259.c | 2 ++ arch/x86/kvm/ioapic.c | 2 ++ arch/x86/kvm/x86.c | 4 ---- 3 files changed, 4 insertions(+), 4 deletions(-) commit ba7454e17f90a7dfecc3eb82ec19eb7ac5b6f0e0 Author: David Hildenbrand Date: Fri Apr 7 10:50:28 2017 +0200 KVM: x86: don't take kvm->irq_lock when creating IRQCHIP I don't see any reason any more for this lock, seemed to be used to protect removal of kvm->arch.vpic / kvm->arch.vioapic when already partially inititalized, now access is properly protected using kvm->arch.irqchip_mode and this shouldn't be necessary anymore. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 2 -- 1 file changed, 2 deletions(-) commit 33392b4911150d57cd66a4e9dac74f93b4aef2be Author: David Hildenbrand Date: Fri Apr 7 10:50:27 2017 +0200 KVM: x86: convert kvm_(set|get)_ioapic() into void Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/ioapic.c | 6 ++---- arch/x86/kvm/ioapic.h | 4 ++-- arch/x86/kvm/x86.c | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) commit 4c0b06d8868b0ad96cca83e0d04687e7f3e5b7bd Author: David Hildenbrand Date: Fri Apr 7 10:50:26 2017 +0200 KVM: x86: remove duplicate checks for ioapic When handling KVM_GET_IRQCHIP, we already check irqchip_kernel(), which implies a fully inititalized ioapic. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/ioapic.c | 4 ---- 1 file changed, 4 deletions(-) commit 0bceb15ad15e9374387688ced76c1ac5f5eb6e14 Author: David Hildenbrand Date: Fri Apr 7 10:50:25 2017 +0200 KVM: x86: use ioapic_in_kernel() to check for ioapic existence Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/ioapic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0191e92d84eefe6522a4546b0dfb69393835b168 Author: David Hildenbrand Date: Fri Apr 7 10:50:24 2017 +0200 KVM: x86: get rid of ioapic_irqchip() Let's just use kvm->arch.vioapic directly. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/ioapic.c | 4 ++-- arch/x86/kvm/ioapic.h | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) commit 90bca0529e1bc94fd36659217603e8a1c3f9ad83 Author: David Hildenbrand Date: Fri Apr 7 10:50:23 2017 +0200 KVM: x86: get rid of pic_irqchip() It seemed like a nice idea to encapsulate access to kvm->arch.vpic. But as the usage is already mixed, internal locks are taken outside of i8259.c and grepping for "vpic" only is much easier, let's just get rid of pic_irqchip(). Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/i8259.c | 4 ++-- arch/x86/kvm/irq.c | 2 +- arch/x86/kvm/irq.h | 5 ----- arch/x86/kvm/irq_comm.c | 4 ++-- arch/x86/kvm/x86.c | 24 +++++++++++------------- 5 files changed, 16 insertions(+), 23 deletions(-) commit f567080bdd967fa09326442ac18826c0618fa6c9 Author: David Hildenbrand Date: Fri Apr 7 10:50:22 2017 +0200 KVM: x86: check against irqchip_mode in ioapic_in_kernel() KVM_IRQCHIP_KERNEL implies a fully inititalized ioapic, while kvm->arch.vioapic might temporarily be set but invalidated again if e.g. setting of default routing fails when setting KVM_CREATE_IRQCHIP. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/ioapic.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 19d25a0e474b0c69272e17cb6a9106c25eb27c82 Author: David Hildenbrand Date: Fri Apr 7 10:50:21 2017 +0200 KVM: x86: check against irqchip_mode in pic_in_kernel() Let's avoid checking against kvm->arch.vpic. We have kvm->arch.irqchip_mode for that now. KVM_IRQCHIP_KERNEL implies a fully inititalized pic, while kvm->arch.vpic might temporarily be set but invalidated again if e.g. kvm_ioapic_init() fails when setting KVM_CREATE_IRQCHIP. Although current users seem to be fine, this avoids future bugs. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/irq.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8bf463f3ba0eefd2c808fc22c005fc95f1ad48fe Author: David Hildenbrand Date: Fri Apr 7 10:50:20 2017 +0200 KVM: x86: check against irqchip_mode in kvm_set_routing_entry() Let's replace the checks for pic_in_kernel() and ioapic_in_kernel() by checks against irqchip_mode. Also make sure that creation of any route is only possible if we have an lapic in kernel (irqchip_in_kernel()) or if we are currently inititalizing the irqchip. This is necessary to switch pic_in_kernel() and ioapic_in_kernel() to irqchip_mode, too. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/irq_comm.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 637e3f86faf97a930f1ac4c3f79fd667addae9e8 Author: David Hildenbrand Date: Fri Apr 7 10:50:19 2017 +0200 KVM: x86: new irqchip mode KVM_IRQCHIP_INIT_IN_PROGRESS Let's add a new mode and set it while we create the irqchip via KVM_CREATE_IRQCHIP and KVM_CAP_SPLIT_IRQCHIP. This mode will be used later to test if adding routes (in kvm_set_routing_entry()) is already allowed. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/irq.h | 18 +++++++++++++----- arch/x86/kvm/x86.c | 11 ++++++++++- 3 files changed, 24 insertions(+), 6 deletions(-) commit 1df6ddede10a1cacbf1da4cdfca3342510db1882 Author: David Hildenbrand Date: Fri Apr 7 10:50:18 2017 +0200 KVM: x86: race between KVM_SET_GSI_ROUTING and KVM_CREATE_IRQCHIP Avoid races between KVM_SET_GSI_ROUTING and KVM_CREATE_IRQCHIP by taking the kvm->lock when setting up routes. If KVM_CREATE_IRQCHIP fails, KVM_SET_GSI_ROUTING could have already set up routes pointing at pic/ioapic, being silently removed already. Also, as a side effect, this patch makes sure that KVM_SET_GSI_ROUTING and KVM_CAP_SPLIT_IRQCHIP cannot run in parallel. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář virt/kvm/kvm_main.c | 3 +++ 1 file changed, 3 insertions(+) commit d92be7a41ef15463eb816a4a2d42bf094b56dfce Author: Alexey Dobriyan Date: Mon Apr 10 11:25:26 2017 +0300 net: make struct net_device::min_header_len 8-bit This field is never big enough to warrant 16-bitness. 8-bit accesses enjoy shorted encoding on i386/x86_64 than 16-bit accesses: add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-10 (-10) function old new delta loopback_setup 169 164 -5 ether_setup 148 143 -5 Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller include/linux/netdevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b3dc2f37d7daf76a679cd204492ec5dff06bb8a Author: Alexey Dobriyan Date: Mon Apr 10 11:11:17 2017 +0300 net: neigh: make ->hh_len 32-bit Using 16-bit ->hh_len doesn't save any memory, save some .text instead: add/remove: 0/0 grow/shrink: 1/6 up/down: 2/-19 (-17) function old new delta neigh_update 2312 2314 +2 fwnet_header_cache 199 197 -2 eth_header_cache 101 99 -2 ip6_finish_output2 2371 2368 -3 vrf_finish_output6 1522 1518 -4 vrf_finish_output 1413 1409 -4 ip_finish_output2 1627 1623 -4 Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller include/linux/netdevice.h | 3 +-- include/net/neighbour.h | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) commit eaffadbbb3f2711fc76e7b0ddf37c452ee11b805 Author: Ilan Tayari Date: Sat Apr 8 02:07:08 2017 +0300 gso: Support frag_list splitting with head_frag A driver may use build_skb() for received packets. These SKBs then have a head_frag. Since commit d7e8883cfcf4 ("net: make GRO aware of skb->head_frag"), GRO may build frag_list SKBs out of head_frag received SKBs. In such a case, the chained SKBs end up with a head_frag. Commit 07b26c9454a2 ("gso: Support partial splitting at the frag_list pointer") adds partial segmentation of frag_list SKB chains into individual SKBs. However, this is not done if the chained SKBs have any linear part, because the device may not be able to DMA the private linear buffer. A chained frag_list SKB with head_frag is wrongfully detected in this case as having a private linear part and thus falls back to software GSO, while in fact the linear part is backed by a DMA page just like any other frag. This causes low performance when forwarding those packets that were built with build_skb() Allow partial segmentation at the frag_list pointer for chained SKBs with head_frag. Note that such SKBs can only be created by GRO, when applied to received packets with head_frag. Also note that this change only affects the data path that performs the partial segmentation at frag_list pointer, and not any of the other more common data paths. Signed-off-by: Ilan Tayari Signed-off-by: David S. Miller net/core/skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6bccc7f426abd640f08d8c75fb22f99483f201b4 Author: David Woodhouse Date: Wed Apr 12 13:25:50 2017 +0100 PCI: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms In the PCI_MMAP_PROCFS case when the address being passed by the user is a 'user visible' resource address based on the bus window, and not the actual contents of the resource, that's what we need to be checking it against. Signed-off-by: David Woodhouse Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org drivers/pci/pci-sysfs.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit fce5d57e5754fa35245f7c41e3942040393e2fb1 Author: Jarod Wilson Date: Wed Apr 12 12:33:04 2017 -0500 PCI: Add bridge DMA alias quirk for ITE 8893 bridge The ITE 8893 bridge has the same problems as the ITE 8892, which were resulting in crippling an older PCI 1Gbps NIC down to 45Mbps throughput with IOMMU and VT-d enabled. With the patch, this old e1000 goes back up to ~900Mbps. Suggested-by: Alex Williamson Signed-off-by: Jarod Wilson Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Williamson drivers/pci/quirks.c | 2 ++ 1 file changed, 2 insertions(+) commit 52eabba5bcdb2853dec6ef007ba427b092034738 Author: Logan Gunthorpe Date: Thu Mar 2 16:24:34 2017 -0700 switchtec: Add IOCTLs to the Switchtec driver Add a couple of special IOCTLs to: * Inform userspace of firmware partition locations * Pass event counts and allow userspace to wait on events * Translate PFF numbers used by the switch to port numbers [Dan Carpenter : fix off-by-one in ioctl_event_ctl()] Tested-by: Krishna Dhulipala Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates Signed-off-by: Bjorn Helgaas Reviewed-by: Wei Zhang Reviewed-by: Jens Axboe Documentation/ioctl/ioctl-number.txt | 1 + Documentation/switchtec.txt | 27 ++ MAINTAINERS | 1 + drivers/pci/switch/switchtec.c | 481 +++++++++++++++++++++++++++++++++++ include/uapi/linux/switchtec_ioctl.h | 132 ++++++++++ 5 files changed, 642 insertions(+) commit 5d8e1881f431cf470170813eb048e6a384340904 Author: Logan Gunthorpe Date: Thu Mar 2 16:24:33 2017 -0700 switchtec: Add sysfs attributes to the Switchtec driver Add a few read-only sysfs attributes which provide some device information that is exposed from the devices, primarily component and device names and versions. These are documented in Documentation/ABI/testing/sysfs-class-switchtec. Tested-by: Krishna Dhulipala Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates Signed-off-by: Bjorn Helgaas Reviewed-by: Wei Zhang Reviewed-by: Jens Axboe Reviewed-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-class-switchtec | 96 ++++++++++++++++++++ MAINTAINERS | 1 + drivers/pci/switch/switchtec.c | 113 ++++++++++++++++++++++++ 3 files changed, 210 insertions(+) commit 44fc691b4fac3aff3e99b42cad3a994f5a6621ac Author: Logan Gunthorpe Date: Thu Mar 2 16:24:32 2017 -0700 switchtec: Add user interface documentation Add standard documentation for the sysfs switchtec attributes and a RST formatted text file which documents the char device interface. Jonathan Corbet has indicated he will move this to a new user-space developer documentation book once it's created. Tested-by: Krishna Dhulipala Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates Signed-off-by: Bjorn Helgaas Reviewed-by: Wei Zhang Reviewed-by: Jens Axboe Documentation/switchtec.txt | 53 +++++++++++++++++++++++++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 54 insertions(+) commit 83dd720da666a2af6debbb2d8aab289e3b6cb8f5 Author: Kuninori Morimoto Date: Tue Apr 11 00:35:49 2017 +0000 clk: cs2000: use existing priv_to_dev() to getting struct device Signed-off-by: Kuninori Morimoto Signed-off-by: Stephen Boyd Signed-off-by: Michael Turquette drivers/clk/clk-cs2000-cp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit a507c57dd1ddcb39a06856aed83b6c69b483aa6a Merge: 0d7a532 b609338 Author: Michael Turquette Date: Wed Apr 12 18:53:16 2017 +0200 Merge tag 'meson-clk-for-4.12' of git://github.com/BayLibre/clk-meson into clk-next Pull AmLogic clk driver updates from Jerome Brunet: 2nd Amlogic clock driver update for 4.12: * Protect against holes in onecell_data * Fix divison by zero and overflow in the mpll driver * Add audio clock divider driver for i2s clocks * Add i2s and spdif master clocks commit 0d7a5328dba0d3e299d7d611e4ec059b8cab4f38 Merge: 17c34c5 3a42981 Author: Michael Turquette Date: Wed Apr 12 18:51:43 2017 +0200 Merge tag 'amlogic-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into clk-next Same great taste as the previous pull request, but now with 50% less DT bikeshedding! Amlogic clock driver updates for v4.12 - meson8: add some new PLLs - new clocks for Mali - misc fixes. commit 17c34c566795ca7529cf888fb33fdb7997d6b202 Author: Peter De Schrijver Date: Tue Mar 21 12:16:26 2017 +0200 clk: aggregate return codes of notify chains In case there are multiple notify chains for the same clocks (because they were registered by different users), we need to propagate potential failure of any single one of them to the caller. Otherwise we eg risk violating the V/f curve when a notifier is used for DVFS. Signed-off-by: Peter De Schrijver Signed-off-by: Stephen Boyd Signed-off-by: Michael Turquette drivers/clk/clk.c | 2 ++ 1 file changed, 2 insertions(+) commit 92031575c3e60c2f641aacf752bd7494d65e70f7 Author: Peter De Schrijver Date: Tue Mar 21 15:20:31 2017 +0200 clk: add clk_possible_parents debugfs file For validation purposes, it's often useful to be able to retrieve the list of possible parents in userspace. Add a debugfs file for every clock which has more than 1 possible parent. Signed-off-by: Peter De Schrijver Reviewed-by: Jon Mayo [sboyd@codeaurora.org: Remove useless cast from void and extra newline] Signed-off-by: Stephen Boyd Signed-off-by: Michael Turquette drivers/clk/clk.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 1905719556c077bc5619821e7840cac4f743ac73 Author: Robin van der Gracht Date: Mon Mar 6 09:13:43 2017 +0100 clk: imx: correct uart4_serial clock name in driver for i.MX6UL Reviewed-by: Fabio Estevam Signed-off-by: Robin van der Gracht Signed-off-by: Stephen Boyd Signed-off-by: Michael Turquette drivers/clk/imx/clk-imx6ul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15a2a14b23024ab79fd22de28ba7c006be46aa53 Author: Stephen Boyd Date: Fri Apr 7 12:21:33 2017 -0700 clk: zte: Mark pll config tables as const These should be const. Cc: Shawn Guo Cc: Jun Nie Signed-off-by: Stephen Boyd Signed-off-by: Michael Turquette drivers/clk/zte/clk-zx296718.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a90099da3cd0921e853f7b7e0c74f140a78baeed Author: Shawn Guo Date: Tue Mar 21 16:38:23 2017 +0800 clk: zte: add pll_vga clock for zx296718 It adds zx296718 pll_vga clock for VGA support, so that VGA device can get required pixel rate from clock driver for different display mode. Signed-off-by: Shawn Guo Reviewed-by: Jun Nie Signed-off-by: Stephen Boyd Signed-off-by: Michael Turquette drivers/clk/zte/clk-zx296718.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit ee249cbe42f19a7edac0e8cbb95064845e2e5218 Author: Shawn Guo Date: Tue Mar 21 16:38:22 2017 +0800 clk: zte: pd_bit is not 0 on zx296718 The bit 0 of PLL_CFG0 register is not powerdown on zx296718, but part of of postdiv2 field. The consequence is that functions like hw_to_idx() and zx_pll_enable() will end up tampering the postdiv2 of the PLL. Let's fix it by defining pd_bit 0xff which is obviously invalid for a bit position and having PLL driver check the validity before operating on the bit. Signed-off-by: Shawn Guo Reviewed-by: Jun Nie Signed-off-by: Stephen Boyd Signed-off-by: Michael Turquette drivers/clk/zte/clk.c | 12 +++++++++++- drivers/clk/zte/clk.h | 6 +++++- 2 files changed, 16 insertions(+), 2 deletions(-) commit 5790d801762c588c63b41fbdbdb8295cfd6036e6 Author: Shawn Guo Date: Tue Mar 21 16:38:21 2017 +0800 clk: zte: set CLK_SET_RATE_PARENT for a few zx296718 clocks To support VOU VGA display driver with different modes, we need to set flag for a few clocks, so that clk_set_rate() call in VOU driver can get VGA device desired pixel rate. While at it, the divider between pll_vga and clk_vga gets corrected, as it's 1:1 instead of 1:2. Signed-off-by: Shawn Guo Reviewed-by: Jun Nie Signed-off-by: Stephen Boyd Signed-off-by: Michael Turquette drivers/clk/zte/clk-zx296718.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cf091ee994ec266e33c3a305d6fc8c5ccb1f8acd Author: Robin van der Gracht Date: Fri Mar 3 15:14:05 2017 +0100 clk: imx: clk-imx6ul: The i.mx6ul has no aips_tz3 clock The clock was mapped on CG15 (gpio2_clocks) in the CCRG0 register. Reviewed-by: Fabio Estevam Signed-off-by: Robin van der Gracht Signed-off-by: Stephen Boyd Signed-off-by: Michael Turquette drivers/clk/imx/clk-imx6ul.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 72be2d5f4aa4134ae284108d319adf42f1739816 Merge: 1f9dfd7 1116d5a Author: Michael Turquette Date: Wed Apr 12 18:51:01 2017 +0200 Merge tag 'tegra-for-4.12-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into clk-next Pull Tegra clk driver updates from Thierry Reding: This contains a bunch of fixes and cleanups, mostly to the Tegra210 clock driver. * tag 'tegra-for-4.12-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: (24 commits) clk: tegra: Don't reset PLL-CX if it is already enabled clk: tegra: Add missing Tegra210 clocks clk: tegra: Propagate clk_out_x rate to parent clk: tegra: Fix build warnings on Tegra20/Tegra30 clk: tegra: Mark TEGRA210_CLK_DBGAPB as always on clk: tegra: Add SATA seq input control clk: tegra: Add Tegra210 special resets clk: tegra: Rework pll_u clk: tegra: Implement reset control reset clk: tegra: Fix disable unused for clocks sharing enable bit clk: tegra: Handle UTMIPLL IDDQ clk: tegra: Add aclk clk: tegra: Add super clock mux/divider clk: tegra: Define Tegra210 DMIC clocks clk: tegra: Fix constness for peripheral clocks clk: tegra: Define Tegra210 DMIC sync clocks clk: tegra: Add CEC clock clk: tegra: Fix type for m field clk: tegra: Correct tegra210_pll_fixed_mdiv_cfg rate calculation clk: tegra: Don't warn for PLL defaults unnecessarily ... commit 1f9dfd7ac787ab8caa19a7bf463f617d97c9f66c Author: Kuninori Morimoto Date: Wed Apr 5 14:27:21 2017 +0900 cs-2000-cp: keep Reserved bit on each register Thus CS2000 datasheet is indicating below, this patch follows it. WARNING: All "Reserved" registers must maintain their default state to ensure proper functional operation. Signed-off-by: Kuninori Morimoto Signed-off-by: Stephen Boyd Signed-off-by: Michael Turquette drivers/clk/clk-cs2000-cp.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit a62ca337b36e31621b582cbe8f17d9404a48e120 Author: Rajendra Nayak Date: Thu Mar 23 13:13:40 2017 +0530 clk: qcom: msm8996: Fix the vfe1 powerdomain name Fix a typo which caused both vfe0 and vfe1 powerdomains to be named as vfe0. Signed-off-by: Rajendra Nayak Fixes: 7e824d507909 ("clk: qcom: gdsc: Add mmcc gdscs for msm8996 family") Signed-off-by: Stephen Boyd Signed-off-by: Michael Turquette drivers/clk/qcom/mmcc-msm8996.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac03d8b3a592a0b562fce2376030baf9a572f7c1 Author: Gabriel Fernandez Date: Thu Mar 16 09:16:41 2017 +0100 clk: stm32f4: fix timeout management for pll and ready gate Use a classic polling to test bit ready. And the shift of the bit ready of LSE & LSI were wrongs. Fixes: 861adc44d290 ("clk: stm32f4: Add LSI & LSE clocks") Signed-off-by: Gabriel Fernandez Signed-off-by: Stephen Boyd Signed-off-by: Michael Turquette drivers/clk/clk-stm32f4.c | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) commit d5a0945fdf89ad293ccaa2be588635f4bfc0cd62 Author: Ray Jui Date: Wed Apr 5 12:53:37 2017 -0700 clk: iproc: Remove redundant check Remove the redundant check of 'rate' in the if statement of the 'pll_set_rate' function Reported-by: David Binderman Signed-off-by: Ray Jui Fixes: 5fe225c105fd ("clk: iproc: add initial common clock support") Signed-off-by: Stephen Boyd Signed-off-by: Michael Turquette drivers/clk/bcm/clk-iproc-pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 557983602649af6e6f02fc233bdd12dfed19c9e2 Merge: 0d4ae36 9be8344 Author: Michael Turquette Date: Wed Apr 12 18:50:34 2017 +0200 Merge tag 'v4.12-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-next Pull rockchip clk driver updates from Heiko Stuebner: General rockchip clock changes for 4.12. Contains some new clock-ids as well as fixups of the clock-ids on rk3368 timers, which were unused and completely wrong (more and differently named timers). Also there is one new clock on rk3328 using the muxgrf type, a fix for pll enablement which should wait for the pll to lock before continuing, some more critical clocks and the rename of the rk1108 to rv1108, as the soc seems to have been using a preliminary name before its actual release. The plan is to have the driver changes (pinctrl, clk) go through the respective maintainer trees and once everything landed in mainline do the rename of the devicetree files. With the dts-include change in the clock rename, we also keep everything compiling and thus bisectability. * tag 'v4.12-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: add pll_wait_lock for pll_enable clk: rockchip: rename RK1108 to RV1108 dt-bindings: rk1108-cru: rename RK1108 to RV1108 clk: rockchip: mark some rk3368 core-clks as critical clk: rockchip: export SCLK_TIMERXX id for timers on rk3368 clk: rockchip: describe clk_gmac using the new muxgrf type on rk3328 clk: rockchip: add clock ids for timer10-15 of RK3368 SoCs clk: rockchip: fix up rk3368 timer-ids clk: rockchip: add rk3328 clk_mac2io_ext ID clk: rockchip: Set "ignore unused" for PMU M0 clocks on rk3399 commit 0d4ae360629fa4d199ac4e6ccfc97c8c367fd503 Merge: f37753e bb19530 Author: Michael Turquette Date: Wed Apr 12 18:49:36 2017 +0200 Merge tag 'clk-renesas-for-v4.12-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-next Pull Renesas clk driver updates from Geert Uytterhoeven: - Add support for the Clock Pulse Generator / Module Standby and Software Reset module on revision ES2.0 of the R-Car H3 SoC, which differs from ES1.x in some areas. - Add IMR clocks for R-Car H3 and M3-W, - Add workaround for PLL0/2/4 errata on R-Car H3 ES1.0, - Small fixes and cleanups. * tag 'clk-renesas-for-v4.12-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: rcar-gen3-cpg: Add support for RCLK on R-Car H3 ES2.0 clk: renesas: r8a7795: Add support for R-Car H3 ES2.0 clk: renesas: Add r8a7795 ES2.0 CPG Core Clock Definitions clk: renesas: cpg-mssr: Add support for fixing up clock tables clk: renesas: rcar-gen3: Add workaround for PLL0/2/4 errata on H3 ES1.0 clk: renesas: rcar-gen3-cpg: Pass mode pins to rcar_gen3_cpg_init() clk: renesas: r8a7796: Reformat core clock table clk: renesas: r8a7795: Reformat core clock table clk: renesas: r8a7796: Correct name of watchdog clock clk: renesas: r8a7795: Correct name of watchdog clock clk: renesas: r8a7795: Correct parent clock and sort order for Audio DMACs clk: renesas: r8a7796: Add IMR clocks clk: renesas: r8a7795: Add IMR clocks commit 8cb68c83ab99a474ae847602f0c514d0fe17cc82 Author: Daniel Vetter Date: Mon Apr 10 13:54:45 2017 +0200 drm: Fix get_property logic fumble Yet again I've proven that I can't negate conditions :( Testcase: igt/kms_properties/get_property-sanity Reviewed-by: Maarten Lankhorst Reviewed-by: Sean Paul Fixes: eb8eb02ed850 ("drm: Drop modeset_lock_all from the getproperty ioctl") Cc: Maarten Lankhorst Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Reported-by: Tvrtko Ursulin Cc: Tvrtko Ursulin Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170410115445.13829-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f37753e2a361f0583c9999c571f1051699c19552 Merge: 4641d6a ef18910 Author: Stephen Boyd Date: Tue Apr 4 18:35:51 2017 -0700 Merge branch 'clk-fixes' into clk-next * clk-fixes: clk: stm32f4: fix: exclude values 0 and 1 for PLLQ commit ef18910479b7b4c5e8132f8a40a2a8176ef076f1 Author: Gabriel Fernandez Date: Thu Mar 16 09:16:40 2017 +0100 clk: stm32f4: fix: exclude values 0 and 1 for PLLQ 0000: PLLQ = 0, wrong configuration 0001: PLLQ = 1, wrong configuration ... 0010: PLLQ = 2 0011: PLLQ = 3 0100: PLLQ = 4 ... 1111: PLLQ = 1 Use divider table to exclude 0 and 1 values. Fixes: 83135ad3c517 ("clk: stm32f4: Add PLL_I2S & PLL_SAI for STM32F429/469 boards") Signed-off-by: Gabriel Fernandez Signed-off-by: Stephen Boyd Signed-off-by: Michael Turquette drivers/clk/clk-stm32f4.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 4641d6a560f5088a983a55ea0075e363045631ca Merge: b045949 6c0afb5 Author: Stephen Boyd Date: Tue Apr 4 15:33:18 2017 -0700 Merge branch 'for-4.12-ti-clk-cleanups' of https://github.com/t-kristo/linux-pm into clk-next * 'for-4.12-ti-clk-cleanups' of https://github.com/t-kristo/linux-pm: clk: ti: convert to use proper register definition for all accesses clk: ti: dpll44xx: fix clksel register initialization clk: ti: gate: export gate_clk_ops locally clk: ti: divider: add driver internal API for parsing divider data clk: ti: divider: convert TI divider clock to use its own data representation clk: ti: mux: convert TI mux clock to use its internal data representation clk: ti: drop unnecessary MEMMAP_ADDRESSING flag clk: ti: omap4: cleanup unnecessary clock aliases clk: ti: enforce const types on string arrays clk: ti: move omap2_init_clk_clkdm under TI clock driver clk: ti: add clkdm_lookup to the exported functions clk: ti: use automatic clock alias generation framework clk: ti: add API for creating aliases automatically for simple clock types clk: ti: add support for automatic clock alias generation clk: ti: remove un-used definitions from public clk_hw_omap struct commit b0459491ca2dcda4223b3f3c80a635ae12218580 Author: Leo Yan Date: Sun Mar 26 02:23:15 2017 +0800 clk: hi6220: add debug APB clock The debug APB clock is absent in hi6220 driver, so this patch is to add support for it. Signed-off-by: Leo Yan Signed-off-by: Stephen Boyd Signed-off-by: Michael Turquette drivers/clk/hisilicon/clk-hi6220.c | 1 + include/dt-bindings/clock/hi6220-clock.h | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) commit b8c722ddd548186db3f62e64f727af4db1cf9517 Author: Jeeja KP Date: Fri Mar 24 23:10:34 2017 +0530 ASoC: Intel: Skylake: Add support for deferred DSP module bind Module at the end of DSP pipeline that needs to be connected to a module in another pipeline are represented as a PGA(leaf node) and in PGA event handler these modules are bound/unbounded. Modules other than PGA leaf can be connected directly or via switch to a module in another pipeline. Example: reference path. To support the deferred DSP module bind, following changes are done: o When the path is enabled, the destination module that needs to be bound may not be initialized. If the module is not initialized, add these modules in a deferred bind list. o When the destination module is initialized, check for these modules in deferred bind list. If found, bind them. o When the destination module is deleted, Unbind the modules. o When the source module is deleted, remove the entry from the deferred bind list. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 12 ++++ sound/soc/intel/skylake/skl-topology.c | 109 ++++++++++++++++++++++++++++++++- sound/soc/intel/skylake/skl-topology.h | 6 ++ sound/soc/intel/skylake/skl.h | 1 + 4 files changed, 127 insertions(+), 1 deletion(-) commit 682d33c65c28bca28238e84dc3f3b629008d1079 Author: Venkat Reddy Talla Date: Wed Apr 12 15:45:04 2017 +0530 regulator: tps65132: add device-tree binding Add tps65132 regulator device-tree binding documentation Signed-off-by: Venkat Reddy Talla Signed-off-by: Mark Brown .../bindings/regulator/tps65132-regulator.txt | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 77c129bfefc85bae4dbaa655a5d9b75c9c665da9 Author: Venkat Reddy Talla Date: Wed Apr 12 15:44:36 2017 +0530 regulator: tps65132: add regulator driver for TI TPS65132 Add regulator driver for the device TI TPS65132 which is single inductor - dual output power supply device. TPS65132 device is designed to support general positive/negative driven applications like TFT display panels. TPS65132 regulator driver supports to enable/disable and set voltage on its output. Signed-off-by: Venkat Reddy Talla Signed-off-by: Laxman Dewangan Signed-off-by: Mark Brown drivers/regulator/Kconfig | 8 + drivers/regulator/Makefile | 1 + drivers/regulator/tps65132-regulator.c | 285 +++++++++++++++++++++++++++++++++ 3 files changed, 294 insertions(+) commit 2274c98720fece37fb4947e94ec03b15e62164a9 Author: Martin Kepplinger Date: Wed Apr 12 08:41:19 2017 -0700 Input: ar1021_i2c - coding style fixes Use the common kernel coding style and corrently align parameters with open parenthesis. Signed-off-by: Martin Kepplinger Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ar1021_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 71f9f08103cb02f3d5bfad91cb570dcd2d8ed0cb Author: Fabio Estevam Date: Wed Apr 12 08:34:03 2017 -0700 Input: lpc32xx_ts - check for clk_prepare_enable() error clk_prepare_enable() may fail, so we better check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/lpc32xx_ts.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit c286841720b2e33795bea6cc4c71d50cd6cd8123 Author: Fabio Estevam Date: Wed Apr 12 08:33:50 2017 -0700 Input: imx6ul_tsc - fix error handling If imx6ul_tsc_init() fails we should not return directly. We should disable the previously acquired clocks in this case. Signed-off-by: Fabio Estevam Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/imx6ul_tsc.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit f2a3ee01259ef33ffe4caa0875afe25c15938a14 Author: Fabio Estevam Date: Wed Apr 12 09:37:21 2017 -0300 ASoC: fsl_esai: Remove unneeded definition There is no need for defining FSL_ESAI_RATES locally as the standard SNDRV_PCM_RATE_8000_192000 definition can be used instead. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/fsl/fsl_esai.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 23aaf4ced39de2353e2204c8397418ebb771143a Author: Fabio Estevam Date: Wed Apr 12 10:32:00 2017 -0300 ASoC: fsl ssi doc: Move optional properties to the correct section Properties 'fsl,ssi-asynchronous', 'fsl,playback-dma' and 'fsl,capture-dma' are optional, so move them under the optional section of the document. While at it mention that 'fsl,playback-dma' and 'fsl,capture-dma' only apply to Power Architecture. Signed-off-by: Fabio Estevam Acked-by: Timur Tabi Signed-off-by: Mark Brown .../devicetree/bindings/sound/fsl,ssi.txt | 34 ++++++++++++---------- 1 file changed, 18 insertions(+), 16 deletions(-) commit 3b4683c294095b5f777c03307ef8c60f47320e12 Author: Brian Foster Date: Tue Apr 11 10:50:05 2017 -0700 xfs: drop iolock from reclaim context to appease lockdep Lockdep complains about use of the iolock in inode reclaim context because it doesn't understand that reclaim has the last reference to the inode, and thus an iolock->reclaim->iolock deadlock is not possible. The iolock is technically not necessary in xfs_inactive() and was only added to appease an assert in xfs_free_eofblocks(), which can be called from other non-reclaim contexts. Therefore, just kill the assert and drop the use of the iolock from reclaim context to quiet lockdep. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 8 +++----- fs/xfs/xfs_inode.c | 9 +++++---- 2 files changed, 8 insertions(+), 9 deletions(-) commit 5146d0b7627900ccbb30049246cdca232a79abf5 Author: Eric Sandeen Date: Tue Apr 11 10:45:17 2017 -0700 xfs: remove custom do_div implementations Long ago, all this gunk was added with a lament about problems with gcc's do_div, and a fun recommendation in the changelog: egcs-2.91.66 is the recommended compiler version for building XFS. All this special stuff was needed to work around an old gcc bug, apparently, and it's been there ever since. There should be no need for this anymore, so remove it. Remove the special 32-bit xfs_do_mod as well; just let the kernel's do_div() handle all this. Signed-off-by: Eric Sandeen Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_linux.h | 85 ------------------------------------------------------ 1 file changed, 85 deletions(-) commit d956f813b6e731ef82699a18e468e37d59a1366d Author: Eric Sandeen Date: Thu Apr 6 16:01:47 2017 -0700 xfs: simplify xfs_calc_dquots_per_chunk ndquots is a 32-bit value, and we don't care about the remainder; there is no reason to use do_div here, it seems to be the result of a decade+ historical accident. Worse, the do_div implementation in userspace breaks when fed a 32-bit dividend, so we commented it out there in any case. Change to simple division, and then we can change userspace to match, and mandate a 64-bit dividend in the do_div() in userspace as well. Signed-off-by: Eric Sandeen fs/xfs/libxfs/xfs_dquot_buf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit b26cfc48e3e03126c183f1f3960e6d69460bb852 Author: pierre Kuo Date: Fri Apr 7 14:37:36 2017 +0800 doc: Update control-dependencies section of memory-barriers.txt In the following example, if MAX is defined to be 1, then the compiler knows (Q % MAX) is equal to zero. The compiler can therefore throw away the "then" branch (and the "if"), retaining only the "else" branch. q = READ_ONCE(a); if (q % MAX) { WRITE_ONCE(b, 1); do_something(); } else { WRITE_ONCE(b, 2); do_something_else(); } It is therefore necessary to modify the example like this: q = READ_ONCE(a); - WRITE_ONCE(b, 1); + WRITE_ONCE(b, 2); do_something_else(); Signed-off-by: pierre Kuo Acked-by: Will Deacon Signed-off-by: Paul E. McKenney Documentation/memory-barriers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3d3a3ccc4a8f1f254fb6788081f35bebe374174 Author: Paul E. McKenney Date: Tue Mar 28 19:57:45 2017 -0700 doc: Emphasize that "toy" RCU requires recursive rwlock Reported-by: "yangzc@uit.com.cn" Signed-off-by: Paul E. McKenney Documentation/RCU/whatisRCU.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 93728af0a1f63e13d6f7f56a434965b05b8b2abd Author: Michalis Kokologiannakis Date: Mon Mar 20 22:38:35 2017 +0100 doc: Update the comparisons rule in rcu_dereference.txt When an RCU-protected pointer is fetched but never dereferenced rcu_access_pointer() should be used in place of rcu_dereference(). This commit explicitly records this very fact in Documentation/ RCU/rcu_dereference.txt, in order to prevent the usage of rcu_dereference() in comparisons. Signed-off-by: Michalis Kokologiannakis Signed-off-by: Paul E. McKenney Documentation/RCU/rcu_dereference.txt | 9 +++++++++ 1 file changed, 9 insertions(+) commit 066bb1c84aa430d15f36070471cbfe8976631cce Author: Paul E. McKenney Date: Tue Mar 7 07:30:58 2017 -0800 doc: Update rcu_assign_pointer() definition in whatisRCU.txt The rcu_assign_pointer() macro has changed over time, and the version in Documentation/RCU/whatisRCU.txt has not kept up. This commit brings it into 2017, albeit in a simplified fashion. Reported-by: Andrea Parri Signed-off-by: Paul E. McKenney Documentation/RCU/whatisRCU.txt | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit 6771853bce3f0f7f17cab257b47f5b77b1c625b1 Author: Paul E. McKenney Date: Tue Apr 11 10:17:23 2017 -0700 doc: Update requirements based on recent changes These changes include lighter-weight expedited grace periods, the fact that expedited grace periods and rcu_barrier() no longer block CPU hotplug, some HTML font fixups, noting that rcu_barrier() need not wait for a grace period (even if callbacks are posted), the fact that SRCU read-side critical sections can be used from offline CPUs, and the fact that SRCU now maintains per-CPU callback lists. Signed-off-by: Paul E. McKenney .../RCU/Design/Requirements/Requirements.html | 120 ++++++++++++++++----- 1 file changed, 94 insertions(+), 26 deletions(-) commit aa123a748ea552b18f0d4add823c29ddbddaf7b4 Author: Paul E. McKenney Date: Tue Apr 11 09:17:08 2017 -0700 doc: Update RCU data-structure documentation for rcu_segcblist The rcu_segcblist data structure, which contains segmented lists of RCU callbacks, was recently added. This commit updates the documentation accordingly. Signed-off-by: Paul E. McKenney .../Design/Data-Structures/Data-Structures.html | 207 ++++++++++++++------- .../RCU/Design/Data-Structures/nxtlist.svg | 34 ++-- 2 files changed, 156 insertions(+), 85 deletions(-) commit 8e2a439753b1b708c6aa58249ab3cab8015597b1 Author: Paul E. McKenney Date: Wed Feb 8 14:30:15 2017 -0800 doc: Update stallwarn.txt to make causes more prominent This commit rearranges the Documentation/RCU/stallwarn.txt file to put the list of issues that can cause RCU CPU stall warnings near the beginning of the document. Signed-off-by: Paul E. McKenney Documentation/RCU/stallwarn.txt | 190 +++++++++++++++++++++------------------- 1 file changed, 100 insertions(+), 90 deletions(-) commit b4553f0cfea5ab5a02967e482bcafe7db6407afd Author: Paul E. McKenney Date: Sun Jan 15 16:12:09 2017 -0800 doc: Add mid-boot operation to expedited grace periods This commit adds a description of how expedited grace periods operate during the mid-boot "dead zone", which starts when the scheduler spawns the first kthread and ends when all of RCU's kthreads have been spawned. In short, before mid-boot, synchronous grace periods can be a no-op. After the end of mid-boot, workqueues may be used. During mid-boot, the requesting task drivees the expedited grace period. For more detail, see https://lwn.net/Articles/716148/. Signed-off-by: Paul E. McKenney .../Expedited-Grace-Periods.html | 47 ++++++++++++++++++++-- 1 file changed, 44 insertions(+), 3 deletions(-) commit f1387d770527b11c5467ed6b6b3d9c3e5aa12dd4 Author: Paul E. McKenney Date: Sun Jan 15 15:18:22 2017 -0800 doc: Synchronous RCU grace periods are now legal throughout boot This commit updates the "Early Boot" section of the RCU requirements to describe how synchronous RCU grace periods are now legal throughout the boot process. Signed-off-by: Paul E. McKenney .../RCU/Design/Requirements/Requirements.html | 81 +++++++++++++--------- 1 file changed, 47 insertions(+), 34 deletions(-) commit dbed8a803bd3fb64339a6180adaff2cec46242ce Author: Michael Hennerich Date: Tue Apr 11 14:16:16 2017 +0200 i2c: mux: ltc4306: LTC4306 and LTC4305 I2C multiplexer/switch This patch adds support for the Analog Devices / Linear Technology LTC4306 and LTC4305 4/2 Channel I2C Bus Multiplexer/Switches. The LTC4306 optionally provides two general purpose input/output pins (GPIOs) that can be configured as logic inputs, opendrain outputs or push-pull outputs via the generic GPIOLIB framework. Signed-off-by: Michael Hennerich Reviewed-by: Linus Walleij Signed-off-by: Peter Rosin MAINTAINERS | 8 + drivers/i2c/muxes/Kconfig | 11 ++ drivers/i2c/muxes/Makefile | 1 + drivers/i2c/muxes/i2c-mux-ltc4306.c | 322 ++++++++++++++++++++++++++++++++++++ 4 files changed, 342 insertions(+) commit 84ffac897161745b173eb879513bfa311549b7e4 Author: Michael Hennerich Date: Tue Apr 11 14:16:15 2017 +0200 dt-bindings: i2c: mux: ltc4306: Add dt-bindings for I2C multiplexer/switch This patch adds support for the Analog Devices / Linear Technology LTC4306 and LTC4305 4/2 Channel I2C Bus Multiplexer/Switches. The LTC4306 optionally provides two general purpose input/output pins (GPIOs) that can be configured as logic inputs, opendrain outputs or push-pull outputs via the generic GPIOLIB framework. Signed-off-by: Michael Hennerich Acked-by: Rob Herring Signed-off-by: Peter Rosin .../devicetree/bindings/i2c/i2c-mux-ltc4306.txt | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit b94b8fce8784d51f93226e11ddfa7bb6f136665b Merge: 2a446c5 2f858b9 Author: David S. Miller Date: Wed Apr 12 10:44:03 2017 -0400 Merge branch 'l2tp-const' Guillaume Nault says: ==================== l2tp: constify l2tp_session_get*() and l2tp_tunnel_find*() Declare parameters of these functions as "const" where possible. ==================== Signed-off-by: David S. Miller commit 2f858b928bf5a8174911aaec76b8b72a9ca0533d Author: Guillaume Nault Date: Wed Apr 12 10:05:30 2017 +0200 l2tp: define parameters of l2tp_tunnel_find*() as "const" l2tp_tunnel_find() and l2tp_tunnel_find_nth() don't modify "net". Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 4 ++-- net/l2tp/l2tp_core.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 9aaef50c44f132e040dcd7686c8e78a3390037c5 Author: Guillaume Nault Date: Wed Apr 12 10:05:29 2017 +0200 l2tp: define parameters of l2tp_session_get*() as "const" Make l2tp_pernet()'s parameter constant, so that l2tp_session_get*() can declare their "net" variable as "const". Also constify "ifname" in l2tp_session_get_by_ifname(). Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 7 ++++--- net/l2tp/l2tp_core.h | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) commit 2a446c51901a7d0849ffe75aa41fdeb71a5b37d1 Merge: f221dcd bd3e4fd Author: David S. Miller Date: Wed Apr 12 10:17:03 2017 -0400 Merge branch 'ftgmac100-rework-batch4-misc' Benjamin Herrenschmidt says: ==================== ftgmac100: Rework batch 4 - Misc This is v2 of the fourth batch of updates to the ftgmac100 driver. This is a bunch of misc cleanups and fixes, such as properly disabling HW checksum generation on AST2400 where it's known to be broken and some chip init updates. This also adds the ability to turn HW checksum on/off and configure the ring sizes via ethtool. v2 Fixes patch 1/10 (NETIF_F_HW_CSUM conversion) The next (and last) batch will add a few more "features" such as netpoll, multicast/promist, vlan offload... ==================== Signed-off-by: David S. Miller commit bd3e4fde2f596e2b5393d154d2766e39b217cd63 Author: Benjamin Herrenschmidt Date: Wed Apr 12 13:27:10 2017 +1000 ftgmac100: Set default ring sizes to 128 entries I haven't seen any improvement above that size on the machines I've tested with. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 52d9138fb31ac2dadfbf8e51abf04130ee25f4ee Author: Benjamin Herrenschmidt Date: Wed Apr 12 13:27:09 2017 +1000 ftgmac100: Make ring sizes configurable via ethtool We set an arbitrary max at 1024 since we pre-allocate the actual descriptor arrays and skb arrays to the full size to keep the code a bit simpler and avoid allocation failures in the reset task. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 204 ++++++++++++++++++++++--------- 1 file changed, 148 insertions(+), 56 deletions(-) commit 3833dc6c1888cfd872b9ce2e3c70a4f07f1a6f9a Author: Benjamin Herrenschmidt Date: Wed Apr 12 13:27:08 2017 +1000 ftgmac100: Add more register inits in ftgmac100_init_hw() Clear stale interrupts on entry, configure FIFO sizes, set FIFO thresholds, configure interrupt mitigation. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 8eecf7caad8687eae2812fc6467f156a8909eb12 Author: Benjamin Herrenschmidt Date: Wed Apr 12 13:27:07 2017 +1000 ftgmac100: Open code remaining register writes The helpers just take space but don't provide much value. Simple one line comments are more explanatory. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 53 ++++++++++++-------------------- 1 file changed, 20 insertions(+), 33 deletions(-) commit ba1b1234d6a3ecb864404014fcdfeb51d1f62233 Author: Benjamin Herrenschmidt Date: Wed Apr 12 13:27:06 2017 +1000 ftgmac100: Rename ftgmac100_setup_mac to ftgmac100_initial_mac To remove more confusion. This function is about obtaining the initial MAC address at driver probe time. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f39c71b069ccb6c1e921d504f6598b0989ac9ecf Author: Benjamin Herrenschmidt Date: Wed Apr 12 13:27:05 2017 +1000 ftgmac100: Rename ftgmac100_set_mac to ftgmac100_write_mac_addr To avoid confusion with the ndo callback and generally be clearer about the purpose of that function Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8c3ed1315e129e97e47d267dea55d4cbc3b0e21a Author: Benjamin Herrenschmidt Date: Wed Apr 12 13:27:04 2017 +1000 ftgmac100: Set netdev->hw_features So features can be turned on/off via ethtool Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 6aff0bf641cf69e487d7b46fc8be773d161f814d Author: Benjamin Herrenschmidt Date: Wed Apr 12 13:27:03 2017 +1000 ftgmac100: Disable HW checksum generation on AST2400, enable on others We found out that HW checksum generation only works from AST2500 onward. This disables it on AST2400 and removes the "no-hw-checksum" properties in the device-trees. The problem we had wasn't related to NC-SI. Also rework the logic testing for that property so it can be used to disable HW checksum generation and checking regardless of whether NC-SI is used or not in case other variants out there need this. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller arch/arm/boot/dts/aspeed-g4.dtsi | 2 -- arch/arm/boot/dts/aspeed-g5.dtsi | 2 -- drivers/net/ethernet/faraday/ftgmac100.c | 12 ++++++------ 3 files changed, 6 insertions(+), 10 deletions(-) commit 78d28543a6093fad8f1b00a5debbde02f392ebb4 Author: Benjamin Herrenschmidt Date: Wed Apr 12 13:27:02 2017 +1000 ftgmac100: Use device "compatible" property, not machine. We test for aspeed chips to handle a couple of special cases, but we do that by checking the machine type which isn't right. Instead check the actual device compatible property. This also updates the dtsi files for the aspeed SoC to match. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller arch/arm/boot/dts/aspeed-g4.dtsi | 4 ++-- arch/arm/boot/dts/aspeed-g5.dtsi | 4 ++-- drivers/net/ethernet/faraday/ftgmac100.c | 16 +++++++++------- 3 files changed, 13 insertions(+), 11 deletions(-) commit 05690d633f309d7369176754f7362e979c5710a6 Author: Benjamin Herrenschmidt Date: Wed Apr 12 13:27:01 2017 +1000 ftgmac100: Upgrade to NETIF_F_HW_CSUM The documentation describes NETIF_F_IP_CSUM as deprecated so let's switch to NETIF_F_HW_CSUM and use the helper to handle unhandled protocols. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 40 ++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 15 deletions(-) commit 4a813b262f85ac34c9f3e557d9be79f846a381df Author: Laxman Dewangan Date: Fri Apr 7 15:04:02 2017 +0530 pwm: tegra: Add support to configure pin state in suspends/resume In some of NVIDIA Tegra's platform, PWM controller is used to control the PWM controlled regulators. PWM signal is connected to the VID pin of the regulator where duty cycle of PWM signal decide the voltage level of the regulator output. When system enters suspend, some PWM client/slave regulator devices require the PWM output to be tristated. Add support to configure the pin state via pinctrl frameworks in suspend and active state of the system. Signed-off-by: Laxman Dewangan Acked-by: Jon Hunter Signed-off-by: Thierry Reding drivers/pwm/pwm-tegra.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 0dafdd168b0f441668e0d96a508af35a986374bf Author: Laxman Dewangan Date: Fri Apr 7 15:04:01 2017 +0530 pwm: tegra: Add DT binding details to configure pin in suspends/resume In some of NVIDIA Tegra's platform, PWM controller is used to control the PWM controlled regulators. PWM signal is connected to the VID pin of the regulator where duty cycle of PWM signal decide the voltage level of the regulator output. When system enters suspend, some PWM client/slave regulator devices require the PWM output to be tristated. Add DT binding details to provide the pin configuration state from PWM and pinctrl DT node in suspend and active state of the system. Signed-off-by: Laxman Dewangan Acked-by: Jon Hunter Acked-by: Rob Herring Signed-off-by: Thierry Reding .../devicetree/bindings/pwm/nvidia,tegra20-pwm.txt | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 250b76f43f57d578ebff5e7211eb2c73aa5cd6ca Author: Laxman Dewangan Date: Fri Apr 7 15:04:00 2017 +0530 pwm: tegra: Increase precision in PWM rate calculation The rate of the PWM calculated as follows: hz = NSEC_PER_SEC / period_ns; rate = (rate + (hz / 2)) / hz; This has the precision loss in lower PWM rate. Change this to have more precision as: hz = DIV_ROUND_CLOSEST_ULL(NSEC_PER_SEC * 100, period_ns); rate = DIV_ROUND_CLOSEST(rate * 100, hz) Example: 1. period_ns = 16672000, PWM clock rate is 200 KHz. Based on old formula hz = NSEC_PER_SEC / period_ns = 1000000000ul/16672000 = 59 (59.98) rate = (200K + 59/2)/59 = 3390 Based on new method: hz = 5998 rate = DIV_ROUND_CLOSE(200000*100, 5998) = 3334 If we measure the PWM signal rate, we will get more accurate period with rate value of 3334 instead of 3390. 2. period_ns = 16803898, PWM clock rate is 200 KHz. Based on old formula: hz = 59, rate = 3390 Based on new formula: hz = 5951, rate = 3360 The PWM signal rate of 3360 is more near to requested period than 3333. Signed-off-by: Laxman Dewangan Signed-off-by: Thierry Reding drivers/pwm/pwm-tegra.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 90241fb9b55a36edd9dafb8de679f66836e84369 Author: Laxman Dewangan Date: Fri Apr 7 15:03:59 2017 +0530 pwm: tegra: Use DIV_ROUND_CLOSEST_ULL() instead of local implementation Use macro DIV_ROUND_CLOSEST_ULL() for 64-bit division to closest one instead of implementing the same locally. This increase readability. Signed-off-by: Laxman Dewangan Signed-off-by: Thierry Reding drivers/pwm/pwm-tegra.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7be6b3166ebf2c10c28ef5777d1b31a937ed8f7a Author: David Carrillo-Cisneros Date: Tue Apr 11 23:49:13 2017 -0700 perf tools: Pass PYTHON config to feature detection ( This is a rebased version of https://lkml.org/lkml/2017/2/7/662 ) Python's CC and link Makefile variables were not passed to feature detection, causing feature detection to use system's Python rather than PYTHON_CONFIG's one. This created a mismatch between the detected Python support and the one actually used by perf when PYTHON_CONFIG is specified. Fix it by moving Python's variable initialization to before feature detection and pass FLAGS_PYTHON_EMBED to Python's feature detection's build target. Signed-off-by: David Carrillo-Cisneros Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: He Kuang Cc: Masami Hiramatsu Cc: Paul Turner Cc: Peter Zijlstra Cc: Simon Que Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/20170412064919.92449-2-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/build/feature/Makefile | 2 +- tools/perf/Makefile.config | 31 ++++++++++++------------------- 2 files changed, 13 insertions(+), 20 deletions(-) commit 10ebb57ffcbf062ff224585fefa274e703fc363d Author: Antoine Tenart Date: Wed Mar 29 14:44:32 2017 +0200 arm64: defconfig: enable the Safexcel crypto engine as a module The Safexcel EIP197 cryptographic engine is used on some Marvell SoCs, such as Armada 7040 and Armada 8040. Enable this driver as a module in the ARM64 defconfig. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 49c41e1f23882f7950cff66992115bba03f1bbcf Author: Bhumika Goyal Date: Wed Apr 12 18:40:47 2017 +0530 ALSA: line6: constify snd_kcontrol_new structures Declare snd_kcontrol_new strcutures as const as they are only passed as an argument to the function snd_ctl_new1. This argument is of type const, so snd_kcontrol_new structures having this property can be made const too. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static struct snd_kcontrol_new x@p={...}; @ok@ identifier r.x; position p; @@ snd_ctl_new1(&x@p,...) @bad@ position p != {r.p,ok.p}; identifier r.x; @@ x@p @depends on !bad disable optional_qualifier@ identifier r.x; @@ +const struct snd_kcontrol_new x; Signed-off-by: Bhumika Goyal Signed-off-by: Takashi Iwai sound/usb/line6/pod.c | 2 +- sound/usb/line6/toneport.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit a1485f5a91b975f41c5689a9c72d626108779bf7 Author: Gregory CLEMENT Date: Thu Mar 30 17:23:05 2017 +0200 arm64: configs: enable SDHCI driver for Xenon This patch enables the driver for the SDHCI controller found on the Marvell Armada 3700 and 7K/8K ARM64 SoCs. Signed-off-by: Gregory CLEMENT arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 8fdaebbb83b4e734c7ec1fcab5f1b26ec264965d Author: Bhumika Goyal Date: Wed Apr 12 18:38:06 2017 +0530 ALSA: usb-audio: constify snd_kcontrol_new structures Declare snd_kcontrol_new strcutures as const as they are only passed as an argument to the function snd_ctl_new1. This argument is of type const, so snd_kcontrol_new structures having this property can be made const too. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static struct snd_kcontrol_new x@p={...}; @ok@ identifier r.x; position p; @@ snd_ctl_new1(&x@p,...) @bad@ position p != {r.p,ok.p}; identifier r.x; @@ x@p @depends on !bad disable optional_qualifier@ identifier r.x; @@ +const struct snd_kcontrol_new x; Signed-off-by: Bhumika Goyal Signed-off-by: Takashi Iwai sound/usb/midi.c | 2 +- sound/usb/mixer.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit f91c9d7610a2fe306273a83e2fd5351bceb85d28 Author: Takashi Sakamoto Date: Tue Apr 11 20:33:18 2017 +0900 ALSA: firewire-lib: cache maximum length of payload to reduce function calls During packet streaming, maximum length of payload for isochronous packet is invariable, therefore no need to recalculate. Current ALSA IEC 61883-1/6 engine calls a function to calculate it 8,000 or more times per second for incoming packet processing. This commit adds a member to have maximum length of payload into 'struct amdtp_stream', to reduces the function calls. At first callback from isochronous context, the length is calculated and stored for later processing. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 9 +++++---- sound/firewire/amdtp-stream.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) commit 9e4114b3913cff37be509224116b6f58a2a3918f Author: Rashmica Gupta Date: Mon Apr 10 12:04:04 2017 +1000 powerpc/mm: Fix hash table dump when memory is not contiguous The current behaviour of the hash table dump assumes that memory is contiguous and iterates from the start of memory to (start + size of memory). When memory isn't physically contiguous, this doesn't work. If memory exists at 0-5 GB and 6-10 GB then the current approach will check if entries exist in the hash table from 0GB to 9GB. This patch changes the behaviour to iterate over any holes up to the end of memory. Fixes: 1515ab932156 ("powerpc/mm: Dump hash table") Signed-off-by: Rashmica Gupta Signed-off-by: Michael Ellerman arch/powerpc/mm/dump_hashpagetable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aaa229529244a1135b29353fefb001c430db79f0 Author: Oliver O'Halloran Date: Fri Mar 31 12:37:49 2017 +1100 powerpc/mm: Add physical address to Linux page table dump The current page table dumper scans the Linux page tables and coalesces mappings with adjacent virtual addresses and similar PTE flags. This behaviour is somewhat broken when you consider the IOREMAP space where entirely unrelated mappings will appear to be virtually contiguous. This patch modifies the range coalescing so that only ranges that are both physically and virtually contiguous are combined. This patch also adds to the dump output the physical address at the start of each range. Fixes: 8eb07b187000 ("powerpc/mm: Dump linux pagetables") Signed-off-by: Oliver O'Halloran [mpe: Print the physicall address with 0x like the other addresses] Signed-off-by: Michael Ellerman arch/powerpc/mm/dump_linuxpagetables.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 70538eaa70c36340b4bb27206cad31839e916f40 Author: Oliver O'Halloran Date: Fri Mar 31 12:37:48 2017 +1100 powerpc/mm: Fix missing _PAGE_NON_IDEMPOTENT in pgtable dump On Book3s we have two PTE flags used to mark cache-inhibited mappings: _PAGE_TOLERANT and _PAGE_NON_IDEMPOTENT. Currently the kernel page table dumper only looks at the generic _PAGE_NO_CACHE which is defined to be _PAGE_TOLERANT. This patch modifies the dumper so both flags are shown in the dump. Fixes: 8eb07b187000 ("powerpc/mm: Dump linux pagetables") Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/mm/dump_linuxpagetables.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 9c355917fcf006af47ffaa5ae43a1a804764a6f6 Author: Balbir Singh Date: Wed Apr 12 16:35:19 2017 +1000 powerpc/tracing: Allow tracing of mmap syscalls Currently sys_mmap() and sys_mmap2() (32-bit only), are not visible to the syscall tracing machinery. This means users are not able to see the execution of mmap() syscalls using the syscall tracer. Fix that by using SYSCALL_DEFINE6 for sys_mmap() and sys_mmap2() so that the meta-data associated with these syscalls is visible to the syscall tracer. A side-effect of this change is that the return type has changed from unsigned long to long. However this should have no effect, the only code in the kernel which uses the result of these syscalls is in the syscall return path, which is written in asm and treats the result as unsigned regardless. Example output: cat-3399 [001] .... 196.542410: sys_mmap(addr: 7fff922a0000, len: 20000, prot: 3, flags: 812, fd: 3, offset: 1b0000) cat-3399 [001] .... 196.542443: sys_mmap -> 0x7fff922a0000 cat-3399 [001] .... 196.542668: sys_munmap(addr: 7fff922c0000, len: 6d2c) cat-3399 [001] .... 196.542677: sys_munmap -> 0x0 Signed-off-by: Balbir Singh [mpe: Massage change log, add detail on return type change] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/syscalls.h | 4 ++-- arch/powerpc/kernel/syscalls.c | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 03dfee6d5f824d14e3ecb742518740de69e603cc Author: Michael Ellerman Date: Wed Apr 12 14:56:36 2017 +1000 powerpc/mm: Fix swapper_pg_dir size on 64-bit hash w/64K pages Recently in commit f6eedbba7a26 ("powerpc/mm/hash: Increase VA range to 128TB"), we increased H_PGD_INDEX_SIZE to 15 when we're building with 64K pages. This makes it larger than RADIX_PGD_INDEX_SIZE (13), which means the logic to calculate MAX_PGD_INDEX_SIZE in book3s/64/pgtable.h is wrong. The end result is that the PGD (Page Global Directory, ie top level page table) of the kernel (aka. swapper_pg_dir), is too small. This generally doesn't lead to a crash, as we don't use the full range in normal operation. However if we try to dump the kernel pagetables we can trigger a crash because we walk off the end of the pgd into other memory and eventually try to dereference something bogus: $ cat /sys/kernel/debug/kernel_pagetables Unable to handle kernel paging request for data at address 0xe8fece0000000000 Faulting instruction address: 0xc000000000072314 cpu 0xc: Vector: 380 (Data SLB Access) at [c0000000daa13890] pc: c000000000072314: ptdump_show+0x164/0x430 lr: c000000000072550: ptdump_show+0x3a0/0x430 dar: e802cf0000000000 seq_read+0xf8/0x560 full_proxy_read+0x84/0xc0 __vfs_read+0x6c/0x1d0 vfs_read+0xbc/0x1b0 SyS_read+0x6c/0x110 system_call+0x38/0xfc The root cause is that MAX_PGD_INDEX_SIZE isn't actually computed to be the max of H_PGD_INDEX_SIZE or RADIX_PGD_INDEX_SIZE. To fix that move the calculation into asm-offsets.c where we can do it easily using max(). Fixes: f6eedbba7a26 ("powerpc/mm/hash: Increase VA range to 128TB") Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/pgtable.h | 4 ---- arch/powerpc/kernel/asm-offsets.c | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) commit 3c19d5ada1bec8b97119215298df7669d3ffb3db Merge: 17ed4c8 08a1e65 Author: Michael Ellerman Date: Wed Apr 12 22:25:02 2017 +1000 Merge branch 'topic/xive' (early part) into next This merges the arch part of the XIVE support, leaving the final commit with the KVM specific pieces dangling on the branch for Paul to merge via the kvm-ppc tree. commit 1e548da5cef1f7148ce625f0bb0272ae2657cb1f Author: Marcin Nowakowski Date: Mon Mar 13 14:33:37 2017 +0100 MIPS: mach-rm: Remove recursive include of cpu-feature-overrides.h cpu-feautre-overrides.h in mach-rm unnecessarily includes itself, so drop the pointless include Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15462/ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-rm/cpu-feature-overrides.h | 2 -- 1 file changed, 2 deletions(-) commit f9c4e3a6dae1a3a15055ea478438cdc0352e1af2 Author: James Cowgill Date: Fri Mar 31 17:09:58 2017 +0100 MIPS: Opt into HAVE_COPY_THREAD_TLS This the mips version of commit c1bd55f922a2d ("x86: opt into HAVE_COPY_THREAD_TLS, for both 32-bit and 64-bit"). Simply use the tls system call argument instead of extracting the tls argument by magic from the pt_regs structure. See commit 3033f14ab78c3 ("clone: support passing tls argument via C rather than pt_regs magic") for more background. Signed-off-by: James Cowgill Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15855/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 + arch/mips/kernel/process.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) commit 759f534e93ace6a94a3c0718611fcf70dd5f7809 Author: Sebastian Andrzej Siewior Date: Tue Apr 4 17:49:57 2017 +0200 CPUFREQ: Loongson2: drop set_cpus_allowed_ptr() It is pure mystery to me why we need to be on a specific CPU while looking up a value in an array. My best shot at this is that before commit d4019f0a92ab ("cpufreq: move freq change notifications to cpufreq core") it was required to invoke cpufreq_notify_transition() on a special CPU. Since it looks like a waste, remove it. Signed-off-by: Sebastian Andrzej Siewior Acked-by: Viresh Kumar Cc: Rafael J. Wysocki Cc: tglx@linutronix.de Cc: linux-pm@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15888/ Signed-off-by: Ralf Baechle drivers/cpufreq/loongson2_cpufreq.c | 7 ------- 1 file changed, 7 deletions(-) commit 33679a50370db9aa1a3f0cdf5f70c1c07236a4b2 Author: Paul Burton Date: Thu Mar 30 14:52:15 2017 -0700 MIPS: uasm: Remove needless ISA abstraction We always either target MIPS32/MIPS64 or microMIPS, and always include one & only one of uasm-mips.c or uasm-micromips.c. Therefore the abstraction of the ISA in asm/uasm.h declaring functions for either ISA is redundant & needless. Remove it to simplify the code. This is largely the result of the following: :%s/ISAOPC(\(.\{-}\))/uasm_i##\1/ :%s/ISAFUNC(\(.\{-}\))/\1/ Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/15844/ Signed-off-by: Ralf Baechle arch/mips/include/asm/uasm.h | 87 ++++++++---------------- arch/mips/mm/uasm.c | 156 +++++++++++++++++++++---------------------- 2 files changed, 106 insertions(+), 137 deletions(-) commit 828d1e4e98654e2284496e2fd7f9605ba04ef02a Author: Matt Redfearn Date: Thu Apr 6 11:29:06 2017 +0100 MIPS: Remove dead define of ST_OFF Commit 1a3d59579b9f ("MIPS: Tidy up FPU context switching") removed the last usage of the macro ST_OFF. Remove the dead code. Signed-off-by: Matt Redfearn Cc: James Hogan Cc: Paul Burton Cc: trivial@kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15898/ Signed-off-by: Ralf Baechle arch/mips/kernel/r4k_switch.S | 6 ------ 1 file changed, 6 deletions(-) commit 1f83f5e42b5b17f844955b49e986c3f1f187dd54 Author: Marcin Nowakowski Date: Fri Apr 7 13:40:28 2017 +0200 MIPS: Use common outgoing-CPU-notification code Replace the open-coded CPU-offline notification with common code. In particular avoid calling scheduler code using RCU from an offline CPU that RCU is ignoring. Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15921/ Patchwork: https://patchwork.linux-mips.org/patch/15953/ Signed-off-by: Ralf Baechle arch/mips/kernel/smp-cps.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 80248559992a05573b2db7865490eb82c745db87 Author: Christian Borntraeger Date: Wed Apr 12 12:59:59 2017 +0200 KVM: s390: fix stale machine check data for guarded storage When delivering a machine check the CPU state is "loaded", which means that some registers are already in the host registers. Before writing the register content into the machine check save area, we must make sure that we save the content of the registers into the data structures that are used for delivering the machine check. We already do the right thing for access, vector/floating point registers, let's do the same for guarded storage. Fixes: 4e0b1ab72b8a ("KVM: s390: gs support for kvm guests") Signed-off-by: Christian Borntraeger Reviewed-by: Cornelia Huck arch/s390/kvm/interrupt.c | 2 ++ 1 file changed, 2 insertions(+) commit fe722d13e3638470a7eef5dad6c9ded7f6653773 Author: Christian Borntraeger Date: Fri Apr 7 14:23:13 2017 +0200 KVM: s390: Fix sdnxo setting for nested guests If the guest does not use the host register management, but it uses the sdnx area, we must fill in a proper sdnxo value (address of sdnx and the sdnxc). Reported-by: David Hildenbrand Signed-off-by: Christian Borntraeger Acked-by: Cornelia Huck arch/s390/kvm/vsie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 129cc19a94513081e9250323cd57e12ed48b3613 Author: Dong Jia Shi Date: Wed Apr 12 11:08:16 2017 +0200 vfio: ccw: improve error handling for vfio_ccw_mdev_remove When vfio_ccw_mdev_reset fails during the remove process of the mdev, the current implementation simply returns. The failure indicates that the subchannel device is in a NOT_OPER state, thus the right thing to do should be removing the mdev. While we are at here, reverse the condition check to make the code more concise and readable. Signed-off-by: Dong Jia Shi Message-Id: <20170412090816.79108-3-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_ops.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit c9c31b07bab5fee3ef0bf163afc11b1100eb10d4 Author: Dong Jia Shi Date: Wed Apr 12 11:08:15 2017 +0200 vfio: ccw: remove unnecessary NULL checks of a pointer Remove several unnecessary checks for the @private pointer, since it can never be NULL in these places. Reported-by: Dan Carpenter Signed-off-by: Dong Jia Shi Message-Id: <20170412090816.79108-2-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_fsm.c | 6 +----- drivers/s390/cio/vfio_ccw_ops.c | 17 ----------------- 2 files changed, 1 insertion(+), 22 deletions(-) commit 05514c86965f98f9b0e57f73700771fa267050a7 Author: Quentin Schulz Date: Wed Apr 12 09:05:19 2017 +0200 spi: atmel: factorize reusable code for SPI controller init The SPI controller configuration during the init can be reused, for the resume function for example. Let's move this configuration to a separate function. Signed-off-by: Quentin Schulz Acked-by: Nicolas Ferre Signed-off-by: Mark Brown drivers/spi/spi-atmel.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit 494bc3cd3dd02e259d5db9372754e993e4a21902 Merge: d91750f f00fa5f Author: Catalin Marinas Date: Wed Apr 12 10:41:13 2017 +0100 Merge branch 'will/for-next/perf' into for-next/core * will/for-next/perf: arm64: pmuv3: use arm_pmu ACPI framework arm64: pmuv3: handle !PMUv3 when probing drivers/perf: arm_pmu: add ACPI framework arm64: add function to get a cpu's MADT GICC table drivers/perf: arm_pmu: split out platform device probe logic drivers/perf: arm_pmu: move irq request/free into probe drivers/perf: arm_pmu: split cpu-local irq request/free drivers/perf: arm_pmu: rename irq request/free functions drivers/perf: arm_pmu: handle no platform_device drivers/perf: arm_pmu: simplify cpu_pmu_request_irqs() drivers/perf: arm_pmu: factor out pmu registration drivers/perf: arm_pmu: fold init into alloc drivers/perf: arm_pmu: define armpmu_init_fn drivers/perf: arm_pmu: remove pointless PMU disabling perf: qcom: Add L3 cache PMU driver drivers/perf: arm_pmu: split irq request from enable drivers/perf: arm_pmu: manage interrupts per-cpu drivers/perf: arm_pmu: rework per-cpu allocation MAINTAINERS: Add file patterns for perf device tree bindings commit cf39bf58afdaabc0b86f141630fb3fd18190294e Author: Aleksey Makarov Date: Wed Apr 5 23:20:00 2017 +0300 printk: fix double printing with earlycon If a console was specified by ACPI SPCR table _and_ command line parameters like "console=ttyAMA0" _and_ "earlycon" were specified, then log messages appear twice. The root cause is that the code traverses the list of specified consoles (the `console_cmdline` array) and stops at the first match. But it may happen that the same console is referred by the elements of this array twice: pl011,mmio,0x87e024000000,115200 -- from SPCR ttyAMA0 -- from command line but in this case `preferred_console` points to the second entry and the flag CON_CONSDEV is not set, so bootconsole is not deregistered. To fix that, introduce an invariant "The last non-braille console is always the preferred one" on the entries of the console_cmdline array. Then traverse it in reverse order to be sure that if the console is preferred then it will be the first matching entry. Introduce variable console_cmdline_cnt that keeps the number of elements of the console_cmdline array (Petr Mladek). It helps to get rid of the loop that searches for the end of this array. Link: http://lkml.kernel.org/r/20170405202006.18234-1-aleksey.makarov@linaro.org Cc: Steven Rostedt Cc: Greg Kroah-Hartman Cc: Peter Hurley Cc: Jiri Slaby Cc: Robin Murphy Cc: "Nair, Jayachandran" Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Aleksey Makarov Reported-by: Sudeep Holla Acked-by: Sergey Senozhatsky Signed-off-by: Petr Mladek kernel/printk/printk.c | 46 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 10 deletions(-) commit ad86ee2b8a47590f62a4f3bc1d25dc126d121cb9 Author: Aleksey Makarov Date: Wed Mar 15 13:28:51 2017 +0300 printk: rename selected_console -> preferred_console The variable selected_console is set in __add_preferred_console() to point to the last console parameter that was added to the console_cmdline array. Rename it to preferred_console so that the name reflects the usage. Petr Mladek: "[..] the selected_console/preferred_console value is used to keep the console first in the console_drivers list. IMHO, the main effect is that each line will first appear on this console, see call_console_drivers(). But the message will still appear also on all other enabled consoles. From this point, the name "preferred" sounds better to me. More consoles are selected (enabled) and only one is preferred (first)." Link: http://lkml.kernel.org/r/20170315102854.1763-3-aleksey.makarov@linaro.org Cc: Sudeep Holla Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Robin Murphy Cc: "Nair, Jayachandran" Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Aleksey Makarov Suggested-by: Peter Hurley Acked-by: Steven Rostedt (VMware) Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek kernel/printk/printk.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b077bafa2f3848ddfcef2ef3a4a61a867f9113b5 Author: Aleksey Makarov Date: Wed Mar 15 13:28:50 2017 +0300 printk: fix name/type/scope of preferred_console var The variable preferred_console is used only inside register_console() and its semantics is boolean. It is negative when no console has been made preferred. Make it static bool and rename to has_preferred. Renaming was suggested by Peter Hurley Link: http://lkml.kernel.org/r/20170315102854.1763-2-aleksey.makarov@linaro.org Cc: Sudeep Holla Cc: Greg Kroah-Hartman Cc: Peter Hurley Cc: Jiri Slaby Cc: Robin Murphy Cc: "Nair, Jayachandran" Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Aleksey Makarov Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek kernel/printk/printk.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f3d1f7597ec1f91b7ab495cb0914677f84debfe8 Author: Ralph Sennhauser Date: Sat Apr 8 12:16:26 2017 +0200 ARM: dts: armada-38x: label USB and SATA nodes Recently most nodes got labels to make them referenceable. The USB 3.0 nodes as well as the nodes for the SATA controllers were left out, rectify the omission. The labels "sataX" are already used by some boards for the SATA ports, therefore use "ahciX" to label the SATA controller nodes. To avoid potential confusion by labeling an USB3.0 controller "usb2" use usb3_X as labels. This also coincides with the node names themselves (usb@xxxxx vs usb3@xxxxx). Signed-off-by: Ralph Sennhauser Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-38x.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d91750f12c79101028cb93dc35eed6989fae4405 Author: Marc Zyngier Date: Tue Apr 11 17:32:30 2017 +0100 arm64: Silence spurious kbuild warning on menuconfig Since bbb56c27228d ("arm64: Add detection code for broken .inst support in binutils"), running any make target that doesn't involve the cross compiler results in a spurious warning: $ make ARCH=arm64 menuconfig arch/arm64/Makefile:43: Detected assembler with broken .inst; disassembly will be unreliable while $ make ARCH=arm64 CROSS_COMPILE=aarch64-arm-linux- menuconfig is silent (assuming your compiler is not affected). That's because the code that tests for the workaround is always run, irrespective of the current configuration being available or not. An easy fix is to make the detection conditional on CONFIG_ARM64 being defined, which is only the case when actually building something. Fixes: bbb56c27228d ("arm64: Add detection code for broken .inst support in binutils") Reviewed-by: Robin Murphy Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas arch/arm64/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7ba2ef7c7200e476ee2cede7bcffcf7749e02f5c Author: Antoine Tenart Date: Wed Mar 29 14:44:31 2017 +0200 arm64: marvell: dts: enable the crypto engine on the Armada 8040 DB Enable the cryptographic engine available in the CP110 master on the Armada 8040 DB. Do not enable the one in the CP110 salve for now, as we do not support multiple cryptographic engines yet. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-8040-db.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 16a51e3485af59073e792c5add3a3f24691f5b80 Author: Antoine Tenart Date: Wed Mar 29 14:44:30 2017 +0200 arm64: marvell: dts: enable the crypto engine on the Armada 7040 DB Enable the cryptographic engine available in the CP110 master on the Armada 7040 DB. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-7040-db.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 973020fd9498db8637463c92df4fd6d52caab05c Author: Antoine Tenart Date: Wed Mar 29 14:44:29 2017 +0200 arm64: marvell: dts: add crypto engine description for 7k/8k Add the description of the crypto engine hardware block for the Marvell Armada 7k and Armada 8k processors; for both the CP110 slave and master. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 15 +++++++++++++++ arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 16 ++++++++++++++++ 2 files changed, 31 insertions(+) commit 9d4b5bdc5b34e3e89e84d7cf62a8e513b25a8905 Author: Andrey Smirnov Date: Tue Apr 11 09:48:09 2017 -0700 irqchip/irq-imx-gpcv2: Clear OF_POPULATED flag Clear OF_POPULATED flag, so that GPC power domain driver[1] can be bound to "gpc" node as well. [1] https://lkml.org/lkml/2017/3/28/835 Cc: yurovsky@gmail.com Cc: Thomas Gleixner Cc: Jason Cooper Signed-off-by: Andrey Smirnov Signed-off-by: Marc Zyngier drivers/irqchip/irq-imx-gpcv2.c | 5 +++++ 1 file changed, 5 insertions(+) commit a50ac562ef48e81cd4c6805f10e14b6bacadab53 Author: Alexandre Belloni Date: Mon Apr 10 16:50:11 2017 +0200 irqchip/atmel-aic5: Handle suspend to RAM On sama5d2, VDD core may be cut while suspending to RAM. This means the AIC5 registers content is lost. Restore it at resume time. Signed-off-by: Alexandre Belloni Signed-off-by: Marc Zyngier drivers/irqchip/irq-atmel-aic5.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit a8d11cd0714f51877587f5ec891013ca46e163ac Author: Masami Hiramatsu Date: Wed Mar 29 14:05:06 2017 +0900 kprobes/x86: Consolidate insn decoder users for copying code Consolidate x86 instruction decoder users on the path of copying original code for kprobes. Kprobes decodes the same instruction a maximum of 3 times when preparing the instruction buffer: - The first time for getting the length of the instruction, - the 2nd for adjusting displacement, - and the 3rd for checking whether the instruction is boostable or not. For each time, the actual decoding target address is slightly different (1st is original address or recovered instruction buffer, 2nd and 3rd are pointing to the copied buffer), but all have the same instruction. Thus, this patch also changes the target address to the copied buffer at first and reuses the decoded "insn" for displacement adjusting and checking boostability. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Andrey Ryabinin Cc: Anil S Keshavamurthy Cc: Borislav Petkov Cc: Brian Gerst Cc: David S . Miller Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ye Xiaolong Link: http://lkml.kernel.org/r/149076389643.22469.13151892839998777373.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/common.h | 4 +-- arch/x86/kernel/kprobes/core.c | 66 +++++++++++++++++++--------------------- arch/x86/kernel/kprobes/opt.c | 5 +-- 3 files changed, 36 insertions(+), 39 deletions(-) commit ea1e34fc366b84e4449b37d86f2222935e29412d Author: Masami Hiramatsu Date: Wed Mar 29 14:03:56 2017 +0900 kprobes/x86: Use probe_kernel_read() instead of memcpy() Use probe_kernel_read() for avoiding unexpected faults while copying kernel text in __recover_probed_insn(), __recover_optprobed_insn() and __copy_instruction(). Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Andrey Ryabinin Cc: Anil S Keshavamurthy Cc: Borislav Petkov Cc: Brian Gerst Cc: David S . Miller Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ye Xiaolong Link: http://lkml.kernel.org/r/149076382624.22469.10091613887942958518.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/core.c | 12 +++++++++--- arch/x86/kernel/kprobes/opt.c | 5 ++++- 2 files changed, 13 insertions(+), 4 deletions(-) commit d0381c81c2f782fa2131178d11e0cfb23d50d631 Author: Masami Hiramatsu Date: Wed Mar 29 14:02:46 2017 +0900 kprobes/x86: Set kprobes pages read-only Set the pages which is used for kprobes' singlestep buffer and optprobe's trampoline instruction buffer to readonly. This can prevent unexpected (or unintended) instruction modification. This also passes rodata_test as below. Without this patch, rodata_test shows a warning: WARNING: CPU: 0 PID: 1 at arch/x86/mm/dump_pagetables.c:235 note_page+0x7a9/0xa20 x86/mm: Found insecure W+X mapping at address ffffffffa0000000/0xffffffffa0000000 With this fix, no W+X pages are found: x86/mm: Checked W+X mappings: passed, no W+X pages found. rodata_test: all tests were successful Reported-by: Andrey Ryabinin Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Anil S Keshavamurthy Cc: Borislav Petkov Cc: Brian Gerst Cc: David S . Miller Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ye Xiaolong Link: http://lkml.kernel.org/r/149076375592.22469.14174394514338612247.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/core.c | 4 ++++ arch/x86/kernel/kprobes/opt.c | 3 +++ 2 files changed, 7 insertions(+) commit 490154bc68d15de9e38fbb850fe470e32cc66407 Author: Masami Hiramatsu Date: Wed Mar 29 14:01:35 2017 +0900 kprobes/x86: Make boostable flag boolean Make arch_specific_insn.boostable to boolean, since it has only 2 states, boostable or not. So it is better to use boolean from the viewpoint of code readability. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Andrey Ryabinin Cc: Anil S Keshavamurthy Cc: Borislav Petkov Cc: Brian Gerst Cc: David S . Miller Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ye Xiaolong Link: http://lkml.kernel.org/r/149076368566.22469.6322906866458231844.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/include/asm/kprobes.h | 7 +++---- arch/x86/kernel/kprobes/core.c | 12 ++++++------ arch/x86/kernel/kprobes/ftrace.c | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) commit 804dec5bda9b4fcdab5f67fe61db4a0498af5221 Author: Masami Hiramatsu Date: Wed Mar 29 14:00:25 2017 +0900 kprobes/x86: Do not modify singlestep buffer while resuming Do not modify singlestep execution buffer (kprobe.ainsn.insn) while resuming from single-stepping, instead, modifies the buffer to add a jump back instruction at preparing buffer. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Andrey Ryabinin Cc: Anil S Keshavamurthy Cc: Borislav Petkov Cc: Brian Gerst Cc: David S . Miller Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ye Xiaolong Link: http://lkml.kernel.org/r/149076361560.22469.1610155860343077495.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/core.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit 17880e4d5777df4770081ecf0750471cda57f86b Author: Masami Hiramatsu Date: Wed Mar 29 13:59:15 2017 +0900 kprobes/x86: Use instruction decoder for booster Use x86 instruction decoder for checking whether the probed instruction is able to boost or not, instead of hand-written code. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Andrey Ryabinin Cc: Anil S Keshavamurthy Cc: Borislav Petkov Cc: Brian Gerst Cc: David S . Miller Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ye Xiaolong Link: http://lkml.kernel.org/r/149076354563.22469.13379472209338986858.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/core.c | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) commit 129d17e8e8daf50f8aff4941fb4a9cda027ab9cf Author: Masami Hiramatsu Date: Wed Mar 29 13:58:06 2017 +0900 kprobes/x86: Fix the description of __copy_instruction() Fix the description comment of __copy_instruction() function since it has already been changed to return the length of the copied instruction. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Andrey Ryabinin Cc: Anil S Keshavamurthy Cc: Borislav Petkov Cc: Brian Gerst Cc: David S . Miller Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ye Xiaolong Link: http://lkml.kernel.org/r/149076347582.22469.3775133607244923462.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit bd0b90676c30fe640e7ead919b3e38846ac88ab7 Author: Masami Hiramatsu Date: Wed Mar 29 13:56:56 2017 +0900 kprobes/x86: Fix kprobe-booster not to boost far call instructions Fix the kprobe-booster not to boost far call instruction, because a call may store the address in the single-step execution buffer to the stack, which should be modified after single stepping. Currently, this instruction will be filtered as not boostable in resume_execution(), so this is not a critical issue. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Andrey Ryabinin Cc: Anil S Keshavamurthy Cc: Borislav Petkov Cc: Brian Gerst Cc: David S . Miller Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ye Xiaolong Link: http://lkml.kernel.org/r/149076340615.22469.14066273186134229909.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/core.c | 2 ++ 1 file changed, 2 insertions(+) commit ef0eb2e6447f562bae2bcf503afcd85d68e843cc Merge: 1c4f8ad 986a5bc Author: Ingo Molnar Date: Wed Apr 12 07:29:13 2017 +0200 Merge tag 'perf-core-for-mingo-4.12-20170411' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core perf/core improvements and fixes: User visible changes: - Support s390 jump instructions in perf annotate (Christian Borntraeger) - When failing to setup multiple events (e.g. '-e irq_vectors:*'), state which one caused the failure (Yao Jin) - Various fixes for pipe mode, where the output of 'perf record' is written to stdout instead of to a perf.data file, fixing workloads such as: (David Carrillo-Cisneros) $ perf record -o - noploop | perf inject -b > perf.data $ perf record -o - noploop | perf annotate Infrastructure changes: - Simplify ltrim() implementation (Arnaldo Carvalho de Melo) - Use ltrim() and rtrim() in places where ad-hoc equivalents were being used (Taeung Song) Conflicts: tools/perf/util/annotate.c Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit b13de4b7adeb7a5e37a5aa78d5a4926c3cd4e131 Author: Martin Schwidefsky Date: Fri Mar 24 17:00:45 2017 +0100 s390/spinlock: remove compare and delay instruction The CAD instruction never worked quite as expected for the spinlock code. It has been disabled by default with git commit 61b0b01686d48220, if the "cad" kernel parameter is specified it is enabled for both user space and the spinlock code. Leave the option to enable the instruction for user space but remove it from the spinlock code. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/setup.h | 6 ++---- arch/s390/kernel/early.c | 19 ++++++------------- arch/s390/lib/spinlock.c | 33 +++++---------------------------- 3 files changed, 13 insertions(+), 45 deletions(-) commit 02c503ff237cdcd8e012a122a638295550db10a5 Author: Martin Schwidefsky Date: Mon Nov 28 15:50:48 2016 +0100 s390/spinlock: use atomic primitives for spinlocks Add a couple more __atomic_xxx function to atomic_ops.h and use them to replace the compare-and-swap inlines in the spinlock code. This changes the type of the lock value from unsigned int to int. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/atomic_ops.h | 22 +++++----- arch/s390/include/asm/spinlock.h | 45 ++++++++++----------- arch/s390/include/asm/spinlock_types.h | 6 +-- arch/s390/lib/spinlock.c | 73 ++++++++++++++++------------------ 4 files changed, 70 insertions(+), 76 deletions(-) commit 5f2173e056b2a5c215b862f136192744c447844e Author: Joerg Roedel Date: Thu Apr 6 16:23:18 2017 +0200 x86/mpx, selftests: Only check bounds-vs-shadow when we keep shadow The check between the hardware state and our shadow of it is checked in the signal handler for all bounds exceptions, even for the ones where we don't keep the shadow up2date. This is a problem because when no shadow is kept the handler fails at this point and hides the real reason of the exception. Move the check into the code-path evaluating normal bounds exceptions to prevent this. Signed-off-by: Joerg Roedel Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shuah Khan Cc: Thomas Gleixner Cc: linux-kselftest@vger.kernel.org Link: http://lkml.kernel.org/r/1491488598-27346-1-git-send-email-joro@8bytes.org Signed-off-by: Ingo Molnar tools/testing/selftests/x86/mpx-mini-test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5ed386ec09a5d75bcf073967e55e895c2607a5c3 Author: Joerg Roedel Date: Thu Apr 6 16:19:22 2017 +0200 x86/mpx: Correctly report do_mpx_bt_fault() failures to user-space When this function fails it just sends a SIGSEGV signal to user-space using force_sig(). This signal is missing essential information about the cause, e.g. the trap_nr or an error code. Fix this by propagating the error to the only caller of mpx_handle_bd_fault(), do_bounds(), which sends the correct SIGSEGV signal to the process. Signed-off-by: Joerg Roedel Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: fe3d197f84319 ('x86, mpx: On-demand kernel allocation of bounds tables') Link: http://lkml.kernel.org/r/1491488362-27198-1-git-send-email-joro@8bytes.org Signed-off-by: Ingo Molnar arch/x86/mm/mpx.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit efa69d734adbf8a562d58d9fdc3429f2717764e7 Author: Pei Zhang Date: Fri Apr 7 16:50:16 2017 +0800 drm/i915/gvt: add mmio init for virtual display GVT implements a purely virtual monitor for virtual GPU independent of the host. Some DDI related MMIO are not initialized in current code which cause the display initialization failure in guest. This patch fills the gap. Signed-off-by: Pei Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/display.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit fd3bd0a99cffffe476d54edd2eb13b52b1e9a27d Author: Changbin Du Date: Thu Apr 6 10:56:03 2017 +0800 drm/i915/gvt: use directly assignment for structure copying Let c compiler handle the structure copying. The compiler will use builtin function to handle that. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 2 +- drivers/gpu/drm/i915/gvt/execlist.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) commit 43c29e1f449d596ed92f12cc19e41d9731ec3312 Author: Changbin Du Date: Thu Apr 6 10:55:55 2017 +0800 drm/i915/gvt: remove redundant ring id check which cause significant CPU misprediction From perf data, found a significant overhead at ring id check in the function get_opcode. This inline function is frequently used. Since Intel static predictor will predict the branch to fall through so the prediction most fail. This is wasting CPU pipeline resource. We do not need check the engine id everywhere, it should be reliable. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 6 ------ 1 file changed, 6 deletions(-) commit 80901ca879083ecb5fd08a8d3413220bec9612ac Author: Changbin Du Date: Thu Apr 6 10:55:43 2017 +0800 drm/i915/gvt: remove redundant platform check for mocs load/restore The platform check is done outside, no need check again. Platform doesn't include mocs should not invoke this two functions. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/render.c | 6 ------ 1 file changed, 6 deletions(-) commit e1236bc06c534a97f73e09aed5e1094108553e9f Author: Changbin Du Date: Thu Apr 6 10:55:02 2017 +0800 drm/i915/gvt: Align render mmio list to cacheline Make the global mmio list be cacheline aligned to improve performance. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/render.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1c4f8ad81c7f13314e4357550be9d5be3754fed9 Merge: 9df9078 0718b33 Author: Ingo Molnar Date: Wed Apr 12 07:28:25 2017 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 12ee4022f67f8854061b46e5c0a7ad6258ab66c2 Author: Subhransu S. Prusty Date: Wed Apr 12 09:54:00 2017 +0530 ALSA: hda: Add Geminilake id to SKL_PLUS Geminilake is Skylake family platform. So add it's id to skl_plus check. Fixes: 126cfa2f5e15 ("ALSA: hda: Add Geminilake HDMI codec ID") Signed-off-by: Subhransu S. Prusty Cc: Senthilnathan Veppur Cc: Vinod Koul Cc: Takashi Iwai Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b7c5ac88e8251cc3931ce00437fdd74b0dbb2e99 Merge: c6b0b9e 3d016d5 Author: Takashi Iwai Date: Wed Apr 12 07:16:07 2017 +0200 Merge branch 'for-linus' into for-next commit 3ea6b7001ef5da9f9816ee3c4fe731f4fe08b865 Author: Chanwoo Choi Date: Thu Apr 6 13:19:35 2017 +0900 PM / devfreq: Move struct devfreq_governor to devfreq directory This patch moves the struct devfreq_governor from header file to the devfreq directory because this structure is private data and it have to be only accessed by the devfreq core. Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/governor.h | 29 +++++++++++++++++++++++++++++ include/linux/devfreq.h | 30 +----------------------------- 2 files changed, 30 insertions(+), 29 deletions(-) commit f221dcd91d20cdcb893cf6e9c8894b7d6c97d649 Merge: c02b7a9 2c9c168 Author: David S. Miller Date: Tue Apr 11 23:01:15 2017 -0400 Merge branch 'net-smc-next' Ursula Braun says: ==================== net/smc: patches for net-next here are some patches for net/smc. Most important are improvements for socket closing. ==================== Signed-off-by: David S. Miller commit 2c9c16825ea08b94e013e6902486b53457555b8d Author: Ursula Braun Date: Mon Apr 10 14:58:05 2017 +0200 net/smc: do not use IB_SEND_INLINE together with mapped data smc specifies IB_SEND_INLINE for IB_WR_SEND ib_post_send calls, but provides a mapped buffer to be sent. This is inconsistent, since IB_SEND_INLINE works without mapped buffer. Problem has not been detected in the past, because tests had been limited to Connect X3 cards from Mellanox, whose mlx4 driver just ignored the IB_SEND_INLINE flag. For now, the IB_SEND_INLINE flag is removed. Signed-off-by: Ursula Braun Reviewed-by: Thomas Richter Signed-off-by: David S. Miller net/smc/smc_ib.c | 1 - net/smc/smc_wr.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 288c83902a15acf91863949aec467a20a1e32fe1 Author: Ursula Braun Date: Mon Apr 10 14:58:04 2017 +0200 net/smc: destruct non-accepted sockets Make sure sockets never accepted are removed cleanly. Signed-off-by: Ursula Braun Reviewed-by: Thomas Richter Signed-off-by: David S. Miller net/smc/af_smc.c | 14 +++++++++----- net/smc/smc_close.c | 1 - 2 files changed, 9 insertions(+), 6 deletions(-) commit f5227cd9f1d752ad45f08597db8cac4a9436c48d Author: Ursula Braun Date: Mon Apr 10 14:58:03 2017 +0200 net/smc: remove duplicate unhash unhash is already called in sock_put_work. Remove the second call. Signed-off-by: Ursula Braun Reviewed-by: Thomas Richter Signed-off-by: David S. Miller net/smc/af_smc.c | 1 - 1 file changed, 1 deletion(-) commit a98bf8c0bce7bd3371adbe99d1e2b31c32308fb9 Author: Ursula Braun Date: Mon Apr 10 14:58:02 2017 +0200 net/smc: guarantee ConnClosed send after shutdown SHUT_WR State SMC_CLOSED should be reached only, if ConnClosed has been sent to the peer. If ConnClosed is received from the peer, a socket with shutdown SHUT_WR done, switches errorneously to state SMC_CLOSED, which means the peer socket is dangling. The local SMC socket is supposed to switch to state APPFINCLOSEWAIT to make sure smc_close_final() is called during socket close. Signed-off-by: Ursula Braun Reviewed-by: Thomas Richter Signed-off-by: David S. Miller net/smc/smc_close.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) commit 46c28dbd4c23c3f7fa37f5ea48772af79c9cc40e Author: Ursula Braun Date: Mon Apr 10 14:58:01 2017 +0200 net/smc: no socket state changes in tasklet context Several state changes occur during SMC socket closing. Currently state changes triggered locally occur in process context with lock_sock() taken while state changes triggered by peer occur in tasklet context with bh_lock_sock() taken. bh_lock_sock() does not wait till a lock_sock(() task in process context is finished. This may lead to races in socket state transitions resulting in dangling SMC-sockets, or it may lead to duplicate SMC socket freeing. This patch introduces a closing worker to run all state changes under lock_sock(). Signed-off-by: Ursula Braun Reviewed-by: Thomas Richter Reported-by: Dave Jones Signed-off-by: David S. Miller net/smc/af_smc.c | 8 ++++++-- net/smc/smc.h | 1 + net/smc/smc_cdc.c | 9 +++++++-- net/smc/smc_close.c | 39 +++++++++++++++++++++++++-------------- net/smc/smc_close.h | 2 +- net/smc/smc_core.c | 2 +- 6 files changed, 41 insertions(+), 20 deletions(-) commit 90e9517ed9615f9fb23fbef7d279f81e6c5c08b2 Author: Ursula Braun Date: Mon Apr 10 14:58:00 2017 +0200 net/smc: always call the POLL_IN part of sk_wake_async Wake up reading file descriptors for a closing socket as well, otherwise some socket applications may stall. Signed-off-by: Ursula Braun Reviewed-by: Thomas Richter Signed-off-by: David S. Miller net/smc/smc_rx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 90cacb2ea60c37b9a413a2d7dcb244c3d397c060 Author: Ursula Braun Date: Mon Apr 10 14:57:59 2017 +0200 net/smc: guarantee reset of write_blocked for heavy workload If peer indicates write_blocked, the cursor state of the received data should be send to the peer immediately (in smc_tx_consumer_update()). Afterwards the write_blocked indicator is cleared. If there is no free slot for another write request, sending is postponed to worker smc_tx_work, and the write_blocked indicator is not cleared. Therefore another clearing check is needed in smc_tx_work(). Signed-off-by: Ursula Braun Reviewed-by: Thomas Richter Signed-off-by: David S. Miller net/smc/smc_tx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5da7e4d35507992da2af6c89434c33a69802de9c Author: Ursula Braun Date: Mon Apr 10 14:57:58 2017 +0200 net/smc: return active RoCE port only SMC requires an active ib port on the RoCE device. smc_pnet_find_roce_resource() determines the matching RoCE device port according to the configured PNET table. Do not return the found RoCE device port, if it is not flagged active. Signed-off-by: Ursula Braun Reviewed-by: Thomas Richter Signed-off-by: David S. Miller net/smc/smc_pnet.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 249633a443fd12485d6f352d6cbe41efc92db233 Author: Ursula Braun Date: Mon Apr 10 14:57:57 2017 +0200 net/smc: remove useless smc_ib_devices_list check The global event handler is created only, if the ib_device has already been used by at least one link group. It is guaranteed that there exists the corresponding entry in the smc_ib_devices list. Get rid of this superfluous check. Signed-off-by: Ursula Braun Reviewed-by: Thomas Richter Signed-off-by: David S. Miller net/smc/smc_ib.c | 2 -- net/smc/smc_pnet.c | 2 +- net/smc/smc_pnet.h | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) commit 3c22e8f3200227d64fc4b1795b12b2cdc9099cd6 Author: Ursula Braun Date: Mon Apr 10 14:57:56 2017 +0200 net/smc: get rid of old comment This patch removes an outdated comment. Signed-off-by: Ursula Braun Reviewed-by: Thomas Richter Signed-off-by: David S. Miller net/smc/smc_cdc.c | 2 -- 1 file changed, 2 deletions(-) commit c02b7a9145512e9995e875faf8c9df4147870bbf Author: Joao Pinto Date: Mon Apr 10 11:32:14 2017 +0100 net: stmmac: use netif_set_real_num_{rx,tx}_queues In the submission of the lastest multiple buffer patch set, this fix was lost. I am sending this patch to put it right again. The fix was originally proposed by Arnd Bergmann. Signed-off-by: Arnd Bergmann Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e281f42f41db2820b079543fffb64c50b903215b Author: Xiang Chen Date: Mon Apr 10 21:22:01 2017 +0800 scsi: hisi_sas: controller reset for multi-bits ECC and AXI fatal errors For 1 bit ECC errors, those errors can be recovered by hw. But for multi-bits ECC and AXI errors, there are something wrong with whole module or system, so try reset the controller to recover those errors instead of calling panic(). Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 93 ++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 37 deletions(-) commit d3c4dd4e3dc52a7a8ae4cfd91fedffdeeb6e003b Author: John Garry Date: Mon Apr 10 21:22:00 2017 +0800 scsi: hisi_sas: fix NULL deference when TMF timeouts If a TMF timeouts (maybe due to unlikely scenario of an expander being unplugged when TMF for remote device is active), when we eventually try to free the slot, we crash as we dereference the slot's task, which has already been released. As a fix, add checks in the slot release code for a NULL task. Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 60 +++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 27 deletions(-) commit 0844a3ff00e30cf7e8edbce40eab83593c051c78 Author: John Garry Date: Mon Apr 10 21:21:59 2017 +0800 scsi: hisi_sas: add v2 hw internal abort timeout workaround This patch is a workaround for a SoC bug where an internal abort command may timeout. In v2 hw, the channel should become idle in order to finish abort process. If the target side has been sending HOLD, host side channel failed to complete the frame to send, and can not enter the idle state. Then internal abort command will timeout. As this issue is only in v2 hw, we deal with it in the hw layer. Our workaround solution is: If abort is not finished within a certain period of time, we will check HOLD status. If HOLD has been sending, we will send break command. Signed-off-by: John Garry Signed-off-by: Xiaofei Tan Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 62 +++++++++++++++++++++++++++++----- 3 files changed, 55 insertions(+), 10 deletions(-) commit 819cbf189553b183dd1257ea44c4e47949481116 Author: Xiaofei Tan Date: Mon Apr 10 21:21:58 2017 +0800 scsi: hisi_sas: workaround SoC about abort timeout bug This patch adds a workaround solution for a SoC bug which may cause SoC logic fatal error when disabling a PHY. Then we find internal abort IO timeout may occur, and the controller IO breakpoint may be corrupted. We work around this SoC bug by optimizing the flow of disabling a PHY. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 127 ++++++++++++++++++++++++++++++++- 1 file changed, 126 insertions(+), 1 deletion(-) commit 32ccba52f128dbaee87c0bc5b45403f484c7e013 Author: Xiaofei Tan Date: Mon Apr 10 21:21:57 2017 +0800 scsi: hisi_sas: workaround a SoC SATA IO processing bug This patch provides a workaround a SoC bug where SATA IPTTs for different devices may conflict. The workaround solution requests the following: 1. SATA device id must be even and not equal to SAS IPTT. 2. SATA device can not share the same IPTT with other SAS or SATA device. Besides we shall consider IPTT value 0 is reserved for another SoC bug (STP device open link at firstly after SAS controller reset). To sum up, the solution is: Each SATA device uses independent and continuous 32 even IPTT from 64 to 4094, then v2 hw can only support 63 SATA devices. All SAS device(SSP/SMP devices) share odd IPTT value from 1 to 4095. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 2 + drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 83 ++++++++++++++++++++++++++++------ 2 files changed, 72 insertions(+), 13 deletions(-) commit c7b9d369e4073399f97e6e090570f7df80f050dc Author: Xiaofei Tan Date: Mon Apr 10 21:21:56 2017 +0800 scsi: hisi_sas: workaround STP link SoC bug After resetting the controller, the process of scanning SATA disks attached to an expander may fail occasionally. The issue is that the controller can't close the STP link created by target if the max link time is 0. To workaround this issue, we reject STP link after resetting the controller, and change the corresponding PHY to accept STP link only after receiving data. We do this check in cq interrupt handler. In order not to reduce efficiency, we use an variable to control whether we should check and change PHY to accept STP link. The function phys_reject_stp_links_v2_hw() should be called after resetting the controller. The solution of another SoC bug "SATA IO timeout", that also uses the same register to control STP link, is not effective before the PHY accepts STP link. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 60 +++++++++++++++++++++++++++++++++- 2 files changed, 60 insertions(+), 1 deletion(-) commit fcabb09e59a71ee7878ca3681828eed6e2c15cd2 Author: Johannes Thumshirn Date: Fri Apr 7 15:42:24 2017 +0200 scsi: libfc: directly call ELS request handlers Directly call ELS request handler functions in fc_lport_recv_els_req instead of saving the pointer to the handler's receive function and then later dereferencing this pointer. This makes the code a bit more obvious. Signed-off-by: Johannes Thumshirn Reviewed-by: Chad Dupuis Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_lport.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 97d27b0dd015e980ade63fda111fd1353276e28b Author: Hannes Reinecke Date: Fri Apr 7 09:34:17 2017 +0200 scsi: sg: close race condition in sg_remove_sfp_usercontext() sg_remove_sfp_usercontext() is clearing any sg requests, but needs to take 'rq_list_lock' when modifying the list. Reported-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Tested-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 109bade9c625c89bb5ea753aaa1a0a97e6fbb548 Author: Hannes Reinecke Date: Fri Apr 7 09:34:16 2017 +0200 scsi: sg: use standard lists for sg_requests 'Sg_request' is using a private list implementation; convert it to standard lists. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Tested-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 147 ++++++++++++++++++++++-------------------------------- 1 file changed, 61 insertions(+), 86 deletions(-) commit 28676d869bbb5257b5f14c0c95ad3af3a7019dd5 Author: Johannes Thumshirn Date: Fri Apr 7 09:34:15 2017 +0200 scsi: sg: check for valid direction before starting the request Check for a valid direction before starting the request, otherwise we risk running into an assertion in the scsi midlayer checking for valid requests. [mkp: fixed typo] Signed-off-by: Johannes Thumshirn Link: http://www.spinics.net/lists/linux-scsi/msg104400.html Reported-by: Dmitry Vyukov Signed-off-by: Hannes Reinecke Tested-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 46 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 12 deletions(-) commit 1bc0eb0446158cc76562176b80623aa119afee5b Author: Hannes Reinecke Date: Fri Apr 7 09:34:14 2017 +0200 scsi: sg: protect accesses to 'reserved' page array The 'reserved' page array is used as a short-cut for mapping data, saving us to allocate pages per request. However, the 'reserved' array is only capable of holding one request, so this patch introduces a mutex for protect 'sg_fd' against concurrent accesses. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Tested-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) commit 136e57bf43dc4babbfb8783abbf707d483cacbe3 Author: Hannes Reinecke Date: Fri Apr 7 09:34:13 2017 +0200 scsi: sg: remove 'save_scat_len' Unused. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Tested-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 2 -- 1 file changed, 2 deletions(-) commit 745dfa0d8ec26b24f3304459ff6e9eacc5c8351b Author: Hannes Reinecke Date: Fri Apr 7 09:34:12 2017 +0200 scsi: sg: disable SET_FORCE_LOW_DMA The ioctl SET_FORCE_LOW_DMA has never worked since the initial git check-in, and the respective setting is nowadays handled correctly. So disable it entirely. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Tested-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 30 +++++++++--------------------- include/scsi/sg.h | 1 - 2 files changed, 9 insertions(+), 22 deletions(-) commit 1fdcd2d1da7f5293a210af52407d5024036975c2 Author: Colin Ian King Date: Thu Apr 6 12:19:57 2017 +0100 scsi: qla2xxx: remove some redundant pointer assignments There are several local or function parameter pointers that are being assigned NULL after a kfree where and these have no effect and hence can be removed. Fixes various cppcheck warnings: "Assignment of function parameter has no effect outside the function. Did you forget dereferencing it" Signed-off-by: Colin Ian King Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 6 ------ 1 file changed, 6 deletions(-) commit 4cd4ca7cc848bedc70b5d0acac9d1ae33d73513a Author: Stephan Müller Date: Tue Apr 11 13:07:07 2017 +0200 keys: select CONFIG_CRYPTO when selecting DH / KDF Select CONFIG_CRYPTO in addition to CONFIG_HASH to ensure that also CONFIG_HASH2 is selected. Both are needed for the shash cipher support required for the KDF operation. Signed-off-by: Stephan Mueller Signed-off-by: David Howells security/keys/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 54c2258cd63a81283cf88b2bd9457c61ee2cd66f Author: Chao Yu Date: Tue Apr 11 09:25:22 2017 +0800 f2fs: extract rb-tree operation infrastructure rb-tree lookup/update functions are deeply coupled into extent cache codes, it's very hard to reuse these basic functions, this patch extracts common rb-tree operation infrastructure for latter reusing. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/extent_cache.c | 291 +++++++++++++++++++++++++++---------------------- fs/f2fs/f2fs.h | 20 +++- 2 files changed, 179 insertions(+), 132 deletions(-) commit 8fd5a37efa0b036353df253e20dabe8773c039cd Author: Jaegeuk Kim Date: Fri Apr 7 17:25:54 2017 -0700 f2fs: avoid frequent checkpoint during f2fs_gc Now we're doing SSR aggressively more than ever before, so once we reach to the reserved_segment, f2fs_balance_fs will call f2fs_gc, which triggers checkpoint everytime. We actually must avoid that. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit fcd403aff643a120dbb3f1851337df5353ac8970 Author: Artur Paszkiewicz Date: Tue Apr 11 20:50:51 2017 +0200 raid5-ppl: use a single mempool for ppl_io_unit and header_page Allocate both struct ppl_io_unit and its header_page from a shared mempool to avoid a possible deadlock. Implement allocate and free functions for the mempool, remove the second pool for allocating header_page. The header_pages are now freed with their io_units, not when the ppl bio completes. Also, use GFP_NOWAIT instead of GFP_ATOMIC for allocating ppl_io_unit because we can handle failed allocations and there is no reason to utilize emergency reserves. Suggested-by: NeilBrown Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li drivers/md/raid5-ppl.c | 53 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 16 deletions(-) commit 64d6ea602ce619633a6e0af979e2c73738f6aeba Author: Shawn Lin Date: Tue Apr 11 16:27:02 2017 -0500 PCI: rockchip: Set PCI_EXP_LNKSTA_SLC in the Root Port All platforms using Rockchip use a common clock for the Root Port and the slot connected to it. Indicate this by setting the Slot Clock Configuration (PCI_EXP_LNKSTA_SLC) bit in the Root Port's Link Status. Per the Implementation Note in the spec (PCIe r3.1, sec 7.8.7), if the downstream component also sets PCI_EXP_LNKSTA_SLC, software may set the Common Clock Configuration (PCI_EXP_LNKCTL_CCC) bits on both ends of the Link. This is done by pcie_aspm_configure_common_clock(). Signed-off-by: Shawn Lin Cc: Brian Norris Cc: jeffy.chen drivers/pci/host/pcie-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d8d2c9482474804a5c2b33ea9218d33dbcb48ba Author: Fabio Estevam Date: Tue Apr 11 15:49:35 2017 -0300 ASoC: tas2552: Fix typos in the binding doc Fix the following typos: "receive its reference clock" and "selected". Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/tas2552.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ddea87ea79927ba0b94e697a505f90fe06c29f84 Author: Fabio Estevam Date: Tue Apr 11 15:49:34 2017 -0300 ASoC: tas2552: Describe the possible I2C addresses According to the TAS2552 datasheet the possible I2C addresses are: 0x40 - when ADDR pin is 0 0x41 - when ADDR pin is 1 List the possible values for better clarification. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/tas2552.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e1c3e6e1ca996e0403a5958c054d2cebf1642b15 Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:23:15 2017 -0300 docs-rst: fix usb cross-references As some USB documentation files got moved, adjust their cross-references to their new place. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/ABI/stable/sysfs-bus-usb | 2 +- Documentation/driver-api/usb/URB.rst | 2 ++ Documentation/driver-api/usb/callbacks.rst | 4 ++-- Documentation/driver-api/usb/error-codes.rst | 2 ++ Documentation/driver-api/usb/persist.rst | 2 ++ Documentation/driver-api/usb/power-management.rst | 2 +- Documentation/driver-api/usb/usb.rst | 4 ++-- Documentation/power/swsusp.txt | 2 +- drivers/staging/most/hdm-usb/hdm_usb.c | 2 +- drivers/usb/core/Kconfig | 2 +- 10 files changed, 15 insertions(+), 9 deletions(-) commit 0cb300623e3bb460fd9853bbde2fd1973e3bbcd8 Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:23:14 2017 -0300 usb: gadget.h: be consistent at kernel doc macros There's one value that use spaces instead of tabs to ident. That causes the following warning: ./include/linux/usb/gadget.h:193: ERROR: Unexpected indentation. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet include/linux/usb/gadget.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e208a00cffd1358cecf79074e50b093212043c1 Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:23:13 2017 -0300 usb: composite.h: fix two warnings when building docs By definition, we use /* private: */ tag when we won't be documenting a parameter. However, those two parameters are documented: ./include/linux/usb/composite.h:510: warning: Excess struct/union/enum/typedef member 'setup_pending' description in 'usb_composite_dev' ./include/linux/usb/composite.h:510: warning: Excess struct/union/enum/typedef member 'os_desc_pending' description in 'usb_composite_dev' So, we need to use /* public: */ to avoid a warning. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet include/linux/usb/composite.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e0c34e900611a58c93adf463d096c5843eb1967a Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:23:12 2017 -0300 usb: get rid of some ReST doc build errors We need an space before a numbered list to avoid those warnings: ./drivers/usb/core/message.c:478: ERROR: Unexpected indentation. ./drivers/usb/core/message.c:479: WARNING: Block quote ends without a blank line; unexpected unindent. ./include/linux/usb/composite.h:455: ERROR: Unexpected indentation. ./include/linux/usb/composite.h:456: WARNING: Block quote ends without a blank line; unexpected unindent. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet drivers/usb/core/message.c | 1 + include/linux/usb/composite.h | 1 + 2 files changed, 2 insertions(+) commit 69966c94b95832d51e7fbaa0e31a0ed5534c48e6 Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:23:11 2017 -0300 usb.rst: get rid of some Sphinx errors Get rid of those warnings: Documentation/driver-api/usb/usb.rst:615: ERROR: Unknown target name: "usb_type". Documentation/driver-api/usb/usb.rst:615: ERROR: Unknown target name: "usb_dir". Documentation/driver-api/usb/usb.rst:615: ERROR: Unknown target name: "usb_recip". Documentation/driver-api/usb/usb.rst:679: ERROR: Unknown target name: "usbdevfs_urb_type". Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/driver-api/usb/usb.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e463c06335d04043c079f1d1d66472ec049de5dd Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:23:10 2017 -0300 usb/URB.txt: convert to ReST and update it The URB doc describes the Kernel mechanism that do USB transfers. While the functions are already described at urb.h, there are a number of concepts and theory that are important for USB driver developers. Convert it to ReST and use C ref links to point to the places at usb.h where each function and struct is located. A few of those descriptions were incomplete. While here, update to reflect the current API status. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/driver-api/usb/URB.rst | 288 +++++++++++++++++++++++++++++++++ Documentation/driver-api/usb/index.rst | 1 + Documentation/driver-api/usb/usb.rst | 2 + Documentation/usb/URB.txt | 261 ------------------------------ 4 files changed, 291 insertions(+), 261 deletions(-) commit 32a3bebce9d09598d4f4c5afca929a2ce148b8c4 Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:23:09 2017 -0300 usb/persist.txt: convert to ReST and add to driver-api book This document describe some USB core features. Add it to the driver-api book. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/driver-api/usb/index.rst | 1 + Documentation/driver-api/usb/persist.rst | 169 +++++++++++++++++++++++++++++++ Documentation/usb/persist.txt | 165 ------------------------------ 3 files changed, 170 insertions(+), 165 deletions(-) commit 76f650f077f3edd7001c89da44eade2449e8f495 Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:23:08 2017 -0300 usb/hotplug.txt: convert to ReST and add to driver-api book This document describe some USB core features. Add it to the driver-api book. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/driver-api/usb/hotplug.rst | 154 +++++++++++++++++++++++++++++++ Documentation/driver-api/usb/index.rst | 1 + Documentation/usb/hotplug.txt | 148 ----------------------------- 3 files changed, 155 insertions(+), 148 deletions(-) commit 360a7b5f57e7734d34bc37574822ce74c5ba5d25 Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:23:07 2017 -0300 error-codes.rst: convert to ReST and add to driver-api book This document describe some USB core features. Add it to the driver-api book. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/driver-api/usb/error-codes.rst | 205 +++++++++++++++++++++++++++ Documentation/driver-api/usb/index.rst | 1 + Documentation/usb/error-codes.txt | 175 ----------------------- 3 files changed, 206 insertions(+), 175 deletions(-) commit 2a373331dd7405f7a1d6bfd21e5e9b4465350c34 Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:23:06 2017 -0300 usb/dma.txt: convert to ReST and add to driver-api book This document describe some USB core features. Add it to the driver-api book. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/driver-api/usb/dma.rst | 136 +++++++++++++++++++++++++++++++++ Documentation/driver-api/usb/index.rst | 1 + Documentation/usb/dma.txt | 133 -------------------------------- 3 files changed, 137 insertions(+), 133 deletions(-) commit 3db5f406e4440c486cec4772210b9802bf4546b3 Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:23:05 2017 -0300 usb/power-management.txt: convert to ReST and add to driver-api book This document describe some USB core functions. Add it to the driver-api book. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/driver-api/usb/index.rst | 1 + Documentation/driver-api/usb/power-management.rst | 794 ++++++++++++++++++++++ Documentation/usb/power-management.txt | 772 --------------------- 3 files changed, 795 insertions(+), 772 deletions(-) commit 3b38e4f21868d83ed03d5d101c789c4df2b08e8b Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:23:04 2017 -0300 usb/callbacks.txt: convert to ReST and add to driver-api book This document describe some USB core functions. Add it to the driver-api book. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/driver-api/usb/callbacks.rst | 157 +++++++++++++++++++++++++++++ Documentation/driver-api/usb/index.rst | 1 + Documentation/usb/callbacks.txt | 134 ------------------------ 3 files changed, 158 insertions(+), 134 deletions(-) commit 401c7be2bad9eea68c1a660d54d1caa00b3098e4 Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:23:03 2017 -0300 usb/bulk-streams.txt: convert to ReST and add to driver-api book This document describe some USB core functions. Add it to the driver-api book. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/driver-api/usb/bulk-streams.rst | 83 +++++++++++++++++++++++++++ Documentation/driver-api/usb/index.rst | 1 + Documentation/usb/bulk-streams.txt | 78 ------------------------- 3 files changed, 84 insertions(+), 78 deletions(-) commit 79e0c2e6d4a382a7ac80cf082e3ca60bd42ab475 Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:23:02 2017 -0300 usb/anchors.txt: convert to ReST and add to driver-api book This document describe some USB core functions. Add it to the driver-api book. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/driver-api/usb/anchors.rst | 83 ++++++++++++++++++++++++++++++++ Documentation/driver-api/usb/index.rst | 1 + Documentation/usb/anchors.txt | 79 ------------------------------ 3 files changed, 84 insertions(+), 79 deletions(-) commit 67cc20e0080479741e2328b97226cfab2eed91e9 Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:23:01 2017 -0300 writing_musb_glue_layer.rst: Enrich its ReST representation This file is actually quite complex, and required several manual handwork: - add a title for the document; - use the right tags for monospaced fonts; - use c references where needed; - adjust cross-reference to writing_usb_driver.rst - hightlight cross-referenced lines. With regards to C code snippet line highlights, the better would be to use :linenos: for the C code snippets that are referenced by the line number. However, at least with Sphinx 1.4.9, enabling it cause the line number to be misaligned with the code, making it even more confusing. So, instead, let's use :emphasize-lines: tag to mark the lines that are referenced at the text. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet .../driver-api/usb/writing_musb_glue_layer.rst | 616 ++++++++++----------- 1 file changed, 301 insertions(+), 315 deletions(-) commit 0e8c46d0326ef6ade51789159ca774c9178d6988 Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:23:00 2017 -0300 writing_usb_driver.rst: Enrich its ReST representation The pandoc conversion is not perfect. Do handwork in order to: - add a title to this chapter; - adjust function and struct references; - use monospaced fonts for C code names; - some other minor adjustments to make it better to read in text mode and in html. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet .../driver-api/usb/writing_usb_driver.rst | 182 ++++++++++----------- 1 file changed, 82 insertions(+), 100 deletions(-) commit e1cfb8cabee4295d248b7fe574c4d33f59c7721f Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:22:59 2017 -0300 gadget.rst: Enrich its ReST representation and add kernel-doc tag The pandoc conversion is not perfect. Do handwork in order to: - add a title to this chapter; - use the proper warning and note markups; - use kernel-doc to include Kernel header and c files; - remove legacy notes with regards to DocBook; - some other minor adjustments to make it better to read in text mode and in html. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/driver-api/usb/gadget.rst | 127 +++++++++++++------------------- 1 file changed, 52 insertions(+), 75 deletions(-) commit 9a3c8b3545ca9584644e1c7571ab9b9c4fc013e8 Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:22:58 2017 -0300 usb.rst: Enrich its ReST representation - use the proper warning and note markups; - add references for parts of the document that will be cross-referenced on other USB docs; - some minor adjustments to make it better to read in text mode and in html. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/driver-api/usb/usb.rst | 48 +++++++++++++----------------------- 1 file changed, 17 insertions(+), 31 deletions(-) commit 4ad4b21b1b81ce215c1d45850bd5a67e2179c60a Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:22:57 2017 -0300 docs-rst: convert usb docbooks to ReST As we're moving out of DocBook, let's convert the remaining USB docbooks to ReST. The transformation itself on this patch is a no-brainer conversion using pandoc via this script: Documentation/sphinx/tmplcvt Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/DocBook/Makefile | 7 +- Documentation/DocBook/gadget.tmpl | 793 ------------------- Documentation/DocBook/writing_musb_glue_layer.tmpl | 873 --------------------- Documentation/DocBook/writing_usb_driver.tmpl | 412 ---------- Documentation/driver-api/index.rst | 2 +- Documentation/driver-api/usb.rst | 748 ------------------ Documentation/driver-api/usb/gadget.rst | 533 +++++++++++++ Documentation/driver-api/usb/index.rst | 17 + Documentation/driver-api/usb/usb.rst | 748 ++++++++++++++++++ .../driver-api/usb/writing_musb_glue_layer.rst | 737 +++++++++++++++++ .../driver-api/usb/writing_usb_driver.rst | 344 ++++++++ 11 files changed, 2383 insertions(+), 2831 deletions(-) commit aeb1404d68df62b0a1d277a4138dbd92a4330304 Author: Dong Aisheng Date: Wed Apr 12 09:58:45 2017 +0800 regulator: anatop: remove unneeded name field of struct anatop_regulator sreg->name is only used as an intermediate assign of rdesc->name, plus another strcmp. Since we already have rdesc->name, no need it anymore. Signed-off-by: Dong Aisheng Signed-off-by: Mark Brown drivers/regulator/anatop-regulator.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 5062e04711dbc4f67b24ffd926cc67060267792d Author: Dong Aisheng Date: Wed Apr 12 09:58:44 2017 +0800 regulator: anatop: use of_property_read_string to read the name sreg->name is a string, so use a more proper api to read back the string instead of of_get_property. Signed-off-by: Dong Aisheng Signed-off-by: Mark Brown drivers/regulator/anatop-regulator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7f51cf2ea7186e3f217e616a5522f1156678356f Author: Dong Aisheng Date: Wed Apr 12 09:58:42 2017 +0800 regulator: anatop: check return value of of_get_regulator_init_data Should check the return value of of_get_regulator_init_data before using it. Signed-off-by: Dong Aisheng Signed-off-by: Mark Brown drivers/regulator/anatop-regulator.c | 3 +++ 1 file changed, 3 insertions(+) commit d76a085bc87f68c5098e0150973e0b319a258a8c Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:22:56 2017 -0300 driver-api/basics.rst: add device table header The structs there at device table are used by other documentation at the Kernel. So, add it to the driver API. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/driver-api/basics.rst | 6 ++++++ 1 file changed, 6 insertions(+) commit 686b0d9bb4d900758b3ed88f037e46671c7ccef7 Author: Mauro Carvalho Chehab Date: Wed Apr 5 10:22:55 2017 -0300 tmplcvt: make the tool more robust Currently, the script just assumes to be called at Documentation/sphinx/. Change it to work on any directory, and make it abort if something gets wrong. Also, be sure that both parameters are specified. That should avoid troubles like this: $ Documentation/sphinx/tmplcvt Documentation/DocBook/writing_usb_driver.tmpl sed: couldn't open file convert_template.sed: No such file or directory Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/sphinx/tmplcvt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit e6d56d21bdcfd8968c1859bc1892608acad3e6d8 Author: John Stultz Date: Tue Apr 11 12:15:18 2017 -0700 ASoC: hisilicon: Use devm_snd_soc_register_component Per feedback from Mark Brown, this patch updates the hi6210-i2s driver to use devm_snd_soc_register_component which simplifies the logic a bit. Signed-off-by: John Stultz Signed-off-by: Mark Brown sound/soc/hisilicon/hi6210-i2s.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit 16c1c089b23aea681600d504102db950c1bd6ee4 Author: John Stultz Date: Tue Apr 11 12:15:17 2017 -0700 ASoC: hisilicon: Address style nit to use break in final default of switch statement Mark Brown suggested a style change to use break in the final default of a switch statement, so this patch addresses that. Signed-off-by: John Stultz Signed-off-by: Mark Brown sound/soc/hisilicon/hi6210-i2s.c | 2 ++ 1 file changed, 2 insertions(+) commit da13d7462b013ab58129fe20bfb3acb3aa73e07e Author: John Stultz Date: Tue Apr 11 12:15:16 2017 -0700 ASoC: hisilicon: Add error returns even for cases that shouldn't happen. This patch addresses feedback from Mark Brown, adding a few extra error returns in cases that shouldn't happen Signed-off-by: John Stultz Signed-off-by: Mark Brown sound/soc/hisilicon/hi6210-i2s.c | 2 ++ 1 file changed, 2 insertions(+) commit 6895baa6a64fa9499e4d11696d59b3522c527ed0 Author: Lv Zheng Date: Tue Apr 11 15:48:05 2017 +0800 ACPICA: Add non-linux host build support _LINUX: used to detect a target build is a linux kernel/application. __linux__: used to detect a build is on a linux hosts. Thus we can see: if a linux kernel build is performed on environments other than linux hosts, __linux__ may not be defined by the compiler and _LINUX cannot cover linux kernel resident ACPICA files, as it's only defined in and hence only allows non ACPICA kernel files to correctly include aclinux.h. As a conclusion, we don't actually support such build. This patch adds -D_LINUX for ACPICA files so that kernel builds on any hosts can use unified _LINUX as a linux kernel target indication to correctly include aclinux.h. Tested-by: Al Stone Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3393af24b665cb0aea7353b05e522b03ab1e7d73 Author: Alexey Kardashevskiy Date: Mon Mar 27 14:23:40 2017 +1100 vfio/spapr_tce: Check kzalloc() return when preregistering memory This adds missing checking for kzalloc() return value. Fixes: 4b6fad7097f8 ("powerpc/mm/iommu, vfio/spapr: Put pages on VFIO container shutdown") Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_spapr_tce.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7f1534e172f5eb9c215a25d73ee9ef57eb1582ba Author: Adam Borowski Date: Mon Mar 27 14:21:14 2017 +0200 vt: make mouse selection of non-ASCII consistent For some reason a handful of ISO-8859-1 symbols are excluded from "word chars" while the vast majority of Unicode is hard-coded as included, even when inappropriate (we really would want to _not_ select line-drawing/etc). Those symbols are: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿×÷ Thus, let's not special-case any non-ASCII anymore. Attempts to set these via ioctl will be silently ignored. As an extra bonus, we debloat the kernel by 128 bytes. Signed-off-by: Adam Borowski Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/selection.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 7d6d44aee0aed24f243a37ec525a4fcb40e6e2d4 Author: Adam Borowski Date: Mon Mar 27 14:21:13 2017 +0200 vt: set mouse selection word-chars to gpm's default Since forever, gpm was this code's only user, and it overrides the table on start so the default was never seen -- until Bill Allombert's "consolation" came in. The in-kernel set is "A-Za-z0-9_" which fails to catch typical file names, etc. Let's change this to gpm's conservative default, ie "-A-Za-z0-9_./"; most terminals include more, for example xfce4-terminal has "-A-Za-z0-9,./?%&#:_=+@~". There's some discussion at https://bugs.debian.org/846587 Signed-off-by: Adam Borowski Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/selection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1282ba7fc28dbc66c3f0e4aaafaaa228361d1ae5 Author: Alexey Kardashevskiy Date: Fri Mar 24 17:44:06 2017 +1100 vfio/powerpc/spapr_tce: Enforce IOMMU type compatibility check The existing SPAPR TCE driver advertises both VFIO_SPAPR_TCE_IOMMU and VFIO_SPAPR_TCE_v2_IOMMU types to the userspace and the userspace usually picks the v2. Normally the userspace would create a container, attach an IOMMU group to it and only then set the IOMMU type (which would normally be v2). However a specific IOMMU group may not support v2, in other words it may not implement set_window/unset_window/take_ownership/ release_ownership and such a group should not be attached to a v2 container. This adds extra checks that a new group can do what the selected IOMMU type suggests. The userspace can then test the return value from ioctl(VFIO_SET_IOMMU, VFIO_SPAPR_TCE_v2_IOMMU) and try VFIO_SPAPR_TCE_IOMMU. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_spapr_tce.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 18a4208826dd0a13eb06de724c86bba2c225f943 Author: Peter Senna Tschudin Date: Fri Apr 7 11:45:24 2017 +0200 imx-serial: Reduce RX DMA startup latency when opening for reading Reduce RX DMA start latency for the first reception when port is opened for reading. Instead of waiting for an interrupt signaling data on RX FIFO or data too old on RX FIFO, start RX DMA immediately when the serial port is opened for reading. Before this patch, the average RX DMA latency for the first reception was 42489 microseconds with a standard deviation of 25721 microseconds in 36 samples. After the patch the average RX DMA latency for the first reception, when the serial port is opened for reading, is 653 microseconds with a standard deviation of 294 microseconds in 36 samples. Signed-off-by: Peter Senna Tschudin Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 63 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 14 deletions(-) commit 77e6fe7fd2b7cba0bf2f2dc8cde51d7b9a35bf74 Author: Johan Hovold Date: Mon Apr 10 11:21:39 2017 +0200 serial: omap: suspend device on probe errors Make sure to actually suspend the device before returning after a failed (or deferred) probe. Note that autosuspend must be disabled before runtime pm is disabled in order to balance the usage count due to a negative autosuspend delay as well as to make the final put suspend the device synchronously. Fixes: 388bc2622680 ("omap-serial: Fix the error handling in the omap_serial probe") Cc: Shubhrajyoti D Signed-off-by: Johan Hovold Acked-by: Tony Lindgren Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/omap-serial.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 099bd73dc17ed77aa8c98323e043613b6e8f54fc Author: Johan Hovold Date: Mon Apr 10 11:21:38 2017 +0200 serial: omap: fix runtime-pm handling on unbind An unbalanced and misplaced synchronous put was used to suspend the device on driver unbind, something which with a likewise misplaced pm_runtime_disable leads to external aborts when an open port is being removed. Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa024010 ... [] (serial_omap_set_mctrl) from [] (uart_update_mctrl+0x50/0x60) [] (uart_update_mctrl) from [] (uart_shutdown+0xbc/0x138) [] (uart_shutdown) from [] (uart_hangup+0x94/0x190) [] (uart_hangup) from [] (__tty_hangup+0x404/0x41c) [] (__tty_hangup) from [] (tty_vhangup+0x1c/0x20) [] (tty_vhangup) from [] (uart_remove_one_port+0xec/0x260) [] (uart_remove_one_port) from [] (serial_omap_remove+0x40/0x60) [] (serial_omap_remove) from [] (platform_drv_remove+0x34/0x4c) Fix this up by resuming the device before deregistering the port and by suspending and disabling runtime pm only after the port has been removed. Also make sure to disable autosuspend before disabling runtime pm so that the usage count is balanced and device actually suspended before returning. Note that due to a negative autosuspend delay being set in probe, the unbalanced put would actually suspend the device on first driver unbind, while rebinding and again unbinding would result in a negative power.usage_count. Fixes: 7e9c8e7dbf3b ("serial: omap: make sure to suspend device before remove") Cc: Felipe Balbi Cc: Santosh Shilimkar Signed-off-by: Johan Hovold Acked-by: Tony Lindgren Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/omap-serial.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit c3f0d0bc5b01ad90c45276952802455750444b4f Author: Mark Charlebois Date: Fri Mar 31 22:38:13 2017 +0200 kbuild, LLVMLinux: Add -Werror to cc-option to support clang Clang will warn about unknown warnings but will not return false unless -Werror is set. GCC will return false if an unknown warning is passed. Adding -Werror make both compiler behave the same. [arnd: it turns out we need the same patch for testing whether -ffunction-sections works right with gcc. I've build tested extensively with this patch applied, so let's just merge this one now.] Signed-off-by: Mark Charlebois Signed-off-by: Behan Webster Reviewed-by: Jan-Simon Möller Signed-off-by: Arnd Bergmann Acked-by: Kees Cook Signed-off-by: Masahiro Yamada scripts/Kbuild.include | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 986a5bc028a84d487c354a529730b48682d1fb41 Author: Taeung Song Date: Sat Apr 8 09:52:25 2017 +0900 perf annotate: Use stripped line instead of raw disassemble line When parsing disassemble lines for source line number, use a stripped line instead of raw line. Signed-off-by: Taeung Song Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/1491612748-1605-3-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4597cf0664d2fad785509dedfed22f8fe8951ebb Author: Taeung Song Date: Sat Apr 8 09:52:24 2017 +0900 perf annotate: Refactor the code to parse disassemble lines with {l,r}trim() When parsing disassemble lines, use ltrim() and rtrim() to strip them, not using just while loop and isspace(). Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/1491612748-1605-2-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 42 +++++++----------------------------------- 1 file changed, 7 insertions(+), 35 deletions(-) commit c9d1c93421e3b3c7051b193c9cf648a3bc55cb3e Author: David Carrillo-Cisneros Date: Mon Apr 10 13:14:32 2017 -0700 perf tools: Do not print missing features in pipe-mode Pipe-mode has no perf.data header, hence no upfront knowledge of presend and missing features, hence, do not print missing features in pipe-mode. Signed-off-by: David Carrillo-Cisneros Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: He Kuang Cc: Masami Hiramatsu Cc: Paul Turner Cc: Peter Zijlstra Cc: Simon Que Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/20170410201432.24807-8-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 3 +++ 1 file changed, 3 insertions(+) commit 0973ad97c187e06aece61f685b9c3b2d93290a73 Author: David Carrillo-Cisneros Date: Mon Apr 10 13:14:30 2017 -0700 perf session: Don't rely on evlist in pipe mode Session sets a number parameters that rely on evlist. These parameters are not used in pipe-mode and should not be set, since evlist is unavailable. Fix that. Signed-off-by: David Carrillo-Cisneros Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: He Kuang Cc: Masami Hiramatsu Cc: Paul Turner Cc: Peter Zijlstra Cc: Simon Que Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/20170410201432.24807-6-davidcc@google.com [ Check if file != NULL in perf_session__new(), like when used by builtin-top.c ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/session.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 349e7a85b25fa6ee82902d9be2cc5f3bec815120 Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:03 2017 +0530 PCI: endpoint: functions: Add an EP function to test PCI Adds a new endpoint function driver (to program the virtual test device) making use of the EP-core library. [bhelgaas: fold in pci_epf_test_probe() -ENOMEM test from Wei Yongjun ] Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/endpoint/Kconfig | 2 + drivers/pci/endpoint/Makefile | 2 +- drivers/pci/endpoint/functions/Kconfig | 12 + drivers/pci/endpoint/functions/Makefile | 5 + drivers/pci/endpoint/functions/pci-epf-test.c | 510 ++++++++++++++++++++++++++ 5 files changed, 530 insertions(+), 1 deletion(-) commit 42fc2ac6e809a9f383e8ffa78b7f3fcd2fab1649 Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:02 2017 +0530 Documentation: PCI: Add specification for the *PCI test* function device Add specification for the *PCI test* virtual function device. The endpoint function driver and the host PCI driver should be created based on this specification. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas Documentation/PCI/00-INDEX | 2 + Documentation/PCI/endpoint/pci-test-function.txt | 66 ++++++++++++++++++++++++ 2 files changed, 68 insertions(+) commit 3a401a2ce1cb6f6e52b78f21aa82e5d90e35c430 Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:01 2017 +0530 PCI: endpoint: Create configfs entry for EPC device and EPF driver Invoke APIs provided by pci-ep-cfs to create configfs entry for every EPC device and EPF driver to help users in creating EPF device and binding the EPF device to the EPC device. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/endpoint/pci-epc-core.c | 4 ++++ drivers/pci/endpoint/pci-epf-core.c | 4 ++++ include/linux/pci-epc.h | 2 ++ include/linux/pci-epf.h | 2 ++ 4 files changed, 12 insertions(+) commit bea37d3d3121d051b12541f06327d7ac63996fc0 Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:15:00 2017 +0530 Documentation: PCI: Guide to use PCI endpoint configfs Add Documentation to help users use PCI endpoint to configure PCI endpoint function and to bind the endpoint function with endpoint controller. Signed-off-by: Kishon Vijay Abraham I Acked-By: Joao Pinto Signed-off-by: Bjorn Helgaas Documentation/PCI/00-INDEX | 2 + Documentation/PCI/endpoint/pci-endpoint-cfs.txt | 105 ++++++++++++++++++++++++ 2 files changed, 107 insertions(+) commit d746799116103d857be203382b09035bbe225d03 Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:14:59 2017 +0530 PCI: endpoint: Introduce configfs entry for configuring EP functions Introduce a new configfs entry to configure the EP function (like configuring the standard configuration header entries) and to bind the EP function with EP controller. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/endpoint/Kconfig | 9 + drivers/pci/endpoint/Makefile | 1 + drivers/pci/endpoint/pci-ep-cfs.c | 509 ++++++++++++++++++++++++++++++++++++++ include/linux/pci-ep-cfs.h | 41 +++ 4 files changed, 560 insertions(+) commit a8a5be098885e8394497a6b64fb3f96dd217846b Author: Kishon Vijay Abraham I Date: Mon Mar 27 15:14:58 2017 +0530 Documentation: PCI: Guide to use PCI Endpoint Core Layer Add Documentation to help users use endpoint library to enable endpoint mode in the PCI controller and add new PCI endpoint functions. Signed-off-by: Kishon Vijay Abraham I Acked-By: Joao Pinto Signed-off-by: Bjorn Helgaas Documentation/PCI/00-INDEX | 2 + Documentation/PCI/endpoint/pci-endpoint.txt | 215 ++++++++++++++++++++++++++++ 2 files changed, 217 insertions(+) commit 5e8cb4033807e39849b753e5399ec130c0995f1f Author: Kishon Vijay Abraham I Date: Mon Apr 10 19:25:10 2017 +0530 PCI: endpoint: Add EP core layer to enable EP controller and EP functions Introduce a new EP core layer in order to support endpoint functions in linux kernel. This comprises the EPC library (Endpoint Controller Library) and EPF library (Endpoint Function Library). EPC library implements functions specific to an endpoint controller and EPF library implements functions specific to an endpoint function. Signed-off-by: Kishon Vijay Abraham I Acked-by: Joao Pinto Signed-off-by: Bjorn Helgaas drivers/Makefile | 2 + drivers/pci/Kconfig | 1 + drivers/pci/endpoint/Kconfig | 20 ++ drivers/pci/endpoint/Makefile | 6 + drivers/pci/endpoint/pci-epc-core.c | 576 ++++++++++++++++++++++++++++++++++++ drivers/pci/endpoint/pci-epc-mem.c | 143 +++++++++ drivers/pci/endpoint/pci-epf-core.c | 355 ++++++++++++++++++++++ include/linux/mod_devicetable.h | 10 + include/linux/pci-epc.h | 142 +++++++++ include/linux/pci-epf.h | 160 ++++++++++ 10 files changed, 1415 insertions(+) commit f7b1a77d3bfbdc7e91a1e48e0a3dc10e7d890e04 Merge: 28d0635 47a4693 Author: Radim Krčmář Date: Tue Apr 11 20:54:40 2017 +0200 Merge tag 'kvm-s390-next-4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux From: Christian Borntraeger KVM: s390: features for 4.12 1. guarded storage support for guests This contains an s390 base Linux feature branch that is necessary to implement the KVM part 2. Provide an interface to implement adapter interruption suppression which is necessary for proper zPCI support 3. Use more defines instead of numbers 4. Provide logging for lazy enablement of runtime instrumentation commit e679af627fe875a51d40b9a2b17f08fbde36e0e2 Author: Petr Mladek Date: Tue Apr 11 13:07:48 2017 +0200 livepatch: Cancel transition a safe way for immediate patches klp_init_transition() does not set func->transition for immediate patches. Then klp_ftrace_handler() could use the new code immediately. As a result, it is not safe to put the livepatch module in klp_cancel_transition(). This patch reverts most of the last minute changes klp_cancel_transition(). It keeps the warning about a misuse because it still makes sense. Fixes: 3ec24776bfd0 ("livepatch: allow removal of a disabled patch") Signed-off-by: Petr Mladek Acked-by: Miroslav Benes Acked-by: Josh Poimboeuf Signed-off-by: Jiri Kosina kernel/livepatch/transition.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 8f917bba0042f1e3b7693743fbe9782709e936e7 Author: Willem de Bruijn Date: Tue Apr 11 14:08:08 2017 -0400 bpf: pass sk to helper functions BPF helper functions access socket fields through skb->sk. This is not set in ingress cgroup and socket filters. The association is only made in skb_set_owner_r once the filter has accepted the packet. Sk is available as socket lookup has taken place. Temporarily set skb->sk to sk in these cases. Signed-off-by: Willem de Bruijn Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/cgroup.c | 5 ++++- net/core/filter.c | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) commit cb6bf9cfdb5e26dfb7eb9b955b2f24d82703e27d Author: Wei Yongjun Date: Tue Apr 11 16:02:02 2017 +0000 devlink: fix return value check in devlink_dpipe_header_put() Fix the return value check which testing the wrong variable in devlink_dpipe_header_put(). Fixes: 1555d204e743 ("devlink: Support for pipeline debug (dpipe)") Signed-off-by: Wei Yongjun Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/core/devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b46b99d785eb5964dad04c3aee9431d9c9e4aafa Merge: 40077e0 6ffa4d1 Author: David S. Miller Date: Tue Apr 11 14:51:36 2017 -0400 Merge branch 's390-qeth-updates' Julian Wiedmann says: ==================== more s390/net updates here's a second batch of s390/net patches for net-next. A mixed bunch of qeth cleanups, and a few patches to add support for ETHTOOL_GLINKSETTINGS. ==================== Signed-off-by: David S. Miller commit 6ffa4d1bbe461b7b88e02feca98282a46cb6c33b Author: Julian Wiedmann Date: Tue Apr 11 16:11:19 2017 +0200 s390/qeth: remove unimplemented gdev routines prepare() and complete() are not implemented by any discipline, so just drop all the indirection. Signed-off-by: Julian Wiedmann Reviewed-by: Hans Wippel Reviewed-by: Thomas Richter Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 2 -- drivers/s390/net/qeth_core_main.c | 19 ++----------------- 2 files changed, 2 insertions(+), 19 deletions(-) commit 41fc3b6567a5b072b45f654fab767457a740c637 Author: Julian Wiedmann Date: Tue Apr 11 16:11:18 2017 +0200 s390/qeth: use LINK_MODE_* to report the link characteristics LINK_MODE_* replaces the u32-limited SUPPORTED_* / ENABLED_* definitions. Signed-off-by: Julian Wiedmann Reviewed-by: Thomas Richter Reviewed-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 71 ++++++++++++++++++++++++++------------- 1 file changed, 47 insertions(+), 24 deletions(-) commit 993e19c0aeaaf4ad21e93a09110a782f4ef0c4d5 Author: Julian Wiedmann Date: Tue Apr 11 16:11:17 2017 +0200 s390/qeth: convert to ETHTOOL_GLINKSETTINGS API get_settings() is deprecated and lacks support for higher link speeds, so implement get_link_ksettings() instead. Signed-off-by: Julian Wiedmann Reviewed-by: Thomas Richter Reviewed-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 3 +- drivers/s390/net/qeth_core_main.c | 75 +++++++++++++++++++-------------------- drivers/s390/net/qeth_l2_main.c | 2 +- drivers/s390/net/qeth_l3_main.c | 2 +- 4 files changed, 40 insertions(+), 42 deletions(-) commit 774afb8e90685d6a12afa35d13a57113d7edebb4 Author: Julian Wiedmann Date: Tue Apr 11 16:11:16 2017 +0200 s390/qeth: clean up qeth_set_ecmd_adv_sup() In preparation for moving to get_link_ksettings(), clean up how we build the supported and advertised port/speed masks. Signed-off-by: Julian Wiedmann Reviewed-by: Thomas Richter Reviewed-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 57 +++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 29 deletions(-) commit 2aedd56af13386fa9edfd5f0178f39b85f5f9d42 Author: Julian Wiedmann Date: Tue Apr 11 16:11:15 2017 +0200 s390/qeth: use and remove some defines 1. a buffer has 16 is_header flags, because that's its # of elements 2. replace the last occurrence of QETH_HEADER_SIZE, and remove it Signed-off-by: Julian Wiedmann Acked-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 3 +-- drivers/s390/net/qeth_l2_main.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit e38db6beeed0eac14e21bf3963fdba80043211e3 Author: Julian Wiedmann Date: Tue Apr 11 16:11:14 2017 +0200 s390/qeth: use correct return type for hard_start_xmit() ndo_start_xmit() expects us to return netdev_tx_t here... Signed-off-by: Julian Wiedmann Acked-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_main.c | 3 ++- drivers/s390/net/qeth_l3_main.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 4e8d7e62560bba9772556ec6e11afcd20868d6a2 Author: Julian Wiedmann Date: Tue Apr 11 16:11:13 2017 +0200 s390/qeth: remove unused parameter 'elements_needed' is not used in qeth_do_send_packet_fast(), so consequently remove it. Signed-off-by: Julian Wiedmann Acked-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 2 +- drivers/s390/net/qeth_core_main.c | 3 +-- drivers/s390/net/qeth_l2_main.c | 2 +- drivers/s390/net/qeth_l3_main.c | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) commit 96d1bb53ec8b219abdee883c24799ba68ad4d460 Author: Julian Wiedmann Date: Tue Apr 11 16:11:12 2017 +0200 s390/qeth: move gdev shutdown handler to core Duplicated code. Signed-off-by: Julian Wiedmann Acked-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 1 - drivers/s390/net/qeth_core_main.c | 8 ++++++-- drivers/s390/net/qeth_l2_main.c | 12 ------------ drivers/s390/net/qeth_l3_main.c | 12 ------------ 4 files changed, 6 insertions(+), 27 deletions(-) commit d73ef3249356d78de3fd676bcf52448b950cb0bb Author: Julian Wiedmann Date: Tue Apr 11 16:11:11 2017 +0200 s390/qeth: move NAPI poll routine to core Identical code, we just need to call a layer-specific hook to process any received buffer. qeth_buffer_reclaim_work() is shuffled around to avoid a forward declaration for qeth_queue_input_buffer(). Signed-off-by: Julian Wiedmann Acked-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 5 +- drivers/s390/net/qeth_core_main.c | 105 +++++++++++++++++++++++++++++++++----- drivers/s390/net/qeth_l2_main.c | 78 +--------------------------- drivers/s390/net/qeth_l3_main.c | 78 +--------------------------- 4 files changed, 97 insertions(+), 169 deletions(-) commit 942d6984aa0cb3974b99d302b566eaf0b8eccf54 Author: Julian Wiedmann Date: Tue Apr 11 16:11:10 2017 +0200 s390/qeth: move common ioctl handling to core There's a number of layer-independent ioctls that we can handle in core, and reduce code duplication. For layer-specific ioctls, add a do_ioctl() discipline hook. Signed-off-by: Julian Wiedmann Acked-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 5 ++-- drivers/s390/net/qeth_core_main.c | 63 +++++++++++++++++++++++++++++++++++---- drivers/s390/net/qeth_l2_main.c | 54 ++------------------------------- drivers/s390/net/qeth_l3_main.c | 41 ++----------------------- 4 files changed, 64 insertions(+), 99 deletions(-) commit 40077e0cf62206ac3c315b6991d8dcddb3703286 Author: Johannes Berg Date: Tue Apr 11 15:34:58 2017 +0200 bpf: remove struct bpf_map_type_list There's no need to have struct bpf_map_type_list since it just contains a list_head, the type, and the ops pointer. Since the types are densely packed and not actually dynamically registered, it's much easier and smaller to have an array of type->ops pointer. Also initialize this array statically to remove code needed to initialize it. In order to save duplicating the list, move it to the types header file added by the previous patch and include it in the same fashion. Signed-off-by: Johannes Berg Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf.h | 11 ++----- include/linux/bpf_types.h | 18 +++++++++++ kernel/bpf/arraymap.c | 78 ++++------------------------------------------- kernel/bpf/hashtab.c | 46 +++------------------------- kernel/bpf/lpm_trie.c | 14 +-------- kernel/bpf/stackmap.c | 14 +-------- kernel/bpf/syscall.c | 37 +++++++++++----------- 7 files changed, 53 insertions(+), 165 deletions(-) commit be9370a7d8614d1fa54649c75de14458e79b91ec Author: Johannes Berg Date: Tue Apr 11 15:34:57 2017 +0200 bpf: remove struct bpf_prog_type_list There's no need to have struct bpf_prog_type_list since it just contains a list_head, the type, and the ops pointer. Since the types are densely packed and not actually dynamically registered, it's much easier and smaller to have an array of type->ops pointer. Also initialize this array statically to remove code needed to initialize it. In order to save duplicating the list, move it to a new header file and include it in the places needing it. Signed-off-by: Johannes Berg Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf.h | 16 ++++------ include/linux/bpf_types.h | 18 ++++++++++++ kernel/bpf/syscall.c | 27 +++++++---------- kernel/trace/bpf_trace.c | 30 ++----------------- net/core/filter.c | 75 +++++------------------------------------------ 5 files changed, 44 insertions(+), 122 deletions(-) commit 98601e8bc62d41659eb6478d2f66fb35361597ac Merge: 526f1cf 99492ad Author: David S. Miller Date: Tue Apr 11 14:36:28 2017 -0400 Merge branch 'fec-driver-code-clean' Fugang Duan says: ==================== net: fec: driver code clean The patch series are for fec ethernet driver code clean up, each patch is independent. Patch #1,#4,#5 are code clean up. Patch #2,#3 are for aarch64 platform. Patch #6 is for i.MX6UL to add lost errata workaround. ==================== Signed-off-by: David S. Miller commit 99492ad488a8c88e8e62283ea9bea7bec691aeab Author: Fugang Duan Date: Tue Apr 11 19:13:08 2017 +0800 net: fec: add ERR007885 for i.MX6ul enet IP The errata ERR007885 HW fix don't add to i.MX6ul ENET IP version, so add sw workaroud for the chip. Signed-off-by: Fugang Duan Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c10bc0e7b732a05fae40dff075be6a4cc560bfd5 Author: Fugang Duan Date: Tue Apr 11 19:13:07 2017 +0800 net: fec: correct the errata number comment typo Correct the errata number ERR006358 comment typo. Signed-off-by: Fugang Duan Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9269e5560b261eb9ee157497890dc0948db76cf8 Author: Fugang Duan Date: Tue Apr 11 19:13:06 2017 +0800 net: fec: add phy-reset-gpios PROBE_DEFER check Many boards use i2c/spi expander gpio as phy-reset-gpios and these gpios maybe registered after fec port, driver should check the return value of .of_get_named_gpio(). Signed-off-by: Fugang Duan Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 949201286fa4a481d8302f8b886ca565039bafcd Author: Fugang Duan Date: Tue Apr 11 19:13:05 2017 +0800 net: fec: pass ->dev to dma_alloc__coherent() API In aarch64 system, it requires to trasfer ->dev to dma_alloc_coherent() API, otherwise allocate failed and print kernel warning. Signed-off-by: Fugang Duan Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 145d6e295f12681ed564d32fff3dabf9292f6871 Author: Fugang Duan Date: Tue Apr 11 19:13:04 2017 +0800 net: fec: avoid BD pointer type cast to 32bit In aarch64 system, the BD pointer is 64bit, and the high-order 32-bits of the address is effective, so replace usigned with (void *) type to aovid 64bit address is casted to 32bit in .fec_enet_get_nextdesc() and .fec_enet_get_prevdesc() functions. Signed-off-by: Fugang Duan Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 61e04ccbcbc4b1ba974af371e6f63906fb1d78fb Author: Fugang Duan Date: Tue Apr 11 19:13:03 2017 +0800 net: fec: add return value check after calling .of_property_read_u32() Add return value check after calling .of_property_read_u32() to avoid the warning reported by coverity. Signed-off-by: Fugang Duan Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6f2daf82fa1e92fcc10ec34a1d0ffe85a00bf794 Author: Fabio Estevam Date: Tue Apr 11 10:42:02 2017 -0300 ASoC: tas2552: Return the real error code In the case of error in tas2552_codec_probe() we should better propagate the real error code instead of always returning '-EIO'. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/codecs/tas2552.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86666c083a4eacb798754f2485bbecfedc9fc7d7 Author: John Stultz Date: Mon Apr 10 12:35:11 2017 -0700 ASoC: Improve hi6210-i2s DT bindings This patch improves the previously submitted hi6210-i2s DT binding, adding extra details to how the multi-dai index value maps to the potential interfaces. (Currently just index 0 -> the S2 interface, as there is only one supported, but in the future other interfaces may be enabled.) Signed-off-by: John Stultz Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/hisilicon,hi6210-i2s.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6ab11f3a35aa07be2ff167b9de37e6c1eb58396b Author: David Carrillo-Cisneros Date: Mon Apr 10 13:14:29 2017 -0700 perf annotate: Process attr and build_id records perf annotate did not get some love for pipe-mode, and did not have .attr and .buil_id setup (while record and inject did. Fix that. It can easily be reproduced by: perf record -o - noploop | perf annotate that in my system shows: 0xd8 [0x28]: failed to process type: 9 Committer Testing: Before: $ perf record -o - stress -t 2 -c 2 | perf annotate --stdio stress: info: [11060] dispatching hogs: 2 cpu, 0 io, 0 vm, 0 hdd 0x4470 [0x28]: failed to process type: 9 $ stress: info: [11060] successful run completed in 2s $ After: $ perf record -o - stress -t 2 -c 2 | perf annotate --stdio stress: info: [11871] dispatching hogs: 2 cpu, 0 io, 0 vm, 0 hdd stress: info: [11871] successful run completed in 2s [ perf record: Woken up 2 times to write data ] [ perf record: Captured and wrote 0.000 MB - ] no symbols found in /usr/bin/stress, maybe install a debug package? Percent | Source code & Disassembly of libc-2.24.so for cycles:uhH (6117 samples) --------------------------------------------------------------------------------------- : : Disassembly of section .text: : : 000000000003b050 : : __random_r(): 10.56 : 3b050: test %rdi,%rdi 0.00 : 3b053: je 3b0d0 0.34 : 3b055: test %rsi,%rsi 0.00 : 3b058: je 3b0d0 0.46 : 3b05a: mov 0x18(%rdi),%eax 12.44 : 3b05d: mov 0x10(%rdi),%r8 0.18 : 3b061: test %eax,%eax 0.00 : 3b063: je 3b0b0 Signed-off-by: David Carrillo-Cisneros Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: He Kuang Cc: Masami Hiramatsu Cc: Paul Turner Cc: Peter Zijlstra Cc: Simon Que Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/20170410201432.24807-5-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-annotate.c | 2 ++ 1 file changed, 2 insertions(+) commit 6d13491e2d4944180c9b4fb6ddca4e34b1537836 Author: David Carrillo-Cisneros Date: Mon Apr 10 13:14:28 2017 -0700 perf tools: Describe pipe mode in perf.data-file-fomat.txt Add a minimal description of pipe's data format. Signed-off-by: David Carrillo-Cisneros Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: He Kuang Cc: Masami Hiramatsu Cc: Paul Turner Cc: Peter Zijlstra Cc: Simon Que Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/20170410201432.24807-4-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf.data-file-format.txt | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 1e0d4f0200e4dbdfc38d818f329d8a0955f7c6f5 Author: David Carrillo-Cisneros Date: Mon Apr 10 13:14:27 2017 -0700 perf inject: Copy events when reordering events in pipe mode __perf_session__process_pipe_events reuses the same memory buffer to process all events in the pipe. When reordering is needed (e.g. -b option), events are not immediately flushed, but kept around until reordering is possible, causing memory corruption. The problem is usually observed by a "Unknown sample error" output. It can easily be reproduced by: perf record -o - noploop | perf inject -b > output Committer testing: Before: $ perf record -o - stress -t 2 -c 2 | perf inject -b > /dev/null stress: info: [8297] dispatching hogs: 2 cpu, 0 io, 0 vm, 0 hdd stress: info: [8297] successful run completed in 2s [ perf record: Woken up 3 times to write data ] [ perf record: Captured and wrote 0.000 MB - ] Warning: Found 1 unknown events! Is this an older tool processing a perf.data file generated by a more recent tool? If that is not the case, consider reporting to linux-kernel@vger.kernel.org. $ After: $ perf record -o - stress -t 2 -c 2 | perf inject -b > /dev/null stress: info: [9027] dispatching hogs: 2 cpu, 0 io, 0 vm, 0 hdd stress: info: [9027] successful run completed in 2s [ perf record: Woken up 3 times to write data ] [ perf record: Captured and wrote 0.000 MB - ] no symbols found in /usr/bin/stress, maybe install a debug package? no symbols found in /usr/bin/stress, maybe install a debug package? $ Signed-off-by: David Carrillo-Cisneros Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: He Kuang Cc: Masami Hiramatsu Cc: Paul Turner Cc: Peter Zijlstra Cc: Simon Que Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/20170410201432.24807-3-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/ordered-events.c | 3 ++- tools/perf/util/session.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit bb8d521f77f3e68a713456b7fb1e99f52ff3342c Author: David Carrillo-Cisneros Date: Mon Apr 10 13:14:26 2017 -0700 perf inject: Don't proceed if perf_session__process_event() fails All paths following perf_session__process_event() in __cmd_inject() are useless if __cmd_inject() is to fail, some depend on a correct session->evlist. First commit to add code that depends on session->evlist without checking error was commmit e558a5bd8b ("perf inject: Work with files"). It has grown since then. Change __cmd_inject() to fail immediately after perf_session__process_event() fails. Signed-off-by: David Carrillo-Cisneros Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Andrew Vagin Cc: He Kuang Cc: Masami Hiramatsu Cc: Paul Turner Cc: Peter Zijlstra Cc: Simon Que Cc: Stephane Eranian Cc: Wang Nan Fixes: e558a5bd8b74 ("perf inject: Work with files") Link: http://lkml.kernel.org/r/20170410201432.24807-2-davidcc@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-inject.c | 2 ++ 1 file changed, 2 insertions(+) commit d9f8dfa9baf9b6ae1f2f84f887176558ecde5268 Author: Christian Borntraeger Date: Thu Apr 6 09:51:52 2017 +0200 perf annotate s390: Implement jump types for perf annotate Implement simple detection for all kind of jumps and branches. Signed-off-by: Christian Borntraeger Cc: Andreas Krebbel Cc: Hendrik Brueckner Cc: Martin Schwidefsky Cc: Peter Zijlstra Cc: linux-s390 Cc: stable@kernel.org # v4.10+ Link: http://lkml.kernel.org/r/1491465112-45819-3-git-send-email-borntraeger@de.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/s390/annotate/instructions.c | 30 ++++++++++++++++++++++++++++ tools/perf/util/annotate.c | 2 ++ 2 files changed, 32 insertions(+) commit e77852b32d6d4430c68c38aaf73efe5650fa25af Author: Christian Borntraeger Date: Thu Apr 6 09:51:51 2017 +0200 perf annotate s390: Fix perf annotate error -95 (4.10 regression) since 4.10 perf annotate exits on s390 with an "unknown error -95". Turns out that commit 786c1b51844d ("perf annotate: Start supporting cross arch annotation") added a hard requirement for architecture support when objdump is used but only provided x86 and arm support. Meanwhile power was added so lets add s390 as well. While at it make sure to implement the branch and jump types. Signed-off-by: Christian Borntraeger Cc: Andreas Krebbel Cc: Hendrik Brueckner Cc: Martin Schwidefsky Cc: Peter Zijlstra Cc: linux-s390 Cc: stable@kernel.org # v4.10+ Fixes: 786c1b51844 "perf annotate: Start supporting cross arch annotation" Link: http://lkml.kernel.org/r/1491465112-45819-2-git-send-email-borntraeger@de.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ecbe5e10d4ad12dd3da5d9fccd153c529c8c8ce1 Author: Arnaldo Carvalho de Melo Date: Fri Apr 7 12:19:38 2017 -0300 perf string: Simplify ltrim() implementation We don't need to use strlen(), a var, or check for the end explicitely, isspace('\0') is false: [acme@jouet c]$ cat ltrim.c #include #include static char *ltrim(char *s) { while (isspace(*s)) ++s; return s; } int main(void) { printf("ltrim(\"\")='%s'\n", ltrim("")); return 0; } [acme@jouet c]$ ./ltrim ltrim("")='' [acme@jouet c]$ Cc: Jiri Olsa Cc: Namhyung Kim Cc: Taeung Song Link: http://lkml.kernel.org/n/tip-w3nk0x3pai2vojk2ab6kdvaw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/string.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit bdd97ca63faa374c98314d53c0bcaedb473c5a33 Author: Taeung Song Date: Fri Apr 7 23:24:21 2017 +0900 perf tools: Refactor the code to strip command name with {l,r}trim() After reading command name from /proc//status, use ltrim() and rtrim() to strip command name, not using just while loop, isspace() and etc. Signed-off-by: Taeung Song Acked-by: David Ahern Cc: Don Zickus Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1491575061-704-6-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 526f1cfb1fc1521f2650accc080d16a7d802679d Merge: 93411c2 55a3ce3 Author: David S. Miller Date: Tue Apr 11 13:48:10 2017 -0400 Merge branch 'l2tp-drop-l2tp_session_find' Guillaume Nault says: ==================== l2tp: drop l2tp_session_find() l2tp_netlink is the last user of l2tp_session_find(), but that call is useless. Let's remove it and drop l2tp_session_find() definitely. ==================== Signed-off-by: David S. Miller commit 55a3ce3b9d98f752df9e2cfb1cba7e715522428a Author: Guillaume Nault Date: Tue Apr 11 13:12:21 2017 +0200 l2tp: remove l2tp_session_find() This function isn't used anymore. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 51 +-------------------------------------------------- net/l2tp/l2tp_core.h | 3 --- 2 files changed, 1 insertion(+), 53 deletions(-) commit af87ae465abdc070de0dc35d6c6a9e7a8cd82987 Author: Guillaume Nault Date: Tue Apr 11 13:12:13 2017 +0200 l2tp: remove useless duplicate session detection in l2tp_netlink There's no point in checking for duplicate sessions at the beginning of l2tp_nl_cmd_session_create(); the ->session_create() callbacks already return -EEXIST when the session already exists. Furthermore, even if l2tp_session_find() returns NULL, a new session might be created right after the test. So relying on ->session_create() to avoid duplicate session is the only sane behaviour. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_netlink.c | 5 ----- 1 file changed, 5 deletions(-) commit f00d7c85be9e39752ef87047a019dfc4cefbd299 Author: NeilBrown Date: Wed Apr 5 14:05:51 2017 +1000 md/raid0: fix up bio splitting. raid0_make_request() should use a private bio_set rather than the shared fs_bio_set, which is only meant for filesystems to use. raid0_make_request() shouldn't loop around using the bio_set multiple times as that can deadlock. So use mddev->bio_set and pass the tail to generic_make_request() instead of looping on it. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid0.c | 73 +++++++++++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 36 deletions(-) commit 868f604b1de2ddbdcf194d7792a0d91d7da719c1 Author: NeilBrown Date: Wed Apr 5 14:05:51 2017 +1000 md/linear: improve bio splitting. linear_make_request() uses fs_bio_set, which is meant for filesystems to use, and loops, possible allocating from the same bio set multiple times. These behaviors can theoretically cause deadlocks, though as linear requests are hardly ever split, it is unlikely in practice. Change to use mddev->bio_set - otherwise unused for linear, and submit the tail of a split request to generic_make_request() for it to handle. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/linear.c | 73 +++++++++++++++++++++++++---------------------------- 1 file changed, 34 insertions(+), 39 deletions(-) commit dd7a8f5dee81ffb1794df1103f07c63fd4f1d766 Author: NeilBrown Date: Wed Apr 5 14:05:51 2017 +1000 md/raid5: make chunk_aligned_read() split bios more cleanly. chunk_aligned_read() currently uses fs_bio_set - which is meant for filesystems to use - and loops if multiple splits are needed, which is not best practice. As this is only used for READ requests, not writes, it is unlikely to cause a problem. However it is best to be consistent in how we split bios, and to follow the pattern used in raid1/raid10. So create a private bioset, bio_split, and use it to perform a single split, submitting the remainder to generic_make_request() for later processing. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid5.c | 33 +++++++++++++++++---------------- drivers/md/raid5.h | 1 + 2 files changed, 18 insertions(+), 16 deletions(-) commit 545250f2480911f053b092d4229d9f83a9dff222 Author: NeilBrown Date: Wed Apr 5 14:05:51 2017 +1000 md/raid10: simplify handle_read_error() handle_read_error() duplicates a lot of the work that raid10_read_request() does, so it makes sense to just use that function. handle_read_error() relies on the same r10bio being re-used so that, in the case of a read-only array, setting IO_BLOCKED in r1bio->devs[].bio ensures read_balance() won't re-use that device. So when called from raid10_make_request() we clear that array, but not when called from handle_read_error(). Two parts of handle_read_error() that need to be preserved are the warning message it prints, so they are conditionally added to raid10_read_request(). If the failing rdev can be found, messages are printed. Otherwise they aren't. Not that as rdev_dec_pending() has already been called on the failing rdev, we need to use rcu_read_lock() to get a new reference from the conf. We only use this to get the name of the failing block device. With this change, we no longer need inc_pending(). Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid10.c | 122 ++++++++++++++++++++-------------------------------- 1 file changed, 47 insertions(+), 75 deletions(-) commit fc9977dd069e4f82fcacb262652117c488647319 Author: NeilBrown Date: Wed Apr 5 14:05:51 2017 +1000 md/raid10: simplify the splitting of requests. raid10 splits requests in two different ways for two different reasons. First, bio_split() is used to ensure the bio fits with a chunk. Second, multiple r10bio structures are allocated to represent the different sections that need to go to different devices, to avoid known bad blocks. This can be simplified to just use bio_split() once, and not to use multiple r10bios. We delay the split until we know a maximum bio size that can be handled with a single r10bio, and then split the bio and queue the remainder for later handling. As with raid1, we allocate a new bio_set to help with the splitting. It is not correct to use fs_bio_set in a device driver. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid10.c | 164 ++++++++++++++++------------------------------------ drivers/md/raid10.h | 1 + 2 files changed, 51 insertions(+), 114 deletions(-) commit 673ca68d93879b9ffbbed874c9e70ca6e37cab15 Author: NeilBrown Date: Wed Apr 5 14:05:51 2017 +1000 md/raid1: factor out flush_bio_list() flush_pending_writes() and raid1_unplug() each contain identical copies of a fairly large slab of code. So factor that out into new flush_bio_list() to simplify maintenance. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid1.c | 66 +++++++++++++++++++++--------------------------------- 1 file changed, 26 insertions(+), 40 deletions(-) commit 689389a06ce79fdced85b5115717f71c71e623e0 Author: NeilBrown Date: Wed Apr 5 14:05:50 2017 +1000 md/raid1: simplify handle_read_error(). handle_read_error() duplicates a lot of the work that raid1_read_request() does, so it makes sense to just use that function. This doesn't quite work as handle_read_error() relies on the same r1bio being re-used so that, in the case of a read-only array, setting IO_BLOCKED in r1bio->bios[] ensures read_balance() won't re-use that device. So we need to allow a r1bio to be passed to raid1_read_request(), and to have that function mostly initialise the r1bio, but leave the bios[] array untouched. Two parts of handle_read_error() that need to be preserved are the warning message it prints, so they are conditionally added to raid1_read_request(). Note that this highlights a minor bug on alloc_r1bio(). It doesn't initalise the bios[] array, so it is possible that old content is there, which might cause read_balance() to ignore some devices with no good reason. With this change, we no longer need inc_pending(), or the sectors_handled arg to alloc_r1bio(). As handle_read_error() is called from raid1d() and allocates memory, there is tiny chance of a deadlock. All element of various pools could be queued waiting for raid1 to handle them, and there may be no extra memory free. Achieving guaranteed forward progress would probably require a second thread and another mempool. Instead of that complexity, add __GFP_HIGH to any allocations when read1_read_request() is called from raid1d. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid1.c | 140 +++++++++++++++++++++++------------------------------ 1 file changed, 60 insertions(+), 80 deletions(-) commit 50512625da06c41517cb596f51b923ce15f401a4 Author: NeilBrown Date: Wed Apr 5 14:05:50 2017 +1000 Revert "block: introduce bio_copy_data_partial" This reverts commit 6f8802852f7e58a12177a86179803b9efaad98e2. bio_copy_data_partial() is no longer needed. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li block/bio.c | 60 ++++++++++++----------------------------------------- include/linux/bio.h | 2 -- 2 files changed, 13 insertions(+), 49 deletions(-) commit cb83efcfd26a28b76eef8815a41158c1896fc5ba Author: NeilBrown Date: Wed Apr 5 14:05:50 2017 +1000 md/raid1: simplify alloc_behind_master_bio() Now that we always always pass an offset of 0 and a size that matches the bio to alloc_behind_master_bio(), we can remove the offset/size args and simplify the code. We could probably remove bio_copy_data_partial() too. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid1.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit c230e7e53526c223a3e1caf40747d6e37c0e4394 Author: NeilBrown Date: Wed Apr 5 14:05:50 2017 +1000 md/raid1: simplify the splitting of requests. raid1 currently splits requests in two different ways for two different reasons. First, bio_split() is used to ensure the bio fits within a resync accounting region. Second, multiple r1bios are allocated for each bio to handle the possiblity of known bad blocks on some devices. This can be simplified to just use bio_split() once, and not use multiple r1bios. We delay the split until we know a maximum bio size that can be handled with a single r1bio, and then split the bio and queue the remainder for later handling. This avoids all loops inside raid1.c request handling. Just a single read, or a single set of writes, is submitted to lower-level devices for each bio that comes from generic_make_request(). When the bio needs to be split, generic_make_request() will do the necessary looping and call md_make_request() multiple times. raid1_make_request() no longer queues request for raid1 to handle, so we can remove that branch from the 'if'. This patch also creates a new private bio_set (conf->bio_split) for splitting bios. Using fs_bio_set is wrong, as it is meant to be used by filesystems, not block devices. Using it inside md can lead to deadlocks under high memory pressure. Delete unused variable in raid1_write_request() (Shaohua) Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid1.c | 141 +++++++++++++++++++---------------------------------- drivers/md/raid1.h | 2 + 2 files changed, 52 insertions(+), 91 deletions(-) commit 97c415a6f6c34b8c3a71b0e6058c89c49bb8285f Author: Bard Liao Date: Tue Apr 11 20:07:47 2017 +0800 ASoC: rt5665: move rt5665_set_jack_detect to .set_jack Now, we can use .set_jack callback function on codec level. So we don't need export rt5665_set_jack_detect. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5665.c | 6 +++--- sound/soc/codecs/rt5665.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) commit b8d4f7a30bab878d8909bb6ee73e8ac47a1646bf Merge: 17febfa d734401 Author: Mark Brown Date: Tue Apr 11 16:58:30 2017 +0100 Merge branch 'topic/jack' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5665 commit 70d1a4e66854ae8aa26d9474ae282b46d7087770 Author: SeongJae Park Date: Wed Mar 15 22:19:26 2017 +0900 selftests/vm: Set mmap()'s fd as -1 for MAP_ANONYMOUS flag Man page of mmap() says that portable applications should ensure fd argument to be -1 if MAP_ANONYMOUS flag is set as below: ``` The mapping is not backed by any file; its contents are initialized to zero. The fd and offset arguments are ignored; however, some implementations require fd to be -1 if MAP_ANONYMOUS (or MAP_ANON) is specified, and portable applications should ensure this. ``` However, few mmap() calls under selftests/vm/ uses 0 as fd though they use MAP_ANONYMOUS flag. This commit changes the argument to be -1 as recommended. Signed-off-by: SeongJae Park Acked-by: Andrew Morton Signed-off-by: Shuah Khan tools/testing/selftests/vm/map_hugetlb.c | 2 +- tools/testing/selftests/vm/mlock2-tests.c | 12 ++++++------ tools/testing/selftests/vm/on-fault-limit.c | 2 +- tools/testing/selftests/vm/thuge-gen.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) commit bfedc31c4f2c1af3b509bbdc0aae051e8ad7d3ae Author: Darren Hart Date: Fri Mar 24 09:18:54 2017 -0700 selftests/futex: Fix build error with OUTPUT variable The use of $$OUTPUT in the target shell commands resulted in an empty string followed by an absolute path for which mkdir failed: $ make -C tools/testing/selftests/futex make: Entering directory '/home/dvhart/source/linux/linux-pdx86/tools/testing/selftests/futex' Makefile:36: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean' for DIR in functional; do \ BUILD_TARGET=$OUTPUT/$DIR; \ mkdir $BUILD_TARGET -p; \ make OUTPUT=$BUILD_TARGET -C $DIR all;\ done mkdir: cannot create directory ‘/functional’: Permission denied Replace $$OUTPUT with $(OUTPUT) when referring to the Makefile OUTPUT variable. The above make command now completes successfully. Fixes: a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT") Signed-off-by: Darren Hart (VMware) Cc: linux-kselftest@vger.kernel.org Cc: bamvor.zhangjian@huawei.com Cc: Shuah Khan Signed-off-by: Shuah Khan tools/testing/selftests/futex/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9e14ef602b9e19b5e3d4594494e45a00ed2bc6ca Author: Masami Hiramatsu Date: Thu Mar 23 22:33:32 2017 +0900 kselftest: ftrace: Fix to compare a zero-filled hex value Fix to compare a zero-filled hexadecimal value with a part of string of long hexadecimal value. In check_types(), the last part of testcase compares with the hex value formatted by "%x" with a part of a string of long hex value (trimmed by tail -c and head -c). However, if that part of long hex value contains zero (e.g. "05" of "a3082059"), printf generated value (e.g. "5") is diffrent string, and the test case failed. To fix this, pass "%02x" instead of "%x" to printf. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_type.tc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ba31340920f6fe6c97a29bccc2ba434395525bd Author: Fathi Boudra Date: Mon Mar 20 12:18:22 2017 +0200 selftests: vm: add CONFIG_SYSVIPC=y to the config fragment vm tests rely on shared memory settings. Enable system V IPC to run these tests. Signed-off-by: Fathi Boudra Tested-by: Naresh Kamboju Signed-off-by: Shuah Khan tools/testing/selftests/vm/config | 1 + 1 file changed, 1 insertion(+) commit f13b1731743b6dc132416a81e1d5206a89f67e21 Author: Fathi Boudra Date: Mon Mar 20 12:18:21 2017 +0200 selftests: ftrace: add CONFIG_KPROBES=y to the config fragment ftrace/kprobe tests require kprobes events. Enable kprobes to run these tests. Signed-off-by: Fathi Boudra Tested-by: Naresh Kamboju Signed-off-by: Shuah Khan tools/testing/selftests/ftrace/config | 1 + 1 file changed, 1 insertion(+) commit 36adc0000d169b6d8615730ec6ec68b029cf5e01 Author: Fathi Boudra Date: Mon Mar 20 12:18:20 2017 +0200 selftests: lib: add config fragment for bitmap, printf and prime numbers tests test_bitmap, test_printf and prime_numbers are expected to be built as modules. Signed-off-by: Fathi Boudra Tested-by: Naresh Kamboju Signed-off-by: Shuah Khan tools/testing/selftests/lib/config | 3 +++ 1 file changed, 3 insertions(+) commit f00fa5f4163b40c3ec8590d9a7bd845c19bf8d16 Author: Mark Rutland Date: Tue Apr 11 09:39:57 2017 +0100 arm64: pmuv3: use arm_pmu ACPI framework Now that we have a framework to handle the ACPI bits, make the PMUv3 code use this. The framework is a little different to what was originally envisaged, and we can drop some unused support code in the process of moving over to it. Signed-off-by: Mark Rutland Tested-by: Jeremy Linton [will: make armv8_pmu_driver_init static] Signed-off-by: Will Deacon arch/arm64/kernel/perf_event.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) commit f1b36dcb5c316c276ca6faedc50d89d97f90d960 Author: Mark Rutland Date: Tue Apr 11 09:39:56 2017 +0100 arm64: pmuv3: handle !PMUv3 when probing When probing via ACPI, we won't know up-front whether a CPU has a PMUv3 compatible PMU. Thus we need to consult ID registers during probe time. This patch updates our PMUv3 probing code to test for the presence of PMUv3 functionality before touching an PMUv3-specific registers, and before updating the struct arm_pmu with PMUv3 data. When a PMUv3-compatible PMU is not present, probing will return -ENODEV. Signed-off-by: Mark Rutland Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/perf_event.c | 87 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 71 insertions(+), 16 deletions(-) commit 45736a72fb79b204c1fbdb08a1e1a2aa52c7281a Author: Mark Rutland Date: Tue Apr 11 09:39:55 2017 +0100 drivers/perf: arm_pmu: add ACPI framework This patch adds framework code to handle parsing PMU data out of the MADT, sanity checking this, and managing the association of CPUs (and their interrupts) with appropriate logical PMUs. For the time being, we expect that only one PMU driver (PMUv3) will make use of this, and we simply pass in a single probe function. This is based on an earlier patch from Jeremy Linton. Signed-off-by: Mark Rutland Tested-by: Jeremy Linton Cc: Will Deacon Signed-off-by: Will Deacon drivers/perf/Kconfig | 4 + drivers/perf/Makefile | 1 + drivers/perf/arm_pmu.c | 4 +- drivers/perf/arm_pmu_acpi.c | 256 +++++++++++++++++++++++++++++++++++++++++++ include/linux/cpuhotplug.h | 1 + include/linux/perf/arm_pmu.h | 11 ++ 6 files changed, 275 insertions(+), 2 deletions(-) commit e0013aed489e7ebbba59d7ada2ff5551ac4b61c6 Author: Mark Rutland Date: Tue Apr 11 09:39:54 2017 +0100 arm64: add function to get a cpu's MADT GICC table Currently the ACPI parking protocol code needs to parse each CPU's MADT GICC table to extract the mailbox address and so on. Each time we parse a GICC table, we call back to the parking protocol code to parse it. This has been fine so far, but we're about to have more code that needs to extract data from the GICC tables, and adding a callback for each user is going to get unwieldy. Instead, this patch ensures that we stash a copy of each CPU's GICC table at boot time, such that anything needing to parse it can later request it. This will allow for other parsers of GICC, and for simplification to the ACPI parking protocol code. Note that we must store a copy, rather than a pointer, since the core ACPI code temporarily maps/unmaps tables while iterating over them. Since we parse the MADT before we know how many CPUs we have (and hence before we setup the percpu areas), we must use an NR_CPUS sized array. Signed-off-by: Mark Rutland Reviewed-by: Lorenzo Pieralisi Tested-by: Jeremy Linton Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/include/asm/acpi.h | 2 ++ arch/arm64/kernel/smp.c | 10 ++++++++++ 2 files changed, 12 insertions(+) commit 18bfcfe51b8f60b69ab012888dea8061a9cd3381 Author: Mark Rutland Date: Tue Apr 11 09:39:53 2017 +0100 drivers/perf: arm_pmu: split out platform device probe logic Now that we've split the pdev and DT probing logic from the runtime management, let's move the former into its own file. We gain a few lines due to the copyright header and includes, but this should keep the logic clearly separated, and paves the way for adding ACPI support in a similar fashion. Signed-off-by: Mark Rutland Tested-by: Jeremy Linton [will: rename nr_irqs to avoid conflict with global variable] Signed-off-by: Will Deacon drivers/perf/Makefile | 2 +- drivers/perf/arm_pmu.c | 226 +------------------------------------- drivers/perf/arm_pmu_platform.c | 235 ++++++++++++++++++++++++++++++++++++++++ include/linux/perf/arm_pmu.h | 7 ++ 4 files changed, 247 insertions(+), 223 deletions(-) commit 3cf7ee98b8489fd2ff58374e3882a666f81d629f Author: Mark Rutland Date: Tue Apr 11 09:39:52 2017 +0100 drivers/perf: arm_pmu: move irq request/free into probe Currently we request (and potentially free) all IRQs for a given PMU in cpu_pmu_init(). This works for platform/DT probing today, but it doesn't fit ACPI well as we don't have all our affinity data up-front. In preparation for ACPI support, fold the IRQ request/free into arm_pmu_device_probe(), which will remain specific to platform/DT probing. Signed-off-by: Mark Rutland Tested-by: Jeremy Linton Cc: Will Deacon Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 0e2663d921ea1861540cd7f331d8e2c7668aa31f Author: Mark Rutland Date: Tue Apr 11 09:39:51 2017 +0100 drivers/perf: arm_pmu: split cpu-local irq request/free Currently we have functions to request/free all IRQs for a given PMU. While this works today, this won't work for ACPI, where we don't know the full set of IRQs up front, and need to request them separately. To enable supporting ACPI, this patch splits out the cpu-local request/free into new functions, allowing us to request/free individual IRQs. As this makes it possible/necessary to request a PPI once per cpu, an additional check is added to detect mismatched PPIs. This shouldn't matter for the DT / platform case, as we check this when parsing. Signed-off-by: Mark Rutland Tested-by: Jeremy Linton Cc: Will Deacon Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 88 +++++++++++++++++++++++++++++--------------------- 1 file changed, 52 insertions(+), 36 deletions(-) commit 3cf6111025cb3346be43856e4c5e9b795b447832 Author: Mark Rutland Date: Tue Apr 11 09:39:50 2017 +0100 drivers/perf: arm_pmu: rename irq request/free functions For historical reasons, portions of the arm_pmu code use a cpu_pmu_ prefix rather than an armpmu_ prefix. While a minor annoyance, this hasn't been a problem thusfar. However, to enable ACPI support, we'll need to expose a few things in header files, and we should aim to keep those consistently namespaced. In preparation for exporting our IRQ request/free functions, rename these to have an armpmu_ prefix. For consistency, the 'cpu_pmu' parameter is also renamed to 'armpmu'. Signed-off-by: Mark Rutland Tested-by: Jeremy Linton Cc: Will Deacon Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 7654137071fa706e5c91f4f27bc2a5cd7e435a9b Author: Mark Rutland Date: Tue Apr 11 09:39:49 2017 +0100 drivers/perf: arm_pmu: handle no platform_device In armpmu_dispatch_irq() we look at arm_pmu::plat_device to acquire platdata, so that we can defer to platform-specific IRQ handling, required on some 32-bit parts. With the advent of ACPI we won't always have a platform_device, and so we must avoid trying to dereference fields from it. This patch fixes up armpmu_dispatch_irq() to avoid doing so, introducing a new armpmu_get_platdata() helper. Signed-off-by: Mark Rutland Tested-by: Jeremy Linton Cc: Will Deacon Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 3a5a89d30ee3d5d8b55490e3c63bf533b196e1c8 Author: Mark Rutland Date: Tue Apr 11 09:39:48 2017 +0100 drivers/perf: arm_pmu: simplify cpu_pmu_request_irqs() The ARM PMU framework code always uses armpmu_dispatch_irq as its common IRQ handler. Passing this down from cpu_pmu_init() is somewhat pointless, and gets in the way of refactoring. This patch makes cpu_pmu_request_irqs() always use armpmu_dispatch_irq as the handler when requesting IRQs, and removes the handler parameter from its prototype. Signed-off-by: Mark Rutland Tested-by: Jeremy Linton Cc: Will Deacon Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 74a2b3ea2d8c6c1f73103a0fcb50b5c214c0d864 Author: Mark Rutland Date: Tue Apr 11 09:39:47 2017 +0100 drivers/perf: arm_pmu: factor out pmu registration Currently arm_pmu_device_probe contains probing logic specific to the platform_device infrastructure, and some logic required to safely register the PMU with various systems. This patch factors out the logic relating to the registration of the PMU. This makes arm_pmu_device_probe a little easier to read, and will make it easier to reuse the logic for an ACPI-specific probing mechanism. Signed-off-by: Mark Rutland Tested-by: Jeremy Linton Cc: Will Deacon Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) commit 70cd908a18f618577c449ad47988f4d442c9bc84 Author: Mark Rutland Date: Tue Apr 11 09:39:46 2017 +0100 drivers/perf: arm_pmu: fold init into alloc Given we always want to initialise common fields on an allocated PMU, this patch folds this common initialisation into armpmu_alloc(). This will make it simpler to reuse this code for an ACPI-specific probe path. Signed-off-by: Mark Rutland Tested-by: Jeremy Linton Cc: Will Deacon Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 52 +++++++++++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 28 deletions(-) commit 083c52144a19c69b7956aa53c913ba621f7c5ae2 Author: Mark Rutland Date: Tue Apr 11 09:39:45 2017 +0100 drivers/perf: arm_pmu: define armpmu_init_fn We expect an ARM PMU's init function to have a particular prototype, which we open-code in a few places. This is less than ideal, considering that we cast a void value to this type in one location, and a mismatch could easily be missed. Add a typedef so that we can ensure this is consistent. Signed-off-by: Mark Rutland Tested-by: Jeremy Linton Cc: Will Deacon Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 2 +- include/linux/perf/arm_pmu.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) commit a9e469d1c89b5e9890859b5f001601498549577d Author: Mark Rutland Date: Tue Apr 11 09:39:44 2017 +0100 drivers/perf: arm_pmu: remove pointless PMU disabling We currently disable the PMU temporarily in armpmu_add(). We may have required this historically, but the perf core always disables an event's PMU when calling event::pmu::add(), so this is not necessary. We don't do similarly in armpmu_del(), or elsewhere, so this is unnecessary and inconsistent, and only serves to confuse the reader. Remove the pointless disable, simplifying armpmu_add() in the process. Signed-off-by: Mark Rutland Tested-by: Jeremy Linton Cc: Will Deacon Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 93411c27d6504933d2d81399a32bb52e24b06839 Merge: c6606a8 3680b1f Author: David S. Miller Date: Tue Apr 11 11:16:04 2017 -0400 Merge branch 'net-remove-pci_enable_msix' Christoph Hellwig says: ==================== remove pci_enable_msix() V3 this series removes the remaining callers of the pci_enable_msix() function and then the function itself. The final removal has been Acked by Bjorn. Changes since V2: - add another patch on Dave's request - add various acks - spelling fixes in the commit logs Changes since V1: - replace the two previous thunderx patches with a new one from Thanneeru ==================== Signed-off-by: David S. Miller commit 3680b1f655993e1be5a2063d00eae92532abc322 Author: Christoph Hellwig Date: Tue Apr 11 13:01:25 2017 +0200 mlxsw: convert to pci_alloc_irq_vectors Trivial conversion as only one vector is supported, but at least we lose the useless msix_entry member in the per-device structure. Signed-off-by: Christoph Hellwig Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/pci.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 4244de1c64ded7f5438717bdce3fa074efd20efb Author: Christoph Hellwig Date: Tue Apr 11 13:01:24 2017 +0200 PCI: remove pci_enable_msix Unused now that all callers switched to pci_alloc_irq_vectors. Signed-off-by: Christoph Hellwig Acked-by: Bjorn Helgaas Signed-off-by: David S. Miller drivers/pci/msi.c | 21 --------------------- include/linux/pci.h | 4 ---- 2 files changed, 25 deletions(-) commit ce211b172b1e3f3de30947d6604c57f3d6681406 Author: Thanneeru Srinivasulu Date: Tue Apr 11 13:01:23 2017 +0200 net: thunderx: Switch to pci_alloc_irq_vectors Remove deprecated pci_enable_msix API in favour of its successor pci_alloc_irq_vectors. Signed-off-by: Thanneeru Srinivasulu Signed-off-by: Sunil Goutham Reviewed-by: Christoph Hellwig Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic.h | 2 - drivers/net/ethernet/cavium/thunder/nic_main.c | 64 ++++++---------------- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 70 ++++++++---------------- 3 files changed, 40 insertions(+), 96 deletions(-) commit da6f4cf58e403628de026f06b608005beb8995ba Author: Christoph Hellwig Date: Tue Apr 11 13:01:22 2017 +0200 net/ena: switch to pci_alloc_irq_vectors Remove the deprecated pci_enable_msix API in favour of its successor. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 55 ++++++---------------------- drivers/net/ethernet/amazon/ena/ena_netdev.h | 2 - 2 files changed, 12 insertions(+), 45 deletions(-) commit f3297f686db084465347c83edfcd1527994e7a9f Author: Christoph Hellwig Date: Tue Apr 11 13:01:21 2017 +0200 net: alx: switch to pci_alloc_irq_vectors Remove the deprecated pci_enable_msix API in favour of its successor, and make sure to handle errors during IRQ setup properly. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller drivers/net/ethernet/atheros/alx/alx.h | 6 -- drivers/net/ethernet/atheros/alx/main.c | 128 ++++++++++++++------------------ 2 files changed, 54 insertions(+), 80 deletions(-) commit ba7756d08212f71a009a4ac7439b8e661e469f7d Merge: a6308d7 48eab1f Author: Greg Kroah-Hartman Date: Tue Apr 11 16:47:26 2017 +0200 Merge tag 'usb-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: changes for v4.12 With 51 non-merge commits, this is one of the smallest USB Gadget pull requests. Apart from your expected set of non-critical fixes, and other miscellaneous items, we have most of the changes in dwc3 (52.5%) with all other UDCs following with 34.8%. As for the actual changes, the most important of them are all the recent changes to reduce memory footprint of dwc3, bare minimum dual-role support on dwc3 and reworked endpoint count and initialization routines. commit 398dbc776a8f7dfdee7c38ad003e66abd31b3b0a Author: Alexandre Bailon Date: Wed Apr 5 19:17:50 2017 +0200 ARM: davinci: Add clock for CPPI 4.1 DMA engine The CPPI 4.1 DMA in USB subsystem shares its clock with the USB OTG, and most of the time, the clock will be enabled by USB. But during the init of the DMA, USB is not enabled (waiting for DMA), and then we must enable the DMA clock before doing anything. Add clock for the CPPI 4.1 DMA engine. Signed-off-by: Alexandre Bailon [nsekhar@ti.com: minor commit message tweaks] Signed-off-by: Sekhar Nori arch/arm/mach-davinci/da830.c | 6 ++++++ arch/arm/mach-davinci/da850.c | 6 ++++++ 2 files changed, 12 insertions(+) commit 6d99971842f6b0779738d8c168d9ed92ef1ff5fc Author: Sebastian Reichel Date: Tue Mar 21 23:50:42 2017 +0100 input: cpcap-pwrbutton: New driver Motorola CPCAP is a PMIC found in multiple smartphones. This driver adds support for the power/on button and has been tested in Droid 4. Acked-by: Rob Herring Acked-by: Dmitry Torokhov Tested-by: Tony Lindgren Signed-off-by: Sebastian Reichel Signed-off-by: Lee Jones .../devicetree/bindings/input/cpcap-pwrbutton.txt | 20 ++++ drivers/input/misc/Kconfig | 10 ++ drivers/input/misc/Makefile | 1 + drivers/input/misc/cpcap-pwrbutton.c | 117 +++++++++++++++++++++ 4 files changed, 148 insertions(+) commit ab781ec0e5e781849bd14291608c8626bac871e1 Author: Sebastian Reichel Date: Wed Mar 29 14:18:20 2017 +0200 mfd: cpcap: Implement IRQ sense helper CPCAP can sense if IRQ is currently set or not. This functionality is required for a few subdevices, such as the power button and usb phy modules. Signed-off-by: Sebastian Reichel Acked-by: Tony Lindgren Signed-off-by: Lee Jones drivers/mfd/motorola-cpcap.c | 28 ++++++++++++++++++++++++++++ include/linux/mfd/motorola-cpcap.h | 2 ++ 2 files changed, 30 insertions(+) commit d317d054b14df4cbce5324454925dc6c9858a8c4 Author: Tobin C. Harding Date: Mon Apr 10 13:16:01 2017 +1000 staging: ks7010: move check and break to top of loop Function uses an if statement within a for loop to guard a block of code. If 'if' statement conditional evaluates to false, loop breaks. The same logic can be expressed by inverting the conditional and breaking when new conditional evaluates to true. This allows the subsequent code to be indented one level less, aiding readability. Reduced indentation also allows for the code to be laid out more clearly and fixes two checkpatch warnings. Invert if statement conditional, break from for loop if new conditional evaluates to true. Reduce indentation in subsequent code, fix whitespace issues. Do not change program logic. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) commit eb8c4e546961cbdb7d448458c24dfae9d1622510 Author: Tobin C. Harding Date: Mon Apr 10 13:16:00 2017 +1000 staging: ks7010: remove multi-way decision Function uses multi-way decision for control flow. Final statement of function is spin_unlock(). Code can be simplified by adding a goto label labelling the call to spin_unlock() and jumping to label instead of using multi-way decision. This allows the code to be indented one level less which adds to the readability. Add goto label. Remove multi-way decision by jumping to label. Reduce indentation in subsequent code. Do not change program logic. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 48 ++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 23 deletions(-) commit 1e0aa795daf9b7adeb4fccb7394c12e39f31c020 Author: Tobin C. Harding Date: Mon Apr 10 13:15:59 2017 +1000 staging: ks7010: remove unused macro Macro CHECK_ALINE is defined and never used. Remove unused macro. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 2 -- 1 file changed, 2 deletions(-) commit 4906be2486996d09b4049782a0accbece3a37eed Author: Tobin C. Harding Date: Mon Apr 10 13:15:58 2017 +1000 staging: ks7010: fix checkpatch MULTILINE_DEREFERENCE Checkpatch emits WARNING: Avoid multiple line dereference. Fix up layout of function call, move dereference to single line. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 331454f43850894c102e4d24f44257abb32b6fca Author: Tobin C. Harding Date: Mon Apr 10 13:15:57 2017 +1000 staging: ks7010: fix checkpatch LOGICAL_CONTINUATIONS Checkpatch emits multiple CHECK: Logical continuations should be on the previous line. Move logical continuations to the end of the previous line. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 58 ++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 30 deletions(-) commit 78037ef122afa7468c5addbb10885b984b3eef05 Author: Tobin C. Harding Date: Mon Apr 10 13:15:56 2017 +1000 staging: ks7010: rename identifier packet to skb Kernel networking code predominately uses the identifier 'skb' for a struct sk_buff pointer. Of 8088 instances of 'struct sk_buff *' within net/ 6670 are named 'skb'. Following the principle of least surprise, new networking code should use the identifier 'skb' for variables of type 'struct sk_buff *'. Rename identifier 'packet' to 'skb'. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 42 +++++++++++++++++++------------------- drivers/staging/ks7010/ks_hostif.h | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) commit c6606a87dbb67ef79fc129c81e161f7791a1f047 Merge: 7988cee 6c786bc Author: David S. Miller Date: Tue Apr 11 10:10:30 2017 -0400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2017-04-11 1) Remove unused field from struct xfrm_mgr. 2) Code size optimizations for the xfrm prefix hash and address match. 3) Branch optimization for addr4_match. All patches from Alexey Dobriyan. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 3f19cd23f3a9420fe7bd98ad41d05e45fa6d4d47 Author: Jan Kara Date: Tue Apr 11 11:29:01 2017 +0200 block: Fix list corruption of blk stats callback list When CFQ calls wbt_disable_default(), it will call blk_stat_remove_callback() to stop gathering IO statistics for the purposes of writeback throttling. Later, when request_queue is unregistered, wbt_exit() will call blk_stat_remove_callback() again which will try to delete callback from the list again and possibly cause list corruption. Fix the problem by making wbt_disable_default() called wbt_exit() which is properly guarded against being called multiple times. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe block/blk-wbt.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit dd85d7120f1ed99b86185b3f1b8ab42ea4835fbd Author: Tobin C. Harding Date: Mon Apr 10 13:15:55 2017 +1000 staging: ks7010: add task to TODO file Driver uses custom Michael MIC implementation. There is already an implementation within the kernel. There is at least one other driver already using the kernel implementation (drivers/net/wireless/intersil/orinoco). Add task to TODO file. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/TODO | 2 ++ 1 file changed, 2 insertions(+) commit 37ab542e9a8a9005b92601ee9d0b882c7ee3c13e Author: Tobin C. Harding Date: Mon Apr 10 13:15:54 2017 +1000 staging: ks7010: rename RecvMIC to recv_mic Identifier uses camel case, standard kernel style does not use camel case. Rename buffer 'RecvMIC' to 'recv_mic'. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ba9328768b1e7d827ac86f94340af9bd084be8d5 Author: Tobin C. Harding Date: Mon Apr 10 13:15:53 2017 +1000 staging: ks7010: fix checkpatch UNNECESSARY_ELSE Checkpatch emits WARNING: else is not generally useful after a break or return. Two warnings of this type are emitted for this code block, in both cases 'else' statements are unnecessary. Remove unnecessary 'else' statements, reduce indentation in subsequent code. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 8f0ef774b8379adaa985506da3c7c185d938502b Author: Tobin C. Harding Date: Mon Apr 10 13:15:52 2017 +1000 staging: ks7010: fix checkpatch PARENTHESIS_ALIGNMENT Checkpatch emits CHECK: Alignment should match open parenthesis. Align argument to open parenthesis. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3da1b2371ec27accebe601e84a41f8b67f9b5688 Author: Tobin C. Harding Date: Mon Apr 10 13:15:51 2017 +1000 staging: ks7010: utilize local variable Function contains a local pointer variable defined to a memory location within a structure. This memory location is later used by dereferencing the struct instead of using the local pointer. The code is cleaner if all references of the same memory location use the local variable. Utilize existing local pointer variable instead of dereferencing struct. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b121d84882b97b8668be0b95e9ba50cfd01aa0f1 Author: Tobin C. Harding Date: Mon Apr 10 13:15:50 2017 +1000 staging: ks7010: simplify calls to memcpy() Function uses overly complex calls to memcpy(). Code may be simplified by the use of a local variable. Code sometimes uses explicit address of initial array element and sometimes does not. Uniformity aids readability. If array pointers are explicit it aids readability further. Simplify calls to memcpy(). Add local pointer variable, define it to the correct memory location. Use newly defined variable in calls to memcpy(). Be uniform in use of explicit address of first element of array (&foo[0]). Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) commit 9ff19a6e35ab460c07dc40c563b57b0ad866e2e9 Author: Tobin C. Harding Date: Mon Apr 10 13:15:49 2017 +1000 staging: ks7010: move null check before dereference Function parameter is cast to a local pointer which is then dereferenced before it is checked to be non-NULL. Move pointer null check to be before the pointer is dereferenced. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit dc59ef2af26de72289b5ac576298445c676f2c5b Author: Tobin C. Harding Date: Mon Apr 10 13:15:48 2017 +1000 staging: ks7010: fix multi-way decision Multi-way decision contains two anomalies. Firstly, a local variable is defined to be the inverse truth variable of a struct member. This local variable is used as the conditional to the multi-way decision. This is unnecessary, the same logic can be expressed using the struct member directly. Secondly, there are four branches in the multi-way decision, two of which can never be executed. This is dead code. Remove unnecessary local variable. Remove two branches of multi-way decision statement that can never be executed. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 2ab6fd596317c89b96f0cfd8811f12dd047bbd9e Author: Tobin C. Harding Date: Mon Apr 10 13:15:47 2017 +1000 staging: ks7010: factor out send stop request Function contains compound statement delineated by lone braces. This statement represents a discreet set of functionality and thus can be factored out into a separate function. Using a separate function instead of a compound statement increases readability, reduces code indentation, reduces function length, and generally looks more tidy. Factor compound statement out to separate function. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 52 ++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 20 deletions(-) commit f8641485ffb4ba573daa3f7d0532720634e5f44b Author: Tobin C. Harding Date: Mon Apr 10 13:15:46 2017 +1000 staging: ks7010: fix function return code path Function has duplicate code clean up sequences; identical function call followed by return. This would be better expressed with the use of a goto statement, as is typical in-tree. One call site places the clean up code within the 'else' branch of an multi-way decision. This can be more clearly expressed by inverting the initial decision conditional and jumping directly to the cleanup code. Subsequent code indentation can then be reduced, aiding readability. Fix function return code execution path. Move clean up code to end of function with a label. Replace duplicate clean up code within function with a jump to label. Invert conditional, jump to label if new conditional evaluates to true, reduce indentation in subsequent code. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) commit 482c03c7b5f6d323f333ae59bf1c55ef2e24b1f2 Author: Tobin C. Harding Date: Mon Apr 10 13:15:45 2017 +1000 staging: ks7010: separate dissimilar checks Function contains a list of four checks, for no apparent reason two of them are OR'ed together. Having two OR'ed together and the other two not implies some connection between the two that are combined. It is easier to read this code if the four unrelated checks are done as separate statements. Move dissimilar expressions out of logical continuation and into separate statement. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fa740a9e2e19708bc38993375da671c979082095 Author: Tobin C. Harding Date: Mon Apr 10 13:15:44 2017 +1000 staging: ks7010: change static function return type Function has return type 'int'. Function has internal linkage. Function returns 0 on all execution paths. Function is called only once in the driver and the return value is not checked. Removal of this return value does not change the program logic. The 'int' return type is not adding any information thus it is better to remove it. Change return type of function with internal linkage from 'int' to 'void'. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 62 ++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 31 deletions(-) commit 638a75b653c208ff86adeba8fa770685721343e9 Author: Tobin C. Harding Date: Mon Apr 10 13:15:43 2017 +1000 staging: ks7010: invert conditional, reduce indentation A number of functions have blocks of code guarded by an if statement. if (foo) { /* block of code */ } This can, on occasion, more succinctly be expressed as if (!foo) return /* block of code */ This change will mean a number of whitespace issues need to be addressed/fixed. The diff can be a little hard to read when there are multiple lines that are very similar (for example error return code). Splitting the indentation reduction and the whitespace fixes into two separate patches was not found to aid reading the diff. Therefor we fix the whitespace issues at the same time. We need to be very sure to not make any changes to the program logic, this is ensured by only doing what is stated - invert the conditional, fix whitespace. Invert if statement conditionals. Return if new conditional evaluates to true. Reduce level of indentation in subsequent code. Fix white space issues. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 144 +++++++++++++++++------------------ 1 file changed, 69 insertions(+), 75 deletions(-) commit f717248713c9672526005fefd85d6d5bc44d8603 Author: Tobin C. Harding Date: Mon Apr 10 13:15:42 2017 +1000 staging: ks7010: rename identifier retval to ret Function uses identifier 'retval' to hold the error return value. The rest of the driver uses 'ret' for this purpose. Being uniform in the choice of identifiers generally adds to the cleanliness of the code, also it is arguably easier to follow the code if one name is used for one task. Rename identifier 'retval' to 'ret'. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 62 ++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 34 deletions(-) commit 03b0244924795d30e1619894d8aa13c0fcfe233c Author: Tobin C. Harding Date: Mon Apr 10 13:15:41 2017 +1000 staging: ks7010: rename identifier rc to ret Driver uses identifier 'rc' to hold the value for error return code. The rest of the driver predominately uses 'ret' for this purpose. It is easier to follow the code if one name is used for one task. Rename identifier 'rc' to 'ret'. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 12 +++++------- drivers/staging/ks7010/ks_wlan_net.c | 11 +++++------ 2 files changed, 10 insertions(+), 13 deletions(-) commit 881f76b976e8e1ce8bb0498d0a85f3a43a6397dd Author: Tobin C. Harding Date: Mon Apr 10 13:15:40 2017 +1000 staging: ks7010: change length type to unsigned Length undergoes type conversion when passed (indirectly) as an argument for parameter of type 'unsigned int'. If length is negative this is a bug (the value after conversion is large). Declare 'length' to be an unsigned type instead of a signed type. Reported-by: Dan Carpenter Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5141e9c6346892d9705558ccf27489806c2bdddf Author: Tobin C. Harding Date: Mon Apr 10 13:15:39 2017 +1000 staging: ks7010: remove void * cast Functions accept a parameter of type 'void *', this is then cast to a struct ks_wlan_private pointer. All call sites have a struct ks_wlan_private pointer and cast it to 'void *'. We can remove the unnecessary casting by changing the parameter type to match the usage. Functions changed all have internal linkage. Replace parameter of type 'void *' with 'struct ks_wlan_private *'. Remove unnecessary casting to and from 'void *'. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit ed246b9ecc9212aa899721af74d97bbbcdc84add Author: Tobin C. Harding Date: Mon Apr 10 13:15:38 2017 +1000 staging: ks7010: remove unnecessary function parameter Function ks7010_upload_firmware() takes as parameters, two struct pointers, one of which is a member of the other. This is unnecessary since one can be accessed via the other. Remove function parameter and fix all call sites. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit b388285205609c8bef0be582e18b0fda378e3e03 Author: Colin Ian King Date: Tue Apr 11 14:17:08 2017 +0100 staging: rtl8723bs: fix spelling mistake: "acquire" trivial fix to spelling mistake in pr_info message Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 103ab687a97dcd827d6c4c61fb252de106989eb3 Author: Colin Ian King Date: Tue Apr 11 14:31:20 2017 +0100 staging: rtl8723bs: fix spelling mistakes in RT_TRACE messages Fix a few spelling mistakes in RT_TRACE messages and split up wide lines to span multiple lines Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 4 +++- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 4 +++- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) commit 5c42e7efbb5851ed218fc6eb90fa3e690751ca12 Author: Hans de Goede Date: Tue Apr 11 11:19:53 2017 +0200 staging: rtl8188eu: force driver to be built as a module The rtl8188eu driver defines a ton of global symbols which tend to conflict with other realtek wifi drivers, force it to be built as a module. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/Kconfig | 1 + 1 file changed, 1 insertion(+) commit d491afb8654e84f972ed00cb0e087ad2fae5a1ac Author: Al Viro Date: Tue Mar 21 12:10:12 2017 -0400 microblaze: switch to RAW_COPY_USER [kudos to Piotr Sroka for spotting a braino in the previous variant] Signed-off-by: Al Viro arch/microblaze/Kconfig | 1 + arch/microblaze/include/asm/uaccess.h | 36 ++++++++--------------------------- 2 files changed, 9 insertions(+), 28 deletions(-) commit 87d0e1af9db3bff4ec2f68fd4d032f89c23867a4 Author: Sara Sharon Date: Wed Jan 11 21:33:38 2017 +0200 iwlwifi: mvm: separate queue mapping from queue enablement As preparation for a000 different queue management, separate mapping of queues from actual enablement. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 34 ++++++++++++++++---------- 1 file changed, 21 insertions(+), 13 deletions(-) commit 30d23c3cd035e92c8cc0f9f648a5acce105a2d5b Author: Sara Sharon Date: Sun Oct 30 09:49:09 2016 +0200 iwlwifi: mvm: remove call for paging in new init flow Now that transport inits the paging in the context info - remove the call in mvm. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 8 -------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 ++- 2 files changed, 2 insertions(+), 9 deletions(-) commit eda50cde58de7368f982e3906090fc033ecb9360 Author: Sara Sharon Date: Wed Sep 28 17:16:53 2016 +0300 iwlwifi: pcie: add context information support Context information structure is going to be used in a000 devices for firmware self init. The self init includes firmware self loading from DRAM by ROM. This means the TFH relevant firmware loading can be cleaned up. The firmware loading includes the paging memory as well, so op mode can stop initializing the paging and sending the DRAM_BLOCK_CMD. Firmware is doing RFH, TFH and SCD configuration, while driver only fills the required configurations and addresses in the context information structure. The only remaining access to RFH is the write pointer, which is updated upon alive interrupt after FW configured the RFH. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/Makefile | 1 + .../net/wireless/intel/iwlwifi/iwl-context-info.h | 203 +++++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-fh.h | 4 + drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 1 + .../net/wireless/intel/iwlwifi/pcie/ctxt-info.c | 274 +++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 50 +++- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 45 +++- .../net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 226 +++++++++++++++++ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 60 ++--- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 78 ++++-- 10 files changed, 867 insertions(+), 75 deletions(-) commit 623e7766be907d9c20af334e25f98005c75b5d32 Author: Sara Sharon Date: Wed Sep 28 15:52:21 2016 +0300 iwlwifi: pcie: introduce split point to a000 devices a000 devices are going to have a lot of flows simplified and changed: init flow, RX, TX, and more. This, combined with the fact that code is already very complicated due to backward compatibility - introduce a split that will enable to introduce simplified version of functions. Shared ops are moved to a macro, while functions that will be updated in the next patches are defined twice for now. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 3 +- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 4 +- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 85 +++++++++++++++++-------- 3 files changed, 62 insertions(+), 30 deletions(-) commit 1ea423b0e047757dea80d5d968a25aa44af51273 Author: Luca Coelho Date: Tue Apr 11 14:46:35 2017 +0300 iwlwifi: remove unnecessary dev_cmd_headroom parameter We don't need this parameter anymore, since we always pass 0 anyway. Remove it from the structure and from all the relevant functions. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-trans.c | 7 ++----- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 17 +++++------------ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 +- 3 files changed, 8 insertions(+), 18 deletions(-) commit bdccdb854f2fb473f2ac4a6108df3cbfcedd5a87 Author: Golan Ben-Ami Date: Tue Nov 15 14:45:29 2016 +0200 iwlwifi: mvm: support MFUART dump in case of MFUART assert In case of a MFUART assert, get a notification from the fw that consists of the assert id and debug data. The notification may be divided to multiple chunks, depending on the size of the debug data sent to the driver, which would be up to 1KB. Get the notification, and if the debug info flag is enabled, print the debug data to the dmesg. Signed-off-by: Golan Ben-Ami Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 26 ++++++++++++++++++++++--- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 24 ++++++++++++++++++++++- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 9 +++++++++ 4 files changed, 57 insertions(+), 4 deletions(-) commit 7abf6fde970cc27dda7a8f02439fd0b8a0156459 Author: Johannes Berg Date: Mon Jan 9 11:31:39 2017 +0100 iwlwifi: pcie: use iwl_get_dma_hi_addr() Use iwl_get_dma_hi_addr() instead of open-coding it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 82ea79660c2744c6d273862a455ca634a6c4d2ee Author: Sara Sharon Date: Wed Dec 28 10:04:23 2016 +0200 iwlwifi: pcie: use WFPM_GP for debugging D3 flows This register is helpful for debugging D3 issues. Driver turns all bits on, and then on exit reads the updated value there. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 1 + drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) commit de74c455fd991024be76a535df4d66e96af3896e Author: Sara Sharon Date: Thu Sep 29 14:31:24 2016 +0300 iwlwifi: pcie: remove the active field in struct iwl_txq We already have queue_used in the transport - we can use it instead. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 2 -- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-) commit b9f916202997f515456c09e2c893b0dc83049d31 Author: Sara Sharon Date: Wed Sep 28 15:56:21 2016 +0300 Revert "iwlwifi: introduce trans API to get byte count table" This reverts commit 8aacf4b73fe8 ("iwlwifi: introduce trans API to get byte count table"). The commit is not needed as a better approach will be taken. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 11 ----------- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 1 - drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 -- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 8 -------- 4 files changed, 22 deletions(-) commit 49f7171382b55f74f84e5c2dfceca0ed3d1ac3f2 Author: Sara Sharon Date: Mon Jan 9 12:07:16 2017 +0200 iwlwifi: mvm: don't assume static queue numbers In a000 devices FW will assign the queue number. Prepare for that by getting rid of static defines and store them in variables. Enlarge to u16 since we may have up to 512 queues. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 5 ++++- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 22 ++++++++-------------- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 8 ++++---- 4 files changed, 18 insertions(+), 19 deletions(-) commit 9c36fd711c4340fff922f8a541199a67fd027e9b Author: Sara Sharon Date: Wed Jan 4 10:49:42 2017 +0200 iwlwifi: mvm: optimize reorder timeout frame releasing Currently we release up to the last expired frame. However, if there are consecutive frames after it - we can optimize it further and release them as well - until the next hole. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 45c458b4c0cad854bb1ae150e637dfe9c5108337 Author: Sara Sharon Date: Wed Nov 9 15:43:26 2016 +0200 iwlwifi: mvm: support new ADD_MODIFY_STA_KEY command The command was changed to support PN offload and TKIP offload. The FW will do TKIP calculations in D0 only for a000 devices, but API is aligned anyway. However, for all devices we can stop sending the wowlan tkip command. Firmware will fetch the keys from the station key command. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 3 + drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 4 +- .../net/wireless/intel/iwlwifi/mvm/fw-api-sta.h | 34 ++++++-- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 96 +++++++++++++++------- 4 files changed, 102 insertions(+), 35 deletions(-) commit 26d6c16bed536be526cbfcf67ceefb410d62f252 Author: Sara Sharon Date: Tue Jan 3 12:00:19 2017 +0200 iwlwifi: mvm: add multicast station Currently multicast queue is associated with the broadcast station. This raises quite a few issues: The multicast queue has a special treatment: - It is sent in the MAC context command - It is excluded from tfd_queue_mask In DQA mode we end up enabling two queues - the probe response queue and the multicast queue - with the same station (broadcast) and TID while in DQA mode it should be unique RA-TID. Firmware will enforce it for a000 devices, so this allocation will fail. In addition, in a000 devices the FW will set the FIFO and not the driver. So there is a need for FW to know when we enable the queue that it is multicast queue so it will be bound to the multicast FIFO. There is no such way in current design. In order to simplify driver and firmware handling of this queue create a multicast station. This solves the unique RA-TID issue in the short term and serves as preparation for the long term. In the long term we will also add a flag marking this station for the FW as the multicast station. Once we will do that the FW will know this is the multicast queue immediately when it is added and bind it to the correct FIFO. It will also enable removing the special treatment of the queue in the MAC context command. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 26 ++++- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 112 +++++++++++++++------- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 3 + 5 files changed, 106 insertions(+), 37 deletions(-) commit 5da083d1922c23b75e921c85b687c8e112e8280e Author: Liad Kaufman Date: Sun Jan 8 16:52:59 2017 +0200 iwlwifi: add support for 9000 HW B-step NICs Once we remove support for A-step, we'll be able to clean the code back again. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 25 ++++++++++++++++--------- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 7 +++++-- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 19 +++++++++++++------ 3 files changed, 34 insertions(+), 17 deletions(-) commit bd31dd9d147aad423a9ac371b86685f87b4e1420 Author: Johannes Berg Date: Mon Jan 9 11:28:47 2017 +0100 iwlwifi: use upper_32_bits/lower_32_bits where appropriate That's a bit nicer than open-coding it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-fh.h | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-io.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 1c17627bf5c460f94451ac5acab3ee96d3b7e1cd Author: Sara Sharon Date: Thu Dec 22 13:03:40 2016 +0200 iwlwifi: mvm: cleanup pending frames in DQA mode When a station is asleep, the fw will set it as "asleep". All queues that are used only by one station will be stopped by the fw. In pre-DQA mode this was relevant for aggregation queues. However, in DQA mode a queue is owned by one station only, so all queues will be stopped. As a result, we don't expect to get filtered frames back to mac80211 and don't have to maintain the entire pending_frames state logic, the same way as we do in aggregations. The correct behavior is to align DQA behavior with the aggregation queue behaviour pre-DQA: - Don't count pending frames. - Let mac80211 know we have frames in these queues so that it can properly handle trigger frames. When a trigger frame is received, mac80211 tells the driver to send frames from the queues using release_buffered_frames. The driver will tell the fw to let frames out even if the station is asleep. This is done by iwl_mvm_sta_modify_sleep_tx_count. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 8 +++-- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 11 +++--- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 41 ++++++++++------------- 4 files changed, 31 insertions(+), 31 deletions(-) commit afb844318de2a87694380ee3824ee102f2699bd9 Author: Emmanuel Grumbach Date: Tue Jan 3 10:04:44 2017 +0200 iwlwifi: pcie: print less data upon firmware crash We don't need to print so much data in the kernel log. Limit the data to be printed to the queue that actually got stuck in case of a TFD queue hang, and stop dumping all the CSR and FH registers. Over the course of time, the CSR and FH values haven't proven themselves to be really useful for debugging, and they are now in the firmware dump anyway. This comes as a preparation to the addition of more data required to be printed by the firwmare team. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 3 -- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 64 ++++++++++--------------- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 3 -- 3 files changed, 24 insertions(+), 46 deletions(-) commit 5cddd05c9cbe420436799716d009bc0372ef8268 Author: Johannes Berg Date: Wed Dec 14 13:48:04 2016 +0100 iwlwifi: mvm: fix RX SKB header size and align it properly When receiving a frame, we currently pull in sizeof(*hdr) plus some extra (crypto/snap), which is too much, most headers aren't actually sizeof(*hdr) since that takes into account the 4-address format but doesn't take into account QoS. As a result, a typical frame will have 4 bytes of the payload in the SKB header already. Fix this by calculating the correct header length, and now that we have that, align the end of the SKB header to a multiple of 4 so that the IP header will be aligned properly when pulled in. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 951cb319872df74a7ec2f3a13cebc0f2422cbdba Author: Sara Sharon Date: Thu Dec 29 10:11:40 2016 +0200 iwlwifi: mvm: adjust new API of compressed BA Final API has a reserved field - adjust accordingly. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 5 +++++ 1 file changed, 5 insertions(+) commit 2876e8c9e8a5bf075c7eddad4d309c1bdd178177 Author: Luca Coelho Date: Mon Dec 19 12:00:32 2016 +0200 iwlwifi: mvm: bump max API to 30 Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-7000.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-a000.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit 63f231fea02afbd364bbe77717bdee5a22daedd1 Author: Luca Coelho Date: Tue Dec 27 10:18:18 2016 +0200 iwlwifi: remove support for deprecated RF One of the RF modules we support has been deprecated and never released publicly. Remove support for this module. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 19 ------------------- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 1 - drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 1 - drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 17 +++++------------ 4 files changed, 5 insertions(+), 33 deletions(-) commit ddef2f98eee55deb7923917d388e7715310c3aa9 Author: Emmanuel Grumbach Date: Mon Dec 19 08:41:16 2016 +0200 iwlwifi: mvm: add DQA_ENABLE_CMD to the command list This will allow to print the name of the commands in the logs when we sent it. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 + 1 file changed, 1 insertion(+) commit 6ffff630c0699ded5c3e79879cc9c4e733a46829 Author: Luca Coelho Date: Wed Dec 28 10:46:20 2016 +0200 iwlwifi: be more verbose about needed firmware If the supported firmware versions are not found, we currently only print "no suitable firmware found". This is not very informative for the user trying to find the correct version to use. Improve this by printing the exact firmware name(s) the driver supports and pointing to the git repository where they can be found. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit aa4beb10a94358bf2474d1fc9c4ccde34660cc9d Author: Taeung Song Date: Fri Apr 7 23:24:20 2017 +0900 perf pmu: Refactor wordwrap() with ltrim() Signed-off-by: Taeung Song Cc: Andi Kleen Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1491575061-704-5-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e21600fd41106f7a0ca124cec2404b2b3562768d Author: Taeung Song Date: Fri Apr 7 23:24:19 2017 +0900 perf ui browser: Refactor the code to parse color configs with ltrim() When parsing {fore, back} ground color configs, use ltrim() instead of just while loop and isspace(). Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1491575061-704-4-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b07c40df1f4e6f937271921cb116d570bb9c4a31 Author: Taeung Song Date: Fri Apr 7 23:24:18 2017 +0900 perf stat: Refactor the code to strip csv output with ltrim() To strip csv output, use ltrim() instead of just while loop and isspace() at print_metric_{only}_csv(). Signed-off-by: Taeung Song Cc: Andi Kleen Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1491575061-704-3-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 32ccb130f5325abc81b32b1a538390f46e4860f6 Author: Jin Yao Date: Fri Apr 7 20:08:52 2017 +0800 perf evsel: Return exact sub event which failed with EPERM for wildcards The kernel has a special check for a specific irq_vectors trace event. TRACE_EVENT_PERF_PERM(irq_work_exit, is_sampling_event(p_event) ? -EPERM : 0); The perf-record fails for this irq_vectors event when it is present, like when using a wildcard: root@skl:/tmp# perf record -a -e irq_vectors:* sleep 2 Error: You may not have permission to collect system-wide 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 To make this setting permanent, edit /etc/sysctl.conf too, e.g.: kernel.perf_event_paranoid = -1 This patch prints out the exact sub event that failed with EPERM for wildcards to help in understanding what went wrong when this event is present: After the patch: root@skl:/tmp# perf record -a -e irq_vectors:* sleep 2 Error: No permission to enable irq_vectors:irq_work_exit event. You may not have permission to collect system-wide stats. ...... Committer notes: So we have a lot of irq_vectors events: [root@jouet ~]# perf list irq_vectors:* List of pre-defined events (to be used in -e): irq_vectors:call_function_entry [Tracepoint event] irq_vectors:call_function_exit [Tracepoint event] irq_vectors:call_function_single_entry [Tracepoint event] irq_vectors:call_function_single_exit [Tracepoint event] irq_vectors:deferred_error_apic_entry [Tracepoint event] irq_vectors:deferred_error_apic_exit [Tracepoint event] irq_vectors:error_apic_entry [Tracepoint event] irq_vectors:error_apic_exit [Tracepoint event] irq_vectors:irq_work_entry [Tracepoint event] irq_vectors:irq_work_exit [Tracepoint event] irq_vectors:local_timer_entry [Tracepoint event] irq_vectors:local_timer_exit [Tracepoint event] irq_vectors:reschedule_entry [Tracepoint event] irq_vectors:reschedule_exit [Tracepoint event] irq_vectors:spurious_apic_entry [Tracepoint event] irq_vectors:spurious_apic_exit [Tracepoint event] irq_vectors:thermal_apic_entry [Tracepoint event] irq_vectors:thermal_apic_exit [Tracepoint event] irq_vectors:threshold_apic_entry [Tracepoint event] irq_vectors:threshold_apic_exit [Tracepoint event] irq_vectors:x86_platform_ipi_entry [Tracepoint event] irq_vectors:x86_platform_ipi_exit [Tracepoint event] # And some may be sampled: [root@jouet ~]# perf record -e irq_vectors:local* sleep 20s [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.020 MB perf.data (2 samples) ] [root@jouet ~]# perf report -D | egrep 'stats:|events:' Aggregated stats: TOTAL events: 155 MMAP events: 144 COMM events: 2 EXIT events: 1 SAMPLE events: 2 MMAP2 events: 4 FINISHED_ROUND events: 1 TIME_CONV events: 1 irq_vectors:local_timer_entry stats: TOTAL events: 1 SAMPLE events: 1 irq_vectors:local_timer_exit stats: TOTAL events: 1 SAMPLE events: 1 [root@jouet ~]# But, as shown in the tracepoint definition at the start of this message, some, like "irq_vectors:irq_work_exit", may not be sampled, just counted, i.e. if we try to sample, as when using 'perf record', we get an error: [root@jouet ~]# perf record -e irq_vectors:irq_work_exit Error: You may not have permission to collect system-wide stats. Consider tweaking /proc/sys/kernel/perf_event_paranoid, The error message is misleading, this patch will help in pointing out what is the event causing such an error, but the error message needs improvement, i.e. we need to figure out a way to check if a tracepoint is counting only, like this one, when all we can do is to count it with 'perf stat', at most printing the delta using interval printing, as in: [root@jouet ~]# perf stat -I 5000 -e irq_vectors:irq_work_* # time counts unit events 5.000168871 0 irq_vectors:irq_work_entry 5.000168871 0 irq_vectors:irq_work_exit 10.000676730 0 irq_vectors:irq_work_entry 10.000676730 0 irq_vectors:irq_work_exit 15.001122415 0 irq_vectors:irq_work_entry 15.001122415 0 irq_vectors:irq_work_exit 20.001298051 0 irq_vectors:irq_work_entry 20.001298051 0 irq_vectors:irq_work_exit 25.001485020 1 irq_vectors:irq_work_entry 25.001485020 1 irq_vectors:irq_work_exit 30.001658706 0 irq_vectors:irq_work_entry 30.001658706 0 irq_vectors:irq_work_exit ^C 32.045711878 0 irq_vectors:irq_work_entry 32.045711878 0 irq_vectors:irq_work_exit [root@jouet ~]# But at least, when we use a wildcard, this patch helps a bit. Signed-off-by: Yao Jin Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1491566932-503-1-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 49346e858f34eda103d7c0e85c06edbaebfc83a9 Author: Arnaldo Carvalho de Melo Date: Wed Apr 5 11:43:41 2017 -0300 perf script: Use strtok_r() when parsing output field list Just avoiding non-reentrant functions. Cc: David Ahern Link: http://lkml.kernel.org/n/tip-eqytykipd74epzl9aexvppcg@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dadafc315ded31a36cb4899bc85ef4050f0332a7 Author: Arnaldo Carvalho de Melo Date: Wed Apr 5 11:38:10 2017 -0300 perf callchains: Switch from strtok() to strtok_r() when parsing options Trying to keep everything reentrant. Cc: Namhyung Kim Link: http://lkml.kernel.org/n/tip-rdce0p2k9e1b4qnrb8ki9mtf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/callchain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9415af7f306bfd5555552f059ea0a476c44c816a Author: Sara Sharon Date: Thu Nov 17 13:57:32 2016 +0200 iwlwifi: mvm: support new binding API For a000 devices the binding API needs to include relevant lmac ID - support the new API. The new API should be used regardless if the device had CDB or not. If there is no actual CDB support the binding is bound to first lmac regardless of the band. There are some functionality changes in binding restrictions and quota allocations that will be handled in future patches. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/binding.c | 17 ++++++++++++++++- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 16 ++++++++++++++-- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 14 +++++++++++--- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 14 ++++++++------ 5 files changed, 51 insertions(+), 12 deletions(-) commit 8c58f1a7a4b6d1d723bf25fef9d842d5a11200d0 Author: Jacopo Mondi Date: Wed Apr 5 16:07:19 2017 +0200 pinctrl: generic: Add bi-directional and output-enable Add bi-directional and output-enable pin configuration properties. bi-directional allows to specify when a pin shall operate in input and output mode at the same time. This is particularly useful in platforms where input and output buffers have to be manually enabled. output-enable is just syntactic sugar to specify that a pin shall operate in output mode, ignoring the provided argument. This pairs with input-enable pin configuration option. Signed-off-by: Jacopo Mondi Acked-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | 2 ++ drivers/pinctrl/pinconf-generic.c | 3 +++ include/linux/pinctrl/pinconf-generic.h | 3 +++ 3 files changed, 8 insertions(+) commit b6466d53afdb0c3ca058848cd4c12e141aba0763 Merge: 4ffa3c9 7f00f38 Author: Ingo Molnar Date: Tue Apr 11 10:47:28 2017 +0200 Merge branch 'x86/urgent' into x86/cpu, to resolve conflict Conflicts: arch/x86/kernel/cpu/intel_rdt_schemata.c Signed-off-by: Ingo Molnar commit 48eab1f28d49a3eeda050ad03fddf24a594c1f79 Author: Cristian Birsan Date: Fri Apr 7 19:07:22 2017 +0300 usb: gadget: udc: atmel: Update Kconfig help for fifo_mode = 0 Update Kconfig help for fifo_mode = 0 to explain the behavior better. Signed-off-by: Cristian Birsan Acked-by: Nicolas Ferre Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fcc9634ce290d9382f479e9eae6a0aaf55677be3 Author: Cristian Birsan Date: Fri Apr 7 19:07:21 2017 +0300 usb: gadget: udc: atmel: Use dev_err() to display EP configuration error Use dev_err() to display EP configuration error to avoid silent failure. Signed-off-by: Cristian Birsan Acked-by: Nicolas Ferre Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/atmel_usba_udc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9840354ff429d4a392a96dff5ab6b5df609b8dc1 Author: Roger Quadros Date: Wed Apr 5 13:39:31 2017 +0300 usb: dwc3: Add dual-role support If dr_mode is "otg" then support dual role mode of operation. Currently this mode is only supported when an extcon handle is present in the dwc3 device tree node. This is needed to get the ID status events of the port. We're using a workqueue to manage the dual-role state transitions as the extcon notifier (dwc3_drd_notifier) is called in an atomic context by extcon_sync() and this doesn't go well with usb_del_gadget_udc() causing a lockdep and softirq warning. Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/Kconfig | 1 + drivers/usb/dwc3/Makefile | 4 +++ drivers/usb/dwc3/core.c | 11 +++--- drivers/usb/dwc3/core.h | 14 ++++++++ drivers/usb/dwc3/drd.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 111 insertions(+), 4 deletions(-) commit 41ce1456e1dbbc7355d0fcc10cf7c337c13def24 Author: Roger Quadros Date: Tue Apr 4 12:49:18 2017 +0300 usb: dwc3: core: make dwc3_set_mode() work properly We can't have both Host and Peripheral roles active at the same time because of one detail on DWC3: it shares the same memory area for both Host and Peripheral registers. When swapping roles we must reinitialize the new role every time. Let's make sure this works for our debugfs interface. Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 103 +++++++++++++++++++++++++++++++-------------- drivers/usb/dwc3/core.h | 7 ++- drivers/usb/dwc3/debugfs.c | 8 +--- 3 files changed, 80 insertions(+), 38 deletions(-) commit b202c42cbf812070ae1d47209d12512226d1d8a5 Author: Roger Quadros Date: Tue Apr 4 11:27:57 2017 +0300 usb: dwc3: debugfs: remove unnecessary | operator Each role is mutually exclusive, the | operator is unnecessary. Remove it. Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/debugfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6b3261a274285916720e91bfbfdb3505555daa76 Author: Roger Quadros Date: Tue Apr 4 11:25:27 2017 +0300 usb: dwc3: core: add current_dr_role member We're going to use this member to track which role we're currently playing, that way we can more easily implement dual-role swap in upcoming patches. Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 2 ++ drivers/usb/dwc3/core.h | 2 ++ 2 files changed, 4 insertions(+) commit fac323471df6e196b496f94f7ca2047fa1b18387 Author: Roger Quadros Date: Mon Apr 3 15:20:29 2017 +0300 usb: udc: allow adding and removing the same gadget device allow usb_del_gadget_udc() and usb add_gadget_udc() to be called repeatedly on the same gadget->dev structure. We need to clear the gadget->dev structure so that kobject_init() doesn't complain about already initialized object. Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/core.c | 1 + 1 file changed, 1 insertion(+) commit d6e5a549cc4dba504a62855d9613836f76950790 Author: Felipe Balbi Date: Fri Apr 7 16:34:38 2017 +0300 usb: dwc3: simplify ZLP handling It's much simpler to just add one extra TRB chained to previous TRB to handle ZLP. This helps us reduce pointless allocations and simplifies the code a little bit. Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 4 +-- drivers/usb/dwc3/ep0.c | 49 +++++++++++++++----------- drivers/usb/dwc3/gadget.c | 89 +++++++++++++++-------------------------------- 3 files changed, 59 insertions(+), 83 deletions(-) commit 4199c5f8bccd7ff6923c32af0f8ef0224eeaa651 Author: Felipe Balbi Date: Fri Apr 7 14:09:13 2017 +0300 usb: dwc3: ep0: improve handling of unaligned OUT requests Just like we did for all other endpoint types, let's rely on a chained TRB pointing to ep0_bounce_addr in order to align transfer size. This will make the code simpler. Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 6 +---- drivers/usb/dwc3/ep0.c | 65 +++++++++++++---------------------------------- drivers/usb/dwc3/gadget.c | 50 ++++++++---------------------------- 3 files changed, 29 insertions(+), 92 deletions(-) commit d686a5ff6a2dd94cbe66b8cc71912c9324894c24 Author: Felipe Balbi Date: Fri Apr 7 13:47:49 2017 +0300 usb: dwc3: ep0: pass dep as argument to internal functions Instead of constantly recomputing how dwc and epnum relate to dep, just pass dep as argument. Signed-off-by: Felipe Balbi drivers/usb/dwc3/ep0.c | 52 +++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 7d5e650a5fdb82ec1994497de174650767862a49 Author: Felipe Balbi Date: Fri Apr 7 13:34:21 2017 +0300 usb: dwc3: ep0: use immediate SETUP on TRB If we pass TRB's own address on bpl/bph fields, we can get our SETUP packet as immediate data on the TRB itself, without having to allocate extra memory for it. Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 4 ---- drivers/usb/dwc3/ep0.c | 11 ++++++----- drivers/usb/dwc3/gadget.c | 39 ++++++++++++--------------------------- 3 files changed, 18 insertions(+), 36 deletions(-) commit 374a1020d21b238d566e523a3bfd8fd9ee628c6b Author: Alexey Khoroshilov Date: Sat Apr 1 00:07:18 2017 +0300 usb: gadget: mv_u3d: fix error handling in mv_u3d_probe() There are several inconsistencies in the error handling code. 1. If clk_get() fails, it goes to clk_put(). 2. If pdata->phy_init() fails, it does not disable u3d->clk. 3. In case of failure after stopping u3d, it does pdata->phy_deinit() and clk_disable(u3d->clk) twice. 4. It ignores failures in clk_enable(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/mv_u3d_core.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit b378e3bc3bd3e570293e1b99c6a82d62f1a2c563 Author: Cristian Birsan Date: Mon Apr 3 10:19:51 2017 +0300 usb: gadget: udc: atmel: Check fifo configuration values against device tree Check fifo configuration values against device tree values for endpoint fifo in auto configuration mode (fifo_mode=0). Signed-off-by: Cristian Birsan Acked-by: Nicolas Ferre Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/atmel_usba_udc.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit d7b2bff161cfa3fd53209b6a93d25e544aad8cc0 Author: Michael Grzeschik Date: Tue Apr 4 16:41:54 2017 +0200 fsl_udc_core: add support for devices provided by fsl-mph-dr-of Currently the of glue code in fsl-mph-dr-of will create the platform device fsl-usb2-udc. As this driver should also be probed by this name, this patch adds it to the devtypes list. Signed-off-by: Michael Grzeschik Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/fsl_udc_core.c | 2 ++ 1 file changed, 2 insertions(+) commit b5c7ed5cca82991335ae3a66428a791acc8aa7e9 Author: Felipe Balbi Date: Fri Mar 31 14:44:09 2017 +0300 usb: dwc3: expose dwc3_trb_type_string() That helper can be used from our tracepoint interface with very minor edits. Let's do so. Signed-off-by: Felipe Balbi drivers/usb/dwc3/debug.h | 28 ++++++++++++++++++++++++++++ drivers/usb/dwc3/debugfs.c | 27 ++------------------------- drivers/usb/dwc3/trace.h | 31 +------------------------------ 3 files changed, 31 insertions(+), 55 deletions(-) commit 90abb425d9493d00a49b65114dcb0f7266ba64da Author: Felipe Balbi Date: Fri Mar 31 14:37:21 2017 +0300 usb: dwc3: debugfs: return strings that match tracepoints In order to improve usability a tiny bit, we will return strings that match what our tracepoints return. Signed-off-by: Felipe Balbi drivers/usb/dwc3/debugfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 26c9f3e391d1aa304d89dd0a9ec98a753353e194 Author: Felipe Balbi Date: Fri Mar 31 14:28:33 2017 +0300 usb: dwc3: debugfs: make use of dwc3_gadget_link_string() Instead of redecoding link state into a string, use our helper. Signed-off-by: Felipe Balbi drivers/usb/dwc3/debugfs.c | 47 +--------------------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) commit 2df301cd3d717af48692542fa634727a213c7732 Author: Felipe Balbi Date: Fri Mar 31 14:10:40 2017 +0300 usb: dwc3: debugfs: downcase OTG on 'mode' file When writing, we expect the "otg" string. When showing, we return "OTG". Let's downcase that word to avoid confusion. Signed-off-by: Felipe Balbi drivers/usb/dwc3/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97b3ffa233b94741ae77d6ece2476331935bf15b Author: Raviteja Garimella Date: Tue Mar 28 16:32:03 2017 +0530 usb: gadget: udc: amd5536: split core and PCI layer This patch splits the amd5536udc driver into two -- one that does pci device registration and the other file that does the rest of the driver tasks like the gadget/ep ops etc for Synopsys UDC. This way of splitting helps in exporting core driver symbols which can be used by any other platform/pci driver that is written for the same Synopsys USB device controller. The current patch also includes a change in the Kconfig and Makefile. A new config option USB_SNP_CORE will be selected automatically when any one of the platform or pci driver for the same UDC is selected. Main changes: - amd5536udc_pci.c: PCI device registration is moved to this file. - amd5536udc.c: This file does rest of the core UDC fucntionality. 9 symbols are exported so as to be used by amd5536udc_pci.c. Module parameter definitions are moved to header file. - amd5536udc.h: Function declarations, module parameters definitions and few common header file includes are added to this file - Kconfig: New USB_SNP_CORE option is added which will be auto selected when any pci or platform driver config option for the UDC is chosen. - Makefile: Compiles the core and pci files separately. Signed-off-by: Raviteja Garimella Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/Kconfig | 18 +++ drivers/usb/gadget/udc/Makefile | 3 +- drivers/usb/gadget/udc/amd5536udc.c | 238 ++++---------------------------- drivers/usb/gadget/udc/amd5536udc.h | 36 +++++ drivers/usb/gadget/udc/amd5536udc_pci.c | 217 +++++++++++++++++++++++++++++ 5 files changed, 297 insertions(+), 215 deletions(-) commit cc995c9ec1184b964ffdf8cf242250bb4319cd91 Author: Yoshihiro Shimoda Date: Fri Mar 31 12:58:05 2017 +0900 usb: gadget: udc: renesas_usb3: add support for usb role swap This patch adds support for usb role swap via sysfs "role". For example: 1) Connect a usb cable using 2 Salvator-X boards. - For A-Device, the cable is connected to CN11 (USB3.0 ch0). - For B-Device, the cable is connected to CN9 (USB2.0 ch0). 2) On A-Device, you input the following command: # echo peripheral > /sys/devices/platform/soc/ee020000.usb/role 3) On B-Device, you input the following command: # echo host > /sys/devices/platform/soc/ee080200.usb-phy/role Then, the A-Device acts as a peripheral and the B-Device acts as a host. Please note that A-Device must input the following command if you want the board to act as a host again. # echo host > /sys/devices/platform/soc/ee020000.usb/role Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi .../ABI/testing/sysfs-platform-renesas_usb3 | 15 ++++++ drivers/usb/gadget/udc/renesas_usb3.c | 56 ++++++++++++++++++++++ 2 files changed, 71 insertions(+) commit fbf4987ae892619853e46c19df109d86f25eb5a3 Author: Cristian Birsan Date: Tue Mar 28 19:07:37 2017 +0300 usb: gadget: udc: atmel: Minor code cleanup Minor code cleanup based on feedback received on mailinglist. Acked-by: Nicolas Ferre Signed-off-by: Cristian Birsan Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/atmel_usba_udc.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 3b68e7ca388815459ef4466e17ed6661d0d67a5b Author: Yoshihiro Shimoda Date: Thu Mar 30 11:16:05 2017 +0900 usb: gadget: udc: renesas_usb3: add extcon support This patch adds extcon support to see VBUS/ID signal states. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/Kconfig | 1 + drivers/usb/gadget/udc/renesas_usb3.c | 43 +++++++++++++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) commit 77172a1f886a696bab5b4d3006ccf55ee4b1bfe5 Author: Yoshihiro Shimoda Date: Thu Mar 30 11:16:04 2017 +0900 usb: gadget: udc: renesas_usb3: add USB ID signal monitoring This usb 3.0 peripheral controller has a register (USB_OTG_STA) to monitor the USB ID signal. So, this patch adds the ID signal monitoring to change the mode to host (A-Host) or peripheral (B-Peripheral). This patch also removes hardcoded setting as B-Peripheral mode. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/renesas_usb3.c | 67 ++++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 4 deletions(-) commit e92634cd4d37d5a2ea2fb0d55d25d50bbba1e8e0 Author: Roger Quadros Date: Thu Mar 30 09:46:41 2017 +0300 usb: otg-fsm: Prevent build warning "VDBG" redefined If usb/otg-fsm.h and usb/composite.h are included together then it results in the build warning [1]. Prevent that by defining VDBG locally. Also get rid of MPC_LOC which doesn't seem to be used by anyone. [1] - warning fixed by this patch: In file included from drivers/usb/dwc3/core.h:33, from drivers/usb/dwc3/ep0.c:33: include/linux/usb/otg-fsm.h:30:1: warning: "VDBG" redefined In file included from drivers/usb/dwc3/ep0.c:31: include/linux/usb/composite.h:615:1: warning: this is the location of the previous definition Signed-off-by: Roger Quadros Reviewed-by: Jun Li Acked-by: Peter Chen Signed-off-by: Felipe Balbi drivers/usb/common/usb-otg-fsm.c | 7 +++++++ drivers/usb/phy/phy-fsl-usb.c | 7 +++++++ include/linux/usb/otg-fsm.h | 15 --------------- 3 files changed, 14 insertions(+), 15 deletions(-) commit ff3f0789b3dc37869b8c45e023f01f9dca0cdd8f Author: Roger Quadros Date: Thu Mar 30 09:46:40 2017 +0300 usb: dwc3: use BIT() macro where possible To avoid checkpatch warnings with new patches let's start using the BIT() macro wherever possible. Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 195 ++++++++++++++++++++++--------------------- drivers/usb/dwc3/dwc3-omap.c | 48 +++++------ drivers/usb/dwc3/gadget.h | 20 ++--- 3 files changed, 132 insertions(+), 131 deletions(-) commit ea920bb42dcd179da10af0825396e0abf84d8110 Author: Michal Nazarewicz Date: Fri Mar 10 22:45:58 2017 +0100 usb: gadget: f_fs: simplify ffs_dev name handling Currently ffs_dev::name can be either allocated by the client of the ffs_dev structure or by the f_fs.c core itself. The former is used by g_ffs while the latter happens with configfs. Historically, g_ffs did not need to allocate separate buffer for the name so what is now f_fs.c core never cared about freeing that space. With configfs the name needs to be copied since the memory is not guaranteed to be availeble after ffs_set_inst_name finishes. The complication is therefore here to avoid allocations in the g_ffs case but it complicates the code inproportinally to benefits it provides. In particular, g_ffs is considered ‘legacy’ so optimising for its sake is unlikely to be worth the effort. With that observation in mind, simplify the code by unifying the code paths in g_ffs and configfs paths. Furthermore, instead of allocating a new buffer for the name, simply embed it in the ffs_dev structure. This further makes the memory management less convoluted and error-prone. The configfs interface for functionfs imposed a limit of 40 characters for the name so this results in a 41-byte buffer added to the structure. (For short names this may lead to wasted memory but the actual amount is not immediately obvious and depends on pointer size and which slab buckets the structure and name would fall into). Signed-off-by: Michal Nazarewicz Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 72 +++++++------------------------------- drivers/usb/gadget/function/u_fs.h | 11 +++--- 2 files changed, 19 insertions(+), 64 deletions(-) commit 8ec32c38efa5f9f92b275148ccb247156f0bf04e Author: Philipp Zabel Date: Wed Mar 15 12:31:53 2017 +0100 usb: dwc2: simplify optional reset handling As of commit bb475230b8e5 ("reset: make optional functions really optional"), the reset framework API calls use NULL pointers to describe optional, non-present reset controls. This allows to return errors from devm_reset_control_get_optional and to call reset_control_(de)assert unconditionally. Signed-off-by: Philipp Zabel Acked-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc2/platform.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 20839dbb7da5ad77e18bb51f5f56221290bc759e Author: Baolin Wang Date: Thu Mar 23 14:08:31 2017 +0800 usb: phy: Remove unused config Since the old common Samsung USB PHY code has been removed by commit ea2fdf8423 ("usb: phy: samsung: remove old common USB PHY code"), thus remove the unused config. Signed-off-by: Baolin Wang Signed-off-by: Felipe Balbi drivers/usb/phy/Kconfig | 7 ------- drivers/usb/phy/Makefile | 1 - 2 files changed, 8 deletions(-) commit 9f20dfb44d03745d0d3cef2ffb3abf8d8024fa61 Author: Yuyang Du Date: Fri Mar 24 04:06:11 2017 +0800 usb: gadget: dummy_hcd: Fix wrong power status bit clear/reset in dummy_hub_control() This fixes the commit: 1cd8fd2887e1 ("usb: gadget: dummy_hcd: add SuperSpeed support"). In the case of ClearPortFeature and USB_PORT_FEAT_POWER, simply clear the right bit regardless of what the wValue is. Acked-by: Alan Stern Signed-off-by: Yuyang Du Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/dummy_hcd.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit a2cfed43386c697e0aad0d14439eb62042a18afc Author: Chanwoo Choi Date: Tue Mar 28 13:42:02 2017 +0900 usb: mtu3: Replace the extcon API This patch uses the resource-managed extcon API for extcon_register_notifier() and replaces the deprecated extcon API as following: - extcon_get_cable_state_() -> extcon_get_state() Cc: Greg Kroah-Hartman Cc: Chunfeng Yun Cc: linux-usb@vger.kernel.org Tested-by: Chunfeng Yun Acked-by: Chunfeng Yun Signed-off-by: Chanwoo Choi Signed-off-by: Felipe Balbi drivers/usb/mtu3/mtu3_dr.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit 387f869d2579e379ee343f5493dcd360be60f5c6 Author: Felipe Balbi Date: Wed Mar 22 13:25:18 2017 +0200 usb: gadget: u_ether: conditionally align transfer size Unless HW sets quirk_ep_out_aligned_size, gadget driver shouldn't make any efforts towards aligning transfers. If the UDC needs, it *must* set the quirk flag. Signed-off-by: Felipe Balbi drivers/usb/gadget/function/u_ether.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit fea14e68ff5e110c21f57278883c8cc4637c3f92 Author: Felipe Balbi Date: Wed Mar 22 13:24:34 2017 +0200 usb: gadget: u_ether: use better list accessors We have helpers for some of these, let's rely on them instead of open coding what they do in u_ether.c Signed-off-by: Felipe Balbi drivers/usb/gadget/function/u_ether.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit aad7c25964955ccf097712d596ef00a3e187341e Author: Felipe Balbi Date: Wed Mar 22 13:03:13 2017 +0200 usb: dwc3: trace: change format for string to cmd trace a %x is much easier for a human to parse when reading tracepoint output. Let's change it. Signed-off-by: Felipe Balbi drivers/usb/dwc3/trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc27f66e0693f8ffdaae6bf1f6efc37ff65ed142 Author: Romain Izard Date: Fri Mar 10 14:11:42 2017 +0100 usb: gadget: reword configuration choices As USB_CONFIGFS is not a part of the "USB Gadget Drivers" choice anymore, the name for the option and its attached description needs to be more descriptive. It appears one level higher in the configuration menu, and without the context provided by the comments for the choice entry, it needs to make sense on its own. Conversely, the "USB Gadget Drivers" entry now only introduces the legacy drivers, where one or more functions are combined in a single driver. As the configfs option can be used as a full-fledged alternative, rename the choice entry to show that it is not the only way to provice service as an USB gadget. Signed-off-by: Romain Izard Signed-off-by: Felipe Balbi drivers/usb/gadget/Kconfig | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 6e253d0fbc665b36192b8ed3cecdbb65b413a1eb Author: Romain Izard Date: Fri Mar 10 14:11:41 2017 +0100 usb: gadget: legacy gadgets are optional With commit bc49d1d17dcf ("usb: gadget: don't couple configfs to legacy gadgets"),it is possible to build a modular kernel with both built-in configfs support and modular legacy gadget drivers. But when building a kernel without modules, it is also necessary to be able to build with configfs but without any legacy gadget driver. This was a possible configuration when the USB_CONFIGFS was a part of the choice options, but not anymore. Mark the choice for legacy gadget drivers as optional restores this. Fixes: bc49d1d17dcf ("usb: gadget: don't couple configfs to legacy gadgets") Cc: # 4.9+ Signed-off-by: Romain Izard Signed-off-by: Felipe Balbi drivers/usb/gadget/Kconfig | 1 + 1 file changed, 1 insertion(+) commit af771d731b8e31e6c5aced2b1b066edd16106a6f Author: John Youn Date: Thu Jan 26 11:58:40 2017 -0800 usb: dwc3: gadget: Fix starting microframe for ISOC The gadget wants to set the starting microframe for the first ISOC TRB to 4 microframes in the future, but it does so by multiplying the dep->interval. This only works if dep->interval = 1. For other intervals it will put it 4 *intervals* in the future which may be way too much. Fix so that it always adds just one interval or at least 4 microframes. Signed-off-by: John Youn Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 3a932b0f50f4c0782a27a257b7557f8b928299b2 Author: Shuah Khan Date: Mon Jan 30 12:25:04 2017 -0700 usb: dwc3: exynos: change goto labels to meaningful names Change goto labels to meaningful names from a series of errNs. Signed-off-by: Shuah Khan Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-exynos.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit f3bcfc7e68f0f13903465dae8196dade17ebb364 Author: Bryan O'Donoghue Date: Tue Jan 31 20:58:11 2017 +0000 usb: dwc3: remove dwc3_gadget_init_hw_endpoints A previous patch in the series reduces the number of callsites of dwc3_gadget_init_hw_endpoints from two to one. This patch removes the redundant step of wrappering one function in the other, which can be done by adding a parameter to dwc3_gadget_init_endpoints and moving the linked-list initialization of dwc->gadet.ep_list. Signed-off-by: Bryan O'Donoghue Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 47d3946ea220f2db43b3abc46c9e64287d625ac3 Author: Bryan O'Donoghue Date: Tue Jan 31 20:58:10 2017 +0000 usb: dwc3: refactor gadget endpoint count calculation - DWC_USB3_NUM indicates the number of Device mode single directional endpoints, including OUT and IN endpoint 0. - DWC_USB3_NUM_IN_EPS indicates the maximum number of Device mode IN endpoints active at any time, including control endpoint 0. It's possible to configure RTL such that DWC_USB3_NUM_EPS is equal to DWC_USB3_NUM_IN_EPS. dwc3-core calculates the number of OUT endpoints as DWC_USB3_NUM minus DWC_USB3_NUM_IN_EPS. If RTL has been configured with DWC_USB3_NUM_IN_EPS equal to DWC_USB3_NUM then dwc3-core will calculate the number of OUT endpoints as zero. For example a from dwc3_core_num_eps() shows: [ 1.565000] /usb0@f01d0000: found 8 IN and 0 OUT endpoints This patch refactors the endpoint calculation down to one variable dwc->num_eps taking care to maintain the current mapping of endpoints for fixed FPGA configurations as described in Table 4-7 of version 2.60a of the DWC USB3 databook. The endpoint mapping will then be EP-OUT, EP-IN etc, up to DWC_USB3_NUM. If DWC_USB3_NUM is odd then OUT will take the extra endpoint. Suggested-by: Felipe Balbi Signed-off-by: Bryan O'Donoghue Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 3 +-- drivers/usb/dwc3/core.h | 6 ++---- drivers/usb/dwc3/debugfs.c | 15 ++------------- drivers/usb/dwc3/gadget.c | 33 +++++++++------------------------ 4 files changed, 14 insertions(+), 43 deletions(-) commit 8261bd4e91e26d12c1ade9f94dae51629157c18b Author: Roger Quadros Date: Thu Apr 6 13:14:28 2017 +0300 usb: dwc3: make macros safe to expression arguments We must make sure that our macros are safe against expressions passed as arguments. We have seen one problem where GTXFIFOSIZ(n) was failing when passed the expression (epnum >> 1) as argument. The problem was caused by operator precedence between >> and *. To make sure macros are safe, we just wrap argument with () when using it. Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit e35b135055e24d705736fd98c975afc46a793a09 Author: Bruno Herrera Date: Tue Jan 31 23:25:43 2017 -0200 usb: dwc2: Add support for STM32F429/439/469 USB OTG HS/FS in FS mode (internal PHY) This patch introduces a new parameter to activate USB OTG HS/FS core embedded phy transceiver. The STM32F4x9 SoC uses the GGPIO register to enable the transceiver. Also add the dwc2_set_params function for stm32f4 otg fs. Acked-by: John Youn Signed-off-by: Bruno Herrera Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 5 +++++ drivers/usb/dwc2/hcd.c | 15 ++++++++++++++- drivers/usb/dwc2/hw.h | 2 ++ drivers/usb/dwc2/params.c | 19 +++++++++++++++++++ 4 files changed, 40 insertions(+), 1 deletion(-) commit f87599a0d7777242273b44e45f741a0c61292771 Author: Gustavo A. R. Silva Date: Tue Feb 14 16:03:02 2017 -0600 usb: gadget: udc: remove unnecessary variable and update function prototype Remove unnecessary variable and update function prototype. Acked-by: Michal Nazarewicz Reviewed-by: Greg Kroah-Hartman Signed-off-by: Gustavo A. R. Silva Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/amd5536udc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 71ef322d0669785ded30cf389e81b720dda7c82a Author: Gustavo A. R. Silva Date: Tue Feb 14 15:58:33 2017 -0600 usb: gadget: udc: avoid use of freed pointer Rewrite udc_free_dma_chain() function to avoid use of pointer after free. Addresses-Coverity-ID: 1091172 Acked-by: Michal Nazarewicz Reviewed-by: Greg Kroah-Hartman Signed-off-by: Gustavo A. R. Silva Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/amd5536udc.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit dad3f793f20fbb5c0c342f0f5a0bdf69a4d76089 Author: John Stultz Date: Mon Feb 13 20:08:08 2017 -0800 usb: dwc2: Make sure we disconnect the gadget state I had seen some odd behavior with HiKey's usb-gadget interface that I finally seemed to have chased down. Basically every other time I plugged in the OTG port, the gadget interface would properly initialize. The other times, I'd get a big WARN_ON in dwc2_hsotg_init_fifo() about the fifo_map not being clear. Ends up if we don't disconnect the gadget state, the fifo-map doesn't get cleared properly, which causes WARN_ON messages and also results in the device not properly being setup as a gadget every other time the OTG port is connected. So this patch adds a call to dwc2_hsotg_disconnect() in the reset path so the state is properly cleared. With it, the gadget interface initializes properly on every plug in. Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Acked-by: John Youn Signed-off-by: John Stultz Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 1 + 1 file changed, 1 insertion(+) commit 1f7da4f87a594764c3a9d7f0d67ae5f996cbc3c9 Author: Vincent Pelletier Date: Fri Feb 17 11:20:38 2017 +0000 usb: gadget: f_fs: Fix ExtCompat documentation in uapi header The code was fixed in commit 53642399aa71 ("usb: gadget: f_fs: Fix wrong check on reserved1 wof OS_DESC_EXT_COMPAT") but the in-header documentation kept referencing 0 as the expected value. Reference 1 instead as per original commit message. Signed-off-by: Vincent Pelletier Signed-off-by: Felipe Balbi include/uapi/linux/usb/functionfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4b7e060bd4aaba45563b6c728002cb92e9af236 Author: Prarit Bhargava Date: Mon Feb 20 09:04:44 2017 -0500 tools/usb: Add .gitignore file Add .gitignore file for untracked files in tools/usb. Signed-off-by: Prarit Bhargava Signed-off-by: Felipe Balbi tools/usb/.gitignore | 2 ++ 1 file changed, 2 insertions(+) commit c8cd751060b149997b9de53a494fb1490ded72c5 Author: Petr Cvek Date: Tue Mar 7 00:57:20 2017 +0100 usb: gadget: uvc: Missing files for configfs interface Commit 76e0da34c7ce ("usb-gadget/uvc: use per-attribute show and store methods") caused a stringification of an undefined macro argument "aname", so three UVC parameters (streaming_interval, streaming_maxpacket and streaming_maxburst) were named "aname". Add the definition of "aname" to the main macro and name the filenames as originaly intended. Signed-off-by: Petr Cvek Signed-off-by: Felipe Balbi drivers/usb/gadget/function/uvc_configfs.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 910b4c5cb3807aa5ee051d8b656a5dcb435c4964 Author: Gregory CLEMENT Date: Thu Mar 30 17:23:04 2017 +0200 arm64: dts: marvell: add sdhci support for Armada 7K/8K Also enable it on the Armada 7040 DB and Armada 8040 DB boards. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-7040-db.dts | 14 ++++++++++++++ arch/arm64/boot/dts/marvell/armada-8040-db.dts | 12 ++++++++++++ arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 11 +++++++++++ arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 11 +++++++++++ 4 files changed, 48 insertions(+) commit 53e747780a24b271401fe2b1531696a553b00995 Author: Gregory CLEMENT Date: Thu Mar 30 17:23:03 2017 +0200 arm64: dts: marvell: add eMMC support for Armada 37xx Add the eMMC support for Armada 37xx SoC and enable it in the Armada 3720 DB board. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-3720-db.dts | 9 +++++++++ arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 11 +++++++++++ 2 files changed, 20 insertions(+) commit 03ffb507c8c4998fa85d3efae70cb18085457263 Author: Andrew Jeffery Date: Fri Apr 7 22:28:17 2017 +0930 pinctrl: aspeed: Fix unused-const-variable warnings Three video input signals suffered from a search/replace failure in some copied code. Signed-off-by: Andrew Jeffery Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 717a94b5fc7092afebe9c93791f29b2d8e5d297a Author: NeilBrown Date: Fri Apr 7 10:03:26 2017 +1000 sched/core: Remove 'task' parameter and rename tsk_restore_flags() to current_restore_flags() It is not safe for one thread to modify the ->flags of another thread as there is no locking that can protect the update. So tsk_restore_flags(), which takes a task pointer and modifies the flags, is an invitation to do the wrong thing. All current users pass "current" as the task, so no developers have accepted that invitation. It would be best to ensure it remains that way. So rename tsk_restore_flags() to current_restore_flags() and don't pass in a task_struct pointer. Always operate on current->flags. Signed-off-by: NeilBrown Cc: Linus Torvalds Cc: Mel Gorman Cc: Michal Hocko Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar drivers/block/nbd.c | 2 +- drivers/scsi/iscsi_tcp.c | 2 +- fs/nfsd/vfs.c | 2 +- include/linux/sched.h | 6 +++--- kernel/softirq.c | 2 +- net/core/dev.c | 2 +- net/core/sock.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) commit 36a4dfc37856cae40e4d864950f768d8b7d4f9f5 Merge: a481db3 39da7c5 Author: Ingo Molnar Date: Tue Apr 11 09:05:36 2017 +0200 Merge tag 'v4.11-rc6' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit e5185a76a23b2d56fb2327ad8bd58fb1bcaa52b1 Merge: b678c91 4729277 Author: Ingo Molnar Date: Tue Apr 11 08:56:05 2017 +0200 Merge branch 'x86/boot' into x86/mm, to avoid conflict There's a conflict between ongoing level-5 paging support and the E820 rewrite. Since the E820 rewrite is essentially ready, merge it into x86/mm to reduce tree conflicts. Signed-off-by: Ingo Molnar commit 4729277156cf18acd9b9b04d6ef8c2a8a7bf00dc Merge: 5af2184 687d77a Author: Ingo Molnar Date: Tue Apr 11 08:49:31 2017 +0200 Merge branch 'WIP.x86/boot' into x86/boot, to pick up ready branch The E820 rework in WIP.x86/boot has gone through a couple of weeks of exposure in -tip, merge it in a wider fashion. Signed-off-by: Ingo Molnar commit 9df9078ef2086652647248ee6e82ca8f661cb3f5 Author: Borislav Petkov Date: Mon Apr 10 14:20:47 2017 +0200 perf/amd/uncore: Fix pr_fmt() prefix Make it "perf/amd/uncore: ", i.e., something more specific than "perf: ". Signed-off-by: Borislav Petkov Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/20170410122047.3026-4-bp@alien8.de [ Changed it to perf/amd/uncore/ ] Signed-off-by: Ingo Molnar arch/x86/events/amd/uncore.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 68e8038048f44e7782079e79338506246393a876 Author: Borislav Petkov Date: Mon Apr 10 14:20:46 2017 +0200 perf/amd/uncore: Clean up per-family setup Fam16h is the same as the default one, remove it. Turn the switch-case into a simple if-else. No functionality change. Signed-off-by: Borislav Petkov Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/20170410122047.3026-3-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/events/amd/uncore.c | 59 ++++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 38 deletions(-) commit c2628f90c9964881a62dd8e9f7372ca05cb6fe32 Author: Borislav Petkov Date: Mon Apr 10 14:20:45 2017 +0200 perf/amd/uncore: Do feature check first, before assignments ... and save some unnecessary work. Remove now unused label while at it. Signed-off-by: Borislav Petkov Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/20170410122047.3026-2-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/events/amd/uncore.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 84b1e36a6aee080ea01256659e2957114a0a52b5 Merge: 11e445e 39da7c5 Author: Ingo Molnar Date: Tue Apr 11 08:42:47 2017 +0200 Merge tag 'v4.11-rc6' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit c6b0b9e65f094deabc0c1d499b96ed5085b0f7db Author: Takashi Sakamoto Date: Sun Apr 9 21:33:29 2017 +0900 ALSA: firewire-motu: add tracepoints for messages for unique protocol MOTU units transfer/receive messages in each data block of their isochronous packet payload. A part of content in the message is cleard for MIDI message transmission, while the rest is unknown yet. Additional features are required to assist users and developers to reveal the details. This commit adds tracepoints for the purpose. The tracepoints are designed for MOTU's protocol version 2 and 3 (Protocol version 1 is not upstreamed yet). In the tracepoints, events are probed to gather first two 24 bit data chunks of each data block. The chunks are formatted into elements of 64 bit array with padding in MSB. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/amdtp-motu-trace.h | 50 ++++++++++++++++++++++++++++++++++ sound/firewire/motu/amdtp-motu.c | 17 ++++++++++++ 2 files changed, 67 insertions(+) commit 17909c1b3058b315698965aeb33ed6434501567c Author: Takashi Sakamoto Date: Sun Apr 9 21:33:28 2017 +0900 ALSA: firewire-motu: add tracepoints for SPH in IEC 61883-1 fashion Unique protocol is used for MOTU FireWire series. In this protocol, data block format is not compliant to AM824 in IEC 61883-1/6. Each of the data block consists of 24 bit data chunks, except for a first quadlet. The quadlet is used for source packet header (SPH) described in IEC 61883-1. The sequence of SPH seems to represent presentation timestamp corresponding to included data. Developers have experienced that invalid sequence brings disorder of units in the series. Unfortunately, current implementation of ALSA IEC 61883-1/6 engine and firewire-motu driver brings periodical noises to the units at sampling transmission frequency based on 44.1 kHz. The engine generates the SPH with even interval and this mechanism seems not to be suitable to the units. Further work is required for this issue and infrastructure is preferable to assist the work. This commit adds tracepoints for the purpose. In the tracepoints, events are probed to gather the SPHs from each data blocks. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/Makefile | 2 + sound/firewire/motu/amdtp-motu-trace.h | 73 ++++++++++++++++++++++++++++++++++ sound/firewire/motu/amdtp-motu.c | 20 ++++++++++ 3 files changed, 95 insertions(+) commit b164d2fd6e4985e9270755477dde063e6e48461e Author: Takashi Sakamoto Date: Sun Apr 9 21:33:27 2017 +0900 ALSA: firewire_lib: add tracepoints for packets without CIP headers Unique protocol is used for RME Fireface series. In this protocol, payload format for isochronous packet is not compliant to CIP in IEC 61883-1/6. The packet includes data blocks just with data channels, without headers and any metadata. In previous commits, ALSA IEC 61883-1/6 engine supports this protocol. However, tracepoints are not supported yet, unlike implementation for IEC 61883-1/6 protocol. This commit adds support of tracepoints for the protocol. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream-trace.h | 88 +++++++++++++++++++++++++++++++++++++ sound/firewire/amdtp-stream.c | 8 ++++ 2 files changed, 96 insertions(+) commit 1e7605e3ff04b3faf42f662c853d1aea4c37fa06 Author: Greg Kroah-Hartman Date: Tue Apr 11 07:35:53 2017 +0200 staging: rtl8723bs: force driver to be built as a module. Due to the ton of global symbols, the driver has to be a module otherwise the build blows up if it is compiled into the kernel. Reported-by: Stephen Rothwell Cc: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 7ad61a386bb804ae562966ae23baf5f4deee014b Author: Aishwarya Pant Date: Mon Apr 10 19:13:50 2017 +0530 staging: rtl8723bs: remove null test before kfree kfree(..) on a NULL pointer is a no-op; the null test here is redundant. Detected by coccicheck. Signed-off-by: Aishwarya Pant Acked-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 6 ++---- drivers/staging/rtl8723bs/hal/sdio_ops.c | 6 ++---- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 8 ++----- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 26 ++++++----------------- drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 6 ++---- 5 files changed, 15 insertions(+), 37 deletions(-) commit 9ddf6e34ff6b56a4187bdc1b6335f46969f16b17 Author: Hans de Goede Date: Mon Apr 10 21:13:07 2017 +0200 staging: rtl8723bs: Add missing include to fix compile error As reported by Stephen Rothwell when merging staging-next, drivers/staging/rtl8723bs/core/rtw_ieee80211.c does not compile due to of_get_property not being declared. Explicitly include to fix this compile error. Reported-by: Stephen Rothwell Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bb9dc1359ef40a10153cd8c7106dd9d9e8aa1a3 Author: Christophe JAILLET Date: Mon Apr 10 20:48:16 2017 -0700 Input: omap-keypad - fix error handling code According to the previous error handling code, it is likely that 'goto err_free_keymap' is expected here in order to avoid a memory leak in error handling path. Signed-off-by: Christophe JAILLET Signed-off-by: Dmitry Torokhov drivers/input/keyboard/omap4-keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81093c9848a781b85163d06de92ef8f84528cf6a Author: Cameron Gutman Date: Mon Apr 10 20:43:04 2017 -0700 Input: xpad - support some quirky Xbox One pads There are several quirky Xbox One pads that depend on initialization packets that the Microsoft pads don't require. To deal with these, I've added a mechanism for issuing device-specific initialization packets using a VID/PID-based quirks list. For the initial set of init quirks, I have added quirk handling from Valve's Steam Link xpad driver[0] and the 360Controller project[1] for macOS to enable some new pads to work properly. This should enable full functionality on the following quirky pads: 0x0e6f:0x0165 - Titanfall 2 gamepad (previously fully non-functional) 0x0f0d:0x0067 - Hori Horipad (analog sticks previously non-functional) 0x24c6:0x541a - PowerA Xbox One pad (previously fully non-functional) 0x24c6:0x542a - PowerA Xbox One pad (previously fully non-functional) 0x24c6:0x543a - PowerA Xbox One pad (previously fully non-functional) [0]: https://github.com/ValveSoftware/steamlink-sdk/blob/master/kernel/drivers/input/joystick/xpad.c [1]: https://github.com/360Controller/360Controller Signed-off-by: Cameron Gutman Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 114 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 101 insertions(+), 13 deletions(-) commit c5cb37d0d62c58320f0a86777b738fb28272245b Author: Martin Kepplinger Date: Mon Apr 10 20:39:22 2017 -0700 Input: yealink - define packet offset __be16 instead of u16 sparse says warning: incorrect type in assignment (different base types) expected unsigned short [unsigned] [usertype] offset got restricted __be16 [usertype] for every usage of cpu_to_be16 in yealink.c. Defining it __be16 in the first place shouldn't hurt. Signed-off-by: Martin Kepplinger Signed-off-by: Henk.Vergonet@gmail.com Signed-off-by: Dmitry Torokhov drivers/input/misc/yealink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bee84493318843ffba9705924469369b9b244ddf Author: Geliang Tang Date: Mon Apr 10 20:38:30 2017 -0700 Input: turbografx - use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Dmitry Torokhov drivers/input/joystick/turbografx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit cfecc1ebdc9315ef6164b396629ff2936dbba0aa Author: Geliang Tang Date: Mon Apr 10 20:38:10 2017 -0700 Input: locomokbd - use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Dmitry Torokhov drivers/input/keyboard/locomokbd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d8f2bed04c9925dc6fc8c1b60c145a044869a82f Author: Geliang Tang Date: Mon Apr 10 20:37:53 2017 -0700 Input: gameport - use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Dmitry Torokhov drivers/input/gameport/gameport.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c9a9b72f34bf67a49743b26ab1f94c1349a389ad Author: Geliang Tang Date: Mon Apr 10 20:37:40 2017 -0700 Input: db9 - use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Dmitry Torokhov drivers/input/joystick/db9.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit dd224085d73ab04d14fe78a5fd9970fa808a60fb Author: Hans de Goede Date: Mon Apr 10 20:34:19 2017 -0700 Input: soc_button_array - properly map usage 0x07/0xe3 to KEY_LEFTMETA When submitting the support for the ACPI0011 windows tablet keys device I mapped the "windows" logo homekey to KEY_HOMEPAGE. But this is inconsistent with how it is done on windows tablets using the old PNP0C40 ACPI device and it does not match the HUT spec, which says that usage-page 7 usage 0xe3 is "Keyboard Left GUI". This commit maps usage-page 7 usage 0xe3 to KEY_LEFTMETA fixing this. Fixes: 4c3362f44980 ("Input: soc_button_array - add support for ACPI 6.0...") Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/misc/soc_button_array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ddb1a4d4dc20642073b7d92400a67b67601fe6f Author: Jaegeuk Kim Date: Fri Apr 7 15:08:17 2017 -0700 f2fs: clean up some macros in terms of GET_SEGNO This patch cleans several macros by introducing: - BLKS_PER_SEC - GET_SEC_FROM_SEG - GET_SEG_FROM_SEC - GET_ZONE_FROM_SEC - GET_ZONE_FROM_SEG Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 6 +++--- fs/f2fs/f2fs.h | 7 +++---- fs/f2fs/file.c | 3 +-- fs/f2fs/gc.c | 17 ++++++++--------- fs/f2fs/segment.c | 20 ++++++++++---------- fs/f2fs/segment.h | 34 ++++++++++++++++++++-------------- 6 files changed, 45 insertions(+), 42 deletions(-) commit 302bd34882b1e20797f08cc13ef060ec972d0acb Author: Jaegeuk Kim Date: Fri Apr 7 14:33:22 2017 -0700 f2fs: clean up get_valid_blocks with consistent parameter This patch cleans up get_valid_blocks, which has no functional change. Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 2 +- fs/f2fs/gc.c | 8 ++++---- fs/f2fs/segment.c | 8 ++++---- fs/f2fs/segment.h | 8 ++++---- fs/f2fs/super.c | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) commit 63fcf8e8d6bff2e8228f348c78b4a4fcca44401a Author: Jaegeuk Kim Date: Fri Apr 7 14:27:07 2017 -0700 f2fs: use segment number for get_valid_blocks This patch fixes to submit a segment number for get_valid_blocks. Signed-off-by: Jaegeuk Kim fs/f2fs/segment.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 68afcf2d38cd7544817558757e57e7b9d5c4e72c Author: Tomohiro Kusumi Date: Sun Apr 9 02:11:36 2017 +0300 f2fs: guard macro variables with braces Add braces around variables used within macros for those make sense to do it. Many of the macros in f2fs already do this. What this commit doesn't do is anything that changes line# as a result of adding braces, which usually affects the binary via __LINE__. Confirmed no diff in fs/f2fs/f2fs.ko before/after this commit on x86_64, to make sure this has no functional change as well as there's been no unexpected side effect due to callers' arithmetics within the existing code. Signed-off-by: Tomohiro Kusumi Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 36 +++++++++++++------------- fs/f2fs/node.c | 2 +- fs/f2fs/node.h | 22 ++++++++-------- fs/f2fs/segment.h | 76 +++++++++++++++++++++++++++---------------------------- fs/f2fs/xattr.h | 4 +-- 5 files changed, 70 insertions(+), 70 deletions(-) commit 771a9a71778def4098e8baaa23854d24e33fdb2f Author: Tomohiro Kusumi Date: Wed Apr 5 22:49:44 2017 +0300 f2fs: fix comment on f2fs_flush_merged_bios() after 86531d6b Callers are to unlock the page on failure after 86531d6b. Signed-off-by: Tomohiro Kusumi Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa64a0036cb69c50ac156a841f1b83ef0f84fc16 Author: Chao Yu Date: Wed Apr 5 18:26:26 2017 +0800 f2fs: prevent waiter encountering incorrect discard states In f2fs_submit_discard_endio, we will wake up waiter before setting discard command states, so waiter may use incorrect states. Change the order between complete() and states setting to fix this issue. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit d431413f00319919ed2adac0d58225160bd1d8fb Author: Chao Yu Date: Wed Apr 5 18:19:49 2017 +0800 f2fs: introduce f2fs_wait_discard_bios Split f2fs_wait_discard_bios from f2fs_wait_discard_bio, just for cleanup, no logic change. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 +- fs/f2fs/segment.c | 37 ++++++++++++++++++++++--------------- fs/f2fs/super.c | 2 +- 3 files changed, 24 insertions(+), 17 deletions(-) commit 22d375dd9cc6ee9ff6382487fdd6ca4759af82a9 Author: Chao Yu Date: Wed Apr 5 18:19:48 2017 +0800 f2fs: split discard_cmd_list Split discard_cmd_list to discard_{pend,wait}_list, so while sending/waiting discard command, we can avoid traversing unneeded entries in original list. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 3 ++- fs/f2fs/segment.c | 47 ++++++++++++++++++++++++++++++----------------- 2 files changed, 32 insertions(+), 18 deletions(-) commit c6f82fe90d7458e5fa190a6820bfc24f96b0de4e Author: Jaegeuk Kim Date: Tue Apr 4 16:45:30 2017 -0700 Revert "f2fs: put allocate_segment after refresh_sit_entry" This reverts commit 3436c4bdb30de421d46f58c9174669fbcfd40ce0. This makes a leak to register dirty segments. I reproduced the issue by modified postmark which injects a lot of file create/delete/update and finally triggers huge number of SSR allocations. Cc: # v4.10+ [Jaegeuk Kim: Change missing incorrect comment] Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit b8b1a2e5eca6bbf20e3a29c5f9db8331ec52af2d Author: Todd Poynor Date: Thu Apr 6 18:47:57 2017 -0700 cgroup: move cgroup_subsys_state parent field for cache locality Various structures embed a struct cgroup_subsys_state, typically at the top of the containing structure. It is common for code that accesses the structures to perform operations that iterate over the chain of parent css pointers, also accessing data in each containing structure. In particular, struct cpuacct is used by fairly hot code paths in the scheduler such as cpuacct_charge(). Move the parent css pointer field to the end of the structure to increase the chances of residing in the same cache line as the data from the containing structure. Signed-off-by: Todd Poynor Signed-off-by: Tejun Heo include/linux/cgroup-defs.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 30e03acda5fd9c77ec9bf8b3c5def9540c6b0486 Author: Rakib Mullick Date: Sun Apr 9 07:36:14 2017 +0600 cpuset: Remove cpuset_update_active_cpus()'s parameter. In cpuset_update_active_cpus(), cpu_online isn't used anymore. Remove it. Signed-off-by: Rakib Mullick Acked-by: Zefan Li Signed-off-by: Tejun Heo include/linux/cpuset.h | 4 ++-- kernel/cgroup/cpuset.c | 2 +- kernel/sched/core.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit 17ed4c8f81da2bf340d33a8c875f4d6b1dfd9398 Author: Gautham R. Shenoy Date: Wed Mar 22 20:34:17 2017 +0530 powerpc/powernv: Recover correct PACA on wakeup from a stop on P9 DD1 POWER9 DD1.0 hardware has a bug where the SPRs of a thread waking up from stop 0,1,2 with ESL=1 can endup being misplaced in the core. Thus the HSPRG0 of a thread waking up from can contain the paca pointer of its sibling. This patch implements a context recovery framework within threads of a core, by provisioning space in paca_struct for saving every sibling threads's paca pointers. Basically, we should be able to arrive at the right paca pointer from any of the thread's existing paca pointer. At bootup, during powernv idle-init, we save the paca address of every CPU in each one its siblings paca_struct in the slot corresponding to this CPU's index in the core. On wakeup from a stop, the thread will determine its index in the core from the TIR register and recover its PACA pointer by indexing into the correct slot in the provisioned space in the current PACA. Furthermore, ensure that the NVGPRs are restored from the stack on the way out by setting the NAPSTATELOST in paca. [Changelog written with inputs from svaidy@linux.vnet.ibm.com] Signed-off-by: Gautham R. Shenoy Reviewed-by: Nicholas Piggin [mpe: Call it a bug] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/paca.h | 5 ++++ arch/powerpc/kernel/asm-offsets.c | 1 + arch/powerpc/kernel/idle_book3s.S | 48 ++++++++++++++++++++++++++++++++++- arch/powerpc/platforms/powernv/idle.c | 30 ++++++++++++++++++++++ 4 files changed, 83 insertions(+), 1 deletion(-) commit f3b3f28493d93232a37d5fbb5cb5ad168ede0e1a Author: Gautham R. Shenoy Date: Wed Mar 22 20:34:16 2017 +0530 powerpc/powernv/idle: Don't override default/deepest directly in kernel Currently during idle-init on power9, if we don't find suitable stop states in the device tree that can be used as the default_stop/deepest_stop, we set stop0 (ESL=1,EC=1) as the default stop state psscr to be used by power9_idle and deepest stop state which is used by CPU-Hotplug. However, if the platform firmware has not configured or enabled a stop state, the kernel should not make any assumptions and fallback to a default choice. If the kernel uses a stop state that is not configured by the platform firmware, it may lead to further failures which should be avoided. In this patch, we modify the init code to ensure that the kernel uses only the stop states exposed by the firmware through the device tree. When a suitable default stop state isn't found, we disable ppc_md.power_save for power9. Similarly, when a suitable deepest_stop_state is not found in the device tree exported by the firmware, fall back to the default busy-wait loop in the CPU-Hotplug code. [Changelog written with inputs from svaidy@linux.vnet.ibm.com] Reviewed-by: Nicholas Piggin Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/idle.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 9006123157886acc47bdc17e26c933d710b8d6cd Author: Gautham R. Shenoy Date: Wed Mar 22 20:34:15 2017 +0530 powerpc/powernv/smp: Add busy-wait loop as fall back for CPU-Hotplug Currently, the powernv cpu-offline function assumes that platform idle states such as stop on POWER9, winkle/sleep/nap on POWER8 are always available. On POWER8, it picks nap as the default state if other deep idle states like sleep/winkle are not available and enabled in the platform. On POWER9, nap is not available and all idle states are managed by STOP instruction. The parameters to the idle state are passed through processor stop status control register (PSSCR). Hence as such executing STOP would take parameters from current PSSCR. We do not want to make any assumptions in kernel on what STOP states and PSSCR features are configured by the platform. Ideally platform will configure a good set of stop states that can be used in the kernel. We would like to start with a clean slate, if the platform choose to not configure any state or there is an error in platform firmware that lead to no stop states being configured or allowed to be requested. This patch adds a fallback method for CPU-Hotplug that is similar to snooze loop at idle where the threads are left to spin at low priority and hence reduce the cycles consumed. This is a safe fallback mechanism in the case when no stop state would be requested if the platform firmware did not configure them most likely due to an error condition. Requesting a stop state when the platform has not configured them or enabled them would lead to further error conditions which could be difficult to debug. [Changelog written with inputs from svaidy@linux.vnet.ibm.com] Reviewed-by: Nicholas Piggin Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/idle.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit a7cd88da97040513e17cd77ae3e57764e854bae4 Author: Gautham R. Shenoy Date: Wed Mar 22 20:34:14 2017 +0530 powerpc/powernv: Move CPU-Offline idle state invocation from smp.c to idle.c Move the piece of code in powernv/smp.c::pnv_smp_cpu_kill_self() which transitions the CPU to the deepest available platform idle state to a new function named pnv_cpu_offline() in powernv/idle.c. The rationale behind this code movement is that the data required to determine the deepest available platform state resides in powernv/idle.c. Reviewed-by: Nicholas Piggin Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cpuidle.h | 1 + arch/powerpc/platforms/powernv/idle.c | 25 +++++++++++++++++++++++++ arch/powerpc/platforms/powernv/powernv.h | 2 -- arch/powerpc/platforms/powernv/smp.c | 18 ++---------------- 4 files changed, 28 insertions(+), 18 deletions(-) commit f5c0b0910ac4c1bc93474d7593cc73622fdfc822 Author: Bart Van Assche Date: Thu Mar 30 11:21:27 2017 -0700 blk-mq: Show symbolic names for hctx state and flags Instead of showing the hctx state and flags as numbers, show the names of the flags. Signed-off-by: Bart Van Assche Cc: Omar Sandoval Cc: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) commit 91d68905aee08a79b9ba82676c834fc670d722a0 Author: Bart Van Assche Date: Mon Apr 10 16:13:15 2017 -0600 blk-mq: Export queue state through /sys/kernel/debug/block/*/state Make it possible to check whether or not a block layer queue has been stopped. Make it possible to start and to run a blk-mq queue from user space. Signed-off-by: Bart Van Assche Cc: Omar Sandoval Cc: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 106 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) commit d455937ed1cff44b9e5567f0ab697ad486429c0f Merge: df45eac 98db803 Author: Dave Airlie Date: Tue Apr 11 07:47:02 2017 +1000 Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next Noteworthy changes this time: 1) 4k support for newer chips (ganging up hwpipes and mixers) 2) using OPP bindings for gpu 3) more prep work towards per-process pagetables * 'msm-next' of git://people.freedesktop.org/~robclark/linux: (47 commits) msm/drm: gpu: Dynamically locate the clocks from the device tree drm/msm: gpu: Use OPP tables if we can drm/msm: Hard code the GPU "slow frequency" drm/msm: Add MSM_PARAM_GMEM_BASE drm/msm: Reference count address spaces drm/msm: Make sure to detach the MMU during GPU cleanup drm/msm/mdp5: Enable 3D mux in mdp5_ctl drm/msm/mdp5: Reset CTL blend registers before configuring them drm/msm/mdp5: Assign 'right' mixer to CRTC state drm/msm/mdp5: Stage border out on base stage if CRTC has 2 LMs drm/msm/mdp5: Stage right side hwpipes on Right-side Layer Mixer drm/msm/mdp5: Prepare Layer Mixers for source split drm/msm/mdp5: Configure 'right' hwpipe drm/msm/mdp5: Assign a 'right hwpipe' to plane state drm/msm/mdp5: Create mdp5_hwpipe_mode_set drm/msm/mdp5: Add optional 'right' Layer Mixer in CRTC state drm/msm/mdp5: Add a CAP for Source Split drm/msm/mdp5: Remove mixer/intf pointers from mdp5_ctl drm/msm/mdp5: Start using parameters from CRTC state drm/msm/mdp5: Add more stuff to CRTC state ... commit 2c9faa7675fec57f6ac0372688fae2e10fc4c272 Author: Anshuman Khandual Date: Fri Apr 7 09:25:39 2017 +0530 powerpc/hugetlb: Add ABI defines for supported HugeTLB page sizes Add user space exported API definitions for 512KB, 1MB, 2MB, 8MB, 16MB, 1GB, 16GB non default huge page sizes to be used with mmap() system call. Signed-off-by: Anshuman Khandual [mpe: Reword the comment to emphasise that these are only needed to use the non-default huge page size, and updated the change log.] Signed-off-by: Michael Ellerman arch/powerpc/include/uapi/asm/mman.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit ea6145557400b38faa6b3cee946ebceed8999872 Author: Anshuman Khandual Date: Fri Apr 7 12:23:11 2017 +0530 powerpc/mm: Remove reduntant initmem information from log Generic core VM already prints these information in the log buffer, hence there is no need for a second print. This just removes the second print from arch powerpc NUMA init path. Before the patch: $ dmesg | grep "Initmem" numa: Initmem setup node 0 [mem 0x00000000-0xffffffff] numa: Initmem setup node 1 [mem 0x100000000-0x1ffffffff] numa: Initmem setup node 2 [mem 0x200000000-0x2ffffffff] numa: Initmem setup node 3 [mem 0x300000000-0x3ffffffff] numa: Initmem setup node 4 [mem 0x400000000-0x4ffffffff] numa: Initmem setup node 5 [mem 0x500000000-0x5ffffffff] numa: Initmem setup node 6 [mem 0x600000000-0x6ffffffff] numa: Initmem setup node 7 [mem 0x700000000-0x7ffffffff] Initmem setup node 0 [mem 0x0000000000000000-0x00000000ffffffff] Initmem setup node 1 [mem 0x0000000100000000-0x00000001ffffffff] Initmem setup node 2 [mem 0x0000000200000000-0x00000002ffffffff] Initmem setup node 3 [mem 0x0000000300000000-0x00000003ffffffff] Initmem setup node 4 [mem 0x0000000400000000-0x00000004ffffffff] Initmem setup node 5 [mem 0x0000000500000000-0x00000005ffffffff] Initmem setup node 6 [mem 0x0000000600000000-0x00000006ffffffff] Initmem setup node 7 [mem 0x0000000700000000-0x00000007ffffffff] After the patch just the latter set is printed. Signed-off-by: Anshuman Khandual Signed-off-by: Michael Ellerman arch/powerpc/mm/numa.c | 7 ------- 1 file changed, 7 deletions(-) commit 7b3912f4223541c5108565d4bad28928e3b628f9 Author: Michael Ellerman Date: Wed Apr 5 16:10:48 2017 +1000 powerpc: Make sparsemem the default on 64-bit Book3S Make sparsemem the default on all 64-bit Book3S platforms. It already is for pseries and ps3, and we need to enable it for powernv because on POWER9 memory between chips is discontiguous. For the other platforms sparsemem should work fine, though it might add a small amount of overhead. We can always force FLATMEM in the defconfigs if necessary. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4868e3508d1934d28961f940ed6b9f1e347ab52c Author: Michael Ellerman Date: Mon Apr 3 12:05:55 2017 +1000 powerpc/nohash: Fix use of mmu_has_feature() in setup_initial_memory_limit() setup_initial_memory_limit() is called from early_init_devtree(), which runs prior to feature patching. If the kernel is built with CONFIG_JUMP_LABEL=y and CONFIG_JUMP_LABEL_FEATURE_CHECKS=y then we will potentially get the wrong value. If we also have CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG=y we get a warning and backtrace: Warning! mmu_has_feature() used prior to jump label init! CPU: 0 PID: 0 Comm: swapper Not tainted 4.11.0-rc4-gccN-next-20170331-g6af2434 #1 Call Trace: [c000000000fc3d50] [c000000000a26c30] .dump_stack+0xa8/0xe8 (unreliable) [c000000000fc3de0] [c00000000002e6b8] .setup_initial_memory_limit+0xa4/0x104 [c000000000fc3e60] [c000000000d5c23c] .early_init_devtree+0xd0/0x2f8 [c000000000fc3f00] [c000000000d5d3b0] .early_setup+0x90/0x11c [c000000000fc3f90] [c000000000000520] start_here_multiplatform+0x68/0x80 Fix it by using early_mmu_has_feature(). Fixes: c12e6f24d413 ("powerpc: Add option to use jump label for mmu_has_feature()") Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb_nohash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ae05fb3ccb365894662d6073c851cb466dd2220 Author: Michael Ellerman Date: Fri Feb 10 12:12:44 2017 +1100 powerpc: Remove unnecessary includes of asm/debug.h These files don't seem to have any need for asm/debug.h, now that all it includes are the debugger hooks and breakpoint definitions. Signed-off-by: Michael Ellerman arch/powerpc/kernel/fadump.c | 1 - arch/powerpc/kernel/irq.c | 1 - arch/powerpc/kernel/prom.c | 1 - arch/powerpc/kvm/book3s_hv_rm_xics.c | 1 - 4 files changed, 4 deletions(-) commit 7644d5819cf8956d799a0a0e5dc75f5a29889bd5 Author: Michael Ellerman Date: Fri Feb 10 12:04:56 2017 +1100 powerpc: Create asm/debugfs.h and move powerpc_debugfs_root there powerpc_debugfs_root is the dentry representing the root of the "powerpc" directory tree in debugfs. Currently it sits in asm/debug.h, a long with some other things that have "debug" in the name, but are otherwise unrelated. Pull it out into a separate header, which also includes linux/debugfs.h, and convert all the users to include debugfs.h instead of debug.h. Signed-off-by: Michael Ellerman arch/powerpc/include/asm/debug.h | 2 -- arch/powerpc/include/asm/debugfs.h | 17 +++++++++++++++++ arch/powerpc/kernel/eeh.c | 3 +-- arch/powerpc/kernel/fadump.c | 2 +- arch/powerpc/kernel/setup-common.c | 2 +- arch/powerpc/kernel/traps.c | 2 +- arch/powerpc/kvm/book3s_xics.c | 3 +-- arch/powerpc/mm/hash_utils_64.c | 3 +-- arch/powerpc/platforms/cell/axon_msi.c | 2 +- arch/powerpc/platforms/powernv/opal-lpc.c | 3 +-- arch/powerpc/platforms/powernv/pci-ioda.c | 3 +-- arch/powerpc/platforms/pseries/dtl.c | 3 +-- arch/powerpc/sysdev/scom.c | 3 +-- arch/powerpc/xmon/xmon.c | 5 +---- 14 files changed, 29 insertions(+), 24 deletions(-) commit abfe8026b505d66dad7a3e5ebe7235f12c29b67d Author: Alistair Popple Date: Mon Apr 10 15:24:35 2017 +1000 powerpc/powernv: Require MMU_NOTIFIER to fix NPU build In the recent commit 1ab66d1fbada ("powerpc/powernv: Introduce address translation services for Nvlink2") the NPU code gained a dependency on MMU notifiers. All our defconfigs have KVM enabled, which selects MMU_NOTIFIER, but if KVM is not enabled then the build breaks. Fix it by always selecting MMU_NOTIFIER when we're building powernv. Fixes: 1ab66d1fbada ("powerpc/powernv: Introduce address translation services for Nvlink2") Signed-off-by: Alistair Popple [mpe: Reword change log] Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/Kconfig | 1 + 1 file changed, 1 insertion(+) commit f7327e0ba3805470cced2acfa053e795362ee41d Author: Aneesh Kumar K.V Date: Sat Apr 1 20:11:48 2017 +0530 powerpc/mm/radix: Remove unnecessary ptesync For a tlbiel with pid, we need to issue tlbiel with set number encoded. We don't need to do ptesync for each of those. Instead we need one for the entire tlbiel pid operation. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Aneesh Kumar K.V Acked-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb-radix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f6b0df55cad252fedd60aa2ba75a0207d0006283 Author: Aneesh Kumar K.V Date: Sat Apr 1 20:11:47 2017 +0530 powerpc/mm/radix: Don't do page walk cache flush when doing full mm flush For fullmm tlb flush, we do a flush with RIC_FLUSH_ALL which will invalidate all related caches (radix__tlb_flush()). Hence the pwc flush is not needed. Signed-off-by: Aneesh Kumar K.V Acked-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb-radix.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit df45eaca51f4826f328859e5b203fbeab6fcf2a3 Merge: b769fef c98cdff Author: Dave Airlie Date: Tue Apr 11 07:41:10 2017 +1000 Merge tag 'drm-misc-next-2017-04-07' of git://anongit.freedesktop.org/git/drm-misc into drm-next Last drm-misc-next pull req for 4.12 Core changes: - fb_helper checkpatch cleanup and simplified _add_one_connector() (Thierry) - drm_ioctl and drm_sysfs improved/gained documentation (Daniel) - [ABI] Repurpose reserved field in drm_event_vblank for crtc_id (Ander) - Plumb acquire ctx through legacy paths to avoid lock_all and legacy_backoff (Daniel) - Add connector_atomic_check to check conn constraints on modeset (Maarten) - Add drm_of_find_panel_or_bridge to remove boilerplate in drivers (Rob) Driver changes: - meson moved to drm-misc (Neil) - Added support for Amlogic GX SoCs in dw-hdmi (Neil) - Rockchip unbind actually cleans up the things bind initializes (Jeffy) - A couple misc fixes in virtio, dw-hdmi NOTE: this also includes a backmerge of drm-next as well rc5 (we needed vmwgfx as well as the new synopsys media formats) * tag 'drm-misc-next-2017-04-07' of git://anongit.freedesktop.org/git/drm-misc: (77 commits) Revert "drm: Don't allow interruptions when opening debugfs/crc" drm: Only take cursor locks when the cursor plane exists drm/vmwgfx: Fix fbdev emulation using legacy functions drm/rockchip: Shutdown all crtcs when unbinding drm drm/rockchip: Reorder drm bind/unbind sequence drm/rockchip: analogix_dp: Disable clock when unbinding drm/rockchip: vop: Unprepare clocks when unbinding drm/rockchip: vop: Enable pm domain before vop_initial drm/rockchip: cdn-dp: Don't unregister audio dev when unbinding drm/rockchip: cdn-dp: Don't try to release firmware when not loaded drm: bridge: analogix: Destroy connector & encoder when unbinding drm: bridge: analogix: Disable clock when unbinding drm: bridge: analogix: Unregister dp aux when unbinding drm: bridge: analogix: Detach panel when unbinding analogix dp drm: Don't allow interruptions when opening debugfs/crc drm/virtio: don't leak bo on drm_gem_object_init failure drm: bridge: dw-hdmi: fix input format/encoding from plat_data drm: omap: use common OF graph helpers drm: convert drivers to use drm_of_find_panel_or_bridge drm: convert drivers to use of_graph_get_remote_node ... commit b769fefb68cd70385d68220ae341e5a10723fbc0 Merge: 1420f63 39da7c5 Author: Dave Airlie Date: Tue Apr 11 07:40:42 2017 +1000 Backmerge tag 'v4.11-rc6' into drm-next Linux 4.11-rc6 drm-misc needs 4.11-rc5, may as well fix conflicts with rc6. commit 1420f63b8207e966f54caec26d08abdc2ff37193 Merge: 2b2fc72 32df87d Author: Dave Airlie Date: Tue Apr 11 07:31:18 2017 +1000 Merge branch 'drm-next-4.12' of git://people.freedesktop.org/~agd5f/linux into drm-next Just some bug fixes and vega10 updates for 4.12. * 'drm-next-4.12' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: fix fence memory leak in wait_all_fence V2 drm/amdgpu: fix "fix 64bit division" drm/amd/powerplay: add fan controller table v11 support. drm/amd/powerplay: port newest process pptable code for vega10. drm/amdgpu: set vm size and block size by individual gmc by default (v3) drm/amdgpu: Avoid overflows/divide-by-zero in latency_watermark calculations. drm/amdgpu: Make display watermark calculations more accurate drm/radeon: fix typo in bandwidth calculation drm/radeon: Refuse to migrate a prime BO to VRAM. (v2) drm/radeon: Maintain prime import/export refcount for BOs drm/amdgpu: Refuse to pin or change acceptable domains of prime BOs to VRAM. (v2) drm/amdgpu: Fail fb creation from imported dma-bufs. (v2) drm/radeon: Fail fb creation from imported dma-bufs. commit 2b2fc72aa51ba20f047d4825f8ea3e0d9306d8fb Merge: cdf5316 ba515d3 Author: Dave Airlie Date: Tue Apr 11 07:28:01 2017 +1000 Merge tag 'drm-intel-testing-2017-04-03' of git://anongit.freedesktop.org/git/drm-intel into drm-next Last 4.12 feature pile: GVT updates: - Add mdev attribute group for per-vgpu info - Time slice based vGPU scheduling QoS support (Gao Ping) - Initial KBL support for E3 server (Han Xu) - other misc. i915: - lots and lots of small fixes and improvements all over - refactor fw_domain code (Chris Wilson) - improve guc code (Oscar Mateo) - refactor cursor/sprite code, precompute more for less overhead in the critical path (Ville) - refactor guc/huc fw loading code a bit (Michal Wajdeczko) * tag 'drm-intel-testing-2017-04-03' of git://anongit.freedesktop.org/git/drm-intel: (121 commits) drm/i915: Update DRIVER_DATE to 20170403 drm/i915: Clear gt.active_requests before checking idle status drm/i915/uc: Drop use of MISSING_CASE on trivial enums drm/i915: make a few DDI functions static drm/i915: Combine reset_all_global_seqno() loops into one drm/i915: Remove redudant wait for each engine to idle from seqno wrap drm/i915: Wait for all engines to be idle as part of i915_gem_wait_for_idle() drm/i915: Move retire-requests into i915_gem_wait_for_idle() drm/i915/uc: Move fw path check to fetch_uc_fw() drm/i915/huc: Remove unused intel_huc_fini() drm/i915/uc: Add intel_uc_fw_fini() drm/i915/uc: Add intel_uc_fw_type_repr() drm/i915/uc: Move intel_uc_fw_status_repr() to intel_uc.h drivers: gpu: drm: i915L intel_lpe_audio: Fix kerneldoc comments drm/i915: Suppress busy status for engines if wedged drm/i915: Do request retirement before marking engines as wedged drm/i915: Drop verbose and archaic "ring" from our internal engine names drm/i915: Use a dummy timeline name for a signaled fence drm/i915: Ironlake do_idle_maps w/a may be called w/o struct_mutex drm/i915/guc: Take enable_guc_loading check out of GEM core code ... commit 835ed7bf12609ce23d42956e74206cc539a0ce5f Author: Nobuhiro Iwamatsu Date: Thu Mar 23 08:04:14 2017 +0900 mtd: spi-nor: Add support for N25Q256A11 Add new Micron N25Q256A (N25Q256A11) 256Mbit NOR Flash in the list of supported devices. This chip has the same structure as the N25Q256A but ID and voltage (1V8) to use is different. Therefore, this adds N25Q256A11 as n25q256ax1. In the future, for new Micron memories we could use the patterns "n25q*ax1" for 1V8 and "n25q*ax3" for 3V3 memories. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 1 + 1 file changed, 1 insertion(+) commit cdf5316bdb7a6905eafa666c64dae5701a5ae38e Merge: 0168778 84a5ead Author: Dave Airlie Date: Tue Apr 11 06:32:11 2017 +1000 Merge branch 'drm-next-4.12' of https://github.com/ckhu-mediatek/linux.git-tags into drm-next This series is MT2701 DRM support. * 'drm-next-4.12' of https://github.com/ckhu-mediatek/linux.git-tags: drm/mediatek: add support for Mediatek SoC MT2701 drm/mediatek: update DSI sub driver flow for sending commands to panel drm/mediatek: add non-continuous clock mode and EOT packet control drm/mediatek: add dsi transfer function drm/mediatek: add dsi interrupt control drm/mediatek: cleaning up and refine drm/mediatek: update display module connections drm/mediatek: add BLS component drm/mediatek: add shadow register support drm/mediatek: add *driver_data for different hardware settings drm/mediatek: add helpers for coverting from the generic components dt-bindings: display: mediatek: update supported chips commit 2d7a548a3eff382da5cd743670693b7657327714 Author: Jaghathiswari Rankappagounder Natarajan Date: Tue Apr 4 17:52:41 2017 -0700 drivers: hwmon: Support for ASPEED PWM/Fan tach The ASPEED AST2400/2500 PWM controller supports 8 PWM output ports. The ASPEED AST2400/2500 Fan tach controller supports 16 tachometer inputs. The device driver matches on the device tree node. The configuration values are read from the device tree and written to the respective registers. The driver provides a sysfs entries through which the user can configure the duty-cycle value (ranging from 0 to 100 percent) and read the fan tach rpm value. Signed-off-by: Jaghathiswari Rankappagounder Natarajan Signed-off-by: Guenter Roeck Documentation/hwmon/aspeed-pwm-tacho | 22 + drivers/hwmon/Kconfig | 9 + drivers/hwmon/Makefile | 1 + drivers/hwmon/aspeed-pwm-tacho.c | 835 +++++++++++++++++++++++++++++++++++ 4 files changed, 867 insertions(+) commit d702b353b9d3fccbeabba96ed530ffc87f303465 Author: Jaghathiswari Rankappagounder Natarajan Date: Tue Apr 4 17:52:40 2017 -0700 Documentation: dt-bindings: Document bindings for ASPEED AST2400/AST2500 PWM and Fan tach controller device driver This binding provides interface for adding values related to ASPEED AST2400/2500 PWM and Fan tach controller support. The PWM controller can support upto 8 PWM output ports. The Fan tach controller can support upto 16 tachometer inputs. Signed-off-by: Jaghathiswari Rankappagounder Natarajan Acked-by: Rob Herring Signed-off-by: Guenter Roeck .../devicetree/bindings/hwmon/aspeed-pwm-tacho.txt | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit 7988ceefd744a3d4219233c364c9245b952bd9d4 Merge: eb976a5 52c0cae Author: David S. Miller Date: Mon Apr 10 16:03:59 2017 -0400 Merge branch 'ftgmac100-rework-batch3-tx-path' Benjamin Herrenschmidt says: ==================== ftgmac100: Rework batch 3 - TX path This is version 2 of the third batch of updates to the ftgmac100 driver. This one tackles the TX path of the driver. This provides the bulk of the performance improvements by adding support for fragmented sends along with a bunch of cleanups. Version 2 fixes a patch splitting mistake and uses eth_skb_pad() (which uses skb_put_padto) to pad ethernet frames rather than skb_padto(), thus removing the need to also pad the packet headlen in a couple of places. Subsequent batches will add various features (ethtool functions, vlan offlan, ...) and cleanups. ==================== Signed-off-by: David S. Miller commit 52c0cae8746513e64198c56f0cd74eacaee21be1 Author: Benjamin Herrenschmidt Date: Mon Apr 10 11:15:26 2017 +1000 ftgmac100: Remove tx descriptor accessors Directly access the fields when needed. The accessors add clutter not clarity and in some cases cause unnecessary read-modify-write type access on the slow (uncached) descriptor memory. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 175 ++++++++++++------------------- drivers/net/ethernet/faraday/ftgmac100.h | 8 +- 2 files changed, 69 insertions(+), 114 deletions(-) commit 6db7470445f0757d2e8f23f57d86611338717ebe Author: Benjamin Herrenschmidt Date: Mon Apr 10 11:15:25 2017 +1000 ftgmac100: Add support for fragmented tx Add NETIF_F_SG and create multiple TX ring entries for skb fragments. On reclaim, the skb is only freed on the segment marked as "last". Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 119 ++++++++++++++++++++++++------- 1 file changed, 94 insertions(+), 25 deletions(-) commit e92455397237c4e680302950fe1d7970b6c063a0 Author: Benjamin Herrenschmidt Date: Mon Apr 10 11:15:24 2017 +1000 ftgmac100: Don't clear tx desc fields unnecessarily Those are non-cachable stores, let's avoid those we don't need. Remove the helper, it's not particularly helpful and since it uses "priv" I can't move it to the header file. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 42c2d19786e538dc33d365d3439eec00545651cc Author: Benjamin Herrenschmidt Date: Mon Apr 10 11:15:23 2017 +1000 ftgmac100: Split tx packet freeing from ftgmac100_tx_complete_packet() This moves the packet freeing to a separate function which is also used by ftgmac100_free_buffers() and will be used more in the error path of fragmented sends. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 38 ++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 17 deletions(-) commit 4a2712b2f0b6895f37c657e099936679d2bc7b6e Author: Benjamin Herrenschmidt Date: Mon Apr 10 11:15:22 2017 +1000 ftgmac100: Move the barrier out of ftgmac100_txdes_set_dma_own() We'll use variants of this accessor without barriers when building series of descriptors for fragmented sends Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 6ad3d7edcbdae233a24f67a6713f461b2325e5cc Author: Benjamin Herrenschmidt Date: Mon Apr 10 11:15:21 2017 +1000 ftgmac100: Cleanup tx queue handling We have a private lock which isn't terribly useful, and we maintain a "tx_pending" counter for information that's already available via a trivial arithmetic operation. Then we unconditionaly wake the queue even when not stopped. Finally our code in tx isn't really safe vs. a concurrent reclaim. The aspeed chips aren't SMP today but I prefer the code being right and future proof. So rip that out and replace it with more "standard" queue handling, currently with a threshold of 1 queue element, which will be increased when we implement fragmented sends. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 103 ++++++++++++++++++++----------- 1 file changed, 68 insertions(+), 35 deletions(-) commit 83617317d2136ca18265955de7782c33be27ff62 Author: Benjamin Herrenschmidt Date: Mon Apr 10 11:15:20 2017 +1000 ftgmac100: Store tx skbs in a separate array Rather than in the descriptor. The descriptor is mapped non-cachable and rather slow to access. Since to do that we need to keep track of the tx "pointer" we also have no use of all the accesors to manipulate it, just open code it, it's as clear and will help when adding fragmented sends. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 59 +++++++++----------------------- 1 file changed, 16 insertions(+), 43 deletions(-) commit 9b0f7711d92bf44b727751a87373089a92031918 Author: Benjamin Herrenschmidt Date: Mon Apr 10 11:15:19 2017 +1000 ftgmac100: Pad small frames properly Rather than just transmitting garbage past the end of the small packet. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 3e427a3363edbc8416c36815c2f7de4621739273 Author: Benjamin Herrenschmidt Date: Mon Apr 10 11:15:18 2017 +1000 ftgmac100: Factor tx packet dropping path Use a simple goto to a drop path at the tail of the function, it will be used in a few more cases soon Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 43b25ee712f72ec3ad03285413b5515619744eeb Author: Benjamin Herrenschmidt Date: Mon Apr 10 11:15:17 2017 +1000 ftgmac100: Merge ftgmac100_xmit() into ftgmac100_hard_start_xmit() This will make subsequent rework of the tx path simpler Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 58 ++++++++++++++------------------ 1 file changed, 25 insertions(+), 33 deletions(-) commit 58e0c348712adcecf71f52877ba8c80341662076 Author: Benjamin Herrenschmidt Date: Mon Apr 10 11:15:16 2017 +1000 ftgmac100: Move ftgmac100_hard_start_xmit() around Move it below ftgmac100_xmit() and the rest of the tx path No code change. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 58 ++++++++++++++++---------------- 1 file changed, 29 insertions(+), 29 deletions(-) commit d3ca8fb180dbec81816299273b291533fa17df71 Author: Benjamin Herrenschmidt Date: Mon Apr 10 11:15:15 2017 +1000 ftgmac100: Add a tx timeout handler We have a reset task to reset our chip, use it. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit d54b6eeb553c89ed8d4c5a2ed73df374a45b9562 Author: Steven Rostedt (VMware) Date: Fri Apr 7 12:40:49 2017 -0400 tracing: Make sure rcu_irq_enter() can work for trace_*_rcuidle() trace events Stack tracing discovered that there's a small location inside the RCU infrastructure where calling rcu_irq_enter() does not work. As trace events use rcu_irq_enter() it must make sure that it is functionable. A check against rcu_irq_enter_disabled() is added with a WARN_ON_ONCE() as no trace event should ever be used in that part of RCU. If the warning is triggered, then the trace event is ignored. Restructure the __DO_TRACE() a bit to get rid of the prercu and postrcu, and just have an rcucheck that does the work from within the _DO_TRACE() macro. gcc optimization will compile out the rcucheck=0 case. Link: http://lkml.kernel.org/r/20170405093207.404f8deb@gandalf.local.home Acked-by: Mathieu Desnoyers Acked-by: Paul E. McKenney Signed-off-by: Steven Rostedt (VMware) include/linux/tracepoint.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 03ecd3f48e57f2e6154584e0ee7450d7a05e2d3b Author: Steven Rostedt (VMware) Date: Fri Apr 7 12:20:36 2017 -0400 rcu/tracing: Add rcu_disabled to denote when rcu_irq_enter() will not work Tracing uses rcu_irq_enter() as a way to make sure that RCU is watching when it needs to use rcu_read_lock() and friends. This is because tracing can happen as RCU is about to enter user space, or about to go idle, and RCU does not watch for RCU read side critical sections as it makes the transition. There is a small location within the RCU infrastructure that rcu_irq_enter() itself will not work. If tracing were to occur in that section it will break if it tries to use rcu_irq_enter(). Originally, this happens with the stack_tracer, because it will call save_stack_trace when it encounters stack usage that is greater than any stack usage it had encountered previously. There was a case where that happened in the RCU section where rcu_irq_enter() did not work, and lockdep complained loudly about it. To fix it, stack tracing added a call to be disabled and RCU would disable stack tracing during the critical section that rcu_irq_enter() was inoperable. This solution worked, but there are other cases that use rcu_irq_enter() and it would be a good idea to let RCU give a way to let others know that rcu_irq_enter() will not work. For example, in trace events. Another helpful aspect of this change is that it also moves the per cpu variable called in the RCU critical section into a cache locale along with other RCU per cpu variables used in that same location. I'm keeping the stack_trace_disable() code, as that still could be used in the future by places that really need to disable it. And since it's only a static inline, it wont take up any kernel text if it is not used. Link: http://lkml.kernel.org/r/20170405093207.404f8deb@gandalf.local.home Acked-by: Paul E. McKenney Signed-off-by: Steven Rostedt (VMware) include/linux/rcupdate.h | 5 +++++ kernel/rcu/tree.c | 18 ++++++++++++++++-- kernel/trace/trace_stack.c | 8 ++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) commit a278d4718988a253a08d12e6d76c80979693d39e Author: Paul E. McKenney Date: Wed Apr 5 09:05:18 2017 -0700 rcu: Fix dyntick-idle tracing The tracing subsystem started using rcu_irq_entry() and rcu_irq_exit() (with my blessing) to allow the current _rcuidle alternative tracepoint name to be dispensed with while still maintaining good performance. Unfortunately, this causes RCU's dyntick-idle entry code's tracing to appear to RCU like an interrupt that occurs where RCU is not designed to handle interrupts. This commit fixes this problem by moving the zeroing of ->dynticks_nesting after the offending trace_rcu_dyntick() statement, which narrows the window of vulnerability to a pair of adjacent statements that are now marked with comments to that effect. Link: http://lkml.kernel.org/r/20170405093207.404f8deb@gandalf.local.home Link: http://lkml.kernel.org/r/20170405193928.GM1600@linux.vnet.ibm.com Reported-by: Steven Rostedt Signed-off-by: Paul E. McKenney Signed-off-by: Steven Rostedt (VMware) kernel/rcu/tree.c | 48 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 25 deletions(-) commit 8aaf1ee70e19ac74cbbb81098edfa328d1ab4bd7 Author: Steven Rostedt (VMware) Date: Thu Apr 6 15:47:32 2017 -0400 tracing: Rename trace_active to disable_stack_tracer and inline its modification In order to eliminate a function call, make "trace_active" into "disable_stack_tracer" and convert stack_tracer_disable() and friends into static inline functions. Acked-by: Paul E. McKenney Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 36 +++++++++++++++++++++++++++++++-- kernel/trace/trace_stack.c | 50 +++++++++------------------------------------- 2 files changed, 43 insertions(+), 43 deletions(-) commit 570c70a60f53ca737ead4e5966c446bf0d39fac9 Author: Fabio Estevam Date: Wed Apr 5 11:32:34 2017 -0300 ASoC: sgtl5000: Allow LRCLK pad drive strength to be changed Introduce the "lrclk-strength" property to allow LRCLK pad drive strength to be changed via device tree. When running a stress playback loop test on a mx6dl wandboard channel swap can be noticed on about 10% of the times. While debugging this issue I noticed that when probing the SGTL5000 LRCLK pin with the scope the swap did not happen. After removing the probe the swap started to happen again. After changing the LRCLK pad drive strength to the maximum value the issue is gone. Same fix works on a mx6dl Colibri board as well. Signed-off-by: Fabio Estevam Tested-by: Max Krummenacher Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/sgtl5000.txt | 9 +++++++++ sound/soc/codecs/sgtl5000.c | 19 ++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) commit ae1713e296449caf820635d384a99936ce281a71 Author: Artur Paszkiewicz Date: Tue Apr 4 13:13:58 2017 +0200 raid5-ppl: partial parity calculation optimization In case of read-modify-write, partial partity is the same as the result of ops_run_prexor5(), so we can just copy sh->dev[pd_idx].page into sh->ppl_page instead of calculating it again. Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li drivers/md/raid5-ppl.c | 20 ++++++++++---------- drivers/md/raid5.c | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) commit 845b9e229fe0716ab6b4d94b4364c99069667b59 Author: Artur Paszkiewicz Date: Tue Apr 4 13:13:57 2017 +0200 raid5-ppl: use resize_stripes() when enabling or disabling ppl Use resize_stripes() instead of raid5_reset_stripe_cache() to allocate or free sh->ppl_page at runtime for all stripes in the stripe cache. raid5_reset_stripe_cache() required suspending the mddev and could deadlock because of GFP_KERNEL allocations. Move the 'newsize' check to check_reshape() to allow reallocating the stripes with the same number of disks. Allocate sh->ppl_page in alloc_stripe() instead of grow_buffers(). Pass 'struct r5conf *conf' as a parameter to alloc_stripe() because it is needed to check whether to allocate ppl_page. Add free_stripe() and use it to free stripes rather than directly call kmem_cache_free(). Also free sh->ppl_page in free_stripe(). Set MD_HAS_PPL at the end of ppl_init_log() instead of explicitly setting it in advance and add another parameter to log_init() to allow calling ppl_init_log() without the bit set. Don't try to calculate partial parity or add a stripe to log if it does not have ppl_page set. Enabling ppl can now be performed without suspending the mddev, because the log won't be used until new stripes are allocated with ppl_page. Calling mddev_suspend/resume is still necessary when disabling ppl, because we want all stripes to finish before stopping the log, but resize_stripes() can be called after mddev_resume() when ppl is no longer active. Suggested-by: NeilBrown Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li drivers/md/raid5-log.h | 5 +-- drivers/md/raid5-ppl.c | 3 +- drivers/md/raid5.c | 88 ++++++++++++++++++++++---------------------------- 3 files changed, 43 insertions(+), 53 deletions(-) commit 94568f64af50bb37c418b200449698cfe7e1da5f Author: Artur Paszkiewicz Date: Tue Apr 4 13:13:56 2017 +0200 raid5-ppl: move no_mem_stripes to struct ppl_conf Use a single no_mem_stripes list instead of per member device lists for handling stripes that need retrying in case of failed io_unit allocation. Because io_units are allocated from a memory pool shared between all member disks, the no_mem_stripes list should be checked when an io_unit for any member is freed. This fixes a deadlock that could happen if there are stripes in more than one no_mem_stripes list. Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li drivers/md/raid5-ppl.c | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) commit d7344010d183ad62d1ababca3beb9553cf5e1546 Author: Bard Liao Date: Fri Apr 7 11:26:41 2017 +0800 ASoC: jack: add snd_soc_codec_set_jack There are many codecs with the capability of jack detection. Usually, we create a jack on machine driver but there is no common function for machine driver to deliver the jack pointer to codec driver. snd_soc_codec_set_jack can be used for delivering the jack pointer to codec driver and enable the jack detection function. To make it work, codec driver need to define a callback function to receive the jack pointer and do all necessary procedure for enabling jack detection. Signed-off-by: Bard Liao Signed-off-by: Mark Brown include/sound/soc.h | 4 ++++ sound/soc/soc-jack.c | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) commit 0bf750f4cbe1406d8819cbec2a3ff6beeb824617 Author: Andy Green Date: Fri Mar 31 15:06:00 2017 -0700 ASoC: hisilicon: Add hi6210 i2s audio driver Add driver for hi6210 i2s controller found on hi6220 boards. Signed-off-by: Andy Green [jstultz: Forward ported to mainline, fairly major rework based on suggestions from Mark Brown] Signed-off-by: John Stultz Signed-off-by: Mark Brown sound/soc/Kconfig | 1 + sound/soc/Makefile | 1 + sound/soc/hisilicon/Kconfig | 5 + sound/soc/hisilicon/Makefile | 1 + sound/soc/hisilicon/hi6210-i2s.c | 628 +++++++++++++++++++++++++++++++++++++++ sound/soc/hisilicon/hi6210-i2s.h | 276 +++++++++++++++++ 6 files changed, 912 insertions(+) commit 9e615f63cbafa2147fd302ab495d7b785306bc26 Author: John Stultz Date: Fri Mar 31 15:05:59 2017 -0700 ASoC: add hi6210-i2s DT bindings Adds DT bindings documentation for the hi6210-i2s driver. Signed-off-by: John Stultz Signed-off-by: Mark Brown .../bindings/sound/hisilicon,hi6210-i2s.txt | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 5367278cb7ba74537bcad1470d75f30d95b09c14 Author: Steven Rostedt (VMware) Date: Thu Apr 6 12:26:20 2017 -0400 tracing: Add stack_tracer_disable/enable() functions There are certain parts of the kernel that cannot let stack tracing proceed (namely in RCU), because the stack tracer uses RCU, and parts of RCU internals cannot handle having RCU read side locks taken. Add stack_tracer_disable() and stack_tracer_enable() functions to let RCU stop stack tracing on the current CPU when it is in those critical sections. Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 6 ++++++ kernel/trace/trace_stack.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit 252babcd52aabe37aaad03685e7d6ad454edb9f9 Author: Steven Rostedt (VMware) Date: Thu Apr 6 12:11:36 2017 -0400 tracing: Replace the per_cpu() with __this_cpu*() in trace_stack.c The updates to the trace_active per cpu variable can be updated with the __this_cpu_*() functions as it only gets updated on the CPU that the variable is on. Thanks to Paul McKenney for suggesting __this_cpu_* instead of this_cpu_*. Acked-by: Paul E. McKenney Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_stack.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) commit ac37f761ce80386f8a8f11a181c7ce3f9695a9ca Author: Kumar Gala Date: Thu Apr 6 03:29:27 2017 -0500 of: Add vendor prefix for Nordic Semiconductor Nordic Semiconductor is a semiconductor company specializing in ARM Cortex-M based SoCs for low-power wireless communication, especially Bluetooth. Signed-off-by: Kumar Gala Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 0c9d5b127f695818c2c5a3868c1f28ca2969e905 Author: NeilBrown Date: Thu Apr 6 12:06:37 2017 +1000 md/raid1: avoid reusing a resync bio after error handling. fix_sync_read_error() modifies a bio on a newly faulty device by setting bi_end_io to end_sync_write. This ensure that put_buf() will still call rdev_dec_pending() as required, but makes sure that subsequent code in fix_sync_read_error() doesn't try to read from the device. Unfortunately this interacts badly with sync_request_write() which assumes that any bio with bi_end_io set to non-NULL other than end_sync_read is safe to write to. As the device is now faulty it doesn't make sense to write. As the bio was recently used for a read, it is "dirty" and not suitable for immediate submission. In particular, ->bi_next might be non-NULL, which will cause generic_make_request() to complain. Break this interaction by refusing to write to devices which are marked as Faulty. Reported-and-tested-by: Michael Wang Fixes: 2e52d449bcec ("md/raid1: add failfast handling for reads.") Cc: stable@vger.kernel.org (v4.10+) Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid1.c | 2 ++ 1 file changed, 2 insertions(+) commit 4aed35ca73f6d9cfd5f7089ba5d04f5fb8623080 Author: Hans Verkuil Date: Mon Apr 10 04:54:30 2017 -0300 [media] v4l2-tpg: don't clamp XV601/709 to lim range The XV601/709 encodings are special: they signal limited range, but use the full range to encode a larger gamut with R', G' and B' values outside the [0-1] range. So don't clamp to limited range for these two encodings. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 86c7eb411b2450dafee3b0ec5c4c191f83e6511f Author: Hans Verkuil Date: Mon Apr 10 04:51:44 2017 -0300 [media] videodev2.h: fix outdated comment The XV601/709 Y'CbCr encoding was changed to limited range, but the comment still indicates full range. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/videodev2.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bd742c6586401de18d2009dc891cb75ab7fdd795 Author: Geliang Tang Date: Sat Apr 8 22:34:08 2017 -0300 [media] imon: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/imon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 729dee30ddba1b3d110c5bc328f66c47babccf4e Author: Geliang Tang Date: Sat Apr 8 22:34:07 2017 -0300 [media] wl128x: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/wl128x/fmdrv_common.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 13bfc6728ff71d9e4278d4e57292a25cee527d27 Author: Geliang Tang Date: Sat Apr 8 22:34:06 2017 -0300 [media] c8sectpfe: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8ae73ed6080651909e214d9741b5643b74cb499b Author: Geliang Tang Date: Sat Apr 8 22:34:04 2017 -0300 [media] fsl-viu: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/fsl-viu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b4e80f3c45c061bcf67b0ff90fd0bd4ce3b7a8b4 Author: Geliang Tang Date: Sat Apr 8 22:34:03 2017 -0300 [media] av7110: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ttpci/av7110_ir.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 20bdb04d9582249309d7b99a4c38c21d591bc8bc Author: Geliang Tang Date: Sat Apr 8 22:34:02 2017 -0300 [media] netup_unidvb: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b670883bb9e55ba63a278d83e034faefc01ce2cf Author: Zhilong Liu Date: Mon Apr 10 14:15:55 2017 +0800 md.c:didn't unlock the mddev before return EINVAL in array_size_store md.c: it needs to release the mddev lock before the array_size_store() returns. Fixes: ab5a98b132fd ("md-cluster: change array_sectors and update size are not supported") Signed-off-by: Zhilong Liu Reviewed-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f563607ae97d8b1a1f8fff6f975e5ed23ae9a70e Author: Geliang Tang Date: Sat Apr 8 22:34:01 2017 -0300 [media] ivtv: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ivtv/ivtv-driver.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c6682fedee47e3914af366f876728b3f77ba0272 Author: Fabio Estevam Date: Wed Apr 5 16:44:06 2017 -0300 ASoC: fsl_ssi: Use the tolower() function Code can be simplified by using the standard tolower() funtion. Signed-off-by: Fabio Estevam Acked-by: Timur Tabi Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 580556774ad33adf427765d560f95f66cb01c295 Author: Fabio Estevam Date: Wed Apr 5 16:44:05 2017 -0300 ASoC: fsl_ssi: Remove FSLSSI_I2S_RATES definition The comment for the FSLSSI_I2S_RATES definition states that the driver currently only supports I2S slave mode, which is no longer correct. As FSLSSI_I2S_RATES is the same as the standard SNDRV_PCM_RATE_CONTINUOUS, just remove its definition and its comments to make the code simpler. Signed-off-by: Fabio Estevam Acked-by: Timur Tabi Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit d720e055945ca039939b2a857b7c54d22de9dff7 Author: Geliang Tang Date: Sat Apr 8 22:34:00 2017 -0300 [media] cx18: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx18/cx18-streams.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 065e519e71b2c1f41936cce75b46b5ab34adb588 Author: NeilBrown Date: Thu Apr 6 11:16:33 2017 +0800 md: MD_CLOSING needs to be cleared after called md_set_readonly or do_md_stop if called md_set_readonly and set MD_CLOSING bit, the mddev cannot be opened any more due to the MD_CLOING bit wasn't cleared. Thus it needs to be cleared in md_ioctl after any call to md_set_readonly() or do_md_stop(). Signed-off-by: NeilBrown Fixes: af8d8e6f0315 ("md: changes for MD_STILL_CLOSED flag") Cc: stable@vger.kernel.org (v4.9+) Signed-off-by: Zhilong Liu Signed-off-by: Shaohua Li drivers/md/md.c | 5 +++++ 1 file changed, 5 insertions(+) commit 60221ffd8710b038ed147f991c68a97459a8f738 Author: Geliang Tang Date: Sat Apr 8 22:33:59 2017 -0300 [media] bt8xx: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/bt8xx/bttv-driver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d5d116c4db4f98e818e664fd62d011062e25b12e Author: Geliang Tang Date: Sat Apr 8 22:33:58 2017 -0300 [media] saa7146: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/saa7146/saa7146_vbi.c | 5 ++--- drivers/media/common/saa7146/saa7146_video.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) commit 9e2abdd5bad651983358e5aef21892644a2683f6 Author: Geliang Tang Date: Sat Apr 8 22:33:57 2017 -0300 [media] saa7134: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/saa7134/saa7134-ts.c | 5 ++--- drivers/media/pci/saa7134/saa7134-vbi.c | 5 ++--- drivers/media/pci/saa7134/saa7134-video.c | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) commit eef04f82783d6cc712c899cff81e56c384dc06ac Author: Nikola Jelic Date: Sat Apr 8 12:44:41 2017 -0300 [media] media: bcm2048: fix several macros Some of the macros didn't use the parenthesis around the parameters when used in the body of the macro. Signed-off-by: Nikola Jelic Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/bcm2048/radio-bcm2048.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 41309271448e559afe208f1e89d4d30b83259678 Author: Alexey Khoroshilov Date: Fri Apr 7 20:09:17 2017 -0300 [media] m2m-deinterlace: don't return zero on failure paths in deinterlace_probe() If DMA does not support INTERLEAVE, deinterlace_probe() breaks off initialization, releases dma channel, but returns zero. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/m2m-deinterlace.c | 1 + 1 file changed, 1 insertion(+) commit 9d826ce8122fc634c1b67bc6f8985ccfbd565d86 Author: Philipp Zabel Date: Thu Apr 6 11:03:40 2017 -0300 [media] coda: do not enumerate YUYV if VDOA is not available TRY_FMT already disables the YUYV format if the VDOA is not available. ENUM_FMT must do the same. Fixes: d40e98c13b3e ("[media] coda: support YUYV output if VDOA is used") Signed-off-by: Philipp Zabel Reviewed-by: Lucas Stach Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0866df8dffd514185bfab0d205db76e4c02cf1e4 Author: Philipp Zabel Date: Fri Mar 31 10:33:26 2017 -0300 [media] tvp5150: fix pad format frame height Even if field order is set to V4L2_FIELD_ALTERNATE, the width and height values in struct v4l2_mbus_framefmt still refer to frame size, not field size. Fixes: 4f57d27be2a5 ("[media] tvp5150: fix tvp5150_fill_fmt()") Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tvp5150.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f724c408a7bcf25609f6a0102b835d5970cadd3 Author: Tony Camuso Date: Mon Apr 10 12:22:13 2017 -0400 ipmi_si: use smi_num for init_name Commit 1abf71e moved the creation of new_smi->dev to earlier in the init sequence in order to provide infrastructure for log printing. However, the init_name was created with a hard-coded value of zero. This presents a problem in systems with more than one interface, producing a call trace in dmesg. To correct the problem, simply use smi_num instead of the hard-coded value of zero. Tested on a lenovo x3950. Signed-off-by: Tony Camuso There was actually a more general problem, the platform device wasn't being set correctly, either, and there was a possible (though extremely unlikely) race on smi_num. Add locks to clean up the race and use the proper value for the platform device, too. Tested on qemu in various configurations. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 6f287ca6046edd34ed83aafb7f9033c9c2e809e2 Author: Guoqing Jiang Date: Thu Apr 6 09:12:18 2017 +0800 md/raid10: reset the 'first' at the end of loop We need to set "first = 0' at the end of rdev_for_each loop, so we can get the array's min_offset_diff correctly otherwise min_offset_diff just means the last rdev's offset diff. Suggested-by: NeilBrown Signed-off-by: Guoqing Jiang Reviewed-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid10.c | 2 ++ 1 file changed, 2 insertions(+) commit f6f0e2f5d79dc2ff6eb63b890276d4f4284f6d57 Author: Philipp Zabel Date: Fri Mar 31 10:33:25 2017 -0300 [media] tvp5150: allow get/set_fmt on the video source pad To let userspace propagate formats downstream in a media controller scenario, the video source pad (now pad 1, DEMOD_PAD_VID_OUT) must allow setting and getting the format. Incidentally, tvp5150_fill_fmt was implemented for this pad, not for the new analog input pad (now pad 0, DEMOD_PAD_IF_INPUT). Fixes: 55606310e77f ("[media] tvp5150: create the expected number of pads") Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tvp5150.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 678bc0adf7aaa0ea6cb7929697e436def5ac0aec Author: Colin Ian King Date: Thu Mar 23 08:57:46 2017 -0300 [media] coda: remove redundant call to v4l2_m2m_get_vq The call to v4ls_m2m_get_vq is only used to get the return value which is not being used, so it appears to be redundant and can be removed. Detected with CoverityScan, CID#1420674 ("Useless call") Signed-off-by: Colin Ian King Acked-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 2 -- 1 file changed, 2 deletions(-) commit 7471fb77ce4dc4cb81291189947fcdf621a97987 Author: NeilBrown Date: Mon Apr 3 12:11:32 2017 +1000 md/raid6: Fix anomily when recovering a single device in RAID6. When recoverying a single missing/failed device in a RAID6, those stripes where the Q block is on the missing device are handled a bit differently. In these cases it is easy to check that the P block is correct, so we do. This results in the P block be destroy. Consequently the P block needs to be read a second time in order to compute Q. This causes lots of seeks and hurts performance. It shouldn't be necessary to re-read P as it can be computed from the DATA. But we only compute blocks on missing devices, since c337869d9501 ("md: do not compute parity unless it is on a failed drive"). So relax the change made in that commit to allow computing of the P block in a RAID6 which it is the only missing that block. This makes RAID6 recovery run much faster as the disk just "before" the recovering device is no longer seeking back-and-forth. Reported-by-tested-by: Brad Campbell Reviewed-by: Dan Williams Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid5.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit a9b99bbedae6f861de3be635bdc9382e1e29a4f9 Author: Hans Verkuil Date: Thu Nov 24 05:49:35 2016 -0200 [media] em28xx: drop last soc_camera link The em28xx driver still used the soc_camera.h header for the ov2640 driver. Since this driver no longer uses soc_camera, that include can be removed. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-camera.c | 9 --------- 1 file changed, 9 deletions(-) commit ff0e9c1d6de4728d2a7cbc98fe188094599b5c8b Author: Hans Verkuil Date: Mon Jan 30 11:50:45 2017 -0200 [media] ov2640: add MC support The MC support is needed by the em28xx driver. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 4ffa3c977b5da2907eb294dc6d0259a02f2284aa Author: Jiri Olsa Date: Mon Apr 10 16:52:32 2017 +0200 x86/intel_rdt: Add cpus_list rdtgroup file The resource control filesystem provides only a bitmask based cpus file for assigning CPUs to a resource group. That's cumbersome with large cpumasks and non-intuitive when modifying the file from the command line. Range based cpu lists are commonly used along with bitmask based cpu files in various subsystems throughout the kernel. Add 'cpus_list' file which is CPU range based. # cd /sys/fs/resctrl/ # echo 1-10 > krava/cpus_list # cat krava/cpus_list 1-10 # cat krava/cpus 0007fe # cat cpus fffff9 # cat cpus_list 0,3-23 [ tglx: Massaged changelog and replaced "bitmask lists" by "CPU ranges" ] Signed-off-by: Jiri Olsa Cc: Fenghua Yu Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Shaohua Li Link: http://lkml.kernel.org/r/20170410145232.GF25354@krava Signed-off-by: Thomas Gleixner Documentation/x86/intel_rdt_ui.txt | 3 +++ arch/x86/include/asm/intel_rdt.h | 5 +++++ arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 29 +++++++++++++++++++++++++---- 3 files changed, 33 insertions(+), 4 deletions(-) commit 46796cfcd346a70af679d1e7126db6774d440c6f Author: Hans Verkuil Date: Thu Nov 24 05:41:42 2016 -0200 [media] ov2640: use standard clk and enable it Convert v4l2_clk to normal clk and enable the clock. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Acked-by: Hugues Fruchet Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit 34aa88790bad73ab9e41218a3874b794912f3a3d Author: Hans Verkuil Date: Tue Nov 22 14:44:37 2016 -0200 [media] ov2640: convert from soc-camera to a standard subdev sensor driver Convert ov2640 to a standard subdev driver. The soc-camera driver no longer uses this driver, so it can safely be converted. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Acked-by: Hugues Fruchet Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 11 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/ov2640.c | 1136 +++++++++++++++++++++++++++++++ drivers/media/i2c/soc_camera/Kconfig | 6 - drivers/media/i2c/soc_camera/Makefile | 1 - drivers/media/i2c/soc_camera/ov2640.c | 1195 --------------------------------- 6 files changed, 1148 insertions(+), 1202 deletions(-) commit 17f8ba1dca072ce66c25b9e74ea2500b029594a0 Author: Thomas Gleixner Date: Mon Apr 10 11:50:11 2017 +0200 x86/intel_rdt: Cleanup kernel-doc The kernel-doc is inconsistently formatted. Fix it up. Signed-off-by: Thomas Gleixner Cc: Fenghua Yu Cc: Tony Luck Cc: Vikas Shivappa arch/x86/include/asm/intel_rdt.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 0c08aaf873174c95e674cf21ffcd041c589d2e5b Author: Vincent Stehlé Date: Sun Apr 9 22:05:05 2017 +0200 regulator: isl9305: fix array size ISL9305_MAX_REGULATOR is the last index used to access the init_data[] array, so we need to add one to this last index to obtain the necessary array size. This fixes the following smatch error: drivers/regulator/isl9305.c:160 isl9305_i2c_probe() error: buffer overflow 'pdata->init_data' 3 <= 3 Fixes: dec38b5ce6a9edb4 ("regulator: isl9305: Add Intersil ISL9305/H driver") Signed-off-by: Vincent Stehlé Cc: Mark Brown Signed-off-by: Mark Brown include/linux/platform_data/isl9305.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9dee7a72d0c7cdfa2573c48b1e5f928c721d54d5 Author: Matthias Kaehlcke Date: Fri Apr 7 12:51:58 2017 -0700 regulator: Add driver for voltage controlled regulators The output voltage of a voltage controlled regulator can be controlled through the voltage of another regulator. The current version of this driver assumes that the output voltage is a linear function of the control voltage. Signed-off-by: Matthias Kaehlcke Acked-by: Rob Herring Signed-off-by: Mark Brown .../devicetree/bindings/regulator/vctrl.txt | 49 ++ drivers/regulator/Kconfig | 7 + drivers/regulator/Makefile | 1 + drivers/regulator/vctrl-regulator.c | 546 +++++++++++++++++++++ 4 files changed, 603 insertions(+) commit 25ea8207abb80652629670095d4a2e06915c4cd2 Author: Tony Lindgren Date: Mon Apr 10 09:29:40 2017 -0700 ARM: omap2plus_defconfig: Enable droid 4 devices We only need to have MFD_CPCAP and CPCAP_REGULATOR as built-in to be able to mount root on the eMMC. And then POWER_RESET_GPIO is good to have built-in. The rest of the devices can be loadable modules. This gets various devices such as regulators, touchscreen, power button, HDMI audio, LEDs, RTC, and ADC working. Note that omapdrm needs to be configured manually as we're still using omapfb by default. Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 70d1e8a989cec5b742ecffc139c105f4f661289e Author: Tony Lindgren Date: Mon Apr 10 09:29:27 2017 -0700 ARM: omap2plus_defconfig: Add QMI, ACM and PPP as loadable modules We have devices with modems connected, so let's make them usable. Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 583da48e388f472e8818d9bb60ef6a1d40ee9f9d Author: Dennis Yang Date: Wed Mar 29 15:46:13 2017 +0800 md: update slab_cache before releasing new stripes when stripes resizing When growing raid5 device on machine with small memory, there is chance that mdadm will be killed and the following bug report can be observed. The same bug could also be reproduced in linux-4.10.6. [57600.075774] BUG: unable to handle kernel NULL pointer dereference at (null) [57600.083796] IP: [] _raw_spin_lock+0x7/0x20 [57600.110378] PGD 421cf067 PUD 4442d067 PMD 0 [57600.114678] Oops: 0002 [#1] SMP [57600.180799] CPU: 1 PID: 25990 Comm: mdadm Tainted: P O 4.2.8 #1 [57600.187849] Hardware name: To be filled by O.E.M. To be filled by O.E.M./MAHOBAY, BIOS QV05AR66 03/06/2013 [57600.197490] task: ffff880044e47240 ti: ffff880043070000 task.ti: ffff880043070000 [57600.204963] RIP: 0010:[] [] _raw_spin_lock+0x7/0x20 [57600.213057] RSP: 0018:ffff880043073810 EFLAGS: 00010046 [57600.218359] RAX: 0000000000000000 RBX: 000000000000000c RCX: ffff88011e296dd0 [57600.225486] RDX: 0000000000000001 RSI: ffffe8ffffcb46c0 RDI: 0000000000000000 [57600.232613] RBP: ffff880043073878 R08: ffff88011e5f8170 R09: 0000000000000282 [57600.239739] R10: 0000000000000005 R11: 28f5c28f5c28f5c3 R12: ffff880043073838 [57600.246872] R13: ffffe8ffffcb46c0 R14: 0000000000000000 R15: ffff8800b9706a00 [57600.253999] FS: 00007f576106c700(0000) GS:ffff88011e280000(0000) knlGS:0000000000000000 [57600.262078] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [57600.267817] CR2: 0000000000000000 CR3: 00000000428fe000 CR4: 00000000001406e0 [57600.274942] Stack: [57600.276949] ffffffff8114ee35 ffff880043073868 0000000000000282 000000000000eb3f [57600.284383] ffffffff81119043 ffff880043073838 ffff880043073838 ffff88003e197b98 [57600.291820] ffffe8ffffcb46c0 ffff88003e197360 0000000000000286 ffff880043073968 [57600.299254] Call Trace: [57600.301698] [] ? cache_flusharray+0x35/0xe0 [57600.307523] [] ? __page_cache_release+0x23/0x110 [57600.313779] [] kmem_cache_free+0x63/0xc0 [57600.319344] [] drop_one_stripe+0x62/0x90 [57600.324915] [] raid5_cache_scan+0x8b/0xb0 [57600.330563] [] shrink_slab.part.36+0x19a/0x250 [57600.336650] [] shrink_zone+0x23c/0x250 [57600.342039] [] do_try_to_free_pages+0x153/0x420 [57600.348210] [] try_to_free_pages+0x91/0xa0 [57600.353959] [] __alloc_pages_nodemask+0x4d1/0x8b0 [57600.360303] [] check_reshape+0x62b/0x770 [57600.365866] [] raid5_check_reshape+0x55/0xa0 [57600.371778] [] update_raid_disks+0xc7/0x110 [57600.377604] [] md_ioctl+0xd83/0x1b10 [57600.382827] [] blkdev_ioctl+0x170/0x690 [57600.388307] [] block_ioctl+0x38/0x40 [57600.393525] [] do_vfs_ioctl+0x2b5/0x480 [57600.399010] [] ? vfs_write+0x14b/0x1f0 [57600.404400] [] SyS_ioctl+0x3c/0x70 [57600.409447] [] entry_SYSCALL_64_fastpath+0x12/0x6a [57600.415875] Code: 00 00 00 00 55 48 89 e5 8b 07 85 c0 74 04 31 c0 5d c3 ba 01 00 00 00 f0 0f b1 17 85 c0 75 ef b0 01 5d c3 90 31 c0 ba 01 00 00 00 0f b1 17 85 c0 75 01 c3 55 89 c6 48 89 e5 e8 85 d1 63 ff 5d [57600.435460] RIP [] _raw_spin_lock+0x7/0x20 [57600.441208] RSP [57600.444690] CR2: 0000000000000000 [57600.448000] ---[ end trace cbc6b5cc4bf9831d ]--- The problem is that resize_stripes() releases new stripe_heads before assigning new slab cache to conf->slab_cache. If the shrinker function raid5_cache_scan() gets called after resize_stripes() starting releasing new stripes but right before new slab cache being assigned, it is possible that these new stripe_heads will be freed with the old slab_cache which was already been destoryed and that triggers this bug. Signed-off-by: Dennis Yang Fixes: edbe83ab4c27 ("md/raid5: allow the stripe_cache to grow and shrink.") Cc: stable@vger.kernel.org (4.1+) Reviewed-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid5.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ee044f5be17fdba92b41ac68f136039bfce1d32b Author: Hans Verkuil Date: Tue Apr 4 13:43:33 2017 -0300 [media] cec: fix confusing CEC_CAP_RC and IS_REACHABLE(CONFIG_RC_CORE) code It is a bit confusing how CEC_CAP_RC and IS_REACHABLE(CONFIG_RC_CORE) interact. By stripping CEC_CAP_RC at the beginning rather than after #else it should be a bit clearer what is going on. Signed-off-by: Hans Verkuil Reported-by: Lee Jones Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 43c0c03961d0b19bd225a336897606b46e0021a6 Author: Lee Jones Date: Tue Apr 4 09:32:19 2017 -0300 [media] cec: Fix runtime BUG when (CONFIG_RC_CORE && !CEC_CAP_RC) Currently when the RC Core is enabled (reachable) core code located in cec_register_adapter() attempts to populate the RC structure with a pointer to the 'parent' passed in by the caller. Unfortunately if the caller did not specify RC capability when calling cec_allocate_adapter(), then there will be no RC structure to populate. This causes a "NULL pointer dereference" error. Fixes: f51e80804f0 ("[media] cec: pass parent device in register(), not allocate()") Signed-off-by: Lee Jones Cc: # for v4.10 and up Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a93d429b51fbd5c3406bd1bc1f2bdf5f009d098b Author: Hans Verkuil Date: Tue Dec 13 12:37:16 2016 -0200 [media] s5p-cec: add cec-notifier support, move out of staging By using the CEC notifier framework there is no longer any reason to manually set the physical address. This was the one blocking issue that prevented this driver from going out of staging, so do this move as well. Update the bindings documenting the new hdmi phandle and update exynos4.dtsi accordingly. Tested with my Odroid U3. Signed-off-by: Hans Verkuil Tested-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski CC: linux-samsung-soc@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 10 + drivers/media/platform/Makefile | 1 + drivers/media/platform/s5p-cec/Makefile | 2 + drivers/media/platform/s5p-cec/exynos_hdmi_cec.h | 37 +++ .../media/platform/s5p-cec/exynos_hdmi_cecctrl.c | 208 ++++++++++++++ drivers/media/platform/s5p-cec/regs-cec.h | 96 +++++++ drivers/media/platform/s5p-cec/s5p_cec.c | 305 +++++++++++++++++++++ drivers/media/platform/s5p-cec/s5p_cec.h | 79 ++++++ drivers/staging/media/Kconfig | 2 - drivers/staging/media/Makefile | 1 - drivers/staging/media/s5p-cec/Kconfig | 9 - drivers/staging/media/s5p-cec/Makefile | 2 - drivers/staging/media/s5p-cec/TODO | 7 - drivers/staging/media/s5p-cec/exynos_hdmi_cec.h | 37 --- .../staging/media/s5p-cec/exynos_hdmi_cecctrl.c | 208 -------------- drivers/staging/media/s5p-cec/regs-cec.h | 96 ------- drivers/staging/media/s5p-cec/s5p_cec.c | 280 ------------------- drivers/staging/media/s5p-cec/s5p_cec.h | 76 ----- 18 files changed, 738 insertions(+), 718 deletions(-) commit efaedd17a3de6e5e263c784d5a37730b2f42fa7c Author: Hans Verkuil Date: Tue Dec 13 12:37:16 2016 -0200 [media] s5p-cec.txt: document the HDMI controller phandle Update the bindings documenting the new hdmi phandle. Signed-off-by: Hans Verkuil Acked-by: Krzysztof Kozlowski Acked-by: Rob Herring CC: linux-samsung-soc@vger.kernel.org CC: devicetree@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/s5p-cec.txt | 2 ++ 1 file changed, 2 insertions(+) commit dfa9739e64eee4688bff6b13dc446a0db4b75f06 Author: Hans Verkuil Date: Tue Dec 13 12:37:16 2016 -0200 [media] ARM: dts: exynos: add HDMI controller phandle to exynos4.dtsi Add the new hdmi phandle to exynos4.dtsi. This phandle is needed by the s5p-cec driver to initialize the CEC notifier framework. Tested with my Odroid U3. Signed-off-by: Hans Verkuil Tested-by: Marek Szyprowski CC: linux-samsung-soc@vger.kernel.org CC: devicetree@vger.kernel.org CC: Krzysztof Kozlowski Signed-off-by: Mauro Carvalho Chehab arch/arm/boot/dts/exynos4.dtsi | 1 + 1 file changed, 1 insertion(+) commit 278c811c5d058c47a0c2f57f57608555f6945f51 Author: Hans Verkuil Date: Tue Dec 13 11:07:17 2016 -0200 [media] exynos_hdmi: add CEC notifier support Implement the CEC notifier support to allow CEC drivers to be informed when there is a new physical address. Signed-off-by: Hans Verkuil Tested-by: Marek Szyprowski Acked-by: Daniel Vetter Acked-by: Krzysztof Kozlowski Reviewed-by: Andrzej Hajda Signed-off-by: Mauro Carvalho Chehab drivers/gpu/drm/exynos/exynos_hdmi.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit ed3022de6d2f8ae68589e1825b04c04e0011a030 Author: Benjamin Gaignard Date: Tue Jan 3 12:54:57 2017 -0200 [media] ARM: dts: STiH410: update sti-cec for CEC notifier support To use CEC notifier sti CEC driver needs to get phandle of the hdmi device. Signed-off-by: Benjamin Gaignard Signed-off-by: Hans Verkuil CC: Patrice CHOTARD Signed-off-by: Mauro Carvalho Chehab arch/arm/boot/dts/stih407-family.dtsi | 12 ------------ arch/arm/boot/dts/stih410.dtsi | 13 +++++++++++++ 2 files changed, 13 insertions(+), 12 deletions(-) commit fc4e009c6c986a8cc717dc070d65ccb60d7de91a Author: Benjamin Gaignard Date: Tue Jan 3 12:54:56 2017 -0200 [media] stih-cec: add CEC notifier support By using the CEC notifier framework there is no longer any reason to manually set the physical address. This was the one blocking issue that prevented this driver from going out of staging, so do this move as well. Signed-off-by: Benjamin Gaignard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 18 ++ drivers/media/platform/Makefile | 1 + drivers/media/platform/sti/cec/Makefile | 1 + drivers/media/platform/sti/cec/stih-cec.c | 404 ++++++++++++++++++++++++++++++ drivers/staging/media/Kconfig | 2 - drivers/staging/media/Makefile | 1 - drivers/staging/media/st-cec/Kconfig | 8 - drivers/staging/media/st-cec/Makefile | 1 - drivers/staging/media/st-cec/TODO | 7 - drivers/staging/media/st-cec/stih-cec.c | 379 ---------------------------- 10 files changed, 424 insertions(+), 398 deletions(-) commit 6e27ccce8c2f6092cb1564b651565d33bd35aec2 Author: Benjamin Gaignard Date: Tue Jan 3 12:54:56 2017 -0200 [media] stih-cec.txt: document new hdmi phandle Update the bindings documentation with the new hdmi phandle. Signed-off-by: Benjamin Gaignard Signed-off-by: Hans Verkuil Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/stih-cec.txt | 2 ++ 1 file changed, 2 insertions(+) commit bca55958ea8758327425a0b5c29770da870d32cb Author: Benjamin Gaignard Date: Tue Jan 3 12:54:55 2017 -0200 [media] sti: hdmi: add CEC notifier support Implement the CEC notifier support to allow CEC drivers to be informed when there is a new physical address. Signed-off-by: Benjamin Gaignard Signed-off-by: Hans Verkuil Acked-by: Daniel Vetter Signed-off-by: Mauro Carvalho Chehab drivers/gpu/drm/sti/sti_hdmi.c | 11 +++++++++++ drivers/gpu/drm/sti/sti_hdmi.h | 3 +++ 2 files changed, 14 insertions(+) commit e3a93adcc4f6c3b538f3d617fc48a87979d4548b Author: Hans Verkuil Date: Tue Dec 13 12:15:57 2016 -0200 [media] cec: integrate CEC notifier support Support the CEC notifier framework, simplifying drivers that depend on this. Signed-off-by: Hans Verkuil Tested-by: Marek Szyprowski Tested-by: Benjamin Gaignard Acked-by: Daniel Vetter Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-core.c | 22 ++++++++++++++++++++++ include/media/cec.h | 10 ++++++++++ 2 files changed, 32 insertions(+) commit 6917a7b774133d60e0cfd8f9ac8bb62ae6ba10aa Author: Hans Verkuil Date: Mon Nov 14 11:55:20 2016 -0200 [media] media: add CEC notifier support Add support for CEC notifiers, which is used to convey CEC physical address information from video drivers to their CEC counterpart driver(s). Based on an earlier version from Russell King: https://patchwork.kernel.org/patch/9277043/ The cec_notifier is a reference counted object containing the CEC physical address state of a video device. When a new notifier is registered the current state will be reported to that notifier at registration time. Signed-off-by: Hans Verkuil Tested-by: Marek Szyprowski Tested-by: Benjamin Gaignard Acked-by: Daniel Vetter Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 4 +- drivers/media/Kconfig | 4 ++ drivers/media/Makefile | 4 ++ drivers/media/cec-notifier.c | 129 +++++++++++++++++++++++++++++++++++++++++++ include/media/cec-notifier.h | 111 +++++++++++++++++++++++++++++++++++++ 5 files changed, 251 insertions(+), 1 deletion(-) commit 7480316c265c9fcdbf73b1b8dec061b893b7e987 Author: Takashi Iwai Date: Mon Apr 10 17:37:34 2017 +0200 ALSA: hda - Allow to enable/disable vmaster build explicitly Another preliminary patch for the dual-codec support: since the support of vmaster over multiple codecs is difficult, simply disable it by a new flag to hda_codec struct. A new user hint is added as well for consistency. Signed-off-by: Takashi Iwai Documentation/sound/hd-audio/notes.rst | 2 ++ sound/pci/hda/hda_generic.c | 7 +++++-- sound/pci/hda/hda_generic.h | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) commit 9f3dadb156692e15933a4a97ef659f65151be4a1 Author: Takashi Iwai Date: Mon Apr 10 17:12:33 2017 +0200 ALSA: hda - A new flag to enforce prefix to each pin This is a preliminary patch for a smooth multi-codec support, and it introduces a new flag, force_pin_prefix, to struct hda_codec. This flag is used to force to add the pin location prefix to each input pin. For example, when there is only one microphone pin, usually the auto-parser assigns the string "Mic". With this flag on, it'll be like "Front Mic". Also, the creation of "Master" or "PCM" playback volume for a single pin is suppressed, too. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195305 Signed-off-by: Takashi Iwai sound/pci/hda/hda_auto_parser.c | 1 + sound/pci/hda/hda_codec.h | 1 + sound/pci/hda/hda_generic.c | 2 ++ 3 files changed, 4 insertions(+) commit 0fc66c1949f93417f5995c623ad0876bbb1e6c60 Author: Antti Palosaari Date: Fri Mar 17 13:45:48 2017 -0300 [media] mn88472: implement PER statistics Implement DVBv5 PER. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/mn88472.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit c635a5e2cf66444b8904e0b253ea0869be697f92 Author: Antti Palosaari Date: Fri Mar 17 13:34:44 2017 -0300 [media] mn88472: implement cnr statistics Implement DVBv5 CNR. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/mn88472.c | 90 +++++++++++++++++++++++++++++- drivers/media/dvb-frontends/mn88472_priv.h | 1 + 2 files changed, 88 insertions(+), 3 deletions(-) commit 61d7c6aa4fc1e0b8d6696e1253a242f5de296b9a Author: Antti Palosaari Date: Fri Mar 17 12:43:06 2017 -0300 [media] mn88472: implement signal strength statistics Implement DVBv5 signal strength on relative scale. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/mn88472.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 0f314f6c2e77beb1a232be21dd6be4e1849ba5ac Author: Hans Verkuil Date: Sat Nov 5 08:39:58 2016 -0200 [media] rainshadow-cec: new RainShadow Tech HDMI CEC driver This driver supports the RainShadow Tech USB HDMI CEC adapter. See: http://rainshadowtech.com/HdmiCecUsb.html Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 7 + drivers/media/usb/Kconfig | 1 + drivers/media/usb/Makefile | 1 + drivers/media/usb/rainshadow-cec/Kconfig | 10 + drivers/media/usb/rainshadow-cec/Makefile | 1 + drivers/media/usb/rainshadow-cec/rainshadow-cec.c | 388 ++++++++++++++++++++++ 6 files changed, 408 insertions(+) commit 054c636e5c8054884ede889be82ce059879945e6 Author: Jan Kara Date: Wed Dec 21 18:06:12 2016 +0100 fsnotify: Move ->free_mark callback to fsnotify_ops Pointer to ->free_mark callback unnecessarily occupies one long in each fsnotify_mark although they are the same for all marks from one notification group. Move the callback pointer to fsnotify_ops. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/dnotify/dnotify.c | 3 ++- fs/notify/fanotify/fanotify.c | 6 ++++++ fs/notify/fanotify/fanotify.h | 1 + fs/notify/fanotify/fanotify_user.c | 9 ++------- fs/notify/inotify/inotify.h | 1 + fs/notify/inotify/inotify_fsnotify.c | 11 +++++++++++ fs/notify/inotify/inotify_user.c | 14 ++------------ fs/notify/mark.c | 13 +++++++------ include/linux/fsnotify_backend.h | 6 +++--- kernel/audit_fsnotify.c | 4 ++-- kernel/audit_tree.c | 4 ++-- kernel/audit_watch.c | 4 ++-- 12 files changed, 41 insertions(+), 35 deletions(-) commit 7b1293234084ddb6469c4e9a5ef818f399b5786b Author: Jan Kara Date: Wed Dec 21 18:32:48 2016 +0100 fsnotify: Add group pointer in fsnotify_init_mark() Currently we initialize mark->group only in fsnotify_add_mark_lock(). However we will need to access fsnotify_ops of corresponding group from fsnotify_put_mark() so we need mark->group initialized earlier. Do that in fsnotify_init_mark() which has a consequence that once fsnotify_init_mark() is called on a mark, the mark has to be destroyed by fsnotify_put_mark(). Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/dnotify/dnotify.c | 5 ++--- fs/notify/fanotify/fanotify_user.c | 4 ++-- fs/notify/inotify/inotify_user.c | 5 ++--- fs/notify/mark.c | 17 ++++++++++------- include/linux/fsnotify_backend.h | 12 +++++++----- kernel/audit_fsnotify.c | 7 ++++--- kernel/audit_tree.c | 15 ++++++++------- kernel/audit_watch.c | 5 +++-- 8 files changed, 38 insertions(+), 32 deletions(-) commit ebb3b47e37a4ccef33e6388589a21a5c23d6b40b Author: Jan Kara Date: Wed Dec 21 16:40:48 2016 +0100 fsnotify: Drop inode_mark.c inode_mark.c now contains only a single function. Move it to fs/notify/fsnotify.c and remove inode_mark.c. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/Makefile | 4 +-- fs/notify/fsnotify.c | 57 ++++++++++++++++++++++++++++++++ fs/notify/inode_mark.c | 88 -------------------------------------------------- 3 files changed, 59 insertions(+), 90 deletions(-) commit b1362edfe15b20edd3d116cec521aa420b7afb98 Author: Jan Kara Date: Wed Dec 21 16:28:45 2016 +0100 fsnotify: Remove fsnotify_find_{inode|vfsmount}_mark() These are very thin wrappers, just remove them. Drop fs/notify/vfsmount_mark.c as it is empty now. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/Makefile | 2 +- fs/notify/dnotify/dnotify.c | 4 ++-- fs/notify/fanotify/fanotify_user.c | 12 ++++++----- fs/notify/fsnotify.h | 4 ---- fs/notify/inode_mark.c | 10 --------- fs/notify/inotify/inotify_user.c | 2 +- fs/notify/vfsmount_mark.c | 42 -------------------------------------- include/linux/fsnotify_backend.h | 8 ++++---- kernel/audit_tree.c | 3 ++- kernel/audit_watch.c | 2 +- 10 files changed, 18 insertions(+), 71 deletions(-) commit 2e37c6ca8d76c362e844c0cf3ebe8ba2e27940cb Author: Jan Kara Date: Wed Jan 4 10:51:58 2017 +0100 fsnotify: Remove fsnotify_detach_group_marks() The function is already mostly contained in what fsnotify_clear_marks_by_group() does. Just update that function to not select marks when all of them should be destroyed and remove fsnotify_detach_group_marks(). Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fsnotify.h | 2 -- fs/notify/group.c | 9 +++++++- fs/notify/mark.c | 45 +++++++++------------------------------- include/linux/fsnotify_backend.h | 2 ++ 4 files changed, 20 insertions(+), 38 deletions(-) commit 18f2e0d3a43641889ac2ba9d7508d47359eec063 Author: Jan Kara Date: Wed Jan 4 10:33:18 2017 +0100 fsnotify: Rename fsnotify_clear_marks_by_group_flags() The _flags() suffix in the function name was more confusing than explaining so just remove it. Also rename the argument from 'flags' to 'type' to better explain what the function expects. Reviewed-by: Miklos Szeredi Suggested-by: Amir Goldstein Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/mark.c | 12 +++++------- include/linux/fsnotify_backend.h | 6 +++--- 2 files changed, 8 insertions(+), 10 deletions(-) commit 416bcdbcbbb4800f11f03e8baf570f9996219f67 Author: Jan Kara Date: Wed Dec 21 16:20:32 2016 +0100 fsnotify: Inline fsnotify_clear_{inode|vfsmount}_mark_group() Inline these helpers as they are very thin. We still keep them as we don't want to expose details about how list type is determined. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/inode_mark.c | 8 -------- fs/notify/vfsmount_mark.c | 5 ----- include/linux/fsnotify_backend.h | 14 ++++++++++---- 3 files changed, 10 insertions(+), 17 deletions(-) commit 8920d2734d9a1b68e1b53d8c12b289773cdbd971 Author: Jan Kara Date: Wed Dec 21 16:13:54 2016 +0100 fsnotify: Remove fsnotify_recalc_{inode|vfsmount}_mask() These helpers are just very thin wrappers now. Remove them. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fanotify/fanotify_user.c | 8 ++++---- fs/notify/inode_mark.c | 5 ----- fs/notify/inotify/inotify_user.c | 2 +- fs/notify/vfsmount_mark.c | 5 ----- include/linux/fsnotify_backend.h | 4 ---- 5 files changed, 5 insertions(+), 19 deletions(-) commit 66d2b81bcb92c14b22a56a9ff936f2b40accc83c Author: Jan Kara Date: Wed Dec 21 16:03:59 2016 +0100 fsnotify: Remove fsnotify_set_mark_{,ignored_}mask_locked() These helpers are now only a simple assignment and just obfuscate what is going on. Remove them. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/dnotify/dnotify.c | 9 +++------ fs/notify/fanotify/fanotify_user.c | 9 ++++----- fs/notify/inotify/inotify_user.c | 6 ++---- fs/notify/mark.c | 14 -------------- include/linux/fsnotify_backend.h | 4 ---- 5 files changed, 9 insertions(+), 33 deletions(-) commit 05f0e38724e8449184acd8fbf0473ee5a07adc6c Author: Jan Kara Date: Thu Nov 10 17:45:16 2016 +0100 fanotify: Release SRCU lock when waiting for userspace response When userspace task processing fanotify permission events screws up and does not respond, fsnotify_mark_srcu SRCU is held indefinitely which causes further hangs in the whole notification subsystem. Although we cannot easily solve the problem of operations blocked waiting for response from userspace, we can at least somewhat localize the damage by dropping SRCU lock before waiting for userspace response and reacquiring it when userspace responds. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fanotify/fanotify.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 9385a84d7e1f658bb2d96ab798393e4b16268aaa Author: Jan Kara Date: Thu Nov 10 17:51:50 2016 +0100 fsnotify: Pass fsnotify_iter_info into handle_event handler Pass fsnotify_iter_info into ->handle_event() handler so that it can release and reacquire SRCU lock via fsnotify_prepare_user_wait() and fsnotify_finish_user_wait() functions. These functions also make sure current marks are appropriately pinned so that iteration protected by srcu in fsnotify() stays safe. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/dnotify/dnotify.c | 3 ++- fs/notify/fanotify/fanotify.c | 3 ++- fs/notify/fsnotify.c | 19 +++++++++++++------ fs/notify/inotify/inotify.h | 3 ++- fs/notify/inotify/inotify_fsnotify.c | 3 ++- fs/notify/inotify/inotify_user.c | 2 +- include/linux/fsnotify_backend.h | 3 ++- kernel/audit_fsnotify.c | 3 ++- kernel/audit_tree.c | 3 ++- kernel/audit_watch.c | 3 ++- 10 files changed, 30 insertions(+), 15 deletions(-) commit abc77577a669f424c5d0c185b9994f2621c52aa4 Author: Jan Kara Date: Thu Nov 10 16:02:11 2016 +0100 fsnotify: Provide framework for dropping SRCU lock in ->handle_event fanotify wants to drop fsnotify_mark_srcu lock when waiting for response from userspace so that the whole notification subsystem is not blocked during that time. This patch provides a framework for safely getting mark reference for a mark found in the object list which pins the mark in that list. We can then drop fsnotify_mark_srcu, wait for userspace response and then safely continue iteration of the object list once we reaquire fsnotify_mark_srcu. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fsnotify.h | 6 +++ fs/notify/group.c | 1 + fs/notify/mark.c | 82 ++++++++++++++++++++++++++++++++++++++++ include/linux/fsnotify_backend.h | 5 +++ 4 files changed, 94 insertions(+) commit f09b04a03e0239f65bd964a1de758e53cf6349e8 Author: Jan Kara Date: Wed Dec 21 14:48:18 2016 +0100 fsnotify: Remove special handling of mark destruction on group shutdown Currently we queue all marks for destruction on group shutdown and then destroy them from fsnotify_destroy_group() instead from a worker thread which is the usual path. However worker can already be processing some list of marks to destroy so this does not make 100% all marks are really destroyed by the time group is shut down. This isn't a big problem as each mark holds group reference and thus group stays partially alive until all marks are really freed but there's no point in complicating our lives - just wait for the delayed work to be finished instead. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fsnotify.h | 6 ++---- fs/notify/group.c | 10 ++++++---- fs/notify/mark.c | 7 ++++--- 3 files changed, 12 insertions(+), 11 deletions(-) commit 6b3f05d24d355f50f3d9814304650fcab0efb482 Author: Jan Kara Date: Wed Dec 21 12:15:30 2016 +0100 fsnotify: Detach mark from object list when last reference is dropped Instead of removing mark from object list from fsnotify_detach_mark(), remove the mark when last reference to the mark is dropped. This will allow fanotify to wait for userspace response to event without having to hold onto fsnotify_mark_srcu. To avoid pinning inodes by elevated refcount (and thus e.g. delaying file deletion) while someone holds mark reference, we detach connector from the object also from fsnotify_destroy_marks() and not only after removing last mark from the list as it was now. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/mark.c | 147 +++++++++++++++++++++++---------------- include/linux/fsnotify_backend.h | 4 +- kernel/audit_tree.c | 31 ++++----- 3 files changed, 105 insertions(+), 77 deletions(-) commit 11375145a70d69e871dd5b8fcadd5d1ee4162e7c Author: Jan Kara Date: Wed Nov 9 14:54:20 2016 +0100 fsnotify: Move queueing of mark for destruction into fsnotify_put_mark() Currently we queue mark into a list of marks for destruction in __fsnotify_free_mark() and keep the last mark reference dangling. After the worker waits for SRCU period, it drops the last reference to the mark which frees it. This scheme has the disadvantage that if we hold reference to a mark and drop and reacquire SRCU lock, the mark can get freed immediately which is slightly inconvenient and we will need to avoid this in the future. Move to a scheme where queueing of mark into a list of marks for destruction happens when the last reference to the mark is dropped. Also drop reference to the mark held by group list already when mark is removed from that list instead of dropping it only from the destruction worker. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/inotify/inotify_user.c | 3 +- fs/notify/mark.c | 73 ++++++++++++++++------------------------ 2 files changed, 30 insertions(+), 46 deletions(-) commit e7253760587e8523fe1e8ede092a620f1403f2e8 Author: Jan Kara Date: Wed Dec 21 11:50:39 2016 +0100 inotify: Do not drop mark reference under idr_lock Dropping mark reference can result in mark being freed. Although it should not happen in inotify_remove_from_idr() since caller should hold another reference, just don't risk lock up just after WARN_ON unnecessarily. Also fold do_inotify_remove_from_idr() into the single callsite as that function really is just two lines of real code. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/inotify/inotify_user.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) commit 08991e83b7286635167bab40927665a90fb00d81 Author: Jan Kara Date: Wed Feb 1 09:21:58 2017 +0100 fsnotify: Free fsnotify_mark_connector when there is no mark attached Currently we free fsnotify_mark_connector structure only when inode / vfsmount is getting freed. This can however impose noticeable memory overhead when marks get attached to inodes only temporarily. So free the connector structure once the last mark is detached from the object. Since notification infrastructure can be working with the connector under the protection of fsnotify_mark_srcu, we have to be careful and free the fsnotify_mark_connector only after SRCU period passes. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/inode.c | 3 - fs/mount.h | 2 +- fs/namespace.c | 3 - fs/notify/fsnotify.c | 9 ++- fs/notify/fsnotify.h | 10 +-- fs/notify/inode_mark.c | 2 +- fs/notify/mark.c | 152 ++++++++++++++++++++++++++++----------- fs/notify/vfsmount_mark.c | 2 +- include/linux/fs.h | 2 +- include/linux/fsnotify_backend.h | 11 +-- kernel/auditsc.c | 6 +- 11 files changed, 136 insertions(+), 66 deletions(-) commit 04662cab59fc3e8421fd7a0539d304d51d2750a4 Author: Jan Kara Date: Wed Feb 1 08:19:43 2017 +0100 fsnotify: Lock object list with connector lock So far list of marks attached to an object (inode / vfsmount) was protected by i_lock or mnt_root->d_lock. This dictates that the list must be empty before the object can be destroyed although the list is now anchored in the fsnotify_mark_connector structure. Protect the list by a spinlock in the fsnotify_mark_connector structure to decouple lifetime of a list of marks from a lifetime of the object. This also simplifies the code quite a bit since we don't have to differentiate between inode and vfsmount lists in quite a few places anymore. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/mark.c | 90 ++++++++++++++-------------------------- include/linux/fsnotify_backend.h | 3 +- 2 files changed, 34 insertions(+), 59 deletions(-) commit 2629718dd26f89e064dcdec6c8e5b9713502e1f8 Author: Jan Kara Date: Wed Mar 15 10:08:28 2017 +0100 fsnotify: Remove useless list deletion and comment After removing all the indirection it is clear that hlist_del_init_rcu(&mark->obj_list); in fsnotify_destroy_marks() is not needed as the mark gets removed from the list shortly afterwards in fsnotify_destroy_mark() -> fsnotify_detach_mark() -> fsnotify_detach_from_object(). Also there is no problem with mark being visible on object list while we call fsnotify_destroy_mark() as parallel destruction of marks from several places is properly handled (as mentioned in the comment in fsnotify_destroy_marks(). So just remove the list removal and also the stale comment. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/mark.c | 6 ------ 1 file changed, 6 deletions(-) commit 73cd3c33ab793325ebaae27fa58b4f713c16f12c Author: Jan Kara Date: Thu Mar 30 09:14:47 2017 +0200 fsnotify: Avoid double locking in fsnotify_detach_from_object() We lock object list lock in fsnotify_detach_from_object() twice - once to detach mark and second time to recalculate mask. That is unnecessary and later it will become problematic as we will free the connector as soon as there is no mark in it. So move recalculation of fsnotify mask into the same critical section that is detaching mark. This also removes recalculation of child dentry flags from fsnotify_detach_from_object(). That is however fine. Those marks will get recalculated once some event happens on a child. Reviewed-by: Miklos Szeredi Signed-off-by: Jan Kara fs/notify/mark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8212a6097a720896b4cdbe516487ad47f4296599 Author: Jan Kara Date: Wed Mar 15 09:48:11 2017 +0100 fsnotify: Remove indirection from fsnotify_detach_mark() fsnotify_detach_mark() calls fsnotify_destroy_inode_mark() or fsnotify_destroy_vfsmount_mark() to remove mark from object list. These two functions are however very similar and differ only in the lock they use to protect the object list of marks. Simplify the code by removing the indirection and removing mark from the object list in a common function. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fsnotify.h | 4 ---- fs/notify/inode_mark.c | 21 --------------------- fs/notify/mark.c | 32 ++++++++++++++++++++++++++------ fs/notify/vfsmount_mark.c | 18 ------------------ 4 files changed, 26 insertions(+), 49 deletions(-) commit a03e2e4f078365428bb4317989cb5d1d6563cfe9 Author: Jan Kara Date: Wed Mar 15 09:41:15 2017 +0100 fsnotify: Determine lock in fsnotify_destroy_marks() Instead of passing spinlock into fsnotify_destroy_marks() determine it directly in that function from the connector type. This will reduce code churn when changing lock protecting list of marks. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fsnotify.h | 10 ++++------ fs/notify/mark.c | 9 +++++++-- 2 files changed, 11 insertions(+), 8 deletions(-) commit f06fd98759451876f51607f60abd74c89b141610 Author: Jan Kara Date: Wed Mar 15 09:33:58 2017 +0100 fsnotify: Move locking into fsnotify_find_mark() Move locking of a mark list into fsnotify_find_mark(). This reduces code churn in the following patch changing lock protecting the list. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/inode_mark.c | 8 +------- fs/notify/mark.c | 8 ++++++++ fs/notify/vfsmount_mark.c | 7 +------ 3 files changed, 10 insertions(+), 13 deletions(-) commit a242677bb1e6faa9bd82bd33afb2621071258231 Author: Jan Kara Date: Wed Mar 15 09:16:27 2017 +0100 fsnotify: Move locking into fsnotify_recalc_mask() Move locking of locks protecting a list of marks into fsnotify_recalc_mask(). This reduces code churn in the following patch which changes the lock protecting the list of marks. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/dnotify/dnotify.c | 3 +-- fs/notify/fsnotify.h | 3 --- fs/notify/inode_mark.c | 18 +++--------------- fs/notify/mark.c | 40 ++++++++++++++++++++++++++++++---------- fs/notify/vfsmount_mark.c | 13 +++---------- include/linux/fsnotify_backend.h | 2 ++ 6 files changed, 39 insertions(+), 40 deletions(-) commit 0810b4f9f207910d90aee56d312d25f334796363 Author: Jan Kara Date: Wed Feb 1 09:23:48 2017 +0100 fsnotify: Move fsnotify_destroy_marks() Move fsnotify_destroy_marks() to be later in the fs/notify/mark.c. It will need some functions that are declared after its current declaration. No functional change. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/mark.c | 72 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) commit 755b5bc681eb46de7bfaec196f85e30efd95bd9f Author: Jan Kara Date: Tue Mar 14 16:11:23 2017 +0100 fsnotify: Remove indirection from mark list addition Adding notification mark to object list has been currently done through fsnotify_add_{inode|vfsmount}_mark() helpers from fsnotify_add_mark_locked() which call fsnotify_add_mark_list(). Remove this unnecessary indirection to simplify the code. Pushing all the locking to fsnotify_add_mark_list() also allows us to allocate the connector structure with GFP_KERNEL mode. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fsnotify.h | 14 ---------- fs/notify/inode_mark.c | 25 ------------------ fs/notify/mark.c | 66 ++++++++++++++++++++++++++++++----------------- fs/notify/vfsmount_mark.c | 24 ----------------- 4 files changed, 43 insertions(+), 86 deletions(-) commit e911d8af87dba7642138f4320ca3db80629989f2 Author: Jan Kara Date: Tue Mar 14 14:48:00 2017 +0100 fsnotify: Make fsnotify_mark_connector hold inode reference Currently inode reference is held by fsnotify marks. Change the rules so that inode reference is held by fsnotify_mark_connector structure whenever the list is non-empty. This simplifies the code and is more logical. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fsnotify.h | 4 +--- fs/notify/inode_mark.c | 30 +++++------------------------- fs/notify/mark.c | 17 ++++++----------- include/linux/fsnotify_backend.h | 12 ++++++------ 4 files changed, 18 insertions(+), 45 deletions(-) commit 86ffe245c430f07f95d5d28d3b694ea72f4492e7 Author: Jan Kara Date: Tue Mar 14 14:29:35 2017 +0100 fsnotify: Move object pointer to fsnotify_mark_connector Move pointer to inode / vfsmount from mark itself to the fsnotify_mark_connector structure. This is another step on the path towards decoupling inode / vfsmount lifetime from notification mark lifetime. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/dnotify/dnotify.c | 4 ++-- fs/notify/fdinfo.c | 12 ++++++------ fs/notify/fsnotify.h | 3 ++- fs/notify/inode_mark.c | 18 +++++++----------- fs/notify/mark.c | 32 ++++++++++++++++++++++---------- fs/notify/vfsmount_mark.c | 12 +++++------- include/linux/fsnotify_backend.h | 17 ++++++++++------- kernel/audit_tree.c | 25 ++++++++++++++++++++----- 8 files changed, 74 insertions(+), 49 deletions(-) commit 9dd813c15b2c101168808d4f5941a29985758973 Author: Jan Kara Date: Tue Mar 14 12:31:02 2017 +0100 fsnotify: Move mark list head from object into dedicated structure Currently notification marks are attached to object (inode or vfsmnt) by a hlist_head in the object. The list is also protected by a spinlock in the object. So while there is any mark attached to the list of marks, the object must be pinned in memory (and thus e.g. last iput() deleting inode cannot happen). Also for list iteration in fsnotify() to work, we must hold fsnotify_mark_srcu lock so that mark itself and mark->obj_list.next cannot get freed. Thus we are required to wait for response to fanotify events from userspace process with fsnotify_mark_srcu lock held. That causes issues when userspace process is buggy and does not reply to some event - basically the whole notification subsystem gets eventually stuck. So to be able to drop fsnotify_mark_srcu lock while waiting for response, we have to pin the mark in memory and make sure it stays in the object list (as removing the mark waiting for response could lead to lost notification events for groups later in the list). However we don't want inode reclaim to block on such mark as that would lead to system just locking up elsewhere. This commit is the first in the series that paves way towards solving these conflicting lifetime needs. Instead of anchoring the list of marks directly in the object, we anchor it in a dedicated structure (fsnotify_mark_connector) and just point to that structure from the object. The following commits will also add spinlock protecting the list and object pointer to the structure. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/inode.c | 6 +-- fs/mount.h | 2 +- fs/namespace.c | 6 +-- fs/notify/fsnotify.c | 32 +++++++++++----- fs/notify/fsnotify.h | 16 ++++---- fs/notify/inode_mark.c | 8 ++-- fs/notify/mark.c | 80 +++++++++++++++++++++++++++++++++------- fs/notify/vfsmount_mark.c | 8 ++-- include/linux/fs.h | 4 +- include/linux/fsnotify_backend.h | 10 +++++ kernel/auditsc.c | 7 +++- 11 files changed, 132 insertions(+), 47 deletions(-) commit c1f33073ac1b33510e956de7181438515e438db0 Author: Jan Kara Date: Fri Dec 16 10:53:32 2016 +0100 fsnotify: Update comments Add a comment that lifetime of a notification mark is protected by SRCU and remove a comment about clearing of marks attached to the inode. It is stale and more uptodate version is at fsnotify_destroy_marks() which is the function handling this case. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/mark.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 43471d15df0e7c40ca4df1513fc1dcf5765396ac Author: Jan Kara Date: Mon Apr 3 16:47:58 2017 +0200 audit_tree: Use mark flags to check whether mark is alive Currently audit code uses checking of mark->inode to verify whether mark is still alive. Switch that to checking mark flags as that is more logical and current way will become unreliable in future. Reviewed-by: Miklos Szeredi Signed-off-by: Jan Kara kernel/audit_tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d4e1eaeee56894f45d0093f9d432be0c868f7c4c Author: Wang Xiaoyin Date: Thu Mar 30 14:48:03 2017 +0800 arm64: dts: hisi: add pinctrl dtsi file for HiKey960 development board Add pinctrl dtsi file for HiKey960 development board, enable 5 pinmux devices and 1 pinconf device, also include some nodes of configurations for pins. Signed-off-by: Wang Xiaoyin Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 1 + .../arm64/boot/dts/hisilicon/hikey960-pinctrl.dtsi | 407 +++++++++++++++++++++ 2 files changed, 408 insertions(+) commit 5a7e4774fd91b1c934806ea89b3ec6cc74c54159 Author: Wang Xiaoyin Date: Thu Mar 30 14:48:02 2017 +0800 arm64: dts: hisi: add drive strength levels of the pins for Hi3660 SoC Extend drive strength levels of the pins for Hi3660 Soc. Signed-off-by: Wang Xiaoyin Signed-off-by: Wei Xu include/dt-bindings/pinctrl/hisi.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 04dffe11054f29716cf8058c6bf9d142d44aaaa5 Author: Hans Verkuil Date: Sat Nov 5 08:39:58 2016 -0200 [media] serio.h: add SERIO_RAINSHADOW_CEC ID Add a new serio ID for the RainShadow Tech USB HDMI CEC adapter. Signed-off-by: Hans Verkuil Acked-by: Dmitry Torokhov Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/serio.h | 1 + 1 file changed, 1 insertion(+) commit 519caba7a9575dc2c1555567d033dee9ee570ec7 Author: Wei Xu Date: Wed Mar 29 00:03:08 2017 +0800 arm64: dts: hisi: enable the NIC and SAS for the hip07-d05 board Enable the NIC and SAS nodes for the hip07-d05 board to support related functions. Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hip07-d05.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit bffc7dece92edd0b6445b76a378e2fa9e324c7ed Author: Borislav Petkov Date: Sat Feb 4 18:10:14 2017 +0100 EDAC: Rename report status accessors Change them to have the edac_ prefix. No functionality change. Signed-off-by: Borislav Petkov drivers/acpi/acpi_extlog.c | 8 ++++---- drivers/edac/edac_mc.c | 8 ++++---- drivers/edac/pnd2_edac.c | 2 +- drivers/edac/sb_edac.c | 4 ++-- drivers/edac/skx_edac.c | 2 +- include/linux/edac.h | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) commit fee27d7d97886515a60cce38b4152b7f5b5a21fc Author: Borislav Petkov Date: Sat Feb 4 17:42:03 2017 +0100 EDAC: Delete edac_stub.c Move the remaining functionality to edac_mc.c. Convert "edac_report=" to a module parameter. Signed-off-by: Borislav Petkov drivers/edac/Makefile | 2 +- drivers/edac/edac_mc.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/edac/edac_stub.c | 37 ----------------------------- include/linux/edac.h | 26 +++------------------ 4 files changed, 65 insertions(+), 61 deletions(-) commit a06b85ff07147cf03c4d5e17db9ac0644bd27861 Author: Borislav Petkov Date: Sat Feb 4 16:32:27 2017 +0100 EDAC: Update Kconfig help text Remove the old URLs. Signed-off-by: Borislav Petkov drivers/edac/Kconfig | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit e3c4ff6d8c949fa9a9ea1bd005bf1967efe09d5d Author: Borislav Petkov Date: Fri Feb 3 18:18:05 2017 +0100 EDAC: Remove EDAC_MM_EDAC Move all the EDAC core functionality behind CONFIG_EDAC and get rid of that indirection. Update defconfigs which had it. While at it, fix dependencies such that EDAC depends on RAS for the tracepoints. Signed-off-by: Borislav Petkov Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Chris Metcalf Cc: linux-edac@vger.kernel.org arch/arm/configs/multi_v7_defconfig | 1 - arch/arm/configs/pxa_defconfig | 3 +- arch/powerpc/configs/85xx-hw.config | 3 +- arch/powerpc/configs/85xx/ge_imp3a_defconfig | 1 - arch/powerpc/configs/85xx/xes_mpc85xx_defconfig | 1 - arch/powerpc/configs/cell_defconfig | 1 - arch/powerpc/configs/pasemi_defconfig | 1 - arch/powerpc/configs/ppc64_defconfig | 1 - arch/powerpc/configs/ppc64e_defconfig | 1 - arch/powerpc/configs/ppc6xx_defconfig | 3 +- arch/tile/configs/tilegx_defconfig | 1 - arch/tile/configs/tilepro_defconfig | 1 - drivers/acpi/Kconfig | 1 - drivers/edac/Kconfig | 101 ++++++++++-------------- drivers/edac/Makefile | 3 +- drivers/edac/edac_stub.c | 2 +- 16 files changed, 48 insertions(+), 77 deletions(-) commit be1d162948f5bb0ced260e60208e7dc06cd45cab Author: Borislav Petkov Date: Fri Feb 3 17:15:53 2017 +0100 EDAC: Issue tracepoint only when it is defined ... and this happens only when CONFIG_RAS is enabled. Signed-off-by: Borislav Petkov drivers/edac/edac_mc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 9613916b02bfc7567ac2c5178469185e8912ddff Author: Borislav Petkov Date: Fri Feb 3 14:17:43 2017 +0100 ACPI/extlog: Add EDAC dependency We are calling EDAC functions - make the proper dependencies explicit. Signed-off-by: Borislav Petkov Cc: linux-acpi@vger.kernel.org drivers/acpi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c22b4fece594e0602a6204876842b5a94df6568 Author: Borislav Petkov Date: Thu Jan 26 22:18:12 2017 +0100 EDAC: Move edac_op_state to edac_mc.c ... as part of moving stuff away from edac_stub.c Signed-off-by: Borislav Petkov drivers/edac/edac_mc.c | 3 +++ drivers/edac/edac_stub.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) commit d3116a0837261405e0febb8043fe7040c8ebccb4 Author: Borislav Petkov Date: Thu Jan 26 18:25:11 2017 +0100 EDAC: Remove edac_err_assert ... and the glue around it. It is not needed anymore. Signed-off-by: Borislav Petkov drivers/edac/edac_mc.c | 18 +----------------- drivers/edac/edac_stub.c | 3 --- include/linux/edac.h | 1 - 3 files changed, 1 insertion(+), 21 deletions(-) commit 97bb6c17ad5a0892beb45070dfe8c7d6d0e5326e Author: Borislav Petkov Date: Thu Jan 26 16:49:59 2017 +0100 EDAC: Get rid of edac_handlers Use mc_devices list instead to check whether we have EDAC driver instances successfully registered with EDAC core. Signed-off-by: Borislav Petkov drivers/edac/edac_mc.c | 6 ++---- drivers/edac/edac_stub.c | 3 --- include/linux/edac.h | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) commit db47d5f856467ce0dd3af7e20a33df3d901266df Author: Borislav Petkov Date: Wed Jan 25 20:30:29 2017 +0100 x86/nmi, EDAC: Get rid of DRAM error reporting thru PCI SERR NMI Apparently, some machines used to report DRAM errors through a PCI SERR NMI. This is why we have a call into EDAC in the NMI handler. See c0d121720220 ("drivers/edac: add new nmi rescan"). From looking at the patch above, that's two drivers: e752x_edac.c and e7xxx_edac.c. Now, I wanna say those are old machines which are probably decommissioned already. Tony says that "[t]the newest CPU supported by either of those drivers is the Xeon E7520 (a.k.a. "Nehalem") released in Q1'2010. Possibly some folks are still using these ... but people that hold onto h/w for 7 years generally cling to old s/w too ... so I'd guess it unlikely that we will get complaints for breaking these in upstream." So even if there is a small number still in use, we did load EDAC with edac_op_state == EDAC_OPSTATE_POLL by default (we still do, in fact) which means a default EDAC setup without any parameters supplied on the command line or otherwise would never even log the error in the NMI handler because we're polling by default: inline int edac_handler_set(void) { if (edac_op_state == EDAC_OPSTATE_POLL) return 0; return atomic_read(&edac_handlers); } So, long story short, I'd like to get rid of that nastiness called edac_stub.c and confine all the EDAC drivers solely to drivers/edac/. If we ever have to do stuff like that again, it should be notifiers we're using and not some insanity like this one. Signed-off-by: Borislav Petkov Acked-by: Thomas Gleixner Cc: Tony Luck arch/x86/kernel/nmi.c | 11 ----------- drivers/edac/edac_stub.c | 22 ---------------------- include/linux/edac.h | 2 -- 3 files changed, 35 deletions(-) commit ff21b250e9b842140dee4b8c464f426fa2b09f8b Merge: 1f9d3d9 3d016d5 Author: Takashi Iwai Date: Mon Apr 10 17:12:01 2017 +0200 Merge branch 'for-linus' into for-next commit 76f6a26ce94f1af2a04fcb44fe74386ec524931f Author: Borislav Petkov Date: Fri Feb 3 14:28:38 2017 +0100 EDAC, highbank: Align Makefile directives ... like the rest of the file. Signed-off-by: Borislav Petkov drivers/edac/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ddc17771e215b2a8701f8c0f28bbe706f9a69733 Author: Kumar Gala Date: Mon Apr 3 12:58:42 2017 -0500 dt-bindings: arm,nvic: Binding for ARM NVIC interrupt controller on Cortex-M Signed-off-by: Kumar Gala Signed-off-by: Rob Herring .../bindings/interrupt-controller/arm,nvic.txt | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit a6308d700b9b29cc365758f4e0ccad69696107d3 Merge: 37e47d5 6239879 Author: Greg Kroah-Hartman Date: Mon Apr 10 15:45:52 2017 +0200 Merge tag 'phy-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next Kishon writes: phy: for 4.12 *) Add new PHY driver for Qualcomm's QMP PHY (used by PCIe, UFS and USB) *) Add new PHY driver for Qualcomm's QUSB2 PHY *) Add support for vbus regulator in rockchip-usb driver *) Add support for usb2-phy in rk3328 to rockchip-inno-usb2 driver *) Add support for a new version of PHY in phy-mt65xx-usb3 driver *) Add support for Allwinner A64 PHY to switch between MUSB and EHCI/OHCI *) Cleanups in Exynos driver and phy-mt65xx-usb3 driver Signed-off-by: Kishon Vijay Abraham I commit 073a457d9ef46b34127f0bdcb879aaf8674819a5 Merge: 615cdd7 70641a0 Author: Greg Kroah-Hartman Date: Mon Apr 10 15:42:15 2017 +0200 Merge tag 'extcon-next-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Update extcon for 4.12 Detailed description for this pull request: 1. Add new 'extcon-intel-cht-wc.c' driver - Intel Cherrytrail Whiskey Cove PMIC extcon driver supports the detection of the charger connectors and the control. 2. Add new extcon API to monitor the all external connectors. - The extcon consumer might need to monitor the all supported external connectors from the extcon device. Before, the extcon consumer should have each notifier_block structure for each external connector. In order to support the requirement, the extcon adds new extcon_register_notifier_all() API. The extcon consumer is able to monitor the state change of all supported external connectors from the extcon device by using only one notifier_block. - extcon_(register|unregister)_notifier_all(struct extcon_dev *edev struct notifier_block *nb) - devm_extcon_(register|unregister)_notifier_all(struct device *dev, struct extcon_dev *edev struct notifier_block *nb) 3. Remove porting compatibility of old switch class - The extcon removes the porting compatibility of old switch class because there are no any use-case and requirement of switch class. 4. Update the extcon drivers and Fix the minor issues - Revert the ACPI gpio interface on the extcon-usb-gpioc.c. - Fix the issues related to the suspend-to-ram for both extcon-usb-gpio.c and extcon-palmas.c. - Add warning message for extcon-arizona.c when headphone detection is not finished. commit 4502b6bb720d7a519c4cea76cf68a2425b481a45 Author: Fu Wei Date: Wed Jan 18 21:25:30 2017 +0800 clocksource: arm_arch_timer: rework PPI selection Currently, the arch timer driver uses ARCH_TIMER_PHYS_SECURE_PPI to mean the driver will use the secure PPI *and* potentially also use the non-secure PPI. This is somewhat confusing. For arm64 it never makes sense to use the secure PPI, but we do anyway, inheriting this behaviour from 32-bit arm. For ACPI, we may not even have a valid secure PPI, so we need to be able to only request the non-secure PPI. To that end, this patch reworks the timer driver so that we can request the non-secure PPI alone. The PPI selection is split out into a new function, arch_timer_select_ppi(), and verification of the selected PPI is shifted out to callers (as DT may select the PPI by other means and must handle this anyway). We now consistently use arch_timer_has_nonsecure_ppi() to determine whether we must manage a non-secure PPI *in addition* to a secure PPI. When we only have a non-secure PPI, this returns false. Signed-off-by: Fu Wei Tested-by: Xiongfeng Wang [Mark: reword commit message] Signed-off-by: Mark Rutland drivers/clocksource/arm_arch_timer.c | 77 +++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 31 deletions(-) commit 097cd143dd871bfceacf4ed252b177cf515a1888 Author: Fu Wei Date: Wed Jan 18 21:25:29 2017 +0800 clocksource: arm_arch_timer: add a new enum for spi type This patch add a new enum "arch_timer_spi_nr" and use it in the driver. Just for code's readability, no functional change. Signed-off-by: Fu Wei Acked-by: Mark Rutland Signed-off-by: Mark Rutland drivers/clocksource/arm_arch_timer.c | 4 ++-- include/clocksource/arm_arch_timer.h | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) commit 831610c08e63b69b141c446c78eb9e9315660a5d Author: Fu Wei Date: Wed Jan 18 21:25:28 2017 +0800 clocksource: arm_arch_timer: move enums and defines to header file To support the arm_arch_timer via ACPI we need to share defines and enums between the driver and the ACPI parser code. So we split out the relevant defines and enums into arm_arch_timer.h. No functional change. Signed-off-by: Fu Wei Acked-by: Mark Rutland Tested-by: Xiongfeng Wang Signed-off-by: Mark Rutland drivers/clocksource/arm_arch_timer.c | 11 ----------- include/clocksource/arm_arch_timer.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) commit ee34f1e63d3d2b8df8607847eafbc859ec6818dc Author: Fu Wei Date: Wed Jan 18 21:25:27 2017 +0800 clocksource: arm_arch_timer: rename the PPI enum In preparation for moving the PPI enum out into a header, rename the enum and its constituent values these so they are namespaced w.r.t. the arch timer. This will aid consistency and avoid potential name clashes when this move occurs. No functional change. Signed-off-by: Fu Wei Tested-by: Xiongfeng Wang [Mark: reword commit message] Signed-off-by: Mark Rutland drivers/clocksource/arm_arch_timer.c | 82 ++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 40 deletions(-) commit ff8abc2839bfab9185978f3c27b5e3b744262efd Author: Michael Heimpold Date: Mon Apr 10 11:08:55 2017 +0200 ARM: mxs: add support for I2SE Duckbill 2 boards The Duckbill devices are small, pen-drive sized boards based on NXP's i.MX28 SoC. While the initial variants (Duckbill series) were equipped with a micro SD card slot only, the latest generation (Duckbill 2 series) have an additional internal eMMC onboard. To distinguish between both generations, a new device tree compatible string was introduced. To get the MAC address fixup applied, we need to check for this new string here, too. Signed-off-by: Michael Heimpold Signed-off-by: Shawn Guo arch/arm/mach-mxs/mach-mxs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8a5c21dc05ea44d0e7255c88f8f56af0971bbc68 Author: Fu Wei Date: Wed Jan 18 21:25:26 2017 +0800 clocksource: arm_arch_timer: rename type macros In preparation for moving the type macros out into a header, rename these so they are namespaced w.r.t. the arch timer. We'll apply the same prefix to other definitions in subsequent patches. This will aid consistency and avoid potential name clahses when this move occurs. No functional change. Signed-off-by: Fu Wei Tested-by: Xiongfeng Wang [Mark: reword commit message] Signed-off-by: Mark Rutland drivers/clocksource/arm_arch_timer.c | 43 +++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 20 deletions(-) commit ded24019b6b6f18ed079bbabc89832cd68959748 Author: Fu Wei Date: Wed Jan 18 21:25:25 2017 +0800 clocksource: arm_arch_timer: clean up printk usage Almost all string in the arm_arch_timer driver duplicate an common prefix (though a few do not). For consistency, it would be better to use pr_fmt(), and always use this prefix. At the same time, we may as well clean up some whitespace issues in arch_timer_banner and arch_timer_init. No functional change. Signed-off-by: Fu Wei Acked-by: Mark Rutland Tested-by: Xiongfeng Wang [Mark: reword commit message] Signed-off-by: Mark Rutland drivers/clocksource/arm_arch_timer.c | 49 ++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 24 deletions(-) commit f78a8236c6502760705399dfa42e22ab11aa1e6b Merge: 6cb3d05 39da7c5 Author: Greg Kroah-Hartman Date: Mon Apr 10 15:21:55 2017 +0200 Merge 4.11-rc6 into staging-next We want the staging and iio fixes in here to handle merging easier. Signed-off-by: Greg Kroah-Hartman commit 523aa3586ffb1fc11a9bf88f77ebaf71a15eb998 Merge: fd0f50d 39da7c5 Author: Greg Kroah-Hartman Date: Mon Apr 10 15:13:06 2017 +0200 Merge 4.11-rc6 into driver-core-next We want the fixes in here as well for testing. Signed-off-by: Greg Kroah-Hartman commit 08a1e650cc631ccc8cfe670beb38b2f9c58402cd Author: Benjamin Herrenschmidt Date: Wed Apr 5 17:54:55 2017 +1000 powerpc: Fixup LPCR:PECE and HEIC setting on POWER9 We need to set LPES in order for normal external interrupts (0x500) to be directed to the guest while running in guest state. We also need HEIC set to prevent them to be sent to the host while in host state. With XIVE the host never gets one of these and wouldn't know how to handle it. All host external interrupts come in via the new hypervisor virtualization interrupts vector. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/reg.h | 1 + arch/powerpc/kernel/cpu_setup_power.S | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) commit d381d7caf812f7aa9f05cfeb858c9004ac654412 Author: Benjamin Herrenschmidt Date: Wed Apr 5 17:54:54 2017 +1000 powerpc: Consolidate variants of real-mode MMIOs We have all sort of variants of MMIO accessors for the real mode instructions. This creates a clean set of accessors based on Linux normal naming conventions, replacing all occurrences of the old ones in the tree. I have purposefully removed the "out/in" variants in favor of only including __raw variants. Any code using these is already pretty much hand tuned to operate in a very specific environment. I've fixed up the 2 users (only one of them actually needed a barrier in the first place). Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/io.h | 98 ++++++++++++++++--------------- arch/powerpc/include/asm/kvm_book3s_asm.h | 2 +- arch/powerpc/include/asm/kvm_ppc.h | 2 +- arch/powerpc/kvm/book3s_hv_builtin.c | 21 +++---- arch/powerpc/kvm/book3s_hv_rm_xics.c | 4 +- arch/powerpc/platforms/powernv/rng.c | 2 +- arch/powerpc/sysdev/xics/icp-native.c | 8 +-- 7 files changed, 68 insertions(+), 69 deletions(-) commit f50d6bd3442c3c1345b0da0885ac9d81fef2bb8e Author: Benjamin Herrenschmidt Date: Wed Apr 5 17:54:53 2017 +1000 powerpc/kvm: Remove obsolete kvm_vm_ioctl_xics_irq declaration The function doesn't exist anymore Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kvm_ppc.h | 4 ---- 1 file changed, 4 deletions(-) commit 936774cd3fc8152e36c18a129fa940c42c177d14 Author: Benjamin Herrenschmidt Date: Wed Apr 5 17:54:52 2017 +1000 powerpc/kvm: Make kvmppc_xics_create_icp static It's only used within the same file it's defined Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kvm_ppc.h | 4 ---- arch/powerpc/kvm/book3s_xics.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) commit d3989143d03917ddcf7103d4ad5fc871e8d8954b Author: Benjamin Herrenschmidt Date: Wed Apr 5 17:54:51 2017 +1000 powerpc/kvm: Massage order of #include We traditionally have linux/ before asm/ Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s.c | 8 ++++---- arch/powerpc/kvm/book3s_hv.c | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) commit 243e25112d06b348f087a6f7aba4bbc288285bdd Author: Benjamin Herrenschmidt Date: Wed Apr 5 17:54:50 2017 +1000 powerpc/xive: Native exploitation of the XIVE interrupt controller The XIVE interrupt controller is the new interrupt controller found in POWER9. It supports advanced virtualization capabilities among other things. Currently we use a set of firmware calls that simulate the old "XICS" interrupt controller but this is fairly inefficient. This adds the framework for using XIVE along with a native backend which OPAL for configuration. Later, a backend allowing the use in a KVM or PowerVM guest will also be provided. This disables some fast path for interrupts in KVM when XIVE is enabled as these rely on the firmware emulation code which is no longer available when the XIVE is used natively by Linux. A latter patch will make KVM also directly exploit the XIVE, thus recovering the lost performance (and more). Signed-off-by: Benjamin Herrenschmidt [mpe: Fixup pr_xxx("XIVE:"...), don't split pr_xxx() strings, tweak Kconfig so XIVE_NATIVE selects XIVE and depends on POWERNV, fix build errors when SMP=n, fold in fixes from Ben: Don't call cpu_online() on an invalid CPU number Fix irq target selection returning out of bounds cpu# Extra sanity checks on cpu numbers ] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/xive-regs.h | 97 +++ arch/powerpc/include/asm/xive.h | 163 ++++ arch/powerpc/include/asm/xmon.h | 2 + arch/powerpc/kvm/book3s_hv_builtin.c | 8 + arch/powerpc/platforms/powernv/Kconfig | 1 + arch/powerpc/platforms/powernv/setup.c | 15 +- arch/powerpc/platforms/powernv/smp.c | 39 +- arch/powerpc/sysdev/Kconfig | 1 + arch/powerpc/sysdev/Makefile | 1 + arch/powerpc/sysdev/xive/Kconfig | 11 + arch/powerpc/sysdev/xive/Makefile | 4 + arch/powerpc/sysdev/xive/common.c | 1302 ++++++++++++++++++++++++++++++ arch/powerpc/sysdev/xive/native.c | 639 +++++++++++++++ arch/powerpc/sysdev/xive/xive-internal.h | 62 ++ arch/powerpc/xmon/xmon.c | 94 ++- 15 files changed, 2427 insertions(+), 12 deletions(-) commit 1531a208ed861e4bd287444f9466ffcf98383de2 Author: Kieran Bingham Date: Mon Feb 27 10:40:34 2017 -0300 [media] v4l: vsp1: Register pipe with output WPF The DRM object does not register the pipe with the WPF object. This is used internally throughout the driver as a means of accessing the pipe. As such this breaks operations which require access to the pipe from WPF interrupts. Register the pipe inside the WPF object after it has been declared as the output. Fixes: ff7e97c94d9f ("[media] v4l: vsp1: Store pipeline pointer in rwpf") Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_drm.c | 1 + 1 file changed, 1 insertion(+) commit 1b8ce4060b02c9ebfcb75a9d91cf85fb1fb1bc1b Author: Kieran Bingham Date: Thu Mar 2 07:12:22 2017 -0300 [media] v4l: vsp1: Fix struct vsp1_drm documentation The struct vsp1_drm references a member 'planes' which doesn't exist. Correctly identify this documentation against the 'inputs' Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_drm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40ad34d8ebe7abd0d4df35a3364bf446e10f5c52 Author: Laurent Pinchart Date: Tue Feb 28 19:44:55 2017 -0300 [media] v4l: vsp1: Disable HSV formats on Gen3 hardware While all VSP instances can process HSV internally, on Gen3 hardware reading or writing HSV24 or HSV32 from/to memory causes the device to hang. Disable those pixel formats on Gen3 hardware. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_pipe.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 9dbed95ba640c1b4fb2d069814924811bdeb0de6 Author: Laurent Pinchart Date: Sun Feb 26 10:29:50 2017 -0300 [media] v4l: vsp1: Fix multi-line comment style Fix all multi-line comments to comply with the kernel coding style. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_bru.c | 27 ++++++++++++++++--------- drivers/media/platform/vsp1/vsp1_dl.c | 27 ++++++++++++++++--------- drivers/media/platform/vsp1/vsp1_drm.c | 21 +++++++++++++------- drivers/media/platform/vsp1/vsp1_drv.c | 12 +++++++---- drivers/media/platform/vsp1/vsp1_entity.c | 9 ++++++--- drivers/media/platform/vsp1/vsp1_hsit.c | 3 ++- drivers/media/platform/vsp1/vsp1_lif.c | 6 ++++-- drivers/media/platform/vsp1/vsp1_pipe.c | 9 ++++++--- drivers/media/platform/vsp1/vsp1_rpf.c | 9 ++++++--- drivers/media/platform/vsp1/vsp1_rwpf.c | 6 ++++-- drivers/media/platform/vsp1/vsp1_sru.c | 3 ++- drivers/media/platform/vsp1/vsp1_uds.c | 3 ++- drivers/media/platform/vsp1/vsp1_video.c | 33 ++++++++++++++++++++----------- drivers/media/platform/vsp1/vsp1_wpf.c | 12 +++++++---- 14 files changed, 120 insertions(+), 60 deletions(-) commit f2074708ee07848f86105b68bdce062de4e6685d Author: Kieran Bingham Date: Fri Jan 6 10:15:31 2017 -0200 [media] v4l: vsp1: Remove redundant pipe->dl usage from drm The pipe->dl is used only inside vsp1_du_atomic_flush(), and can be obtained and stored locally to simplify the code. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_drm.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 4461c84b52b4a952c657505ef7e4e06b016783df Author: Kieran Bingham Date: Fri Jan 6 10:15:28 2017 -0200 [media] v4l: vsp1: Prevent multiple streamon race commencing pipeline early With multiple inputs through the BRU it is feasible for the streams to race each other at stream-on. Multiple VIDIOC_STREAMON calls racing each other could have process N-1 skipping over the pipeline setup section and then start the pipeline early, if videobuf2 has already enqueued buffers to the driver for process N but not called the .start_streaming() operation yet In the case of the video pipelines, this can present two serious issues. 1) A null-dereference if the pipe->dl is committed at the same time as the vsp1_video_setup_pipeline() is processing 2) A hardware hang, where a display list is committed without having called vsp1_video_setup_pipeline() first Repair this issue, by ensuring that only the stream which configures the pipeline is able to start it. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_video.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 3425382288fbd13b60581f20076aebd0ef414282 Author: Laurent Pinchart Date: Sun Feb 12 20:58:20 2017 -0200 [media] v4l: vsp1: Fix RPF/WPF U/V order in 3-planar formats on Gen3 The RPF and WPF U/V order bits have no effect for 3-planar formats on Gen3 hardware. Swap the U and V planes addresses manually instead in that case. Fixes: b915bd24a034 ("[media] v4l: vsp1: Add tri-planar memory formats support") Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_rpf.c | 43 ++++++++++++++++++++-------------- drivers/media/platform/vsp1/vsp1_wpf.c | 9 +++++++ 2 files changed, 35 insertions(+), 17 deletions(-) commit dadc3be66c282d4c2c917186447494ae79f7b79f Author: Shailendra Verma Date: Fri Nov 25 03:07:57 2016 -0200 [media] v4l: vsp1: Clean up file handle in open() error path v4l2_fh_init is already done. So call the v4l2_fh_exit in error condition before returing from the function. Signed-off-by: Shailendra Verma Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_video.c | 1 + 1 file changed, 1 insertion(+) commit f1450162544f5c4dc801c85bb28f64c0fa6146e7 Author: Kieran Bingham Date: Thu Jun 9 14:57:02 2016 -0300 [media] v4l: vsp1: Fix format-info documentation Minor tweaks to document the swap register and make the documentation match the struct ordering Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_pipe.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 426b188040bb20fc92f5b7e321a39d432db60a4a Author: Hans Verkuil Date: Wed Mar 29 09:56:47 2017 +0200 [media] dev-capture.rst/dev-output.rst: video standards ioctls are optional The documentation for video capture and output devices claims that the video standard ioctls are required. This is not the case, they are only required for PAL/NTSC/SECAM type inputs and outputs. Sensors do not implement this at all and e.g. HDMI inputs implement the DV Timings ioctls. Just drop the mention of 'video standard' ioctls. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/dev-capture.rst | 4 ++-- Documentation/media/uapi/v4l/dev-output.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit cd15f1020fd627d795e60a142d1f00f7fc1fe7f3 Author: Myungho Jung Date: Sun Apr 9 17:34:22 2017 -0700 crypto: lz4 - fixed decompress function to return error code Decompress function in LZ4 library is supposed to return an error code or negative result. But, it returns -1 when any error is detected. Return error code when the library returns negative value. Signed-off-by: Myungho Jung Signed-off-by: Herbert Xu crypto/lz4.c | 2 +- crypto/lz4hc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 07a77929ba672d93642a56dc2255dd21e6e2290b Author: Jason A. Donenfeld Date: Fri Apr 7 02:33:30 2017 +0200 padata: free correct variable The author meant to free the variable that was just allocated, instead of the one that failed to be allocated, but made a simple typo. This patch rectifies that. Signed-off-by: Jason A. Donenfeld Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu kernel/padata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f437a3f477cce402dbec6537b29e9e33962c9f73 Author: Herbert Xu Date: Thu Apr 6 16:16:11 2017 +0800 crypto: api - Extend algorithm name limit to 128 bytes With the new explicit IV generators, we may now exceed the 64-byte length limit on the algorithm name, e.g., with echainiv(authencesn(hmac(sha256-generic),cbc(des3_ede-generic))) This patch extends the length limit to 128 bytes. Reported-by: Alexander Sverdlin Signed-off-by: Herbert Xu Acked-by: Alexander Sverdlin Tested-by: Alexander Sverdlin include/linux/crypto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 633439f5b7e9e2a88fb2ead38bc12c5061897cf2 Author: Herbert Xu Date: Thu Apr 6 16:16:10 2017 +0800 xfrm: Prepare for CRYPTO_MAX_ALG_NAME expansion This patch fixes the xfrm_user code to use the actual array size rather than the hard-coded CRYPTO_MAX_ALG_NAME length. This is because the array size is fixed at 64 bytes while we want to increase the in-kernel CRYPTO_MAX_ALG_NAME value. Signed-off-by: Herbert Xu Acked-by: Alexander Sverdlin Tested-by: Alexander Sverdlin Acked-by: Steffen Klassert net/xfrm/xfrm_user.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3f69cc60768b2cd15e5cbd3a4b91c46535138382 Author: Herbert Xu Date: Thu Apr 6 16:16:09 2017 +0800 crypto: af_alg - Allow arbitrarily long algorithm names This patch removes the hard-coded 64-byte limit on the length of the algorithm name through bind(2). The address length can now exceed that. The user-space structure remains unchanged. In order to use a longer name simply extend the salg_name array beyond its defined 64 bytes length. Signed-off-by: Herbert Xu crypto/af_alg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4473710df1f8779c59b33737eeaa151596907761 Author: Herbert Xu Date: Thu Apr 6 16:16:08 2017 +0800 crypto: user - Prepare for CRYPTO_MAX_ALG_NAME expansion This patch hard-codes CRYPTO_MAX_NAME in the user-space API to 64, which is the current value of CRYPTO_MAX_ALG_NAME. This patch also replaces all remaining occurences of CRYPTO_MAX_ALG_NAME in the user-space API with CRYPTO_MAX_NAME. This way the user-space API will not be modified when we raise the value of CRYPTO_MAX_ALG_NAME. Furthermore, the code has been updated to handle names longer than the user-space API. They will be truncated. Signed-off-by: Herbert Xu Acked-by: Alexander Sverdlin Tested-by: Alexander Sverdlin crypto/crypto_user.c | 18 +++++++++--------- include/uapi/linux/cryptouser.h | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) commit ca3bff70ab320a9132c5524c495455526df4b078 Author: Rick Altherr Date: Wed Apr 5 16:21:00 2017 -0700 hwrng: timeriomem - Improve performance for sub-jiffie update periods Some hardware RNGs provide a single register for obtaining random data. Instead of signaling when new data is available, the reader must wait a fixed amount of time between reads for new data to be generated. timeriomem_rng implements this scheme with the period specified in platform data or device tree. While the period is specified in microseconds, the implementation used a standard timer which has a minimum delay of 1 jiffie and caused a significant bottleneck for devices that can update at 1us. By switching to an hrtimer, 1us periods now only delay at most 2us per read. Signed-off-by: Rick Altherr Signed-off-by: Herbert Xu drivers/char/hw_random/timeriomem-rng.c | 86 +++++++++++++++++---------------- 1 file changed, 45 insertions(+), 41 deletions(-) commit 5ab693e63a93c387171b4f7834b2f7bfe9b55f35 Author: Rick Altherr Date: Wed Apr 5 16:20:59 2017 -0700 hwrng: timeriomem - Shorten verbose type and variable names No functional changes. Signed-off-by: Rick Altherr Signed-off-by: Herbert Xu drivers/char/hw_random/timeriomem-rng.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 7acd4de7f2427c326776d49d630bd3530dd54ea6 Author: Rick Altherr Date: Wed Apr 5 16:20:58 2017 -0700 hwrng: timeriomem - Migrate to new API Preserves the existing behavior of only returning 32-bits per call. Signed-off-by: Rick Altherr Signed-off-by: Herbert Xu drivers/char/hw_random/timeriomem-rng.c | 60 ++++++++++++++++----------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit 42ae2922a68ac8d68927ccb052b486f34e5fba71 Author: Matthias Kaehlcke Date: Wed Apr 5 11:34:58 2017 -0700 crypto: arm64/sha - Add constant operand modifier to ASM_EXPORT The operand is an integer constant, make the constness explicit by adding the modifier. This is needed for clang to generate valid code and also works with gcc. Also change the constraint of the operand from 'I' ("Integer constant that is valid as an immediate operand in an ADD instruction", AArch64) to 'i' ("An immediate integer operand"). Based-on-patch-from: Greg Hackmann Signed-off-by: Greg Hackmann Signed-off-by: Matthias Kaehlcke Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/sha1-ce-glue.c | 2 +- arch/arm64/crypto/sha2-ce-glue.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6239879b415eb7cf96d418c8a2090ecd6f310aad Author: Tobias Regnery Date: Mon Apr 10 11:52:42 2017 +0200 phy: qcom-qusb2: add NVMEM dependency With CONFIG_NVMEM=m and CONFIG_PHY_QCOM_QUSB2=y we get a link error from calls to devm_nvmem_cell_get and nvmem_cell_read: drivers/built-in.o: In function `qusb2_phy_probe': binder.c:(.text+0x4750): undefined reference to `devm_nvmem_cell_get' drivers/built-in.o: In function `qusb2_phy_init': binder.c:(.text+0x489c): undefined reference to `nvmem_cell_read' Fix this by adding a Kconfig dependency to ensure we can only have this driver built in when the nvmem functions are also built in or we see the empty stub functions. We can still build this driver as a module when the nvmem core is build as module, too. Fixes: deffad633413 ("phy: qcom-qusb2: New driver for QUSB2 PHY on Qcom chips") Signed-off-by: Tobias Regnery Signed-off-by: Kishon Vijay Abraham I drivers/phy/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 9d685ed77b1b07411c2a0a3e38f567e17f1a247a Author: Sjoerd Simons Date: Wed Apr 5 16:06:10 2017 +0200 phy: rockchip-usb: Add vbus regulator support. On rockchip devices vbus is supplied by a separate power supply, often through a regulator. Add support for describing the the regulator in device-tree following the same convention as several other usb phy's. Signed-off-by: Sjoerd Simons Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/rockchip-usb-phy.txt | 1 + drivers/phy/phy-rockchip-usb.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) commit fff3364a637796611c06f59a6f2be61685d99bfe Author: Rafał Miłecki Date: Sun Apr 2 18:55:22 2017 +0200 phy: bcm-ns-usb3: split all writes into reg & val pairs So far all the PHY initialization was implemented using some totally magic values. There was some pattern there but it wasn't clear what is it about. Thanks to the patch submitted by Broadcom: [PATCH 5/6] phy: Add USB3 PHY support for Broadcom NSP SoC and the upstream "iproc-mdio" driver we now know there is a MDIO bus underneath with PHY(s) and their registers. It allows us to clean the driver a bit by making all these values less magical. The next step is switching to using a proper MDIO layer. Signed-off-by: Rafał Miłecki Acked-by: Jon Mason Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-bcm-ns-usb3.c | 69 ++++++++++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 20 deletions(-) commit e78f3d15e115e8e764d4b1562b4fa538f2e22f6b Author: Vivek Gautam Date: Thu Apr 6 11:21:25 2017 +0530 phy: qcom-qmp: new qmp phy driver for qcom-chipsets Qualcomm SOCs have QMP phy controller that provides support to a number of controller, viz. PCIe, UFS, and USB. Add a new driver, based on generic phy framework, for this phy controller. Signed-off-by: Vivek Gautam Tested-by: Srinivas Kandagatla Reviewed-by: Stephen Boyd Signed-off-by: Kishon Vijay Abraham I drivers/phy/Kconfig | 8 + drivers/phy/Makefile | 1 + drivers/phy/phy-qcom-qmp.c | 1153 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1162 insertions(+) commit 3a9d31cd8e2925474c9bbe41ea32966078eece59 Author: Vivek Gautam Date: Thu Apr 6 11:21:24 2017 +0530 dt-bindings: phy: Add support for QMP phy Qualcomm chipsets have QMP phy controller that provides support to a number of controller, viz. PCIe, UFS, and USB. Adding dt binding information for the same. Signed-off-by: Vivek Gautam Reviewed-by: Stephen Boyd Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/qcom-qmp-phy.txt | 106 +++++++++++++++++++++ 1 file changed, 106 insertions(+) commit ca04d9d3e1b141f8aeca434c30f876aadf0b5fbf Author: Vivek Gautam Date: Thu Apr 6 11:21:23 2017 +0530 phy: qcom-qusb2: New driver for QUSB2 PHY on Qcom chips PHY transceiver driver for QUSB2 phy controller that provides HighSpeed functionality for DWC3 controller present on Qualcomm chipsets. Signed-off-by: Vivek Gautam Reviewed-by: Stephen Boyd Signed-off-by: Kishon Vijay Abraham I drivers/phy/Kconfig | 10 + drivers/phy/Makefile | 1 + drivers/phy/phy-qcom-qusb2.c | 493 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 504 insertions(+) commit e9eef1e596072baa6fba791b110855988a110349 Author: Vivek Gautam Date: Thu Apr 6 11:21:22 2017 +0530 dt-bindings: phy: Add support for QUSB2 phy Qualcomm chipsets have QUSB2 phy controller that provides HighSpeed functionality for DWC3 controller. Adding dt binding information for the same. Signed-off-by: Vivek Gautam Reviewed-by: Stephen Boyd Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/qcom-qusb2-phy.txt | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit d99b1ab3235f1060f7a70d870a50a15075695a13 Author: Meng Dongyang Date: Mon Mar 6 09:29:38 2017 +0800 phy: rockchip-inno-usb2: add support of usb2-phy for rk3328 Add usb2-phy config information in the data of match table for rk3328. Signed-off-by: Meng Dongyang Reviewed-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-rockchip-inno-usb2.c | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 40544ba5911d9307372882d82377bd9526a11cea Author: Meng Dongyang Date: Mon Mar 6 09:29:37 2017 +0800 dt-bindings: add DT bindings for usb2-phy grf Adds the device tree bindings description for usb2-phy grf of RK3328 platform. Signed-off-by: Meng Dongyang Reviewed-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/soc/rockchip/grf.txt | 4 ++++ 1 file changed, 4 insertions(+) commit e3462f9e073ea34c1407a85d3c5fa773202b6797 Author: Meng Dongyang Date: Mon Mar 6 09:29:36 2017 +0800 dt-bindings: phy-rockchip-inno-usb2: add assign clock property in usb2-phy node On some platform such as RK3328, the 480m clock may need to assign clock parent in dts in stead of clock driver. So this patch add property of assigned-clocks and assigned-clock-parents to assign parent for 480m clock. Signed-off-by: Meng Dongyang Acked-by: Rob Herring Reviewed-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 5e3bf9c5b70b815f3ded52c0e82aca4fa00c6fc6 Author: Chunfeng Yun Date: Fri Mar 31 15:35:35 2017 +0800 dt-bindings: phy-mt65xx-usb: add support for new version phy add a new compatible string for "mt2712", and move reference clock into each port node; Signed-off-by: Chunfeng Yun Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/phy-mt65xx-usb.txt | 93 +++++++++++++++++++--- 1 file changed, 80 insertions(+), 13 deletions(-) commit c0250fe50eed7f233dc7a19eb4f58c1000caa968 Author: Chunfeng Yun Date: Fri Mar 31 15:35:32 2017 +0800 phy: phy-mt65xx-usb3: disable 100uA extraction from SS port to HS port There will be a problem if SS port is diasbled and HS port extracts 100uA from SS port, so disable extract 100uA from SS port in the case, when disable it, PA0_RG_USB20_INTR_EN should be set, otherwise HS port only works on LS. Signed-off-by: Chunfeng Yun Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-mt65xx-usb3.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 8d6e1957f14dbfb4c9510cd8179e3c8c1f488433 Author: Chunfeng Yun Date: Fri Mar 31 15:35:31 2017 +0800 phy: phy-mt65xx-usb3: add support for new version phy There are some variations from mt2701 to mt2712: 1. banks shared by multiple ports are put back into each port, such as SPLLC and U2FREQ; 2. add a new bank MISC for u2port, and CHIP for u3port; 3. bank's offset in each port are also rearranged; Signed-off-by: Chunfeng Yun Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-mt65xx-usb3.c | 346 ++++++++++++++++++++++++++---------------- 1 file changed, 218 insertions(+), 128 deletions(-) commit 15de15c6b45b87a759321cc49218345fe086dbe5 Author: Chunfeng Yun Date: Fri Mar 31 15:35:30 2017 +0800 phy: phy-mt65xx-usb3: move clock from phy node into port nodes each port has its own reference clock, the HighSpeed port is 48M, and the SuperSpeed port is usually 26M, put them into port node for flexibility, this can close clock if the port is not used. Signed-off-by: Chunfeng Yun Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-mt65xx-usb3.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit 04466efca58f69f0a220af63de5d3c597beb477d Author: Chunfeng Yun Date: Fri Mar 31 15:35:29 2017 +0800 phy: phy-mt65xx-usb3: split SuperSpeed port into two ones Currently usb3 port in fact includes two sub-ports, but it is not flexible for some cases, such as following one: usb3 port0 includes u2port0 and u3port0; usb2 port0 includes u2port1; If wants to support only HS, we can use u2port0 or u2port1, when select u2port0, u3port0 is not needed; If wants to support SS, we can compound u2port0 and u3port0, or u2port1 and u3port0, if select latter one, u2port0 is not needed. So it's more flexible to split usb3 port into two ones and also try best to save power by disabling unnecessary ports. Signed-off-by: Chunfeng Yun Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-mt65xx-usb3.c | 149 +++++++++++++++++++++--------------------- 1 file changed, 75 insertions(+), 74 deletions(-) commit 98cd83a056e9afc342caaae7d181e33cce18f3c1 Author: Chunfeng Yun Date: Fri Mar 31 15:35:28 2017 +0800 phy: phy-mt65xx-usb3: increase LFPS filter threshold Increase LFPS filter threshold to avoid some fake remote wakeup signal which cause U3 link fail and link to U2 only at about 0.01% probability. Signed-off-by: Chunfeng Yun Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-mt65xx-usb3.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1969f6952bf08758234fda6d53d993e91607c857 Author: Chunfeng Yun Date: Fri Mar 31 15:35:27 2017 +0800 phy: phy-mt65xx-usb3: improve RX detection stable time The default value of RX detection stable time is 10us, and this margin is too big for some critical cases which cause U3 link fail and link to U2(probability is about 1%). So change it to 5us. Signed-off-by: Chunfeng Yun Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-mt65xx-usb3.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit c957b7d236ed4849c2ab4466fb52924006d09cb7 Author: Icenowy Zheng Date: Wed Apr 5 02:45:16 2017 +0800 phy: sun4i-usb: enable PHY0 dual route switching for A64 USB PHY Allwinner A64 SoC features a switchable PHY0 like the one in H3, which can switch between a MUSB controller and a pair of OHCI/EHCI controller. Enable PHY0 route auto switching for A64. Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-sun4i-usb.c | 1 + 1 file changed, 1 insertion(+) commit 441a681b8843474c9796b50c35794ff102701f37 Author: Yoshihiro Shimoda Date: Tue Mar 14 08:37:40 2017 +0900 phy: rcar-gen3-usb2: fix implementation for runtime PM This patch fixes an issue that this driver doesn't take care of the runtime PM. This code assumed that devm_phy_create() called pm_runtime_enable(dev), but it misunderstood the dev_phy_create()'s specification. This driver should call its own pm_runtime_enable() before dev_phy_create(). Fixes: f3b5a8d9b50d ("phy: rcar-gen3-usb2: Add R-Car Gen3 USB2 PHY driver") Signed-off-by: Yoshihiro Shimoda Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-rcar-gen3-usb2.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit 7dfa3026db0f5de9928d1047f80a0e10b0269793 Author: Colin Ian King Date: Wed Feb 22 23:30:52 2017 +0000 phy: rockchip-inno-usb2: fix spelling mistake: "connecetd" -> "connected" trivial fix to spelling mistake in dev_dbg message, also rejoin lines to clean up checkpatch warning Signed-off-by: Colin Ian King Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-rockchip-inno-usb2.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 7a66647b25b68c2a2da51bc9845fc91dd27529a9 Author: Krzysztof Kozlowski Date: Wed Mar 29 13:59:57 2017 +0530 phy: exynos: Use one define for enable bit There is no need for separate defines for Exynos4 and Exynos5 phy enable bit and MIPI phy reset bits. In both cases there are the same so simplify it. This reduces number of defines and allows removal of one header file. Signed-off-by: Krzysztof Kozlowski Acked-by: Lee Jones Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-exynos-dp-video.c | 5 ++-- drivers/phy/phy-exynos-mipi-video.c | 39 ++++++++++++++--------------- drivers/phy/phy-exynos5-usbdrd.c | 5 ++-- include/linux/soc/samsung/exynos-regs-pmu.h | 3 ++- 4 files changed, 25 insertions(+), 27 deletions(-) commit 33e9a6aab6f3469ca8a592113e6edc0b2b7bbbb5 Merge: cf09ee5 f7f6c06 Author: Kishon Vijay Abraham I Date: Mon Apr 10 16:43:09 2017 +0530 Merge tag 'ib-mfd-phy-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into next Immutable branch between MFD and PHY due for the v4.12 merge window commit 0538bee6fdec9b79910c1c9835e79be75d0e1bdf Author: Hans Verkuil Date: Mon Apr 3 11:50:53 2017 -0300 [media] MAINTAINERS: update atmel-isi.c path The driver moved to drivers/media/platform/atmel. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf09ee599714e630ea610ff4c4fd8c71e2b1f616 Author: Krzysztof Kozlowski Date: Tue Mar 14 18:46:51 2017 +0200 phy: exynos-mipi-video: Use consistent method to address phy registers Exynos4 MIPI phy registers are defined with macro calculating the offset for given phyN. Use the same method for Exynos5420 to be consistent. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-exynos-mipi-video.c | 20 ++++++++++---------- include/linux/soc/samsung/exynos-regs-pmu.h | 4 +--- 2 files changed, 11 insertions(+), 13 deletions(-) commit 424c9841480f1761285748b08aa85ac774a30db1 Author: Krzysztof Kozlowski Date: Tue Mar 14 18:46:50 2017 +0200 phy: exynos5: Remove duplicated defines of PHY register defines Phy drivers access PMU region through regmap provided by exynos-pmu driver. However there is no need to duplicate defines for PMU registers. Instead just use whatever is defined in exynos-regs-pmu.h. This reduces number of defines. Suggested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Acked-by: Lee Jones Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-exynos-dp-video.c | 1 + drivers/phy/phy-exynos5-usbdrd.c | 1 + include/linux/mfd/syscon/exynos5-pmu.h | 27 --------------------------- include/linux/soc/samsung/exynos-regs-pmu.h | 8 ++++++++ 4 files changed, 10 insertions(+), 27 deletions(-) commit 5812f0106c449533d0eea0b16a6244ec3d6d4abb Author: Krzysztof Kozlowski Date: Wed Mar 29 13:55:57 2017 +0530 phy: exynos4: Remove duplicated defines of PHY register defines Phy drivers access PMU region through regmap provided by exynos-pmu driver. However there is no need to duplicate defines for PMU registers. Instead just use whatever is defined in exynos-regs-pmu.h. Additionally MIPI PHY registers for Exynos5433 start from the same address as Exynos4 and Exynos5250 so re-use existing defines. This reduces number of defines and allows removal of one header file. Suggested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Acked-by: Lee Jones Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-exynos-mipi-video.c | 12 ++++++------ include/linux/mfd/syscon/exynos5-pmu.h | 3 --- include/linux/soc/samsung/exynos-regs-pmu.h | 9 ++++++++- 3 files changed, 14 insertions(+), 10 deletions(-) commit 5b85927e5cc4d2105e2421a92519da3b2a73a142 Author: Martin Blumenstingl Date: Sat Mar 4 11:20:11 2017 +0100 phy: meson8b-usb2: fix offsets for some of the registers The register offsets for REG_DBG_UART (and all following) were off by 0x4. This was not a problem yet because these registers are currently not used by the driver. Signed-off-by: Martin Blumenstingl Reviewed-by: Jerome Brunet Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-meson8b-usb2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3ecc25e12f0e210d56fcca110a8144e50db05905 Author: Icenowy Zheng Date: Sat Mar 25 22:50:11 2017 +0800 phy: sun4i-usb: support automatically switch PHY0 route to MUSB/HCI On newer Allwinner SoCs (H3 and after), the PHY0 node is routed to both MUSB controller for peripheral and host support (the host support is slightly broken), and a pair of EHCI/OHCI controllers, which provide a better support for host mode. Add support for automatically switch the route of PHY0 according to the status of dr_mode and id det pin. Only H3 have this function enabled in this patch, as further SoCs will be tested later and then have it enabled. As H5 is reusing the PHY driver of H3, this function is also enabled. Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-sun4i-usb.c | 50 ++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 17 deletions(-) commit 864ebdf0bd4166e64c21e95b72d770eaa33122aa Author: Icenowy Zheng Date: Sat Mar 25 22:50:10 2017 +0800 phy: sun4i-usb: add PHYCTL offset for H3 SoC The config structure of H3 in phy-sun4i-usb driver have the PHYCTL register offset missing. Add it. From the BSP source code, we know that the offset should be 0x10. Signed-off-by: Icenowy Zheng Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-sun4i-usb.c | 1 + 1 file changed, 1 insertion(+) commit d699c1d0860aa8b3031d56ec861e6c2f2e37df95 Author: Icenowy Zheng Date: Sat Mar 25 22:50:09 2017 +0800 phy: sun4i-usb: change PHYCTL register clearing code It seems that all SoCs with the PHYCTL register offset as 0x10 need the PHYCTL register to be cleared before it's written. Change PHYCTL register clearing code to judge whether clearing is needed based on the PHYCTL offset. Signed-off-by: Icenowy Zheng Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-sun4i-usb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a0b1910e857897ae6c420fa0ece52c87d7cff373 Author: Icenowy Zheng Date: Sat Mar 25 22:50:08 2017 +0800 dt: bindings: add pmu0 regs for USB PHYs on Allwinner H3/V3s/A64 Allwinner H3/V3s/A64 SoCs have a special USB PHY0 that can route to two controllers: one is MUSB and the other is a EHCI/OHCI pair. When it's routed to EHCI/OHCI pair, it will needs a "pmu0" regs to tweak, like other EHCI/OHCI pairs in Allwinner SoCs. Add this to the binding of USB PHYs on Allwinner H3/V3s/A64. Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt | 1 + 1 file changed, 1 insertion(+) commit 0ccf7d87fb4a9dcbb55156c846e2593fe77c206b Author: Krzysztof Kozlowski Date: Tue Mar 14 18:46:52 2017 +0200 mfd: exynos-lpass: Use common soc/exynos-regs-pmu.h header The MFD-specific header will go away because it duplicates defines from exynos-regs-pmu.h. Reported-by: kbuild test robot Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Lee Jones Signed-off-by: Kishon Vijay Abraham I drivers/mfd/exynos-lpass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4574a92c59d1d8bb23ed39a95da2933d20077105 Author: Paul Gortmaker Date: Thu Feb 23 16:46:03 2017 -0500 phy: phy-exynos-pcie: make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/phy/Kconfig:config PHY_EXYNOS_PCIE drivers/phy/Kconfig: bool "Exynos PCIe PHY driver" ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. Since 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: Jaehoon Chung Cc: Jingoo Han Cc: Kishon Vijay Abraham I Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Pankaj Dubey Cc: Vivek Gautam Cc: Javier Martinez Canillas Cc: Bjorn Helgaas Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-exynos-pcie.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 9f994253c807e868fbcc1f2fac3367072f4e77e2 Author: Hans Verkuil Date: Mon Dec 12 11:11:25 2016 -0200 [media] ov2640: update bindings Update the bindings for this device based on a working DT example. Signed-off-by: Hans Verkuil Acked-by: Rob Herring Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/ov2640.txt | 23 +++++++++------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 9823f003b96c2995d91fdca2456cd2b2b3c4246e Author: Hans Verkuil Date: Tue Aug 16 16:56:43 2016 -0300 [media] ov2640: fix colorspace handling The colorspace is independent of whether YUV or RGB is sent to the SoC. Fix this. Signed-off-by: Hans Verkuil Acked-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/ov2640.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) commit c1d82b89538032718cba30b5b1fe192dfb343212 Author: Hans Verkuil Date: Wed Sep 21 03:53:25 2016 -0300 [media] atmel-isi: move out of soc_camera to atmel Move this out of the soc_camera directory into the atmel directory where it belongs. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Makefile | 1 + drivers/media/platform/atmel/Kconfig | 11 +- drivers/media/platform/atmel/Makefile | 1 + drivers/media/platform/atmel/atmel-isi.c | 1368 +++++++++++++++++++++++++ drivers/media/platform/atmel/atmel-isi.h | 138 +++ drivers/media/platform/soc_camera/Kconfig | 10 - drivers/media/platform/soc_camera/Makefile | 1 - drivers/media/platform/soc_camera/atmel-isi.c | 1368 ------------------------- drivers/media/platform/soc_camera/atmel-isi.h | 138 --- 9 files changed, 1518 insertions(+), 1518 deletions(-) commit d12c9088c0b2a0973ca8d9508481d544d62b8a8b Author: Hans Verkuil Date: Tue Aug 16 16:56:43 2016 -0300 [media] atmel-isi: remove dependency of the soc-camera framework This patch converts the atmel-isi driver from a soc-camera driver to a driver that is stand-alone. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/Kconfig | 3 +- drivers/media/platform/soc_camera/atmel-isi.c | 1193 +++++++++++++++---------- 2 files changed, 698 insertions(+), 498 deletions(-) commit e48f4eeac14dc06fb92c12fd1f7452ada30b83cc Author: Hans Verkuil Date: Mon Dec 12 11:11:35 2016 -0200 [media] atmel-isi: update device tree bindings documentation The original bindings documentation was incomplete (missing pinctrl-names, missing endpoint node properties) and the example was out of date. Add the missing information and tidy up the text. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/atmel-isi.txt | 91 +++++++++++++--------- 1 file changed, 53 insertions(+), 38 deletions(-) commit a0c4164e0ec04a0a0d947285a923864b405ce96b Author: Hans Verkuil Date: Mon Dec 12 12:08:18 2016 -0200 [media] ov7670: add devicetree support Add DT support. Use it to get the reset and pwdn pins (if there are any). Tested with one sensor requiring reset/pwdn and one sensor that doesn't have reset/pwdn pins. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov7670.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) commit 0a024d634cee94e9f3e3d16d90b049522845c238 Author: Hans Verkuil Date: Tue Aug 16 16:00:57 2016 -0300 [media] ov7670: get xclk Get the clock for this sensor. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov7670.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit d569e90bb74c7f69dc56a808effc49c1da055427 Author: Hans Verkuil Date: Tue Aug 16 15:57:46 2016 -0300 [media] ov7670: fix g/s_parm Drop unnecesary memset. Drop the unnecessary extendedmode check and set the V4L2_CAP_TIMEPERFRAME capability. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov7670.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7d1b8619eaefc7a1288273964a04cf640f3af33f Author: Hans Verkuil Date: Tue Aug 16 15:55:58 2016 -0300 [media] ov7670: call v4l2_async_register_subdev Add v4l2-async support for this driver. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov7670.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit bba582894a7efd8d7aaa53cf45e5b090c50c3937 Author: Hans Verkuil Date: Mon Dec 12 12:08:30 2016 -0200 [media] ov7670: document device tree bindings Add binding documentation and add that file to the MAINTAINERS entry. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/ov7670.txt | 43 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 44 insertions(+) commit c4a0968aea0d887b15d8df15399f8e0dc614aecf Author: Daniel Patrick Johnson Date: Thu Mar 2 20:43:20 2017 -0300 [media] uvcvideo: Add support for Intel SR300 depth camera Add support for Intel SR300 depth camera in uvc driver. This includes adding three uvc GUIDs for the required pixel formats and updating the uvc driver GUID-to-4cc tables with the new formats. Signed-off-by: Daniel Patrick Johnson Signed-off-by: Aviv Greenberg Signed-off-by: Evgeni Raikhel Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_driver.c | 15 +++++++++++++++ drivers/media/usb/uvc/uvcvideo.h | 9 +++++++++ 2 files changed, 24 insertions(+) commit 5df082e2312c73e6f775c046286455acea9371ea Author: Evgeni Raikhel Date: Thu Mar 2 20:43:19 2017 -0300 [media] Documentation: Intel SR300 Depth camera INZI format Provide the frame structure and data layout of V4L2-PIX-FMT-INZI format utilized by Intel SR300 Depth camera. Signed-off-by: Evgeni Raikhel Acked-by: Hans Verkuil Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/depth-formats.rst | 1 + Documentation/media/uapi/v4l/pixfmt-inzi.rst | 81 ++++++++++++++++++++++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/videodev2.h | 1 + 4 files changed, 84 insertions(+) commit 52276df0b1ce3a833293f4b57fc3b62d6f540901 Author: Kieran Bingham Date: Mon Apr 3 08:25:31 2017 -0300 [media] uvcvideo: Don't record timespec_sub The statistics function subtracts two timespecs manually. A helper is provided by the kernel to do this. Replace the implementation, using the helper. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_video.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 360a3a90c6261fe24a959ff38f8f6c3a8468f23c Author: Kieran Bingham Date: Mon Apr 3 08:25:32 2017 -0300 [media] uvcvideo: Fix empty packet statistic The frame counters are inadvertently counting packets with content as empty. Fix it by correcting the logic expression Fixes: 7bc5edb00bbd [media] uvcvideo: Extract video stream statistics Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f098268bd68b7bf1ec814ea2bf0d05c7505b8e43 Author: Hans Verkuil Date: Mon Apr 3 05:21:07 2017 -0300 [media] v4l2-ctrls.c: fix RGB quantization range control menu All control menus use the english capitalization rules of titles. The only menu not following these rules is the RGB Quantization Range control menu. Fix this. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65f921647f4c89a2068478c89691f39b309b58f7 Author: Johan Hovold Date: Mon Mar 13 09:53:58 2017 -0300 [media] cx231xx-audio: fix NULL-deref at probe Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer or accessing memory beyond the endpoint array should a malicious device lack the expected endpoints. Fixes: e0d3bafd0258 ("V4L/DVB (10954): Add cx231xx USB driver") Cc: stable # 2.6.30 Cc: Sri Deevi Signed-off-by: Johan Hovold Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-audio.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit fff1abc4d54e469140a699612b4db8d6397bfcba Author: Johan Hovold Date: Mon Mar 13 09:53:57 2017 -0300 [media] cx231xx-audio: fix init error path Make sure to release the snd_card also on a late allocation error. Fixes: e0d3bafd0258 ("V4L/DVB (10954): Add cx231xx USB driver") Cc: stable # 2.6.30 Cc: Sri Deevi Signed-off-by: Johan Hovold Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-audio.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit 0cd273bb5e4d1828efaaa8dfd11b7928131ed149 Author: Johan Hovold Date: Mon Mar 13 09:53:56 2017 -0300 [media] cx231xx-cards: fix NULL-deref at probe Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer or accessing memory beyond the endpoint array should a malicious device lack the expected endpoints. Fixes: e0d3bafd0258 ("V4L/DVB (10954): Add cx231xx USB driver") Cc: stable # 2.6.30 Cc: Sri Deevi Signed-off-by: Johan Hovold Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-cards.c | 45 +++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 5 deletions(-) commit eacb975b48272f54532b62f515a3cf7eefa35123 Author: Johan Hovold Date: Mon Mar 13 09:53:55 2017 -0300 [media] usbvision: fix NULL-deref at probe Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer or accessing memory beyond the endpoint array should a malicious device lack the expected endpoints. Fixes: 2a9f8b5d25be ("V4L/DVB (5206): Usbvision: set alternate interface modification") Cc: stable # 2.6.21 Cc: Thierry MERLE Signed-off-by: Johan Hovold Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/usbvision/usbvision-video.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit d5823511c0f8719a39e72ede1bce65411ac653b7 Author: Johan Hovold Date: Mon Mar 13 09:53:54 2017 -0300 [media] dib0700: fix NULL-deref at probe Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Fixes: c4018fa2e4c0 ("[media] dib0700: fix RC support on Hauppauge Nova-TD") Cc: stable # 3.16 Cc: Mauro Carvalho Chehab Signed-off-by: Johan Hovold Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dib0700_core.c | 3 +++ 1 file changed, 3 insertions(+) commit bff8ff6528bba99ca2e405dd59aaf06f0a4b5f65 Author: Hans Verkuil Date: Fri Mar 31 05:58:39 2017 -0300 [media] vidioc-enumin/output.rst: improve documentation The V4L2_INPUT_TYPE_CAMERA and V4L2_OUTPUT_TYPE_ANALOG descriptions were hopelessly out of date. Fix this, and also fix a few style issues in these documents. Finally add the missing documentation for V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY (only used by the zoran driver). Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-enuminput.rst | 11 ++++++----- Documentation/media/uapi/v4l/vidioc-enumoutput.rst | 15 ++++++++------- 2 files changed, 14 insertions(+), 12 deletions(-) commit ba7ed691dcce1a4921ea92b8bf75af52f5e504f6 Author: Hans Verkuil Date: Thu Mar 30 09:05:25 2017 -0300 [media] v4l2-compat-ioctl32: VIDIOC_S_EDID should return all fields on error Most ioctls do not have to write back the contents of the argument if an error is returned. But VIDIOC_S_EDID is an exception together with the EXT_CTRLS ioctls (already handled correctly). Add this exception to v4l2-compat-ioctl32. This fixes a compliance error when using compat32 and trying to set a new EDID with more blocks than the hardware supports. In that case the driver will return -E2BIG and set edid.blocks to the actual maximum number of blocks. This field was never copied back to userspace due to this bug. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3369cde0afc1e6aa405768ccc83a406d385055ea Author: Hans Verkuil Date: Wed Mar 29 04:59:12 2017 -0300 [media] video.rst: a sensor is also considered to be a physical input Add the line "Camera sensors are also considered to be a video input." In practice all non-MC drivers for sensors support the input ioctls, and the compliance test actually tests for the presence of these ioctls. So clarify the documentation by explicitly mentioning sensors. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/video.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8bcd84a4a37c88d8304ca3a64f0461a51487e239 Author: Douglas Leung Date: Mon Mar 13 16:36:37 2017 +0100 MIPS: math-emu: Fix BC1EQZ and BC1NEZ condition handling Correct the treatment of branching conditions for BC1EQZ and BC1NEZ instructions in function isBranchInstr(). Previously, corresponding conditions were swapped, which in turn meant that, for these two instructions, function isBranchInstr() returned wrong value in its output parameter contpc. This change is actually an extension of the fix done by the commit 93583e178ebf ("MIPS: math-emu: Fix BC1{EQ,NE}Z emulation"). That commit dealt with a similar problem in function cop1Emulate(), while this commit deals with condition handling in function isBranchInstr(). The code styles of changes in these two commits are kept as consistent as possible. Signed-off-by: Douglas Leung Signed-off-by: Miodrag Dinic Signed-off-by: Aleksandar Markovic Reviewed-by: Paul Burton Cc: james.hogan@imgtec.com Cc: leonid.yegoshin@imgtec.com Cc: petar.jovanovic@imgtec.com Cc: goran.ferenc@imgtec.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15489/ Signed-off-by: Ralf Baechle arch/mips/math-emu/cp1emu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 411dac79cc2ed80f7e348ccc23eb4d8b0ba9f6d5 Author: Aleksandar Markovic Date: Mon Mar 13 16:36:36 2017 +0100 MIPS: r2-on-r6-emu: Clear BLTZALL and BGEZALL debugfs counters Add missing clearing of BLTZALL and BGEZALL emulation counters in function mipsr2_stats_clear_show(). Previously, it was not possible to reset BLTZALL and BGEZALL emulation counters - their value remained the same even after explicit request via debugfs. As far as other related counters are concerned, they all seem to be properly cleared. This change affects debugfs operation only, core R2 emulation functionality is not affected. Signed-off-by: Aleksandar Markovic Reviewed-by: Paul Burton Cc: james.hogan@imgtec.com Cc: leonid.yegoshin@imgtec.com Cc: douglas.leung@imgtec.com Cc: petar.jovanovic@imgtec.com Cc: miodrag.dinic@imgtec.com Cc: goran.ferenc@imgtec.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15517/ Signed-off-by: Ralf Baechle arch/mips/kernel/mips-r2-to-r6-emul.c | 2 ++ 1 file changed, 2 insertions(+) commit 5bba7aa4958e271c3ffceb70d47d3206524cf489 Author: Leonid Yegoshin Date: Mon Mar 13 16:36:35 2017 +0100 MIPS: r2-on-r6-emu: Fix BLEZL and BGTZL identification Fix the problem of inaccurate identification of instructions BLEZL and BGTZL in R2 emulation code by making sure all necessary encoding specifications are met. Previously, certain R6 instructions could be identified as BLEZL or BGTZL. R2 emulation routine didn't take into account that both BLEZL and BGTZL instructions require their rt field (bits 20 to 16 of instruction encoding) to be 0, and that, at same time, if the value in that field is not 0, the encoding may represent a legitimate MIPS R6 instruction. This means that a problem could occur after emulation optimization, when emulation routine tried to pipeline emulation, picked up a next candidate, and subsequently misrecognized an R6 instruction as BLEZL or BGTZL. It should be said that for single pass strategy, the problem does not happen because CPU doesn't trap on branch-compacts which share opcode space with BLEZL/BGTZL (but have rt field != 0, of course). Signed-off-by: Leonid Yegoshin Signed-off-by: Miodrag Dinic Signed-off-by: Aleksandar Markovic Reported-by: Douglas Leung Reviewed-by: Paul Burton Cc: james.hogan@imgtec.com Cc: petar.jovanovic@imgtec.com Cc: goran.ferenc@imgtec.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15456/ Signed-off-by: Ralf Baechle arch/mips/kernel/mips-r2-to-r6-emul.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 17c99d9421695a0e0de18bf1e7091d859e20ec1d Author: Huacai Chen Date: Thu Mar 16 21:00:28 2017 +0800 MIPS: Loongson-3: Select MIPS_L1_CACHE_SHIFT_6 Some newer Loongson-3 have 64 bytes cache lines, so select MIPS_L1_CACHE_SHIFT_6. Signed-off-by: Huacai Chen Cc: John Crispin Cc: Steven J . Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15755/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 294d62743754f1fefefccccb09f8deec48f00969 Author: Ralf Baechle Date: Tue Mar 21 22:40:43 2017 +0100 MIPS: Delete redundant definition of SMP_CACHE_BYTES. already defines SMP_CACHE_BYTES as L1_CACHE_BYTES. This change results in a build error in which directly includes . Fix this by including instead. Signed-off-by: Ralf Baechle arch/mips/include/asm/cache.h | 2 -- arch/mips/include/asm/cpu-info.h | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) commit 4437637c3277fa9aba4e443329b5db3b6d34eedf Author: Ralf Baechle Date: Tue Mar 21 22:14:30 2017 +0100 MIPS: Delete unused definition of SMP_CACHE_SHIFT. Signed-off-by: Ralf Baechle arch/mips/include/asm/cache.h | 1 - 1 file changed, 1 deletion(-) commit 296e46db00731b05c796e4f1db4bfe2e0efd80c1 Author: Ralf Baechle Date: Tue Mar 21 22:13:06 2017 +0100 MIPS: Don't unnecessarily include kmalloc.h into . Signed-off-by: Ralf Baechle arch/mips/include/asm/cache.h | 2 -- 1 file changed, 2 deletions(-) commit 5373633cc9253ba82547473e899cab141c54133e Author: Florian Fainelli Date: Thu Mar 16 18:06:12 2017 -0700 MIPS: Disable Werror when W= is set Using any value for W= will lead to a ton of warnings which are turned into fatal errors because MIPS adds -Werror to arch/mips/*. Signed-off-by: Florian Fainelli Cc: linux-mips@linux-mips.org Cc: james.hogan@imgtec.com Patchwork: https://patchwork.linux-mips.org/patch/15785/ Signed-off-by: Ralf Baechle arch/mips/Kbuild | 2 ++ 1 file changed, 2 insertions(+) commit e96b1b0648adf7d80606a99e9596177186fd90ab Author: Steven J. Hill Date: Thu Mar 9 08:16:03 2017 -0600 MIPS: Octeon: Clean up platform code. Remove unused headers and fix warnings from checkpatch. Signed-off-by: Steven J. Hill Acked-by: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15407/ Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/octeon-platform.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 97b702981da0aa042007cd5b23a0f3904d470ec3 Author: Steven J. Hill Date: Thu Mar 9 08:31:30 2017 -0600 MIPS: Octeon: Remove unused PCIERCX types and macros. Remove all unused bitfields and macros. Convert the remaining bitfields to use __BITFIELD_FIELD instead of #ifdef. [ralf@linux-mips.org: Add inclusions of as necessary.] Signed-off-by: Steven J. Hill Acked-by: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15408/ Signed-off-by: Ralf Baechle arch/mips/include/asm/octeon/cvmx-pciercx-defs.h | 3225 ++-------------------- 1 file changed, 209 insertions(+), 3016 deletions(-) commit 7fd57ab9d9cff7ef0181c1e5db0ebd63cd514d6a Author: Steven J. Hill Date: Thu Mar 9 08:15:38 2017 -0600 MIPS: Octeon: Fix compile error when USB is not enabled. Move all USB platform code to one place within the file. Signed-off-by: Steven J. Hill Acked-by: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15406/ Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/octeon-platform.c | 97 ++++++++++++++++--------------- 1 file changed, 49 insertions(+), 48 deletions(-) commit 930cbb73ee7d0e396987efccc24112c4469c03dc Author: Steven J. Hill Date: Thu Mar 9 08:15:16 2017 -0600 MIPS: Octeon: Remove unused SLI types and macros. Remove all unused bitfields and macros. Convert the remaining bitfields to use __BITFIELD_FIELD instead of #ifdef. [ralf@linux-mips.org: Add inclusions of as necessary.] Signed-off-by: Steven J. Hill Acked-by: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15405/ Signed-off-by: Ralf Baechle arch/mips/include/asm/octeon/cvmx-sli-defs.h | 3541 +------------------------- arch/mips/pci/pcie-octeon.c | 4 +- 2 files changed, 76 insertions(+), 3469 deletions(-) commit 15f6847923a87040ebe962e34eea48711c5d0582 Author: Steven J. Hill Date: Thu Mar 9 08:14:15 2017 -0600 MIPS: Octeon: Remove unused L2C types and macros. Remove all unused bitfields and macros. Convert the remaining bitfields to use __BITFIELD_FIELD instead of #ifdef. [ralf@linux-mips.org: Add inclusions of as necessary.] Signed-off-by: Steven J. Hill Acked-by: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15403/ Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/executive/cvmx-l2c.c | 139 +- arch/mips/cavium-octeon/executive/octeon-model.c | 21 +- arch/mips/include/asm/octeon/cvmx-l2c-defs.h | 3193 +--------------------- arch/mips/include/asm/octeon/cvmx-l2c.h | 59 +- arch/mips/include/asm/octeon/cvmx-l2d-defs.h | 526 ---- arch/mips/include/asm/octeon/cvmx-l2t-defs.h | 286 +- arch/mips/include/asm/octeon/cvmx.h | 3 +- 7 files changed, 305 insertions(+), 3922 deletions(-) commit 3377e227af441aff710726437adc20efc359fd9c Author: Alex Belits Date: Thu Feb 16 17:27:34 2017 -0800 MIPS: Add 48-bit VA space (and 4-level page tables) for 4K pages. Some users must have 4K pages while needing a 48-bit VA space size. The cleanest way do do this is to go to a 4-level page table for this case. Each page table level using order-0 pages adds 9 bits to the VA size (at 4K pages, so for four levels we get 9 * 4 + 12 == 48-bits. For the 4K page size case only we add support functions for the PUD level of the page table tree, also the TLB exception handlers get an extra level of tree walk. [david.daney@cavium.com: Forward port to v4.10.] [david.daney@cavium.com: Forward port to v4.11.] Signed-off-by: Alex Belits Signed-off-by: David Daney Cc: James Hogan Cc: Alex Belits Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15312/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 13 +++--- arch/mips/include/asm/pgalloc.h | 26 +++++++++++ arch/mips/include/asm/pgtable-64.h | 88 +++++++++++++++++++++++++++++++++++--- arch/mips/mm/init.c | 3 ++ arch/mips/mm/pgtable-64.c | 33 ++++++++++++-- arch/mips/mm/tlbex.c | 22 ++++++++++ 6 files changed, 172 insertions(+), 13 deletions(-) commit dfa32261fa0ed1821c7d5dbb9e93eddfe311a0d9 Author: David Daney Date: Fri Feb 17 11:45:55 2017 -0800 MIPS: Octeon: Remove vestiges of CONFIG_CAVIUM_OCTEON_2ND_KERNEL This config option never really worked, and has bit-rotted to the point of being completely useless. Remove it completely. Signed-off-by: David Daney Cc: James Hogan Cc: Steven J. Hill Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15314/ Signed-off-by: Ralf Baechle arch/mips/cavium-octeon/Kconfig | 9 --------- arch/mips/cavium-octeon/Platform | 4 ---- arch/mips/cavium-octeon/setup.c | 12 +----------- 3 files changed, 1 insertion(+), 24 deletions(-) commit a81507c79f4ae9a0f9fb1054b59b62a090620dd9 Author: David Daney Date: Tue Mar 14 14:21:44 2017 -0700 MIPS: BPF: Fix multiple problems in JIT skb access helpers. o Socket data is unsigned, so use unsigned accessors instructions. o Fix path result pointer generation arithmetic. o Fix half-word byte swapping code for unsigned semantics. Signed-off-by: David Daney Cc: James Hogan Cc: Alexei Starovoitov Cc: Steven J. Hill Cc: linux-mips@linux-mips.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15747/ Signed-off-by: Ralf Baechle arch/mips/net/bpf_jit_asm.S | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 1ef0910cfd681f0bd0b81f8809935b2006e9cfb9 Author: David Daney Date: Tue Mar 14 14:21:43 2017 -0700 MIPS: BPF: Quit clobbering callee saved registers in JIT code. If bpf_needs_clear_a() returns true, only actually clear it if it is ever used. If it is not used, we don't save and restore it, so the clearing has the nasty side effect of clobbering caller state. Also, don't emit stack pointer adjustment instructions if the adjustment amount is zero. Signed-off-by: David Daney Cc: James Hogan Cc: Alexei Starovoitov Cc: Steven J. Hill Cc: linux-mips@linux-mips.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15745/ Signed-off-by: Ralf Baechle arch/mips/net/bpf_jit.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 64b2dd3a8be3ec4e08fd5a3dab0620d9c6c398fe Author: David Daney Date: Tue Mar 14 14:21:42 2017 -0700 MIPS: BPF: Use unsigned access for unsigned SKB fields. The SKB vlan_tci and queue_mapping fields are unsigned, don't sign extend these in the BPF JIT. In the vlan_tci case, the value gets masked so the change is not needed for correctness, but do it anyway for agreement with the types defined in struct sk_buff. Signed-off-by: David Daney Cc: James Hogan Cc: Alexei Starovoitov Cc: Steven J. Hill Cc: linux-mips@linux-mips.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15746/ Signed-off-by: Ralf Baechle arch/mips/net/bpf_jit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4ad701532a758202a422a8588f4d09c058c9a5dc Author: David Daney Date: Tue Mar 14 14:21:41 2017 -0700 MIPS: BPF: Add JIT support for SKF_AD_HATYPE. This let's us pass some additional "modprobe test-bpf" tests with JIT enabled. Reuse the code for SKF_AD_IFINDEX, but substitute the offset and size of the "type" field. Signed-off-by: David Daney Cc: James Hogan Cc: Alexei Starovoitov Cc: Steven J. Hill Cc: linux-mips@linux-mips.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15744/ Signed-off-by: Ralf Baechle arch/mips/net/bpf_jit.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit bfbfa9d61cf29f3579107892c7347c02d891dfec Author: David Daney Date: Tue Mar 14 14:21:40 2017 -0700 MIPS: uasm: Add support for LHU. The follow-on BPF JIT patches use the LHU instruction, so add it. Signed-off-by: David Daney Cc: James Hogan Cc: Alexei Starovoitov Cc: Steven J. Hill Cc: linux-mips@linux-mips.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/15743/ Signed-off-by: Ralf Baechle arch/mips/include/asm/uasm.h | 1 + arch/mips/mm/uasm-mips.c | 1 + arch/mips/mm/uasm.c | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) commit 05510f2b4819398a25ef432d72efa9e95419768a Author: Marcin Nowakowski Date: Tue Mar 7 14:19:56 2017 +0100 MIPS: Enable GENERIC_CPU_AUTOPROBE Add missing macros and methods that are required by CONFIG_GENERIC_CPU_AUTOPROBE: MAX_CPU_FEATURES, cpu_have_feature(), cpu_feature(). Also set a default elf platform as currently it is not set for most MIPS platforms resulting in incorrectly specified modalias values in cpu autoprobe ("cpu:type:(null):feature:..."). Export 'elf_hwcap' symbol so that it can be accessed from modules that use module_cpu_feature_match() Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15395/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 + arch/mips/include/asm/cpufeature.h | 26 ++++++++++++++++++++++++++ arch/mips/kernel/cpu-probe.c | 7 +++++++ 3 files changed, 34 insertions(+) commit 51d979c0bb99cb82d597795439eb5d74d280df50 Author: Arnd Bergmann Date: Mon Mar 20 06:47:55 2017 -0300 [media] vcodec: mediatek: mark pm functions as __maybe_unused When CONFIG_PM is disabled, we get a couple of unused functions: drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:927:13: error: 'mtk_jpeg_clk_off' defined but not used [-Werror=unused-function] static void mtk_jpeg_clk_off(struct mtk_jpeg_dev *jpeg) ^~~~~~~~~~~~~~~~ drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:916:13: error: 'mtk_jpeg_clk_on' defined but not used [-Werror=unused-function] static void mtk_jpeg_clk_on(struct mtk_jpeg_dev *jpeg) Rather than adding more error-prone #ifdefs around those, this patch removes the existing #ifdef checks and marks the PM functions as __maybe_unused to let gcc do the right thing. Signed-off-by: Arnd Bergmann Acked-by: Rick Chang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 6ce2ca580f10d8d76cc3661a0b6b88d419725c9c Author: Romain Perier Date: Fri Apr 7 14:17:43 2017 +0200 drm: dw-hdmi: Implement the mode_fixup drm helper This helper is supposed to validate or reject the modeline before it applied by the mode setting. Currently this function has been dropped, it was previously set to a dummy function that always returned true. For both cases, this means that userspace can ask for a bad modeline that will be always accepted. On some platforms, like Rockchip, the drm dw_hdmi-rockchip variant driver already implements the atomic_check drm helper, so mode_fixup cannot be handled and implemented there (as drm_atomic_helper relies on either atomic_check or mode_fixup). This commit implements this helper. It only checks that this mode is correct from the connector point of view. Acked-by: Daniel Vetter Signed-off-by: Romain Perier Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170407121743.4142-1-romain.perier@collabora.com drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit e48d9e715411a70b6d7c589eb3284830f22f5bf7 Author: Christopher Spinrath Date: Tue Apr 4 21:41:30 2017 +0200 ARM: dts: imx6q-utilite-pro: add hpd gpio The hpd pin of the second hdmi connector of the Utilite Pro is wired up to a gpio pin of the SoC. Reflect this in the device tree. Signed-off-by: Christopher Spinrath Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-utilite-pro.dts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 448548174caaa04ffe9da4da9326052eb8791a9b Author: Leonard Crestez Date: Tue Apr 4 20:04:14 2017 +0300 ARM: dts: imx6qp-sabresd: Set reg_arm regulator supply On imx6qp-sabresd LDO_ARM is connected to a different PMIC output than the other imx6qdl-sabresd boards. Setting cpu0 arm-supply to sw2_reg is wrong, this must have mistakenly slipped out of the vendor tree where this is are used for LDO bypass. Signed-off-by: Leonard Crestez Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qp-sabresd.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c23568dbbda110a5c79c6537cc81ed7af5444b64 Author: Leonard Crestez Date: Tue Apr 4 20:04:13 2017 +0300 ARM: dts: imx6qdl-sabresd: Set LDO regulator supply Setting the supply is optional but beneficial, it will cause PMIC voltages to be dynamically changed with cpu frequency. Signed-off-by: Leonard Crestez Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 50bffb78e2eebbd3f4a5472455d128d02b001bc5 Author: Tim Harvey Date: Mon Apr 3 14:18:21 2017 -0700 ARM: dts: imx: add Gateworks Ventana GW5903 support The Gateworks Ventana GW5903 is a single-board computer based on the NXP IMX6 SoC with the following features: * IMX6 DualLite Soc (supports IMX6S,IMX6DL,IMX6Q) * 4GiB DDR3 DRAM * 32GB eMMC * 1x microSD connector * Gateworks System Controller: - hardware watchdog - hardware monitor - pushbutton controller - EEPROM storage - power control * JTAG programmable * Inertial Module * uBlox EMMY-W1 (bluetooth/nfc/802.11ac) Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/imx6dl-gw5903.dts | 55 +++ arch/arm/boot/dts/imx6q-gw5903.dts | 55 +++ arch/arm/boot/dts/imx6qdl-gw5903.dtsi | 654 ++++++++++++++++++++++++++++++++++ 4 files changed, 766 insertions(+) commit c33576cbf86bedf9ad3812479c3b4f36d5fadba8 Author: Martin Kaiser Date: Mon Apr 3 21:47:04 2017 +0200 ARM: dts: i.MX25: add AIPS control registers The i.MX25 contains two AHB to IP bridges (AIPS), each of which has a set of control registers. Add the memory regions for the control registers to the Device Tree. Signed-off-by: Martin Kaiser Reviewed-by: Sascha Hauer Signed-off-by: Shawn Guo arch/arm/boot/dts/imx25.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 746380186d12159de1697c80e406783888478670 Author: Stefan Agner Date: Wed Mar 29 16:21:13 2017 -0700 ARM: dts: imx7-colibri: add Carrier Board 3.3V/5V regulators Model the Carrier Board power distribution by adding a fixed 3.3V and 5V regulator. The 3.3V regulator is connected to the backlight as well as the display supply. The 5V regulator is used to supply USB VBUS. Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 17 +++++++++++++++++ arch/arm/boot/dts/imx7d-colibri-eval-v3.dts | 1 + 2 files changed, 18 insertions(+) commit c9171bb5a9ed0d5168e0788189042a33b73d7616 Author: Stefan Agner Date: Wed Mar 29 16:21:12 2017 -0700 ARM: dts: imx7-colibri: remove 1.8V fixed regulator The ADC is directly supplied by the PMIC 1.8V rail, remove the superfluous fixed regulator. Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri.dtsi | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 8f4c8bd9561cafd10d3a885900213ce4a544edbe Author: Stefan Agner Date: Wed Mar 29 16:21:11 2017 -0700 ARM: dts: imx7-colibri: allow to disable Ethernet rail The regulator-always-on property on the Ethernet rail prevents Linux from disabling the rail when Ethernet is shut down (suspend or simply link down). With this change the regulator framework will disable the rail when the Ethernet PHY is not used, saving power especially on carrier board not using Ethernet. Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55dfc902b87c506b90e11dc34f5acc2a840c4e78 Author: Stefan Agner Date: Wed Mar 29 16:21:10 2017 -0700 ARM: dts: imx7-colibri: fix PMIC voltages Fix wrong voltage of PWR_EN_+V3.3 rail. The error had no noticeable effect since no consumer explicitly requested a specific voltage. Also use round voltages as it is common in other device trees. Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri.dtsi | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit a027d49fc193f22b92a49d1f906f94c95f278636 Author: Stefan Agner Date: Wed Mar 29 16:21:09 2017 -0700 ARM: dts: imx7-colibri: use OF graph to describe the display To make use of the new eLCDIF DRM driver OF graph description is required. Describe the display using OF graph nodes. Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 38 +++++++++++------------------ 1 file changed, 14 insertions(+), 24 deletions(-) commit b721c91bdc645f6c13221a3b14c70dd6c239794f Author: Gary Bisson Date: Wed Mar 29 10:45:23 2017 +0200 ARM: dts: imx6qp-nitrogen6_som2: add Quad Plus variant of the SOM https://boundarydevices.com/product/nit6x-som-v2/ Reviewed-by: Fabio Estevam Signed-off-by: Gary Bisson Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6qp-nitrogen6_som2.dts | 55 +++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) commit 43d25bb7319bcc46ac0fc99f101caeb28200005c Author: Jagan Teki Date: Thu Mar 23 00:35:18 2017 +0530 ARM: dts: imx6q-icore: Add touchscreen node max11801 touchscreen on Engicam iCoreM6 Quad module is connected via i2c1, so add max11801: touchscreen@48 on i2c1. Cc: Dmitry Torokhov Cc: Domenico Acri Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-icore.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1cb1a68dedd3e9a3f441b65556b43ebee50baaf3 Author: Vivien Didelot Date: Tue Mar 28 15:24:26 2017 -0400 ARM: dts: vf610-zii-dev-rev-b: change switch2 label Rename the switch2@0 label of the switch2 node to switch@0 to respect the general unit@address DTS rule, and be consistent with the other switch nodes of the DTS file. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: Shawn Guo arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d199356af059c12f6f63f37f6956a50cd49e5582 Author: Jagan Teki Date: Fri Mar 24 21:48:41 2017 +0530 ARM: dts: imx6ul-[geam|isiot]: Add sai2 node Add Synchronous Audio Interface(SAI) node for Engicam GEAM6UL and Is.IoT MX6UL variant module boards. Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-geam.dtsi | 16 ++++++++++++++++ arch/arm/boot/dts/imx6ul-isiot.dtsi | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) commit 35d38f30eee6ee03c3ef6a69bd8fad848fe3e962 Author: Jagan Teki Date: Fri Mar 24 21:48:40 2017 +0530 ARM: dts: imx6ul-isiot-common: Add touchscreen node Add touchscreen node as i2c1 slave device on Engicam Is.IoT MX6UL modules, the touchscreen controlled 'st,stmpe-ts' connected via i2c with st,stmpe811 mfd interface. Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-isiot-common.dtsi | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit e13d0250e84807175e28baace173851e6ecc6266 Author: Jagan Teki Date: Fri Mar 24 21:48:39 2017 +0530 ARM: dts: imx6ul-isiot: Add i2c nodes Add support for i2c nodes i2c1 and i2c2 on Is.IoT MX6UL eMMC variant boards. Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-isiot.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 0760c782cf0b334e0a9d011ad46802e66d9be6b0 Author: Jagan Teki Date: Fri Mar 24 21:48:38 2017 +0530 ARM: dts: imx6ul-isiot: Add imx6ul-isiot-common.dtsi lcdif nodes are differ wrt specific LCD connected on Is.IoT MX6UL module, so create separate file 'imx6ul-isiot-common.dtsi' for common lcdif node structure and include the same on respective dts. More common nodes will add in future patches. Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-isiot-common.dtsi | 107 +++++++++++++++++++++++++++++ arch/arm/boot/dts/imx6ul-isiot-emmc.dts | 1 + arch/arm/boot/dts/imx6ul-isiot-nand.dts | 1 + 3 files changed, 109 insertions(+) commit 3e176720e6a6de2426f364dc806659f51095bb9f Author: Jagan Teki Date: Fri Mar 24 21:48:37 2017 +0530 ARM: dts: imx6ul-isiot: Add backlight support for lcdif This patch add support for lcdif backlight on Is.IoT MX6UL variant boards. Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-isiot.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit f3e16144d391025fcb9565e589ce803c905abe73 Author: Jagan Teki Date: Fri Mar 24 21:48:36 2017 +0530 ARM: dts: imx6ul-geam: Add backlight support for lcdif This patch add support for lcdif backlight on GEAM6UL variant boards. Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-geam.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit d763762e3b580e1cfbf0e6fee86f6d116ce8bded Author: Lucas Stach Date: Thu Mar 23 15:24:29 2017 +0100 ARM: dts: imx6: add ZII RDU2 boards This adds support for the Zodiac Inflight Innovations RDU2 board, which has both a Quad and a QuadPlus variant. The board supports different panels, with the bootloader patching in the correct compatible, depending on the hardware configuration. Signed-off-by: Philipp Zabel Signed-off-by: Lucas Stach Tested-by: Nikita Yushchenko Tested-by: Chris Healy Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 4 +- arch/arm/boot/dts/imx6q-zii-rdu2.dts | 50 ++ arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi | 932 ++++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx6qp-zii-rdu2.dts | 50 ++ 4 files changed, 1035 insertions(+), 1 deletion(-) commit 54458dac349f72dd9a4fd816619bde0bab40841d Author: Lucas Stach Date: Thu Mar 23 15:13:13 2017 +0100 ARM: dts: imx6qp: add PRG nodes and hook up to IPUs Add the DT nodes for the Prefetch Resolve Gaskets found on i.MX6QP and hook them up to the assigned IPU nodes. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qp.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 3062cf55e1fb49f7df4662e2eedffce34021eeb7 Author: Lucas Stach Date: Thu Mar 23 15:13:12 2017 +0100 ARM: dts: imx6qp: add PRE nodes Add the DT nodes for the Prefetch Resolve Engines found on i.MX6QP. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qp.dtsi | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 3e1b857786f0d46a92b3a4d7878767883ed90bdc Author: Rob Herring Date: Tue Mar 21 21:03:03 2017 -0500 ARM: dts: imx: fix PCI bus dtc warnings dtc recently added PCI bus checks. Fix these warnings. Signed-off-by: Rob Herring Cc: Sascha Hauer Cc: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl.dtsi | 3 ++- arch/arm/boot/dts/imx6sx.dtsi | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit d6f4996e7d69845536f5a8f8eae5caa6245d8976 Author: Uwe Kleine-König Date: Mon Mar 20 09:21:11 2017 +0100 ARM: dts: imx25-pinfunc: Move MX25_PAD_TDO__TDO to a more sensible place The pinfunc definitions are ordered by mux_reg and so automatically by conf_reg, too. PAD_TDO is the only pad that has a conf_reg but no mux_reg. Put it to the place where it its in the order of conf_regs instead of the top. Signed-off-by: Uwe Kleine-König Signed-off-by: Shawn Guo arch/arm/boot/dts/imx25-pinfunc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e87c981cbdcae3c53cb13da022fa48709202fc21 Author: Uwe Kleine-König Date: Mon Mar 20 09:21:10 2017 +0100 ARM: dts: imx25-pinfunc: remove duplicate definition This was introduced in commit 18e2b50407fb ("ARM: dts: imx25-pinfunc: more defines"). Signed-off-by: Uwe Kleine-König Signed-off-by: Shawn Guo arch/arm/boot/dts/imx25-pinfunc.h | 1 - 1 file changed, 1 deletion(-) commit 0afe7a34921fc81b53a2d02ef69fb31eceef4c23 Author: Tim Harvey Date: Thu Mar 16 07:27:19 2017 -0700 ARM: dts: imx: add Gateworks Ventana GW5904 support The Gateworks Ventana GW5904 is a single-board computer based on the NXP IMX6 SoC with the following features: * IMX6 DualLite Soc (supports IMX6S,IMX6DL,IMX6Q) * 2048MB DDR3 DRAM (4x64bit) (options up to 4GiB) * 8GB eMMC * Gateworks System Controller: - hardware watchdog - hardware monitor - pushbutton controller - EEPROM storage - power control * JTAG programmable * 1x miniPCIe socket (with PCIe, USB) * 1x miniPCIe socket (USB) * 1x M.2 socket (USB, 2x SIM) * Inertial Module (LSM9DS1 9DOF: 3x acc, 3x rate, 3x mag) * GPS (optional uBlox EVA-M8M) * Application headers: - 2x RS232 UART (TX/RX/CTS/RTS) - 8x TTL GPIO (3x configurable as PWM) - 1x LVDS display 3D+C with i2c touch and PWM backlight * MV88E6176 GbE Switch (uplink to IMX FEC) * Front panel connectors: - 1x user programmable LED - 1x configurable user pushbutton - 1x USB OTG - 4x GbE LAN Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/imx6dl-gw5904.dts | 55 +++ arch/arm/boot/dts/imx6q-gw5904.dts | 59 ++++ arch/arm/boot/dts/imx6qdl-gw5904.dtsi | 641 ++++++++++++++++++++++++++++++++++ 4 files changed, 757 insertions(+) commit e6e9d8ec4aa0e65e35147c560fdc0a6d35b43181 Author: Andrey Smirnov Date: Tue Mar 14 08:33:57 2017 -0700 ARM: dts: imx7s: Do not claim i.MX51 compatibility for SRC System Reset Controller in i.MX7 doesn't have any commonality with IP block found in i.MX5 and i.MX6 SoC families. Given that and the new upstream driver for i.MX7 variant (see https://lkml.org/lkml/2017/2/21/466) remove "fsl,imx51-src" from compatibility string. Cc: yurovsky@gmail.com Cc: Fabio Estevam Cc: Rob Herring Cc: Mark Rutland Cc: Russell King Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fdebe492e26b05bd43048d7250fd27f8ac26923 Author: Jagan Teki Date: Tue Mar 14 15:18:13 2017 +0530 ARM: dts: imx6q-icore: Add LVDS support Add LVDS display support for OpenFrame Capacitive touch 7 inc display which is supported by Engicam i.CoreM6 QDL Starter Kit. Cc: Domenico Acri Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-icore.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 4ae366fdceb9ad5e9efd675e855a94d342931699 Author: Jagan Teki Date: Tue Mar 14 15:18:12 2017 +0530 ARM: dts: imx6q: Add Engicam i.CoreM6 Quad/Dual OpenFrame Cap 12.3 initial support i.CoreM6 Quad/Dual OpenFrame modules are "system on modules plus openframe display carriers" which are good solution for develop user friendly graphic user interface. General features: CPU NXP i.MX6Q rev1.2 at 792 MHz RAM 1GB, 32, 64 bit, DDR3-800/1066 NAND SLC,512MB LVDS Display TFT 12.3" industrial, 1280x480 resolution Backlight LED backlight, brightness 350 Cd/m2 Power supply 15 to 30 Vdc Cc: Domenico Acri Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6q-icore-ofcap12.dts | 76 +++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) commit 6652ac3393a4405fac5e66226e943eb5a91f82e7 Author: Jagan Teki Date: Tue Mar 14 15:18:11 2017 +0530 ARM: dts: imx6q: Add Engicam i.CoreM6 Quad/Dual OpenFrame Cap 10.1 initial support i.CoreM6 Quad/Dual OpenFrame modules are "system on modules plus openframe display carriers" which are good solution for develop user friendly graphic user interface. General features: CPU NXP i.MX6Q rev1.2 at 792 MHz RAM 1GB, 32, 64 bit, DDR3-800/1066 NAND SLC,512MB LVDS Display TFT 10.1" industrial, 1280x800 resolution Backlight LED backlight, brightness 350 Cd/m2 Power supply 15 to 30 Vdc Cc: Domenico Acri Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6q-icore-ofcap10.dts | 76 +++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) commit a673356c64b56b05b23f76fe77aa79c3a2a623d3 Author: Jagan Teki Date: Tue Mar 14 15:18:10 2017 +0530 ARM: dts: imx6qdl-icore: Add backlight support for lvds This patch add support for lvds backlight on i.CoreM6 QDL variant boards. Cc: Domenico Acri Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-icore.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit ed7740e357c4e672592d9d2097d1b01812b5fc56 Author: Peter Senna Tschudin Date: Tue Mar 14 10:23:02 2017 +0100 ARM: dts: imx6q-b850v3: Use megachips-stdpxxxx-ge-b850v3-fw bridges (LVDS-DP++) Configures the megachips-stdpxxxx-ge-b850v3-fw bridges on the GE B850v3 dts file. Cc: Laurent Pinchart Cc: Martyn Welch Cc: Martin Donnelly Cc: Javier Martinez Canillas Cc: Enric Balletbo i Serra Cc: Philipp Zabel Cc: Rob Herring Cc: Fabio Estevam Signed-off-by: Peter Senna Tschudin Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-b850v3.dts | 70 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit fd1eb46c382a69d0fbad85def3a2f3008a76efc1 Author: Marco Franchi Date: Wed Mar 8 15:32:29 2017 -0300 ARM: dts: imx7d-sdb: Add sht11 Click Board support The imx7d-sdb has a mickro bus connector that can be connected to a Sensirion SHT11 click board (temperature and humidity sensor): https://shop.mikroe.com/click/sensors/sht1x Add a new device tree file to describe such hardware. Signed-off-by: Marco Franchi Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx7d-sdb-sht11.dts | 74 +++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) commit fef5c646db07bfa64288b8fac61e6509f4fdb753 Author: Andrew Lunn Date: Wed Mar 8 03:50:13 2017 +0100 ARM: dts: vf610-zii-dev-c: Wire up PHY interrupts The PHYs embedded in the switch direct there interrupts through the switch interrupt controllers. Now that devel C has its switch interrupts connected to the SoC, the PHY interrupts can be used by phylib. Explicitly include MDIO nodes in the switch device tree nodes, and link the PHY interrupts back to the switch interrupt controller. Also, link the ports to the PHYs on the MDIO bus. Signed-off-by: Andrew Lunn Signed-off-by: Shawn Guo arch/arm/boot/dts/vf610-zii-dev-rev-c.dts | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 51dab7d9a28809c7d1ae6897e16c4cbb71a81fde Author: Andrew Lunn Date: Wed Mar 8 03:50:12 2017 +0100 ARM: dts: vf610-zii-dev: Wire up devel C switch interrupts The devel B and devel C board use the same GPIO lines for interrupts from the two switches. Move the pinmux nodes from devel B into the shared .dtsi file, and wire up the interrupts on devel C. Signed-off-by: Andrew Lunn Signed-off-by: Shawn Guo arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 12 ------------ arch/arm/boot/dts/vf610-zii-dev-rev-c.dts | 12 ++++++++++++ arch/arm/boot/dts/vf610-zii-dev.dtsi | 12 ++++++++++++ 3 files changed, 24 insertions(+), 12 deletions(-) commit e3abb14e81cfabdb3820557e1b4a478e1bafdce9 Author: Fabio Estevam Date: Mon Mar 6 13:18:36 2017 -0300 ARM: dts: imx6sx: Make UART compatible to 'imx6q-uart' UART on i.MX6SX (like all other i.MX6 SoC variants) has the same programming model as the 'imx6q-uart' type, so add it to the compatible UART string. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx.dtsi | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 3592374d1020d3cfb1d33db29d6e57be5901a027 Author: Ken Lin Date: Sat Mar 4 05:20:32 2017 +0800 ARM: dts: imx6q-bx50v3: fix at25 spi-clk frequency issue Change the maxium spi clock frequency from 20MHz to 10MHz to meet the operation voltage range requirement recommended in AT25 datasheet. Signed-off-by: Ken Lin Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-bx50v3.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe64d0540b32229e860c218a0267750f7344bd67 Author: Alexander Kurz Date: Thu Mar 2 22:03:48 2017 +0100 ARM: dts: imx50: imx50-esdhc use imx53-esdhc According to the reference manuals, both imx50/imx53 SOC seem to share the same eSDHC controller, especially the section on "Multi-block Read" mentioned in commit 361b8482026c ("mmc: sdhci-esdhc-imx: fix multiblock reads on i.MX53") is identical for both SOC. Hence, let imx50 use imx53-esdhc. Signed-off-by: Alexander Kurz Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx50.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9f29183fa344704f7317e421d47b149ab38224f2 Author: Peng Fan Date: Wed Mar 1 14:40:53 2017 +0800 ARM: dts: imx7s: enable ocotp Enable ocotp for i.mx7D/S. Correct the clock entry and compatible string. Signed-off-by: Peng Fan Cc: Srinivas Kandagatla Cc: Sascha Hauer Cc: Fabio Estevam Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s.dtsi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4901f343f7444208edfa483d420e9ccda55dfd73 Author: Lucas Stach Date: Fri Feb 17 14:48:37 2017 +0100 ARM: dts: imx6qp: correct IPU nodes Reference them by handle and remove the changed clocks that are copied from the downstream DT and are not part of the mainline binding. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qp.dtsi | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) commit c871b91eb89a0487ae0b19fc25190b9e8650f095 Author: Lucas Stach Date: Fri Feb 17 14:48:36 2017 +0100 ARM: dts: imx6qp: reference MMDC node by handle and remove duplication Referencing the node by handle make the QP DT more resilent against changes of the base DT. Also remove the duplicated reg property, it's not needed as it the same as in the base DT, just the compatible is actually different. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qp.dtsi | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 3b3a95c8bed65b833c6a2b986f3c794fe935b33d Author: Lucas Stach Date: Fri Feb 17 14:48:35 2017 +0100 ARM: dts: imx6qp: reference PCIe node by handle By using the handle, we can avoid some duplication of the base DT and so avoid any maintenance overhead in the QP DT if the referenced node changes. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qp.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 10ad0dda7c9ba8dd46b964b7d129d3e87c2dcca2 Author: Uwe Kleine-König Date: Thu Feb 16 22:18:58 2017 +0100 ARM: imx25: set default phy_type and dr_mode for usbotg port All currently supported i.MX25-based machines use phy_type = "utmi" and dr_mode = "otg". So this seems to be a sensible default. This also doesn't hurt out-of-tree machines because up to now they had to specify these two properties in the machine.dts which still takes precedence by just overwriting the defaults added here. Signed-off-by: Uwe Kleine-König Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts | 2 -- arch/arm/boot/dts/imx25-pdk.dts | 2 -- arch/arm/boot/dts/imx25.dtsi | 2 ++ 3 files changed, 2 insertions(+), 4 deletions(-) commit 4105daf4cf0f2e8a73de4c09297c1692de1b70ea Author: Michael Heimpold Date: Thu Feb 9 08:42:49 2017 +0100 ARM: dts: add support for I2SE Duckbill 2 SPI This machine is based on I2SE's Duckbill 2 board and is sold as part of I2SE's PLC Bundle for IoT. This is a development kit for Homeplug Green PHY based powerline products based on Qualcomms QCA7000 chip. Signed-off-by: Michael Heimpold Cc: Stefan Wahren Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx28-duckbill-2-spi.dts | 199 +++++++++++++++++++++++++++++ 2 files changed, 200 insertions(+) commit 41e0b8c701f567eb80a58f9e2d0462656f84d170 Author: Michael Heimpold Date: Thu Feb 9 08:42:48 2017 +0100 ARM: dts: add support for I2SE Duckbill 2 EnOcean This machine is based on I2SE's Duckbill 2 board and features a EnOcean daugther board based on the popular TCM310 chipset. This product is intended to be used for e.g. home automation purposes. Signed-off-by: Michael Heimpold Cc: Stefan Wahren Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx28-duckbill-2-enocean.dts | 220 +++++++++++++++++++++++++ 2 files changed, 221 insertions(+) commit 7f0e2da55a42fa286435984c6608536a83d1b07a Author: Michael Heimpold Date: Thu Feb 9 08:42:47 2017 +0100 ARM: dts: add support for I2SE Duckbill 2 485 This machine is based on I2SE's Duckbill 2 board and features a RS-485 daugther board. This device is intended to be used for e.g. home automation purposes. Signed-off-by: Michael Heimpold Cc: Stefan Wahren Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx28-duckbill-2-485.dts | 189 +++++++++++++++++++++++++++++ 2 files changed, 190 insertions(+) commit c98cea9f585fcb3f75c46d194601eb0a346bfd45 Author: Michael Heimpold Date: Thu Feb 9 08:42:46 2017 +0100 ARM: dts: add support for I2SE Duckbill 2 boards This machine is an USB pen drive sized development board, based on NXP's i.MX28 CPU. In contrast to the previous model "Duckbill", the "Duckbill 2" series has internal eMMC storage. Signed-off-by: Michael Heimpold Cc: Stefan Wahren Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx28-duckbill-2.dts | 183 +++++++++++++++++++++++++++++++++ 2 files changed, 184 insertions(+) commit 185fcb3fbe6d32d894b8b72429622d91c59b10f6 Author: Johan Hovold Date: Mon Apr 3 11:58:55 2017 +0200 USB: serial: quatech2: drop redundant tty_buffer_request_room Drop redundant calls to tty_buffer_request_room and use the more efficient tty_insert_flip_char when inserting single characters. Signed-off-by: Johan Hovold drivers/usb/serial/quatech2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7aac5e7d204f344f5f273deeeb8fd237e4f5b87c Author: Johan Hovold Date: Mon Apr 3 11:57:14 2017 +0200 USB: serial: iuu_phoenix: drop excessive sanity checks The transfer buffers and URBs are allocated and initialised by USB serial core during probe, and there's no need to check for NULL transfer buffers in the bulk-in completion handlers. Signed-off-by: Johan Hovold drivers/usb/serial/iuu_phoenix.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 8d4264d86c1a31d7e0efd3e4c3e08bc91dbdb48c Merge: ba9e7f2 f69ae4f Author: Linus Walleij Date: Mon Apr 10 09:35:30 2017 +0200 Merge tag 'samsung-pinctrl-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung into devel Samsung pinctrl drivers update for v4.12: 1. Add support for pad retention control through pinctrl drivers which moves us forward to better runtime PM of pinctrl, clocks, power domains and other devices. 2. Fix GPIO hogs by registering pinctrl before registering gpiolib. 3. Use devm-like interface. commit 266061b7637b189ac82ee3a75116ff2dcb031e0b Author: Icenowy Zheng Date: Sat Apr 8 00:19:04 2017 +0800 clk: sunxi-ng: fix PRCM CCU CLK_NUMBER value The CLK_NUMBER value of PRCM CCU is wrongly set to (CLK_APB0_PWD + 1), which prevented the IR mod clock from being set up. Change it to (CLK_IR + 1) in order to correctly get IR mod set up. Fixes: cdb8b80b6093 ("clk: sunxi-ng: add support for PRCM CCUs") Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-r.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37cabc74e57d15d683a8e49159bc8dcd5a50516a Author: Icenowy Zheng Date: Sat Apr 8 00:19:03 2017 +0800 clk: sunxi-ng: fix PRCM CCU ir clk parent The first parent of ir clk in PRCM CCU is wrongly written as "osc32K" instead of "osc32k". Change it to "osc32k". Fixes: cdb8b80b6093 ("clk: sunxi-ng: add support for PRCM CCUs") Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb976a55c744befe8ea8f6a6132d752d2b12cb98 Author: Florian Fainelli Date: Sat Apr 8 08:52:02 2017 -0700 net: dsa: mt7530: Include gpio/consumer.h for GPIO functions Fixes build errors seen with CONFIG_GPIOLIB disabled and warnings enabled: drivers/net/dsa/mt7530.c: In function 'mt7530_setup': drivers/net/dsa/mt7530.c:948:3: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration] gpiod_set_value_cansleep(priv->reset, 0); ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/dsa/mt7530.c: In function 'mt7530_probe': drivers/net/dsa/mt7530.c:1068:17: error: implicit declaration of function 'devm_gpiod_get_optional' [-Werror=implicit-function-declaration] priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset", ^~~~~~~~~~~~~~~~~~~~~~~ drivers/net/dsa/mt7530.c:1069:13: error: 'GPIOD_OUT_LOW' undeclared (first use in this function) GPIOD_OUT_LOW); ^~~~~~~~~~~~~ drivers/net/dsa/mt7530.c:1069:13: Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/mt7530.c | 1 + 1 file changed, 1 insertion(+) commit 3c60a531b9e175693a2d61f6bfd7ffacce4146cd Author: Alexander Alemayhu Date: Sat Apr 8 22:08:10 2017 +0200 bpf: fix comment typo o s/bpf_bpf_get_socket_cookie/bpf_get_socket_cookie Signed-off-by: Alexander Alemayhu Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 2 +- tools/include/uapi/linux/bpf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f9645430ef5f53ddf0ddd481e9f70f6fce7ccff2 Author: stephen hemminger Date: Fri Apr 7 14:41:19 2017 -0400 netvsc: use napi_consume_skb This allows using deferred skb freeing and with NAPI. And get buffer recycling. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit cdd3210c3d06c221fa46594e1a07ae48d8220668 Merge: bf74b20 1aed896 Author: David S. Miller Date: Sun Apr 9 18:13:12 2017 -0700 Merge tag 'wireless-drivers-next-for-davem-2017-04-07' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.12 Lots of bugfixes as usual but also some new features. Major changes: ath10k * improve firmware download time for QCA6174 and QCA9377, especially helps resume time ath9k_htc * add support AirTies 1eda:2315 AR9271 device rt2x00 * add support MT7620 mwifiex * enable auto deep sleep mode for USB chipsets brcmfmac * add support for network namespaces (WIPHY_FLAG_NETNS_OK) ==================== Signed-off-by: David S. Miller commit b4e1566e4c5e9fcaf9e17ad741b6094b4f3ddce5 Merge: c0bde0b 8434fbe Author: Tony Lindgren Date: Sun Apr 9 16:35:51 2017 -0700 Merge branch 'omap-for-v4.12/dt-droid4-v2' into omap-for-v4.12/dt-v2 commit 8434fbefc63790ee928d04cad0458508eaa39ffd Author: Tony Lindgren Date: Sun Apr 9 16:22:08 2017 -0700 ARM: dts: omap4-droid4: Add CPCAP PMIC OTG PHY configuration Add CPCAP PMIC OTG PHY configuration. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Reviewed-by: Sebastian Reichel Tested-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 8a1a6259657e319eec0311789de10336dcb8e5de Author: Tony Lindgren Date: Sun Apr 9 16:21:59 2017 -0700 ARM: dts: omap4-droid4: Add CPCAP PMIC battery charger configuration Add CPCAP PMIC battery charger configuration. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Reviewed-by: Sebastian Reichel Tested-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 94b9a8a6fdc9b320d286b2ba0d4075bc31d9f415 Author: Tony Lindgren Date: Sun Apr 9 16:20:29 2017 -0700 ARM: dts: omap4-droid4: Add CPCAP PMIC ADC configuration Add CPCAP PMIC ADC configuration. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Reviewed-by: Sebastian Reichel Tested-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit bf74b20d00b13919db7ae5d1015636e76f56f6ae Author: David S. Miller Date: Sun Apr 9 14:45:21 2017 -0700 Revert "rtnl: Add support for netdev event to link messages" This reverts commit def12888c161e6fec0702e5ec9c3962846e3a21d. As per discussion between Roopa Prabhu and David Ahern, it is advisable that we instead have the code collect the setlink triggered events into a bitmask emitted in the IFLA_EVENT netlink attribute. Signed-off-by: David S. Miller include/linux/rtnetlink.h | 3 +- include/uapi/linux/if_link.h | 21 ---------- net/core/dev.c | 2 +- net/core/rtnetlink.c | 92 +++++--------------------------------------- 4 files changed, 11 insertions(+), 107 deletions(-) commit 0492b71c42f76b6019ef5fe686a7cb253dded09c Merge: 417d978 f8b45b7 Author: David S. Miller Date: Sun Apr 9 13:41:06 2017 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-04-08 This series contains updates to i40e and i40evf only. Mitch fixes an issue where the client driver (i40iw) was attempting to load on x710 devices (which do not support iWARP), so only register with the client if iWARP is supported. Jake fixes up error messages to better clarify to the user when adding a invalid flow type. Updates the driver to look up the MAC address from eth_get_platform_mac_address() first before checking what the firmware provides. Cleans up code so we are not repeating a duplicate loop, by checking both transmit and receive queues in a single loop. Also cleans up flags never used, so remove the definitions. Alex does cleanup so that we are always updating pf->flags when a change is made to the private flags. Adds support for 3K buffers to the receive path so that we can provide the additional padding needed in the event of NET_IP_ALIGN being non-zero or a cache line being greater than 64. Adds support for build_skb() to i40e/i40evf. Maciej adjusts the scope of the rtnl lock held during reset because it was stopping other PFs from running their reset procedures. Alan reduces code complexity in i40e_detect_recover_hung_queue(). ==================== Signed-off-by: David S. Miller commit 5f6e00709c16b63c7a93552ed4ab2b48a0dd47ac Merge: f7214e6 7606e07 Author: Christoffer Dall Date: Sun Apr 9 07:50:34 2017 -0700 Merge remote-tracking branch 'rutland/kvm/common-sysreg' into next-fix commit f7214e6023c86cbb66d3ebead0b27ac1a4ebb8dc Author: Christoffer Dall Date: Wed Feb 1 12:54:11 2017 +0100 KVM: arm/arm64: Advertise support for KVM_CAP_ARM_USER_IRQ Now that we support both timers and PMU reporting interrupts to userspace, we can advertise this support. Reviewed-by: Alexander Graf Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/arm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3dbbdf78636e66094d82c4df496c54ff6ae46e31 Author: Christoffer Dall Date: Wed Feb 1 12:51:52 2017 +0100 KVM: arm/arm64: Report PMU overflow interrupts to userspace irqchip When not using an in-kernel VGIC, but instead emulating an interrupt controller in userspace, we should report the PMU overflow status to that userspace interrupt controller using the KVM_CAP_ARM_USER_IRQ feature. Reviewed-by: Alexander Graf Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/arm.c | 13 +++++++++---- include/kvm/arm_pmu.h | 7 +++++++ virt/kvm/arm/arch_timer.c | 3 --- virt/kvm/arm/pmu.c | 39 +++++++++++++++++++++++++++++++++++---- 4 files changed, 51 insertions(+), 11 deletions(-) commit d9e1397783765a275c3a7930250dcdb7e9480d7d Author: Alexander Graf Date: Tue Sep 27 21:08:06 2016 +0200 KVM: arm/arm64: Support arch timers with a userspace gic If you're running with a userspace gic or other interrupt controller (that is no vgic in the kernel), then you have so far not been able to use the architected timers, because the output of the architected timers, which are driven inside the kernel, was a kernel-only construct between the arch timer code and the vgic. This patch implements the new KVM_CAP_ARM_USER_IRQ feature, where we use a side channel on the kvm_run structure, run->s.regs.device_irq_level, to always notify userspace of the timer output levels when using a userspace irqchip. This works by ensuring that before we enter the guest, if the timer output level has changed compared to what we last told userspace, we don't enter the guest, but instead return to userspace to notify it of the new level. If we are exiting, because of an MMIO for example, and the level changed at the same time, the value is also updated and userspace can sample the line as it needs. This is nicely achieved simply always updating the timer_irq_level field after the main run loop. Note that the kvm_timer_update_irq trace event is changed to show the host IRQ number for the timer instead of the guest IRQ number, because the kernel no longer know which IRQ userspace wires up the timer signal to. Also note that this patch implements all required functionality but does not yet advertise the capability. Reviewed-by: Alexander Graf Reviewed-by: Marc Zyngier Signed-off-by: Alexander Graf Signed-off-by: Christoffer Dall arch/arm/kvm/arm.c | 18 +++---- include/kvm/arm_arch_timer.h | 2 + virt/kvm/arm/arch_timer.c | 122 +++++++++++++++++++++++++++++++++++-------- 3 files changed, 110 insertions(+), 32 deletions(-) commit 3fe17e6826162021d5e9274949571b19fc94826b Author: Alexander Graf Date: Tue Sep 27 21:08:05 2016 +0200 KVM: arm/arm64: Add ARM user space interrupt signaling ABI We have 2 modes for dealing with interrupts in the ARM world. We can either handle them all using hardware acceleration through the vgic or we can emulate a gic in user space and only drive CPU IRQ pins from there. Unfortunately, when driving IRQs from user space, we never tell user space about events from devices emulated inside the kernel, which may result in interrupt line state changes, so we lose out on for example timer and PMU events if we run with user space gic emulation. Define an ABI to publish such device output levels to userspace. Reviewed-by: Alexander Graf Reviewed-by: Marc Zyngier Signed-off-by: Alexander Graf Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Documentation/virtual/kvm/api.txt | 42 +++++++++++++++++++++++++++++++++++++++ arch/arm/include/uapi/asm/kvm.h | 2 ++ arch/arm64/include/uapi/asm/kvm.h | 2 ++ include/uapi/linux/kvm.h | 8 ++++++++ 4 files changed, 54 insertions(+) commit b22e7df2d85fcbe8b36bab909b98c3d0239e69e6 Author: Christoffer Dall Date: Tue Sep 27 21:08:04 2016 +0200 KVM: arm/arm64: Cleanup the arch timer code's irqchip checking Currently we check if we have an in-kernel irqchip and if the vgic was properly implemented several places in the arch timer code. But, we already predicate our enablement of the arm timers on having a valid and initialized gic, so we can simply check if the timers are enabled or not. This also gets rid of the ugly "error that's not an error but used to signal that the timer shouldn't poke the gic" construct we have. Reviewed-by: Alexander Graf Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/arch_timer.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit d824ca52abd020a36948d12f2c6704ea2ae12513 Author: Marc Zyngier Date: Mon Apr 3 19:38:07 2017 +0100 arm/arm64: Add hyp-stub API documentation In order to help people understanding the hyp-stub API that exists between the host kernel and the hypervisor mode (whether a hypervisor has been installed or not), let's document said API. As with any form of documentation, I expect it to become obsolete and completely misleading within 20 minutes after having being merged. Acked-by: Russell King Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall Documentation/virtual/kvm/arm/hyp-abi.txt | 53 +++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit d9118c87d21ee799058a55eeae84d392ae887c91 Author: Marc Zyngier Date: Mon Apr 3 19:38:06 2017 +0100 ARM: hyp-stub: Zero r0 on successful stub handling We now return HVC_STUB_ERR when a stub hypercall fails, but we leave whatever was in r0 on success. Zeroing it on return seems like a good idea. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kernel/hyp-stub.S | 2 ++ arch/arm/kvm/init.S | 2 ++ 2 files changed, 4 insertions(+) commit af42f20480bf13d9dbf099ccca65f3de8c44fcaf Author: Marc Zyngier Date: Mon Apr 3 19:38:05 2017 +0100 arm64: hyp-stub: Zero x0 on successful stub handling We now return HVC_STUB_ERR when a stub hypercall fails, but we leave whatever was in x0 on success. Zeroing it on return seems like a good idea. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kernel/hyp-stub.S | 4 +++- arch/arm64/kvm/hyp-init.S | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) commit 0b51c547fdb7ee05b6d65471785a1d899c8a667c Author: Marc Zyngier Date: Mon Apr 3 19:38:04 2017 +0100 arm64: hyp-stub/KVM: Kill __hyp_get_vectors Nobody is using __hyp_get_vectors anymore, so let's remove both implementations (hyp-stub and KVM). Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/virt.h | 12 ++++-------- arch/arm64/kernel/hyp-stub.S | 13 +------------ arch/arm64/kvm/hyp-init.S | 7 +------ arch/arm64/kvm/hyp.S | 2 +- 4 files changed, 7 insertions(+), 27 deletions(-) commit ecb5d61daaa2fc09235191926ea808e00e2e1c0c Author: Marc Zyngier Date: Mon Apr 3 19:38:03 2017 +0100 ARM: hyp-stub/KVM: Kill __hyp_get_vectors Nobody is using __hyp_get_vectors anymore, so let's remove both implementations (hyp-stub and KVM). Acked-by: Russell King Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/asm/virt.h | 10 ++++------ arch/arm/kernel/hyp-stub.S | 13 +------------ arch/arm/kvm/init.S | 7 +------ arch/arm/kvm/interrupts.S | 4 ---- 4 files changed, 6 insertions(+), 28 deletions(-) commit 4897e36c8d37fe508a423d6d15a635aba2557b4e Author: Marc Zyngier Date: Mon Apr 3 19:38:02 2017 +0100 ARM: decompressor: Remove __hyp_get_vectors usage When the compressed image needs to be relocated to avoid being overwritten by the decompression process, we need to relocate the hyp vectors as well so that we can find them once the decompression has taken effect. For that, we perform the following calculation: u32 v = __hyp_get_vectors(); v += offset; __hyp_set_vectors(v); But we're guaranteed that the initial value of v as returned by __hyp_get_vectors is always __hyp_stub_vectors, because we have just set it by calling __hyp_stub_install. So let's remove the use of __hyp_get_vectors, and directly use __hyp_stub_vectors instead. Acked-by: Russell King Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/boot/compressed/head.S | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 47eb3cba48ec11122994057cdc1e5dd7ab9b2be2 Author: Marc Zyngier Date: Mon Apr 3 19:38:01 2017 +0100 arm/arm64: KVM: Use HVC_RESET_VECTORS to reinit HYP mode Instead of trying to compare the value given by __hyp_get_vectors(), which doesn't offer any real guarantee to be the stub's address, use HVC_RESET_VECTORS to make sure we're in a sane state to reinstall KVM across PM events. Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/arm.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit 9e9ebd01a353b1f8986ced524e30cf5eee6aa08e Author: Marc Zyngier Date: Mon Apr 3 19:38:00 2017 +0100 arm/arm64: KVM: Remove kvm_get_idmap_start With __cpu_reset_hyp_mode having become fairly dumb, there is no need for kvm_get_idmap_start anymore. Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_mmu.h | 1 - arch/arm/kvm/mmu.c | 5 ----- arch/arm64/include/asm/kvm_mmu.h | 1 - 3 files changed, 7 deletions(-) commit 0fb265930dbcdb6833094198b8b1b71b1d3ed88d Author: Marc Zyngier Date: Mon Apr 3 19:37:59 2017 +0100 arm/arm64: KVM: Use __hyp_reset_vectors() directly __cpu_reset_hyp_mode doesn't need to be passed any argument now, as the hyp-stub implementations are self-contained, and is now reduced to just calling __hyp_reset_vectors(). Let's drop the wrapper and use the stub hypercall directly. Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_host.h | 6 ------ arch/arm/kvm/arm.c | 3 +-- arch/arm64/include/asm/kvm_host.h | 6 ------ 3 files changed, 1 insertion(+), 14 deletions(-) commit 386627d825d82ed3f7261a0de71a7cc4144e3c4b Author: Marc Zyngier Date: Mon Apr 3 19:37:58 2017 +0100 ARM: KVM: Gracefully handle hyp-stubs being restored from under our feet Should kvm_reboot() be invoked while guest is running, an IPI wil be issued, forcing the guest to exit and HYP being reset to the stubs. We will then try to reenter the guest, only to get an error (HVC_STUB_ERR). This patch allows this case to be gracefully handled by exiting the run loop. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_asm.h | 2 +- arch/arm/kvm/handle_exit.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 4d5f9c14fb638cbe36795cb4b8a0b05ceba0a526 Author: Marc Zyngier Date: Mon Apr 3 19:37:57 2017 +0100 ARM: KVM: Implement HVC_SOFT_RESTART in the init code Another missing stub hypercall is HVC_SOFT_RESTART. It turns out that it is pretty easy to implement in terms of HVC_RESET_VECTORS (since it needs to turn the MMU off). Tested-by: Keerthy Acked-by: Russell King Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/init.S | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit a92ce8f6ab6cb16006f8d73cb0f522079276fd91 Author: Marc Zyngier Date: Mon Apr 3 19:37:56 2017 +0100 ARM: KVM: Convert __cpu_reset_hyp_mode to using __hyp_reset_vectors We are now able to use the hyp stub to reset HYP mode. Time to kiss __kvm_hyp_reset goodbye, and use __hyp_reset_vectors. Tested-by: Keerthy Acked-by: Russell King Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_asm.h | 2 -- arch/arm/include/asm/kvm_host.h | 2 +- arch/arm/kvm/init.S | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) commit 6bebcecb6c5bf65cde18739a4fe57af25c179e44 Author: Marc Zyngier Date: Mon Apr 3 19:37:55 2017 +0100 ARM: KVM: Allow the main HYP code to use the init hyp stub implementation We now have a full hyp-stub implementation in the KVM init code, but the main KVM code only supports HVC_GET_VECTORS, which is not enough. Instead of reinventing the wheel, let's reuse the init implementation by branching to the idmap page when called with a hyp-stub hypercall. Tested-by: Keerthy Acked-by: Russell King Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/hyp/hyp-entry.S | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) commit 5d224aa7d40f6dd79037fd0647eb9eb5e7aaa915 Author: Marc Zyngier Date: Mon Apr 3 19:37:54 2017 +0100 ARM: KVM: Implement HVC_GET_VECTORS in the init code Now that we have an infrastructure to handle hypercalls in the KVM init code, let's implement HVC_GET_VECTORS there. Tested-by: Keerthy Acked-by: Russell King Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/init.S | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit bc845e4fbbbbe97bab3f1bcf688be0b5da420717 Author: Marc Zyngier Date: Mon Apr 3 19:37:53 2017 +0100 ARM: KVM: Implement HVC_RESET_VECTORS stub hypercall in the init code In order to restore HYP mode to its original condition, KVM currently implements __kvm_hyp_reset(). As we're moving towards a hyp-stub defined API, it becomes necessary to implement HVC_RESET_VECTORS. This patch adds the HVC_RESET_VECTORS hypercall to the KVM init code, which so far lacked any form of hypercall support. Tested-by: Keerthy Acked-by: Russell King Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/asm/virt.h | 1 + arch/arm/kernel/hyp-stub.S | 2 +- arch/arm/kvm/init.S | 33 +++++++++++++++++++++++++++------ 3 files changed, 29 insertions(+), 7 deletions(-) commit 7d1bf4e05717d900e69b249b4f08f6b36b00fbf0 Author: Marc Zyngier Date: Mon Apr 3 19:37:52 2017 +0100 ARM: hyp-stub: Implement HVC_RESET_VECTORS stub hypercall Let's define a new stub hypercall that resets the HYP configuration to its default: hyp-stub vectors, and MMU disabled. Of course, for the hyp-stub itself, this is a trivial no-op. Hypervisors will have a bit more work to do. Tested-by: Keerthy Acked-by: Russell King Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/asm/virt.h | 3 +++ arch/arm/kernel/hyp-stub.S | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit 4c70cf07cecab1dd5446249dc8d4795bec693c78 Author: Marc Zyngier Date: Mon Apr 3 19:37:51 2017 +0100 ARM: hyp-stub: Define a return value for failed stub calls Define a standard return value to be returned when a hyp stub call fails. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/asm/virt.h | 2 ++ arch/arm/kernel/hyp-stub.S | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit cf763e4ede9deca45c83d7a59c8e798c4d079da2 Author: Marc Zyngier Date: Mon Apr 3 19:37:50 2017 +0100 ARM: Expose the VA/IDMAP offset The KVM code needs to be able to compute the address of symbols in its idmap page (the equivalent of a virt_to_idmap() call). Unfortunately, virt_to_idmap is slightly complicated, depending on the use of arch_phys_to_idmap_offset or not, and none of that is readily available at HYP. Instead, expose a single kimage_voffset variable which contains the offset between a kernel VA and its idmap address, enabling the VA->IDMAP conversion. This allows the KVM code to behave similarily to its arm64 counterpart. Tested-by: Keerthy Acked-by: Russell King Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/mm/mmu.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6b52f7bdb8883b9c6a47a5558e6b08834c952fb3 Author: Marc Zyngier Date: Mon Apr 3 19:37:49 2017 +0100 ARM: hyp-stub: Use r1 for the soft-restart address It is not really obvious why the restart address should be in r3 when communicated to the hyp-stub. r1 should be perfectly adequate, and consistent with the rest of the code. Tested-by: Keerthy Acked-by: Russell King Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kernel/hyp-stub.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6b85677c38510e09d482a9bd57000a099003a898 Author: Marc Zyngier Date: Mon Apr 3 19:37:48 2017 +0100 ARM: Update cpu_v7_reset documentation cpu_v7_reset() now takes a second parameter indicating whether we should reboot in HYP or not. Update the documentation to reflect this. Tested-by: Keerthy Acked-by: Russell King Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/mm/proc-v7.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 467f97b72b275ca24a390c2aec383c5f3d91b97a Author: Marc Zyngier Date: Mon Apr 3 19:37:47 2017 +0100 ARM: KVM: Convert KVM to use HVC_GET_VECTORS The conversion of the HYP stub ABI to something similar to arm64 left the KVM code broken, as it doesn't know about the new stub numbering. Let's move the various #defines to virt.h, and let KVM use HVC_GET_VECTORS. Tested-by: Keerthy Acked-by: Russell King Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/asm/virt.h | 8 ++++++++ arch/arm/kernel/hyp-stub.S | 4 ---- arch/arm/kvm/hyp/hyp-entry.S | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) commit 9da5ac236de6ab2189c999eb9ddddeef1431ab68 Author: Russell King Date: Mon Apr 3 19:37:46 2017 +0100 ARM: soft-reboot into same mode that we entered the kernel When we soft-reboot (eg, kexec) from one kernel into the next, we need to ensure that we enter the new kernel in the same processor mode as when we were entered, so that (eg) the new kernel can install its own hypervisor - the old kernel's hypervisor will have been overwritten. In order to do this, we need to pass a flag to cpu_reset() so it knows what to do, and we need to modify the kernel's own hypervisor stub to allow it to handle a soft-reboot. As we are always guaranteed to install our own hypervisor if we're entered in HYP32 mode, and KVM will have moved itself out of the way on kexec/normal reboot, we can assume that our hypervisor is in place when we want to kexec, so changing our hypervisor API should not be a problem. Tested-by: Keerthy Acked-by: Catalin Marinas Signed-off-by: Russell King Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/asm/proc-fns.h | 4 ++-- arch/arm/kernel/hyp-stub.S | 13 +++++++++++++ arch/arm/kernel/reboot.c | 7 +++++-- arch/arm/mm/proc-v7.S | 12 ++++++++---- 4 files changed, 28 insertions(+), 8 deletions(-) commit 1342337bc80a5bfb9aa83574da9fb2e22cc64121 Author: Russell King Date: Mon Apr 3 19:37:45 2017 +0100 ARM: hyp-stub: improve ABI Improve the hyp-stub ABI to allow it to do more than just get/set the vectors. We follow the example in ARM64, where r0 is used as an opcode with the other registers as an argument. Tested-by: Keerthy Acked-by: Catalin Marinas Signed-off-by: Russell King Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kernel/hyp-stub.S | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit 506c372ac41dc0c7c1f50f718a8a53cb0748ea96 Author: Marc Zyngier Date: Mon Apr 3 19:37:44 2017 +0100 arm64: KVM: Implement HVC_SOFT_RESTART in the init code Another missing stub hypercall is HVC_SOFT_RESTART. It turns out that it is pretty easy to implement in terms of HVC_RESET_VECTORS (since it needs to turn the MMU off). Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kvm/hyp-init.S | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) commit 4adb1341c7ef68af54732ef11f69faedffa6acb7 Author: Marc Zyngier Date: Mon Apr 3 19:37:43 2017 +0100 arm64: KVM: Convert __cpu_reset_hyp_mode to using __hyp_reset_vectors We are now able to use the hyp stub to reset HYP mode. Time to kiss __kvm_hyp_reset goodbye, and use __hyp_reset_vectors. Acked-by: Catalin Marinas Reviewed-by: James Morse Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_asm.h | 1 - arch/arm64/include/asm/kvm_host.h | 3 +-- arch/arm64/kvm/hyp-init.S | 2 -- arch/arm64/kvm/hyp/hyp-entry.S | 15 --------------- 4 files changed, 1 insertion(+), 20 deletions(-) commit 5fbe9a599a30940c10ede35f90eb7014a6c2ed70 Author: Marc Zyngier Date: Mon Apr 3 19:37:42 2017 +0100 arm64: KVM: Allow the main HYP code to use the init hyp stub implementation We now have a full hyp-stub implementation in the KVM init code, but the main KVM code only supports HVC_GET_VECTORS, which is not enough. Instead of reinventing the wheel, let's reuse the init implementation by branching to the idmap page when called with a hyp-stub hypercall. Acked-by: Catalin Marinas Reviewed-by: James Morse Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kvm/hyp/hyp-entry.S | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit 82529d9bfd6b7b0e8177be94ff768161d5064264 Author: Marc Zyngier Date: Mon Apr 3 19:37:41 2017 +0100 arm64: KVM: Implement HVC_GET_VECTORS in the init code Now that we have an infrastructure to handle hypercalls in the KVM init code, let's implement HVC_GET_VECTORS there. Acked-by: Catalin Marinas Reviewed-by: James Morse Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kvm/hyp-init.S | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit fb1b4e01d2ad9faec82c626f9bd7699daf8d09f5 Author: Marc Zyngier Date: Mon Apr 3 19:37:40 2017 +0100 arm64: KVM: Implement HVC_RESET_VECTORS stub hypercall in the init code In order to restore HYP mode to its original condition, KVM currently implements __kvm_hyp_reset(). As we're moving towards a hyp-stub defined API, it becomes necessary to implement HVC_RESET_VECTORS. This patch adds the HVC_RESET_VECTORS hypercall to the KVM init code, which so far lacked any form of hypercall support. Acked-by: Catalin Marinas Reviewed-by: James Morse Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kvm/hyp-init.S | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit fd0e0c617089e7ba8333c55bd2e318dfc128bf33 Author: Marc Zyngier Date: Mon Apr 3 19:37:39 2017 +0100 arm64: hyp-stub: Implement HVC_RESET_VECTORS stub hypercall Let's define a new stub hypercall that resets the HYP configuration to its default: hyp-stub vectors, and MMU disabled. Of course, for the hyp-stub itself, this is a trivial no-op. Hypervisors will have a bit more work to do. Acked-by: Catalin Marinas Reviewed-by: James Morse Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/virt.h | 9 +++++++++ arch/arm64/kernel/hyp-stub.S | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) commit 810c86ee4ee70928952fe17bc593d569052d8198 Author: Marc Zyngier Date: Mon Apr 3 19:37:38 2017 +0100 arm64: hyp-stub: Update documentation in asm/virt.h Comments in asm/virt.h are slightly out of date, so let's align them with the new behaviour of the code. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/virt.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 4993fdcf399f59ed56a16ecfedf8a61066198816 Author: Marc Zyngier Date: Mon Apr 3 19:37:37 2017 +0100 arm64: hyp-stub: Define a return value for failed stub calls Define a standard return value to be returned when a hyp stub call fails, and make KVM use it for ARM_EXCEPTION_HYP_GONE (instead of using a KVM-specific value). Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_asm.h | 2 +- arch/arm64/include/asm/virt.h | 3 +++ arch/arm64/kernel/hyp-stub.S | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) commit 9bae3ae513015eea9534cc2c2b6f7e405abad71a Author: Marc Zyngier Date: Mon Apr 3 19:37:36 2017 +0100 arm64: hyp-stub: Don't save lr in the EL1 code The EL2 code is not corrupting lr anymore, so don't bother preserving it in the EL1 trampoline code. Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kernel/hyp-stub.S | 4 ---- 1 file changed, 4 deletions(-) commit 6c9ae25dfcaea32512fc27308c64e78159c46aeb Author: Marc Zyngier Date: Mon Apr 3 19:37:35 2017 +0100 arm64: KVM: Move lr save/restore to do_el2_call At the moment, we only save/restore lr if on VHE, as we rely only the EL1 code to have preserved it in the non-VHE case. As we're about to get rid of the latter, let's move the save/restore code to the do_el2_call macro, unifying both code paths. Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kvm/hyp.S | 3 --- arch/arm64/kvm/hyp/hyp-entry.S | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) commit 50d912cc3e5055c14e13a8e7de5c078b01a2e2b7 Author: Marc Zyngier Date: Mon Apr 3 19:37:34 2017 +0100 arm64: hyp-stub: Stop pointlessly clobbering lr When entering the kernel hyp stub, we check whether or not we've made it here through an HVC instruction, clobbering lr (aka x30) in the process. This is completely pointless, as HVC is the only way to get here (all traps to EL2 are disabled, no interrupt override is applied). So let's remove this bit of code whose only point is to corrupt a valuable register. Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kernel/hyp-stub.S | 6 ------ 1 file changed, 6 deletions(-) commit 9d0d4d34d9b527a1514d32836708be31f54c3c0b Author: Marc Zyngier Date: Mon Mar 27 17:03:45 2017 +0100 arm: KVM: Treat CP15 accessors returning false as successful Instead of considering that a CP15 accessor has failed when returning false, let's consider that it is *always* successful (after all, we won't stand for an incomplete emulation). The return value now simply indicates whether we should skip the instruction (because it has now been emulated), or if we should leave the PC alone if the emulation has injected an exception. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/kvm/coproc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b1d4cb69838f71d62dc0ecf21566a1425835f015 Author: Marc Zyngier Date: Mon Mar 27 17:03:44 2017 +0100 arm: KVM: Make unexpected register accesses inject an undef Reads from write-only system registers are generally confined to EL1 and not propagated to EL2 (that's what the architecture mantates). In order to be sure that we have a sane behaviour even in the unlikely event that we have a broken system, we still handle it in KVM. Same goes for write to RO registers. In that case, let's inject an undef into the guest. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm/kvm/coproc.c | 18 ++++++++++++++++++ arch/arm/kvm/coproc.h | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) commit b6b7a8069d5f44bcc248f5d067cdb22debadfa56 Author: Marc Zyngier Date: Mon Mar 27 17:03:43 2017 +0100 arm64: KVM: Do not corrupt registers on failed 64bit CP read If we fail to emulate a mrrc instruction, we: 1) deliver an exception, 2) spit a nastygram on the console, 3) write back some garbage to Rt/Rt2 While 1) and 2) are perfectly acceptable, 3) is out of the scope of the architecture... Let's mimick the code in kvm_handle_cp_32 and be more cautious. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kvm/sys_regs.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit e70b952263445ef3f0e4934d7277145f0fecd709 Author: Marc Zyngier Date: Mon Mar 27 17:03:42 2017 +0100 arm64: KVM: Treat sysreg accessors returning false as successful Instead of considering that a sysreg accessor has failed when returning false, let's consider that it is *always* successful (after all, we won't stand for an incomplete emulation). The return value now simply indicates whether we should skip the instruction (because it has now been emulated), or if we should leave the PC alone if the emulation has injected an exception. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 49 +++++++++++++++++++---------------------------- 1 file changed, 20 insertions(+), 29 deletions(-) commit e04432301607a6750e31d7db4cc4dfdd742ee7f8 Author: Marc Zyngier Date: Mon Mar 27 17:03:41 2017 +0100 arm64: KVM: PMU: Inject UNDEF on read access to PMSWINC_EL0 PMSWINC_EL0 is a WO register, so let's UNDEF when reading from it (in the highly hypothetical case where this doesn't UNDEF at EL1). Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 7b5b4df1a79954e0b208630fc63b16ec0231a516 Author: Marc Zyngier Date: Mon Mar 27 17:03:40 2017 +0100 arm64: KVM: Make unexpected reads from WO registers inject an undef Reads from write-only system registers are generally confined to EL1 and not propagated to EL2 (that's what the architecture mantates). In order to be sure that we have a sane behaviour even in the unlikely event that we have a broken system, we still handle it in KVM. In that case, let's inject an undef into the guest. Let's also remove write_to_read_only which isn't used anywhere. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 9 +++++++++ arch/arm64/kvm/sys_regs.h | 18 ------------------ 2 files changed, 9 insertions(+), 18 deletions(-) commit 9008c235cb8162a4110c9153cace8530bc716210 Author: Marc Zyngier Date: Mon Mar 27 17:03:39 2017 +0100 arm64: KVM: PMU: Inject UNDEF on non-privileged accesses access_pminten() and access_pmuserenr() can only be accessed when the CPU is in a priviledged mode. If it is not, let's inject an UNDEF exception. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 24d5950f6befae3f4b7eaab890ad9bc0988824b6 Author: Marc Zyngier Date: Mon Mar 27 17:03:38 2017 +0100 arm64: KVM: PMU: Inject UNDEF exception on illegal register access Both pmu_*_el0_disabled() and pmu_counter_idx_valid() perform checks on the validity of an access, but only return a boolean indicating if the access is valid or not. Let's allow these functions to also inject an UNDEF exception if the access was illegal. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 6c0070366deadd16503853708a0e32a612b7f628 Author: Marc Zyngier Date: Mon Mar 27 17:03:37 2017 +0100 arm64: KVM: PMU: Refactor pmu_*_el0_disabled There is a lot of duplication in the pmu_*_el0_disabled helpers, and as we're going to modify them shortly, let's move all the common stuff in a single function. No functional change. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kvm/sys_regs.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit 8ac76ef4b5139a1d10e459ae43b6c14f49391977 Author: Christoffer Dall Date: Sat Mar 18 13:48:42 2017 +0100 KVM: arm/arm64: vgic: Improve sync_hwstate performance There is no need to call any functions to fold LRs when we don't use any LRs and we don't need to mess with overflow flags, take spinlocks, or prune the AP list if the AP list is empty. Note: list_empty is a single atomic read (uses READ_ONCE) and can therefore check if a list is empty or not without the need to take the spinlock protecting the list. Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-v2.c | 7 +++++-- virt/kvm/arm/vgic/vgic-v3.c | 7 +++++-- virt/kvm/arm/vgic/vgic.c | 10 ++++++---- 3 files changed, 16 insertions(+), 8 deletions(-) commit 0b09b6e51931ef5b4e0d7adee0a666c7f4b1867b Author: Christoffer Dall Date: Sat Mar 18 13:41:54 2017 +0100 KVM: arm/arm64: vgic: Don't check vgic_initialized in sync/flush Now when we do an early init of the static parts of the VGIC data structures, we can do things like checking if the AP lists are empty directly without having to explicitly check if the vgic is initialized and reduce a bit of work in our critical path. Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic.c | 6 ------ 1 file changed, 6 deletions(-) commit 966e0149196fe02c6d239f00162e9f92a5bbf3d5 Author: Christoffer Dall Date: Sat Mar 18 13:40:37 2017 +0100 KVM: arm/arm64: vgic: Implement early VGIC init functionality Implement early initialization for both the distributor and the CPU interfaces. The basic idea is that even though the VGIC is not functional or not requested from user space, the critical path of the run loop can still call VGIC functions that just won't do anything, without them having to check additional initialization flags to ensure they don't look at uninitialized data structures. Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-init.c | 96 +++++++++++++++++++++++++------------------ 1 file changed, 56 insertions(+), 40 deletions(-) commit 096f31c4360f6bab130e3f68513719ec6890128c Author: Christoffer Dall Date: Thu Dec 29 15:57:31 2016 +0100 KVM: arm/arm64: vgic: Get rid of MISR and EISR fields We don't use these fields anymore so let's nuke them completely. Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall include/kvm/arm_vgic.h | 4 ---- virt/kvm/arm/hyp/vgic-v2-sr.c | 2 -- virt/kvm/arm/hyp/vgic-v3-sr.c | 2 -- 3 files changed, 8 deletions(-) commit b6095b084d875ef40fd294a3ce53cffc028f6884 Author: Christoffer Dall Date: Thu Dec 29 15:48:57 2016 +0100 KVM: arm/arm64: vgic: Get rid of unnecessary save_maint_int_state Now when we don't look at the MISR and EISR values anymore, we can get rid of the logic to save them in the GIC save/restore code. Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/hyp/vgic-v2-sr.c | 40 ---------------------------------------- virt/kvm/arm/hyp/vgic-v3-sr.c | 29 ----------------------------- 2 files changed, 69 deletions(-) commit af0614991ab64a55f86cda257cedff1be4e435fa Author: Christoffer Dall Date: Thu Dec 29 15:44:27 2016 +0100 KVM: arm/arm64: vgic: Get rid of unnecessary process_maintenance operation Since we always read back the LRs that we wrote to the guest and the MISR and EISR registers simply provide a summary of the configuration of the bits in the LRs, there is really no need to read back those status registers and process them. We might as well just signal the notifyfd when folding the LR state and save some cycles in the process. We now clear the underflow bit in the fold_lr_state functions as we only need to clear this bit if we had used all the LRs, so this is as good a place as any to do that work. Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-v2.c | 59 +++++++++------------------------------------ virt/kvm/arm/vgic/vgic-v3.c | 51 ++++++++++----------------------------- virt/kvm/arm/vgic/vgic.c | 9 ------- virt/kvm/arm/vgic/vgic.h | 2 -- 4 files changed, 25 insertions(+), 96 deletions(-) commit 90cac1f52ad1db73b6ed99143ce7ad473bd90a95 Author: Christoffer Dall Date: Tue Mar 21 21:16:12 2017 +0100 KVM: arm/arm64: vgic: Only set underflow when actually out of LRs We currently assume that all the interrupts in our AP list will be queued to LRs, but that's not necessarily the case, because some of them could have been migrated away to different VCPUs and only the VCPU thread itself can remove interrupts from its AP list. Therefore, slightly change the logic to only setting the underflow interrupt when we actually run out of LRs. As it turns out, this allows us to further simplify the handling in vgic_sync_hwstate in later patches. Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 00dafa0fcfe9fb1d863f08dc45d6f05ac9505d46 Author: Christoffer Dall Date: Fri Dec 23 00:04:59 2016 +0100 KVM: arm/arm64: vgic: Get rid of live_lrs There is no need to calculate and maintain live_lrs when we always populate the lowest numbered LRs first on every entry and clear all LRs on every exit. Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall include/kvm/arm_vgic.h | 2 -- virt/kvm/arm/hyp/vgic-v2-sr.c | 39 ++++++++++----------------------------- virt/kvm/arm/hyp/vgic-v3-sr.c | 42 ++++++++++++------------------------------ 3 files changed, 22 insertions(+), 61 deletions(-) commit f6769581e90ba2535b3e587fe15b74f6cbc4aaab Author: Shih-Wei Li Date: Wed Oct 19 18:12:34 2016 +0000 KVM: arm/arm64: vgic: Avoid flushing vgic state when there's no pending IRQ We do not need to flush vgic states in each world switch unless there is pending IRQ queued to the vgic's ap list. We can thus reduce the overhead by not grabbing the spinlock and not making the extra function call to vgic_flush_lr_state. Note: list_empty is a single atomic read (uses READ_ONCE) and can therefore check if a list is empty or not without the need to take the spinlock protecting the list. Reviewed-by: Marc Zyngier Signed-off-by: Shih-Wei Li Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 328e566479449194979d64685ae6d74c989599bb Author: Christoffer Dall Date: Thu Mar 24 11:21:04 2016 +0100 KVM: arm/arm64: vgic: Defer touching GICH_VMCR to vcpu_load/put We don't have to save/restore the VMCR on every entry to/from the guest, since on GICv2 we can access the control interface from EL1 and on VHE systems with GICv3 we can access the control interface from KVM running in EL2. GICv3 systems without VHE becomes the rare case, which has to save/restore the register on each round trip. Note that userspace accesses may see out-of-date values if the VCPU is running while accessing the VGIC state via the KVM device API, but this is already the case and it is up to userspace to quiesce the CPUs before reading the CPU registers from the GIC for an up-to-date view. Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_asm.h | 3 +++ arch/arm/kvm/arm.c | 11 ++++++----- arch/arm64/include/asm/kvm_asm.h | 2 ++ include/kvm/arm_vgic.h | 3 +++ virt/kvm/arm/hyp/vgic-v2-sr.c | 3 --- virt/kvm/arm/hyp/vgic-v3-sr.c | 14 ++++++++++---- virt/kvm/arm/vgic/vgic-init.c | 12 ++++++++++++ virt/kvm/arm/vgic/vgic-v2.c | 24 ++++++++++++++++++++++-- virt/kvm/arm/vgic/vgic-v3.c | 22 ++++++++++++++++++++-- virt/kvm/arm/vgic/vgic.c | 22 ++++++++++++++++++++++ virt/kvm/arm/vgic/vgic.h | 6 ++++++ 11 files changed, 106 insertions(+), 16 deletions(-) commit 056aad67f836e20568be9b7ca07703a8dea26e0c Author: Suzuki K Poulose Date: Mon Mar 20 18:26:42 2017 +0000 kvm: arm/arm64: Rework gpa callback handlers In order to perform an operation on a gpa range, we currently iterate over each page in a user memory slot for the given range. This is inefficient while dealing with a big range (e.g, a VMA), especially while unmaping a range. At present, with stage2 unmap on a range with a hugepage backed region, we clear the PMD when we unmap the first page in the loop. The remaining iterations simply traverse the page table down to the PMD level only to see that nothing is in there. This patch reworks the code to invoke the callback handlers on the biggest range possible within the memory slot to to reduce the number of times the handler is called. Cc: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Suzuki K Poulose Signed-off-by: Christoffer Dall arch/arm/kvm/mmu.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) commit 6cb3d05f3030deed157c9bbada5c58e7ee0f5172 Author: Julia Lawall Date: Sat Apr 8 19:12:27 2017 +0200 staging: rtl8723bs: core: rtw_cmd: drop unneeded null tests kfree returns immediately on NULL so the tests are not needed. Generated by: scripts/coccinelle/free/ifnullfree.cocci CC: Hans de Goede Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_cmd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f951e88bdc1c1f667d9237a52e2e5d76ae16cf54 Author: Julia Lawall Date: Sat Apr 8 19:14:08 2017 +0200 staging: rtl8723bs: core: rtw_cmd: drop unneeded null test kfree returns immediately on NULL so the tests are not needed. Generated by: scripts/coccinelle/free/ifnullfree.cocci CC: Hans de Goede Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1c21a34de1ee9144dc7f222d32e7979dff13a8e7 Author: Larry Finger Date: Sat Apr 8 11:07:45 2017 -0500 staging: rtl8723bs: Fix indenting error in core/rtw_pwrctrl.c Smatch reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_pwrctrl.c drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:641 LeaveAllPowerSaveModeDirect() warn: inconsistent indenting Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd51edb0bda65c8d306746846ce33f4ccf9e05c9 Author: Larry Finger Date: Sat Apr 8 11:07:44 2017 -0500 staging: rtl8723bs: Fix indenting problems in core/rtw_odm.c Smatch reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_odm.c drivers/staging/rtl8723bs/core/rtw_odm.c:109 rtw_odm_dbg_comp_msg() warn: if statement not indented drivers/staging/rtl8723bs/core/rtw_odm.c:146 rtw_odm_ability_msg() warn: if statement not indented Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_odm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit ef9209b642f13fc293b27612d7d1d4c9de1b5b75 Author: Larry Finger Date: Sat Apr 8 11:07:43 2017 -0500 staging: rtl8723bs: Fix indenting errors and an off-by-one mistake in core/rtw_mlme_ext.c Smatch lists the following: CHECK drivers/staging/rtl8723bs/core/rtw_mlme_ext.c drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:525 _mgt_dispatcher() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1595 OnAssocReq() error: buffer overflow 'pstapriv->sta_aid' 32 <= 32 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2391 dump_mgntframe_and_wait() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2420 dump_mgntframe_and_wait_ack() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:4969 process_80211d() error: testing array offset 'i' after use. drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:5738 linked_status_chk() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:6459 sitesurvey_cmd_hdl() warn: inconsistent indenting The indenting problems were fixed with white-space changes. The error at line 1595 was the result of an off-by-one error in a for loop. The error at line 4969 was not fixed as that code lies inside a block of code that only is needed for 5G channels. This chip only works at 2.4 GHz. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 3498d6844cbb19b64dfc3dc73d222de461f7068a Author: Larry Finger Date: Sat Apr 8 11:07:42 2017 -0500 staging: rtl8723bs: Fix white-space errors in core/rtw_recv.c Smart reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_recv.c drivers/staging/rtl8723bs/core/rtw_recv.c:598 portctrl() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_recv.c:838 sta2sta_data_frame() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_recv.c:1547 validate_recv_frame() warn: inconsistent indenting Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_recv.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 0ba8d4b9594f8ad5d86e6456125a0c4f26e363bf Author: Larry Finger Date: Sat Apr 8 11:07:41 2017 -0500 staging: rtl8723bs: Fix some white-space errors in core/rtw_security.c Smatch reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_security.c drivers/staging/rtl8723bs/core/rtw_security.c:266 rtw_wep_encrypt() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:433 rtw_seccalctkipmic() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:749 rtw_tkip_encrypt() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:865 rtw_tkip_decrypt() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:1383 aes_cipher() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:1415 aes_cipher() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:1430 aes_cipher() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:1582 rtw_aes_encrypt() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:1651 aes_decipher() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:1739 aes_decipher() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:1792 aes_decipher() warn: curly braces intended? drivers/staging/rtl8723bs/core/rtw_security.c:1809 aes_decipher() warn: inconsistent indenting All of the above are fixed with white-space changes. A few unneeded blank lines are deleted. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_security.c | 469 +++++++++++++------------- 1 file changed, 229 insertions(+), 240 deletions(-) commit aa29d8bca578930d86a2087175c2a8d2673f3fa6 Author: Larry Finger Date: Sat Apr 8 11:07:40 2017 -0500 staging: rtl8723bs: Fix indenting problem in core/rtw_sta_mgt.c Sparse reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_sta_mgt.c drivers/staging/rtl8723bs/core/rtw_sta_mgt.c:25 _rtw_init_stainfo() warn: inconsistent indenting This problem is fixed with a white-spcae change. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 130cf72fbd53887ad54924192efa0c212e4dc9a4 Author: Larry Finger Date: Sat Apr 8 11:07:39 2017 -0500 staging: rtl8723bs: Fix some indenting problems and a potential data overrun Smatch reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_wlan_util.c drivers/staging/rtl8723bs/core/rtw_wlan_util.c:67 cckrates_included() warn: if statement not indented drivers/staging/rtl8723bs/core/rtw_wlan_util.c:81 cckratesonly_included() warn: if statement not indented drivers/staging/rtl8723bs/core/rtw_wlan_util.c:815 rtw_camid_alloc() warn: should '1 << (cam_id)' be a 64 bit type? The first two are fixed with white-space changes. The third is fixed by restricting cam_id to be less than 32. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5004922436e5e7d9665a3a60dfd3534dde300bc6 Author: Larry Finger Date: Sat Apr 8 11:07:38 2017 -0500 staging: rtl8723bs: Fix indenting mistakes in core/rtw_mlme.c Smatch reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_mlme.c drivers/staging/rtl8723bs/core/rtw_mlme.c:862 rtw_survey_event_callback() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_mlme.c:1102 rtw_free_assoc_resources() warn: if statement not indented drivers/staging/rtl8723bs/core/rtw_mlme.c:1165 rtw_indicate_disconnect() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_mlme.c:2830 rtw_restructure_ht_ie() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_mlme.c:2991 rtw_update_ht_cap() warn: inconsistent indenting All of there are simple white-space errors. A typo is also fixed. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme.c | 37 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit b7126fae5265249e674495998c7a92aa019e044c Author: Larry Finger Date: Sat Apr 8 11:07:37 2017 -0500 staging: rtl8723bs: Fix indenting mistakes in core/rtw_ieee80211.c Smatch reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_ieee80211.c drivers/staging/rtl8723bs/core/rtw_ieee80211.c:83 rtw_is_cckrates_included() warn: if statement not indented drivers/staging/rtl8723bs/core/rtw_ieee80211.c:98 rtw_is_cckratesonly_included() warn: if statement not indented These warnings are fixed with white-space changes. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 9c63e98628e79253aac49b94da6159bb1520e13e Author: Larry Finger Date: Sat Apr 8 11:07:36 2017 -0500 staging: rtl8723bs: Fix indenting mistake in core/rtw_ap.c Smatch reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_ap.c drivers/staging/rtl8723bs/core/rtw_ap.c:382 expire_timeout_chk() warn: inconsistent indenting Fixing this requires changing the indentatikon of a long for loop. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ap.c | 99 ++++++++++++++++----------------- 1 file changed, 47 insertions(+), 52 deletions(-) commit 21a9509e2ac9a45a03140fbb420697254adc89d4 Author: Larry Finger Date: Sat Apr 8 11:07:35 2017 -0500 staging: rtl8723bs: Fix possible usage of NULL pointer in core/rtw_debug.c Smatch reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_debug.c drivers/staging/rtl8723bs/core/rtw_debug.c:454 proc_get_survey_info() error: we previously assumed 'phead' could be null (see line 453) drivers/staging/rtl8723bs/core/rtw_debug.c:455 proc_get_survey_info() warn: variable dereferenced before check 'phead' (see line 454) In the code, there are two successive calls to get_head(). The second is removed. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_debug.c | 1 - 1 file changed, 1 deletion(-) commit f195f7d5fdbfb70c6634224dab13eb190d665445 Author: Larry Finger Date: Sat Apr 8 11:07:34 2017 -0500 staging: rtl8723bs: Fix indenting problems in core/rtw_xmit.c Smatch logs the following: CHECK drivers/staging/rtl8723bs/core/rtw_xmit.c drivers/staging/rtl8723bs/core/rtw_xmit.c:277 _rtw_init_xmit_priv() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_xmit.c:294 _rtw_free_xmit_priv() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_xmit.c:295 _rtw_free_xmit_priv() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_xmit.c:946 xmitframe_addmic() warn: inconsistent indenting These are fixed with white-space changes. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_xmit.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1793db1d1c8d6f2b6841381532250ecbd57d7e93 Author: Larry Finger Date: Sat Apr 8 11:07:33 2017 -0500 staging: rtl8723bs: Fix indenting problem for hal/hal_com.c Smatch lists the following: CHECK drivers/staging/rtl8723bs/hal/hal_com_phycfg.c drivers/staging/rtl8723bs/hal/hal_com_phycfg.c:2090 Hal_ChannelPlanToRegulation() warn: inconsistent indenting Fixed by changing the white space. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/hal_com.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0952abb04309f130ea5130f97f57b215e4124c3f Author: Larry Finger Date: Sat Apr 8 11:07:32 2017 -0500 staging: rtl8723bs: Fix indening problem in hal/hal_com_phycfg.c Smatch reports the following: CHECK drivers/staging/rtl8723bs/hal/hal_com_phycfg.c drivers/staging/rtl8723bs/hal/hal_com_phycfg.c:2090 Hal_ChannelPlanToRegulation() warn: inconsistent indenting This warning is fixed with a white-space change. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9be20120a27649059990063f6c54ecaf983ac6f Author: Larry Finger Date: Sat Apr 8 11:07:31 2017 -0500 staging: rtl8723bs: Fix indenting problems in hal/HalHWImg8723B_BB.c Smatch lists the following: CHECK drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c:314 ODM_ReadAndConfig_MP_8723B_AGC_TAB() warn: for statement not indented drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c:583 ODM_ReadAndConfig_MP_8723B_PHY_REG() warn: for statement not indented drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c:586 ODM_ReadAndConfig_MP_8723B_PHY_REG() warn: inconsistent indenting These were all fixed with white-space changes. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7e2b0aaec6335104866f9e31788a8aab7a9045e5 Author: Larry Finger Date: Sat Apr 8 11:07:30 2017 -0500 staging: rtl8723bs: Fix potential usage while NULL error in hal/rtl8723b_hal_init.c Smatch logs the following: CHECK drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:518 rtl8723b_FirmwareDownload() error: we previously assumed 'pFirmware' could be null (see line 382) Fixing this error required a rewrite of the error exits from this routine. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 6557ddfec348c13d7798ea9e44f11b6459f2f652 Author: Larry Finger Date: Sat Apr 8 11:07:29 2017 -0500 staging: rtl8723bs: Fix various errors in os_dep/ioctl_cfg80211.c Smatch lists the following: CHECK drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:470 rtw_cfg80211_ibss_indicate_connect() error: we previously assumed 'scanned' could be null (see line 466) drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:942 rtw_cfg80211_set_encryption() warn: inconsistent indenting drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:955 rtw_cfg80211_set_encryption() error: buffer overflow 'psecuritypriv->dot11DefKey' 4 <= 4 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1017 rtw_cfg80211_set_encryption() error: buffer overflow 'padapter->securitypriv.dot118021XGrpKey' 5 <= 5 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1216 cfg80211_rtw_set_default_key() warn: inconsistent indenting drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2498 rtw_cfg80211_monitor_if_xmit_entry() error: we previously assumed 'skb' could be null (see line 2495) drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2850 cfg80211_rtw_start_ap() warn: if statement not indented drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2860 cfg80211_rtw_start_ap() warn: if statement not indented drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:3417 rtw_cfg80211_preinit_wiphy() warn: inconsistent indenting drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:3547 rtw_wdev_alloc() info: ignoring unreachable code. The indenting warnings were fixed by simple white space changes. The section where 'scanned' could be null required an immediate exit from the routine at that point. A similar fix was required where 'skb' could be null. The two buffer overflow errors were caused by off-by-one errors. While locating these problems, another one was found in os_dep/ioctl_linux.c. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 38 +++++++++-------------- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +- 2 files changed, 15 insertions(+), 25 deletions(-) commit e62bb9252cd049ee11847777c6a87cffe17153a5 Author: Larry Finger Date: Sat Apr 8 11:07:28 2017 -0500 staging: rtl8723bs: Fix indenting mistake in os_dep/mlme_linux.c Smatch reports the following warning: CHECK drivers/staging/rtl8723bs/os_dep/mlme_linux.c drivers/staging/rtl8723bs/os_dep/mlme_linux.c:149 rtw_os_indicate_disconnect() warn: inconsistent indenting Again, a simple change in the white space fixes this problem. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 72544c5f9dd9fbf349bfe84527d7273331e5f06a Author: Larry Finger Date: Sat Apr 8 11:07:27 2017 -0500 staging: rtl8723bs: Fix indenting warning in os_dep/os_intfs.c Smatch logs the following warning: CHECK drivers/staging/rtl8723bs/os_dep/os_intfs.c drivers/staging/rtl8723bs/os_dep/os_intfs.c:1082 ips_netdrv_open() warn: inconsistent indenting A simple change in the white space handles this warning. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2679a3fbef60884260542587e73565979f3d4fd1 Author: Larry Finger Date: Sat Apr 8 11:07:26 2017 -0500 staging: rtl8723bs: Fix dereference before check warning in os_dep/recv_linux.c Smatch lists the following warning: CHECK drivers/staging/rtl8723bs/os_dep/recv_linux.c drivers/staging/rtl8723bs/os_dep/recv_linux.c:353 rtw_recv_indicatepkt() warn: variable dereferenced before check 'precv_frame' (see line 312) This warning is fixed by removing the test at line 353. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/recv_linux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c49c1f2bdeef183c2bdf62f638406b115a318976 Author: Larry Finger Date: Sat Apr 8 11:07:25 2017 -0500 staging: rtl8723bs: Fix indenting warning in os_dep/rtw_proc.c Smatch lists the following warning: CHECK drivers/staging/rtl8723bs/os_dep/rtw_proc.c drivers/staging/rtl8723bs/os_dep/rtw_proc.c:102 rtw_drv_proc_open() warn: inconsistent indenting This warning is fixed with a simple change in the white space. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/rtw_proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9ad88c71d36d1ab25d6412db1b09edf3448db9c2 Author: Larry Finger Date: Sat Apr 8 11:07:24 2017 -0500 staging: rtl8723bs: Fix indenting warning in os_dep/xmit_linux.c Smatch issues the warning CHECK drivers/staging/rtl8723bs/os_dep/xmit_linux.c drivers/staging/rtl8723bs/os_dep/xmit_linux.c:42 _rtw_pktfile_read() warn: inconsistent indenting A simple indent changes fixes this. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f139972b489f8bc2c821aa25ac65018d92af3f7 Author: Gao Feng Date: Wed Apr 5 09:57:04 2017 +0800 netfilter: udplite: Remove duplicated udplite4/6 declaration There are two nf_conntrack_l4proto_udp4 declarations in the head file nf_conntrack_ipv4/6.h. Now remove one which is not enbraced by the macro CONFIG_NF_CT_PROTO_UDPLITE. Signed-off-by: Gao Feng include/net/netfilter/ipv4/nf_conntrack_ipv4.h | 1 - include/net/netfilter/ipv6/nf_conntrack_ipv6.h | 1 - 2 files changed, 2 deletions(-) commit 417d978fa532b61b89f0c3ccbd9cdb51090ea032 Merge: 7f56452 a86d8be Author: David S. Miller Date: Sat Apr 8 13:49:36 2017 -0700 Merge branch 'dsa-receive-path-simplifications' Florian Fainelli says: ==================== net: dsa: Receive path simplifications This patch series does factor the common code found in all tag implementations into dsa_switch_rcv(). The original motivation was to add GRO support, but this may be a lot of work with unclear benefits at this point. Changes in v2: - take care of tag_mtk.c in the process ==================== Signed-off-by: David S. Miller commit a86d8becc3f04a5e350b5a17530e6a01495c00a5 Author: Florian Fainelli Date: Sat Apr 8 08:55:23 2017 -0700 net: dsa: Factor bottom tag receive functions All DSA tag receive functions do strictly the same thing after they have located the originating source port from their tag specific protocol: - push ETH_HLEN bytes - set pkt_type to PACKET_HOST - call eth_type_trans() - bump up counters - call netif_receive_skb() Factor all of that into dsa_switch_rcv(). This also makes us return a pointer to a sk_buff, which makes us symetric with the xmit function. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 2 +- net/dsa/dsa.c | 20 +++++++++++++++++++- net/dsa/dsa_priv.h | 5 +++-- net/dsa/tag_brcm.c | 18 +++++------------- net/dsa/tag_dsa.c | 18 +++++------------- net/dsa/tag_edsa.c | 18 +++++------------- net/dsa/tag_mtk.c | 20 +++++--------------- net/dsa/tag_qca.c | 18 +++++------------- net/dsa/tag_trailer.c | 18 +++++------------- 9 files changed, 53 insertions(+), 84 deletions(-) commit 16c5dcb13a371feae0e680e6518775b5335b37d8 Author: Florian Fainelli Date: Sat Apr 8 08:55:22 2017 -0700 net: dsa: Move skb_unshare() to dsa_switch_rcv() All DSA tag receive functions need to unshare the skb before mangling it, move this to the generic dsa_switch_rcv() function which will allow us to make the tag receive function return their mangled skb without caring about freeing a NULL skb. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa.c | 4 ++++ net/dsa/tag_brcm.c | 5 ----- net/dsa/tag_dsa.c | 5 ----- net/dsa/tag_edsa.c | 5 ----- net/dsa/tag_mtk.c | 5 ----- net/dsa/tag_qca.c | 5 ----- net/dsa/tag_trailer.c | 5 ----- 7 files changed, 4 insertions(+), 30 deletions(-) commit 9d7f9c4f78e95dd9d17199a53d903262530be62e Author: Florian Fainelli Date: Sat Apr 8 08:55:21 2017 -0700 net: dsa: Do not check for NULL dst in tag parsers dsa_switch_rcv() already tests for dst == NULL, so there is no need to duplicate the same check within the tag receive functions. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/tag_brcm.c | 3 --- net/dsa/tag_dsa.c | 3 --- net/dsa/tag_edsa.c | 3 --- net/dsa/tag_mtk.c | 3 --- net/dsa/tag_qca.c | 3 --- net/dsa/tag_trailer.c | 2 -- 6 files changed, 17 deletions(-) commit 1e038e3eef7d68dcdae4abfb5da7f2dff4becb63 Author: Arushi Singhal Date: Sat Apr 8 21:19:30 2017 +0530 netfilter: ip6_tables: Remove unneccessary comments This comments are obsolete and should go, as there are no set of rules per CPU anymore. Signed-off-by: Arushi Singhal net/ipv6/netfilter/ip6_tables.c | 9 --------- 1 file changed, 9 deletions(-) commit 7f564528a480084e2318cd48caba7aef4a54a77f Author: Steffen Klassert Date: Sat Apr 8 20:36:24 2017 +0200 skbuff: Extend gso_type to unsigned int. All available gso_type flags are currently in use, so extend gso_type from 'unsigned short' to 'unsigned int' to be able to add further flags. We reorder the struct skb_shared_info to use two bytes of the four byte hole before dataref. All fields before dataref are cleared, i.e. four bytes more than before the change. The remaining two byte hole is moved to the beginning of the structure, this protects us from immediate overwites on out of bound writes to the sk_buff head. Structure layout on x86-64 before the change: struct skb_shared_info { unsigned char nr_frags; /* 0 1 */ __u8 tx_flags; /* 1 1 */ short unsigned int gso_size; /* 2 2 */ short unsigned int gso_segs; /* 4 2 */ short unsigned int gso_type; /* 6 2 */ struct sk_buff * frag_list; /* 8 8 */ struct skb_shared_hwtstamps hwtstamps; /* 16 8 */ u32 tskey; /* 24 4 */ __be32 ip6_frag_id; /* 28 4 */ atomic_t dataref; /* 32 4 */ /* XXX 4 bytes hole, try to pack */ void * destructor_arg; /* 40 8 */ skb_frag_t frags[17]; /* 48 272 */ /* --- cacheline 5 boundary (320 bytes) --- */ /* size: 320, cachelines: 5, members: 12 */ /* sum members: 316, holes: 1, sum holes: 4 */ }; Structure layout on x86-64 after the change: struct skb_shared_info { short unsigned int _unused; /* 0 2 */ unsigned char nr_frags; /* 2 1 */ __u8 tx_flags; /* 3 1 */ short unsigned int gso_size; /* 4 2 */ short unsigned int gso_segs; /* 6 2 */ struct sk_buff * frag_list; /* 8 8 */ struct skb_shared_hwtstamps hwtstamps; /* 16 8 */ unsigned int gso_type; /* 24 4 */ u32 tskey; /* 28 4 */ __be32 ip6_frag_id; /* 32 4 */ atomic_t dataref; /* 36 4 */ void * destructor_arg; /* 40 8 */ skb_frag_t frags[17]; /* 48 272 */ /* --- cacheline 5 boundary (320 bytes) --- */ /* size: 320, cachelines: 5, members: 13 */ }; Signed-off-by: Steffen Klassert Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/skbuff.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bcd069bb250acf6088b60d189ab3ec3ae8dd11a5 Author: Martin K. Petersen Date: Wed Apr 5 19:21:25 2017 +0200 scsi: sd: Remove LBPRZ dependency for discards Separating discards and zeroout operations allows us to remove the LBPRZ block zeroing constraints from discards and honor the device preferences for UNMAP commands. If supported by the device, we'll also choose UNMAP over one of the WRITE SAME variants for discards. Signed-off-by: Martin K. Petersen Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/scsi/sd.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) commit e6bd931284b4b9bc17a2995257a0769370bc5202 Author: Martin K. Petersen Date: Wed Apr 5 19:21:24 2017 +0200 scsi: sd: Separate zeroout and discard command choices Now that zeroout and discards are distinct operations we need to separate the policy of choosing the appropriate command. Create a zeroing_mode which can be one of: write: Zeroout assist not present, use regular WRITE writesame: Allow WRITE SAME(10/16) with a zeroed payload writesame_16_unmap: Allow WRITE SAME(16) with UNMAP writesame_10_unmap: Allow WRITE SAME(10) with UNMAP The last two are conditional on the device being thin provisioned with LBPRZ=1 and LBPWS=1 or LBPWS10=1 respectively. Whether to set the UNMAP bit or not depends on the REQ_NOUNMAP flag. And if none of the _unmap variants are supported, regular WRITE SAME will be used if the device supports it. The zeroout_mode is exported in sysfs and the detected mode for a given device can be overridden using the string constants above. With this change in place we can now issue WRITE SAME(16) with UNMAP set for block zeroing applications that require hard guarantees and logical_block_size granularity. And at the same time use the UNMAP command with the device's preferred granulary and alignment for discard operations. Signed-off-by: Martin K. Petersen Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/scsi/sd.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- drivers/scsi/sd.h | 8 ++++++++ 2 files changed, 61 insertions(+), 3 deletions(-) commit 48920ff2a5a940cd07d12cc79e4a2c75f1185aee Author: Christoph Hellwig Date: Wed Apr 5 19:21:23 2017 +0200 block: remove the discard_zeroes_data flag Now that we use the proper REQ_OP_WRITE_ZEROES operation everywhere we can kill this hack. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe Documentation/ABI/testing/sysfs-block | 10 ++----- Documentation/block/queue-sysfs.txt | 5 ---- block/blk-lib.c | 7 +---- block/blk-settings.c | 3 --- block/blk-sysfs.c | 2 +- block/compat_ioctl.c | 2 +- block/ioctl.c | 2 +- drivers/block/drbd/drbd_main.c | 2 -- drivers/block/drbd/drbd_nl.c | 7 +---- drivers/block/loop.c | 2 -- drivers/block/mtip32xx/mtip32xx.c | 1 - drivers/block/nbd.c | 1 - drivers/md/dm-cache-target.c | 1 - drivers/md/dm-crypt.c | 1 - drivers/md/dm-raid.c | 6 ++--- drivers/md/dm-raid1.c | 1 - drivers/md/dm-table.c | 19 ------------- drivers/md/dm-thin.c | 2 -- drivers/md/raid5.c | 50 +++++++++++------------------------ drivers/scsi/sd.c | 5 ---- drivers/target/target_core_device.c | 2 +- include/linux/blkdev.h | 15 ----------- include/linux/device-mapper.h | 5 ---- 23 files changed, 27 insertions(+), 124 deletions(-) commit 45c21793a6601b29926d67f7a07fe4077a45072e Author: Christoph Hellwig Date: Wed Apr 5 19:21:22 2017 +0200 drbd: implement REQ_OP_WRITE_ZEROES It seems like DRBD assumes its on the wire TRIM request always zeroes data. Use that fact to implement REQ_OP_WRITE_ZEROES. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/block/drbd/drbd_main.c | 3 ++- drivers/block/drbd/drbd_nl.c | 2 ++ drivers/block/drbd/drbd_receiver.c | 6 +++--- drivers/block/drbd/drbd_req.c | 7 +++++-- drivers/block/drbd/drbd_worker.c | 4 +++- 5 files changed, 15 insertions(+), 7 deletions(-) commit 0dbed96a3cc9786bc4814dab98a7218753bde934 Author: Christoph Hellwig Date: Wed Apr 5 19:21:21 2017 +0200 drbd: make intelligent use of blkdev_issue_zeroout drbd always wants its discard wire operations to zero the blocks, so use blkdev_issue_zeroout with the BLKDEV_ZERO_UNMAP flag instead of reinventing it poorly. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/block/drbd/drbd_debugfs.c | 3 -- drivers/block/drbd/drbd_int.h | 6 --- drivers/block/drbd/drbd_receiver.c | 102 ++----------------------------------- drivers/block/drbd/drbd_req.c | 6 +-- 4 files changed, 7 insertions(+), 110 deletions(-) commit 71027e97d796d1e9b210a2f64bf2cc25e225a4c0 Author: Christoph Hellwig Date: Wed Apr 5 19:21:20 2017 +0200 block: stop using discards for zeroing Now that we have REQ_OP_WRITE_ZEROES implemented for all devices that support efficient zeroing, we can remove the call to blkdev_issue_discard. This means we only have two ways of zeroing left and can simplify the code. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-lib.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5d1429fead5beacce6df052c31b28a97a11e250b Author: Christoph Hellwig Date: Wed Apr 5 19:21:19 2017 +0200 mmc: remove the discard_zeroes_data flag mmc only supports discarding on large alignments, so the zeroing code would always fall back to explicit writings of zeroes. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/mmc/core/queue.c | 2 -- 1 file changed, 2 deletions(-) commit 274243f5457ab60eef8a9493684cb4c4c846425e Author: Christoph Hellwig Date: Wed Apr 5 19:21:18 2017 +0200 rsxx: remove the discard_zeroes_data flag rsxx only supports discarding on large alignments, so the zeroing code would always fall back to explicit writings of zeroes. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/block/rsxx/dev.c | 1 - 1 file changed, 1 deletion(-) commit 93c1defedcae701512957c279b850659d1dae78f Author: Christoph Hellwig Date: Wed Apr 5 19:21:17 2017 +0200 rbd: remove the discard_zeroes_data flag rbd only supports discarding on large alignments, so the zeroing code would always fall back to explicit writings of zeroes. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/block/rbd.c | 1 - 1 file changed, 1 deletion(-) commit f09a06a193d942a12c1a33c153388b3962222006 Author: Christoph Hellwig Date: Wed Apr 5 19:21:16 2017 +0200 brd: remove discard support It's just a in-driver reimplementation of writing zeroes to the pages, which fails if the discards aren't page aligned. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/block/brd.c | 54 ----------------------------------------------------- 1 file changed, 54 deletions(-) commit 19372e2769179ddd154a0d6fbbdb719eb5d0af12 Author: Christoph Hellwig Date: Wed Apr 5 19:21:15 2017 +0200 loop: implement REQ_OP_WRITE_ZEROES It's identical to discard as hole punches will always leave us with zeroes on reads. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/block/loop.c | 4 ++++ 1 file changed, 4 insertions(+) commit 31edeacd77b3b0bfe0d1b38db15cdd687cb89e34 Author: Christoph Hellwig Date: Wed Apr 5 19:21:14 2017 +0200 zram: implement REQ_OP_WRITE_ZEROES Just the same as discard if the block size equals the system page size. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/block/zram/zram_drv.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit e850fd16f751a6dd1af52fd874225b1231ba9014 Author: Christoph Hellwig Date: Wed Apr 5 19:21:13 2017 +0200 nvme: implement REQ_OP_WRITE_ZEROES But now for the real NVMe Write Zeroes yet, just to get rid of the discard abuse for zeroing. Also rename the quirk flag to be a bit more self-explanatory. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 10 +++++----- drivers/nvme/host/nvme.h | 6 +++--- drivers/nvme/host/pci.c | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) commit e4b878371b85ddcd3e00eb68fa45e61793c37af0 Author: Christoph Hellwig Date: Wed Apr 5 19:21:12 2017 +0200 sd: implement unmapping Write Zeroes Try to use a write same with unmap bit variant if the device supports it and the caller allows for it. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/scsi/sd.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 34045129b128fb3c0237b6af7c5a84b1ca9c0bf5 Author: Christoph Hellwig Date: Wed Apr 5 19:21:11 2017 +0200 block_dev: use blkdev_issue_zerout for hole punches This gets us support for non-discard efficient write of zeroes (e.g. NVMe) and prepares for removing the discard_zeroes_data flag. Also remove a pointless discard support check, which is done in blkdev_issue_discard already. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe fs/block_dev.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit cb365b9675fda026caba4cb5df83292cb7c0811a Author: Christoph Hellwig Date: Wed Apr 5 19:21:10 2017 +0200 block: add a new BLKDEV_ZERO_NOFALLBACK flag This avoids fallbacks to explicit zeroing in (__)blkdev_issue_zeroout if the caller doesn't want them. Also clean up the convoluted check for the return condition that this new flag is added to. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-lib.c | 5 ++++- include/linux/blkdev.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit d928be9f853b9755692d7e9aed402c1809a88e56 Author: Christoph Hellwig Date: Wed Apr 5 19:21:09 2017 +0200 block: add a REQ_NOUNMAP flag for REQ_OP_WRITE_ZEROES If this flag is set logical provisioning capable device should release space for the zeroed blocks if possible, if it is not set devices should keep the blocks anchored. Also remove an out of sync kerneldoc comment for a static function that would have become even more out of data with this change. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-lib.c | 19 +++++-------------- include/linux/blk_types.h | 6 ++++++ 2 files changed, 11 insertions(+), 14 deletions(-) commit ee472d835c264a4cb77f8cf878603e1e40f3559e Author: Christoph Hellwig Date: Wed Apr 5 19:21:08 2017 +0200 block: add a flags argument to (__)blkdev_issue_zeroout Turn the existing discard flag into a new BLKDEV_ZERO_UNMAP flag with similar semantics, but without referring to diѕcard. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-lib.c | 31 ++++++++++++++----------------- block/ioctl.c | 2 +- drivers/block/drbd/drbd_receiver.c | 9 ++++++--- drivers/nvme/target/io-cmd.c | 2 +- fs/block_dev.c | 2 +- fs/dax.c | 2 +- fs/xfs/xfs_bmap_util.c | 2 +- include/linux/blkdev.h | 16 ++++++++++------ 8 files changed, 35 insertions(+), 31 deletions(-) commit c20cfc27a47307e811346f85959cf3cc07ae42f9 Author: Christoph Hellwig Date: Wed Apr 5 19:21:07 2017 +0200 block: stop using blkdev_issue_write_same for zeroing We'll always use the WRITE ZEROES code for zeroing now. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-lib.c | 4 ---- 1 file changed, 4 deletions(-) commit 615ec946abd9080224b1a5c1f80a575c8dc043f7 Author: Christoph Hellwig Date: Wed Apr 5 19:21:06 2017 +0200 dm kcopyd: switch to use REQ_OP_WRITE_ZEROES It seems like the code currently passes whatever it was using for writes to WRITE SAME. Just switch it to WRITE ZEROES, although that doesn't need any payload. Untested, and confused by the code, maybe someone who understands it better than me can help.. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/md/dm-kcopyd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ac62d6208a7977107a47be4eb8566d6e5034b5f5 Author: Christoph Hellwig Date: Wed Apr 5 19:21:05 2017 +0200 dm: support REQ_OP_WRITE_ZEROES Copy & paste from the REQ_OP_WRITE_SAME code. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/md/dm-core.h | 1 + drivers/md/dm-io.c | 8 ++++++-- drivers/md/dm-linear.c | 1 + drivers/md/dm-mpath.c | 1 + drivers/md/dm-rq.c | 11 ++++++++--- drivers/md/dm-stripe.c | 2 ++ drivers/md/dm-table.c | 30 ++++++++++++++++++++++++++++++ drivers/md/dm.c | 31 ++++++++++++++++++++++++++++--- include/linux/device-mapper.h | 6 ++++++ 9 files changed, 83 insertions(+), 8 deletions(-) commit 0f5d690f7bf1b1a5354c61ac5b9d69a4329e218f Author: Christoph Hellwig Date: Wed Apr 5 19:21:04 2017 +0200 dm io: discards don't take a payload Fix up do_region to not allocate a bio_vec for discards. We've got rid of the discard payload allocated by the caller years ago. Obviously this wasn't actually harmful given how long it's been there, but it's still good to avoid the pointless allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/md/dm-io.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 3deff1a70d5901342f460f8cc36e5d0c5d51c319 Author: Christoph Hellwig Date: Wed Apr 5 19:21:03 2017 +0200 md: support REQ_OP_WRITE_ZEROES Copy & paste from the REQ_OP_WRITE_SAME code. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/md/linear.c | 1 + drivers/md/md.h | 7 +++++++ drivers/md/multipath.c | 1 + drivers/md/raid0.c | 2 ++ drivers/md/raid1.c | 4 +++- drivers/md/raid10.c | 1 + drivers/md/raid5.c | 1 + 7 files changed, 16 insertions(+), 1 deletion(-) commit 02d261034f1c90ac8b052406bd7b18d2564b0b3c Author: Christoph Hellwig Date: Wed Apr 5 19:21:02 2017 +0200 sd: implement REQ_OP_WRITE_ZEROES Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/scsi/sd.c | 31 ++++++++++++++++++++++++++----- drivers/scsi/sd_zbc.c | 1 + 2 files changed, 27 insertions(+), 5 deletions(-) commit 885fa13f655940c73787b7fcd4c78813943ece8a Author: Christoph Hellwig Date: Wed Apr 5 19:21:01 2017 +0200 block: implement splitting of REQ_OP_WRITE_ZEROES bios Copy and past the REQ_OP_WRITE_SAME code to prepare to implementations that limit the write zeroes size. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-merge.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 1d62ac13634840e02f9b20df9d8e21204f9ab8b8 Author: Christoph Hellwig Date: Wed Apr 5 19:21:00 2017 +0200 block: renumber REQ_OP_WRITE_ZEROES Make life easy for implementations that needs to send a data buffer to the device (e.g. SCSI) by numbering it as a data out command. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe include/linux/blk_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81d926e8b5520e38f1f72dd7bb7cfc81c1a69d87 Author: Christoph Hellwig Date: Wed Apr 5 19:20:59 2017 +0200 sd: split sd_setup_discard_cmnd Split sd_setup_discard_cmnd into one function per provisioning type. While this creates some very slight duplication of boilerplate code it keeps the code modular for additions of new provisioning types, and for reusing the write same functions for the upcoming scsi implementation of the Write Zeroes operation. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/scsi/sd.c | 153 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 84 insertions(+), 69 deletions(-) commit 3d885bef0c4570d21b2caf90d9e3f76e4c90333d Merge: 9581539 f504d47 Author: Jonathan Corbet Date: Sat Apr 8 11:25:37 2017 -0600 Merge branch 'user-space-api' into docs-next Create a beginning user-space API manual, and add one old doc that nobody cares much about. More useful stuff should come soon... commit 9581539e30dcc0255e8bab0c40177f7f61b59a29 Author: Johan Hovold Date: Mon Apr 3 15:53:34 2017 +0200 Documentation: stable-kernel-rules: fix stable-tag format A patch documenting how to specify which kernels a particular fix should be backported to (seemingly) inadvertently added a minus sign after the kernel version. This particular stable-tag format had never been used prior to this patch, and was neither present when the patch in question was first submitted (it was added in v2 without any comment). Drop the minus sign to avoid any confusion. Fixes: fdc81b7910ad ("stable_kernel_rules: Add clause about specification of kernel versions to patch.") Signed-off-by: Johan Hovold Signed-off-by: Jonathan Corbet Documentation/process/stable-kernel-rules.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f012733894d36ff687862e9cd3b02ee980c61416 Author: Tsugikazu Shibata Date: Sat Apr 8 12:24:04 2017 +0200 Documentation: Add HOWTO Japanese translation into rst based build system This commit adds Japanese translation of HOWTO document into rst based documentation build system with updates. Signed-off-by: Tsugikazu Shibata Signed-off-by: Greg Kroah-Hartman Signed-off-by: Jonathan Corbet Documentation/index.rst | 8 + Documentation/translations/ja_JP/HOWTO | 637 --------------------------- Documentation/translations/ja_JP/howto.rst | 661 +++++++++++++++++++++++++++++ Documentation/translations/ja_JP/index.rst | 12 + 4 files changed, 681 insertions(+), 637 deletions(-) commit 510c01063085b5dc7788d9953f9bf58e16b631e8 Author: Lorenzo Bianconi Date: Mon Apr 3 19:27:39 2017 +0200 iio: imu: st_lsm6dsx: use i2c/spi device name for iio_dev name Use the correct chip name (e.g. lsm6dsm) as suffix for iio_dev name instead of a generic one (lsm6dsx) Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 4 +++- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 14 +++++++++----- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 2 +- 4 files changed, 14 insertions(+), 8 deletions(-) commit 1b775de9707533299c152ffa4535de5ca25150a2 Author: Sebastian Reichel Date: Tue Mar 28 17:59:30 2017 +0200 tty: serial: omap: add UPF_BOOT_AUTOCONF flag for DT init The UPF_BOOT_AUTOCONF flag is needed for proper flow control support. Acked-by: Pavel Machek Signed-off-by: Sebastian Reichel Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/omap-serial.c | 3 +++ 1 file changed, 3 insertions(+) commit 469f813ffe1ab74a9115dbd06ea3026e50ea6a54 Author: Marek Szyprowski Date: Mon Apr 3 08:21:01 2017 +0200 serial: samsung: Remove useless spinlock Spinlock taken only for dma_map_single() for TX buffer is completely useless and doesn't protect anything, so remove it to simplify the code. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/samsung.c | 4 ---- 1 file changed, 4 deletions(-) commit 500fcc08a32bfd54f11951ba81530775df15c474 Author: Marek Szyprowski Date: Mon Apr 3 08:21:00 2017 +0200 serial: samsung: Add missing checks for dma_map_single failure This patch adds missing checks for dma_map_single() failure and proper error reporting. Although this issue was harmless on ARM architecture, it is always good to use the DMA mapping API in a proper way. This patch fixes the following DMA API debug warning: WARNING: CPU: 1 PID: 3785 at lib/dma-debug.c:1171 check_unmap+0x8a0/0xf28 dma-pl330 121a0000.pdma: DMA-API: device driver failed to check map error[device address=0x000000006e0f9000] [size=4096 bytes] [mapped as single] Modules linked in: CPU: 1 PID: 3785 Comm: (agetty) Tainted: G W 4.11.0-rc1-00137-g07ca963-dirty #59 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x20/0x24) [] (show_stack) from [] (dump_stack+0x84/0xa0) [] (dump_stack) from [] (__warn+0x14c/0x180) [] (__warn) from [] (warn_slowpath_fmt+0x48/0x50) [] (warn_slowpath_fmt) from [] (check_unmap+0x8a0/0xf28) [] (check_unmap) from [] (debug_dma_unmap_page+0x98/0xc8) [] (debug_dma_unmap_page) from [] (s3c24xx_serial_shutdown+0x314/0x52c) [] (s3c24xx_serial_shutdown) from [] (uart_port_shutdown+0x54/0x88) [] (uart_port_shutdown) from [] (uart_shutdown+0xd4/0x110) [] (uart_shutdown) from [] (uart_hangup+0x9c/0x208) [] (uart_hangup) from [] (__tty_hangup+0x49c/0x634) [] (__tty_hangup) from [] (tty_ioctl+0xc88/0x16e4) [] (tty_ioctl) from [] (do_vfs_ioctl+0xc4/0xd10) [] (do_vfs_ioctl) from [] (SyS_ioctl+0x7c/0x8c) [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x3c) Reported-by: Seung-Woo Kim Fixes: 62c37eedb74c8 ("serial: samsung: add dma reqest/release functions") CC: stable@vger.kernel.org # v4.10+ Signed-off-by: Marek Szyprowski Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/samsung.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit 768d64f491a530062ddad50e016fb27125f8bd7c Author: Marek Szyprowski Date: Mon Apr 3 08:20:59 2017 +0200 serial: samsung: Use right device for DMA-mapping calls Driver should provide its own struct device for all DMA-mapping calls instead of extracting device pointer from DMA engine channel. Although this is harmless from the driver operation perspective on ARM architecture, it is always good to use the DMA mapping API in a proper way. This patch fixes following DMA API debug warning: WARNING: CPU: 0 PID: 0 at lib/dma-debug.c:1241 check_sync+0x520/0x9f4 samsung-uart 12c20000.serial: DMA-API: device driver tries to sync DMA memory it has not allocated [device address=0x000000006df0f580] [size=64 bytes] Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.11.0-rc1-00137-g07ca963 #51 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x20/0x24) [] (show_stack) from [] (dump_stack+0x84/0xa0) [] (dump_stack) from [] (__warn+0x14c/0x180) [] (__warn) from [] (warn_slowpath_fmt+0x48/0x50) [] (warn_slowpath_fmt) from [] (check_sync+0x520/0x9f4) [] (check_sync) from [] (debug_dma_sync_single_for_device+0x88/0xc8) [] (debug_dma_sync_single_for_device) from [] (s3c24xx_serial_start_tx_dma+0x100/0x2f8) [] (s3c24xx_serial_start_tx_dma) from [] (s3c24xx_serial_tx_chars+0x198/0x33c) Reported-by: Seung-Woo Kim Fixes: 62c37eedb74c8 ("serial: samsung: add dma reqest/release functions") CC: stable@vger.kernel.org # v4.0+ Signed-off-by: Marek Szyprowski Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Krzysztof Kozlowski Reviewed-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/samsung.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit e61c38d85b7392e033ee03bca46f1d6006156175 Author: Uwe Kleine-König Date: Tue Apr 4 11:18:51 2017 +0200 serial: imx: setup DCEDTE early and ensure DCD and RI irqs to be off If the UART is operated in DTE mode and UCR3_DCD or UCR3_RI are 1 (which is the reset default) and the opposite side pulls the respective line to its active level the irq triggers after it is requested in .probe. These irqs were already disabled in .startup but this might be too late. Also setup of the UFCR_DCEDTE bit (currently done in .set_termios) is done very late which is critical as it also controls direction of some pins. So setup UFCR_DCEDTE earlier (in .probe) and also disable the broken irqs in DTE mode there before requesting irqs. Acked-by: Lucas Stach Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) commit 87838ae3affaa96f2cfc8c1147973de42e116b80 Author: Thadeu Lima de Souza Cascardo Date: Tue Apr 4 05:56:32 2017 -0300 tty: fix comment typo s/repsonsible/responsible/ Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d05587c9e0e4611650bb403812e2d492c178a9f Author: Jayachandran C Date: Sat Apr 1 19:42:09 2017 +0000 tty: amba-pl011: Fix spurious TX interrupts On SMP systems, we see a lot of spurious TX interrupts when a program generates a steady stream of output to the pl011 UART. The problem can be easily seen when one CPU generates the output while another CPU handles the pl011 interrupts, and the rate of output is low enough not to fill the TX FIFO. The problem seems to be: -- CPU a -- -- CPU b -- (take port lock) pl011_start_tx pl011_start_tx_pio enable TXIM in REG_IMSC -> causes uart tx intr (pl011_int) pl011_tx_chars pl011_int ...tx chars, all done... (wait for port lock) pl011_stop_tx . disable TXIM . (release port lock) -> (take port lock) check for TXIM, not enabled (release port lock) return IRQ_NONE Enabling the TXIM in pl011_start_tx_pio() causes the interrupt to be generated and delivered to CPU b, even though pl011_tx_chars() is able to complete the TX and then disable the tx interrupt. Fix this by enabling TXIM only after pl011_tx_chars, if it is needed. pl011_tx_chars will return a boolean indicating whether the TX interrupts have to be enabled. Debugged-by: Vijaya Kumar Signed-off-by: Jayachandran C Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit ecfc5771ef0617d33a19a75643b7b3708895018e Author: Shubhrajyoti Datta Date: Thu Apr 6 12:27:41 2017 +0530 serial: xuartps: Enable clocks in the pm disable case also When Power management is disabled then the clocks are not getting enabled. This patch enables it for the !PM case also. While at it also pm_runtime_set_active is called before calling pm_runtime_enable. Reported-by: Michal Simek Signed-off-by: Shubhrajyoti Datta Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit cade3580f79aeba0048d1dc4efd754786713c2c3 Author: Andy Shevchenko Date: Fri Mar 31 21:35:18 2017 +0300 serial: core: Re-use struct uart_port {name} field Since we have port name stored in struct uart_port, we better to use that one instead of open coding. This will make it one place source for easier maintenance or modifications. While here, replace printk(KERN_INFO ) by pr_info(). It seems last printk() call in serial_core.c. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 2e94d5ae5da1d2e798045a53b5e234a42b090908 Author: Andy Shevchenko Date: Fri Mar 31 21:35:17 2017 +0300 serial: core: constify struct uart_port {name} field Don't allow modifications of port name. It's serial core's business only. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman include/linux/serial_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fe729c4bdae41b4c5a5ff21312f021a48c69399 Author: Andrey Smirnov Date: Tue Apr 4 07:22:33 2017 -0700 serdev: Add serdev_device_write subroutine Add serdev_device_write() a blocking call allowing to transfer arbitraty amount of data (potentially exceeding amount that serdev_device_write_buf can process in a single call) To support that, also add serdev_device_write_wakeup(). Drivers wanting to use full extent of serdev_device_write functionality are expected to provide serdev_device_write_wakeup() as a sole handler of .write_wakeup event or call it as a part of driver's custom .write_wakeup code. Because serdev_device_write() subroutine is a superset of serdev_device_write_buf() the patch re-impelements latter is terms of the former. For drivers wanting to just use serdev_device_write_buf() .write_wakeup handler is optional. Cc: cphealy@gmail.com Cc: Guenter Roeck Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Rob Herring Reviewed-by: Andy Shevchenko Signed-off-by: Andrey Smirnov Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/core.c | 36 +++++++++++++++++++++++++++++++----- include/linux/serdev.h | 17 +++++++++++++++-- 2 files changed, 46 insertions(+), 7 deletions(-) commit e1dc9b08051a2c2e694edf48d1e704f07c7c143c Author: Wei Qiao Date: Mon Mar 27 14:06:42 2017 +0800 serial: sprd: adjust TIMEOUT to a big value SPRD_TIMEOUT was 256, which is too small to wait until the status switched to workable in a while loop, so that the earlycon could not work correctly. Signed-off-by: Wei Qiao Signed-off-by: Chunyan Zhang Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sprd_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26b82caae4722191edac5f7b13d172105f150926 Author: Chunyan Zhang Date: Mon Mar 27 14:06:41 2017 +0800 dt-bindings: serial: add a new compatible string for SC9860 SC9860 use the same serial device which SC9836 uses, so added a new compatible string to support SC9860 as well, also added an example of how to describe this serial device in DT. Signed-off-by: Chunyan Zhang Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/sprd-uart.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 32680c53f734a2a3147b1191d7bb669c5f1c627c Author: Chunyan Zhang Date: Mon Mar 27 14:06:40 2017 +0800 dt-bindings: arm: Add bindings for SP9860G Added bindings for Spreadtrum SP9860G board and SC9860 SoC. This patch also revised bindings of SC9836 to make the format more clear. Signed-off-by: Chunyan Zhang Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/arm/sprd.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 63c3ecd946d4ae2879ec0d8c6dcb90132a74d831 Author: Linus Walleij Date: Tue Apr 4 14:08:19 2017 +0200 iio: adc: add a driver for Qualcomm PM8xxx HK/XOADC The Qualcomm PM8xxx PMICs contain a simpler ADC than its successors (already in the kernel as qcom-spmi-vadc.c): the HK/XO ADC (Housekeeping/Chrystal oscillator ADC). As far as I can understand this is equal to the PMICs using SSBI transport and encompass PM8018, PM8038, PM8058, and PM8921, so this is shortly named PM8xxx. This ADC monitors a bunch of on-board voltages and the die temperature of the PMIC itself, but it can also be routed to convert a few external MPPs (multi-purpose pins). On the APQ8060 DragonBoard this feature is used to let this ADC convert an analog ALS (Ambient Light Sensor) voltage signal from a Capella CM3605 ALS into a LUX value. Developed and tested with APQ8060 DragonBoard based on Ivan's driver and Rama Krishna's patches. The SPMI VADC driver is quite different, but share enough minor functionality that I have split out to the common file in a previous patch. Cc: linux-arm-kernel@lists.infradead.org Cc: linux-arm-msm@vger.kernel.org Cc: Ivan T. Ivanov Cc: Andy Gross Cc: Bjorn Andersson Cc: Stephen Boyd Cc: Srinivas Kandagatla Cc: Rama Krishna Phani A Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 11 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/qcom-pm8xxx-xoadc.c | 1036 +++++++++++++++++++++++++++++++++++ 3 files changed, 1048 insertions(+) commit e932d4f041a487debc31e98c8b70baa861532272 Author: Linus Walleij Date: Tue Apr 4 14:08:18 2017 +0200 iio: adc: break out common code from SPMI VADC The SPMI VADC and the earlier XOADC share a subset of common code, so to be able to use the same code in both drivers, we break out a separate file with the common code, prefix exported functions that are no longer static with qcom_* and bake an object qcom-spmi-vadc.o that contains both files: qcom-vadc-common.o and qcom-spmi-vadc-core.o. As we need to follow the procedure for making a kernel module or compiled in object from several files, but still want to produce the same module name, rename the qcom-spmi-vadc.c file to qcom-spmi-vadc-core.c so we can bake the two objects into qcom-spmi-vadc.o Cc: linux-arm-kernel@lists.infradead.org Cc: linux-arm-msm@vger.kernel.org Cc: Ivan T. Ivanov Cc: Andy Gross Cc: Bjorn Andersson Cc: Stephen Boyd Cc: Srinivas Kandagatla Cc: Rama Krishna Phani A Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 4 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/qcom-spmi-vadc.c | 325 ++----------------------------------- drivers/iio/adc/qcom-vadc-common.c | 230 ++++++++++++++++++++++++++ drivers/iio/adc/qcom-vadc-common.h | 108 ++++++++++++ 5 files changed, 358 insertions(+), 310 deletions(-) commit 96b3c833035ee3e591361c1b424d3ae87241133c Author: Linus Walleij Date: Tue Apr 4 14:08:17 2017 +0200 iio: xoadc: augment DT bindings a bit In order to accommodate in a logical manner for the premuxed channels in PM8921 and the similarly addressed channels in later PMICs, we need a twocell arrangement with premux and analog mux setting as a tuple to uniquely identify a hardware channel. These bindings are not yet in use, so it should be fine to augment them before we actually start using it in drivers and device trees. This scheme came out of lengthy discussions and reverse-engineering and reading of the few information sources we have. Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Suggested-by: Björn Andersson Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron .../bindings/iio/adc/qcom,pm8xxx-xoadc.txt | 76 ++++++++++++---------- 1 file changed, 42 insertions(+), 34 deletions(-) commit fd0f50db2eb72555ef8f70af14c1e3ee2079b32c Author: Thomas Hellstrom Date: Mon Mar 6 08:19:27 2017 +0100 Revert "kref: double kref_put() in my_data_handler()" This reverts commit 8f1ecc9fbc5b223e4f5d5bb8bcd6f5672c4bc4b6. The correction is incorrect, see discussion at http://stackoverflow.com/questions/20093127/why-kref-doc-of-linux-kernel-omits-kref-put-when-kthread-run-fail Reported-by: KrishnamRaju raju Cc: Roel Kluin Cc: Randy Dunlap Cc: KrishnamRaju raju Signed-off-by: Thomas Hellstrom Signed-off-by: Greg Kroah-Hartman Documentation/kref.txt | 1 + 1 file changed, 1 insertion(+) commit 808a8b73772c6ac7d999c0508d2f757831cd83ca Author: Quentin Schulz Date: Wed Apr 5 11:06:30 2017 +0200 iio: adc: sun4i-gpadc-iio: add support for A33 thermal sensor This adds support for the Allwinner A33 thermal sensor. Unlike the A10, A13 and A31, the Allwinner A33 only has one channel which is dedicated to the thermal sensor. Moreover, its thermal sensor does not generate interruptions, thus we only need to directly read the register storing the temperature value. The MFD used by the A10, A13 and A31, was created to avoid breaking the DT binding, but since the nodes for the ADC weren't there for the A33, it is not needed. Though the A33 does not have an internal ADC, it has a thermal sensor which shares the same registers with GPADC of the already supported SoCs and almost the same bits, for the same purpose (thermal sensor). The thermal sensor behaves exactly the same (except the presence of interrupts or not) on the different SoCs. Signed-off-by: Quentin Schulz Acked-by: Lee Jones Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 2 +- drivers/iio/adc/sun4i-gpadc-iio.c | 100 ++++++++++++++++++++++++++++++++++++-- include/linux/mfd/sun4i-gpadc.h | 4 ++ 3 files changed, 102 insertions(+), 4 deletions(-) commit e3f6e7263b823c9a43ec5a24be68adad54897666 Author: Quentin Schulz Date: Wed Apr 5 11:06:29 2017 +0200 iio: adc: sun4i-gpadc-iio: move code used in MFD probing to new function This moves code used in MFD probing to a new sun4i_gpadc_probe_mfd function. This driver was initially written for A10, A13 and A31 SoCs which already had a DT binding for this IP, thus we needed to use an MFD to probe the different drivers without changing the DT binding of these SoCs. For SoCs that will require to create a DT binding for this IP, we can avoid using an MFD, thus we need two separate functions: one for probing via MFD and one for probing without MFD. This split the code specific to MFD probing in a function separated from the driver probe function. Signed-off-by: Quentin Schulz Signed-off-by: Jonathan Cameron drivers/iio/adc/sun4i-gpadc-iio.c | 78 ++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 33 deletions(-) commit 35dbf4efb044fbe4096a5edbb449e894aca9ef50 Author: Viresh Kumar Date: Fri Mar 17 12:24:22 2017 +0530 driver core: don't initialize 'parent' in device_add() 'parent' is always overwritten before getting used and there is no need to initialize it with NULL. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/base/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0dd89119614ba7afb6fe901a1760fa2e706cce86 Author: Geliang Tang Date: Fri Mar 24 22:10:49 2017 +0800 drivers: base: dma-mapping: use nth_page helper Use nth_page() helper instead of page_to_pfn() and pfn_to_page() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Greg Kroah-Hartman drivers/base/dma-mapping.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a2b60670aca207dae412f47a47e4aa5d8755aa61 Author: Juri Lelli Date: Mon Mar 27 14:18:18 2017 +0100 Documentation/ABI: add information about cpu_capacity /sys/devices/system/cpu/cpu#/cpu_capacity describe information about CPUs heterogeneity (ref. to Documentation/devicetree/bindings/arm/ cpu-capacity.txt). Add such description. Signed-off-by: Juri Lelli Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-devices-system-cpu | 7 +++++++ 1 file changed, 7 insertions(+) commit 69780a3bbc0b1e7e234aa03626037e0b7571b6ac Author: Jacopo Mondi Date: Thu Apr 6 16:20:53 2017 +0200 iio: adc: Add Maxim max9611 ADC driver Add iio driver for Maxim max9611 and max9612 current-sense amplifiers with 12-bits ADC interface. Datasheet publicly available at: https://datasheets.maximintegrated.com/en/ds/MAX9611-MAX9612.pdf Signed-off-by: Jacopo Mondi Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 10 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/max9611.c | 585 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 596 insertions(+) commit 3fed601c1c5730a7d8a508b80f9902a7332786dc Author: Jacopo Mondi Date: Thu Apr 6 16:20:52 2017 +0200 iio: Documentation: Add max9611 sysfs documentation Add documentation for max9611 driver. Document attributes describing value of shunt resistor installed between RS+ and RS- voltage sense inputs. Signed-off-by: Jacopo Mondi Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio-adc-max9611 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 2a70d55029e467faaab6659f21d0e0cdf27576cf Author: Jacopo Mondi Date: Thu Apr 6 16:20:51 2017 +0200 dt-bindings: iio: adc: Add max9611 ADC Add device tree bindings documentation for Maxim max9611/max9612 current sense amplifier. Signed-off-by: Jacopo Mondi Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/max9611.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 615cdd7cb475ede36642c5af65e8e32122445370 Author: Javier Martinez Canillas Date: Tue Mar 21 10:50:49 2017 -0300 eeprom: idt_89hpesx: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Acked-by: Arnd Bergmann Acked-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/idt_89hpesx.c | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 5ef168545798cf50c5b67c0ac8748eb60cff600b Author: Javier Martinez Canillas Date: Tue Mar 21 10:50:48 2017 -0300 misc: ds1682: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/misc/ds1682.c | 7 +++++++ 1 file changed, 7 insertions(+) commit d2ce8d6fee4428f80005c71e1529def3edcfe259 Author: Javier Martinez Canillas Date: Tue Mar 21 10:50:47 2017 -0300 misc: tsl2550: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/misc/tsl2550.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 91bd2855edbc6a941bf0b16990fbf2894c41c388 Author: Andrew F. Davis Date: Thu Mar 16 10:19:54 2017 -0500 w1: Remove unneeded use of assert() and remove w1_log.h The only use of assert() is in matrox_w1.c and is used to check the input to probe() from the PCI subsystem for NULL values, these are guaranteed to be populated and no other PCI driver makes this check, remove this. As this was the only definition in w1_log.h, remove this also. Signed-off-by: Andrew F. Davis Signed-off-by: Greg Kroah-Hartman drivers/w1/masters/matrox_w1.c | 6 ------ drivers/w1/w1.c | 1 - drivers/w1/w1_int.c | 1 - drivers/w1/w1_io.c | 1 - drivers/w1/w1_log.h | 31 ------------------------------- drivers/w1/w1_netlink.c | 1 - 6 files changed, 41 deletions(-) commit b04e08549910626cda1dbe68ed600afa3ce2af81 Author: Andrew F. Davis Date: Thu Mar 16 10:19:53 2017 -0500 w1: Use kernel common min() implementation Signed-off-by: Andrew F. Davis Signed-off-by: Greg Kroah-Hartman drivers/w1/w1_netlink.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 270579d95f820e93b39dafd4382530b3beb744e4 Author: Michal Sojka Date: Thu Mar 16 14:50:10 2017 +0100 uio_mf624: Align memory regions to page size and set correct offsets mf624 card has its registers not aligned to pages. Since commit b65502879556 ("uio: we cannot mmap unaligned page contents") mmap()ing mf624 registers fails, because now the uio drivers must set uio_mem->addr to be page-aligned. We align the address here and set the newly introduced offs field to the offset of the mf264 registers within the page so that userspace can find the address of the mmap()ed register by reading /sys/class/uio/uio?/maps/map?/offset. Tested with real mf624 card. Signed-off-by: Michal Sojka Signed-off-by: Greg Kroah-Hartman drivers/uio/uio_mf624.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a15d2ddba9ee94b252d2737419bff285d6b0e239 Author: Michal Sojka Date: Thu Mar 16 14:50:09 2017 +0100 uio_mf624: Refactor memory info initialization No functional changes. Move initialization of struct uio_mem to a function. This will allow the next commit to change the initialization code at a single place rather that at three different places. Signed-off-by: Michal Sojka Signed-off-by: Greg Kroah-Hartman drivers/uio/uio_mf624.c | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) commit 171058fb0883247b3a484a542b5dc89753c57cb5 Author: Michal Sojka Date: Thu Mar 16 14:50:08 2017 +0100 uio: Allow handling of non page-aligned memory regions Since commit b65502879556 ("uio: we cannot mmap unaligned page contents") addresses and sizes of UIO memory regions must be page-aligned. If the address in the BAR register is not page-aligned (which is the case of the mf264 card), the mentioned commit forces the UIO driver to round the address down to the page size. Then, there is no easy way for user-space to learn the offset of the actual memory region within the page, because the offset seen in /sys/class/uio/uio?/maps/map?/offset is calculated from the rounded address and thus it is always zero. Fix that problem by including the offset in struct uio_mem. UIO drivers can set this field and userspace can read its value from /sys/class/uio/uio?/maps/map?/offset. The following commits update the uio_mf264 driver to set this new offs field. Drivers for hardware with page-aligned BARs need not to be modified provided that they initialize struct uio_info (which contains uio_mem) with zeros. Signed-off-by: Michal Sojka Signed-off-by: Greg Kroah-Hartman drivers/uio/uio.c | 2 +- include/linux/uio_driver.h | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) commit 8b932edfb8788862f10434c1018ad8a6078e0115 Author: Shile Zhang Date: Fri Mar 24 05:41:04 2017 +0800 hangcheck-timer: Fix typo in comment Fix the typo "alloted" -> "allotted" in comment. Signed-off-by: Shile Zhang Signed-off-by: Greg Kroah-Hartman drivers/char/hangcheck-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a33fd4c27b3ad11c66bdadc5fe6075297ca87a6d Author: K. Y. Srinivasan Date: Tue Mar 28 17:16:53 2017 -0700 Drivers: hv: Issue explicit EOI when autoeoi is not enabled When auto EOI is not enabled; issue an explicit EOI for hyper-v interrupts. Fixes: 6c248aad81c8 ("Drivers: hv: Base autoeoi enablement based on hypervisor hints") Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/kernel/cpu/mshyperv.c | 3 +++ 1 file changed, 3 insertions(+) commit a1d6f9cfc7c6f55ae65430c2fd0eb2bae69dc246 Author: Thierry Escande Date: Tue Mar 28 18:11:29 2017 +0200 firmware: google memconsole: Add ARM/ARM64 support This patch expands the Google firmware memory console driver to also work on certain tree based platforms running coreboot, such as ARM/ARM64 Chromebooks. This patch now adds another path to find the coreboot table through the device tree. In order to find that, a second level bootloader must have installed the 'coreboot' compatible device tree node that describes its base address and size. This patch is a rework/split/merge of patches from the chromeos v4.4 kernel tree originally authored by: Wei-Ning Huang Julius Werner Brian Norris Signed-off-by: Thierry Escande Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/Kconfig | 15 ++++-- drivers/firmware/google/Makefile | 1 + drivers/firmware/google/coreboot_table-of.c | 82 +++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 3 deletions(-) commit 88cfb1eefca9a403a76dc3e151adb7565b10e77d Author: Julius Werner Date: Tue Mar 28 18:11:28 2017 +0200 firmware: Add coreboot device tree binding documentation This patch adds documentation describing a device tree binding for the coreboot firmware. It is meant to be dynamically added during boot and contains address definitions for the coreboot table (a list of variable-sized descriptors providing information about various compile- and run-time generated firmware parameters) and the CBMEM area (the structure containing most run-time resident memory regions set up by coreboot). These definitions allow kernel drivers to easily access data contained in and pointed to by these regions (such as coreboot's in-memory log). (An example implementation can be seen in the following patch) Signed-off-by: Julius Werner Signed-off-by: Thierry Escande Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/firmware/coreboot.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit d384d6f43d1ec3f1225ab0275fd592c5980bd830 Author: Thierry Escande Date: Tue Mar 28 18:11:27 2017 +0200 firmware: google memconsole: Add coreboot support Coreboot (http://www.coreboot.org) allows to save the firmware console output in a memory buffer. With this patch, the address of this memory buffer is obtained from coreboot tables on x86 chromebook devices declaring an ACPI device with name matching GOOGCB00 or BOOT0000. If the memconsole-coreboot driver is able to find the coreboot table, the memconsole driver sets the cbmem_console address and initializes the memconsole sysfs entries. The coreboot_table-acpi driver is responsible for setting the address of the coreboot table header when probed. If this address is not yet set when memconsole-coreboot is probed, then the probe is deferred by returning -EPROBE_DEFER. This patch is a rework/split/merge of patches from the chromeos v4.4 kernel tree originally authored by: Vadim Bendebury Wei-Ning Huang Yuji Sasaki Duncan Laurie Julius Werner Brian Norris Signed-off-by: Thierry Escande Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/Kconfig | 25 +++++- drivers/firmware/google/Makefile | 3 + drivers/firmware/google/coreboot_table-acpi.c | 88 +++++++++++++++++++++ drivers/firmware/google/coreboot_table.c | 94 ++++++++++++++++++++++ drivers/firmware/google/coreboot_table.h | 50 ++++++++++++ drivers/firmware/google/memconsole-coreboot.c | 109 ++++++++++++++++++++++++++ 6 files changed, 368 insertions(+), 1 deletion(-) commit afe9dba4f9aedae417243a1782d085ff23e97b77 Author: Thierry Escande Date: Tue Mar 28 18:11:26 2017 +0200 firmware: google memconsole: Move specific EBDA parts This patch splits memconsole.c in 2 parts. One containing the architecture-independent part and the other one containing the EBDA specific part. This prepares the integration of coreboot support for the memconsole. The memconsole driver is now named as memconsole-x86-legacy. Signed-off-by: Thierry Escande Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/Kconfig | 9 +- drivers/firmware/google/Makefile | 3 +- drivers/firmware/google/memconsole-x86-legacy.c | 154 +++++++++++++++++++++++ drivers/firmware/google/memconsole.c | 155 ++++-------------------- drivers/firmware/google/memconsole.h | 43 +++++++ 5 files changed, 229 insertions(+), 135 deletions(-) commit f952a401ac7f566e9a577f3460dbb037cdcc56f1 Author: Thierry Escande Date: Tue Mar 28 18:11:25 2017 +0200 firmware: google memconsole: Remove useless submenu in Kconfig This patch removes the "Google Firmware Drivers" menu containing a menuconfig entry with the exact same name. The menuconfig is now directly under the "Firmware Drivers" entry. Signed-off-by: Thierry Escande Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/Kconfig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 8af11c1cdd8fa08217e702b57cf96e9030db52b2 Author: Saul Wold Date: Tue Mar 28 15:06:08 2017 -0700 ver_linux: Use /usr/bin/awk instead of /bin/awk Most Linux distributions contain awk in /usr/bin by default, not in /bin. This script's suggested use is for creating version information for bug reporting. This has been tested on a number of different distributions, including Fedora, Ubuntu, OpenSUSE, Debian, Centos, Arch Linuxi, and Poky! Signed-off-by: Saul Wold Reviewed-by: Alexander Kapshuk Reviewed-by: Mark Gross Signed-off-by: Greg Kroah-Hartman scripts/ver_linux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 895ce6c877cb0282a7dc2178f3643e6635716a2a Author: Geliang Tang Date: Sat Mar 11 08:44:57 2017 +0800 debugfs: set no_llseek in DEFINE_DEBUGFS_ATTRIBUTE In DEFINE_DEBUGFS_ATTRIBUTE() macro, since we use nonseekable_open() to open, we should use no_llseek() to seek, not generic_file_llseek(). Signed-off-by: Geliang Tang Signed-off-by: Greg Kroah-Hartman include/linux/debugfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7064dc7fc13b2994d33ae540ffb7a3a05ac463bf Author: Arnd Bergmann Date: Tue Mar 28 11:57:27 2017 +0200 lkdtm: turn off kcov for lkdtm_rodata_do_nothing: I ran into a link error on ARM64 for lkdtm_rodata_do_nothing: drivers/misc/built-in.o: In function `lkdtm_rodata_do_nothing': :(.rodata+0x68c8): relocation truncated to fit: R_AARCH64_CALL26 against symbol `__sanitizer_cov_trace_pc' defined in .text section in kernel/built-in.o I did not analyze this further, but my theory is that we would need a trampoline to call __sanitizer_cov_trace_pc(), but the linker (correctly) only adds trampolines for callers in executable sections. Disabling KCOV for this one file avoids the build failure with no other practical downsides I can think of. The problem can only happen on kernels that contain both kcov and lkdtm, so if we want to backport this, it should be in the earliest version that has both (v4.8). Fixes: 5c9a8750a640 ("kernel: add kcov code coverage") Fixes: 9a49a528dcf3 ("lkdtm: add function for testing .rodata section") Signed-off-by: Arnd Bergmann Acked-by: Dmitry Vyukov Acked-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/misc/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit e22aa9d781a27a961581c57442911309fb86a48e Author: Kees Cook Date: Fri Mar 24 10:51:25 2017 -0700 lkdtm: add bad USER_DS test This adds CORRUPT_USER_DS to check that the get_fs() test on syscall return (via __VERIFY_PRE_USERMODE_STATE) still sees USER_DS. Since trying to deal with values other than USER_DS and KERNEL_DS across all architectures in a safe way is not sensible, this sets KERNEL_DS, but since that could be extremely dangerous if the protection is not present, it also raises SIGKILL for current, so that no matter what, the process will die. A successful test will be visible with a BUG(), like all the other LKDTM tests. Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/misc/lkdtm.h | 1 + drivers/misc/lkdtm_bugs.c | 11 +++++++++++ drivers/misc/lkdtm_core.c | 1 + 3 files changed, 13 insertions(+) commit 8ab44b4003381cf4bae7ccdfe81059aa9ce76033 Author: Varsha Rao Date: Fri Apr 7 17:04:06 2017 +0530 drivers: char: misc: Replace printk with pr_err. Replace printk with pr_err to fix the checkpatch issue. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/char/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b884a95a5561c9ccea7b5cdf6a2fe9b48b589f5 Author: Varsha Rao Date: Fri Apr 7 17:02:32 2017 +0530 drivers: char: misc: Add blank line after declaration. Add a blank line after declaration, to fix the checkpatch issue. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/char/misc.c | 1 + 1 file changed, 1 insertion(+) commit 50a5e314792a4edbd64b1156ad4112480189a8dd Author: Varsha Rao Date: Fri Apr 7 17:01:31 2017 +0530 drivers: char: misc: Add space after ','. Add space which is required after ',' to follow linux coding style. This patch fixes the checkpatch issue. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/char/misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65ebd3dfe79553b294f893ad2b6f54f8b8680e44 Author: Varsha Rao Date: Fri Apr 7 16:58:54 2017 +0530 drivers: char: misc: Replace "foo * bar" with "foo *bar". Remove space after * in pointer type, to follow linux coding style. This patch fixes the following checkpatch issue: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/char/misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0642bac7da4240912c3e923a7d1c47af3dd89b9d Author: Richard Leitner Date: Fri Mar 31 13:44:55 2017 +0100 nvmem: imx-ocotp: add write support Implement write routine for OCOTP controller found in i.MX6 SoC's. Furthermore add locking to the read function to prevent race conditions. The write routine code is based on the fsl_otp driver from Freescale. Signed-off-by: Richard Leitner Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/nvmem/imx-ocotp.txt | 4 + drivers/nvmem/imx-ocotp.c | 210 ++++++++++++++++++++- 2 files changed, 212 insertions(+), 2 deletions(-) commit 9b66587ee259800d278e84af64755083ea09926b Author: Richard Leitner Date: Fri Mar 31 13:44:54 2017 +0100 nvmem: imx-ocotp: clear error bit after reading locked values When reading a "read locked" value from the OCOTP controller on i.MX6 SoC's an error bit is set. This bit has to be cleared by software before any new write, read or reload access can be issued. Therefore clear it after we detect such an "locked read". Signed-off-by: Richard Leitner Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) commit 711d4547793176fa0773c9cdf7af838417f14ef9 Author: Peng Fan Date: Fri Mar 31 13:44:53 2017 +0100 nvmem: octop: Add i.MX7D support Add i.MX7D support. There is 16 banks, each bank 4 words. Signed-off-by: Peng Fan Cc: Srinivas Kandagatla Cc: Maxime Ripard Cc: Shawn Guo Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 1 + 1 file changed, 1 insertion(+) commit 8bb79e85cc4ad859bda3cd1dda0abc505bafcc29 Author: Peng Fan Date: Fri Mar 31 13:44:52 2017 +0100 dt-bindings: imx-ocotp: add compatible string for i.MX7D/S Add compatible string for i.MX7D/S Signed-off-by: Peng Fan Cc: Shawn Guo Cc: Srinivas Kandagatla Cc: Maxime Ripard Cc: Mark Rutland Signed-off-by: Srinivas Kandagatla Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/nvmem/imx-ocotp.txt | 1 + 1 file changed, 1 insertion(+) commit 40bbb60cecc0ff145f56b69af08b340acd8fba9e Author: Sascha Hauer Date: Fri Mar 31 13:44:51 2017 +0100 dt-bindings: nvmem: Add i.MX IIM binding doc The IIM is part of the i.MX device trees for long already, add a binding document for it. Signed-off-by: Sascha Hauer Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/nvmem/imx-iim.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit c066c1c0e43f6914d34a0c574c0110b523820567 Author: Michael Grzeschik Date: Fri Mar 31 13:44:50 2017 +0100 nvmem: Add driver for the i.MX IIM This adds a readonly nvmem driver for the i.MX IC Identification Module (IIM). The IIM is found on the older i.MX SoCs like the i.MX25, i.MX27, i.MX31, i.MX35, i.MX51 and the i.MX53. The IIM can control up to 8 fuse banks with 256 bit each. Not all of the banks are equipped on the different SoCs. The actual number of fuses differ from 512 on the i.MX27 and 1152 on the i.MX53. The fuses are one time writable, but writing is currently not supported in the driver. Signed-off-by: Michael Grzeschik Signed-off-by: Sascha Hauer Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/Kconfig | 11 +++ drivers/nvmem/Makefile | 2 + drivers/nvmem/imx-iim.c | 173 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 186 insertions(+) commit 4cefb74ada57c479e4f8b92d28008d35c1527e87 Author: Richard Leitner Date: Fri Mar 31 13:44:49 2017 +0100 nvmem: imx-ocotp: fix usage of "dev" pointers Assign the correct dev pointer to struct ocotp_priv during probe. This is needed to display dev_* messages correctly. Furthermore harmonize the usage of dev (instead of &pdev->dev) in the probe function. Signed-off-by: Richard Leitner Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1a9636426b9f994d57dfe5a64e3f4644747a2e95 Author: Icenowy Zheng Date: Fri Mar 31 13:44:48 2017 +0100 nvmem: sunxi-sid: add support for H3's SID controller The H3 SoC have a bigger SID controller, which has its direct read address at 0x200 position in the SID block, not 0x0. Also, H3 SID controller has some silicon bug that makes the direct read value wrong at cold boot, add code to workaround the bug. (This bug has already been fixed on A64 and later SoCs) Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman .../bindings/nvmem/allwinner,sunxi-sid.txt | 6 ++- drivers/nvmem/sunxi_sid.c | 62 ++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) commit 4a72cda530f87ee0d96c4b79b9e1a865f7761659 Author: Icenowy Zheng Date: Fri Mar 31 13:44:47 2017 +0100 nvmem: sunxi-sid: read NVMEM size from device compatible Sometimes the SID device have more memory address space than the real NVMEM size (for the registers used to read/write the SID). Fetch the NVMEM size from device compatible, rather than the memory address space's length, in order to prepare for adding some registers-based read support. Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/sunxi_sid.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) commit 5253193d5479006b14dbe475740d031ce3e01570 Author: Aban Bedel Date: Fri Mar 31 13:44:46 2017 +0100 nvmem: core: Allow allocating several anonymous nvmem devices Currently the nvmem core expect the config to provide a name and ID that are then used to create the device name. When no device name is given 'nvmem' is used. However if there is several such anonymous devices they all get named 'nvmem0', which doesn't work. To fix this problem use the ID from the config only when the config also provides a name. When no name is provided take the uinque ID of the nvmem device instead. Signed-off-by: Aban Bedel Reviewed-by: Moritz Fischer Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1b595505bf68bf6a821e944f87766af76d515f96 Author: Maxime Ripard Date: Fri Mar 31 13:44:45 2017 +0100 MAINTAINERS: nvmem: Remove myself from maintainers I've never been really been maintaining nvmem, so make that official. Signed-off-by: Maxime Ripard Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 7e961c12be424c6c1e355d469cc1b82dbf3af718 Author: Moritz Fischer Date: Fri Mar 24 10:33:21 2017 -0500 fpga: Add support for Xilinx LogiCORE PR Decoupler This adds support for the Xilinx LogiCORE PR Decoupler soft-ip that does decoupling of PR regions in the FPGA fabric during partial reconfiguration. Signed-off-by: Moritz Fischer Signed-off-by: Michal Simek Cc: Sören Brinkmann Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman drivers/fpga/Kconfig | 10 +++ drivers/fpga/Makefile | 1 + drivers/fpga/xilinx-pr-decoupler.c | 161 +++++++++++++++++++++++++++++++++++++ 3 files changed, 172 insertions(+) commit 00846a4425d373761c70cbe82cceb98d3d4da179 Author: Andy Shevchenko Date: Tue Apr 4 20:25:22 2017 +0300 auxdisplay: Move arm-charlcd.c to drivers/auxdisplay folder It looks like arm-charlcd.c belongs to auxdisplay subsystem. Move it to drivers/auxdisplay folder. No functional changes intended. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/auxdisplay/Kconfig | 10 ++ drivers/auxdisplay/Makefile | 1 + drivers/auxdisplay/arm-charlcd.c | 368 +++++++++++++++++++++++++++++++++++++++ drivers/misc/Kconfig | 10 -- drivers/misc/Makefile | 1 - drivers/misc/arm-charlcd.c | 368 --------------------------------------- 6 files changed, 379 insertions(+), 379 deletions(-) commit 51c1e9b554c996284d5d3bd44da829f41a49a21b Author: Andy Shevchenko Date: Tue Apr 4 20:25:21 2017 +0300 auxdisplay: Move panel.c to drivers/auxdisplay folder It looks like panel.c belongs to auxdisplay subsystem. Move it to drivers/auxdisplay folder. No functional changes intended. Acked-by: Geert Uytterhoeven Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/auxdisplay/Kconfig | 280 +++++++ drivers/auxdisplay/Makefile | 1 + drivers/auxdisplay/panel.c | 1796 +++++++++++++++++++++++++++++++++++++++++++ drivers/misc/Kconfig | 280 ------- drivers/misc/Makefile | 1 - drivers/misc/panel.c | 1796 ------------------------------------------- 6 files changed, 2077 insertions(+), 2077 deletions(-) commit 6ef0c3337ac9a0a963208beed92d478a317d7888 Author: Dmitry Torokhov Date: Sat Apr 1 10:27:14 2017 -0700 auxdisplay: ht16k33: use le16_to_cpup() to fetch LE16 data The data read from the device is 3 little-endian words, so let's annotate them as such and use le16_to_cpu() to convert them to host endianness - it might turn out to be a bit more performant, and it expresses the conversion more clearly. Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman drivers/auxdisplay/ht16k33.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 750100a495be63c1db7b97691556d7d9cac7f978 Author: Javier Martinez Canillas Date: Wed Mar 29 09:37:59 2017 -0400 auxdisplay: img-ascii-lcd: Fix module autoload If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/auxdisplay/img-ascii-lcd.ko | grep alias $ After this patch: $ modinfo drivers/auxdisplay/img-ascii-lcd.ko | grep alias alias: of:N*T*Cmti,sead3-lcdC* alias: of:N*T*Cmti,sead3-lcd alias: of:N*T*Cmti,malta-lcdC* alias: of:N*T*Cmti,malta-lcd alias: of:N*T*Cimg,boston-lcdC* alias: of:N*T*Cimg,boston-lcd Signed-off-by: Javier Martinez Canillas Signed-off-by: Greg Kroah-Hartman drivers/auxdisplay/img-ascii-lcd.c | 1 + 1 file changed, 1 insertion(+) commit e1f990c24d14a80dd9b16ea967c9b76dbba501a3 Author: Arnd Bergmann Date: Tue Mar 28 12:11:49 2017 +0200 auxdisplay: ht16k33: don't access uninitialized data gcc-7.0.1 points out that we copy uninitialized data from the stack into a per-device structure: drivers/auxdisplay/ht16k33.c: In function 'ht16k33_keypad_irq_thread': arch/x86/include/asm/string_32.h:78:16: error: 'new_state' may be used uninitialized in this function [-Werror=maybe-uninitialized] arch/x86/include/asm/string_32.h:79:22: error: '*((void *)&new_state+4)' may be used uninitialized in this function [-Werror=maybe-uninitialized] The access is harmless because we never read the data, but we are better off not doing this, so this changes the code to only copy the data that was actually initialized. To make sure we don't overflow the stack with an incorrect DT, we also need to add a sanity checkin the probe function. Signed-off-by: Arnd Bergmann Reviewed-by: Robin van der Gracht Reviewed-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman drivers/auxdisplay/ht16k33.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit c7c3f096eb5e721d8522ba060fa621ea906ef738 Author: Geert Uytterhoeven Date: Thu Mar 23 14:25:37 2017 +0100 auxdisplay: hd44780: Fix DT properties to include units of measurement DT properties specifying physical properties should contain appropriate suffices indicating the units of measurement. Hence amend the HD44780 DT bindings to add "chars" suffixes to the "display-height" and "display-width" properties, and update the driver to parse them. Fixes: dd9502a9e9156dd8 ("dt-bindings: auxdisplay: Add bindings for Hitachi HD44780") Fixes: d47d88361feea2ce ("auxdisplay: Add HD44780 Character LCD support") Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt | 11 ++++++----- drivers/auxdisplay/hd44780.c | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) commit deb0b9b21d374f09de0745e0ed29a67503b44384 Author: Alan Tull Date: Thu Mar 30 13:23:12 2017 -0500 MAINTAINERS: fpga: update email and directory paths A few updates: * Updating my email address * Adding another docs directory: Documentation/fpga * Making the include path not specific to fpga-mgr.h only Signed-off-by: Alan Tull Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 83ff2d57f3b6161aee3303ed45322f1d29431aeb Author: Geert Uytterhoeven Date: Thu Mar 23 19:34:31 2017 -0500 MAINTAINERS: Add file patterns for fpga device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven Acked-by: Moritz Fischer Cc: Alan Tull Cc: Moritz Fischer Cc: linux-fpga@vger.kernel.org Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 5b73cb5b0167833347fa0ce5525cfb488b2e2290 Author: Matthew Gerlach Date: Thu Mar 23 19:34:30 2017 -0500 fpga pr ip: Platform driver for Altera Partial Reconfiguration IP. This adds a platform bus driver for a fpga-mgr driver that uses the Altera Partial Reconfiguration IP component. Signed-off-by: Matthew Gerlach Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman drivers/fpga/Kconfig | 7 ++++ drivers/fpga/Makefile | 1 + drivers/fpga/altera-pr-ip-core-plat.c | 68 +++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) commit 6e761cd77b5c88ce2817d34088b7762aa40e1fd6 Author: Matthew Gerlach Date: Thu Mar 23 19:34:29 2017 -0500 fpga dt: bindings for Altera Partial Reconfiguration IP. Device Tree bindings for Altera Partial Reconfiguration IP. Signed-off-by: Matthew Gerlach Acked-by: Rob Herring Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/fpga/altera-pr-ip.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit d201cc17a8a31cc6c4f3944988fe9e2f04b021fb Author: Matthew Gerlach Date: Thu Mar 23 19:34:28 2017 -0500 fpga pr ip: Core driver support for Altera Partial Reconfiguration IP. Adding the core functions necessary for a fpga-mgr driver for the Altera Partial IP component. It is intended for these functions to be used by the various bus implementations like the platform bus or the PCIe bus. Signed-off-by: Matthew Gerlach Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman drivers/fpga/Kconfig | 5 + drivers/fpga/Makefile | 1 + drivers/fpga/altera-pr-ip-core.c | 220 +++++++++++++++++++++++++++++++++ include/linux/fpga/altera-pr-ip-core.h | 29 +++++ 4 files changed, 255 insertions(+) commit 42d5ec954719917e2b7a9160fe05d2316eece5bf Author: Alan Tull Date: Thu Mar 23 19:34:27 2017 -0500 fpga: add config complete timeout Adding timeout for maximum allowed time for FPGA to go to operating mode after a FPGA region has been programmed. Signed-off-by: Alan Tull Signed-off-by: Greg Kroah-Hartman drivers/fpga/fpga-region.c | 3 +++ include/linux/fpga/fpga-mgr.h | 3 +++ 2 files changed, 6 insertions(+) commit 061c97d13f1a69c0edcab4dc6e97788e5bf3230f Author: Anatolij Gustschin Date: Thu Mar 23 19:34:26 2017 -0500 fpga manager: Add Xilinx slave serial SPI driver The driver loads FPGA firmware over SPI, using the "slave serial" configuration interface on Xilinx FPGAs. Signed-off-by: Anatolij Gustschin Acked-by: Michal Simek Reviewed-by: Moritz Fischer Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman drivers/fpga/Kconfig | 7 ++ drivers/fpga/Makefile | 1 + drivers/fpga/xilinx-spi.c | 198 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 206 insertions(+) commit 12cc5a123a173d6236903af6f3d9d44c81723751 Author: Anatolij Gustschin Date: Thu Mar 23 19:34:25 2017 -0500 dt: bindings: fpga: add xilinx slave-serial binding description Add dt binding documentation details for Xilinx FPGA configuration over slave serial interface. Signed-off-by: Anatolij Gustschin Acked-by: Moritz Fischer Acked-by: Rob Herring Acked-by: Michal Simek Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman .../bindings/fpga/xilinx-slave-serial.txt | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 6b539d274e49a7f4b53e0adc55d19041e3b7a863 Author: Moritz Fischer Date: Thu Mar 23 19:34:24 2017 -0500 fpga: altera_freeze_bridge: Constify ops The ops are not changing, make them const. Signed-off-by: Moritz Fischer Cc: Alan Tull Cc: linux-kernel@vger.kernel.org Cc: linux-fpga@vger.kernel.org Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman drivers/fpga/altera-freeze-bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eeedc5421dd3b51de73e6106405c5c77f920f281 Author: Mike Leach Date: Mon Mar 27 11:09:33 2017 -0600 coresight: Fixes coresight DT parse to get correct output port ID. Corrected to get the port numbering to allow programmable replicator driver to operate correctly. By convention, CoreSight devices number ports, not endpoints in the .dts files:- port { reg endpoint { } } Existing code read endpoint number - always 0x0, rather than the correct port number. Signed-off-by: Mike Leach Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/of_coresight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c264588b5de50353e4a1ce0c2521576426dd89d Author: Felix Manlunas Date: Thu Apr 6 19:22:22 2017 -0700 liquidio: fix VF incorrectly indicating that it successfully set its VLAN For security reasons, NIC firmware does not allow VF to set its VLAN if PF set it already. Firmware allows VF to set its VLAN if PF did not set it. After the VF instructs the firmware to set the VLAN, VF always indicates (via return 0) that the operation is successful--even for the times when it isn't. Put in a mechanism for the VF's set VLAN function to receive the firmware response code, then make that function return -EPERM if the firmware forbids the operation. Make that mechanism available for other functions that may, in the future, be interested in receiving the response code from the firmware. That mechanism involves adding new fields to struct octnic_ctrl_pkt, so make all users of struct octnic_ctrl_pkt initialize the struct to zero before using it; otherwise, the mechanism might act on uninitialized garbage. Signed-off-by: Felix Manlunas Signed-off-by: Derek Chickles Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_core.c | 11 +++++++++++ drivers/net/ethernet/cavium/liquidio/lio_main.c | 4 ++++ drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 19 ++++++++++++++++++- drivers/net/ethernet/cavium/liquidio/octeon_nic.c | 10 ++++++---- drivers/net/ethernet/cavium/liquidio/octeon_nic.h | 4 ++++ 5 files changed, 43 insertions(+), 5 deletions(-) commit 58cde1a64c5e140e6ba498aaa406e063957e35df Author: Alexander Usyskin Date: Mon Mar 20 15:04:06 2017 +0200 mei: implement fsync When write() returns successfully, it is only assumed that a message was successfully queued. Add fsync syscall implementation to help user-space ensure that all data is written. Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/main.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit dd04eecc41ae7cf139593b400e74defad62cec54 Author: Tomas Winkler Date: Mon Mar 20 15:04:05 2017 +0200 mei: bus: elminate variable length arrays Though VLA are supported by CC99 there are many cavities and should be avoided. 'const size_t len = sizeof()' that we used may not be set at the compile time hence generating VLA code. This fixes also sparse warning warning: Variable length array is used type. Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/bus-fixup.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 3fcbab6c4a962259b8cb83aea813a4c7fbe11f77 Author: Tomas Winkler Date: Mon Mar 20 15:04:04 2017 +0200 mei: hbm: remove variable length arrays Though VLA are supported by CC99 there are many cavities and should be avoided. 'const size_t len = sizeof()' that we used may not be set at the compile time hence generating VLA code. This fixes also sparse warning warning: Variable length array is used type. Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/hbm.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 394a77d0bb63756871750400068d8b0c3582fba7 Author: Alexander Usyskin Date: Mon Mar 20 15:04:03 2017 +0200 mei: drop amthif internal client AMTHIF has special support in the mei drive, it handles multiplexing multiple user space connection above single me client connection. Since there is no additional addressing information there is a strict requirement on the traffic order on each connection and on the "read after write" order within the connection. This creates a lot of complexity mostly because the other client types do not necessarily fall under the same restriction. After carefully studying the use of the AMTHIF client, we came to conclusion that the multiplexing is not really utilized by any application and we may safely remove that support and significantly simplify the driver. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/Makefile | 1 - drivers/misc/mei/amthif.c | 340 ------------------------------------------- drivers/misc/mei/bus.c | 6 - drivers/misc/mei/client.c | 14 +- drivers/misc/mei/client.h | 5 - drivers/misc/mei/init.c | 14 +- drivers/misc/mei/interrupt.c | 38 +---- drivers/misc/mei/main.c | 53 +------ drivers/misc/mei/mei_dev.h | 51 ------- 9 files changed, 15 insertions(+), 507 deletions(-) commit 5c4c0106e944930315ad3ea8d77043bed13222eb Author: Tomas Winkler Date: Mon Mar 20 15:04:02 2017 +0200 mei: add pci driver ops shutdown handler. The shutdown handler quiesces the device, it performs link reset in order to close all connections and notify the device that is not longer managed by the driver. This is essentially a stripped down version of the PCI remove() function where only the necessary amount of work is done to stop any further activity. Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/pci-me.c | 31 +++++++++++++++++++++++++++++-- drivers/misc/mei/pci-txe.c | 29 ++++++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 3 deletions(-) commit f580ff0e404e5aad83f02093cd22f2475cad6e71 Author: Arnd Bergmann Date: Tue Mar 28 16:10:32 2017 +0200 aspeed-lpc-ctrl: include linux/types.h for uapi header The newly added header file triggers a sanity check: usr/include/linux/aspeed-lpc-ctrl.h:44: found __[us]{8,16,32,64} type without #include We should include linux/types.h explicitly to ensure the header can be included from user space. Fixes: 6c4e97678501 ("drivers/misc: Add Aspeed LPC control driver") Signed-off-by: Arnd Bergmann Acked-by: Joel Stanley Signed-off-by: Greg Kroah-Hartman include/uapi/linux/aspeed-lpc-ctrl.h | 1 + 1 file changed, 1 insertion(+) commit 8ff0c5664a634bab05c646960c1730b7fd33ed90 Author: Arnd Bergmann Date: Thu Mar 23 17:08:08 2017 +0100 drivers/misc: aspeed-lpc-ctrl: fix printk format warning again The format string is still broken after the first attempt to fix it: drivers/misc/aspeed-lpc-ctrl.c: In function 'aspeed_lpc_ctrl_probe': drivers/misc/aspeed-lpc-ctrl.c:232:17: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=] We can actually just print the resource structure directly here. Fixes: 132c93d4215c ("drivers/misc: Aspeed LPC control fix compile error and warning") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/misc/aspeed-lpc-ctrl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 77a9febfd81f9e8550d09dc76e8e9c06307b7aca Author: Fabrice Gasnier Date: Fri Apr 7 13:53:46 2017 +0200 iio: stm32 trigger: fix sampling_frequency read When prescaler (PSC) is 0, it means div factor is 1: counter clock frequency is equal to input clk / (PSC + 1). When reload value is 8 for example, counter counts 9 cycles, from 0 to 8. This is handled in frequency write routine, by writing respectively: - prescaler - 1 to PSC - reload value - 1 to ARR This fix does the opposite when reading the frequency from PSC and ARR: - prescaler is PSC + 1 - reload value is ARR + 1 Thus, PSC may be 0, depending on requested sampling frequency (div 1). In this case, reading freq wrongly reports 0, instead of computing and reporting correct value. Remove test on !psc and !arr. Small test on stm32f4 (example on tim1_trgo), before this fix: $ cd /sys/bus/iio/devices/triggerX $ echo 10000 > sampling_frequency $ cat sampling_frequency 0 After this fix: $ echo 10000 > sampling_frequency $ cat sampling_frequency 10000 Signed-off-by: Fabrice Gasnier Cc: Signed-off-by: Jonathan Cameron drivers/iio/trigger/stm32-timer-trigger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bffb184247bcc783a40a0e123a9a2de3c5b28157 Author: K. Y. Srinivasan Date: Thu Apr 6 14:59:21 2017 -0700 netvsc: Initialize all channel related state prior to opening the channel Prior to opening the channel we should have all the state setup to handle interrupts. The current code does not do that; fix the bug. This bug can result in faults in the interrupt path. Signed-off-by: K. Y. Srinivasan Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 27 +++++++++++++++------------ drivers/net/hyperv/rndis_filter.c | 5 +++-- 2 files changed, 18 insertions(+), 14 deletions(-) commit 54a88e4cfc0dfaf12b2569b82cc5c5b43f5cde71 Author: Florian Fainelli Date: Thu Apr 6 12:42:16 2017 -0700 net: dsa: mv88e6xxx: Make SMI c22/c45 read/write functions static The SMI clause 22 & 45 read/write operations are local to the global2.c file, so make them static. This eliminates the following warning: drivers/net/dsa/mv88e6xxx/global2.c:571:5: warning: no previous prototype for 'mv88e6xxx_g2_smi_phy_read_c45' [-Wmissing-prototypes] int mv88e6xxx_g2_smi_phy_read_c45(struct mv88e6xxx_chip *chip, int addr, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/dsa/mv88e6xxx/global2.c:602:5: warning: no previous prototype for 'mv88e6xxx_g2_smi_phy_read_c22' [-Wmissing-prototypes] int mv88e6xxx_g2_smi_phy_read_c22(struct mv88e6xxx_chip *chip, int addr, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/dsa/mv88e6xxx/global2.c:635:5: warning: no previous prototype for 'mv88e6xxx_g2_smi_phy_write_c45' [-Wmissing-prototypes] int mv88e6xxx_g2_smi_phy_write_c45(struct mv88e6xxx_chip *chip, int addr, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/dsa/mv88e6xxx/global2.c:664:5: warning: no previous prototype for 'mv88e6xxx_g2_smi_phy_write_c22' [-Wmissing-prototypes] int mv88e6xxx_g2_smi_phy_write_c22(struct mv88e6xxx_chip *chip, int addr, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suggested-by: Andrew Lunn Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 261a0a54d1ebcd04fb4a1c3f971b2c3b7ae06925 Author: Johannes Berg Date: Thu Apr 6 16:10:42 2017 +0200 netlink: uapi: use hex numbers for NLM_F_* flags It's rather confusing that the netlink message flags are numbered 1, 2, 4, 8, 16, 32, , 0x100. Make that more understandable by numbering the lower ones with hex constants as well. Signed-off-by: Johannes Berg Signed-off-by: David S. Miller include/uapi/linux/netlink.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1f1120a5427c9e7894be63baaab828755e45a1c0 Author: Colin Ian King Date: Thu Apr 6 13:54:35 2017 +0100 nfp: don't dereference a null nn->eth_port to print a warning On the case where nn->eth_port is null the warning message is printing the port by dereferencing this null pointer. Remove the deference to avoid a crash when printing the warning message. Detected by CoverityScan, CID#1426198 ("Dereference after null check") Fixes: ce22f5a2cbe3c627 ("nfp: separate high level and low level NSP headers") Signed-off-by: Colin Ian King Acked-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7cb164ef5b47b2e947d8361f6f2cd4823ff01557 Merge: c42cb98 00f660e Author: David S. Miller Date: Sat Apr 8 08:07:02 2017 -0700 Merge branch 'net-SO_COOKIE' Chenbo Feng says: ==================== New getsockopt option to retrieve socket cookie In the current kernel socket cookie implementation, there is no simple and direct way to retrieve the socket cookie based on file descriptor. A process mat need to get it from sock fd if it want to correlate with sock_diag output or use a bpf map with new socket cookie function. If userspace wants to receive the socket cookie for a given socket fd, it must send a SOCK_DIAG_BY_FAMILY dump request and look for the 5-tuple. This is slow and can be ambiguous in the case of sockets that have the same 5-tuple (e.g., tproxy / transparent sockets, SO_REUSEPORT sockets, etc.). As shown in the example program. The xt_eBPF program is using socket cookie to record the network traffics statistics and with the socket cookie retrieved by getsockopt. The program can directly access to a specific socket data without scanning the whole bpf map. ==================== Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller commit 1375baa965590bbd3ce7656a6d643e4b3590fd37 Author: Ivan Safonov Date: Sun Apr 2 17:35:40 2017 +0300 staging:r8188eu: remove sw_encrypt member of security_priv struct sw_encrypt always is 0. Replace sw_encrypt with 0. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_xmit.c | 10 ++++------ drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 3 +-- drivers/staging/rtl8188eu/include/rtw_security.h | 1 - drivers/staging/rtl8188eu/os_dep/os_intfs.c | 1 - 4 files changed, 5 insertions(+), 10 deletions(-) commit 82407f388e3efd4b3c4eee3b1b53eb8a3252b274 Author: Ivan Safonov Date: Sun Apr 2 17:35:39 2017 +0300 staging:r8188eu: remove software_encrypt member of registry_priv struct Value of this variable does not changed after initialization. Replace software_encrypt with its default value. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/drv_types.h | 1 - drivers/staging/rtl8188eu/os_dep/os_intfs.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) commit d79640dac7f20813b0794b7f582c3099f2fdaa61 Author: Ivan Safonov Date: Sun Apr 2 17:35:38 2017 +0300 staging:r8188eu: replace rtw_software_encrypt with its default value rtw_software_encrypt used only once and does not changed. Replace it with 0. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/os_intfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 228838793697c9a85e8469c8a347fe6e251dc023 Author: Ivan Safonov Date: Sun Apr 2 17:35:37 2017 +0300 staging:r8188eu: remove sw_decrypt member of security_priv struct sw_decrypt always is 0, so replace it with 0. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_recv.c | 4 ++-- drivers/staging/rtl8188eu/include/rtw_security.h | 1 - drivers/staging/rtl8188eu/os_dep/os_intfs.c | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) commit 8c986111a67ef9c1de2b9b8a536690b009c96d24 Author: Ivan Safonov Date: Sun Apr 2 17:35:36 2017 +0300 staging:r8188eu: remove software_decrypt member of registry_priv struct Value of this variable has no changes, and used once. Replace software_decrypt with its value. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/drv_types.h | 1 - drivers/staging/rtl8188eu/os_dep/os_intfs.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) commit 0e7018b4b01fd7caeb26e8db5a4ff62ecfb1306f Author: Ivan Safonov Date: Sun Apr 2 17:35:35 2017 +0300 staging:r8188eu: replace rtw_software_decrypt with its value rtw_software_decrypt used only once and does not changed. Replace it with 0. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/os_intfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 00f660eaf37808aa0a537c288c9e2dee73bd4316 Author: Chenbo Feng Date: Wed Apr 5 19:00:56 2017 -0700 Sample program using SO_COOKIE Added a per socket traffic monitoring option to illustrate the usage of new getsockopt SO_COOKIE. The program is based on the socket traffic monitoring program using xt_eBPF and in the new option the data entry can be directly accessed using socket cookie. The cookie retrieved allow us to lookup an element in the eBPF for a specific socket. Signed-off-by: Chenbo Feng Signed-off-by: David S. Miller samples/bpf/cookie_uid_helper_example.c | 146 +++++++++++++++++++++++---- samples/bpf/run_cookie_uid_helper_example.sh | 4 +- 2 files changed, 127 insertions(+), 23 deletions(-) commit 5daab9db7b65df87da26fd8cfa695fb9546a1ddb Author: Chenbo Feng Date: Wed Apr 5 19:00:55 2017 -0700 New getsockopt option to get socket cookie Introduce a new getsockopt operation to retrieve the socket cookie for a specific socket based on the socket fd. It returns a unique non-decreasing cookie for each socket. Tested: https://android-review.googlesource.com/#/c/358163/ Acked-by: Willem de Bruijn Signed-off-by: Chenbo Feng Signed-off-by: David S. Miller arch/alpha/include/uapi/asm/socket.h | 2 ++ arch/avr32/include/uapi/asm/socket.h | 2 ++ arch/frv/include/uapi/asm/socket.h | 2 ++ arch/ia64/include/uapi/asm/socket.h | 2 ++ arch/m32r/include/uapi/asm/socket.h | 2 ++ arch/mips/include/uapi/asm/socket.h | 2 ++ arch/mn10300/include/uapi/asm/socket.h | 2 ++ arch/parisc/include/uapi/asm/socket.h | 2 ++ arch/powerpc/include/uapi/asm/socket.h | 2 ++ arch/s390/include/uapi/asm/socket.h | 2 ++ arch/sparc/include/uapi/asm/socket.h | 2 ++ arch/xtensa/include/uapi/asm/socket.h | 2 ++ include/uapi/asm-generic/socket.h | 2 ++ net/core/sock.c | 8 ++++++++ 14 files changed, 34 insertions(+) commit 361b3f54ba4482229b6d91fea667a653e394056c Author: Haim Daniel Date: Wed Mar 29 10:58:56 2017 +0300 staging: vc04_services: add parenthesis to macros vchi_cfg.h: fix checkpatch ERROR: Macros with complex values should be enclosed in parenthesis Signed-off-by: Haim Daniel Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchi/vchi_cfg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e45c2379125c00a1c6fcda5211418970a1d89d31 Author: Andrea della Porta Date: Fri Apr 7 01:16:37 2017 +0100 staging: comedi: drivers: s626.c - fixed checkpatch issue about data type staging: comedi: drivers: s626.c - fixed the following checkpatch issue: CHECK: Prefer kernel type 's16' over 'int16_t' #1939: FILE: drivers/staging/comedi/drivers/s626.c:1939: + int16_t dacdata = (int16_t)data[i]; Signed-off-by: Andrea della Porta Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/s626.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bb90b68ab77995836b39a1a2b4047c2db6983a2 Author: Andrea della Porta Date: Fri Apr 7 01:00:41 2017 +0100 staging: rts5208: ms.c fixed checkpatch warning - using __func__ instead of hardcoded name staging: rts5208: ms.c Fixed checkpatch warning: WARNING: Prefer using "%s", __func__ to embedded function names #2597: FILE: rts5208/ms.c:2597: + dev_dbg(rtsx_dev(chip), "ms_build_l2p_tbl: %d\n", seg_no); Signed-off-by: Andrea della Porta Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/ms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 141a10aead9ce72ea8b22c036d37bb31c3a693f6 Author: Ioana Radulescu Date: Wed Apr 5 08:24:17 2017 -0500 staging: fsl-mc/dpio: Fix early writing of valid bit Commands written to the QMan software portals have a valid bit in the "verb" field of the command that, when set with the right value, notifies the hardware that the command is fully written and ready to be processed. The "verb" field should be the last one to be written in the swp command registers, after all other fields are filled in. The current implementation doesn't follow this rule for all commands, which may result in an incompletely configured command being processed by the hardware. Enforce the correct order of writes to avoid this situation. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpio/qbman-portal.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit ad3dbb9a106fb5f9899b3137534f09507862fed8 Author: Prasant Jalan Date: Mon Apr 3 11:45:10 2017 +0530 staging: rtl8712: fixed multiple line derefence issue Checkpatch emits WARNING: Avoid multiple line dereference. Checkpatch warning is fixed by: * Trivial indentation improvement and * Using += instead of + helps shortening the statement. Signed-off-by: Prasant Jalan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_xmit.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit b76cc94a107ccaa7003d7ce63ff1b23aaed8f0f9 Author: Tejaswini Poluri Date: Thu Mar 30 20:41:54 2017 +0530 staging: rtl8712: code style fix Fixed the warnings from checkpatch.pl on file rtl8712/mlme_linux.c Avoided multiple line dereferences in the code Signed-off-by: Tejaswini Poluri Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/mlme_linux.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 919a9bb607fe6793144f9ed171f7e5382e9cc65a Author: Alex Wilson Date: Thu Mar 30 01:16:02 2017 -0600 staging: fbtft: fix type assignment warning Sparse spits out a warning that a __be16 was being assigned to a u16. Change the type of txbuf16 to __be16 b/c it's a restricted type and prevents mixing endianness. Signed-off-by: Alex Wilson Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca86987cd41b46094b0d222095804e40d0e37248 Author: Andrea della Porta Date: Wed Mar 29 00:09:19 2017 +0100 staging: xgifb: added blankline after decl. Fixed checkpatch warning: WARNING: Missing a blank line after declarations #882: FILE: drivers/staging/xgifb/XGI_main_26.c:882: + const u8 *f = XGI_TV_filter[filter_tb].filter[filter]; + pr_debug("FilterTable[%d]-%d: %*ph\n", Signed-off-by: Andrea della Porta Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/XGI_main_26.c | 1 + 1 file changed, 1 insertion(+) commit 271dbae3c6a1daa160e2dec87c4eb5065aed716b Author: Prasant Jalan Date: Sat Apr 1 00:40:02 2017 +0530 staging: sm750fb: removed line continuations in quoted strings checkpatch gives WARNING: Avoid line continuations in quoted strings. Trivial fix by removing line continuations and adding another quote at the start of next line. Signed-off-by: Prasant Jalan Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 4895398d0375d57fc098c2816eb0a7dadc1c1ce6 Author: Prasant Jalan Date: Sat Apr 1 00:40:01 2017 +0530 staging: sm750fb: fixing function return with lock held lynxfb_suspend() & lynxfb_resume() return on errors while holding console_lock. Adding 'goto' such that proper cleanups can be done before returning from function and therefore console_lock can be released before returning. Signed-off-by: Prasant Jalan Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit d6171ba8584e01181f275f06288134c94e374b5f Author: Andrea della Porta Date: Fri Apr 7 01:24:39 2017 +0100 staging: sm750fb: ddk750_display.c - fixed checkpatch warning: line over 80 chars staging: sm750fb: ddk750_display.c - fixed the following checkpatch warning: WARNING: line over 80 characters #149: FILE: drivers/staging/sm750fb/ddk750_display.c:149: + swPanelPowerSequence((output & PNL_SEQ_MASK) >> PNL_SEQ_OFFSET, 4); Signed-off-by: Andrea della Porta Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 951142c2938a4454dc1bbc92e3483de2b8173336 Author: Aishwarya Pant Date: Tue Apr 4 00:03:43 2017 +0530 staging: bcm2835-audio: remove unnecessary log messages Remove unnecessary log messages in the driver which are just tracking function entry and exits. Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-audio/bcm2835-ctl.c | 2 -- .../vc04_services/bcm2835-audio/bcm2835-pcm.c | 19 ----------- .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 38 ---------------------- 3 files changed, 59 deletions(-) commit 34bc8f93920ad5e300da80a7c839fc9ab32a6664 Author: Colin Ian King Date: Thu Mar 30 10:34:03 2017 +0100 staging: bcm2835-camera: fix spelling mistake: "elementry" -> "elementary" trivial fix to spelling mistake in various comments and pr_debug messages Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-msg.h | 2 +- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 6 +++--- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 76b4580bf4eaf1c7d5a603c0da405e72a89b3927 Author: Maciek Borzecki Date: Sat Apr 8 16:04:42 2017 +0200 staging wlan-ng: fix type mismatch warnings in mkpdrlist() struct hfa384x_pdrec len and code fields as clearly little endian, mark both fields as such. pda->buf is also clearly little endian. Fixes sparse warnings: drivers/staging/wlan-ng/prism2fw.c:613:16: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2fw.c:616:21: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2fw.c:625:21: warning: cast to restricted __le16 Signed-off-by: Maciek Borzecki Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 4 ++-- drivers/staging/wlan-ng/prism2fw.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit c94f5806cd0be4c7d4dabb89d1ae1088ed4332e7 Author: Srinivas Pandruvada Date: Fri Apr 7 17:16:34 2017 -0700 iio: hid-sensor: Fix unbalanced pm_runtime_enable error When a hid sensor module is removed and modprobed again we see error for unbalanced pm_runtime. This issue is caused by not deactivating runtime PM on removal. So on modprobe again when activated again, this will print this error. Signed-off-by: Srinivas Pandruvada Signed-off-by: Jonathan Cameron drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5d9854eaea776441b38a9a45b4e6879524c4f48c Author: Srinivas Pandruvada Date: Fri Apr 7 17:13:17 2017 -0700 iio: hid-sensor: Store restore poll and hysteresis on S3 This change undo the change done by 'commit 3bec24747446 ("iio: hid-sensor-trigger: Change get poll value function order to avoid sensor properties losing after resume from S3")' as this breaks some USB/i2c sensor hubs. Instead of relying on HW for restoring poll and hysteresis, driver stores and restores on resume (S3). In this way user space modified settings are not lost for any kind of sensor hub behavior. In this change, whenever user space modifies sampling frequency or hysteresis driver will get the feature value from the hub and store in the per device hid_sensor_common data structure. On resume callback from S3, system will set the feature to sensor hub, if user space ever modified the feature value. Fixes: 3bec24747446 ("iio: hid-sensor-trigger: Change get poll value function order to avoid sensor properties losing after resume from S3") Reported-by: Ritesh Raj Sarraf Tested-by: Ritesh Raj Sarraf Tested-by: Song, Hongyan Cc: stable@vger.kernel.org Signed-off-by: Srinivas Pandruvada Signed-off-by: Jonathan Cameron .../iio/common/hid-sensors/hid-sensor-attributes.c | 26 ++++++++++++++++++++-- .../iio/common/hid-sensors/hid-sensor-trigger.c | 20 ++++++++++++++--- include/linux/hid-sensor-hub.h | 2 ++ 3 files changed, 43 insertions(+), 5 deletions(-) commit c42cb98cfd18dc66b099f4d4a310e12ac8957630 Merge: 3a9024f 457fcd8 Author: David S. Miller Date: Sat Apr 8 06:18:00 2017 -0700 Merge tag 'mlx5-updates-2017-04-16' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2017-04-16 This patchset provides some updates for the mlx5 drivers. From Majd, 1st patch, Adds ConnectX-6 and ConnectX-6 VF PCI IDs support. From Guy, 2nd patch, Adds RXFCS scatter support. 3rd patch, Small cleanup to make a function static. From Eran, 4th patch, Adds 4 zeros padding to ethtool FW version. 6th patch, Trevial code reuse cleanup From Inbar, 5th patch, Show board id in ethtool driver information From Saeed, 7th patch, Set default RX moderation parameters on driver load as a small fix for the latest fail-safe config feature. ==================== Signed-off-by: David S. Miller commit 2bbd5023ee09c8df507f7a6ed5ab45fc619a7ff6 Author: Ian Abbott Date: Tue Apr 4 11:32:27 2017 +0100 staging: comedi: amplc_pci224: convert CLK_CONFIG() macro to function Convert the `CLK_CLKFIG(chan, src)` macro to a static function `pci224_clk_config(chan, src)`. This is consistent with an earlier change to convert `GAT_CONFIG(chan, src)` to a static function. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/amplc_pci224.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit a19aa38022a37bee17e0aebf1053b1cf0496812d Author: Ian Abbott Date: Tue Apr 4 11:32:26 2017 +0100 staging: comedi: amplc_pci224: remove 'inline' from pci224_gat_config() Let the compiler figure out whether `pci224_gat_confip()` should be inlined by itself. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/amplc_pci224.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c5665dfb902f84002e14d30d97b47886fc9fe161 Author: Ian Abbott Date: Tue Apr 4 11:29:54 2017 +0100 staging: comedi: amplc_pci230: convert CLK_CONFIG() macro to function Convert the `CLK_CONFIG(chan, src)` macro to a static function `pci230_clk_config(chan, src)`. This is consistent with an earlier change to convert `GAT_CONFIG(chan, src)` to a static function. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/amplc_pci230.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 112d55e5855423652aa334a13a34fccb70780069 Author: Ian Abbott Date: Tue Apr 4 11:29:53 2017 +0100 staging: comedi: amplc_pci230: remove 'inline' from pci230_gat_config() Let the compiler figure out whether `pci230_gat_config()` should be inlined by itself. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/amplc_pci230.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ba508685d90fa361bb2f7d1e3cb86892a7b94ec2 Author: Colin Ian King Date: Sat Apr 8 00:44:03 2017 +0100 staging: wilc1000: fix incorrect strncasecmp length The strncasecmp of buff against the literal string RSSI is using variable length which is zero. This should be instead using the variable size instead. Also remove the redundant variable length. Detected by PVS-Studio, warning: V575 Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/linux_wlan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0e490657c7214cce33fbca3d88227298c5c968ae Author: Aditya Shankar Date: Fri Apr 7 17:24:58 2017 +0530 staging: wilc1000: Fix problem with wrong vif index The vif->idx value is always 0 for two interfaces. wl->vif_num = 0; loop { ... vif->idx = wl->vif_num; ... wl->vif_num = i; .... i++; ... } At present, vif->idx is assigned the value of wl->vif_num at the beginning of this block and device is initialized based on this index value. In the next iteration, wl->vif_num is still 0 as it is only updated later but gets assigned to vif->idx in the beginning. This causes problems later when we try to reference a particular interface and also while configuring the firmware. This patch moves the assignment to vif->idx from the beginning of the block to after wl->vif_num is updated with latest value of i. Fixes: commit 735bb39ca3be ("staging: wilc1000: simplify vif[i]->ndev accesses") Cc: Signed-off-by: Aditya Shankar Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/linux_wlan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5600da662e18caa475b2648d645099890cc74216 Author: Aditya Shankar Date: Fri Apr 7 17:21:43 2017 +0530 staging: wilc1000: Use new format for configuring firmware The configuration packet format has changed in the newer wilc firmware versions 14.2 and up. This update ensures that the firmware is initialized correctly by the host and configured in the required mode. Signed-off-by: Aditya Shankar Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan_cfg.c | 59 +++++++++++++++++++------------- 1 file changed, 36 insertions(+), 23 deletions(-) commit 98db803f6413e6d4bf1f590ea57e9e7dfe1eb32b Author: Jordan Crouse Date: Tue Mar 7 10:02:56 2017 -0700 msm/drm: gpu: Dynamically locate the clocks from the device tree Instead of using a fixed list of clock names use the clock-names list in the device tree to discover and get the list of clocks that we need. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gpu.c | 78 ++++++++++++++++++++++++++++++------------- drivers/gpu/drm/msm/msm_gpu.h | 4 ++- 2 files changed, 58 insertions(+), 24 deletions(-) commit e2af8b6b0ca1f55e9b2c8a034c352c56ae054066 Author: Jordan Crouse Date: Tue Mar 7 10:02:55 2017 -0700 drm/msm: gpu: Use OPP tables if we can If a OPP table is defined for the GPU device in the device tree use that in lieu of the downstream style GPU frequency table. If we do use the downstream table convert it to a OPP table so that we can take advantage of the OPP lookup facilities later. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_device.c | 85 +++++++++++++++++++++++------- 1 file changed, 66 insertions(+), 19 deletions(-) commit bf5af4ae875d8803db98d38ed988c2ec4c941a00 Author: Jordan Crouse Date: Tue Mar 7 10:02:54 2017 -0700 drm/msm: Hard code the GPU "slow frequency" Some A3XX and A4XX GPU targets required that the GPU clock be programmed to a non zero value when it was disabled so 27Mhz was chosen as the "invalid" frequency. Even though newer targets do not have the same clock restrictions we still write 27Mhz on clock disable and expect the clock subsystem to round down to zero. For unknown reasons even though the slow clock speed is always 27Mhz and it isn't actually a functional level the legacy device tree frequency tables always defined it and then did gymnastics to work around it. Instead of playing the same silly games just hard code the "slow" clock speed in the code as 27MHz and save ourselves a bit of infrastructure. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_device.c | 5 +---- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 5 ++--- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 2 +- drivers/gpu/drm/msm/msm_gpu.c | 8 ++++++-- drivers/gpu/drm/msm/msm_gpu.h | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) commit e3689e470fa0d9ebaa9d13d069e8d73c8d82a11d Author: Jordan Crouse Date: Tue Mar 7 10:02:53 2017 -0700 drm/msm: Add MSM_PARAM_GMEM_BASE User space needs to know where the GMEM whole starts so that they can set up the addressing correctly. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_gpu.c | 3 +++ include/uapi/drm/msm_drm.h | 1 + 2 files changed, 4 insertions(+) commit ee546cd34ae846a8202b78d1834170e2b3ee063d Author: Jordan Crouse Date: Tue Mar 7 10:02:52 2017 -0700 drm/msm: Reference count address spaces There are reasons for a memory object to outlive the file descriptor that created it and so the address space that a buffer object is attached to must also outlive the file descriptor. Reference count the address space so that it can remain viable until all the objects have released their addresses. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_gpu.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.h | 3 ++- drivers/gpu/drm/msm/msm_gem.h | 2 ++ drivers/gpu/drm/msm/msm_gem_vma.c | 35 ++++++++++++++++++++++++--------- 6 files changed, 33 insertions(+), 13 deletions(-) commit 9873ef0743535ee71efecfb5228f96432e393f8a Author: Jordan Crouse Date: Mon Feb 6 10:39:29 2017 -0700 drm/msm: Make sure to detach the MMU during GPU cleanup We should be detaching the MMU before destroying the address space. To do this cleanly, the detach has to happen in adreno_gpu_cleanup() because it needs access to structs in adreno_gpu.c. Plus it is better symmetry to have the attach and detach at the same code level. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_gpu.c | 29 +++++++++++++++++++---------- drivers/gpu/drm/msm/msm_gpu.c | 3 --- 2 files changed, 19 insertions(+), 13 deletions(-) commit 3a882143794ab31aa25551ba90b2d0740c4973c4 Author: Archit Taneja Date: Thu Mar 23 15:58:17 2017 +0530 drm/msm/mdp5: Enable 3D mux in mdp5_ctl 3D mux is a small block placed after the DSPPs in MDP5. It can merge 2 LM/DSPP outputs and feed it to a single interface. Enable 3D Mux if our mdp5_pipeline has 2 active LMs. This check will need to be made more specific later when we add Dual DSI support with source split enabled. In that use case, each LM feeds to a separae INTF, so the 3D mux isn't needed. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_ctl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 0d1d3e44653ff5e806b4007d0d952491d745cbbf Author: Archit Taneja Date: Thu Mar 23 15:58:16 2017 +0530 drm/msm/mdp5: Reset CTL blend registers before configuring them Assigning LMs dynamically to CRTCs results in REG_MDP5_CTL_LAYER_REGs and REG_MDP5_CTL_LAYER_EXT_REGs maintaining old values for a LM that isn't used by our CTL instance anymore. Clear the ctl's CTL_LAYER_REG and CTL_LAYER_EXT_REGs for all LM instances. The ones that need to be configured are configured later in this func. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_ctl.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 8480adacfd58c79d884aa17af77a7fa7efae7257 Author: Archit Taneja Date: Thu Mar 23 15:58:15 2017 +0530 drm/msm/mdp5: Assign 'right' mixer to CRTC state Dynamically assign a right mixer to mdp5_crtc_state in the CRTC's atomic_check path. Assigning the right mixer has some constraints, i.e, only a few LMs can be paired together. Update mdp5_mixer_assign to handle these constraints. Firstly, we need to identify whether we need a right mixer or not. At the moment, there are 2 scenarios where a right mixer might be needed: - If any of the planes connected to this CRTC is too wide (i.e, is comprised of 2 hwpipes). - If the CRTC's mode itself is too wide (i.e, a 4K mode on HDMI). We implement both these checks in the mdp5_crtc_atomic_check(), and pass 'need_right_mixer' to mdp5_setup_pipeline. If a CRTC is already assigned a single mixer, and a new atomic commit brings in a drm_plane that needs 2 hwpipes, we can successfully commit this mode without requiring a full modeset, provided that we still use the previously assigned mixer as the left mixer. If such an assignment isn't possible, we'd need to do a full modeset. This scenario has been ignored for now. The mixer assignment code is a bit messy, considering we have at most 4 LM instances in hardware. This can probably be re-visited later with simplified logic. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 49 +++++++++++++--- drivers/gpu/drm/msm/mdp/mdp5/mdp5_mixer.c | 97 +++++++++++++++++++++++++++---- drivers/gpu/drm/msm/mdp/mdp5/mdp5_mixer.h | 5 +- 3 files changed, 129 insertions(+), 22 deletions(-) commit 359ae86248a5f92dd475e2d8012364a97e57026a Author: Archit Taneja Date: Thu Mar 23 15:58:14 2017 +0530 drm/msm/mdp5: Stage border out on base stage if CRTC has 2 LMs If a CRTC comprises of 2 LMs, it is mandatory to enable border out and assign it to the base stage. We had to enable border out also when the base plane wasn't fullscreen. Club these checks and put them in a separate function called get_start_stage() that returns the starting stage for assigning planes. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 45 +++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 10 deletions(-) commit bf8dc0a04e52ddccfaa47cf7a3238753344155fa Author: Archit Taneja Date: Thu Mar 23 15:58:13 2017 +0530 drm/msm/mdp5: Stage right side hwpipes on Right-side Layer Mixer Now that our mdp5_planes can consist of 2 hwpipes, update the blend_setup() code to stage the right hwpipe to the left and right LMs Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 12 ++++++++++++ drivers/gpu/drm/msm/mdp/mdp5/mdp5_ctl.c | 12 ++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) commit ed78560dc4ee352a6f991ef87b2747bdc90297a3 Author: Archit Taneja Date: Thu Mar 23 15:58:12 2017 +0530 drm/msm/mdp5: Prepare Layer Mixers for source split In order to enable Source Split in HW, we need to add/modify a few LM register configurations: - Configure the LM width to be half the mode width, so that each LM manages one half of the scanout. - Tell the 'right' LM that it is configured to be the 'right' LM in source split mode. - Since we now have 2 places where REG_MDP5_LM_BLEND_COLOR_OUT is configured, do a read-update-store for the register instead of directly writing a value to it. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 39 ++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 7 deletions(-) commit c26b4f6cfb2774d13f9ae41cbaaf30f30ac417c6 Author: Archit Taneja Date: Thu Mar 23 15:58:11 2017 +0530 drm/msm/mdp5: Configure 'right' hwpipe Now that we have a right hwpipe in mdp5_plane_state, configure it mdp5_plane_mode_set(). The only parameters that vary between the left and right hwpipes are the src_w, src_img_w, src_x and crtc_x as we just even chop the fb into left and right halves. Add a mdp5_plane_right_pipe() which will be used by the crtc code to set up LM stages. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 1 + drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 46 ++++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 1 deletion(-) commit 7a10ee9b579e04241f981d8e237124aa8762c4c4 Author: Archit Taneja Date: Thu Mar 23 15:58:10 2017 +0530 drm/msm/mdp5: Assign a 'right hwpipe' to plane state If the drm_plane has a source width that's greater than the max width supported by a SSPP (2560 pixels on 8x96), then we assign a 'r_hwpipe' to it in mdp5_plane_atomic_check(). TODO: There are a few scenarios where the hwpipe assignments aren't recommended by HW. For example, an assignment which results in a drm_plane to of two different types of hwpipes (say RGB0 on left and DMA1 on right) is not recommended. Also, hwpipes have a priority mapping, where the higher priority pipe needs to be staged on left LM, and the lower priority needs to be staged on the right LM. For example, the priority order for VIG pipes in decreasing order of priority is VIG0, VIG1, VIG2, and VIG3. So, VIG0 on left and VIG1 on right is a correct configuration, but VIG1 on left and VIG0 on right isn't. These scenarios are ignored for now for the sake of simplicity. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 1 + drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 57 ++++++++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 1 deletion(-) commit 821be43ff2424b13bc6152360eb6d5bacfbf8530 Author: Archit Taneja Date: Thu Mar 23 15:58:09 2017 +0530 drm/msm/mdp5: Create mdp5_hwpipe_mode_set Refactor mdp5_plane_mode_set to call mdp5_hwpipe_mode_set. The latter func takes in only the hwpipe and the parameters that need to be programmed into the hwpipe registers. All the code that calculates these parameters is left as is in mdp5_plane_mode_set. In the future, when we let drm_plane be comprised of 2 hwpipes, this func allow us to configure each pipe without adding redundant code. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 227 +++++++++++++++++------------- 1 file changed, 130 insertions(+), 97 deletions(-) commit b7621b2a081c2ac2c1c54070f6e88f774fe4b6b1 Author: Archit Taneja Date: Thu Mar 23 15:58:08 2017 +0530 drm/msm/mdp5: Add optional 'right' Layer Mixer in CRTC state Add another mdp5_hw_mixer pointer (r_mixer) in mdp5_crtc_state. This mixer will be used to generate the right half of the scanout. With Source Split, a SSPP can now be connected to 2 Layer Mixers, but has to be at the same blend level (stage #) on both Layer Mixers. A drm_plane that has a lesser width than the max width supported, will comprise of a single SSPP/hwpipe, staged on both the Layer Mixers at the same blend level. A plane that is greater than max width will comprise of 2 SSPPs, with the 'left' SSPP staged on the left LM, and the 'right' SSPP staged on the right LM at the same blend level. For now, the drm_plane consists of only one SSPP, therefore, it needs to be staged on both the LMs in blend_setup() and mdp5_ctl_blend(). We'll extend this logic to support 2 hwpipes per plane later. The crtc cursor ops (using the LM cursors, not SSPP cursors) simply return an error if they're called when the right mixer is assigned to the CRTC state. With source split is enabled, we're expected to only SSPP cursors. This commit adds code that configures the right mixer, but the r_mixer itself isn't assigned at the moment. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 62 ++++++++++++++++++++++++++++---- drivers/gpu/drm/msm/mdp/mdp5/mdp5_ctl.c | 44 +++++++++++++++++++++-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_ctl.h | 7 ++-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 1 + 4 files changed, 103 insertions(+), 11 deletions(-) commit 621da7d93ceca260c2a95ca240e58f08fe30b1dc Author: Archit Taneja Date: Thu Mar 23 15:58:07 2017 +0530 drm/msm/mdp5: Add a CAP for Source Split Some of the newer MDP5 versions support Source Split of SSPPs. It is a feature that allows us to route the output of a hwpipe to 2 Layer Mixers. This is required to achieve the following use cases: - Dual DSI: For high res DSI panels (such as 2560x1600 etc), a single DSI interface doesn't have the bandwidth to drive the required pixel clock. We use 2 DSI interfaces to drive the left and right halves of the panel (i.e, 1280x1600 each). The MDP5 pipeline here would look like: LM0 -- DSPP0 -- INTF1 -- DSI1 / hwpipe-- \ LM1 -- DSPP1 -- INTF2 -- DSI2 A single hwpipe is used to scan out the left and right halves to DSI1 and DSI2 respectively. In order to do this, we need to configure the 2 Layer Mixers in Source Split mode. - HDMI 4K: In order to support resolutions with width higher than the max width supported by a hwpipe, we club 2 hwpipes together: hwpipe1 --- LM0 -- DSPP0 - - \ - -- 3D Mux -- INTF0 -- HDMI - - / hwpipe2 --- LM1 -- DSPP1 hwpipe1 is staged on the 'left' Layer Mixer, and hwpipe2 is staged on the 'right' Layer Mixer. An additional block called the '3D Mux' is used to merge the output of the 2 DSPPs to a single interface. In this use case, it is possible that a 4K surface is downscaled and placed completely within one of the halves. In order to support such scenarios (and keep the programming simple), Layer Mixers with Source Split can be assigned 2 hw pipes per stage. While scanning out, the HW takes care of fetching the pixels fom the correct pipe. Add a MDP cap to tell whether the HW supports source split or not. Add a MDP LM cap that tells whether a LM instance can operate in source split mode (and generate the 'left' part of the display output). Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c | 21 +++++++++++++++------ drivers/gpu/drm/msm/mdp/mdp_kms.h | 2 ++ 2 files changed, 17 insertions(+), 6 deletions(-) commit f316b25a23da330678d476acb8a97048a793376d Author: Archit Taneja Date: Thu Mar 23 15:58:06 2017 +0530 drm/msm/mdp5: Remove mixer/intf pointers from mdp5_ctl These are a part of CRTC state, it doesn't feel nice to leave them hanging in mdp5_ctl struct. Pass mdp5_pipeline pointer instead wherever it is needed. We still have some params in mdp5_ctl like start_mask etc which are derivative of atomic state, and should be rolled back if a commit fails, but it doesn't seem to cause much trouble. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_cmd_encoder.c | 15 +++--- drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 32 ++++++++---- drivers/gpu/drm/msm/mdp/mdp5/mdp5_ctl.c | 68 ++++++++++++++----------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_ctl.h | 16 +++--- drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c | 13 ++--- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 4 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 3 +- 7 files changed, 88 insertions(+), 63 deletions(-) commit 0ddc3a630743adc36639f2c4d2134808f0835e9a Author: Archit Taneja Date: Thu Mar 23 15:58:05 2017 +0530 drm/msm/mdp5: Start using parameters from CRTC state In the last few commits, we've been adding params to mdp5_crtc_state, and assigning them in the atomic_check() funcs. Now it's time to actually start using them. Remove the duplicated params from the mdp5_crtc struct, and start using them in the mdp5_crtc code. The majority of the references to these params is in code that executes after the atomic swap has occurred, so it's okay to use crtc->state in them. There are a couple of legacy LM cursor ops that may not use the updated state, but (I think) it's okay to live with that. Now that we dynamically allocate a mixer to the CRTC, we can also remove the static assignment to it in mdp5_crtc_init, and also drop the code that skipped init-ing WB bound mixers (those will now be rejected by mdp5_mixer_assign()). Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 122 ++++++++++++++++-------------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 4 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_mixer.c | 4 - 3 files changed, 64 insertions(+), 66 deletions(-) commit bcb877b7fdeaf0867d3363136644e4d378207e31 Author: Archit Taneja Date: Thu Mar 23 15:58:04 2017 +0530 drm/msm/mdp5: Add more stuff to CRTC state Things like vblank/err irq masks, mode of operation (command mode or not) are derivative of the interface and mixer state. Therefore, they need to be a part of the CRTC state too. Add them to mdp5_crtc_state, and assign them in the CRTC's atomic_check() func, so that it can be rolled back to a clean state. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 19 +++++++++++++++++++ drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 7 +++++++ 2 files changed, 26 insertions(+) commit 502e3550c6f58f514d57f9e13ec9a98f6936b243 Author: Archit Taneja Date: Thu Mar 23 15:58:03 2017 +0530 drm/msm/mdp5: Assign INTF and CTL in encoder's atomic_check() The INTF and CTL used in a display pipeline are going to be maintained as a part of the CRTC state (i.e, in mdp5_crtc_state). These entities, however, are currently statically assigned to drm_encoders (i.e. mdp5_encoder). Since these aren't directly visible to the CRTC, we assign them to the CRTC state in the encoder's atomic_check() op. With this approach, we assign portions of CRTC state in two different places: the layer mixer in CRTC's atomic_check(), and the INTF and CTL pieces in the encoder's atomic_check() op. We'd have more options here if the drm core maintained encoder state too, but the current approach of clubbing everything in CRTC's state works just fine. Unlike hwpipes and mixers, we don't need to keep a track of INTF/CTL assignments in the global atomic state. This is because they're currently not sharable resources. For example, INTF0 and CTL0 will always be assigned to one drm_encoder. This can change later when we implement writeback and want a CRTC to use a CTL for a while, and then release it for others to use it. Or, when a drm_encoder can switch between using a single INTF vs 2 INTFs. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 894558ec8c4f3e482299905d7f86b7d1c57e1c2f Author: Archit Taneja Date: Thu Mar 23 15:58:02 2017 +0530 drm/msm/mdp5: Prepare for dynamic assignment of mixers Add the stuff needed to allow dynamically assigning a mixer to a CRTC. Since mixers are a resource that can be shared across multiple CRTCs, we need to maintain a 'hwmixer_to_crtc' map in the global atomic state, acquire the mdp5_kms.state_lock modeset lock and so on. The mixer is assigned in the CRTC's atomic_check() func, a failure will result in the new state being cleanly rolled back. The mixer assignment itself is straightforward, and almost identical to what we do for hwpipes. We don't need to grab the old hwmixer_to_crtc state like we do in hwpipes since we don't need to compare anything with the old state at the moment. The only LM capability we care about at the moment is whether the mixer instance can be used to display stuff (i.e, connect to an INTF downstream). Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 31 +++++++++++++++++ drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 1 + drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 1 + drivers/gpu/drm/msm/mdp/mdp5/mdp5_mixer.c | 55 +++++++++++++++++++++++++++++++ drivers/gpu/drm/msm/mdp/mdp5/mdp5_mixer.h | 9 +++++ 5 files changed, 97 insertions(+) commit c1e2a13090e47ec35539e470dc7f4781662e5219 Author: Archit Taneja Date: Thu Mar 23 15:58:01 2017 +0530 drm/msm/mdp5: subclass CRTC state Subclass drm_crtc_state so that we can maintain additional state for our CRTCs. Add mdp5_pipeline and mdp5_ctl pointers in the subclassed state. mdp5_pipeline is a grouping of the HW entities that forms the downstream pipeline for a particular CRTC. It currently contains pointers to mdp5_interface and mdp5_hw_mixer tied to this CRTC. Later, we will have 2 hwmixers in this struct. (We could also have 2 intfs if we want to support dual DSI with Source Split enabled. Implementing that feature isn't planned at the moment). The mdp5_pipeline state isn't used at the moment. For now, we just introduce mdp5_crtc_state and the crtc funcs needed to manage the subclassed state. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 72 +++++++++++++++++++++++++++++--- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 14 +++++++ 2 files changed, 80 insertions(+), 6 deletions(-) commit eda5dbe55bcd24208ef291429d8f202ac8477a09 Author: Archit Taneja Date: Thu Mar 23 15:58:00 2017 +0530 drm/msm/mdp5: Remove the pipeline stuff in mdp5_ctl The mdp5_ctl has an 'op_mode' struct which contains info on the downstream pipeline. Grouping these params together in a struct doesn't serve much purpose in the code. Maybe there was a plan to expand this further that never happened. Remove the op_mode struct, and place its members directly in mdp5_ctl. This will help avoid confusion later when I introduce my own verion of a mdp5 pipeline :) Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_ctl.c | 42 +++++++++++++-------------------- 1 file changed, 17 insertions(+), 25 deletions(-) commit 36d1364abbedb405fe7395b2bacdf3f62f4cf7dc Author: Archit Taneja Date: Thu Mar 23 15:57:59 2017 +0530 drm/msm/mdp5: Clean up interface assignment mdp5_interface struct contains data corresponding to a INTF instance in MDP5 hardware. This sturct is memcpy'd to the mdp5_encoder struct, and then later to the mdp5_ctl struct. Instead of copying around interface data, create mdp5_interface instances in mdp5_init, like how it's done currently done for pipes and layer mixers. Pass around the interface pointers to mdp5_encoder and mdp5_ctl. This simplifies the code, and allows us to decouple encoders from INTFs in the future if needed. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_cmd_encoder.c | 8 +-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_ctl.c | 21 ++---- drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c | 37 +++++------ drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 85 +++++++++++++++++-------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 6 +- 5 files changed, 93 insertions(+), 64 deletions(-) commit a2380124fbd7bf5c6ab72e1c40a1158d8b501ab3 Author: Archit Taneja Date: Thu Mar 23 15:57:58 2017 +0530 drm/msm/mdp5: Simplify LM <-> PP mapping PingPong ID for a Layer Mixer is already contained in mdp5_hw_mixer. This avoids the need to retrieve PP ID using macros Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_cmd_encoder.c | 6 +++--- drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 5 ++--- drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c | 2 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 10 +++++----- 4 files changed, 11 insertions(+), 12 deletions(-) commit adfc0e63abe552bf1b9d18b3073bf2a421f7ea60 Author: Archit Taneja Date: Thu Mar 23 15:57:57 2017 +0530 drm/msm/mdp5: Start using mdp5_hw_mixer Use the mdp5_hw_mixer struct in the mdp5_crtc and mdp5_ctl instead of using the LM index. Like before, the Layer Mixers are assigned statically to the CRTCs. The hwmixer(s) will later be dynamically assigned to CRTCs. For now, ignore the hwmixers that can only do WB. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_cmd_encoder.c | 9 ++++-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 42 +++++++++++++++---------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_ctl.c | 38 +++++++++++----------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_ctl.h | 2 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c | 4 +-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 6 +++- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 4 +-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_mixer.c | 4 +++ 8 files changed, 66 insertions(+), 43 deletions(-) commit 6803c60630ac71269eb62a8efb29f8c7ca64f003 Author: Archit Taneja Date: Thu Mar 23 15:57:56 2017 +0530 drm/msm/mdp5: Add structs for hw Layer Mixers Create a struct to represent MDP5 Layer Mixer instances. This will eventually allow us to detach CRTCs from the Layer Mixers, and generally clean things up a bit. This is very similar to how hwpipes were previously abstracted away from drm planes. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/Makefile | 1 + drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 33 +++++++++++++++++++++++ drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 4 +++ drivers/gpu/drm/msm/mdp/mdp5/mdp5_mixer.c | 44 +++++++++++++++++++++++++++++++ drivers/gpu/drm/msm/mdp/mdp5/mdp5_mixer.h | 37 ++++++++++++++++++++++++++ 5 files changed, 119 insertions(+) commit 384dbd8cda5f9e1090b3593fd63ca3c84b2fdd1b Author: Archit Taneja Date: Thu Mar 23 15:57:55 2017 +0530 drm/msm/mdp5: describe LM instances in mdp5_cfg The number of Layer Mixers and the downstream blocks (DSPPs and PPs) connected to each LM can vary with different MDP5 revisions. These parameters are also static. Keep the per instance LM data in mdp5_cfg. This will avoid the need to have macros which identify PP id or DSPP id the LM is connected to. We don't configure DSPPs at the moment, but keeping the DSPP instance # here might come handy later. Also add a 'caps' field that identifies features supported by a LM instance. Introduce the caps MDP_LM_CAP_DISPLAY and MDP_LM_CAP_WB that identify whether a LM instance can be used for display or writeback. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c | 72 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.h | 8 ++++ drivers/gpu/drm/msm/mdp/mdp_kms.h | 4 ++ 3 files changed, 84 insertions(+) commit 01f8a9696419133ff4305024f3211f095025d130 Author: Archit Taneja Date: Thu Mar 23 15:57:54 2017 +0530 drm/msm/mdp5: Bring back pipe_lock to mdp5_plane struct We'd previously moved the pipe_lock spinlock to the hwpipe struct. Bring it back to mdp5_plane. We will need this because an mdp5_plane in the future could comprise of 2 hw pipes. It makes more sense to have a single lock to protect the registers for the hw pipes used by a plane, rather than trying to take individual locks per hwpipe when committing a configuration. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_pipe.c | 2 -- drivers/gpu/drm/msm/mdp/mdp5/mdp5_pipe.h | 1 - drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 9 +++++++-- 3 files changed, 7 insertions(+), 5 deletions(-) commit 1225bb2b45f1c03dfdf29ab3b4cf065ab6da246f Author: Vinay Simha BN Date: Tue Mar 14 10:55:56 2017 +0530 drm/msm/hdmi: redefinitions of macros not required 4 macros already defined in hdmi.h, which is not required to redefine in hdmi_audio.c Signed-off-by: Vinay Simha BN Signed-off-by: Rob Clark drivers/gpu/drm/msm/hdmi/hdmi_audio.c | 7 ------- 1 file changed, 7 deletions(-) commit 87878d2627a5fe1668591f7767306ee81693593f Author: Archit Taneja Date: Fri Mar 17 09:09:48 2017 +0530 drm/msm/mdp5: Update SSPP_MAX value 'SSPP_MAX + 1' is the max number of hwpipes that can be present on a MDP5 platform. Recently, 2 new cursor hwpipes were added, which caused overflows in arrays that used SSPP_MAX to represent the number of elements. Update the SSPP_MAX value to incorporate the extra hwpipes. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_pipe.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8e25a0e266b05f414a63bf04b30d9a7e085e94fc Author: Archit Taneja Date: Thu Feb 16 16:29:04 2017 +0530 drm/msm/dsi: Fix bug in dsi_mgr_phy_enable A recent commit introduces a bug in dsi_mgr_phy_enable. In the non dual DSI mode, we reset the mdsi (master DSI) PHY. This isn't right since master and slave DSI exist only in dual DSI mode. For the normal mode of operation, we should simply reset the PHY of the DSI device (i.e. msm_dsi) corresponding to the current bridge. Usage of the wrong DSI pointer also resulted in a static checker warning. That too is resolved with this fix. Fixes: b62aa70a98c5 (drm/msm/dsi: Move PHY operations out of host) Reported-by: Dan Carpenter Signed-off-by: Archit Taneja Reviewed-by: Rob Clark Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0041ba396dd19c22aa884cffd2a50d8bbdb46b48 Author: Jordan Crouse Date: Tue Mar 7 10:02:51 2017 -0700 drm/msm: Don't allow zero sized buffer objects Zero sized buffer objects tend to make various bits of the GEM infrastructure complain: WARNING: CPU: 1 PID: 2323 at drivers/gpu/drm/drm_mm.c:389 drm_mm_insert_node_generic+0x258/0x2f0 Modules linked in: CPU: 1 PID: 2323 Comm: drm-api-test Tainted: G W 4.9.0-rc4-00906-g693af44 #213 Hardware name: Qualcomm Technologies, Inc. DB820c (DT) task: ffff8000d7353400 task.stack: ffff8000d7720000 PC is at drm_mm_insert_node_generic+0x258/0x2f0 LR is at drm_vma_offset_add+0x4c/0x70 Zero sized buffers serve no appreciable value to the user so disallow them at create time. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 22dd5c14be471564f80b270297b2d3a33906a7fb Author: Jordan Crouse Date: Tue Mar 7 09:50:30 2017 -0700 drm/msm: Support 64 bit iova in RD_CMDSTREAM_ADDR Output the upper 32 bits of a 64 bit iova in the RD_CMDSTREAM_ADDR section while maintaining backwards compatibility for tools that only understand 32 bit iovas. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_rd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7352fb5a5b6891c51429b465d16aa16e8391bfc0 Author: Jordan Crouse Date: Tue Mar 7 09:50:29 2017 -0700 drm/msm: Pass interrupt status to a5xx_rbbm_err_irq() The interrupt status was being cleared before processing the handlers. a5xx_rbbm_err_irq() was checking the interrupt status again, which would likely turn out bad because the interrupt status would be 0 (or at least different). Pass the original status to the function instead. Also, skip clearing RBBM_AHB_ERROR from the interrupt status. The interrupt will keep firing until the error source is cleared. Skip the clear to avoid a storm until the error is cleared in a5xx_rbbm_err_irq(). Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 36849cc361428b0b60c9065f854fe22bd55ce3ab Author: Jordan Crouse Date: Tue Mar 7 09:50:28 2017 -0700 drm/msm: Don't increase priv->num_aspaces until we know that it fits priv->num_aspaces is increased and then checked to see if it still fits in the priv->aspace array. If it doesn't, we warn and exit but priv->num_aspaces remains incremented. Don't incremement the count until we know that it fits in the array. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 2002c9c33259fd9147ebe949142f0b585bbfe869 Author: Jordan Crouse Date: Tue Mar 7 09:50:27 2017 -0700 drm/msm: Fix wrong pointer check in a5xx_destroy Instead of checking for a5xx_gpu->gpmu_iova during destroy we accidently check a5xx_gpu->gpmu_bo. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 02efb35959b0dd1792d2ce7fd133e3c7d902572b Author: Daniel Vetter Date: Wed Mar 8 15:12:54 2017 +0100 drm/msm: Simplify vblank event delivery The core takes care of handling the send_event vs. close() issues, we can remove that driver code. Cc: Rob Clark Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Daniel Vetter Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 12 +++--------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 12 +++--------- 2 files changed, 6 insertions(+), 18 deletions(-) commit 94df145c7e17c6212e2078a2ef976c365973eada Author: Daniel Vetter Date: Wed Mar 8 15:12:46 2017 +0100 drm/msm: switch to postclose I didn't spot anything that would require ordering here (well not anywhere else either), and I'm trying to unify at least modern drivers on one close hook. Cc: Rob Clark Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Daniel Vetter Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0c3eaf1fbdd9eacf8bf7819737e4e609d5fe8505 Author: Arnd Bergmann Date: Mon Mar 13 17:43:48 2017 +0100 drm/msm: adreno: fix build error without debugfs The newly added a5xx support fails to build when debugfs is diabled: drivers/gpu/drm/msm/adreno/a5xx_gpu.c:849:4: error: 'struct msm_gpu_funcs' has no member named 'show' drivers/gpu/drm/msm/adreno/a5xx_gpu.c:849:11: error: 'a5xx_show' undeclared here (not in a function); did you mean 'a5xx_irq'? This adds a missing #ifdef. Fixes: b5f103ab98c7 ("drm/msm: gpu: Add A5XX target support") Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 ++ 1 file changed, 2 insertions(+) commit 48f243c95bdb17c1453d48142abad6aabed339e5 Author: Rob Clark Date: Sat Feb 25 10:36:30 2017 -0500 drm/msm: move submit fence wait out of struct_mutex Probably a symptom of needing finer grained locking, but if we wait on the incoming fence-fd (which could come from a different context) while holding struct_mutex, that blocks retire_worker so gpu fences cannot get signalled. This causes a problem if userspace manages to get more than a frame ahead, leaving the atomic-commit worker blocked waiting on fences that cannot be signaled because submit is blocked waiting for a fence signalled from vblank (after the atomic commit which is blocked). If we start having multiple fence ctxs for the gpu, submit_fence_sync() would probably need to move outside of struct_mutex as well. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem_submit.c | 39 +++++++++++++++++------------------- 1 file changed, 18 insertions(+), 21 deletions(-) commit cc69272673ae8ef83982d6e54c67bc01997a13ea Author: Rob Clark Date: Wed Feb 15 16:00:25 2017 -0500 drm/msm: pm runtime support for iommu In particular, attach() and unmap() need pm-runtime get/put to ensure iommu clks are enabled. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_iommu.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit f90000492ed8df9cb0214e7551a43a2be170db7a Author: Rob Clark Date: Wed Feb 15 15:44:04 2017 -0500 drm/msm: convert to iommu_map_sg Significantly simplifies things. Also iommu_unmap() can unmap an entire iova range. (If backporting to downstream kernel you might need to revert this. Or at least double check older iommu implementation.) Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_iommu.c | 54 ++++------------------------------------- 1 file changed, 5 insertions(+), 49 deletions(-) commit de098e5fb123ca142656eaf7936ce2a60b7d1339 Author: Rob Clark Date: Sun Feb 12 11:42:14 2017 -0500 drm/msm/adreno: reset ringbuffer in hw_init We need to do this also in resume path when we need to re-hw_init(). Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_gpu.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit eeb754746b140c5f55e6b25706a9142aa549b348 Author: Rob Clark Date: Fri Feb 10 15:36:33 2017 -0500 drm/msm/gpu: use pm-runtime We need to use pm-runtime properly when IOMMU is using device_link() to control it's own clocks. Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_device.c | 36 ++++++++--- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 11 +++- drivers/gpu/drm/msm/msm_debugfs.c | 4 +- drivers/gpu/drm/msm/msm_drv.c | 2 + drivers/gpu/drm/msm/msm_gpu.c | 99 ++++++++---------------------- drivers/gpu/drm/msm/msm_gpu.h | 12 ++-- 6 files changed, 71 insertions(+), 93 deletions(-) commit c3c3ab199bdd5b39f0a16545f4205e20c03ba20f Author: Rob Clark Date: Fri Feb 10 14:52:40 2017 -0500 drm/msm/gpu: move suspend/resume into debugfs->show Each of the per-generation callbacks was doing this. Lets just simplify and move it into toplevel show() fxn. Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 2 -- drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 4 ---- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 4 ---- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 4 ---- drivers/gpu/drm/msm/msm_debugfs.c | 2 ++ 5 files changed, 2 insertions(+), 14 deletions(-) commit 0f8931f1b3f8180c77e710c1de738c226a0829e0 Author: Valerio Genovese Date: Thu Apr 6 08:13:16 2017 +0200 staging: rtl8192u: ieee80211: Fix space required after }. This was reported in checkpatch.pl: ERROR: space required after that close brace '}' Changes in v2: add space after close brace '}' also at line 35, before it was only for 34. Signed-off-by: Valerio Genovese Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 62f986899090c2bc49734c76261480521eec1a53 Author: Alfonso Lima Astor Date: Thu Mar 30 21:49:33 2017 +0100 staging: rtl8188eu: Remove extra spaces Coding style problem detected by checkpatch.pl ERROR: space prohibited before that ',' Signed-off-by: Alfonso Lima Astor Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6cd43f0ca09425792819002dbdd812e734457a09 Author: Alfonso Lima Astor Date: Wed Mar 29 20:20:32 2017 +0100 staging: rtl8188eu: Macros with complex values should be enclosed in parentheses This macro is not used and also had a style error. I have run grep and compiled the module to be sure. Signed-off-by: Alfonso Lima Astor Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_ioctl.h | 6 ------ 1 file changed, 6 deletions(-) commit bbc2a2df92472eba0c5fddeea4a13134e72fefce Author: Riku Salminen Date: Fri Mar 31 16:10:32 2017 +0300 Staging: nvec: Remove FSF's mailing address Removed Free Software Foundation's address from the copyright notice and replaced it with a link to http://www.gnu.org/licenses Signed-off-by: Riku Salminen Signed-off-by: Greg Kroah-Hartman drivers/staging/nvec/nvec-keytable.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 54f74b492f4f9f59ad004856d60492d60e325f35 Author: Arnd Bergmann Date: Wed Mar 29 23:10:09 2017 +0200 staging: comedi: labpc: fix isadma dependency When COMEDI_NI_LABPC is built-in and COMEDI_NI_LABPC_ISA is a loadable module, thhe ISA DMA code is not reachable by the common module, causing a link error: drivers/staging/built-in.o: In function `labpc_interrupt': ni_labpc_common.c:(.text+0x1d178): undefined reference to `labpc_handle_dma_status' ni_labpc_common.c:(.text+0x1d1cb): undefined reference to `labpc_drain_dma' drivers/staging/built-in.o: In function `labpc_ai_cmd': ni_labpc_common.c:(.text+0x1d8ad): undefined reference to `labpc_setup_dma' This changes the definition of COMEDI_NI_LABPC_ISADMA so that it will also be builtin for that case. This looks like a rather old bug, but I have never seen this in randconfig testing until today. Signed-off-by: Arnd Bergmann Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 554c0a3abf216c991c5ebddcdb2c08689ecd290b Author: Hans de Goede Date: Wed Mar 29 19:47:51 2017 +0200 staging: Add rtl8723bs sdio wifi driver The rtl8723bs is found on quite a few systems used by Linux users, such as on Atom systems (Intel Computestick and various other Atom based devices) and on many (budget) ARM boards such as the CHIP. The plan moving forward with this is for the new clean, written from scratch, rtl8xxxu driver to eventually gain support for sdio devices. But there is no clear timeline for that, so lets add this driver included in staging for now. Cc: Bastien Nocera Cc: Larry Finger Cc: Jes Sorensen Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/rtl8723bs/Kconfig | 10 + drivers/staging/rtl8723bs/Makefile | 70 + drivers/staging/rtl8723bs/TODO | 16 + drivers/staging/rtl8723bs/core/rtw_ap.c | 2684 ++++++++ drivers/staging/rtl8723bs/core/rtw_btcoex.c | 243 + drivers/staging/rtl8723bs/core/rtw_cmd.c | 2226 +++++++ drivers/staging/rtl8723bs/core/rtw_debug.c | 1453 ++++ drivers/staging/rtl8723bs/core/rtw_eeprom.c | 369 ++ drivers/staging/rtl8723bs/core/rtw_efuse.c | 635 ++ drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 1433 ++++ drivers/staging/rtl8723bs/core/rtw_io.c | 203 + drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 696 ++ drivers/staging/rtl8723bs/core/rtw_mlme.c | 3155 +++++++++ drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 6940 ++++++++++++++++++++ drivers/staging/rtl8723bs/core/rtw_odm.c | 195 + drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 1421 ++++ drivers/staging/rtl8723bs/core/rtw_recv.c | 2693 ++++++++ drivers/staging/rtl8723bs/core/rtw_rf.c | 64 + drivers/staging/rtl8723bs/core/rtw_security.c | 2448 +++++++ drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 641 ++ drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2328 +++++++ drivers/staging/rtl8723bs/core/rtw_xmit.c | 3100 +++++++++ drivers/staging/rtl8723bs/hal/Hal8723BPwrSeq.c | 138 + drivers/staging/rtl8723bs/hal/Hal8723BReg.h | 442 ++ drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c | 3779 +++++++++++ drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.h | 193 + drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c | 3729 +++++++++++ drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.h | 155 + drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h | 565 ++ drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c | 643 ++ drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.h | 48 + drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c | 302 + drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.h | 28 + drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c | 799 +++ drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.h | 49 + drivers/staging/rtl8723bs/hal/HalPhyRf.c | 662 ++ drivers/staging/rtl8723bs/hal/HalPhyRf.h | 63 + drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c | 2091 ++++++ drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.h | 83 + drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c | 205 + drivers/staging/rtl8723bs/hal/Mp_Precomp.h | 33 + drivers/staging/rtl8723bs/hal/hal_btcoex.c | 1720 +++++ drivers/staging/rtl8723bs/hal/hal_com.c | 1751 +++++ drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 3286 +++++++++ drivers/staging/rtl8723bs/hal/hal_intf.c | 474 ++ drivers/staging/rtl8723bs/hal/hal_phy.c | 224 + drivers/staging/rtl8723bs/hal/hal_sdio.c | 115 + drivers/staging/rtl8723bs/hal/odm.c | 1446 ++++ drivers/staging/rtl8723bs/hal/odm.h | 1465 +++++ drivers/staging/rtl8723bs/hal/odm_AntDiv.c | 70 + drivers/staging/rtl8723bs/hal/odm_AntDiv.h | 38 + drivers/staging/rtl8723bs/hal/odm_CfoTracking.c | 338 + drivers/staging/rtl8723bs/hal/odm_CfoTracking.h | 47 + drivers/staging/rtl8723bs/hal/odm_DIG.c | 1221 ++++ drivers/staging/rtl8723bs/hal/odm_DIG.h | 195 + .../rtl8723bs/hal/odm_DynamicBBPowerSaving.c | 89 + .../rtl8723bs/hal/odm_DynamicBBPowerSaving.h | 39 + drivers/staging/rtl8723bs/hal/odm_DynamicTxPower.c | 30 + drivers/staging/rtl8723bs/hal/odm_DynamicTxPower.h | 37 + drivers/staging/rtl8723bs/hal/odm_EdcaTurboCheck.c | 186 + drivers/staging/rtl8723bs/hal/odm_EdcaTurboCheck.h | 31 + drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 535 ++ drivers/staging/rtl8723bs/hal/odm_HWConfig.h | 162 + drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c | 175 + drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.h | 47 + drivers/staging/rtl8723bs/hal/odm_PathDiv.c | 42 + drivers/staging/rtl8723bs/hal/odm_PathDiv.h | 29 + drivers/staging/rtl8723bs/hal/odm_RTL8723B.c | 45 + drivers/staging/rtl8723bs/hal/odm_RTL8723B.h | 22 + drivers/staging/rtl8723bs/hal/odm_RegConfig8723B.c | 257 + drivers/staging/rtl8723bs/hal/odm_RegConfig8723B.h | 65 + drivers/staging/rtl8723bs/hal/odm_RegDefine11N.h | 172 + drivers/staging/rtl8723bs/hal/odm_debug.c | 52 + drivers/staging/rtl8723bs/hal/odm_debug.h | 165 + drivers/staging/rtl8723bs/hal/odm_interface.h | 59 + drivers/staging/rtl8723bs/hal/odm_precomp.h | 60 + drivers/staging/rtl8723bs/hal/odm_reg.h | 103 + drivers/staging/rtl8723bs/hal/odm_types.h | 102 + drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 2358 +++++++ drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 300 + drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4546 +++++++++++++ drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 1050 +++ drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c | 224 + drivers/staging/rtl8723bs/hal/rtl8723b_rxdesc.c | 86 + drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 490 ++ drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 686 ++ drivers/staging/rtl8723bs/hal/sdio_halinit.c | 1928 ++++++ drivers/staging/rtl8723bs/hal/sdio_ops.c | 1296 ++++ drivers/staging/rtl8723bs/include/Hal8192CPhyReg.h | 1126 ++++ drivers/staging/rtl8723bs/include/Hal8723BPhyCfg.h | 128 + drivers/staging/rtl8723bs/include/Hal8723BPhyReg.h | 77 + drivers/staging/rtl8723bs/include/Hal8723BPwrSeq.h | 232 + drivers/staging/rtl8723bs/include/HalPwrSeqCmd.h | 132 + drivers/staging/rtl8723bs/include/HalVerDef.h | 127 + drivers/staging/rtl8723bs/include/autoconf.h | 71 + drivers/staging/rtl8723bs/include/basic_types.h | 209 + drivers/staging/rtl8723bs/include/cmd_osdep.h | 26 + drivers/staging/rtl8723bs/include/drv_conf.h | 37 + drivers/staging/rtl8723bs/include/drv_types.h | 720 ++ drivers/staging/rtl8723bs/include/drv_types_sdio.h | 39 + drivers/staging/rtl8723bs/include/ethernet.h | 22 + drivers/staging/rtl8723bs/include/hal_btcoex.h | 68 + drivers/staging/rtl8723bs/include/hal_com.h | 309 + drivers/staging/rtl8723bs/include/hal_com_h2c.h | 293 + drivers/staging/rtl8723bs/include/hal_com_phycfg.h | 273 + drivers/staging/rtl8723bs/include/hal_com_reg.h | 1725 +++++ drivers/staging/rtl8723bs/include/hal_data.h | 483 ++ drivers/staging/rtl8723bs/include/hal_intf.h | 410 ++ drivers/staging/rtl8723bs/include/hal_pg.h | 81 + drivers/staging/rtl8723bs/include/hal_phy.h | 183 + drivers/staging/rtl8723bs/include/hal_phy_reg.h | 25 + drivers/staging/rtl8723bs/include/hal_sdio.h | 26 + drivers/staging/rtl8723bs/include/ieee80211.h | 1345 ++++ drivers/staging/rtl8723bs/include/ioctl_cfg80211.h | 128 + drivers/staging/rtl8723bs/include/mlme_osdep.h | 27 + drivers/staging/rtl8723bs/include/osdep_intf.h | 88 + drivers/staging/rtl8723bs/include/osdep_service.h | 281 + .../rtl8723bs/include/osdep_service_linux.h | 178 + drivers/staging/rtl8723bs/include/recv_osdep.h | 48 + drivers/staging/rtl8723bs/include/rtl8192c_recv.h | 50 + drivers/staging/rtl8723bs/include/rtl8192c_rf.h | 39 + drivers/staging/rtl8723bs/include/rtl8723b_cmd.h | 199 + drivers/staging/rtl8723bs/include/rtl8723b_dm.h | 41 + drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 279 + drivers/staging/rtl8723bs/include/rtl8723b_recv.h | 144 + drivers/staging/rtl8723bs/include/rtl8723b_rf.h | 26 + drivers/staging/rtl8723bs/include/rtl8723b_spec.h | 262 + drivers/staging/rtl8723bs/include/rtl8723b_xmit.h | 458 ++ drivers/staging/rtl8723bs/include/rtw_ap.h | 47 + .../staging/rtl8723bs/include/rtw_beamforming.h | 135 + drivers/staging/rtl8723bs/include/rtw_br_ext.h | 63 + drivers/staging/rtl8723bs/include/rtw_btcoex.h | 64 + drivers/staging/rtl8723bs/include/rtw_byteorder.h | 24 + drivers/staging/rtl8723bs/include/rtw_cmd.h | 980 +++ drivers/staging/rtl8723bs/include/rtw_debug.h | 355 + drivers/staging/rtl8723bs/include/rtw_eeprom.h | 128 + drivers/staging/rtl8723bs/include/rtw_efuse.h | 132 + drivers/staging/rtl8723bs/include/rtw_event.h | 117 + drivers/staging/rtl8723bs/include/rtw_ht.h | 118 + drivers/staging/rtl8723bs/include/rtw_io.h | 373 ++ drivers/staging/rtl8723bs/include/rtw_ioctl.h | 80 + drivers/staging/rtl8723bs/include/rtw_ioctl_set.h | 41 + drivers/staging/rtl8723bs/include/rtw_mlme.h | 695 ++ drivers/staging/rtl8723bs/include/rtw_mlme_ext.h | 888 +++ drivers/staging/rtl8723bs/include/rtw_mp.h | 512 ++ drivers/staging/rtl8723bs/include/rtw_odm.h | 36 + drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 375 ++ drivers/staging/rtl8723bs/include/rtw_qos.h | 27 + drivers/staging/rtl8723bs/include/rtw_recv.h | 553 ++ drivers/staging/rtl8723bs/include/rtw_rf.h | 159 + drivers/staging/rtl8723bs/include/rtw_security.h | 440 ++ drivers/staging/rtl8723bs/include/rtw_version.h | 2 + drivers/staging/rtl8723bs/include/rtw_wifi_regd.h | 28 + drivers/staging/rtl8723bs/include/rtw_xmit.h | 528 ++ drivers/staging/rtl8723bs/include/sdio_hal.h | 28 + drivers/staging/rtl8723bs/include/sdio_ops.h | 49 + drivers/staging/rtl8723bs/include/sdio_ops_linux.h | 40 + drivers/staging/rtl8723bs/include/sdio_osintf.h | 24 + drivers/staging/rtl8723bs/include/sta_info.h | 392 ++ drivers/staging/rtl8723bs/include/wifi.h | 1158 ++++ drivers/staging/rtl8723bs/include/wlan_bssdef.h | 278 + drivers/staging/rtl8723bs/include/xmit_osdep.h | 54 + drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 3596 ++++++++++ drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 5820 ++++++++++++++++ drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 206 + drivers/staging/rtl8723bs/os_dep/os_intfs.c | 1915 ++++++ drivers/staging/rtl8723bs/os_dep/osdep_service.c | 481 ++ drivers/staging/rtl8723bs/os_dep/recv_linux.c | 366 ++ drivers/staging/rtl8723bs/os_dep/rtw_proc.c | 786 +++ drivers/staging/rtl8723bs/os_dep/rtw_proc.h | 45 + drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 690 ++ drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c | 599 ++ drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 164 + drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 298 + 176 files changed, 109195 insertions(+) commit 38ca74e58f59c211818d1603c784c68947a2ba88 Author: Dan Cashman Date: Sun Apr 2 13:48:12 2017 -0700 staging: vt6656: Split arguments to avoid 80-char violation in rf.c Wrap arguments of call to vnt_control_out() to avoid exceeding 80 character limit, but maintain alignment. Signed-off-by: Daniel Cashman Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/rf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 04a218becbdf12d8ed5410f46f08a8a26724ab02 Author: Dan Cashman Date: Sun Apr 2 13:48:11 2017 -0700 staging: vt6656: Replace embedded function name with __func__ in rf.c Change embedded function name in vnt_rf_set_txpower with %s format with __func__ argument to make it consistent with other part of if-else and kernel coding style standards as reported by checkpatch. Signed-off-by: Daniel Cashman Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/rf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4dc9bd6a35d8b0c996e660206ba25eda92ab6d9 Author: Dan Cashman Date: Sun Apr 2 13:48:10 2017 -0700 staging: vt6656: convert spaces to tabs for rf.c Address checkpatch errors encountered in rf.c by removing use of spaces and replacing with properly aligned tabs. Signed-off-by: Daniel Cashman Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/rf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b0512faf60828dece9d309ca2516c833430c390d Author: David Kershner Date: Fri Mar 31 14:20:12 2017 -0400 staging: unisys: visorbus: fix kernel BUG discovered by day0 testing Kernel day0 testing robot reported a kernel BUG at drivers/base/driver.c! with the following call stack: [ 14.963563] ------------[ cut here ]------------ [ 14.967298] kernel BUG at drivers/base/driver.c:153! [ 14.970948] invalid opcode: 0000 [#1] SMP [ 14.974013] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.11.0-rc4-00790-g0789e2c #1 [ 14.978221] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014 [ 14.983417] task: ffff88001ea46040 task.stack: ffffc90000008000 [ 14.987315] RIP: 0010:driver_register+0xa1/0xd0 [ 14.990044] RSP: 0000:ffffc9000000be60 EFLAGS: 00010246 [ 14.993039] RAX: 0000000000000000 RBX: ffffffff831d4c20 RCX: 0000000000000000 [ 14.997040] RDX: 000000000000004d RSI: ffffffff831d47c0 RDI: ffffffff831d4c20 [ 15.001511] RBP: ffffc9000000be78 R08: ffffc9000000be78 R09: ffffc9000000be7c [ 15.006163] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000 [ 15.010068] R13: 00000000ffffffff R14: ffffffff832f3923 R15: 0000000000000000 [ 15.013715] FS: 0000000000000000(0000) GS:ffff88001fa00000(0000) knlGS:0000000000000000 [ 15.017460] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 15.021268] CR2: 0000000000000000 CR3: 0000000003009000 CR4: 00000000000006b0 [ 15.025633] Call Trace: [ 15.028069] ? visorbus_register_visor_driver+0x3f/0x60 [ 15.031065] ? init_unisys+0x3a/0x90 [ 15.033562] ? device_resume_response+0x50/0x50 [ 15.036083] visorinput_init+0x10/0x20 [ 15.038937] do_one_initcall+0x9a/0x164 [ 15.041838] ? set_debug_rodata+0x12/0x12 [ 15.045333] kernel_init_freeable+0x11e/0x1a1 [ 15.048369] ? rest_init+0x80/0x80 [ 15.050813] kernel_init+0x9/0x100 [ 15.053353] ret_from_fork+0x2c/0x40 [ 15.056009] Code: ff 85 c0 41 89 c4 75 13 48 8b 7b 70 31 f6 e8 97 16 be ff 44 89 e0 5b 41 5c 5d c3 48 89 df e8 57 e1 ff ff 44 89 e0 5b 41 5c 5d c3 <0f> 0b 48 8b 33 48 c7 c7 a0 dd d5 82 e8 ec f0 6f ff 48 8b 73 08 [ 15.065144] RIP: driver_register+0xa1/0xd0 RSP: ffffc9000000be60 [ 15.068360] ---[ end trace 7d13369c38d80a8f ]--- This bug will occur if the visorbus driver is built-in to the kernel, and the resulting kernel is run in an environment where visorbus devices are NOT supported, and an attempt is made to load any of the drivers: visorhba, visornic, or visorinput. Checked to see if we have called bus_register, if not do not call driver_register. Signed-off-by: David Kershner Fixes: 5b6f9b95f7ae ("staging: unisys: visorbus: get rid of create_bus_type.") Reviewed-by: Tim Sell Reviewed-by: David Binder Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 6 ++++++ 1 file changed, 6 insertions(+) commit bca74ee5fec06efd5615102790ff1ff773a2f717 Author: Thomas Jespersen Date: Thu Apr 6 22:58:14 2017 +0200 staging: unisys: visornic: Replace symbolic perms with octal Replace symbolic permissions S_IRUSR and S_IWUSR for their octal counterparts Signed-off-by: Thomas Jespersen Acked-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 008b5d28451550ae3ddfd56b9d36715edd3bb504 Author: Darryl T. Agostinelli Date: Sun Apr 2 08:28:37 2017 -0500 staging: lustre: fixed ../include/lustre_debug.h is included more than once. $ make includecheck ./drivers/staging/lustre/lustre/ptlrpc/layout.c: ../include/lustre_debug.h is included more than once. Signed-off-by: Darryl T. Agostinelli Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/layout.c | 1 - 1 file changed, 1 deletion(-) commit d9f5af4a4d33fb291f0b5aaae96993b592d5d9fc Author: Pushkar Jambhlekar Date: Tue Apr 4 14:45:26 2017 +0530 drivers/staging/lustre: Coding-guideline: Missing a blank line after declarations Adding a blank line after declaration Signed-off-by: Pushkar Jambhlekar Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dcache.c | 1 + drivers/staging/lustre/lustre/llite/namei.c | 1 + drivers/staging/lustre/lustre/llite/symlink.c | 1 + drivers/staging/lustre/lustre/llite/vvp_io.c | 1 + drivers/staging/lustre/lustre/obdclass/cl_page.c | 1 + drivers/staging/lustre/lustre/osc/osc_cache.c | 1 + 6 files changed, 6 insertions(+) commit b2e8aa52e27ba518478099ed2eb98a3df85f42dd Author: Christian Gromm Date: Fri Apr 7 15:38:40 2017 +0200 staging: most: usb: pass correct register table Inside the function store_value() the table of writable registers need to be passed to function get_static_reg_addr() or else the correct register address is never going to be found. Reported-by: Alex Riesen Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c13155d190464fade0344e16b6341f18af25f1f Author: Andrey Shvetsov Date: Fri Apr 7 15:38:39 2017 +0200 staging: most: usb: fix size overflow Despite the user payload may not be bigger than (2**16 - 1) bytes, the final packet size may be bigger because of the gap space needed for the controller. This patch removes the temporary variables of the type u16 that are used to hold the offsets that may be bigger than 2**16 bytes. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit f500192890c7c6745a92b677f5f69e58a2d60715 Author: Andrey Shvetsov Date: Fri Apr 7 15:38:38 2017 +0200 staging: most: usb: fix calculation of the extra_len The final size of the buffer used for the streaming transfer consists of the size for the user payload (buffer_size) and the size for the gaps needed by the controller (extra_len). The current implementation of the hdm_configure_channel() corrects the buffer size down to the next appropriate for the hardware value, that is the whole number of frames, but uses the old unaligned value to calculate the extra_len. Current patch fixes the described problem. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-usb/hdm_usb.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) commit 2c4aaa1fffe8d01c621e2515cd5f290227949e71 Author: Andrey Shvetsov Date: Fri Apr 7 15:38:37 2017 +0200 staging: most: destroy cdev when channel gets disconnected When a channel is being removed while an application holds the corresponding character device, this device is going to be destroyed only after the application closes the file descriptor and releases character device. In case the channel appears again before the application closes the file descriptor it holds, the channel cannot be linked. This patch changes the described behavior and destroys the character device at the time the channel get disconnected from the AIM. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/aim-cdev/cdev.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 5f788625cd4c5d4062fc3f95308de74d65d7a314 Author: Andrey Shvetsov Date: Fri Apr 7 15:38:36 2017 +0200 staging: most: consolidate attributes for list of links This patch replaces three temporary variables representing the attributes to control the links between the AIMs and HDMs with an array of three elements to keep the corresponding code compact. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/mostcore/core.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit add98da7da79f38fd22d8852ed1066952d8b02aa Author: Andrey Shvetsov Date: Fri Apr 7 15:38:35 2017 +0200 staging: most: core: separate property showing links Currently an AIM has the following properties available to manage links: - write-only "remove_link" used to remove a link from a list - read/write "add_link" used to add a link to a list and display them This patch transfers the read functionality of "add_link" to the new read-only property "links" to build consistent set of properties to control the list of links. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/mostcore/core.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 7dc70220e92fc045ab2357874a67f06a916e0b41 Author: Andrey Shvetsov Date: Fri Apr 7 15:38:34 2017 +0200 staging: most: core: consolidate channel attributes This patch replaces 13 temporary variables representing the attributes to control the channel with an array of 13 elements to keep the corresponding code compact. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/mostcore/core.c | 61 +++++++++++++++++------------------- 1 file changed, 28 insertions(+), 33 deletions(-) commit 1c74e3ab95dab9caec3a30e8de9ac2e41f967e38 Author: Christian Gromm Date: Fri Apr 7 15:38:33 2017 +0200 staging: most: core: make use of __ATTR_* macros This patch replaces the proprietary macros with those provided by the kernel. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/mostcore/core.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit 4dd7c7c7b3671b1939d18ff7cc872f12187f9e15 Author: Christian Gromm Date: Fri Apr 7 15:38:32 2017 +0200 staging: most: core: fix function names This patch fixes the names of the show/store functions to match the naming convention. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/mostcore/core.c | 68 +++++++++++++++++------------------- 1 file changed, 32 insertions(+), 36 deletions(-) commit bf676f4ce2550de749d5c09524761610c91514a6 Author: Andrey Shvetsov Date: Fri Apr 7 15:38:31 2017 +0200 staging: most: fix comment of the function remove_link_store This patch replaces the name store_remove_link by the remove_link_store in the comment for the corresponding function. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/mostcore/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b4194fd09530c0f22783882cb3fb5b272a448c1 Author: Andrey Shvetsov Date: Fri Apr 7 15:38:30 2017 +0200 staging: most: fix comment of the function add_link_store This patch replaces the name store_add_link by the add_link_store in the comment for the corresponding function. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/mostcore/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9828282e33a091f080647b1dfd2e8d17ad7066fa Author: Laura Abbott Date: Mon Apr 3 11:57:54 2017 -0700 staging: android: ion: Remove old platform support Device specific platform support has been haphazard for Ion. There have been several independent attempts and there are still objections to what bindings exist right now. Just remove everything for a fresh start. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/Kconfig | 42 --- drivers/staging/android/ion/Makefile | 7 - drivers/staging/android/ion/hisilicon/Kconfig | 5 - drivers/staging/android/ion/hisilicon/Makefile | 1 - drivers/staging/android/ion/hisilicon/hi6220_ion.c | 113 -------- drivers/staging/android/ion/ion_dummy_driver.c | 155 ----------- drivers/staging/android/ion/ion_of.c | 184 ------------- drivers/staging/android/ion/ion_of.h | 37 --- drivers/staging/android/ion/ion_test.c | 305 --------------------- drivers/staging/android/ion/tegra/Makefile | 1 - drivers/staging/android/ion/tegra/tegra_ion.c | 80 ------ drivers/staging/android/uapi/ion_test.h | 69 ----- 12 files changed, 999 deletions(-) commit db70331bc632a9c009aa56678b1c64e388458837 Author: Laura Abbott Date: Mon Apr 3 11:57:53 2017 -0700 staging: android: ion: Remove duplicate ION_IOC_MAP ION_IOC_MAP is the same as ION_IOC_SHARE. We really don't need two identical interfaces. Remove it. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/compat_ion.c | 1 - drivers/staging/android/ion/ion-ioctl.c | 1 - drivers/staging/android/uapi/ion.h | 10 ---------- 3 files changed, 12 deletions(-) commit 4c23cbff073f3b9bf03c3ccd75bc2d09b34fcc15 Author: Laura Abbott Date: Mon Apr 3 11:57:52 2017 -0700 staging: android: ion: Remove import interface With the expansion of dma-buf and the move for Ion to be come just an allocator, the import mechanism is mostly useless. There isn't a kernel component to Ion anymore and handles are private to Ion. Remove this interface. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/compat_ion.c | 1 - drivers/staging/android/ion/ion-ioctl.c | 11 ----- drivers/staging/android/ion/ion.c | 76 -------------------------------- drivers/staging/android/uapi/ion.h | 9 ---- 4 files changed, 97 deletions(-) commit 73794b373f0f3d5606daec859aae62599b8025f4 Author: Laura Abbott Date: Mon Apr 3 11:57:51 2017 -0700 staging: android: ion: Remove custom ioctl interface Ion is now moving towards a unified interfact. This makes the custom ioctl interface unneeded. Remove it. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/compat_ion.c | 40 -------------------------- drivers/staging/android/ion/ion-ioctl.c | 11 ------- drivers/staging/android/ion/ion.c | 6 +--- drivers/staging/android/ion/ion_dummy_driver.c | 2 +- drivers/staging/android/ion/ion_priv.h | 8 +----- drivers/staging/android/uapi/ion.h | 21 -------------- 6 files changed, 3 insertions(+), 85 deletions(-) commit 5dc3bafb4217e021a38fe67445dac5b659909c36 Author: Laura Abbott Date: Mon Apr 3 11:57:50 2017 -0700 staging: android: ion: Remove crufty cache support Now that we call dma_map in the dma_buf API callbacks there is no need to use the existing cache APIs. Remove the sync ioctl and the existing bad dma_sync calls. Explicit caching can be handled with the dma_buf sync API. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/compat_ion.c | 1 - drivers/staging/android/ion/ion-ioctl.c | 6 ---- drivers/staging/android/ion/ion.c | 40 ------------------------- drivers/staging/android/ion/ion_carveout_heap.c | 6 ---- drivers/staging/android/ion/ion_chunk_heap.c | 6 ---- drivers/staging/android/ion/ion_page_pool.c | 3 -- drivers/staging/android/ion/ion_priv.h | 13 -------- drivers/staging/android/ion/ion_system_heap.c | 5 ---- drivers/staging/android/uapi/ion.h | 10 ------- 9 files changed, 90 deletions(-) commit 0499a61425384acbfb96e30aaa9fe82d3a9f3f51 Author: Laura Abbott Date: Mon Apr 3 11:57:49 2017 -0700 staging: android: ion: Remove page faulting support The new method of syncing with dma_map means that the page faulting sync implementation is no longer applicable. Remove it. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 117 -------------------------------------- 1 file changed, 117 deletions(-) commit 2a55e7b5e5446c970e00be1bca8536f4a58bf21c Author: Laura Abbott Date: Mon Apr 3 11:57:48 2017 -0700 staging: android: ion: Call dma_map_sg for syncing and mapping Technically, calling dma_buf_map_attachment should return a buffer properly dma_mapped. Add calls to dma_map_sg to begin_cpu_access to ensure this happens. As a side effect, this lets Ion buffers take advantage of the dma_buf sync ioctls. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 151 ++++++++++++++++++++++----------- drivers/staging/android/ion/ion_priv.h | 1 + 2 files changed, 103 insertions(+), 49 deletions(-) commit 17fd283f3870dd63c91c99591aab14e21799c119 Author: Laura Abbott Date: Mon Apr 3 11:57:47 2017 -0700 staging: android: ion: Duplicate sg_table Ion currently returns a single sg_table on each dma_map call. This is incorrect for later usage. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit 1d9735efaceb1fdd921e0a08a914cbec4fdd0b1b Author: Laura Abbott Date: Mon Apr 3 11:57:46 2017 -0700 staging: android: ion: Remove alignment from allocation field The align field was supposed to be used to specify the alignment of the allocation. Nobody actually does anything with it except to check if the alignment specified is out of bounds. Since this has no effect on the actual allocation, just remove it. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion-ioctl.c | 1 - drivers/staging/android/ion/ion.c | 14 ++++++-------- drivers/staging/android/ion/ion.h | 5 +---- drivers/staging/android/ion/ion_carveout_heap.c | 10 +++------- drivers/staging/android/ion/ion_chunk_heap.c | 9 +++------ drivers/staging/android/ion/ion_cma_heap.c | 5 +---- drivers/staging/android/ion/ion_priv.h | 2 +- drivers/staging/android/ion/ion_system_heap.c | 9 +-------- 8 files changed, 16 insertions(+), 39 deletions(-) commit 9c4e5271f8aa78abeaac982f8dbf1c5d1313139d Author: Laura Abbott Date: Mon Apr 3 11:57:45 2017 -0700 staging: android: ion: Remove dmap_cnt The reference counting of dma_map calls was removed. Remove the associated counter field as well. Signed-off-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_priv.h | 2 -- 1 file changed, 2 deletions(-) commit 37e47d5cfeec1dcc8246401ce84f2780f99ce990 Author: Yuyang Du Date: Thu Apr 6 06:03:23 2017 +0800 usb: usbip tool: Fix get_nports() The commit 0775a9cbc694e8c72 ("usbip: vhci extension: modifications to vhci driver") introduced multiple controllers, and nports as a sys file, and claimed to read the nports from it, but it didn't. In addition, the get_nports() has been so wrong that even with 8 port lines for instance, it gets 7 (I am guessing it is due to a '\n' mess). Nevertheless, we fix it by reading the nports attribute. Reviewed-by: Krzysztof Opasiak Signed-off-by: Yuyang Du Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/libsrc/vhci_driver.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) commit 69307ccb9ad7ccb653e332de68effdeaaab6907d Author: Roger Quadros Date: Fri Apr 7 17:57:12 2017 +0300 usb: xhci: bInterval quirk for TI TUSB73x0 As per [1] issue #4, "The periodic EP scheduler always tries to schedule the EPs that have large intervals (interval equal to or greater than 128 microframes) into different microframes. So it maintains an internal counter and increments for each large interval EP added. When the counter is greater than 128, the scheduler rejects the new EP. So when the hub re-enumerated 128 times, it triggers this condition." This results in Bandwidth error when devices with periodic endpoints (ISO/INT) having bInterval > 7 are plugged and unplugged several times on a TUSB73x0 XHCI host. Workaround this issue by limiting the bInterval to 7 (i.e. interval to 6) for High-speed or faster periodic endpoints. [1] - http://www.ti.com/lit/er/sllz076/sllz076.pdf Cc: stable Signed-off-by: Roger Quadros Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 11 +++++++++++ drivers/usb/host/xhci-pci.c | 3 +++ drivers/usb/host/xhci.h | 1 + 3 files changed, 15 insertions(+) commit d2561626b9d126a94753ad6f048114bab702f02f Author: Lu Baolu Date: Fri Apr 7 17:57:11 2017 +0300 usb: xhci: refine xhci_decode_trb() Replace 'TRB_FIELD_TO_TYPE(field3)' with 'type' to simplify code. Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.h | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 96d9a6eb97d77d6a3768f101f400c42743799bb2 Author: Lu Baolu Date: Fri Apr 7 17:57:10 2017 +0300 usb: xhci: fix link trb decoding xhci_decode_trb() treats a link trb in the same way as that for an event trb. This patch fixes this by decoding the link trb according to the spec. Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit c8844f2ddb0d2bc42a813c567ad4240759f373bd Author: Lu Baolu Date: Fri Apr 7 17:57:09 2017 +0300 usb: xhci: remove xhci_dbg_ctx() XHCI context changes have already been traced by the trace events. It's unnecessary to put the same message in kernel log. This patch removes the use of xhci_dbg_ctx(). Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-dbg.c | 143 -------------------------------------------- drivers/usb/host/xhci.c | 37 ------------ drivers/usb/host/xhci.h | 1 - 3 files changed, 181 deletions(-) commit 8c10152ec52b850f9806c5c2f5a93ebe38838959 Author: Lu Baolu Date: Fri Apr 7 17:57:08 2017 +0300 usb: xhci: remove xhci_debug_trb() Every XHCI TRB has already been traced by the trb trace events. It is unnecessary to put the same message in kernel log. This patch removes xhci_debug_trb(). Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-dbg.c | 57 -------------------------------------------- drivers/usb/host/xhci-ring.c | 4 ---- drivers/usb/host/xhci.h | 2 -- 3 files changed, 63 deletions(-) commit 121dcf11908ecea252776c8268aab117f91aa1f5 Author: Lu Baolu Date: Fri Apr 7 17:57:07 2017 +0300 usb: xhci: remove ring debugging code XHCI ring changes have already been traced by the ring trace events. It's unnecessary to put the same messages in kernel log. This patch removes the debugging code for a ring. Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-dbg.c | 62 -------------------------------------------- drivers/usb/host/xhci-ring.c | 4 --- drivers/usb/host/xhci.c | 6 ----- drivers/usb/host/xhci.h | 3 --- 4 files changed, 75 deletions(-) commit cd12fd9f6d05d1b2b9ff2630802c55b5fd2e534c Author: Lu Baolu Date: Fri Apr 7 17:57:06 2017 +0300 usb: xhci: remove enq_updates and deq_updates from ring enq_updates and deq_updates were introduced in the first place to check whether an xhci hardware is able to respond to trbs enqueued in the ring. We now have trb tracers to trace every single enqueue/dequeue trb. It's time to remove them and the associated debugging code. Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-dbg.c | 8 -------- drivers/usb/host/xhci-mem.c | 3 --- drivers/usb/host/xhci-ring.c | 3 --- drivers/usb/host/xhci.h | 2 -- 4 files changed, 16 deletions(-) commit 74e0b5649c26428a4b87f496cef0df8307eff364 Author: Lu Baolu Date: Fri Apr 7 17:57:05 2017 +0300 usb: xhci: remove error messages for failed memory allocation Omit extra messages for memory allocation failure. Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 4 +--- drivers/usb/host/xhci-mem.c | 1 - drivers/usb/host/xhci-ring.c | 10 ++++------ drivers/usb/host/xhci.c | 13 +++++++------ 4 files changed, 12 insertions(+), 16 deletions(-) commit 3969384cf88aa2726afb05ad5d1c6ec27e670f07 Author: Lu Baolu Date: Fri Apr 7 17:57:04 2017 +0300 usb: xhci: make several functions static Several functions have a single user in the same file where it is defined. There's no need to expose it anywhere else. Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 59 +++++++++++++++++++++++++------------------------ drivers/usb/host/xhci.h | 41 ---------------------------------- 2 files changed, 30 insertions(+), 70 deletions(-) commit b7d09fe863561014085503986cb202f4111be347 Author: Lu Baolu Date: Fri Apr 7 17:57:03 2017 +0300 usb: xhci: remove xhci_dbg_ep_rings() xhci_dbg_ep_rings() isn't used in xhci driver anymore. Remove it to reduce the module binary size. Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-dbg.c | 24 ------------------------ drivers/usb/host/xhci.h | 3 --- 2 files changed, 27 deletions(-) commit b2d6edbb95487e90ffc22072879b0865ccb89a80 Author: Lu Baolu Date: Fri Apr 7 17:57:02 2017 +0300 usb: xhci: add xhci_log_ring trace events This patch creates a new event class called xhci_log_ring, and defines the events used for tracing the change of all kinds of rings used by an xhci host. An xHCI ring is basically a memory block shared between software and hardware. By tracing changes of rings, it makes the life easier for debugging hardware or software problems. This info can be used, later, to print, in a human readable way, the life cycle of an xHCI ring using the trace-cmd tool and the appropriate plugin. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 4 +++ drivers/usb/host/xhci-ring.c | 5 ++++ drivers/usb/host/xhci-trace.h | 65 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) commit d9f11ba9f107aa335091ab8d7ba5eea714e46e8b Author: Mathias Nyman Date: Fri Apr 7 17:57:01 2017 +0300 xhci: Rework how we handle unresponsive or hoptlug removed hosts Introduce a new xhci_hc_died() function that takes care of handling pending commands and URBs if a host controller becomes unresponsive. This addresses issues on hotpluggable xhci controllers that disappear from the bus suddenly, often while the bus (PCI) remove function is still being processed. xhci_hc_died() sets a XHCI_STATUS_DYING flag to prevent new URBs and commands or to be queued. The flag also ensures xhci_hc_died() will give back pending commands and URBs once. Host is considered dead if register read returns 0xffffffff, or host fails to abort the command ring, or fails stopping an endpoint after trying for 5 seconds. Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 12 +++-- drivers/usb/host/xhci-ring.c | 118 +++++++++++++++++++++---------------------- drivers/usb/host/xhci.c | 16 +++++- drivers/usb/host/xhci.h | 1 + 4 files changed, 80 insertions(+), 67 deletions(-) commit fe190ed0d60260e44f48d8b0b04f26a8c8898a02 Author: Joel Stanley Date: Fri Apr 7 17:57:00 2017 +0300 xhci: Do not halt the host until both HCD have disconnected their devices. We can't halt the host controller immediately when first HCD is removed as it will cause problems if we have devices attached to the second (primary) HCD, like a keyboard. We've been carrying this in our Linux-as-a-bootloader environment for a little while now. The machines all have the same TI TUSB73x0 part, and when we kexec the devices don't come back until a system power cycle. [minor adjustments, code comments and remove HALT check -Mathias] Signed-off-by: Joel Stanley Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit b7f769ae1b126086c5ec6686734924bac1dc0a9f Author: Zhengjun Xing Date: Fri Apr 7 17:56:59 2017 +0300 xhci: add slot and endpoint numbers to debug messages in handle_tx_event There's one annoyance in how xhci prints debug messages, we often get logs with messages but it's hard to say from which device and endpoint the message originates. Add slot_id, ep_index messages in handle_tx_event. Signed-off-by: Zhengjun Xing Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 80 ++++++++++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 25 deletions(-) commit 5d062aba0d399c57e2d793603d6e372adb09b4d7 Author: Felipe Balbi Date: Fri Apr 7 17:56:58 2017 +0300 usb: host: xhci: fix up Control Transfer TRB decoder Format for each TRB in each control transfer stage differs. Let's make sure we correctly pretty print these fields to avoid confusion. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.h | 59 +++++++++++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 22 deletions(-) commit 19a7d0d65c4a813069f4bc4ca701d6a163c337e9 Author: Felipe Balbi Date: Fri Apr 7 17:56:57 2017 +0300 usb: host: xhci: add Slot and EP Context tracers With these, we can track what's happening with the HW while executing each and every command. It will give us visibility into how the different contexts are being modified by xHC which can bring insight into problems while debugging. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 42 ++++++++++++ drivers/usb/host/xhci-trace.h | 101 +++++++++++++++++++++++++++++ drivers/usb/host/xhci.c | 15 ++++- drivers/usb/host/xhci.h | 146 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 302 insertions(+), 2 deletions(-) commit 52407729fbeabb654d38c0c99661a41a481092d1 Author: Felipe Balbi Date: Fri Apr 7 17:56:56 2017 +0300 usb: host: xhci: extract xhci_slot_state_string() By extracting and exposing xhci_slot_state_string() in a header file, we can re-use it to print Slot Context State from our tracepoints, which can aid in tracking down problems related to command execution. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-dbg.c | 14 ++------------ drivers/usb/host/xhci.h | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 12 deletions(-) commit eaa9eb71a277149a2241b24f27aa09258745b4dd Author: Felipe Balbi Date: Fri Apr 7 17:56:55 2017 +0300 usb: host: xhci: print device slot from URB tracers This will help us figuring out which device $this URB belongs to while debugging. Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-trace.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 0f1d832ed1fb9527a4cc5fcb8511e85fd0a85185 Author: Guoqing Zhang Date: Fri Apr 7 17:56:54 2017 +0300 usb: xhci: Add port test modes support for usb2. For usb2 ports, the port test mode Test_J_State, Test_K_State, Test_Packet, Test_SE0_NAK and Test_Force_En can be enabled as described in usb2 spec. USB2 test mode is a required hardware feature for system integrators validating their hardware according to USB spec, regarding signal strength and stuff. It is purely a hardware test feature. Usually you need an oscilloscope and have to enable those test modes on the hardware. This will send some specific test patterns on D+/D-. There is no report available (in Linux itself) as it is purely externally visible. Regular USB usage is not possible at that time. Anyone (well access to e.g. /dev/bus/usb/001/001 provided) can use it by sending appropriate USB_PORT_FEAT_TEST requests to the hub. [Add better commit message by Alexander Stein -Mathias] Signed-off-by: Guoqing Zhang Cc: Alexander Stein Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 85 +++++++++++++++++++++++++++++++++++++++++++++ drivers/usb/host/xhci.h | 2 ++ 2 files changed, 87 insertions(+) commit 26bba5c767de6724f330cdc2ad28bb783674f5a0 Author: Guoqing Zhang Date: Fri Apr 7 17:56:53 2017 +0300 usb: xhci: Expose xhci_start() function. Change the visability of xhci_start() so that it can be used when enabling test mode. Signed-off-by: Guoqing Zhang Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 2 +- drivers/usb/host/xhci.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit f9e609b82479ef48469d42b022b0951abc00dcd1 Author: Guoqing Zhang Date: Fri Apr 7 17:56:52 2017 +0300 usb: xhci: Add helper function xhci_disable_slot(). Refactoring slot disable related code into a helper function xhci_disable_slot() which can be used when enabling test mode. Signed-off-by: Guoqing Zhang Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 49 +++++++++++++++++++++++++++++++------------------ drivers/usb/host/xhci.h | 2 ++ 2 files changed, 33 insertions(+), 18 deletions(-) commit a6ff6cbf1fabe7500d8ac25e133e3346db0a0fca Author: Guoqing Zhang Date: Fri Apr 7 17:56:51 2017 +0300 usb: xhci: Add helper function xhci_set_power_on(). Refactoring port power on/off related code into a helper function xhci_set_power_on() which can be reused when enabling test mode. [set port state to neutral before writing port power -Mathias] Signed-off-by: Guoqing Zhang Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 66 ++++++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 21 deletions(-) commit d1001ab41064c7fe7bffbc1d7c3921912f3ec32d Author: Lu Baolu Date: Fri Apr 7 17:56:50 2017 +0300 usb: xhci: clear EINT bit in status correctly EINT(Event Interrupt) is a write-1-to-clear type of bit in xhci status register. It should be cleared by writing a 1. Writing 0 to this bit has no effect. Xhci driver tries to clear this bit by writing 0 to it. This is not the right way to go. This patch corrects this by reading the register first, then clearing all RO/RW1C/RsvZ bits and setting the clearing bit, and writing back the new value at last. Xhci spec requires that software that uses EINT shall clear it prior to clearing any IP flags in section 5.4.2. This is the reason why this patch is CC'ed stable as well. [old way didn't cause any issues, skip stable, send to next -Mathias] Cc: Felipe Balbi Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c70a1529b29cb1362ade5dd113313fb945e32c3e Author: Andrew Bresticker Date: Fri Apr 7 17:56:49 2017 +0300 usb: xhci: plat: Enable async suspend/resume USB host controllers can take a significant amount of time to suspend and resume, adding several hundred miliseconds to the kernel resume time. Since the XHCI controller has no outside dependencies (other than clocks, which are suspended late/resumed early), allow it to suspend and resume asynchronously. Signed-off-by: Andrew Bresticker Tested-by: Andrew Bresticker Tested-by: Robert Foss Signed-off-by: Robert Foss Reviewed-by: Baolin Wang Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 2 ++ 1 file changed, 2 insertions(+) commit 4eebed9a6447581fd2bb58f3cf5868d28b653670 Author: Yuyang Du Date: Thu Apr 6 06:03:22 2017 +0800 usb: usbip: Remove unnecessary get_vdev() vhci_tx_urb() should be able to get the vhci_device from its caller vhci_urb_enqueue(), instead of brutal-force searching it. Reviewed-by: Krzysztof Opasiak Signed-off-by: Yuyang Du Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci_hcd.c | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) commit 65c7843c942d0990e8b5f40aa4fdc755bbc15034 Author: Gustavo A. R. Silva Date: Mon Apr 3 22:51:54 2017 -0500 usb: misc: refactor code Code refactoring to make the flow easier to follow. Signed-off-by: Gustavo A. R. Silva Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usbtest.c | 49 ++++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 28 deletions(-) commit 2c930e3d0aed1505e86e0928d323df5027817740 Author: Gustavo A. R. Silva Date: Mon Apr 3 22:48:40 2017 -0500 usb: misc: add missing continue in switch Add missing continue in switch. Addresses-Coverity-ID: 1248733 Signed-off-by: Gustavo A. R. Silva Acked-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usbtest.c | 1 + 1 file changed, 1 insertion(+) commit bde654a55adca166641361332e1f141de5197b02 Author: Sekhar Nori Date: Mon Apr 3 13:56:52 2017 +0530 usb: hcd: use correct device pointer for dma ops commit a8c06e407ef9 ("usb: separate out sysdev pointer from usb_bus") converted to use hcd->self.sysdev for DMA operations instead of hcd->self.controller but forgot to do it for one instance. This gets caught when DMA debugging is enabled since dma map and unmap end up using different device pointers. Fix it. Fixes: a8c06e407ef9 ("usb: separate out sysdev pointer from usb_bus") Reported-by: Carlos Hernandez Acked-by: Roger Quadros Signed-off-by: Sekhar Nori Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f8b45b74cc6229d9f8780fd962dab84d810b6f17 Author: Alexander Duyck Date: Wed Apr 5 07:51:03 2017 -0400 i40e/i40evf: Use build_skb to build frames This patch is meant to improve the performance of the Rx path. Specifically by using build_skb we have several distinct advantages. In the case of small frames we were previously using a copy-break approach. This means that we were allocating a page fragment to use for skb->head, and were having to copy the packet into that region. Both of those calls are now avoided since we just build the skb around the data. In the case of large frames the gains are much more significant. Specifically we were having to allocate skb->head, and copy the headers as before. However in addition we were having to parse the header using eth_get_headlen which could be quite expensive. All of this is avoided by building the frame around the data. I have seen gains as high as 30% when using VXLAN for instance due to just header pulling overhead. Finally with all this in place it also sets us up to start looking at enabling XDP. Specifically we now have a path in which the data is in the page and the frame is built around it. So if we parse it with XDP before we call build_skb we can take care of any necessary processing there. Change-ID: Id4bdd618e94473d41f892417e5d8019639e421e3 Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 47 +++++++++++++++++++++++++++ drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 47 +++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) commit ca9ec0888d631c446040a7fab9985afdeb4f73f3 Author: Alexander Duyck Date: Wed Apr 5 07:51:02 2017 -0400 i40e/i40evf: Add support for padding start of frames This patch adds padding to the start of frames to make room for headroom for us to eventually start using build_skb. Right now we guarantee at least NET_SKB_PAD + NET_IP_ALIGN, however we allocate more space if more is available. For example on x86 the headroom should be 192 bytes. On systems that have too large of a cache line size to support storing 1.5K padding and shared info we default to using 3K buffers and reserve everything that isn't used for skb_shared_info or the data buffer for headroom. Change-ID: I33c641c9a1ea10cf7cc484c2d20985368d2d709a Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 9 +++- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 15 +++++- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 70 ++++++++++++++++++++++++- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 15 +++++- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 70 ++++++++++++++++++++++++- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 8 ++- 6 files changed, 179 insertions(+), 8 deletions(-) commit 98efd69493b9d4b02353a552af8ffaaf30de8af4 Author: Alexander Duyck Date: Wed Apr 5 07:51:01 2017 -0400 i40e/i40evf: Add support for using order 1 pages with a 3K buffer There are situations where adding padding to the front and back of an Rx buffer will require that we add additional padding. Specifically if NET_IP_ALIGN is non-zero, or the MTU size is larger than 7.5K we would need to use 2K buffers which leaves us with no room for the padding. To preemptively address these cases I am adding support for 3K buffers to the Rx path so that we can provide the additional padding needed in the event of NET_IP_ALIGN being non-zero or a cache line being greater than 64. Change-ID: I938bc1ba611285428df39a613cd66f98e60b55c7 Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 3 ++- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 27 +++++++++++++------------ drivers/net/ethernet/intel/i40e/i40e_txrx.h | 12 +++++++++++ drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 27 +++++++++++++------------ drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 12 +++++++++++ drivers/net/ethernet/intel/i40evf/i40evf_main.c | 6 ++++++ 6 files changed, 60 insertions(+), 27 deletions(-) commit 33512191fee4bb8a154a389ee6087272e8fd898d Author: Jacob Keller Date: Wed Apr 5 07:51:00 2017 -0400 i40e: clean up historic deprecated flag definitions Since an early commit a few flags have no longer been used. Remove these definitions to reduce code clutter. Change-ID: I3589be4622574e747013cd4dc403e18b039f4965 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 3 --- 1 file changed, 3 deletions(-) commit 78786d4a59a12e8d9a0b38ad300f7ebe2aeca8a2 Author: Alice Michael Date: Fri Apr 7 23:01:35 2017 -0700 i40e: remove I40E_FLAG_NEED_LINK_UPDATE The I40E_FLAG_NEED_LINK_UPDATE was never used. Remove the flag definitions. Change-ID: If59d0c6b4af85ca27281f3183c54b055adb439a4 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 1 - drivers/net/ethernet/intel/i40e/i40e_main.c | 1 - drivers/net/ethernet/intel/i40evf/i40evf.h | 1 - 3 files changed, 3 deletions(-) commit af26ce2dfbf269a9608008b33a7ff978e2a7b9a9 Author: Jacob Keller Date: Wed Apr 5 07:50:58 2017 -0400 i40e: remove extraneous loop in i40e_vsi_wait_queues_disabled We can simply check both Tx and Rx queues in a single loop, rather than repeating the loop twice. Change-ID: Ic06f26b0e3c2620e0e33c1a2999edda488e647ad Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 41c4c2b50d52346bdc994bd0e0c92f07bb1bb1f8 Author: Jacob Keller Date: Wed Apr 5 07:50:57 2017 -0400 i40e: allow look-up of MAC address from Open Firmware or IDPROM Look up the MAC address from the eth_get_platform_mac_address() function first before checking what the firmware provides. We already handle the case of re-writing the MAC-VLAN filter, so there is no need to add extra code for this. However, update the comment where we do this to indicate that it does impact the Open Firmware MAC address case. Change-ID: I73e59fbe0b0e7e6f3ee9f5170d0bd3a4d5faf4db Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) commit 17daabb5e8db2b7de742f59dd73aa12550143e0d Author: Alan Brady Date: Wed Apr 5 07:50:56 2017 -0400 i40e: Simplify i40e_detect_recover_hung_queue logic This patch greatly reduces the unneeded complexity in the i40e_detect_recover_hung_queue code path. The previous implementation set a 'hung bit' which would then get cleared while polling. If the detection routine was called a second time with the bit already set, we would issue a software interrupt. This patch makes it such that if interrupts are disabled and we have pending TX descriptors, we trigger a software interrupt since in, the worst case, queues are already clean and we have an extra interrupt. Additionally this patch removes the workaround for lost interrupts as calling napi_reschedule in this context can cause software interrupts to fire on the wrong CPU. Change-ID: Iae108582a3ceb6229ed1d22e4ed6e69cf97aad8d Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 4 -- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 1 - drivers/net/ethernet/intel/i40e/i40e_main.c | 59 +++++--------------------- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 12 ++---- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 3 +- 5 files changed, 15 insertions(+), 64 deletions(-) commit 373149fc99a077700339e18839484a852e7b0971 Author: Maciej Sosin Date: Wed Apr 5 07:50:55 2017 -0400 i40e: Decrease the scope of rtnl lock Previously rtnl lock was held during whole reset procedure that was stopping other PFs running their reset procedures. In the result reset was not handled properly and host reset was the only way to recover. Change-ID: I23c0771c0303caaa7bd64badbf0c667e25142954 Signed-off-by: Maciej Sosin Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 2 +- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 6 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 138 +++++++++++++++++-------- 3 files changed, 101 insertions(+), 45 deletions(-) commit e8c5f7231cc03153fee1b5fcb173585354c08ee8 Author: Alexander Duyck Date: Wed Apr 5 07:50:54 2017 -0400 i40e: Swap use of pf->flags and pf->hw_disabled_flags for ATR Eviction This is a minor cleanup so that we are always updating pf->flags when we make a change to the private flags instead of updating a mix of either pf->flags and/or pf->hw_disabled_flags. In addition I went through and cleaned out all the spots where we were using the X722 define in regards to this flag. Lastly since we changed the logic I went through and flushed out any redundancy and cleaned up the handling of the flags in the Tx path. Change-ID: I79ff95a7272bb2533251ff11ef91e89ccb80b610 Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a346fb836c712b43fc7bd925534eb8c23b3b61f0 Author: Jacob Keller Date: Wed Apr 5 07:50:53 2017 -0400 i40e: update error message when trying to add invalid filters Re-word the error message displayed when adding a filter with an invalid flow type. Additionally, report a distinct error message when the IPv4 protocol is at fault. Change-ID: Iba3d85b87f8d383c97c8bdd180df34a6adf3ee67 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 004eb614c4d2fcc12a98714fd887a860582f203a Author: Mitch Williams Date: Tue Apr 4 12:40:16 2017 -0700 i40e: only register client on iWarp-capable devices The client interface is only intended for use on devices that support iWarp. Only register with the client if this is the case. This fixes a panic when loading i40iw on X710 devices. Signed-off-by: Mitch Williams Reported-by: Stefan Assmann Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 86d67897f937000dd13ca9e81e3130adecdf45a0 Author: Wei Xu Date: Tue Mar 28 23:40:40 2017 +0800 arm64: dts: hisi: add SAS nodes for the hip07 SoC Add 3 SAS host controller nodes and the dependent subctrl node to enable the SAS and SATA function for the hip07 SoC. Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hip07.dtsi | 129 +++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) commit 0f57c6c9cda8e593d6cbdd0fc93ea51084024f2d Author: Wei Xu Date: Tue Mar 28 23:33:25 2017 +0800 arm64: dts: hisi: add RoCE nodes for the hip07 SoC Add the infiniband node to support the RoCE function on the hip07 SoC. Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hip07.dtsi | 81 ++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit 38de5b56ef6db87b9ed5a9d7eb798640554af980 Author: Wei Xu Date: Tue Mar 28 23:21:09 2017 +0800 arm64: dts: hisi: add network related nodes for the hip07 SoC Add MDIO, SerDes, Port and realted HNS nodes to support the network on the hip07 SoC. Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hip07.dtsi | 208 +++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) commit bbeca45f4184b110d60b545c651b188cd41218fc Author: Wei Xu Date: Tue Mar 28 23:10:13 2017 +0800 arm64: dts: hisi: add mbigen nodes for the hip07 SoC Add mbigen nodes for the hip07 SoC those will be used for the SAS, XGE and PCIe host controllers. Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hip07.dtsi | 61 ++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit b678c91aefa7ce05a5d195e0a5c7a357b62d3283 Author: Thomas Gleixner Date: Sat Apr 8 00:00:53 2017 +0200 Revert "x86/mm/numa: Remove numa_nodemask_from_meminfo()" This reverts commit 474aeffd88b87746a75583f356183d5c6caa4213 due to testing failures. Reported-by: "Kirill A. Shutemov" Signed-off-by: Thomas Gleixner Cc: Wei Yang Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20170406124459.dwn5zhpr2xqg3lqm@node.shutemov.name arch/x86/mm/numa.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 3a9024f52c2e92a143195db43d2abbd5d0792c06 Author: Thanneeru Srinivasulu Date: Thu Apr 6 16:12:26 2017 +0530 net: thunderx: Enable TSO and checksum offloads for ipv6 Adding support for TSO and checksum hardware offloads for ipv6. Signed-off-by: Thanneeru Srinivasulu Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_main.c | 8 +++++--- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 10 +++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) commit c339c1c2824bd82f8fa29412466f12f2d1527d6b Merge: bbadb9a b8f126a Author: David S. Miller Date: Fri Apr 7 13:52:23 2017 -0700 Merge branch 'dsa-mediatek-MT7530' Sean Wang says: ==================== net-next: dsa: add Mediatek MT7530 support MT7530 is a 7-ports Gigabit Ethernet Switch that could be found on Mediatek router platforms such as MT7623A or MT7623N which includes 7-port Gigabit Ethernet MAC and 5-port Gigabit Ethernet PHY. Among these ports, The port from 0 to 4 are the user ports connecting with the remote devices while the port 5 and 6 are the CPU ports connecting into Mediatek Ethernet GMAC. The patch series integrated Mediatek MT7530 into DSA support which includes the most of the essential callbacks such as tag insertion for port distinguishing, port control, bridge offloading, STP setup and ethtool operations to allow DSA to model each user port into independently standalone netdevice as the other DSA driver had done. Changes since v1: - rebased into 4.11-rc1 - refined binding document including below five items - changed the type of mediatek,mcm into bool - used reset controller binding for MCM reset and removed "mediatek,ethsys" property from binding - reused CPU port's ethernet Phandle instead of creating new one and removed "mediatek,ethernet" property from binding - aligned naming for GPIO reset with dsa/marvell.txt - added phy-mode as required property child nodes within ports container - handled gpio reset with devm_gpiod_* API - refined comment words - removed condition for CDM setting since the setup looks both fine for all cases - allowed of_find_net_device_by_node() working with pointing the device node into real netdev instance - fixed Kbuild warnings Changes since v2: - reuse readx_poll_timeout() to poll - add proper macro instead of hard coding - treat inconsistent cpu port as warning - remove the usage for regmap-debugfs - show error message when invalid id is found - put the logic for the setup of trgmii into adjut_link() - refine and reuse logic between port_[disable,enable], and default port setup - correct typo Changes since v3: - used struct as the parameter for readx_poll_timeout() and kill extra lpriv defined - moved around function to get out of an additional declaration - fixed kbuild errors caused by missing proper include in the latest tree ==================== Signed-off-by: David S. Miller commit b8f126a8d54318b82703783e76d28fd7c1ae6bed Author: Sean Wang Date: Fri Apr 7 16:45:09 2017 +0800 net-next: dsa: add dsa support for Mediatek MT7530 switch MT7530 is a 7-ports Gigabit Ethernet Switch that could be found on Mediatek router platforms such as MT7623A or MT7623N platform which includes 7-port Gigabit Ethernet MAC and 5-port Gigabit Ethernet PHY. Among these ports, The port from 0 to 4 are the user ports connecting with the remote devices while the port 5 and 6 are the CPU ports connecting into Mediatek Ethernet GMAC. For port 6, it can communicate with the CPU via Mediatek Ethernet GMAC through either the TRGMII or RGMII which could be controlled by phy-mode in the dt-bindings to specify which mode is preferred to use. And for port 5, only RGMII can be specified. However, currently, only port 6 is being supported in this DSA driver. The driver is made with the reference to qca8k and other existing DSA driver. The most of the essential callbacks of the DSA are already support in the driver, including tag insert for user port distinguishing, port control, bridge offloading, STP setup and ethtool operation to allow DSA to model each user port into a standalone netdevice as the other DSA driver had done. Signed-off-by: Sean Wang Signed-off-by: Landen Chao Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/Kconfig | 8 + drivers/net/dsa/Makefile | 1 + drivers/net/dsa/mt7530.c | 1125 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/mt7530.h | 402 +++++++++++++++++ 4 files changed, 1536 insertions(+) commit 3174b3b58cba69e5a5b806206cd37f7a8e05153e Author: Sean Wang Date: Fri Apr 7 16:45:08 2017 +0800 net-next: ethernet: mediatek: add device_node of GMAC pointing into the netdev instance the patch adds the setup of the corresponding device node of GMAC into the netdev instance which could allow other modules such as DSA to find the instance through the node in dt-bindings using of_find_net_device_by_node() call. Signed-off-by: Sean Wang Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++ 1 file changed, 2 insertions(+) commit 87e3df4961f45888c48a0eecfbb532626c148d1e Author: Sean Wang Date: Fri Apr 7 16:45:07 2017 +0800 net-next: ethernet: mediatek: add CDM able to recognize the tag for DSA The patch adds the setup for allowing CDM can recognize these packets with carrying port-distinguishing tag. Otherwise, these tagging packets will be handled incorrectly by CDM. The setup is also working out for general untag packets as well. Signed-off-by: Sean Wang Signed-off-by: Landen Chao Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 6 ++++++ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 ++++ 2 files changed, 10 insertions(+) commit 5cd8985a19090f2b0ce8700ae3ec19e06a4fc5e9 Author: Sean Wang Date: Fri Apr 7 16:45:06 2017 +0800 net-next: dsa: add Mediatek tag RX/TX handler Add the support for the 4-bytes tag for DSA port distinguishing inserted allowing receiving and transmitting the packet via the particular port. The tag is being added after the source MAC address in the ethernet header. Signed-off-by: Sean Wang Signed-off-by: Landen Chao Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 1 + net/dsa/Kconfig | 2 + net/dsa/Makefile | 1 + net/dsa/dsa.c | 3 ++ net/dsa/dsa_priv.h | 3 ++ net/dsa/tag_mtk.c | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 128 insertions(+) commit c898693a5a79c518255be91049be1e54dfab9f1f Author: Sean Wang Date: Fri Apr 7 16:45:05 2017 +0800 dt-bindings: net: dsa: add Mediatek MT7530 binding Add device-tree binding for Mediatek MT7530 switch. Cc: devicetree@vger.kernel.org Signed-off-by: Sean Wang Acked-by: Rob Herring Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller .../devicetree/bindings/net/dsa/mt7530.txt | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) commit 2f513bd9eac1a2642b40387d4f89c3987641e59b Author: Andy Yan Date: Fri Apr 7 16:19:29 2017 +0800 arm64: dts: rockchip: fix the memory size of PX5 Evaluation board Commit 122682b2abb6 ("arm64: dts: rockchip: Add PX5 Evaluation board") sets the memory size to 2 GB, but this board only has 1 GB DRAM, so change it to the correct value here. Fixes: 122682b2abb6 ("arm64: dts: rockchip: Add PX5 Evaluation board") Signed-off-by: Andy Yan Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 591c59d18f72c98ad7a992809c3a9a1789687845 Author: Scott Bauer Date: Fri Apr 7 13:58:50 2017 -0600 block: sed-opal: Tone down all the pr_* to debugs Lets not flood the kernel log with messages unless the user requests so. Signed-off-by: Scott Bauer Signed-off-by: Jens Axboe block/sed-opal.c | 153 +++++++++++++++++++++++++++---------------------------- 1 file changed, 74 insertions(+), 79 deletions(-) commit c98cdff94a6a7877923dec1329c2b76d6247d076 Author: Sean Paul Date: Fri Apr 7 16:15:30 2017 -0400 Revert "drm: Don't allow interruptions when opening debugfs/crc" This reverts commit b8dfa821c27046ede9bf8eb14cc8109d379428e9 Author: Chris Wilson Date: Fri Apr 7 12:17:12 2017 +0100 drm: Don't allow interruptions when opening debugfs/crc It reportedly breaks things, so let's revert now and try again later. Fixes: b8dfa821c270 ("drm: Don't allow interruptions when opening debugfs/crc") Cc: Chris Wilson Cc: Tomeu Vizoso Cc: Daniel Vetter Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Reported-by: Chris Wilson Acked-by: Chris Wilson Acked-by: Daniel Vetter Signed-off-by: Sean Paul drivers/gpu/drm/drm_debugfs_crc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 32df87dff04833bbf53f1750f6c6048192ed29bf Author: Chunming Zhou Date: Fri Apr 7 17:05:45 2017 +0800 drm/amdgpu: fix fence memory leak in wait_all_fence V2 V2: remove **array method, directly fence_put after fence wait. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 1 + 1 file changed, 1 insertion(+) commit ecdba5db88f661c8b548a6ba15db26463b465996 Author: Christian König Date: Fri Apr 7 10:40:04 2017 +0200 drm/amdgpu: fix "fix 64bit division" The offset must be 64bit and add back the accidential dropped line. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 + 1 file changed, 1 insertion(+) commit 8250880ed87f806cc1f7964cd8ddda18d9014288 Author: Rex Zhu Date: Thu Mar 30 17:58:05 2017 +0800 drm/amd/powerplay: add fan controller table v11 support. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/vega10_pptable.h | 23 ++++ .../amd/powerplay/hwmgr/vega10_processpptables.c | 142 ++++++++++++++------- 2 files changed, 120 insertions(+), 45 deletions(-) commit 1e1eb6a893af737e9e725ae52e7ce4f5410557b6 Author: Rex Zhu Date: Tue Mar 28 11:13:54 2017 +0800 drm/amd/powerplay: port newest process pptable code for vega10. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/vega10_pptable.h | 27 +++ .../amd/powerplay/hwmgr/vega10_processpptables.c | 182 +++++++++++++++------ .../amd/powerplay/hwmgr/vega10_processpptables.h | 28 ++++ 3 files changed, 187 insertions(+), 50 deletions(-) commit bab4fee703ae5bfccb9ba2d1d92294f9db0887c7 Author: Junwei Zhang Date: Wed Apr 5 13:54:56 2017 +0800 drm/amdgpu: set vm size and block size by individual gmc by default (v3) By default, the value is set by individual gmc. if a specific value is input, it overrides the global value for all v2: create helper funcs v3: update gmc9 APU's num_level athough it may be updated in the future. Signed-off-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 31 ++++++++++-------------- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 38 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 6 +---- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 6 +---- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 6 +---- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 16 ++++++++----- 8 files changed, 66 insertions(+), 40 deletions(-) commit 710c785f80ace49049aef1a003c0b8b932a58af8 Author: Bart Van Assche Date: Fri Apr 7 11:16:51 2017 -0700 blk-mq: Clarify comments in blk_mq_dispatch_rq_list() The blk_mq_dispatch_rq_list() implementation got modified several times but the comments in that function were not updated every time. Since it is nontrivial what is going on, update the comments in blk_mq_dispatch_rq_list(). Signed-off-by: Bart Van Assche Cc: Omar Sandoval Cc: Christoph Hellwig Cc: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit 705cda97ee3abb6ea38d651b54f4da83c2bb2a4a Author: Bart Van Assche Date: Fri Apr 7 11:16:49 2017 -0700 blk-mq: Make it safe to use RCU to iterate over blk_mq_tag_set.tag_list Since the next patch in this series will use RCU to iterate over tag_list, make this safe. Add lockdep_assert_held() statements in functions that iterate over tag_list to make clear that using list_for_each_entry() instead of list_for_each_entry_rcu() is fine in these functions. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-mq.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit d945a365a0686a37618503622954f8dc169b8bca Author: Omar Sandoval Date: Wed Apr 5 12:01:36 2017 -0700 blk-mq: use true instead of 1 for blk_mq_queue_data.last Trivial cleanup. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 807b10417b23f1e1a35fccc7ede2c3886d39c303 Author: Omar Sandoval Date: Wed Apr 5 12:01:35 2017 -0700 blk-mq: make driver tag failure path easier to follow Minor cleanup that makes it easier to figure out what's going on in the driver tag allocation failure path of blk_mq_dispatch_rq_list(). Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit ee056f98126170ca8b16b9a4a6e20aae7c5c184e Author: Omar Sandoval Date: Wed Apr 5 12:01:34 2017 -0700 blk-mq-sched: provide hooks for initializing hardware queue data Schedulers need to be informed when a hardware queue is added or removed at runtime so they can allocate/free per-hardware queue data. So, replace the blk_mq_sched_init_hctx_data() helper, which only makes sense at init time, with .init_hctx() and .exit_hctx() hooks. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-sched.c | 81 +++++++++++++++++++++++++----------------------- block/blk-mq-sched.h | 4 --- include/linux/elevator.h | 2 ++ 3 files changed, 45 insertions(+), 42 deletions(-) commit 65f619d2535197d97067eeeef75a40f25b552e69 Merge: fbbaf70 6d8c6c0 Author: Jens Axboe Date: Fri Apr 7 12:45:20 2017 -0600 Merge branch 'for-linus' into for-4.12/block We've added a considerable amount of fixes for stalls and issues with the blk-mq scheduling in the 4.11 series since forking off the for-4.12/block branch. We need to do improvements on top of that for 4.12, so pull in the previous fixes to make our lives easier going forward. Signed-off-by: Jens Axboe commit fcb87087261e1be51b4c03677f39246bdc312b1c Author: Geert Uytterhoeven Date: Fri Mar 31 11:01:56 2017 +0200 soc: renesas: rcar-sysc: Add support for R-Car H3 ES2.0 Power area A2VC0 was removed in revision ES2.0, cfr. R-Car Gen3 Hardware User's Manual rev. 0.53E. Hence remove it from the power area table when not running on ES1.x. This is in line with the goal to: 1. Support both the ES1.x and ES2.0 SoC revisions in a single binary for now, 2. Make it clear which code supports ES1.x, so it can easily be identified and removed later, when production SoCs are deemed ubiquitous. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman drivers/soc/renesas/r8a7795-sysc.c | 26 ++++++++++++++++++++++++-- include/dt-bindings/power/r8a7795-sysc.h | 2 +- 2 files changed, 25 insertions(+), 3 deletions(-) commit afa6f53df6052968ce3934ad324777c0057e31d1 Author: Geert Uytterhoeven Date: Fri Mar 31 11:01:55 2017 +0200 soc: renesas: rcar-sysc: Add support for fixing up power area tables The same SoC may have different power areas, depending on SoC revision. One option is to use different sets of power area tables for each SoC revision. However, if the differences are small, it is much more space-efficient to have a single set of tables, and fix those up at runtime instead. Hence provide a helper to NULLify power areas that do not exist on some revisions (NULLified power areas are skipped during the registration phase), and support for an optional initialization callback to e.g. fix up power area tables. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman drivers/soc/renesas/rcar-sysc.c | 25 ++++++++++++++++++++++++- drivers/soc/renesas/rcar-sysc.h | 10 ++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) commit b1d134ba9de2b7a136406530e34fc8b110ba6efd Author: Geert Uytterhoeven Date: Fri Mar 31 11:01:54 2017 +0200 soc: renesas: Register SoC device early The r8a7795 SYSC driver manages PM Domains, and thus is initialized from an early_initcall(). However, this means the driver cannot check the SoC revision, as the SoC device hasn't been registered yet. Change renesas_soc_init() from a core_initcall() to an early_initcall() to fix this (renesas-soc.o is listed before rcar-sysc.o in the Makefile). Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman drivers/soc/renesas/renesas-soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e0641631f233b5af09f0bfeaa6220d10cad75e7 Author: Daniel Vetter Date: Fri Apr 7 18:48:17 2017 +0200 drm: Only take cursor locks when the cursor plane exists I thought I've fixed this, but maybe not. Anyway, clearly broken, and easy fix. Cc: Tony Lindgren Reported-by: Tony Lindgren Fixes: b95ff0319a82 ("drm: Remove drm_modeset_(un)lock_crtc") Cc: Harry Wentland Cc: Maarten Lankhorst Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Signed-off-by: Daniel Vetter Tested-by: Tony Lindgren Reviewed-by: Daniel Stone Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170407164817.28272-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_plane.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3bacf4361cd07f988a13de78d672928606df24ad Author: Daniel Vetter Date: Thu Apr 6 22:02:56 2017 +0200 drm/vmwgfx: Fix fbdev emulation using legacy functions I've broken this by removing the backoff handling from the set_config2atomic helper in commit 38b6441e4e75c0b319cfe4d9364c1059fc1e3c2b Author: Daniel Vetter Date: Wed Mar 22 22:50:58 2017 +0100 drm/atomic-helper: Remove the backoff hack from set_config Fixing this properly would mean we get to wire the acquire_ctx all the way through vmwgfx fbdev code, and doing the same was tricky for the shared fbdev layer. Probably much better to look into refactoring the entire code to use the helpers, but since that's not a viable long-term solution fix the issue by open-coding a vmwgfx version of set_config, that does the legacy backoff dance internally. Note: Just compile-tested. The idea is to take drm_mode_set_config_internal(), remove the "is this a legacy driver" check, and whack the drm_atomic_legacy_backoff trickery at the end. Since drm_atomic_legacy_backoff is for atomic commits only we need to open-code it. Cc: Thomas Hellstrom Signed-off-by: Daniel Vetter Reviewed-by: Thomas Hellstrom Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170406200256.26040-1-daniel.vetter@ffwll.ch drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 58 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) commit c1bb81888746b6fff8c3b0abfecc751ab73b3a08 Author: Jeffy Chen Date: Thu Apr 6 20:31:24 2017 +0800 drm/rockchip: Shutdown all crtcs when unbinding drm Signed-off-by: Jeffy Chen Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-12-git-send-email-jeffy.chen@rock-chips.com drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 + 1 file changed, 1 insertion(+) commit ccea91998c8f140bc3e324bbb3c3fb7148e72d31 Author: Jeffy Chen Date: Thu Apr 6 20:31:23 2017 +0800 drm/rockchip: Reorder drm bind/unbind sequence Current drm bind/unbind sequence would cause some memory issues. For example we should not cleanup iommu before cleanup mode config. Reorder bind/unbind sequence, follow exynos drm. Signed-off-by: Jeffy Chen [seanpaul fixed spelling typo in commit subject] Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-11-git-send-email-jeffy.chen@rock-chips.com drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 49 +++++++++++++++-------------- 1 file changed, 26 insertions(+), 23 deletions(-) commit b7ac7b5b6bb46ed0afbcf94b0834d60e557da779 Author: Jeffy Chen Date: Thu Apr 6 20:31:22 2017 +0800 drm/rockchip: analogix_dp: Disable clock when unbinding The clock is enabled when binding cdn dp. Signed-off-by: Jeffy Chen Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-10-git-send-email-jeffy.chen@rock-chips.com drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ec6e7767c925d8c490517315cba75216d9e8620e Author: Jeffy Chen Date: Thu Apr 6 20:31:21 2017 +0800 drm/rockchip: vop: Unprepare clocks when unbinding The clocks are prepared when binding vop. Signed-off-by: Jeffy Chen Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-9-git-send-email-jeffy.chen@rock-chips.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5e570373c015b60a68828b1cd9d475cb33d3be4b Author: Jeffy Chen Date: Thu Apr 6 20:31:20 2017 +0800 drm/rockchip: vop: Enable pm domain before vop_initial We're trying to access vop registers here, so need to make sure the pm domain is on. Normally it should be enabled by the bootloader, but there's no guarantee of it. And if we wanna do unbind/bind, it would also cause the device to hang. And this patch also does these: 1/ move vop_initial to the end of vop_bind for eaiser error handling. 2/ correct the err_put_pm_runtime of vop_enable. Signed-off-by: Jeffy Chen Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-8-git-send-email-jeffy.chen@rock-chips.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit 88582f5646927348d31424fa8bdb0f2d97a046c0 Author: Jeffy Chen Date: Thu Apr 6 20:31:19 2017 +0800 drm/rockchip: cdn-dp: Don't unregister audio dev when unbinding After snd_soc_unregister_codec, the dai link would remain bound to the invalid codec. That would cause crashes after unbind dp driver. Let's unregister audio codec when removing dp driver to prevent that. Signed-off-by: Jeffy Chen Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-7-git-send-email-jeffy.chen@rock-chips.com drivers/gpu/drm/rockchip/cdn-dp-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 54bd16780e2b7bcbe7096baab94e2454686f0941 Author: Jeffy Chen Date: Thu Apr 6 20:31:18 2017 +0800 drm/rockchip: cdn-dp: Don't try to release firmware when not loaded Signed-off-by: Jeffy Chen Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-6-git-send-email-jeffy.chen@rock-chips.com drivers/gpu/drm/rockchip/cdn-dp-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 37e0487788468cc0dfef678f4d10339c28ad80e5 Author: Jeffy Chen Date: Thu Apr 6 20:31:17 2017 +0800 drm: bridge: analogix: Destroy connector & encoder when unbinding Normally we do this in drm_mode_config_cleanup. But: 1/ analogix dp's connector is allocated in bind, and freed after unbind. So we need to destroy it in unbind to avoid further access. 2/ the drm bridge is attached in bind, and detached in encoder cleanup. So we need to destroy encoder in unbind. Signed-off-by: Jeffy Chen Reviewed-by: Andrzej Hajda Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-5-git-send-email-jeffy.chen@rock-chips.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 ++ 1 file changed, 2 insertions(+) commit ede2fdf6776ac0b1be0729d3ef9a553262a259d9 Author: Jeffy Chen Date: Thu Apr 6 20:31:16 2017 +0800 drm: bridge: analogix: Disable clock when unbinding The clock is enabled when binding analogix dp. Signed-off-by: Jeffy Chen Reviewed-by: Andrzej Hajda Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-4-git-send-email-jeffy.chen@rock-chips.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 + 1 file changed, 1 insertion(+) commit 7b017a5816935b850754c0da5be21d05c35a19b7 Author: Jeffy Chen Date: Thu Apr 6 20:31:15 2017 +0800 drm: bridge: analogix: Unregister dp aux when unbinding The dp aux is registered when binding analogix dp. Signed-off-by: Jeffy Chen Reviewed-by: Andrzej Hajda Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-3-git-send-email-jeffy.chen@rock-chips.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 + 1 file changed, 1 insertion(+) commit 18aea7db8446f9b3c83228ff6772086ad8d0a023 Author: Jeffy Chen Date: Thu Apr 6 20:31:14 2017 +0800 drm: bridge: analogix: Detach panel when unbinding analogix dp The panel is attached when binding analogix dp. Signed-off-by: Jeffy Chen Reviewed-by: Andrzej Hajda Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-2-git-send-email-jeffy.chen@rock-chips.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 ++ 1 file changed, 2 insertions(+) commit 7ecaff7733b50da8e02d22be6719069892633c53 Author: Joel Stanley Date: Thu Mar 23 00:31:12 2017 +1030 ipmi: bt-bmc: Add ast2500 compatible string The ast2500 SoCs contain the same IPMI BT device. Signed-off-by: Joel Stanley Reviewed-by: Cédric Le Goater Acked-by: Rob Herring Signed-off-by: Corey Minyard Documentation/devicetree/bindings/ipmi/aspeed,ast2400-ibt-bmc.txt | 4 +++- drivers/char/ipmi/bt-bmc.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit f513561455c31ffc4b1ba32a96b18fa72056cf1a Author: Sinan Kaya Date: Thu Mar 23 11:32:29 2017 -0400 ACPI / IPMI: change warning to debug on timeout Getting timeout message from BMC when trying to read from a non-existent FRU. This is expected but warning is not. Let's reduce the warning to debug. Signed-off-by: Sinan Kaya Acked-by: Rafael J. Wysocki Signed-off-by: Corey Minyard drivers/acpi/acpi_ipmi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 50121beba5c3c23f615cdd283f648cd7cd732ecb Author: Sinan Kaya Date: Sat Mar 25 10:02:54 2017 -0400 ACPI / IPMI: allow ACPI_IPMI with IPMI_SSIF ACPI_IPMI driver currently depends on IPMI System Interface (IPMI_SI) driver to be enabled. IPMI_SI driver only handles KCS, SMIC and BT BMC interfaces. IPMI_SSIF is an alternative BMC communication method. It allows BMC to be accessed over an I2C bus instead of a standard interface. Change the dependency to IPMI_HANDLER so that ACPI_IPMI works with all IPMI providers. Signed-off-by: Sinan Kaya Signed-off-by: Corey Minyard Acked-by: Rafael J. Wysocki drivers/acpi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36cb82dabb09b29cce5850ee701bedaf5c1aa89d Author: Geliang Tang Date: Fri Mar 24 22:15:12 2017 +0800 ipmi_ssif: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_ssif.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6de65fcfdb51835789b245203d1bfc8d14cb1e06 Author: Joeseph Chang Date: Mon Mar 27 20:22:09 2017 -0600 ipmi: Fix kernel panic at ipmi_ssif_thread() msg_written_handler() may set ssif_info->multi_data to NULL when using ipmitool to write fru. Before setting ssif_info->multi_data to NULL, add new local pointer "data_to_send" and store correct i2c data pointer to it to fix NULL pointer kernel panic and incorrect ssif_info->multi_pos. Signed-off-by: Joeseph Chang Signed-off-by: Corey Minyard Cc: stable@vger.kernel.org # 3.19- drivers/char/ipmi/ipmi_ssif.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1017f424015933a12e5068dc7f59ddf6b8645218 Author: Bastian Stender Date: Fri Apr 7 15:52:33 2017 +0200 spi: orion: add LSB support The orion spi driver currently only supports the normal (i.e. MSB) mode. This patch adds LSB first mode. Also correct the comment about supported SPI modes that was left over by b15d5d7004e2 ("spi/orion: Add SPI_CHPA and SPI_CPOL support to kirkwood driver."). Signed-off-by: Bastian Stender Acked-by: Uwe Kleine-König Signed-off-by: Mark Brown drivers/spi/spi-orion.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit b8dfa821c27046ede9bf8eb14cc8109d379428e9 Author: Chris Wilson Date: Fri Apr 7 12:17:12 2017 +0100 drm: Don't allow interruptions when opening debugfs/crc The code does not like to be interrupted when waiting for the first vblank after opening a debugfs/crc channel, so don't. [66285.716870] WARNING: CPU: 1 PID: 16615 at drivers/gpu/drm/drm_debugfs_crc.c:185 crtc_crc_open+0x1d0/0x1f0 [drm] [66285.716877] Modules linked in: i915 intel_powerclamp crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel cryptd intel_gtt i2c_algo_bit lpc_ich mfd_core drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops prime_numbers drm video button autofs4 sd_mod ahci libahci libata i2c_i801 scsi_mod i2c_designware_platform i2c_designware_core i2c_core [66285.716929] CPU: 1 PID: 16615 Comm: kms_frontbuffer Not tainted 4.11.0-rc5+ #7 [66285.716935] Hardware name: GIGABYTE GB-BXBT-1900/MZBAYAB-00, BIOS F8 03/02/2016 [66285.716941] Call Trace: [66285.716955] dump_stack+0x4d/0x6f [66285.716966] __warn+0xc1/0xe0 [66285.716975] warn_slowpath_null+0x18/0x20 [66285.717004] crtc_crc_open+0x1d0/0x1f0 [drm] [66285.717014] ? wake_atomic_t_function+0x50/0x50 [66285.717024] full_proxy_open+0xf0/0x1b0 [66285.717032] ? full_proxy_release+0x80/0x80 [66285.717042] do_dentry_open.isra.17+0x14b/0x2d0 [66285.717051] vfs_open+0x42/0x60 [66285.717064] path_openat+0x5e7/0x13d0 [66285.717074] ? refcount_dec_and_test+0x11/0x20 [66285.717081] ? down_read+0xd/0x30 [66285.717087] do_filp_open+0x85/0xf0 [66285.717093] ? __vfs_write+0x23/0x120 [66285.717100] ? __alloc_fd+0x3a/0x170 [66285.717107] do_sys_open+0x11e/0x1f0 [66285.717113] ? do_sys_open+0x11e/0x1f0 [66285.717119] SyS_openat+0xf/0x20 [66285.717125] entry_SYSCALL_64_fastpath+0x17/0x98 [66285.717131] RIP: 0033:0x7f5f2235146a [66285.717135] RSP: 002b:00007ffd892e6bc0 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 [66285.717142] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5f2235146a [66285.717147] RDX: 0000000000000000 RSI: 00007ffd892e6c40 RDI: 0000000000000006 [66285.717151] RBP: 00007ffd892e6b20 R08: 0000000000000000 R09: 000000000000000f [66285.717156] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [66285.717161] R13: 00007ffd892e6b10 R14: 0000000000000004 R15: 00000000007e61f4 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100610 Fixes: e8fa5671183c ("drm: crc: Wait for a frame before returning from open()") Signed-off-by: Chris Wilson Cc: Tomeu Vizoso Cc: Daniel Vetter Reviewed-by: Tomeu Vizoso Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170407111712.13962-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_debugfs_crc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit d4ef38354120d873f5db14ca6e13d051ef4ab068 Author: Arushi Singhal Date: Sun Apr 2 14:52:12 2017 +0530 netfilter: Remove exceptional & on function name Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: Arushi Singhal Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/nft_meta_bridge.c | 2 +- net/ipv4/netfilter/nft_fib_ipv4.c | 2 +- net/ipv6/netfilter/nft_fib_ipv6.c | 2 +- net/netfilter/ipset/ip_set_core.c | 2 +- net/netfilter/ipvs/ip_vs_ctl.c | 4 ++-- net/netfilter/nfnetlink.c | 2 +- net/netfilter/nfnetlink_log.c | 2 +- net/netfilter/nfnetlink_queue.c | 4 ++-- net/netfilter/nft_ct.c | 2 +- net/netfilter/nft_exthdr.c | 2 +- net/netfilter/nft_hash.c | 2 +- net/netfilter/nft_meta.c | 2 +- net/netfilter/nft_numgen.c | 2 +- net/netfilter/nft_queue.c | 2 +- 14 files changed, 16 insertions(+), 16 deletions(-) commit acf7f76b6466837ccbbcf7bb85b411d56c7df2ea Merge: a71c9a1 022f4e4 Author: Joerg Roedel Date: Fri Apr 7 18:23:01 2017 +0200 Merge branch 'for-joerg/arm-smmu/updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu commit e190ed1ea7458e446230de4113cc5d53b8dc4ec8 Author: Mario Kleiner Date: Wed Mar 29 22:09:12 2017 +0200 drm/amdgpu: Avoid overflows/divide-by-zero in latency_watermark calculations. At dot clocks > approx. 250 Mhz, some of these calcs will overflow and cause miscalculation of latency watermarks, and for some overflows also divide-by-zero driver crash ("divide error: 0000 [#1] PREEMPT SMP" in "dce_v10_0_latency_watermark+0x12d/0x190"). This zero-divide happened, e.g., on AMD Tonga Pro under DCE-10, on a Displayport panel when trying to set a video mode of 2560x1440 at 165 Hz vrefresh with a dot clock of 635.540 Mhz. Refine calculations to avoid the overflows. Tested for DCE-10 with R9 380 Tonga + ASUS ROG PG279 panel. Reviewed-by: Alex Deucher Signed-off-by: Mario Kleiner Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 19 +++---------------- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 19 +++---------------- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 19 +++---------------- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 19 +++---------------- 4 files changed, 12 insertions(+), 64 deletions(-) commit d63c277dc672e0c568481af043359420fa9d4736 Author: Mario Kleiner Date: Wed Mar 29 22:09:11 2017 +0200 drm/amdgpu: Make display watermark calculations more accurate Avoid big roundoff errors in scanline/hactive durations for high pixel clocks, especially for >= 500 Mhz, and thereby program more accurate display fifo watermarks. Implemented here for DCE 6,8,10,11. Successfully tested on DCE 10 with AMD R9 380 Tonga. Reviewed-by: Alex Deucher Signed-off-by: Mario Kleiner Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 10 +++++----- 4 files changed, 20 insertions(+), 20 deletions(-) commit 211eed656b0ec13240aaaa42bd6541f1fcb61007 Author: Alex Deucher Date: Wed Mar 29 18:03:27 2017 -0400 drm/radeon: fix typo in bandwidth calculation The RV3xx settings were getting applied to all older asics rather than just RV3xx. Reported-by: David Binderman Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/r100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ede2e019adec0b6fd21a54ace92358969f1a1629 Author: Christopher James Halse Rogers Date: Mon Apr 3 13:35:23 2017 +1000 drm/radeon: Refuse to migrate a prime BO to VRAM. (v2) BOs shared via dma-buf, either imported or exported, cannot sensibly be migrated to VRAM without breaking the dma-buf sharing. Refuse userspace requests to migrate to VRAM, ensure such BOs are not migrated during command submission, and refuse to pin them to VRAM. v2: Don't pin BOs in GTT. Instead, refuse to migrate BOs to VRAM. Reviewed-by: Christian König Signed-off-by: Christopher James Halse Rogers Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_cs.c | 10 ++++++++++ drivers/gpu/drm/radeon/radeon_gem.c | 4 ++++ drivers/gpu/drm/radeon/radeon_object.c | 5 +++++ 3 files changed, 19 insertions(+) commit 0d16d299400471735e77d7a8c4107e71b523446d Author: Christopher James Halse Rogers Date: Mon Apr 3 13:35:22 2017 +1000 drm/radeon: Maintain prime import/export refcount for BOs Reviewed-by: Christian König Signed-off-by: Christopher James Halse Rogers Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon.h | 1 + drivers/gpu/drm/radeon/radeon_prime.c | 6 ++++++ 2 files changed, 7 insertions(+) commit 803d89ade4ede131405c57ec1a1db32673995b2e Author: Christopher James Halse Rogers Date: Mon Apr 3 13:31:22 2017 +1000 drm/amdgpu: Refuse to pin or change acceptable domains of prime BOs to VRAM. (v2) Migration to VRAM will break the sharing, resulting in rendering on the exporting GPU never becoming visible on the importing GPU. v2: Don't pin BOs to GTT. Instead, refuse to migrate them out of GTT. Reviewed-by: Christian König Signed-off-by: Christopher James Halse Rogers Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++++ 2 files changed, 9 insertions(+) commit 1769152ac64b0b07583f696b621624df2ca4c840 Author: Christopher James Halse Rogers Date: Wed Mar 29 15:02:11 2017 +1100 drm/amdgpu: Fail fb creation from imported dma-bufs. (v2) Any use of the framebuffer will migrate it to VRAM, which is not sensible for an imported dma-buf. v2: Use DRM_DEBUG_KMS to prevent userspace accidentally spamming dmesg. Reviewed-by: Michel Dänzer Reviewed-by: Christian König Signed-off-by: Christopher James Halse Rogers CC: amd-gfx@lists.freedesktop.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a294043b2fbd8de69d161457ed0c7a4026bbfa5a Author: Christopher James Halse Rogers Date: Wed Mar 29 15:00:54 2017 +1100 drm/radeon: Fail fb creation from imported dma-bufs. Any use of the framebuffer will migrate it to VRAM, which is not sensible for an imported dma-buf. v2: Use DRM_DEBUG_KMS to prevent userspace accidentally spamming dmesg. Reviewed-by: Michel Dänzer Reviewed-by: Christian König Signed-off-by: Christopher James Halse Rogers CC: amd-gfx@lists.freedesktop.org Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_display.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a5a3237e508e51fb63373ceafa0b45651cacbc55 Merge: b824b93 eeb1efb Author: Catalin Marinas Date: Fri Apr 7 17:04:19 2017 +0100 Merge tag 'arch-timer-errata-prereq' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into for-next/core Pre-requisites for the arch timer errata workarounds: - Allow checking of a CPU-local erratum - Add CNTVCT_EL0 trap handler - Define Cortex-A73 MIDR - Allow an erratum to be match for all revisions of a core - Add capability to advertise Cortex-A73 erratum 858921 * tag 'arch-timer-errata-prereq' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms: arm64: cpu_errata: Add capability to advertise Cortex-A73 erratum 858921 arm64: cpu_errata: Allow an erratum to be match for all revisions of a core arm64: Define Cortex-A73 MIDR arm64: Add CNTVCT_EL0 trap handler arm64: Allow checking of a CPU-local erratum commit 84a5ead18e57e9018d3de0a5388be8f6c2686329 Author: yt.shen@mediatek.com Date: Fri Mar 31 19:30:39 2017 +0800 drm/mediatek: add support for Mediatek SoC MT2701 This patch add support for the Mediatek MT2701 DISP subsystem. There is only one OVL engine in MT2701. Signed-off-by: YT Shen Acked-by: CK Hu drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 8 ++++++++ drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 6 ++++++ drivers/gpu/drm/mediatek/mtk_drm_ddp.c | 17 +++++++++++++++++ drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 7 +++++++ drivers/gpu/drm/mediatek/mtk_drm_drv.c | 29 +++++++++++++++++++++++++++++ drivers/gpu/drm/mediatek/mtk_dsi.c | 1 + drivers/gpu/drm/mediatek/mtk_mipi_tx.c | 6 ++++++ 7 files changed, 74 insertions(+) commit 0707632b5bacc490f58dfbad741d586c06595ff3 Author: yt.shen@mediatek.com Date: Fri Mar 31 19:30:38 2017 +0800 drm/mediatek: update DSI sub driver flow for sending commands to panel This patch update enable/disable flow of DSI module. Original flow works on there is a bridge chip: DSI -> bridge -> panel. In this case: DSI -> panel, the DSI sub driver flow should be updated. We need to initialize DSI first so that we can send commands to panel. Signed-off-by: shaoming chen Signed-off-by: YT Shen Acked-by: CK Hu drivers/gpu/drm/mediatek/mtk_dsi.c | 259 ++++++++++++++++++++++--------------- 1 file changed, 158 insertions(+), 101 deletions(-) commit 2d52bfba09d18c9b67fa68cac4a6deeceeb6b375 Author: yt.shen@mediatek.com Date: Fri Mar 31 19:30:37 2017 +0800 drm/mediatek: add non-continuous clock mode and EOT packet control This patch will update dsi clock control method. 1. dsi non-continue clock mode will enhance antistatic effect for panel 2. EOT packet control will judge whether dsi send end of packet or not by customize Signed-off-by: shaoming chen Signed-off-by: YT Shen Acked-by: CK Hu drivers/gpu/drm/mediatek/mtk_dsi.c | 3 +++ 1 file changed, 3 insertions(+) commit 21898816831fc60c92dd634ab4316a24da7eb4af Author: shaoming chen Date: Fri Mar 31 19:30:36 2017 +0800 drm/mediatek: add dsi transfer function add dsi read/write commands for transfer function Signed-off-by: shaoming chen Acked-by: CK Hu drivers/gpu/drm/mediatek/mtk_dsi.c | 168 ++++++++++++++++++++++++++++++++++++- 1 file changed, 166 insertions(+), 2 deletions(-) commit dd5080a54df8261a18ed4e6587a2ec4a7b52a2e7 Author: shaoming chen Date: Fri Mar 31 19:30:35 2017 +0800 drm/mediatek: add dsi interrupt control add dsi interrupt control Signed-off-by: shaoming chen Acked-by: CK Hu drivers/gpu/drm/mediatek/mtk_dsi.c | 92 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) commit 80a5cfd60d2a9423b44e2c6a77e2f5fa87713e8e Author: yt.shen@mediatek.com Date: Fri Mar 31 19:30:34 2017 +0800 drm/mediatek: cleaning up and refine cleaning up unused define and refine function name and variable Signed-off-by: shaoming chen Signed-off-by: YT Shen Acked-by: CK Hu drivers/gpu/drm/mediatek/mtk_dsi.c | 73 ++++++++++++++++------------------ drivers/gpu/drm/mediatek/mtk_mipi_tx.c | 8 ++-- 2 files changed, 39 insertions(+), 42 deletions(-) commit fb2557de27e3e9ced7579c8d97682a0d51d58b3a Author: yt.shen@mediatek.com Date: Fri Mar 31 19:30:33 2017 +0800 drm/mediatek: update display module connections update connections for OVL, RDMA, BLS, DSI Signed-off-by: YT Shen Acked-by: CK Hu drivers/gpu/drm/mediatek/mtk_drm_ddp.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit c37813de6687bbd98b16fef47bc98118398d7ec5 Author: yt.shen@mediatek.com Date: Fri Mar 31 19:30:32 2017 +0800 drm/mediatek: add BLS component Add BLS component for PWM + GAMMA function Signed-off-by: YT Shen Acked-by: CK Hu drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 5 ++++- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 9dc84e98a31f64363c32ecae8ec0b9e8cf3ce156 Author: yt.shen@mediatek.com Date: Fri Mar 31 19:30:31 2017 +0800 drm/mediatek: add shadow register support We need to acquire mutex before using the resources, and need to release it after finished. So we don't need to write registers in the blanking period. Signed-off-by: YT Shen Acked-by: CK Hu drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 75 ++++++++++++++++++++------------- drivers/gpu/drm/mediatek/mtk_drm_ddp.c | 25 +++++++++++ drivers/gpu/drm/mediatek/mtk_drm_ddp.h | 2 + drivers/gpu/drm/mediatek/mtk_drm_drv.h | 1 + 4 files changed, 74 insertions(+), 29 deletions(-) commit c5f228ef6ccddbc3ebc346e2cfb2b11c1762696f Author: yt.shen@mediatek.com Date: Fri Mar 31 19:30:30 2017 +0800 drm/mediatek: add *driver_data for different hardware settings There are some hardware settings changed, between MT8173 & MT2701: DISP_OVL address offset changed, color format definition changed. DISP_RDMA fifo size changed. DISP_COLOR offset changed. MIPI_TX pll setting changed. And add prefix for mtk_ddp_main & mtk_ddp_ext & mutex_mod. Signed-off-by: YT Shen Acked-by: CK Hu drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 41 ++++++++++++----- drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 18 +++++++- drivers/gpu/drm/mediatek/mtk_drm_ddp.c | 71 +++++++++++++++-------------- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 57 +++++++++++++++++++---- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 25 +++++++--- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 8 ++++ drivers/gpu/drm/mediatek/mtk_mipi_tx.c | 24 +++++++++- 7 files changed, 181 insertions(+), 63 deletions(-) commit 55dc065e3ec641df74b356c538f03edf73e87641 Author: yt.shen@mediatek.com Date: Fri Mar 31 19:30:29 2017 +0800 drm/mediatek: add helpers for coverting from the generic components define helpers for converting from 'mtk_ddp_comp' to 'mtk_disp_ovl' define helpers for converting from 'mtk_ddp_comp' to 'mtk_disp_rdma' Signed-off-by: YT Shen Acked-by: CK Hu drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 15 +++++++++------ drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) commit e3215713f878ddd63e8fac4d2cfb69a0782145ce Author: yt.shen@mediatek.com Date: Fri Mar 31 19:30:28 2017 +0800 dt-bindings: display: mediatek: update supported chips Add decriptions about supported chips, including MT2701 & MT8173 Signed-off-by: YT Shen Acked-by: Rob Herring Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt | 2 ++ Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.txt | 2 ++ 2 files changed, 4 insertions(+) commit b609338b26f5653aa211fc7af83477e2df6e3f0b Author: Martin Blumenstingl Date: Sat Apr 1 15:02:25 2017 +0200 clk: meson: mpll: use 64bit math in rate_from_params On Meson8b the MPLL parent clock (fixed_pll) has a rate of 2550MHz. Multiplying this with SDM_DEN results in a value greater than 32bits. This is not a problem on the 64bit Meson GX SoCs, but it may result in undefined behavior on the older 32bit Meson8b SoC. While rate_from_params was only introduced recently to make the math reusable from _round_rate and _recalc_rate the original bug exists much longer. Fixes: 1c50da4f27 ("clk: meson: add mpll support") Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl [as discussed on the ml, use DIV_ROUND_UP_ULL] Signed-off-by: Jerome Brunet drivers/clk/meson/clk-mpll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88e4ac68ea9a09e105c86070ebfa01ca482ca4c2 Author: Martin Blumenstingl Date: Sat Apr 1 15:02:24 2017 +0200 clk: meson: mpll: fix division by zero in rate_from_params According to the public datasheet all register bits in HHI_MPLL_CNTL7, HHI_MPLL_CNTL8 and HHI_MPLL_CNTL9 default to zero. On all GX SoCs these seem to be initialized by the bootloader to some default value. However, on my Meson8 board they are not initialized, leading to a division by zero in rate_from_params as the math is: (parent_rate * SDM_DEN) / ((SDM_DEN * 0) + 0) According to the datasheet, the minimum n2 value is 4. The rate provided by the clock when n2 is less than this minimum is unpredictable. In such case, we report an error. Although the rate_from_params function was only introduced recently the original bug has been there for much longer. It was only exposed recently when the MPLL clocks were added to the Meson8b clock driver. Fixes: 1c50da4f27 ("clk: meson: add mpll support") Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet drivers/clk/meson/clk-mpll.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit fbbaf700e7b163a0f1704b2d542ee28be11fce21 Author: NeilBrown Date: Fri Apr 7 09:40:52 2017 -0600 block: trace completion of all bios. Currently only dm and md/raid5 bios trigger trace_block_bio_complete(). Now that we have bio_chain() and bio_inc_remaining(), it is not possible, in general, for a driver to know when the bio is really complete. Only bio_endio() knows that. So move the trace_block_bio_complete() call to bio_endio(). Now trace_block_bio_complete() pairs with trace_block_bio_queue(). Any bio for which a 'queue' event is traced, will subsequently generate a 'complete' event. There are a few cases where completion tracing is not wanted. 1/ If blk_update_request() has already generated a completion trace event at the 'request' level, there is no point generating one at the bio level too. In this case the bi_sector and bi_size will have changed, so the bio level event would be wrong 2/ If the bio hasn't actually been queued yet, but is being aborted early, then a trace event could be confusing. Some filesystems call bio_endio() but do not want tracing. 3/ The bio_integrity code interposes itself by replacing bi_end_io, then restoring it and calling bio_endio() again. This would produce two identical trace events if left like that. To handle these, we introduce a flag BIO_TRACE_COMPLETION and only produce the trace event when this is set. We address point 1 above by clearing the flag in blk_update_request(). We address point 2 above by only setting the flag when generic_make_request() is called. We address point 3 above by clearing the flag after generating a completion event. When bio_split() is used on a bio, particularly in blk_queue_split(), there is an extra complication. A new bio is split off the front, and may be handle directly without going through generic_make_request(). The old bio, which has been advanced, is passed to generic_make_request(), so it will trigger a trace event a second time. Probably the best result when a split happens is to see a single 'queue' event for the whole bio, then multiple 'complete' events - one for each component. To achieve this was can: - copy the BIO_TRACE_COMPLETION flag to the new bio in bio_split() - avoid generating a 'queue' event if BIO_TRACE_COMPLETION is already set. This way, the split-off bio won't create a queue event, the original won't either even if it re-submitted to generic_make_request(), but both will produce completion events, each for their own range. So if generic_make_request() is called (which generates a QUEUED event), then bi_endio() will create a single COMPLETE event for each range that the bio is split into, unless the driver has explicitly requested it not to. Signed-off-by: NeilBrown Signed-off-by: Jens Axboe block/bio.c | 14 ++++++++++++++ block/blk-core.c | 10 +++++++++- drivers/md/dm.c | 1 - drivers/md/raid5.c | 2 -- include/linux/blk_types.h | 2 ++ 5 files changed, 25 insertions(+), 4 deletions(-) commit dbde775cdbf5e401b8739f30c87d1af12c0028db Author: NeilBrown Date: Fri Apr 7 11:10:44 2017 +1000 block: simple improvements for bio->flags The comment for the 'flags' field of 'bio' mentions "command" which is no longer stored there, and doesn't mention the bvec pool number, which is. BIO_RESET_BITS is set in such a way that it would need to be updated if new bits were added, which is easy to miss. BVEC_POOL_BITS is larger than needed. The BVEC_POOL_IDX() ranges from 0 to 6, so 3 bits are sufficient. This patch make improvements in each of these areas. Signed-off-by: NeilBrown Signed-off-by: Jens Axboe include/linux/blk_types.h | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit cbbb40e2ec264bd63c410ff41cc8240c25419c49 Author: simran singhal Date: Wed Mar 29 11:15:40 2017 +0530 net: netfilter: Use list_{next/prev}_entry instead of list_entry This patch replace list_entry with list_prev_entry as it makes the code more clear to read. Signed-off-by: simran singhal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdec26858e7bd9340ad4a9c6e73670aa47c2b6ec Author: simran singhal Date: Wed Mar 29 03:25:17 2017 +0530 netfilter: Use seq_puts()/seq_putc() where possible For string without format specifiers, use seq_puts(). For seq_printf("\n"), use seq_putc('\n'). Signed-off-by: simran singhal Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_ctl.c | 8 ++++---- net/netfilter/nf_conntrack_expect.c | 4 ++-- net/netfilter/nf_conntrack_standalone.c | 6 +++--- net/netfilter/nf_log.c | 4 ++-- net/netfilter/nf_synproxy_core.c | 6 +++--- net/netfilter/xt_recent.c | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) commit 68ad546aefddb4dacdb78074df9dddb51424c427 Author: simran singhal Date: Wed Mar 29 00:35:16 2017 +0530 netfilter: 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 ) Unnecessary parantheses are also remove. Signed-off-by: simran singhal Reviewed-by: Stephen Hemminger Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebtables.c | 2 +- net/ipv4/netfilter/arp_tables.c | 21 ++++++++------------- net/ipv4/netfilter/ip_tables.c | 20 ++++++++------------ net/ipv6/netfilter/ip6_tables.c | 20 ++++++++------------ net/netfilter/ipset/ip_set_bitmap_gen.h | 5 ++--- net/netfilter/ipset/ip_set_core.c | 2 +- net/netfilter/nf_conntrack_proto.c | 2 +- net/netfilter/nft_set_hash.c | 2 +- net/netfilter/xt_hashlimit.c | 10 +++++----- 9 files changed, 35 insertions(+), 49 deletions(-) commit 0cb51f6532639254eca4aba979b503f6eb467bb4 Author: Pushkar Jambhlekar Date: Fri Apr 7 17:03:24 2017 +0200 drivers/video/fbdev: Fixing coding guidelines in acornfb.c Fixing coding guidelines error reported by 'checkpatch.pl' Signed-off-by: Pushkar Jambhlekar Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/acornfb.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 5a93db427ab170c9793d76abf3e4be1ebd09375f Author: Juergen Gross Date: Fri Apr 7 17:03:24 2017 +0200 xen, fbfront: add support for specifying size via xenstore Today xen-fbfront supports specifying the display size via module parameters only. Add support for specifying the size via Xenstore in order to enable doing this easily via the domain's Xen configuration. Add an error message in case the configured display size conflicts with video memory size. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/xen-fbfront.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 9a1c779e6b06855e41099caa6f15b3b584dfa88c Author: Liam Beguin Date: Fri Apr 7 17:03:24 2017 +0200 video: ARM CLCD: fix dma allocation size This patch forces the frambuffer size to be aligned on kernel pages. During the board startup, the splash screed did appear; the "ts_test" program or our application were not able to start. The following error message was reported: error: failed to map framebuffer device to memory. LinuxFB: driver cannot connect The issue was discovered, on the LPC32xx platform, during the migration of the LCD definition from the board file to the device tree. Signed-off-by: Liam Beguin Signed-off-by: Sylvain Lemieux Cc: Vladimir Zapolskiy Cc: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/amba-clcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bbadb9a222b4f0c3fec01483b57cbb403df0076a Author: Florian Larysch Date: Fri Apr 7 14:42:20 2017 +0200 net: ipv4: fix multipath RTM_GETROUTE behavior when iif is given inet_rtm_getroute synthesizes a skeletal ICMP skb, which is passed to ip_route_input when iif is given. If a multipath route is present for the designated destination, fib_multipath_hash ends up being called with that skb. However, as that skb contains no information beyond the protocol type, the calculated hash does not match the one we would see for a real packet. There is currently no way to fix this for layer 4 hashing, as RTM_GETROUTE doesn't have the necessary information to create layer 4 headers. To fix this for layer 3 hashing, set appropriate saddr/daddrs in the skb and also change the protocol to UDP to avoid special treatment for ICMP. Signed-off-by: Florian Larysch Signed-off-by: David S. Miller net/ipv4/route.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 7eaa44f6207fb64b1fa4304f83f22486590540e2 Author: Jerome Brunet Date: Fri Mar 3 12:40:15 2017 +0100 clk: meson: gxbb: add cts_i958 clock This adds the cts_i958 clock to control the clock source of the spdif output block. This mux is not explicitly mentionned in the documentation but it is critical to the spdif dai. It is used to select whether the clock source of the spdif output is cts_amclk (when data are taken from i2s buffer) or the cts_mclk_i958 (when data are taken from the spdif buffer) Acked-by: Michael Turquette Signed-off-by: Jerome Brunet drivers/clk/meson/gxbb.c | 21 +++++++++++++++++++++ drivers/clk/meson/gxbb.h | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) commit 3c277c247eabeb0c869c06580c11efe12094a32f Author: Jerome Brunet Date: Mon Feb 20 18:02:34 2017 +0100 clk: meson: gxbb: add cts_mclk_i958 Add the spdif master clock also referred as cts_mclk_i958 Acked-by: Michael Turquette Signed-off-by: Jerome Brunet drivers/clk/meson/gxbb.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/clk/meson/gxbb.h | 5 ++++- 2 files changed, 56 insertions(+), 1 deletion(-) commit 4087bd4b21702dce65c3e5179308dead2e96e06d Author: Jerome Brunet Date: Tue Jan 24 18:35:23 2017 +0100 clk: meson: gxbb: add cts_amclk Add the i2s master clock also referred as cts_amclk Acked-by: Michael Turquette Signed-off-by: Jerome Brunet drivers/clk/meson/gxbb.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/clk/meson/gxbb.h | 5 +++- 2 files changed, 71 insertions(+), 1 deletion(-) commit 59e85335dda9826284a1f0f160ea8f10b59e0568 Author: Jerome Brunet Date: Tue Feb 14 00:13:55 2017 +0100 clk: meson: add audio clock divider support The audio divider needs a specific clock divider driver. With am mpll parent clock, which is able to provide a fairly precise rate, the generic divider tends to select low value of the divider. In such case the quality of the clock is very poor. For the same final rate, maximizing the audio clock divider value and selecting the corresponding mpll rate gives better results. This is what this driver aims to acheive. So far, so good. Cc: Hendrik v. Raven Acked-by: Michael Turquette Signed-off-by: Jerome Brunet drivers/clk/meson/Makefile | 2 +- drivers/clk/meson/clk-audio-divider.c | 144 ++++++++++++++++++++++++++++++++++ drivers/clk/meson/clkc.h | 10 +++ 3 files changed, 155 insertions(+), 1 deletion(-) commit a70c6e06ed7c8c84612c7e3dada9d6895b65c70a Author: Jerome Brunet Date: Tue Mar 28 10:47:22 2017 +0200 clk: meson: gxbb: protect against holes in the onecell_data array The clock controller is getting more complex and it might be possible, in the future, to have holes in the clk_hw_onecell_data array. Just make sure we skip those holes if it ever happens. Acked-by: Michael Turquette Signed-off-by: Jerome Brunet drivers/clk/meson/gxbb.c | 4 ++++ 1 file changed, 4 insertions(+) commit 28d06353881939703c34d82a1465136af176c620 Author: Jim Mattson Date: Wed Apr 5 09:14:40 2017 -0700 kvm: nVMX: Disallow userspace-injected exceptions in guest mode The userspace exception injection API and code path are entirely unprepared for exceptions that might cause a VM-exit from L2 to L1, so the best course of action may be to simply disallow this for now. 1. The API provides no mechanism for userspace to specify the new DR6 bits for a #DB exception or the new CR2 value for a #PF exception. Presumably, userspace is expected to modify these registers directly with KVM_SET_SREGS before the next KVM_RUN ioctl. However, in the event that L1 intercepts the exception, these registers should not be changed. Instead, the new values should be provided in the exit_qualification field of vmcs12 (Intel SDM vol 3, section 27.1). 2. In the case of a userspace-injected #DB, inject_pending_event() clears DR7.GD before calling vmx_queue_exception(). However, in the event that L1 intercepts the exception, this is too early, because DR7.GD should not be modified by a #DB that causes a VM-exit directly (Intel SDM vol 3, section 27.1). 3. If the injected exception is a #PF, nested_vmx_check_exception() doesn't properly check whether or not L1 is interested in the associated error code (using the #PF error code mask and match fields from vmcs12). It may either return 0 when it should call nested_vmx_vmexit() or vice versa. 4. nested_vmx_check_exception() assumes that it is dealing with a hardware-generated exception intercept from L2, with some of the relevant details (the VM-exit interruption-information and the exit qualification) live in vmcs02. For userspace-injected exceptions, this is not the case. 5. prepare_vmcs12() assumes that when its exit_intr_info argument specifies valid information with a valid error code that it can VMREAD the VM-exit interruption error code from vmcs02. For userspace-injected exceptions, this is not the case. Signed-off-by: Jim Mattson Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 28bf28887976d8881a3a59491896c718fade7355 Author: David Hildenbrand Date: Thu Mar 23 11:46:03 2017 +0100 KVM: x86: fix user triggerable warning in kvm_apic_accept_events() If we already entered/are about to enter SMM, don't allow switching to INIT/SIPI_RECEIVED, otherwise the next call to kvm_apic_accept_events() will report a warning. Same applies if we are already in MP state INIT_RECEIVED and SMM is requested to be turned on. Refuse to set the VCPU events in this case. Fixes: cd7764fe9f73 ("KVM: x86: latch INITs while in system management mode") Cc: stable@vger.kernel.org # 4.2+ Reported-by: Dmitry Vyukov Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 4b4357e02523ec63ad853f927f5d93a25101a1d2 Author: Paolo Bonzini Date: Fri Mar 31 13:53:23 2017 +0200 kvm: make KVM_COALESCED_MMIO_PAGE_OFFSET public Its value has never changed; we might as well make it part of the ABI instead of using the return value of KVM_CHECK_EXTENSION(KVM_CAP_COALESCED_MMIO). Because PPC does not always make MMIO available, the code has to be made dependent on CONFIG_KVM_MMIO rather than KVM_COALESCED_MMIO_PAGE_OFFSET. Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/arm/include/asm/kvm_host.h | 1 - arch/arm/include/uapi/asm/kvm.h | 2 ++ arch/arm64/include/asm/kvm_host.h | 1 - arch/arm64/include/uapi/asm/kvm.h | 2 ++ arch/mips/include/asm/kvm_host.h | 1 - arch/mips/include/uapi/asm/kvm.h | 2 ++ arch/powerpc/include/asm/kvm_host.h | 3 --- arch/powerpc/include/uapi/asm/kvm.h | 3 +++ arch/x86/include/asm/kvm_host.h | 2 -- arch/x86/include/uapi/asm/kvm.h | 3 +++ include/linux/kvm_host.h | 2 +- virt/kvm/kvm_main.c | 10 +++++----- 12 files changed, 18 insertions(+), 14 deletions(-) commit 3042255899540d4985a616017af9e2b80a84a8cf Author: Paolo Bonzini Date: Fri Mar 31 13:53:22 2017 +0200 kvm: make KVM_CAP_COALESCED_MMIO architecture agnostic Remove code from architecture files that can be moved to virt/kvm, since there is already common code for coalesced MMIO. Signed-off-by: Paolo Bonzini Reviewed-by: David Hildenbrand [Removed a pointless 'break' after 'return'.] Signed-off-by: Radim Krčmář arch/arm/kvm/arm.c | 3 --- arch/mips/kvm/mips.c | 3 --- arch/powerpc/kvm/powerpc.c | 5 ----- arch/x86/kvm/x86.c | 3 --- virt/kvm/kvm_main.c | 4 ++++ 5 files changed, 4 insertions(+), 14 deletions(-) commit a5f46457047bceaaf32ed7c1d47e3e15bd197e27 Author: Paolo Bonzini Date: Thu Mar 30 11:55:32 2017 +0200 KVM: nVMX: support RDRAND and RDSEED exiting Signed-off-by: Paolo Bonzini Reviewed-by: Jim Mattson Signed-off-by: Radim Krčmář arch/x86/include/asm/vmx.h | 2 ++ arch/x86/kvm/vmx.c | 5 +++++ 2 files changed, 7 insertions(+) commit 1f5199927034007e42a1ee508f62b9b85cc4714a Author: Paolo Bonzini Date: Thu Mar 30 11:55:31 2017 +0200 KVM: VMX: add missing exit reasons In order to simplify adding exit reasons in the future, the array of exit reason names is now also sorted by exit reason code. Reviewed-by: David Hildenbrand Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/include/uapi/asm/vmx.h | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit ae1e2d1082ae6969ff8c626ef80804d950bf256b Author: Paolo Bonzini Date: Thu Mar 30 11:55:30 2017 +0200 kvm: nVMX: support EPT accessed/dirty bits Now use bit 6 of EPTP to optionally enable A/D bits for EPTP. Another thing to change is that, when EPT accessed and dirty bits are not in use, VMX treats accesses to guest paging structures as data reads. When they are in use (bit 6 of EPTP is set), they are treated as writes and the corresponding EPT dirty bit is set. The MMU didn't know this detail, so this patch adds it. We also have to fix up the exit qualification. It may be wrong because KVM sets bit 6 but the guest might not. L1 emulates EPT A/D bits using write permissions, so in principle it may be possible for EPT A/D bits to be used by L1 even though not available in hardware. The problem is that guest page-table walks will be treated as reads rather than writes, so they would not cause an EPT violation. Signed-off-by: Paolo Bonzini [Fixed typo in walk_addr_generic() comment and changed bit clear + conditional-set pattern in handle_ept_violation() to conditional-clear] Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_host.h | 5 +++-- arch/x86/include/asm/vmx.h | 2 ++ arch/x86/kvm/mmu.c | 4 +++- arch/x86/kvm/mmu.h | 3 ++- arch/x86/kvm/paging_tmpl.h | 33 ++++++++++++++++----------------- arch/x86/kvm/vmx.c | 32 ++++++++++++++++++++++++++++---- 6 files changed, 54 insertions(+), 25 deletions(-) commit 86407bcb5c8320add17b57dc6af1586ff8e14bc0 Author: Paolo Bonzini Date: Thu Mar 30 11:55:29 2017 +0200 kvm: x86: MMU support for EPT accessed/dirty bits This prepares the MMU paging code for EPT accessed and dirty bits, which can be enabled optionally at runtime. Code that updates the accessed and dirty bits will need a pointer to the struct kvm_mmu. Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/paging_tmpl.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 004772313040ed5b78560de1fe5d51ea678977c7 Author: Paolo Bonzini Date: Thu Mar 30 11:55:28 2017 +0200 KVM: VMX: remove bogus check for invalid EPT violation handle_ept_violation is checking for "guest-linear-address invalid" + "not a paging-structure walk". However, _all_ EPT violations without a valid guest linear address are paging structure walks, because those EPT violations happen when loading the guest PDPTEs. Therefore, the check can never be true, and even if it were, KVM doesn't care about the guest linear address; it only uses the guest *physical* address VMCS field. So, remove the check altogether. Signed-off-by: Paolo Bonzini Reviewed-by: Jim Mattson Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 14 -------------- 1 file changed, 14 deletions(-) commit 7db742654dd59fde90af79d77372c5439399a9e6 Author: Paolo Bonzini Date: Wed Mar 8 10:49:19 2017 +0100 KVM: nVMX: we support 1GB EPT pages Large pages at the PDPE level can be emulated by the MMU, so the bit can be set unconditionally in the EPT capabilities MSR. The same is true of 2MB EPT pages, though all Intel processors with EPT in practice support those. Reviewed-by: David Hildenbrand Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ad6260da1e23cf937806e42c8490af3ff4530474 Author: Paolo Bonzini Date: Mon Mar 27 14:30:40 2017 +0200 KVM: x86: drop legacy device assignment Legacy device assignment has been deprecated since 4.2 (released 1.5 years ago). VFIO is better and everyone should have switched to it. If they haven't, this should convince them. :) Reviewed-by: Alex Williamson Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/api.txt | 204 ------- arch/x86/kvm/Kconfig | 12 - arch/x86/kvm/Makefile | 2 - arch/x86/kvm/assigned-dev.c | 1058 ------------------------------------- arch/x86/kvm/assigned-dev.h | 32 -- arch/x86/kvm/iommu.c | 356 ------------- arch/x86/kvm/x86.c | 14 +- include/linux/kvm_host.h | 16 - virt/kvm/kvm_main.c | 17 - 9 files changed, 1 insertion(+), 1710 deletions(-) commit 2c82878b0cb38fd516fd612c67852a6bbf282003 Author: Paolo Bonzini Date: Mon Mar 27 14:37:28 2017 +0200 KVM: VMX: require virtual NMI support Virtual NMIs are only missing in Prescott and Yonah chips. Both are obsolete for virtualization usage---Yonah is 32-bit only even---so drop vNMI emulation. Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 143 ++++++++++++++--------------------------------------- 1 file changed, 38 insertions(+), 105 deletions(-) commit 74f169090b6f36b867c9df0454366dd9af6f62d1 Author: Borislav Petkov Date: Sun Mar 26 23:51:24 2017 +0200 kvm/svm: Setup MCG_CAP on AMD properly MCG_CAP[63:9] bits are reserved on AMD. However, on an AMD guest, this MSR returns 0x100010a. More specifically, bit 24 is set, which is simply wrong. That bit is MCG_SER_P and is present only on Intel. Thus, clean up the reserved bits in order not to confuse guests. Signed-off-by: Borislav Petkov Cc: Joerg Roedel Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1279a6b124e4c93fac161dd3e481a24a423551c0 Author: David Hildenbrand Date: Mon Mar 20 10:00:08 2017 +0100 KVM: nVMX: single function for switching between vmcs Let's combine it in a single function vmx_switch_vmcs(). Signed-off-by: David Hildenbrand Reviewed-by: Paolo Bonzini Reviewed-by: Jim Mattson Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit f0b98c02c18a3c76ccf359478f68c9bae81b5f78 Author: Jim Mattson Date: Wed Mar 15 07:56:11 2017 -0700 kvm: vmx: Don't use INVVPID when EPT is enabled According to the Intel SDM, volume 3, section 28.3.2: Creating and Using Cached Translation Information, "No linear mappings are used while EPT is in use." INVEPT will invalidate both the guest-physical mappings and the combined mappings in the TLBs and paging-structure caches, so an INVVPID is superfluous. Signed-off-by: Jim Mattson Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dedb67c4b4e5fa2e6e149a2ce93e7848aaa9d762 Author: Pablo Neira Ayuso Date: Tue Mar 28 22:27:32 2017 +0530 netfilter: Add nfnl_msg_type() helper function Add and use nfnl_msg_type() function to replace opencoded nfnetlink message type. I suggested this change, Arushi Singhal made an initial patch to address this but was missing several spots. Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/nfnetlink.h | 5 +++++ net/netfilter/ipset/ip_set_core.c | 2 +- net/netfilter/nf_conntrack_netlink.c | 16 +++++++++------- net/netfilter/nf_tables_api.c | 20 +++++++++----------- net/netfilter/nf_tables_trace.c | 3 ++- net/netfilter/nfnetlink_acct.c | 2 +- net/netfilter/nfnetlink_cthelper.c | 2 +- net/netfilter/nfnetlink_cttimeout.c | 4 ++-- net/netfilter/nfnetlink_log.c | 2 +- net/netfilter/nfnetlink_queue.c | 2 +- net/netfilter/nft_compat.c | 2 +- 11 files changed, 33 insertions(+), 27 deletions(-) commit 6f9c89000c3f771c47adacaca2df775a25f27205 Merge: 28e71e2 d003d02 Author: Daniel Lezcano Date: Fri Apr 7 16:23:29 2017 +0200 Merge tag 'arch-timer-errata' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into clockevents/4.12 arm64 arch timer workaround series, including the base patches that will also go via the arm64 tree. Signed-off-by: Daniel Lezcano commit 28e71e2fe8fe6cdbd1bdc61601ea50d6423d3cf0 Author: Linus Walleij Date: Fri Mar 24 22:32:35 2017 +0100 clocksource/drivers/fttmr010: Refactor to handle clock The plain Faraday FTTMR010 timer needs a clock to figure out its tick rate, and the gemini reads it directly from the system controller set-up. Split the init function and add two paths for the two compatible-strings. We only support clocking using PCLK because of lack of documentation on how EXTCLK works. The Gemini still works like before, but we can also support a generic, clock-based version. Signed-off-by: Linus Walleij Signed-off-by: Daniel Lezcano drivers/clocksource/timer-fttmr010.c | 119 +++++++++++++++++++++-------------- 1 file changed, 73 insertions(+), 46 deletions(-) commit f5bf0ee4ebf779e256bb710f638b4452d94e97fb Author: Linus Walleij Date: Fri Mar 24 22:32:34 2017 +0100 clocksource/drivers/gemini: Rename Gemini timer to Faraday After some research it turns out that the "Gemini" timer is actually a generic IP block from Faraday Technology named FTTMR010, so as to not make things too confusing we need to rename the driver and its symbols to make sense. The implementation remains the same in this patch but we fix the copy-paste error in the timer name "nomadik_mtu" as we're at it. Signed-off-by: Linus Walleij Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 7 +- drivers/clocksource/Makefile | 2 +- drivers/clocksource/timer-fttmr010.c | 276 ++++++++++++++++++++++++++++++++++ drivers/clocksource/timer-gemini.c | 277 ----------------------------------- 4 files changed, 281 insertions(+), 281 deletions(-) commit bb0c6bb3b71cec4b00c3fb1c055f92ad05b905db Author: Linus Walleij Date: Fri Mar 24 22:32:33 2017 +0100 clocksource: Augment bindings for Faraday timer It turns out that the Cortina Gemini timer block is just a standard IP block from Faraday Technology named FTTMR010. In order to make things clear and understandable, we rename the bindings with a Faraday compatible as primary and the Cortina gemini as a more specific case. For the plain Faraday timer we require two clock references, while the Gemini can keep it's syscon lookup pattern. Signed-off-by: Linus Walleij Signed-off-by: Daniel Lezcano Acked-by: Rob Herring .../bindings/timer/cortina,gemini-timer.txt | 22 --------------- .../devicetree/bindings/timer/faraday,fttmr010.txt | 33 ++++++++++++++++++++++ 2 files changed, 33 insertions(+), 22 deletions(-) commit 500d0aa918a2ea6bb918fee8adcf27dc2912bcd1 Author: Alexander Kochetkov Date: Tue Jan 31 15:43:16 2017 +0300 ARM: dts: rockchip: disable arm-global-timer for rk3188 The clocksource and the sched_clock provided by the arm_global_timer are quite unstable because their rates depend on the cpu frequency. On the other side, the arm_global_timer has a higher rating than the rockchip_timer, it will be selected by default by the time framework while we want to use the stable rockchip clocksource. Let's disable the arm_global_timer in order to have the rockchip clocksource selected by default. Signed-off-by: Alexander Kochetkov Signed-off-by: Daniel Lezcano Reviewed-by: Heiko Stuebner arch/arm/boot/dts/rk3188.dtsi | 1 + 1 file changed, 1 insertion(+) commit 627988a66aee3c845aa2f1f874a3ddba8adb89d9 Author: Alexander Kochetkov Date: Tue Jan 31 15:43:15 2017 +0300 ARM: dts: rockchip: Add timer entries to rk3188 SoC The patch add two timers to all rk3188 based boards. The first timer is from alive subsystem and it act as a backup for the local timers at sleep time. It act the same as other SoC rockchip timers already present in kernel. The second timer is from CPU subsystem and act as replacement for the arm-global-timer clocksource and sched clock. It run at stable frequency 24MHz. Signed-off-by: Alexander Kochetkov Signed-off-by: Daniel Lezcano Reviewed-by: Heiko Stuebner arch/arm/boot/dts/rk3188.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 5e0a39d0f727b35c8b7ef56ba0724c8ceb006297 Author: Alexander Kochetkov Date: Tue Jan 31 15:43:14 2017 +0300 clocksource/drivers/rockchip_timer: Implement clocksource timer The clock supplying the arm-global-timer on the rk3188 is coming from the the cpu clock itself and thus changes its rate everytime cpufreq adjusts the cpu frequency making this timer unsuitable as a stable clocksource and sched clock. The rk3188, rk3288 and following socs share a separate timer block already handled by the rockchip-timer driver. Therefore adapt this driver to also be able to act as clocksource and sched clock on rk3188. In order to test clocksource you can run following commands and check how much time it take in real. On rk3188 it take about ~45 seconds. cpufreq-set -f 1.6GHZ date; sleep 60; date In order to use the patch you need to declare two timers in the dts file. The first timer will be initialized as clockevent provider and the second one as clocksource. The clockevent must be from alive subsystem as it used as backup for the local timers at sleep time. The patch does not break compatibility with older device tree files. The older device tree files contain only one timer. The timer will be initialized as clockevent, as expected. rk3288 (and probably anything newer) is irrelevant to this patch, as it has the arch timer interface. This patch may be useful for Cortex-A9/A5 based parts. Signed-off-by: Alexander Kochetkov Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 1 + drivers/clocksource/rockchip_timer.c | 218 +++++++++++++++++++++++++---------- 2 files changed, 158 insertions(+), 61 deletions(-) commit b72af3462dd8344285f6cc1ba726202b0d4eae20 Author: Alexander Kochetkov Date: Tue Jan 31 15:43:13 2017 +0300 ARM: dts: rockchip: Update compatible property for rk322x timer Property set to '"rockchip,rk3228-timer", "rockchip,rk3288-timer"' to match devicetree bindings. Signed-off-by: Alexander Kochetkov Suggested-by: Heiko Stübner Reviewed-by: Heiko Stuebner Signed-off-by: Daniel Lezcano arch/arm/boot/dts/rk322x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6463936b16dbc89845d28f4a89a6d7da8e87819 Author: Alexander Kochetkov Date: Tue Jan 31 15:43:12 2017 +0300 dt-bindings: Clarify compatible property for rockchip timers Make all properties description in form '"rockchip,-timer", "rockchip,rk3288-timer"' for all chips found in linux kernel. Suggested-by: Heiko Stübner Signed-off-by: Alexander Kochetkov Acked-by: Rob Herring Reviewed-by: Heiko Stuebner Signed-off-by: Daniel Lezcano .../devicetree/bindings/timer/rockchip,rk-timer.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit ac9ce6d1a0cc29767932d9f2fcb8ebc97c5106c8 Author: Rafał Miłecki Date: Thu Mar 9 10:47:10 2017 +0100 clocksource: Add missing line break to error messages Printing with pr_* functions requires adding line break manually. Signed-off-by: Rafał Miłecki Acked-by: Thierry Reding Signed-off-by: Daniel Lezcano drivers/clocksource/arc_timer.c | 14 +++++++------- drivers/clocksource/arm_arch_timer.c | 2 +- drivers/clocksource/asm9260_timer.c | 2 +- drivers/clocksource/bcm2835_timer.c | 6 +++--- drivers/clocksource/bcm_kona_timer.c | 2 +- drivers/clocksource/clksrc-probe.c | 2 +- drivers/clocksource/dw_apb_timer.c | 2 +- drivers/clocksource/meson6_timer.c | 4 ++-- drivers/clocksource/mips-gic-timer.c | 2 +- drivers/clocksource/nomadik-mtu.c | 8 ++++---- drivers/clocksource/pxa_timer.c | 6 +++--- drivers/clocksource/samsung_pwm_timer.c | 6 +++--- drivers/clocksource/sun4i_timer.c | 10 +++++----- drivers/clocksource/tegra20_timer.c | 2 +- drivers/clocksource/time-armada-370-xp.c | 16 ++++++++-------- drivers/clocksource/time-efm32.c | 2 +- drivers/clocksource/time-orion.c | 4 ++-- drivers/clocksource/timer-atmel-pit.c | 2 +- drivers/clocksource/timer-digicolor.c | 6 +++--- drivers/clocksource/timer-integrator-ap.c | 4 ++-- drivers/clocksource/timer-nps.c | 6 +++--- drivers/clocksource/timer-prima2.c | 10 +++++----- drivers/clocksource/timer-sp804.c | 4 ++-- drivers/clocksource/timer-sun5i.c | 6 +++--- drivers/clocksource/vf_pit_timer.c | 2 +- 25 files changed, 65 insertions(+), 65 deletions(-) commit 9a4914ce0dff47b53df9ffbf9f48120b86ccb4a3 Author: Russell King Date: Sat Mar 11 17:42:34 2017 +0000 clocksource/drivers/orion: Add delay_timer implementation Add an implementation for the ARM delay timer, which is used for udelay(). This provides less CPU dependent and more accurate delays - the CPU loop on Marvell Dove appears to calibrate to around 6% too short. Signed-off-by: Russell King Signed-off-by: Daniel Lezcano drivers/clocksource/time-orion.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 0d9298ea37b5f590f3d10ccc2d8d34d26af3fa84 Author: Russell King Date: Sat Mar 11 17:42:29 2017 +0000 clocksource/drivers/orion: Read clock rate once Rather than reading the clock rate three times, read it once - we are about to add a fourth usage. Signed-off-by: Russell King Signed-off-by: Daniel Lezcano drivers/clocksource/time-orion.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 6f551bd5fba381bfd5baf72027adf33bd79570f3 Merge: e2bbb96 c22a3f4 Author: David S. Miller Date: Fri Apr 7 07:18:28 2017 -0700 Merge branch 'stmmac-multiple-buffers' Joao Pinto says: ==================== net: stmmac: adding multiple buffers This patch adds multiple buffers to stmmac in a more fragmented way, in order to make problem debug easier. I would kindly request to people to test this patch in their HWs in order to check if everything's functional. Thank you. ==================== Tested-by: Corentin Labbe Signed-off-by: David S. Miller commit c22a3f48ef99ea4b02389f7f53080ed3ba220e77 Author: Joao Pinto Date: Thu Apr 6 09:49:11 2017 +0100 net: stmmac: adding multiple napi mechanism This patch adds the napi variable to the stmmac_rx_queue structure and forces that operations like netif_queue_stopped, netif_wake_queue, netif_stop_queue, netdev_reset_queue and netdev_sent_queue be made by queue. Signed-off-by: Joao Pinto Tested-by: Niklas Cassel Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac.h | 3 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 158 ++++++++++++++++------ 2 files changed, 120 insertions(+), 41 deletions(-) commit ce736788e8a92c12639311a9f01d55ccc997729c Author: Joao Pinto Date: Thu Apr 6 09:49:10 2017 +0100 net: stmmac: adding multiple buffers for TX This patch adds the structure stmmac_tx_queue which contains tx queues specific data (previously in stmmac_priv). Signed-off-by: Joao Pinto Tested-by: Niklas Cassel Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/chain_mode.c | 38 +- drivers/net/ethernet/stmicro/stmmac/ring_mode.c | 46 +- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 26 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 519 +++++++++++++--------- 4 files changed, 374 insertions(+), 255 deletions(-) commit 54139cf3bb33fad075737000f22749cafe3e83a0 Author: Joao Pinto Date: Thu Apr 6 09:49:09 2017 +0100 net: stmmac: adding multiple buffers for rx This patch adds the structure stmmac_rx_queue which contains rx queues specific data (previously in stmmac_priv). Signed-off-by: Joao Pinto Tested-by: Niklas Cassel Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/chain_mode.c | 7 +- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 26 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 457 ++++++++++++++-------- 3 files changed, 306 insertions(+), 184 deletions(-) commit 71fedb0198cbbdacc7e2d6b95e124a3821b5dca2 Author: Joao Pinto Date: Thu Apr 6 09:49:08 2017 +0100 net: stmmac: break some functions into RX and TX scopes This patch breaks several functions into RX and TX scopes, which will be useful when adding multiple buffers mechanism. Signed-off-by: Joao Pinto Tested-by: Niklas Cassel Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 352 ++++++++++++++++------ 1 file changed, 266 insertions(+), 86 deletions(-) commit e2bbb966c3dc593426a95fbcd2bb15ad8902959f Merge: 7db4c0d 82d8293 Author: David S. Miller Date: Fri Apr 7 07:03:35 2017 -0700 Merge branch 'net_device_stats' Tobias Klauser says: ==================== Use net_device_stats from struct net_device Along the lines of previous patches, switch (almost) all remaining net drivers to use net_device_stats from net_device instead of including a copy of it in their netdev_priv struct. ==================== Signed-off-by: David S. Miller commit 82d8293895cf3c23ec4957eeed484d5a5ce9021a Author: Tobias Klauser Date: Fri Apr 7 10:17:39 2017 +0200 usbnet: pegasus: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct pegasus, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Cc: Petko Manolov Cc: linux-usb@vger.kernel.org Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/usb/pegasus.c | 36 +++++++++++++++--------------------- drivers/net/usb/pegasus.h | 1 - 2 files changed, 15 insertions(+), 22 deletions(-) commit 6ffa770e311a11e760777b8a527a8d9562628b20 Author: Tobias Klauser Date: Fri Apr 7 10:17:38 2017 +0200 usbnet: kaweth: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct kaweth_device, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Cc: linux-usb@vger.kernel.org Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/usb/kaweth.c | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) commit 730826bfc3c227fc24436bb5d631a37412655838 Author: Tobias Klauser Date: Fri Apr 7 10:17:37 2017 +0200 net: typhoon: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct typhoon, use stats from struct net_device. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/3com/typhoon.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit ae9eb1a7e778e737d92a2b3b1fa6e798bd4c3a3b Author: Tobias Klauser Date: Fri Apr 7 10:17:36 2017 +0200 net: tulip: de2104x: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct de_private, use stats from struct net_device. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/dec/tulip/de2104x.c | 42 +++++++++++++++----------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit e807bcc7b98b1f9f293c2b587de1c36f258b12bf Author: Tobias Klauser Date: Fri Apr 7 10:17:35 2017 +0200 net: sunhme: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct happy_meal, use stats from struct net_device. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunhme.c | 22 +++++++++++----------- drivers/net/ethernet/sun/sunhme.h | 2 -- 2 files changed, 11 insertions(+), 13 deletions(-) commit 0ffa9373a06c65e32a05d35656b2260857d1e5ce Author: Tobias Klauser Date: Fri Apr 7 10:17:34 2017 +0200 net: sunbmac: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct bigmac, use stats from struct net_device. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunbmac.c | 18 +++++++++--------- drivers/net/ethernet/sun/sunbmac.h | 1 - 2 files changed, 9 insertions(+), 10 deletions(-) commit b09a9537c9925cc89815620b0bba773154edcad7 Author: Tobias Klauser Date: Fri Apr 7 10:17:33 2017 +0200 net: nuvoton: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct w90p910_ether, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/nuvoton/w90p910_ether.c | 33 ++++++++++------------------ 1 file changed, 11 insertions(+), 22 deletions(-) commit 71ef3cbb30444ebfba04f2a3afcf8c4743210ddd Author: Tobias Klauser Date: Fri Apr 7 10:17:32 2017 +0200 net: nmlan_cs: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct _mace_private, use stats from struct net_device. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/amd/nmclan_cs.c | 49 ++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 25 deletions(-) commit 8bf66b9d791d2de7ed43d34097ea6c2669e923d9 Author: Tobias Klauser Date: Fri Apr 7 10:17:31 2017 +0200 net: moxa: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct moxart_mac_priv_t, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/moxa/moxart_ether.c | 28 ++++++++++------------------ drivers/net/ethernet/moxa/moxart_ether.h | 1 - 2 files changed, 10 insertions(+), 19 deletions(-) commit 5f1d3a5c5ec3e020c1babbeb9d0f435fdf13bc39 Author: Tobias Klauser Date: Fri Apr 7 10:17:30 2017 +0200 net: macb: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct macb, use stats from struct net_device. Cc: Nicolas Ferre Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.c | 40 ++++++++++++++++++------------------- drivers/net/ethernet/cadence/macb.h | 1 - 2 files changed, 20 insertions(+), 21 deletions(-) commit 065f4b6992d02ba4ef27295687bdfbdfc7e85964 Author: Tobias Klauser Date: Fri Apr 7 10:17:29 2017 +0200 net: emac: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct emac_instance, use stats from struct net_device. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/ibm/emac/core.c | 2 +- drivers/net/ethernet/ibm/emac/core.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit a548779bb7da7d4041dc0015989e319ea4a3ae8a Author: Tobias Klauser Date: Fri Apr 7 10:17:28 2017 +0200 net: dl2k: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct netdev_private, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function and the #ifdef'ed increment of the collisions16 counter which doesn't exist in struct net_device_stats. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/dlink/dl2k.c | 45 +++++++++++++++++---------------------- drivers/net/ethernet/dlink/dl2k.h | 1 - 2 files changed, 20 insertions(+), 26 deletions(-) commit a73be7fe497915867712fa10e57638caeb11c231 Author: Tobias Klauser Date: Fri Apr 7 10:17:27 2017 +0200 net: cxgb3: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct port_info, use stats from struct net_device. Cc: Santosh Raspatur Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb3/adapter.h | 1 - drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit a3bb4560026cb3accd0097266eab21fe7526658e Author: Tobias Klauser Date: Fri Apr 7 10:17:26 2017 +0200 net: cxgb: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct port_info, use stats from struct net_device. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb/common.h | 1 - drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 0598e4f08e3da1fea2ee3b4765a44798147a8c62 Author: Steven Rostedt (VMware) Date: Thu Apr 6 10:28:12 2017 -0400 ftrace: Add use of synchronize_rcu_tasks() with dynamic trampolines The function tracer needs to be more careful than other subsystems when it comes to freeing data. Especially if that data is actually executable code. When a single function is traced, a trampoline can be dynamically allocated which is called to jump to the function trace callback. When the callback is no longer needed, the dynamic allocated trampoline needs to be freed. This is where the issues arise. The dynamically allocated trampoline must not be used again. As function tracing can trace all subsystems, including subsystems that are used to serialize aspects of freeing (namely RCU), it must take extra care when doing the freeing. Before synchronize_rcu_tasks() was around, there was no way for the function tracer to know that nothing was using the dynamically allocated trampoline when CONFIG_PREEMPT was enabled. That's because a task could be indefinitely preempted while sitting on the trampoline. Now with synchronize_rcu_tasks(), it will wait till all tasks have either voluntarily scheduled (not on the trampoline) or goes into userspace (not on the trampoline). Then it is safe to free the trampoline even with CONFIG_PREEMPT set. Acked-by: "Paul E. McKenney" Signed-off-by: Steven Rostedt (VMware) kernel/trace/Kconfig | 3 ++- kernel/trace/ftrace.c | 42 ++++++++++++++++++------------------------ 2 files changed, 20 insertions(+), 25 deletions(-) commit 7db4c0dd149ea027527a0d2fe5edd5f2fb415c72 Merge: 1ca2212 059eeb0 Author: David S. Miller Date: Fri Apr 7 06:26:15 2017 -0700 Merge branch 'qed-XDP-header-adjust' Yuval Mintz says: ==================== qede: support XDP head adjustments Daniel has brought to my attention the fact that qede is the only driver that currently supports XDP but still fails any program where xdp_adjust_head is set on the bpf_prog. This series is meant to remedy this and align qede with the rest of the driver, making it possible to remove said field. Patch #1 contains a minor cache-saving optimization for latter patches. Patches #2 & #3 address existing issues with the qede implementation [#2 should have been a part of this as it addresses something that's affected by the additional headroom; #3 is simply here for the ride]. Patches #4 & #5 add the necessary logic in driver for ingress headroom, the first adding the infrastrucutre needed for supporting the headroon [as currently qede doesn't support such], and the second removing the existing XDP limitation. ==================== Signed-off-by: David S. Miller commit 059eeb07e175086db1f84c1d8d29bb9aa8057797 Author: Mintz, Yuval Date: Fri Apr 7 11:05:01 2017 +0300 qede: Support XDP adjustment of headers In case an XDP program is attached, reserve XDP_PACKET_HEADROOM bytes at the beginning of the packet for the program to play with. Modify the XDP logic in the driver to fill-in the missing bits and re-calculate offsets and length after the program has finished running to properly reflect the current status of the packet. We can then go and remove the limitation of not supporting XDP programs where xdp_adjust_head is set. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_filter.c | 5 ----- drivers/net/ethernet/qlogic/qede/qede_fp.c | 17 +++++++++++------ drivers/net/ethernet/qlogic/qede/qede_main.c | 1 + 3 files changed, 12 insertions(+), 11 deletions(-) commit 15ed8a47ff0571dd268e37002511993b47e996bd Author: Mintz, Yuval Date: Fri Apr 7 11:05:00 2017 +0300 qede: Add support for ingress headroom Driver currently doesn't support any headroom; The only 'available' space it has in the head of the buffer is due to the placement offset. In order to allow [later] support of XDP adjustment of headroom, modify the the ingress flow to properly handle a scenario where the packets would have such. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede.h | 13 ++++++++----- drivers/net/ethernet/qlogic/qede/qede_fp.c | 23 +++++++++++++---------- drivers/net/ethernet/qlogic/qede/qede_main.c | 5 +++-- 3 files changed, 24 insertions(+), 17 deletions(-) commit 40b8c45492efc97d9d397475bf475d497fbb9174 Author: Mintz, Yuval Date: Fri Apr 7 11:04:59 2017 +0300 qede: Prevent VFs from using XDP Current implementation of VFs is very tight in regard to queue resources. VFs support for XDP would require quite a bit of additional infrastructure in qede and qed [sharing of queue-zones between queues, more VF cids, mapping of the doorbell bar, etc.]. For now, prevent XDP programs from being attached to VFs. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_filter.c | 5 +++++ 1 file changed, 5 insertions(+) commit 89e1afc44765d8b9f509d15df096494f14463e17 Author: Mintz, Yuval Date: Fri Apr 7 11:04:58 2017 +0300 qede: Correct XDP forward unmapping Driver is currently using dma_unmap_single() with the address it passed to device for the purpose of forwarding, but the XDP transmission buffer was originally a page allocated for the rx-queue. The mapped address is likely to differ from the original mapped address due to the placement offset. This difference is going to get even bigger once we support headroom. Cache the original mapped address of the page, and use it for unmapping of the buffer when completion arrives for the XDP forwarded packet. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede.h | 9 +++++++-- drivers/net/ethernet/qlogic/qede/qede_fp.c | 17 +++++++++-------- drivers/net/ethernet/qlogic/qede/qede_main.c | 8 ++++---- 3 files changed, 20 insertions(+), 14 deletions(-) commit 10a0176e4e6eb6243c4b1c55e50372e03139d592 Author: Mintz, Yuval Date: Fri Apr 7 11:04:57 2017 +0300 qede: Update receive statistic once per NAPI Currently, each time an ingress packet is passed to networking stack the driver increments a per-queue SW statistic. As we want to have additional fields in the first cache-line of the Rx-queue struct, change flow so this statistic would be updated once per NAPI run. We will later push the statistic to a different cache line. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_fp.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit fd33f3eca6bfb0bba9b928ba28a6c6c16f7243ad Author: Jerome Brunet Date: Fri Mar 31 12:14:17 2017 +0200 MAINTAINERS: Add maintainers for the meson clock driver Suggested-by: Michael Turquette Cc: Kevin Hilman , Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 1ca221262e63a8b786fe4fd1c85b94c2c7d9c21d Merge: 45e60cb 6c37c60 Author: David S. Miller Date: Fri Apr 7 05:52:52 2017 -0700 Merge branch 's390-next' Ursula Braun says: ==================== s390 patches for net-next here are some cleanup patches for drivers/s390/net. V2: respin, now patch "s390/qeth: improve endianness handling" is supposed to apply cleanly to net-next ==================== Signed-off-by: David S. Miller commit 6c37c60c2d3cd064b5abe838a0d5dc6255ea36fa Author: Hans Wippel Date: Fri Apr 7 09:15:38 2017 +0200 s390/netiucv: improve endianness handling Replace ntohs with endianness conversion for the SKB protocol assignment to avoid an endianness warning reported by sparse. No functional change. Signed-off-by: Hans Wippel Signed-off-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/netiucv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5cd77c135627f8d2b24df6d3487b3ac9219ed1a4 Author: Hans Wippel Date: Fri Apr 7 09:15:37 2017 +0200 s390/ctcm: improve endianness handling Use endianness conversions for SKB protocol assignments and usage to avoid endianness warnings reported by sparse. No functional changes. Signed-off-by: Hans Wippel Signed-off-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/ctcm_fsms.c | 2 +- drivers/s390/net/ctcm_main.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit 6bee4e26a39c51ffe698072ded1f5ab2062e4225 Author: Hans Wippel Date: Fri Apr 7 09:15:36 2017 +0200 s390/qeth: improve endianness handling Avoid endianness warnings reported by sparse by (1) using endianness conversions for assigning and using network packet fields, and (2) removing unnecessary endianness conversions from qeth_l3_rebuild_skb. No functional changes. Signed-off-by: Hans Wippel Signed-off-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 4 ++-- drivers/s390/net/qeth_core_main.c | 11 +++++----- drivers/s390/net/qeth_l3_main.c | 44 +++++++++++++++++++-------------------- drivers/s390/net/qeth_l3_sys.c | 4 ++-- 4 files changed, 32 insertions(+), 31 deletions(-) commit ff581f82330af0c0b8c10fe2fc80c9317dfd3577 Author: Julian Wiedmann Date: Fri Apr 7 09:15:35 2017 +0200 s390/qeth: Remove unused code 1. options.add_hhlen is set but never used, drop it 2. clean up no longer required forward declarations 3. delete all sorts of unused defines Signed-off-by: Julian Wiedmann Reviewed-by: Thomas Richter Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 5 ----- drivers/s390/net/qeth_core_main.c | 2 -- drivers/s390/net/qeth_core_mpc.h | 17 ----------------- drivers/s390/net/qeth_l2_main.c | 1 - drivers/s390/net/qeth_l2_sys.c | 3 --- drivers/s390/net/qeth_l3_main.c | 4 ---- 6 files changed, 32 deletions(-) commit d7a39937beca4bed9c8d7f877e099c5ac29afd56 Author: Julian Wiedmann Date: Fri Apr 7 09:15:34 2017 +0200 s390/qeth: remove unused return value qeth_qdio_output_handler() is the only caller of qeth_handle_send_error() and doesn't care about the return value. Signed-off-by: Julian Wiedmann Signed-off-by: Ursula Braun Reviewed-by: Thomas Richter Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 7 ------- drivers/s390/net/qeth_core_main.c | 7 +++---- 2 files changed, 3 insertions(+), 11 deletions(-) commit bbeb24145135583e405a1f9c041ebf935697983d Author: Julian Wiedmann Date: Fri Apr 7 09:15:33 2017 +0200 s390/qeth: fix up ssqd tracing The ac fields are bitmaps, so format them as hex. While at it, also print the ac2 field. Signed-off-by: Julian Wiedmann Signed-off-by: Ursula Braun Reviewed-by: Thomas Richter Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit aa59004bdc2e6569a7101fe196a56c6bd58b12d8 Author: Julian Wiedmann Date: Fri Apr 7 09:15:32 2017 +0200 s390/qeth: use QDIO_*_QFMT defines better use the constant definitions. Signed-off-by: Julian Wiedmann Signed-off-by: Ursula Braun Reviewed-by: Thomas Richter Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 44c43c98213fb123819c67c128a5d6c9a9a12280 Author: Lucas Stach Date: Wed Apr 5 15:19:09 2017 +0200 soc: imx: gpc: add workaround for i.MX6QP to the GPC PD driver On i.MX6QP, due to hardware erratum ERR009619, the PRE clocks may be stalled during the power up sequencing of the PU power domain. As this may lead to a complete loss of display output, the recommended workaround is to keep the PU domain enabled during normal system operation. Implement this by rejecting the domain power down request on the affected SoC. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo drivers/soc/imx/gpc.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 47905a1b844fc2154f79d38e09feecfb88bcfb8e Author: Lucas Stach Date: Wed Apr 5 15:19:08 2017 +0200 dt-bindings: imx-gpc: add i.MX6 QuadPlus compatible While the GPC on i.MX6QP is mostly comptible to the i.MX6Q one, the QuadPlus requires special workarounds for hardware erratum ERR009619. Signed-off-by: Lucas Stach Acked-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/power/fsl,imx-gpc.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7c42af783ab817f40a8cfb9aef05b6fb92b780b3 Author: Lucas Stach Date: Wed Apr 5 15:19:07 2017 +0200 soc: imx: gpc: add defines for domain index Makes referencing a specfic domain in the driver code less error prone. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo drivers/soc/imx/gpc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 45e60cb3fa4ef7663ed8e13ef4e9464df4301326 Merge: dc423b6 921c467 Author: David S. Miller Date: Fri Apr 7 05:41:49 2017 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-04-06 This series contains updates to i40e and i40evf. Preethi adds support for the outer checksum and TSO offloads for encapsulated packets for the VF. Mitch fixes a possible memory leak, where we need to remove the client instance when the driver unloads. Also we need to check to see if the client (i40iw) is already present during probe, and add a client instance if necessary. Lastly, make sure we close any attached clients when the driver is removed or shut down to prevent a kernel panic. ==================== Signed-off-by: David S. Miller commit ba9e7f2794d8158c93aacd279830a6f1f98b19b0 Author: Alexandre Belloni Date: Thu Apr 6 15:36:23 2017 +0200 pinctrl: at91-pio4: handle suspend to ram When suspending to RAM, the power to the core is cut and the register values are lost. Save and restore more registers than just IMR. Signed-off-by: Alexandre Belloni Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-at91-pio4.c | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) commit 5016bdb796b3726eec043ca0ce3be981f712c756 Author: Nate Watterson Date: Fri Apr 7 01:36:20 2017 -0400 iommu/iova: Fix underflow bug in __alloc_and_insert_iova_range Normally, calling alloc_iova() using an iova_domain with insufficient pfns remaining between start_pfn and dma_limit will fail and return a NULL pointer. Unexpectedly, if such a "full" iova_domain contains an iova with pfn_lo == 0, the alloc_iova() call will instead succeed and return an iova containing invalid pfns. This is caused by an underflow bug in __alloc_and_insert_iova_range() that occurs after walking the "full" iova tree when the search ends at the iova with pfn_lo == 0 and limit_pfn is then adjusted to be just below that (-1). This (now huge) limit_pfn gives the impression that a vast amount of space is available between it and start_pfn and thus a new iova is allocated with the invalid pfn_hi value, 0xFFF.... . To rememdy this, a check is introduced to ensure that adjustments to limit_pfn will not underflow. This issue has been observed in the wild, and is easily reproduced with the following sample code. struct iova_domain *iovad = kzalloc(sizeof(*iovad), GFP_KERNEL); struct iova *rsvd_iova, *good_iova, *bad_iova; unsigned long limit_pfn = 3; unsigned long start_pfn = 1; unsigned long va_size = 2; init_iova_domain(iovad, SZ_4K, start_pfn, limit_pfn); rsvd_iova = reserve_iova(iovad, 0, 0); good_iova = alloc_iova(iovad, va_size, limit_pfn, true); bad_iova = alloc_iova(iovad, va_size, limit_pfn, true); Prior to the patch, this yielded: *rsvd_iova == {0, 0} /* Expected */ *good_iova == {2, 3} /* Expected */ *bad_iova == {-2, -1} /* Oh no... */ After the patch, bad_iova is NULL as expected since inadequate space remains between limit_pfn and start_pfn after allocating good_iova. Signed-off-by: Nate Watterson Signed-off-by: Joerg Roedel drivers/iommu/iova.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03aa12629fc4f73acf28e519c9ee9cb1f5dd3706 Author: Andrey Smirnov Date: Tue Mar 28 08:19:45 2017 -0700 soc: imx: Add GPCv2 power gating driver Add code allowing for control of various power domains managed by GPCv2 IP block found in i.MX7 series of SoCs. Power domains covered by this patch are: - PCIE PHY - MIPI PHY - USB HSIC PHY - USB OTG1/2 PHY Support for any other power domain controlled by GPC is not present, and can be added at some later point. Testing of this code was done against a PCIe driver. Cc: yurovsky@gmail.com Cc: Lucas Stach Cc: Fabio Estevam Cc: Dong Aisheng Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov Signed-off-by: Shawn Guo drivers/soc/Kconfig | 1 + drivers/soc/imx/Kconfig | 9 ++ drivers/soc/imx/Makefile | 1 + drivers/soc/imx/gpcv2.c | 363 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 374 insertions(+) commit 2d9eb1dd58f26bbf782b043e8c29f9c3ca62a15c Author: Andrey Smirnov Date: Tue Mar 28 08:19:44 2017 -0700 dt-bindings: Add GPCv2 power gating driver Add DT bindings for power domain driver for GPCv2 IP block found in i.MX7 SoCs. Cc: yurovsky@gmail.com Cc: Lucas Stach Cc: Rob Herring Cc: Mark Rutland Cc: Fabio Estevam Cc: Dong Aisheng Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Andrey Smirnov Signed-off-by: Shawn Guo .../devicetree/bindings/power/fsl,imx-gpcv2.txt | 71 ++++++++++++++++++++++ include/dt-bindings/power/imx7-power.h | 16 +++++ 2 files changed, 87 insertions(+) commit 385aee965b4e4c36551c362a334378d2985b722a Author: Gerd Hoffmann Date: Thu Apr 6 17:59:40 2017 +0200 drm/virtio: don't leak bo on drm_gem_object_init failure Reported-by: 李强 Signed-off-by: Gerd Hoffmann Link: http://patchwork.freedesktop.org/patch/msgid/20170406155941.458-1-kraxel@redhat.com drivers/gpu/drm/virtio/virtgpu_object.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d69843e416d315123aea4831c3a7dfb299526681 Author: Marty Plummer Date: Thu Apr 6 19:42:06 2017 -0500 gpio: f7188x: Add F71889A GPIO support. Add F71889A GPIO support. Fintek F71889A is a SuperIO. It contains HWMON/GPIO/Serial Ports. Datasheet: http://www.alldatasheet.com/datasheet-pdf/pdf/459076/FINTEK/F71889A.html Its virtually identical to the F71889F superio as far as gpios go. One oddity is GPIO2 at index 0xD0; the datasheet only lists gpio's 7-5, but it logically seems that it should continue down to 0. I'm not sure if the driver can handle gpios that are shifted away from index 0 as it currently stands. Signed-off-by: Marty Plummer Signed-off-by: Linus Walleij drivers/gpio/gpio-f7188x.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit 4c0facddb7d88c78c8bd977c16faa647f079ccda Author: Laxman Dewangan Date: Thu Apr 6 19:05:52 2017 +0530 gpio: core: Decouple open drain/source flag with active low/high Currently, the GPIO interface is said to Open Drain if it is Single Ended and active LOW. Similarly, it is said as Open Source if it is Single Ended and active HIGH. The active HIGH/LOW is used in the interface for setting the pin state to HIGH or LOW when enabling/disabling the interface. In Open Drain interface, pin is set to HIGH by putting pin in high impedance and LOW by driving to the LOW. In Open Source interface, pin is set to HIGH by driving pin to HIGH and set to LOW by putting pin in high impedance. With above, the Open Drain/Source is unrelated to the active LOW/HIGH in interface. There is interface where the enable/disable of interface is ether active LOW or HIGH but it is Open Drain type. Hence decouple the Open Drain with Single Ended + Active LOW and Open Source with Single Ended + Active HIGH. Adding different flag for the Open Drain/Open Source which is valid only when Single ended flag is enabled. Signed-off-by: Laxman Dewangan Signed-off-by: Linus Walleij drivers/gpio/gpiolib-of.c | 2 +- drivers/gpio/gpiolib.c | 4 +++- include/dt-bindings/gpio/gpio.h | 12 ++++++++---- include/linux/of_gpio.h | 1 + 4 files changed, 13 insertions(+), 6 deletions(-) commit d003d029cea8a28139b4f9b88a36b8fac864f45b Author: Marc Zyngier Date: Tue Feb 21 15:04:27 2017 +0000 arm64: arch_timer: Add HISILICON_ERRATUM_161010101 ACPI matching data In order to deal with ACPI enabled platforms suffering from the HISILICON_ERRATUM_161010101, let's add the required OEM data that allow the workaround to be enabled. Acked-by: Thomas Gleixner Tested-by: dann frazier Tested-by: Hanjun Guo Reviewed-by: Hanjun Guo Signed-off-by: Marc Zyngier drivers/clocksource/arm_arch_timer.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 5a38bcac1f2f0bd0d24700690e36a277ffd0396d Author: Marc Zyngier Date: Tue Feb 21 14:37:30 2017 +0000 arm64: arch_timer: Allow erratum matching with ACPI OEM information Just as we're able to identify a broken platform using some DT information, let's enable a way to spot the offenders with ACPI. The difference is that we can only match on some OEM info instead of implementation-specific properties. So in order to avoid the insane multiplication of errata structures, we allow an array of OEM descriptions to be attached to an erratum structure. Acked-by: Thomas Gleixner Tested-by: dann frazier Tested-by: Hanjun Guo Reviewed-by: Hanjun Guo Signed-off-by: Marc Zyngier arch/arm64/include/asm/arch_timer.h | 1 + drivers/clocksource/arm_arch_timer.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) commit fa8d815fac96e7c9247783d5a1f8fa4685b3c543 Author: Marc Zyngier Date: Fri Jan 27 12:52:31 2017 +0000 arm64: arch_timer: Workaround for Cortex-A73 erratum 858921 Cortex-A73 (all versions) counter read can return a wrong value when the counter crosses a 32bit boundary. The workaround involves performing the read twice, and to return one or the other depending on whether a transition has taken place. Acked-by: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/clocksource/Kconfig | 11 +++++++++++ drivers/clocksource/arm_arch_timer.c | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+) commit a86bd139f2ae02f960caeb0c1dd5f871d3e087cd Author: Marc Zyngier Date: Wed Feb 1 12:07:15 2017 +0000 arm64: arch_timer: Enable CNTVCT_EL0 trap if workaround is enabled Userspace being allowed to use read CNTVCT_EL0 anytime (and not only in the VDSO), we need to enable trapping whenever a cntvct workaround is enabled on a given CPU. Acked-by: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/clocksource/arm_arch_timer.c | 45 +++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 13 deletions(-) commit bee67c53a990452c4f3c7a0e9cebfecb5acfbde3 Author: Marc Zyngier Date: Tue Apr 4 17:05:16 2017 +0100 arm64: arch_timer: Save cntkctl_el1 as a per-cpu variable As we're about to allow per CPU cntkctl_el1 configuration, we cannot rely on the register value to be common when performing power management. Let's turn saved_cntkctl into a per-cpu variable. Acked-by: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/clocksource/arm_arch_timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 992dd16f6528bd3f378dbcda43688d374be02943 Author: Marc Zyngier Date: Wed Feb 1 11:53:46 2017 +0000 arm64: arch_timer: Move clocksource_counter and co around In order to access clocksource_counter from the errata handling code, move it (together with the related structures and functions) towards the top of the file. Acked-by: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/clocksource/arm_arch_timer.c | 62 ++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 31 deletions(-) commit 6acc71ccac7187fc0ef85f10bd09c2058f21fab5 Author: Marc Zyngier Date: Mon Feb 20 18:34:48 2017 +0000 arm64: arch_timer: Allows a CPU-specific erratum to only affect a subset of CPUs Instead of applying a CPU-specific workaround to all CPUs in the system, allow it to only affect a subset of them (typical big-little case). This is done by turning the erratum pointer into a per-CPU variable. Acked-by: Thomas Gleixner Signed-off-by: Marc Zyngier arch/arm64/include/asm/arch_timer.h | 31 ++++++++++++++++---------- drivers/clocksource/arm_arch_timer.c | 42 +++++++++++++++++++++++++----------- 2 files changed, 50 insertions(+), 23 deletions(-) commit 8c64621bf9501902a3086a5e38135344b3161128 Author: Marc Zyngier Date: Fri Jan 27 10:34:13 2017 +0000 arm64: arch_timer: Make workaround methods optional Not all errata need to workaround all access types. Allow them to be optional. Acked-by: Thomas Gleixner Signed-off-by: Marc Zyngier arch/arm64/include/asm/arch_timer.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 01d3e3ff26080040cb02ec4989a0da36d069f1e9 Author: Marc Zyngier Date: Fri Jan 27 10:27:09 2017 +0000 arm64: arch_timer: Rework the set_next_event workarounds The way we work around errata affecting set_next_event is not very nice, at it imposes this workaround on errata that do not need it. Add new workaround hooks and let the existing workarounds use them. Acked-by: Thomas Gleixner Signed-off-by: Marc Zyngier arch/arm64/include/asm/arch_timer.h | 4 ++++ drivers/clocksource/arm_arch_timer.c | 31 ++++++++++++++++++++++++++----- 2 files changed, 30 insertions(+), 5 deletions(-) commit 8328089f0aeba39173eee3fc109b5c77efd64747 Author: Marc Zyngier Date: Fri Jan 27 10:27:09 2017 +0000 arm64: arch_timer: Get rid of erratum_workaround_set_sne Let's move the handling of workarounds affecting set_next_event to the affected function, instead of overriding the pointers as an afterthough. Yes, this is an extra indirection on the erratum handling path, but the HW is busted anyway. This will allow for some more flexibility later. Acked-by: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/clocksource/arm_arch_timer.c | 90 ++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 49 deletions(-) commit eeb1efbcb83c0cfe6d567abbacd675bbddf3d658 Author: Marc Zyngier Date: Mon Mar 20 17:18:06 2017 +0000 arm64: cpu_errata: Add capability to advertise Cortex-A73 erratum 858921 In order to work around Cortex-A73 erratum 858921 in a subsequent patch, add the required capability that advertise the erratum. As the configuration option it depends on is not present yet, this has no immediate effect. Acked-by: Thomas Gleixner Acked-by: Daniel Lezcano Signed-off-by: Marc Zyngier Documentation/arm64/silicon-errata.txt | 1 + arch/arm64/include/asm/cpucaps.h | 3 ++- arch/arm64/kernel/cpu_errata.c | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) commit f4e00a1a55c7f9b08a48b57088ac5d044d5523d5 Author: Marc Zyngier Date: Fri Jan 20 18:28:32 2017 +0000 arm64: arch_timer: Move arch_timer_reg_read/write around As we're about to move things around, let's start with the low level read/write functions. This allows us to use these functions in the errata handling code without having to use forward declaration of static functions. Acked-by: Thomas Gleixner Acked-by: Mark Rutland Acked-by: Daniel Lezcano Signed-off-by: Marc Zyngier drivers/clocksource/arm_arch_timer.c | 124 +++++++++++++++++------------------ 1 file changed, 62 insertions(+), 62 deletions(-) commit 06f1494f837da8997d670a1ba87add7963b08922 Author: Marc Zyngier Date: Wed Feb 1 14:38:46 2017 +0000 arm64: cpu_errata: Allow an erratum to be match for all revisions of a core Some minor erratum may not be fixed in further revisions of a core, leading to a situation where the workaround needs to be updated each time an updated core is released. Introduce a MIDR_ALL_VERSIONS match helper that will work for all versions of that MIDR, once and for all. Acked-by: Thomas Gleixner Acked-by: Mark Rutland Acked-by: Daniel Lezcano Reviewed-by: Suzuki K Poulose Signed-off-by: Marc Zyngier arch/arm64/kernel/cpu_errata.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 0064030c6fd4ca6cfab42de037b2a89445beeead Author: Marc Zyngier Date: Mon Mar 20 16:47:59 2017 +0000 arm64: arch_timer: Add erratum handler for CPU-specific capability Should we ever have a workaround for an erratum that is detected using a capability and affecting a particular CPU, it'd be nice to have a way to probe them directly. Acked-by: Thomas Gleixner Signed-off-by: Marc Zyngier arch/arm64/include/asm/arch_timer.h | 1 + drivers/clocksource/arm_arch_timer.c | 28 ++++++++++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) commit 199fd2bff4040985fbd7853cc39b7245fcf54bb9 Author: Marc Zyngier Date: Mon Jan 30 14:18:49 2017 +0000 arm64: Define Cortex-A73 MIDR As we're about to introduce a new workaround that is specific to Cortex-A73, let's define the coresponding MIDR. Acked-by: Thomas Gleixner Acked-by: Mark Rutland Signed-off-by: Marc Zyngier arch/arm64/include/asm/cputype.h | 2 ++ 1 file changed, 2 insertions(+) commit 651bb2e9dca6e6dbad3fba5f6e6086a23575b8b5 Author: Marc Zyngier Date: Thu Jan 19 17:20:59 2017 +0000 arm64: arch_timer: Add infrastructure for multiple erratum detection methods We're currently stuck with DT when it comes to handling errata, which is pretty restrictive. In order to make things more flexible, let's introduce an infrastructure that could support alternative discovery methods. No change in functionality. Acked-by: Thomas Gleixner Reviewed-by: Hanjun Guo Signed-off-by: Marc Zyngier arch/arm64/include/asm/arch_timer.h | 7 ++- drivers/clocksource/arm_arch_timer.c | 83 +++++++++++++++++++++++++++++++----- 2 files changed, 78 insertions(+), 12 deletions(-) commit 6126ce0588eb5a0752d5c8b5796a7fca324fd887 Author: Marc Zyngier Date: Wed Feb 1 11:48:58 2017 +0000 arm64: Add CNTVCT_EL0 trap handler Since people seem to make a point in breaking the userspace visible counter, we have no choice but to trap the access. Add the required handler. Acked-by: Thomas Gleixner Acked-by: Mark Rutland Signed-off-by: Marc Zyngier arch/arm64/include/asm/esr.h | 2 ++ arch/arm64/kernel/traps.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) commit 8f4137588261d7504f4aa022dc9d1a1fd1940e8e Author: Marc Zyngier Date: Mon Jan 30 15:39:52 2017 +0000 arm64: Allow checking of a CPU-local erratum this_cpu_has_cap() only checks the feature array, and not the errata one. In order to be able to check for a CPU-local erratum, allow it to inspect the latter as well. This is consistent with cpus_have_cap()'s behaviour, which includes errata already. Acked-by: Thomas Gleixner Acked-by: Daniel Lezcano Reviewed-by: Suzuki K Poulose Signed-off-by: Marc Zyngier arch/arm64/kernel/cpufeature.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 11598d1740500e3c1848122f3e77ab017aa38b77 Author: Charles Keepax Date: Wed Apr 5 16:50:46 2017 +0100 gpio: arizona: Correct handling for reading input GPIOs The GPIO register is cached since all the configuration resides within it, however, this means for input GPIOs the driver will not return the actual state but the last value written to the register cache. To correct this in the case of reading an input GPIO resume the CODEC and drop the cache for the input register to ensure an actual hardware read takes place. Signed-off-by: Charles Keepax Signed-off-by: Linus Walleij drivers/gpio/gpio-arizona.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit 8d5e7c5df0a6c442373628be5221321172b1badf Author: Jacopo Mondi Date: Thu Apr 6 12:35:55 2017 +0200 Documentation: pinctrl: Add "pinmux" property Document "pinmux" property as part of generic pin controller documentation. Fix 2 minor typos in documentation while at there. Signed-off-by: Jacopo Mondi Signed-off-by: Linus Walleij .../bindings/pinctrl/pinctrl-bindings.txt | 46 +++++++++++++++++++--- 1 file changed, 41 insertions(+), 5 deletions(-) commit ba3fae06c7a4e80ab9d48a8a045b352da97cf23d Author: Linus Walleij Date: Wed Feb 1 10:41:43 2017 +0100 ARM/clk: move the ICST library to drivers/clk This moves the ICST clock divider helper library from arch/arm/common to drivers/clk/versatile so it is maintained with the other clock drivers. We keep the structure as a helper library intact and do not fuse it with the clk-icst.c Versatile ICST clock driver: there may be other users out there that need to use this library for their clocking, and then it will be helpful to keep the library contained. (The icst.[c|h] files could just be moved to drivers/clk/lib or a similar location to share the library.) Acked-by: Stephen Boyd Signed-off-by: Linus Walleij arch/arm/common/Kconfig | 3 - arch/arm/common/Makefile | 1 - arch/arm/common/icst.c | 105 ---------------------------------- arch/arm/include/asm/hardware/icst.h | 59 ------------------- drivers/clk/versatile/Kconfig | 3 + drivers/clk/versatile/Makefile | 2 +- drivers/clk/versatile/clk-icst.c | 1 + drivers/clk/versatile/clk-icst.h | 2 - drivers/clk/versatile/clk-impd1.c | 1 + drivers/clk/versatile/clk-realview.c | 1 + drivers/clk/versatile/clk-versatile.c | 1 + drivers/clk/versatile/icst.c | 105 ++++++++++++++++++++++++++++++++++ drivers/clk/versatile/icst.h | 57 ++++++++++++++++++ 13 files changed, 170 insertions(+), 171 deletions(-) commit b6acb2e4d934afffafb318a5c342243a482b25f1 Author: Linus Walleij Date: Wed Feb 1 10:34:41 2017 +0100 ARM: plat-versatile: remove stale clock header All the Versatile platforms (Integrator, Versatile, RealView Versatile Express) have been migrated to use the drivers/clk subsystem. Clean out this header that is not referenced anywhere anymore. Acked-by: Stephen Boyd Signed-off-by: Linus Walleij arch/arm/plat-versatile/include/plat/clock.h | 15 --------------- 1 file changed, 15 deletions(-) commit 9dbbbd33aafaf1f95b1cce940bdf4331cd8b822e Author: Youlin Pei Date: Fri Apr 7 16:06:36 2017 +0800 irqchip: Add Mediatek mtk-cirq driver In Mediatek SOCs, the CIRQ is a low power interrupt controller designed to works outside MCUSYS which comprises with Cortex-Ax cores,CCI and GIC. The CIRQ controller is integrated in between MCUSYS( include Cortex-Ax, CCI and GIC ) and interrupt sources as the second level interrupt controller. The external interrupts which outside MCUSYS will feed through CIRQ then bypass to GIC. CIRQ can monitors all edge trigger interupts. When an edge interrupt is triggered, CIRQ can record the status and generate a pulse signal to GIC when flush command executed. When system enters sleep mode, MCUSYS will be turned off to improve power consumption, also GIC is power down. The edge trigger interrupts will be lost in this scenario without CIRQ. This commit provides the CIRQ irqchip implement. Signed-off-by: Youlin Pei Signed-off-by: Marc Zyngier drivers/irqchip/Makefile | 2 +- drivers/irqchip/irq-mtk-cirq.c | 306 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 307 insertions(+), 1 deletion(-) commit f59dd407bfc2f32ec2cf4476a2e582be03368397 Author: Youlin Pei Date: Fri Apr 7 16:06:35 2017 +0800 dt-bindings: mtk-cirq: Add binding document This commit adds the device tree binding document for the mediatek cirq. Acked-by: Rob Herring Signed-off-by: Youlin Pei Signed-off-by: Marc Zyngier .../interrupt-controller/mediatek,cirq.txt | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit c2c8661fd717e2f29cd099ed213b565830b5cbcc Author: Marc Zyngier Date: Wed Mar 29 15:13:07 2017 +0100 irqchip/gic-v3-its: Add IORT hook for platform MSI support Getting hold of the DevID requires us to call iort_pmsi_get_dev_id(). Since iort_pmsi_get_dev_id() may or may not be implemented, we provide a weak function that acts as a stub. The weak function will be removed when the ACPI counterpart is merged. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its-platform-msi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit f907c515ffb06e6fd5e74397badd674f3c233418 Author: Hanjun Guo Date: Tue Mar 28 20:21:05 2017 +0800 irqchip/mbigen: Add ACPI support With the preparation of platform msi support and interrupt producer in commit d44fa3d46079 ("ACPI: Add support for ResourceSource/IRQ domain mapping"), we can add mbigen ACPI support now. Now that the major framework changes are ready, we just need to add the ACPI probe code which creates the irqdomain for devices connecting to it. In order to create the irqdomain, we need to know the number of hw irqs as input which is provided by mbigen. In DT case, we are using "num-pins" property to describe it, and we will take advantage of that too using _DSD in ACPI as there is no standard way of describe it in ACPI way, also according to the _DSD rule described in Documentation/acpi/DSD-properties-rules.txt, it doesn't break the rules. The DSDT is represented as below: For mbigen, Device(MBI0) { Name(_HID, "HISI0152") Name(_UID, Zero) Name(_CRS, ResourceTemplate() { Memory32Fixed(ReadWrite, 0xa0080000, 0x10000) }) Name(_DSD, Package () { ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package () {"num-pins", 378} } }) } For devices, Device(SAS0) { Name(_HID, "HISIxxxx") Name(_UID, Zero) Name(_CRS, ResourceTemplate() { Memory32Fixed(ReadWrite, 0xb0030000, 0x10000) Interrupt(ResourceConsumer,..., "\_SB.MBI0") {12, ...} }) } So for the devices connected to the mbigen, as we clearly say that it refers to a specific interrupt controller (mbigen), we can get the virq from mbigen's irqdomain once it's created successfully. Signed-off-by: Hanjun Guo Signed-off-by: MaJun Cc: Al Stone Cc: Darren Hart Cc: Lorenzo Pieralisi Signed-off-by: Marc Zyngier drivers/irqchip/irq-mbigen.c | 75 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 3 deletions(-) commit 76e1f77f9c26ec96ce58f46cc74ad07c731bd7ba Author: Kefeng Wang Date: Tue Mar 7 20:40:09 2017 +0800 irqchip/mbigen: Introduce mbigen_of_create_domain() Introduce mbigen_of_create_domain() to consolidate OF related code and prepare for ACPI later, no funtional change. Signed-off-by: Kefeng Wang Signed-off-by: Hanjun Guo Reviewed-by: Ma Jun Tested-by: Ming Lei Tested-by: Wei Xu Cc: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/irqchip/irq-mbigen.c | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) commit 2911c6d961b35fceaf1fdede3c55e11dc3423be1 Author: Kefeng Wang Date: Tue Mar 7 20:40:08 2017 +0800 irqchip/mbigen: Drop module owner Module owner will be set by driver core, so drop it. Signed-off-by: Kefeng Wang Signed-off-by: Hanjun Guo Reviewed-by: Ma Jun Tested-by: Ming Lei Tested-by: Wei Xu Cc: Marc Zyngier Cc: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/irqchip/irq-mbigen.c | 1 - 1 file changed, 1 deletion(-) commit 6943acf67311e888445998bdac7ac8f766612158 Author: Hanjun Guo Date: Tue Mar 7 20:40:07 2017 +0800 platform-msi: Make platform_msi_create_device_domain() ACPI aware The irqdomain creation that is carried out in: platform_msi_create_device_domain() relies on the fwnode_handle interrupt controller token to associate the interrupt controller with a specific irqdomain. Current code relies on the OF layer to retrieve a fwnode_handle for the device representing the interrupt controller from its device->of_node pointer. This makes platform_msi_create_device_domain() DT specific whilst it really is not because after the merge of commit f94277af03ea ("of/platform: Initialise dev->fwnode appropriately") the fwnode_handle can easily be retrieved from the dev->fwnode pointer in a firmware agnostic way. Update platform_msi_create_device_domain() to retrieve the interrupt controller fwnode_handle from the dev->fwnode pointer so that it can be used seamlessly in ACPI and DT systems. Signed-off-by: Hanjun Guo Signed-off-by: Lorenzo Pieralisi Tested-by: Ming Lei Tested-by: Wei Xu Cc: Greg KH Cc: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/base/platform-msi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f785f7d2e37872a3aada7e4a399388bb68f43136 Author: Hanjun Guo Date: Tue Mar 7 20:40:02 2017 +0800 irqchip/gicv3-its: platform-msi: Scan MADT to create platform msi domain With the introduction of its_pmsi_init_one(), support for ACPI firmware interface can be plugged into the gicv3 ITS driver. Add code to scan the MADT table to get the ITS entry(ies), then use the information to create the platform msi domain for devices connected to it, mirroring the ITS PCI MSI code path. Signed-off-by: Hanjun Guo [lorenzo.pieralisi@arm.com: rewrote commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Matthias Brugger Tested-by: Ming Lei Tested-by: Wei Xu Tested-by: Sinan Kaya Cc: Tomasz Nowicki Cc: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its-platform-msi.c | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 42677db9004f959f6f881c6c138d080c0923b5e2 Author: Hanjun Guo Date: Tue Mar 7 20:40:01 2017 +0800 irqchip/gicv3-its: platform-msi: Refactor its_pmsi_init() to prepare for ACPI Introduce its_pmsi_init_one() to separate firmware dependent code (ie OF dependent code) and firmware agnostic code so that gic3-its code can be made to support other firmware bindings easily. Signed-off-by: Hanjun Guo [lorenzo.pieralisi@arm.com: rewrote commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Matthias Brugger Tested-by: Ming Lei Tested-by: Wei Xu Tested-by: Sinan Kaya Cc: Tomasz Nowicki Cc: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its-platform-msi.c | 45 ++++++++++++++++----------- 1 file changed, 27 insertions(+), 18 deletions(-) commit 9ab460c2289dda9c5b37463f1509553f4b4b0215 Author: Hanjun Guo Date: Tue Mar 7 20:40:00 2017 +0800 irqchip/gicv3-its: platform-msi: Refactor its_pmsi_prepare() By adding ACPI support for platform MSI, the gicv3 driver has to provide code to retrieve the dev id through ACPI instead of device tree bindings; given that its_pmsi_prepare() allows already to get the dev id but it is OF dependent, factor OF related code out into a single function to make its_pmsi_prepare() ready to be used with other firmware interfaces. Signed-off-by: Hanjun Guo [lorenzo.pieralisi@arm.com: rewrote commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Matthias Brugger Tested-by: Ming Lei Tested-by: Wei Xu Tested-by: Sinan Kaya Cc: Tomasz Nowicki Cc: Thomas Gleixner Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its-platform-msi.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 8d3554b84af909549f0197ec6e68f24006a9d3f2 Author: Hanjun Guo Date: Tue Mar 7 20:39:59 2017 +0800 irqchip/gic-v3-its: Keep the include header files in alphabetic order Rearrange header file includes in alphabetic order. Signed-off-by: Hanjun Guo [lorenzo.pieralisi@arm.com: fixed commit log] Signed-off-by: Lorenzo Pieralisi Tested-by: Ming Lei Tested-by: Wei Xu Tested-by: Sinan Kaya Cc: Tomasz Nowicki Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e11d16c2e45bcc4dbaf414e95365b0f6005b342 Author: Mars Cheng Date: Sun Mar 19 23:26:24 2017 +0800 irqchip/mtk-sysirq: Remove unnecessary barrier when configuring trigger This prevent unnecessary visibility when configuring trigger type Signed-off-by: Mars Cheng Signed-off-by: Marc Zyngier drivers/irqchip/irq-mtk-sysirq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13683f9bb6166ba0d67e8f89cad85e064032c0f8 Author: Mars Cheng Date: Sun Mar 19 23:26:23 2017 +0800 irqchip/mtk-sysirq: Extend intpol base to arbitrary number Originally driver only supports one base. However, MT6797 has more than one bases to configure interrupt polarity. To support possible design change, here comes a solution to use arbitrary number of bases. Signed-off-by: Mars Cheng Signed-off-by: Marc Zyngier drivers/irqchip/irq-mtk-sysirq.c | 116 ++++++++++++++++++++++++++++++++------- 1 file changed, 95 insertions(+), 21 deletions(-) commit 6bffa7e1631d55b56f4de82510157fe8fa97e359 Author: Geert Uytterhoeven Date: Mon Apr 3 10:32:42 2017 +0200 pinctrl: pinmux: Fix kerneldoc for pinmux_generic_add_function() Correct the incorrect function name and description. Fixes: a76edc89b100e4fe ("pinctrl: core: Add generic pinctrl functions for managing groups") Signed-off-by: Geert Uytterhoeven Acked-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/pinctrl/pinmux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d240fe0a4066e592f8e3a698d8648bdd47bc51b7 Author: Mars Cheng Date: Sun Mar 19 23:26:22 2017 +0800 dt-bindings: mtk-sysirq: Add multiple bases support for Mediatek sysirq This describes how to specify multiple base addresses for sysirq in mediatek platforms. Acked-by: Rob Herring Signed-off-by: Mars Cheng Signed-off-by: Marc Zyngier .../bindings/interrupt-controller/mediatek,sysirq.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 5195c206fda39a10d946505d95ec653e2b83a8ab Author: Sergey Temerkhanov Date: Thu Apr 6 11:38:34 2017 +0000 EDAC, thunderx: Remove unused code Remove unused code reserved for upcoming CPUs. Reported-by: Dan Carpenter Signed-off-by: Sergey Temerkhanov Cc: David Daney Cc: Jan.Glauber@cavium.com Cc: linux-edac Link: http://lkml.kernel.org/r/20170406113834.17153-1-s.temerkhanov@gmail.com Signed-off-by: Borislav Petkov drivers/edac/thunderx_edac.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 00df0582eab1294d10ca615a8ef645e0bb57a6e3 Author: Jesper Nilsson Date: Mon Apr 3 14:47:04 2017 +0200 pinctrl: Add pincontrol driver for ARTPEC-6 SoC Add pinctrl driver support for the Axis ARTPEC-6 SoC. There are only some pins that actually have different functions available, but all can control bias (pull-up/-down) and drive strength. Code originally written by Chris Paterson. Signed-off-by: Jesper Nilsson Signed-off-by: Linus Walleij MAINTAINERS | 1 + drivers/pinctrl/Kconfig | 11 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-artpec6.c | 992 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 1005 insertions(+) commit 3d2d8c0f84ca518da9210b3f855643efd1629e07 Author: Sergey Temerkhanov Date: Thu Apr 6 11:37:55 2017 +0000 EDAC, thunderx: Change LMC index calculation Shift the node number by 3 bits instead of 8 allowing proper functioning with default EDAC_MAX_MCS. Signed-off-by: Sergey Temerkhanov Cc: David Daney Cc: Jan.Glauber@cavium.com Cc: linux-edac Link: http://lkml.kernel.org/r/20170406113755.17082-1-s.temerkhanov@gmail.com Signed-off-by: Borislav Petkov drivers/edac/thunderx_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c6c149be390e02a5ac6ace4efb9f03716431bbe Author: Jesper Nilsson Date: Thu Mar 30 13:27:44 2017 +0200 pinctrl: Add bindings for ARTPEC-6 pinmux Add the bindings for the pinmux functions in the ARTPEC-6 SoC, including bias and drive strength. Signed-off-by: Jesper Nilsson Acked-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/pinctrl/axis,artpec6-pinctrl.txt | 85 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 86 insertions(+) commit 390d2d490b4618fe147927778a8fdbc8e22f3dc3 Author: Linus Walleij Date: Sat Mar 18 17:53:26 2017 +0100 irqchip/faraday: Replace moxa with ftintc010 The Moxa Art interrupt controller is very very likely just an instance of the Faraday FTINTC010 interrupt controller from Faraday Technology. An indication would be its close association with the FA526 ARM core and the fact that the register layout is the same. The implementation in irq-moxart.c can probably be right off replaced with the irq-ftintc010.c driver by adding a compatible string, selecting this irqchip from the machine and run. As a bonus we have an irqchip driver supporting high/low and rising/falling edges for the Moxa Art, and shared code with the Gemini platform. Acked-by: Olof Johansson Tested-by: Jonas Jensen Signed-off-by: Linus Walleij Signed-off-by: Marc Zyngier arch/arm/mach-moxart/Kconfig | 2 +- drivers/irqchip/Makefile | 1 - drivers/irqchip/irq-ftintc010.c | 2 + drivers/irqchip/irq-moxart.c | 116 ---------------------------------------- 4 files changed, 3 insertions(+), 118 deletions(-) commit d2d55ab8ad845807311130a40fc87dd5163f7133 Author: Linus Walleij Date: Sat Mar 18 17:53:25 2017 +0100 irqchip/faraday: Fix the trigger types The triggers in the driver were right for high level triggered IRQs but the edge detection on edge triggered IRQs was wrong. After studying a proper driver from Po-Yu Chuang I now know how to handle these right, and we can properly implement low level IRQs as well. The device trees for the Gemini had polarity switched around so these have been fixed to conform to the right polarity as well. Cc: Greentime Hu Signed-off-by: Linus Walleij Signed-off-by: Marc Zyngier drivers/irqchip/irq-ftintc010.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 6ee532e2faa9979f0ee00afbfd39cbc034b99153 Author: Linus Walleij Date: Sat Mar 18 17:53:24 2017 +0100 irqchip/gemini: Refactor Gemini driver to reflect Faraday origin The Gemini irqchip turns out to be a standard IP component from Faraday Technology named FTINTC010 after some research and new information. - Rename the driver and all symbols to reflect the new information. - Add the new compatible string "faraday,ftintc010" - Create a Kconfig symbol CONFIG_FARADAY_FTINTC010 so that SoCs using this interrupt controller can easily select and reuse it instead of hardwiring it to ARCH_GEMINI I have created a separate patch to select the new Kconfig symbol from the Gemini machine, which will be merged through the ARM SoC tree. Cc: Greentime Hu Cc: Paulius Zaleckas Signed-off-by: Linus Walleij Signed-off-by: Marc Zyngier drivers/irqchip/Kconfig | 6 ++ drivers/irqchip/Makefile | 2 +- drivers/irqchip/irq-ftintc010.c | 187 ++++++++++++++++++++++++++++++++++++++++ drivers/irqchip/irq-gemini.c | 185 --------------------------------------- 4 files changed, 194 insertions(+), 186 deletions(-) commit 77a452551b73aec0817d58ecf6d0dd1e74dab90c Author: Linus Walleij Date: Sat Mar 18 17:53:23 2017 +0100 dt-bindings: gemini: augment Gemini bindings to reflect Faraday origin When we merged the Gemini interrupt controller it was not yet discovered that this IP block is actually a standard Faraday Technology interrupt controller. As the IP block will probably appear in other designs as well, let's augment the DT bindings to reflect that it is first and foremost a standard Faraday part with a function name (FTINTC010) so that people reusing the IP easily find the driver they need. Sorry for the mistakes due to lack of information. Cc: Greentime Hu Acked-by: Rob Herring Acked-by: Hans Ulli Kroll Signed-off-by: Linus Walleij Signed-off-by: Marc Zyngier .../cortina,gemini-interrupt-controller.txt | 22 ------------------- .../interrupt-controller/faraday,ftintc010.txt | 25 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 22 deletions(-) commit e20c29aa722a90f3b8092b340362eabe488dbfc4 Author: Neil Armstrong Date: Thu Apr 6 11:34:04 2017 +0200 drm: bridge: dw-hdmi: fix input format/encoding from plat_data The plat_data->input_bus_format and plat_data->input_bus_encoding are unsigned long and are always >=0, but the value 0 was still considered as RGB888 for input_bus_format and default color space for input_bus_encoding in the reworked code. This patch changes the if statement check for a non-zero value to either use the default input bus_format and/or bus_encoding for a zero value and the provided bus_format and/or bus_encoding for a non zero value. Thanks to Dan Carpenter for his bug report at [1]. Tested on Amlogic P230 (with CSC enabled for YUV444 to RGB) and Rockchip RK3288 ACT8846 EVB Board (no CSC involved, direct RGB passthrough). [1] http://lkml.kernel.org/r/20170406052120.GA26578@mwanda Cc: Dan Carpenter Fixes: def23aa7e982 ("drm: bridge: dw-hdmi: Switch to V4L bus format and encodings") Signed-off-by: Neil Armstrong Reviewed-by: Archit Taneja [narmstrong@baylibre.com: reworded commit message and added Fixes tag] Link: http://patchwork.freedesktop.org/patch/msgid/1491471244-24989-1-git-send-email-narmstrong@baylibre.com drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1f9d3d98694b1cef93f99a54e6830e9717616ba6 Author: Libin Yang Date: Thu Apr 6 19:18:21 2017 +0800 ALSA: hda - set intel audio clock to a proper value On some Intel platforms, the audio clock may not be set correctly with initial setting. This will cause the audio playback/capture rates wrong. This patch checks the audio clock setting and will set it to a proper value if it is set incorrectly. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188411 Signed-off-by: Libin Yang Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) commit dde5bff5415953f9cc7413f1b1ceebcdfd583c07 Author: Libin Yang Date: Thu Apr 6 19:18:20 2017 +0800 ALSA: hda - add more ML register definitions This patch refines the definition of AZX_MLCTL_SPA and AZX_MLCTL_CPA and add more definitions of ML registers Signed-off-by: Libin Yang Signed-off-by: Takashi Iwai include/sound/hda_register.h | 8 +++++--- sound/hda/ext/hdac_ext_controller.c | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) commit 4781c22c7691140b2d945cb663d3b7b03319e07c Author: Martin Blumenstingl Date: Sat Apr 1 15:59:22 2017 +0200 pinctrl: meson: meson8b: rename the NAND DQS pin definitions The NAND DQS pins are currently named nand_dqs_0 and nand_dqs_1. However, they both seem to have the same function, just exposed on different pins (unlike the ethernet TX pins for example, where there's eth_txd0..3 - all of these can be active at the same time as they are different data lines). Rename the NAND DQS pins to nand_dqs_15 and nand_dqs_18 to reflect that it's the same functionality just exposed on different pins (BOOT_15 and BOOT_18). Signed-off-by: Martin Blumenstingl Acked-by: Kevin Hilman Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson8b.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 97ba26b8a9343008504d4e3a87d212bc07b05212 Author: Martin Blumenstingl Date: Sat Apr 1 15:59:21 2017 +0200 pinctrl: meson: meson8b: fix the NAND DQS pins The nand_groups table uses different names for the NAND DQS pins than the GROUP() definition in meson8b_cbus_groups (nand_dqs_0 vs nand_dqs0). This prevents using the NAND DQS pins in the devicetree. Fix this by ensuring that the GROUP() definition and the meson8b_cbus_groups use the same name for these pins. Fixes: 0fefcb6876d0 ("pinctrl: Add support for Meson8b") Signed-off-by: Martin Blumenstingl Acked-by: Kevin Hilman Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson8b.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 47a4693e1d3eb09e523c223753fb5a97721f49b8 Author: Yi Min Zhao Date: Fri Mar 10 09:29:38 2017 +0100 KVM: s390: introduce AIS capability Introduce a cap to enable AIS facility bit, and add documentation for this capability. Signed-off-by: Yi Min Zhao Signed-off-by: Fei Li Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger Documentation/virtual/kvm/api.txt | 8 ++++++++ arch/s390/kvm/kvm-s390.c | 15 +++++++++++++++ include/uapi/linux/kvm.h | 1 + 3 files changed, 24 insertions(+) commit 97bae47812dbbd220e354bc9f15c3b3c8b481a86 Author: Joel Stanley Date: Fri Apr 7 14:32:59 2017 +0930 ARM: configs: aspeed: Add new drivers - LPC Host Controller - Pulse Width Modulation and Tachometer - Analog to Digital converter These three new drivers for the Aspeed SoCs will appear in 4.12. This defconfig is based on next-20170406. Signed-off-by: Joel Stanley arch/arm/configs/aspeed_g4_defconfig | 3 +++ arch/arm/configs/aspeed_g5_defconfig | 3 +++ 2 files changed, 6 insertions(+) commit c0e25cba4bab73fa260c53e3d6e0f8d1aeef3dce Author: Joel Stanley Date: Thu Apr 6 11:43:09 2017 +0930 ARM: configs: aspeed: Update configs for BMC systems Developers can develop and users can test with this config against an OpenBMC userspace. It turns off debugging features to ensure network performance is high. Tested-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/configs/aspeed_g4_defconfig | 106 +++++++++++++++++++++++++++-------- arch/arm/configs/aspeed_g5_defconfig | 105 +++++++++++++++++++++++++--------- 2 files changed, 163 insertions(+), 48 deletions(-) commit 608567aac3206ae886c79688fbb8a62c473b55ef Author: Steve Twiss Date: Tue Mar 28 15:43:33 2017 +0100 thermal: da9062/61: Thermal junction temperature monitoring driver Add junction temperature monitoring supervisor device driver, compatible with the DA9062 and DA9061 PMICs. A MODULE_DEVICE_TABLE() macro is added. If the PMIC's internal junction temperature rises above T_WARN (125 degC) an interrupt is issued. This T_WARN level is defined as the THERMAL_TRIP_HOT trip-wire inside the device driver. The thermal triggering mechanism is interrupt based and happens when the temperature rises above a given threshold level. The component cannot return an exact temperature, it only has knowledge if the temperature is above or below a given threshold value. A status bit must be polled to detect when the temperature falls below that threshold level again. A kernel work queue is configured to repeatedly poll and detect when the temperature falls below this trip-wire, between 1 and 10 second intervals (defaulting at 3 seconds). This scheme is provided as an example. It would be expected that any final implementation will also include a notify() function and any of these settings could be altered to match the application where appropriate. When over-temperature is reached, the interrupt from the DA9061/2 will be repeatedly triggered. The IRQ is therefore disabled when the first over-temperature event happens and the status bit is polled using a work-queue until it becomes false. This strategy is designed to allow the periodic transmission of uevents (HOT trip point) as the first level of temperature supervision method. It is intended for non-invasive temperature control, where the necessary measures for cooling the system down are left to the host software. Once the temperature falls again, the IRQ is re-enabled so a new critical over-temperature event can be detected. Reviewed-by: Lukasz Luba Signed-off-by: Steve Twiss Signed-off-by: Eduardo Valentin drivers/thermal/Kconfig | 10 ++ drivers/thermal/Makefile | 1 + drivers/thermal/da9062-thermal.c | 315 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 326 insertions(+) commit 28c1b08d2a156ef16e912a4c618a529e586e5dbc Author: Steve Twiss Date: Tue Mar 28 15:43:31 2017 +0100 Documentation: devicetree: thermal: da9062/61 TJUNC temperature binding Device tree binding information for DA9062 and DA9061 thermal junction temperature monitor. Binding descriptions for the DA9061 and DA9062 thermal TJUNC supervisor device driver, using a single THERMAL_TRIP_HOT trip-wire and allowing for a configurable polling period for over-temperature polling. This patch also adds two examples, one for DA9062 and one for DA9061. The DA9061 example uses a fall-back compatible string for the DA9062. Acked-by: Rob Herring Signed-off-by: Steve Twiss Signed-off-by: Eduardo Valentin .../devicetree/bindings/thermal/da9062-thermal.txt | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit a94cb7eeecc4104a6874339f90c5d0647359c102 Author: Rafał Miłecki Date: Mon Apr 3 17:48:29 2017 +0200 thermal: broadcom: add Northstar thermal driver Northstar is a SoC family commonly used in home routers. This commit adds a driver for checking CPU temperature. As Northstar Plus seems to also have this IP block this new symbol gets ARCH_BCM_IPROC dependency. Signed-off-by: Rafał Miłecki Signed-off-by: Jon Mason Signed-off-by: Eduardo Valentin drivers/thermal/Kconfig | 5 ++ drivers/thermal/Makefile | 1 + drivers/thermal/broadcom/Kconfig | 8 +++ drivers/thermal/broadcom/Makefile | 1 + drivers/thermal/broadcom/ns-thermal.c | 105 ++++++++++++++++++++++++++++++++++ 5 files changed, 120 insertions(+) commit ee7cdbecb128d8b023c5439004cdea8baa2d0fe4 Author: Rafał Miłecki Date: Mon Apr 3 17:48:28 2017 +0200 dt-bindings: thermal: add support for Broadcom's Northstar thermal This commit documents binding for thermal used in Northstar family SoCs. There isn't any known Northstar device with active cooling system so DT example has empty cooling-maps node. There is also no support for CPU frequency throttling so I put only a critical trip in the example. Signed-off-by: Rafał Miłecki Signed-off-by: Eduardo Valentin .../devicetree/bindings/thermal/brcm,ns-thermal | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 78a2569fa60497347babeddb24a367946e258283 Author: Rick Altherr Date: Wed Mar 29 18:08:46 2017 -0700 arm: dts: aspeed: Describe ADCs for AST2400/AST2500 Signed-off-by: Rick Altherr Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g4.dtsi | 8 ++++++++ arch/arm/boot/dts/aspeed-g5.dtsi | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) commit 921c467c6bf8f6fe5cd139b0535ad42b952330f0 Author: Mitch Williams Date: Thu Mar 30 00:46:08 2017 -0700 i40e: close client on remove and shutdown When the driver is removed or shut down, close any attached clients (i.e. i40iw). This prevents a panic seen sometimes on forced driver removal or system shutdown when iWarp is running. Change-ID: I4f6161e5a73ffbb2fd5883567b007310302bfcb5 Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 8090f6183c56dd133a0fd6a9bcc09b1da8dbb0e8 Author: Mitch Williams Date: Thu Mar 30 00:46:07 2017 -0700 i40e: register existing client on probe In some cases, a client (i40iw) may already be present when probe is called. Check for this, and add a client instance if necessary. Change-ID: I2009312694b7ad81f1023919e4c6c86181f21689 Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_client.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 295c0a555062384449cb2b4670b7aac08c3624ac Author: Mitch Williams Date: Thu Mar 30 00:46:06 2017 -0700 i40e: remove client instance on driver unload When the driver is unloaded, we need to remove the client instance, otherwise we leak memory. Change-ID: If1e7882ac1f6ce15d004722fafbe31afbe0adc9a Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_client.c | 3 +++ 1 file changed, 3 insertions(+) commit bacd75cfac8af9fc91b7fde4b0cad8960c77986f Author: Preethi Banala Date: Mon Mar 27 14:43:18 2017 -0700 i40e/i40evf: Add capability exchange for outer checksum This patch adds a capability negotiation between VF and PF using ENCAP/ ENCAP_CSUM offload flags in order for the VF to support outer checksum and TSO offloads for encapsulated packets. These capabilities were assumed by default and enabled in current hardware. Going forward, these features needs to be negotiated with PF before advertising to the stack. Additionally, strip out the mac.type checks for X722 since outer checksums are enabled based on the ENCAP_CSUM offload negotiation flag and maintain consistency between drivers in how the features are configured. Change-ID: Ie380a6f57eca557a2bb575b66b12fae36d308920 Signed-off-by: Preethi Banala Signed-off-by: Alan Brady Signed-off-by: Jesse Brandeburg Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 52 +++++++++--------- drivers/net/ethernet/intel/i40e/i40e_virtchnl.h | 3 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 7 +++ drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h | 3 +- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 61 ++++++++++++---------- .../net/ethernet/intel/i40evf/i40evf_virtchnl.c | 4 +- 6 files changed, 74 insertions(+), 56 deletions(-) commit 71b8b86c75f7eea71ba0aa49490d59fd48ff7661 Author: Lei YU Date: Thu Mar 23 14:42:48 2017 +0800 ARM: dts: aspeed: romulus: Add UART1 Romulus has a RS-232 connection on the back of chassis, add UART1 to use this connection. Signed-off-by: Lei YU Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 23491da8f5bcc6e7914654746fbe3dfeb5820e17 Author: Joel Stanley Date: Fri Apr 7 12:14:19 2017 +0930 ARM: dts: aspeed: Update watchdog compatible strings The string was changed when upstreaming the driver. Put the correct string for generation 4 and 5 systems, as well as fix the reg length for ast2500 systems. Acked-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g4.dtsi | 4 ++-- arch/arm/boot/dts/aspeed-g5.dtsi | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) commit 63c6527b7f6802fbc6f537a53d0e1a0d1435191d Author: Cédric Le Goater Date: Thu Apr 6 19:02:33 2017 +0200 ARM: dts: aspeed: Add a fastread property All chips on OpenPOWER platforms support the fastread SPI command. Signed-off-by: Cédric Le Goater Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-ast2500-evb.dts | 2 ++ arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 2 ++ arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 2 ++ 3 files changed, 6 insertions(+) commit 1142aea9ff9d9f86fc88e6637f7c6edd25adc39c Author: Cédric Le Goater Date: Wed Mar 22 17:04:43 2017 +0100 ARM: dts: aspeed: Add SPI controller bindings to Romulus Romulus systems have one MX25L25635 (32768 Kbytes) flash module for the BMC firmware and other MT25QL512A (65536 Kbytes) for the host. Signed-off-by: Cédric Le Goater Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit a978e13965a40ac07163643cc3fa0ddb0d354198 Author: Benjamin Herrenschmidt Date: Wed Apr 5 17:54:49 2017 +1000 powerpc/smp: Remove migrate_irq() custom implementation Some powerpc platforms use this to move IRQs away from a CPU being unplugged. This function has several bugs such as not taking the right locks or failing to NULL check pointers. There's a new generic function doing exactly the same thing without all the bugs, so let's use it instead. mpe: The obvious place for the select of GENERIC_IRQ_MIGRATION is on HOTPLUG_CPU, but that doesn't work. On some configs PM_SLEEP_SMP will select HOTPLUG_CPU even though its dependencies are not met, which means the select of GENERIC_IRQ_MIGRATION doesn't happen. That leads to the build breaking. Fix it by moving the select of GENERIC_IRQ_MIGRATION to SMP. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/smp.h | 1 - arch/powerpc/kernel/irq.c | 40 ---------------------------------- arch/powerpc/kernel/smp.c | 9 +++++++- arch/powerpc/platforms/Kconfig.cputype | 1 + 4 files changed, 9 insertions(+), 42 deletions(-) commit 491bdcfa8c41995419a6719f83016d7a43008f38 Author: Joel Stanley Date: Thu Apr 6 11:11:43 2017 +0930 ARM: dts: aspeed: Make G4 clocks fixed We do not yet have a clk driver upstream. So that users can boot the unmodified upstream kernel, add fixed-clock and clock-frequency properties to all of the clocks. The values are taken from the Palmetto system. This is the only upstream dts. It also happens to match all of the systems seen so far. Acked-by: Cédric Le Goater Acked-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g4.dtsi | 68 +++++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 29 deletions(-) commit 8b9102da97293073f065fe5dfd49d21580b84e2b Author: Joel Stanley Date: Fri Mar 31 13:05:10 2017 +1030 ARM: dts: aspeed: Make G5 clocks fixed We do not yet have a clk driver upstream. So that users can boot the unmodified upstream kernel, add fixed-clock and clock-frequency properties to all of the clocks. The values are taken from the ast2500evb. This is the only upstream dts. It also happens to match all of the systems I have seen so far. Acked-by: Cédric Le Goater Acked-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g5.dtsi | 72 ++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 32 deletions(-) commit 21677ecca20151e61c3290ef37c5cd7afec60a5a Author: Andy Gross Date: Wed Apr 5 09:50:59 2017 -0500 Revert "ARM: dts: qcom: msm8974: Add USB gadget nodes" This reverts commit 769907ae6e6c2871c2ba4f578814d86fbfbe8d91. This change caused issues with people using USB gadget for serial consoles. In addition, with the other USB changes coming in, it makes sense to revert this patch and apply the new set as it becomes ready. Signed-off-by: Andy Gross .../boot/dts/qcom-msm8974-sony-xperia-honami.dts | 8 ----- arch/arm/boot/dts/qcom-msm8974.dtsi | 39 ---------------------- 2 files changed, 47 deletions(-) commit b3622d3217eb351717b157d64ce0895e662b7657 Author: Al Viro Date: Wed Apr 5 18:56:55 2017 -0400 get rid of padding, switch to RAW_COPY_USER Merced is fucked, so what else is new? Signed-off-by: Al Viro arch/ia64/Kconfig | 1 + arch/ia64/include/asm/uaccess.h | 35 ++++------------------------------- arch/ia64/lib/memcpy_mck.S | 13 +------------ 3 files changed, 6 insertions(+), 43 deletions(-) commit 652c1aaca2a026d374d139058e8e7f3175e861d6 Author: Al Viro Date: Tue Mar 28 17:29:42 2017 -0400 ia64: get rid of copy_in_user() it hadn't been biarch for years Signed-off-by: Al Viro arch/ia64/include/asm/uaccess.h | 10 ---------- 1 file changed, 10 deletions(-) commit 7bb8a503e8fad51e4fb5ed2453b9e23bedd82012 Author: Al Viro Date: Tue Dec 27 10:29:34 2016 -0500 ia64: sanitize __access_ok() turn into static inline, kill the 'segment' argument. Signed-off-by: Al Viro arch/ia64/include/asm/uaccess.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 11836ecee96e8e1a62d5bd3ddd60eb9ecc01c375 Author: Al Viro Date: Tue Dec 27 10:21:09 2016 -0500 ia64: get rid of 'segment' argument of __do_{get,put}_user() it's only evaluated if the first argument is not 0, and in those cases it's always equal to get_fs() Signed-off-by: Al Viro arch/ia64/include/asm/uaccess.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 1bd5986bbccf1c44bc365f3cd5280350e8aa76bc Author: Al Viro Date: Tue Dec 27 10:19:22 2016 -0500 ia64: get rid of 'segment' argument of __{get,put}_user_check() always equal to get_fs() Signed-off-by: Al Viro arch/ia64/include/asm/uaccess.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8bec2717265601516bfe129acb4100a3070806ce Author: Al Viro Date: Sun Dec 25 14:24:35 2016 -0500 ia64: add extable.h Signed-off-by: Al Viro arch/ia64/include/asm/extable.h | 11 +++++++++++ arch/ia64/include/asm/uaccess.h | 8 +------- arch/ia64/mm/extable.c | 5 ++++- 3 files changed, 16 insertions(+), 8 deletions(-) commit fccfb9950836524d79260448fba6131f6b1d73c3 Merge: d597580 b4fb8f6 Author: Al Viro Date: Thu Apr 6 19:35:03 2017 -0400 Merge commit 'b4fb8f66f1ae2e167d06c12d018025a8d4d3ba7e' into uaccess.ia64 backmerge of mainline ia64 fix commit 84358536dc355a9c8978ee425f87e116186bed16 Author: Darrick J. Wong Date: Thu Apr 6 16:00:39 2017 -0700 xfs: actually report xattr extents via iomap Apparently FIEMAP for xattrs has been broken since we switched to the iomap backend because of an incorrect check for xattr presence. Also fix the broken locking. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig fs/xfs/xfs_iomap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 254133f5d0c2df8476495d331f0fa69ff1a374c1 Author: Christoph Hellwig Date: Thu Apr 6 16:00:11 2017 -0700 xfs: fold __xfs_trans_roll into xfs_trans_roll No one cares about the low-level helper anymore. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_trans.c | 17 ++--------------- fs/xfs/xfs_trans.h | 1 - 2 files changed, 2 insertions(+), 16 deletions(-) commit 622f6e3265707ebf02ba776ac6e68003bcc31213 Author: John Johansen Date: Thu Apr 6 06:55:24 2017 -0700 apparmor: Make path_max parameter readonly The path_max parameter determines the max size of buffers allocated but it should not be setable at run time. If can be used to cause an oops root@ubuntu:~# echo 16777216 > /sys/module/apparmor/parameters/path_max root@ubuntu:~# cat /sys/module/apparmor/parameters/path_max Killed [ 122.141911] BUG: unable to handle kernel paging request at ffff880080945fff [ 122.143497] IP: [] d_absolute_path+0x44/0xa0 [ 122.144742] PGD 220c067 PUD 0 [ 122.145453] Oops: 0002 [#1] SMP [ 122.146204] Modules linked in: vmw_vsock_vmci_transport vsock ppdev vmw_balloon snd_ens1371 btusb snd_ac97_codec gameport snd_rawmidi btrtl snd_seq_device ac97_bus btbcm btintel snd_pcm input_leds bluetooth snd_timer snd joydev soundcore serio_raw coretemp shpchp nfit parport_pc i2c_piix4 8250_fintek vmw_vmci parport mac_hid ib_iser rdma_cm iw_cm ib_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear hid_generic usbhid hid crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd vmwgfx psmouse mptspi ttm mptscsih drm_kms_helper mptbase syscopyarea scsi_transport_spi sysfillrect [ 122.163365] ahci sysimgblt e1000 fb_sys_fops libahci drm pata_acpi fjes [ 122.164747] CPU: 3 PID: 1501 Comm: bash Not tainted 4.4.0-59-generic #80-Ubuntu [ 122.166250] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/02/2015 [ 122.168611] task: ffff88003496aa00 ti: ffff880076474000 task.ti: ffff880076474000 [ 122.170018] RIP: 0010:[] [] d_absolute_path+0x44/0xa0 [ 122.171525] RSP: 0018:ffff880076477b90 EFLAGS: 00010206 [ 122.172462] RAX: ffff880080945fff RBX: 0000000000000000 RCX: 0000000001000000 [ 122.173709] RDX: 0000000000ffffff RSI: ffff880080946000 RDI: ffff8800348a1010 [ 122.174978] RBP: ffff880076477bb8 R08: ffff880076477c80 R09: 0000000000000000 [ 122.176227] R10: 00007ffffffff000 R11: ffff88007f946000 R12: ffff88007f946000 [ 122.177496] R13: ffff880076477c80 R14: ffff8800348a1010 R15: ffff8800348a2400 [ 122.178745] FS: 00007fd459eb4700(0000) GS:ffff88007b6c0000(0000) knlGS:0000000000000000 [ 122.180176] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 122.181186] CR2: ffff880080945fff CR3: 0000000073422000 CR4: 00000000001406e0 [ 122.182469] Stack: [ 122.182843] 00ffffff00000001 ffff880080946000 0000000000000000 0000000000000000 [ 122.184409] 00000000570f789c ffff880076477c30 ffffffff81385671 ffff88007a2e7a58 [ 122.185810] 0000000000000000 ffff880076477c88 01000000008a1000 0000000000000000 [ 122.187231] Call Trace: [ 122.187680] [] aa_path_name+0x81/0x370 [ 122.188637] [] profile_transition+0xbd/0xb80 [ 122.190181] [] ? zone_statistics+0x7c/0xa0 [ 122.191674] [] apparmor_bprm_set_creds+0x9b0/0xac0 [ 122.193288] [] ? ext4_xattr_get+0x81/0x220 [ 122.194793] [] ? ext4_xattr_security_get+0x1c/0x30 [ 122.196392] [] ? get_vfs_caps_from_disk+0x69/0x110 [ 122.198004] [] ? mnt_may_suid+0x3f/0x50 [ 122.199737] [] ? cap_bprm_set_creds+0xa3/0x600 [ 122.201377] [] security_bprm_set_creds+0x33/0x50 [ 122.203024] [] prepare_binprm+0x85/0x190 [ 122.204515] [] do_execveat_common.isra.33+0x485/0x710 [ 122.206200] [] SyS_execve+0x3a/0x50 [ 122.207615] [] stub_execve+0x5/0x5 [ 122.208978] [] ? entry_SYSCALL_64_fastpath+0x16/0x71 [ 122.210615] Code: f8 31 c0 48 63 c2 83 ea 01 48 c7 45 e8 00 00 00 00 48 01 c6 85 d2 48 c7 45 f0 00 00 00 00 48 89 75 e0 89 55 dc 78 0c 48 8d 46 ff 46 ff 00 48 89 45 e0 48 8d 55 e0 48 8d 4d dc 48 8d 75 e8 e8 [ 122.217320] RIP [] d_absolute_path+0x44/0xa0 [ 122.218860] RSP [ 122.219919] CR2: ffff880080945fff [ 122.220936] ---[ end trace 506cdbd85eb6c55e ]--- Reported-by: Tetsuo Handa Signed-off-by: John Johansen Signed-off-by: James Morris security/apparmor/lsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 545de8fe0f1b3b97d6a29a78ccdc3403a8296710 Author: John Johansen Date: Thu Apr 6 06:55:23 2017 -0700 apparmor: fix parameters so that the permission test is bypassed at boot Boot parameters are written before apparmor is ready to answer whether the user is policy_view_capable(). Setting the parameters at boot results in an oops and failure to boot. Setting the parameters at boot is obviously allowed so skip the permission check when apparmor is not initialized. While we are at it move the more complicated check to last. Signed-off-by: John Johansen Signed-off-by: James Morris security/apparmor/include/lib.h | 2 +- security/apparmor/lsm.c | 47 +++++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 26 deletions(-) commit b9b144bcafbdd53f68e227968009327b76db08a4 Author: John Johansen Date: Thu Apr 6 06:55:22 2017 -0700 apparmor: fix invalid reference to index variable of iterator line 836 Once the loop on lines 836-853 is complete and exits normally, ent is a pointer to the dummy list head value. The derefernces accessible from eg the goto fail on line 860 or the various goto fail_lock's afterwards thus seem incorrect. Reported-by: Julia Lawall Signed-off-by: John Johansen Signed-off-by: James Morris security/apparmor/policy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9814448da7a84dd50b69e4ada2d7d1c042493daf Author: Nicolas Iooss Date: Thu Apr 6 06:55:21 2017 -0700 apparmor: use SHASH_DESC_ON_STACK When building the kernel with clang, the compiler fails to build security/apparmor/crypto.c with the following error: security/apparmor/crypto.c:36:8: error: fields must have a constant size: 'variable length array in structure' extension will never be supported char ctx[crypto_shash_descsize(apparmor_tfm)]; ^ Since commit a0a77af14117 ("crypto: LLVMLinux: Add macro to remove use of VLAIS in crypto code"), include/crypto/hash.h defines SHASH_DESC_ON_STACK to work around this issue. Use it in aa_calc_hash() and aa_calc_profile_hash(). Signed-off-by: Nicolas Iooss Signed-off-by: John Johansen Signed-off-by: James Morris security/apparmor/crypto.c | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) commit eea7a05f1937b585cf53c6d53a4dd88fcb398eb8 Author: Valentin Rothberg Date: Thu Apr 6 06:55:20 2017 -0700 security/apparmor/lsm.c: set debug messages Add the _APPARMOR substring to reference the intended Kconfig option. Signed-off-by: Valentin Rothberg Signed-off-by: John Johansen Signed-off-by: James Morris security/apparmor/lsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9c42ac76ea13ab6d07681ff3079b3a242333764 Author: kbuild test robot Date: Thu Apr 6 06:55:19 2017 -0700 apparmor: fix boolreturn.cocci warnings security/apparmor/lib.c:132:9-10: WARNING: return of 0/1 in function 'aa_policy_init' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci Signed-off-by: Fengguang Wu Signed-off-by: John Johansen Signed-off-by: James Morris security/apparmor/lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dc423b6be10c56d0dd957caf307f12d16f728f07 Merge: bd41486 d930655 Author: David S. Miller Date: Thu Apr 6 15:39:47 2017 -0700 Merge branch 'ftgmac-rework-batch2-rx-path' Benjamin Herrenschmidt says: ==================== ftgmac: Rework batch 2 - RX path This is the second batch of updates to the ftgmac100 driver. This one tackles the RX path of the driver, simplifying it greatly to match common practice while significantly increasing the performance. (The bulk of the performance gains of my series will be provided by the TX path improvements, notably fragmented sends, these will be in the next batch). ==================== Signed-off-by: David S. Miller commit d930655d4a25021b70285976745e6eee107ac0bb Author: Benjamin Herrenschmidt Date: Thu Apr 6 11:02:52 2017 +1000 ftgmac100: Work around HW bug in runt frame detection The HW incorrectly calculates the frame size without the vlan tag and compares that against 64. It will thus flag 64-bytes frames with a vlan tag as 60-bytes frames "runt" packets which we'll then drop. Thus we end up dropping ARP packets on vlan's ... It does that whether vlan tag stripping is enabled or not. This works around it by ignoring the "runt" error bit of the frame has been vlan tagged and is at least 60 bytes. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 35 +++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 10 deletions(-) commit 4ca24152d8919508bc53827a79e68b353ac6e333 Author: Benjamin Herrenschmidt Date: Thu Apr 6 11:02:51 2017 +1000 ftgmac100: Remove rx descriptor accessors Directly access the fields when needed. The accessors add clutter not clarity and in some cases cause unnecessary read-modify-write type access on the slow (uncached) descriptor memory. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 152 +++++++++---------------------- drivers/net/ethernet/faraday/ftgmac100.h | 16 +++- 2 files changed, 53 insertions(+), 115 deletions(-) commit 027f426d547967cd1b6899597367aa64af51c28e Author: Benjamin Herrenschmidt Date: Thu Apr 6 11:02:50 2017 +1000 ftgmac100: Add missing barrier in ftgmac100_rx_packet() Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 3 +++ 1 file changed, 3 insertions(+) commit 7b49cd1c9eca4acd4dc36b6c2c532cad3576171d Author: Benjamin Herrenschmidt Date: Thu Apr 6 11:02:49 2017 +1000 ftgmac100: Directly receive into sk_buffs The current driver receive path allocates pages and stashes them into SKB fragments. This is not particularly useful as we don't support jumbo frames (which wouldn't be great with the small FIFOs on all the known implementations) anyway. It also makes us flush the caches and allocate more memory for RX than necessary. So set our RX buf to our max packet size instead (which we bump to 1536 bytes to account for packets with vlan tags etc...) like most other ethernet drivers. Then allocate skbs when populating the receive ring and DMA directly into them. This simplifies the RX path further. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 142 ++++++++++++------------------- 1 file changed, 56 insertions(+), 86 deletions(-) commit 01dd70b52a43f033798e3ce53e576b0c882d5f26 Author: Benjamin Herrenschmidt Date: Thu Apr 6 11:02:48 2017 +1000 ftgmac100: Simplify rx pointer handling in the rx path We don't handle fragmented RX packets, so the "looping" helpers to locate the first segment of a packet or to drop a packet aren't actually helping. Take them out and simplify ftgmac100_rx_packet() further as a result. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 92 +++++++++----------------------- 1 file changed, 24 insertions(+), 68 deletions(-) commit eb50af20442bdaaa2dadd658dc8d556550e862ae Author: Benjamin Herrenschmidt Date: Thu Apr 6 11:02:47 2017 +1000 ftgmac100: Simplify rx packets error handling The fast path has a single unlikely() test for any error bit, calling into a helper that sets the appropriate statistics. The various netdev_info aren't particularly interesting. If we want to differentiate the various length errors later we can introduce driver specific stats using ethtool. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 61 +++++++++++++------------------- 1 file changed, 25 insertions(+), 36 deletions(-) commit 672021943c453c4ae04bf131ccf155a7d4f967ab Author: Benjamin Herrenschmidt Date: Thu Apr 6 11:02:46 2017 +1000 ftgmac100: Cleanup rx checksum handling Read the descriptor field only once and check for IP header checksum errors as well Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 63 +++++++++++++------------------- 1 file changed, 25 insertions(+), 38 deletions(-) commit d72e01a0430f8a1ae7adb3cbf0b2e73fcd99252e Author: Benjamin Herrenschmidt Date: Thu Apr 6 11:02:45 2017 +1000 ftgmac100: Use a scratch buffer for failed RX allocations We can occasionally fail to allocate new RX buffers at runtime or when starting the driver. At the moment the latter just fails to open which is fine but the former leaves stale DMA pointers in the ring. Instead, use a scratch page and have all RX ring descriptors point to it by default unless a proper buffer can be allocated. It will help later on when re-initializing the whole ring at runtime on link changes since there is no clean failure path there unlike open(). Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 42 +++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 4 deletions(-) commit b1977bfbca569426651ac47e0f99d279f00f8a94 Author: Benjamin Herrenschmidt Date: Thu Apr 6 11:02:44 2017 +1000 ftgmac100: Drop support for fragmented receive We don't support jumbo frames, we will never receive a fragmented packet, the RX buffer is always big enough, if not then it's a runaway packet that can be dropped. So take out the loop that handles such things in ftgmac100_rx_packet() which will help with subsequent simplifications and improvements to the RX path Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 37 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit c06f73fba15f441ef59dfec21286aaf18b99434b Author: Benjamin Herrenschmidt Date: Thu Apr 6 11:02:43 2017 +1000 ftgmac100: Move ftgmac100_alloc_rx_page() before its users Avoids a forward declaration Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 59 +++++++++++++++----------------- 1 file changed, 28 insertions(+), 31 deletions(-) commit 457fcd8a11f7f7f2483b2366d8a98f269c085302 Author: Saeed Mahameed Date: Thu Mar 30 19:23:41 2017 +0300 net/mlx5e: Set default RX moderation parameters on driver load RX moderation default parameters shouldn't be set in mlx5e_build_rx_cq_param since it would reset the values every time on netdev open/close. Instead, it should be set in mlx5e_set_rx_cq_mode_params which is called on driver load only. Fixes: 6a9764efb255 ("net/mlx5e: Isolate open_channels from priv->params") Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 95b6c6a519a300dc667960740ebd43b960b32883 Author: Eran Ben Elisha Date: Tue Mar 28 11:23:55 2017 +0300 net/mlx5e: Reuse alloc cq code for all CQs allocation Reuse the code for mlx5e_alloc_cq and mlx5e_alloc_drop_cq, as they have a similar flow. Prior to this patch, the CQEs in the "drop CQ" were not initialized, fixed it with the shared flow of alloc CQ. This is not a critical bug as the RQ connected to this CQ never moved to RTS, but still better to have this right. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 59 +++++++++-------------- 1 file changed, 23 insertions(+), 36 deletions(-) commit 84e11edb71dec60644e62a07b588777a604e1a00 Author: Inbar Karmy Date: Mon Mar 13 15:36:57 2017 +0200 net/mlx5e: Show board id in ethtool driver information Add the board id (PSID) to the firmware-version field in the ethtool -i (driver information). The PSID is shown in parentheses, next to the fw-version. $ ethtool -i ens6 firmware-version: 12.14.1101 (MT_2190110032) Signed-off-by: Inbar Karmy Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6543b78ea1e93913bcc94bc2c3ba996373db43df Author: Eran Ben Elisha Date: Thu Feb 2 15:19:34 2017 +0200 net/mlx5e: Change FW sub_minor display to 4 zeros padding FW version should be reported as X.Y.ZZZZ, add leading zeroes to sub minor in order to fix it. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6d96a2092bf448be417575b4725523072f4fc19 Author: Guy Ergas Date: Mon Feb 20 17:31:20 2017 +0200 net/mlx5e: Make mlx5e_modify_rqs_vsd a static function Make mlx5e_modify_rqs_vsd a static function and remove from en.h in order to reduce redundant exposure of functions. Signed-off-by: Guy Ergas Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 -- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) commit 102722fc6832a16850c05595b98c9232549d99f3 Author: Guy Ergas Date: Mon Feb 20 16:18:17 2017 +0200 net/mlx5e: Add support for RXFCS feature flag Add support for rx-fcs flag from ethtool. In case this flag is set, update all RQs to scatter the FCS data into the packet. Signed-off-by: Guy Ergas Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 71 +++++++++++++++++++++++ include/linux/mlx5/mlx5_ifc.h | 1 + 3 files changed, 73 insertions(+) commit d0dd989f97d8d4ca44cd9bf2f34596e159236db2 Author: Majd Dibbiny Date: Thu Feb 23 10:52:19 2017 +0200 net/mlx5: Update the list of the PCI supported devices Rename the ConnectX-5 PCIe 4.0 to be ConnectX-5 Ex. Also add the upcoming ConnectX-6 and it's VF IDs to the list. Signed-off-by: Majd Dibbiny Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e4bac408b08437d190785ab1250cc676304ed171 Author: Richard Genoud Date: Mon Mar 27 12:33:23 2017 +0200 drm/panel: simple: Add support for Winstar WF35LTIACD This adds support for the Winstar Display Co. WF35LTIACD 3.5" QVGA TFT LCD panel, which can be supported by the simple panel driver. Acked-by: Rob Herring Signed-off-by: Richard Genoud Signed-off-by: Thierry Reding .../bindings/display/panel/winstar,wf35ltiacd.txt | 48 ++++++++++++++++++++++ drivers/gpu/drm/panel/panel-simple.c | 28 +++++++++++++ 2 files changed, 76 insertions(+) commit 667eb7033da3ff06fa3ed9d1a0180c939e6a24eb Author: Richard Genoud Date: Fri Mar 3 16:21:55 2017 +0100 devicetree: add vendor prefix for Winstar Display Corp. Winstar Display Corp. is specialized in LCD displays for embedded products. cf: http://www.winstar.com.tw Signed-off-by: Richard Genoud Acked-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 7142afb3a186ed2cd028318205a4852f04283380 Author: Maxime Ripard Date: Mon Apr 3 15:38:32 2017 +0200 drm/panel: Add driver for sitronix ST7789V LCD controller The Sitronix ST7789v controller is used to drive 240x320 LCD panels through various interfaces, including SPI and RGB/Parallel. The current driver is configuring it for the latter. Support for tinyDRM can always be added later. Signed-off-by: Maxime Ripard Signed-off-by: Thierry Reding drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 449 +++++++++++++++++++++++++ 3 files changed, 457 insertions(+) commit 63c32f7cd48bd651a5be249e01b74b771f685fd8 Author: Maxime Ripard Date: Mon Apr 3 15:38:31 2017 +0200 dt-bindings: display: panel: Add bindings for the Sitronix ST7789V panel The Sitronix ST7789V is an LCD panel controller, controlled over SPI, that can drive 18-bits 240x320 LCD displays. Signed-off-by: Maxime Ripard Acked-by: Rob Herring Signed-off-by: Thierry Reding .../bindings/display/panel/sitronix,st7789v.txt | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 81507732449076de35db3b5a439e4dfd548c6b5a Author: Wadim Egorov Date: Thu Apr 6 15:04:25 2017 +0200 ARM: dts: rockchip: Add support for PCM-947 carrier board Add basic support for the PCM-947 carrier board, a RK3288 based development board made by PHYTEC. This board works in a combination with the phyCORE-RK3288 System on Module. Following interfaces and devices are available on the PCM-947 carrier board: - 2x UART - micro SDMMC - USB host and USB otg - USB 3503 HSIC hub - Ethernet - 2nd alternative KSZ9031 ethernet phy - Display connectors: PHYTEC LVDS, DDG LVDS, parallel signals, HDMI - Parallel Camera CIF - SGTL5000-32QFN audio codec - 4x LEDs connected via PCA9533 - 2 user buttons - Expansion connectors for WiFi and other modules - RTC RV-4162-C7 - Resistive touch STMPE811 - EEPROM M24C32 Signed-off-by: Wadim Egorov Signed-off-by: Heiko Stuebner arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/rk3288-phycore-rdk.dts | 298 +++++++++++++++++++++++++++++++ 2 files changed, 299 insertions(+) commit bd414860440eebc8a7eb54be94c97e6ed09bb402 Merge: 5428016 ab044f8 Author: David S. Miller Date: Thu Apr 6 14:37:50 2017 -0700 Merge tag 'batadv-next-for-davem-20170406' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This feature/cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - Code and Style cleanups, by Sven Eckelmann (5 patches) - Remove an unneccessary memset, by Tobias Klauser - DAT and BLA optimizations for various corner cases, by Andreas Pape (5 patches) - forward/rebroadcast packet restructuring, by Linus Luessing (2 patches) - ethtool cleanup and remove unncessary code, by Sven Eckelmann (4 patches) - use net_device_stats from net_device instead of private copy, by Tobias Klauser ==================== Signed-off-by: David S. Miller commit ed29f9426d9bf1b5ec7e79dfb28f39de7b3a0069 Author: Hoegeun Kwon Date: Wed Mar 8 10:42:36 2017 +0900 drm/panel: Add support for S6E3HA2 panel driver on TM2 board This patch add support for MIPI-DSI based S6E3HA2 AMOLED panel driver. This panel has 1440x2560 resolution in 5.7-inch physical panel in the TM2 device. Signed-off-by: Donghwa Lee Signed-off-by: Hyungwon Hwang Signed-off-by: Hoegeun Kwon Tested-by: Chanwoo Choi Reviewed-by: Andrzej Hajda Signed-off-by: Thierry Reding drivers/gpu/drm/panel/Kconfig | 6 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 739 ++++++++++++++++++++++++++ 3 files changed, 746 insertions(+) commit fae50924f92ce3f5d422c8e619e01a36285a3181 Author: Hoegeun Kwon Date: Wed Mar 8 10:42:35 2017 +0900 dt-bindings: Add support for Samsung s6e3ha2 panel binding The Samsung s6e3ha2 is a 5.7" 1440x2560 AMOLED panel connected using MIPI-DSI interfaces. Signed-off-by: Donghwa Lee Signed-off-by: Hyungwon Hwang Signed-off-by: Hoegeun Kwon Reviewed-by: Andrzej Hajda Reviewed-by: Javier Martinez Canillas Acked-by: Rob Herring Signed-off-by: Thierry Reding .../bindings/display/panel/samsung,s6e3ha2.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit e78939d7f7b9a6126215c10b5f1ab2cf69b0e4d3 Author: Wadim Egorov Date: Thu Apr 6 15:04:26 2017 +0200 dt-bindings: Document Phytec phyCORE-RK3288 RDK Add documentation for the PCM-947 carrier board, a RK3288 based development board made by PHYTEC. Signed-off-by: Wadim Egorov Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 54280168f3d9870e0d2b169b991189a09fc870b2 Merge: ec1af27 1eec243 Author: David S. Miller Date: Thu Apr 6 14:26:32 2017 -0700 Merge branch 'qed-misc-cleanups-and-fixes' Yuval Mintz says: ==================== qed: Misc cleanups and fixes Patches #1 and #2 revolve around register access performed by driver; The first merely adds some debug, while the second does some fixing of incorrect PTT usage as well as preventing issues similar to those fixed by 6f437d431930 ("qed: Don't use attention PTT for configuring BW"). Patch #3 better configures HW for architecture where cacheline isn't 64B. Patches #4-#8 all affect iSCSI related functionaility - adding statistics information [both to driver & management firmware], passing information on number of resources to qedi, and simplifying the Out-of-order implementation in SW. ==================== Signed-off-by: David S. Miller commit 1eec2437d14c76af3b1271011940036eb0d7d3cf Author: Michal Kalderon Date: Thu Apr 6 15:58:35 2017 +0300 qed: Make OOO archipelagos into an array No need to maintain the various open archipelagos as a list - The maximal number of them is known, and we can use the CID as key for random-access into the array. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ooo.c | 102 ++++++++---------------------- drivers/net/ethernet/qlogic/qed/qed_ooo.h | 6 +- 2 files changed, 30 insertions(+), 78 deletions(-) commit 2f2b2614e8937e95c29ac733d8956a48771613d2 Author: Mintz, Yuval Date: Thu Apr 6 15:58:34 2017 +0300 qed: Provide iSCSI statistics to management Management firmware can query for some basic iSCSI-related statistics. Provide those just as we do for other protocols. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iscsi.c | 20 ++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_iscsi.h | 14 +++++++++++++- drivers/net/ethernet/qlogic/qed/qed_main.c | 5 +++++ 3 files changed, 38 insertions(+), 1 deletion(-) commit 08737a3fa30a4c6c10b4c4b682125c7d3c494094 Author: Mintz, Yuval Date: Thu Apr 6 15:58:33 2017 +0300 qed: Inform qedi the number of possible CQs Now that management firmware is capable of telling us the number of CQs available for a given PF, qed needs to communicate the number to qedi so it would know have many to use. 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_dev.c | 7 ++++++- drivers/net/ethernet/qlogic/qed/qed_iscsi.c | 11 +++++++++++ include/linux/qed/qed_iscsi_if.h | 2 ++ 4 files changed, 21 insertions(+), 2 deletions(-) commit 3ddc48dc1953c364ec0ac4c21a75e8063fddb53e Author: Mintz, Yuval Date: Thu Apr 6 15:58:32 2017 +0300 qed: Add missing stat for new isles Firmware provides a statistic for the number of out-of-order isles it used - fill it in the iscsi-related statistics. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iscsi.c | 2 ++ 1 file changed, 2 insertions(+) commit bd1cc771f9d2374f9f1c0edbd01d27893723e8da Author: Mintz, Yuval Date: Thu Apr 6 15:58:31 2017 +0300 qed: Don't close the OUT_EN during init Before initializing the chip's engine, driver currently closes a set of registers on the HW's ingress flow to prevent packets from slipping in while they're not supposed to. This configuration is insufficient, as there are some scenarios where packets would still arrive even when said registers are set, but the management firmware already closes other per-port registers that do suffice, making this setting unnecessray. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 12 ------------ 1 file changed, 12 deletions(-) commit 60afed72f51c7445aa06dc953b05f5672b607860 Author: Tomer Tayar Date: Thu Apr 6 15:58:30 2017 +0300 qed: Configure cacheline size in HW Default HW configuration is optimal for an architecture where cache line size is 64B. During chip initialization, properly initialize the cache line size in HW to avoid possible redundant PCI transactions. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 53 ++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 1 + 2 files changed, 54 insertions(+) commit 1558296251207bb0def2ae7cc045f8159ee0c204 Author: Rahul Verma Date: Thu Apr 6 15:58:29 2017 +0300 qed: Don't use main-ptt in unrelated flows In order to access HW registers driver needs to acquire a PTT entry [mapping between bar memory and internal chip address]. Since acquiring PTT entries could fail [at least in theory] as their number is finite and other flows can hold them, we reserve special PTT entries for 'important' enough flows - ones we want to guarantee that would not be susceptible to such issues. One such special entry is the 'main' PTT which is meant to be used in flows such as chip initialization and de-initialization. However, there are other flows that are also using that same entry for their own purpose, and might run concurrently with the original flows [notice that for most cases using the main-ptt by mistake, such a race is still impossible, at least today]. This patch re-organizes the various functions that currently use the main_ptt in one of two ways: - If a function shouldn't use the main_ptt it starts acquiring and releasing it's own PTT entry and use it instead. Notice if those functions previously couldn't fail, they now can [as acquisition might fail]. - Change the prototypes so that the main_ptt would be received as a parameter [instead of explicitly accessing it]. This prevents the future risk of adding codes that introduces new use-cases for flows using the main_ptt, ones that might be in race with the actual 'main' flows. Signed-off-by: Rahul Verma Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_cxt.c | 8 ++-- drivers/net/ethernet/qlogic/qed/qed_cxt.h | 9 ++-- drivers/net/ethernet/qlogic/qed/qed_dev.c | 67 ++++++++++++++++----------- drivers/net/ethernet/qlogic/qed/qed_dev_api.h | 8 ++-- drivers/net/ethernet/qlogic/qed/qed_fcoe.c | 10 +++- drivers/net/ethernet/qlogic/qed/qed_l2.c | 14 +++++- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 49 ++++++++++++++------ drivers/net/ethernet/qlogic/qed/qed_spq.c | 20 ++++++-- 8 files changed, 124 insertions(+), 61 deletions(-) commit 3a50d3518dcba44f8a0f9356b7140fe1499984ea Author: Mintz, Yuval Date: Thu Apr 6 15:58:28 2017 +0300 qed: Warn PTT usage by wrong hw-function PTT entries are per-hwfn; If some errneous flow is trying to use a PTT belonging to a differnet hwfn warn user, as this can break every register accessing flow later and is very hard to root-cause. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_hw.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 903d31e346282d658fe28da5c372ce581988db0f Author: Wadim Egorov Date: Mon Apr 3 12:23:03 2017 +0200 ARM: dts: rockchip: Add support for phyCORE-RK3288 SoM The phyCORE-RK3288 is a SoM (System on Module) containing a RK3288 SoC. The module can be connected to different carrier boards. It can be also equipped with different RAM, SPI flash and eMMC variants. The Rapid Development Kit option is using the following setup: - 1 GB DDR3 RAM (2 Banks) - 1x 4 KB EEPROM - DP83867 Gigabit Ethernet PHY - 16 MB SPI Flash - 4 GB eMMC Flash Signed-off-by: Wadim Egorov Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-phycore-som.dtsi | 497 ++++++++++++++++++++++++++++++ 1 file changed, 497 insertions(+) commit 966fea78adf23339fa73d6cdbcd9cd96a57c92b7 Author: Yannick Fertre Date: Tue Mar 28 11:44:49 2017 +0200 drm/panel: simple: Add support for Ampire AM-480272H3TMQW-T01H Add simple-panel support for the Ampire AM-480272H3TMQW-T01H, which is a 4.3" WQVGA panel. Signed-off-by: Yannick Fertre Signed-off-by: Thierry Reding drivers/gpu/drm/panel/panel-simple.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit ec1af27ea8f99ae893aebc38b54b470a69227388 Merge: b4041278 89ca694 Author: David S. Miller Date: Thu Apr 6 14:22:46 2017 -0700 Merge tag 'rxrpc-rewrite-20170406' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Miscellany Here's a set of patches that make some minor changes to AF_RXRPC: (1) Store error codes in struct rxrpc_call::error as negative codes and only convert to positive in recvmsg() to avoid confusion inside the kernel. (2) Note the result of trying to abort a call (this fails if the call is already 'completed'). (3) Don't abort on temporary errors whilst processing challenge and response packets, but rather drop the packet and wait for retransmission. And also adds some more tracing: (4) Protocol errors. (5) Received abort packets. (6) Changes in the Rx window size due to ACK packet information. (7) Client call initiation (to allow the rxrpc_call struct pointer, the wire call ID and the user ID/afs_call pointer to be cross-referenced). ==================== Signed-off-by: David S. Miller commit 2db496753e3a7da6117266d61782456511896c66 Author: Yannick Fertre Date: Tue Mar 28 11:44:48 2017 +0200 dt-bindings: Add Ampire AM-480272H3TMQW-T01H panel This patch adds documentation of device tree bindings for the WVGA panel Ampire AM-480272H3TMQW-T01H. Acked-by: Rob Herring Signed-off-by: Yannick Fertre Signed-off-by: Thierry Reding .../display/panel/ampire,am-480272h3tmqw-t01h.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 09bffa6e519256c6fa1552d6ba1f5d594337a464 Author: Rob Herring Date: Wed Mar 22 08:26:08 2017 -0500 drm: omap: use common OF graph helpers The OMAP driver has its own OF graph helpers that are similar to the common helpers. This commit replaces most of the calls with the common helpers. There's still a couple of custom helpers left, but the driver needs more extensive changes to get rid of them. In dss_init_ports, we invert the loop, looping through the known ports and matching them to DT nodes rather than looping thru DT nodes and matching them to the ports. Signed-off-by: Rob Herring Signed-off-by: Sean Paul drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 3 +- drivers/gpu/drm/omapdrm/dss/dss-of.c | 102 +--------------------------------- drivers/gpu/drm/omapdrm/dss/dss.c | 61 +++++--------------- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 3 +- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 3 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 11 ---- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- drivers/gpu/drm/omapdrm/dss/venc.c | 3 +- 9 files changed, 26 insertions(+), 164 deletions(-) commit ebc9446135671b89c2397f438af45d9cef0d1368 Author: Rob Herring Date: Wed Mar 29 13:55:46 2017 -0500 drm: convert drivers to use drm_of_find_panel_or_bridge Similar to the previous commit, convert drivers open coding OF graph parsing to use drm_of_find_panel_or_bridge instead. This changes some error messages to debug messages (in the graph core). Graph connections are often "no connects" depending on the particular board, so we want to avoid spurious messages. Plus the kernel is not a DT validator. Signed-off-by: Rob Herring Reviewed-by: Archit Taneja Tested-by: Philipp Zabel Acked-by: Maxime Ripard [seanpaul dropped rockchip changes since they're now obsolete] Signed-off-by: Sean Paul drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 73 ++++++------------- drivers/gpu/drm/bridge/nxp-ptn3460.c | 16 ++--- drivers/gpu/drm/bridge/parade-ps8622.c | 16 ++--- drivers/gpu/drm/bridge/tc358767.c | 27 +------ drivers/gpu/drm/exynos/exynos_dp.c | 35 ++++----- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 44 ++++-------- drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 27 ++----- drivers/gpu/drm/imx/imx-ldb.c | 27 ++----- drivers/gpu/drm/imx/parallel-display.c | 36 ++-------- drivers/gpu/drm/mediatek/mtk_dsi.c | 23 ++---- drivers/gpu/drm/mxsfb/mxsfb_out.c | 40 ++--------- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 26 ++----- drivers/gpu/drm/sun4i/sun4i_rgb.c | 11 +-- drivers/gpu/drm/sun4i/sun4i_tcon.c | 90 ++---------------------- 14 files changed, 95 insertions(+), 396 deletions(-) commit 86418f90a4c1a0073db65d8a1e2bf94421117a60 Author: Rob Herring Date: Wed Mar 22 08:26:06 2017 -0500 drm: convert drivers to use of_graph_get_remote_node Convert drivers to use the new of_graph_get_remote_node() helper instead of parsing the endpoint node and then getting the remote device node. Now drivers can just specify the device node and which port/endpoint and get back the connected remote device node. The details of the graph binding are nicely abstracted into the core OF graph code. This changes some error messages to debug messages (in the graph core). Graph connections are often "no connects" depending on the particular board, so we want to avoid spurious messages. Plus the kernel is not a DT validator. Signed-off-by: Rob Herring Acked-by: Neil Armstrong Tested-by: Liviu Dudau Tested-by: Eric Anholt Tested-by: Jyri Sarha Tested by: Archit Taneja Signed-off-by: Sean Paul drivers/gpu/drm/arm/hdlcd_drv.c | 22 ++------ drivers/gpu/drm/arm/malidp_drv.c | 28 ++-------- drivers/gpu/drm/bridge/adv7511/adv7533.c | 12 +---- drivers/gpu/drm/bridge/dumb-vga-dac.c | 15 ++---- drivers/gpu/drm/bridge/ti-tfp410.c | 15 ++---- drivers/gpu/drm/exynos/exynos_drm_dpi.c | 16 +----- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 13 ++--- drivers/gpu/drm/exynos/exynos_drm_mic.c | 25 +-------- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 30 +---------- drivers/gpu/drm/mediatek/mtk_dpi.c | 12 ++--- drivers/gpu/drm/mediatek/mtk_hdmi.c | 26 ++-------- drivers/gpu/drm/meson/meson_venc_cvbs.c | 19 ++----- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 28 +--------- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 12 +---- drivers/gpu/drm/tilcdc/tilcdc_external.c | 68 +++---------------------- drivers/gpu/drm/vc4/vc4_dpi.c | 15 ++---- 17 files changed, 48 insertions(+), 310 deletions(-) commit 1f2db3034c9f16ed918e34809167546f21d0fcb4 Author: Rob Herring Date: Wed Mar 22 08:26:05 2017 -0500 drm: of: introduce drm_of_find_panel_or_bridge Many drivers have a common pattern of searching the OF graph for either an attached panel or bridge and then finding the DRM struct for the panel or bridge. Also, most drivers need to handle deferred probing when the DRM device is not yet instantiated. Create a common function, drm_of_find_panel_or_bridge, to find the connected node and the associated DRM panel or bridge device. Signed-off-by: Rob Herring Acked-by: Philipp Zabel [seanpaul dropped extern from drm_of.h] Signed-off-by: Sean Paul drivers/gpu/drm/drm_of.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ include/drm/drm_of.h | 13 ++++++++++++ 2 files changed, 65 insertions(+) commit b61c8d5d9a27715dd31781910aef12be4882ebfd Author: Rob Herring Date: Wed Mar 22 08:26:04 2017 -0500 drm: make of_drm_find_panel also depend on CONFIG_DRM_PANEL For drm_of_find_panel_or_bridge() added in the next commit, an empty version of of_drm_find_panel is needed for !CONFIG_DRM_PANEL. Signed-off-by: Rob Herring Reviewed-by: Eric Anholt Signed-off-by: Sean Paul include/drm/drm_panel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce09d7667dd225564df1e20b8185d4ce7be886cc Author: Maarten Lankhorst Date: Thu Apr 6 13:19:03 2017 +0200 drm/atomic: Add connector atomic_check function, v2. The atomic_check function is useful for implementing properties, but it can be used for other connector modeset related checks as well. Similar to plane check functions, on a modeset atomic_check() is always called. Changes since v1: - Make sure atomic_check() is called on any modeset. Signed-off-by: Maarten Lankhorst Reviewed-by: Dhinakaran Pandiyan Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1491477543-31257-5-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 44 +++++++++++++++++++++++++++++--- include/drm/drm_modeset_helper_vtables.h | 34 ++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 4 deletions(-) commit 970ece83fdd46cb4fa834a4d5adfdf746e4174b2 Author: Maarten Lankhorst Date: Thu Apr 6 13:19:02 2017 +0200 drm/atomic: Move enable/connector check up in check_modeset() Now that handle_conflicting_encoders no longer touches active state, so there's no need to do the check quite that late any more. Doing it with all the other checks makes it a lot more clear what the below block tries to accomplish, and this feels like a better place to put the check. Signed-off-by: Maarten Lankhorst Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1491477543-31257-4-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 24d6652c1508ccb530726ad8065de92ac31f2449 Author: Maarten Lankhorst Date: Thu Apr 6 13:19:01 2017 +0200 drm/atomic: Set all the changed flags in one place. Now that handle_conflicting_encoders cannot disable crtc's any more it makes sense to set all the changed flags in 1 place. This makes the code slightly less magical. The (now removed) comment is out of date. The only reason the active_changed was set late was because handle_conflicting_encoders could disable connectors. This is no longer the case, and we can put everything in 1 place. Signed-off-by: Maarten Lankhorst Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1491477543-31257-3-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 44596b8c4750d9a2323f52aecdeecf34f6aaa2e0 Author: Maarten Lankhorst Date: Thu Apr 6 13:19:00 2017 +0200 drm/atomic: Unify conflicting encoder handling. Currently we use a flag to change behavior in atomic commit whether a conflicting encoder should be enabled or disabled. This is used for the legacy set_config helper, which disables connectors that have a conflicting encoder but not part of the active crtc list. There's no need for this to be handled in atomic commit, it could be done in the set_config helper instead. This will let the atomic check function reject any conflicting encoders, while set_config can disable conflicting crtc's. This makes it possible to recalculate the changed flags in 1 loop. Signed-off-by: Maarten Lankhorst Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1491477543-31257-2-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 7 +++++-- include/drm/drm_atomic.h | 2 -- 2 files changed, 5 insertions(+), 4 deletions(-) commit b404127879471c38ad13a246ce5dec156f60f828 Merge: 6d2d34a 7d4fe0d Author: David S. Miller Date: Thu Apr 6 13:53:14 2017 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2017-04-05 This series contains updates to fm10k only. Phil Turnbull from Oracle fixes an issue where the argument provided to FM10K_REMOVED macro was not what was expecting. Jake modifies the driver to replace the bitwise operators and defines with a BITMAP and enumeration values to avoid race conditions. Also future proof the driver so that developers do not have to remember to re-size the bitmaps when adding new values. Fixed the wording of a code comment to avoid stating that we return a value for a void function. Ngai-Mint makes sure that when configuring the receive ring, we make sure the receive queue is disabled. Fixed an issue where interfaces were resetting because the transmit mailbox FIFO was becoming full since the host was not ready, so ensure the host is ready before queueing up mailbox messages. ==================== Signed-off-by: David S. Miller commit 53552d5df6694f68f276b2e86f8162d0ef7cad93 Author: Daniel Vetter Date: Thu Apr 6 21:06:54 2017 +0200 drm: Take mode_config.mutex in setcrtc ioctl Legacy drivers insist that we really take all the locks in this path, and the harm in doing so is minimal. v2: Like git add, it exists :( Fixes: 2ceb585a956c ("drm: Add explicit acquire ctx handling around ->set_config") Cc: Harry Wentland Cc: Daniel Vetter Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Cc: Alex Deucher Reported-by: Alex Deucher Acked-and-tested-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170406190654.6733-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_crtc.c | 2 ++ 1 file changed, 2 insertions(+) commit 6d2d34a9b103212604ebfcb28c1431b502b81f77 Merge: 129858f b784e7e Author: David S. Miller Date: Thu Apr 6 13:43:32 2017 -0700 Merge branch 'l2tp-auto-mtu' R. Parameswaran says: ==================== L2TP:Adjust intf MTU, add underlay L3, L2 hdrs. Existing L2TP kernel code does not derive the optimal MTU for Ethernet pseudowires and instead leaves this to a userspace L2TP daemon or operator. If an MTU is not specified, the existing kernel code chooses an MTU that does not take account of all tunnel header overheads, which can lead to unwanted IP fragmentation. When L2TP is used without a control plane (userspace daemon), we would prefer that the kernel does a better job of choosing a default pseudowire MTU, taking account of all tunnel header overheads, including IP header options, if any. This patch addresses this. Change-set is organized as a two part patch series, with one patch introducing a new kernel function to compute the IP overhead on a socket, and the other patch using this new kernel function to compute the default L2TP MTU for an Ethernet pseudowire. Existing code also seems to assume an Ethernet (non-jumbo) underlay. The change proposed here uses the PMTU mechanism and the dst entry in the L2TP tunnel socket to directly pull up the underlay MTU (as the baseline number on top of which the encapsulation headers are factored in). An default MTU value of 1500 bytes is assumed as a fallback only if this fails. Fixed the kbuild test robot error in the previous posting. ==================== Signed-off-by: David S. Miller commit b784e7ebfce8cfb16c6f95e14e8532d0768ab7ff Author: R. Parameswaran Date: Wed Apr 5 17:00:07 2017 -0700 L2TP:Adjust intf MTU, add underlay L3, L2 hdrs. Existing L2TP kernel code does not derive the optimal MTU for Ethernet pseudowires and instead leaves this to a userspace L2TP daemon or operator. If an MTU is not specified, the existing kernel code chooses an MTU that does not take account of all tunnel header overheads, which can lead to unwanted IP fragmentation. When L2TP is used without a control plane (userspace daemon), we would prefer that the kernel does a better job of choosing a default pseudowire MTU, taking account of all tunnel header overheads, including IP header options, if any. This patch addresses this. Change-set here uses the new kernel function, kernel_sock_ip_overhead(), to factor the outer IP overhead on the L2TP tunnel socket (including IP Options, if any) when calculating the default MTU for an Ethernet pseudowire, along with consideration of the inner Ethernet header. Signed-off-by: R. Parameswaran Signed-off-by: David S. Miller net/l2tp/l2tp_eth.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 4 deletions(-) commit 113c3075931a334f899008f6c753abe70a3a9323 Author: R. Parameswaran Date: Wed Apr 5 16:50:35 2017 -0700 New kernel function to get IP overhead on a socket. A new function, kernel_sock_ip_overhead(), is provided to calculate the cumulative overhead imposed by the IP Header and IP options, if any, on a socket's payload. The new function returns an overhead of zero for sockets that do not belong to the IPv4 or IPv6 address families. This is used in the L2TP code path to compute the total outer IP overhead on the L2TP tunnel socket when calculating the default MTU for Ethernet pseudowires. Signed-off-by: R. Parameswaran Signed-off-by: David S. Miller include/linux/net.h | 3 +++ net/socket.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) commit 129858fa0b1ab3072155718b74bf91e440c2d73f Author: Kees Cook Date: Wed Apr 5 14:39:35 2017 -0700 net: ethernet: wiznet: avoid format string exposure While unlikely, this makes sure any format strings in the device name can't exposure information via the resulting workqueue name. Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/wiznet/w5100.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit df656bf6fbcf12524e5b2428c92ed3d59cc7b810 Author: Kees Cook Date: Wed Apr 5 14:39:03 2017 -0700 qlge: avoid format string exposure in workqueue While unlikely, this makes sure the workqueue name won't be processed as a format string. Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlge/qlge_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2f78227874754b1e10cd348fd6e7693b0dabb3f6 Author: Mintz, Yuval Date: Wed Apr 5 21:20:11 2017 +0300 qed: Correct MSI-x for storage When qedr is enabled, qed would try dividing the msi-x vectors between L2 and RoCE, starting with L2 and providing it with sufficient vectors for its queues. Problem is qed would also do that for storage partitions, and as those don't need queues it would lead qed to award those partitions with 0 msi-x vectors, causing them to believe theye're using INTa and preventing them from operating. Fixes: 51ff17251c9c ("qed: Add support for RoCE hw init") Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9e9623abdaf749138d5f78c40f74d2093f8c90ae Merge: 91e91be d1db799 Author: David S. Miller Date: Thu Apr 6 13:33:17 2017 -0700 Merge branch 'dsa-loop-fixes' Florian Fainelli says: ==================== net: dsa: Mock-up driver couple fixes Thanks to Dan's static checker, a bunch of small issues were found in the code. ==================== Signed-off-by: David S. Miller commit d1db799e968bf6677ac88a90729945ce0eb3ede5 Author: Florian Fainelli Date: Wed Apr 5 11:19:31 2017 -0700 net: dsa: loop: Initialize err in dsa_loop_vlan_dump Dan's static checker reported the following: drivers/net/dsa/dsa_loop.c:223 dsa_loop_port_vlan_dump() error: uninitialized symbol 'err'. which could happen if we do hit the continue statement for each iteration of the loop. Initialize err to 0 here. Reported-by: Dan Carpenter Fixes: 98cd1552ea27 ("net: dsa: Mock-up driver") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/dsa_loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5865ccce7eac9bb520d7dacfb48cb72764ed10c3 Author: Florian Fainelli Date: Wed Apr 5 11:19:30 2017 -0700 net: dsa: loop: Fix uninitialized pvid variable Dan's static analyzer reported the following: drivers/net/dsa/dsa_loop.c:181 dsa_loop_port_vlan_del() error: XXX uninitialized symbol 'pvid'. we were missing the assignment of pvid to ps->vid, so add that. Reported-by: Dan Carpenter Fixes: 98cd1552ea27 ("net: dsa: Mock-up driver") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/dsa_loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91e91beff6908a1e54536613b318efd56f6e27c4 Author: Or Gerlitz Date: Wed Apr 5 19:09:25 2017 +0300 net/sched: Removed unused vlan actions definition Commit c7e2b9689ef "sched: introduce vlan action" added both the UAPI values for the vlan actions (TCA_VLAN_ACT_) and these two in-kernel ones which are not used, remove them. Signed-off-by: Or Gerlitz Acked-by: Jiri Pirko Reviewed-by: Simon Horman Signed-off-by: David S. Miller include/net/tc_act/tc_vlan.h | 3 --- 1 file changed, 3 deletions(-) commit 75d04aa368d9e945923819e9cc420fac125967ea Author: Eric Dumazet Date: Wed Apr 5 08:49:02 2017 -0700 mlx4: trust shinfo->gso_segs mlx4 is the only driver in the tree making a point to recompute shinfo->gso_segs. Lets remove superfluous code. Signed-off-by: Eric Dumazet Cc: Tariq Toukan Cc: Saeed Mahameed Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_tx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 827d240a232d27cc12e9657d012f2e5ba953e98a Author: Colin Ian King Date: Wed Apr 5 13:35:44 2017 +0100 qed: fix missing break in OOO_LB_TC case There seems to be a missing break on the OOO_LB_TC case, pq_id is being assigned and then re-assigned on the fall through default case and that seems suspect. Detected by CoverityScan, CID#1424402 ("Missing break in switch") Fixes: b5a9ee7cf3be1 ("qed: Revise QM cofiguration") Signed-off-by: Colin Ian King Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 1 + 1 file changed, 1 insertion(+) commit 2c62e0bc685fcb400a0b5cffb39860290bc902a8 Author: Gao Feng Date: Tue Mar 28 09:52:52 2017 +0800 netfilter: ctnetlink: Expectations must have a conntrack helper area The expect check function __nf_ct_expect_check() asks the master_help is necessary. So it is unnecessary to go ahead in ctnetlink_alloc_expect when there is no help. Actually the commit bc01befdcf3e ("netfilter: ctnetlink: add support for user-space expectation helpers") permits ctnetlink create one expect even though there is no master help. But the latter commit 3d058d7bc2c5 ("netfilter: rework user-space expectation helper support") disables it again. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_netlink.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) commit 6e699867f84c0f358fed233fe6162173aca28e04 Author: Florian Westphal Date: Tue Mar 28 10:31:03 2017 +0200 netfilter: nat: avoid use of nf_conn_nat extension successful insert into the bysource hash sets IPS_SRC_NAT_DONE status bit so we can check that instead of presence of nat extension which requires extra deref. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 2 +- net/netfilter/nf_nat_core.c | 18 ++++-------------- 2 files changed, 5 insertions(+), 15 deletions(-) commit cba81cc4c95fefa4805163bb19c0f43d2a8ca52c Author: Gao Feng Date: Mon Mar 27 23:12:08 2017 +0800 netfilter: nat: nf_nat_mangle_{udp,tcp}_packet returns boolean nf_nat_mangle_{udp,tcp}_packet() returns int. However, it is used as bool type in many spots. Fix this by consistently handle this return value as a boolean. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_nat_helper.h | 36 +++++++++++++++---------------- net/ipv4/netfilter/nf_nat_pptp.c | 20 +++++++++--------- net/netfilter/ipvs/ip_vs_ftp.c | 13 +++++++----- net/netfilter/nf_nat_amanda.c | 11 +++++----- net/netfilter/nf_nat_helper.c | 40 +++++++++++++++++------------------ net/netfilter/nf_nat_irc.c | 9 ++++---- 6 files changed, 65 insertions(+), 64 deletions(-) commit 053ee0a7035781a27eedb2b06cac638c8c65ce83 Author: Tobias Regnery Date: Wed Apr 5 11:11:10 2017 +0200 net/mlx5e: fix build error without CONFIG_SYSFS Commit 9008ae074885 ("net/mlx5e: Minimize mlx5e_{open/close}_locked") copied the calls to netif_set_real_num_{tx,rx}_queues from mlx5e_open_locked to mlx5e_activate_priv_channels and wraps them in an if condition to test for netdev->real_num_{tx,rx}_queues. But netdev->real_num_rx_queues is conditionally compiled in if CONFIG_SYSFS is set. Without CONFIG_SYSFS the build fails: drivers/net/ethernet/mellanox/mlx5/core/en_main.c: In function 'mlx5e_activate_priv_channels': drivers/net/ethernet/mellanox/mlx5/core/en_main.c:2515:12: error: 'struct net_device' has no member named 'real_num_rx_queues'; did you mean 'real_num_tx_queues'? Fix this by unconditionally call netif_set_real_num{tx,rx}_queues like before commit 9008ae074885. Fixes: 9008ae074885 ("net/mlx5e: Minimize mlx5e_{open/close}_locked") Signed-off-by: Tobias Regnery Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0168778115687486575a6831df865dbc4f5369fe Merge: aed93ee f4e7c7c Author: Dave Airlie Date: Fri Apr 7 05:41:42 2017 +1000 Merge branch 'drm-next-4.12' of git://people.freedesktop.org/~agd5f/linux into drm-next A few more things for 4.12: - ttm and amdgpu support for non-contiguous vram CPU mappings - lots of bug fixes and cleanups for vega10 - misc bug fixes and code cleanups [airlied: fix do_div error on 32-bit arm, not sure it's 100% correct] * 'drm-next-4.12' of git://people.freedesktop.org/~agd5f/linux: (58 commits) drm/amdgpu: use uintptr_t instead of unsigned long to store pointer drm/amdgpu: Avoid using signed integer to store pointer value drm/amdgpu:invoke new implemented AI MB func drm/amdgpu/vega10:timeout set to equal with VI drm/amdgpu:implement the reset MB func for vega10 drm/amdgpu:fix typo for mxgpu_ai drm/amdgpu:no need to involv HDP in KIQ drm/amdgpu:add PSP block only load_type=PSP (v2) drm/amdgpu/smu9: update to latest driver interface drm/amd/amdgpu: cleanup gfx_v9_0_gpu_init() drm/amd/amdgpu: cleanup gfx_v9_0_rlc_reset() drm/amd/amdgpu: cleanup gfx_v9_0_rlc_start() drm/amd/amdgpu: simplify gfx_v9_0_cp_gfx_enable() drm/amd/amdgpu: cleanup gfx_v9_0_kiq_init_register() drm/amd/amdgpu: Drop gfx_v9_0_print_status() drm/amd/amdgpu: cleanup gfx_v9_0_set_gfx_eop_interrupt_state() drm/amd/amdgpu: cleanup gfx_v9_0_set_priv_reg_fault_state() drm/amd/amdgpu: cleanup gfx_v9_0_set_priv_inst_fault_state() drm/amd/amdgpu: cleanup gfx_v9_0_init_queue() drm/amdgpu: Move function amdgpu_has_atpx near other similar functions ... commit 82fe0d2b44e00820c4ecb40a30e6014df6a1dd1f Author: Kees Cook Date: Tue Apr 4 22:12:09 2017 -0700 af_unix: Use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, and the initializer fixes were extracted from grsecurity. In this case, NULL initialize with { } instead of undesignated NULLs. Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/unix/af_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 540c86f3ed3dd173c1dfcd95214e4401ef565ba7 Merge: bb54be5 10cbd64 Author: David S. Miller Date: Thu Apr 6 12:38:05 2017 -0700 Merge branch 'ftgmac100-rework-batch-1-Link-and-Interrupts' Benjamin Herrenschmidt says: ==================== ftgmac100: Rework batch 1 - Link & Interrupts This is version 2 of the first batch of updates to the ftgmac100 driver. Essentially: - A few misc cleanups - Fixing link speed & duplex handling (including dealing with an Aspeed requirement to double reset the controller when the speed changes) - And addition of a reset task workqueue which will be used for delaying the re-initialization of the controller - Fixing a number of issues with how interrupts and NAPI are dealt with. Subsequent batches will rework and improve the rx path, the tx path, and add a bunch of features and fixes. Version 2 addresses some review comments to patches 5 and 10 (see version history in the respective emails). ==================== Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit aed93ee7d03eac9b7d21f08aebe8a7d9ea069e20 Merge: 0e96133 78ec187 Author: Dave Airlie Date: Fri Apr 7 05:38:27 2017 +1000 Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next Highlights: - Cooling device support from Russell, to allow GPU throttling on system thermal overload. - Explicit fencing support from Philipp, implemented in a similar way to drm/msm. * 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux: drm/etnaviv: submit support for out-fences drm/etnaviv: return GPU fence through the submit structure drm/etnaviv: submit support for in-fences drm/etnaviv: add etnaviv cooling device drm/etnaviv: switch to postclose drm/etnaviv: add lockdep assert to fence allocation commit 10cbd640760991b8563dbe1d94160641fa6287b7 Author: Benjamin Herrenschmidt Date: Wed Apr 5 12:28:53 2017 +1000 ftgmac100: Rework NAPI & interrupts handling First, don't look at the interrupt status in the poll loop to decide what to poll. It's wrong. If we have run out of budget, we may still have RX packets to unqueue but no more RX interrupt pending. So instead move the code looking at the interrupt status into the interrupt handler where it belongs. That avoids a slow MMIO read in the NAPI fast path. We keep the abnormal interrupts enabled while NAPI is scheduled. While at it, actually do something useful in the "error" cases: On AHB bus error, trigger the new reset task, that's about all we can do. On RX packet fifo or descriptor overflows, we need to restart the MAC after having freed things up. So set a flag that NAPI will see and use to perform that restart after harvesting the RX ring. Finally, we shouldn't complete NAPI if there are still outgoing packets that will need harvesting. Waiting for more interrupts is less efficient than letting NAPI run a while longer while the queue drains. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 137 +++++++++++++++++-------------- drivers/net/ethernet/faraday/ftgmac100.h | 14 ++++ 2 files changed, 90 insertions(+), 61 deletions(-) commit 9b86785d1e8b2a971c0ac77a76fb49d78db50916 Author: Benjamin Herrenschmidt Date: Wed Apr 5 12:28:52 2017 +1000 ftgmac100: Remove useless tests in interrupt handler The interrupt is neither enabled nor registered when the interface isn't running (regardless of whether we use nc-si or not) so the test isn't useful. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 874b55bf62330ca215758845d8abe93d139f874a Author: Benjamin Herrenschmidt Date: Wed Apr 5 12:28:51 2017 +1000 ftgmac100: Rework MAC reset and init The HW requires a full MAC reset when changing the speed. Additionally the Aspeed documentation spells out that the MAC needs to be reset twice with a 10us interval. We thus move the speed setting and top level reset code into a new ftgmac100_reset_and_config_mac() function which handles both. Move the ring pointers initialization there too in order to reflect the HW change. Also reduce the timeout for the MAC reset as it shouldn't take more than 300 clock cycles according to the doc. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 98 +++++++++++++++++++------------- 1 file changed, 59 insertions(+), 39 deletions(-) commit 855944ce1cc4037d58361b7b1cd0f07c2eb40734 Author: Benjamin Herrenschmidt Date: Wed Apr 5 12:28:50 2017 +1000 ftgmac100: Add a reset task and use it for link changes Link speed changes require a full HW reset. This isn't done properly at the moment. It will involve delays and thus isn't suitable to do from the link poll callback. So let's create a reset_task that we can queue up when the link changes. It will be useful for various cases of error handling as well. Signed-off-by: Benjamin Herrenschmidt Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 87 +++++++++++++++++++++++++++----- 1 file changed, 74 insertions(+), 13 deletions(-) commit da40d9d4b5932d27d8cf3fea685d4cd466b88ec3 Author: Benjamin Herrenschmidt Date: Wed Apr 5 12:28:49 2017 +1000 ftgmac100: Move the bulk of inits to a separate function The link monitoring and error handling code will have to redo the ring inits and HW setup so move the code out of ftgmac100_open() into a dedicated function. This forces a bit of re-ordering of ftgmac100_open() but nothing dramatic. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 71 +++++++++++++++++++------------- 1 file changed, 42 insertions(+), 29 deletions(-) commit 81f1eca663c070ea07eb390ca2a0b205287c8fc1 Author: Benjamin Herrenschmidt Date: Wed Apr 5 12:28:48 2017 +1000 ftgmac100: Request the interrupt only after HW is reset The interrupt isn't shared, so this will keep it masked until we have the HW in a known sane state. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit b8dbecff9bab8251d63bc7e7d0f6028f5afd7152 Author: Benjamin Herrenschmidt Date: Wed Apr 5 12:28:47 2017 +1000 ftgmac100: Move napi_add/del to open/close Rather than probe/remove Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 87d18757ec1677c594ada9b5882ab815893da1e2 Author: Benjamin Herrenschmidt Date: Wed Apr 5 12:28:46 2017 +1000 ftgmac100: Split ring alloc, init and rx buffer alloc Currently, a single function is used to allocate the rings themselves, initialize them, populate the rx ring, and allocate the rx buffers. The same happens on free. This splits them into separate functions. This will be useful when properly implementing re-initialization on link changes and error handling when the rings will be repopulated but not freed. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 68 ++++++++++++++++++++++---------- 1 file changed, 47 insertions(+), 21 deletions(-) commit 51764777354664b20963359ad3b78e564d14e1a5 Author: Benjamin Herrenschmidt Date: Wed Apr 5 12:28:45 2017 +1000 ftgmac100: Cleanup speed/duplex tracking and fix duplex config Keep track of both the current speed and duplex settings instead of only speed and properly apply the duplex setting to the HW. This reworks the adjust_link() function to also avoid trying to reconfigure the HW when there is no link and to display the link state to the user. Signed-off-by: Benjamin Herrenschmidt Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 52 +++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 8 deletions(-) commit 8396e1cb0b9f7505b0cd56e26df35279cb3bc1cb Author: Benjamin Herrenschmidt Date: Wed Apr 5 12:28:44 2017 +1000 ftgmac100: Remove "enabled" flags It's not used in any meaningful way Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 7 ------- 1 file changed, 7 deletions(-) commit 831fb3388c1ecf192fcd9772c2de1697e9af5dda Author: Benjamin Herrenschmidt Date: Wed Apr 5 12:28:43 2017 +1000 ftgmac100: Reorder struct fields and comment Reorder the fields in struct ftgmac in slightly more logical groups. Will make more sense as I add/remove some. No code change. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 3f6af0eede3051a84ffb6d3e2090098130568896 Author: Benjamin Herrenschmidt Date: Wed Apr 5 12:28:42 2017 +1000 ftgmac100: Remove "banner" comments The divisions they represent are not particularily meaningful and things are going to be moving around with upcoming changes making these comments more a burden than anything else. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 42 -------------------------------- 1 file changed, 42 deletions(-) commit 60b28a1167749c5fef257add4ebb1d7c1c1c6629 Author: Benjamin Herrenschmidt Date: Wed Apr 5 12:28:41 2017 +1000 ftgmac100: Use netdev->irq instead of private copy There's a placeholder already for the irq, use it Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 0e961332147851d16038d52323fc50e23dcbdfa3 Merge: 3eda2f5 3d1df96 Author: Dave Airlie Date: Fri Apr 7 05:34:46 2017 +1000 Merge tag 'imx-drm-next-2017-04-04' of git://git.pengutronix.de/git/pza/linux into drm-next imx-drm module/dependency changes - The PRE/PRG drivers added an unwanted DRM dependency to the ipu-v3 driver. Remove the dependency by conditionally disabling PRE/PRG support depending on CONFIG_DRM. - Merge the imx-ipuv3-crtc module into the imxdrm module. There is no reason anymore for a separation between core drm driver and crtc/plane drivers, especially since commit eb8c88808c83 ("drm/imx: add deferred plane disabling"), which added a dependency on imx-ipuv3-crtc to the imxdrm module. * tag 'imx-drm-next-2017-04-04' of git://git.pengutronix.de/git/pza/linux: drm/imx: merge imx-drm-core and ipuv3-crtc in one module gpu: ipu-v3: don't depend on DRM being enabled commit bb54be589c7a8451a0504924703abdffeb06b79f Author: Felix Manlunas Date: Tue Apr 4 19:26:57 2017 -0700 liquidio: fix Octeon core watchdog timeout false alarm Detection of watchdog timeout of Octeon cores is flawed and susceptible to false alarms. Refactor by removing the detection code, and in its place, leverage existing code that monitors for an indication from the NIC firmware that an Octeon core crashed; expand the meaning of the indication to "an Octeon core crashed or its watchdog timer expired". Detection of watchdog timeout is now delegated to an exception handler in the NIC firmware; this is free of false alarms. Also if there's an Octeon core crash or watchdog timeout: (1) Disable VF Ethernet links. (2) Decrement the module refcount by an amount equal to the number of active VFs of the NIC whose Octeon core crashed or had a watchdog timeout. The refcount will continue to reflect the active VFs of other liquidio NIC(s) (if present) whose Octeon cores are faultless. Item (2) is needed to avoid the case of not being able to unload the driver because the module refcount is stuck at some non-zero number. There is code that, in normal cases, decrements the refcount upon receiving a message from the firmware that a VF driver was unloaded. But in exceptional cases like an Octeon core crash or watchdog timeout, arrival of that particular message from the firmware might be unreliable. That normal case code is changed to not touch the refcount in the exceptional case to avoid contention (over the refcount) with the liquidio_watchdog kernel thread who will carry out item (2). Signed-off-by: Felix Manlunas Signed-off-by: Derek Chickles Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 178 ++++++++++++--------- .../net/ethernet/cavium/liquidio/octeon_device.h | 2 + .../net/ethernet/cavium/liquidio/octeon_network.h | 4 - 3 files changed, 107 insertions(+), 77 deletions(-) commit 6c5ed5ae353cdf156f9ac4db17e15db56b4de880 Author: Maarten Lankhorst Date: Thu Apr 6 20:55:20 2017 +0200 drm/atomic: Acquire connection_mutex lock in drm_helper_probe_single_connector_modes, v4. mode_valid() called from drm_helper_probe_single_connector_modes() may need to look at connector->state because what a valid mode is may depend on connector properties being set. For example some HDMI modes might be rejected when a connector property forces the connector into DVI mode. Some implementations of detect() already lock all state, so we have to pass an acquire_ctx to them to prevent a deadlock. This means changing the function signature of detect() slightly, and passing the acquire_ctx for locking multiple crtc's. For the callbacks, it will always be non-zero. To allow callers not to worry about this, drm_helper_probe_detect_ctx is added which might handle -EDEADLK for you. Changes since v1: - Always set ctx parameter. Changes since v2: - Always take connection_mutex when probing. Changes since v3: - Remove the ctx from intel_dp_long_pulse, and add WARN_ON(!connection_mutex) (danvet) - Update docs to clarify the locking situation. (danvet) Signed-off-by: Maarten Lankhorst Cc: Boris Brezillon Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1491504920-4017-1-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_probe_helper.c | 100 ++++++++++++++++++++++++++++--- drivers/gpu/drm/i915/intel_crt.c | 25 ++++---- drivers/gpu/drm/i915/intel_display.c | 25 ++++---- drivers/gpu/drm/i915/intel_dp.c | 21 +++---- drivers/gpu/drm/i915/intel_drv.h | 8 +-- drivers/gpu/drm/i915/intel_hotplug.c | 3 +- drivers/gpu/drm/i915/intel_tv.c | 21 +++---- include/drm/drm_connector.h | 6 ++ include/drm/drm_crtc_helper.h | 3 + include/drm/drm_modeset_helper_vtables.h | 36 +++++++++++ 10 files changed, 187 insertions(+), 61 deletions(-) commit b73b3cde0e8b77af0d3b3758cfa7774a50abd640 Author: Florian Fainelli Date: Tue Apr 4 18:16:57 2017 -0700 net: usbnet: Remove unused driver_name variable With GCC 6.3, we can get the following warning: drivers/net/usb/usbnet.c:85:19: warning: 'driver_name' defined but not used [-Wunused-const-variable=] static const char driver_name [] = "usbnet"; ^~~~~~~~~~~ Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/usb/usbnet.c | 2 -- 1 file changed, 2 deletions(-) commit 89c0a361301f81d76be5ab77c3f5470b88792670 Author: Alexei Starovoitov Date: Thu Apr 6 12:20:26 2017 -0700 selftests/bpf: fix merge conflict fix artifact of merge resolution Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_verifier.c | 5 ----- 1 file changed, 5 deletions(-) commit 3eda2f5983f63c61e686efce21a8e624074c934e Merge: fabe2be 99a97a8 Author: Dave Airlie Date: Fri Apr 7 05:20:06 2017 +1000 Merge branch 'linux-4.12' of git://github.com/skeggsb/linux into drm-next A bit more for 4.12: - GP10B support - GP107 acceleration support * 'linux-4.12' of git://github.com/skeggsb/linux: (23 commits) drm/nouveau/gpio: enable interrupts on cards with 32 gpio lines drm/nouveau/gr/gp107: initial support drm/nouveau/core: recognise GP10B chipset drm/nouveau/platform: support for probing GP10B drm/nouveau/platform: make VDD regulator optional drm/nouveau/gr: support for GP10B drm/nouveau/ibus: add GP10B support drm/nouveau/mc: add GP10B support drm/nouveau/fb: add GP10B support drm/nouveau/fifo: add GP10B support drm/nouveau/msgqueue: support for GP10B PMU firmware drm/nouveau/secboot: add GP10B support drm/nouveau/secboot/gm20b: specify MC base address as argument drm/nouveau/secboot: start LS firmware in post-run hook drm/nouveau/secboot: let LS post_run hooks return error drm/nouveau/secboot: pass instance to LS firmware loaders drm/nouveau/secboot: allow to boot multiple falcons drm/nouveau/imem/gk20a: Turn instmem lock into mutex drm/nouveau: initial support (display-only) for GP107 drm/nouveau/kms/nv50: fix double dma_fence_put() when destroying plane state ... commit 3448890c32c32c482c3ec20baa8fdd2ab4f94cc0 Author: Al Viro Date: Tue Mar 21 16:35:08 2017 -0400 powerpc: get rid of zeroing, switch to RAW_COPY_USER Signed-off-by: Al Viro arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/uaccess.h | 59 ++++++-------------------------------- arch/powerpc/lib/Makefile | 2 +- arch/powerpc/lib/copy_32.S | 14 --------- arch/powerpc/lib/copyuser_64.S | 35 ++-------------------- arch/powerpc/lib/usercopy_64.c | 41 -------------------------- 6 files changed, 14 insertions(+), 138 deletions(-) commit f2ed8bebee696a80f877aa436bfafed1f3336bdd Merge: 527b5ba a7d2475 Author: Al Viro Date: Thu Apr 6 15:08:10 2017 -0400 Merge commit 'a7d2475af7aedcb9b5c6343989a8bfadbf84429b' into uaccess.powerpc backmerge of sorting the arch/powerpc/Kconfig commit f7d37bc3cb20828ac43b22cbd40222877ee2c46a Author: Charles Keepax Date: Tue Mar 28 15:14:41 2017 +0100 regulator: helpers: Add regmap set_pull_down helper Add a helper function regulator_set_pull_down_regmap to allow regmap based regulators to easily enable pull down. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown drivers/regulator/helpers.c | 18 ++++++++++++++++++ include/linux/regulator/driver.h | 8 ++++++++ 2 files changed, 26 insertions(+) commit a7a453f56a1a116027f84ac53b365eb045a0e279 Author: Charles Keepax Date: Tue Mar 28 15:14:40 2017 +0100 regulator: helpers: Add regmap set_soft_start helper Add a helper function regulator_set_soft_start_regmap to allow regmap based regulators to easily enable soft start. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown drivers/regulator/helpers.c | 18 ++++++++++++++++++ include/linux/regulator/driver.h | 8 ++++++++ 2 files changed, 26 insertions(+) commit 0c67fb5544061cb990e07a73e1b7ba1f8ca22479 Author: Charles Keepax Date: Thu Apr 6 13:52:14 2017 +0100 ASoC: cs35l35: Add DT binding to specify usage of an external boost supply Add a device tree binding to let the driver know that the amplifier is configured to use an external boost supply. Signed-off-by: Charles Keepax Acked-by: Brian Austin Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/cs35l35.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 77b329d1943d38a5acdbaf9d57754975bce701d4 Author: Charles Keepax Date: Thu Apr 6 13:52:13 2017 +0100 ASoC: cs35l35: Correct handling of PDN_DONE with external boost When using an external boost supply the PDN_DONE bit is not set, update the handling in this case to use to use an appropriate fixed delay. Signed-off-by: Charles Keepax Acked-by: Brian Austin Signed-off-by: Mark Brown include/sound/cs35l35.h | 2 ++ sound/soc/codecs/cs35l35.c | 32 ++++++++++++++++++++++++-------- 2 files changed, 26 insertions(+), 8 deletions(-) commit 2c84afb52ebea59e9862fcb8234126b7ae1d1960 Author: Charles Keepax Date: Thu Apr 6 13:52:12 2017 +0100 ASoC: cs35l35: Improve power down time Shorten the time it takes to power down the amp by disabling the volume ramp whilst doing the final shutdown. The driver has already muted the amplifier at this stage so doing the volume ramp serves no purpose. Signed-off-by: Charles Keepax Acked-by: Brian Austin Signed-off-by: Mark Brown sound/soc/codecs/cs35l35.c | 8 ++++++++ sound/soc/codecs/cs35l35.h | 3 +++ 2 files changed, 11 insertions(+) commit 303e8954af8daa087e4f42788672d280337071ab Author: Daniel Baluta Date: Thu Apr 6 14:51:53 2017 +0300 ASoC: codec: wm8960: Stop when a matching PLL freq is found When a matching PLL freq is found, searching continues even this is not necessary. The problem was introduced with the following refactoring commit 84fdc00d519ffd ("ASoC: codec: wm9860: Refactor PLL out freq search) Signed-off-by: Daniel Baluta Signed-off-by: Mark Brown sound/soc/codecs/wm8960.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7c0c2000716e64151b3c0c62026c18f31537ebe9 Author: Ryan Lee Date: Tue Apr 4 02:23:08 2017 +0900 ASoC: Add support for Maxim Integrated MAX98927 Amplifier Signed-off-by: Ryan Lee Signed-off-by: Mark Brown .../devicetree/bindings/sound/max98925.txt | 22 - .../devicetree/bindings/sound/max98926.txt | 32 - .../devicetree/bindings/sound/max9892x.txt | 41 + sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/max98927.c | 841 +++++++++++++++++++++ sound/soc/codecs/max98927.h | 272 +++++++ 7 files changed, 1161 insertions(+), 54 deletions(-) commit f4e7c7c1b4ed4c28caf679bc94ca5aa096310c10 Author: Alex Xie Date: Wed Apr 5 16:54:34 2017 -0400 drm/amdgpu: use uintptr_t instead of unsigned long to store pointer Signed-off-by: Alex Xie Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ec2c467efe9b9d781e08a4ac827c5106e3c775c4 Author: Alex Xie Date: Wed Apr 5 16:33:00 2017 -0400 drm/amdgpu: Avoid using signed integer to store pointer value Signed-off-by: Alex Xie Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 81758c55956d91feae2f11e3dbf20b5ce45c6f23 Author: Monk Liu Date: Wed Apr 5 13:04:50 2017 +0800 drm/amdgpu:invoke new implemented AI MB func Implement the sr-iov mailbox for soc15 asics. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 8758cb6a96aec6a2474c1827d38f094264ac034b Author: Monk Liu Date: Wed Apr 5 12:17:39 2017 +0800 drm/amdgpu/vega10:timeout set to equal with VI Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f98b617ed5cc47157c4ccb8204b41ccec9f1281d Author: Monk Liu Date: Wed Apr 5 12:17:18 2017 +0800 drm/amdgpu:implement the reset MB func for vega10 they are lack in the bringup stage, we need them for GPU reset feature. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 133 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h | 5 ++ 2 files changed, 138 insertions(+) commit 94b4fd725b7d8625a66034dee683f55c66f77a1f Author: Monk Liu Date: Wed Apr 5 12:16:44 2017 +0800 drm/amdgpu:fix typo for mxgpu_ai Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 377e275946340916c74c169c4cb0a39da99704ce Author: Monk Liu Date: Wed Apr 5 16:39:11 2017 +0800 drm/amdgpu:no need to involv HDP in KIQ 1,KIQ won't touch VRAM so no need to involv HDP flush/invalidate at all. 2,According to CP hw designer KIQ better not use any PM4 package lead to wait behave. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 ---- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 -- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 -- 3 files changed, 8 deletions(-) commit bb5c9ca588d1e7856f5c95250adb2c2d2617ccf9 Author: Monk Liu Date: Thu Mar 30 18:00:20 2017 +0800 drm/amdgpu:add PSP block only load_type=PSP (v2) SRIOV currently only can load ucode directly, and PSP block is not supported by VF temporarily. will remove this restrict and use PSP load all ucode even for SRIOV later v2: squash in check against module parameter Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ba8a21cfbcaafeda7b29128a5182f7c324d959f3 Author: Evan Quan Date: Wed Apr 5 11:54:43 2017 +0800 drm/amdgpu/smu9: update to latest driver interface Signed-off-by: Evan Quan Signed-off-by: Alex Deucher Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smu9_driver_if.h | 57 ++++++++++++++++++++-- 1 file changed, 53 insertions(+), 4 deletions(-) commit 40f0677337987998880b3ee20c59e036d18d88d3 Author: Tom St Denis Date: Wed Apr 5 09:16:01 2017 -0400 drm/amd/amdgpu: cleanup gfx_v9_0_gpu_init() Use new WREG32_FIELD15 macro Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 596c8e8b7f029226cff362b6b3bc65e3563ccdf1 Author: Tom St Denis Date: Wed Apr 5 09:06:13 2017 -0400 drm/amd/amdgpu: cleanup gfx_v9_0_rlc_reset() Use new WREG32_FIELD15 macro Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 342cda25220c708b19588dff4ee87c924df44b5b Author: Tom St Denis Date: Wed Apr 5 09:04:50 2017 -0400 drm/amd/amdgpu: cleanup gfx_v9_0_rlc_start() Use new WREG32_FIELD15 macro Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ea64468e36c0ca79b7fe611dbf7fe6bde990eeea Author: Tom St Denis Date: Wed Apr 5 09:03:08 2017 -0400 drm/amd/amdgpu: simplify gfx_v9_0_cp_gfx_enable() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 72edadd53eab4bc5e3a215464c4936f069581a80 Author: Tom St Denis Date: Wed Apr 5 08:59:16 2017 -0400 drm/amd/amdgpu: cleanup gfx_v9_0_kiq_init_register() Use new WREG32_FIELD macro Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 75bac5c67923b833c0f32ff0b9799512f24ff59a Author: Tom St Denis Date: Wed Apr 5 08:54:11 2017 -0400 drm/amd/amdgpu: Drop gfx_v9_0_print_status() It's not used in gfx 6/7/8 so drop it from gfx 9 as well. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 175 +--------------------------------- 1 file changed, 1 insertion(+), 174 deletions(-) commit 9da2c6526944a0de6a1449a977e58af88fb619ea Author: Tom St Denis Date: Wed Apr 5 08:51:02 2017 -0400 drm/amd/amdgpu: cleanup gfx_v9_0_set_gfx_eop_interrupt_state() Use new WREG32_FIELD15 macro. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 8dd553e1568ea6fdc69b62743226670728fc25a7 Author: Tom St Denis Date: Wed Apr 5 08:49:00 2017 -0400 drm/amd/amdgpu: cleanup gfx_v9_0_set_priv_reg_fault_state() Use new WREG32_FIELD15 macro. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 98709ca635ea6d073e31c012eff19973015e1faf Author: Tom St Denis Date: Wed Apr 5 08:46:12 2017 -0400 drm/amd/amdgpu: cleanup gfx_v9_0_set_priv_inst_fault_state() Use new WREG32_FIELD15 macro. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit efe53d8a4615fd218ab379cef76af8c57e63ce1d Author: Tom St Denis Date: Wed Apr 5 08:32:13 2017 -0400 drm/amd/amdgpu: cleanup gfx_v9_0_init_queue() Introduce WREG32_FIELD15 macro for SOC15 architectures. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 11 +++-------- 2 files changed, 6 insertions(+), 8 deletions(-) commit 714f88e06f2f84a396129cc6990d7369d3fdcad5 Author: Alex Xie Date: Wed Apr 5 11:07:13 2017 -0400 drm/amdgpu: Move function amdgpu_has_atpx near other similar functions Signed-off-by: Alex Xie Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) commit 6e3f187cc0b434012fdca272c332b1251ce7f7ff Author: Christian König Date: Wed Apr 5 11:46:12 2017 +0200 drm/amdgpu: fix over allocating of IRQ sources We need an array of pointers to IRQ sources, not an array of sources. Signed-off-by: Christian König Reported-by: Dan Carpenter Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8b5de0ebe420aa57f962dcd9777298d3ae55953f Author: Tom St Denis Date: Tue Apr 4 11:40:13 2017 -0400 drm/amd/amdgpu: Clean up psp reload_quirk() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 61a8cee51f2c14c472f29f2f192936e716694f72 Author: Tom St Denis Date: Tue Apr 4 11:36:20 2017 -0400 drm/amd/amdgpu: Fix psp_v3_1 compare sram Had the wrong sense in the loop Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03f89feb57bf61749885ae98ce98b8c0fd28903b Author: Christian König Date: Tue Apr 4 16:07:45 2017 +0200 drm/amdgpu: cleanup get_invalidate_req v2 The two hubs are just instances of the same hardware, so the register bits are identical. v2: keep the function pointer Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 21 --------------------- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 22 +++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 21 --------------------- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 2 +- 8 files changed, 27 insertions(+), 49 deletions(-) commit 36b32a682bc32693e681cb984aac9c291a09c519 Author: Zhang, Jerry Date: Wed Mar 29 16:08:32 2017 +0800 drm/amdgpu: fix vm size and block size for VMPT (v5) Set reasonable defaults per family. v2: set both of them in gmc v3: move vm size and block size in vm manager v4: squash in warning fix from Alex Xie v5: squash in min() warning fix Signed-off-by: Junwei Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 -------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 22 ++++++++++++---------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 4 +++- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 10 ++++++++-- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 9 +++++++-- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 9 +++++++-- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 21 +++++++++++++-------- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 2 +- 9 files changed, 52 insertions(+), 35 deletions(-) commit d1a5b2502c8e0abb76be26145d45481fda41fb04 Author: Tom St Denis Date: Tue Apr 4 10:24:19 2017 -0400 drm/amd/amdgpu: Fix srbm_indexing in init/inactive hqd code Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 +++++ 1 file changed, 5 insertions(+) commit bb215962f626f6367f5ff93d4764d417f046e014 Author: Tom St Denis Date: Tue Apr 4 09:48:32 2017 -0400 drm/amd/amdgpu: Clean up gfx_v8_0_mqd_init() Clean up a toggle with ?:. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 699d12b755835b7f22f5524855cf7cff3427bd9c Author: Tom St Denis Date: Tue Apr 4 09:43:18 2017 -0400 drm/amd/amdgpu: de-numberify HQD_ACTIVE check. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ac642c5b541f4812e28156abfd0f2a1454cd773 Author: Tom St Denis Date: Tue Apr 4 09:39:16 2017 -0400 drm/amd/amdgpu: clean up gfx_v8_0_kiq_init_register() Swap read/write pattern for WREG32_FIELD() Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 35e259d52529393f0ae6b21d6e6e35b2fa18a5ea Author: Tom St Denis Date: Tue Apr 4 09:27:28 2017 -0400 drm/amd/amdgpu: Clean up gfx_v8_0_inactive_hqd() Swap read/write pattern for WREG32_FIELD() Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit ccaf3574451ffe814823e7920089417b3abc9b89 Author: Tom St Denis Date: Tue Apr 4 09:14:13 2017 -0400 drm/amd/amdgpu: Clean up gfx_v8_0_kiq_set_interrupt_state() Use new WREG32_FIELD_OFFSET() to clean up code. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 40 +++++++++++------------------------ 2 files changed, 15 insertions(+), 28 deletions(-) commit fcf17a43ffd3b248d03b582b834367c45e9e8f59 Author: Alex Deucher Date: Thu Mar 30 13:03:07 2017 -0400 drm/amdgpu/gfx8: KIQ is also disabled when MEC is disabled Set the ready flag to reflect this. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 + 1 file changed, 1 insertion(+) commit 112501642669807640b572d00bd0b3138922a065 Author: Christian König Date: Thu Mar 30 15:31:13 2017 +0200 drm/amdgpu: cleanup VMHUB bit definitions v2 The two hubs are just instances of the same hardware, so the register bits are identical. v2: only remove get_vm_protection_bits for now Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 12 ------------ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 12 ++++++++---- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 12 ------------ 4 files changed, 8 insertions(+), 29 deletions(-) commit 9bbdcc0fbc392e1fa6b4d1497f9d9454df70466f Author: Christian König Date: Wed Mar 29 11:16:05 2017 +0200 drm/amdgpu: handle CPU access for split VRAM buffers (v2) This avoids merging them together on page fault. v2: squash in 64-bit division fix Signed-off-by: Christian König Acked-by: Michel Dänzer Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) commit bf5ea6fba78b62a4d4b70151143077131ccf32a8 Author: Nicholas Mc Guire Date: Wed Mar 22 11:44:22 2017 +0100 scsi: qla4xxx: drop redundant init_completion The redundant init_completion() here seems to be a cut&past error as struct scsi_qla_host only has 4 completion elements to initialize, thus the duplicate init_completion(disable_acb_comp) is simply removed. Signed-off-by: Nicholas Mc Guire Signed-off-by: Martin K. Petersen drivers/scsi/qla4xxx/ql4_os.c | 1 - 1 file changed, 1 deletion(-) commit a06586325f371c0f0f6095454b5beca0602eaab4 Author: Hannes Reinecke Date: Thu Apr 6 15:36:35 2017 +0200 scsi: make asynchronous aborts mandatory There hasn't been any reports for HBAs where asynchronous abort would not work, so we should make it mandatory and remove the fallback. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen Documentation/scsi/scsi_eh.txt | 18 ++++------ drivers/scsi/scsi_error.c | 81 ++++-------------------------------------- drivers/scsi/scsi_lib.c | 2 +- drivers/scsi/scsi_priv.h | 3 +- include/scsi/scsi_host.h | 5 --- 5 files changed, 15 insertions(+), 94 deletions(-) commit 2171b6d08bf8c2b826922b94e24ba36b00cb78b3 Author: Hannes Reinecke Date: Thu Apr 6 15:36:34 2017 +0200 scsi: make scsi_eh_scmd_add() always succeed scsi_eh_scmd_add() currently only will fail if no error handler thread is started (which will never be the case) or if the state machine encounters an illegal transition. But if we're encountering an invalid state transition chances is we cannot fixup things with the error handler. So better add a WARN_ON for illegal host states and make scsi_dh_scmd_add() a void function. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_error.c | 41 +++++++++++++---------------------------- drivers/scsi/scsi_lib.c | 4 ++-- drivers/scsi/scsi_priv.h | 2 +- 3 files changed, 16 insertions(+), 31 deletions(-) commit 8e8c9d01c5ea33e0d21f13264a9caeed255526d1 Author: Hannes Reinecke Date: Thu Apr 6 15:36:33 2017 +0200 scsi: make eh_eflags persistent If a failed command is retried and fails again we need to enter SCSI EH, otherwise we will never be able to recover the command. To detect this situation we must not clear scmd->eh_eflags when EH finishes but rather make it persistent throughout the lifetime of the command. Signed-off-by: Hannes Reinecke Reviewed-by: Benjamin Block Reviewed-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen Documentation/scsi/scsi_eh.txt | 14 +++++++------- drivers/scsi/libsas/sas_scsi_host.c | 2 -- drivers/scsi/scsi_error.c | 4 ++-- include/scsi/scsi_eh.h | 1 + 4 files changed, 10 insertions(+), 11 deletions(-) commit 909657615d9b3ce709be4fd95b9a9e8c8c7c2be6 Author: Christoph Hellwig Date: Thu Apr 6 15:36:32 2017 +0200 scsi: libsas: allow async aborts We now first try to call ->eh_abort_handler from a work queue, but libsas was always failing that for no good reason. Allow async aborts. Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_scsi_host.c | 3 --- 1 file changed, 3 deletions(-) commit 1bcb93047e1b22b68cb8a30b48f999884fa827a8 Author: Hannes Reinecke Date: Thu Apr 6 15:36:31 2017 +0200 scsi: always send command aborts When a command has timed out we always should be sending an abort; with the previous code a failed abort might signal SCSI EH to start, and all other timed out commands will never be aborted, even though they might belong to a different ITL nexus. Cc: Benjamin Block Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_error.c | 12 ------------ 1 file changed, 12 deletions(-) commit e8f8d50e07b0bd92f758a4f6d9ab0abf33f52881 Author: Hannes Reinecke Date: Thu Apr 6 15:36:30 2017 +0200 scsi: sd: Return SUCCESS in sd_eh_action() after device offline If sd_eh_action() decides to take the device offline there is no point in returning FAILED, as taking the device offline is the ultimate step in SCSI EH anyway. So further escalation via SCSI EH is not likely to make a difference and we can as well return SUCCESS. Cc: Benjamin Block Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a38dc0bfb4cc39ed57e120e2224673f3d4d200f Author: Hannes Reinecke Date: Thu Apr 6 15:36:29 2017 +0200 scsi: scsi_error: count medium access timeout only once per EH run The current medium access timeout counter will be increased for each command, so if there are enough failed commands we'll hit the medium access timeout for even a single device failure and the following kernel message is displayed: sd H:C:T:L: [sdXY] Medium access timeout failure. Offlining disk! Fix this by making the timeout per EH run, ie the counter will only be increased once per device and EH run. Fixes: 18a4d0a ("[SCSI] Handle disk devices which can not process medium access commands") Cc: Ewan Milne Cc: Lawrence Obermann Cc: Benjamin Block Cc: Steffen Maier Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_error.c | 18 ++++++++++++++++++ drivers/scsi/sd.c | 27 ++++++++++++++++++++++++++- drivers/scsi/sd.h | 1 + include/scsi/scsi_driver.h | 1 + 4 files changed, 46 insertions(+), 1 deletion(-) commit 104d9c7f94aa835b9d7bde38b13b611ddb8adbb6 Author: Christoph Hellwig Date: Thu Jan 12 11:17:29 2017 +0100 scsi: csiostor: switch to pci_alloc_irq_vectors And get automatic MSI-X affinity for free. Signed-off-by: Christoph Hellwig Acked-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/csiostor/csio_hw.h | 1 - drivers/scsi/csiostor/csio_isr.c | 128 ++++++++++++++------------------------- 2 files changed, 47 insertions(+), 82 deletions(-) commit 75106523f39751390b5789b36ee1d213b3af1945 Author: Mauricio Faria de Oliveira Date: Wed Apr 5 12:18:19 2017 -0300 scsi: ses: don't get power status of SES device slot on probe The commit 08024885a2a3 ("ses: Add power_status to SES device slot") introduced the 'power_status' attribute to enclosure components and the associated callbacks. There are 2 callbacks available to get the power status of a device: 1) ses_get_power_status() for 'struct enclosure_component_callbacks' 2) get_component_power_status() for the sysfs device attribute (these are available for kernel-space and user-space, respectively.) However, despite both methods being available to get power status on demand, that commit also introduced a call to get power status in ses_enclosure_data_process(). This dramatically increased the total probe time for SCSI devices on larger configurations, because ses_enclosure_data_process() is called several times during the SCSI devices probe and loops over the component devices (but that is another problem, another patch). That results in a tremendous continuous hammering of SCSI Receive Diagnostics commands to the enclosure-services device, which does delay the total probe time for the SCSI devices __significantly__: Originally, ~34 minutes on a system attached to ~170 disks: [ 9214.490703] mpt3sas version 13.100.00.00 loaded ... [11256.580231] scsi 17:0:177:0: qdepth(16), tagged(1), simple(0), ordered(0), scsi_level(6), cmd_que(1) With this patch, it decreased to ~2.5 minutes -- a 13.6x faster [ 1002.992533] mpt3sas version 13.100.00.00 loaded ... [ 1151.978831] scsi 11:0:177:0: qdepth(16), tagged(1), simple(0), ordered(0), scsi_level(6), cmd_que(1) Back to the commit discussion.. on the ses_get_power_status() call introduced in ses_enclosure_data_process(): impact of removing it. That may possibly be in place to initialize the power status value on device probe. However, those 2 functions available to retrieve that value _do_ automatically refresh/update it. So the potential benefit would be a direct access of the 'power_status' field which does not use the callbacks... But the only reader of 'struct enclosure_component::power_status' is the get_component_power_status() callback for sysfs attribute, and it _does_ check for and call the .get_power_status callback, (which indeed is defined and implemented by that commit), so the power status value is, again, automatically updated. So, the remaining potential for a direct/non-callback access to the power_status attribute would be out-of-tree modules -- well, for those, if they are for whatever reason interested in values that are set during device probe and not up-to-date by the time they need it.. well, that would be curious. Well, to handle that more properly, set the initial power state value to '-1' (i.e., uninitialized) instead of '1' (power 'on'), and check for it in that callback which may do an direct access to the field value _if_ a callback function is not defined. Signed-off-by: Mauricio Faria de Oliveira Fixes: 08024885a2a3 ("ses: Add power_status to SES device slot") Reviewed-by: Dan Williams Reviewed-by: Song Liu Signed-off-by: Martin K. Petersen drivers/misc/enclosure.c | 7 ++++++- drivers/scsi/ses.c | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) commit ed12e031b0deb0268cc6ed2d6c49dbcbec1cf038 Author: Bart Van Assche Date: Wed Apr 5 09:52:50 2017 -0700 scsi: Make checking the scsi_device_get() return value mandatory Now that all scsi_device_get() callers check the return value of this function, make checking that return value mandatory. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Johannes Thumshirn Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen include/scsi/scsi_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c02465fa13b6232db664c5dcfe9c429b4fe31c99 Author: Bart Van Assche Date: Thu Mar 30 17:17:17 2017 +0000 scsi: osd_uld: Check scsi_device_get() return value scsi_device_get() can fail. Hence check its return value. Signed-off-by: Bart Van Assche Cc: Boaz Harrosh Acked-by: Boaz Harrosh Signed-off-by: Martin K. Petersen drivers/scsi/osd/osd_uld.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ec0e3f01114ad327112432a4da8840eb22fed577 Author: Gao Feng Date: Mon Mar 27 10:31:26 2017 +0800 netfilter: nf_ct_expect: Add nf_ct_remove_expect() When remove one expect, it needs three statements. And there are multiple duplicated codes in current code. So add one common function nf_ct_remove_expect to consolidate this. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_expect.h | 1 + net/netfilter/nf_conntrack_expect.c | 32 ++++++++++++++--------------- net/netfilter/nf_conntrack_helper.c | 7 ++----- net/netfilter/nf_conntrack_sip.c | 4 +--- 4 files changed, 20 insertions(+), 24 deletions(-) commit b824b930682308ce453b73b0e3ba9686e1f3a93a Author: Stephen Boyd Date: Wed Apr 5 12:18:31 2017 -0700 arm64: print a fault message when attempting to write RO memory If a page is marked read only we should print out that fact, instead of printing out that there was a page fault. Right now we get a cryptic error message that something went wrong with an unhandled fault, but we don't evaluate the esr to figure out that it was a read/write permission fault. Instead of seeing: Unable to handle kernel paging request at virtual address ffff000008e460d8 pgd = ffff800003504000 [ffff000008e460d8] *pgd=0000000083473003, *pud=0000000083503003, *pmd=0000000000000000 Internal error: Oops: 9600004f [#1] PREEMPT SMP we'll see: Unable to handle kernel write to read-only memory at virtual address ffff000008e760d8 pgd = ffff80003d3de000 [ffff000008e760d8] *pgd=0000000083472003, *pud=0000000083435003, *pmd=0000000000000000 Internal error: Oops: 9600004f [#1] PREEMPT SMP We also add a userspace address check into is_permission_fault() so that the function doesn't return true for ttbr0 PAN faults when it shouldn't. Reviewed-by: James Morse Tested-by: James Morse Acked-by: Laura Abbott Cc: Mark Rutland Signed-off-by: Stephen Boyd Signed-off-by: Catalin Marinas arch/arm64/mm/fault.c | 55 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 19 deletions(-) commit 92f73221f9e9e143d242e3eca9c512dac969765e Author: Gao Feng Date: Fri Mar 24 21:32:19 2017 +0800 netfilter: expect: Make sure the max_expected limit is effective Because the type of expecting, the member of nf_conn_help, is u8, it would overflow after reach U8_MAX(255). So it doesn't work when we configure the max_expected exceeds 255 with expect policy. Now add the check for max_expected. Return the -EINVAL when it exceeds the limit. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_expect.h | 1 + net/netfilter/nf_conntrack_helper.c | 3 +++ net/netfilter/nf_conntrack_irc.c | 6 ++++++ net/netfilter/nfnetlink_cthelper.c | 6 ++++++ 4 files changed, 16 insertions(+) commit f323d9546927a012cafbb7e503e6aa0e9fbff94b Author: Pablo Neira Ayuso Date: Mon Mar 20 18:10:29 2017 +0100 netfilter: nf_tables: add nft_is_base_chain() helper This new helper function allows us to check if this is a basechain. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 5 +++++ net/netfilter/nf_tables_api.c | 30 +++++++++++++++--------------- net/netfilter/nf_tables_netdev.c | 2 +- net/netfilter/nft_compat.c | 11 ++++++----- 4 files changed, 27 insertions(+), 21 deletions(-) commit caf065f8fd583b43a3f95d84c8a0a0d07597963b Author: John Crispin Date: Mon Jan 23 19:34:37 2017 +0100 pwm: Add MediaTek PWM support This patch adds support for the PWM core found on current ARM base SoCs made by MediaTek. This IP core supports 5 channels and has 2 operational modes. There is the old mode, which is a classical PWM and the new mode which allows the user to define bitmasks that get clocked out on the pins. As the subsystem currently only supports PWM cores with the "old" mode, we can safely ignore the "new" mode for now. Signed-off-by: John Crispin [thierry.reding@gmail.com: minor cleanups] Signed-off-by: Thierry Reding drivers/pwm/Kconfig | 9 ++ drivers/pwm/Makefile | 1 + drivers/pwm/pwm-mediatek.c | 220 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 230 insertions(+) commit 2ab15f580a874bf597c98acc16891bb9f95cb45c Author: John Crispin Date: Mon Jan 23 19:34:36 2017 +0100 dt-bindings: pwm: Add MediaTek PWM bindings Document the device-tree binding of MediaTek PWM. The PWM has 5 channels. This has been tested on MT7623 only but should work on all the other MTK SoCs that contain this core. Signed-off-by: John Crispin Acked-by: Rob Herring Signed-off-by: Thierry Reding .../devicetree/bindings/pwm/pwm-mediatek.txt | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 44521afa57bb6f0016c1c1ad70cc8ef352c6d83b Author: Claudiu Beznea Date: Wed Mar 22 15:29:35 2017 +0200 pwm: atmel: Enable PWM on sama5d2 sama5d2 can use the same atmel_pwm_data as sama5d3. Signed-off-by: Claudiu Beznea Acked-by: Rob Herring Reviewed-by: Boris Brezillon Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/atmel-pwm.txt | 1 + drivers/pwm/pwm-atmel.c | 3 +++ 2 files changed, 4 insertions(+) commit 1a722aad587967985f927e4ec2650ca64632c3e1 Author: Claudiu Beznea Date: Wed Mar 22 15:29:34 2017 +0200 pwm: atmel: Switch to atomic PWM The currently Atmel PWM controllers supported by this driver could change period or duty factor without channel disable, for regular channels (sama5d3 support this by using period or duty factor update registers, sam9rl support this by writing channel update register and select the corresponding update: period or duty factor). The chip doesn't support run time changings of signal polarity. To take advantage of atomic PWM framework and let controller works without glitches, in this patch only the duty factor could be changed without disabling PWM channel. For period and signal polarity the atomic PWM is simulated by disabling + enabling the right PWM channel. Signed-off-by: Claudiu Beznea Reviewed-by: Boris Brezillon Signed-off-by: Thierry Reding drivers/pwm/pwm-atmel.c | 273 +++++++++++++++++++++++------------------------- 1 file changed, 129 insertions(+), 144 deletions(-) commit f9bb9da7c09d76f00c9abdf34cbeaec65e50d78b Author: Boris Brezillon Date: Wed Mar 1 15:52:27 2017 +0100 pwm: atmel-hlcdc: Implement the suspend/resume hooks Implement the suspend/resume hooks to make sure the PWM device is restored to a correct state after a suspend. Signed-off-by: Boris Brezillon Signed-off-by: Thierry Reding drivers/pwm/pwm-atmel-hlcdc.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 6f14f443d3e773439fb9cc6f2685ba90d5d026c5 Merge: faeeb31 ea6b172 Author: David S. Miller Date: Thu Apr 6 07:25:07 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Mostly simple cases of overlapping changes (adding code nearby, a function whose name changes, for example). Signed-off-by: David S. Miller commit 022f4e4f31fea69702f3ec810dc567af6a6d86d8 Author: Robin Murphy Date: Mon Apr 3 13:12:10 2017 +0100 iommu/io-pgtable-arm: Avoid shift overflow in block size The recursive nature of __arm_lpae_{map,unmap}() means that ARM_LPAE_BLOCK_SIZE() is evaluated for every level, including those where block mappings aren't possible. This in itself is harmless enough, as we will only ever be called with valid sizes from the pgsize_bitmap, and thus always recurse down past any imaginary block sizes. The only problem is that most of those imaginary sizes overflow the type used for the calculation, and thus trigger warnings under UBsan: [ 63.020939] ================================================================================ [ 63.021284] UBSAN: Undefined behaviour in drivers/iommu/io-pgtable-arm.c:312:22 [ 63.021602] shift exponent 39 is too large for 32-bit type 'int' [ 63.021909] CPU: 0 PID: 1119 Comm: lkvm Not tainted 4.7.0-rc3+ #819 [ 63.022163] Hardware name: FVP Base (DT) [ 63.022345] Call trace: [ 63.022629] [] dump_backtrace+0x0/0x3a8 [ 63.022975] [] show_stack+0x14/0x20 [ 63.023294] [] dump_stack+0x104/0x148 [ 63.023609] [] ubsan_epilogue+0x18/0x68 [ 63.023956] [] __ubsan_handle_shift_out_of_bounds+0x18c/0x1bc [ 63.024365] [] __arm_lpae_map+0x720/0xae0 [ 63.024732] [] arm_lpae_map+0x100/0x190 [ 63.025049] [] arm_smmu_map+0x78/0xc8 [ 63.025390] [] iommu_map+0x130/0x230 [ 63.025763] [] vfio_iommu_type1_attach_group+0x4bc/0xa00 [ 63.026156] [] vfio_fops_unl_ioctl+0x320/0x580 [ 63.026515] [] do_vfs_ioctl+0x140/0xd28 [ 63.026858] [] SyS_ioctl+0x8c/0xa0 [ 63.027179] [] el0_svc_naked+0x24/0x28 [ 63.027412] ================================================================================ Perform the shift in a 64-bit type to prevent the theoretical overflow and keep the peace. As it turns out, this generates identical code for 32-bit ARM, and marginally shorter AArch64 code, so it's good all round. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/io-pgtable-arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fccb4e3b8ab0957628abec82675691c72f67003e Author: Will Deacon Date: Thu Jan 5 18:38:26 2017 +0000 iommu: Allow default domain type to be set on the kernel command line The IOMMU core currently initialises the default domain for each group to IOMMU_DOMAIN_DMA, under the assumption that devices will use IOMMU-backed DMA ops by default. However, in some cases it is desirable for the DMA ops to bypass the IOMMU for performance reasons, reserving use of translation for subsystems such as VFIO that require it for enforcing device isolation. Rather than modify each IOMMU driver to provide different semantics for DMA domains, instead we introduce a command line parameter that can be used to change the type of the default domain. Passthrough can then be specified using "iommu.passthrough=1" on the kernel command line. Signed-off-by: Will Deacon Documentation/admin-guide/kernel-parameters.txt | 6 ++++++ drivers/iommu/iommu.c | 28 ++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 3 deletions(-) commit beb3c6a066bff1ba412f983cb9d1a42f4cd8f76a Author: Will Deacon Date: Fri Jan 6 16:27:30 2017 +0000 iommu/arm-smmu-v3: Install bypass STEs for IOMMU_DOMAIN_IDENTITY domains In preparation for allowing the default domain type to be overridden, this patch adds support for IOMMU_DOMAIN_IDENTITY domains to the ARM SMMUv3 driver. An identity domain is created by placing the corresponding stream table entries into "bypass" mode, which allows transactions to flow through the SMMU without any translation. Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 58 +++++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 21 deletions(-) commit 67560edcd8e5c57eccec4df562abbfc21c17ad75 Author: Will Deacon Date: Wed Mar 1 21:11:29 2017 +0000 iommu/arm-smmu-v3: Make arm_smmu_install_ste_for_dev return void arm_smmu_install_ste_for_dev cannot fail and always returns 0, however the fact that it returns int means that callers end up implementing redundant error handling code which complicates STE tracking and is never executed. This patch changes the return type of arm_smmu_install_ste_for_dev to void, to make it explicit that it cannot fail. Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 61bc671179f19060be883068b6d3d82ae0b24bc0 Author: Will Deacon Date: Fri Jan 6 16:56:03 2017 +0000 iommu/arm-smmu: Install bypass S2CRs for IOMMU_DOMAIN_IDENTITY domains In preparation for allowing the default domain type to be overridden, this patch adds support for IOMMU_DOMAIN_IDENTITY domains to the ARM SMMU driver. An identity domain is created by placing the corresponding S2CR registers into "bypass" mode, which allows transactions to flow through the SMMU without any translation. Reviewed-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 0834cc28fa56c65887c614b6c045be2ba06fdcb0 Author: Will Deacon Date: Fri Jan 6 16:28:17 2017 +0000 iommu/arm-smmu: Restrict domain attributes to UNMANAGED domains The ARM SMMU drivers provide a DOMAIN_ATTR_NESTING domain attribute, which allows callers of the IOMMU API to request that the page table for a domain is installed at stage-2, if supported by the hardware. Since setting this attribute only makes sense for UNMANAGED domains, this patch returns -ENODEV if the domain_{get,set}_attr operations are called on other domain types. Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 6 ++++++ drivers/iommu/arm-smmu.c | 6 ++++++ 2 files changed, 12 insertions(+) commit 56fbf600dd8e2f32a5317437fe310b56719f7d2b Author: Robin Murphy Date: Fri Mar 31 12:03:33 2017 +0100 iommu/arm-smmu: Add global SMR masking property The current SMR masking support using a 2-cell iommu-specifier is primarily intended to handle individual masters with large and/or complex Stream ID assignments; it quickly gets a bit clunky in other SMR use-cases where we just want to consistently mask out the same part of every Stream ID (e.g. for MMU-500 configurations where the appended TBU number gets in the way unnecessarily). Let's add a new property to allow a single global mask value to better fit the latter situation. Acked-by: Mark Rutland Tested-by: Nipun Gupta Signed-off-by: Robin Murphy Signed-off-by: Will Deacon .../devicetree/bindings/iommu/arm,smmu.txt | 28 ++++++++++++++++++++++ drivers/iommu/arm-smmu.c | 4 +++- 2 files changed, 31 insertions(+), 1 deletion(-) commit 8513c89300696a68963cc504c21d034c6369e183 Author: Robin Murphy Date: Thu Mar 30 17:56:32 2017 +0100 iommu/arm-smmu: Poll for TLB sync completion more effectively On relatively slow development platforms and software models, the inefficiency of our TLB sync loop tends not to show up - for instance on a Juno r1 board I typically see the TLBI has completed of its own accord by the time we get to the sync, such that the latter finishes instantly. However, on larger systems doing real I/O, it's less realistic for the TLBs to go idle immediately, and at that point falling into the 1MHz polling loop turns out to throw away performance drastically. Let's strike a balance by polling more than once between pauses, such that we have much more chance of catching normal operations completing before committing to the fixed delay, but also backing off exponentially, since if a sync really hasn't completed within one or two "reasonable time" periods, it becomes increasingly unlikely that it ever will. Reviewed-by: Jordan Crouse Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 11febfca2419652f28804879a58ffd32adce2372 Author: Robin Murphy Date: Thu Mar 30 17:56:31 2017 +0100 iommu/arm-smmu: Use per-context TLB sync as appropriate TLB synchronisation typically involves the SMMU blocking all incoming transactions until the TLBs report completion of all outstanding operations. In the common SMMUv2 configuration of a single distributed SMMU serving multiple peripherals, that means that a single unmap request has the potential to bring the hammer down on the entire system if synchronised globally. Since stage 1 contexts, and stage 2 contexts under SMMUv2, offer local sync operations, let's make use of those wherever we can in the hope of minimising global disruption. To that end, rather than add any more branches to the already unwieldy monolithic TLB maintenance ops, break them up into smaller, neater, functions which we can then mix and match as appropriate. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 113 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 80 insertions(+), 33 deletions(-) commit 452107c79035c6654b963e83c4862d9faa195af4 Author: Robin Murphy Date: Thu Mar 30 17:56:30 2017 +0100 iommu/arm-smmu: Tidy up context bank indexing ARM_AMMU_CB() is calculated relative to ARM_SMMU_CB_BASE(), but the latter is never of use on its own, and what we end up with is the same ARM_SMMU_CB_BASE() + ARM_AMMU_CB() expression being duplicated at every callsite. Folding the two together gives us a self-contained context bank accessor which is much more pleasant to work with. Secondly, we might as well simplify CB_BASE itself at the same time. We use the address space size for its own sake precisely once, at probe time, and every other usage is to dynamically calculate CB_BASE over and over and over again. Let's flip things around so that we just maintain the CB_BASE address directly. Reviewed-by: Jordan Crouse Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 280b683ceaceb7508dc1e9c7e148ea1dcdf36543 Author: Robin Murphy Date: Thu Mar 30 17:56:29 2017 +0100 iommu/arm-smmu: Simplify ASID/VMID handling Calculating ASIDs/VMIDs dynamically from arm_smmu_cfg was a neat trick, but the global uniqueness workaround makes it somewhat more awkward, and means we end up having to pass extra state around in certain cases just to keep a handle on the offset. We already have 16 bits going spare in arm_smmu_cfg; let's just precalculate an ASID/VMID, plop it in there, and tidy up the users accordingly. We'd also need something like this anyway if we ever get near to thinking about SVM, so it's no bad thing. Reviewed-by: Jordan Crouse Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit 125458ab3aefe9cf2f72dcfe7338dc9ad967da0b Author: Sunil Goutham Date: Tue Mar 28 16:11:12 2017 +0530 iommu/arm-smmu: Fix 16-bit ASID configuration 16-bit ASID should be enabled before initializing TTBR0/1, otherwise only LSB 8-bit ASID will be considered. Hence moving configuration of TTBCR register ahead of TTBR0/1 while initializing context bank. Signed-off-by: Sunil Goutham [will: rewrote comment] Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) commit 53c35dce45713d2a554109c21a8cd617d09eba50 Author: Robert Richter Date: Mon Mar 13 11:39:01 2017 +0100 iommu/arm-smmu: Print message when Cavium erratum 27704 was detected Firmware is responsible for properly enabling smmu workarounds. Print a message for better diagnostics when Cavium erratum 27704 was detected. Reviewed-by: Robin Murphy Signed-off-by: Robert Richter Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 1 + 1 file changed, 1 insertion(+) commit adf5e5168bd51c42332ebaa709351fa6ed65ea73 Author: Robin Murphy Date: Fri Jan 27 12:22:54 2017 +0000 iommu: Better document the IOMMU_PRIV flag This is a fairly subtle thing - let's make sure it's described as clearly as possible to avoid potential misunderstandings. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon include/linux/iommu.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 2267517cd3ee4a1b02c7b9fead051c9d079c9fc3 Author: Boris Brezillon Date: Wed Mar 1 15:48:51 2017 +0100 pwm: atmel-hlcdc: Convert to the atomic PWM API Implement the ->apply() hook and drop the ->enable(), ->disable, ->set_polarity and ->config() ones. Signed-off-by: Boris Brezillon Acked-by: Nicolas Ferre Signed-off-by: Thierry Reding drivers/pwm/pwm-atmel-hlcdc.c | 227 +++++++++++++++++++----------------------- 1 file changed, 101 insertions(+), 126 deletions(-) commit 99748ab64fcc857837acfd754b530487a490edb5 Author: Laurent Vivier Date: Wed Apr 5 10:09:15 2017 +0200 drm: virtio: fix virtio_gpu_cursor_formats When we use virtio-vga with a big-endian guest, the mouse pointer disappears. To fix that, on big-endian use DRM_FORMAT_BGRA8888 instead of DRM_FORMAT_ARGB8888. Signed-off-by: Laurent Vivier Link: http://patchwork.freedesktop.org/patch/msgid/20170405080915.823-1-lvivier@redhat.com Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++++ 1 file changed, 4 insertions(+) commit 149f6f6b8ff3288a88dc34755de7719637cc8cc4 Author: Jason Gerecke Date: Fri Mar 31 10:02:05 2017 -0700 HID: wacom: Move wacom_remote_irq and wacom_remote_status_irq These two functions awkwardly break up the otherwise-contiguous chunk of related Intuos IRQ functions with a 500 line tangent about the operation of the EKR. Their presence makes it difficult to read/navigate through the the Intuos code. Since there is no dependency between these functions, it is possible to simply move them down somewhat. This commit moves them to be after the final Intuos IRQ function. Signed-off-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 250 ++++++++++++++++++++++++------------------------ 1 file changed, 125 insertions(+), 125 deletions(-) commit ed1fa736839eb97b1d066e36150df28251095eef Author: Ping Cheng Date: Tue Apr 4 12:31:07 2017 -0700 HID: wacom: generic: sync pad events only for actual packets Commits d793ff8 and 4082da8 introduced two pad usages which do not actually send pad input events. To make sure we do not post empty pad packets, pad_input_event_flag is introduced. Turn on the flag for real pad input events so we can synchronize them properly. Signed-off-by: Ping Cheng Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 7 ++++++- drivers/hid/wacom_wac.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) commit 040fc001765d374776353cb4f8b03ea7fa41e3cd Author: Colin Ian King Date: Mon Mar 27 18:51:18 2017 +0100 HID: sony: remove redundant check for -ve err err is being checked for failure each time it is being updated so this err check is totally redundant and can be removed Detected with CoverityScan, CID#1420665 ("Logically dead code") Signed-off-by: Colin Ian King Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 3 --- 1 file changed, 3 deletions(-) commit 715958f921c244c90c82e5ab74bf76f09a77225d Merge: e55fe3c dc44abd Author: Radim Krčmář Date: Thu Apr 6 14:47:03 2017 +0200 Merge tag 'kvm_mips_4.12_1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/kvm-mips From: James Hogan KVM: MIPS: VZ support, Octeon III, and TLBR Add basic support for the MIPS Virtualization Module (generally known as MIPS VZ) in KVM. We primarily support the ImgTec P5600, P6600, I6400, and Cavium Octeon III cores so far. Support is included for the following VZ / guest hardware features: - MIPS32 and MIPS64, r5 (VZ requires r5 or later) and r6 - TLBs with GuestID (IMG cores) or Root ASID Dealias (Octeon III) - Shared physical root/guest TLB (IMG cores) - FPU / MSA - Cop0 timer (up to 1GHz for now due to soft timer limit) - Segmentation control (EVA) - Hardware page table walker (HTW) both for root and guest TLB Also included is a proper implementation of the TLBR instruction for the trap & emulate MIPS KVM implementation. Preliminary MIPS architecture changes are applied directly with Ralf's ack. commit a676bdc422241822130364443a6a65b6520440ba Author: Roderick Colenbrander Date: Fri Mar 24 15:17:50 2017 -0700 HID: sony: Make sure to unregister sensors on failure Make sure we sure register any sensor when sony_input_configured failes. Somehow this line got lost during resolving of merge conflicts in the motion sensor patch series and a redudant remove was added as well later on. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 77b499e739ed5561e5026fa7140ae53f6c4d1d8e Author: Roderick Colenbrander Date: Fri Mar 24 15:17:49 2017 -0700 HID: sony: Make DS4 bt poll interval adjustable By default when using bluetooth the DS4 reports data at about 1kHz, which is quite fast especially on weak devices. We now make the device use the USB poll interval, which is a fixed 4ms. In addition we make the value adjustable through sysfs. The error handling in sony_input_configured is a little tricky. It is not easy to add other goto's as not all codepaths have logic for adding this attribute. Luckily we are setting the value for the attribute to a default value, so we can use that to detect if we need to remove the file. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 79 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 69 insertions(+), 10 deletions(-) commit 5caceb0695d0498b8c931cbc3cdafd99bd37b8ae Author: Roderick Colenbrander Date: Fri Mar 24 15:17:48 2017 -0700 HID: sony: Set proper bit flags on DS4 output report Only set bit flags for the portions of the DS4 output report for which we have data. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 39254a13d64bc69b83f4097dacc4117d7b865118 Author: Roderick Colenbrander Date: Fri Mar 24 15:17:47 2017 -0700 HID: sony: DS4 use brighter LED colors These colors are more the default colors normally used on the DS4. The previous ones were faint and not so noticeable. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b8f0970d2c5a03f5a431d51af74dd1a0ec62fe91 Author: Roderick Colenbrander Date: Fri Mar 24 15:17:46 2017 -0700 HID: sony: Improve navigation controller axis/button mapping The navigation controller is a DS3 (sixaxis) with fewer physical axes and buttons. It utilizes the same HID report as the DS3 and thus reports axes/buttons which aren't physically present. Currently many non-existing buttons and axes are reported, which we are now removing. For the axes/buttons which do exist, we make the axis/button mapping similar to the DS3. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 186 ++++++++++++++++++++++--------------------------- 1 file changed, 85 insertions(+), 101 deletions(-) commit 5a144be39c3a32b3072529ccee79e4ec9eb9b275 Author: Roderick Colenbrander Date: Fri Mar 24 15:17:45 2017 -0700 HID: sony: Use DS3 MAC address as unique identifier on USB The DS3 MAC address is reported as a unique identified when using Bluetooth. For USB there is no unique identifier reported yet, so use the MAC address. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a4bf6153b317754e058ad9c7f5f02367e0bfdcc8 Author: Benjamin Tissoires Date: Mon Mar 27 16:59:39 2017 +0200 HID: logitech-hidpp: add a sysfs file to tell we support power_supply This way, upower can add a simple udev rule to decide whether or not it should use the internal unifying support or just the generic kernel one. Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 7f7ce2a258b47f9510ad613328c046a3ff9426b0 Author: Benjamin Tissoires Date: Mon Mar 27 16:59:38 2017 +0200 HID: logitech-hidpp: enable HID++ 1.0 battery reporting Also enable battery reporting for HID++ 1.0 devices through 2 registers: 0x07: battery status -> reports only 4 levels (critical, low, good, full) 0x0D: battery mileage -> reports true pourcentage Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 234 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 230 insertions(+), 4 deletions(-) commit 696ecef9b5874a312d74050525217f48d0f1b349 Author: Benjamin Tissoires Date: Mon Mar 27 16:59:37 2017 +0200 HID: logitech-hidpp: add support for battery status for the K750 The Solar Keyboard uses a different feature to report the battery level. Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 115 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 113 insertions(+), 2 deletions(-) commit 5b036ea18e13e006e99cb197e9aceb09d897d20a Author: Benjamin Tissoires Date: Mon Mar 27 16:59:36 2017 +0200 HID: logitech-hidpp: battery: provide CAPACITY_LEVEL CAPACITY LEVEL allows to forward rough information on the battery mileage. HID++ 2.0 devices will either report percentage or levels, so better forwarding this information to the user space. The M325 supports only 2 levels: 'Full' and 'Critical'. With mileage, it will report either 90% or 5%, which might confuse users. With this change the battery will either report "Full" or "Critical". Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 104 +++++++++++++++++++++++++++++++++++---- 1 file changed, 94 insertions(+), 10 deletions(-) commit 14f437a1d7b49a2e873f63436526f9aed3a781c3 Author: Benjamin Tissoires Date: Mon Mar 27 16:59:35 2017 +0200 HID: logitech-hidpp: rename battery level into capacity The power_supply term for the percentage is capacity. Capacity level can be given when non accurate mileage is provided by the device, so better stick to the terms used in power_supply. Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 55 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 27 deletions(-) commit 284f8d7592673a7a6dae96d082806d324378f212 Author: Benjamin Tissoires Date: Mon Mar 27 16:59:34 2017 +0200 HID: logitech-hidpp: battery: provide ONLINE property When ONLINE isn't set, upower should ignore the battery capacity, so there is no need to overload it with some random values. Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) commit 9b9c519f1fe3ec9d2518a99c71c54f5c25eef345 Author: Benjamin Tissoires Date: Mon Mar 27 16:59:33 2017 +0200 HID: logitech-hidpp: notify battery on connect When a device reconnects, there is a high chance its power supply has been changed (for a battery replacement for instance). Just forward the battery state here. Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a9525b80feb1b6ae40244b16b0558cbdc64f28cd Author: Benjamin Tissoires Date: Mon Mar 27 16:59:32 2017 +0200 HID: logitech-hidpp: return an error if the queried feature is not present Or the device just answers a valid feature '0'. Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 3 +++ 1 file changed, 3 insertions(+) commit a52ec107fa81c8f799654b860e262f07bd14d63a Author: Benjamin Tissoires Date: Mon Mar 27 16:59:31 2017 +0200 HID: logitech-hidpp: create the battery for all types of HID++ devices The creation of the power_supply should not be in a HID++ 2.0 specific function. Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 94 ++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 51 deletions(-) commit 32043d0fdf9c5ef246e92f59c98624ed135b9e4e Author: Benjamin Tissoires Date: Mon Mar 27 16:59:30 2017 +0200 HID: logitech-hidpp: forward device info in power_supply Better forwarding the device name, manufacturer and serial to upower. Note that serial is still empty, it will be filled in a later patch in this series. Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit eb626c573219233bfd330fef9066e7f9530b078e Author: Benjamin Tissoires Date: Mon Mar 27 16:59:29 2017 +0200 HID: logitech-hidpp: handle battery events in hidpp_raw_hidpp_event() Battery events are reported through HID++, so we need to be sure the report ID is the HID++ one. Without this, we might receive keyboard events that looks just like battery events with wrong data and which will confuse user space. Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 2936836f919af8d766a23fdf2bb945a0d74fa534 Author: Benjamin Tissoires Date: Mon Mar 27 16:59:28 2017 +0200 HID: logitech-hidpp: rework hidpp_connect_event() Looks like all users don't care about a disconnect. Simplify the various variant_connect() and put the connect state check at the beginning. For delayed input devices, make sure we go through all other connect values (protocol, battery) before bailing out. Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 187f2bba93816a300018ad7fb0d79175af0643d3 Author: Benjamin Tissoires Date: Mon Mar 27 16:59:27 2017 +0200 HID: logitech-hidpp: retrieve the HID++ device name when available hidpp->name can't be null. Only HID++ 2.0 and above device supports the query. Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 843c624eef0c198d7052bd527613a5e7350593e4 Author: Benjamin Tissoires Date: Mon Mar 27 16:59:26 2017 +0200 HID: logitech-hidpp: rework probe path for unifying devices Unifying devices are different from others because they can probed while not connected. So we need to talk to the receiver to get some extra information like the device name and the serial. Instead of having conditionals while attempting to read the device name from HID++ 2.0, have a special init path for them. Store the retrieved serial in hdev->uniq. Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 86 +++++++++++++++++++++++++++++++--------- 1 file changed, 67 insertions(+), 19 deletions(-) commit 206d7c68e83e1add3aa67019ab95d98f87c6edd4 Author: Benjamin Tissoires Date: Mon Mar 27 16:59:25 2017 +0200 HID: logitech-hidpp: create a capabilities bits field Do not pollute the quirks bits field which is public API with elements that are queried from the device. Move the 2 battery capabilities into the new field. Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b4f8ce07b55fa30b5a8c0d2655f1c5cc4c0b9095 Author: Benjamin Tissoires Date: Mon Mar 27 16:59:24 2017 +0200 HID: logitech-hidpp: do not query the name through HID++ for 1.0 devices Unless they are connected through unifying, they don't support it, so remove one error in the logs. Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 2 ++ 1 file changed, 2 insertions(+) commit 680de741e835d56e504997b613895058625291e9 Author: Benjamin Tissoires Date: Mon Mar 27 16:59:23 2017 +0200 HID: logitech-hidpp: make sure we only register one battery per device Simple check to add, huge improvement :) Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 3 +++ 1 file changed, 3 insertions(+) commit 3861e6ca305c5262f0493e9141f0c52ba066a447 Author: Bastien Nocera Date: Mon Mar 27 16:59:22 2017 +0200 HID: logitech-hidpp: Add scope to battery Without a scope defined, UPower assumes that the battery provides power to the computer it's connected to, like a laptop battery or a UPS. Tested-by: Peter Hutterer Signed-off-by: Bastien Nocera Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8dba3026d5453aa6de00f8726fdcde45d5c57484 Author: Benjamin Tissoires Date: Mon Mar 27 16:59:21 2017 +0200 HID: logitech-dj: allow devices to request full pairing information Register 0xB5 should be handled specially no matter what function is used. This allows to retrieve the serial and the Quad ID from hid-logitech-hidpp directly. Signed-off-by: Benjamin Tissoires Tested-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-dj.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit a8920950131b1394f9e99ff57a5cf5ceeb0cc25c Author: Yi Min Zhao Date: Mon Feb 20 10:15:01 2017 +0800 KVM: s390: introduce adapter interrupt inject function Inject adapter interrupts on a specified adapter which allows to retrieve the adapter flags, e.g. if the adapter is subject to AIS facility or not. And add documentation for this interface. For adapters subject to AIS, handle the airq injection suppression for a given ISC according to the interruption mode: - before injection, if NO-Interruptions Mode, just return 0 and suppress, otherwise, allow the injection. - after injection, if SINGLE-Interruption Mode, change it to NO-Interruptions Mode to suppress the following interrupts. Besides, add tracepoint for suppressed airq and AIS mode transitions. Signed-off-by: Yi Min Zhao Signed-off-by: Fei Li Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger Documentation/virtual/kvm/devices/s390_flic.txt | 9 +++++ arch/s390/include/uapi/asm/kvm.h | 1 + arch/s390/kvm/interrupt.c | 53 ++++++++++++++++++++++--- arch/s390/kvm/trace-s390.h | 21 ++++++++++ 4 files changed, 78 insertions(+), 6 deletions(-) commit 519783935451764b397f2a712de5ea778ff77fdf Author: Fei Li Date: Fri Feb 17 17:06:26 2017 +0800 KVM: s390: introduce ais mode modify function Provide an interface for userspace to modify AIS (adapter-interruption-suppression) mode state, and add documentation for the interface. Allowed target modes are ALL-Interruptions mode and SINGLE-Interruption mode. We introduce the 'simm' and 'nimm' fields in kvm_s390_float_interrupt to store interruption modes for each ISC. Each bit in 'simm' and 'nimm' targets to one ISC, and collaboratively indicate three modes: ALL-Interruptions, SINGLE-Interruption and NO-Interruptions. This interface can initiate most transitions between the states; transition from SINGLE-Interruption to NO-Interruptions via adapter interrupt injection will be introduced in a following patch. The meaningful combinations are as follows: interruption mode | simm bit | nimm bit ------------------|----------|---------- ALL | 0 | 0 SINGLE | 1 | 0 NO | 1 | 1 Besides, add tracepoint to track AIS mode transitions. Co-Authored-By: Yi Min Zhao Signed-off-by: Yi Min Zhao Signed-off-by: Fei Li Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger Documentation/virtual/kvm/devices/s390_flic.txt | 20 ++++++++++++ arch/s390/include/asm/kvm_host.h | 10 ++++++ arch/s390/include/uapi/asm/kvm.h | 6 ++++ arch/s390/kvm/interrupt.c | 43 +++++++++++++++++++++++++ arch/s390/kvm/kvm-s390.c | 4 +++ arch/s390/kvm/trace-s390.h | 31 ++++++++++++++++++ 6 files changed, 114 insertions(+) commit 08fab50da669e5ee5a542592895fcb63be3cd7b1 Author: Fei Li Date: Thu Jan 19 17:02:26 2017 +0100 KVM: s390: interface for suppressible I/O adapters In order to properly implement adapter-interruption suppression, we need a way for userspace to specify which adapters are subject to suppression. Let's convert the existing (and unused) 'pad' field into a 'flags' field and define a flag value for suppressible adapters. Besides, add documentation for the interface. Signed-off-by: Fei Li Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger Documentation/virtual/kvm/devices/s390_flic.txt | 12 +++++++++--- arch/s390/include/asm/kvm_host.h | 1 + arch/s390/include/uapi/asm/kvm.h | 4 +++- arch/s390/kvm/interrupt.c | 2 ++ 4 files changed, 15 insertions(+), 4 deletions(-) commit 849794c50b24b93676b939028c811d6e116ef335 Author: Rabin Vincent Date: Thu Apr 6 10:16:23 2017 +0200 spi: pl022: don't use uninitialized variable The num-cs property is a required property according to the binding documentation. However, if it is not present, the driver currently simply uses random junk from the stack for the num-cs since the variable whose pointer is passed to of_property_read_u32() is not initialized. Signed-off-by: Rabin Vincent Signed-off-by: Mark Brown drivers/spi/spi-pl022.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32973dcf71ebee8806a6ee552665c5fad6857e16 Author: Kuninori Morimoto Date: Thu Apr 6 07:25:13 2017 +0000 ASoC: rsnd: merge rsnd_kctrl_new_m/s/e into rsnd_kctrl_new() Current rsnd driver is using rsnd_kctrl_new_m/s/e function, but the differences are very few. This patch merge these rsnd_kctrl_new_m/s/e into rsnd_kctrl_new Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 96 +++++++++++++++++------------------------------- sound/soc/sh/rcar/dvc.c | 8 ++-- sound/soc/sh/rcar/rsnd.h | 50 ++++++++++++------------- 3 files changed, 62 insertions(+), 92 deletions(-) commit 3a37471551cd3b287ce7f02ed25bcf8ec37a191d Merge: e0c4211 fc99d23 Author: Mark Brown Date: Thu Apr 6 11:50:04 2017 +0100 Merge branch 'fix/rcar' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rcar commit fc99d23f6d3ec6b17772915114018444393e0ad1 Author: Kuninori Morimoto Date: Thu Apr 6 07:24:36 2017 +0000 ASoC: rsnd: tidyup src->convert_rate reset timing Current src->convert_rate will be set on .hw_param, and be reset on .quit timing. But, .hw_param will not be called again if user did Ctrl-Z + fg. It should be reset on initial of .hw_param to keep its value. Here, ctu.c already do this. This patch solves this issue, other wise, MIXed sound will be strange if user did like below. > aplay -D plughw:0,0 sound_44100.wav & > aplay -D plughw:0,1 sound_96000.wav > Ctrl-Z > fg # 96kHz will be played as 44.1kHz Reported-by: Hiroyuki Yokoyama Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/src.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 89ca694806943728d5969982537acd824be8ce1e Author: David Howells Date: Thu Apr 6 10:12:00 2017 +0100 rxrpc: Trace client call connection Add a tracepoint (rxrpc_connect_call) to log the combination of rxrpc_call pointer, afs_call pointer/user data and wire call parameters to make it easier to match the tracebuffer contents to captured network packets. Signed-off-by: David Howells include/trace/events/rxrpc.h | 26 ++++++++++++++++++++++++++ net/rxrpc/conn_client.c | 1 + 2 files changed, 27 insertions(+) commit 740586d290cb43d941c10274f2b65976bd94dacd Author: David Howells Date: Thu Apr 6 10:12:00 2017 +0100 rxrpc: Trace changes in a call's receive window size Add a tracepoint (rxrpc_rx_rwind_change) to log changes in a call's receive window size as imposed by the peer through an ACK packet. Signed-off-by: David Howells include/trace/events/rxrpc.h | 27 +++++++++++++++++++++++++++ net/rxrpc/input.c | 2 ++ 2 files changed, 29 insertions(+) commit 005ede286f1b801be21d9667d6080bca79ef2a26 Author: David Howells Date: Thu Apr 6 10:12:00 2017 +0100 rxrpc: Trace received aborts Add a tracepoint (rxrpc_rx_abort) to record received aborts. Signed-off-by: David Howells include/trace/events/rxrpc.h | 24 ++++++++++++++++++++++++ net/rxrpc/input.c | 4 +++- 2 files changed, 27 insertions(+), 1 deletion(-) commit fb46f6ee10e78799ea38cf97e4bf52cb70f1228a Author: David Howells Date: Thu Apr 6 10:12:00 2017 +0100 rxrpc: Trace protocol errors in received packets Add a tracepoint (rxrpc_rx_proto) to record protocol errors in received packets. The following changes are made: (1) Add a function, __rxrpc_abort_eproto(), to note a protocol error on a call and mark the call aborted. This is wrapped by rxrpc_abort_eproto() that makes the why string usable in trace. (2) Add trace_rxrpc_rx_proto() or rxrpc_abort_eproto() to protocol error generation points, replacing rxrpc_abort_call() with the latter. (3) Only send an abort packet in rxkad_verify_packet*() if we actually managed to abort the call. Note that a trace event is also emitted if a kernel user (e.g. afs) tries to send data through a call when it's not in the transmission phase, though it's not technically a receive event. Signed-off-by: David Howells include/trace/events/rxrpc.h | 24 ++++++++++ net/rxrpc/ar-internal.h | 19 ++++++++ net/rxrpc/conn_event.c | 9 ++-- net/rxrpc/input.c | 5 +- net/rxrpc/insecure.c | 10 +++- net/rxrpc/recvmsg.c | 2 + net/rxrpc/rxkad.c | 106 +++++++++++++++++++++++++++++-------------- net/rxrpc/sendmsg.c | 3 +- 8 files changed, 138 insertions(+), 40 deletions(-) commit 14d4ae5c4cb89c05262fe41cb7a26f6ba949d8df Author: Benjamin Herrenschmidt Date: Wed Apr 5 17:54:48 2017 +1000 powerpc: Add optional smp_ops->prepare_cpu SMP callback Some platforms (will) need to perform allocations before bringing a new CPU online. Doing it from smp_ops->setup_cpu is the wrong thing to do: - It has no useful failure path (too late) - Calling any allocator will enable interrupts prematurely causing problems with large decrementer among others Instead, add a new callback that is called from __cpu_up (so from the context trying to online the new CPU) at a point where we can safely allocate and handle failures. This will be used by XIVE support. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/smp.h | 1 + arch/powerpc/kernel/smp.c | 10 ++++++++++ 2 files changed, 11 insertions(+) commit 22bd64a621cc80beeb009abec3d3df98ec0131c5 Author: Benjamin Herrenschmidt Date: Wed Apr 5 17:54:47 2017 +1000 powerpc: Add more PPC bit conversion macros Add 32 and 8 bit variants Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/bitops.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit eeea1a434ddedbb5aaeac1a8661445b3ae3eb539 Author: Benjamin Herrenschmidt Date: Thu Apr 6 09:01:33 2017 +1000 powerpc/powernv: Add XIVE related definitions to opal-api.h Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/include/asm/opal-api.h | 74 +++++++++++++++++++++++++- arch/powerpc/include/asm/opal.h | 36 +++++++++++++ arch/powerpc/platforms/powernv/opal-wrappers.S | 15 ++++++ 3 files changed, 124 insertions(+), 1 deletion(-) commit 25b223ddfe2a557307c05fe673e09d94ae950877 Author: Thor Thayer Date: Wed Apr 5 13:01:02 2017 -0500 EDAC, altera: Fix peripheral warnings for Cyclone5 The peripherals' RAS functionality only exist on the Arria10 SoCFPGA. The Cyclone5 initialization generates EDAC warnings when the peripherals aren't found in the device tree. Fix by checking for Arria10 in the init functions. Signed-off-by: Thor Thayer Cc: linux-edac Link: http://lkml.kernel.org/r/1491415262-5018-1-git-send-email-thor.thayer@linux.intel.com Signed-off-by: Borislav Petkov drivers/edac/altera_edac.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 0b063bd3ea9c13df78c82aa742e581c39f9d6156 Author: Zhenyu Wang Date: Sat Apr 1 10:53:02 2017 +0800 drm/i915/gvt: cleanup some too chatty scheduler message It's too chatty to have three places to tell us which one is next vgpu for schedule. My log file was bloated to eat all disk space.. Cc: Ping Gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/sched_policy.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit ef68622da9cc0c4e5202f90093a3a5314e41e9e9 Author: David Howells Date: Thu Apr 6 10:11:59 2017 +0100 rxrpc: Handle temporary errors better in rxkad security In the rxkad security module, when we encounter a temporary error (such as ENOMEM) from which we could conceivably recover, don't abort the connection, but rather permit retransmission of the relevant packets to induce a retry. Note that I'm leaving some places that could be merged together to insert tracing in the next patch. Signed-off-by; David Howells net/rxrpc/rxkad.c | 78 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 40 insertions(+), 38 deletions(-) commit 84a4c09c38903a92ba670375efea5165949a465b Author: David Howells Date: Thu Apr 6 10:11:59 2017 +0100 rxrpc: Note a successfully aborted kernel operation Make rxrpc_kernel_abort_call() return an indication as to whether it actually aborted the operation or not so that kafs can trace the failure of the operation. Note that 'success' in this context means changing the state of the call, not necessarily successfully transmitting an ABORT packet. Signed-off-by: David Howells include/net/af_rxrpc.h | 2 +- net/rxrpc/sendmsg.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) commit 3a92789af0d625caff1e0bf5701aec8edf0d057d Author: David Howells Date: Thu Apr 6 10:11:56 2017 +0100 rxrpc: Use negative error codes in rxrpc_call struct Use negative error codes in struct rxrpc_call::error because that's what the kernel normally deals with and to make the code consistent. We only turn them positive when transcribing into a cmsg for userspace recvmsg. Signed-off-by: David Howells fs/afs/rxrpc.c | 12 ++++++------ net/rxrpc/call_accept.c | 6 +++--- net/rxrpc/call_event.c | 2 +- net/rxrpc/call_object.c | 4 ++-- net/rxrpc/conn_event.c | 8 ++++---- net/rxrpc/input.c | 6 +++--- net/rxrpc/peer_event.c | 2 +- net/rxrpc/recvmsg.c | 6 +++--- net/rxrpc/rxkad.c | 18 +++++++++--------- net/rxrpc/sendmsg.c | 2 +- 10 files changed, 33 insertions(+), 33 deletions(-) commit f40d6560eba65b2a2b84805d2927fed96978669a Author: Dan Carpenter Date: Thu Apr 6 08:21:32 2017 +0300 drm: bridge: dw-hdmi: Add a missing break statement There was supposed to be a break before the next case statement. Fixes: def23aa7e982 ("drm: bridge: dw-hdmi: Switch to V4L bus format and encodings") Signed-off-by: Dan Carpenter Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: http://patchwork.freedesktop.org/patch/msgid/20170406052132.GA26605@mwanda drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 + 1 file changed, 1 insertion(+) commit 4c67b20c98a1a711cc010bff4927129d82a851c7 Author: Neil Armstrong Date: Wed Apr 5 09:32:59 2017 +0200 drm: bridge: dw-hdmi: remove unused hdmi_bus_fmt_is_yuv420 Remove usused yet hdmi_bus_fmt_is_yuv420 function. Fixes: def23aa7e982 ("drm: bridge: dw-hdmi: Switch to V4L bus format and encodings") Signed-off-by: Neil Armstrong Acked-by: Laurent Pinchart Link: http://patchwork.freedesktop.org/patch/msgid/1491377579-9353-1-git-send-email-narmstrong@baylibre.com drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 14 -------------- 1 file changed, 14 deletions(-) commit 7128645d5c647ba3fe1684f2d5710ee403babca2 Author: Daniel Vetter Date: Mon Apr 3 10:33:04 2017 +0200 drm/fb-helper: Extract _legacy kms functions The goal is to push all the kms locking down into these separate _atomic and _legacy functions, so that we can correctly pass the acquire ctx into all atomic drivers. Instead of playing games with hidden ctx in mode_config.acquire_ctx. All the fbdev state will be protected by a new fbdev private lock that Thierry is working on. This here is just prep by creating a clean split between atomic and legacy paths, which also simplifies the control flow a bit. Reviewed-by: Maarten Lankhorst Acked-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-16-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_fb_helper.c | 72 +++++++++++++++++++++++++---------------- 1 file changed, 44 insertions(+), 28 deletions(-) commit 941b8caaa88db02d7c287e937182a71de2751cbb Author: Daniel Vetter Date: Mon Apr 3 10:33:03 2017 +0200 drm: extract legacy framebuffer remove I got confused every time I audited what that lock_all is doing in there until realizing it's for legacy kms only. Make that a notch more obvious by having 2 entirely different paths. While at it also move the atomic version of this into drm_framebuffer.c, there's no reason it needs to be in drm_atomic.c. That way it becomes a simple static function. Reviewed-by: Maarten Lankhorst Acked-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-15-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic.c | 88 ----------------------- drivers/gpu/drm/drm_crtc_internal.h | 1 - drivers/gpu/drm/drm_framebuffer.c | 137 ++++++++++++++++++++++++++++++------ 3 files changed, 115 insertions(+), 111 deletions(-) commit 3a09f737ee056e022b4c3285852c663e9d294911 Author: Daniel Vetter Date: Mon Apr 3 10:33:02 2017 +0200 drm/atomic-helper: Remove legacy backoff hack from gamma_set Another one knocked down. With this we can also remove the temporary hack in the gamma_set ioctl. Reviewed-by: Maarten Lankhorst Acked-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-14-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic_helper.c | 13 ++----------- drivers/gpu/drm/drm_color_mgmt.c | 1 - 2 files changed, 2 insertions(+), 12 deletions(-) commit 6d124ff845334bc466f56c059147e7ad587c2e7e Author: Daniel Vetter Date: Mon Apr 3 10:33:01 2017 +0200 drm: Add acquire ctx to ->gamma_set hook Atomic helpers really want this instead of the hacked-up legacy backoff trick, which unfortunately prevents drivers from using their own private drm_modeset_locks. Aside: There's a few atomic drivers (nv50, vc4, soon vmwgfx) which don't yet use the new atomic color mgmt/gamma table stuff. Would be nice if they could switch over and just hook up drm_atomic_helper_legacy_gamma_set() instead. Cc: Dave Airlie Cc: Alex Deucher Cc: Christian König Cc: Gerd Hoffmann Cc: Ben Skeggs Cc: Sinclair Yeh Cc: Thomas Hellstrom Cc: Eric Anholt Reviewed-by: Maarten Lankhorst Acked-by: Alex Deucher Reviewed-by: Sinclair Yeh Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-13-daniel.vetter@ffwll.ch drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 3 ++- drivers/gpu/drm/ast/ast_mode.c | 3 ++- drivers/gpu/drm/cirrus/cirrus_mode.c | 3 ++- drivers/gpu/drm/drm_atomic_helper.c | 4 +++- drivers/gpu/drm/drm_color_mgmt.c | 3 ++- drivers/gpu/drm/drm_fb_helper.c | 3 ++- drivers/gpu/drm/gma500/gma_display.c | 3 ++- drivers/gpu/drm/gma500/gma_display.h | 3 ++- drivers/gpu/drm/mgag200/mgag200_mode.c | 3 ++- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 3 ++- drivers/gpu/drm/nouveau/nv50_display.c | 3 ++- drivers/gpu/drm/radeon/radeon_display.c | 3 ++- drivers/gpu/drm/vc4/vc4_crtc.c | 3 ++- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 3 ++- drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 3 ++- include/drm/drm_atomic_helper.h | 3 ++- include/drm/drm_crtc.h | 3 ++- 21 files changed, 43 insertions(+), 21 deletions(-) commit ca659e0e3cda69c5e8bbb7038adad30442a8ce39 Author: Daniel Vetter Date: Mon Apr 3 10:33:00 2017 +0200 drm: Add explicit acquire ctx handling around ->gamma_set Just the groundwork to prepare for adding the acquire cxt parameter to the ->gamma_set hook. Again we need a temporary hack to fill out mode_config.acquire_ctx until the atomic helpers are switched over. Reviewed-by: Maarten Lankhorst Acked-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-12-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_color_mgmt.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) commit 9c79e0b1d096c06e4b012a32dddb04be0ce9716e Author: Daniel Vetter Date: Mon Apr 3 10:32:59 2017 +0200 drm/fb-helper: Give up on kgdb for atomic drivers It just doesn't work. It probably stopped working way, way before that (e.g. i915 grabbed random mutexes all over in modeset code at least since gen6), but with atomic and all the ww_mutex stuff it's indeed hopeless. Remove ->mode_set_base_atomic from the 2 atomic drivers (i915 and nouveau) that still had one (both had dummy implementations already anyway), and shunt atomic drivers in the helpers debug_enter/leave functions. I'll leave the code in for radeon and amdgpu, but I think as soon as amdgpu is atomic we should think about just ripping it out. Only having it around for radeon and pre-nv50 is rather pointless. This would also allow us to nuke all that code from fbdev. Funny part is that _all_ kms drivers set this hook, despite that no one else provides the required ->mode_set_base_atomic implementation. The reason I'm jumping on this is that I want to wire up a full acquire ctx for the benefit of atomic drivers, everywhere. And the debug_enter/leave implementations call ->gamma_set. And there's just no way ever we can create an acquire_ctx in the nmi context of kgdb. Cc: Ben Skeggs Cc: Alex Deucher Reviewed-by: Maarten Lankhorst Acked-by: Alex Deucher Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-11-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_fb_helper.c | 6 ++++++ drivers/gpu/drm/i915/intel_display.c | 12 ------------ drivers/gpu/drm/nouveau/nv50_display.c | 10 ---------- 3 files changed, 6 insertions(+), 22 deletions(-) commit eda6f4e868e74adfae8ac6b06a863a090affbb14 Author: Alexandre Bailon Date: Wed Apr 5 18:35:16 2017 +0200 dmaengine: cppi41: Fix an Oops happening in cppi41_dma_probe() This fix an Oops happening on all platforms using the old dt bindings (all platforms but da8xx). This update cppi41_dma_probe() to use the index variable which is required to keep compatibility between old and new dt bindings. Fixes: 8e3ba95f4190 ("dmaengine: cppi41: use managed functions devm_*()") Reported-by: Tony Lindgren Signed-off-by: Alexandre Bailon Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cb545960dea2749771c88b0cb26e5adfd12a0315 Author: Priit Laes Date: Wed Apr 5 19:52:27 2017 +0300 clk: sunxi-ng: Display index when clock registration fails Add clock index to clock registration failure message. Clock name is sometimes not available, when things go really wrong. Signed-off-by: Priit Laes Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bf7af0cea8a7980269ee1762f336cccb7b7e813e Author: Al Viro Date: Thu Mar 30 12:27:21 2017 -0400 esas2r: don't open-code memdup_user() Signed-off-by: Al Viro drivers/scsi/esas2r/esas2r_ioctl.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) commit 1c87ea4566612ef37e31f6389cbb232bd49cdd45 Author: Al Viro Date: Sat Mar 25 00:43:43 2017 -0400 alpha: fix stack smashing in old_adjtimex(2) Signed-off-by: Al Viro arch/alpha/kernel/osf_sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e73a67f7cd471a14bb1351954609e0b0ef5d2187 Author: Al Viro Date: Sat Mar 18 21:20:27 2017 -0400 don't open-code kernel_setsockopt() Signed-off-by: Al Viro fs/ocfs2/cluster/tcp.c | 25 ++++--------------------- net/rds/tcp.c | 5 +---- net/rds/tcp_send.c | 8 +------- 3 files changed, 6 insertions(+), 32 deletions(-) commit 2260ea86c0e7623d4e99886638b2b83ef21efa60 Author: Al Viro Date: Tue Mar 28 15:59:26 2017 -0400 mips: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/mips/Kconfig | 1 + arch/mips/include/asm/uaccess.h | 274 ++++------------------------------------ 2 files changed, 27 insertions(+), 248 deletions(-) commit 1a4fded6d32596053d4f0bc8c49028faf4114a17 Author: Al Viro Date: Mon Mar 20 12:03:16 2017 -0400 mips: get rid of tail-zeroing in primitives Signed-off-by: Al Viro arch/mips/cavium-octeon/octeon-memcpy.S | 31 +-------------------- arch/mips/include/asm/uaccess.h | 19 ++----------- arch/mips/lib/memcpy.S | 49 --------------------------------- 3 files changed, 3 insertions(+), 96 deletions(-) commit ab0aca27c4dfcfa72eb1339ae94edbfbdd751ae8 Author: Al Viro Date: Mon Mar 20 11:54:21 2017 -0400 mips: make copy_from_user() zero tail explicitly Signed-off-by: Al Viro arch/mips/include/asm/uaccess.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit b0bb945c14e81b3b33075d59469d5bf5b736a4fb Author: Al Viro Date: Mon Mar 20 11:51:34 2017 -0400 mips: clean and reorder the forest of macros... Signed-off-by: Al Viro arch/mips/include/asm/uaccess.h | 120 ++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 71 deletions(-) commit c12a1d7ad916105fc5f7809f9273ea4fe7ce4b28 Author: Al Viro Date: Mon Mar 20 11:40:15 2017 -0400 mips: consolidate __invoke_... wrappers Signed-off-by: Al Viro arch/mips/include/asm/uaccess.h | 144 ++++++++++++---------------------------- 1 file changed, 44 insertions(+), 100 deletions(-) commit f0a955f4eeec0f16bdbdd0fb15d8ec0937d1de23 Author: Al Viro Date: Tue Dec 27 10:10:53 2016 -0500 mips: sanitize __access_ok() for one thing, the last argument is always __access_mask and had been such since 2.4.0-test3pre8; for another, it can bloody well be a static inline - -O2 or -Os, __builtin_constant_p() propagates through static inline calls. Signed-off-by: Al Viro arch/mips/include/asm/uaccess.h | 21 ++++++--------------- arch/mips/kernel/mips-r2-to-r6-emul.c | 24 ++++++++++++------------ arch/mips/kernel/syscall.c | 2 +- arch/mips/oprofile/backtrace.c | 2 +- 4 files changed, 20 insertions(+), 29 deletions(-) commit 054838bc019c90511d034fb796dc8c7715460fc2 Merge: d597580 fc69910 Author: Al Viro Date: Thu Apr 6 02:07:33 2017 -0400 Merge commit 'fc69910f329d' into uaccess.mips backmerge of a build fix from mainline commit 2f20182ed67092bc038bd88104f780d3b7ebdb85 Author: Jiancheng Xue Date: Wed Mar 29 14:30:09 2017 +0800 arm64: dts: hisilicon: add dts files for hi3798cv200-poplar board Add basic dts files for hi3798cv200-poplar board. Poplar is the first development board compliant with the 96Boards Enterprise Edition TV Platform specification. The board features the Hi3798CV200 with an integrated quad-core 64-bit ARM Cortex A53 processor and high performance Mali T720 GPU. Signed-off-by: Jiancheng Xue Reviewed-by: Alex Elder Acked-by: Peter Griffin Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/Makefile | 1 + .../boot/dts/hisilicon/hi3798cv200-poplar.dts | 162 ++++++++ arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi | 411 +++++++++++++++++++++ 3 files changed, 574 insertions(+) commit b96df86307c51a33929da7a2e7f01a75d7798607 Author: Jiancheng Xue Date: Wed Mar 29 14:30:08 2017 +0800 dt-bindings: arm: hisilicon: add bindings for hi3798cv200 SoC and Poplar board Add bindings for HiSilicon hi3798cv200 SoC and Poplar Board. Signed-off-by: Jiancheng Xue Reviewed-by: Alex Elder Acked-by: Peter Griffin Acked-by: Rob Herring Signed-off-by: Wei Xu Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7d4fe0d123c318ad4282c9ac731b3383d983bf24 Author: Ngai-Mint Kwan Date: Mon Feb 6 14:21:13 2017 -0800 fm10k: do not enqueue mailbox when host not ready Interfaces will reset whenever the TX mailbox FIFO has become full. This occurs more frequently whenever the IES API application is not running to process and clear the messages in the FIFO. Thus, this could lead to situations where the interface would enter an infinite reset loop. That is: if the interface is trying to synchronize a huge number of unicast and multicast entries with the IES API application, the TX mailbox FIFO will become full and the interface resets. Once the interface exits reset, it'll try to synchronize the unicast and multicast entries again. Ergo, this creates an infinite loop. Other actions such as multiple mulitcast mode or up/down transitions will fill the TX mailbox FIFO and induce the interface to reset. To correct these situations, check if the interface's "host_ready" flag is enabled before enqueuing any messages to the TX mailbox FIFO. This check will be conducted by a function call. Lastly, this issue mainly affects the PF and, thus, the VF is exempt. Signed-off-by: Ngai-Mint Kwan Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 105 ++++++++++++++++++------ 1 file changed, 80 insertions(+), 25 deletions(-) commit 16b1889f8bf655a9f4facfeff2979007f5e63974 Author: Ngai-Mint Kwan Date: Thu Jan 12 15:59:42 2017 -0800 fm10k: disable receive queue when configuring ring Write to RXQCTL register to disable the receive queue when configuring the RX ring. Signed-off-by: Ngai-Mint Kwan Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 1 + 1 file changed, 1 insertion(+) commit 02957703ca31a93689f1ea418aa7dd66d6a23221 Author: Jacob Keller Date: Thu Jan 12 15:59:41 2017 -0800 fm10k: update function header comment for fm10k_get_stats64 Re-word the comment to avoid stating that we return a value for this void function. Additionally, there is no need to mention older kernels, since this is the upstream kernel. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b4fd8ffc11c0686d04fb83d3c25572ea502efed9 Author: Jacob Keller Date: Thu Jan 12 15:59:40 2017 -0800 fm10k: allow service task to reschedule itself If some code path executes fm10k_service_event_schedule(), it is guaranteed that we only queue the service task once, since we use __FM10K_SERVICE_SCHED flag. Unfortunately this has a side effect that if a service request occurs while we are currently running the watchdog, it is possible that we will fail to notice the request and ignore it until the next time the request occurs. This can cause problems with pf/vf mailbox communication and other service event tasks. To avoid this, introduce a FM10K_SERVICE_REQUEST bit. When we successfully schedule (and set the _SCHED bit) the service task, we will clear this bit. However, if we are unable to currently schedule the service event, we just set the new SERVICE_REQUEST bit. Finally, after the service event completes, we will re-schedule if the request bit has been set. This should ensure that we do not miss any service event schedules, since we will re-schedule it once the currently running task finishes. This means that for each request, we will always schedule the service task to run at least once in full after the request came in. This will avoid timing issues that can occur with the service event scheduling. We do pay a cost in re-running many tasks, but all the service event tasks use either flags to avoid duplicate work, or are tolerant of being run multiple times. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k.h | 1 + drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit 469295578790150cf0ce3395bf815edce6e37fb1 Author: Jacob Keller Date: Thu Jan 12 15:59:39 2017 -0800 fm10k: future-proof state bitmaps using DECLARE_BITMAP This ensures that future programmers do not have to remember to re-size the bitmaps due to adding new values. Although this is unlikely for this driver, it may happen and it's best to prevent it from ever being an issue. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k.h | 40 ++++++++------- drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 4 +- drivers/net/ethernet/intel/fm10k/fm10k_main.c | 10 ++-- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 2 +- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 62 ++++++++++++------------ 5 files changed, 61 insertions(+), 57 deletions(-) commit 3ee7b3a3b9deb26278af308743ec927847c70366 Author: Jacob Keller Date: Thu Jan 12 15:59:38 2017 -0800 fm10k: use a BITMAP for flags to avoid race conditions Replace bitwise operators and #defines with a BITMAP and enumeration values. This is similar to how we handle the "state" values as well. This has two distinct advantages over the old method. First, we ensure correctness of operations which are currently problematic due to race conditions. Suppose that two kernel threads are running, such as the watchdog and an ethtool ioctl, and both modify flags. We'll say that the watchdog is CPU A, and the ethtool ioctl is CPU B. CPU A sets FLAG_1, which can be seen as CPU A read FLAGS CPU A write FLAGS | FLAG_1 CPU B sets FLAG_2, which can be seen as CPU B read FLAGS CPU A write FLAGS | FLAG_2 However, "|=" and "&=" operators are not actually atomic. So this could be ordered like the following: CPU A read FLAGS -> variable CPU B read FLAGS -> variable CPU A write FLAGS (variable | FLAG_1) CPU B write FLAGS (variable | FLAG_2) Notice how the 2nd write from CPU B could actually undo the write from CPU A because it isn't guaranteed that the |= operation is atomic. In practice the race windows for most flag writes is incredibly narrow so it is not easy to isolate issues. However, the more flags we have, the more likely they will cause problems. Additionally, if such a problem were to arise, it would be incredibly difficult to track down. Second, there is an additional advantage beyond code correctness. We can now automatically size the BITMAP if more flags were added, so that we do not need to remember that flags is u32 and thus if we added too many flags we would over-run the variable. This is not a likely occurrence for fm10k driver, but this patch can serve as an example for other drivers which have many more flags. This particular change does have a bit of trouble converting some of the idioms previously used with the #defines for flags. Specifically, when converting FM10K_FLAG_RSS_FIELD_IPV[46]_UDP flags. This whole operation was actually quite problematic, because we actually stored flags separately. This could more easily show the problem of the above re-ordering issue. This is really difficult to test whether atomics make a difference in practical scenarios, but you can ensure that basic functionality remains the same. This patch has a lot of code coverage, but most of it is relatively simple. While we are modifying these files, update their copyright year. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k.h | 27 ++++++++--- drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 62 ++++++++++++++++-------- drivers/net/ethernet/intel/fm10k/fm10k_main.c | 6 +-- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 4 +- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 31 ++++++------ 5 files changed, 82 insertions(+), 48 deletions(-) commit 540fca35e38d15777b310f450f63f056e63039f5 Author: Phil Turnbull Date: Wed Nov 23 13:33:58 2016 -0500 fm10k: correctly check if interface is removed FM10K_REMOVED expects a hardware address, not a 'struct fm10k_hw'. Fixes: 5cb8db4a4cbc ("fm10k: Add support for VF") Signed-off-by: Phil Turnbull Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99a97a8ba9881fc47901ff36b057e5cd0bf06af0 Author: Adam Borowski Date: Sun Apr 2 07:03:28 2017 +0200 drm/nouveau/gpio: enable interrupts on cards with 32 gpio lines The code attempts to enable them, but hits an undefined behaviour by shifting by the entire register's width: int lines = 32; u32 mask = (1 << lines) - 1; // 00000000 on x86 u32 mask = (1 << lines) - 1; // ffffffff on arm (32) u32 mask = (1 << lines) - 1; // 00000000 on arm64 u32 mask = (1ULL << lines) - 1; // ffffffff everywhere Signed-off-by: Adam Borowski Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2c4ef70790cee37f243af2b303727394edae1d5 Author: Ben Skeggs Date: Thu Mar 30 16:12:30 2017 +1000 drm/nouveau/gr/gp107: initial support Forked from GP106 implementation. Differences: - 1 PPC/GPC - Slightly different grctx magics Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 17 +++++--- drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 3 ++ drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp102.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp107.c | 47 ++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp102.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gp107.c | 53 +++++++++++++++++++++++ 9 files changed, 120 insertions(+), 8 deletions(-) commit fa1dbc49725bbd4231fa48f7c42a1ad2dd183786 Author: Alexandre Courbot Date: Wed Mar 29 18:31:23 2017 +0900 drm/nouveau/core: recognise GP10B chipset Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit c3f7de6a4c1ce04e9dff0a7db48051e9e2529b57 Author: Alexandre Courbot Date: Wed Mar 29 18:31:22 2017 +0900 drm/nouveau/platform: support for probing GP10B Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_platform.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e6e1817a55ba50e0d68ce77e6008edcba97ba41a Author: Alexandre Courbot Date: Wed Mar 29 18:31:21 2017 +0900 drm/nouveau/platform: make VDD regulator optional GP10B's power is managed by generic PM domains, so it does not require a VDD regulator. Add this option into the chip function structure. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/tegra.h | 4 +++ drivers/gpu/drm/nouveau/nouveau_platform.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 31 +++++++++++++++------- 3 files changed, 28 insertions(+), 9 deletions(-) commit 51751f7db0c9f457318fba2004ca8fe2bb2c0b7e Author: Alexandre Courbot Date: Wed Mar 29 18:31:20 2017 +0900 drm/nouveau/gr: support for GP10B GR is similar to GP100, with a few unavailable registers. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 4 ++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c | 13 +++++- drivers/gpu/drm/nouveau/nvkm/engine/gr/gp102.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp10b.c | 59 ++++++++++++++++++++++++ 6 files changed, 77 insertions(+), 2 deletions(-) commit 0af0327cd92a8e2aa1573228a44e97e1a34ff2c1 Author: Alexandre Courbot Date: Wed Mar 29 18:31:19 2017 +0900 drm/nouveau/ibus: add GP10B support GP10B requires a specific initialization sequence due to the absence of devinit. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/ibus.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/ibus/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gp10b.c | 59 ++++++++++++++++++++++ 3 files changed, 61 insertions(+) commit b9a995def69671b4f5f7a06a4bb5c89ad31ada1c Author: Alexandre Courbot Date: Wed Mar 29 18:31:18 2017 +0900 drm/nouveau/mc: add GP10B support GP10B's MC is compatible with GP100's, but engines need to be explicitly put out of ELPG during init. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/mc.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/gp100.c | 17 +++++--- drivers/gpu/drm/nouveau/nvkm/subdev/mc/gp10b.c | 49 ++++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h | 6 +++ 5 files changed, 69 insertions(+), 5 deletions(-) commit fdde00ed1193cd3b179a2c93f9508e1d090c2062 Author: Alexandre Courbot Date: Wed Mar 29 18:31:17 2017 +0900 drm/nouveau/fb: add GP10B support GP10B's FB is largely compatible with the GP100 implementation. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp10b.c | 38 ++++++++++++++++++++++++ 3 files changed, 40 insertions(+) commit af3a4f7efbadd1905bd5ffb470f3ee7c05d19e0e Author: Alexandre Courbot Date: Wed Mar 29 18:31:16 2017 +0900 drm/nouveau/fifo: add GP10B support GP10B's FIFO is similar to GP100's, but only allows 512 channels. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp10b.c | 41 ++++++++++++++++++++++ 5 files changed, 45 insertions(+), 1 deletion(-) commit a558be625cf9072fb31aa7c5e592bd1e1dd73845 Author: Alexandre Courbot Date: Wed Mar 29 18:31:15 2017 +0900 drm/nouveau/msgqueue: support for GP10B PMU firmware The GP10B firmware is very close to GM20B's. The only difference is that it supports booting multiple falcons. In order to avoid having too much functions and structures shared, implement its support in the same source file as GM20B firmware. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.c | 3 + drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.h | 2 + .../drm/nouveau/nvkm/falcon/msgqueue_0137c63d.c | 112 +++++++++++++++++++++ 3 files changed, 117 insertions(+) commit 59d5592d3bf2e70b9c56212cf5c9f1bfab6f0147 Author: Alexandre Courbot Date: Wed Mar 29 18:31:14 2017 +0900 drm/nouveau/secboot: add GP10B support GP10B's secboot is largely similar to GM20B's. Only differences are MC base address and the fact that GPCCS is also securely managed. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/subdev/secboot.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/secboot/Kbuild | 1 + .../gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.c | 93 ++++++++++++++++++++++ 3 files changed, 95 insertions(+) commit c79505c1f9e14d7aa9eb3b085c799d77950b1e20 Author: Alexandre Courbot Date: Wed Mar 29 18:31:13 2017 +0900 drm/nouveau/secboot/gm20b: specify MC base address as argument Allow the MC base address to be specified as an argument for the WPR region reading function. GP10B uses a different address layout as GM20B, so this is necessary. Also export the function to be used by GP10B. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.h | 3 +++ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c | 17 +++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) commit 008796d9a35f217d7f3672acd1d97ef77a5e05ff Author: Alexandre Courbot Date: Wed Mar 29 18:31:12 2017 +0900 drm/nouveau/secboot: start LS firmware in post-run hook The LS firmware post-run hook is the right place to start said LS firmware. Moving it here also allows to remove special handling in the ACR code. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 47 --------------------- .../nvkm/subdev/secboot/ls_ucode_msgqueue.c | 49 +++++++++++++++++++++- 2 files changed, 47 insertions(+), 49 deletions(-) commit d424d278b2e5c73040e476e3d854eea4d2063023 Author: Alexandre Courbot Date: Wed Mar 29 18:31:11 2017 +0900 drm/nouveau/secboot: let LS post_run hooks return error A LS post-run hook can meet an error meaning the failure of secure boot. Make sure this can be reported. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 7 +++++-- .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h | 2 +- .../gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode.h | 4 ++-- .../nvkm/subdev/secboot/ls_ucode_msgqueue.c | 23 +++++++++++++++++----- 4 files changed, 26 insertions(+), 10 deletions(-) commit 2963a06a4d36af5d863c55b2d76ed91e6a922409 Author: Alexandre Courbot Date: Wed Mar 29 18:31:10 2017 +0900 drm/nouveau/secboot: pass instance to LS firmware loaders Having access to the secboot instance loading a LS firmware can be useful to LS firmware handlers. At least more useful than just having an out-of-context subdev pointer. GP10B's firmware will also need to know the WPR address, which can be obtained from the secboot instance. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/msgqueue.h | 9 +++------ drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.c | 7 ++++--- drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.h | 6 ++++-- .../gpu/drm/nouveau/nvkm/falcon/msgqueue_0137c63d.c | 3 ++- .../gpu/drm/nouveau/nvkm/falcon/msgqueue_0148cdec.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 11 +++++++---- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h | 4 +++- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r367.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r367.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode.h | 8 ++++---- .../gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode_gr.c | 10 ++++------ .../nouveau/nvkm/subdev/secboot/ls_ucode_msgqueue.c | 18 ++++++++---------- 12 files changed, 44 insertions(+), 39 deletions(-) commit 598a8148e7208aae64f3c3d33f0ad1a65425965f Author: Alexandre Courbot Date: Wed Mar 29 18:31:09 2017 +0900 drm/nouveau/secboot: allow to boot multiple falcons Change the secboot and msgqueue interfaces to take a mask of falcons to reset instead of a single falcon. The GP10B firmware interface requires FECS and GPCCS to be booted in a single firmware command. For firmwares that only support single falcon boot, it is trivial to loop over the mask and boot each falcons individually. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/core/msgqueue.h | 3 +-- .../gpu/drm/nouveau/include/nvkm/subdev/secboot.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 16 ++++++++------ drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.c | 25 +++++++++++++++++++--- drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr.h | 3 +-- .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 25 +++++++++++++--------- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/base.c | 6 +++--- 8 files changed, 54 insertions(+), 28 deletions(-) commit e5ffa727e5330478d9f074521dbf195c8593ed9f Author: Thierry Reding Date: Mon Jan 30 21:03:07 2017 +0100 drm/nouveau/imem/gk20a: Turn instmem lock into mutex The gk20a implementation of instance memory uses vmap()/vunmap() to map memory regions into the kernel's virtual address space. These functions may sleep, so protecting them by a spin lock is not safe. This triggers a warning if the DEBUG_ATOMIC_SLEEP Kconfig option is enabled. Fix this by using a mutex instead. Signed-off-by: Thierry Reding Reviewed-by: Alexandre Courbot Tested-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 2ebd42bc28525da52162425ecd7472846b78584d Author: Ben Skeggs Date: Thu Apr 6 10:35:26 2017 +1000 drm/nouveau: initial support (display-only) for GP107 Forked from GP106 implementation. Split out from commit enabling secboot/gr support so that it can be added to earlier kernels. Cc: stable@vger.kernel.org [4.10+] Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit df60d1f23b09c5ce2a8e404012323d4deedcc589 Author: Ben Skeggs Date: Wed Apr 5 18:16:14 2017 +1000 drm/nouveau/kms/nv50: fix double dma_fence_put() when destroying plane state When the atomic support was added to nouveau, the DRM core did not do this. However, later in the same merge window, a commit (drm/fence: add in-fences support) was merged that added it, leading to use-after-frees of the fence object. Cc: stable@vger.kernel.org [4.10+] Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nv50_display.c | 2 -- 1 file changed, 2 deletions(-) commit aeecfcd7440e8ef3b31309fa743cd225090eb8d3 Author: Ben Skeggs Date: Wed Apr 5 09:12:54 2017 +1000 drm/nouveau/kms/nv50: fix setting of HeadSetRasterVertBlankDmi method Cc: stable@vger.kernel.org [4.10+] Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nv50_display.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ac799acaa4d8db4f7dcd968b15c9596c80a4677f Author: Ilia Mirkin Date: Sat Mar 18 16:23:10 2017 -0400 drm/nouveau/mmu/nv4a: use nv04 mmu rather than the nv44 one The NV4A (aka NV44A) is an oddity in the family. It only comes in AGP and PCI varieties, rather than a core PCIE chip with a bridge for AGP/PCI as necessary. As a result, it appears that the MMU is also non-functional. For AGP cards, the vast majority of the NV4A lineup, this worked out since we force AGP cards to use the nv04 mmu. However for PCI variants, this did not work. Switching to the NV04 MMU makes it work like a charm. Thanks to mwk for the suggestion. This should be a no-op for NV4A AGP boards, as they were using it already. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70388 Signed-off-by: Ilia Mirkin Cc: stable@vger.kernel.org Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad01a91a820cd9f0d880c407bf556b67298dcc93 Author: Ilia Mirkin Date: Sat Mar 18 21:53:05 2017 -0400 drm/nouveau/mpeg: mthd returns true on success now Signed-off-by: Ilia Mirkin Fixes: 590801c1a3 ("drm/nouveau/mpeg: remove dependence on namedb/engctx lookup") Cc: stable@vger.kernel.org # v4.3+ Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0fbdf9953b41c28845fe8d05007ff09634ee3000 Author: Daniel Lezcano Date: Thu Mar 16 15:03:24 2017 +0100 arm64: dts: hi6220: Reset the mmc hosts The MMC hosts could be left in an unconsistent or uninitialized state from the firmware. Instead of assuming, the firmware did the right things, let's reset the host controllers. This change fixes a bug when the mmc2/sdio is initialized leading to a hung task: [ 242.704294] INFO: task kworker/7:1:675 blocked for more than 120 seconds. [ 242.711129] Not tainted 4.9.0-rc8-00017-gcf0251f #3 [ 242.716571] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 242.724435] kworker/7:1 D 0 675 2 0x00000000 [ 242.729973] Workqueue: events_freezable mmc_rescan [ 242.734796] Call trace: [ 242.737269] [] __switch_to+0xa8/0xb4 [ 242.742437] [] __schedule+0x1c0/0x67c [ 242.747689] [] schedule+0x40/0xa0 [ 242.752594] [] schedule_timeout+0x1c4/0x35c [ 242.758366] [] wait_for_common+0xd0/0x15c [ 242.763964] [] wait_for_completion+0x28/0x34 [ 242.769825] [] mmc_wait_for_req_done+0x40/0x124 [ 242.775949] [] mmc_wait_for_req+0xc0/0xf8 [ 242.781549] [] mmc_wait_for_cmd+0x6c/0x84 [ 242.787149] [] mmc_io_rw_direct_host+0x9c/0x114 [ 242.793270] [] sdio_reset+0x34/0x7c [ 242.798347] [] mmc_rescan+0x2fc/0x360 [ ... ] Cc: stable@vger.kernel.org Signed-off-by: Daniel Lezcano Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 70641a0a84e1ae3c6eee3d47ed5a482f85b11e3e Author: Chanwoo Choi Date: Wed Mar 29 19:18:36 2017 +0900 extcon: Use BIT() macro for the left-shift operation This patch just uses the BIT() macro to make the code simple. Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c42a880c3139cde603c5c83950ca7613aef7eedc Author: Hans de Goede Date: Wed Apr 5 00:04:52 2017 +0200 extcon: intel-cht-wc: Ignore failure to detect charger-type on host mode exit When we leave host-mode because the id-pin is no longer connected to ground, the 5v boost converter is normally still on, so we will see Vbus, but it is not from a charger (normally) so the charger-type detection will fail. This commit silences the cht_wc_extcon_get_charger() false-positive errors when we're leaving host mode. Signed-off-by: Hans de Goede Signed-off-by: Chanwoo Choi drivers/extcon/extcon-intel-cht-wc.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 585cb239f4de6c11349e900dd8b4d8cf0825e802 Author: Hans de Goede Date: Wed Apr 5 00:04:51 2017 +0200 extcon: intel-cht-wc: Disable external 5v boost converter on probe Disable the 5v boost converter on probe in case it was left on by the BIOS, this fixes 2 problems: 1) This gets seen by the external battery charger as a valid Vbus supply and it then tries to feed Vsys from this creating a feedback loop which causes aprox. 300 mA extra battery drain (and unless we drive the external-charger-disable pin high it also tries to charge the battery causing even more feedback). 2) This gets seen by the pwrsrc block as a SDP USB Vbus supply Since the external battery charger has its own 5v boost converter which does not have these issues, we simply turn the separate external 5v boost converter off and leave it off entirely. Signed-off-by: Hans de Goede Signed-off-by: Chanwoo Choi drivers/extcon/extcon-intel-cht-wc.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit c9d0f1d121cf038afc787ceb03d60798a1db389b Author: Chanwoo Choi Date: Sun Jan 1 21:14:26 2017 +0900 extcon: Remove porting compatibility of swich class This patch removes the porting compatibility for switch class because there is no any usage and requirement of swich class over a couple of years. Signed-off-by: Chanwoo Choi Documentation/extcon/porting-android-switch-class | 123 ---------------------- drivers/extcon/extcon.c | 20 ---- 2 files changed, 143 deletions(-) commit db0f3baaa38bb587d831b1127082643b5e813074 Author: Hans de Goede Date: Thu Mar 23 17:01:42 2017 +0100 extcon: intel-cht-wc: Add Intel Cherry Trail Whiskey Cove PMIC extcon driver Add a driver for charger detection / control on the Intel Cherrytrail Whiskey Cove PMIC. Signed-off-by: Hans de Goede Signed-off-by: Chanwoo Choi drivers/extcon/Kconfig | 7 + drivers/extcon/Makefile | 1 + drivers/extcon/extcon-intel-cht-wc.c | 353 +++++++++++++++++++++++++++++++++++ 3 files changed, 361 insertions(+) commit 01944321de3021020886564328684b7603ee216c Author: Roger Quadros Date: Wed Feb 15 14:31:29 2017 +0200 extcon: palmas: Don't miss GPIO events during suspend/resume The USB cable state can change during suspend/resume so be sure to check and update the extcon state. Signed-off-by: Roger Quadros Signed-off-by: Chanwoo Choi drivers/extcon/extcon-palmas.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8680b4d1933fbe3349d51a4e1fd4513b12abffed Author: Roger Quadros Date: Wed Feb 15 14:31:28 2017 +0200 extcon: usb-gpio: Don't miss event during suspend/resume We must check for ID/VBUS changes during resume irrespective of whether our device wakeup is enabled or not. Without this we seem to be missing ID/VBUS events after system suspend/resume. Signed-off-by: Roger Quadros Signed-off-by: Chanwoo Choi drivers/extcon/extcon-usb-gpio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 98fd079297dd274c15c926a337253675573c5832 Author: Peter Chen Date: Mon Feb 13 17:21:52 2017 +0800 extcon: usb-gpio: Do not enable USB as wakeup source by default Whether the USB port as a wakeup source should be determined by user, but not enabled by default. Signed-off-by: Peter Chen Signed-off-by: Chanwoo Choi drivers/extcon/extcon-usb-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e57bb43c7e346943d73b44d05485aac68d8aff9d Author: Charles Keepax Date: Wed Jan 25 09:34:06 2017 +0000 extcon: arizona: Wait for any running HPDETs to complete on jack removal As the HPDET can't be aborted mid way through we should not allow any new insertion to be processed until the previous HPDET has finished. It is very unlikely but with low enough debounce settings you could start a new HPDET before the old one has completed, which results in an erroneous reading. Signed-off-by: Charles Keepax Signed-off-by: Chanwoo Choi drivers/extcon/extcon-arizona.c | 46 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit bc9a5c37a5766bbc9d93c15f3bee2a1896dfa9f6 Merge: 366380c 815429b Author: Chanwoo Choi Date: Thu Apr 6 10:54:36 2017 +0900 Merge branch 'ib-extcon-4.12' into HEAD commit faeeb317a5615076dff1ff44b51e862e6064dbd0 Author: Jarod Wilson Date: Tue Apr 4 17:32:42 2017 -0400 bonding: attempt to better support longer hw addresses People are using bonding over Infiniband IPoIB connections, and who knows what else. Infiniband has a hardware address length of 20 octets (INFINIBAND_ALEN), and the network core defines a MAX_ADDR_LEN of 32. Various places in the bonding code are currently hard-wired to 6 octets (ETH_ALEN), such as the 3ad code, which I've left untouched here. Besides, only alb is currently possible on Infiniband links right now anyway, due to commit 1533e7731522, so the alb code is where most of the changes are. One major component of this change is the addition of a bond_hw_addr_copy function that takes a length argument, instead of using ether_addr_copy everywhere that hardware addresses need to be copied about. The other major component of this change is converting the bonding code from using struct sockaddr for address storage to struct sockaddr_storage, as the former has an address storage space of only 14, while the latter is 128 minus a few, which is necessary to support bonding over device with up to MAX_ADDR_LEN octet hardware addresses. Additionally, this probably fixes up some memory corruption issues with the current code, where it's possible to write an infiniband hardware address into a sockaddr declared on the stack. Lightly tested on a dual mlx4 IPoIB setup, which properly shows a 20-octet hardware address now: $ cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) Bonding Mode: fault-tolerance (active-backup) (fail_over_mac active) Primary Slave: mlx4_ib0 (primary_reselect always) Currently Active Slave: mlx4_ib0 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 100 Down Delay (ms): 100 Slave Interface: mlx4_ib0 MII Status: up Speed: Unknown Duplex: Unknown Link Failure Count: 0 Permanent HW addr: 80:00:02:08:fe:80:00:00:00:00:00:00:e4:1d:2d:03:00:1d:67:01 Slave queue ID: 0 Slave Interface: mlx4_ib1 MII Status: up Speed: Unknown Duplex: Unknown Link Failure Count: 0 Permanent HW addr: 80:00:02:09:fe:80:00:00:00:00:00:01:e4:1d:2d:03:00:1d:67:02 Slave queue ID: 0 Also tested with a standard 1Gbps NIC bonding setup (with a mix of e1000 and e1000e cards), running LNST's bonding tests. CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller drivers/net/bonding/bond_alb.c | 88 +++++++++++++++++++++++---------------- drivers/net/bonding/bond_main.c | 73 ++++++++++++++++++-------------- drivers/net/bonding/bond_procfs.c | 3 +- include/net/bonding.h | 12 +++++- 4 files changed, 108 insertions(+), 68 deletions(-) commit 148cbab6cffc8247d7dfd0f2da86c2eb8c55709c Author: Edward Cree Date: Tue Apr 4 17:02:49 2017 +0100 sfc: don't insert mc_list on low-latency firmware if it's too long If the mc_list is longer than 256 addresses, we enter mc_promisc mode. If we're in mc_promisc mode and the firmware doesn't support cascaded multicast, normally we also insert our mc_list, to prevent stealing by another VI. However, if the mc_list was too long, this isn't really helpful - the MC groups that didn't fit in the list can still get stolen, and having only some of them stealable will probably cause more confusing behaviour than having them all stealable. Since inserting 256 multicast filters takes a long time and can lead to MCDI state machine timeouts, just skip the mc_list insert in this overflow condition. Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 69a07f1803f33a70a8270521bdbd1b43fda47992 Merge: 2f0ba79 19678ff Author: Rafael J. Wysocki Date: Thu Apr 6 01:27:21 2017 +0200 Merge back cpufreq changes for v4.12. commit deeb1e902fbc6d6858bdfef87fd546c6f048b09b Author: Mauro Carvalho Chehab Date: Tue Apr 4 21:42:54 2017 -0700 Input: use svg files instead of xfig in force feedback documentation Now that the images got converted to svg, add them at the ff.rst file. NOTE: After merging upstream, the "figure" tag should be replaced by the new "kernel-figure" tag, in order for the SVG images to be included at the PDF files. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/ff.rst | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit b1abcdea6a4f13844088a11c1342fda29b78f660 Author: Mauro Carvalho Chehab Date: Tue Apr 4 21:44:14 2017 -0700 Input: docs - convert interactive.fig from xfig to svg We're using svg as the standard format for vectorial images. Convert it to .svg, in a way that it is easily editable. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/interactive.fig | 42 ------------------------------------- Documentation/input/interactive.svg | 24 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 42 deletions(-) commit dcf003bc3f29c206288603b509503e35dafcf3ac Author: Mauro Carvalho Chehab Date: Tue Apr 4 21:43:18 2017 -0700 Input: docs - convert shape.fig from xfig to svg We're using svg as the standard format for vectorial images. Convert shape.fig to .svg, in a way that it is easily editable. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/shape.fig | 65 ------------------------------------------- Documentation/input/shape.svg | 39 ++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 65 deletions(-) commit e2ba573120feadfb365467f0cdae2918926efabc Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:51:04 2017 -0700 Input: create a book with Linux Input documentation Now that all files under Documentation/input follows the ReST markup language, rename them to *.rst and create a book for the Linux Input subsystem. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/conf.py | 2 + Documentation/input/alps.rst | 387 ++++++++++++ Documentation/input/alps.txt | 387 ------------ Documentation/input/amijoy.rst | 263 ++++++++ Documentation/input/amijoy.txt | 263 -------- Documentation/input/appletouch.rst | 94 +++ Documentation/input/appletouch.txt | 94 --- Documentation/input/atarikbd.rst | 820 ++++++++++++++++++++++++ Documentation/input/atarikbd.txt | 820 ------------------------ Documentation/input/bcm5974.rst | 70 +++ Documentation/input/bcm5974.txt | 70 --- Documentation/input/cd32.rst | 24 + Documentation/input/cd32.txt | 24 - Documentation/input/cma3000_d0x.rst | 139 +++++ Documentation/input/cma3000_d0x.txt | 139 ----- Documentation/input/conf.py | 10 + Documentation/input/cs461x.rst | 49 ++ Documentation/input/cs461x.txt | 49 -- Documentation/input/edt-ft5x06.rst | 54 ++ Documentation/input/edt-ft5x06.txt | 54 -- Documentation/input/elantech.rst | 841 +++++++++++++++++++++++++ Documentation/input/elantech.txt | 841 ------------------------- Documentation/input/event-codes.rst | 404 ++++++++++++ Documentation/input/event-codes.txt | 404 ------------ Documentation/input/ff.rst | 257 ++++++++ Documentation/input/ff.txt | 257 -------- Documentation/input/gamepad.rst | 191 ++++++ Documentation/input/gamepad.txt | 191 ------ Documentation/input/gameport-programming.rst | 222 +++++++ Documentation/input/gameport-programming.txt | 222 ------- Documentation/input/gpio-tilt.rst | 103 +++ Documentation/input/gpio-tilt.txt | 103 --- Documentation/input/iforce-protocol.rst | 381 +++++++++++ Documentation/input/iforce-protocol.txt | 381 ----------- Documentation/input/index.rst | 77 +++ Documentation/input/input-programming.rst | 305 +++++++++ Documentation/input/input-programming.txt | 305 --------- Documentation/input/input.rst | 292 +++++++++ Documentation/input/input.txt | 312 ---------- Documentation/input/joystick-api.rst | 326 ++++++++++ Documentation/input/joystick-api.txt | 326 ---------- Documentation/input/joystick-parport.rst | 574 +++++++++++++++++ Documentation/input/joystick-parport.txt | 574 ----------------- Documentation/input/joystick.rst | 631 +++++++++++++++++++ Documentation/input/joystick.txt | 631 ------------------- Documentation/input/multi-touch-protocol.rst | 410 ++++++++++++ Documentation/input/multi-touch-protocol.txt | 410 ------------ Documentation/input/notifier.rst | 54 ++ Documentation/input/notifier.txt | 54 -- Documentation/input/ntrig.rst | 137 ++++ Documentation/input/ntrig.txt | 137 ---- Documentation/input/rotary-encoder.rst | 128 ++++ Documentation/input/rotary-encoder.txt | 128 ---- Documentation/input/sentelic.rst | 901 +++++++++++++++++++++++++++ Documentation/input/sentelic.txt | 901 --------------------------- Documentation/input/userio.rst | 85 +++ Documentation/input/userio.txt | 85 --- Documentation/input/walkera0701.rst | 128 ++++ Documentation/input/walkera0701.txt | 128 ---- Documentation/input/xpad.rst | 242 +++++++ Documentation/input/xpad.txt | 242 ------- Documentation/input/yealink.rst | 238 +++++++ Documentation/input/yealink.txt | 238 ------- MAINTAINERS | 4 +- 64 files changed, 8841 insertions(+), 8772 deletions(-) commit 1ad1473f65da8e61120e8f1b68bc92f2b71ba879 Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:50:20 2017 -0700 Input: yealink - convert documentation into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/yealink.txt | 164 +++++++++++++++++++++++----------------- 1 file changed, 93 insertions(+), 71 deletions(-) commit 3f0a2975788df13d3d6d3cffab52482064201099 Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:49:51 2017 -0700 Input: xpad - convert documentation into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/xpad.txt | 126 ++++++++++++++++++++++++------------------- 1 file changed, 71 insertions(+), 55 deletions(-) commit de3d27fc2badd4f2a992da5ff7f8bba3937016fe Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:49:22 2017 -0700 Input: walkera0701 - convert documentation into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/walkera0701.txt | 51 +++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 16 deletions(-) commit 730518f2c4daf6ca90f939af9b18c8d21adee977 Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:48:53 2017 -0700 Input: userio - convert documentation into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/userio.txt | 79 +++++++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 32 deletions(-) commit 9dc500a3251c240c7f2ccd793304125d869824a5 Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:48:24 2017 -0700 Input: sentelic - convert documentation into ReST format This file has its own particular format that doesn't match any markup one. Manually change it to get something that would be readable using ReST markup language. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/sentelic.txt | 1008 ++++++++++++++++++++------------------ 1 file changed, 518 insertions(+), 490 deletions(-) commit 42f2309bbaab1a033c4f66b893f01e4fc95fdd22 Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:47:55 2017 -0700 Input: rotary-encoder - convert documentation into to ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/rotary-encoder.txt | 84 +++++++++++++++++----------------- 1 file changed, 43 insertions(+), 41 deletions(-) commit 7b11fdc39feae7abce7b47a54e3880ad2d392345 Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:47:27 2017 -0700 Input: ntrig - convert documentation into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/ntrig.txt | 49 ++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 19 deletions(-) commit 2f438935561cc24caf839a9fb07f4ee51b8acd2f Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:47:00 2017 -0700 Input: convert keyboard notifier docs into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/notifier.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit eba31a3af9707bf5445f6d46fb7bff35086f16d3 Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:46:28 2017 -0700 Input: convert multi-touch protocol spec into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/multi-touch-protocol.txt | 200 +++++++++++++-------------- 1 file changed, 96 insertions(+), 104 deletions(-) commit c8ae270e0eebe0030623ec671bb68358fc641ffc Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:45:49 2017 -0700 Input: joystick-parport - convert documentation into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/joystick-parport.txt | 764 ++++++++++++++++--------------- 1 file changed, 398 insertions(+), 366 deletions(-) commit 89237c427b8ba33ee5976b97debeefa2418f8fb7 Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:45:05 2017 -0700 Input: joystick - convert documentation into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/joystick.txt | 553 +++++++++++++++++++++------------------ 1 file changed, 299 insertions(+), 254 deletions(-) commit 0498b4b40003106a2b4d40a95b9b1371b640d75e Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:44:38 2017 -0700 Input: convert joystick-api doc into ReST format This file require some adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/joystick-api.txt | 138 +++++++++++++++++++---------------- 1 file changed, 75 insertions(+), 63 deletions(-) commit 1c4ada609d6a0b9ddd4621cef6ac57790289ff4f Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:44:04 2017 -0700 Input: convert input-programming doc into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/input-programming.txt | 265 +++++++++++++++--------------- 1 file changed, 134 insertions(+), 131 deletions(-) commit f863995224da8e63e8703ca9eb0b2e29d93f5d66 Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:43:09 2017 -0700 Input: iforce - convert documentation into ReST format This file seems to be using some other markup language, (maybe mediawiki?). Manually convert it to ReST markup, with is the one we're using along the Kernel documentaiton. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/iforce-protocol.txt | 495 ++++++++++++++++++++------------ 1 file changed, 309 insertions(+), 186 deletions(-) commit 0119184986e7ff67c4aae17a28ebee68e25b04c4 Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:42:27 2017 -0700 Input: gpio-tilt - convert documentation into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/gpio-tilt.txt | 146 +++++++++++++++++++------------------- 1 file changed, 73 insertions(+), 73 deletions(-) commit 9b0ce690ff0516956b9fa200f626f74455cf9e86 Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:41:40 2017 -0700 Input: convert gameport programming documentation into ReST format This file require minimum adjustments to be a valid ReST. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/gameport-programming.txt | 83 ++++++++++++++++++++-------- 1 file changed, 59 insertions(+), 24 deletions(-) commit 5c631b7130c63bb623d44cb0a7fc332728798146 Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:40:41 2017 -0700 Input: convert gamepad specification into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/gamepad.txt | 94 +++++++++++++++++++++++++++-------------- 1 file changed, 63 insertions(+), 31 deletions(-) commit 3057d509807b759aa5c41122f605c4f8666ae9be Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:40:14 2017 -0700 Input: convert force feedback documentation into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/ff.txt | 188 +++++++++++++++++++++++++++------------------ 1 file changed, 112 insertions(+), 76 deletions(-) commit acbdca8bf162f7d5bbec89778dbbefd29badf57b Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:39:30 2017 -0700 Input: convert event codes documentation into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Peter Hutterer Signed-off-by: Dmitry Torokhov Documentation/input/event-codes.txt | 132 +++++++++++++++++++++++++----------- 1 file changed, 92 insertions(+), 40 deletions(-) commit 604aed61303b88fdf67e56c338d950fe4a8da5c2 Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:38:54 2017 -0700 Input: elantech - convert documentation into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. We opted to remove section numbers, as this can be automatically generated on Sphinx, by using :numbered: tag at index. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/elantech.txt | 306 +++++++++++++++++++++------------------ 1 file changed, 165 insertions(+), 141 deletions(-) commit c87d64654da1ea64bafc38020c9453ba28fa086d Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:37:32 2017 -0700 Input: cs461x - convert documentation into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/cs461x.txt | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 4d0f48661510f7d82e7fb4734becf613b415cf17 Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:37:03 2017 -0700 Input: cma3000_d0x - convert documentation into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/cma3000_d0x.txt | 72 ++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 24 deletions(-) commit f6e390d9f3e0b4370761a57d101e56b605a6cd7d Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:35:09 2017 -0700 Input: db9/CD32 - convert documentation into ReST format Currently, it misses a title, and the table is not valid for ReST. Adjust them, in order for it to be able to parse on Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/cd32.txt | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit 60874a79e5535939151bf07a87f887339cfa326c Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:34:28 2017 -0700 Input: bcm5974 - convert documentation into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/bcm5974.txt | 43 +++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 19 deletions(-) commit 3f89482e7a9f24bedc1efee56bced94e8f759419 Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:32:51 2017 -0700 Input: atarikbd - convert documentation into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. We opted to remove section numbers, as this can be automatically generated on Sphinx, by using :numbered: tag at index. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/atarikbd.txt | 225 +++++++++++++++++++++++++++++---------- 1 file changed, 168 insertions(+), 57 deletions(-) commit ad6bdccffbf8abcaad3cec7195f3b370a2297c1a Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:32:22 2017 -0700 Input: appletouch - convert documentation into ReST format This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/appletouch.txt | 45 +++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 18 deletions(-) commit 691d8706fa2f8b58814942b6a8689409e203923b Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:31:40 2017 -0700 Input: amijoy - convert documentation into ReST format This file contains lots of tables, but none formatted using the ReST syntax. Adjust them to match the ReST syntax and add a title for the document. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/amijoy.txt | 179 +++++++++++++++++++++++++++++------------ 1 file changed, 129 insertions(+), 50 deletions(-) commit 84ce6faf2d27d8e639a2019aa2bb136d0540521a Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:30:06 2017 -0700 Input: ALPS - convert documentation into ReST format Turn ALPS documentation into a valid ReST file, so it could be parsed with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/alps.txt | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) commit b0f355f300377fbe5492567f722eaf704a6ec36b Author: Mauro Carvalho Chehab Date: Tue Apr 4 17:29:06 2017 -0700 Input: docs - convert input.txt into ReST format This file require minimum adjustments to be a valid ReST. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov Documentation/input/input.txt | 240 +++++++++++++++++++++++------------------- 1 file changed, 131 insertions(+), 109 deletions(-) commit 7e1621de146fbed6172252f14a6a41b2c5999a93 Author: Takashi Sakamoto Date: Mon Apr 3 21:13:55 2017 +0900 ALSA: firewire-lib/bebob/oxfw: improve response evaluation for AV/C commands In ALSA firewire stack, some AV/C commands are supported, including vendor's extensions. Drivers includes response parser of each command, according to its requirements, while the parser is written with loose fashion in two points; error check and length check. This doesn't cause any issues such as kernel corruption, but should be improved. This commit modifies evaluations of return value on each parsers. Reported-by: Dan Carpenter Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/bebob/bebob_command.c | 30 ++++++++++++++++++++++-------- sound/firewire/fcp.c | 12 +++++++++--- sound/firewire/oxfw/oxfw-command.c | 12 +++++++++--- 3 files changed, 40 insertions(+), 14 deletions(-) commit 2f65ec0567f77b75f459c98426053a3787af356a Author: Christophe JAILLET Date: Sun Feb 19 14:30:22 2017 -0300 [media] s5p-g2d: Fix error handling According to the surrounding goto, it is likely that 'unprep_clk_gate' was expected here. Signed-off-by: Christophe JAILLET Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-g2d/g2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d251510d4c2b6ffa42dfe6c270e1965daa23eca6 Author: Marek Szyprowski Date: Wed Mar 22 07:34:28 2017 -0300 [media] s5p-mfc: Don't allocate codec buffers from pre-allocated region Further investigation revealed that codec buffers also don't need to be allocated at higher addresses than firmware base for MFC v6+ hardware. Those buffers can be quite large and its size depends on the selected format and framesize. This patch changes the way the codec buffers are allocated - driver will use generic allocator for them instead of the pre-allocated buffer for firmware and contexts. Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc_opr.c | 28 +++++++++++++++++++++++++ drivers/media/platform/s5p-mfc/s5p_mfc_opr.h | 4 ++++ drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 4 ++-- 3 files changed, 34 insertions(+), 2 deletions(-) commit 5b33504bada4d85092b69b3aaa7048c398b21dbb Author: Takashi Sakamoto Date: Mon Apr 3 21:13:50 2017 +0900 ALSA: firewire-motu: remove invalid bitshift for register value In protocol version 3, drivers can read current sampling clock status from register 0x'ffff'f000'0b14. 8 bits of LSB of this register represents type of signal as source of clock. Current driver code includes invalid bitshift to handle the parameter. This commit fixes the bug. Reported-by: Dan Carpenter Fixes: 5992e30034c4 ("ALSA: firewire-motu: add support for MOTU 828mk3 (FireWire/Hybrid) as a model with protocol version 3") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu-protocol-v3.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a5cb00eb4223458250b55daf03ac7ea5f424d601 Author: Marek Szyprowski Date: Wed Mar 22 04:53:57 2017 -0300 [media] s5p-mfc: Fix unbalanced call to clock management Clock should be turned off after calling s5p_mfc_init_hw() from the watchdog worker, like it is already done in the s5p_mfc_open() which also calls this function. Fixes: af93574678108 ("[media] MFC: Add MFC 5.1 V4L2 driver") Signed-off-by: Marek Szyprowski Cc: stable@vger.kernel.org # v3.7+ Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 1 + 1 file changed, 1 insertion(+) commit 5ea289febdc41389da49acdecfc59cc07800f4d6 Author: Marek Szyprowski Date: Mon Mar 20 07:49:24 2017 -0300 [media] s5p-mfc: Rename BANK1/2 to BANK_L/R to better match documentation Documentation for MFC hardware still uses 'left' and 'right' names for the memory channel/banks, so replace BANK1/2 defines with more appropriate BANK_L/R names. Suggested-by: Shuah Khan Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 54 ++++++++++++------------- drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 4 +- drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | 13 +++--- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 8 ++-- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 10 ++--- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | 28 ++++++------- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 6 +-- 7 files changed, 62 insertions(+), 61 deletions(-) commit 60641e22599a61b8f0356aa8c3755ea26f17a62b Author: Marek Szyprowski Date: Mon Feb 13 08:58:14 2017 -0200 [media] s5p-mfc: Use preallocated block allocator always for MFC v6+ It turned out that all versions of MFC v6+ hardware doesn't have a strict requirement for ALL buffers to be allocated on higher addresses than the firmware base like it was documented for MFC v5. This requirement is true only for the device and per-context buffers. All video data buffers can be allocated anywhere for all MFC v6+ versions. Basing on this fact, the special DMA configuration based on two reserved memory regions is not really needed for MFC v6+ devices, because the memory requirements for the firmware, device and per-context buffers can be fulfilled by the simple probe-time pre-allocated block allocator introduced in previous patch. This patch enables support for such pre-allocated block based allocator always for MFC v6+ devices. Due to the limitations of the memory management subsystem the largest supported size of the pre-allocated buffer when no CMA (Contiguous Memory Allocator) is enabled is 4 MiB. This patch also removes the requirement to provide two reserved memory regions for MFC v6+ devices in device tree. Now the driver is fully functional without them. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Acked-by: Andrzej Hajda Tested-by: Smitha T Murthy Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/s5p-mfc.txt | 2 +- drivers/media/platform/s5p-mfc/s5p_mfc.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) commit fdb2b2eee6bc33f4dcb1b05176e3008a4e494612 Author: Takashi Sakamoto Date: Sun Apr 2 23:48:27 2017 +0900 ALSA: firewire-digi00x: remove transaction handler for unknown purpose For digi00x series, asynchronous transaction is not used to transfer MIDI messages to/from control surface. One of transction handlers in my previous work loses its practical meaning. This commit removes the handler. I note that unit of console type transfers 0x00001000 to registered address of host space when switching to 'standalone' mode. Then the unit generates bus reset. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/digi00x/digi00x-transaction.c | 88 +++++----------------------- sound/firewire/digi00x/digi00x.h | 6 +- 2 files changed, 17 insertions(+), 77 deletions(-) commit 0c3f15f39cfd7697e0c4979a85fef1a3c3d17248 Author: Takashi Sakamoto Date: Sun Apr 2 23:48:26 2017 +0900 ALSA: firewire-digi00x: allow user space applications to read/write MIDI messages for all ports At a commit c5fcee0373b3 ("ALSA: firewire-digi00x: add MIDI operations for MIDI control port"), I described that MIDI messages for control surface is transferred by a different way from the messages for physical ports. However, this is wrong. MIDI messages to/from all of MIDI ports are transferred by isochronous packets. This commit removes codes to transfer MIDI messages via asynchronous transaction, from MIDI handling layer. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/digi00x/digi00x-midi.c | 208 +++++++++++++--------------------- 1 file changed, 79 insertions(+), 129 deletions(-) commit 8820a4cf0cb4cd5c6540a9a18b2cedbdfd5a6891 Author: Takashi Sakamoto Date: Sun Apr 2 23:48:25 2017 +0900 ALSA: firewire-digi00x: handle all MIDI messages on streaming packets At a commit 9dc5d31cdceb ("ALSA: firewire-digi00x: handle MIDI messages in isochronous packets"), a functionality to handle MIDI messages on isochronous packet was supported. But this includes some of my misunderstanding. This commit is to fix them. For digi00x series, first data channel of data blocks in rx/tx packet includes MIDI messages. The data channel has 0x80 in 8 bit of its MSB, however it's against IEC 61883-6. Unique data format is applied: - Upper 4 bits of LSB represent port number. - 0x0: port 1. - 0x2: port 2. - 0xe: console port. - Lower 4 bits of LSB represent the number of included MIDI message bytes; 0x0/0x1/0x2. - Two bytes of middle of this data channel have MIDI bytes. Especially, MIDI messages from/to console surface are also transferred by isochronous packets, as well as physical MIDI ports. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/digi00x/amdtp-dot.c | 55 +++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 18 deletions(-) commit 13e005f9f933a35b5e55c9d36f151efe2a8383ec Author: Takashi Sakamoto Date: Sun Apr 2 23:48:24 2017 +0900 ALSA: firewire-digi00x: add support for console models of Digi00x series Digi00x series includes two types of unit; rack and console. As long as reading information on config rom of Digi 002 console, 'MODEL_ID' field has a different value from the one on Digi 002 rack. We've already got a test report from users with Digi 003 rack. We can assume that console type and rack type has different value in the field. This commit adds a device entry for console type. For following commits, this commit also adds a member to 'struct snd_digi00x' to identify console type. $ cd linux-firewire-utils/src $ python2 ./crpp < /sys/bus/firewire/devices/fw1/config_rom ROM header and bus information block ----------------------------------------------------------------- 400 0404f9d0 bus_info_length 4, crc_length 4, crc 63952 404 31333934 bus_name "1394" 408 60647002 irmc 0, cmc 1, isc 1, bmc 0, cyc_clk_acc 100, max_rec 7 (256) 40c 00a07e00 company_id 00a07e | 410 00a30000 device_id 0000a30000 | EUI-64 00a07e0000a30000 root directory ----------------------------------------------------------------- 414 00058a39 directory_length 5, crc 35385 418 0c0043a0 node capabilities 41c 04000001 hardware version 420 0300a07e vendor 424 81000007 --> descriptor leaf at 440 428 d1000001 --> unit directory at 42c unit directory at 42c ----------------------------------------------------------------- 42c 00046674 directory_length 4, crc 26228 430 120000a3 specifier id 434 13000001 version 438 17000001 model 43c 81000007 --> descriptor leaf at 458 descriptor leaf at 440 ----------------------------------------------------------------- 440 00055913 leaf_length 5, crc 22803 444 000050f2 descriptor_type 00, specifier_ID 50f2 448 80000000 44c 44696769 450 64657369 454 676e0000 descriptor leaf at 458 ----------------------------------------------------------------- 458 0004a6fd leaf_length 4, crc 42749 45c 00000000 textual descriptor 460 00000000 minimal ASCII 464 44696769 "Digi" 468 20303032 " 002" Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/digi00x/digi00x.c | 13 +++++++++++-- sound/firewire/digi00x/digi00x.h | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) commit 76fdb3a9e13a781df8bf8652312f6a7cbf5e2f43 Author: Takashi Sakamoto Date: Fri Mar 31 22:06:12 2017 +0900 ALSA: fireface: add support for Fireface 400 Fireface 400 is a second model of RME Fireface series, released in 2006. This commit adds support for this model. This model supports 8 analog channels, 2 S/PDIF channels and 8 ADAT channels in both of tx/rx packet. The number of ADAT channels differs depending on each mode of sampling transmission frequency. $ python2 linux-firewire-utils/src/crpp < /sys/bus/firewire/devices/fw1/config_rom ROM header and bus information block ----------------------------------------------------------------- 400 04107768 bus_info_length 4, crc_length 16, crc 30568 (should be 61311) 404 31333934 bus_name "1394" 408 20009002 irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 0, max_rec 9 (1024) 40c 000a3501 company_id 000a35 | 410 1bd0862a device_id 011bd0862a | EUI-64 000a35011bd0862a root directory ----------------------------------------------------------------- 414 000485ec directory_length 4, crc 34284 418 03000a35 vendor 41c 0c0083c0 node capabilities per IEEE 1394 420 8d000006 --> eui-64 leaf at 438 424 d1000001 --> unit directory at 428 unit directory at 428 ----------------------------------------------------------------- 428 000314c4 directory_length 3, crc 5316 42c 12000a35 specifier id 430 13000002 version 434 17101800 model eui-64 leaf at 438 ----------------------------------------------------------------- 438 000261a8 leaf_length 2, crc 25000 43c 000a3501 company_id 000a35 | 440 1bd0862a device_id 011bd0862a | EUI-64 000a35011bd0862a Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/Kconfig | 1 + sound/firewire/fireface/Makefile | 2 +- sound/firewire/fireface/ff-protocol-ff400.c | 371 ++++++++++++++++++++++++++++ sound/firewire/fireface/ff.c | 21 ++ sound/firewire/fireface/ff.h | 2 + 5 files changed, 396 insertions(+), 1 deletion(-) commit f656edd5fb33d889561978b81ec2897087c2f4ca Author: Takashi Sakamoto Date: Fri Mar 31 22:06:11 2017 +0900 ALSA: fireface: add hwdep interface This commit adds hwdep interface so as the other drivers for audio and music units on IEEE 1394 have. This interface is designed for mixer/control applications. By using this interface, an application can get information about firewire node, can lock/unlock kernel streaming and can get notification at starting/stopping kernel streaming. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai include/uapi/sound/asound.h | 3 +- include/uapi/sound/firewire.h | 2 +- sound/firewire/Kconfig | 1 + sound/firewire/fireface/Makefile | 2 +- sound/firewire/fireface/ff-hwdep.c | 191 ++++++++++++++++++++++++++++++++++++ sound/firewire/fireface/ff-pcm.c | 20 +++- sound/firewire/fireface/ff-stream.c | 39 ++++++++ sound/firewire/fireface/ff.c | 5 + sound/firewire/fireface/ff.h | 13 +++ 9 files changed, 270 insertions(+), 6 deletions(-) commit 4b316436ab2e0b74e4986fc66b7cd7902cfd7054 Author: Takashi Sakamoto Date: Fri Mar 31 22:06:10 2017 +0900 ALSA: fireface: add support for PCM functionality This commit adds PCM functionality to transmit/receive PCM frames on isochronous packet streaming. This commit enables userspace applications to start/stop packet streaming via ALSA PCM interface. Sampling rate requested by applications is used as sampling transmission frequency of IEC 61883-1/6packet streaming. As I described in followed commits, units in this series manages sampling clock frequency independently of sampling transmission frequency, and they supports resampling between their packet streaming/data block processing layer and sampling data processing layer. This commit take this driver to utilize these features for usability. When internal clock is selected as source signal of sampling clock, this driver allows user space applications to start PCM substreams at any rate which packet streaming engine supports as sampling transmission frequency. In this case, this driver expects units to perform resampling PCM frames for rx/tx packets when sampling clock frequency and sampling transmission frequency are mismatched. This is for daily use cases. When any external clock is selected as the source signal, this driver gets configured sampling rate from units, then restricts available sampling rate to the rate for PCM applications. This is for studio use cases. Models in this series supports 64.0/128.0 kHz of sampling rate, however these frequencies are not supported by IEC 61883-6 as sampling transmission frequency. Therefore, packet streaming engine of ALSA firewire stack can't handle them. When units are configured to use any external clock as source signal of sampling clock and one of these unsupported rate is configured as rate of the sampling clock, this driver returns EIO to user space applications. Anyway, this driver doesn't voluntarily configure parameters of sampling clock. It's better for users to work with appropriate user space implementations to configure the parameters in advance of usage. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/Makefile | 2 +- sound/firewire/fireface/ff-pcm.c | 395 +++++++++++++++++++++++++++++++++++++++ sound/firewire/fireface/ff.c | 4 + sound/firewire/fireface/ff.h | 4 + 4 files changed, 404 insertions(+), 1 deletion(-) commit 75d6d898977830d6d789083bf0a63ea6826124c8 Author: Takashi Sakamoto Date: Fri Mar 31 22:06:09 2017 +0900 ALSA: fireface: add stream management functionality This commit adds management functionality for packet streaming. As long as investigating Fireface 400, there're three modes depending on sampling transmission frequency. The number of data channels in each data block is different depending on the mode. The set of available data channels for each mode might be different for each protocol and model. The length of registers for the number of isochronous channel is just three bits, therefore 0-7ch are available. When bus reset occurs on IEEE 1394 bus, the device discontinues to transmit packets. This commit aborts PCM substreams at bus reset handler. As I described in followed commits, The device manages its sampling clock independently of sampling transmission frequency against IEC 61883-6. Thus, it's a lower cost to change the sampling transmission frequency, while data fetch between streaming layer and DSP require larger buffer for resampling. As a result, device latency might tend to be larger than ASICs for IEC 61883-1/6 such as DM1000/DM1100/DM1500 (BeBoB), DiceII/TCD2210/TCD2220/TCD3070 and OXFW970/971. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/Makefile | 3 +- sound/firewire/fireface/ff-stream.c | 243 ++++++++++++++++++++++++++++++++++++ sound/firewire/fireface/ff.c | 9 ++ sound/firewire/fireface/ff.h | 13 ++ 4 files changed, 267 insertions(+), 1 deletion(-) commit 6fb7db902bbe6358b39f359b917f10e3c923058c Author: Takashi Sakamoto Date: Fri Mar 31 22:06:08 2017 +0900 ALSA: fireface: add unique data processing layer As long as investigating Fireface 400, format of payload of each isochronous packet is not IEC 61883-1/6, thus its format of data block is not AM824. The remarkable points of the format are: * The payload just consists of some data channels of quadlet size without CIP header. * Each data channels includes data aligned to little endian order. * One data channel consists of two parts; 8 bit ancillary field and 24 bit PCM frame. Due to lack of CIP headers, rx/tx packets include no CIP headers and different way to check packet discontinuity. For tx packet, the ancillary field is used for counter. However, the way of counting is different depending on positions of data channels. At 44.1 kHz, ancillary field in: * 1st/6th/9th/10th/14th/17th data channels: not used for this purpose. * 2nd/18th data channels: incremented every data block (0x00-0xff). * 3rd/4th/5th/11th/12th/13th data channels: incremented every 256 data blocks (0x00-0x07). * 7th/8th/15th/16th data channels: incremented per the number of data blocks in a packet. The increment can occur per packet (0x00-0xff). For tx packet, tag of each isochronous packet is used for this purpose. The value of tag cyclically changes between 0, 1, 2 and 3 in this order. The interval is different depending on sampling transmission frequency. At 44.1/48.0 kHz, it's 256 data blocks. At 88.2 kHz, it's 96 data blocks. The number of data blocks in tx packet is exactly the same as SYT_INTERVAL. There's no empty packet or no-data packet, thus the throughput is not 8,000 packets per sec. On the other hand, the one in rx packet is 8,000 packets per sec, thus the number of data blocks is different between each packet, depending on sampling transmission frequency: * 44.1 kHz: 5 or 6 * 48.0 kHz: 5 or 6 or 7 * 88.2 kHz: 10 or 11 or 12 This commit adds data processing layer to satisfy the above specification in a policy of 'best effort'. Although PCM frames are handled for intermediate buffer to user space, the ancillary data is not handled at all to reduce CPU usage, thus counter is not checked. 0 is always used for tag of isochronous packet. Furthermore, the packet streaming layer is responsible for calculation of the number of data blocks for each packet, thus it's not exactly the same sequence from the above observation. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/Makefile | 2 +- sound/firewire/fireface/amdtp-ff.c | 155 +++++++++++++++++++++++++++++++++++++ sound/firewire/fireface/ff.h | 8 ++ 3 files changed, 164 insertions(+), 1 deletion(-) commit 3b196c394dd9f8f34064f5814bb287757c80ee35 Author: Takashi Sakamoto Date: Fri Mar 31 22:06:07 2017 +0900 ALSA: firewire-lib: add no-header packet processing As long as investigating Fireface 400, IEC 61883-1/6 is not applied to its packet streaming protocol. Remarks of the specific protocol are: * Each packet doesn't include CIP headers. * 64,0 and 128,0 kHz are supported. * The device doesn't necessarily transmit 8,000 packets per second. * 0, 1, 2, 3 are used as tag for rx isochronous packets, however 0 is used for tx isochronous packets. On the other hand, there's a common feature. The number of data blocks transferred in a second is the same as sampling transmission frequency. Current ALSA IEC 61883-1/6 engine already has a method to calculate it and this driver can utilize it for rx packets, as well as tx packets. This commit adds support for the transferring protocol. CIP_NO_HEADERS flag is newly added. When this flag is set: * Both of 0 (without CIP header) and 1 (with CIP header) are used as tag to handle incoming isochronous packet. * 0 (without CIP header) is used as tag to transfer outgoing isochronous packet. * Skip CIP header evaluation. * Use unique way to calculate the quadlets of isochronous packet payload. In ALSA PCM interface, 128.0 kHz is not supported, and the ALSA IEC 61883-1/6 engine doesn't support 64.0 kHz. These modes are dropped. The sequence of rx packet has a remarkable quirk about tag. This will be described in later commits. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 80 ++++++++++++++++++++++++++++++++++++++++--- sound/firewire/amdtp-stream.h | 6 ++++ 2 files changed, 81 insertions(+), 5 deletions(-) commit ff0fb5aaa8799701aa01bd1f2cdaf93ce98bbe60 Author: Takashi Sakamoto Date: Fri Mar 31 22:06:06 2017 +0900 ALSA: firewire-lib: use the same prototype for functions to handle packet Audio and music units of RME Fireface series use its own protocol for isochronous packets to transfer data. This protocol requires ALSA IEC 61883-1/6 engine to have alternative functions. This commit is a preparation for the protocol. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream-trace.h | 6 +++--- sound/firewire/amdtp-stream.c | 31 ++++++++++++++++--------------- 2 files changed, 19 insertions(+), 18 deletions(-) commit d3fc7aac11dc54f97f4f28c60a489a555529fa1c Author: Takashi Sakamoto Date: Fri Mar 31 22:06:05 2017 +0900 ALSA: fireface: add proc node to help debugging Drivers can retrieve the state and configuration of clock by read transactions. This commit allows protocol abstraction layer to to dump the information for debugging, via proc interface. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/Makefile | 2 +- sound/firewire/fireface/ff-proc.c | 63 +++++++++++++++++++++++++++++++++++++++ sound/firewire/fireface/ff.c | 2 ++ sound/firewire/fireface/ff.h | 2 ++ 4 files changed, 68 insertions(+), 1 deletion(-) commit ff2c293efaf43feb120f6b166891e5eca0cf3ccc Author: Takashi Sakamoto Date: Fri Mar 31 22:06:04 2017 +0900 ALSA: fireface: add support for MIDI functionality In previous commit, fireface driver supports unique transaction mechanism for MIDI feature. This commit adds MIDI functionality for userspace applications. As I wrote in a followed commit, user space applications get some requirement from this driver. It should not touch a register to which units transmit MIDI messages. It should configure a register in which MIDI transmission is controlled. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/Makefile | 2 +- sound/firewire/fireface/ff-midi.c | 131 ++++++++++++++++++++++++++++++++++++++ sound/firewire/fireface/ff.c | 5 ++ sound/firewire/fireface/ff.h | 3 + 4 files changed, 140 insertions(+), 1 deletion(-) commit 19174295788de77dd58dc6060b0d1bcfda21625e Author: Takashi Sakamoto Date: Fri Mar 31 22:06:03 2017 +0900 ALSA: fireface: add transaction support As long as investigating Fireface 400, MIDI messages are transferred by asynchronous communication over IEEE 1394 bus. Fireface 400 receives MIDI messages by write transactions to two addresses; 0x'0000'0801'8000 and 0x'0000'0801'9000. Each of two seems to correspond to MIDI port 1 and 2. Fireface 400 transfers MIDI messages by write transactions to certain addresses which configured by drivers. The drivers can decide upper 4 byte of the addresses by write transactions to 0x'0000'0801'03f4. For the rest part of the address, drivers can select from below options: * 0x'0000'0000 * 0x'0000'0080 * 0x'0000'0100 * 0x'0000'0180 Selected options are represented in register 0x'0000'0801'051c as bit flags. Due to this mechanism, drivers are restricted to use addresses on 'Memory space' of IEEE 1222, even if transactions to the address have some side effects. This commit adds transaction support for MIDI messaging, based on my assumption that the similar mechanism is used on the other protocols. To receive asynchronous transactions, the driver allocates a range of address in 'Memory space'. I apply a strategy to use 0x'0000'0000 as lower 4 byte of the address. When getting failure from Linux FireWire subsystem, this driver retries to allocate addresses. Unfortunately, read transaction to address 0x'0000'0801'051c returns zero always, however write transactions have effects to the other features such as status of sampling clock. For this reason, this commit delegates a task to configure this register to user space applications. The applications should set 3rd bit in LSB in little endian order. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/Makefile | 2 +- sound/firewire/fireface/ff-transaction.c | 295 +++++++++++++++++++++++++++++++ sound/firewire/fireface/ff.c | 9 + sound/firewire/fireface/ff.h | 23 +++ 4 files changed, 328 insertions(+), 1 deletion(-) commit 53eb086750f3535eeb70eb177b0fa89d458f1479 Author: Takashi Sakamoto Date: Fri Mar 31 22:06:02 2017 +0900 ALSA: fireface: add an abstraction layer for model-specific protocols As of 2016, RME discontinued its Fireface series, thus it's OK for us to focus on released firmwares to drive known units. As long as investigating Fireface 400 with Windows driver and comparing the result to FFADO implementation, I can see these firmwares have different register assignments. On the other hand, according to manuals of each models, features relevant to packet streaming seem to be common, because GUIs for these models have the same options. It's reasonable to assume an abstraction layer of protocols to communicate to each models. This commit adds the abstraction layer for the protocols. This layer includes some functions to operate common features of models in this series. In IEC 61883-1/6, the sequence of packet can transfer timing information to synchronize receivers to transmitters. Units of each node on IEEE 1394 bus can generate transmitter's timing clock by handling value of SYT field in CIP header with high-precision clock. For audio and music units on IEEE 1394 bus, this recovered clock is designed to used for sampling clock to capture/generate PCM frames on DSP/ADC/DAC. (Actually, in this world, there's no units to implement this specification as is, as long as I know). Fireface series doesn't use this mechanism. Besides, It doesn't use isochronous packet with CIP header. It uses internal crystal unit as its initial sampling clock. When detecting input signals which can be available for sampling clock (e.g. ADAT input), drivers can configure units to use the signals as source of sampling clock. When something goes wrong, e.g. frequency mismatching between the signal and configured value, units fallback to the other detected signals alternatively. When detecting no alternatives, internal crystal unit is used as source of sampling clock. On manual of Fireface 400, this mechanism is described as 'Autosync'. On the units, packet streaming is controlled by write transactions to certain registers. Format of the packet, e.g. the number of data channels in a data block, is also configured by the same manner. For this purpose, .begin_session and .finish_session is added. The remarkable point of this protocol is to allow drivers to configure arbitrary sampling transmission frequency; e.g. 12.345 Hz. As long as I know, there's no actual DAC/ADC chips which support this kind of capability. I think a pair of packet streaming layer and data block processing layer is isolated from sampling data processing layer in a point of governed clock. In short, between these parts, resampling layer exists. Actually, for Fireface 400, write transactions to 0x'0000'8010'051c has an effect to change sampling clock frequency with base frequencies (32.0/44.1/48.0 kHz) and its multipliers (x2/x4), regardless of sampling transmission frequency. For this reason, the abstraction layer doesn't handle parameters for sampling clock. Instead, each implementation of .begin_session is expected to configure sampling transmission frequency. For packet streaming layer, it's enough to get current selection of source signals for the sampling clock and its frequency. In the abstraction layer, when internal crystal is selected, drivers can sets arbitrary sampling frequency, else they should follow configured frequency. For this purpose, .get_clock is added. Drivers are allows to bank up data fetching from a pair of packet streaming/data block processing layer and sampling data processing layer. This feature seems to suppress noises at starting/stopping packet streaming. For this purpose, .switch_fetching_mode is added. As I described in the above, units have remarkable mechanism to manage sampling clock and process sampling data. For debugging purpose, .dump_sync_status and .dump_clock_config are added. I don't have a need to common interface to represent the status and configuration, developers can add actual implementation of the abstraction layer as they like. Unlike PCM frames, MIDI messages are transferred by asynchronous communication over IEEE 1394 bus, thus target addresses are important for this feature. The .midi_high_addr_reg, .midi_rx_port_0_reg and .midi_rx_port_1_reg are for this purpose. I'll describe them in following commit. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/ff.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit ed90f91a17112d474909bd820f1bb65a5480959d Author: Takashi Sakamoto Date: Fri Mar 31 22:06:01 2017 +0900 ALSA: fireface: add model specific structure RME Fireface series has several models and their specifications are different. Currently, we find no way to retrieve the specifications from actual devices and need to implement them in this driver. This commit adds a structure to describe model specific data. This structure has an identical name for each unit, and maximum number of data channels in each mode. I'll describe about the mode in following commits. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/ff.c | 9 +++++---- sound/firewire/fireface/ff.h | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) commit 324540c4e05c09c007f9e358cacb30b38f296bcc Author: Takashi Sakamoto Date: Fri Mar 31 22:06:00 2017 +0900 ALSA: fireface: postpone sound card registration Just after appearing on IEEE 1394 bus, this unit generates several bus resets. This is due to loading firmware from on-board flash memory and initialize hardware. It's better to postpone sound card registration. This commit schedules workqueue to process actual probe processing 2 seconds after the last bus-reset. The card instance is kept at unit probe callback and released at card free callback. Therefore, when the actual probe processing fails, the memory block is wasted. This is due to simplify driver implementation. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/ff.c | 84 ++++++++++++++++++++++++++++++++------------ sound/firewire/fireface/ff.h | 5 +++ 2 files changed, 67 insertions(+), 22 deletions(-) commit 17c4e5eadc4ab7db4c0655c124174a6d8e5f4dc5 Author: Takashi Sakamoto Date: Fri Mar 31 22:05:59 2017 +0900 ALSA: fireface: add skeleton for RME Fireface series This commit adds a new driver for RME Fireface series. This commit just creates/removes card instance according to IEEE 1394 bus event. More functions will be added in following commits. Three types of firmware have released by RME GmbH; for Fireface 400, for Fireface 800 and for UCX/802/UFX. It's reasonable that these models use different protocol for communication. Currently, I've investigated Fireface 400 and nothing others. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/Kconfig | 6 +++ sound/firewire/Makefile | 1 + sound/firewire/fireface/Makefile | 2 + sound/firewire/fireface/ff.c | 113 +++++++++++++++++++++++++++++++++++++++ sound/firewire/fireface/ff.h | 28 ++++++++++ 5 files changed, 150 insertions(+) commit 517e1fbeb65f5eade8d14f46ac365db6c75aea9b Author: Laura Abbott Date: Tue Apr 4 14:09:00 2017 -0700 mm/usercopy: Drop extra is_vmalloc_or_module() check Previously virt_addr_valid() was insufficient to validate if virt_to_page() could be called on an address on arm64. This has since been fixed up so there is no need for the extra check. Drop it. Signed-off-by: Laura Abbott Acked-by: Mark Rutland Signed-off-by: Kees Cook mm/usercopy.c | 11 ----------- 1 file changed, 11 deletions(-) commit 8e409f1d06686882c4c48ff04babce0469afe1b6 Author: Marek Szyprowski Date: Mon Feb 13 08:47:51 2017 -0200 [media] s5p-mfc: Remove special configuration of IOMMU domain The main reason for using special configuration of IOMMU domain was the problem with MFC firmware, which failed to operate properly when placed at 0 DMA address. Instead of adding custom code for configuring each variant of IOMMU domain and architecture specific glue code, simply use what arch code provides and if the DMA base address equals zero, skip first 128 KiB to keep required alignment. This patch also make the driver operational on ARM64 architecture, because it no longer depends on ARM specific DMA-mapping and IOMMU glue code functions. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Acked-by: Andrzej Hajda Tested-by: Smitha T Murthy Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 30 +++++++-------- drivers/media/platform/s5p-mfc/s5p_mfc_iommu.h | 51 +------------------------- 2 files changed, 14 insertions(+), 67 deletions(-) commit 25e73b425c34e32d220fc2b06ba4bf9354850400 Author: Marek Szyprowski Date: Mon Feb 13 08:57:11 2017 -0200 [media] s5p-mfc: Add support for probe-time preallocated block based allocator Current MFC driver depends on the fact that when IOMMU is available, the DMA-mapping framework and its IOMMU glue will use first-fit allocator. This was true for ARM architecture, but its not for ARM64 arch. However, in case of MFC v6+ hardware and latest firmware, it turned out that there is no strict requirement for ALL buffers to be allocated on higher addresses than the firmware base. This requirement is true only for the device and per-context buffers. All video data buffers can be allocated anywhere for all MFC v6+ versions. Such relaxed requirements for the memory buffers can be easily fulfilled by allocating firmware, device and per-context buffers from the probe-time preallocated larger buffer. This patch adds support for it. This way the driver finally works fine on ARM64 architecture. The size of the preallocated buffer is 8 MiB, what is enough for three instances H264 decoders or encoders (other codecs have smaller memory requirements). If one needs more for particular use case, one can use "mem" module parameter to force larger (or smaller) buffer (for example by adding "s5p_mfc.mem=16M" to kernel command line). [mchehab@s-opensource.com: fix two checkpatch warnings: don't initialize static to NULL; don't use S_foo permisions] Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Acked-by: Andrzej Hajda Tested-by: Smitha T Murthy Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 43 ++++++++++++++++--- drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 4 ++ drivers/media/platform/s5p-mfc/s5p_mfc_opr.c | 57 ++++++++++++++++--------- 3 files changed, 79 insertions(+), 25 deletions(-) commit 9ce4780380207fa071430da92e9d93f769002231 Author: Marek Szyprowski Date: Mon Feb 20 10:11:42 2017 -0300 [media] s5p-mfc: Split variant DMA memory configuration into separate functions Move code for DMA memory configuration with IOMMU into separate function to make it easier to compare what is being done in each case. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Acked-by: Andrzej Hajda Tested-by: Smitha T Murthy Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 102 ++++++++++++++++++------------- 1 file changed, 61 insertions(+), 41 deletions(-) commit 36fb494139a362dd8082a65941509196e0834ead Author: Marek Szyprowski Date: Thu Feb 9 06:32:17 2017 -0200 [media] s5p-mfc: Reduce firmware buffer size for MFC v6+ variants Firmware for MFC v6+ variants is not larger than 400 KiB, so there is no need to allocate a full 1 MiB buffer for it. Reduce it to 512 KiB to keep proper alignment of allocated buffer. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Acked-by: Andrzej Hajda Tested-by: Smitha T Murthy Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/regs-mfc-v6.h | 2 +- drivers/media/platform/s5p-mfc/regs-mfc-v7.h | 2 +- drivers/media/platform/s5p-mfc/regs-mfc-v8.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit d1ff4e17b24975c5d90671e4dc15ebeb12832f02 Author: Marek Szyprowski Date: Thu Feb 9 05:17:41 2017 -0200 [media] s5p-mfc: Allocate firmware with internal private buffer alloc function Once firmware buffer has been converted to use s5p_mfc_priv_buf structure, it is possible to allocate it with existing s5p_mfc_alloc_priv_buf() function. This change will help to reduce code variants in the next patches. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Acked-by: Andrzej Hajda Tested-by: Smitha T Murthy Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 94eaccc064e076d75235eb5a74ff52a63a21eca0 Author: Marek Szyprowski Date: Wed Feb 8 12:18:54 2017 -0200 [media] s5p-mfc: Move firmware allocation to DMA configure function To complete DMA memory configuration for MFC device, allocation of the firmware buffer is needed, because some parameters are dependant on its base address. Till now, this has been handled in the s5p_mfc_alloc_firmware() function. This patch moves that logic to s5p_mfc_configure_dma_memory() to keep DMA memory related operations in a single place. This way s5p_mfc_alloc_firmware() is simplified and does what it name says. The other consequence of this change is moving s5p_mfc_alloc_firmware() call from the s5p_mfc_probe() function to the s5p_mfc_configure_dma_memory(). Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Acked-by: Andrzej Hajda Tested-by: Smitha T Murthy Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 62 +++++++++++++++++++++------ drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | 31 -------------- 2 files changed, 49 insertions(+), 44 deletions(-) commit ba5d4563c2b8396c6eaa5545aed2b9237201114e Author: Marek Szyprowski Date: Wed Feb 8 10:48:54 2017 -0200 [media] s5p-mfc: Put firmware to private buffer structure Use s5p_mfc_priv_buf structure for keeping the firmware image. This will help handling of firmware buffer allocation in the next patches. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Acked-by: Andrzej Hajda Tested-by: Smitha T Murthy Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.c | 2 +- drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 3 +-- drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | 36 ++++++++++++------------- 3 files changed, 20 insertions(+), 21 deletions(-) commit ba2e161f2834087755f93bc2d66cea1ed9d3fc23 Author: Marek Szyprowski Date: Wed Feb 8 09:29:39 2017 -0200 [media] s5p-mfc: Move setting DMA max segment size to DMA configure function Setting DMA max segment size to 32 bit mask is a part of DMA memory configuration, so move those calls to s5p_mfc_configure_dma_memory() function. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Acked-by: Andrzej Hajda Tested-by: Smitha T Murthy Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 11d1fc3b646e366caaa1e61dd6c82704baf5d330 Author: Marek Szyprowski Date: Wed Feb 8 09:16:02 2017 -0200 [media] s5p-mfc: Simplify alloc/release private buffer functions Change parameters for s5p_mfc_alloc_priv_buf() and s5p_mfc_release_priv_buf() functions. Instead of DMA device pointer and a base, provide common MFC device structure and memory bank context identifier. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Acked-by: Andrzej Hajda Tested-by: Smitha T Murthy Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 2 ++ drivers/media/platform/s5p-mfc/s5p_mfc_opr.c | 20 +++++++++++------ drivers/media/platform/s5p-mfc/s5p_mfc_opr.h | 8 +++---- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | 30 ++++++++++--------------- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 15 +++++-------- 5 files changed, 37 insertions(+), 38 deletions(-) commit 0d9e301b10422f0c04952d7f3128f2e3ac9b5873 Author: Marek Szyprowski Date: Wed Feb 8 06:53:48 2017 -0200 [media] s5p-mfc: Replace bank1/bank2 entries with an array Internal MFC driver device structure contains two entries for keeping addresses of the DMA memory banks. Replace them with the dma_base[] array and use defines for accessing particular banks. This will help to simplify code in the next patches. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Acked-by: Andrzej Hajda Tested-by: Smitha T Murthy Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 6 ++-- drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | 27 +++++++++++------- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | 38 +++++++++++++------------ drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 10 +++---- 4 files changed, 43 insertions(+), 38 deletions(-) commit 255d831dc96dd985a79f710ce94081506637613b Author: Marek Szyprowski Date: Wed Feb 8 08:23:31 2017 -0200 [media] s5p-mfc: Replace mem_dev_* entries with an array Internal MFC driver device structure contains two pointers to devices used for DMA memory allocation: mem_dev_l and mem_dev_r. Replace them with the mem_dev[] array and use defines for accessing particular banks. This will help to simplify code in the next patches. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Acked-by: Andrzej Hajda Tested-by: Smitha T Murthy Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 31 +++++++++++++----------- drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 11 ++++----- drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | 23 +++++++++--------- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 8 +++---- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 10 ++++---- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | 32 ++++++++++++++----------- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 15 ++++++------ 7 files changed, 69 insertions(+), 61 deletions(-) commit 4a5ab64ccf7d2f941f549cbb6a5350dce17b422e Author: Marek Szyprowski Date: Mon Feb 20 10:38:51 2017 -0300 [media] s5p-mfc: Use generic of_device_get_match_data helper Replace custom code with generic helper to retrieve driver data. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Reviewed-by: Smitha T Murthy Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 17 ++--------------- drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 4 ++-- 2 files changed, 4 insertions(+), 17 deletions(-) commit 9f05df83fad2b6a0c3027a093ac00f1232bdf9df Author: Marek Szyprowski Date: Mon Feb 20 10:38:50 2017 -0300 [media] s5p-mfc: Remove unused structures and dead code Remove unused structures, definitions and functions that are no longer called from the driver code. Signed-off-by: Marek Szyprowski Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Acked-by: Andrzej Hajda Tested-by: Smitha T Murthy Reviewed-by: Smitha T Murthy Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 21 --------------------- drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 13 ------------- drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h | 1 - 3 files changed, 35 deletions(-) commit b58fc8049790ca780fb42bd2faabe9b921aedf44 Author: Mike Marciniszyn Date: Mon Mar 20 17:26:26 2017 -0700 IB/hfi1: Eliminate synchronize_rcu() in mr delete The synchronize_rcu() call can be eliminated to improve memory deregistration performance. There are two key fields involved: - The rcu pointer itself - the lkey_published field To close the window between the rcu read of the mregion pointer and the reference count the code should: 1. To lkey/rkey validation (reader) Read the rcu pointer. If the pointer is non-NULL, get a reference. To the current validation tests use a READ_ONCE() on the lkey_published. Upon any failure release the reference. 2. To the remove logic (delete) Insure the published is zeroed prior to setting the pointer to NULL. This requires using rcu_assign_pointer() to insure lkey_published is written prior to the NULL. 3. To the insert logic (add) Insure the published is set use an rcu_assign_pointer() to insure the pointer is after all MR fields. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/mr.c | 49 ++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 16 deletions(-) commit 243d9f436f89f95c304011bd32485afc27581986 Author: Don Hiatt Date: Mon Mar 20 17:26:20 2017 -0700 IB/hfi1: Add transmit fault injection feature Add ability to fault packets on transmit by opcode. Dropping by packet can be achieved by setting the mask to 0. In order to drop non-verbs traffic we set PbcInsertHrc to NONE (0x2). The packet will still be delivered to the receiving node but a KHdrHCRCErr (KDETH packet with a bad HCRC) will be triggered and the packet will not be delivered to the correct context. In order to drop regular verbs traffic we set the PbcTestEbp flag. The packet will still be delivered to the receiving node but a 'late ebp error' will be triggered and will be dropped. A global toggle (/sys/kernel/debug/hfi1/hfi1_X/fault_suppress_err) has been added to suppress the error messages on the receive node when a packet was faulted on the sending node. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 4 +++ drivers/infiniband/hw/hfi1/debugfs.c | 8 ++++++ drivers/infiniband/hw/hfi1/debugfs.h | 11 ++++++++ drivers/infiniband/hw/hfi1/driver.c | 11 ++++++++ drivers/infiniband/hw/hfi1/verbs.c | 49 ++++++++++++++++++++++++++++++------ drivers/infiniband/hw/hfi1/verbs.h | 1 + include/rdma/ib_pack.h | 2 ++ 7 files changed, 79 insertions(+), 7 deletions(-) commit 0181ce31b26021f7c2f9506112a05c847a36f0f2 Author: Don Hiatt Date: Mon Mar 20 17:26:14 2017 -0700 IB/hfi1: Add receive fault injection feature Add fault injection capability: - Drop packets unconditionally (fault_by_packet) - Drop packets based on opcode (fault_by_opcode) This feature reacts to the global FAULT_INJECTION config flag. The faulting traces have been added: - misc/fault_opcode - misc/fault_packet See 'Documentation/fault-injection/fault-injection.txt' for details. Examples: - Dropping packets by opcode: /sys/kernel/debug/hfi1/hfi1_X/fault_opcode # Enable fault echo Y > fault_by_opcode # Setprobability of dropping (0-100%) # echo 25 > probability # Set opcode echo 0x64 > opcode # Number of times to fault echo 3 > times # An optional mask allows you to fault # a range of opcodes echo 0xf0 > mask /sys/kernel/debug/hfi1/hfi1_X/fault_stats contains a value in parentheses to indicate number of each opcode dropped. - Dropping packets unconditionally /sys/kernel/debug/hfi1/hfi1_X/fault_packet # Enable fault echo Y > fault_by_packet /sys/kernel/debug/hfi1/hfi1_X/fault_packet/fault_stats contains the number of packets dropped. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/debugfs.c | 222 ++++++++++++++++++++++++++++++++ drivers/infiniband/hw/hfi1/debugfs.h | 51 +++++++- drivers/infiniband/hw/hfi1/driver.c | 8 ++ drivers/infiniband/hw/hfi1/trace_misc.h | 48 +++++++ drivers/infiniband/hw/hfi1/verbs.c | 6 + drivers/infiniband/hw/hfi1/verbs.h | 4 + 6 files changed, 336 insertions(+), 3 deletions(-) commit f7b42633720deb5ca8f4bcb175c7dc2933057e7f Author: Michael J. Ruhl Date: Mon Mar 20 17:26:07 2017 -0700 IB/hfi1: Ensure VL index is within bounds Improve the safety of the code and ensure the array cannot be indexed out of bounds when picking the CPU for a given SDMA engine. Reviewed-by: Dennis Dalessandro Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/sdma.c | 5 +++++ 1 file changed, 5 insertions(+) commit 44dcfa4b182dffed0e1e6535220fcdd12620b9ec Author: Mike Marciniszyn Date: Mon Mar 20 17:26:01 2017 -0700 IB/rdmavt: Avoid reseting wqe send_flags in unreserve The wqe should be read only and in fact the superfluous reset of the RVT_SEND_RESERVE_USED flag causes an issue where reserved operations elicit a bad completion to the ULP. The maintenance of the flag is now entirely within rvt_post_one_wr() where a reserved operation will set the flag and a non-reserved operation will insure the operation that is about to be posted has the flag reset. Fixes: Commit 856cc4c237ad ("IB/hfi1: Add the capability for reserved operations") Reviewed-by: Don Hiatt Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 7 +++++-- include/rdma/rdmavt_qp.h | 4 +--- 2 files changed, 6 insertions(+), 5 deletions(-) commit 5f14e4e6674002f377ba164114eb9a67ba23d864 Author: Sebastian Sanchez Date: Mon Mar 20 17:25:55 2017 -0700 IB/rdmavt, IB/hfi1: Fix timer migration regressions RC timeout counter isn't getting incremented. Increment counter and add the trace for it. Fixes: 87c23b4ab018 ("IB/rdmavt: Adding timer logic to rdmavt") Reviewed-by: Brian Welty Reviewed-by: Mike Marciniszyn Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/trace_rc.h | 7 +- drivers/infiniband/sw/rdmavt/qp.c | 6 +- drivers/infiniband/sw/rdmavt/trace.h | 3 +- drivers/infiniband/sw/rdmavt/trace_rc.h | 109 ++++++++++++++++++++++++++++++++ 4 files changed, 117 insertions(+), 8 deletions(-) commit 5e6e94244bba1eb5be3c5ac9ceb3af87280b56d1 Author: Michael J. Ruhl Date: Mon Mar 20 17:25:48 2017 -0700 IB/hfi1: Add a patch value to the firmware version string The HFI firmware now includes a patch level in its version. Updating the necessary code to include the patch version in the firmware string. Reviewed-by: Easwar Hariharan Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 23 +++++++++++++++-------- drivers/infiniband/hw/hfi1/chip.h | 18 +++++++++++------- drivers/infiniband/hw/hfi1/firmware.c | 14 ++++++++------ drivers/infiniband/hw/hfi1/hfi.h | 9 +++++---- drivers/infiniband/hw/hfi1/verbs.c | 14 ++++++++------ 5 files changed, 47 insertions(+), 31 deletions(-) commit fb897ad315643e5dc1092a115b3cec914b66df9d Author: Easwar Hariharan Date: Mon Mar 20 17:25:42 2017 -0700 IB/hfi1: Check for QSFP presence before attempting reads Attempting to read the status of a QSFP cable creates noise in the logs and misses out on setting an appropriate Offline/Disabled Reason if the cable is not plugged in. Check for this prior to attempting the read and attendant retries. Fixes: 673b975f1fba ("IB/hfi1: Add QSFP sanity pre-check") Reviewed-by: Dennis Dalessandro Signed-off-by: Easwar Hariharan Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 62eed66e98b4c2286fef2ce5911d8d75b7515f7b Author: Tadeusz Struk Date: Mon Mar 20 17:25:35 2017 -0700 IB/hfi1: Protect the global dev_cntr_names and port_cntr_names Protect the global dev_cntr_names and port_cntr_names with the global mutex as they are allocated and freed in a function called per device. Otherwise there is a danger of double free and memory leaks. Reviewed-by: Dennis Dalessandro Reviewed-by: Easwar Hariharan Signed-off-by: Tadeusz Struk Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/verbs.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 5d6f08afdd394c0b162cefe383093aace3e94e39 Author: Tadeusz Struk Date: Mon Mar 20 17:25:29 2017 -0700 IB/hfi1: Check device id early during init If there is a wrong device passed to the driver it should fail early, without trying to initialize the device only to find out that it has an invalid device later during the init. Reviewed-by: Ira Weiny Signed-off-by: Tadeusz Struk Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/init.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 9260b3541f3a9159b6f49270077d8669870d5db0 Author: Mike Marciniszyn Date: Mon Mar 20 17:25:23 2017 -0700 IB/rdmavt: Add swqe completion trace The following fields are available for filter/trace: - wqe - wr_id - qpn - qpt - length - idx - ssn - (wr)opcode - (wr)send_flags Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/rc.c | 2 ++ drivers/infiniband/hw/hfi1/ruc.c | 2 ++ drivers/infiniband/hw/hfi1/trace_tx.h | 43 +++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) commit c6ad9482fcb85178c44f0368c39f1324a78b8fc2 Author: Mike Marciniszyn Date: Mon Mar 20 17:25:16 2017 -0700 IB/rdmavt: Add tracing for cq entry and poll The following fields are defined for filtering and triggering: - wr_id - status - opcode - qpn - length - idx Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/cq.c | 3 + drivers/infiniband/sw/rdmavt/trace.h | 1 + drivers/infiniband/sw/rdmavt/trace_cq.h | 127 ++++++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+) commit 2a1b7c8b8e9d6f069e71537a54a670a174e2a8f3 Author: Mike Marciniszyn Date: Mon Mar 20 17:25:10 2017 -0700 IB/rdmavt: Add additional fields to post send trace This fix is to get additional debugging information. The following fields are added: - wqe - qpt - num_sge - ssn - pid - send_flags These additional fields provide for more focused filtering and triggering. The patch also moves the trace to just before the wqe is posted to get the most accurate information and future proofs the code to trace all possible reserved opcodes. Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 2 +- drivers/infiniband/sw/rdmavt/trace_tx.h | 34 ++++++++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 4 deletions(-) commit 43a474aadbd55252cea2036bac36e3ad159344b2 Author: Mike Marciniszyn Date: Mon Mar 20 17:25:04 2017 -0700 IB/rdmavt, IB/hfi1, IB/qib: Make wc opcode translation driver dependent The work to create a completion helper moved the translation of send wqe operations to completion opcodes to rdmvat. This precludes having driver dependent operations. Make the translation driver dependent by doing the translation in the driver prior to the rvt_qp_swqe_complete() call using restored translation tables. Fixes: Commit f2dc9cdce83c ("IB/rdmavt: Add a send completion helper") Fixes: Commit 0771da5a6e9d ("IB/hfi1,IB/qib: Use new send completion helper") Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/rc.c | 10 ++++++++-- drivers/infiniband/hw/hfi1/ruc.c | 5 ++++- drivers/infiniband/hw/hfi1/verbs.c | 16 ++++++++++++++++ drivers/infiniband/hw/qib/qib_rc.c | 10 ++++++++-- drivers/infiniband/hw/qib/qib_ruc.c | 5 ++++- drivers/infiniband/hw/qib/qib_verbs.c | 13 +++++++++++++ drivers/infiniband/sw/rdmavt/qp.c | 17 ----------------- include/rdma/rdmavt_qp.h | 3 ++- 8 files changed, 55 insertions(+), 24 deletions(-) commit 5a52a7acf7e2a812d2852342992cee3dc22ad25d Author: Sebastian Sanchez Date: Mon Mar 20 17:24:58 2017 -0700 IB/hfi1: NULL pointer dereference when freeing rhashtable A NULL pointer dereference occurs when the driver is unloaded, and the SDMA rhashtable is freed if the rhashtable_init() function has not been called. Prevent this by changing sdma_rht to be a pointer to a dynamically allocated hash table. The NULL-ness of the pointer serves as an indication that the hash table was initialized and that it needs to be destroyed. Fixes: 0cb2aa690c7e ("IB/hfi1: Add sysfs interface for affinity setup") Reviewed-by: Mike Marciniszyn Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/hfi.h | 2 +- drivers/infiniband/hw/hfi1/sdma.c | 38 +++++++++++++++++++++++++++----------- 2 files changed, 28 insertions(+), 12 deletions(-) commit 8688426ba6464f7079649f52cf9108856c419415 Author: Michael J. Ruhl Date: Mon Mar 20 17:24:51 2017 -0700 IB/hfi1: Cache registers during state change When the LCB is going offline, inopportune port queries can cause benign error messages to be logged. To deal with this, cache the registers just before setting the LCB to offline, allowing queries to return without eliciting the error. Reviewed-by: Dennis Dalessandro Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 58 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 3 deletions(-) commit 0519c520dc38e9950f4032d0f41f2b72b2c3c940 Author: Michael J. Ruhl Date: Mon Mar 20 17:24:45 2017 -0700 IB/hfi1: Race hazard avoidance in user SDMA driver Set the errcode before the state and add the smb_wmb() to avoid a potential race condition with the user. Reviewed-by: Dennis Dalessandro Signed-off-by: Michael Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_sdma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ec8a142327f85ae9aa5ad784520e669a34839941 Author: Dean Luick Date: Mon Mar 20 17:24:39 2017 -0700 IB/hfi1: Force logical link down If the logical link state does not read as down when the physical link state is offline, force it to down. Reviewed-by: Dennis Dalessandro Reviewed-by: Jakub Byczkowski Signed-off-by: Dean Luick Signed-off-by: Easwar Hariharan Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 86 +++++++++++++++++++++++++++++++-------- 1 file changed, 68 insertions(+), 18 deletions(-) commit 0c32b8ec02832df167e16ad659cb11dc148f2ddf Author: Marek Szyprowski Date: Thu Feb 23 08:43:27 2017 -0300 [media] s5p-mfc: Fix race between interrupt routine and device functions Interrupt routine must wake process waiting for given interrupt AFTER updating driver's internal structures and contexts. Doing it in-between is a serious bug. This patch moves all calls to the wake() function to the end of the interrupt processing block to avoid potential and real races, especially on multi-core platforms. This also fixes following issue reported from clock core (clocks were disabled in interrupt after being unprepared from the other place in the driver, the stack trace however points to the different place than s5p_mfc driver because of the race): WARNING: CPU: 1 PID: 18 at drivers/clk/clk.c:544 clk_core_unprepare+0xc8/0x108 Modules linked in: CPU: 1 PID: 18 Comm: kworker/1:0 Not tainted 4.10.0-next-20170223-00070-g04e18bc99ab9-dirty #2154 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) Workqueue: pm pm_runtime_work [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x74/0x94) [] (dump_stack) from [] (__warn+0xd4/0x100) [] (__warn) from [] (warn_slowpath_null+0x20/0x28) [] (warn_slowpath_null) from [] (clk_core_unprepare+0xc8/0x108) [] (clk_core_unprepare) from [] (clk_unprepare+0x24/0x2c) [] (clk_unprepare) from [] (exynos_sysmmu_suspend+0x48/0x60) [] (exynos_sysmmu_suspend) from [] (pm_generic_runtime_suspend+0x2c/0x38) [] (pm_generic_runtime_suspend) from [] (genpd_runtime_suspend+0x94/0x220) [] (genpd_runtime_suspend) from [] (__rpm_callback+0x134/0x208) [] (__rpm_callback) from [] (rpm_callback+0x20/0x80) [] (rpm_callback) from [] (rpm_suspend+0xdc/0x458) [] (rpm_suspend) from [] (pm_runtime_work+0x80/0x90) [] (pm_runtime_work) from [] (process_one_work+0x120/0x318) [] (process_one_work) from [] (worker_thread+0x2c/0x4ac) [] (worker_thread) from [] (kthread+0xfc/0x134) [] (kthread) from [] (ret_from_fork+0x14/0x3c) ---[ end trace 1ead49a7bb83f0d8 ]--- Fixes: af93574678108 ("[media] MFC: Add MFC 5.1 V4L2 driver") Signed-off-by: Marek Szyprowski CC: stable@vger.kernel.org # v4.5+ Reviewed-by: Javier Martinez Canillas Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 615cb49bb6e7e18885b52e5b59de3df210179564 Author: Shuah Khan Date: Fri Feb 10 13:40:53 2017 -0200 [media] s5p-mfc: Print buf pointer in hex constistently Fix s5p_mfc_set_dec_frame_buffer_v6() to print buffer pointer in hex to be consistent with the rest of the messages in the routine. Signed-off-by: Shuah Khan Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68552ad7fc23f6e01b4886d7455581349e06e3cf Author: Shuah Khan Date: Thu Feb 9 20:11:17 2017 -0200 [media] s5p_mfc: Remove unneeded io_modes initialization in s5p_mfc_open() Remove unneeded io_modes initialization in s5p_mfc_open(). It gets done right below in vdev == dev->vfd_dec conditional. Signed-off-by: Shuah Khan Acked-by: Andrzej Hajda Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 1 - 1 file changed, 1 deletion(-) commit 7c96f59e0cafe5777c533b147128a577dee1564b Author: Marek Szyprowski Date: Fri Feb 3 12:05:18 2017 -0200 [media] s5p-mfc: Fix initialization of internal structures Initialize members of the internal device and context structures as early as possible to avoid access to uninitialized objects on initialization failures. If loading firmware or creating of the hardware instance fails, driver will access device or context queue in error handling path, which might not be initialized yet, what causes kernel panic. Fix this by moving initialization of all static members as early as possible. Signed-off-by: Marek Szyprowski Acked-by: Andrzej Hajda Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 0fad6e2372074e69b7c2048fec86f5a4bcbb3edb Author: Mauro Carvalho Chehab Date: Wed Apr 5 15:37:06 2017 -0300 [media] tveeprom: get rid of documentation of an unused parameter Changeset 446aba663b82 ("[media] tveeprom: get rid of unused arg on tveeprom_hauppauge_analog()") removed the now unused I2C adapter struct from struct tveeprom. Remove the corresponding kernel-doc tag. Fixes: 446aba663b82 ("[media] tveeprom: get rid of unused arg on tveeprom_hauppauge_analog()") Signed-off-by: Mauro Carvalho Chehab include/media/tveeprom.h | 1 - 1 file changed, 1 deletion(-) commit f8da4aad552ec9423ca723404472cc3db0c125d7 Author: Mauro Carvalho Chehab Date: Wed Apr 5 15:35:10 2017 -0300 [media] dvb_frontend: add kernel-doc tag for a missing parameter Changeset 1f862a68df24 ("[media] dvb_frontend: move kref to struct dvb_frontend") added a kref to the struct dvb_frontend, but it didn't document it. Fixes: 1f862a68df24 ("[media] dvb_frontend: move kref to struct dvb_frontend") Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.h | 1 + 1 file changed, 1 insertion(+) commit 6c4bb65d0be8f34bc0aba982c9a47b19a1eea5ed Author: Elena Reshetova Date: Mon Mar 6 11:21:00 2017 -0300 [media] vb2: convert vb2_vmarea_handler refcount from atomic_t to refcount_t Use refcount_t to manage the refcount to the memory type specific buffer videobuf2 buffer implementations. refcount_t is better suitable for the purpose than atomic_t. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-dma-contig.c | 11 ++++++----- drivers/media/v4l2-core/videobuf2-dma-sg.c | 11 ++++++----- drivers/media/v4l2-core/videobuf2-memops.c | 6 +++--- drivers/media/v4l2-core/videobuf2-vmalloc.c | 11 ++++++----- include/media/videobuf2-memops.h | 3 ++- 5 files changed, 23 insertions(+), 19 deletions(-) commit a8d8e38a9337cc6b46ef6c66db65130fb61050dd Author: Elena Reshetova Date: Mon Mar 6 11:20:58 2017 -0300 [media] cx88: convert struct cx88_core.refcount from atomic_t to refcount_t refcount_t is better suitable for counting references than atomic_t. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx88/cx88-cards.c | 2 +- drivers/media/pci/cx88/cx88-core.c | 4 ++-- drivers/media/pci/cx88/cx88.h | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) commit 6eae60c5a0f05e0a9be01d6520d6e3017edc9c0d Author: Hans Verkuil Date: Mon Mar 27 06:53:00 2017 -0300 [media] cec-core.rst: document the new cec_get_drvdata() helper Document the new cec_get_drvdata() helper function. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/cec-core.rst | 5 +++++ 1 file changed, 5 insertions(+) commit 055075a3e8b8992f86707d3d7d20b857e71d205d Author: Hans Verkuil Date: Mon Mar 27 05:36:53 2017 -0300 [media] vivid: fix g_edid implementation The VIDIOC_G_EDID implementation in vivid didn't take edid->start_block into account when copying the EDID data. Make sure that the internal EDID is updated with the correct CEC physical address. Currently the returned EDID is updated, but that will only work well if edid->start_block is 0. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-vid-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f8cc16c889dc11cc35a11a21b0d62c0116ee7022 Author: Jose Abreu Date: Fri Mar 24 13:47:59 2017 -0300 [media] platform: vivid: Use cec_get_drvdata() Use helper function to get driver private data from CEC adapter. Signed-off-by: Jose Abreu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-cec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bb25db504771d3d9b176ee9a5e3eb579cf4e3002 Author: Jose Abreu Date: Fri Mar 24 13:47:58 2017 -0300 [media] usb: pulse8-cec: Use cec_get_drvdata() Use helper function to get driver private data from CEC adapter. Signed-off-by: Jose Abreu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pulse8-cec/pulse8-cec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2e60ad17b8c818e3200e5a088462182c20a70f1a Author: Jose Abreu Date: Fri Mar 24 13:47:57 2017 -0300 [media] i2c: adv7842: Use cec_get_drvdata() Use helper function to get driver private data from CEC adapter. Signed-off-by: Jose Abreu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7842.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit eb10790f180cfb21c3979cc9c4abfe2cc9590ad9 Author: Jose Abreu Date: Fri Mar 24 13:47:56 2017 -0300 [media] i2c: adv7604: Use cec_get_drvdata() Use helper function to get driver private data from CEC adapter. Signed-off-by: Jose Abreu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7604.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7964f19d3817da858774a8a16f0397ffeb611856 Author: Jose Abreu Date: Fri Mar 24 13:47:55 2017 -0300 [media] i2c: adv7511: Use cec_get_drvdata() Use helper function to get driver private data from CEC adapter. Signed-off-by: Jose Abreu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7511.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 91f6d55d70708ac3c5b8ede4b8943d701a19889e Author: Jose Abreu Date: Fri Mar 24 13:47:54 2017 -0300 [media] staging: s5p-cec: Use cec_get_drvdata() Use helper function to get driver private data from CEC adapter. Signed-off-by: Jose Abreu Cc: Kamil Debski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/s5p-cec/s5p_cec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2524490c8900e9b0747b16f070de58c8850793e8 Author: Jose Abreu Date: Fri Mar 24 13:47:53 2017 -0300 [media] staging: st-cec: Use cec_get_drvdata() Use helper function to get driver private data from CEC adapter. Signed-off-by: Jose Abreu Cc: Benjamin Gaignard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/st-cec/stih-cec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0b0b97dcc79fe2b34d320805c4389d87980a0e51 Author: Jose Abreu Date: Fri Mar 24 13:47:52 2017 -0300 [media] cec: Add cec_get_drvdata() Add a helper function to get driver private data from CEC adapter. This helps the readability a little bit and allows to change the 'priv' field name to something else without needing to touch all drivers. Signed-off-by: Jose Abreu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/cec.h | 5 +++++ 1 file changed, 5 insertions(+) commit 6922bd71adab0a7fe8ffbdc3e72a46431fa29656 Author: Geert Uytterhoeven Date: Mon Apr 3 12:08:09 2017 +0200 arm64: dts: r8a7795: salvator-x: Drop _clk suffix from X12 clock node name The current practice is to not add _clk suffixes to clock node names in DT, as these names are used as the actual clock names. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit acf0e531a48bdf805fec024dcc2735a61933a213 Author: Geliang Tang Date: Fri Mar 24 11:12:24 2017 -0300 [media] ivtv: use for_each_sg Use for_each_sg() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ivtv/ivtv-udma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1dd5198b2df913aec9b77c14529f9ff1b6d33e30 Author: Jens Axboe Date: Wed Apr 5 12:16:38 2017 -0600 block: move timeout field in struct request to pack better After commit 64c7f1d1572c, we went from 1 to 2 holes in my test setup. If we move the timeout field a bit, we remove both of those holes and shrink struct request by 8 bytes. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe include/linux/blkdev.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eb77d7260c4c25206e2a455be0dbe6443e0856b5 Author: Geert Uytterhoeven Date: Mon Apr 3 12:08:08 2017 +0200 ARM: dts: r8a7791: Drop _clk suffix from external CAN clock node name The current practice is to not add _clk suffixes to clock node names in DT, as these names are used as the actual clock names. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b476a9610910a6ac5222bee4ae83a8d41800dbd Author: Geert Uytterhoeven Date: Mon Apr 3 12:08:07 2017 +0200 ARM: dts: r8a7790: Drop _clk suffix from external CAN clock node name The current practice is to not add _clk suffixes to clock node names in DT, as these names are used as the actual clock names. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e533a459f07c2b7bcc60121032b3b24d0c58133a Author: Jacopo Mondi Date: Mon Apr 3 18:03:18 2017 +0200 ARM: dts: genmai: Enable rtc and rtc_x1 clock Enable the 32.768 kHz RTC_X1 clock by setting the frequency value to non-zero and enable the realtime clock. Signed-off-by: Jacopo Mondi Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100-genmai.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit e5c27ef390a5195d54ed8135148253ec990ad29a Author: Anton Leontiev Date: Thu Mar 23 18:09:35 2017 -0300 [media] vb2: Fix queue_setup() callback description Correct meaning of the last sensence by swapping it with previous. Fix two small typos. Signed-off-by: Anton Leontiev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/videobuf2-core.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 49375e68fec71d067ea02e74386cf6171bab85f5 Author: Colin Ian King Date: Wed Mar 22 13:32:01 2017 -0300 [media] usb: au0828: remove redundant code The check for ret being non-zero is false as ret is always zero, hence we have redundant dead code that can be removed. Detected with CoverityScan, CID#112968 ("Constant' variable guards dead code (DEADCODE)'") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-video.c | 7 ------- 1 file changed, 7 deletions(-) commit 1085cbf271e4f9fe8c4064877d39335d327e662f Author: Matthias Kaehlcke Date: Fri Mar 17 18:01:33 2017 -0300 [media] vcodec: mediatek: Remove double parentheses The extra pairs of parentheses are not needed and cause clang warnings like this: drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:158:32: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] if ((inst->work_bufs[i].size == 0)) ~~~~~~~~~~~~~~~~~~~~~~~~^~~~ drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:158:32: note: remove extraneous parentheses around the comparison to silence this warning if ((inst->work_bufs[i].size == 0)) ~ ^ ~ drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:158:32: note: use '=' to turn this equality comparison into an assignment if ((inst->work_bufs[i].size == 0)) ^~ = Signed-off-by: Matthias Kaehlcke Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ee8c7cdb876f4a486a620e448e4b299de7df12db Author: Baruch Siach Date: Wed Mar 15 07:28:19 2017 -0300 [media] doc: kapi: fix typo Signed-off-by: Baruch Siach Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/v4l2-core.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba40be0fa21afd10a66bdfaee37d3ebcd9187c05 Author: Minghsiu Tsai Date: Tue Mar 14 11:21:22 2017 -0300 [media] media: mtk-jpeg: fix continuous log "Context is NULL" The symptom is continuous log "mtk-jpeg 18004000.jpegdec: Context is NULL" in kernel log. It is because the error handling in irq doesn't clear interrupt. The calling flow like as below when issue happen mtk_jpeg_device_run() mtk_jpeg_job_abort() v4l2_m2m_job_finish() -> m2m_dev->curr_ctx = NULL; mtk_jpeg_dec_irq() v4l2_m2m_get_curr_priv() -> m2m_dev->curr_ctx == NULL -> return NULL log "Context is NULL" There is race condition between job_abort() and irq. In order to simplify code, don't want to add extra flag to maintain state, empty job_abort() and clear interrupt before v4l2_m2m_get_curr_priv() in irq. Signed-off-by: Minghsiu Tsai Acked-by: Rick Chang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit aa58fedb8c7b6cf2f05941d238495f9e2f29655c Author: Johan Hovold Date: Mon Mar 13 09:53:59 2017 -0300 [media] gspca: konica: add missing endpoint sanity check Make sure to check the number of endpoints to avoid accessing memory beyond the endpoint array should a device lack the expected endpoints. Note that, as far as I can tell, the gspca framework has already made sure there is at least one endpoint in the current alternate setting so there should be no risk for a NULL-pointer dereference here. Fixes: b517af722860 ("V4L/DVB: gspca_konica: New gspca subdriver for konica chipset using cams") Cc: stable # 2.6.37 Cc: Hans de Goede Signed-off-by: Johan Hovold Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/konica.c | 3 +++ 1 file changed, 3 insertions(+) commit 6ea87867e552500b242cd5be3590d6c1ff91f508 Author: Colin Ian King Date: Tue Mar 7 11:30:47 2017 -0300 [media] atmel-isc: fix off-by-one comparison and out of bounds read issue The are only HIST_ENTRIES worth of entries in hist_entry however the for-loop is iterating one too many times leasing to a read access off the end off the array ctrls->hist_entry. Fix this by iterating by the correct number of times. Detected by CoverityScan, CID#1415279 ("Out-of-bounds read") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64c24ecb3cff412cd848db06d90409e5dd77c2e0 Author: Tomohiro Kusumi Date: Tue Apr 4 13:01:22 2017 +0300 f2fs: split make_dentry_ptr() into block and inline versions Since callers statically know which type to use, make_dentry_ptr() can simply be splitted into two inline functions. This way, the code has less inlined, fewer arguments, and no cast. Signed-off-by: Tomohiro Kusumi Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 8 ++++---- fs/f2fs/f2fs.h | 32 +++++++++++++++----------------- fs/f2fs/inline.c | 10 +++++----- 3 files changed, 24 insertions(+), 26 deletions(-) commit 64c7f1d1572cacadfc0a4ca5a937aeffa486de58 Author: Christoph Hellwig Date: Wed Apr 5 19:18:12 2017 +0200 block, scsi: move the retries field to struct scsi_request Instead of bloating the generic struct request with it. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe block/scsi_ioctl.c | 8 ++++---- drivers/scsi/osd/osd_initiator.c | 2 +- drivers/scsi/osst.c | 2 +- drivers/scsi/scsi_error.c | 2 +- drivers/scsi/scsi_lib.c | 4 ++-- drivers/scsi/sg.c | 2 +- drivers/scsi/st.c | 2 +- drivers/target/target_core_pscsi.c | 2 +- include/linux/blkdev.h | 1 - include/scsi/scsi_request.h | 1 + 10 files changed, 13 insertions(+), 13 deletions(-) commit 44e44b29fb99a299dfaa404a59fa35519a197c6b Author: Christoph Hellwig Date: Wed Apr 5 19:18:11 2017 +0200 nvme: move the retries count to struct nvme_request The way NVMe uses this field is entirely different from the older SCSI/BLOCK_PC usage, so move it into struct nvme_request. Also reduce the size of the file to a unsigned char so that we leave space for additional smaller fields that will appear soon. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 10 +++++----- drivers/nvme/host/nvme.h | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) commit 83f3aeb386e8cd24ad501a726c33a74422c03591 Author: Christoph Hellwig Date: Wed Apr 5 19:18:10 2017 +0200 nvme: mark nvme_max_retries static Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 3 +-- drivers/nvme/host/nvme.h | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) commit f6324b1bb7f8d38c4f8be5509098e4b3ee0194b1 Author: Christoph Hellwig Date: Wed Apr 5 19:18:09 2017 +0200 nvme: cleanup nvme_req_needs_retry Don't pass the status explicitly but derive it from the requeust, and unwind the complex condition to be more readable. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 987f699a8f6c9a724e970c1bb4cde2e2c6a52010 Author: Christoph Hellwig Date: Wed Apr 5 19:18:08 2017 +0200 nvme: move ->retries setup to nvme_setup_cmd ->retries is counting the number of times a command is resubmitted, and be cleared on the first time we see the command. We currently don't do that for non-PCIe command, which is easily fixed by moving the setup to common code. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 5 +++++ drivers/nvme/host/pci.c | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) commit d1b3e72d549094317c12c79c7817861a97004a56 Author: Jaegeuk Kim Date: Thu Mar 30 21:02:46 2017 -0700 f2fs: submit bio of in-place-update pages This patch tries to split in-place-update bios from sequential bios. Suggested-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 5 ++++- fs/f2fs/f2fs.h | 2 +- fs/f2fs/segment.c | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) commit fc2e2875d54c3571fe7c9dbed83814bd26e8a33a Author: Kaixu Xia Date: Sun Apr 2 02:39:48 2017 +0800 f2fs: remove the redundant variable definition The variable 'i' has been defined before, so here we can use it directly. Signed-off-by: Kaixu Xia Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 1 - 1 file changed, 1 deletion(-) commit 687de7f1010cb819d04b768556960d3689abe02b Author: Jaegeuk Kim Date: Tue Mar 28 18:07:38 2017 -0700 f2fs: avoid IO split due to mixed WB_SYNC_ALL and WB_SYNC_NONE If two threads try to flush dirty pages in different inodes respectively, f2fs_write_data_pages() will produce WRITE and WRITE_SYNC one at a time, resulting in a lot of 4KB seperated IOs. So, this patch gives higher priority to WB_SYNC_ALL IOs and gathers write IOs with a big WRITE_SYNC'ed bio. Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 15 +++++++++++++-- fs/f2fs/f2fs.h | 3 +++ fs/f2fs/super.c | 2 ++ 3 files changed, 18 insertions(+), 2 deletions(-) commit ef095d19e82f25bbdead472b8b71f4ef3b7a636d Author: Jaegeuk Kim Date: Fri Mar 24 20:05:13 2017 -0400 f2fs: write small sized IO to hot log It would better split small and large IOs separately in order to get more consecutive big writes. The default threshold is set to 64KB, but configurable by sysfs/min_hot_blocks. Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 9 +++++++++ fs/f2fs/f2fs.h | 2 ++ fs/f2fs/inline.c | 1 + fs/f2fs/segment.c | 13 ++++++------- fs/f2fs/segment.h | 1 + fs/f2fs/super.c | 2 ++ 6 files changed, 21 insertions(+), 7 deletions(-) commit a7eeb823854c4ab19765a25fabbda07fe27be177 Author: Chao Yu Date: Tue Mar 28 18:18:50 2017 +0800 f2fs: use bitmap in discard_entry This patch changes to use bitmap instead of extent in struct discard_entry to indicate discard range in one segment, for fragmented space, this implementation can save memory footprint. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 6 ++--- fs/f2fs/segment.c | 72 ++++++++++++++++++++++++++++++------------------------- 2 files changed, 43 insertions(+), 35 deletions(-) commit f099405fc8d6c837487dcd6ab288073a44e6a91f Author: Chao Yu Date: Mon Mar 27 18:14:04 2017 +0800 f2fs: clean up destroy_discard_cmd_control Remove unneeded parameter and simply change flow in destroy_discard_cmd_control. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 5f32366a29b48bf6878ede83149819e38999c2fd Author: Chao Yu Date: Sat Mar 25 17:19:59 2017 +0800 f2fs: count discard command entry Adds to count discard command entry and show the number in debugfs, also fix to add cost of discard command cache into total comsumed memory footprint. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 12 +++++++++--- fs/f2fs/f2fs.h | 2 ++ fs/f2fs/segment.c | 4 ++++ 3 files changed, 15 insertions(+), 3 deletions(-) commit 8b8dd65f72ccbf7111eb97c4c4f5b5df2a412a07 Author: Chao Yu Date: Sat Mar 25 17:19:58 2017 +0800 f2fs: show issued flush/discard count Show historical count of flush command and discard command. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 24 ++++++++++++++++-------- fs/f2fs/f2fs.h | 9 ++++++--- fs/f2fs/segment.c | 37 +++++++++++++++++++++++-------------- 3 files changed, 45 insertions(+), 25 deletions(-) commit 946c41af8fad4140d3721f736679c417ae5bc21a Author: Hugues Fruchet Date: Tue Feb 21 05:12:52 2017 -0300 [media] st-delta: mjpeg: fix static checker warning Initialize 'data_offset' local variable to 0. drivers/media/platform/sti/delta/delta-mjpeg-dec.c:415 delta_mjpeg_decode() error: uninitialized symbol 'data_offset'. Fixes: 433ff5b4a29b: "[media] st-delta: add mjpeg support" Signed-off-by: Hugues Fruchet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/delta/delta-mjpeg-dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51bb3fd788cb6be773d1d4ede43b18bcc053bb2f Author: Sean Young Date: Tue Mar 7 17:09:11 2017 -0300 [media] staging: lirc_sasem: remove This driver was merged in 2010 and never had the necessary work done to promote it out of staging (port to rc-core), so remove it. I have not managed to track down the hardware. If anyone has the hardware and would like a driver for it, please contact me and hopefully we can work together to write a new driver. Signed-off-by: Sean Young Cc: Oliver Stabel Cc: Tim Davies Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/Kconfig | 6 - drivers/staging/media/lirc/Makefile | 1 - drivers/staging/media/lirc/lirc_sasem.c | 899 -------------------------------- 3 files changed, 906 deletions(-) commit e66267161971155a8b4756b4e17f2f2f82b9f842 Author: Sean Young Date: Tue Mar 7 17:07:59 2017 -0300 [media] rc: promote lirc_sir out of staging Rename lirc_sir to sir_ir in the process. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/Kconfig | 9 + drivers/media/rc/Makefile | 1 + drivers/media/rc/sir_ir.c | 438 ++++++++++++++++++++++++++++++++++ drivers/staging/media/lirc/Kconfig | 6 - drivers/staging/media/lirc/Makefile | 1 - drivers/staging/media/lirc/lirc_sir.c | 438 ---------------------------------- 6 files changed, 448 insertions(+), 445 deletions(-) commit 8c7c6cad6aee5013694120a2b2907c530c08a245 Author: Sean Young Date: Sat Mar 25 08:45:38 2017 -0300 [media] staging: sir: make sure we are ready to receive interrupts Ensure that the timer is ready before we request interrupts. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_sir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4d7cf7ec84a84b4950d8fb36c627771d38058300 Author: Sean Young Date: Sat Mar 25 07:41:39 2017 -0300 [media] staging: sir: remove unnecessary messages No need to warn when kmalloc fails. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_sir.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit a4b7c07fdffdd0fb2706ebfa99657687f1880282 Merge: 18148f0 7c69873 Author: David S. Miller Date: Wed Apr 5 10:49:14 2017 -0700 Merge branch 'nfp-ksettings' Jakub Kicinski says: ==================== nfp: ethtool link settings This series adds support for getting and setting link settings via the (moderately) new ethtool ksettings ops. First patch introduces minimal speed and duplex reporting using the information directly provided in PCI BAR0 memory. Next few changes deal with the need to refresh port state read from the service process and patch 6 finally uses that information to provide link speed and duplex. Patches 7 and 8 add auto negotiation and port type reporting. Remaining changes provide the set support for speed and auto negotiation. An upcoming series will also add port splitting support via devlink. Quite a bit of churn in this series is caused by the fact that currently port speed and split changes will usually require a reboot to take effect. Current service process code is not capable of performing MAC reinitialization after chip has been passing traffic. To make sure user is aware of this limitation we refuse the configuration unless netdev is down, print warning to the logs and if configuration was performed but did take effect we unregister the netdev. Service process has a "reboot needed" sticky bit, so reloading the driver will not bring the netdev back. Note that there is a helper in patch 13 which is marked as __always_inline, because the FIELD_* macros require the parameters to be known at compilation time. I hope that is OK. ==================== Signed-off-by: David S. Miller commit 7c698737270fee01963f26ea5d168a6a6c4b1269 Author: Jakub Kicinski Date: Tue Apr 4 16:12:35 2017 -0700 nfp: add support for .set_link_ksettings() Support setting link speed and autonegotiation through set_link_ksettings() ethtool op. If the port is reconfigured in incompatible way and reboot is required the netdev will get unregistered and not come back until user reboots the system. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 5a560832ebf8317eb2af0493b259aba37af05bb1 Author: Jakub Kicinski Date: Tue Apr 4 16:12:34 2017 -0700 nfp: NSP backend for link configuration operations Add NSP backend for upcoming link configuration operations. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 6 +- .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h | 7 + .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 180 +++++++++++++++++++-- 3 files changed, 179 insertions(+), 14 deletions(-) commit 85eb97dd2f073e72784505e51b048171ab9bda61 Author: Jakub Kicinski Date: Tue Apr 4 16:12:33 2017 -0700 nfp: add extended error messages Allow NSP to set option code even when error is reported. This provides a way for NSP to give user more precise information about why command failed. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 37 +++++++++++++++++----- 1 file changed, 29 insertions(+), 8 deletions(-) commit e890ae8e497a535a8ab692a66f7fc2aee4361728 Author: Jakub Kicinski Date: Tue Apr 4 16:12:32 2017 -0700 nfp: turn NSP port entry into a union Make NSP port structure a union to simplify accessing the fields from generic macros. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 38 ++++++++++++++-------- 1 file changed, 25 insertions(+), 13 deletions(-) commit 30a029217de994db889b7e598b54b674b2ad86b4 Author: Jakub Kicinski Date: Tue Apr 4 16:12:31 2017 -0700 nfp: allow multi-stage NSP configuration NSP commands may be slow to respond, we should try to avoid doing a command-per-item when user requested to change multiple parameters for instance with an ethtool .set_settings() command. Introduce a way of internal NSP code to carry state in NSP structure and add start/finish calls to perform the initialization and kick off of the configuration request, with potentially many parameters being modified in between. nfp_eth_set_mod_enable() will make use of the new code internally, other "set" functions to follow. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h | 8 ++ .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 43 ++++++++ .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h | 4 + .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 114 +++++++++++++++------ 4 files changed, 138 insertions(+), 31 deletions(-) commit ce22f5a2cbe3c62746da7d3f8272abd03e8c975a Author: Jakub Kicinski Date: Tue Apr 4 16:12:30 2017 -0700 nfp: separate high level and low level NSP headers We will soon add more NSP commands and structure definitions. Move all high-level NSP header contents to a common nfp_nsp.h file. Right now it mostly boils down to renaming nfp_nsp_eth.h and moving some functions from nfp.h there. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 2 +- .../net/ethernet/netronome/nfp/nfp_net_common.c | 2 +- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 2 +- drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h | 12 +- .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 1 + .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h | 139 +++++++++++++++++++++ .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 2 +- .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.h | 130 ------------------- 9 files changed, 147 insertions(+), 145 deletions(-) commit 9f9e0da57ef1207b26b13c243c5f398c9432156c Author: Jakub Kicinski Date: Tue Apr 4 16:12:29 2017 -0700 nfp: report port type in ethtool Service process firmware provides us with information about media and interface (SFP module) plugged in, translate that to Linux's PORT_* defines and report via ethtool. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 1 + .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 21 +++++++++++++++++++ .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.h | 24 ++++++++++++++++++++++ 3 files changed, 46 insertions(+) commit 42b1e6aa4672beba79882673c687985b884f7904 Author: Jakub Kicinski Date: Tue Apr 4 16:12:28 2017 -0700 nfp: report auto-negotiation in ethtool NSP ABI version 0.17 is exposing the autonegotiation settings. Report whether autoneg is on via ethtool. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 4 ++++ drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 2 ++ drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.h | 11 +++++++++++ 3 files changed, 17 insertions(+) commit 21d529d5eb31f905f8c028956204a0d1bdafbc4b Author: Jakub Kicinski Date: Tue Apr 4 16:12:27 2017 -0700 nfp: report link speed from NSP On the PF prefer the link speed value provided by the NSP. Refresh port table if needed. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 172f638c93dd0b90b231d07662e64025b1e53e38 Author: Jakub Kicinski Date: Tue Apr 4 16:12:26 2017 -0700 nfp: add port state refresh We will need a way of refreshing port state for link settings get/set. For get we need to refresh port speed and type. When settings are changed the reconfiguration may require reboot before it's effective. Unregister netdevs affected by reconfiguration from a workqueue. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.h | 3 + drivers/net/ethernet/netronome/nfp/nfp_net.h | 1 + drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 89 +++++++++++++++++++++-- 3 files changed, 85 insertions(+), 8 deletions(-) commit cee4295133ba3b85b2f22b542d8855232deba4a3 Author: Jakub Kicinski Date: Tue Apr 4 16:12:25 2017 -0700 nfp: track link state changes For caching link settings - remember if we have seen link events since the last time the eth_port information was refreshed. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 6 +++++- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) commit d12537df343ec21054769f59bda3b15879644f52 Author: Jakub Kicinski Date: Tue Apr 4 16:12:24 2017 -0700 nfp: add mutex protection for the port list We will want to unregister netdevs after their port got reconfigured. For that we need to make sure manipulations of port list from the port reconfiguration flow will not race with driver's .remove() callback. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 3 +-- drivers/net/ethernet/netronome/nfp/nfp_main.h | 3 +++ drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 19 +++++++++++++++++-- 3 files changed, 21 insertions(+), 4 deletions(-) commit b9de00770db50ce11f64cd7676dbcaf295a1926f Author: Jakub Kicinski Date: Tue Apr 4 16:12:23 2017 -0700 nfp: don't spawn netdevs for reconfigured ports After port reconfiguration (port split, media type change) firmware will continue to report old configuration until reboot. NSP will inform us that reconfiguration is pending. To avoid user confusion refuse to spawn netdevs until the new configuration is applied (reboot). We need to split the netdev to eth_table port matching from MAC search and move it earlier in the probe() flow. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.h | 5 +- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 79 +++++++++++++--------- .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 12 +++- .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.h | 3 + 4 files changed, 62 insertions(+), 37 deletions(-) commit 265aeb511bd590f193661c6cffff43a8a80755e4 Author: Jakub Kicinski Date: Tue Apr 4 16:12:22 2017 -0700 nfp: add support for .get_link_ksettings() Read link speed from the BAR. This provides very basic information and works for both PFs and VFs. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 13 ++++++ .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 49 ++++++++++++++++++++++ 2 files changed, 62 insertions(+) commit 19bc4e05fa9600a62051de637d0b1fda5585da64 Author: Sean Young Date: Tue Mar 7 17:01:48 2017 -0300 [media] staging: sir: use usleep_range() rather than busy looping usleep_range() is perfect for this. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_sir.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit 43371f6b327f9fbf1df057be7ce057a0fd841e4c Author: Sean Young Date: Tue Mar 7 16:25:45 2017 -0300 [media] staging: sir: fix checkpatch strict warnings Make the code more readable and clean up the includes list. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_sir.c | 45 +++++++---------------------------- 1 file changed, 8 insertions(+), 37 deletions(-) commit 771a52584096c45e4565e8aabb596eece9d73d61 Author: Shamir Rabinovitch Date: Wed Mar 29 06:21:59 2017 -0400 IB/IPoIB: ibX: failed to create mcg debug file When udev renames the netdev devices, ipoib debugfs entries does not get renamed. As a result, if subsequent probe of ipoib device reuse the name then creating a debugfs entry for the new device would fail. Also, moved ipoib_create_debug_files and ipoib_delete_debug_files as part of ipoib event handling in order to avoid any race condition between these. Fixes: 1732b0ef3b3a ([IPoIB] add path record information in debugfs) Cc: stable@vger.kernel.org # 2.6.15+ Signed-off-by: Vijay Kumar Signed-off-by: Shamir Rabinovitch Reviewed-by: Mark Bloch Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_fs.c | 3 +++ drivers/infiniband/ulp/ipoib/ipoib_main.c | 44 +++++++++++++++++++++++++++---- drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 3 --- 3 files changed, 42 insertions(+), 8 deletions(-) commit 402e7b63df726c37d3741aeec5d149b409be5143 Author: Sean Young Date: Tue Mar 7 16:13:15 2017 -0300 [media] staging: sir: remove unselectable Tekram and Actisys Support for these sir ports is not compiled in by default, it has to be enabled by manually defining LIRC_TEKRAM, LIRC_SIR_ACTISYS_ACT200L or LIRC_SIR_ACTISYS_ACT220L somewhere. This cannot be done from Kconfig at all so remove them from the driver. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_sir.c | 348 +--------------------------------- 1 file changed, 3 insertions(+), 345 deletions(-) commit cf9ed9aa5b0c196b796d2728218e3c06b0f42d90 Author: Sean Young Date: Sat Mar 25 07:31:57 2017 -0300 [media] staging: sir: fill in missing fields and fix probe Some fields are left blank. Cc: stable@vger.kernel.org # v4.11 Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_sir.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit cd6ce4a5737829052abc4ffc8befd0adfff8998d Author: Mark Brown Date: Thu Mar 30 15:56:01 2017 +0100 IB/hns: Explicitly include linux/of.h hns_roce_hw_v1.c uses DT interfaces but relies on implict inclusion of linux/of.h which means that changes in other headers could break the build, as happened in -next for arm64 today. Add an explicit include. Signed-off-by: Mark Brown Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 + 1 file changed, 1 insertion(+) commit ae8a442dfdc4fc3197c8aa09bb179345b2c1f49e Author: Sameer Goel Date: Mon Apr 3 11:26:33 2017 +0900 efi/libstub/arm*: Set default address and size cells values for an empty dtb In cases where a device tree is not provided (ie ACPI based system), an empty fdt is generated by efistub. #address-cells and #size-cells are not set in the empty fdt, so they default to 1 (4 byte wide). This can be an issue on 64-bit systems where values representing addresses, etc may be 8 bytes wide as the default value does not align with the general requirements for an empty DTB, and is fragile when passed to other agents as extra care is required to read the entire width of a value. This issue is observed on Qualcomm Technologies QDF24XX platforms when kexec-tools inserts 64-bit addresses into the "linux,elfcorehdr" and "linux,usable-memory-range" properties of the fdt. When the values are later consumed, they are truncated to 32-bit. Setting #address-cells and #size-cells to 2 at creation of the empty fdt resolves the observed issue, and makes the fdt less fragile. Signed-off-by: Sameer Goel Signed-off-by: Jeffrey Hugo Signed-off-by: AKASHI Takahiro Reviewed-by: Ard Biesheuvel Signed-off-by: Catalin Marinas drivers/firmware/efi/libstub/fdt.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit fcbd4bb71e913d4be7a6d39f622479499bb73bfe Author: James Morse Date: Mon Apr 3 11:26:06 2017 +0900 Documentation: dt: chosen properties for arm64 kdump Add documentation for DT properties: linux,usable-memory-range linux,elfcorehdr used by arm64 kdump. Those are, respectively, a usable memory range allocated to crash dump kernel and the elfcorehdr's location within it. Signed-off-by: James Morse [takahiro.akashi@linaro.org: update the text due to recent changes ] Signed-off-by: AKASHI Takahiro Acked-by: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Rob Herring Signed-off-by: Catalin Marinas Documentation/devicetree/bindings/chosen.txt | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 0ceb7d887ed6cf22d84657fa31a1521a7e935473 Author: AKASHI Takahiro Date: Mon Apr 3 11:24:40 2017 +0900 Documentation: kdump: describe arm64 port Add arch specific descriptions about kdump usage on arm64 to kdump.txt. Signed-off-by: AKASHI Takahiro Reviewed-by: Baoquan He Acked-by: Dave Young Acked-by: Catalin Marinas Signed-off-by: Catalin Marinas Documentation/kdump/kdump.txt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 3f5c1e1e761981b41d0be22f9aadfc7458fcc786 Author: AKASHI Takahiro Date: Mon Apr 3 11:24:39 2017 +0900 arm64: kdump: enable kdump in defconfig Kdump is enabled by default as kexec is. Signed-off-by: AKASHI Takahiro Acked-by: Catalin Marinas Signed-off-by: Catalin Marinas arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit e62aaeac426ab1ddbdde524797b2a7835f606d91 Author: AKASHI Takahiro Date: Mon Apr 3 11:24:38 2017 +0900 arm64: kdump: provide /proc/vmcore file Arch-specific functions are added to allow for implementing a crash dump file interface, /proc/vmcore, which can be viewed as a ELF file. A user space tool, like kexec-tools, is responsible for allocating a separate region for the core's ELF header within crash kdump kernel memory and filling it in when executing kexec_load(). Then, its location will be advertised to crash dump kernel via a new device-tree property, "linux,elfcorehdr", and crash dump kernel preserves the region for later use with reserve_elfcorehdr() at boot time. On crash dump kernel, /proc/vmcore will access the primary kernel's memory with copy_oldmem_page(), which feeds the data page-by-page by ioremap'ing it since it does not reside in linear mapping on crash dump kernel. Meanwhile, elfcorehdr_read() is simple as the region is always mapped. Signed-off-by: AKASHI Takahiro Reviewed-by: James Morse Acked-by: Catalin Marinas Signed-off-by: Catalin Marinas arch/arm64/Kconfig | 11 +++++++ arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/crash_dump.c | 71 ++++++++++++++++++++++++++++++++++++++++++ arch/arm64/mm/init.c | 53 +++++++++++++++++++++++++++++++ 4 files changed, 136 insertions(+) commit 20a166243328c14a0c24bd8c7919223ab4174917 Author: AKASHI Takahiro Date: Mon Apr 3 11:24:37 2017 +0900 arm64: kdump: add VMCOREINFO's for user-space tools In addition to common VMCOREINFO's defined in crash_save_vmcoreinfo_init(), we need to know, for crash utility, - kimage_voffset - PHYS_OFFSET to examine the contents of a dump file (/proc/vmcore) correctly due to the introduction of KASLR (CONFIG_RANDOMIZE_BASE) in v4.6. - VA_BITS is also required for makedumpfile command. arch_crash_save_vmcoreinfo() appends them to the dump file. More VMCOREINFO's may be added later. Signed-off-by: AKASHI Takahiro Reviewed-by: James Morse Acked-by: Catalin Marinas Signed-off-by: Catalin Marinas arch/arm64/kernel/machine_kexec.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 78fd584cdec0518075cf3aa75e5ec491cc8f3ff3 Author: AKASHI Takahiro Date: Mon Apr 3 11:24:36 2017 +0900 arm64: kdump: implement machine_crash_shutdown() Primary kernel calls machine_crash_shutdown() to shut down non-boot cpus and save registers' status in per-cpu ELF notes before starting crash dump kernel. See kernel_kexec(). Even if not all secondary cpus have shut down, we do kdump anyway. As we don't have to make non-boot(crashed) cpus offline (to preserve correct status of cpus at crash dump) before shutting down, this patch also adds a variant of smp_send_stop(). Signed-off-by: AKASHI Takahiro Reviewed-by: James Morse Acked-by: Catalin Marinas Signed-off-by: Catalin Marinas arch/arm64/include/asm/hardirq.h | 2 +- arch/arm64/include/asm/kexec.h | 42 +++++++++++++++++++++++- arch/arm64/include/asm/smp.h | 3 ++ arch/arm64/kernel/machine_kexec.c | 58 ++++++++++++++++++++++++++++++--- arch/arm64/kernel/smp.c | 68 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 167 insertions(+), 6 deletions(-) commit 254a41c0ba0573fa23272945d3fbe39efcc5d07d Author: AKASHI Takahiro Date: Mon Apr 3 11:24:35 2017 +0900 arm64: hibernate: preserve kdump image around hibernation Since arch_kexec_protect_crashkres() removes a mapping for crash dump kernel image, the loaded data won't be preserved around hibernation. In this patch, helper functions, crash_prepare_suspend()/ crash_post_resume(), are additionally called before/after hibernation so that the relevant memory segments will be mapped again and preserved just as the others are. In addition, to minimize the size of hibernation image, crash_is_nosave() is added to pfn_is_nosave() in order to recognize only the pages that hold loaded crash dump kernel image as saveable. Hibernation excludes any pages that are marked as Reserved and yet "nosave." Signed-off-by: AKASHI Takahiro Reviewed-by: James Morse Signed-off-by: Catalin Marinas arch/arm64/include/asm/kexec.h | 10 ++++++ arch/arm64/kernel/hibernate.c | 10 +++++- arch/arm64/kernel/machine_kexec.c | 71 +++++++++++++++++++++++++++++++++++++++ arch/arm64/mm/init.c | 27 +++++++++++++++ 4 files changed, 117 insertions(+), 1 deletion(-) commit 98d2e1539b84abddce4b3c2ca8733f6aeacdee47 Author: Takahiro Akashi Date: Mon Apr 3 11:24:34 2017 +0900 arm64: kdump: protect crash dump kernel memory arch_kexec_protect_crashkres() and arch_kexec_unprotect_crashkres() are meant to be called by kexec_load() in order to protect the memory allocated for crash dump kernel once the image is loaded. The protection is implemented by unmapping the relevant segments in crash dump kernel memory, rather than making it read-only as other archs do, to prevent coherency issues due to potential cache aliasing (with mismatched attributes). Page-level mappings are consistently used here so that we can change the attributes of segments in page granularity as well as shrink the region also in page granularity through /sys/kernel/kexec_crash_size, putting the freed memory back to buddy system. Signed-off-by: AKASHI Takahiro Reviewed-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/kernel/machine_kexec.c | 32 +++++++++--- arch/arm64/mm/mmu.c | 103 ++++++++++++++++++++------------------ 2 files changed, 80 insertions(+), 55 deletions(-) commit 1e7710f3f6563940bb6bbc94aa8eadfd344a86af Author: Matan Barak Date: Tue Apr 4 13:31:47 2017 +0300 IB/core: Change completion channel to use the reworked objects schema This patch adds the standard fd based type - completion_channel. The completion_channel is now prefixed with ib_uobject, similarly to the rest of the uobjects. This requires a few changes: (1) We define a new completion channel fd based object type. (2) completion_event and async_event are now two different types. This means they use different fops. (3) We release the completion_channel exactly as we release other idr based objects. (4) Since ib_uobjects are already kref-ed, we only add the kref to the async event. A fd object requires filling out several parameters. Its op pointer should point to uverbs_fd_ops and its size should be at least the size if ib_uobject. We use a macro to make the type declaration easier. Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs.h | 26 ++- drivers/infiniband/core/uverbs_cmd.c | 57 +++--- drivers/infiniband/core/uverbs_main.c | 279 +++++++++++++++++------------ drivers/infiniband/core/uverbs_std_types.c | 33 +++- include/rdma/uverbs_std_types.h | 1 + include/rdma/uverbs_types.h | 9 + 6 files changed, 257 insertions(+), 148 deletions(-) commit cf8966b3477d5e6545393bb4499f2051ea554c62 Author: Matan Barak Date: Tue Apr 4 13:31:46 2017 +0300 IB/core: Add support for fd objects The completion channel we use in verbs infrastructure is FD based. Previously, we had a separate way to manage this object. Since we strive for a single way to manage any kind of object in this infrastructure, we conceptually treat all objects as subclasses of ib_uobject. This commit adds the necessary mechanism to support FD based objects like their IDR counterparts. FD objects release need to be synchronized with context release. We use the cleanup_mutex on the uverbs_file for that. Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/core/rdma_core.c | 177 +++++++++++++++++++++++++++++++++- drivers/infiniband/core/rdma_core.h | 8 ++ drivers/infiniband/core/uverbs.h | 1 + drivers/infiniband/core/uverbs_main.c | 4 +- include/rdma/ib_verbs.h | 6 ++ include/rdma/uverbs_types.h | 16 +++ 6 files changed, 210 insertions(+), 2 deletions(-) commit f48b726920d96dcd1860df06143bdea7d6d7dcc3 Author: Matan Barak Date: Tue Apr 4 13:31:45 2017 +0300 IB/core: Add lock to multicast handlers When two handlers used the same object in the old schema, we blocked the process in the kernel. The new schema just returns -EBUSY. This could lead to different behaviour in applications between the old schema and the new schema. In most cases, using such handlers concurrently could lead to crashing the process. For example, if thread A destroys a QP and thread B modifies it, we could have the destruction happens before the modification. In this case, we are accessing freed memory which could lead to crashing the process. This is true for most cases. However, attaching and detaching a multicast address from QP concurrently is safe. Therefore, we preserve the original behaviour by adding a lock there. Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs.h | 2 ++ drivers/infiniband/core/uverbs_cmd.c | 5 +++++ 2 files changed, 7 insertions(+) commit fd3c7904db6e05043398aee5c1448682acfb025b Author: Matan Barak Date: Tue Apr 4 13:31:44 2017 +0300 IB/core: Change idr objects to use the new schema This changes only the handlers which deals with idr based objects to use the new idr allocation, fetching and destruction schema. This patch consists of the following changes: (1) Allocation, fetching and destruction is done via idr ops. (2) Context initializing and release is done through uverbs_initialize_ucontext and uverbs_cleanup_ucontext. (3) Ditching the live flag. Mostly, this is pretty straight forward. The only place that is a bit trickier is in ib_uverbs_open_qp. Commit [1] added code to check whether the uobject is already live and initialized. This mostly happens because of a race between open_qp and events. We delayed assigning the uobject's pointer in order to eliminate this race without using the live variable. [1] commit a040f95dc819 ("IB/core: Fix XRC race condition in ib_uverbs_open_qp") Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/core/rdma_core.h | 15 + drivers/infiniband/core/uverbs.h | 2 - drivers/infiniband/core/uverbs_cmd.c | 1311 ++++++++------------------------- drivers/infiniband/core/uverbs_main.c | 142 +--- include/rdma/ib_verbs.h | 13 - include/rdma/uverbs_std_types.h | 63 ++ 6 files changed, 402 insertions(+), 1144 deletions(-) commit 6be60aed126ccd4dfb4a60d1dc2ecec0bca21b2e Author: Matan Barak Date: Tue Apr 4 13:31:43 2017 +0300 IB/core: Add idr based standard types This patch adds the standard idr based types. These types are used in downstream patches in order to initialize, destroy and lookup IB standard objects which are based on idr objects. An idr object requires filling out several parameters. Its op pointer should point to uverbs_idr_ops and its size should be at least the size of ib_uobject. We add a macro to make the type declaration easier. Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Reviewed-by: Sean Hefty Signed-off-by: Doug Ledford drivers/infiniband/core/Makefile | 2 +- drivers/infiniband/core/uverbs.h | 5 +- drivers/infiniband/core/uverbs_cmd.c | 16 +- drivers/infiniband/core/uverbs_main.c | 8 +- drivers/infiniband/core/uverbs_std_types.c | 244 +++++++++++++++++++++++++++++ include/rdma/uverbs_std_types.h | 50 ++++++ include/rdma/uverbs_types.h | 14 ++ 7 files changed, 329 insertions(+), 10 deletions(-) commit 3832125624b75b54567be906e9aa67e1343be569 Author: Matan Barak Date: Tue Apr 4 13:31:42 2017 +0300 IB/core: Add support for idr types The new ioctl infrastructure supports driver specific objects. Each such object type has a hot unplug function, allocation size and an order of destruction. When a ucontext is created, a new list is created in this ib_ucontext. This list contains all objects created under this ib_ucontext. When a ib_ucontext is destroyed, we traverse this list several time destroying the various objects by the order mentioned in the object type description. If few object types have the same destruction order, they are destroyed in an order opposite to their creation. Adding an object is done in two parts. First, an object is allocated and added to idr tree. Then, the command's handlers (in downstream patches) could work on this object and fill in its required details. After a successful command, the commit part is called and the user objects become ucontext visible. If the handler failed, alloc_abort should be called. Removing an uboject is done by calling lookup_get with the write flag and finalizing it with destroy_commit. A major change from the previous code is that we actually destroy the kernel object itself in destroy_commit (rather than just the uobject). We should make sure idr (per-uverbs-file) and list (per-ucontext) could be accessed concurrently without corrupting them. Signed-off-by: Matan Barak Reviewed-by: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/core/Makefile | 3 +- drivers/infiniband/core/rdma_core.c | 450 ++++++++++++++++++++++++++++++++++++ drivers/infiniband/core/rdma_core.h | 55 +++++ include/rdma/ib_verbs.h | 21 ++ include/rdma/uverbs_types.h | 132 +++++++++++ 5 files changed, 660 insertions(+), 1 deletion(-) commit 771addf60ac0a266a023c3e7fcae9a629658b455 Author: Matan Barak Date: Tue Apr 4 13:31:41 2017 +0300 IB/core: Refactor idr to be per uverbs_file The current code creates an idr per type. Since types are currently common for all drivers and known in advance, this was good enough. However, the proposed ioctl based infrastructure allows each driver to declare only some of the common types and declare its own specific types. Thus, we decided to implement idr to be per uverbs_file. Signed-off-by: Matan Barak Signed-off-by: Leon Romanovsky Signed-off-by: Haggai Eran Reviewed-by: Sean Hefty Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs.h | 19 ++-- drivers/infiniband/core/uverbs_cmd.c | 157 ++++++++++++++++------------------ drivers/infiniband/core/uverbs_main.c | 45 +++------- include/rdma/ib_verbs.h | 1 + 4 files changed, 95 insertions(+), 127 deletions(-) commit 9b0aa14e31555b64460c1ee323d0e19bf891958b Author: AKASHI Takahiro Date: Mon Apr 3 11:24:33 2017 +0900 arm64: mm: add set_memory_valid() This function validates and invalidates PTE entries, and will be utilized in kdump to protect loaded crash dump kernel image. Signed-off-by: AKASHI Takahiro Reviewed-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/include/asm/cacheflush.h | 1 + arch/arm64/mm/pageattr.c | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) commit 764b51ead10d5f428cb5f167bf98e336bdc23f8c Author: AKASHI Takahiro Date: Mon Apr 3 11:24:32 2017 +0900 arm64: kdump: reserve memory for crash dump kernel "crashkernel=" kernel parameter specifies the size (and optionally the start address) of the system ram to be used by crash dump kernel. reserve_crashkernel() will allocate and reserve that memory at boot time of primary kernel. The memory range will be exposed to userspace as a resource named "Crash kernel" in /proc/iomem. Signed-off-by: AKASHI Takahiro Signed-off-by: Mark Salter Signed-off-by: Pratyush Anand Reviewed-by: James Morse Acked-by: Catalin Marinas Reviewed-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/kernel/setup.c | 7 ++++- arch/arm64/mm/init.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 1 deletion(-) commit 8f579b1c4e347b23bfa747bc2cc0a55dd1b7e5fa Author: AKASHI Takahiro Date: Mon Apr 3 11:24:31 2017 +0900 arm64: limit memory regions based on DT property, usable-memory-range Crash dump kernel uses only a limited range of available memory as System RAM. On arm64 kdump, This memory range is advertised to crash dump kernel via a device-tree property under /chosen, linux,usable-memory-range = Crash dump kernel reads this property at boot time and calls memblock_cap_memory_range() to limit usable memory which are listed either in UEFI memory map table or "memory" nodes of a device tree blob. Signed-off-by: AKASHI Takahiro Reviewed-by: Geoff Levand Acked-by: Catalin Marinas Acked-by: Mark Rutland Reviewed-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/mm/init.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit c9ca9b4e2198a4dbeb83739460d4a7ff9ffed24f Author: AKASHI Takahiro Date: Mon Apr 3 11:23:55 2017 +0900 memblock: add memblock_cap_memory_range() Add memblock_cap_memory_range() which will remove all the memblock regions except the memory range specified in the arguments. In addition, rework is done on memblock_mem_limit_remove_map() to re-implement it using memblock_cap_memory_range(). This function, like memblock_mem_limit_remove_map(), will not remove memblocks with MEMMAP_NOMAP attribute as they may be mapped and accessed later as "device memory." See the commit a571d4eb55d8 ("mm/memblock.c: add new infrastructure to address the mem limit issue"). This function is used, in a succeeding patch in the series of arm64 kdump suuport, to limit the range of usable memory, or System RAM, on crash dump kernel. (Please note that "mem=" parameter is of little use for this purpose.) Signed-off-by: AKASHI Takahiro Reviewed-by: Will Deacon Acked-by: Catalin Marinas Acked-by: Dennis Chen Cc: linux-mm@kvack.org Cc: Andrew Morton Reviewed-by: Ard Biesheuvel Signed-off-by: Catalin Marinas include/linux/memblock.h | 1 + mm/memblock.c | 44 +++++++++++++++++++++++++++++--------------- 2 files changed, 30 insertions(+), 15 deletions(-) commit 4c546b8a34690ca858e50f2017b8bb6e358365d1 Author: AKASHI Takahiro Date: Mon Apr 3 11:23:54 2017 +0900 memblock: add memblock_clear_nomap() This function, with a combination of memblock_mark_nomap(), will be used in a later kdump patch for arm64 when it temporarily isolates some range of memory from the other memory blocks in order to create a specific kernel mapping at boot time. Signed-off-by: AKASHI Takahiro Reviewed-by: Ard Biesheuvel Signed-off-by: Catalin Marinas include/linux/memblock.h | 1 + mm/memblock.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) commit d6c1dc3f52e3a65f35c58433ba57d14c0bad902f Author: Laxman Dewangan Date: Tue Apr 4 18:59:50 2017 +0530 regulator: Add settling time for non-linear voltage transition Some regulators (some PWM regulators) have the voltage transition non-linear i.e. exponentially. On such cases, the settling time for voltage transition can not be presented in the voltage-ramp-delay. Add new property for non-linear voltage transition and handle this in getting the voltage settling time. Signed-off-by: Laxman Dewangan Signed-off-by: Mark Brown drivers/regulator/core.c | 2 ++ drivers/regulator/of_regulator.c | 4 ++++ include/linux/regulator/machine.h | 3 +++ 3 files changed, 9 insertions(+) commit cfd2cedb482ae29ce13a3db46cc24f0c082ca9cf Author: Laxman Dewangan Date: Tue Apr 4 18:59:49 2017 +0530 regulator: DT: Add settling time property for non-linear voltage change Some regulators (some PWM regulators) have the voltage transition exponentially. On such cases, the settling time for voltage change is treated as constant time. Add DT property for providing the settling time for any level of voltage change for non-linear voltage change. signed-off-by: Laxman Dewangan Acked-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/regulator/regulator.txt | 3 +++ 1 file changed, 3 insertions(+) commit c12c1aad98bb75b435e79c6208b56d2018b42f8b Author: Kuninori Morimoto Date: Mon Apr 3 06:31:22 2017 +0000 ASoC: soc-core: verify Sound Card normality Current ALSA SoC Sound Card basically consists of CPU/Codec/Platform components. If system uses Kernel modules, we can disable these drivers by using rmmod command. In such case, we can't disable CPU/Codec/Platform driver without disabling Sound Card driver. But on the other hand, we can disable these drivers by using unbind command. In such case, we can disable these drivers randomly. In this case, we can create dirty Sound Card which is missing necessary components. (1) If user disabled Sound Card first, but did nothing to other drivers, user can't use Sound because Sound Card is no longer exists. (2) If user disabled CPU/Codec/Platform driver randomly, but did nothing to Sound Card, user still be able to use Sound Card, because dirty Sound Card still exists. In this case, Sound system will be crashed if user started sound playback/capture. But we can't block such random unbind now. To avoid Sound Card crash in (2) case, we need to unregister Sound Card whenever CPU/Codec/Platform component were unregistered. This patch solves this issue. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 5 +++++ 1 file changed, 5 insertions(+) commit 84fdc00d519ffdf8ae6e34d7841bcc6f38928953 Author: Daniel Baluta Date: Tue Apr 4 19:45:13 2017 +0300 ASoC: codec: wm9860: Refactor PLL out freq search Add a separate function for deriving (sysclk, lrclk, bclk) when the clock is auto or pll. Signed-off-by: Daniel Baluta Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8960.c | 93 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 64 insertions(+), 29 deletions(-) commit 7b87463edf3e2c16d72eeea3d1cf3c12bb5487c6 Author: Javier Martinez Canillas Date: Tue Apr 4 15:26:30 2017 -0400 ASoC: rt5677: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Before this patch: $ modinfo sound/soc/codecs/snd-soc-rt5677.ko | grep alias alias: i2c:RT5677CE:00 alias: i2c:rt5676 alias: i2c:rt5677 After this patch: $ modinfo sound/soc/codecs/snd-soc-rt5677.ko | grep alias alias: of:N*T*Crealtek,rt5677C* alias: of:N*T*Crealtek,rt5677 alias: i2c:RT5677CE:00 alias: i2c:rt5676 alias: i2c:rt5677 Signed-off-by: Javier Martinez Canillas Signed-off-by: Mark Brown sound/soc/codecs/rt5677.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 5cf015d9cb02c360582b624497b0a1716881cf28 Author: Javier Martinez Canillas Date: Tue Apr 4 15:26:29 2017 -0400 ASoC: wm8978: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Before this patch: $ modinfo sound/soc/codecs/snd-soc-wm8978.ko | grep alias alias: i2c:wm8978 After this patch: $ modinfo sound/soc/codecs/snd-soc-wm8978.ko | grep alias alias: i2c:wm8978 alias: of:N*T*Cwlf,wm8978C* alias: of:N*T*Cwlf,wm8978 Signed-off-by: Javier Martinez Canillas Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8978.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ea22a26e676ebc39a2ba7836e814864bf85324e7 Author: Javier Martinez Canillas Date: Tue Apr 4 15:26:28 2017 -0400 ASoC: uda1380: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Before this patch: $ modinfo sound/soc/codecs/snd-soc-uda1380.ko | grep alias alias: i2c:uda1380 After this patch: $ modinfo sound/soc/codecs/snd-soc-uda1380.ko | grep alias alias: of:N*T*Cnxp,uda1380C* alias: of:N*T*Cnxp,uda1380 alias: i2c:uda1380 Signed-off-by: Javier Martinez Canillas Signed-off-by: Mark Brown sound/soc/codecs/uda1380.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 9abe464821a0e66c0343ce943f3eb343bf8990f3 Author: Javier Martinez Canillas Date: Tue Apr 4 15:26:27 2017 -0400 ASoC: sta529: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Before this patch: $ modinfo sound/soc/codecs/snd-soc-sta529.ko | grep alias alias: i2c:sta529 After this patch: $ modinfo sound/soc/codecs/snd-soc-sta529.ko | grep alias alias: of:N*T*Cst,sta529C* alias: of:N*T*Cst,sta529 alias: i2c:sta529 Signed-off-by: Javier Martinez Canillas Signed-off-by: Mark Brown sound/soc/codecs/sta529.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 71c314d7ef2442cd798584a3dece8151215e1777 Author: Javier Martinez Canillas Date: Tue Apr 4 15:26:26 2017 -0400 ASoC: ssm4567: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Before this patch: $ modinfo sound/soc/codecs/snd-soc-ssm4567.ko | grep alias alias: acpi*:INT343B:* alias: i2c:ssm4567 After this patch: $ modinfo sound/soc/codecs/snd-soc-ssm4567.ko | grep alias alias: acpi*:INT343B:* alias: of:N*T*Cadi,ssm4567C* alias: of:N*T*Cadi,ssm4567 alias: i2c:ssm4567 Signed-off-by: Javier Martinez Canillas Signed-off-by: Mark Brown sound/soc/codecs/ssm4567.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9ba2da5f5d18daaa365ab5426b05e16f1d114786 Author: Javier Martinez Canillas Date: Tue Apr 4 15:26:25 2017 -0400 ASoc: rt5645: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Before this patch: $ modinfo sound/soc/codecs/snd-soc-rt5645.ko | grep alias alias: acpi*:10EC3270:* alias: acpi*:10EC5640:* alias: acpi*:10EC5650:* alias: acpi*:10EC5648:* alias: acpi*:10EC5645:* alias: i2c:rt5650 alias: i2c:rt5645 After this patch: $ modinfo sound/soc/codecs/snd-soc-rt5645.ko | grep alias alias: of:N*T*Crealtek,rt5650C* alias: of:N*T*Crealtek,rt5650 alias: of:N*T*Crealtek,rt5645C* alias: of:N*T*Crealtek,rt5645 alias: acpi*:10EC3270:* alias: acpi*:10EC5640:* alias: acpi*:10EC5650:* alias: acpi*:10EC5648:* alias: acpi*:10EC5645:* alias: i2c:rt5650 alias: i2c:rt5645 Signed-off-by: Javier Martinez Canillas Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 13023ff3b3372543e4197b4b57d378350780fe96 Author: Javier Martinez Canillas Date: Tue Apr 4 14:59:30 2017 -0400 ASoC: cs53l30: Set .of_match_table to OF device ID table The driver has an OF device ID table but the struct i2c_driver .of_match_table field is not set. Signed-off-by: Javier Martinez Canillas Signed-off-by: Mark Brown sound/soc/codecs/cs53l30.c | 1 + 1 file changed, 1 insertion(+) commit 56af0e4cd27c402691d0da8aa4a5233944085b44 Author: Javier Martinez Canillas Date: Tue Apr 4 13:19:39 2017 -0400 ASoC: max9867: export OF device ID as module aliases The I2C core always reports a MODALIAS of the form i2c: even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. While there, move the MODULE_DEVICE_TABLE(i2c, max9867_i2c_id) just next to the I2C device table declaration, for consistency with other drivers. Before this patch: $ modinfo sound/soc/codecs/snd-soc-max9867.ko | grep alias alias: i2c:max9867 After this patch: $ modinfo sound/soc/codecs/snd-soc-max9867.ko | grep alias alias: i2c:max9867 alias: of:N*T*Cmaxim,max9867C* alias: of:N*T*Cmaxim,max9867 Signed-off-by: Javier Martinez Canillas Signed-off-by: Mark Brown sound/soc/codecs/max9867.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 18148f09c0fbfb0109804d713b6b691e30d5dfad Merge: af0e546 57e83fb Author: David S. Miller Date: Wed Apr 5 09:56:22 2017 -0700 Merge tag 'linux-can-next-for-4.13-20170404' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2017-03-03 this is a pull request of 5 patches for net-next/master. There are two patches by Yegor Yefremov which convert the ti_hecc driver into a DT only driver, as there is no in-tree user of the old platform driver interface anymore. The next patch by Mario Kicherer adds network namespace support to the can subsystem. The last two patches by Akshay Bhat add support for the holt_hi311x SPI CAN driver. ==================== Signed-off-by: David S. Miller commit b0d36daa0ab54714e05164f6e21d22f974a5eec1 Author: Thierry Reding Date: Wed Mar 22 19:15:18 2017 +0100 gpu: host1x: Fix host1x driver shutdown Shutting down a host1x device currently crashes if the device has failed to probe. The root cause is that the host1x shutdown is implemented as a struct bus_type callback, but in turn relies on the driver bound to the device. On failure to probe, no driver will be bound and cause the code to crash. Fix this by moving the ->probe(), ->remove() and ->shutdown() callbacks to the driver rather than the bus. Signed-off-by: Thierry Reding drivers/gpu/host1x/bus.c | 68 ++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 34 deletions(-) commit b386c6b73ac6c2a9a2f1201d055ab65cc19890a2 Author: Thierry Reding Date: Tue Mar 21 08:54:22 2017 +0100 gpu: host1x: Support module reset Newer versions of Tegra come with early boot software that aggressively puts various modules in reset. Add support to the host1x driver to take the module out of reset on probe, and assert reset on removal. Signed-off-by: Thierry Reding drivers/gpu/host1x/dev.c | 18 +++++++++++++++++- drivers/gpu/host1x/dev.h | 2 ++ 2 files changed, 19 insertions(+), 1 deletion(-) commit 7e7d432c5a736e7106c8700b65d8c31b93bd1c82 Author: Thierry Reding Date: Tue Mar 21 08:54:21 2017 +0100 gpu: host1x: Sort includes alphabetically Sorting includes alphabetically makes it easier and less conflict-prone to add new includes subsequently. Signed-off-by: Thierry Reding drivers/gpu/host1x/dev.c | 17 +++++++++-------- drivers/gpu/host1x/dev.h | 6 +++--- 2 files changed, 12 insertions(+), 11 deletions(-) commit 0ae797a8ba05a2354db5e81c1d7df04671dd1c25 Author: Arto Merilainen Date: Wed Dec 14 13:16:13 2016 +0200 drm/tegra: Add VIC support This patch adds support for Video Image Compositor engine which can be used for 2d operations. Signed-off-by: Andrew Chew Signed-off-by: Arto Merilainen Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/Makefile | 3 +- drivers/gpu/drm/tegra/drm.c | 3 + drivers/gpu/drm/tegra/drm.h | 1 + drivers/gpu/drm/tegra/vic.c | 396 +++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/tegra/vic.h | 31 ++++ include/linux/host1x.h | 1 + 6 files changed, 434 insertions(+), 1 deletion(-) commit 6cc5f00f34c4c1a4891f976b71c0fb1c54a820ab Author: Mikko Perttunen Date: Wed Dec 14 13:16:15 2016 +0200 dt-bindings: Add bindings for the Tegra VIC The VIC (Video Image Compositor) is a Host1x client unit that can do various 2D composition and transform operations. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding .../bindings/display/tegra/nvidia,tegra20-host1x.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 8746f6593d42d67e7cb7ef1f66003738a7357cc8 Author: Arto Merilainen Date: Wed Dec 14 13:16:12 2016 +0200 drm/tegra: Add falcon helper library Add a set of falcon helper routines for use by the tegradrm client drivers of the various falcon-based engines. The falcon is a microcontroller that acts as a frontend for the rest of a particular Tegra engine. In order to properly utilize these engines, the frontend must be booted before pushing any commands. Based on work by Andrew Chew Signed-off-by: Andrew Chew Signed-off-by: Arto Merilainen Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/Makefile | 3 +- drivers/gpu/drm/tegra/falcon.c | 259 +++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/tegra/falcon.h | 127 ++++++++++++++++++++ 3 files changed, 388 insertions(+), 1 deletion(-) commit ad92601521ea1928e702dc709384d21e96202155 Author: Mikko Perttunen Date: Wed Dec 14 13:16:11 2016 +0200 drm/tegra: Add Tegra DRM allocation API Add a new IO virtual memory allocation API to allow clients to allocate non-GEM memory in the Tegra DRM IOMMU domain. This is required e.g. for loading client firmware when clients are attached to the IOMMU domain. The allocator allocates contiguous physical pages that are then mapped contiguously to the IOMMU domain using the iova_domain library provided by the kernel. Contiguous physical pages are used so that the same allocator works also when IOMMU support is disabled and therefore devices access physical memory directly. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/drm.c | 111 +++++++++++++++++++++++++++++++++++++++++--- drivers/gpu/drm/tegra/drm.h | 11 +++++ 2 files changed, 115 insertions(+), 7 deletions(-) commit 5e91144dd702d068b22a75911c06104e56cb4858 Author: Alexandre Courbot Date: Tue Nov 8 16:50:42 2016 +0900 drm/tegra: Add tiling FB modifiers Add FB modifiers to allow user-space to specify that a surface is in one of the two tiling formats supported by Tegra chips, and add support in the tegradrm driver to handle them properly. This is necessary for the display controller to directly display buffers generated by the GPU. This feature is intended to replace the dedicated IOCTL enabled by TEGRA_STAGING and to provide a non-staging alternative to that solution. Signed-off-by: Alexandre Courbot Acked-by: Daniel Vetter Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/drm.c | 2 ++ drivers/gpu/drm/tegra/fb.c | 23 +++++++++++++++++++--- include/uapi/drm/drm_fourcc.h | 45 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 3 deletions(-) commit bdd2f9cd10eb842be96418cc226bc33744d358b0 Author: Thierry Reding Date: Thu Mar 9 20:04:55 2017 +0100 drm/tegra: Don't leak kernel pointer to userspace Each open file descriptor can have any number of contexts associated with it. To differentiate between these contexts a unique ID is required and back when these userspace interfaces were introduced, in commit d43f81cbaf43 ("drm/tegra: Add gr2d device"), the pointer to the context structure was deemed adequate. However, this leaks information about kernel internal memory to userspace, which can potentially be exploited. Switch the context parameter to be allocated from an IDR, which has the added benefit of providing an easy way to look up a context from its ID. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/drm.c | 160 +++++++++++++++++++++++++++++++------------- drivers/gpu/drm/tegra/drm.h | 2 +- 2 files changed, 114 insertions(+), 48 deletions(-) commit 347ad49d35a1c65d509e7ef5b0760e97ede41ec2 Author: Thierry Reding Date: Thu Mar 9 20:04:56 2017 +0100 drm/tegra: Protect IOMMU operations by mutex IOMMU support is currently not thread-safe, which can cause crashes, amongst other things, under certain workloads. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/drm.c | 5 +++++ drivers/gpu/drm/tegra/drm.h | 1 + drivers/gpu/drm/tegra/gem.c | 12 ++++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) commit 398cbaadecdd168fe175d559ddb1671dfa11e582 Author: Thierry Reding Date: Mon Mar 20 20:04:20 2017 +0100 drm/tegra: Enable IOVA API when IOMMU support is enabled When support for an IOMMU has been enabled, make sure the IOVA helper code is also activated and the driver can properly manage the IO virtual address space. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 404bfb78daf3bedafb0bfab24947059575cbea3d Author: Mikko Perttunen Date: Wed Dec 14 13:16:14 2016 +0200 gpu: host1x: Add IOMMU support Add support for the Host1x unit to be located behind an IOMMU. This is required when gather buffers may be allocated non-contiguously in physical memory, as can be the case when TegraDRM is also using the IOMMU. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/cdma.c | 74 ++++++++++++++++++++++++++++++++--------- drivers/gpu/host1x/cdma.h | 6 ++-- drivers/gpu/host1x/dev.c | 41 +++++++++++++++++++++-- drivers/gpu/host1x/dev.h | 6 ++++ drivers/gpu/host1x/hw/cdma_hw.c | 16 ++++----- drivers/gpu/host1x/job.c | 72 +++++++++++++++++++++++++++++++++------ drivers/gpu/host1x/job.h | 1 + 7 files changed, 177 insertions(+), 39 deletions(-) commit 792ad66839b89802673ec1398161234674638255 Author: Damien Riegel Date: Tue Apr 4 16:29:59 2017 -0700 Input: pm8xxx-vib - add support for pm8916's vibrator Add pm8xxx_regs for this PMIC and the device tree match table entry. Signed-off-by: Damien Riegel Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/qcom,pm8xxx-vib.txt | 1 + drivers/input/misc/Kconfig | 2 +- drivers/input/misc/pm8xxx-vibrator.c | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) commit d4c7c5c96c9254017a1aff596a1f43b5bcef7bef Author: Damien Riegel Date: Tue Apr 4 16:27:36 2017 -0700 Input: pm8xxx-vib - handle separate enable register Some PMIC vibrator IPs use a separate enable register to turn the vibrator on and off. To detect if a vibrator uses this feature, rely on the enable_mask being non-zero. Signed-off-by: Damien Riegel Signed-off-by: Dmitry Torokhov drivers/input/misc/pm8xxx-vibrator.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 2de3b7048d029fef8f5c25faa1483f5e66402e49 Author: Damien Riegel Date: Tue Apr 4 16:25:57 2017 -0700 Input: pm8xxx-vib - parametrize the driver In order to prepare this driver to support other vibrators of the same kind, move some hardcoded values to a structure holding register parameters (address, mask, shit of the control register). Signed-off-by: Damien Riegel Signed-off-by: Dmitry Torokhov drivers/input/misc/pm8xxx-vibrator.c | 49 ++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 16 deletions(-) commit f6bcc91ba632ce35005ed8a3cfa01a2498d2d96a Author: Damien Riegel Date: Tue Apr 4 16:25:42 2017 -0700 Input: pm8xxx-vib - reorder header alphabetically Signed-off-by: Damien Riegel Signed-off-by: Dmitry Torokhov drivers/input/misc/pm8xxx-vibrator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dd04dc6dbd7f32b904c3b9916f5eb6be6fc2bb58 Author: Martin Kepplinger Date: Tue Apr 4 10:06:57 2017 -0700 Input: sur40 - fix bad endianness handling in sur40_poll sparse says: sur40.c:372:40: warning: restricted __le32 degrades to integer the header's data is __le32 so we need to convert it before comparing. Signed-off-by: Martin Kepplinger Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/sur40.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d99caa472c0a28dc95dd9b98c30ee46f9755181f Author: Dmitry Torokhov Date: Sun Feb 19 17:21:56 2017 -0800 Input: eeti_ts - switch to gpiod API gpiod API allows standard way of specifying GPIO polarity and takes it into account when reading or setting GPIO state. It also allows us to switch to common way of obtaining GPIO descriptor and away form legacy platform data. Reviewed-by: Daniel Mack Signed-off-by: Dmitry Torokhov arch/arm/mach-pxa/raumfeld.c | 14 +++++++++----- drivers/input/touchscreen/eeti_ts.c | 24 +++++++----------------- include/linux/input/eeti_ts.h | 10 ---------- 3 files changed, 16 insertions(+), 32 deletions(-) commit d422be5f62ef7986d00afa4cd31eda5534ab7991 Author: Dmitry Torokhov Date: Sun Feb 19 16:22:13 2017 -0800 Input: eeti_ts - expect platform code to set interrupt trigger Instead of keying interrupt trigger off GPIO polarity, let's rely on platform code to set it up properly for us. Reviewed-by: Daniel Mack Signed-off-by: Dmitry Torokhov arch/arm/mach-pxa/raumfeld.c | 11 ++++++++++- drivers/input/touchscreen/eeti_ts.c | 6 +----- 2 files changed, 11 insertions(+), 6 deletions(-) commit 8e14be53f470b47d044d9d552bdc3bb4c6723276 Author: Christoph Hellwig Date: Wed Apr 5 15:59:23 2017 +0200 remove the obsolete hd driver This driver is for pre-IDE hardisk that are only found in PC from the stoneage of personal computing, and which we don't support elsewhere in the kernel these days. It's also been marked broken forever. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe drivers/block/Kconfig | 12 - drivers/block/Makefile | 1 - drivers/block/hd.c | 819 ------------------------------------------------- 3 files changed, 832 deletions(-) commit d4d7fc12b642a16732adeacefdaebe684bcb2218 Author: Andrew Price Date: Wed Apr 5 11:45:26 2017 -0400 gfs2: Re-enable fallocate for the rindex Commit 86066914edff2316cbed63aac8a87d5001441a16 "gfs2: Don't support fallocate on jdata files" removed the ability of gfs2_grow to reserve space at the end of the rindex, which could prevent a second gfs2_grow from succeeding if the fs is full. Allow fallocate to work on the rindex once again. Signed-off-by: Andrew Price Signed-off-by: Bob Peterson fs/gfs2/file.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 840db3f93849830c4a55c795ddd6057ad40d4f2d Author: James Hogan Date: Tue Apr 4 15:46:52 2017 +0100 metag/usercopy: Switch to RAW_COPY_USER Switch to using raw user copy instead of providing metag specific [__]copy_{to,from}_user[_inatomic](). This simplifies the metag uaccess.h and allows us to take advantage of extra checking in the generic versions. Signed-off-by: James Hogan Cc: Al Viro Cc: linux-metag@vger.kernel.org Signed-off-by: Al Viro arch/metag/Kconfig | 1 + arch/metag/include/asm/uaccess.h | 31 ++----------------------------- arch/metag/lib/usercopy.c | 6 +++--- 3 files changed, 6 insertions(+), 32 deletions(-) commit a98bba563d262065f230193c4b56c6758e8b4c3b Merge: 2c30541 b884a19 Author: Al Viro Date: Wed Apr 5 11:41:09 2017 -0400 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag into uaccess.metag commit f2fbc9dd78970accd7649e8b87c7f00a0da0cdbc Author: Bart Van Assche Date: Wed Apr 5 08:39:18 2017 -0700 blk-mq: Remove blk_mq_queue_data.list The block layer core sets blk_mq_queue_data.list but no block drivers read that member. Hence remove it and also the code that is used to set this member. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe block/blk-mq.c | 17 ----------------- include/linux/blk-mq.h | 1 - 2 files changed, 18 deletions(-) commit af0e54619d9b6c23f084d310d35fca2e68faa95c Author: LABBE Corentin Date: Tue Apr 4 15:32:47 2017 +0200 selftests: add a generic testsuite for ethernet device This patch add a generic testsuite for testing ethernet network device driver. Signed-off-by: Corentin Labbe Tested-by: Andrew Lunn Signed-off-by: David S. Miller tools/testing/selftests/net/Makefile | 2 +- tools/testing/selftests/net/netdevice.sh | 200 +++++++++++++++++++++++++++++++ 2 files changed, 201 insertions(+), 1 deletion(-) commit 34240c26d1d7b4365d4d0a8d231b244eb396c8dc Author: Ralph Sennhauser Date: Thu Mar 30 18:54:04 2017 +0200 ARM: dts: armada-385-linksys: disk-activity trigger for all Commit a4ee7e18d808 ("ARM: dts: armada: Add default trigger for sata led") adds the default trigger to individual boards, move it to armada-385-linksys.dtsi which effectively enables the definition for the WRT1900ACS (Shelby) as well as for future boards. Signed-off-by: Ralph Sennhauser Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys-caiman.dts | 1 - arch/arm/boot/dts/armada-385-linksys-cobra.dts | 1 - arch/arm/boot/dts/armada-385-linksys.dtsi | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) commit de016df88f23a5ab0cec3a8e05f6066388725b9e Author: Vikas Shivappa Date: Mon Apr 3 14:44:17 2017 -0700 x86/intel_rdt: Update schemata read to show data in tabular format The schemata file displays data from different resources on all domains. Its cumbersome to read since they are not tabular and data/names could be of different widths. Make the schemata file to display data in a tabular format thereby making it nice and simple to read. Signed-off-by: Vikas Shivappa Cc: ravi.v.shankar@intel.com Cc: tony.luck@intel.com Cc: fenghua.yu@intel.com Cc: peterz@infradead.org Cc: vikas.shivappa@intel.com Cc: h.peter.anvin@intel.com Link: http://lkml.kernel.org/r/1491255857-17213-4-git-send-email-vikas.shivappa@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/intel_rdt.h | 4 ++++ arch/x86/kernel/cpu/intel_rdt.c | 30 ++++++++++++++++++++++++++++++ arch/x86/kernel/cpu/intel_rdt_schemata.c | 5 +++-- 3 files changed, 37 insertions(+), 2 deletions(-) commit c4026b7b95a4b852e404afa2cd7720866159d118 Author: Tony Luck Date: Mon Apr 3 14:44:16 2017 -0700 x86/intel_rdt: Implement "update" mode when writing schemata file The schemata file can have multiple lines and it is cumbersome to update all lines. Remove code that requires that the user provides values for every resource (in the right order). If the user provides values for just a few resources, update them and leave the rest unchanged. Side benefit: we now check which values were updated and only send IPIs to cpus that actually have updates. Signed-off-by: Tony Luck Signed-off-by: Vikas Shivappa Tested-by: Sai Praneeth Prakhya Cc: ravi.v.shankar@intel.com Cc: fenghua.yu@intel.com Cc: peterz@infradead.org Cc: vikas.shivappa@intel.com Cc: h.peter.anvin@intel.com Link: http://lkml.kernel.org/r/1491255857-17213-3-git-send-email-vikas.shivappa@linux.intel.com Signed-off-by: Thomas Gleixner Documentation/x86/intel_rdt_ui.txt | 14 ++++++ arch/x86/include/asm/intel_rdt.h | 10 ++--- arch/x86/kernel/cpu/intel_rdt.c | 2 - arch/x86/kernel/cpu/intel_rdt_schemata.c | 76 ++++++++++++++------------------ 4 files changed, 51 insertions(+), 51 deletions(-) commit 51a2c944ead91171495ef338689da057bbcaab0c Author: Mayuresh Kulkarni Date: Wed Apr 5 11:08:00 2017 +0100 ASoC: wm_adsp: add support for DSP region lock Newer ADSP2V2 codecs include a memory protection unit that can be set to trap illegal accesses. When enabling an ADSPV2 core we must configure the memory region traps so that the firmware can access its own memory. Signed-off-by: Mayuresh Kulkarni Signed-off-by: Nikesh Oswal Signed-off-by: Charles Keepax Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 137 +++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/wm_adsp.h | 23 ++++++++ 2 files changed, 160 insertions(+) commit e1ea1879f2889a26370bd0bc29c1e95caf9d36f2 Author: Richard Fitzgerald Date: Wed Apr 5 11:07:59 2017 +0100 ASoC: wm_adsp: Add support for ADSP2V2 Adds support for ADSP2V2 cores. Primary differences are that they use a 32-bit register map compared to the 16-bit register map of ADSP2V1, and there are some changes to clocking control. Signed-off-by: Richard Fitzgerald Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 187 ++++++++++++++++++++++++++++++++++----------- sound/soc/codecs/wm_adsp.h | 1 + 2 files changed, 145 insertions(+), 43 deletions(-) commit 2e507e24c90631f36b1c259d05b45f20630a2ad7 Merge: 589c49c def1288 Author: David S. Miller Date: Wed Apr 5 08:14:14 2017 -0700 Merge branch 'rtnetlink-event-type' Vladislav Yasevich says: ==================== rtnetlink: Updates to rtnetlink_event() This series came out of the conversation that started as a result my first attempt to add netdevice event info to netlink messages. This series converts event processing to a 'white list', where we explicitely permit events to generate netlink messages. This is meant to make people take a closer look and determine wheter these events should really trigger netlink messages. I am also adding a V2 of my patch to add event type to the netlink message. This version supports all events that we currently generate. I will also update my patch to iproute that will show this data through 'ip monitor'. I actually need the ability to trap NETDEV_NOTIFY_PEERS event (as well as possible NETDEV_RESEND_IGMP) to support hanlding of macvtap on top of bonding. I hope others will also find this info usefull. V2: Added missed events (from David Ahern) ==================== Signed-off-by: David S. Miller commit def12888c161e6fec0702e5ec9c3962846e3a21d Author: Vlad Yasevich Date: Tue Apr 4 09:23:42 2017 -0400 rtnl: Add support for netdev event to link messages When netdev events happen, a rtnetlink_event() handler will send messages for every event in it's white list. These messages contain current information about a particular device, but they do not include the iformation about which event just happened. The consumer of the message has to try to infer this information. In some cases (ex: NETDEV_NOTIFY_PEERS), that is not possible. This patch adds a new extension to RTM_NEWLINK message called IFLA_EVENT that would have an encoding of the which event triggered this message. This would allow the the message consumer to easily determine if it is interested in a particular event or not. Signed-off-by: Vladislav Yasevich Signed-off-by: David S. Miller include/linux/rtnetlink.h | 3 +- include/uapi/linux/if_link.h | 21 ++++++++++ net/core/dev.c | 2 +- net/core/rtnetlink.c | 92 +++++++++++++++++++++++++++++++++++++++----- 4 files changed, 107 insertions(+), 11 deletions(-) commit 5138e86f176055e8194bf30fa2e05bc839ce1a1f Author: Vlad Yasevich Date: Tue Apr 4 09:23:41 2017 -0400 rtnetlink: Convert rtnetlink_event to white list The rtnetlink_event currently functions as a blacklist where we block cerntain netdev events from being sent to user space. As a result, events have been added to the system that userspace probably doesn't care about. This patch converts the implementation to the white list so that newly events would have to be specifically added to the list to be sent to userspace. This would force new event implementers to consider whether a given event is usefull to user space or if it's just a kernel event. Signed-off-by: Vladislav Yasevich Signed-off-by: David S. Miller net/core/rtnetlink.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit def34eaae5ce04b324e48e1bfac873091d945213 Author: Mike Galbraith Date: Wed Apr 5 10:08:27 2017 +0200 rtmutex: Plug preempt count leak in rt_mutex_futex_unlock() mark_wakeup_next_waiter() already disables preemption, doing so again leaves us with an unpaired preempt_disable(). Fixes: 2a1c60299406 ("rtmutex: Deboost before waking up the top waiter") Signed-off-by: Mike Galbraith Cc: Peter Zijlstra Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Link: http://lkml.kernel.org/r/1491379707.6538.2.camel@gmx.de Signed-off-by: Thomas Gleixner kernel/locking/rtmutex.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 589c49cbf9674808fd4ac9b7c17155abc0686f86 Author: Gao Feng Date: Tue Apr 4 21:09:48 2017 +0800 net: tcp: Define the TCP_MAX_WSCALE instead of literal number 14 Define one new macro TCP_MAX_WSCALE instead of literal number '14', and use U16_MAX instead of 65535 as the max value of TCP window. There is another minor change, use rounddown(space, mss) instead of (space / mss) * mss; Signed-off-by: Gao Feng Signed-off-by: David S. Miller include/net/tcp.h | 3 +++ net/ipv4/tcp.c | 2 +- net/ipv4/tcp_input.c | 9 +++++---- net/ipv4/tcp_output.c | 12 +++++------- 4 files changed, 14 insertions(+), 12 deletions(-) commit d3ba2e922d4d1d61806fcb6e09512d2bee734d06 Author: James Hogan Date: Fri Mar 31 15:40:52 2017 +0100 metag/usercopy: Add 64-bit get_user support Metag already supports 64-bit put_user, so add support for 64-bit get_user too so that the test_user_copy module can test both. Signed-off-by: James Hogan Cc: linux-metag@vger.kernel.org arch/metag/include/asm/uaccess.h | 9 +++++++-- arch/metag/lib/usercopy.c | 24 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) commit 5e351410667ab0bf0dd1845730cba8b2211781e7 Author: Eric Biggers Date: Mon Apr 3 22:50:20 2017 -0700 net: ibm: emac: remove unused sysrq handler for 'c' key Since commit d6580a9f1523 ("kexec: sysrq: simplify sysrq-c handler"), the sysrq handler for the 'c' key has been sysrq_crash_op. Debugging code in the ibm_emac driver also tries to register a handler for the 'c' key, but this has no effect because register_sysrq_key() doesn't replace existing handlers. Since evidently no one has cared enough to fix this in the last 8 years, and it's very rare for drivers to register sysrq handlers (for good reason), just remove the dead code. Signed-off-by: Eric Biggers Signed-off-by: David S. Miller drivers/net/ethernet/ibm/emac/Makefile | 1 - drivers/net/ethernet/ibm/emac/core.c | 7 - drivers/net/ethernet/ibm/emac/debug.c | 270 --------------------------------- drivers/net/ethernet/ibm/emac/debug.h | 23 --- drivers/net/ethernet/ibm/emac/mal.c | 4 - drivers/tty/sysrq.c | 2 +- 6 files changed, 1 insertion(+), 306 deletions(-) commit fc1b759ae4e0f636c56ca8410207a8a36630a96e Author: James Hogan Date: Tue Apr 4 11:42:35 2017 +0100 metag/usercopy: Simplify rapf loop fixup corner case The final fixup in the rapf loops must handle a corner case due to the intermediate decrementing of the destination pointer before writing the last element to it again and re-incrementing it. This decrement (and the associated increment in the fixup code) can be easily avoided by using SETL/SETD with an offset of -8/-4. Signed-off-by: James Hogan Cc: linux-metag@vger.kernel.org arch/metag/lib/usercopy.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 049520dcb3966ee0471f2757ca3f5f5e317f33cd Author: James Hogan Date: Tue Apr 4 07:53:38 2017 +0100 metag/usercopy: Reformat rapf loop inline asm Reformat rapf loop inline assembly to make it more readable and easier to modify in future. Signed-off-by: James Hogan Cc: linux-metag@vger.kernel.org arch/metag/lib/usercopy.c | 214 ++++++++++++++++++---------------------------- 1 file changed, 85 insertions(+), 129 deletions(-) commit 3f3c278c94dd994fe0d9f21679ae19b9c0a55292 Author: Mahesh Bandewar Date: Mon Apr 3 18:38:39 2017 -0700 bonding: fix active-backup transition Earlier patch c4adfc822bf5 ("bonding: make speed, duplex setting consistent with link state") made an attempt to keep slave state consistent with speed and duplex settings. Unfortunately link-state transition is used to change the active link especially when used in conjunction with mii-mon. The above mentioned patch broke that logic. Also when speed and duplex settings for a link are updated during a link-event, the link-status should not be changed to invoke correct transition logic. This patch fixes this issue by moving the link-state update outside of the bond_update_speed_duplex() fn and to the places where this fn is called and update link-state selectively. Fixes: c4adfc822bf5 ("bonding: make speed, duplex setting consistent with link state") Signed-off-by: Mahesh Bandewar Reviewed-by: Andy Gospodarek Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 142bbdfccc8b3e9f7342f2ce8422e76a3b45beae Author: Jan Kara Date: Tue Apr 4 14:31:30 2017 +0200 cfq: Disable writeback throttling by default Writeback throttling does not play well with CFQ since that also tries to throttle async writes. As a result async writeback can get starved in presence of readers. As an example take a benchmark simulating postgreSQL database running over a standard rotating SATA drive. There are 16 processes doing random reads from a huge file (2*machine memory), 1 process doing random writes to the huge file and calling fsync once per 50000 writes and 1 process doing sequential 8k writes to a relatively small file wrapping around at the end of the file and calling fsync every 5 writes. Under this load read latency easily exceeds the target latency of 75 ms (just because there are so many reads happening against a relatively slow disk) and thus writeback is throttled to a point where only 1 write request is allowed at a time. Blktrace data then looks like: 8,0 1 0 8.347751764 0 m N cfq workload slice:40000000 8,0 1 0 8.347755256 0 m N cfq293A / set_active wl_class: 0 wl_type:0 8,0 1 0 8.347784100 0 m N cfq293A / Not idling. st->count:1 8,0 1 3814 8.347763916 5839 UT N [kworker/u9:2] 1 8,0 0 0 8.347777605 0 m N cfq293A / Not idling. st->count:1 8,0 1 0 8.347784100 0 m N cfq293A / Not idling. st->count:1 8,0 3 1596 8.354364057 0 C R 156109528 + 8 (6906954) [0] 8,0 3 0 8.354383193 0 m N cfq6196SN / complete rqnoidle 0 8,0 3 0 8.354386476 0 m N cfq schedule dispatch 8,0 3 0 8.354399397 0 m N cfq293A / Not idling. st->count:1 8,0 3 0 8.354404705 0 m N cfq293A / dispatch_insert 8,0 3 0 8.354409454 0 m N cfq293A / dispatched a request 8,0 3 0 8.354412527 0 m N cfq293A / activate rq, drv=1 8,0 3 1597 8.354414692 0 D W 145961400 + 24 (6718452) [swapper/0] 8,0 3 0 8.354484184 0 m N cfq293A / Not idling. st->count:1 8,0 3 0 8.354487536 0 m N cfq293A / slice expired t=0 8,0 3 0 8.354498013 0 m N / served: vt=5888102466265088 min_vt=5888074869387264 8,0 3 0 8.354502692 0 m N cfq293A / sl_used=6737519 disp=1 charge=6737519 iops=0 sect=24 8,0 3 0 8.354505695 0 m N cfq293A / del_from_rr ... 8,0 0 1810 8.354728768 0 C W 145961400 + 24 (314076) [0] 8,0 0 0 8.354746927 0 m N cfq293A / complete rqnoidle 0 ... 8,0 1 3829 8.389886102 5839 G W 145962968 + 24 [kworker/u9:2] 8,0 1 3830 8.389888127 5839 P N [kworker/u9:2] 8,0 1 3831 8.389908102 5839 A W 145978336 + 24 <- (8,4) 44000 8,0 1 3832 8.389910477 5839 Q W 145978336 + 24 [kworker/u9:2] 8,0 1 3833 8.389914248 5839 I W 145962968 + 24 (28146) [kworker/u9:2] 8,0 1 0 8.389919137 0 m N cfq293A / insert_request 8,0 1 0 8.389924305 0 m N cfq293A / add_to_rr 8,0 1 3834 8.389933175 5839 UT N [kworker/u9:2] 1 ... 8,0 0 0 9.455290997 0 m N cfq workload slice:40000000 8,0 0 0 9.455294769 0 m N cfq293A / set_active wl_class:0 wl_type:0 8,0 0 0 9.455303499 0 m N cfq293A / fifo=ffff880003166090 8,0 0 0 9.455306851 0 m N cfq293A / dispatch_insert 8,0 0 0 9.455311251 0 m N cfq293A / dispatched a request 8,0 0 0 9.455314324 0 m N cfq293A / activate rq, drv=1 8,0 0 2043 9.455316210 6204 D W 145962968 + 24 (1065401962) [pgioperf] 8,0 0 0 9.455392407 0 m N cfq293A / Not idling. st->count:1 8,0 0 0 9.455395969 0 m N cfq293A / slice expired t=0 8,0 0 0 9.455404210 0 m N / served: vt=5888958194597888 min_vt=5888941810597888 8,0 0 0 9.455410077 0 m N cfq293A / sl_used=4000000 disp=1 charge=4000000 iops=0 sect=24 8,0 0 0 9.455416851 0 m N cfq293A / del_from_rr ... 8,0 0 2045 9.455648515 0 C W 145962968 + 24 (332305) [0] 8,0 0 0 9.455668350 0 m N cfq293A / complete rqnoidle 0 ... 8,0 1 4371 9.455710115 5839 G W 145978336 + 24 [kworker/u9:2] 8,0 1 4372 9.455712350 5839 P N [kworker/u9:2] 8,0 1 4373 9.455730159 5839 A W 145986616 + 24 <- (8,4) 52280 8,0 1 4374 9.455732674 5839 Q W 145986616 + 24 [kworker/u9:2] 8,0 1 4375 9.455737563 5839 I W 145978336 + 24 (27448) [kworker/u9:2] 8,0 1 0 9.455742871 0 m N cfq293A / insert_request 8,0 1 0 9.455747550 0 m N cfq293A / add_to_rr 8,0 1 4376 9.455756629 5839 UT N [kworker/u9:2] 1 So we can see a Q event for a write request, then IO is blocked by writeback throttling and G and I events for the request happen only once other writeback IO is completed. Thus CFQ always sees only one write request. When it sees it, it queues the async queue behind all the read queues and the async queue gets scheduled after about one second. When it is scheduled, that one request gets dispatched and async queue is expired as it has no more requests to submit. Overall we submit about one write request per second. Although this scheduling is beneficial for read latency, writes are heavily starved and this causes large delays all over the system (due to processes blocking on page lock, transaction starts, etc.). When writeback throttling is disabled, write throughput is about one fifth of a read throughput which roughly matches readers/writers ratio and overall the system stalls are much shorter. Mixing writeback throttling logic with CFQ throttling logic is always a recipe for surprises as CFQ assumes it sees the big part of the picture which is not necessarily true when writeback throttling is blocking requests. So disable writeback throttling logic by default when CFQ is used as an IO scheduler. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe block/cfq-iosched.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 457c79e54487b076cafa0e1ec5f177e751c54087 Author: Andrey Vagin Date: Mon Apr 3 18:13:32 2017 -0700 netlink/diag: report flags for netlink sockets cb_running is reported in /proc/self/net/netlink and it is reported by the ss tool, when it gets information from the proc files. sock_diag is a new interface which is used instead of proc files, so it looks reasonable that this interface has to report no less information about sockets than proc files. We use these flags to dump and restore netlink sockets. Signed-off-by: Andrei Vagin Signed-off-by: David S. Miller include/uapi/linux/netlink_diag.h | 10 ++++++++++ net/netlink/af_netlink.c | 8 -------- net/netlink/af_netlink.h | 8 ++++++++ net/netlink/diag.c | 25 +++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 8 deletions(-) commit ad1064cd612e11b807eb764140deb5c1875ca5dc Author: Ondrej Mosnáček Date: Sun Apr 2 21:19:16 2017 +0200 crypto: xts - drop gf128mul dependency Since the gf128mul_x_ble function used by xts.c is now defined inline in the header file, the XTS module no longer depends on gf128mul. Therefore, the 'select CRYPTO_GF128MUL' line can be safely removed. Signed-off-by: Ondrej Mosnacek Reviewd-by: Eric Biggers Signed-off-by: Herbert Xu crypto/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 692016bdf7cf33abaaa7f2b080b47f504c98810c Author: Ondrej Mosnáček Date: Sun Apr 2 21:19:15 2017 +0200 crypto: glue_helper - remove the le128_gf128mul_x_ble function The le128_gf128mul_x_ble function in glue_helper.h is now obsolete and can be replaced with the gf128mul_x_ble function from gf128mul.h. Signed-off-by: Ondrej Mosnacek Reviewd-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/glue_helper.c | 3 ++- arch/x86/include/asm/crypto/glue_helper.h | 10 ---------- 2 files changed, 2 insertions(+), 11 deletions(-) commit e55318c84f199d6056a0bcd98bc4612d01ccfe80 Author: Ondrej Mosnáček Date: Sun Apr 2 21:19:14 2017 +0200 crypto: gf128mul - switch gf128mul_x_ble to le128 Currently, gf128mul_x_ble works with pointers to be128, even though it actually interprets the words as little-endian. Consequently, it uses cpu_to_le64/le64_to_cpu on fields of type __be64, which is incorrect. This patch fixes that by changing the function to accept pointers to le128 and updating all users accordingly. Signed-off-by: Ondrej Mosnacek Reviewd-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/camellia_glue.c | 4 ++-- arch/x86/crypto/serpent_sse2_glue.c | 4 ++-- arch/x86/crypto/twofish_glue_3way.c | 4 ++-- crypto/xts.c | 38 ++++++++++++++++++------------------- include/crypto/gf128mul.h | 8 ++++---- include/crypto/xts.h | 2 +- 6 files changed, 30 insertions(+), 30 deletions(-) commit acb9b159c784dc0033ede0dadde876ebd93aca4c Author: Ondrej Mosnáček Date: Sun Apr 2 21:19:13 2017 +0200 crypto: gf128mul - define gf128mul_x_* in gf128mul.h The gf128mul_x_ble function is currently defined in gf128mul.c, because it depends on the gf128mul_table_be multiplication table. However, since the function is very small and only uses two values from the table, it is better for it to be defined as inline function in gf128mul.h. That way, the function can be inlined by the compiler for better performance. For consistency, the other gf128mul_x_* functions are also moved to the header file. In addition, the code is rewritten to be constant-time. After this change, the speed of the generic 'xts(aes)' implementation increased from ~225 MiB/s to ~235 MiB/s (measured using 'cryptsetup benchmark -c aes-xts-plain64' on an Intel system with CRYPTO_AES_X86_64 and CRYPTO_AES_NI_INTEL disabled). Signed-off-by: Ondrej Mosnacek Reviewd-by: Eric Biggers Signed-off-by: Herbert Xu crypto/gf128mul.c | 33 +--------------------------- include/crypto/gf128mul.h | 55 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 34 deletions(-) commit f275d3856cf597419293cd7d95aa628d3073f556 Author: Haren Myneni Date: Sat Apr 1 10:25:40 2017 -0700 crypto: nx - Update MAINTAINERS entry for 842 compression Signed-off-by: Haren Myneni Acked-by: Dan Streetman Signed-off-by: Herbert Xu MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d158391061ec8c73898ceac148f4eddfa83efd5 Author: Gary R Hook Date: Tue Mar 28 10:57:26 2017 -0500 crypto: ccp - Rearrange structure members to minimize size The AES GCM function (in ccp-ops) requires a fair amount of stack space, which elicits a complaint when KASAN is enabled. Rearranging and packing a few structures eliminates the warning. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 51de7dd02d422da11b4dff6f11936c8333a870fe Author: Gary R Hook Date: Tue Mar 28 08:58:28 2017 -0500 crypto: ccp - Remove redundant cpu-to-le32 macros Endianness is dealt with when the command descriptor is copied into the command queue. Remove any occurrences of cpu_to_le32() found elsewhere. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v5.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 8fbbcbdd1d259da9bc5a7772e8064aaf5e04ec20 Author: Fabien DESSENNE Date: Tue Mar 21 16:13:31 2017 +0100 ARM: configs: stm32: Add crypto support Add STM32 crypto support in stm32_defconfig file. Signed-off-by: Fabien Dessenne Signed-off-by: Herbert Xu arch/arm/configs/stm32_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 2e3db2931875a843db8b56158cf93edab4286cde Author: Fabien DESSENNE Date: Tue Mar 21 16:13:30 2017 +0100 ARM: dts: stm32: enable CRC on stm32746g-eval board Enable the CRC (CRC32 crypto) on stm32746g-eval board Signed-off-by: Fabien Dessenne Signed-off-by: Herbert Xu arch/arm/boot/dts/stm32746g-eval.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 115d691fc3a40262003802ee841279597ceb3df2 Author: Fabien DESSENNE Date: Tue Mar 21 16:13:29 2017 +0100 ARM: dts: stm32: Add CRC support to stm32f746 Add CRC (CRC32 crypto) support to stm32f746. Signed-off-by: Fabien Dessenne Signed-off-by: Herbert Xu arch/arm/boot/dts/stm32f746.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit b51dbe90912a0ce0c78717d2a8374af80b18ed11 Author: Fabien DESSENNE Date: Tue Mar 21 16:13:28 2017 +0100 crypto: stm32 - Support for STM32 CRC32 crypto module This module registers a CRC32 ("Ethernet") and a CRC32C (Castagnoli) algorithm that make use of the STMicroelectronics STM32 crypto hardware. Theses algorithms are compatible with the little-endian generic ones. Both algorithms use ~0 as default seed (key). With CRC32C the output is xored with ~0. Using TCRYPT CRC32C speed test, this shows up to 900% speedup compared to the crc32c-generic algorithm. Signed-off-by: Fabien Dessenne Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 2 + drivers/crypto/Makefile | 1 + drivers/crypto/stm32/Kconfig | 7 + drivers/crypto/stm32/Makefile | 2 + drivers/crypto/stm32/stm32_crc32.c | 324 +++++++++++++++++++++++++++++++++++++ 5 files changed, 336 insertions(+) commit c0a680c4cc1b54c3f38b663f540d55c584452394 Author: Fabien DESSENNE Date: Tue Mar 21 16:13:27 2017 +0100 dt-bindings: Document STM32 CRC bindings Document device tree bindings for the STM32 CRC (crypto CRC32) Signed-off-by: Fabien Dessenne Acked-by: Rob Herring Signed-off-by: Herbert Xu .../devicetree/bindings/crypto/st,stm32-crc.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit c6dc0609062c6110d04c54e24b81b503eeadb2c8 Merge: 796b40c 40c98cb Author: Herbert Xu Date: Wed Apr 5 21:57:07 2017 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Merge the crypto tree to resolve conflict between caam changes. commit c800460086d1db3579b747d9297cecd2bbf70119 Author: Dan Carpenter Date: Mon Apr 3 21:25:22 2017 +0300 qed: Add a missing error code We should be returning -ENOMEM if qed_mcp_cmd_add_elem() fails. The current code returns success. Fixes: 4ed1eea82a21 ("qed: Revise MFW command locking") Signed-off-by: Dan Carpenter Acked-by: Tomer Tayar Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_mcp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2c099ccbd093ffce056987a227fcc96e6a77b101 Author: Dan Carpenter Date: Mon Apr 3 21:18:41 2017 +0300 net: sched: choke: remove some dead code We accidentally left this dead code behind after commit 5952fde10c35 ("net: sched: choke: remove dead filter classify code"). Signed-off-by: Dan Carpenter Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/sch_choke.c | 6 ------ 1 file changed, 6 deletions(-) commit 781159fb9c61b7a3b197c2046745fec4773806b4 Author: Dan Carpenter Date: Mon Apr 3 21:18:27 2017 +0300 liquidio: clear the correct memory There is a cut and paste bug here so we accidentally clear the first few bytes of "resp" a second time instead clearing "ctx". Fixes: 50c0add534d2 ("liquidio: refactor interrupt moderation code") Signed-off-by: Dan Carpenter Acked-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03cf65a95937772b27d8a82836fec2b827ea1ecb Author: Joao Pinto Date: Mon Apr 3 16:34:04 2017 +0100 net: stmmac: rx queue to dma channel mapping fix In hardware configurations where multiple queues are active, the rx queue needs to be mapped into a dma channel, even if a single rx queue is used. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab044f8e3eaf84c4cc95d7606fadfdfa006dc8ec Author: Tobias Klauser Date: Wed Apr 5 13:46:31 2017 +0200 batman-adv: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct batadv_priv, use stats from struct net_device. Signed-off-by: Tobias Klauser Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/distributed-arp-table.c | 9 +++++---- net/batman-adv/soft-interface.c | 2 +- net/batman-adv/types.h | 2 -- 3 files changed, 6 insertions(+), 7 deletions(-) commit 1f37b177fd36790be4f281d538a8c9de67013606 Author: Joe Perches Date: Sun Apr 2 14:30:06 2017 -0700 phy/ethtool: Add missing SPEED_ strings Add all the currently available SPEED_ strings. Signed-off-by: Joe Perches Signed-off-by: David S. Miller drivers/net/phy/phy.c | 14 ++++++++++++++ include/uapi/linux/ethtool.h | 1 + 2 files changed, 15 insertions(+) commit 5422e5a3908cf18e12c22d76b33da8873d2213c2 Merge: 2f5e9f8 68a946b Author: David S. Miller Date: Wed Apr 5 06:24:28 2017 -0700 Merge branch 'bnxt_en-WoL-selftest-XDP_TX-optimize' Michael Chan says: ==================== bnxt_en: Updates for net-next. Main changes are to add WoL and selftest features, optimize XDP_TX by using short BDs, and to cap the usage of MSIX. ==================== Signed-off-by: David S. Miller commit 68a946bb81e07ed0e59a99e0c068d091ed42cc1b Author: Michael Chan Date: Tue Apr 4 18:14:17 2017 -0400 bnxt_en: Cap the msix vector with the max completion rings. The current code enables up to the maximum MSIX vectors in the PCIE config space without considering the max completion rings available. An MSIX vector is only useful when it has an associated completion ring, so it is better to cap it. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 932dbf83ba18bdb871e0c03a4ffdd9785f7a9c07 Author: Michael Chan Date: Tue Apr 4 18:14:16 2017 -0400 bnxt_en: Use short TX BDs for the XDP TX ring. No offload is performed on the XDP_TX ring so we can use the short TX BDs. This has the effect of doubling the size of the XDP TX ring so that it now matches the size of the rx ring by default. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 67fea463fd873492ab641459a6d1af0e9ea3c9ce Author: Michael Chan Date: Tue Apr 4 18:14:15 2017 -0400 bnxt_en: Add interrupt test to ethtool -t selftest. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 32 ++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) commit 91725d89b97acea168a94c577d999801c3b3bcfb Author: Michael Chan Date: Tue Apr 4 18:14:14 2017 -0400 bnxt_en: Add PHY loopback to ethtool self-test. It is necessary to disable autoneg before enabling PHY loopback, otherwise link won't come up. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 62 ++++++++++++++++++++++- 1 file changed, 60 insertions(+), 2 deletions(-) commit f7dc1ea6c4c1f31371b7098d6fae0d49dc6cdff1 Author: Michael Chan Date: Tue Apr 4 18:14:13 2017 -0400 bnxt_en: Add ethtool mac loopback self test. The mac loopback self test operates in polling mode. To support that, we need to add functions to open and close the NIC half way. The half open mode allows the rings to operate without IRQ and NAPI. We use the XDP transmit function to send the loopback packet. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 37 +++++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 + drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 165 ++++++++++++++++++++-- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 4 +- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 2 + 5 files changed, 199 insertions(+), 11 deletions(-) commit eb51365846bc418687af4c4f41b68b6e84cdd449 Author: Michael Chan Date: Tue Apr 4 18:14:12 2017 -0400 bnxt_en: Add basic ethtool -t selftest support. Add the basic infrastructure and only firmware tests initially. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 + drivers/net/ethernet/broadcom/bnxt/bnxt.h | 13 ++- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 136 +++++++++++++++++++++- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.h | 2 + 4 files changed, 150 insertions(+), 3 deletions(-) commit f65a2044a8c988adf16788c51c04ac10dbbdb494 Author: Michael Chan Date: Tue Apr 4 18:14:11 2017 -0400 bnxt_en: Add suspend/resume callbacks. Add suspend/resume callbacks using the newer dev_pm_ops method. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 5282db6c794fed3ea8b399bc5305c4078e084f7b Author: Michael Chan Date: Tue Apr 4 18:14:10 2017 -0400 bnxt_en: Add ethtool set_wol method. And add functions to set and free magic packet filter. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 32 +++++++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 ++ drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 26 ++++++++++++++++++ 3 files changed, 60 insertions(+) commit 8e202366dd752564d7f090ba280cc51cbf7bbbd9 Author: Michael Chan Date: Tue Apr 4 18:14:09 2017 -0400 bnxt_en: Add ethtool get_wol method. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 16 ++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.h | 1 + 2 files changed, 17 insertions(+) commit d196ece740bf337aa25731cd8cb44660a2a227dd Author: Michael Chan Date: Tue Apr 4 18:14:08 2017 -0400 bnxt_en: Add pci shutdown method. Add pci shutdown method to put device in the proper WoL and power state. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit c1ef146a5bd3b286d5c3eb2c9f631b38647c76d3 Author: Michael Chan Date: Tue Apr 4 18:14:07 2017 -0400 bnxt_en: Add basic WoL infrastructure. Add code to driver probe function to check if the device is WoL capable and if Magic packet WoL filter is currently set. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 43 +++++++++++++++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 +++ 2 files changed, 47 insertions(+) commit 8eb992e876a88de7539b1b9e132dd171d865cd2f Author: Michael Chan Date: Tue Apr 4 18:14:06 2017 -0400 bnxt_en: Update firmware interface spec to 1.7.6.2. Features added include WoL and selftest. Signed-off-by: Deepak Khungar Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 325 +++++++++++++++++++++--- drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 8 +- drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.h | 1 + 3 files changed, 297 insertions(+), 37 deletions(-) commit 1aed89640a899cd695bbfc976a4356affa474646 Author: Karthik Ananthapadmanabha Date: Wed Apr 5 17:06:20 2017 +0530 mwifiex: apply radar flag When IEEE80211_CHAN_RADAR is set by cfg80211, passive scan must be performed. In mwifiex,active scan is performed even though flag is set from cfg80211. mwifiex_reg_apply_radar_flags() function added in this patch correctly uses radar flag. Signed-off-by: Karthik Ananthapadmanabha Signed-off-by: Amitkumar Karwar Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 495d36e66814e77c4ef8ef9711f3d4c358ef0902 Author: Yan-Hsuan Chuang Date: Mon Apr 3 13:41:42 2017 -0500 rtlwifi: btcoex: 23b 2ant: new fw use h2c to control GNT_BT Earlier versions of the FW did not support h2c to set GNT_BT, but later versions have that capability. Hence we check the FW version and decide whether to use h2c or just write to the register. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 37 +++++++++++++++++----- 1 file changed, 29 insertions(+), 8 deletions(-) commit a66a4176b74cfbcfc91b7c0b303d480226da125a Author: Yan-Hsuan Chuang Date: Mon Apr 3 13:41:41 2017 -0500 rtlwifi: btcoex: 23b 2ant: add comments to describe how duration adjusted Since btcoex uses static variables to store the cumulative information on the wifi status, some tricks are used that are a bit obscure. We add some comments about the criteria we use to adjust wifi duration. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 44e9a5340e6859a2a00cc470a8acfcbcaf64050a Author: Yan-Hsuan Chuang Date: Mon Apr 3 13:41:40 2017 -0500 rtlwifi: btcoex: 23b 2ant: finer bt power adjustment The bt can specify a power level to decrease. Rather than decreasing by a fixed value (usually 2), this change makes the driver fit to the environment more quickly. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 52 ++++++++++------------ .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.h | 4 +- 2 files changed, 25 insertions(+), 31 deletions(-) commit 7ff98093220b12e611aa945e5aec03f50bc13907 Author: Yan-Hsuan Chuang Date: Mon Apr 3 13:41:39 2017 -0500 rtlwifi: btcoex: 23b 2ant: remove redundant bt stack report New ICs have hardware mailbox to deliver bt information instead of doing it by driver itself, so remove them. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit f36714fbfa6d6002e57d879469e9ae84e052e972 Author: Yan-Hsuan Chuang Date: Mon Apr 3 13:41:38 2017 -0500 rtlwifi: btcoex: 23b 2ant: coex table fine tune set coex table fine tune, for register settings Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 52 +++++++++++++--------- 1 file changed, 32 insertions(+), 20 deletions(-) commit 3f957062c96c7c5ecfc59a72626d0ba419218d19 Author: Yan-Hsuan Chuang Date: Mon Apr 3 13:41:37 2017 -0500 rtlwifi: btcoex: 23b 2ant: adjust wifi duration for bt a2dp The larger the bt a2dp bit pool is, the more time bt needs to receive them. If we do not adjust the wifi duration, the voice quality will be low. Hence we reduce the time that wifi holds, to improve the a2dp service. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 72 +++++++++++++++++++--- .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.h | 3 + 2 files changed, 65 insertions(+), 10 deletions(-) commit e4782bc6ce9a0a3586e1556351461fd3141b203b Author: Yan-Hsuan Chuang Date: Mon Apr 3 13:41:36 2017 -0500 rtlwifi: btcoex: 23b 2ant: less sensitive to tx rate penalty modify h2c parameter so that the rate suffers less penalty from retry Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 55e9e37da2cea6b4248610397165f3b59cb34e51 Author: Yan-Hsuan Chuang Date: Mon Apr 3 13:41:35 2017 -0500 rtlwifi: btcoex: 23b 2ant: monitor wifi counter for allocate tdma time If there are too many CRC error packets, it means the wifi is operating under low quality circumstances. If so, we need to reallocate the resources of wifi and bt Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 40 ++++++++++++++++++++++ .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.h | 10 ++++++ 2 files changed, 50 insertions(+) commit 61d802619bc6cd0ee0849a57eec34605d35c2b8e Author: Yan-Hsuan Chuang Date: Mon Apr 3 13:41:34 2017 -0500 rtlwifi: btcoex: 23b 2ant: detect if bt is slave, and modify tdma if the bt is slave, it may receive packet at any time, so we need to mark them as high priority packets to avoid packet loss. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 91 +++++++++++++++------- .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 1 + 2 files changed, 62 insertions(+), 30 deletions(-) commit 155305f5b0eb4f849f2552a45578b35c5998d399 Author: Yan-Hsuan Chuang Date: Mon Apr 3 13:41:33 2017 -0500 rtlwifi: btcoex: 23b 2ant: add btc8723b2ant_limited_rx to reduce agg size For wifi and bt coexistence, if the aggregation size of wifi is too large, the transmission time of the aggregated packet could be too long and the bt packets might "cut off" the wifi packet. We need to reduce the aggregation size to improve wifi performance. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit c6821613e653aae4f54c75689e229e3f063b7f69 Author: Yan-Hsuan Chuang Date: Mon Apr 3 13:41:32 2017 -0500 rtlwifi: btcoex: follow linux coding style Fix a number of checkpatch.pl warnings. In addition, some variable and function names are shortened, and/or renamed to be more consistent. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8192e2ant.c | 1878 ++++++++++---------- .../realtek/rtlwifi/btcoexist/halbtc8192e2ant.h | 24 +- .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 416 ++--- .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 339 ++-- .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.h | 1 + .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 1141 ++++++------ .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.h | 2 +- .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 1347 +++++++------- .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 2 +- .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 2 +- 10 files changed, 2493 insertions(+), 2659 deletions(-) commit 27a31a60a4de4c1b45e371152bb6e701e1a8cc40 Author: Yan-Hsuan Chuang Date: Mon Apr 3 13:41:31 2017 -0500 rtlwifi: btcoex: remove unused functions A number of functions in the Bluetooth Coexistence routines are not used, and can be removed. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtc8192e2ant.c | 592 +------------ .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 589 ------------- .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 897 +------------------ .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 329 +------ .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 959 +-------------------- 5 files changed, 27 insertions(+), 3339 deletions(-) commit 38c51d03cef47b5d33de0660ba24e371d1724874 Author: Karthik Ananthapadmanabha Date: Mon Apr 3 20:06:50 2017 +0530 mwifiex: add missing IEs related to TDLS operation In mwifiex,IEs such as supported channels, supported operating classes 20/40 BSS COexistence are missing and also extra QOS capabilities IE is added during TDLS discovery response, TDLS setup request and TDLS setupresponse. This patch adds require IEs and also removes extra IE. Signed-off-by: Karthik Ananthapadmanabha Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/ioctl.h | 2 ++ drivers/net/wireless/marvell/mwifiex/tdls.c | 49 ++++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 2 deletions(-) commit 621c4fe3cca5a0bc421916696e0c5e764d0a510b Author: Jan Glauber Date: Wed Apr 5 12:27:39 2017 +0200 EDAC, thunderx: Fix L2C MCI interrupt disable Fix a typo that disabled the MCI interrupts using the wrong bitmask. Signed-off-by: Jan Glauber Cc: David Daney Cc: Ralf Baechle Cc: Sergey Temerkhanov Cc: linux-edac Link: http://lkml.kernel.org/r/20170405102739.6301-1-jglauber@cavium.com Signed-off-by: Borislav Petkov drivers/edac/thunderx_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ea80789616009607fa1211750fe198a256c32b2 Author: Colin Ian King Date: Mon Apr 3 10:47:58 2017 +0100 wlcore: fix spelling mistakes in wl1271_warning trivial fix to spelling mistakes in wl1271_warning error message, change iligal to invalid and opperation to operation. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/ti/wlcore/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 755b37c93a069ff0882411630a06e90b3193d092 Author: Brian Norris Date: Tue Mar 28 16:59:33 2017 -0700 mwifiex: catch mwifiex_fw_dpc() errors properly in reset When resetting the device, we take a synchronous firmware-loading code path, which borrows a lot from the asynchronous path used at probe time. We don't catch errors correctly though, which means that in the PCIe driver, we may try to dereference the 'adapter' struct after mwifiex_fw_dpc() has freed it. See this (erronous) print in mwifiex_pcie_reset_notify(): mwifiex_dbg(adapter, INFO, "%s, successful\n", __func__); Let's instead refactor the synchronous (or "!req_fw_nowait") path so that we propagate errors and handle them properly. This fixes a use-after-free issue in the PCIe driver, as well as a misleading debug message ("successful"). It looks like the SDIO driver doesn't have these problems, since it doesn't do anything after mwifiex_reinit_sw(). Fixes: 4c5dae59d2e9 ("mwifiex: add PCIe function level reset support") Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 33 +++++++++++++++++++---------- drivers/net/wireless/marvell/mwifiex/pcie.c | 7 +++++- drivers/net/wireless/marvell/mwifiex/sdio.c | 5 ++++- 3 files changed, 32 insertions(+), 13 deletions(-) commit ce8fad9a1f09009ec3918a99685d9e3176f50ce3 Author: Brian Norris Date: Tue Mar 28 16:59:32 2017 -0700 mwifiex: fix use-after-free for FW reinit errors If we fail to reinit the FW when resetting the device (in the synchronous version of mwifiex_init_hw_fw() -> mwifiex_fw_dpc()), mwifiex_fw_dpc() will tear down the interface and free up the adapter. But we don't actually check for all failure cases of mwifiex_fw_dpc(), so some of them fall through and dereference adapter->fw_done with a freed adapter, causing a use-after-free bug. In any case, mwifiex_fw_dpc() will always signal FW completion -- in the error OR success case -- so at best, this was repeat work. Let's not do it. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 1 - 1 file changed, 1 deletion(-) commit 78b9ccb81377ba908b2c18daf6e1a7beddc281e3 Author: Arend Van Spriel Date: Tue Mar 28 11:43:28 2017 +0100 brcmfmac: no need for d11inf instance in brcmf_pno_start_sched_scan() In brcmf_pno_start_sched_scan() a local variable is declared and assigned for struct brcmu_d11inf. However, there is no other reference to it so it is unnecessary. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c | 2 -- 1 file changed, 2 deletions(-) commit 49fe9b59f0e9b750f173fbe44637c436ba1030d2 Author: Arend Van Spriel Date: Tue Mar 28 11:43:27 2017 +0100 brcmfmac: restore bus state when enter_D3 fails In brcmf_pcie_suspend() we inform the firmware on the device that it will enter in D3 state. Before this is done we already bring down the bus state. However, When entering D3 fails we abort the suspend and the bus state need to be restored. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 1 + 1 file changed, 1 insertion(+) commit 0cc0236cf713a9ecfcf902e35bd098bc179265a8 Author: Arend Van Spriel Date: Tue Mar 28 11:43:26 2017 +0100 brcmfmac: add support to move wiphy instance into network namespace To support network namespace the driver must assure all created network interfaces are in the same namespace as the wiphy instance and flag the support using WIPHY_FLAG_NETNS_OK. Verified using two terminals: Terminal 1 Terminal 2 -------------------------- --------------------------------- # ip netns add brcm-wifi # iw dev phy#0 Interface wlan3 ifindex 11 wdev 0x1 # ip netns exec brcm-wifi bash # iw dev # echo $$ 20337 # iw phy0 set netns 20337 # iw dev phy#0 Interface wlan3 ifindex 11 wdev 0x2 # iw phy0 interface add wl3.ap type __ap # iw dev phy#0 Interface wl3.ap ifindex 2 wdev 0x3 Interface wlan3 ifindex 11 wdev 0x2 # iw dev # iw phy0 set netns 1 # iw dev # iw dev phy#0 Interface wl3.ap ifindex 2 wdev 0x5 Interface wlan3 ifindex 11 wdev 0x4 Note: increasing wdev identifier above indicates issue in cfg80211 which is addressed separately. Tested-by: Mark Asselstine Signed-off-by: Arend van Spriel Reviewed-by: Franky Lin Reviewed-by: Hante Meuleman Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 ++- drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 8f9dd1a974380ebe2d7bf82df4e6ba6bfb89c575 Author: Franky Lin Date: Tue Mar 28 11:43:25 2017 +0100 brcmfmac: move brcmf_fws_deinit to bcdc layer Move brcmf_fws_deinit into brcmf_proto_bcdc_detach since it is a bcdc exclusive feature. Signed-off-by: Franky Lin Reviewed-by: Arend Van Spriel Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) commit 62c50a34883c6b821d816b6a661e5d47c09d42b2 Author: Franky Lin Date: Tue Mar 28 11:43:24 2017 +0100 brcmfmac: wrap brcmf_fws_init into bcdc layer Create a new protocol layer interface brcmf_proto_init_cb for protocol layer to finish initialzation after core module components(fweh and etc.) are initialized. Signed-off-by: Franky Lin Reviewed-by: Arend Van Spriel Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 7 +++++++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.h | 9 +++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) commit 36491b152c30fe0e804385e1ee9068be2c6d1bfa Author: Amitkumar Karwar Date: Mon Mar 27 18:36:51 2017 +0530 mwifiex: enable auto deep sleep mode for USB chipsets Chip goes into low power state when this feature is enabled. This was already enabled for SDIO and PCIe interface based chipsets. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 182f569660548d16af895af9fede54367c377f47 Author: Ganapathi Bhat Date: Mon Mar 27 18:27:44 2017 +0530 mwifiex: Support USB interrupt endpoint for command response/event USB firmware added support for sending command response/event through interrupt endpoint, to enhance RX throughput. Added corresponding changes required to support this feature. This change takes care of backward compatibility with older firmware. Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/usb.c | 45 +++++++++++++++++++++++------- drivers/net/wireless/marvell/mwifiex/usb.h | 4 +++ 2 files changed, 39 insertions(+), 10 deletions(-) commit 1c92af00a56032c10d1a43277b39515393860b02 Author: Rafał Miłecki Date: Thu Mar 23 11:29:28 2017 +0100 brcmfmac: update BRCMFMAC symbol description For quite some time now brcmfmac supports 802.11ac chipsets and it's not limited to embedded devices only. There are even standalone PCIe cards based on BCM43602 or BCM4366. Signed-off-by: Rafał Miłecki Reviewed-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/Kconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1e0e653f1136a413a9969e5d0d548ee6499b9763 Author: Jan Kara Date: Wed Apr 5 14:17:30 2017 +0200 reiserfs: Protect dquot_writeback_dquots() by s_umount semaphore dquot_writeback_dquots() expects s_umount semaphore to be held to protect it from other concurrent quota operations. reiserfs_sync_fs() can call dquot_writeback_dquots() without holding s_umount semaphore when called from flush_old_commits(). Fix the problem by grabbing s_umount in flush_old_commits(). However we have to be careful and use only trylock since reiserfs_cancel_old_sync() can be waiting for flush_old_commits() to complete while holding s_umount semaphore. Possible postponing of sync work is not a big deal though as that is only an opportunistic flush. Fixes: 9d1ccbe70e0b14545caad12dc73adb3605447df0 Reported-by: Jan Beulich Signed-off-by: Jan Kara fs/reiserfs/super.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 71b0576bdb862e964a82c73327cdd1a249c53e67 Author: Jan Kara Date: Wed Apr 5 14:09:48 2017 +0200 reiserfs: Make cancel_old_flush() reliable Currently canceling of delayed work that flushes old data using cancel_old_flush() does not prevent work from being requeued. Thus in theory new work can be queued after cancel_old_flush() from reiserfs_freeze() has run. This will become larger problem once flush_old_commits() can requeue the work itself. Fix the problem by recording in sbi->work_queue that flushing work is canceled and should not be requeued. Signed-off-by: Jan Kara fs/reiserfs/journal.c | 2 +- fs/reiserfs/reiserfs.h | 1 + fs/reiserfs/super.c | 21 +++++++++++++++------ 3 files changed, 17 insertions(+), 7 deletions(-) commit 65547661500885dde26ca4a75d4d7f7df587c88e Author: Jan Kara Date: Wed Apr 5 13:32:52 2017 +0200 ext2: Call dquot_writeback_dquots() with s_umount held ext2_sync_fs() could be called without s_umount semaphore held when called through ext2_write_super() from __ext2_write_inode(). This function then calls dquot_writeback_dquots() which relies on s_umount to be held for protection against other quota operations. In fact __ext2_write_inode() does not need all the functionality ext2_write_super() provides. It is enough to just write the superblock. So use ext2_sync_super() instead. Fixes: 9d1ccbe70e0b14545caad12dc73adb3605447df0 Reported-by: Jan Beulich Signed-off-by: Jan Kara fs/ext2/ext2.h | 3 ++- fs/ext2/inode.c | 2 +- fs/ext2/super.c | 9 ++++----- 3 files changed, 7 insertions(+), 7 deletions(-) commit 367d2b0cb15dfbfa7243b200957c3c6b86276b54 Author: Quentin Schulz Date: Wed Apr 5 11:06:34 2017 +0200 ARM: sun8i: sina33: add highest OPP of CPUs The A33 supports 1.1GHz and 1.2GHz frequencies at 1.32V and the Sinlinx SinA33 has its cpu-supply property set in the cpu DT node. Therefore, CPUfreq knows how to handle the regulator in charge of the CPU and can adjust its voltage to match the OPP. Add these two CPU frequencies to the CPU OPP table of the Sinlinx SinA33. Signed-off-by: Quentin Schulz Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit e846011ee2ab1e3b364d66eb17a1650bf2760849 Author: Maxime Ripard Date: Wed Apr 5 11:06:33 2017 +0200 ARM: sun8i: a33: Add devfreq-based GPU cooling This adds GPU thermal throttling for the Allwinner A33. Signed-off-by: Maxime Ripard Signed-off-by: Quentin Schulz arch/arm/boot/dts/sun8i-a23-a33.dtsi | 1 + arch/arm/boot/dts/sun8i-a33.dtsi | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) commit a5ce7a3d44a2e0d88dfe2b870331ec7c5c2d3080 Author: Quentin Schulz Date: Wed Apr 5 11:06:32 2017 +0200 ARM: sun8i: a33: add CPU thermal throttling This adds CPU thermal throttling for the Allwinner A33. It uses the thermal sensor present in the SoC's GPADC. Signed-off-by: Quentin Schulz Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33.dtsi | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit a424f635a7a521102f8427a3fc2e6d251f388557 Author: Quentin Schulz Date: Wed Apr 5 11:06:31 2017 +0200 ARM: sun8i: a33: add thermal sensor This adds the DT node for the thermal sensor present in the Allwinner A33 GPADC. Signed-off-by: Quentin Schulz Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 3fab2f09959d1ddffdb35d0c8c662cd58f2d587f Author: Daniel Vetter Date: Mon Apr 3 10:32:57 2017 +0200 drm/i915: Nuke intel_atomic_legacy_gamma_set We do set DRIVER_ATOMIC now. Note that the comment is outdated, the property paths switched over to checking drm_drv_uses_atomic_modeset() a while ago. Which means this can't even break if we revert DRIVER_ATOMIC again. v2: Add note that this is even safer (Maarten). Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-9-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/intel_display.c | 44 +----------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) commit e69176d68d26d63d9214797c191ce65358ea1ecf Author: Ard Biesheuvel Date: Tue Apr 4 17:09:10 2017 +0100 ef/libstub/arm/arm64: Randomize the base of the UEFI rt services region Update the allocation logic for the virtual mapping of the UEFI runtime services to start from a randomized base address if KASLR is in effect, and if the UEFI firmware exposes an implementation of EFI_RNG_PROTOCOL. This makes it more difficult to predict the location of exploitable data structures in the runtime UEFI firmware, which increases robustness against attacks. Note that these regions are only mapped during the time a runtime service call is in progress, and only on a single CPU at a time, bit given the lack of a downside, let's enable it nonetheless. Signed-off-by: Ard Biesheuvel Cc: Borislav Petkov Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bhe@redhat.com Cc: bhsharma@redhat.com Cc: eugene@hp.com Cc: evgeny.kalugin@intel.com Cc: jhugo@codeaurora.org Cc: leif.lindholm@linaro.org Cc: linux-efi@vger.kernel.org Cc: mark.rutland@arm.com Cc: roy.franz@cavium.com Cc: rruigrok@codeaurora.org Link: http://lkml.kernel.org/r/20170404160910.28115-3-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/libstub/arm-stub.c | 49 ++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 13 deletions(-) commit eeff7d634f4750306785be709ca444140c29b043 Author: Ard Biesheuvel Date: Tue Apr 4 17:09:09 2017 +0100 efi/libstub/arm/arm64: Disable debug prints on 'quiet' cmdline arg The EFI stub currently prints a number of diagnostic messages that do not carry a lot of information. Since these prints are not controlled by 'loglevel' or other command line parameters, and since they appear on the EFI framebuffer as well (if enabled), it would be nice if we could turn them off. So let's add support for the 'quiet' command line parameter in the stub, and disable the non-error prints if it is passed. Signed-off-by: Ard Biesheuvel Acked-by: Mark Rutland Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bhe@redhat.com Cc: bhsharma@redhat.com Cc: bp@alien8.de Cc: eugene@hp.com Cc: evgeny.kalugin@intel.com Cc: jhugo@codeaurora.org Cc: leif.lindholm@linaro.org Cc: linux-efi@vger.kernel.org Cc: roy.franz@cavium.com Cc: rruigrok@codeaurora.org Link: http://lkml.kernel.org/r/20170404160910.28115-2-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/libstub/arm-stub.c | 20 ++++++++++---------- drivers/firmware/efi/libstub/arm32-stub.c | 2 ++ drivers/firmware/efi/libstub/efi-stub-helper.c | 9 +++++++++ drivers/firmware/efi/libstub/efistub.h | 7 +++++++ drivers/firmware/efi/libstub/secureboot.c | 2 ++ include/linux/efi.h | 3 --- 6 files changed, 30 insertions(+), 13 deletions(-) commit 60f38de7a8d4e816100ceafd1b382df52527bd50 Author: Ard Biesheuvel Date: Tue Apr 4 17:09:08 2017 +0100 efi/libstub: Unify command line param parsing Merge the parsing of the command line carried out in arm-stub.c with the handling in efi_parse_options(). Note that this also fixes the missing handling of CONFIG_CMDLINE_FORCE=y, in which case the builtin command line should supersede the one passed by the firmware. Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bhe@redhat.com Cc: bhsharma@redhat.com Cc: bp@alien8.de Cc: eugene@hp.com Cc: evgeny.kalugin@intel.com Cc: jhugo@codeaurora.org Cc: leif.lindholm@linaro.org Cc: linux-efi@vger.kernel.org Cc: mark.rutland@arm.com Cc: roy.franz@cavium.com Cc: rruigrok@codeaurora.org Link: http://lkml.kernel.org/r/20170404160910.28115-1-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/libstub/arm-stub.c | 24 +++++++----------------- drivers/firmware/efi/libstub/arm64-stub.c | 4 +--- drivers/firmware/efi/libstub/efi-stub-helper.c | 19 +++++++++++-------- drivers/firmware/efi/libstub/efistub.h | 2 ++ include/linux/efi.h | 2 +- 5 files changed, 22 insertions(+), 29 deletions(-) commit 4c3f14bb87b683a2e5bbc6d6660b41893ecacfd0 Author: Ard Biesheuvel Date: Tue Apr 4 17:02:45 2017 +0100 efi/libstub: Fix harmless command line parsing bug When we parse the 'efi=' command line parameter in the stub, we fail to take spaces into account. Currently, the only way this could result in unexpected behavior is when the string 'nochunk' appears as a separate command line argument after 'efi=xxx,yyy,zzz ', so this is harmless in practice. But let's fix it nonetheless. Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170404160245.27812-12-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/libstub/efi-stub-helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 318532bf63cfab779d763527d8b93e48c4a96dba Author: Ard Biesheuvel Date: Tue Apr 4 17:02:44 2017 +0100 efi/arm32-stub: Allow boot-time allocations in the vmlinux region The arm32 kernel decompresses itself to the base of DRAM unconditionally, and so it is the EFI stub's job to ensure that the region is available. Currently, we do this by creating an allocation there, and giving up if that fails. However, any boot services regions occupying this area are not an issue, given that the decompressor executes strictly after the stub calls ExitBootServices(). So let's try a bit harder to proceed if the initial allocation fails, and check whether any memory map entries occupying the region may be considered safe. Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm Reviewed-by: Eugene Cohen Reviewed-by: Roy Franz Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170404160245.27812-11-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/libstub/arm32-stub.c | 148 ++++++++++++++++++++++++++---- 1 file changed, 128 insertions(+), 20 deletions(-) commit b1d1776139698d7522dfd46aa81a056f030ddaf7 Author: Baoquan He Date: Tue Apr 4 17:02:43 2017 +0100 x86/efi: Clean up a minor mistake in comment EFI allocates runtime services regions from EFI_VA_START, -4G, down to -68G, EFI_VA_END - 64G altogether, top-down. The mechanism was introduced in commit: d2f7cbe7b26a7 ("x86/efi: Runtime services virtual mapping") Fix the comment that still says bottom-up. Signed-off-by: Baoquan He Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170404160245.27812-10-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/platform/efi/efi_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fee929ba1c9386e524ed3abcc6d5f9b64381f959 Author: Evgeny Kalugin Date: Tue Apr 4 17:02:42 2017 +0100 efi/pstore: Return error code (if any) from efi_pstore_write() For some reason return value from actual variable setting was ignored. With this change error code get transferred upwards through call stack. Signed-off-by: Evgeny Kalugin Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170404160245.27812-9-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/efi-pstore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6e7300cff1c410dde7ac4354b6a0a8cb0a561e54 Author: Bhupesh Sharma Date: Tue Apr 4 17:02:41 2017 +0100 efi/bgrt: Enable ACPI BGRT handling on arm64 Now that the ACPI BGRT handling code has been made generic, we can enable it for arm64. Signed-off-by: Bhupesh Sharma [ Updated commit log to reflect that BGRT is only enabled for arm64, and added missing 'return' statement to the dummy acpi_parse_bgrt() function. ] Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170404160245.27812-8-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/arm64/kernel/acpi.c | 3 +++ arch/x86/kernel/acpi/boot.c | 6 ------ drivers/acpi/Kconfig | 2 +- drivers/acpi/bgrt.c | 6 ++++++ include/linux/efi-bgrt.h | 5 +++++ 5 files changed, 15 insertions(+), 7 deletions(-) commit 75def552bb1e0d39918df31b86f7d09e754ea0fc Author: Bhupesh Sharma Date: Tue Apr 4 17:02:40 2017 +0100 x86/efi/bgrt: Move efi-bgrt handling out of arch/x86 Now with open-source boot firmware (EDK2) supporting ACPI BGRT table addition even for architectures like AARCH64, it makes sense to move out the 'efi-bgrt.c' file and supporting infrastructure from 'arch/x86' directory and house it inside 'drivers/firmware/efi', so that this common code can be used across architectures. Signed-off-by: Bhupesh Sharma Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170404160245.27812-7-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/platform/efi/Makefile | 1 - arch/x86/platform/efi/efi-bgrt.c | 84 ---------------------------------------- drivers/firmware/efi/Makefile | 1 + drivers/firmware/efi/efi-bgrt.c | 84 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+), 85 deletions(-) commit 24d7c494ce46d5bb6c8fd03e88a48ae249ec1492 Author: Ard Biesheuvel Date: Tue Apr 4 17:02:39 2017 +0100 efi/arm-stub: Round up FDT allocation to mapping size The FDT is mapped via a fixmap entry that is at least 2 MB in size and 2 MB aligned on 4 KB page size kernels. On UEFI systems, the FDT allocation may share this 2 MB mapping with a reserved region (or another memory region that we should never map), unless we account for this in the size of the allocation (the alignment is already 2 MB) So instead of taking guesses at the needed space, simply allocate 2 MB immediately. The allocation will be recorded as EFI_LOADER_DATA, and the kernel only memblock_reserve()'s the actual size of the FDT, so the unused space will be released back to the kernel. Reviewed-By: Jeffrey Hugo Tested-by: Richard Ruigrok Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170404160245.27812-6-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/arm64/include/asm/efi.h | 1 + drivers/firmware/efi/libstub/fdt.c | 57 ++++++++++++++++---------------------- 2 files changed, 25 insertions(+), 33 deletions(-) commit 138728dd4ee30d3f35587c269c46cc829ec4d58b Author: Ard Biesheuvel Date: Tue Apr 4 17:02:37 2017 +0100 efi/arm-stub: Correct FDT and initrd allocation rules for arm64 On arm64, we have made some changes over the past year to the way the kernel itself is allocated and to how it deals with the initrd and FDT. This patch brings the allocation logic in the EFI stub in line with that, which is necessary because the introduction of KASLR has created the possibility for the initrd to be allocated in a place where the kernel may not be able to map it. (This is mostly a theoretical scenario, since it only affects systems where the physical memory footprint exceeds the size of the linear mapping.) Since we know the kernel itself will be covered by the linear mapping, choose a suitably sized window (i.e., based on the size of the linear region) covering the kernel when allocating memory for the initrd. The FDT may be anywhere in memory on arm64 now that we map it via the fixmap, so we can lift the address restriction there completely. Tested-by: Richard Ruigrok Signed-off-by: Ard Biesheuvel Reviewed-by: Jeffrey Hugo Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170404160245.27812-4-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/arm/include/asm/efi.h | 14 +++++++++++++- arch/arm64/include/asm/efi.h | 23 ++++++++++++++++++++++- drivers/firmware/efi/libstub/arm-stub.c | 7 ++++--- 3 files changed, 39 insertions(+), 5 deletions(-) commit 49d22c70aaf07cd7e33346b247f5df3ddb072ee0 Author: Geoff Lansberry Date: Wed Dec 21 23:18:33 2016 -0500 NFC: trf7970a: Add device tree option of 1.8 Volt IO voltage The TRF7970A has configuration options for supporting hardware designs with 1.8 Volt or 3.3 Volt IO. This commit adds a device tree option, using a fixed regulator binding, for setting the io voltage to match the hardware configuration. If no option is supplied it defaults to 3.3 volt configuration. Acked-by: Rob Herring Acked-by: Mark Greer Signed-off-by: Geoff Lansberry Signed-off-by: Samuel Ortiz .../devicetree/bindings/net/nfc/trf7970a.txt | 2 ++ drivers/nfc/trf7970a.c | 26 +++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) commit 837eb4d21ecde7bde7a1fe523594fdf509055f3f Author: Geoff Lansberry Date: Wed Dec 21 23:18:32 2016 -0500 NFC: trf7970a: add device tree option for 27MHz clock The TRF7970A has configuration options to support hardware designs which use a 27.12MHz clock. This commit adds a device tree option 'clock-frequency' to support configuring the this chip for default 13.56MHz clock or the optional 27.12MHz clock. Acked-by: Rob Herring Acked-by: Mark Greer Signed-off-by: Geoff Lansberry Signed-off-by: Samuel Ortiz .../devicetree/bindings/net/nfc/trf7970a.txt | 2 + drivers/nfc/trf7970a.c | 50 +++++++++++++++++----- 2 files changed, 41 insertions(+), 11 deletions(-) commit 2891f2d5c13b7386331250d59920bdf8a54bfccb Author: Andy Shevchenko Date: Wed Mar 22 21:22:51 2017 +0200 NFC: Add nfc_dbg() macro In some cases nfc_dbg() is useful. Add such macro to a header. Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz include/net/nfc/nfc.h | 1 + 1 file changed, 1 insertion(+) commit 3267183c3d1a6612c00961d7334413f9976c751a Author: Andy Shevchenko Date: Wed Mar 22 21:20:58 2017 +0200 NFC: netlink: Use error code from nfc_activate_target() It looks like a typo to assign a return code to a variable which is not used. Found due to a compiler warning: net/nfc/netlink.c: In function ‘nfc_genl_activate_target’: net/nfc/netlink.c:903:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] int rc; ^~ Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz net/nfc/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df26c2e87e6cf3ced1fbd589e40d633a6a7f20cb Author: Martin Schwidefsky Date: Tue Apr 4 12:55:11 2017 +0200 s390/cpumf: simplify detection of guest samples There are three different code levels in regard to the identification of guest samples. They differ in the way the LPP instruction is used. 1) Old kernels without the LPP instruction. The guest program parameter is always zero. 2) Newer kernels load the process pid into the program parameter with LPP. The guest program parameter is non-zero if the guest executes in a process != idle. 3) The latest kernels load ((1UL << 31) | pid) with LPP to make the value non-zero even for the idle task. The guest program parameter is non-zero if the guest is running. All kernels load the process pid to CR4 on context switch. The CPU sampling code uses the value in CR4 to decide between guest and host samples in case the guest program parameter is zero. The three cases: 1) CR4==pid, gpp==0 2) CR4==pid, gpp==pid 3) CR4==pid, gpp==((1UL << 31) | pid) The load-control instruction to load the pid into CR4 is expensive and the goal is to remove it. To distinguish the host CR4 from the guest pid for the idle process the maximum value 0xffff for the PASN is used. This adds a fourth case for a guest OS with an updated kernel: 4) CR4==0xffff, gpp=((1UL << 31) | pid) The host kernel will have CR4==0xffff and will use (gpp!=0 || CR4!==0xffff) to identify guest samples. This works nicely with all 4 cases, the only possible issue would be a guest with an old kernel (gpp==0) and a process pid of 0xffff. Well, don't do that.. Suggested-by: Christian Borntraeger Reviewed-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky arch/s390/kernel/entry.S | 4 ---- arch/s390/kernel/head64.S | 2 +- arch/s390/kernel/perf_cpum_sf.c | 7 +++---- 3 files changed, 4 insertions(+), 9 deletions(-) commit 682fd6185053875bb16efb1037f3d2ae9680b015 Author: Andy Shevchenko Date: Tue Mar 7 12:25:46 2017 +0200 NFC: st21nfca: Use unified device property API meaningfully Another place in the code that unveils non-tested at all ACPI case. Use unified device property API in meaningful way. Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/st21nfca/i2c.c | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) commit 8d3c50e2f290585f000638c3e3a8a1b1208e49cf Author: Andy Shevchenko Date: Tue Mar 7 12:25:45 2017 +0200 NFC: st21nfca: Covert to use GPIO descriptor Since we got rid of platform data, the driver may use GPIO descriptor directly. Looking deeply to the use of the GPIO pin it looks like it should be a fixed voltage regulator rather than custom GPIO handling. But this is out of scope of the change. Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/st21nfca/i2c.c | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) commit 8e7836d030a2e08290a8df25d45a2fad00957738 Author: Andy Shevchenko Date: Tue Mar 7 12:25:44 2017 +0200 NFC: st21nfca: Get rid of "interesting" use of interrupt polarity I2C framework followed by IRQ framework does set interrupt polarity correctly if it's properly specified in firmware (ACPI or DT). Get rid of the redundant trick when requesting interrupt. Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/st21nfca/i2c.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 79557b33cca2fa005235b45ab16b81f95f441bd8 Author: Andy Shevchenko Date: Tue Mar 7 12:25:43 2017 +0200 NFC: st21nfca: Get rid of platform data Legacy platform data must go away. We are on the safe side here since there are no users of it in the kernel. If anyone by any odd reason needs it the GPIO lookup tables and built-in device properties at your service. Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/st21nfca/i2c.c | 46 +++------------------------------- include/linux/platform_data/st21nfca.h | 33 ------------------------ 2 files changed, 3 insertions(+), 76 deletions(-) commit bacf2a6a05726e3f10aa94ef7a20feba62ee5579 Author: Andy Shevchenko Date: Tue Mar 7 12:25:42 2017 +0200 NFC: st21nfca: Fix obvious typo when check error code We return -ENODEV if ACPI provides a GPIO resource. Looks really wrong. If it has even been tested? Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/st21nfca/i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 95129b6f0806d1ba6109dc1df4d9753ad3d4a94c Author: Andy Shevchenko Date: Tue Mar 28 12:36:39 2017 +0300 NFC: pn544: Get rid of code duplication in ->probe() Since OF and ACPI case almost the same get rid of code duplication by moving gpiod_get() calls directly to ->probe(). Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/pn544/i2c.c | 84 ++++++++++--------------------------------------- 1 file changed, 17 insertions(+), 67 deletions(-) commit a4a0eb783b112e45563dcf020388dfa186961010 Author: Andy Shevchenko Date: Tue Mar 28 12:36:38 2017 +0300 NFC: pn544: Add GPIO ACPI mapping table In order to make GPIO ACPI library stricter prepare users of gpiod_get_index() to correctly behave when there no mapping is provided by firmware. Here we add explicit mapping between _CRS GpioIo() resources and their names used in the driver. Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/pn544/i2c.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 182d4e860845bbf388f5f60d9e651611f3dbd351 Author: Andy Shevchenko Date: Tue Mar 28 12:36:37 2017 +0300 NFC: pn544: Convert to use devm_request_threaded_irq() The error handling will be neat and short when using managed resources. Convert the driver to use devm_request_threaded_irq(). Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/pn544/i2c.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit e2c518c6c9987bf832bb1475de38911da96bd3db Author: Andy Shevchenko Date: Tue Mar 28 12:36:36 2017 +0300 NFC: pn544: Convert to use GPIO descriptor Since we got rid of platform data, the driver may use GPIO descriptor directly. This change fixes a potential issue of double freeing GPIOs in ACPI case by converting to devm_gpiod_get(). Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/pn544/i2c.c | 126 +++++++++++++----------------------------------- 1 file changed, 33 insertions(+), 93 deletions(-) commit e7f6ccaab127147c52ac4b624c54ad0059bd08e9 Author: Andy Shevchenko Date: Tue Mar 28 12:36:35 2017 +0300 NFC: pn544: Get rid of platform data Legacy platform data must go away. We are on the safe side here since there are no users of it in the kernel. If anyone by any odd reason needs it the GPIO lookup tables and built-in device properties at your service. Signed-off-by: Andy Shevchenko Signed-off-by: Samuel Ortiz drivers/nfc/pn544/i2c.c | 43 ++++++------------------------------- include/linux/platform_data/pn544.h | 43 ------------------------------------- 2 files changed, 6 insertions(+), 80 deletions(-) commit 37ff1b0df37af1f45d94674c83f65fc5ad4a3c73 Author: Marcin Rokicki Date: Mon Feb 20 15:38:50 2017 +0100 ath10k: clean header files from bad block comments Fix output from checkpatch.pl like: Block comments use a trailing */ on a separate line Signed-off-by: Marcin Rokicki Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/bmi.h | 3 ++- drivers/net/wireless/ath/ath10k/core.h | 9 ++++++--- drivers/net/wireless/ath/ath10k/hif.h | 6 ++++-- drivers/net/wireless/ath/ath10k/htt.h | 24 +++++++++++++++-------- drivers/net/wireless/ath/ath10k/hw.h | 3 ++- drivers/net/wireless/ath/ath10k/rx_desc.h | 13 ++++++++----- drivers/net/wireless/ath/ath10k/targaddrs.h | 19 +++++++++--------- drivers/net/wireless/ath/ath10k/wmi-ops.h | 3 ++- drivers/net/wireless/ath/ath10k/wmi.h | 30 +++++++++++++++++++---------- 9 files changed, 70 insertions(+), 40 deletions(-) commit 53c8d48bb72388e22110e5ef1f52dfc3fac6d97f Author: Marcin Rokicki Date: Mon Feb 20 14:40:27 2017 +0100 ath10k: use octal permission representation Fix output from checkpatch.pl like: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'. Signed-off-by: Marcin Rokicki Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/debug.c | 88 +++++++++++++-------------- drivers/net/wireless/ath/ath10k/debugfs_sta.c | 9 ++- drivers/net/wireless/ath/ath10k/spectral.c | 6 +- drivers/net/wireless/ath/ath10k/thermal.c | 2 +- 4 files changed, 50 insertions(+), 55 deletions(-) commit 5f4c8cafe1148f8a91287072815df8f0b66f0e5c Author: Sergei Shtylyov Date: Tue Apr 4 23:20:16 2017 +0300 pinctrl: sh-pfc: r8a7794: Swap ATA signals All R8A7794 manuals I have here (0.50 and 1.10) agree that the PFC driver has ATAG0# and ATAWR0# signals in IPSR12 swapped -- fix this. Fixes: 43c4436e2f18 ("pinctrl: sh-pfc: add R8A7794 PFC support") Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7794.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit d6dfe25c8bb200027dfc5c793cbec81c9af6dd2e Author: Marcin Rokicki Date: Mon Feb 20 14:39:57 2017 +0100 ath10k: fix block comments style Fix output from checkpatch.pl like: Block comments use a trailing */ on a separate lin Signed-off-by: Marcin Rokicki Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 9 ++++--- drivers/net/wireless/ath/ath10k/debug.c | 3 ++- drivers/net/wireless/ath/ath10k/htc.c | 3 ++- drivers/net/wireless/ath/ath10k/htt_rx.c | 9 ++++--- drivers/net/wireless/ath/ath10k/htt_tx.c | 6 +++-- drivers/net/wireless/ath/ath10k/mac.c | 43 +++++++++++++++++++------------ drivers/net/wireless/ath/ath10k/pci.c | 12 ++++++--- drivers/net/wireless/ath/ath10k/thermal.c | 3 ++- drivers/net/wireless/ath/ath10k/txrx.c | 3 ++- drivers/net/wireless/ath/ath10k/wmi.c | 16 +++++++----- 10 files changed, 69 insertions(+), 38 deletions(-) commit f410ff65548c548fed5f7e38c4ef57a73ebfe3bd Author: Jan Kara Date: Fri Dec 16 10:13:37 2016 +0100 audit: Abstract hash key handling Audit tree currently uses inode pointer as a key into the hash table. Getting that from notification mark will be somewhat more difficult with coming fsnotify changes. So abstract getting of hash key from the audit chunk and inode so that we can change the method to obtain a key easily. Reviewed-by: Miklos Szeredi CC: Paul Moore Acked-by: Paul Moore Signed-off-by: Jan Kara kernel/audit_tree.c | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) commit e871fb6396f7251ae4a90c20be38015c8b20e502 Author: Maharaja Kennadyrajan Date: Fri Mar 31 17:39:40 2017 +0530 ath10k: fix the Transmit Power Control stats display format This patch helps to fix TPC stats to display the stats properly. Here cosmetic change has been done to print the TPC stats for all the cases 1.CDD 2.STBC 3.TXBF Signed-off-by: Maharaja Kennadyrajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb7fa766a8cf9dede60f71ba87241f37bd98cabe Author: Mohammed Shafi Shajakhan Date: Fri Mar 31 17:30:44 2017 +0530 ath10k: remove obselete Copy Engine comments Remove obselete Copy Engine comments referring to the function ath10k_ce_sendlist_send as this function was removed long time back by the commit 2e761b5a5222 ("ath10k: remove ce_sendlist_send"). Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ce.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 03e463a4197a05f196b1b9e9bb3b66fecbe50889 Author: Mohammed Shafi Shajakhan Date: Fri Mar 31 17:29:26 2017 +0530 ath10k: enable a HTC debug message during insufficient tx credits Add an ath10k HTC debug message when insufficient tx credits are available to send the WMI commands. This is very useful in debugging issues like 'tx credit starvation' that could possibly happen with multiclient setup with constant roaming Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htc.c | 3 +++ 1 file changed, 3 insertions(+) commit d94475c2f95c8fbc6871aaf2df3fd093c329dde8 Author: Mohammed Shafi Shajakhan Date: Fri Mar 31 17:28:41 2017 +0530 ath10k: cancel coverage class work during stop and restart It seems set_coverage_class_work is not cancelled anywhere, though I could not find a crash/warning with this existing design, its safer to cancel it during stop() and also before restarting the hardware. Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 7 +++++++ drivers/net/wireless/ath/ath10k/mac.c | 1 + 2 files changed, 8 insertions(+) commit fefcd11535abc4cb45d1572afc2351114572493e Author: Venkateswara Rao Naralasetty Date: Fri Mar 24 13:27:28 2017 +0530 ath10k: fix station nss computation If station advertises diffferent NSS capabilities in Rx_mcs set of HT and VHT IEs in assoc req, the current NSS computation logic configures the NSS support only based on Rx_mcs set of HT capabilities in the driver. This is configuring the station NSS capabilities incorreclty in the target. For example, if station advertise Rx_mcs set as 2 spatial streams in HT capabilities and 1 spatial streams in VHT capabilities in assoc request, as per current logic we are calculating nss from HT capabilities and the driver sets peer_num_spatial_streams as 2 for the station which is configured in VHT 1*1. This patchs fix this issue by calculating the nss from VHT cap if station supports vht. Signed-off-by: Venkateswara Rao Naralasetty Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit ebeb36670ecac36c179b5fb5d5c88ff03ba191ec Author: Johan Hovold Date: Mon Mar 13 13:44:20 2017 +0100 ath9k_htc: fix NULL-deref at probe Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer or accessing memory beyond the endpoint array should a malicious device lack the expected endpoints. Fixes: 36bcce430657 ("ath9k_htc: Handle storage devices") Cc: stable # 2.6.39+ Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/hif_usb.c | 3 +++ 1 file changed, 3 insertions(+) commit a7595a820b07db9ac0d8f479ff62002bdd32a05a Author: Mohammed Shafi Shajakhan Date: Mon Mar 20 20:52:46 2017 +0530 ath10k: fix NAPI enable/disable symmetry for AHB interface Move NAPI enable to 'ath10k_ahb_hif_start' from 'ath10k_ahb_hif_power_up'. This is to maintain the symmetry of calling napi_enable() from ath10k_ahb_hif_start() so that it matches with napi_disable() being called from ath10k_pci_hif_stop(). This change is based on the crash fix from Kalle for PCI interface in commit 1427228d5869 ("ath10k: fix napi crash during rmmod when probe firmware fails"). Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ahb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04ee39ba9fff5bf6278328e2da1740001159c4c6 Author: Daniel Vetter Date: Mon Apr 3 10:32:56 2017 +0200 drm: Only take crtc lock in get_gamma ioctl We don't call into drivers at all here, this is enough. Also, we can reduce the critical section a bit to simplify the code. crtc->gamma_size is set up once at driver load and then invariant, so also doesn't need any protection. Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-8-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_color_mgmt.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit eb8eb02ed850df95ba2224515b95eb311904e992 Author: Daniel Vetter Date: Mon Apr 3 10:32:55 2017 +0200 drm: Drop modeset_lock_all from the getproperty ioctl Properties, i.e. the struct drm_property specifying the type and value range of a property, not the instantiation on a given object, are invariant over the lifetime of a driver. Hence no locking at all is needed, we can just remove it. While at it give the function some love and simplify it, to get it under the 80 char limit: - Straighten the loops to reduce the nesting. - use u64_to_user_ptr casting helper - use put_user for fixed u64 copies. Note there's a small behavioural change in that we now copy parts of the values to userspace if the arrays are a bit too small. Since userspace will immediately retry anyway, this doesn't matter. Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-7-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_property.c | 72 +++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 43 deletions(-) commit c2d855649e303523787473d388931948e8fbf93d Author: Daniel Vetter Date: Mon Apr 3 10:32:54 2017 +0200 drm: drop modeset_lock_all from drm_state_info If we push the locks down we don't have to take them all at the same time. Aside: Making dump_info fully safe should be fairly simple, if we protect the ->state pointers with rcu. Simply putting a synchronize_rcu() into the drm_atomic_state free function should be all that's roughly needed. Well except we shouldn't block in there, so better to put that into a work_struct. But I've not set out to fix that little issue. Cc: Rob Clark Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-6-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic.c | 60 ++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 21 deletions(-) commit a5b8444e289c9e759927f9bf2e82f10719729fe7 Author: Daniel Vetter Date: Mon Apr 3 10:32:53 2017 +0200 drm/atomic-helper: remove modeset_lock_all from helper_resume Atomic code rely shouldn't rely on the magic hidden acquire context. v2: Remove unused config local var (gcc). Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-5-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic_helper.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit b260ac3ebef5eb748207cd542dba00af6c5caaa5 Author: Daniel Vetter Date: Mon Apr 3 10:32:52 2017 +0200 drm: Remove drm_modeset_legacy_acquire_ctx and crtc->acquire_ctx With all the callers of drm_modeset_lock_crtc gone, and all the places it was formerly used properly wiring the acquire ctx through, we can remove this. The only hidden context magic we still have is now the global one. Reviewed-by: Harry Wentland Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-4-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic.c | 14 -------------- drivers/gpu/drm/drm_atomic_helper.c | 2 +- drivers/gpu/drm/drm_modeset_lock.c | 21 --------------------- drivers/gpu/drm/i915/intel_display.c | 4 ++-- drivers/gpu/drm/i915/intel_pipe_crc.c | 2 +- include/drm/drm_crtc.h | 9 --------- include/drm/drm_modeset_lock.h | 2 -- 7 files changed, 4 insertions(+), 50 deletions(-) commit b95ff0319a829d5e707d64a3994c75f012f6b6ec Author: Daniel Vetter Date: Mon Apr 3 10:32:51 2017 +0200 drm: Remove drm_modeset_(un)lock_crtc The last user, the cursor ioctl, can just open-code this too. We simply have to move the acquire ctx dance from the universal function up into the top-level ioctl handler. Reviewed-by: Harry Wentland Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-3-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_crtc_internal.h | 3 -- drivers/gpu/drm/drm_modeset_lock.c | 67 ------------------------------------- drivers/gpu/drm/drm_plane.c | 49 +++++++++++++-------------- include/drm/drm_modeset_lock.h | 1 - 4 files changed, 24 insertions(+), 96 deletions(-) commit 5f27502655f657989dac0622ecf70b9e173e90f8 Author: Daniel Vetter Date: Mon Apr 3 10:32:50 2017 +0200 drm: Make drm_modeset_lock_crtc internal This is only for legacy paths that need to grab the crtc/plane lock combo. If you want to lock a crtc, just use drm_modeset_lock(). Reviewed-by: Harry Wentland Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-2-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_crtc_internal.h | 3 +++ drivers/gpu/drm/drm_modeset_lock.c | 14 -------------- include/drm/drm_modeset_lock.h | 2 -- 3 files changed, 3 insertions(+), 16 deletions(-) commit 09e40034f342de0085776e08eb6ed0dc3e030860 Merge: 41977e8 b51040f Author: Kalle Valo Date: Wed Apr 5 10:14:09 2017 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.12. Major changes: ath10k * improve firmware download time for QCA6174 and QCA9377, especially helps resume time ath9k_htc * add support AirTies 1eda:2315 AR9271 device commit 68f37d862403e8f95337b2eca90af15d0b8cd5d7 Author: Chen-Yu Tsai Date: Wed Apr 5 14:37:44 2017 +0800 clk: sunxi-ng: a33: Add offset and minimum value for DDR1 PLL N factor The DDR1 PLL on the A33 is an oddball amongst the A33 CCU clocks. It is a clock multiplier, with the effective multiplier in the range of 12 ~ 255 and no offset between the multiplier value and the value programmed into the register. Implement the zero offset and minimum value of 12 for this clock. Fixes: d05c748bd730 ("clk: sunxi-ng: Add A33 CCU support") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-a33.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 25eb035c3f22bde1eff43fe5c59b207d54a3d520 Author: Chen-Yu Tsai Date: Wed Apr 5 14:37:43 2017 +0800 clk: sunxi-ng: a80: Remodel CPU cluster PLLs as N-type multiplier clocks The CPU cluster PLLs on the A80 are NP clocks that are atypical in two ways: - The P factor is 1 bit wide, and translates to a /1 or /4 divider. - The P factor should only be used for output frequencies lower than 288 MHz. The N factor has a lower limit of 12, which likely contributed to this extra divider. According to the user manual, the clocks can only go as low as 200 MHz. The vendor BSP kernel does not even define operating points below 360 MHz for these clocks. The lower end for cpufreq in the vendor kernel is even higher. The mainline Linux kernel doesn't support cpufreq for the A80 at the moment. This means the lower frequencies are untested, and will likely remain unused. The new sunxi-ng style clocks don't support the quirks listed above. Instead of trying to work the quirks in for something of little usage, we re-model the clocks into N-type multipler clocks, with P fixed at 1. At probe time we check if P is set to 4, and fix it up if needed. This is highly unlikely though. Fixes: b8eb71dcdd08 ("clk: sunxi-ng: Add A80 CCU") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun9i-a80.c | 70 ++++++++++++++++++++++++++---------- 1 file changed, 52 insertions(+), 18 deletions(-) commit cf719012b23278c65d0bca4975a7ea46e5bb75be Author: Chen-Yu Tsai Date: Wed Apr 5 14:37:42 2017 +0800 clk: sunxi-ng: mult: Support PLL lock detection Some PLL clocks are N (multiplier) type clocks, or can be simplified as such. An example of the former is the DDR1 PLL clock on the A33. An example of the latter is the CPU PLL clock on the A80, in which the P divider is only used for low frequencies that are of little use. Both clocks support PLL lock detection. The mult clock macro implies support for this, but that is not true. The field is simply discarded. This patch adds proper support for it. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_mult.c | 2 ++ drivers/clk/sunxi-ng/ccu_mult.h | 2 ++ 2 files changed, 4 insertions(+) commit cb44b46d8ed2abf3ac253807de61ae2a4c16cb4c Author: Patrick Menschel Date: Tue Apr 4 20:36:30 2017 +0200 ARM: dts: sun7i: fix device node ordering This patch changes the device node position of ps20 and ps21 to fix ordering by rising physical address. From uart7: serial@01c29c00 i2c0: i2c@01c2ac00 i2c1: i2c@01c2b000 i2c2: i2c@01c2b400 i2c3: i2c@01c2b800 i2c4: i2c@01c2c000 gmac: ethernet@01c50000 hstimer@01c60000 gic: interrupt-controller@01c81000 ps20: ps2@01c2a000 ps21: ps2@01c2a400 to uart7: serial@01c29c00 ps20: ps2@01c2a000 ps21: ps2@01c2a400 i2c0: i2c@01c2ac00 i2c1: i2c@01c2b000 i2c2: i2c@01c2b400 i2c3: i2c@01c2b800 i2c4: i2c@01c2c000 gmac: ethernet@01c50000 hstimer@01c60000 gic: interrupt-controller@01c81000 Signed-off-by: Patrick Menschel Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20.dtsi | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit a2294bd61855ce210ec660e9624072d26651f23b Author: Patrick Menschel Date: Tue Apr 4 20:36:27 2017 +0200 ARM: dts: sun4i: fix device node ordering This patch changes the device node position of ps20 and ps21 to fix ordering by rising physical address. From uart7: serial@01c29c00 i2c0: i2c@01c2ac00 i2c1: i2c@01c2b000 i2c2: i2c@01c2b400 ps20: ps2@01c2a000 ps21: ps2@01c2a400 to uart7: serial@01c29c00 ps20: ps2@01c2a000 ps21: ps2@01c2a400 i2c0: i2c@01c2ac00 i2c1: i2c@01c2b000 i2c2: i2c@01c2b400 Signed-off-by: Patrick Menschel Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10.dtsi | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 11e445e9b499dfd96d7cbc55b2f22057fcf2804d Merge: fcc309e 99094a5 Author: Ingo Molnar Date: Wed Apr 5 07:40:16 2017 +0200 Merge tag 'perf-core-for-mingo-4.12-20170404' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: User visible changes: - Add missing number of samples in 'perf annotate --stdio -l --show-total-period' (Taeung Song) Vendor events updates: - Add uncore_arb Intel vendor events in JSON format (Andi Kleen) - Add uncore vendor events for Intel's Sandy Bridge, Ivy Bridge, Haswell, Broadwell and Skylake architectures (Andi Kleen) - Add missing UNC_M_DCLOCKTICKS Intel Broadwell DE uncore vendor event (Andi Kleen) Infrastructure changes: - Remove some more die() calls, avoiding sudden death in library code (Arnaldo Carvalho de Melo) - Add argument support for SDT events in powerpc (Ravi Bangoria) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 561ecb0cf6904ce6aac8597004f311d215571625 Author: Sebastian Ott Date: Mon Mar 27 19:22:27 2017 +0200 s390/pci: remove forward declaration Move a struct definition to get rid of a forward declaration. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky arch/s390/pci/pci.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit b18601b076fe32c6556e9bfe7cb811d86625e450 Author: Sebastian Ott Date: Mon Mar 27 19:09:15 2017 +0200 s390/pci: increase the PCI_NR_FUNCTIONS default Users complained that they are hitting the limit of 64 functions (some physical functions can spawn lots of virtual functions). Double the default limit. With the latest savings in static data usage this increases the image size by only 520 bytes. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0c8ce897a42ab357001f275fa80ba82c8d4555f Author: Sebastian Ott Date: Mon Mar 27 19:07:24 2017 +0200 s390/pci: reduce iomap size (even more) Commit c506fff3d3a8 ("s390/pci: resize iomap") reduced the iomap to NR_FUNCTIONS * PCI_BAR_COUNT elements. Since we only support functions with 64bit BARs we can cut that number in half. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky arch/s390/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e0cca7d64b62b5974fa198acce0d3b476ca9914 Author: Sebastian Ott Date: Mon Mar 27 18:23:01 2017 +0200 s390/pci: remove duplicated define Address space identifiers are already defined in . Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky arch/s390/pci/pci.c | 2 -- 1 file changed, 2 deletions(-) commit 02f5cb9fe851e924775b79f466133be72affdc9a Author: Sebastian Ott Date: Mon Mar 27 18:22:14 2017 +0200 s390/pci: remove unused function barsize was never used. Get rid of it. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky arch/s390/pci/pci.c | 5 ----- 1 file changed, 5 deletions(-) commit cab36c262ef9a5ddf3c7ae0f8031b191338b3142 Author: Martin Schwidefsky Date: Mon Apr 3 13:30:23 2017 +0200 s390: use 64-bit lctlg to load task pid to cr4 on context switch The 32-bit lctl instruction is quite a bit slower than the 64-bit counter part lctlg. Use the faster instruction. Signed-off-by: Martin Schwidefsky arch/s390/kernel/entry.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 89bb5752c054e971fd453456792cb3db3d738f75 Author: Christian König Date: Wed Mar 29 13:41:57 2017 +0200 drm/amdgpu: use TTM_PL_FLAG_CONTIGUOUS v2 Implement AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS using TTM_PL_FLAG_CONTIGUOUS instead of a placement limit. That allows us to better handle CPU accessible placements. v2: prevent virtual BO start address from overflowing Signed-off-by: Christian König Acked-by: Michel Dänzer Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 +++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 17 +++++++++++++---- 2 files changed, 18 insertions(+), 10 deletions(-) commit f75e237c41587b5e438cbf5d5c90ffcda4080955 Author: Christian König Date: Thu Mar 30 15:55:07 2017 +0200 drm/amdgpu: move adjust_mc_addr into amdgpu_gart_funcs We should probably rename amdgpu_gart_funcs sooner or later. Reviewed-by: Junwei Zhang Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 ----- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 23 +++++++---------------- 3 files changed, 9 insertions(+), 23 deletions(-) commit f7d015b90dd48c94ab43380a735acf2b3c2c62bf Author: Christian König Date: Mon Apr 3 14:28:26 2017 +0200 drm/amdgpu: cleanup logic in amdgpu_vm_flush Remove some of the extra checks where they don't hurt us. Reviewed-by: Junwei Zhang Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit c0e51931a1cf35be9f146b44e2b9e7ac575fa411 Author: Christian König Date: Mon Apr 3 14:16:07 2017 +0200 drm/amdgpu: cleanup coding style in amdgpu_vm_flush Abort early if there is nothing todo and correctly indent the "if"s. Reviewed-by: Junwei Zhang Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 88 +++++++++++++++++----------------- 1 file changed, 45 insertions(+), 43 deletions(-) commit 641e94008970ef7dba764a3c672ec8bd40b9a533 Author: Christian König Date: Mon Apr 3 13:59:25 2017 +0200 drm/amdgpu: coding style of amdgpu_vm_is_gpu_reset The name is a bit confusing and the extra "? true : false" is superflous. Additional to that remove setting the reset counter directly after checking it. Reviewed-by: Junwei Zhang Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 6332ab906aa21ebeec710f3c14025b7af425d0f2 Author: Christian König Date: Thu Mar 30 14:53:05 2017 +0200 drm/amdgpu: remove VMID first tracking Not used any more. Reviewed-by: Junwei Zhang Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ---- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 1 - 2 files changed, 5 deletions(-) commit eb60ef2b4d77c591539f1cf4af2f0c2022d57689 Author: Christian König Date: Thu Mar 30 14:41:19 2017 +0200 drm/amdgpu: move VM related defines into amdgpu_vm.h Try to clean up amdgpu.h. Reviewed-by: Junwei Zhang Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 -------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) commit 5a9b8e8a0bb45836d3678466cae325728127a5ba Author: Christian König Date: Thu Mar 30 14:37:23 2017 +0200 drm/amdgpu: fix VMHUB order to match the hardware Match our defines with what the hw uses. Reviewed-by: Junwei Zhang Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++-- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 12 +++--------- 2 files changed, 5 insertions(+), 11 deletions(-) commit b94e433660b832e4c59a0f5d30fc4482a0df790e Author: Christian König Date: Tue Mar 28 20:00:20 2017 +0200 drm/amdgpu: drop alpha support We will probably never see this combination. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 25 ------------------------- 1 file changed, 25 deletions(-) commit c8b26bd1d2997e20b5f911c04b1dd2266256b976 Author: Christian König Date: Wed Mar 29 12:13:54 2017 +0200 drm/ttm: add TTM_PL_FLAG_CONTIGUOUS v2 This allows drivers to specify if they need a contiguous allocation or not. v2: use space instead of tab Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 4 +++- include/drm/ttm/ttm_placement.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit ea642c3216cb2a60d1c0e760ae47ee85c9c16447 Author: Christian König Date: Tue Mar 28 16:54:50 2017 +0200 drm/ttm: add io_mem_pfn callback This allows the driver to handle io_mem mappings on their own. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 + drivers/gpu/drm/ast/ast_ttm.c | 1 + drivers/gpu/drm/bochs/bochs_mm.c | 1 + drivers/gpu/drm/cirrus/cirrus_ttm.c | 1 + drivers/gpu/drm/mgag200/mgag200_ttm.c | 1 + drivers/gpu/drm/nouveau/nouveau_bo.c | 1 + drivers/gpu/drm/qxl/qxl_ttm.c | 1 + drivers/gpu/drm/radeon/radeon_ttm.c | 1 + drivers/gpu/drm/ttm/ttm_bo_vm.c | 10 +++++++++- drivers/gpu/drm/virtio/virtgpu_ttm.c | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | 1 + include/drm/ttm/ttm_bo_api.h | 11 +++++++++++ include/drm/ttm/ttm_bo_driver.h | 9 +++++++++ 13 files changed, 39 insertions(+), 1 deletion(-) commit 018b7fc3a9ac33ac56310ab301dca402155eee15 Author: Christian König Date: Wed Mar 29 11:47:04 2017 +0200 drm/ttm: cleanup and optimize ttm_bo_mem_compat v2 No need to implement the same logic twice. Also check if the busy placements are identical to the already scanned placements before checking them. v2: improve check even more as suggested by Michel. Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 45 ++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) commit 76e15e029ba6cf3d203e6d136db16a00a3f76909 Author: Alex Deucher Date: Thu Mar 30 12:24:59 2017 -0400 drm/amdgpu/vi: add defines for KIQ packets Make it clearer how these packets work. Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vid.h | 82 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit 1fdc639b7a2bd28067e449436305bc535345f6fc Author: Alex Deucher Date: Mon Apr 3 16:56:08 2017 -0400 drm/amdgpu/soc15: Fix static checker warnings vega10 is the only soc15 asic at the moment so these warnings are invalid, but add a default case to silence the warnings. Fixes: 220ab9bd1ccf: "drm/amdgpu: soc15 enable (v3)" Reviewed-by: Junwei Zhang Reviewed-by: Harry Wentland Reported-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8690218a4c98af41f4abd3dba97bcf468c537629 Author: Johannes Thumshirn Date: Mon Apr 3 16:32:50 2017 +0200 scsi: sas: remove sas_domain_release_transport sas_domain_release_transport is unused since at least v3.13, remove it. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_init.c | 7 ------- include/scsi/libsas.h | 1 - 2 files changed, 8 deletions(-) commit 5a68a1c29fd65669bbe1e4c3f8b7aefa3db7f208 Author: Milan P Gandhi Date: Fri Mar 31 14:37:04 2017 -0700 scsi: qla2xxx: Fix typo in driver Signed-off-by: Milan P Gandhi Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_attr.c | 2 +- drivers/scsi/qla2xxx/qla_bsg.c | 2 +- drivers/scsi/qla2xxx/qla_gs.c | 2 +- drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_isr.c | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) commit 99094a5e941fe88d95cbd594e6a41bee24003ecb Author: Taeung Song Date: Tue Mar 28 21:12:05 2017 +0900 perf annotate: Fix missing number of samples for source_line_samples The option 'show-total-period' works fine without a option '-l'. But if running 'perf annotate --stdio -l --show-total-period', you can see a problem showing only zero '0' for number of samples. Before: $ perf annotate --stdio -l --show-total-period ... 0 : 400816: push %rbp 0 : 400817: mov %rsp,%rbp 0 : 40081a: mov %edi,-0x24(%rbp) 0 : 40081d: mov %rsi,-0x30(%rbp) 0 : 400821: mov -0x24(%rbp),%eax 0 : 400824: mov -0x30(%rbp),%rdx 0 : 400828: mov (%rdx),%esi 0 : 40082a: mov $0x0,%edx ... The reason is it was missed to set number of samples of source_line_samples, so set it ordinarily. After: $ perf annotate --stdio -l --show-total-period ... 3 : 400816: push %rbp 4 : 400817: mov %rsp,%rbp 0 : 40081a: mov %edi,-0x24(%rbp) 0 : 40081d: mov %rsi,-0x30(%rbp) 1 : 400821: mov -0x24(%rbp),%eax 2 : 400824: mov -0x30(%rbp),%rdx 0 : 400828: mov (%rdx),%esi 1 : 40082a: mov $0x0,%edx ... Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Martin Liska Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Fixes: 0c4a5bcea460 ("perf annotate: Display total number of samples with --show-total-period") Link: http://lkml.kernel.org/r/1490703125-13643-1-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 6 ++++-- tools/perf/util/annotate.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) commit 44a5b977128c0ffff0654392b40f4c2ce72a619b Author: Arnd Bergmann Date: Thu Mar 23 16:02:18 2017 +0100 scsi: advansys: fix uninitialized data access gcc-7.0.1 now warns about a previously unnoticed access of uninitialized struct members: drivers/scsi/advansys.c: In function 'AscMsgOutSDTR': drivers/scsi/advansys.c:3860:26: error: '*((void *)&sdtr_buf+5)' may be used uninitialized in this function [-Werror=maybe-uninitialized] ((ushort)s_buffer[i + 1] << 8) | s_buffer[i]); ^ drivers/scsi/advansys.c:3860:26: error: '*((void *)&sdtr_buf+7)' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/scsi/advansys.c:3860:26: error: '*((void *)&sdtr_buf+5)' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/scsi/advansys.c:3860:26: error: '*((void *)&sdtr_buf+7)' may be used uninitialized in this function [-Werror=maybe-uninitialized] The code has existed in this exact form at least since v2.6.12, and the warning seems correct. This uses named initializers to ensure we initialize all members of the structure. Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen drivers/scsi/advansys.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit b2121170143bf4708c657461740c922ce24bc94e Merge: 6939db7 92c2cc5 Author: Kevin Hilman Date: Tue Apr 4 16:16:52 2017 -0700 Merge tag 'amlogic-clk-headers' into v4.12/dt64 Amlogic clock headers and DT binding updates for v4.12 - add clocks for I2S and Mali # gpg: Signature made Tue Apr 4 16:07:50 2017 PDT using RSA key ID D3FBC665 # gpg: Good signature from "Kevin Hilman " [ultimate] # gpg: aka "Kevin Hilman " [ultimate] # gpg: aka "Kevin Hilman " [ultimate] # gpg: aka "Kevin Hilman " [ultimate] * tag 'amlogic-clk-headers': dt-bindings: clock: gxbb-clkc: Add GXL compatible variant clk: meson-gxbb: Expose GP0 dt-bindings clock id clk: meson-gxbb: Add MALI clock IDS dt-bindings: clk: gxbb: expose i2s output clock gates commit 93b226f9c65a951a91617f87ba1f05f14e59f26f Author: Andrey Smirnov Date: Tue Mar 28 08:42:52 2017 -0700 PCI: imx6: Do not switch speed if Gen2 is disabled Save a bit of time and avoid going through link speed change procedure in configuration where link max speed is limited to Gen1 in DT. Signed-off-by: Andrey Smirnov Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach Cc: yurovsky@gmail.com Cc: Fabio Estevam Cc: Dong Aisheng Cc: linux-arm-kernel@lists.infradead.org drivers/pci/dwc/pci-imx6.c | 52 +++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 3a429818a2e48928ae0114df5fb3b0612dd57001 Merge: 92c2cc5 0d48fc5 Author: Kevin Hilman Date: Tue Apr 4 15:58:11 2017 -0700 Merge branch 'v4.12/clk-drivers' into v4.12/clk * v4.12/clk-drivers: clk: meson-gxbb: Add GXL/GXM GP0 Variant clk: meson-gxbb: Add GP0 PLL init parameters clk: meson: Add support for parameters for specific PLLs clk: meson-gxbb: Add MALI clocks clk: meson: mpll: correct N2 maximum value clk: meson8b: add the mplls clocks 0, 1 and 2 clk: meson: gxbb: mpll: use rw operation clk: meson: mpll: add rw operation clk: gxbb: put dividers and muxes in tables clk: meson8b: put dividers and muxes in tables clk: meson: add missing const qualifiers on gate arrays clk: meson: fix SET_PARM macro commit e6dcd87fff69a9d454104b65569074855cf95b1e Author: Andrey Smirnov Date: Tue Mar 28 08:42:51 2017 -0700 PCI: imx6: Do not wait for speed change on i.MX7 As can be seen from [1]: "...the different behavior between iMX6Q PCIe and iMX7D PCIe maybe caused by the different controller version. Regarding to the DOC description, the DIRECT_SPEED_CHANGE should be cleared after the speed change from GEN1 to GEN2. Unfortunately, when GEN1 device is used, the behavior is not documented. So, IC design guys run the simulation and find out the following behaviors: 1. DIRECT_SPEED_CHANGE will be cleared in 7D after speed change from GEN1 to GEN2. This matches doc’s description 2. set MAX link speed(PCIE_CAP_TARGET_LINK_SPEED=0x01) as GEN1 and re-run the simulation, DIRECT_SPEED_CHANGE will not be cleared; remain as 1, this matches your result, but function test is passed, so this bit should not affect the normal PCIe function." imx6_pcie_wait_for_speed_change() will report false failures for Gen1 -> Gen1 speed transition, so avoid doing that check and just rely on imx6_pcie_wait_for_link() only. [1] https://community.nxp.com/message/867943 Signed-off-by: Andrey Smirnov Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach Cc: yurovsky@gmail.com Cc: Fabio Estevam Cc: Dong Aisheng Cc: linux-arm-kernel@lists.infradead.org drivers/pci/dwc/pci-imx6.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit bde4a5a00e761f55be92f62378cf5024ced79ee3 Author: Andrey Smirnov Date: Tue Mar 28 08:42:50 2017 -0700 PCI: imx6: Allow probe deferral by reset GPIO Some designs implement reset GPIO via a GPIO expander connected to a peripheral bus. One such example would be i.MX7 Sabre board where said GPIO is provided by SPI shift register connected to a bitbanged SPI bus. To support such designs, allow reset GPIO request to defer probing of the driver. Signed-off-by: Andrey Smirnov Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach Cc: yurovsky@gmail.com Cc: Fabio Estevam Cc: Dong Aisheng Cc: linux-arm-kernel@lists.infradead.org drivers/pci/dwc/pci-imx6.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 9b3fe6796d7c0e0c2b87243ce0c7f4744c54efad Author: Andrey Smirnov Date: Tue Mar 28 08:42:49 2017 -0700 PCI: imx6: Add code to support i.MX7D Add various bits of code needed to support i.MX7D variant of the IP. Signed-off-by: Andrey Smirnov Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach Acked-by: Lee Jones Acked-by: Rob Herring Cc: yurovsky@gmail.com Cc: Mark Rutland Cc: Fabio Estevam Cc: Dong Aisheng Cc: linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org .../devicetree/bindings/pci/fsl,imx6q-pcie.txt | 14 ++- drivers/pci/dwc/pci-imx6.c | 120 ++++++++++++++++----- include/linux/mfd/syscon/imx7-iomuxc-gpr.h | 4 + 3 files changed, 112 insertions(+), 26 deletions(-) commit af96f0d6394a0af59c4dd71d6bcd3b1ddfba5196 Author: Tetsuo Handa Date: Mon Nov 14 20:12:56 2016 +0900 Smack: Use GFP_KERNEL for smk_netlbl_mls(). Since all callers of smk_netlbl_mls() are GFP_KERNEL context (smk_set_cipso() calls memdup_user_nul(), init_smk_fs() calls __kernfs_new_node(), smk_import_entry() calls kzalloc(GFP_KERNEL)), it is safe to use GFP_KERNEL from netlbl_catmap_setbit(). Signed-off-by: Tetsuo Handa Signed-off-by: Casey Schaufler security/smack/smack_access.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3c8dc9f13e2e13013822ee54a529a6fe284f1e1 Author: Tetsuo Handa Date: Fri Mar 24 20:42:05 2017 +0900 smack: fix double free in smack_parse_opts_str() smack_parse_opts_str() calls kfree(opts->mnt_opts) when kcalloc() for opts->mnt_opts_flags failed. But it should not have called it because security_free_mnt_opts() will call kfree(opts->mnt_opts). Signed-off-by: Tetsuo Handa Signed-off-by: Casey Schaufler fixes: 3bf2789cad9e6573 ("smack: allow mount opts setting over filesystems with binary mount data") Cc: Vivek Trivedi Cc: Amit Sahrawat Cc: Casey Schaufler security/smack/smack_lsm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 85003a446e9d058c9c3e6cfa5d991ace07330a68 Author: Adam Manzanares Date: Tue Apr 4 08:25:14 2017 -0700 block: fix inheriting request priority from bio In 4.10 I introduced a patch that associates the ioc priority with each request in the block layer. This work was done in the single queue block layer code. This patch unifies ioc priority to request mapping across the single/multi queue block layers. I have tested this patch with the null block device driver with the following parameters. null_blk queue_mode=2 irqmode=0 use_per_node_hctx=1 nr_devices=1 I have not seen a performance regression with this patch and I would appreciate any feedback or additional testing. I have also verified that io priorities are passed to the device when using the SQ and MQ path to a SATA HDD that supports io priorities. Reviewed-by: Christoph Hellwig Signed-off-by: Adam Manzanares Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1c316a3ab9d24df6022682422fe897492f2c0c8 Author: Stephan Mueller Date: Fri Aug 19 20:39:09 2016 +0200 KEYS: add SP800-56A KDF support for DH SP800-56A defines the use of DH with key derivation function based on a counter. The input to the KDF is defined as (DH shared secret || other information). The value for the "other information" is to be provided by the caller. The KDF is implemented using the hash support from the kernel crypto API. The implementation uses the symmetric hash support as the input to the hash operation is usually very small. The caller is allowed to specify the hash name that he wants to use to derive the key material allowing the use of all supported hashes provided with the kernel crypto API. As the KDF implements the proper truncation of the DH shared secret to the requested size, this patch fills the caller buffer up to its size. The patch is tested with a new test added to the keyutils user space code which uses a CAVS test vector testing the compliance with SP800-56A. Signed-off-by: Stephan Mueller Signed-off-by: David Howells Documentation/security/keys.txt | 34 +++++-- include/linux/compat.h | 7 ++ include/uapi/linux/keyctl.h | 7 ++ security/keys/Kconfig | 1 + security/keys/Makefile | 3 +- security/keys/compat.c | 5 +- security/keys/compat_dh.c | 38 +++++++ security/keys/dh.c | 220 +++++++++++++++++++++++++++++++++++++--- security/keys/internal.h | 24 ++++- security/keys/keyctl.c | 2 +- 10 files changed, 315 insertions(+), 26 deletions(-) commit f0df90cd7cf2f4a8195c3fff0d2f4c85088fd39c Merge: 73cdd29 8e323a0 Author: David Howells Date: Tue Apr 4 22:33:00 2017 +0100 Merge branch 'keyctl-restrict' of git://git.kernel.org/pub/scm/linux/kernel/git/martineau/linux into keys-next To quote Mat Martineau: """ Keyrings recently acquired the ability to validate keys before they are linked using kernel internal APIs. This patch set enables configuration of restricted keyrings from userspace. These patches apply to linux-fs/keys-misc and are also available here: https://git.kernel.org/cgit/linux/kernel/git/martineau/linux.git/log/?h=keyctl-restrict v13: Detect and avoid cycles in restriction references, and change restrictions to store a single key pointer rather than arbitrary data. v12: Rework the KEYCTL_RESTRICT_KEYRING command to take an additional parameter, renamed some functions based on feedback, and dropped an unnecessary locking change (patch 1 in previous set). v11: Configure restrictions using KEYCTL_RESTRICT_KEYRING instead of using a keyring payload at creation time. Make the garbage collector aware of restrictions. v10: Fixups from maintainer feedback. Added some missing documentation. v9: Rebased on linux-fs/keys-misc (v4.9-rc5) v8: Add option to look for signing keys within the destination keyring. Fix a consistency issue with keyring locking and restriction checks. v7: Rework key restriction payload syntax. Move key-type-specific payload parsing to the key-type. Attach more restriction information to keyrings (restriction function, data, and data free) so future restrictions are not limited to storing a key ID to use for key validation. Validate key before using it to verify another key. Modify key type locking model to allow key type lookup during keyring creation. v6: Return error if only restrict_key is supplied, address misc. review comments. v5: Fixed signature bypass problem in patch 3/6 v4: Added userspace restriction options based on builtin keyrings. restrict_link_by_signature implementation is no longer modified. Split up v3's patch 2/5 to isolate the change to key.h. v3: Updated commit message for patch 2/5 (restrict_link_by_signature_indirect) v2: Payload is now preparsed """ Signed-off-by: David Howells commit 96dc4f9fb64690fc34410415fd1fc609cf803f61 Author: Sahara Date: Thu Feb 16 18:29:15 2017 +0000 usercopy: Move enum for arch_within_stack_frames() This patch moves the arch_within_stack_frames() return value enum up in the header files so that per-architecture implementations can reuse the same return values. Signed-off-by: Sahara Signed-off-by: James Morse [kees: adjusted naming and commit log] Signed-off-by: Kees Cook arch/x86/include/asm/thread_info.h | 13 +++++++------ include/linux/thread_info.h | 12 ++++++++++++ mm/usercopy.c | 8 +------- 3 files changed, 20 insertions(+), 13 deletions(-) commit fabe2be10f5f985340bb5459c7ccc8d90e4d56b8 Merge: e1b489d 0dda563e Author: Dave Airlie Date: Wed Apr 5 07:17:12 2017 +1000 Merge branch 'drm/next/du' of git://linuxtv.org/pinchartl/media into drm-next RCAR GEN3 DU HDMI support. * 'drm/next/du' of git://linuxtv.org/pinchartl/media: (22 commits) drm: rcar-du: Add HDMI outputs to R8A7795 device description drm: rcar-du: Add DPLL support drm: rcar-du: Skip disabled outputs drm: rcar-du: Add Gen3 HDMI encoder support dt-bindings: display: renesas: Add R-Car Gen3 HDMI TX DT bindings drm: rcar-du: Hardcode encoders types to DRM_MODE_ENCODER_NONE drm: rcar-du: Replace manual bridge implementation with DRM bridge drm: rcar-du: Add support for LVDS mode selection drm: rcar-du: Use the DRM panel API drm: rcar-du: Document the vsps property in the DT bindings drm: rcar-du: Remove wait field from rcar_du_device structure drm: rcar-du: Make sure the VSP is initialized on platforms that need it drm: rcar-du: Use DRM core's atomic commit helper drm: rcar-du: Clear handled event pointer in CRTC state drm: rcar-du: Handle event when disabling CRTCs drm: rcar-du: Don't open code of_device_get_match_data() drm: rcar-du: Switch to encoder .atomic_mode_set() helper function drm: panels: Add LVDS panel driver drm: Add data transmission order bus flag devicetree/bindings: display: Add bindings for two Mitsubishi panels ... commit 8e323a02e866014091180443ccb186fee1e3d30d Author: Mat Martineau Date: Tue Oct 4 16:42:45 2016 -0700 KEYS: Keyring asymmetric key restrict method with chaining Add a restrict_link_by_key_or_keyring_chain link restriction that searches for signing keys in the destination keyring in addition to the signing key or keyring designated when the destination keyring was created. Userspace enables this behavior by including the "chain" option in the keyring restriction: keyctl(KEYCTL_RESTRICT_KEYRING, keyring, "asymmetric", "key_or_keyring::chain"); Signed-off-by: Mat Martineau Documentation/crypto/asymmetric-keys.txt | 7 +- crypto/asymmetric_keys/asymmetric_type.c | 31 ++++-- crypto/asymmetric_keys/restrict.c | 158 +++++++++++++++++++++++-------- include/crypto/public_key.h | 5 + 4 files changed, 155 insertions(+), 46 deletions(-) commit 7e3c4d22083f6e7316c5229b6197ca2d5335aa35 Author: Mat Martineau Date: Mon Jun 27 16:45:16 2016 -0700 KEYS: Restrict asymmetric key linkage using a specific keychain Adds restrict_link_by_signature_keyring(), which uses the restrict_key member of the provided destination_keyring data structure as the key or keyring to search for signing keys. Signed-off-by: Mat Martineau Documentation/crypto/asymmetric-keys.txt | 11 +++++ crypto/asymmetric_keys/asymmetric_type.c | 35 +++++++++++++++- crypto/asymmetric_keys/restrict.c | 71 ++++++++++++++++++++++++++++++++ include/crypto/public_key.h | 5 +++ 4 files changed, 121 insertions(+), 1 deletion(-) commit 97d3aa0f313435a24440e7157c9c9115c58ca463 Author: Mat Martineau Date: Fri May 6 14:25:39 2016 -0700 KEYS: Add a lookup_restriction function for the asymmetric key type Look up asymmetric keyring restriction information using the key-type lookup_restrict hook. Signed-off-by: Mat Martineau Documentation/crypto/asymmetric-keys.txt | 35 +++++++++++++++++++++ crypto/asymmetric_keys/asymmetric_type.c | 52 +++++++++++++++++++++++++++----- 2 files changed, 79 insertions(+), 8 deletions(-) commit 6563c91fd645556c7801748f15bc727c77fcd311 Author: Mat Martineau Date: Wed Mar 1 16:44:09 2017 -0800 KEYS: Add KEYCTL_RESTRICT_KEYRING Keyrings recently gained restrict_link capabilities that allow individual keys to be validated prior to linking. This functionality was only available using internal kernel APIs. With the KEYCTL_RESTRICT_KEYRING command existing keyrings can be configured to check the content of keys before they are linked, and then allow or disallow linkage of that key to the keyring. To restrict a keyring, call: keyctl(KEYCTL_RESTRICT_KEYRING, key_serial_t keyring, const char *type, const char *restriction) where 'type' is the name of a registered key type and 'restriction' is a string describing how key linkage is to be restricted. The restriction option syntax is specific to each key type. Signed-off-by: Mat Martineau Documentation/security/keys.txt | 25 ++++++++++ include/linux/key.h | 6 ++- include/uapi/linux/keyctl.h | 1 + security/keys/compat.c | 4 ++ security/keys/internal.h | 3 ++ security/keys/keyctl.c | 58 ++++++++++++++++++++++ security/keys/keyring.c | 105 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 201 insertions(+), 1 deletion(-) commit 4a420896f12d2d043602f134ae18ad6be5b9d9dd Author: Mat Martineau Date: Tue Oct 4 16:27:32 2016 -0700 KEYS: Consistent ordering for __key_link_begin and restrict check The keyring restrict callback was sometimes called before __key_link_begin and sometimes after, which meant that the keyring semaphores were not always held during the restrict callback. If the semaphores are consistently acquired before checking link restrictions, keyring contents cannot be changed after the restrict check is complete but before the evaluated key is linked to the keyring. Signed-off-by: Mat Martineau security/keys/key.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit efba797b977c99bc6e0c301299272c80fb8b287f Author: Mat Martineau Date: Fri May 6 15:38:17 2016 -0700 KEYS: Add an optional lookup_restriction hook to key_type The restrict_link functions used to validate keys as they are linked to a keyring can be associated with specific key types. Each key type may be loaded (or not) at runtime, so lookup of restrict_link functions needs to be part of the key type implementation to ensure that the requested keys can be examined. Signed-off-by: Mat Martineau Documentation/security/keys.txt | 9 +++++++++ include/linux/key-type.h | 8 ++++++++ 2 files changed, 17 insertions(+) commit 2b6aa412ff23a02ac777ad307249c60a839cfd25 Author: Mat Martineau Date: Wed Aug 31 16:05:43 2016 -0700 KEYS: Use structure to capture key restriction function and data Replace struct key's restrict_link function pointer with a pointer to the new struct key_restriction. The structure contains pointers to the restriction function as well as relevant data for evaluating the restriction. The garbage collector checks restrict_link->keytype when key types are unregistered. Restrictions involving a removed key type are converted to use restrict_link_reject so that restrictions cannot be removed by unregistering key types. Signed-off-by: Mat Martineau Documentation/security/keys.txt | 21 +++++++------ certs/system_keyring.c | 21 ++++++++++++- include/linux/key.h | 8 ++--- security/integrity/digsig.c | 9 +++++- security/integrity/ima/ima_mok.c | 11 ++++++- security/keys/gc.c | 11 +++++++ security/keys/internal.h | 2 ++ security/keys/key.c | 23 ++++++++------ security/keys/keyring.c | 68 +++++++++++++++++++++++++++++++++++++--- 9 files changed, 144 insertions(+), 30 deletions(-) commit 7d4914db8fda6d38d92b1b8a740bafbd6c6d89a1 Author: Max Filippov Date: Tue Apr 4 13:26:29 2017 -0700 xtensa: fix prefetch in the raw_copy_to_user 'from' is the input buffer, it should be prefetched with prefetch, not prefetchw. Tested-by: Max Filippov Signed-off-by: Max Filippov Signed-off-by: Al Viro arch/xtensa/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5db06a8a98f515f67446a69c57577c4c363ec65d Author: Ander Conselvan de Oliveira Date: Tue Apr 4 17:52:21 2017 +0100 drm: Pass CRTC ID in userspace vblank events With the atomic API, it is possible that a single commit affects multiple crtcs. If the user requests an event with that commit, one event will be sent for each CRTC, but it is not possible to distinguish which crtc an event is for in user space. To solve this, the reserved field in struct drm_vblank_event is repurposed to include the crtc_id which the event is for. The DRM_CAP_CRTC_IN_VBLANK_EVENT is added to allow userspace to query if the crtc field will be set properly. [daniels: Rebased, using Maarten's forward-port.] Signed-off-by: Ander Conselvan de Oliveira Signed-off-by: Daniel Stone Cc: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170404165221.28240-2-daniels@collabora.com drivers/gpu/drm/drm_ioctl.c | 3 +++ drivers/gpu/drm/drm_irq.c | 2 ++ include/uapi/drm/drm.h | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) commit 0d48fc558d01ded71ffad3fe6cca8081847ac9a7 Author: Neil Armstrong Date: Wed Mar 22 11:32:25 2017 +0100 clk: meson-gxbb: Add GXL/GXM GP0 Variant The clock tree in the Amlogic GXBB and GXL/GXM SoCs is shared, but the GXL/GXM SoCs embeds a different GP0 PLL, and needs different parameters with a vendor provided reduced rate table. This patch adds the GXL GP0 variant, and adds a GXL DT compatible in order to use the GXL GP0 PLL instead of the GXBB specific one. Signed-off-by: Neil Armstrong Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1490178747-14837-4-git-send-email-narmstrong@baylibre.com drivers/clk/meson/gxbb.c | 301 ++++++++++++++++++++++++++++++++++++++++++----- drivers/clk/meson/gxbb.h | 2 + 2 files changed, 275 insertions(+), 28 deletions(-) commit e194401cf4d49e7fe2f8ec994130d59e94f09137 Author: Neil Armstrong Date: Wed Mar 22 11:32:24 2017 +0100 clk: meson-gxbb: Add GP0 PLL init parameters Tha Amlogic GXBB SoC GP0 PLL needs some vendor provided parameters to be initializated in the the GP0 control registers before configuring the rate with the rate table provided parameters. GXBB GP0 PLL tweaks are also selected to respect the vendor init procedure. Signed-off-by: Neil Armstrong Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1490178747-14837-3-git-send-email-narmstrong@baylibre.com drivers/clk/meson/gxbb.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 45fcbec70c084631dc430810dad14a7ece5000b8 Author: Neil Armstrong Date: Wed Mar 22 11:32:23 2017 +0100 clk: meson: Add support for parameters for specific PLLs In recent Amlogic GXBB, GXL and GXM SoCs, the GP0 PLL needs some specific parameters in order to initialize and lock correctly. This patch adds an optional PARAM table used to initialize the PLL to a default value with it's parameters in order to achieve to desired frequency. The GP0 PLL in GXBB, GXL/GXM also needs some tweaks in the initialization steps, and these are exposed along the PARAM table. Signed-off-by: Neil Armstrong Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1490178747-14837-2-git-send-email-narmstrong@baylibre.com drivers/clk/meson/clk-pll.c | 53 +++++++++++++++++++++++++++++++++++++++++++-- drivers/clk/meson/clkc.h | 23 ++++++++++++++++++++ 2 files changed, 74 insertions(+), 2 deletions(-) commit fac9a55b66c9b266171b69e73818a18225c41626 Author: Neil Armstrong Date: Wed Mar 22 11:18:54 2017 +0100 clk: meson-gxbb: Add MALI clocks The Mali is clocked by two identical clock paths behind a glitch free mux to safely change frequency while running. The two "mali_0" and "mali_1" clocks are composed of a mux, divider and gate. Expose these two clocks trees using generic clocks. Finally the glitch free mux is added as "mali" clock. Signed-off-by: Neil Armstrong Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1490177935-9646-3-git-send-email-narmstrong@baylibre.com drivers/clk/meson/gxbb.c | 139 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) commit 59c58ceeea9cdc6144d7b0303753e6bd26d87455 Author: K. Y. Srinivasan Date: Fri Mar 24 11:07:22 2017 -0700 PCI: hv: Allocate interrupt descriptors with GFP_ATOMIC The memory allocation here needs to be non-blocking. Fix the issue. Signed-off-by: K. Y. Srinivasan Signed-off-by: Bjorn Helgaas Reviewed-by: Long Li Cc: drivers/pci/host/pci-hyperv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 433fcf6b7b31f1f233dd50aeb9d066a0f6ed4b9d Author: K. Y. Srinivasan Date: Fri Mar 24 11:07:21 2017 -0700 PCI: hv: Specify CPU_AFFINITY_ALL for MSI affinity when >= 32 CPUs When we have 32 or more CPUs in the affinity mask, we should use a special constant to specify that to the host. Fix this issue. Signed-off-by: K. Y. Srinivasan Signed-off-by: Bjorn Helgaas Reviewed-by: Long Li Cc: drivers/pci/host/pci-hyperv.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 1bbfe9d1a315bb573d4f10bbf443b68b5ddac473 Author: Daniel Vetter Date: Tue Apr 4 11:53:04 2017 +0200 drm/doc: Small markup fixup Drive-by cleanup. Reviewed-by: Neil Armstrong Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170404095304.17599-11-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_probe_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2640981f36004085eeff65849410121809fcf560 Author: Daniel Vetter Date: Tue Apr 4 11:52:57 2017 +0200 drm: document drm_ioctl.[hc] Also unify/merge with the existing stuff. I was a bit torn where to put this, but in the end I decided to put all the ioctl/sysfs/debugfs stuff into drm-uapi.rst. That means we have a bit a split with the other uapi related stuff used internally, like drm_file.[hc], but I think overall this makes more sense. If it's too confusing we can always add more cross-links to make it more discoverable. But the auto-sprinkling of links kernel-doc already does seems sufficient. Also for prettier docs and more cross-links, switch the internal defines over to an enum, as usual. v2: Update kerneldoc fro drm_compat_ioctl too (caught by 0day), plus a bit more drive-by polish. v3: Fix typo, spotted by xerpi on irc (Sergi). v4: Add missing space in comment (Neil). Cc: Sergi Granell Reviewed-by: Neil Armstrong Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170404095304.17599-4-daniel.vetter@ffwll.ch Documentation/gpu/drm-internals.rst | 50 ---------------- Documentation/gpu/drm-uapi.rst | 14 +++++ drivers/gpu/drm/drm_ioc32.c | 76 ++++++++++++----------- drivers/gpu/drm/drm_ioctl.c | 50 +++++++++++++++- include/drm/drm_ioctl.h | 116 +++++++++++++++++++++++++++++++----- 5 files changed, 203 insertions(+), 103 deletions(-) commit e22717046a7da3cd0c0b0eec323e1dc38c777a42 Author: Daniel Vetter Date: Tue Apr 4 11:52:55 2017 +0200 drm: Consolidate and document sysfs support - remove docs for internal func, doesn't add value - add short overview snippet instead explaining that drivers don't have to bother themselves with reg/unreg concerns - drop the ttm comment about drmP.h, drmP.h is disappearing ... Reviewed-by: Neil Armstrong Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170404095304.17599-2-daniel.vetter@ffwll.ch Documentation/gpu/drm-uapi.rst | 10 ++++++ drivers/gpu/drm/drm_sysfs.c | 70 ++++++++++++++++-------------------------- include/drm/drmP.h | 5 +-- include/drm/drm_sysfs.h | 8 ++--- 4 files changed, 42 insertions(+), 51 deletions(-) commit 085c6c09c5c8529434a26107440bd28209b694d4 Author: Daniel Vetter Date: Tue Apr 4 11:52:54 2017 +0200 drm: update todo.rst Just drive-by, but we have gsoc running so better to update it now. Great news is that two entries can be removed because essentially all done. v2: Keep a bunch of the todos, Gabriel is working on them. Cc: Gabriel Krisman Bertazi Reviewed-by: Neil Armstrong Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170404095304.17599-1-daniel.vetter@ffwll.ch Documentation/gpu/todo.rst | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) commit 1ce65f5284d6018916dd4a86865d0ce5f11d24b9 Author: Harry Wentland Date: Fri Mar 31 20:14:33 2017 -0400 drm/amdgpu: Read vram width from integrated system info table On KB, KV, CZ we should read the vram width from integrated system table, if we can. The NOOFCHAN in MC_SHARED_CHMAP is not accurate. With this change we can enable two 4k displays on CZ again. This use case was broken sometime in January when we started looking at vram_width for bandwidth calculations instead of hardcoding this value. v2: Return 0 if integrated system info table is not available. Tested-by: Roman Li Signed-off-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 29 ++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.h | 2 + drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 87 +++++++++++++++------------- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 87 +++++++++++++++------------- 4 files changed, 123 insertions(+), 82 deletions(-) commit 83ca145d155fbd50b9f23b0de99cd16e805a75d0 Author: Zhang, Jerry Date: Wed Mar 29 16:08:31 2017 +0800 drm/amdgpu: create a func to check vm size break it out from the check parameters function. Signed-off-by: Junwei Zhang Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 51 ++++++++++++++++++------------ 1 file changed, 31 insertions(+), 20 deletions(-) commit 486a68f5449521edf5ea8a198481fc021da4a3e0 Author: Dan Carpenter Date: Mon Apr 3 21:41:39 2017 +0300 drm/amdgpu: Fix a NULL deref in amdgpu_vm_add_prt_cb() We accidentally dereference "cb" if the kmalloc() fails. Fixes: 451bc8eb8fe6 ("drm/amdgpu: fix PRT teardown on VM fini v3") Reviewed-by: Christian König Reviewed-by: Harry Wentland Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc85dcde42204aa4f0df5e1cb0eeacf266b8fe79 Author: John Keeping Date: Fri Mar 3 11:39:45 2017 +0000 dt-bindings: display: rk3288-mipi-dsi: add reset property This reset is required in order to fully reset the internal state of the MIPI controller. Signed-off-by: John Keeping Reviewed-by: Brian Norris Acked-by: Rob Herring Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170303113945.3bd2cbd9.john@metanate.com .../devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt | 5 +++++ 1 file changed, 5 insertions(+) commit 6939db7e0dbfb94a4fea47a67f1fcf6234c407a0 Author: Neil Armstrong Date: Tue Mar 21 16:25:46 2017 +0100 ARM64: dts: meson-gx: Add support for HDMI output Add HDMI output and connector nodes. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman .../arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 39 ++++++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 32 ++++++++++++++++++ .../boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 23 +++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 23 +++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 12 +++++++ .../dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts | 23 +++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 13 ++++++++ .../arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 23 +++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxm.dtsi | 3 ++ 9 files changed, 191 insertions(+) commit e9da72821f4d3bcb90dcda6aed5a1bf2ca39e753 Author: Neil Armstrong Date: Tue Mar 21 16:25:45 2017 +0100 ARM64: dts: meson-gx: Add shared CMA dma memory pool The HDMI modes needs more CMA memory to be reserved at boot-time. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 62158c6a9c5d2e5b62c6777b9fc1954fca1b7f59 Author: Heiner Kallweit Date: Tue Feb 14 22:18:44 2017 +0100 ARM64: dts: meson-gxbb-odroidc2: Enable SARADC node Now that 3adbf3427330 "iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs" has added support for the ADC, let's enable it on Odroid C2. Signed-off-by: Heiner Kallweit Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 92c2cc5d5566cb84e4f4a683e73c3516882c2ee8 Author: Neil Armstrong Date: Wed Mar 22 11:32:27 2017 +0100 dt-bindings: clock: gxbb-clkc: Add GXL compatible variant Acked-by: Rob Herring Signed-off-by: Neil Armstrong Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1490178747-14837-6-git-send-email-narmstrong@baylibre.com Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7d33d60b0c115b02b6fe2af374daf2401e4abe91 Author: Neil Armstrong Date: Wed Mar 22 11:32:26 2017 +0100 clk: meson-gxbb: Expose GP0 dt-bindings clock id This patch exposes the GP0 PLL clock id in the dt bindings. Signed-off-by: Neil Armstrong Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1490178747-14837-5-git-send-email-narmstrong@baylibre.com drivers/clk/meson/gxbb.h | 2 +- include/dt-bindings/clock/gxbb-clkc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 5c65eec3d943fc3f9f3631e0793d879c27cc0fee Author: Neil Armstrong Date: Wed Mar 22 11:18:53 2017 +0100 clk: meson-gxbb: Add MALI clock IDS Add missing MALI clock IDs and expose the muxes and gates in the dt-bindings. Signed-off-by: Neil Armstrong Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1490177935-9646-2-git-send-email-narmstrong@baylibre.com drivers/clk/meson/gxbb.h | 9 ++++++++- include/dt-bindings/clock/gxbb-clkc.h | 5 +++++ 2 files changed, 13 insertions(+), 1 deletion(-) commit 28f6c58367592afdea77a23d5c6a6f6603a632a5 Author: Jerome Brunet Date: Thu Mar 9 11:41:54 2017 +0100 dt-bindings: clk: gxbb: expose i2s output clock gates Signed-off-by: Jerome Brunet Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/20170309104154.28295-10-jbrunet@baylibre.com drivers/clk/meson/gxbb.h | 10 +++++----- include/dt-bindings/clock/gxbb-clkc.h | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) commit 99147e64428b9c3bfcd97e545ae478906c79e6a8 Author: Dan Carpenter Date: Mon Apr 3 21:42:42 2017 +0300 drm/amd/powerplay: fix a couple locking issues We should return unlock on the error path in pp_dpm_dispatch_tasks() and there is a double lock bug in pp_dpm_set_sclk_od(). Fixes: 2a5071056e6a ("drm/amd/powerplay: add global PowerPlay mutex.") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0f987cd0d78ead344a07c6fe215234f3be51d051 Author: Dan Carpenter Date: Mon Apr 3 21:41:47 2017 +0300 drm/amd/powerplay: fix pp_dpm_get_current_power_state() (v2) This switch statement is missing breaks. v2: agd: break in default case as well Fixes: 2a5071056e6a ("drm/amd/powerplay: add global PowerPlay mutex.") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 4 ++++ 1 file changed, 4 insertions(+) commit 502372878af1caa0b3050b0820ef112a5b8adf6b Author: Rex Zhu Date: Thu Mar 30 15:45:52 2017 +0800 drm/amdgpu: various cleanups for uvd/vce. Signed-off-by: Rex Zhu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 19 ++++--------------- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 18 +++--------------- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 17 +++-------------- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 17 +++-------------- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 18 +++--------------- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 18 +++--------------- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 18 +++--------------- 7 files changed, 22 insertions(+), 103 deletions(-) commit e6707218f77bc850f41720dc70d3d4a0dce9ef4a Author: Rex Zhu Date: Thu Mar 30 13:21:01 2017 +0800 drm/amdgpu: when resume failed, return error to avoid system hang. Continuing if the GPU fails to resume will end in pain. Signed-off-by: Rex Zhu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a9f87f6452543505108d7d9b36d948534ea28b0b Author: Christian König Date: Thu Mar 30 14:03:59 2017 +0200 drm/amdgpu: use a 64bit interval tree for VM management v2 This only makes a difference for 32-bit systems. The idea is to have a fixed virtual address space size with 4-level page tables and to minimize differences between 32 and 64-bit systems. v2: Update commit message. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 12 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 12 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 93 ++++++++++++++++--------------- 7 files changed, 71 insertions(+), 62 deletions(-) commit ca7f65c76714e170692b3aad8d734d2b41e16b7f Author: kbuild test robot Date: Fri Mar 31 18:15:10 2017 +0800 drm/amdgpu: fix semicolon.cocci warnings drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:133:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Acked-by: Huang Rui CC: Huang Rui Signed-off-by: Fengguang Wu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad4febd9b7a5b3e86090e5223a6ddf946a63998f Author: Alex Deucher Date: Fri Mar 31 10:51:29 2017 -0400 drm/amdgpu/powerplay: fix locking typo Fixes: 2a5071056e6a601e ("drm/amd/powerplay: add global PowerPlay mutex.") Reported-by: Julia Lawall Reviewed-by: Christian König Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f5e9f8d9858f2a7348a60f478cb4c694237049a Merge: f38b376 d77facb Author: David S. Miller Date: Tue Apr 4 10:28:38 2017 -0700 Merge tag 'wireless-drivers-for-davem-2017-04-03' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.11 iwlwifi * an RCU fix * a fix for a potential out-of-bounds access crash * a fix for IBSS which has been broken since DQA was enabled rtlwifi * fix scheduling while atomic regression brcmfmac * fix use-after-free bug found by KASAN ==================== Signed-off-by: David S. Miller commit 8cadb01d2c2f520a890d1bc78b45471f21b9b76d Author: Thierry Reding Date: Thu Mar 9 20:04:57 2017 +0100 gpu: host1x: Fix potential out-of-bounds access The check for valid syncpoint IDs is off by one. While at it, rewrite the check to make it more easily understandable. Signed-off-by: Thierry Reding drivers/gpu/host1x/syncpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05d2f3ea0dbf0785ab6875a1494cf2f886fa50cd Merge: 97da385 b4d8c7a Author: Thierry Reding Date: Tue Apr 4 19:18:07 2017 +0200 Merge branch 'core' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu into drm/tegra/for-next commit dffb0113d522a1410dbc136281caf7b6751ec6f4 Merge: 9349e81 4dc5292 Author: Catalin Marinas Date: Tue Apr 4 18:08:47 2017 +0100 Merge branch 'arm64/common-sysreg' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux into for-next/core * 'arm64/common-sysreg' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux: arm64: sysreg: add Set/Way sys encodings arm64: sysreg: add register encodings used by KVM arm64: sysreg: add physical timer registers arm64: sysreg: subsume GICv3 sysreg definitions arm64: sysreg: add performance monitor registers arm64: sysreg: add debug system registers arm64: sysreg: sort by encoding commit 931f3dc3f0d14cc7758aa2d48fc2d713f8c6ebff Author: Chris Brandt Date: Wed Mar 29 10:30:35 2017 -0700 ARM: dts: rskrza1: add rtc DT support Enable the realtime clock. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100-rskrza1.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 0b131b139467db844874f31b46bb638b541d9d3f Author: Brian Norris Date: Mon Mar 27 17:46:14 2017 -0700 PCI: Fix typo pci_cfg_access_lock() comment There is no pci_cfg_access_unlocked(). I think the author meant pci_cfg_access_unlock(). Signed-off-by: Brian Norris Signed-off-by: Bjorn Helgaas drivers/pci/access.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9349e81e3837c71b3c1c8a7ff088cea3f96b34fb Merge: cad27ef d4f54a1 Author: Catalin Marinas Date: Tue Apr 4 18:01:55 2017 +0100 Merge tag 'acpi-arm64-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux into for-next/core ACPI ARM64 specific changes for v4.12. Patches contain: - IORT kernel interface misc clean-ups - IORT id mapping interface refactoring in preparation for platform MSI (IORT named components -> GIC ITS mappings) devid mapping code - IORT id mapping implementation for named components nodes to ITS nodes, in order to provide the kernel with a firmware interface to map platform devices devids to GIC ITS components * tag 'acpi-arm64-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux: ACPI: platform: setup MSI domain for ACPI based platform device ACPI: platform-msi: retrieve devid from IORT ACPI/IORT: Introduce iort_node_map_platform_id() to retrieve dev id ACPI/IORT: Rename iort_node_map_rid() to make it generic ACPI/IORT: Rework iort_match_node_callback() return value handling ACPI/IORT: Add missing comment for iort_dev_find_its_id() ACPI/IORT: Fix the indentation in iort_scan_node() commit f90c36448aacde1fd41332659a12cbc9558b1137 Author: Chris Brandt Date: Wed Mar 29 10:30:34 2017 -0700 ARM: dts: rskrza1: set rtc_x1 clock value Enable the 32.768 kHz RTC_X1 clock by setting the frequency value to non-zero. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100-rskrza1.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 3b5e3f0455442f376f91c69147526535a0389ac3 Author: Chris Brandt Date: Wed Mar 29 10:30:33 2017 -0700 ARM: dts: r7s72100: add rtc to device tree Add the realtime clock device node. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit deddcb891d0d2b4f437dea9bdea4752982c4b133 Author: Chris Brandt Date: Wed Mar 29 10:30:32 2017 -0700 ARM: dts: r7s72100: add RTC_X clock inputs to device tree Add the RTC clocks to device tree. The frequencies must be fixed values according to the hardware manual. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 929ded3dd7ce91d9ef4143d673b4ace2eb9ab355 Author: Chris Brandt Date: Wed Mar 29 10:30:31 2017 -0700 ARM: dts: r7s72100: add rtc clock to device tree Add the realtime clock functional clock source. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100.dtsi | 9 +++++++++ include/dt-bindings/clock/r7s72100-clock.h | 3 +++ 2 files changed, 12 insertions(+) commit ebf06af55c7594ed1fc18469a5cddf911c40e687 Author: Geert Uytterhoeven Date: Mon Apr 3 11:55:19 2017 +0200 ARM: dts: koelsch: Correct clock frequency of X2 DU clock input The X2 crystal oscillator on the Koelsch development board provides a 74.25 MHz clock, not a 148.5 MHz clock. Fixes: cd21cb46e14aae3a ("ARM: shmobile: koelsch: Add DU external pixel clocks to DT") Signed-off-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Tested-by: Niklas Söderlund Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791-koelsch.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cad27ef27ef7d897893b921c86337a8cc9d0cd0e Author: Ard Biesheuvel Date: Thu Mar 23 19:00:51 2017 +0000 arm64: efi: split Image code and data into separate PE/COFF sections To prevent unintended modifications to the kernel text (malicious or otherwise) while running the EFI stub, describe the kernel image as two separate sections: a .text section with read-execute permissions, covering .text, .rodata and .init.text, and a .data section with read-write permissions, covering .init.data, .data and .bss. This relies on the firmware to actually take the section permission flags into account, but this is something that is currently being implemented in EDK2, which means we will likely start seeing it in the wild between one and two years from now. Acked-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/kernel/efi-header.S | 23 ++++++++++++++++++----- arch/arm64/kernel/vmlinux.lds.S | 2 ++ 2 files changed, 20 insertions(+), 5 deletions(-) commit f1eb542f39128bdf37f4556bc1d70991b89bb03d Author: Ard Biesheuvel Date: Thu Mar 23 19:00:50 2017 +0000 arm64: efi: replace open coded constants with symbolic ones Replace open coded constants with symbolic ones throughout the Image and the EFI headers. No binary level changes are intended. Acked-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/kernel/efi-header.S | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) commit effc7b027aac3243b59027591a1f0dbcd26f601c Author: Ard Biesheuvel Date: Thu Mar 23 19:00:49 2017 +0000 arm64: efi: remove pointless dummy .reloc section The kernel's EFI PE/COFF header contains a dummy .reloc section, and an explanatory comment that claims that this is required for the EFI application loader to accept the Image as a relocatable image (i.e., one that can be loaded at any offset and fixed up in place) This was inherited from the x86 implementation, which has elaborate host tooling to mangle the PE/COFF header post-link time, and which populates the .reloc section with a single dummy base relocation. On ARM, no such tooling exists, and the .reloc section remains empty, and is never even exposed via the BaseRelocationTable directory entry, which is where the PE/COFF loader looks for it. The PE/COFF spec is unclear about relocatable images that do not require any fixups, but the EDK2 implementation, which is the de facto reference for PE/COFF in the UEFI space, clearly does not care, and explicitly mentions (in a comment) that relocatable images with no base relocations are perfectly fine, as long as they don't have the RELOCS_STRIPPED attribute set (which is not the case for our PE/COFF image) So simply remove the .reloc section altogether. Acked-by: Mark Rutland Acked-by: Peter Jones Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/kernel/efi-header.S | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) commit f328ba470c9ec282d7bbcc151c8dd19fff7513c3 Author: Ard Biesheuvel Date: Thu Mar 23 19:00:48 2017 +0000 arm64: efi: remove forbidden values from the PE/COFF header Bring the PE/COFF header in line with the PE/COFF spec, by setting NumberOfSymbols to 0, and removing the section alignment flags. Acked-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/kernel/efi-header.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 99922257cf72a4e2999eebf87ee9b3868cbca61f Author: Ard Biesheuvel Date: Thu Mar 23 19:00:47 2017 +0000 arm64: efi: clean up Image header after PE header has been split off After having split off the PE header, clean up the bits that remain: use .long consistently, merge two adjacent #ifdef CONFIG_EFI blocks, fix the offset of the PE header pointer and remove the redundant .align that follows it. Also, since we will be eliminating all open coded constants from the EFI header in subsequent patches, let's replace the open coded "ARM\x64" magic number with its .ascii equivalent. No changes to the resulting binary image are intended. Acked-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/kernel/head.S | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit b5f4a214b802a722091de1d94735f130dab18d1b Author: Ard Biesheuvel Date: Thu Mar 23 19:00:46 2017 +0000 arm64: efi: move EFI header and related data to a separate .S file In preparation of yet another round of modifications to the PE/COFF header, macroize it and move the definition into a separate source file. Acked-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/kernel/efi-header.S | 158 +++++++++++++++++++++++++++++++++++++++++ arch/arm64/kernel/head.S | 150 +------------------------------------- 2 files changed, 161 insertions(+), 147 deletions(-) commit 6f5541ba0eed842445a99b411d0f34103bcbbea1 Author: Mark Rutland Date: Thu Mar 23 19:00:45 2017 +0000 include: pe.h: add some missing definitions Add the missing IMAGE_FILE_MACHINE_ARM64 and IMAGE_DEBUG_TYPE_CODEVIEW definitions. We'll need them for the arm64 EFI stub... Signed-off-by: Mark Rutland [ardb: add IMAGE_DEBUG_TYPE_CODEVIEW as well] Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas include/linux/pe.h | 3 +++ 1 file changed, 3 insertions(+) commit 65c2e69b3ccaa359032cfc35c4dbb8d235f63e5b Author: Mark Rutland Date: Thu Mar 23 19:00:44 2017 +0000 include: pe.h: allow for use in assembly Some of the definitions in include/linux/pe.h would be useful for the EFI stub headers, where values are currently open-coded. Unfortunately they cannot be used as some structures are also defined in pe.h without !__ASSEMBLY__ guards. This patch moves the structure definitions into an #ifdef __ASSEMBLY__ block, so that the common value definitions can be used from assembly. Signed-off-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas include/linux/pe.h | 174 +++++++++++++++++++++++++++-------------------------- 1 file changed, 89 insertions(+), 85 deletions(-) commit 22d653429e4c275be357eef5acbeb6572cf007db Author: Tony Lindgren Date: Tue Apr 4 09:22:30 2017 -0700 ARM: dts: omap4-droid4: Stop disabling SRAM and GPMC I disabled SRAM and GPMC originally when seeing errors with omap_barriers_init(). But that is no longer happening probably because the memory range is now properly configured to 1021 MB instead of 1024 MB. So let's enable SRAM and GPMC so we get omap_barriers_init() working and can idle the GPMC. Cc: Marcel Partap Cc: Michael Scott Cc: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 4fd14a49545159e281d7da4ef3727eaac9bc9710 Author: Tony Lindgren Date: Tue Apr 4 09:22:25 2017 -0700 ARM: dts: omap4-droid4: Fix interrupt triggering for cpcap The CPCAP PMIC interrupt is level high sensitive despite it being requested as edge high triggered in the Motorola Linux kernel. Note that also the related driver change is needed posted as "mfd: cpcap: Fix interrupt to use level interrupt". Fixes: 56e1d40d3bea ("mfd: cpcap: Add minimal support") Cc: Charles Keepax Cc: Marcel Partap Cc: Michael Scott Cc: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c1f8546753f1d44897ebfe49f7442001a466379 Author: Liang Chen Date: Mon Mar 27 17:40:49 2017 +0800 arm64: dts: rockchip: add RK3328 eavluation board devicetree This patch add rk3328-evb.dts for RK3328 evaluation board. Tested on RK3328 evb. Signed-off-by: Liang Chen Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/Makefile | 1 + arch/arm64/boot/dts/rockchip/rk3328-evb.dts | 57 +++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) commit 27a9fac7b33d7082f8ea9c233c7260978bcc6065 Author: Liang Chen Date: Mon Mar 27 17:46:23 2017 +0800 dt-bindings: document rockchip rk3328-evb board Use "rockchip,rk3328-evb" compatible string for Rockchip RK3328 evaluation board. Signed-off-by: Liang Chen Acked-by: Rob Herring Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 214fad550772929d97fb90a6a2637ebf5a796c11 Author: Ard Biesheuvel Date: Fri Mar 31 08:55:33 2017 +0100 arm64: relocation testing module This module tests the module loader's ELF relocation processing routines. When loaded, it logs output like below. Relocation test: ------------------------------------------------------- R_AARCH64_ABS64 0xffff880000cccccc pass R_AARCH64_ABS32 0x00000000f800cccc pass R_AARCH64_ABS16 0x000000000000f8cc pass R_AARCH64_MOVW_SABS_Gn 0xffff880000cccccc pass R_AARCH64_MOVW_UABS_Gn 0xffff880000cccccc pass R_AARCH64_ADR_PREL_LO21 0xffffff9cf4d1a400 pass R_AARCH64_PREL64 0xffffff9cf4d1a400 pass R_AARCH64_PREL32 0xffffff9cf4d1a400 pass R_AARCH64_PREL16 0xffffff9cf4d1a400 pass Acked-by: Will Deacon Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/Kconfig.debug | 4 ++ arch/arm64/kernel/Makefile | 2 + arch/arm64/kernel/reloc_test_core.c | 81 ++++++++++++++++++++++++++++++++++++ arch/arm64/kernel/reloc_test_syms.S | 83 +++++++++++++++++++++++++++++++++++++ 4 files changed, 170 insertions(+) commit 52e02d377a7282ae57052c222cdaacf45ddc4c5d Author: Liang Chen Date: Mon Mar 27 17:40:48 2017 +0800 arm64: dts: rockchip: add core dtsi file for RK3328 SoCs This patch adds core dtsi file for Rockchip RK3328 SoCs. Signed-off-by: Liang Chen Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3328.dtsi | 1264 ++++++++++++++++++++++++++++++ 1 file changed, 1264 insertions(+) commit ae3874cc931b760c08bd6617a45fec1ba97d87f8 Author: Dave Gerlach Date: Tue Apr 4 08:59:28 2017 -0700 ARM: keystone: Drop PM domain support for k2g K2G will use a different power domain driver than the rest of the keystone family in order to make use of the TI SCI protocol so prevent the standard keystone pm_domain code from registering itself in preparation for a new driver. Acked-by: Santosh Shilimkar Signed-off-by: Lokesh Vutla Signed-off-by: Dave Gerlach Signed-off-by: Santosh Shilimkar arch/arm/mach-keystone/pm_domain.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 52835d59fc6cc7f3c3cfdb4a194ddc9ebd6c0c31 Author: Dave Gerlach Date: Tue Apr 4 08:59:27 2017 -0700 soc: ti: Add ti_sci_pm_domains driver Introduce a ti_sci_pm_domains driver to act as a generic pm domain provider to allow each device to attach and associate it's ti-sci-id so that it can be controlled through the TI SCI protocol. This driver implements a simple genpd where each device node has a phandle to the power domain node and also must provide an index which represents the ID to be passed with TI SCI representing the device using a single phandle cell. The driver manually parses the phandle to get the cell value. Through this interface the genpd dev_ops start and stop hooks will use TI SCI to turn on and off each device as determined by pm_runtime usage. Reviewed-by: Kevin Hilman Acked-by: Santosh Shilimkar Reviewed-by: Ulf Hansson Signed-off-by: Keerthy Signed-off-by: Nishanth Menon Signed-off-by: Dave Gerlach Signed-off-by: Santosh Shilimkar MAINTAINERS | 1 + arch/arm/mach-keystone/Kconfig | 1 + drivers/soc/ti/Kconfig | 12 +++ drivers/soc/ti/Makefile | 1 + drivers/soc/ti/ti_sci_pm_domains.c | 202 +++++++++++++++++++++++++++++++++++++ 5 files changed, 217 insertions(+) commit 7cc119f29b197f967161ca94c9d5cb5073b4b52b Author: Dave Gerlach Date: Tue Apr 4 08:59:27 2017 -0700 dt-bindings: Add TI SCI PM Domains Add a generic power domain implementation, TI SCI PM Domains, that will hook into the genpd framework and allow the TI SCI protocol to control device power states. Also, provide macros representing each device index as understood by TI SCI to be used in the device node power-domain references. These are identifiers for the K2G devices managed by the PMMC. Acked-by: Santosh Shilimkar Reviewed-by: Ulf Hansson Acked-by: Rob Herring Signed-off-by: Nishanth Menon Signed-off-by: Dave Gerlach Signed-off-by: Santosh Shilimkar .../devicetree/bindings/soc/ti/sci-pm-domain.txt | 57 ++++++++++++++ MAINTAINERS | 2 + include/dt-bindings/genpd/k2g.h | 90 ++++++++++++++++++++++ 3 files changed, 149 insertions(+) commit 213ec7fed30277ac04bcd401efe827603ce9ac2e Author: Dave Gerlach Date: Tue Apr 4 08:59:27 2017 -0700 PM / Domains: Do not check if simple providers have phandle cells There is no reason that a platform genpd driver registered using of_genpd_add_provider_simple needs to be constrained to having no cells in the "power-domains" phandle. Currently the genpd framework will fail if any arguments are passed with for a simple provider but the framework does not actually care, so remove the check for phandle argument count. This will allow greater flexibility for genpd providers to use their own arguments that are passed in the phandle and interpret them however they see fit. Acked-by: Kevin Hilman Acked-by: Ulf Hansson Signed-off-by: Dave Gerlach Signed-off-by: Santosh Shilimkar drivers/base/power/domain.c | 2 -- 1 file changed, 2 deletions(-) commit 7faddeb460d40efd1818d71e69f38fad09a9688e Author: Roger Quadros Date: Tue Mar 14 14:51:19 2017 +0200 ARM: omap2plus_defconfig: Enable TI Ethernet PHY DP83848_PHY i.e. [TI TLK10X 10/100 Mbps PHY] is used on the am335x-icev2 board. Enable the PHY driver for it. Signed-off-by: Roger Quadros Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 1 + 1 file changed, 1 insertion(+) commit c0bde0bf2bfefe2bae04e09d3741f6f9899c7858 Author: Roger Quadros Date: Tue Mar 14 14:50:21 2017 +0200 ARM: dts: am335x-icev2: Add CPSW ethernet0 and ethernet1 Enable the 2 ethernet ports as CPSW ports in dual-mac mode Signed-off-by: Roger Quadros [nsekhar@ti.com: use AM33XX_IOPAD()] Signed-off-by: Sekhar Nori Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-icev2.dts | 121 +++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) commit 46823dd17c676d1e1830774e93be813dc3638d6c Author: Dave Martin Date: Thu Mar 23 15:14:39 2017 +0000 arm64: cpufeature: Make ID reg accessor naming less counterintuitive read_system_reg() can readily be confused with read_sysreg(), whereas these are really quite different in their meaning. This patches attempts to reduce the ambiguity be reserving "sysreg" for the actual system register accessors. read_system_reg() is instead renamed to read_sanitised_ftr_reg(), to make it more obvious that the Linux-defined sanitised feature register cache is being accessed here, not the underlying architectural system registers. cpufeature.c's internal __raw_read_system_reg() function is renamed in line with its actual purpose: a form of read_sysreg() that indexes on (non-compiletime-constant) encoding rather than symbolic register name. Acked-by: Mark Rutland Reviewed-by: Suzuki K Poulose Signed-off-by: Dave Martin Signed-off-by: Catalin Marinas arch/arm64/include/asm/cpufeature.h | 4 ++-- arch/arm64/include/asm/hw_breakpoint.h | 4 ++-- arch/arm64/include/asm/kvm_mmu.h | 2 +- arch/arm64/kernel/cpufeature.c | 14 +++++++------- arch/arm64/kernel/debug-monitors.c | 2 +- arch/arm64/kvm/reset.c | 2 +- arch/arm64/kvm/sys_regs.c | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) commit 3c2e2e6816930e25c755f2e4fc298a0d05d223cf Author: David Howells Date: Tue Apr 4 16:54:21 2017 +0100 Annotate hardware config module parameters in arch/x86/mm/ When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in arch/x86/mm/. [Note: With respect to testmmiotrace, an additional patch will be added separately that makes the module refuse to load if the kernel is locked down.] Suggested-by: Alan Cox Signed-off-by: David Howells Acked-by: Steven Rostedt cc: Ingo Molnar cc: Thomas Gleixner cc: "H. Peter Anvin" cc: x86@kernel.org cc: linux-kernel@vger.kernel.org cc: nouveau@lists.freedesktop.org arch/x86/mm/testmmiotrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf616d21f41174389c6d720ae21bf40f154474c8 Author: David Howells Date: Tue Apr 4 16:54:21 2017 +0100 Annotate module params that specify hardware parameters (eg. ioport) Provided an annotation for module parameters that specify hardware parameters (such as io ports, iomem addresses, irqs, dma channels, fixed dma buffers and other types). This will enable such parameters to be locked down in the core parameter parser for secure boot support. I've also included annotations as to what sort of hardware configuration each module is dealing with for future use. Some of these are straightforward (ioport, iomem, irq, dma), but there are also: (1) drivers that switch the semantics of a parameter between ioport and iomem depending on a second parameter, (2) drivers that appear to reserve a CPU memory buffer at a fixed address, (3) other parameters, such as bus types and irq selection bitmasks. For the moment, the hardware configuration type isn't actually stored, though its validity is checked. Signed-off-by: David Howells include/linux/moduleparam.h | 65 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) commit 0e1b21169392f1f666897af579966a8a75f36ba8 Author: Schuyler Patton Date: Tue Feb 21 15:30:03 2017 +0530 ARM: dts: am57xx-idk: Add DCAN support AM571x IDK and the AM572x IDK use CAN1 interface. This patch enables it for both boards. Tested on AM572x IDK using cansequence. Signed-off-by: Schuyler Patton Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Franklin S Cooper Jr [nsekhar@ti.com: move to use DRA7XX_CORE_IOPAD()) Signed-off-by: Sekhar Nori Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-idk-common.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit a5ea7a0fcbd7376b2c9fcb15fe59fec298c9ce9f Author: Dave Gerlach Date: Tue Apr 4 08:51:29 2017 -0700 PM / Domains: Add generic data pointer to genpd data struct Add a void *data pointer to struct generic_pm_domain_data. Because this exists for each device associated with a genpd it will allow us to assign per-device data if needed on a platform for control of that specific device. Acked-by: Ulf Hansson Acked-by: Kevin Hilman Signed-off-by: Dave Gerlach Signed-off-by: Santosh Shilimkar include/linux/pm_domain.h | 1 + 1 file changed, 1 insertion(+) commit 2da042ac05e91b78e4484b731e8eb335c90385d3 Author: Maxime Ripard Date: Fri Mar 31 09:40:52 2017 +0200 MAINTAINERS: Add sun4i-drm git repo Add the git tree where the sun4i-drm patches are hosted. Signed-off-by: Maxime Ripard MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 87c586a6a0e166e0403533c2f67a3ae74d26fc14 Author: Maxime Ripard Date: Fri Mar 31 09:40:51 2017 +0200 MAINTAINERS: Update the Allwinner sunXi entry Chen-Yu and I have a shared git tree to host the sunxi patches now, so let's document it. And while we're at it, enhance our regex and document a few directories that have been asked for in the past. Signed-off-by: Maxime Ripard MAINTAINERS | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit b40af4d5ba441c7ffb32d3447614b12659d381e5 Author: Neil Armstrong Date: Tue Apr 4 14:15:31 2017 +0200 MAINTAINERS: update files for Amlogic DRM Driver This patch adds the dw-hdmi bindings and RST kerneldoc to maintained files. Acked-by: Daniel Vetter Signed-off-by: Neil Armstrong Link: http://patchwork.freedesktop.org/patch/msgid/1491308131-22071-2-git-send-email-narmstrong@baylibre.com MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 3650c25ad0a7bb3d31d5ae0728c7a216cc4af488 Author: Neil Armstrong Date: Tue Apr 4 14:15:30 2017 +0200 drm/meson: Add RST to bring together kerneldoc Acked-by: Daniel Vetter Signed-off-by: Neil Armstrong Documentation/gpu/index.rst | 1 + Documentation/gpu/meson.rst | 61 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) commit 2021d5b7d9f404bcb91301ececdf09a68b856ad7 Author: Neil Armstrong Date: Tue Apr 4 14:15:29 2017 +0200 drm/meson: Convert existing documentation to actual kerneldoc Acked-by: Daniel Vetter Signed-off-by: Neil Armstrong drivers/gpu/drm/meson/meson_canvas.c | 4 +++- drivers/gpu/drm/meson/meson_drv.c | 5 +++-- drivers/gpu/drm/meson/meson_dw_hdmi.c | 25 +++++++++++++++++-------- drivers/gpu/drm/meson/meson_vclk.c | 22 +++++++++++++++------- drivers/gpu/drm/meson/meson_venc.c | 25 ++++++++++++++++--------- drivers/gpu/drm/meson/meson_viu.c | 6 +++++- drivers/gpu/drm/meson/meson_vpp.c | 8 ++++++-- 7 files changed, 65 insertions(+), 30 deletions(-) commit 8cceda5349377e30cee5550acd41fefdd79d4ac6 Author: Neil Armstrong Date: Tue Apr 4 14:15:28 2017 +0200 dt-bindings: Add bindings for the Amlogic Meson dw-hdmi extension This binding describes the Amlogic Meson specific extension to the Synopsys Designware HDMI Controller. Acked-by: Rob Herring Signed-off-by: Neil Armstrong .../bindings/display/amlogic,meson-dw-hdmi.txt | 111 +++++++++++++++++++++ 1 file changed, 111 insertions(+) commit 3f68be7d8e96253288d89d392078aa88e56e7ffa Author: Neil Armstrong Date: Tue Apr 4 14:15:27 2017 +0200 drm/meson: Add support for HDMI encoder and DW-HDMI bridge + PHY The Amlogic Meson GXBB/GXL/GXM SoCs embeds a Synopsys DesignWare HDMI TX Controller with a custom Bridge + PHY around the Controller. This driver makes uses of all the custom PHY plat data callbacks and enables the compatible HDMI modes to be configured as a drm_encoder instance. Acked-by: Daniel Vetter Signed-off-by: Neil Armstrong drivers/gpu/drm/meson/Kconfig | 6 + drivers/gpu/drm/meson/Makefile | 1 + drivers/gpu/drm/meson/meson_drv.h | 3 + drivers/gpu/drm/meson/meson_dw_hdmi.c | 910 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/meson/meson_dw_hdmi.h | 146 ++++++ 5 files changed, 1066 insertions(+) commit 335e3713afb87b72c3e4740e5775355648806b32 Author: Neil Armstrong Date: Tue Apr 4 14:15:26 2017 +0200 drm/meson: Add support for HDMI venc modes and settings This patch adds support for the supported HDMI Venc modes and add the VPP mux value to switch to ENCP encoder. Acked-by: Daniel Vetter Signed-off-by: Neil Armstrong drivers/gpu/drm/meson/meson_venc.c | 1245 +++++++++++++++++++++++++++++++++++- drivers/gpu/drm/meson/meson_venc.h | 7 + drivers/gpu/drm/meson/meson_vpp.h | 2 + 3 files changed, 1249 insertions(+), 5 deletions(-) commit 2f4c95dc3d1d1518cb6a5e280050c48a79d3ee08 Author: Neil Armstrong Date: Tue Apr 4 14:15:25 2017 +0200 drm/meson: add support for HDMI clock support This patchs adds support for the supported HDMI modes clocks frequencies. Acked-by: Daniel Vetter Signed-off-by: Neil Armstrong drivers/gpu/drm/meson/meson_vclk.c | 624 +++++++++++++++++++++++++++++++- drivers/gpu/drm/meson/meson_vclk.h | 6 +- drivers/gpu/drm/meson/meson_venc_cvbs.c | 9 +- 3 files changed, 623 insertions(+), 16 deletions(-) commit cb110b665e77ebf99f8235f257b88eea007186d3 Author: Neil Armstrong Date: Tue Apr 4 14:15:24 2017 +0200 drm/meson: venc_cvbs: no more return -ENODEV if CVBS is not available Since this is managed now by the components code, if CVBS is not available and HDMI neither, the drm driver won't bind anyway. Acked-by: Daniel Vetter Signed-off-by: Neil Armstrong drivers/gpu/drm/meson/meson_venc_cvbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a41e82e6c4575b6c0a48bcc25a3feae4b2910934 Author: Neil Armstrong Date: Tue Apr 4 14:15:23 2017 +0200 drm/meson: Add support for components This patch adds support for optional components connected through the Device Tree endpoints scheme. Acked-by: Daniel Vetter Signed-off-by: Neil Armstrong drivers/gpu/drm/meson/meson_drv.c | 113 +++++++++++++++++++++++++++++++++----- 1 file changed, 99 insertions(+), 14 deletions(-) commit 8437d59ab312f0d71e7e328d700260d2fbd55c1c Author: Neil Armstrong Date: Tue Apr 4 14:15:22 2017 +0200 drm/meson: Add missing HDMI register Add missing VPU HDMI register. Acked-by: Daniel Vetter Signed-off-by: Neil Armstrong drivers/gpu/drm/meson/meson_registers.h | 1 + 1 file changed, 1 insertion(+) commit cc0c43a0450ce46fcd8f2aa793703d36d9af761e Author: Neil Armstrong Date: Tue Apr 4 14:15:21 2017 +0200 drm/meson: Use crtc_state for hdisplay and fix atomic flush/enable sync for vsync commit Clean the crtc_enable by using the proper crtc_state instead of the state of the primary plane state data. Also fix the dependency to commit the plane changes even if enable is called after the flush. Acked-by: Daniel Vetter Signed-off-by: Neil Armstrong drivers/gpu/drm/meson/meson_crtc.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 77f02a7acd7654cd5944f2120831d1eace94b343 Author: Christoph Hellwig Date: Thu Mar 30 13:41:32 2017 +0200 nvme: factor request completion code into a common helper This avoids duplicating the logic four times, and it also allows to keep some helpers static in core.c or just opencode them. Note that this loses printing the aborted status on completions in the PCI driver as that uses a data structure not available any more. Signed-off-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 35 +++++++++++++++++++++++++++++------ drivers/nvme/host/fc.c | 20 ++------------------ drivers/nvme/host/nvme.h | 9 +-------- drivers/nvme/host/pci.c | 32 +++++--------------------------- drivers/nvme/host/rdma.c | 20 ++------------------ drivers/nvme/target/loop.c | 17 +---------------- 6 files changed, 40 insertions(+), 93 deletions(-) commit 4bca70d0673927a8bef4b1de5fd8ddc735698a6b Author: Christoph Hellwig Date: Thu Mar 30 13:41:31 2017 +0200 nvme-fc: drop ctrl for all command completions A requeue means we go through nvme_fc_start_fcp_op again and get another controller reference. To make sure the refcount doesn't leak we also need to drop it for every completion that came from the LLDD. Signed-off-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f2cd54d3eba3a2048edcb91f145336180c55aee5 Author: Sagi Grimberg Date: Wed Mar 29 20:54:46 2017 +0300 nvme-fc: increment request retries counter before requeuing This way our max retry limit holds as well. Signed-off-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 1 + 1 file changed, 1 insertion(+) commit 7d9a5e7176c60673b283bdb0e507d288b48d9528 Author: Sagi Grimberg Date: Wed Mar 29 20:54:15 2017 +0300 nvme-loop: increment request retries counter before requeuing This way our max retry limit holds as well. Signed-off-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/loop.c | 1 + 1 file changed, 1 insertion(+) commit e806666e25dc29f81b659e12386f6168488fa9a6 Author: Sagi Grimberg Date: Wed Mar 29 20:51:10 2017 +0300 nvme-rdma: increment request retries counter before requeuing This way our max retry limit holds as well. Signed-off-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 1 + 1 file changed, 1 insertion(+) commit 62eeacb0e04f2aff7099a7765f386bb7ba53d5e2 Author: James Smart Date: Thu Mar 23 20:41:27 2017 -0700 nvme_fc: Clean up host fcpio done status handling As Dan Carpenter pointed out: mixing 16-bit nvme status with 32-bit error status from driver. Corrected comment on fcp request struct status field, and converted done routine to explicitly set nvme status codes for nvme status. Signed-off-by: James Smart Reported-by: Dan Carpenter Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 14 +++++++------- include/linux/nvme-fc-driver.h | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) commit c820ad4cdacbb272ec993738d1c7eb96f09ddcd5 Author: James Smart Date: Thu Mar 23 20:41:26 2017 -0700 nvmet_fc: Clear SG list to avoid double frees Clear SG list to avoid double frees of payload page list Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/fc.c | 2 ++ 1 file changed, 2 insertions(+) commit f77fc87c3716f59be0248bf430fbf9d7888902b1 Author: James Smart Date: Thu Mar 23 20:41:25 2017 -0700 nvme_fc: correct LS validation LS validations shouldn't have been independent checks. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 4083aa986f0447d562c494e75d525c1b1df71a2a Author: James Smart Date: Thu Mar 23 20:41:24 2017 -0700 nvmet_fc: Sync NVME LS reject reasons with spec nvmet_fc: Sync NVME LS reject reasons with spec Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/fc.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 726a1080e537f7c0b4435ef29e17b056e09fc4f4 Author: James Smart Date: Thu Mar 23 20:41:23 2017 -0700 nvme_fc: Add check of status_code in ERSP_IU Add check of status_code in ERSP_IU Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 1 + 1 file changed, 1 insertion(+) commit 0f222ccce359d21f927d07df2069e7029497b790 Author: James Smart Date: Thu Mar 23 20:41:22 2017 -0700 nvme_fc: Sync FC-NVME header with standard Update FC-NVME definitions to match FC-NVME r1.14 (16-020vB) plus change voted in by 2/22 FC-NVME Adhoc (see HOSTID below). Includes the following: - Addition of "status_code" field to ERSP IU - Addition of FC-NVME LS RJT reason_codes and reason_explanations - CreateAssociation payload, HostID field shortened to 16 bytes Signed-off-by: James Smart Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe include/linux/nvme-fc.h | 68 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 59 insertions(+), 9 deletions(-) commit fd8563ced8f50c5029fdf8e57735138e2e630423 Author: Sagi Grimberg Date: Sat Mar 18 20:58:29 2017 +0200 nvme-rdma: Support ctrl_loss_tmo Before scheduling a reconnect attempt, check nr_reconnects against max_reconnects, if not exhausted (or max_reconnects is not -1), schedule a reconnect attempts, otherwise schedule ctrl removal. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) commit 42a45274c225829637b585e1c994a68f59507108 Author: Sagi Grimberg Date: Sat Mar 18 20:52:36 2017 +0200 nvme-fabrics: Allow ctrl loss timeout configuration When a host sense that its controller session is damaged, it tries to re-establish it periodically (reconnect every reconnect_delay). It may very well be that the controller is gone and never coming back, in this case the host will try to reconnect forever. Add a ctrl_loss_tmo to bound the number of reconnect attempts to a specific controller (default to a reasonable 10 minutes). The timeout configuration is actually translated into number of reconnect attempts and not a schedule on its own but rather divided with reconnect_delay. This is useful to prevent racing flows of remove and reconnect, and it doesn't really matter if we remove slightly sooner than what the user requested. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/fabrics.c | 28 ++++++++++++++++++++++++++++ drivers/nvme/host/fabrics.h | 10 ++++++++++ 2 files changed, 38 insertions(+) commit 7777bdedf31d674c4fd5ebbfbd27a6a6ae0a17e0 Author: Sagi Grimberg Date: Sat Mar 18 23:47:22 2017 +0200 nvme-rdma: get rid of local reconnect_delay we already have it in opts. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 3b068376306bf44de6fdc0f3bff6072d8cdc8481 Author: Sagi Grimberg Date: Mon Feb 27 18:28:25 2017 +0200 nvme-loop: retrieve iod from the cqe command_id useful to validate that the we didn't mess up the command_id. Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/loop.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) commit d89a39be5fbf8d5bc441a8442df228fb050ad1c2 Author: Sagi Grimberg Date: Sun Mar 19 06:32:09 2017 +0200 nvme-loop: remove unneeded includes Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/loop.c | 2 -- 1 file changed, 2 deletions(-) commit c0e4a6f5941ec3759fd5c7e58fc5e8b135cfee72 Author: Sagi Grimberg Date: Sun Mar 19 14:16:05 2017 +0200 nvme-fc: fix module_init (theoretical) error path If nvmf_register_transport happened to fail (it can't, but theoretically) we leak memory. Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit d19eef029dad7600b69968036e877cdcf51e860d Author: Sagi Grimberg Date: Sun Mar 19 06:26:28 2017 +0200 nvme-loop: fix module_init (theoretical) error path if nvmf_register_transport happend to fail, we need to nvmet_unregister_transport as well. Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/loop.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a56c79cfd3e97706ad5615831c3bab01fb4047c4 Author: Sagi Grimberg Date: Sun Mar 19 06:21:42 2017 +0200 nvme-rdma: fix module_init (theoretical) error path If nvmf_register_transport happened to fail (it can't, but theoretically) we leak memory. Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 2ca0786d5a66b919acac865b11b51df43f9457a2 Author: Max Gurtovoy Date: Mon Mar 6 00:30:38 2017 +0200 nvmet: use symbolic constants for log identifiers Signed-off-by: Max Gurtovoy Reviewed-by: Parav Pandit Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/admin-cmd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 64a0ca88eaa66e3d219296b17aa08b78894e42c8 Author: Parav Pandit Date: Mon Feb 27 23:21:33 2017 -0600 nvmet: Introduced helper routine for controller status check. This patch introduces helper function for checking controller status during admin and io command processing which returns u16 status. As to bring consistency on returning status, other friend functions also now return u16 status instead of int to match the spec. As part of the theseerror log prints in also prints qid on which command error occured. Signed-off-by: Parav Pandit Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/admin-cmd.c | 19 +++++++------------ drivers/nvme/target/core.c | 17 +++++++++++++++++ drivers/nvme/target/discovery.c | 2 +- drivers/nvme/target/fabrics-cmd.c | 4 ++-- drivers/nvme/target/io-cmd.c | 22 ++++++++-------------- drivers/nvme/target/nvmet.h | 11 ++++++----- 6 files changed, 41 insertions(+), 34 deletions(-) commit 4151dd9a58c6b2758514fc88a1a3b02f9ab8b076 Author: Parav Pandit Date: Mon Feb 27 23:21:02 2017 -0600 nvmet: Fixed avoided printing nvmet: twice in error logs. This patch avoids printing "nvmet:" twice in error logs as its already coming through pr_fmt macro. Reviewed-by: Max Gurtovoy Signed-off-by: Parav Pandit Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/admin-cmd.c | 10 +++++----- drivers/nvme/target/core.c | 4 ++-- drivers/nvme/target/discovery.c | 17 ++++++++--------- drivers/nvme/target/io-cmd.c | 10 +++++----- 4 files changed, 20 insertions(+), 21 deletions(-) commit 4459e042970b33b94ef0e2426ee22edf233da2f5 Author: Sagi Grimberg Date: Mon Feb 6 12:51:03 2017 +0200 iscsi-target: use generic inet_pton_with_scope Instead of parsing address strings, use a generic helper. Acked-by: Nicholas Bellinger Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/target/iscsi/iscsi_target_configfs.c | 46 ++++++++-------------------- 1 file changed, 12 insertions(+), 34 deletions(-) commit 0928f9b4f194842d2f932d6be5c38768dfada104 Author: Sagi Grimberg Date: Sun Feb 5 21:49:32 2017 +0200 nvme-rdma: use inet_pton_with_scope helper Both the destination and the host addresses are now parsed using inet_pton_with_scope helper. We also get ipv6 (with address scopes support). Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 63 +++++++++++++++--------------------------------- 1 file changed, 19 insertions(+), 44 deletions(-) commit 670c2a3ad51de40bad74aef481e1f68347da22d3 Author: Sagi Grimberg Date: Sun Feb 5 21:49:04 2017 +0200 nvmet-rdma: use generic inet_pton_with_scope Instead of parsing address strings, use a generic helper. This also adds ipv6 (with address scopes) support. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/rdma.c | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) commit b1a951fe469eb51646bf2e6d2c5f4a19fe1d4627 Author: Sagi Grimberg Date: Sun Feb 5 21:47:22 2017 +0200 net/utils: generic inet_pton_with_scope helper Several locations in the stack need to handle ipv4/ipv6 (with scope) and port strings conversion to sockaddr. Add a helper that takes either AF_INET, AF_INET6 or AF_UNSPEC (for wildcard) to centralize this handling. Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Acked-by: David S. Miller Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe include/linux/inet.h | 6 +++ net/core/utils.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) commit 297186d640182eff442c3f473cd053c613f3b558 Author: Sagi Grimberg Date: Mon Mar 13 15:43:44 2017 +0200 nvme-loop: remove some code duplication Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/loop.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) commit 782d820ca47fa9335cbf14ef058060625fc33a00 Author: Sagi Grimberg Date: Tue Mar 21 16:32:38 2017 +0200 nvme-rdma: Give some more grace for rdma connection establishment The target might be occupied with multiple hosts so lets give it some more grace before failing the connection establishment. Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 777dc82395de6e04b3a5fedcf153eb99bf5f1241 Author: Sagi Grimberg Date: Tue Mar 21 16:29:49 2017 +0200 nvmet-rdma: occasionally flush ongoing controller teardown If we are attacked with establishments/teradowns we need to make sure we do not consume too much system memory. Thus let ongoing controller teardowns complete before accepting new controller establishments. Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/rdma.c | 5 +++++ 1 file changed, 5 insertions(+) commit dc2ad16ab2c1351832b862f938e6e12a517e3c12 Author: Sagi Grimberg Date: Thu Mar 9 13:26:07 2017 +0200 nvme-rdma: handle cpu unplug when re-establishing the controller If a cpu unplug event has occured, we need to take the minimum of the provided nr_io_queues and the number of online cpus, otherwise we won't be able to connect them as blk-mq mapping won't dispatch to those queues. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 8d61413db604e456a3f67765752b12af3307cd9b Author: Sagi Grimberg Date: Thu Mar 9 13:45:52 2017 +0200 nvmet-rdma: Fix a possible uninitialized variable dereference When handling a new recv command, we grab a new rsp resource and check for the queue state being live. In case the queue is not in live state, we simply restore the rsp back to the free list. However in this flow we didn't set rsp->queue yet, so we cannot dereference it. Instead, make sure to initialize rsp->queue (and other rsp members) as soon as possible so we won't reference uninitialized variables. Reported-by: Yi Zhang Reported-by: Raju Rangoju Reviewed-by: Christoph Hellwig Tested-by: Raju Rangoju Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/rdma.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 427242ce99e43208188f843eed2739d8a99cc967 Author: Sagi Grimberg Date: Mon Mar 6 18:46:20 2017 +0200 nvmet: confirm sq percpu has scheduled and switched to atomic percpu_ref_kill is not enough to prevent subsequent percpu_ref_tryget_live from failing. Hence call perfcpu_ref_kill_confirm to make it safe. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/target/core.c | 11 ++++++++++- drivers/nvme/target/nvmet.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) commit 386d3299ef7298a3bc57e2ff3498ce41ac7f6184 Author: Neil Armstrong Date: Tue Apr 4 14:31:59 2017 +0200 drm: bridge: dw-hdmi: Move HPD handling to PHY operations The HDMI TX controller support HPD and RXSENSE signaling from the PHY via it's STAT0 PHY interface, but some vendor PHYs can manage these signals independently from the controller, thus these STAT0 handling should be moved to PHY specific operations and become optional. The existing STAT0 HPD and RXSENSE handling code is refactored into a supplementaty set of default PHY operations that are used automatically when the platform glue doesn't provide its own operations. Reviewed-by: Jose Abreu Reviewed-by: Archit Taneja Reviewed-by: Laurent Pinchart Signed-off-by: Neil Armstrong Link: http://patchwork.freedesktop.org/patch/msgid/1491309119-24220-2-git-send-email-narmstrong@baylibre.com drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 135 ++++++++++++++++++------------ include/drm/bridge/dw_hdmi.h | 5 ++ 2 files changed, 86 insertions(+), 54 deletions(-) commit e624f516d99986faf678c22ed492797416c80215 Author: Neil Armstrong Date: Tue Apr 4 14:31:58 2017 +0200 drm: bridge: dw-hdmi: Add Documentation on supported input formats This patch adds a new DRM documentation entry and links to the input format table added in the dw_hdmi header. Reviewed-by: Archit Taneja Acked-by: Laurent Pinchart Signed-off-by: Neil Armstrong Documentation/gpu/bridge/dw-hdmi.rst | 15 +++++++++++++++ Documentation/gpu/index.rst | 1 + 2 files changed, 16 insertions(+) commit def23aa7e9821a3dfe3fb7b139dd0229a89fdeb0 Author: Neil Armstrong Date: Tue Apr 4 14:31:57 2017 +0200 drm: bridge: dw-hdmi: Switch to V4L bus format and encodings Switch code to use the newly introduced V4L bus formats IDs instead of custom defines. Also use the V4L encoding defines. Some display pipelines can only provide non-RBG input pixels to the HDMI TX Controller, this patch takes the pixel format from the plat_data if provided. Reviewed-by: Jose Abreu Reviewed-by: Archit Taneja Reviewed-by: Laurent Pinchart Signed-off-by: Neil Armstrong drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 326 +++++++++++++++++++++--------- include/drm/bridge/dw_hdmi.h | 63 ++++++ 2 files changed, 294 insertions(+), 95 deletions(-) commit a23d6265f033501529932db2d6b3f4bc138552ab Author: Laurent Pinchart Date: Tue Apr 4 14:31:56 2017 +0200 drm: bridge: dw-hdmi: Extract PHY interrupt setup to a function In preparation for adding PHY operations to handle RX SENSE and HPD, group all the PHY interrupt setup code in a single location and extract it to a separate function. Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu [narmstrong: renamed dw_hdmi_fb_registered to dw_hdmi_setup_i2c] Reviewed-by: Archit Taneja Signed-off-by: Neil Armstrong drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 51 ++++++++++++++----------------- 1 file changed, 23 insertions(+), 28 deletions(-) commit d7bb5b966174fee6e4b0085124b75787a5d81b8a Author: Icenowy Zheng Date: Tue Apr 4 17:50:59 2017 +0800 ARM: sunxi: h3/h5: switch apb0-related clocks to r_ccu Now we have driver for the PRCM CCU, switch to use it instead of old-style clock nodes for apb0-related clocks in sunxi-h3-h5.dtsi . The mux 3 of R_CCU is still the internal oscillator, which is said to be 16MHz plus minus 30%, and get a measured value of 15MHz~16MHz on my two H3 boards and one H5 board. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sunxi-h3-h5.dtsi | 45 ++++++++++++-------------------------- 1 file changed, 14 insertions(+), 31 deletions(-) commit ec4279053a6434f685246e022be95d2a62f8c608 Author: Icenowy Zheng Date: Tue Apr 4 17:51:00 2017 +0800 arm64: allwinner: a64: add R_PIO pinctrl node Allwinner A64 have a dedicated pin controller to manage the PL pin bank. As the driver and the required clock support are added, add the device node for it. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 791a9e001d3ba3b552888b0bf3c592a50b71f57e Author: Icenowy Zheng Date: Tue Apr 4 17:50:58 2017 +0800 arm64: allwinner: a64: add r_ccu node A64 SoC have a CCU (r_ccu) in PRCM block. Add the device node for it. The mux 3 of R_CCU is an internal oscillator, which is 16MHz according to the user manual, and has only 30% accuracy based on our experience on older SoCs. The real mesaured value of it on two Pine64 boards is around 11MHz, which is around 70% of 16MHz. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 6ecda70ea9c1bf37d2abdcf52dfe06d023276173 Author: Sagi Grimberg Date: Mon Mar 13 13:27:51 2017 +0200 nvme-loop: handle cpu unplug when re-establishing the controller If a cpu unplug event has occured, we need to take the minimum of the provided nr_io_queues and the number of online cpus, otherwise we won't be able to connect them as blk-mq mapping won't dispatch to those queues. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/target/loop.c | 88 ++++++++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 38 deletions(-) commit d476983ea078b7a101481967a3bb5ab6760cf759 Author: Sagi Grimberg Date: Mon Feb 27 18:44:45 2017 +0200 nvme-loop: fix a possible use-after-free when destroying the admin queue we need to destroy the nvmet sq and let it finish gracefully before continue to cleanup the queue. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg drivers/nvme/target/loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdb8b80b60935515b86cfe534f69934b13937052 Author: Icenowy Zheng Date: Tue Apr 4 17:50:57 2017 +0800 clk: sunxi-ng: add support for PRCM CCUs SoCs after A31 has a clock controller module in the PRCM part. Support the clock controller module on H3/5 and A64 now. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/Kconfig | 6 + drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu-sun8i-r.c | 213 ++++++++++++++++++++++++++++++++ drivers/clk/sunxi-ng/ccu-sun8i-r.h | 27 ++++ include/dt-bindings/clock/sun8i-r-ccu.h | 59 +++++++++ include/dt-bindings/reset/sun8i-r-ccu.h | 53 ++++++++ 6 files changed, 359 insertions(+) commit d4879bda912107b137e743b67cf063814191cca7 Author: Icenowy Zheng Date: Tue Apr 4 17:50:56 2017 +0800 dt-bindings: update device tree binding for Allwinner PRCM CCUs Many Allwinner SoCs after A31 have a CCU in PRCM block. Give the ones on H3 and A64 compatible strings. Signed-off-by: Icenowy Zheng Acked-by: Rob Herring Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/clock/sunxi-ccu.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 86daa3d30b3e90a172f241d5253b5296b98b17b9 Author: Patrick Menschel Date: Mon Apr 3 19:00:14 2017 +0200 ARM: dts: sun7i: Add can0_pins_a pinctrl settings The A20 SoC has an on-board CAN controller. This patch adds the pinctrl settings for pins PH20 and PH21. This patch is adapted from the description in Documentation/devicetree/bindings/net/can/sun4i_can.txt Signed-off-by: Patrick Menschel Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit d2a20efbb11ba97fbca05d7ec7ffcec3493f6ded Author: Patrick Menschel Date: Mon Apr 3 19:00:13 2017 +0200 ARM: dts: sun7i: Add CAN node The A20 SoC has an on-board CAN controller. This patch adds the device node. The CAN controller is inherited from the A10 SoC and uses the same driver. This patch is adapted from the description in Documentation/devicetree/bindings/net/can/sun4i_can.txt Signed-off-by: Patrick Menschel Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 908370f6cd9c4b0346691dac3a01b01e96e6a6cb Author: Patrick Menschel Date: Mon Apr 3 19:00:12 2017 +0200 ARM: dts: sun4i: Add can0_pins_a pinctrl settings The A10 SoC has an on-board CAN controller. This patch adds the pinctrl settings for pins PH20 and PH21. This patch is adapted from the description in Documentation/devicetree/bindings/net/can/sun4i_can.txt Signed-off-by: Patrick Menschel Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit adb83474c137b7ea35319e84650188a491ad8ba0 Author: Patrick Menschel Date: Mon Apr 3 19:00:11 2017 +0200 ARM: dts: sun4i: Add CAN node The A10 SoC has an on-board CAN controller. This patch adds the device node. This patch is adapted from the description in Documentation/devicetree/bindings/net/can/sun4i_can.txt Signed-off-by: Patrick Menschel Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 57e83fb9b7468c75cb65cde1d23043553c346c6d Author: Akshay Bhat Date: Fri Mar 17 17:10:40 2017 -0400 can: hi311x: Add Holt HI-311x CAN driver This patch adds support for the Holt HI-311x CAN controller. The HI311x CAN controller is capable of transmitting and receiving standard data frames, extended data frames and remote frames. The HI311x interfaces with the host over SPI. Datasheet: www.holtic.com/documents/371-hi-3110_v-rev-jpdf.do Signed-off-by: Akshay Bhat Acked-by: Wolfgang Grandegger Signed-off-by: Marc Kleine-Budde drivers/net/can/spi/Kconfig | 6 + drivers/net/can/spi/Makefile | 1 + drivers/net/can/spi/hi311x.c | 1076 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1083 insertions(+) commit 20a1e355116a8579bdf20839b3c07b51ad466e88 Author: Akshay Bhat Date: Fri Mar 17 17:10:39 2017 -0400 can: holt_hi311x: document device tree bindings Document the HOLT HI-311x CAN device tree bindings. Signed-off-by: Akshay Bhat Acked-by: Rob Herring Signed-off-by: Marc Kleine-Budde .../devicetree/bindings/net/can/holt_hi311x.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 8e8cda6d737d356054c9eeef642aec0e8ae7e6bc Author: Mario Kicherer Date: Tue Feb 21 12:19:47 2017 +0100 can: initial support for network namespaces This patch adds initial support for network namespaces. The changes only enable support in the CAN raw, proc and af_can code. GW and BCM still have their checks that ensure that they are used only from the main namespace. The patch boils down to moving the global structures, i.e. the global filter list and their /proc stats, into a per-namespace structure and passing around the corresponding "struct net" in a lot of different places. Changes since v1: - rebased on current HEAD (2bfe01e) - fixed overlong line Signed-off-by: Mario Kicherer Signed-off-by: Marc Kleine-Budde include/linux/can/core.h | 7 ++- include/net/net_namespace.h | 4 ++ include/net/netns/can.h | 31 ++++++++++ net/can/af_can.c | 122 +++++++++++++++++++++---------------- net/can/af_can.h | 4 +- net/can/bcm.c | 13 ++-- net/can/gw.c | 4 +- net/can/proc.c | 144 +++++++++++++++++++++----------------------- net/can/raw.c | 92 ++++++++++++++++------------ 9 files changed, 242 insertions(+), 179 deletions(-) commit 9eb8902e278f3314e1e9429c5f13db9e7a7a0cff Merge: c829a33 3c2507d Author: Sean Paul Date: Tue Apr 4 11:34:30 2017 -0400 Merge tag 'topic/synopsys-media-formats-2017-04-03' of git://anongit.freedesktop.org/git/drm-misc into drm-misc-next Media formats for synopsys HDMI TX Controller Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170403163544.kcw5kk52tgku5xua@art_vandelay commit c829a33253e018472335b02e6d8bb1bb4213a142 Merge: 9c4ad46 e1b489d Author: Sean Paul Date: Tue Apr 4 11:26:14 2017 -0400 Merge airlied/drm-next into drm-misc-next Backmerging in order to pull vmwgfx [1] and the new synopsys media format [2] reqs. [1]- http://patchwork.freedesktop.org/patch/msgid/20170331233255.GA38850@syeh-m02 [2]- http://patchwork.freedesktop.org/patch/msgid/20170403163544.kcw5kk52tgku5xua@art_vandelay Signed-off-by: Sean Paul commit 09047cf4bc123f9b85e7019ae6f275f9de220ee5 Author: Liang Chen Date: Mon Mar 27 17:40:47 2017 +0800 dt-bindings: add binding for rk3328-grf This adds the compatible for the General Register Files on the new rk3328. Signed-off-by: Liang Chen Acked-by: Rob Herring Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/soc/rockchip/grf.txt | 1 + 1 file changed, 1 insertion(+) commit 18236a14883b718ce973e4c090db6ecb49b38287 Author: Jon Hunter Date: Tue Mar 28 13:42:57 2017 +0100 arm64: tegra: Update the Tegra132 flowctrl compatible string Update the Tegra132 flowctrl compatible string to include "nvidia,tegra132-flowctrl" so it is aligned with the flowctrl binding documentation. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra132.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfd7a3845a577e2350305609838bf31c08e4dec1 Author: Alexandre Courbot Date: Thu Mar 30 18:28:28 2017 +0900 arm64: tegra: Add GPU node for Tegra186 Add the DT node for the GP10B GPU on Tegra186. Signed-off-by: Alexandre Courbot Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 9c0899f15766158df8b3bd152f5da0b6c1bd2806 Author: Arnaldo Carvalho de Melo Date: Tue Apr 4 12:11:07 2017 -0300 perf tools: Don't die on a print function Trying to remove die() calls from library functions, postponing exiting to the tool main code. Link: http://lkml.kernel.org/n/tip-ackxq5nqe39gunln3tkczs42@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/values.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit f05082b5479d91ee5c04f311acaa394ce0c5e6d2 Author: Arnaldo Carvalho de Melo Date: Tue Apr 4 12:05:37 2017 -0300 perf tools: Handle allocation failures gracefully The callers of perf_read_values__enlarge_counters() already propagate errors, so just print some debug diagnostics and handle allocation failures gracefully, not trying to do silly things like 'a = realloc(a)'. Link: http://lkml.kernel.org/n/tip-nsmmh7uzpg35rzcl9nq7yztp@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/values.c | 54 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 15 deletions(-) commit dabf54dd1c6369160f8d4c793a8613dfb4e7848a Author: Yegor Yefremov Date: Fri Feb 17 16:52:33 2017 +0100 can: ti_hecc: Convert TI HECC driver to DT only driver This patch converts TI HECC driver to DT only driver. This results in removing ti_hecc.h containing now obsolete platform data. Former transceiver_switch callback function will be now modelled via regulator API. Signed-off-by: Anton Glukhov Signed-off-by: Yegor Yefremov Signed-off-by: Marc Kleine-Budde drivers/net/can/ti_hecc.c | 170 ++++++++++++++++++----------------- include/linux/can/platform/ti_hecc.h | 44 --------- 2 files changed, 88 insertions(+), 126 deletions(-) commit 869a78a2be13055173dc1fbe87f49e338e59f7ef Author: Yegor Yefremov Date: Fri Feb 17 16:52:32 2017 +0100 can: ti_hecc: Add TI HECC DT binding documentation DT binding documentation for TI High End CAN Controller Signed-off-by: Anton Glukhov Signed-off-by: Yegor Yefremov Acked-by: Rob Herring Signed-off-by: Marc Kleine-Budde .../devicetree/bindings/net/can/ti_hecc.txt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 427748068a973627b406bf7312342b6fe4742d07 Author: Arnaldo Carvalho de Melo Date: Tue Apr 4 11:36:22 2017 -0300 perf tools: Remove die() call We can just use the exit() right after the branch calling die(). Link: http://lkml.kernel.org/n/tip-90athn06d7atf2jkpfvq1iic@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/perf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 696ced4fb1d76802f864d8848aa4716633f83c17 Author: Alban Crequy Date: Mon Apr 3 12:36:22 2017 +0200 tracing/kprobes: expose maxactive for kretprobe in kprobe_events When a kretprobe is installed on a kernel function, there is a maximum limit of how many calls in parallel it can catch (aka "maxactive"). A kernel module could call register_kretprobe() and initialize maxactive (see example in samples/kprobes/kretprobe_example.c). But that is not exposed to userspace and it is currently not possible to choose maxactive when writing to /sys/kernel/debug/tracing/kprobe_events The default maxactive can be as low as 1 on single-core with a non-preemptive kernel. This is too low and we need to increase it not only for recursive functions, but for functions that sleep or resched. This patch updates the format of the command that can be written to kprobe_events so that maxactive can be optionally specified. I need this for a bpf program attached to the kretprobe of inet_csk_accept, which can sleep for a long time. This patch includes a basic selftest: > # ./ftracetest -v test.d/kprobe/ > === Ftrace unit tests === > [1] Kprobe dynamic event - adding and removing [PASS] > [2] Kprobe dynamic event - busy event check [PASS] > [3] Kprobe dynamic event with arguments [PASS] > [4] Kprobes event arguments with types [PASS] > [5] Kprobe dynamic event with function tracer [PASS] > [6] Kretprobe dynamic event with arguments [PASS] > [7] Kretprobe dynamic event with maxactive [PASS] > > # of passed: 7 > # of failed: 0 > # of unresolved: 0 > # of untested: 0 > # of unsupported: 0 > # of xfailed: 0 > # of undefined(test bug): 0 BugLink: https://github.com/iovisor/bcc/issues/1072 Link: http://lkml.kernel.org/r/1491215782-15490-1-git-send-email-alban@kinvolk.io Acked-by: Masami Hiramatsu Signed-off-by: Alban Crequy Signed-off-by: Steven Rostedt (VMware) Documentation/trace/kprobetrace.txt | 5 ++- kernel/trace/trace_kprobe.c | 39 ++++++++++++++++++---- .../ftrace/test.d/kprobe/kretprobe_maxactive.tc | 39 ++++++++++++++++++++++ 3 files changed, 76 insertions(+), 7 deletions(-) commit 7ca0ef3da09888b303991edb80cd0283ee641c9e Merge: c3d4fb0 a71c9a1 Author: Mauro Carvalho Chehab Date: Tue Apr 4 11:11:43 2017 -0300 Merge tag 'v4.11-rc5' into patchwork Linux 4.11-rc5 * tag 'v4.11-rc5': (1168 commits) Linux 4.11-rc5 tty: pl011: fix earlycon work-around for QDF2400 erratum 44 kasan: do not sanitize kexec purgatory drivers/rapidio/devices/tsi721.c: make module parameter variable name unique mm/hugetlb.c: don't call region_abort if region_chg fails kasan: report only the first error by default hugetlbfs: initialize shared policy as part of inode allocation mm: fix section name for .data..ro_after_init mm, hugetlb: use pte_present() instead of pmd_present() in follow_huge_pmd() mm: workingset: fix premature shadow node shrinking with cgroups mm: rmap: fix huge file mmap accounting in the memcg stats mm: move mm_percpu_wq initialization earlier mm: migrate: fix remove_migration_pte() for ksm pages nfs: flexfiles: fix kernel OOPS if MDS returns unsupported DS type NFSv4.1 fix infinite loop on IO BAD_STATEID error serial: 8250_EXAR: fix duplicate Kconfig text and add missing help text tty/serial: atmel: fix TX path in atmel_console_write() tty/serial: atmel: fix race condition (TX+DMA) serial: mxs-auart: Fix baudrate calculation irqchip/mips-gic: Fix Local compare interrupt ... commit bf594a896cdbae4a581eb80a2bdbda8df6997d75 Author: Alexandre Courbot Date: Thu Mar 30 18:26:44 2017 +0900 dt-bindings: Add documentation for GP10B GPU GP10B's definition is mostly similar to GK20A's and GM20B's. The only noticeable difference is the use of power domains instead of a regulator for power supply. Signed-off-by: Alexandre Courbot Acked-by: Rob Herring Signed-off-by: Thierry Reding .../devicetree/bindings/gpu/nvidia,gk20a.txt | 25 +++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 1116d5a7aff205b6d9879a6458788cac20d0cdf3 Author: Jon Hunter Date: Mon Mar 27 12:01:05 2017 +0100 clk: tegra: Don't reset PLL-CX if it is already enabled Commit 8dce89a1c2cf ("clk: tegra: Don't warn for PLL defaults unnecessarily") changed the tegra210_pllcx_set_defaults() function causing the PLL to always be reset regardless of whether it is in-use. This function was changed so that resetting of the PLL will only be skipped if the PLL is enabled AND 'pllcx->params->defaults_set' is not true. However, the 'pllcx->params->defaults_set' is always true and hence, the PLL is now always reset. This causes the boot to fail on the Tegra210 Smaug where the PLL is already enabled and in-use. Fix this by only resetting the PLL if not in-use and only printing the warning that the defaults are not set after we have checked the default settings. Fixes: 8dce89a1c2cf ("clk: tegra: Don't warn for PLL defaults unnecessarily") Signed-off-by: Jon Hunter Acked-By: Peter De Schrijver Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0dda563e571093f309d597cafaf7dd535496ecfb Author: Koji Matsuoka Date: Fri Nov 11 18:07:39 2016 +0100 drm: rcar-du: Add HDMI outputs to R8A7795 device description Update the device description with the two available HDMI outputs. Signed-off-by: Koji Matsuoka Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_crtc.h | 4 +++- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 12 ++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) commit dc4aedbf7c152c092c19e980a9fa1e89d6bc215f Author: Koji Matsuoka Date: Fri Nov 11 18:07:41 2016 +0100 drm: rcar-du: Add DPLL support The implementation hardcodes a workaround for the H3 ES1.x SoC regardless of the SoC revision, as the workaround can be safely applied on all devices in the Gen3 family without any side effect. Signed-off-by: Koji Matsuoka Signed-off-by: Ulrich Hecht Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 81 +++++++++++++++++++++++++++++++++- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 1 + drivers/gpu/drm/rcar-du/rcar_du_drv.h | 1 + drivers/gpu/drm/rcar-du/rcar_du_regs.h | 23 ++++++++++ 4 files changed, 105 insertions(+), 1 deletion(-) commit 4739a0d40b668ed4d60e048ee8ff03cd863e0987 Author: Laurent Pinchart Date: Thu Dec 1 13:07:49 2016 +0200 drm: rcar-du: Skip disabled outputs When a DT node connected to a DU output is disabled no bridge will ever be instantiated for it. Skip the output in that case. Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_kms.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 40d0fa7095d06c73c33da4fa7e381350141682f5 Author: Koji Matsuoka Date: Fri Nov 11 18:07:40 2016 +0100 drm: rcar-du: Add Gen3 HDMI encoder support The R-Car Gen3 SoCs include on-chip DesignWare HDMI encoders. Support them with a platform driver to provide platform glue data to the dw-hdmi driver. The driver is a complete rewrite of code coming from the Renesas BSP, save for the values in the PHY parameters table. Signed-off-by: Koji Matsuoka Signed-off-by: Ulrich Hecht Signed-off-by: Laurent Pinchart Signed-off-by: Kieran Bingham drivers/gpu/drm/rcar-du/Kconfig | 7 +++ drivers/gpu/drm/rcar-du/Makefile | 1 + drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c | 100 +++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+) commit 907c1bbd513db7e9aee63b31627c325e39e7d9ba Author: Laurent Pinchart Date: Fri Dec 2 01:02:53 2016 +0200 dt-bindings: display: renesas: Add R-Car Gen3 HDMI TX DT bindings The Renesas R-Car Gen3 SoCs use a Synopsys DWC HDMI TX encoder IP. Add corresponding device tree bindings based on the DWC HDMI TX bindings model. Signed-off-by: Laurent Pinchart Acked-by: Rob Herring .../bindings/display/bridge/renesas,dw-hdmi.txt | 75 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 76 insertions(+) commit 381ddfe478871588af95548aaecb6698009c3d6b Author: Laurent Pinchart Date: Fri Oct 7 17:39:21 2016 +0300 drm: rcar-du: Hardcode encoders types to DRM_MODE_ENCODER_NONE Unlike the connector type, the encoder type is unused by userspace. As it is equally unused in the driver, except in a single location where the connector type can be used instead, hardcode it to DRM_MODE_ENCODER_NONE. This allow removing all code that tries to determine (unsuccessfully in case a bridge is used) the encoder type. Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_drv.c | 15 ------------- drivers/gpu/drm/rcar-du/rcar_du_drv.h | 2 -- drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 30 ++++++++----------------- drivers/gpu/drm/rcar-du/rcar_du_encoder.h | 9 -------- drivers/gpu/drm/rcar-du/rcar_du_kms.c | 37 ++----------------------------- 5 files changed, 11 insertions(+), 82 deletions(-) commit 5c602531feb3db3926cdd76dda89314f0634c9e7 Author: Laurent Pinchart Date: Fri Oct 7 16:01:41 2016 +0300 drm: rcar-du: Replace manual bridge implementation with DRM bridge The rcar-du driver contains a manual implementation of HDMI and VGA bridges. Use DRM bridges to replace it. Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/Kconfig | 6 -- drivers/gpu/drm/rcar-du/Makefile | 5 +- drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 104 +++++++++++++---------- drivers/gpu/drm/rcar-du/rcar_du_encoder.h | 2 - drivers/gpu/drm/rcar-du/rcar_du_hdmienc.c | 134 ------------------------------ drivers/gpu/drm/rcar-du/rcar_du_hdmienc.h | 35 -------- drivers/gpu/drm/rcar-du/rcar_du_vgacon.c | 82 ------------------ drivers/gpu/drm/rcar-du/rcar_du_vgacon.h | 23 ----- 8 files changed, 60 insertions(+), 331 deletions(-) commit e947eccbeba45268bf3b5f4e30185d9bb87a293d Author: Laurent Pinchart Date: Mon Oct 3 13:07:02 2016 +0300 drm: rcar-du: Add support for LVDS mode selection Retrieve the LVDS mode from the panel and configure the LVDS encoder accordingly. LVDS mode selection is static as LVDS panels can't be hot-plugged on any of the device supported by the driver. Support for dynamic mode selection can be implemented in the future when needed. Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 27 +++++++++++++++++++++++++++ drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c | 11 +++++++++-- drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.h | 13 +++++++++++++ 3 files changed, 49 insertions(+), 2 deletions(-) commit bf7149f34241dcd6c95ea76b2b5ab4ff33f1c9b9 Author: Laurent Pinchart Date: Fri Nov 18 03:22:37 2016 +0200 drm: rcar-du: Use the DRM panel API Instead of parsing the panel device tree node manually, use the panel API to delegate panel handling to a panel driver. Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/Kconfig | 1 + drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 22 ++++++++++ drivers/gpu/drm/rcar-du/rcar_du_encoder.h | 3 ++ drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c | 68 +++++++++++-------------------- 4 files changed, 50 insertions(+), 44 deletions(-) commit 06711e6385a4ab4c8f4225f6cb9382eed58625a7 Author: Laurent Pinchart Date: Mon Mar 27 12:51:04 2017 +0300 drm: rcar-du: Document the vsps property in the DT bindings The property is used by the driver but is missing from the DT bindings. Document it. Reported-by: Geert Uytterhoeven Signed-off-by: Laurent Pinchart Documentation/devicetree/bindings/display/renesas,du.txt | 3 +++ 1 file changed, 3 insertions(+) commit eff7fd6ba5e5764318e4c2bb85a11b9d3159137d Author: Laurent Pinchart Date: Sat Mar 4 23:49:27 2017 +0200 drm: rcar-du: Remove wait field from rcar_du_device structure The field is a left-over from the switch to the atomic commit helper. It's unused, remove it. Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_drv.c | 2 -- drivers/gpu/drm/rcar-du/rcar_du_drv.h | 5 ----- 2 files changed, 7 deletions(-) commit 3115345577d8e8c912562a1dd555787f11fcaf06 Author: Jacopo Mondi Date: Fri Mar 3 13:58:56 2017 +0100 drm: rcar-du: Make sure the VSP is initialized on platforms that need it On Gen3 platforms planes are managed by the external VSP compositor on behalf of DRM/KMS. If VSP compositor support is not enabled in the DU driver, the VSP initialization stub routine is called. Return an error from that stub to fail explicitly, otherwise the device won't be usable and the driver will crash. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart [Clarified commit message] Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_vsp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8fd12233e2348568893f1d0e251d8a4630a50af Author: Laurent Pinchart Date: Fri Feb 10 13:30:35 2017 +0200 drm: rcar-du: Use DRM core's atomic commit helper The DRM core atomic helper now supports asynchronous commits natively. The custom rcar-du implementation isn't needed anymore, remove it. Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_kms.c | 99 ++++------------------------------- 1 file changed, 9 insertions(+), 90 deletions(-) commit 15b181a309e9c9bff8d0bc57d7da2d5f87c14186 Author: Laurent Pinchart Date: Sun Feb 12 02:45:11 2017 +0200 drm: rcar-du: Clear handled event pointer in CRTC state The atomic commit helper requires drivers to clear the event pointer stored in the CRTC state when the event is handled. In preparation to using the helper, fix the driver. Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6dd47cfd03a058d08b8caffb06194aa0eb109cf1 Author: Laurent Pinchart Date: Fri Feb 10 13:30:35 2017 +0200 drm: rcar-du: Handle event when disabling CRTCs The driver currently handles vblank events only when updating planes on a CRTC. The atomic update API however allows requesting an event when disabling a CRTC. This currently leads to event objects being leaked in the kernel and to events not being sent out. Fix it. Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 9e7d80e648793d5bf263a3ec9cfb1cf29b86a6e0 Author: Wolfram Sang Date: Sun Oct 16 10:01:47 2016 +0200 drm: rcar-du: 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 Acked-by: Laurent Pinchart Tested-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e79a7dfafa3adedb7653f6d14fea3376db5285e2 Author: Laurent Pinchart Date: Fri Nov 18 15:37:37 2016 +0200 drm: rcar-du: Switch to encoder .atomic_mode_set() helper function The native encoder mode set helper function for atomic drivers is .atomic_mode_set(). Replace the legacy .mode_set() implementation. Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 8 ++++---- drivers/gpu/drm/rcar-du/rcar_du_hdmienc.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit 7c9dff5bd643052989ec0982a8fc30b26b940db9 Author: Laurent Pinchart Date: Fri Nov 18 02:58:18 2016 +0200 drm: panels: Add LVDS panel driver This driver supports LVDS panels that don't require device-specific handling of power supplies or control signals. It implements automatic backlight handling if the panel is attached to a backlight controller. Signed-off-by: Laurent Pinchart drivers/gpu/drm/panel/Kconfig | 10 ++ drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-lvds.c | 286 +++++++++++++++++++++++++++++++++++++ 3 files changed, 297 insertions(+) commit 5ec1a96010aa7aff19adba92a8163ef8f8c5c1ad Author: Laurent Pinchart Date: Fri Nov 18 16:55:48 2016 +0200 drm: Add data transmission order bus flag The flags indicate whether data is transmitted LSB to MSB or MSB to LSB on the bus. The exact meaning is bus-type dependent. For instance, for LVDS buses the flags indicate whether the seven data bits transmitted in a clock pulse are sent in normal order (MSB to LSB, slots 0 to 6) or reverse order (LSB to MSB, slots 6 to 0). Signed-off-by: Laurent Pinchart Reviewed-by: Thierry Reding include/drm/drm_connector.h | 4 ++++ 1 file changed, 4 insertions(+) commit 0b5a3042b7590f6663781302b978f20254c09c6a Author: Laurent Pinchart Date: Fri Nov 18 01:06:02 2016 +0200 devicetree/bindings: display: Add bindings for two Mitsubishi panels The AA104XD12 and AA121TD01 are LVDS display panels. Their bindings are modelled on the the LVDS panel bindings. Signed-off-by: Laurent Pinchart Acked-by: Rob Herring .../display/panel/mitsubishi,aa104xd12.txt | 47 ++++++++++++++++++++++ .../display/panel/mitsubishi,aa121td01.txt | 47 ++++++++++++++++++++++ 2 files changed, 94 insertions(+) commit 4c8ccbc42c19265565c6a0972b52011a0b7f59ed Author: Laurent Pinchart Date: Tue Oct 4 17:15:10 2016 +0300 devicetree/bindings: display: Add bindings for LVDS panels LVDS is a physical layer specification defined in ANSI/TIA/EIA-644-A. Multiple incompatible data link layers have been used over time to transmit image data to LVDS panels. This binding supports display panels compatible with the JEIDA-59-1999, Open-LDI and VESA SWPG specifications. Signed-off-by: Laurent Pinchart Acked-by: Rob Herring .../bindings/display/panel/panel-lvds.txt | 120 +++++++++++++++++++++ 1 file changed, 120 insertions(+) commit 14da3ed8dd08c581a05b7d60a03ccd0159d19577 Author: Laurent Pinchart Date: Wed Nov 16 05:41:56 2016 +0200 devicetree/bindings: display: Document common panel properties Document properties common to several display panels in a central location that can be referenced by the panel device tree bindings. Signed-off-by: Laurent Pinchart Acked-by: Rob Herring .../bindings/display/panel/panel-common.txt | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) commit 88da44c5edb93d58f704fb9ea21962ca357d06a1 Author: Peter De Schrijver Date: Wed Mar 22 16:23:16 2017 +0200 clk: tegra: Add missing Tegra210 clocks iqc1, iqc2, tegra_clk_pll_a_out_adsp, tegra_clk_pll_a_out0_out_adsp, adsp and adsp neon were not modelled. dp2 wasn't modelled for Tegra210. Signed-off-by: Peter De Schrijver Signed-off-by: Thierry Reding drivers/clk/tegra/clk-id.h | 6 ++++++ drivers/clk/tegra/clk-tegra-periph.c | 6 ++++++ drivers/clk/tegra/clk-tegra210.c | 7 +++++++ include/dt-bindings/clock/tegra210-car.h | 16 ++++++++-------- 4 files changed, 27 insertions(+), 8 deletions(-) commit f3eda8f573c95051e5e3436957326868645d0e3f Merge: f5a7080 3401e8d Author: Arnaldo Carvalho de Melo Date: Tue Apr 4 11:02:47 2017 -0300 Merge branch 'perf/uncore-json-updates-1' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-misc into perf/core Pull perf/core improvements from Andi Kleen: This pull requests contains updates to the Intel PMU events JSON files, plus two one liner code fixes for the JSON files (also appended as patch) The most remarkable change is support for Sandy Bridge to Skylake client uncore event list support. Signed-off-by: Arnaldo Carvalho de Melo commit a63b6186f932e367133b271714d56fd8abaada7a Author: Alex Frid Date: Wed Mar 22 15:38:19 2017 +0200 clk: tegra: Propagate clk_out_x rate to parent Given that externx can only be used as a parent for clk_out_x, it makes sense to propagate requests to make clk_out_x easier to handle. Signed-off-by: Alex Frid Signed-off-by: Peter De Schrijver Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra-pmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1fd09e5d884a5ff4060948e0cf8f5d7eed16e936 Author: Jon Hunter Date: Tue Mar 28 13:42:58 2017 +0100 soc/tegra: Add initial flowctrl support for Tegra132/210 Tegra132 and Tegra210 support the flowctrl module and so add initial support for these devices. Please note that Tegra186 does not support the flowctrl module, so update the initialisation function such that we do not fall back and attempt to map the 'hardcoded' address range for Tegra186. Furthermore 64-bit Tegra devices have always had the flowctrl node defined in their device-tree and so only use the 'hardcoded' addresses for 32-bit Tegra devices. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding drivers/soc/tegra/Kconfig | 2 ++ drivers/soc/tegra/flowctrl.c | 31 +++++++++++++++++++++---------- 2 files changed, 23 insertions(+), 10 deletions(-) commit 0e84ac6c71cac1032a6ce4735e8c9d5e214f633f Author: Jon Hunter Date: Tue Mar 28 13:42:56 2017 +0100 dt-bindings: tegra: Update compatible strings for Tegra flowctrl Update the compatible strings for Tegra Flow Control driver to match the device-tree source files for Tegra. Signed-off-by: Jon Hunter Acked-by: Rob Herring Signed-off-by: Thierry Reding .../devicetree/bindings/arm/tegra/nvidia,tegra20-flowctrl.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 841fd94c43a4034f08eb830ef7b93a441b4d7378 Author: Jon Hunter Date: Tue Mar 28 13:42:55 2017 +0100 soc/tegra: flowctrl: Add basic platform driver Add a simple platform driver for the flowctrl module so that it gets registered as a proper device. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding drivers/soc/tegra/flowctrl.c | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) commit 7e10cf743634a6b0f3cf63046c49294b38254fe9 Author: Jon Hunter Date: Tue Mar 28 13:42:54 2017 +0100 soc/tegra: Move Tegra flowctrl driver The flowctrl driver is required for both ARM and ARM64 Tegra devices and in order to enable support for it for ARM64, move the Tegra flowctrl driver into drivers/soc/tegra. By moving the flowctrl driver, tegra_flowctrl_init() is now called by via an early initcall and to prevent this function from attempting to mapping IO space for a non-Tegra device, a test for 'soc_is_tegra()' is also added. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm/mach-tegra/Makefile | 1 - arch/arm/mach-tegra/cpuidle-tegra20.c | 3 +- arch/arm/mach-tegra/flowctrl.c | 171 ------------------------------- arch/arm/mach-tegra/flowctrl.h | 66 ------------ arch/arm/mach-tegra/platsmp.c | 2 +- arch/arm/mach-tegra/pm.c | 2 +- arch/arm/mach-tegra/reset-handler.S | 2 +- arch/arm/mach-tegra/sleep-tegra20.S | 3 +- arch/arm/mach-tegra/sleep-tegra30.S | 2 +- arch/arm/mach-tegra/tegra.c | 2 - drivers/soc/tegra/Kconfig | 7 ++ drivers/soc/tegra/Makefile | 1 + drivers/soc/tegra/flowctrl.c | 187 ++++++++++++++++++++++++++++++++++ include/soc/tegra/flowctrl.h | 82 +++++++++++++++ 14 files changed, 285 insertions(+), 246 deletions(-) commit 07d76e953b5ec616f3d4c2d807e911e37312dc72 Author: Jon Hunter Date: Tue Mar 28 13:42:53 2017 +0100 ARM: tegra: Remove unnecessary inclusion of flowctrl header The Tegra flowctrl.h header is included unnecessarily by the Tegra sleep.S source file. Remove this unnecessary inclusion. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm/mach-tegra/sleep.S | 2 -- 1 file changed, 2 deletions(-) commit 1859217bec83ebd1b4a220df396905a87285129b Author: Paul Gortmaker Date: Sun Nov 13 14:03:01 2016 -0500 soc: tegra: make fuse-tegra explicitly non-modular The Makefiles currently controlling compilation of this code is: drivers/soc/tegra/Makefile:obj-y += fuse/ drivers/soc/tegra/fuse/Makefile:obj-y += fuse-tegra.o ...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. Cc: Stephen Warren Cc: Thierry Reding Cc: Alexandre Courbot Cc: linux-tegra@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Thierry Reding drivers/soc/tegra/fuse/fuse-tegra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bd737038d555468198495230f4233b9ba92e774c Author: Arnd Bergmann Date: Mon Mar 20 10:13:06 2017 +0100 soc/tegra: Fix link errors with PMC disabled With the new Tegra186 PMC driver merged, anything that relies on the previous PMC driver fails to link when that is disabled: arch/arm/mach-tegra/pm.o: In function `tegra_pm_set': pm.c:(.text.tegra_pm_set+0x3c): undefined reference to `tegra_pmc_enter_suspend_mode' arch/arm/mach-tegra/pm.o: In function `tegra_suspend_enter': pm.c:(.text.tegra_suspend_enter+0x4): undefined reference to `tegra_pmc_get_suspend_mode' arch/arm/mach-tegra/pm.o: In function `tegra_init_suspend': pm.c:(.init.text+0x1c): undefined reference to `tegra_pmc_get_suspend_mode' pm.c:(.init.text+0x74): undefined reference to `tegra_pmc_set_suspend_mode' ERROR: tegra_powergate_sequence_power_up [drivers/ata/ahci_tegra.ko] undefined! ERROR: tegra_powergate_power_off [drivers/ata/ahci_tegra.ko] undefined! Making the definition depend on the presence of the driver makes it build again, though that might not be the correct fix. Reported-by: Krzysztof Kozlowski Fixes: 854014236290 ("soc/tegra: Implement Tegra186 PMC support") Signed-off-by: Arnd Bergmann Signed-off-by: Thierry Reding include/soc/tegra/pmc.h | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit 5e7d4c65294174d6f58fe36df3edd55cd3b859d6 Author: Thierry Reding Date: Thu Feb 23 18:11:57 2017 +0100 soc/tegra: Implement Tegra186 PMC support The power management controller on Tegra186 has changed in backwards- incompatible ways with respect to earlier generations. This implements a new driver that supports inversion of the PMU interrupt as well as the "recovery", "bootloader" and "forced-recovery" reboot commands. Acked-by: Rob Herring Signed-off-by: Thierry Reding .../bindings/arm/tegra/nvidia,tegra186-pmc.txt | 34 +++++ drivers/soc/tegra/Kconfig | 13 ++ drivers/soc/tegra/Makefile | 3 +- drivers/soc/tegra/pmc-tegra186.c | 169 +++++++++++++++++++++ 4 files changed, 218 insertions(+), 1 deletion(-) commit d4c7d1a089d6fddf38c4fcdc91f15791bfb59a95 Author: Keerthy Date: Mon Mar 13 19:13:28 2017 +0530 PCI: dwc: dra7xx: Push request_irq() call to the bottom of probe Currently devm_request_irq() is being called before base, PCI fields of dra7xx_pcie structure are populated. It is called even before pm_runtime_enable() and pm_runtime_get_sync() are called. This will lead to exceptions if in case an interrupt is triggered before the all of the above are done. Hence push the devm_request_irq() call to the end of the probe. Signed-off-by: Keerthy Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pci-dra7xx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit edd45e3968299f9b4635bdfeca1edab842d81eac Author: Kishon Vijay Abraham I Date: Mon Mar 13 19:13:27 2017 +0530 PCI: dwc: designware: Move _unroll configurations to a separate function No functional change. Rename dw_pcie_writel_unroll/dw_pcie_readl_unroll to dw_pcie_writel_ob_unroll/dw_pcie_readl_ob_unroll respectively as these functions are used to perform only outbound configurations. Also move these _unroll configurations to a separate function. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pcie-designware.c | 97 +++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 39 deletions(-) commit a509d7d9af5ebf86ffbefa98e49761d813fb1d40 Author: Kishon Vijay Abraham I Date: Mon Mar 13 19:13:26 2017 +0530 PCI: dwc: all: Modify dbi accessors to access data of 4/2/1 bytes Previously dbi accessors can be used to access data of size 4 bytes. But there might be situations (like accessing MSI_MESSAGE_CONTROL in order to set/get the number of required MSI interrupts in EP mode) where dbi accessors must be used to access data of size 2. This is in preparation for adding endpoint mode support to designware driver. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas Acked-by: Niklas Cassel Cc: Jingoo Han Cc: Joao Pinto drivers/pci/dwc/pci-exynos.c | 16 ++++++++-------- drivers/pci/dwc/pcie-designware.c | 34 ++++++++++++++++++++++++---------- drivers/pci/dwc/pcie-designware.h | 18 ++++++++++-------- 3 files changed, 42 insertions(+), 26 deletions(-) commit b50b2db266d8a8c303e8d88590c6416dfe576c6c Author: Kishon Vijay Abraham I Date: Mon Mar 13 19:13:25 2017 +0530 PCI: dwc: all: Modify dbi accessors to take dbi_base as argument dwc has 2 dbi address space labeled dbics and dbics2. The existing helper to access dbi address space can access only dbics. However dbics2 has to be accessed for programming the BAR registers in the case of EP mode. This is in preparation for adding EP mode support to dwc driver. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas Acked-by: Niklas Cassel Cc: Jingoo Han Cc: Joao Pinto drivers/pci/dwc/pci-exynos.c | 10 ++++++---- drivers/pci/dwc/pcie-designware.c | 13 +++++++------ drivers/pci/dwc/pcie-designware.h | 20 ++++++++++++++++---- 3 files changed, 29 insertions(+), 14 deletions(-) commit 62c5549fc4eab7ce7dc328b5c325e7a98b5b16c0 Author: Kishon Vijay Abraham I Date: Mon Mar 13 19:13:24 2017 +0530 PCI: dwc: artpec6: Populate cpu_addr_fixup ops Populate cpu_addr_fixup ops to extract the least 28 bits of the corresponding CPU address. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas Acked-by: Niklas Cassel Acked-by: Joao Pinto drivers/pci/dwc/pcie-artpec6.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 2ed6cc71e6f726c131fb8675eb64cc0519c26ae8 Author: Kishon Vijay Abraham I Date: Mon Mar 13 19:13:23 2017 +0530 PCI: dwc: dra7xx: Populate cpu_addr_fixup ops Populate cpu_addr_fixup ops to extract the least 28 bits of the corresponding CPU address. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas Acked-by: Joao Pinto drivers/pci/dwc/pci-dra7xx.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit f5a70801b7832bfcb865e95c39bdef8eac21226f Author: Ravi Bangoria Date: Tue Mar 28 15:17:54 2017 +0530 perf sdt powerpc: Add argument support SDT marker argument is in N@OP format. Here OP is arch dependent component. Add powerpc logic to parse OP and convert it to uprobe compatible format. Signed-off-by: Ravi Bangoria Acked-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Alexis Berlemont Cc: Hemant Kumar Cc: Michael Ellerman Cc: Naveen N. Rao Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170328094754.3156-4-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/powerpc/util/perf_regs.c | 111 +++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) commit a660083eb06c5bb0ad049377dbd2522e4b1551d6 Author: Kishon Vijay Abraham I Date: Mon Mar 13 19:13:22 2017 +0530 PCI: dwc: designware: Add new *ops* for CPU addr fixup Some platforms (like dra7xx) require only the least 28 bits of the corresponding 32 bit CPU address to be programmed in the address translation unit. This modified address is stored in io_base/mem_base/ cfg0_base/cfg1_base in dra7xx_pcie_host_init(). While this is okay for host mode where the address range is fixed, device mode requires different addresses to be programmed based on the host buffer address. Add a new ops to get the least 28 bits of the corresponding 32 bit CPU address and invoke it before programming the address translation unit. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas Acked-by: Joao Pinto drivers/pci/dwc/pcie-designware.c | 3 +++ drivers/pci/dwc/pcie-designware.h | 1 + 2 files changed, 4 insertions(+) commit 1b497e6493c49bbb55c89f53562f7f853495e90d Author: Dan Carpenter Date: Thu Mar 16 14:34:51 2017 -0500 PCI: dwc: Fix uninitialized variable in dw_handle_msi_irq() The bug is that "val" is unsigned long but we only initialize 32 bits of it. Then we test "if (val)" and that might be true not because we set the bits but because some were never initialized. Fixes: f342d940ee0e ("PCI: exynos: Add support for MSI") Signed-off-by: Dan Carpenter Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pcie-designware-host.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit dbe4a09e8bbcf88809a8394d6a359d8cebd22a86 Author: Bjorn Helgaas Date: Thu Mar 16 14:34:59 2017 -0500 PCI: dwc: Unindent dw_handle_msi_irq() loop Use "continue" to skip rest of the loop when possible to save an indent level. No functional change intended. Suggested-by: walter harms Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pcie-designware-host.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 24bb244e02a6bead5b854d842002df0d38ae7b7b Author: Martin Kaiser Date: Mon Apr 3 21:47:05 2017 +0200 ARM: i.MX25: globally disable supervisor protect The problem described in commit 6befda9a272b ("ARM: i.MX53: globally disable supervisor protect") for the i.MX53 platform applies to i.MX25 as well. E.g. CSPI1+SDMA and SSI1+SDMA are not working with the default AIPS configuration. Modifiy the AIPS configuration to allow access to the bus by SDMA and peripherals. Signed-off-by: Martin Kaiser Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-imx25.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6678254bb4a46dc47620f993a4b71480a3c56ee4 Author: Harninder Rai Date: Thu Feb 9 16:34:11 2017 +0530 dt-bindings: arm: Add entry for FSL LS1088A RDB, QDS boards Signed-off-by: Harninder Rai Acked-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 124248e2fdd6efe6ad548395c8d7c6f6c1de9b46 Author: Harninder Rai Date: Thu Feb 9 16:33:49 2017 +0530 dt-bindings: clockgen: Add compatible string for LS1088A Signed-off-by: Harninder Rai Acked-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/clock/qoriq-clock.txt | 1 + 1 file changed, 1 insertion(+) commit 257ab443118bffc7fdcef38f49cf59be68a3e362 Author: Petr Mladek Date: Fri Mar 24 17:14:05 2017 +0100 printk: Correctly handle preemption in console_unlock() Some console drivers code calls console_conditional_schedule() that looks at @console_may_schedule. The value must be cleared when the drivers are called from console_unlock() with interrupts disabled. But rescheduling is fine when the same code is called, for example, from tty operations where the console semaphore is taken via console_lock(). This is why @console_may_schedule is cleared before calling console drivers. The original value is stored to decide if we could sleep between lines. Now, @console_may_schedule is not cleared when we call console_trylock() and jump back to the "again" goto label. This has become a problem, since the commit 6b97a20d3a7909daa066 ("printk: set may_schedule for some of console_trylock() callers"). @console_may_schedule might get enabled now. There is also the opposite problem. console_lock() can be called only from preemptive context. It can always enable scheduling in the console code. But console_trylock() is not able to detect it when CONFIG_PREEMPT_COUNT is disabled. Therefore we should use the original @console_may_schedule value after re-acquiring the console semaphore in console_unlock(). This patch solves both problems by moving the "again" goto label. Alternative solution was to clear and restore the value around call_console_drivers(). Then console_conditional_schedule() could be used also inside console_unlock(). But there was a potential race with console_flush_on_panic() as reported by Sergey Senozhatsky. That function should be called only where there is only one CPU and with interrupts disabled. But better be on the safe side because stopping CPUs might fail. Fixes: 6b97a20d3a7909 ("printk: set may_schedule for some of console_trylock() callers") Link: http://lkml.kernel.org/r/1490372045-22288-1-git-send-email-pmladek@suse.com Suggested-by: Tetsuo Handa Cc: Steven Rostedt Cc: Peter Zijlstra Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-fbdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek kernel/printk/printk.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9891baca2c36cc6637022b469b943d949d52d73f Merge: b840d64 d14a39e Author: Linus Walleij Date: Tue Apr 4 13:56:08 2017 +0200 Merge tag 'sh-pfc-for-v4.12-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.12 (take two) - Add basic support for the Pin Function Controller on revision ES2.0 of the R-Car H3 SoC, which differs from ES1.x in many ways. commit 19830e55247cddb3f46f1bf60b8e245593491bea Author: Peter Zijlstra Date: Thu Mar 23 15:56:14 2017 +0100 rtmutex: Fix more prio comparisons There was a pure ->prio comparison left in try_to_wake_rt_mutex(), convert it to use rt_mutex_waiter_less(), noting that greater-or-equal is not-less (both in kernel priority view). This necessitated the introduction of cmp_task() which creates a pointer to an unnamed stack variable of struct rt_mutex_waiter type to compare against tasks. With this, we can now also create and employ rt_mutex_waiter_equal(). Reviewed-and-tested-by: Juri Lelli Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170323150216.455584638@infradead.org Signed-off-by: Thomas Gleixner kernel/locking/rtmutex.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) commit e0aad5b44ff5d28ac1d6ae70cdf84ca228e889dc Author: Peter Zijlstra Date: Thu Mar 23 15:56:13 2017 +0100 rtmutex: Fix PI chain order integrity rt_mutex_waiter::prio is a copy of task_struct::prio which is updated during the PI chain walk, such that the PI chain order isn't messed up by (asynchronous) task state updates. Currently rt_mutex_waiter_less() uses task state for deadline tasks; this is broken, since the task state can, as said above, change asynchronously, causing the RB tree order to change without actual tree update -> FAIL. Fix this by also copying the deadline into the rt_mutex_waiter state and updating it along with its prio field. Ideally we would also force PI chain updates whenever DL tasks update their deadline parameter, but for first approximation this is less broken than it was. Signed-off-by: Peter Zijlstra (Intel) Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170323150216.403992539@infradead.org Signed-off-by: Thomas Gleixner kernel/locking/rtmutex.c | 29 +++++++++++++++++++++++++++-- kernel/locking/rtmutex_common.h | 1 + 2 files changed, 28 insertions(+), 2 deletions(-) commit b91473ff6e979c0028f02f90e40c844959c736d8 Author: Peter Zijlstra Date: Thu Mar 23 15:56:12 2017 +0100 sched,tracing: Update trace_sched_pi_setprio() Pass the PI donor task, instead of a numerical priority. Numerical priorities are not sufficient to describe state ever since SCHED_DEADLINE. Annotate all sched tracepoints that are currently broken; fixing them will bork userspace. *hate*. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170323150216.353599881@infradead.org Signed-off-by: Thomas Gleixner include/trace/events/sched.h | 16 +++++++++------- kernel/sched/core.c | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) commit acd58620e415aee4a43a808d7d2fd87259ee0001 Author: Peter Zijlstra Date: Thu Mar 23 15:56:11 2017 +0100 sched/rtmutex: Refactor rt_mutex_setprio() With the introduction of SCHED_DEADLINE the whole notion that priority is a single number is gone, therefore the @prio argument to rt_mutex_setprio() doesn't make sense anymore. So rework the code to pass a pi_task instead. Note this also fixes a problem with pi_top_task caching; previously we would not set the pointer (call rt_mutex_update_top_task) if the priority didn't change, this could lead to a stale pointer. As for the XXX, I think its fine to use pi_task->prio, because if it differs from waiter->prio, a PI chain update is immenent. Signed-off-by: Peter Zijlstra (Intel) Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170323150216.303827095@infradead.org Signed-off-by: Thomas Gleixner include/linux/sched/rt.h | 24 ++++------ kernel/locking/rtmutex.c | 112 +++++++++++++---------------------------------- kernel/sched/core.c | 66 ++++++++++++++++++++++------ 3 files changed, 91 insertions(+), 111 deletions(-) commit aa2bfe55366552cb7e93e8709d66e698d79ccc47 Author: Peter Zijlstra Date: Thu Mar 23 15:56:10 2017 +0100 rtmutex: Clean up Previous patches changed the meaning of the return value of rt_mutex_slowunlock(); update comments and code to reflect this. Signed-off-by: Peter Zijlstra (Intel) Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170323150216.255058238@infradead.org Signed-off-by: Thomas Gleixner kernel/futex.c | 7 ++++--- kernel/locking/rtmutex.c | 28 +++++++++++++--------------- kernel/locking/rtmutex_common.h | 2 +- 3 files changed, 18 insertions(+), 19 deletions(-) commit 85e2d4f992868ad78dc8bb2c077b652fcfb3661a Author: Xunlei Pang Date: Thu Mar 23 15:56:09 2017 +0100 sched/deadline/rtmutex: Dont miss the dl_runtime/dl_period update Currently dl tasks will actually return at the very beginning of rt_mutex_adjust_prio_chain() in !detect_deadlock cases: if (waiter->prio == task->prio) { if (!detect_deadlock) goto out_unlock_pi; // out here else requeue = false; } As the deadline value of blocked deadline tasks(waiters) without changing their sched_class(thus prio doesn't change) never changes, this seems reasonable, but it actually misses the chance of updating rt_mutex_waiter's "dl_runtime(period)_copy" if a waiter updates its deadline parameters(dl_runtime, dl_period) or boosted waiter changes to !deadline class. Thus, force deadline task not out by adding the !dl_prio() condition. Signed-off-by: Xunlei Pang Signed-off-by: Peter Zijlstra (Intel) Acked-by: Steven Rostedt Reviewed-by: Thomas Gleixner Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/1460633827-345-7-git-send-email-xlpang@redhat.com Link: http://lkml.kernel.org/r/20170323150216.206577901@infradead.org Signed-off-by: Thomas Gleixner kernel/locking/rtmutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e96a7705e7d3fef96aec9b590c63b2f6f7d2ba22 Author: Xunlei Pang Date: Thu Mar 23 15:56:08 2017 +0100 sched/rtmutex/deadline: Fix a PI crash for deadline tasks A crash happened while I was playing with deadline PI rtmutex. BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 IP: [] rt_mutex_get_top_task+0x1f/0x30 PGD 232a75067 PUD 230947067 PMD 0 Oops: 0000 [#1] SMP CPU: 1 PID: 10994 Comm: a.out Not tainted Call Trace: [] enqueue_task+0x2c/0x80 [] activate_task+0x23/0x30 [] pull_dl_task+0x1d5/0x260 [] pre_schedule_dl+0x16/0x20 [] __schedule+0xd3/0x900 [] schedule+0x29/0x70 [] __rt_mutex_slowlock+0x4b/0xc0 [] rt_mutex_slowlock+0xd1/0x190 [] rt_mutex_timed_lock+0x53/0x60 [] futex_lock_pi.isra.18+0x28c/0x390 [] do_futex+0x190/0x5b0 [] SyS_futex+0x80/0x180 This is because rt_mutex_enqueue_pi() and rt_mutex_dequeue_pi() are only protected by pi_lock when operating pi waiters, while rt_mutex_get_top_task(), will access them with rq lock held but not holding pi_lock. In order to tackle it, we introduce new "pi_top_task" pointer cached in task_struct, and add new rt_mutex_update_top_task() to update its value, it can be called by rt_mutex_setprio() which held both owner's pi_lock and rq lock. Thus "pi_top_task" can be safely accessed by enqueue_task_dl() under rq lock. Originally-From: Peter Zijlstra Signed-off-by: Xunlei Pang Signed-off-by: Peter Zijlstra (Intel) Acked-by: Steven Rostedt Reviewed-by: Thomas Gleixner Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170323150216.157682758@infradead.org Signed-off-by: Thomas Gleixner include/linux/init_task.h | 1 + include/linux/sched.h | 2 ++ include/linux/sched/rt.h | 1 + kernel/fork.c | 1 + kernel/locking/rtmutex.c | 29 +++++++++++++++++++++-------- kernel/sched/core.c | 2 ++ 6 files changed, 28 insertions(+), 8 deletions(-) commit 2a1c6029940675abb2217b590512dbf691867ec4 Author: Xunlei Pang Date: Thu Mar 23 15:56:07 2017 +0100 rtmutex: Deboost before waking up the top waiter We should deboost before waking the high-priority task, such that we don't run two tasks with the same "state" (priority, deadline, sched_class, etc). In order to make sure the boosting task doesn't start running between unlock and deboost (due to 'spurious' wakeup), we move the deboost under the wait_lock, that way its serialized against the wait loop in __rt_mutex_slowlock(). Doing the deboost early can however lead to priority-inversion if current would get preempted after the deboost but before waking our high-prio task, hence we disable preemption before doing deboost, and enabling it after the wake up is over. This gets us the right semantic order, but most importantly however; this change ensures pointer stability for the next patch, where we have rt_mutex_setprio() cache a pointer to the top-most waiter task. If we, as before this change, do the wakeup first and then deboost, this pointer might point into thin air. [peterz: Changelog + patch munging] Suggested-by: Peter Zijlstra Signed-off-by: Xunlei Pang Signed-off-by: Peter Zijlstra (Intel) Acked-by: Steven Rostedt Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170323150216.110065320@infradead.org Signed-off-by: Thomas Gleixner kernel/futex.c | 5 +--- kernel/locking/rtmutex.c | 59 ++++++++++++++++++++++------------------- kernel/locking/rtmutex_common.h | 2 +- 3 files changed, 34 insertions(+), 32 deletions(-) commit 38bffdac071b720db627bfd2b125a2802a04d419 Merge: 57dd924 a481db3 Author: Thomas Gleixner Date: Tue Apr 4 11:31:12 2017 +0200 Merge branch 'sched/core' into locking/core Required for the rtmutex/sched_deadline patches which depend on both branches commit 3d1df96ad46856ce850be5ac112eab919cbe1cab Author: Lucas Stach Date: Thu Mar 23 17:18:37 2017 +0100 drm/imx: merge imx-drm-core and ipuv3-crtc in one module While it is possible to hook other CRTC implementations into imx-drm in practice there are none yet and the option to disable ipuv3-crtc support has been hidden for a long time. Now that the imx-drm-core has learned to deal with some of the specifics of IPUv3 there is a cyclic dependency between both parts. To get rid of this and to decimate the Kconfig maze a bit, simply merge both parts into one module. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/Kconfig | 7 ------- drivers/gpu/drm/imx/Makefile | 3 +-- drivers/gpu/drm/imx/imx-drm-core.c | 18 +++++++++++++++++- drivers/gpu/drm/imx/imx-drm.h | 2 ++ drivers/gpu/drm/imx/ipuv3-crtc.c | 8 +------- 5 files changed, 21 insertions(+), 17 deletions(-) commit 30310c835f3ebfefcf83f006981faa66d73bd810 Author: Lucas Stach Date: Thu Mar 23 16:52:02 2017 +0100 gpu: ipu-v3: don't depend on DRM being enabled The PRE/PRG drivers, which need the DRM infrastructure, are only used from the output path, so we skip building them into the ipu-v3 driver if CONFIG_DRM is not enabled. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/Makefile | 6 +++++- drivers/gpu/ipu-v3/ipu-common.c | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) commit 9c4ad466d1dd2e067d5fdb2fcdbcc30fc5c145f9 Author: Gerd Hoffmann Date: Mon Apr 3 09:08:45 2017 +0200 drm: virtio: fix virtio_gpu_mode_dumb_create Lookup format using virtio_gpu_translate_format() instead of hardcoding it. Fixes xorg display on bigendian guests (i.e. ppc64). Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Acked-by: Daniel Vetter Tested-by: Laurent Vivier Link: http://patchwork.freedesktop.org/patch/msgid/20170403070845.10793-3-kraxel@redhat.com drivers/gpu/drm/virtio/virtgpu_gem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d519cb76181efc78ba67e87b38286fa04d46dfa3 Author: Gerd Hoffmann Date: Mon Apr 3 09:08:44 2017 +0200 drm: virtio: add virtio_gpu_translate_format Factors out code, no functional change. Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter Tested-by: Laurent Vivier Link: http://patchwork.freedesktop.org/patch/msgid/20170403070845.10793-2-kraxel@redhat.com drivers/gpu/drm/virtio/virtgpu_drv.h | 1 + drivers/gpu/drm/virtio/virtgpu_fb.c | 58 +---------------------------- drivers/gpu/drm/virtio/virtgpu_plane.c | 68 ++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 56 deletions(-) commit 5d5f7c571549099dd03e56cdb46a551da088a106 Author: Neil Armstrong Date: Tue Apr 4 10:01:34 2017 +0200 MAINTAINERS: meson-drm: remove useless git repository Meson DRM is switching to drm-misc, so remove the freedesktop drm/meson-drm git repository from MAINTAINERS entry. Acked-by: Daniel Vetter Signed-off-by: Neil Armstrong Link: http://patchwork.freedesktop.org/patch/msgid/1491292894-9190-1-git-send-email-narmstrong@baylibre.com MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 0cbdc11482d72ad164e33ef7cc57b01e8b61e40d Author: Sergei Shtylyov Date: Fri Mar 31 23:29:23 2017 +0300 pinctrl: sh-pfc: r8a7791: Fix IPSR comment typos The IPSR field names in the comments have been fat-fingered in a couple places -- fix those silly typos... Fixes: 508845196238 ("pinctrl: sh-pfc: r8a7791 PFC support") Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 58439280f84e6b39fd7d61f25ab30489c1aaf0a9 Author: Sergei Shtylyov Date: Thu Mar 30 23:20:48 2017 +0300 pinctrl: sh-pfc: r8a7791: Fix SCIF2 pinmux data PINMUX_IPSR_MSEL() macro invocation for the TX2 signal has apparently wrong 1st argument -- most probably a result of cut&paste programming... Fixes: 508845196238 ("pinctrl: sh-pfc: r8a7791 PFC support") Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3908632fb829d73317c64c3d04f584b49f62e4ae Author: Sergei Shtylyov Date: Wed Mar 29 21:36:51 2017 +0300 pinctrl: sh-pfc: r8a7791: Add missing DVC_MUTE signal The R8A7791 PFC driver was apparently based on the preliminary revisions of the user's manual, which omitted the DVC_MUTE signal altogether in the PFC section. The modern manual has the signal described, so just add the necassary data to the driver... Fixes: 508845196238 ("pinctrl: sh-pfc: r8a7791 PFC support") Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit da7a692fbbab07f4e9798b5b52798f6e3256dd8f Author: Sergei Shtylyov Date: Wed Mar 29 21:36:50 2017 +0300 pinctrl: sh-pfc: r8a7791: Add missing HSCIF1 pinmux data The R8A7791 PFC driver was apparently based on the preliminary revisions of the user's manual, which omitted the HSCIF1 group E signals in the IPSR4 register description. This would cause HSCIF1's probe to fail with the messages like below: sh-pfc e6060000.pfc: cannot locate data/mark enum_id for mark 1989 sh-sci e62c8000.serial: Error applying setting, reverse things back sh-sci: probe of e62c8000.serial failed with error -22 Add the neceassary PINMUX_IPSR_MSEL() invocations for the HSCK1_E, HCTS1#_E, and HRTS1#_E signals... Fixes: 508845196238 ("pinctrl: sh-pfc: r8a7791 PFC support") Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 3 +++ 1 file changed, 3 insertions(+) commit 1d33b219563fb9f7384c8c609c767cb6bfd44b8e Author: Kirill A. Shutemov Date: Thu Mar 30 11:07:31 2017 +0300 x86/espfix: Add support for 5-level paging We don't need extra virtual address space for ESPFIX, so it stays within one PUD page table for both 4- and 5-level paging. Redefining ESPFIX_BASE_ADDR using P4D_SHIFT instead of PGDIR_SHIFT would make it stay in the same place regarding of paging mode. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170330080731.65421-8-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/pgtable_64_types.h | 2 +- arch/x86/kernel/espfix_64.c | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) commit 5480bb61cfba5de23df59793527c3a37c0d2e247 Author: Kirill A. Shutemov Date: Thu Mar 30 11:07:30 2017 +0300 x86/kasan: Extend KASAN to support 5-level paging This patch bring support for a non-folded additional page table level. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: Dmitry Vyukov Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170330080731.65421-7-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/kasan_init_64.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit b8504058a06bd19286c8b59539eebfda69d1ecb5 Author: Kirill A. Shutemov Date: Thu Mar 30 11:07:29 2017 +0300 x86/mm: Add basic defines/helpers for CONFIG_X86_5LEVEL=y Extends pagetable headers to support the new paging mode. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170330080731.65421-6-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/pgtable_64.h | 11 +++++++++++ arch/x86/include/asm/pgtable_64_types.h | 20 ++++++++++++++++++++ arch/x86/include/asm/pgtable_types.h | 10 +++++++++- arch/x86/mm/pgtable.c | 32 +++++++++++++++++++++++++++++++- 4 files changed, 71 insertions(+), 2 deletions(-) commit 335437fbf7d3a630d775f06c9ee37d60919561d8 Author: Kirill A. Shutemov Date: Thu Mar 30 11:07:28 2017 +0300 x86/paravirt: Add 5-level support to the paravirt code Add operations to allocate/release p4ds. Xen requires more work. We will need to come back to it. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170330080731.65421-5-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/paravirt.h | 37 ++++++++++++++++++++++++----------- arch/x86/include/asm/paravirt_types.h | 7 ++++++- arch/x86/include/asm/pgalloc.h | 2 ++ arch/x86/kernel/paravirt.c | 9 +++++++-- 4 files changed, 41 insertions(+), 14 deletions(-) commit 4c7c44837be77e2689c577abef155c4b5d873c82 Author: Kirill A. Shutemov Date: Thu Mar 30 11:07:27 2017 +0300 x86/mm: Define virtual memory map for 5-level paging The first part of memory map (up to %esp fixup) simply scales existing map for 4-level paging by factor of 9 -- number of bits addressed by the additional page table level. The rest of the map is unchanged. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170330080731.65421-4-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar Documentation/x86/x86_64/mm.txt | 33 ++++++++++++++++++++++++++++++--- arch/x86/Kconfig | 1 + arch/x86/include/asm/kasan.h | 9 ++++++--- arch/x86/include/asm/page_64_types.h | 10 ++++++++++ arch/x86/include/asm/pgtable_64_types.h | 6 ++++++ arch/x86/include/asm/sparsemem.h | 9 +++++++-- 6 files changed, 60 insertions(+), 8 deletions(-) commit 361b4b58ec4cf123e12a773909c6454dbd5e6dbc Author: Kirill A. Shutemov Date: Thu Mar 30 11:07:26 2017 +0300 x86/asm: Remove __VIRTUAL_MASK_SHIFT==47 assert We don't need the assert anymore, as: 17be0aec74fb ("x86/asm/entry/64: Implement better check for canonical addresses") made canonical address checks generic wrt. address width. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170330080731.65421-3-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 3677d4c6a2010e4f5a0ca8b617b595fe4cc7ba6b Author: Kirill A. Shutemov Date: Thu Mar 30 11:07:25 2017 +0300 x86/boot: Detect 5-level paging support In this initial implementation we force-require 5-level paging support from the hardware, when compiled with CONFIG_X86_5LEVEL=y. (The kernel will panic during boot on CPUs that don't support 5-level paging.) We will implement boot-time switch between 4- and 5-level paging later. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170330080731.65421-2-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/cpucheck.c | 9 +++++++++ arch/x86/boot/cpuflags.c | 12 ++++++++++-- arch/x86/include/asm/disabled-features.h | 8 +++++++- arch/x86/include/asm/required-features.h | 8 +++++++- 4 files changed, 33 insertions(+), 4 deletions(-) commit 11fe909d236263f62808dc3c73caf798e026d7aa Author: Matt Brown Date: Thu Mar 30 10:28:01 2017 +1100 powerpc/powernv: Add OPAL exports attributes to sysfs New versions of OPAL have a device node /ibm,opal/firmware/exports, each property of which describes a range of memory in OPAL that Linux might want to export to userspace for debugging. This patch adds a sysfs file under 'opal/exports' for each property found there, and makes it read-only by root. Signed-off-by: Matt Brown [mpe: Drop counting of props, rename to attr, free on sysfs error, c'log] Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal.c | 76 +++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit 687da8fce1682c9f1e87530e731189863c588265 Author: Sukadev Bhattiprolu Date: Mon Mar 27 19:43:14 2017 -0400 powerpc/prom: Increase minimum RMA size to 512MB When booting very large systems with a large initrd, we run out of space early in boot for either RTAS or the flattened device tree (FDT). Boot fails with messages like: Could not allocate memory for RTAS or No memory for flatten_device_tree (no room) Increasing the minimum RMA size to 512MB fixes the problem. This should not have an impact on smaller LPARs (with 256MB memory), as the firmware will cap the RMA to the memory assigned to the LPAR. Fix is based on input/discussions with Michael Ellerman. Thanks to Praveen K. Pandey for testing on a large system. Reported-by: Praveen K. Pandey Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/kernel/prom_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ab66d1fbadad86b1f4a9c7857e193af0ee0022c Author: Alistair Popple Date: Mon Apr 3 19:51:44 2017 +1000 powerpc/powernv: Introduce address translation services for Nvlink2 Nvlink2 supports address translation services (ATS) allowing devices to request address translations from an mmu known as the nest MMU which is setup to walk the CPU page tables. To access this functionality certain firmware calls are required to setup and manage hardware context tables in the nvlink processing unit (NPU). The NPU also manages forwarding of TLB invalidates (known as address translation shootdowns/ATSDs) to attached devices. This patch exports several methods to allow device drivers to register a process id (PASID/PID) in the hardware tables and to receive notification of when a device should stop issuing address translation requests (ATRs). It also adds a fault handler to allow device drivers to demand fault pages in. Signed-off-by: Alistair Popple [mpe: Fix up comment formatting, use flush_tlb_mm()] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu.h | 6 + arch/powerpc/include/asm/opal-api.h | 5 +- arch/powerpc/include/asm/opal.h | 5 + arch/powerpc/include/asm/powernv.h | 22 ++ arch/powerpc/mm/mmu_context_book3s64.c | 2 + arch/powerpc/platforms/powernv/npu-dma.c | 450 +++++++++++++++++++++++++ arch/powerpc/platforms/powernv/opal-wrappers.S | 3 + arch/powerpc/platforms/powernv/pci-ioda.c | 2 + arch/powerpc/platforms/powernv/pci.h | 15 +- 9 files changed, 508 insertions(+), 2 deletions(-) commit 815429b39d94c64f6d05eed9e7c1a9bdfdd5bd70 Author: Chanwoo Choi Date: Wed Mar 29 19:30:17 2017 +0900 extcon: Add new extcon_register_notifier_all() to monitor all external connectors The extcon core already provides the extcon_register_notifier() function in order to register the notifier block which is used to monitor the state change for the specific external connector such as EXTCON_USB, EXTCON_USB_HOST and so on. The extcon consumer uses the this function. The extcon consumer might need to monitor the all supported external connectors from the extcon device. In this case, The extcon consumer should have each notifier_block structure for each external connector. This patch adds the new extcon_register_notifier_all() function that extcon consumer is able to monitor the state change of all supported external connectors by using only one notifier_block structure. - List of new added functions: int extcon_register_notifier_all(struct extcon_dev *edev, struct notifier_block *nb); int extcon_unregister_notifier_all(struct extcon_dev *edev, struct notifier_block *nb); int devm_extcon_register_notifier_all(struct device *dev, struct extcon_dev *edev, struct notifier_block *nb); void devm_extcon_unregister_notifier_all(struct device *dev, struct extcon_dev *edev, struct notifier_block *nb); Suggested-by: Hans de Goede Signed-off-by: Chanwoo Choi Tested-by: Hans de Goede Acked-by: Hans de Goede drivers/extcon/devres.c | 61 +++++++++++++++++++++++++++++++++++++++++++++ drivers/extcon/extcon.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/extcon/extcon.h | 3 +++ include/linux/extcon.h | 21 ++++++++++++---- 4 files changed, 146 insertions(+), 5 deletions(-) commit f38b37669731632fbee1ea2bd91f39877555bce4 Merge: c8b5d12 f9dc4d1 Author: David S. Miller Date: Mon Apr 3 19:16:38 2017 -0700 Merge branch 'qed-QM-ILT-changes' Yuval Mintz says: ==================== qed: QM & ILT changes This series introduces several changes and improvements to existing queue manager and ILT configurations done during initialization. Notice some of the patches are actually future fixes, I.e., bugs that can't be triggered with exisiting driver but are needed for some future functionality. Patch #1 refactors the configuration of the hardware's queue manager, which is quite messy today. This contains most of the bulk [code-wise] in the series. Patch #2, #3 fix Timers related ILT configurations that are yet to affect qed in existing scenarios. Patch #4 reduces needless ILT lines wasted for RoCE configurations. Patch #5 allows RoCE partitions to manage with less memory regions [important, e.g., for Multi-function parititions with RoCE support]. ==================== Signed-off-by: David S. Miller commit f9dc4d1f0d6f75c102ee13c0a939d9ae880a3c1e Author: Ram Amrani Date: Mon Apr 3 12:21:13 2017 +0300 qed: Manage with less memory regions for RoCE It's possible some configurations would prevent driver from utilizing all the Memory Regions due to a lack of ILT lines. In such a case, calculate how many memory regions would have to be dropped due to limit, and manage without those. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_cxt.c | 113 +++++++++++++++++++++-------- drivers/net/ethernet/qlogic/qed/qed_cxt.h | 15 +++- drivers/net/ethernet/qlogic/qed/qed_dev.c | 33 ++++++++- drivers/net/ethernet/qlogic/qed/qed_main.c | 1 - include/linux/qed/qed_if.h | 1 - 5 files changed, 125 insertions(+), 38 deletions(-) commit 5f8cb033f4c814760c9f7f2345278111d06afe47 Author: Mintz, Yuval Date: Mon Apr 3 12:21:12 2017 +0300 qed: RoCE doesn't need to use SRC As RoCE doesn't need to use the SRC, allocating ILT memory on behalf of RoCE is wasting available ILT lines. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_cxt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 70566b42e94ad7de1328272c4b8454320f794a10 Author: Mintz, Yuval Date: Mon Apr 3 12:21:11 2017 +0300 qed: Correct TM ILT lines in presence of VFs As of today there's no protocol supported that requires support from the TM hardware block and enables SRIOV, but we should still correct the calculation to reflect the lines required for such future VFs instead of changing the PF's own lines. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_cxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44531ba45dbf3c23cc7ae0934ec9b33ef340ac56 Author: Michal Kalderon Date: Mon Apr 3 12:21:10 2017 +0300 qed: Fix TM block ILT allocation When configuring the HW timers block we should set the number of CIDs up until the last CID that require timers, instead of only those CIDs whose protocol needs timers support. Today, the protocols that require HW timers' support have their CIDs before any other protocol, but that would change in future [when we add iWARP support]. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_cxt.c | 32 ++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) commit b5a9ee7cf3be118ad9064583c2a0f10195ca422a Author: Ariel Elior Date: Mon Apr 3 12:21:09 2017 +0300 qed: Revise QM cofiguration Refactor and clean up the queue manager initialization logic. Also, this adds support for RoC low latency queues, which later would be used for improving RoCE latency in high throughput scenarios. Signed-off-by: Ariel Elior Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 43 +- drivers/net/ethernet/qlogic/qed/qed_cxt.c | 13 +- drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 14 +- drivers/net/ethernet/qlogic/qed/qed_dev.c | 749 +++++++++++++++++++++------- drivers/net/ethernet/qlogic/qed/qed_fcoe.c | 8 +- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 11 +- drivers/net/ethernet/qlogic/qed/qed_hw.c | 52 -- drivers/net/ethernet/qlogic/qed/qed_hw.h | 3 - drivers/net/ethernet/qlogic/qed/qed_int.c | 3 +- drivers/net/ethernet/qlogic/qed/qed_iscsi.c | 17 +- drivers/net/ethernet/qlogic/qed/qed_l2.c | 5 +- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 15 +- drivers/net/ethernet/qlogic/qed/qed_roce.c | 12 +- drivers/net/ethernet/qlogic/qed/qed_spq.c | 15 +- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 8 +- 15 files changed, 665 insertions(+), 303 deletions(-) commit c8b5d129ee293bcf972e7279ac996bb8a138505c Author: Greg Ungerer Date: Mon Apr 3 15:50:03 2017 +1000 net: usbnet: support 64bit stats Add support for the net stats64 counters to the usbnet core. With that in place put the hooks into every usbnet driver to use it. This is a strait forward addition of 64bit counters for RX and TX packet and byte counts. It is done in the same style as for the other net drivers that support stats64. Note that the other stats fields remain as 32bit sized values (error counts, etc). The motivation to add this is that it is not particularly difficult to get the RX and TX byte counts to wrap on 32bit platforms. Signed-off-by: Greg Ungerer Acked-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/asix_devices.c | 3 +++ drivers/net/usb/ax88172a.c | 1 + drivers/net/usb/ax88179_178a.c | 1 + drivers/net/usb/cdc_mbim.c | 1 + drivers/net/usb/cdc_ncm.c | 1 + drivers/net/usb/dm9601.c | 1 + drivers/net/usb/int51x1.c | 1 + drivers/net/usb/mcs7830.c | 1 + drivers/net/usb/qmi_wwan.c | 1 + drivers/net/usb/rndis_host.c | 1 + drivers/net/usb/sierra_net.c | 1 + drivers/net/usb/smsc75xx.c | 1 + drivers/net/usb/smsc95xx.c | 1 + drivers/net/usb/sr9700.c | 1 + drivers/net/usb/sr9800.c | 1 + drivers/net/usb/usbnet.c | 55 ++++++++++++++++++++++++++++++++++++--- drivers/net/wireless/rndis_wlan.c | 1 + include/linux/usb/usbnet.h | 4 +++ 18 files changed, 73 insertions(+), 4 deletions(-) commit 822f9bb104c9d1d2dea3669f1941558c6304cf92 Author: Alexey Dobriyan Date: Mon Apr 3 01:18:23 2017 +0300 soreuseport: use "unsigned int" in __reuseport_alloc() Number of sockets is limited by 16-bit, so 64-bit allocation will never happen. 16-bit ops are the worst code density-wise on x86_64 because of additional prefix (66). Space savings: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-3 (-3) function old new delta reuseport_add_sock 539 536 -3 Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller net/core/sock_reuseport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ec2e45a978b05cd9711e804a41b8a5bc829a8650 Author: Alexey Dobriyan Date: Mon Apr 3 00:53:15 2017 +0300 flowcache: more "unsigned int" Make ->hash_count, ->low_watermark and ->high_watermark unsigned int and propagate unsignedness to other variables. This change doesn't change code generation because these fields aren't used in 64-bit contexts but make it anyway: these fields can't be negative numbers. Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller include/net/flowcache.h | 6 +++--- net/core/flow.c | 13 +++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) commit f31cc7e8155f392583a1e3cc2e83ddbc43bacbb3 Author: Alexey Dobriyan Date: Mon Apr 3 00:52:29 2017 +0300 flowcache: make flow_cache_hash_size() return "unsigned int" Hash size can't negative so "unsigned int" is logically correct. Propagate "unsigned int" to loop counters. Space savings: add/remove: 0/0 grow/shrink: 2/2 up/down: 6/-18 (-12) function old new delta flow_cache_flush_tasklet 362 365 +3 __flow_cache_shrink 333 336 +3 flow_cache_cpu_up_prep 178 171 -7 flow_cache_lookup 1159 1148 -11 Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller net/core/flow.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 5a17d9ed9ad702af800f184b13817e056618ba03 Author: Alexey Dobriyan Date: Mon Apr 3 00:51:50 2017 +0300 flowcache: make flow_key_size() return "unsigned int" Flow keys aren't 4GB+ numbers so 64-bit arithmetic is excessive. Space savings (I'm not sure what CSWTCH is): add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-48 (-48) function old new delta flow_cache_lookup 1163 1159 -4 CSWTCH 75997 75953 -44 Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller include/net/flow.h | 2 +- net/core/flow.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit d39004ab136ebb6949a7dda9d24376f3d6209295 Author: Andrew Lunn Date: Sun Apr 2 20:20:47 2017 +0200 net/faraday: Add missing include of of.h Breaking the include loop netdevice.h, dsa.h, devlink.h broke this driver, it depends on includes brought in by these headers. Adding linux/of.h fixes it. Fixes: ed0e39e97d34 ("net: break include loop netdevice.h, dsa.h, devlink.h") Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 1 + 1 file changed, 1 insertion(+) commit f1fb08f6337ca9e3af371a7994b91a5786ba93f9 Author: Vincent Bernat Date: Sun Apr 2 11:00:06 2017 +0200 vxlan: fix ND proxy when skb doesn't have transport header offset When an incoming frame is tagged or when GRO is disabled, the skb handled to vxlan_xmit() doesn't contain a valid transport header offset. This makes ND proxying fail. We combine two changes: replace use of skb_transport_offset() and ensure the necessary amount of skb is linear just before using it: - In vxlan_xmit(), when determining if we have an ICMPv6 neighbor discovery packet, just check if it is an ICMPv6 packet and rely on neigh_reduce() to do more checks if this is the case. The use of pskb_may_pull() is replaced by skb_header_pointer() for just the IPv6 header. - In neigh_reduce(), add pskb_may_pull() for IPv6 header and neighbor discovery message since this was removed from vxlan_xmit(). Replace skb_transport_header() with ipv6_hdr() + 1. - In vxlan_na_create(), replace first skb_transport_offset() with ipv6_hdr() + 1 and second with skb_network_offset() + sizeof(struct ipv6hdr). Additionally, ensure we pskb_may_pull() the whole skb as we need it to iterate over the options. Signed-off-by: Vincent Bernat Signed-off-by: David S. Miller drivers/net/vxlan.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit 0378008a99243fc492e7f0c3aabfeee69a78398c Author: Dmitry Torokhov Date: Sun Feb 19 17:23:47 2017 -0800 Input: eeti_ts - switch to using threaded interrupt Instead of having standard interrupt handler and manually firing work item to perform I2C reads, let's switch to threaded interrupts, which were designed specifically for this purpose. Reviewed-by: Daniel Mack Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/eeti_ts.c | 79 +++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 43 deletions(-) commit 173e4d81f76c948acbb49f3900f3ca3f279c5c2a Author: Dmitry Torokhov Date: Mon Feb 20 23:13:45 2017 -0800 Input: eeti_ts - use gpio_get_value_cansleep We are reading GPIO state in a non-atomic context (workqueue), so we can use "cansleep" variant, and thus make the driver available on systems where GPIO controllers require sleeping when reading GPIO state. Reviewed-by: Daniel Mack Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/eeti_ts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d3884998945cf3f995e9c2e0f157b59f4ec3e86 Author: Dmitry Torokhov Date: Sun Feb 19 17:14:33 2017 -0800 Input: eeti_ts - respect interrupt set in client structure Instead of expecting that GPIO is always interrupt source, let's use interrupt specified in I2C client. Reviewed-by: Daniel Mack Signed-off-by: Dmitry Torokhov arch/arm/mach-pxa/raumfeld.c | 1 + drivers/input/touchscreen/eeti_ts.c | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) commit 6f9fab69a21d47ac68e78a8a5c613a2a6156bbb7 Author: Dmitry Torokhov Date: Fri Feb 17 15:54:22 2017 -0800 Input: eeti_ts - switch to using managed resources Using devm_* APIs simpifies error handling and device teardown. Reviewed-by: Daniel Mack Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/eeti_ts.c | 70 ++++++++++++------------------------- 1 file changed, 22 insertions(+), 48 deletions(-) commit 42e02a6a0db5499d036ff05710fe7370f9a8683a Author: Dmitry Torokhov Date: Mon Feb 20 21:53:51 2017 -0800 Input: eeti_ts - use input_set_capability() Use input_set_capability() instead of manipulating evbit/keybit masks directly. Reviewed-by: Daniel Mack Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/eeti_ts.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e9f66cdb7d5b9c05a76dde4ca5f217ba4af7f333 Author: Dmitry Torokhov Date: Mon Feb 20 21:50:13 2017 -0800 Input: eeti_ts - use get_unaligned_be16() to retrieve data Instead of manually converting big endian data on wire into host endianness, let's use helpers to do that for us. It might save us a few cycles if host endianness matches what's on wire. Reviewed-by: Daniel Mack Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/eeti_ts.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 272c03bb19018a03e50be44b30b4c7485918b8a2 Author: Dmitry Torokhov Date: Mon Feb 20 21:42:43 2017 -0800 Input: eeti_ts - use BIT(n) Use idiomatic BIT(n) to form single-bit masks. Reviewed-by: Daniel Mack Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/eeti_ts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 720bebdff23ed1a9866e737ccdadbf995f6cac7a Author: Dmitry Torokhov Date: Sun Feb 19 17:28:11 2017 -0800 Input: eeti_ts - rename eeti_ts_priv to eeti_ts Also rename 'priv' variables to eeti. Reviewed-by: Daniel Mack Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/eeti_ts.c | 115 ++++++++++++++++++------------------ 1 file changed, 58 insertions(+), 57 deletions(-) commit 54bf08946a4ba0567f6ec063f0e42b276c478bcf Author: Dmitry Torokhov Date: Fri Mar 24 14:21:44 2017 -0700 Input: synaptics-rmi4 - when registering sensors do not call them "drivers" We are not registering drivers, but transport devices (AKA sensors), so let's call them that. Also let's rename "retval" to "error" in probe() functions as the variables are used to store error codes. Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_i2c.c | 51 +++++++++++++++++++++--------------------- drivers/input/rmi4/rmi_smbus.c | 43 +++++++++++++++++------------------ drivers/input/rmi4/rmi_spi.c | 44 +++++++++++++++++++----------------- 3 files changed, 69 insertions(+), 69 deletions(-) commit 8a7c71ae38844948f1e42b3d85ab59868287e413 Author: Dmitry Torokhov Date: Fri Mar 24 12:45:35 2017 -0700 Input: synaptics-rmi4 - cleanup SMbus mapping handling There is no reason to copy structures field-by-filed when we can copy elements at once. Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_smbus.c | 43 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 25 deletions(-) commit 2593cd1189a2a38a17c97abcd847f28f8a4617be Author: Dmitry Torokhov Date: Fri Mar 24 12:34:20 2017 -0700 Input: synaptics-rmi4 - fix endianness issue in SMBus transport The mapping table holds address in LE form, so we should convert it to CPU when comparing it. Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_smbus.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8cf0adf2f8c3f9f30ba4f1b79e051993aea158d7 Author: Dmitry Torokhov Date: Fri Mar 24 14:28:28 2017 -0700 Input: synaptics-rmi4 - fix handling failures from rmi_enable_sensor If rmi_enable_sensor() fails in rmi_driver_probe(), we should not return immediately, but disable IRQs and tear down function list. Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_driver.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit f6c4442bfa0812efbb5d54db01a17a7ba0fc9298 Author: Dmitry Torokhov Date: Fri Mar 24 11:20:38 2017 -0700 Input: synaptics - use u8 instead of unsigned char The rest of the kernel uses u8, u16, etc for data coming form hardware, let's switch ti using u8 here as well. Also turn pkt_type into an enum. Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 60 ++++++++++++++++++++--------------------- drivers/input/mouse/synaptics.h | 22 ++++++++------- 2 files changed, 42 insertions(+), 40 deletions(-) commit 212baf03a30a8fb29ab5f69726bb920ebe3d44a1 Author: Dmitry Torokhov Date: Thu Mar 23 18:38:14 2017 -0700 Input: synaptics - do not abuse -1 as return value Let's stop using -1 as a universal return value and instead propagate errors from underlying calls up the stack. Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 71 ++++++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 25 deletions(-) commit 991d29fe02a767d13275b38d774cf7c35a4f4a44 Author: Dmitry Torokhov Date: Thu Mar 23 14:56:06 2017 -0700 Input: synaptics - use BIT() and GENMASK() macros Use standard infrastructure, such as BIT and GENMASK, instead of rolling bitmasks by hand. Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 6 +-- drivers/input/mouse/synaptics.h | 90 ++++++++++++++++++++--------------------- 2 files changed, 48 insertions(+), 48 deletions(-) commit 2c6ecbba90d4e909bdc8982b4a2318e99d7fc4f2 Author: Dmitry Torokhov Date: Thu Mar 23 17:40:57 2017 -0700 Input: synaptics - add synaptics_query_int() Factor out querying and parsing 3-byte response into an integer value. Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 77 ++++++++++++++++------------------------- drivers/input/mouse/synaptics.h | 3 +- 2 files changed, 32 insertions(+), 48 deletions(-) commit 4c934c7dd60cc60af056b8cc62c39d10ce7ca1c8 Author: Darrick J. Wong Date: Tue Mar 28 14:56:38 2017 -0700 xfs: report realtime space information via the rtbitmap Use the realtime bitmap to return free space information via getfsmap. Eventually this will be superseded by the realtime rmapbt code. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_fsmap.c | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 119 insertions(+), 1 deletion(-) commit a1cae7283d4627a96d092ee7a1f821eb4d9ce7f9 Author: Darrick J. Wong Date: Tue Mar 28 14:56:37 2017 -0700 xfs: have getfsmap fall back to the freesp btrees when rmap is not present If the reverse-mapping btree isn't available, fall back to the free space btrees to provide partial reverse mapping information. The online scrub tool can make use of even partial information to speed up the data block scan. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_fsmap.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 69 insertions(+), 3 deletions(-) commit e89c041338ed6ef2694e6465ca1ba033e0a2978c Author: Darrick J. Wong Date: Tue Mar 28 14:56:37 2017 -0700 xfs: implement the GETFSMAP ioctl Introduce a new ioctl that uses the reverse mapping btree to return information about the physical layout of the filesystem. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_fs.h | 13 + fs/xfs/libxfs/xfs_rmap.c | 28 ++ fs/xfs/libxfs/xfs_rmap.h | 2 + fs/xfs/xfs_fsmap.c | 756 +++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_fsmap.h | 53 ++++ fs/xfs/xfs_ioctl.c | 84 ++++++ fs/xfs/xfs_ioctl32.c | 2 + fs/xfs/xfs_trace.c | 1 + fs/xfs/xfs_trace.h | 84 ++++++ fs/xfs/xfs_trans.c | 22 ++ fs/xfs/xfs_trans.h | 2 + 12 files changed, 1048 insertions(+) commit fb3c3de2f65c007f3ee50538ea131f5c4603c7bc Author: Darrick J. Wong Date: Tue Mar 28 14:56:36 2017 -0700 xfs: add a couple of queries to iterate free extents in the rtbitmap Add _query_range and _query_all functions to the realtime bitmap allocator. These two functions are similar in usage to the btree functions with the same name and will be used for getfsmap and scrub. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_rtbitmap.c | 70 ++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_rtalloc.h | 22 ++++++++++++-- 2 files changed, 90 insertions(+), 2 deletions(-) commit e9a2599a249ed7d31771985aea0e761f5680de64 Author: Darrick J. Wong Date: Tue Mar 28 14:56:35 2017 -0700 xfs: create a function to query all records in a btree Create a helper function that will query all records in a btree. This will be used by the online repair functions to examine every record in a btree to rebuild a second btree. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_alloc.c | 15 +++++++++++++++ fs/xfs/libxfs/xfs_alloc.h | 2 ++ fs/xfs/libxfs/xfs_btree.c | 15 +++++++++++++++ fs/xfs/libxfs/xfs_btree.h | 2 ++ fs/xfs/libxfs/xfs_rmap.c | 28 +++++++++++++++++++++------- fs/xfs/libxfs/xfs_rmap.h | 2 ++ 6 files changed, 57 insertions(+), 7 deletions(-) commit 2d520bfaa28b60401fbfe581f485a0bb952d881c Author: Darrick J. Wong Date: Tue Mar 28 14:56:35 2017 -0700 xfs: provide a query_range function for freespace btrees Implement a query_range function for the bnobt and cntbt. This will be used for getfsmap fallback if there is no rmapbt and by the online scrub and repair code. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_alloc.c | 42 ++++++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_alloc.h | 10 ++++++++++ 2 files changed, 52 insertions(+) commit 08438b1e386b7899e8a2ffef59d6ebf29aac530f Author: Darrick J. Wong Date: Tue Mar 28 14:56:34 2017 -0700 xfs: plumb in needed functions for range querying of the freespace btrees Plumb in the pieces (init_high_key, diff_two_keys) necessary to call query_range on the free space btrees. Remove the debugging asserts so that we can make queries starting from block 0. While we're at it, merge the redundant "if (btnum ==" hunks. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_alloc_btree.c | 172 ++++++++++++++++++++++++++++++---------- 1 file changed, 129 insertions(+), 43 deletions(-) commit 80c9f490f344be7999f57fc31a8ed956f8c65f3b Author: Darrick J. Wong Date: Tue Mar 28 14:56:34 2017 -0700 vfs: add common GETFSMAP ioctl definitions Add the GETFSMAP headers to the VFS kernel headers Signed-off-by: Darrick J. Wong include/uapi/linux/fsmap.h | 112 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) commit be6324c00c4d1e0e665f03ed1fc18863a88da119 Author: Darrick J. Wong Date: Mon Apr 3 15:17:57 2017 -0700 xfs: fix over-copying of getbmap parameters from userspace In xfs_ioc_getbmap, we should only copy the fields of struct getbmap from userspace, or else we end up copying random stack contents into the kernel. struct getbmap is a strict subset of getbmapx, so a partial structure copy should work fine. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_ioctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 422e5b53ed83dd71c1eac276c6ec7f7c6e81ce8d Author: Nikolay Borisov Date: Tue Mar 28 14:55:15 2017 -0700 xfs: Remove obsolete declaration of xfs_buf_get_empty This function has been removed ever since at least 3.12-era. No need to keep its declaration in the header so nuke it. Signed-off-by: Nikolay Borisov Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf.h | 1 - 1 file changed, 1 deletion(-) commit bc593eebfd66838a3022ac92782665fbcafc412e Author: Eric Sandeen Date: Tue Mar 28 14:54:29 2017 -0700 xfs: fix up inode validation failure message "xfs_iread: validation failed for inode 96 failed" One "failed" seems like enough. Signed-off-by: Eric Sandeen Reviewed-by: Alex Elder Reviewed-by: Bill O'Donnell Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_inode_buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63fbb4c18d6b04d5f376326395cddf6c2de2c965 Author: Christoph Hellwig Date: Tue Mar 28 14:53:36 2017 -0700 xfs: remove the ISUNWRITTEN macro Opencoding the trivial checks makes it much easier to read (and grep..). Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap_btree.h | 1 - fs/xfs/xfs_aops.c | 4 ++-- fs/xfs/xfs_iomap.c | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) commit 9c4f29d39168bb9363189f0d54ee1202372e7d9b Author: Christoph Hellwig Date: Tue Mar 28 14:53:35 2017 -0700 xfs: factor out a xfs_bmap_is_real_extent helper This checks for all the non-normal extent types, including handling both encodings of delayed allocations. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.h | 12 ++++++++++++ fs/xfs/xfs_aops.c | 4 +--- fs/xfs/xfs_bmap_util.c | 7 +++---- fs/xfs/xfs_reflink.c | 21 ++++----------------- 4 files changed, 20 insertions(+), 24 deletions(-) commit 696a562072e3c14bcd13ae5acc19cdf27679e865 Author: Brian Foster Date: Tue Mar 28 14:51:44 2017 -0700 xfs: use dedicated log worker wq to avoid deadlock with cil wq The log covering background task used to be part of the xfssyncd workqueue. That workqueue was removed as of commit 5889608df ("xfs: syncd workqueue is no more") and the associated work item scheduled to the xfs-log wq. The latter is used for log buffer I/O completion. Since xfs_log_worker() can invoke a log flush, a deadlock is possible between the xfs-log and xfs-cil workqueues. Consider the following codepath from xfs_log_worker(): xfs_log_worker() xfs_log_force() _xfs_log_force() xlog_cil_force() xlog_cil_force_lsn() xlog_cil_push_now() flush_work() The above is in xfs-log wq context and blocked waiting on the completion of an xfs-cil work item. Concurrently, the cil push in progress can end up blocked here: xlog_cil_push_work() xlog_cil_push() xlog_write() xlog_state_get_iclog_space() xlog_wait(&log->l_flush_wait, ...) The above is in xfs-cil context waiting on log buffer I/O completion, which executes in xfs-log wq context. In this scenario both workqueues are deadlocked waiting on eachother. Add a new workqueue specifically for the high level log covering and ail pushing worker, as was the case prior to commit 5889608df. Diagnosed-by: David Jeffery Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 2 +- fs/xfs/xfs_mount.h | 1 + fs/xfs/xfs_super.c | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) commit f1c0e20243baca1194fccfdf0111831bee12647c Author: Darrick J. Wong Date: Mon Apr 3 15:17:53 2017 -0700 xfs: fix kernel memory exposure problems Fix a memory exposure problems in inumbers where we allocate an array of structures with holes, fail to zero the holes, then blindly copy the kernel memory contents (junk and all) into userspace. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_itable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 105664df51648d6376bda2895a890e786d0426ee Author: Calvin Owens Date: Fri Mar 31 07:57:55 2017 -0700 xfs: Honor FALLOC_FL_KEEP_SIZE when punching ends of files When punching past EOF on XFS, fallocate(mode=PUNCH_HOLE|KEEP_SIZE) will round the file size up to the nearest multiple of PAGE_SIZE: calvinow@vm-disks/generic-xfs-1 ~$ dd if=/dev/urandom of=test bs=2048 count=1 calvinow@vm-disks/generic-xfs-1 ~$ stat test Size: 2048 Blocks: 8 IO Block: 4096 regular file calvinow@vm-disks/generic-xfs-1 ~$ fallocate -n -l 2048 -o 2048 -p test calvinow@vm-disks/generic-xfs-1 ~$ stat test Size: 4096 Blocks: 8 IO Block: 4096 regular file Commit 3c2bdc912a1cc050 ("xfs: kill xfs_zero_remaining_bytes") replaced xfs_zero_remaining_bytes() with calls to iomap helpers. The new helpers don't enforce that [pos,offset) lies strictly on [0,i_size) when being called from xfs_free_file_space(), so by "leaking" these ranges into xfs_zero_range() we get this buggy behavior. Fix this by reintroducing the checks xfs_zero_remaining_bytes() did against i_size at the bottom of xfs_free_file_space(). Reported-by: Aaron Gao Fixes: 3c2bdc912a1cc050 ("xfs: kill xfs_zero_remaining_bytes") Cc: Christoph Hellwig Cc: Brian Foster Cc: # 4.8+ Signed-off-by: Calvin Owens Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit d229d48d183fbc1391908decc7d2bcf09ca2f38f Author: Xin Long Date: Sat Apr 1 17:07:46 2017 +0800 sctp: add SCTP_PR_STREAM_STATUS sockopt for prsctp Before when implementing sctp prsctp, SCTP_PR_STREAM_STATUS wasn't added, as it needs to save abandoned_(un)sent for every stream. After sctp stream reconf is added in sctp, assoc has structure sctp_stream_out to save per stream info. This patch is to add SCTP_PR_STREAM_STATUS by putting the prsctp per stream statistics into sctp_stream_out. v1->v2: fix an indent issue. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/structs.h | 2 ++ include/uapi/linux/sctp.h | 1 + net/sctp/chunk.c | 14 +++++++++-- net/sctp/outqueue.c | 10 ++++++++ net/sctp/socket.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 84 insertions(+), 2 deletions(-) commit cdccf74b9501207b9d299afe2825a311d461a318 Merge: d4f4b91 b4957ab Author: David S. Miller Date: Mon Apr 3 14:48:45 2017 -0700 Merge branch 'hns-misc-fixes' Salil Mehta says: ==================== net: hns: Misc. HNS Bug Fixes & Code Improvements This patch set introduces various HNS bug fixes, optimizations and code improvements. ==================== Signed-off-by: David S. Miller commit b4957ab0826f6f7efdfdc648521e1c4c3fc6ceda Author: Salil Date: Sat Apr 1 12:03:48 2017 +0100 net: hns: Some checkpatch.pl script & warning fixes This patch fixes some checkpatch.pl script caught errors and warnings during the compilation time. Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hnae.h | 1 - drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 11 +++++------ drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h | 2 +- drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 1 - drivers/net/ethernet/hisilicon/hns/hns_enet.c | 9 +++++---- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 1 - 6 files changed, 11 insertions(+), 14 deletions(-) commit 820c90cb3e2e452c80824391953cab9d5b5af154 Author: lipeng Date: Sat Apr 1 12:03:47 2017 +0100 net: hns: Avoid Hip06 chip TX packet line bug There is a bug on Hip06 that tx ring interrupts packets count will be clear when drivers send data to tx ring, so that the tx packets count will never upgrade to packets line, and cause the interrupts engendered was delayed. Sometimes, it will cause sending performance lower than expected. To fix this bug, we set tx ring interrupts packets line to 1 forever, to avoid count clear. And set the gap time to 20us, to solve the problem that too many interrupts engendered when packets line is 1. This patch could advance the send performance on ARM from 6.6G to 9.37G when an iperf send thread on ARM and an iperf send thread on X86 for XGE. Signed-off-by: lipeng Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hnae.c | 5 ++ drivers/net/ethernet/hisilicon/hns/hnae.h | 6 +- drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 78 ++++++++++++----- drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 101 ++++++++++++++++------ drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h | 23 ++++- drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 2 +- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 24 +++-- 7 files changed, 169 insertions(+), 70 deletions(-) commit 76b588bc523bee796834ebd319f6a71ad3eddbae Author: Kejian Yan Date: Sat Apr 1 12:03:46 2017 +0100 net: hns: Adjust the SBM module buffer threshold HNS needs SMB Buffers to store at least two packets after sending pause frame because of the link delay. The MTU of HNS is 9728. As the processor user manual described, the SBM buffer threshold should be modified. Reported-by: Ping Zhang Signed-off-by: Kejian Yan Reviewed-by: Salil Mehta Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a2185587ade79b9649639721aa21c4cefc1aea6b Author: Kejian Yan Date: Sat Apr 1 12:03:45 2017 +0100 net: hns: Simplify the exception sequence in hns_ppe_init() We need to free all ppe submodule if it fails to initialize ppe by any fault, so this patch will free all ppe resource before hns_ppe_init() returns exception situation Reported-by: JinchuanTian Signed-off-by: Kejian Yan Reviewed-by: Salil Mehta Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit d592a4a4b9f2727efd8d7718bb5c9ae0d03614bd Author: Kejian Yan Date: Sat Apr 1 12:03:44 2017 +0100 net: hns: Optimise the code in hns_mdio_wait_ready() This patch fixes the code to clear pclint warning/info. Reported-by: Ping Zhang Signed-off-by: Kejian Yan Reviewed-by: Salil Mehta Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns_mdio.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 6961acfa5c2b34d421f8a48780efc1779cad73e4 Author: Kejian Yan Date: Sat Apr 1 12:03:43 2017 +0100 net: hns: Clean redundant code from hns_mdio.c file This patch cleans the redundant code from hns_mdio.c. Reported-by: Ping Zhang Signed-off-by: Kejian Yan Reviewed-by: Salil Mehta Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns_mdio.c | 10 ---------- 1 file changed, 10 deletions(-) commit 9f1607b8b53ef4e706e606ab20fff5496e005151 Author: Kejian Yan Date: Sat Apr 1 12:03:42 2017 +0100 net: hns: Remove redundant mac table operations This patch removes redundant functions used only for debugging purposes. Reported-by: Weiwei Deng Signed-off-by: Kejian Yan Reviewed-by: Salil Mehta Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 160 --------------------- drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h | 10 -- 2 files changed, 170 deletions(-) commit 20f0d4f736b7732709b8b9b25be6d88dcc3b48d3 Author: Kejian Yan Date: Sat Apr 1 12:03:41 2017 +0100 net: hns: Remove redundant mac_get_id() There is a mac_id in mac control block structure, so the callback function mac_get_id() is useless. Here we remove this function. Reported-by: Weiwei Deng Signed-off-by: Kejian Yan Reviewed-by: Salil Mehta Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 8 -------- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.h | 2 -- drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c | 13 ------------- 3 files changed, 23 deletions(-) commit 040a3800aac0ca0f40a09ca751a037239f93896b Author: Kejian Yan Date: Sat Apr 1 12:03:40 2017 +0100 net: hns: Remove the redundant adding and deleting mac function The functions (hns_dsaf_set_mac_mc_entry() and hns_mac_del_mac()) are not called by any functions. They are dead code in hns. And the same features are implemented by the patch (the id is 66355f5). Reported-by: Weiwei Deng Signed-off-by: Kejian Yan Reviewed-by: Salil Mehta Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 38 ---------- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.h | 1 - drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 81 ---------------------- drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h | 2 - 4 files changed, 122 deletions(-) commit 64ec10dc2ab8ef5bc6e76b1d4bc8203c08a6da1e Author: lipeng Date: Sat Apr 1 12:03:39 2017 +0100 net: hns: Correct HNS RSS key set function This patch fixes below ethtool configuration error: localhost:~ # ethtool -X eth0 hkey XX:XX:XX... Cannot set Rx flow hash configuration: Operation not supported Signed-off-by: lipeng Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 23 ++++++++++++++--------- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 9 ++++----- 2 files changed, 18 insertions(+), 14 deletions(-) commit f2aaed557ecff57f7523f889acf1981fb23c4047 Author: lipeng Date: Sat Apr 1 12:03:38 2017 +0100 net: hns: Replace netif_tx_lock to ring spin lock netif_tx_lock is a global spin lock, it will take affect in all rings in the netdevice. In tx_poll_one process, it can only lock the current ring, in this case, we define a spin lock in hnae_ring struct for it. Signed-off-by: lipeng reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hnae.c | 1 + drivers/net/ethernet/hisilicon/hns/hnae.h | 3 +++ drivers/net/ethernet/hisilicon/hns/hns_enet.c | 21 +++++++++++---------- 3 files changed, 15 insertions(+), 10 deletions(-) commit b29bd41259f38fc1a22735cd69b374a75d6a213c Author: lipeng Date: Sat Apr 1 12:03:37 2017 +0100 net: hns: Fix to adjust buf_size of ring according to mtu Because buf_size of ring set to 2048, the process of rx_poll_one can reuse the page, therefore the performance of XGE can improve. But the chip only supports three bds in one package, so the max mtu is 6K when it sets to 2048. For better performane in litter mtu, we need change buf_size according to mtu. When user change mtu, hns is only change the desc in memory. There are some desc has been fetched by the chip, these desc can not be changed by the code. So it needs set the port loopback and send some packages to let the chip consumes the wrong desc and fetch new desc. Because the Pv660 do not support rss indirection, we need add version check in mtu change process. Signed-off-by: lipeng reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hnae.h | 37 ++++ drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 26 ++- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 3 +- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.h | 2 +- drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 41 +++- drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h | 3 + drivers/net/ethernet/hisilicon/hns/hns_enet.c | 249 +++++++++++++++++++++- 7 files changed, 337 insertions(+), 24 deletions(-) commit 36eedfde1a3602e8054c16bc295c47764647a208 Author: lipeng Date: Sat Apr 1 12:03:36 2017 +0100 net: hns: Optimize hns_nic_common_poll for better performance After polling less than buget packages, we need check again. If there are still some packages, we call napi_schedule add softirq queue, this is not better way. So we return buget value instead of napi_schedule. Signed-off-by: lipeng reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_enet.c | 50 ++++++++++++++++----------- drivers/net/ethernet/hisilicon/hns/hns_enet.h | 2 +- 2 files changed, 31 insertions(+), 21 deletions(-) commit 4b7cdecaa441bc296a507371766109624c177ec0 Author: Daode Huang Date: Sat Apr 1 12:03:35 2017 +0100 net: hns: bug fix of ethtool show the speed When run ethtool ethX on hns driver, the speed will show as "Unknown". The base.speed is not correct assigned, this patch fix this bug. Signed-off-by: Daode Huang Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb0672d11634dd072bfb66a0b546b4fc592f4158 Author: lipeng Date: Sat Apr 1 12:03:34 2017 +0100 net: hns: Remove redundant memset during buffer release Because all members of desc_cb is assigned when xmit one package, so it can delete in hnae_free_buffer, as follows: - "dma, priv, length, type" are assigned in fill_v2_desc. - "page_offset, reuse_flag, buf" are not used in tx direction. Signed-off-by: lipeng Signed-off-by: Weiwei Deng Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hnae.c | 1 - 1 file changed, 1 deletion(-) commit de99208cc7ceb964ea4e912000f2102f927f75ea Author: lipeng Date: Sat Apr 1 12:03:33 2017 +0100 net: hns: Optimize the code for GMAC pad and crc Config This patch optimises the init configuration code leg for gmac pad and crc set interface. Signed-off-by: lipeng Signed-off-by: JinchuanTian Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 36 ++++++++++------------ 1 file changed, 16 insertions(+), 20 deletions(-) commit 87ff7e1f460d709100cf5203738d62629ab6949b Author: lipeng Date: Sat Apr 1 12:03:32 2017 +0100 net: hns: Modify GMAC init TX threshold value This patch reduces GMAC TX threshold value to avoid gmac hang-up with speed 100M/duplex half. Signed-off-by: lipeng Signed-off-by: JinchuanTian Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 6 ++++++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 4 ++++ 2 files changed, 10 insertions(+) commit ba2d079131b494fca98cba37a5356e596a7501a6 Author: lipeng Date: Sat Apr 1 12:03:31 2017 +0100 net: hns: Fix the implementation of irq affinity function This patch fixes the implementation of the IRQ affinity function. This function is used to create the cpu mask which eventually is used to initialize the cpu<->queue association for XPS(Transmit Packet Steering). Signed-off-by: lipeng Signed-off-by: Kejian Yan Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_enet.c | 75 +++++++++++---------------- drivers/net/ethernet/hisilicon/hns/hns_enet.h | 1 + 2 files changed, 30 insertions(+), 46 deletions(-) commit 55021718b9e9d21efd47117dd0e6c1cfebd654f8 Author: Shawn Lin Date: Mon Mar 20 17:39:40 2017 +0800 PCI: rockchip: Advertise 128-byte Read Completion Boundary support Rockchip Root Ports support either 64 or 128 byte Read Completion Boundary (RCB). Set the RCB bit in the Link Control register to indicate this. A 128 byte RCB significantly improves performance of NVMe with libaio. [bhelgaas: changelog] Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas Cc: Brian Norris Cc: Jeffy Chen drivers/pci/host/pcie-rockchip.c | 5 +++++ 1 file changed, 5 insertions(+) commit f65fd1aa4f9881d5540192d11f7b8ed2fec936db Author: Sasha Neftin Date: Mon Apr 3 16:02:50 2017 -0500 PCI: Avoid FLR for Intel 82579 NICs Per Intel Specification Update 335553-002 (see link below), some 82579 network adapters advertise a Function Level Reset (FLR) capability, but they can hang when an FLR is triggered. To reproduce the problem, attach the device to a VM, then detach and try to attach again. Add a quirk to prevent the use of FLR on these devices. [bhelgaas: changelog, comments] Link: http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/82579lm-82579v-gigabit-network-connection-spec-update.pdf Signed-off-by: Sasha Neftin Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 6 ++++++ drivers/pci/quirks.c | 8 ++++++++ include/linux/pci.h | 2 ++ 3 files changed, 16 insertions(+) commit 08eff49d63ca2bf4cd98c4bdc07dc9d07d52f8f5 Author: Jiandi An Date: Fri Mar 24 04:55:45 2017 -0500 tpm/tpm_crb: Enable TPM CRB interface for ARM64 This enables TPM Command Response Buffer interface driver for ARM64 and implements an ARM specific TPM CRB start method that invokes a Secure Monitor Call (SMC) to request the TrustZone Firmware to execute or cancel a TPM 2.0 command. In ARM, TrustZone security extensions enable a secure software environment with Secure Monitor mode. A Secure Monitor Call (SMC) is used to enter the Secure Monitor mode and perform a Secure Monitor service to communicate with TrustZone firmware which has control over the TPM hardware. Signed-off-by: Jiandi An Tested-by: Shanker Donthineni Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen (on x86/PTT) Signed-off-by: Jarkko Sakkinen drivers/char/tpm/Kconfig | 2 +- drivers/char/tpm/tpm_crb.c | 67 ++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 66 insertions(+), 3 deletions(-) commit cf8252ca7ca76fa47acf29b717bd52b738538c1e Author: Jiandi An Date: Fri Mar 24 04:55:44 2017 -0500 ACPICA: Update TPM2 ACPI table TCG ACPI Specification Family "1.2" and "2.0" Version 1.2 Revision 8 introduces new start method for ARM SMC. - Add new start method (type 11) for ARM SMC - Add start method specific parameters offset for ARM SMC start method Signed-off-by: Jiandi An Tested-by: Shanker Donthineni Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen (on x86/PTT) Signed-off-by: Jarkko Sakkinen include/acpi/actbl2.h | 3 +++ 1 file changed, 3 insertions(+) commit 877c57d0d0cac2c8fc661f708d8ee3fa7aa8d28b Author: Jarkko Sakkinen Date: Fri Mar 24 11:45:49 2017 +0200 tpm_crb: request and relinquish locality 0 This commit adds support for requesting and relinquishing locality 0 in tpm_crb for the course of command transmission. In order to achieve this, two new callbacks are added to struct tpm_class_ops: - request_locality - relinquish_locality With CRB interface you first set either requestAccess or relinquish bit from TPM_LOC_CTRL_x register and then wait for locAssigned and tpmRegValidSts bits to be set in the TPM_LOC_STATE_x register. The reason why were are doing this is to make sure that the driver will work properly with Intel TXT that uses locality 2. There's no explicit guarantee that it would relinquish this locality. In more general sense this commit enables tpm_crb to be a well behaving citizen in a multi locality environment. Signed-off-by: Jarkko Sakkinen Reviewed-by: Jerry Snitselaar Tested-by: Jerry Snitselaar drivers/char/tpm/tpm-chip.c | 1 + drivers/char/tpm/tpm-interface.c | 16 ++++++++++++++++ drivers/char/tpm/tpm.h | 3 +++ drivers/char/tpm/tpm_crb.c | 41 ++++++++++++++++++++++++++++++++++++++++ include/linux/tpm.h | 3 ++- 5 files changed, 63 insertions(+), 1 deletion(-) commit 84d25940678b7f93665d0964c9729680fa4a97e9 Author: Jerry Snitselaar Date: Sat Mar 18 01:59:57 2017 -0700 tpm: make check_locality return bool Since check_locality is checking to see if a certain locality is active, return true if active otherwise return false. Cc: Christophe Ricard Cc: Jason Gunthorpe Cc: Marcel Selhorst Cc: Jarkko Sakkinen Cc: Peter Huewe Signed-off-by: Jerry Snitselaar Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/st33zp24/st33zp24.c | 12 ++++++------ drivers/char/tpm/tpm_i2c_infineon.c | 12 ++++++------ drivers/char/tpm/tpm_tis_core.c | 20 +++++++++++--------- 3 files changed, 23 insertions(+), 21 deletions(-) commit 67c2f3d388efe1a47e201b906d80545eaab7da22 Author: Jérémy Lefaure Date: Thu Mar 16 21:51:33 2017 -0400 tpm/tpm_crb: fix unused warnings on suspend/resume functions When PM_SLEEP is disabled crb_pm_suspend and crb_pm_resume are not used by SET_SYSTEM_SLEEP_PM_OPS even if PM is enabled: drvers/char/tpm/tpm_crb.c:540:12: warning: ‘crb_pm_suspend’ defined but not used [-Wunused-function] static int crb_pm_suspend(struct device *dev) ^ drivers/char/tpm/tpm_crb.c:551:12: warning: ‘crb_pm_resume’ defined but not used [-Wunused-function] static int crb_pm_resume(struct device *dev) ^ The preprocessor condition should be on CONFIG_PM_SLEEP, not on CONFIG_PM. However, this patch fixes this warning by using __maybe_unused on function that are in the preprocessor condition. Fixes: 848efcfb560c ("tpm/tpm_crb: enter the low power state upon device suspend") Signed-off-by: Jérémy Lefaure Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 0afb7118ae021e80ecf70f5a3336e0935505518a Author: Nayna Jain Date: Fri Mar 10 13:45:54 2017 -0500 tpm: add sleep only for retry in i2c_nuvoton_write_status() Currently, there is an unnecessary 1 msec delay added in i2c_nuvoton_write_status() for the successful case. This function is called multiple times during send() and recv(), which implies adding multiple extra delays for every TPM operation. This patch calls usleep_range() only if retry is to be done. Signed-off-by: Nayna Jain Cc: stable@vger.kernel.org (linux-4.8) Reviewed-by: Mimi Zohar Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_i2c_nuvoton.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 2d2e376f05f23f46ff7138a6c3f1df7a6f9a96a4 Author: Andy Shevchenko Date: Wed Mar 15 21:58:00 2017 +0200 tpm/st33zp24: Add GPIO ACPI mapping table In order to make GPIO ACPI library stricter prepare users of gpiod_get_index() to correctly behave when there no mapping is provided by firmware. Here we add explicit mapping between _CRS GpioIo() resources and their names used in the driver. Signed-off-by: Andy Shevchenko Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/st33zp24/i2c.c | 23 ++++++++++++++++++++--- drivers/char/tpm/st33zp24/spi.c | 23 ++++++++++++++++++++--- 2 files changed, 40 insertions(+), 6 deletions(-) commit 31574d321c70f6d3b40fe98f9b2eafd9a903fef9 Author: Hon Ching \(Vicky\) Lo Date: Wed Mar 15 01:28:07 2017 -0400 vTPM: Fix missing NULL check The current code passes the address of tpm_chip as the argument to dev_get_drvdata() without prior NULL check in tpm_ibmvtpm_get_desired_dma. This resulted an oops during kernel boot when vTPM is enabled in Power partition configured in active memory sharing mode. The vio_driver's get_desired_dma() is called before the probe(), which for vtpm is tpm_ibmvtpm_probe, and it's this latter function that initializes the driver and set data. Attempting to get data before the probe() caused the problem. This patch adds a NULL check to the tpm_ibmvtpm_get_desired_dma. fixes: 9e0d39d8a6a0 ("tpm: Remove useless priv field in struct tpm_vendor_specific") Cc: Signed-off-by: Hon Ching(Vicky) Lo Reviewed-by: Jarkko Sakkine Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_ibmvtpm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 8569defde8057258835c51ce01a33de82e14b148 Author: Jerry Snitselaar Date: Fri Mar 10 17:46:04 2017 -0700 tpm_crb: check for bad response size Make sure size of response buffer is at least 6 bytes, or we will underflow and pass large size_t to memcpy_fromio(). This was encountered while testing earlier version of locality patchset. Cc: stable@vger.kernel.org Fixes: 30fc8d138e912 ("tpm: TPM 2.0 CRB Interface") Signed-off-by: Jerry Snitselaar Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4d57856a21ed2abe33412e0526cc84bdcf67ea08 Author: James Bottomley Date: Tue Jan 31 15:47:31 2017 -0800 tpm2: add session handle context saving and restoring to the space code Sessions are different from transient objects in that their handles may not be virtualized (because they're used for some hmac calculations). Additionally when a session is context saved, a vestigial memory remains in the TPM and if it is also flushed, that will be lost and the session context will refuse to load next time, so the code is updated to flush only transient objects after a context save. Add a separate array (chip->session_tbl) to save and restore sessions by handle. Use the failure of a context save or load to signal that the session has been flushed from the TPM and we can remove its memory from chip->session_tbl. Sessions are also isolated during each instance of a tpm space. This means that spaces shouldn't be able to see each other's sessions and is enforced by ensuring that a space user may only refer to sessions handles that are present in their own chip->session_tbl. Finally when a space is closed, all the sessions belonging to it should be flushed so the handles may be re-used by other spaces. Note that if we get a session save or load error, all sessions are effectively flushed. Even though we restore the session buffer, all the old sessions will refuse to load after the flush and they'll be purged from our session memory. This means that while transient context handling is still soft in the face of errors, session handling is hard (any failure of the model means all sessions are lost). Fixes-from: Colin Ian King Signed-off-by: James Bottomley Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-chip.c | 8 ++- drivers/char/tpm/tpm.h | 4 +- drivers/char/tpm/tpm2-space.c | 115 ++++++++++++++++++++++++++++++++++++++---- drivers/char/tpm/tpmrm-dev.c | 2 +- 4 files changed, 116 insertions(+), 13 deletions(-) commit fdc915f7f71939ad5a3dda3389b8d2d7a7c5ee66 Author: James Bottomley Date: Tue Jan 3 09:07:32 2017 -0800 tpm: expose spaces via a device link /dev/tpmrm Currently the tpm spaces are not exposed to userspace. Make this exposure via a separate device, which can now be opened multiple times because each read/write transaction goes separately via the space. Concurrency is protected by the chip->tpm_mutex for each read/write transaction separately. The TPM is cleared of all transient objects by the time the mutex is dropped, so there should be no interference between the kernel and userspace. Signed-off-by: James Bottomley Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/Makefile | 3 +- drivers/char/tpm/tpm-chip.c | 58 ++++++++++++++++++++++++++++++++++- drivers/char/tpm/tpm-interface.c | 13 ++++++-- drivers/char/tpm/tpm.h | 4 +++ drivers/char/tpm/tpmrm-dev.c | 65 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 139 insertions(+), 4 deletions(-) commit 25a85bed36f7da4e411f8744c2962e4e1003d7ea Author: Fabrice Gasnier Date: Fri Mar 31 14:32:38 2017 +0200 iio: adc: stm32: add dt option to set resolution stm32 adc supports several resolution. Add 'assigned-resolution-bits' dt optional property to set it. Default to maximum resolution in case it isn't set. Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc.c | 50 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) commit ecb38e2f521b01f0fd0b0a3261921b0bcc002dd0 Author: James Bottomley Date: Tue Jan 10 19:08:53 2017 -0800 tpm: split out tpm-dev.c into tpm-dev.c and tpm-common-dev.c Signed-off-by: James Bottomley Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/Makefile | 2 +- drivers/char/tpm/tpm-dev-common.c | 148 ++++++++++++++++++++++++++++++++++++++ drivers/char/tpm/tpm-dev.c | 143 ++++-------------------------------- drivers/char/tpm/tpm-dev.h | 27 +++++++ 4 files changed, 190 insertions(+), 130 deletions(-) commit 745b361e989af21ad40811c2586b60229f870a68 Author: Jarkko Sakkinen Date: Fri Jan 6 14:03:45 2017 +0200 tpm: infrastructure for TPM spaces Added an ability to virtualize TPM commands into an isolated context that we call a TPM space because the word context is already heavily used in the TPM specification. Both the handle areas and bodies (where necessary) are virtualized. The mechanism works by adding a new parameter struct tpm_space to the tpm_transmit() function. This new structure contains the list of virtual handles and a buffer of page size (currently) for backing storage. When tpm_transmit() is called with a struct tpm_space instance it will execute the following sequence: 1. Take locks. 2. Load transient objects from the backing storage by using ContextLoad and map virtual handles to physical handles. 3. Perform the transaction. 4. Save transient objects to backing storage by using ContextSave and map resulting physical handle to virtual handle if there is such. This commit does not implement virtualization support for hmac and policy sessions. Signed-off-by: Jarkko Sakkinen Tested-by: James Bottomley Reviewed-by: James Bottomley drivers/char/tpm/Makefile | 2 +- drivers/char/tpm/tpm-chip.c | 7 + drivers/char/tpm/tpm-dev.c | 2 +- drivers/char/tpm/tpm-interface.c | 77 ++++--- drivers/char/tpm/tpm-sysfs.c | 2 +- drivers/char/tpm/tpm.h | 26 ++- drivers/char/tpm/tpm2-cmd.c | 33 +-- drivers/char/tpm/tpm2-space.c | 431 +++++++++++++++++++++++++++++++++++++++ 8 files changed, 527 insertions(+), 53 deletions(-) commit 58472f5cd4f6ff02488c8da3cdbf719e9dd21e48 Author: Jarkko Sakkinen Date: Thu Nov 10 20:42:07 2016 -0800 tpm: validate TPM 2.0 commands Check for every TPM 2.0 command that the command code is supported and the command buffer has at least the length that can contain the header and the handle area. For ContextSave and FlushContext we mark the body to be part of the handle area. This gives validation for these commands at zero cost, including the body of the command. The more important reason for this is that we can virtualize these commands in the same way as you would virtualize the handle area of a command. Signed-off-by: Jarkko Sakkinen Tested-by: James Bottomley Reviewed-by: James Bottomley drivers/char/tpm/tpm-interface.c | 38 +++++++++++++++++- drivers/char/tpm/tpm.h | 15 +++++++ drivers/char/tpm/tpm2-cmd.c | 84 ++++++++++++++++++++++++++++++++++++++-- 3 files changed, 132 insertions(+), 5 deletions(-) commit 9aa36b399a50bf8a1c9dae33c25164afae14e1e3 Author: Jarkko Sakkinen Date: Sat Nov 26 13:39:35 2016 +0200 tpm: export tpm2_flush_context_cmd Signed-off-by: Jarkko Sakkinen Tested-by: James Bottomley Reviewed-by: James Bottomley drivers/char/tpm/tpm.h | 2 ++ drivers/char/tpm/tpm2-cmd.c | 62 +++++++++++++++++++++------------------------ 2 files changed, 31 insertions(+), 33 deletions(-) commit a147918e79c3a239be59358af659ea9f0959538b Author: Jarkko Sakkinen Date: Tue Feb 14 21:57:42 2017 +0200 tpm: move length validation to tpm_transmit() Check that the length matches the length reported by the response header already in tpm_transmit() to improve validation. Signed-off-by: Jarkko Sakkinen Tested-by: James Bottomley Reviewed-by: James Bottomley drivers/char/tpm/tpm-interface.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 38eb24ebb01f875f812aa869c4cd62959510111c Author: Jarkko Sakkinen Date: Wed Feb 8 13:11:36 2017 +0200 tpm_crb: encapsulate crb_wait_for_reg_32 Encapsulated crb_wait_for_reg32() so that state changes in other CRB registers than TPM_CRB_CTRL_REQ_x can be waited. Signed-off-by: Jarkko Sakkinen Reviewed-by: Jerry Snitselaar Tested-by: Gang Wei drivers/char/tpm/tpm_crb.c | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) commit 13b1f4a571cc1ffe9c7d5bb894318cabdd81fcc2 Author: Jarkko Sakkinen Date: Wed Feb 8 13:11:35 2017 +0200 tpm_crb: map locality registers In order to provide access to locality registers, this commits adds mapping of the head of the CRB registers, which are located right before the control area. Signed-off-by: Jarkko Sakkinen Reviewed-by: Jerry Snitselaar Tested-by: Gang Wei drivers/char/tpm/tpm_crb.c | 89 +++++++++++++++++++++++++++++----------------- 1 file changed, 57 insertions(+), 32 deletions(-) commit 5cc0101d1f88500f8901d01b035af743215d4c3a Author: Peter Huewe Date: Thu Mar 2 13:03:15 2017 +0000 tpm_tis_spi: Add small delay after last transfer Testing the implementation with a Raspberry Pi 2 showed that under some circumstances its SPI master erroneously releases the CS line before the transfer is complete, i.e. before the end of the last clock. In this case the TPM ignores the transfer and misses for example the GO command. The driver is unable to detect this communication problem and will wait for a command response that is never going to arrive, timing out eventually. As a workaround, the small delay ensures that the CS line is held long enough, even with a faulty SPI master. Other SPI masters are not affected, except for a negligible performance penalty. Cc: Fixes: 0edbfea537d1 ("tpm/tpm_tis_spi: Add support for spi phy") Signed-off-by: Alexander Steffen Signed-off-by: Peter Huewe Reviewed-by: Jarkko Sakkinen Tested-by: Benoit Houyere Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis_spi.c | 1 + 1 file changed, 1 insertion(+) commit 591e48c26ced7c455751eef27fb5963e902c2137 Author: Peter Huewe Date: Thu Mar 2 13:03:14 2017 +0000 tpm_tis_spi: Remove limitation of transfers to MAX_SPI_FRAMESIZE bytes Limiting transfers to MAX_SPI_FRAMESIZE was not expected by the upper layers, as tpm_tis has no such limitation. Add a loop to hide that limitation. v2: Moved scope of spi_message to the top as requested by Jarkko Cc: Fixes: 0edbfea537d1 ("tpm/tpm_tis_spi: Add support for spi phy") Signed-off-by: Alexander Steffen Signed-off-by: Peter Huewe Reviewed-by: Jarkko Sakkinen Tested-by: Benoit Houyere Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis_spi.c | 107 ++++++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 49 deletions(-) commit e110cc69dc2ad679d6d478df636b99b14e6fbbc9 Author: Peter Huewe Date: Thu Mar 2 13:03:13 2017 +0000 tpm_tis_spi: Check correct byte for wait state indicator Wait states are signaled in the last byte received from the TPM in response to the header, not the first byte. Check rx_buf[3] instead of rx_buf[0]. Cc: Fixes: 0edbfea537d1 ("tpm/tpm_tis_spi: Add support for spi phy") Signed-off-by: Alexander Steffen Signed-off-by: Peter Huewe Reviewed-by: Jarkko Sakkinen Tested-by: Benoit Houyere Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis_spi.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 975094ddc369a32f27210248bdd9bbd153061b00 Author: Peter Huewe Date: Thu Mar 2 13:03:12 2017 +0000 tpm_tis_spi: Abort transfer when too many wait states are signaled Abort the transfer with ETIMEDOUT when the TPM signals more than TPM_RETRY wait states. Continuing with the transfer in this state will only lead to arbitrary failures in other parts of the code. Cc: Fixes: 0edbfea537d1 ("tpm/tpm_tis_spi: Add support for spi phy") Signed-off-by: Alexander Steffen Signed-off-by: Peter Huewe Reviewed-by: Jarkko Sakkinen Tested-by: Benoit Houyere Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis_spi.c | 5 +++++ 1 file changed, 5 insertions(+) commit f848f2143ae42dc0918400039257a893835254d1 Author: Peter Huewe Date: Thu Mar 2 13:03:11 2017 +0000 tpm_tis_spi: Use single function to transfer data The algorithm for sending data to the TPM is mostly identical to the algorithm for receiving data from the TPM, so a single function is sufficient to handle both cases. This is a prequisite for all the other fixes, so we don't have to fix everything twice (send/receive) v2: u16 instead of u8 for the length. Cc: Fixes: 0edbfea537d1 ("tpm/tpm_tis_spi: Add support for spi phy") Signed-off-by: Alexander Steffen Signed-off-by: Peter Huewe Reviewed-by: Jarkko Sakkinen Tested-by: Benoit Houyere Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis_spi.c | 87 ++++++++++++------------------------------ 1 file changed, 24 insertions(+), 63 deletions(-) commit 095fc30c2c8d2c63ec88745f57711f05af617581 Author: Winkler, Tomas Date: Mon Mar 6 01:53:35 2017 +0200 tpm/tpm_crb: enter the low power state upon device suspend This fix enables a platform to enter the idle state (suspend-to-idle) The driver needs to request explicitly go_idle upon completion from the pm suspend handler. The runtime pm is disabled on suspend during prepare state by calling pm_runtime_get_noresume, hence we cannot relay on runtime pm to leave the device in low power state. Symmetrically cmdReady is called upon resume. Signed-off-by: Tomas Winkler Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Siged-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 4bf4b4ed9de40eb58232a9f576391fdc5e13a7b4 Author: Arnd Bergmann Date: Tue Feb 28 22:12:55 2017 +0100 tpm: select CONFIG_CRYPTO We get a newly introduced harmless warning when CONFIG_CRYPTO is disabled: warning: (TCG_TPM && TRUSTED_KEYS && IMA) selects CRYPTO_HASH_INFO which has unmet direct dependencies (CRYPTO) This adds another select to avoid the warning, consistent with other users of the crypto code. Fixes: c1f92b4b04ad ("tpm: enhance TPM 2.0 PCR extend to support multiple banks") Signed-off-by: Arnd Bergmann Reviewed-by: Peter Huewe Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit a233a0289cf9a96ef9b42c730a7621ccbf9a6f98 Author: Nayna Jain Date: Fri Mar 10 13:45:53 2017 -0500 tpm: msleep() delays - replace with usleep_range() in i2c nuvoton driver Commit 500462a9de65 "timers: Switch to a non-cascading wheel" replaced the 'classic' timer wheel, which aimed for near 'exact' expiry of the timers. Their analysis was that the vast majority of timeout timers are used as safeguards, not as real timers, and are cancelled or rearmed before expiration. The only exception noted to this were networking timers with a small expiry time. Not included in the analysis was the TPM polling timer, which resulted in a longer normal delay and, every so often, a very long delay. The non-cascading wheel delay is based on CONFIG_HZ. For a description of the different rings and their delays, refer to the comments in kernel/time/timer.c. Below are the delays given for rings 0 - 2, which explains the longer "normal" delays and the very, long delays as seen on systems with CONFIG_HZ 250. * HZ 1000 steps * Level Offset Granularity Range * 0 0 1 ms 0 ms - 63 ms * 1 64 8 ms 64 ms - 511 ms * 2 128 64 ms 512 ms - 4095 ms (512ms - ~4s) * HZ 250 * Level Offset Granularity Range * 0 0 4 ms 0 ms - 255 ms * 1 64 32 ms 256 ms - 2047 ms (256ms - ~2s) * 2 128 256 ms 2048 ms - 16383 ms (~2s - ~16s) Below is a comparison of extending the TPM with 1000 measurements, using msleep() vs. usleep_delay() when configured for 1000 hz vs. 250 hz, before and after commit 500462a9de65. linux-4.7 | msleep() usleep_range() 1000 hz: 0m44.628s | 1m34.497s 29.243s 250 hz: 1m28.510s | 4m49.269s 32.386s linux-4.7 | min-max (msleep) min-max (usleep_range) 1000 hz: 0:017 - 2:760s | 0:015 - 3:967s 0:014 - 0:418s 250 hz: 0:028 - 1:954s | 0:040 - 4:096s 0:016 - 0:816s This patch replaces the msleep() with usleep_range() calls in the i2c nuvoton driver with a consistent max range value. Signed-of-by: Mimi Zohar Cc: stable@vger.kernel.org (linux-4.8) Signed-off-by: Nayna Jain Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_i2c_nuvoton.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit b4e2eb0651ac3180a942d378b040c5cc045113ee Author: Jason Gunthorpe Date: Tue Feb 21 14:14:24 2017 -0700 tpm crb: Work around BIOS's that report the wrong ACPI region size The expectation is that the if the CRB cmd/rsp buffer falls within the ACPI region that the entire buffer will be within the reason. Otherwise resource reservation will fail when it crosses regions. Work around this BIOS bug by limiting the cmd/rsp buffer to the length of the declared ACPI region. BIOS vendors should fix this by making the ACPI and register length declarations consistent. Reported-by: Davide Guerri Signed-off-by: Jason Gunthorpe Reviewed-by: Jarkko Sakkinen Tested-by: Davide Guerri Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit 302a6ad7fc77146191126a1f3e2c5d724fd72416 Author: Alexander Steffen Date: Thu Feb 16 15:33:36 2017 +0000 tpm_tis_core: Choose appropriate timeout for reading burstcount TIS v1.3 for TPM 1.2 and PTP for TPM 2.0 disagree about which timeout value applies to reading a valid burstcount. It is TIMEOUT_D according to TIS, but TIMEOUT_A according to PTP, so choose the appropriate value depending on whether we deal with a TPM 1.2 or a TPM 2.0. This is important since according to the PTP TIMEOUT_D is much smaller than TIMEOUT_A. So the previous implementation could run into timeouts with a TPM 2.0, even though the TPM was behaving perfectly fine. During tpm2_probe TIMEOUT_D will be used even with a TPM 2.0, because TPM_CHIP_FLAG_TPM2 is not yet set. This is fine, since the timeout values will only be changed afterwards by tpm_get_timeouts. Until then TIS_TIMEOUT_D_MAX applies, which is large enough. Cc: stable@vger.kernel.org Fixes: aec04cbdf723 ("tpm: TPM 2.0 FIFO Interface") Signed-off-by: Alexander Steffen Signed-off-by: Peter Huewe Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e1b489d207c73e67810659a88c45b8db4bd62773 Merge: 320d8c3 e8e13b1 Author: Dave Airlie Date: Tue Apr 4 05:45:49 2017 +1000 Merge tag 'omapdrm-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next omapdrm changes for 4.12 Main changes include: * Add support for render nodes. * Refactor omapdss code to allow multiple DISPC implementations. This is pre-work for DSS6 support. * Fix replication logic bug, which caused RGB565 fb to be shown too dark on a 24bit display. * Improve detection of display stack readiness, which should remove the probe order issues. * Link panel-dpi with its backlight, so that they are turned on/off in sync. * Fix possibly incorrect setup of sync and data-enable signals. * Get rid of DRM_OMAP_NUM_CRTCS config option. * tag 'omapdrm-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (34 commits) drm/omap: Major omap_modeset_init() cleanup drm/omap: Remove the obsolete #define omap_plane _omap_plane hack drm/omap: Fix one ugly indentation style break left by coccinelle drm/omap: Rename enum omap_plane to enum omap_plane_id drm/omap: Get rid of DRM_OMAP_NUM_CRTCS config option drm/omap: fix crash on module unload drm/omap: use drm_atomic_helper_shutdown() drm/omap: fix display SYNC/DE flags drm/omap: dispc: improve debug print of display flags drm/omap: displays: panel-dpi: Support for handling backlight devices drm/omap: poll only connectors where the connect/disconnect can be checked drm/omap: display: Add displays in sorted order to the panel_list drm/omap: Use omapdss_stack_is_ready() to check that the display stack is up drm/omap: dss: Support for detecting display stack readiness drm/omap: dss: Functions to check components in the display/output list drm/omap: fix replication logic drm/omap: remove unused dispc_wb_enable & dispc_wb_is_enabled drm/omap: remove all EXPORT_SYMBOLs from dispc.c drm/omap: use dispc_ops drm/omap: fill dispc_ops ... commit 021087309d2801d6d94bbd6be7e3f8297edb3190 Author: Fabrice Gasnier Date: Fri Mar 31 14:32:37 2017 +0200 dt-bindings: iio: stm32-adc: add option to set resolution Add documentation for 'assigned-resolution-bits' dt optional property. Signed-off-by: Fabrice Gasnier Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 6a95d825f6a407fb214e92e8c63c905fceaea81b Author: Peter Rosin Date: Mon Apr 3 10:38:37 2017 +0200 iio: gyro: mpu3050: stop double error reporting i2c_mux_add_adapter already logs a message on failure. Signed-off-by: Peter Rosin Reviewed-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/gyro/mpu3050-i2c.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a716a026bb0d824c9ab6d6ac778c030c0030b178 Author: Dmitry Torokhov Date: Sat Mar 25 10:45:13 2017 -0700 Input: psmouse - use i2c_client_type to locate i2c clients Now that i2c_client_type structure is exported, we can use it, instead of i2c_adapter_type, when looking for devices that are i2c clients. Signed-off-by: Dmitry Torokhov drivers/input/mouse/psmouse-smbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 165fe9c9cd5d1cbc3165dc2e0b24d96314186f8c Merge: 03b2205 4124c4e Author: Dmitry Torokhov Date: Mon Apr 3 12:02:31 2017 -0700 Merge branch 'ib/4.11-rc3-i2c-irq-resources' into next Bring in changes to i2c to better manage device properties and to allow specifying client interrupt through a resource structure. commit 03b22057e8ed2d1df416c9ae8e6e247e0b87ecc8 Merge: 96083b2 a71c9a1 Author: Dmitry Torokhov Date: Mon Apr 3 12:01:20 2017 -0700 Merge tag 'v4.11-rc5' into next Sync up with mainline to bring in changes to input subsystem merged through other trees. commit 96083b2e90cddfb688e70630a1dbfdfe5fb0262d Author: Javier Martinez Canillas Date: Mon Apr 3 11:57:31 2017 -0700 Input: silead - list all supported compatible strings in binding document The driver contains compatible strings for different models, but the DT binding doc only lists one of them. Add the remaining to the document. Signed-off-by: Javier Martinez Canillas Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/touchscreen/silead_gsl1680.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit e6eba3fac9a0eb2018a85505b91740e27c60fdba Author: Rajat Jain Date: Mon Apr 3 11:53:41 2017 -0700 Input: cros_ec_keyb - add an EC event for sysrq Some form factors (detachables/tablets) may not have a keyboard and thus user may have to resort to using a defined EC UI to send sysrq(s) to the kernel in order to collect crash info etc. This UI typically is in the form of user pressing volume / power buttons in some specific sequence and for some specific time. Add a new EC event that allows EC to communicate the sysrq to the AP. (We're skipping event number 5 because it has been reserved for something else) Signed-off-by: Rajat Jain Acked-by: Lee Jones Signed-off-by: Dmitry Torokhov drivers/input/keyboard/cros_ec_keyb.c | 7 +++++++ include/linux/mfd/cros_ec_commands.h | 4 ++++ 2 files changed, 11 insertions(+) commit f6f08c55cced6885f1e1448cd0806098e836c5f5 Author: Dmitry Torokhov Date: Sat Apr 1 11:33:11 2017 -0700 Input: psmouse - fix cleaning up SMBus companions When trying to destroy platform data after destruction of SMbus companion, we need to make sure that we are actually dealing with an SMB companion device, and not some random I2C client device. Fixes: 8eb92e5c9133 ("Input: psmouse - add support for SMBus companions") Reported-by: Benjamin Tissoires Tested-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/psmouse-smbus.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit b80f0f6c9ed3958ff4002b6135f43a1ef312a610 Author: Steven Rostedt (VMware) Date: Mon Apr 3 12:57:35 2017 -0400 ftrace: Have init/main.c call ftrace directly to free init memory Relying on free_reserved_area() to call ftrace to free init memory proved to not be sufficient. The issue is that on x86, when debug_pagealloc is enabled, the init memory is not freed, but simply set as not present. Since ftrace was uninformed of this, starting function tracing still tries to update pages that are not present according to the page tables, causing ftrace to bug, as well as killing the kernel itself. Instead of relying on free_reserved_area(), have init/main.c call ftrace directly just before it frees the init memory. Then it needs to use __init_begin and __init_end to know where the init memory location is. Looking at all archs (and testing what I can), it appears that this should work for each of them. Reported-by: kernel test robot Reported-by: Fengguang Wu Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 6 +++--- init/main.c | 1 + kernel/trace/ftrace.c | 7 ++++--- mm/page_alloc.c | 3 --- 4 files changed, 8 insertions(+), 9 deletions(-) commit 3071f13d75f627ed8648535815a0506d50cbc6ed Author: Agustin Vega-Frias Date: Fri Mar 31 14:13:43 2017 -0400 perf: qcom: Add L3 cache PMU driver This adds a new dynamic PMU to the Perf Events framework to program and control the L3 cache PMUs in some Qualcomm Technologies SOCs. The driver supports a distributed cache architecture where the overall cache for a socket is comprised of multiple slices each with its own PMU. Access to each individual PMU is provided even though all CPUs share all the slices. User space needs to aggregate to individual counts to provide a global picture. The driver exports formatting and event information to sysfs so it can be used by the perf user space tools with the syntaxes: perf stat -a -e l3cache_0_0/read-miss/ perf stat -a -e l3cache_0_0/event=0x21/ Acked-by: Mark Rutland Signed-off-by: Agustin Vega-Frias [will: fixed sparse issues] Signed-off-by: Will Deacon Documentation/perf/qcom_l3_pmu.txt | 25 ++ drivers/perf/Kconfig | 10 + drivers/perf/Makefile | 1 + drivers/perf/qcom_l3_pmu.c | 849 +++++++++++++++++++++++++++++++++++++ include/linux/cpuhotplug.h | 1 + 5 files changed, 886 insertions(+) commit 0636e8b380418bda5b52bb06c8ae285028de3793 Author: Peter Ujfalusi Date: Mon Apr 3 13:12:39 2017 +0300 ASoC: twl6040: Add control for HS and HF mono to stereo selection The new controls will give user the ability to route the left PDM channel data to the right headset/handsfree DAC. HS mono to stereo switch: PDM channel 1 (or mono) data to both HS DAC. HF mono to stereo switch: PDM channel 3 data to both HF DAC. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/codecs/twl6040.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2f3c578fe2edf1de7ab981d1d7121e2eeee5b466 Author: Jeremy Linton Date: Mon Apr 3 00:28:42 2017 -0500 regulator: hi655x: Describe consumed platform device The hi655x-regulator driver consumes a similarly named platform device. Adding that to the module device table, allows modprobe to locate this driver once the device is created. Signed-off-by: Jeremy Linton Signed-off-by: Mark Brown drivers/regulator/hi655x-regulator.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e9cc0f689a7c0c9be6fed6861b3a3f49ad0e7a52 Author: Mat Martineau Date: Mon Jun 27 16:10:59 2016 -0700 KEYS: Add a key restriction struct Key link restrictions require restriction-specific data as well as a restriction-specific function pointer. As a first step toward replacing the restrict_link pointer in struct key, define a more general key_restriction structure that captures the required function, key, and key type pointers. Key type modules should not be pinned on account of this key type pointer because the pointer will be cleared by the garbage collector if the key type is unregistered. Signed-off-by: Mat Martineau include/linux/key.h | 6 ++++++ 1 file changed, 6 insertions(+) commit aaf66c883813f0078e3dafe7d20d1461321ac14f Author: Mat Martineau Date: Tue Aug 30 11:33:13 2016 -0700 KEYS: Split role of the keyring pointer for keyring restrict functions The first argument to the restrict_link_func_t functions was a keyring pointer. These functions are called by the key subsystem with this argument set to the destination keyring, but restrict_link_by_signature expects a pointer to the relevant trusted keyring. Restrict functions may need something other than a single struct key pointer to allow or reject key linkage, so the data used to make that decision (such as the trust keyring) is moved to a new, fourth argument. The first argument is now always the destination keyring. Signed-off-by: Mat Martineau Documentation/security/keys.txt | 8 ++++---- certs/system_keyring.c | 18 +++++++++++------- crypto/asymmetric_keys/restrict.c | 8 +++++--- include/crypto/public_key.h | 5 +++-- include/keys/system_keyring.h | 6 ++++-- include/linux/key.h | 8 +++++--- security/keys/key.c | 5 +++-- security/keys/keyring.c | 6 ++++-- 8 files changed, 39 insertions(+), 25 deletions(-) commit 469ff8f7d46d75b36de68a0411a2ce80109ad00b Author: Mat Martineau Date: Mon Apr 25 11:30:39 2016 -0700 KEYS: Use a typedef for restrict_link function pointers This pointer type needs to be returned from a lookup function, and without a typedef the syntax gets cumbersome. Signed-off-by: Mat Martineau Documentation/security/keys.txt | 5 +---- include/linux/key.h | 16 +++++++--------- security/keys/key.c | 8 ++------ security/keys/keyring.c | 4 +--- 4 files changed, 11 insertions(+), 22 deletions(-) commit da6c8f5e2a63de7148dfffa8bffab1be02f378c6 Author: Russell King Date: Fri Mar 31 11:03:20 2017 +0100 dma-buf: align debugfs output Align the heading with the values output from debugfs. Signed-off-by: Russell King Signed-off-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/E1cttOq-0006GX-U7@rmk-PC.armlinux.org.uk drivers/dma-buf/dma-buf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 73cdd29044e081d56ef6b3186d22cdf25d9dd333 Merge: ddb99e1 03bb793 Author: David Howells Date: Mon Apr 3 17:17:09 2017 +0100 Merge branch 'keys-blacklist' into keys-next commit 04767b9fc2315c90a1e4bfdee883c0cbc122f30f Author: Chris Brandt Date: Wed Mar 29 10:30:30 2017 -0700 dt-bindings: rtc: document the rtc-sh bindings Add the binding documentation for rtc-sh which is an RTC for SuperH and RZ/A SoCs. Signed-off-by: Chris Brandt Acked-by: Rob Herring Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/rtc/rtc-sh.txt | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit dab5aec64bf5907f65926675807e4ebe83b3b10e Author: Chris Brandt Date: Wed Mar 29 10:30:29 2017 -0700 rtc: sh: add support for rza series This same RTC is used in RZ/A series MPUs, therefore with some slight changes, this driver can be reused. Additionally, since ARM architectures require Device Tree configurations, device tree support has been added. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 4 ++-- drivers/rtc/rtc-sh.c | 33 ++++++++++++++++++++++++++++----- 2 files changed, 30 insertions(+), 7 deletions(-) commit 3c2507d308afb233dd41387b41512e7aa97535f0 Author: Neil Armstrong Date: Mon Apr 3 16:42:35 2017 +0200 documentation: media: Add documentation for new RGB and YUV bus formats Add documentation for added Bus Formats to describe RGB and YUV formats used as input to the Synopsys DesignWare HDMI TX Controller. Acked-by: Hans Verkuil Reviewed-by: Archit Taneja Acked-by: Mauro Carvalho Chehab Signed-off-by: Neil Armstrong Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1491230558-10804-4-git-send-email-narmstrong@baylibre.com Documentation/media/uapi/v4l/subdev-formats.rst | 3000 +++++++++++++++-------- 1 file changed, 1979 insertions(+), 1021 deletions(-) commit d0353118fd589c127875290017c7fdd266937bee Author: Neil Armstrong Date: Mon Apr 3 16:42:34 2017 +0200 media: uapi: Add RGB and YUV bus formats for Synopsys HDMI TX Controller In order to describe the RGB and YUV bus formats used to feed the Synopsys DesignWare HDMI TX Controller, add missing formats to the list of Bus Formats. Documentation for these formats is added in a separate patch. Reviewed-by: Archit Taneja Reviewed-by: Jose Abreu Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Neil Armstrong Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1491230558-10804-3-git-send-email-narmstrong@baylibre.com include/uapi/linux/media-bus-format.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 03bb79315ddc8972b1af71539799450acbc1be4f Author: David Howells Date: Mon Apr 3 16:07:25 2017 +0100 PKCS#7: Handle blacklisted certificates PKCS#7: Handle certificates that are blacklisted when verifying the chain of trust on the signatures on a PKCS#7 message. Signed-off-by: David Howells crypto/asymmetric_keys/pkcs7_parser.h | 1 + crypto/asymmetric_keys/pkcs7_verify.c | 32 ++++++++++++++++++++++++-------- 2 files changed, 25 insertions(+), 8 deletions(-) commit 436529562df2748fd9918f578205b22cf8ced277 Author: David Howells Date: Mon Apr 3 16:07:25 2017 +0100 X.509: Allow X.509 certs to be blacklisted Allow X.509 certs to be blacklisted based on their TBSCertificate hash. This is convenient since we have to determine this anyway to be able to check the signature on an X.509 certificate. This is also what UEFI uses in its blacklist. If a certificate built into the kernel is blacklisted, something like the following might then be seen during boot: X.509: Cert 123412341234c55c1dcc601ab8e172917706aa32fb5eaf826813547fdf02dd46 is blacklisted Problem loading in-kernel X.509 certificate (-129) where the hex string shown is the blacklisted hash. Signed-off-by: David Howells crypto/asymmetric_keys/x509_parser.h | 1 + crypto/asymmetric_keys/x509_public_key.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) commit 734114f8782f6c3398762f2353fe9101d87b6d06 Author: David Howells Date: Mon Apr 3 16:07:24 2017 +0100 KEYS: Add a system blacklist keyring Add the following: (1) A new system keyring that is used to store information about blacklisted certificates and signatures. (2) A new key type (called 'blacklist') that is used to store a blacklisted hash in its description as a hex string. The key accepts no payload. (3) The ability to configure a list of blacklisted hashes into the kernel at build time. This is done by setting CONFIG_SYSTEM_BLACKLIST_HASH_LIST to the filename of a list of hashes that are in the form: "", "", ..., "" where each is a hex string representation of the hash and must include all necessary leading zeros to pad the hash to the right size. The above are enabled with CONFIG_SYSTEM_BLACKLIST_KEYRING. Once the kernel is booted, the blacklist keyring can be listed: root@andromeda ~]# keyctl show %:.blacklist Keyring 723359729 ---lswrv 0 0 keyring: .blacklist 676257228 ---lswrv 0 0 \_ blacklist: 123412341234c55c1dcc601ab8e172917706aa32fb5eaf826813547fdf02dd46 The blacklist cannot currently be modified by userspace, but it will be possible to load it, for example, from the UEFI blacklist database. A later commit will make it possible to load blacklisted asymmetric keys in here too. Signed-off-by: David Howells certs/Kconfig | 18 +++++ certs/Makefile | 6 ++ certs/blacklist.c | 174 ++++++++++++++++++++++++++++++++++++++++++ certs/blacklist.h | 3 + certs/blacklist_hashes.c | 6 ++ certs/blacklist_nohashes.c | 5 ++ include/keys/system_keyring.h | 12 +++ 7 files changed, 224 insertions(+) commit c97476400d3b73376fc055e828d7388d6b9ea99a Author: Jan Kara Date: Wed Dec 14 13:53:46 2016 +0100 fanotify: Move recalculation of inode / vfsmount mask under mark_mutex Move recalculation of inode / vfsmount notification mask under group->mark_mutex of the mark which was modified. These are the only places where mask recalculation happens without mark being protected from detaching from inode / vfsmount which will cause issues with the following patches. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fanotify/fanotify_user.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 25c829afbd74fb9594d2351d9e41be05bacb9903 Author: Jan Kara Date: Fri Dec 9 09:38:55 2016 +0100 inotify: Remove inode pointers from debug messages Printing inode pointers in warnings has dubious value and with future changes we won't be able to easily get them without either locking or chances we oops along the way. So just remove inode pointers from the warning messages. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/inotify/inotify_fsnotify.c | 4 ++-- fs/notify/inotify/inotify_user.c | 25 ++++++++++--------------- 2 files changed, 12 insertions(+), 17 deletions(-) commit 5198adf649a0b7b0f9ddb98b264e57b41516116b Author: Jan Kara Date: Fri Dec 9 09:18:21 2016 +0100 fsnotify: Remove unnecessary tests when showing fdinfo show_fdinfo() iterates group's list of marks. All marks found there are guaranteed to be alive and they stay so until we release group->mark_mutex. So remove uncecessary tests whether mark is alive. Reviewed-by: Miklos Szeredi Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fdinfo.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 7f75540ff2ca84dbac26cf9deeb620cbf5646f5e Merge: 474aeff a71c9a1 Author: Ingo Molnar Date: Mon Apr 3 16:36:32 2017 +0200 Merge tag 'v4.11-rc5' into x86/mm, to refresh the branch Signed-off-by: Ingo Molnar commit 4c3b89effc281704d5395282c800c45e453235f6 Author: Alistair Popple Date: Mon Apr 3 19:51:43 2017 +1000 powerpc/powernv: Add sanity checks to pnv_pci_get_{gpu|npu}_dev The pnv_pci_get_{gpu|npu}_dev functions are used to find associations between nvlink PCIe devices and standard PCIe devices. However they lacked basic sanity checking which results in NULL pointer dereferencing if they are incorrect called can be harder to spot than an explicit WARN_ON. Signed-off-by: Alistair Popple Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/npu-dma.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 2475a2b6c877a0c8d1ca42c3f2b30f8ce518ac0b Author: Alistair Popple Date: Mon Apr 3 19:51:42 2017 +1000 drivers/of/base.c: Add of_property_read_u64_index There is of_property_read_u32_index but no u64 variant. This patch adds one similar to the u32 version for u64. Signed-off-by: Alistair Popple Acked-by: Rob Herring Signed-off-by: Michael Ellerman drivers/of/base.c | 31 +++++++++++++++++++++++++++++++ include/linux/of.h | 3 +++ 2 files changed, 34 insertions(+) commit f6f9195ba0b0b1406af384037d9e7eb8215aca98 Author: Oliver O'Halloran Date: Mon Apr 3 18:09:06 2017 +1000 powerpc/mm: Remove stale comment about the DART hole The code to fix the problem it describes was removed in commit c40785ad305b ("powerpc/dart: Use a cachable DART"), and it uses the stupid comment style. Away it goooooooooooooes! Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/mm/hash_utils_64.c | 5 ----- 1 file changed, 5 deletions(-) commit a7a9dcd882a67b68568868b988289fce5ffd8419 Author: Anton Blanchard Date: Mon Apr 3 16:41:02 2017 +1000 powerpc: Avoid taking a data miss on every userspace instruction miss Early on in do_page_fault() we call store_updates_sp(), regardless of the type of exception. For an instruction miss this doesn't make sense, because we only use this information to detect if a data miss is the result of a stack expansion instruction or not. Worse still, it results in a data miss within every userspace instruction miss handler, because we try and load the very instruction we are about to install a pte for! A simple exec microbenchmark runs 6% faster on POWER8 with this fix: #include #include #include int main(int argc, char *argv[]) { unsigned long left = atol(argv[1]); char leftstr[16]; if (left-- == 0) return 0; sprintf(leftstr, "%ld", left); execlp(argv[0], argv[0], leftstr, NULL); perror("exec failed\n"); return 0; } Pass the number of iterations on the command line (eg 10000) and time how long it takes to execute. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edf5e79422a9dd98fb896606124edd8407d97d70 Merge: a2e99e9 2ccc150 Author: Greg Kroah-Hartman Date: Mon Apr 3 15:29:12 2017 +0200 Merge tag 'iio-for-4.12c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Third set of new device support, cleanups and features for IIO in the 4.12 cycle Somewhat dominated in patch numbers of last of the outreachy application window related patches (they are still coming, despite window being closed which is good to see!) Good set of new drivers as well. New device support * ASPEED ADC - new driver * cpcap PMIC ADC - new driver * hid-humidity - driver for HID compatible humidity sensors. * ltc2497 ADC - new driver * mpu6050 - bring bindings up to date and add trivial support for 9250 * rockchip-saradc - update bindings to cover rk3328 * vl6180 light, proximity and time of flight sensor. - new driver Features * meson-saradc - add calibration Cleanup and minor fixes * ad5504 - constify attribute_group structure - drop casting of void * * ad7150 - replace some shifts of 1 by BIT macro usage * ad7152 - blank lines between function definitions * ad7280a - octal permissions. * ad7606 - replace use of core mlock mutex with a local lock * ad7746 - replace some shifts of 1 by BIT macro usage - function parameter alignment - drop some excessive brackets (introduced in last pull request) * ad7753 - white space cleanup * ad7754 - includes in alphabetical order and groupped appropriately. - change from missuse of internal mlock mutex to using the buffer lock to also protect values during frequency update. * ad779x - constify attribute_group structures * ad9832 - octal permissions * adis16060 - remove use of core mlock mutex in favour of adding a local _spi_write_then_read which can use the local buffer protection lock. - fix naming of above function. * adis16203 - remove locking during reads of calibbias that doesn't protect anything not protected elsewhere. * adis16209 - remove unnecessary braces in single statement if * adis16240 - remove unnecessary braces in single statement if * adt7136 - drop excess blank lines and put some in between functions. * ams-iaq - replace comma with semi colon. Not actual bug, just unusual syntax. * apds9960 - constify attribute group structure * as3935 - constify attribute group structure * bm1750 - constify attribute group structure * cros_ec - devm version of triggered buffer setup to simplify code. * exynos - drop casting of void * * hdc100x - constify attribute_group structure * hid-accel - fix wrong scale for newly introduced gravity sensor. * hts221 - drop casting of void * * hx711 - constify attribute_group structure * imx7d_adc - drop casting of void * * lm35333 - constify attribute_group structure * lsm6dsx - drop casting of void * - hold ODR configuration until enabling to avoid a race condition. * max1027 - drop casting of void * * max11100 - fix a comma where semicolon was intended (no actual bug, just odd) * max1363 - constify attribute_group structure * ms sensors - drop casting of void * * rockchip_saradc - drop casting of void * * sun4i-gpadc - fix missing dependency on THERMAL or presence of stubs (issue only introduced in pervious set) - drop casting of void * * tsl2x7x - fix wrong standard deviation calc. Note these aren't actually used for anything at the moment so bug didn't really matter. - constify attribute group structure. * vf610adc - drop casting of void * * vz89x - replace comma with semicolon. Not actual bug, just odd syntax. * zpa2326 - drop casting of void * commit d4da31986c5da14277b3ecc479f1b0682756b54c Author: Andreas Gruenbacher Date: Wed Feb 22 20:05:09 2017 +0100 Revert "GFS2: Wait for iopen glock dequeues" Revert commit 86d067a797d4e8546a7c92b985f31e8cd3ec39ad: it turns out that waiting for iopen glock dequeues here isn't needed anymore because the bugs that commit was meant to fix have been fixed otherwise. In addition, we want to avoid waiting on glocks in gfs2_evict_inode in shrinker context because the shrinker may be invoked on behalf of DLM, in which case calling into DLM again would deadlock. This commit makes the described scenario less likely without completely avoiding it; it's still a step in the right direction, though. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/inode.c | 3 +-- fs/gfs2/super.c | 8 +++----- 2 files changed, 4 insertions(+), 7 deletions(-) commit 0a52aba7c2168636fc71635cf3ccb92a79a96c38 Author: Andreas Gruenbacher Date: Tue Feb 21 23:19:10 2017 +0100 gfs2: Switch to rhashtable_lookup_get_insert_fast Switch from rhashtable_lookup_insert_fast + rhashtable_lookup_fast to rhashtable_lookup_get_insert_fast, which is cleaner and avoids an extra rhashtable lookup. At the same time, turn the retry loop in gfs2_glock_get into an infinite loop. The lookup or insert will eventually succeed, usually very fast, but there is no reason to give up trying at a fixed number of iterations. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/glock.c | 45 +++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 24 deletions(-) commit c369898759e0e143a513d022121290370f001d01 Merge: cc963a1 f9fe1c1 Author: Bob Peterson Date: Fri Mar 24 09:22:07 2017 -0400 Merge commit 'f9fe1c1' into for-next Andreas Gruenbacher added function rhashtable_lookup_get_insert_fast to rhashtable.h. That patch went into the net-next tree. In a subsequent patch, GFS2 makes use of this new function. Therefore, we needed a merge commit to make the new function available to GFS2. Signed-off-by: Bob Peterson commit 9ccd8d744592b594db217b80af651e3f10e6a96e Merge: abf1e0a a71c9a1 Author: Greg Kroah-Hartman Date: Mon Apr 3 14:18:16 2017 +0200 Merge 4.11-rc5 into tty-next We want the serial fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman commit cb2e3d461b26f07540e0b898e0125137def2b015 Merge: d30eed1 a71c9a1 Author: Greg Kroah-Hartman Date: Mon Apr 3 14:16:25 2017 +0200 Merge 4.11-rc5 into usb-next We want the usb fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit f089236114cb09594d7e27a15ed72c2ebb669448 Author: Peter Rosin Date: Mon Apr 3 10:14:29 2017 +0200 i2c: mux: reg: stop double error reporting i2c_mux_add_adapter already logs a message on failure. Reviewed-by: Wolfram Sang Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-mux-reg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c99a23e55fbe97acb235e7ebbd8800870c3e689f Author: Peter Rosin Date: Mon Apr 3 10:14:25 2017 +0200 i2c: mux: pinctrl: stop double error reporting i2c_mux_add_adapter already logs a message on failure. Reviewed-by: Wolfram Sang Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-mux-pinctrl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0756ac323573406662c56d3f26a20b4382451c96 Author: Peter Rosin Date: Mon Apr 3 10:14:22 2017 +0200 i2c: mux: pca954x: stop double error reporting i2c_mux_add_adapter already logs a message on failure. Reviewed-by: Wolfram Sang Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-mux-pca954x.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 664d9bbadaf61c80a6e5c7c6c83f80a0731bc184 Author: Peter Rosin Date: Mon Apr 3 10:14:19 2017 +0200 i2c: mux: pca9541: stop double error reporting i2c_mux_add_adapter already logs a message on failure. Reviewed-by: Wolfram Sang Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-mux-pca9541.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1b00900fa0bdd4a634f6864efe3d07c216523688 Author: Peter Rosin Date: Mon Apr 3 10:14:11 2017 +0200 i2c: mux: gpio: stop double error reporting i2c_mux_add_adapter already logs a message on failure. Reviewed-by: Wolfram Sang Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-mux-gpio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1144d13eaaaec21a55614ca7ade2c8fc1d9f1685 Author: Peter Rosin Date: Mon Apr 3 10:14:06 2017 +0200 i2c: arb: gpio-challenge: stop double error reporting i2c_mux_add_adapter already logs a message on failure. Reviewed-by: Wolfram Sang Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8d4d159f25a79bdaf1f8ae5536471ba9b26b26c2 Author: Peter Rosin Date: Mon Apr 3 09:28:43 2017 +0200 i2c: mux: provide more info on failure in i2c_mux_add_adapter No callers then need to report any further info, thus reducing both the amount of code and the log noise. Reviewed-by: Wolfram Sang Signed-off-by: Peter Rosin drivers/i2c/i2c-mux.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 47a6b0ef3c34521583965cec08766a9628d402e3 Author: Alexander Syring Date: Mon Apr 3 11:12:45 2017 +0200 ARM: sun7i: cubietruck: enable ACIN und USB power supply subnode The Cubietruck has an AXP209 PMIC and can be power-supplied by ACIN via the CHG-IN pin or by USB. This enables the ACIN and the USB power supply subnode in the DT. Signed-off-by: Alexander Syring Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6f66ea099fc2f31d31d6cd39f3b13b23bdeb6196 Author: Joerg Roedel Date: Fri Mar 31 15:12:31 2017 +0200 iommu/mediatek: Teach MTK-IOMMUv1 about 'struct iommu_device' Make use of the iommu_device_register() interface. Signed-off-by: Joerg Roedel drivers/iommu/mtk_iommu_v1.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit c9d9f2394c6a953585874a1a6cb2ecea853fdcf2 Author: Joerg Roedel Date: Fri Mar 31 16:26:03 2017 +0200 iommu/rockchip: Make use of 'struct iommu_device' Register hardware IOMMUs seperatly with the iommu-core code and add a sysfs representation of the iommu topology. Tested-by: Heiko Stuebner Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit 5405e19e705909bba1a879174ffe93e241455426 Author: Sven Eckelmann Date: Sat Apr 1 14:47:06 2017 +0200 batman-adv: Group ethtool related code together The ethtool code was spread in soft-interface.c. This makes reading the code and working on it unnecessary complicated. Having everything in a common place next to the other code which references it, makes it slightly easier. Signed-off-by: Sven Eckelmann Acked-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/soft-interface.c | 191 +++++++++++++++++++--------------------- 1 file changed, 92 insertions(+), 99 deletions(-) commit e2790a4b275d52e332e0ad71b5f2eff53fe21805 Author: Sven Eckelmann Date: Sat Apr 1 14:47:05 2017 +0200 batman-adv: Remove ethtool .get_settings stub The .get_settings function pointer and the related API was deprecated. Fortunately, batman-adv is a virtual interface and never provided any useful information via .get_settings. The stub can therefore be removed. This also avoids that incorrect information is shown in ethtool about the batadv interface. Signed-off-by: Sven Eckelmann Acked-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/soft-interface.c | 19 ------------------- 1 file changed, 19 deletions(-) commit 40ad9842cb35d9b7ddfea5b246fcabf17f275686 Author: Sven Eckelmann Date: Sat Apr 1 14:47:04 2017 +0200 batman-adv: Remove ethtool msglevel functions batadv devices don't support msglevel. The ethtool stubs therefore returned that it isn't supported. But instead, the complete function can be dropped to avoid that bogus values are shown in ethtool. Signed-off-by: Sven Eckelmann Acked-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/soft-interface.c | 13 ------------- 1 file changed, 13 deletions(-) commit 2f249e99c7cda7107ac52f0319c89bed9a6431d3 Author: Sven Eckelmann Date: Sat Apr 1 14:47:03 2017 +0200 batman-adv: Use ethtool helper to get link status The ethtool_ops of batman-adv never contained more than a stub for the get_link function pointer. It was always returning that a link exists even when the devices was not yet up and therefore nothing resampling a link could have been available. Instead use the ethtool helper which returns the current carrier state. Signed-off-by: Sven Eckelmann Acked-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/soft-interface.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit bb65a64c7285e7105c1a6c8a33b37770343a4e96 Author: Robin Murphy Date: Fri Mar 31 15:46:07 2017 +0100 iommu/dma: Plumb in the per-CPU IOVA caches With IOVA allocation suitably tidied up, we are finally free to opt in to the per-CPU caching mechanism. The caching alone can provide a modest improvement over walking the rbtree for weedier systems (iperf3 shows ~10% more ethernet throughput on an ARM Juno r1 constrained to a single 650MHz Cortex-A53), but the real gain will be in sidestepping the rbtree lock contention which larger ARM-based systems with lots of parallel I/O are starting to feel the pain of. Reviewed-by: Nate Watterson Tested-by: Nate Watterson Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) commit a44e6657585b15eeebf5681bfcc7ce0b002429c2 Author: Robin Murphy Date: Fri Mar 31 15:46:06 2017 +0100 iommu/dma: Clean up MSI IOVA allocation Now that allocation is suitably abstracted, our private alloc/free helpers can drive the trivial MSI cookie allocator directly as well, which lets us clean up its exposed guts from iommu_dma_map_msi_msg() and simplify things quite a bit. Reviewed-by: Nate Watterson Tested-by: Nate Watterson Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 58 ++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 33 deletions(-) commit 842fe519f68b4d17ba53c66d69f22a72b1ad08cf Author: Robin Murphy Date: Fri Mar 31 15:46:05 2017 +0100 iommu/dma: Convert to address-based allocation In preparation for some IOVA allocation improvements, clean up all the explicit struct iova usage such that all our mapping, unmapping and cleanup paths deal exclusively with addresses rather than implementation details. In the process, a few of the things we're touching get renamed for the sake of internal consistency. Reviewed-by: Nate Watterson Tested-by: Nate Watterson Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 119 ++++++++++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 52 deletions(-) commit 57ff9d736e05bede56fdb47599fdddb3408d4651 Author: Geert Uytterhoeven Date: Mon Apr 3 11:54:14 2017 +0200 ARM: dts: r8a7794: Add Z2 clock Add the Z2 clock (Cortex-A7 CPU core clock), which uses a fixed divider, and link the first CPU node to it. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7b39e985cfc18bba43646240b10a830046382abf Author: Geert Uytterhoeven Date: Mon Apr 3 11:53:08 2017 +0200 ARM: dts: r8a7792: Correct Z clock Unlike other R-Car Gen2 SoCs with Cortex-A15 CPU cores, R-Car V2H does not have a programmable Z clock (Cortex-A15 CPU core clock), but uses a fixed divider. This is similar to the Z2 clock (Cortex-A7 CPU core clock) on R-Car E2. Hence: - Remove the Z clock output from the cpg_clocks node, as this implied a programmable clock, - Add the Z clock as a fixed factor clock, - Let the first CPU node point to the new Z clock, - Remove the Z clock index from the bindings (this definition was used by r8a7792.dtsi only, and was not a contract between DT and driver). Fixes: 7c4163aae3d8e5b9 ("ARM: dts: r8a7792: initial SoC device tree") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 11 +++++++++-- include/dt-bindings/clock/r8a7792-clock.h | 1 - 2 files changed, 9 insertions(+), 3 deletions(-) commit 1cd9028027c7a7c10b774df698c3cfafec6aa67d Author: Geert Uytterhoeven Date: Mon Apr 3 11:45:43 2017 +0200 ARM: dts: r8a7793: Correct parent of SSI[0-9] clocks The SSI-ALL gate clock is located in between the P clock and the individual SSI[0-9] clocks, hence the former should be listed as their parent. Fixes: 072d326542e49187 ("ARM: dts: r8a7793: add MSTP10 clocks to device tree") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7793.dtsi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 16fe68dcab5702a024d85229ff7e98979cb701a5 Author: Geert Uytterhoeven Date: Mon Apr 3 11:45:42 2017 +0200 ARM: dts: r8a7791: Correct parent of SSI[0-9] clocks The SSI-ALL gate clock is located in between the P clock and the individual SSI[0-9] clocks, hence the former should be listed as their parent. Fixes: ee9141522dcf13f8 ("ARM: shmobile: r8a7791: add MSTP10 support on DTSI") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791.dtsi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d13d4e063d4a08eb1686e890e9183dde709871bf Author: Geert Uytterhoeven Date: Mon Apr 3 11:45:41 2017 +0200 ARM: dts: r8a7790: Correct parent of SSI[0-9] clocks The SSI-ALL gate clock is located in between the P clock and the individual SSI[0-9] clocks, hence the former should be listed as their parent. Fixes: bcde372254386872 ("ARM: shmobile: r8a7790: add MSTP10 support on DTSI") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790.dtsi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 91a7c50cb4fabfba218549dfa84356069918bfbf Author: Chris Brandt Date: Thu Mar 30 14:16:09 2017 -0700 ARM: dts: r7s72100: fix ethernet clock parent Technically, the Ethernet block is run off the 133MHz Bus (B) clock, not the 33MHz Peripheral 0 (P0) clock. Fixes: 969244f9c720 ("ARM: dts: r7s72100: add ethernet clock to device tree") Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 474aeffd88b87746a75583f356183d5c6caa4213 Author: Wei Yang Date: Tue Mar 14 11:08:01 2017 +0800 x86/mm/numa: Remove numa_nodemask_from_meminfo() numa_nodemask_from_meminfo() generates a nodemask of nodes which have memory according to a meminfo descriptor. The two callsites of that function both set bits in copies of the numa_nodes_parsed nodemask. In both cases, the information in supplied numa_meminfo is a subset of numa_nodes_parsed. So setting those bits again is not really necessary. Here are the three call paths which show that the supplied numa_meminfo argument describes memory regions in nodes which are already in numa_nodes_parsed: x86_numa_init() numa_init() Case 1: acpi_numa_init() acpi_parse_memory_affinity() numa_add_memblk() node_set(numa_nodes_parsed) acpi_parse_slit() acpi_numa_slit_init() numa_set_distance() numa_alloc_distance() numa_nodemask_from_meminfo() Case 2: amd_numa_init() numa_add_memblk() node_set(numa_nodes_parsed) Case 3 dummy_numa_init() node_set(numa_nodes_parsed) numa_add_memblk() numa_register_memblks() numa_nodemask_from_meminfo() Thus, in all three cases, the respective bit in numa_nodes_parsed is set, which means it is not necessary to set it again in a copy of numa_nodes_parsed. So remove that function. Signed-off-by: Wei Yang Cc: x86-ml Link: http://lkml.kernel.org/r/20170314030801.13656-2-richard.weiyang@gmail.com [ Heavily massage commit message. ] Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner arch/x86/mm/numa.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit 43dac8f6a74c9811454f4efbe52b48f7a802c277 Author: Wei Yang Date: Tue Mar 14 11:08:00 2017 +0800 x86/mm/numa: Improve alloc_node_data() error path message alloc_node_data() tries to allocate from the local node first and, if that attempt fails, falls back to any node. Improve the error message to issue the initial node for ease during debugging. Fix a typo in the comments, while at it. Signed-off-by: Wei Yang Link: http://lkml.kernel.org/r/20170314030801.13656-1-richard.weiyang@gmail.com [ Masssage commit message. ] Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner arch/x86/mm/numa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e8e13b1521678af0df7b07f30745d77e8de1820a Author: Jyri Sarha Date: Fri Mar 24 16:47:55 2017 +0200 drm/omap: Major omap_modeset_init() cleanup Cleanup overly complex omap_modeset_init(). The function is trying to support many unusual configuration, that have never been tested and are not supported by other parts of the dirver. After cleanup the init function creates exactly one connector, encoder, crtc, and primary plane per each connected dss-device. Each connector->encoder->crtc chain is expected to be separate and each crtc is connect to a single dss-channel. If the configuration does not match the expectations or exceeds the available resources, the configuration is rejected. Signed-off-by: Jyri Sarha Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 20 +++- drivers/gpu/drm/omapdrm/omap_drv.c | 177 ++++++++++------------------------- drivers/gpu/drm/omapdrm/omap_drv.h | 4 +- drivers/gpu/drm/omapdrm/omap_plane.c | 24 ++++- 4 files changed, 86 insertions(+), 139 deletions(-) commit 694c99cf6f5a13774bbdbf5becdbf59451b955f0 Author: Jyri Sarha Date: Fri Mar 24 16:47:54 2017 +0200 drm/omap: Remove the obsolete #define omap_plane _omap_plane hack Remove the obsolete "#define omap_plane _omap_plane" hack and other related hacks to get around the enum omap_plane colliding with struct omap_plane. Signed-off-by: Jyri Sarha Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_plane.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 273ffeaf8c90c4afc88bc48189d9e8c20106fac7 Author: Jyri Sarha Date: Fri Mar 24 16:47:53 2017 +0200 drm/omap: Fix one ugly indentation style break left by coccinelle Fix one ugly indentation style break left by the previous coccilnelle patch. Signed-off-by: Jyri Sarha Acked-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 864050c78e1c5d619da3c1b0a891d474dfd336bf Author: Jyri Sarha Date: Fri Mar 24 16:47:52 2017 +0200 drm/omap: Rename enum omap_plane to enum omap_plane_id The enum omap_plane conflicted with the same struct name for omapdrm plane private data. This rename should solve the conflict. The rename was implement with this very simple coccinelle patch: ------------------------ @@ @@ enum -omap_plane +omap_plane_id ------------------------ The patch was applied like this: spatch --sp-file --all-includes --in-place --dir drivers/gpu/drm/omapdrm The above patch did not rename the actual enum definition. That was added manually on top of the spatch changes. Signed-off-by: Jyri Sarha Acked-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc.c | 124 ++++++++++++++++------------- drivers/gpu/drm/omapdrm/dss/dispc.h | 62 +++++++-------- drivers/gpu/drm/omapdrm/dss/dss.h | 5 +- drivers/gpu/drm/omapdrm/dss/dss_features.c | 6 +- drivers/gpu/drm/omapdrm/dss/dss_features.h | 6 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 17 ++-- 6 files changed, 117 insertions(+), 103 deletions(-) commit f1118b893e65ada7845c587f4682b153ea40e2ad Author: Jyri Sarha Date: Fri Mar 24 16:47:51 2017 +0200 drm/omap: Get rid of DRM_OMAP_NUM_CRTCS config option Allocate one CRTC for each connected output and get rid of DRM_OMAP_NUM_CRTCS config option. We still can not create more CRTCs than we have DSS display managers. We also reserve one overlay per CRTC for primary plane so we can not have more CRTCs than we have overlays either. Signed-off-by: Jyri Sarha Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/Kconfig | 9 ------ drivers/gpu/drm/omapdrm/omap_drv.c | 59 +++++++++++--------------------------- 2 files changed, 16 insertions(+), 52 deletions(-) commit c9af3ed7311f5fbc4b0e109daddfcc8a47267331 Author: Tomi Valkeinen Date: Fri Mar 24 09:58:49 2017 +0200 drm/omap: fix crash on module unload When unloading omapdrm we get a NULL pointer deref in omap_drm_irq_uninstall(). This is caused by: 967dd48417874dd25491a4e933648f394a64f70f ("drm: remove drm_vblank_no_hw_counter assignment from driver code") We shut down all the crtcs at unload time before calling omap_drm_irq_uninstall, so the code in omap_drm_irq_uninstall() is unnecessary and can be removed. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_irq.c | 14 -------------- 1 file changed, 14 deletions(-) commit 8a54aa92850058fd60f07fa2621cab94bf53b5f0 Author: Tomi Valkeinen Date: Mon Mar 27 10:02:22 2017 +0300 drm/omap: use drm_atomic_helper_shutdown() Use drm_atomic_helper_shutdown() to ensure that all crtcs are disabled when unloading the driver. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 50fa9f0bb8c1eb7d0dbd404766a67c34756d5a80 Author: Tomi Valkeinen Date: Wed Nov 23 13:24:00 2016 +0200 drm/omap: fix display SYNC/DE flags At the moment VSYNC/HSYNC/DE high/low flags set by the panel/encoder drivers get lost when the videotimings are translated to DRM's videomode, as DRM's mode does not have corresponding flags. DRM has bus-flags for this purpose, and while it lacks a few flags at the moment, it should be used here. However, until we rewrite omapdrm's device model, using bus-flags is rather difficult. As a short term fix, this patch makes sure that every time the videomode is set in omap_crtc_mode_set_nofb(), the driver asks for the SYNC/DE flags from the panel/encoder drivers, and thus we get the correct flags into use. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_connector.c | 8 +++++-- drivers/gpu/drm/omapdrm/omap_crtc.c | 40 +++++++++++++++++++++++++++++--- 2 files changed, 43 insertions(+), 5 deletions(-) commit 956d4f9308d027119282330b54859cf20d222710 Author: Tomi Valkeinen Date: Wed Nov 23 13:23:42 2016 +0200 drm/omap: dispc: improve debug print of display flags Instead of printing 0/1 for display flags like vsync high/low, use a tri-state print (-1/0/1) to indicate the "undefined" state. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 39135a305a0f0a82d60ceb79dcbf094fc4e70123 Author: Peter Ujfalusi Date: Fri Sep 9 13:33:06 2016 +0300 drm/omap: displays: panel-dpi: Support for handling backlight devices The associated backlight device can be configured via DT by providing the phandle to the device. If the backlight device is configured, the driver can manage the backligt along with the panel's power state, iow it can turn on the backlight when the panel is enabled and turn it off when the panel is disabled. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen .../bindings/display/panel/panel-dpi.txt | 3 ++ drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 37 ++++++++++++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) commit 4573ebe5ec3121dd4e6f3e8f0c5feba01a235251 Author: Peter Ujfalusi Date: Mon Aug 22 15:54:30 2016 +0300 drm/omap: poll only connectors where the connect/disconnect can be checked When the connector associated detect callback is not provided, we can not detect if the display is connected or disconnected. These displays do not support hot plug, they are always connected. Let DRM know that connectors w/o detect callback should not be polled. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_connector.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 389c5763beda623879095a10a428a02ae138bbf1 Author: Peter Ujfalusi Date: Thu Aug 11 10:20:23 2016 +0300 drm/omap: display: Add displays in sorted order to the panel_list Keep the panel_list ordered according to aliases. The DRM connectors will be created following the panel_list. By keeping the list ordered the DRM connectors will be created in the same order regardless of the driver probe order. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/display.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit a09d2bc1503508c17ef3a71c6b1905e3660f3029 Author: Peter Ujfalusi Date: Tue May 3 22:08:01 2016 +0300 drm/omap: Use omapdss_stack_is_ready() to check that the display stack is up Instead of 'guessing' based on aliases of the status of the DSS drivers, use the new interface to check that all needed drivers are loaded. In this way we can be sure that all needed drivers are loaded so it is safe to continue the probing of omapdrm. This method will allow the omapdrm to be probed 'headless', without outputs. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 1e08c822689c39bd86d2154490f89265329e9c58 Author: Peter Ujfalusi Date: Tue May 3 22:07:10 2016 +0300 drm/omap: dss: Support for detecting display stack readiness When omapdss is loaded (all core components are in place) create a list of devices used in the display graph. This list later can be used by omapdrm via the omapdss_stack_is_ready() function to check that these components are loaded. Based on this information, omapdrm can defer probe in case when the omapdss stack is not ready yet. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/base.c | 107 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/omapdrm/dss/dss.c | 1 + drivers/gpu/drm/omapdrm/dss/omapdss.h | 3 + 3 files changed, 111 insertions(+) commit 7c79e8d67fde332f1cda26c8a0845fa167815351 Author: Peter Ujfalusi Date: Mon May 2 14:55:38 2016 +0300 drm/omap: dss: Functions to check components in the display/output list The functions can be used to check a component (by it's of_node) if it is part of the omapdss display or output list. If the component is found, it means that the driver is loaded. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/display.c | 18 ++++++++++++++++++ drivers/gpu/drm/omapdrm/dss/omapdss.h | 3 +++ drivers/gpu/drm/omapdrm/dss/output.c | 13 +++++++++++++ 3 files changed, 34 insertions(+) commit be2d68c69e5c5a54cd2179aa6971d42cc3a49375 Author: Tomi Valkeinen Date: Mon Aug 29 13:15:02 2016 +0300 drm/omap: fix replication logic DSS uses "replication logic" to convert color components from smaller bit widths to bigger bit widths. Without replication logic, the color component would be shifted and the least significant bits would be left at 0, whereas with replication logic, the least significat bits will be filled with the most significant bit. For some reason omapdrm leaves replication logic always to off, which, in the most common case, means that showing 16-bit RGB colors on 24-bit display gives a bit darker colors than expected. The reset value of the replication logic bit is enabled, and it should always be set, as there's no practical reason to disable it. This patch removes the option to disable it from omapdrm, and always sets it to enabled in dispc. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 7 ++++--- drivers/gpu/drm/omapdrm/dss/omapdss.h | 3 +-- drivers/gpu/drm/omapdrm/omap_plane.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit b8480cab36ecc99dc3a1c5c50d8c7d7b19e0011a Author: Tomi Valkeinen Date: Tue Nov 10 17:59:49 2015 -0600 drm/omap: remove unused dispc_wb_enable & dispc_wb_is_enabled Remove two unused WB functions. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dispc.c | 10 ---------- drivers/gpu/drm/omapdrm/dss/dss.h | 2 -- 2 files changed, 12 deletions(-) commit 5034b1fa0511e515c848dfb1bc54b4aaa8e12d38 Author: Tomi Valkeinen Date: Thu Nov 5 20:06:06 2015 +0200 drm/omap: remove all EXPORT_SYMBOLs from dispc.c omapdrm now uses dispc_ops instead of direct function calls so we can remove all EXPORT_SYMBOLs from dispc. Most of the functions can also be made static, but a few are used outside dispc.c. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc.c | 84 +++++++++++++---------------------- drivers/gpu/drm/omapdrm/dss/dss.h | 3 ++ drivers/gpu/drm/omapdrm/dss/omapdss.h | 42 ------------------ 3 files changed, 33 insertions(+), 96 deletions(-) commit 9f759225e42b00ad0c5a55907f443b388e8960f4 Author: Tomi Valkeinen Date: Thu Nov 5 18:39:52 2015 +0200 drm/omap: use dispc_ops Change omapdrm to get dispc_ops and use that to call the dispc functions instead or direct function calls. The change is very straightforward. The only problem was in omap_crtc_init() which calls pipe2vbl(crtc), and at that point of time the crtc->dev link, which is used to get the dispc_ops, has not been set up yet. This patch makes omap_crtc_init() skip the call to pipe2vbl() and instead calls dispc_ops->mgr_get_vsync_irq() directly. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 36 +++++++++++++++++++++++------------- drivers/gpu/drm/omapdrm/omap_drv.c | 10 ++++++---- drivers/gpu/drm/omapdrm/omap_drv.h | 2 ++ drivers/gpu/drm/omapdrm/omap_irq.c | 33 +++++++++++++++++---------------- drivers/gpu/drm/omapdrm/omap_plane.c | 15 +++++++++------ 5 files changed, 57 insertions(+), 39 deletions(-) commit a1a37647d240ffb0b6480c2ecd1b02a4c21f6926 Author: Tomi Valkeinen Date: Thu Nov 5 19:44:38 2015 +0200 drm/omap: fill dispc_ops This patch changes the current omapdss driver to fill a dispc_ops struct and set it to omapdss-base. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc.c | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 8a13398c3f01bc14369b879e9158391c0d447dcc Author: Tomi Valkeinen Date: Thu Nov 5 19:36:02 2015 +0200 drm/omap: add dispc_ops We want to change the dispc API from plain functions to a struct with functions pointers, so that omapdrm can call either omapdss or omapdss6 depending on the platform. This patch adds 'struct dispc_ops' and adds functions to omapdss-base to set and get the ops. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/base.c | 13 +++++++++ drivers/gpu/drm/omapdrm/dss/omapdss.h | 50 +++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) commit c283400aa5898279dbae0fe00a2ce8e0f61eb22c Author: Tomi Valkeinen Date: Thu Nov 5 19:54:33 2015 +0200 drm/omap: move dispc related dss-feat funcs to dispc omapdrm still uses a few non-dispc functions: dss_feat_get_num_mgrs(), dss_feat_get_num_ovls() and dss_feat_get_supported_color_modes(). We want to provide omapdrm a single dispc_ops function pointer struct so that omapdrm will use either the current omapdss or the new omapdss6 driver depending on the platform. Those three functions are really dispc functions, but are located in the dss_features.c for legacy reasons. This patch adds similar functionss to the dispc, and changes omapdrm to use those new functions. Underneath the functions still call the functions from dss_feature.c. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dispc.c | 18 ++++++++++++++++++ drivers/gpu/drm/omapdrm/dss/dss_features.c | 3 --- drivers/gpu/drm/omapdrm/dss/dss_features.h | 4 ++++ drivers/gpu/drm/omapdrm/dss/omapdss.h | 5 +++++ drivers/gpu/drm/omapdrm/omap_drv.c | 4 ++-- drivers/gpu/drm/omapdrm/omap_irq.c | 2 +- drivers/gpu/drm/omapdrm/omap_plane.c | 2 +- 7 files changed, 31 insertions(+), 7 deletions(-) commit 82e83f67a917d68b22382be8cf63d50c28758be4 Author: Tomi Valkeinen Date: Thu Nov 5 17:26:18 2015 +0200 drm/omap: move display, dss-of, output to omapdss-base This patch moves the common parts of omapdss to omapdss-base so that both the current omapdss driver and the new omapdss6 driver can use them. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/Makefile | 6 +++--- drivers/gpu/drm/omapdrm/dss/display.c | 2 -- drivers/gpu/drm/omapdrm/dss/dss-of.c | 3 ++- drivers/gpu/drm/omapdrm/dss/dss.h | 4 ---- drivers/gpu/drm/omapdrm/dss/omapdss.h | 3 +++ drivers/gpu/drm/omapdrm/dss/output.c | 1 - 6 files changed, 8 insertions(+), 11 deletions(-) commit 892fdcb05e3123192fb954a02fe75b9444d001a3 Author: Tomi Valkeinen Date: Tue Nov 10 15:50:53 2015 +0200 drm/omap: display: don't use dsi_get_pixel_size() display.c uses dsi_get_pixel_size() which is implemented in the DSI driver, and we won't have that in the omapdss-base module, to which we want to move display.c This patch changes display.c not to use dsi_get_pixel_size(). The call can be replaced with a simple check for OMAP_DSS_DSI_FMT_RGB565. We can also make dsi_get_pixel_size() static as it's no longer used outside dsi.c. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/display.c | 6 +++--- drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +- drivers/gpu/drm/omapdrm/dss/dss.h | 8 -------- 3 files changed, 4 insertions(+), 12 deletions(-) commit 39637e10032a15dc56abef1846d5be47698be1bb Author: Tomi Valkeinen Date: Fri Nov 6 15:26:39 2015 +0200 drm/omap: output: use dev_err instead of DSSERR We don't have omapdss's custom error printing functions in the common omapdss-base module, to which we want to move output.c. This patch changes output.c to use dev_err instead of DSSERR so that it doesn't depend on DSSERR. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/output.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 7c299716297c9a90b31d1f627f003a0de9c48318 Author: Tomi Valkeinen Date: Thu Nov 5 17:23:14 2015 +0200 drm/omap: move dss_initialized to omapdss-base omapdss_is_initialized() is used to find out if omapdss has been probed successfully. This patch moves the related code to the common omapdss-base module, so that the same support will be there for both omapdss and omapdss6. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/base.c | 14 ++++++++++++++ drivers/gpu/drm/omapdrm/dss/dss.c | 12 ++---------- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 ++ 3 files changed, 18 insertions(+), 10 deletions(-) commit a99ac0d9f6fd5f50ebf5cdab84ab9f855c46cdb2 Author: Tomi Valkeinen Date: Thu Nov 5 17:19:32 2015 +0200 drm/omap: add omapdss-base.ko We are working towards enabling omapdss6, which will consists of a new dss, dispc and dpi drivers. omapdss6 will be a new module. The panel, encoder and omapdrm will need to use either the current omapdss driver or the new omapdss6 driver, depending on the platform. This will be implemented with a common base module and function pointers. This patch adds a skeleton omapdss-base.ko module, to which we'll be moving common dss functionality like registration of the panels. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/Kconfig | 4 ++++ drivers/gpu/drm/omapdrm/dss/Makefile | 4 ++++ drivers/gpu/drm/omapdrm/dss/base.c | 6 ++++++ 3 files changed, 14 insertions(+) commit d5e7efad7b34750942883997ff67e8afd4f883cc Author: Tomi Valkeinen Date: Fri May 27 13:49:05 2016 +0300 drm/omap: fix HDMI sync polarities While implementing writeback support, odd behavior of WBDELAYCOUNT was observed with the combination of WB capture and HDMI. The result of the debugging was that the HDMI sync polarities are not set correctly. The current code sets the sync polarities going from HDMI WP to DISPC according to the video mode used, which seems to work normally fine, but causes problems with WB as WB expects the syncs to be active-high. This patch changes the HDMI sync polarities so that the DISPC always gets active-high syncs from HDMI WP, and the HDMI core gets sync polarities according to the used video mode. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/hdmi_wp.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 5f6ab8ca18f2cd7ece8626a31bd656e5e7bc9425 Author: Hemant Hariyani Date: Tue Jun 7 13:23:19 2016 -0500 drm/omap: Add support for render nodes Add support for render nodes in omap driver and allow required ioctls to be accessible via render nodes. This enables unprivileged clients to allocate resources like GEM buffers for rendering their content into. Mode setting (KMS ioctls) is not allowed using render nodes. These buffers are then shared with a previleged process (e.g compositor) that has mode setting access. An example of this use case is Android where the hardware composer is the only master and has mode setting access. Every other client then uses render node(e.g /dev/dri/renderD128 to allocate and use its buffers. Signed-off-by: Hemant Hariyani Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 7bbdef2b4b77be09910b9ae71b27ee29a8cdad0c Author: Tomi Valkeinen Date: Wed Aug 10 11:04:29 2016 +0300 drm/omap: improve DPI clock selection on DRA7xx The clock source selection for the LCD outputs is too hardcoded at the moment. For example, LCD3 is set to use PLL2_1, and PLL2 doesn't exist on DRA72x SoCs. There are quite many ways to configure the clocks, even using HDMI PLL for LCD outputs, but enabling full configuration of the clocks is rather tricky. This patch improves the situation a bit by checking if the PLL about to be used exists, and if not, tries another one. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dpi.c | 50 +++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 10 deletions(-) commit 1e90711d237fef7b3781706d8202304b1e646271 Author: Tomi Valkeinen Date: Tue Aug 23 12:35:39 2016 +0300 drm/omap: decrease min width & height mode_config's min_width and min_height are both set to 32, which is overly restrictive. The real limits depend on whether we're configuring a crtc or a plane, but a limit of 8x2 is safe for both cases. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/omap_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0e81798e21ae2fb9744c8727383977ddbf8a3cf9 Author: Tomi Valkeinen Date: Mon Aug 8 13:40:35 2016 +0300 drm/omap: remove divider constraint from hsdiv The driver only uses even dividers for hsdiv when pclk >= 100MHz, as odd dividers can create uneven duty cycle. However, while this holds true for some dividers like DISPC's LCK and PCK dividers, it is not actually true for hsdiv. hsdiv always produces even duty cycle, so the constraint can be removed. Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/dpi.c | 8 -------- 1 file changed, 8 deletions(-) commit 7e3d92749dd773b8a1bd35b02e2aa1271cb7a31b Author: Tomi Valkeinen Date: Mon Aug 10 12:08:50 2015 +0300 drm/omap: refactor CRTC HW property setup The current driver doesn't expose any of the CRTC HW properties like background color or transparency key, and sets them at CRTC enable time. Refactor this into a separate function and call that function from omap_crtc_atomic_flush(). This is the behavior we want when the properties can be configured, so this patch makes it easier to add patches later which implement those properties. Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 7d267f068a8b4944d52e8b0ae4c8fcc1c1c5c5ba Author: Tomi Valkeinen Date: Tue Jan 5 11:43:13 2016 +0200 drm/omap: work-around for errata i886 DRA7 errata i886 (FPDLink PLL Unlocks With Certain SoC PLL M/N Values) says that FPDLink is sensitive to jitter on the vout clock, and that low PLL M and N values result in more jitter than high M and N values. This patch implements a workaround for the problem by changing the PLL setup to search for clocks starting from high M and N values, instead of low values. This should not cause any functional change, and only reduces the jitter. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart drivers/gpu/drm/omapdrm/dss/pll.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 21b825e404f0bb1b09d2c67edc019a43eee291cd Author: Bruno Herrera Date: Wed Feb 1 02:25:00 2017 +0100 dt-bindings: Document the STM32 USB OTG DWC2 core binding This patch adds the documentation for STM32F4x9 USB OTG FS/HS compatible strings. Signed-off-by: Bruno Herrera Acked-by: Rob Herring Signed-off-by: Alexandre TORGUE Documentation/devicetree/bindings/usb/dwc2.txt | 4 ++++ 1 file changed, 4 insertions(+) commit b1f81e0ccb5116abd08db0c7002b76ea3959bd2f Author: Bruno Herrera Date: Wed Feb 1 02:25:00 2017 +0100 ARM: dts: stm32: Enable USB HS in FS mode (embedded phy) on stm32f429-disco This patch enables USB HS working in FS mode on stm32f429-disco with 5V VBUS enable. Signed-off-by: Bruno Herrera Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429-disco.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit c888cc51cf1b0dfc48643ed9f34e35b66d25878a Author: Bruno Herrera Date: Wed Feb 1 02:25:00 2017 +0100 ARM: dts: stm32: Enable USB FS on stm32f469-disco This patch enables USB FS on stm32f469-disco with 5V VBUS enable. Signed-off-by: Bruno Herrera Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f469-disco.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit cd9ef1eff03ed79973c6df1601480077b302d2f5 Author: Bruno Herrera Date: Wed Feb 1 02:25:00 2017 +0100 ARM: dts: stm32: Add USB FS support for STM32F429 MCU This patch adds the USB pins and nodes for USB FS core. Signed-off-by: Bruno Herrera Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit b5effd3815ccbe3df1a015a6d67d8a24a27813d5 Author: Peter Zijlstra Date: Thu Mar 30 17:49:27 2017 +0200 debug: Fix __bug_table[] in arch linker scripts The kbuild test robot reported this build failure on a number of architectures: > make.cross ARCH=arm > lib/lib.a(bug.o): In function `find_bug': > >> lib/bug.c:135: undefined reference to `__start___bug_table' > >> lib/bug.c:135: undefined reference to `__stop___bug_table' Caused by: 19d436268dde ("debug: Add _ONCE() logic to report_bug()") Which moved the BUG_TABLE from RO_DATA_SECTION() to RW_DATA_SECTION(), but a number of architectures don't use RW_DATA_SECTION(), so they ended up with no __bug_table[] ... Ideally all those would use RW_DATA_SECTION() in their linker scripts, but that's for another day. Signed-off-by: Peter Zijlstra Cc: Linus Torvalds Cc: Thomas Gleixner Cc: kbuild test robot Cc: kbuild-all@01.org Cc: tipbuild@zytor.com Link: http://lkml.kernel.org/r/20170330154927.o6qmgfp4bdhrajbm@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar arch/arm/kernel/vmlinux-xip.lds.S | 2 ++ arch/arm/kernel/vmlinux.lds.S | 2 ++ arch/avr32/kernel/vmlinux.lds.S | 1 + arch/blackfin/kernel/vmlinux.lds.S | 2 ++ arch/c6x/kernel/vmlinux.lds.S | 2 ++ arch/cris/kernel/vmlinux.lds.S | 2 ++ arch/frv/kernel/vmlinux.lds.S | 2 ++ arch/ia64/kernel/vmlinux.lds.S | 2 ++ arch/mips/kernel/vmlinux.lds.S | 1 + arch/powerpc/kernel/vmlinux.lds.S | 2 ++ arch/x86/kernel/vmlinux.lds.S | 1 + 11 files changed, 19 insertions(+) commit ffdc394e1b4285f8b85663f44f1cbd43003523a7 Author: Antoine Tenart Date: Wed Mar 29 11:38:27 2017 +0200 ARM: dts: alpine: add valid clock-frequency values Update the Alpine clock-frequency values with valid default values. The bootloader can still update these values if needed, but at least we can boot if it does not. Signed-off-by: Antoine Tenart arch/arm/boot/dts/alpine.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 52545888010f8e8993063ed1e1641e2ec6988e84 Author: Antoine Tenart Date: Wed Mar 29 11:38:26 2017 +0200 ARM: dts: alpine: add spaces before the uart node units. Cosmetic cleanup to have consistent node definitions. Add a space before the node units which do not have one. Signed-off-by: Antoine Tenart arch/arm/boot/dts/alpine.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 70c4b99a3ae76463d074e3f5797df42562c1ce60 Author: Antoine Tenart Date: Wed Mar 29 11:38:25 2017 +0200 ARM: dts: alpine: remove 0x's from the uart1 node unit address Remove 0x's from the uart1 node unit address to have consistent nodes. Signed-off-by: Antoine Tenart arch/arm/boot/dts/alpine.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f87e7f25893d7db4da465c6b50882197e518d4af Author: Takashi Iwai Date: Wed Mar 29 08:46:00 2017 +0200 ALSA: hda - Improved position reporting on SKL+ Apply the same methods to obtain the current stream position as ASoC Intel SKL driver uses. It reads the position from DPIB for a playback stream while it still reads from the position buffer for a capture stream. For a capture stream, some ugly workaround is needed to settle down the inconsistent position. Acked-by: Vinod Koul Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) commit 70eafad849f8af3a83e139eda36712d3c1da5b6a Author: Takashi Iwai Date: Wed Mar 29 08:39:19 2017 +0200 ALSA: hda - Move SKL+ vendor specific register definitions to hda_register.h They may be used by both legacy and ASoC drivers. Acked-by: Vinod Koul Signed-off-by: Takashi Iwai include/sound/hda_register.h | 22 ++++++++++++++++++++-- sound/pci/hda/hda_intel.c | 4 ++-- sound/soc/intel/skylake/skl.h | 21 --------------------- 3 files changed, 22 insertions(+), 25 deletions(-) commit 2c1f81381eadc6dd3c288ec4477b2fe572cf86dc Author: Takashi Iwai Date: Wed Mar 29 08:27:15 2017 +0200 ALSA: hda - Avoid tricky macros The macros _snd_hdac_chip_read() and *_write() expand to different types (b,w,l) per their argument. They were thought to be used only internally for other snd_hdac_chip_*() macros, but in some situations we need to call these directly, and they are way too ugly. Instead of saving a few lines, we just write these macros explicitly with the types, so that they can be used in a saner way. Acked-by: Vinod Koul Signed-off-by: Takashi Iwai include/sound/hdaudio.h | 28 ++++++++++++++++++---------- sound/hda/hdac_controller.c | 2 +- sound/hda/hdac_stream.c | 4 ++-- 3 files changed, 21 insertions(+), 13 deletions(-) commit 320d8c3d38739fa8e31a076b86cbdafcf8897d5e Merge: 7558ab6 b121b05 Author: Dave Airlie Date: Mon Apr 3 16:30:24 2017 +1000 Merge tag 'drm-misc-next-2017-03-31' of git://anongit.freedesktop.org/git/drm-misc into drm-next drm-misc for 4.12: Core: - Removed some fb subsampling dimension checks from core (Ville) - Some MST slot cleanup (Dhinakaran) - Extracted drm_debugfs.h & drm_ioctl.h from drmP.h (Daniel) - Added drm_atomic_helper_shutdown() to compliment suspend/resume counterparts (Daniel) - Pipe context through legacy modeset to remove legacy_backoff nasties (Daniel) - Cleanups around vblank as well as allowing lockless counter reads (Chris W.) - VGA Switcheroo added to MAINTAINERS with Lukas Wunner as reviewer (Lukas) Drivers: - Enhancements to rockchip driver probe (Jeffy) and dsi (Chris Z.) - Thunderbolt external GPU awareness added (Lukas) * tag 'drm-misc-next-2017-03-31' of git://anongit.freedesktop.org/git/drm-misc: (63 commits) apple-gmux: Don't switch external DP port on 2011+ MacBook Pros drm/nouveau: Don't register Thunderbolt eGPU with vga_switcheroo drm/amdgpu: Don't register Thunderbolt eGPU with vga_switcheroo drm/radeon: Don't register Thunderbolt eGPU with vga_switcheroo PCI: Recognize Thunderbolt devices MAINTAINERS: Add Lukas Wunner as reviewer for vga_switcheroo drm: Fix locking gotcha in page_flip ioctl drm: Clarify the role of plane_state argument to drm_simple update(). drm: Clear e after kfree in drm_mode_page_flip_ioctl drm: Convert cmpxchg(bool) back to a two step operation drm/bridge: ti-tfp410: support hpd via gpio drm: use .hword to represent 16-bit numbers Revert unrelated part of "drm: simplify the locking in the GETCRTC ioctl" drm: Fixup failure paths in drm_atomic_helper_set_config drm: Peek at the current counter/timestamp for vblank queries drm: Refactor vblank sequence number comparison drm: vblank cannot be enabled if dev->irq_enabled is false drm: Mark up accesses of vblank->enabled outside of its spinlock drm: Make the decision to keep vblank irq enabled earlier drm/atomic-helper: Remove the backoff hack from set_config ... commit 63f44d65143976af9b28cf70ebe23f2c8b38677a Author: Michael Ellerman Date: Mon Apr 3 15:29:34 2017 +1000 powerpc/book3s: Print task info if we take a machine check in user mode For an MCE (Machine Check Exception) that hits while in user mode MSR(PR=1), print the task info to the console MCE error log. This may help to identify an application that triggered the MCE. After this patch the MCE console looks like: Severe Machine check interrupt [Recovered] NIP: [0000000010039778] PID: 762 Comm: ebizzy Initiator: CPU Error type: SLB [Multihit] Effective address: 0000000010039778 Severe Machine check interrupt [Not recovered] NIP: [0000000010039778] PID: 763 Comm: ebizzy Initiator: CPU Error type: UE [Page table walk ifetch] Effective address: 0000000010039778 ebizzy[763]: unhandled signal 7 at 0000000010039778 nip 0000000010039778 lr 0000000010001b44 code 30004 Signed-off-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mce.h | 3 ++- arch/powerpc/kernel/mce.c | 15 ++++++++++++--- arch/powerpc/platforms/powernv/opal.c | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) commit 5b1d6fc2d4d927852214f2a7e2a8eb1bdce3b574 Author: Mahesh Salgaonkar Date: Tue Mar 28 19:15:04 2017 +0530 powerpc/book3s: Print the kernel function name in machine check For D-side errors we print the load/store address that caused the machine check as 'Effective address'. But the instruction that may have caused the machine check can also be helpful, so in addition to printing the NIP, also print the kernel function name as well. After this patch the MCE console log would look like: Severe Machine check interrupt [Recovered] NIP [d00000001bc70194]: init_module+0x194/0x2b0 [bork_kernel] Initiator: CPU Error type: SLB [Parity] Effective address: d000000026de0000 Signed-off-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman arch/powerpc/kernel/mce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba515d3407dccfe3b4597f4afdaaf2ef1beb48e1 Author: Daniel Vetter Date: Mon Apr 3 07:52:18 2017 +0200 drm/i915: Update DRIVER_DATE to 20170403 Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a68ee76f4a2880c12fa18359a0e85e6a05c95147 Author: Peter Senna Tschudin Date: Thu Mar 30 10:19:28 2017 +0200 drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: Fix bridge initialization Reordering of the device nodes based on unit address resulted in ge_b850v3_lvds_attach() being called before ge_b850v3_lvds_ptr->stdp4028_i2c was populated. This patch moves the drm bridge initialization from ge_b850v3_lvds_init() to stdp4028_ge_b850v3_fw_probe() ensuring that ge_b850v3_lvds_ptr->stdp4028_i2c is properly populated. Signed-off-by: Peter Senna Tschudin Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170330081928.8537-1-peter.senna@collabora.com drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit d4f4b915829bb5b51b42ee909e6ea3302a715550 Merge: d3fbff3 087d975 Author: David S. Miller Date: Sun Apr 2 19:41:01 2017 -0700 Merge branch 'rds-minor-bug-fixes' Sowmini Varadhan says: ==================== rds: tcp: couple of minor bug fixes A couple of minor bugfixes that showed up during testing ==================== Signed-off-by: David S. Miller commit 087d975353d0cc9b7536d6ef46cd9303fceb2e17 Author: Sowmini Varadhan Date: Fri Mar 31 15:56:31 2017 -0700 rds: tcp: canonical connection order for all paths with index > 0 The rds_connect_worker() has a bug in the check that enforces the canonical connection order described in the comments of rds_tcp_state_change(). The intention is to make sure that all the multipath connections are always initiated by the smaller IP address via rds_start_mprds. To achieve this, rds_connection_worker should check that cp_index > 0. Signed-off-by: Sowmini Varadhan Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/threads.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e97656d03ca0cea888a0b9d382abce8233771f31 Author: Sowmini Varadhan Date: Fri Mar 31 15:56:30 2017 -0700 rds: tcp: allow progress of rds_conn_shutdown if the rds_connection is marked ERROR by an intervening FIN rds_conn_shutdown() runs in workq context, and marks the rds_connection as DISCONNECTING before quiescing Tx/Rx paths. However, after all I/O has quiesced, we may still find the rds_connection state to be RDS_CONN_ERROR if an intervening FIN was processed in softirq context. This is not a fatal error: rds_conn_shutdown() should continue the shutdown, and there is no need to log noisy messages about this event. Signed-off-by: Sowmini Varadhan Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/connection.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit d3fbff306c215946cdbcf9ace4d0b78e9f72b5c4 Author: Eric Dumazet Date: Fri Mar 31 14:59:25 2017 -0700 sock: correctly test SOCK_TIMESTAMP in sock_recv_ts_and_drops() It seems the code does not match the intent. This broke packetdrill, and probably other programs. Fixes: 6c7c98bad488 ("sock: avoid dirtying sk_stamp, if possible") Signed-off-by: Eric Dumazet Cc: Paolo Abeni Acked-by: Paolo Abeni Signed-off-by: David S. Miller include/net/sock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e270e966868530d2667ac0a0b1080560b2965408 Author: Andrew Morton Date: Fri Mar 31 13:09:41 2017 -0700 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c: fix build with gcc-4.4.4 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c: In function 'mlx5e_set_rxfh': drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:1067: error: unknown field 'rss' specified in initializer drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:1067: warning: missing braces around initializer drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:1067: warning: (near initialization for 'rrp.') drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:1068: error: unknown field 'rss' specified in initializer drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:1069: warning: excess elements in struct initializer drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:1069: warning: (near initialization for 'rrp') gcc-4.4.4 has issues with anonymous union initializers. Work around this. Cc: Saeed Mahameed Cc: Tariq Toukan Signed-off-by: Andrew Morton Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 956327913c2e23048d7a586414bafe7ec0c2a887 Author: Andrew Morton Date: Fri Mar 31 13:09:38 2017 -0700 drivers/net/ethernet/mellanox/mlx5/core/en_main.c: fix build with gcc-4.4.4 drivers/net/ethernet/mellanox/mlx5/core/en_main.c: In function 'mlx5e_redirect_rqts': drivers/net/ethernet/mellanox/mlx5/core/en_main.c:2210: error: unknown field 'rqn' specified in initializer drivers/net/ethernet/mellanox/mlx5/core/en_main.c:2211: warning: missing braces around initializer drivers/net/ethernet/mellanox/mlx5/core/en_main.c:2211: warning: (near initialization for 'direct_rrp.') drivers/net/ethernet/mellanox/mlx5/core/en_main.c: In function 'mlx5e_redirect_rqts_to_channels': drivers/net/ethernet/mellanox/mlx5/core/en_main.c:2227: error: unknown field 'rss' specified in initializer drivers/net/ethernet/mellanox/mlx5/core/en_main.c:2227: warning: missing braces around initializer drivers/net/ethernet/mellanox/mlx5/core/en_main.c:2227: warning: (near initialization for 'rrp.') drivers/net/ethernet/mellanox/mlx5/core/en_main.c:2227: warning: initialization makes integer from pointer without a cast drivers/net/ethernet/mellanox/mlx5/core/en_main.c:2228: error: unknown field 'rss' specified in initializer drivers/net/ethernet/mellanox/mlx5/core/en_main.c:2229: warning: excess elements in struct initializer drivers/net/ethernet/mellanox/mlx5/core/en_main.c:2229: warning: (near initialization for 'rrp') drivers/net/ethernet/mellanox/mlx5/core/en_main.c: In function 'mlx5e_redirect_rqts_to_drop': drivers/net/ethernet/mellanox/mlx5/core/en_main.c:2238: error: unknown field 'rqn' specified in initializer drivers/net/ethernet/mellanox/mlx5/core/en_main.c:2239: warning: missing braces around initializer drivers/net/ethernet/mellanox/mlx5/core/en_main.c:2239: warning: (near initialization for 'drop_rrp.') gcc-4.4.4 has issues with anonymous union initializers. Work around this. Cc: Saeed Mahameed Cc: Tariq Toukan Signed-off-by: Andrew Morton Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 44781fef1378969ea974b1b000ce7f3167eee459 Author: Joao Pinto Date: Fri Mar 31 14:22:02 2017 +0100 net: stmmac: fix cbs configuration Sending again, because forgot to include net-dev. The QoS IP does not accept AVB capabilities to default/queue 0, this way we guarantee 75% bandwidth for AVB. This patch assures that only queues >= 1 gets CBS confgured. Additional info was also added to stmmac.txt. Reported-by: Niklas Cassel Signed-off-by: Joao Pinto Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/stmmac.txt | 2 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit ddb99e118e37f324a4be65a411bb60ae62795cf9 Author: Elena Reshetova Date: Fri Mar 31 15:20:49 2017 +0300 security, keys: convert key_user.usage from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Acked-by: David Howells Signed-off-by: James Morris security/keys/internal.h | 3 ++- security/keys/key.c | 6 +++--- security/keys/proc.c | 2 +- security/keys/process_keys.c | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) commit fff292914d3a2f1efd05ca71c2ba72a3c663201e Author: Elena Reshetova Date: Fri Mar 31 15:20:48 2017 +0300 security, keys: convert key.usage from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Acked-by: David Howells Signed-off-by: James Morris include/linux/key.h | 5 +++-- security/keys/gc.c | 2 +- security/keys/key.c | 6 +++--- security/keys/keyring.c | 8 ++++---- security/keys/proc.c | 2 +- security/keys/request_key_auth.c | 2 +- 6 files changed, 13 insertions(+), 12 deletions(-) commit f504d47be5e8fa7ecf2bf660b18b42e6960c0eb2 Author: Jonathan Corbet Date: Sun Apr 2 15:18:32 2017 -0600 docs: Convert unshare.txt to RST and add to the user-space API manual This is a straightforward conversion, without any real textual changes. Since this document has seen no substantive changes since its addition in 2006, some such changes are probably warranted. Signed-off-by: Jonathan Corbet Documentation/unshare.txt | 295 ---------------------------- Documentation/userspace-api/index.rst | 2 + Documentation/userspace-api/unshare.rst | 332 ++++++++++++++++++++++++++++++++ 3 files changed, 334 insertions(+), 295 deletions(-) commit 1d596dee3862bc14895ba15afe69c4e85c6d6124 Author: Jonathan Corbet Date: Sun Apr 2 14:58:01 2017 -0600 docs: Create a user-space API guide This is meant to be the place for documentation relevant to application developers. It's empty for the moment, but at least we have a place now! Signed-off-by: Jonathan Corbet Documentation/index.rst | 12 ++++++++++++ Documentation/userspace-api/conf.py | 10 ++++++++++ Documentation/userspace-api/index.rst | 24 ++++++++++++++++++++++++ 3 files changed, 46 insertions(+) commit 0e056eb5530da802c07f080d6bbd43c50e799efd Author: mchehab@s-opensource.com Date: Thu Mar 30 17:11:36 2017 -0300 kernel-api.rst: fix a series of errors when parsing C files ./lib/string.c:134: WARNING: Inline emphasis start-string without end-string. ./mm/filemap.c:522: WARNING: Inline interpreted text or phrase reference start-string without end-string. ./mm/filemap.c:1283: ERROR: Unexpected indentation. ./mm/filemap.c:3003: WARNING: Inline interpreted text or phrase reference start-string without end-string. ./mm/vmalloc.c:1544: WARNING: Inline emphasis start-string without end-string. ./mm/page_alloc.c:4245: ERROR: Unexpected indentation. ./ipc/util.c:676: ERROR: Unexpected indentation. ./drivers/pci/irq.c:35: WARNING: Block quote ends without a blank line; unexpected unindent. ./security/security.c:109: ERROR: Unexpected indentation. ./security/security.c:110: WARNING: Definition list ends without a blank line; unexpected unindent. ./block/genhd.c:275: WARNING: Inline strong start-string without end-string. ./block/genhd.c:283: WARNING: Inline strong start-string without end-string. ./include/linux/clk.h:134: WARNING: Inline emphasis start-string without end-string. ./include/linux/clk.h:134: WARNING: Inline emphasis start-string without end-string. ./ipc/util.c:477: ERROR: Unknown target name: "s". Signed-off-by: Mauro Carvalho Chehab Acked-by: Bjorn Helgaas Signed-off-by: Jonathan Corbet block/genhd.c | 7 ++++--- drivers/pci/irq.c | 2 +- include/linux/clk.h | 4 ++-- ipc/util.c | 12 +++++++----- lib/string.c | 2 +- mm/filemap.c | 18 ++++++++++-------- mm/page_alloc.c | 3 ++- mm/vmalloc.c | 2 +- security/security.c | 12 ++++++++---- 9 files changed, 36 insertions(+), 26 deletions(-) commit 40bf19a8d9af96c0fd3a2b94a407d7eada6f2853 Author: mchehab@s-opensource.com Date: Thu Mar 30 17:11:35 2017 -0300 kernel-api.rst: fix some complex tags at lib/bitmap.c Fix the following issues: ./lib/bitmap.c:869: WARNING: Definition list ends without a blank line; unexpected unindent. ./lib/bitmap.c:876: WARNING: Inline emphasis start-string without end-string. ./lib/bitmap.c:508: ERROR: Unexpected indentation. And make sure that a table and a footnote will use the right tags. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet lib/bitmap.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit 6cc89134c07b223038be9de7854364bb7ba3a210 Author: mchehab@s-opensource.com Date: Thu Mar 30 17:11:33 2017 -0300 kernel-api.rst: fix output of the vsnprintf() documentation The vsnprintf() kernel-doc comment uses % character with a special meaning other than escaping a constant. As ReST already defines ``literal`` as an escape sequence, let's make kernel-doc handle it, and use it at lib/vsprintf.c. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet lib/vsprintf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c7e2c0643d7850ff41a0b24d8c11f2a856bb4537 Author: Mauro Carvalho Chehab Date: Fri Mar 31 18:17:00 2017 -0300 docs-rst: core_api: move driver-specific stuff to drivers_api There are several stuff there that are actually driver-specific. Move those to the driver_api book. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/core-api/kernel-api.rst | 72 ---------------------- Documentation/driver-api/firmware/index.rst | 1 + .../driver-api/firmware/other_interfaces.rst | 15 +++++ Documentation/driver-api/index.rst | 2 + Documentation/driver-api/misc_devices.rst | 5 ++ Documentation/driver-api/pci.rst | 50 +++++++++++++++ 6 files changed, 73 insertions(+), 72 deletions(-) commit 61c8830bc18dc035fa9d7a9538c735846edbc623 Author: Mauro Carvalho Chehab Date: Thu Mar 30 17:11:34 2017 -0300 kernel-api.rst: make it handle lib/crc32.c This file has only "internal" functions: ./lib/crc32.c:1: warning: no structured comments found Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/core-api/kernel-api.rst | 1 - 1 file changed, 1 deletion(-) commit baca8a0c990a8281573d9317b8bbeb18fb12a863 Author: Mauro Carvalho Chehab Date: Thu Mar 30 17:11:32 2017 -0300 kernel-api.tmpl: convert it to ReST Brainless conversion of genericirq.tmpl book to ReST, via Documentation/sphinx/tmplcvt Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/DocBook/Makefile | 2 +- Documentation/DocBook/kernel-api.tmpl | 331 --------------------------- Documentation/core-api/index.rst | 1 + Documentation/core-api/kernel-api.rst | 419 ++++++++++++++++++++++++++++++++++ 4 files changed, 421 insertions(+), 332 deletions(-) commit 76d40fae13518e6c672cc7dcf78e66ca2cd3cb44 Author: Mauro Carvalho Chehab Date: Thu Mar 30 17:11:31 2017 -0300 genericirq.rst: add cross-reference links and use monospaced fonts The document describes several functions that are documented there via kernel doc macros. Add cross-references to them. In order to be consistend with other documents, use monospaced fonts for fields. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/core-api/genericirq.rst | 97 +++++++++++++++++------------------ 1 file changed, 46 insertions(+), 51 deletions(-) commit 3bd3b99ab6ec0cf9d39bcf82ea05326c0aa0013e Author: Mauro Carvalho Chehab Date: Thu Mar 30 17:11:30 2017 -0300 genericirq.tmpl: convert it to ReST Brainless conversion of genericirq.tmpl book to ReST, via Documentation/sphinx/tmplcvt Copyright information inserted manually. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/DocBook/Makefile | 2 +- Documentation/DocBook/genericirq.tmpl | 520 ---------------------------------- Documentation/core-api/genericirq.rst | 445 +++++++++++++++++++++++++++++ Documentation/core-api/index.rst | 1 + 4 files changed, 447 insertions(+), 521 deletions(-) commit f9b5c5304ce212b72c5c997b298ab96002e1634f Author: Mauro Carvalho Chehab Date: Thu Mar 30 17:11:29 2017 -0300 scripts/kernel-doc: fix handling of parameters with parenthesis lib/crc32c defines one parameter as: const u32 (*tab)[256] Better handle parenthesis, to avoid those warnings: ./lib/crc32.c:149: warning: No description found for parameter 'tab)[256]' ./lib/crc32.c:149: warning: Excess function parameter 'tab' description in 'crc32_le_generic' ./lib/crc32.c:294: warning: No description found for parameter 'tab)[256]' ./lib/crc32.c:294: warning: Excess function parameter 'tab' description in 'crc32_be_generic' Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet scripts/kernel-doc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit b97f193abf83e30ef43317ba4883ce3a82f8e8b2 Author: Mauro Carvalho Chehab Date: Thu Mar 30 17:11:28 2017 -0300 scripts/kernel-doc: fix parser for apostrophes On ReST, adding a text like ``literal`` is valid. However, the kernel-doc script won't handle it fine. We really need this feature, in order to escape things like %ph, with is found on some C files. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet scripts/kernel-doc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 31af2f36d50e3b9b2fb7f17aa430c11c91f946c4 Author: Al Viro Date: Tue Mar 21 17:04:45 2017 -0400 sparc: switch to RAW_COPY_USER ... and drop zeroing in sparc32. Signed-off-by: Al Viro arch/sparc/Kconfig | 1 + arch/sparc/include/asm/uaccess_32.h | 29 ++++------------------------- arch/sparc/include/asm/uaccess_64.h | 33 +++++---------------------------- arch/sparc/lib/GENcopy_from_user.S | 2 +- arch/sparc/lib/GENcopy_to_user.S | 2 +- arch/sparc/lib/GENpatch.S | 4 ++-- arch/sparc/lib/NG2copy_from_user.S | 2 +- arch/sparc/lib/NG2copy_to_user.S | 2 +- arch/sparc/lib/NG2patch.S | 4 ++-- arch/sparc/lib/NG4copy_from_user.S | 2 +- arch/sparc/lib/NG4copy_to_user.S | 2 +- arch/sparc/lib/NG4patch.S | 4 ++-- arch/sparc/lib/NGcopy_from_user.S | 2 +- arch/sparc/lib/NGcopy_to_user.S | 2 +- arch/sparc/lib/NGpatch.S | 4 ++-- arch/sparc/lib/U1copy_from_user.S | 4 ++-- arch/sparc/lib/U1copy_to_user.S | 4 ++-- arch/sparc/lib/U3copy_to_user.S | 2 +- arch/sparc/lib/U3patch.S | 4 ++-- arch/sparc/lib/copy_in_user.S | 6 +++--- arch/sparc/lib/copy_user.S | 16 +--------------- 21 files changed, 37 insertions(+), 94 deletions(-) commit f64fd180ec2c0bcca2a141314db3b5d3b6bfef2f Author: Al Viro Date: Fri Mar 24 23:11:26 2017 -0400 parisc: switch to RAW_COPY_USER ... and remove dead declarations, while we are at it Signed-off-by: Al Viro arch/parisc/Kconfig | 1 + arch/parisc/include/asm/uaccess.h | 64 +++++---------------------------------- arch/parisc/lib/memcpy.c | 14 ++++----- 3 files changed, 16 insertions(+), 63 deletions(-) commit bee3f412d6fc94011850f16cddce745d529411a5 Merge: d597580 476e75a Author: Al Viro Date: Sun Apr 2 10:33:48 2017 -0400 Merge branch 'parisc-4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux into uaccess.parisc commit 67043d1853d67e3a03038654ab51df3aa8f66ae4 Author: Mahoda Ratnayaka Date: Fri Mar 31 12:01:00 2017 +1300 hwmon: (lm87) Allow channel data to be set from dts file Currently there is no method for setting the channel value from the DTS file. When, the driver uses a dts file to initialize the driver platform_data is not set. As a result channel variable may not be set correctly. Without the channel variable set correctly, some of the sensors will not be initialized correctly. For example temp3 sensor sysfs entries. This implements the schema agreed with the device tree binding document. Signed-off-by: Mahoda Ratnayaka Tested-by: Chris Packham Signed-off-by: Chris Packham Signed-off-by: Guenter Roeck drivers/hwmon/lm87.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit 36df6fb6efa1e7c29debdba9bedff57c366b8347 Author: Mahoda Ratnayaka Date: Fri Mar 31 12:00:59 2017 +1300 Documentation: dtb: lm87: Add hwmon binding documentation This patch adds lm87 hwmon device tree node documentation. Signed-off-by: Mahoda Ratnayaka Signed-off-by: Chris Packham Acked-by: Rob Herring Signed-off-by: Guenter Roeck Documentation/devicetree/bindings/hwmon/lm87.txt | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit a8ddfea09566c37aabe70fbb6d07ff232982c9f4 Author: Sam Povilus Date: Wed Mar 29 21:46:37 2017 -0600 hwmon: (ads7828) Accept optional parameters from device tree Adding the ability for the ads7828 and ads7830 to use device tree to get optional parameters instead of using platform devices. This allows people using custom boards to also use the ads7828 in a non-default manner. Signed-off-by: Sam Povilus [groeck: Fixed whitespace errors in ads7828.txt] Signed-off-by: Guenter Roeck .../devicetree/bindings/hwmon/ads7828.txt | 25 ++++++++++++++++++++++ drivers/hwmon/ads7828.c | 15 +++++++++++++ 2 files changed, 40 insertions(+) commit a4811b6cb4069eb2f17ffebcd29f2e5b0f76ee31 Author: Pali Rohár Date: Fri Mar 3 23:41:52 2017 +0100 hwmon: (dell-smm) Add Dell XPS 15 9560 into DMI list It was reported that dell-smm-hwmon is working fine on Dell XPS 15 9560. Link: http://www.spinics.net/lists/platform-driver-x86/msg10751.html Reported-by: Vasile Dumitrescu Signed-off-by: Pali Rohár Signed-off-by: Guenter Roeck drivers/hwmon/dell-smm-hwmon.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 5ba6bcbc335771c37d05b88cbfcad5441b57130b Author: Jean Delvare Date: Tue Mar 7 06:15:15 2017 -0800 hwmon: Constify str parameter of hwmon_ops->read_string The read_string callback is supposed to retrieve a pointer to a constant string. Signed-off-by: Jean Delvare Reviewed-by: Peter Huewe Signed-off-by: Guenter Roeck drivers/hwmon/hwmon.c | 2 +- include/linux/hwmon.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b3ee2785eedaaaf2fe4166594953ddcb2a85c415 Author: Marco Franchi Date: Thu Feb 16 10:23:44 2017 -0200 dt: Add vendor prefix for Sensirion Sensirion is a sensor manufacturer, providing relative humidity sensors, temperature sensor and flow sensor solutions. Signed-off-by: Marco Franchi Reviewed-by: Guenter Roeck Acked-by: Rob Herring Signed-off-by: Guenter Roeck Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit a1253027b74e74f67245798a1d71f383a84d6a37 Author: Javier Martinez Canillas Date: Fri Feb 24 10:13:12 2017 -0300 hwmon: (tmp421) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/tmp421.c | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) commit 72fc64c68decf119466d3fff61875f2958352a93 Author: Javier Martinez Canillas Date: Fri Feb 24 10:13:11 2017 -0300 hwmon: (tmp103) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/tmp103.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 15390c610fd373117607a45d67fe0a8ae381edd3 Author: Javier Martinez Canillas Date: Fri Feb 24 10:13:10 2017 -0300 hwmon: (tmp102) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/tmp102.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1c1a7b75bf6f705d9f9440dea0e6d682882e3284 Author: Javier Martinez Canillas Date: Fri Feb 24 10:13:09 2017 -0300 hwmon: (stts751) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/stts751.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 02331c3a1a8ddf8b47bb190294138d2a76e4b8d0 Author: Javier Martinez Canillas Date: Fri Feb 24 10:13:08 2017 -0300 hwmon: (ucd9200) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/ucd9200.c | 48 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) commit 8881a19187e452e72e8b1782342b2687e4c9b21d Author: Javier Martinez Canillas Date: Fri Feb 24 10:13:07 2017 -0300 hwmon: (ucd9000) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/ucd9000.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit 9e427083c3cec46435988f2ee80d643a82ec9e4c Author: Javier Martinez Canillas Date: Fri Feb 24 10:13:06 2017 -0300 hwmon: (max6697) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/max6697.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) commit 5ada7055f29800bf0f7092092a8ea4b8551e8979 Author: Javier Martinez Canillas Date: Fri Feb 24 10:13:05 2017 -0300 hwmon: (lm95245) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/lm95245.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit df8d57bf8a4ec6fbf43ce11a9d0b41985337ed0c Author: Javier Martinez Canillas Date: Fri Feb 24 10:13:04 2017 -0300 hwmon: (lm90) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 1 deletion(-) commit 00c0f9d3aedc3c3061700b9441c1d63500070be9 Author: Javier Martinez Canillas Date: Fri Feb 24 10:13:03 2017 -0300 hwmon: (lm85) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/lm85.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) commit e97a45f1b460b5ba7438fe77b7282bf25acfbed9 Author: Javier Martinez Canillas Date: Fri Feb 24 10:13:02 2017 -0300 hwmon: (lm75) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/lm75.c | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) commit b25f663b91f1adca566cbe6d9387ee155dca5a04 Author: Javier Martinez Canillas Date: Fri Feb 24 10:13:01 2017 -0300 hwmon: (lm63) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/lm63.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit bd0ddd4d0883a95e6a3d49e7174e546b2f1845cf Author: Javier Martinez Canillas Date: Fri Feb 24 10:13:00 2017 -0300 hwmon: (ina2xx) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/ina2xx.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit 0b7abe59bee79e92563e5d3a7c2aad81a78c7ba5 Author: Javier Martinez Canillas Date: Fri Feb 24 10:12:59 2017 -0300 hwmon: (ina209) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/ina209.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4e2496e419a159d907e744237384d3c1c103c76d Author: Javier Martinez Canillas Date: Fri Feb 24 10:12:58 2017 -0300 hwmon: (adt7475) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/adt7475.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit 2d688f1413aba35b3861a1d709a98693a5b0b58f Author: Javier Martinez Canillas Date: Fri Feb 24 10:12:57 2017 -0300 hwmon: (ads7828) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/ads7828.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit a140986fd0708607dbbd6321386964e44fef59a2 Author: Javier Martinez Canillas Date: Fri Feb 24 10:12:56 2017 -0300 hwmon: (ads1015) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/ads1015.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit d593e665f31c09d6421f92a99314313d09a9631d Author: Javier Martinez Canillas Date: Fri Feb 24 10:12:55 2017 -0300 hwmon: (adc128d818) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/adc128d818.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 72edf311edbcd0d04928e656421ecdfc4c9ed16a Author: Javier Martinez Canillas Date: Fri Feb 24 10:12:54 2017 -0300 hwmon: (ad7414) Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Guenter Roeck drivers/hwmon/ad7414.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 0d0235301b3a530e1e8ffedab72ba38ca9aa2ac6 Author: Katsumi Sato Date: Wed Feb 22 13:32:10 2017 +0900 hwmon: (w83627ehf) Use request_muxed_region Serialize access to the hardware by using "request_muxed_region". Call to this macro will hold off the requestor if the resource is currently busy. "superio_enter" will return an error if call to "request_muxed_region" fails. Signed-off-by: Katsumi Sato Signed-off-by: Atsushi Nemoto Signed-off-by: Guenter Roeck drivers/hwmon/w83627ehf.c | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) commit 3dead5d59631ebc72c327637e1053b7c26723709 Author: Chris Packham Date: Tue Feb 21 22:30:47 2017 +1300 docs: hwmon: Fix typo "Microship" should be "Microchip" Signed-off-by: Chris Packham Signed-off-by: Guenter Roeck Documentation/hwmon/tc654 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ccc15036d812e75f334c0fb813104ef765a2c77 Author: Lorenzo Bianconi Date: Sun Apr 2 14:58:45 2017 +0200 iio: imu: st_lsm6dsx: do not apply ODR configuration in write_raw handler This patch allows to avoid a transitory that occurs when a given sensor has been already enabled (e.g. gyroscope) and the user is configuring the sample frequency of the other one (e.g. accelerometer). The transitory lasts until the accelerometer is enabled. During that time slice the gyroscope ODR is incorrectly modified as well. At the end of the transitory both sensors work at the right frequency. Fix it introducing st_lsm6dsx_check_odr() routine to check ODR consistency in write_raw handler in order to apply frequency configuration just in st_lsm6dsx_set_odr() Fixes: 290a6ce11d93 (iio: imu: add support to lsm6dsx driver) Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 41 ++++++++++++++++++---------- 1 file changed, 26 insertions(+), 15 deletions(-) commit be2d73208606bc5d52e60dea223da77f49d58340 Author: Arnd Bergmann Date: Tue Mar 28 12:07:23 2017 +0200 iio: adc: sun4i: add THERMAL dependency With CONFIG_THERMAL=m and CONFIG_SUN4I_GPADC=y, we get a link error from calling devm_thermal_zone_of_sensor_register: drivers/iio/built-in.o: In function `sun4i_gpadc_probe': :(.text+0x1c284): undefined reference to `devm_thermal_zone_of_sensor_register' This adds a Kconfig dependency to ensure we can only have the ADC driver as built-in when this function is also built-in, or when we see the empty stub implementation. When the thermal code is a module, we can still build the adc driver as a module, too. Signed-off-by: Arnd Bergmann Fixes: d1caa99055382 ("iio: adc: add support for Allwinner SoCs ADC") Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit bc82222fcca1ec3702caf98eb4a3ab0edfa6f789 Author: Michael Hennerich Date: Wed Mar 29 11:42:58 2017 +0200 iio:adc: Driver for Linear Technology LTC2497 ADC This patch adds support for the Analog Devices / Linear Technology LTC2497 ADCs. The LTC2497 is a 16-channel (eight differential), 16-bit, high precision, delta-sigma ADC with an automatic, differential, input current cancellation front end and a 2-wire, I2C interface. Signed-off-by: Michael Hennerich Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/ltc2497.txt | 13 + MAINTAINERS | 1 + drivers/iio/adc/Kconfig | 10 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/ltc2497.c | 279 +++++++++++++++++++++ 5 files changed, 304 insertions(+) commit 13e283d6fc1b46d75da4076a18c419af0e05c6c7 Author: Guru Das Srinagesh Date: Thu Mar 30 02:55:39 2017 -0700 staging: iio: ad9832: use 4-digit octal permissions This fixes the coding style issue of using S_IWUSR in place of 4-digit octal numbers. Issue detected by checkpatch. Signed-off-by: Guru Das Srinagesh Signed-off-by: Jonathan Cameron drivers/staging/iio/frequency/ad9832.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 0c8f492dd7ddf0dd381fa63b76066c0966d8dd73 Author: Jonathan Cameron Date: Sun Mar 26 12:11:00 2017 +0100 iio:imu:mpu6050 add explicit mpu9250 support The mpu9250 is a SIP containing an mpu6500 and an ak8975. If this was all there was too it there would be no need for explicit handling in the driver. Arguably the bindings would also only reflect the presence of an mpu6500 with the ak8975 hanging off it, as the kernel doesn't care that they are in one package. However, the WHOAMI value changes as well so best to add explicit support. Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt | 1 + drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 6 ++++++ drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 5 +++++ drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 2 ++ drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 1 + 5 files changed, 15 insertions(+) commit 3cc17e61d4dd9594fc6a2d15d88bb91f4bc61e75 Author: Jonathan Cameron Date: Sun Mar 26 12:10:59 2017 +0100 iio:imu:mpu6050 update i2c bindings to reflect i2c-gate and supported parts These bindings are somewhat lagging the state of the driver. The i2c-gate bindings are documented elsewhere, but it seems sensible to at least have an example and cross reference in here. SPI bindings will need to be the subject of a future patch. Signed-off-by: Jonathan Cameron Acked-by: Rob Herring .../devicetree/bindings/iio/imu/inv_mpu6050.txt | 26 ++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit c49089b71de354eaeef2a2f075d6d53dec86e165 Author: Liang Chen Date: Mon Mar 27 17:40:46 2017 +0800 dt-bindings: iio: rockchip-saradc: add support for rk3328 The rk3328 saradc is the same as rk3399. Signed-off-by: Liang Chen Reviewed-by: Heiko Stuebner Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt | 1 + 1 file changed, 1 insertion(+) commit af873b0d8f586c07ec329d6d91eaa58ba5d7c662 Author: simran singhal Date: Sat Apr 1 19:48:39 2017 +0530 iio: pressure: zpa2326: 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: simran singhal Signed-off-by: Jonathan Cameron drivers/iio/pressure/zpa2326.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 407e0b537eadc9f5e98da74b746ce84f42b89cd7 Author: simran singhal Date: Sat Apr 1 19:46:24 2017 +0530 iio: imu: st_lsm6dsx: 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: simran singhal Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7ae6df68d68ed1d68d6bac11edc332da67108d8f Author: simran singhal Date: Sat Apr 1 19:44:15 2017 +0530 iio: humidity: hts221: 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: simran singhal Signed-off-by: Jonathan Cameron drivers/iio/humidity/hts221_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d925083e8f9f0c619fe212cfd0729c3dc1442b2 Author: simran singhal Date: Sat Apr 1 19:41:53 2017 +0530 iio: dac: ad5504: 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: simran singhal Signed-off-by: Jonathan Cameron drivers/iio/dac/ad5504.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c6c0987f94f9f5539d0f97e588383b0c5c6f458 Author: simran singhal Date: Sat Apr 1 19:39:21 2017 +0530 iio: common: ms_sensors: 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: simran singhal Signed-off-by: Jonathan Cameron drivers/iio/common/ms_sensors/ms_sensors_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0b568b3c4ae582dc8f20960dc02dc229957ea3d3 Author: simran singhal Date: Sat Apr 1 19:36:14 2017 +0530 iio: adc: 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: simran singhal Signed-off-by: Jonathan Cameron drivers/iio/adc/exynos_adc.c | 2 +- drivers/iio/adc/imx7d_adc.c | 2 +- drivers/iio/adc/max1027.c | 2 +- drivers/iio/adc/rockchip_saradc.c | 2 +- drivers/iio/adc/sun4i-gpadc-iio.c | 2 +- drivers/iio/adc/vf610_adc.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 5a70925b16f2ad3d68dd6ecc469c9507d9a18e6a Author: simran singhal Date: Fri Mar 31 15:51:43 2017 +0530 iio: gyro: adis16060: Change the name of function. Change the name of function from adis16060_spi_write_than_read() to adis16060_spi_write_then_read(). change "than" to "then" as its time depended. Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/gyro/adis16060_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 98b6d2b6764d75e386ce3236d771a7624a645e07 Author: simran singhal Date: Fri Mar 31 00:10:38 2017 +0530 iio: light: lm3533-als: constify attribute_group structures Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; struct iio_info x; @@ x.event_attrs=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; As the attrs field of iio_info structures is also constant, so these attribute_group structures can also be declared constant. Done manually. File size before: text data bss dec hex filename 5798 2376 0 8174 1fee drivers/iio/light/lm3533-als.o File size after: text data bss dec hex filename 5926 2248 0 8174 1fee drivers/iio/light/lm3533-als.o Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/iio/light/lm3533-als.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7558ab66424e61819cbf3d778d9f780f3aa205e9 Merge: 8cd3ac5 28c9542 Author: Dave Airlie Date: Sun Apr 2 16:10:55 2017 +1000 Merge branch 'drm-vmwgfx-next' of git://people.freedesktop.org/~syeh/repos_linux into drm-next This series enables atomic mode set for vmwgfx. A number of features and larger fixes are also included. * 'drm-vmwgfx-next' of git://people.freedesktop.org/~syeh/repos_linux: (22 commits) drm/vmwgfx: Properly check display/scanout surface size drm/vmwgfx: Support topology greater than texture size drm/vmwgfx: Define an overlaid handle_close ioctl. drm/vmwgfx: Re-implement the stream resource as a simple resource. drm/vmwgfx: Introduce a simple resource type drm/vmwgfx: Revert "drm/vmwgfx: Replace numeric parameter like 0444 with macro" drm/vmwgfx: Fix LDU X blank screen until mode change issue drm/vmwgfx: Skipping fbdev fb pinning for ldu drm/vmwgfx: Explicityly track screen target width and height drm/vmwgfx: Turn on DRIVER_ATOMIC flag drm/vmwgfx: Switch over to internal atomic API for SOU and LDU drm/vmwgfx: Switch over to internal atomic API for STDU drm/vmwgfx: Fixes to vmwgfx_fb drm/vmwgfx: Add and connect atomic state object check/commit drm/vmwgfx: Add and connect connector helper function drm/vmwgfx: Add and connect plane helper functions drm/vmwgfx: Add and connect CRTC helper functions drm/vmwgfx: Connector atomic state drm/vmwgfx: Plane atomic state drm/vmwgfx: CRTC atomic state ... commit a6fc09dff2ec344960cd40139011697734a044fa Merge: 3d8417d 1511009 Author: David S. Miller Date: Sat Apr 1 20:21:45 2017 -0700 Merge branch 'mpls-more-labels' David Ahern says: ==================== net: mpls: Allow users to configure more labels per route Increase the maximum number of new labels for MPLS routes from 2 to 30. To keep memory consumption in check, the labels array is moved to the end of mpls_nh and mpls_iptunnel_encap structs as a 0-sized array. Allocations use the maximum number of labels across all nexthops in a route for LSR and the number of labels configured for LWT. The mpls_route layout is changed to: +----------------------+ | mpls_route | +----------------------+ | mpls_nh 0 | +----------------------+ | alignment padding | 4 bytes for odd number of labels; 0 for even +----------------------+ | via[rt_max_alen] 0 | +----------------------+ | alignment padding | via's aligned on sizeof(unsigned long) +----------------------+ | ... | Meaning the via follows its mpls_nh providing better locality as the number of labels increases. UDP_RR tests with namespaces shows no impact to a modest performance increase with this layout for 1 or 2 labels and 1 or 2 nexthops. mpls_route allocation size is limited to 4096 bytes allowing on the order of 30 nexthops with 30 labels (or more nexthops with fewer labels). LWT encap shares same maximum number of labels as mpls routing. v3 - initialize n_labels to 0 in case RTA_NEWDST is not defined; detected by the kbuild test robot v2 - updates per Eric's comments + added patch to ensure all reads of rt_nhn_alive and nh_flags in the packet path use READ_ONCE and all writes via event handlers use WRITE_ONCE + limit mpls_route size to 4096 (PAGE_SIZE for most arch) + mostly killed use of MAX_NEW_LABELS; it exists only for common limit between lwt and routing paths ==================== Signed-off-by: David S. Miller commit 1511009cd68015c2e04135bfefa4bf5020baa8d9 Author: David Ahern Date: Fri Mar 31 07:14:04 2017 -0700 net: mpls: Increase max number of labels for lwt encap Alow users to push down more labels per MPLS encap. Similar to LSR case, move label array to the end of mpls_iptunnel_encap and allocate based on the number of labels for the route. For consistency with the LSR case, re-use the same maximum number of labels. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/mpls_iptunnel.h | 5 ++--- net/mpls/af_mpls.c | 5 ----- net/mpls/internal.h | 5 +++++ net/mpls/mpls_iptunnel.c | 13 ++++++++++--- 4 files changed, 17 insertions(+), 11 deletions(-) commit a4ac8c986d3f72ccbaf6d6782511fb645e568306 Author: David Ahern Date: Fri Mar 31 07:14:03 2017 -0700 net: mpls: bump maximum number of labels Allow users to push down more labels per MPLS route. With the previous patches, no memory allocations are based on MAX_NEW_LABELS; the limit is only used to keep userspace in check. At this point MAX_NEW_LABELS is only used for mpls_route_config (copying route data from userspace) and processing nexthops looking for the max number of labels across the route spec. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/mpls/af_mpls.c | 103 +++++++++++++++++++++++++++++++++++----------------- net/mpls/internal.h | 2 +- 2 files changed, 71 insertions(+), 34 deletions(-) commit df1c631648c55bfb247339279f9bc573c7f283f4 Author: David Ahern Date: Fri Mar 31 07:14:02 2017 -0700 net: mpls: Limit memory allocation for mpls_route Limit memory allocation size for mpls_route to 4096. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/mpls/af_mpls.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit 59b209667a3bef240ca5da111ce1931f29fa179f Author: David Ahern Date: Fri Mar 31 07:14:01 2017 -0700 net: mpls: change mpls_route layout Move labels to the end of mpls_nh as a 0-sized array and within mpls_route move the via for a nexthop after the mpls_nh. The new layout becomes: +----------------------+ | mpls_route | +----------------------+ | mpls_nh 0 | +----------------------+ | alignment padding | 4 bytes for odd number of labels; 0 for even +----------------------+ | via[rt_max_alen] 0 | +----------------------+ | alignment padding | via's aligned on sizeof(unsigned long) +----------------------+ | ... | +----------------------+ | mpls_nh n-1 | +----------------------+ | via[rt_max_alen] n-1 | +----------------------+ Memory allocated for nexthop + via is constant across all nexthops and their via. It is based on the maximum number of labels across all nexthops and the maximum via length. The size is saved in the mpls_route as rt_nh_size. Accessing a nexthop becomes rt->rt_nh + index * rt->rt_nh_size. The offset of the via address from a nexthop is saved as rt_via_offset so that given an mpls_nh pointer the via for that hop is simply nh + rt->rt_via_offset. With prior code, memory allocated per mpls_route with 1 nexthop: via is an ethernet address - 64 bytes via is an ipv4 address - 64 via is an ipv6 address - 72 With this patch set, memory allocated per mpls_route with 1 nexthop and 1 or 2 labels: via is an ethernet address - 56 bytes via is an ipv4 address - 56 via is an ipv6 address - 64 The 8-byte reduction is due to the previous patch; the change introduced by this patch has no impact on the size of allocations for 1 or 2 labels. Performance impact of this change was examined using network namespaces with veth pairs connecting namespaces. ns0 inserts the packet to the label-switched path using an lwt route with encap mpls. ns1 adds 1 or 2 labels depending on test, ns2 (and ns3 for 2-label test) pops the label and forwards. ns3 (or ns4) for a 2-label is the destination. Similar series of namespaces used for 2-nexthop test. Intent is to measure changes to latency (overhead in manipulating the packet) in the forwarding path. Tests used netperf with UDP_RR. IPv4: current patches 1 label, 1 nexthop 29908 30115 2 label, 1 nexthop 29071 29612 1 label, 2 nexthop 29582 29776 2 label, 2 nexthop 29086 29149 IPv6: current patches 1 label, 1 nexthop 24502 24960 2 label, 1 nexthop 24041 24407 1 label, 2 nexthop 23795 23899 2 label, 2 nexthop 23074 22959 In short, the change has no effect to a modest increase in performance. This is expected since this patch does not really have an impact on routes with 1 or 2 labels (the current limit) and 1 or 2 nexthops. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/mpls/af_mpls.c | 37 +++++++++++++++++++++---------------- net/mpls/internal.h | 45 ++++++++++++++++++++++++++++++--------------- 2 files changed, 51 insertions(+), 31 deletions(-) commit 77ef013aadadd248843ad90022f36ba177b24e7f Author: David Ahern Date: Fri Mar 31 07:14:00 2017 -0700 net: mpls: Convert number of nexthops to u8 Number of nexthops and number of alive nexthops are tracked using an unsigned int. A route should never have more than 255 nexthops so convert both to u8. Update all references and intermediate variables to consistently use u8 as well. Shrinks the size of mpls_route from 32 bytes to 24 bytes with a 2-byte hole before the nexthops. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/mpls/af_mpls.c | 28 +++++++++++++++++----------- net/mpls/internal.h | 5 +++-- 2 files changed, 20 insertions(+), 13 deletions(-) commit 39eb8cd1758886072ceb93607827722a11592ba2 Author: David Ahern Date: Fri Mar 31 07:13:59 2017 -0700 net: mpls: rt_nhn_alive and nh_flags should be accessed using READ_ONCE The number of alive nexthops for a route (rt->rt_nhn_alive) and the flags for a next hop (nh->nh_flags) are modified by netdev event handlers. The event handlers run with rtnl_lock held so updates are always done with the lock held. The packet path accesses the fields under the rcu lock. Since those fields can change at any moment in the packet path, both fields should be accessed using READ_ONCE. Updates to both fields should use WRITE_ONCE. Update mpls_select_multipath (packet path) and mpls_ifdown and mpls_ifup (event handlers) accordingly. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/mpls/af_mpls.c | 36 +++++++++++++++++++++++++----------- net/mpls/internal.h | 8 ++++++++ 2 files changed, 33 insertions(+), 11 deletions(-) commit 3d8417d79e0da6a47ff29932ef80486be78af56e Author: Paolo Abeni Date: Fri Mar 31 11:47:39 2017 +0200 udp: use sk_protocol instead of pcflag to detect udplite sockets In the udp_sock struct, the 'forward_deficit' and 'pcflag' fields share the same cacheline. While the first is dirtied by udp_recvmsg, the latter is read, possibly several times, by the bottom half processing to discriminate between udp and udplite sockets. With this patch, sk->sk_protocol is used to check is the socket is really an udplite one, avoiding some cache misses per packet and improving the performance under udp_flood with small packet up to 10%. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller include/linux/udp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 768bfa2a061f0a3aeb1080015deffd57f294c55d Author: Tobias Regnery Date: Fri Mar 31 11:44:52 2017 +0200 net: dsa: fix build error with devlink build as module After commit 96567d5dacf4 ("net: dsa: dsa2: Add basic support of devlink") I see the following link error with CONFIG_NET_DSA=y and CONFIG_NET_DEVLINK=m: net/built-in.o: In function 'dsa_register_switch': (.text+0xe226b): undefined reference to `devlink_alloc' net/built-in.o: In function 'dsa_register_switch': (.text+0xe2284): undefined reference to `devlink_register' net/built-in.o: In function 'dsa_register_switch': (.text+0xe243e): undefined reference to `devlink_port_register' net/built-in.o: In function 'dsa_register_switch': (.text+0xe24e1): undefined reference to `devlink_port_register' net/built-in.o: In function 'dsa_register_switch': (.text+0xe24fa): undefined reference to `devlink_port_type_eth_set' net/built-in.o: In function 'dsa_dst_unapply.part.8': dsa2.c:(.text.unlikely+0x345): undefined reference to 'devlink_port_unregister' dsa2.c:(.text.unlikely+0x36c): undefined reference to 'devlink_port_unregister' dsa2.c:(.text.unlikely+0x38e): undefined reference to 'devlink_port_unregister' dsa2.c:(.text.unlikely+0x3f2): undefined reference to 'devlink_unregister' dsa2.c:(.text.unlikely+0x3fb): undefined reference to 'devlink_free' Fix this by adding a dependency on MAY_USE_DEVLINK so that CONFIG_NET_DSA get switched to be build as module when CONFIG_NET_DEVLINK=m. Fixes: 96567d5dacf4 ("net: dsa: dsa2: Add basic support of devlink") Signed-off-by: Tobias Regnery Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88f913f5ee895fc595abd6564447fd740ca1f966 Merge: eefe06e 32d7514 Author: David S. Miller Date: Sat Apr 1 20:04:04 2017 -0700 Merge branch 'phylib-EEE-updates' Russell King says: ==================== phylib EEE updates This series of patches depends on the previous set of changes, and is therefore net-next material. While testing the EEE code, I discovered a number of issues: 1. It is possible to enable advertisment of EEE modes which are not supported by the hardware. We omit to check the supported modes and mask off those modes that are not supported before writing the EEE advertisment register. 2. We need to restart autonegotiation after a change of the EEE advertisment, otherwise the link partner does not see the updated EEE modes. 3. SGMII connected PHYs are also capable of supporting EEE. Through discussion with Florian, it has been decided to remove the check for the PHY interface mode in patch (3). ==================== Signed-off-by: David S. Miller commit 32d751412b8baf977deb3b2dce72025a98cbdd5e Author: Russell King Date: Fri Mar 31 10:37:18 2017 +0100 net: phy: allow EEE with any interface mode EEE is able to work in any PHY interface mode, there is nothing which fundamentally restricts it to only a few modes. For example, EEE works in SGMII mode with the Marvell 88E1512. Rather than just adding SGMII mode to the list, Florian suggests removing the list of interface modes entirely: It actually sounds like we should just kill the check entirely, it does not appear that any of the interface mode would not fundamentally be able to support EEE, because the "lowest" mode we support is MII, and even there it's quite possible to support EEE. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/phy.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit f75abeb8338e2d5bcdfc393dff3950a7039eab5a Author: Russell King Date: Fri Mar 31 10:37:12 2017 +0100 net: phy: restart phy autonegotiation after EEE advertisment change When the EEE advertisment is changed, we should restart autonegotiation to update the link partner with the new EEE settings. Add this trigger but only if the advertisment has changed. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/phy.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 83ea067fe2eae9a67c172aede6e11b9f194b1d52 Author: Russell King Date: Fri Mar 31 10:37:07 2017 +0100 net: phy: avoid setting unsupported EEE advertisments We currently allow userspace to set any EEE advertisments it desires, whether or not the PHY supports them. For example: # ethtool --set-eee eth1 advertise 0xffffffff # ethtool --show-eee eth1 EEE Settings for eth1: EEE status: disabled Tx LPI: disabled Supported EEE link modes: 100baseT/Full 1000baseT/Full 10000baseT/Full Advertised EEE link modes: 100baseT/Full 1000baseT/Full 1000baseKX/Full 10000baseT/Full 10000baseKX4/Full 10000baseKR/Full Clearly, this is not sane, we should only allow link modes that are supported to be advertised (as we do elsewhere.) Ensure that we mask the MDIO_AN_EEE_ADV value with the capabilities retrieved from the MDIO_PCS_EEE_ABLE register. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/phy.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 4334d8fc638aea4f36fc69042f699e44fed98b16 Author: Samuel Ortiz Date: Sun Apr 2 01:07:53 2017 +0200 MAINTAINERS: Remove Lauro and Aloisio from the NFC maintainers list They are no longer active and their email addresses bounce. Signed-off-by: Samuel Ortiz MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) commit 32ecc75ded72e0425713a7ffe2050fef6e54e564 Author: Andrey Rusalin Date: Wed Dec 28 20:10:59 2016 +0300 NFC: pn533: change order operations in dev registation Sometimes during probing and registration of pn533_i2c NULL pointer dereference happens. Reproduced in cycle of inserting and removing pn533_i2c and pn533 modules. Backtrace: [<8004205c>] (__queue_work) from [<80042324>] (queue_work_on+0x50/0x5c) r10:acdc7c80 r9:8006b330 r8:ac0dfb40 r7:ac50c600 r6:00000004 r5:acbbee40 r4:600f0113 [<800422d4>] (queue_work_on) from [<7f7d5b6c>] (pn533_recv_frame+0x158/0x1fc [pn533]) r7:ffffff87 r6:00000000 r5:acbbee40 r4:acbbee00 [<7f7d5a14>] (pn533_recv_frame [pn533]) from [<7f7df4b8>] (pn533_i2c_irq_thread_fn+0x184/0x) r6:acb2a000 r5:00000000 r4:acdc7b90 [<7f7df334>] (pn533_i2c_irq_thread_fn [pn533_i2c]) from [<8006b354>] (irq_thread_fn+0x24/0x) r7:00000000 r6:accde000 r5:ac0dfb40 r4:acdc7c80 ... Seems there is some race condition due registration of irq handler until all data stuctures that could be needed are ready. So I re-ordered some ops. After this, problem has gone. Changes in USB part was not tested, but it should not break anything. Signed-off-by: Andrey Rusalin Signed-off-by: Samuel Ortiz drivers/nfc/pn533/i2c.c | 28 ++++++++++++++++++---------- drivers/nfc/pn533/pn533.c | 42 +++++++++++++++++++++++++----------------- drivers/nfc/pn533/pn533.h | 1 + drivers/nfc/pn533/usb.c | 4 ++++ 4 files changed, 48 insertions(+), 27 deletions(-) commit 5dd9c1bd61a7b684e54897a3a2546124c4077eda Author: Andrey Rusalin Date: Wed Dec 28 20:10:58 2016 +0300 NFC: pn533: improve cmd queue handling Make sure cmd is set before a frame is passed to the transport layer for sending. In addition pn533_send_async_complete checks if cmd is set before accessing its members. Signed-off-by: Michael Thalmeier Rework a little bit changes in pn532_send_async_complete. Signed-off-by: Andrey Rusalin Signed-off-by: Samuel Ortiz drivers/nfc/pn533/pn533.c | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) commit 068a496c4525c638ffab56449d905b88ef97fe32 Author: Andrey Rusalin Date: Wed Dec 28 20:10:57 2016 +0300 NFC: pn533: change order of free_irq and dev unregistration Change order of free_irq and dev unregistration. It fixes situation when device already unregistered and an interrupt happens and nobody can handle it. Signed-off-by: Andrey Rusalin Signed-off-by: Samuel Ortiz drivers/nfc/pn533/i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b6355fb3f5f40bbce165847d277e64896cab8f95 Author: Sudip Mukherjee Date: Tue Dec 20 21:09:04 2016 +0000 nfc: fdp: fix NULL pointer dereference We are checking phy after dereferencing it. We can print the debug information after checking it. If phy is NULL then we will get a good stack trace to tell us that we are in this irq handler. Signed-off-by: Sudip Mukherjee Signed-off-by: Samuel Ortiz drivers/nfc/fdp/i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ce69b95ca4e459f54b5afad717d2129d3ba1ff6e Author: Guan Ben Date: Tue Feb 7 06:22:04 2017 +0100 NFC: Make EN2 pin optional in the TRF7970A driver Make the EN2 pin optional. This is useful for boards, which have this pin fix wired, for example to ground. Acked-by: Rob Herring Signed-off-by: Guan Ben Signed-off-by: Mark Jonas Signed-off-by: Heiko Schocher Signed-off-by: Samuel Ortiz .../devicetree/bindings/net/nfc/trf7970a.txt | 4 ++-- drivers/nfc/trf7970a.c | 26 ++++++++++++---------- 2 files changed, 16 insertions(+), 14 deletions(-) commit 96bd0b5e550f26e8472c624d1aabe7448d0a7c27 Author: Nicholas Mc Guire Date: Sun Jan 22 13:28:39 2017 +0100 nfc: nxp-nci: use msleep for long delays ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. For this large delay msleep() is preferable. Fixes: commit 6be88670fc59 ("NFC: nxp-nci_i2c: Add I2C support to NXP NCI driver") Link: http://lkml.org/lkml/2017/1/11/377 Signed-off-by: Nicholas Mc Guire Signed-off-by: Samuel Ortiz drivers/nfc/nxp-nci/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f79ded95934154d4454b6e422a18a3fbcd7a268 Author: Christophe JAILLET Date: Sun Feb 19 10:58:47 2017 +0100 NFC: st21nfca: Fix potential memory leak If all bits of 'dev_mask' are already set, there is a memory leak because 'info' should be freed before returning. While fixing it, 'return -ENOMEM' directly if the first kzalloc fails. This makes the code more readable. Signed-off-by: Christophe JAILLET Signed-off-by: Samuel Ortiz drivers/nfc/st21nfca/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ca42fb9e52d155547e6cf18cf26bce3e1a6af4ea Author: Dan Carpenter Date: Wed Mar 8 08:22:37 2017 +0300 NFC: nfcmrvl: double free on error path The nci_spi_send() function calls kfree_skb(skb) on both error and success so this extra kfree_skb() is a double free. Fixes: caf6e49bf6d0 ("NFC: nfcmrvl: add spi driver") Signed-off-by: Dan Carpenter Signed-off-by: Samuel Ortiz drivers/nfc/nfcmrvl/spi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 52fdede5c9b96de355ab5e45e35503b9da6b86f6 Author: Corentin Labbe Date: Thu Dec 15 15:22:46 2016 +0100 nfc: st21nfca: Remove unneeded linux/miscdevice.h include drivers/nfc/st21nfca/i2c.c does not use any miscdevice, so this patch remove this unnecessary inclusion. Signed-off-by: Corentin Labbe Signed-off-by: Samuel Ortiz drivers/nfc/st21nfca/i2c.c | 1 - 1 file changed, 1 deletion(-) commit 17a0180be18050a96466671ed18430ad20d8346f Author: Corentin Labbe Date: Thu Dec 15 15:22:45 2016 +0100 nfc: pn544: Remove unneeded linux/miscdevice.h include drivers/nfc/pn544/i2c.c does not use any miscdevice, so this patch remove this unnecessary inclusion. Signed-off-by: Corentin Labbe Signed-off-by: Samuel Ortiz drivers/nfc/pn544/i2c.c | 1 - 1 file changed, 1 deletion(-) commit f92cb58318745d9b59a30ff1e37d4fb298d4b75f Author: Corentin Labbe Date: Thu Dec 15 15:22:44 2016 +0100 nfc: nxp-nci: Remove unneeded linux/miscdevice.h include drivers/nfc/nxp-nci/i2c.c does not use any miscdevice, so this patch remove this unnecessary inclusion. Signed-off-by: Corentin Labbe Signed-off-by: Samuel Ortiz drivers/nfc/nxp-nci/i2c.c | 1 - 1 file changed, 1 deletion(-) commit 2eee74b7e2a496dea49847c36fd09320505f45b7 Author: Guenter Roeck Date: Sat Aug 1 06:59:29 2015 -0700 NFC: nxp-nci: Include unaligned.h instead of access_ok.h Directly including access_ok.h can result in the following compile errors if an architecture such as ia64 does not support direct unaligned accesses. include/linux/unaligned/access_ok.h:7:19: error: redefinition of 'get_unaligned_le16' include/linux/unaligned/le_struct.h:6:19: note: previous definition of 'get_unaligned_le16' was here include/linux/unaligned/access_ok.h:12:19: error: redefinition of 'get_unaligned_le32' include/linux/unaligned/le_struct.h:11:19: note: previous definition of 'get_unaligned_le32' was here Include asm/unaligned.h instead and let the architecture decide which access functions to use. Cc: Clément Perrochaud Cc: Samuel Ortiz Signed-off-by: Guenter Roeck Signed-off-by: Samuel Ortiz drivers/nfc/nxp-nci/firmware.c | 2 +- drivers/nfc/nxp-nci/i2c.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d916d923724d59cde99ee588f15eec59dd863bbd Author: Tobias Klauser Date: Wed Oct 26 11:00:12 2016 +0200 NFC: nfcmrvl: Include unaligned.h instead of access_ok.h Including linux/unaligned/access_ok.h causes the allmodconfig build on ia64 (and maybe others) to fail with the following warnings: include/linux/unaligned/access_ok.h:7:19: error: redefinition of 'get_unaligned_le16' include/linux/unaligned/access_ok.h:12:19: error: redefinition of 'get_unaligned_le32' include/linux/unaligned/access_ok.h:17:19: error: redefinition of 'get_unaligned_le64' include/linux/unaligned/access_ok.h:22:19: error: redefinition of 'get_unaligned_be16' include/linux/unaligned/access_ok.h:27:19: error: redefinition of 'get_unaligned_be32' include/linux/unaligned/access_ok.h:32:19: error: redefinition of 'get_unaligned_be64' include/linux/unaligned/access_ok.h:37:20: error: redefinition of 'put_unaligned_le16' include/linux/unaligned/access_ok.h:42:20: error: redefinition of 'put_unaligned_le32' include/linux/unaligned/access_ok.h:42:20: error: redefinition of 'put_unaligned_le64' include/linux/unaligned/access_ok.h:42:20: error: redefinition of 'put_unaligned_be16' include/linux/unaligned/access_ok.h:42:20: error: redefinition of 'put_unaligned_be32' include/linux/unaligned/access_ok.h:42:20: error: redefinition of 'put_unaligned_be64' Fix these by including asm/unaligned.h instead and leave it up to the architecture to decide how to implement unaligned accesses. Fixes: 3194c6870158 ("NFC: nfcmrvl: add firmware download support") Reported-by: kbuild test robot Link: https://lkml.org/lkml/2016/10/22/247 Cc: Vincent Cuissard Signed-off-by: Tobias Klauser Signed-off-by: Samuel Ortiz drivers/nfc/nfcmrvl/fw_dnld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d689530be68054ae2f927d539b69169d1f25fad0 Author: Geliang Tang Date: Thu Nov 24 21:58:34 2016 +0800 NFC: nfcmrvl: drop duplicate header gpio.h Drop duplicate header gpio.h from nfcmrvl/spi.c. Signed-off-by: Geliang Tang Signed-off-by: Samuel Ortiz drivers/nfc/nfcmrvl/spi.c | 1 - 1 file changed, 1 deletion(-) commit 0b73ef7992e2a18250c1ff2f67bbb2a6d2acbef1 Author: Rob Herring Date: Wed Jan 25 16:23:07 2017 -0600 NFC: remove TI nfcwilink driver It appears that TI WiLink devices including NFC (WL185x/WL189x) never shipped. The only information I found were announcements in Feb 2012 about the parts. There's been no activity on this driver besided common changes since initially added in Jan 2012. There's also no in users that instantiate the platform device (nor DT bindings). This is a first step in removing TI ST (shared transport) driver in favor of extending the BT hci_ll driver to support WL183x chips. Cc: Ilan Elias Cc: Marcel Holtmann Cc: Samuel Ortiz Cc: Lauro Ramos Venancio Cc: Aloisio Almeida Jr Cc: linux-wireless@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: Samuel Ortiz drivers/nfc/Kconfig | 11 - drivers/nfc/Makefile | 1 - drivers/nfc/nfcwilink.c | 578 ------------------------------------------------ 3 files changed, 590 deletions(-) commit 2497128133f8169b24b928852ba6eae34fc495e5 Author: OGAWA Hirofumi Date: Sat Feb 4 10:16:56 2017 +0900 nfc: Fix hangup of RC-S380* in port100_send_ack() If port100_send_ack() was called twice or more, it has race to hangup. port100_send_ack() port100_send_ack() init_completion() [...] dev->cmd_cancel = true /* this removes previous from completion */ init_completion() [...] dev->cmd_cancel = true wait_for_completion() /* never be waked up */ wait_for_completion() Like above race, this code is not assuming port100_send_ack() is called twice or more. To fix, this checks dev->cmd_cancel to know if prior cancel is in-flight or not. And never be remove prior task from completion by using reinit_completion(), so this guarantees to be waked up properly soon or later. Signed-off-by: OGAWA Hirofumi Signed-off-by: Samuel Ortiz drivers/nfc/port100.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) commit 0ada076819529203e11fcd5d3d52a2c9ada21879 Author: OGAWA Hirofumi Date: Sat Feb 4 10:16:28 2017 +0900 nfc: Fix RC-S380* needs zero-length packet If sent packet size is wMaxPacketSize boundary, this device doesn't answer. To fix this, we have to send zero-length packet in usb spec. Signed-off-by: OGAWA Hirofumi Signed-off-by: Samuel Ortiz drivers/nfc/port100.c | 1 + 1 file changed, 1 insertion(+) commit 85a2566d70a851c85806f687b93a9559bb8a3b11 Author: OGAWA Hirofumi Date: Sat Feb 4 10:15:55 2017 +0900 nfc: Send same info for both of NFC_CMD_GET_DEVICE and NFC_EVENT_DEVICE_ADDED Now, NFC_EVENT_DEVICE_ADDED doesn't send NFC_ATTR_RF_MODE. But NFC_CMD_GET_DEVICE send. To get NFC_ATTR_RF_MODE, we have to call NFC_CMD_GET_DEVICE just for NFC_ATTR_RF_MODE when get NFC_EVENT_DEVICE_ADDED. This fixes those inconsistent. Signed-off-by: OGAWA Hirofumi Signed-off-by: Samuel Ortiz net/nfc/netlink.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 9728ee92f740acc65d54e6c62b9124cd0676cba9 Author: OGAWA Hirofumi Date: Sat Feb 4 10:15:22 2017 +0900 nfc: Add support RC-S380P to port100 Signed-off-by: OGAWA Hirofumi Signed-off-by: Samuel Ortiz drivers/nfc/port100.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit eefe06e8ceea88f8397a8df0880ab5ca28dcada6 Merge: 98cd155 3782161 Author: David S. Miller Date: Sat Apr 1 12:45:58 2017 -0700 Merge branch 'bpf-prog-testing-framework' Alexei Starovoitov says: ==================== bpf: program testing framework Development and testing of networking bpf programs is quite cumbersome. Especially tricky are XDP programs that attach to real netdevices and program development feels like working on the car engine while the car is in motion. Another problem is ongoing changes to upstream llvm core that can introduce an optimization that verifier will not recognize. llvm bpf backend tests have no ability to run the programs. To improve this situation introduce BPF_PROG_TEST_RUN command to test and performance benchmark bpf programs. It achieves several goals: - development of xdp and skb based bpf programs can be done in a canned environment with unit tests - program performance optimizations can be benchmarked outside of networking core (without driver and skb costs) - continuous testing of upstream changes is finally practical Patches 4,5,6 add C based test cases of various complexity to cover some sched_cls and xdp features. More tests will be added in the future. The tests were run on centos7 only. For now the framework supports only skb and xdp programs. In the future it can be extended to socket_filter and tracing program types. More details are in individual patches. v1->v2: - rename bpf_program_test_run->bpf_prog_test_run - add missing #include since libbpf.h shouldn't depend on prior includes - reordered patches 3 and 4 to keep bisect clean ==================== Signed-off-by: David S. Miller commit 37821613626e99828491302c3a59a094ec427395 Author: Alexei Starovoitov Date: Thu Mar 30 21:45:43 2017 -0700 selftests/bpf: add l4 load balancer test based on sched_cls this l4lb demo is a comprehensive test case for LLVM codegen and kernel verifier. It's using fully inlined jhash(), complex packet parsing and multiple map lookups of different types to stress llvm and verifier. The map sizes, map population and test vectors are artificial to exercise different paths through the bpf program. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/test_l4lb.c | 474 +++++++++++++++++++++++++++++++ tools/testing/selftests/bpf/test_progs.c | 88 ++++++ 3 files changed, 563 insertions(+), 1 deletion(-) commit 8d48f5e427923fa6f6482c716082d310b7f3bcd5 Author: Alexei Starovoitov Date: Thu Mar 30 21:45:42 2017 -0700 selftests/bpf: add a test for basic XDP functionality add C test for xdp_adjust_head(), packet rewrite and map lookups Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/test_iptunnel_common.h | 37 ++++ tools/testing/selftests/bpf/test_progs.c | 58 +++++ tools/testing/selftests/bpf/test_xdp.c | 236 +++++++++++++++++++++ 4 files changed, 332 insertions(+), 1 deletion(-) commit 6882804c916beaa945bae90dfd3295e635f6b78f Author: Alexei Starovoitov Date: Thu Mar 30 21:45:41 2017 -0700 selftests/bpf: add a test for overlapping packet range checks add simple C test case for llvm and verifier range check fix from commit b1977682a385 ("bpf: improve verifier packet range checks") Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller tools/testing/selftests/bpf/Makefile | 17 +++- tools/testing/selftests/bpf/test_pkt_access.c | 64 ++++++++++++ tools/testing/selftests/bpf/test_progs.c | 138 ++++++++++++++++++++++++++ 3 files changed, 215 insertions(+), 4 deletions(-) commit dd26b7f54a08fd1a9fd804b51b9fce8e16628349 Author: Alexei Starovoitov Date: Thu Mar 30 21:45:40 2017 -0700 tools/lib/bpf: expose bpf_program__set_type() expose bpf_program__set_type() to set program type Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller tools/lib/bpf/libbpf.c | 3 +-- tools/lib/bpf/libbpf.h | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) commit 3084887378f5271daedd52cc3372cb8011ad39b6 Author: Alexei Starovoitov Date: Thu Mar 30 21:45:39 2017 -0700 tools/lib/bpf: add support for BPF_PROG_TEST_RUN command add support for BPF_PROG_TEST_RUN command to libbpf.a Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Martin KaFai Lau Acked-by: Wang Nan Signed-off-by: David S. Miller tools/include/uapi/linux/bpf.h | 24 ++++++++++++++++++++++++ tools/lib/bpf/bpf.c | 24 ++++++++++++++++++++++++ tools/lib/bpf/bpf.h | 4 +++- 3 files changed, 51 insertions(+), 1 deletion(-) commit 1cf1cae963c2e6032aebe1637e995bc2f5d330f4 Author: Alexei Starovoitov Date: Thu Mar 30 21:45:38 2017 -0700 bpf: introduce BPF_PROG_TEST_RUN command development and testing of networking bpf programs is quite cumbersome. Despite availability of user space bpf interpreters the kernel is the ultimate authority and execution environment. Current test frameworks for TC include creation of netns, veth, qdiscs and use of various packet generators just to test functionality of a bpf program. XDP testing is even more complicated, since qemu needs to be started with gro/gso disabled and precise queue configuration, transferring of xdp program from host into guest, attaching to virtio/eth0 and generating traffic from the host while capturing the results from the guest. Moreover analyzing performance bottlenecks in XDP program is impossible in virtio environment, since cost of running the program is tiny comparing to the overhead of virtio packet processing, so performance testing can only be done on physical nic with another server generating traffic. Furthermore ongoing changes to user space control plane of production applications cannot be run on the test servers leaving bpf programs stubbed out for testing. Last but not least, the upstream llvm changes are validated by the bpf backend testsuite which has no ability to test the code generated. To improve this situation introduce BPF_PROG_TEST_RUN command to test and performance benchmark bpf programs. Joint work with Daniel Borkmann. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller include/linux/bpf.h | 7 ++ include/uapi/linux/bpf.h | 12 ++++ kernel/bpf/syscall.c | 27 +++++++- net/Makefile | 2 +- net/bpf/Makefile | 1 + net/bpf/test_run.c | 172 +++++++++++++++++++++++++++++++++++++++++++++++ net/core/filter.c | 5 ++ 7 files changed, 223 insertions(+), 3 deletions(-) commit 98cd1552ea27e512c7e99e2aa76042a26e4fb25c Author: Florian Fainelli Date: Thu Mar 30 18:43:21 2017 -0700 net: dsa: Mock-up driver This patch adds support for a DSA mock-up driver which essentially does the following: - registers/unregisters 4 fixed PHYs to the slave network devices - uses eth0 (configurable) as the master netdev - registers the switch as a fixed MDIO device against the fixed MDIO bus at address 31 - includes dynamic debug prints for dsa_switch_ops functions that can be enabled to get call traces This is a good way to test modular builds as well as exercise the DSA APIs without requiring access to real hardware. This does not test the data-path, although this could be added later on. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/Kconfig | 8 + drivers/net/dsa/Makefile | 2 +- drivers/net/dsa/dsa_loop.c | 328 ++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/dsa_loop.h | 19 +++ drivers/net/dsa/dsa_loop_bdinfo.c | 34 ++++ 5 files changed, 390 insertions(+), 1 deletion(-) commit 772c3bdad10db607b1035ae74cc817e81a114021 Merge: 58b7bd0 aec5ac8 Author: David S. Miller Date: Sat Apr 1 12:22:59 2017 -0700 Merge branch 'mv88e6xxx-cross-chip-bridging' Vivien Didelot says: ==================== net: dsa: mv88e6xxx: program cross-chip bridging The purpose of this patch series is to bring hardware cross-chip bridging configuration to the DSA layer and the mv88e6xxx DSA driver. Most recent Marvell switch chips have a Cross-chip Port Based VLAN Table (PVT) used to restrict to which internal destination port an arbitrary external source port is allowed to egress frames to. The current behavior of the mv88e6xxx driver is to program this table table with all ones, allowing any external ports to egress frames on any internal ports. This means that carefully crafted Ethernet frames can potentially bypass the user bridging configuration. Patches 1 to 7 prepare the setup of this table and factorize the common bits of both in-chip and cross-chip Marvell bridging code. Patch 8 adds new optional cross-chip bridging operations to DSA switch. Patch 9 switches the current behavior to program the table according to the user bridging configuration when (cross-chip) ports get (un)bridged. On a ZII Rev B board, bridging together the 3 user ports of both 88E6352 will result in the following PVTs on respectively switch 0 and switch 1: External Internal Ports Dev Port 0 1 2 3 4 5 6 1 0 * * * - - * * 1 1 * * * - - * * 1 2 * * * - - * * 1 3 - - - - - * * 1 4 - - - - - * * 1 5 * * * * * * * 1 6 * * * * * * * 0 0 * * * - - * * 0 1 * * * - - * * 0 2 * * * - - * * 0 3 - - - - - * * 0 4 - - - - - * * 0 5 * * * * * * * 0 6 * * * * * * * Changes since v2: - Define MV88E6XXX_MAX_PVT_SWITCHES and MV88E6XXX_MAX_PVT_PORTS - use mv88e6xxx_g2_misc_4_bit_port instead of the 5-bit variant - add Andrew's tags and reword commit 6/9 ==================== Signed-off-by: David S. Miller commit aec5ac88d31b385d851f5f29939e556a07ca7d3d Author: Vivien Didelot Date: Thu Mar 30 17:37:15 2017 -0400 net: dsa: mv88e6xxx: add cross-chip bridging Implement the DSA cross-chip bridging operations by remapping the local ports an external source port can egress frames to, when this cross-chip port joins or leaves a bridge. The PVT is no longer configured with all ones allowing any external frame to egress any local port. Only DSA and CPU ports, as well as bridge group members, can egress frames on local ports. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit 40ef2c93395fcd25051643707d0956ce9120de41 Author: Vivien Didelot Date: Thu Mar 30 17:37:14 2017 -0400 net: dsa: add cross-chip bridging operations Introduce crosschip_bridge_{join,leave} operations in the dsa_switch_ops structure, which can be used by switches supporting interconnection. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/net/dsa.h | 8 ++++++++ net/dsa/switch.c | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) commit e96a6e027510279a5089b24e2f217693488327f3 Author: Vivien Didelot Date: Thu Mar 30 17:37:13 2017 -0400 net: dsa: mv88e6xxx: remap existing bridge members When a local port of a switch chip becomes a member of a bridge group, we need to reprogram the Cross-chip Port Based VLAN Table (PVT) to allow existing cross-chip bridge members to egress frames on the new ports. There is no functional changes yet, since the PVT is still programmed with all ones, allowing any external port to egress frames locally. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 240ea3ef70a4591ba0f77cfafe4b467d55ce80d0 Author: Vivien Didelot Date: Thu Mar 30 17:37:12 2017 -0400 net: dsa: mv88e6xxx: factorize in-chip bridge map Factorize the code in the DSA port_bridge_{join,leave} routines used to program the port VLAN map of all local ports of a given bridge group. At the same time shorten the _mv88e6xxx_port_based_vlan_map to get rid of the old underscore prefix naming convention. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 47 +++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 22 deletions(-) commit e5887a2a110947cdd936fcc8722d8f08f3e8e392 Author: Vivien Didelot Date: Thu Mar 30 17:37:11 2017 -0400 net: dsa: mv88e6xxx: rework in-chip bridging All ports -- internal and external, for chips featuring a PVT -- have a mask restricting to which internal ports a frame is allowed to egress. Now that DSA exposes the number of ports and their bridge devices, it is possible to extract the code generating the VLAN map and make it generic so that it can be shared later with the cross-chip bridging code. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 49 ++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 17 deletions(-) commit 73b1204d070d2970749beb3fa3ca6e639dc7a3b6 Author: Vivien Didelot Date: Thu Mar 30 17:37:10 2017 -0400 net: dsa: mv88e6xxx: allocate the number of ports The current code allocates DSA_MAX_PORTS ports for a Marvell dsa_switch structure. Provide the exact number of ports so the corresponding ds->num_ports is accurate. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17a1594e2d58f021d629da72d1a82b1441217460 Author: Vivien Didelot Date: Thu Mar 30 17:37:09 2017 -0400 net: dsa: mv88e6xxx: program the PVT with all ones The Cross-chip Port Based VLAN Table (PVT) is currently initialized with all ones, allowing any external ports to egress frames on local ports. This commit implements the PVT access functions and programs the PVT with all ones for the local switch ports only, instead of using the Init operation. The current behavior is unchanged for the moment. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 31 ++++++++++++++++++++- drivers/net/dsa/mv88e6xxx/global2.c | 52 +++++++++++++++++++++++++++++------ drivers/net/dsa/mv88e6xxx/global2.h | 8 ++++++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 4 +++ 4 files changed, 86 insertions(+), 9 deletions(-) commit 812289960f720c4a075f8766d40a3c6b5840c0cd Author: Vivien Didelot Date: Thu Mar 30 17:37:08 2017 -0400 net: dsa: mv88e6xxx: use 4-bit port for PVT data The Cross-chip Port Based VLAN Table (PVT) supports two indexing modes, one using 5-bit for device and 4-bit for port, the other using 4-bit for device and 5-bit for port, configured via the Global 2 Misc register. Only 4 bits for the source port are needed when interconnecting 88E6xxx switch devices since they all support less than 16 physical ports. The full 5 bits are needed when interconnecting a device with 98DXxxx switch devices since they support more than 16 physical ports. Add a mv88e6xxx_pvt_setup helper to set the 4-bit port PVT mode, which will be extended later to also initialize the PVT content. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 15 +++++++++++++++ drivers/net/dsa/mv88e6xxx/global2.c | 25 +++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/global2.h | 7 +++++++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + 4 files changed, 48 insertions(+) commit f3645652216839aabcbd864b81b25ba7fbab9e82 Author: Vivien Didelot Date: Thu Mar 30 17:37:07 2017 -0400 net: dsa: mv88e6xxx: move PVT description in info Not all Marvell switch chips feature a Cross-chip Port VLAN Table (PVT). Chips with a PVT use the same implementation, so a new mv88e6xxx_ops member won't be necessary yet. Add a "pvt" boolean member to the mv88e6xxx_info structure and kill the obsolete MV88E6XXX_FLAGS_PVT flag. Add a mv88e6xxx_has_pvt helper to wrap future checks of that condition. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 22 ++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/global2.c | 2 +- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 32 +++++++++++--------------------- 3 files changed, 34 insertions(+), 22 deletions(-) commit 58b7bd0f4b35284c64b70c65cc208f74af6080cb Author: Madalin Bucur Date: Thu Mar 30 16:24:15 2017 +0300 dpaa_eth: use AVOIDBLOCK for Tx confirmation queues The AVOIDBLOCK flag determines the Tx confirmation queues processing to be redirected to any available CPU when the current one is slow in processing them. This may result in a higher Tx confirmation interrupt count but may reduce pressure on a certain CPU that with the previous setting would process all Tx confirmation frames. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b07e675b065c22ae232dbb6d5e3d670808a08dd4 Author: Madalin Bucur Date: Thu Mar 30 16:21:40 2017 +0300 fsl/fman: take into account all RGMII modes Accept the internal delay RGMII variants. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman_dtsec.c | 8 +++++++- drivers/net/ethernet/freescale/fman/fman_memac.c | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) commit f069b5a0b27ad4a87e9351e54fbcab3d3f8a9fd5 Author: H. Nikolaus Schaller Date: Sat Apr 1 09:43:47 2017 -0700 Input: bma150 - remove support for bma150 This essentially reverts commit baf28d91e7b1 ("Input: bma150 - avoid binding to bma180 if IIO bma180 driver present") and commit ef3714fdbc8d ("Input: bma150 - extend chip detection for bma180") Rationale: initially (2012) the GTA04 device using a bma180 chip simply referenced the bma150 platform driver in its board file [1] which happened to work in all scenarios that were tested. When conversion to DT started (2014), we needed to make the driver be still recognised. Hence we introduced the compatibility to the bma180 chip in Linux 3.15-rc5 [2] without further checks if it is really 100% compatible. This worked flawlessly for years with the GTA04 device. Recently (2016), Hans de Goede pointed out that the chips are not as similar as they appeared and the driver works with the bma180 for the GTA04 only by good luck. He proposed to remove the bma180 support completely [3], but we still did need it until we have a replacement. Thus, a conditional compile was added. We have now developed a generic iio-input-bridge which works with any 2 or 3 axis iio based accelerometer. It has been tested on GTA04 and Pyra and works as expected. Therefore we can remove the bma180 support from this driver completely. User-space API compatibility can be restored by using the iio-input-bridge. Maybe it is time to convert the bma150 driver to iio as well and retire the accelerometer input drivers completely but this is a different story and task. [1]: https://github.com/neilbrown/linux/blob/gta04/3.2.y/arch/arm/mach-omap2/board-omap3gta04.c#L976 [2]: https://patchwork.kernel.org/patch/3961171/ [3]: https://patchwork.kernel.org/patch/9325481/ Signed-off-by: H. Nikolaus Schaller Reviewed-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/misc/bma150.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit d6acfeb17d030bb3907e77c048b0e7783ad8e5a9 Author: Felix Manlunas Date: Wed Mar 29 17:56:43 2017 -0700 vxlan: vxlan dev should inherit lowerdev's gso_max_size vxlan dev currently ignores lowerdev's gso_max_size, which adversely affects TSO performance of liquidio if it's the lowerdev. Egress TCP packets' skb->len often exceed liquidio's advertised gso_max_size. This may happen on other NIC drivers. Fix it by assigning lowerdev's gso_max_size to that of vxlan dev. Might as well do likewise for gso_max_segs. Single flow TSO throughput of liquidio as lowerdev (using iperf3): Before the patch: 139 Mbps After the patch : 8.68 Gbps Percent increase: 6,144 % Signed-off-by: Felix Manlunas Signed-off-by: Satanand Burla Signed-off-by: David S. Miller drivers/net/vxlan.c | 5 +++++ 1 file changed, 5 insertions(+) commit 4124c4eba40256b65acb5016a1edfdd59a1960b6 Author: Dmitry Torokhov Date: Wed Mar 1 11:45:51 2017 -0800 i2c: allow attaching IRQ resources to i2c_board_info Simple integer for interrupt number is not expressive enough, as it does not convey interrupt trigger type that should be used. Let's allow attaching array of resources to the board info and have i2c core parse first IRQ resource and set up interrupt trigger as needed. Reviewed-by: Wolfram Sang Signed-off-by: Dmitry Torokhov drivers/i2c/i2c-boardinfo.c | 12 ++++++++++++ drivers/i2c/i2c-core.c | 30 ++++++++++++++++++++++++++++++ include/linux/i2c.h | 4 ++++ 3 files changed, 46 insertions(+) commit 0daaf99d8424f12cdf87e00c435c9cb93667f519 Author: Dmitry Torokhov Date: Mon Feb 27 20:09:09 2017 -0800 i2c: copy device properties when using i2c_register_board_info() This will allow marking device property lists as __initdata, the same as board info structures themselves. Reviewed-by: Wolfram Sang Signed-off-by: Dmitry Torokhov drivers/i2c/i2c-boardinfo.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 00a06c22e9fc0a33ae0b6ca2d47938340dbcd539 Author: Dmitry Torokhov Date: Sat Mar 4 11:29:34 2017 -0800 i2c: export i2c_client_type structure i2c bus has 2 different types of device belonging to the same bus and bus notifiers use device type to distinguish between adapters and clients. Previously we only had i2c_adapter_type exported, which made code wanting to work with i2c_client devices test for type not equal to adapter type. This unfortunately is not safe if we ever add another type to the bus, so let's export i2c_client_type as well. Reviewed-by: Jean Delvare Acked-by: Benjamin Tissoires Reviewed-by: Wolfram Sang Signed-off-by: Dmitry Torokhov drivers/i2c/i2c-core.c | 4 ++-- include/linux/i2c.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) commit bcb7dd9ef206f7d646ed8dac6fe7772083714253 Author: Stefan Wahren Date: Fri Mar 31 20:03:06 2017 +0000 thermal: bcm2835: add thermal driver for bcm2835 SoC Add basic thermal driver for bcm2835 SoC. This driver currently make sure that tsense HW block is set up correctly. Tested-by: Rafał Miłecki Signed-off-by: Martin Sperl Signed-off-by: Stefan Wahren Acked-by: Eric Anholt Acked-by: Eduardo Valentin Signed-off-by: Eduardo Valentin drivers/thermal/Kconfig | 8 + drivers/thermal/Makefile | 1 + drivers/thermal/bcm2835_thermal.c | 314 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 323 insertions(+) commit 1e2ac9821de6a85d3e8358f238436708d1d46869 Author: Stefan Wahren Date: Fri Mar 31 20:03:03 2017 +0000 dt-bindings: Add thermal zone to bcm2835-thermal example Add a thermal zone in order to make the example complete. Signed-off-by: Stefan Wahren Acked-by: Rob Herring Signed-off-by: Eduardo Valentin .../bindings/thermal/brcm,bcm2835-thermal.txt | 32 +++++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) commit 573803234e72d182ec39692770110e574cd5b222 Author: Rick Altherr Date: Tue Mar 28 14:52:59 2017 -0700 iio: Aspeed ADC Aspeed BMC SoCs include a 16 channel, 10-bit ADC. Low and high threshold interrupts are supported by the hardware but are not currently implemented. Signed-off-by: Rick Altherr Tested-by: Xo Wang Reviewed-by: Joel Stanley Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 11 ++ drivers/iio/adc/Makefile | 1 + drivers/iio/adc/aspeed_adc.c | 295 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 307 insertions(+) commit fb87ecf19e350d73206c5fbf28a28588f171f15d Author: Rick Altherr Date: Tue Mar 28 14:52:58 2017 -0700 Documentation: dt-bindings: Document bindings for Aspeed ADC Signed-off-by: Rick Altherr Acked-by: Joel Stanley Acked-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/aspeed_adc.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit fcc309e618c9e9ac4ede010d87522b0689549658 Merge: 25df39f fd5cead Author: Ingo Molnar Date: Sat Apr 1 12:43:40 2017 +0200 Merge tag 'perf-core-for-mingo-4.12-20170331' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: New features: - Beautify the statx syscall arguments in 'perf trace' (Arnaldo Carvalho de Melo) e.g.: System wide strace like session: # trace -e statx 16612.967 ( 0.028 ms): statx/4562 statx(dfd: CWD, filename: /tmp/statx, flags: SYMLINK_NOFOLLOW, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7ffef195d660) = 0 36050.891 ( 0.007 ms): statx/4576 statx(dfd: CWD, filename: /etc/passwd, flags: SYMLINK_NOFOLLOW|STATX_DONT_SYNC, mask: BTIME, buffer: 0x7ffda9bf50f0) = 0 ^C# User visible changes: - Handle unpaired raw_syscalls:sys_exit events in 'perf trace', i.e. we shouldn't try to calculate duration or print the timestamp for a missing matching raw_syscalls:sys_enter (Arnaldo Carvalho de Melo) - Do not print "cycles: 0" in perf report LBR lines in platforms not supporting 'cycles', such as Intel's Broadwell (Jin Yao) - Handle missing $HOME env var (Jiri Olsa) - Map 8-bit registers (al, bl, etc), not supported in uprobes_events, to the next best thing (ax, bx, etc) supported (Ravi Bangoria) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit d952b4e6ad8f174577884b2a8ceb13832a7a6d21 Author: simran singhal Date: Sat Apr 1 07:58:56 2017 +0530 staging: iio: light: tsl2x7x constify attribute_group structures As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant. File size before: text data bss dec hex filename 15064 1528 0 16592 40d0 drivers/staging/iio/light/tsl2x7x_core.o File size after: text data bss dec hex filename 15192 1400 0 16592 40d0 drivers/staging/iio/light/tsl2x7x_core.o Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4214dc1807afa0a9eb84f845c9c2772dcbeae0f8 Author: simran singhal Date: Sat Apr 1 13:47:51 2017 +0530 iio: adc: hx711: constify attribute_group structures Check for attribute_group structures that are only stored in the attrs filed of iio_info structure. As the attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; struct iio_info x; @@ x.attrs=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: text data bss dec hex filename 3042 480 0 3522 dc2 drivers/iio/adc/hx711.o File size after: text data bss dec hex filename 3098 416 0 3514 dba drivers/iio/adc/hx711.o Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/iio/adc/hx711.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 757cff86a8942c50558bf91805f8e6bf0b6128b8 Author: simran singhal Date: Sat Apr 1 13:53:33 2017 +0530 iio: humidity: hdc100x: constify attribute_group structures Check for attribute_group structures that are only stored in the attrs filed of iio_info structure. As the attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; struct iio_info x; @@ x.attrs=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: text data bss dec hex filename 3459 488 0 3947 f6b drivers/iio/humidity/hdc100x.o File size after: text data bss dec hex filename 3507 424 0 3931 f5b drivers/iio/humidity/hdc100x.o Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/iio/humidity/hdc100x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ca437c052f083c625a2eed100f4e40bb9c7e2bd Author: simran singhal Date: Sat Apr 1 13:59:10 2017 +0530 iio: light: apds9960: constify attribute_group structures Check for attribute_group structures that are only stored in the attrs filed of iio_info structure. As the attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; struct iio_info x; @@ x.attrs=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: text data bss dec hex filename 8503 488 0 8991 231f drivers/iio/light/apds9960.o File size after: text data bss dec hex filename 8567 424 0 8991 231f drivers/iio/light/apds9960.o Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/iio/light/apds9960.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2869498d0c0ef39f92bbd11c174d3ccd166826c Author: simran singhal Date: Sat Apr 1 14:03:30 2017 +0530 iio: light: bh1750: constify attribute_group structures Check for attribute_group structures that are only stored in the attrs filed of iio_info structure. As the attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; struct iio_info x; @@ x.attrs=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: text data bss dec hex filename 2276 352 0 2628 a44 drivers/iio/light/bh1750.o File size after: text data bss dec hex filename 2340 320 0 2660 a64 drivers/iio/light/bh1750.o Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/iio/light/bh1750.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ab89e1e235cef11d50070e8b7170864ee4b7097 Author: simran singhal Date: Sat Apr 1 14:09:55 2017 +0530 iio: proximity: as3935: constify attribute_group structures Check for attribute_group structures that are only stored in the attrs filed of iio_info structure. As the attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; struct iio_info x; @@ x.attrs=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: text data bss dec hex filename 4037 288 0 4325 10e5 drivers/iio/proximity/as3935.o File size after: text data bss dec hex filename 4101 256 0 4357 1105 drivers/iio/proximity/as3935.o Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/iio/proximity/as3935.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4ea6dcb08ea2c6c996c373573caf74d48d23b84 Author: Aneesh Kumar K.V Date: Thu Mar 30 16:35:21 2017 +0530 powerpc/mm: Enable mappings above 128TB Not all user space application is ready to handle wide addresses. It's known that at least some JIT compilers use higher bits in pointers to encode their information. It collides with valid pointers with 512TB addresses and leads to crashes. To mitigate this, we are not going to allocate virtual address space above 128TB by default. But userspace can ask for allocation from full address space by specifying hint address (with or without MAP_FIXED) above 128TB. If hint address set above 128TB, but MAP_FIXED is not specified, we try to look for unmapped area by specified address. If it's already occupied, we look for unmapped area in *full* address space, rather than from 128TB window. This approach helps to easily make application's memory allocator aware about large address space without manually tracking allocated virtual address space. This is going to be a per mmap decision. ie, we can have some mmaps with larger addresses and other that do not. A sample memory layout looks like: 10000000-10010000 r-xp 00000000 fc:00 9057045 /home/max_addr_512TB 10010000-10020000 r--p 00000000 fc:00 9057045 /home/max_addr_512TB 10020000-10030000 rw-p 00010000 fc:00 9057045 /home/max_addr_512TB 10029630000-10029660000 rw-p 00000000 00:00 0 [heap] 7fff834a0000-7fff834b0000 rw-p 00000000 00:00 0 7fff834b0000-7fff83670000 r-xp 00000000 fc:00 9177190 /lib/powerpc64le-linux-gnu/libc-2.23.so 7fff83670000-7fff83680000 r--p 001b0000 fc:00 9177190 /lib/powerpc64le-linux-gnu/libc-2.23.so 7fff83680000-7fff83690000 rw-p 001c0000 fc:00 9177190 /lib/powerpc64le-linux-gnu/libc-2.23.so 7fff83690000-7fff836a0000 rw-p 00000000 00:00 0 7fff836a0000-7fff836c0000 r-xp 00000000 00:00 0 [vdso] 7fff836c0000-7fff83700000 r-xp 00000000 fc:00 9177193 /lib/powerpc64le-linux-gnu/ld-2.23.so 7fff83700000-7fff83710000 r--p 00030000 fc:00 9177193 /lib/powerpc64le-linux-gnu/ld-2.23.so 7fff83710000-7fff83720000 rw-p 00040000 fc:00 9177193 /lib/powerpc64le-linux-gnu/ld-2.23.so 7fffdccf0000-7fffdcd20000 rw-p 00000000 00:00 0 [stack] 1000000000000-1000000010000 rw-p 00000000 00:00 0 1ffff83710000-1ffff83720000 rw-p 00000000 00:00 0 Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/processor.h | 23 +++++++++++---- arch/powerpc/kernel/setup-common.c | 2 +- arch/powerpc/mm/hugetlbpage-radix.c | 7 +++++ arch/powerpc/mm/mmap.c | 32 +++++++++++++------- arch/powerpc/mm/mmu_context_book3s64.c | 2 +- arch/powerpc/mm/slice.c | 54 ++++++++++++++++++++++++++-------- 6 files changed, 89 insertions(+), 31 deletions(-) commit fbfef9027c2a7ad9277755509fdb849dbccfe8c1 Author: Aneesh Kumar K.V Date: Wed Mar 22 09:07:01 2017 +0530 powerpc/mm: Switch some TASK_SIZE checks to use mm_context addr_limit Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/hugetlbpage-radix.c | 4 ++-- arch/powerpc/mm/mmap.c | 12 ++++++------ arch/powerpc/mm/slice.c | 6 +++--- arch/powerpc/mm/subpage-prot.c | 3 ++- 4 files changed, 13 insertions(+), 12 deletions(-) commit 82228e362f9b7f4b876d0fbb1036c235797c6b1d Author: Aneesh Kumar K.V Date: Wed Mar 22 09:07:00 2017 +0530 powerpc/pseries: Skip using reserved virtual address range Now that we use all the available virtual address range, we need to make sure we don't generate VSID such that it overlaps with the reserved vsid range. Reserved vsid range include the virtual address range used by the adjunct partition and also the VRMA virtual segment. We find the context value that can result in generating such a VSID and reserve it early in boot. We don't look at the adjunct range, because for now we disable the adjunct usage in a Linux LPAR via CAS interface. Signed-off-by: Aneesh Kumar K.V [mpe: Rewrite hash__reserve_context_id(), move the rest into pseries] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu-hash.h | 7 +++ arch/powerpc/include/asm/kvm_book3s_64.h | 2 - arch/powerpc/include/asm/mmu_context.h | 1 + arch/powerpc/mm/hash_utils_64.c | 1 - arch/powerpc/mm/mmu_context_book3s64.c | 16 +++++++ arch/powerpc/platforms/pseries/lpar.c | 61 +++++++++++++++++++++++++++ 6 files changed, 85 insertions(+), 3 deletions(-) commit bb1832217a859f6dbe4a45ff2ba7fdcab0bb3958 Author: Aneesh Kumar K.V Date: Wed Mar 22 09:06:59 2017 +0530 powerpc/mm/hash: Store addr_limit in PACA We optmize the slice page size array copy to paca by copying only the range based on addr_limit. This will require us to not look at page size array beyond addr_limit in PACA on slb fault. To enable that copy task size to paca which will be used during slb fault. Signed-off-by: Aneesh Kumar K.V [mpe: Rename from task_size to addr_limit, consolidate #ifdefs] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/paca.h | 1 + arch/powerpc/kernel/asm-offsets.c | 1 + arch/powerpc/kernel/paca.c | 1 + arch/powerpc/mm/slb_low.S | 8 +++++++- 4 files changed, 10 insertions(+), 1 deletion(-) commit 957b778a166e32e242a33fdab693ffb256a19cbd Author: Aneesh Kumar K.V Date: Wed Mar 22 09:06:58 2017 +0530 powerpc/mm: Add addr_limit to mm_context and use it to derive max slice index In the followup patch, we will increase the slice array size to handle 512TB range, but will limit the max addr to 128TB. Avoid doing unnecessary computation and avoid doing slice mask related operation above address limit. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu-hash.h | 3 ++- arch/powerpc/include/asm/book3s/64/mmu.h | 1 + arch/powerpc/kernel/paca.c | 3 ++- arch/powerpc/kernel/setup-common.c | 9 +++++++++ arch/powerpc/mm/mmu_context_book3s64.c | 7 +++++++ arch/powerpc/mm/slice.c | 20 +++++++++++--------- 6 files changed, 32 insertions(+), 11 deletions(-) commit d30eed1cd2b17f6140ec443f22a8e32f99cd99c1 Author: Tobias Herzog Date: Thu Mar 30 22:15:13 2017 +0200 cdc-acm: remove unused element of struct acm write_used was introduced with commit 884b600f63dc ("[PATCH] USB: fix acm trouble with terminals") but never used since. Signed-off-by: Tobias Herzog Acked-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.h | 1 - 1 file changed, 1 deletion(-) commit 2d6dfd17aefb6e2376ba32d11bc2e5b6c961f072 Author: Tobias Herzog Date: Thu Mar 30 22:15:12 2017 +0200 cdc-acm: log message for serial state notification Adds a similar log message to USB_CDC_NOTIFY_SERIAL_STATE as it is already done with USB_CDC_NOTIFY_NETWORK_CONNECTION. Signed-off-by: Tobias Herzog Acked-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 2 ++ 1 file changed, 2 insertions(+) commit ea2583529cd17ab313dfe3cabf2215f38c6399a7 Author: Tobias Herzog Date: Thu Mar 30 22:15:11 2017 +0200 cdc-acm: reassemble fragmented notifications USB devices may have very limited endpoint packet sizes, so that notifications can not be transferred within one single usb packet. Reassembling of multiple packages may be necessary. Signed-off-by: Tobias Herzog Acked-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 112 ++++++++++++++++++++++++++++++++------------ drivers/usb/class/cdc-acm.h | 3 ++ 2 files changed, 86 insertions(+), 29 deletions(-) commit 1bb9914e1730417d530de9ed37e59efdc647146b Author: Tobias Herzog Date: Thu Mar 30 22:15:10 2017 +0200 cdc-acm: fix possible invalid access when processing notification Notifications may only be 8 bytes long. Accessing the 9th and 10th byte of unimplemented/unknown notifications may be insecure. Also check the length of known notifications before accessing anything behind the 8th byte. Signed-off-by: Tobias Herzog Acked-by: Oliver Neukum Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit d1600401faad4bc186bfdb291d8af644465e20bd Author: Matthias Kaehlcke Date: Fri Mar 31 18:00:04 2017 -0700 ALSA: hda/ca0132: Limit values for chip addresses to 32-bit With the previous unsigned long value clang generates warnings like this: sound/pci/hda/patch_ca0132.c:860:37: error: implicit conversion from 'unsigned long' to 'u32' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 [-Werror,-Wconstant-conversion] spec->curr_chip_addx = (res < 0) ? ~0UL : chip_addx; ~ ^~~~ Signed-off-by: Matthias Kaehlcke Signed-off-by: Takashi Iwai sound/pci/hda/patch_ca0132.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 28c954299cd2b5cb5411816c9eeaf3f51ed4638e Author: Sinclair Yeh Date: Mon Mar 27 11:12:27 2017 -0700 drm/vmwgfx: Properly check display/scanout surface size The scanout surface size is the smaller of max texture size and max STDU size. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 3 +++ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 16 +++++++++++++++- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 14 ++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) commit 810b3e1683d00e51c8392bcee7dc7a1c65354777 Author: Sinclair Yeh Date: Thu Mar 23 15:39:16 2017 -0700 drm/vmwgfx: Support topology greater than texture size Most of the display servers today use a single surface to represent the entire desktop even if it's stretched across multiple screens. For vmwgfx with STDU, the maximum surface size is limited to the maximum texture size on the host. On a 2D VM, this limits our ability to support configurations with more than one 4K monitor. To get past this limitation, we will now allow using a large DMA buf as the framebuffer, and take care of blitting contents from this DMA buf to the display buffer. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 48 ++++++++- drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 4 + drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 202 +++++++++++++++++++++++++++++++++++ 3 files changed, 253 insertions(+), 1 deletion(-) commit 2f9545cec6ffd490b08c5675c94c249f169a7e87 Author: Thomas Hellstrom Date: Thu Mar 23 15:26:16 2017 -0700 drm/vmwgfx: Define an overlaid handle_close ioctl. Instead of providing an ioctl for each handle type, provide a single handle_close ioctl, and reuse the UNREF_DMABUF ioctl. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh include/uapi/drm/vmwgfx_drm.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 9f7d148022b12b0f706c9be99be94e934fbdb50d Author: Thomas Hellstrom Date: Thu Mar 23 15:19:45 2017 -0700 drm/vmwgfx: Re-implement the stream resource as a simple resource. Provide and document a reference implementation. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/Makefile | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 254 ------------------------------- drivers/gpu/drm/vmwgfx/vmwgfx_va.c | 168 ++++++++++++++++++++ 3 files changed, 169 insertions(+), 255 deletions(-) commit d4d21902222d44acc76a520f11f78040b1e34b5a Author: Thomas Hellstrom Date: Thu Mar 23 15:09:42 2017 -0700 drm/vmwgfx: Introduce a simple resource type The callbacks we need to provide to many resources are very similar, so provide a simple resource type with a number of helpers for these callbacks. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/Makefile | 3 +- drivers/gpu/drm/vmwgfx/vmwgfx_resource_priv.h | 40 ++++ drivers/gpu/drm/vmwgfx/vmwgfx_simple_resource.c | 256 ++++++++++++++++++++++++ 3 files changed, 298 insertions(+), 1 deletion(-) commit 50f837371dd9aea5470c06d5d10bc9ca3e8155b6 Author: Øyvind A. Holm Date: Thu Mar 23 14:54:48 2017 -0700 drm/vmwgfx: Revert "drm/vmwgfx: Replace numeric parameter like 0444 with macro" This reverts commit 2d8e60e8b074 ("drm/vmwgfx: Replace numeric parameter like 0444 with macro") The commit belongs to the series of 1285 patches sent to LKML on 2016-08-02, it changes the representation of file permissions from the octal value "0600" to "S_IRUSR | S_IWUSR". The general consensus was that the changes does not increase readability, quite the opposite; 0600 is easier to parse mentally than S_IRUSR | S_IWUSR. It also causes argument inconsistency, due to commit 04319d89fbec ("drm/vmwgfx: Add an option to change assumed FB bpp") that added another call to module_param_named() where the permissions are written as 0600. Signed-off-by: Øyvind A. Holm Reviewed-by: Sinclair Yeh drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e9cebe837be720af5972959d2ea295ece3be3721 Author: Sinclair Yeh Date: Thu Mar 23 14:42:36 2017 -0700 drm/vmwgfx: Fix LDU X blank screen until mode change issue vmw_ldu_crtc_helper_commit() is not called if drm_atomic_crtc_needs_modeset() decides nothing related to CRTC timing has changed. So a better place for this code is in vmw_ldu_primary_plane_atomic_update() since we will need to update ld->fb every time the FB is updated. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 41 +++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 20 deletions(-) commit 5c6089a1dfa6e699a9c8ca95df02e8c39b4e8e15 Author: Sinclair Yeh Date: Thu Mar 23 14:41:21 2017 -0700 drm/vmwgfx: Skipping fbdev fb pinning for ldu Pinning fbdev's FB at the start of VRAM prevents X from pinning its FB. Since for ldu, the fb would be pinned anyway during a mode set, just skip pinning it in fbdev. This is not the best solution, but since ldu is not used much anymore, it seems like a reasonable workaround. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 9aa8dcab7e44288c6fd620c5b831d2ca535866c2 Author: Sinclair Yeh Date: Thu Mar 23 14:40:04 2017 -0700 drm/vmwgfx: Explicityly track screen target width and height We can no longer make the assumption that vmw_stdu_update_st() will be called when there's a valid display surface attached. So instead of using display_srf for width and height, make a record of these paremeters when the screen target is first defined. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit f7c478be0abb5f6db5dfa13bb8118628817b9afe Author: Sinclair Yeh Date: Fri Mar 31 10:16:22 2017 -0700 drm/vmwgfx: Turn on DRIVER_ATOMIC flag Now that the legacy path has been tested, turn on the DRIVER_ATOMIC flag so user mode driver can start going through the Atomic path. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom Acked-by: Daniel Vetter drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 4 +++- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) commit b0119cb9229d0db0d8c3ec8b302d549775e03a0c Author: Sinclair Yeh Date: Thu Mar 23 14:38:18 2017 -0700 drm/vmwgfx: Switch over to internal atomic API for SOU and LDU Switch over to internal atomic API. This completes the atomic internal atomic switch for all the Display Units. Signed-off-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 103 ++--------------- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 217 +++-------------------------------- 2 files changed, 25 insertions(+), 295 deletions(-) commit 904bb5e5817f5c5b42e6e3775699c728fd420284 Author: Sinclair Yeh Date: Thu Mar 23 14:29:22 2017 -0700 drm/vmwgfx: Switch over to internal atomic API for STDU Switch over to using internal atomic API for mode set. This removes the legacy set_config API, replacing it with drm_atomic_helper_set_config(). The DRM helper will use various vmwgfx-specific atomic functions to set a mode. DRIVER_ATOMIC capability flag is not yet set, so the user mode will still use the legacy mode set IOCTL. v2: * Avoid a clash between page-flip pinning and setcrtc pinning, modify the page-flip code to use the page-flip helper and the atomic callbacks. To enable this, we will need to add a wrapper around atomic_commit. * Add vmw_kms_set_config() to work around vmwgfx xorg driver bug Signed-off-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 20 +++ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 325 ++++------------------------------- 3 files changed, 51 insertions(+), 295 deletions(-) commit aa74f0687cfe998e59b20d6454f45e8aa4403c45 Author: Sinclair Yeh Date: Thu Mar 23 14:28:21 2017 -0700 drm/vmwgfx: Fixes to vmwgfx_fb 1. When unsetting a mode, num_connector should be set to zero 2. The pixel_format field needs to be initialized as newer DRM internal functions checks this field 3. Take the drm_modeset_lock_all() because vmw_fb_kms_detach() can change current mode Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c46a30644a1e7093bbd839e9089f10d64e465302 Author: Sinclair Yeh Date: Thu Mar 23 14:24:53 2017 -0700 drm/vmwgfx: Add and connect atomic state object check/commit This connects the main state object check and commit function. v2 * Use drm_atomic_helper_commit() rather than a vmwgfx-specific one Signed-off-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom Reviewed-by: Thomas Hellstrom Acked-by: Daniel Vetter drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit d947d1b71deb1efa0e7b2600f09e7fe7ea1e622b Author: Sinclair Yeh Date: Thu Mar 23 14:23:20 2017 -0700 drm/vmwgfx: Add and connect connector helper function These helpers won't be called until we flip on the atomic support flag or set drm_crtc_funcs->set_config to using the atomic helper. v2 Use drm_atomic_helper_best_encoder() rather than a vmwgfx-specific one Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom Acked-by: Daniel Vetter drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 7 +++++++ drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 9 +++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 8 ++++++++ 3 files changed, 24 insertions(+) commit 5bd84629a7a0e2462c28ca52e213ebe27fadfee8 Author: Steven Rostedt (VMware) Date: Wed Mar 29 22:45:18 2017 -0400 ftrace: Create separate t_func_next() to simplify the function / hash logic I noticed that if I use dd to read the set_ftrace_filter file that the first hash command is repeated. # cd /sys/kernel/debug/tracing # echo schedule > set_ftrace_filter # echo do_IRQ >> set_ftrace_filter # echo schedule:traceoff >> set_ftrace_filter # echo do_IRQ:traceoff >> set_ftrace_filter # cat set_ftrace_filter schedule do_IRQ schedule:traceoff:unlimited do_IRQ:traceoff:unlimited # dd if=set_ftrace_filter bs=1 schedule do_IRQ schedule:traceoff:unlimited schedule:traceoff:unlimited do_IRQ:traceoff:unlimited 98+0 records in 98+0 records out 98 bytes copied, 0.00265011 s, 37.0 kB/s This is due to the way t_start() calls t_next() as well as the seq_file calls t_next() and the state is slightly different between the two. Namely, t_start() will call t_next() with a local "pos" variable. By separating out the function listing from t_next() into its own function, we can have better control of outputting the functions and the hash of triggers. This simplifies the code. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) commit 43ff926a0c3a0cfd6aa313c3232420f009ab43e8 Author: Steven Rostedt (VMware) Date: Thu Mar 30 16:51:43 2017 -0400 ftrace: Update func_pos in t_start() when all functions are enabled If all functions are enabled, there's a comment displayed in the file to denote that: # cd /sys/kernel/debug/tracing # cat set_ftrace_filter #### all functions enabled #### If a function trigger is set, those are displayed as well: # echo schedule:traceoff >> /debug/tracing/set_ftrace_filter # cat set_ftrace_filter #### all functions enabled #### schedule:traceoff:unlimited But if you read that file with dd, the output can change: # dd if=/debug/tracing/set_ftrace_filter bs=1 #### all functions enabled #### 32+0 records in 32+0 records out 32 bytes copied, 7.0237e-05 s, 456 kB/s This is because the "pos" variable is updated for the comment, but func_pos is not. "func_pos" is used by the triggers (or hashes) to know how many functions were printed and it bases its index from the pos - func_pos. func_pos should be 1 to count for the comment printed. But since it is not, t_hash_start() thinks that one trigger was already printed. The cat gets to t_hash_start() via t_next() and not t_start() which updates both pos and func_pos. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 1 + 1 file changed, 1 insertion(+) commit 2d71d98900b8a4bd58c3ca92e404d5e3701de874 Author: Steven Rostedt (VMware) Date: Wed Mar 29 21:40:49 2017 -0400 ftrace: Return NULL at end of t_start() instead of calling t_hash_start() The loop in t_start() of calling t_next() will call t_hash_start() if the pos is beyond the functions and enters the hash items. There's no reason to check if p is NULL and call t_hash_start(), as that would be redundant. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c20489dad156dd9919ebd854bbace46dbd2576a3 Author: Steven Rostedt (VMware) Date: Wed Mar 29 14:55:49 2017 -0400 ftrace: Assign iter->hash to filter or notrace hashes on seq read Instead of testing if the hash to use is the filter_hash or the notrace_hash at each iteration, do the test at open, and set the iter->hash to point to the corresponding filter or notrace hash. Then use that directly instead of testing which hash needs to be used each iteration. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit c1bc5919f6741cc4b0c83e3058b3d65d76c943e3 Author: Steven Rostedt (VMware) Date: Wed Mar 29 11:38:13 2017 -0400 ftrace: Clean up __seq_open_private() return check The return status check of __seq_open_private() is rather strange: iter = __seq_open_private(); if (iter) { /* do stuff */ } return iter ? 0 : -ENOMEM; It makes much more sense to do the return of failure right away: iter = __seq_open_private(); if (!iter) return -ENOMEM; /* do stuff */ return 0; This clean up will make updates to this code a bit nicer. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 060e2ad57041b42ccecd0047ef4d893f200692c2 Author: Sinclair Yeh Date: Thu Mar 23 14:18:32 2017 -0700 drm/vmwgfx: Add and connect plane helper functions Refactor previous FB and cursor plane update code into their atomic counterparts: check, update, prepare, cleanup, and disable. These helpers won't be called until we flip on the atomic support flag or set drm_crtc_funcs->set_config to using the atomic helper. v2: * Removed unnecessary pinning of cursor surface * Added a few function headers v3: * Set clip region equal to the destination region * Fixed surface pinning policy * Enable SVGA mode in vmw_sou_primary_plane_prepare_fb Signed-off-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 256 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 15 ++ drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 66 ++++++++- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 115 ++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 244 +++++++++++++++++++++++++++++++++ 5 files changed, 695 insertions(+), 1 deletion(-) commit 06ec41909e31be3347f8679e9667d12ac6f7ee6e Author: Sinclair Yeh Date: Thu Mar 23 13:14:54 2017 -0700 drm/vmwgfx: Add and connect CRTC helper functions Atomic mode set requires us to refactor existing vmw_stdu_crtc_set_config code into sections that check the validity of the new mode, and sections that actually program the hardware state. vmw_du_crtc_atomic_check() takes CRTC-related checking code. In a later patch, vmw_du_primary_plane_atomic_check() will take framebuffer-related checking code. These helpers won't be called until we flip on the atomic support flag or set drm_crtc_funcs->set_config to using the atomic helper. v2: * The state->num_connector is actually the total number of potential connectors, not just the one associated with the display unit. The proper one to check is ->connector_mask. * Add the check to only allow plane state to be the same as crtc state (Thanks to mlankhorst) * Make sure to turn on SVGA mode before using VRAM. SVGA mode is disabled in master_drop if dbdev is not running. v3: * Moved dot clock override to crtc_atomic_check Signed-off-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom Reviewed-by: Thomas Hellstrom Acked-by: Daniel Vetter drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 55 ++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 9 +++ drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 79 +++++++++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 119 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 117 ++++++++++++++++++++++++++++++++++ 5 files changed, 379 insertions(+) commit 5f09ad8be7bc2d09f2248ad102f0024e6bdb4613 Author: Chris Wilson Date: Fri Mar 31 20:21:21 2017 +0100 drm/i915: Clear gt.active_requests before checking idle status commit 8490ae207f1d ("drm/i915: Suppress busy status for engines if wedged") moved the check for inflight requests to the intel_engines_are_idle() check to protect the idle worker. However, the request selftests were also checking the engine idle status and erroring out if they did not become idle within a short period of time after the final wait. In order to accommodate the new check, call retire requests prior to the engine check so that we flush all the waits. Fixes: 8490ae207f1d ("drm/i915: Suppress busy status for engines if wedged") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170331192121.10024-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/selftests/i915_gem_request.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b9ab1f3f4454163c7850bd6cbaefcafa6955e1c1 Author: Michal Wajdeczko Date: Fri Mar 31 10:26:52 2017 +0000 drm/i915/uc: Drop use of MISSING_CASE on trivial enums We can rely on compiler to notify us if we miss any case. This approach may also reduce driver size (reported ~4K). Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170331102652.177664-1-michal.wajdeczko@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_uc.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit cae303df3f379f04ce7efadb2e30de460918b302 Author: Dan Carpenter Date: Fri Mar 31 18:21:18 2017 +0300 selinux: Fix an uninitialized variable bug We removed this initialization as a cleanup but it is probably required. The concern is that "nel" can be zero. I'm not an expert on SELinux code but I think it looks possible to write an SELinux policy which triggers this bug. GCC doesn't catch this, but my static checker does. Fixes: 9c312e79d6af ("selinux: Delete an unnecessary variable initialisation in range_read()") Signed-off-by: Dan Carpenter Acked-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b32de9dd38fcf9063e993dcdd64cc64ad344d3ac Author: Alexandre Belloni Date: Thu Feb 16 11:31:06 2017 +0100 ARM: at91: move SoC detection to its own driver To simplify machine init and as the soc_device struct is not used as the parent for on-chip devices anymore, move SoC detection to its own driver. Change in dmesg: - before: DMA: preallocated 256 KiB pool for atomic coherent allocations AT91: Detected SoC family: sama5d2 AT91: Detected SoC: sama5d27, revision 0 No ATAGs? clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 184217874325 ns at_xdmac f0010000.dma-controller: 16 channels, mapped at 0xe085b000 SCSI subsystem initialized - after: DMA: preallocated 256 KiB pool for atomic coherent allocations No ATAGs? clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 184217874325 ns at_xdmac f0010000.dma-controller: 16 channels, mapped at 0xe0859000 AT91: Detected SoC family: sama5d2 AT91: Detected SoC: sama5d27, revision 0 SCSI subsystem initialized Suggested-by: Arnd Bergmann Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/mach-at91/Makefile | 1 - arch/arm/mach-at91/at91rm9200.c | 15 +-- arch/arm/mach-at91/at91sam9.c | 46 +------- arch/arm/mach-at91/sama5.c | 52 +-------- arch/arm/mach-at91/soc.c | 142 ------------------------ arch/arm/mach-at91/soc.h | 91 ---------------- drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/atmel/Kconfig | 6 ++ drivers/soc/atmel/Makefile | 1 + drivers/soc/atmel/soc.c | 231 ++++++++++++++++++++++++++++++++++++++++ drivers/soc/atmel/soc.h | 91 ++++++++++++++++ 12 files changed, 334 insertions(+), 344 deletions(-) commit 8c9290aee18ef33fd7d6817ef36bb430278e542b Author: Alexandre Belloni Date: Tue Mar 28 12:26:18 2017 +0200 ARM: at91: pm: correct typo Add a missing bracket at the end of Anti's email Acked-by: Wenyou Yang Signed-off-by: Alexandre Belloni arch/arm/mach-at91/pm_suspend.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e56d75a9cf1273222ab48069175b2242a205a107 Author: Alexandre Belloni Date: Wed Feb 1 23:55:10 2017 +0100 ARM: at91: pm: Remove at91_pm_set_standby Merge at91_pm_set_standby() in at91_dt_ramc as this is the only callsite. That moves it to the init section. Acked-by: Wenyou Yang Signed-off-by: Alexandre Belloni arch/arm/mach-at91/pm.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 1346919285933b881e169ede93e67abd226676aa Author: Alexandre Belloni Date: Wed Feb 1 23:43:03 2017 +0100 ARM: at91: pm: Merge all at91sam9*_pm_init The PM initialization is now identical for all at91sam9. Merge the functions. Acked-by: Wenyou Yang Signed-off-by: Alexandre Belloni arch/arm/mach-at91/at91sam9.c | 45 +++---------------------------------------- arch/arm/mach-at91/generic.h | 8 ++------ arch/arm/mach-at91/pm.c | 14 +------------- 3 files changed, 6 insertions(+), 61 deletions(-) commit 13f16017d3e3febdceba86e8634cf4d06d5c500c Author: Alexandre Belloni Date: Wed Feb 1 23:35:18 2017 +0100 ARM: at91: pm: Tie the USB clock mask to the pmc The USB clocks mask (uhp_udp_mask) depends on the pmc. Tie it to the pmc id instead of the SoC. Acked-by: Wenyou Yang Signed-off-by: Alexandre Belloni arch/arm/mach-at91/pm.c | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) commit aab02d611f814c8f129860d87719a90a4d88b386 Author: Alexandre Belloni Date: Wed Feb 1 22:41:50 2017 +0100 ARM: at91: pm: Tie the memory controller type to the ramc id Instead of relying on the SoC type to select the memory controller type, use the device tree ids as they are parsed anyway. Acked-by: Wenyou Yang Signed-off-by: Alexandre Belloni arch/arm/mach-at91/pm.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 56387634b7604c141b8645d2377980164e18da0d Author: Alexandre Belloni Date: Wed Feb 1 22:10:34 2017 +0100 ARM: at91: pm: Workaround DDRSDRC self-refresh bug with LPDDR1 memories. As already explained for pm_suspend.S, the DDRSDR controller fails to put LPDDR1 memories in self-refresh. Force the controller to think it has DDR2 memories during the self-refresh period, as the DDR2 self-refresh spec is equivalent to LPDDR1, and is correctly implemented in the controller. Acked-by: Wenyou Yang Signed-off-by: Alexandre Belloni arch/arm/mach-at91/pm.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 5a2d4f053f67d03d212c2d036166934f4958173d Author: Alexandre Belloni Date: Wed Feb 1 21:32:43 2017 +0100 ARM: at91: pm: Simplify at91rm9200_standby Since 2008, AT91_MC_SDRAMC_LPR is set to 0 at kernel initialization. There is no use saving, changing and restoring it. Acked-by: Wenyou Yang Signed-off-by: Alexandre Belloni arch/arm/mach-at91/pm.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 65cc1a59d192be1df33633d3fe668a1e3e0edc36 Author: Alexandre Belloni Date: Tue Jan 31 18:12:57 2017 +0100 ARM: at91: pm: Use struct at91_pm_data in pm_suspend.S The number of register we can safely pass to at91_pm_suspend_in_sram is limited. Instead, pass the address to the at91_pm_data structure. The offsets are automatically generated to avoid hardcoding them. Acked-by: Wenyou Yang Signed-off-by: Alexandre Belloni arch/arm/mach-at91/Makefile | 33 +++++++++++++++ arch/arm/mach-at91/pm.c | 78 +++++++++++++++--------------------- arch/arm/mach-at91/pm.h | 16 +++++--- arch/arm/mach-at91/pm_data-offsets.c | 13 ++++++ arch/arm/mach-at91/pm_suspend.S | 29 ++++++-------- 5 files changed, 102 insertions(+), 67 deletions(-) commit 9e07c3ce2c1054af503b0cb5860df0f8c8ee2619 Author: Alexandre Belloni Date: Tue Jan 31 14:15:48 2017 +0100 ARM: at91: pm: Move global variables into at91_pm_data Instead of having separate global variables to hold IP addresses, move them to struct at91_pm_data. Acked-by: Wenyou Yang Signed-off-by: Alexandre Belloni arch/arm/mach-at91/pm.c | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) commit 4d767bc3c3ae4894877061b58fce0acf63096576 Author: Alexandre Belloni Date: Tue Jan 31 14:08:47 2017 +0100 ARM: at91: pm: Move at91_ramc_read/write to pm.c Those macros are only used in pm.c, move them there so we can remove the test on __ASSEMBLY__. Acked-by: Wenyou Yang Signed-off-by: Alexandre Belloni arch/arm/mach-at91/pm.c | 6 ++++++ arch/arm/mach-at91/pm.h | 8 -------- 2 files changed, 6 insertions(+), 8 deletions(-) commit 9824c447aafa6fbca1be6a2dae7e99e1f0c8c564 Author: Alexandre Belloni Date: Tue Jan 31 13:49:24 2017 +0100 ARM: at91: pm: Cleanup headers Remove unnecessary header inclusions and reorder the remaining ones. Acked-by: Wenyou Yang Signed-off-by: Alexandre Belloni arch/arm/mach-at91/pm.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit f4e6dfcb7812c9bcc210bd7b5309bb1d241628f4 Author: Alexandre Belloni Date: Mon Mar 27 17:18:17 2017 +0200 MAINTAINERS: Add memory drivers to AT91 entry Both atmel-ebi and atmel-sdram are maintained as part of the Atmel ARM SoCs. Suggested-by: Lee Jones Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 3b3225e03b6665be23ad6731caa5d0859060e1f0 Author: Alexandre Belloni Date: Sat Jan 28 15:19:52 2017 +0100 MAINTAINERS: Update AT91 entry Jean Christophe has not been active on the mailing lists for a while. Remove him from the maintainers Cc: Jean-Christophe Plagniol-Villard Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 50021ff1ad5da500a09ca4866467a12cf66f37cb Author: Thierry Reding Date: Wed Mar 29 16:43:53 2017 +0200 drm/fb-helper: Improve code readability Add a couple of temporary variables and use shorter names for existing variables in drm_fb_helper_add_one_connector() for better readability. Tested-by: John Stultz Reviewed-by: Daniel Vetter Signed-off-by: Thierry Reding Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170329144401.1804-4-thierry.reding@gmail.com drivers/gpu/drm/drm_fb_helper.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 39b8b2ed4239191b1d37c9cd3599b9b34b838d3a Author: Thierry Reding Date: Wed Mar 29 16:43:52 2017 +0200 drm/fb-helper: Reshuffle code for subsequent patches An unlocked version of the drm_fb_helper_add_one_connector() function will be added in a subsequent patch. Reshuffle the code separately to make the diff more readable later on. Tested-by: John Stultz Reviewed-by: Daniel Vetter Signed-off-by: Thierry Reding Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170329144401.1804-3-thierry.reding@gmail.com drivers/gpu/drm/drm_fb_helper.c | 59 ++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 30 deletions(-) commit 4b4f99f57febb9c58d1f20b4a0cea27343519713 Author: Thierry Reding Date: Wed Mar 29 16:43:51 2017 +0200 drm/fb-helper: Cleanup checkpatch warnings Fix up a couple of checkpatch warnings, such as whitespace or coding style issues. Tested-by: John Stultz Reviewed-by: Daniel Vetter Signed-off-by: Thierry Reding Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170329144401.1804-2-thierry.reding@gmail.com drivers/gpu/drm/drm_fb_helper.c | 54 ++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 22 deletions(-) commit d7721ca71126b222fb5d66af444d33950a0e3ba3 Author: Sinclair Yeh Date: Thu Mar 23 11:48:44 2017 -0700 drm/vmwgfx: Connector atomic state Add connector handling functions. Start tracking is_implicity in the connector state. Eventually, this field should be tracked exclusively in a connector state. Now that plane and connector states have been created, we can also activate the code that use CRTC state. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 139 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 32 +++++++- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 13 +++- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 13 +++- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 14 +++- 5 files changed, 204 insertions(+), 7 deletions(-) commit cc5ec459de323fe32514d5f47a4d00460ee30f7b Author: Sinclair Yeh Date: Thu Mar 23 11:36:05 2017 -0700 drm/vmwgfx: Plane atomic state Add plane state handling functions. We have to keep track of a few plane states so we cannot use the DRM helper for this. Created vmw_plane_state along with functions to reset, duplicate, and destroty it. v2 * Removed cursor clean up special case Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom Acked-by: Daniel Vetter drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 90 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 24 ++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 13 ++++++ drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 13 ++++++ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 10 ++++ 5 files changed, 150 insertions(+) commit fd5cead23f54697310bd565aa2a23ae5128080a0 Author: Arnaldo Carvalho de Melo Date: Tue Mar 14 16:19:30 2017 -0300 perf trace: Beautify statx syscall 'flag' and 'mask' arguments To test it, build samples/statx/test_statx, which I did as: $ make headers_install $ cc -I ~/git/linux/usr/include samples/statx/test-statx.c -o /tmp/statx And then use perf trace on it: # perf trace -e statx /tmp/statx /etc/passwd statx(/etc/passwd) = 0 results=7ff Size: 3496 Blocks: 8 IO Block: 4096 regular file Device: fd:00 Inode: 280156 Links: 1 Access: (0644/-rw-r--r--) Uid: 0 Gid: 0 Access: 2017-03-29 16:01:01.650073438-0300 Modify: 2017-03-10 16:25:14.156479354-0300 Change: 2017-03-10 16:25:14.171479328-0300 0.000 ( 0.007 ms): statx/30648 statx(dfd: CWD, filename: 0x7ef503f4, flags: SYMLINK_NOFOLLOW, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7fff7ef4eb10) = 0 # Using the test-stat.c options to change the mask: # perf trace -e statx /tmp/statx -O /etc/passwd > /dev/null 0.000 ( 0.008 ms): statx/30745 statx(dfd: CWD, filename: 0x3a0753f4, flags: SYMLINK_NOFOLLOW, mask: BTIME, buffer: 0x7ffd3a0735c0) = 0 # # perf trace -e statx /tmp/statx -A /etc/passwd > /dev/null 0.000 ( 0.010 ms): statx/30757 statx(dfd: CWD, filename: 0xa94e63f4, flags: SYMLINK_NOFOLLOW|NO_AUTOMOUNT, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7ffea94e49d0) = 0 # # trace --no-inherit -e statx /tmp/statx -F /etc/passwd > /dev/null 0.000 ( 0.011 ms): statx(dfd: CWD, filename: 0x3b02d3f3, flags: SYMLINK_NOFOLLOW|STATX_FORCE_SYNC, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7ffd3b02c850) = 0 # # trace --no-inherit -e statx /tmp/statx -F -L /etc/passwd > /dev/null 0.000 ( 0.008 ms): statx(dfd: CWD, filename: 0x15cff3f3, flags: STATX_FORCE_SYNC, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7fff15cfdda0) = 0 # # trace --no-inherit -e statx /tmp/statx -D -O /etc/passwd > /dev/null 0.000 ( 0.009 ms): statx(dfd: CWD, filename: 0xfa37f3f3, flags: SYMLINK_NOFOLLOW|STATX_DONT_SYNC, mask: BTIME, buffer: 0x7ffffa37da20) = 0 # Adding a probe to get the filename collected as well: # perf probe 'vfs_getname=getname_flags:72 pathname=result->name:string' Added new event: probe:vfs_getname (on getname_flags:72 with pathname=result->name:string) You can now use it in all perf tools, such as: perf record -e probe:vfs_getname -aR sleep 1 # trace --no-inherit -e statx /tmp/statx -D -O /etc/passwd > /dev/null 0.169 ( 0.007 ms): statx(dfd: CWD, filename: /etc/passwd, flags: SYMLINK_NOFOLLOW|STATX_DONT_SYNC, mask: BTIME, buffer: 0x7ffda9bf50f0) = 0 # Same technique could be used to collect and beautify the result put in the 'buffer' argument. Finally do a system wide 'perf trace' session looking for any use of statx, then run the test proggie with various flags: # trace -e statx 16612.967 ( 0.028 ms): statx/4562 statx(dfd: CWD, filename: /tmp/statx, flags: SYMLINK_NOFOLLOW, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7ffef195d660) = 0 33064.447 ( 0.011 ms): statx/4569 statx(dfd: CWD, filename: /tmp/statx, flags: SYMLINK_NOFOLLOW|STATX_FORCE_SYNC, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7ffc5484c790) = 0 36050.891 ( 0.023 ms): statx/4576 statx(dfd: CWD, filename: /tmp/statx, flags: SYMLINK_NOFOLLOW, mask: BTIME, buffer: 0x7ffeb18b66e0) = 0 38039.889 ( 0.023 ms): statx/4584 statx(dfd: CWD, filename: /tmp/statx, flags: SYMLINK_NOFOLLOW, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7fff1db0ea90) = 0 ^C# This one also starts moving the beautifiers from files directly included in builtin-trace.c to separate objects + a beauty.h header with prototypes, so that we can add test cases in tools/perf/tests/ to fire syscalls with various arguments and then get them intercepted as syscalls:sys_enter_foo or raw_syscalls:sys_enter + sys_exit to then format and check that the formatted output is the one we expect. Cc: Adrian Hunter Cc: Al Viro Cc: David Ahern Cc: David Howells Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-xvzw8eynffvez5czyzidhrno@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Build | 1 + tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 1 + tools/perf/builtin-trace.c | 14 ++--- tools/perf/trace/beauty/Build | 1 + tools/perf/trace/beauty/beauty.h | 24 ++++++++ tools/perf/trace/beauty/statx.c | 72 +++++++++++++++++++++++ 6 files changed, 104 insertions(+), 9 deletions(-) commit c09adab01e4aeecfa3dfae0946409844400c5901 Author: Mark Rutland Date: Fri Mar 10 10:46:15 2017 +0000 drivers/perf: arm_pmu: split irq request from enable For historical reasons, we lazily request and free interrupts in the arm pmu driver. This requires us to refcount use of the pmu (by way of counting the active events) in order to request/free interrupts at the correct times, which complicates the driver somewhat. The existing logic is flawed, as it only considers currently online CPUs when requesting, freeing, or managing the affinity of interrupts. Intervening hotplug events can result in erroneous IRQ affinity, online CPUs for which interrupts have not been requested, or offline CPUs whose interrupts are still requested. To fix this, this patch splits the requesting of interrupts from any per-cpu management (i.e. per-cpu enable/disable, and configuration of cpu affinity). We now request all interrupts up-front at probe time (and never free them, since we never unregister PMUs). The management of affinity, and per-cpu enable/disable now happens in our cpu hotplug callback, ensuring it occurs consistently. This means that we must now invoke the CPU hotplug callback at boot time in order to configure IRQs, and since the callback also resets the PMU hardware, we can remove the duplicate reset in the probe path. This rework renders our event refcounting unnecessary, so this is removed. Signed-off-by: Mark Rutland [will: make armpmu_get_cpu_irq static] Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 153 ++++++++++++++----------------------------- include/linux/perf/arm_pmu.h | 4 -- 2 files changed, 50 insertions(+), 107 deletions(-) commit 7ed98e0168bd23d8ea3294e95254cc5b4000c948 Author: Mark Rutland Date: Fri Mar 10 10:46:14 2017 +0000 drivers/perf: arm_pmu: manage interrupts per-cpu When requesting or freeing interrupts, we use platform_get_irq() to find relevant irqs, backing this up with additional information in an optional irq_affinity table. This means that our irq request and free paths are tied to a platform_device, and our request path must jump through a number of hoops in order to determine the required affinity of each interrupt. Given that the affinity must be static, we can compute the affinity once up-front at probe time, simplifying the irq request and free paths. By recording interrupts in a per-cpu data structure, we simplify a few paths, and permit a subsequent rework of the request and free paths. Signed-off-by: Mark Rutland [will: rename local nr_irqs variable to avoid conflict with global] Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 314 ++++++++++++++++++++++--------------------- include/linux/perf/arm_pmu.h | 3 +- 2 files changed, 166 insertions(+), 151 deletions(-) commit 2681f0184276d7fc934b6866a5a267f5b3369f7d Author: Mark Rutland Date: Fri Mar 10 10:46:13 2017 +0000 drivers/perf: arm_pmu: rework per-cpu allocation For historical reasons, we allocate per-cpu data associated with a PMU rather late, in cpu_pmu_init, after we've parsed whatever hardware information we were provided with. In order to allow use to store some per-cpu data early in the probe path, we need to allocate (and initialise) the per-cpu data earlier. This patch reworks the way we allocate the pmu and associated per-cpu data in order to make that possible. Signed-off-by: Mark Rutland [will: make armpmu_{alloc,free} static Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 66 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 22 deletions(-) commit 9c2542a41f559452d570b96239a81038c49becfc Author: Sinclair Yeh Date: Thu Mar 23 11:33:39 2017 -0700 drm/vmwgfx: CRTC atomic state Create and Add CRTC state. We currently do not track any properties or custom states so we can technically use the DRM helpers. Creating this code just to make potential future additions easier. Most of the new code will be compiled but not enabled until plane/connector state handling code is also in place. This is the first of a series to enable atomic mode set for vmwgfx. The atomic enabling effort was done in collaboration with Thomas Hellstrom and the VMware Graphics Team. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 81 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 23 ++++++++-- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 10 +++++ drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 10 +++++ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 10 +++++ 5 files changed, 131 insertions(+), 3 deletions(-) commit 36cc79bc9077319c04bd3b132edcacaa9a0d9f2b Author: Sinclair Yeh Date: Thu Mar 23 11:28:11 2017 -0700 drm/vmwgfx: Add universal plane support Universal support is prerequisite for atomic mode set. Explicitly create planes for the cursor and the primary FB. With a functional cursor plane, the DRM will no longer use the legacy cursor_set2 and cursor_move entry points. Signed-off-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 271 +++++++++++++++++------------------ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 39 +++-- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 108 ++++++++++---- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 87 +++++++++-- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 89 ++++++++++-- 7 files changed, 398 insertions(+), 198 deletions(-) commit 27d247c678a09fcac08d6865db73e41b23d3d5f3 Author: Sinclair Yeh Date: Thu Mar 23 09:59:26 2017 -0700 drm/vmwgfx: Removed unused snooper.crtc field This field is not being used anymore Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 -- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 1 - 3 files changed, 4 deletions(-) commit 5eb2c72c8acc3f84c85f9d504b87f25f78ef0eb0 Author: Russell King Date: Fri Mar 31 11:00:42 2017 +0100 dma-buf: fence debugging Add debugfs output to report shared and exclusive fences on a dma_buf object. This produces output such as: Dma-buf Objects: size flags mode count exp_name 08294400 00000000 00000005 00000005 drm Exclusive fence: etnaviv 134000.gpu signalled Attached Devices: gpu-subsystem Total 1 devices attached Total 1 objects, 8294400 bytes Signed-off-by: Russell King Reviewed-by: Christian König Signed-off-by: Gustavo Padovan Link: http://patchwork.freedesktop.org/patch/msgid/E1cttMI-00068z-3X@rmk-PC.armlinux.org.uk drivers/dma-buf/dma-buf.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit cc7e394024770d4bfd8463fab1a9e2e262a7d7c1 Author: Joe Thornber Date: Fri Mar 31 10:46:54 2017 -0400 dm cache policy smq: make the cleaner policy write-back more aggressively By ignoring the sentinels the cleaner policy is able to write-back dirty cache data much faster. There is no reason to respect the sentinels, which denote that a block was changed recently, when using the cleaner policy given that the cleaner is tasked with writing back all dirty data. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-policy-smq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 449b668ce0b9069fcaafa6344c7f10fa2ba9632e Author: Joe Thornber Date: Fri Mar 31 10:09:45 2017 -0400 dm cache: set/clear the cache core's dirty_bitset when loading mappings When loading metadata make sure to set/clear the dirty bits in the cache core's dirty_bitset as well as the policy. Otherwise the cache core is unaware that any blocks were dirty when the cache was last shutdown. A very serious side-effect being that the cleaner policy would therefore never be tasked with writing back dirty data from a cache that was in writeback mode (e.g. when switching from smq policy to cleaner policy when decommissioning a writeback cache). This fixes a serious data corruption bug associated with writeback mode. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-target.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a8c006aafead3c45ae5d5601e3717055bccf41bc Author: Dan Carpenter Date: Fri Mar 31 18:22:23 2017 +0300 ALSA: timer: Info leak in snd_timer_user_tinterrupt() The "r1" struct has memory holes. We clear it with memset on one path where it is used but not the other. Let's just memset it at the start of the function so it's always safe. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai sound/core/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8ed68205f39a7a934901eab80a5cbf3a062b7b4 Author: Dan Carpenter Date: Fri Mar 31 18:21:41 2017 +0300 ALSA: timer: remove some dead code We just checked "id.card < 0" on the lines before so we know it's not true here. We can delete that check. Also checkpatch.pl complains about some extra curly braces so we may as well fix that while we're at it. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai sound/core/timer.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit c46988aef2de6d290b7c5453d58f1293337aefaa Author: Rémy Léone Date: Mon Mar 20 16:37:49 2017 +0100 Use sphinx.version_info directly instead of parsing Using the development version of sphinx caused the parsing of the version to fail. Signed-off-by: Rémy Léone Signed-off-by: Jonathan Corbet Documentation/conf.py | 4 ++-- Documentation/sphinx/cdomain.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 036db11cab275dd3cc13284e760bb050c59559be Author: Cao jin Date: Fri Mar 24 17:03:17 2017 +0800 sparse doc: fix reference path Documentation/sparse.txt has been moved to Documentation/dev-tools/sparse.rst Signed-off-by: Cao jin Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/sparse.txt | 4 ++-- Makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit abf1e0a98083fd0a1069ce68ad8c92bfb97a57db Author: Stefan Agner Date: Fri Mar 24 11:33:46 2017 -0700 tty: serial: fsl_lpuart: lock port on console write The console write code is not entirely race free (e.g. the operations to disabling the UART interrupts are not atomic) hence locking is required. This has been become apparent with the PREEMPT RT patchset applied: With the fully preemptible kernel configuration the system often ended up in a freeze already at startup. Disable interrupts and lock using read_lock_irqsave. Try to lock in the sysrq/oops case, but don't bother if locking fails. Signed-off-by: Stefan Agner Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 4d9d7d896d77e70e6868cfe681e7fcd58dc9526d Author: Tobias Klauser Date: Wed Mar 22 13:50:13 2017 +0100 serial: altera_uart: add earlycon support Nios2 currently uses its own early printk implementation, rather than using unified earlycon support to show boot messages on altera_uart. Add earlycon support to altera_uart so that other archs may use it. Also, this (together with the corresponding patch for altera_jtaguart) will allow the early printk implementation in arch/nios2 to be removed in a future patch. Cc: Ley Foon Tan Signed-off-by: Tobias Klauser Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/Kconfig | 1 + drivers/tty/serial/altera_uart.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit a4199f5eb8096d63828f7333fa45650a7b0a99ed Author: Tim Gardner Date: Wed Mar 22 09:07:20 2017 -0600 tty: Disable default console blanking interval BugLink: http://bugs.launchpad.net/bugs/869017 Console blanking is not enabling DPMS power saving (thereby negating any power-saving benefit), and is simply turning the screen content blank. This means that any crash output is invisible which is unhelpful on a server (virtual or otherwise). Furthermore, CRT burn in concerns should no longer govern the default case. Affected users could always set consoleblank on the kernel command line. Signed-off-by: Tim Gardner Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Adam Borowski Cc: Scot Doyle Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2c663d155e1df81fa55287effac3b7115abc210 Author: Vignesh R Date: Fri Mar 24 10:58:00 2017 +0530 serial: 8250: 8250_core: Fix irq name for 8250 serial IRQ Using dev_name() as IRQ name during request_irq() might be misleading in case of serial over PCI. Therefore identify serial port IRQ using uart_port's name field. This will help mapping IRQs to appropriate ttySN(where N is the serial port index) instances. Signed-off-by: Vignesh R Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7048b15900f36fe21398fba94777b8aab3b376d Author: Vignesh R Date: Fri Mar 24 10:57:59 2017 +0530 tty: serial_core: Add name field to uart_port struct Introduce a field to store name of uart_port that can be used to easily identify UART port instances on a system that has more than one UART instance. The name is of the form ttyXN(eg. ttyS0, ttyAMA0,..) where N is number that particular UART instance. This field will be useful when printing debug info for a particular port or in register IRQs with unique IRQ name. Port name is populated during uart_add_one_port(). Signed-off-by: Vignesh R Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 7 +++++++ include/linux/serial_core.h | 1 + 2 files changed, 8 insertions(+) commit ada26481dfe698ac64b4aaf19a726e66eb8508c6 Author: Dmitry Safonov Date: Fri Mar 31 14:11:37 2017 +0300 x86/mm: Make in_compat_syscall() work during exec The x86 mmap() code selects the mmap base for an allocation depending on the bitness of the syscall. For 64bit sycalls it select mm->mmap_base and for 32bit mm->mmap_compat_base. On execve the registers of the task invoking exec() are copied to the child pt_regs. So child->pt_regs->orig_ax contains the execve syscall number of the parent. exec() calls mmap() which in turn uses in_compat_syscall() to check whether the mapping is for a 32bit or a 64bit task. The decision is made on the following criteria: ia32 child->thread.status & TS_COMPAT x32 child->pt_regs.orig_ax & __X32_SYSCALL_BIT ia64 !ia32 && !x32 child->thread.status is corretly set up in set_personality_*(), but the syscall number in child->pt_regs.orig_ax is left unmodified. Therefore the parent/child combinations work or fail in the following way: Parent Child Child->thread_status child->pt_regs.orig_ax in_compat() Works ia64 ia64 TS_COMPAT == 0 __X32_SYSCALL_BIT == 0 false Y ia64 ia32 TS_COMPAT == 1 __X32_SYSCALL_BIT == 0 true Y ia64 x32 TS_COMPAT == 0 __X32_SYSCALL_BIT == 0 false N ia32 ia64 TS_COMPAT == 0 __X32_SYSCALL_BIT == 0 false Y ia32 ia32 TS_COMPAT == 1 __X32_SYSCALL_BIT == 0 true Y ia32 x32 TS_COMPAT == 0 __X32_SYSCALL_BIT == 0 false N x32 ia64 TS_COMPAT == 0 __X32_SYSCALL_BIT == 1 true N x32 ia32 TS_COMPAT == 1 __X32_SYSCALL_BIT == 1 true Y x32 x32 TS_COMPAT == 0 __X32_SYSCALL_BIT == 1 true Y Make set_personality_*() store the syscall number incl. __X32_SYSCALL_BIT which corresponds to the newly started ELF executable in the childs pt_regs, i.e. pretend that the exec was invoked from a task with the same executable format. So both thread.status and pt_regs.orig_ax correspond to the new ELF format and in_compat_syscall() returns the correct result. [ tglx: Rewrote changelog ] Fixes: commit 1b028f784e8c ("x86/mm: Introduce mmap_compat_base() for 32-bit mmap()") Reported-by: Adam Borowski Suggested-by: H. Peter Anvin Suggested-by: Thomas Gleixner Signed-off-by: Dmitry Safonov Cc: 0x7f454c46@gmail.com Cc: linux-mm@kvack.org Cc: Andrei Vagin Cc: Andy Lutomirski Cc: Cyrill Gorcunov Cc: Borislav Petkov Cc: "Kirill A. Shutemov" Link: http://lkml.kernel.org/r/20170331111137.28170-1-dsafonov@virtuozzo.com Signed-off-by: Thomas Gleixner arch/x86/kernel/process_64.c | 67 ++++++++++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 21 deletions(-) commit d7c530b25946e323fc188cd06777ac94f2eddb95 Author: Paulo Zanoni Date: Thu Mar 30 17:57:52 2017 -0300 drm/i915: make a few DDI functions static We don't need to export them since they're not being used outside the file. The next time I try to find the callers for these things I will know I won't need to look outside intel_ddi.c. Signed-off-by: Paulo Zanoni Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1490907472-10883-1-git-send-email-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_ddi.c | 8 ++++---- drivers/gpu/drm/i915/intel_drv.h | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) commit f363b089be0a39fe4282c688118a51d21f952bc7 Author: Eric Biggers Date: Thu Mar 30 13:39:16 2017 -0700 blk-mq: constify struct blk_mq_ops Constify all instances of blk_mq_ops, as they are never modified. Signed-off-by: Eric Biggers Signed-off-by: Jens Axboe drivers/block/loop.c | 2 +- drivers/block/mtip32xx/mtip32xx.c | 2 +- drivers/block/nbd.c | 2 +- drivers/block/null_blk.c | 2 +- drivers/block/rbd.c | 2 +- drivers/block/virtio_blk.c | 2 +- drivers/block/xen-blkfront.c | 2 +- drivers/md/dm-rq.c | 2 +- drivers/mtd/ubi/block.c | 2 +- drivers/nvme/host/fc.c | 4 ++-- drivers/nvme/host/pci.c | 4 ++-- drivers/nvme/host/rdma.c | 4 ++-- drivers/nvme/target/loop.c | 4 ++-- drivers/scsi/scsi_lib.c | 2 +- 14 files changed, 18 insertions(+), 18 deletions(-) commit 3e00cbe8891a655520ca2cfe9b6d509d0a845f07 Author: Jiri Olsa Date: Thu Mar 30 16:46:37 2017 +0200 perf tools: Do not fail in case of empty HOME env variable Currently we fail in the following case: $ unset HOME $ ./perf record ls $ echo $? 255 It's because the config code init fails due to a missing HOME variable value. Fix this by skipping the user config init if there's no HOME variable value. Reported-by: Jan Stancek Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170330144637.7468-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/config.c | 54 +++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 23 deletions(-) commit 67ef28794d7e30f33936d655f2951e8dcae7cd5a Author: Arnaldo Carvalho de Melo Date: Thu Mar 30 11:16:59 2017 -0300 tools include uapi: Grab copies of stat.h and fcntl.h We will need it to build tools/perf/trace/beauty/statx.h. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-nin41ve2fa63lrfbdr6x57yr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/types.h | 1 + tools/include/uapi/linux/fcntl.h | 72 ++++++++++++++++ tools/include/uapi/linux/stat.h | 176 +++++++++++++++++++++++++++++++++++++++ tools/perf/MANIFEST | 2 + tools/perf/check-headers.sh | 2 + 5 files changed, 253 insertions(+) commit 5885615e44faebaf379fa0cdd2b9c084960dae38 Author: Dan Carpenter Date: Fri Mar 31 16:53:40 2017 +0300 ALSA: emux: stop if copy_from_user() fails If we can't fill the "patch" struct because "count" is too small (it can be as low as 4 bytes) or because copy_from_user() failed, then just return instead of using unintialized data. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai sound/synth/emux/emux_oss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7cd3e9dbdd4c0025d0e37c8c73a2ac8641fc55bc Author: Jan Kiszka Date: Thu Mar 23 09:26:42 2017 +0100 serial: 8250_lpss: Unconditionally set PCI master for Quark MSI needs it as well. Should have no practical impact, though, as DMA is always available on the Quark. But given the few users of pci_alloc_irq_vectors so far, this incorrect pattern may spread otherwise. Fixes: 3f3a46951e02 ("serial: 8250_lpss: set PCI master only for private DMA") Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_lpss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2ed2b8621be2708c0f6d61fe9841e9ad8b9753f0 Author: Samuel Thibault Date: Sun Mar 26 22:47:36 2017 +0200 braille-console: Fix value returned by _braille_console_setup commit bbeddf52adc1 ("printk: move braille console support into separate braille.[ch] files") introduced _braille_console_setup() to outline the braille initialization code. There was however some confusion over the value it was supposed to return. commit 2cfe6c4ac7ee ("printk: Fix return of braille_register_console()") tried to fix it but failed to. This fixes and documents the returned value according to the use in printk.c: non-zero return means a parsing error, and thus this console configuration should be ignored. Signed-off-by: Samuel Thibault Cc: Aleksey Makarov Cc: Joe Perches Cc: Ming Lei Cc: Steven Rostedt Acked-by: Petr Mladek Signed-off-by: Greg Kroah-Hartman kernel/printk/braille.c | 15 ++++++++------- kernel/printk/braille.h | 13 ++++++++++--- 2 files changed, 18 insertions(+), 10 deletions(-) commit cfa6eb239154315e6efcdda1d929e024097f927b Author: Geert Uytterhoeven Date: Tue Mar 28 11:13:46 2017 +0200 serial: sh-sci: Fix (AUTO)RTS in sci_init_pins() If a UART has dedicated RTS/CTS pins, and hardware control flow is disabled (or AUTORTS is not yet effective), changing any serial port configuration deasserts RTS, as .set_termios() calls sci_init_pins(). To fix this, consider the current (AUTO)RTS state when (re)initializing the pins. Note that for SCIFA/SCIFB, AUTORTS needs explicit configuration of the RTS# pin function, while (H)SCIF handles this automatically. Fixes: d2b9775d795ec05f ("serial: sh-sci: Correct pin initialization on (H)SCIF") Fixes: e9d7a45a03991349 ("serial: sh-sci: Add pin initialization for SCIFA/SCIFB") Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 5f76895e4c712b1b5af450cf344389b8c53ac2c2 Author: Geert Uytterhoeven Date: Tue Mar 28 11:13:45 2017 +0200 serial: sh-sci: Fix late enablement of AUTORTS When changing hardware control flow for a UART with dedicated RTS/CTS pins, the new AUTORTS state is not immediately reflected in the hardware, but only when RTS is raised. However, the serial core does not call .set_mctrl() after .set_termios(), hence AUTORTS may only become effective when the port is closed, and reopened later. Note that this problem does not happen when manually using stty to change CRTSCTS, as AUTORTS will work fine on next open. To fix this, call .set_mctrl() from .set_termios() when dedicated RTS/CTS pins are present, to refresh the AUTORTS or RTS state. This is similar to what other drivers supporting AUTORTS do (e.g. omap-serial). Reported-by: Baumann, Christoph (C.) Fixes: 33f50ffc253854cf ("serial: sh-sci: Fix support for hardware-assisted RTS/CTS") Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 4 ++++ 1 file changed, 4 insertions(+) commit e37f712f760478a3bce8a68b8d85b5b0bf6642eb Author: Geert Uytterhoeven Date: Tue Mar 28 11:13:44 2017 +0200 serial: sh-sci: Fix hang in sci_reset() When the .set_termios() callback resets the UART, it first waits (busy loops) until all characters in the transmit FIFO have been transmitted, to prevent a port configuration change from impacting these characters. However, if the UART has dedicated RTS/CTS hardware flow control enabled, these characters may have been stuck in the FIFO due to CTS not being asserted by the remote side. - When a new user opens the port, .set_termios() is called while transmission is still disabled, leading to an infinite loop: NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! - When an active user changes port configuration without waiting for the draining of the transmit FIFO, this may also block indefinitely, until CTS is asserted by the remote side. This has been observed with SCIFA (on r8a7740/armadillo), and SCIFB and HSCIF (on r8a7791/koelsch). To fix this, remove the code that waits for the draining of the transmit FIFO. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 4 ---- 1 file changed, 4 deletions(-) commit b5090cb46ee7580f848c2ecc4633ada306840328 Author: Lee Jones Date: Mon Mar 27 15:03:40 2017 +0100 serial: st-asc: Change default baudrate from 9600 to 115200 9600 is old school. Most applications use 115200 as the default baud these days. Signed-off-by: Lee Jones Acked-by: Patrice Chotard Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/st-asc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef49ffd8b5e5a2302c5aa6828619d4c616ab04aa Author: Lionel Debieve Date: Wed Mar 22 18:12:31 2017 +0100 tty: serial: st-asc: Make the locking RT aware The lock is a sleeping lock and local_irq_save() is not the standard implementation now. Working for both -RT and non RT. Signed-off-by: Lionel Debieve Acked-by: Sebastian Andrzej Siewior Acked-by: Patrice Chotard Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/st-asc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit a1365c4081ac21d2a51fcde3a9956e0e41cc2b74 Author: Alexandre TORGUE Date: Tue Jan 31 09:52:54 2017 +0100 ARM: configs: Add new config fragment to change RAM start point Add a new fragment to over-ride the RAM start point to 0xd0000000. Signed-off-by: Alexandre TORGUE arch/arm/configs/dram_0xd0000000.config | 1 + 1 file changed, 1 insertion(+) commit 0899cd2a5fba6573decf5baad0757502fef86885 Author: M'boumba Cedric Madianga Date: Fri Mar 31 14:14:53 2017 +0200 ARM: configs: stm32: Add I2C support This patch adds I2C support for STM32 default configuration Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Alexandre TORGUE arch/arm/configs/stm32_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit f6eedbba7a26fdaee9ea8121336dc86236c136c7 Author: Aneesh Kumar K.V Date: Wed Mar 22 09:06:57 2017 +0530 powerpc/mm/hash: Increase VA range to 128TB We update the hash linux page table layout such that we can support 512TB. But we limit the TASK_SIZE to 128TB. We can switch to 128TB by default without conditional because that is the max virtual address supported by other architectures. We will later add a mechanism to on-demand increase the application's effective address range to 512TB. Having the page table layout changed to accommodate 512TB makes testing large memory configuration easier with less code changes to kernel Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/hash-4k.h | 2 +- arch/powerpc/include/asm/book3s/64/hash-64k.h | 2 +- arch/powerpc/include/asm/processor.h | 22 ++++++++++++++++++---- 3 files changed, 20 insertions(+), 6 deletions(-) commit 59248aecc4aea80c2c8b444ff8af9b894302a41d Author: Aneesh Kumar K.V Date: Wed Mar 22 09:06:56 2017 +0530 powerpc/mm/hash: Convert mask to unsigned long This doesn't have any functional change. But helps in avoiding mistakes in case the shift bit changes Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu-hash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6f81a92015b2c1d12fad32b8456f99855da6e13 Author: Aneesh Kumar K.V Date: Wed Mar 29 17:21:53 2017 +1100 powerpc/mm/hash: Support 68 bit VA Inorder to support large effective address range (512TB), we want to increase the virtual address bits to 68. But we do have platforms like p4 and p5 that can only do 65 bit VA. We support those platforms by limiting context bits on them to 16. The protovsid -> vsid conversion is verified to work with both 65 and 68 bit va values. I also documented the restrictions in a table format as part of code comments. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu-hash.h | 127 ++++++++++++++++---------- arch/powerpc/include/asm/mmu.h | 19 ++-- arch/powerpc/kvm/book3s_64_mmu_host.c | 8 +- arch/powerpc/mm/mmu_context_book3s64.c | 9 +- arch/powerpc/mm/slb_low.S | 54 +++++++++-- 5 files changed, 152 insertions(+), 65 deletions(-) commit 85beb1c486df76a7a851a0e063785282c2608f37 Author: Michael Ellerman Date: Wed Mar 29 23:10:34 2017 +1100 powerpc/mm/hash: Check for non-kernel address in get_kernel_vsid() get_kernel_vsid() has a very stern comment saying that it's only valid for kernel addresses, but there's nothing in the code to enforce that. Rather than hoping our callers are well behaved, add a check and return a VSID of 0 (invalid). Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu-hash.h | 3 +++ 1 file changed, 3 insertions(+) commit 941711a3a049abc012be0eb8856ff6eec40a4570 Author: Aneesh Kumar K.V Date: Wed Mar 29 23:10:22 2017 +1100 powerpc/mm/hash: Use context ids 1-4 for the kernel Currently we use the top 4 context ids (0x7fffc-0x7ffff) for the kernel. Kernel VSIDs are built using these top context values and effective the segement ID. In subsequent patches we want to increase the max effective address to 512TB. We will achieve that by increasing the effective segment IDs there by increasing virtual address range. We will be switching to a 68bit virtual address in the following patch. But platforms like Power4 and Power5 only support a 65 bit virtual address. We will handle that by limiting the context bits to 16 instead of 19 on those platforms. That means the max context id will have a different value on different platforms. So that we don't have to deal with the kernel context ids changing between different platforms, move the kernel context ids down to use context ids 1-4. We can't use segment 0 of context-id 0, because that maps to VSID 0, which we want to keep as invalid, so we avoid context-id 0 entirely. Similarly we can't use the last segment of the maximum context, so we avoid it too. Signed-off-by: Aneesh Kumar K.V [mpe: Switch from 0-3 to 1-4 so VSID=0 remains invalid] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu-hash.h | 60 ++++++++++++++++----------- arch/powerpc/mm/mmu_context_book3s64.c | 2 +- arch/powerpc/mm/slb_low.S | 20 +++------ 3 files changed, 41 insertions(+), 41 deletions(-) commit 760573c1a98cce20b9306f3922d460e58b4ba656 Author: Michael Ellerman Date: Wed Mar 29 22:36:56 2017 +1100 powerpc/mm: Split radix vs hash mm context initialisation Complete the split of the radix vs hash mm context initialisation. This is mostly code movement, with the exception that we now limit the context allocation to PRTB_ENTRIES - 1 on radix. Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu.h | 2 + arch/powerpc/mm/mmu_context_book3s64.c | 67 ++++++++++++++++++++------------ 2 files changed, 45 insertions(+), 24 deletions(-) commit c1ff840d21208aff8cea18c0ae052c536d74f53e Author: Michael Ellerman Date: Wed Mar 29 22:10:45 2017 +1100 powerpc/mm/hash: Pull hash constants into hash__alloc_context_id() The min and max context id values used in alloc_context_id() are currently the right values for use on hash, and happen to also be safe for use on radix. But we need to change that in a subsequent patch, so make the min/max ids parameters and pull the hash values into hsah__alloc_context_id(). Signed-off-by: Michael Ellerman arch/powerpc/mm/mmu_context_book3s64.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit a336f2f5b05c3c02876a365b8f17b3d10920dbd5 Author: Michael Ellerman Date: Wed Mar 29 22:00:46 2017 +1100 powerpc/mm/hash: Abstract context id allocation for KVM KVM wants to be able to allocate an MMU context id, which it does currently by calling __init_new_context(). We're about to rework that code, so provide a wrapper for KVM so it can not worry about the details. Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mmu_context.h | 2 +- arch/powerpc/kvm/book3s_64_mmu_host.c | 2 +- arch/powerpc/mm/mmu_context_book3s64.c | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) commit 302413cad56820d4cd0d4fb66d01c81b4fcb1a10 Author: Aneesh Kumar K.V Date: Wed Mar 22 09:06:52 2017 +0530 powerpc/mm/slice: Update slice mask printing to use bitmap printing. We now get output like below which is much better. [ 0.935306] good_mask low_slice: 0-15 [ 0.935360] good_mask high_slice: 0-511 Compared to [ 0.953414] good_mask:1111111111111111 - 1111111111111......... I also fixed an error with slice_dbg printing. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/slice.c | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) commit 82185222ff984edb50fc2adc752a46490843ecee Author: Aneesh Kumar K.V Date: Wed Mar 22 09:06:51 2017 +0530 powerpc/mm/slice: Move slice_mask struct definition to slice.c This structure definition need not be in a header since this is used only by slice.c file. So move it to slice.c. This also allow us to use SLICE_NUM_HIGH instead of 64. I also switch the low_slices type to u64 from u16. This doesn't have an impact on size of struct due to padding added with u16 type. This helps in using bitmap printing function for printing slice mask. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/page_64.h | 11 ----------- arch/powerpc/mm/slice.c | 10 +++++++++- 2 files changed, 9 insertions(+), 12 deletions(-) commit 1b2fa5a046b4716cf4b11bb29a581e680cc6e9ef Author: Aneesh Kumar K.V Date: Wed Mar 22 09:06:50 2017 +0530 powerpc/mm: Remove checks that TASK_SIZE_USER64 is too small Remove the checks that TASK_SIZE_USER64 is smaller than H_PGTABLE_RANGE and USER_VSID_RANGE. In a following patch we will deliberately add support for a TASK_SIZE smaller than both ranges, so this will no longer be an error condition. Signed-off-by: Aneesh Kumar K.V [mpe: Keep the check in pgtable_64.c that we don't exceed USER_VSID_RANGE] Signed-off-by: Michael Ellerman arch/powerpc/mm/init_64.c | 4 ---- 1 file changed, 4 deletions(-) commit 52b1e66587b6b4f2e5a09102b3a40eed8ec3675f Author: Aneesh Kumar K.V Date: Wed Mar 22 09:06:49 2017 +0530 powerpc/mm: Move copy_mm_to_paca to paca.c We also update the function arg to struct mm_struct. Move this so that function finds the definition of struct mm_struct. No functional change in this patch. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/paca.h | 18 +----------------- arch/powerpc/kernel/paca.c | 19 +++++++++++++++++++ arch/powerpc/mm/hash_utils_64.c | 4 ++-- arch/powerpc/mm/slb.c | 2 +- arch/powerpc/mm/slice.c | 2 +- 5 files changed, 24 insertions(+), 21 deletions(-) commit a4d3621503290f73b2ca65a6de58f01296c0b85c Author: Aneesh Kumar K.V Date: Wed Mar 22 09:06:48 2017 +0530 powerpc/mm/slice: Update the function prototype This avoid copying the slice_mask struct as function return value Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/slice.c | 62 ++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 34 deletions(-) commit f3207c124e7aa8d4d9cf32cc45b10ceb4defedb9 Author: Aneesh Kumar K.V Date: Wed Mar 22 09:06:47 2017 +0530 powerpc/mm/slice: Convert slice_mask high slice to a bitmap In followup patch we want to increase the va range which will result in us requiring high_slices to have more than 64 bits. To enable this convert high_slices to bitmap. We keep the number bits same in this patch and later change that to higher value Signed-off-by: Aneesh Kumar K.V [mpe: Fold in fix to use bitmap_empty()] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/page_64.h | 15 ++--- arch/powerpc/mm/slice.c | 112 +++++++++++++++++++++++++------------ 2 files changed, 81 insertions(+), 46 deletions(-) commit 6aa59f5162fcca09c7dcc84d64e2ebd1e7449884 Author: Aneesh Kumar K.V Date: Tue Mar 28 15:21:12 2017 +1100 powerpc/mm: Move hash specific pte bits to be top bits of RPN We don't support the full 57 bits of physical address and hence can overload the top bits of RPN as hash specific pte bits. Add a BUILD_BUG_ON() to enforce the relationship between H_PAGE_F_SECOND and H_PAGE_F_GIX. Signed-off-by: Aneesh Kumar K.V Reviewed-by: Paul Mackerras [mpe: Move the BUILD_BUG_ON() into hash_utils_64.c and comment it] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/hash.h | 17 +++++------------ arch/powerpc/include/asm/book3s/64/pgtable.h | 16 +++++++++++++--- arch/powerpc/mm/hash_utils_64.c | 13 +++++++++++++ 3 files changed, 31 insertions(+), 15 deletions(-) commit 2f18d533757da3899f4bedab0b2c051b080079dc Author: Aneesh Kumar K.V Date: Tue Mar 21 22:59:59 2017 +0530 powerpc/mm: Lower the max real address to 53 bits Max value supported by hardware is 51 bits address. Radix page table define a slot of 57 bits for future expansion. We restrict the value supported in linux kernel 53 bits, so that we can use the bits between 57-53 for storing hash linux page table bits. This is done in the next patch. This will free up the software page table bits to be used for features that are needed for both hash and radix. The current hash linux page table format doesn't have any free software bits. Moving hash linux page table specific bits to top of RPN field free up the software bits for other purpose. Signed-off-by: Aneesh Kumar K.V Reviewed-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/pgtable.h | 31 +++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit 32789d3821898cf8038394772d41e32902018068 Author: Aneesh Kumar K.V Date: Tue Mar 21 22:59:58 2017 +0530 powerpc/mm: Define all PTE bits based on radix definitions. Reviewed-by: Paul Mackerras Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/hash-64k.h | 4 ++-- arch/powerpc/include/asm/book3s/64/pgtable.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit 54c4025efc0fbc2a145d1b80ddc4875d5037c887 Author: Aneesh Kumar K.V Date: Tue Mar 21 22:59:57 2017 +0530 powerpc/mm: Define _PAGE_SOFT_DIRTY unconditionally Conditional PTE bit definition is confusing and results in coding error. Reviewed-by: Paul Mackerras Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/pgtable.h | 4 ---- 1 file changed, 4 deletions(-) commit a525108cf1cc14651602d678da38fa627a76a724 Author: Aneesh Kumar K.V Date: Tue Mar 21 22:59:56 2017 +0530 powerpc/mm/hugetlb: Filter out hugepage size not supported by page table layout Without this if firmware reports 1MB page size support we will crash trying to use 1MB as hugetlb page size. echo 300 > /sys/kernel/mm/hugepages/hugepages-1024kB/nr_hugepages kernel BUG at ./arch/powerpc/include/asm/hugetlb.h:19! ..... .... [c0000000e2c27b30] c00000000029dae8 .hugetlb_fault+0x638/0xda0 [c0000000e2c27c30] c00000000026fb64 .handle_mm_fault+0x844/0x1d70 [c0000000e2c27d70] c00000000004805c .do_page_fault+0x3dc/0x7c0 [c0000000e2c27e30] c00000000000ac98 handle_page_fault+0x10/0x30 With fix, we don't enable 1MB as hugepage size. bash-4.2# cd /sys/kernel/mm/hugepages/ bash-4.2# ls hugepages-16384kB hugepages-16777216kB Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/hugetlbpage.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 3a4c26011da3ed8df1f4f93af82bd5f2b420751f Author: Aneesh Kumar K.V Date: Tue Mar 21 22:59:55 2017 +0530 powerpc/mm: Add translation mode information in /proc/cpuinfo With this we have on powernv and pseries /proc/cpuinfo reporting timebase : 512000000 platform : PowerNV model : 8247-22L machine : PowerNV 8247-22L firmware : OPAL MMU : Hash Reviewed-by: Paul Mackerras Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/setup.c | 4 ++++ arch/powerpc/platforms/pseries/setup.c | 4 ++++ 2 files changed, 8 insertions(+) commit ddb014b68dc620e76b7831b5e09d9b8ff07c570e Author: Aneesh Kumar K.V Date: Tue Mar 21 22:59:54 2017 +0530 powerpc/mm/radix: rename _PAGE_LARGE to R_PAGE_LARGE This bit is only used by radix and it is nice to follow the naming style of having bit name start with H_/R_ depending on which translation mode they are used. No functional change in this patch. Reviewed-by: Paul Mackerras Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/hugetlb.h | 2 +- arch/powerpc/include/asm/book3s/64/radix.h | 4 ++-- arch/powerpc/mm/tlb-radix.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit f5bd0fdc0c74dc4cdc5d81319441c4ef9b47cd65 Author: Aneesh Kumar K.V Date: Tue Mar 21 22:59:53 2017 +0530 powerpc/mm: Cleanup bits definition between hash and radix. Define everything based on bits present in pgtable.h. This will help in easily identifying overlapping bits between hash/radix. No functional change with this patch. Reviewed-by: Paul Mackerras Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/hash-64k.h | 4 ++++ arch/powerpc/include/asm/book3s/64/hash.h | 9 +++++---- arch/powerpc/include/asm/book3s/64/pgtable.h | 10 ++-------- arch/powerpc/include/asm/book3s/64/radix.h | 6 ++++++ 4 files changed, 17 insertions(+), 12 deletions(-) commit 98beda74de246520653b42147443292d9814426d Author: Aneesh Kumar K.V Date: Tue Mar 21 22:59:52 2017 +0530 powerpc/mm/slice: Fix off-by-1 error when computing slice mask For low slice, max addr should be less than 4G. Without limiting this correctly we will end up with a low slice mask which has 17th bit set. This is not a problem with the current code because our low slice mask is of type u16. But in later patch I am switching low slice mask to u64 type and having the 17bit set result in wrong slice mask which in turn results in mmap failures. Reviewed-by: Paul Mackerras Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/slice.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b42279f0165cdfb093718ec368e56dde7e8d80af Author: Aneesh Kumar K.V Date: Tue Mar 21 22:59:51 2017 +0530 powerpc/mm/nohash: MM_SLICE is only used by book3s 64 BOOKE code is dead code as per the Kconfig details. So make it simpler by enabling MM_SLICE only for book3s_64. The changes w.r.t nohash is just removing deadcode. W.r.t ppc64, 4k without hugetlb will now enable MM_SLICE. But that is good, because we reduce one extra variant which probably is not getting tested much. Reviewed-by: Paul Mackerras Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mmu-book3e.h | 5 ----- arch/powerpc/include/asm/nohash/64/pgtable.h | 5 ----- arch/powerpc/mm/hugetlbpage-book3e.c | 7 ------- arch/powerpc/mm/mmu_context_nohash.c | 5 ----- arch/powerpc/platforms/Kconfig.cputype | 2 +- 5 files changed, 1 insertion(+), 23 deletions(-) commit adec9a2e7ca3b4193818f9a7b39563851b180711 Author: Yang Shi Date: Tue Apr 26 09:49:38 2016 -0700 powerpc/4xx: Make sam440ep_setup_rtc() init sam440ep_setup_rtc() is just called by machine_device_initcall() so make it __init. Signed-off-by: Yang Shi Signed-off-by: Michael Ellerman arch/powerpc/platforms/44x/sam440ep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc183779dedf969533f19cc957a4a02b69fc44d3 Author: Hari Bathini Date: Fri Mar 17 02:35:42 2017 +0530 powerpc/fadump: Update fadump documentation With the unnecessary restriction to reserve memory for fadump at the top of RAM forgone, update the documentation accordingly. Signed-off-by: Hari Bathini Signed-off-by: Michael Ellerman Documentation/powerpc/firmware-assisted-dump.txt | 34 ++++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) commit f6e6bedb773118713a8eb3736a4c99c71144275e Author: Hari Bathini Date: Fri Mar 17 02:35:26 2017 +0530 powerpc/fadump: Reserve memory at an offset closer to bottom of RAM Currently, the area to preserve boot memory is reserved at the top of RAM. This leaves fadump vulnerable to memory hot-remove operations. As memory for fadump has to be reserved early in the boot process, fadump can't be registered after a memory hot-remove operation. Though this problem can't be eleminated completely, the impact can be minimized by reserving memory at an offset closer to bottom of the RAM. The offset for fadump memory reservation can be any value greater than fadump boot memory size. Signed-off-by: Hari Bathini Signed-off-by: Michael Ellerman arch/powerpc/kernel/fadump.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) commit e1fdd5b2620198979b23abb679848a78461481e6 Author: Johan Hovold Date: Thu Mar 30 15:46:30 2017 +0200 USB: serial: drop obsolete open-race workaround Commit a65a6f14dc24 ("USB: serial: fix race between probe and open") fixed a race between probe and open, which could lead to crashes when a not yet fully initialised port was being opened. This race was later incidentally closed by commit 7e73eca6a7b2 ("TTY: move cdev_add to tty_register_device") which moved character-device registration from tty_register_driver to tty_register_device, which isn't called until the port has been fully set up. Remove the now redundant workaround which had the negative side effect of not allowing a port to be opened immediately after user space had been notified of a new tty device. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/usb-serial.c | 8 -------- 1 file changed, 8 deletions(-) commit ae351beb1f0e439fba1136c083167ddfa8d8fe1d Author: Chris Wilson Date: Thu Mar 30 15:50:41 2017 +0100 drm/i915: Combine reset_all_global_seqno() loops into one We can merge the pair of loops over the engines and their timelines into a single loop, making it easier to read and more consistent with the commentary. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170330145041.9005-6-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_request.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 7a453fb82f869ea919aefb4943c7d24194c98698 Author: Chris Wilson Date: Thu Mar 30 15:50:40 2017 +0100 drm/i915: Remove redudant wait for each engine to idle from seqno wrap Having added the wait upon each engine to idle into the central i915_gem_wait_for_idle(), we can remove the now redundant wait from reset_all_global_seqno(). This has the advantage of removing the late detection of an error (an engine still busy) which left the seqno reset only partially complete (though it should be safe enough!). Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170330145041.9005-5-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_request.c | 3 --- 1 file changed, 3 deletions(-) commit 25112b64b3d261c192369acb56727d44840a5d30 Author: Chris Wilson Date: Thu Mar 30 15:50:39 2017 +0100 drm/i915: Wait for all engines to be idle as part of i915_gem_wait_for_idle() Make i915_gem_wait_for_idle() be a little heavier in order to try and guarantee that the GPU is indeed idle (by checking each engine individually is idle, i.e. all writes are complete and the rings stopped) after waiting for in-flight requests to be completed. v2: And return the final error. v3: Break the wait_for() out from under the WARN -- the macro expansion is hideous and unreadable in the warning message v4: If wait_for_engine() fails the result is catastrophic, mark the device as wedged and wait for the repair team. References: https://bugs.freedesktop.org/show_bug.cgi?id=98836 Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170330145041.9005-4-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit 72022a705e1da854653e56b67bef57b72f1392eb Author: Chris Wilson Date: Thu Mar 30 15:50:38 2017 +0100 drm/i915: Move retire-requests into i915_gem_wait_for_idle() As we now distinguish everywhere that can call i915_gem_retire_requests() following a successful wait_for_idle, we can remove the duplication by moving that call into i915_gem_wait_for_idle() itself. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170330145041.9005-3-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_debugfs.c | 6 +----- drivers/gpu/drm/i915/i915_gem.c | 6 +++--- drivers/gpu/drm/i915/i915_gem_evict.c | 2 -- drivers/gpu/drm/i915/i915_gem_request.c | 3 --- drivers/gpu/drm/i915/selftests/i915_gem_request.c | 2 -- drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 1 - 6 files changed, 4 insertions(+), 16 deletions(-) commit 6fb81d69d0bb455e6dbb5bd99529e2dea74b93e7 Merge: 485527b 1877888 Author: Martin Schwidefsky Date: Fri Mar 31 13:01:46 2017 +0200 Merge branch 'vfio-ccw-for-martin' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into features Pull vfio-ccw branch to add the basic channel I/O passthrough intrastructure based on vfio. The focus is on supporting dasd-eckd(cu_type/dev_type = 0x3990/0x3390) as the target device. Signed-off-by: Martin Schwidefsky commit 1877888d0ad21858693d8a5594734b125a068638 Author: Dong Jia Shi Date: Fri Mar 17 04:17:43 2017 +0100 MAINTAINERS: Add vfio-ccw maintainers Add Cornelia Huck and myself as the vfio-ccw driver maintainers. Signed-off-by: Dong Jia Shi Message-Id: <20170317031743.40128-17-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d686f21ace295f224eb2320bf1a8a20835de8494 Author: Dong Jia Shi Date: Fri Mar 17 04:17:42 2017 +0100 vfio: ccw: introduce support for ccw0 Although Linux does not use format-0 channel command words (CCW0) these are a non-optional part of the platform spec, and for the sake of platform compliance, and possibly some non-Linux guests, we have to support CCW0. Making the kernel execute a format 0 channel program is too much hassle because we would need to allocate and use memory which can be addressed by 24 bit physical addresses (because of CCW0.cda). So we implement CCW0 support by translating the channel program into an equivalent CCW1 program instead. Based upon an orginal patch by Kai Yue Wang. Signed-off-by: Dong Jia Shi Message-Id: <20170317031743.40128-16-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck arch/s390/include/asm/cio.h | 18 ++++++++++++++++++ drivers/s390/cio/vfio_ccw_cp.c | 32 +++++++++++++++++++++++++++++--- 2 files changed, 47 insertions(+), 3 deletions(-) commit 25627ba3899e71fc205e172b676b207ee0ac1e6a Author: Dong Jia Shi Date: Fri Mar 17 04:17:41 2017 +0100 docs: add documentation for vfio-ccw Add file Documentation/s390/vfio-ccw.txt that includes details of vfio-ccw. Acked-by: Pierre Morel Signed-off-by: Dong Jia Shi Message-Id: <20170317031743.40128-15-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck Documentation/s390/00-INDEX | 2 + Documentation/s390/vfio-ccw.txt | 303 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 305 insertions(+) commit bbe37e4cb89702aa78e0f44618c5af7f9aaa33f6 Author: Dong Jia Shi Date: Fri Mar 17 04:17:40 2017 +0100 vfio: ccw: introduce a finite state machine The current implementation doesn't check if the subchannel is in a proper device state when handling an event. Let's introduce a finite state machine to manage the state/event change. Signed-off-by: Dong Jia Shi Message-Id: <20170317031743.40128-14-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/Makefile | 2 +- drivers/s390/cio/vfio_ccw_drv.c | 116 +++----------------- drivers/s390/cio/vfio_ccw_fsm.c | 207 ++++++++++++++++++++++++++++++++++++ drivers/s390/cio/vfio_ccw_ops.c | 28 ++++- drivers/s390/cio/vfio_ccw_private.h | 41 ++++++- 5 files changed, 287 insertions(+), 107 deletions(-) commit e5f84dbaea59b4f712dac428c337528b70e1c533 Author: Dong Jia Shi Date: Fri Mar 17 04:17:39 2017 +0100 vfio: ccw: return I/O results asynchronously Introduce a singlethreaded workqueue to handle the I/O interrupts. With the work added to this queue, we store the I/O results to the io_region of the subchannel, then signal the userspace program to handle the results. Signed-off-by: Dong Jia Shi Message-Id: <20170317031743.40128-13-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_drv.c | 58 ++++++++++++++++++++++--------------- drivers/s390/cio/vfio_ccw_ops.c | 3 -- drivers/s390/cio/vfio_ccw_private.h | 7 ++--- 3 files changed, 37 insertions(+), 31 deletions(-) commit 120e214e504fd6d3e33ec4b661193600b2faab95 Author: Dong Jia Shi Date: Fri Mar 17 04:17:38 2017 +0100 vfio: ccw: realize VFIO_DEVICE_G(S)ET_IRQ_INFO ioctls Realize VFIO_DEVICE_GET_IRQ_INFO ioctl to retrieve VFIO_CCW_IO_IRQ information. Realize VFIO_DEVICE_SET_IRQS ioctl to set an eventfd fd for VFIO_CCW_IO_IRQ. Once a write operation to the ccw_io_region was performed, trigger a signal on this fd. Reviewed-by: Pierre Morel Signed-off-by: Dong Jia Shi Acked-by: Alex Williamson Message-Id: <20170317031743.40128-12-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_ops.c | 123 +++++++++++++++++++++++++++++++++++- drivers/s390/cio/vfio_ccw_private.h | 4 ++ include/uapi/linux/vfio.h | 10 ++- 3 files changed, 134 insertions(+), 3 deletions(-) commit 83d1193a96dc78576c15f93cd70e0558763a85b3 Author: Dong Jia Shi Date: Fri Mar 17 04:17:37 2017 +0100 vfio: ccw: realize VFIO_DEVICE_RESET ioctl Introduce VFIO_DEVICE_RESET ioctl for vfio-ccw to make it possible to hot-reset the device. We try to achieve a reset by first disabling the subchannel and then enabling it again: this should clear all state at the subchannel. Signed-off-by: Dong Jia Shi Message-Id: <20170317031743.40128-11-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_ops.c | 47 +++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 14 deletions(-) commit e01bcdd61320c91c826376e0a7dd96ef8e85dd18 Author: Dong Jia Shi Date: Fri Mar 17 04:17:36 2017 +0100 vfio: ccw: realize VFIO_DEVICE_GET_REGION_INFO ioctl Introduce device information about vfio-ccw: VFIO_DEVICE_FLAGS_CCW. Realize VFIO_DEVICE_GET_REGION_INFO ioctl for vfio-ccw. Reviewed-by: Pierre Morel Signed-off-by: Dong Jia Shi Acked-by: Alex Williamson Message-Id: <20170317031743.40128-10-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_ops.c | 78 +++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/vfio.h | 11 ++++++ 2 files changed, 89 insertions(+) commit 4e149e431a2858b86b4f9c801b2a4dde50c929f9 Author: Dong Jia Shi Date: Fri Mar 17 04:17:35 2017 +0100 vfio: ccw: handle ccw command request We implement the basic ccw command handling infrastructure here: 1. Translate the ccw commands. 2. Issue the translated ccw commands to the device. 3. Once we get the execution result, update the guest SCSW with it. Acked-by: Pierre Morel Signed-off-by: Dong Jia Shi Message-Id: <20170317031743.40128-9-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_drv.c | 114 ++++++++++++++++++++++++++++++++++++ drivers/s390/cio/vfio_ccw_ops.c | 24 ++++++-- drivers/s390/cio/vfio_ccw_private.h | 14 +++++ 3 files changed, 148 insertions(+), 4 deletions(-) commit 060d2b5afcc4f9e2d61e2b059e648f569b8dba9a Author: Dong Jia Shi Date: Fri Mar 17 04:17:34 2017 +0100 vfio: ccw: introduce ccw_io_region To provide user-space a set of interfaces to: 1. pass in a ccw program to perform an I/O operation. 2. read back I/O results of the completed I/O operations. We introduce an MMIO region for the vfio-ccw device here. This region is defined to content: 1. areas to store arguments that an ssch required. 2. areas to store the I/O results. Using pwrite/pread to the device on this region, a user-space program could write/read data to/from the vfio-ccw device. Reviewed-by: Pierre Morel Signed-off-by: Dong Jia Shi Message-Id: <20170317031743.40128-8-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_ops.c | 47 +++++++++++++++++++++++++++++++++++++ drivers/s390/cio/vfio_ccw_private.h | 4 ++++ include/uapi/linux/vfio_ccw.h | 24 +++++++++++++++++++ 3 files changed, 75 insertions(+) commit 84cd8fc48478b5e67b3f1600717299e11430a67e Author: Dong Jia Shi Date: Fri Mar 17 04:17:33 2017 +0100 vfio: ccw: register vfio_ccw to the mediated device framework To make vfio support subchannel devices, we need to leverage the mediated device framework to create a mediated device for the subchannel device. This registers the subchannel device to the mediated device framework during probe to enable mediated device creation. Reviewed-by: Pierre Morel Signed-off-by: Dong Jia Shi Message-Id: <20170317031743.40128-7-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck arch/s390/Kconfig | 2 +- drivers/s390/cio/Makefile | 2 +- drivers/s390/cio/vfio_ccw_drv.c | 12 ++- drivers/s390/cio/vfio_ccw_ops.c | 147 ++++++++++++++++++++++++++++++++++++ drivers/s390/cio/vfio_ccw_private.h | 11 +++ 5 files changed, 171 insertions(+), 3 deletions(-) commit 0a19e61e6d4c6192077ead760ba0a2d350987d4c Author: Dong Jia Shi Date: Fri Mar 17 04:17:32 2017 +0100 vfio: ccw: introduce channel program interfaces Introduce ccwchain structure and helper functions that can be used to handle a channel program issued from a virtual machine. The following limitations apply: 1. Supports only prefetch enabled mode. 2. Supports idal(c64) ccw chaining. 3. Supports 4k idaw. 4. Supports ccw1. 5. Supports direct ccw chaining by translating them to idal ccws. CCW translation requires to leverage the vfio_(un)pin_pages interfaces to pin/unpin sets of mem pages frequently. Currently we have a lack of support to do this in an efficient way. So we introduce pfn_array data structure and helper functions to handle pin/unpin operations here. Signed-off-by: Dong Jia Shi Message-Id: <20170317031743.40128-6-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/Makefile | 2 +- drivers/s390/cio/vfio_ccw_cp.c | 816 +++++++++++++++++++++++++++++++++++++++++ drivers/s390/cio/vfio_ccw_cp.h | 42 +++ 3 files changed, 859 insertions(+), 1 deletion(-) commit 63f1934d562de7cf3124de0ef617dcd3be98b279 Author: Dong Jia Shi Date: Fri Mar 17 04:17:31 2017 +0100 vfio: ccw: basic implementation for vfio_ccw driver To make vfio support subchannel devices, we need a css driver for the vfio subchannels. This patch adds a basic vfio-ccw subchannel driver for this purpose. To enable VFIO for vfio-ccw, enable S390_CCW_IOMMU config option and configure VFIO as required. Acked-by: Pierre Morel Signed-off-by: Dong Jia Shi Message-Id: <20170317031743.40128-5-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck arch/s390/Kconfig | 10 ++ arch/s390/include/asm/isc.h | 1 + drivers/iommu/Kconfig | 8 ++ drivers/s390/cio/Makefile | 3 + drivers/s390/cio/vfio_ccw_drv.c | 262 ++++++++++++++++++++++++++++++++++++ drivers/s390/cio/vfio_ccw_private.h | 25 ++++ 6 files changed, 309 insertions(+) commit aec390b937dcaf11c01483b8c348a2b004119aa7 Author: Dong Jia Shi Date: Fri Mar 17 04:17:30 2017 +0100 vfio: ccw: define device_api strings Define vfio-ccw device API strings. CCW vendor driver using mediated device framework should use this string for device_api attribute. Reviewed-by: Pierre Morel Signed-off-by: Dong Jia Shi Acked-by: Alex Williamson Message-Id: <20170317031743.40128-4-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck include/uapi/linux/vfio.h | 1 + 1 file changed, 1 insertion(+) commit a22217e27c699de61cc6859494e1af097291afb5 Author: Dong Jia Shi Date: Fri Mar 17 04:17:29 2017 +0100 s390: cio: export more interfaces Export the common I/O interfaces those are needed by an I/O subchannel driver to actually talk to the subchannel. Reviewed-by: Pierre Morel Signed-off-by: Dong Jia Shi Cc: Sebastian Ott Cc: Peter Oberparleiter Acked-by: Sebastian Ott Message-Id: <20170317031743.40128-3-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/cio.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 5434da4ddff396aadf5e1098065069ea58134e26 Author: Dong Jia Shi Date: Fri Mar 17 04:17:28 2017 +0100 s390: cio: introduce cio_cancel_halt_clear For future code reuse purpose, this decouples the cio code with the ccw device specific parts from ccw_device_cancel_halt_clear, and makes a new common I/O interface named cio_cancel_halt_clear. Reviewed-by: Pierre Morel Signed-off-by: Dong Jia Shi Cc: Sebastian Ott Cc: Peter Oberparleiter Acked-by: Sebastian Ott Message-Id: <20170317031743.40128-2-bjsdjshi@linux.vnet.ibm.com> [CH: Fix typo] Signed-off-by: Cornelia Huck drivers/s390/cio/cio.c | 59 +++++++++++++++++++++++++++++++++++++++++++ drivers/s390/cio/cio.h | 1 + drivers/s390/cio/device_fsm.c | 54 ++++++--------------------------------- 3 files changed, 68 insertions(+), 46 deletions(-) commit 4a85aae62c4b1941984ac9cd1331ca2311c422ed Author: Arnd Bergmann Date: Fri Mar 31 12:23:04 2017 +0200 multi_v7_defconfig: make Rockchip DRM drivers built-in These cause warnings in linux-next, as the symbols have become 'bool' there: arch/arm/configs/multi_v7_defconfig:600:warning: symbol value 'm' invalid for ROCKCHIP_INNO_HDMI arch/arm/configs/multi_v7_defconfig:599:warning: symbol value 'm' invalid for ROCKCHIP_DW_MIPI_DSI arch/arm/configs/multi_v7_defconfig:598:warning: symbol value 'm' invalid for ROCKCHIP_DW_HDMI arch/arm/configs/multi_v7_defconfig:597:warning: symbol value 'm' invalid for ROCKCHIP_ANALOGIX_DP Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3f5099f0c7677d2f1710408530d2d6ab114aad32 Merge: 944d01c 0c2bf9f Author: Arnd Bergmann Date: Fri Mar 31 12:19:39 2017 +0200 Merge tag 'arm-soc/for-4.11/devicetree-fixes' of http://github.com/Broadcom/stblinux into fixes There was a little conflict between the v4.11 bugfixes and the new changes for 4.12, this merges the fixes into the 4.12 branch to avoid having to resolve it again. * Broadcom fixes in mainline ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags ARM: dts: BCM5301X: Fix memory start address ARM: dts: BCM5301X: Fix UARTs on bcm953012k Signed-off-by: Arnd Bergmann commit 944d01c5f5e9a99ef7afb16d8b79cb1b66607bbd Merge: 5ea6799 da72e49 Author: Arnd Bergmann Date: Fri Mar 31 12:11:03 2017 +0200 Merge tag 'omap-for-v4.12/dt-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt Pull "Devicetree changes for omaps for v4.12 merge window" from Tony Lindgren: - Add hecc node for am35x - Add onenand support for omap3-igep - Add bluetooth binding for n900/n9/n950 - Configure clocks and SATA for dm81xx - Update operating points tables for am33xx, am43xx and dra7 - Update SPI flash documentation for w25q64 - Configure SPI NOR for am335x-icev2 - Mux uart0 for am437x-gp-evm - Add thermal zones for omap3, omap4, omap5, dra7 - Configure LEDs for am335x-baltos - A series of droid 4 changes to configure various devices such as keypad, regulators, gpio-keys, rtc, power button, compass, accelerometer, touchscreen, backlight, poweroff, tmp105, HDMI, LCD panel and LEDs, EHCI, and micro-SD * tag 'omap-for-v4.12/dt-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (35 commits) ARM: dts: am335x-baltos: add LED support ARM: dts: omap4-droid4: Fix MMC1 card for detect GPIO and regulator ARM: dts: OMAP4460: Thermal: Add slope and offset values ARM: dts: OMAP443x: Thermal: Add slope and offset values ARM: dts: OMAP5: Thermal: Add slope and offset values ARM: dts: DRA7: Thermal: Add slope and offset values ARM: dts: omap3: Add cpu_thermal zone ARM: dts: am437x-gp-evm: Add pinmux for uart0 ARM: dts: am335x-icev2: Add SPI based NOR Documentation: devicetree: mtd: add w25q64 to list of supported SPI flashes ARM: dts: dra7: Add updated operating-points-v2 table for cpu ARM: dts: am4372: Update operating-points-v2 table for cpu ARM: dts: am335x-boneblack: Enable 1GHz OPP for cpu ARM: dts: am33xx: Add updated operating-points-v2 table for cpu ARM: dts: dm8168-evm: add SATA node ARM: dts: dm8168-evm: add the external reference clock for SATA ARM: dts: N9/N950: add bluetooth ARM: dts: N900: Add bluetooth ARM: dts: omap4-droid4: Configure EHCI so modems can be accessed ARM: dts: motorola-cpcap-mapphone: add LEDs ... commit 5ea67992f7fffdeaa7400772b1b2f8f8691a5aae Merge: f63c00b 94bbdd7 Author: Arnd Bergmann Date: Fri Mar 31 12:09:39 2017 +0200 Merge tag 'v4.12-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt Pull "Rockchip dts32 updates for 4.12 part1" from Heiko Stübner: Contains one new board, the Tinkerboard from Asus based on the rk3288, definitions for the mmc resets in the socs reset controller, sound support for the Rock2, dma support for mmc controllers on the rk3188 and a led-fix for the MiQi board and and irq-fix for older Cortex-A9 socs. * tag 'v4.12-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: setup DMA-channels for mmc0 and emmc for rk3188 ARM: dts: rockchip: fix PPI misconfiguration on Cortex-A9 socs ARM: dts: rockchip: add rk322x dw-mmc resets ARM: dts: rockchip: add rk3066/rk3188 dw-mmc resets ARM: dts: rockchip: add rk3036 dw-mmc resets ARM: dts: rockchip: add rk3288 dw-mmc resets ARM: dts: rockchip: add dts for RK3288-Tinker board dt-bindings: add rk3288-based Asus Tinker board ARM: dts: rockchip: fix the MiQi board's LED definition ARM: dts: rockchip: Add support for ES8388 to the Radxa Rock 2 commit f63c00bcd11bfec189958e85ad42eac34d931949 Merge: 1b18832 e3aeca1 Author: Arnd Bergmann Date: Fri Mar 31 12:05:13 2017 +0200 Merge tag 'gemini-dts-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into next/dt Pull "DTS updates for the Gemini on top of the multiplatform base" from Linus Walleij: - Add the power controller to the DTS. - Augment the GPIO nodes to also include the Faraday compatible. - Add the PCI bus host and config to the Gemini device trees. * tag 'gemini-dts-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: dts: add PCI to the Gemini device trees ARM: dts: augment Gemini GPIO nodes ARM: dts: add power controller to the Gemini DTS commit dc10ef2dfd66fc215857f4777b3a2a030d08193a Author: Rob Herring Date: Tue Mar 21 21:03:11 2017 -0500 arm64: dts: juno: fix PCI bus dtc warnings dtc recently added PCI bus checks. Fix these warnings. Signed-off-by: Rob Herring Cc: Lorenzo Pieralisi Acked-by: Liviu Dudau Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-base.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b18832977557a4f326d70c0ff8d6a65c023e807 Merge: b916a60 414ce21 Author: Arnd Bergmann Date: Fri Mar 31 12:02:22 2017 +0200 Merge tag 'arm-soc/for-4.12/devicetree' of http://github.com/Broadcom/stblinux into next/dt Pull "Broadcom devicetree changes for 4.12" from Florian Fainelli: This pull request contains Broadcom ARM-based SoCs Device Tree updates for 4.12, please pull the following: - Rafal: * adds basic support for the Linksys EA9200, Linksys EA6300 V1, Linksys EA9500, TP-Link Archer C5 V2 which are all based on BCM470x SoCs with a bunch of BCM43602 radios. * updates the BCM5301X DTS and DTS include file and moves the serial console parameters to the DTS include file since all BCM5301X that we have so far are consistent in using the same UART. He also does the same for the BCM53573 DTS. * makes some updates to the Tenda AC9 platform by describing its PCIe controllers and endpoints in order to be able to represent GPIOs attached to the on-chip Wi-Fi module. Once done, he adds the 2Ghz LED which is connected to one of these GPIOs. * re-licenses the DTS files he created to the ISC license * removes the use of the non-existend "default-off" LED trigger in the BCM53573 and BCM5301X DTS files - Aditya adds missing Netgear R8000 LEDS and keys for WAN status LEDS and brightness - Jon: * adds NAND controller Device Tree nodes to the BCM953012K reference board * converts the BCM5301X SoC to use the recently introduced Broadcom QSPI controller Device Tree nodes. * fixes the GIC PPI interrupt flags that the kernel now reports about. * adds ARM TWD watchdog entries to the BCM5301X DTS include file * adds I2C entries to the BCM5301X DTS include files. * disables i2c by default in the Northstar Plus DTS include file, and ,enables it at the board level instead. * adds USB (OHCI & EHCI) Device Tree nodes to the Northstar Plus DTS include files. - Steven adds the mailbox (PDC) unit and the crytographic unit (SPU) to the Broadcom Northstar Plus SoC DTS include file. Steven also adds proper ethernet aliases to the BCM53012HR board since some bootloaders require that for MAC address patching. - Eric adds the DSI and its corresponding clock nodes to the BCM283x DTS files but leaves them disabled by default (overlays should take care of enabling it) - Boris adds support for HDMI audio and related DMA channels to the BCM283x SoCs - Gerd adds support for the BCM2835 specific SDHCI controller to the BCM283x SoCs - Rob fixes the iProc msi-controller name and unit address now that DTC can produce additional errors * tag 'arm-soc/for-4.12/devicetree' of http://github.com/Broadcom/stblinux: (27 commits) ARM: dts: bcm: fix msi-controller name and unit address ARM: dts: BCM53573: Specify serial console parameters ARM: dts: BCM5301X: Specify serial console params in dtsi files ARM: dts: NSP: Add crypto (SPU) to dtsi ARM: dts: NSP: Add mailbox (PDC) to NSP ARM: dts: BCM953012HR: Add ethernet aliases ARM: dts: BCM5301X: Add support for TP-LINK Archer C5 V2 ARM: dts: NSP: disable i2c DT entry by default ARM: dts: NSP: Add EHCI/OHCI USB nodes to device tree ARM: dts: BCM5301X: Add I2C support to the DT ARM: dts: BCM5301X: Add TWD WD Support to DT ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags ARM: dts: bcm2835: add sdhost controller to devicetree ARM: dts: bcm283x: Add HDMI audio related properties ARM: dts: BCM5301X: Don't use nonexistent "default-off" LED trigger ARM: dts: BCM53573: Don't use nonexistent "default-off" LED trigger ARM: dts: BCM5301X: Add missing Netgear R8000 LEDs and Keys ARM: dts: BCM5301X: Relicense DTS files I created to the ISC ARM: dts: bcm2835: Add the DSI module nodes and clocks. ARM: dts: BCM53573: Add Tenda AC9 2 GHz LED ... commit b916a60994bb77dcc83826c1d18ccf18ff307914 Merge: 2c5ad97 cd2f0d0 Author: Arnd Bergmann Date: Fri Mar 31 12:01:24 2017 +0200 Merge tag 'mvebu-dt-4.12-1' of git://git.infradead.org/linux-mvebu into next/dt Pull "mvebu dt for 4.12 (part 1)" from Gregory CLEMENT: - Add node lable for Armada 38x - Add support for Synology DS116 NAS and Linksys WRT1900ACS - Update mbus controller description on Armada 38x allowing entering in standby - Add default trigger for sata led on various linksys boards - Update newly added armada-xp-98dx3236 - Enable hardware buffer manager support for the devices in the Linksys WRT AC Serie * tag 'mvebu-dt-4.12-1' of git://git.infradead.org/linux-mvebu: ARM: dts: mvebu: linksys: enable buffer manager support ARM: dts: mvebu: remove unnecessary PCI range from 98dx3236 ARM: dts: mvebu: Move mv98dx3236 clock bindings ARM: dts: Use armada-370-xp as a base for armada-xp-98dx3236 ARM: dts: armada-xp-98dx3236: combine dfx server nodes ARM: dts: armada: Add default trigger for sata led ARM: dts: armada-38x: Adjust mbus controller description on Armada 38x ARM: dts: armada-385: add support for the Linksys WRT1900ACS (Shelby) ARM: dts: armada-385-synology-ds116: add support for Synology DS116 NAS ARM: dts: armada-38x add node labels commit 2c5ad9764e0bdaa64dab819c9737462386f9b874 Merge: 0409d75 f891413 Author: Arnd Bergmann Date: Fri Mar 31 12:00:34 2017 +0200 Merge tag 'davinci-for-v4.12/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/dt Pull "DaVinci DT updates for v4.12" from Sekhar Nori: DaVinci device tree updates to enable Video display on DA850 along with some whitespace clean-up. Also, enables sound and ADC support on Lego EV3. * tag 'davinci-for-v4.12/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: dts: da850-evm: add the output port to the vpif node ARM: dts: da850-evm: add IO expander node on UI card ARM: dts: da850: add vpif video display pins ARM: dts: da850-evm: fix whitespace errors ARM: da850-lego-ev3: Add device tree node for sound ARM: da850-lego-ev3: Add device tree node for A/DC commit c511fa3f35e30982445fae2946f4aade3f42203d Author: Alexey Klimov Date: Wed Mar 29 19:16:27 2017 +0100 firmware: arm_scpi: reinit completion instead of full init_completion() Instead of performing full initialization of the completion structure on each transfer in scpi_send_message(), we initialize it at boot time (more specifically, in the relevant probe() function) and use reinit_completion() to reset ->done counter on each message transfer. Signed-off-by: Alexey Klimov Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0409d756d061736f7d27811263c3417c334b35cf Author: Linus Walleij Date: Wed Mar 22 12:12:09 2017 +0100 ARM: dts: augment Moxa ART GPIO node The Moxa ART GPIO is a Faraday FTGPIO010. Augment the DTS node to indicate both compatible values for the SoC and the IP part. Also increase the register range to 0x100, it has at least 0x48 bytes of registers, and a few extra will not hurt. Tested-by: Jonas Jensen Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/boot/dts/moxart.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c83e93e64de8b33dc7ab2998acb704d7e67d0079 Merge: af48251 facc7a5 Author: Arnd Bergmann Date: Fri Mar 31 11:58:50 2017 +0200 Merge tag 'uniphier-dt-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt Pull "UniPhier ARM SoC DT updates for v4.12" from Masahiro Yamada: - Remove skeleton.dtsi inclusion - Fix W=* build warnings - Fix eMMC pin-mux node - Add pagesize properties to EEPROM nodes * tag 'uniphier-dt-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: ARM: dts: uniphier: add pagesize property to EEPROM of proto boards ARM: dts: uniphier: add pagesize property to EEPROM of Support Card ARM: dts: uniphier: fix pin groups of eMMC pin-mux node ARM: dts: uniphier: move memory node below aliases node ARM: dts: uniphier: fix no unit name warnings ARM: dts: uniphier: remove skeleton.dtsi inclusion commit 9720a9a31ddac19e548d2d633564c1bf6333ecda Merge: a5cd01f b9ed79f Author: Arnd Bergmann Date: Fri Mar 31 11:54:40 2017 +0200 Merge tag 'v4.12-rockchip-dts64-symlinks-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt64 Pull "Rockchip dts64 updates (using arm/arm64 symlinks) for 4.12 part1" from Heiko Stübner Rockchip dts changes based on the newly created arm/arm64 symlinks. The core addition is the support for the rk3399-based Gru family of ChromeOS devices, like the Kevin board which is the recently released Samsung Chromebook Plus. Additionally the usb3 controllers are added to rk3399 as they're used on Gru devices and even without full type-c support they can at least drive usb2 devices already. * tag 'v4.12-rockchip-dts64-symlinks-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: add regulator info for Kevin digitizer arm64: dts: rockchip: describe Gru/Kevin OPPs + CPU regulators arm64: dts: rockchip: add Gru/Kevin DTS dt-bindings: Document rk3399 Gru/Kevin arm64: dts: rockchip: support dwc3 USB for rk3399 commit a5cd01ff1803e21c841be4ebba9a2adc87ff9526 Merge: bda484e 41b464e Author: Arnd Bergmann Date: Fri Mar 31 11:53:40 2017 +0200 Merge tag 'v4.12-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt64 Pull "Rockchip dts64 updates for 4.12 part1" from Heiko Stübner: Contains various changes for the rk3368 (dma, i2s, disable mailbox per default, mmc-resets) and also removes the wrongly added idle states, that do not match the hardware's capabilities, as well as some general rk3399 pcie fixes as well as also the mmc resets. * tag 'v4.12-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: fix PCIe domain number for rk3399 arm64: dts: rockchip: add rk3399 dw-mmc resets arm64: dts: rockchip: add rk3368 dw-mmc resets arm64: dts: rockchip: disable mailbox of RK3368 SoCs per default arm64: dts: rockchip: add i2s nodes support for RK3368 SoCs arm64: dts: rockchip: add dmac nodes for rk3368 SoCs arm64: dts: rockchip: remove wrongly added idle states on rk3368 arm64: dts: rockchip: sort rk3399-pcie by unit address commit bda484e76ed057d5c11653ae85f5f1866de86e06 Merge: 8e8c725 231b362 Author: Arnd Bergmann Date: Fri Mar 31 11:52:16 2017 +0200 Merge tag 'arm-soc/for-4.12/devicetree-arm64' of http://github.com/Broadcom/stblinux into next/dt64 Pull "Broadcom devicetree-arm64 changes for 4.12" from Florian Fainelli: This pull request contains Broadcom ARM64-based SoCs Device Tree updates for 4.12, please pull the following: - Rob enables the cryptographic block on Northstar 2 (SPU) by adding the proper Device Tree nodes - Jon replaces all occurences of: status = "ok" with status = "okay" to better conform to the Device Tree specification * tag 'arm-soc/for-4.12/devicetree-arm64' of http://github.com/Broadcom/stblinux: arm64: dts: NS2: convert "ok" to "okay" arm64: dts: NS2: Add Broadcom SPU driver DT entry commit 8e8c72535d9062df88b67ad448583b39efd559cd Merge: 6cd8eaa 6089471 Author: Arnd Bergmann Date: Fri Mar 31 11:51:03 2017 +0200 Merge tag 'mvebu-dt64-4.12-1' of git://git.infradead.org/linux-mvebu into next/dt64 Pull "mvebu dt64 for 4.12 (part 1)" from Gregory CLEMENT: - Add RTC support on Armada 7k/8k - Improve i2c support on Armada 37xx - Add gpio expander and RTC on Armada 3720 board - Improve USB3 support on Armada 37xx - Add network support on Armada 7k/8k * tag 'mvebu-dt64-4.12-1' of git://git.infradead.org/linux-mvebu: arm64: marvell: dts: add PPv2.2 description to Armada 7K/8K ARM64: dts: marvell: armada-3720 add RTC support ARM64: dts: marvell: armada-3720-db: Add phy for USB3 ARM64: dts: marvell: armada-37xx: Add clock resource for USB3 ARM64: dts: marvell: armada-37xx: Fix interrupt mapping for USB3 ARM64: dts: marvell: armada-3720-db: add gpio expander ARM64: dts: marvell: armada37xx: add address and size property for i2c cells arm64: dts: marvell: add RTC description for Armada 7K/8K commit 6cd8eaacb8e2d78ea002cd0bb09afa4a3b968886 Merge: 517b311 7a201e3 Author: Arnd Bergmann Date: Fri Mar 31 11:45:14 2017 +0200 Merge tag 'uniphier-dt64-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt64 Pull "UniPhier ARM64 SoC DT updates for v4.12" from Masahiro Yamada: - Fix W=* build warnings - Add pinctrl properties to eMMC nodes - Fix resets properties of USB nodes * tag 'uniphier-dt64-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: arm64: dts: uniphier: re-order reset deassertion of USB of LD11 arm64: dts: uniphier: add pinctrl property to eMMC node for LD11/LD20 arm64: dts: uniphier: move memory node below aliases node arm64: dts: uniphier: fix no unit name warnings commit 517b311eaec9fd3c6ae870f189157115d82ae8fb Author: Jayachandran C Date: Tue Mar 14 12:47:14 2017 +0000 arm64: dts: move from ARCH_VULCAN to ARCH_THUNDER2 Move and update device tree files as part of transition from Broadcom Vulcan to Cavium ThunderX2. The changes are to: * rename dts/broadcom/vulcan.dtsi to cavium/thunder2-99xx.dtsi, update cpu cores to be "cavium,thunder2", and update SoC to be "cavium,thunderx2-cn9900" * move SoC dts/broadcom/vulcan-eval.dtsi to cavium/thunder2-99xx.dtsi and update board name string * Update dts/broadcom/Makefile not to build vulcan dtbs * Update dts/cavium/Makefile to build thunder2 dtbs No changes to the dts contents except the updated "compatible" and "model" properties. Signed-off-by: Jayachandran C Reviewed-by: Matthias Brugger Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/broadcom/Makefile | 1 - arch/arm64/boot/dts/broadcom/vulcan-eval.dts | 33 ------ arch/arm64/boot/dts/broadcom/vulcan.dtsi | 147 ------------------------- arch/arm64/boot/dts/cavium/Makefile | 1 + arch/arm64/boot/dts/cavium/thunder2-99xx.dts | 34 ++++++ arch/arm64/boot/dts/cavium/thunder2-99xx.dtsi | 148 ++++++++++++++++++++++++++ 6 files changed, 183 insertions(+), 181 deletions(-) commit 8aac4bc5196b7137aa9354dee5703f7dfe4300aa Author: Jayachandran C Date: Wed Mar 15 20:11:00 2017 +0000 dt-bindings: Add arm64 ARCH_THUNDER2 platform documentation Add documentation for Cavium's ThunderX2 CN99XX ARM64 processor. This SoC will use "cavium,thunderx2-cn9900" as the compatible property. Also add a documentation entry for the "cavium,thunder2" cpu core present in these SoCs. Signed-off-by: Jayachandran C Acked-by: Rob Herring Signed-off-by: Arnd Bergmann Documentation/devicetree/bindings/arm/cavium-thunder2.txt | 8 ++++++++ Documentation/devicetree/bindings/arm/cpus.txt | 1 + 2 files changed, 9 insertions(+) commit 19fa6e601b251f13400767813372944b3e2f444b Author: Denis Kirjanov Date: Thu Mar 30 10:06:19 2017 -0400 tty/hvc_console: fix console lock ordering with spinlock hvc_remove() takes a spin lock first then acquires the console semaphore. This situation can easily lead to a deadlock scenario where we call scheduler with spin lock held. Signed-off-by: Denis Kirjanov Signed-off-by: Greg Kroah-Hartman drivers/tty/hvc/hvc_console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 93857edd9829e144acb6c7e72d593f6e01aead66 Author: Johan Hovold Date: Thu Mar 30 15:39:36 2017 +0200 tty: reset termios state on device registration Free any saved termios data when registering a tty device so that the termios state is reset when reusing a minor number. This is useful for hot-pluggable buses such as USB where it does not make much sense to reuse saved termios data from an unrelated device when a new device is later plugged in. This specifically avoids a situation where the new device does not have the carrier-detect signal wired, but the saved termios state has CLOCAL cleared, effectively preventing the port from being opened in blocking mode as noted by Jan Kundrát . Note that clearing the saved data at deregistration would not work as the device could still be open. Also note that the termios data is not reset for drivers with TTY_DRIVER_DYNAMIC_ALLOC set (e.g. legacy pty) as their character device is registered at driver registration and could theoretically already have been opened (and pty termios state is never saved anyway). Reported-by: Jan Kundrát Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 16b00ae82dce0e36384744553c6e9e97070813e8 Author: Johan Hovold Date: Thu Mar 30 15:39:35 2017 +0200 tty: drop obsolete termios_locked comments Drop comments about tty-driver termios_locked structures, which have been outdated since commit fe6e29fdb1a7 ("tty: simplify ktermios allocation"). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 6a7e6f78c235975cc14d4e141fa088afffe7062c Author: Johan Hovold Date: Thu Mar 30 15:39:34 2017 +0200 tty: close race between device register and open The tty class device is currently not registered until after the character device has been registered thereby leaving a small window were a racing open could end up with a NULL tty->dev pointer due to the class-device lookup failing in alloc_tty_struct. Close this race by registering the class device before the character device while making sure to defer the user-space uevent notification until after the character device has been registered. Note that some tty drivers expect a valid tty->dev and would misbehave or crash otherwise. Some line disciplines also currently dereference the class device unconditionally despite the fact that not every tty is guaranteed to have one (Unix98 pty), but this is being fixed separately. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 03a1f48e5371a252b3b8c16a7cbea3c0bd8689bb Author: Takashi Iwai Date: Fri Mar 31 11:19:19 2017 +0200 ALSA: usb-audio: Fake also USB device id when alias is given Recently snd-usb-audio driver received a new option, quirk_alias, to allow user to apply the existing quirk for a different device. This works for many quirks as is, but some still need more tune-ups: namely, some quirks check the USB vendor/device IDs in various places, thus it doesn't work as long as the ID is different from the expected one. With this patch, the driver stores the aliased USB ID, so that these rest quirks per device ID are applied. The transition to use the cached USB ID was already done in the past, so what we needed now is only to overwrite chip->usb_id. Signed-off-by: Takashi Iwai sound/usb/card.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e1c98a27208268dd0484218dd74706ec832cd0d2 Merge: 06d2157 1aaf0f4 Author: Arnd Bergmann Date: Fri Mar 31 11:03:41 2017 +0200 Merge tag 'arm-soc/for-4.12/defconfig-arm64' of http://github.com/Broadcom/stblinux into next/arm64 Pull "Broadcom defconfig-arm64 changes for 4.12" from Florian Fainelli: This pull request contains Broadcom ARM64-based SoCs defconfig updates for 4.12, please pull the following: - Gerd enables the BCM2835 MMC driver which yields better performance than the default one (iProc) * tag 'arm-soc/for-4.12/defconfig-arm64' of http://github.com/Broadcom/stblinux: arm64: set CONFIG_MMC_BCM2835=y in defconfig commit f30c110dc2cd7a4004ea0b0b4e8f6ec0187f7150 Merge: 7012d8c f880c8f Author: Arnd Bergmann Date: Fri Mar 31 11:00:13 2017 +0200 Merge tag 'arm-soc/for-4.12/defconfig' of http://github.com/Broadcom/stblinux into next/defconfig Pull "Broadcom defconfig changes for 4.12" from Florian Fainelli: This pull request contains Broadcom ARM-based SoCs defconfig updates for 4.12, please pull the following: - Gerd enables the BCM2835 MMC driver which yields better performance than the default one (iProc) * tag 'arm-soc/for-4.12/defconfig' of http://github.com/Broadcom/stblinux: arm: set CONFIG_MMC_BCM2835=y in bcm2835_defconfig and multi_v7_defconfig ARM: bcm2835: Enable missing CMA settings for VC4 driver commit 3ed0b8a76a6dc4158d7ba1ab7297a0477f7ea31d Merge: 99b19a1 bd0faf0 Author: Arnd Bergmann Date: Fri Mar 31 10:56:59 2017 +0200 Merge tag 'arm-soc/for-4.12/drivers' of http://github.com/Broadcom/stblinux into next/drivers Pull "Broadcom drivers changes for 4.12" from Florian Fainelli: This pull request contains Broadcom ARM-based SoC drivers updates for 4.12, please pull the following changes: - Florian updates the Broadcom STB GISB arbiter driver with a bunch of compatible strings for MIPS-based STBs found under arch/mips/boot/dts/brcm/ in order for the SoC identification driver to recognize these chips * tag 'arm-soc/for-4.12/drivers' of http://github.com/Broadcom/stblinux: soc: bcm: brcmstb: Match additional compatible strings commit 6b62a0077b830c64d434943ffe3ab16fea00accd Merge: aa9daa3 38b06b9 Author: Arnd Bergmann Date: Fri Mar 31 10:55:56 2017 +0200 Merge tag 'arm-soc/for-4.12/maintainers' of http://github.com/Broadcom/stblinux into next/fixes-non-critical Pull "Broadcom maintainers changes for 4.12" from Florian Fainelli: This pull request contains Broadcom ARM-based SoCs MAINTAINERS file updates for 4.12, please pull the following: - Jon adds himself as a maintainer for the BCM5301X SoCs (Northstar) since he has been contributing changes to these platforms for a while now - Stephen Warren removes himself from the BCM2835 maintainers (Rasperrby Pi) since in his own words he has not been active that much lately - Eric adds Stefan Wahren as a maintainer for the BCM2835 platform since he has been very active on it for neary 2 years now * tag 'arm-soc/for-4.12/maintainers' of http://github.com/Broadcom/stblinux: MAINTAINERS: Add Stefan Wahren to bcm2835. MAINTAINERS: remove swarren from bcm2835 MAINTAINERS: Add Jon Mason to BCM5301X maintainers commit b69bad75a840c0c51b1898320dc8e8b829e5322a Merge: 88f31b1 d47b51a Author: Arnd Bergmann Date: Fri Mar 31 10:51:42 2017 +0200 Merge tag 'arm-soc/for-4.12/soc' of http://github.com/Broadcom/stblinux into next/soc Pull "Broadcom soc changes for 4.12" from Florian Fainelli: This pull request contains Broadcom ARM-based SoC Kconfig/platform changes for 4.12, please pull the following: - Al enables ZONE_DMA for BRCMSTB platforms since a bunch of on-chip peripherals such as USB (OHCI and EHCI) and SDHCI cannot support physical addresses > 32-bit. This is only required when ARM_LPAE is enabled - Danesh enables ARCH_HAS_HOLES_MEMORYMODEL in order for the kernel to provide a pfn_valid() implementation despite BRCMSTB enabling the SPARSEMEM model by default. - Florian adds support for a new 28nm generation chip: 7260 by updating the runtime detection UART debuggin stub used for DEBUG_LL. * tag 'arm-soc/for-4.12/soc' of http://github.com/Broadcom/stblinux: ARM: brcmstb: Add entry for 7260 ARM: brcmstb: Enable ARCH_HAS_HOLES_MEMORYMODEL ARM: brcmstb: Enable ZONE_DMA for non 64-bit capable peripherals commit 5fc63f9577322d11019b6d357f73f5ce9031f263 Author: Nicholas Mc Guire Date: Fri Mar 24 20:03:35 2017 +0100 timekeeping: Remove pointless conversion to bool interp_forward is type bool so assignment from a logical operation directly is sufficient. Signed-off-by: Nicholas Mc Guire Cc: "Christopher S. Hall" Cc: John Stultz Link: http://lkml.kernel.org/r/1490382215-30505-1-git-send-email-der.herr@hofr.at Signed-off-by: Thomas Gleixner kernel/time/timekeeping.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 352ef03ca0ad07156bcee6e244c2df6f1a19bb05 Author: Geliang Tang Date: Fri Mar 24 22:15:14 2017 +0800 x86/pci-calgary: Use setup_timer() instead of open coding it. Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Cc: iommu@lists.linux-foundation.org Cc: Jon Mason Cc: Muli Ben-Yehuda Link: http://lkml.kernel.org/r/e4f1888b9e4a87f6a6345f86ed23071483763b22.1490340972.git.geliangtang@gmail.com Signed-off-by: Thomas Gleixner arch/x86/kernel/pci-calgary_64.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9005615bafbe03075f4e4fe10874b7abe1918782 Merge: 016da20 0107042 Author: Thomas Gleixner Date: Fri Mar 31 09:48:00 2017 +0200 Merge branch 'fortglx/4.12/time' of https://git.linaro.org/people/john.stultz/linux into timers/core Pull timekeeping changes from John Stultz: Main changes are the initial steps of Nicoli's work to make the clockevent timers be corrected for NTP adjustments. Then a few smaller fixes that I've queued, and adding Stephen Boyd to the maintainers list for timekeeping. commit b57f7f7d31c0ffef5faabd4bf68b8d2577da389a Author: Michal Wajdeczko Date: Thu Mar 30 11:21:15 2017 +0000 drm/i915/uc: Move fw path check to fetch_uc_fw() There is no reason to separately check for valid fw path before we try to fetch it. Let the fetch function take care of this. Signed-off-by: Michal Wajdeczko Cc: Arkadiusz Hiler Cc: Joonas Lahtinen Reviewed-by: Arkadiusz Hiler Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170330112115.120240-2-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 40908230e8da7a49f65bccd4d78f09e100bafff0 Author: Michal Wajdeczko Date: Thu Mar 30 11:21:14 2017 +0000 drm/i915/huc: Remove unused intel_huc_fini() This function is no longer used. Its functionality is covered by intel_uc_fini_fw(). Signed-off-by: Michal Wajdeczko Cc: Arkadiusz Hiler Cc: Joonas Lahtinen Reviewed-by: Arkadiusz Hiler Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_huc.c | 18 ------------------ drivers/gpu/drm/i915/intel_uc.h | 1 - 2 files changed, 19 deletions(-) commit 00bbb72c8619a9196db8acabc720e1d5efd7ce18 Author: Michal Wajdeczko Date: Thu Mar 30 11:21:13 2017 +0000 drm/i915/uc: Add intel_uc_fw_fini() Cleanups of uc firmware structs from GuC and Huc are the same for both. Move common code to the helper function to avoid duplication. Signed-off-by: Michal Wajdeczko Cc: Arkadiusz Hiler Cc: Joonas Lahtinen Reviewed-by: Arkadiusz Hiler Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_uc.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 5e065f1f49a352376f1004cc107712ee9231fee7 Author: Michal Wajdeczko Date: Thu Mar 30 11:21:12 2017 +0000 drm/i915/uc: Add intel_uc_fw_type_repr() Some of the DRM_NOTE messages are just using "uC" without specifying which uc they are related to. We can be more user friendly. v2: moved to the header (Joonas) Signed-off-by: Michal Wajdeczko Cc: Arkadiusz Hiler Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_uc.c | 6 ++++-- drivers/gpu/drm/i915/intel_uc.h | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) commit 4f1cd3eb16aa83c8a3981dba6815f45dab7e2d84 Author: Michal Wajdeczko Date: Thu Mar 30 11:21:11 2017 +0000 drm/i915/uc: Move intel_uc_fw_status_repr() to intel_uc.h The file fits better. Also use "" for invalid case. v2: move directly to .h (Joonas) Signed-off-by: Michal Wajdeczko Cc: Arkadiusz Hiler Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_guc_loader.c | 16 ---------------- drivers/gpu/drm/i915/intel_uc.h | 20 +++++++++++++++++++- 2 files changed, 19 insertions(+), 17 deletions(-) commit a339e4c226c0f2ea0c138e9ffc419874d370f57b Author: Johannes Berg Date: Fri Mar 31 09:13:13 2017 +0200 cfg80211: add intro to documentation This introduction section should be used in the documentation, do that at the beginning of the cfg80211 chapter. Signed-off-by: Johannes Berg Documentation/driver-api/80211/cfg80211.rst | 3 +++ 1 file changed, 3 insertions(+) commit 2754867792edfc9a6f2f49294be278d9be533ce2 Author: Johannes Berg Date: Fri Mar 31 09:12:39 2017 +0200 cfg80211: add documentation for cfg80211_get_bss() This was missing, but is referenced a lot in the documentation. Signed-off-by: Johannes Berg include/net/cfg80211.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit a3caf7440dedd2399f90f27ff11ac390bf03e6c4 Author: Vidyullatha Kanchanapally Date: Fri Mar 31 00:22:34 2017 +0300 cfg80211: Add support for FILS shared key authentication offload Enhance nl80211 and cfg80211 connect request and response APIs to support FILS shared key authentication offload. The new nl80211 attributes can be used to provide additional information to the driver to establish a FILS connection. Also enhance the set/del PMKSA to allow support for adding and deleting PMKSA based on FILS cache identifier. Add a new feature flag that drivers can use to advertize support for FILS shared key authentication and association in station mode when using their own SME. Signed-off-by: Vidyullatha Kanchanapally Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg include/linux/ieee80211.h | 13 +++++++ include/net/cfg80211.h | 57 +++++++++++++++++++++++++++- include/uapi/linux/nl80211.h | 86 ++++++++++++++++++++++++++++++++++++++++-- net/wireless/nl80211.c | 90 +++++++++++++++++++++++++++++++++++++++++--- net/wireless/sme.c | 25 +++++++++++- 5 files changed, 259 insertions(+), 12 deletions(-) commit 5349a0f7bfbdd7d81b8418c707dcd1439c714647 Author: Vidyullatha Kanchanapally Date: Fri Mar 31 00:22:33 2017 +0300 cfg80211: Use a structure to pass connect response params Currently the connect event from driver takes all the connection response parameters as arguments. With support for new features these response parameters can grow. Use a structure to pass these parameters rather than passing them as function arguments. Signed-off-by: Vidyullatha Kanchanapally Signed-off-by: Jouni Malinen [add to documentation] Signed-off-by: Johannes Berg Documentation/driver-api/80211/cfg80211.rst | 6 ++ include/net/cfg80211.h | 91 +++++++++++++++-- net/wireless/core.h | 20 +--- net/wireless/mlme.c | 20 ++-- net/wireless/nl80211.c | 30 +++--- net/wireless/nl80211.h | 7 +- net/wireless/sme.c | 149 +++++++++++++++------------- net/wireless/util.c | 12 +-- 8 files changed, 205 insertions(+), 130 deletions(-) commit 31581b60d4c936fa4c8901c175bcbc5c8839029e Author: Tamara Diaconita Date: Thu Mar 30 14:55:10 2017 +0300 drivers: gpu: drm: i915L intel_lpe_audio: Fix kerneldoc comments Add description for existing parameter 'pipe' to fix the build warning: ./drivers/gpu/drm/i915/intel_lpe_audio.c:342: warning: No description found for parameter 'pipe'. Signed-off-by: Tamara Diaconita Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170330115510.14054-1-diaconita.tamara@gmail.com drivers/gpu/drm/i915/intel_lpe_audio.c | 1 + 1 file changed, 1 insertion(+) commit 5af218439f3a4c9ca7139a40e5d047fe1ea39551 Author: Zhengyi Shen Date: Wed Mar 29 15:00:20 2017 +0800 x86/boot: Fix Sparse warning by including required header file Include declarations for various symbols defined in the error.h header file to fix the following Sparse warnings: arch/x86/boot/compressed/error.c:8:6: warning: symbol 'warn' was not declared. Should it be static? arch/x86/boot/compressed/error.c:15:6: warning: symbol 'error' was not declared. Should it be static? Signed-off-by: Zhengyi Shen Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1490770820-24472-1-git-send-email-shenzhengyi@gmail.com [ Fixed/enhanced the changelog. ] Signed-off-by: Ingo Molnar arch/x86/boot/compressed/error.c | 1 + 1 file changed, 1 insertion(+) commit 952a6c2c094f4eda295f20c42e6e2d73735950fa Author: Borislav Petkov Date: Thu Mar 30 09:44:05 2017 +0200 x86/boot/32: Flip the logic in test_wp_bit() ... to have a natural "likely()" in the code flow and thus have the success case with a branch 99.999% of the times non-taken and function return code following it instead of jumping to it each time. This puts the panic() call at the end of the function - it is going to be practically unreachable anyway. The C code is a bit more readable too. No functionality change. Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: boris.ostrovsky@oracle.com Cc: jgross@suse.com Cc: thgarnie@google.com Link: http://lkml.kernel.org/r/20170330080101.ywsf5rg6ilzu4itk@pd.tnic Signed-off-by: Ingo Molnar arch/x86/mm/init_32.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit d4d969909bef4c1e103eec0fc2c820773811fb72 Author: Andy Shevchenko Date: Thu Mar 30 13:04:43 2017 +0300 x86/platform/intel-mid: Enable Bluetooth support on Intel Edison Intel Edison has Wi-Fi + BT module attached and, since it's an SFI-enumerated platform, needs platform data. Here we add bits to enable the Bluetooth device. Signed-off-by: Andy Shevchenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170330100443.22701-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/platform/intel-mid/device_libs/Makefile | 3 +- .../platform/intel-mid/device_libs/platform_bt.c | 108 +++++++++++++++++++++ 2 files changed, 110 insertions(+), 1 deletion(-) commit 485527ba578254bb1171b13c55394257fd63cd59 Author: Hendrik Brueckner Date: Mon Feb 20 16:10:38 2017 +0100 s390/cpum_cf: make hw_perf_event_update() a void function The return code of hw_perf_event_update() is not evaluated by its callers. Hence, simplify the function by removing the return code. Reported-by: Heiko Carstens Signed-off-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_cpum_cf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 26f268ac682854345531325c7c0d803b8c573228 Author: Hendrik Brueckner Date: Mon Feb 20 16:07:43 2017 +0100 s390/cpu_mf: remove register variable in __ecctr() Using a register variable for r4 is not necessary. Let the compiler decide the register to be used. Reported-by: Heiko Carstens Signed-off-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/include/asm/cpu_mf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66a49784f909cb3da54b56591979971ebb7e7cac Author: Hendrik Brueckner Date: Fri Feb 17 12:53:55 2017 +0100 s390/cpum_cf: correct variable naming (cleanup) Make clear that the event definitions relate to the counter facility (cf) and not to the sampling facility (sf). Signed-off-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_cpum_cf_events.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 3fc7acebaecf940697ea9a5a927cf10766d4b00e Author: Hendrik Brueckner Date: Fri Feb 17 12:16:00 2017 +0100 s390/cpum_cf: add IBM z13 counter event names Add the event names for the IBM z13/z13s specific CPU-MF counters. Also improve the merging of the generic and model specific events so that their sysfs attribute definitions completely reside in memory. Hence, flagging the generic event attribute definitions as initdata too. Signed-off-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_cpum_cf_events.c | 130 +++++++++++++++++++++++++++++++-- 1 file changed, 123 insertions(+), 7 deletions(-) commit ee699f329a239bc3cc8a8c336b9615166993bffc Author: Hendrik Brueckner Date: Fri Jun 3 16:55:03 2016 +0200 s390/cpum_cf: add support for the MT-diagnostic counter set (z13) Complete the IBM z13 support and support counters from the MT-diagnostic counter set. Note that this counter set is available only if SMT is enabled. Signed-off-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/include/asm/cpu_mf.h | 4 +- arch/s390/kernel/perf_cpum_cf.c | 89 +++++++++++++++++++++++++++++------------ 2 files changed, 67 insertions(+), 26 deletions(-) commit db17160dce4ffe4d5bd70b58ee94f398ef9cabb1 Author: Hendrik Brueckner Date: Mon Feb 13 12:32:17 2017 +0100 s390/cpum_cf: cleanup event/counter validation The validate_event() function just checked for reserved counters in particular CPU-MF counter sets. Because the number of counters in counter sets vary among different hardware models, remove the explicit check to tolerate new models. Reserved counters are not accounted and, thus, will return zero. Signed-off-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_cpum_cf.c | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) commit 20ba46da369e239aa454cc57d0c7e33d51a8de51 Author: Hendrik Brueckner Date: Mon Feb 13 12:30:09 2017 +0100 s390/cpum_cf: update counter numbers to ecctr limits Use the highest counter number that can be specified for the ecctr (extract CPU counter) instruction for perf. Signed-off-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/include/asm/perf_event.h | 4 ++-- arch/s390/kernel/perf_cpum_cf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 75f78d6d9eb793d141affaa5a76f20ce1d6ae5c9 Author: Niklas Söderlund Date: Wed Mar 29 20:43:56 2017 +0200 thermal: rcar_gen3_thermal: add suspend and resume support To restore operation it's easiest to reinitialise all TSCs. In order to do this the current trip window needs to be stored in the TSC structure so that it can be restored upon resume. Signed-off-by: Niklas Söderlund Reviewed-by: Wolfram Sang Signed-off-by: Eduardo Valentin drivers/thermal/rcar_gen3_thermal.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit cc4d072b66298716484f5c78d782c64509f4b6d9 Author: Niklas Söderlund Date: Wed Mar 29 20:43:55 2017 +0200 thermal: rcar_gen3_thermal: store device match data in private structure The device match data needs to be accessible outside the probe function, store it in the private data structure. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Signed-off-by: Eduardo Valentin drivers/thermal/rcar_gen3_thermal.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 7d4b269776ec67c1b7d83c6c727a2771e5f39d12 Author: Niklas Söderlund Date: Wed Mar 29 20:43:54 2017 +0200 thermal: rcar_gen3_thermal: enable hardware interrupts for trip points Enable hardware trip points by implementing the set_trips callback. The thermal core will take care of setting the initial trip point window and to update it once the driver reports a TSC has moved outside it. The interrupt structure for this device is a bit odd. There is not a dedicated IRQ for each TSC, instead the interrupts are shared between all TSCs. IRQn is fired if the temp monitored in IRQTEMPn is reached in any of the TSCs, example IRQ3 is fired if temperature in IRQTEMP3 is reached in either TSC0, TSC1 or TSC2. For this reason the usage of interrupts in this driver is an all-on or all-off design. When an interrupt happens all TSCs are checked and all thermal zones are updated. This could be refined to be more fine grained but the thermal core takes care of only updating the thermal zones that have left their trip point window. Signed-off-by: Niklas Söderlund Reviewed-by: Wolfram Sang Signed-off-by: Eduardo Valentin drivers/thermal/rcar_gen3_thermal.c | 132 +++++++++++++++++++++++++++++++++++- 1 file changed, 131 insertions(+), 1 deletion(-) commit 97dad1f1d2b3f2a2a77551849357b7ac38b0b6ff Author: Niklas Söderlund Date: Wed Mar 29 20:43:53 2017 +0200 thermal: rcar_gen3_thermal: record and check number of TSCs found Record how many TSCs are found in struct rcar_gen3_thermal_priv, this is needed to be able to add hardware interrupts for trip points later. Also add a check to make sure at least one TSC is found. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Signed-off-by: Eduardo Valentin drivers/thermal/rcar_gen3_thermal.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit d51546c0db975a4750161d17eef62dfcf9eedc90 Author: Niklas Söderlund Date: Wed Mar 29 20:43:52 2017 +0200 thermal: rcar_gen3_thermal: check that TSC exists before memory allocation Move the check for a TSC resource before allocating memory for a new TSC. If no TSC is found there is little point in allocating memory for it. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Signed-off-by: Eduardo Valentin drivers/thermal/rcar_gen3_thermal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 100cfbcf2580b0605f50af32fefd9c8d1d8357fb Author: Niklas Söderlund Date: Wed Mar 29 20:43:51 2017 +0200 thermal: rcar_gen3_thermal: remove unneeded mutex There is no point in protecting a register read with a lock. This is most likely a leftover from when the driver was reworked before being submitted for upstream. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Signed-off-by: Eduardo Valentin drivers/thermal/rcar_gen3_thermal.c | 7 ------- 1 file changed, 7 deletions(-) commit 78aefd2d5911c4e0b5dc0b0578b3b8c7673be1d2 Author: Niklas Söderlund Date: Wed Mar 29 20:43:50 2017 +0200 thermal: rcar_gen3_thermal: add delay in .thermal_init on r8a7796 The .thermal_init needs to be delayed a short amount of time to allow for the TEMP register to contain something useful. If it's not delayed these warnings are common during boot: thermal thermal_zone0: failed to read out thermal zone (-5) thermal thermal_zone1: failed to read out thermal zone (-5) thermal thermal_zone2: failed to read out thermal zone (-5) The warnings are triggered by the first call to .get_temp() while the TEMP register contains 0 and rcar_gen3_thermal_get_temp() returns -EIO since a TEMP value of 0 will result in a temperature reading which is out of specifications. This should have been done in the initial commit which adds the driver as the same issue was found and corrected for r8a7795. Fixes: 564e73d283af9d4c ("thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal driver") Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Signed-off-by: Eduardo Valentin drivers/thermal/rcar_gen3_thermal.c | 2 ++ 1 file changed, 2 insertions(+) commit 17bb69515c6dfbe282e8a9df08ffb719ff4dbc73 Author: Vipin K Parashar Date: Fri Mar 10 17:27:32 2017 +0530 powerpc/powernv: Handle OPAL_WRONG_STATE in opal_get_sensor_data() OPAL returns OPAL_WRONG_STATE upon failing to provide sensor data due to core sleeping/offline. Add a check in opal_get_sensor_data() for sensor read failure with OPAL_WRONG_STATE return code and return -EIO. Signed-off-by: Vipin K Parashar Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-sensor.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6c7c98bad4883a4a8710c96b2b44de482865eb6e Author: Paolo Abeni Date: Thu Mar 30 14:03:06 2017 +0200 sock: avoid dirtying sk_stamp, if possible sock_recv_ts_and_drops() unconditionally set sk->sk_stamp for every packet, even if the SOCK_TIMESTAMP flag is not set in the related socket. If selinux is enabled, this cause a cache miss for every packet since sk->sk_stamp and sk->sk_security share the same cacheline. With this change sk_stamp is set only if the SOCK_TIMESTAMP flag is set, and is cleared for the first packet, so that the user perceived behavior is unchanged. This gives up to 5% speed-up under udp-flood with small packets. Signed-off-by: Paolo Abeni Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/sock.h | 5 ++++- net/core/sock.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) commit 8cd3ac52963f2e99f4c21d1c9ce89531ce66c2d6 Merge: 8bcad07 60508d3 Author: Dave Airlie Date: Fri Mar 31 11:47:18 2017 +1000 Merge branch 'drm-next-4.12' of git://people.freedesktop.org/~agd5f/linux into drm-next New stuff for 4.12: - Preliminary vega10 support - Support for multi-level page tables - GPU sensor stuff for mesa - job tracing improvements - PRT support for sparse buffers - Additional SR-IOV improvements - ttm improvements - misc bug fixes and code cleanups * 'drm-next-4.12' of git://people.freedesktop.org/~agd5f/linux: (315 commits) drm/amdgpu: Fix 32bit x86 compilation warning drm/amdgpu: just disallow reading untouched registers drm/amdgpu: remove duplicate allowed reg CP_CPF_BUSY_STAT drm/amdgpu/soc15: enable psp block for SRIOV drm/amdgpu/soc15: bypass pp block for vf drm/amdgpu/psp: add check sOS sign drm/amd/amdgpu: Correct ring wptr address in debugfs (v2) drm/amdgpu: Fix multi-level page table bugs for large BOs v3 drm/amdgpu: Fix Vega10 VM initialization drm/amdgpu: Make max_pfn 64-bit drm/amdgpu: drop GB_GPU_ID from the golden settings drm/amdgpu: fix vm pte pde flags to 64-bit for sdma (v3) drm/amd/amdgpu: fix Tonga S3 resume hang on rhel6.8 drm/ttm: decrease ttm bo priority number drm/amd/amdgpu: fix performance drop when VRAM pressure drm/amdgpu: Couple small warning fixes drm/amdgpu: Clean up GFX 9 VM fault messages drm/amdgpu: Register UTCL2 as a source of VM faults drm/amdgpu/soc15: drop support for reading some registers drm/amdgpu/soc15: return cached values for some registers (v2) ... commit b77d537d00d08fcf0bf641cd3491dd7df0ad1475 Author: Manish Jaggi Date: Thu Mar 30 18:47:14 2017 -0500 PCI: Apply Cavium ACS quirk only to CN81xx/CN83xx/CN88xx devices Only apply the Cavium ACS quirk to devices with ID in the range 0xa000-0xa0ff. These are the on-chip PCI devices for CN81xx/CN83xx/CN88xx. Fixes: b404bcfbf035 ("PCI: Add ACS quirk for all Cavium devices") Reported-by: Alex Williamson Signed-off-by: Manish Jaggi Acked-by: David Daney Acked-by: Alex Williamson drivers/pci/quirks.c | 3 +++ 1 file changed, 3 insertions(+) commit 7801a3225e7fe05f7601ab42a5669ba633c4df54 Merge: 1935299 1b8955e Author: David S. Miller Date: Thu Mar 30 15:58:43 2017 -0700 Merge branch 'ibmvnic-cleanup-resource-handling' Nathan Fontenot says: ==================== ibmvnic: Cleanup resource handling In order to better manage the resources of the ibmvnic driver, this set of patches creates a set of initialization and release routines for the drivers resources. Additionally, some patches do some re-naming of the affected routines so that there is a common naming scheme in the driver. ==================== Signed-off-by: David S. Miller commit 1b8955ee5f6c1575c09b44c8253883394c78bef7 Author: Nathan Fontenot Date: Thu Mar 30 02:49:29 2017 -0400 ibmvnic: Cleanup failure path in ibmvnic_open Now that ibmvnic_release_resources will clean up all of our resources properly, even if they were not allocated, we can just call this for failues in ibmvnic_open. This patch also moves the ibmvnic_release_resources() routine up in the file to avoid creating a forward declaration ad re-names it to drop the ibmvnic prefix. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 51 ++++++++++++++------------------------ 1 file changed, 19 insertions(+), 32 deletions(-) commit 7bbc27a4961a7d5f8e4294929ce64d6c6e81e90c Author: Nathan Fontenot Date: Thu Mar 30 02:49:23 2017 -0400 ibmvnic: Create init/release routines for stats token Create an initialization and a release routine for the stats token used by the ibmvnic driver. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 46 ++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 12 deletions(-) commit b510888f9639588d30d48eaaa32502cdb1c9e9e0 Author: Nathan Fontenot Date: Thu Mar 30 02:49:18 2017 -0400 ibmvnic: Merge the two release_sub_crq_queue routines Keeping two routines for releasing sub crqs, one for when irqs are not initialized and one for when they are, is a bit of overkill. Merge the two routines to a common release routine that will check for an irq and release it if needed. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 54 ++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 32 deletions(-) commit 0ffe2cb7903b20e74a9f42c53016e61e187ee345 Author: Nathan Fontenot Date: Thu Mar 30 02:49:12 2017 -0400 ibmvnic: Create init and release routines for the rx pool Move the initialization and the release of the rx pool to their own routines, and update them to do validation. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 204 ++++++++++++++++++------------------- 1 file changed, 101 insertions(+), 103 deletions(-) commit c657e32cd0555e97ae8903f8a5a9d7c2f3579650 Author: Nathan Fontenot Date: Thu Mar 30 02:49:06 2017 -0400 ibmvnic: Create init and release routines for the tx pool Move the initialization and the release of the tx pool to their own routines, and update them to do validation. This also adds validation to the release of the long term buffer. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 134 +++++++++++++++++++++---------------- 1 file changed, 78 insertions(+), 56 deletions(-) commit f0b8c96cbcc5fbd4f66abcbf4bc442a1066d8899 Author: Nathan Fontenot Date: Thu Mar 30 02:49:00 2017 -0400 ibmvnic: Create init and release routines for the bounce buffer Move the handling of initialization and releasing the bounce buffer to their own init and release routines. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 77 +++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 27 deletions(-) commit f992887c34a15d40a257c73fe59800826bcaf1a4 Author: Nathan Fontenot Date: Thu Mar 30 02:48:54 2017 -0400 ibmvnic: Update main crq initialization and release Update the initialization and release routines for the crq queue so that we validate the crq queue. Additionally this updates the naming of the init and release routines for the crq queue to drop the ibmvnic prefix. This matches the naming for similar routines in the driver Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 1935299d9c946ac37eba3f820d2ce20885ec0739 Author: Gao Feng Date: Thu Mar 30 06:49:19 2017 +0800 net: tcp: Refine the __tcp_select_window 1. Move the "window = tp->rcv_wnd;" into the condition block without tp->rx_opt.rcv_wscale. Because it is unnecessary when enable wscale; 2. Use the macro ALIGN instead of two statements. The two statements are used to make window align to 1< Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit bae76dd95b69350f6342d8a4ea1bdeec4c218053 Author: Vivien Didelot Date: Wed Mar 29 15:38:37 2017 -0400 net: dsa: mv88e6xxx: debug ATU Age Time The ATU ageing time value programmed in the switch is rounded up to the nearest multiple of its coefficient (variable depending on the model.) Add a debug message to inform the user about the exact programmed value. On 6352, "brctl setageing br0 18" gives "AgeTime set to 0x01 (15000 ms)" while on 6390 we get "AgeTime set to 0x05 (18750 ms)". Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global1_atu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit a1146328ec47141007a6ec076e1cbfc80f31887f Merge: c70d219 192c1df Author: Krzysztof Kozlowski Date: Fri Mar 31 00:27:18 2017 +0300 Merge tag 'samsung-dt-hdmi-cec-4.12' into next/dt Add to hdmi-cec node a phandle to hdmi node for new hdmi-cec notifier. commit b5aac5a9adf667f907c34c520e023bc19f8c226c Author: Kuninori Morimoto Date: Thu Mar 30 01:49:27 2017 +0000 ASoC: rcar: call missing of_clk_del_provider() when remove adg is calling of_clk_add_provider() when probe time, thus, remove should call of_clk_del_provider(), it doesn't now. This patch fix this issue. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/adg.c | 5 +++++ 1 file changed, 5 insertions(+) commit d7f298197a22f11b38059f257842dac7c30a564c Author: Kuninori Morimoto Date: Thu Mar 30 01:49:06 2017 +0000 ASoC: rcar: fixup of_clk_add_provider() usage for multi clkout Current adg is calling of_clk_add_povider() multiple times, but it is not correct usage. This patch fixup its parameter and call it once. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/adg.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 192c1df4a75499a6ab70aca38c6a7e5e40013d77 Author: Hans Verkuil Date: Wed Mar 29 16:15:37 2017 +0200 ARM: dts: exynos: add HDMI controller phandle to exynos4.dtsi Add the new hdmi phandle to exynos4.dtsi. This phandle is needed by the s5p-cec driver to initialize the CEC notifier framework. Tested with my Odroid U3. Signed-off-by: Hans Verkuil Tested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4.dtsi | 1 + 1 file changed, 1 insertion(+) commit b121b051d14cc6e4e799e96e9c06c55989f9e073 Author: Lukas Wunner Date: Fri Mar 10 21:23:45 2017 +0100 apple-gmux: Don't switch external DP port on 2011+ MacBook Pros On MacBook Pros introduced 2011 and onward, external DP ports are combined DP/Thunderbolt ports that are no longer fully switchable between GPUs, they can only be driven by the discrete GPU. More specifically, the Main Link pins (which transport the actual video and audio streams) are soldered to the discrete GPU, whereas the AUX Channel pins are switchable. Because the integrated GPU is missing the Main Link, external displays appear to it as phantoms which fail to link-train. Force the AUX channel to the discrete GPU on these models to avoid any confusion. Document the switching policy implemented by this commit. Acked-by: Andy Shevchenko Signed-off-by: Lukas Wunner Link: http://patchwork.freedesktop.org/patch/msgid/4d1fcc92d1960049e2cff997fbd2d74e45e84e49.1489145162.git.lukas@wunner.de drivers/platform/x86/apple-gmux.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit 1d3c11030103680a30bbe78b599f7e009bba3bc6 Author: Lukas Wunner Date: Fri Mar 10 21:23:45 2017 +0100 drm/nouveau: Don't register Thunderbolt eGPU with vga_switcheroo An external Thunderbolt GPU can neither drive the laptop's panel nor be powered off by the platform, so there's no point in registering it with vga_switcheroo. In fact, when the external GPU is runtime suspended, vga_switcheroo will cut power to the internal discrete GPU, resulting in a lockup. Cc: Ben Skeggs Acked-by: Alex Deucher Signed-off-by: Lukas Wunner Link: http://patchwork.freedesktop.org/patch/msgid/8e733152b13e7c14501ad5af45c1c5c736584111.1489145162.git.lukas@wunner.de drivers/gpu/drm/nouveau/nouveau_vga.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 84c8b22e9fe8d9a7f2ab3d561a6b4576540f5a31 Author: Lukas Wunner Date: Fri Mar 10 21:23:45 2017 +0100 drm/amdgpu: Don't register Thunderbolt eGPU with vga_switcheroo An external Thunderbolt GPU can neither drive the laptop's panel nor be powered off by the platform, so there's no point in registering it with vga_switcheroo. In fact, when the external GPU is runtime suspended, vga_switcheroo will cut power to the internal discrete GPU, resulting in a lockup. Moreover AMD's Windows driver special-cases Thunderbolt as well. Acked-by: Alex Deucher Signed-off-by: Lukas Wunner Link: http://patchwork.freedesktop.org/patch/msgid/701a8e89ce8ac39734736ab779558b6a4042a19e.1489145162.git.lukas@wunner.de drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) commit 7ffb0ce31cf90c21dfa496c19c2c795534b12e76 Author: Lukas Wunner Date: Fri Mar 10 21:23:45 2017 +0100 drm/radeon: Don't register Thunderbolt eGPU with vga_switcheroo An external Thunderbolt GPU can neither drive the laptop's panel nor be powered off by the platform, so there's no point in registering it with vga_switcheroo. In fact, when the external GPU is runtime suspended, vga_switcheroo will cut power to the internal discrete GPU, resulting in a lockup. Moreover AMD's Windows driver special-cases Thunderbolt as well. Acked-by: Alex Deucher Signed-off-by: Lukas Wunner Link: http://patchwork.freedesktop.org/patch/msgid/72d8a9645aece3eff44e116303f0fec8be061c88.1489145162.git.lukas@wunner.de drivers/gpu/drm/radeon/radeon_device.c | 7 +++++-- drivers/gpu/drm/radeon/radeon_kms.c | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) commit 8531e283bee66050734fb0e89d53e85fd5ce24a4 Author: Lukas Wunner Date: Fri Mar 10 21:23:45 2017 +0100 PCI: Recognize Thunderbolt devices Detect on probe whether a PCI device is part of a Thunderbolt controller. Intel uses a Vendor-Specific Extended Capability (VSEC) with ID 0x1234 on such devices. Detect presence of this VSEC and cache it in a newly added is_thunderbolt bit in struct pci_dev. Also, add a helper to check whether a given PCI device is situated on a Thunderbolt daisy chain (i.e., below a PCI device with is_thunderbolt set). The necessity arises from the following: * If an external Thunderbolt GPU is connected to a dual GPU laptop, that GPU is currently registered with vga_switcheroo even though it can neither drive the laptop's panel nor be powered off by the platform. To vga_switcheroo it will appear as if two discrete GPUs are present. As a result, when the external GPU is runtime suspended, vga_switcheroo will cut power to the internal discrete GPU which may not be runtime suspended at all at this moment. The solution is to not register external GPUs with vga_switcheroo, which necessitates a way to recognize if they're on a Thunderbolt daisy chain. * Dual GPU MacBook Pros introduced 2011+ can no longer switch external DisplayPort ports between GPUs. (They're no longer just used for DP but have become combined DP/Thunderbolt ports.) The driver to switch the ports, drivers/platform/x86/apple-gmux.c, needs to detect presence of a Thunderbolt controller and, if found, keep external ports permanently switched to the discrete GPU. v2: Make kerneldoc for pci_is_thunderbolt_attached() more precise, drop portion of commit message pertaining to separate series. (Bjorn Helgaas) Cc: Andreas Noever Cc: Michael Jamet Cc: Tomas Winkler Cc: Amir Levy Acked-by: Bjorn Helgaas Signed-off-by: Lukas Wunner Link: http://patchwork.freedesktop.org/patch/msgid/0ab165a4a35c0b60f29d4c306c653ead14fcd8f9.1489145162.git.lukas@wunner.de drivers/pci/pci.h | 2 ++ drivers/pci/probe.c | 21 +++++++++++++++++++++ include/linux/pci.h | 23 +++++++++++++++++++++++ 3 files changed, 46 insertions(+) commit 8ccd1e5162c96462ffddff2a6f7119f3ab6b2a9a Author: Lukas Wunner Date: Mon Mar 27 18:48:24 2017 +0200 MAINTAINERS: Add Lukas Wunner as reviewer for vga_switcheroo I've been contributing to vga_switcheroo for the past two years and by now am fairly familiar with it, so danvet suggested that I add myself as reviewer. While at it, add missing file pattern for vga_switcheroo.h + vgaarb.h to the DRM and DRM-MISC sections such that get_maintainer.pl returns dri-devel@ and the drm-misc maintainers. Suggested-and-acked-by: Daniel Vetter Signed-off-by: Lukas Wunner Link: http://patchwork.freedesktop.org/patch/msgid/ff2320a0790d039e714cf352cf32ec16fa370627.1490623913.git.lukas@wunner.de MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 9739e7464691456dd7c297b92ef0783fe13f6ba5 Author: Daniel Vetter Date: Thu Mar 30 22:48:31 2017 +0200 drm: Fix locking gotcha in page_flip ioctl We want to lock the primary plane, not the cursor (which might be optional). Real bad case of copy-paste fail, unfortunately our CI didn't catch that because i915 does have a cursor plane. Reported-by: Eric Anholt Fixes: 29dc0d1de182 ("drm: Roll out acquire context for the page_flip ioctl") Cc: Jani Nikula Cc: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170330204831.8225-1-daniel.vetter@ffwll.ch Tested-by: Eric Anholt Reviewed-by: Harry Wentland drivers/gpu/drm/drm_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3401e8d1e1300742ed41910b9338b9da52689a16 Author: Andi Kleen Date: Wed Mar 29 17:22:18 2017 -0700 perf vendor events intel: Add missing space in json descriptions Add a missing space in the JSON description after the uncore unit Before: perf list ... unc_arb_coh_trk_requests.all [Unit: uncore_arbNumber of entries allocated. Account for Any type: e.g. Snoop, Core aperture, etc] ... After: unc_arb_coh_trk_requests.all [Unit: uncore_arb Number of entries allocated. Account for Any type: e.g. Snoop, Core aperture, etc] Cc: jolsa@kernel.org Link: http://lkml.kernel.org/n/tip-p989c7x9kaiy2bnkmgpo6cvt@git.kernel.org Signed-off-by: Andi Kleen tools/perf/pmu-events/jevents.c | 1 + 1 file changed, 1 insertion(+) commit af34cb4fad1ba08db199ef1b0a529549e041dd25 Author: Andi Kleen Date: Wed Mar 29 17:20:28 2017 -0700 perf vendor events intel: Add uncore_arb JSON support The JSON lists call the box iMPH-U, while perf calls it arb. Add conversion support to json to convert the unit properly. Cc: jolsa@kernel.org Link: http://lkml.kernel.org/n/tip-stq5ly95z2qioggp9bfaqe0h@git.kernel.org Signed-off-by: Andi Kleen tools/perf/pmu-events/jevents.c | 1 + 1 file changed, 1 insertion(+) commit 92c6de0f10a80e4936fac04148bd3783a7c2b9f8 Author: Andi Kleen Date: Wed Mar 29 17:18:15 2017 -0700 perf vendor events intel: Add uncore events for Skylake client Add V25 of Skylake uncore events Cc: jolsa@kernel.org Link: http://lkml.kernel.org/n/tip-00qmcrmq183x2qrj59g92fma@git.kernel.org Signed-off-by: Andi Kleen tools/perf/pmu-events/arch/x86/skylake/uncore.json | 254 +++++++++++++++++++++ 1 file changed, 254 insertions(+) commit 092a95d41655bdd31d7d28f1788818724505feb2 Author: Andi Kleen Date: Wed Mar 29 17:17:42 2017 -0700 perf vendor events intel: Add uncore events for Broadwell client Add V18 of Broadwell uncore events Cc: jolsa@kernel.org Link: http://lkml.kernel.org/n/tip-xlbguqdzho7l3qn7di40a7av@git.kernel.org Signed-off-by: Andi Kleen .../perf/pmu-events/arch/x86/broadwell/uncore.json | 278 +++++++++++++++++++++ 1 file changed, 278 insertions(+) commit 0585c6265e66f952bcb6280cf078e5e120bd367a Author: Andi Kleen Date: Wed Mar 29 17:17:02 2017 -0700 perf vendor events intel: Add uncore events for Haswell client Add V25 of Haswell uncore events Cc: jolsa@kernel.org Link: http://lkml.kernel.org/n/tip-133r1do7vvssoyszxgx174hj@git.kernel.org Signed-off-by: Andi Kleen tools/perf/pmu-events/arch/x86/haswell/uncore.json | 374 +++++++++++++++++++++ 1 file changed, 374 insertions(+) commit bccdcb2a77ba0bef17baf152179e30ca35459a0c Author: Andi Kleen Date: Wed Mar 29 17:14:02 2017 -0700 perf vendor events intel: Add uncore events for Ivy Bridge client Add V18 of Ivy Bridge uncore events Cc: jolsa@kernel.org Link: http://lkml.kernel.org/n/tip-299k76asec5rwp0i86qygnnt@git.kernel.org Signed-off-by: Andi Kleen .../perf/pmu-events/arch/x86/ivybridge/uncore.json | 314 +++++++++++++++++++++ 1 file changed, 314 insertions(+) commit 80432c7311dbcf0c814d4923480b055a725b0be2 Author: Andi Kleen Date: Wed Mar 29 17:12:44 2017 -0700 perf vendor events intel: Add uncore events for Sandy Bridge client Add V15 of Sandy Bridge uncore events Cc: jolsa@kernel.org Link: http://lkml.kernel.org/n/tip-2qkwutpwljdue8jmwk3xqdbl@git.kernel.org Signed-off-by: Andi Kleen .../pmu-events/arch/x86/sandybridge/uncore.json | 314 +++++++++++++++++++++ 1 file changed, 314 insertions(+) commit 9c4e2e2589c99ed01db6245847b4bd44bc053330 Author: Andi Kleen Date: Wed Mar 29 17:07:53 2017 -0700 perf vendor events intel: Add missing UNC_M_DCLOCKTICKS for Broadwell DE uncore An earlier update removed the UNC_M_CLOCKTICKS event for Broadwell DE. But Metric events were still referring to it. This adds it back under a different name from the event list, and also fixes up the Metric events to use the new name. Cc: jolsa@kernel.org Link: http://lkml.kernel.org/n/tip-zxxzg4g5nr93o7np00vgqqwm@git.kernel.org Signed-off-by: Andi Kleen .../perf/pmu-events/arch/x86/broadwellde/uncore-memory.json | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit db5bcf87bb9e856e90c131d6e636a5550c2bbcd3 Author: Jens Axboe Date: Thu Mar 30 13:44:26 2017 -0600 null_blk: add blocking mode This adds a new module parameter to null_blk, blocking. If set, null_blk will set the BLK_MQ_F_BLOCKING flag, indicating that it sometimes/always needs to block in its ->queue_rq() function. The intent is to help find regressions in blocking drivers, since not many of them exist. If null_blk is loaded with submit_queues > 1 and blocking=1, this shows the regression recently fixed by bf4907c05e61. Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe drivers/block/null_blk.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit e704f0434ea60adedc07c847b46910d4840a7ecf Author: Nathan Fontenot Date: Wed Mar 29 15:14:55 2017 -0400 ibmvnic: Remove debugfs support The debugfs support in the ibmvnic driver is not, and never has been, supported. Just remove it. The work done in the debugfs code for the driver was part of the original spec for the ibmvnic driver. The corresponding support for this from the server side was never supported and has been dropped. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 628 ------------------------------------- drivers/net/ethernet/ibm/ibmvnic.h | 30 -- 2 files changed, 658 deletions(-) commit 142c6594acbcc32391af9c15f8cd65c6c177698f Author: Eric Dumazet Date: Wed Mar 29 10:45:44 2017 -0700 bonding: refine bond_fold_stats() wrap detection Some device drivers reset their stats at down/up events, possibly fooling bonding stats, since they operate with relative deltas. It is nearly not possible to fix drivers, since some of them compute the tx/rx counters based on per rx/tx queue stats, and the queues can be reconfigured (ethtool -L) between the down/up sequence. Lets avoid accumulating 'negative' values that render bonding stats useless. It is better to lose small deltas, assuming the bonding stats are fetched at a reasonable frequency. Fixes: 5f0c5f73e5ef ("bonding: make global bonding stats more reliable") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 60508d3df2d2052881190ac82802a12cabcef53c Author: Alex Xie Date: Thu Mar 30 13:30:00 2017 -0400 drm/amdgpu: Fix 32bit x86 compilation warning drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c:187:2: warning: right shift count >= width of type [enabled by default] drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c:173:2: warning: right shift count >= width of type [enabled by default] drivers/gpu/drm/amd/amdgpu/vega10_ih.c:106:3: warning: right shift count >= width of type [enabled by default] v2: Add a space between "&" and "0xff" Reported by: kbuild-all@01.org Signed-off-by: Alex Xie Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit bcd2ba02a41d46c426fd16ad530b96527a5f181a Author: Eric Anholt Date: Mon Mar 20 16:36:15 2017 -0700 drm: Clarify the role of plane_state argument to drm_simple update(). Like the atomic update hook it's wrapping, the plane_state is the old one, and the new one is in plane->state. Both msxfb and tinydrm use it correctly, but I mistook it for the new state in pl111 due to its naming. Signed-off-by: Eric Anholt Link: http://patchwork.freedesktop.org/patch/msgid/20170320233615.5242-3-eric@anholt.net Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_simple_kms_helper.c | 4 ++-- include/drm/drm_simple_kms_helper.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit ea2d9a96b6abe57d72d39a7af24e0120f5df0a8c Author: Ard Biesheuvel Date: Sun Mar 19 17:23:31 2017 +0100 ARM: 8663/1: wire up HWCAP/HWCAP2 feature bits to the CPU modalias Wire up the generic support for exposing CPU feature bits via the modalias in /sys/device/system/cpu. This allows udev to automatically load modules for things like crypto algorithms that are implemented using optional instructions. Since it is non-trivial to transparantly support both HWCAP and HWCAP2 capabilities in the cpu_feature() macro (which allows a module's hwcap dependency and init routine to be declared using a single invocation of module_cpu_feature_match()), support only HWCAP2 for now, which covers the capabilities that are most likely to be useful in this manner. Module dependencies on HWCAP will need to be declared explicitly via a MODULE_DEVICE_TABLE(cpu, ...) declaration. Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King arch/arm/Kconfig | 1 + arch/arm/include/asm/cpufeature.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) commit c7217b2af83e85dd6053ff13dc4ac2d24d85b97c Author: Christian König Date: Fri Mar 24 14:32:50 2017 +0100 drm/amdgpu: just disallow reading untouched registers Not sure what the original intention was here, but returning a random piece of kernel memory to userspace because we didn't set the value at all is clearly not a good idea. This patch disallows reading the register and returns a proper error code instead. Signed-off-by: Christian König Acked-by: Alex Deucher Acked-by: Tom St Denis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 6 ------ 1 file changed, 6 deletions(-) commit bcf32a2371017c5de92cf9d36c811dc26076898a Author: Christian König Date: Fri Mar 24 14:05:37 2017 +0100 drm/amdgpu: remove duplicate allowed reg CP_CPF_BUSY_STAT Remove duplicate mmCP_CPF_BUSY_STAT from the allowed registers. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 1 - 1 file changed, 1 deletion(-) commit bf4907c05e615f6a1811d61c58d56da52f7e9954 Author: Jens Axboe Date: Thu Mar 30 12:30:39 2017 -0600 blk-mq: fix schedule-under-preempt for blocking drivers Commit a4d907b6a33b unified the single and multi queue request handlers, but in the process, it also screwed up the locking balance and calls blk_mq_try_issue_directly() with the ctx preempt lock held. This is a problem for drivers that have set BLK_MQ_F_BLOCKING, since now they can't reliably sleep. While in there, protect against similar issues in the future, by adding a might_sleep() trigger in the BLOCKING path for direct issue or queue run. Reported-by: Josef Bacik Tested-by: Josef Bacik Fixes: a4d907b6a33b ("blk-mq: streamline blk_mq_make_request") Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 25ec249632d505192789e15dcafed5a9cdb1283e Author: Tony Lindgren Date: Thu Mar 23 20:38:42 2017 -0700 iio: adc: cpcap: Add minimal support for CPCAP PMIC ADC On Motorola phones like droid 4 there is a custom CPCAP PMIC. This PMIC has ADCs that are used for battery charging and USB PHY VBUS and ID pin detection. Unfortunately the only documentation for this ADC seems to be the Motorola mapphone Linux kernel tree. I have tested that reading raw and scaled values works, but I have not used the timed sampling that the ADC seems to support. Let's add a minimal support for it so we can eventually provide IIO channels for the related battery charging and USB PHY drivers. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Cc: Sebastian Reichel Signed-off-by: Tony Lindgren Acked-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/cpcap-adc.txt | 18 + drivers/iio/adc/Kconfig | 11 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/cpcap-adc.c | 1007 ++++++++++++++++++++ 4 files changed, 1037 insertions(+) commit 031e5896dfdc24839d60f168f6e8560e294674d3 Author: Daniel Vetter Date: Thu Mar 30 15:32:53 2017 +0200 drm: Clear e after kfree in drm_mode_page_flip_ioctl With the explicit retry loop static analyzers get confused by the control flow and believe that e could be accessed after kfree. That's not possible, but it's non-obvious, so let's clear it to NULL. We already cleared e = NULL at the top of the function, so this is all in line. Cc: Julia Lawall Reported-by: Julia Lawall Fixes: 29dc0d1de182 ("drm: Roll out acquire context for the page_flip ioctl") Cc: Harry Wentland Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170330133253.29500-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_plane.c | 1 + 1 file changed, 1 insertion(+) commit b71244b62be470327a59fe940587ccb0811cf8d7 Author: Gargi Sharma Date: Thu Mar 30 15:03:46 2017 +0530 staging: iio: update locking method during frequency writes The driver needs to insure atomicity during frequency changes of bus and device. The iiodev->mlock as used was not doing that. Replace it with the drivers existing buffer lock and introduce an auxiliary spi_write() that does not hold the lock. Signed-off-by: Gargi Sharma Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7754.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 5e13b6f0e7cc7e53466d1b62a6d0ccbd7632f71f Author: Arushi Singhal Date: Thu Mar 30 18:11:22 2017 +0530 drivers: iio: chemical: replace comma with a semicolon Replace a comma between expression statements by a semicolon. This changes the semantics of the code, but given the current indentation appears to be what is intended. A simplified version of the Coccinelle semantic patch that performs this transformation is as follows: // @r@ expression e1,e2; @@ e1 -, +; e2; // Signed-off-by: Arushi Singhal Signed-off-by: Jonathan Cameron drivers/iio/chemical/ams-iaq-core.c | 2 +- drivers/iio/chemical/vz89x.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bb4787f520f2497ea2455bb7cd795ac96a474191 Author: Arushi Singhal Date: Thu Mar 30 18:16:03 2017 +0530 iio: adc: replace comma with a semicolon Replace a comma between expression statements by a semicolon. This changes the semantics of the code, but given the current indentation appears to be what is intended. A simplified version of the Coccinelle semantic patch that performs this transformation is as follows: // @r@ expression e1,e2; @@ e1 -, +; e2; // Signed-off-by: Arushi Singhal Signed-off-by: Jonathan Cameron drivers/iio/adc/max11100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ed8bfd5c1ca6e2911c797da611fdada958ab44c0 Author: Colin Ian King Date: Wed Mar 29 16:33:55 2017 +0100 VSOCK: remove unnecessary ternary operator on return value Rather than assign the positive errno values to ret and then checking if it is positive and flip the sign, just return the errno value. Detected by CoverityScan, CID#986649 ("Logically Dead Code") Signed-off-by: Colin Ian King Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller net/vmw_vsock/vmci_transport.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) commit 282ccf6efb7c5d75b0283b66ed487957163ce8fe Author: Florian Westphal Date: Wed Mar 29 17:17:31 2017 +0200 drivers: add explicit interrupt.h includes These files all use functions declared in interrupt.h, but currently rely on implicit inclusion of this file (via netns/xfrm.h). That won't work anymore when the flow cache is removed so include that header where needed. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller drivers/infiniband/hw/nes/nes.h | 1 + drivers/net/dsa/mv88e6xxx/global2.c | 1 + drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 1 + drivers/net/ethernet/amd/xgbe/xgbe-i2c.c | 1 + drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 1 + drivers/net/ethernet/broadcom/bgmac.c | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 ++ drivers/net/ethernet/cavium/liquidio/lio_main.c | 1 + drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 1 + drivers/net/ethernet/ezchip/nps_enet.c | 1 + drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 1 + drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 1 + drivers/net/wireless/st/cw1200/cw1200_sdio.c | 1 + drivers/usb/gadget/function/f_ncm.c | 1 + net/mac802154/ieee802154_i.h | 1 + net/smc/smc_ib.h | 1 + 17 files changed, 18 insertions(+) commit eaf70ad14cbbb99d46b78b1307628a16a3f6075d Author: Wadim Egorov Date: Wed Mar 29 14:12:19 2017 +0200 net: stmmac: dwmac-rk: Add handling for RGMII_ID/RXID/TXID ATM dwmac-rk will always set and enable it's internal delay lines. Using PHY internal delays in combination with the phy-mode rgmii-id/rxid/txid was not possible. Only rgmii was supported. Now we can disable rockchip's gmac delay lines and also use rgmii-id/rxid/txid. Tested only with a RK3288 based board. Signed-off-by: Wadim Egorov Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 53 ++++++++++++++++++-------- 1 file changed, 37 insertions(+), 16 deletions(-) commit 5bacd77849173c8b7d4c75d5289557e73bd724db Author: LABBE Corentin Date: Wed Mar 29 07:05:40 2017 +0200 Revert "net: stmmac: enable multiple buffers" The commit aff3d9eff843 ("net: stmmac: enable multiple buffers") breaks numerous boards. while some patch exists for fixing some of it, dwmac-sunxi is still broken with it. Since this patch is very huge, it will be better to split it in smaller part. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/chain_mode.c | 45 +- drivers/net/ethernet/stmicro/stmmac/ring_mode.c | 46 +- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 49 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1306 +++++++-------------- 4 files changed, 473 insertions(+), 973 deletions(-) commit 8490ae207f1d1dd6765e89dd7c189c2c975ee3bc Author: Chris Wilson Date: Thu Mar 30 15:50:37 2017 +0100 drm/i915: Suppress busy status for engines if wedged If the driver is wedged, HW state may be very inconsistent and report that it is still busy, even though we have stopped using it. This can lead to a double *ERROR* rather than a graceful cleanup after wedging. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170330145041.9005-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 4 +--- drivers/gpu/drm/i915/intel_engine_cs.c | 9 +++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) commit 2c170af76cd77258ff41d7270a281e23c386c649 Author: Chris Wilson Date: Thu Mar 30 15:50:36 2017 +0100 drm/i915: Do request retirement before marking engines as wedged As we declare an engine as wedged, we mark all of its active requests as in error. However, we don't want to mark successfully completed requests as in error, which requires us to retire those requests first. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170330145041.9005-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 99b19a1f21c68334f8c919c3d6ca4a18be31cf69 Merge: 49240e8 7a9bc33 Author: Arnd Bergmann Date: Thu Mar 30 17:48:49 2017 +0200 Merge tag 'amlogic-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/drivers Pull "Amlogic driver updates for v4.12" from Kevin Hilman: - firmware: updates/fixes for meson-sm * tag 'amlogic-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: firmware: meson-sm: Allow 0 as valid return value firmware: meson-sm: Check for buffer output size commit 06d215719653affcd3b75698dc63e8144804f06f Merge: 6b0eb18 66e5630 Author: Arnd Bergmann Date: Thu Mar 30 17:45:35 2017 +0200 Merge tag 'mvebu-defconfig64-4.12-1' of git://git.infradead.org/linux-mvebu into next/arm64 Pull "mvebu defconfig64 for 4.12 (part 1)" from Gregory CLEMENT: Update arm64 defconfig by adding MVPP2 for Marvell Armada 7K/8K and MVNETA and I2C_PXA for Armada 37xx. * tag 'mvebu-defconfig64-4.12-1' of git://git.infradead.org/linux-mvebu: arm64: defconfig: enable MVPP2 arm64: defconfig: enable I2C_PXA arm64: defconfig: enable MVNETA commit 6b0eb184939e015c4d9a38965c13f2a4bddb44ec Merge: 0563ff3 95fbe8b Author: Arnd Bergmann Date: Thu Mar 30 17:44:46 2017 +0200 Merge tag 'amlogic-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/arm64 Pull "Amlogic: defconfig changes for v4.12" from Kevin Hilman: - enable PWM LEDs and LEDs default-on trigger * tag 'amlogic-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM64: defconfig: enable the leds-pwm driver and default-on trigger commit 7012d8c48be6537a05511c5833f41105e8c78c39 Merge: 5758d31 507c318 Author: Arnd Bergmann Date: Thu Mar 30 17:43:15 2017 +0200 Merge tag 'davinci-for-v4.12/defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/defconfig Pull "DaVinci defconfig updates for v4.12" from Sekhar Nori: DaVinci defconfig updates for enabling Video capture and display on DA850 and an ADC driver thats used by Lego EV3. * tag 'davinci-for-v4.12/defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci_all_defconfig: Enable TI ADS7950 ARM: davinci_all_defconfig: enable IRQ support for pca953x ARM: davinci_all_defconfig: enable VPIF display modules commit 0563ff3702d8d2c752bbc169742e15f6f8fc8228 Author: Jayachandran C Date: Wed Mar 15 20:11:02 2017 +0000 MAINTAINERS: Broadcom Vulcan is now Cavium ThunderX2 Now that the dts files are moved to the new location, we can remove the Broadcom Vulcan entry in the MAINTAINERS. Also fix up the Cavium ThunderX2 entry with the correct pattern for the new names. Signed-off-by: Jayachandran C Signed-off-by: Arnd Bergmann MAINTAINERS | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit aa9daa310dee3f86fa3a693fecd996a28d993cc6 Author: Masahiro Yamada Date: Tue Mar 28 18:17:02 2017 +0900 ARM: mmp: let clk_disable() return immediately if clk is NULL In many of clk_disable() implementations, it is a no-op for a NULL pointer input, but this is one of the exceptions. Making it treewide consistent will allow clock consumers to call clk_disable() without NULL pointer check. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann arch/arm/mach-mmp/clock.c | 3 +++ 1 file changed, 3 insertions(+) commit e1ffaa551cfbc5fc86bb6f40d41adb5e5106ab6c Author: Masahiro Yamada Date: Tue Mar 28 18:17:03 2017 +0900 ARM: w90x900: let clk_disable() return immediately if clk is NULL In many of clk_disable() implementations, it is a no-op for a NULL pointer input, but this is one of the exceptions. Making it treewide consistent will allow clock consumers to call clk_disable() without NULL pointer check. Signed-off-by: Masahiro Yamada Acked-by: Wan Zongshun Signed-off-by: Arnd Bergmann arch/arm/mach-w90x900/clock.c | 3 +++ 1 file changed, 3 insertions(+) commit 831488669a334ea10f60361bb90f473ce7f655ff Author: Christoph Hellwig Date: Fri Jan 13 17:29:48 2017 +0100 scsi: be2iscsi: switch to pci_alloc_irq_vectors And get automatic MSI-X affinity for free. Signed-off-by: Christoph Hellwig Acked-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 127 +++++++++++++--------------------------- drivers/scsi/be2iscsi/be_main.h | 2 - 2 files changed, 42 insertions(+), 87 deletions(-) commit 5758d31ac8e1f00d0fb506363db20b4e6427514e Author: Alexandre TORGUE Date: Thu Mar 23 11:09:06 2017 +0100 ARM: configs: stm32: Set CPU_V7M_NUM_IRQ to max value stm32_defconfig is used for several STM32 MCU: STM32F429, STM32F469, STM32F746 and now STM32H743. Each of MCU listed have different interrupts number mapped on NVIC. STM32F429: 81, STM32F469: 92, STM32F746: 97 and STM32H743: 149. I could set CPU_V7M_NUM_IRQ to 149 but in order to avoid forgetting to update this value for next STM32 MCU I prefer to set it to max value: 240. Signed-off-by: Alexandre TORGUE Signed-off-by: Arnd Bergmann arch/arm/configs/stm32_defconfig | 1 + 1 file changed, 1 insertion(+) commit 485a9d2cfa8d4f5f86a1432136e998391cfd130c Author: Russell King Date: Sat Mar 25 12:53:10 2017 +0000 ARM: dts: clearfog: keep dts alphabetically ordered Keep the clearfog DTS file ordered alphabetically - Florian placed the MDIO entry after pinctrl, which mis-orders the file. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-388-clearfog.dts | 38 +++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit cda816d163e08abb698f10ec32aa2d173ad93e7f Author: Heiner Kallweit Date: Sat Mar 25 14:14:08 2017 +0100 i2c: meson: improve and simplify interrupt handler The preceding changes in this patch series now allow to simplify the interrupt handler significantly. Signed-off-by: Heiner Kallweit Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-meson.c | 40 ++++++++++------------------------------ 1 file changed, 10 insertions(+), 30 deletions(-) commit 3911764cfbe7f5d229498d818aa2eff6e5611da8 Author: Heiner Kallweit Date: Sat Mar 25 14:12:04 2017 +0100 i2c: meson: remove meson_i2c_write_tokens meson_i2c_write_tokens is always called directly after meson_i2c_prepare_xfer (and only then). So we can simplify the code by removing meson_i2c_write_tokens and moving the two statements of meson_i2c_write_tokens to the end of meson_i2c_prepare_xfer. Signed-off-by: Heiner Kallweit Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-meson.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 3f205d7b47611f82316776c9ef7317525242307b Author: Heiner Kallweit Date: Sat Mar 25 14:11:08 2017 +0100 i2c: meson: don't create separate token chain just for the stop command We can directly add the stop token to the token chain including the last transfer chunk. This is more efficient than creating a separate token chain just for the stop command. And it allows us to get rid of state STATE_STOP completely. Signed-off-by: Heiner Kallweit Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-meson.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) commit 38ed55ca9ec2808ed7ee5183bec1f4e7187d3ea2 Author: Heiner Kallweit Date: Sat Mar 25 14:10:08 2017 +0100 i2c: meson: improve interrupt handler and detect spurious interrupts If state is STATE_IDLE no interrupt should occur. Return IRQ_NONE if such a spurious interrupt is detected. Not having to take care of STATE_IDLE later in the interrupt handler allows to further simplify the interrupt handler in subsequent patches of this series. In addition move resetting REG_CTRL_START bit to the start of the interrupt handler to ensure that the start bit is always reset. Currently the start bit is not reset for STATE_STOP because i2c->state is set to STATE_IDLE. Signed-off-by: Heiner Kallweit Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-meson.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit e4d6bc380c9a3dd955a2c8c6c8856e913b1b42cb Author: Heiner Kallweit Date: Sat Mar 25 14:09:03 2017 +0100 i2c: meson: remove variable count from meson_i2c_xfer Variable count has always the same value as i, so we don't need it. Signed-off-by: Heiner Kallweit Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-meson.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 47bb8f71caba9f3c424d35a2ac18428aaa85348a Author: Heiner Kallweit Date: Sat Mar 25 14:07:57 2017 +0100 i2c: meson: use full 12 bits for clock divider The clock divider has 12 bits, splitted into a 10 bit field and a 2 bit field. The extra 2 bits aren't used currently. Change this to use the full 12 bits and warn if the requested frequency is too low. Signed-off-by: Heiner Kallweit Acked-by: Jerome Brunet Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-meson.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 39b2ca68537aaf013ad192eb1c9e6b88e267d257 Author: Heiner Kallweit Date: Sat Mar 25 14:06:35 2017 +0100 i2c: meson: use i2c core for DT clock-frequency parsing We don't have to parse the DT manually to retrieve the bus frequency and we don't have to maintain an own default for the bus frequency. Let the i2c core do this for us. Signed-off-by: Heiner Kallweit Reviewed-by: Jerome Brunet Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-meson.txt | 2 ++ drivers/i2c/busses/i2c-meson.c | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) commit 09af1c2fa490169c40cbd153c5b83b5a70a0ec4b Author: Heiner Kallweit Date: Sat Mar 25 14:04:42 2017 +0100 i2c: meson: set clock divider in probe instead of setting it for each transfer The bus frequency is fixed to what is set DT, therefore we can set the clock divider in probe already and we don't have to set it for each transfer. Signed-off-by: Heiner Kallweit Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-meson.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit a55cc70af61bb97f76cd4f8ab0fce979c6d0cd42 Author: Heiner Kallweit Date: Sat Mar 25 14:01:32 2017 +0100 i2c: meson: remove member irq from struct meson_i2c Member irq can be replaced with a local variable in probe because it's nowhere else accessed. Signed-off-by: Heiner Kallweit Reviewed-by: Jerome Brunet Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-meson.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 8edf52a1e92d24fa42425b100d8621874cf172e1 Author: Heiner Kallweit Date: Sat Mar 25 13:58:30 2017 +0100 i2c: meson: use min instead of min_t where min_t isn't needed Use min instead of min_t where min_t isn't needed. Signed-off-by: Heiner Kallweit Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-meson.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 47d752076a92c67f548faa018efd7d4ac51f17f7 Author: Colin Ian King Date: Thu Mar 30 10:58:08 2017 +0100 block/sed-opal: fix spelling mistake: "Lifcycle" -> "Lifecycle" trivial fix to spelling mistake in pr_err error message Signed-off-by: Colin Ian King Signed-off-by: Jens Axboe block/sed-opal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88f31b1d5c27f596ad7ae8048a52e0ef20e46104 Merge: 59bc516 16c86ef Author: Arnd Bergmann Date: Thu Mar 30 17:22:40 2017 +0200 Merge tag 'gemini-multiplat-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into next/soc Pull "Gemini multiplatform updates" from Linus Walleij: - Select the poweroff driver so the system can properly shut down. This driver is merged in the power tree. - Select the right Faraday GPIO block (we renamed it). - Do not select SERIAL_OF_PLATFORM that just create Kconfig warnings on us. We'll put that into the defconfig instead. * tag 'gemini-multiplat-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: gemini: don't select SERIAL_OF_PLATFORM ARM: gemini: select the right GPIO block ARM: gemini: select gemini poweroff commit 7b81ef8b14f80033e4a4168d199a0f5fd79b9426 Author: Mikulas Patocka Date: Tue Mar 28 12:53:39 2017 -0400 dm raid: select the Kconfig option CONFIG_MD_RAID0 Since the commit 0cf4503174c1 ("dm raid: add support for the MD RAID0 personality"), the dm-raid subsystem can activate a RAID-0 array. Therefore, add MD_RAID0 to the dependencies of DM_RAID, so that MD_RAID0 will be selected when DM_RAID is selected. Fixes: 0cf4503174c1 ("dm raid: add support for the MD RAID0 personality") Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 59bc516c8bfbcc0f3afb124ec98174b5e2346c53 Merge: 2235ac9 f0e6876 Author: Arnd Bergmann Date: Thu Mar 30 17:15:51 2017 +0200 Merge tag 'omap-for-v4.12/soc-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc Pull "SoC changes for omaps for v4.12 merge window" from Tony Lindgren: - Drop PM_SUSPEND_STANDBY - Clean up hwmod code in preparation to eventually dynamically allocating hwmod data based on device tree data - Implement hwmod workaround for dra7 DCAN1 and OTG module to prevent clockdomain from entering HW_AUTO - Configure clockdomain and hwmod for dm81xx SATA - Mark omap_init_rng as __init * tag 'omap-for-v4.12/soc-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: mark omap_init_rng as __init ARM: OMAP2+: dm81xx: Add clkdm and hwmod for SATA ARM: DRA7: hwmod_data: Prevent wait_target_disable error for usb_otg_ss ARM: DRA7: hwmod: Fix DCAN1 stuck in transition ARM: OMAP2+ hwmod: Allow modules to disable HW_AUTO ARM: OMAP2+: omap_hwmod: provide space for more hwmod flags ARM: OMAP2+: Make hwmod clkdm_name const ARM: OMAP2+: Remove unused CLOCKACT_TEST_ICLK ARM: OMAP2+: Use list_for_each_entry for hwmod slave_ports ARM: OMAP2+: Remove mostly unused hwmod linkspace ARM: OMAP: PM: Drop useless checks for PM_SUSPEND_STANDBY commit 0152790881d4d1c290d64b876beb1e3978872a1e Merge: d5ac992 ab7090f Author: Arnd Bergmann Date: Thu Mar 30 17:09:16 2017 +0200 Merge tag 'mvebu-soc-4.12-1' of git://git.infradead.org/linux-mvebu into next/fixes-non-critical Pull "mvebu soc for 4.12 (part 1)" from Gregory CLEMENT: Update maintainer entry for Dove by adding more files * tag 'mvebu-soc-4.12-1' of git://git.infradead.org/linux-mvebu: MAINTAINERS: Add file patterns for dove device tree bindings commit 2235ac90e43a75cc9d5c065215fb9f1c6febb17b Merge: 736d830 9922848 Author: Arnd Bergmann Date: Thu Mar 30 17:08:34 2017 +0200 Merge tag 'davinci-for-v4.12/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/soc Pull "DaVinci SoC updates for v4.12" from Sekhar Nori: v4.12 SoC updates for DaVinci include necessary pdata-quirks to make video capture and display work on da850. VPIF driver which supports video capture and display on da850 is a legacy driver. It does not have DT equavalents for all things that are used on platform data. Attempts were made to pass data via DT[1], but linux-media does not yet have a good way of describing subdevices in device tree. This is work in progress. As soon as bindings are defined and implementation is available, we can shift to using that. For now we are stuck with using pdata. The pull request also has some clean-up for PM, and a fix for pdata quirks mechanism. [1] https://marc.info/?l=devicetree&m=147982998517384 * tag 'davinci-for-v4.12/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: add pdata-quirks for da850-evm vpif display ARM: da850-evm: add a fixed regulator for the UI board IO expander ARM: davinci: da8xx: add pdata-quirks for VPIF capture ARM: davinci: da8xx: add OF_DEV_AUXDATA() for vpif ARM: davinci: board-da850-evm: add I2C ID for VPIF ARM: davinci: allow having multiple pdata-quirks ARM: davinci: PM: Drop useless check for PM_SUSPEND_STANDBY commit d5ac992763d8de6c0ad6069df53a42f32a34c8b4 Merge: c02ed2e b44327d Author: Arnd Bergmann Date: Thu Mar 30 17:00:34 2017 +0200 Merge tag 'oxnas-arm-soc-for-4.12' of https://github.com/OXNAS/linux into next/fixes-non-critical Pull "ARM: OXNAS SoC update for 4.12" from Neil Armstrong: - Fix OX820 Kconfig * tag 'oxnas-arm-soc-for-4.12' of https://github.com/OXNAS/linux: ARM: oxnas: remove redundant select CPU_V6K commit 37096003c8a7de5d24c6cf86234004c635fdd617 Author: Al Viro Date: Tue Mar 28 15:06:24 2017 -0400 s390: get rid of zeroing, switch to RAW_COPY_USER [folded a fix from Martin] Signed-off-by: Al Viro arch/s390/Kconfig | 1 + arch/s390/include/asm/uaccess.h | 120 +++------------------------------------- arch/s390/lib/uaccess.c | 68 ++++++++--------------- 3 files changed, 33 insertions(+), 156 deletions(-) commit 17ab792ab1c10019ecc6ed594b6a6aae4cb52f78 Author: Chris Wilson Date: Thu Mar 30 14:48:20 2017 +0100 drm/i915: Drop verbose and archaic "ring" from our internal engine names We pretty print the name of an engine in several places, mostly for debug, but also in the GPU hang report. Using "ring" in the name is archaic (we call those engines now to differentiate them from the multiple rings of commands we execute on each engine), quite verbose and often tautological. We run out of room in our GPU hang report for instance if we have more than a couple of engines hung simultaneously. Bit the bullet and update the strings to reflect the common internal names. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170330134820.12273-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_engine_cs.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 414d06ace9cca3725b6c2072e1951e1e03807f63 Merge: 97da385 14e21cb Author: Arnd Bergmann Date: Thu Mar 30 16:16:28 2017 +0200 Merge tag 'tee-drv-for-4.12' of git://git.linaro.org:/people/jens.wiklander/linux-tee into next/tee Pull "generic TEE subsystem for v4.12" Introduce generic TEE subsystem: - the TEE subsystem itself - an OP-TEE driver using the subsystem - optee bindings - optee node for hi6220-hikey.dts * tag 'tee-drv-for-4.12' of git://git.linaro.org:/people/jens.wiklander/linux-tee: arm64: dt: hikey: Add optee node Documentation: tee subsystem and op-tee driver tee: add OP-TEE driver tee: generic TEE subsystem dt/bindings: add bindings for optee commit f5f4c615982ddf9b898439cd039e5af6697c1c3e Author: Chris Wilson Date: Thu Mar 30 15:08:32 2017 +0100 drm: Convert cmpxchg(bool) back to a two step operation ARM v6 (at least) only allows cmpxchg on 32bit variables which doesn't always include the bool type. drivers/built-in.o: In function `vblank_disable_and_save': imx-ocotp.c:(.text+0xb45e8): undefined reference to `__bad_cmpxchg' Makefile:986: recipe for target 'vmlinux' failed Reported-by: kbuild test robot Reported-by: Leonard Crestez Fixes: 43dc7fe2b211 ("drm: Mark up accesses of vblank->enabled outside of its spinlock") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Daniel Vetter Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170330140832.32377-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_irq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3e06eb3dacdff52749df85694cf6bc48283973c6 Author: Minchan Kim Date: Thu Mar 30 14:20:45 2017 +0900 block: do not put mq context in blk_mq_alloc_request_hctx In blk_mq_alloc_request_hctx, blk_mq_sched_get_request doesn't get sw context so we don't need to put the context with blk_mq_put_ctx. Unless, we will see preempt counter underflow. Cc: Omar Sandoval Signed-off-by: Minchan Kim Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe block/blk-mq.c | 1 - 1 file changed, 1 deletion(-) commit a596a877fde0b34e622dbf123f361dacd086cd6e Author: Colin Ian King Date: Thu Mar 30 10:54:40 2017 +0100 perf utils: Fix spelling mistake: "Invalud" -> "Invalid" Trivial fix to spelling mistake in pr_debug message. Signed-off-by: Colin King Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Krister Johansen Cc: Peter Zijlstra Cc: kernel-janitors@vger.kernel.org Link: http://lkml.kernel.org/r/20170330095440.19444-1-colin.king@canonical.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5054a98bce49ab2956e0dbc3fdfd6345716b16b Author: Leonard Crestez Date: Wed Mar 29 13:48:02 2017 +0300 ARM: imx_v6_v7_defconfig: Select SMSC_PHY The imx6sl-evk board has a LAN8720A ethernet phy supported by SMSC_PHY. Add this driver to the default imx config since the device is present on one of the evaluation boards. This used to work mostly fine with the generic phy driver until commit 0878fff1f42c ("net: phy: Do not perform software reset for Generic PHY"). The fact that soft reset is no longer performed apparently causes RX to sometimes failes which can cause netboot to timeout on DHCP. This is eventually retried and it works after link up/down but can takes 90 seconds to reach the login prompt. This was generated with "make savedefconfig" and it includes a few additional minor cleanups. Signed-off-by: Leonard Crestez Reviewed-by: Fabio Estevam Acked-by: Florian Fainelli Acked-by: Fugang Duan Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 05506b5be081b728353f1612b05c8ff689772832 Author: Chris Wilson Date: Thu Mar 30 12:16:14 2017 +0100 drm/i915: Use a dummy timeline name for a signaled fence Michał Winiarski pointed out that the debugging infrastructure (such as trace_dma_fence_release) likes to pretty print the timeline name, long after we have freed the timeline. Our timelines currently live as part of the GTT (due to the strict ordering we currently use through each) which belong to the context. We aim to free the context and release its hardware resources as soon as we able to (i.e. when the last fence/request using it has been signaled and retired). As the .get_timeline_name is purely a debug feature, rather than extending the lifetime of the context, or splitting it into many different release phases just to keep the name around, replace the timeline name with a constant after the fence has been signaled. This avoids the potential use-after-free. Reported-by: Krzysztof Olinski Fixes: 80b204bce8f2 ("drm/i915: Enable multiple timelines") Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Joonas Lahtinen Cc: # v4.10+ Link: http://patchwork.freedesktop.org/patch/msgid/20170330111614.29757-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/i915_gem_request.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit a69035ebdf385e1f69d824937f3104801b7fa8fb Merge: 228ec87 b35f34d Author: Daniel Vetter Date: Thu Mar 30 15:17:44 2017 +0200 Merge tag 'gvt-next-2017-03-30' of https://github.com/01org/gvt-linux into drm-intel-next-queued gvt-next-2017-03-30 - Add mdev attribute group for per-vgpu info - Time slice based vGPU scheduling QoS support (Gao Ping) - Initial KBL support for E3 server (Han Xu) - other misc. Link: http://patchwork.freedesktop.org/patch/msgid/20170330100516.dkavi3rtlsmnoepi@zhen-hp.sh.intel.com Signed-off-by: Daniel Vetter commit e24113769960980579610ecfd657bb17f19373a3 Author: Arushi Singhal Date: Wed Mar 29 20:27:52 2017 +0530 ipvs: remove unused variable This patch uses the following coccinelle script to remove a variable that was simply used to store the return value of a function call before returning it: @@ identifier len,f; @@ -int len; ... when != len when strict -len = +return f(...); -return len; Signed-off-by: Arushi Singhal Signed-off-by: Simon Horman net/netfilter/ipvs/ip_vs_ftp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 848850a3e9161e2cdcbb5cef7edc21ba49252ad1 Author: Varsha Rao Date: Tue Mar 28 16:06:49 2017 +0530 netfilter: ipvs: Replace kzalloc with kcalloc. Replace kzalloc with kcalloc. As kcalloc is preferred for allocating an array instead of kzalloc. This patch fixes the checkpatch issue. Signed-off-by: Varsha Rao net/netfilter/ipvs/ip_vs_sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 41390895e50bc4f28abe384c6b35ac27464a20ec Author: Florian Westphal Date: Tue Mar 28 10:31:20 2017 +0200 netfilter: ipvs: don't check for presence of nat extension Check for the NAT status bits, they are set once conntrack needs NAT in source or reply direction, this is slightly faster than nfct_nat() as that has to check the extension area. Signed-off-by: Florian Westphal net/netfilter/ipvs/ip_vs_ftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d14a39edf757f5bdd73cf25d0155d7cfb271e782 Author: Geert Uytterhoeven Date: Mon Mar 13 11:28:39 2017 +0100 pinctrl: sh-pfc: r8a7795: Add SCIF_CLK support Add pins, groups, and a function for SCIF_CLK on R-Car H3 ES2.0. SCIF_CLK is the external clock source for the Baud Rate Generator for External Clock (BRG) on (H)SCIF serial ports. Extracted from a big patch in the BSP by Takeshi Kihara. Signed-off-by: Geert Uytterhoeven Cc: Takeshi Kihara drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit e7ad4d3c1dd9dd6881d4470dd6586d5cc84b8e0c Author: Geert Uytterhoeven Date: Mon Mar 13 11:28:33 2017 +0100 pinctrl: sh-pfc: r8a7795: Add SCIF support Add pins, groups, and functions for all SCIF serial ports on R-Car H3 ES2.0. Extracted from a big patch in the BSP by Takeshi Kihara. Signed-off-by: Geert Uytterhoeven Cc: Takeshi Kihara drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 275 +++++++++++++++++++++++++++++++++++ 1 file changed, 275 insertions(+) commit b205914c8f822ef2464b741c64e892823d685ad6 Author: Geert Uytterhoeven Date: Mon Oct 3 14:49:57 2016 +0200 pinctrl: sh-pfc: r8a7795: Add support for R-Car H3 ES2.0 The Pin Function Controller module in the R-Car H3 ES2.0 differs from ES1.x in many ways. The goal is twofold: 1. Support both the ES1.x and ES2.0 SoC revisions in a single binary for now, 2. Make it clear which code supports ES1.x, so it can easily be identified and removed later, when production SoCs are deemed ubiquitous. Hence this patch: 1. Extracts the support for R-Car H3 ES1.x into a separate file, as the differences are quite large, 2. Adds code for detecting the SoC revision at runtime using the new soc_device_match() API, and selecting pinctrl tables for the actual SoC revision, 3. Replaces the core register and bitfield definitions by their counterparts for R-Car H3 ES2.0. The addition of pins, groups, and functions for the various on-chip devices is left to subsequent patches. The R-Car H3 ES2.0 register and bitfield definitions were extracted from a patch in the BSP by Takeshi Kihara. Signed-off-by: Geert Uytterhoeven Cc: Takeshi Kihara drivers/pinctrl/sh-pfc/Makefile | 1 + drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 5705 ++++++++++++++++++++++++++++++ drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 4780 +++++-------------------- drivers/pinctrl/sh-pfc/sh_pfc.h | 1 + 4 files changed, 6603 insertions(+), 3884 deletions(-) commit bb1953067c05be30a605ee1d5b05a2677735bb37 Author: Geert Uytterhoeven Date: Fri Mar 10 12:13:37 2017 +0100 clk: renesas: rcar-gen3-cpg: Add support for RCLK on R-Car H3 ES2.0 Starting with R-Car H3 ES2.0, the parent of RCLK is selected using MD28. Add support for that, but retain the old behavior for R-Car H3 ES1.x and M3-W ES1.0 using a quirk. Inspired by a patch by Takeshi Kihara in the BSP. Signed-off-by: Geert Uytterhoeven Cc: Takeshi Kihara drivers/clk/renesas/rcar-gen3-cpg.c | 38 ++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) commit 5573d194128b47334e3edb2db87cb471449d445a Author: Geert Uytterhoeven Date: Thu Sep 29 14:36:11 2016 +0200 clk: renesas: r8a7795: Add support for R-Car H3 ES2.0 The Clock Pulse Generator / Module Standby and Software Reset module in R-Car H3 ES2.0 differs from ES1.x in the following areas: - More core clocks (S0D2, S0D3, S0D6, S0D8, S0D12), - Different parent clocks for AUDMAC, EtherAVB, FCP, FDP, IMR, SYS-DMAC, VIN, VSPB, VSPI, - Removal of modules CSI21, FCPCI, FCPF2, FCPVD3, FCPVI2, FDP1-2, USB3-IF1, VSPD3, VSPI2, - Addition of modules EHCI3, HS-USB-IF3, USB-DMAC3-0, USB-DMAC3-1. The goal is twofold: 1. Support both the ES1.x and ES2.0 SoC revisions in a single binary for now, 2. Make it clear which code supports ES1.x, so it can easily be identified and removed later, when production SoCs are deemed ubiquitous. This is achieved by: - Updating the clock tables for the latest revision (ES2.0), but not removing clocks that only exist on earlier revisions (ES1.x), - Detecting the SoC revision at runtime using the new soc_device_match() API, and fixing up the clocks tables to match the actual SoC revision, by: - NULLifying core and module clocks of modules that do not exist, - Reparenting module clocks that have a different parent on ES1.x. Based on R-Car Gen3 Hardware User's Manual rev. 0.53E. Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7795-cpg-mssr.c | 201 +++++++++++++++++++++++++-------- 1 file changed, 151 insertions(+), 50 deletions(-) commit 89f1b1c614253d7ea57543f769d93fced99d4d05 Author: Geert Uytterhoeven Date: Thu Sep 29 13:06:15 2016 +0200 clk: renesas: Add r8a7795 ES2.0 CPG Core Clock Definitions Add all R-Car H3 ES2.0 Clock Pulse Generator Core Clock Outputs, as listed in Table 8.2a ("List of Clocks [R-Car H3]") of the R-Car Gen3 Hardware User's Manual rev. 0.53E. Signed-off-by: Geert Uytterhoeven include/dt-bindings/clock/r8a7795-cpg-mssr.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 48d0341e41870bcfc42206d38e00a6b1c2fea929 Author: Geert Uytterhoeven Date: Thu Sep 29 14:47:58 2016 +0200 clk: renesas: cpg-mssr: Add support for fixing up clock tables The same SoC may have different clocks and/or module clock parents, depending on SoC revision. One option is to use different sets of clock tables for each SoC revision. However, if the differences are small, it is much more space-efficient to have a single set of clock tables, and fix those up at runtime instead. Hence provide three helpers: - Two helpers to NULLify core and module clocks that do not exist on some revisions (NULLified clocks are skipped during the registration phase), - One helper to reparent module clocks that have different clock parents. Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/renesas-cpg-mssr.c | 50 ++++++++++++++++++++++++++++++++++ drivers/clk/renesas/renesas-cpg-mssr.h | 22 +++++++++++++++ 2 files changed, 72 insertions(+) commit 96f24474a82635810be6943f1bd3fb9c1b70d9d0 Author: David Lechner Date: Mon Mar 27 20:12:46 2017 -0500 ARM: dts: da850: move spi0_cs3_pin pinconf node This moves the spi0_cs3_pin pinconf node from the LEGO EV3 file to the common DA850 include file. This node is applicable to any board, and therefore belongs in the common file. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lego-ev3.dts | 7 ------- arch/arm/boot/dts/da850.dtsi | 6 ++++++ 2 files changed, 6 insertions(+), 7 deletions(-) commit 2e5d77ef042a22fa1aa393a294999d28f7136d27 Author: Sekhar Nori Date: Wed Mar 22 19:21:02 2017 +0100 ARM: davinci_all_defconfig: convert to use libata PATA IDE subsystem has been deprecated since 2009 and the majority (if not all) of Linux distributions have switched to use libata for ATA support exclusively. However there are still some users (mostly old or/and embedded non-x86 systems) that have not converted from using IDE subsystem to libata PATA drivers. This doesn't seem to be good thing in the long-term for Linux as while there is less and less PATA systems left in use: * testing efforts are divided between two subsystems * having duplicate drivers for same hardware confuses users This patch converts davinci_all_defconfig to use libata PATA drivers. Signed-off-by: Sekhar Nori [b.zolnierkie: split from bigger patch + added patch description] Signed-off-by: Bartlomiej Zolnierkiewicz arch/arm/configs/davinci_all_defconfig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 28d4d1d0e49b4ac4d12861a64f45101f36fbfab8 Author: Sekhar Nori Date: Wed Mar 22 19:21:01 2017 +0100 ARM: davinci: add pata_bk3710 libata driver support Signed-off-by: Sekhar Nori [b.zolnierkie: split from bigger patch + preserved old driver support] Signed-off-by: Bartlomiej Zolnierkiewicz arch/arm/mach-davinci/board-dm644x-evm.c | 3 ++- arch/arm/mach-davinci/board-dm646x-evm.c | 3 ++- arch/arm/mach-davinci/board-neuros-osd2.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit 396ff64d44dbcbd4e6c06c005c4e931bd4b35e4d Author: Bartlomiej Zolnierkiewicz Date: Wed Mar 22 19:21:00 2017 +0100 pata_bk3710: clear status bits of BMISP on chipset initialization Clear IORDYINT, INTRSTAT and DMAERROR bits of BMISP register (value '1' needs to be written to the bit to clear it). Suggested-by: Sergei Shtylyov Acked-by: Sergei Shtylyov Acked-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Sekhar Nori drivers/ata/pata_bk3710.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c217ff26b033efb5e27c0645e9f0778ea7a3a578 Author: Bartlomiej Zolnierkiewicz Date: Wed Mar 22 19:20:59 2017 +0100 pata_bk3710: disable IORDY Timer on chipset initialization Disable IORDY Timer as the driver doesn't handle IORDY Timer interrupt anyway. Suggested-by: Sergei Shtylyov Acked-by: Sergei Shtylyov Acked-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Sekhar Nori drivers/ata/pata_bk3710.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e5afdf9dd515a9446c009f44f99f9bc2f91b89a7 Author: Alexey Kardashevskiy Date: Wed Mar 22 15:21:50 2017 +1100 powerpc/vfio_spapr_tce: Add reference counting to iommu_table So far iommu_table obejcts were only used in virtual mode and had a single owner. We are going to change this by implementing in-kernel acceleration of DMA mapping requests. The proposed acceleration will handle requests in real mode and KVM will keep references to tables. This adds a kref to iommu_table and defines new helpers to update it. This replaces iommu_free_table() with iommu_tce_table_put() and makes iommu_free_table() static. iommu_tce_table_get() is not used in this patch but it will be in the following patch. Since this touches prototypes, this also removes @node_name parameter as it has never been really useful on powernv and carrying it for the pseries platform code to iommu_free_table() seems to be quite useless as well. This should cause no behavioral change. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Acked-by: Alex Williamson Signed-off-by: Michael Ellerman arch/powerpc/include/asm/iommu.h | 5 +++-- arch/powerpc/kernel/iommu.c | 27 ++++++++++++++++++++++----- arch/powerpc/platforms/powernv/pci-ioda.c | 14 +++++++------- arch/powerpc/platforms/powernv/pci.c | 1 + arch/powerpc/platforms/pseries/iommu.c | 3 ++- arch/powerpc/platforms/pseries/vio.c | 2 +- drivers/vfio/vfio_iommu_spapr_tce.c | 2 +- 7 files changed, 37 insertions(+), 17 deletions(-) commit 11edf116e3a6352cfee6b1437d41603c9aff79c9 Author: Alexey Kardashevskiy Date: Wed Mar 22 15:21:49 2017 +1100 powerpc/iommu/vfio_spapr_tce: Cleanup iommu_table disposal At the moment iommu_table can be disposed by either calling iommu_table_free() directly or it_ops::free(); the only implementation of free() is in IODA2 - pnv_ioda2_table_free() - and it calls iommu_table_free() anyway. As we are going to have reference counting on tables, we need an unified way of disposing tables. This moves it_ops::free() call into iommu_free_table() and makes use of the latter. The free() callback now handles only platform-specific data. As from now on the iommu_free_table() calls it_ops->free(), we need to have it_ops initialized before calling iommu_free_table() so this moves this initialization in pnv_pci_ioda2_create_table(). This should cause no behavioral change. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Acked-by: Alex Williamson Signed-off-by: Michael Ellerman arch/powerpc/kernel/iommu.c | 4 ++++ arch/powerpc/platforms/powernv/pci-ioda.c | 10 ++++------ drivers/vfio/vfio_iommu_spapr_tce.c | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) commit a540aa56ba3d29084f28710c8b93cc9c3c422943 Author: Alexey Kardashevskiy Date: Wed Mar 22 15:21:48 2017 +1100 powerpc/powernv/iommu: Add real mode version of iommu_table_ops::exchange() In real mode, TCE tables are invalidated using special cache-inhibited store instructions which are not available in virtual mode This defines and implements exchange_rm() callback. This does not define set_rm/clear_rm/flush_rm callbacks as there is no user for those - exchange/exchange_rm are only to be used by KVM for VFIO. The exchange_rm callback is defined for IODA1/IODA2 powernv platforms. This replaces list_for_each_entry_rcu with its lockless version as from now on pnv_pci_ioda2_tce_invalidate() can be called in the real mode too. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Michael Ellerman arch/powerpc/include/asm/iommu.h | 7 +++++++ arch/powerpc/kernel/iommu.c | 25 +++++++++++++++++++++++++ arch/powerpc/platforms/powernv/pci-ioda.c | 26 +++++++++++++++++++++++++- 3 files changed, 57 insertions(+), 1 deletion(-) commit 76a40ca82f3498da2683b3d5efa9b24d5ffaeecc Author: Bartlomiej Zolnierkiewicz Date: Wed Mar 22 19:20:58 2017 +0100 ata: add Palmchip BK3710 PATA controller driver Add Palmchip BK3710 PATA controller driver. Acked-by: Sergei Shtylyov Acked-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Sekhar Nori drivers/ata/Kconfig | 9 ++ drivers/ata/Makefile | 1 + drivers/ata/pata_bk3710.c | 382 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 392 insertions(+) commit 228ec87ccd040b620c467cd61d594bfaa4f8a12e Author: Chris Wilson Date: Thu Mar 30 09:53:41 2017 +0100 drm/i915: Ironlake do_idle_maps w/a may be called w/o struct_mutex Since commit 1233e2db199d ("drm/i915: Move object backing storage manipulation to its own locking"), i915_gem_object_put_pages() and specifically the i915_gem_gtt_finish_pages() may be called from outside of the struct_mutex and so we can no longer pass I915_WAIT_LOCKED to i915_gem_wait_for_idle. Fixes: 1233e2db199d ("drm/i915: Move object backing storage manipulation to its own locking") Signed-off-by: Chris Wilson Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: # v4.10+ Link: http://patchwork.freedesktop.org/patch/msgid/20170330085341.20311-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 905e0b5ef9690c5433b642f46f1d756bb374da17 Author: Colin Ian King Date: Thu Mar 30 11:01:25 2017 +0100 spi: loopback-test: fix spelling mistake: "minimam" -> "minimum" trivial fix to spelling mistake in dev_err error message Signed-off-by: Colin Ian King Signed-off-by: Mark Brown drivers/spi/spi-loopback-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f75b19ef99054736aa80b70dbdf2f7a86a22007 Author: Colin Ian King Date: Thu Mar 30 11:09:34 2017 +0100 ASoC: Intel: bxtn: fix spelling mistake: "Timout" -> "Timeout" trivial fix to spelling mistake in dev_err error message Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8991403ea0f3e5b59e08e37a7ac0af8ef4264e3 Author: Oscar Mateo Date: Tue Mar 28 09:53:47 2017 -0700 drm/i915/guc: Take enable_guc_loading check out of GEM core code The should happen as soon as possible, but always within the logic that depends on it (and not interrupting the top-level driver control flow). Cc: Chris Wilson Cc: Joonas Lahtinen Signed-off-by: Oscar Mateo Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1490720027-23234-1-git-send-email-oscar.mateo@intel.com drivers/gpu/drm/i915/i915_drv.c | 3 +-- drivers/gpu/drm/i915/i915_gem.c | 10 ++++------ drivers/gpu/drm/i915/intel_uc.c | 6 ++++++ 3 files changed, 11 insertions(+), 8 deletions(-) commit f56c9202b53be70fddc583e0f5f100e31ac6eb64 Author: Christopher Spinrath Date: Mon Mar 6 22:40:43 2017 +0100 drm/bridge: ti-tfp410: support hpd via gpio On some boards the hpd pin of a hdmi connector is wired up to a gpio pin. Since in the DRM world the tfp410 driver is responsible for handling the connector, add support for hpd gpios in this very driver. Reviewed-by: Jyri Sarha Signed-off-by: Christopher Spinrath Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/2e47786ab3d04078ae70d0c4064f7c4d@rwthex-s1-b.rwth-ad.de drivers/gpu/drm/bridge/ti-tfp410.c | 72 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 2 deletions(-) commit b79cbc55481ddc0b7cc68fb2072d93ee7eefbf8f Author: Aaron Armstrong Skomra Date: Wed Mar 29 13:07:36 2017 -0700 HID: wacom: Bamboo One Medium does not have touch Commit 3b164a00a9fc ("HID: wacom: Cleanup unsupported device_type for BAMBOO_PT") cleaned up Bamboo devices which our driver falsely claimed had touch. Bamboo One Medium also does not have touch. Signed-off-by: Aaron Armstrong Skomra Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4f54a186667ffd19eac8e3f48c51d940a9b9784 Author: Hanjun Guo Date: Tue Mar 7 20:40:06 2017 +0800 ACPI: platform: setup MSI domain for ACPI based platform device By allowing platform MSI domain to be created on ACPI platforms, a platform device MSI domain can be set-up when it is probed. In order to do that, the MSI domain the platform device connects to should be retrieved, so the iort_get_platform_device_domain() is introduced to retrieve the domain from the IORT kernel layer. With the domain retrieved, we need a proper way to set the domain to platform device. Given that some platform devices (irqchips) require the MSI irqdomain to be their interrupt parent domain, the MSI irqdomain should be determined before platform device is probed but after the platform device is allocated which means that the code setting up the MSI irqdomain, ie acpi_configure_pmsi_domain() should be called in acpi_platform_notify() (that is triggered after adding a device but before the respective driver is probed) for the platform MSI domain code set-up path to work properly. Acked-by: Rafael J. Wysocki [for glue.c] Signed-off-by: Hanjun Guo [lorenzo.pieralisi@arm.com: rewrote commit log] Signed-off-by: Lorenzo Pieralisi Tested-by: Ming Lei Tested-by: Wei Xu Tested-by: Sinan Kaya Cc: Marc Zyngier Cc: Lorenzo Pieralisi Cc: Tomasz Nowicki drivers/acpi/arm64/iort.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/acpi/glue.c | 6 ++++++ include/linux/acpi_iort.h | 2 ++ 3 files changed, 58 insertions(+) commit 802b24b475e459e985681d6e0815ae6cb52e5560 Author: Matjaz Hegedic Date: Thu Mar 9 00:31:15 2017 +0100 HID: asus: change mapping from KEY_WLAN to KEY_RFKILL The input mapping code incorrectly maps the Airplane Mode button to KEY_WLAN, which stands for WiFi toggle, but doesn't affect Bluetooth (and other active radios) which is expected behavior for Airplane Mode. The fix replaces KEY_WLAN with the more appropriate KEY_RFKILL. The declared usage code 0x88 corresponds to Airplane Mode button on all keyboards handled by hid-asus (I2C netbook keyboards and USB RoG series keyboards), so the fix doesn't introduce any inconsistencies across different models. Signed-off-by: Matjaz Hegedic Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-asus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0485b1ec280cb9b2b6ed6e44e999294b4c698182 Author: Matjaz Hegedic Date: Thu Mar 9 00:31:14 2017 +0100 HID: asus: ignore declared dummy usages Keyboards handled by hid-asus declare special key functions using a vendor-specific page, however, alongside legitimate key functions, dummy usages with seemingly arbitrary values are also declared and can lead to keyboards being detected as pointer devices by some software (such as X.org). In addition, for the I2C keyboard volume controls are separately declared in a Consumer Usage page, with the same dummy usage problem. The fix in 1989dada7ce0 ("HID: input: ignore System Control application usages if not System Controls") does not mitigate the problem described above, therefore dummy usages need to be ignored in the driver itself. This fix properly ignores dummy usages and introduces a quirk for custom handling of the Consumer Usages on the I2C keyboard. Signed-off-by: Matjaz Hegedic Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-asus.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit a93913e1496d6103ec0b76d8397fc04ece55f570 Author: Matjaz Hegedic Date: Thu Mar 9 00:31:13 2017 +0100 HID: asus: fix and generalize ambiguous preprocessor macros Before commits a1cbda7a65a7a ("HID: asus: drop dependency on I2C_HID") and 64a403c6555fd ("HID: asus: support Republic Of Gamers special keys") hid-asus only pertained to a single I2C keyboard model found in ASUS X205TA, F205TA, & X200HA. The aforementioned commits expanded this support to other ASUS laptop keyboard models. In order to clarify that existing keyboard and touchpad quirks only apply to the I2C devices, and not ASUS keyboards in general, I2C HID IDs and their corresponding quirk sets have been renamed. In addition, the latter commit introduced special key handling, which also applies to the I2C keyboard, not just Republic of Gamers series. Therefore, the rog_map_key_clear() macro is renamed to asus_map_key_clear() for the sake of generality. Signed-off-by: Matjaz Hegedic Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-asus.c | 38 +++++++++++++++++++------------------- drivers/hid/hid-core.c | 4 ++-- drivers/hid/hid-ids.h | 4 ++-- 3 files changed, 23 insertions(+), 23 deletions(-) commit 1caccc2565a83b79dd6e4af15bea35995487a379 Author: Chris Chiu Date: Wed Mar 1 15:48:51 2017 -0600 HID: asus: support Republic of Gamers special keys Add support for the special keys found on the internal keyboard of the Asus Republic of Gamers (ROG) laptop models GL553VD, GL553VE, GL753VD and GL753VE. Signed-off-by: Chris Chiu Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 5 ++++- drivers/hid/hid-asus.c | 38 ++++++++++++++++++++++++++++++++++++++ drivers/hid/hid-core.c | 2 ++ drivers/hid/hid-ids.h | 2 ++ 4 files changed, 46 insertions(+), 1 deletion(-) commit 7877474905460e084bdfa65a82b9280767cfbfd6 Author: Daniel Drake Date: Wed Mar 1 15:48:50 2017 -0600 HID: asus: drop dependency on I2C_HID There is nothing transport-specific in this driver, and we will now be adding support for some Asus USB devices too. Signed-off-by: Daniel Drake Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 1 - 1 file changed, 1 deletion(-) commit ae7c18380495ac5c14a614fdb6c452c3bf9148ac Author: Hanjun Guo Date: Tue Mar 7 20:40:05 2017 +0800 ACPI: platform-msi: retrieve devid from IORT For devices connecting to an ITS, the devices need to identify themself through a devid; this devid is represented in the IORT table in named component node [1] for platform devices, so this patch adds code that scans the IORT table to retrieve the devices devid. Add an IORT interface to collect ITS devices devid to carry out platform devices MSI mappings with IORT tables. [1]: https://static.docs.arm.com/den0049/b/DEN0049B_IO_Remapping_Table.pdf Signed-off-by: Hanjun Guo [lorenzo.pieralisi@arm.com: rewrote commit log/dropped ITS changes] Signed-off-by: Lorenzo Pieralisi Tested-by: Ming Lei Tested-by: Wei Xu Tested-by: Sinan Kaya Cc: Marc Zyngier Cc: Lorenzo Pieralisi Cc: Tomasz Nowicki Cc: Thomas Gleixner drivers/acpi/arm64/iort.c | 24 ++++++++++++++++++++++++ include/linux/acpi_iort.h | 1 + 2 files changed, 25 insertions(+) commit 959d973e9890150342df76160d966ab1270208df Author: Xiaolei Yu Date: Sat Mar 25 14:04:58 2017 +0800 HID: add two missing usages for digitizer They are part of HUTRR34 for multi-touch digitizers: 0x0E Device configuration CA 16.7 0x23 Device settings CL 16.7 Signed-off-by: Xiaolei Yu Signed-off-by: Jiri Kosina drivers/hid/hid-debug.c | 2 ++ include/linux/hid.h | 2 ++ 2 files changed, 4 insertions(+) commit 72f04b50d61c81a2cc3065d3b973e83827760515 Author: Zhou Chengming Date: Tue Mar 28 21:10:35 2017 +0800 livepatch: Reduce the time of finding module symbols It's reported that the time of insmoding a klp.ko for one of our out-tree modules is too long. ~ time sudo insmod klp.ko real 0m23.799s user 0m0.036s sys 0m21.256s Then we found the reason: our out-tree module used a lot of static local variables, so klp.ko has a lot of relocation records which reference the module. Then for each such entry klp_find_object_symbol() is called to resolve it, but this function uses the interface kallsyms_on_each_symbol() even for finding module symbols, so will waste a lot of time on walking through vmlinux kallsyms table many times. This patch changes it to use module_kallsyms_on_each_symbol() for modules symbols. After we apply this patch, the sys time reduced dramatically. ~ time sudo insmod klp.ko real 0m1.007s user 0m0.032s sys 0m0.924s Signed-off-by: Zhou Chengming Acked-by: Josh Poimboeuf Acked-by: Jessica Yu Acked-by: Miroslav Benes Signed-off-by: Jiri Kosina kernel/livepatch/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit bd283d2f66c28b30647c54537aff352a394c0bed Author: Javi Merino Date: Wed Mar 29 14:45:23 2017 +0100 drm: use .hword to represent 16-bit numbers The size of .word is the size of a word in the given platform, which for intel systems is 16-bits but other architectures use different sizes. However, .hword emits 16-bit numbers regardless of the platform (and despite the name). The quantities specified in EDID are platform independent, so they should work in spite of the default target of the cc you are using, so use .hword where EDID specifies 16-bit numbers. Cc: Carsten Emde Cc: David Airlie Acked-by: David Airlie Signed-off-by: Javi Merino Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1490795123-16851-1-git-send-email-javi.merino@kernel.org Documentation/EDID/edid.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a2e1319d1f496888c2eaca57fbfc17180b0dae95 Author: Maarten Lankhorst Date: Thu Mar 30 09:36:05 2017 +0200 Revert unrelated part of "drm: simplify the locking in the GETCRTC ioctl" v2 of the commit 2c77bb29d398 ("drm: simplify the locking in the GETCRTC ioctl") accidentally introduced a unrelated change in intel_display.c, revert the unrelated change. Signed-off-by: Maarten Lankhorst Fixes: 2c77bb29d398 ("drm: simplify the locking in the GETCRTC ioctl") Reported-by: Dhinakaran Pandiyan Reviewed-by: Dhinakaran Pandiyan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/6be47261-475f-c190-af56-c136677246d9@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 5 ----- 1 file changed, 5 deletions(-) commit 25df39f2cfd06a4b49ad592c5b7cba0cbf24e27f Author: Suravee Suthikulpanit Date: Wed Mar 22 02:02:42 2017 -0500 x86/events/amd/iommu: Enable support for multiple IOMMUs Add support for multiple IOMMUs to perf by exposing an AMD IOMMU PMU for each IOMMU found in the system via: /bus/event_source/devices/amd_iommu_x where x is the IOMMU index. This allows users to specify different events to be programmed into the performance counters of each IOMMU. Signed-off-by: Suravee Suthikulpanit [ Improve readability, shorten names. ] Signed-off-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Jörg Rödel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/1490166162-10002-11-git-send-email-Suravee.Suthikulpanit@amd.com Signed-off-by: Ingo Molnar arch/x86/events/amd/iommu.c | 112 ++++++++++++++++++++++++++++---------------- 1 file changed, 71 insertions(+), 41 deletions(-) commit cf25f904ef75aa7c25097eb4981bbc634bf5ff9e Author: Suravee Suthikulpanit Date: Fri Feb 24 02:48:21 2017 -0600 x86/events/amd/iommu: Add IOMMU-specific hw_perf_event struct Current AMD IOMMU perf PMU inappropriately uses the hardware struct inside the union in struct hw_perf_event, extra_reg in particular. Instead, introduce an AMD IOMMU-specific struct with required parameters to be programmed into the IOMMU performance counter control register. Update the pasid field from 16 to 20 bits while at it. Signed-off-by: Suravee Suthikulpanit [ Fixup macros, shorten get_next_avail_iommu_bnk_cntr() local vars, massage commit message. ] Signed-off-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Jörg Rödel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/1487926102-13073-10-git-send-email-Suravee.Suthikulpanit@amd.com Signed-off-by: Ingo Molnar arch/x86/events/amd/iommu.c | 113 ++++++++++++++++++++------------------------ include/linux/perf_event.h | 7 +++ 2 files changed, 57 insertions(+), 63 deletions(-) commit 51686546304fd7f778bb31bf7e2ae9bad6b1d21c Author: Suravee Suthikulpanit Date: Fri Feb 24 02:48:20 2017 -0600 x86/events/amd/iommu: Fix sysfs perf attribute groups Introduce static amd_iommu_attr_groups to simplify the sysfs attributes initialization code. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Jörg Rödel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/1487926102-13073-9-git-send-email-Suravee.Suthikulpanit@amd.com Signed-off-by: Ingo Molnar arch/x86/events/amd/iommu.c | 81 ++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 49 deletions(-) commit 1650dfd1a9bcde8fcfaab776887bb6f4e91830c3 Author: Suravee Suthikulpanit Date: Fri Feb 24 02:48:19 2017 -0600 x86/events, drivers/amd/iommu: Prepare for multiple IOMMUs support Currently, amd_iommu_pc_get_set_reg_val() cannot support multiple IOMMUs. Modify it to allow callers to specify an IOMMU. This is in preparation for supporting multiple IOMMUs. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Jörg Rödel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/1487926102-13073-8-git-send-email-Suravee.Suthikulpanit@amd.com Signed-off-by: Ingo Molnar arch/x86/events/amd/iommu.c | 38 ++++++++++++++++-------------------- arch/x86/events/amd/iommu.h | 9 +++++++-- drivers/iommu/amd_iommu_init.c | 43 +++++++++++++++++++++++------------------ drivers/iommu/amd_iommu_proto.h | 5 ----- 4 files changed, 48 insertions(+), 47 deletions(-) commit f5863a00e73c432b91e4efe1d68778b4ace6a892 Author: Suravee Suthikulpanit Date: Fri Feb 24 02:48:18 2017 -0600 x86/events/amd/iommu.c: Modify functions to query max banks and counters Currently, amd_iommu_pc_get_max_[banks|counters]() use end-point device ID to locate an IOMMU and check the reported max banks/counters. The logic assumes that the IOMMU_BASE_DEVID belongs to the first IOMMU, and uses it to acquire a reference to the first IOMMU, which does not work on certain systems. Instead, modify the function to take an IOMMU index, and use it to query the corresponding AMD IOMMU instance. Currently, hardcode the IOMMU index to 0 since the current AMD IOMMU perf implementation supports only a single IOMMU. A subsequent patch will add support for multiple IOMMUs, and will use a proper IOMMU index. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Jörg Rödel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/1487926102-13073-7-git-send-email-Suravee.Suthikulpanit@amd.com Signed-off-by: Ingo Molnar arch/x86/events/amd/iommu.c | 17 +++++++---------- arch/x86/events/amd/iommu.h | 9 ++++----- drivers/iommu/amd_iommu_init.c | 34 ++++++++++++++++++++-------------- drivers/iommu/amd_iommu_proto.h | 2 -- 4 files changed, 31 insertions(+), 31 deletions(-) commit 6b9376e30f42b902260371245f009bc05eb3fdfb Author: Suravee Suthikulpanit Date: Fri Feb 24 02:48:17 2017 -0600 x86/events, drivers/iommu/amd: Introduce amd_iommu_get_num_iommus() Introduce amd_iommu_get_num_iommus(), which returns the value of amd_iommus_present. The function is used to replace direct access to the variable, which is now declared as static. This function will also be used by AMD IOMMU perf driver. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Jörg Rödel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/1487926102-13073-6-git-send-email-Suravee.Suthikulpanit@amd.com Signed-off-by: Ingo Molnar arch/x86/events/amd/iommu.h | 2 ++ drivers/iommu/amd_iommu.c | 6 +++--- drivers/iommu/amd_iommu_init.c | 11 +++++++++-- drivers/iommu/amd_iommu_proto.h | 1 + drivers/iommu/amd_iommu_types.h | 3 --- 5 files changed, 15 insertions(+), 8 deletions(-) commit 0a6d80c70b9150d6a9cf466d41955e374c2c9fab Author: Suravee Suthikulpanit Date: Fri Feb 24 02:48:16 2017 -0600 drivers/iommu/amd: Clean up iommu_pc_get_set_reg() Clean up coding style and fix a bug in the 64-bit register read logic since it overwrites the upper 32-bit when reading the lower 32-bit. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Jörg Rödel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/1487926102-13073-5-git-send-email-Suravee.Suthikulpanit@amd.com Signed-off-by: Ingo Molnar drivers/iommu/amd_iommu_init.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit dc6ca5e47d44c11a111807208595ff6a8fcd2a83 Author: Suravee Suthikulpanit Date: Fri Feb 24 02:48:15 2017 -0600 x86/events/amd/iommu: Clean up perf_iommu_read() Fix coding style and use GENMASK_ULL(). Signed-off-by: Suravee Suthikulpanit Signed-off-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Jörg Rödel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/1487926102-13073-4-git-send-email-Suravee.Suthikulpanit@amd.com Signed-off-by: Ingo Molnar arch/x86/events/amd/iommu.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 6aad0c6269052a6114259deaf664ce350bf64fa2 Author: Suravee Suthikulpanit Date: Fri Feb 24 02:48:14 2017 -0600 x86/events/amd/iommu: Clean up bitwise operations Clean up register initialization and make use of BIT_ULL(x) where appropriate. This should not affect logic and functionality. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Jörg Rödel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/1487926102-13073-3-git-send-email-Suravee.Suthikulpanit@amd.com Signed-off-by: Ingo Molnar arch/x86/events/amd/iommu.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit f9573e53f123ee487cca737139f3a43897a6383e Author: Suravee Suthikulpanit Date: Fri Feb 24 02:48:13 2017 -0600 x86/events/amd/iommu: Declare pr_fmt() format Declare pr_fmt() format for perf/amd_iommu and remove unnecessary pr_debug() calls. Also check return value when _init_events_attrs() fails and issue an error message. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Jörg Rödel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/1487926102-13073-2-git-send-email-Suravee.Suthikulpanit@amd.com Signed-off-by: Ingo Molnar arch/x86/events/amd/iommu.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit d35869ba348d3f1ff3e6d8214fe0f674bb0e404e Author: Alexander Shishkin Date: Mon Feb 6 16:41:40 2017 +0200 perf/x86/intel/pt: Allow the disabling of branch tracing Now that Intel PT supports more types of trace content than just branch tracing, it may be useful to allow the user to disable branch tracing when it is not needed. The special case is BDW, where not setting BranchEn is not supported. This is slightly trickier than necessary, because up to this moment the driver has been setting BranchEn automatically and the userspace assumes as much. Instead of reversing the semantics of BranchEn, we introduce a 'passthrough' bit, which will forego the default and allow the user to set BranchEn to their heart's content. Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: vince@deater.net Link: http://lkml.kernel.org/r/20170206144140.14402-1-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/pt.c | 74 ++++++++++++++++++++++++++++++++++++++++++++-- arch/x86/events/intel/pt.h | 1 + 2 files changed, 73 insertions(+), 2 deletions(-) commit 57dd924e541a98219bf3a508623db2e0c07e75a7 Author: Chris Wilson Date: Fri Mar 10 10:57:33 2017 +0000 locking/ww-mutex: Limit stress test to 2 seconds Use a timeout rather than a fixed number of loops to avoid running for very long periods, such as under the kbuilder VMs. Reported-by: kernel test robot Signed-off-by: Chris Wilson Signed-off-by: Peter Zijlstra (Intel) Cc: Boqun Feng Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170310105733.6444-1-chris@chris-wilson.co.uk Signed-off-by: Ingo Molnar kernel/locking/test-ww_mutex.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit c69f203df3e61414fbf1a66d130abfd7c3bf3fd0 Merge: 3906a13 fe82203 Author: Ingo Molnar Date: Thu Mar 30 09:48:45 2017 +0200 Merge branch 'linus' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit a481db34b9beb7a9647c23f2320dd38a2b1d681f Author: Yuyang Du Date: Mon Feb 13 05:44:23 2017 +0800 sched/fair: Optimize ___update_sched_avg() The main PELT function ___update_load_avg(), which implements the accumulation and progression of the geometric average series, is implemented along the following lines for the scenario where the time delta spans all 3 possible sections (see figure below): 1. add the remainder of the last incomplete period 2. decay old sum 3. accumulate new sum in full periods since last_update_time 4. accumulate the current incomplete period 5. update averages Or: d1 d2 d3 ^ ^ ^ | | | |<->|<----------------->|<--->| ... |---x---|------| ... |------|-----x (now) load_sum' = (load_sum + weight * scale * d1) * y^(p+1) + (1,2) p weight * scale * 1024 * \Sum y^n + (3) n=1 weight * scale * d3 * y^0 (4) load_avg' = load_sum' / LOAD_AVG_MAX (5) Where: d1 - is the delta part completing the remainder of the last incomplete period, d2 - is the delta part spannind complete periods, and d3 - is the delta part starting the current incomplete period. We can simplify the code in two steps; the first step is to separate the first term into new and old parts like: (load_sum + weight * scale * d1) * y^(p+1) = load_sum * y^(p+1) + weight * scale * d1 * y^(p+1) Once we've done that, its easy to see that all new terms carry the common factors: weight * scale If we factor those out, we arrive at the form: load_sum' = load_sum * y^(p+1) + weight * scale * (d1 * y^(p+1) + p 1024 * \Sum y^n + n=1 d3 * y^0) Which results in a simpler, smaller and faster implementation. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bsegall@google.com Cc: dietmar.eggemann@arm.com Cc: matt@codeblueprint.co.uk Cc: morten.rasmussen@arm.com Cc: pjt@google.com Cc: umgwanakikbuti@gmail.com Cc: vincent.guittot@linaro.org Link: http://lkml.kernel.org/r/1486935863-25251-3-git-send-email-yuyang.du@intel.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 212 +++++++++++++++++++++++++++++----------------------- 1 file changed, 118 insertions(+), 94 deletions(-) commit 0ccb977f4c80b921a8bf6a2c4b8ea0c1fed6553c Author: Peter Zijlstra Date: Tue Mar 28 11:08:20 2017 +0200 sched/fair: Explicitly generate __update_load_avg() instances The __update_load_avg() function is an __always_inline because its used with constant propagation to generate different variants of the code without having to duplicate it (which would be prone to bugs). Explicitly instantiate the 3 variants. Note that most of this is called from rather hot paths, so reducing branches is good. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 56 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 18 deletions(-) commit 19d436268dde95389c616bb3819da73f0a8b28a8 Author: Peter Zijlstra Date: Sat Feb 25 08:56:53 2017 +0100 debug: Add _ONCE() logic to report_bug() Josh suggested moving the _ONCE logic inside the trap handler, using a bit in the bug_entry::flags field, avoiding the need for the extra variable. Sadly this only works for WARN_ON_ONCE(), since the others have printk() statements prior to triggering the trap. Still, this saves a fair amount of text and some data: text data filename 10682460 4530992 defconfig-build/vmlinux.orig 10665111 4530096 defconfig-build/vmlinux.patched Suggested-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/arm64/include/asm/bug.h | 2 +- arch/parisc/include/asm/bug.h | 8 ++++---- arch/powerpc/include/asm/bug.h | 4 ++-- arch/s390/include/asm/bug.h | 4 ++-- arch/sh/include/asm/bug.h | 4 ++-- arch/x86/include/asm/bug.h | 2 +- include/asm-generic/bug.h | 18 +++++++++++++++++- include/asm-generic/vmlinux.lds.h | 5 ++--- include/linux/bug.h | 2 +- lib/bug.c | 28 ++++++++++++++++++++-------- 10 files changed, 52 insertions(+), 25 deletions(-) commit 1fa4da043a5cc2a29a98c20f67d5c999819a2b6b Author: Daniel Vetter Date: Wed Mar 29 19:41:36 2017 +0200 drm: Fixup failure paths in drm_atomic_helper_set_config I've screwed this up when removing the legacy backoff hack. Fixes: 38b6441e4e75 ("drm/atomic-helper: Remove the backoff hack from set_config") Cc: Harry Wentland Cc: Daniel Vetter Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170329174136.10330-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic_helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 44fe84459faf1a7781595b7c64cd36daf2f2827d Author: Peter Zijlstra Date: Mon Mar 27 13:54:38 2017 +0200 locking/atomic: Fix atomic_try_cmpxchg() semantics Dmitry noted that the new atomic_try_cmpxchg() primitive is broken when the old pointer doesn't point to the local stack. He writes: "Consider a classical lock-free stack push: node->next = atomic_read(&head); do { } while (!atomic_try_cmpxchg(&head, &node->next, node)); This code is broken with the current implementation, the problem is with unconditional update of *__po. In case of success it writes the same value back into *__po, but in case of cmpxchg success we might have lose ownership of some memory locations and potentially over what __po has pointed to. The same holds for the re-read of *__po. " He also points out that this makes it surprisingly different from the similar C/C++ atomic operation. After investigating the code-gen differences caused by this patch; and a number of alternatives (Linus dislikes this interface lots), we arrived at these results (size x86_64-defconfig/vmlinux): GCC-6.3.0: 10735757 cmpxchg 10726413 try_cmpxchg 10730509 try_cmpxchg + patch 10730445 try_cmpxchg-linus GCC-7 (20170327): 10709514 cmpxchg 10704266 try_cmpxchg 10704266 try_cmpxchg + patch 10704394 try_cmpxchg-linus From this we see that the patch has the advantage of better code-gen on GCC-7 and keeps the interface roughly consistent with the C language variant. Reported-by: Dmitry Vyukov Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Fixes: a9ebf306f52c ("locking/atomic: Introduce atomic_try_cmpxchg()") Signed-off-by: Ingo Molnar arch/x86/include/asm/cmpxchg.h | 5 +++-- include/linux/atomic.h | 16 ++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) commit 70579a86e3c8eb2ce57999e594a73b4dfe095959 Author: Arnd Bergmann Date: Wed Mar 29 23:16:31 2017 +0200 x86/debug: Define BUG() again for !CONFIG_BUG The latest change to the BUG() macro inadvertently reverted the earlier commit: b06dd879f5db ("x86: always define BUG() and HAVE_ARCH_BUG, even with !CONFIG_BUG") ... that sanitized the behavior with CONFIG_BUG=n. I noticed this as some warnings have appeared again that were previously fixed as a side effect of that patch: kernel/seccomp.c: In function '__seccomp_filter': kernel/seccomp.c:670:1: error: no return statement in function returning non-void [-Werror=return-type] ... This combines the two patches and uses the ud2 macro to define BUG() in case of CONFIG_BUG=n. Signed-off-by: Arnd Bergmann Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Josh Triplett Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 9a93848fe787 ("x86/debug: Implement __WARN() using UD0") Link: http://lkml.kernel.org/r/20170329211646.2707365-1-arnd@arndb.de Signed-off-by: Ingo Molnar arch/x86/include/asm/bug.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 4af171105144a6475704c1e6024132883d50499e Author: Andy Lutomirski Date: Wed Mar 29 16:47:35 2017 -0700 x86/boot/32: Rewrite test_wp_bit() This code seems to be very old and has gotten only minor updates. It's overcomplicated and has a bunch of comments that are, at best, of purely historical interest. Nowadays we have a shiny function probe_kernel_write() that does more or less exactly what we need. Use it. I switched the page that we test from swapper_pg_dir to empty_zero_page because writing zero to empty_zero_page is more obviously safe than writing to the paging structures. (It's extremely unlikely that any of this would cause problems in practice because the write will fail on any supported CPU.) Signed-off-by: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Garnier Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/0b9e64ab0236de30e7572213cea77bf95ae2e990.1490831211.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/mm/init_32.c | 41 +++++++---------------------------------- 1 file changed, 7 insertions(+), 34 deletions(-) commit 73fa1362a7f337d149f76d26b6c6845cb38c1af9 Merge: fdd3d8c 6415813 Author: Ingo Molnar Date: Thu Mar 30 09:07:54 2017 +0200 Merge branch 'x86/cpu' into x86/mm, before applying dependent patch Signed-off-by: Ingo Molnar commit 8291798dcf059cdc5e55a59b2c4ad70ae14508c2 Author: Kees Cook Date: Wed Mar 29 16:52:58 2017 -0700 TOMOYO: Use designated initializers Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook Acked-by: Tetsuo Handa Signed-off-by: James Morris security/tomoyo/file.c | 12 ++++++------ security/tomoyo/tomoyo.c | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) commit fdd3d8ce0ea62c32b039af45cc5538b728e366d9 Author: Kirill A. Shutemov Date: Tue Mar 28 13:48:06 2017 +0300 x86/dump_pagetables: Add support for 5-level paging Simple extension to support one more page table level. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170328104806.41711-1-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/dump_pagetables.c | 59 +++++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 14 deletions(-) commit 4d6e51c740170595868eded99eb448ea79db803a Author: Heiko Carstens Date: Wed Mar 29 10:30:48 2017 +0200 s390: use generic headers if possible Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/Kbuild | 6 ++++++ arch/s390/include/asm/div64.h | 1 - arch/s390/include/asm/emergency-restart.h | 6 ------ arch/s390/include/asm/irq_regs.h | 1 - arch/s390/include/asm/kmap_types.h | 6 ------ arch/s390/include/asm/local.h | 1 - arch/s390/include/asm/local64.h | 1 - 7 files changed, 6 insertions(+), 16 deletions(-) commit c30abecb39d1493943706193eb086de986738542 Author: Heiko Carstens Date: Wed Mar 29 09:59:21 2017 +0200 s390/uapi: use generic headers if possible Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/uapi/asm/Kbuild | 18 ++++++++++-------- arch/s390/include/uapi/asm/errno.h | 11 ----------- arch/s390/include/uapi/asm/fcntl.h | 1 - arch/s390/include/uapi/asm/ioctl.h | 1 - arch/s390/include/uapi/asm/mman.h | 6 ------ arch/s390/include/uapi/asm/param.h | 6 ------ arch/s390/include/uapi/asm/poll.h | 1 - arch/s390/include/uapi/asm/resource.h | 13 ------------- arch/s390/include/uapi/asm/sockios.h | 6 ------ arch/s390/include/uapi/asm/termbits.h | 6 ------ 10 files changed, 10 insertions(+), 59 deletions(-) commit 2e5fec5f621410f6b71403ff6794b115c79a9d6f Author: Jani Nikula Date: Wed Mar 29 13:32:57 2017 +0300 drm/i915/opregion: debug log about invalid ACPI OpRegion VBT Leave more breadcrumbs for debuggers. Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1490783578-6065-3-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_opregion.c | 4 ++++ 1 file changed, 4 insertions(+) commit ccbf6b6498a47a71ea3287c6b41e3028a70c6282 Author: Jani Nikula Date: Wed Mar 29 13:32:56 2017 +0300 drm/i915/opregion: try to validate RVDA VBT only if it's there Seems more sensible this way, and reduces indent for the more common case. Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1490783578-6065-2-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_opregion.c | 41 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 21 deletions(-) commit 0e53f472c3f6d72dd50b87456cce82343fbc73c6 Author: Jani Nikula Date: Wed Mar 29 13:32:55 2017 +0300 drm/i915/opregion: bail out early for systems with no opregion VBT Reduce indent. No functional changes. Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1490783578-6065-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_opregion.c | 64 +++++++++++++++++------------------ 1 file changed, 32 insertions(+), 32 deletions(-) commit b35f34d1da4e77637869c8041a355da810f69fb6 Author: Ping Gao Date: Thu Mar 30 00:36:40 2017 +0800 drm/i915/gvt: control the scheduler by timeslice usage The timeslice usage will determine vGPU whether has chance to schedule or not at every vGPU switch checkpoint. Signed-off-by: Ping Gao Reviewed-by: Kevin Tian Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/sched_policy.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit afe04fbe6c522e73d5cc61a6660cce0e78630786 Author: Ping Gao Date: Thu Mar 30 00:36:39 2017 +0800 drm/i915/gvt: create an idle vGPU vGPU resource is allocated by scheduler. To account for non-allocated free cycles, we create an idle vGPU as the placeholder similar to idle task concept, which is useful to handle some corner cases in scheduling policy. Signed-off-by: Ping Gao Reviewed-by: Kevin Tian Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.c | 11 ++++++++ drivers/gpu/drm/i915/gvt/gvt.h | 3 +++ drivers/gpu/drm/i915/gvt/vgpu.c | 56 ++++++++++++++++++++++++++++++++++++++++- 3 files changed, 69 insertions(+), 1 deletion(-) commit 39d467c2b71ccb4a55af830c117fafe0525caa12 Author: Ping Gao Date: Thu Mar 30 10:03:24 2017 +0800 drm/i915/gvt: add basic function for weight control This method tries to guarantee precision in second level, with the adjustment conducted in every 100ms. At the end of each vGPU switch calculate the sched time and subtract it from the time slice allocated; the allocated time slice for every 100ms together with remaining timeslice, will be used to decide how much timeslice allocated to this vGPU in the next 100ms slice, with the end goal to guarantee weight ratio in second level. Signed-off-by: Ping Gao Reviewed-by: Kevin Tian Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/sched_policy.c | 59 +++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit bc90d097ae144fab1f789f8523b621de7125c6a8 Author: Ping Gao Date: Thu Mar 30 00:36:37 2017 +0800 drm/i915/gvt: define weight according to vGPU type The weight defines proportional control of physical GPU resource shared between vGPUs. So far the weight is tied to a specific vGPU type, i.e when creating multiple vGPUs with different types, they will inherit different weights. e.g. The weight of type GVTg_V5_2 is 8, the weight of type GVTg_V5_4 is 4, so vGPU of type GVTg_V5_2 has double vGPU resource of vGPU type GVTg_V5_4. TODO: allow user control the weight setting in the future. Signed-off-by: Ping Gao Reviewed-by: Kevin Tian Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 4 ++++ drivers/gpu/drm/i915/gvt/kvmgt.c | 6 ++++-- drivers/gpu/drm/i915/gvt/sched_policy.c | 1 + drivers/gpu/drm/i915/gvt/vgpu.c | 29 ++++++++++++++++++++++++----- 4 files changed, 33 insertions(+), 7 deletions(-) commit 32356920dae17ef3b04fe02a113418c983fc66ce Author: Ping Gao Date: Thu Mar 30 00:36:36 2017 +0800 drm/i915/gvt: factor out the scheduler Factor out the scheduler to a more clear structure, the basic logic is to find out next vGPU first and then schedule it. vGPUs were ordered in a LRU list, scheduler scan from the LRU list head and choose the first vGPU who has pending workload. Signed-off-by: Ping Gao Reviewed-by: Kevin Tian Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/sched_policy.c | 66 ++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 30 deletions(-) commit f6504cce54b26e4318697a854a50cf1a1cb3c066 Author: Ping Gao Date: Thu Mar 30 00:36:35 2017 +0800 drm/i915/gvt: add some statistic routine for scheduler Add some statistic routine to collect the time when vGPU is scheduled in/out and the time of the last ctx submission. Signed-off-by: Ping Gao Reviewed-by: Kevin Tian Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.h | 5 +++ drivers/gpu/drm/i915/gvt/handlers.c | 1 + drivers/gpu/drm/i915/gvt/sched_policy.c | 67 +++++++++++++++++++++------------ 3 files changed, 48 insertions(+), 25 deletions(-) commit 91d0101ad30bd1bd7f7f805f4fa314c6b70bb602 Author: Ping Gao Date: Thu Mar 30 00:36:34 2017 +0800 drm/i915/gvt: use hrtimer replace delayed_work in scheduler Currently the scheduler is triggered by delayed_work, which doesn't provide precision at microsecond level. Move to hrtimer instead for more accurate control. Signed-off-by: Ping Gao Reviewed-by: Kevin Tian Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gvt.c | 5 ++++ drivers/gpu/drm/i915/gvt/gvt.h | 1 + drivers/gpu/drm/i915/gvt/sched_policy.c | 49 ++++++++++++++++++++++----------- drivers/gpu/drm/i915/gvt/sched_policy.h | 2 ++ 4 files changed, 41 insertions(+), 16 deletions(-) commit 865f03d42ed0c90c9faf3301775176834ba13eba Author: Tina Zhang Date: Fri Mar 24 01:56:54 2017 -0400 drm/i915/gvt: remove the redundant info NULL check The variable info is never NULL, which is checked by the caller. This patch removes the redundant info NULL check logic. Fixes: 695fbc08d80f ("drm/i915/gvt: replace the gvt_err with gvt_vgpu_err") Signed-off-by: Tina Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/kvmgt.c | 7 ------- 1 file changed, 7 deletions(-) commit bf39ec335eb8cc51b4e1c9303ef92b380d204bb1 Author: Zhenyu Wang Date: Mon Mar 27 17:41:02 2017 +0800 drm/i915/gvt: adjust mem size for low resolution type From commit d1a513be1f0a ("drm/i915/gvt: add resolution definition for vGPU type"), small type has been restricted to small resolution, so not require larger high GM size any more. Change to smaller 384M for more VM creation with vGPU enabled which still perform reasonable workload. Fixes: d1a513be1f0a ("drm/i915/gvt: add resolution definition for vGPU type") Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/vgpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b263b473bf62dfd4aa10fc9068b2c78b1b20f202 Author: Keerthy Date: Thu Mar 9 13:36:02 2017 +0530 thermal: ti-soc-thermal: Remove redundant code ti_thermal_expose_sensor always takes the devm_thermal_zone_of_sensor_register call for registration with the device tree nodes present for all the bandgap sensors for omap3/4/5 and dra7 family. There are large chunks of unused code. Removing all of them. Signed-off-by: Keerthy Signed-off-by: Eduardo Valentin drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 154 +-------------------- 1 file changed, 3 insertions(+), 151 deletions(-) commit 004f772871315091e671b0979047d9a88c1061fd Author: Keerthy Date: Thu Mar 9 13:36:01 2017 +0530 thermal: ti-soc-thermal: Remove redundant constants Now that slope and offset data are being passed from device tree no need to populate in driver data. Signed-off-by: Keerthy Signed-off-by: Eduardo Valentin drivers/thermal/ti-soc-thermal/dra752-thermal-data.c | 10 ---------- drivers/thermal/ti-soc-thermal/omap3-thermal-data.c | 4 ---- drivers/thermal/ti-soc-thermal/omap4-thermal-data.c | 6 ------ drivers/thermal/ti-soc-thermal/omap5-thermal-data.c | 4 ---- drivers/thermal/ti-soc-thermal/ti-bandgap.h | 4 ---- drivers/thermal/ti-soc-thermal/ti-thermal.h | 16 ---------------- 6 files changed, 44 deletions(-) commit e7d22fd2f634d570ab036336c7a6e5017244d0e0 Author: Keerthy Date: Thu Mar 9 13:36:00 2017 +0530 thermal: ti-soc-thermal: Fetch slope and offset from DT Currently slope and offset values for calculating the hot spot temperature of a thermal zone is being taken directly from driver data. So fetch them from device tree. Signed-off-by: Keerthy Signed-off-by: Eduardo Valentin drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e13909a4acc4b68b30527d8442d4267658963757 Author: Vineet Gupta Date: Wed Mar 29 11:53:33 2017 -0700 ARC: uaccess: enable INLINE_COPY_{TO,FROM}_USER ... ... and switch to generic out of line version in lib/usercopy.c Signed-off-by: Vineet Gupta Signed-off-by: Al Viro arch/arc/include/asm/uaccess.h | 16 ++++++---------- arch/arc/mm/extable.c | 14 -------------- 2 files changed, 6 insertions(+), 24 deletions(-) commit c6f3e7cb13bb9e9b1760f0dda37b96a6d1c6ef28 Author: Xiangliang Yu Date: Tue Mar 28 19:16:42 2017 +0800 drm/amdgpu/soc15: enable psp block for SRIOV SRIOV can support for loading ucode with PSP block, enable it. Signed-off-by: Xiangliang Yu Acked-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cfd8373320565fbe83d936e616811bb195b3bc52 Author: Xiangliang Yu Date: Tue Feb 28 17:26:40 2017 +0800 drm/amdgpu/soc15: bypass pp block for vf Disable pp block if device is vf. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Reviewed-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6668b734468de12c077ebdf3ed0f9f60d10f9e6a Author: Xiangliang Yu Date: Tue Mar 28 19:48:10 2017 +0800 drm/amdgpu/psp: add check sOS sign Confirm if sys driver and sOS are already been loaded through sOS sign register, skip loading sys driver and sOS if finding the sign. Signed-off-by: Xiangliang Yu Acked-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit ec63982e90a8793a838dfba9037bde597bb565e1 Author: Tom St Denis Date: Wed Mar 29 13:01:30 2017 -0400 drm/amd/amdgpu: Correct ring wptr address in debugfs (v2) On gfx9 hardware the value is not wrapped and is a 64-bit value. So we reduce it modulo the ring size. Signed-off-by: Tom St Denis Reviewed-by: Christian König (v2) use buf_mask instead of computing on the fly Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1866bac8970522f2fb66bc2c2ed4b6e71c0830d3 Author: Felix Kuehling Date: Tue Mar 28 20:36:12 2017 -0400 drm/amdgpu: Fix multi-level page table bugs for large BOs v3 Fix the start/end address calculation for address ranges that span multiple page directories in amdgpu_vm_alloc_levels. Add error messages if page tables aren't found. Otherwise the page table update would just fail silently. v2: * Change WARN_ON to WARN_ON_ONCE * Move masking of high address bits to caller * Add range-check for "from" and "to" v3: * Replace WARN_ON_ONCE in get_pt with pr_err in caller Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 9ceaeeafbd1177e53395946a772a2a9c4c234887 Author: Felix Kuehling Date: Tue Mar 28 20:31:20 2017 -0400 drm/amdgpu: Fix Vega10 VM initialization adev->family is not initialized yet when amdgpu_get_block_size is called. Use adev->asic_type instead. Minimum VM size is 512GB, not 256GB, for a single page table entry in the root page table. gmc_v9_0_vm_init is called after adev->vm_manager.max_pfn is initialized. Move the minimum VM-size enforcement ahead of max_pfn initializtion. Cast to 64-bit before the left-shift. Signed-off-by: Felix Kuehling Reviewed-by: Chunming Zhou Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 17 +++++++---------- 2 files changed, 10 insertions(+), 13 deletions(-) commit 22770e5a750e905a1aaa66e20b88d080e42ddd15 Author: Felix Kuehling Date: Tue Mar 28 20:24:53 2017 -0400 drm/amdgpu: Make max_pfn 64-bit With 4-level page tables the maximum VM size is 256TB. That's 64G pages, which can't be represented in 32-bit. Signed-off-by: Felix Kuehling Reviewed-by: Chunming Zhou Reviewed-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 5 +++-- 4 files changed, 9 insertions(+), 7 deletions(-) commit 43e669d65eb45897c062fc439018ad4988d59576 Author: Christian König Date: Wed Mar 22 10:29:45 2017 +0100 drm/amdgpu: drop GB_GPU_ID from the golden settings That register is marked deprecated, reading it results in a bus error. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 - 1 file changed, 1 deletion(-) commit b9be700e38430ee3275cdaf5d1054db83c63d68e Author: Junwei Zhang Date: Tue Mar 28 16:52:07 2017 +0800 drm/amdgpu: fix vm pte pde flags to 64-bit for sdma (v3) v2: fix for all sdma engines v3: squash in fix for SI/CI Signed-off-by: Junwei Zhang Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/si_dma.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) commit bd7d7acf55c6e89f4653e1bfd8be6578d4f6a46b Author: Jim Qu Date: Tue Mar 28 17:18:15 2017 +0800 drm/amd/amdgpu: fix Tonga S3 resume hang on rhel6.8 1. security firmware loading has moved to sw init, so this code is useless. 2. it seems that driver could not call request_firmware on kernel 2.6, when S3 resume. for request firmware depends on userspace, at this time, userspace is freeze. Signed-off-by: Jim Qu Acked-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 3 --- 1 file changed, 3 deletions(-) commit 7286366c30432f3476569b4e294029efb8ceec82 Author: Roger.He Date: Tue Mar 28 09:34:16 2017 +0800 drm/ttm: decrease ttm bo priority number decrease and also reserve priority number for KFD using Signed-off-by: Roger.He Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher include/drm/ttm/ttm_bo_driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c309cd03b4e63785974481d65ffaf13ffcd75afb Author: Roger.He Date: Mon Mar 27 19:38:11 2017 +0800 drm/amd/amdgpu: fix performance drop when VRAM pressure When VRAM pressue and trigger huge evictions there is performance drop, this patch fix it. Signed-off-by: Roger.He Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e51a3226d48fd02b37090a01c17587944743389a Author: Harry Wentland Date: Tue Mar 28 11:29:53 2017 -0400 drm/amdgpu: Couple small warning fixes Signed-off-by: Harry Wentland Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 4d6cbde37aac29164193df6d55c3685f223c1f9e Author: Felix Kuehling Date: Tue Mar 28 13:42:31 2017 -0400 drm/amdgpu: Clean up GFX 9 VM fault messages Clean up the VM fault message format and use rate-limiting similar to other ASICs. Signed-off-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit d7c434d36775b64ef6a92cce76707972e1c1b748 Author: Felix Kuehling Date: Tue Mar 28 13:41:11 2017 -0400 drm/amdgpu: Register UTCL2 as a source of VM faults Signed-off-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 ++ 1 file changed, 2 insertions(+) commit 480e9150ea329fc774f943a56c8de9cc361efef1 Author: Alex Deucher Date: Mon Mar 27 14:40:36 2017 -0400 drm/amdgpu/soc15: drop support for reading some registers The RB harvest registers are not necessary, the driver already exposes this info via the info ioctl. GB_BACKEND_MAP has been deprecated since SI and is not relevant to the RB mapping. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 3 --- 1 file changed, 3 deletions(-) commit c013cea2df9c06aca7e218d8d41693ba2d17455d Author: Alex Deucher Date: Fri Mar 24 15:05:07 2017 -0400 drm/amdgpu/soc15: return cached values for some registers (v2) Required for SR-IOV and saves MMIO transactions. v2: drop cached RB harvest registers Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 2572c24ca9f4a427b876f3e7718097e9c4b9ddc7 Author: Alex Deucher Date: Fri Mar 24 14:47:18 2017 -0400 drm/amdgpu/gfx9: use hweight for calculating num_rbs Match what we do for other asics. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit f2713e8c2a34711ed820a3095a7c5f4a0c85df1c Author: Alex Deucher Date: Tue Mar 28 12:19:31 2017 -0400 drm/amdgpu: refine the logic in amdgpu_need_post() We check the mem config register to make sure it's been programmed by the vbios to determine if we need to post so we check for a non-0 value. However, when the asic comes out of reset, we may see all ones here, so check for that too. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5f586c763a079349398e2b0c7c271386193ac34 Author: Andrey Grodzovsky Date: Thu Mar 23 15:33:07 2017 -0400 drm/amdgpu: Add interrupt entries for CRTC_VERTICAL_INTERRUPT0. This used by DAL ISR logic for VBLANK handling. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/include/ivsrcid/ivsrcid_vislands30.h | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) commit e9d672b2910a8d5e528d859dce9ad9baa748087a Author: Monk Liu Date: Wed Mar 15 12:18:57 2017 +0800 drm/amdgpu:changes in gfx DMAframe scheme (v2) 1) Adapt to vulkan: Now use double SWITCH BUFFER to replace the 128 nops w/a, because when vulkan introduced, umd can insert 7 ~ 16 IBs per submit which makes 256 DW size cannot hold the whole DMAframe (if we still insert those 128 nops), CP team suggests use double SWITCH_BUFFERs, instead of tricky 128 NOPs w/a. 2) To fix the CE VM fault issue when MCBP introduced: Need one more COND_EXEC wrapping IB part (original one us for VM switch part). this change can fix vm fault issue caused by below scenario without this change: >CE passed original COND_EXEC (no MCBP issued this moment), proceed as normal. >DE catch up to this COND_EXEC, but this time MCBP issued, thus DE treats all following packages as NOP. The following VM switch packages now looks just as NOP to DE, so DE dosen't do VM flush at all. >Now CE proceeds to the first IBc, and triggers VM fault, because DE didn't do VM flush for this DMAframe. 3) change estimated alloc size for gfx9. with new DMAframe scheme, we need modify emit_frame_size for gfx9 4) No need to insert 128 nops after gfx8 vm flush anymore because there was double SWITCH_BUFFER append to vm flush, and for gfx7 we already use double SWITCH_BUFFER following after vm_flush so no change needed for it. 5) Change emit_frame_size for gfx8 v2: squash in BUG removal from Monk Signed-off-by: Monk Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 8 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 77 +++++++++++++++++++++------------- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 29 ++++++++----- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 29 ++++++++----- 5 files changed, 88 insertions(+), 57 deletions(-) commit eeb2487df75fec73a958b54a1ebefc18808c20ba Author: Monk Liu Date: Thu Mar 23 16:32:13 2017 +0800 drm/amdgpu:fix missing programing critical registers those MC_VM registers won't be programed by VBIOS in VF so driver is responsible to programe them. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 9 +++++++++ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 4 +++- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 9 +++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) commit 5846e355694f8a0be33a29d45ea8cafb0b5de22c Author: Monk Liu Date: Thu Mar 23 16:10:04 2017 +0800 drm/amdgpu:fix ring_write_multiple ring_write_multiple should use buf_mask instead of ptr_mask Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 79a0c4655e47ca31c24e1d8cfd4c9a461571a100 Author: Monk Liu Date: Wed Mar 22 18:01:59 2017 +0800 drm/amdgpu:fix gmc_v9 vm fault process for SRIOV for SRIOV we cannot use access register when in IRQ routine with regular KIQ method Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 6e9dc861219b8f8966f5a91984dbfaa6de57fb8b Author: Monk Liu Date: Wed Mar 22 18:02:40 2017 +0800 drm/amdgpu:no cg for soc15 of SRIOV no CG for SRIOV on SOC15 Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 3 +++ 1 file changed, 3 insertions(+) commit 32833fb732a80cd27f3756b2ead7aaf85ec1a780 Author: Monk Liu Date: Tue Mar 21 18:58:53 2017 +0800 drm/amdgpu:two fixings for sdma v4 for SRIOV no hw_fini for SRIOV, otherwise other VF will be affected no CG for SRIOV Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ca82a746b0e20a70fc39101ca376a90d26dd1b28 Author: Monk Liu Date: Fri Feb 24 12:06:22 2017 +0800 drm/amdgpu:change sequence of SDMA v4 init must set minor_update.enable before write smaller value to wptr/doorbell, so for sriov we need set that register bit in hw_init period. this could fix the SDMA ring test fail after guest reboot Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 37 +++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 10 deletions(-) commit e09706f46ebecf3ae39996772c0ece12e91d8c45 Author: Monk Liu Date: Tue Mar 21 18:48:45 2017 +0800 drm/amdgpu:fix ring init sequence ring->buf_mask need be set prior to ring_clear_ring invoke and fix ring_clear_ring as well which should use buf_mask instead of ptr_mask Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit b4d6126d1eeee1d5e58c6b17117b778bc7548389 Author: Monk Liu Date: Tue Mar 21 16:41:01 2017 +0800 drm/amdgpu:virt_init_setting invoke is missed! this must be invoked during early init Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ++++ 1 file changed, 4 insertions(+) commit 71aec257ec52caadf8ea3c297e6cff39fec49a2d Author: Monk Liu Date: Wed Mar 8 15:38:54 2017 +0800 uapi/drm:add new flag for Preemption when MCBP supported, we will set pre_enb bit for those IBs with PREEMPT flag tagged Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher include/uapi/drm/amdgpu_drm.h | 3 +++ 1 file changed, 3 insertions(+) commit ed834af243d04637fbb9ca63c8e58677edf266bc Author: Monk Liu Date: Wed Mar 8 15:37:00 2017 +0800 uapi/drm:change Preamble Description Preamble in linux doesn't mean it is CE PREAMBLE IB, instead it means this IB could be dropped if no ctx switch happens. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher include/uapi/drm/amdgpu_drm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e2e3c7f182e26fb518c13ab683aac7918dffb67 Author: Monk Liu Date: Wed Mar 8 15:53:19 2017 +0800 drm/amdgpu:enable MCBP for SR-IOV (v2) Apply the new IB during IB emit for SRIOV with MCBP v2: agd: use define instead of magic number Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/vid.h | 1 + 2 files changed, 4 insertions(+) commit 9ccd52eb248b0d8f0450e1201a8064f5ab1ec07e Author: Monk Liu Date: Tue Mar 21 11:50:43 2017 +0800 drm/amdgpu:enable mcbp for gfx9(v2) set bit 21 of IB.control filed to actually enable MCBP for SRIOV v2: add flag for preemption enable bit for soc15 and use this flag instead of hardcode. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/soc15d.h | 1 + 2 files changed, 4 insertions(+) commit 806ba2d4f523f7414103fa0bdd2e3b17a340ac41 Author: Monk Liu Date: Fri Mar 24 12:07:52 2017 +0800 drm/amdgpu:implement cond_exec for gfx8 when MCBP enabled for gfx8, the cond_exec must also be implemented, otherwise there will be odds to meet cross engine (ce and me) deadlock when world switch happens. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 65333e4429c60b8bbbb7a9213cb5612761499acd Author: Monk Liu Date: Mon Mar 27 15:14:53 2017 +0800 drm/amdgpu:fix the check in cs_ib_fill for SRIOV 1,the check is only appliable for SRIOV GFX engine. 2,use chunk_ib instead of ib. Signed-off-by: Monk Liu Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 9a1b3af10d6268a98076a4397cb1d47c4713efc7 Author: Monk Liu Date: Wed Mar 8 15:51:13 2017 +0800 drm/amdgpu:protect cs submit to prevent submit two or more IBs with PREEMPT flags. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 2a9ceb8daab01a4ee27383e4d344e4a8b781c165 Author: Monk Liu Date: Tue Mar 28 11:00:03 2017 +0800 drm/amdgpu:fix cs_ib_fill should use chunk_ib instead of ib, otherwise the logic is incorrect. Signed-off-by: Monk Liu Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23e0563e48f7e9e98003df5b43d6a48e162782c6 Author: Nicolai Hähnle Date: Thu Mar 23 19:34:11 2017 +0100 drm/amdgpu: clear freed mappings immediately when BO may be freed Also, add the fence of the clear operations to the BO to ensure that the underlying memory can only be re-used after all PTEs pointing to it have been cleared. This avoids the following sequence of events that could be triggered by user space: 1. Submit a CS that accesses some BO _without_ adding that BO to the buffer list. 2. Free that BO. 3. Some other task re-uses the memory underlying the BO. 4. The CS is submitted to the hardware and accesses memory that is now already in use by somebody else. By clearing the page tables immediately in step 2, a GPU VM fault will be triggered in step 4 instead of wild memory accesses. v2: use amdgpu_bo_fence directly Signed-off-by: Nicolai Hähnle Reviewed-by: Chunming Zhou Reviewed-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 2de6a7c52a412985446ee358d8e27b7f3de5e3f3 Author: Chunming Zhou Date: Mon Mar 27 13:44:45 2017 +0800 drm/amdgpu: enable four level VMPT for gmc9 Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fb1cf3acee526cb352c42c9f3e66db06b7eef60 Author: Chunming Zhou Date: Thu Mar 23 17:38:34 2017 +0800 drm/amdgpu: set page table depth by num_level Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 36f8c1f9037b0a05738ad479320c398f7a4642c1 Author: Chunming Zhou Date: Mon Mar 27 11:53:12 2017 +0800 drm/amdgpu: adapt vm size for multi vmpt Signed-off-by: Chunming Zhou Reviewed-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f7effef8d6e38d7d3120c604ad7d0b299b349e14 Author: Chunming Zhou Date: Mon Mar 27 11:43:35 2017 +0800 drm/amdgpu: limit block size to one page Signed-off-by: Chunming Zhou Reviewed-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit a1adf8bef2f3c635dca372d36737c70e6d32bc95 Author: Chunming Zhou Date: Mon Mar 27 11:36:57 2017 +0800 drm/amdgpu: abstract block size to one function Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 59 ++++++++++++++++-------------- 1 file changed, 32 insertions(+), 27 deletions(-) commit f566ceb165f8f3bf0e7492a3a8d5eefed9e499a6 Author: Christian König Date: Thu Oct 27 20:04:38 2016 +0200 drm/amdgpu: add alloc/free for multi level PDs V2 Allocate and free page directories on demand. V2: a. clear entries allocation b. fix entries index calculation c. need alloc sub level even parent bo was allocated Signed-off-by: Christian König (v1) Reviewed-by: Alex Deucher (v1) Signed-off-by: Chunming Zhou (v2) Acked-by: Alex Deucher (v2) Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 175 ++++++++++++++++++++------------- 1 file changed, 106 insertions(+), 69 deletions(-) commit 4e2cb640c2efbf86058cffd2785307690ebefe20 Author: Christian König Date: Tue Oct 25 15:52:28 2016 +0200 drm/amdgpu: handle multi level PD during PT updates Not the best solution, but good enough for now. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 39 +++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) commit 194d2161131b35f9cd4cf3e355f2d7cd3b296898 Author: Christian König Date: Wed Oct 12 15:13:52 2016 +0200 drm/amdgpu: handle multi level PD updates V2 Update all levels of the page directory. V2: a. sub level pdes always are written to incorrect place. b. sub levels need to update regardless of parent updates. Signed-off-by: Christian König (V1) Reviewed-by: Alex Deucher (V1) Signed-off-by: Chunming Zhou (V2) Acked-by: Alex Deucher (V2) Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 97 ++++++++++++++++++++++----------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 4 +- 4 files changed, 68 insertions(+), 37 deletions(-) commit d711e1398db612042e2038ca7bb798c4a297cc73 Author: Christian König Date: Thu Oct 13 10:20:53 2016 +0200 drm/amdgpu: handle multi level PD in the LRU Move all levels to the end after command submission. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 36 +++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) commit 670fecc876c75a656ec0bc1e481ad1f848a95e61 Author: Christian König Date: Wed Oct 12 15:36:57 2016 +0200 drm/amdgpu: handle multi level PD during validation All page directory levels should be in place after this. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 57 +++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 15 deletions(-) commit 72a7ec5cf6912886190ac0da93d2038dbc5baf8a Author: Christian König Date: Wed Oct 19 11:03:57 2016 +0200 drm/amdgpu: handle multi level PD size calculation (v2) Allows us to get the size for all levels as well. v2: agd: fix warning Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit 67003a15b736988bcb0c5f871be353d702a862ba Author: Christian König Date: Wed Oct 12 14:46:26 2016 +0200 drm/amdgpu: generalize page table level No functional change, but the base for multi level page tables. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 88 +++++++++++++++++----------------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 10 ++-- 3 files changed, 50 insertions(+), 50 deletions(-) commit 8437a097fe604c81a0fda71017837d0f7e7df8b0 Author: Christian König Date: Mon Oct 17 15:08:10 2016 +0200 drm/amdgpu: add num_level to the VM manager Needs to be filled with handling. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 1 + 5 files changed, 5 insertions(+) commit 49ac8a24caa9579656ea9058c8281d7f668b22dd Author: Christian König Date: Thu Oct 13 15:09:08 2016 +0200 drm/amdgpu: add the VM pointer to the amdgpu_pte_update_params as well This way we save passing it through the different functions. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit a24960f321dc5b59db3428733da5021af9bc7973 Author: Christian König Date: Wed Oct 12 13:20:52 2016 +0200 drm/amdgpu: rename page_directory_fence to last_dir_update Decribes better what this is used for. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit a7c7bc4c0c47eaac77b8fa92f0672032df7f4254 Author: Rex Zhu Date: Mon Mar 27 15:32:59 2017 +0800 drm/amd/powerplay: reduce sample period time for power readings. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2a4cd69a57de8c229f4de577739cde63f3dde0d Author: Huang Rui Date: Fri Mar 24 11:52:23 2017 +0800 drm/amdgpu: add get_clockgating callback for mmhub v1 Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 2eba890cb8f026f979df8e25ea4acd25088a82ae Author: Huang Rui Date: Fri Mar 24 11:04:27 2017 +0800 drm/amdgpu: add get_clockgating for sdma v4 Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit f9abe35c307e26c16d4eade33b2904d9ff665116 Author: Huang Rui Date: Fri Mar 24 10:46:16 2017 +0800 drm/amdgpu: add get_clockgating callback for soc15 (v3) v2: squash register typo fix from Ray v3: fix spelling Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 +++ drivers/gpu/drm/amd/amdgpu/soc15.c | 37 ++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) commit e96487a6a7288b46e6b8c0ec5b659bb4e59fbdab Author: Huang Rui Date: Fri Mar 24 10:12:32 2017 +0800 drm/amdgpu: add get_clockgating callback for nbio v6.1 Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 1 + drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 15 +++++++++++++++ drivers/gpu/drm/amd/amdgpu/nbio_v6_1.h | 1 + 3 files changed, 17 insertions(+) commit 12ad27faa81e47875bd5a6daa43f33bddf12e6b6 Author: Huang Rui Date: Fri Mar 24 09:58:11 2017 +0800 drm/amdgpu: add get_clockgating callback for gfx v9 Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 43 ++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) commit e322edc322651436df539fa63f3b91a10da171ca Author: Alex Deucher Date: Thu Mar 23 13:05:55 2017 -0400 drm/amdgpu/gfx9: further KIQ parameter cleanup The ring structure already has what we need. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit d72f2f46e6d242474b838953a1934c5c86af892f Author: Alex Deucher Date: Thu Mar 23 12:52:23 2017 -0400 drm/amdgpu/gfx9: store the eop gpu addr in the ring structure Avoids passing around additional parameters during setup. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit fe2bd75b2290bf6acd4b91312697e445668dd773 Author: Keith Busch Date: Wed Mar 29 22:49:17 2017 -0500 PCI: Short-circuit pci_device_is_present() for disconnected devices If the PCI device is disconnected, return false immediately from pci_device_is_present(). pci_device_is_present() uses the bus accessors, so the early return in the device accessors doesn't help here. Tested-by: Krishna Dhulipala Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Reviewed-by: Wei Zhang drivers/pci/pci.c | 2 ++ 1 file changed, 2 insertions(+) commit 33fb8698839b3a0b8685442674278626f09a9e28 Author: Alex Deucher Date: Thu Mar 23 12:41:59 2017 -0400 drm/amdgpu/gfx9: reduce the functon params for mpq setup Everything we need is in the ring structure. No need to pass all the bits explicitly. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit f7618a633095daaf42f054af153fa7970ee71cee Author: Alex Deucher Date: Thu Mar 23 12:30:41 2017 -0400 drm/amdgpu/gfx9: reserve kiq eop object before unmapping it It's required. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++++ 1 file changed, 4 insertions(+) commit e1d53aa880e359f94bb1141cc836ddbbc0080162 Author: Alex Deucher Date: Mon Mar 27 16:54:06 2017 -0400 drm/amdgpu/gfx9: reserve mqd objects before mapping them It's required. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) commit e935c2116ecee327511a4fbde55a8ad211725280 Author: Alex Deucher Date: Mon Mar 27 16:52:40 2017 -0400 drm/amdgpu/gfx9: rename some functions To better match where they are used. Called from sw_init and sw_fini. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b4fcf7f069e324af6997f269b0b1143f650c4782 Author: Alex Deucher Date: Thu Mar 23 12:19:15 2017 -0400 drm/amdgpu/gfx9: whitespace cleanup Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 9e8e453a7093a4e9955016dad77776b0a6009947 Author: Harry Wentland Date: Wed Mar 15 16:32:30 2017 -0400 drm/amd/amdgpu: Fix some warnings in vce4 Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bf4305fe724ca5351cc669d74ae3281305d5ec59 Author: Xiangliang Yu Date: Mon Mar 13 11:10:12 2017 +0800 drm/amdgpu/vce4: impl vce & mmsch sriov start For MM sriov, need use MMSCH to init engine and the init procedures are all saved in mm table. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 205 +++++++++++++++++++++++++++++++++- 1 file changed, 204 insertions(+), 1 deletion(-) commit d7a98193f70de8e80b7bcaa9e31a61d281786131 Author: Xiangliang Yu Date: Mon Mar 13 11:03:35 2017 +0800 drm/amdgpu: add mmsch structures For MM SRIOV, need to prepare MM table send send it to MMSCH to initial UVD & VCE engine. Create new header file for the structures. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mmsch_v1_0.h | 87 +++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) commit e76347b0c2c5c23150d331aad8d8a2dffafeee6a Author: Xiangliang Yu Date: Wed Mar 8 14:35:16 2017 +0800 drm/amdgpu/vce4: Ignore vce ring/ib test temporarily In order to not break SRIOV gfx development, will revert this patch after vce proved working. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Reviewed-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f5dee228242309c3288ee4d2a7152e482f103195 Author: Xiangliang Yu Date: Tue Mar 7 16:40:55 2017 +0800 drm/amdgpu/vce4: alloc mm table for MM sriov Allocate MM table for sriov device. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit ecb2b9c698e8be7a9dbe746d794b5d5e6314e990 Author: Xiangliang Yu Date: Tue Feb 28 17:24:52 2017 +0800 drm/amdgpu/virt: add structure for MM table Add new structure for MM table for multi media scheduler of sriov. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Reviewed-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 468842a5e530c5f07bbd0cf790b3f3d6961b722d Author: Xiangliang Yu Date: Wed Feb 15 17:25:43 2017 +0800 drm/amdgpu: disable uvd for sriov disable uvd for sriov temporarily. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bae5b5191d0ec7a0f639e612b97ea150e7e089d2 Author: Xiangliang Yu Date: Tue Mar 7 14:52:24 2017 +0800 drm/amdgpu/vce4: enable doorbell for SRIOV VCE SRIOV need use doorbell and only works on VCN0 ring now Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit d9af225942d5ac11b8c0aff4f9e25fd0524f5df6 Author: Xiangliang Yu Date: Tue Mar 7 14:45:25 2017 +0800 drm/amdgpu: Don't touch PG&CG for SRIOV MM For SRIOV, MM don't need to care about PG & CG, skip it. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Reviewed-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 6 ++++++ 2 files changed, 12 insertions(+) commit e6b3ecb4dbd9b03498a66fb777a54084f7182359 Author: Monk Liu Date: Fri Dec 30 16:18:56 2016 +0800 drm/amdgpu/vega10:fix DOORBELL64 scheme Signed-off-by: Monk Liu Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit 0170591bb06788034ae72bfa56e42f283ab3de5a Author: Keith Busch Date: Wed Mar 29 22:49:11 2017 -0500 PCI/MSI: Skip disabling disconnected devices Check the device connected state prior to executing device shutdown operations or writing MSI messages so that tear down on disconnected devices completes quicker. Tested-by: Krishna Dhulipala Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Reviewed-by: Wei Zhang drivers/pci/msi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit f8445307b66e1d953bbe865d35dca033944ba531 Author: Alex Deucher Date: Wed Mar 22 10:49:25 2017 -0400 drm/amdgpu:vega10: enable virtual display if set via module option Enable virtual displays if the user has enabled them via the kernel command line. Useful in virtual or headless environments. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 796b656840241f48722ae473b36ca308c1e142b5 Author: Xiangliang Yu Date: Tue Feb 28 17:22:03 2017 +0800 drm/amdgpu/soc15: enable virtual dce for vf VF need virtual dce, enable it if device is vf. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Reviewed-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 3 +++ 1 file changed, 3 insertions(+) commit f1a34465c8691efc39196d37736cb09a255b98f0 Author: Xiangliang Yu Date: Wed Mar 8 15:06:47 2017 +0800 drm/amdgpu/soc15: init virt ops for vf If gpu device is vf, set virt ops so that guest can talk with GPU hypervisor. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Reviewed-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ++++ 1 file changed, 4 insertions(+) commit c9c9de93a33ccdbf7eaef0c86a5e60551f3410bd Author: Xiangliang Yu Date: Fri Mar 10 14:18:17 2017 +0800 drm/amdgpu/virt: impl mailbox for ai Implement mailbox protocol for AI so that guest vf can communicate with GPU hypervisor. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Reviewed-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 207 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h | 47 ++++++++ 3 files changed, 255 insertions(+), 1 deletion(-) commit ebe0a8097913659e29c4b89a37c93fc0a88c6d4e Author: Xiangliang Yu Date: Tue Feb 14 16:08:18 2017 +0800 drm/amdgpu/dce_virtual: bypass DPM for vf If enable DPM for VF, always get lot of warn_slow_patch_null in dmesg and vf doesn't support DPM. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 3 +++ 1 file changed, 3 insertions(+) commit c7a7266b7d143565364ac9b3b48b6fc58a3e2ea1 Author: Xiangliang Yu Date: Tue Feb 28 17:06:36 2017 +0800 drm/amdgpu/gmc9: no need use kiq in vega10 tlb flush two reasons: 1. there is a spinlock around; 2. vm register is pf/vf copy, vf can access via mmio safely. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 86d3798af0e687f40036cd12bfba8d6386188b03 Author: Xiangliang Yu Date: Tue Feb 28 16:59:28 2017 +0800 drm/amdgpu/soc15: bypass PSP for VF Bypass PSP block for VF device. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0e11de1ef5aa406bd5846bdf66c4fec7adcb9ac4 Author: Monk Liu Date: Thu Dec 15 13:56:53 2016 +0800 drm/amdgpu/sdma4:re-org SDMA initial steps for sriov Rework sdma init to support SR-IOV. Signed-off-by: Monk Liu Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit cfee05bc90571966797ce4850f299c14a9bd02ff Author: Monk Liu Date: Mon Dec 12 17:18:37 2016 +0800 drm/amdgpu:bypass RLC init for SRIOV one issue unresolved for RLC: rlc will go wrong completely if there is a soft_reset before RLC ucode loading. to workaround above issue, we can totally ignore RLC in guest driver side due to there was already full initialization on RLC side by GIM Signed-off-by: Monk Liu Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +++ 1 file changed, 3 insertions(+) commit cca02cd3d40d11468f53c502c0579963b42d4f34 Author: Xiangliang Yu Date: Tue Mar 7 13:56:03 2017 +0800 drm/amdgpu/gfx9: impl gfx9 meta data emit Insert ce meta prior to cntx_cntl and de follow it. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 47 ++++++++++++++++++++++ drivers/gpu/drm/amd/include/v9_structs.h | 68 ++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+) commit 9a5e02b5ccf8399908c67cca9ff86c725db60a0d Author: Monk Liu Date: Fri Nov 18 17:16:36 2016 +0800 drm/amdgpu:impl gfx9 cond_exec (v2) it is needed for virtualization v2: squash in wptr value fix Signed-off-by: Monk Liu Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 464826d67aee079e34c8b8bb652cef71c1a7dbe4 Author: Xiangliang Yu Date: Tue Feb 28 16:48:47 2017 +0800 drm/amdgpu: init kiq and kcq for vega10 Init kiq via cpu mmio and init kcq through kiq. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 464 +++++++++++++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/soc15d.h | 2 + 2 files changed, 465 insertions(+), 1 deletion(-) commit 97031e2541ebeba0255ddb0b8c6e7189649bb1a6 Author: Xiangliang Yu Date: Mon Feb 13 16:49:34 2017 +0800 drm/amdgpu/gfx9: fullfill kiq irq funcs (v2) Fullfill KIQ irq funcs to support kiq interrupt. v2: squash in adding interrupt src Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 79 +++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit aa6faa44dd0c9344885ddc256ef62162afa0971d Author: Xiangliang Yu Date: Mon Feb 13 16:36:17 2017 +0800 drm/amdgpu/gfx9: fullfill kiq funcs (v2) Fullfill kiq funcs to support kiq ring. v2: squash in 64bit ptr fix Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 80 +++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit ac104e99cdd395f0fc147bd46e3ee33c68baccce Author: Xiangliang Yu Date: Mon Feb 13 16:13:46 2017 +0800 drm/amdgpu: add kiq ring for gfx9 Allocate KIQ ring in sw_init for gfx9. Signed-off-by: Xiangliang Yu Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 88 +++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) commit 1b922423ced7fbe7f1a8366eb399b7daf4ebaea7 Author: Xiangliang Yu Date: Wed Mar 8 15:00:48 2017 +0800 drm/amdgpu: impl sriov detection for vega10 Read vega10 hw register to detect if sriov is enabled, and call it before IP blocks setting. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Acked-by: Christian König Reviewed-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 18 ++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/nbio_v6_1.h | 1 + drivers/gpu/drm/amd/amdgpu/soc15.c | 2 ++ 3 files changed, 21 insertions(+) commit 3fc08b61df3837701fd6665c1b2b3df7ca44225b Author: Monk Liu Date: Wed Nov 2 15:33:46 2016 +0800 drm/amdgpu/gfx9: programing wptr_poll_addr register Required for SR-IOV. Signed-off-by: Monk Liu Signed-off-by: Xiangliang Yu Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 4b103883473964bbb7b0b6934999b283ee234a8a Author: Keith Busch Date: Wed Mar 29 22:49:06 2017 -0500 PCI: Don't attempt config access to disconnected devices If we've detected the PCI device is disconnected, there is no need to attempt to access its config space since we know the operation will fail. Make all the config reads and writes return -ENODEV error immediately when in such a state. If a caller requests a config read to a disconnected device, return a data value of all 1's. This is the same as what hardware is expected to return when accessing a removed device, but software can do this faster without relying on hardware. Tested-by: Krishna Dhulipala Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Reviewed-by: Wei Zhang drivers/pci/access.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit ca2f1ccaf95c74b38ad510485506a8d450d8e6b4 Author: Junwei Zhang Date: Fri Mar 3 16:54:00 2017 -0500 drm/amdgpu: add Vega10 Device IDs (v2) v2: add AMD_EXP_HW_SUPPORT for now Signed-off-by: Junwei Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 460826e6a061c2ba444c3071d7ea41322f5d5a0b Author: Ken Wang Date: Mon Mar 6 14:53:16 2017 -0500 drm/amdgpu: Set the IP blocks for vega10 Acked-by: Christian König Signed-off-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 220ab9bd1ccfe8132a5c4641e52da99f4cd09120 Author: Ken Wang Date: Mon Mar 6 14:49:53 2017 -0500 drm/amdgpu: soc15 enable (v3) Add soc15 support and enable all the IPs for vega10. v2: squash in xclk fix v3: disable HDP MGCG Acked-by: Christian König Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 3 + drivers/gpu/drm/amd/amdgpu/soc15.c | 806 ++++++++++++++++++++++++++++++++ 3 files changed, 810 insertions(+), 1 deletion(-) commit f83a9991648bb4023a53104db699e99305890d51 Author: Eric Huang Date: Mon Mar 6 14:03:02 2017 -0500 drm/amd/powerplay: add Vega10 powerplay support (v5) Adds power management support for vega10. v2: squash in fan control and led config fixes from Rex v3: squash in dead code removal and socvid fixes from Rex v4: squash in dpm force level fix from Rex v5: squash in latest headless, gpu load fixes from Rex Acked-by: Christian König Signed-off-by: Eric Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 1 + drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 4 +- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 9 + drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 4450 ++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h | 434 ++ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_inc.h | 44 + .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 137 + .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.h | 65 + .../gpu/drm/amd/powerplay/hwmgr/vega10_pptable.h | 331 ++ .../amd/powerplay/hwmgr/vega10_processpptables.c | 1056 +++++ .../amd/powerplay/hwmgr/vega10_processpptables.h | 34 + .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 761 ++++ .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.h | 83 + drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 3 + drivers/gpu/drm/amd/powerplay/inc/pp_soc15.h | 48 + drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 3 + drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 9 + .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 564 +++ .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h | 70 + 20 files changed, 8106 insertions(+), 2 deletions(-) commit d018772748fc474b2265ce333a704620b17df3fd Author: Eric Huang Date: Mon Mar 6 13:13:48 2017 -0500 drm/amd/powerplay: add some display/powerplay interfaces New interfaces needed to handle the new clock trees and bandwidth requirements on vega10. Acked-by: Christian König Signed-off-by: Eric Huang Acked-by: Alex Deucher Acked-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 94 ++++++++++++++++++++++ .../gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 49 +++++++++++ drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 28 ++++++- .../gpu/drm/amd/powerplay/inc/hardwaremanager.h | 11 +++ drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 10 +++ 5 files changed, 191 insertions(+), 1 deletion(-) commit a2dd023a7788ba6eb67fc4f7666c08c1a2846e2f Author: Eric Huang Date: Mon Mar 6 13:01:48 2017 -0500 drm/amd: add structures for display/powerplay interface Acked-by: Christian König Signed-off-by: Eric Huang Acked-by: Alex Deucher Acked-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/dm_pp_interface.h | 83 +++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit e29922795f0987b0ebd109a604e77d3474b50ba6 Author: Eric Huang Date: Mon Mar 6 12:34:32 2017 -0500 drm/amd/powerplay: add some new structures for Vega10 Acked-by: Christian König Signed-off-by: Eric Huang Reviewed-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr_ppt.h | 16 ++- .../gpu/drm/amd/powerplay/inc/hardwaremanager.h | 32 ++++++ drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 112 ++++++++++++++++++++- 3 files changed, 155 insertions(+), 5 deletions(-) commit 2a5071056e6a601efafe628a2f8162e16397ee2d Author: Rex Zhu Date: Mon Feb 20 17:07:36 2017 +0800 drm/amd/powerplay: add global PowerPlay mutex. Acked-by: Christian König Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 192 ++++++++++++++++-------- drivers/gpu/drm/amd/powerplay/inc/pp_instance.h | 1 + 2 files changed, 132 insertions(+), 61 deletions(-) commit 0d2c7569e1963f10f418c3f8a1c62b0935aa110f Author: Eric Huang Date: Fri Mar 3 19:20:47 2017 -0500 drm/amdgpu: add new atomfirmware based helpers for powerplay New helpers for fetching info out of atomfirmware. Acked-by: Christian König Signed-off-by: Eric Huang Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c | 396 +++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.h | 140 ++++++++ 3 files changed, 537 insertions(+), 1 deletion(-) commit bcea239686bccbbf2c8576a3ed382805104eb537 Author: Eric Huang Date: Fri Mar 3 18:50:50 2017 -0500 drm/amd/powerplay: add new Vega10's ppsmc header file Acked-by: Christian König Signed-off-by: Eric Huang Reviewed-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/vega10_ppsmc.h | 131 +++++++++++++++++++++++ 1 file changed, 131 insertions(+) commit 25e2196cc8b94f4547516c6844128d3f064ff60f Author: Eric Huang Date: Fri Mar 3 18:49:56 2017 -0500 drm/amd/powerplay: add smu9 header files for Vega10 Acked-by: Christian König Signed-off-by: Eric Huang Reviewed-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smu9.h | 147 ++++++++ drivers/gpu/drm/amd/powerplay/inc/smu9_driver_if.h | 418 +++++++++++++++++++++ 2 files changed, 565 insertions(+) commit d1de1ed3dfa672e7f79ebef1f7321e17cb6d3a0c Author: Huang Rui Date: Thu Feb 16 11:53:38 2017 +0800 drm/amdgpu: add SMC firmware into global ucode list for psp loading Acked-by: Christian König Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6a7ed07e272d058a72910571a0d189bd04f92b49 Author: Huang Rui Date: Fri Mar 3 19:15:26 2017 -0500 drm/amdgpu: add psp firmware info into info query and debugfs Acked-by: Christian König Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 25 +++++++++++++++++++++++++ include/uapi/drm/amdgpu_drm.h | 4 ++++ 2 files changed, 29 insertions(+) commit 0e5ca0d1ac07ef8b3a52d3b0404482207cb4da5a Author: Huang Rui Date: Fri Mar 3 18:37:23 2017 -0500 drm/amdgpu: add PSP driver for vega10 (v2) PSP is responsible for firmware loading on SOC-15 asics. v2: fix memory leak (Ken) Acked-by: Christian König Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 5 + drivers/gpu/drm/amd/amdgpu/amdgpu.h | 9 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 481 +++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 127 ++++++++ drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | 269 +++++++++++++++ drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 507 +++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/psp_v3_1.h | 50 +++ drivers/gpu/drm/amd/include/amd_shared.h | 1 + 9 files changed, 1450 insertions(+) commit c1dc356a116c992433c5c68e7c493b0fa3e6f9b1 Author: Leo Liu Date: Fri Mar 3 18:27:49 2017 -0500 drm/amdgpu: add initial vce 4.0 support for vega10 Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 + drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 894 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/vce_v4_0.h | 29 ++ 4 files changed, 932 insertions(+), 1 deletion(-) commit 09bfb8912dc16383ce9f95600134d8eb120107f8 Author: Leo Liu Date: Fri Mar 3 18:13:26 2017 -0500 drm/amdgpu: add initial uvd 7.0 support for vega10 Acked-by: Christian König Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 52 +- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 1543 +++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/uvd_v7_0.h | 29 + 4 files changed, 1615 insertions(+), 12 deletions(-) commit 89ee9f7680031d7df91a1a27abac69e034c2e892 Author: Keith Busch Date: Wed Mar 29 22:48:59 2017 -0500 PCI: Add device disconnected state Add a new state to pci_dev to be set when it is unexpectedly disconnected. The PCI driver tear down functions can observe this new device state so they may skip operations that will fail. The pciehp and pcie-dpc drivers are aware when the link is down, so these set the flag when their handlers detect the device is disconnected. Tested-by: Krishna Dhulipala Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Reviewed-by: Wei Zhang drivers/pci/hotplug/pciehp_pci.c | 6 ++++++ drivers/pci/pci.h | 14 ++++++++++++++ drivers/pci/pcie/pcie-dpc.c | 5 +++++ include/linux/pci.h | 2 ++ 4 files changed, 27 insertions(+) commit 282aae555e13b073715c4219b80d0396e3b0bd9c Author: Ken Wang Date: Fri Mar 3 18:06:01 2017 -0500 drm/amdgpu: add vega10 interrupt handler Acked-by: Christian König Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 424 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/vega10_ih.h | 30 +++ 3 files changed, 456 insertions(+), 1 deletion(-) commit b1023571479020e9e9c15a51b43bf8e15406952b Author: Ken Wang Date: Fri Mar 3 17:59:39 2017 -0500 drm/amdgpu: implement GFX 9.0 support (v2) Add support for gfx v9.0. v2: update golden settings from Ken Acked-by: Christian König Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3292 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.h | 35 + 4 files changed, 3331 insertions(+), 1 deletion(-) commit 2130f89ced2cc0f5113bb427c1cbc7a4ca7729c7 Author: Ken Wang Date: Fri Mar 3 17:31:51 2017 -0500 drm/amdgpu: add SDMA v4.0 implementation (v2) v2: fix Makefile Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 1553 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.h | 30 + 3 files changed, 1585 insertions(+), 1 deletion(-) commit e60f8db5e4c85d7f8868a06b02f06c0ae0e4c332 Author: Alex Xie Date: Thu Mar 9 11:36:26 2017 -0500 drm/amdgpu: Add GMC 9.0 support (v2) On SOC-15 parts, the GMC (Graphics Memory Controller) consists of two hubs: GFX (graphics and compute) and MM (sdma, uvd, vce). v2: drop sdma from Makefile, fix duplicate return statement. Signed-off-by: Alex Xie Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 30 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 28 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 447 +++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.h | 35 ++ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 825 +++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.h | 30 ++ drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 585 ++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h | 35 ++ drivers/gpu/drm/amd/include/amd_shared.h | 2 + 10 files changed, 2013 insertions(+), 7 deletions(-) commit c1d83da98070588bc74a1c601981b3e8a87784bb Author: Junwei Zhang Date: Fri Mar 3 17:46:40 2017 -0500 drm/amdgpu: add NBIO 6.1 driver This handles nbio 6.1 specific implementations which are used by various other IPs. Acked-by: Christian König Signed-off-by: Hawking Zhang Signed-off-by: Junwei Zhang Reviewed-by: Alex Deucher Signed-off-by: Tom St Denis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 233 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/nbio_v6_1.h | 52 ++++++++ 3 files changed, 286 insertions(+), 1 deletion(-) commit b0fd18b0712307e1cd930c273795664d43d97871 Author: Alex Xie Date: Fri Mar 3 16:49:39 2017 -0500 drm/amdgpu: handle PTE MTYPE in amdgpu_vm_bo_split_mapping Reviewed-by: Christian König Signed-off-by: Alex Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +++ 1 file changed, 3 insertions(+) commit 15b31c59bc71c9c7e7c1d13cd62e38b9ef67379e Author: Alex Xie Date: Fri Mar 3 16:47:11 2017 -0500 drm/amdgpu: handle PTE EXEC in amdgpu_vm_bo_split_mapping Reviewed-by: Christian König Signed-off-by: Alex Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +++ 1 file changed, 3 insertions(+) commit a0676f608322812f9a71e15144d25c32d60c954d Author: Alex Deucher Date: Fri Mar 3 16:42:27 2017 -0500 drm/amdgpu: gart fixes for vega10 Flags need to be 0 to be considered invalid. Reviewed-by: Christian König Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eb6611135f3b588fd8b4c68ae95a00c78f832382 Author: Huang Rui Date: Fri Mar 3 16:25:23 2017 -0500 drm/amdgpu: add psp firmware header info Defines the header info for the psp firmware. Acked-by: Christian König Signed-off-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2445b22751a0c039c2d1f35412e45350e847855d Author: Huang Rui Date: Fri Mar 3 16:20:35 2017 -0500 drm/amdgpu: rework common ucode handling for vega10 Handle ucode differences in vega10. Acked-by: Christian König Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 70 +++++++++++++++++++++---------- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 5 +++ 3 files changed, 53 insertions(+), 23 deletions(-) commit 9079ac7666c23fecc0b59d136efd349fc1038ba6 Author: Marek Olšák Date: Fri Mar 3 16:03:15 2017 -0500 drm/amdgpu: don't validate TILE_SPLIT on GFX9 Signed-off-by: Marek Olšák Acked-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 00ac6f6be1c875495320c257a70c82768fffedb3 Author: Alex Deucher Date: Fri Mar 3 16:00:11 2017 -0500 drm/amdgpu: add tiling flags for GFX9 (v2) v2: Marek: allow shifts >32 in AMDGPU_TILING_SET/GET Acked-by: Christian König Signed-off-by: Alex Deucher include/uapi/drm/amdgpu_drm.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit a8f1f1ce286a94e8c3cb9cc8b4b21560793d4518 Author: Alex Deucher Date: Fri Mar 3 15:54:06 2017 -0500 drm/amdgpu: Add asic family for vega10 Acked-by: Christian König Signed-off-by: Alex Deucher include/uapi/drm/amdgpu_drm.h | 1 + 1 file changed, 1 insertion(+) commit bce23e00f3369ce8c32c90f087e37c01f83002d1 Author: Alex Deucher Date: Tue Mar 28 12:52:08 2017 -0400 drm/amdgpu: add NGG parameters NGG (Next Generation Graphics) is a new feature in GFX9.0. This adds the relevant parameters. Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 29 +++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 21 +++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 7 +++++++ include/uapi/drm/amdgpu_drm.h | 8 ++++++++ 4 files changed, 65 insertions(+) commit ca02061c7a8ca3956e9e1cd60947b97d444e1622 Author: Alex Deucher Date: Fri Mar 3 15:23:14 2017 -0500 drm/amdgpu: add PTE defines for MTYPE New on SOC-15 asics. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 4 ++++ 1 file changed, 4 insertions(+) commit cef105f7dc0ad2b9bcaab77f05d520ac7d556ab3 Author: Christian König Date: Tue Dec 6 03:41:55 2016 -0500 drm/amdgpu: add IV trace point This allows us to grab IVs without spamming the log. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 37 +++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) commit 614dea315fceee86384f539064a30329961579b0 Author: Alex Deucher Date: Fri Mar 3 15:08:30 2017 -0500 drm/amdgpu: update IH IV ring entry for soc-15 Reflect the new format on soc-15 asics. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit be34d3bfe35d108c32b7e5b03ca6fbb5917e962d Author: Alex Deucher Date: Fri Mar 3 14:26:51 2017 -0500 drm/amdgpu: use atomfirmware interfaces for scratch reg save/restore If the board is atomfirmware based. Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 66e02bc343bafac589875a72607a1ae6c4d25bcb Author: Alex Xie Date: Tue Feb 14 12:04:52 2017 -0500 drm/amdgpu: Add MTYPE flags to GPU VM IOCTL interface Signed-off-by: Alex Xie Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +- include/uapi/drm/amdgpu_drm.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) commit 39807b939e2ca619d57eb9cae31f7d70a36392ed Author: Ken Wang Date: Fri Mar 18 15:41:42 2016 +0800 drm/amdgpu: add 64bit doorbell assignments Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 68 +++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit d0e95758e3b122c5fea63ce5c3898dcc5e5ea846 Author: Andrey Grodzovsky Date: Mon Dec 12 13:40:37 2016 -0500 drm/amdgpu: gb_addr_config struct Acked-by: Christian König Signed-off-by: Andrey Grodzovsky Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e635ee07456ac686b3c26ab3c5735936faebfb2e Author: Huang Rui Date: Tue Nov 1 15:35:38 2016 +0800 drm/amdgpu: use new flag to handle different firmware loading method This patch introduces a new flag named "amdgpu_firmware_load_type" to handle different firmware loading method. Since Vega10, there are three ways to load firmware. It would be better to use a flag and a fw_load_type kernel parameter to configure it. Acked-by: Christian König Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 10 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 67 +++++++++++++++++++++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 3 ++ drivers/gpu/drm/amd/amdgpu/cik.c | 2 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6 +-- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 4 +- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/vi.c | 4 +- 10 files changed, 90 insertions(+), 20 deletions(-) commit 70170d146d0f8d6df6c1edafa70cf983027f7a6e Author: ken Date: Thu Mar 9 11:34:42 2017 -0500 drm/amdgpu: add clinetid definition for vega10 Signed-off-by: ken Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 42 ++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) commit d4196f011caa31ae66ba4c08002054a0caffecc0 Author: Ken Wang Date: Wed Mar 9 09:28:32 2016 +0800 drm/amdgpu: add vega10 chip name Acked-by: Christian König Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + drivers/gpu/drm/amd/include/amd_shared.h | 1 + 2 files changed, 2 insertions(+) commit 8e3153ba3f623b325b00303fe6d998b868adfe0b Author: Ken Wang Date: Mon Mar 6 12:41:22 2017 -0500 drm/amdgpu: add common soc15 headers These are used by various IP modules. Acked-by: Christian König Signed-off-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.h | 35 ++++ drivers/gpu/drm/amd/amdgpu/soc15_common.h | 57 ++++++ drivers/gpu/drm/amd/amdgpu/soc15d.h | 285 ++++++++++++++++++++++++++++++ 3 files changed, 377 insertions(+) commit 90df1d55a2fce965c2da79a400fae3bac3fcc4ae Author: Alex Deucher Date: Thu Mar 2 17:49:04 2017 -0500 drm/amdgpu: add SDMA 4.0 packet header Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vega10_sdma_pkt_open.h | 3335 +++++++++++++++++++++ 1 file changed, 3335 insertions(+) commit 6a38ce8f19b58d554d17718c23b95038998b167e Author: Alex Deucher Date: Thu Mar 2 17:48:14 2017 -0500 drm/amdgpu: add gfx9 clearstate header Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/clearstate_gfx9.h | 941 +++++++++++++++++++++++++++ 1 file changed, 941 insertions(+) commit 4b219123e9edd8b99809e0c7c0eb201f6e6fc655 Author: Felix Kuehling Date: Thu Mar 2 16:57:08 2017 -0500 drm/amd: Add MQD structs for GFX V9 This header defines the gfx v9 MEC structures. Acked-by: Christian König Signed-off-by: Felix Kuehling Reviewed-by: Shaoyun Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/v9_structs.h | 675 +++++++++++++++++++++++++++++++ 1 file changed, 675 insertions(+) commit f6c3947893fd1ff8a4d95cb8ccd43ce20a6d5448 Author: Alex Deucher Date: Thu Mar 2 16:43:33 2017 -0500 drm/amdgpu: add the VCE 4.0 register headers These are the Video Compression Engine registers for vega10. Signed-off-by: Alex Deucher .../include/asic_reg/vega10/VCE/vce_4_0_default.h | 122 ++++++ .../include/asic_reg/vega10/VCE/vce_4_0_offset.h | 208 +++++++++ .../include/asic_reg/vega10/VCE/vce_4_0_sh_mask.h | 488 +++++++++++++++++++++ 3 files changed, 818 insertions(+) commit 7008d577d6c90a3a6a8cd0d6fb41d469326d9077 Author: Alex Deucher Date: Thu Mar 2 16:42:58 2017 -0500 drm/amdgpu: add the UVD 7.0 register headers These are the Unifed Video Decoder registers for vega10. Signed-off-by: Alex Deucher .../include/asic_reg/vega10/UVD/uvd_7_0_default.h | 127 ++++ .../include/asic_reg/vega10/UVD/uvd_7_0_offset.h | 222 ++++++ .../include/asic_reg/vega10/UVD/uvd_7_0_sh_mask.h | 811 +++++++++++++++++++++ 3 files changed, 1160 insertions(+) commit 893f25540e698326ac696fa56b99fd6a9b285b61 Author: Alex Deucher Date: Thu Mar 2 16:42:12 2017 -0500 drm/amdgpu: add THM 9.0 register headers These are the THerMal control registers for vega10. Signed-off-by: Alex Deucher .../include/asic_reg/vega10/THM/thm_9_0_default.h | 194 +++ .../include/asic_reg/vega10/THM/thm_9_0_offset.h | 363 ++++++ .../include/asic_reg/vega10/THM/thm_9_0_sh_mask.h | 1314 ++++++++++++++++++++ 3 files changed, 1871 insertions(+) commit 63d311d9b47e3652ad20c9bb045bd110cdca2182 Author: Alex Deucher Date: Thu Mar 2 16:41:21 2017 -0500 drm/amdgpu: add SMUIO 9.0 register headers These are the System Managment Unit IO registers for vega10. Signed-off-by: Alex Deucher .../asic_reg/vega10/SMUIO/smuio_9_0_default.h | 100 ++++++++ .../asic_reg/vega10/SMUIO/smuio_9_0_offset.h | 175 ++++++++++++++ .../asic_reg/vega10/SMUIO/smuio_9_0_sh_mask.h | 258 +++++++++++++++++++++ 3 files changed, 533 insertions(+) commit 456f97704f93c7f6e49084759a26872463455318 Author: Alex Deucher Date: Thu Mar 2 16:40:41 2017 -0500 drm/amdgpu: add SDMA 4.0 register headers These are the System DMA register headers for vega10. Signed-off-by: Alex Deucher .../asic_reg/vega10/SDMA0/sdma0_4_0_default.h | 286 +++ .../asic_reg/vega10/SDMA0/sdma0_4_0_offset.h | 547 ++++++ .../asic_reg/vega10/SDMA0/sdma0_4_0_sh_mask.h | 1852 ++++++++++++++++++++ .../asic_reg/vega10/SDMA1/sdma1_4_0_default.h | 282 +++ .../asic_reg/vega10/SDMA1/sdma1_4_0_offset.h | 539 ++++++ .../asic_reg/vega10/SDMA1/sdma1_4_0_sh_mask.h | 1810 +++++++++++++++++++ 6 files changed, 5316 insertions(+) commit 5a8288c0f9894410da7ced14d07568752cc6a629 Author: Alex Deucher Date: Thu Mar 2 16:39:12 2017 -0500 drm/amdgpu: add OSSSYS 4.0 register headers These are the OS Services register headers for vega10. Signed-off-by: Alex Deucher .../asic_reg/vega10/OSSSYS/osssys_4_0_default.h | 176 +++ .../asic_reg/vega10/OSSSYS/osssys_4_0_offset.h | 327 ++++++ .../asic_reg/vega10/OSSSYS/osssys_4_0_sh_mask.h | 1196 ++++++++++++++++++++ 3 files changed, 1699 insertions(+) commit 198b746016ea6aece3454c47fefa0bf96e76104e Author: Alex Deucher Date: Thu Mar 2 16:38:26 2017 -0500 drm/amdgpu: add NBIO 6.1 register headers These are the Bus IO registers for vega10. Signed-off-by: Alex Deucher .../asic_reg/vega10/NBIO/nbio_6_1_default.h | 22340 +++ .../include/asic_reg/vega10/NBIO/nbio_6_1_offset.h | 3649 + .../asic_reg/vega10/NBIO/nbio_6_1_sh_mask.h | 133884 ++++++++++++++++++ 3 files changed, 159873 insertions(+) commit 61e04478b2e10f005b78e835b134ffa805b2f389 Author: Alex Deucher Date: Thu Mar 2 16:37:25 2017 -0500 drm/amdgpu: add NBIF 6.1 register headers These are the Bus InterFace registers for vega10. Signed-off-by: Alex Deucher .../asic_reg/vega10/NBIF/nbif_6_1_default.h | 1271 +++ .../include/asic_reg/vega10/NBIF/nbif_6_1_offset.h | 1688 +++ .../asic_reg/vega10/NBIF/nbif_6_1_sh_mask.h | 10281 +++++++++++++++++++ 3 files changed, 13240 insertions(+) commit 3ec127a075430006cdeccb1a3effa2d4a3ac340e Author: Alex Deucher Date: Thu Mar 2 16:36:07 2017 -0500 drm/amdgpu: add MP 9.0 register headers MP is the system management controller on vega10. Signed-off-by: Alex Deucher .../include/asic_reg/vega10/MP/mp_9_0_default.h | 342 +++++ .../amd/include/asic_reg/vega10/MP/mp_9_0_offset.h | 375 +++++ .../include/asic_reg/vega10/MP/mp_9_0_sh_mask.h | 1463 ++++++++++++++++++++ 3 files changed, 2180 insertions(+) commit 68c7d1305258c8a3048d5ec14c740a1560992605 Author: Alex Deucher Date: Thu Mar 2 16:34:19 2017 -0500 drm/amdgpu: add the MMHUB 1.0 register headers Add the MultiMedia Hub registers for vega10. Signed-off-by: Alex Deucher .../asic_reg/vega10/MMHUB/mmhub_1_0_default.h | 1011 ++ .../asic_reg/vega10/MMHUB/mmhub_1_0_offset.h | 1967 ++++ .../asic_reg/vega10/MMHUB/mmhub_1_0_sh_mask.h | 10127 +++++++++++++++++++ 3 files changed, 13105 insertions(+) commit bcfb47cdd76a20b3c596981ea7b35fa23abac4c8 Author: Alex Deucher Date: Thu Mar 2 16:33:31 2017 -0500 drm/amdgpu: add the HDP 4.0 register headers These are the Host Data Path registers for vega10. Signed-off-by: Alex Deucher .../include/asic_reg/vega10/HDP/hdp_4_0_default.h | 117 ++++ .../include/asic_reg/vega10/HDP/hdp_4_0_offset.h | 209 +++++++ .../include/asic_reg/vega10/HDP/hdp_4_0_sh_mask.h | 601 +++++++++++++++++++++ 3 files changed, 927 insertions(+) commit 5585476e44a4374b25597476b162e932a08e898e Author: Alex Deucher Date: Thu Mar 2 16:32:16 2017 -0500 drm/amdgpu: add the GC 9.0 register headers Add the Graphics Core register headers for vega10. Signed-off-by: Alex Deucher .../include/asic_reg/vega10/GC/gc_9_0_default.h | 3873 +++ .../amd/include/asic_reg/vega10/GC/gc_9_0_offset.h | 7230 +++++ .../include/asic_reg/vega10/GC/gc_9_0_sh_mask.h | 29868 +++++++++++++++++++ 3 files changed, 40971 insertions(+) commit 4adc5ab813eaf57fe4027ea93fcc91182f613495 Author: Alex Deucher Date: Thu Mar 2 16:31:08 2017 -0500 drm/amdgpu: Add the DCE 12.0 register headers These are the register headers for the Display and Composition Engine on vega10. Signed-off-by: Alex Deucher .../include/asic_reg/vega10/DC/dce_12_0_default.h | 9868 +++ .../include/asic_reg/vega10/DC/dce_12_0_offset.h | 18193 ++++++ .../include/asic_reg/vega10/DC/dce_12_0_sh_mask.h | 64636 +++++++++++++++++++ 3 files changed, 92697 insertions(+) commit 7fee1fd93b105e8ab7a89960097bb6c17aab0e52 Author: Alex Deucher Date: Thu Mar 2 16:30:06 2017 -0500 drm/amdgpu: Add ATHUB 1.0 register headers ATHUB is part of the memory controller on soc15 asics. Signed-off-by: Alex Deucher .../asic_reg/vega10/ATHUB/athub_1_0_default.h | 241 +++ .../asic_reg/vega10/ATHUB/athub_1_0_offset.h | 453 +++++ .../asic_reg/vega10/ATHUB/athub_1_0_sh_mask.h | 2045 ++++++++++++++++++++ 3 files changed, 2739 insertions(+) commit 733acf561e0e93e4c38ce6581c65bd2c4b499779 Author: Alex Deucher Date: Thu Mar 2 16:29:09 2017 -0500 drm/amdgpu: add vega10_enum.h This adds the register bitfield enums for vega10. Signed-off-by: Alex Deucher .../drm/amd/include/asic_reg/vega10/vega10_enum.h | 22531 +++++++++++++++++++ 1 file changed, 22531 insertions(+) commit 1fd1cc5640a9632aa9b9c3b01eedeb36ecc555d3 Author: Alex Deucher Date: Thu Mar 2 16:28:29 2017 -0500 drm/amdgpu: add soc15ip.h This header defines the IP layout for soc15 based SoCs. Signed-off-by: Alex Deucher .../gpu/drm/amd/include/asic_reg/vega10/soc15ip.h | 1343 ++++++++++++++++++++ 1 file changed, 1343 insertions(+) commit a5bde2f964fa0657b8750156d9bc0ca156e18d2b Author: Alex Deucher Date: Fri Sep 23 16:23:41 2016 -0400 drm/amdgpu: add basic support for atomfirmware.h (v3) This adds basic support for asics that use atomfirmware.h to define their vbios tables. v2: rebase v3: squash in num scratch reg fix Acked-by: Christian König Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 112 +++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h | 33 +++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 35 ++++--- 5 files changed, 172 insertions(+), 13 deletions(-) commit 43bf11bd9231ad06bd1d91c847beda52b88bc6e0 Author: Alex Deucher Date: Fri Sep 23 13:10:49 2016 -0400 drm/amdgpu: move atom scratch setup into amdgpu_atombios.c There will be a slightly different version for atomfirmware. Acked-by: Christian König Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 28 ++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/atom.c | 26 -------------------------- drivers/gpu/drm/amd/amdgpu/atom.h | 1 - 5 files changed, 32 insertions(+), 28 deletions(-) commit 0cdd500560e233aef4e0749c9f014e9ee8f4d752 Author: Alex Deucher Date: Mon Feb 13 16:01:58 2017 -0500 amdgpu: detect if we are using atomfirmware or atombios for vbios (v2) Supposedly atomfirmware rom header is 3.3 atombios is 1.1. v2: rebased on newer kernel Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 30 +++++++++++++++++++++++------- 2 files changed, 24 insertions(+), 7 deletions(-) commit 1fadf42ed5b816d266d68b4e8622c33d03c968bb Author: Alex Deucher Date: Thu Mar 2 16:55:42 2017 -0500 drm/amdgpu: add the new atomfirmware interface header soc15 asics have a new vbios interface. These headers define that interface. Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/atomfirmware.h | 2385 ++++++++++++++++++++++++++ drivers/gpu/drm/amd/include/atomfirmwareid.h | 86 + drivers/gpu/drm/amd/include/displayobject.h | 249 +++ 3 files changed, 2720 insertions(+) commit f34678187a339702256c70c88c3db2d1975484ce Author: Nicolai Hähnle Date: Thu Mar 23 19:36:31 2017 +0100 drm/amdgpu: add optional fence out-parameter to amdgpu_vm_clear_freed We will add the fence to freed buffer objects in a later commit, to ensure that the underlying memory can only be re-used after all references in page tables have been cleared. Signed-off-by: Nicolai Hähnle Reviewed-by: Chunming Zhou Reviewed-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 21 +++++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 ++- 4 files changed, 19 insertions(+), 9 deletions(-) commit 923d26db85e8188bdbfeb7f8d70dfd86d901d4f0 Author: Eric Huang Date: Mon Mar 13 14:15:48 2017 -0400 drm/amd/powerplay: restore disabling power containment on Fiji (v2) Power containment will degrade performance in some compute tests. Restore disabling it as before code refining in powerplay. v2: only in the compute profile Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a2140e00e0b8c90b380497f3af3532ba0408213e Author: Alex Deucher Date: Thu Mar 23 13:00:20 2017 -0400 drm/amdgpu/gfx8: further KIQ parameter cleanup The ring structure already has what we need. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 345346108bdca312b3458374a7fac833490a1303 Author: Alex Deucher Date: Thu Mar 23 02:16:07 2017 -0400 drm/amdgpu/gfx8: store the eop gpu addr in the ring structure Avoids passing around additional parameters during setup. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 14 ++++++-------- 2 files changed, 7 insertions(+), 8 deletions(-) commit 015c23600a4dc9844c4a6195a343604bcc88ba01 Author: Alex Deucher Date: Thu Mar 23 02:06:04 2017 -0400 drm/amdgpu/gfx8: reduce the functon params for mpq setup Everything we need is in the ring structure. No need to pass all the bits explicitly. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) commit f2effd49e7093978aebf1f79cb586cfd19aa7fb0 Author: Alex Deucher Date: Thu Mar 23 01:51:53 2017 -0400 drm/amdgpu/gfx8: reserve kiq eop object before unmapping it It's required. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0104cf25365b0a28f2fc86d034cb0af95cb11753 Author: Alex Deucher Date: Thu Mar 23 01:40:19 2017 -0400 drm/amdgpu/gfx8: fold loops in kiq_resume() No need to loop through the compute queues twice. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ---- 1 file changed, 4 deletions(-) commit 2e263c824a5dfc3adcadac0ac1aed762605f0538 Author: Alex Deucher Date: Thu Mar 23 01:38:11 2017 -0400 drm/amdgpu/gfx8: test KIQ before compute rings If KIQ isn't working, the compute rings won't work either. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 6a6f380f07c4f64d3517281eb0f484b54ce4a30e Author: Alex Deucher Date: Thu Mar 23 01:35:44 2017 -0400 drm/amdgpu/gfx8: reserve mqd objects before mapping them It's required. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) commit 0875a242962cd9d2cd85a589c63393706d4f27e8 Author: Alex Deucher Date: Tue Mar 28 12:50:32 2017 -0400 drm/amdgpu/gfx8: rename some functions To better match where they are used. Called from sw_init and sw_fini. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b0ac2a32ad2ac0c5f542cc1acc7488b9023f8290 Author: Alex Deucher Date: Thu Mar 23 01:05:08 2017 -0400 drm/amdgpu/gfx8: whitespace cleanup Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 0d52c6a13eb1fd45a6d31825848efc800d38b3c9 Author: Rex Zhu Date: Tue Mar 21 12:51:48 2017 +0800 drm/amdgpu: load mc firware in driver for Polaris. load mc ucode in driver if VBIOS not loaded a full version of MC ucode, Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: jimqu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 90 ++++++++++++++++++++++++++++++++--- 1 file changed, 84 insertions(+), 6 deletions(-) commit aacbbc8bc1f76c4ba767a520b8de00e74c88c8ba Author: Chunming Zhou Date: Tue Mar 21 10:09:33 2017 +0800 drm/amdgpu: fix duplicated code it could come from branch merge. Signed-off-by: Chunming Zhou Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ---- 1 file changed, 4 deletions(-) commit 739e9fffde08ac83693d86427876dbcb043d00eb Author: Rex Zhu Date: Fri Mar 17 19:04:55 2017 +0800 drm/amdgpu: enable gfx/system/vce clockgating on Polars12. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vi.c | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) commit 1c622002b1aae6bf97be6f3c36203a61d8cc61cb Author: Rex Zhu Date: Fri Mar 17 16:21:55 2017 +0800 drm/amd/powerplay: add a new register define for APU in VI. the ixcurrent_pg_status addr is different between APU and DGPU. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 8 ++++++-- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 8 ++++++-- drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_1_2_d.h | 1 + drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_1_3_d.h | 2 ++ 4 files changed, 15 insertions(+), 4 deletions(-) commit 170d6e94e51939d17973d4d088f4ae85b446fb58 Author: Eric Huang Date: Fri Aug 12 13:47:08 2016 -0400 drm/amdgpu: enable GFX/UVD/VCE PG for Bristol Signed-off-by: Eric Huang Signed-off-by: Samuel Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d1aff8ec49c3ece05cee9b6e63d44e96a420b068 Author: Tom St Denis Date: Tue Aug 9 18:01:55 2016 -0400 drm/amd/amdgpu: Set VCE/UVD off during late init Forces VCE/UVD off during late init to ensure they're powered off correctly during boot. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Samuel Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ 1 file changed, 4 insertions(+) commit f917c2ad92c416b05d876f513a9963a6f5ed139d Author: Colin Ian King Date: Fri Mar 17 14:37:22 2017 +0000 drm/amdgpu: remove redundant outer loop and remove commented out code The outer loop is redundant and can be removed as it is doing nothing useful. Also remove some commented out code that is not being used. Detected by CoverityScan, CID#1402073 Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) commit 153de9dff94cc559646b04f232738e22ee318705 Author: Chunming Zhou Date: Thu Mar 16 11:44:49 2017 +0800 drm/amd/sched: revise priority number big number is to high priority. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 4 ++-- drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) commit 8eafd505db3dc20459da7687101e02824b10f141 Author: Alex Deucher Date: Thu Mar 16 10:45:58 2017 -0400 drm/amdgpu: bump version for PRT support Reviewed-by: Junwei Zhang Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 27f6d61036a8cb25d144c8bcc6c15e2b54cec566 Author: Junwei Zhang Date: Thu Mar 16 16:09:24 2017 +0800 drm/amdgpu: fix before and after mapping judgement for replace mapping If the before mapping is 1 page size, so its start and last will be same. Thus below condition will become false, then to free the before mapping. > if (before->it.start != before->it.last) But in this case, we need the before mapping of 1 page size. So does after mapping. Signed-off-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 80f95c579d800fa22e9e57ecb3d50b9e93bc1f82 Author: Christian König Date: Mon Mar 13 10:13:39 2017 +0100 drm/amdgpu: add a VM mapping replace operation v2 Add a new operation to replace mappings in a VM with a new one. v2: Fix Jerry's comment, separate out clear operation. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 15 +++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 64 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 4 +++ include/uapi/drm/amdgpu_drm.h | 1 + 4 files changed, 83 insertions(+), 1 deletion(-) commit dc54d3d1744d23ed0b345fd8bc1c493b74e8df44 Author: Christian König Date: Mon Mar 13 10:13:38 2017 +0100 drm/amdgpu: implement AMDGPU_VA_OP_CLEAR v2 A new VM operation to remove all mappings in a range. v2: limit unmapped area as noted by Jerry Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 27 ++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 99 +++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 + include/uapi/drm/amdgpu_drm.h | 1 + 5 files changed, 124 insertions(+), 8 deletions(-) commit 663e4577a5733fab18d601128f54486d78595bc0 Author: Christian König Date: Mon Mar 13 10:13:37 2017 +0100 drm/amdgpu: separate page table allocation from mapping This makes it easier to implement a replace operation. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 9 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 136 +++++++++++++++++-------------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 + 4 files changed, 92 insertions(+), 62 deletions(-) commit 4388fc2ab0e83fd6247c48c7e97064cc75511848 Author: Christian König Date: Mon Mar 13 10:13:36 2017 +0100 drm/amdgpu: make set_prt callback optional and fix error handling PRT support is completely implemented now and we left it turned on accidentially in the error path. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit d319c2bcc6b5d716e10f5cb3efe0adf43d3b06ed Author: Alex Deucher Date: Wed Mar 15 22:05:20 2017 -0400 drm/amdgpu/vi: add missing error handling when setting uvd dclk Reviewed-by: Christian König Reviewed-by: Emil Velikov Reported-by: David Binderman Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 2 ++ 1 file changed, 2 insertions(+) commit 8085c699688dbadbf5d8ad3e1c14fc72498d2502 Author: Alex Deucher Date: Wed Mar 15 22:03:08 2017 -0400 drm/amdgpu/vi: remove duplicate CG flags GFX_MGLS was added twice. Reviewed-by: Christian König Reviewed-by: Emil Velikov Reported-by: David Binderman Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 2 -- 1 file changed, 2 deletions(-) commit 93a4aec2180f3950e98b2eedfd231f0eea1ece88 Author: Andrew F. Davis Date: Wed Mar 15 11:20:24 2017 -0500 drm/amd/powerplay: remove unneeded conversions to bool Found with scripts/coccinelle/misc/boolconv.cocci. Signed-off-by: Andrew F. Davis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7e91366420554e7d33fae3a56b41366ce088de04 Author: Andrew F. Davis Date: Wed Mar 15 11:20:23 2017 -0500 drm/amdgpu: remove unneeded conversions to bool Found with scripts/coccinelle/misc/boolconv.cocci. Signed-off-by: Andrew F. Davis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/vi.c | 16 ++++++++-------- 4 files changed, 14 insertions(+), 14 deletions(-) commit c98b5c9714942bd1872d86f65f975b474614a380 Author: Andres Rodriguez Date: Sat Mar 11 10:50:34 2017 -0500 drm/amdgpu: add macro to retrieve timeline name v2 This helps de-duplicate a long expression and removes overly long lines. v2: Rename macro and undef it Reviewed-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit ced2ef66dcf15b9a2ebf766a57b8fbf0726c27d7 Author: Andres Rodriguez Date: Thu Mar 9 21:25:54 2017 -0500 drm/amdgpu: replace fence pointer with fence data in traces Fence data is easier to read and allows us to correlate to identify corresponding dma_fence ftrace events. Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 2359419fa5dbb5e6afe1d16994c77dd52ecc8e25 Author: Andres Rodriguez Date: Thu Mar 9 21:25:53 2017 -0500 drm/amdgpu: remove useless pointers from traces Remove pointers which provide redundant information which is already easier to deduce from other fields. Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit f6fd20304a783c5f4706865634998fcb70545706 Author: Andres Rodriguez Date: Thu Mar 9 21:25:52 2017 -0500 drm/amdgpu: use sched_job id instead of pointer for tracing Pointers get reallocated and they are hard to read for humans. Use ids instead. Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 373eadfa6aa89e2a942d83ae02ff7858875746c0 Author: Andres Rodriguez Date: Thu Mar 9 21:25:51 2017 -0500 drm/amdgpu: more ftrace formatting consistency fixes Consistent formatting makes it easier to read the logs and apply simple awk oneliners. I missed some of these on my last patch. Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 93f8b367382108c2363335cfeb5cb3f3f39cfe43 Author: Andres Rodriguez Date: Thu Mar 9 21:25:50 2017 -0500 drm/amd/sched: add a unique job id to amd_sched_job A unique id is useful for debugging and tracing. Intended to replace pointers in ftrace output. Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 2 ++ drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 2 ++ 2 files changed, 4 insertions(+) commit 8fb6e528c399e54e5e2621d71a1037ab8ed89478 Author: Roger.He Date: Tue Mar 14 16:47:30 2017 +0800 drm/amdgpu: increase IH ring buffer size to avoid overflow We originally limited the IH to 4k on tonga since it uses bus addresses directly rather than GPU MC addresses, so it needs contigous physical memory. This brings it inline with other asics. Signed-off-by: Roger.He Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2d51d8192f1e42a9351ab4d82f85f0c79e1780d Author: Alex Deucher Date: Wed Mar 15 09:45:48 2017 -0400 drm/amdgpu: don't init GDS pool if GDS size is 0 (v2) SI cards don't expose GDS as a separate pool. The CP manages GDS and the UMDs use special CP packets to allocate GDS memory. v2: drop extra whitespace change bug: https://bugzilla.kernel.org/show_bug.cgi?id=194867 Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 45 ++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 18 deletions(-) commit 11ba13e179c271bb21f1a710fc4229e6d9574833 Author: Alex Deucher Date: Wed Mar 15 09:42:03 2017 -0400 drm/amdgpu/gfx6: drop gds unrefs Leftover from gfx7 code. gfx6 never sets up the gds buffers in the first place. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 4 ---- 1 file changed, 4 deletions(-) commit 2667989927bfb419d854169d845f205a69de423a Author: Rex Zhu Date: Mon Mar 13 16:05:32 2017 +0800 drm/amdgpu: refine vce_3.0 code. fix logic error in hw_fini and set_clockgating_state functions. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 03a5f1df5bc3329efd3f8306c20f9b094cbbb08e Author: Rex Zhu Date: Mon Mar 6 11:29:26 2017 +0800 drm/amdgpu: refine vce2.0 dpm sequence start vce first then enable vce dpm. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c5e38e11948753f6c76fc73543ef6ada0a6bc1a3 Author: Alex Deucher Date: Fri Mar 10 15:41:54 2017 -0500 drm/radeon: add new ATIF ACPI method Used for fetching external GPU information. Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_acpi.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 8285052ef1c96562cfdedd9d0bf678995a8f4f94 Author: Alex Deucher Date: Fri Mar 10 15:34:34 2017 -0500 drm/amdgpu: add new ATIF ACPI method Used for fetching external GPU information. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/amd_acpi.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 166c8178fb25e2b933184a4d695cdb4fe08de427 Author: Leo Liu Date: Tue Jan 10 11:57:24 2017 -0500 drm/amdgpu: get cs support of AMDGPU_HW_IP_UVD_ENC Reviewed-by: Christian König Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 63defd3f677ef49c4d1a8f1b40a6d6b4e743c6f9 Author: Leo Liu Date: Tue Jan 10 11:50:08 2017 -0500 drm/amdgpu: add AMDGPU_HW_IP_UVD_ENC to info query Reviewed-by: Christian König Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a50798b6c724354b80d7c5e3de2ceaf8441a831e Author: Leo Liu Date: Tue Jan 10 11:49:08 2017 -0500 uapi/drm: add AMDGPU_HW_IP_UVD_ENC Reviewed-by: Christian König Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher include/uapi/drm/amdgpu_drm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 50c3e23299685c2cf5932d87540ef8f4a271f018 Author: Leo Liu Date: Thu Jan 12 13:19:46 2017 -0500 drm/amdgpu: add uvd enc ring type and functions Reviewed-by: Christian König Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a28f0a164c32972fbd83ebc63260af09be581583 Author: Leo Liu Date: Thu Jan 12 13:15:37 2017 -0500 drm/amdgpu: add uvd enc run queue Reviewed-by: Christian König Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h | 1 + 1 file changed, 1 insertion(+) commit f7243053c24d97565c8de3f31ec3b910e7519e9f Author: Leo Liu Date: Tue Jan 10 11:23:23 2017 -0500 drm/amdgpu: add uvd enc rings And initialize them Reviewed-by: Christian König Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 5e5681788befb2d84d0780f81ea72821e6723ba1 Author: Leo Liu Date: Tue Jan 10 11:02:58 2017 -0500 drm/amdgpu: move amdgpu_vce structure to vce header Reviewed-by: Christian König Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 29 +---------------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 28 deletions(-) commit 4df654d293c6424afdd28b1b27b487c565fffb3e Author: Leo Liu Date: Mon Jan 2 10:07:33 2017 -0500 drm/amdgpu: move amdgpu_uvd structure to uvd header Reviewed-by: Christian König Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 30 +----------------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 29 deletions(-) commit 135d4735d8c5d8fa6c705657f5dd9d8d4193dcd1 Author: Leo Liu Date: Wed Dec 14 15:05:00 2016 -0500 drm/amdgpu: add a ring func for end command Reviewed-by: Christian König Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + 2 files changed, 4 insertions(+) commit c773a632a965ec05b933f53b85f0bba86f978b25 Author: Huang Rui Date: Tue Jan 17 10:18:31 2017 +0800 drm/amdgpu: add DF MGCG flag Acked-by: Christian König Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/amd_shared.h | 1 + 1 file changed, 1 insertion(+) commit e929c98d2e3305b6e45e9deeca1cc952dd2e3420 Author: Huang Rui Date: Wed Jan 18 16:53:16 2017 +0800 drm/amdgpu: add DRM MGCG header Acked-by: Christian König Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/amd_shared.h | 1 + 1 file changed, 1 insertion(+) commit bbf282d884793f95b89dc35059f8703eaf48ca00 Author: Alex Deucher Date: Fri Mar 3 17:26:10 2017 -0500 drm/amdgpu: add asic callback to get memsize register Newer asics use different registers so abstract it. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/cik.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/si.c | 7 +++++++ drivers/gpu/drm/amd/amdgpu/vi.c | 6 ++++++ 5 files changed, 23 insertions(+), 1 deletion(-) commit c722865a19f97aa9f56aaa8665f87cbf1dbaf96a Author: Rex Zhu Date: Wed Feb 22 15:33:46 2017 +0800 drm/amdgpu: check function points valid before use. (v3) v2: agd: integrate Christian's comments. v3: print error message if call fails Reviewed-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 32 +++++++++++++++++------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit 5463545b9280093f4614049df2dfee3f9e662172 Author: Alex Xie Date: Tue Feb 14 12:22:57 2017 -0500 drm/amdgpu: add a callback to set vm mapping flags This lets each asic set whichever flags it supports. Signed-off-by: Alex Xie Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 12 +++--------- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 16 ++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 16 ++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 18 ++++++++++++++++++ 5 files changed, 57 insertions(+), 9 deletions(-) commit 4b98e0c4aeb9e246fd877640d45dfbdcdf6283a9 Author: Alex Xie Date: Tue Feb 14 12:31:36 2017 -0500 drm/amdgpu: set GART PTE asic specific flags Set asic specific gart pte flags in the gmc IP module for each asic. Signed-off-by: Alex Xie Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 +--- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 1 + 5 files changed, 8 insertions(+), 3 deletions(-) commit daf42c314dbd70f892f8020d817b46793c0e1b3f Author: Huang Rui Date: Mon Oct 10 15:19:06 2016 +0800 drm/amdgpu: add a ucode size member into firmware info This will be used for newer asics. Acked-by: Christian König Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 7 +++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) commit 6b777607c1442857e160a57d02b9951d8e7639b4 Author: Chunming Zhou Date: Wed Sep 21 16:19:19 2016 +0800 drm/amdgpu: expand pte flags to uint64_t Necessary for new asics. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 ++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 18 +++++++++--------- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 +- 11 files changed, 25 insertions(+), 25 deletions(-) commit 7ccf5aa8ba8241cba0f6a894ec1e68a2794cef6f Author: Alex Deucher Date: Tue Nov 29 18:02:12 2016 -0500 drm/amdgpu/ih: store the full context id The contextID field (formerly known as src_data) of the IH vector stores client specific information about an interrupt. It was expanded from 32 bits to 128 on newer asics. Expand the src_id field to handle this. Reviewed-by: Harry Wentland Reviewed-by: Christian König Signed-off-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 4 +++- drivers/gpu/drm/amd/amdgpu/cik_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/cz_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/si_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 +++--- 15 files changed, 38 insertions(+), 36 deletions(-) commit d766e6a393383c60a55bdcc72586f21a1ff12509 Author: Alex Deucher Date: Tue Mar 29 18:28:50 2016 -0400 drm/amdgpu: switch ih handling to two levels (v3) Newer asics have a two levels of irq ids now: client id - the IP src id - the interrupt src within the IP v2: integrated Christian's comments. v3: fix rebase fail in SI and CIK Signed-off-by: Alex Deucher Signed-off-by: Ken Wang Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 24 +++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 111 +++++++++++++++++++++---------- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h | 10 ++- drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 6 +- drivers/gpu/drm/amd/amdgpu/cik_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 9 ++- drivers/gpu/drm/amd/amdgpu/cz_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 6 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 6 +- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 6 +- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 6 +- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 6 +- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 8 ++- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 10 +-- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 6 +- drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 4 +- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 9 ++- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 9 ++- drivers/gpu/drm/amd/amdgpu/si_dma.c | 4 +- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 4 +- drivers/gpu/drm/amd/amdgpu/si_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 2 +- drivers/gpu/drm/amd/include/cgs_linux.h | 19 +++--- 34 files changed, 193 insertions(+), 105 deletions(-) commit 832be4041d4999e008839d12d1efe118da27bd99 Author: Ken Wang Date: Fri Mar 18 15:23:08 2016 +0800 drm/amdgpu: add 64bit doorbell functions (v2) Newer asics need 64 bit doorbells. v2: fix comment (Nils) Reviewed-by: Christian König Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 38 ++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) commit 7014285ade54bae2fe03aa397aa45846a0cd3e31 Author: Ken Wang Date: Fri Mar 18 15:08:49 2016 +0800 drm/amdgpu: add 64bit wb functions Newer asics need 64 bit writeback slots. Reviewed-by: Christian König Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 39 +++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 50 ++++++++++++++++++++++-------- 3 files changed, 78 insertions(+), 13 deletions(-) commit 536fbf946cf84ff60cdef471c23ab96058e62f39 Author: Ken Wang Date: Sat Mar 12 09:32:30 2016 +0800 drm/amdgpu: change wptr to 64 bits (v2) Newer asics need 64 bit wptrs. If the wptr is now smaller than the rptr that doesn't indicate a wrap-around anymore. v2: integrate Christian's comments. Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 12 +++++++----- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 12 +++++++----- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 11 ++++++----- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 18 ++++++++++-------- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 23 +++++++++++++---------- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 11 ++++++----- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 15 ++++++++------- drivers/gpu/drm/amd/amdgpu/si_dma.c | 12 +++++++----- drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 9 +++++---- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 9 +++++---- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 10 ++++++---- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 17 +++++++++-------- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 24 +++++++++++++----------- 15 files changed, 107 insertions(+), 83 deletions(-) commit 8fe733289bc00914e9ace101088857cda20a1c51 Author: Junwei Zhang Date: Thu Mar 10 14:20:39 2016 +0800 drm/amdgpu: init aperture definitions (v2) v2: agd: move apertures to mc structure Signed-off-by: Flora Cui Reviewed-by: Jammy Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 +++++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 24 +++++++++++++++++++++--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 17 +++++++++++++---- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 8 ++++++++ 5 files changed, 55 insertions(+), 7 deletions(-) commit 04e30c9c8667494847f3876fe3e6c8b39fa6fd1b Author: Daniel Vetter Date: Wed Mar 8 15:12:52 2017 +0100 drm/amdgpu: Merge pre/postclose hooks Again no apparent explanation for the split except hysterical raisins. Merging them also makes it a bit more obviuos what's going on wrt the runtime pm refdancing. Cc: Alex Deucher Cc: Christian König Cc: amd-gfx@lists.freedesktop.org Reviewed-by: Christian König Signed-off-by: Daniel Vetter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 17 ++--------------- 3 files changed, 2 insertions(+), 18 deletions(-) commit 78910246ddcf9359fbbad506f085ab83b39f876d Author: Daniel Vetter Date: Wed Mar 8 15:12:48 2017 +0100 drm/radeon: Merge pre/postclose hooks Again no apparent explanation for the split except hysterical raisins. Merging them also makes it a bit more obviuos what's going on wrt the runtime pm refdancing. Cc: Alex Deucher Cc: Christian König Cc: amd-gfx@lists.freedesktop.org Reviewed-by: Christian König Signed-off-by: Daniel Vetter Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_drv.c | 3 --- drivers/gpu/drm/radeon/radeon_kms.c | 42 +++++++++++++------------------------ 2 files changed, 14 insertions(+), 31 deletions(-) commit 82c6bd46bf8bc63a95e5b63b7d397812ee7e8b20 Author: Andres Rodriguez Date: Fri Feb 24 13:20:58 2017 -0500 drm/amdgpu: trace fence details in amdgpu_sched_run_job This information is intended to provide the required data to associate amdgpu tracepoints with their corresponding dma_fence_* events. Reviewed-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit f8d569011c9633f5b16438216543b24b2655dcb9 Author: Andres Rodriguez Date: Fri Feb 24 13:20:57 2017 -0500 drm/amdgpu: make trace format uniform csv name=value Most of the traces have uniform format except for two of them. Having all the traces match makes it simple to run awk on the ftrace output. Reviewed-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 49abb980c5fafc75f10c2beb13c63a8b0f8bc44a Author: Xiangliang Yu Date: Mon Mar 6 15:27:51 2017 +0800 drm/amdgpu/gfx8: move CE&DE meta data structure to vi_structs.h Because different HWs have different definition for CE & DE meta data, follow mqd design to move the structures to vi_structs.h. And change the prefix from amdgpu to vi as the structures is only for VI family. Signed-off-by: Xiangliang Yu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 16 ++--- drivers/gpu/drm/amd/amdgpu/vi.h | 112 ------------------------------- drivers/gpu/drm/amd/include/vi_structs.h | 106 +++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+), 120 deletions(-) commit 7dae618174692f9da17a47fe82133a4b0ab9debf Author: Junshan Fang Date: Thu Jan 19 10:36:18 2017 +0800 drm/amd/amdgpu: add DID for Polaris10 Signed-off-by: Junshan Fang Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + 1 file changed, 1 insertion(+) commit 2fc5338494e8a1aeebe7306b9d37a5075b5fa72c Author: Alex Deucher Date: Fri Mar 3 12:57:37 2017 -0500 drm/amdgpu: add polaris12 to virtual dce handling Was missed when polaris12 support was added. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 81522f71b1871a85bd32567904f414a42e8431af Author: Christian König Date: Tue Nov 15 08:15:28 2016 -0500 drm/amdgpu: remove unused sync testing Not used in a while. Signed-off-by: Christian König Reviewed-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 -- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 --- drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | 79 ------------------------------ 3 files changed, 89 deletions(-) commit 35011d398e7543fbad086dad6d41b454a7c2e1e9 Author: Eric Huang Date: Wed Mar 1 16:49:06 2017 -0500 drm/amd/powerplay: simplify avfs control code in smu7 Signed-off-by: Eric Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit f9c993ceb1f651853ddf180c8181489d78383640 Author: Eric Huang Date: Wed Mar 1 15:56:17 2017 -0500 drm/amd/powerplay: add function avfs control in smu7 Signed-off-by: Eric Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit dd4bdf3b35dd8c33dfc41b9917f202f6602dfa48 Author: Eric Huang Date: Wed Mar 1 15:49:31 2017 -0500 drm/amd/powerplay: add voltage change support through pp_table Disable avfs to make voltage change take effect. Signed-off-by: Eric Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 12 +++++++++++- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) commit a33c1a822c837f757c210995c9704f39d0cd4373 Author: Andy Shevchenko Date: Thu Dec 1 03:21:10 2016 +0200 drm/radeon: remove useless and potentially wrong message There is no need to repeat information that printed by PCI core at boot time. Besides that printing was potentially wrong since resource_size_t might be bigger than 32 bits and there is a dedicated specifier for such type, i.e. %pap. Someone can fix it and use even better approach, i.e. %pR. Signed-off-by: Andy Shevchenko Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_device.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit cf4270ec689d4b3672941ecfe87578125020c9d7 Author: Rex Zhu Date: Mon Mar 6 11:33:25 2017 +0800 drm/amdgpu: print full bios version in dmesg. v2: fix merge error. Signed-off-by: Rex Zhu Reviewed-by: Xiaojie Yuan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/atom.c | 22 ++++++++-------------- drivers/gpu/drm/amd/amdgpu/atom.h | 1 + 2 files changed, 9 insertions(+), 14 deletions(-) commit c5cb934ebd4cfc007f81e0a36c504f33fa5b8361 Author: Christian König Date: Fri Feb 17 15:04:31 2017 +0100 drm/amdgpu: disable HDP flushes on APUs We completely bypass the HDP now. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 7ca85295d8cc280ea79cf6250c47363b7fd92f92 Author: Joe Perches Date: Tue Feb 28 04:55:52 2017 -0800 gpu: drm: amd/radeon: Convert printk(KERN_ to pr_ Use a more common logging style. Miscellanea: o Coalesce formats and realign arguments o Neaten a few macros now using pr_ Signed-off-by: Joe Perches Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | 2 +- drivers/gpu/drm/amd/amdgpu/atom.c | 44 ++++++++----------- drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 4 +- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 4 +- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 4 +- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 8 ++-- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 8 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 4 +- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 4 +- drivers/gpu/drm/amd/include/amd_pcie_helpers.h | 4 +- drivers/gpu/drm/radeon/atom.c | 46 +++++++++---------- drivers/gpu/drm/radeon/cik.c | 56 ++++++++---------------- drivers/gpu/drm/radeon/evergreen.c | 2 +- drivers/gpu/drm/radeon/evergreen_cs.c | 7 ++- drivers/gpu/drm/radeon/ni.c | 22 +++------- drivers/gpu/drm/radeon/r100.c | 18 +++----- drivers/gpu/drm/radeon/r200.c | 3 +- drivers/gpu/drm/radeon/r300.c | 13 +++--- drivers/gpu/drm/radeon/r420.c | 9 ++-- drivers/gpu/drm/radeon/r520.c | 3 +- drivers/gpu/drm/radeon/r600.c | 21 +++------ drivers/gpu/drm/radeon/r600_cs.c | 7 ++- drivers/gpu/drm/radeon/radeon.h | 3 +- drivers/gpu/drm/radeon/radeon_atpx_handler.c | 4 +- drivers/gpu/drm/radeon/radeon_audio.c | 4 +- drivers/gpu/drm/radeon/radeon_clocks.c | 2 +- drivers/gpu/drm/radeon/radeon_device.c | 8 ++-- drivers/gpu/drm/radeon/radeon_fb.c | 3 +- drivers/gpu/drm/radeon/radeon_gem.c | 4 +- drivers/gpu/drm/radeon/radeon_test.c | 6 +-- drivers/gpu/drm/radeon/rs400.c | 4 +- drivers/gpu/drm/radeon/rs690.c | 3 +- drivers/gpu/drm/radeon/rv515.c | 9 ++-- drivers/gpu/drm/radeon/si.c | 45 +++++++------------ 39 files changed, 155 insertions(+), 252 deletions(-) commit eeca2324900e922b693b2b6ddacc502c78f1c1ef Author: Joe Perches Date: Mon Feb 27 17:31:03 2017 -0800 drm: Use pr_cont where appropriate Using 'printk("\n")' is not preferred anymore and using printk to continue logging messages now produces multiple line logging output unless the continuations use KERN_CONT. Convert these uses to appropriately use pr_cont or a single printk where possible. Miscellanea: o Use a temporary const char * instead of multiple printks o Remove trailing space from logging by using a leading space instead Signed-off-by: Joe Perches Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 70 ++++++++++++++++---------------- drivers/gpu/drm/radeon/r600_dpm.c | 71 +++++++++++++++++---------------- 2 files changed, 73 insertions(+), 68 deletions(-) commit 9dc5a91e4d1cc7accd776f20198df48255de516f Author: Alex Deucher Date: Thu Nov 17 15:40:22 2016 -0500 drm/amdgpu: put gtt at 0 in the internal address space There still seem to be some blocks that make accesses in the lower part of the address space. This works around this. Reviewed-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc3abc16a72776ed1b631d27d2e595cbf34f353e Author: Alex Deucher Date: Fri Feb 17 13:50:15 2017 -0500 drm/amdgpu/vce2: fix vce bar programming Program the VCE BAR and offsets properly. The current code was carried over from a limitation from older VCE versions. Reviewed-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 98a36749ebecdb4ac7e64815a62d002f8e2b971b Author: Joe Perches Date: Thu Feb 16 23:11:30 2017 -0800 drivers/gpu: Convert remaining uses of pr_warning to pr_warn To enable eventual removal of pr_warning This makes pr_warn use consistent for drivers/gpu Prior to this patch, there were 15 uses of pr_warning and 20 uses of pr_warn in drivers/gpu Acked-by: Christian König Reviewed-by: Edward O'Callaghan Signed-off-by: Joe Perches Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +- drivers/gpu/drm/amd/powerplay/inc/pp_debug.h | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c | 4 ++-- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c | 14 +++++++------- drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smc.c | 4 ++-- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) commit 6137a0fec2910aca7eed03545b6f3557b5d95c14 Author: Geert Uytterhoeven Date: Fri Feb 17 16:36:38 2017 +0100 drm/amd: Spelling s/SDMA_WRTIE_SUB_OPCODE_TILED/SDMA_WRITE_SUB_OPCODE_TILED/ Reviewed-by: Christian König Signed-off-by: Geert Uytterhoeven Cc: Alex Deucher Cc: Christian König Cc: dri-devel@lists.freedesktop.orgamd-gfx@lists.freedesktop.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cikd.h | 2 +- drivers/gpu/drm/radeon/cikd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 92c177b7947d9c889ea7b024871445015ea74221 Author: Lyude Date: Wed Feb 22 16:34:53 2017 -0500 drm/radeon/dp_auxch: Ratelimit aux transfer debug messages Aux transfers always fail with non-zero status flags when there's nothing connected on the port, so we don't usually need to see all of the debugging information from it. Also, we try reprobing a -lot-, so without ratelimiting most of the kernel log is filled up with messages from radeon_dp_aux_transfer_native. Signed-off-by: Lyude Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_dp_auxch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7bb0613ebbbcf928364e51aee99088618f8d1b70 Author: Alex Deucher Date: Wed Feb 22 11:20:17 2017 -0500 drm/amdgpu/powerplay: enable LEDs on Fiji boards This enables the LEDs that light up based on DPM states on some Fiji boards. bug: https://bugs.freedesktop.org/show_bug.cgi?id=97590 Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smu7_ppsmc.h | 1 + drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c | 34 +++++++++++++++++++++++++ 2 files changed, 35 insertions(+) commit ea323f88a23fae24df7cbfd77a375e668394c7dc Author: Junwei Zhang Date: Tue Feb 21 10:32:37 2017 +0800 drm/amdgpu: rename amdgpu_gca_config to amdgpu_gfx_config Signed-off-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 07c397f934b89e34f33ab4b86bd6863f3274e079 Author: Trigger Huang Date: Sun Feb 19 21:57:39 2017 -0500 drm/amdgpu: Fix module unload hang by KIQ IRQ set In some cases, manually insmod/rmmod amdgpu is necessary. When unloading amdgpu, the KIQ IRQ enable/disable function will case system hang. The root cause is, in the sequence of function amdgpu_fini, the sw_fini of IP block AMD_IP_BLOCK_TYPE_GFX will be invoked earlier than that of AMD_IP_BLOCK_TYPE_IH. So continue to use the variable freed by AMD_IP_BLOCK_TYPE_GFX will cause system hang. Signed-off-by: Trigger Huang Reviewed-by: Xiangliang Yu < Xiangliang.Yu@amd.com> Reviewed-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit dfe38bd8344c40e8e21470ac4eadc1e23e89ba8b Author: Alex Deucher Date: Wed Mar 8 18:27:07 2017 -0500 drm/amdgpu: bump driver version for new lds buffer query v2: agd: bump version Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit df6e2c4aeb263f9b9b904c1a087411ddf25c5e94 Author: Junwei Zhang Date: Fri Feb 17 11:05:49 2017 +0800 drm/amdgpu: export gfx config double offchip LDS buffers (v3) v2: move the config struct to drm_amdgpu_info_device v3: move the config feature to amdgpu_gca_config Signed-off-by: Junwei Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 14 ++++++++++++++ include/uapi/drm/amdgpu_drm.h | 2 ++ 6 files changed, 33 insertions(+) commit 24de75151ba95bac63d785d950b71b2d57046c19 Author: Xiangliang Yu Date: Thu Feb 16 15:20:04 2017 +0800 drm/amdgpu/gfx: free memory of mqd backup Need to free mqd backup when destroying ring. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Reviewed-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 ++ 1 file changed, 2 insertions(+) commit d1aad4d8a4bc8bdb7132baf9361d0ee9b2f6a944 Author: Xiangliang Yu Date: Thu Feb 16 15:07:06 2017 +0800 drm/amdgpu/virt: fix typo When send messages to hypervior, the messages format should be is idh_request, not idh_event. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Reviewed-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 59a82d7d69cf63da641314384b1e691aa8c12999 Author: Xiangliang Yu Date: Fri Feb 17 16:03:10 2017 +0800 drm/amdgpu: change pointer of mqd_ptr & mqd_backup to void vi_mqd is only used by VI family but mqd_ptr and mqd_backup is common for all ASIC, so change the pointer to void. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Reviewed-by: Christian König Reviewed-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 26 +++++++++++++++++--------- 3 files changed, 19 insertions(+), 11 deletions(-) commit 1fb37a3d0f2a227d270e7ef39b8d4dd0bfb46aca Author: Monk Liu Date: Thu Jan 26 15:36:37 2017 +0800 drm/amdgpu:fix kiq_resume routine (V2) v2: use in_rest to fix compute ring test failure issue which occured after FLR/gpu_reset. we need backup a clean status of MQD which was created in drv load stage, and use it in resume stage, otherwise KCQ and KIQ all may faild in ring/ib test. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Xiangliang Yu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 44 ++++++++++++++++++++++-------- 2 files changed, 35 insertions(+), 11 deletions(-) commit f6bd79424cd02f5726c294916d9afb3cf031080c Author: Monk Liu Date: Wed Feb 8 16:51:06 2017 +0800 drm/amdgpu:use clear_ring to clr RB In resume routine, we need clr RB prior to the ring test of engine, otherwise some engine hang duplicated during GPU reset. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit c79ecfbf5bba298ab5716536fa9cb68533bb5c26 Author: Monk Liu Date: Wed Feb 8 16:49:46 2017 +0800 drm/amdgpu:imple ring clear we can use it clear ring buffer instead of fullfill 0, which is not correct for engine Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 9b49c3ab06a7d0ad4bd3a8474cf0f2640aaadfd6 Author: Monk Liu Date: Thu Jan 26 15:33:52 2017 +0800 drm/amdgpu:alloc mqd backup this is required for restoring the mqds after GPU reset. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Xiangliang Yu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 10 ++++++++++ 2 files changed, 11 insertions(+) commit 223049cd54bdf32be581aff4c2cc0f8a9cb7cef0 Author: Monk Liu Date: Thu Jan 26 15:32:16 2017 +0800 drm/amdgpu:new field in_reset introduced for gfx use it to seperate driver load and gpu reset/resume because gfx IP need different approach for different hw_init trigger source Signed-off-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + 1 file changed, 1 insertion(+) commit 2641e38b0269be73c8d495eba3df1c7f2a3c2224 Author: Monk Liu Date: Thu Jan 26 15:31:15 2017 +0800 drm/amdgpu:RUNTIME flag should clr later this flag will get cleared by request gpu access Signed-off-by: Monk Liu Reviewed-by: Xiangliang Yu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 480da2626028fb789aaddfe197daac1ab4f1e822 Author: Monk Liu Date: Mon Feb 6 13:56:47 2017 +0800 drm/amdgpu:use work instead of delay-work no need to use a delay work since we don't know how much time hypervisor takes on FLR, so just polling and waiting in a work. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Xiangliang Yu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 2 +- drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 36 +++++++++++++++----------------- 2 files changed, 18 insertions(+), 20 deletions(-) commit 4a370955ed63f8351ab6058f950a762a6917d688 Author: Monk Liu Date: Wed Jan 25 16:49:32 2017 +0800 drm/amdgpu:no kiq for mailbox registers access Use no kiq version reg access due to: 1) better performance 2) INTR context consideration (some routine in mailbox is in INTR context e.g.xgpu_vi_mailbox_rcv_irq) Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Xiangliang Yu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 562fe45c0582aeab2488bc3b96659fc23c40e6aa Author: Ken Xue Date: Wed Jan 25 13:14:17 2017 +0800 drm/amdgpu:Refine handshake of mailbox Signed-off-by: Ken Xue Acked-by: Alex Deucher Reviewed-by: Xiangliang Yu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 15d72fd7456b6273b89bd9c43e167e5867af389d Author: Monk Liu Date: Wed Jan 25 15:07:40 2017 +0800 drm/amdgpu:impl RREG32 no kiq version some registers are PF & VF copy, and we can safely use mmio method to access them. and sometime we are forbid to use kiq to access registers for example in INTR context. we need a MACRO that always disable KIQ for regs accessing Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Xiangliang Yu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 21 ++++++++++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++------ 2 files changed, 20 insertions(+), 13 deletions(-) commit b85c9d2a3bc105dc3f1236aadeb2855a39264a56 Author: Monk Liu Date: Wed Feb 8 15:10:24 2017 +0800 drm/amdgpu:use MACRO like other places Change-Id: Ica8f86577a50d817119de4b4fb95068dc72652a9 Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 59c66c911fa245cd5ba764551d50abeb7882e852 Author: Nicolai Hähnle Date: Thu Feb 16 11:01:44 2017 +0100 drm/amdgpu: simplify reservation handling during buffer creation By using ttm_bo_init_reserved instead of the manual initialization of the reservation object, the reservation lock will be properly unlocked and destroyed when the TTM BO initialization fails. Actual deadlocks caused by the missing unlock should have been fixed by "drm/ttm: never add BO that failed to validate to the LRU list", superseding the flawed fix in commit 38fc4856ad98 ("drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()"). This change fixes remaining recursive locking errors that can be seen with lock debugging enabled, and avoids the error of freeing a locked mutex. As an additional minor bonus, buffers created with resv == NULL and the AMDGPU_GEM_CREATE_VRAM_CLEARED flag are now only added to the global LRU list after the fill commands have been issued. v2: use amdgpu_bo_unreserve instead of ttm_bo_unreserve Fixes: 12a852219583 ("drm/amdgpu: improve AMDGPU_GEM_CREATE_VRAM_CLEARED handling (v2)") Signed-off-by: Nicolai Hähnle Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit ca9cf68de1e7429e89adb3abdd092d4873e73e29 Author: Nicolai Hähnle Date: Thu Feb 16 10:56:40 2017 +0100 drm/ttm: add ttm_bo_init_reserved This variant of ttm_bo_init returns the validated buffer object with the reservation lock held when resv == NULL. This is convenient for callers that want to use the BO immediately, e.g. for initializing its contents. Signed-off-by: Nicolai Hähnle Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 59 +++++++++++++++++++++++++++++++++----------- include/drm/ttm/ttm_bo_api.h | 54 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 15 deletions(-) commit 882e8cfcbc2157448976c9d37af4fc144949559f Author: Nicolai Hähnle Date: Tue Feb 14 10:37:41 2017 +0100 drm/ttm: fix the documentation of ttm_bo_init As the comment says: callers of ttm_bo_init cannot rely on having the only reference to the BO when the function returns successfully. Signed-off-by: Nicolai Hähnle Reviewed-by: Christian König Signed-off-by: Alex Deucher include/drm/ttm/ttm_bo_api.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b9d022c630fa77c7044ea21e2597245a91e69856 Author: Nicolai Hähnle Date: Tue Feb 14 09:47:36 2017 +0100 Revert "drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()" This reverts commit 38fc4856ad98f230bc91da0421dec69e4aee40f8, which introduces a use-after-free. The underlying bug should be properly fixed with "drm/ttm: never add BO that failed to validate to the LRU list". Cc: zhoucm1 Signed-off-by: Nicolai Hähnle Tested-by: Samuel Pitoiset Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit c2c139cf435b18939204800fa72c53a7207bdd68 Author: Nicolai Hähnle Date: Tue Feb 14 09:37:12 2017 +0100 drm/ttm: never add BO that failed to validate to the LRU list Fixes a potential race condition in amdgpu that looks as follows: Task 1: attempt ttm_bo_init, but ttm_bo_validate fails Task 1: add BO to global list anyway Task 2: grabs hold of the BO, waits on its reservation lock Task 1: releases its reference of the BO; never gives up the reservation lock The patch "drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()" attempts to fix that by releasing the reservation lock in amdgpu code; unfortunately, it introduces a use-after-free when this race _doesn't_ happen. This patch should fix the race properly by never adding the BO to the global list in the first place. Cc: zhoucm1 Signed-off-by: Nicolai Hähnle Tested-by: Samuel Pitoiset Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 5ebbac4b5c9159130046bf7c56b7f4c71ca7d1b7 Author: Alex Deucher Date: Wed Mar 8 18:25:15 2017 -0500 drm/amdgpu: expose GPU sensor related information This includes shader/memory clocks, temperature, GPU load, etc. v2: - add sub-queries for AMDPGU_INFO_GPU_SENSOR_* - do not break the ABI v3: - return -ENOENT when amdgpu_dpm == 0 - expose more sensor queries v4: - s/GPU_POWER/GPU_AVG_POWER/ - improve VDDNB/VDDGFX query description - fix amdgpu_dpm check v5: - agd: fix warning v6: - agd: bump version Signed-off-by: Samuel Pitoiset Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 75 +++++++++++++++++++++++++++++++++ include/uapi/drm/amdgpu_drm.h | 20 +++++++++ 3 files changed, 97 insertions(+), 1 deletion(-) commit 3cbc614f2fe7500cf2b0f29bbf941cf516c8b950 Author: Samuel Pitoiset Date: Wed Feb 15 19:32:29 2017 +0100 drm/amdgpu: expose amdgpu_sensors on pre-powerplay chips read_sensor() has been recently implemented for dpm based boards which means amdgpu_sensors can now be exposed. v2: - make sure read_sensor is not NULL on dpm chips - keep sanity check for powerplay chips v3: - make sure amdgpu_dpm != 0 Cc: Tom St Denis Reviewed-by: Tom St Denis Signed-off-by: Samuel Pitoiset Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d6c29695e68ca911648dbe2294764dab6ef84fc7 Author: Samuel Pitoiset Date: Tue Feb 14 01:00:49 2017 +0100 drm/amdgpu: implement read_sensor() for pre-powerplay chips Add the GPU temperature, the shader clock and eventually the memory clock (as well as the GPU load on CI). The main goal is to expose this info to the userspace like Radeon. v2: - add AMDGPU_PP_SENSOR_GPU_LOAD on CI - update the commit description Signed-off-by: Samuel Pitoiset Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 4 ++- drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 43 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 34 ++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/si_dpm.c | 41 +++++++++++++++++++++++++++++++ 4 files changed, 121 insertions(+), 1 deletion(-) commit 75cb00dc0c9dbe5e7a971ac729384d8d05f0deb1 Author: Marek Olšák Date: Mon Feb 13 17:37:05 2017 +0100 drm/radeon: allow unaligned shader loads on CIK Set alignment mode to unaligned on CIK to align with amdgpu. This is needed for unaligned loads to work properly in mesa. The current setting requires dword alignment. Signed-off-by: Marek Olšák Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/cik.c | 7 +++++-- drivers/gpu/drm/radeon/radeon_drv.c | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) commit 451bc8eb8fe61ee89ebf44e7ee290ab88bb2b2d5 Author: Christian König Date: Tue Feb 14 16:02:52 2017 +0100 drm/amdgpu: fix PRT teardown on VM fini v3 v2: new approach fixing this by registering a fence callback for all users of the VM on teardown v3: agd: rebase Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 106 +++++++++++++++++++++++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 +- 2 files changed, 82 insertions(+), 26 deletions(-) commit 0b15f2fc3ca20f10c0a3ab659c923a3f693cf29f Author: Christian König Date: Tue Feb 14 15:47:03 2017 +0100 drm/amdgpu: add OOM fallback on PRT teardown (v2) Don't assume kmalloc will always succeed. v2: agd: rebase Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) commit 1b04e4129dcd6f3a7303d93adb4c84717f98095a Author: Christian König Date: Tue Feb 14 14:50:50 2017 +0100 drm/amdgpu: minor PRT turnoff fix (v2) When two VMs stop using PRT support at the same time we might not disable it in the right order otherwise. v2: agd: rebase Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 982a1348bbbf8c09f5fa06f7b48d31bad85d0f81 Author: Alex Xie Date: Wed Feb 15 14:10:19 2017 -0500 drm/amdgpu: change pte definitions to 64 bit Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Xie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35ba15f03de690b9d25dd46226b398ee0ad98d5d Author: Christian König Date: Mon Feb 13 14:22:58 2017 +0100 drm/amdgpu: fix PTE defines Those should be 64bit, even on a 32bit system. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 9f8df7d71e382c9afa808a08c11a990e90ac7df4 Author: Tom St Denis Date: Thu Feb 9 14:29:01 2017 -0500 drm/amd/amdgpu: Update read_sensor calls to have size parameter (v3) This update allows sensors to return more than 1 value and indicates to the caller how many bytes are written. The debugfs interface has been updated to handle reading all of the values. Simply seek to the enum value (multiplied by 4) and then read as many bytes as the sensor provides. (v2): Don't set size to 4 before reading GPU_POWER (v3): agd: rebase Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 26 +++++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 28 +++++++++++++---------- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 5 ++-- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 8 ++++++- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 16 ++++++++++++- drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 2 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 2 +- 8 files changed, 64 insertions(+), 27 deletions(-) commit 603adfe83a568d50542c9e7b9829d7baa497f0de Author: Christian König Date: Wed Jan 18 13:40:48 2017 +0100 drm/amdgpu: implement PRT for GFX8 v2 Enable/disable the handling globally for now and print a warning when we enable it for the first time. v2: set correct register Signed-off-by: Junwei Zhang Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 62cd91f99e6b1f1384d69ec68b7ff85c5bbc38c5 Author: Christian König Date: Wed Jan 18 13:37:21 2017 +0100 drm/amdgpu: implement PRT for GFX7 v2 Enable/disable the handling globally for now and print a warning when we enable it for the first time. v2: set correct register Signed-off-by: Junwei Zhang Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit f7c35abe933c2ee34008c7415578611adcf3fcc6 Author: Christian König Date: Fri Jan 27 11:56:05 2017 +0100 drm/amdgpu: implement PRT for GFX6 v2 Enable/disable the handling globally for now and print a warning when we enable it for the first time. v2: write to the correct register, adjust bits to that hw generation v3: fix compilation, add the missing register bit definitions Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 55 ++++++++++++++++++++++ .../drm/amd/include/asic_reg/gmc/gmc_6_0_sh_mask.h | 4 ++ 3 files changed, 60 insertions(+) commit b85891bd6d1bf887b3398f4c44b7a30b37f4485e Author: Junwei Zhang Date: Mon Jan 16 13:59:01 2017 +0800 drm/amdgpu: IOCTL interface for PRT support v4 Till GFX8 we can only enable PRT support globally, but with the next hardware generation we can do this on a per page basis. Keep the interface consistent by adding PRT mappings and enable support globally on current hardware when the first mapping is made. v2: disable PRT support delayed and on all error paths v3: PRT and other permissions are mutal exclusive, PRT mappings don't need a BO. v4: update PRT mappings durign CS as well, make va_flags 64bit Signed-off-by: Junwei Zhang Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 16 +++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 62 ++++++++++++++++++++------------- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 10 ++++++ include/uapi/drm/amdgpu_drm.h | 2 ++ 5 files changed, 64 insertions(+), 27 deletions(-) commit 284710fa6c3a5fddbc0f8c6b3a07861a312c18d2 Author: Christian König Date: Mon Jan 30 11:09:31 2017 +0100 drm/amdgpu: add basic PRT support (v2) Future hardware generations can handle PRT flags on a per page basis, but current hardware can only turn it on globally. Add the basic handling for both, a global callback to enable/disable triggered by setting a per mapping flag. v2: agd: rebase fixes Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 101 +++++++++++++++++++++++++++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 6 ++ 3 files changed, 98 insertions(+), 11 deletions(-) commit a5f6b5b1e89067d3de30ae04693f96189cc05aec Author: Christian König Date: Mon Jan 30 11:01:38 2017 +0100 drm/amdgpu: add support for BO_VAs without BO v2 For PRT support we need mappings which aren't backed by any memory. v2: fix parameter checking Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit e4f0fdcc9c95f415b6ac54d0d309021a17b9b2a8 Author: Monk Liu Date: Thu Feb 9 11:55:49 2017 +0800 drm/amdgpu:use hw_init for sriov_gpu_reset no suspend invoked so after VF FLR by host, we just call hw_init to reinitialize IPs. Signed-off-by: Monk Liu Reviewed-by: Christian König drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2245b60f9c3f5047c581f93d5a2656a0c5988c0e Author: Eric Huang Date: Tue Feb 7 11:46:21 2017 -0500 drm/amd/powerplay: implement gpu power display for smu7_hwmgr Signed-off-by: Eric Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 33 ++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 4f9afc9bd23fce85f2022af50d0127a64121bb37 Author: Eric Huang Date: Tue Jan 24 16:59:27 2017 -0500 drm/amd/powerplay: add power consumption display support in debugfs The additional output are: vddc power in Watt; vddci power in Watt; max gpu power in Watt; average gpu power in Watt. Signed-off-by: Eric Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 11 +++++++++++ drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 8 ++++++++ 2 files changed, 19 insertions(+) commit cd7b0c66ce35e8693a0018b4ce0bc59f46f97bd1 Author: Eric Huang Date: Tue Feb 7 16:37:48 2017 -0500 drm/amd/powerplay: change parameter type pointer from int32_t to void in read sensor As well as fix print format for uint32_t type. Signed-off-by: Eric Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 24 +++++++++---------- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 28 +++++++++++------------ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 14 ++++++------ drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 2 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 2 +- 6 files changed, 36 insertions(+), 36 deletions(-) commit 618c0483736f4e963770aa6076cca35935604a12 Author: Eric Huang Date: Fri Oct 14 14:21:19 2016 -0400 drm/amd/amdgpu: add power profile support for CI Signed-off-by: Eric Huang Acked-by: Rex Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 252 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/ci_dpm.h | 7 + 2 files changed, 259 insertions(+) commit 03609ebc4cbdbdb32b72df2b611390d19b9a99bf Author: Eric Huang Date: Tue Jan 24 10:57:22 2017 -0500 drm/amd/powerplay: add power profile support for Polaris Signed-off-by: Eric Huang Acked-by: Rex Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/smumgr/polaris10_smc.c | 64 ++++++++++++++++++++++ .../gpu/drm/amd/powerplay/smumgr/polaris10_smc.h | 2 + .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 1 + 3 files changed, 67 insertions(+) commit 43f6d14455ed2a993a9f945274e8da63e087d5fa Author: Eric Huang Date: Tue Jan 24 10:56:21 2017 -0500 drm/amd/powerplay: add power profile support for Fiji Signed-off-by: Eric Huang Acked-by: Rex Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c | 65 ++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.h | 3 +- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 1 + 3 files changed, 68 insertions(+), 1 deletion(-) commit 3ed2584f0b165dcdfdccc0514c476f901b62b4d9 Author: Eric Huang Date: Tue Jan 24 10:53:39 2017 -0500 drm/amd/powerplay: add power profile support for tonga Signed-off-by: Eric Huang Acked-by: Rex Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c | 63 ++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.h | 2 + .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 1 + 3 files changed, 66 insertions(+) commit ff3953d49c0acafab527ec97a665df87ab6bbc70 Author: Eric Huang Date: Tue Jan 24 10:47:25 2017 -0500 drm/amd/powerplay: add power profile support for SMU7 Signed-off-by: Eric Huang Acked-by: Rex Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 71 ++++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 5 ++ drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 10 ++++ 3 files changed, 86 insertions(+) commit 789fd60fa66ceb74957d58a3a8a3160724fb59b7 Author: Eric Huang Date: Thu Oct 6 17:57:40 2016 -0400 drm/amd/powerplay: reapply power profile when force dpm level to auto Signed-off-by: Eric Huang Acked-by: Rex Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit 34bb2734d1bc3c72e4739234481c0efab0941d14 Author: Eric Huang Date: Mon Sep 12 16:17:44 2016 -0400 drm/amd/amdgpu: add power profile sysfs entry Add the sysfs entries pp_gfx_power_profile and pp_compute_power_profile which give user a way to set power profile through parameters minimum sclk, minimum mclk, activity threshold, up hysteresis and down hysteresis only when the entry power_dpm_force_performance_level is in default value "auto". It is read and write. Example: echo 500 800 20 0 5 > /sys/class/drm/card0/device/pp_*_power_profile cat /sys/class/drm/card0/device/pp_*_power_profile 500 800 20 0 5 Note: first parameter is sclk in MHz, second is mclk in MHz, third is activity threshold in percentage, fourth is up hysteresis in ms and fifth is down hysteresis in ms. echo set > /sys/class/drm/card0/device/pp_*_power_profile To set power profile state if it exists. echo reset > /sys/class/drm/card0/device/pp_*_power_profile To restore default state and clear previous setting. Signed-off-by: Eric Huang Acked-by: Rex Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 24 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 192 ++++++++++++++++++++++ drivers/gpu/drm/amd/include/amd_shared.h | 14 ++ drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 136 ++++++++++++++- drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 8 + drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 9 + 6 files changed, 382 insertions(+), 1 deletion(-) commit 3f14e6231858f4d9a2e965f54202f7a3f69c79d0 Author: Monk Liu Date: Thu Feb 9 13:42:27 2017 +0800 drm/amdgpu:cleanup no needed braces Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 7197e18bd07ccd895aead197c1ef95c3d9e4025c Author: Monk Liu Date: Thu Feb 9 13:41:53 2017 +0800 drm/amdgpu:don't return error for debugfs failed Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - 1 file changed, 1 deletion(-) commit 147b5983bb9b942af1f1d8d9e05d93f97cca312c Author: Monk Liu Date: Wed Jan 25 15:48:01 2017 +0800 drm/amdgpu:add lock_reset for SRIOV this lock is used for sriov_gpu_reset, only get this mutex can run into sriov_gpu_reset. we have couple source triggers gpu_reset for SRIOV: 1) submit timedout and trigger reset voluntarily 2) invalid instruction detected by ENGINE and trigger reset voluntarily 2) hypervisor found world switch hang and trigger flr and notify guest to do reset. all need take care and we need a mutex to protect the consistency of reset routine. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 1 + 3 files changed, 4 insertions(+) commit ed17c71b3a89d5ef4d8c8053a29a78fa709bb458 Author: Monk Liu Date: Wed Jan 25 15:33:56 2017 +0800 drm/amdgpu:change kiq lock name Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit a90ad3c2afe5bebdd5d00aaec87fec6823545c59 Author: Monk Liu Date: Mon Jan 23 14:22:08 2017 +0800 drm/amdgpu:implement SRIOV gpu_reset (v2) implement SRIOV gpu_reset for future use. it wil be called from: 1) job timeout 2) privl access or instruction error interrupt 3) hypervisor detect VF hang v2: agd: rebase on upstream Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 156 ++++++++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 1 + 2 files changed, 156 insertions(+), 1 deletion(-) commit 596c67d076a5ae0f2571cab9245ee76f6a6cf922 Author: Monk Liu Date: Mon Feb 6 16:46:36 2017 +0800 drm/amdgpu:divide KCQ mqd init to sw and hw sw part only invoked once during sw_init. hw part invoked during first drv load and resume later. that way we cannot alloc mqd in hw/resume, we only keep mqd allocted in sw_init routine. and hw_init routine only kmap and set it. Signed-off-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 107 +++++++++++++--------------------- 1 file changed, 42 insertions(+), 65 deletions(-) commit 2da4da3cbe78ee6555b3999494b0f080d17f93b1 Author: Monk Liu Date: Mon Feb 6 16:35:54 2017 +0800 drm/amdgpu:minor cleanup Signed-off-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit bffa2280bac6a76234f36e7d1459c474886c2244 Author: Monk Liu Date: Mon Feb 6 16:34:04 2017 +0800 drm/amdgpu:no need use sriov vf checks We ultimately want to re-use this for bare metal, so no need to have vf checks in the KIQ code itself since kiq itself is currently only used in VF cases. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 283caf78d38f516000f1b21d26606c4d911073d2 Author: Monk Liu Date: Mon Feb 6 16:31:08 2017 +0800 drm/amdgpu:bo_free_kernel will set ptr to NULL if freed Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 - 1 file changed, 1 deletion(-) commit 5ff980439d9423bc40538fc54fff132654489651 Author: Monk Liu Date: Mon Feb 6 16:28:53 2017 +0800 drm/amdgpu:imple mqd soft ini/fini this is for SRIOV fix: mqd soft init/fini will be invoked by sw_init to allocate BO for compute MQD resource, instead of original scheme that hw_init allocates MQD. because if hw_init allocates MQD, then resume will allocate MQD, and that lead to memory leak after driver recovered from hang. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit f3972b531d36a09bdc01dcf00b9a369e076cb563 Author: Monk Liu Date: Tue Jan 24 18:33:22 2017 +0800 drm/damdgpu:add new mqd member in ring introduce a new mqd member in ring is for later usage. we need keep a clean version of MQD for the purpose of recovering compute rings from hang. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 ++ 2 files changed, 4 insertions(+) commit ce137c04ff4bb7862a952e32d5200c301e620601 Author: Monk Liu Date: Mon Jan 23 10:49:33 2017 +0800 drm/amdgpu:cg & pg shouldn't active on VF device CG & PG function changes engine clock/gating, which is not appropriate for VF device, because one vf doesn't know the whole picture of engine's overall workload. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 9 +++++++++ drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/vi.c | 6 ++++++ 4 files changed, 27 insertions(+) commit cbabc8b343953e7bc6d70b5a22aaebbd73ae9934 Author: Pixel Ding Date: Tue Jan 24 11:39:48 2017 +0800 drm/amdgpu: clean framebuffer with GPU CPU is not efficient to clean framebuffer especially under virtualization, then loading driver takes long time which causes timeout of mailbox handshake. Signed-off-by: Pixel Ding Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9bc92b9c8d0919b61660300249fa67e291ae0ecc Author: Monk Liu Date: Wed Feb 8 17:38:13 2017 +0800 drm/amdgpu:fix amdgpu_sa_bo_new error(v2) ib_pool init should prior to fbdev_init, otherwise there will be error from amdgpu_sa_bo_new (amdgpu_sa.c:323) fbdev_init will call ttm_validate which further call amdgpu_sa_bo_new. v2: move fbdev_init behind ib test. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit edcafc0294589d5ad1220565ffd674007337cdc7 Author: Pixel Ding Date: Mon Feb 6 17:32:22 2017 +0800 drm/amdgpu/virt: skip VM fault handler for VF VF uses KIQ to access registers. When VM fault occurs, the driver can't get back the fence of KIQ submission and runs into CPU soft lockup. Signed-off-by: Pixel Ding Reviewed-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4726214c542d3b547bd48587cd741d00cdb5086b Author: Pixel Ding Date: Tue Jan 24 15:04:48 2017 +0800 drm/amdgpu/virt: increase mailbox timeout to 5000ms When multiple VFs try to enter exclusive mode at the same time, the looping mechansim doesn't help to ensure each can get it because it only loops active VFs, then the last one has to wait for a long interval. Signed-off-by: Pixel Ding Reviewed-by: Xiangliang.Yu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mxgpu_vi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8fdf26925897974b71283014eb09c57e7e0d2ed8 Author: Monk Liu Date: Wed Jan 25 15:55:30 2017 +0800 drm/amdgpu:fix powerplay logic 1,like pp_hw_init, we shouldn't report error if PP disabled 2,disable pp_en if sriov Signed-off-by: Monk Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 2 +- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1d7b17b09fc87b0c30ca002a62cabcecc36d0704 Author: Monk Liu Date: Sun Jan 22 18:52:56 2017 +0800 drm/amdgpu:fix typo Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d3881e5015421a578bc328136471fcf1d02ac389 Author: Keith Busch Date: Tue Feb 7 14:32:33 2017 -0500 PCI: Export PCI device config accessors Replace the inline PCI device config read and write accessors with exported functions. This is preparing for these functions to make use of private data. Tested-by: Krishna Dhulipala Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Reviewed-by: Wei Zhang drivers/pci/access.c | 38 ++++++++++++++++++++++++++++++++++++++ include/linux/pci.h | 32 ++++++-------------------------- 2 files changed, 44 insertions(+), 26 deletions(-) commit dbd34a61c343f73f835539592fba4bdba8832e05 Author: Szymon Mielczarek Date: Wed Mar 29 08:19:21 2017 +0200 Revert "scsi: ufs: add queries retry mechanism" This reverts commit 61e073590b82a539654626ecae91b8fab11db3f3. The patch introduced redundant query retries as we already had such mechanism provided with _retry functions. Both ufshcd_read_desc and ufshcd_read_unit_desc_param functions call ufshcd_query_descriptor_retry wrapper. Signed-off-by: Szymon Mielczarek Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 54 ++++++++--------------------------------------- 1 file changed, 9 insertions(+), 45 deletions(-) commit 5765d180fd23dc7d76109a0cbb082df6e5cfa67a Author: Don Brace Date: Tue Mar 28 16:40:20 2017 -0500 scsi: hpsa: change driver version Reviewed-by: Gerry Morong Reviewed-by: Scott Teel Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f1974a76d4d752bb3e781b132c1663b59ca46e7 Author: Don Brace Date: Tue Mar 28 16:40:13 2017 -0500 scsi: hpsa: update pci ids Reviewed-by: Gerry Morong Reviewed-by: Scott Teel Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8bb74d36613322ac473ff6e3d8559c66ca531533 Author: Arnd Bergmann Date: Tue Mar 28 16:22:03 2017 +0200 scsi: hisi_sas: fix SATA dependency Removing the 'select SCSI_SAS_LIBSAS' statement in Kconfig resulted in a link failure in configurations that have hisi_sas built-in but libsas as a loadable module: drivers/scsi/built-in.o: In function `hisi_sas_scan_finished': hisi_sas_main.c:(.text+0x37ce9): undefined reference to `sas_drain_work' drivers/scsi/built-in.o: In function `hisi_sas_slave_configure': hisi_sas_main.c:(.text+0x37d17): undefined reference to `sas_slave_configure' hisi_sas_main.c:(.text+0x37d40): undefined reference to `sas_change_queue_depth' drivers/scsi/built-in.o: In function `hisi_sas_remove': All other libsas users have the 'select' statement, so we should do the same here for consistency. For all I can tell, the patch that added the sata softreset does not actually introduce a dependency on SCSI_SAS_ATA but instead adds calls into libata itself, so we can express that with a more specific dependency. We cannot have 'select SCSI_SAS_LIBSAS; depends on SCSI_SAS_ATA' as that would cause a dependency loop. Fixes: 7c594f0407de ("scsi: hisi_sas: add softreset function for SATA disk") Signed-off-by: Arnd Bergmann Acked-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d985c6eaa896c7f93846f97f1f7ab47aa57903ef Author: Tomohiro Kusumi Date: Tue Mar 28 16:49:29 2017 +0300 scsi: ufs: just use sizeof() for snprintf() Not much reason to use ARRAY_SIZE() when we know it's for a C string. Signed-off-by: Tomohiro Kusumi Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b9961be101419def7f7249f8e2f9b28d28b8526 Author: Tomohiro Kusumi Date: Tue Mar 28 16:49:28 2017 +0300 scsi: ufs: remove deprecated enum for hw interrupt These flags are no longer needed after 2fbd009b in 2013. Signed-off-by: Tomohiro Kusumi Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 7 ------- 1 file changed, 7 deletions(-) commit f6b254513cffedbd380b31ed7963cb639df319ee Author: Tomohiro Kusumi Date: Tue Mar 28 16:49:27 2017 +0300 scsi: ufs: add missing macros for register bits from UFSHCI spec Add macros for register bits that can be found in JESD223C (v2.1). Not all registers are defined in ufshci.h (i.e. some are unused whether macros are defined or undefined), but all the bits for those registers that are already defined should appear here. Signed-off-by: Tomohiro Kusumi Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshci.h | 2 ++ 1 file changed, 2 insertions(+) commit 9c490d2dd36896a1179165808a8034956e9605f6 Author: Tomohiro Kusumi Date: Tue Mar 28 16:49:26 2017 +0300 scsi: ufs: non functional macro fix Not having () isn't likely to do any harm in this case, but all the other macros below do have it. Also add "are" in a comment. Signed-off-by: Tomohiro Kusumi Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4a8eec2bac8454043d12be1ca7489ce3632d1137 Author: Tomohiro Kusumi Date: Tue Mar 28 16:49:25 2017 +0300 scsi: ufs: use existing macro CONTROLLER_ENABLE to test register bit Signed-off-by: Tomohiro Kusumi Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c9e6010b4ef532db719c10464cf62fe2785aeeab Author: Tomohiro Kusumi Date: Tue Mar 28 16:49:24 2017 +0300 scsi: ufs: make ufshcd_is_{device_present, hba_active}() return bool ufshcd driver generally uses bool for is_xxx type things instead of int, so conform to its style. Signed-off-by: Tomohiro Kusumi Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a28b259b43914b04746184cec318c67bded7234c Author: Colin Ian King Date: Tue Mar 28 12:12:22 2017 +0100 scsi: hisi_sas: add missing break in switch statement It appears that a break in the TRANS_TX_OPEN_CNX_ERR_NO_DESTINATION case got accidentally removed in an earlier commit, as it stands, the ts->stat and ts->open_rej_reason are being updated twice for this case which looks incorrect. Fix this by adding in the missing break statement. Detected by CoverityScan, CID#1422110 ("Missing break in switch") Fixes: 634a9585f49c7 ("scsi: hisi_sas: process error codes according to their priority") Signed-off-by: Colin Ian King Acked-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 1 + 1 file changed, 1 insertion(+) commit c13ff37e359bb3eacf4e1760dcea8d9760aa7459 Author: Jaegeuk Kim Date: Tue Mar 21 10:59:50 2017 -0400 f2fs: relax node version check for victim data in gc - has_not_enough_free_secs node_secs: 0 dent_secs: 0 freed:0 free_segments:103 reserved:104 - f2fs_gc - get_victim_by_default alloc_mode 0, gc_mode 1, max_search 2672, offset 4654, ofs_unit 1 - do_garbage_collect start_segno 3976, end_segno 3977 type 0 - is_alive nid 22797, blkaddr 2131882, ofs_in_node 0, version 0x8/0x0 - gc_data_segment 766, segno 3976, block 512/426 not alive So, this patch fixes subtle corrupted case where node version does not match to summary version which results in infinite loop by gc. Reported-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 796dbbfe4e52cc3ae860794fc20ea157391c4d93 Author: Jaegeuk Kim Date: Fri Mar 24 21:08:56 2017 -0400 f2fs: start SSR much eariler to avoid FG_GC This patch initiates SSR much eariler, resulting in less FG_GC. Signed-off-by: Jaegeuk Kim fs/f2fs/segment.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a20b8a61eff81bdb7097a578752a74860e9d142 Author: Jaegeuk Kim Date: Fri Mar 24 20:41:45 2017 -0400 f2fs: allocate node and hot data in the beginning of partition In order to give more spatial locality, this patch changes the block allocation policy which assigns beginning of partition for small and hot data/node blocks. In order to do this, we set noheap allocation by default and introduce another mount option, heap, to reset it back. Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 6 +++++- fs/f2fs/segment.c | 9 +++++++++ fs/f2fs/super.c | 10 +++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) commit 342e91578eb6909529bc7095964cd44b9c057c4e Author: Matthias Kaehlcke Date: Thu Mar 16 15:26:52 2017 -0700 selinux: Remove unnecessary check of array base in selinux_set_mapping() 'perms' will never be NULL since it isn't a plain pointer but an array of u32 values. This fixes the following warning when building with clang: security/selinux/ss/services.c:158:16: error: address of array 'p_in->perms' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] while (p_in->perms && p_in->perms[k]) { Signed-off-by: Matthias Kaehlcke Signed-off-by: Paul Moore security/selinux/ss/services.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97e4e959c928963359d79dcea623614db8aabf54 Author: Cao jin Date: Tue Mar 21 21:24:18 2017 +0800 pci-error-recovery: doc cleanup Include whitespace shooting; correction; typo fix; superfluous word dropping. Signed-off-by: Cao jin Signed-off-by: Jonathan Corbet Documentation/PCI/pci-error-recovery.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 8654cb8d0371de3f119c657531abf2ee4423cb44 Author: Rob Herring Date: Tue Mar 21 09:14:20 2017 -0500 dtc: update warning settings for new bus and node/property name checks dtc gained new warnings checking PCI and simple buses, unit address formatting, and stricter node and property name checking. Disable the new dtc warnings by default as there are 1000s. As before, warnings are enabled with W=1 or W=2. The strict node and property name checks are a bit subjective, so they are only enabled for W=2. Signed-off-by: Rob Herring scripts/Makefile.lib | 12 +++++++++++- scripts/dtc/update-dtc-source.sh | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) commit 3bdadc86dca07c792c01b966575f00cfc25da4a3 Author: SeongJae Park Date: Mon Mar 27 22:05:34 2017 +0900 Documentation: Fix dead URLs to ftp.kernel.org As ftp.kernel.org is closed [0], this commit fixes dead URLs in documents to use www.kernel.org instead. [0] https://www.kernel.org/shutting-down-ftp-services.html Signed-off-by: SeongJae Park Acked-by: Theodore Ts'o Acked-by: David S. Miller Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/early-userspace/README | 2 +- Documentation/filesystems/ext4.txt | 2 +- Documentation/filesystems/nfs/nfs-rdma.txt | 4 ++-- Documentation/networking/e100.txt | 2 +- Documentation/networking/e1000.txt | 2 +- Documentation/networking/e1000e.txt | 2 +- Documentation/networking/igb.txt | 2 +- Documentation/networking/igbvf.txt | 2 +- Documentation/networking/ixgb.txt | 2 +- Documentation/networking/ixgbe.txt | 2 +- Documentation/process/applying-patches.rst | 12 +++--------- Documentation/process/changes.rst | 10 +++++----- 12 files changed, 19 insertions(+), 25 deletions(-) commit 2a4c22426955d4fc04069811997b7390c0fb858e Author: Stephen Smalley Date: Fri Mar 10 12:14:18 2017 -0500 fs: switch order of CAP_DAC_OVERRIDE and CAP_DAC_READ_SEARCH checks generic_permission() presently checks CAP_DAC_OVERRIDE prior to CAP_DAC_READ_SEARCH. This can cause misleading audit messages when using a LSM such as SELinux or AppArmor, since CAP_DAC_OVERRIDE may not be required for the operation. Flip the order of the tests so that CAP_DAC_OVERRIDE is only checked when required for the operation. Signed-off-by: Stephen Smalley Acked-by: John Johansen Reviewed-by: Serge Hallyn Acked-by: James Morris Signed-off-by: Paul Moore fs/namei.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit b539cc82d493d100606213df459c86e94f342996 Author: Lina Iyer Date: Fri Mar 3 12:41:27 2017 -0800 PM / Domains: Ignore domain-idle-states that are not compatible domain-idle-states property may have phandles to idle state bindings that may not be compatible with idle state definition defined in [1]. Such phandles would just be ignored and not throw and error when read by the domain core. Signed-off-by: Lina Iyer Acked-by: Rob Herring Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki Documentation/devicetree/bindings/power/power_domain.txt | 4 +++- drivers/base/power/domain.c | 16 +++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) commit 397df7092a15f1b56ae76cafeb88776f49bc6fb8 Merge: 14a98e6 d08a9f6 Author: David S. Miller Date: Wed Mar 29 14:13:09 2017 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-03-29 This series contains updates to i40e and i40evf only. Preethi changes the default driver mode of operation to descriptor write-back for VF. Alex cleans up and addresses several issues in the way that i40e handles private flags. Modifies the driver to use the length of the packet instead of the DD status bit to determine if a new descriptor is ready to be processed. Refactors the driver by pulling the code responsible for fetching the receive buffer and synchronizing DMA into a single function. Also pulled the code responsible for handling buffer recycling and page counting and distributed it through several functions, so we can commonize the bits that handle either freeing or recycling the buffers. Cleans up the code in preparation for us adding support for build_skb(). Changed the way we handle the maximum frame size for the receive path so it is more consistent with other drivers. Paul enables XL722 to use the direct read/write method since it does not support the AQ command to read/write the control register. Christopher fixes a case where we miss an arq element if a new one is added before we enable interrupts and exit the loop. Jake cleans up a pointless goto statement. Also cleaned up a flag that was not being used. Carolyn does round 2 for adding a delay to the receive queue to accommodate the hardware needs. ==================== Signed-off-by: David S. Miller commit 612dc0e2e8fbc4b9e0ddbc279b77f5baf4b726d4 Author: simran singhal Date: Wed Mar 29 01:37:45 2017 +0530 iio: adc: ad799x: constify attribute_group structures Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; struct iio_info x; @@ x.event_attrs=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: text data bss dec hex filename 26051 464 0 26515 6793 drivers/iio/adc/ad799x.o File size after: text data bss dec hex filename 26115 400 0 26515 6793 drivers/iio/adc/ad799x.o Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/iio/adc/ad799x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c94645b1b153e4e46599de0181cd517cd6d207d9 Author: simran singhal Date: Wed Mar 29 01:45:28 2017 +0530 iio: adc: max1363: constify attribute_group structures Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; struct iio_info x; @@ x.event_attrs=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: text data bss dec hex filename 36951 448 0 37399 9217 drivers/iio/adc/max1363.o File size after: text data bss dec hex filename 37015 384 0 37399 9217 drivers/iio/adc/max1363.o Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/iio/adc/max1363.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14a98e659c199edb51d3adc53228b632b5fadc9e Merge: d6956ac 66bc1e8 Author: David S. Miller Date: Wed Mar 29 14:10:12 2017 -0700 Merge branch 'tipc-socketpair' Parthasarathy Bhuvaragan says: ==================== tipc: add socketpair support We add socketpair support for connection oriented sockets in the first patch and for connection less in the second. ==================== Signed-off-by: David S. Miller commit 66bc1e8d5d1d156b1e85d8c6925225ad8cbdf523 Author: Erik Hugne Date: Wed Mar 29 11:22:17 2017 +0200 tipc: allow rdm/dgram socketpairs for socketpairs using connectionless transport, we cache the respective node local TIPC portid to use in subsequent calls to send() in the socket's private data. Signed-off-by: Erik Hugne Signed-off-by: Parthasarathy Bhuvaragan Signed-off-by: David S. Miller net/tipc/socket.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 70b03759e9ecfae400605fa34f3d7154cccbbba3 Author: Erik Hugne Date: Wed Mar 29 11:22:16 2017 +0200 tipc: add support for stream/seqpacket socketpairs sockets A and B are connected back-to-back, similar to what AF_UNIX does. Signed-off-by: Erik Hugne Signed-off-by: Parthasarathy Bhuvaragan Signed-off-by: David S. Miller net/tipc/socket.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit d6956ac87b5ff6841b09c273a70de86200d82019 Author: Jisheng Zhang Date: Wed Mar 29 16:47:19 2017 +0800 net: mvneta: set rx mode during resume if interface is running I found a bug by: 0. boot and start dhcp client 1. echo mem > /sys/power/state 2. resume back immediately 3. don't touch dhcp client to renew the lease 4. ping the gateway. No acks Usually, after step2, the DHCP lease isn't expired, so in theory we should resume all back. But in fact, it doesn't. It turns out the rx mode isn't resumed correctly. This patch fixes it by adding mvneta_set_rx_mode(dev) in the resume hook if interface is running. Signed-off-by: Jisheng Zhang Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e36020fd69952bf42554bbeb2c0e98927a0c656b Author: simran singhal Date: Wed Mar 29 01:51:48 2017 +0530 iio: dac: ad5504: constify attribute_group structures Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; struct iio_info x; @@ x.event_attrs=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: text data bss dec hex filename 3046 360 0 3406 d4e drivers/iio/dac/ad5504.o File size after: text data bss dec hex filename 3110 296 0 3406 d4e drivers/iio/dac/ad5504.o Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/iio/dac/ad5504.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a38d20d791fdcd79ebccda15a8308a6d8ada6e1c Author: Jisheng Zhang Date: Wed Mar 29 16:42:26 2017 +0800 net: mvneta: add RGMII_RXID and RGMII_TXID support RGMII_RXID and RGMII_TX_ID share the same GMAC CTRL setting as RGMII or RGMII_ID. Signed-off-by: Jisheng Zhang Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 2 ++ 1 file changed, 2 insertions(+) commit 56607b987b1f85aa57b570edd0aa35e6b8dfa6a6 Author: Philippe Reynes Date: Wed Mar 29 08:24:21 2017 +0200 net: veth: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Reviewed-by: Xin Long Signed-off-by: David S. Miller drivers/net/veth.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit e48174779440c79ff5dd75f0e6b169d4e184262d Author: Sakari Ailus Date: Tue Mar 28 15:26:22 2017 +0300 device property: Read strings using string array reading functions Always read strings using of_property_read_string_array() instead of of_property_read_string(). This allows using a single operation struct callback for accessing strings. Same for pset_prop_read_string_array() and pset_prop_read_string(). Signed-off-by: Sakari Ailus Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 45 +-------------------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) commit b2e33536c010513e07e92ca914fcc11108d5eef5 Author: sayli karnik Date: Thu Mar 30 02:01:16 2017 +0530 Documentation: Add flexible-arrays.rst to the documentation tree Add flexible-arrays.rst to Documentation/core-api. Add kernel-doc comments to allow referencing. Signed-off-by: sayli karnik Signed-off-by: Jonathan Corbet Documentation/core-api/flexible-arrays.rst | 130 +++++++++++++++++++++++++++++ Documentation/core-api/index.rst | 1 + include/linux/flex_array.h | 67 +++++++++++++++ 3 files changed, 198 insertions(+) commit 630e57573efa20b586c808400005d0ebfb93fc6a Author: Box, David E Date: Wed Mar 29 09:45:57 2017 -0700 cpufreq: intel_pstate: Add support for Gemini Lake Use same parameters as INTEL_FAM6_ATOM_GOLDMONT to enable Gemini Lake. Signed-off-by: Box, David E Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 1 + 1 file changed, 1 insertion(+) commit 2f075565e32b7dc92559f9bc294ac94a487999fc Author: Ben Widawsky Date: Fri Mar 24 14:29:48 2017 -0700 drm/i915: Use LINEAR modifier instead of NONE They're the same, so use the one which makes more sense. Signed-off-by: Ben Widawsky Link: http://patchwork.freedesktop.org/patch/msgid/20170324212950.2206-1-ben@bwidawsk.net Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/intel_display.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit fd2b2975149f5f7099693027cece81b16842964a Author: Arnaldo Carvalho de Melo Date: Wed Mar 29 16:37:51 2017 -0300 perf trace: Handle unpaired raw_syscalls:sys_exit event Which may happen when we start a tracing session and a thread is waiting for something like "poll" to return, in which case we better print "?" both for the syscall entry timestamp and for the duration. E.g.: Tracing existing mutt session: # perf trace -p `pidof mutt` ? ( ? ): mutt/17135 ... [continued]: poll()) = 1 0.027 ( 0.013 ms): mutt/17135 read(buf: 0x7ffcb3c42cef, count: 1) = 1 0.047 ( 0.008 ms): mutt/17135 poll(ufds: 0x7ffcb3c42c50, nfds: 1, timeout_msecs: 1000) = 1 0.059 ( 0.008 ms): mutt/17135 read(buf: 0x7ffcb3c42cef, count: 1) = 1 Before it would print a large number because we'd do: ttrace->entry_time - trace->base_time And entry_time would be 0, while base_time would be the timestamp for the first event 'perf trace' reads, oops. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Luis Claudio Gonçalves Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-wbcb93ofva2qdjd5ltn5eeqq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 43 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) commit 6e12db376b60b7158e4e6006af60566f8c68f7ab Author: Geert Uytterhoeven Date: Thu Mar 9 14:17:50 2017 +0100 base: soc: Allow early registration of a single SoC device Commit 1da1b3628df34a2a ("base: soc: Early register bus when needed") added support for early registration of SoC devices from a core_initcall(). However, some drivers need to check the SoC revision from an early_initcall(), which is even earlier. A specific example is the Renesas R-Car SYSC driver, which manages PM Domains and thus needs to be initialized from an early_initcall. Preproduction versions of the R-Car H3 SoC have an additional power area, which no longer exists on H3 ES2.0, so the R-Car SYSC driver needs to check the exact SoC revision before instantiating a PM Domain for that power area. While registering the SoC bus and device, and using soc_device_match(), from an early_initcall() do work, the "soc" directory and the "soc0" file end up wrongly in the sysfs root, as the "bus" resp. "devices" directories haven't been created yet. To fix this, allow to register a single SoC device early on. As long as the SoC bus isn't registered, soc_device_match() just matches against this early device. When the SoC bus is registered later, the early device is registered for real. Note that soc_device_register() returns NULL (no error, but also not a valid pointer) when registering an early device. Hence platform devices cannot be instantiated as children of the "soc0" node representing an early SoC device. This should not be an issue, as that practice has been deprecated for new platforms. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann drivers/base/soc.c | 50 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 18 deletions(-) commit 0656db9e445a12122f76e259ab89d256cb07a0ad Author: Geert Uytterhoeven Date: Thu Mar 9 12:28:18 2017 +0100 base: soc: Let soc_device_match() return no match when called too early If soc_device_match() is called before the SoC bus has been registered, bus_for_each_dev() returns -EINVAL, which is considered a match, as it is non-zero. While calling soc_device_match() too early can be considered an integration mistake, returning a match is counter-intuitive: soc_device_match() is typically used to handle quirks, i.e. to deviate from the default path. Hence add a check to abort checking and return no match instead. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann drivers/base/soc.c | 2 ++ 1 file changed, 2 insertions(+) commit 3e8a7069b9ded55d408e3272213a95f07036dfa5 Author: Jens Axboe Date: Fri Mar 24 12:04:19 2017 -0600 blk-mq: include errors in did_work calculation Currently we return true in blk_mq_dispatch_rq_list() if we queued IO successfully, but we really want to return whether or not the we made progress. Progress includes if we got an error return. If we don't, this can lead to a hang in blk_mq_sched_dispatch_requests() when a driver is draining IO by returning BLK_MQ_QUEUE_ERROR instead of manually ending the IO in error and return BLK_MQ_QUEUE_OK. Tested-by: Josef Bacik Reviewed-by: Bart Van Assche Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b58e176914c4786fd28edfc44e7174310613fc31 Author: Josef Bacik Date: Tue Mar 28 16:37:52 2017 -0400 block-mq: don't re-queue if we get a queue error When try to issue a request directly and we fail we will requeue the request, but call blk_mq_end_request() as well. This leads to the completed request being on a queuelist and getting ended twice, which causes list corruption in schedulers and other shenanigans. Signed-off-by: Josef Bacik Reviewed-by: Ming Lei Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe block/blk-mq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ac310dc9fafcffaddbde7ca2137edb59cd4f414f Author: Clemens Ladisch Date: Wed Mar 29 20:55:50 2017 +0200 ALSA: oxygen: simply setting of the shortname for Xonar DG cards We don't need to manually set the card name; with an entry in the names[] array, this happens automatically. Signed-off-by: Clemens Ladisch Signed-off-by: Takashi Iwai sound/pci/oxygen/oxygen.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit cd3b0b05328e4791c1c5a4edd91599f409bd645f Author: Sebastian Reichel Date: Fri Mar 24 09:47:32 2017 +0100 leds: cpcap: new driver Motorola CPCAP is a PMIC (power management integrated circuit) found in multiple smartphones. This driver adds support for the chip's LED controllers. This introduces support for all controllers used by the Droid 4. According to Motorola's driver (no datasheets available) there a couple of more LED controllers. I did not add support for them, since I cannot verify that they work with my modifications. Signed-off-by: Sebastian Reichel Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski .../devicetree/bindings/leds/leds-cpcap.txt | 29 +++ drivers/leds/Kconfig | 9 + drivers/leds/Makefile | 1 + drivers/leds/leds-cpcap.c | 239 +++++++++++++++++++++ 4 files changed, 278 insertions(+) commit 6c8583d6feeb45a4c812114f6087e9911b93ea48 Author: spjoshi@codeaurora.org Date: Wed Jan 18 19:31:53 2017 -0800 arm64: dts: msm8996: Add ADSP PIL node Add ADSP node required for Qualcomm ADSP Peripheral Image Loader. Signed-off-by: Sarangdhar Joshi Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8996.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 27414e41ba5f1477c5344aff4d9e6fdb4547c320 Author: Bjorn Andersson Date: Fri Feb 17 00:53:23 2017 -0800 arm64: dts: qcom: pm8994: Add rtc node Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/pm8994.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 1b0c105b7f4d11f251b57b68e45ed65dadd1b209 Author: Bjorn Andersson Date: Wed Feb 1 02:24:24 2017 -0800 arm64: dts: apq8016-sbc: Add ramoops Declare a ramoops memory segment to aid debugging for those without UART access. Verified to carry console log when holding volume down for 15 seconds. No memory region for ramoops-like support was found downstream, so the arbitrarily picked region is the last MB of System RAM. Cc: John Stultz Cc: Mart Raudsepp Cc: Stephen Boyd Signed-off-by: Bjorn Andersson Acked-by: Stephen Boyd Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6c2257062e4dfc8294a6f1b1953bdfe1e0b7f60c Merge: e944e97 d7e75a3 Author: David S. Miller Date: Wed Mar 29 11:24:21 2017 -0700 Merge tag 'mlx5e-pedit' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Or Gerlitz says: ==================== mlx5e-pedit 2017-03-28 This series adds support for offloading modifications of packet headers using ConnectX-5 HW header re-write as an action applied during packet steering. The offloaded SW mechanism is TC's pedit action. The offloading is supported for E-Switch steering of VF traffic in the SRIOV switchdev mode and for NIC (non eswitch) RX. One use-case for this offload on virtual networks, is when the hypervisor implements flow based router such as Open-Stack's DVR, where L2 headers of guest packets re-written with routers' MAC addresses and the IP TTL is decremented. Another use case (which can be applied in parallel with routing) is stateless NAT where guest L3/L4 headers are re-written. The series is built as follows: the 1st six patches are preperations which don't yet add new functionality, patches 7-8 add the FW APIs (data-structures and commands) for header re-write, and patch nine allows offloading driver to access pedit keys. The 10th patch is somehow the core of the series, where we translate from the pedit way to represent set of header modification elements to the FW API for that same matter. Once a set of HW modification is established, we register it with the FW and get a modify header ID. When this ID is used with an action during packet steering, the HW applies the header modification on the packet. Patches 11 and 12 implement the above logic as an offload for pedit action for the NIC and E-Switch use-cases. I'd like to thanks Elijah Shakkour for implementing and helping me testing this functionality on HW simulator, before it could be done with FW. ==================== Signed-off-by: David S. Miller commit e944e97afc66e619603390fc5f0c6bc02f961353 Author: David Ahern Date: Tue Mar 28 15:19:49 2017 -0700 net: mpls: Update lfib_nlmsg_size to skip deleted nexthops A recent commit skips nexthops in a route if the device has been deleted. Update lfib_nlmsg_size accordingly. Reported-by: Roopa Prabhu Signed-off-by: David Ahern Acked-by: Roopa Prabhu Acked-by: Robert Shearman Signed-off-by: David S. Miller net/mpls/af_mpls.c | 2 ++ 1 file changed, 2 insertions(+) commit d0281a56b00c63ad51ebb550fba0351807475c47 Author: Florian Fainelli Date: Tue Mar 28 12:57:09 2017 -0700 net: phy: Allow building mdio-boardinfo into the kernel mdio-boardinfo contains code that is helpful for platforms to register specific MDIO bus devices independent of how CONFIG_MDIO_DEVICE or CONFIG_PHYLIB will be selected (modular or built-in). In order to make that possible, let's do the following: - descend into drivers/net/phy/ unconditionally - make mdiobus_setup_mdiodev_from_board_info() take a callback argument which allows us not to expose the internal MDIO board info list and mutex, yet maintain the logic within the same file - relocate the code that creates a MDIO device into drivers/net/phy/mdio_bus.c - build mdio-boardinfo.o into the kernel as soon as MDIO_DEVICE is defined (y or m) Fixes: 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs") Fixes: 648ea0134069 ("net: phy: Allow pre-declaration of MDIO devices") Signed-off-by: Florian Fainelli Tested-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/Makefile | 2 +- drivers/net/phy/Makefile | 6 +++++- drivers/net/phy/mdio-boardinfo.c | 21 +++++++-------------- drivers/net/phy/mdio-boardinfo.h | 5 ++++- drivers/net/phy/mdio_bus.c | 32 +++++++++++++++++++++++++++++++- 5 files changed, 48 insertions(+), 18 deletions(-) commit 457e490f2b7417564b681992e4eee355e1dcbb14 Author: Tahsin Erdogan Date: Wed Mar 29 11:27:19 2017 -0600 blkcg: allocate struct blkcg_gq outside request queue spinlock blkg_conf_prep() currently calls blkg_lookup_create() while holding request queue spinlock. This means allocating memory for struct blkcg_gq has to be made non-blocking. This causes occasional -ENOMEM failures in call paths like below: pcpu_alloc+0x68f/0x710 __alloc_percpu_gfp+0xd/0x10 __percpu_counter_init+0x55/0xc0 cfq_pd_alloc+0x3b2/0x4e0 blkg_alloc+0x187/0x230 blkg_create+0x489/0x670 blkg_lookup_create+0x9a/0x230 blkg_conf_prep+0x1fb/0x240 __cfqg_set_weight_device.isra.105+0x5c/0x180 cfq_set_weight_on_dfl+0x69/0xc0 cgroup_file_write+0x39/0x1c0 kernfs_fop_write+0x13f/0x1d0 __vfs_write+0x23/0x120 vfs_write+0xc2/0x1f0 SyS_write+0x44/0xb0 entry_SYSCALL_64_fastpath+0x18/0xad In the code path above, percpu allocator cannot call vmalloc() due to queue spinlock. A failure in this call path gives grief to tools which are trying to configure io weights. We see occasional failures happen shortly after reboots even when system is not under any memory pressure. Machines with a lot of cpus are more vulnerable to this condition. Do struct blkcg_gq allocations outside the queue spinlock to allow blocking during memory allocations. Suggested-by: Tejun Heo Signed-off-by: Tahsin Erdogan Acked-by: Tejun Heo Signed-off-by: Jens Axboe block/blk-cgroup.c | 123 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 98 insertions(+), 25 deletions(-) commit d708f0d5026f48081debdd1c5b0a5636455a9589 Author: Jens Axboe Date: Wed Mar 29 11:25:48 2017 -0600 Revert "blkcg: allocate struct blkcg_gq outside request queue spinlock" I inadvertently applied the v5 version of this patch, whereas the agreed upon version was v5. Revert this one so we can apply the right one. This reverts commit 7fc6b87a9ff537e7df32b1278118ce9c5bcd6788. block/blk-cgroup.c | 138 +++++++++++++++++---------------------------- include/linux/blk-cgroup.h | 6 +- 2 files changed, 53 insertions(+), 91 deletions(-) commit 48b99c9d65a9d093318e34e7d31fdf0612372e3c Author: Jens Axboe Date: Wed Mar 29 11:10:34 2017 -0600 blk-mq: fix a typo and a spelling mistake Signed-off-by: Jens Axboe block/blk-mq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 018c259bbf15f5d4cd9d3d2b5125a063511c279f Author: Sagi Grimberg Date: Wed Mar 29 20:04:36 2017 +0300 blk-mq-pci: Fix two spelling mistakes Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe block/blk-mq-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd59f974bd5e04d000e38ceca1a19085d029794b Author: Kees Cook Date: Sat Mar 25 00:51:32 2017 +0100 ARM: 8666/1: mm: dump: Add domain to output This adds the memory domain (on non-LPAE) to the PMD and PTE dumps. This isn't in the regular PMD bits because I couldn't find a clean way to fall back to retain some of the PMD bits when reporting PTE. So this is special-cased currently. New output example: ---[ Modules ]--- 0x7f000000-0x7f001000 4K KERNEL ro x SHD MEM/CACHED/WBWA 0x7f001000-0x7f002000 4K KERNEL ro NX SHD MEM/CACHED/WBWA 0x7f002000-0x7f004000 8K KERNEL RW NX SHD MEM/CACHED/WBWA ---[ Kernel Mapping ]--- 0x80000000-0x80100000 1M KERNEL RW NX SHD 0x80100000-0x80800000 7M KERNEL ro x SHD 0x80800000-0x80b00000 3M KERNEL ro NX SHD 0x80b00000-0xa0000000 501M KERNEL RW NX SHD ... ---[ Vectors ]--- 0xffff0000-0xffff1000 4K VECTORS USR ro x SHD MEM/CACHED/WBWA 0xffff1000-0xffff2000 4K VECTORS ro x SHD MEM/CACHED/WBWA Signed-off-by: Kees Cook Signed-off-by: Russell King arch/arm/mm/dump.c | 54 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 10 deletions(-) commit cdf4275e957c6bad3756e98942341667f1d7de7d Author: Charles Keepax Date: Tue Mar 28 15:14:39 2017 +0100 MAINTAINERS: Add missing regulator regex for Wolfson Arizona parts The maintainers entry for the Wolfson parts seems to be missing an entry that covers the Arizona regulator drivers, correct this by adding one. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 0feb837a42c95fee901e03f76a1266db85ceb6ec Author: Charles Keepax Date: Tue Mar 28 15:14:38 2017 +0100 regulator: arizona-ldo1: Avoid potential memory leak reading init_data The device argument passed to of_get_regulator_init_data is used to do some devres memory allocation. Currently the driver passes the MFD device pointer to this function, this could result in the init_data allocation being leaked if the regulator is unbound but the MFD isn't. Correct this issue by correctly passing the local platform device. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown drivers/regulator/arizona-ldo1.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 2543ef3173889373fc07df61520e1bb42a99c85e Author: Charles Keepax Date: Tue Mar 28 15:14:37 2017 +0100 regulator: arizona-micsupp: Avoid potential memory leak reading init_data The device argument passed to of_get_regulator_init_data is used to do some devres memory allocation. Currently the driver passes the MFD device pointer to this function, this could result in the init_data allocation being leaked if the regulator is unbound but the MFD isn't. Correct this issue by correctly passing the local platform device. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown drivers/regulator/arizona-micsupp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit beba3a20bf90ce1b93e24592c3ebf0d0bb581bbe Author: Al Viro Date: Sat Mar 25 19:33:21 2017 -0400 x86: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/x86/Kconfig | 1 + arch/x86/include/asm/uaccess.h | 53 ------------ arch/x86/include/asm/uaccess_32.h | 95 ++++----------------- arch/x86/include/asm/uaccess_64.h | 45 ++-------- arch/x86/lib/usercopy.c | 55 +----------- arch/x86/lib/usercopy_32.c | 170 +------------------------------------- 6 files changed, 24 insertions(+), 395 deletions(-) commit a41e0d754240fe8ca9c4f2070bf67e3b0228aa22 Author: Al Viro Date: Sat Mar 25 19:38:23 2017 -0400 x86: don't wank with magical size in __copy_in_user() ... especially since copy_in_user() doesn't Signed-off-by: Al Viro arch/x86/include/asm/uaccess_64.h | 58 ++------------------------------------- arch/x86/lib/usercopy_64.c | 9 ------ 2 files changed, 2 insertions(+), 65 deletions(-) commit 710a0647ba955abd25460c36a09d80fdbe878273 Author: Markus Elfring Date: Sun Jan 15 14:04:53 2017 +0100 selinuxfs: Use seq_puts() in sel_avc_stats_seq_show() A string which did not contain data format specifications should be put into a sequence. Thus use the corresponding function "seq_puts". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/selinuxfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8ee4586ca5fe6c2a00f6a39f828f54c8f6cda472 Author: Markus Elfring Date: Sun Jan 15 13:30:20 2017 +0100 selinux: Adjust two checks for null pointers The script "checkpatch.pl" pointed information out like the following. Comparison to NULL could be written !… Thus fix affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/sidtab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b380f783772eeb66a0da85549a85aadbe5f8e76d Author: Markus Elfring Date: Sun Jan 15 13:13:19 2017 +0100 selinux: Use kmalloc_array() in sidtab_init() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/sidtab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebd2b47ba52760e9653456ba19032f79d734a343 Author: Markus Elfring Date: Sun Jan 15 12:10:09 2017 +0100 selinux: Return directly after a failed kzalloc() in roles_init() Return directly after a call of the function "kzalloc" failed at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7befb7514e5d53026e9fe4a6548f118a65a20a4f Author: Markus Elfring Date: Sun Jan 15 11:20:13 2017 +0100 selinux: Return directly after a failed kzalloc() in perm_read() Return directly after a call of the function "kzalloc" failed at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 442ca4d656645505346017c37ac137cde680bf38 Author: Markus Elfring Date: Sun Jan 15 11:15:19 2017 +0100 selinux: Return directly after a failed kzalloc() in common_read() Return directly after a call of the function "kzalloc" failed at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit df4a14dfb484f95d81126e481e66b6e22eec49e8 Author: Markus Elfring Date: Sat Jan 14 22:30:51 2017 +0100 selinux: Return directly after a failed kzalloc() in class_read() Return directly after a call of the function "kzalloc" failed at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ea6e2f7d12921f336def7398805ee3b1619e2f4b Author: Markus Elfring Date: Sat Jan 14 22:20:25 2017 +0100 selinux: Return directly after a failed kzalloc() in role_read() Return directly after a call of the function "kzalloc" failed at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 549fe69ee5c7a7f55c34555032961a2265e6e713 Author: Markus Elfring Date: Sat Jan 14 22:15:54 2017 +0100 selinux: Return directly after a failed kzalloc() in type_read() Return directly after a call of the function "kzalloc" failed at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4bd9f07b89f1a300f96b4863c3a8a4ec36991930 Author: Markus Elfring Date: Sat Jan 14 22:08:22 2017 +0100 selinux: Return directly after a failed kzalloc() in user_read() Return directly after a call of the function "kzalloc" failed at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6eb0d80d1df364bbb31d869e66063ca239912cbf Author: Loic Pallardy Date: Mon Mar 27 18:05:00 2017 +0200 ARM: dts: STiH407-family: update rproc node names to avoid conflict The two st231-rproc nodes have the same name; Due to that it was impossible to distinguish them in remoteproc sysfs and debugfs interface. This patch provides them a name related to their functionality. Signed-off-by: Loic Pallardy arch/arm/boot/dts/stih407-family.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ef980cf8b05bc862f4533fcdeae2911e6ff7027a Author: Simon Baatz Date: Mon Mar 27 20:02:08 2017 +0200 mtd: nand: orion: improve handling of optional clock The clock gate used by orion_nand is not available on all platforms. When getting this optional clock gate, the code masked all errors. Let's be more precise here and actually only allow ENOENT. EPROBE_DEFER is handled like any other error code since probe deferral is not supported by drivers using module_platform_driver_probe(). Signed-off-by: Simon Baatz Signed-off-by: Boris Brezillon drivers/mtd/nand/orion_nand.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 675b11d94ce9baa5eb365a51b35d2793f77c8ab8 Author: Simon Baatz Date: Mon Mar 27 20:02:07 2017 +0200 mtd: nand: orion: fix clk handling The clk handling in orion_nand.c had two problems: - In the probe function, clk_put() was called for an enabled clock, which violates the API (see documentation for clk_put() in include/linux/clk.h) - In the error path of the probe function, clk_put() could be called twice for the same clock. In order to clean this up, use the managed function devm_clk_get() and store the pointer to the clk in the driver data. Fixes: baffab28b13120694fa3ebab08d3e99667a851d2 ('ARM: Orion: fix driver probe error handling with respect to clk') Cc: # v4.5+ Signed-off-by: Simon Baatz Signed-off-by: Boris Brezillon drivers/mtd/nand/orion_nand.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit 161b28aae1651aa7ad63ec14753aa8a751154340 Author: Joerg Roedel Date: Tue Mar 28 17:04:52 2017 +0200 iommu/vt-d: Make sure IOMMUs are off when intel_iommu=off When booting into a kexec kernel with intel_iommu=off, and the previous kernel had intel_iommu=on, the IOMMU hardware is still enabled and gets not disabled by the new kernel. This causes the boot to fail because DMA is blocked by the hardware. Disable the IOMMUs when we find it enabled in the kexec kernel and boot with intel_iommu=off. Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit b5921191005d050d55cf4f3b10f60110f7ed2c24 Author: Markus Elfring Date: Sat Jan 14 21:52:55 2017 +0100 selinux: Improve another size determination in sens_read() Replace the specification of a data type by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78ec187f64fa5d8f837b8fc5bbbad88a89b63ab4 Author: Philipp Zabel Date: Thu Mar 2 16:14:43 2017 +0100 drm/etnaviv: submit support for out-fences Based on commit 4cd0945901a6 ("drm/msm: submit support for out-fences"). We increment the minor driver version so userspace can detect explicit fence support. Signed-off-by: Philipp Zabel Signed-off-by: Lucas Stach --- v3: Changed to work with fence returned from GPU submit. drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 28 ++++++++++++++++++++++++++++ include/uapi/drm/etnaviv_drm.h | 6 ++++-- 3 files changed, 33 insertions(+), 3 deletions(-) commit 6e2b98cf3b4f81df68a150e1d8737100160e1262 Author: Lucas Stach Date: Wed Mar 22 13:00:53 2017 +0100 drm/etnaviv: return GPU fence through the submit structure The next patch will need the complete dma_fence, instead of just the seqno, to create the sync_file in etnaviv_ioctl_gem_submit, in case an out_fence_fd is requested. The submit needs to hold a reference to the dma_fence, to avoid raceing with the GPU completing the fence. Signed-off-by: Lucas Stach Tested-by: Philipp Zabel --- New patch in v3. drivers/gpu/drm/etnaviv/etnaviv_gem.h | 3 ++- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 3 ++- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) commit 9ad59fea162c139f62335f0ca0ce1fdf4f82bd91 Author: Philipp Zabel Date: Thu Mar 2 16:05:45 2017 +0100 drm/etnaviv: submit support for in-fences Loosely based on commit f0a42bb5423a ("drm/msm: submit support for in-fences"). Unfortunately, struct drm_etnaviv_gem_submit doesn't have a flags field yet, so we have to extend the structure and trust that drm_ioctl will clear the flags for us if an older userspace only submits part of the struct. Signed-off-by: Philipp Zabel Reviewed-by: Gustavo Padovan Reviewed-by: Sumit Semwal Reviewed-by: Lucas Stach Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/Kconfig | 1 + drivers/gpu/drm/etnaviv/etnaviv_gem.h | 1 + drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 34 +++++++++++++++++++++++++++- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 5 +++- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 2 +- include/uapi/drm/etnaviv_drm.h | 6 +++++ 6 files changed, 46 insertions(+), 3 deletions(-) commit bc242fc107c71354181ba82bd9e539de8d088ae9 Author: Johan Hovold Date: Tue Mar 28 12:13:50 2017 +0200 USB: serial: drop termios-flag debugging Drop some unnecessary termios-flag debugging that have been faithfully reproduced in a few old drivers, including the "clfag" typo and all. This also addresses a compiler warning on sparc where tcflag_t is unsigned long and would have required an explicit cast. Reported-by: Geert Uytterhoeven Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/io_edgeport.c | 5 ----- drivers/usb/serial/io_ti.c | 8 -------- drivers/usb/serial/mos7720.c | 11 ----------- drivers/usb/serial/mos7840.c | 10 ---------- drivers/usb/serial/ti_usb_3410_5052.c | 8 -------- 5 files changed, 42 deletions(-) commit 02ba8893ac9aa34fcb4ce2a9baef5615b190335a Author: Omar Sandoval Date: Tue Mar 28 16:12:17 2017 -0700 block: fix leak of q->rq_wb CONFIG_DEBUG_TEST_DRIVER_REMOVE found a possible leak of q->rq_wb when a request queue is reregistered. This has been a problem since wbt was introduced, but the WARN_ON(!list_empty(&stats->callbacks)) in the blk-stat rework exposed it. Fix it by cleaning up wbt when we unregister the queue. Fixes: 87760e5eef35 ("block: hook up writeback throttling") Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-sysfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0c9539a431bd4e4cbe475eb17e587f3ac06f2ae2 Author: Omar Sandoval Date: Tue Mar 28 16:12:16 2017 -0700 blk-mq: fix leak of q->stats blk_alloc_queue_node() already allocates q->stats, so blk_mq_init_allocated_queue() is overwriting it with a new allocation. Fixes: a83b576c9c25 ("block: fix stacked driver stats init and free") Reviewed-by: Ming Lei Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq.c | 4 ---- 1 file changed, 4 deletions(-) commit 334335d2f7a077a5ff561d86b0ad43bedd83ca05 Author: Omar Sandoval Date: Tue Mar 28 16:12:15 2017 -0700 block: warn if sharing request queue across gendisks Now that the remaining drivers have been converted to one request queue per gendisk, let's warn if a request queue gets registered more than once. This will catch future drivers which might do it inadvertently or any old drivers that I may have missed. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-sysfs.c | 7 +++++++ include/linux/blkdev.h | 1 + 2 files changed, 8 insertions(+) commit d3cfb2a0ac0b8487d28a1ee207c29617bf6e6820 Author: Ming Lei Date: Mon Mar 27 20:06:58 2017 +0800 block: block new I/O just after queue is set as dying Before commit 780db2071a(blk-mq: decouble blk-mq freezing from generic bypassing), the dying flag is checked before entering queue, and Tejun converts the checking into .mq_freeze_depth, and assumes the counter is increased just after dying flag is set. Unfortunately we doesn't do that in blk_set_queue_dying(). This patch calls blk_freeze_queue_start() in blk_set_queue_dying(), so that we can block new I/O coming once the queue is set as dying. Given blk_set_queue_dying() is always called in remove path of block device, and queue will be cleaned up later, we don't need to worry about undoing the counter. Cc: Tejun Heo Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-core.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 1671d522cdd9933dee7dddfcf9f62c561283824a Author: Ming Lei Date: Mon Mar 27 20:06:57 2017 +0800 block: rename blk_mq_freeze_queue_start() As the .q_usage_counter is used by both legacy and mq path, we need to block new I/O if queue becomes dead in blk_queue_enter(). So rename it and we can use this function in both paths. Reviewed-by: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe block/blk-core.c | 2 +- block/blk-mq.c | 10 +++++----- drivers/block/mtip32xx/mtip32xx.c | 2 +- drivers/nvme/host/core.c | 2 +- include/linux/blk-mq.h | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) commit 5ed61d3f08d44937859dc537c5362ca293c98b04 Author: Ming Lei Date: Mon Mar 27 20:06:56 2017 +0800 block: add a read barrier in blk_queue_enter() Without the barrier, reading DEAD flag of .q_usage_counter and reading .mq_freeze_depth may be reordered, then the following wait_event_interruptible() may never return. Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-core.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d9d149a39690184f63d74e3425c1e90b1d7e67d6 Author: Ming Lei Date: Mon Mar 27 20:06:55 2017 +0800 blk-mq: comment on races related with timeout handler This patch adds comment on two races related with timeout handler: - requeue from queue busy vs. timeout - rq free & reallocation vs. timeout Both the races themselves and current solution aren't explicit enough, so add comments on them. Cc: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe block/blk-mq.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit a4ef8e566fd2b24606524425c3de5e235bd85428 Author: Ming Lei Date: Wed Mar 22 10:14:43 2017 +0800 blk-mq: don't complete un-started request in timeout handler When iterating busy requests in timeout handler, if the STARTED flag of one request isn't set, that means the request is being processed in block layer or driver, and isn't submitted to hardware yet. In current implementation of blk_mq_check_expired(), if the request queue becomes dying, un-started requests are handled as being completed/freed immediately. This way is wrong, and can cause rq corruption or double allocation[1][2], when doing I/O and removing&resetting NVMe device at the sametime. This patch fixes several issues reported by Yi Zhang. [1]. oops log 1 [ 581.789754] ------------[ cut here ]------------ [ 581.789758] kernel BUG at block/blk-mq.c:374! [ 581.789760] invalid opcode: 0000 [#1] SMP [ 581.789761] Modules linked in: vfat fat ipmi_ssif intel_rapl sb_edac edac_core x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm nvme irqbypass crct10dif_pclmul nvme_core crc32_pclmul ghash_clmulni_intel intel_cstate ipmi_si mei_me ipmi_devintf intel_uncore sg ipmi_msghandler intel_rapl_perf iTCO_wdt mei iTCO_vendor_support mxm_wmi lpc_ich dcdbas shpchp pcspkr acpi_power_meter wmi nfsd auth_rpcgss nfs_acl lockd dm_multipath grace sunrpc ip_tables xfs libcrc32c sd_mod mgag200 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm ahci libahci crc32c_intel tg3 libata megaraid_sas i2c_core ptp fjes pps_core dm_mirror dm_region_hash dm_log dm_mod [ 581.789796] CPU: 1 PID: 1617 Comm: kworker/1:1H Not tainted 4.10.0.bz1420297+ #4 [ 581.789797] Hardware name: Dell Inc. PowerEdge R730xd/072T6D, BIOS 2.2.5 09/06/2016 [ 581.789804] Workqueue: kblockd blk_mq_timeout_work [ 581.789806] task: ffff8804721c8000 task.stack: ffffc90006ee4000 [ 581.789809] RIP: 0010:blk_mq_end_request+0x58/0x70 [ 581.789810] RSP: 0018:ffffc90006ee7d50 EFLAGS: 00010202 [ 581.789811] RAX: 0000000000000001 RBX: ffff8802e4195340 RCX: ffff88028e2f4b88 [ 581.789812] RDX: 0000000000001000 RSI: 0000000000001000 RDI: 0000000000000000 [ 581.789813] RBP: ffffc90006ee7d60 R08: 0000000000000003 R09: ffff88028e2f4b00 [ 581.789814] R10: 0000000000001000 R11: 0000000000000001 R12: 00000000fffffffb [ 581.789815] R13: ffff88042abe5780 R14: 000000000000002d R15: ffff88046fbdff80 [ 581.789817] FS: 0000000000000000(0000) GS:ffff88047fc00000(0000) knlGS:0000000000000000 [ 581.789818] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 581.789819] CR2: 00007f64f403a008 CR3: 000000014d078000 CR4: 00000000001406e0 [ 581.789820] Call Trace: [ 581.789825] blk_mq_check_expired+0x76/0x80 [ 581.789828] bt_iter+0x45/0x50 [ 581.789830] blk_mq_queue_tag_busy_iter+0xdd/0x1f0 [ 581.789832] ? blk_mq_rq_timed_out+0x70/0x70 [ 581.789833] ? blk_mq_rq_timed_out+0x70/0x70 [ 581.789840] ? __switch_to+0x140/0x450 [ 581.789841] blk_mq_timeout_work+0x88/0x170 [ 581.789845] process_one_work+0x165/0x410 [ 581.789847] worker_thread+0x137/0x4c0 [ 581.789851] kthread+0x101/0x140 [ 581.789853] ? rescuer_thread+0x3b0/0x3b0 [ 581.789855] ? kthread_park+0x90/0x90 [ 581.789860] ret_from_fork+0x2c/0x40 [ 581.789861] Code: 48 85 c0 74 0d 44 89 e6 48 89 df ff d0 5b 41 5c 5d c3 48 8b bb 70 01 00 00 48 85 ff 75 0f 48 89 df e8 7d f0 ff ff 5b 41 5c 5d c3 <0f> 0b e8 71 f0 ff ff 90 eb e9 0f 1f 40 00 66 2e 0f 1f 84 00 00 [ 581.789882] RIP: blk_mq_end_request+0x58/0x70 RSP: ffffc90006ee7d50 [ 581.789889] ---[ end trace bcaf03d9a14a0a70 ]--- [2]. oops log2 [ 6984.857362] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 [ 6984.857372] IP: nvme_queue_rq+0x6e6/0x8cd [nvme] [ 6984.857373] PGD 0 [ 6984.857374] [ 6984.857376] Oops: 0000 [#1] SMP [ 6984.857379] Modules linked in: ipmi_ssif vfat fat intel_rapl sb_edac edac_core x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel ipmi_si iTCO_wdt iTCO_vendor_support mxm_wmi ipmi_devintf intel_cstate sg dcdbas intel_uncore mei_me intel_rapl_perf mei pcspkr lpc_ich ipmi_msghandler shpchp acpi_power_meter wmi nfsd auth_rpcgss dm_multipath nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod mgag200 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect crc32c_intel sysimgblt fb_sys_fops ttm nvme drm nvme_core ahci libahci i2c_core tg3 libata ptp megaraid_sas pps_core fjes dm_mirror dm_region_hash dm_log dm_mod [ 6984.857416] CPU: 7 PID: 1635 Comm: kworker/7:1H Not tainted 4.10.0-2.el7.bz1420297.x86_64 #1 [ 6984.857417] Hardware name: Dell Inc. PowerEdge R730xd/072T6D, BIOS 2.2.5 09/06/2016 [ 6984.857427] Workqueue: kblockd blk_mq_run_work_fn [ 6984.857429] task: ffff880476e3da00 task.stack: ffffc90002e90000 [ 6984.857432] RIP: 0010:nvme_queue_rq+0x6e6/0x8cd [nvme] [ 6984.857433] RSP: 0018:ffffc90002e93c50 EFLAGS: 00010246 [ 6984.857434] RAX: 0000000000000000 RBX: ffff880275646600 RCX: 0000000000001000 [ 6984.857435] RDX: 0000000000000fff RSI: 00000002fba2a000 RDI: ffff8804734e6950 [ 6984.857436] RBP: ffffc90002e93d30 R08: 0000000000002000 R09: 0000000000001000 [ 6984.857437] R10: 0000000000001000 R11: 0000000000000000 R12: ffff8804741d8000 [ 6984.857438] R13: 0000000000000040 R14: ffff880475649f80 R15: ffff8804734e6780 [ 6984.857439] FS: 0000000000000000(0000) GS:ffff88047fcc0000(0000) knlGS:0000000000000000 [ 6984.857440] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 6984.857442] CR2: 0000000000000010 CR3: 0000000001c09000 CR4: 00000000001406e0 [ 6984.857443] Call Trace: [ 6984.857451] ? mempool_free+0x2b/0x80 [ 6984.857455] ? bio_free+0x4e/0x60 [ 6984.857459] blk_mq_dispatch_rq_list+0xf5/0x230 [ 6984.857462] blk_mq_process_rq_list+0x133/0x170 [ 6984.857465] __blk_mq_run_hw_queue+0x8c/0xa0 [ 6984.857467] blk_mq_run_work_fn+0x12/0x20 [ 6984.857473] process_one_work+0x165/0x410 [ 6984.857475] worker_thread+0x137/0x4c0 [ 6984.857478] kthread+0x101/0x140 [ 6984.857480] ? rescuer_thread+0x3b0/0x3b0 [ 6984.857481] ? kthread_park+0x90/0x90 [ 6984.857489] ret_from_fork+0x2c/0x40 [ 6984.857490] Code: 8b bd 70 ff ff ff 89 95 50 ff ff ff 89 8d 58 ff ff ff 44 89 95 60 ff ff ff e8 b7 dd 12 e1 8b 95 50 ff ff ff 48 89 85 68 ff ff ff <4c> 8b 48 10 44 8b 58 18 8b 8d 58 ff ff ff 44 8b 95 60 ff ff ff [ 6984.857511] RIP: nvme_queue_rq+0x6e6/0x8cd [nvme] RSP: ffffc90002e93c50 [ 6984.857512] CR2: 0000000000000010 [ 6984.895359] ---[ end trace 2d7ceb528432bf83 ]--- Cc: stable@vger.kernel.org Reported-by: Yi Zhang Tested-by: Yi Zhang Reviewed-by: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 3c354d7d7bd5e788c3d94969e4a85648d29d9d12 Author: Markus Elfring Date: Sat Jan 14 21:42:02 2017 +0100 selinux: Return directly after a failed kzalloc() in sens_read() Return directly after a call of the function "kzalloc" failed at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7f6d0ad8b771a4936f448180de3bbfad92be34dc Author: Markus Elfring Date: Sat Jan 14 21:20:43 2017 +0100 selinux: Return directly after a failed kzalloc() in cat_read() Return directly after a call of the function "kzalloc" failed at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bcdfb5e56dc539506f72e8087c993af1f7ff06eb Author: Russell King Date: Sun Mar 12 19:00:59 2017 +0000 drm/etnaviv: add etnaviv cooling device Each Vivante GPU contains a clock divider which can divide the GPU clock by 2^n, which can lower the power dissipation from the GPU. It has been suggested that the GC600 on Dove is responsible for 20-30% of the power dissipation from the SoC, so lowering the GPU clock rate provides a way to throttle the power dissiptation, and reduce the temperature when the SoC gets hot. This patch hooks the Etnaviv driver into the kernel's thermal management to allow the GPUs to be throttled when necessary, allowing a reduction in GPU clock rate from /1 to /64 in power of 2 steps. Signed-off-by: Russell King Reviewed-by: Lucas Stach Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 84 ++++++++++++++++++++++++++++------- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 2 + 2 files changed, 71 insertions(+), 15 deletions(-) commit fda8fa5b8ab2ceb02cb66ee2fe2ed83aa209bc5b Author: Daniel Vetter Date: Wed Mar 8 15:12:51 2017 +0100 drm/etnaviv: switch to postclose I didn't spot anything that would require ordering here (well not anywhere else either), and I'm trying to unify at least modern drivers on one close hook. Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Cc: etnaviv@lists.freedesktop.org Signed-off-by: Daniel Vetter Acked-by: Lucas Stach Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b27734c29c9ac50f7f843bc5372a7b4665aade87 Author: Lucas Stach Date: Wed Mar 22 12:23:43 2017 +0100 drm/etnaviv: add lockdep assert to fence allocation Make sure the GPU lock is taken, so that fence completion order matches seqno order. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 18afa288920475a9f95d70920b0c54b43b5256a7 Author: Chris Wilson Date: Wed Mar 29 10:47:46 2017 +0100 Revert "drm/i915: Skip execlists_dequeue() early if the list is empty" This reverts commit 6c943de6686f ("drm/i915: Skip execlists_dequeue() early if the list is empty"). The validity of using READ_ONCE there depends upon having a mb to coordinate the assignment of engine->execlist_first inside submit_request() and checking prior to taking the spinlock in execlists_dequeue(). We wrote "the update to TASKLET_SCHED incurs a memory barrier making this cross-cpu checking safe", but failed to notice that this mb was *conditional* on the execlists being ready, i.e. there wasn't the required mb when it was most necessary! We could install an unconditional memory barrier to fixup the READ_ONCE(): diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 7dd732cb9f57..1ed164b16d44 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -616,6 +616,7 @@ static void execlists_submit_request(struct drm_i915_gem_request *request) if (insert_request(&request->priotree, &engine->execlist_queue)) { engine->execlist_first = &request->priotree.node; + smp_wmb(); if (execlists_elsp_ready(engine)) But we have opted to remove the race as it should be rarely effective, and saves us having to explain the necessary memory barriers which we quite clearly failed at. Reported-and-tested-by: Tvrtko Ursulin Fixes: 6c943de6686f ("drm/i915: Skip execlists_dequeue() early if the list is empty") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Michał Winiarski Link: http://patchwork.freedesktop.org/patch/msgid/20170329100052.29505-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_guc_submission.c | 12 ------------ drivers/gpu/drm/i915/intel_lrc.c | 12 ------------ 2 files changed, 24 deletions(-) commit 473a4d516cfe6d0668cf7223aa3002ae8367349b Author: Jeeja KP Date: Fri Mar 24 23:10:33 2017 +0530 ASoC: Intel: Skylake: Fix module state after unbind and delete When DSP module is unbound, the module state needs to be in INIT_DONE state instead of UNINT. Also the state needs to be set to UNINIT after module is deleted from DSP pipeline. So, set the module state to INIT_DONE after unbind and then UNINIT after module is deleted. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 2 +- sound/soc/intel/skylake/skl-topology.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit fdd85a054b850db43c6abe39c1da28b581be5e93 Author: Hardik T Shah Date: Fri Mar 24 23:10:32 2017 +0530 ASoC: Intel: Skylake: Fix DMA position reporting for capture stream As per hardware recommendation, for every capture stream completion following operations need to be done in order to reflect the actual data that is received in position buffer. 1. Wait for 20us before reading the DMA position in buffer once the interrupt is generated for stream completion. 2. Read any of the register to flush the DMA position value. This is dummy read operation. Signed-off-by: Dharageswari R Signed-off-by: Hardik T Shah Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit b26199eae86f7a1c2363d049249c3be33694f93b Author: Jeeja KP Date: Fri Mar 24 23:10:31 2017 +0530 ASoC: Intel: Skylake: Rearrangement of code to cleanup SKL SST library Skylake driver topology header/driver structure is referenced and used in SST library which creates circular dependency. Hence the rearrangement. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 35 +++++++++++++++---- sound/soc/intel/skylake/skl-sst-dsp.h | 24 +++++++++---- sound/soc/intel/skylake/skl-sst-ipc.h | 8 +++++ sound/soc/intel/skylake/skl-sst-utils.c | 60 +++++---------------------------- sound/soc/intel/skylake/skl-topology.c | 11 ++++-- sound/soc/intel/skylake/skl-topology.h | 13 ------- 6 files changed, 70 insertions(+), 81 deletions(-) commit 6ad0005f179fded911e69f54f96c03e5f8cbf67a Author: Vinod Koul Date: Fri Mar 24 23:10:30 2017 +0530 ASoC: Intel: Skylake: remove hard coded ACPI path We should not hard code the ACPI path to get acpi_handle. Instead use ACPI_HANDLE macro to do the job. Signed-off-by: Vinod Koul Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-nhlt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 9a1e350709492cf512a3c4781915d567b34f8d26 Author: Vinod Koul Date: Fri Mar 24 23:10:29 2017 +0530 ASoC: Intel: Skylake: Remove redundant vmixer handler Initially vmixer and mixer widget handlers were bit different, but over time they became same so remove the duplicate code. Signed-off-by: Vinod Koul Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) commit f7ea77772dfaa404ac0bcdea5c262c24e8b860db Author: Vinod Koul Date: Fri Mar 24 23:10:28 2017 +0530 ASoC: Intel: Skylake: Don't unload module when in use A module may have multiple instances in DSP, so unload only when usage count is zero. Signed-off-by: Vinod Koul Signed-off-by: Jeeja KP Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst.c | 5 +++++ 1 file changed, 5 insertions(+) commit e59ed0875b0681ebd1e5062b739742f98f24274c Author: G Kranthi Date: Fri Mar 24 23:10:27 2017 +0530 ASoC: Intel: Skylake: Add 16-bit constraint to FE bxt_rt298 machine Add constraint to FE to restrict sample format to 16-bit for bxt_rt298 machine Signed-off-by: G Kranthi Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_rt298.c | 3 +++ 1 file changed, 3 insertions(+) commit 66d6bbc6c0beb04c1dfeb0107d4d828f3e1959ee Author: Jeeja KP Date: Fri Mar 24 23:10:26 2017 +0530 ASoC: hdac_hdmi: Update sig_bits based on converter capability When creating the codec dai, use sig_bits to update the max bps based on the codec capability. So both the link DMA and codec format will be calculated based on DAI sig_bits. So update the sig_bits with converter capability and use the sig_bits for HDA format calculation. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7f975a385b9313a03c13fb0be0a129c626f9a54e Author: Jeeja KP Date: Fri Mar 24 23:10:25 2017 +0530 ASoC: Intel: Skylake: Use the sig_bits to define dai bps capability For calculating the HDA DMA format, use the max_bps supported by the DAI caps instead of fixing it to 32/24. For host DMA the Max bps support is 32, but in case of link DMA, this depends on the codec capability. So use the sig_bits to define the bps supported by dai. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 25 ++++++++++++++++++++++--- sound/soc/intel/skylake/skl-topology.c | 2 ++ sound/soc/intel/skylake/skl-topology.h | 2 ++ 3 files changed, 26 insertions(+), 3 deletions(-) commit 240a07dbc30db6e728625e4e0eb736bbeefed6e6 Merge: 74a4ce4 ccfdf9f Author: Mark Brown Date: Wed Mar 29 12:50:26 2017 +0100 Merge branch 'topic/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel commit db22d189453cee666f8da2e67419f14f4b2fd9d1 Author: Daniel Baluta Date: Tue Mar 28 11:58:52 2017 +0300 ASoC: imx-wm8962: Fix codec_clk cleanup Resource managed devm_clk_get only works with platform's device dev. Reported-by: Nicolin Chen Signed-off-by: Daniel Baluta Signed-off-by: Mark Brown sound/soc/fsl/imx-wm8962.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fd086045559d90cd7854818b4c60a7119eda6231 Author: Matthias Kaehlcke Date: Mon Mar 27 16:54:12 2017 -0700 regulator: core: Limit propagation of parent voltage count and list Commit 26988efe11b1 ("regulator: core: Allow to get voltage count and list from parent") introduces the propagation of the parent voltage count and list for regulators that don't provide this information themselves. The goal is to support simple switch regulators, however as a side effect normal continuous regulators can leak details of their supplies and provide consumers with inconsistent information. Limit the propagation of the voltage count and list to switch regulators. Fixes: 26988efe11b1 ("regulator: core: Allow to get voltage count and list from parent") Signed-off-by: Matthias Kaehlcke Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Signed-off-by: Mark Brown drivers/regulator/core.c | 9 +++++++-- include/linux/regulator/driver.h | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) commit fd8ba1e3093e2f405df20c7f6c1150187ecdb18b Author: Daniel Baluta Date: Tue Mar 28 11:58:51 2017 +0300 ASoC: imx-wm8962: Let codec driver enable/disable its MCLK WM8962 needs its MCLK when powerup in wm8962_resume(). Thus it's better to control the MCLK in codec driver. Thus remove the clock enable in machine driver accordingly. While at it, get rid of imx_wm8962_remove function since it is now empty. Signed-off-by: Daniel Baluta Signed-off-by: Mark Brown sound/soc/fsl/imx-wm8962.c | 40 ++++++++-------------------------------- 1 file changed, 8 insertions(+), 32 deletions(-) commit b33b02707ba3eeccbf8e3687ab5c4124db6d3479 Author: Chris Wilson Date: Fri Mar 17 20:20:30 2017 +0000 drm: Peek at the current counter/timestamp for vblank queries Bypass all the spinlocks and return the last timestamp and counter from the last vblank if the driver delcares that it is accurate (and stable across on/off), and the vblank is currently enabled. This is dependent upon the both the hardware and driver to provide the proper barriers to facilitate reading our bookkeeping outside of the vblank interrupt and outside of the explicit vblank locks. Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Michel Dänzer Cc: Laurent Pinchart Cc: Dave Airlie , Cc: Mario Kleiner Link: http://patchwork.freedesktop.org/patch/msgid/20170317202030.24410-4-chris@chris-wilson.co.uk Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä drivers/gpu/drm/drm_irq.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit ccfdf9f6a47179941cb8b5f1d3df9734e54b38c4 Author: B, Jayachandran Date: Fri Mar 24 23:10:24 2017 +0530 ALSA: hda: Fix LLCH register read LLCH is a 16 bit register. Use readw instead of readl API. Signed-off-by: B, Jayachandran Signed-off-by: Jeeja KP Acked-by: Takashi Iwai Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/hda/hdac_controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0c4211854bfebd5507761a2bfddaa9e37074230 Author: Kuninori Morimoto Date: Tue Mar 28 02:31:23 2017 +0000 ASoC: rcar: remove rsnd_kctrl_remove() Current rcar driver is trying to remove kctrl when remove time. But, 1) rcar driver can't/shouldn't remove before removing sound card driver, 2) sound card driver will call snd_ctl_dev_free() and removes all kctrls by snd_ctl_remove(). Thus, rsnd_kctrl_remove() is not necessary. Current implementation will get Oops when removing rcar driver after sound card. This patch fix this issue. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 9 --------- sound/soc/sh/rcar/dvc.c | 16 ---------------- sound/soc/sh/rcar/rsnd.h | 3 --- 3 files changed, 28 deletions(-) commit 9a4d9babceeabb86669ff280e94c560193e66a72 Author: Chris Wilson Date: Wed Mar 22 10:06:50 2017 +0000 drm: Refactor vblank sequence number comparison Move the repeated (a - b) <= (1 << 23) to its own function. v2: Catch the '1<<23' inside drm_handle_vblank() as well Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Michel Dänzer Link: http://patchwork.freedesktop.org/patch/msgid/20170322100650.26082-1-chris@chris-wilson.co.uk Reviewed-by: Michel Dänzer Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä drivers/gpu/drm/drm_irq.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 6c06a59703946d2f133c067629eb911bb58ff3a6 Author: Chris Wilson Date: Fri Mar 17 20:20:28 2017 +0000 drm: vblank cannot be enabled if dev->irq_enabled is false Since we cannot enable the vblank if !dev->irq_enabled, we assert that checking for both !vblank->enabled and !dev->irq_enabled is tautological and only need the former. The only time it may differ is when racing with drm_irq_uninstall(), but that will then disable the vblank and wakeup the waiters. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170317202030.24410-2-chris@chris-wilson.co.uk Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä drivers/gpu/drm/drm_irq.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 43dc7fe2b2118c76fbc2808dec0c57b3158e6dc0 Author: Chris Wilson Date: Fri Mar 17 20:20:27 2017 +0000 drm: Mark up accesses of vblank->enabled outside of its spinlock Order the update to vblank->enabled after the timestamp is primed so that a concurrent unlocked reader will only see the vblank->enabled with the current timestamp. v2: vblank->enable is guarded by dev->vbl_lock not dev->vblank_time_lock, update the READ_ONCE accordingly. Do not add a READ_ONCE(vblank->enabled) inside the interrupt handler to avoid missing an interrupt whilst racing with enable_vblank() Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170317202030.24410-1-chris@chris-wilson.co.uk Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä drivers/gpu/drm/drm_irq.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 75cff0837c14eaf632efabb8d7ab9eec6394d20d Author: Chris Wilson Date: Fri Mar 24 17:30:58 2017 +0000 drm: Make the decision to keep vblank irq enabled earlier We want to provide the vblank irq shadow for pageflip events as well as vblank queries. Such events are completed within the vblank interrupt handler, and so the current check for disabling the irq will disable it from with the same interrupt as the last pageflip event. If we move the decision on whether to disable the irq (based on there no being no remaining vblank events, i.e. vblank->refcount == 0) to before we signal the events, we will only disable the irq on the interrupt after the last event was signaled. In the normal course of events, this will keep the vblank irq enabled for the entire flip sequence whereas before it would flip-flop around every interrupt. v2: Move the disable_fn() call outside of the vblank_event_lock. Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Michel Dänzer Cc: Laurent Pinchart Cc: Dave Airlie , Cc: Mario Kleiner Reviewed-by: Ville Syrjälä #v1 Reviewed-by: Mario Kleiner #v1 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170324173058.23051-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_irq.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit a79a524e9260d4ffaff88348615e70fb3d393692 Author: Chris Wilson Date: Mon Mar 27 21:21:43 2017 +0100 drm/i915: Avoid lock dropping between rescheduling Unlocking is dangerous. In this case we combine an early update to the out-of-queue request, because we know that it will be inserted into the correct FIFO priority-ordered slot when it becomes ready in the future. However, given sufficient enthusiasm, it may become ready as we are continuing to reschedule, and so may gazump the FIFO if we have since dropped its spinlock. The result is that it may be executed too early, before its dependencies. v2: Move all work into the second phase over the topological sort. This removes the shortcut on the out-of-rbtree request to ensure that we only adjust its priority after adjusting all of its dependencies. Fixes: 20311bd35060 ("drm/i915/scheduler: Execute requests in order of priorities") Testcase: igt/gem_exec_whisper Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: # v4.10+ Link: http://patchwork.freedesktop.org/patch/msgid/20170327202143.7972-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_lrc.c | 53 ++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 29 deletions(-) commit ed77d6bcafd75d247cf3c6ad685aa221cda1b8ba Author: Emiliano Ingrassia Date: Tue Mar 28 09:49:29 2017 +0200 spi: dynamycally allocated message initialization Invoke the proper function while initializing a dynamically allocated spi_message to avoid NULL pointer dereference during resources deallocation. Signed-off-by: Emiliano Ingrassia Signed-off-by: Mark Brown include/linux/spi/spi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 768abad46df941b6f921f358d3b17e51451b29bd Author: Ryder Lee Date: Wed Mar 29 16:59:32 2017 +0800 ASoC: mediatek: add bindings for wm8960 codec machine driver add device tree bindings for mt2701-wm8960. Signed-off-by: Ryder Lee Signed-off-by: Mark Brown .../devicetree/bindings/sound/mt2701-wm8960.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 8625c1dbd87631572f8e2c05bc67736b73d6f02f Author: Ryder Lee Date: Wed Mar 29 16:59:31 2017 +0800 ASoC: mediatek: Add mt2701-wm8960 machine driver Add wm8960 machine driver and config option for MT2701. Signed-off-by: Ryder Lee Signed-off-by: Mark Brown sound/soc/mediatek/Kconfig | 10 ++ sound/soc/mediatek/mt2701/Makefile | 1 + sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 16 +++ sound/soc/mediatek/mt2701/mt2701-wm8960.c | 176 +++++++++++++++++++++++++++++ 4 files changed, 203 insertions(+) commit fffd1133388857f5b4b8c588b41b2ade16c7891c Author: Tamara Diaconita Date: Tue Mar 28 21:30:21 2017 +0300 regulator: core: Fix kerneldoc comments Remove the description for the non-existing 'ret' to fix the build warning: ./drivers/regulator/core.c:1467: warning: Excess function parameter 'ret' description in 'regulator_dev_lookup'. The description found for the return value is: @ret: 0 on success, -ENODEV if lookup fails permanently, -EPROBE_DEFER if lookup could succeed in the future. Signed-off-by: Tamara Diaconita Signed-off-by: Mark Brown drivers/regulator/core.c | 2 -- 1 file changed, 2 deletions(-) commit f0d661534fc90da1774e8af7e7faf5043375606f Author: Michal Wajdeczko Date: Tue Mar 28 08:45:12 2017 +0000 drm/i915: Move WARN_ON/MISSING_CASE macros to i915_utils.h We can't sometimes use these macros in other headers due to include and definition order. As i915_utils.h already contains other helper macros move these macros there. v2: checkpatch cleanup for WARN() macro. Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170328084513.174200-1-michal.wajdeczko@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.h | 18 ------------------ drivers/gpu/drm/i915/i915_utils.h | 18 ++++++++++++++++++ drivers/gpu/drm/i915/intel_pm.c | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) commit e55fe3ccccc1efb8f20c99728c8863424ae9ee4a Author: Stefan Raspl Date: Fri Mar 10 13:40:16 2017 +0100 tools/kvm_stat: add '%Total' column Add column '%Total' next to 'Total' for easier comparison of numbers between hosts. Signed-off-by: Stefan Raspl Marc Hartmayer Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 9f114a03c6854f49065dd036c17e1b4bb947f842 Author: Stefan Raspl Date: Fri Mar 10 13:40:15 2017 +0100 tools/kvm_stat: add interactive command 'r' Provide an interactive command to reset the tracepoint statistics. Requires some extra work for debugfs, as the counters cannot be reset. On the up side, this offers us the opportunity to have debugfs values reset on startup and whenever a filter is modified, becoming consistent with the tracepoint provider. As a bonus, 'kvmstat -dt' will now provide useful output, instead of mixing values in totally different orders of magnitude. Furthermore, we avoid unnecessary resets when any of the filters is "changed" interactively to the previous value. Signed-off-by: Stefan Raspl Acked-by: Janosch Frank Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 65 ++++++++++++++++++++++++++++++++--------- tools/kvm/kvm_stat/kvm_stat.txt | 2 ++ 2 files changed, 53 insertions(+), 14 deletions(-) commit 4443084fa0cf85f91d357c8917b90504b784d925 Author: Stefan Raspl Date: Fri Mar 10 13:40:14 2017 +0100 tools/kvm_stat: add interactive command 'c' Provide a real simple way to erase any active filter. Signed-off-by: Stefan Raspl Reviewed-by: Marc Hartmayer Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 16 ++++++++++++---- tools/kvm/kvm_stat/kvm_stat.txt | 2 ++ 2 files changed, 14 insertions(+), 4 deletions(-) commit f9ff1087354e5e063b96a291360a8de84bea0bed Author: Stefan Raspl Date: Fri Mar 10 13:40:13 2017 +0100 tools/kvm_stat: add option '--guest' Add a new option '-g'/'--guest' to select a particular process by providing the QEMU guest name. Notes: - The logic to figure out the pid corresponding to the guest name might look scary, but works pretty reliably in practice; in the unlikely event that it returns add'l flukes, it will bail out and hint at using '-p' instead, no harm done. - Mixing '-g' and '-p' is possible, and the final instance specified on the command line is the significant one. This is consistent with current behavior for '-p' which, if specified multiple times, also regards the final instance as the significant one. Signed-off-by: Stefan Raspl Reviewed-by: Janosch Frank Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 101 +++++++++++++++++++++++++++++++++++++++- tools/kvm/kvm_stat/kvm_stat.txt | 6 +++ 2 files changed, 105 insertions(+), 2 deletions(-) commit 645c1728a9d33d78028d93a2ed770f51df0a92c6 Author: Stefan Raspl Date: Fri Mar 10 13:40:12 2017 +0100 tools/kvm_stat: remove regex filter on empty input Behavior on empty/0 input for regex and pid filtering was inconsistent, as the former would keep the current filter, while the latter would (naturally) remove any pid filtering. Make things consistent by falling back to the default filter on empty input for the regex filter dialogue. Signed-off-by: Stefan Raspl Reviewed-by: Marc Hartmayer Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 1 + 1 file changed, 1 insertion(+) commit 72187dfa8e2686b748ad7485d0ca59ba993ba526 Author: Stefan Raspl Date: Fri Mar 10 13:40:11 2017 +0100 tools/kvm_stat: display regex when set to non-default If a user defines a regex filter through the interactive command, display the active regex in the header's second line. Signed-off-by: Stefan Raspl Reviewed-by: Marc Hartmayer Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 6 ++++++ 1 file changed, 6 insertions(+) commit 0152c20f0400498774ae56067f8076cef312abc7 Author: Stefan Raspl Date: Fri Mar 10 13:40:10 2017 +0100 tools/kvm_stat: print error messages on faulty pid filter input Print helpful messages in case users enter invalid input or invalid pids in the interactive pid filter dialogue. Signed-off-by: Stefan Raspl Reviewed-by: Marc Hartmayer Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 4 ++++ 1 file changed, 4 insertions(+) commit be03ea3b77387db36617d71d60ee182a866fb9cd Author: Stefan Raspl Date: Fri Mar 10 13:40:09 2017 +0100 tools/kvm_stat: remove pid filter on empty input Improve consistency in the interactive dialogue for pid filtering by removing any filters on empty input (in addition to entering 0). Signed-off-by: Stefan Raspl Reviewed-by: Janosch Frank Reviewed-by: Marc Hartmayer Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit a24e85f6a69f09a9d09a86110a6bb168c60610ef Author: Stefan Raspl Date: Fri Mar 10 13:40:08 2017 +0100 tools/kvm_stat: display guest name when using pid filter When running kvm_stat with option '-p' to filter per process, display the QEMU guest name next to the pid, if available. Signed-off-by: Stefan Raspl Reviewed-By: Janosch Frank Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) commit 1eaa2f9022d55a8d7249c42def8dc4b0d682e142 Author: Stefan Raspl Date: Fri Mar 10 13:40:07 2017 +0100 tools/kvm_stat: document list of interactive commands Apart from the source code, there does not seem to be a place that documents the interactive capabilities of kvm_stat yet. Signed-off-by: Stefan Raspl Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 7 +++++++ tools/kvm/kvm_stat/kvm_stat.txt | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) commit 184b2d23b057b35fba7fd4049962a897ef0e3f9d Author: Stefan Raspl Date: Fri Mar 10 13:40:06 2017 +0100 tools/kvm_stat: reduce perceived idle time on filter updates Whenever a user adds a filter, we * redraw the header immediately for a snappy response * print a message indicating to the user that we're busy while the noticeable delay induced by updating all of the stats objects takes place * update the statistics ASAP (i.e. after 0.25s instead of 3s) to be consistent with behavior on startup To do so, we split the Tui's refresh() method to allow for drawing header and stats separately, and trigger a header refresh whenever we are about to do something that takes a while - like updating filters. Signed-off-by: Stefan Raspl Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 48 ++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 18 deletions(-) commit 692c7f6deb553dde2531102cd10ac17ab61438e4 Author: Stefan Raspl Date: Fri Mar 10 13:40:05 2017 +0100 tools/kvm_stat: full PEP8 compliance Provides all missing empty lines as required for full PEP compliance. Signed-off-by: Stefan Raspl Reviewed-by: Marc Hartmayer Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit a183606937489ab5ada2215aa8211374a6b26bd3 Author: Stefan Raspl Date: Fri Mar 10 13:40:04 2017 +0100 tools/kvm_stat: fix trace setup glitch on field updates in TracepointProvider Updating the fields of the TracepointProvider does not propagate changes to the tracepoints. This shows when a pid filter is enabled, whereby subsequent extensions of the fields of the Tracepoint provider (e.g. by toggling drilldown) will not modify the tracepoints as required. To reproduce, select a specific process via interactive command 'p', and enable drilldown via 'x' - none of the fields with the braces will appear although they should. The fix will always leave all available fields in the TracepointProvider enabled. Signed-off-by: Stefan Raspl Based-on-text-by: Janosch Frank Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e0ba38765c1d1d670246d6f6c518594aa8e62587 Author: Stefan Raspl Date: Fri Mar 10 13:40:03 2017 +0100 tools/kvm_stat: fix misc glitches Addresses - eliminate extra import - missing variable initialization - type redefinition from int to float - passing of int type argument instead of string - a couple of PEP8-reported indentation/formatting glitches - remove unused variable drilldown in class Tui Signed-off-by: Stefan Raspl Reviewed-by: Marc Hartmayer Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit dadf1e7839243474b691ca4258bfd2a59e628a5e Author: Stefan Raspl Date: Fri Mar 10 13:40:02 2017 +0100 tools/kvm_stat: handle SIGINT in log and batch modes SIGINT causes ugly unhandled exceptions in log and batch mode, which we prevent by catching the exceptions accordingly. Signed-off-by: Stefan Raspl Reviewed-by: Marc Hartmayer Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit 9fc0adfc427a5e3f95f8db8dafabe1eaa3720f4a Author: Stefan Raspl Date: Fri Mar 10 13:40:01 2017 +0100 tools/kvm_stat: catch curses exceptions only The previous version was catching all exceptions, including SIGINT. We only want to catch the curses exceptions here. Signed-off-by: Stefan Raspl Reviewed-by: Janosch Frank Reviewed-by: Sascha Silbe Reviewed-by: Marc Hartmayer Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0b4e6a0325e325d91901342dd436d917da0ddd6 Author: Stefan Raspl Date: Fri Mar 10 13:40:00 2017 +0100 tools/kvm_stat: hide cursor When running kvm_stat in interactive mode, the cursor appears at the lower left corner, which looks a bit distracting. This patch hides the cursor by turning it invisible. Signed-off-by: Stefan Raspl Reviewed-By: Sascha Silbe Reviewed-by: Marc Hartmayer Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 7 +++++++ 1 file changed, 7 insertions(+) commit 2f86a96be0ccb1302b7eee7855dbee5ce4dc5dfb Author: Ajay Kaher Date: Tue Mar 28 08:09:32 2017 -0400 USB: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously There is race condition when two USB class drivers try to call init_usb_class at the same time and leads to crash. code path: probe->usb_register_dev->init_usb_class To solve this, mutex locking has been added in init_usb_class() and destroy_usb_class(). As pointed by Alan, removed "if (usb_class)" test from destroy_usb_class() because usb_class can never be NULL there. Signed-off-by: Ajay Kaher Acked-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/file.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 041370cce889510163d9c1f677dc298d37bfb732 Author: Johan Hovold Date: Tue Mar 28 10:33:16 2017 +0200 USB: usbtmc: refactor endpoint retrieval Use the new endpoint helpers to lookup the required bulk-in and bulk-out endpoints, and the optional interrupt-in endpoint. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/class/usbtmc.c | 56 +++++++++++++++------------------------------- 1 file changed, 18 insertions(+), 38 deletions(-) commit 175f88a374ca905293f67219a8201cd00a27f541 Author: Johan Hovold Date: Tue Mar 28 10:33:15 2017 +0200 USB: lvstest: tighten endpoint sanity check Use the new endpoint helpers to lookup the required interrupt-in endpoint. Note that this in fact both loosens and tightens the endpoint sanity check by accepting any interface with an interrupt-in endpoint rather than always using the first endpoint without verifying its type. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/lvstest.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 8ca4f1d3fbb85d8d87ca293500a69c3dc901beb9 Author: Hanjun Guo Date: Tue Mar 7 20:40:04 2017 +0800 ACPI/IORT: Introduce iort_node_map_platform_id() to retrieve dev id To retrieve dev id for IORT named components nodes there are two steps involved (second is optional): (1) Retrieve the initial id (this may well provide the final mapping) (2) Map the id (optional if (1) represents the map type we need), this is needed for use cases such as NC (named component) -> SMMU -> ITS mappings. the iort_node_get_id() function was created for step (1) above and iort_node_map_rid() for step (2). Create a wrapper, named iort_node_map_platform_id(), that encompasses the two steps at once to retrieve the dev id to provide steps (1)-(2) functionality. iort_node_map_platform_id() will handle the parent type so type handling in iort_node_get_id() is duplicated, remove it and update current iort_node_get_id() users to move them over to iort_node_map_platform_id(). Suggested-by: Lorenzo Pieralisi Suggested-by: Tomasz Nowicki Signed-off-by: Hanjun Guo [lorenzo.pieralisi@arm.com: rewrote commit log] Signed-off-by: Lorenzo Pieralisi Tested-by: Ming Lei Tested-by: Wei Xu Tested-by: Sinan Kaya Cc: Lorenzo Pieralisi Cc: Tomasz Nowicki drivers/acpi/arm64/iort.c | 43 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) commit 697f609358685f20a798e0af2dc869b8c40bda32 Author: Hanjun Guo Date: Tue Mar 7 20:40:03 2017 +0800 ACPI/IORT: Rename iort_node_map_rid() to make it generic iort_node_map_rid() was designed to take an input id (that is not necessarily a PCI requester id) and map it to an output id (eg an SMMU streamid or an ITS deviceid) according to the mappings provided by an IORT node mapping entries. This means that the iort_node_map_rid() input id is not always a PCI requester id as its name, parameters and local variables suggest, which is misleading. Apply the s/rid/id substitution to the iort_node_map_rid() mapping function and its users to make sure its intended usage is clearer. Suggested-by: Lorenzo Pieralisi Signed-off-by: Hanjun Guo Signed-off-by: Lorenzo Pieralisi Tested-by: Ming Lei Tested-by: Wei Xu Tested-by: Sinan Kaya Cc: Lorenzo Pieralisi Cc: Tomasz Nowicki drivers/acpi/arm64/iort.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit d08a9f6cd1c8fc58fd57724f45841f77e49e1fa3 Author: Wyborny, Carolyn Date: Tue Mar 28 08:00:48 2017 -0700 i40e: fix for queue timing delays This patch adds a delay to Rx queue disables to accommodate HW needs. v2: Added missing check for disable only, additional details on the need for the ugly delay and fixed spacing on comment. Change-ID: I2864ca667ce5dcc2cc44f8718113b719742a46a1 Signed-off-by: Carolyn Wyborny Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 6 ++++++ 1 file changed, 6 insertions(+) commit dab86afdbbd1bc5d5a89b67ed141d2f46c3b4191 Author: Alexander Duyck Date: Tue Mar 14 10:15:27 2017 -0700 i40e/i40evf: Change the way we limit the maximum frame size for Rx This patch changes the way we handle the maximum frame size for the Rx path. Previously we were rounding up to 2K for a 1500 MTU and then brining the max frame size down to MTU plus a fixed amount. With this patch applied what we now do is limit the maximum frame to 1.5K minus the value for NET_IP_ALIGN for standard MTU, and for any MTU greater than 1500 we allow up to the maximum frame size. This makes the behavior more consistent with the other drivers such as igb which had similar logic. In addition it reduces the test matrix for MTU since we only have two max frame sizes that are handled for Rx now. Change-ID: I23a9d3c857e7df04b0ef28c64df63e659c013f3f Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 26 ++++++++++++---------- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 4 +--- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 4 +--- drivers/net/ethernet/intel/i40evf/i40evf.h | 4 ---- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 16 ++++++++++++- .../net/ethernet/intel/i40evf/i40evf_virtchnl.c | 14 ++++++++---- 6 files changed, 41 insertions(+), 27 deletions(-) commit c424d4a3dd798958074bde7c1dcd8dc08962d820 Author: Alexander Duyck Date: Tue Mar 14 10:15:26 2017 -0700 i40e/i40evf: Add legacy-rx private flag to allow fallback to old Rx flow This patch adds a control which will allow us to toggle into and out of the legacy Rx mode. The legacy Rx mode is what we currently do when performing Rx. As I make further changes what should happen is that the driver will fall back to the behavior for Rx as of this patch should the "legacy-rx" flag be set to on. Change-ID: I0342998849bbb31351cce05f6e182c99174e7751 Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 5 +- drivers/net/ethernet/intel/i40evf/i40evf.h | 2 + drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 104 +++++++++++++++++++++ 4 files changed, 111 insertions(+), 1 deletion(-) commit fa2343e9034ce6c8d93ace00e6e7a6974394f0df Author: Alexander Duyck Date: Tue Mar 14 10:15:25 2017 -0700 i40e/i40evf: Break i40e_fetch_rx_buffer up to allow for reuse of frag code This patch is meant to clean up the code in preparation for us adding support for build_skb. Specifically we deconstruct i40e_fetch_buffer into several functions so that those functions can later be reused when we add a path for build_skb. Specifically with this change we split out the code for adding a page to an exiting skb. Change-ID: Iab1efbab6b8b97cb60ab9fdd0be1d37a056a154d Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 138 ++++++++++++-------------- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 138 ++++++++++++-------------- 2 files changed, 130 insertions(+), 146 deletions(-) commit a0cfc3130eef5406867b38d7e6ac25d1b87e2c76 Author: Alexander Duyck Date: Tue Mar 14 10:15:24 2017 -0700 i40e/i40evf: Pull out code for cleaning up Rx buffers This patch pulls out the code responsible for handling buffer recycling and page counting and distributes it through several functions. This allows us to commonize the bits that handle either freeing or recycling the buffers. As far as the page count tracking one change to the logic is that pagecnt_bias is decremented as soon as we call i40e_get_rx_buffer. It is then the responsibility of the function that pulls the data to either increment the pagecnt_bias if the buffer can be recycled as-is, or to update page_offset so that we are pointing at the correct location for placement of the next buffer. Change-ID: Ibac576360cb7f0b1627f2a993d13c1a8a2bf60af Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 73 +++++++++++++++++---------- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 72 ++++++++++++++++---------- 2 files changed, 89 insertions(+), 56 deletions(-) commit 9a064128fc8489e9066fde872f6fdeb3d1bbb84f Author: Alexander Duyck Date: Tue Mar 14 10:15:23 2017 -0700 i40e/i40evf: Pull code for grabbing and syncing rx_buffer from fetch_buffer This patch pulls the code responsible for fetching the Rx buffer and synchronizing DMA into a function, specifically called i40e_get_rx_buffer. The general idea is to allow for better code reuse by pulling this out of i40e_fetch_rx_buffer. We dropped a couple of prefetches since the time between the prefetch being called and the data being accessed was too small to be useful. Change-ID: I4885fce4b2637dbedc8e16431169d23d3d7e79b9 Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 58 ++++++++++++++++----------- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 58 ++++++++++++++++----------- 2 files changed, 68 insertions(+), 48 deletions(-) commit d57c0e08c70162feab9ccab085fc34095d2dfd11 Author: Alexander Duyck Date: Tue Mar 14 10:15:22 2017 -0700 i40e/i40evf: Use length to determine if descriptor is done This change makes it so that we use the length of the packet instead of the DD status bit to determine if a new descriptor is ready to be processed. The obvious advantage is that it cuts down on reads as we don't really even need the DD bit if going from a 0 to a non-zero value on size is enough to inform us that the packet has been completed. Change-ID: Iebdf9cdb36c454ef092df27199b92ad09c374231 Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 24 ++++++++++++------------ drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 24 ++++++++++++------------ 2 files changed, 24 insertions(+), 24 deletions(-) commit 3a104f8df2ca87d6d116eae5f2442b57dc3baec4 Author: Jacob Keller Date: Fri Mar 10 12:22:05 2017 -0800 i40e: remove FDIR_REQUIRES_REINIT driver flag This flag hasn't been used since commit 1e1be8f622ee ("i40e: ATR policy change to flush the table to clean stale ATR rules"). Lets simplify things and just remove it. Change-ID: I76279d84db8a2fd96f445b96aa413059f9256879 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 1 - 1 file changed, 1 deletion(-) commit d9eaf12e853f8cd63633434fe9f753098012167f Author: Jacob Keller Date: Fri Mar 10 12:22:04 2017 -0800 i40e: remove a useless goto statement The goto found here for when in MFP mode is pointless. It jumps to the end of a series of if blocks. However, right after this statement is a closing '}' for this if block, which will result in the program flow going to the exact same location as the goto statement indicates. Thus, regardless of whether we are in MFP mode, the program flow will resume from the same location. This arose due to various refactoring which did not notice that this goto became essentially a no-op. To properly understand this diff you will need to view a larger context than is given by default. Change-ID: I088f73c3831aa5c4e2281380c7a3ce605594300c Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ---- 1 file changed, 4 deletions(-) commit 1fca3265be916f45bcdf4f0207bcc99d0f6c1b7d Author: Christopher N Bednarz Date: Fri Mar 10 12:22:03 2017 -0800 i40e: Check for new arq elements before leaving the adminq subtask loop Fix a case where we miss an arq element if a new one is added before we enable interrupts and exit the arq subtask loop. This occurs frequently with RDMA running on Windows VF and causes long delays that prevent SMB from establishing connections. Change-ID: I3e1c8b2b960c12857d9b8275bea2c1563674392e Signed-off-by: Christopher N Bednarz Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6030308ef8e5917da2f606abdbb893435d119b28 Author: Paul M Stillwell Jr Date: Fri Mar 10 12:22:02 2017 -0800 i40e: use register for XL722 control register read/write The XL722 doesn't support the AQ command to read/write the control register so enable it to bypass the check and use the direct read/write method. Change-ID: Iefecc737b57207485c90845af5989d5af518bf16 Signed-off-by: Paul M Stillwell Jr Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_common.c | 8 ++++++-- drivers/net/ethernet/intel/i40evf/i40e_common.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) commit aca955d831a644dc1dc22b60b30ff669567580f9 Author: Alexander Duyck Date: Fri Mar 10 12:22:01 2017 -0800 i40e: Clean up handling of private flags This patch cleans up and addresses several issues in the way that i40e handles private flags. Previously the code was choosing fixed bits and trying to match them up with strings in a somewhat haphazard way. This resulted in the possibility for adding a new bit and causing a mismatch as the private flags are linear bits starting at 0, and the private flags in the driver were split up over a group specific to the PF and a group that was global. What this change does is define an array of structs used to represent the private flags. Contained within the structs are the bits necessary to know which flags to set and/or clear depending on the state of the bit. By doing this we can add new bits in the future with minimal overhead and avoid creating possible mis-matches should we need to remove a flag based on compile options. Change-ID: Ia3214ab04f0ab2f70354ac0997a135f1d01b0acd Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 8 -- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 189 +++++++++++++++---------- 2 files changed, 112 insertions(+), 85 deletions(-) commit b1cb07db6e2b3c982ec858b06d42d24c7e267fdc Author: Preethi Banala Date: Fri Mar 10 12:22:00 2017 -0800 i40evf: enforce descriptor write-back mechanism for VF The current driver mode is to use a write-back mechanism for the head register which indicates transmit completions. The VF driver needs to be able to work on hardware that exclusively uses descriptor write-back, so change the default driver mode of operation to descriptor write-back for VF. In our analysis, performance wasn't significantly different with either write-back method. Change-ID: Ia92e4ec77c2df8dc4515c71d53746d57d77759af Signed-off-by: Preethi Banala Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 64 +++------------------- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 14 ----- .../net/ethernet/intel/i40evf/i40evf_virtchnl.c | 4 -- 3 files changed, 7 insertions(+), 75 deletions(-) commit 667a2e6bfeafa7ce202c22c702fea30ca7741c21 Author: Ben Greear Date: Thu Mar 23 16:26:16 2017 -0700 mac80211-hwsim: remove dmesg spam about get-survey. This message just fills up dmesg and/or kernel logs and does not provide any useful information. Signed-off-by: Ben Greear Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 2 -- 1 file changed, 2 deletions(-) commit ed92a9b5d4aaea4a4346db3ab520e8a631f734fd Author: Masashi Honma Date: Thu Mar 16 10:57:18 2017 +0900 mac80211: mesh: drop new node with weak power On some practical cases, it is useful to drop new node in the distance. Because mesh metric is calculated with hop count and without RSSI information, a node far from local peer and near to destination node could be used as best path. For example, the nodes are located in linear. Distance of 0 - 1 and 1 - 2 and 2 - 3 is 20meters. 0 to 3 signal is very weak. 0 --- 1 --- 2 --- 3 Though most robust path from 0 to 3 is 0 -> 1 -> 2 -> 3, unfortunately, node 0 could recognize node 3 as neighbor. Then node 3 could be next of node 0. This patch aims to avoid such a case. [Johannes:] Dropping the node entirely isn't ideal, but at least with encryption there will be a limit on # of keys the hardware can deal with, and there might also be a limit on the number of stations it supports. Signed-off-by: Masashi Honma Signed-off-by: Johannes Berg net/mac80211/mesh.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 38b6441e4e75c0b319cfe4d9364c1059fc1e3c2b Author: Daniel Vetter Date: Wed Mar 22 22:50:58 2017 +0100 drm/atomic-helper: Remove the backoff hack from set_config Another one bites the dust. Again let's not forget to remove the temporary hidden acquire_ctx assignment, now that we pass this all around explicitly it can go away again. Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-20-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic_helper.c | 21 ++------------------- drivers/gpu/drm/drm_crtc.c | 1 - 2 files changed, 2 insertions(+), 20 deletions(-) commit a4eff9aa6db8eb3d1864118f3558214b26f630b4 Author: Daniel Vetter Date: Wed Mar 22 22:50:57 2017 +0100 drm: Add acquire ctx parameter to ->set_config Surprisingly a lot of legacy drivers roll their own, for runtime pm and because vmwgfx. Also make nouveau's set_config static while at it. Cc: Sinclair Yeh Cc: Thomas Hellstrom Cc: Ben Skeggs Cc: Patrik Jakobsson Cc: Alex Deucher Cc: Christian König Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-19-daniel.vetter@ffwll.ch drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 3 ++- drivers/gpu/drm/drm_atomic_helper.c | 4 +++- drivers/gpu/drm/drm_crtc.c | 2 +- drivers/gpu/drm/drm_crtc_helper.c | 4 +++- drivers/gpu/drm/drm_plane_helper.c | 2 +- drivers/gpu/drm/gma500/gma_display.c | 7 ++++--- drivers/gpu/drm/gma500/gma_display.h | 3 ++- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 7 ++++--- drivers/gpu/drm/nouveau/nouveau_display.h | 1 - drivers/gpu/drm/radeon/radeon_display.c | 5 +++-- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 3 ++- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 3 ++- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 3 ++- include/drm/drm_atomic_helper.h | 3 ++- include/drm/drm_crtc.h | 3 ++- include/drm/drm_crtc_helper.h | 3 ++- 17 files changed, 38 insertions(+), 23 deletions(-) commit 2ceb585a956c10c7daf22938c77c48e3a62e0f6d Author: Daniel Vetter Date: Wed Mar 22 22:50:56 2017 +0100 drm: Add explicit acquire ctx handling around ->set_config Just the groundwork to have something to feed into ->set_config. Again we need a temporary hack to still fill out the legacy ctx in mode_config.acquire_ctx. Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-18-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_crtc.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit d49473a53aec5bff366c607bd2a0388554b112f5 Author: Daniel Vetter Date: Wed Mar 22 22:50:55 2017 +0100 drm: Restrict drm_mode_set_config_internal to non-atomic drivers This is another case where we really can't reconstruct a acquire ctx in any useful fashion because all the callers are legacy drivers. So like drm_plane_force_disable simply restrict it to non-atomic drivers so that it's clear we're ok with passing a NULL ctx. Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-17-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_crtc.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) commit 2c77bb29d3985e73f8c780cfd20fdb2f491943ee Author: Daniel Vetter Date: Tue Mar 28 09:01:45 2017 +0200 drm: simplify the locking in the GETCRTC ioctl No need to grab both plane and crtc locks at the same time, we can do them one after the other. If userspace races it'll get what it deserves either way. This removes another user of drm_modeset_lock_crtc. There's only one left. v2: Make sure all access to primary->state is properly protected (Harry). Cc: Harry Wentland Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170328070145.21520-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_crtc.c | 11 ++++++++--- drivers/gpu/drm/i915/intel_display.c | 5 +++++ 2 files changed, 13 insertions(+), 3 deletions(-) commit 043e7fb6e6c3a3fc6d5a3a434ad555e5ff79da3b Author: Daniel Vetter Date: Wed Mar 22 22:50:51 2017 +0100 drm/atomic-helper: remove backoff hack from page_flip Yay, we can now properly retry in case of deadlocks or whatever! Also don't forget to remove the transitional crtc->acquire_ctx assignment again. Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-13-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic_helper.c | 40 ++----------------------------------- drivers/gpu/drm/drm_plane.c | 1 - 2 files changed, 2 insertions(+), 39 deletions(-) commit 41292b1fa13a894c1108d4a1c7f8a59fbb307aa6 Author: Daniel Vetter Date: Wed Mar 22 22:50:50 2017 +0100 drm: Add acquire ctx parameter to ->page_flip(_target) Again just going through the motions, no functional changes in here. Cc: Gerd Hoffmann Cc: Ben Skeggs Cc: Russell King Cc: Laurent Pinchart Cc: Eric Anholt Cc: Alex Deucher Cc: Christian König Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter t Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-12-daniel.vetter@ffwll.ch drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 3 ++- drivers/gpu/drm/armada/armada_crtc.c | 3 ++- drivers/gpu/drm/bochs/bochs_kms.c | 3 ++- drivers/gpu/drm/drm_atomic_helper.c | 8 ++++++-- drivers/gpu/drm/drm_plane.c | 6 ++++-- drivers/gpu/drm/nouveau/nouveau_display.c | 3 ++- drivers/gpu/drm/nouveau/nouveau_display.h | 3 ++- drivers/gpu/drm/radeon/radeon_display.c | 3 ++- drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 3 ++- drivers/gpu/drm/udl/udl_modeset.c | 3 ++- drivers/gpu/drm/vc4/vc4_crtc.c | 5 +++-- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 3 ++- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 3 ++- include/drm/drm_atomic_helper.h | 6 ++++-- include/drm/drm_crtc.h | 6 ++++-- 16 files changed, 43 insertions(+), 21 deletions(-) commit 29dc0d1de18239cf3ef8bab578b8321ed340d81c Author: Daniel Vetter Date: Wed Mar 22 22:50:49 2017 +0100 drm: Roll out acquire context for the page_flip ioctl Again just prep work. Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-11-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_plane.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit a2e99e97393187a72b827b2e9880b9e4516b0893 Author: Sergiy Redko Date: Sat Mar 25 17:15:25 2017 +1100 Staging: lustre: lnet: code style fix Fixed code style error found by checkpatch by adding a space after a comma in function parameter list. Signed-off-by: Sergiy Redko Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/router.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2536f0c677b9e0c9470a8e015e05e70b8f9aaa33 Author: Suniel Mahesh Date: Thu Mar 23 17:14:58 2017 +0530 staging: rtl8192e: Fix embedded function names with __func__ Prefer and make it generic by using %s and __func__ to print functions name instead of embedding functions name in print statements Signed-off-by: Suniel Mahesh Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 8c615f3abb662dc47a2fbc9f3c373421f23802e8 Author: Derek Robson Date: Sat Mar 25 14:55:39 2017 +1300 Staging: vt6655 - block comments style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/rf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2296149f9f1cea3e9f851f17ea1e0587f463a731 Author: Pushkar Jambhlekar Date: Fri Mar 24 13:03:12 2017 +0530 drivers/staging/wilc1000: Removing explicit function tracing using dev_dbg/info ftrace can be used to trace functions. Removing function tracing using dev_dbg/info Signed-off-by: Pushkar Jambhlekar Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_sdio.c | 4 ---- 1 file changed, 4 deletions(-) commit 049b611fc845adf79c7c4d9474354c2352c5b0e9 Author: Pushkar Jambhlekar Date: Fri Mar 24 12:58:45 2017 +0530 drivers/staging/wilc1000: Using __func__ instead of hardcoded function name dev_err: replacing hardcoded function name with '%s' and __func__ Signed-off-by: Pushkar Jambhlekar Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a4b513f0afd19b36f3135161d23ee3c4cfd55475 Author: Tobin C. Harding Date: Tue Mar 28 10:28:40 2017 +1100 staging: dgnc: remove error message task TODO file lists task to remove unnecessary error messages. There are no unnecessary error messages in the driver, this must have been done already. Remove task from TODO file. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/TODO | 2 -- 1 file changed, 2 deletions(-) commit a21f95e5cffd016d81d30cbfbef0b929355b2eef Author: Tobin C. Harding Date: Tue Mar 28 10:28:39 2017 +1100 staging: dgnc: remove dead code Driver contains dead code, guarded with #ifdef's. We can safely remove this, it will be in the git history if it is later needed. Remove dead code. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_neo.c | 9 --------- 1 file changed, 9 deletions(-) commit 0053fe0eba9f5d6a992e0e4b45595a55809fc27b Author: Tobin C. Harding Date: Tue Mar 28 10:28:38 2017 +1100 staging: dgnc: remove struct member magic numbers Driver uses magic number members within structs, this is an antiquated method of catching data errors. We don't do things that way any more. Remove magic number struct members. Remove all checks to magic numbers. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_cls.c | 44 ++++++----- drivers/staging/dgnc/dgnc_driver.c | 3 +- drivers/staging/dgnc/dgnc_driver.h | 11 --- drivers/staging/dgnc/dgnc_mgmt.c | 2 +- drivers/staging/dgnc/dgnc_neo.c | 48 ++++++------ drivers/staging/dgnc/dgnc_tty.c | 150 ++++++++++++++++++------------------- 6 files changed, 119 insertions(+), 139 deletions(-) commit 510616521f1c1ce68da84bbcceab61b35abdce6f Author: Tobin C. Harding Date: Tue Mar 28 10:28:37 2017 +1100 staging: dgnc: remove unnecessary comments TODO file lists task to remove unnecessary comments. Make initial attempt at removing unnecessary comments. Choose not to be to vicious in removal. We can remove more once the driver is cleaned up/tested some more. For functions with internal linkage, reduce the function comment where possible. For functions with external linkage, migrate the function comment to kernel doc format. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_cls.c | 104 +++-------------- drivers/staging/dgnc/dgnc_driver.c | 85 ++------------ drivers/staging/dgnc/dgnc_mgmt.c | 29 ++--- drivers/staging/dgnc/dgnc_neo.c | 171 ++++------------------------ drivers/staging/dgnc/dgnc_tty.c | 221 +++++++------------------------------ drivers/staging/dgnc/dgnc_utils.c | 9 +- 6 files changed, 97 insertions(+), 522 deletions(-) commit 2539fc0c7c7b0dcb076a4bceafff4fb64091b2c2 Author: Tobin C. Harding Date: Tue Mar 28 10:28:36 2017 +1100 staging: dgnc: remove double underscore Pre-processor header guards use double underscore, typically kernel code uses single underscore when defining header guards. 'endif' statement should include what is ending as a comment string. Remove double underscore, add comment string to 'endif' Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_cls.h | 6 +++--- drivers/staging/dgnc/dgnc_driver.h | 6 +++--- drivers/staging/dgnc/dgnc_mgmt.h | 7 ++++--- drivers/staging/dgnc/dgnc_neo.h | 6 +++--- drivers/staging/dgnc/dgnc_pci.h | 6 +++--- drivers/staging/dgnc/dgnc_tty.h | 6 +++--- drivers/staging/dgnc/dgnc_utils.h | 6 +++--- drivers/staging/dgnc/digi.h | 7 ++++--- 8 files changed, 26 insertions(+), 24 deletions(-) commit e14047e4e3b54a988411a0fea207c9bb69c13711 Author: Tobin C. Harding Date: Tue Mar 28 10:28:35 2017 +1100 staging: dgnc: clean up header comments TODO file has task: remove unnecessary comments. Driver uses some custom comment format. Driver would be better if it used kernel doc format. Audit header file comments. Replace struct comments with kernel doc format comments. Remove unnecessary comments. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_cls.h | 36 ++-- drivers/staging/dgnc/dgnc_driver.h | 335 ++++++++++++++++++++++--------------- drivers/staging/dgnc/dgnc_neo.h | 79 +++++---- drivers/staging/dgnc/dgnc_pci.h | 7 +- drivers/staging/dgnc/digi.h | 127 +++++++++----- 5 files changed, 349 insertions(+), 235 deletions(-) commit c10c12558c8bb375798b7643c762dbcc93db081a Author: Tina Zhang Date: Fri Mar 17 03:08:51 2017 -0400 drm/i915/gvt: remove workload from intel_shadow_wa_ctx structure intel_shadow_wa_ctx is a field of intel_vgpu_workload. container_of() can be used to refine the relation-ship between intel_shadow_wa_ctx and intel_vgpu_workload. This patch removes the useless dereference. v2. add "drm/i915/gvt" prefix. (Zhenyu) Signed-off-by: Tina Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 25 +++++++++++++++++-------- drivers/gpu/drm/i915/gvt/execlist.c | 9 +++++---- drivers/gpu/drm/i915/gvt/scheduler.h | 1 - 3 files changed, 22 insertions(+), 13 deletions(-) commit 96cd733c3e7d6a5dc3cf6dc43e97f39963680351 Author: Xu Han Date: Wed Mar 29 10:14:00 2017 +0800 drm/i915/gvt: Turn on KBL platform support. Turn on KBL WS platform support in gvt-g. More platforms would be enabled, after validate. Signed-off-by: Xu Han Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/intel_gvt.c | 2 ++ 1 file changed, 2 insertions(+) commit e3476c0021c31b64070c40f02bfb7faab55591b4 Author: Xu Han Date: Wed Mar 29 10:13:59 2017 +0800 drm/i915/gvt: Add KBL dispatch logic in each function. Extend function dispatch logic to support KBL platform. Signed-off-by: Xu Han Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 17 +++++++++++------ drivers/gpu/drm/i915/gvt/display.c | 8 ++++---- drivers/gpu/drm/i915/gvt/gtt.c | 3 ++- drivers/gpu/drm/i915/gvt/gvt.c | 3 ++- drivers/gpu/drm/i915/gvt/handlers.c | 19 +++++++++++++------ drivers/gpu/drm/i915/gvt/interrupt.c | 5 +++-- drivers/gpu/drm/i915/gvt/render.c | 11 ++++++----- drivers/gpu/drm/i915/gvt/scheduler.c | 3 ++- 8 files changed, 43 insertions(+), 26 deletions(-) commit 6f696d13558e7c3ea6835a4215629ffc16979bf6 Author: Xu Han Date: Wed Mar 29 10:13:58 2017 +0800 drm/i915/gvt: Update save/restore list to compatible KBL platform. Add some KBL specially registers to save/restore list. Signed-off-by: Xu Han Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/render.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5cf5fe8f729b64ce4f37edc8fa01f8cab5c74389 Author: Xu Han Date: Wed Mar 29 10:13:57 2017 +0800 drm/i915/gvt: Update MMIO handle policy to compatible KBL platform. Update MMIO handle policy to KBL platform. Signed-off-by: Xu Han Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 409 +++++++++++++++++++----------------- 1 file changed, 211 insertions(+), 198 deletions(-) commit 18af19dbe1a521921b148b8f82d03e585f0bed41 Author: Xu Han Date: Wed Mar 29 10:13:56 2017 +0800 drm/i915/gvt: Add KBL platform definition. Add KBL platform definition. Signed-off-by: Xu Han Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/mmio.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 7a7a65617b84912287ec4c6ed7b85f9418c7304b Author: Zhenyu Wang Date: Thu Mar 16 18:06:39 2017 +0800 drm/i915/gvt: Add mdev device attribute group This adds initial attribute group for mdev to hold vGPU related for each mdev device, currently just vGPU id is shown. v2: rename group name as "intel_vgpu" Signed-off-by: Zhenyu Wang Reviewed-by: Kevin Tian drivers/gpu/drm/i915/gvt/kvmgt.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit e2e02cbb5beb5f7bfdfd73558794e3949868267c Author: Pei Zhang Date: Mon Mar 20 23:54:39 2017 +0800 drm/i915/gvt: make dpcd_fix_data supports DP1.2 GVT-g will emulate a fixed DPCD data to VM for DP/eDP panel. Update this data to latest DP1.2 with the maximum lane bandwidth of 5.4G/s to support 4K resolution in VM. V3: modify patch comment V2: add inline comment to describe the dpcd_fix_data. Signed-off-by: Pei Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 88a16b64c3f48d1c7c2b12f1632ba2181eb502de Author: Weinan Li Date: Fri Mar 17 09:38:57 2017 +0800 drm/i915/gvt: emulate SKL_FUSE_STATUS and LCPLL_CTL for virtual monitor detection Initialize the correct vreg for virtual monitor. Set PG0/1/2 distribution and fuse download done in SKL_FUSE_STATUS. Set PLL_ENABLE and PLL_LOCK in LCPLL_CTL. Guest may need to check these registers for display monitor detection on Skylake platforms. Signed-off-by: Weinan Li Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/display.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 7e7113f77ef244958ddf82dcedbe004f7b860a93 Author: Jagan Teki Date: Wed Mar 29 00:20:50 2017 -0700 dt-bindings: input: touchscreen: add max11801-ts binding Add missing documentation of max11801-ts dt-binding details. Signed-off-by: Jagan Teki Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../bindings/input/touchscreen/max11801-ts.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 00480324d1cc6679f001ad2b2b300b3936ac04f1 Author: Jagan Teki Date: Wed Mar 29 00:16:35 2017 -0700 Input: max11801_ts - add missing of_match_table Added missing of_match_table for max11801_ts driver with compatible as "maxim,max11801_ts" Signed-off-by: Jagan Teki Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/max11801_ts.c | 7 +++++++ 1 file changed, 7 insertions(+) commit aa0e26bb786b00eaa897e024769e299470815efe Author: David Rivshin Date: Wed Mar 29 00:14:16 2017 -0700 Input: matrix_keypad - add option to drive inactive columns The gpio-matrix-keypad driver normally sets inactive columns as inputs while scanning. This does not work for all hardware, which may require the inactive columns to be actively driven in order to overcome any pull-ups/downs on the columns. Signed-off-by: David Rivshin Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/gpio-matrix-keypad.txt | 2 ++ drivers/input/keyboard/matrix_keypad.c | 13 +++++++++---- include/linux/input/matrix_keypad.h | 3 +++ 3 files changed, 14 insertions(+), 4 deletions(-) commit 4896fb1348713344abbd9f692b393b5fdc539bf8 Author: Dmitry Torokhov Date: Fri Mar 24 16:50:28 2017 -0700 Input: melfas_mip4 - ensure that device is present Try a quick read from the device in mip4_query_device() to make sure that the device is there, as we do not consider failures to retrieve product name or resolution fatal. Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/melfas_mip4.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c276be4f38dfef1968400939aa2e33602d0a7156 Merge: 9a86cda 8bcad07 Author: Daniel Vetter Date: Wed Mar 29 09:20:33 2017 +0200 Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued Backmerge drm-next one more because Dave fumbled the conflict resolution slightly and I didn't notice it. We need Zhenyu's hotfix before he can assemble the gvt pull ... Signed-off-by: Daniel Vetter commit bd801a0729c3e20f89f3297a5bbf9413339154a7 Author: David Kershner Date: Tue Mar 28 09:35:01 2017 -0400 staging: unisys: visorbus: Have unisys_vmcall return Linux error instead of VMCALL error The function unisys_vmcall was returning VMCALL specific errors and the calling code was ignoring which error was actually returned. Instead we should be mapping the VMCALL error into a proper Linux error and then returning that, since we now have an error we know what to do with, we don't have to drop it but we can send it up the stack. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 33 ++++++++++++++++------- drivers/staging/unisys/visorbus/vmcallinterface.h | 10 +++++-- 2 files changed, 32 insertions(+), 11 deletions(-) commit 88845f407cd6d65959e0fb0c224b69b1fbce9604 Author: David Kershner Date: Tue Mar 28 09:35:00 2017 -0400 staging: unisys: visorbus: move unisys_vmcall into visorchipset The only one using unisys_vmcall was visorchipset.c, it can be moved into the visorchipset file directly instead of being in a header file. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 21 ++++++++++++++++++++- drivers/staging/unisys/visorbus/vmcallinterface.h | 19 ------------------- 2 files changed, 20 insertions(+), 20 deletions(-) commit fd1040997b2ae482c628db57c358e2b36fcf4370 Author: David Kershner Date: Tue Mar 28 09:34:59 2017 -0400 staging: unisys: visorbus: Update vmcallinterface comment The comment at the beginning of the vmcallinterface.h file references IO Virtualization. It should be more specific that it is referencing s-Par Virtualization. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/vmcallinterface.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 40b3e1ac05f09a6b6f1924739d29312e7cb5b1e5 Author: David Kershner Date: Tue Mar 28 09:34:58 2017 -0400 staging: unisys: visorbus: get rid of ISSUE_IO_VMCALL The macro ISSUE_IO_VMCALL was a wrapper around the function unisys_vmcall. It doesn't need to exist and was just being noisy, so get rid of it. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 +- drivers/staging/unisys/visorbus/vmcallinterface.h | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) commit c9808ff18674dcd482f21811456e5fa254434858 Author: David Kershner Date: Tue Mar 28 09:34:57 2017 -0400 staging: unisys: visorbus: remove useless ifdef We shouldn't be checking if VMCALL_CONTROLVM_ADDR is defined, remove it. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/vmcallinterface.h | 4 ---- 1 file changed, 4 deletions(-) commit 51646f4d4b8d5911b33340f44c641a3380dfc359 Author: David Kershner Date: Tue Mar 28 09:34:56 2017 -0400 staging: unisys: visorbus: consolidate if statements We had several if statements inside of if statements that should be consolidated into an if statement with an && to clean up the code some more. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 493d1597dd7029a1a5325748a262bb98696eb97d Author: David Kershner Date: Tue Mar 28 09:34:55 2017 -0400 staging: unisys: visorbus: get rid of braces around single statements Remove braces around single line if statements, they are not needed. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b4a8e6ae1744b775fd3656e6b83cbbdaa06fb73c Author: David Kershner Date: Tue Mar 28 09:34:54 2017 -0400 staging: unisys: visorbus: add error handling to chipset_device_pause/resume If there is an error in chipset_device_pause/resume don't try to respond, error out and let the calling functions respond to this error just like any other error they encounter. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 12 ++++++++---- drivers/staging/unisys/visorbus/visorbus_private.h | 4 ++-- drivers/staging/unisys/visorbus/visorchipset.c | 9 ++++++--- 3 files changed, 16 insertions(+), 9 deletions(-) commit 15d9ce9d3797fdb9eb90fd229cdd51d906eeaaec Author: David Kershner Date: Tue Mar 28 09:34:53 2017 -0400 staging: unisys: visorbus: add error handling to initiate_chipset_device_pause_resume Clean up the function to remove some if statments that should be done in the calling function. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 74 +++++++++++-------------- 1 file changed, 32 insertions(+), 42 deletions(-) commit 293deb2c0ca4f541b1bed06c1f5dd25cdb60a2d8 Author: David Kershner Date: Tue Mar 28 09:34:52 2017 -0400 staging: unisys: visorbus: don't unregister if we failed to register If we fail to register the visordriver, don't call unregister, just return with the error. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 711c67f4ecc81a8b1ebf26844c5874888078ed46 Author: David Kershner Date: Tue Mar 28 09:34:51 2017 -0400 staging: unisys: visorbus: don't ignore visorchannel_read error Don't override the visorchannel_read_error, just return the error that it generates. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit e0d210ae5fddfdc9a657ea5a21de9d54f8315336 Author: David Kershner Date: Tue Mar 28 09:34:50 2017 -0400 staging: unisys: visorbus: check for err from dev_set_name The function dev_set_name can return an error, don't just ignore it. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f894c88a2448144db2fd4b6b2e6d0bc741d395b9 Author: David Kershner Date: Tue Mar 28 09:34:49 2017 -0400 staging: unisys: visorbus: cleanup error handling in visorbus_uevent The add_uevent_var returns an error. Don't overwrite the error with -ENOMEM, just pass the error code back up. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 15928a55690d744663ae2a924dca7b765eda9ed5 Author: David Kershner Date: Tue Mar 28 09:34:48 2017 -0400 staging: unisys: visorbus: get rid of unused parameter forcenomatch The forcenomatch parameter was not being used, so get rid of it. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 9 --------- 1 file changed, 9 deletions(-) commit 377ab0017db5a0ae56210dd7a9037befb93dcb2b Author: David Kershner Date: Tue Mar 28 09:34:47 2017 -0400 staging: unisys: visorbus: get rid of unused parameter forcematch The forcematch parameter was not being used, so get rid of it. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 7 ------- 1 file changed, 7 deletions(-) commit 5b6f9b95f7aeddf8a77a991bf1657a84ca281ab0 Author: David Kershner Date: Tue Mar 28 09:34:46 2017 -0400 staging: unisys: visorbus: get rid of create_bus_type. Create bus_type was just calling register_bustype. Since we control how many times we call create_bus_type it was extraneous keeping a counter if the bus was already registered, so the functions were no longer needed. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 32 +++---------------------- 1 file changed, 3 insertions(+), 29 deletions(-) commit 362f87f3122d1f744bb09caa40e86fae5d9f4c60 Author: David Kershner Date: Tue Mar 28 09:34:45 2017 -0400 staging: unisys: visorbus: fix error handling in create_bus_instance The function get_vbus_header_info returns errors that were being handled incorrectly. Fix the error handling in create_bus_instance. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 39 +++++++++---------------- 1 file changed, 14 insertions(+), 25 deletions(-) commit 5dca9b294436eb381b825f60751723e80173cb4b Author: David Kershner Date: Tue Mar 28 09:34:44 2017 -0400 staging: unisys: visorbus: add error handling visorbus_enable_channel_interrupt Add error handling to visorbus_enable_channel_interrupt. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 2 +- drivers/staging/unisys/visorbus/visorbus_main.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit b90194d9bb6c006062624e7ca6424aa1474986df Author: David Kershner Date: Tue Mar 28 09:34:43 2017 -0400 staging: unisys: visorbus: add error handling for dev_start_periodic_work Report errors if we have a problem in dev_start_periodic_work. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3659955a644c1de08bce69587c5b651d8759c5b5 Author: David Kershner Date: Tue Mar 28 09:34:42 2017 -0400 staging: unisys: remove client from spar_check_channel We only have one version of spar_check_channel, get rid of the client at the end and help save space. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 12 ++++++------ drivers/staging/unisys/include/iochannel.h | 16 ++++++++-------- drivers/staging/unisys/visorbus/controlvmchannel.h | 12 ++++++------ drivers/staging/unisys/visorbus/visorbus_main.c | 13 ++++++------- 4 files changed, 26 insertions(+), 27 deletions(-) commit 3a6b850670dca3259b3c7cd3060b63bb382014cf Author: David Kershner Date: Tue Mar 28 09:34:41 2017 -0400 staging: unisys: visorbus: get rid of shouting SPAR_VBUS_CHANNEL_CLIENT_OK macro The macro SPAR_VBUS_CHANNEL_CLIENT_OK was noisy and only used in one place so get rid of it. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/vbuschannel.h | 8 -------- drivers/staging/unisys/visorbus/visorbus_main.c | 8 +++++++- 2 files changed, 7 insertions(+), 9 deletions(-) commit 738561a8039c02c68ac5f3362d4de4e821f18d45 Author: David Kershner Date: Tue Mar 28 09:34:40 2017 -0400 staging: unisys: visorbus: move vbuschannel_print_devinfo from .h to .c file Move vbuschannel_print_devinfo from vbuchannel.h to visorbus_main.c since it is only referenced in visorbus_main.c. Since it is in a .c file, get rid of the inline for it. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/vbuschannel.h | 35 ------------------------- drivers/staging/unisys/visorbus/visorbus_main.c | 34 ++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 35 deletions(-) commit 4fb2539c8c790778b49d4a7d1e3ae081f609aa9e Author: David Kershner Date: Tue Mar 28 09:34:39 2017 -0400 staging: unisys: visorbus: consolidate bus_responder and device_responder With all the code churn, bus_responder and device_responder have become identical, consolidate them to the same function. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 50 ++++++++++---------------- 1 file changed, 18 insertions(+), 32 deletions(-) commit 3f49a21deca8452cafbf4c01ee98cdb4f4966b51 Author: David Kershner Date: Tue Mar 28 09:34:38 2017 -0400 staging: unisys: visorbus: add error handling for chipset_device_create Adds error handling to the chipset_device_create message. If it returns a failure, it is assumed it has not signaled the s-Par firmware of the failure and the caller must do that. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 22 +++++++++++++--------- drivers/staging/unisys/visorbus/visorbus_private.h | 2 +- drivers/staging/unisys/visorbus/visorchipset.c | 12 +++++++++--- 3 files changed, 23 insertions(+), 13 deletions(-) commit 03156571160803875e9a9a0a966bcd2100a7ec2b Author: David Kershner Date: Tue Mar 28 09:34:37 2017 -0400 staging: unisys: visornic: add error handling for visorchannel_signalinsert/remove Since signalinsert/remove now return valid error codes, we need to check them when we call them in visornic. The error codes need to propagate out to the calling functions. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 137 +++++++++++++++++------- 1 file changed, 97 insertions(+), 40 deletions(-) commit 2833399edb5f0b0afee0a8f7a85c8bb88f8310bc Author: Sameer Wadgaonkar Date: Tue Mar 28 09:34:36 2017 -0400 staging: unisys: visorbus: add __packed to structures in controlvmchannel.h Added the __packed keyword to all structures in controlvmchannel.h to ensure alignment and size in memory. Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/controlvmchannel.h | 58 +++++++++++++--------- 1 file changed, 34 insertions(+), 24 deletions(-) commit 621f5e185200a9d68662301cfcce08b33d23f071 Author: David Kershner Date: Tue Mar 28 09:34:35 2017 -0400 staging: unisys: visorbus: add error handling to chipset_bus_create The function chipset_bus_create should return an error. If an error is returned, it is assumed the response has not been sent by bus_create. Correctly handle when the error has been returned in visorchipset. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 17 +++++++++-------- drivers/staging/unisys/visorbus/visorbus_private.h | 2 +- drivers/staging/unisys/visorbus/visorchipset.c | 8 +++++++- 3 files changed, 17 insertions(+), 10 deletions(-) commit e030d39d58df8af4517835f679a6fc1f291ccf7b Author: David Kershner Date: Tue Mar 28 09:34:34 2017 -0400 staging: unisys: visorbus: remaining_steps convert ret to err The ret variable was only returning an error, so changing it to err to be more consistent across the file. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 08a55d2d26e6d1e242461598c4f82da248dc5ed3 Author: David Kershner Date: Tue Mar 28 09:34:33 2017 -0400 staging: unisys: visorbus: textid_store convert ret to err The ret variable was only returning an error, so changing it to err to be more consistent across the file. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ea295857fcf740ef7a003b9a3f25b11c236f7f7b Author: David Kershner Date: Tue Mar 28 09:34:32 2017 -0400 staging: unisys: visorbus: error_store convert ret to err The ret variable was only returning an error, so changing it to err to be more consistent across the file. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b309266ed448a70d229825f7e0bd3a5cf97da6a4 Author: David Kershner Date: Tue Mar 28 09:34:31 2017 -0400 staging: unisys: visorbus: boottotool convert ret to err The ret variable was only returning an error, so changing it to err to be more consistent across the file. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dc35cdf318c8f97d1e9d8ee48687d77ef9356dca Author: David Kershner Date: Tue Mar 28 09:34:30 2017 -0400 staging: unisys: visorbus: convert ret to err to be consistent The ret variable was only returning an error, so changing it to err to be more consistent across the file. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d337822efb722fab6096b164b4b1a9d10954edf5 Author: David Kershner Date: Tue Mar 28 09:34:29 2017 -0400 staging: unisys: visorbus: remove invalid comment, we are one driver. Removed a comment that was describing the relationship between the visorchipset driver and the visorbus driver. Since they are now one driver the comment no longer makes sense. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 8 -------- 1 file changed, 8 deletions(-) commit b5577d79e219bf606f4783fa1820ec5185a1f307 Author: David Kershner Date: Tue Mar 28 09:34:28 2017 -0400 staging: unisys: visorbus: move bus_device_info_init to visorbus_main.c The function bus_device_info_init was defined in visorbus_private.h. The only file that uses it is visorbus_main.c so move the function into the .c file instead. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 16 ++++++++++++++++ drivers/staging/unisys/visorbus/visorbus_private.h | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) commit c53578bd6c3d57d6599e66a39d6d53a1c6165285 Author: David Kershner Date: Tue Mar 28 09:34:27 2017 -0400 staging: unisys: visorbus: add error handling to remaining_steps_show Don't just drop the error from visorchannel_read on the floor, report it. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 0d40643672ddb5833b8404397010c3d44515cad0 Author: David Kershner Date: Tue Mar 28 09:34:26 2017 -0400 staging: unisys: visorbus: add error handling textid_show Don't just drop the error from visorchannel_read on the floor, report it. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit d9857c794ee858cc6447fcd182da81b5099e5c4d Author: David Kershner Date: Tue Mar 28 09:34:25 2017 -0400 staging: unisys: visorbus: add error handling to error_show Don't just drop the error from visorchannel_read on the floor, report it. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 0b01c6ce5a69b7fffd08281422f4aff6df7f55ff Author: David Kershner Date: Tue Mar 28 09:34:24 2017 -0400 staging: unisys: visorbus: add error handling to boottotool_show Don't just drop the error from visorchannel_read on the floor, report it. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 002a5abb23176c0887b438f5b6ee799271a669df Author: David Kershner Date: Tue Mar 28 09:34:23 2017 -0400 staging: unisys: visorbus: add error handling to toolaction_show Don't just drop the error from visorchannel_read on the floor, report it. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit deeeca6db20fde52eafbc5985cfe4f4c10a7de8e Author: David Kershner Date: Tue Mar 28 09:34:22 2017 -0400 staging: unisys: visorbus: add error handling around kobject_uevent The function kobject_uevent_env can return an error, pass that error to the caller so it can be handled correctly. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit ae0fa822d7d455ba8974fb5fa1d437bfd1811a7a Author: David Kershner Date: Tue Mar 28 09:34:21 2017 -0400 staging: unisys: visorbus: add error handling for parahotplug_request_kickoff The function kobject_uevent_env returns an error we shouldn't just drop it on the floor but we should report it back to the caller. Since it now returns an error, need to add proper error handling to parahotplug_process_message. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 44 ++++++++++++++++---------- 1 file changed, 28 insertions(+), 16 deletions(-) commit fbc1023afbc7602c8b1053c8432286750ecbd5a0 Author: David Kershner Date: Tue Mar 28 09:34:20 2017 -0400 staging: unisys: visorbus: add error handling to controlvm_periodic_work The function controlvm_periodic_work should handle errors appropriately. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 67 ++++++++++++-------------- 1 file changed, 32 insertions(+), 35 deletions(-) commit 25a5128e8c58f5f52b2c8995ed77fbda191995fd Author: David Kershner Date: Tue Mar 28 09:34:19 2017 -0400 staging: unisys: visorbus: add error handling to handle_command Add error handling to the function handle_command. Since handle_command now returns errors, we need to process them correctly in process_controlvm_event. Note: It is invalid to have a controlvm test message in the event queue, so return -EINVAL if one is discovered. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 92 ++++++++++++++------------ 1 file changed, 49 insertions(+), 43 deletions(-) commit 114d5dcf20ca3da17b46a9fda4c82cc3738834ed Author: David Kershner Date: Tue Mar 28 09:34:18 2017 -0400 staging: unisys: visorbus: parahotplug_process_message add error handling Add error handling to the parahotplug_process_message function so that it returns the proper error. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d26f96c74dd027caf14713ae736b4d174535412d Author: Daniel Vetter Date: Wed Mar 22 22:50:44 2017 +0100 drm/atomic-helper: remove backoff hack from disable/update_plane We can now properly retry at the top level, yay! v2: Also remove the temporary acquire_ctx hack again, no longer needed! Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-6-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic_helper.c | 49 ++----------------------------------- drivers/gpu/drm/drm_plane.c | 2 -- 2 files changed, 2 insertions(+), 49 deletions(-) commit 1931529448bca3e0e77fb526baad20935c9cabaf Author: Daniel Vetter Date: Wed Mar 22 22:50:43 2017 +0100 drm: Add acquire ctx parameter to ->plane_disable Nouveau had a few direct calls to ->disable_plane, I replaced those with drm_plane_force_disable. Same story for shmob. Otherwise no code changes. Cc: Ben Skeggs Cc: Russell King Cc: Laurent Pinchart Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-5-daniel.vetter@ffwll.ch drivers/gpu/drm/armada/armada_overlay.c | 3 ++- drivers/gpu/drm/drm_atomic_helper.c | 4 +++- drivers/gpu/drm/drm_plane.c | 4 ++-- drivers/gpu/drm/drm_plane_helper.c | 5 +++-- drivers/gpu/drm/nouveau/dispnv04/overlay.c | 12 +++++++----- drivers/gpu/drm/shmobile/shmob_drm_plane.c | 5 +++-- include/drm/drm_atomic_helper.h | 3 ++- include/drm/drm_plane.h | 3 ++- include/drm/drm_plane_helper.h | 3 ++- 9 files changed, 26 insertions(+), 16 deletions(-) commit 5fbef3ee4a28f968e9d0ea97c6dc80388287122b Author: Daniel Vetter Date: Wed Mar 22 22:50:42 2017 +0100 drm: drm_plane_force_disable is not for atomic drivers This way I can explain why it'll be fine to pass a NULL acquire ctx here in the next patch. Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-4-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_plane.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 34a2ab5e0689e5174dd50e4a96e73c1c00539fdb Author: Daniel Vetter Date: Wed Mar 22 22:50:41 2017 +0100 drm: Add acquire ctx parameter to ->update_plane Just rolling it out, no code change here. Cc: Ben Skeggs Cc: Russell King Cc: Rob Clark Cc: Laurent Pinchart Cc: Eric Anholt Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-3-daniel.vetter@ffwll.ch drivers/gpu/drm/armada/armada_overlay.c | 3 ++- drivers/gpu/drm/drm_atomic_helper.c | 4 +++- drivers/gpu/drm/drm_plane.c | 2 +- drivers/gpu/drm/drm_plane_helper.c | 4 +++- drivers/gpu/drm/i915/intel_display.c | 5 +++-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 8 +++++--- drivers/gpu/drm/nouveau/dispnv04/overlay.c | 6 ++++-- drivers/gpu/drm/shmobile/shmob_drm_plane.c | 3 ++- drivers/gpu/drm/vc4/vc4_plane.c | 6 ++++-- include/drm/drm_atomic_helper.h | 3 ++- include/drm/drm_plane.h | 4 +++- include/drm/drm_plane_helper.h | 3 ++- 12 files changed, 34 insertions(+), 17 deletions(-) commit 232e8f703b96968cd4116d20597068f15aca3e6e Author: Daniel Vetter Date: Wed Mar 22 22:50:40 2017 +0100 drm: Wire up proper acquire ctx for plane functions This is just prep work to get an acquire ctx into every place where we call ->update_plane or ->disable_plane. v2: Keep the hidden acquire_ctx pointers valid while transitioning. Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-2-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_plane.c | 52 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 10 deletions(-) commit f6260f2e4951eb8633d8c3c7857ceb62241d4c3b Author: Arushi Singhal Date: Tue Mar 28 21:38:15 2017 +0530 staging: media: atomisp: compress return logic Simplify function returns by merging assignment and return. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 8 ++------ .../media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c | 10 ++++------ 2 files changed, 6 insertions(+), 12 deletions(-) commit 478f4f406ec346e213e42f5d051f7c4791a912f2 Author: Vaibhav Kothari Date: Wed Mar 29 09:43:21 2017 +0530 staging: media: atomisp: i2c: removed unnecessary white space before comma in memset() Removed extra space before comma in memset() as a part of checkpatch.pl fix-up. Signed-off-by: Vaibhav Kothari Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/gc2235.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69e3a9461fbfc2bf1e13818d2078011d82dfba09 Author: Chen-Yu Tsai Date: Mon Mar 27 22:38:47 2017 +0800 ARM: dts: sun5i: Add interrupt for display backend The display backend on sun5i shares the same interrupt line as the display frontend. Add it. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i.dtsi | 1 + 1 file changed, 1 insertion(+) commit 9904e70ad48ef8a615b9a42b9517df66b47483ce Author: Chen-Yu Tsai Date: Mon Mar 27 22:38:46 2017 +0800 dt-bindings: display: sun4i: Add display backend interrupt to device tree binding The display backend has an interrupt line. Add it to the device tree binding. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 2 ++ 1 file changed, 2 insertions(+) commit 976b7c8a05fdaacfea700cc99a46c87bac7c0712 Author: Derek Robson Date: Mon Mar 27 16:14:23 2017 +0100 Staging: atomisp - octal permissions, style fix Changed permissions to octal style Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c | 9 +++------ drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 8 ++++---- 2 files changed, 7 insertions(+), 10 deletions(-) commit 66695837e109310823c66c814a4ba068118ecd83 Author: Pushkar Jambhlekar Date: Mon Mar 27 16:14:15 2017 +0100 drivers/staging/media: atomisp: Removing redundant information from dev_err Removing hardcoded function name as code is already using __func__ Signed-off-by: Pushkar Jambhlekar Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e40ff1f781667a4f16c459742383002eebe6cea Author: Alan Cox Date: Mon Mar 27 16:14:07 2017 +0100 atomisp: kill another define We don't need an ifdef for the sake of 8-12 bytes. Avoid the ifdef added by fde469701c7efabebf885e785edf367bfb1a8f3f. Instead turn it into a single const string array at a fixed location thereby saving even more memory. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 1600f7ae880cd2b4a535c4fa085f7d17aab75dea Author: Alan Cox Date: Mon Mar 27 16:13:56 2017 +0100 atomisp: Remove another dead define HAS_TNR3 is never defined so we can remove it. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c | 4 ---- 1 file changed, 4 deletions(-) commit 6b00d64c64de6dd44f53fba84958e4c32990b562 Author: Alan Cox Date: Mon Mar 27 16:13:44 2017 +0100 atomisp: remove dead code HAS_SEC_ISP is never defined so we can scrub all the code that is within the defines for it. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../atomisp2/css2400/runtime/spctrl/src/spctrl.c | 5 - .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 110 +-------------------- .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 17 ---- .../atomisp/pci/atomisp2/css2400/sh_css_firmware.h | 3 - .../atomisp/pci/atomisp2/css2400/sh_css_internal.h | 7 -- .../media/atomisp/pci/atomisp2/css2400/sh_css_sp.c | 80 --------------- .../media/atomisp/pci/atomisp2/css2400/sh_css_sp.h | 14 --- 7 files changed, 1 insertion(+), 235 deletions(-) commit 53c1cf42817899f88114c28c6bbe4fe0f3c8afb6 Merge: 896d81f c02ed2e Author: Greg Kroah-Hartman Date: Wed Mar 29 08:58:53 2017 +0200 Merge 4.11-rc4 into tty-next We want the tty/serial fixes in here to handle bugfixes and merge issues. Signed-off-by: Greg Kroah-Hartman commit f9a769555db4c5c384a1d92b471461ef95923feb Author: Daniel Vetter Date: Tue Mar 28 17:53:49 2017 +0200 drm: document the all the atomic iterators Mostly because I want the links from the newly-added @state functions to work. But I think explaining when they're useful and that the implicit one is deprecated is good either way. Slightly repetitive unfortunately. Cc: Harry Wentland Cc: Maarten Lankhorst Reviewed-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170328155349.5972-3-daniel.vetter@ffwll.ch include/drm/drm_atomic.h | 159 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 158 insertions(+), 1 deletion(-) commit c9e42b72b44acc67ede9726e6434b12ba153d901 Author: Daniel Vetter Date: Tue Mar 28 17:53:48 2017 +0200 drm: Document kms locking a bit better The rules are getting real hard, better to dump my brain into text a bit. This is by far not complete, but I think I reasonable start at least. Some of the older kms structures would need a full doc review anyway ... Cc: Harry Wentland Reviewed-by: Harry Wentland Reviewed-by: Alex Deucher Cc: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170328155349.5972-2-daniel.vetter@ffwll.ch include/drm/drm_connector.h | 16 ++++- include/drm/drm_crtc.h | 14 ++++- include/drm/drm_mode_config.h | 140 +++++++++++++++++++++++++++++++++--------- include/drm/drm_plane.h | 16 ++++- 4 files changed, 152 insertions(+), 34 deletions(-) commit 75b94cd96f311a8459720d01da698b6bc2ab88f4 Author: Daniel Vetter Date: Tue Mar 28 17:53:47 2017 +0200 drm/doc: remove standard connector props from the csv file They're properly documented in drm_connector.c now, and this csv file is a horrible mess. Better to remove it. Reviewed-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170328155349.5972-1-daniel.vetter@ffwll.ch Documentation/gpu/kms-properties.csv | 5 ----- 1 file changed, 5 deletions(-) commit 896d81fefe5d1919537db2c2150ab6384e4a6610 Author: Greg Kroah-Hartman Date: Wed Mar 29 07:50:49 2017 +0200 Revert "tty: Fix ldisc crash on reopened tty" This reverts commit 71472fa9c52b1da27663c275d416d8654b905f05. It caused merge issues, and Dmitry found some review issues. Reported-by: Dmitry Vyukov Reported-by: Stephen Rothwell Cc: Mikulas Patocka Cc: Peter Hurley Cc: Michael Neuling Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_ldisc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 2cebaecb047eeed51f4a7ee8b9556a49e4980ae2 Merge: 0e42c72 96567d5 Author: David S. Miller Date: Tue Mar 28 22:46:05 2017 -0700 Merge branch 'dsa-devlink' Andrew Lunn says: ==================== break include loop and dsa devlink support These two patches add very basic support for devlink to DSA, in preparation for playing with dpipe. The first patch is needed to break an include loop between netdevice.h, dsa.h and devlink.h. We need to remove dsa.h from netdevice.h. As a result, some files fail to compile, because they require includes pulled in via dsa.h. So this patch adds a number of includes in various places. The majority is within the network subsystem, but cifs also needs a few fixes. 0-day has been chewing on this for over a day now, and not found any breakage. But Arnd's randconfig might uncover something. ==================== Signed-off-by: David S. Miller commit 96567d5dacf47fd628bc3115c8a7d81866674cd3 Author: Andrew Lunn Date: Tue Mar 28 23:45:07 2017 +0200 net: dsa: dsa2: Add basic support of devlink Register the switch and its ports with devlink. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Tested-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 5 +++++ net/dsa/dsa2.c | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 50 insertions(+), 2 deletions(-) commit c6e970a04bdceb7ef1fdbac6be3bd4cd0a0a02bd Author: Andrew Lunn Date: Tue Mar 28 23:45:06 2017 +0200 net: break include loop netdevice.h, dsa.h, devlink.h There is an include loop between netdevice.h, dsa.h, devlink.h because of NETDEV_ALIGN, making it impossible to use devlink structures in dsa.h. Break this loop by taking dsa.h out of netdevice.h, add a forward declaration of dsa_switch_tree and netdev_set_default_ethtool_ops() function, which is what netdevice.h requires. No longer having dsa.h in netdevice.h means the includes in dsa.h no longer get included. This breaks a few other files which depend on these includes. Add these directly in the affected file. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2_cfp.c | 3 ++- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + drivers/net/ethernet/broadcom/bcmsysport.c | 1 + drivers/net/ethernet/freescale/fman/fman_memac.h | 1 + drivers/net/ethernet/hisilicon/hns/hnae.c | 2 +- drivers/net/ieee802154/mrf24j40.c | 1 + drivers/net/phy/smsc.c | 1 + drivers/net/usb/lan78xx.c | 1 + fs/cifs/cifsfs.c | 1 + fs/cifs/connect.c | 1 + fs/cifs/smb2pdu.c | 1 + include/linux/netdevice.h | 12 ++---------- include/net/dsa.h | 9 +++++++++ net/bridge/br_if.c | 1 + net/core/netprio_cgroup.c | 1 + net/dsa/dsa.c | 3 ++- net/dsa/dsa2.c | 3 ++- net/dsa/slave.c | 1 + net/dsa/tag_brcm.c | 1 + net/dsa/tag_dsa.c | 1 + net/dsa/tag_edsa.c | 1 + net/dsa/tag_qca.c | 1 + net/dsa/tag_trailer.c | 1 + net/ipv4/ipconfig.c | 1 + 24 files changed, 36 insertions(+), 14 deletions(-) commit 73874913d5044fb5d81d34b2c760a8df8521bd0f Author: Anup Patel Date: Wed Mar 29 11:00:55 2017 +0530 mailbox: Remove depends on COMPILE_TEST for BCM_FLEXRM_MBOX The Broadcom FlexRM mailbox driver uses platform MSI support but not all ARCHs provide asm/msi.h. Due to this, we get compilation error in Broadcom FlexRM mailbox driver via linux/msi.h on ARCHs which lack asm/msi.h. This patch removes "depends on COMPILE_TEST" for Kconfig option BCM_FLEXRM_MBOX so that Broadcom FlexRM mailbox driver is only compiled for ARM64. Signed-off-by: Anup Patel Signed-off-by: Jassi Brar drivers/mailbox/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e42c72195cc1a6f7461bfc48b32dce29e1677f7 Merge: 50c0add 1182e4d Author: David S. Miller Date: Tue Mar 28 22:32:43 2017 -0700 Merge branch 'netconf-delnetconf' David Ahern says: ==================== netconf: Add support for RTM_DELNETCONF netconf notifications are sent as devices register but not when they are deleted leaving userspace caches out of sync. Add support for RTM_DELNETCONF to ipv4, ipv6 and mpls. MPLS is missing RTM_NEWNETCONF as devices are created, so add it as well. ==================== Signed-off-by: David S. Miller commit 1182e4d0b4f8735184aecb27e4c0abd35054237c Author: David Ahern Date: Tue Mar 28 14:28:07 2017 -0700 net: mpls: Send netconf messages on device register and unregister Send netconf notifications for MPLS when the device registers and unregisters. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/mpls/af_mpls.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 823566aee085ca72bab65e9d9f7deb42faf80746 Author: David Ahern Date: Tue Mar 28 14:28:06 2017 -0700 net:mpls: Refactor mpls_netconf_notify_devconf to take event Refactor mpls_netconf_notify_devconf to take the event as an input arg. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/mpls/af_mpls.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 2345217026a093cdfd0f3e193ec9f2c82f22e1c2 Author: David Ahern Date: Tue Mar 28 14:28:05 2017 -0700 net: ipv6: Add support for RTM_DELNETCONF Send RTM_DELNETCONF notifications when a device is deleted. The message only needs the device index, so modify inet6_netconf_fill_devconf to skip devconf references if it is NULL. Allows a userspace cache to remove entries as devices are deleted. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/addrconf.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 85b3daada4cab8cc36888f5d025058bbc8737497 Author: David Ahern Date: Tue Mar 28 14:28:04 2017 -0700 net: ipv6: Refactor inet6_netconf_notify_devconf to take event Refactor inet6_netconf_notify_devconf to take the event as an input arg. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/addrconf.h | 4 ++-- net/ipv6/addrconf.c | 33 ++++++++++++++++++++++----------- net/ipv6/ip6mr.c | 9 +++++---- 3 files changed, 29 insertions(+), 17 deletions(-) commit b5c9641d3d45e58dbcb35090345f863e5ade718d Author: David Ahern Date: Tue Mar 28 14:28:03 2017 -0700 net: devinet: Add support for RTM_DELNETCONF Send RTM_DELNETCONF notifications when a device is deleted. The message only needs the device index, so modify inet_netconf_fill_devconf to skip devconf references if it is NULL. Allows a userspace cache to remove entries as devices are deleted. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/devinet.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) commit 3b0228656dcb07a1c9fc81e8516475c2d7c4300e Author: David Ahern Date: Tue Mar 28 14:28:02 2017 -0700 net: devinet: Refactor inet_netconf_notify_devconf to take event Refactor inet_netconf_notify_devconf to take the event as an input arg. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/linux/inetdevice.h | 4 ++-- net/ipv4/devinet.c | 32 ++++++++++++++++++++------------ net/ipv4/ipmr.c | 12 +++++++----- 3 files changed, 29 insertions(+), 19 deletions(-) commit 983701eb0676db96c604db8a3f7ae936a7029ff5 Author: David Ahern Date: Tue Mar 28 14:28:01 2017 -0700 rtnetlink: Add RTM_DELNETCONF Signed-off-by: David Ahern Signed-off-by: David S. Miller include/uapi/linux/rtnetlink.h | 2 ++ security/selinux/nlmsgtab.c | 1 + 2 files changed, 3 insertions(+) commit 50c0add534d2f56547201c9f566ad4b4f40c3049 Author: Prasad Kanneganti Date: Tue Mar 28 12:14:06 2017 -0700 liquidio: refactor interrupt moderation code Refactor interrupt moderation code for flexibility because parameters are different for 10G and 25G cards. Currently parameters (for 10G only) come from macros compiled-in to the PF and VF drivers; fix it so that parameters suitable for the card (10G or 25G) come from the NIC firmware via response to a command. Also bump up driver version to 1.5.1 to match newer NIC firmware version. Signed-off-by: Prasad Kanneganti Signed-off-by: Felix Manlunas Signed-off-by: Derek Chickles Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 447 +++++++++++++-------- drivers/net/ethernet/cavium/liquidio/lio_main.c | 17 - drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 17 - .../net/ethernet/cavium/liquidio/liquidio_common.h | 26 +- .../net/ethernet/cavium/liquidio/octeon_device.h | 13 +- 5 files changed, 276 insertions(+), 244 deletions(-) commit 4333d619f9e30592426bc1315243fa0754e62c39 Author: Vivien Didelot Date: Tue Mar 28 15:10:36 2017 -0400 net: dsa: fix copyright holder I do not hold the copyright of the DSA core and drivers source files, since these changes have been written as an initiative of my day job. Fix this. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Acked-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 3 +++ drivers/net/dsa/mv88e6xxx/global1.c | 3 ++- drivers/net/dsa/mv88e6xxx/global1.h | 3 ++- drivers/net/dsa/mv88e6xxx/global2.c | 3 ++- drivers/net/dsa/mv88e6xxx/global2.h | 3 ++- drivers/net/dsa/mv88e6xxx/port.c | 3 ++- drivers/net/dsa/mv88e6xxx/port.h | 3 ++- net/dsa/switch.c | 3 ++- 8 files changed, 17 insertions(+), 7 deletions(-) commit 64014fe67b0aafa129d80266fce58b60783d5c91 Author: Vivien Didelot Date: Tue Mar 28 15:09:43 2017 -0400 net: dsa: mv88e6xxx: unconditionally set ATU trunk Set the trunk member of the mv88e6xxx_atu_entry structure regardless its value, so that uninitialized structures gets the correct boolean value. Note that no mainline code is affected by the current behavior. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global1_atu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 382ed72480e122421d759eb986690f04041d34bc Author: Vlad Yasevich Date: Tue Mar 28 14:49:16 2017 -0400 ipv6: add support for NETDEV_RESEND_IGMP event This patch adds support for NETDEV_RESEND_IGMP event similar to how it works for IPv4. Signed-off-by: Vladislav Yasevich Signed-off-by: David S. Miller include/net/ndisc.h | 2 ++ net/ipv6/af_inet6.c | 8 +++++++- net/ipv6/mcast.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 57 insertions(+), 2 deletions(-) commit 25501837d8795701cd3cdbae22d15ef25300ddc0 Merge: c552a50 6370957 Author: David S. Miller Date: Tue Mar 28 21:52:53 2017 -0700 Merge branch 'dsa-mv88e6xxx-fix-chip-definitions' Vivien Didelot says: ==================== net: dsa: fix chip definitions The definitions of some of the mv88e6xxx_ops and mv88e6xxx_info structures are misordered and erroneous for 88E6191 and 88E6391. This patch series cleans that up. ==================== Signed-off-by: David S. Miller commit 63709570cda3db1172695efeb049d43b7f756452 Author: Vivien Didelot Date: Tue Mar 28 13:50:35 2017 -0400 net: dsa: mv88e6xxx: remove 88E6391 ops We don't support 88E6391 anywhere in the code, so remove the unused mv88e6391_ops structure. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 30 ------------------------------ 1 file changed, 30 deletions(-) commit 2cf4cefb69cba2dce4968c4517bf00957dd7fda8 Author: Vivien Didelot Date: Tue Mar 28 13:50:34 2017 -0400 net: dsa: mv88e6xxx: fix 88E6191 ops The mv88e6xxx_info structure for the 88E6191 chip was pointing the mv88e6391_ops definition instead of mv88e6191_ops. Fix this. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16e329aea90e4e404edce2828d701b1a3498487e Author: Vivien Didelot Date: Tue Mar 28 13:50:33 2017 -0400 net: dsa: mv88e6xxx: reorder 88E6341 definitions The related mv88e6xxx_ops structure was misplaced. Reorder it correctly to fix this. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 62 ++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit 990e27b033f7199af0e02d63aa61293f380c4e61 Author: Vivien Didelot Date: Tue Mar 28 13:50:32 2017 -0400 net: dsa: mv88e6xxx: reorder 88E6141 definitions The related mv88e6xxx_ops and mv88e6xxx_info structure were misplaced. Reorder them correctly to fix this. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 92 ++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 46 deletions(-) commit 7a5d73479fe46532783dcf97e751e15bab385576 Author: Harninder Rai Date: Tue Mar 28 22:03:08 2017 +0530 arm64: dts: Add support for FSL's LS1088A SoC LS1088A contains eight ARM v8 CortexA53 processor cores with 32 KB L1-D cache and 32 KB L1-I cache Features summary Eight 32-bit / 64-bit ARM v8 Cortex-A53 CPUs - Arranged as two clusters of four cores sharing a 1 MB L2 cache - Speed Up to 1.5 GHz - Support for cluster power-gating. Cache coherent interconnect (CCI-400) - Hardware-managed data coherency - Up to 700 MHz One 64-bit DDR4 SDRAM memory controller with ECC Data path acceleration architecture 2.0 (DPAA2) Three PCIe 3.0 controllers One serial ATA (SATA 3.0) controller Three high-speed USB 3.0 controllers with integrated PHY Following levels of DTSI/DTS files have been created for the LS1088A SoC family: - fsl-ls1088a.dtsi: DTS-Include file for NXP LS1088A SoC. - fsl-ls1088a-qds.dts: DTS file for NXP LS1088A QDS board. - fsl-ls1088a-rdb.dts: DTS file for NXP LS1088A RDB board Signed-off-by: Harninder Rai Signed-off-by: Ashish Kumar Signed-off-by: Raghav Dogra ` Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/Makefile | 2 + arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts | 123 ++++++++++ arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts | 107 +++++++++ arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 275 ++++++++++++++++++++++ 4 files changed, 507 insertions(+) commit 839cc2954cbdb82511d2ecfa07ba06bab4198519 Author: Al Viro Date: Tue Mar 21 08:19:02 2017 -0400 arc: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/arc/Kconfig | 1 + arch/arc/include/asm/uaccess.h | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) commit 8bcad07a45637fb88e799466e4eee83859e8ffd3 Author: Zhenyu Wang Date: Wed Mar 29 11:07:53 2017 +0800 drm/i915/gvt: fix error return check for copy_gma_to_hva() From commit 73dec95e6ba3 ("drm/i915: Emit to ringbuffer directly"), copy_gma_to_hva() now returns copied data length instead of 0, so need to change error return check for that. Note: Looks this is caused by backmerge conflict resolving, so 4.11-rc4 is not impacted as commit 73dec95e6ba3 ("drm/i915: Emit to ringbuffer directly") is not in 4.11. But need to fix this before I can apply 4.12 stuff against drm-intel-next correctly. Fixes: e5c1ff14757a ("Backmerge tag 'v4.11-rc4' into drm-next") Cc: Dave Airlie Cc: Tina Zhang Signed-off-by: Zhenyu Wang Signed-off-by: Dave Airlie drivers/gpu/drm/i915/gvt/cmd_parser.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 85b85c56950790f45b10a5a3f436575537ab2c94 Author: Horia Geantă Date: Tue Mar 28 14:46:19 2017 +0300 arm64: dts: ls1012a: add crypto node LS1012A has a SEC v5.4 security engine. Signed-off-by: Horia Geantă Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 100 ++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 1 deletion(-) commit c552a50e5cda4e5942ce77d9f27b08d37d81b0e6 Merge: 30b3823 d0d40a7 Author: David S. Miller Date: Tue Mar 28 18:05:24 2017 -0700 Merge branch 'qed-load-unload-mfw' Yuval Mintz says: ==================== qed: load/unload mfw series This series correct the unload flow and greatly enhances its initialization flow in regard to interactions between driver and management firmware. Patch #1 makes sure unloading is done under management-firmware's 'criticial section' protection. Patches #2 - #4 move driver into using a newer scheme for loading in regard to the MFW; This newer scheme would help cleaning the device in case a previous instance has dirtied it [preboot, PDA, etc.]. Patches #5 - #6 let driver inform management-firmware on number of resources which are dependent on the non-management firmware used. Patch #7 then uses a new resource [BDQ] instead of some set value. ==================== Signed-off-by: David S. Miller commit d0d40a73f1e6061d892eca9a6cf1c85a9e4fd1eb Author: Mintz, Yuval Date: Tue Mar 28 15:12:56 2017 +0300 qed: Use BDQ resource for storage protocols Until now, qed used some port-defined value as BDQ index for both iSCSI and FCoE. As management firmware now treats BDQ as a resource and tells each PF its BDQ-range, start using a valure from that range instead. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 2 -- drivers/net/ethernet/qlogic/qed/qed_fcoe.c | 30 +++++++++++++++++++-------- drivers/net/ethernet/qlogic/qed/qed_iscsi.c | 32 +++++++++++++++++++---------- 3 files changed, 42 insertions(+), 22 deletions(-) commit 9c8517c40f6873d5fcdfa0eafdf28c5a921d600b Author: Tomer Tayar Date: Tue Mar 28 15:12:55 2017 +0300 qed: Utilize resource-lock based scheme Management firmware is used as an arbiter between the various PFs in matters of resources, but some of the resources that need to be divided are dependent on the non-management firmware used, so management firmware first needs to be told how many resources there are before trying to divide them. As part of the initialization sequence, driver would first inform the management firmware of the available resources under a dedicated resource lock, and afterwards request for various resources which might be based on the previous set values. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 1 + drivers/net/ethernet/qlogic/qed/qed_dev.c | 368 ++++++++++++++++---------- drivers/net/ethernet/qlogic/qed/qed_dev_api.h | 2 + drivers/net/ethernet/qlogic/qed/qed_hsi.h | 8 +- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 206 ++++++++++++-- drivers/net/ethernet/qlogic/qed/qed_mcp.h | 49 +++- 6 files changed, 468 insertions(+), 166 deletions(-) commit 95691c9cea3b14778bf699dcc1563cdc0c441105 Author: Tomer Tayar Date: Tue Mar 28 15:12:54 2017 +0300 qed: Support management-based resource locking Global locking can't properly be used to synchronize between different PFs in all scenarios, as those instances might reside in different logical partitions [e.g., when a PF is assigned via PDA to some VM]. The management firmware provides a generic infrastructure for device locks. For each 'resource', it's guaranteed it could be acquired by at most a single PF at any given time [or by management firmware]. This patch adds the necessary logic in qed for utilizing said infrastructure, implementing lock/unlock internal APIs. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_hsi.h | 28 +++++ drivers/net/ethernet/qlogic/qed/qed_mcp.c | 176 ++++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_mcp.h | 65 +++++++++++ 3 files changed, 269 insertions(+) commit 18a69e368b22817575d2052b2c8dd8427bb4f827 Author: Mintz, Yuval Date: Tue Mar 28 15:12:53 2017 +0300 qed: Send pf-flr as part of initialization During HW initialization, driver would set various registers to their needed values - but it assumes all registers start at their reset-value, so there's no need to re-configure a register's default value. This assumption might be incorrect, e.g., in case of preboot driver running and initializing the driver prior to our driver. To overcome this, we now ask management firmware to initiate a PF-flr early during the initialization sequence. That would return everything in the PF's scope back to default and prevent previous configurations from still being applied. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 9 +++++++++ drivers/net/ethernet/qlogic/qed/qed_hsi.h | 1 + drivers/net/ethernet/qlogic/qed/qed_mcp.c | 8 ++++++++ drivers/net/ethernet/qlogic/qed/qed_mcp.h | 10 ++++++++++ 4 files changed, 28 insertions(+) commit 5d24bcf1895cb5095ffb9e06a219a858abaa15da Author: Tomer Tayar Date: Tue Mar 28 15:12:52 2017 +0300 qed: Move to new load request scheme Management firmware is used as an arbiter between the various PFs in regard to loading - it causes the various PFs to load/unload sequentially and informs each of its appropriate rule in the init. But the existing flow is too weak to handle some scenarios where PFs aren't properly cleaned prior to loading. The significant scenarios falling under this criteria: a. Preboot drivers in some environment can't properly unload. b. Unexpected driver replacement [kdump, PDA]. Modern management firmware supports a more intricate loading flow, where the driver has the ability to overcome previous limitations. This moves qed into using this newer scheme. Notice new scheme is backward compatible, so new drivers would still be able to load properly on top of older management firmwares and vice versa. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 29 ++- drivers/net/ethernet/qlogic/qed/qed_dcbx.h | 3 - drivers/net/ethernet/qlogic/qed/qed_dev.c | 35 ++- drivers/net/ethernet/qlogic/qed/qed_dev_api.h | 32 +++ drivers/net/ethernet/qlogic/qed/qed_hsi.h | 50 +++- drivers/net/ethernet/qlogic/qed/qed_main.c | 9 + drivers/net/ethernet/qlogic/qed/qed_mcp.c | 356 ++++++++++++++++++++++++-- drivers/net/ethernet/qlogic/qed/qed_mcp.h | 41 +-- 8 files changed, 497 insertions(+), 58 deletions(-) commit c0c2d0b49edc3a11627ea63d3f1e4a2d91397792 Author: Mintz, Yuval Date: Tue Mar 28 15:12:51 2017 +0300 qed: hw_init() to receive parameter-struct We'll soon need additional information, so start by changing the infrastructure to receive the initializing variables via a parameter struct. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 21 +++++++++--------- drivers/net/ethernet/qlogic/qed/qed_dev_api.h | 31 ++++++++++++++++----------- drivers/net/ethernet/qlogic/qed/qed_main.c | 12 ++++++++--- 3 files changed, 37 insertions(+), 27 deletions(-) commit 1226337ad98ffc7982244a67a47faab1eacaca33 Author: Tomer Tayar Date: Tue Mar 28 15:12:50 2017 +0300 qed: Correct HW stop flow Management firmware is used as arbiter between different PFs which are loading/unloading, but in order to use the synchronization it offers the contending configurations need to be applied either between their LOAD_REQ <-> LOAD_DONE or UNLOAD_REQ <-> UNLOAD_DONE management firmware commands. Existing HW stop flow utilizes 2 different functions: qed_hw_stop() and qed_hw_reset() which don't abide this requirement; Most of the closure is doing outside the scope of the unload request. This patch removes qed_hw_reset() and places the relevant stop functionality underneath the management firmware protection. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 1 + drivers/net/ethernet/qlogic/qed/qed_dev.c | 146 ++++++++++---------------- drivers/net/ethernet/qlogic/qed/qed_dev_api.h | 8 -- drivers/net/ethernet/qlogic/qed/qed_main.c | 29 ++--- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 73 +++++++++---- drivers/net/ethernet/qlogic/qed/qed_mcp.h | 20 ++++ 6 files changed, 142 insertions(+), 135 deletions(-) commit 30b38236e1313e216a869d38cef867d327a0009b Merge: 589a1a2 7efea60 Author: David S. Miller Date: Tue Mar 28 18:03:33 2017 -0700 Merge branch 'tipc-subscription-refcount-simplifications' Parthasarathy Bhuvaragan says: ==================== tipc: subscription refcount simplifications The first patch makes the subscription refcount cleanup lockless and the second updates the subscription refcount policy. ==================== Signed-off-by: David S. Miller commit 7efea60dcffc151870d1abbfccdb1f11cd4b7f21 Author: Ying Xue Date: Tue Mar 28 12:28:28 2017 +0200 tipc: adjust the policy of holding subscription kref When a new subscription object is inserted into name_seq->subscriptions list, it's under name_seq->lock protection; when a subscription is deleted from the list, it's also under the same lock protection; similarly, when accessing a subscription by going through subscriptions list, the entire process is also protected by the name_seq->lock. Therefore, if subscription refcount is increased before it's inserted into subscriptions list, and its refcount is decreased after it's deleted from the list, it will be unnecessary to hold refcount at all before accessing subscription object which is obtained by going through subscriptions list under name_seq->lock protection. Signed-off-by: Ying Xue Reviewed-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/name_table.c | 2 ++ net/tipc/subscr.c | 8 ++------ net/tipc/subscr.h | 3 +++ 3 files changed, 7 insertions(+), 6 deletions(-) commit 139bb36f754adbf6d3c836db09d6459e25167b38 Author: Ying Xue Date: Tue Mar 28 12:28:27 2017 +0200 tipc: advance the time of deleting subscription from subscriber->subscrp_list After a subscription object is created, it's inserted into its subscriber subscrp_list list under subscriber lock protection, similarly, before it's destroyed, it should be first removed from its subscriber->subscrp_list. Since the subscription list is accessed with subscriber lock, all the subscriptions are valid during the lock duration. Hence in tipc_subscrb_subscrp_delete(), we remove subscription get/put and the extra subscriber unlock/lock. After this change, the subscriptions refcount cleanup is very simple and does not access any lock. Acked-by: Jon Maloy Signed-off-by: Ying Xue Signed-off-by: Parthasarathy Bhuvaragan Signed-off-by: David S. Miller net/tipc/subscr.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 589a1a2e63163bdd59f983d6cd89cec5f9457823 Author: Arnd Bergmann Date: Tue Mar 28 11:48:21 2017 +0200 stmmac: use netif_set_real_num_{rx,tx}_queues A driver must not access the two fields directly but should instead use the helper functions to set the values and keep a consistent internal state: ethernet/stmicro/stmmac/stmmac_main.c: In function 'stmmac_dvr_probe': ethernet/stmicro/stmmac/stmmac_main.c:4083:8: error: 'struct net_device' has no member named 'real_num_rx_queues'; did you mean 'real_num_tx_queues'? Fixes: a8f5102af2a7 ("net: stmmac: TX and RX queue priority configuration") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2b624250452537b65d056a6566baf2bc02322859 Author: Bjorn Andersson Date: Mon Mar 27 22:26:35 2017 -0700 soc: qcom: smd-rpm: Add msm8996 compatibility With the RPM driver transitioned to RPMSG we can reuse the SMD-RPM driver ontop of GLINK for 8996, without any modifications. Acked-by: Andy Gross Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller drivers/soc/qcom/smd-rpm.c | 1 + 1 file changed, 1 insertion(+) commit 395a48053af6c5e0f0217b610dcb7225ea3e3e42 Author: Bjorn Andersson Date: Mon Mar 27 22:26:34 2017 -0700 soc: qcom: smd: Remove standalone driver Remove the standalone SMD implementation as we have transitioned the client drivers to use the RPMSG based one. Also remove all dependencies on QCOM_SMD from Kconfig files, in order to keep them selectable in the absence of the removed symbol. Acked-by: Andy Gross Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller drivers/remoteproc/Kconfig | 6 +- drivers/rpmsg/Kconfig | 1 - drivers/soc/qcom/Kconfig | 8 - drivers/soc/qcom/Makefile | 1 - drivers/soc/qcom/smd.c | 1560 ---------------------------------------- include/linux/rpmsg/qcom_smd.h | 2 +- include/linux/soc/qcom/smd.h | 139 ---- 7 files changed, 4 insertions(+), 1713 deletions(-) commit 5052de8deff5619a9b7071f00084fd0264b58e17 Author: Bjorn Andersson Date: Mon Mar 27 22:26:33 2017 -0700 soc: qcom: smd: Transition client drivers from smd to rpmsg By moving these client drivers to use RPMSG instead of the direct SMD API we can reuse them ontop of the newly added GLINK wire-protocol support found in the 820 and 835 Qualcomm platforms. As the new (RPMSG-based) and old SMD implementations are mutually exclusive we have to change all client drivers in one commit, to make sure we have a working system before and after this transition. Acked-by: Andy Gross Acked-by: Kalle Valo Acked-by: Marcel Holtmann Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller drivers/bluetooth/Kconfig | 2 +- drivers/bluetooth/btqcomsmd.c | 32 +++++++++---------- drivers/net/wireless/ath/wcn36xx/Kconfig | 2 +- drivers/net/wireless/ath/wcn36xx/main.c | 6 ++-- drivers/net/wireless/ath/wcn36xx/smd.c | 10 +++--- drivers/net/wireless/ath/wcn36xx/smd.h | 6 ++-- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 2 +- drivers/soc/qcom/Kconfig | 6 ++-- drivers/soc/qcom/smd-rpm.c | 43 +++++++++++++------------ drivers/soc/qcom/wcnss_ctrl.c | 50 +++++++++++++++++------------- include/linux/soc/qcom/wcnss_ctrl.h | 11 ++++--- net/qrtr/Kconfig | 2 +- net/qrtr/smd.c | 42 ++++++++++++------------- 13 files changed, 110 insertions(+), 104 deletions(-) commit def499c929a72ba11b25e26e26e900ba3d5c2762 Author: Roopa Prabhu Date: Mon Mar 27 15:46:41 2017 -0700 vxlan: don't age NTF_EXT_LEARNED fdb entries vxlan driver already implicitly supports installing of external fdb entries with NTF_EXT_LEARNED. This patch just makes sure these entries are not aged by the vxlan driver. An external entity managing these entries will age them out. This is consistent with the use of NTF_EXT_LEARNED in the bridge driver. Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller drivers/net/vxlan.c | 3 +++ 1 file changed, 3 insertions(+) commit 2a69ca71488bc77315575007ab2ab2d0cbc774f3 Merge: cc628c9 2ba5999 Author: David S. Miller Date: Tue Mar 28 17:11:56 2017 -0700 Merge branch 'net-dpipe' Jiri Pirko says: ==================== Add support for pipeline debug (dpipe) Arkadi says: While doing the hardware offloading process much of the hardware specifics cannot be presented. An example for such is the routing LPM algorithm which differ in hardware implementation from the kernel software implementation. The only information the user receives is whether specific route is offloaded or not, but he cannot really understand the underlying implementation nor get the specific statistics related to that process. Another example is ACL offload using TC which is commonly implemented using TCAM memory. Currently there is no capability to gain visibility into the TCAM structure and to debug suboptimal resource allocation. This patchset introduces capability for exporting the ASICs pipeline abstraction via devlink infrastructure, which should serve as an complementary tool. This infrastructure allows the user to get visibility into the ASIC by modeling it as a set of match/action tables. The main objects defined: Table - abstraction for a single pipeline stage. Contains the available match/actions and counter availability. Entry - entry in a specific table with specific matches/actions values and dedicated counter. Header/field - tuples which describes the tables behavior. As an example one of the ASIC's L3 blocks will be modeled. The egress rif (router interface) table is the final step in the L3 pipeline processing which does match on the internal rif index which was determined before by the routing logic. The erif table determines whether to forward or drop the packet and updates the corresponding rif L3 statistics. To expose this internal resources a special metadata header will be introduced that describes the internal information gathered by the ASIC's pipeline and contains the following fields: rif_port_index, forward and drop. Some internal hardware resources have direct mapping to kernel objects. For example the rif_port_index is mapped to the net-devices ifindex. By providing this mapping the users gains visibility into the offloading process. Follow-up work will include exporting more L3 tables which will give visibility into the routing process. First stage is adding support for dpipe in devlink. Next add support in spectrum driver. Finally implement egress router interface (erif) table for spectrum ASIC as an example. --- v1->v2: Please see individual patches ==================== Signed-off-by: David S. Miller commit 2ba5999f009d7e5e48dd348eab84ce155e13a83f Author: Arkadi Sharshevsky Date: Tue Mar 28 17:24:17 2017 +0200 mlxsw: spectrum: Add Support for erif table entries access Implement dpipe's table ops for erif table which provide: 1. Getting the entries in the table with the associate values. - match on "mlxsw_meta:erif_index" - action on "mlxsw_meta:forwared_out" 2. Synchronize the hardware in case of enabling/disabling counters which mean removing erif counters from all interfaces. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 185 +++++++++++++++++++++ 1 file changed, 185 insertions(+) commit fd1b9d41928824eda4694a1015e7ccf233bfff3e Author: Arkadi Sharshevsky Date: Tue Mar 28 17:24:16 2017 +0200 mlxsw: spectrum_router: Add rif helper functions Add rif helper function to access the rif index and rif devices ifindex. This functions will be used by dpipe in order to dump the rif table. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 10 ++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h | 2 ++ 2 files changed, 12 insertions(+) commit e0c0afd8aa4e2f0ecfb7f6d9c4c7f87e07d54132 Author: Arkadi Sharshevsky Date: Tue Mar 28 17:24:15 2017 +0200 mlxsw: spectrum: Support for counters on router interfaces Add support for counter allocation on router interfaces. The allocation depends on the counter state of relevant table. In case the counting is disabled or no counters left the counter index will be set as invalid. Also a counter pool for router allocation is added. Signed-off-by: Arakdi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/resources.h | 2 + drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.c | 9 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.h | 1 + .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 164 +++++++++++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 56 +++++++ 5 files changed, 232 insertions(+) commit ba73e97a6376c2e0522ff372f2555388deab8ce6 Author: Arkadi Sharshevsky Date: Tue Mar 28 17:24:14 2017 +0200 mlxsw: reg: Add Router Interface Counter Register The RICNT register retrieves per port performance counter. It will be used to query the router interfaces statistics. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 124 ++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) commit d54b70feb696f0d110626438432d0acec3cb4752 Author: Arkadi Sharshevsky Date: Tue Mar 28 17:24:13 2017 +0200 mlxsw: spectrum: Add definition for egress rif table Add definition for egress router interface table. This table describes the final part in the routing pipeline. This table matches the egress interface index (rif index, which is set by the previous stages and determine the out port) and makes the decision of forwarding the packet towards the L2 logic or dropping it. The metadata header is added to represent this internal information. The rif index field is mapped logically to netdevice ifindex. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 117 ++++++++++++++++++++- .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.h | 2 + 2 files changed, 115 insertions(+), 4 deletions(-) commit 230ead0141be9668fbaf6c0b708533064d46a9a2 Author: Arkadi Sharshevsky Date: Tue Mar 28 17:24:12 2017 +0200 mlxsw: spectrum: Add placeholder for dpipe Add placeholder for dpipe. Support for specific tables and headers will be introduced in following patches. The headers are shared between all mlxsw_sp instances. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/Makefile | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 10 ++++ .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 57 ++++++++++++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.h | 41 ++++++++++++++++ 4 files changed, 109 insertions(+), 1 deletion(-) commit 0f630fcbe5409aaab1a29b48434b28f41bc360ff Author: Arkadi Sharshevsky Date: Tue Mar 28 17:24:11 2017 +0200 mlxsw: reg: Add counter fields to RITR register Update RITR for counter support. This allows adding counters for ASIC's router ports. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 54 +++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 1555d204e743b6956d2be294a317121f6112238d Author: Arkadi Sharshevsky Date: Tue Mar 28 17:24:10 2017 +0200 devlink: Support for pipeline debug (dpipe) The pipeline debug is used to export the pipeline abstractions for the main objects - tables, headers and entries. The only support for set is for changing the counter parameter on specific table. The basic structures: Header - can represent a real protocol header information or internal metadata. Generic protocol headers like IPv4 can be shared between drivers. Each driver can add local headers. Field - part of a header. Can represent protocol field or specific ASIC metadata field. Hardware special metadata fields can be mapped to different resources, for example switch ASIC ports can have internal number which from the systems point of view is mapped to netdeivce ifindex. Match - represent specific match rule. Can describe match on specific field or header. The header index should be specified as well in order to support several header instances of the same type (tunneling). Action - represents specific action rule. Actions can describe operations on specific field values for example like set, increment, etc. And header operation like add and delete. Value - represents value which can be associated with specific match or action. Table - represents a hardware block which can be described with match/ action behavior. The match/action can be done on the packets data or on the internal metadata that it gathered along the packets traversal throw the pipeline which is vendor specific and should be exported in order to provide understanding of ASICs behavior. Entry - represents single record in a specific table. The entry is identified by specific combination of values for match/action. Prior to accessing the tables/entries the drivers provide the header/ field data base which is used by driver to user-space. The data base is split between the shared headers and unique headers. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/devlink.h | 259 ++++++++++++++ include/uapi/linux/devlink.h | 67 +++- net/core/devlink.c | 836 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1161 insertions(+), 1 deletion(-) commit c541a51b8ce81d003b02ed67ad3604a2e6220e3e Author: Jaegeuk Kim Date: Sat Mar 25 00:03:02 2017 -0700 f2fs: fix wrong max cost initialization This patch fixes missing increased max cost caused by a patch that we increased cose of data segments in greedy algorithm. Cc: # v4.10+ Fixes: b9cd20619 "f2fs: node segment is prior to data segment selected victim" Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a0e75adecc8da026a5befb2c5828d08c999373c Author: Al Viro Date: Wed Mar 22 13:02:41 2017 -0400 xtensa: get rid of zeroing, use RAW_COPY_USER Signed-off-by: Al Viro arch/xtensa/Kconfig | 1 + arch/xtensa/include/asm/uaccess.h | 54 +++--------------- arch/xtensa/lib/usercopy.S | 116 ++++++++++++++++---------------------- 3 files changed, 57 insertions(+), 114 deletions(-) commit 0b46a94e84c1323d54f8b82eacd3143400fb9521 Author: Al Viro Date: Sun Dec 25 14:34:44 2016 -0500 xtensa: switch to generic extable.h Signed-off-by: Al Viro arch/xtensa/include/asm/Kbuild | 1 + arch/xtensa/include/asm/uaccess.h | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) commit 3f763453e6f27d82fa0ac58f8e1ac4094c1fb1f8 Author: Al Viro Date: Sat Mar 25 18:47:28 2017 -0400 kill __copy_from_user_nocache() Signed-off-by: Al Viro arch/x86/include/asm/uaccess_32.h | 30 ---------- arch/x86/include/asm/uaccess_64.h | 8 --- arch/x86/lib/usercopy_32.c | 118 -------------------------------------- include/linux/uaccess.h | 6 -- lib/iov_iter.c | 4 +- 5 files changed, 2 insertions(+), 164 deletions(-) commit 2ef59f28567f8a5d66dccc0e6a99a1bd655fd605 Author: Al Viro Date: Tue Mar 28 01:37:07 2017 -0400 unicore32: get rid of zeroing and switch to RAW_COPY_USER Signed-off-by: Al Viro arch/unicore32/Kconfig | 1 + arch/unicore32/include/asm/uaccess.h | 6 ++++-- arch/unicore32/kernel/ksyms.c | 4 ++-- arch/unicore32/lib/copy_from_user.S | 16 ++++++---------- arch/unicore32/lib/copy_to_user.S | 6 +++--- 5 files changed, 16 insertions(+), 17 deletions(-) commit 122b05ddf506e637336dcf64b5a129825f7bf6d4 Author: Al Viro Date: Sat Mar 25 18:36:22 2017 -0400 amd64: get rid of zeroing Signed-off-by: Al Viro arch/x86/include/asm/uaccess.h | 12 ++++++++++++ arch/x86/include/asm/uaccess_64.h | 16 ++++++++-------- arch/x86/lib/usercopy.c | 9 +++++---- arch/x86/lib/usercopy_64.c | 4 ---- 4 files changed, 25 insertions(+), 16 deletions(-) commit a668ce3a001fe0564deb6357129bfd81f757743b Author: Al Viro Date: Tue Mar 28 01:33:09 2017 -0400 um: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/um/Kconfig.common | 1 + arch/um/include/asm/uaccess.h | 8 ++++---- arch/um/kernel/skas/uaccess.c | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) commit 23504bae7f3edd1484c4d470362f2b12bcd298f9 Author: Al Viro Date: Tue Mar 21 14:27:36 2017 -0400 tile: get rid of zeroing, switch to RAW_COPY_USER Signed-off-by: Al Viro arch/tile/Kconfig | 1 + arch/tile/include/asm/uaccess.h | 143 ++-------------------------------------- arch/tile/lib/exports.c | 7 +- arch/tile/lib/memcpy_32.S | 41 ++++-------- arch/tile/lib/memcpy_user_64.c | 15 +---- 5 files changed, 27 insertions(+), 180 deletions(-) commit c0ea73f18c057b41801106cfd2ffaf9794681444 Author: Al Viro Date: Sun Dec 25 03:33:03 2016 -0500 tile: switch to generic extable.h Signed-off-by: Al Viro arch/tile/include/asm/Kbuild | 1 + arch/tile/include/asm/uaccess.h | 19 +------------------ 2 files changed, 2 insertions(+), 18 deletions(-) commit 1333eb785614779b2000e547bd32aef85c22ca7a Author: Al Viro Date: Sun Dec 25 20:27:33 2016 -0500 sparc32: kill __ret_efault() it's unused on 32bit one as well... Signed-off-by: Al Viro arch/sparc/include/asm/uaccess_32.h | 2 -- arch/sparc/kernel/head_32.S | 7 ------- 2 files changed, 9 deletions(-) commit f98f48ee7cd473a077f8500dbf3d0a1f9af73003 Author: Al Viro Date: Tue Mar 21 14:43:13 2017 -0400 sh: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/sh/Kconfig | 1 + arch/sh/include/asm/uaccess.h | 36 ++++-------------------------------- 2 files changed, 5 insertions(+), 32 deletions(-) commit bcd541d9a2f43fbf08d2e909fb8247bed3dac750 Author: Al Viro Date: Sun Dec 25 14:49:42 2016 -0500 sh: switch to extable.h Signed-off-by: Al Viro arch/sh/include/asm/extable.h | 10 ++++++++++ arch/sh/include/asm/uaccess.h | 23 +---------------------- 2 files changed, 11 insertions(+), 22 deletions(-) commit dc1425352325bf8a56f5d8ecd1258671808bcadd Author: Al Viro Date: Wed Mar 22 13:26:57 2017 -0400 score: switch to RAW_COPY_USER ... and kill copy_in_user() - it's not a biarch architecture, to start with Signed-off-by: Al Viro arch/score/Kconfig | 1 + arch/score/include/asm/uaccess.h | 54 +++++----------------------------------- 2 files changed, 7 insertions(+), 48 deletions(-) commit 4b4554f6d562c15159b053fad4146ced2201bc4c Author: Al Viro Date: Tue Dec 27 14:50:40 2016 -0500 score: it's "VERIFY_WRITE", not "VERFITY_WRITE"... ... and the only reason it worked is that access_ok() discards the first argument before parser even gets a chance of looking at it. Still, no point keeping that typo. Signed-off-by: Al Viro arch/score/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 271abdc367e204821e19d71ae2bbc444059c8496 Author: Al Viro Date: Sun Dec 25 03:33:03 2016 -0500 score: switch to generic extable.h Signed-off-by: Al Viro arch/score/include/asm/Kbuild | 1 + arch/score/include/asm/extable.h | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) commit e70f1d59be747a959c240bf2fe2ea9489b629496 Author: Al Viro Date: Mon Dec 26 00:48:37 2016 -0500 s390: switch to extable.h Signed-off-by: Al Viro arch/s390/include/asm/extable.h | 28 ++++++++++++++++++++++++++++ arch/s390/include/asm/uaccess.h | 26 +------------------------- 2 files changed, 29 insertions(+), 25 deletions(-) commit 527b5baeada26f9660722b4a498d3855d90f276c Author: Al Viro Date: Mon Dec 26 00:50:06 2016 -0500 powerpc: switch to extable.h Signed-off-by: Al Viro arch/powerpc/include/asm/extable.h | 29 +++++++++++++++++++++++++++++ arch/powerpc/include/asm/uaccess.h | 26 +------------------------- 2 files changed, 30 insertions(+), 25 deletions(-) commit ab89866be3a02008880719f8928ff4fd960f99b6 Author: Al Viro Date: Wed Mar 22 13:13:15 2017 -0400 openrisc: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/openrisc/Kconfig | 1 + arch/openrisc/include/asm/uaccess.h | 28 ++++++---------------------- 2 files changed, 7 insertions(+), 22 deletions(-) commit 6c36a4eb9aea4081a4286afaf23cf8cce30f3e6f Author: Al Viro Date: Sun Dec 25 14:34:44 2016 -0500 openrisc: switch to generic extable.h Signed-off-by: Al Viro arch/openrisc/include/asm/Kbuild | 1 + arch/openrisc/include/asm/uaccess.h | 18 +----------------- 2 files changed, 2 insertions(+), 17 deletions(-) commit de51d6cc2cf9daa9b5155faefb714f5b477cf160 Author: Al Viro Date: Wed Mar 22 13:08:32 2017 -0400 nios2: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/nios2/Kconfig | 1 + arch/nios2/include/asm/uaccess.h | 31 ++++++------------------------- arch/nios2/mm/uaccess.c | 16 ++++++++-------- 3 files changed, 15 insertions(+), 33 deletions(-) commit 981db65b5229edb5ab336e3e23758791a1aa0b03 Author: Al Viro Date: Sun Dec 25 03:33:03 2016 -0500 nios2: switch to generic extable.h Signed-off-by: Al Viro arch/nios2/include/asm/Kbuild | 1 + arch/nios2/include/asm/uaccess.h | 19 +------------------ 2 files changed, 2 insertions(+), 18 deletions(-) commit 19dbf70c5acce91c6cacfd0983c2b062644fa7a4 Author: Al Viro Date: Tue Mar 21 12:06:57 2017 -0400 mn10300: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/mn10300/Kconfig | 1 + arch/mn10300/include/asm/uaccess.h | 37 ++++--------------------------------- arch/mn10300/kernel/mn10300_ksyms.c | 2 -- arch/mn10300/lib/usercopy.c | 19 ------------------- 4 files changed, 5 insertions(+), 54 deletions(-) commit 4df3715efe5ed1e77344c6d5dcbfd75017a2f8b5 Author: Al Viro Date: Mon Mar 20 20:45:41 2017 -0400 mn10300: get rid of zeroing Signed-off-by: Al Viro arch/mn10300/include/asm/uaccess.h | 150 ++++--------------------------------- arch/mn10300/lib/usercopy.c | 11 +-- 2 files changed, 20 insertions(+), 141 deletions(-) commit 6c03905a63165921411fbe91c167186b13879c8d Author: Al Viro Date: Sun Dec 25 03:33:03 2016 -0500 mn10300: switch to generic extable.h Signed-off-by: Al Viro arch/mn10300/include/asm/Kbuild | 1 + arch/mn10300/include/asm/uaccess.h | 21 +-------------------- 2 files changed, 2 insertions(+), 20 deletions(-) commit 730132e7e52210cbbfa95af67f5e23a63199c13d Author: Al Viro Date: Sun Dec 25 14:34:44 2016 -0500 microblaze: switch to generic extable.h Signed-off-by: Al Viro arch/microblaze/include/asm/Kbuild | 1 + arch/microblaze/include/asm/uaccess.h | 17 +---------------- 2 files changed, 2 insertions(+), 16 deletions(-) commit 2c3054176e2ef3f49be9ec8b6fd06d6a47156ff5 Author: Al Viro Date: Wed Dec 28 01:26:29 2016 -0500 metag: kill verify_area() Deprecated in 2.6.12, killed in 2.6.13. Time to end that depravity, let's bury the body... Signed-off-by: Al Viro arch/metag/include/asm/uaccess.h | 5 ----- 1 file changed, 5 deletions(-) commit 8b9a7e569569f28d21e5628d5e1f8efe089474f7 Author: Al Viro Date: Sun Dec 25 03:33:03 2016 -0500 metag: switch to generic extable.h Signed-off-by: Al Viro arch/metag/include/asm/Kbuild | 1 + arch/metag/include/asm/uaccess.h | 18 +----------------- arch/mn10300/include/asm/Kbuild | 1 + 3 files changed, 3 insertions(+), 17 deletions(-) commit 29be02eb6fef5f26332eb3e13ead868cff0910af Author: Al Viro Date: Tue Mar 21 08:50:56 2017 -0400 m68k: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/m68k/Kconfig | 1 + arch/m68k/include/asm/uaccess_mm.h | 31 +++++++++++++------------------ arch/m68k/include/asm/uaccess_no.h | 20 ++++++++++++++------ 3 files changed, 28 insertions(+), 24 deletions(-) commit 7cefa5a05dbda1f0bbbd98e9d2861b09a35cc6ea Author: Al Viro Date: Mon Mar 20 00:55:24 2017 -0400 m68k: get rid of zeroing Signed-off-by: Al Viro arch/m68k/include/asm/uaccess_mm.h | 57 ++++++++++++++++++++++++++------------ arch/m68k/lib/uaccess.c | 12 ++------ 2 files changed, 43 insertions(+), 26 deletions(-) commit 68acfdcb477abdbf875e33e4a950094c8de08f41 Author: Al Viro Date: Sun Dec 25 14:33:17 2016 -0500 m68k: switch to generic extable.h Signed-off-by: Al Viro arch/m68k/include/asm/Kbuild | 1 + arch/m68k/include/asm/processor.h | 10 ---------- arch/m68k/include/asm/uaccess.h | 1 + arch/m68k/include/asm/uaccess_mm.h | 18 ------------------ arch/m68k/include/asm/uaccess_no.h | 19 ------------------- arch/m68k/kernel/signal.c | 2 +- arch/m68k/kernel/traps.c | 9 +++++++-- arch/m68k/mm/fault.c | 2 +- 8 files changed, 11 insertions(+), 51 deletions(-) commit 8cd920f26785ce42ec6fb807d40de67fc2eb41ce Author: Al Viro Date: Sun Mar 19 16:11:13 2017 -0400 m32r: get rid of zeroing Signed-off-by: Al Viro arch/m32r/include/asm/uaccess.h | 66 +---------------------------------------- arch/m32r/lib/usercopy.c | 9 +++--- 2 files changed, 6 insertions(+), 69 deletions(-) commit 35f8acd5c660eb9dbf7a8379724821abb823a3d8 Author: Al Viro Date: Sun Dec 25 03:33:03 2016 -0500 m32r: switch to generic extable.h Signed-off-by: Al Viro arch/m32r/include/asm/Kbuild | 1 + arch/m32r/include/asm/uaccess.h | 20 +------------------- 2 files changed, 2 insertions(+), 19 deletions(-) commit 33ab2da801debd947bf0f36848d2b9ea20fad835 Author: Al Viro Date: Tue Mar 28 01:22:03 2017 -0400 8300: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/h8300/Kconfig | 1 + arch/h8300/include/asm/uaccess.h | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) commit 48f666c986671ea2021971bfbe4d74a7ebcf0a44 Author: Al Viro Date: Tue Mar 21 08:46:17 2017 -0400 frv: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/frv/Kconfig | 1 + arch/frv/include/asm/uaccess.h | 57 +++++++++++++++++------------------------- 2 files changed, 24 insertions(+), 34 deletions(-) commit 9a7513cfa26f5fcce15de6130ce3c27d77c0ce55 Author: Al Viro Date: Sun Dec 25 14:12:18 2016 -0500 frv: switch to use of fixup_exception() Massage frv search_exception_table() to a) taking pt_regs pointer as explicit argument b) updating ->pc on success Simplifies callers a bit and allows to convert to generic extable.h, while we are at it. Signed-off-by: Al Viro arch/frv/include/asm/Kbuild | 1 + arch/frv/include/asm/uaccess.h | 23 +---------------------- arch/frv/kernel/traps.c | 7 +------ arch/frv/mm/extable.c | 27 +++++++++++++-------------- arch/frv/mm/fault.c | 6 ++---- 5 files changed, 18 insertions(+), 46 deletions(-) commit 0c7e9a870eb2a5db03780d7d3f83d0df7623a9c7 Author: Al Viro Date: Tue Mar 28 01:18:37 2017 -0400 cris: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/cris/Kconfig | 1 + arch/cris/include/asm/uaccess.h | 53 +++++++++-------------------------------- 2 files changed, 12 insertions(+), 42 deletions(-) commit b71f1bf57f995ae4ce0fe2f907604c841ca8493f Author: Al Viro Date: Sun Mar 19 15:28:30 2017 -0400 cris: rename __copy_user_zeroing to __copy_user_in ... now that it doesn't zero anymore Signed-off-by: Al Viro arch/cris/arch-v10/lib/usercopy.c | 7 +++---- arch/cris/arch-v32/lib/usercopy.c | 7 +++---- arch/cris/include/asm/uaccess.h | 8 ++++---- 3 files changed, 10 insertions(+), 12 deletions(-) commit de09be340d3ef4568b27282f2f6fc44b1cb559ab Author: Al Viro Date: Sun Mar 19 15:25:35 2017 -0400 cris: get rid of zeroing ... the rest of it Signed-off-by: Al Viro arch/cris/arch-v10/lib/usercopy.c | 24 ++++++------------------ arch/cris/arch-v32/lib/usercopy.c | 23 ++++++----------------- arch/cris/include/arch-v10/arch/uaccess.h | 12 ++++-------- arch/cris/include/arch-v32/arch/uaccess.h | 12 ++++-------- 4 files changed, 20 insertions(+), 51 deletions(-) commit c8313947af458d9081c3adca2a9a9c962cf014f1 Author: Al Viro Date: Sun Mar 19 15:17:25 2017 -0400 cris: get rid of zeroing in __asm_copy_from_user_N for N > 4 only one user for those Signed-off-by: Al Viro arch/cris/include/arch-v10/arch/uaccess.h | 34 +++++++++++-------------- arch/cris/include/arch-v32/arch/uaccess.h | 42 +++++++++++-------------------- 2 files changed, 28 insertions(+), 48 deletions(-) commit 07f78b308984042dde424191ab8f3237bcf6a0d1 Author: Al Viro Date: Sun Mar 19 15:07:21 2017 -0400 cris: don't rely upon __copy_user_zeroing() zeroing the tail we want to get rid of it; unfortunately, it's tangled as hell, so it'll take many steps, more's the pity. Signed-off-by: Al Viro arch/cris/include/asm/uaccess.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit a8be34459ca92d4f1034921bffd09df5441938be Author: Al Viro Date: Sun Dec 25 03:33:03 2016 -0500 cris: switch to generic extable.h Signed-off-by: Al Viro arch/cris/include/asm/Kbuild | 1 + arch/cris/include/asm/uaccess.h | 18 +----------------- 2 files changed, 2 insertions(+), 17 deletions(-) commit 86944ee1581f4be6af0126e80877b8069e177739 Author: Al Viro Date: Tue Mar 28 01:11:14 2017 -0400 c6x: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/c6x/Kconfig | 1 + arch/c6x/include/asm/uaccess.h | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) commit dcecd9369e3dcbb5da3ecdc9e0b5021d6ee6f879 Author: Al Viro Date: Tue Dec 27 14:16:16 2016 -0500 c6x: remove duplicate definition of __access_ok Signed-off-by: Al Viro arch/c6x/include/asm/uaccess.h | 4 ---- 1 file changed, 4 deletions(-) commit 50e9ab915a79b3f51f6de8ef9bbdae8279e8fa46 Author: Al Viro Date: Tue Mar 28 00:36:07 2017 -0400 bfin: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/blackfin/Kconfig | 1 + arch/blackfin/include/asm/uaccess.h | 26 ++++---------------------- 2 files changed, 5 insertions(+), 22 deletions(-) commit 72d6f65dd7895276f929b48c8397575e272efcca Author: Al Viro Date: Sun Dec 25 03:33:03 2016 -0500 blackfin: switch to generic extable.h Signed-off-by: Al Viro arch/blackfin/include/asm/Kbuild | 1 + arch/blackfin/include/asm/uaccess.h | 17 +---------------- 2 files changed, 2 insertions(+), 16 deletions(-) commit e5c1540030a0e2da0c46b3da91ed3ceafd0e4368 Author: Al Viro Date: Tue Mar 28 16:03:51 2017 -0400 avr32: switch to RAW_COPY_USER This one needs profiling; use of asm variant of access_ok() might have been performance-critical. Now copy_{to,from}_user() are using the C variant. I doubt that it's going to have visible effects, but that needs to be experimentally verified. Signed-off-by: Al Viro arch/avr32/Kconfig | 1 + arch/avr32/include/asm/uaccess.h | 28 ++++++---------------------- arch/avr32/kernel/avr32_ksyms.c | 2 -- arch/avr32/lib/copy_user.S | 15 --------------- 4 files changed, 7 insertions(+), 39 deletions(-) commit 92430dab364019babd4122fef22441ef20bdb39b Author: Al Viro Date: Tue Mar 21 08:40:57 2017 -0400 arm64: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/arm64/Kconfig | 1 + arch/arm64/include/asm/uaccess.h | 55 ++++------------------------------------ arch/arm64/kernel/arm64ksyms.c | 2 +- arch/arm64/lib/copy_in_user.S | 4 +-- 4 files changed, 9 insertions(+), 53 deletions(-) commit 5cbe865b0e03982c7886f36716fc149415ee8381 Author: Al Viro Date: Sun Dec 25 03:33:03 2016 -0500 avr32: switch to generic extable.h Signed-off-by: Al Viro arch/avr32/include/asm/Kbuild | 1 + arch/avr32/include/asm/uaccess.h | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) commit 46583939b98d5a3f13ac71eed9518c6b7a80ae7e Author: Al Viro Date: Sun Dec 25 14:00:03 2016 -0500 arm64: add extable.h Signed-off-by: Al Viro arch/arm64/include/asm/extable.h | 25 +++++++++++++++++++++++++ arch/arm64/include/asm/uaccess.h | 23 +---------------------- 2 files changed, 26 insertions(+), 22 deletions(-) commit 4de5b63e76b2e672478e49622dabe2666b7f727f Author: Al Viro Date: Tue Mar 21 08:23:33 2017 -0400 arm: switch to RAW_COPY_USER Signed-off-by: Al Viro arch/arm/Kconfig | 1 + arch/arm/include/asm/uaccess.h | 60 ++++++++++-------------------------------- 2 files changed, 15 insertions(+), 46 deletions(-) commit 0f9b38cd79d528c1e19693899d989521778cc245 Author: Al Viro Date: Sun Dec 25 03:33:03 2016 -0500 arm: switch to generic extable.h Signed-off-by: Al Viro arch/arm/include/asm/Kbuild | 1 + arch/arm/include/asm/uaccess.h | 20 +------------------- 2 files changed, 2 insertions(+), 19 deletions(-) commit 3a1e37ae007e9d629617a0d5bc07661078defa32 Author: Al Viro Date: Sun Mar 19 01:01:53 2017 -0400 arc: get rid of unused declaration Signed-off-by: Al Viro arch/arc/include/asm/uaccess.h | 3 --- 1 file changed, 3 deletions(-) commit ec022681a4201006a5bcb1a01401591a326b659c Author: Al Viro Date: Tue Mar 21 08:13:02 2017 -0400 alpha: switch to RAW_COPY_USER copy_{to,from}_user() uninlined. We can go back to inlined variants, if we want to... Signed-off-by: Al Viro arch/alpha/Kconfig | 1 + arch/alpha/include/asm/uaccess.h | 33 ++++++--------------------------- 2 files changed, 7 insertions(+), 27 deletions(-) commit ca282f69738161ca1ac2e13b2c1b283be82ffb4b Author: Al Viro Date: Tue Mar 7 04:08:46 2017 -0500 alpha: add a helper for emitting exception table entries Signed-off-by: Al Viro arch/alpha/include/asm/futex.h | 16 +--- arch/alpha/include/asm/uaccess.h | 80 ++++++-------------- arch/alpha/kernel/traps.c | 148 ++++++++++--------------------------- arch/alpha/lib/csum_partial_copy.c | 10 +-- 4 files changed, 68 insertions(+), 186 deletions(-) commit c9df6025a6ecc5b4d243d1469a4697e03c371a88 Author: Al Viro Date: Tue Dec 27 02:26:32 2016 -0500 alpha: kill the 'segment' argument of __access_ok() always equal to get_fs(). Signed-off-by: Al Viro arch/alpha/include/asm/uaccess.h | 82 ++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 41 deletions(-) commit f14d6b4f52616465fead8c4b6508a6687032660d Author: Al Viro Date: Tue Dec 27 02:23:46 2016 -0500 alpha: don't bother with __access_ok() in traps.c we want to check that address is below TASK_SIZE; sure, __access_ok(addr, 0, USER_DS) will do that, but it's more straightforward to just spell it out and that way we can get rid of the damn 'segment' argument of __access_ok(). Signed-off-by: Al Viro arch/alpha/kernel/traps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d78d834bed81bf838281270c7ae3790c88fc95aa Author: Al Viro Date: Tue Dec 27 02:04:09 2016 -0500 alpha: get rid of 'segment' argument of __{get,put}_user_check() always equal to get_fs() Signed-off-by: Al Viro arch/alpha/include/asm/uaccess.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b5478c1b67bcd52d3b7fb276090b985b4b38a7ea Author: Al Viro Date: Sat Dec 24 21:18:40 2016 -0500 alpha: add asm/extable.h Signed-off-by: Al Viro arch/alpha/include/asm/extable.h | 55 ++++++++++++++++++++++++++++++++++++++++ arch/alpha/include/asm/uaccess.h | 52 +------------------------------------ 2 files changed, 56 insertions(+), 51 deletions(-) commit 8525023121de4848b5f0a7d867ffeadbc477774d Author: Al Viro Date: Sat Dec 24 20:26:18 2016 -0500 alpha: switch __copy_user() and __do_clean_user() to normal calling conventions They used to need odd calling conventions due to old exception handling mechanism, the last remnants of which had disappeared back in 2002. Signed-off-by: Al Viro arch/alpha/include/asm/uaccess.h | 67 +++++-------------------- arch/alpha/lib/clear_user.S | 66 ++++++++++--------------- arch/alpha/lib/copy_user.S | 82 +++++++++++++----------------- arch/alpha/lib/ev6-clear_user.S | 84 +++++++++++++------------------ arch/alpha/lib/ev6-copy_user.S | 104 +++++++++++++++++---------------------- 5 files changed, 151 insertions(+), 252 deletions(-) commit d597580d373774b1bdab84b3d26ff0b55162b916 Author: Al Viro Date: Mon Mar 20 21:56:06 2017 -0400 generic ...copy_..._user primitives provide raw_copy_..._user() and select ARCH_HAS_RAW_COPY_USER to use those. Signed-off-by: Al Viro arch/Kconfig | 3 + include/asm-generic/uaccess.h | 11 +++ include/linux/uaccess.h | 187 ++++++++++++++++++++++++++++++++++++++++++ lib/Makefile | 2 + lib/usercopy.c | 26 ++++++ 5 files changed, 229 insertions(+) commit ecad4502d090a8630f50a88cbe072b92f3a3229e Author: Gautham R. Shenoy Date: Wed Mar 15 13:45:53 2017 +0530 powernv-cpuidle: Validate DT property array size The various properties associated with powernv idle states such as names, flags, residency-ns, latencies-ns, psscr, psscr-mask are exposed in the device-tree as property arrays such the pointwise entries in each of these arrays correspond to the properties of the same idle state. This patch validates that the lengths of the property arrays are the same. If there is a mismatch, the patch will ensure that we bail out and not expose the platform idle states via cpuidle. Signed-off-by: Gautham R. Shenoy Reviewed-by: Shilpasri G Bhat Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle-powernv.c | 64 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 3 deletions(-) commit 075c37d59ecd4a8b7c9cb5570e90d5b538797ad2 Author: Ulf Hansson Date: Mon Mar 20 11:19:23 2017 +0100 PM / Domains: Don't warn about IRQ safe device for an always on PM domain When an IRQ safe device is attached to a no sleep domain, genpd prints a warning once, as to indicate it is a suboptimal configuration from power consumption point of view. However the warning doesn't make sense for an always on domain, since it anyway remains powered on. Therefore, let's change to not print the warning for this configuration. Signed-off-by: Ulf Hansson Reviewed-by: Viresh Kumar Reviewed-by: Geert Uytterhoeven Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1c14967c6ea0deb3db4a974b1de519f5a5593ef4 Author: Ulf Hansson Date: Mon Mar 20 11:19:22 2017 +0100 PM / Domains: Respect errors from genpd's ->power_off() callback The current code in genpd_sync_power_off(), doesn't care about potential errors being returned from genpd's ->power_off() callback. Obviously this behaviour could lead to problems, such as incorrectly setting the genpd's status to GPD_STATE_POWER_OFF, but also to incorrectly decrease the subdomain count for the masters, which potentially allows them to be powered off in the next recursive call to genpd_sync_power_off(). Let's fix this behaviour by bailing out when the ->power_off() callback returns an error code. Signed-off-by: Ulf Hansson Reviewed-by: Viresh Kumar Reviewed-by: Geert Uytterhoeven Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ffaa42e8a40b7f1041e36b022cd28b7c45e2b564 Author: Ulf Hansson Date: Mon Mar 20 11:19:21 2017 +0100 PM / Domains: Enable users of genpd to specify always on PM domains The current way to implement an always on PM domain consists of returning -EBUSY from the ->power_off() callback. This is a bit different compared to using the always on genpd governor, which prevents the PM domain from being powered off via runtime suspend, but not via system suspend. The approach to return -EBUSY from the ->power_off() callback to support always on PM domains in genpd is suboptimal. That is because it requires genpd to follow the regular execution path of the power off sequence, which ends by invoking the ->power_off() callback. To enable genpd to early abort the power off sequence for always on PM domains, it needs static information about these configurations. Therefore let's add a new genpd configuration flag, GENPD_FLAG_ALWAYS_ON. Users of the new GENPD_FLAG_ALWAYS_ON flag, are by genpd required to make sure the PM domain is powered on before calling pm_genpd_init(). Moreover, users don't need to implement the ->power_off() callback, as genpd doesn't ever invoke it. Signed-off-by: Ulf Hansson Reviewed-by: Viresh Kumar Reviewed-by: Geert Uytterhoeven Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 14 ++++++++++++-- include/linux/pm_domain.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) commit 41e2c8e0060db250cf70bc2a41ea6595a90b360c Author: Ulf Hansson Date: Mon Mar 20 11:19:20 2017 +0100 PM / Domains: Clean up code validating genpd's status There exists several similar validations of the genpd->status, against GPD_STATE_ACTIVE and GPD_STATE_POWER_OFF. Let's clean up this code by converting to use a helper macro, genpd_status_on(). Signed-off-by: Ulf Hansson Reviewed-by: Viresh Kumar Reviewed-by: Geert Uytterhoeven Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 8ce95844c85349243520b6943ec1225a047d7d6c Author: Viresh Kumar Date: Fri Mar 17 11:19:21 2017 +0530 PM / Domain: remove conditional from error case There is no point running the conditional 'if' statement if the genpd isn't present. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b0b027cee090a1e3278960e1c8257213fda40f10 Author: Sakari Ailus Date: Tue Mar 28 15:22:19 2017 +0300 device property: fwnode_property_read_string_array() returns nr of strings Functionally fwnode_property_read_string_array() should match of_property_read_string_array() and work as a drop-in substitute for the latter. of_property_read_string_array() returns the number of strings read if the target string pointer array is non-NULL. Make fwnode_property_read_string_array() do the same. Signed-off-by: Sakari Ailus Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 22 +++++++++++++++++----- drivers/base/property.c | 12 ++++++------ 2 files changed, 23 insertions(+), 11 deletions(-) commit 0f194992c85f972ee99f176eb78a5860cef78573 Author: Sakari Ailus Date: Tue Mar 28 15:22:18 2017 +0300 device property: Fix reading pset strings using array access functions The length field value of non-array string properties is the length of the string itself. Non-array string properties thus require specific handling. Fix this. Signed-off-by: Sakari Ailus Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) commit 026b821745a7dd4552d43539e70c83d7143b59c8 Author: Sakari Ailus Date: Tue Mar 28 15:22:17 2017 +0300 device property: fwnode_property_read_string_array() may return -EILSEQ fwnode_property_read_string_array() may return -EILSEQ through of_property_read_string_array(). Document this. Signed-off-by: Sakari Ailus Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aef1b7b21b3f6ce448c56594ef7081b18380a2d7 Author: Sakari Ailus Date: Tue Mar 28 10:52:27 2017 +0300 ACPI / DSD: Document references, ports and endpoints Document the use of references into the hierarchical data extension structure, as well as the use of port and endpoint concepts that are very similar to those in Devicetree. Signed-off-by: Sakari Ailus Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki Documentation/acpi/dsd/graph.txt | 162 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) commit 233872585de1cf26c3c3da5859ffb3aba45bd486 Author: Sakari Ailus Date: Tue Mar 28 10:52:26 2017 +0300 device property: Add fwnode_get_next_parent() In order to differentiate the functionality between dropping a reference to the node (or not) for the benefit of OF, introduce fwnode_get_next_parent(). Signed-off-by: Sakari Ailus Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 21 +++++++++++++++++++++ include/linux/property.h | 1 + 2 files changed, 22 insertions(+) commit 2bd5452d46df46d99b869b59a1532647e2981d75 Author: Sakari Ailus Date: Tue Mar 28 10:52:25 2017 +0300 device property: Add support for fwnode endpoints Similar to OF endpoints, endpoint type nodes can be also supported on ACPI. In order to make it possible for drivers to ignore the matter, add a type for fwnode_endpoint and a function to parse them. On ACPI, find the child node index instead of relying on the "endpoint" property. Signed-off-by: Sakari Ailus Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 32 ++++++++++++++++++++++++++++++++ include/linux/fwnode.h | 12 ++++++++++++ include/linux/property.h | 3 +++ 3 files changed, 47 insertions(+) commit e44bb0cbdc88686c21e2175a990b40bf6db5d005 Author: Sakari Ailus Date: Tue Mar 28 10:52:24 2017 +0300 device property: Make dev_fwnode() public The function to obtain a fwnode related to a struct device is useful for drivers that use the fwnode property API: it allows not being aware of the underlying firmware implementation. Signed-off-by: Sakari Ailus Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 3 ++- include/linux/property.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 67831837e0b192fe0b8ee8b5e502d95ad2c497c0 Author: Sakari Ailus Date: Tue Mar 28 10:52:23 2017 +0300 of: Add of_fwnode_handle() to convert device nodes to fwnode_handle of_fwnode_handle() returns a struct fwnode_handle of the struct device_node. This may be used on the fwnode property API. Use a macro instead of a function in order to support const and non-const arguments. Signed-off-by: Sakari Ailus Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki include/linux/of.h | 4 ++++ 1 file changed, 4 insertions(+) commit e7887c284969a23a98fe1aff2f631c5ccdcd1757 Author: Sakari Ailus Date: Tue Mar 28 10:52:22 2017 +0300 device property: Add fwnode_handle_get() fwnode_handle_get() is used to obtain a reference to a fwnode_handle container. In this case this is OF specific struct device_node. This complements fwnode_handle_put() which is already implemented. Signed-off-by: Sakari Ailus Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 11 +++++++++++ include/linux/property.h | 1 + 2 files changed, 12 insertions(+) commit 07bb80d40b0e6a43aafb422296d33baed255569a Author: Mika Westerberg Date: Tue Mar 28 10:52:21 2017 +0300 device property: Add support for remote endpoints This follows DT implementation of of_graph_* APIs but we call them fwnode_graph_* instead. For DT nodes the existing of_graph_* implementation will be used. For ACPI we use the new ACPI graph implementation instead. Signed-off-by: Mika Westerberg Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 123 +++++++++++++++++++++++++++++++++++++++++++++++ include/linux/property.h | 9 ++++ 2 files changed, 132 insertions(+) commit 79389a83bc3888a900191e3990cda5c76f2ca1ec Author: Mika Westerberg Date: Tue Mar 28 10:52:20 2017 +0300 ACPI / property: Add support for remote endpoints DT has had concept of remote endpoints for some time already. It makes possible to reference another firmware node through a property called remote-endpoint. This is already used by some subsystems like v4l2 for parsing hardware properties related to camera. This patch adds ACPI support for remote endpoints utilizing _DSD hierarchical data extensions. Signed-off-by: Mika Westerberg Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 138 ++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/acpi.h | 23 ++++++++ 2 files changed, 161 insertions(+) commit 21ea73f54c6d77f35381c79870160496c9e78b60 Author: Mika Westerberg Date: Tue Mar 28 10:52:19 2017 +0300 device property: Add fwnode_get_named_child_node() Since now we have means to enumerate all children of any fwnode even in ACPI we can implement fwnode_get_named_child_node(). This is similar than device_get_named_child_node() with the exception that it can be called to any fwnode handle. Make device_get_named_child_node() call directly this new function. This is useful in cases where we need to be able to find child nodes which are not direct descendants of the parent device. Signed-off-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 22 +++++++++++++++++----- include/linux/property.h | 2 ++ 2 files changed, 19 insertions(+), 5 deletions(-) commit 34055190b19d7c634caf738c8ca195cad06550cd Author: Mika Westerberg Date: Tue Mar 28 10:52:18 2017 +0300 ACPI / property: Add fwnode_get_next_child_node() The ACPI _DSD hierarchical data extension makes it possible to have hierarchies deeper than one level in similar way than DT allows. These "subsubnodes" have not been accessible because device property implementation only provides device_get_next_child_node() that is limited to direct descendants of a device. We need this ability in order support things like remote endpoints currently supported in DT with of_graph_* APIs. Modify acpi_get_next_subnode() to accept fwnode handle instead and update callers accordingly. Also add a new function fwnode_get_next_child_node() that works directly with fwnodes and modify device_get_next_child_node() to call it directly. While there add a macro fwnode_for_each_child_node() analogous to the current device_for_each_child_node() but it works with fwnodes instead of devices. Link: http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.pdf Signed-off-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 27 +++++++++++++++++---------- drivers/base/property.c | 38 ++++++++++++++++++++++++++++++-------- include/linux/acpi.h | 8 ++++---- include/linux/property.h | 6 ++++++ 4 files changed, 57 insertions(+), 22 deletions(-) commit afaf26fd8458be29949ae5a52c65a464a1b0cbb6 Author: Mika Westerberg Date: Tue Mar 28 10:52:17 2017 +0300 device property: Add fwnode_get_parent() Now that ACPI has support for returning parent firmware node for both types of nodes we can expose this to others as well. This adds a new function fwnode_get_parent() that can be used for DT and ACPI nodes to retrieve the parent firmware node. Signed-off-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 25 +++++++++++++++++++++++++ include/linux/property.h | 2 ++ 2 files changed, 27 insertions(+) commit dfa672fbc0d9e83ff0dc1a75f1f5d0e59a30706b Author: Mika Westerberg Date: Tue Mar 28 10:52:16 2017 +0300 ACPI / property: Add possiblity to retrieve parent firmware node Sometimes it is useful to be able to navigate firmware node hierarchy upwards toward parent nodes. ACPI device nodes are pretty much already supported because ACPICA provides acpi_get_parent(). ACPI data nodes, however, are all below the same parent ACPI device. Their hierarchy is created by "linking" each other using references in the value field. Add parent pointer to the parent data node while we create them so it is easy to navigate the hierarchy backwards. We use this parent pointer in a new function acpi_node_get_parent() that is able to extract parent of both ACPI firmware node types. Signed-off-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 72 ++++++++++++++++++++++++++++++++++++++----------- include/acpi/acpi_bus.h | 1 + include/linux/acpi.h | 7 +++++ 3 files changed, 65 insertions(+), 15 deletions(-) commit 7fc6b87a9ff537e7df32b1278118ce9c5bcd6788 Author: Tahsin Erdogan Date: Thu Mar 9 00:05:31 2017 -0800 blkcg: allocate struct blkcg_gq outside request queue spinlock blkg_conf_prep() currently calls blkg_lookup_create() while holding request queue spinlock. This means allocating memory for struct blkcg_gq has to be made non-blocking. This causes occasional -ENOMEM failures in call paths like below: pcpu_alloc+0x68f/0x710 __alloc_percpu_gfp+0xd/0x10 __percpu_counter_init+0x55/0xc0 cfq_pd_alloc+0x3b2/0x4e0 blkg_alloc+0x187/0x230 blkg_create+0x489/0x670 blkg_lookup_create+0x9a/0x230 blkg_conf_prep+0x1fb/0x240 __cfqg_set_weight_device.isra.105+0x5c/0x180 cfq_set_weight_on_dfl+0x69/0xc0 cgroup_file_write+0x39/0x1c0 kernfs_fop_write+0x13f/0x1d0 __vfs_write+0x23/0x120 vfs_write+0xc2/0x1f0 SyS_write+0x44/0xb0 entry_SYSCALL_64_fastpath+0x18/0xad In the code path above, percpu allocator cannot call vmalloc() due to queue spinlock. A failure in this call path gives grief to tools which are trying to configure io weights. We see occasional failures happen shortly after reboots even when system is not under any memory pressure. Machines with a lot of cpus are more vulnerable to this condition. Update blkg_create() function to temporarily drop the rcu and queue locks when it is allowed by gfp mask. Suggested-by: Tejun Heo Signed-off-by: Tahsin Erdogan Acked-by: Tejun Heo Signed-off-by: Jens Axboe block/blk-cgroup.c | 138 ++++++++++++++++++++++++++++----------------- include/linux/blk-cgroup.h | 6 +- 2 files changed, 91 insertions(+), 53 deletions(-) commit 005c5db8fd7b2c9fc0b8055fa824ecaa7b15d1bf Author: Darrick J. Wong Date: Tue Mar 28 14:51:10 2017 -0700 xfs: rework the inline directory verifiers The inline directory verifiers should be called on the inode fork data, which means after iformat_local on the read side, and prior to ifork_flush on the write side. This makes the fork verifier more consistent with the way buffer verifiers work -- i.e. they will operate on the memory buffer that the code will be reading and writing directly. Furthermore, revise the verifier function to return -EFSCORRUPTED so that we don't flood the logs with corruption messages and assert notices. This has been a particular problem with xfs/348, which triggers the XFS_WANT_CORRUPTED_RETURN assertions, which halts the kernel when CONFIG_XFS_DEBUG=y. Disk corruption isn't supposed to do that, at least not in a verifier. Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong --- v2: get the inode d_ops the proper way v3: describe the bug that this patch fixes; no code changes fs/xfs/libxfs/xfs_dir2_priv.h | 3 +- fs/xfs/libxfs/xfs_dir2_sf.c | 63 +++++++++++++++++++++++++++--------------- fs/xfs/libxfs/xfs_inode_fork.c | 35 +++++++++-------------- fs/xfs/libxfs/xfs_inode_fork.h | 2 +- fs/xfs/xfs_inode.c | 19 +++++++------ 5 files changed, 66 insertions(+), 56 deletions(-) commit 806766915051b43b783cc5621a6ea3a1e5e84aee Author: Jonathan Neuschäfer Date: Tue Mar 7 03:22:01 2017 +0100 ARM: qcom_defconfig: Enable Qualcomm remoteproc and related drivers An adsp-pil node is present in at least the MSM8974 SoC. Simply enable all Qualcomm remoteproc drivers to avoid more work in the future. The SMP2P driver is required for adsp-pil to initialize correctly. Enable the SMSM driver at Bjorn Andersson's request: "We also need CONFIG_QCOM_SMSM=y here, its currently used to signal state of the ring buffers for WiFi." CONFIG_QCOM_WCNSS_CTRL is required to load firmware/configuration data into the WCNSS core, which handles WiFi and Bluetooth. Signed-off-by: Jonathan Neuschäfer Acked-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/configs/qcom_defconfig | 7 +++++++ 1 file changed, 7 insertions(+) commit b02aabe8ab9757a7dd5aa50e201a6d970f7e7a2f Author: Rafael J. Wysocki Date: Tue Mar 28 00:24:26 2017 +0200 cpufreq: intel_pstate: Eliminate intel_pstate_get_min_max() Some computations in intel_pstate_get_min_max() are not necessary and one of its two callers doesn't even use the full result. First off, the fixed-point value of cpu->max_perf represents a non-negative number between 0 and 1 inclusive and cpu->min_perf cannot be greater than cpu->max_perf. It is not necessary to check those conditions every time the numbers in question are used. Moreover, since intel_pstate_max_within_limits() only needs the upper boundary, it doesn't make sense to compute the lower one in there and returning min and max from intel_pstate_get_min_max() via pointers doesn't look particularly nice. For the above reasons, drop intel_pstate_get_min_max(), add a helper to get the base P-state for min/max computations and carry out them directly in the previous callers of intel_pstate_get_min_max(). Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 40 ++++++++++++++-------------------------- 1 file changed, 14 insertions(+), 26 deletions(-) commit 2bfc4cbb5fd3848669f1b95fea793f63d8e77fa0 Author: Rafael J. Wysocki Date: Tue Mar 28 00:22:16 2017 +0200 cpufreq: intel_pstate: Do not walk policy->cpus intel_pstate_hwp_set() is the only function walking policy->cpus in intel_pstate. The rest of the code simply assumes one CPU per policy, including the initialization code. Therefore it doesn't make sense for intel_pstate_hwp_set() to walk policy->cpus as it is guaranteed to have only one bit set for policy->cpu. For this reason, rearrange intel_pstate_hwp_set() to take the CPU number as the argument and drop the loop over policy->cpus from it. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 124 ++++++++++++++++++++--------------------- 1 file changed, 60 insertions(+), 64 deletions(-) commit 8ca6ce37014e5a9b127fc076448eb95e2b366d05 Author: Rafael J. Wysocki Date: Tue Mar 28 00:20:13 2017 +0200 cpufreq: intel_pstate: Introduce pid_in_use() Add a new function pid_in_use() to return the information on whether or not the PID-based P-state selection algorithm is in use. That allows a couple of complicated conditions in the code to be reduced to simple checks against the new function's return value. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 2f49afc2a6f6ec4bacb2e50d5482ecc111b41ab5 Author: Rafael J. Wysocki Date: Tue Mar 28 00:19:03 2017 +0200 cpufreq: intel_pstate: Drop struct cpu_defaults The cpu_defaults structure is redundant, because it only contains one member of type struct pstate_funcs which can be used directly instead of struct cpu_defaults. For this reason, drop struct cpu_defaults, use struct pstate_funcs directly instead of it where applicable and rename all of the variables of that type accordingly. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 154 ++++++++++++++++++----------------------- 1 file changed, 67 insertions(+), 87 deletions(-) commit de4a76cb585da13f8b0c9f2161ed6fcf5f2379fc Author: Rafael J. Wysocki Date: Tue Mar 28 00:18:02 2017 +0200 cpufreq: intel_pstate: Move cpu_defaults definitions Move the definitions of the cpu_defaults structures after the definitions of utilization update callback routines to avoid extra declarations of the latter. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 129 ++++++++++++++++++++--------------------- 1 file changed, 62 insertions(+), 67 deletions(-) commit 67dd9bf4416305811d58280dbe108d78ab573d56 Author: Rafael J. Wysocki Date: Tue Mar 28 00:17:10 2017 +0200 cpufreq: intel_pstate: Add update_util callback to pstate_funcs Avoid using extra function pointers during P-state selection by dropping the get_target_pstate member from struct pstate_funcs, adding a new update_util callback to it (to be registered with the CPU scheduler as the utilization update callback in the active mode) and reworking the utilization update callback routines to invoke specific P-state selection functions directly. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 81 ++++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 38 deletions(-) commit eabd22c657f1d23c714f536b859a22a0f22ac7f5 Author: Rafael J. Wysocki Date: Tue Mar 28 00:15:37 2017 +0200 cpufreq: intel_pstate: Use different utilization update callbacks Notice that some overhead in the utilization update callbacks registered by intel_pstate in the active mode can be avoided if those callbacks are tailored to specific configurations of the driver. For example, the utilization update callback for the HWP enabled case only needs to update the average CPU performance periodically whereas the utilization update callback for the PID-based algorithm does not need to take IO-wait boosting into account and so on. With that in mind, define three utilization update callbacks for three different use cases: HWP enabled, the CPU load "powersave" P-state selection algorithm and the PID-based "powersave" P-state selection algorithm and modify the driver initialization to choose the callback matching its current configuration. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 79 +++++++++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 25 deletions(-) commit 0042b2c0692ade097ef3a6bbffa491da5dc89273 Author: Rafael J. Wysocki Date: Tue Mar 28 00:14:08 2017 +0200 cpufreq: intel_pstate: Modify check in intel_pstate_update_status() One of the checks in intel_pstate_update_status() implicitly relies on the information that there are only two struct cpufreq_driver objects available, but it is better to do it directly against the value it really is about (to make the code easier to follow if nothing else). Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee8df89a68f27a7484f1fc71d3d69149dd4dd267 Author: Rafael J. Wysocki Date: Tue Mar 28 00:13:00 2017 +0200 cpufreq: intel_pstate: Drop driver_registered variable The driver_registered variable in intel_pstate is used for checking whether or not the driver has been registered, but intel_pstate_driver can be used for that too (with the rule that the driver is not registered as long as it is NULL). That is a bit more straightforward and the code may be simplified a bit this way, so modify the driver accordingly. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 46 +++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 27 deletions(-) commit 694cb173475a048a05daebf27cc8fdb7865c158b Author: Rafael J. Wysocki Date: Tue Mar 28 00:11:53 2017 +0200 cpufreq: intel_pstate: Skip unnecessary PID resets on init PID controller parameters only need to be initialized if the get_target_pstate_use_performance() P-state selection routine is going to be used. It is not necessary to initialize them otherwise, so don't do that. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7aec5b50e97dd3e2e6ad8a87ccfd62ba8f49a105 Author: Rafael J. Wysocki Date: Tue Mar 28 00:10:47 2017 +0200 cpufreq: intel_pstate: Set HWP sampling interval once In the HWP enabled case pid_params.sample_rate_ns only needs to be updated once, because it is global, so do that when setting hwp_active instead of doing it during the initialization of every CPU. Moreover, pid_params.sample_rate_ms is never used if HWP is enabled, so do not update it at all then. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ff35f02ea1e3ac4e774f2784c1444fba4cf8e16a Author: Rafael J. Wysocki Date: Tue Mar 28 00:09:18 2017 +0200 cpufreq: intel_pstate: Clean up intel_pstate_busy_pid_reset() intel_pstate_busy_pid_reset() is the only caller of pid_reset(), pid_p_gain_set(), pid_i_gain_set(), and pid_d_gain_set(). Moreover, it passes constants as two parameters of pid_reset() and all of the other routines above essentially contain the same code, so fold all of them into the caller and drop unnecessary computations. Introduce percent_fp() for converting integer values in percent to fixed-point fractions and use it in the above code cleanup. Finally, rename intel_pstate_busy_pid_reset() to intel_pstate_pid_reset() as it also is used for the initialization of PID parameters for every CPU and the meaning of the "busy" part of the name is not particularly clear. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 46 +++++++++++++++--------------------------- 1 file changed, 16 insertions(+), 30 deletions(-) commit 4ddd0146c790e647a05ee5c734b82cb40ef26296 Author: Rafael J. Wysocki Date: Tue Mar 28 00:07:15 2017 +0200 cpufreq: intel_pstate: Fold intel_pstate_reset_all_pid() into the caller There is only one caller of intel_pstate_reset_all_pid(), which is pid_param_set() used in the debugfs interface only, and having that code split does not make it particularly convenient to follow. For this reason, move the body of intel_pstate_reset_all_pid() into its caller and drop that function. Also change the loop from for_each_online_cpu() (which is obviously racy with respect to CPU offline/online) to for_each_possible_cpu(), so that all PID parameters are reset for all CPUs regardless of their online/offline status (to prevent, for example, a previously offline CPU from going online with a stale set of PID parameters). Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 5c43905369bb85fd518363e743b68e2407d83f7c Author: Rafael J. Wysocki Date: Tue Mar 28 00:05:44 2017 +0200 cpufreq: intel_pstate: Initialize pid_params statically Notice that both the existing struct cpu_defaults instances in which PID parameters are actually initialized use the same values of those parameters, so it is not really necessary to copy them over to pid_params dynamically. Instead, initialize pid_params statically with those values and drop the unused pid_policy member from struct cpu_defaults along with copy_pid_params() used for initializing it. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 42 ++++++++++-------------------------------- 1 file changed, 10 insertions(+), 32 deletions(-) commit 6404367862bb25730e373cb9d443757b76f6abcc Author: Rafael J. Wysocki Date: Tue Mar 28 00:04:30 2017 +0200 cpufreq: intel_pstate: Drop pointless initialization of PID parameters The P-state selection algorithm used by intel_pstate for Atom processors is not based on the PID controller and the initialization of PID parametrs for those processors is pointless and confusing, so drop it. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) commit e14cf8857ebd7486a4e30fa7dad06ba187e6cb04 Author: Rafael J. Wysocki Date: Tue Mar 28 00:03:20 2017 +0200 cpufreq: intel_pstate: Eliminate struct perf_limits After recent changes the purpose of struct perf_limits is not particularly clear any more and the code may be made somewhat easier to follow by eliminating it, so go for that. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 59 ++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 36 deletions(-) commit f0e6876606a54c28c2e03a223d9d51f30718f24a Author: Arnd Bergmann Date: Tue Mar 14 22:24:48 2017 +0100 ARM: OMAP2+: mark omap_init_rng as __init I found this section mismatch when building with an older compiler release: WARNING: vmlinux.o(.text+0x3051c): Section mismatch in reference from the function omap_init_rng() to the function .init.text:omap_device_build() Obviously this one function should be __init as well. Normally we don't get a warning as the function gets inlined into its caller. Signed-off-by: Arnd Bergmann [tony@atomide.com: formatted error message a bit] Signed-off-by: Tony Lindgren arch/arm/mach-omap2/devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49e9e6163c4e960781840cd5ab65cfa13e8d8acf Author: Kevin Hilman Date: Tue Mar 14 12:14:12 2017 +0100 ARM: OMAP2+: dm81xx: Add clkdm and hwmod for SATA Add the SATA clockdomain (part of CM_DEFAULT) and a hwmod for the SATA block on dm81xx. Tested on DM8168 EVM. Signed-off-by: Kevin Hilman [Bartosz: removed an unused define] Signed-off-by: Bartosz Golaszewski Signed-off-by: Tony Lindgren arch/arm/mach-omap2/clockdomains81xx_data.c | 10 +++++++++ arch/arm/mach-omap2/cm81xx.h | 1 + arch/arm/mach-omap2/omap_hwmod_81xx_data.c | 34 +++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) commit e2d54fe76997301b49311bde7ba8ef52b47896f9 Author: Roger Quadros Date: Mon Mar 13 13:53:16 2017 +0200 ARM: DRA7: hwmod_data: Prevent wait_target_disable error for usb_otg_ss It seems that if L3_INIT clkdomain is kept in HW_AUTO while usb_otg_ss is in use then there are random chances that the usb_otg_ss module will fail to completely idle. i.e. IDLEST = 0x2 instead of 0x3. Preventing L3_INIT from HW_AUTO while usb_otg_ss module is in use fixes this issue. We don't know yet if usb_otg_ss instances 3 and 4 are affected by this issue or not so don't add this flag for those instances. Cc: Tero Kristo Signed-off-by: Roger Quadros Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 2 ++ 1 file changed, 2 insertions(+) commit a2416238368839a25be0daa6c591b5102240975b Author: Roger Quadros Date: Mon Mar 13 13:53:15 2017 +0200 ARM: DRA7: hwmod: Fix DCAN1 stuck in transition Add HWMOD_CLKDM_NOAUTO flag to DCAN1 module. Without this DCAN1 module remains stuck in transition after the CAN interface is brought down. This is also suggested in Errata i893 "DCAN Initialization Sequence". Add the HWMOD_CLKDM_NOAUTO to DCAN2 module as well as it is mentioned in Errata i893. Signed-off-by: Roger Quadros Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 2 ++ 1 file changed, 2 insertions(+) commit 8b0c441e15a3e7877da4bb11fe15cf8359fd96b2 Author: Omar Sandoval Date: Mon Mar 27 23:28:47 2017 -0700 jsflash: stop sharing request queue across multiple gendisks Compile-tested only (by hacking it to compile on x86). Cc: David S. Miller Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe drivers/sbus/char/jsflash.c | 50 ++++++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 14 deletions(-) commit 103db8b2dfa5dad182d2e5a9cc96b13646634c17 Author: Omar Sandoval Date: Mon Mar 27 23:28:46 2017 -0700 swim: stop sharing request queue across multiple gendisks Compile-tested only (by hacking it to compile on x86). Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe drivers/block/swim.c | 55 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 19 deletions(-) commit 3a644142e8a8e0cc89c111e4c7a9b829453ca3ac Author: Omar Sandoval Date: Mon Mar 27 23:28:45 2017 -0700 parport/pf: stop sharing request queue across multiple gendisks Compile-tested only. Cc: Tim Waugh Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe drivers/block/paride/pf.c | 57 +++++++++++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 19 deletions(-) commit 547b50a1fbc176834c6ab96e49239429896abf88 Author: Omar Sandoval Date: Mon Mar 27 23:28:44 2017 -0700 parport/pcd: stop sharing request queue across multiple gendisks Compile-tested only. Cc: Tim Waugh Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe drivers/block/paride/pcd.c | 57 ++++++++++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 19 deletions(-) commit eaf487ca30c50798c9b34cadd5c58b813ddf3d98 Author: Omar Sandoval Date: Mon Mar 27 23:28:43 2017 -0700 parport/pd: stop sharing request queue across multiple gendisks Compile-tested only. Cc: Tim Waugh Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe drivers/block/paride/pd.c | 50 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 16 deletions(-) commit a893cd76bb2d3606e106f490d38d7f3cc686f359 Author: Omar Sandoval Date: Mon Mar 27 23:28:42 2017 -0700 hd: stop sharing request queue across multiple gendisks Compile-tested only. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe drivers/block/hd.c | 62 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 23 deletions(-) commit b182cc4d597a6e73ff04ee1b7fb4f1a28f56ae3d Author: Stanimir Varbanov Date: Tue Mar 14 11:18:04 2017 -0400 firmware: qcom_scm: add two scm calls for iommu secure page table Those two new SCM calls are needed from qcom-iommu driver in order to initialize secure iommu page table. Signed-off-by: Stanimir Varbanov Signed-off-by: Rob Clark Signed-off-by: Andy Gross drivers/firmware/qcom_scm-32.c | 12 ++++++++++++ drivers/firmware/qcom_scm-64.c | 42 ++++++++++++++++++++++++++++++++++++++++++ drivers/firmware/qcom_scm.c | 12 ++++++++++++ drivers/firmware/qcom_scm.h | 6 ++++++ include/linux/qcom_scm.h | 4 ++++ 5 files changed, 76 insertions(+) commit a2c680c6ce386e9ca6cdf362e8b01789126c9bf7 Author: Rob Clark Date: Tue Mar 14 11:18:03 2017 -0400 firmware/qcom: add qcom_scm_restore_sec_cfg() Signed-off-by: Rob Clark Signed-off-by: Andy Gross drivers/firmware/qcom_scm-32.c | 6 ++++++ drivers/firmware/qcom_scm-64.c | 16 ++++++++++++++++ drivers/firmware/qcom_scm.c | 6 ++++++ drivers/firmware/qcom_scm.h | 5 +++++ include/linux/qcom_scm.h | 2 ++ 5 files changed, 35 insertions(+) commit da72e4936445e1081e1223fc58470644da8e8cdb Merge: 21339f5 26bfad6 Author: Tony Lindgren Date: Tue Mar 28 14:00:55 2017 -0700 Merge branch 'omap-for-v4.12/dt-droid4-v2' into omap-for-v4.12/dt-v2 commit 9db9559cfaa3ed91cf6deec3b7e22a62c92d63bf Author: Georgi Djakov Date: Thu Mar 16 14:55:09 2017 +0200 ARM: dts: qcom: msm8974: Add RPMCC DT node Add the RPM Clock Controller DT node for msm8974-based platforms, so that drivers can use the clocks provided by the RPM processor. Signed-off-by: Georgi Djakov Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 3869fd6a76bf5e16862d092cfb11440f286e6cd1 Author: Linus Walleij Date: Wed Mar 15 10:17:02 2017 +0100 ARM: dts: fix typo on APQ8060 Dragonboard The DTS referred to SDC5 when it meant SDC1. Acked-by: Bjorn Andersson Signed-off-by: Linus Walleij Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8060-dragonboard.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dfc1401026f05c3cab963260ad17f3dbc8549b50 Author: Linus Walleij Date: Wed Mar 15 10:16:49 2017 +0100 ARM: dts: add SDC2 and SDC4 to the MSM8660 family To make the picture complete, add DTS entries also for the second and fourth MMC/SD blocks on the MSM8660. SDC2 is an 8-bit interface and SDC4 is a 4-bit interface. Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8660.dtsi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 4d931755fe6d215598c35076a31e58a660fbbcfb Author: Jonathan Neuschäfer Date: Tue Mar 7 03:22:00 2017 +0100 ARM: dts: msm8974: Hook up adsp-pil's xo clock Without this patch (and with CONFIG_QCOM_ADSP_PIL), I get this error: [ 0.711529] qcom_adsp_pil adsp-pil: failed to get xo clock [ 0.711540] remoteproc remoteproc0: releasing adsp-pil With this patch, adsp-pil can initialize correctly. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 1e20223d8e247c3001f2c4612cf617636908bd13 Author: Ivan T. Ivanov Date: Fri Feb 3 20:36:28 2017 +0200 ARM: dts: qcom: Add msm8974 CoreSight components Add initial set of CoreSight components found on Qualcomm msm8974 and apq8074 based platforms, including the APQ8074 Dragonboard board. Signed-off-by: Ivan T. Ivanov Signed-off-by: Georgi Djakov Reviewed-by: Mathieu Poirier Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974.dtsi | 280 +++++++++++++++++++++++++++++++++++- 1 file changed, 276 insertions(+), 4 deletions(-) commit 90621b8044bc410773ea92629fc09948b5df85a6 Author: Bjorn Andersson Date: Mon Jan 30 08:44:59 2017 -0800 arm64: dts: qcom: msm8916: Update hexagon node It's necessary to reference the xo clock and cx supply, so specify these in the node. Also move the Hexagon smd-edge into the hexagon node, to enable SSR. As cxo is not yet available we reference the fixed version of cxo for now, which will work until proper power management is implemented. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 3f1802f888b75c220d87fb69a5d6681599c0ccf8 Author: avaneesh dwivedi Date: Mon Jan 30 20:33:09 2017 +0530 arm64: dts: msm8996: Add SLPI SMP2P dt node. Add smp2p support to communicate with slpi processor. Signed-off-by: Avaneesh Kumar Dwivedi Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8996.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 8bfa6eae5ac853ad0e5008c2dcf1f460a8f575dc Author: Stephen Boyd Date: Tue Jan 17 11:47:55 2017 -0800 arm64: dts: qcom: Replace PMU compatible with a53 specific one The PMU on msm8916 is for the cortex-a53 type CPU. Update the compatible to the more specific one so we can get the a53 specific events out of the PMU. Signed-off-by: Stephen Boyd Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2940f36a8ff4d7710913f4780d65cc5fa8e8aec Author: Bjorn Andersson Date: Fri Nov 18 12:06:49 2016 -0800 arm64: dts: qcom: msm8996: Fixup smp2p node The SMEM state property name changes between the integration branch and mainline, update to use the correct one. Fixes: 2f45d9fcd531 ("arm64: dts: msm8996: Add SMP2P and APCS nodes") Signed-off-by: Bjorn Andersson Reviewed-by: Sarangdhar Joshi Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1aad8dcc49382399f48541dc47b6e30b0ef1b62 Author: Al Viro Date: Tue Mar 28 01:02:40 2017 -0400 asm-generic: zero in __get_user(), not __get_user_fn() Signed-off-by: Al Viro include/asm-generic/uaccess.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 3fb50075284433093eba7c43e75b16eaa36eeabd Author: Al Viro Date: Tue Mar 28 00:51:43 2017 -0400 asm-generic/uaccess.h: don't mess with __copy_{to,from}_user only h8300 actually used those; might as well define them there. Signed-off-by: Al Viro arch/c6x/include/asm/uaccess.h | 3 -- arch/h8300/include/asm/Kbuild | 1 - arch/h8300/include/asm/uaccess.h | 52 +++++++++++++++++++++++++++++ arch/um/include/asm/uaccess.h | 2 -- arch/unicore32/include/asm/uaccess.h | 2 -- include/asm-generic/uaccess.h | 63 ------------------------------------ 6 files changed, 52 insertions(+), 71 deletions(-) commit db68ce10c4f0a27c1ff9fa0e789e5c41f8c4ea63 Author: Al Viro Date: Mon Mar 20 21:08:07 2017 -0400 new helper: uaccess_kernel() Signed-off-by: Al Viro arch/alpha/include/asm/uaccess.h | 2 +- arch/arc/include/asm/uaccess.h | 2 +- arch/arm/include/asm/uaccess.h | 2 +- arch/arm/lib/uaccess_with_memcpy.c | 4 ++-- arch/blackfin/kernel/process.c | 2 +- arch/c6x/kernel/sys_c6x.c | 2 +- arch/cris/include/asm/uaccess.h | 2 +- arch/m68k/include/asm/uaccess_mm.h | 2 +- arch/metag/include/asm/uaccess.h | 2 +- arch/mips/include/asm/checksum.h | 4 ++-- arch/mips/include/asm/r4kcache.h | 4 ++-- arch/mips/include/asm/uaccess.h | 2 +- arch/mips/kernel/unaligned.c | 10 +++++----- arch/openrisc/include/asm/uaccess.h | 2 +- arch/parisc/include/asm/futex.h | 2 +- arch/parisc/lib/memcpy.c | 2 +- arch/s390/include/asm/uaccess.h | 2 +- arch/sparc/include/asm/uaccess.h | 2 +- arch/sparc/include/asm/uaccess_32.h | 2 +- arch/um/include/asm/uaccess.h | 2 +- arch/um/kernel/skas/uaccess.c | 10 +++++----- arch/unicore32/include/asm/uaccess.h | 2 +- arch/unicore32/kernel/process.c | 2 +- arch/xtensa/include/asm/uaccess.h | 2 +- block/bsg.c | 2 +- drivers/scsi/sg.c | 2 +- include/linux/uaccess.h | 2 ++ include/rdma/ib.h | 2 +- kernel/trace/bpf_trace.c | 2 +- lib/iov_iter.c | 2 +- mm/memory.c | 2 +- security/tomoyo/network.c | 2 +- 32 files changed, 44 insertions(+), 42 deletions(-) commit 7301f269dd214a42deac9a2c3a07a63d1bfb1e12 Author: Sjoerd Simons Date: Fri Mar 17 14:51:17 2017 +0100 ARM: dts: rockchip: Enable sata support on rock2 square The Rock 2 square board has a USB -> SATA converter hooked up to its usb host1 connection. Enable the usb controller and always turn on the power on the 5V sata power connector (controlled by gpio). Signed-off-by: Sjoerd Simons Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-rock2-square.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit e631bf9caac5d735bccdbe02f6084a02e148e9cb Merge: f4363d8 4f9ab0c Author: Jacek Anaszewski Date: Tue Mar 28 21:24:02 2017 +0200 Merge tag 'ib-mfd-leds-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into for-next Immutable branch between MFD and LEDS due for the v4.12 merge window * tag 'ib-mfd-leds-v4.12': mfd: cpcap: Add missing include dependencies commit c1dfcfad5879df7f41c436d887aea509dadd516d Author: Jin Yao Date: Thu Mar 9 16:06:26 2017 +0800 perf report: Drop cycles 0 for LBR print For some platforms, for example Broadwell, it doesn't support cycles for LBR. But the perf always prints cycles:0, it's not necessary. The patch refactors the LBR info print code and drops the cycles:0. For example: perf report --branch-history --no-children --stdio On Broadwell: --0.91%--__random_r random_r.c:394 (iterations:2) __random_r random_r.c:360 (predicted:0.0%) __random_r random_r.c:380 (predicted:0.0%) __random_r random_r.c:357 On Skylake: --1.07%--main div.c:39 (predicted:52.4% cycles:1 iterations:17) main div.c:44 (predicted:52.4% cycles:1) main div.c:42 (cycles:2) compute_flag div.c:28 (cycles:2) compute_flag div.c:27 (cycles:1) rand rand.c:28 (cycles:1) rand rand.c:28 (cycles:1) __random random.c:298 (cycles:1) __random random.c:297 (cycles:1) __random random.c:295 (cycles:1) __random random.c:295 (cycles:1) __random random.c:295 (cycles:1) Signed-off-by: Yao Jin Reviewed-by: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Link: http://lkml.kernel.org/r/1489046786-10061-1-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/callchain.c | 111 +++++++++++++++++++++++++++++--------------- 1 file changed, 74 insertions(+), 37 deletions(-) commit 4605fff00b886657835a58ef3cf2377356029e55 Author: Alexey Klimov Date: Tue Mar 21 16:57:34 2017 +0000 mailbox: check ->last_tx_done for NULL in case of timer-based polling It is allowed by code to register mailbox controller that sets txdone_poll flag to request timer-based polling with missed ->last_tx_done() method. If such thing happens and since presence of last_tx_done() is not checked it will fail in hrtimer callback function txdone_hrtimer() when first message will be transmitted. This patch adds check for this method and logging of error on registration of mailbox controller if it requested timer-based polling. Signed-off-by: Alexey Klimov Acked-by: Sudeep Holla Signed-off-by: Jassi Brar drivers/mailbox/mailbox.c | 6 ++++++ 1 file changed, 6 insertions(+) commit dd32fae0722ddd1235342a4b0c00f91a14b2742c Author: Anup Patel Date: Wed Mar 15 12:10:01 2017 +0530 dt-bindings: Add DT bindings info for FlexRM ring manager This patch adds device tree bindings document for the FlexRM ring manager found on Broadcom iProc SoCs. Acked-by: Rob Herring Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Anup Patel Signed-off-by: Jassi Brar .../bindings/mailbox/brcm,iproc-flexrm-mbox.txt | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit dbc049eee73004db996cc8f63754f8dd5f86d0f7 Author: Anup Patel Date: Wed Mar 15 12:10:00 2017 +0530 mailbox: Add driver for Broadcom FlexRM ring manager Some of the Broadcom iProc SoCs have FlexRM ring manager which provides a ring-based programming interface to various offload engines (e.g. RAID, Crypto, etc). This patch adds a common mailbox driver for Broadcom FlexRM ring manager which can be shared by various offload engine drivers (implemented as mailbox clients). Reviewed-by: Ray Jui Reviewed-by: Scott Branden Reviewed-by: Pramod KUMAR Signed-off-by: Anup Patel Signed-off-by: Jassi Brar drivers/mailbox/Kconfig | 11 + drivers/mailbox/Makefile | 2 + drivers/mailbox/bcm-flexrm-mailbox.c | 1595 ++++++++++++++++++++++++++++++++++ include/linux/mailbox/brcm-message.h | 14 +- 4 files changed, 1618 insertions(+), 4 deletions(-) commit 52e2dadd2b70269e5368acbae18cca8294c89316 Author: Steve Lin Date: Thu Feb 23 09:49:52 2017 -0500 dt-bindings: mailbox: Update doc with NSP PDC/mailbox support Update the DT bindings documentation to reflect the new NSP version of PDC driver compatibility string. Signed-off-by: Steve Lin Acked-by: Jon Mason Acked-by: Rob Herring Signed-off-by: Jassi Brar Documentation/devicetree/bindings/mailbox/brcm,iproc-pdc-mbox.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fc2041c5415fbbe8a7f1f6ce73a5d4ad186c7827 Author: Steve Lin Date: Thu Feb 23 09:49:50 2017 -0500 mailbox: bcm-pdc: Add Northstar Plus support to PDC driver Adds support for Northstar Plus (NS+) products to the PDC mailbox driver. The PDC driver was originally written to support the PDC ring manager in the Northstar2 (64-bit) device. The NS+ (32 bit device) uses an almost identical ring manager, though with a different name. We just need to check for the type of hardware in use, in order to write the appropriate interrupt configuration register. Also updated DMA width to be correct for both NS+ and NS2. Tested on NS+ and NS2. Signed-off-by: Steve Lin Acked-by: Jon Mason Signed-off-by: Jassi Brar drivers/mailbox/Kconfig | 9 +++--- drivers/mailbox/bcm-pdc-mailbox.c | 61 +++++++++++++++++++++++++++++---------- 2 files changed, 50 insertions(+), 20 deletions(-) commit 8ce33c6ff375b59bfa0a347782c49da94e64bb85 Author: Bhumika Goyal Date: Thu Jan 5 13:00:43 2017 +0530 mailbox: constify mbox_chan_ops structures Check for mbox_chan_ops structures that are only stored in the ops field of a mbox_controller structure. This field is of type const struct mbox_chan_ops *, so mbox_chan_ops structures having this property can be declared as const. Done using Coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ struct mbox_chan_ops i@p = {...}; @ok1@ identifier r1.i; struct hi6220_mbox mbox; struct slimpro_mbox ctx; position p; @@ ( mbox.controller.ops=&i@p | ctx.mb_ctrl.ops=&i@p ) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct mbox_chan_ops i; File size details: text data bss dec hex filename 2310 248 0 2558 9fe drivers/mailbox/hi6220-mailbox.o 2366 192 0 2558 9fe drivers/mailbox/hi6220-mailbox.o 1500 248 0 1748 6d4 mailbox/mailbox-xgene-slimpro.o 1556 192 0 1748 6d4 mailbox/mailbox-xgene-slimpro.o Signed-off-by: Bhumika Goyal Signed-off-by: Jassi Brar drivers/mailbox/hi6220-mailbox.c | 2 +- drivers/mailbox/mailbox-xgene-slimpro.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 23ade398c7c2809d031fe1d83ada11b3c08d73b4 Author: Masahiro Yamada Date: Tue Mar 28 17:40:08 2017 +0900 reset: uniphier: add NAND and eMMC reset control Add reset lines for the Denali NAND controller on all UniPhier SoCs, for the Cadence eMMC controller on LD11/LD20 SoCs. Signed-off-by: Masahiro Yamada Signed-off-by: Philipp Zabel drivers/reset/reset-uniphier.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 2b87965a1e6b6051435315d3f04627a5dbad979c Author: Steven Rostedt (VMware) Date: Tue Mar 28 09:58:21 2017 -0400 ftrace/x86: Do no run CPU sync when there is only one CPU online Moving enabling of function tracing to early boot, even before scheduling is enabled, means that it is not safe to enable interrupts. When function tracing was enabled at boot up, it use to happen after scheduling and the other CPUs were brought up. That required running a sync across all CPUs when modifying the function hook locations in the code. To do the synchronization, interrupts had to be enabled. Now function tracing can be started before the other CPUs are brought up, and enabling interrupts in that case is dangerous. As only tho boot CPU is active, there is no reason to run the synchronization. If the online CPU count is one, do not bother doing the synchronization. This removes the need to enable interrupts. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Signed-off-by: Steven Rostedt (VMware) arch/x86/kernel/ftrace.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit e8bb4673596ea28fab287dbc417e8100d798cd40 Author: Marek Szyprowski Date: Mon Mar 27 07:31:03 2017 +0200 dmaengine: pl330: remove pdata based initialization This driver is now used only on platforms which support device tree, so it is safe to remove legacy platform data based initialization code. Signed-off-by: Marek Szyprowski Reviewed-by: Ulf Hansson Acked-by: Arnd Bergmann For plat-samsung: Acked-by: Krzysztof Kozlowski Signed-off-by: Vinod Koul arch/arm/plat-samsung/devs.c | 1 - drivers/dma/pl330.c | 42 ++++++++---------------------------------- include/linux/amba/pl330.h | 35 ----------------------------------- 3 files changed, 8 insertions(+), 70 deletions(-) commit 21339f57e8ad8abc7923f91085e9d89eb5879725 Author: Yegor Yefremov Date: Tue Mar 28 15:09:16 2017 +0200 ARM: dts: am335x-baltos: add LED support All three devices provide GPIO based LEDs named power, wlan and app. Place LEDs definition into a separate dtsi file as not all devices including am335x-baltos.dtsi have the same LED layout. Signed-off-by: Yegor Yefremov Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-baltos-ir2110.dts | 1 + arch/arm/boot/dts/am335x-baltos-ir3220.dts | 1 + arch/arm/boot/dts/am335x-baltos-ir5221.dts | 1 + arch/arm/boot/dts/am335x-baltos-leds.dtsi | 50 ++++++++++++++++++++++++++++++ 4 files changed, 53 insertions(+) commit 26bfad63ca896fde674918e36a8b8fd7039a0119 Author: Tony Lindgren Date: Mon Mar 27 17:40:20 2017 -0700 ARM: dts: omap4-droid4: Fix MMC1 card for detect GPIO and regulator There's a typo, it should be GPIO176 and not GPIO106. And it seems I messed up the regulators at some point while trying to figure out what devices the regulators are used. The correct regulator for MMC1 is vwlan2. Fixes: 0d4cb3ccee58 ("ARM: dts: Configure regulators for droid 4") Reported-by: Sebastian Reichel Reviewed-by: Sebastian Reichel Tested-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 2 +- arch/arm/boot/dts/omap4-droid4-xt894.dts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 8fc04e6ea02d631fd344f462002078b8067793de Author: Ming Lei Date: Tue Mar 28 16:17:55 2017 +0800 md: raid1: kill warning on powerpc_pseries This patch kills the warning reported on powerpc_pseries, and actually we don't need the initialization. After merging the md tree, today's linux-next build (powerpc pseries_le_defconfig) produced this warning: drivers/md/raid1.c: In function 'raid1d': drivers/md/raid1.c:2172:9: warning: 'page_len$' may be used uninitialized in this function [-Wmaybe-uninitialized] if (memcmp(page_address(ppages[j]), ^ drivers/md/raid1.c:2160:7: note: 'page_len$' was declared here int page_len[RESYNC_PAGES]; ^ Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/raid1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc44abd6aad22411f7f9890e39fd4753dabf0d03 Author: James Hogan Date: Tue Mar 14 17:00:08 2017 +0000 KVM: MIPS/Emulate: Properly implement TLBR for T&E Properly implement emulation of the TLBR instruction for Trap & Emulate. This instruction reads the TLB entry pointed at by the CP0_Index register into the other TLB registers, which may have the side effect of changing the current ASID. Therefore abstract the CP0_EntryHi and ASID changing code into a common function in the process. A comment indicated that Linux doesn't use TLBR, which is true during normal use, however dumping of the TLB does use it (for example with the relatively recent 'x' magic sysrq key), as does a wired TLB entries test case in my KVM tests. Signed-off-by: James Hogan Acked-by: Ralf Baechle Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/emulate.c | 99 ++++++++++++++++++++++++++----------------------- 1 file changed, 53 insertions(+), 46 deletions(-) commit d451a205da29c5485ca634367154e83997571aa0 Author: Ravi Bangoria Date: Tue Mar 28 15:17:53 2017 +0530 perf/sdt/x86: Move OP parser to tools/perf/arch/x86/ SDT marker argument is in N@OP format. N is the size of argument and OP is the actual assembly operand. OP is arch dependent component and hence it's parsing logic also should be placed under tools/perf/arch/. Signed-off-by: Ravi Bangoria Acked-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Alexis Berlemont Cc: Hemant Kumar Cc: Michael Ellerman Cc: Naveen N. Rao Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170328094754.3156-3-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/perf_regs.c | 179 ++++++++++++++++++++++++++++------- tools/perf/util/perf_regs.c | 6 +- tools/perf/util/perf_regs.h | 11 ++- tools/perf/util/probe-file.c | 132 ++++++++------------------ 4 files changed, 194 insertions(+), 134 deletions(-) commit 2d01ecc580405169ecd6e3880617bc61cf482fdd Author: Ravi Bangoria Date: Tue Mar 28 15:17:52 2017 +0530 perf/sdt/x86: Add renaming logic for (missing) 8 bit registers I found couple of events using al, bl, cl and dl registers for argument. These are not directly accepted by uprobe_events and thus needs to be mapped to ax, bx, cx and dx respectively. Few ex, /usr/bin/qemu-system-s390x css_adapter_interrupt: 1@%bl css_chpid_add: 1@%cl 1@%sil 1@%dl dma_bdrv_io: 8@%rbx 8@%rbp -8@%r14 1@%al /usr/bin/postgres buffer__read__done: ... -1@-bash -1@%al buffer__read__start: ... -1@%al I don't find any sdt events using ah, bh,... registers. But I also don't see any reason to not use them, so there might be rare events using these registers, and if so, perf should have a renaming logic for them too. Signed-off-by: Ravi Bangoria Acked-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Alexis Berlemont Cc: Hemant Kumar Cc: Michael Ellerman Cc: Naveen N. Rao Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170328094754.3156-2-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/perf_regs.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9a86cda07af2c63649932f0a4fc757701ef54c42 Author: Jani Nikula Date: Mon Mar 27 14:33:25 2017 +0300 drm/i915/dp: reduce link M/N parameters Several major vendor USB-C->HDMI converters, in particular the DA200, fail to recover a 5.4 GHz 1 lane signal if the link N is greater than 0x80000. The link M and N depend on the pixel clock and link clock ratio. With current code link N exceeds 0x80000 only when link clock >= 540000 kHz. Except for the eDP intermediate link clocks, at least the four least significant bits are always zero. Just one bit shift right would be enough to bring even the DP 1.4 810000 kHz link clock under 0x80000 link N. The pixel clock for modes that require a link clock >= 540000 kHz would also have several least significant bits zero. Unless the user provides a mode with an odd pixel clock value, we can reduce the numbers to reach the goal, with no loss in precision. The DP spec even mentions sources making choices that "allow for static and relatively small Mvid and Nvid values", thus reducing the link M/N regardless of the sink in question seems justified. Everything here is based on the work and information gathered by Clint Taylor . This is just an iteration to reduce the parameters regardless of lane count, link rate, or sink. Reference: http://patchwork.freedesktop.org/patch/msgid/1490225256-11667-1-git-send-email-clinton.a.taylor@intel.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93578 Tested-by: Mads Tested-by: PJ Tested-by: François Guerraz Tested-by: Lev Popov Tested-by: Igor Krivenko Tested-by: Clint Taylor Reviewed-by: Clint Taylor Reviewed-by: Dhinakaran Pandiyan Acked-by: Daniel Vetter Cc: Clint Taylor Cc: Anusha Srivatsa Cc: Ville Syrjälä Cc: Daniel Vetter Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1490614405-23337-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_display.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 9503062d65f5636f41a5d59714f7a5c6844702ae Author: jbrunet Date: Sun Mar 26 19:19:23 2017 +0200 ARM64: dts: meson-gxl: add spdif output pins Add EE and AO domains pins for the spdif output to the gxl device tree. Acked-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit c16fe9a1c7a38cde4e5d98527e0047f23ba4fd0b Author: jbrunet Date: Sun Mar 26 19:19:22 2017 +0200 ARM64: dts: meson-gxl: add i2s output pins Add EE and AO domains pins for the i2s output clocks and data the gxl device tree Acked-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 62 ++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit 07a4652f0e92ecb3f9e6901523a8937800d3d067 Author: jbrunet Date: Sun Mar 26 19:19:21 2017 +0200 ARM64: dts: meson-gxbb: add spdif output pins Add EE and AO domains pins for the spdif output to the gxbb device tree. Acked-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 552b1e56d95285b75add602d3c84b18a85b5ad9c Author: jbrunet Date: Sun Mar 26 19:19:20 2017 +0200 ARM64: dts: meson-gxbb: add i2s output pins Add EE and AO domains pins for the i2s output clocks and data to the gxbb device tree. Acked-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 63 +++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit 090e5fe3f0115ff0bcb299bb90cfd8cb82f5cbf8 Author: Chris Wilson Date: Tue Mar 28 14:14:07 2017 +0100 drm/i915: Take rpm wakelock around debugfs/i915_gpu_info Capturing GPU state requires the device to be awake in order to read registers. Normally, this is taken along the error handler, but for the direct debugfs access, we cannot make assumptions about the current device state and so either need to wake it up, or abort. Fixes: 5a4c6f1b1b2d ("drm/i915: The return of i915_gpu_info to debugfs") Testcase: igt/pm_rpm/debugfs-read Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170328131407.14863-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_debugfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1db3b92cb24cf738a7edbe13ee2f21905adf0c6b Author: Neil Armstrong Date: Thu Mar 23 17:27:29 2017 +0100 ARM64: dts: meson-gxbb: Add USB Hub GPIO hog The ODroid-C2 on-board USB Hub needs to to have it's reset signal set to high level in order to be enumerated by the USB Host Controller. But this management must be part of the currently in-development Generic Power Sequence patch that will allow a USB Controller driver to start and stop a power sequence associated to the USB Bus. In the meantime, a simple USB Hog will work to enable the USB Hub. Signed-off-by: Neil Armstrong Reviewed-by: Linus Walleij Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 8d1b908fe7540a90837e0d08c09fcf2f5e268f00 Author: Neil Armstrong Date: Thu Mar 23 17:27:27 2017 +0100 ARM: dts: meson8b: Add gpio-ranges properties Signed-off-by: Neil Armstrong Reviewed-by: Linus Walleij Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 90f349ade2f1786d9f30b581343d543db4f6d38d Author: Neil Armstrong Date: Thu Mar 23 17:27:26 2017 +0100 ARM: dts: meson8: Add gpio-ranges properties Signed-off-by: Neil Armstrong Reviewed-by: Linus Walleij Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 84412e4e857f24c26682f1d7f8fd505e52fa9e33 Author: Neil Armstrong Date: Thu Mar 23 17:27:25 2017 +0100 ARM64: dts: meson-gxl: Add gpio-ranges properties Signed-off-by: Neil Armstrong Reviewed-by: Linus Walleij Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 18ae17bc513b4dfb6791512e27a3ede02a6324db Author: Neil Armstrong Date: Thu Mar 23 17:27:24 2017 +0100 ARM64: dts: meson-gxbb: Add gpio-ranges properties Signed-off-by: Neil Armstrong Reviewed-by: Linus Walleij Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit b8402b957d6792f80282fa76e9932ff77a6f0554 Author: Heiko Carstens Date: Mon Mar 27 15:36:20 2017 +0200 s390: make MAX_PHYSMEM_BITS configurable Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 10 ++++++++++ arch/s390/include/asm/sparsemem.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) commit fd15a1f333ff5c55be8d3d94ac4c609afe2fd79f Author: Heiko Carstens Date: Mon Mar 27 12:28:25 2017 +0200 s390: enable ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT Deferred struct page initialization works on s390. However it makes only sense for the fake numa case, since the kthreads that initialize struct pages are started per node. Without fake numa there is just a single node and therefore no gain. However there is no reason to not enable this feature. Therefore select the config option and enable the feature in all config files. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 1 + arch/s390/configs/default_defconfig | 1 + arch/s390/configs/gcov_defconfig | 1 + arch/s390/configs/performance_defconfig | 1 + 4 files changed, 4 insertions(+) commit b8f982803490920544c988bf6ec313028677851f Author: Christian Borntraeger Date: Wed Mar 22 12:36:07 2017 +0100 s390/MAINTAINERS: add gmap.c to kvm maintainers gmap.c deals mostly with KVM-related memory management, so a lot of changes to this file will come via the KVM tree. Reflect this in MAINTAINERS. Please note that there are intricate ties to arch/s390/mm/pgtable.c. If changes are needed in both files, this will continue to be submitted via the s390 tree (or a topic branch if necessary). Signed-off-by: Christian Borntraeger Acked-by: Cornelia Huck Signed-off-by: Martin Schwidefsky MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit dcc00b79fc3d076832f7240de8870f492629b171 Author: Michael Holzheu Date: Thu Mar 23 21:02:54 2017 +0100 s390/kdump: Add final note Since linux v3.14 with commit 38dfac843cb6d7be1 ("vmcore: prevent PT_NOTE p_memsz overflow during header update") on s390 we get the following message in the kdump kernel: Warning: Exceeded p_memsz, dropping PT_NOTE entry n_namesz=0x6b6b6b6b, n_descsz=0x6b6b6b6b The reason for this is that we don't create a final zero note in the ELF header which the proc/vmcore code uses to find out the end of the notes section (see also kernel/kexec_core.c:final_note()). It still worked on s390 by chance because we (most of the time?) have the byte pattern 0x6b6b6b6b after the notes section which also makes the notes parsing code stop in update_note_header_size_elf64() because 0x6b6b6b6b is interpreded as note size: if ((real_sz + sz) > max_sz) { pr_warn("Warning: Exceeded p_memsz, dropping P ...); break; } So fix this and add the missing final note to the ELF header. We don't have to adjust the memory size for ELF header ("alloc_size") because the new ELF note still fits into the 0x1000 base memory. Cc: stable@vger.kernel.org # v4.4+ Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky arch/s390/kernel/crash_dump.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 59cea29a34eb6f5fe0e44e0766a1797dd73f40a1 Author: Heiko Carstens Date: Mon Mar 27 08:01:29 2017 +0200 s390: remove HAVE_ARCH_EARLY_PFN_TO_NID select statement HAVE_ARCH_EARLY_PFN_TO_NID selects a not present Kconfig option. Therefore remove it. Given that the first call of early_pfn_to_nid() happens after numa_setup() finished to establish the memory to node mapping, there is no need to implement an architecture private version of __early_pfn_to_nid() like (only) ia64 does. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 1 - 1 file changed, 1 deletion(-) commit ab24fbd35a6ee77a58c24bd50582c51610a194f0 Author: Stefan Haberland Date: Wed Mar 22 11:06:20 2017 +0100 s390/dasd: suppress command reject error for query host access command On some z/VM systems the query host access command is not supported for temp disks, though the corresponding feature code is set. This does not have any impact beside that the information is not available. Suppress the full blown command reject error messages to not confuse the user. The error is still logged in the s390dbf. Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_3990_erp.c | 5 +++-- drivers/s390/block/dasd_eckd.c | 12 +++++++++--- drivers/s390/block/dasd_int.h | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) commit ccd53fa2261c2676258fe523d9201099f4d5ebc1 Author: Stefan Haberland Date: Wed Mar 22 10:30:40 2017 +0100 s390/dasd: check if query host access feature is supported Some storage servers might not support the query host access feature. Check if the corresponding feature code is set. Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_eckd.c | 4 ++++ 1 file changed, 4 insertions(+) commit 57ef579878c3a9a168ce071a78982216338ba500 Author: Neil Armstrong Date: Wed Mar 22 11:18:55 2017 +0100 ARM64: dts: meson-gx: Add Mali nodes for GXBB and GXL The same Mali-450 MP3 GPU is present in the GXBB and GXL SoCs. The node is simply added in the meson-gxbb.dtsi file. For GXL, since a lot is shared with the GXM that has a Mali-T820 IP, this patch adds a new meson-gxl-mali.dtsi and is included in the SoC specific dtsi files. Signed-off-by: Neil Armstrong [khilman: s/MALI/Mali in changelog] Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 37 ++++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxl-mali.dtsi | 43 ++++++++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxl-s905d.dtsi | 1 + arch/arm64/boot/dts/amlogic/meson-gxl-s905x.dtsi | 1 + 4 files changed, 82 insertions(+) commit 5d3fa803b11bbd300526da864ec8c0fa1e5470b5 Author: Geert Uytterhoeven Date: Sun Mar 12 14:16:59 2017 +0100 MAINTAINERS: Add file patterns for perf device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Will Deacon MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 0ae3abcda2dc5fe0130e3261da8a89489fff3e0e Author: James Hogan Date: Tue Mar 14 10:25:51 2017 +0000 MIPS: Allow KVM to be enabled on Octeon CPUs Octeon III has VZ ASE support, so allow KVM to be enabled on Octeon CPUs as it should now be functional. Signed-off-by: James Hogan Cc: Ralf Baechle Cc: David Daney Cc: Andreas Herrmann Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 1f48f9be4df2fd82e3bea0c4d452299c9b3df792 Author: James Hogan Date: Tue Mar 14 10:25:50 2017 +0000 KVM: MIPS/VZ: Handle Octeon III guest.PRid register Octeon III implements a read-only guest CP0_PRid register, so add cases to the KVM register access API for Octeon to ensure the correct value is read and writes are ignored. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: David Daney Cc: Andreas Herrmann Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/mipsregs.h | 2 ++ arch/mips/kvm/vz.c | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) commit 3ba731daf09a2dd9515713e2428ef859bb50957b Author: James Hogan Date: Tue Mar 14 10:25:49 2017 +0000 KVM: MIPS/VZ: Emulate hit CACHE ops for Octeon III Octeon III doesn't implement the optional GuestCtl0.CG bit to allow guest mode to execute virtual address based CACHE instructions, so implement emulation of a few important ones specifically for Octeon III in response to a GPSI exception. Currently the main reason to perform these operations is for icache synchronisation, so they are implemented as a simple icache flush with local_flush_icache_range(). Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: David Daney Cc: Andreas Herrmann Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/vz.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 824533ad169f8bafcafba385a428e5b680928411 Author: James Hogan Date: Tue Mar 14 10:25:48 2017 +0000 KVM: MIPS/VZ: VZ hardware setup for Octeon III Set up hardware virtualisation on Octeon III cores, configuring guest interrupt routing and carving out half of the root TLB for guest use, restoring it back again afterwards. We need to be careful to inhibit TLB shutdown machine check exceptions while invalidating guest TLB entries, since TLB invalidation is not available so guest entries must be invalidated by setting them to unique unmapped addresses, which could conflict with mappings set by the guest or root if recently repartitioned. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: David Daney Cc: Andreas Herrmann Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/tlb.c | 16 +++++++ arch/mips/kvm/vz.c | 120 ++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 108 insertions(+), 28 deletions(-) commit 867f4da75277aaef10daa4e0e9ad6f905fa33fb1 Author: James Hogan Date: Tue Mar 14 10:25:47 2017 +0000 KVM: MIPS/T&E: Report correct dcache line size Octeon CPUs don't report the correct dcache line size in CP0_Config1.DL, so encode the correct value for the guest CP0_Config1.DL based on cpu_dcache_line_size(). Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: David Daney Cc: Andreas Herrmann Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/trap_emul.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1c506c9c104cf01d01a9633ad2e76f15f938c54c Author: James Hogan Date: Tue Mar 14 10:25:46 2017 +0000 KVM: MIPS/TLB: Handle virtually tagged icaches When TLB entries are invalidated in the presence of a virtually tagged icache, such as that found on Octeon CPUs, flush the icache so that we don't get a reserved instruction exception even though the TLB mapping is removed. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: David Daney Cc: Andreas Herrmann Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/tlb.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 4fa9de5a645a9770679032a7eea0604f9a36eaf3 Author: James Hogan Date: Tue Mar 14 10:25:45 2017 +0000 KVM: MIPS/Emulate: Adapt T&E CACHE emulation for Octeon Cache management is implemented separately for Cavium Octeon CPUs, so r4k_blast_[id]cache aren't available. Instead for Octeon perform a local icache flush using local_flush_icache_range(), and for other platforms which don't use c-r4k.c use __flush_cache_all() / flush_icache_all(). Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: David Daney Cc: Andreas Herrmann Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/emulate.c | 30 +++++++++++++++++++++++++++--- arch/mips/mm/cache.c | 1 + 2 files changed, 28 insertions(+), 3 deletions(-) commit 7d8a528d19815e57566d1e2277f9535e43f4cb68 Author: James Hogan Date: Tue Mar 14 10:25:44 2017 +0000 MIPS: Add Octeon III register accessors & definitions Add accessors for some VZ related Cavium Octeon III specific COP0 registers, along with field definitions. These will mostly be used by KVM to set up interrupt routing and partition the TLB between root and guest. Signed-off-by: James Hogan Acked-by: Ralf Baechle Cc: David Daney Cc: Andreas Herrmann Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/mipsregs.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit f147140c7f0350d363c10aeb51b78b65b2425266 Author: Wei Yongjun Date: Sun Feb 5 16:32:55 2017 +0000 ARM: hisi: fix error return code in hip04_smp_init() Fix to return error code -ENODEV from the of_find_compatible_node() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Wei Xu arch/arm/mach-hisi/platmcpm.c | 2 ++ 1 file changed, 2 insertions(+) commit c68677014bace6a4b6ad20f0818e1470d049618f Author: Arnaldo Carvalho de Melo Date: Tue Mar 28 11:19:59 2017 -0300 perf tools: Remove support for command aliases This came from 'git', but isn't documented anywhere in tools/perf/Documentation/, looks like baggage we can do without, ditch it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-e7uwkn60t4hmlnwj99ba4t2s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-help.c | 13 ----- tools/perf/perf.c | 97 +++----------------------------------- tools/perf/util/Build | 1 - tools/perf/util/alias.c | 78 ------------------------------ tools/perf/util/cache.h | 1 - tools/perf/util/help-unknown-cmd.c | 8 +--- 6 files changed, 8 insertions(+), 190 deletions(-) commit 4f6cce39105e63587e53361bb670786b52d533ae Author: SeongJae Park Date: Mon Mar 27 21:44:06 2017 +0900 Fix dead URLs to ftp.kernel.org URLs to ftp.kernel.org are still exist though the service is closed [0]. This commit fixes the URLs to use www.kernel.org instead. [0] https://www.kernel.org/shutting-down-ftp-services.html Signed-off-by: SeongJae Park Signed-off-by: Jiri Kosina MAINTAINERS | 2 +- drivers/block/Kconfig | 2 +- drivers/md/Kconfig | 2 +- fs/autofs4/Kconfig | 2 +- scripts/ksymoops/README | 5 ++--- scripts/package/builddeb | 4 ++-- 6 files changed, 8 insertions(+), 9 deletions(-) commit 53696b8d212f4a0f0e5dcdb3df64558dcdf03d1a Author: Shaohua Li Date: Mon Mar 27 15:19:43 2017 -0700 blk-throttle: add latency target support One hard problem adding .low limit is to detect idle cgroup. If one cgroup doesn't dispatch enough IO against its low limit, we must have a mechanism to determine if other cgroups dispatch more IO. We added the think time detection mechanism before, but it doesn't work for all workloads. Here we add a latency based approach. We already have mechanism to calculate latency threshold for each IO size. For every IO dispatched from a cgorup, we compare its latency against its threshold and record the info. If most IO latency is below threshold (in the code I use 75%), the cgroup could be treated idle and other cgroups can dispatch more IO. Currently this latency target check is only for SSD as we can't calcualte the latency target for hard disk. And this is only for cgroup leaf node so far. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-throttle.c | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) commit b9147dd1bae2b15d6931ecd42f8606c775fecbc9 Author: Shaohua Li Date: Mon Mar 27 15:19:42 2017 -0700 blk-throttle: add a mechanism to estimate IO latency User configures latency target, but the latency threshold for each request size isn't fixed. For a SSD, the IO latency highly depends on request size. To calculate latency threshold, we sample some data, eg, average latency for request size 4k, 8k, 16k, 32k .. 1M. The latency threshold of each request size will be the sample latency (I'll call it base latency) plus latency target. For example, the base latency for request size 4k is 80us and user configures latency target 60us. The 4k latency threshold will be 80 + 60 = 140us. To sample data, we calculate the order base 2 of rounded up IO sectors. If the IO size is bigger than 1M, it will be accounted as 1M. Since the calculation does round up, the base latency will be slightly smaller than actual value. Also if there isn't any IO dispatched for a specific IO size, we will use the base latency of smaller IO size for this IO size. But we shouldn't sample data at any time. The base latency is supposed to be latency where disk isn't congested, because we use latency threshold to schedule IOs between cgroups. If disk is congested, the latency is higher, using it for scheduling is meaningless. Hence we only do the sampling when block throttling is in the LOW limit, with assumption disk isn't congested in such state. If the assumption isn't true, eg, low limit is too high, calculated latency threshold will be higher. Hard disk is completely different. Latency depends on spindle seek instead of request size. Currently this feature is SSD only, we probably can use a fixed threshold like 4ms for hard disk though. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-stat.c | 15 ++++- block/blk-stat.h | 3 + block/blk-throttle.c | 166 ++++++++++++++++++++++++++++++++++++++++++++-- block/blk.h | 2 + include/linux/blk_types.h | 9 +-- 5 files changed, 185 insertions(+), 10 deletions(-) commit 88eeca495ba7de749ff253376ec6be19bb05368d Author: Shaohua Li Date: Mon Mar 27 15:19:41 2017 -0700 block: track request size in blk_issue_stat Currently there is no way to know the request size when the request is finished. Next patch will need this info. We could add extra field to record the size, but blk_issue_stat has enough space to record it, so this patch just overloads blk_issue_stat. With this, we will have 49bits to track time, which still is very long time. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-core.c | 2 +- block/blk-mq.c | 2 +- block/blk-stat.h | 41 ++++++++++++++++++++++++++++++----------- block/blk-wbt.h | 10 +++++----- include/linux/blk_types.h | 2 +- 5 files changed, 38 insertions(+), 19 deletions(-) commit ec80991d6fc2cb17abfc5427ac1512d2ccd40589 Author: Shaohua Li Date: Mon Mar 27 10:51:44 2017 -0700 blk-throttle: add interface for per-cgroup target latency Here we introduce per-cgroup latency target. The target determines how a cgroup can afford latency increasement. We will use the target latency to calculate a threshold and use it to schedule IO for cgroups. If a cgroup's bandwidth is below its low limit but its average latency is below the threshold, other cgroups can safely dispatch more IO even their bandwidth is higher than their low limits. On the other hand, if the first cgroup's latency is higher than the threshold, other cgroups are throttled to their low limits. So the target latency determines how we efficiently utilize free disk resource without sacifice of worload's IO latency. For example, assume 4k IO average latency is 50us when disk isn't congested. A cgroup sets the target latency to 30us. Then the cgroup can accept 50+30=80us IO latency. If the cgroupt's average IO latency is 90us and its bandwidth is below low limit, other cgroups are throttled to their low limit. If the cgroup's average IO latency is 60us, other cgroups are allowed to dispatch more IO. When other cgroups dispatch more IO, the first cgroup's IO latency will increase. If it increases to 81us, we then throttle other cgroups. User will configure the interface in this way: echo "8:16 rbps=2097152 wbps=max latency=100 idle=200" > io.low latency is in microsecond unit By default, latency target is 0, which means to guarantee IO latency. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-throttle.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) commit fa6fb5aab85f3e2d9cf017ec516a8c234402a7cd Author: Shaohua Li Date: Mon Mar 27 10:51:43 2017 -0700 blk-throttle: ignore idle cgroup limit Last patch introduces a way to detect idle cgroup. We use it to make upgrade/downgrade decision. And the new algorithm can detect completely idle cgroup too, so we can delete the corresponding code. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-throttle.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) commit ada75b6e5b2a939401d4919dfaf2f2fc9484f68a Author: Shaohua Li Date: Mon Mar 27 10:51:42 2017 -0700 blk-throttle: add interface to configure idle time threshold Add interface to configure the threshold. The io.low interface will like: echo "8:16 rbps=2097152 wbps=max idle=2000" > io.low idle is in microsecond unit. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-throttle.c | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) commit 9e234eeafbe17e85908584392f249f0b329b8e1b Author: Shaohua Li Date: Mon Mar 27 10:51:41 2017 -0700 blk-throttle: add a simple idle detection A cgroup gets assigned a low limit, but the cgroup could never dispatch enough IO to cross the low limit. In such case, the queue state machine will remain in LIMIT_LOW state and all other cgroups will be throttled according to low limit. This is unfair for other cgroups. We should treat the cgroup idle and upgrade the state machine to lower state. We also have a downgrade logic. If the state machine upgrades because of cgroup idle (real idle), the state machine will downgrade soon as the cgroup is below its low limit. This isn't what we want. A more complicated case is cgroup isn't idle when queue is in LIMIT_LOW. But when queue gets upgraded to lower state, other cgroups could dispatch more IO and this cgroup can't dispatch enough IO, so the cgroup is below its low limit and looks like idle (fake idle). In this case, the queue should downgrade soon. The key to determine if we should do downgrade is to detect if cgroup is truely idle. Unfortunately it's very hard to determine if a cgroup is real idle. This patch uses the 'think time check' idea from CFQ for the purpose. Please note, the idea doesn't work for all workloads. For example, a workload with io depth 8 has disk utilization 100%, hence think time is 0, eg, not idle. But the workload can run higher bandwidth with io depth 16. Compared to io depth 16, the io depth 8 workload is idle. We use the idea to roughly determine if a cgroup is idle. We treat a cgroup idle if its think time is above a threshold (by default 1ms for SSD and 100ms for HD). The idea is think time above the threshold will start to harm performance. HD is much slower so a longer think time is ok. The patch (and the latter patches) uses 'unsigned long' to track time. We convert 'ns' to 'us' with 'ns >> 10'. This is fast but loses precision, should not a big deal. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/bio.c | 2 ++ block/blk-throttle.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++- block/blk.h | 3 ++ include/linux/blk_types.h | 3 ++ 4 files changed, 89 insertions(+), 1 deletion(-) commit 7394e31fa440ab7cd20cebd233580b360a7e9ecc Author: Shaohua Li Date: Mon Mar 27 10:51:40 2017 -0700 blk-throttle: make bandwidth change smooth When cgroups all reach low limit, cgroups can dispatch more IO. This could make some cgroups dispatch more IO but others not, and even some cgroups could dispatch less IO than their low limit. For example, cg1 low limit 10MB/s, cg2 limit 80MB/s, assume disk maximum bandwidth is 120M/s for the workload. Their bps could something like this: cg1/cg2 bps: T1: 10/80 -> T2: 60/60 -> T3: 10/80 At T1, all cgroups reach low limit, so they can dispatch more IO later. Then cg1 dispatch more IO and cg2 has no room to dispatch enough IO. At T2, cg2 only dispatches 60M/s. Since We detect cg2 dispatches less IO than its low limit 80M/s, we downgrade the queue from LIMIT_MAX to LIMIT_LOW, then all cgroups are throttled to their low limit (T3). cg2 will have bandwidth below its low limit at most time. The big problem here is we don't know the maximum bandwidth of the workload, so we can't make smart decision to avoid the situation. This patch makes cgroup bandwidth change smooth. After disk upgrades from LIMIT_LOW to LIMIT_MAX, we don't allow cgroups use all bandwidth upto their max limit immediately. Their bandwidth limit will be increased gradually to avoid above situation. So above example will became something like: cg1/cg2 bps: 10/80 -> 15/105 -> 20/100 -> 25/95 -> 30/90 -> 35/85 -> 40/80 -> 45/75 -> 22/98 In this way cgroups bandwidth will be above their limit in majority time, this still doesn't fully utilize disk bandwidth, but that's something we pay for sharing. Scale up is linear. The limit scales up 1/2 .low limit every throtl_slice after upgrade. The scale up will stop if the adjusted limit hits .max limit. Scale down is exponential. We cut the scale value half if a cgroup doesn't hit its .low limit. If the scale becomes 0, we then fully downgrade the queue to LIMIT_LOW state. Note this doesn't completely avoid cgroup running under its low limit. The best way to guarantee cgroup doesn't run under its limit is to set max limit. For example, if we set cg1 max limit to 40, cg2 will never run under its low limit. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-throttle.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 3 deletions(-) commit aec242468cb84b8eea7130c10530a69d2b352bff Author: Shaohua Li Date: Mon Mar 27 10:51:39 2017 -0700 blk-throttle: detect completed idle cgroup cgroup could be assigned a limit, but doesn't dispatch enough IO, eg the cgroup is idle. When this happens, the cgroup doesn't hit its limit, so we can't move the state machine to higher level and all cgroups will be throttled to their lower limit, so we waste bandwidth. Detecting idle cgroup is hard. This patch handles a simple case, a cgroup doesn't dispatch any IO. We ignore such cgroup's limit, so other cgroups can use the bandwidth. Please note this will be replaced with a more sophisticated algorithm later, but this demonstrates the idea how we handle idle cgroups, so I leave it here. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-throttle.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit d61fcfa4bb18992dc8e171996808e1034dc643bb Author: Shaohua Li Date: Mon Mar 27 10:51:38 2017 -0700 blk-throttle: choose a small throtl_slice for SSD The throtl_slice is 100ms by default. This is a long time for SSD, a lot of IO can run. To make cgroups have smoother throughput, we choose a small value (20ms) for SSD. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-sysfs.c | 2 ++ block/blk-throttle.c | 23 ++++++++++++++++++++--- block/blk.h | 2 ++ 3 files changed, 24 insertions(+), 3 deletions(-) commit 297e3d854784821d3b8ff3ae117f20d71f125504 Author: Shaohua Li Date: Mon Mar 27 10:51:37 2017 -0700 blk-throttle: make throtl_slice tunable throtl_slice is important for blk-throttling. It's called slice internally but it really is a time window blk-throttling samples data. blk-throttling will make decision based on the samplings. An example is bandwidth measurement. A cgroup's bandwidth is measured in the time interval of throtl_slice. A small throtl_slice meanse cgroups have smoother throughput but burn more CPUs. It has 100ms default value, which is not appropriate for all disks. A fast SSD can dispatch a lot of IOs in 100ms. This patch makes it tunable. Since throtl_slice isn't a time slice, the sysfs name 'throttle_sample_time' reflects its character better. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe Documentation/block/queue-sysfs.txt | 6 +++ block/blk-sysfs.c | 11 ++++++ block/blk-throttle.c | 79 ++++++++++++++++++++++++++----------- block/blk.h | 5 +++ 4 files changed, 79 insertions(+), 22 deletions(-) commit 06cceedcca67a93ac7f7aa93bbd9980c7496d14e Author: Shaohua Li Date: Mon Mar 27 10:51:36 2017 -0700 blk-throttle: make sure expire time isn't too big cgroup could be throttled to a limit but when all cgroups cross high limit, queue enters a higher state and so the group should be throttled to a higher limit. It's possible the cgroup is sleeping because of throttle and other cgroups don't dispatch IO any more. In this case, nobody can trigger current downgrade/upgrade logic. To fix this issue, we could either set up a timer to wakeup the cgroup if other cgroups are idle or make sure this cgroup doesn't sleep too long. Setting up a timer means we must change the timer very frequently. This patch chooses the latter. Making cgroup sleep time not too big wouldn't change cgroup bps/iops, but could make it wakeup more frequently, which isn't a big issue because throtl_slice * 8 is already quite big. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-throttle.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 3f0abd806651df546f426f23490fec997dc87e5b Author: Shaohua Li Date: Mon Mar 27 10:51:35 2017 -0700 blk-throttle: add downgrade logic When queue state machine is in LIMIT_MAX state, but a cgroup is below its low limit for some time, the queue should be downgraded to lower state as one cgroup's low limit isn't met. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-throttle.c | 156 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) commit c79892c5576163b3c7403b9d75cbe8dcae65e428 Author: Shaohua Li Date: Mon Mar 27 10:51:34 2017 -0700 blk-throttle: add upgrade logic for LIMIT_LOW state When queue is in LIMIT_LOW state and all cgroups with low limit cross the bps/iops limitation, we will upgrade queue's state to LIMIT_MAX. To determine if a cgroup exceeds its limitation, we check if the cgroup has pending request. Since cgroup is throttled according to the limit, pending request means the cgroup reaches the limit. If a cgroup has limit set for both read and write, we consider the combination of them for upgrade. The reason is read IO and write IO can interfere with each other. If we do the upgrade based in one direction IO, the other direction IO could be severly harmed. For a cgroup hierarchy, there are two cases. Children has lower low limit than parent. Parent's low limit is meaningless. If children's bps/iops cross low limit, we can upgrade queue state. The other case is children has higher low limit than parent. Children's low limit is meaningless. As long as parent's bps/iops (which is a sum of childrens bps/iops) cross low limit, we can upgrade queue state. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-throttle.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 96 insertions(+), 4 deletions(-) commit b22c417c885ea973149ecf56286aabec060153e2 Author: Shaohua Li Date: Mon Mar 27 10:51:33 2017 -0700 blk-throttle: configure bps/iops limit for cgroup in low limit each queue will have a state machine. Initially queue is in LIMIT_LOW state, which means all cgroups will be throttled according to their low limit. After all cgroups with low limit cross the limit, the queue state gets upgraded to LIMIT_MAX state. For max limit, cgroup will use the limit configured by user. For low limit, cgroup will use the minimal value between low limit and max limit configured by user. If the minimal value is 0, which means the cgroup doesn't configure low limit, we will use max limit to throttle the cgroup and the cgroup is ready to upgrade to LIMIT_MAX Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-throttle.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit cd5ab1b0fcb44ab5d00358edc9b0b2e2a966fb22 Author: Shaohua Li Date: Mon Mar 27 10:51:32 2017 -0700 blk-throttle: add .low interface Add low limit for cgroup and corresponding cgroup interface. To be consistent with memcg, we allow users configure .low limit higher than .max limit. But the internal logic always assumes .low limit is lower than .max limit. So we add extra bps/iops_conf fields in throtl_grp for userspace configuration. Old bps/iops fields in throtl_grp will be the actual limit we use for throttling. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-throttle.c | 144 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 116 insertions(+), 28 deletions(-) commit 327ffb9b37a9df80dad4fa176fbf0c0fb1ac4ac0 Author: Shaohua Li Date: Mon Mar 27 10:51:31 2017 -0700 blk-throttle: add configure option for new .low interface As discussed in LSF, add configure option for the interface and mark it as experimental, so people can try/test. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 9f626e372a602486fa319c2c6ab18e8068b30094 Author: Shaohua Li Date: Mon Mar 27 10:51:30 2017 -0700 blk-throttle: prepare support multiple limits We are going to support low/max limit, each cgroup will have 2 limits after that. This patch prepares for the multiple limits change. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-throttle.c | 110 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 70 insertions(+), 40 deletions(-) commit 2ab5492de5009aabb584fd910dd4c7c4de1bea1a Author: Shaohua Li Date: Mon Mar 27 10:51:29 2017 -0700 blk-throttle: use U64_MAX/UINT_MAX to replace -1 clean up the code to avoid using -1 Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-throttle.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit edec9d7bdc4eb3845ec7a3f9610f0d54a7152e90 Author: James Hogan Date: Tue Mar 14 10:15:40 2017 +0000 KVM: MIPS/VZ: Trace guest mode changes Create a trace event for guest mode changes, and enable VZ's GuestCtl0.MC bit after the trace event is enabled to trap all guest mode changes. The MC bit causes Guest Hardware Field Change (GHFC) exceptions whenever a guest mode change occurs (such as an exception entry or return from exception), so we need to handle this exception now. The MC bit is only enabled when restoring register state, so enabling the trace event won't take immediate effect. Tracing guest mode changes can be particularly handy when trying to work out what a guest OS gets up to before something goes wrong, especially if the problem occurs as a result of some previous guest userland exception which would otherwise be invisible in the trace. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Steven Rostedt Cc: Ingo Molnar Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/mips.c | 13 +++++++++++++ arch/mips/kvm/trace.h | 37 +++++++++++++++++++++++++++++++++++++ arch/mips/kvm/vz.c | 21 +++++++++++++++++++-- 3 files changed, 69 insertions(+), 2 deletions(-) commit f4474d50c7d483dd4432d5b0891b0bb9ad0eefc9 Author: James Hogan Date: Tue Mar 14 10:15:39 2017 +0000 KVM: MIPS/VZ: Support hardware guest timer Transfer timer state to the VZ guest context (CP0_GTOffset & guest CP0_Count) when entering guest mode, enabling direct guest access to it, and transfer back to soft timer when saving guest register state. This usually allows guest code to directly read CP0_Count (via MFC0 and RDHWR) and read/write CP0_Compare, without trapping to the hypervisor for it to emulate the guest timer. Writing to CP0_Count or CP0_Cause.DC is much less common and still triggers a hypervisor GPSI exception, in which case the timer state is transferred back to an hrtimer before emulating the write. We are careful to prevent small amounts of drift from building up due to undeterministic time intervals between reading of the ktime and reading of CP0_Count. Some drift is expected however, since the system clocksource may use a different timer to the local CP0_Count timer used by VZ. This is permitted to prevent guest CP0_Count from appearing to go backwards. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 14 +++ arch/mips/kvm/emulate.c | 81 +++++++++++++++- arch/mips/kvm/mips.c | 6 +- arch/mips/kvm/vz.c | 197 +++++++++++++++++++++++++++++++++++++-- 4 files changed, 287 insertions(+), 11 deletions(-) commit d42a008f86ba3d715d31788fc5143a4de5685d33 Author: James Hogan Date: Tue Mar 14 10:15:38 2017 +0000 KVM: MIPS/VZ: Emulate MAARs when necessary Add emulation of Memory Accessibility Attribute Registers (MAARs) when necessary. We can't actually do anything with whatever the guest provides, but it may not be possible to clear Guest.Config5.MRP so we have to emulate at least a pair of MAARs. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: Jonathan Corbet Cc: Steven Rostedt Cc: Ingo Molnar Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Cc: linux-doc@vger.kernel.org Documentation/virtual/kvm/api.txt | 5 ++ arch/mips/include/asm/kvm_host.h | 5 ++ arch/mips/include/uapi/asm/kvm.h | 20 +++++-- arch/mips/kvm/trace.h | 2 + arch/mips/kvm/vz.c | 110 +++++++++++++++++++++++++++++++++++++- 5 files changed, 137 insertions(+), 5 deletions(-) commit 273819a6a5ab493500c14889b161bf5bc2265736 Author: James Hogan Date: Tue Mar 14 10:15:37 2017 +0000 KVM: MIPS/VZ: Support guest load-linked bit When restoring guest state after another VCPU has run, be sure to clear CP0_LLAddr.LLB in order to break any interrupted atomic critical section. Without this SMP guest atomics don't work when LLB is present as one guest can complete the atomic section started by another guest. MIPS VZ guest read of CP0_LLAddr causes Guest Privileged Sensitive Instruction (GPSI) exception due to the address being root physical. Handle this by reporting only the LLB bit, which contains the bit for whether a ll/sc atomic is in progress without any reason for failure. Similarly on P5600 a guest write to CP0_LLAddr also causes a GPSI exception. Handle this also by clearing the guest LLB bit from root mode. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/vz.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 5a2f352f343ac9b4e869ff29b3a0a833c870303b Author: James Hogan Date: Tue Mar 14 10:15:36 2017 +0000 KVM: MIPS/VZ: Support guest hardware page table walker Add support for VZ guest CP0_PWBase, CP0_PWField, CP0_PWSize, and CP0_PWCtl registers for controlling the guest hardware page table walker (HTW) present on P5600 and P6600 cores. These guest registers need initialising on R6, context switching, and exposing via the KVM ioctl API when they are present. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: Jonathan Corbet Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Cc: linux-doc@vger.kernel.org Documentation/virtual/kvm/api.txt | 4 ++ arch/mips/include/asm/kvm_host.h | 8 ++++ arch/mips/kvm/vz.c | 80 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+) commit 4b7de028e66cc499ab85b5003af944225c8c87e9 Author: James Hogan Date: Tue Mar 14 10:15:35 2017 +0000 KVM: MIPS/VZ: Support guest segmentation control Add support for VZ guest CP0_SegCtl0, CP0_SegCtl1, and CP0_SegCtl2 registers, as found on P5600 and P6600 cores. These guest registers need initialising, context switching, and exposing via the KVM ioctl API when they are present. They also require the GVA -> GPA translation code for handling a GVA root exception to be updated to interpret the segmentation registers and decode the faulting instruction enough to detect EVA memory access instructions. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: Jonathan Corbet Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Cc: linux-doc@vger.kernel.org Documentation/virtual/kvm/api.txt | 3 + arch/mips/include/asm/kvm_host.h | 6 + arch/mips/kvm/vz.c | 242 +++++++++++++++++++++++++++++++++++++- 3 files changed, 250 insertions(+), 1 deletion(-) commit dffe042fd8b2cc174966b929b379503af2c97933 Author: James Hogan Date: Tue Mar 14 10:15:34 2017 +0000 KVM: MIPS/VZ: Support guest CP0_[X]ContextConfig Add support for VZ guest CP0_ContextConfig and CP0_XContextConfig (MIPS64 only) registers, as found on P5600 and P6600 cores. These guest registers need initialising, context switching, and exposing via the KVM ioctl API when they are present. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: Jonathan Corbet Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Cc: linux-doc@vger.kernel.org Documentation/virtual/kvm/api.txt | 2 ++ arch/mips/include/asm/kvm_host.h | 4 +++ arch/mips/kvm/vz.c | 62 +++++++++++++++++++++++++++++++++++++-- 3 files changed, 66 insertions(+), 2 deletions(-) commit edc89260d474fd044e77b7039bd2a697dddcac6c Author: James Hogan Date: Tue Mar 14 10:15:33 2017 +0000 KVM: MIPS/VZ: Support guest CP0_BadInstr[P] Add support for VZ guest CP0_BadInstr and CP0_BadInstrP registers, as found on most VZ capable cores. These guest registers need context switching, and exposing via the KVM ioctl API when they are present. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: Jonathan Corbet Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Cc: linux-doc@vger.kernel.org Documentation/virtual/kvm/api.txt | 2 ++ arch/mips/include/asm/kvm_host.h | 4 ++++ arch/mips/kvm/vz.c | 46 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) commit 56f7a4405047353684e0d083d7426594daa5e344 Author: James Hogan Date: Tue Mar 14 10:15:32 2017 +0000 KVM: MIPS: Add VZ support to build system Add support for the MIPS Virtualization (VZ) ASE to the MIPS KVM build system. For now KVM can only be configured for T&E or VZ and not both, but the design of the user facing APIs support the possibility of having both available, so this could change in future. Note that support for various optional guest features (some of which can't be turned off) are implemented in immediately following commits, so although it should now be possible to build VZ support, it may not work yet on your hardware. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/Kconfig | 27 +++++++++++++++++++++++++-- arch/mips/kvm/Makefile | 8 +++++++- 2 files changed, 32 insertions(+), 3 deletions(-) commit c992a4f6a9b0a37c8bd7dfc727ecc3fed125c16b Author: James Hogan Date: Tue Mar 14 10:15:31 2017 +0000 KVM: MIPS: Implement VZ support Add the main support for the MIPS Virtualization ASE (A.K.A. VZ) to MIPS KVM. The bulk of this work is in vz.c, with various new state and definitions elsewhere. Enough is implemented to be able to run on a minimal VZ core. Further patches will fill out support for guest features which are optional or can be disabled. Signed-off-by: James Hogan Acked-by: Ralf Baechle Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Steven Rostedt Cc: Ingo Molnar Cc: Jonathan Corbet Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Cc: linux-doc@vger.kernel.org Documentation/virtual/kvm/api.txt | 2 + arch/mips/include/asm/cpu-info.h | 1 + arch/mips/include/asm/kvm_host.h | 42 + arch/mips/kernel/time.c | 1 + arch/mips/kvm/interrupt.h | 5 + arch/mips/kvm/mips.c | 5 + arch/mips/kvm/mmu.c | 20 + arch/mips/kvm/tlb.c | 7 + arch/mips/kvm/trace.h | 15 + arch/mips/kvm/vz.c | 2381 +++++++++++++++++++++++++++++++++++++ 10 files changed, 2479 insertions(+) commit ea1bdbf683e6a12bd60204d245053bca0b52185c Author: James Hogan Date: Tue Mar 14 10:15:30 2017 +0000 KVM: MIPS: Update exit handler for VZ The general guest exit handler needs a few tweaks for VZ compared to trap & emulate, which for now are made directly depending on CONFIG_KVM_MIPS_VZ: - There is no need to re-enable the hardware page table walker (HTW), as it can be left enabled during guest mode operation with VZ. - There is no need to perform a privilege check, as any guest privilege violations should have already been detected by the hardware and triggered the appropriate guest exception. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/mips.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit 60c7aa3320dffba4929ef3f46a2daeb5feea6d07 Author: James Hogan Date: Tue Mar 14 10:15:29 2017 +0000 KVM: MIPS/Emulate: Drop CACHE emulation for VZ Ifdef out the trap & emulate CACHE instruction emulation functions for VZ. We will provide separate CACHE instruction emulation in vz.c, and we need to avoid linker errors due to the use of T&E specific MMU helpers. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/emulate.c | 2 ++ 1 file changed, 2 insertions(+) commit 5dee99b24eeffbe673a71237faf551978cd311d3 Author: James Hogan Date: Tue Mar 14 10:15:28 2017 +0000 KVM: MIPS/Emulate: Update CP0_Compare emulation for VZ Update emulation of guest writes to CP0_Compare for VZ. There are two main differences compared to trap & emulate: - Writing to CP0_Compare in the VZ hardware guest context acks any pending timer, clearing CP0_Cause.TI. If we don't want an ack to take place we must carefully restore the TI bit if it was previously set. - Even with guest timer access disabled in CP0_GuestCtl0.GT, if the guest CP0_Count reaches the guest CP0_Compare the timer interrupt will assert. To prevent this we must set CP0_GTOffset to move the guest CP0_Count out of the way of the new guest CP0_Compare, either before or after depending on whether it is a forwards or backwards change. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/emulate.c | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) commit 372582a6c6fcced38219d06545dd26ad7904bc6f Author: James Hogan Date: Tue Mar 14 10:15:27 2017 +0000 KVM: MIPS/TLB: Add VZ TLB management Add functions for MIPS VZ TLB management to tlb.c. kvm_vz_host_tlb_inv() will be used for invalidating root TLB entries after GPA page tables have been modified due to a KVM page fault. It arranges for a root GPA mapping to be flushed from the TLB, using the gpa_mm ASID or the current GuestID to do the probe. kvm_vz_local_flush_roottlb_all_guests() and kvm_vz_local_flush_guesttlb_all() flush all TLB entries in the corresponding TLB for guest mappings (GPA->RPA for root TLB with GuestID, and all entries for guest TLB). They will be used when starting a new GuestID cycle, when VZ hardware is enabled/disabled, and also when switching to a guest when the guest TLB contents may be stale or belong to a different VM. kvm_vz_guest_tlb_lookup() converts a guest virtual address to a guest physical address using the guest TLB. This will be used to decode guest virtual addresses which are sometimes provided by VZ hardware in CP0_BadVAddr for certain exceptions when the guest physical address is unavailable. kvm_vz_save_guesttlb() and kvm_vz_load_guesttlb() will be used to preserve wired guest VTLB entries while a guest isn't running. Signed-off-by: James Hogan Acked-by: Ralf Baechle Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/cpu-info.h | 1 + arch/mips/include/asm/kvm_host.h | 12 ++ arch/mips/kvm/tlb.c | 404 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 417 insertions(+) commit 1934a3ad091fb6b07a46b4a9f02d11a9a9f829b9 Author: James Hogan Date: Tue Mar 14 10:15:26 2017 +0000 KVM: MIPS/Entry: Update entry code to support VZ Update MIPS KVM entry code to support VZ: - We need to set GuestCtl0.GM while in guest mode. - For cores supporting GuestID, we need to set the root GuestID to match the main GuestID while in guest mode so that the root TLB refill handler writes the correct GuestID into the TLB. - For cores without GuestID where the root ASID dealiases RVA/GPA mappings, we need to load that ASID from the gpa_mm rather than the per-VCPU guest_kernel_mm or guest_user_mm, since the root TLB maps guest physical addresses. We also need to restore the normal process ASID on exit. - The normal linux process pgd needs restoring on exit, as we can't leave the GPA mappings active for kernel code. - GuestCtl0 needs saving on exit for the GExcCode field, as it may be clobbered if a preemption occurs. We also need to move the TLB refill handler to the XTLB vector at offset 0x80 on 64-bit VZ kernels, as hardware will use Root.Status.KX to determine whether a TLB refill or XTLB Refill exception is to be taken on a root TLB miss from guest mode, and KX needs to be set for kernel code to be able to access the 64-bit segments. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 5 ++ arch/mips/kvm/entry.c | 132 ++++++++++++++++++++++++++++++++++++--- arch/mips/kvm/mips.c | 4 +- 3 files changed, 131 insertions(+), 10 deletions(-) commit a27660f3e4b3a0740df3f86a556eecab4433ba9f Author: James Hogan Date: Tue Mar 14 10:15:25 2017 +0000 KVM: MIPS: Abstract guest CP0 register access for VZ Abstract the MIPS KVM guest CP0 register access macros into inline functions which are generated by macros. This allows them to be generated differently for VZ, where they will usually need to access the hardware guest CP0 context rather than the saved values in RAM. Accessors for each individual register are generated using these macros: - __BUILD_KVM_*_SW() for registers which are not present in the VZ hardware guest context, so kvm_{read,write}_c0_guest_##name() will access the saved value in RAM regardless of whether VZ is enabled. - __BUILD_KVM_*_HW() for registers which are present in the VZ hardware guest context, so kvm_{read,write}_c0_guest_##name() will access the hardware register when VZ is enabled. These build the underlying accessors using further macros: - __BUILD_KVM_*_SAVED() builds e.g. kvm_{read,write}_sw_gc0_##name() functions for accessing the saved versions of the registers in RAM. This is used for implementing the common kvm_{read,write}_c0_guest_##name() accessors with T&E where registers are always stored in RAM, but are also available with VZ HW registers to allow them to be accessed while saved. - __BUILD_KVM_*_VZ() builds e.g. kvm_{read,write}_vz_gc0_##name() functions for accessing the VZ hardware guest context registers directly. This is used for implementing the common kvm_{read,write}_c0_guest_##name() accessors with VZ. - __BUILD_KVM_*_WRAP() builds wrappers with different names, which allows the common kvm_{read,write}_c0_guest_##name() functions to be implemented using the VZ accessors while still having the SAVED accessors available too. - __BUILD_KVM_SAVE_VZ() builds functions for saving and restoring VZ hardware guest context register state to RAM, improving conciseness of VZ context saving and restoring. Similar macros exist for generating modifiers (set, clear, change), either with a normal unlocked read/modify/write, or using atomic LL/SC sequences. These changes change the types of 32-bit registers to u32 instead of unsigned long, which requires some changes to printk() functions in MIPS KVM. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 343 +++++++++++++++++++++++++++++---------- arch/mips/kvm/emulate.c | 2 +- arch/mips/kvm/mips.c | 6 +- arch/mips/kvm/trap_emul.c | 8 +- 4 files changed, 264 insertions(+), 95 deletions(-) commit 28c1e762b01eee56ada8148c88c4f1e99beb5584 Author: James Hogan Date: Tue Mar 14 10:15:24 2017 +0000 KVM: MIPS: Add guest exit exception callback Add a callback for MIPS KVM implementations to handle the VZ guest exit exception. Currently the trap & emulate implementation contains a stub which reports an internal error, but the callback will be used properly by the VZ implementation. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: Steven Rostedt Cc: Ingo Molnar Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 1 + arch/mips/kvm/mips.c | 5 +++++ arch/mips/kvm/trace.h | 2 ++ arch/mips/kvm/trap_emul.c | 24 ++++++++++++++++++++++++ 4 files changed, 32 insertions(+) commit edab4fe1f6419fc3a1de3b134929ae2123bea3ad Author: James Hogan Date: Tue Mar 14 10:15:23 2017 +0000 KVM: MIPS: Add hardware_{enable,disable} callback Add an implementation callback for the kvm_arch_hardware_enable() and kvm_arch_hardware_disable() architecture functions, with simple stubs for trap & emulate. This is in preparation for VZ which will make use of them. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 3 ++- arch/mips/kvm/mips.c | 7 ++++++- arch/mips/kvm/trap_emul.c | 11 +++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) commit 607ef2fdeb95ae63322321ca15b41f76870f48f1 Author: James Hogan Date: Tue Mar 14 10:15:22 2017 +0000 KVM: MIPS: Add callback to check extension Add an implementation callback for checking presence of KVM extensions. This allows implementation specific extensions to be provided without ifdefs in mips.c. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 1 + arch/mips/kvm/mips.c | 3 +-- arch/mips/kvm/trap_emul.c | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) commit a517c1ad65921765d5ac8594567c7bb6f352655c Author: James Hogan Date: Tue Mar 14 10:15:21 2017 +0000 KVM: MIPS: Init timer frequency from callback Currently the software emulated timer is initialised to a frequency of 100MHz by kvm_mips_init_count(), but this isn't suitable for VZ where the frequency of the guest timer matches that of the host. Add a count_hz argument so the caller can specify the default frequency, and move the call from kvm_arch_vcpu_create() to the implementation specific vcpu_setup() callback, so that VZ can specify a different frequency. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 2 +- arch/mips/kvm/emulate.c | 13 ++++++------- arch/mips/kvm/mips.c | 3 --- arch/mips/kvm/trap_emul.c | 3 +++ 4 files changed, 10 insertions(+), 11 deletions(-) commit 578fd61d2d210a3b58dc107f5382b965922ac253 Author: James Hogan Date: Tue Mar 14 10:15:20 2017 +0000 KVM: MIPS: Add 64BIT capability Add a new KVM_CAP_MIPS_64BIT capability to indicate that 64-bit MIPS guests are available and supported. In this case it should still be possible to run 32-bit guest code. If not available it won't be possible to run 64-bit guest code and the instructions may not be available, or the kernel may not support full context switching of 64-bit registers. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: Jonathan Corbet Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Cc: linux-doc@vger.kernel.org Documentation/virtual/kvm/api.txt | 25 +++++++++++++++++++++++++ include/uapi/linux/kvm.h | 1 + 2 files changed, 26 insertions(+) commit a8a3c426772e55ae9c3209f061cb6317268f932c Author: James Hogan Date: Tue Mar 14 10:15:19 2017 +0000 KVM: MIPS: Add VZ & TE capabilities Add new KVM_CAP_MIPS_VZ and KVM_CAP_MIPS_TE capabilities, and in order to allow MIPS KVM to support VZ without confusing old users (which expect the trap & emulate implementation), define and start checking KVM_CREATE_VM type codes. The codes available are: - KVM_VM_MIPS_TE = 0 This is the current value expected from the user, and will create a VM using trap & emulate in user mode, confined to the user mode address space. This may in future become unavailable if the kernel is only configured to support VZ, in which case the EINVAL error will be returned and KVM_CAP_MIPS_TE won't be available even though KVM_CAP_MIPS_VZ is. - KVM_VM_MIPS_VZ = 1 This can be provided when the KVM_CAP_MIPS_VZ capability is available to create a VM using VZ, with a fully virtualized guest virtual address space. If VZ support is unavailable in the kernel, the EINVAL error will be returned (although old kernels without the KVM_CAP_MIPS_VZ capability may well succeed and create a trap & emulate VM). This is designed to allow the desired implementation (T&E vs VZ) to be potentially chosen at runtime rather than being fixed in the kernel configuration. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: Jonathan Corbet Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Cc: linux-doc@vger.kernel.org Documentation/virtual/kvm/api.txt | 47 ++++++++++++++++++++++++++++++++++++++- arch/mips/kvm/mips.c | 9 ++++++++ include/uapi/linux/kvm.h | 6 +++++ 3 files changed, 61 insertions(+), 1 deletion(-) commit a7244920d1096c267c991a7506a519cdb92d7a24 Author: James Hogan Date: Tue Mar 14 10:15:18 2017 +0000 KVM: MIPS: Extend counters & events for VZ GExcCodes Extend MIPS KVM stats counters and kvm_transition trace event codes to cover hypervisor exceptions, which have their own GExcCode field in CP0_GuestCtl0 with up to 32 hypervisor exception cause codes. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: Steven Rostedt Cc: Ingo Molnar Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/kvm_host.h | 10 ++++++++++ arch/mips/kvm/mips.c | 10 ++++++++++ arch/mips/kvm/trace.h | 18 +++++++++++++++++- 3 files changed, 37 insertions(+), 1 deletion(-) commit c58cf741795ad5df08dcc13d1d0ccd05a853b2a6 Author: James Hogan Date: Tue Mar 14 10:15:17 2017 +0000 KVM: MIPS: Update kvm_lose_fpu() for VZ Update the implementation of kvm_lose_fpu() for VZ, where there is no need to enable the FPU/MSA in the root context if the FPU/MSA state is loaded but disabled in the guest context. The trap & emulate implementation needs to disable FPU/MSA in the root context when the guest disables them in order to catch the COP1 unusable or MSA disabled exception when they're used and pass it on to the guest. For VZ however as long as the context is loaded and enabled in the root context, the guest can enable and disable it in the guest context without the hypervisor having to do much, and will take guest exceptions without hypervisor intervention if used without being enabled in the guest context. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/mips.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 59d7814ab26f925f209d532ae40f797f20359cec Author: James Hogan Date: Tue Mar 14 10:15:16 2017 +0000 KVM: MIPS/Emulate: Implement 64-bit MMIO emulation Implement additional MMIO emulation for MIPS64, including 64-bit loads/stores, and 32-bit unsigned loads. These are only exposed on 64-bit VZ hosts. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/emulate.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit 8b48d5b75dc4cbae8cfe83648f9e4e10cb407dce Author: James Hogan Date: Tue Mar 14 10:15:15 2017 +0000 KVM: MIPS/Emulate: De-duplicate MMIO emulation Refactor MIPS KVM MMIO load/store emulation to reduce code duplication. Each duplicate differed slightly anyway, and it will simplify adding 64-bit MMIO support for VZ. kvm_mips_emulate_store() and kvm_mips_emulate_load() can now return EMULATE_DO_MMIO (as possibly originally intended). We therefore stop calling either of these from kvm_mips_emulate_inst(), which is now only used by kvm_trap_emul_handle_cop_unusable() which is picky about return values. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/kvm/emulate.c | 206 ++++++++++++------------------------------------ 1 file changed, 50 insertions(+), 156 deletions(-) commit 955d8dc3ee555e9320fabbeab0969f9cf7660f9d Author: James Hogan Date: Tue Mar 14 10:15:14 2017 +0000 KVM: MIPS: Implement HYPCALL emulation Emulate the HYPCALL instruction added in the VZ ASE and used by the MIPS paravirtualised guest support that is already merged. The new hypcall.c handles arguments and the return value. No actual hypercalls are yet supported, but this still allows us to safely step over hypercalls and set an error code in the return value for forward compatibility. Non-zero HYPCALL codes are not handled. We also document the hypercall ABI which asm/kvm_para.h uses. Signed-off-by: James Hogan Acked-by: Ralf Baechle Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Andreas Herrmann Cc: David Daney Cc: Jonathan Corbet Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Cc: linux-doc@vger.kernel.org Documentation/virtual/kvm/hypercalls.txt | 5 +++ arch/mips/include/asm/kvm_host.h | 7 +++++ arch/mips/include/uapi/asm/inst.h | 2 +- arch/mips/kvm/Makefile | 1 + arch/mips/kvm/emulate.c | 3 ++ arch/mips/kvm/hypcall.c | 53 ++++++++++++++++++++++++++++++++ arch/mips/kvm/trap_emul.c | 4 +++ 7 files changed, 74 insertions(+), 1 deletion(-) commit a6c09b9f9d1c3b1daf8e24e5556d73b9303843ef Author: James Hogan Date: Tue Mar 14 10:15:13 2017 +0000 MIPS: asm/tlb.h: Add UNIQUE_GUEST_ENTRYHI() macro Add a distinct UNIQUE_GUEST_ENTRYHI() macro for invalidation of guest TLB entries by KVM, using addresses in KSeg1 rather than KSeg0. This avoids conflicts with guest invalidation routines when there is no EHINV bit to mark the whole entry as invalid, avoiding guest machine check exceptions on Cavium Octeon III. Signed-off-by: James Hogan Acked-by: Ralf Baechle Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/tlb.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit eb0bab386622ecd5626462dc9eeeab082ac8b717 Author: James Hogan Date: Tue Mar 14 10:15:12 2017 +0000 MIPS: Add some missing guest CP0 accessors & defs Add some missing guest accessors and register field definitions for KVM for MIPS VZ to make use of. Guest CP0_LLAddr register accessors and definitions for the LLB field allow KVM to clear the guest LLB to cancel in-progress LL/SC atomics on restore, and to emulate accesses by the guest to the CP0_LLAddr register. Bitwise modifiers and definitions for the guest CP0_Wired and CP0_Config1 registers allow KVM to modify fields within the CP0_Wired and CP0_Config1 registers. Finally a definition for the CP0_Config5.SBRI bit allows KVM to initialise and allow modification of the guest version of the SBRI bit. Signed-off-by: James Hogan Acked-by: Ralf Baechle Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/mipsregs.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit a929bdc52be658fd622c2d0f9fdf1d333aea34fd Author: James Hogan Date: Tue Mar 14 10:15:11 2017 +0000 MIPS: Probe guest MVH Probe for availablility of M{T,F}HC0 instructions used with e.g. XPA in the VZ guest context, and make it available via cpu_guest_has_mvh. This will be helpful in properly emulating the MAAR registers in KVM for MIPS VZ. Signed-off-by: James Hogan Acked-by: Ralf Baechle Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/cpu-features.h | 3 +++ arch/mips/kernel/cpu-probe.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) commit a7c7ad6c3e0a2ae88625df4e41c1c7305aa26f04 Author: James Hogan Date: Tue Mar 14 10:15:10 2017 +0000 MIPS: Probe guest CP0_UserLocal Probe for presence of guest CP0_UserLocal register and expose via cpu_guest_has_userlocal. This register is optional pre-r6, so this will allow KVM to only save/restore/expose the guest CP0_UserLocal register if it exists. Signed-off-by: James Hogan Acked-by: Ralf Baechle Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/cpu-features.h | 3 +++ arch/mips/kernel/cpu-probe.c | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) commit f359a1115519122c7c3bc7fc4a01797dcf576709 Author: James Hogan Date: Tue Mar 14 10:15:09 2017 +0000 MIPS: Separate MAAR V bit into VL and VH for XPA The MAAR V bit has been renamed VL since another bit called VH is added at the top of the register when it is extended to 64-bits on a 32-bit processor with XPA. Rename the V definition, fix the various users, and add definitions for the VH bit. Also add a definition for the MAARI Index field. Signed-off-by: James Hogan Acked-by: Ralf Baechle Cc: Paul Burton Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/maar.h | 10 +++++----- arch/mips/include/asm/mipsregs.h | 8 +++++++- arch/mips/mm/init.c | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) commit 4e87580e6d144e44820a0d23e756136b6218f4f0 Author: James Hogan Date: Tue Mar 14 10:15:08 2017 +0000 MIPS: Add defs & probing of UFR Add definitions and probing of the UFR bit in Config5. This bit allows user mode control of the FR bit (floating point register mode). It is present if the UFRP bit is set in the floating point implementation register. This is a capability KVM may want to expose to guest kernels, even though Linux is unlikely to ever use it due to the implications for multi-threaded programs. Signed-off-by: James Hogan Acked-by: Ralf Baechle Cc: Paul Burton Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org arch/mips/include/asm/cpu-features.h | 4 ++++ arch/mips/include/asm/cpu.h | 1 + arch/mips/kernel/cpu-probe.c | 2 ++ 3 files changed, 7 insertions(+) commit b840d649f9ec7ede484e47b1a53d16ae6f3d0085 Author: Jerome Brunet Date: Thu Mar 23 17:50:57 2017 +0100 pinctrl: meson: gxl: add spdif output pins Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxl.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 2899adf0422a29a92c7314fc5b427817c084beee Author: Jerome Brunet Date: Thu Mar 23 17:50:56 2017 +0100 pinctrl: meson: gxl: add i2s output pins Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxl.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit bce12d66d613d536a55e0384f1f202ea98a14e76 Author: Jerome Brunet Date: Thu Mar 23 17:50:55 2017 +0100 pinctrl: meson: gxbb: add spdif output pins Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 0145d490535584bd2176256d082502e71af644b7 Author: Jerome Brunet Date: Thu Mar 23 17:50:54 2017 +0100 pinctrl: meson: gxbb: add i2s output pins Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit f5073824efc856c9a8f56706f03ad4e07b779a36 Author: Imre Deak Date: Tue Mar 28 12:38:55 2017 +0300 drm/i915: WARN if the core runtime PM get helpers fail We don't expect the core runtime PM get helpers to return any error, so add a WARN for this. Also print the return value for all the callsites to help debugging. v2: - Don't call pm_runtime_get_sync() as part of initing locals. (Chris) Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1490693935-12638-1-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_runtime_pm.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit e1e37d6c4a78bb6fb9b67115f497337cb38de503 Author: Julia Cartwright Date: Tue Mar 21 17:43:07 2017 -0500 gpio: 104-idi-48: make use of raw_spinlock variants The 104-idi-48 gpio driver currently implements an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Acked-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-idi-48.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit d7e75a325cb2d2b72e7ac9a185abc1cd59bc9922 Author: Or Gerlitz Date: Wed Jan 25 20:24:20 2017 +0200 net/mlx5e: Add offloading of E-Switch TC pedit (header re-write) actions This includes calling the parsing code that translates from pedit speak to the HW API, allocation (deallocation) of a modify header context and setting the modify header id associated with this context to the FTE of that flow. Signed-off-by: Or Gerlitz Reviewed-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 37 ++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 1 + .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 5 ++- 3 files changed, 39 insertions(+), 4 deletions(-) commit 2f4fe4cab073c60c1a70cb540662c0a91d133946 Author: Or Gerlitz Date: Wed Jan 25 19:31:33 2017 +0200 net/mlx5e: Add offloading of NIC TC pedit (header re-write) actions This includes calling the parsing code that translates from pedit speak to the HW API, allocation (deallocation) of a modify header context and setting the modify header id associated with this context to the FTE of that flow. Signed-off-by: Or Gerlitz Reviewed-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit d79b6df6b10a206e2fe14a13318283712cd42b71 Author: Or Gerlitz Date: Sun Jan 22 20:46:42 2017 +0200 net/mlx5e: Add parsing of TC pedit actions to HW format Parse/translate a set of TC pedit actions to be formed in the HW API format. User-space provides set of keys where each one of them is made of: command (add or set), header-type, byte offset within that header along with a 32 bit mask and value. The mask dictates what bits in the 32 bit word that starts on the offset we should be dealing with, but under negative polarity (unset bits are to be modified). We do a 1st pass over the set of keys while using the header-type and offset to fill the masks and the values into a data-structure containting all the supported network headers. We then do a 2nd pass over the set of fields to re-write supported by the HW, where for each such candidate field, we use the masks filled on the 1st pass to realize if we should offloading re-write it. In case offloading is required, we fill a HW descriptor with the following: (1) the header field to modify (2) the bit offset within the field from where to modify (set command only) (3) the value to set/add (4) the length in bits 1...32 to modify (set command only) Note that it's possible for a given pedit mask to dictate modifying the same header field multiple times or to modify multiple header fields. Currently such combinations are not supported for offloading, hence, for set commands, the offset within the field is always zero, and the length to modify is the field size. Signed-off-by: Or Gerlitz Reviewed-by: Amir Vadai Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 273 ++++++++++++++++++++++++ 1 file changed, 273 insertions(+) commit ffe2e217b8ded581be6083a117839f55cca96e73 Author: Or Gerlitz Date: Sun Jan 22 20:42:39 2017 +0200 net/sched: Add accessor functions to pedit keys for offloading drivers HW drivers will use the header-type and command fields from the extended keys, and some fields (e.g mask, val, offset) from the legacy keys. Signed-off-by: Or Gerlitz Reviewed-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed include/net/tc_act/tc_pedit.h | 45 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 2de24fedb9e2f8bc03f85f120a38152393ca91c5 Author: Or Gerlitz Date: Thu Jan 19 19:49:53 2017 +0200 net/mlx5: Introduce alloc/dealloc modify header context commands Implement the low-level commands to support packet header re-write. Signed-off-by: Or Gerlitz Reviewed-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 ++ drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 66 ++++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 5 ++ 3 files changed, 75 insertions(+) commit 2a69cb9ff7caac00f3bf7c865964228dd2a0c415 Author: Or Gerlitz Date: Thu Jan 19 19:31:25 2017 +0200 net/mlx5: Introduce modify header structures, commands and steering action definitions Add the definitions related to creation/deletion of a modify header context and the modify header steering action which are used for HW packet header modify (re-write) as part of steering. Add as well the modify header id into two intermediate structs and set it to the FTE. Note that as the push/pop vlan steering actions are emulated by the ewitch management code, we're not breaking any compatibility while changing their values to make room for the modify header action which is not emulated and whose value is part of the FW API. The new bit values for the emulated actions are at the end of the possible range. Signed-off-by: Or Gerlitz Reviewed-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 4 +- drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 1 + include/linux/mlx5/fs.h | 3 +- include/linux/mlx5/mlx5_ifc.h | 113 +++++++++++++++++++++- 6 files changed, 118 insertions(+), 5 deletions(-) commit a750276f81918294a5cb0ffa37686cf25314cf53 Author: Or Gerlitz Date: Thu Jan 19 19:37:06 2017 +0200 net/mlx5: Reorder few command cases to reflect their natural order Move the commands related to scheduling elements and vport qos to a suitable location (according to the MLX5_CMD_OP enum values) in the command string and internal error helpers. This patch doesn't change any functionality. Signed-off-by: Or Gerlitz Reviewed-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit e753b2b50dc3c6582e9d5971555693db41a6d821 Author: Or Gerlitz Date: Wed Feb 1 19:01:18 2017 +0200 net/mlx5: Add helper to initialize a flow steering actions struct instance There are bunch of places in the code where the intermediate struct that keeps the elements related to flow actions is initialized with the same default values. Put that into a small DECLARE type helper. This patch doesn't change any functionality. Signed-off-by: Or Gerlitz Reviewed-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c | 14 +++----------- drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 18 +++--------------- include/linux/mlx5/fs.h | 5 ++++- 3 files changed, 10 insertions(+), 27 deletions(-) commit aa0cbbae5d360ea23a15038d24f6f7c9573eecaf Author: Or Gerlitz Date: Tue Mar 14 16:49:04 2017 +0200 net/mlx5e: Properly deal with resource cleanup when adding TC flow fails The code for adding tc fdb flows leaves things half set when it fails in the middle. Currently we are not leaking things (e.g eswitch vlan reference, encap reference and HW resources) since the main code to add flower rules does a cleanup by calling mlx5e_tc_del_flow(). This cleanup further works just b/c we're checking there if the HW rule for the flow we are attempting to delete is valid before touching it, and since under the current possible combinations of supported actions it's okay to go and blidnly deref or delete all the action related resources (encap, vlan). Instead, do things properly, namely make sure that if add flow fails we clean all what was allocated or referenced. Now, the flow delete code can blindly deref/deallocate both the rule and the actions related resources and when more action combinations are introduced (such as the upcoming header re-write) we are fine with clear and robust code. While here, align all of nic/fdb parse actions/add flow functions to get mlx5e_tc_flow struct param and pick the attributes or whatever else needed from there. Signed-off-by: Or Gerlitz Reviewed-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 59 +++++++++++++--------- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 23 +++++---- 2 files changed, 50 insertions(+), 32 deletions(-) commit 17091853fc0bb8354283000e065a60b8cc682f5c Author: Or Gerlitz Date: Mon Mar 13 08:33:03 2017 +0200 net/mlx5e: Add intermediate struct for TC flow parsing attributes Add intermediate structure to store attributes parsed from TC filter matching/actions parts which are soon to be configured into the HW. Currently put there the flow matching spec after being parsed. More content to be added in down-stream patch. This patch doesn't change any functionality. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 29 +++++++++++++++---------- 1 file changed, 17 insertions(+), 12 deletions(-) commit 3bc4b7bfa01f581f133fc678db9d4541dd794ae5 Author: Or Gerlitz Date: Tue Jan 24 21:04:50 2017 +0200 net/mlx5e: Add NIC attributes for offloaded TC flows Add structure that contains the attributes related to offloaded NIC flows. Currently it has the actions and flow tag. While here, do xmas tree cleanup of the TC configure function. This patch doesn't change any functionality. Signed-off-by: Or Gerlitz Reviewed-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 51 +++++++++++++++---------- 1 file changed, 31 insertions(+), 20 deletions(-) commit ecf5bb796b992454c34f555e76c29360ed9b886d Author: Or Gerlitz Date: Tue Jan 24 20:54:09 2017 +0200 net/mlx5e: Add prefix for e-switch offloaded TC flow attributes Add esw_ prefix to the flow attributes attached to offloaded e-switch TC flows. This is a pre-step to add attributes to offloaded NIC TC flows. Also, save one pointer space by using gcc's zero size array, this would be beneficial for environments where 100Ks (or Ms) of flows are offloaded. This patch doesn't change any functionality. Signed-off-by: Or Gerlitz Reviewed-by: Hadar Hen Zion Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 403fe77e22eb72c962c3889efc9d4fa62e454737 Author: Geert Uytterhoeven Date: Tue Mar 28 12:45:33 2017 +0200 ARM: dts: silk: Correct clock of DU1 The second channel of the display unit uses a different module clock than the first channel. Fixes: 84e734f497cd48f6 ("ARM: dts: silk: add DU DT support") Signed-off-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794-silk.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f698bf60e3a13c991577f5360f371e2a41cf40e Author: Geert Uytterhoeven Date: Tue Mar 28 12:45:32 2017 +0200 ARM: dts: alt: Correct clock of DU1 The second channel of the display unit uses a different module clock than the first channel. Fixes: 876e7fb9f418fd86 ("ARM: shmobile: r8a7794: alt: Enable VGA port") Signed-off-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794-alt.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89675f36c9e17512812b9d14d9824f8ef92782c3 Author: Geert Uytterhoeven Date: Tue Mar 28 12:45:31 2017 +0200 ARM: dts: r8a7794: Correct clock of DU1 The second channel of the display unit uses a different module clock than the first channel. Fixes: 46c4f13d04d729fa ("ARM: shmobile: r8a7794: Add DU node to device tree") Signed-off-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e713ddd87ccee801be1fd13f478407b1bde93c21 Author: Masahiro Yamada Date: Thu Mar 23 05:07:24 2017 +0900 mtd: nand: denali: remove unnecessary writes to ECC_CORRECTION Because SUPPORT_15BITECC is defined, the following is dead code: #elif SUPPORT_8BITECC iowrite32(8, denali->flash_reg + ECC_CORRECTION); #endif Such ifdefs are useless and unacceptable coding style. These writes are not needed in the first place since ECC_CORRECTION is set up by the nand_init() function. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 15 +-------------- drivers/mtd/nand/denali.h | 3 --- 2 files changed, 1 insertion(+), 17 deletions(-) commit 6652ef88c4a7036e8f5e900f47a4daf2a9ba30c8 Author: Masahiro Yamada Date: Thu Mar 23 05:07:23 2017 +0900 mtd: nand: denali: remove meaningless writes to read-only registers The write accesses to LOGICAL_PAGE_{DATA,SPARE}_SIZE have no effect because the Denali User's Guide says these registers are read-only. The hardware automatically multiplies the main/spare size by the number of devices and update LOGICAL_PAGE_{DATA,SPARE}_SIZE. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 16 ---------------- 1 file changed, 16 deletions(-) commit cc5d8031f8c7b11c325a37118f9aa6133f0b28a0 Author: Masahiro Yamada Date: Thu Mar 23 05:07:22 2017 +0900 mtd: nand: denali: set DEVICES_CONNECTED 1 if not set Currently, the driver expects DEVICE_CONNECTED is automatically set by the hardware, but this feature is disabled in some cases. In such cases, it is the software's responsibility to set up the DEVICES_CONNECTED register. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit e93c1640e0387ab55b98b4e04600050f2beceac1 Author: Masahiro Yamada Date: Thu Mar 23 05:07:21 2017 +0900 mtd: nand: denali: simplify multi device fixup code The available configuration of the IP bus width is x8 or x16, so the possible value for denali->devnum is 1 or 2. If the value is 1, there is nothing to do. Fixup parameters only when denali->devnum is 2. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) commit 1764f8081f1524bf629e0744b277db751281ff56 Author: Geert Uytterhoeven Date: Tue Mar 28 12:45:30 2017 +0200 ARM: dts: r8a7794: Add DU1 clock to device tree Add the missing module clock for the second channel of the display unit. Signed-off-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794.dtsi | 8 +++++--- include/dt-bindings/clock/r8a7794-clock.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) commit 0a309f9e3dfaa4f5db0bf1b0cab54571744b491a Author: Matthew Auld Date: Mon Mar 27 21:32:36 2017 +0100 drm/i915/perf: remove user triggerable warn Don't throw a warning if we are given an invalid property id. While here let's also bring back Robert' original idea of catching unhandled enumeration values at compile time. Fixes: eec688e1420d ("drm/i915: Add i915 perf infrastructure") Signed-off-by: Matthew Auld Cc: Robert Bragg Reviewed-by: Robert Bragg Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170327203236.18276-1-matthew.auld@intel.com drivers/gpu/drm/i915/i915_perf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5992e30034c43917968f2327d2948d22be6d4603 Author: Takashi Sakamoto Date: Wed Mar 22 21:30:28 2017 +0900 ALSA: firewire-motu: add support for MOTU 828mk3 (FireWire/Hybrid) as a model with protocol version 3 MOTU 828mk3 (FireWire/Hybrid) is one of third generation in MOTU FireWire series, produced in 2008/2014. This model consists of three chips for functionality on IEEE 1394 bus: * TI TSB41AB2 (Physical layer for IEEE 1394 bus) * Xilinx Spartan-3E FPGA Family (Link layer for IEEE 1394 bus, packet processing and data block processing layer) * TI TMS320C6722 (Digital signal processing) This commit adds a support for this model, with its unique protocol as version 3. This protocol has some additional features to protocol version 2. * Support several optical interfaces. * Support a data chunk for return of reverb effect. * Have a quirk of tx packets. * Support heartbeat asynchronous transaction. In this protocol, series of transferred packets has some quirks. Below fields in CIP headers of the packets are out of IEC 61883-1: - SID (source node id): always 0x0d - DBS (data block size): always 0x04 - DBC (data block counter): always 0x00 - EOH (End of header): always 0x00 Below is an actual sample of transferred packets. quads CIP1 CIP2 520 0x0D040400 0x22FFFFFF 8 0x0D040400 0x22FFFFFF 520 0x0D040400 0x22FFFFFF 520 0x0D040400 0x22FFFFFF 8 0x0D040400 0x22FFFFFF Status of clock is configured by write transactions to 0x'ffff'f000'0b14, as well as version 2, while meanings of fields are different from the former protocols. Modes of optical interfaces are configured by write transactions to 0x'ffff'f000'0c94. Drivers can register its address to receive heatbeat transactions from the unit. 0x'ffff'f000'0b0c is for the higher part and 0x'ffff'f000'0b10 is for the lower part. Nevertheless, this feature is not useless for this driver and this commit omits it. Each data block consists of two parts in a point of the number of included data chunks. In both of 'fixed' and 'differed' parts, the number of included data blocks are a multiple of 4, thus depending on models there's some empty data chunks. For example, 828mk3 includes one pair of empty data chunks in its fixed part. When optical interface is configured to S/PDIF, 828mk3 includes one pair of empty data chunks in its differed part. To reduce consumption of CPU cycles with additional conditions/loops, this commit just exposes these empty chunks to user space as PCM channels. Additionally, 828mk3 has a non-negligible overhead to change its sampling transfer frequency. When softwares send asynchronous transaction to perform it, LED on the unit starts to blink. In a worst case, it continues blink during several seconds; e.g. 10 seconds. When stopping blinking, the unit seems to be prepared for the requested sampling transfer frequency. To wait for the preparation, this commit forces the driver to call task scheduler and applications sleeps for 4 seconds. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/Kconfig | 1 + sound/firewire/motu/Makefile | 2 +- sound/firewire/motu/amdtp-motu.c | 12 ++ sound/firewire/motu/motu-protocol-v3.c | 312 +++++++++++++++++++++++++++++++++ sound/firewire/motu/motu.c | 18 ++ sound/firewire/motu/motu.h | 1 + 6 files changed, 345 insertions(+), 1 deletion(-) commit 2128f78f75a36a34dfef0e127273c2f820c5c904 Author: Takashi Sakamoto Date: Wed Mar 22 21:30:27 2017 +0900 ALSA: firewire-lib: add a quirk of packet without valid EOH in CIP format In IEC 61883-1, when two quadlets CIP header is used, the most significant bit in second CIP header stands. However, packets from units with MOTU protocol version 3 have a quirk without this flag. Current packet streaming layer handles this as protocol error. This commit adds a new enumeration constant for this quirk, to handle MOTU protocol version 3. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 5 +++-- sound/firewire/amdtp-stream.h | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) commit 949613e366ed436a7639722b0ab6ed66a0199ae9 Author: Takashi Sakamoto Date: Wed Mar 22 21:30:26 2017 +0900 ALSA: firewire-motu: add support for MOTU 828mk2 as a model with protocol version 2 MOTU 828mk2 is one of second generation in MOTU FireWire series, produced in 2003. This model consists of four chips: * TI TSB41AB2 (Physical layer for IEEE 1394 bus) * PDI 1394L40BE (Link layer for IEEE 1394 bus and packet processing layer) * ALTERA ACEX 1K EP1K30 Series FPGA (Data block processing layer) * TI TMS320VC5402 (Digital signal processing) This commit adds a support for this model, with its unique protocol as version 2. The features of this protocol are: * Support data chunks for status and control messages for both directions. * Support a pair of MIDI input/output. * Support a data chunk for mic/instrument independent of analog line in. * Support a data chunk for playback return. * Support independent data chunks for S/PDIF of both optical/coaxial interfaces. * Support independent data chunks for each of main out and phone out. Status of clock is configured by write transactions to 0x'ffff'f000'0b14. Modes of optical interfaces are configured by write transactions to 0x'ffff'f000'0c04. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/Kconfig | 1 + sound/firewire/motu/Makefile | 3 +- sound/firewire/motu/motu-protocol-v2.c | 237 +++++++++++++++++++++++++++++++++ sound/firewire/motu/motu.c | 14 ++ sound/firewire/motu/motu.h | 2 + 5 files changed, 256 insertions(+), 1 deletion(-) commit 5aaab1bf37ede45df4f5d13d735faf824edf3ec8 Author: Takashi Sakamoto Date: Wed Mar 22 21:30:25 2017 +0900 ALSA: firewire-motu: enable to read transaction cache via hwdep interface MOTU FireWire series can transfer messages to registered address. These messages are transferred for the status of internal clock synchronization just after starting streams. When the synchronization is stable, it's 0x01ffffff. Else, it's 0x05ffffff. This commit adds a functionality for user space applications to receive content of the message. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai include/uapi/sound/firewire.h | 7 +++++++ sound/firewire/motu/motu-hwdep.c | 10 ++++++++-- sound/firewire/motu/motu-transaction.c | 20 ++++++++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) commit 71c3797779d3cd8378767f5b2d8cfd3b2f88c5c1 Author: Takashi Sakamoto Date: Wed Mar 22 21:30:24 2017 +0900 ALSA: firewire-motu: add hwdep interface This commit adds hwdep interface so as the other sound drivers for units on IEEE 1394 bus have. This interface is designed for mixer/control applications. By using this interface, an application can get information about firewire node, can lock/unlock kernel streaming and can get notification at starting/stopping kernel streaming. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai include/uapi/sound/asound.h | 3 +- include/uapi/sound/firewire.h | 3 +- sound/firewire/motu/Makefile | 2 +- sound/firewire/motu/motu-hwdep.c | 192 ++++++++++++++++++++++++++++++++++++++ sound/firewire/motu/motu-midi.c | 16 ++++ sound/firewire/motu/motu-pcm.c | 20 +++- sound/firewire/motu/motu-stream.c | 38 ++++++++ sound/firewire/motu/motu.c | 5 + sound/firewire/motu/motu.h | 13 +++ 9 files changed, 285 insertions(+), 7 deletions(-) commit 9e796e7d59e71f8a556cfbdc2ffa3aff0555dd0e Author: Takashi Sakamoto Date: Wed Mar 22 21:30:23 2017 +0900 ALSA: firewire-motu: add MIDI functionality In MOTU FireWire series, MIDI messages are multiplexed to isochronous packets as well as PCM frames, while the way is different from the one in IEC 61883-6. MIDI messages are put into a certain position in message chunks. One data block can includes one byte of the MIDI messages. When data block includes a MIDI byte, the block has a flag in a certain position of the message chunk. These positions are unique depending on protocols. Once a data block includes a MIDI byte, some following data blocks includes no MIDI bytes. Next MIDI byte appears on a data block corresponding to next cycle of physical MIDI bus. This seems to avoid buffer overflow caused by bandwidth differences between IEEE 1394 bus and physical MIDI bus. This commit adds MIDI functionality to transfer/receive MIDI messages. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/Makefile | 2 +- sound/firewire/motu/amdtp-motu.c | 84 +++++++++++++++++++++ sound/firewire/motu/motu-midi.c | 153 ++++++++++++++++++++++++++++++++++++++ sound/firewire/motu/motu-stream.c | 9 ++- sound/firewire/motu/motu.c | 7 ++ sound/firewire/motu/motu.h | 9 +++ 6 files changed, 260 insertions(+), 4 deletions(-) commit dd49b2d1f04af9b1f44e9fe82c85f374f662c61b Author: Takashi Sakamoto Date: Wed Mar 22 21:30:22 2017 +0900 ALSA: firewire-motu: add PCM functionality This commit adds PCM functionality to transmit/receive PCM samples. When one of PCM substreams are running or external clock source is selected, current sampling rate is used. Else, the sampling rate is changed according to requests from a userspace application. Available number of samples in a frame of PCM substream is determined at open(2) to corresponding PCM character device. Later, packet streaming starts by ioctl(2) with SNDRV_PCM_IOCTL_PREPARE. In theory, between them, applications can change state of the unit by any write transaction to change the number. In this case, this driver may fail packet streaming due to wrong data format. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/Makefile | 2 +- sound/firewire/motu/motu-pcm.c | 386 +++++++++++++++++++++++++++++++++++++++++ sound/firewire/motu/motu.c | 4 + sound/firewire/motu/motu.h | 2 + 4 files changed, 393 insertions(+), 1 deletion(-) commit 4638ec6ede0847c75bd943d54237efb118f4abae Author: Takashi Sakamoto Date: Wed Mar 22 21:30:21 2017 +0900 ALSA: firewire-motu: add proc node to show current statuc of clock and packet formats This commit adds a proc node for debugging purpose. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/Makefile | 3 +- sound/firewire/motu/motu-proc.c | 118 ++++++++++++++++++++++++++++++++++++++++ sound/firewire/motu/motu.c | 2 + sound/firewire/motu/motu.h | 3 + 4 files changed, 125 insertions(+), 1 deletion(-) commit 9b2bb4f2f4a213a768a84fa25c14be54844f5bb6 Author: Takashi Sakamoto Date: Wed Mar 22 21:30:20 2017 +0900 ALSA: firewire-motu: add stream management functionality This commit adds a functionality to manage packet streaming for MOTU FireWire series. The streaming is not controlled by CMP, thus against IEC 61883-1. Write transaction to certain addresses start/stop packet streaming. Transactions to 0x'ffff'f000'0b00 results in isochronous channel number for both directions and starting/stopping transmission of packets. The isochronous channel number is represented in 6 bit field, thus units can identify the channels up to 64, as IEEE 1394 bus specification described. Transactions to 0x'ffff'f000'0b10 results in packet format for both directions and transmission speed. When each of data block includes fixed part of data chunks only, corresponding flags stand. When bus reset occurs, the units continue to transmit packets with non-contiguous data block counter. This causes discontinuity detection in packet streaming engine and ALSA PCM applications receives EPIPE from any I/O operation. In this case, typical applications manage to recover corresponding PCM substream. This behaviour is kicked much earlier than callback of bus reset handler by Linux FireWire subsystem, therefore status of packet streaming is not changed in the handler. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/Makefile | 2 +- sound/firewire/motu/motu-stream.c | 340 ++++++++++++++++++++++++++++++++++++++ sound/firewire/motu/motu.c | 5 + sound/firewire/motu/motu.h | 10 ++ 4 files changed, 356 insertions(+), 1 deletion(-) commit 2e76701bbb1fbe55f7d8538ae7f6869070eb3446 Author: Takashi Sakamoto Date: Wed Mar 22 21:30:19 2017 +0900 ALSA: firewire-motu: handle transactions specific for MOTU FireWire models All models of MOTU FireWire series can be controlled by write transaction to addresses in a range from 0x'ffff'f0000'0b00 to 0x'ffff'f000'0cff. The models support asynchronous notification. This notification has 32 bit field data, and is transferred when status of clock changes. Meaning of the value is not enough clear yet. Drivers can register its address to receive the notification. Write transaction to 0x'ffff'f000'0b04 registers higher 16 bits of the address. Write transaction to 0x'ffff'f0000'0b08 registers the rest of bits. The address includes node ID, thus it should be registered every time of bus reset. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/Makefile | 2 +- sound/firewire/motu/motu-transaction.c | 117 +++++++++++++++++++++++++++++++++ sound/firewire/motu/motu.c | 10 +++ sound/firewire/motu/motu.h | 12 ++++ 4 files changed, 140 insertions(+), 1 deletion(-) commit 4641c939401076c0ab7faba024827069723f719c Author: Takashi Sakamoto Date: Wed Mar 22 21:30:18 2017 +0900 ALSA: firewire-motu: add MOTU specific protocol layer MOTU FireWire series uses blocking transmission for AMDTP packet streaming. They transmit/receive 8,000 packets per second, to handle the same number of data blocks as current sampling transmission frequency. Thus, IEC 61883-1/6 packet streaming engine of ALSA firewire stack is available for them. However, the sequence of packet and data blocks includes some quirks. Below sample is a sequence of CIP headers of packets received by 828mk2, at 44.1kHz of sampling transmission frequency. quads CIP1 CIP2 488 0x020F04E8 0x8222FFFF 8 0x020F04F8 0x8222FFFF 488 0x020F0400 0x8222FFFF 488 0x020F0408 0x8222FFFF 8 0x020F04E8 0x8222FFFF 488 0x020F04F0 0x8222FFFF 488 0x020F04F8 0x8222FFFF The SID (source node ID), DBS (data block size), SPH (source packet header), FMT (format ID), FDF (format dependent field) and SYT (time stamp) fields are in IEC 61883-1. Especially, FMT is 0x02, FDF is 0x22 and SYT is 0xffff to define MOTU specific protocol. In an aspect of dbc field, the value represents accumulated number of data blocks included the packet. This is against IEC 61883-1, because according to the specification this value should be the number of data blocks already transferred. In ALSA IEC 61883-1/6 engine, this quirk is already supported by CIP_DBC_IS_END_EVENT flag, because Echo Audio Fireworks has. Each data block includes SPH as its first quadlet field, to represent its presentation time stamp. Actual value of SPH is compliant to IEC 61883-1; lower 25 bits of 32 bits width consists of 13 bits cycle count and 12 bits cycle offset. The rest of each data block consists of 24 bit chunks. All of PCM samples, MIDI messages, status and control messages are transferred by the chunks. This is similar to '24-bit * 4 Audio Pack' in IEC 61883-6. The position of each kind of data depends on generations of each model. The number of whole chunks in a data block is a multiple of 4, to consists of quadlet-aligned packets. This commit adds data block processing layer specific for the MOTU protocol. The remarkable point is the way to generate SPH header. Time stamps for each data blocks are generated by below calculation: * Using pre-computed table for the number of ticks per event * 44,1kHz: (557 + 123/441) * 48.0kHz: (512 + 0/441) * 88.2kHz: (278 + 282/441) * 96.0kHz: (256 + 0/441) * 176.4kHz: (139 + 141/441) * 192.0kHz: (128 + 0/441) * Accumulate the ticks and set the value to SPH for every events. * This way makes sense only for blocking transmission because this mode transfers fixed number or none of events. This calculation assumes that each data block has a PCM frame which is sampled according to event timing clock. Current packet streaming layer has the same assumption. Although this sequence works fine for MOTU FireWire series at sampling transmission frequency based on 48.0kHz, it is not enough at the frequency based on 44.1kHz. The units generate choppy noise every few seconds. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/Makefile | 2 +- sound/firewire/motu/amdtp-motu.c | 292 +++++++++++++++++++++++++++++++++++++++ sound/firewire/motu/motu.h | 13 +- 3 files changed, 304 insertions(+), 3 deletions(-) commit 9dae017bf69b1c5aacba7be18cb734b66df30a37 Author: Takashi Sakamoto Date: Wed Mar 22 21:30:17 2017 +0900 ALSA: firewire-lib: enable CIP_DBC_IS_END_EVENT for both directions of stream Commit c8bdf49b9935("ALSA: fireworks/firewire-lib: Add a quirk for the meaning of dbc") adds CIP_DBC_IS_END_EVENT flag just for tx packets. However, MOTU FireWire series has this quirk for rx packets. This commit allows both directions with the flag. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 8 +++++++- sound/firewire/amdtp-stream.h | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) commit 9863874f02e1cca65bdb112336250890b2ded64a Author: Takashi Sakamoto Date: Wed Mar 22 21:30:16 2017 +0900 ALSA: firewire-lib: add support for source packet header field in CIP header In IEC 61883-1, CIP headers can have a SPH field. When a packet has 1 in SPH field of its CIP header, the packet has a source packet headers. A source packet header consists of 32 bit field (= 1 quadlet) and it transfers time stamp, which is the same value as the lower 25 bits of the IEEE 1394 CYCLE_TIMER register and the rest is zero. This commit just supports source packet header field because IEC 61883-1 includes ambiguity the position of this header and its count. Each protocol layer is allowed to have actual implementation according its requirements. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 8 ++++++-- sound/firewire/amdtp-stream.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) commit a04513f8b1980e7ddd9082461aceaf8b3e8f4981 Author: Takashi Sakamoto Date: Wed Mar 22 21:30:15 2017 +0900 ALSA: firewire-lib: record cycle count for the first packet Currently, packet streaming layer passes generated SYT value to data block processing layer. However, this is not enough in a case that the data block processing layer generates time stamps by its own ways. For out-packet stream, the packet streaming layer guarantees 8,000 times calls of data block processing layers per sec. Therefore, when cycle count of the first packet is recorded, data block processing layers can calculate own time stamps with the recorded value. For the reason, this commit allows packet streaming layer to record the first cycle count. Each data block processing layer can read the count by accessing a member of structure for packet streaming layer. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 15 +++++++++++++-- sound/firewire/amdtp-stream.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) commit 59f6482c2183fc3b3e42e0e2ae83a347ee6346c5 Author: Takashi Sakamoto Date: Wed Mar 22 21:30:14 2017 +0900 ALSA: firewire-motu: add an abstraction layer for three types of protocols In an aspect of used protocols to communicate, models of MOTU FireWire units are categorized to three generations. This commit adds an abstraction layer of the protocols for features related to packet streaming functionality. This layer includes 5 operations. When configuring packet streaming functionality with sampling rate and sampling transmission frequency, .get_clock_rate and .set_clock_rate are called with proper arguments. MOTU FireWire series supports up to 192.0kHz. When checking current source of sampling clock (not clock for packetization layer), .get_clock_source is used. Enumeration is added to represent the sources supported by this series. This operation can be used to expose available sampling rate to user space applications when the unit is configured to use any input signal as source of clock instead of crystal clock. In the protocols, the path between packet processing layer and digital signal processing layer can be controlled. This looks a functionality to 'mute' the unit. For this feature, .switch_fetching_mode is added. This can be used to suppress noises every time packet streaming starts/stops. In a point of the size of data blocks at a certain sampling transmission frequency, the most units accept several modes. This is due to usage of optical interfaces. The size differs depending on which modes are configured to the interfaces; None, S/PDIF and ADAT. Additionally, format of packet is different depending on protocols. To cache current size of data blocks and its format, .cache_packet_formats is added. This is used by PCM functionality, packet streaming functionality and data block processing layer. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu.c | 12 ++++++++++++ sound/firewire/motu/motu.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) commit 5e03c33e3d8973e2c10abbf13f8f24779babafeb Author: Takashi Sakamoto Date: Wed Mar 22 21:30:13 2017 +0900 ALSA: firewire-motu: add a structure for model-dependent parameters. MOTU FireWire series doesn't tell drivers their capabilities, thus the drivers should have and apply model-dependent parameters to detected models. This commit adds a structure to represent such parameters. Capabilities are represented by enumeration except for the number of analog line in/out. Identification name also be in the structure because the units has no registers for this purpose. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu.c | 10 +++++++--- sound/firewire/motu/motu.h | 23 +++++++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) commit 8865a31e0fd8beb157b99e78cdf1f0241a67bd54 Author: Takashi Sakamoto Date: Wed Mar 22 21:30:12 2017 +0900 ALSA: firewire-motu: postpone sound card registration Just after appearing on IEEE 1394 bus, this unit generates several bus resets. This is due to loading firmware from on-board flash memory and initialize hardware. It's better to postpone sound card registration. This commit applies this idea. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu.c | 97 ++++++++++++++++++++++++++++++++++------------ sound/firewire/motu/motu.h | 5 +++ 2 files changed, 78 insertions(+), 24 deletions(-) commit 6c3cef4890d072afa2d77371f358abaea54ec134 Author: Takashi Sakamoto Date: Wed Mar 22 21:30:11 2017 +0900 ALSA: firewire-motu: add skeleton for Mark of the unicorn (MOTU) FireWire series This commit adds an new driver for MOTU FireWire series. In this commit, this driver just creates/removes card instance according to bus event. More functionalities will be added in following commits. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/Kconfig | 10 ++++ sound/firewire/Makefile | 1 + sound/firewire/motu/Makefile | 2 + sound/firewire/motu/motu.c | 134 +++++++++++++++++++++++++++++++++++++++++++ sound/firewire/motu/motu.h | 29 ++++++++++ 5 files changed, 176 insertions(+) commit c7fc5fbafa5a676813d68b0f24ce980d717eb940 Author: Neil Armstrong Date: Thu Mar 23 17:27:28 2017 +0100 pinctrl: meson: use gpio-ranges from DT When trying to add a gpio-hog, we enter a weird loop where the gpio-ranges is needed when gpiochip_add_data() is called but in the current implementation the ranges are added from the driver afterwards. A simple solution is to rely on the DR gpio-ranges attribute and remove the call to gpiochip_add_pin_range(). Signed-off-by: Neil Armstrong Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 5fb7edb38dc7122a4d73980c86f4a4e600a535b4 Author: Krzysztof Kozlowski Date: Mon Mar 20 18:48:51 2017 +0200 MAINTAINERS: pinctrl: Add git tree to Samsung pinctrl entry Add a Git tree on @kernel.org for maintaining the Samsung pinctrl drivers. The tree will be maintained in a shared model between current Samsung pinctrl maintainers. Pull requests will be going to Linus Walleij. Also add the patchwork for linux-samsung-soc mailing list which will be used for handling the patches. Signed-off-by: Krzysztof Kozlowski Acked-by: Tomasz Figa Acked-by: Sylwester Nawrocki Signed-off-by: Linus Walleij MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 6a0ab255ae8df0542529dce37dcea9fd2a0576ac Author: Neil Armstrong Date: Thu Mar 23 11:41:10 2017 +0100 pinctrl: meson-gxl: Fix inverted registers and add missing pins Fix some inverted bit numbers in some pinctrl groups and add missing pins and groups to be in pair with the GXBB pinctrl pins definition. Signed-off-by: Neil Armstrong Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxl.c | 83 +++++++++++++++++++++++++------ 1 file changed, 68 insertions(+), 15 deletions(-) commit 88bb94216f59e10802aaf78c858a4146085faf18 Author: John Keeping Date: Thu Mar 23 10:59:31 2017 +0000 pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip With real-time preemption, regmap functions cannot be used in the implementation of irq_chip since they use spinlocks which may sleep. Move the setting of the mux for IRQs to an irq_bus_sync_unlock handler where we are allowed to sleep. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 44 ++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) commit 05709c3e88f5f0adb7889facbfd546c998f65d59 Author: John Keeping Date: Thu Mar 23 10:59:30 2017 +0000 pinctrl: rockchip: split out verification of mux settings We need to avoid calling regmap functions from irq handlers, so the next commit is going to move the call to rockchip_set_mux() into an irq_bus_sync_unlock handler. But we can't return an error from there so we still need to check the settings from rockchip_irq_set_type() and we will use this new rockchip_verify_mux() function from there. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 46 +++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 16 deletions(-) commit 70b7aa7a87b4593f50f634dc721e18bd1f9e5448 Author: John Keeping Date: Thu Mar 23 10:59:29 2017 +0000 pinctrl: rockchip: convert to raw spinlock This lock is used from rockchip_irq_set_type() which is part of the irq_chip implementation and thus must use raw_spinlock_t as documented in Documentation/gpio/driver.txt. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit f07bedc37f3cfb7b182e1337fe7c8acce71e3a25 Author: John Keeping Date: Thu Mar 23 10:59:28 2017 +0000 pinctrl: rockchip: remove unnecessary locking regmap_update_bits does its own locking and everything else accessed here is a local variable so there is no need to lock around it. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) commit d5ccfce09249e1c2f0fe62718e29b0993e4a4022 Author: Johan Hovold Date: Thu Mar 16 17:13:58 2017 +0100 USB: serial: f81534: clean up port bulk-out setup Setup each port to use the first bulk-out endpoint in calc_num_ports so that core allocates the corresponding port resources for us. Signed-off-by: Johan Hovold drivers/usb/serial/f81534.c | 62 ++++++++------------------------------------- 1 file changed, 11 insertions(+), 51 deletions(-) commit 5e07240a12101af8481a90283da766905caf35f8 Author: Johan Hovold Date: Thu Mar 16 17:13:57 2017 +0100 USB: serial: f81534: clean up calc_num_ports Clean up calc_num_ports with respect to handling older chips that lack config data. Signed-off-by: Johan Hovold drivers/usb/serial/f81534.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit d69f138747b92856cad63437f859f27da9d8ea70 Author: Johan Hovold Date: Thu Mar 16 17:13:56 2017 +0100 USB: serial: mxuport: clean up port bulk-out setup Setup each port to use the first bulk-out endpoint in calc_num_ports so that core allocates the corresponding port resources for us. Signed-off-by: Johan Hovold drivers/usb/serial/mxuport.c | 103 +++++-------------------------------------- 1 file changed, 12 insertions(+), 91 deletions(-) commit 6b0464c9d76bb6a3b192f6d518f7e5f510af72e8 Author: Johan Hovold Date: Thu Mar 16 17:13:55 2017 +0100 USB: serial: mxuport: add endpoint sanity check Add an explicit sanity check to make sure we have the expected endpoints. This will provide a descriptive error message in case an expected endpoint is missing when probing. Note that the driver already gracefully fails to probe (albeit with a less descriptive error message) if a bulk-in endpoint is missing, and an attempt to write to a port whose device lack a bulk-out endpoint would fail with -ENODEV. Signed-off-by: Johan Hovold drivers/usb/serial/mxuport.c | 2 ++ 1 file changed, 2 insertions(+) commit bc4c2c15cbfc3747d0c14f547beb5d46cbe43641 Author: Johan Hovold Date: Thu Mar 16 17:13:54 2017 +0100 USB: serial: mxuport: register two ports for unknown devices Print a message and register two ports for interfaces for which we do not know how many ports there are instead of binding, allocating resources, but not register any ports. This provides a hint that anyone adding a dynamic device id must also provide a reference id (driver info) from which the port count can be retrieved, for example: echo 0 0x110A 0x1410 > new_id Signed-off-by: Johan Hovold drivers/usb/serial/mxuport.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit ea3c6ebdcb4e6f9e1b16d9ced983a8f9131abd01 Author: Johan Hovold Date: Thu Mar 16 17:13:53 2017 +0100 USB: serial: visor: clean up treo endpoint hack Use the new endpoint-remap functionality to configure the ports for treo devices instead of poking around in the port structures after the ports have been setup. Signed-off-by: Johan Hovold drivers/usb/serial/visor.c | 82 ++++++++++++++-------------------------------- 1 file changed, 24 insertions(+), 58 deletions(-) commit da2befa6d57e9dc04060207d98b130a59e2448cd Author: Johan Hovold Date: Thu Mar 16 17:13:52 2017 +0100 USB: serial: visor: clean up clie_5 endpoint hack Use the new endpoint-remap functionality to configure the ports for clie_5 devices. Note that the same bulk-out endpoint is being used for both ports. Signed-off-by: Johan Hovold drivers/usb/serial/visor.c | 57 +++++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 34 deletions(-) commit a5b669f4c60e0bbb55b36e71ac4e273ab95160f3 Author: Johan Hovold Date: Thu Mar 16 17:13:51 2017 +0100 USB: serial: visor: drop redundant calc_num_ports callback Drop the redundant calc_num_ports callback from the clie_5 type, for which the callback always returns zero and hence falls back to the type num_ports value (2). Signed-off-by: Johan Hovold drivers/usb/serial/visor.c | 1 - 1 file changed, 1 deletion(-) commit c0dcf242d27a785930d73885471b368798720718 Author: Johan Hovold Date: Thu Mar 16 17:13:50 2017 +0100 USB: serial: ti_usb_3410_5052: always require a bulk-out endpoint These devices always require at least one bulk-out endpoint so let core verify that. This avoids attempting to send bulk data to the default pipe when downloading firmware in boot mode. Note that further endpoints are still needed when not in boot mode. Signed-off-by: Johan Hovold drivers/usb/serial/ti_usb_3410_5052.c | 2 ++ 1 file changed, 2 insertions(+) commit ea38ce081d155534494bac5df2bb0d343fb1679b Author: Julia Cartwright Date: Tue Mar 21 17:43:09 2017 -0500 gpio: pci-idio-16: make use of raw_spinlock variants The pci-idio-16 gpio driver currently implements an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Acked-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-pci-idio-16.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit d27444152c0d1fb969ee0acb8334287cf8b30d1b Author: Johan Hovold Date: Thu Mar 16 17:13:49 2017 +0100 USB: serial: omninet: use generic write implementation Now that the endpoint-port mapping has been properly set up during probe, we can switch to using the more efficient generic write implementation. Note that this currently means that chars_in_buffer now overcounts slightly as we always write a full endpoint-sized packet. Also add a copyright entry. Signed-off-by: Johan Hovold drivers/usb/serial/omninet.c | 93 ++++++++------------------------------------ 1 file changed, 17 insertions(+), 76 deletions(-) commit 3906e8089af3225a0a22c12cc3cf10be4630976e Author: Julia Cartwright Date: Tue Mar 21 17:43:08 2017 -0500 gpio: 104-idio-16: make use of raw_spinlock variants The 104-idio-16 gpio driver currently implements an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Acked-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-idio-16.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 2dc1071b345816eca531360a22fa7a70563a7fc2 Author: Johan Hovold Date: Thu Mar 16 17:13:48 2017 +0100 USB: serial: omninet: clean up port setup These devices use the second bulk-out endpoint for writing. Instead of using the resources of the second port structure setup by core, use the new endpoint-remap functionality to simply ignore the first bulk-out endpoint. This specifically avoids allocating resources for the unused endpoint. Note that the disconnect callback was always redundant as all URBs would have been killed by USB core on disconnect. Signed-off-by: Johan Hovold drivers/usb/serial/omninet.c | 47 ++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 26 deletions(-) commit 95254020235aa0c0f12bfb7d9b4cd18730dfc499 Author: Johan Hovold Date: Thu Mar 16 17:13:47 2017 +0100 USB: serial: mos7840: clean up endpoint sanity check Clean up the endpoint sanity check by letting core verify the single interrupt endpoint, and verifying the bulk endpoints in calc_num_ports after having determined the number of ports. Note that the static type num_ports field was neither correct or used (since calc_num_ports never returns zero). Signed-off-by: Johan Hovold drivers/usb/serial/mos7840.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 6a1eaf19f525ed9e4fa09ed1f05c6502a90b4ccb Author: Johan Hovold Date: Thu Mar 16 17:13:46 2017 +0100 USB: serial: mos7720: always require an interrupt endpoint This driver have treated the interrupt endpoint as optional despite it always being present (according to the datasheet). Let's consider it mandatory instead. Signed-off-by: Johan Hovold drivers/usb/serial/mos7720.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d760557d38ba62a8fe91dec5e32acb4fdf52d9d4 Author: Johan Hovold Date: Thu Mar 16 17:13:45 2017 +0100 USB: serial: mos7720: clean up mcs7715 port setup Clean up the mcs7715 port setup by using the new endpoint-remap functionality provided by core. Instead of poking around in internal port-structure fields, simply swap the endpoint descriptors of the two ports in calc_num_ports before the port structures are even allocated. Note that we still need to override the default interrupt completion handler. Signed-off-by: Johan Hovold drivers/usb/serial/mos7720.c | 52 +++++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 32 deletions(-) commit 772b2c5d6c929d9d35e9c915dea8df8c6a799aed Author: Johan Hovold Date: Thu Mar 16 17:13:44 2017 +0100 USB: serial: io_ti: drop redundant read-urb check Drop the redundant read-urb check from open. The presence of a bulk-in endpoint is now verified during probe and core has allocated the corresponding resources. Signed-off-by: Johan Hovold drivers/usb/serial/io_ti.c | 6 ------ 1 file changed, 6 deletions(-) commit 9c8299b43e577828057988eb8bd4920ab656022b Author: Johan Hovold Date: Thu Mar 16 17:13:43 2017 +0100 USB: serial: io_ti: verify interrupt endpoint at probe Verify that the required interrupt endpoint is present at probe rather than at open to avoid allocating resources for an unusable device. Note that the endpoint is only required when in download mode. Signed-off-by: Johan Hovold drivers/usb/serial/io_ti.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 8d9c4d9ebffe5ed7be34dad7bc4ef4ab6807c501 Author: Johan Hovold Date: Thu Mar 16 17:13:42 2017 +0100 USB: serial: io_ti: always require a bulk-out endpoint These devices always require at least one bulk-out endpoint so let core verify that. This avoids attempting to send bulk data to the default pipe when downloading firmware in boot mode. Note that further endpoints are still needed when not in boot mode. Signed-off-by: Johan Hovold drivers/usb/serial/io_ti.c | 2 ++ 1 file changed, 2 insertions(+) commit 49f4ff2d74f5b6a865f6433c8995855092dcf97a Author: Johan Hovold Date: Thu Mar 16 17:13:41 2017 +0100 USB: serial: io_ti: use calc_num_endpoints to verify endpoints Use the calc_num_ports rather than attach callback to verify that the required endpoints are present when in download mode. This avoids allocating port resources for interfaces that won't be bound. Signed-off-by: Johan Hovold drivers/usb/serial/io_ti.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 204cc473bc896134870fda21cd279774b3ead024 Author: Johan Hovold Date: Thu Mar 16 17:13:40 2017 +0100 USB: serial: ipaq: always register a single port Use the calc_num_ports callback to ignore unused endpoints. The driver binds to any interface with at least one bulk-in and one bulk-out endpoint, but some devices can have three or more endpoints of which only either the first or second pair of endpoints is needed. This avoids allocating resources for unused endpoints, and specifically a port is no longer registered for the unused first endpoint pair when there are more than three endpoints. Signed-off-by: Johan Hovold drivers/usb/serial/ipaq.c | 41 +++++++++++++++-------------------------- 1 file changed, 15 insertions(+), 26 deletions(-) commit 03b72aecadc2d7b0e8f200ec70b853e39a7e55da Author: Johan Hovold Date: Thu Mar 16 17:13:39 2017 +0100 USB: serial: ipaq: use calc_num_endpoints to verify endpoints Use the calc_num_ports rather than attach callback to determine which interface to bind to in order to avoid allocating port-resources for interfaces that won't be bound. Signed-off-by: Johan Hovold drivers/usb/serial/ipaq.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 2f16621b9a06c1956eba57a23ff990bd24ceee82 Author: Johan Hovold Date: Thu Mar 16 17:13:38 2017 +0100 USB: serial: f81534: abort probe on early errors We can now abort probe early after an error in calc_num_ports by returning an errno instead of attempting to continue probing but not register any ports. Signed-off-by: Johan Hovold drivers/usb/serial/f81534.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cac4cea513c7193512a58da4b1bfa46c04246546 Author: Johan Hovold Date: Thu Mar 16 17:13:37 2017 +0100 USB: serial: f81534: use calc_num_endpoints to verify endpoints Simplify the endpoint sanity check by letting core verify that the required endpoints are present and moving the max-packet check to calc_num_ports. Signed-off-by: Johan Hovold drivers/usb/serial/f81534.c | 55 +++++++++------------------------------------ 1 file changed, 11 insertions(+), 44 deletions(-) commit 5f391979c9aaa0ccecaf40f9b39359c584f7d615 Author: Johan Hovold Date: Thu Mar 16 17:13:36 2017 +0100 USB: serial: aircable: use calc_num_endpoints to verify endpoints Use the calc_num_ports rather than probe callback to determine which interface to bind to. This allows us to remove some duplicate code. Signed-off-by: Johan Hovold drivers/usb/serial/aircable.c | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) commit 9d717271d6b5cbbe6aaa975648d9dcfe9b6e7b82 Author: Johan Hovold Date: Thu Mar 16 17:13:35 2017 +0100 USB: serial: pl2303: clean up legacy endpoint hack Implement the "horrible endpoint hack" for some legacy devices as a quirk and clean up the code somewhat. Note that the bulk-endpoint check can be removed as core will already have verified this. Signed-off-by: Johan Hovold drivers/usb/serial/pl2303.c | 84 +++++++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 38 deletions(-) commit 9fda620a5f3d7711d0b27d36eeec3a24a097af97 Author: Johan Hovold Date: Thu Mar 16 17:13:34 2017 +0100 USB: serial: move pl2303 hack out of usb-serial core Some pl2303 devices require the use of the interrupt endpoint of an unrelated interface. This has so far been dealt with in usb-serial core, but can now be moved to a driver calc_num_ports callback. Note that we relax the endpoint requirements checked by core and instead verify that we have an interrupt-in endpoint in calc_num_ports for all devices so that the hack can first be applied. Signed-off-by: Johan Hovold drivers/usb/serial/pl2303.c | 57 +++++++++++++++++++++++++++++++++++++++-- drivers/usb/serial/usb-serial.c | 40 ----------------------------- 2 files changed, 55 insertions(+), 42 deletions(-) commit 6538808c5619850cfedc9bee6d64d3793b31923d Author: Johan Hovold Date: Thu Mar 16 17:13:33 2017 +0100 USB: serial: relax generic driver bulk-endpoint requirement Relax the generic driver bulk-endpoint requirement. The driver handles devices without bulk-out endpoints just fine these days. Signed-off-by: Johan Hovold drivers/usb/serial/generic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a794499b261b8487a984783ccc864975e1bcc7bf Author: Johan Hovold Date: Thu Mar 16 17:13:32 2017 +0100 USB: serial: add calc_num_ports callback to generic driver Add a calc_num_ports callback to the generic driver and verify that the device has the required endpoints there instead of in core. Note that the generic driver num_ports field was never used. Signed-off-by: Johan Hovold drivers/usb/serial/generic.c | 18 ++++++++++++++++-- drivers/usb/serial/usb-serial.c | 27 ++++++++------------------- include/linux/usb/serial.h | 1 - 3 files changed, 24 insertions(+), 22 deletions(-) commit 415d7b3a5407d91fdf47a07fd31d63e4b548651f Author: Johan Hovold Date: Thu Mar 16 17:13:31 2017 +0100 USB: serial: add probe callback to generic driver Add a probe callback to the generic driver and print the only-for-testing message there. This is a first step in getting rid of the CONFIG_USB_SERIAL_GENERIC ifdef from usb-serial core. Signed-off-by: Johan Hovold drivers/usb/serial/generic.c | 12 ++++++++++++ drivers/usb/serial/usb-serial.c | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-) commit 07814246dd5530860ef758fd9b2b5f2e26472aa2 Author: Johan Hovold Date: Thu Mar 16 17:13:30 2017 +0100 USB: serial: allow subdrivers to modify port-endpoint mapping Allow subdrivers to modify the port-endpoint mapping by passing the endpoint descriptors to calc_num_ports. The callback can now also be used to verify that the required endpoints exists and abort probing otherwise. This will allow us to get rid of a few hacks in subdrivers that are already modifying the port-endpoint mapping (or aborting probe due to missing endpoints), but only after the port structures have been setup. Signed-off-by: Johan Hovold drivers/usb/serial/f81534.c | 3 ++- drivers/usb/serial/ipaq.c | 6 ++++-- drivers/usb/serial/mos7720.c | 3 ++- drivers/usb/serial/mos7840.c | 3 ++- drivers/usb/serial/mxuport.c | 3 ++- drivers/usb/serial/quatech2.c | 3 ++- drivers/usb/serial/sierra.c | 3 ++- drivers/usb/serial/usb-serial.c | 19 ++++++------------- drivers/usb/serial/visor.c | 6 ++++-- include/linux/usb/serial.h | 19 ++++++++++++++++--- 10 files changed, 42 insertions(+), 26 deletions(-) commit c1aecc537627cfb569a16b4badc2a5ec600c989a Author: Jani Nikula Date: Wed Mar 15 12:49:26 2017 +0200 drm/i915: update the firmware download URL The old URL works but gives 301 Moved Permanently. Update. Reviewed-by: Michal Wajdeczko Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1489574966-27200-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_csr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f9ab0c1570800002e77515888600ca2e3dce4a9 Author: Sebastian Reichel Date: Fri Mar 24 09:47:31 2017 +0100 mfd: cpcap: Add missing include dependencies This fixes compilation for files, that try to include the cpcap header in alphabetically sorted #include lists. Acked-by: Pavel Machek Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel Signed-off-by: Lee Jones include/linux/mfd/motorola-cpcap.h | 3 +++ 1 file changed, 3 insertions(+) commit 4adda532c05fa74602408cea319dcace884f7c67 Merge: 22f880c e5c1ff1 Author: Daniel Vetter Date: Tue Mar 28 10:02:45 2017 +0200 Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued Backmerge drm-next to get at -rc4, which we need to land the 4.12 gvt patches. Signed-off-by: Daniel Vetter commit 86cc921cb4aa8fb213dfbe68540a8a6c02f54840 Author: Shashank Sharma Date: Tue Mar 28 10:06:19 2017 +0300 drm: Add description for scdc variable This patch adds description about 'scdc' variable in drm_hdmi_info structure, to fix this warning during doc-build. "drm_connector.h:140: warning: No description found for parameter 'scdc'" V2: Rebase V3: Added extra * V4: Removed merged conflict V5: Removed extra line at start of structure (Daniel) V6: Make description single line (Daniel) Cc: Daniel Vetter Signed-off-by: Shashank Sharma Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1490684779-21633-1-git-send-email-shashank.sharma@intel.com include/drm/drm_connector.h | 1 + 1 file changed, 1 insertion(+) commit e5c1ff14757afe21733ddee9cc4bbaeaeadbf803 Merge: 65d1086 c02ed2e Author: Dave Airlie Date: Tue Mar 28 17:34:19 2017 +1000 Backmerge tag 'v4.11-rc4' into drm-next Linux 4.11-rc4 The i915 GVT team need the rc4 code to base some more code on. commit 22f880ca8246c6c80c4f48731c6a7d5d15042f56 Author: Matthew Auld Date: Mon Mar 27 21:34:59 2017 +0100 drm/i915/perf: destroy stream on sample_flags mismatch If we were to ever encounter a sample_flags mismatch we need to ensure we destroy the stream when we bail. Fixes: d79651522e89 ("drm/i915: Enable i915 perf stream for Haswell OA unit") Signed-off-by: Matthew Auld Cc: Robert Bragg Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170327203459.18398-1-matthew.auld@intel.com drivers/gpu/drm/i915/i915_perf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 14292b7ff86f0ee63e9413d470f57456127ee6c2 Author: Shashank Sharma Date: Mon Mar 13 16:54:04 2017 +0530 drm/i915: allow HDMI 2.0 clock rates Geminilake has a native HDMI 2.0 controller, which is capable of driving clocks upto 594Mhz. This patch updates the max tmds clock limit for the same. V2: rebase V3: rebase V4: added r-b from Ander V5: rebase V6: rebase V7: rebase V8: rebase V9: rebase V10: rebase Cc: Ander Conselvan De Oliveira Signed-off-by: Shashank Sharma Reviewed-by: Ander Conselvan De Oliveira Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1489404244-16608-7-git-send-email-shashank.sharma@intel.com drivers/gpu/drm/i915/intel_hdmi.c | 2 ++ 1 file changed, 2 insertions(+) commit 15953637886d88d31cb54d461f1f3dcaa8146673 Author: Shashank Sharma Date: Mon Mar 13 16:54:03 2017 +0530 drm/i915: enable scrambling Geminilake platform sports a native HDMI 2.0 controller, and is capable of driving pixel-clocks upto 594Mhz. HDMI 2.0 spec mendates scrambling for these higher clocks, for reduced RF footprint. This patch checks if the monitor supports scrambling, and if required, enables it during the modeset. V2: Addressed review comments from Ville: - Do not track scrambling status in DRM layer, track somewhere in driver like in intel_crtc_state. - Don't talk to monitor at such a low layer, set monitor scrambling in intel_enable_ddi() before enabling the port. V3: Addressed review comments from Jani - In comments, function names, use "sink" instead of "monitor", so that the implementation could be close to the language of HDMI spec. V4: Addressed review comment from Maarten - scrambling -> hdmi_scrambling - high_tmds_clock_ratio -> hdmi_high_tmds_clock_ratio V5: Addressed review comments from Ville and Ander - Do not modifiy the crtc_state after compute_config. Move all scrambling and tmds_clock_ratio calcutations to compute_config. - While setting scrambling for source/sink, do not check the conditions again, just go by the crtc_state flags. This will simplyfy the condition checks. V6: Addressed review comments from Ville - Do not add IS_GLK check in disable/enable function, instead add it in compute_config, while setting state flags. - Remove unnecessary paranthesis. - Simplyfy handle_sink_scrambling function as suggested. - Add readout code for scrambling status in get_ddi_config and add a check for the same in pipe_config_compare. V7: Addressed review comments from Ander/Ville - No separate function for source scrambling, make it inline - Align the last line of the macro TRANS_DDI_HDMI_SCRAMBLING_MASK - Do not add platform check while setting source scrambling - Use pipe_config instead of crtc->config to set sink scrambling - To readout scrambling status, Compare with SCRAMBLING_MASK not any of its bits - Remove platform check in intel_pipe_config_compare while checking scrambling status V8: Fixed mege conflict, Addressed review comments from Ander - Remove the desciption/comment about scrambling fom the caller, move it to the function - Move the IS_GLK check into scrambling function - Fix alignment V9: Fixed review comments from Ville, Ander - Pass the scrambling state variables as bool input to the sink_scrambling function and let the disable call be unconditional. - Fix alignments in function calls and debug messages. - Add kernel doc for function intel_hdmi_handle_sink_scrambling V10: Rebase Signed-off-by: Shashank Sharma Reviewed-by: Ander Conselvan de Oliveira Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1489404244-16608-6-git-send-email-shashank.sharma@intel.com drivers/gpu/drm/i915/i915_reg.h | 7 ++++ drivers/gpu/drm/i915/intel_ddi.c | 23 +++++++++++++ drivers/gpu/drm/i915/intel_display.c | 3 ++ drivers/gpu/drm/i915/intel_drv.h | 10 ++++++ drivers/gpu/drm/i915/intel_hdmi.c | 63 ++++++++++++++++++++++++++++++++++++ 5 files changed, 106 insertions(+) commit 32b40a82e84414499bb4d635cafb9de9e45e6c38 Author: Borislav Petkov Date: Mon Mar 27 11:33:04 2017 +0200 x86/mce: Do not register notifiers with invalid prio This is just a defensive precaution: do not register notifiers with a priority which would disrupt the error handling in the notifiers with prio higher than MCE_PRIO_EDAC. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-edac Link: http://lkml.kernel.org/r/20170327093304.10683-7-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5de97c9f6d85fd83af76e09e338b18e7adb1ae60 Author: Tony Luck Date: Mon Mar 27 11:33:03 2017 +0200 x86/mce: Factor out and deprecate the /dev/mcelog driver Move all code relating to /dev/mcelog to a separate source file. /dev/mcelog driver can now operate from the machine check notifier with lowest prio. Signed-off-by: Tony Luck [ Move the mce_helper and trigger functionality behind CONFIG_X86_MCELOG_LEGACY. ] Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-edac Link: http://lkml.kernel.org/r/20170327093304.10683-6-bp@alien8.de [ Renamed CONFIG_X86_MCELOG to CONFIG_X86_MCELOG_LEGACY. ] Signed-off-by: Ingo Molnar Signed-off-by: Ingo Molnar arch/x86/Kconfig | 10 +- arch/x86/include/asm/mce.h | 1 + arch/x86/kernel/cpu/mcheck/Makefile | 2 + arch/x86/kernel/cpu/mcheck/dev-mcelog.c | 397 ++++++++++++++++++++++++++++++ arch/x86/kernel/cpu/mcheck/mce-internal.h | 8 + arch/x86/kernel/cpu/mcheck/mce.c | 372 +--------------------------- 6 files changed, 426 insertions(+), 364 deletions(-) commit 011d8261117249eab97bc86a8e1ac7731e03e319 Author: Borislav Petkov Date: Mon Mar 27 11:33:02 2017 +0200 RAS: Add a Corrected Errors Collector Introduce a simple data structure for collecting correctable errors along with accessors. More detailed description in the code itself. The error decoding is done with the decoding chain now and mce_first_notifier() gets to see the error first and the CEC decides whether to log it and then the rest of the chain doesn't hear about it - basically the main reason for the CE collector - or to continue running the notifiers. When the CEC hits the action threshold, it will try to soft-offine the page containing the ECC and then the whole decoding chain gets to see the error. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-edac Link: http://lkml.kernel.org/r/20170327093304.10683-5-bp@alien8.de Signed-off-by: Ingo Molnar Documentation/admin-guide/kernel-parameters.txt | 6 + arch/x86/include/asm/mce.h | 9 +- arch/x86/kernel/cpu/mcheck/mce.c | 191 +++++---- arch/x86/ras/Kconfig | 14 + drivers/ras/Makefile | 3 +- drivers/ras/cec.c | 532 ++++++++++++++++++++++++ drivers/ras/debugfs.c | 2 +- drivers/ras/debugfs.h | 8 + drivers/ras/ras.c | 11 + include/linux/ras.h | 13 +- 10 files changed, 706 insertions(+), 83 deletions(-) commit e64edfcce9c738300b4102d0739577d6ecc96d4a Author: Borislav Petkov Date: Mon Mar 27 11:33:01 2017 +0200 x86/mce: Rename mce_log to mce_log_buffer It is confusing when staring at "struct mce_log mcelog" and then there's also a function called mce_log(). So call the buffer what it is. No functionality change. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-edac Link: http://lkml.kernel.org/r/20170327093304.10683-4-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/include/asm/mce.h | 2 +- arch/x86/kernel/cpu/mcheck/mce.c | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) commit fe3ed20fddfd8c6a4dcfb8e43de80f269d1f3f2a Author: Borislav Petkov Date: Mon Mar 27 11:33:00 2017 +0200 x86/mce: Rename mce_log()'s argument We call it everywhere "struct mce *m". Adjust that here too to avoid confusion. No functionality change. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-edac Link: http://lkml.kernel.org/r/20170327093304.10683-3-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4a96d1a5f0c51a0c991fb47160eca305ba628110 Merge: 5204bf1 cc66afe Author: Ingo Molnar Date: Tue Mar 28 08:54:25 2017 +0200 Merge branch 'ras/urgent' into ras/core, to pick up fix Signed-off-by: Ingo Molnar commit 591a3d7c09fa08baff48ad86c2347dbd28a52753 Author: Kirill A. Shutemov Date: Fri Mar 24 14:13:05 2017 +0300 mm: Fix false-positive VM_BUG_ON() in page_cache_{get,add}_speculative() 0day testing by Fengguang Wu triggered this crash while running Trinity: kernel BUG at include/linux/pagemap.h:151! ... CPU: 0 PID: 458 Comm: trinity-c0 Not tainted 4.11.0-rc2-00251-g2947ba0 #1 ... Call Trace: __get_user_pages_fast() get_user_pages_fast() get_futex_key() futex_requeue() do_futex() SyS_futex() do_syscall_64() entry_SYSCALL64_slow_path() It' VM_BUG_ON() due to false-negative in_atomic(). We call page_cache_get_speculative() with disabled local interrupts. It should be atomic enough. So let's check for disabled interrupts in the VM_BUG_ON() condition too, to resolve this. ( This got triggered by the conversion of the x86 GUP code to the generic GUP code. ) Reported-by: Fengguang Wu Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Aneesh Kumar K.V Cc: Kirill A. Shutemov Cc: LKP Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170324114709.pcytvyb3d6ajux33@black.fi.intel.com Signed-off-by: Ingo Molnar include/linux/pagemap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3906a13a6b4e78fbc0def03a808f091f0dff1b44 Merge: d652f4b 55f77128 Author: Ingo Molnar Date: Tue Mar 28 07:44:43 2017 +0200 Merge tag 'perf-core-for-mingo-4.12-20170327' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: New features: - Handle inline functions in callchains (Jin Yao) - Enable sorting by srcline as key (Milian Wolff) Fixes: - Fix no_size logic in addr_filter__resolve_kernel_syms() in the auxtrace code (Adrian Hunter) - Fix some thread refcount leaks in 'perf trace' (Arnaldo Carvalho de Melo) - Fix divide by zero when calculating percent for an event in a group in the annotate by source line code (Taeung Song) - build-id files now aren't anymore symlinks, their parent directories are, so readlink the later (Taeung Song) - Assorted fixes for null termination problems, mostly related to readlink, detected by valgrind (Tommi Rantala) Infrastructure changes: - Make vfs_getname probe point logic in 'perf trace' more robust wrt length of pathname (Arnaldo Carvalho de Melo) - Remove unused 'prefix' parameter from builtins main functions (Arnaldo Carvalho de Melo) - Show 'perf list sdt' option in man page (Ravi Bangoria) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit d652f4bbca35100358bad83c29ec0e40a1f8e5cc Merge: e3a6a62 a01851f Author: Ingo Molnar Date: Tue Mar 28 07:44:25 2017 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit cc628c9680c212d9dbf68785fbf5d454ccb2313e Merge: 95ed0ed 2e20a15 Author: David S. Miller Date: Mon Mar 27 21:16:03 2017 -0700 Merge tag 'mlx5e-failsafe' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5e-failsafe 27-03-2017 This series provides a fail-safe mechanism to allow safely re-configuring mlx5e netdevice and provides a resiliency against sporadic configuration failures. To enable this we do some refactoring and code reorganizing to allow breaking the drivers open/close flows to stages: open -> activate -> deactivate -> close. In addition we need to allow creating fresh HW ring resources (mlx5e_channels) with their own "new" set of parameters, while keeping the current ones running and active until the new channels are successfully created with the new configuration, and only then we can safly replace (switch) old channels with new ones. For that we introduce mlx5e_channels object and an API to manage it: - channels = open_channels(new_params): open fresh TX/RX channels - activate_channels(channels): redirect traffic to them and attach them to the netdev - deactivate_channes(channels) stop traffic and detach from netdev - close(channels) Free the TX/RX HW resources of those channels With the above strategy it is straightforward to achieve the desired behavior of fail-safe configuration. In pseudo code: make_new_config(new_params) { old_channels = current_active_channels; new_channels = create_channels(new_params); if (!new_channels) return "Failed, but current channels are still active :)" deactivate_channels(old_channels); /* Can't fail */ set_hw_new_state(); /* If needed */ activate_channels(new_channels); /* Can't fail */ close_channels(old_channels); current_active_channels = new_channels; return "SUCCESS"; } At the top of this series, we change the following flows to be fail-safe: ethtool: - ring parameters - coalesce parameters - tx copy break parameters - cqe compressing/moderation mode setting (priv flags) ndos: - tc setup - set features: LRO - change mtu ==================== Signed-off-by: David S. Miller commit 95ed0edd833fa07299d4ff38116c0496ce766364 Merge: 205ed44 e292dca Author: David S. Miller Date: Mon Mar 27 21:11:50 2017 -0700 Merge branch 'bond-link-status-fixes' Mahesh Bandewar says: ==================== link-status fixes for mii-monitoring The mii monitoring is divided into two phases - inspect and commit. The inspect phase technically should not make any changes to the state and defer it to the commit phase. However detected link state inconsistencies on several machines and discovered that it's the result of some inconsistent update to link states and assumption that you *always* get rtnl-mutex. In reality when trylock() fails to acquire rtnl-mutex, the commit phase is postponed until next mii-mon run. At the next round because of the state change performed in the previous inspect-run, this round does not detect any changes and would skip calling commit phase. This would result in an inconsistent state until next link event happens (if it ever happens). During the the commit phase, it's always assumed that speed and duplex fetch is always successful, but that's always not the case. However the slave state is marked UP irrespective of speed / duplex fetch operation. If the speed / duplex fetch operation results in insane values for either of these two fields, then keeping internal link state UP is not going to provide fruitful results either. Please see into individual patches for more details. ==================== Signed-off-by: David S. Miller commit e292dcae1648cd5b5c80031a154f594aa590667f Author: Mahesh Bandewar Date: Mon Mar 27 11:37:40 2017 -0700 bonding: avoid printing while holding a spinlock Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/bonding/bond_3ad.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b5bf0f5b16b9c316c34df9f31d4be8729eb86845 Author: Mahesh Bandewar Date: Mon Mar 27 11:37:37 2017 -0700 bonding: correctly update link status during mii-commit phase bond_miimon_commit() marks the link UP after attempting to get the speed and duplex settings for the link. There is a possibility that bond_update_speed_duplex() could fail. This is another place where it could result into an inconsistent bonding link state. With this patch the link will be marked UP only if the speed and duplex values retrieved have sane values and processed further. Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c4adfc822bf5d8e97660b6114b5a8892530ce8cb Author: Mahesh Bandewar Date: Mon Mar 27 11:37:35 2017 -0700 bonding: make speed, duplex setting consistent with link state bond_update_speed_duplex() retrieves speed and duplex settings. There is a possibility of failure in retrieving these values but caller has to assume it's always successful. This leads to having inconsistent slave link settings. If these (speed, duplex) values cannot be retrieved, then keeping the link UP causes problems. The updated bond_update_speed_duplex() returns 0 on success if it retrieves sane values for speed and duplex. On failure it returns 1 and marks the link down. Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit de77ecd4ef02ca783f7762e04e92b3d0964be66b Author: Mahesh Bandewar Date: Mon Mar 27 11:37:33 2017 -0700 bonding: improve link-status update in mii-monitoring The primary issue is that mii-inspect phase updates link-state and expects changes to be committed during the mii-commit phase. After the inspect phase if it fails to acquire rtnl-mutex, the commit phase (bond_mii_commit) doesn't get to run. This partially updated state stays and makes the internal-state inconsistent. e.g. setup bond0 => slaves: eth1, eth2 eth1 goes DOWN -> UP mii_monitor() mii-inspect() bond_set_slave_link_state(eth1, UP, DontNotify) rtnl_trylock() <- fails! Next mii-monitor round eth1: No change mii_monitor() mii-inspect() eth1->link == current-status (ethtool_ops->get_link) no-change-detected End result: eth1: Link = BOND_LINK_UP Speed = 0xfffff [SpeedUnknown] Duplex = 0xff [DuplexUnknown] This doesn't always happen but for some unlucky machines in a large set of machines it creates problems. The fix for this is to avoid making changes during inspect phase and postpone them until acquiring the rtnl-mutex / invoking commit phase. Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit f307668bfcb7e83b6f62bda6a703e09613a00bd0 Author: Mahesh Bandewar Date: Mon Mar 27 11:37:30 2017 -0700 bonding: split bond_set_slave_link_state into two parts Split the function into two (a) propose (b) commit phase without changing the semantics for the original API. Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller include/net/bonding.h | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 4f9b514b765a3057341f3236c94877d9413babc7 Author: Thadeu Lima de Souza Cascardo Date: Mon Mar 27 16:32:33 2017 -0300 powerpc: Make /proc/self/stack always print the current stack For the current task, the kernel stack would only tell the last time the process was rescheduled, if ever. Use the current stack pointer for the current task. Otherwise, every once in a while, the stacktrace printed when reading /proc/self/stack would look like the process is running in userspace, while it's not, which some may consider as a bug. This is also consistent with some other architectures, like x86 and arm, at least. Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Michael Ellerman arch/powerpc/kernel/stacktrace.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 6faecba0b3da7b617bf72bef422bf0d3bb6dfe7d Author: Shikhar Dogra Date: Mon Mar 27 16:16:44 2017 -0700 driver: (adm1275) set the m,b and R coefficients correctly for power Seems like coefficient values for m, b and R under power have been put in the wrong order. Rearranging them properly to get correct values of coefficients for power. For specs, please refer to table 7 (page 35) on http://www.analog.com/media/en/technical-documentation/data-sheets/ADM1075.pdf Fixes: 904b296f308d ("hwmon: (adm1275) Introduce configuration data structure for coeffcients") Signed-off-by: Shikhar Dogra Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/adm1275.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ce8c4a1ec92bec6e6648d6292c748d27e88f3c76 Author: Jack Wang Date: Fri Mar 24 10:49:52 2017 +0100 MAINTAINERS: remove pmchba list for PM8001 The email address is undeliverable for some time now, so just remove it. Signed-off-by: Jack Wang Signed-off-by: Martin K. Petersen MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit cbe9fc8594e503ff071b8d2e0ce503457029b0fb Author: Jitendra Bhivare Date: Fri Mar 24 14:11:49 2017 +0530 scsi: be2iscsi: Update driver version Version 11.4.0.0 Signed-off-by: Jitendra Bhivare Reviewed-by: Tomas Henzl Reviewed-by: Chris Leech Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 942b76542ea042a1cb7d51ce493865f892f0fe00 Author: Jitendra Bhivare Date: Fri Mar 24 14:11:48 2017 +0530 scsi: be2iscsi: Update Copyright Update Broadcom Copyright markings in all files. Signed-off-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be.h | 11 ++++------- drivers/scsi/be2iscsi/be_cmds.c | 11 ++++------- drivers/scsi/be2iscsi/be_cmds.h | 11 ++++------- drivers/scsi/be2iscsi/be_iscsi.c | 13 ++++--------- drivers/scsi/be2iscsi/be_iscsi.h | 13 ++++--------- drivers/scsi/be2iscsi/be_main.c | 13 ++++--------- drivers/scsi/be2iscsi/be_main.h | 13 ++++--------- drivers/scsi/be2iscsi/be_mgmt.c | 13 ++++--------- drivers/scsi/be2iscsi/be_mgmt.h | 13 ++++--------- 9 files changed, 36 insertions(+), 75 deletions(-) commit 0ddee50e3f22964864b1a5f3cc632dd306ed1060 Author: Jitendra Bhivare Date: Fri Mar 24 14:11:47 2017 +0530 scsi: be2iscsi: Check size before copying ASYNC handle Data in buffers are gathered into a single buffer before giving to iSCSI layer. Though less likely to have payload more than 8K in ASYNC PDU, the data length is provide by FW and check is missing for overrun. Signed-off-by: Jitendra Bhivare Reviewed-by: Tomas Henzl Reviewed-by: Chris Leech Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ba6983a745fa292c36a93cac18abaf3f316f70d1 Author: Jitendra Bhivare Date: Fri Mar 24 14:11:46 2017 +0530 scsi: be2iscsi: Remove free_list for ASYNC handles With previous patch adding ASYNC Rx buffers to free_list is not required. Remove all free_list related operations. Add in_use to track if buffer posted is being processed by driver and purge all buffers received for connection if found so. Signed-off-by: Jitendra Bhivare Reviewed-by: Tomas Henzl Reviewed-by: Chris Leech Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 99 +++++++++++++++++------------------------ drivers/scsi/be2iscsi/be_main.h | 8 +--- 2 files changed, 43 insertions(+), 64 deletions(-) commit 1e2931f134d44e413281dfc458b537d170e98596 Author: Jitendra Bhivare Date: Fri Mar 24 14:11:45 2017 +0530 scsi: be2iscsi: Use num_cons field in Rx CQE FW runs out of buffer if buffers are not posted back soon. ASYNC Rx CQE indicates that FW has consumed 8 RQEs. Use it to post back buffers instead of waiting for buffers to be processed and freed by driver. Signed-off-by: Jitendra Bhivare Reviewed-by: Tomas Henzl Reviewed-by: Chris Leech Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 124 ++++++++++++++++------------------------ drivers/scsi/be2iscsi/be_main.h | 1 + 2 files changed, 51 insertions(+), 74 deletions(-) commit fecc3824696c18dbaf95abe8f3d2480b6aee76f0 Author: Jitendra Bhivare Date: Fri Mar 24 14:11:44 2017 +0530 scsi: be2iscsi: Increase HDQ default queue size Currently, ASYNC PDU default queue size is set to max connections. This leaves only one buffer per connection for any ASYNC PDUs from targets. Double the size of the default queue. Signed-off-by: Jitendra Bhivare Reviewed-by: Tomas Henzl Reviewed-by: Chris Leech Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 29 ++++++++++++++--------------- drivers/scsi/be2iscsi/be_main.h | 4 +++- 2 files changed, 17 insertions(+), 16 deletions(-) commit 90e96313a9d38c21d4b9f81a824d0fbebb5d307c Author: Jitendra Bhivare Date: Fri Mar 24 14:11:43 2017 +0530 scsi: scsi_transport_iscsi: Use flush_work in iscsi_remove_session scsi_flush_work flushes workqueue for the Scsi_Host. In iSCSI offload enabled host, this would wait for all other sessions under the host. Use flush_work for the session being removed instead. Signed-off-by: Jitendra Bhivare Reviewed-by: Tomas Henzl Reviewed-by: Chris Leech Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_iscsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d1e1d63b32b79a6b3d93ce7a6dd0d48b8cf472fd Author: Jitendra Bhivare Date: Fri Mar 24 14:11:42 2017 +0530 scsi: be2iscsi: Replace spin_unlock_bh with spin_lock spin_unlock_bh back_lock is used in beiscsi_eh_device_reset instead of spin_lock. Signed-off-by: Jitendra Bhivare Reviewed-by: Tomas Henzl Reviewed-by: Chris Leech Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49fc5152f5904aeab75aaef631ea61dff7ee76d8 Author: Jitendra Bhivare Date: Fri Mar 24 14:11:41 2017 +0530 scsi: be2iscsi: Fix closing of connection CID needs to be freed even when invalidate or upload connection fails. Attempt to close connection 3 times before freeing CID. Set cleanup_type to INVALIDATE instead of force TCP_RST. This unnecessarily is terminating connection with reset instead of gracefully closing it. Set save_cfg to 0 - session not to be saved on flash. Add delay and process CQ before uploading connection. Signed-off-by: Jitendra Bhivare Reviewed-by: Tomas Henzl Reviewed-by: Chris Leech Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be.h | 1 - drivers/scsi/be2iscsi/be_cmds.h | 63 +++++++++---------- drivers/scsi/be2iscsi/be_iscsi.c | 98 +++++++++++++++++------------- drivers/scsi/be2iscsi/be_mgmt.c | 127 ++++++++++++++++++++------------------- drivers/scsi/be2iscsi/be_mgmt.h | 30 ++------- 5 files changed, 159 insertions(+), 160 deletions(-) commit eb419229be58dc6d4a3a814116a265908e088c39 Author: Jitendra Bhivare Date: Fri Mar 24 14:11:40 2017 +0530 scsi: be2iscsi: Check tag in beiscsi_mccq_compl_wait scsi host12: BS_1377 : mgmt_invalidate_connection Failed for cid=256 BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 IP: [] __list_add+0xf/0xc0 PGD 0 Oops: 0000 [#1] SMP Modules linked in: ... CPU: 9 PID: 1542 Comm: iscsid Tainted: G ------------ T 3.10.0-514.el7.x86_64 #1 Hardware name: HP ProLiant DL360 Gen9/ProLiant DL360 Gen9, BIOS P89 09/12/2016 task: ffff88076f310fb0 ti: ffff88076bba8000 task.ti: ffff88076bba8000 RIP: 0010:[] [] __list_add+0xf/0xc0 RSP: 0018:ffff88076bbab8e8 EFLAGS: 00010046 RAX: 0000000000000246 RBX: ffff88076bbab990 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff880468badf58 RDI: ffff88076bbab990 RBP: ffff88076bbab900 R08: 0000000000000246 R09: 00000000000020de R10: 0000000000000000 R11: ffff88076bbab5be R12: 0000000000000000 R13: ffff880468badf58 R14: 000000000001adb0 R15: ffff88076f310fb0 FS: 00007f377124a880(0000) GS:ffff88046fa40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000008 CR3: 0000000771318000 CR4: 00000000001407e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Stack: ffff88076bbab990 ffff880468badf50 0000000000000001 ffff88076bbab938 ffffffff810b128b 0000000000000246 00000000cf9b7040 ffff880468bac7a0 0000000000000000 ffff880468bac7a0 ffff88076bbab9d0 ffffffffa05a6ea3 Call Trace: [] prepare_to_wait+0x7b/0x90 [] beiscsi_mccq_compl_wait+0x153/0x330 [be2iscsi] [] ? wake_up_atomic_t+0x30/0x30 [] beiscsi_ep_disconnect+0x91/0x2d0 [be2iscsi] [] iscsi_if_ep_disconnect.isra.14+0x5a/0x70 [scsi_transport_iscsi] [] iscsi_if_recv_msg+0x113b/0x14a0 [scsi_transport_iscsi] [] ? __kmalloc_node_track_caller+0x58/0x290 [] iscsi_if_rx+0x8e/0x1f0 [scsi_transport_iscsi] [] netlink_unicast+0xed/0x1b0 [] netlink_sendmsg+0x31e/0x690 [] ? netlink_rcv_wake+0x44/0x60 [] ? netlink_recvmsg+0x1e3/0x450 beiscsi_mccq_compl_wait gets called even when MCC tag allocation failed for mgmt_invalidate_connection. mcc_wait is not initialized for tag 0 so causes crash in prepare_to_wait. Signed-off-by: Jitendra Bhivare Reviewed-by: Tomas Henzl Reviewed-by: Chris Leech Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_cmds.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 031d1e0f2dc41be0859e6933fcf8b088098f7913 Author: Tomohiro Kusumi Date: Thu Mar 23 12:49:04 2017 +0200 scsi: ufs: fix wrong/ambiguous fall through comments These aren't really falling through to anywhere meaningful. Signed-off-by: Tomohiro Kusumi Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 03b1a06203a1f283ad8a20dce78f0f5f17eaeb88 Author: Dan Carpenter Date: Thu Mar 23 13:41:42 2017 +0300 scsi: osd_uld: remove an unneeded NULL check We don't call the remove() function unless probe() succeeds so "oud" can't be NULL here. Plus, if it were NULL, we dereference it on the next line so it would crash anyway. [mkp: applied by hand] Signed-off-by: Dan Carpenter Acked-by: Boaz Harrosh Signed-off-by: Martin K. Petersen drivers/scsi/osd/osd_uld.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit aaa2e7ac80f679230faf28a8e12e8d68dbe977eb Author: Al Viro Date: Sun Dec 25 01:22:09 2016 -0500 add asm-generic/extable.h ... and make the users of generic uaccess.h use that. Signed-off-by: Al Viro arch/arc/include/asm/Kbuild | 1 + arch/arc/include/asm/uaccess.h | 2 -- arch/c6x/include/asm/Kbuild | 1 + arch/h8300/include/asm/Kbuild | 1 + arch/hexagon/include/asm/Kbuild | 1 + arch/um/include/asm/Kbuild | 1 + arch/unicore32/include/asm/Kbuild | 1 + arch/unicore32/include/asm/uaccess.h | 2 -- include/asm-generic/extable.h | 26 ++++++++++++++++++++++++++ include/asm-generic/uaccess.h | 20 ++------------------ 10 files changed, 34 insertions(+), 22 deletions(-) commit 205ed44ec0676099fc17ba6d3195e48bea947147 Merge: 402a5bc 7be147d Author: David S. Miller Date: Mon Mar 27 17:06:12 2017 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-03-27 This series contains updates to i40e and i40evf only. Alex updates the driver code so that we can do bulk updates of the page reference count instead of just incrementing it by one reference at a time. Fixed an issue where we were not resetting skb back to NULL when we have freed it. Cleaned up the i40e_process_skb_fields() to align with other Intel drivers. Removed FCoE code, since it is not supported in any of the Fortville/Fortpark hardware, so there is not much point of carrying the code around, especially if it is broken and untested. Harshitha fixes a bug in the driver where the calculation of the RSS size was not taking into account the number of traffic classes enabled. Robert fixes a potential race condition during VF reset by eliminating IOMMU DMAR Faults caused by VF hardware and when the OS initiates a VF reset and before the reset is finished we modify the VF's settings. Bimmy removes a delay that is no longer needed, since it was only needed for preproduction hardware. Colin King fixes null pointer dereference, where VSI was being dereferenced before the VSI NULL check. Jake fixes an issue with the recent addition of the "client code" to the driver, where we attempt to use an uninitialized variable, so correctly initialize the params variable by calling i40e_client_get_params(). v2: dropped patch 5 of the original series from Carolyn since we need more documentation and reason why the added delay, so Carolyn is taking the time to update the patch before we re-submit it for kernel inclusion. ==================== Signed-off-by: David S. Miller commit e4e55b47ed9ae2c05ff062601ff6dacbe9dc4775 Author: Tetsuo Handa Date: Fri Mar 24 20:46:33 2017 +0900 LSM: Revive security_task_alloc() hook and per "struct task_struct" security blob. We switched from "struct task_struct"->security to "struct cred"->security in Linux 2.6.29. But not all LSM modules were happy with that change. TOMOYO LSM module is an example which want to use per "struct task_struct" security blob, for TOMOYO's security context is defined based on "struct task_struct" rather than "struct cred". AppArmor LSM module is another example which want to use it, for AppArmor is currently abusing the cred a little bit to store the change_hat and setexeccon info. Although security_task_free() hook was revived in Linux 3.4 because Yama LSM module wanted to release per "struct task_struct" security blob, security_task_alloc() hook and "struct task_struct"->security field were not revived. Nowadays, we are getting proposals of lightweight LSM modules which want to use per "struct task_struct" security blob. We are already allowing multiple concurrent LSM modules (up to one fully armored module which uses "struct cred"->security field or exclusive hooks like security_xfrm_state_pol_flow_match(), plus unlimited number of lightweight modules which do not use "struct cred"->security nor exclusive hooks) as long as they are built into the kernel. But this patch does not implement variable length "struct task_struct"->security field which will become needed when multiple LSM modules want to use "struct task_struct"-> security field. Although it won't be difficult to implement variable length "struct task_struct"->security field, let's think about it after we merged this patch. Signed-off-by: Tetsuo Handa Acked-by: John Johansen Acked-by: Serge Hallyn Acked-by: Casey Schaufler Tested-by: Djalal Harouni Acked-by: José Bollo Cc: Paul Moore Cc: Stephen Smalley Cc: Eric Paris Cc: Kees Cook Cc: James Morris Cc: José Bollo Signed-off-by: James Morris include/linux/init_task.h | 7 +++++++ include/linux/lsm_hooks.h | 9 ++++++++- include/linux/sched.h | 4 ++++ include/linux/security.h | 7 +++++++ kernel/fork.c | 7 ++++++- security/security.c | 5 +++++ 6 files changed, 37 insertions(+), 2 deletions(-) commit 840c91dc6a13b160f5b6e5c79c430dffac11c945 Merge: 3dfc9b0 c02ed2e Author: James Morris Date: Tue Mar 28 11:03:35 2017 +1100 update to v4.11-rc4 due to memory corruption bug in rc2 commit 5511a45fc134f0784c403ef3488e2c07cd15bf14 Author: Michael Ellerman Date: Tue Mar 21 16:24:38 2017 +1100 powerpc/64: Don't use early_cpu_has_feature() in cpu_ready_for_interrupts() cpu_ready_for_interrupts() is called after feature patching, so there's no need to use early_cpu_has_feature(). Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup_64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1127d5f7fdcd99c28f2b70e12578372c330c8fa1 Author: Anton Blanchard Date: Thu Mar 23 08:22:01 2017 +1100 powerpc/configs: Re-enable POWER8 crc32c The config option for the POWER8 crc32c recently changed from CONFIG_CRYPT_CRC32C_VPMSUM to CONFIG_CRYPTO_CRC32C_VPMSUM. Update the configs. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 2 +- arch/powerpc/configs/ppc64_defconfig | 2 +- arch/powerpc/configs/pseries_defconfig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 4e215d2584b2e5b9448924f374f60ad2734144d8 Author: Anton Blanchard Date: Thu Mar 23 08:22:00 2017 +1100 powerpc/configs: Make oprofile a module Most people use perf these days, so save about 31kB by making oprofile a module. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 2 +- arch/powerpc/configs/ppc64_defconfig | 2 +- arch/powerpc/configs/pseries_defconfig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 4ce410d65a4703aa3fc29c8a1f172e829892f39c Author: Anton Blanchard Date: Thu Mar 23 08:21:59 2017 +1100 powerpc/configs: Re-enable ISO9660_FS as a built-in in 64 bit configs It turns out cloud-config uses ISO9660 filesystems to inject configuration data into cloud images. The cloud-config failures when ISO9660_FS is not enabled are cryptic, and building it in makes mainline testing easier, so re-enable it. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 2 +- arch/powerpc/configs/ppc64_defconfig | 2 +- arch/powerpc/configs/pseries_defconfig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 517c27570cf38f182e7a688d50a9b978333f8ea8 Author: Michael Neuling Date: Fri Mar 24 21:20:56 2017 +1100 powerpc/powernv: Fix XSCOM address mangling for form 1 indirect POWER9 adds form 1 scoms. The form of the indirection is specified in the top nibble of the scom address. Currently we do some (ugly) bit mangling so that we can fit a 64 bit scom address into the debugfs interface. The current code only shifts the top bit (indirect bit). This patch changes it to shift the whole top nibble so that the form of the indirection is also shifted. This patch is backwards compatible with older scoms. (This change isn't required in the arch/powerpc/platforms/powernv/opal-prd.c scom interface as it passes the whole 64bit scom address without any bit mangling) Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-xscom.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit c3a08e93d66e9ba59ffbfb610af2f76b82200185 Author: Oliver O'Halloran Date: Thu Mar 23 18:54:01 2017 +1100 powerpc/powernv: de-deuplicate OPAL call wrappers Currently the code to perform an OPAL call is duplicated between the normal path and path taken when tracepoints are enabled. There's no real need for this and combining them makes opal_tracepoint_entry considerably easier to understand. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-wrappers.S | 53 +++++++++++--------------- 1 file changed, 22 insertions(+), 31 deletions(-) commit de78ae6c9ef55d9ded036c8e29d9364e1ce5f6b7 Author: Guilherme G. Piccoli Date: Wed Mar 22 16:27:51 2017 -0300 powerpc/xmon: add debugfs entry for xmon Currently the xmon debugger is set only via kernel boot command-line. It's disabled by default, and can be enabled with "xmon=on" on the command-line. Also, xmon may be accessed via sysrq mechanism. But we cannot enable/disable xmon in runtime, it needs kernel reload. This patch introduces a debugfs entry for xmon, allowing user to query its current state and change it if desired. Basically, the "xmon" file to read from/write to is under the debugfs mount point, on powerpc directory. It's a simple attribute, value 0 meaning xmon is disabled and value 1 the opposite. Writing these states to the file will take immediate effect in the debugger. Signed-off-by: Guilherme G. Piccoli Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit b561783c7bfd4bcb18ad30e1410ee19500c36a7c Author: Guilherme G. Piccoli Date: Wed Mar 22 16:27:50 2017 -0300 powerpc/xmon: drop the nobt option from xmon plus minor fixes The xmon parameter nobt was added long time ago, by commit 26c8af5f01df ("[POWERPC] print backtrace when entering xmon"). The problem that time was that during a crash in a machine with USB keyboard, xmon wouldn't respond to commands from the keyboard, so printing the backtrace wouldn't be possible. Idea then was to show automatically the backtrace on xmon crash for the first time it's invoked (if it recovers, next time xmon won't show backtrace automatically). The nobt parameter was added _only_ to prevent this automatic trace show. Seems long time ago USB keyboards didn't work that well! We don't need this parameter anymore, the feature of auto showing the backtrace is interesting (imagine a case of auto-reboot script), so this patch extends the functionality, by always showing the backtrace automatically when xmon is invoked; it removes the nobt parameter too. Also, this patch fixes __initdata placement on xmon_early and replaces __initcall() with modern device_initcall() on sysrq handler. Signed-off-by: Guilherme G. Piccoli Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 3b5bf42b81d56085fd58692b5117f69aa77fdff7 Author: Pan Xinhui Date: Wed Mar 22 16:27:49 2017 -0300 powerpc/xmon: Fix an unexpected xmon on/off state change Once xmon is triggered by sysrq-x, it is enabled always afterwards even if it is disabled during boot. This will cause a system reset interrupt fail to dump. So keep xmon in its original state after exit. We have several ways to set xmon on or off. 1) by a build config CONFIG_XMON_DEFAULT. 2) by a boot cmdline with xmon or xmon=early or xmon=on to enable xmon and xmon=off to disable xmon. This value will override that in step 1. 3) by a debugfs interface, as proposed in this patchset. And this value can override those in step 1 and 2. Signed-off-by: Pan Xinhui Signed-off-by: Guilherme G. Piccoli Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 7be147dc143a9a0030a3881870425cae03e5dbff Author: Jacob Keller Date: Mon Mar 20 16:45:35 2017 -0700 i40e: initialize params before notifying of l2_param_changes Probably due to some mis-merging fix a bug associated with commits d7ce6422d6e6 ("i40e: don't check params until after checking for client instance", 2017-02-09) and 3140aa9a78c9 ("i40e: KISS the client interface", 2017-03-14) The first commit tried to move the initialization of the params structure so that we didn't bother doing this if we didn't have a client interface. You can already see that it looks fishy because of the indentation. The second commit refactors a bunch of the interface, and incorrectly drops the params initialization. I believe what occurred is that internally the two patches were re-ordered, and the merge conflicts as a result were performed incorrectly. Fix the use of an uninitialized variable by correctly initializing the params variable via i40e_client_get_params(). Reported-by: Colin Ian King Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_client.c | 2 ++ 1 file changed, 2 insertions(+) commit 703ba88548082f91970ee91c9fb64ab582e391cd Author: Colin Ian King Date: Mon Mar 20 12:03:03 2017 +0000 i40evf: dereference VSI after VSI has been null checked VSI is being dereferenced before the VSI null check; if VSI is null we end up with a null pointer dereference. Fix this by performing VSI deference after the VSI null check. Also remove the need for using adapter by using vsi->back->cinst. Detected by CoverityScan, CID#1419696, CID#1419697 ("Dereference before null check") Fixes: ed0e894de7c133 ("i40evf: add client interface") Signed-off-by: Colin Ian King Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_client.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c76cb6ed5431756071cc13635db70234597b9cf7 Author: Alexander Duyck Date: Tue Feb 21 15:55:48 2017 -0800 i40e: Drop FCoE code that always evaluates to false or 0 Since FCoE isn't supported by the i40e products there isn't much point in carrying around code that will always evaluate to false. This patch goes through and strips out the code in several spots so that we don't go around carrying variables and/or code that is always going to evaluate to false or 0. Change-ID: I39d1d779c66c638b75525839db2b6208fdc809d7 Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 3 --- drivers/net/ethernet/intel/i40e/i40e_main.c | 17 +++-------------- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 1 - 3 files changed, 3 insertions(+), 18 deletions(-) commit 9eed69a9147c27aeb016c55b30d810b39bf38662 Author: Alexander Duyck Date: Tue Feb 21 15:55:47 2017 -0800 i40e: Drop FCoE code from core driver files Looking over the code for FCoE it looks like the Rx path has been broken at least since the last major Rx refactor almost a year ago. It seems like FCoE isn't supported for any of the Fortville/Fortpark hardware so there isn't much point in carrying the code around, especially if it is broken and untested. Change-ID: I892de8fa551cb129ce2361e738ff82ce55fa229e Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/Kconfig | 11 - drivers/net/ethernet/intel/i40e/Makefile | 1 - drivers/net/ethernet/intel/i40e/i40e.h | 61 +----- drivers/net/ethernet/intel/i40e/i40e_common.c | 27 --- drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 19 -- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 35 --- drivers/net/ethernet/intel/i40e/i40e_main.c | 261 +---------------------- drivers/net/ethernet/intel/i40e/i40e_osdep.h | 3 - drivers/net/ethernet/intel/i40e/i40e_prototype.h | 3 - drivers/net/ethernet/intel/i40e/i40e_txrx.c | 26 --- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 17 -- drivers/net/ethernet/intel/i40e/i40e_type.h | 138 ------------ drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 12 -- 13 files changed, 2 insertions(+), 612 deletions(-) commit a5b268e4b103e5dea4850ad732b6ed584a5562ea Author: Alexander Duyck Date: Tue Feb 21 15:55:46 2017 -0800 i40e/i40evf: Clean-up process_skb_fields This is a minor clean-up to make the i40e/i40evf process_skb_fields function look a little more like what we have in igb. The Rx checksum function called out a need for skb->protocol but I can't see where it actually needs it. I am assuming this is something that was likely refactored out some time ago as the Rx checksum code has gone through a few rewrites. Change-ID: I0b4668a34d90b61b66ded7c7c26e19a3e2d06251 Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 8 +++----- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) commit 0a25b7311d856c31dea2a4e92bf88982026d2afb Author: Bimmy Pujari Date: Tue Feb 21 15:55:45 2017 -0800 i40e: removed no longer needed delays Removed no longer needed delays. At preproduction stage those delays were needed but now these delays are not needed. Signed-off-by: Bimmy Pujari Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 2 -- 1 file changed, 2 deletions(-) commit beff3e9d80138e332ca08d909e1648e82764dc0c Author: Robert Konklewski Date: Tue Feb 21 15:55:42 2017 -0800 i40e: Fixed race conditions in VF reset First, this patch eliminates IOMMU DMAR Faults caused by VF hardware. This is done by enabling VF hardware only after VSI resources are freed. Otherwise, hardware could DMA into memory that is (or just has been) being freed. Then, the VF driver is activated only after VSI resources have been reallocated. That's because the VF driver can request resources immediately after it's activated. So they need to be ready at that point. The second race condition happens when the OS initiates a VF reset, and then before it's finished modifies VF's settings by changing its MAC, VLAN ID, bandwidth allocation, anti-spoof checking, etc. These functions needed to be blocked while VF is undergoing reset. Otherwise, they could operate on data structures that had just been freed or not yet fully initialized. Change-ID: I43ba5a7ae2c9a1cce3911611ffc4598ae33ae3ff Signed-off-by: Robert Konklewski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 43 ++++++++++++++++++---- 1 file changed, 35 insertions(+), 8 deletions(-) commit 741b8b832a57402380be79d7d11a59eaf57fff3b Author: Alexander Duyck Date: Tue Feb 21 15:55:41 2017 -0800 i40e/i40evf: Fix use after free in Rx cleanup path We need to reset skb back to NULL when we have freed it in the Rx cleanup path. I found one spot where this wasn't occurring so this patch fixes it. Change-ID: Iaca68934200732cd4a63eb0bd83b539c95f8c4dd Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 1 + drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 1 + 2 files changed, 2 insertions(+) commit f25571b576c72f4bfa8b0766b4d582ee9662bcbf Author: Harshitha Ramamurthy Date: Tue Feb 21 15:55:40 2017 -0800 i40e: fix configuration of RSS table with DCB There exists a bug in the driver where the calculation of the RSS size was not taking into account the number of traffic classes enabled. This patch factors in the traffic classes both in the initial configuration of the table as well as reconfiguration. Change-ID: I34dcd345ce52faf1d6b9614bea28d450cfd5f621 Signed-off-by: Harshitha Ramamurthy Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 1793668c3b8c18ede309dfec30f7c486cca00d28 Author: Alexander Duyck Date: Tue Feb 21 15:55:39 2017 -0800 i40e/i40evf: Update code to better handle incrementing page count Update the driver code so that we do bulk updates of the page reference count instead of just incrementing it by one reference at a time. The advantage to doing this is that we cut down on atomic operations and this in turn should give us a slight improvement in cycles per packet. In addition if we eventually move this over to using build_skb the gains will be more noticeable. I also found and fixed a store forwarding stall from where we were assigning "*new_buff = *old_buff". By breaking it up into individual copies we can avoid this and as a result the performance is slightly improved. Change-ID: I1d3880dece4133eca3c32423b04a5467321ccc52 Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 25 ++++++++++++++++++------- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 7 ++++++- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 24 ++++++++++++++++++------ drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 7 ++++++- 4 files changed, 48 insertions(+), 15 deletions(-) commit 402a5bc462d47f0b7c9e8a516c124c9c162fe2aa Author: David Lebrun Date: Mon Mar 27 11:43:59 2017 +0200 ipv6: sr: select DST_CACHE by default When CONFIG_IPV6_SEG6_LWTUNNEL is selected, automatically select DST_CACHE. This allows to remove multiple ifdefs. Signed-off-by: David Lebrun Signed-off-by: David S. Miller net/ipv6/Kconfig | 1 + net/ipv6/seg6_iptunnel.c | 18 ------------------ 2 files changed, 1 insertion(+), 18 deletions(-) commit 656455bf19f6a58e3fc5441a4cdcc8f598979329 Author: Tobias Klauser Date: Mon Mar 27 08:56:59 2017 +0200 net: ibmvnic: Remove unused net_stats member from struct ibmvnic_adapter The ibmvnic driver keeps its statistics in net_device->stats, so the net_stats member in struct ibmvnic_adapter is unused. Remove it. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.h | 1 - 1 file changed, 1 deletion(-) commit 8c2ef1978fd4b818d3269554016bd29bfe880562 Author: Tobias Klauser Date: Mon Mar 27 08:56:15 2017 +0200 net: ibmveth: Remove unused stats member from struct ibmveth_adapter The ibmveth driver keeps its statistics in net_device->stats, so the stats member in struct ibmveth_adapter is unused. Remove it. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmveth.h | 1 - 1 file changed, 1 deletion(-) commit 8570bcd83d9a13f5319a174137ff3cb69735c135 Author: Tobias Klauser Date: Mon Mar 27 08:55:11 2017 +0200 net: bfin_mac: Remove unused stats member from struct bfin_mac_local The bfin_mac driver keeps its statistics in net_device->stats, so the stats member in struct bfin_mac_local is unused. Remove it, as well as the accompanying comment. Cc: adi-buildroot-devel@lists.sourceforge.net Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/adi/bfin_mac.h | 7 ------- 1 file changed, 7 deletions(-) commit eb996edb03a665d038de7bc318182412e44c52f9 Author: Colin Ian King Date: Sat Mar 25 14:26:39 2017 +0000 netvsc: fix dereference before null check errors ndev is being checked to see if it is a null pointer however before the null check ndev is being dereferenced; hence there is a potential null pointer dereference bug that needs fixing. Fix this by only dereferencing ndev after the null check. Detected by CoverityScan, CID#1420760, CID#140761 ("Dereference before null check") Signed-off-by: Colin Ian King Reviewed-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 86573f615215a06f85ec33e5d3e951e9158e36ec Author: Philippe Reynes Date: Sun Mar 26 22:03:13 2017 +0200 net: tehuti: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/tehuti/tehuti.c | 43 +++++++++++++++--------------------- 1 file changed, 18 insertions(+), 25 deletions(-) commit bb37056807cbcf3d5970d9aca48787a3ab9ec217 Author: Philippe Reynes Date: Sat Mar 25 19:39:05 2017 +0100 net: cris: eth_v10: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/cris/eth_v10.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit 5dac9eaa39b3207f977adb3cd78b06dcbd97f69d Merge: 88275ed 4ea8efa Author: David S. Miller Date: Mon Mar 27 14:09:50 2017 -0700 Merge branch 'mpls-multipath-route-cleanups' David Ahern says: ==================== net: mpls: multipath route cleanups When a device associated with a nexthop is deleted, the nexthop in the route is effectively removed, so remove it from the route dump. Further, when all nexhops have been deleted the route is effectively done, so remove the route. ==================== Signed-off-by: David S. Miller commit 4ea8efadf5690c1ab22f981a5fcff819bd09ff31 Author: David Ahern Date: Fri Mar 24 15:21:57 2017 -0700 net: mpls: Delete route when all nexthops have been deleted When all devices for all nexthops in a route have been deleted, the route is effectively dead, so remove it. Signed-off-by: David Ahern Acked-by: Roopa Prabhu Signed-off-by: David S. Miller net/mpls/af_mpls.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit c00e51ddbfda73d2be6d61fea2e58aeb57527475 Author: David Ahern Date: Fri Mar 24 15:21:56 2017 -0700 net: mpls: Don't show nexthop if device has been deleted If the device for a nexthop in a multipath route is deleted, the nexthop is effectively removed from the route. Currently, a route dump still returns the nexhop though without the device set: $ ip -f mpls ro ls 100 nexthopvia inet 10.11.1.2 dev br0 nexthopvia inet 10.100.3.1 dev eth3 $ ip li del br0 $ ip -f mpls ro ls 100 nexthopvia inet 10.11.1.2 dev * dead linkdown nexthopvia inet 10.100.3.1 dev eth3 Since the nexthop is effectively deleted, drop the hop from the route dump. Signed-off-by: David Ahern Acked-by: Roopa Prabhu Signed-off-by: David S. Miller net/mpls/af_mpls.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 44a126ba5d13db90945115324851466685b03733 Author: Paulo Zanoni Date: Wed Mar 22 15:58:45 2017 -0300 drm/i915: kill intel_ddi_pll_select() All it does is pick the encoder and call intel_get_shared_dpll(). We can just do this in the caller. One less indirection level during code reading. As another plus, now the two callers of intel_get_shared_dpll() are {ironlake,haswell}_crtc_compute_clock(). Reported-by: Ville Syrjälä Signed-off-by: Paulo Zanoni Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1490209125-20046-2-git-send-email-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_ddi.c | 25 ++----------------------- drivers/gpu/drm/i915/intel_display.c | 8 +++++++- drivers/gpu/drm/i915/intel_drv.h | 4 ++-- 3 files changed, 11 insertions(+), 26 deletions(-) commit b68fb7871e15ae2a37294dda4ab86936b72450f5 Author: Jerome Brunet Date: Thu Mar 9 11:41:53 2017 +0100 clk: meson: mpll: correct N2 maximum value Gxbb datasheet says N2 maximum value is 127 but the register field is 9 bits wide, the maximum value should 511. Test shows value greater than 127, all the way to 511, works well Signed-off-by: Jerome Brunet Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/20170309104154.28295-9-jbrunet@baylibre.com drivers/clk/meson/clk-mpll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b778f7451a8d4fac386ffaa221f0b510737b9704 Author: Jerome Brunet Date: Thu Mar 9 11:41:52 2017 +0100 clk: meson8b: add the mplls clocks 0, 1 and 2 Signed-off-by: Jerome Brunet Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/20170309104154.28295-8-jbrunet@baylibre.com drivers/clk/meson/meson8b.c | 103 ++++++++++++++++++++++++++++++++++++++++++++ drivers/clk/meson/meson8b.h | 20 ++++++++- 2 files changed, 122 insertions(+), 1 deletion(-) commit 05b43aa2addfccef4db3319af4277df6b15ea293 Author: Jerome Brunet Date: Thu Mar 9 11:41:51 2017 +0100 clk: meson: gxbb: mpll: use rw operation Use read/write operations for the mpll clocks instead of the read-only ones. Signed-off-by: Jerome Brunet Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/20170309104154.28295-7-jbrunet@baylibre.com drivers/clk/meson/gxbb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 007e6e5c5f01d379da91e0e30f83245022fd2579 Author: Jerome Brunet Date: Thu Mar 9 11:41:50 2017 +0100 clk: meson: mpll: add rw operation This patch adds new callbacks to the meson-mpll driver to control and set the pll rate. For this, we also need to add the enable bit and sdm enable bit. The corresponding parameters are added to mpll data structure. Signed-off-by: Jerome Brunet Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/20170309104154.28295-6-jbrunet@baylibre.com drivers/clk/meson/clk-mpll.c | 152 +++++++++++++++++++++++++++++++++++++++++-- drivers/clk/meson/clkc.h | 4 +- drivers/clk/meson/gxbb.c | 30 +++++++++ 3 files changed, 180 insertions(+), 6 deletions(-) commit b92332eea8a3406020411e61f84affb479fdc69e Author: Jerome Brunet Date: Thu Mar 9 11:41:49 2017 +0100 clk: gxbb: put dividers and muxes in tables Until now, there was only 2 dividers and 2 muxes declared for the gxbb platform. With the ongoing work on various subsystem, including audio, this is about to change. Use the same approach as gates for dividers and muxes, putting them in tables to fix the register address at runtime. Signed-off-by: Jerome Brunet Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/20170309104154.28295-5-jbrunet@baylibre.com drivers/clk/meson/gxbb.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit e988aae54c1f307c23463e5e5433572e69a8d0da Author: Jerome Brunet Date: Thu Mar 9 11:41:48 2017 +0100 clk: meson8b: put dividers and muxes in tables Until now, there was only 1 divider and 1 mux declared for the meson8b platform. With the ongoing work on various system, including audio, this is about to change. Use the same approach as gates for dividers and muxes, putting them in tables to fix the register address at runtime. Signed-off-by: Jerome Brunet Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/20170309104154.28295-4-jbrunet@baylibre.com drivers/clk/meson/meson8b.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit f7e3a826097711c63688ef3a9ca03c7dc93302d8 Author: Jerome Brunet Date: Thu Mar 9 11:41:47 2017 +0100 clk: meson: add missing const qualifiers on gate arrays Reported-by: Stephen Boyd Signed-off-by: Jerome Brunet Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/20170309104154.28295-3-jbrunet@baylibre.com drivers/clk/meson/gxbb.c | 2 +- drivers/clk/meson/meson8b.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1ddfe82ed84a6bf09eef9067c2dc093c758eb4b4 Author: Jerome Brunet Date: Thu Mar 9 11:41:46 2017 +0100 clk: meson: fix SET_PARM macro parameter val is not enclosed in parenthesis which is buggy when given an expression instead of a simple value Signed-off-by: Jerome Brunet Reviewed-by: Kevin Hilman Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/20170309104154.28295-2-jbrunet@baylibre.com drivers/clk/meson/clkc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0bb0c10500ba634216238c40e1eeddce92b4d488 Author: Song Liu Date: Mon Mar 27 10:51:33 2017 -0700 md/raid5: use consistency_policy to remove journal feature When journal device of an array fails, the array is forced into read-only mode. To make the array normal without adding another journal device, we need to remove journal _feature_ from the array. This patch allows remove journal _feature_ from an array, For journal existing journal should be either missing or faulty. To remove journal feature, it is necessary to remove the journal device first: mdadm --fail /dev/md0 /dev/sdb mdadm: set /dev/sdb faulty in /dev/md0 mdadm --remove /dev/md0 /dev/sdb mdadm: hot removed /dev/sdb from /dev/md0 Then the journal feature can be removed by echoing into the sysfs file: cat /sys/block/md0/md/consistency_policy journal echo resync > /sys/block/md0/md/consistency_policy cat /sys/block/md0/md/consistency_policy resync Signed-off-by: Song Liu Signed-off-by: Shaohua Li drivers/md/raid5.c | 46 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 10 deletions(-) commit 55f77128e7652e537d6c226d5b56821cdb5c22de Author: Tommi Rantala Date: Wed Mar 22 15:06:24 2017 +0200 perf utils: Readlink /proc/self/exe to find the perf binary Simplification: it is easier to open /proc/self/exe than /proc/$pid/exe. Signed-off-by: Tommi Rantala Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170322130624.21881-7-tommi.t.rantala@nokia.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit d4b364df5f6540e8d6a38008ce2693ba73a8508a Author: Tommi Rantala Date: Wed Mar 22 15:06:23 2017 +0200 perf utils: Null terminate buf in read_ftrace_printk() Ensure that the string that we read from the data file is null terminated. Valgrind was complaining: ==31357== Invalid read of size 1 ==31357== at 0x4EC8C1: __strtok_r_1c (string2.h:200) ==31357== by 0x4EC8C1: parse_ftrace_printk (trace-event-parse.c:161) ==31357== by 0x4F82A8: read_ftrace_printk (trace-event-read.c:204) ==31357== by 0x4F82A8: trace_report (trace-event-read.c:468) ==31357== by 0x4CD552: process_tracing_data (header.c:1576) ==31357== by 0x4D3397: perf_file_section__process (header.c:2705) ==31357== by 0x4D3397: perf_header__process_sections (header.c:2488) ==31357== by 0x4D3397: perf_session__read_header (header.c:2925) ==31357== by 0x4E71E2: perf_session__open (session.c:32) ==31357== by 0x4E71E2: perf_session__new (session.c:139) ==31357== by 0x429F5D: cmd_annotate (builtin-annotate.c:472) ==31357== by 0x497150: run_builtin (perf.c:359) ==31357== by 0x428CE0: handle_internal_command (perf.c:421) ==31357== by 0x428CE0: run_argv (perf.c:467) ==31357== by 0x428CE0: main (perf.c:614) ==31357== Address 0x8ac0efb is 0 bytes after a block of size 1,963 alloc'd ==31357== at 0x4C2DB9D: malloc (vg_replace_malloc.c:299) ==31357== by 0x4F827B: read_ftrace_printk (trace-event-read.c:195) ==31357== by 0x4F827B: trace_report (trace-event-read.c:468) ==31357== by 0x4CD552: process_tracing_data (header.c:1576) ==31357== by 0x4D3397: perf_file_section__process (header.c:2705) ==31357== by 0x4D3397: perf_header__process_sections (header.c:2488) ==31357== by 0x4D3397: perf_session__read_header (header.c:2925) ==31357== by 0x4E71E2: perf_session__open (session.c:32) ==31357== by 0x4E71E2: perf_session__new (session.c:139) ==31357== by 0x429F5D: cmd_annotate (builtin-annotate.c:472) ==31357== by 0x497150: run_builtin (perf.c:359) ==31357== by 0x428CE0: handle_internal_command (perf.c:421) ==31357== by 0x428CE0: run_argv (perf.c:467) ==31357== by 0x428CE0: main (perf.c:614) Signed-off-by: Tommi Rantala Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170322130624.21881-6-tommi.t.rantala@nokia.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/trace-event-read.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b7126ef78612a3d4a37aadf39125cff048cebb9b Author: Tommi Rantala Date: Wed Mar 22 15:06:22 2017 +0200 perf utils: use sizeof(buf) - 1 in readlink() call Ensure that we have space for the null byte in buf. Signed-off-by: Tommi Rantala Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170322130624.21881-5-tommi.t.rantala@nokia.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e6ba11511aef91ba8e2528ddc681d88922d7b0b Author: Tommi Rantala Date: Wed Mar 22 15:06:21 2017 +0200 perf tests: Do not assume that readlink() returns a null terminated string Ensure that the string in buf is null terminated. Signed-off-by: Tommi Rantala Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170322130624.21881-4-tommi.t.rantala@nokia.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/sdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a2342111c68e623e27ee7ea3d0492d8dad6bda0 Author: Tommi Rantala Date: Wed Mar 22 15:06:20 2017 +0200 perf buildid: Do not assume that readlink() returns a null terminated string Valgrind was complaining: $ valgrind ./perf list >/dev/null ==11643== Memcheck, a memory error detector ==11643== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==11643== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info ==11643== Command: ./perf list ==11643== ==11643== Conditional jump or move depends on uninitialised value(s) ==11643== at 0x4C30620: rindex (vg_replace_strmem.c:199) ==11643== by 0x49DAA9: build_id_cache__origname (build-id.c:198) ==11643== by 0x49E1C7: build_id_cache__valid_id (build-id.c:222) ==11643== by 0x49E1C7: build_id_cache__list_all (build-id.c:507) ==11643== by 0x4B9C8F: print_sdt_events (parse-events.c:2067) ==11643== by 0x4BB0B3: print_events (parse-events.c:2313) ==11643== by 0x439501: cmd_list (builtin-list.c:53) ==11643== by 0x497150: run_builtin (perf.c:359) ==11643== by 0x428CE0: handle_internal_command (perf.c:421) ==11643== by 0x428CE0: run_argv (perf.c:467) ==11643== by 0x428CE0: main (perf.c:614) [...] Additionally, a zero length result from readlink() is not very interesting. Signed-off-by: Tommi Rantala Cc: Alexander Shishkin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170322130624.21881-3-tommi.t.rantala@nokia.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/build-id.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 2ccc220238680642be87a2d010ce07f1c40edafb Author: Tommi Rantala Date: Wed Mar 22 15:06:19 2017 +0200 perf buildid: Do not update SDT cache with null filename Valgrind was complaining: ==2633== Syscall param open(filename) points to unaddressable byte(s) ==2633== at 0x5281CC0: __open_nocancel (syscall-template.S:84) ==2633== by 0x537D38: open (fcntl2.h:53) ==2633== by 0x537D38: get_sdt_note_list (symbol-elf.c:2017) ==2633== by 0x5396FD: probe_cache__scan_sdt (probe-file.c:700) ==2633== by 0x49EA2C: build_id_cache__add_sdt_cache (build-id.c:625) ==2633== by 0x49EA2C: build_id_cache__add_s (build-id.c:697) ==2633== by 0x49EE72: build_id_cache__add_b (build-id.c:717) ==2633== by 0x49EE72: dso__cache_build_id (build-id.c:782) ==2633== by 0x49F190: __dsos__cache_build_ids (build-id.c:793) ==2633== by 0x49F190: machine__cache_build_ids (build-id.c:801) ==2633== by 0x49F190: perf_session__cache_build_ids (build-id.c:815) ==2633== by 0x4CD4F2: write_build_id (header.c:165) ==2633== by 0x4D26F7: do_write_feat (header.c:2296) ==2633== by 0x4D26F7: perf_header__adds_write (header.c:2335) ==2633== by 0x4D26F7: perf_session__write_header (header.c:2414) ==2633== by 0x43B324: __cmd_record (builtin-record.c:1154) ==2633== by 0x43B324: cmd_record (builtin-record.c:1839) ==2633== by 0x455A07: __cmd_record (builtin-kmem.c:1868) ==2633== by 0x455A07: cmd_kmem (builtin-kmem.c:1944) ==2633== by 0x497150: run_builtin (perf.c:359) ==2633== by 0x428CE0: handle_internal_command (perf.c:421) ==2633== by 0x428CE0: run_argv (perf.c:467) ==2633== by 0x428CE0: main (perf.c:614) ==2633== Address 0x0 is not stack'd, malloc'd or (recently) free'd Signed-off-by: Tommi Rantala Cc: Alexander Shishkin Cc: Peter Zijlstra Cc: Tommi Rantala Link: http://lkml.kernel.org/r/20170322130624.21881-2-tommi.t.rantala@nokia.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/build-id.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a92e99a55e2689f9c13770fe0068b24476268ef Author: Bartosz Golaszewski Date: Tue Mar 14 12:04:50 2017 +0100 dt-bindings: ata: add DT bindings for ahci-dm816 SATA controller Add DT bindings for the onboard SATA controller present on the DM816x SoCs. Signed-off-by: Bartosz Golaszewski Acked-by: Rob Herring Signed-off-by: Tejun Heo .../devicetree/bindings/ata/ahci-dm816.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 2e933b1274dc89cd1629f6c7fd9bf952248d84c2 Author: Taeung Song Date: Mon Mar 27 16:10:37 2017 +0900 perf annotate: Fix a bug of division by zero when calculating percent Currently perf-annotate with --print-line can print -nan(0x8000000000000) because of division by zero when calculating percent. The division by zero happens when a sum of samples is zero in symbol__get_source_line(), so fix it. For example: After running 'perf record' like below, $ perf record -e "{cycles,page-faults,branch-misses}" ./a.out Before: $ perf annotate --stdio -l Sorted summary for file /home/taeung/workspace/a.out ---------------------------------------------- 32.89 -nan 7.04 a.c:38 25.14 -nan 0.00 a.c:34 16.26 -nan 56.34 a.c:31 15.88 -nan 1.41 a.c:37 5.67 -nan 0.00 a.c:39 1.13 -nan 35.21 a.c:26 0.95 -nan 0.00 a.c:44 0.57 -nan 0.00 a.c:32 Percent | Source code & Disassembly of a.out for cycles (529 samples) ----------------------------------------------------------------------------------------- : ... a.c:26 0.57 -nan 4.23 : 40081a: mov %edi,-0x24(%rbp) a.c:26 0.00 -nan 9.86 : 40081d: mov %rsi,-0x30(%rbp) ... However, if a sum of samples is zero (e.g. 'page-faults'), skip calculating percent. After: $ perf annotate --stdio -l Sorted summary for file /home/taeung/workspace/a.out ---------------------------------------------- 32.89 0.00 7.04 a.c:38 25.14 0.00 0.00 a.c:34 16.26 0.00 56.34 a.c:31 15.88 0.00 1.41 a.c:37 5.67 0.00 0.00 a.c:39 1.13 0.00 35.21 a.c:26 0.95 0.00 0.00 a.c:44 0.57 0.00 0.00 a.c:32 Percent | Source code & Disassembly of old for cycles (529 samples) ----------------------------------------------------------------------------------------- : ... a.c:26 0.57 0.00 4.23 : 40081a: mov %edi,-0x24(%rbp) a.c:26 0.00 0.00 9.86 : 40081d: mov %rsi,-0x30(%rbp) ... Signed-off-by: Taeung Song Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1490598638-13947-3-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 75fa8e5d3b1f3f7bdafcde12e973b0faaf13f1c4 Author: Nicholas Mc Guire Date: Sun Mar 26 18:24:06 2017 +0200 cgroup: switch to BUG_ON() Use BUG_ON() rather than an explicit if followed by BUG() for improved readability and also consistency. Signed-off-by: Nicholas Mc Guire Signed-off-by: Tejun Heo kernel/cgroup/cpuset.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 6ebd2547dd24daf95a21b2bc59931de8502afcc3 Author: Taeung Song Date: Mon Mar 27 16:10:36 2017 +0900 perf annotate: Fix a bug following symbolic link of a build-id file It is wrong way to read link name from a build-id file. Because a build-id file is not anymore a symbolic link but build-id directory of it is symbolic link, so fix it. For example, if build-id file name gotten from dso__build_id_filename() is as below, /root/.debug/.build-id/4f/75c7d197c951659d1c1b8b5fd49bcdf8f3f8b1/elf To correctly read link name of build-id, use the build-id dir path that is a symbolic link, instead of the above build-id file name like below. /root/.debug/.build-id/4f/75c7d197c951659d1c1b8b5fd49bcdf8f3f8b1 Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1490598638-13947-2-git-send-email-treeze.taeung@gmail.com Fixes: 01412261d994 ("perf buildid-cache: Use path/to/bin/buildid/elf instead of path/to/bin/buildid") Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 10b6c0c2e2bb8cd1be682f8d36ef597e3419cb88 Author: Baruch Siach Date: Mon Jan 30 20:44:39 2017 +0200 ARM: dts: bcm2835: add index to the ethernet alias An alias name should have an index number even when it is the only of its type. This allows U-Boot to add the local-mac-address property. Otherwise U-Boot skips the alias. Fixes: 6a93792774 ("ARM: bcm2835: dt: Add the ethernet to the device trees") Signed-off-by: Baruch Siach Acked-by: Lubomir Rintel Reviewed-by: Eric Anholt arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi | 2 +- arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e1be65a5e426460ab567076107311e83532904e9 Author: Baruch Siach Date: Sun Jan 29 21:53:11 2017 +0200 ARM: dts: bcm2835: fix uart0/uart1 pins According to the BCM2835 ARM Peripherals document uart1 doesn't map to pins 36-39, but uart0 does. Also, split into separate Rx/Tx and CST/RTS groups to match other uart nodes. Fixes: 21ff843931b ("ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node.") Signed-off-by: Baruch Siach Reviewed-by: Eric Anholt arch/arm/boot/dts/bcm283x.dtsi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 843b2287fb77f0b1966fa90912e093a0d417b27b Author: Baruch Siach Date: Sun Jan 29 21:53:10 2017 +0200 ARM: dts: bcm2835: fix i2c0 pins According to the BCM2835 ARM Peripherals document i2c0 doesn't map to pins 32, 34 but to 28, 29. Fixes: 21ff843931b ("ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node.") Signed-off-by: Baruch Siach Reviewed-by: Eric Anholt arch/arm/boot/dts/bcm283x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ec8542cb8a628fd10522f8421182207277f90185 Author: Baruch Siach Date: Sun Jan 29 20:40:59 2017 +0200 ARM: dts: bcm2835: fix uart0 pinctrl node names Downstream kernel uses pins 32, 33 as UART0 (PL011) Rx/Tx to communicate with the Bluetooth chip. So ALT3 of these pins is most likely not CTS/RTS. Change the node name to reflect that. This matches section 6.2 "Alternative Function Assignments" in the BCM2835 ARM Peripherals document. With this change in place, adding &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>; status = "okay"; }; to bcm2837-rpi-3-b.dts does the right thing on my Raspberry Pi 3. Pins 30, 31 are CTS/RTS of UART0 in alternate function 3. Rename uart0_gpio30 as well. While at it, fix a little typo in a nearby comment. Fixes: 21ff843931b ("ARM: dts: bcm283x: Define standard pinctrl groups in the gpio node.") Acked-by: Stefan Wahren Signed-off-by: Baruch Siach Reviewed-by: Eric Anholt arch/arm/boot/dts/bcm283x.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8e71321d19c4ed02d9eed15955b8d485bab016fc Author: Charles Keepax Date: Mon Mar 27 16:54:27 2017 +0100 ASoC: cs35l35: Clear reset_gpio on the error path in probe The error path in probe attempts to put the device back into reset. Should we fail to get the reset_gpio (such as a probe defer) we will leave the error value in there, which the gpiod_set_value_cansleep on the error path will attempt to deference. Fix this issue by clearing reset_gpio before we head into the error path. Signed-off-by: Charles Keepax Acked-by: Brian Austin Signed-off-by: Mark Brown sound/soc/codecs/cs35l35.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e53636fe81465d6810f4e0910e7238edf12a133 Author: Heinz Mauelshagen Date: Wed Mar 22 17:44:38 2017 +0100 dm raid: add raid4/5/6 journal write-back support via journal_mode option Commit 63c32ed4afc ("dm raid: add raid4/5/6 journaling support") added journal support to close the raid4/5/6 "write hole" -- in terms of writethrough caching. Introduce a "journal_mode" feature and use the new r5c_journal_mode_set() API to add support for switching the journal device's cache mode between write-through (the current default) and write-back. NOTE: If the journal device is not layered on resilent storage and it fails, write-through mode will cause the "write hole" to reoccur. But if the journal fails while in write-back mode it will cause data loss for any dirty cache entries unless resilent storage is used for the journal. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer Documentation/device-mapper/dm-raid.txt | 11 +++- drivers/md/dm-raid.c | 104 ++++++++++++++++++++++++++++---- 2 files changed, 101 insertions(+), 14 deletions(-) commit 6da27b469317435b776114649439e32384165aa5 Author: Masahiro Yamada Date: Thu Mar 23 05:07:20 2017 +0900 mtd: nand: denali: move multi device fixup code to a helper function Collect multi NAND fixups into a helper function instead of scattering them in denali_init(). I am rewording the comment block to clearly explain what is called "multi device". Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 54 +++++++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 21 deletions(-) commit 99612b27763f819e53d5d892ce81a4b042a1de11 Author: Daniel Vetter Date: Wed Mar 22 22:50:46 2017 +0100 drm/tegra: Don't use modeset_lock_crtc Yes the help text is unhelpful, but atomic drivers should never use this. Just grab the lock without context or anything. Also an aside: Checking ->active like this doesn't protect against nonblocking commits, this is rather bogus. Cc: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-8-daniel.vetter@ffwll.ch drivers/gpu/drm/tegra/dc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4464e36e06470e3d68dc26a874f0dbdffa09a6e8 Author: Heinz Mauelshagen Date: Sat Mar 18 01:39:12 2017 +0100 dm raid: fix table line argument order in status Commit 3a1c1ef2f ("dm raid: enhance status interface and fixup takeover/raid0") added new table line arguments and introduced an ordering flaw. The sequence of the raid10_copies and raid10_format raid parameters got reversed which causes lvm2 userspace to fail by falsely assuming a changed table line. Sequence those 2 parameters as before so that old lvm2 can function properly with new kernels by adjusting the table line output as documented in Documentation/device-mapper/dm-raid.txt. Also, add missing version 1.10.1 highlight to the documention. Fixes: 3a1c1ef2f ("dm raid: enhance status interface and fixup takeover/raid0") Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer Documentation/device-mapper/dm-raid.txt | 3 ++ drivers/md/dm-raid.c | 62 +++++++++++++++++---------------- 2 files changed, 35 insertions(+), 30 deletions(-) commit 78e470c26f524f4706c2555613b9641d85190cbe Author: Heinz Mauelshagen Date: Wed Mar 22 17:44:37 2017 +0100 md: add raid4/5/6 journal mode switching API Commit 2ded370373a4 ("md/r5cache: State machine for raid5-cache write back mode") added support for "write-back" caching on the raid journal device. In order to allow the dm-raid target to switch between the available "write-through" and "write-back" modes, provide a new r5c_journal_mode_set() API. Use the new API in existing r5c_journal_mode_store() Signed-off-by: Heinz Mauelshagen Acked-by: Shaohua Li Signed-off-by: Mike Snitzer drivers/md/raid5-cache.c | 62 ++++++++++++++++++++++++++---------------------- drivers/md/raid5.h | 11 +++++++++ 2 files changed, 45 insertions(+), 28 deletions(-) commit 5dfa210e407d0fedf746958bff206995bd46570d Author: Milian Wolff Date: Sat Mar 18 22:49:28 2017 +0100 perf report: Enable sorting by srcline as key Often it is interesting to know how costly a given source line is in total. Previously, one had to build these sums manually based on all addresses that pointed to the same source line. This patch introduces srcline as a sort key, which will do the aggregation for us. Paired with the recent addition of showing inline frames, this makes perf report much more useful for many C++ work loads. The following shows the new feature in action. First, let's show the status quo output when we sort by address. The result contains many hist entries that generate the same output: ~~~~~~~~~~~~~~~~ $ perf report --stdio --inline -g address # Children Self Command Shared Object Symbol # ........ ........ ............ ................... ......................................... # 99.89% 35.34% cpp-inlining cpp-inlining [.] main | |--64.55%--main complex:655 | /home/milian/projects/kdab/rnd/hotspot/tests/test-clients/cpp-inlining/main.cpp:39 (inline) | /usr/include/c++/6.3.1/complex:664 (inline) | | | |--60.31%--hypot +20 | | | | | |--8.52%--__hypot_finite +273 | | | | | |--7.32%--__hypot_finite +411 ... --35.34%--_start +4194346 __libc_start_main +241 | |--6.65%--main random.tcc:3326 | /home/milian/projects/kdab/rnd/hotspot/tests/test-clients/cpp-inlining/main.cpp:39 (inline) | /usr/include/c++/6.3.1/bits/random.h:1809 (inline) | /usr/include/c++/6.3.1/bits/random.h:1818 (inline) | /usr/include/c++/6.3.1/bits/random.h:185 (inline) | |--2.70%--main random.tcc:3326 | /home/milian/projects/kdab/rnd/hotspot/tests/test-clients/cpp-inlining/main.cpp:39 (inline) | /usr/include/c++/6.3.1/bits/random.h:1809 (inline) | /usr/include/c++/6.3.1/bits/random.h:1818 (inline) | /usr/include/c++/6.3.1/bits/random.h:185 (inline) | |--1.69%--main random.tcc:3326 | /home/milian/projects/kdab/rnd/hotspot/tests/test-clients/cpp-inlining/main.cpp:39 (inline) | /usr/include/c++/6.3.1/bits/random.h:1809 (inline) | /usr/include/c++/6.3.1/bits/random.h:1818 (inline) | /usr/include/c++/6.3.1/bits/random.h:185 (inline) ... ~~~~~~~~~~~~~~~~ With this patch and `-g srcline` we instead get the following output: ~~~~~~~~~~~~~~~~ $ perf report --stdio --inline -g srcline # Children Self Command Shared Object Symbol # ........ ........ ............ ................... ......................................... # 99.89% 35.34% cpp-inlining cpp-inlining [.] main | |--64.55%--main complex:655 | /home/milian/projects/kdab/rnd/hotspot/tests/test-clients/cpp-inlining/main.cpp:39 (inline) | /usr/include/c++/6.3.1/complex:664 (inline) | | | |--64.02%--hypot | | | | | --59.81%--__hypot_finite | | | --0.53%--cabs | --35.34%--_start __libc_start_main | |--12.48%--main random.tcc:3326 | /home/milian/projects/kdab/rnd/hotspot/tests/test-clients/cpp-inlining/main.cpp:39 (inline) | /usr/include/c++/6.3.1/bits/random.h:1809 (inline) | /usr/include/c++/6.3.1/bits/random.h:1818 (inline) | /usr/include/c++/6.3.1/bits/random.h:185 (inline) ... ~~~~~~~~~~~~~~~~ Signed-off-by: Milian Wolff Cc: Jiri Olsa Cc: Yao Jin Link: http://lkml.kernel.org/r/20170318214928.9047-1-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-report.txt | 1 + tools/perf/ui/browsers/hists.c | 3 +- tools/perf/ui/stdio/hist.c | 3 +- tools/perf/util/annotate.c | 3 +- tools/perf/util/callchain.c | 52 +++++++++++++++++++++++++++++--- tools/perf/util/callchain.h | 3 +- tools/perf/util/map.c | 3 +- tools/perf/util/sort.c | 16 ++++++---- tools/perf/util/srcline.c | 11 +++++-- tools/perf/util/util.h | 4 +-- 10 files changed, 78 insertions(+), 21 deletions(-) commit 0d3eb0b7783f1ee6d3314f101b9cbfb988020222 Author: Jin Yao Date: Sun Mar 26 04:34:29 2017 +0800 perf report: Show inline stack for browser mode If the address belongs to an inlined function, the source information back to the first non-inlined function will be printed. For example: 1. Show inlined function name perf report -g function --inline - 0.69% 0.00% inline ld-2.23.so [.] dl_main - dl_main 0.56% _dl_relocate_object _dl_relocate_object (inline) elf_dynamic_do_Rela (inline) 2. Show the file/line information perf report -g address --inline - 0.69% 0.00% inline ld-2.23.so [.] _dl_start _dl_start rtld.c:307 /build/glibc-GKVZIf/glibc-2.23/elf/rtld.c:413 (inline) + _dl_sysdep_start dl-sysdep.c:250 Signed-off-by: Yao Jin Tested-by: Arnaldo Carvalho de Melo Tested-by: Milian Wolff Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Link: http://lkml.kernel.org/r/1490474069-15823-6-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 180 +++++++++++++++++++++++++++++++++++++++-- tools/perf/util/hist.c | 5 ++ tools/perf/util/sort.h | 1 + 3 files changed, 178 insertions(+), 8 deletions(-) commit 0db64dd060f7fd77921be8f10fa9f7a5f49a3a43 Author: Jin Yao Date: Sun Mar 26 04:34:28 2017 +0800 perf report: Show inline stack for stdio mode If the address belongs to an inlined function, the source information back to the first non-inlined function will be printed. For example: 1. Show inlined function name perf report --stdio -g function --inline 0.69% 0.00% inline ld-2.23.so [.] dl_main | ---dl_main | --0.56%--_dl_relocate_object _dl_relocate_object (inline) elf_dynamic_do_Rela (inline) 2. Show the file/line information perf report --stdio -g address --inline 0.69% 0.00% inline ld-2.23.so [.] _dl_start_user | ---_dl_start_user .:0 _dl_start rtld.c:307 /build/glibc-GKVZIf/glibc-2.23/elf/rtld.c:413 (inline) _dl_sysdep_start dl-sysdep.c:250 | --0.56%--dl_main rtld.c:2076 Committer tests: # perf record --call-graph dwarf ~/bin/perf stat usleep 1 Performance counter stats for 'usleep 1': 0.443020 task-clock (msec) # 0.449 CPUs utilized 1 context-switches # 0.002 M/sec 0 cpu-migrations # 0.000 K/sec 52 page-faults # 0.117 M/sec 1,049,423 cycles # 2.369 GHz 801,456 instructions # 0.76 insn per cycle 155,609 branches # 351.246 M/sec 7,026 branch-misses # 4.52% of all branches 0.000987570 seconds time elapsed [ perf record: Woken up 2 times to write data ] [ perf record: Captured and wrote 0.553 MB perf.data (66 samples) ] # perf report --stdio --inline fs__get_mountpoint 1.73% 0.00% perf perf [.] fs__get_mountpoint | ---fs__get_mountpoint fs__get_mountpoint (inline) fs__check_mounts (inline) __statfs entry_SYSCALL_64 sys_statfs SYSC_statfs user_statfs user_path_at_empty filename_lookup path_lookupat link_path_walk inode_permission __inode_permission kernfs_iop_permission kernfs_refresh_inode security_inode_notifysecctx selinux_inode_notifysecctx selinux_inode_setsecurity security_context_to_sid security_context_to_sid_core string_to_context_struct symcmp Signed-off-by: Yao Jin Tested-by: Arnaldo Carvalho de Melo Tested-by: Milian Wolff Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Link: http://lkml.kernel.org/r/1490474069-15823-5-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/stdio/hist.c | 85 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 1 deletion(-) commit f3a60646cc3e0524d8f1083db1da7532a1590b40 Author: Jin Yao Date: Sun Mar 26 04:34:27 2017 +0800 perf report: Introduce --inline option It takes some time to look for inline stack for callgraph addresses. So it provides new option "--inline" to let user decide if enable this feature. --inline: If a callgraph address belongs to an inlined function, the inline stack will be printed. Each entry is the inline function name or file/line. Signed-off-by: Yao Jin Tested-by: Milian Wolff Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Link: http://lkml.kernel.org/r/1490474069-15823-4-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-report.txt | 4 ++++ tools/perf/builtin-report.c | 2 ++ tools/perf/util/symbol.h | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) commit a64489c56c307bf0955f0489158c5ecf6aa10fe2 Author: Jin Yao Date: Sun Mar 26 04:34:26 2017 +0800 perf report: Find the inline stack for a given address It would be useful for perf to support a mode to query the inline stack for a given callgraph address. This would simplify finding the right code in code that does a lot of inlining. The srcline.c has contained the code which supports to translate the address to filename:line_nr. This patch just extends the function to let it support getting the inline stacks. It introduces the inline_list which will store the inline function result (filename:line_nr and funcname). If BFD lib is not supported, the result is only filename:line_nr. Signed-off-by: Yao Jin Tested-by: Milian Wolff Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Link: http://lkml.kernel.org/r/1490474069-15823-3-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/srcline.c | 167 +++++++++++++++++++++++++++++++++++++-- tools/perf/util/symbol-elf.c | 5 ++ tools/perf/util/symbol-minimal.c | 7 ++ tools/perf/util/symbol.h | 2 + tools/perf/util/util.h | 16 ++++ 5 files changed, 192 insertions(+), 5 deletions(-) commit 5580338d0f207921bc1fef5b668cd564adcc3419 Author: Jin Yao Date: Sun Mar 26 04:34:25 2017 +0800 perf report: Refactor common code in srcline.c Introduce dso__name() and filename_split() out of existing code because these codes will be used in several places in next patch. For filename_split(), it may also solve a potential memory leak in existing code. In existing addr2line(), sep = strchr(filename, ':'); if (sep) { *sep++ = '\0'; *file = filename; *line_nr = strtoul(sep, NULL, 0); ret = 1; } out: pclose(fp); return ret; If sep is NULL, filename is not freed or returned via file. Signed-off-by: Yao Jin Tested-by: Milian Wolff Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Link: http://lkml.kernel.org/r/1490474069-15823-2-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/srcline.c | 68 +++++++++++++++++++++++++++++++---------------- 1 file changed, 45 insertions(+), 23 deletions(-) commit b0ad8ea66445d64a469df0c710947f4cdb8ef16b Author: Arnaldo Carvalho de Melo Date: Mon Mar 27 11:47:20 2017 -0300 perf tools: Remove unused 'prefix' from builtin functions We got it from the git sources but never used it for anything, with the place where this would be somehow used remaining: static int run_builtin(struct cmd_struct *p, int argc, const char **argv) { prefix = NULL; if (p->option & RUN_SETUP) prefix = NULL; /* setup_perf_directory(); */ Ditch it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-uw5swz05vol0qpr32c5lpvus@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/bench.h | 20 ++++++------ tools/perf/bench/futex-hash.c | 3 +- tools/perf/bench/futex-lock-pi.c | 3 +- tools/perf/bench/futex-requeue.c | 3 +- tools/perf/bench/futex-wake-parallel.c | 3 +- tools/perf/bench/futex-wake.c | 3 +- tools/perf/bench/mem-functions.c | 4 +-- tools/perf/bench/numa.c | 2 +- tools/perf/bench/sched-messaging.c | 3 +- tools/perf/bench/sched-pipe.c | 2 +- tools/perf/builtin-annotate.c | 2 +- tools/perf/builtin-bench.c | 12 +++---- tools/perf/builtin-buildid-cache.c | 3 +- tools/perf/builtin-buildid-list.c | 3 +- tools/perf/builtin-c2c.c | 4 +-- tools/perf/builtin-config.c | 2 +- tools/perf/builtin-data.c | 9 +++--- tools/perf/builtin-diff.c | 2 +- tools/perf/builtin-evlist.c | 2 +- tools/perf/builtin-ftrace.c | 2 +- tools/perf/builtin-help.c | 2 +- tools/perf/builtin-inject.c | 2 +- tools/perf/builtin-kallsyms.c | 2 +- tools/perf/builtin-kmem.c | 4 +-- tools/perf/builtin-kvm.c | 16 +++++----- tools/perf/builtin-list.c | 2 +- tools/perf/builtin-lock.c | 6 ++-- tools/perf/builtin-mem.c | 6 ++-- tools/perf/builtin-probe.c | 6 ++-- tools/perf/builtin-record.c | 2 +- tools/perf/builtin-report.c | 2 +- tools/perf/builtin-sched.c | 6 ++-- tools/perf/builtin-script.c | 4 +-- tools/perf/builtin-stat.c | 2 +- tools/perf/builtin-timechart.c | 7 ++-- tools/perf/builtin-top.c | 2 +- tools/perf/builtin-trace.c | 4 +-- tools/perf/builtin-version.c | 3 +- tools/perf/builtin.h | 58 +++++++++++++++++----------------- tools/perf/perf.c | 11 ++----- tools/perf/tests/builtin-test.c | 2 +- 41 files changed, 110 insertions(+), 126 deletions(-) commit 6963d3c387ec123753788838785e68928cb87c1b Author: Ravi Bangoria Date: Mon Mar 27 08:25:38 2017 +0530 perf list sdt: Show option in man page Commit 40218daea1db ("perf list: Show SDT and pre-cached events") added sdt support in perf list, but it missed to update documentation. Show sdt option in man perf-list. Signed-off-by: Ravi Bangoria Acked-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Link: http://lkml.kernel.org/r/20170327025538.1753-1-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-list.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c3a0bbc7ad7598dec5a204868bdf8a2b1b51df14 Author: Adrian Hunter Date: Fri Mar 24 14:15:52 2017 +0200 perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms() Address filtering with kernel symbols incorrectly resulted in the error "Cannot determine size of symbol" because the no_size logic was the wrong way around. Signed-off-by: Adrian Hunter Tested-by: Andi Kleen Cc: stable@vger.kernel.org # v4.9+ Link: http://lkml.kernel.org/r/1490357752-27942-1-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/auxtrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 598b6b5ada3f8a3ecd7bd821f7df87ca8ea0f053 Author: Chris Wilson Date: Sat Mar 25 13:47:35 2017 +0000 drm/i915: Mark manually wedged engines as guilty Use the incoming value from debugfs/i915_wedged to select which engines to marked as guilty in order to force us to reset those requests (required to quickly bypass simulated hangs). Testcase: igt/gem_exec_capture Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170325134735.30581-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_debugfs.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 63757d463ea683b469c1976032054d46cecdef09 Author: Masahiro Yamada Date: Thu Mar 23 05:07:18 2017 +0900 mtd: nand: denali: call nand_set_flash_node() to set DT node This will allow nand_dt_init() to parse DT properties in the NAND controller device node. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 1 + 1 file changed, 1 insertion(+) commit 1394a7265f88e1fbd001048113f28fb090e5eff5 Author: Masahiro Yamada Date: Thu Mar 23 05:07:17 2017 +0900 mtd: nand: denali: use nand_chip to hold frequently accessed data The denali_init() needs to setup a bunch of parameters of nand_chip. Replace denali->nand.(member) with chip->(member) for shorter code. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 68 +++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 34 deletions(-) commit ed1501d45136da125a89b1a5728a783564e6491f Author: Chris Wilson Date: Mon Mar 27 14:14:12 2017 +0100 drm/i915: Refactor tests for validity of RING_TAIL Whilst I like having the assertions clearly visible in the code, they are quite repetitious! As we find new limits we want to incorporate into the set of assertions, it make sense to refactor them to a common routine. v2: Add a guc holdout. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170327131412.20293-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_guc_submission.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 12 ++++-------- drivers/gpu/drm/i915/intel_ringbuffer.c | 9 +++------ drivers/gpu/drm/i915/intel_ringbuffer.h | 11 +++++++++++ 4 files changed, 19 insertions(+), 15 deletions(-) commit a91fdf1293044535a13fb9a434101f363dbe7e3c Author: Chris Wilson Date: Mon Mar 27 14:00:08 2017 +0100 drm/i915: Assert that the request->tail fits within the ring In addition to being qword-aligned, the RING_TAIL offset must be within the ring! Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170327130009.4678-2-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_lrc.c | 4 ++++ drivers/gpu/drm/i915/intel_ringbuffer.c | 3 +++ 2 files changed, 7 insertions(+) commit 450362d3fe866b14304f309b5fffba0c33fbfbc3 Author: Chris Wilson Date: Mon Mar 27 14:00:07 2017 +0100 drm/i915/execlists: Wrap tail pointer after reset tweaking If the request->wa_tail is 0 (because it landed exactly on the end of the ringbuffer), when we reconstruct request->tail following a reset we fill in an illegal value (-8 or 0x001ffff8). As a result, RING_HEAD is never able to catch up with RING_TAIL and the GPU spins endlessly. If the ring contains a couple of breadcrumbs, even our hangcheck is unable to catch the busy-looping as the ACTHD and seqno continually advance. v2: Move the wrap into a common intel_ring_wrap(). Fixes: a3aabe86a340 ("drm/i915/execlists: Reinitialise context image after GPU hang") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: # v4.10+ Link: http://patchwork.freedesktop.org/patch/msgid/20170327130009.4678-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_lrc.c | 4 +++- drivers/gpu/drm/i915/intel_ringbuffer.h | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) commit 1de3cd4fb49f3463679c49afe0aa9ceb133f3e49 Author: Liviu Dudau Date: Wed Mar 8 16:10:19 2017 +0000 drm: hdlcd: Fix the calculation of the scanout start address The calculation of the framebuffer's start address was wrongly using the CRTC's x and y position rather than the one of the source framebuffer. To fix that we need to update the plane_check code to call drm_plane_helper_check_state() to clip the src and dst coordinates. While there so some minor cleanup of redundant freeing of devm_alloc-ated memory. Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/hdlcd_crtc.c | 47 ++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 16 deletions(-) commit f9407ae1533111cd43161734582932b13397ab7e Author: Ville Syrjälä Date: Thu Mar 23 21:27:12 2017 +0200 drm/i915: Use i9xx_check_plane_surface() for sprite planes as well All the pre-SKL sprite planes compute the x/y/tile offsets in a similar way. There are a couple of minor differences but the primary planes have those as well. Thus i9xx_check_plane_surface() already does what we need, so let's use it. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170323192712.30682-7-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_sprite.c | 71 +++++++++++++----------------------- 3 files changed, 27 insertions(+), 47 deletions(-) commit 3ba35e53cfbad79ba288a514b01b41a46fc8dc7f Author: Ville Syrjälä Date: Thu Mar 23 21:27:11 2017 +0200 drm/i915: Eliminate ironlake_update_primary_plane() The effective difference between i9xx_update_primary_plane() and ironlake_update_primary_plane() is only the HSW/BDW DSPOFFSET special case. So bring that over into i9xx_update_primary_plane() and eliminate the duplicated code. Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170323192712.30682-6-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 55 ++++-------------------------------- 1 file changed, 6 insertions(+), 49 deletions(-) commit 5b7fcc44aa6ea56285d0db20753fed699d047706 Author: Ville Syrjälä Date: Thu Mar 23 21:27:10 2017 +0200 drm/i915: Introduce i9xx_check_plane_surface() Extract the primary plane surfae offset/x/y calculations for pre-SKL platforms into a common function, and call it during the atomic check phase to reduce the amount of stuff we have to do during the commit phase. SKL is already doing this. v2: Update the comment about the rotation adjustments to match the code better (Chris) Cc: Chris Wilson Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170323192712.30682-5-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 82 ++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 32 deletions(-) commit a0864d5905a94359621946a027e180a3063f80a5 Author: Ville Syrjälä Date: Thu Mar 23 21:27:09 2017 +0200 drm/i915: Pre-compute plane control register value Computing the plane control register value is branchy so moving it out from the plane commit hook seems prudent. Let's pre-compute it during the atomic check phase and store the result in the plane state. Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170323192712.30682-4-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 41 ++++++++++++++++++------------------ drivers/gpu/drm/i915/intel_drv.h | 3 +++ drivers/gpu/drm/i915/intel_sprite.c | 24 ++++++++++----------- 3 files changed, 36 insertions(+), 32 deletions(-) commit 6a4407a653e93f56e0d7b8849fc9c1d334de39fc Author: Ville Syrjälä Date: Thu Mar 23 21:27:08 2017 +0200 drm/i915: Nuke ironlake_plane_ctl() Share the code to compute the primary plane control register value between the i9xx and ilk codepaths as the differences are minimal. Actually there are no differences between g4x and ilk, so the current split doesn't really make any sense. Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170323192712.30682-3-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 58 ++++-------------------------------- 1 file changed, 6 insertions(+), 52 deletions(-) commit 7145f60a347d5676f2ac6982ed9d57dbef17a7e8 Author: Ville Syrjälä Date: Thu Mar 23 21:27:07 2017 +0200 drm/i915: Extract i9xx_plane_ctl() and ironlake_plane_ctl() Pull the code to calculate the pre-SKL primary plane control register value into separate functions. Allows us to pre-compute it in the future. v2: Split the pre-ilk vs. ilk+ unification to a separate patch (Chris) Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170323192712.30682-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 104 ++++++++++++++++++++++------------- 1 file changed, 66 insertions(+), 38 deletions(-) commit 08d6ccf39bfb752fdef465f73e6fc7417259af31 Author: Arushi Singhal Date: Wed Mar 22 21:23:33 2017 +0530 staging: lustre: Replace a bit shift by a use of BIT. This patch replaces bit shifting on 1 with the BIT(x) macro. This was done with coccinelle: @@ constant c; @@ -1 << c +BIT(c) Signed-off-by: Arushi Singhal Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 8 ++++---- drivers/staging/lustre/lnet/lnet/lib-ptl.c | 2 +- drivers/staging/lustre/lustre/llite/lproc_llite.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 5c143123321cd30553528e92ef7353f8488a461d Author: Arushi Singhal Date: Sat Mar 25 10:50:07 2017 +0530 staging: greybus: compress return logic Simplify function returns by merging assignment and return. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 2e20a151205be8e7efa9644cdb942381e7bec787 Author: Saeed Mahameed Date: Mon Feb 13 01:19:14 2017 +0200 net/mlx5e: Fail safe mtu and lro setting Use the new fail-safe channels switch mechanism to set new netdev mtu and lro settings. MTU and lro settings demand some HW configuration changes after new channels are created and ready for action. In order to unify switch channels routine for LRO and MTU changes, and maybe future configuration features, we now pass to it a modify HW function pointer to be invoked directly after old channels are de-activated and before new channels are activated. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/en.h | 8 ++- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 12 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 70 ++++++++++++++-------- 3 files changed, 58 insertions(+), 32 deletions(-) commit 6f9485af4020a858ac91adc5286411b6dd3c2f06 Author: Saeed Mahameed Date: Mon Feb 13 01:25:36 2017 +0200 net/mlx5e: Fail safe tc setup Use the new fail-safe channels switch mechanism to set up new tc parameters. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit be7e87f92b5802df9302af7856990172091a385f Author: Saeed Mahameed Date: Mon Feb 13 00:42:54 2017 +0200 net/mlx5e: Fail safe cqe compressing/moderation mode setting Use the new fail-safe channels switch mechanism to set new CQE compressing and CQE moderation mode settings. We also move RX CQE compression modify function out of en_rx file to a more appropriate place. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 8 +++- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 53 ++++++++++++++++++---- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 22 --------- 4 files changed, 51 insertions(+), 34 deletions(-) commit 546f18ed3fb55a6689488993d03b5576982790c3 Author: Saeed Mahameed Date: Sun Feb 12 23:21:08 2017 +0200 net/mlx5e: Fail safe ethtool settings Use the new fail-safe channels switch mechanism to set new ethtool settings: - ring parameters - coalesce parameters - tx copy break parameters Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 120 +++++++++++++-------- 1 file changed, 73 insertions(+), 47 deletions(-) commit 55c2503dae1ac8aed14d261dc02f967b4d6b1f88 Author: Saeed Mahameed Date: Tue Dec 27 14:57:03 2016 +0200 net/mlx5e: Introduce switch channels A fail safe helper functions that allows switching to new channels on the fly, In simple words: make_new_config(new_params) { new_channels = open_channels(new_params); if (!new_channels) return "Failed, but current channels are still active :)" switch_channels(new_channels); return "SUCCESS"; } Demonstrate mlx5e_switch_priv_channels usage in set channels ethtool callback and make it fail-safe using the new switch channels mechanism. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/en.h | 7 +++++ .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 29 ++++++++++++--------- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 30 +++++++++++++++++++--- 3 files changed, 51 insertions(+), 15 deletions(-) commit 9008ae074885ddaa2470f4c106245ddea4ae2a67 Author: Saeed Mahameed Date: Tue Feb 7 16:35:49 2017 +0200 net/mlx5e: Minimize mlx5e_{open/close}_locked mlx5e_redirect_rqts_to_{channels,drop} and mlx5e_{add,del}_sqs_fwd_rules and Set real num tx/rx queues belong to mlx5e_{activate,deactivate}_priv_channels, for that we move those functions and minimize mlx5e_open/close flows. This will be needed in downstream patches to replace old channels with new ones without the need to call mlx5e_close/open. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 40 +++++++++++------------ drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 10 ++++-- 2 files changed, 26 insertions(+), 24 deletions(-) commit a43b25daef78610ccef025d59f82ce8e0c42ab6c Author: Saeed Mahameed Date: Tue Mar 14 19:43:52 2017 +0200 net/mlx5e: CQ and RQ don't need priv pointer Remove mlx5e_priv pointer from CQ and RQ structs, it was needed only to access mdev pointer from priv pointer. Instead we now pass mdev where needed. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/en.h | 38 +++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 181 +++++++++------------ drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 3 +- 4 files changed, 99 insertions(+), 125 deletions(-) commit 6a9764efb255f49a91e229799c38d5c1c9361987 Author: Saeed Mahameed Date: Wed Dec 21 17:24:35 2016 +0200 net/mlx5e: Isolate open_channels from priv->params In order to have a clean separation between channels resources creation flows and current active mlx5e netdev parameters, make sure each resource creation function do not access priv->params, and only works with on a new fresh set of parameters. For this we add "new" mlx5e_params field to mlx5e_channels structure and use it down the road to mlx5e_open_{cq,rq,sq} and so on. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/en.h | 22 +- drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 2 +- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 119 +++--- .../ethernet/mellanox/mlx5/core/en_fs_ethtool.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 448 ++++++++++----------- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 61 ++- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 8 +- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 7 +- 8 files changed, 328 insertions(+), 341 deletions(-) commit acc6c5953af1949fc17c09cacd4842f149b4569d Author: Saeed Mahameed Date: Tue Dec 20 22:48:19 2016 +0200 net/mlx5e: Split open/close channels to stages As a foundation for safe config flow, a simple clear API such as (Open then Activate) where the "Open" handles the heavy unsafe creation operation and the "activate" will be fast and fail safe, to enable the newly created channels. For this we split the RQs/TXQ SQs and channels open/close flows to open => activate, deactivate => close. This will simplify the ability to have fail safe configuration changes in downstream patches as follows: make_new_config(new_params) { old_channels = current_active_channels; new_channels = create_channels(new_params); if (!new_channels) return "Failed, but current channels still active :)" deactivate_channels(old_channels); /* Can't fail */ activate_channels(new_channels); /* Can't fail */ close_channels(old_channels); current_active_channels = new_channels; return "SUCCESS"; } Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/en.h | 5 +- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 214 ++++++++++++++------- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 4 +- 4 files changed, 148 insertions(+), 77 deletions(-) commit b676f653896aaf6b32b496709bd9ebbc771d7ed7 Author: Saeed Mahameed Date: Tue Dec 20 17:30:20 2016 +0200 net/mlx5e: Refactor refresh TIRs Rename mlx5e_refresh_tirs_self_loopback to mlx5e_refresh_tirs, as it will be used in downstream (Safe config flow) patches, and make it fail safe on mlx5e_open. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/en_common.c | 17 +++++++++++------ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 8 +------- drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c | 9 +++------ 4 files changed, 16 insertions(+), 21 deletions(-) commit a5f97fee743cd7ee9932036583dbe05298ff2648 Author: Saeed Mahameed Date: Mon Dec 19 23:20:17 2016 +0200 net/mlx5e: Redirect RQT refactoring RQ Tables are always created once (on netdev creation) pointing to drop RQ and at that stage, RQ tables (indirection tables) are always directed to drop RQ. We don't need to use mlx5e_fill_{direct,indir}_rqt_rqns to fill the drop RQ in create RQT procedure. Instead of having separate flows to redirect direct and indirect RQ Tables to the current active channels Receive Queues (RQs), we unify the two flows by introducing mlx5e_redirect_rqt function and redirect_rqt_param struct. Combined, they provide one generic logic to fill the RQ table RQ numbers regardless of the RQ table purpose (direct/indirect). Demonstrated the usage with mlx5e_redirect_rqts_to_channels which will be called on mlx5e_open and with mlx5e_redirect_rqts_to_drop which will be called on mlx5e_close. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/en.h | 14 +- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 24 ++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 169 ++++++++++++--------- 3 files changed, 129 insertions(+), 78 deletions(-) commit ff9c852f91d14d11a35514dda495999cfdb41a7a Author: Saeed Mahameed Date: Mon Feb 6 13:14:34 2017 +0200 net/mlx5e: Introduce mlx5e_channels Have a dedicated "channels" handler that will serve as channels (RQs/SQs/etc..) holder to help with separating channels/parameters operations, for the downstream fail-safe configuration flow, where we will create a new instance of mlx5e_channels with the new requested parameters and switch to the new channels on the fly. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/en.h | 9 ++- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 27 +++---- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 86 +++++++++++----------- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 14 ++-- 4 files changed, 71 insertions(+), 65 deletions(-) commit be4891af77226d5909be11ab4297434cfd8c391d Author: Saeed Mahameed Date: Tue Feb 7 16:30:52 2017 +0200 net/mlx5e: Set netdev->rx_cpu_rmap on netdev creation To simplify mlx5e_open_locked flow we set netdev->rx_cpu_rmap on netdev creation rather on netdev open, it is redundant to set it every time on mlx5e_open_locked. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 7f859ecfa8d6e647d6c794c8af44d209c8372e77 Author: Saeed Mahameed Date: Mon Nov 14 13:42:02 2016 +0200 net/mlx5e: Set SQ max rate on mlx5e_open_txqsq rather on open_channel Instead of iterating over the channel SQs to set their max rate, do it on SQ creation per TXQ SQ. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 59ce13104d532f04e85cbbbbaa400200c1d12c28 Author: Chris Wilson Date: Fri Mar 24 16:35:40 2017 +0000 drm/i915: Use BIT() for computing the engine's flag Since the engine's flag is just the bit of its id, use BIT(). Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170324163540.31981-3-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_ringbuffer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d6ff6164977d3f205bc59b6df6fce0779b0c131 Author: Arushi Singhal Date: Fri Mar 24 16:59:59 2017 +0530 staging: speakup: Remove the explicit NULL comparison Fixed coding style for null comparisons in speakup driver to be more consistant with the rest of the kernel coding style. Replaced 'x != NULL' with 'x' and 'x = NULL' with '!x'. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/fakekey.c | 2 +- drivers/staging/speakup/main.c | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) commit ddb2397e30896626831dbac31a75eeb1991c4819 Author: Chris Wilson Date: Fri Mar 24 16:35:39 2017 +0000 drm/i915: Remove unused intel_flush_status_page() intel_flush_status_page() is defunct since commit f8dd2934c4ec ("drm/i915: Remove BXT incoherent seqno write workaround"), time to remove it. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170324163540.31981-2-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_ringbuffer.h | 8 -------- 1 file changed, 8 deletions(-) commit 9a29dd85a09d825cb28dcaacd36ed0ee0be49699 Author: Chris Wilson Date: Fri Mar 24 16:35:38 2017 +0000 drm/i915: Fixup intel_write_status_page() for old CPUs without clflush Not all of our target platforms have clflush. For those without, just assume the status page is sufficiently coherent that we do not need our paranoia. Reported-by: Ville Syrjälä Fixes: 14a6bbf9e535 ("drm/i915: Replace irq_seqno_barrier on hws write with a clflush") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170324163540.31981-1-chris@chris-wilson.co.uk Tested-by: Ville Syrjälä Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_ringbuffer.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit f239d3db3d59fccc1e73a1be517468e6b31b2512 Author: Arushi Singhal Date: Fri Mar 24 16:47:27 2017 +0530 staging: speakup: Align the code. Delete tabs and add spaces to align the code to fix the checkpatch issue: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/speakup_apollo.c | 2 +- drivers/staging/speakup/speakup_decext.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit b1b2b3ca78757c3162d1dde283117c778133a276 Author: Pranay Kr. Srivastava Date: Fri Mar 24 14:07:11 2017 +0530 staging: speakup: use speakup_allocate as per required context speakup_allocate used GFP_ATOMIC for allocations even while during initialization due to it's use in notifier call. Pass GFP_ flags as well to speakup_allocate depending on the context it is called in. Signed-off-by: Pranay Kr. Srivastava Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a15505e69cd2f8d0ebf566cd5c5838bd5c2d56e3 Author: Gustavo A. R. Silva Date: Mon Mar 27 01:37:29 2017 -0500 staging: speakup: fix warning for static declaration Fix the following sparse warning: symbol 'spk_serial_out' was not declared. Should it be static? Signed-off-by: Gustavo A. R. Silva Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/serialio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4ce766f28cd0efa0cb4d869a84905d573ef7e70 Author: Chris Wilson Date: Sat Mar 25 11:32:43 2017 +0000 drm/i915: Align "unfenced" tiled access on gen2, early gen3 Old devices have quite severe restrictions for using fences, and unlike more recent device (anything from Pineview onwards) we need to enforce those restrictions even for unfenced tiled access from the render pipeline. Fixes: 944397f04f24 ("drm/i915: Store required fence size/alignment for GGTT vma") Reported-by: Ville Syrjälä Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Joonas Lahtinen Cc: # v4.11-rc1+ Link: http://patchwork.freedesktop.org/patch/msgid/20170325113243.16438-1-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter Reviewed-by: Joonas Lahtinen Tested-by: Ville Syrjälä drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 +++- drivers/gpu/drm/i915/i915_pci.c | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) commit 71cc2b184c0c1b7b4983091e65f102c6817aada9 Author: Chris Wilson Date: Fri Mar 24 16:54:18 2017 +0000 drm/i915: Limit number of reads to stabilize rc6 counter reads We have only 8bits of precise timestamps in which to complete our upper/load reads, along with the switch between precision. This is not always enough time to read the upper counter twice within the same time slice, leading to hard lockups. Limit the number of times to prevent an inifite loop (my fault for assuming we would have no trouble doing the write + reads fast enough). Fixes: 47c21d9a1a7b ("drm/i915: Extend vlv/chv residency resolution") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100377 Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170324165418.7455-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e2a2aa36a5090e38bdbdd3f85a216a19c334a6de Author: Chris Wilson Date: Thu Mar 23 15:00:53 2017 +0000 drm/i915: Check we have an wake device before flushing GTT writes We can assume that if the device is asleep then all pending GTT writes will have been posted, and so we can defer the flush from i915_gem_object_flush_gtt_write_domain() [ 1957.462568] WARNING: CPU: 0 PID: 6132 at drivers/gpu/drm/i915/intel_drv.h:1742 fwtable_read32+0x123/0x150 [i915] [ 1957.462582] RPM wakelock ref not held during HW access [ 1957.462583] Modules linked in: i915 intel_gtt drm_kms_helper prime_numbers [ 1957.462607] CPU: 0 PID: 6132 Comm: gem_concurrent_ Tainted: G U 4.11.0-rc1+ #464 [ 1957.462619] Hardware name: / , BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015 [ 1957.462630] Call Trace: [ 1957.462646] dump_stack+0x4d/0x6f [ 1957.462657] __warn+0xc1/0xe0 [ 1957.462667] warn_slowpath_fmt+0x4a/0x50 [ 1957.462709] fwtable_read32+0x123/0x150 [i915] [ 1957.462750] i915_gem_object_flush_gtt_write_domain+0x43/0x70 [i915] [ 1957.462791] i915_gem_object_set_to_cpu_domain+0x46/0xa0 [i915] [ 1957.462831] i915_gem_set_domain_ioctl+0x15d/0x220 [i915] [ 1957.462843] drm_ioctl+0x1d7/0x440 [ 1957.462885] ? i915_gem_obj_prepare_shmem_write+0x1d0/0x1d0 [i915] [ 1957.462896] ? pick_next_task_fair+0x436/0x440 [ 1957.462906] ? mntput+0x1f/0x30 [ 1957.462915] do_vfs_ioctl+0x8f/0x5c0 [ 1957.462925] ? __schedule+0x16f/0x5f0 [ 1957.462935] ? ____fput+0x9/0x10 [ 1957.462943] SyS_ioctl+0x3c/0x70 [ 1957.462952] entry_SYSCALL_64_fastpath+0x17/0x98 [ 1957.462961] RIP: 0033:0x7fc542179ca7 [ 1957.462968] RSP: 002b:00007ffeef12ff98 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 1957.462982] RAX: ffffffffffffffda RBX: 00007ffeef1301d0 RCX: 00007fc542179ca7 [ 1957.462990] RDX: 00007ffeef12ffd0 RSI: 00000000400c645f RDI: 0000000000000003 [ 1957.462999] RBP: 0000000000000003 R08: 000055f433bc7c40 R09: 000000000000002c [ 1957.463006] R10: 0000000000000073 R11: 0000000000000246 R12: 0000000000000018 [ 1957.463015] R13: 000055f432c89d20 R14: 000055f432c87690 R15: 0000000000000000 Fixes: 3b5724d702ef ("drm/i915: Wait for writes through the GTT to land before reading back") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170323150053.28582-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 4af0d727b1363200d8380032a5180544d64daa68 Author: Chris Wilson Date: Sat Mar 25 20:10:53 2017 +0000 drm/i915/execlists: Trim irq handler I noticed that gcc was spilling the CSB to the stack, so rearrange the code to be more compact. Spilling in this function is slightly more interesting due to the mmio reads acting as memory barriers and so end up flushing the stack spills. Still miniscule to having to do at least the pair of uncached reads :( function old new delta intel_lrc_irq_handler 1039 878 -161 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170325201053.21306-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_lrc.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit 9d98af0bbec8a7a03fc5c72381ec3dd53b8de87d Author: Michal Wajdeczko Date: Mon Mar 27 09:45:10 2017 +0000 drm/i915/uc: Make intel_uc_prepare_fw() static There is no need to expose this function as it is called from one function only. Also move it up to avoid forward declaration. v2: drop intel_ prefix (Oscar) and rename to fetch_uc_fw (Michal) Signed-off-by: Michal Wajdeczko Cc: Arkadiusz Hiler Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170327094510.167400-1-michal.wajdeczko@intel.com Reviewed-by: Joonas Lahtinen Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_uc.c | 270 ++++++++++++++++++++-------------------- drivers/gpu/drm/i915/intel_uc.h | 2 - 2 files changed, 135 insertions(+), 137 deletions(-) commit 72897fa31fcf6222a11c6ebb0bcca25628bb1f7c Author: Icenowy Zheng Date: Sat Mar 25 22:50:14 2017 +0800 ARM: sun8i: h2+: enable USB OTG for Orange Pi Zero board Orange Pi Zero board features a USB OTG port, which has a ID pin, and can be used to power up the board. However, even if the board is powered via +5V pin in GPIO/expansion headers, the VBUS in the OTG port cannot be powered up, thus it's impossible to use it in host mode with simple OTG cables. Add support for it in peripheral mode. If someone really want to use it in host mode, the mode of PHY can be switch via sysfs, then use a powered USB OTG cable or powered USB HUB to power up external USB devices. Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 2e77b3afdde9c0ea514d3dec47633b5ef3c04b7c Author: Icenowy Zheng Date: Sat Mar 25 22:50:13 2017 +0800 ARM: sun8i: h3: enable USB OTG on Orange Pi One Orange Pi One features a MicroUSB port that can work in both host mode and peripheral mode. When in host mode, its VBUS is controlled via a GPIO; when in peripheral mode, its VBUS cannot be used to power up the board. Add support for this port. Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 5313ea66a458bdbd1077a3b9366efba64daa699d Author: Icenowy Zheng Date: Sat Mar 25 22:50:15 2017 +0800 arm64: allwinner: h5: enable USB OTG on Orange Pi PC 2 board Orange Pi PC 2 board features a OTG port like the one on older H3 Orange Pi's, with PG12 pin being the id det pin and PL2 being the vbus driver pin. Add support for it. Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard .../boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 27 +++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 9d41bbb6e13f7a3209ea4c4d86c2753c8f075a32 Author: Andre Przywara Date: Tue Mar 7 01:17:50 2017 +0800 arm64: allwinner: h5: add support for the Orange Pi PC 2 board The Orange Pi PC 2 is a typical single board computer using the Allwinner H5 SoC. Apart from the usual suspects it features three separately driven USB ports and a Gigabit Ethernet port. Also it has a SPI NOR flash soldered, from which the board can boot from. This enables the SBC to behave like a "real computer" with built-in firmware. Add the board specific .dts file, which includes the H5 .dtsi and enables the peripherals that we support so far. Reviewed-by: Rask Ingemann Lambertsen Signed-off-by: Andre Przywara [Icenowy: dropped all GPIO pinctrl nodes, change red LED gpio, change MMC cd to active-low, rename some node names to prevent underscores] Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/Makefile | 1 + .../boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 163 +++++++++++++++++++++ 2 files changed, 164 insertions(+) commit 4e36de179f27d1017e60e25e429f50ed8382f195 Author: Andre Przywara Date: Tue Mar 7 01:17:49 2017 +0800 arm64: allwinner: h5: add Allwinner H5 .dtsi The Allwinner H5 SoC is pin-compatible to the H3 SoC, but uses Cortex-A53 cores instead. Based on the now shared base .dtsi describing the common peripherals describe the H5 specific nodes on top of that. That symlinks in the sunxi-h3-h5.dtsi from the arch/arm tree. Signed-off-by: Andre Przywara [Icenowy: add H5 pinctrl compatible, and changes for my h3-h5 dtsi refactor, commit message changed to meet new arm64 naming scheme, drop H3 pinctrl compatible because of interrupt bank change, drop H3 ccu compatible because of clock change, drop ccu node as it come into h3-h5 dtsi] Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 124 +++++++++++++++++++++++++ arch/arm64/boot/dts/allwinner/sunxi-h3-h5.dtsi | 1 + 2 files changed, 125 insertions(+) commit da89e1d5cbafe9fac6325867e609cc4d2b681e84 Author: Icenowy Zheng Date: Sat Mar 25 22:50:12 2017 +0800 ARM: sunxi: h3/h5: add usb_otg and OHCI/EHCI for usbc0 on H3/H5 Allwinner H3/H5 have a dual-routed USB PHY0 -- routed to either OHCI/EHCI or MUSB controller. Add device nodes for these controllers. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sunxi-h3-h5.dtsi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 0127216f2217e63fcf976343d1504d2ba1d83a45 Author: Andre Przywara Date: Tue Mar 7 01:17:48 2017 +0800 arm: sun8i: h3: split Allwinner H3 .dtsi The new Allwinner H5 SoC is pin-compatible to the H3 SoC, but with the Cortex-A7 cores replaced by Cortex-A53 cores and the MMC controller updated. So we should really share almost the whole .dtsi. In preparation for that move the peripheral parts of the existing sun8i-h3.dtsi into a new sunxi-h3-h5.dtsi. The actual sun8i-h3.dtsi then includes that and defines the H3 specific parts on top of it. Signed-off-by: Andre Przywara [Icenowy: also split out mmc and gic, as well as pio and ccu's compatible, and make drop of skeleton into a seperated patch] Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3.dtsi | 599 +++---------------------------------- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 586 ++++++++++++++++++++++++++++++++++++ 2 files changed, 626 insertions(+), 559 deletions(-) commit a0f4e1836b3d83cf8270533870a96e87674655f2 Author: Icenowy Zheng Date: Tue Mar 7 01:17:47 2017 +0800 arm: sun8i: h3: correct the GIC compatible in H3 to gic-400 According to the datasheets provided by Allwinner, both Allwinner H3 and H5 use GIC-400 as their interrupt controller. For better device tree reusing, correct the GIC compatible in H3 DTSI to "arm,gic-400", thus this node can be reused in H5. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94be9207c0b59704228d697842833c4953757024 Author: Icenowy Zheng Date: Tue Mar 7 01:17:46 2017 +0800 arm: sun8i: h3: drop pinctrl-a10.h inclusion for H3 DTSI After converting to generic pinconf binding, pinctrl-a10.h is now not used at all. Drop its inclusion for H3 DTSI. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3.dtsi | 1 - 1 file changed, 1 deletion(-) commit 7fd9d54229f0d6a96a8853a5206c1e5bd05f0627 Author: Icenowy Zheng Date: Tue Mar 7 01:17:45 2017 +0800 arm: sun8i: h3: drop skeleton.dtsi inclusion in H3 DTSI The skeleton.dtsi file is now deprecated, and do not exist in ARM64 environment. Since we will soon reuse most part of H3 DTSI for H5, which is an ARM64 chip, drop skeleton.dtsi inclusion now. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3.dtsi | 2 -- 1 file changed, 2 deletions(-) commit b9f4bc3031ff0b84d2c6273f2015caa01a2f8d2f Author: Ezequiel Garcia Date: Sat Mar 25 18:05:33 2017 -0300 ARM: dts: sun7i: Use axp209.dtsi on A20-OLinuXino-Micro This commit makes use of the axp209.dtsi file to define the AXP209 PMIC. While here, define the rails that are enabled on this board. Tested checking the regulator voltage varies according to the CPU frequency. Signed-off-by: Ezequiel Garcia Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 31 +++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit 2ca5fbc961e572fb4f292de80d142e6518dc9707 Author: Chen-Yu Tsai Date: Wed Mar 22 13:47:10 2017 +0800 ARM: dts: sun6i: sina31s: Enable SPDIF out The SinA31s has a coaxial SPDIF output. Enable it. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit bc57e37e32186e4914ed0af832c1d7d71aa4cefb Author: Quentin Schulz Date: Tue Mar 21 16:36:03 2017 +0100 ARM: sun8i: sina33: add cpu-supply This adds the cpu-supply DT property to the cpu0 DT node needed by the board to adapt the regulator voltage depending on the currently used OPP. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 4 ++++ 1 file changed, 4 insertions(+) commit e6bd37627e927a2e73bce95dbf5889a888e1c879 Author: Quentin Schulz Date: Tue Mar 21 16:36:02 2017 +0100 ARM: sun8i: a33: add all operating points This adds almost all operating points allowed for the A33 as defined by fex files available at: https://github.com/linux-sunxi/sunxi-boards/tree/master/sys_config/a33 There are more possible frequencies in this patch than there are in the fex files because the fex files only give an interval of possible frequencies for a given voltage. All supported frequencies are defined in the original driver code in Allwinner vendor tree. There are two missing frequencies though: 1104MHz and 1200MHz which require the CPU to have 1.32V supplied, which is higher than the default voltage. Without all A33 boards defining the CPU regulator, we cannot have these two frequencies as it would cause the CPU to try to run a higher frequency without "overvolting" which is very likely to crash the CPU. Therefore, these two frequencies must be enabled on a per-board basis. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33.dtsi | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 347230758472a2d6ff6517add267b65664057d84 Author: Quentin Schulz Date: Mon Mar 20 09:16:52 2017 +0100 ARM: sun5i: chip: enable ACIN power supply subnode The NextThing Co. CHIP has an AXP209 PMIC and can be power-supplied by ACIN via the CHG-IN pin. This enables the ACIN power supply subnode in the DT. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i-r8-chip.dts | 4 ++++ 1 file changed, 4 insertions(+) commit bd69ad59aaf6942a1644f7a21d19b116104d50cd Author: Quentin Schulz Date: Mon Mar 20 09:16:51 2017 +0100 ARM: dts: sun8i: sina33: enable ACIN power supply subnode The Sinlinx SinA33 has an AXP223 PMIC and an ACIN connector, thus, we enable the ACIN power supply in its Device Tree. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 4 ++++ 1 file changed, 4 insertions(+) commit dd663e7d9b6135e22c7f4888a5911896cc210b0f Author: Quentin Schulz Date: Mon Mar 20 09:16:50 2017 +0100 ARM: dtsi: axp22x: add AC power supply subnode The X-Powers AXP22X PMIC exposes the status of AC power supply. This adds the AC power supply subnode for the AXP22X PMIC. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard arch/arm/boot/dts/axp22x.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 7d15af5750112cc0d9fde5c6e884cc46090b2f3e Author: Quentin Schulz Date: Mon Mar 20 09:16:49 2017 +0100 ARM: dtsi: axp209: add AC power supply subnode The X-Powers AXP20X PMIC exposes the status of AC power supply, the current current and voltage supplied to the board by the AC power supply. This adds the AC power supply subnode for AXP20X PMIC. Signed-off-by: Quentin Schulz Acked-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard arch/arm/boot/dts/axp209.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 85d2913614d9ab899d23b7ab7d22d23cf45bd1de Author: Chen-Yu Tsai Date: Wed Mar 8 11:28:21 2017 +0800 ARM: dts: sunxi: Remove no longer used pinctrl/sun4i-a10.h header All dts files for the sunxi platform have been switched to the generic pinconf bindings. As a result, the sunxi specific pinctrl macros are no longer used. Remove the #include entry with the following command: sed --follow-symlinks -i -e '/pinctrl\/sun4i-a10.h/D' \ arch/arm/boot/dts/sun?i*.* arch/arm/boot/dts/sun9i-a80.dtsi was then edited to remove the extra empty line. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10-a1000.dts | 1 - arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 1 - arch/arm/boot/dts/sun4i-a10-dserve-dsrv9703c.dts | 1 - arch/arm/boot/dts/sun4i-a10-hackberry.dts | 1 - arch/arm/boot/dts/sun4i-a10-inet1.dts | 1 - arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts | 1 - arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts | 1 - arch/arm/boot/dts/sun4i-a10-marsboard.dts | 1 - arch/arm/boot/dts/sun4i-a10-mini-xplus.dts | 1 - arch/arm/boot/dts/sun4i-a10-mk802.dts | 1 - arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 1 - arch/arm/boot/dts/sun4i-a10-pcduino.dts | 1 - arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts | 1 - arch/arm/boot/dts/sun4i-a10.dtsi | 1 - arch/arm/boot/dts/sun5i-a10s-auxtek-t003.dts | 1 - arch/arm/boot/dts/sun5i-a10s-auxtek-t004.dts | 1 - arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 1 - arch/arm/boot/dts/sun5i-a10s-r7-tv-dongle.dts | 1 - arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts | 1 - arch/arm/boot/dts/sun5i-a10s.dtsi | 1 - arch/arm/boot/dts/sun5i-a13-empire-electronix-d709.dts | 1 - arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 1 - arch/arm/boot/dts/sun5i-a13-licheepi-one.dts | 1 - arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts | 1 - arch/arm/boot/dts/sun5i-a13-olinuxino.dts | 1 - arch/arm/boot/dts/sun5i-a13.dtsi | 1 - arch/arm/boot/dts/sun5i-gr8.dtsi | 1 - arch/arm/boot/dts/sun5i.dtsi | 1 - arch/arm/boot/dts/sun6i-a31-app4-evb1.dts | 1 - arch/arm/boot/dts/sun6i-a31-colombus.dts | 1 - arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 1 - arch/arm/boot/dts/sun6i-a31-i7.dts | 1 - arch/arm/boot/dts/sun6i-a31-m9.dts | 1 - arch/arm/boot/dts/sun6i-a31-mele-a1000g-quad.dts | 1 - arch/arm/boot/dts/sun6i-a31.dtsi | 1 - arch/arm/boot/dts/sun6i-a31s-cs908.dts | 2 -- arch/arm/boot/dts/sun6i-a31s-primo81.dts | 1 - arch/arm/boot/dts/sun6i-a31s-sina31s-core.dtsi | 1 - arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts | 1 - arch/arm/boot/dts/sun6i-reference-design-tablet.dtsi | 1 - arch/arm/boot/dts/sun7i-a20-bananapi.dts | 1 - arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 1 - arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 1 - arch/arm/boot/dts/sun7i-a20-hummingbird.dts | 1 - arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts | 1 - arch/arm/boot/dts/sun7i-a20-icnova-swac.dts | 1 - arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 1 - arch/arm/boot/dts/sun7i-a20-m3.dts | 1 - arch/arm/boot/dts/sun7i-a20-mk808c.dts | 1 - arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts | 1 - arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts | 1 - arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 1 - arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 1 - arch/arm/boot/dts/sun7i-a20-orangepi-mini.dts | 1 - arch/arm/boot/dts/sun7i-a20-orangepi.dts | 1 - arch/arm/boot/dts/sun7i-a20-pcduino3.dts | 1 - arch/arm/boot/dts/sun7i-a20.dtsi | 1 - arch/arm/boot/dts/sun8i-a23-a33.dtsi | 1 - arch/arm/boot/dts/sun8i-a23-evb.dts | 1 - arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 1 - arch/arm/boot/dts/sun8i-a83t.dtsi | 2 -- arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 1 - arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 1 - arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 1 - arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts | 1 - arch/arm/boot/dts/sun8i-h3-nanopi.dtsi | 1 - arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 1 - arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts | 1 - arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 1 - arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 1 - arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 1 - arch/arm/boot/dts/sun9i-a80-optimus.dts | 1 - arch/arm/boot/dts/sun9i-a80.dtsi | 2 -- arch/arm/boot/dts/sunxi-common-regulators.dtsi | 1 - arch/arm/boot/dts/sunxi-reference-design-tablet.dtsi | 1 - 75 files changed, 78 deletions(-) commit 5136914fe0bdc7cab96992ae42dc2c2d143d06cf Author: Chen-Yu Tsai Date: Wed Mar 8 11:28:20 2017 +0800 ARM: dts: sun8i-a23-q8-tablet: Drop pinmux setting for codec PA gpio The old sunxi specific pinctrl bindings are deprecated, in favor of the new generic pinconf bindings. Also, we are moving towards handling GPIO pinmux settings that don't require extra bias or drive strength settings to use the GPIO bindings only. This patch removes the last instance of the sunxi specific pinctrl bindings that use the pinctrl header by dropping the pinmux setting for the audio codec's PA (external amplifier) control GPIO. The pin is pulled down externally. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a23-q8-tablet.dts | 10 ---------- 1 file changed, 10 deletions(-) commit 74a4ce4c8e13820799911c746b917efd7cc25f55 Author: Colin Ian King Date: Wed Mar 22 14:36:44 2017 +0000 ASoC: intel: remove unused variable data and associated code The variable 'data' is assigned null and never re-assigned. There is also a redundant check for data being non-null which is always false, so remove this and the variable data and dma_addr as they are not used once the dead code has been removed. Detected with CoverityScan, CID#1324015 ("'Constant' variable gaurds dead code") Signed-off-by: Colin Ian King Acked-by: Jie Yang Signed-off-by: Mark Brown sound/soc/intel/haswell/sst-haswell-ipc.c | 6 ------ 1 file changed, 6 deletions(-) commit 36d96039e710488b53256defed0fd291e0f1a34b Author: Takashi Iwai Date: Mon Mar 27 10:39:58 2017 +0200 ASoC: intel: Don't print FW version repeatedly Intel SST driver spews an info message "FW Versoin xxxx" at each time the device gets initialized. Since it's triggered at each PM (or even runtime PM), it appears so ofetn, and rather becomes annoying than useful. This patch suppresses the superfluous messages by checking the currently loaded FW version with the previously loaded one. Signed-off-by: Takashi Iwai Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_ipc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cb3c8e5ade3f01839ce0a9388ddc9729de4e2d6d Author: Vignesh R Date: Mon Mar 27 10:59:28 2017 +0530 spi: spi-ti-qspi: Remove unused dma_dev variable commit 1351aaeb50b2 ("spi: spi-ti-qspi: Use dma_engine wrapper for dma memcpy call") introduced this warning: drivers/spi/spi-ti-qspi.c: In function 'ti_qspi_dma_xfer': drivers/spi/spi-ti-qspi.c:398:21: warning: unused variable 'dma_dev' [-Wunused-variable] struct dma_device *dma_dev = chan->device; Fix it by removing the unused variable. Signed-off-by: Vignesh R Reported-by: Stephen Rothwell Signed-off-by: Mark Brown drivers/spi/spi-ti-qspi.c | 1 - 1 file changed, 1 deletion(-) commit 41003396f932d7f027725c7acebb6a7caa41dc3e Author: Sergey Temerkhanov Date: Fri Mar 24 22:28:37 2017 +0000 EDAC, thunderx: Add Cavium ThunderX EDAC driver Add support for Cavium ThunderX EDAC capable on-chip peripherals, namely the DRAM controller (LMC), cache coherent processor interconnect (CCPI) and level 2 cache blocks (L2C-TAD, L2C-MCI, L2C-CBC) Signed-off-by: Sergey Temerkhanov Cc: David.Daney@cavium.com Cc: Jan.Glauber@cavium.com Cc: linux-edac Link: http://lkml.kernel.org/r/20170324222837.60583-1-s.temerkhanov@gmail.com Signed-off-by: Borislav Petkov MAINTAINERS | 1 + drivers/edac/Kconfig | 11 + drivers/edac/Makefile | 1 + drivers/edac/thunderx_edac.c | 2183 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 2196 insertions(+) commit c0411316ab93e35a671aafcab82d1eefed449a4f Author: Gabriel Krisman Bertazi Date: Fri Mar 24 01:54:44 2017 -0300 drm: bochs: Prevent double-free of fb helper If fbdev registration fails for whatever reason, the error path of bochs_fbdev_init() will call bochs_fbdev_fini(), but since an fbdev initialization error is not fatal to the probe function, a subsequent device removal will try to call bochs_fbdev_fini() again, hitting the Oops below. This was detected by 0-day with a failing framebuffer registration and CONFIG_DEBUG_TEST_DRIVER_REMOVE=y. This reproduces the scenario I mentioned above at insmod time, because the test attempts to remove the device right after probing. root@debian:~# insmod bochs-drm.ko [ 17.609635] [drm] Found bochs VGA, ID 0xb0c0. [ 17.612974] [drm] Framebuffer size 16384 kB @ 0xfa000000, mmio @ 0xfebf2000. [ 17.613938] [TTM] Zone kernel: Available graphics memory: 1022244 kiB [ 17.614701] [TTM] Initializing pool allocator [ 17.615427] [TTM] Initializing DMA pool allocator [ 17.619143] fbcon: bochsdrmfb (fb0) is primary device [ 17.619428] Console: switching to colour frame buffer device 128x48 [ 17.621047] bochs-drm 0000:00:02.0: fb0: bochsdrmfb frame buffer device [ 17.641111] [drm] Initialized bochs-drm 1.0.0 20130925 for 0000:00:02.0 on minor 0 [ 17.642380] general protection fault: 0000 [#1] SMP [ 17.642985] Modules linked in: bochs_drm(+) [ 17.643259] CPU: 4 PID: 3279 Comm: insmod Tainted: G W 4.11.0-rc1+ #119 [ 17.643259] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014 [ 17.643259] task: ffff88007af35e00 task.stack: ffffc90000d84000 [ 17.643259] RIP: 0010:drm_fb_helper_fini+0x8e/0x110 [ 17.643259] RSP: 0018:ffffc90000d87ad0 EFLAGS: 00010202 [ 17.643259] RAX: dead000000000200 RBX: ffff8800790d5770 RCX: 0000000000000000 [ 17.652101] RDX: dead000000000100 RSI: 000000007fffffff RDI: ffffffff81eaf820 [ 17.652101] RBP: ffffc90000d87ae0 R08: 0000000000000000 R09: ffff88007271d918 [ 17.652101] R10: ffffc90000d87a88 R11: 0000000000000000 R12: 0000000000000000 [ 17.652101] R13: ffff8800790d56d0 R14: 0000000000000000 R15: 0000000000000000 [ 17.652101] FS: 00007f9285995700(0000) GS:ffff88007cf00000(0000) knlGS:0000000000000000 [ 17.652101] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 17.652101] CR2: 0000564f1cf9f1e8 CR3: 0000000079686000 CR4: 00000000000006e0 [ 17.652101] Call Trace: [ 17.652101] bochs_fbdev_fini+0x24/0x90 [bochs_drm] [ 17.652101] bochs_unload+0x16/0x50 [bochs_drm] [ 17.652101] drm_dev_unregister+0x37/0xd0 [ 17.652101] drm_put_dev+0x31/0x60 [ 17.652101] bochs_pci_remove+0x10/0x20 [bochs_drm] [ 17.652101] pci_device_remove+0x34/0xb0 [ 17.652101] driver_probe_device+0xd0/0x370 [ 17.652101] __driver_attach+0x96/0xa0 [ 17.652101] ? driver_probe_device+0x370/0x370 [ 17.652101] bus_for_each_dev+0x5b/0x90 [ 17.652101] driver_attach+0x19/0x20 [ 17.652101] bus_add_driver+0x11c/0x220 [ 17.652101] driver_register+0x5b/0xd0 [ 17.652101] ? 0xffffffffa0006000 [ 17.652101] __pci_register_driver+0x47/0x50 [ 17.652101] drm_pci_init+0xe1/0xf0 [ 17.652101] ? 0xffffffffa0006000 [ 17.652101] bochs_init+0x3c/0x1000 [bochs_drm] [ 17.652101] do_one_initcall+0x3e/0x180 [ 17.652101] ? kmem_cache_alloc_trace+0x33/0x150 [ 17.652101] do_init_module+0x5a/0x1eb [ 17.652101] load_module+0x1ea0/0x2650 [ 17.652101] ? __symbol_put+0x40/0x40 [ 17.652101] ? kernel_read_file+0x19e/0x1c0 [ 17.652101] ? kernel_read_file_from_fd+0x44/0x70 [ 17.652101] SYSC_finit_module+0xba/0xc0 [ 17.652101] SyS_finit_module+0x9/0x10 [ 17.652101] entry_SYSCALL_64_fastpath+0x1a/0xa9 [ 17.652101] RIP: 0033:0x7f92854da119 [ 17.652101] RSP: 002b:00007ffcd0390498 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 17.652101] RAX: ffffffffffffffda RBX: 00007f928578eb58 RCX: 00007f92854da119 [ 17.652101] RDX: 0000000000000000 RSI: 0000564f1c8bd638 RDI: 0000000000000003 [ 17.652101] RBP: 000000000000270e R08: 0000000000000000 R09: 00007f9285790ea0 [ 17.652101] R10: 0000000000000003 R11: 0000000000000246 R12: 00007f928578eb58 [ 17.652101] R13: 0000000000001020 R14: 0000564f1cf9e1c0 R15: 00007f928578eb00 [ 17.652101] Code: c7 20 f8 ea 81 e8 b3 3e 50 00 48 8b 83 d0 00 00 00 48 8d 93 d0 00 00 00 48 39 c2 74 46 48 8b 83 d8 00 00 00 48 8b 93 d0 00 00 00 <48> 89 42 08 48 89 10 48 b8 00 01 00 00 0000 ad de 48 89 83 d0 [ 17.652101] RIP: drm_fb_helper_fini+0x8e/0x110 RSP: ffffc90000d87ad0 [ 17.653331] ---[ end trace 542fd75a2e60a6a4 ]--- Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170324045444.11912-1-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/bochs/bochs_fbdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 05b40e057734811ce452344fb3690d09965a7b6a Author: Srikar Dronamraju Date: Wed Mar 22 23:27:50 2017 +0530 sched/fair: Prefer sibiling only if local group is under-utilized If the child domain prefers tasks to go siblings, the local group could end up pulling tasks to itself even if the local group is almost equally loaded as the source group. Lets assume a 4 core,smt==2 machine running 5 thread ebizzy workload. Everytime, local group has capacity and source group has atleast 2 threads, local group tries to pull the task. This causes the threads to constantly move between different cores. This is even more profound if the cores have more threads, like in Power 8, smt 8 mode. Fix this by only allowing local group to pull a task, if the source group has more number of tasks than the local group. Here are the relevant perf stat numbers of a 22 core,smt 8 Power 8 machine. Without patch: Performance counter stats for 'ebizzy -t 22 -S 100' (5 runs): 1,440 context-switches # 0.001 K/sec ( +- 1.26% ) 366 cpu-migrations # 0.000 K/sec ( +- 5.58% ) 3,933 page-faults # 0.002 K/sec ( +- 11.08% ) Performance counter stats for 'ebizzy -t 48 -S 100' (5 runs): 6,287 context-switches # 0.001 K/sec ( +- 3.65% ) 3,776 cpu-migrations # 0.001 K/sec ( +- 4.84% ) 5,702 page-faults # 0.001 K/sec ( +- 9.36% ) Performance counter stats for 'ebizzy -t 96 -S 100' (5 runs): 8,776 context-switches # 0.001 K/sec ( +- 0.73% ) 2,790 cpu-migrations # 0.000 K/sec ( +- 0.98% ) 10,540 page-faults # 0.001 K/sec ( +- 3.12% ) With patch: Performance counter stats for 'ebizzy -t 22 -S 100' (5 runs): 1,133 context-switches # 0.001 K/sec ( +- 4.72% ) 123 cpu-migrations # 0.000 K/sec ( +- 3.42% ) 3,858 page-faults # 0.002 K/sec ( +- 8.52% ) Performance counter stats for 'ebizzy -t 48 -S 100' (5 runs): 2,169 context-switches # 0.000 K/sec ( +- 6.19% ) 189 cpu-migrations # 0.000 K/sec ( +- 12.75% ) 5,917 page-faults # 0.001 K/sec ( +- 8.09% ) Performance counter stats for 'ebizzy -t 96 -S 100' (5 runs): 5,333 context-switches # 0.001 K/sec ( +- 5.91% ) 506 cpu-migrations # 0.000 K/sec ( +- 3.35% ) 10,792 page-faults # 0.001 K/sec ( +- 7.75% ) Which show that in these workloads CPU migrations get reduced significantly. Signed-off-by: Srikar Dronamraju Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vincent Guittot Link: http://lkml.kernel.org/r/1490205470-10249-1-git-send-email-srikar@linux.vnet.ibm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 9a93848fe787a53aec404e4e00d8f7f9bbdaebb4 Author: Peter Zijlstra Date: Thu Feb 2 14:43:51 2017 +0100 x86/debug: Implement __WARN() using UD0 By using "UD0" for WARN()s we remove the function call and its possible __FILE__ and __LINE__ immediate arguments from the instruction stream. Total image size will not change much, what we win in the instruction stream we'll lose because of the __bug_table entries. Still, saves on I$ footprint and the total image size does go down a bit. text data filename 10702123 4530992 defconfig-build/vmlinux.orig 10682460 4530992 defconfig-build/vmlinux.patched (UML didn't seem to use GENERIC_BUG at all, so remove it) Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Josh Poimboeuf Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Richard Weinberger Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/um/Kconfig.common | 5 --- arch/x86/include/asm/bug.h | 78 ++++++++++++++++++++++++++++++++---------- arch/x86/kernel/dumpstack.c | 3 -- arch/x86/kernel/dumpstack_32.c | 12 ------- arch/x86/kernel/dumpstack_64.c | 10 ------ arch/x86/kernel/traps.c | 46 +++++++++++++++++++++---- arch/x86/um/Makefile | 2 +- arch/x86/um/bug.c | 21 ------------ 8 files changed, 101 insertions(+), 76 deletions(-) commit d7fd724e01939f777781a86d078c3b7142fb9c03 Author: Vinod Koul Date: Mon Mar 27 13:33:31 2017 +0530 dmaengine: cppi: fix build error due to bad variable Commit 8e3ba95f4190 ("dmaengine: cppi41: use managed functions devm_*()") moved the code to devm_* but erranously changed a varible name, so fix it. drivers/dma/cppi41.c:1052:5: error: 'struct cppi41_dd' has no member named 'qmrg_mem' cdd->qmrg_mem = devm_ioremap_resource(dev, mem); ^ drivers/dma/cppi41.c:1053:16: error: 'struct cppi41_dd' has no member named 'qmrg_mem' if (IS_ERR(cdd->qmrg_mem)) ^ drivers/dma/cppi41.c:1054:21: error: 'struct cppi41_dd' has no member named 'qmrg_mem' return PTR_ERR(cdd->qmrg_mem); ^ Fixes: 8e3ba95f4190 ("dmaengine: cppi41: use managed functions devm_*()") Reported-by: kbuild test robot Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a38b395521898364cb157b8c03cf9abc2b327aff Author: Petr Cvek Date: Fri Feb 24 02:54:12 2017 +0100 usb: gadget: pxa27x: Remove duplicate function prototype Functions udc_enable() and udc_disable() have a duplicated prototype. Remove it. Acked-by: Robert Jarzmik Signed-off-by: Petr Cvek Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/pxa27x_udc.c | 3 --- 1 file changed, 3 deletions(-) commit 05428ba983e64d9744c9bf32e6ac197918a0a50c Author: Lu Baolu Date: Wed Mar 1 08:44:06 2017 +0800 usb: dwc3: remove dwc3_log_msg trace class dwc3_log_msg trace class isn't used any more. Suggest to remove it. Signed-off-by: Lu Baolu Signed-off-by: Felipe Balbi drivers/usb/dwc3/trace.h | 25 ------------------------- 1 file changed, 25 deletions(-) commit edc69d556221b09ad7b91b4754a439e7bc1a01ce Author: Michal Nazarewicz Date: Wed Mar 1 15:34:19 2017 +0100 usb: gadget: mv_udc: clarify a switch with an implicit fall-through Rearrange statements in mv_ep_enable function so that it’s obvious what the switch does and how zlt, ios and mult variables are initialised. Most notably, this gets rid of an implicit fall-through so people don’t have to wonder whether it was intenional or not. Addresses-Coverity-ID: 201385 Reported-by: Gustavo A. R. Silva Signed-off-by: Michal Nazarewicz Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/mv_udc_core.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 1966b8657d058ecb95031809b607bf3fd1e01c10 Author: Felipe Balbi Date: Wed Aug 3 14:16:15 2016 +0300 usb: dwc3: make sure UX_EXIT_PX is cleared This bit is only supposed to be used with known buggy PHYs, however some platforms might erroneously set it. In order to avoid it, let's make sure this bit is always cleared. If some PHY needs this, we will need to add a quirk flag. Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 6 ++++++ drivers/usb/dwc3/core.h | 1 + 2 files changed, 7 insertions(+) commit 18dddadc78c91a91b546acc48506c24f5f840c4f Author: Daniel Vetter Date: Tue Mar 21 17:41:49 2017 +0100 drm/atomic: Introduce drm_atomic_helper_shutdown The trouble here is that it does multiple atomic commits under one drm_modeset_lock_all, which breaks the behind-the-scenes acquire context magic that function pulls off. It's much better to have one overall atomic commit. That we still have multiple atomic commits prevents us from adding some pretty useful debug checks to the atomic machinery. Hence it is really a bad idea to call the legacy drm_crtc_force_disable_all() function. There's 2 atomic drivers using this still, nouveau and tinydrm. To fix this, introduce a new drm_atomic_helper_shutdown() by extracting the code from i915. While at it improve kernel-doc and catch future offenders by sprinkling a WARN_ON into the legacy function. We should probably move those into the legacy modeset helpers, too ... v2: Make it compile on arm drivers too (Noralf). v3: Correct kerneldoc to point at _disable_all(). Reviewed-by: Maarten Lankhorst Acked-by: Noralf Trønnes Cc: Maarten Lankhorst Cc: Noralf Trønnes Cc: Ben Skeggs Tested-by: Tomi Valkeinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170321164149.31531-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic_helper.c | 42 +++++++++++++++++++++++++++-- drivers/gpu/drm/drm_crtc.c | 7 +++++ drivers/gpu/drm/i915/i915_drv.c | 20 +------------- drivers/gpu/drm/nouveau/nouveau_display.c | 8 ++++-- drivers/gpu/drm/tinydrm/core/tinydrm-core.c | 4 +-- include/drm/drm_atomic_helper.h | 1 + 6 files changed, 57 insertions(+), 25 deletions(-) commit 96fb7e256a0650c2b37768c780bf0f680b0049b6 Merge: 7e04072 c02ed2e Author: Greg Kroah-Hartman Date: Mon Mar 27 09:21:25 2017 +0200 Merge 4.11-rc4 into driver-core-next We want the fixes in here for merge issues. Signed-off-by: Greg Kroah-Hartman commit e47ff590cc57a3468c1f77e5f2494bbaefdd4371 Merge: 2e58caf c02ed2e Author: Greg Kroah-Hartman Date: Mon Mar 27 09:19:32 2017 +0200 Merge 4.11-rc4 into usb-next This resolves a merge issue in the gadget code, and we want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 57c0eabbd57e1a0872122525f6eeefe1f6529c33 Merge: 392910c c02ed2e Author: Greg Kroah-Hartman Date: Mon Mar 27 09:13:04 2017 +0200 Merge 4.11-rc4 into char-misc-next We want the char-misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 1c816bad41fea5470e8077ae4e661f3f9b5ada64 Merge: b0fe8f7 c02ed2e Author: Greg Kroah-Hartman Date: Mon Mar 27 09:11:25 2017 +0200 Merge 4.11-rc4 into staging-next We need the IIO fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman commit f2a6a7050109e0a5c7a84c70aa6010f682b2f1ee Author: Kirill A. Shutemov Date: Fri Mar 17 21:55:15 2017 +0300 x86: Convert the rest of the code to support p4d_t This patch converts x86 to use proper folding of a new (fifth) page table level with . That's a bit of a kitchen sink patch, but I don't see how to split it further without hurting bisectability. Signed-off-by: Kirill A. Shutemov Acked-by: Thomas Gleixner Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Michal Hocko Cc: Peter Zijlstra Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170317185515.8636-7-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/paravirt.h | 33 +++++- arch/x86/include/asm/paravirt_types.h | 12 ++- arch/x86/include/asm/pgalloc.h | 35 ++++++- arch/x86/include/asm/pgtable.h | 59 ++++++++++- arch/x86/include/asm/pgtable_64.h | 12 ++- arch/x86/include/asm/pgtable_types.h | 10 +- arch/x86/include/asm/xen/page.h | 8 +- arch/x86/kernel/paravirt.c | 10 +- arch/x86/mm/init_64.c | 183 +++++++++++++++++++++++++++------- arch/x86/xen/mmu.c | 152 ++++++++++++++++------------ include/trace/events/xen.h | 28 +++--- 11 files changed, 401 insertions(+), 141 deletions(-) commit 907cd439029091bcbd67f03cbe45a4c124347731 Author: Xiong Zhang Date: Fri Mar 17 21:55:14 2017 +0300 x86/xen: Change __xen_pgd_walk() and xen_cleanmfnmap() to support p4d Split these helpers into a couple of per-level functions and add support for an additional page table level. Signed-off-by: Xiong Zhang [ Split off into separate patch ] Signed-off-by: Kirill A. Shutemov Acked-by: Thomas Gleixner Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Michal Hocko Cc: Peter Zijlstra Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170317185515.8636-6-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/xen/mmu.c | 245 ++++++++++++++++++++++++++++++++--------------------- arch/x86/xen/mmu.h | 1 + 2 files changed, 150 insertions(+), 96 deletions(-) commit d691a3cf8004784303f0a4c1c036edfaa7d64d0b Author: Kirill A. Shutemov Date: Fri Mar 17 21:55:13 2017 +0300 x86/kasan: Prepare clear_pgds() to switch to With folded p4d, pgd_clear() is a nop. Change clear_pgds() to use p4d_clear() instead. Signed-off-by: Kirill A. Shutemov Acked-by: Thomas Gleixner Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: Dmitry Vyukov Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Michal Hocko Cc: Peter Zijlstra Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170317185515.8636-5-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/kasan_init_64.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 4547833602fdd3b672c9b945818cc658d38bfcf1 Author: Kirill A. Shutemov Date: Fri Mar 17 21:55:12 2017 +0300 x86/mm/pat: Add 5-level paging support Straight-forward extension of existing code to support additional page table level. Signed-off-by: Kirill A. Shutemov Reviewed-by: Thomas Gleixner Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Michal Hocko Cc: Peter Zijlstra Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170317185515.8636-4-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/pageattr.c | 54 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 14 deletions(-) commit e981316f560482c001dede7f5b29259bde0b8afb Author: Kirill A. Shutemov Date: Fri Mar 17 21:55:11 2017 +0300 x86/efi: Add 5-level paging support Allocate additional page table level and ajdust efi_sync_low_kernel_mappings() to work with additional page table level. Signed-off-by: Kirill A. Shutemov Reviewed-by: Matt Fleming Acked-by: Thomas Gleixner Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Michal Hocko Cc: Peter Zijlstra Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170317185515.8636-3-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/platform/efi/efi_64.c | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) commit 7f68904182e2f346c11b0acd74048181dc6615bb Author: Kirill A. Shutemov Date: Fri Mar 17 21:55:10 2017 +0300 x86/kexec: Add 5-level paging support Handle additional page table level in the kexec code. Signed-off-by: Kirill A. Shutemov Acked-by: Thomas Gleixner Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Michal Hocko Cc: Peter Zijlstra Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170317185515.8636-2-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/kexec.h | 1 + arch/x86/kernel/machine_kexec_32.c | 4 +++- arch/x86/kernel/machine_kexec_64.c | 14 ++++++++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) commit 79b85d2b7e5e61659deca3ec064e8c0245250a68 Author: Noralf Trønnes Date: Sun Mar 26 16:25:29 2017 +0200 drm/tinydrm: Fix drm_driver.fops.owner drm_driver.fops can't be shared since the owner then becomes tinydrm.ko. Move the fops declaration to the driver. v2: Use DEFINE_DRM_GEM_CMA_FOPS Reported-by: Daniel Vetter Signed-off-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170326142529.16938-1-noralf@tronnes.org drivers/gpu/drm/tinydrm/core/tinydrm-core.c | 15 --------------- drivers/gpu/drm/tinydrm/mi0283qt.c | 3 +++ include/drm/tinydrm/tinydrm.h | 4 +--- 3 files changed, 4 insertions(+), 18 deletions(-) commit 187697a4544c20d4b77193275a7e10f85506d14d Author: Romain Perier Date: Mon Mar 27 11:45:07 2017 +0530 drm: dw_hdmi: Don't rely on the status of the bridge for updating HPD Currently, the irq handler that monitors changes for HPD and RX_SENSE relies on the status of the bridge for updating the status of the HPD. The update is done only when the bridge is enabled. However, on Rockchip platforms we have found use cases where it could be a problem. When HDMI is being used, turning off/on the screen or unplugging/re-plugging the cable, the following simplified code path will happen: - dw_hdmi_irq() will be triggered by an HPD event, as the bridge is on hdmi->disabled is false, then the handler will update the rxsense flag accordingly. - dw_hdmi_update_power() will be invoked with the mode DRM_FORCE_UNSPECIFIED and rxsense == 1, so dw_hdmi_poweroff() will be called and the PHY will be desactivated (its pixel clocks and TMDS) [...] - dw_hdmi_bridge_disable() will be invoked, the bridge will be marked as disabled. - dw_hdmi_irq() will be triggered by an HPD event, as the bridge is currently disabled the HPD status won't be updated, so hdmi->rxsense won't be changed. Even if the data part of the PHY is disabled, this information coming from the HDMI Transmitter is correct and should be saved. [...] - dw_hdmi_bridge_enable() will be invoked, the bridge will be marked as enabled. - dw_hdmi_update_power() will be called. When hdmi->force is equal to DRM_FORCE_UNSPECIFIED the function will rely on hdmi->rxsense. If this field has not been updated by the irq handler, it will be false and DRM_FORCE_ON won't be put to hdmi->force. Consequently, most of the time dw_hdmi_poweron() won't be called in this use case, TMDS won't be re-enabled the PHY won't be re-initialized, resulting in a "Signal not found". This commit fixes the issue by removing the check for "!hdmi->disabled". As already explained, even if the PHY is partially disabled, information coming from HDMI Transmitter about HPD should be saved for a later use. Signed-off-by: Romain Perier Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/143602/ drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f3ff14b7eb1ffad132117f08a1973b48e653d43 Author: Jiada Wang Date: Thu Mar 16 23:12:09 2017 -0700 dmaengine: imx-sdma: add 1ms delay to ensure SDMA channel is stopped sdma_disable_channel() cannot ensure dma is stopped to access module's FIFOs. There is chance SDMA core is running and accessing BD when disable of corresponding channel, this may cause sometimes even after call of .sdma_disable_channel(), SDMA core still be running and accessing module's FIFOs. According to NXP R&D team a delay of one BD SDMA cost time (maximum is 1ms) should be added after disable of the channel bit, to ensure SDMA core has really been stopped after SDMA clients call .device_terminate_all. This patch introduces adds a new function sdma_disable_channel_with_delay() which simply adds 1ms delay after call sdma_disable_channel(), and set it as .device_terminate_all. Signed-off-by: Jiada Wang Signed-off-by: Vinod Koul drivers/dma/imx-sdma.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 8e3ba95f41901e0da0bb3151ed696dca6f7ec511 Author: Andy Shevchenko Date: Thu Mar 16 16:18:45 2017 +0200 dmaengine: cppi41: use managed functions devm_*() This makes the error handling much more simpler than open-coding everything and in addition makes the probe function smaller an tidier. Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 64 ++++++++++++++++++++-------------------------------- 1 file changed, 25 insertions(+), 39 deletions(-) commit a08f2673dde1aaba22c79ed016d5901f1b042401 Author: Andy Shevchenko Date: Thu Mar 16 16:18:44 2017 +0200 dmaengine: cppi41: fix cppi41_dma_tx_status() logic It makes sense to set residue when channel is in progress. Otherwise it should be 0 since transfer is completed. Meanwhile this patch doesn't prevent to set residue value anyway. Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit dc7c733acb04307563da357af6118b12948c3f50 Author: Sinan Kaya Date: Sat Mar 25 19:04:03 2017 -0400 dmaengine: qcom_hidma: pause the channel on shutdown We need to ensure that all DMAs and interrupts are cleared during shutdown operation in order for kexec to start the next kernel clearly. Otherwise, HW could be performing a DMA into random addresses in the middle of second kernel start. Signed-off-by: Sinan Kaya Signed-off-by: Vinod Koul drivers/dma/qcom/hidma.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit c3a4528788cf09d709217f21be4b0fc38ada17d0 Author: Sinan Kaya Date: Sat Mar 25 19:04:02 2017 -0400 dmaengine: qcom_hidma: disable/enable IRQs on pause/resume Once the channels are stopped, disable interrupts to make sure no new HW interaction can happen. Similarly, re-enable the interrupts only if we know that channel is operational again. Signed-off-by: Sinan Kaya Signed-off-by: Vinod Koul drivers/dma/qcom/hidma_ll.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6c786bcb29dd684533ec165057f437d5bb34a4b2 Author: Alexey Dobriyan Date: Sat Mar 25 19:41:17 2017 +0300 xfrm: branchless addr4_match() on 64-bit Current addr4_match() code has special test for /0 prefixes because of standard required undefined behaviour. However, it is possible to omit it on 64-bit because shifting can be done within a 64-bit register and then truncated to the expected value (which is 0 mask). Implicit truncation by htonl() fits nicely into R32-within-R64 model on x86-64. Space savings: none (coincidence) Branch savings: 1 Before: movzx eax,BYTE PTR [rdi+0x2a] # ->prefixlen_d test al,al jne xfrm_selector_match + 0x23f ... movzx eax,BYTE PTR [rbx+0x2b] # ->prefixlen_s test al,al je xfrm_selector_match + 0x1c7 After (no branches): mov r8d,0x20 mov rdx,0xffffffffffffffff mov esi,DWORD PTR [rsi+0x2c] mov ecx,r8d sub cl,BYTE PTR [rdi+0x2a] xor esi,DWORD PTR [rbx] mov rdi,rdx xor eax,eax shl rdi,cl bswap edi Signed-off-by: Alexey Dobriyan Signed-off-by: Steffen Klassert include/net/xfrm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1175f83cdb7a321b8b7b061d18846d58490b2654 Author: Kuninori Morimoto Date: Wed Mar 22 04:22:36 2017 +0000 dmaengine: rcar-dmac: enable descriptor mode on 40bit SYS-DMAC can use 40bit address transfer, and it supports Descriptor Mode too. Current SYS-DMAC driver disables Descriptor Mode if it was 40bit address today. But it can use Descriptor Mode with 40bit if transfer Source/Destination address are located in same 4GiB region in the 40 bit address space. This patch enables it if all condition was clear Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Vinod Koul drivers/dma/sh/rcar-dmac.c | 52 ++++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 20 deletions(-) commit 6b5c19c55266f6efd10ffac0e9f9f2b7aa420a58 Author: Alexey Kardashevskiy Date: Wed Mar 22 15:21:47 2017 +1100 powerpc/mmu: Add real mode support for IOMMU preregistered memory This makes mm_iommu_lookup() able to work in realmode by replacing list_for_each_entry_rcu() (which can do debug stuff which can fail in real mode) with list_for_each_entry_lockless(). This adds realmode version of mm_iommu_ua_to_hpa() which adds explicit vmalloc'd-to-linear address conversion. Unlike mm_iommu_ua_to_hpa(), mm_iommu_ua_to_hpa_rm() can fail. This changes mm_iommu_preregistered() to receive @mm as in real mode @current does not always have a correct pointer. This adds realmode version of mm_iommu_lookup() which receives @mm (for the same reason as for mm_iommu_preregistered()) and uses lockless version of list_for_each_entry_rcu(). Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mmu_context.h | 4 ++++ arch/powerpc/mm/mmu_context_iommu.c | 39 ++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) commit 366380cd62f4fce82d970e9a510d0510b4dea5ee Author: Andy Shevchenko Date: Tue Mar 21 20:37:47 2017 +0200 Revert "extcon: usb-gpio: add support for ACPI gpio interface" The commit 942c7924a51e introduced a check for ACPI handle for the device that never appears on any ACPI-enabled platform so far. It seems a confusion with extcon-intel-int3496 which does support ACPI-enabled platforms. Revert commit 942c7924a51e to avoid any confusion in the future. Signed-off-by: Andy Shevchenko Signed-off-by: Chanwoo Choi drivers/extcon/extcon-usb-gpio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8ce371f9846ef1e8b3cc8f6865766cb5c1f17e40 Author: Peter Zijlstra Date: Mon Mar 20 12:26:55 2017 +0100 lockdep: Fix per-cpu static objects Since commit 383776fa7527 ("locking/lockdep: Handle statically initialized PER_CPU locks properly") we try to collapse per-cpu locks into a single class by giving them all the same key. For this key we choose the canonical address of the per-cpu object, which would be the offset into the per-cpu area. This has two problems: - there is a case where we run !0 lock->key through static_obj() and expect this to pass; it doesn't for canonical pointers. - 0 is a valid canonical address. Cure both issues by redefining the canonical address as the address of the per-cpu variable on the boot CPU. Since I didn't want to rely on CPU0 being the boot-cpu, or even existing at all, track the boot CPU in a variable. Fixes: 383776fa7527 ("locking/lockdep: Handle statically initialized PER_CPU locks properly") Reported-by: kernel test robot Signed-off-by: Peter Zijlstra (Intel) Tested-by: Borislav Petkov Cc: Sebastian Andrzej Siewior Cc: linux-mm@kvack.org Cc: wfg@linux.intel.com Cc: kernel test robot Cc: LKP Link: http://lkml.kernel.org/r/20170320114108.kbvcsuepem45j5cr@hirez.programming.kicks-ass.net Signed-off-by: Thomas Gleixner include/linux/smp.h | 12 ++++++++++++ kernel/cpu.c | 6 ++++++ kernel/module.c | 6 +++++- mm/percpu.c | 5 ++++- 4 files changed, 27 insertions(+), 2 deletions(-) commit e2d9ba43559e5fcd94a365ba86718332737b0817 Author: Linus Lüssing Date: Fri Feb 17 11:17:07 2017 +0100 batman-adv: restructure rebroadcast counter into forw_packet API This patch refactors the num_packets counter of a forw_packet in the following three ways: 1) Removed dual-use of forw_packet::num_packets: -> now for aggregation purposes only 2) Using forw_packet::skb::cb::num_bcasts instead: -> for easier access in aggregation code later 3) make access to num_bcasts private to batadv_forw_packet_*() Signed-off-by: Linus Lüssing [sven@narfation.org: Change num_bcasts to unsigned] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/distributed-arp-table.c | 2 +- net/batman-adv/main.c | 3 ++ net/batman-adv/send.c | 55 ++++++++++++++++++++++++++++++++-- net/batman-adv/send.h | 1 + net/batman-adv/soft-interface.c | 3 ++ net/batman-adv/types.h | 4 ++- 6 files changed, 63 insertions(+), 5 deletions(-) commit 99ba18ef0200a824e7bae73f358916b6e3624d62 Author: Linus Lüssing Date: Fri Feb 17 11:17:06 2017 +0100 batman-adv: privatize forw_packet skb assignment An skb is assigned to a forw_packet only once, shortly after the forw_packet allocation. With this patch the assignment is moved into the this allocation function. Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bat_iv_ogm.c | 17 +++++++++-------- net/batman-adv/send.c | 21 ++++++++++++--------- net/batman-adv/send.h | 3 ++- 3 files changed, 23 insertions(+), 18 deletions(-) commit 88275ed0cb3ac89ed869a925337b951801b154d7 Merge: 71ee030 386f576 Author: David S. Miller Date: Sat Mar 25 20:15:56 2017 -0700 Merge branch 'netvsc-next' K. Y. Srinivasan says: ==================== netvsc: Fix miscellaneous issues Fix miscellaneous issues. ==================== Signed-off-by: David S. Miller commit 386f57622cc3bbb39b9c00fc8762bc9ab28e0f8d Author: K. Y. Srinivasan Date: Fri Mar 24 20:54:37 2017 -0700 netvsc: Properly initialize the return value Initialize the return value correctly. Signed-off-by: K. Y. Srinivasan Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1dd90cea725f794185a66c4e4ccfd4fb84632b5 Author: K. Y. Srinivasan Date: Fri Mar 24 20:54:36 2017 -0700 netvsc: Fix a bug in sub-channel handling All netvsc channels are handled via NAPI. Setup the "read mode" correctly for the netvsc sub-channels. Signed-off-by: K. Y. Srinivasan Signed-off-by: David S. Miller drivers/net/hyperv/rndis_filter.c | 5 +++++ 1 file changed, 5 insertions(+) commit 71ee0307f504764dd1d9fd9bd04213f210567600 Merge: 8c7314c 91ed81f Author: David S. Miller Date: Sat Mar 25 20:11:19 2017 -0700 Merge branch 'gtp-sgsn-side-tunnel' Jonas Bonn says: ==================== GTP SGSN-side tunnel Changes since v4: * Respin the series on top of net-next; the conflicts were trivial, amounting to just code having been shifted about ==================== Signed-off-by: David S. Miller commit 91ed81f9abc76d5a61b07cb8286c680c9330b7a1 Author: Jonas Bonn Date: Fri Mar 24 23:23:21 2017 +0100 gtp: support SGSN-side tunnels The GTP-tunnel driver is explicitly GGSN-side as it searches for PDP contexts based on the incoming packets _destination_ address. If we want to place ourselves on the SGSN side of the tunnel, then we want to be identifying PDP contexts based on _source_ address. Let it be noted that in a "real" configuration this module would never be used: the SGSN normally does not see IP packets as input. The justification for this functionality is for PGW load-testing applications where the input to the SGSN is locally generally IP traffic. This patch adds a "role" argument at GTP-link creation time to specify whether we are on the GGSN or SGSN side of the tunnel; this flag is then used to determine which part of the IP packet to use in determining the PDP context. Signed-off-by: Jonas Bonn Acked-by: Pablo Neira Ayuso Acked-by: Harald Welte Signed-off-by: David S. Miller drivers/net/gtp.c | 42 ++++++++++++++++++++++++++++++------------ include/uapi/linux/if_link.h | 7 +++++++ 2 files changed, 37 insertions(+), 12 deletions(-) commit ae6336b57ede8cdf801b04e6d943617bb945e3f9 Author: Jonas Bonn Date: Fri Mar 24 23:23:20 2017 +0100 gtp: rename SGSN netlink attribute This is a mostly cosmetic rename of the SGSN netlink attribute to the GTP link. The justification for this is that we will be making the module support decapsulation of "downstream" SGSN packets, in which case the netlink parameter actually refers to the upstream GGSN peer. Renaming the parameter makes the relationship clearer. The legacy name is maintained as a define in the header file in order to not break existing code. Signed-off-by: Jonas Bonn Acked-by: Pablo Neira Ayuso Acked-by: Harald Welte Signed-off-by: David S. Miller drivers/net/gtp.c | 22 +++++++++++----------- include/uapi/linux/gtp.h | 3 ++- 2 files changed, 13 insertions(+), 12 deletions(-) commit 8c7314c65a1e413de3fb409f28e3ba55429d6996 Merge: 1312444 416906f Author: David S. Miller Date: Sat Mar 25 20:03:35 2017 -0700 Merge branch 'qmap-mux' Daniele Palmas says: ==================== net: usb: qmi_wwan: add qmap mux protocol support This patch adds support for qmap mux protocol available in recent Qualcomm based modems. The qmap mux protocol can be used for multiplexing data packets in order to have multiple ip streams through the same physical device. Two new sysfs files are added for adding/removing the qmap mux based interfaces (named qmimux): /sys/class/net//qmi/add_mux /sys/class/net//qmi/del_mux Main patch author is Bjørn Mork An userspace implementation of the qmi requests needed to support multiple ip streams is already available (namely libqmi since version 1.18.0). The qmap mux feature has been recently implemented in Codeaurora gobinet out-of-kernel driver that was the inspiration for this development. Tests have been performed with Telit LE922A6 (PID 0x1040) ==================== Signed-off-by: David S. Miller commit 416906fc28f5763b97c7d94bcde787bfcec006bf Author: Daniele Palmas Date: Fri Mar 24 14:22:46 2017 +0100 Documentation: ABI: testing: sysfs-class-net-qmi: add new qmap mux files description This patch updates the documentation related to the new files added for qmap mux support. Signed-off-by: Daniele Palmas Signed-off-by: David S. Miller Documentation/ABI/testing/sysfs-class-net-qmi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit c6adf77953bcec0ad63d7782479452464e50f7a3 Author: Daniele Palmas Date: Fri Mar 24 14:22:45 2017 +0100 net: usb: qmi_wwan: add qmap mux protocol support This patch adds support for qmap mux protocol available in recent Qualcomm based modems. The qmap mux protocol can be used for multiplexing data packets in order to have multiple ip streams through the same physical device. Two new sysfs files are added for adding/removing the qmap mux based interfaces (named qmimux): - /sys/class/net//qmi/add_mux - /sys/class/net//qmi/del_mux Main patch author is Bjørn Mork Signed-off-by: Bjørn Mork Signed-off-by: Daniele Palmas Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 317 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 316 insertions(+), 1 deletion(-) commit 1312444374241f0e4dd0406ad8967a8b13bb6d69 Author: Arkadi Sharshevsky Date: Sat Mar 25 08:28:22 2017 +0100 mlxsw: spectrum_kvdl: Cosmetic kvdl allocator API change Currently the return allocated index and err value are multiplexed. This patch changes the API to decouple the ret value from the allocated index. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3 ++- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 17 +++++++---------- drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 6 ++++-- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 6 ++---- 4 files changed, 15 insertions(+), 17 deletions(-) commit f19aee7f27929be0352b13ca9f2699fe46affbfe Author: Daniel Vetter Date: Wed Mar 22 09:36:11 2017 +0100 drm/vblank: Remove DRM_VBLANKTIME_IN_VBLANK The core code doesn't care at all about this, it's entirely dead. Cc: Mario Kleiner Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322083617.13361-11-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_irq.c | 8 -------- include/drm/drmP.h | 1 - 2 files changed, 9 deletions(-) commit f217f554b2a283c33da26d79fa4611d53fd0b977 Author: Daniel Vetter Date: Wed Mar 22 09:36:10 2017 +0100 drm/todo: Add tinydrm refactoring ideas Discussed with Noralf on the list a bit. An open question is tinydrm vs. drm_panel, but until we have a clear idea what's really needed in that space, I think it's best to just move forward with what we have. Cc: Noralf Trønnes Acked-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322083617.13361-10-daniel.vetter@ffwll.ch Documentation/gpu/todo.rst | 70 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 7cfdf711ffb02b45a4c84fdc4e7272320ec9fd2e Author: Daniel Vetter Date: Wed Mar 22 21:54:47 2017 +0100 drm: Extract drm_ioctl.h To match the drm_ioctl.c we already have. v2: Remove spurious space (Ville). Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_ioctl.c | 1 + include/drm/drmP.h | 61 +------------------------- include/drm/drm_ioctl.h | 102 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+), 60 deletions(-) commit 33e5b6677fd1d39058286224a8700e49c85c0a02 Author: Daniel Vetter Date: Wed Mar 22 22:50:47 2017 +0100 drm/tilcdc: Drop calls to modeset_lock_crtc Again this is an internal helper, not the official way to lock a crtc. Cc: Jyri Sarha Cc: Tomi Valkeinen Reviewed-by: Tomi Valkeinen Acked-by: Jyri Sarha Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-9-daniel.vetter@ffwll.ch drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f5a28a7d4858f94a2d8b5271ffee607de30050e4 Author: David Jander Date: Mon Mar 20 11:05:29 2017 -0700 Input: ads7846 - avoid pen up/down when reading hwmon Each time the HWMON devices are read (e.g. battery voltage) while the touchscreen is held pressed, extra pen-up and pen-down events are generated. This is fixed by avoiding the UP event when the touchscreen is stopped. Signed-off-by: David Jander Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ads7846.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e839ffab028981ac77f650faf8c84f16e1719738 Author: Benjamin Tissoires Date: Thu Mar 2 14:13:53 2017 -0800 Input: synaptics - add support for Intertouch devices Most of the Synaptics devices are connected through PS/2 and a different bus (SMBus or HID over I2C). The secondary bus capability is indicated by the InterTouch bit in extended capability 0x0C. We only enable the InterTouch device to be created for the laptops registered with the top software button property or those we know that are functional. In the future, we might change the default to always rely on the InterTouch bus. Currently, users can enable/disable the feature with the psmouse parameter synaptics_intertouch. Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/Kconfig | 12 + drivers/input/mouse/psmouse-base.c | 24 +- drivers/input/mouse/psmouse.h | 1 + drivers/input/mouse/synaptics.c | 554 +++++++++++++++++++++++++------------ drivers/input/mouse/synaptics.h | 5 +- 5 files changed, 421 insertions(+), 175 deletions(-) commit 6c53694fb2223746738d1d0cea71456ca88c8fb2 Author: Dmitry Torokhov Date: Sun Mar 5 15:51:33 2017 -0800 Input: synaptics - split device info into a separate structure In preparation for SMBus/Intertouch device support, move static device information that we query form the touchpad upon initialization into separate structure. This will allow us to query the device without allocating memory first. Also stop using "unsigned long", everything fits into 32 bit chunks. Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 392 ++++++++++++++++++++++------------------ drivers/input/mouse/synaptics.h | 28 +-- 2 files changed, 233 insertions(+), 187 deletions(-) commit 8eb92e5c91338eb19f86ffb2232258337ebf905b Author: Benjamin Tissoires Date: Thu Mar 2 10:48:23 2017 -0800 Input: psmouse - add support for SMBus companions This provides glue between PS/2 devices that enumerate the RMI4 devices and Elan touchpads to the RMI4 (or Elan) SMBus driver. The SMBus devices keep their PS/2 connection alive. If the initialization process goes too far (psmouse_activate called), the device disconnects from the I2C bus and stays on the PS/2 bus, that is why we explicitly disable PS/2 device reporting (by calling psmouse_deactivate) before trying to register SMBus companion device. The HID over I2C devices are enumerated through the ACPI DSDT, and their PS/2 device also exports the InterTouch bit in the extended capability 0x0C. However, the firmware keeps its I2C connection open even after going further in the PS/2 initialization. We don't need to take extra precautions with those device, especially because they block their PS/2 communication when HID over I2C is used. Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/Kconfig | 4 + drivers/input/mouse/Makefile | 2 + drivers/input/mouse/psmouse-base.c | 16 +- drivers/input/mouse/psmouse-smbus.c | 294 ++++++++++++++++++++++++++++++++++++ drivers/input/mouse/psmouse.h | 29 ++++ 5 files changed, 343 insertions(+), 2 deletions(-) commit c774326a219536ab615d68a22875673f6f608b62 Author: Dmitry Torokhov Date: Thu Mar 2 15:50:56 2017 -0800 Input: psmouse - introduce notion of SMBus companions Prepare PS/2 mouse drivers to work with devices that are accessible both via PS/2 and SMBus, which provides higher bandwidth, and thus suits better for modern multi-touch devices. We expect that SMBus drivers will take control over the device, so when we detect SMBus "protocol" we forego registering input device, or enabling PS/2 device reports (as it usually makes device unresponsive to access over SMBus). Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/psmouse-base.c | 103 +++++++++++++++++++++++++------------ drivers/input/mouse/psmouse.h | 1 + 2 files changed, 71 insertions(+), 33 deletions(-) commit 085fa80dfdd60ac58137a5b5d231e70456126fda Author: Dmitry Torokhov Date: Fri Mar 3 15:29:00 2017 -0800 Input: psmouse - store pointer to current protocol Instead of storing only protocol "type" in pmsouse structure, store pointer to the protocol structure, so that we have access to more data without having to copy it over to psmouse structure. Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/psmouse-base.c | 43 +++++++++-------------- drivers/input/mouse/psmouse.h | 70 ++++++++++++++++++++++---------------- 2 files changed, 58 insertions(+), 55 deletions(-) commit 0ab3fa57425023f42e8822a293d9b87a3ad4e2b3 Author: Dmitry Torokhov Date: Sun Mar 5 23:19:22 2017 -0800 Input: psmouse - implement fast reconnect option Make use of serio's fast reconnect option and allow psmouse protocol handler's to implement fast reconnect handlers that will be called during system resume. Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/psmouse-base.c | 30 +++++++++++++++++++++++++++--- drivers/input/mouse/psmouse.h | 1 + 2 files changed, 28 insertions(+), 3 deletions(-) commit 5ea1320653359dd2ade7ff2ad81e37b790eb1f1f Author: Dmitry Torokhov Date: Fri Mar 3 11:47:40 2017 -0800 Input: serio - add fast reconnect option Devices connected to serio bus are quite slow, and to improve apparent speed of resume process, serio core resumes (reconnects) its devices asynchronously, by posting port reconnect requests to a workqueue. Unfortunately this means that if there is a dependent device of a given serio port (for example SMBus part of touchpad connected via both PS/2 and SMBus), we do not have a good way of ensuring resume order. This change allows drivers to define "fast reconnect" handlers that would be called in-line during system resume. Drivers need to ensure that these handlers are truly "fast". Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/serio/serio.c | 22 +++++++++++++++++----- include/linux/serio.h | 1 + 2 files changed, 18 insertions(+), 5 deletions(-) commit b8e82c1bdd2871dc9c704502acc2ca634b51eeda Author: Russell King Date: Tue Jan 17 21:40:52 2017 +0000 PCI: mvebu: Avoid changing the SCC bit in the Link Status register It seems on later Armada 38x, the slot clock configuration bit is not read-only, but can be written. This means that our RW1C protection ends up clearing this bit when the link control register is written. Adjust the mask so that we only avoid writing '1' bits to the RW1C bits of this register (bits 15 and 14 of the link status) rather than masking out all the status register bits. Signed-off-by: Russell King Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-mvebu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 40dffd9974b369be886d5fec7407087d7d9edfa8 Author: Olivier Leveque Date: Thu Mar 23 14:18:09 2017 +0100 staging: iio: adc: ad7280a: fix permission coding style issue Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. Found running checkpatch. Signed-off-by: Olivier Leveque Signed-off-by: Jonathan Cameron drivers/staging/iio/adc/ad7280a.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit baecc573d8aa916685057918bf86568ac6f28fa3 Author: Mark Stenglein Date: Thu Mar 23 02:18:12 2017 -0400 staging: iio: accel: remove unneeded braces around single statements Fixes three checkpatch warnings due to braces used when single statements are sufficient. Signed-off-by: Mark Stenglein Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16209.c | 3 +-- drivers/staging/iio/accel/adis16240.c | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) commit cf6c77323a96fc40309cc8a4921ef206cccdd961 Author: Eva Rachel Retuya Date: Mon Mar 20 19:27:05 2017 +0800 staging: iio: tsl2x7x_core: Fix standard deviation calculation Standard deviation is calculated as the square root of the variance where variance is the mean of sample_sum and length. Correct the computation of statP->stddev in accordance to the proper calculation. Fixes: 3c97c08b5735 ("staging: iio: add TAOS tsl2x7x driver") Reported-by: Abhiram Balasubramanian Signed-off-by: Eva Rachel Retuya Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ad45a9bc4e0cd5a6e6fb0e6c5d35d6c87f14c76 Author: Jason Yan Date: Sat Mar 25 09:44:39 2017 +0800 md/raid5-cache: fix payload endianness problem in raid5-cache The payload->header.type and payload->size are little-endian, so just convert them to the right byte order. Signed-off-by: Jason Yan Cc: #v4.10+ Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 41743c1f046a14c6749fd1808bb3793c08e47a3e Author: Shaohua Li Date: Fri Mar 24 15:20:47 2017 -0700 md/raid1: skip data copy for behind io for discard request discard request doesn't have data attached, so it's meaningless to allocate memory and copy from original bio for behind IO. And the copy is bogus because bio_copy_data_partial can't handle discard request. We don't support writesame/writezeros request so far. Reviewed-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/raid1.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d7ed89d5aadf09f1060cd3a9cf07df17447c7392 Author: Song Hongyan Date: Mon Mar 20 22:28:45 2017 +0800 iio: hid: Add humidity sensor support Environmental humidity sensor is a hid defined sensor, it shows raw humidity measurement of air. More information can be found in: http://www.usb.org/developers/hidpage/HUTRR39b.pdf According to IIO ABI definition, humidityrelative data output unit is milli percent. Add the unit convert from percent to milli percent. Signed-off-by: Song Hongyan Signed-off-by: Jonathan Cameron .../iio/common/hid-sensors/hid-sensor-attributes.c | 2 + drivers/iio/humidity/Kconfig | 14 + drivers/iio/humidity/Makefile | 3 + drivers/iio/humidity/hid-sensor-humidity.c | 315 +++++++++++++++++++++ include/linux/hid-sensor-ids.h | 4 + 5 files changed, 338 insertions(+) commit e0ad9b73e81a2dfb8cf8b375fefbb0891a8187a1 Author: Song Hongyan Date: Mon Mar 20 17:12:54 2017 +0800 iio: hid-sensor-attributes: Fix gravity sensor scale value not right issue Scale value include two parts: unit conversion and exponent conversion. Add gravity unit convert table to fix gravity sensor scale value not right issue. Signed-off-by: Song Hongyan Acked-by: Srinivas Pandruvada Signed-off-by: Jonathan Cameron drivers/iio/common/hid-sensors/hid-sensor-attributes.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 5e7f47e495ad3657e1a7264bf20fb363607161e6 Author: Manivannan Sadhasivam Date: Sun Mar 19 20:23:12 2017 +0530 iio:light: Add support for STMicro VL6180 sensor This patch adds support for STMicro VL6180 - ALS, range and proximity sensor. Sensor is capable of measuring the light intensity as well as object distance using TOF (Time of Flight) technology. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Peter Meerwald-Stadler Acked-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/light/vl6180.txt | 15 + drivers/iio/light/Kconfig | 10 + drivers/iio/light/Makefile | 1 + drivers/iio/light/vl6180.c | 543 +++++++++++++++++++++ 4 files changed, 569 insertions(+) commit f45958756fef552436e4a63029a168495920026e Author: Shaohua Li Date: Fri Mar 24 10:34:43 2017 -0700 block: remove bio_clone_bioset_partial() commit c18a1e0(block: introduce bio_clone_bioset_partial()) introduced bio_clone_bioset_partial() for raid1 write behind IO. Now the write behind is rewritten by Ming. We don't need the API any more, so revert the commit. Cc: Christoph Hellwig Reviewed-by: Jens Axboe Reviewed-by: Ming Lei Signed-off-by: Shaohua Li block/bio.c | 61 ++++++++++++----------------------------------------- include/linux/bio.h | 11 ++-------- 2 files changed, 15 insertions(+), 57 deletions(-) commit e29e7b3236672d25d693c23dcf6bc9f1afc25088 Author: Arushi Singhal Date: Fri Mar 24 19:25:33 2017 +0530 staging: iio: Remove extra Parenthesis. Remove the extra parenthesis remove the checkpatch issue. Signed-off-by: Arushi Singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7746.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 754434c445dafe79d55304a698c231ecbcc046d7 Author: Enric Balletbo i Serra Date: Fri Mar 24 18:44:03 2017 +0100 iio: cros_ec_sensors: Use devm to setup the triggered buffer. Use resourced managed function devm_iio_triggered_buffer_setup to make error path simpler and be able to get rid of the remove function. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Jonathan Cameron .../iio/common/cros_ec_sensors/cros_ec_sensors.c | 26 +++------------------- 1 file changed, 3 insertions(+), 23 deletions(-) commit 48ba7c3c0b37363d9ddca3354ca503ad721e14dc Author: Heiner Kallweit Date: Sat Mar 18 19:38:19 2017 +0100 iio: adc: meson-saradc: add calibration This patch adds calibration for the Meson SAR ADC. Points 25% vref and 75% vref are used for calibration. It uses a simple linear calibration function: SCALE * val + BIAS Successfully tested on a Odroid C2. Signed-off-by: Heiner Kallweit Tested-by: Martin Blumenstingl Reviewed-by: Martin Blumenstingl Signed-off-by: Jonathan Cameron drivers/iio/adc/meson_saradc.c | 77 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 2 deletions(-) commit 59c9081bc86ef0b273a41abf2c1f413301429a6d Author: Yunlei He Date: Mon Mar 13 20:22:18 2017 +0800 f2fs: allow write page cache when writting cp This patch allow write data to normal file when writting new checkpoint. We relax three limitations for write_begin path: 1. data allocation 2. node allocation 3. variables in checkpoint Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 40 ++++++++++++++++++++++++++++------------ fs/f2fs/data.c | 28 ++++++++++++++++++++++------ fs/f2fs/f2fs.h | 1 + fs/f2fs/node.c | 12 ++++++------ fs/f2fs/super.c | 1 + 5 files changed, 58 insertions(+), 24 deletions(-) commit 2239cc634395ecce69dd047be9104f71edc417b4 Merge: dcb421f 6d43390 Author: David S. Miller Date: Fri Mar 24 20:49:31 2017 -0700 Merge branch 'epoll-busypoll' Alexander Duyck says: ==================== Add busy poll support for epoll This patch set adds support for using busy polling with epoll. The main idea behind this is that we record the NAPI ID for the last event that is moved onto the ready list for the epoll context and then when we no longer have any events on the ready list we begin polling with that ID. If the busy polling does not yield any events then we will reset the NAPI ID to 0 and wait until a new event is added to the ready list with a valid NAPI ID before we will resume busy polling. Most of the changes in this set authored by me are meant to be cleanup or fixes for various things. For example, I am trying to make it so that we don't perform hash look-ups for the NAPI instance when we are only working with sender_cpu and the like. At the heart of this set is the last 3 patches which enable epoll support and add support for obtaining the NAPI ID of a given socket. With these it becomes possible for an application to make use of epoll and get optimal busy poll utilization by stacking multiple sockets with the same NAPI ID on the same epoll context. v1: The first version of this series only allowed epoll to busy poll if all of the sockets with a NAPI ID shared the same NAPI ID. I feel we were too strict with this requirement, so I changed the behavior for v2. v2: The second version was pretty much a full rewrite of the first set. The main changes consisted of pulling apart several patches to better address the need to clean up a few items and to make the code easier to review. In the set however I went a bit overboard and was trying to fix an issue that would only occur with 500+ years of uptime, and in the process limited the range for busy_poll/busy_read unnecessarily. v3: Split off the code for limiting busy_poll and busy_read into a separate patch for net. Updated patch that changed busy loop time tracking so that it uses "local_clock() >> 10" as we originally did. Tweaked "Change return type.." patch by moving declaration of "work" inside the loop where is was accessed and always reset to 0. Added "Acked-by" for patches that received acks. ==================== Signed-off-by: David S. Miller commit 6d4339028b350efbf87c61e6d9e113e5373545c9 Author: Sridhar Samudrala Date: Fri Mar 24 10:08:36 2017 -0700 net: Introduce SO_INCOMING_NAPI_ID This socket option returns the NAPI ID associated with the queue on which the last frame is received. This information can be used by the apps to split the incoming flows among the threads based on the Rx queue on which they are received. If the NAPI ID actually represents a sender_cpu then the value is ignored and 0 is returned. Signed-off-by: Sridhar Samudrala Signed-off-by: Alexander Duyck Acked-by: Eric Dumazet Signed-off-by: David S. Miller arch/alpha/include/uapi/asm/socket.h | 2 ++ arch/avr32/include/uapi/asm/socket.h | 2 ++ arch/frv/include/uapi/asm/socket.h | 2 ++ arch/ia64/include/uapi/asm/socket.h | 2 ++ arch/m32r/include/uapi/asm/socket.h | 2 ++ arch/mips/include/uapi/asm/socket.h | 1 + arch/mn10300/include/uapi/asm/socket.h | 2 ++ arch/parisc/include/uapi/asm/socket.h | 2 ++ arch/powerpc/include/uapi/asm/socket.h | 2 ++ arch/s390/include/uapi/asm/socket.h | 2 ++ arch/sparc/include/uapi/asm/socket.h | 2 ++ arch/xtensa/include/uapi/asm/socket.h | 2 ++ include/uapi/asm-generic/socket.h | 2 ++ net/core/sock.c | 12 ++++++++++++ 14 files changed, 37 insertions(+) commit bf3b9f6372c45b0fbf24d86b8794910d20170017 Author: Sridhar Samudrala Date: Fri Mar 24 10:08:30 2017 -0700 epoll: Add busy poll support to epoll with socket fds. This patch adds busy poll support to epoll. The implementation is meant to be opportunistic in that it will take the NAPI ID from the last socket that is added to the ready list that contains a valid NAPI ID and it will use that for busy polling until the ready list goes empty. Once the ready list goes empty the NAPI ID is reset and busy polling is disabled until a new socket is added to the ready list. In addition when we insert a new socket into the epoll we record the NAPI ID and assume we are going to receive events on it. If that doesn't occur it will be evicted as the active NAPI ID and we will resume normal behavior. An application can use SO_INCOMING_CPU or SO_REUSEPORT_ATTACH_C/EBPF socket options to spread the incoming connections to specific worker threads based on the incoming queue. This enables epoll for each worker thread to have only sockets that receive packets from a single queue. So when an application calls epoll_wait() and there are no events available to report, busy polling is done on the associated queue to pull the packets. Signed-off-by: Sridhar Samudrala Signed-off-by: Alexander Duyck Acked-by: Eric Dumazet Signed-off-by: David S. Miller fs/eventpoll.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit 7db6b048da3b9f84fe1d22fb29ff7e7c2ec6c0e5 Author: Sridhar Samudrala Date: Fri Mar 24 10:08:24 2017 -0700 net: Commonize busy polling code to focus on napi_id instead of socket Move the core functionality in sk_busy_loop() to napi_busy_loop() and make it independent of sk. This enables re-using this function in epoll busy loop implementation. Signed-off-by: Sridhar Samudrala Signed-off-by: Alexander Duyck Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/busy_poll.h | 20 +++++++++++++++----- net/core/dev.c | 21 ++++++++------------- net/core/sock.c | 11 +++++++++++ 3 files changed, 34 insertions(+), 18 deletions(-) commit 37056719bba500d0d2b8216fdf641e5507ec9a0e Author: Alexander Duyck Date: Fri Mar 24 10:08:18 2017 -0700 net: Track start of busy loop instead of when it should end This patch flips the logic we were using to determine if the busy polling has timed out. The main motivation for this is that we will need to support two different possible timeout values in the future and by recording the start time rather than when we would want to end we can focus on making the end_time specific to the task be it epoll or socket based polling. Signed-off-by: Alexander Duyck Acked-by: Eric Dumazet Signed-off-by: David S. Miller fs/select.c | 16 ++++++------ include/net/busy_poll.h | 68 +++++++++++++++++++++++++++---------------------- net/core/dev.c | 6 ++--- 3 files changed, 49 insertions(+), 41 deletions(-) commit 2b5cd0dfa384242f78a396b90087368c9440cc9a Author: Alexander Duyck Date: Fri Mar 24 10:08:12 2017 -0700 net: Change return type of sk_busy_loop from bool to void checking the return value of sk_busy_loop. As there are only a few consumers of that data, and the data being checked for can be replaced with a check for !skb_queue_empty() we might as well just pull the code out of sk_busy_loop and place it in the spots that actually need it. Signed-off-by: Alexander Duyck Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/busy_poll.h | 5 ++--- net/core/datagram.c | 8 ++++++-- net/core/dev.c | 25 +++++++++++-------------- net/sctp/socket.c | 9 ++++++--- 4 files changed, 25 insertions(+), 22 deletions(-) commit d2e64dbbe95b2b51eb723134274de1d3f30bce80 Author: Alexander Duyck Date: Fri Mar 24 10:08:06 2017 -0700 net: Only define skb_mark_napi_id in one spot instead of two Instead of defining two versions of skb_mark_napi_id I think it is more readable to just match the format of the sk_mark_napi_id functions and just wrap the contents of the function instead of defining two versions of the function. This way we can save a few lines of code since we only need 2 of the ifdef/endif but needed 5 for the extra function declaration. Signed-off-by: Alexander Duyck Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/busy_poll.h | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit e5907459ce7e2b6bc397007865ad492f10c2aeac Author: Alexander Duyck Date: Fri Mar 24 10:08:00 2017 -0700 tcp: Record Rx hash and NAPI ID in tcp_child_process While working on some recent busy poll changes we found that child sockets were being instantiated without NAPI ID being set. In our first attempt to fix it, it was suggested that we should just pull programming the NAPI ID into the function itself since all callers will need to have it set. In addition to the NAPI ID change I have dropped the code that was populating the Rx hash since it was actually being populated in tcp_get_cookie_sock. Reported-by: Sridhar Samudrala Signed-off-by: Alexander Duyck Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 2 -- net/ipv4/tcp_minisocks.c | 4 ++++ net/ipv6/tcp_ipv6.c | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) commit 545cd5e5ec5477c325e4098b6fd21213dceda408 Author: Alexander Duyck Date: Fri Mar 24 10:07:53 2017 -0700 net: Busy polling should ignore sender CPUs This patch is a cleanup/fix for NAPI IDs following the changes that made it so that sender_cpu and napi_id were doing a better job of sharing the same location in the sk_buff. One issue I found is that we weren't validating the napi_id as being valid before we started trying to setup the busy polling. This change corrects that by using the MIN_NAPI_ID value that is now used in both allocating the NAPI IDs, as well as validating them. Signed-off-by: Alexander Duyck Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/busy_poll.h | 9 +++++++-- net/core/dev.c | 13 +++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) commit 869ab90f0ae0002ce6e9d3a5c75156ae8de48ffc Author: Eric Biggers Date: Fri Mar 24 18:03:48 2017 -0700 block: constify struct blk_integrity_profile blk_integrity_profile's are never modified, so mark them 'const' so that they are placed in .rodata and benefit from memory protection. Signed-off-by: Eric Biggers Signed-off-by: Jens Axboe block/blk-integrity.c | 2 +- block/t10-pi.c | 8 ++++---- include/linux/genhd.h | 10 +++++----- include/linux/t10-pi.h | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) commit dcb421f4279f362c3eef7479616c76588b74d782 Merge: 68e4985 3139104 Author: David S. Miller Date: Fri Mar 24 19:11:47 2017 -0700 Merge branch 'mlx5-xdp-perf-optimizations' Saeed Mahameed says: ==================== Mellanox mlx5e XDP performance optimization This series provides some preformancee optimizations for mlx5e driver, especially for XDP TX flows. 1st patch is a simple change of rmb to dma_rmb in CQE fetch routine which shows a huge gain for both RX and TX packet rates. 2nd patch removes write combining logic from the driver TX handler and simplifies the TX logic while improving TX CPU utilization. All other patches combined provide some refactoring to the driver TX flows to allow some significant XDP TX improvements. More details and performance numbers per patch can be found in each patch commit message compared to the preceding patch. Overall performance improvemnets System: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz Test case Baseline Now improvement --------------------------------------------------------------- TX packets (24 threads) 45Mpps 54Mpps 20% TC stack Drop (1 core) 3.45Mpps 3.6Mpps 5% XDP Drop (1 core) 14Mpps 16.9Mpps 20% XDP TX (1 core) 10.4Mpps 13.7Mpps 31% ==================== Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller commit 3139104861d9a8fed13f813237cc998c8272eafc Author: Saeed Mahameed Date: Sat Mar 25 00:52:14 2017 +0300 net/mlx5e: Different SQ types Different SQ types (tx, xdp, ico) are growing apart, we separate them and remove unwanted parts in each one of them, to simplify data path and utilize data cache. Remove DB union from SQ structures since it is not needed anymore as we now have different SQ data type for each SQ. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 99 +++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 464 +++++++++++++--------- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 33 +- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 50 +-- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 2 +- 5 files changed, 392 insertions(+), 256 deletions(-) commit 33ad9711861060d82d5c9c3a5ffb238f4d54b097 Author: Saeed Mahameed Date: Sat Mar 25 00:52:13 2017 +0300 net/mlx5e: Generalize SQ create/modify/destroy functions In the next patches we will introduce different SQ types, and we would want to reuse those functions, in this patch we make them agnostic to SQ type (txq, xdp, ico). Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 111 ++++++++++++++-------- 1 file changed, 69 insertions(+), 42 deletions(-) commit 3b77235b94347e813e2d4d33363512127d32e899 Author: Saeed Mahameed Date: Sat Mar 25 00:52:12 2017 +0300 net/mlx5e: Proper names for SQ/RQ/CQ functions Rename mlx5e_{create,destroy}_{sq,rq,cq} to mlx5e_{alloc,free}_{sq,rq,cq}. Rename mlx5e_{enable,disable}_{sq,rq,cq} to mlx5e_{create,destroy}_{sq,rq,cq}. mlx5e_{enable,disable}_{sq,rq,cq} used to actually create/destroy the SQ in FW, so we rename them to align the functions names with FW semantics. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 126 +++++++++++----------- 1 file changed, 63 insertions(+), 63 deletions(-) commit 864b2d715300d9082747fb5de2bb277359c75bff Author: Saeed Mahameed Date: Sat Mar 25 00:52:11 2017 +0300 net/mlx5e: Generalize tx helper functions for different SQ types In the next patches we will introduce different SQ types, for that we here generalize some TX helper functions to work with more basic SQ parameters, in order to re-use them for the different SQ types. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 35 ++++++++++++++++----- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 13 +++++--- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 10 +++--- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 37 +++++------------------ 4 files changed, 48 insertions(+), 47 deletions(-) commit 2239185ccd888a9934525e5b2d2f55890ab826f6 Author: Saeed Mahameed Date: Sat Mar 25 00:52:10 2017 +0300 net/mlx5e: Optimize XDP frame xmit XDP SQ has a fixed size WQE (MLX5E_XDP_TX_WQEBBS = 1) and only posts one kind of WQE (MLX5_OPCODE_SEND), Also we initialize SQ descriptors static fields once on open_xdpsq, rather than every time on critical path. Optimize the code in light of those facts and add a prefetch of the TX descriptor first thing in the xdp xmit function. Performance improvement: System: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz Test case Before Now improvement --------------------------------------------------------------- XDP TX (1 core) 13Mpps 13.7Mpps 5% Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 5 --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 43 +++++++++++++++++++---- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 41 ++++++--------------- 3 files changed, 47 insertions(+), 42 deletions(-) commit 39e12351a308fe022930d0423d88e3aedde795b1 Author: Saeed Mahameed Date: Sat Mar 25 00:52:09 2017 +0300 net/mlx5e: Poll XDP TX CQ before RX CQ Handle XDP TX completions before handling RX packets, to make sure more free space is available for XDP TX packets a moment before handling RX packets. Performance improvement: System: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz Test case Before Now improvement --------------------------------------------------------------- XDP Drop (1 core) 16.9Mpps 16.9Mpps No change XDP TX (1 core) 12Mpps 13Mpps 8% Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 31871f87bb302efb26978f397bc2705138f0b73a Author: Saeed Mahameed Date: Sat Mar 25 00:52:08 2017 +0300 net/mlx5e: Move XDP SQ instance into RQ To save many rq->channel->sq dereferences in fast-path. And rename it to xdpsq. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 +++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 12 ++++++------ drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 18 +++++++++++------- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 2 +- 4 files changed, 21 insertions(+), 15 deletions(-) commit eba2db2bd2c81140e56f06889781f8ba953af6da Author: Saeed Mahameed Date: Sat Mar 25 00:52:07 2017 +0300 net/mlx5e: Move mlx5e_rq struct declaration Move struct mlx5e_rq and friends to appear after mlx5e_sq declaration in en.h. We will need this for next patch to move the mlx5e_sq instance into mlx5e_rq struct for XDP SQs. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 213 +++++++++++++-------------- 1 file changed, 105 insertions(+), 108 deletions(-) commit 1c4bf940455cd91a9fa100f09bd304f141fb4429 Author: Saeed Mahameed Date: Sat Mar 25 00:52:06 2017 +0300 net/mlx5e: Move XDP completion functions to rx file XDP code belongs to RX path, move mlx5e_poll_xdp_tx_cq and mlx5e_free_xdp_tx_descs to en_rx.c. Rename them to mlx5e_poll_xdpsq_cq and mlx5e_free_xdpsq_descs. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 + drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 82 +++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 24 +------ drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 62 +---------------- 4 files changed, 86 insertions(+), 84 deletions(-) commit aff2615763f206f897146e0ee1ddae8e22055ae3 Author: Saeed Mahameed Date: Sat Mar 25 00:52:05 2017 +0300 net/mlx5e: Single bfreg (UAR) for all mlx5e SQs and netdevs One is sufficient since Blue Flame is not supported anymore. This will also come in handy for switchdev mode to save resources, since VF representors will use same single UAR as well for their own SQs. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/en_common.c | 9 +++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 17 +++-------------- include/linux/mlx5/driver.h | 1 + 4 files changed, 13 insertions(+), 15 deletions(-) commit 6982ab609768f4e7c84eab053314effa0bc500fc Author: Saeed Mahameed Date: Sat Mar 25 00:52:04 2017 +0300 net/mlx5e: Xmit, no write combining mlx5e netdev Blue Flame (write combining) support demands a lot of overhead for a little latency gain for some special cases, this overhead is hurting the common case. Here we remove xmit Blue Flame support by creating all bfregs with no write combining for all SQs, and we remove a lot of BF logic and conditions from xmit data path. Simplify mlx5e_tx_notify_hw (doorbell function) by removing BF related code and by removing one memory barrier needed for WC mapped SQ doorbell buffers, which no longer exist. Performance improvement: System: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz Test case Before Now improvement --------------------------------------------------------------- TX packets (24 threads) 50Mpps 54Mpps 8% Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 20 ++--------- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 +--- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 4 +-- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 42 ++--------------------- 4 files changed, 9 insertions(+), 63 deletions(-) commit 80fe326ab8f5ac6c41786fa534a220c6e3f5beaf Author: Saeed Mahameed Date: Sat Mar 25 00:52:03 2017 +0300 net/mlx5e: Use dma_rmb rather than rmb in CQE fetch routine Use dma_rmb in mlx5e_get_cqe rather than aggressive rmb (at least on some architectures), this should help improve the performance on such CPU archs where dma_rmb is optimized. Performance improvement: System: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz Test case Baseline Now improvement --------------------------------------------------------------- TX packets (24 threads) 45Mpps 50Mpps 11% TC stack Drop (1 core) 3.45Mpps 3.6Mpps 5% XDP Drop (1 core) 14Mpps 16.9Mpps 20% XDP TX (1 core) 10.4Mpps 12Mpps 15% Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70e493f3bb6bac74112bb4a46bc5ff9342a936a7 Merge: 4296f23 38d4ea2 Author: Rafael J. Wysocki Date: Sat Mar 25 02:35:48 2017 +0100 Merge back schedutil governor updates for 4.12. commit af0009fc16a45d091f896794e97a6457f9a7eddf Author: Steven Rostedt (VMware) Date: Thu Mar 16 11:01:06 2017 -0400 tracing: Move trace_handle_return() out of line Currently trace_handle_return() looks like this: static inline enum print_line_t trace_handle_return(struct trace_seq *s) { return trace_seq_has_overflowed(s) ? TRACE_TYPE_PARTIAL_LINE : TRACE_TYPE_HANDLED; } Where trace_seq_overflowed(s) is: static inline bool trace_seq_has_overflowed(struct trace_seq *s) { return s->full || seq_buf_has_overflowed(&s->seq); } And seq_buf_has_overflowed(&s->seq) is: static inline bool seq_buf_has_overflowed(struct seq_buf *s) { return s->len > s->size; } Making trace_handle_return() into: return (s->full || (s->seq->len > s->seq->size)) ? TRACE_TYPE_PARTIAL_LINE : TRACE_TYPE_HANDLED; One would think this is not an issue to keep as an inline. But because this is used in the TRACE_EVENT() macro, it is extended for every tracepoint in the system. Taking a look at a single tracepoint x86_irq_vector (was the first one I randomly chosen). As trace_handle_return is used in the TRACE_EVENT() macro of trace_raw_output_##call() we disassemble trace_raw_output_x86_irq_vector and do a diff: - is the original + is the out-of-line code I removed identical lines that were different just due to different addresses. --- /tmp/irq-vec-orig 2017-03-16 09:12:48.569384851 -0400 +++ /tmp/irq-vec-ool 2017-03-16 09:13:39.378153385 -0400 @@ -6,27 +6,23 @@ 53 push %rbx 48 89 fb mov %rdi,%rbx 4c 8b a7 c0 20 00 00 mov 0x20c0(%rdi),%r12 e8 f7 72 13 00 callq ffffffff81155c80 83 f8 01 cmp $0x1,%eax 74 05 je ffffffff8101e993 5b pop %rbx 41 5c pop %r12 5d pop %rbp c3 retq 41 8b 54 24 08 mov 0x8(%r12),%edx - 48 8d bb 98 10 00 00 lea 0x1098(%rbx),%rdi + 48 81 c3 98 10 00 00 add $0x1098,%rbx - 48 c7 c6 7b 8a a0 81 mov $0xffffffff81a08a7b,%rsi + 48 c7 c6 ab 8a a0 81 mov $0xffffffff81a08aab,%rsi - e8 c5 85 13 00 callq ffffffff81156f70 === here's the start of the main difference === + 48 89 df mov %rbx,%rdi + e8 62 7e 13 00 callq ffffffff81156810 - 8b 93 b8 20 00 00 mov 0x20b8(%rbx),%edx - 31 c0 xor %eax,%eax - 85 d2 test %edx,%edx - 75 11 jne ffffffff8101e9c8 - 48 8b 83 a8 20 00 00 mov 0x20a8(%rbx),%rax - 48 39 83 a0 20 00 00 cmp %rax,0x20a0(%rbx) - 0f 93 c0 setae %al + 48 89 df mov %rbx,%rdi + e8 4a c5 12 00 callq ffffffff8114af00 5b pop %rbx - 0f b6 c0 movzbl %al,%eax === end === 41 5c pop %r12 5d pop %rbp c3 retq If you notice, the original has 22 bytes of text more than the out of line version. As this is for every TRACE_EVENT() defined in the system, this can become quite large. text data bss dec hex filename 8690305 5450490 1298432 15439227 eb957b vmlinux-orig 8681725 5450490 1298432 15430647 eb73f7 vmlinux-handle This change has a total of 8580 bytes in savings. $ objdump -dr /tmp/vmlinux-orig | grep '^[0-9a-f]* Signed-off-by: Steven Rostedt (VMware) include/linux/trace_events.h | 11 +---------- kernel/trace/trace.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 10 deletions(-) commit 42c269c88dc146982a54a8267f71abc99f12852a Author: Steven Rostedt (VMware) Date: Fri Mar 3 16:15:39 2017 -0500 ftrace: Allow for function tracing to record init functions on boot up Adding a hook into free_reserve_area() that informs ftrace that boot up init text is being free, lets ftrace safely remove those init functions from its records, which keeps ftrace from trying to modify text that no longer exists. Note, this still does not allow for tracing .init text of modules, as modules require different work for freeing its init code. Link: http://lkml.kernel.org/r/1488502497.7212.24.camel@linux.intel.com Cc: linux-mm@kvack.org Cc: Vlastimil Babka Cc: Mel Gorman Cc: Peter Zijlstra Requested-by: Todd Brandt Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 5 +++++ include/linux/init.h | 4 +++- kernel/trace/ftrace.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ mm/page_alloc.c | 4 ++++ scripts/recordmcount.c | 1 + scripts/recordmcount.pl | 1 + 6 files changed, 58 insertions(+), 1 deletion(-) commit dbeafd0d6131d0f6ae8cd7551f5f4bf8c54aa49a Author: Steven Rostedt (VMware) Date: Fri Mar 3 13:48:42 2017 -0500 ftrace: Have function tracing start in early boot up Register the function tracer right after the tracing buffers are initialized in early boot up. This will allow function tracing to begin early if it is enabled via the kernel command line. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 3 +++ kernel/trace/trace.h | 2 ++ kernel/trace/trace_functions.c | 3 +-- 3 files changed, 6 insertions(+), 2 deletions(-) commit 9afecfbb95198ec3ea6d52cca4711ea314f29ec6 Author: Steven Rostedt (VMware) Date: Fri Mar 24 17:59:10 2017 -0400 tracing: Postpone tracer start-up tests till the system is more robust As tracing can now be enabled very early in boot up, even before some critical system services (like scheduling), do not run the tracer selftests until after early_initcall() is performed. If a tracer is registered before such time, it is saved off in a list and the test is run when the system is able to handle more diverse functions. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit 68e498554f598d8a6596c85bb661e9a68cafd673 Author: Florian Fainelli Date: Fri Mar 24 14:57:22 2017 -0700 net: dsa: bcm_sf2: Add missing OF_MDIO dependency bcm_sf2 does require the MDIO_BCM_UNIMAC driver which is now dependent on OF_MDIO but also internally uses of_mdio.c provided routines which are guarted with OF_MDIO. Reported-by: kbuild test robot Fixes: 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f106d164720af76ef97c3d1e92901bf85f93aeb8 Merge: 3b1af93 af4a220 Author: David S. Miller Date: Fri Mar 24 14:47:32 2017 -0700 Merge branch 'ipv6-sr-perf-improvements' David Lebrun says: ==================== Performances improvement for IPv6 Segment Routing This patch series improves the performances of IPv6 SR by optimizing skb head reallocation and extending the use of dst_cache. The overall performances improve by 35%. Before patch series (SRH encap): Result: OK: 7348320(c7347271+d1048) usec, 5000000 (1000byte,0frags) 680427pps 5443Mb/sec (5443416000bps) errors: 0 After patch series (SRH encap): Result: OK: 4774543(c4774084+d459) usec, 5000000 (1000byte,0frags) 1047220pps 8377Mb/sec (8377760000bps) errors: 0 Baseline for plain IPv6 forwarding: Result: OK: 4244144(c4243722+d422) usec, 5000000 (1000byte,0frags) 1178093pps 9424Mb/sec (9424744000bps) errors: 0 ==================== Signed-off-by: David S. Miller commit af4a2209b1344939eaac11f269c261d347cbc3ee Author: David Lebrun Date: Fri Mar 24 10:46:27 2017 +0100 ipv6: sr: use dst_cache in seg6_input We already use dst_cache in seg6_output, when handling locally generated packets. We extend it in seg6_input, to also handle forwarded packets, and avoid unnecessary fib lookups. Performances for SRH encapsulation before the patch: Result: OK: 5656067(c5655678+d388) usec, 5000000 (1000byte,0frags) 884006pps 7072Mb/sec (7072048000bps) errors: 0 Performances after the patch: Result: OK: 4774543(c4774084+d459) usec, 5000000 (1000byte,0frags) 1047220pps 8377Mb/sec (8377760000bps) errors: 0 Signed-off-by: David Lebrun Signed-off-by: David S. Miller net/ipv6/seg6_iptunnel.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 19d5a26f5ef8de5dcb78799feaf404d717b1aac3 Author: David Lebrun Date: Fri Mar 24 10:46:26 2017 +0100 ipv6: sr: expand skb head only if necessary To insert or encapsulate a packet with an SRH, we need a large enough skb headroom. Currently, we are using pskb_expand_head to inconditionally increase the size of the headroom by the amount needed by the SRH (and IPv6 header). If this reallocation is performed by another CPU than the one that initially allocated the skb, then when the initial CPU kfree the skb, it will enter the __slab_free slowpath, impacting performances. This patch replaces pskb_expand_head with skb_cow_head, that will reallocate the skb head only if the headroom is not large enough. Performances for SRH encapsulation before the patch: Result: OK: 7348320(c7347271+d1048) usec, 5000000 (1000byte,0frags) 680427pps 5443Mb/sec (5443416000bps) errors: 0 Performances after the patch: Result: OK: 5656067(c5655678+d388) usec, 5000000 (1000byte,0frags) 884006pps 7072Mb/sec (7072048000bps) errors: 0 Signed-off-by: David Lebrun Signed-off-by: David S. Miller net/ipv6/seg6_iptunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3b1af93cf193ca4a94df5f01f480a9d820a194bb Author: Geliang Tang Date: Fri Mar 24 22:14:36 2017 +0800 net_sched: use setup_deferrable_timer Use setup_deferrable_timer() instead of init_timer_deferrable() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller net/sched/cls_flow.c | 5 ++--- net/sched/sch_sfq.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) commit 1be7d2073e83e2b5c632a65bfcd59a73ce92bf6d Author: Eric Biggers Date: Mon Jan 23 11:43:21 2017 -0800 block: remove outdated part of blkdev_issue_flush() comment blkdev_issue_flush() is now always synchronous, and it no longer has a flags argument. So remove the part of the comment about the WAIT flag. Signed-off-by: Eric Biggers Signed-off-by: Jens Axboe block/blk-flush.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e554911c2367f0896c1276cdca95610ec3392fce Author: Eric Biggers Date: Mon Jan 23 11:41:39 2017 -0800 block: correct documentation for blkdev_issue_discard() flags BLKDEV_IFL_* flags no longer exist; blkdev_issue_discard() now actually takes BLKDEV_DISCARD_* flags. Signed-off-by: Eric Biggers Signed-off-by: Jens Axboe block/blk-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16c86ef7fc3fff118a985705bf18fe7ec9e493e7 Author: Arnd Bergmann Date: Tue Mar 21 21:52:56 2017 +0100 ARM: gemini: don't select SERIAL_OF_PLATFORM We cannot select the option when SERIAL_8250 is not also set: warning: (ARCH_GEMINI) selects SERIAL_OF_PLATFORM which has unmet direct dependencies (TTY && HAS_IOMEM && SERIAL_8250 && OF) This removes the 'select' statement, requiring that users enable the option manually. Alternatively, we could make it a conditional 'select SERIAL_OF_PLATFORM if SERIAL_8250' or also select a handful of other symbols that it depends on. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij arch/arm/mach-gemini/Kconfig | 1 - 1 file changed, 1 deletion(-) commit ff41c7fa64854cc95a472d43af82c17c043aa757 Merge: ba82427 18281f2 Author: David S. Miller Date: Fri Mar 24 13:53:29 2017 -0700 Merge branch 'mlxsw-query-resources' Jiri Pirko says: ==================== mlxsw: Query resources from firmware Ido says: Some parts of the driver already use the resource query mechanism, but in other parts we still rely on hard coded values that may change over time. This patchset removes most of these remaining values and queries them from the firmware instead. ==================== Signed-off-by: David S. Miller commit 18281f2dabd0fe77556dc81247451eb6e69997e5 Author: Ido Schimmel Date: Fri Mar 24 08:02:51 2017 +0100 mlxsw: spectrum: Query cell size from firmware As explained in the previous patch, the cell size may change in future devices, so query it from the firmware instead of hard coding it. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/resources.h | 2 + drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 68 +++++++----- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 18 +++- .../net/ethernet/mellanox/mlxsw/spectrum_buffers.c | 114 ++++++++++++--------- 4 files changed, 119 insertions(+), 83 deletions(-) commit f417f04da589f579fb0c0adea5e5474ed634c18f Author: Ido Schimmel Date: Fri Mar 24 08:02:50 2017 +0100 mlxsw: spectrum: Refactor port buffer configuration The sizes and thresholds of the priority group (PG) buffers are configured in cells, which represent a specific amount of bytes. The cell size can vary in different devices, so it's better to query it from the firmware than hard coding it. Refactor the code dealing with this value into different functions, so that it will be easier to make the conversion in the next patch. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 47 ++++++++++++++++++++------ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 13 ------- 2 files changed, 37 insertions(+), 23 deletions(-) commit d3daae1b0808c82bc2875c0f249650d3efe6776f Author: Ido Schimmel Date: Fri Mar 24 08:02:49 2017 +0100 mlxsw: spectrum_buffers: Query shared buffer size from firmware Instead of hard coding the size of the shared buffer in the driver, query it from the firmware, as it may change in future devices. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 5ec2ee7dd26452c2852b395b323b0260c27c2e25 Author: Ido Schimmel Date: Fri Mar 24 08:02:48 2017 +0100 mlxsw: Query maximum number of ports from firmware We currently hard code the maximum number of ports in the driver, but this may change in future devices, so query it from the firmware instead. Fallback to a maximum of 64 ports in case this number can't be queried. This should only happen in SwitchX-2 for which this number is correct. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.c | 46 +++++++++++++-- drivers/net/ethernet/mellanox/mlxsw/core.h | 2 + drivers/net/ethernet/mellanox/mlxsw/port.h | 10 +--- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 16 +++++- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 12 ++-- .../net/ethernet/mellanox/mlxsw/spectrum_buffers.c | 67 ++++++++++++++++------ .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 8 ++- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 7 ++- 9 files changed, 125 insertions(+), 45 deletions(-) commit 8494ab06e06a8ef60db9ad678eb4bcd8def4c85b Author: Ido Schimmel Date: Fri Mar 24 08:02:47 2017 +0100 mlxsw: spectrum_router: Query number of LPM trees from firmware Instead of hard coding the number of LPM trees in the driver, query it from the firmware, as it may change in future devices. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/resources.h | 2 + drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 9 ++--- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 43 ++++++++++++++++++---- 3 files changed, 41 insertions(+), 13 deletions(-) commit ba82427d4a0fdd92b01cb2a1c4c24990f37406a9 Merge: 6a18c31 584a887 Author: David S. Miller Date: Fri Mar 24 13:45:07 2017 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-03-23 This series contains updates to i40e and i40e.txt documentation. Jake provides all the changes in the series which are centered around ntuple filter fixes and additional support. Fixed the current implementation of .set_rxnfc, where we were not reading the mask field for filter entries which was resulting in filters not behaving as expected and not working correctly. When cleaning up after disabling flow director support, ensure that the default input set is correctly reprogrammed. Since the hardware only supports a single input set for all flows of that type, the driver shall only allow the input set to change if there are no other configured filters for that flow type, so add support to detect when we can update the input set for each flow type. Align the driver to other drivers to partition the ring_cookie value into 8bits of VF index, along with 32bits of queue number instead of using the user-def field. Added support to parse the user-def field into a data structure format to allow future extensions of the user-def filed by keeping all the code that read/writes the field into a single location. Added support for flexible payloads passed via ethtool user-def field. We support a single flexible word (2byte) value per protocol type, and we handle the FLX_PIT register using a list of flexible entries so that each flow type may be configured separately. Enabled flow director filters for SCTPv4 packets using the ethtool ntuple interface to enable filters. Updated the documentation on the i40e driver to include the newly added support to ntuple filters. Reduced complexity of a if-continue-else-break section of code by taking advantage of using hlist_for_each_entry_continue() instead. ==================== Signed-off-by: David S. Miller commit 6a18c312320766b6d13a12c681f77df04894f1a5 Author: David Ahern Date: Thu Mar 23 19:02:27 2017 -0600 net: mpls: Fix setting ttl_propagate for rt2 Fix copy and paste error setting rt_ttl_propagate. Fixes: 5b441ac8784c1 ("mpls: allow TTL propagation to IP packets to be configured") Signed-off-by: David Ahern Acked-by: Robert Shearman Signed-off-by: David S. Miller net/mpls/af_mpls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c48367427a39ea0b85c7cf018fe4256627abfd9e Author: Gao Feng Date: Fri Mar 24 07:05:12 2017 +0800 tcp: sysctl: Fix a race to avoid unexpected 0 window from space Because sysctl_tcp_adv_win_scale could be changed any time, so there is one race in tcp_win_from_space. For example, 1.sysctl_tcp_adv_win_scale<=0 (sysctl_tcp_adv_win_scale is negative now) 2.space>>(-sysctl_tcp_adv_win_scale) (sysctl_tcp_adv_win_scale is postive now) As a result, tcp_win_from_space returns 0. It is unexpected. Certainly if the compiler put the sysctl_tcp_adv_win_scale into one register firstly, then use the register directly, it would be ok. But we could not depend on the compiler behavior. Signed-off-by: Gao Feng Signed-off-by: David S. Miller include/net/tcp.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit e013fb7c4c9fa8aa914d85d8b466c990b2eaebb6 Author: Alexey Dobriyan Date: Fri Mar 24 00:58:26 2017 +0300 net: make in_aton() 32-bit internally Converting IPv4 address doesn't need 64-bit arithmetic. Space savings: 10 bytes! add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-10 (-10) function old new delta in_aton 96 86 -10 Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller net/core/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cc61db9c7e6c985798d5419207fbd8cdb505c7b Author: Felix Manlunas Date: Thu Mar 23 13:26:28 2017 -0700 liquidio: do not reset Octeon if NIC firmware was preloaded The PF driver is incorrectly resetting Octeon when the module parameter "fw_type=none" is there. "fw_type=none" means the PF should not load any firmware to the NIC because Octeon is already running preloaded firmware. Fix it by putting an if (fw_type != none) around the reset code. Because the Octeon reset is now conditionally gone, when unloading the driver, conditionally send the RESET_PF command to the firmware who will then free up PF-related data structures. Signed-off-by: Felix Manlunas Signed-off-by: Satanand Burla Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 45 +++++++++++++++------- .../net/ethernet/cavium/liquidio/liquidio_common.h | 1 + 2 files changed, 33 insertions(+), 13 deletions(-) commit dddb64bcb34615bf48a2c9cb9881eb76795cc5c5 Author: subashab@codeaurora.org Date: Thu Mar 23 13:34:16 2017 -0600 net: Add sysctl to toggle early demux for tcp and udp Certain system process significant unconnected UDP workload. It would be preferrable to disable UDP early demux for those systems and enable it for TCP only. By disabling UDP demux, we see these slight gains on an ARM64 system- 782 -> 788Mbps unconnected single stream UDPv4 633 -> 654Mbps unconnected UDPv4 different sources The performance impact can change based on CPU architecure and cache sizes. There will not much difference seen if entire UDP hash table is in cache. Both sysctls are enabled by default to preserve existing behavior. v1->v2: Change function pointer instead of adding conditional as suggested by Stephen. v2->v3: Read once in callers to avoid issues due to compiler optimizations. Also update commit message with the tests. v3->v4: Store and use read once result instead of querying pointer again incorrectly. v4->v5: Refactor to avoid errors due to compilation with IPV6={m,n} Signed-off-by: Subash Abhinov Kasiviswanathan Suggested-by: Eric Dumazet Cc: Stephen Hemminger Cc: Tom Herbert Cc: David Miller Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 11 +++++- include/net/netns/ipv4.h | 2 + include/net/protocol.h | 7 ++-- include/net/udp.h | 1 + net/ipv4/af_inet.c | 8 +++- net/ipv4/ip_input.c | 5 ++- net/ipv4/protocol.c | 2 +- net/ipv4/sysctl_net_ipv4.c | 67 ++++++++++++++++++++++++++++++++++ net/ipv6/ip6_input.c | 6 ++- net/ipv6/protocol.c | 2 +- net/ipv6/tcp_ipv6.c | 3 +- net/ipv6/udp.c | 3 +- 12 files changed, 103 insertions(+), 14 deletions(-) commit ff3af92b4461be773337111daea80bb91b2cd545 Author: Mikulas Patocka Date: Thu Mar 23 10:23:14 2017 -0400 dm crypt: use shifts instead of sector_div sector_div is very slow, so we introduce a variable sector_shift and use shift instead of sector_div. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit c2bcb2b702e4684e566d295d687228498184e0c4 Author: Mikulas Patocka Date: Fri Mar 17 12:40:51 2017 -0400 dm integrity: add recovery mode In recovery mode, we don't: - replay the journal - check checksums - allow writes to the device This mode can be used as a last resort for data recovery. The motivation for recovery mode is that when there is a single error in the journal, the user should not lose access to the whole device. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Documentation/device-mapper/dm-integrity.txt | 5 ++++ drivers/md/dm-integrity.c | 40 +++++++++++++++++++--------- 2 files changed, 32 insertions(+), 13 deletions(-) commit 1aa0efd4210df1c57764b77040a6615bc9b3ac0f Author: Mike Snitzer Date: Fri Mar 17 14:56:17 2017 -0400 dm integrity: factor out create_journal() from dm_integrity_ctr() Preparation for next commit that makes call to create_journal() optional. Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 379 ++++++++++++++++++++++++---------------------- 1 file changed, 196 insertions(+), 183 deletions(-) commit 8f0009a225171cc1b76a6b443de5137b26e1374b Author: Milan Broz Date: Thu Mar 16 15:39:44 2017 +0100 dm crypt: optionally support larger encryption sector size Add optional "sector_size" parameter that specifies encryption sector size (atomic unit of block device encryption). Parameter can be in range 512 - 4096 bytes and must be power of two. For compatibility reasons, the maximal IO must fit into the page limit, so the limit is set to the minimal page size possible (4096 bytes). NOTE: this device cannot yet be handled by cryptsetup if this parameter is set. IV for the sector is calculated from the 512 bytes sector offset unless the iv_large_sectors option is used. Test script using dmsetup: DEV="/dev/sdb" DEV_SIZE=$(blockdev --getsz $DEV) KEY="9c1185a5c5e9fc54612808977ee8f548b2258d31ddadef707ba62c166051b9e3cd0294c27515f2bccee924e8823ca6e124b8fc3167ed478bca702babe4e130ac" BLOCK_SIZE=4096 # dmsetup create test_crypt --table "0 $DEV_SIZE crypt aes-xts-plain64 $KEY 0 $DEV 0 1 sector_size:$BLOCK_SIZE" # dmsetup table --showkeys test_crypt Signed-off-by: Milan Broz Signed-off-by: Mike Snitzer Documentation/device-mapper/dm-crypt.txt | 14 +++++ drivers/md/dm-crypt.c | 105 ++++++++++++++++++++++++------- 2 files changed, 96 insertions(+), 23 deletions(-) commit 33d2f09fcb357fd1861c4959d1d3505492bf91f8 Author: Milan Broz Date: Thu Mar 16 15:39:40 2017 +0100 dm crypt: introduce new format of cipher with "capi:" prefix For the new authenticated encryption we have to support generic composed modes (combination of encryption algorithm and authenticator) because this is how the kernel crypto API accesses such algorithms. To simplify the interface, we accept an algorithm directly in crypto API format. The new format is recognised by the "capi:" prefix. The dmcrypt internal IV specification is the same as for the old format. The crypto API cipher specifications format is: capi:cipher_api_spec-ivmode[:ivopts] Examples: capi:cbc(aes)-essiv:sha256 (equivalent to old aes-cbc-essiv:sha256) capi:xts(aes)-plain64 (equivalent to old aes-xts-plain64) Examples of authenticated modes: capi:gcm(aes)-random capi:authenc(hmac(sha256),xts(aes))-random capi:rfc7539(chacha20,poly1305)-random Authenticated modes can only be configured using the new cipher format. Note that this format allows user to specify arbitrary combinations that can be insecure. (Policy decision is done in cryptsetup userspace.) Authenticated encryption algorithms can be of two types, either native modes (like GCM) that performs both encryption and authentication internally, or composed modes where user can compose AEAD with separate specification of encryption algorithm and authenticator. For composed mode with HMAC (length-preserving encryption mode like an XTS and HMAC as an authenticator) we have to calculate HMAC digest size (the separate authentication key is the same size as the HMAC digest). Introduce crypt_ctr_auth_cipher() to parse the crypto API string to get HMAC algorithm and retrieve digest size from it. Also, for HMAC composed mode we need to parse the crypto API string to get the cipher mode nested in the specification. For native AEAD mode (like GCM), we can use crypto_tfm_alg_name() API to get the cipher specification. Because the HMAC composed mode is not processed the same as the native AEAD mode, the CRYPT_MODE_INTEGRITY_HMAC flag is no longer needed and "hmac" specification for the table integrity argument is removed. Signed-off-by: Milan Broz Signed-off-by: Mike Snitzer Documentation/device-mapper/dm-crypt.txt | 47 ++++-- drivers/md/dm-crypt.c | 275 ++++++++++++++++++++++--------- 2 files changed, 223 insertions(+), 99 deletions(-) commit e889f97a3e35a4e8f48ebc04c27031ca8805aa7e Author: Milan Broz Date: Thu Mar 16 15:39:39 2017 +0100 dm crypt: factor IV constructor out to separate function No functional change. Signed-off-by: Milan Broz Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 130 +++++++++++++++++++++++++++----------------------- 1 file changed, 69 insertions(+), 61 deletions(-) commit 8fa96e3bf6c04af61fc0a32ad64d648322c4d29d Merge: 12459cb e9d7af7 Author: David S. Miller Date: Fri Mar 24 12:53:15 2017 -0700 Merge branch 'systemport-tx-napi-improvements' Florian Fainelli says: ==================== net: systemport: TX/NAPI improvements This patch series builds up on Doug's latest changes done in BCMGENET to reduce the number of spurious interrupts in NAPI, simplify pointer arithmetic and finally tracking of per TX ring statistics to be SMP friendly. ==================== Signed-off-by: David S. Miller commit e9d7af78b22e766a72ddb956a87789249a30a470 Author: Florian Fainelli Date: Thu Mar 23 10:36:48 2017 -0700 net: systemport: Simplify circular pointer arithmetic Similar to c298ede2fe21 ("net: bcmgenet: simplify circular pointer arithmetic") we don't need to complex arthimetic since we always have a ring size that is a power of 2. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 6baa785a9c336f69c2aa36f4949856b3bb90bde3 Author: Florian Fainelli Date: Thu Mar 23 10:36:47 2017 -0700 net: systemport: Clear status to reduce spurious interrupts Do something similar to commit d5810ca3252a ("net: bcmgenet: clear status to reduce spurious interrupts") and clear interrupts right before servicing them. This reduces the number of interrupts by 10K interrupts/sec for a TX TCP session 1Gbits/sec. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 30defeb2fb0a6219fb2c3575deb2da207b214f86 Author: Florian Fainelli Date: Thu Mar 23 10:36:46 2017 -0700 net: systemport: Track per TX ring statistics bcm_sysport_tx_reclaim_one() is currently summing TX bytes/packets in a way that is not SMP friendly, mutliples CPUs could run bcm_sysport_tx_reclaim_one() independently and still update stats->tx_bytes and stats->tx_packets, cloberring the other CPUs statistics. Fix this by tracking per TX rings the number of bytes, packets, dropped and errors statistics, and provide a bcm_sysport_get_nstats() function which aggregates everything and returns a consistent output. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 65 ++++++++++++++++++++++++++---- drivers/net/ethernet/broadcom/bcmsysport.h | 5 +++ 2 files changed, 63 insertions(+), 7 deletions(-) commit 12459cbd98e7acc5748fa879b86bb4d0f8dc4aef Merge: 5952fde 90eff90 Author: David S. Miller Date: Fri Mar 24 12:51:05 2017 -0700 Merge branch 'phy-mdio-split' Florian Fainelli says: ==================== net: phy: Allow splitting MDIO bus/device support This patch series allows building support for MDIO bus controllers which are sometimes usable and necessary in cases where there are no Ethernet PHYs. Changes in v3: - corrected of_mdio compile guards for prototypes vs. stubs - added a missing OF_MDIO dependency for MDIO_BCM_UNIMAC - fixed Kbuild bot reported errors against mdio-bitbang Changes in v2: - implement Russell's feedback - solve the circular dependency in the CONFIG_MDIO_DEVICE + CONFIG_PHYLIB case ==================== Signed-off-by: David S. Miller commit 90eff9096c01ba90cdae504a6b95ee87fe2556a3 Author: Florian Fainelli Date: Thu Mar 23 10:01:19 2017 -0700 net: phy: Allow splitting MDIO bus/device support from PHYs Introduce a new configuration symbol: MDIO_DEVICE which allows building the MDIO devices and bus code, without pulling in the entire Ethernet PHY library and devices code. PHYLIB nows select MDIO_DEVICE and the relevant Makefile files are updated to reflect that. When MDIO_DEVICE (MDIO bus/device only) is selected, but not PHYLIB, we have mdio-bus.ko as a loadable module, and it does not have a module_exit() function because the safety of removing a bus class is unclear. When both MDIO_DEVICE and PHYLIB are enabled, we need to assemble everything into a common loadable module: libphy.ko because of nasty circular dependencies between phy.c, phy_device.c and mdio_bus.c which are really tough to untangle. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/Makefile | 2 +- drivers/net/phy/Kconfig | 60 +++++++++++++++++++++++----------------- drivers/net/phy/Makefile | 13 +++++++-- drivers/net/phy/mdio-boardinfo.c | 1 + drivers/net/phy/mdio_bus.c | 9 ++++++ include/linux/phy.h | 21 ++++++++++++-- 6 files changed, 76 insertions(+), 30 deletions(-) commit 17487eebaf5799f7a2e78364cc94fb84e37300a2 Author: Florian Fainelli Date: Thu Mar 23 10:01:18 2017 -0700 net: phy: MDIO_BCM_UNIMAC should depend on OF_MDIO The Broadcom MDIO UniMAC driver uses routines provided by of_mdio.c which is guarded by CONFIG_OF_MDIO. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6e14f63d744cede856ba5d517d6b266c9cfbf41 Author: Florian Fainelli Date: Thu Mar 23 10:01:17 2017 -0700 of_mdio: Correct check against CONFIG_OF CONFIG_OF_MDIO is actually what triggers the build of drivers/of/of_mdio.c, so providing inline stubs when CONFIG_OF_MDIO=y should be based on that symbol as well. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller include/linux/of_mdio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ef43aa38063a6b2b3c6618e28ab35794f4f1fe29 Author: Milan Broz Date: Wed Jan 4 20:23:54 2017 +0100 dm crypt: add cryptographic data integrity protection (authenticated encryption) Allow the use of per-sector metadata, provided by the dm-integrity module, for integrity protection and persistently stored per-sector Initialization Vector (IV). The underlying device must support the "DM-DIF-EXT-TAG" dm-integrity profile. The per-bio integrity metadata is allocated by dm-crypt for every bio. Example of low-level mapping table for various types of use: DEV=/dev/sdb SIZE=417792 # Additional HMAC with CBC-ESSIV, key is concatenated encryption key + HMAC key SIZE_INT=389952 dmsetup create x --table "0 $SIZE_INT integrity $DEV 0 32 J 0" dmsetup create y --table "0 $SIZE_INT crypt aes-cbc-essiv:sha256 \ 11ff33c6fb942655efb3e30cf4c0fd95f5ef483afca72166c530ae26151dd83b \ 00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff \ 0 /dev/mapper/x 0 1 integrity:32:hmac(sha256)" # AEAD (Authenticated Encryption with Additional Data) - GCM with random IVs # GCM in kernel uses 96bits IV and we store 128bits auth tag (so 28 bytes metadata space) SIZE_INT=393024 dmsetup create x --table "0 $SIZE_INT integrity $DEV 0 28 J 0" dmsetup create y --table "0 $SIZE_INT crypt aes-gcm-random \ 11ff33c6fb942655efb3e30cf4c0fd95f5ef483afca72166c530ae26151dd83b \ 0 /dev/mapper/x 0 1 integrity:28:aead" # Random IV only for XTS mode (no integrity protection but provides atomic random sector change) SIZE_INT=401272 dmsetup create x --table "0 $SIZE_INT integrity $DEV 0 16 J 0" dmsetup create y --table "0 $SIZE_INT crypt aes-xts-random \ 11ff33c6fb942655efb3e30cf4c0fd95f5ef483afca72166c530ae26151dd83b \ 0 /dev/mapper/x 0 1 integrity:16:none" # Random IV with XTS + HMAC integrity protection SIZE_INT=377656 dmsetup create x --table "0 $SIZE_INT integrity $DEV 0 48 J 0" dmsetup create y --table "0 $SIZE_INT crypt aes-xts-random \ 11ff33c6fb942655efb3e30cf4c0fd95f5ef483afca72166c530ae26151dd83b \ 00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff \ 0 /dev/mapper/x 0 1 integrity:48:hmac(sha256)" Both AEAD and HMAC protection authenticates not only data but also sector metadata. HMAC protection is implemented through autenc wrapper (so it is processed the same way as an authenticated mode). In HMAC mode there are two keys (concatenated in dm-crypt mapping table). First is the encryption key and the second is the key for authentication (HMAC). (It is userspace decision if these keys are independent or somehow derived.) The sector request for AEAD/HMAC authenticated encryption looks like this: |----- AAD -------|------ DATA -------|-- AUTH TAG --| | (authenticated) | (auth+encryption) | | | sector_LE | IV | sector in/out | tag in/out | For writes, the integrity fields are calculated during AEAD encryption of every sector and stored in bio integrity fields and sent to underlying dm-integrity target for storage. For reads, the integrity metadata is verified during AEAD decryption of every sector (they are filled in by dm-integrity, but the integrity fields are pre-allocated in dm-crypt). There is also an experimental support in cryptsetup utility for more friendly configuration (part of LUKS2 format). Because the integrity fields are not valid on initial creation, the device must be "formatted". This can be done by direct-io writes to the device (e.g. dd in direct-io mode). For now, there is available trivial tool to do this, see: https://github.com/mbroz/dm_int_tools Signed-off-by: Milan Broz Signed-off-by: Ondrej Mosnacek Signed-off-by: Vashek Matyas Signed-off-by: Mike Snitzer Documentation/device-mapper/dm-crypt.txt | 16 + drivers/md/dm-crypt.c | 882 ++++++++++++++++++++++++++----- 2 files changed, 758 insertions(+), 140 deletions(-) commit 7eada909bfd7ac90a4522e56aa3179d1fd68cd14 Author: Mikulas Patocka Date: Wed Jan 4 20:23:53 2017 +0100 dm: add integrity target The dm-integrity target emulates a block device that has additional per-sector tags that can be used for storing integrity information. A general problem with storing integrity tags with every sector is that writing the sector and the integrity tag must be atomic - i.e. in case of crash, either both sector and integrity tag or none of them is written. To guarantee write atomicity the dm-integrity target uses a journal. It writes sector data and integrity tags into a journal, commits the journal and then copies the data and integrity tags to their respective location. The dm-integrity target can be used with the dm-crypt target - in this situation the dm-crypt target creates the integrity data and passes them to the dm-integrity target via bio_integrity_payload attached to the bio. In this mode, the dm-crypt and dm-integrity targets provide authenticated disk encryption - if the attacker modifies the encrypted device, an I/O error is returned instead of random data. The dm-integrity target can also be used as a standalone target, in this mode it calculates and verifies the integrity tag internally. In this mode, the dm-integrity target can be used to detect silent data corruption on the disk or in the I/O path. Signed-off-by: Mikulas Patocka Signed-off-by: Milan Broz Signed-off-by: Mike Snitzer Documentation/device-mapper/dm-integrity.txt | 189 ++ drivers/md/Kconfig | 10 + drivers/md/Makefile | 1 + drivers/md/dm-integrity.c | 3085 ++++++++++++++++++++++++++ 4 files changed, 3285 insertions(+) commit 5952fde10c35ecfefb0c3e61536170798d4a51c9 Author: Jiri Pirko Date: Thu Mar 23 17:02:16 2017 +0100 net: sched: choke: remove dead filter classify code sch_choke is classless qdisc so it does not define cl_ops. Therefore filter_list cannot be ever changed, being NULL all the time. Reason is this check in tc_ctl_tfilter: /* Is it classful? */ cops = q->ops->cl_ops; if (!cops) return -EINVAL; So remove this dead code. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/sch_choke.c | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) commit 270c7759fbbc99e1ed00259c752a8c53f31cfb27 Author: LABBE Corentin Date: Thu Mar 23 14:40:22 2017 +0100 net: stmmac: add set_mac to the stmmac_ops Two different set_mac functions exists but stmmac_dwmac4_set_mac() is only used for enabling and never for disabling. So on dwmac4, the MAC RX/TX is never disabled. This patch add a generic function pointer set_mac() to stmmac_ops and replace all call to stmmac_set_mac/stmmac_dwmac4_set_mac by a call to this pointer. Since dwmac4_ops is const, set_mac cannot be modified after, and so dwmac4_ops is duplioacted like dwmac4_dma_ops. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 2 ++ .../net/ethernet/stmicro/stmmac/dwmac1000_core.c | 1 + .../net/ethernet/stmicro/stmmac/dwmac100_core.c | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 39 ++++++++++++++++++++-- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 11 +++--- 5 files changed, 45 insertions(+), 9 deletions(-) commit aff55a3638a2d13de5cf0b0c45993378282cbe91 Author: Geliang Tang Date: Thu Mar 23 21:15:57 2017 +0800 isdn: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller drivers/isdn/divert/isdn_divert.c | 9 +++------ drivers/isdn/hardware/eicon/divasi.c | 5 ++--- drivers/isdn/hardware/mISDN/hfcmulti.c | 10 ++++------ drivers/isdn/hardware/mISDN/hfcpci.c | 9 +++------ drivers/isdn/hardware/mISDN/mISDNipac.c | 5 ++--- drivers/isdn/hardware/mISDN/mISDNisar.c | 10 ++++------ drivers/isdn/hardware/mISDN/w6692.c | 5 ++--- drivers/isdn/hisax/amd7930_fn.c | 4 +--- drivers/isdn/hisax/arcofi.c | 4 +--- drivers/isdn/hisax/diva.c | 5 ++--- drivers/isdn/hisax/elsa.c | 4 +--- drivers/isdn/hisax/fsm.c | 4 +--- drivers/isdn/hisax/hfc4s8s_l1.c | 5 ++--- drivers/isdn/hisax/hfc_2bds0.c | 4 +--- drivers/isdn/hisax/hfc_pci.c | 8 ++------ drivers/isdn/hisax/hfc_sx.c | 8 ++------ drivers/isdn/hisax/hfc_usb.c | 8 ++------ drivers/isdn/hisax/hfcscard.c | 4 +--- drivers/isdn/hisax/icc.c | 4 +--- drivers/isdn/hisax/ipacx.c | 4 +--- drivers/isdn/hisax/isac.c | 4 +--- drivers/isdn/hisax/isar.c | 10 ++++------ drivers/isdn/hisax/isdnl3.c | 4 +--- drivers/isdn/hisax/teleint.c | 4 +--- drivers/isdn/hisax/w6692.c | 5 ++--- drivers/isdn/i4l/isdn_ppp.c | 5 ++--- drivers/isdn/i4l/isdn_tty.c | 5 ++--- drivers/isdn/mISDN/dsp_core.c | 4 +--- drivers/isdn/mISDN/fsm.c | 4 +--- drivers/isdn/mISDN/l1oip_core.c | 4 +--- 30 files changed, 54 insertions(+), 114 deletions(-) commit 9096643856919eba4ea7dd462e3528bc6d230f4f Merge: 9a32562 eb100e0 Author: David S. Miller Date: Fri Mar 24 12:30:22 2017 -0700 Merge branch 'bridge-ext-learned-entries' Nikolay Aleksandrov says ==================== net: bridge: allow user-space to add ext learned entries This set adds the ability to add externally learned entries from user-space. For symmetry and proper function we need to allow SW entries to take over HW learned ones (similar to how HW can take over SW entries currently) which is needed for our use case (evpn) where we have pure SW ports and HW ports mixed in a single bridge. This does not play well with switchdev devices currently because there's no feedback when the entry is taken over, but this case has never worked anyway and feedback can be easily added when needed. Patch 02 simply allows to use NTF_EXT_LEARNED from user-space, we already have Quagga patches that make use of this functionality. ==================== Signed-off-by: David S. Miller commit eb100e0e24a23f309d0765061ea4dfd8ca9d400d Author: Nikolay Aleksandrov Date: Thu Mar 23 12:27:13 2017 +0200 net: bridge: allow to add externally learned entries from user-space The NTF_EXT_LEARNED flag was added for switchdev and externally learned entries, but it can also be used for entries learned via a software in user-space which requires dynamic entries that do not expire. One such case that we have is with quagga and evpn which need dynamic entries but also require to age them themselves. Signed-off-by: Nikolay Aleksandrov Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller net/bridge/br_fdb.c | 2 ++ 1 file changed, 2 insertions(+) commit 7e26bf45e4cb4ffaa113dc4a95a3d78bcc51e4cb Author: Nikolay Aleksandrov Date: Thu Mar 23 12:27:12 2017 +0200 net: bridge: allow SW learn to take over HW fdb entries Allow to take over an entry which was previously learned via HW when it shows up from a SW port. This is analogous to how HW takes over SW learned entries already. Suggested-by: Roopa Prabhu Signed-off-by: Nikolay Aleksandrov Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller net/bridge/br_fdb.c | 3 +++ 1 file changed, 3 insertions(+) commit ca02e3f9b1853ff82565a3262146a710f5af7ebb Author: Neil Armstrong Date: Thu Mar 23 11:41:11 2017 +0100 ARM64: dts: meson-gxl: Add missing pinctrl pins groups Add pinctrl pins nodes following the additions of missing pins in the pinctrl driver. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 264b88c9e5c86c92ca1d67689779362760baf651 Author: Harald Geyer Date: Thu Feb 23 17:06:52 2017 +0000 regulator: core: Add new notification for enabling of regulator This is useful for devices, which need some time to start up, to help the drivers track how long the supply has been up already. Ie whether it can safely talk to the HW or needs to wait. Signed-off-by: Harald Geyer Signed-off-by: Mark Brown drivers/regulator/core.c | 2 ++ include/linux/regulator/consumer.h | 1 + 2 files changed, 3 insertions(+) commit 22588f8773f687449ce6e97dce9f102553440d30 Author: Chao Yu Date: Thu Mar 23 13:38:26 2017 +0800 f2fs: don't reserve additional space in xattr block In this patch, we change xattr block disk layout as below: Before: xattr node block layout +---------------------------------------------+---------------+-------------+ | node block xattr entries | reserved | node footer | | 4068 Bytes | 4 Bytes | 24 Bytes | In memory layout +--------------------+---------------------------------+--------------------+ | inline xattr | node block xattr entries | reserved | | 200 Bytes | 4068 Bytes | 4 Bytes | After: xattr node block layout +-------------------------------------------------------------+-------------+ | node block xattr entries | node footer | | 4072 Bytes | 24 Bytes | In memory layout +--------------------+---------------------------------+--------------------+ | inline xattr | node block xattr entries | reserved | | 200 Bytes | 4072 Bytes | 4 Bytes | With this change, we don't need to reserve additional space in node block, just keep reserved space in logical in-memory layout. So that it would help to enlarge valid free space of xattr node block. As tested, generic/026 shows max stored xattr entires number increases from 531 to 532 when inline_xattr option is enabled. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/xattr.c | 6 +++--- fs/f2fs/xattr.h | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) commit 89e9eabd7ded4680f3b0f8ddc7398a3909de57c8 Author: Chao Yu Date: Thu Mar 23 13:38:25 2017 +0800 f2fs: clean up xattr operation 1. don't allocate redundant memory in read_all_xattrs. 2. introduce RESERVED_XATTR_SIZE for cleanup. Signed-off-by: Chao Yu Reviewed-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/xattr.c | 25 +++++++++++-------------- fs/f2fs/xattr.h | 3 ++- 2 files changed, 13 insertions(+), 15 deletions(-) commit 99f4b917b0411f660b06ffd30f3dc36cf7b05710 Author: Chao Yu Date: Wed Mar 22 17:23:46 2017 +0800 f2fs: don't track volatile file in dirty inode list Don't track volatile file in dirty inode list, otherwise with data_flush option, background thread will entry into endless loop for flushing journal file's pages. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 648d50ba12c805d3fc75105ede7af254b3349dbd Author: Chao Yu Date: Wed Mar 22 17:23:45 2017 +0800 f2fs: show the max number of volatile operations This patch adds to show the max number of volatile operations which are conducting concurrently. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 10 ++++++++-- fs/f2fs/f2fs.h | 18 +++++++++++++++++- fs/f2fs/file.c | 5 +++++ 3 files changed, 30 insertions(+), 3 deletions(-) commit 30a61ddf8117c26ac5b295e1233eaa9629a94ca3 Author: Chao Yu Date: Wed Mar 22 14:45:05 2017 +0800 f2fs: fix race condition in between free nid allocator/initializer In below concurrent case, allocated nid can be loaded into free nid cache and be allocated again. Thread A Thread B - f2fs_create - f2fs_new_inode - alloc_nid - __insert_nid_to_list(ALLOC_NID_LIST) - f2fs_balance_fs_bg - build_free_nids - __build_free_nids - scan_nat_page - add_free_nid - __lookup_nat_cache - f2fs_add_link - init_inode_metadata - new_inode_page - new_node_page - set_node_addr - alloc_nid_done - __remove_nid_from_list(ALLOC_NID_LIST) - __insert_nid_to_list(FREE_NID_LIST) This patch makes nat cache lookup and free nid list operation being atomical to avoid this race condition. Signed-off-by: Jaegeuk Kim Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 63 +++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 18 deletions(-) commit 5f4c3dec225e03273e1f74816e676cccc1a54329 Author: Yunlei He Date: Wed Mar 22 11:59:30 2017 +0800 f2fs: use set_page_private marcro in f2fs_trace_pid Use set_page_private marcro instead of operte page struct directly Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9897159a7b1aa98ec0bc8fc053ab822e6634e7fa Author: Chao Yu Date: Tue Mar 21 20:09:45 2017 +0800 f2fs: fix recording invalid last_victim When doing garbage collection, we try to record segment offset which locates at next one of last victim, using it as the start offset in next searching. But in some corner cases, recorded offset may cross the end of main segment area, it will cause incorrectly searching in dirty_segmap bitmap. This patch adds modular operation to avoid this issue. Reported-by: Yunlei He Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 1 + 1 file changed, 1 insertion(+) commit ef65e96e0762cb98d9abeb6737c721ca840f8092 Author: Arnaldo Carvalho de Melo Date: Fri Mar 24 15:03:19 2017 -0300 perf trace: Fixup thread refcounting In trace__vfs_getname() and when checking if a thread is filtered in trace__process_sample() we were not dropping the reference obtained via machine__findnew_thread(), fix it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-9gc470phavxwxv5d9w7ck8ev@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit c04dfafa6033ca2eddc56fe188017d9ae50414c9 Author: Arnaldo Carvalho de Melo Date: Fri Mar 24 14:54:06 2017 -0300 perf trace: Fix up error path indentation Trivial fix removing a tab in an error path. Link: http://lkml.kernel.org/n/tip-c14mk6cqaiby8gf5rpft3d9r@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39f0e7a825cfc971dc9ad40b0770c22f6f4f89b8 Author: Arnaldo Carvalho de Melo Date: Fri Mar 24 14:51:28 2017 -0300 perf trace: Check for vfs_getname.pathname length It shouldn't be zero, but if the 'perf probe' on getname_flags() (or elsewhere in the future we need to probe to catch the pathname for syscalls like 'open' being copied from userspace to the kernel) is misplaced somehow, then we will end up not allocating space and trying to copy the "" empty string to ttrace->filename.name, causing a segfault, fix it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-c4f1t6sx1nczuzop19r5si5s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 2 ++ 1 file changed, 2 insertions(+) commit 3c01b9ee2ab9d0dffe837c12ed93740516a673d7 Author: Daniel Baluta Date: Tue Mar 21 17:03:25 2017 +0200 ASoC: codec: wm8960: Relax bit clock computation WM8960 derives bit clock from sysclock using BCLKDIV[3:0] of R8 clocking register (See WM8960 datasheet, page 71). There are use cases, like this: aplay -Dhw:0,0 -r 48000 -c 1 -f S20_3LE -t raw audio48k20b_3LE1c.pcm where no BCLKDIV applied to sysclock can give us the exact requested bitclk, so driver fails to configure clocking and aplay fails to run. Fix this by relaxing bitclk computation, so that when no exact value can be derived from sysclk pick the closest value greater than expected bitclk. Suggested-by: Charles Keepax Signed-off-by: Daniel Baluta Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8960.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit 3ddc97211cbb61a5f59882c26f8e3158c86e34bb Author: Daniel Baluta Date: Tue Mar 21 17:03:24 2017 +0200 ASoC: codec: wm8960: Refactor sysclk freq search Add a separate function for finding (sysclk, lrclk, bclk) when the clock is auto or mclk. This makes code easier to read and reduces the indentation level in wm8960_configure_clocking. Signed-off-by: Daniel Baluta Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8960.c | 80 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 61 insertions(+), 19 deletions(-) commit 73548dd316adec41172c31d63a0c35a97bf9577f Author: Dmitry Torokhov Date: Tue Mar 21 16:50:43 2017 -0700 ASoC: jack - check status of GPIO-based pins on resume For GPIO-backed pins that are not configured as wakeup sources, we may miss change in their state that happens while system is suspended. Let's use PM notifier to refresh their state upon resume. Signed-off-by: Dmitry Torokhov Signed-off-by: Mark Brown include/sound/soc.h | 1 + sound/soc/soc-jack.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) commit 812613591cb652344186c4cd912304ed02138566 Author: Akinobu Mita Date: Wed Mar 22 09:18:26 2017 +0900 spi: omap2-mcspi: poll OMAP2_MCSPI_CHSTAT_RXS for PIO transfer When running the spi-loopback-test with slower clock rate like 10 KHz, the test for 251 bytes transfer was failed. This failure triggered an spi-omap2-mcspi's error message "DMA RX last word empty". This message means that PIO for reading the remaining bytes due to the DMA transfer length reduction is failed. This problem can be fixed by polling OMAP2_MCSPI_CHSTAT_RXS bit in channel status register to wait until the receive buffer register is filled. Cc: Mark Brown Signed-off-by: Akinobu Mita Signed-off-by: Mark Brown drivers/spi/spi-omap2-mcspi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 6b8530cc056efd4a11b034ca5b1e9f7e9563f553 Author: Kuninori Morimoto Date: Wed Mar 22 04:02:43 2017 +0000 ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT R-Car Datasheet is indicating "SSICR.CKDV = 000 is invalid when SSIWSR.WS_MODE = 1 or SSIWSR.CONT = 1". Current driver will set CONT, thus, we shouldn't use CKDV = 000. This patch fixup it. Reported-by: Hiroyuki Yokoyama Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/ssi.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 395eaaae1ddd4c6ad0c88bdff65184ef3c861647 Author: Chris Zhong Date: Wed Mar 22 09:54:51 2017 +0800 drm/rockchip/dsi: correct the grf_switch_reg name For the RK3399, the grf_switch_reg name should be RK3399_GRF_SOC_CON20, not RK3399_GRF_SOC_CON19. Signed-off-by: Chris Zhong Reviewed-by: Brian Norris Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1490147691-4489-5-git-send-email-zyw@rock-chips.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5bc07b1569022b403be2f92777430345dbbe39e4 Author: Chris Zhong Date: Wed Mar 22 09:54:50 2017 +0800 drm/rockchip/dsi: enable the grf clk before writing grf registers For RK3399, the grf clk should be enabled before writing grf registers, otherwise the register value can not be changed. Signed-off-by: Chris Zhong Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1490147691-4489-4-git-send-email-zyw@rock-chips.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit d3dffdc260d79026f385d6b52d2ec7b6cda559fc Author: Chris Zhong Date: Wed Mar 22 09:54:49 2017 +0800 dt-bindings: add the grf clock for dw-mipi-dsi For RK3399, the grf clock should be controlled by dw-mipi-dsi driver, add the description for this clock. Acked-by: Rob Herring Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1490147691-4489-3-git-send-email-zyw@rock-chips.com .../devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25f0b120727e0f191f6a4f6b4476a2191c22497a Author: Chris Zhong Date: Wed Mar 22 09:54:48 2017 +0800 drm/rockchip/dsi: check phy_cfg_clk only for RK3399 For RK3399, the phy_cfg_clk is a required clock, if phy_cfg_clk is disabled, MIPI phy can not work. Let's return a error if there is no phy_cfg_clk in dts property, when the pdata match RK3399. Signed-off-by: Chris Zhong Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1490147691-4489-2-git-send-email-zyw@rock-chips.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 8820b68bd378db1821b23b93dbb5a1a06cbbdfdd Author: Jeffy Chen Date: Wed Mar 22 11:21:20 2017 +0800 drm/rockchip: Refactor the component match logic. Currently we are adding all components from the dts, if one of their drivers been disabled, we would not be able to bring up others. Refactor component match logic, follow exynos drm. Signed-off-by: Jeffy Chen Reviewed-by: Andrzej Hajda Acked-by: Mark Yao Tested-by: Heiko Stuebner Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1490152880-21855-1-git-send-email-jeffy.chen@rock-chips.com drivers/gpu/drm/rockchip/Kconfig | 10 +- drivers/gpu/drm/rockchip/Makefile | 16 +-- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 9 +- drivers/gpu/drm/rockchip/cdn-dp-core.c | 8 +- drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 8 +- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 10 +- drivers/gpu/drm/rockchip/inno_hdmi.c | 10 +- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 141 ++++++++++++++++-------- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 6 + drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 8 +- 10 files changed, 118 insertions(+), 108 deletions(-) commit dc2721564f6da549f6eb29ac5bca28d65beadcb7 Author: Hiroyuki Yokoyama Date: Wed Mar 22 05:43:35 2017 +0000 ASoC: rcar: enable PCM RATE untile 192000 R-Car sound can handle untile 192000 rate. Signed-off-by: Hiroyuki Yokoyama 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 381ca1d12e188f90ed9f36cebb4a62d46fb11274 Author: Bhumika Goyal Date: Wed Mar 22 18:21:35 2017 +0530 ASoC: blackfin: constify snd_soc_ops structures Declare snd_soc_ops structures as const as they are only stored in the ops field of a snd_soc_dai_link structure. This field is of type const, so snd_soc_ops structures having this property can be made const too. Cross compiled the .o files for blackfin architecture. Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown sound/soc/blackfin/bfin-eval-adau1373.c | 2 +- sound/soc/blackfin/bfin-eval-adav80x.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 75f88115391156b3f0fecbbae76bf870c89bcab8 Author: Wadim Egorov Date: Wed Mar 22 16:50:50 2017 +0100 regulator: rk808: Fix RK818 LDO2 Set the correct voltage select register for LDO2. Signed-off-by: Wadim Egorov Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/regulator/rk808-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 991454e17070eaf5286a666d9e896fd6fb332c72 Author: Kuninori Morimoto Date: Fri Mar 24 00:13:00 2017 +0000 ASoC: core: remove pointless auxiliary from snd_soc_component commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...") tried to replace aux_comp_list to component_dev_list, but it failed because of binding timing. Thus, Sylwester fixuped it by commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary..."). One of main purpose of commit 1a653aa44725 ("ASoC: core: replace...") was remove replaceable list (= list_aux) from snd_soc_component by using new "auxiliary" flags (but it failed). Because of this background, current code has reborned card_aux_list (= same as original list_aux), and almost pointless "auxiliary" flags. Let's remove pointless "auxiliary" flags by this patch This means, it is same as revert both commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...") and commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary..."). Signed-off-by: Kuninori Morimoto Tested-by: Sylwester Nawrocki Signed-off-by: Mark Brown include/sound/soc.h | 1 - sound/soc/soc-core.c | 15 +++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) commit c635df496a5c397fd078b4e72a42e1be79632d7d Author: Colin Ian King Date: Fri Mar 24 17:13:50 2017 +0000 regulator: twl6030: remove redundant range check min_uV > 1300000 && min_uV <= 1350000 It has been pointed out to me that the range for vsel = 58 is actually dead code as this is covered by an earlier check for (min_uV >= 700000) && (min_uV <= 1420000) so remove that check completely. Reported-by: Alban Auzeill Signed-off-by: Colin Ian King Signed-off-by: Mark Brown drivers/regulator/twl6030-regulator.c | 2 -- 1 file changed, 2 deletions(-) commit 1351aaeb50b2ae5eb5469b3d3d0a84073a127a39 Author: Vignesh R Date: Fri Mar 24 12:12:15 2017 +0530 spi: spi-ti-qspi: Use dma_engine wrapper for dma memcpy call Instead of calling device_prep_dma_memcpy() directly with dma_device pointer, use the newly introduced dmaengine_prep_dma_memcpy() wrapper API. Signed-off-by: Vignesh R Signed-off-by: Mark Brown drivers/spi/spi-ti-qspi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e3a6a62400520452fe39740dca90a1d0b94b8f92 Merge: 267dd0a bf874fc Author: Ingo Molnar Date: Fri Mar 24 19:37:40 2017 +0100 Merge tag 'perf-core-for-mingo-4.12-20170324' 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: - Allow suppressing 'uncore_' when specifying PMU events (Andi Kleen) - Collapse identically named PMU events in 'perf stat', allow not merging it via --no-merge (Andi Kleen) Fixes: - Use more precise 'grep -v' to suppress unwanted 'objdump -dS' disassembly output to not ditch line:number lines needed by 'perf annotate --print-lines' logic (Taeung Song) Infrastructure changes: - SDT (Statically Defined Tracing)/uprobes_events arguments improvements (Alexis Berlemont, Ravi Bangoria) - Improvements for the handling of JSON described vendor events, including having an expression parser to calculate metrics from multiple vendor events (Andi Kleen) - Update Intel JSON vendor event files (Andi Kleen) - Restore error reporting in 'perf probe -d' when none of the events requested to be deleted exist. (Kefeng Wang) - Bump MAX_CMDLEN in 'perf probe' to match what the kernel accepts (Ravi Bangoria) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 0ef5819589f6128ea0919fa7b730d6ee2ddedfe8 Author: Rob Herring Date: Tue Mar 21 21:02:59 2017 -0500 ARM: dts: alpine: fix PCIe node name PCIe bridges should have a node name of 'pcie'. Signed-off-by: Rob Herring Cc: Tsahee Zidenberg Cc: Antoine Tenart Signed-off-by: Antoine Tenart arch/arm/boot/dts/alpine.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3aeca1d74366a43d28e8c826ac48064f7287022 Author: Linus Walleij Date: Sat Jan 28 21:15:15 2017 +0100 ARM: dts: add PCI to the Gemini device trees The Cortina Gemini has an internal PCI root bus, add this to the device tree, and add interrupt mapping (swizzling) to the relevant systems device trees. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Cc: Feng-Hsin Chiang Cc: Greentime Hu Signed-off-by: Linus Walleij arch/arm/boot/dts/gemini-sq201.dts | 22 ++++++++++++++++++++ arch/arm/boot/dts/gemini.dtsi | 42 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) commit 2d06e3b7145bb08705615e6e7400024d8e36a5c0 Author: Ming Lei Date: Fri Mar 17 00:12:35 2017 +0800 md: raid10: avoid direct access to bvec table in handle_reshape_read_error All reshape I/O share pages from 1st copy device, so just use that pages for avoiding direct access to bvec table in handle_reshape_read_error. Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/raid10.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit cdb76be31568604f389f951bd0efadd3f530f2dd Author: Ming Lei Date: Fri Mar 17 00:12:34 2017 +0800 md: raid10: retrieve page from preallocated resync page array Now one page array is allocated for each resync bio, and we can retrieve page from this table directly. Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/raid10.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit f0250618361db1447d66c494c6dd2df815f42c87 Author: Ming Lei Date: Fri Mar 17 00:12:33 2017 +0800 md: raid10: don't use bio's vec table to manage resync pages Now we allocate one page array for managing resync pages, instead of using bio's vec table to do that, and the old way is very hacky and won't work any more if multipage bvec is enabled. The introduced cost is that we need to allocate (128 + 16) * copies bytes per r10_bio, and it is fine because the inflight r10_bio for resync shouldn't be much, as pointed by Shaohua. Also bio_reset() in raid10_sync_request() and reshape_request() are removed because all bios are freshly new now in these functions and not necessary to reset any more. This patch can be thought as cleanup too. Suggested-by: Shaohua Li Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/raid10.c | 134 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 82 insertions(+), 52 deletions(-) commit 81fa152008ac903877b59bcc7d16777c3292c206 Author: Ming Lei Date: Fri Mar 17 00:12:32 2017 +0800 md: raid10: refactor code of read reshape's .bi_end_io reshape read request is a bit special and requires one extra bio which isn't allocated from r10buf_pool. Refactor the .bi_end_io for read reshape, so that we can use raid10's resync page mangement approach easily in the following patches. Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/raid10.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit 841c1316c7da6199a7df473893c141943991a756 Author: Ming Lei Date: Fri Mar 17 00:12:31 2017 +0800 md: raid1: improve write behind This patch improve handling of write behind in the following ways: - introduce behind master bio to hold all write behind pages - fast clone bios from behind master bio - avoid to change bvec table directly - use bio_copy_data() and make code more clean Suggested-by: Shaohua Li Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/raid1.c | 118 ++++++++++++++++++++++++----------------------------- drivers/md/raid1.h | 10 +++-- 2 files changed, 61 insertions(+), 67 deletions(-) commit d8c84c4f8becc1fb993911e18c8aef5ecf7a72ac Author: Ming Lei Date: Fri Mar 17 00:12:30 2017 +0800 md: raid1: move 'offset' out of loop The 'offset' local variable can't be changed inside the loop, so move it out. Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/raid1.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6f8802852f7e58a12177a86179803b9efaad98e2 Author: Ming Lei Date: Fri Mar 17 00:12:29 2017 +0800 block: introduce bio_copy_data_partial Turns out we can use bio_copy_data in raid1's write behind, and we can make alloc_behind_pages() more clean/efficient, but we need to partial version of bio_copy_data(). Signed-off-by: Ming Lei Reviewed-by: Jens Axboe Signed-off-by: Shaohua Li block/bio.c | 60 +++++++++++++++++++++++++++++++++++++++++------------ include/linux/bio.h | 2 ++ 2 files changed, 49 insertions(+), 13 deletions(-) commit 60928a91b0b3beca4a1cf2739118f967c783f79a Author: Ming Lei Date: Fri Mar 17 00:12:28 2017 +0800 md: raid1: use bio helper in process_checks() Avoid to direct access to bvec table. Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/raid1.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 44cf0f4dc76b5e44e6a9c727be6902434f99a9bd Author: Ming Lei Date: Fri Mar 17 00:12:27 2017 +0800 md: raid1: retrieve page from pre-allocated resync page array Now one page array is allocated for each resync bio, and we can retrieve page from this table directly. Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/raid1.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 98d30c5812c343c970b5997369b4f6b197c29b3d Author: Ming Lei Date: Fri Mar 17 00:12:26 2017 +0800 md: raid1: don't use bio's vec table to manage resync pages Now we allocate one page array for managing resync pages, instead of using bio's vec table to do that, and the old way is very hacky and won't work any more if multipage bvec is enabled. The introduced cost is that we need to allocate (128 + 16) * raid_disks bytes per r1_bio, and it is fine because the inflight r1_bio for resync shouldn't be much, as pointed by Shaohua. Also the bio_reset() in raid1_sync_request() is removed because all bios are freshly new now and not necessary to reset any more. This patch can be thought as a cleanup too Suggested-by: Shaohua Li Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/raid1.c | 93 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 64 insertions(+), 29 deletions(-) commit a7234234d0d6373d0510582ab632efbf73243403 Author: Ming Lei Date: Fri Mar 17 00:12:25 2017 +0800 md: raid1: simplify r1buf_pool_free() This patch gets each page's reference of each bio for resync, then r1buf_pool_free() gets simplified a lot. The same policy has been taken in raid10's buf pool allocation/free too. Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/raid1.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 513e2faa0138462ce014e1b0e226ca45c83bc6c1 Author: Ming Lei Date: Fri Mar 17 00:12:24 2017 +0800 md: prepare for managing resync I/O pages in clean way Now resync I/O use bio's bec table to manage pages, this way is very hacky, and may not work any more once multipage bvec is introduced. So introduce helpers and new data structure for managing resync I/O pages more cleanly. Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/md.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit d8e29fbc3bed181f2653fb89ac8c34e40db39c30 Author: Ming Lei Date: Fri Mar 17 00:12:23 2017 +0800 md: move two macros into md.h Both raid1 and raid10 share common resync block size and page count, so move them into md.h. Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/md.h | 5 +++++ drivers/md/raid1.c | 2 -- drivers/md/raid10.c | 3 --- 3 files changed, 5 insertions(+), 5 deletions(-) commit c85ba149de4bd14aa028ac824f9f12aeded28b86 Author: Ming Lei Date: Fri Mar 17 00:12:22 2017 +0800 md: raid1/raid10: don't handle failure of bio_add_page() All bio_add_page() is for adding one page into resync bio, which is big enough to hold RESYNC_PAGES pages, and the current bio_add_page() doesn't check queue limit any more, so it won't fail at all. remove unused label (shaohua) Signed-off-by: Ming Lei Signed-off-by: Shaohua Li drivers/md/raid1.c | 22 ++++++---------------- drivers/md/raid10.c | 41 ++++++++++------------------------------- 2 files changed, 16 insertions(+), 47 deletions(-) commit 38b06b9d00f7d4907fc18866ec766253aa34f1c6 Merge: d722bc9 346ab44 Author: Florian Fainelli Date: Fri Mar 24 10:14:50 2017 -0700 Merge tag 'bcm2835-maintainers-next-2017-03-21' into maintainers/next This pull request updates the MAINTAINERS file for BCM283x for 4.12. Signed-off-by: Florian Fainelli commit 1aaf0f47350ef912dd65d58cd94d4976b02e78c7 Merge: c1ae3cf 3c9d361 Author: Florian Fainelli Date: Fri Mar 24 10:14:14 2017 -0700 Merge tag 'bcm2835-defconfig-64-next-2017-03-21' into defconfig-arm64/next This pull request starts building the new SDHOST MMC driver on multi_v7_defconfig, so that we can switch to it by default in the following release. Signed-off-by: Florian Fainelli commit f880c8fd8cfb3bcb77a219c00de45ad0a8386d23 Merge: c1ae3cf 51a08de Author: Florian Fainelli Date: Fri Mar 24 10:13:25 2017 -0700 Merge tag 'bcm2835-defconfig-next-2017-03-21' into defconfig/next This pull request fixes graphics in bcm2835_defconfig by enabling CMA, and starts building the new SDHOST MMC driver on multi_v7_defconfig, so that we can switch to it by default in the following release. Signed-off-by: Florian Fainelli commit 414ce21ae20547e0eea72fe0c4e8ee3280d30888 Merge: 0f11736 7f31a95 Author: Florian Fainelli Date: Fri Mar 24 10:12:31 2017 -0700 Merge tag 'bcm2835-dt-next-2017-03-21' into devicetree/next This pull request brings in the DT nodes for enabling HDMI audio on Raspberry Pi, and nodes to describe the DSI and SDHOST hardware modules (which are still disabled by default). Signed-off-by: Florian Fainelli commit 6f9b850bec05ba8b08c504112808973259e41140 Author: Chris Wilson Date: Fri Mar 24 15:17:24 2017 +0000 drm/i915: Fix semaphore emission for BDW+ RCS ringbuffer emission The required number of dwords for semaphore emission on BDW RCS is 8, not 6 - leading to ring buffer corruption and immediate GPU hangs when using ringbuffer submission. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170324151724.32640-2-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e02d9d76bf4de91d6eddf73345c5e8a9ae5a5f9f Author: Chris Wilson Date: Fri Mar 24 15:17:23 2017 +0000 drm/i915: Disable MI_SET_CONTEXT psmi w/a for bdw The current w/a for the gen7 psmi related hangs doesn't apply to bdw, so disable it if using bdw ringbuffer submission. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170324151724.32640-1-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/i915_gem_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f631718de3ca24a9ae03595e937fe0b64cfaf456 Author: Steven Rostedt (VMware) Date: Fri Mar 3 13:43:34 2017 -0500 ftrace: Move ftrace_init() to right after memory initialization Initialize the ftrace records immediately after memory initialization, as that is all that is required for the records to be created. This will allow for future work to get function tracing started earlier in the boot process. Signed-off-by: Steven Rostedt (VMware) init/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e725c731e3bb1e892e7b564c945b121cb41d1087 Author: Steven Rostedt (VMware) Date: Fri Mar 3 13:37:33 2017 -0500 tracing: Split tracing initialization into two for early initialization Create an early_trace_init() function that will initialize the buffers and allow for ealier use of trace_printk(). This will also allow for future work to have function tracing start earlier at boot up. Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 2 ++ init/main.c | 5 ++++- kernel/trace/trace.c | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) commit 2e58cafa0bbde529a9f44300382f60f6ce46d7d2 Author: Johan Hovold Date: Fri Mar 24 16:25:34 2017 +0100 USB: core: fix up kerneldoc comment Make the kerneldoc comment for usb_find_common_endpoints_reverse() self-contained by adding a full description and removing the reference to usb_find_common_endpoints(). Reported-by: kbuild test robot Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/core/usb.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 5d64c120c046c287382373df52b9e6fc47e6367c Author: Daniele Ceraolo Spurio Date: Fri Mar 24 07:48:39 2017 -0700 drm/i915/guc: limit forcewake to blitter domain in guc_send The forcewake_get call in the guc_send_mmio function was added to avoid getting and releasing forcewake on each register access. While this makes sense, all GuC registers are in the blitter range so no need to wake all the wells. Signed-off-by: Daniele Ceraolo Spurio Link: http://patchwork.freedesktop.org/patch/msgid/1490366919-34715-1-git-send-email-daniele.ceraolospurio@intel.com Reviewed-by: Sagar Arun Kamble Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_uc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 565fbac18efef447a6a97325664c77ddcbe82936 Author: Andre Przywara Date: Fri Mar 24 00:20:02 2017 +0000 arm64: defconfig: add Allwinner USB PHY The arm64 defconfig covers the Allwinner A64 SoC boards quite well, but USB support is not enabled. Add the PHY config symbol to allow defconfig kernels to use USB. Signed-off-by: Andre Przywara Signed-off-by: Maxime Ripard arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit df46e6a4c06c89a728e59073517001510a63955b Author: Bartosz Golaszewski Date: Tue Mar 14 12:04:51 2017 +0100 ata: ahci: add support for DaVinci DM816 SATA controller This SATA controller is quite similar to the one present on the DA850 SoC, but the PHY configuration is different and it supports two HBA ports. The IP suffers from the same PMP issue the DA850 does - if we enable PMP but don't use it - softreset fails. Appropriate workaround was implemented in this driver as well. Signed-off-by: Bartosz Golaszewski Signed-off-by: Tejun Heo drivers/ata/Kconfig | 9 +++ drivers/ata/Makefile | 1 + drivers/ata/ahci_dm816.c | 200 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 210 insertions(+) commit 8f48cfabac57977338f5c828ed3e12fc34373c7d Author: Geliang Tang Date: Fri Mar 24 22:13:35 2017 +0800 cgroup: drop duplicate header nsproxy.h Drop duplicate header nsproxy.h from linux/cgroup.h. Signed-off-by: Geliang Tang Signed-off-by: Tejun Heo include/linux/cgroup.h | 1 - 1 file changed, 1 deletion(-) commit d3c68e0a7e34af2b86f5408c4d6e794a38bbd9e1 Author: Linus Walleij Date: Sun Mar 12 23:24:03 2017 +0100 PCI: faraday: Add Faraday Technology FTPCI100 PCI Host Bridge driver Add a host bridge driver for the Faraday Technology FPPCI100 host bridge, used for Cortina Systems Gemini SoC (SL3516) PCI Host Bridge. This code is inspired by the out-of-tree OpenWRT patch and then extensively rewritten for device tree and using the modern helpers to cut down and modernize the code to all new PCI frameworks. A driver exists in U-Boot as well. Tested on the ITian Square One SQ201 NAS with the following result in the boot log (trimmed to relevant parts): OF: PCI: host bridge /soc/pci@50000000 ranges: OF: PCI: IO 0x50000000..0x500fffff -> 0x00000000 OF: PCI: MEM 0x58000000..0x5fffffff -> 0x58000000 ftpci100 50000000.pci: PCI host bridge to bus 0000:00 pci_bus 0000:00: root bus resource [bus 00-ff] pci_bus 0000:00: root bus resource [io 0x0000-0xfffff] pci_bus 0000:00: root bus resource [mem 0x58000000-0x5fffffff] ftpci100 50000000.pci: DMA MEM1 BASE: 0x0000000000000000 -> 0x0000000007ffffff config 00070000 ftpci100 50000000.pci: DMA MEM2 BASE: 0x0000000000000000 -> 0x0000000003ffffff config 00060000 ftpci100 50000000.pci: DMA MEM3 BASE: 0x0000000000000000 -> 0x0000000003ffffff config 00060000 PCI: bus0: Fast back to back transfers disabled pci 0000:00:00.0: of_irq_parse_pci() failed with rc=-22 pci 0000:00:0c.0: BAR 0: assigned [mem 0x58000000-0x58007fff] pci 0000:00:09.2: BAR 0: assigned [mem 0x58008000-0x580080ff] pci 0000:00:09.0: BAR 4: assigned [io 0x1000-0x101f] pci 0000:00:09.1: BAR 4: assigned [io 0x1020-0x103f] pci 0000:00:09.0: enabling device (0140 -> 0141) pci 0000:00:09.0: HCRESET not completed yet! pci 0000:00:09.1: enabling device (0140 -> 0141) pci 0000:00:09.1: HCRESET not completed yet! pci 0000:00:09.2: enabling device (0140 -> 0142) rt61pci 0000:00:0c.0: enabling device (0140 -> 0142) ieee80211 phy0: rt2x00_set_chip: Info - Chipset detected - rt: 2561, rf: 0003, rev: 000c ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver ehci-pci: EHCI PCI platform driver ehci-pci 0000:00:09.2: EHCI Host Controller ehci-pci 0000:00:09.2: new USB bus registered, assigned bus number 1 ehci-pci 0000:00:09.2: irq 125, io mem 0x58008000 ehci-pci 0000:00:09.2: USB 2.0 started, EHCI 1.00 hub 1-0:1.0: USB hub found hub 1-0:1.0: 4 ports detected uhci_hcd: USB Universal Host Controller Interface driver uhci_hcd 0000:00:09.0: UHCI Host Controller uhci_hcd 0000:00:09.0: new USB bus registered, assigned bus number 2 uhci_hcd 0000:00:09.0: HCRESET not completed yet! uhci_hcd 0000:00:09.0: irq 123, io base 0x00001000 hub 2-0:1.0: USB hub found hub 2-0:1.0: config failed, hub doesn't have any ports! (err -19) uhci_hcd 0000:00:09.1: UHCI Host Controller uhci_hcd 0000:00:09.1: new USB bus registered, assigned bus number 3 uhci_hcd 0000:00:09.1: HCRESET not completed yet! uhci_hcd 0000:00:09.1: irq 124, io base 0x00001020 hub 3-0:1.0: USB hub found hub 3-0:1.0: config failed, hub doesn't have any ports! (err -19) scsi 0:0:0:0: Direct-Access USB Flash Disk 1.00 PQ: 0 ANSI: 2 sd 0:0:0:0: [sda] 7900336 512-byte logical blocks: (4.04 GB/3.77 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] No Caching mode page found sd 0:0:0:0: [sda] Assuming drive cache: write through sda: sda1 sda2 sda3 sd 0:0:0:0: [sda] Attached SCSI removable disk ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2561s.bin' ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.8 IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready $ lspci 00:00.0 Class 0600: 159b:4321 00:09.2 Class 0c03: 1106:3104 00:09.0 Class 0c03: 1106:3038 00:09.1 Class 0c03: 1106:3038 00:0c.0 Class 0280: 1814:0301 $ cat /proc/interrupts CPU0 123: 0 PCI 0 Edge uhci_hcd:usb2 124: 0 PCI 1 Edge uhci_hcd:usb3 125: 159 PCI 2 Edge ehci_hcd:usb1 126: 1082 PCI 3 Edge rt61pci $ cat /proc/iomem 50000000-500000ff : /soc/pci@50000000 58000000-5fffffff : Gemini PCI MEM 58000000-58007fff : 0000:00:0c.0 58000000-58007fff : 0000:00:0c.0 58008000-580080ff : 0000:00:09.2 58008000-580080ff : ehci_hcd The EHCI USB hub works fine; I can mount and manage files and the IRQs just keep ticking up. I can issue iwlist wlan0 scanning and see all the WLANs here. I don't have wpa_supplicant so have not tried connecting to them. [bhelgaas: fold in %pap change from Arnd Bergmann ] Signed-off-by: Linus Walleij Signed-off-by: Bjorn Helgaas CC: Janos Laube CC: Paulius Zaleckas CC: Hans Ulli Kroll CC: Florian Fainelli CC: Feng-Hsin Chiang CC: Greentime Hu drivers/pci/host/Kconfig | 6 + drivers/pci/host/Makefile | 1 + drivers/pci/host/pci-ftpci100.c | 562 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 569 insertions(+) commit 1f12d3c11f4952295070f56fba6095b896399007 Author: Linus Walleij Date: Sun Mar 12 23:23:52 2017 +0100 PCI: Add DT bindings for Faraday Technology PCI Host Bridge Add device tree bindings for the Faraday technology PCI Host Bridge. This IP is found in the Storlink/Storm/Cortina Gemini SoC platform. Signed-off-by: Linus Walleij Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring CC: Janos Laube CC: Paulius Zaleckas CC: Hans Ulli Kroll CC: Florian Fainelli CC: devicetree@vger.kernel.org CC: Feng-Hsin Chiang CC: Greentime Hu .../devicetree/bindings/pci/faraday,ftpci100.txt | 129 +++++++++++++++++++++ 1 file changed, 129 insertions(+) commit bd00e73ede5933322e01fc9b32e91d85826ac1c2 Author: Chris Wilson Date: Thu Mar 23 23:00:00 2017 +0000 drm/i915/guc: Refactor the retrieval of guc_process_desc Move the common "client->vaddr + client->proc_desc_offset" to its own function, __get_process_desc() to match the newly established pattern. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170323230000.20786-1-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/i915_guc_submission.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 350992348aaebeaef234bd89844de38902db9f59 Merge: a0b0285 3091ae7 Author: Linus Walleij Date: Fri Mar 24 16:17:04 2017 +0100 Merge tag 'sh-pfc-for-v4.12-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.12 - Fixes and cleanups. commit 2fa5ed7d87074268b5d29cdff6c4f81f51666885 Author: Janosch Frank Date: Wed Feb 8 08:59:56 2017 +0100 s390/mm: Remove double gaddr calculation when notifying ptep_notify and gmap_shadow_notify both need a guest address and therefore retrieve them from the available virtual host address. As they operate on the same guest address, we can calculate it once and then pass it on. As a gmap normally has more than one shadow gmap, we also do not recalculate for each of them any more. Signed-off-by: Janosch Frank Signed-off-by: Martin Schwidefsky arch/s390/mm/gmap.c | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) commit 64ca752dcbc018054bfea53b784d4c85d3ec896c Author: Sergey Senozhatsky Date: Sat Jan 21 19:47:29 2017 +0900 printk: use console_trylock() in console_cpu_notify() There is no need to always call blocking console_lock() in console_cpu_notify(), it's quite possible that console_sem can be locked by other CPU on the system, either already printing or soon to begin printing the messages. console_lock() in this case can simply block CPU hotplug for unknown period of time (console_unlock() is time unbound). Not that hotplug is very fast, but still, with other CPUs being online and doing printk() console_cpu_notify() can stuck. Use console_trylock() instead and opt-out if console_sem is already acquired from another CPU, since that CPU will do the printing for us. Link: http://lkml.kernel.org/r/20170121104729.8585-1-sergey.senozhatsky@gmail.com Cc: Steven Rostedt Cc: Andrew Morton Cc: Thomas Gleixner Cc: Sebastian Andrzej Siewior Cc: Ingo Molnar Cc: linux-kernel@vger.kernel.org Signed-off-by: Sergey Senozhatsky Signed-off-by: Petr Mladek kernel/printk/printk.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 414428c5da1c71986727c2fa5cdf1ed071e398d7 Author: Long Li Date: Thu Mar 23 14:58:32 2017 -0700 PCI: hv: Lock PCI bus on device eject A PCI_EJECT message can arrive at the same time we are calling pci_scan_child_bus() in the workqueue for the previous PCI_BUS_RELATIONS message or in create_root_hv_pci_bus(). In this case we could potentially modify the bus from multiple places. Properly lock the bus access. Thanks Dexuan Cui for pointing out the race condition in create_root_hv_pci_bus(). Reported-by: Xiaofeng Wang Signed-off-by: Long Li Signed-off-by: Bjorn Helgaas Acked-by: K. Y. Srinivasan drivers/pci/host/pci-hyperv.c | 4 ++++ 1 file changed, 4 insertions(+) commit d3a78d8bf759d8848339dcc367c4c1678b57a08b Author: Long Li Date: Thu Mar 23 14:58:10 2017 -0700 PCI: hv: Properly handle PCI bus remove hv_pci_devices_present() is called in hv_pci_remove() when we remove a PCI device from the host, e.g., by disabling SR-IOV on a device. In hv_pci_remove(), the bus is already removed before the call, so we don't need to rescan the bus in the workqueue scheduled from hv_pci_devices_present(). By introducing bus state hv_pcibus_removed, we can avoid this situation. Reported-by: Xiaofeng Wang Signed-off-by: Long Li Signed-off-by: Bjorn Helgaas Acked-by: K. Y. Srinivasan drivers/pci/host/pci-hyperv.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit d0c2c269a3ccf0bba4db6fbcfb56827d482b2755 Author: Finn Thain Date: Mon Mar 20 11:53:09 2017 +1100 drivers: Clean up duplicated email address My email address may be found in the git commit logs and in MAINTAINERS. Remove duplicate addresses so they won't have to be kept up-to-date. Signed-off-by: Finn Thain Signed-off-by: Jiri Kosina drivers/macintosh/via-macii.c | 2 +- drivers/scsi/mac_esp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0ba42a599fbf59a55c1ffedb980be3726c734433 Author: Masanari Iida Date: Tue Mar 7 20:48:02 2017 +0900 treewide: Fix typo in xml/driver-api/basics.xml This patch fix spelling typos found in Documentation/output/xml/driver-api/basics.xml. It is because the xml file was generated from comments in source, so I had to fix the comments. Signed-off-by: Masanari Iida Signed-off-by: Jiri Kosina include/linux/sched.h | 2 +- kernel/sched/fair.c | 2 +- kernel/time/hrtimer.c | 2 +- kernel/time/timer.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 3d2e03f8172ead69e0946b764cf43cde4a4f0e3e Author: Chijun Sima Date: Sun Feb 19 08:19:20 2017 +0000 tools/testing/selftests/powerpc: remove redundant CFLAGS in Makefile: "-Wall -O2 -Wall" -> "-O2 -Wall" There are repeated compiler flags "-Wall" in the Makefile. The redundant compiler flag appears to have been there from the introduction of the Makefile. Signed-off-by: Chijun Sima Signed-off-by: Jiri Kosina tools/testing/selftests/powerpc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fb95c69e71d751675a67b0f49fc95a2057b0998 Author: Geert Uytterhoeven Date: Fri Feb 17 16:41:03 2017 +0100 selftests/timers: Spelling s/privledges/privileges/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Jiri Kosina tools/testing/selftests/timers/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f84d8a3d8d809feec7c181b04c10a1ee0ce64e8b Author: Geert Uytterhoeven Date: Fri Feb 17 16:36:36 2017 +0100 HID: picoLCD: Spelling s/REPORT_WRTIE_MEMORY/REPORT_WRITE_MEMORY/ Signed-off-by: Geert Uytterhoeven Cc: Bruno Prémont Cc: linux-input@vger.kernel.org Signed-off-by: Jiri Kosina drivers/hid/hid-picolcd_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d17cc391f0951fe03f14bd3be751b4724b05d30 Author: Andrew F. Davis Date: Thu Jan 5 14:44:50 2017 -0600 net: phy: dp83848: Fix Typo Signed-off-by: Andrew F. Davis Signed-off-by: Jiri Kosina drivers/net/phy/dp83848.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2fae13124faadf08e597924b7d0e6c8a9a12681e Author: Andrew F. Davis Date: Thu Jan 5 14:44:49 2017 -0600 UBI: Fix typos Signed-off-by: Andrew F. Davis Signed-off-by: Jiri Kosina drivers/mtd/ubi/Kconfig | 2 +- drivers/mtd/ubi/io.c | 2 +- drivers/mtd/ubi/ubi.h | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) commit 12f54139d83250fe46e8cb5399ad16804c7aaf1e Author: Liu, Changcheng Date: Mon Dec 19 23:06:02 2016 +0800 Documentation: ftrace.txt: Correct nice value of 120 priority The nice value of 120 priority is 0. Signed-off-by: Liu Changcheng Signed-off-by: Jiri Kosina Documentation/trace/ftrace.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80ba72efdffb246af57365f334f4ee743d061953 Author: Keerthy Date: Thu Mar 9 13:35:59 2017 +0530 ARM: dts: OMAP4460: Thermal: Add slope and offset values Currently the slope and offset values for calculating the hot spot temperature of a particular thermal zone is part of driver data. Pass them here instead and obtain the values while of node parsing. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4460.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 5379c2dba0d496f18a523bb75e0e845e8487fa9f Author: Keerthy Date: Thu Mar 9 13:35:58 2017 +0530 ARM: dts: OMAP443x: Thermal: Add slope and offset values Currently the slope and offset values for calculating the hot spot temperature of a particular thermal zone is part of driver data. Pass them here instead and obtain the values while of node parsing. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap443x.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 257b1b7cbfbebcc4f3c0d80737ed0861b20e3f4b Author: Keerthy Date: Thu Mar 9 13:35:57 2017 +0530 ARM: dts: OMAP5: Thermal: Add slope and offset values Currently the slope and offset values for calculating the hot spot temperature of a particular thermal zone is part of driver data. Pass them here instead and obtain the values while of node parsing. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit fb51ae0a11799e985e867dc66eafe47ff6421f6b Author: Keerthy Date: Thu Mar 9 13:35:56 2017 +0530 ARM: dts: DRA7: Thermal: Add slope and offset values Currently the slope and offset values for calculating the hot spot temperature of a particular thermal zone is part of driver data. Pass them here instead and obtain the values while of node parsing. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 981a05478a1152f09b1eef9ef86b8554eb7adb8e Author: Peter Meerwald-Stadler Date: Fri Dec 16 14:23:36 2016 +0100 net: fec: Fix typo in error msg and comment Signed-off-by: Peter Meerwald-Stadler Cc: Fugang Duan Acked-by: Fugang Duan Signed-off-by: Jiri Kosina drivers/net/ethernet/freescale/fec_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a761d517bbb1ed223af10be37545ecc7ca859b72 Author: Keerthy Date: Thu Mar 9 13:35:55 2017 +0530 ARM: dts: omap3: Add cpu_thermal zone Add cpu_thermal zone. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-cpu-thermal.dtsi | 20 ++++++++++++++++++++ arch/arm/boot/dts/omap34xx.dtsi | 8 ++++++-- arch/arm/boot/dts/omap36xx.dtsi | 8 ++++++-- 3 files changed, 32 insertions(+), 4 deletions(-) commit 0a95160ed3bb934c0e583ecb00e0506064c00775 Author: Masanari Iida Date: Wed Nov 23 22:44:47 2016 +0900 treewide: Fix typos in printk This patch fix some spelling typos found in printk. [jkosina@suse.cz: drop arch/arm64/kernel/hibernate.c that was already in place] Signed-off-by: Masanari Iida Acked-by: Randy Dunlap Signed-off-by: Jiri Kosina drivers/gpu/drm/sti/sti_compositor.c | 2 +- drivers/media/dvb-frontends/horus3a.c | 2 +- drivers/media/platform/mtk-vpu/mtk_vpu.c | 2 +- drivers/misc/cxl/flash.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 2 +- drivers/pinctrl/pinctrl-amd.c | 2 +- drivers/scsi/snic/snic_scsi.c | 2 +- tools/perf/builtin-probe.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) commit 0a3ef9db64df90854d772e8343a14e044dc004bc Author: Geliang Tang Date: Fri Mar 24 22:15:13 2017 +0800 mg_disk: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Jens Axboe drivers/block/mg_disk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 68219bdf5f1d999e4bad09db0abbd9460bd93020 Author: Geliang Tang Date: Fri Mar 24 22:15:10 2017 +0800 block: floppy: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Jens Axboe drivers/block/floppy.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 796b40c6171456274b02447e1dbbea97456403fe Author: Geliang Tang Date: Thu Mar 23 21:16:30 2017 +0800 crypto: ixp4xx - Use sg_virt() Use sg_virt() instead of open-coding it. Signed-off-by: Geliang Tang Acked-by: David S. Miller Signed-off-by: Herbert Xu drivers/crypto/ixp4xx_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44068d5999d372b0034382530899df77d83c70e5 Author: Stephan Mueller Date: Wed Mar 22 15:26:36 2017 +0100 crypto: DRBG - initialize SGL only once An SGL to be initialized only once even when its buffers are written to several times. Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/drbg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0d8da104840ab4244fe122e5b25570aa13fb00c0 Author: Marcelo Cerri Date: Mon Mar 20 17:28:05 2017 -0300 crypto: testmgr - mark ctr(des3_ede) as fips_allowed 3DES is missing the fips_allowed flag for CTR mode. Signed-off-by: Marcelo Henrique Cerri Acked-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/testmgr.c | 1 + 1 file changed, 1 insertion(+) commit d64069ee1869b9f77eef0bf9dfceffee2bfd7692 Author: Arnd Bergmann Date: Mon Mar 20 13:39:16 2017 +0100 crypto: zip - add a cast for printing atomic64_t values kernelci.org reports a build-time regression on linux-next, with a harmless warning in x86 allmodconfig: drivers/crypto/cavium/zip/zip_main.c:489:18: warning: format '%ld' expects argument of type 'long int', but argument 7 has type 'long long int' [-Wformat=] drivers/crypto/cavium/zip/zip_main.c:489:18: warning: format '%ld' expects argument of type 'long int', but argument 6 has type 'long long int' [-Wformat=] drivers/crypto/cavium/zip/zip_main.c:489:18: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'long long int' [-Wformat=] The return type for atomic64_read() unfortunately differs between architectures, with some defining it as atomic_long_read() and others returning a 64-bit type explicitly. Fixing this in general would be nice, but also require changing other users of these functions, so the simpler workaround is to add a cast here that avoids the warnings on the default build. Fixes: 09ae5d37e093 ("crypto: zip - Add Compression/Decompression statistics") Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu drivers/crypto/cavium/zip/zip_main.c | 40 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) commit 0d13d8f26c4684a077b293b8a4615170253f842c Author: Dan Carpenter Date: Fri Mar 17 23:46:21 2017 +0300 crypto: zip - Memory corruption in zip_clear_stats() There is a typo here. It should be "stats" instead of "state". The impact is that we clear 224 bytes instead of 80 and we zero out memory that we shouldn't. Fixes: 09ae5d37e093 ("crypto: zip - Add Compression/Decompression statistics") Signed-off-by: Dan Carpenter Signed-off-by: Herbert Xu drivers/crypto/cavium/zip/zip_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 106d73340f46538d29547ac06271f55de0f4d14e Author: Krzysztof Kozlowski Date: Fri Mar 17 16:49:21 2017 +0200 crypto: s5p-sss - Document the struct s5p_aes_dev Add kernel-doc to s5p_aes_dev structure. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Herbert Xu drivers/crypto/s5p-sss.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit fb514b2d57eec3c9e1ddb7474f5faaf7fb71bf2e Author: Krzysztof Kozlowski Date: Fri Mar 17 16:49:20 2017 +0200 crypto: s5p-sss - Remove unused variant field from state container The driver uses type of device (variant) only during probe so there is no need to store it for later. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Herbert Xu drivers/crypto/s5p-sss.c | 3 --- 1 file changed, 3 deletions(-) commit 42d5c176b76e190a4a3e0dfeffdae661755955b6 Author: Krzysztof Kozlowski Date: Fri Mar 17 16:49:19 2017 +0200 crypto: s5p-sss - Close possible race for completed requests Driver is capable of handling only one request at a time and it stores it in its state container struct s5p_aes_dev. This stored request must be protected between concurrent invocations (e.g. completing current request and scheduling new one). Combination of lock and "busy" field is used for that purpose. When "busy" field is true, the driver will not accept new request thus it will not overwrite currently handled data. However commit 28b62b145868 ("crypto: s5p-sss - Fix spinlock recursion on LRW(AES)") moved some of the write to "busy" field out of a lock protected critical section. This might lead to potential race between completing current request and scheduling a new one. Effectively the request completion might try to operate on new crypto request. Cc: # v4.10.x Fixes: 28b62b145868 ("crypto: s5p-sss - Fix spinlock recursion on LRW(AES)") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Herbert Xu drivers/crypto/s5p-sss.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b189817cf7894e03fd3700acd923221d3007259e Author: Horia Geantă Date: Fri Mar 17 12:06:02 2017 +0200 crypto: caam/qi - add ablkcipher and authenc algorithms Add support to submit ablkcipher and authenc algorithms via the QI backend: -ablkcipher: cbc({aes,des,des3_ede}) ctr(aes), rfc3686(ctr(aes)) xts(aes) -authenc: authenc(hmac(md5),cbc({aes,des,des3_ede})) authenc(hmac(sha*),cbc({aes,des,des3_ede})) caam/qi being a new driver, let's wait some time to settle down without interfering with existing caam/jr driver. Accordingly, for now all caam/qi algorithms (caamalg_qi module) are marked to be of lower priority than caam/jr ones (caamalg module). Signed-off-by: Vakul Garg Signed-off-by: Alex Porosanu Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/Kconfig | 20 +- drivers/crypto/caam/Makefile | 1 + drivers/crypto/caam/caamalg.c | 9 +- drivers/crypto/caam/caamalg_desc.c | 77 +- drivers/crypto/caam/caamalg_desc.h | 15 +- drivers/crypto/caam/caamalg_qi.c | 2387 ++++++++++++++++++++++++++++++++++++ drivers/crypto/caam/sg_sw_qm.h | 108 ++ 7 files changed, 2601 insertions(+), 16 deletions(-) commit 67c2315def06c1ef18492b214686531e69682800 Author: Horia Geantă Date: Fri Mar 17 12:06:01 2017 +0200 crypto: caam - add Queue Interface (QI) backend support CAAM engine supports two interfaces for crypto job submission: -job ring interface - already existing caam/jr driver -Queue Interface (QI) - caam/qi driver added in current patch QI is present in CAAM engines found on DPAA platforms. QI gets its I/O (frame descriptors) from QMan (Queue Manager) queues. This patch adds a platform device for accessing CAAM's queue interface. The requests are submitted to CAAM using one frame queue per cryptographic context. Each crypto context has one shared descriptor. This shared descriptor is attached to frame queue associated with corresponding driver context using context_a. The driver hides the mechanics of FQ creation, initialisation from its applications. Each cryptographic context needs to be associated with driver context which houses the FQ to be used to transport the job to CAAM. The driver provides API for: (a) Context creation (b) Job submission (c) Context deletion (d) Congestion indication - whether path to/from CAAM is congested The driver supports affining its context to a particular CPU. This means that any responses from CAAM for the context in question would arrive at the given CPU. This helps in implementing one CPU per packet round trip in IPsec application. The driver processes CAAM responses under NAPI contexts. NAPI contexts are instantiated only on cores with affined portals since only cores having their own portal can receive responses from DQRR. The responses from CAAM for all cryptographic contexts ride on a fixed set of FQs. We use one response FQ per portal owning core. The response FQ is configured in each core's and thus portal's dedicated channel. This gives the flexibility to direct CAAM's responses for a crypto context on a given core. Signed-off-by: Vakul Garg Signed-off-by: Alex Porosanu Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/Makefile | 4 + drivers/crypto/caam/ctrl.c | 58 ++-- drivers/crypto/caam/intern.h | 24 ++ drivers/crypto/caam/qi.c | 805 +++++++++++++++++++++++++++++++++++++++++++ drivers/crypto/caam/qi.h | 201 +++++++++++ 5 files changed, 1064 insertions(+), 28 deletions(-) commit cd373691d262afea523f4ae6ebf3dee3a204c8a7 Author: Horia Geantă Date: Fri Mar 17 12:06:00 2017 +0200 crypto: caam - avoid double inclusion in desc_constr.h Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/desc_constr.h | 5 +++++ 1 file changed, 5 insertions(+) commit e5c748a5043b67be188a53286ce203d6c25cf090 Author: Horia Geantă Date: Fri Mar 17 12:05:59 2017 +0200 soc/qman: add macros needed by caam/qi driver A few other things need to be added in soc/qman, such that caam/qi won't open-code them. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu include/soc/fsl/qman.h | 2 ++ 1 file changed, 2 insertions(+) commit 8496272d8116295053139a5d309d59694902f043 Author: Horia Geantă Date: Fri Mar 17 12:05:58 2017 +0200 soc/qman: export non-programmable FQD fields query Export qman_query_fq_np() function and related structures. This will be needed in the caam/qi driver, where "queue empty" condition will be decided based on the frm_cnt. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/soc/fsl/qbman/qman.c | 4 +-- drivers/soc/fsl/qbman/qman_priv.h | 61 ----------------------------------- include/soc/fsl/qman.h | 68 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 63 deletions(-) commit 329d09089c473cd49e131dae1a292e319dc0d91a Author: Horia Geantă Date: Fri Mar 17 12:05:57 2017 +0200 soc/qman: add dedicated channel ID for CAAM Add and export the ID of the channel serviced by the CAAM (Cryptographic Acceleration and Assurance Module) DCP. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/soc/fsl/qbman/qman_ccsr.c | 6 +++++- include/soc/fsl/qman.h | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 1662e9319b999402d450a2dbaefc49752986a46b Author: Horia Geantă Date: Fri Mar 17 12:05:56 2017 +0200 soc/qman: export volatile dequeue related structs Since qman_volatile_dequeue() is already exported, move the related structures into the public header too. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/soc/fsl/qbman/qman_priv.h | 36 ------------------------------------ include/soc/fsl/qman.h | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 36 deletions(-) commit 3c7eb3cc8360736123a3139a1ec727d746de3252 Author: Jason A. Donenfeld Date: Thu Mar 16 15:18:57 2017 +0100 md5: remove from lib and only live in crypto The md5_transform function is no longer used any where in the tree, except for the crypto api's actual implementation of md5, so we can drop the function from lib and put it as a static function of the crypto file, where it belongs. There should be no new users of md5_transform, anyway, since there are more modern ways of doing what it once achieved. Signed-off-by: Jason A. Donenfeld Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu crypto/md5.c | 95 +++++++++++++++++++++++++++++++++++++++++++++- include/linux/cryptohash.h | 5 --- lib/Makefile | 2 +- lib/md5.c | 95 ---------------------------------------------- 4 files changed, 95 insertions(+), 102 deletions(-) commit fdb2726f4e61c5e3abc052f547d5a5f6c0dc5504 Author: Michael Davidson Date: Wed Mar 15 15:36:00 2017 -0700 crypto, x86: aesni - fix token pasting for clang aes_ctrby8_avx-x86_64.S uses the C preprocessor for token pasting of character sequences that are not valid preprocessor tokens. While this is allowed when preprocessing assembler files it exposes an incompatibilty between the clang and gcc preprocessors where clang does not strip leading white space from macro parameters, leading to the CONCAT(%xmm, i) macro expansion on line 96 resulting in a token with a space character embedded in it. While this could be resolved by deleting the offending space character, the assembler is perfectly capable of doing the token pasting correctly for itself so we can just get rid of the preprocessor macros. Signed-off-by: Michael Davidson Signed-off-by: Herbert Xu arch/x86/crypto/aes_ctrby8_avx-x86_64.S | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 36cf515b9bbe298e1ce7384620f0d4ec45ad3328 Author: Gary R Hook Date: Wed Mar 15 13:21:01 2017 -0500 crypto: ccp - Enable support for AES GCM on v5 CCPs A version 5 device provides the primitive commands required for AES GCM. This patch adds support for en/decryption. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/Makefile | 1 + drivers/crypto/ccp/ccp-crypto-aes-galois.c | 252 +++++++++++++++++++++++++++++ drivers/crypto/ccp/ccp-crypto-main.c | 12 ++ drivers/crypto/ccp/ccp-crypto.h | 14 ++ drivers/crypto/ccp/ccp-ops.c | 252 +++++++++++++++++++++++++++++ include/linux/ccp.h | 9 ++ 6 files changed, 540 insertions(+) commit 990672d48515ce09c76fcf1ceccee48b0dd1942b Author: Gary R Hook Date: Wed Mar 15 13:20:52 2017 -0500 crypto: ccp - Enable 3DES function on v5 CCPs Wire up support for Triple DES in ECB mode. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/Makefile | 1 + drivers/crypto/ccp/ccp-crypto-des3.c | 254 +++++++++++++++++++++++++++++++++++ drivers/crypto/ccp/ccp-crypto-main.c | 10 ++ drivers/crypto/ccp/ccp-crypto.h | 22 +++ drivers/crypto/ccp/ccp-dev-v3.c | 1 + drivers/crypto/ccp/ccp-dev-v5.c | 54 ++++++++ drivers/crypto/ccp/ccp-dev.h | 14 +- drivers/crypto/ccp/ccp-ops.c | 198 +++++++++++++++++++++++++++ include/linux/ccp.h | 57 +++++++- 9 files changed, 608 insertions(+), 3 deletions(-) commit ccebcf3f224a44ec8e9c5bfca9d8e5d29298a5a8 Author: Gary R Hook Date: Wed Mar 15 13:20:43 2017 -0500 crypto: ccp - Add SHA-2 384- and 512-bit support Incorporate 384-bit and 512-bit hashing for a version 5 CCP device Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-crypto-sha.c | 22 ++++++++++++ drivers/crypto/ccp/ccp-crypto.h | 8 +++-- drivers/crypto/ccp/ccp-ops.c | 72 +++++++++++++++++++++++++++++++++++++ include/linux/ccp.h | 2 ++ 4 files changed, 101 insertions(+), 3 deletions(-) commit 146c8688d99c574d9ff0af17eca51bbd6402a57f Author: Daniel Axtens Date: Wed Mar 15 23:37:37 2017 +1100 crypto: powerpc - Stress test for vpmsum implementations vpmsum implementations often don't kick in for short test vectors. This is a simple test module that does a configurable number of random tests, each up to 64kB and each with random offsets. Both CRC-T10DIF and CRC32C are tested. Cc: Anton Blanchard Signed-off-by: Daniel Axtens Signed-off-by: Herbert Xu arch/powerpc/crypto/Makefile | 1 + arch/powerpc/crypto/crc-vpmsum_test.c | 137 ++++++++++++++++++++++++++++++++++ crypto/Kconfig | 8 ++ 3 files changed, 146 insertions(+) commit b01df1c16c9a6f7a14f843d3ac6b9eef5a7bb17e Author: Daniel Axtens Date: Wed Mar 15 23:37:36 2017 +1100 crypto: powerpc - Add CRC-T10DIF acceleration T10DIF is a CRC16 used heavily in NVMe. It turns out we can accelerate it with a CRC32 library and a few little tricks. Provide the accelerator based the refactored CRC32 code. Cc: Anton Blanchard Thanks-to: Hong Bo Peng Signed-off-by: Daniel Axtens Signed-off-by: Herbert Xu arch/powerpc/crypto/Makefile | 2 + arch/powerpc/crypto/crct10dif-vpmsum_asm.S | 850 ++++++++++++++++++++++++++++ arch/powerpc/crypto/crct10dif-vpmsum_glue.c | 125 ++++ crypto/Kconfig | 9 + 4 files changed, 986 insertions(+) commit 08c7dd1bd4b3a59c0d57b3ce4fe5ba1a90123685 Author: Daniel Axtens Date: Wed Mar 15 23:37:35 2017 +1100 crypto: powerpc - Re-enable non-REFLECTed CRCs When CRC32c was included in the kernel, Anton ripped out the #ifdefs around reflected polynomials, because CRC32c is always reflected. However, not all CRCs use reflection so we'd like to make it optional. Restore the REFLECT parts from Anton's original CRC32 implementation (https://github.com/antonblanchard/crc32-vpmsum) That implementation is available under GPLv2+, so we're OK from a licensing point of view: https://github.com/antonblanchard/crc32-vpmsum/blob/master/LICENSE.TXT As CRC32c requires REFLECT, add that #define. Cc: Anton Blanchard Signed-off-by: Daniel Axtens Signed-off-by: Herbert Xu arch/powerpc/crypto/crc32-vpmsum_core.S | 31 ++++++++++++++++++++++++++++++- arch/powerpc/crypto/crc32c-vpmsum_asm.S | 1 + 2 files changed, 31 insertions(+), 1 deletion(-) commit de696a26435ae50f06fd913bc84e0bf602caee1f Author: Daniel Axtens Date: Wed Mar 15 23:37:34 2017 +1100 crypto: powerpc - Factor out the core CRC vpmsum algorithm The core nuts and bolts of the crc32c vpmsum algorithm will also work for a number of other CRC algorithms with different polynomials. Factor out the function into a new asm file. To handle multiple users of the function, a user simply provides constants, defines the name of their CRC function, and then #includes the core algorithm file. Cc: Anton Blanchard Signed-off-by: Daniel Axtens Signed-off-by: Herbert Xu arch/powerpc/crypto/crc32-vpmsum_core.S | 726 ++++++++++++++++++++++++++++++++ arch/powerpc/crypto/crc32c-vpmsum_asm.S | 714 +------------------------------ 2 files changed, 729 insertions(+), 711 deletions(-) commit 2e6d603e5163e6f32a8686744b4d53e8778957ba Merge: 28845b0 97da385 Author: Herbert Xu Date: Fri Mar 24 21:58:58 2017 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux Merging 4.11-rc3 to pick up md5 removal from /dev/random. commit f3e4559781bf0c393364baa6b772233088a711db Author: Arnd Bergmann Date: Thu Mar 23 16:18:51 2017 +0100 x86/syscalls/32: Ignore arch_prctl for other architectures sys_arch_prctl is only provided on x86, and there is no reason to add it elsewhere. However, including it on the 32-bit syscall table caused a warning for most configurations on non-x86: :1328:2: warning: #warning syscall arch_prctl not implemented [-Wcpp] This adds an exception to the syscall table checking script. Fixes: 79170fda313e ("x86/syscalls/32: Wire up arch_prctl on x86-32") Signed-off-by: Arnd Bergmann Cc: Kyle Huey Link: http://lkml.kernel.org/r/20170323151904.706286-1-arnd@arndb.de Signed-off-by: Thomas Gleixner scripts/checksyscalls.sh | 1 + 1 file changed, 1 insertion(+) commit 0e3cb6ee386f384a9131f0c7db52a0a961d2ded9 Author: Russell King Date: Fri Sep 2 12:05:56 2016 +0100 gpio: gpio-reg: add irq mapping for gpio-reg users Add support for mapping gpio-reg gpios to interrupts. This may be a non-linear mapping - some gpios in the register may not even have corresponding interrupts associated with them, so we need to pass an array. Signed-off-by: Russell King Signed-off-by: Linus Walleij drivers/gpio/gpio-reg.c | 25 +++++++++++++++++++++++-- include/linux/gpio/gpio-reg.h | 3 ++- 2 files changed, 25 insertions(+), 3 deletions(-) commit 380639c7cc786ec663e43eb3896ccf9172a46900 Author: Russell King Date: Wed Aug 31 08:49:44 2016 +0100 gpio: add generic single-register fixed-direction GPIO driver Add a simple, generic, single register fixed-direction GPIO driver. This is able to support a single register with a mixture of inputs and outputs. This is different from gpio-mmio and gpio-74xx-mmio: * gpio-mmio doesn't allow a fixed direction, it assumes there is always a direction register. * gpio-74xx-mmio only supports all-in or all-out setups * gpio-74xx-mmio is DT only, this needs to support legacy too * they don't double-read when getting the GPIO value, as required by some implementations that this driver supports * we need to always do 32-bit reads, which bgpio doesn't guarantee * the current output state may not be readable from the hardware register - reading may reflect input status but not output status. Signed-off-by: Russell King Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 6 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-reg.c | 164 ++++++++++++++++++++++++++++++++++++++++++ include/linux/gpio/gpio-reg.h | 12 ++++ 4 files changed, 183 insertions(+) commit c65d1fd350fa28de79e86e18ef73b902a67c791a Author: Russell King Date: Wed Aug 31 08:49:44 2016 +0100 gpio: sa1100: implement get_direction method Allow gpiolib to read back the current IO direction configuration by implementing the .get_direction callback. This, in part, allows debugfs to report the complete true hardware state rather than the software state. Signed-off-by: Russell King Signed-off-by: Linus Walleij drivers/gpio/gpio-sa1100.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 07242b248119a9388a67975aa7fae7c23afc7a07 Author: Russell King Date: Wed Aug 31 08:49:44 2016 +0100 gpio: sa1100: convert to use IO accessors Use IO accessors to access the SA1100 registers rather than accessing them directly. Signed-off-by: Russell King Signed-off-by: Linus Walleij drivers/gpio/gpio-sa1100.c | 199 ++++++++++++++++++++++++++++----------------- 1 file changed, 124 insertions(+), 75 deletions(-) commit 9dd4819ed58a7f1702d5ba737507d0fef96e68c8 Author: Russell King Date: Wed Aug 31 08:49:44 2016 +0100 gpio: sa1100: use sa11x0_gpio_set_wake() Use sa11x0_gpio_set_wake() to set the PWER register, as provided by Dmitry some time back. Signed-off-by: Russell King Signed-off-by: Linus Walleij drivers/gpio/gpio-sa1100.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit c3d4fb0fb41f4b5eafeee51173c14e50be12f839 Author: Philipp Zabel Date: Wed Mar 15 08:31:38 2017 -0300 [media] rc: sunxi-cir: simplify optional reset handling As of commit bb475230b8e5 ("reset: make optional functions really optional"), the reset framework API calls use NULL pointers to describe optional, non-present reset controls. This allows to return errors from devm_reset_control_get_optional and to call reset_control_(de)assert unconditionally. Signed-off-by: Philipp Zabel Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/sunxi-cir.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit ec6b0bd54e00beabfdf45d1f3aba8dfb79f52b53 Author: Philipp Zabel Date: Wed Mar 15 08:31:36 2017 -0300 [media] st_rc: simplify optional reset handling As of commit bb475230b8e5 ("reset: make optional functions really optional"), the reset framework API calls use NULL pointers to describe optional, non-present reset controls. This allows to return errors from reset_control_get_optional and to call reset_control_(de)assert unconditionally. Signed-off-by: Philipp Zabel Acked-by: Patrice Chotard Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/st_rc.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 03eb2a557ed552e920a0942b774aaf931596eec1 Author: Johan Hovold Date: Tue Mar 7 15:14:13 2017 -0300 [media] mceusb: fix NULL-deref at probe Make sure to check for the required out endpoint to avoid dereferencing a NULL-pointer in mce_request_packet should a malicious device lack such an endpoint. Note that this path is hit during probe. Fixes: 66e89522aff7 ("V4L/DVB: IR: add mceusb IR receiver driver") Cc: stable # 2.6.36 Signed-off-by: Johan Hovold Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/mceusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 74c839b2f5544fd77fdb34a99b577965d4812edf Author: Sean Young Date: Mon Jan 30 13:49:58 2017 -0200 [media] lirc: use refcounting for lirc devices If a lirc device is unplugged, the struct rc_dev is freed even though userspace can still have a file descriptor open on the lirc chardev. The rc_dev structure can be used in a subsequent, or even currently executing ioctl, read or write. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 120 +++++++++++++++++++------------------------- 1 file changed, 51 insertions(+), 69 deletions(-) commit 069f3b10aed966b2da6bb1161af41da0e8880724 Author: Sean Young Date: Mon Feb 13 20:53:23 2017 -0200 [media] serial_ir: iommap is a memory address, not bool This has been broken for a long time, so presumably it is not used. I have no hardware to test this on. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=61401 Fixes: 90ab5ee ("module_param: make bool parameters really bool") Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/serial_ir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b73bc16d08d9984c78c08b1b8e1bb17563dc10a9 Author: Sean Young Date: Sat Feb 11 20:33:38 2017 -0200 [media] mce_kbd: add encoder Split the protocol into two variants, one for keyboard and one for mouse data. Note that the mce_kbd protocol cannot be used on the igorplugusb, since the IR is too long. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/igorplugusb.c | 2 +- drivers/media/rc/ir-mce_kbd-decoder.c | 49 +++++++++++++++++++++- drivers/media/rc/rc-core-priv.h | 2 +- drivers/media/rc/rc-ir-raw.c | 6 +-- drivers/media/rc/rc-main.c | 8 +++- include/media/rc-map.h | 78 ++++++++++++++++++----------------- 6 files changed, 99 insertions(+), 46 deletions(-) commit e8f4818895b3d7f34b3e5852bce77b3257a27ecc Author: Sean Young Date: Wed Feb 8 20:48:17 2017 -0200 [media] lirc: advertise LIRC_CAN_GET_REC_RESOLUTION and improve This feature was never set. The ioctl should fail if no resolution is set. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-lirc-codec.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 7dc2df1476092e65d765a5a7f077ed4b85897f18 Author: Sean Young Date: Thu Feb 9 20:50:20 2017 -0200 [media] rc: lirc keymap no longer makes any sense The lirc keymap existed once upon a time to select the lirc protocol. Since '275ddb4 [media] rc-core: remove the LIRC "protocol"', IR is always passed to the lirc decoder so this keymap is no longer needed. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/keymaps/Makefile | 1 - drivers/media/rc/keymaps/rc-lirc.c | 42 -------------------------------------- drivers/media/rc/st_rc.c | 2 +- include/media/rc-map.h | 1 - 4 files changed, 1 insertion(+), 45 deletions(-) commit ee5310e66eab685fb42b3b585b00a92b67fb59d7 Author: Sean Young Date: Thu Jan 26 14:37:33 2017 -0200 [media] gpio-ir: do not allow a timeout of 0 According to the documentation, a timeout of 0 turns off timeouts, which is not the case. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/gpio-ir-recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea80fb6d08a0015badc9a8b8ab7e95eeeaa578b1 Author: Sean Young Date: Thu Jan 26 14:35:31 2017 -0200 [media] winbond: allow timeout to be set The drivers sets the hardware to idle when a timeout occurs. This can be any reasonable value. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/winbond-cir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bc989391ab08ef75602a82cacf4fabc9f12095e5 Author: Sean Young Date: Wed Feb 8 20:44:38 2017 -0200 [media] lirc: return ENOTTY when device does support ioctl If timeouts or carrier range is not supported, return proper error. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-lirc-codec.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d5bf739dc7628a35b334cdb9058750388927760a Author: Marek Szyprowski Date: Fri Mar 24 10:19:01 2017 +0100 iommu/exynos: Use smarter TLB flush method for v5 SYSMMU SYSMMU v5 has dedicated registers to perform TLB flush range operation, so use them instead of looping with FLUSH_ENTRY command. Signed-off-by: Marek Szyprowski Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit e75276638c1423d286e425fd29375e5736c7635c Author: Marek Szyprowski Date: Fri Mar 24 10:18:44 2017 +0100 iommu/exynos: Don't open-code loop unrolling IOMMU domain allocation is not performance critical operation, so remove hand made optimisation of unrolled initialization loop and leave this to the compiler. Signed-off-by: Marek Szyprowski Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 13f99ebdd602ebdafb909e15ec6ffb1e34690167 Author: Arnd Bergmann Date: Thu Mar 23 16:15:55 2017 +0100 ALSA: au88x0: avoid theoretical uninitialized access The latest gcc-7.0.1 snapshot points out that we if nr_ch is zero, we never initialize some variables: sound/pci/au88x0/au88x0_core.c: In function 'vortex_adb_allocroute': sound/pci/au88x0/au88x0_core.c:2304:68: error: 'mix[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized] sound/pci/au88x0/au88x0_core.c:2305:58: error: 'src[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized] I assume this can never happen in practice, but adding a check here doesn't hurt either and avoids the warning. The code has been unchanged since the start of git history. Signed-off-by: Arnd Bergmann Signed-off-by: Takashi Iwai sound/pci/au88x0/au88x0_core.c | 3 +++ 1 file changed, 3 insertions(+) commit 500cdb23d608cff2e0934aec8a4008e8e9577a47 Author: Alexandre TORGUE Date: Tue Jan 31 10:44:25 2017 +0100 ARM: dts: stm32: Add STM32H743 MCU and STM32H743i-EVAL board Add basic support for STM32H743 MCU and his eval board. The STMicrolectornics's STM32H743 MCU is based on Cortex-M7 core running up to @400MHz with 2MB internal flash and 1MB internal RAM. For more details see: Documentation/arm/stm32/stm32h743-overview.txt Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/stm32h743-pinctrl.dtsi | 156 +++++++++++++++++++++++++++++++ arch/arm/boot/dts/stm32h743.dtsi | 83 ++++++++++++++++ arch/arm/boot/dts/stm32h743i-eval.dts | 74 +++++++++++++++ 4 files changed, 315 insertions(+), 1 deletion(-) commit 5c8627586942b0269f81e3296dabe9f049815779 Author: Sean Young Date: Thu Jan 26 15:19:33 2017 -0200 [media] lirc: return ENOTTY when ioctl is not supported We shouldn't be using ENOSYS when a feature is not available. I've tested lirc; nothing is broken as far as I can make out. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-lirc-codec.c | 20 ++++++++++---------- drivers/media/rc/lirc_dev.c | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) commit a8b875a54990415603d180e0c4bf31ce7d876c3a Author: Sean Young Date: Wed Feb 8 15:10:30 2017 -0200 [media] lirc: document lirc modes better LIRC_MODE_MODE2 and LIRC_MODE_LIRCCODE were not covered at all. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab Documentation/media/lirc.h.rst.exceptions | 1 - Documentation/media/uapi/rc/lirc-dev-intro.rst | 53 +++++++++++++++++++--- Documentation/media/uapi/rc/lirc-get-features.rst | 13 ++++-- Documentation/media/uapi/rc/lirc-get-length.rst | 3 +- Documentation/media/uapi/rc/lirc-get-rec-mode.rst | 4 +- Documentation/media/uapi/rc/lirc-get-send-mode.rst | 7 ++- Documentation/media/uapi/rc/lirc-read.rst | 16 +++---- .../media/uapi/rc/lirc-set-rec-carrier-range.rst | 2 +- .../media/uapi/rc/lirc-set-rec-timeout-reports.rst | 2 + Documentation/media/uapi/rc/lirc-write.rst | 17 ++++--- 10 files changed, 82 insertions(+), 36 deletions(-) commit 5cd6522c5b1df51f22f3b83f5548989a64ab44f5 Author: Derek Robson Date: Fri Feb 10 22:42:38 2017 -0200 [media] staging: lirc: use octal instead of symbolic permission Changed permissions to octal across whole driver Found by checkpatch Signed-off-by: Derek Robson Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_sasem.c | 2 +- drivers/staging/media/lirc/lirc_sir.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 207c957d9e70d1eb8f98c028524dff3befc07f42 Author: Sean Young Date: Sat Feb 4 17:00:36 2017 -0200 [media] cxusb: dvico remotes are nec Adjust the keymap to use the correct nec scancodes, and adjust the rc driver to output the correct nec scancodes. Now the keymap can be used with any nec receiver, and the rc device should work with any nec keymap. Tested-by: Vincent McIntyre Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/keymaps/rc-dvico-mce.c | 92 ++++++++++++++-------------- drivers/media/rc/keymaps/rc-dvico-portable.c | 74 +++++++++++----------- drivers/media/usb/dvb-usb/cxusb.c | 24 ++++---- 3 files changed, 95 insertions(+), 95 deletions(-) commit c6ed0f31ce3e1c5729d1c8f81a2a94ab881506a6 Author: Alexandre TORGUE Date: Mon Jan 30 17:46:23 2017 +0100 ARM: stm32: Add a new SOC - STM32H743 The STM32H743 is a Cortex-M7 MCU running at 400MHz and containing 1MBytes internal RAM. Signed-off-by: Alexandre TORGUE Documentation/arm/stm32/stm32h743-overview.txt | 30 ++++++++++++++++++++++++++ arch/arm/mach-stm32/board-dt.c | 1 + 2 files changed, 31 insertions(+) commit 1fa9d67a2f07893fc7e4a880867a6cbb81dda547 Author: Steven Rostedt (VMware) Date: Thu Mar 23 10:33:53 2017 -0400 x86/ftrace: Use Makefile logic instead of #ifdef for compiling ftrace_*.o Currently ftrace_32.S and ftrace_64.S are compiled even when CONFIG_FUNCTION_TRACER is not set. This means there's an unnecessary #ifdef to protect the code. Instead of using preprocessor directives, only compile those files when FUNCTION_TRACER is defined. Suggested-by: Josh Poimboeuf Signed-off-by: Steven Rostedt (VMware) Reviewed-by: Josh Poimboeuf Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Linus Torvalds Link: http://lkml.kernel.org/r/20170316210043.peycxdxktwwn6cid@treble Link: http://lkml.kernel.org/r/20170323143446.217684991@goodmis.org Signed-off-by: Thomas Gleixner arch/x86/kernel/Makefile | 4 ++-- arch/x86/kernel/ftrace_32.S | 3 --- arch/x86/kernel/ftrace_64.S | 4 ---- 3 files changed, 2 insertions(+), 9 deletions(-) commit 644e0e8dc76b919976c44d3929164d42cbe656bc Author: Steven Rostedt (VMware) Date: Thu Mar 23 10:33:52 2017 -0400 x86/ftrace: Add -mfentry support to x86_32 with DYNAMIC_FTRACE set x86_64 has had fentry support for some time. I did not add support to x86_32 as I was unsure if it will be used much in the future. It is still very much used, and there's issues with function graph tracing with gcc playing around with the mcount frames, causing function graph to panic. The fentry code does not have this issue, and is able to cope as there is no frame to mess up. Note, this only adds support for fentry when DYNAMIC_FTRACE is set. There's really no reason to not have that set, because the performance of the machine drops significantly when it's not enabled. Keep !DYNAMIC_FTRACE around to test it off, as there's still some archs that have FTRACE but not DYNAMIC_FTRACE. Signed-off-by: Steven Rostedt (VMware) Reviewed-by: Masami Hiramatsu Reviewed-by: Josh Poimboeuf Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Andrew Morton Cc: Linus Torvalds Link: http://lkml.kernel.org/r/20170323143446.052202377@goodmis.org Signed-off-by: Thomas Gleixner arch/x86/Kconfig | 2 +- arch/x86/kernel/ftrace_32.S | 82 +++++++++++++++++++++++++++++++++++++++------ 2 files changed, 73 insertions(+), 11 deletions(-) commit ff04b440d2d645fd8a5b3385b1b2e4d19d3fe746 Author: Steven Rostedt (VMware) Date: Thu Mar 23 10:33:51 2017 -0400 x86/ftrace: Clean up ftrace_regs_caller When ftrace_regs_caller was created, it was designed to preserve flags as much as possible as it needed to act just like a breakpoint triggered on the same location. But the design is over complicated as it treated all operations as modifying flags. But push, mov and lea do not modify flags. This means the code can become more simplified by allowing flags to be stored further down. Making ftrace_regs_caller simpler will also be useful in implementing fentry logic. Suggested-by: Linus Torvalds Signed-off-by: Steven Rostedt (VMware) Reviewed-by: Masami Hiramatsu Reviewed-by: Josh Poimboeuf Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Andrew Morton Link: http://lkml.kernel.org/r/20170316135328.36123c3e@gandalf.local.home Link: http://lkml.kernel.org/r/20170323143445.917292592@goodmis.org Signed-off-by: Thomas Gleixner arch/x86/kernel/ftrace_32.S | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) commit e6928e58d4d4a02f88838945f792c107623314ac Author: Steven Rostedt (VMware) Date: Thu Mar 23 10:33:50 2017 -0400 x86/ftrace: Add stack frame pointer to ftrace_caller The function hook ftrace_caller does not create its own stack frame, and this causes the ftrace stack trace to miss the first function when doing stack traces. # echo schedule:stacktrace > /sys/kernel/tracing/set_ftrace_filter Before: -0 [002] .N.. 29.865807: => cpu_startup_entry => start_secondary => startup_32_smp <...>-7 [001] .... 29.866509: => kthread => ret_from_fork <...>-1 [000] .... 29.865377: => poll_schedule_timeout => do_select => core_sys_select => SyS_select => do_fast_syscall_32 => entry_SYSENTER_32 After: -0 [002] .N.. 31.234853: => do_idle => cpu_startup_entry => start_secondary => startup_32_smp <...>-7 [003] .... 31.235140: => rcu_gp_kthread => kthread => ret_from_fork <...>-1819 [000] .... 31.264172: => schedule_hrtimeout_range => poll_schedule_timeout => do_sys_poll => SyS_ppoll => do_fast_syscall_32 => entry_SYSENTER_32 Signed-off-by: Steven Rostedt (VMware) Reviewed-by: Josh Poimboeuf Reviewed-by: Masami Hiramatsu Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Andrew Morton Cc: Linus Torvalds Link: http://lkml.kernel.org/r/20170323143445.771707773@goodmis.org Signed-off-by: Thomas Gleixner arch/x86/kernel/ftrace_32.S | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 3d82c59c6e3cb168284d9b0a1143415d9c98ae40 Author: Steven Rostedt (VMware) Date: Thu Mar 23 10:33:49 2017 -0400 x86/ftrace: Move the ftrace specific code out of entry_32.S The function tracing hook code for ftrace is not an entry point from userspace and does not belong in the entry_*.S files. It has already been moved out of entry_64.S. Move it out of entry_32.S into its own ftrace_32.S file. Signed-off-by: Steven Rostedt (VMware) Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Masami Hiramatsu Cc: Josh Poimboeuf Cc: Andrew Morton Cc: Linus Torvalds Link: http://lkml.kernel.org/r/20170323143445.645218946@goodmis.org Signed-off-by: Thomas Gleixner arch/x86/entry/entry_32.S | 169 ------------------------------------------ arch/x86/kernel/Makefile | 1 + arch/x86/kernel/ftrace_32.S | 175 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 176 insertions(+), 169 deletions(-) commit db65d7b6dcd313ad54c3589813f70b805dbb48ec Author: Steven Rostedt (VMware) Date: Thu Mar 23 10:33:48 2017 -0400 x86/ftrace: Rename mcount_64.S to ftrace_64.S With the advent of -mfentry that uses the new "fentry" hook over mcount, the mcount name is obsolete. Having the code file that ftrace hooks into called "mcount*.S" is rather misleading. Rename it to ftrace_64.S and remove the file name reference. Signed-off-by: Steven Rostedt (VMware) Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Masami Hiramatsu Cc: Josh Poimboeuf Cc: Andrew Morton Cc: Linus Torvalds Link: http://lkml.kernel.org/r/20170323143445.490601451@goodmis.org Signed-off-by: Thomas Gleixner arch/x86/kernel/Makefile | 4 +- arch/x86/kernel/ftrace_64.S | 336 +++++++++++++++++++++++++++++++++++++++++++ arch/x86/kernel/mcount_64.S | 338 -------------------------------------------- 3 files changed, 338 insertions(+), 340 deletions(-) commit c5d664aa5a4c4b257a54eb35045031630d105f49 Author: Masahiro Yamada Date: Thu Mar 23 09:17:50 2017 +0900 mtd: nand: do not check R/B# for CMD_SET_FEATURES in nand_command(_lp) Set Features (0xEF) command toggles the R/B# pin after 4 sub feature parameters are written. Currently, nand_command(_lp) calls chip->dev_ready immediately after the address cycle because NAND_CMD_SET_FEATURES falls into default: label. No wait is needed at this point. If you see nand_onfi_set_features(), R/B# is already cared by the chip->waitfunc call. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 2 ++ 1 file changed, 2 insertions(+) commit 3158fa0e739615769cc047d2428f30f4c3b6640e Author: Masahiro Yamada Date: Thu Mar 23 09:17:49 2017 +0900 mtd: nand: do not check R/B# for CMD_READID in nand_command(_lp) Read ID (0x90) command does not toggle the R/B# pin. Without this patch, NAND_CMD_READID falls into the default: label, then R/B# is checked by chip->dev_ready(). Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 2 ++ 1 file changed, 2 insertions(+) commit e30b46909bdf3ac8699a47cfd64b44fabc29f253 Author: Masahiro Yamada Date: Thu Mar 23 05:07:08 2017 +0900 mtd: nand: denali: use int where no reason to use fixed width variable The page number is generally stored in an integer type variable. The uint16_t does not have enough width. I see no reason to use uint32_t for other members, either. Just use int. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit be72a4aa8ec1c13a55708bd0285106a5020ff72f Author: Masahiro Yamada Date: Thu Mar 23 05:07:07 2017 +0900 mtd: nand: denali: introduce capability flag The Denali NAND controller IP has various customizable features. SoC vendors can choose desired functions when a delivery RTL is created. It means there are several variants for this IP. For example, the Intel version is equipped with 32bit DMA, whereas the IP for UniPhier SoC family with 64bit DMA. This driver was originally written for some Intel platforms with Intel specific things hard-coded. What is worse, the revision register of this IP does not work to distinguish such features. We need to do something to make the driver available for other SoCs. Let's introduce a caps member to the denali_nand_info structure to switch on/off various features. Also, add struct denali_dt_data to store the capability associated with compatible string. Boris suggested this approach in discussion [1] instead of a new DT property for every feature. [1] https://lkml.org/lkml/2016/3/29/142 Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.h | 1 + drivers/mtd/nand/denali_dt.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) commit 1aded58a27f253f399dcd5746417e684c92ccd7d Author: Masahiro Yamada Date: Thu Mar 23 05:07:06 2017 +0900 mtd: nand: denali: consolidate INTR_STATUS__* and INTR_EN__* macros The interrupts are enabled by INTR_EN register, then asserted interrupts can be observed via INTR_STATUS register. The bit fields are identical between INTR_EN and INTR_STATUS, so we can merge the bit field macros. Likewise for DATA_INTR. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 56 ++++++++++++++++++++----------------------- drivers/mtd/nand/denali.h | 61 ++++++++++++++--------------------------------- 2 files changed, 44 insertions(+), 73 deletions(-) commit 60ca41f1d9ccf8b57f4ba05d8e8102658a36ef3b Author: Masahiro Yamada Date: Thu Mar 23 05:07:05 2017 +0900 mtd: nand: denali: fix comment of denali_nand_info::flash_mem The same comment "Mapped io reg base address" for flash_reg and flash_mem probably due to the mistake of copy-paste work. Of course, the latter is not the register base address. Reword the comments using the terminology in the Denali User's Guide. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 264a7cabb80e8e9f75cee5cecdf0ed45839c4566 Author: Masahiro Yamada Date: Thu Mar 23 05:07:04 2017 +0900 mtd: nand: denali: remove more unused struct members These members are not used at all. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.h | 2 -- 1 file changed, 2 deletions(-) commit 6b2fc9d495aeaad4116827fc21433c85f82a134a Author: Masahiro Yamada Date: Thu Mar 23 05:07:03 2017 +0900 mtd: nand: denali: remove redundant define of BANK(x) This macro is defined twice in denali.c (around line 98 and line 651), so remove the second one. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 1 - 1 file changed, 1 deletion(-) commit 357cc408a4009c0d118b684e4865f85694ebc68c Author: Masahiro Yamada Date: Thu Mar 23 05:07:02 2017 +0900 mtd: nand: denali: remove unused CONFIG option and macros All of these macros are not used at all. CONFIG_MTD_NAND_DENALI_SCRATCH_REG_ADDR is not used for anything but defining SCRATCH_REG_ADDR. The config option should go away as well. I am removing some register macros. They are not used, and do not exist in recent IP versions. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/Kconfig | 11 ------ drivers/mtd/nand/denali.c | 5 --- drivers/mtd/nand/denali.h | 99 ----------------------------------------------- 3 files changed, 115 deletions(-) commit c120e75e0e7deff88119376298342df139b9b17c Author: Masahiro Yamada Date: Thu Mar 23 05:07:01 2017 +0900 mtd: nand: use read_oob() instead of cmdfunc() for bad block check The nand_default_block_markbad() and scan_block_fast() use high level APIs to get access to the BBM. On the other hand, nand_block_bad (the default implementation of ->block_bad) calls the lower level ->cmdfunc hook. This prevents drivers from using ->ecc.read_oob() even if optimized read operation is implemented. Besides, some NAND controllers may protect the BBM with ECC. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) commit 0cad7f71b5be7f3c6b63cfccb881e65a3c09404d Author: Daniel Vetter Date: Wed Mar 22 21:54:01 2017 +0100 drm/debugfs: Add kerneldoc I've decided to not document drm_debugfs_remove_files, it's on the way out. The biggest part is a huge todo.rst entry with what all should be improved. v2: Nits from Gabriel. Cc: Gabriel Krisman Bertazi Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322205401.24897-1-daniel.vetter@ffwll.ch Documentation/gpu/drm-uapi.rst | 9 ++++++++ Documentation/gpu/todo.rst | 26 +++++++++++++++++++++ drivers/gpu/drm/drm_debugfs.c | 51 ++++++------------------------------------ drivers/gpu/drm/drm_internal.h | 2 +- include/drm/drm_debugfs.h | 38 +++++++++++++++++++++++++------ 5 files changed, 74 insertions(+), 52 deletions(-) commit 760f71e72eb5c64b12d85d4e6dc79d28a708e09e Author: Daniel Vetter Date: Wed Mar 22 09:36:04 2017 +0100 drm: document driver interface for CRC capturing This was missed in Tomeu's patch. Also remove the kerneldoc for the internal function, we don't document that in general. While at it word-smith the docs slightly for more clarity. Cc: Tomeu Vizoso Reviewed-by: Tomeu Vizoso Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322083617.13361-4-daniel.vetter@ffwll.ch Documentation/gpu/drm-uapi.rst | 3 +++ drivers/gpu/drm/drm_debugfs_crc.c | 17 ++++++----------- include/drm/drm_crtc.h | 5 ++++- 3 files changed, 13 insertions(+), 12 deletions(-) commit 4834442d70befd57a5a7420944f42899df2cf807 Author: Daniel Vetter Date: Wed Mar 22 21:53:36 2017 +0100 drm: Extract drm_debugfs.h Doc polish will follow in the next patch. v2: Put the include guard #endif at the end (Ville). Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322205336.24549-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_debugfs.c | 5 ++- include/drm/drmP.h | 44 +------------------------ include/drm/drm_debugfs.h | 77 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 44 deletions(-) commit 91faa0478b5921c638853db54c89a3859c742556 Author: Daniel Vetter Date: Wed Mar 22 09:36:02 2017 +0100 drm: drop extern from function decls It's the default storage class for functions, entirely redundant. And a lot of these headers are a bit inconsistent due to organically grown. Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322083617.13361-2-daniel.vetter@ffwll.ch include/drm/drm_crtc_helper.h | 38 +++++++++++++++++++------------------- include/drm/drm_drv.h | 4 ++-- include/drm/drm_global.h | 8 ++++---- include/drm/drm_hashtab.h | 20 ++++++++++---------- include/drm/drm_of.h | 24 ++++++++++++------------ include/drm/drm_pci.h | 22 +++++++++++----------- include/drm/drm_plane.h | 20 ++++++++++---------- include/drm/drm_prime.h | 30 +++++++++++++++--------------- include/drm/drm_sysfs.h | 4 ++-- 9 files changed, 85 insertions(+), 85 deletions(-) commit 1e2f0169df04b2e25fe6f3cec3c1f9a80ff8da44 Author: Alexandre TORGUE Date: Mon Jan 30 17:49:02 2017 +0100 ARM: stm32: Introduce MACH_STM32H743 flag This patch introduces the MACH_STM32H743 to make possible to only select STM32H743 pinctrl driver By default, all the MACH_STM32Fxxx flags will be set with STM32 defconfig. Signed-off-by: Alexandre TORGUE arch/arm/mach-stm32/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) commit bcb84fb4d606ef8a0c2c276551bc81f6d2381898 Author: Alexandre TORGUE Date: Mon Jan 30 17:33:13 2017 +0100 ARM: stm32: create dedicated kconfig for STM32 machine Create a dedicated Kconfig file in mach-stm32/ and move existing stm32 configs inside. Signed-off-by: Alexandre TORGUE arch/arm/Kconfig | 24 ++---------------------- arch/arm/mach-stm32/Kconfig | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 22 deletions(-) commit 9fe4b66efb77fec71a9c11de58e5e51c5c826190 Author: Masahiro Yamada Date: Thu Mar 23 05:07:00 2017 +0900 mtd: nand: allow to set only one of ECC size and ECC strength from DT Currently, it is valid to specify both "nand-ecc-step-size" and "nand-ecc-strength", but not allowed to set only one of them. This requirement has a conflict with "nand-ecc-maximize"; this flag is used when you want the driver to choose the best ECC strength. If "nand-ecc-maximize" is set, "nand-ecc-strength" is very likely to be unset. It would be possible to make the if-conditional more complex by adding the check for the NAND_ECC_MAXIMIZE flag, but I chose to drop the check entirely. I thought of the situation where the hardware has a fixed ECC step size (so it can be hard-coded in the driver), whereas the ECC strength is configurable by software. In that case, we may want to only set "nand-ecc-strength" (or "nand-ecc-maximize") in DT. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 6 ------ 1 file changed, 6 deletions(-) commit f006aaf7b11230e38a35f09d706e751fa77eb799 Author: Shawn Guo Date: Thu Jan 19 22:45:23 2017 +0800 arm64: dts: zte: add tvenc device for zx296718 It adds VOU tvenc device in zx296718.dtsi, so that boards with TV connector can enable the support by changing 'status' in board DTS file. Signed-off-by: Shawn Guo arch/arm64/boot/dts/zte/zx296718.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 25bd9d5e2822a504481089933bbb8ba98c96199f Author: Shawn Guo Date: Thu Sep 22 19:48:39 2016 +0800 arm64: dts: zte: add vou and hdmi devices for zx296718 It adds VOU DPC device and enables HDMI support, which includes both display and audio through SPDIF interface. Signed-off-by: Shawn Guo arch/arm64/boot/dts/zte/zx296718-evb.dts | 20 ++++++++++++++ arch/arm64/boot/dts/zte/zx296718.dtsi | 46 ++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) commit 25798d52b87d7c7d775dc7985817592f0ef3dffd Author: Jun Nie Date: Tue Mar 21 16:52:59 2017 +0800 arm64: dts: zte: add mmc devices for zx296718 Add three mmc devices for zx296718 SoC, and enable the SD and eMMMC on zx296718-evb board. Signed-off-by: Jun Nie Signed-off-by: Shawn Guo arch/arm64/boot/dts/zte/zx296718-evb.dts | 8 ++++ arch/arm64/boot/dts/zte/zx296718.dtsi | 66 ++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) commit 6d7e05ab8ff6f6bb91ecfbbd542240c7b6c23502 Author: Shawn Guo Date: Tue Mar 21 16:42:45 2017 +0800 arm64: dts: zte: remove zx296718 pll_vga clock Rather than a fixed rate clock, pll_vga is a PLL can be programmed into different freqencies. Let's drop it from device tree and get it registered from clock driver. Signed-off-by: Shawn Guo arch/arm64/boot/dts/zte/zx296718.dtsi | 7 ------- 1 file changed, 7 deletions(-) commit 3932197c01e4ca7d743d07728656d938f1ae93d5 Author: Chris Brandt Date: Thu Feb 9 08:38:03 2017 -0500 ARM: dts: r7s72100: add power-domains to sdhi Reported-by: Geert Uytterhoeven Signed-off-by: Chris Brandt Fixes: 66474697923c ("ARM: dts: r7s72100: add sdhi to device tree") Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit e1b0048e18d4637603cf6f43b9b24345abdeec5c Author: Alexey Dobriyan Date: Fri Mar 24 02:07:50 2017 +0300 xfrm: use "unsigned int" in addr_match() x86_64 is zero-extending arch so "unsigned int" is preferred over "int" for address calculations and extending to size_t. Space savings: add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-24 (-24) function old new delta xfrm_state_walk 708 696 -12 xfrm_selector_match 918 906 -12 Signed-off-by: Alexey Dobriyan Signed-off-by: Steffen Klassert include/net/xfrm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d7f6946630bc324b9d791bee6dc41ff0d9469b0b Author: Alexey Dobriyan Date: Fri Mar 24 01:53:09 2017 +0300 xfrm: use "unsigned int" in __xfrm6_pref_hash() x86_64 is zero-extending arch so "unsigned int" is preferred over "int" for address calculations. Space savings: add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-58 (-58) function old new delta xfrm_hash_resize 2752 2743 -9 policy_hash_bysel 985 973 -12 policy_hash_direct 1036 999 -37 Signed-off-by: Alexey Dobriyan Signed-off-by: Steffen Klassert net/xfrm/xfrm_hash.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1560875600b8aa88ff0f55f827a7741c026795ee Author: Alexey Dobriyan Date: Fri Mar 24 01:29:40 2017 +0300 xfrm: remove unused struct xfrm_mgr::id Signed-off-by: Alexey Dobriyan Signed-off-by: Steffen Klassert include/net/xfrm.h | 1 - net/key/af_key.c | 1 - net/xfrm/xfrm_user.c | 1 - 3 files changed, 3 deletions(-) commit 3560741e316b3ea52cfb27901ae284921445180f Author: Zhilong Liu Date: Wed Mar 15 16:14:53 2017 +0800 md: fix several trivial typos in comments Signed-off-by: Zhilong Liu Signed-off-by: Shaohua Li drivers/md/bitmap.c | 2 +- drivers/md/raid5.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit bd01f064af2a5de4293c5401e01de5a6f951f4a5 Author: Dong Aisheng Date: Thu Mar 23 12:53:25 2017 +0800 soc: imx: gpc: remove unnecessary readable_reg callback It is not really necessary to provide the current .readable_reg implementation as we know what we're doing in our driver and the regmap core has already done the partial check for available maximum regs. Acked-by: Lucas Stach Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo drivers/soc/imx/gpc.c | 8 -------- 1 file changed, 8 deletions(-) commit ff693a3f2d2624016a59a0ae07cebcb7235a2426 Author: Dong Aisheng Date: Thu Mar 23 12:53:24 2017 +0800 dt-bindings: imx-gpc: correct the DOMAIN_INDEX using Actually DOMAIN_INDEX is not used by the client devices to refer to the power domain, it uses phandle. Corrent the binding doc a bit to avoid confusing. Reviewed-by: Lucas Stach Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo Documentation/devicetree/bindings/power/fsl,imx-gpc.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fbb0b4402a7132cd11cc3e63b12f543654bd1785 Author: Dong Aisheng Date: Thu Mar 23 12:53:23 2017 +0800 soc: imx: gpc: keep PGC_X_CTRL name align with reference manual Instead of GPC_PGC_PDN_OFFS, naming it as GPC_PGC_CTRL_OFFS which is defined in reference manual for better reading. Reviewed-by: Lucas Stach Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo drivers/soc/imx/gpc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6e6e339cc185fdd27d476764637b5b3b6738cf04 Author: Dong Aisheng Date: Thu Mar 23 12:53:22 2017 +0800 soc: imx: gpc: fix comment when power up domain The correct comment should be power up domain. Reviewed-by: Lucas Stach Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo drivers/soc/imx/gpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27f26a0f3767b6688b9a88b9becb6f8e760421f3 Author: Guoqing Jiang Date: Mon Mar 20 17:46:04 2017 +0800 md/raid10: refactor some codes from raid10_write_request Previously, we clone both bio and repl_bio in raid10_write_request, then add the cloned bio to plug->pending or conf->pending_bio_list based on plug or not, and most of the logics are same for the two conditions. So introduce raid10_write_one_disk for it, and use replacement parameter to distinguish the difference. No functional changes in the patch. Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/raid10.c | 175 ++++++++++++++++++++++------------------------------ 1 file changed, 75 insertions(+), 100 deletions(-) commit 5a42d1198901a13ff46e1d13b91a338d74224dbe Author: Dong Aisheng Date: Thu Mar 23 12:53:21 2017 +0800 soc: imx: gpc: fix imx6sl gpc power domain regression Commit 721cabf6c660 ("soc: imx: move PGC handling to a new GPC driver") broke the MX6SL GPC power domain support. It always got the following error: [ 1.248364] imx-gpc 20dc000.gpc: could not find pgc DT node This patch adds back the legecy support. Fixes: 721cabf6c660 ("soc: imx: move PGC handling to a new GPC driver") Signed-off-by: Dong Aisheng Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo drivers/soc/imx/gpc.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 15c3de4e188b567ab60dbff674002a7f4380af6a Author: Dong Aisheng Date: Thu Mar 23 12:53:20 2017 +0800 soc: imx: gpc: fix domain_index sanity check issue ARRAY_SIZE(imx_gpc_domains) represents all power domains supported by different SoCs. Driver should use SoC specific of_id_data->num_domains instead to do power domain index sanity check. e.g. MX6Q supports two power domains while MX6SL supports three. Fixes: 721cabf6c660 ("soc: imx: move PGC handling to a new GPC driver") Acked-by: Lucas Stach Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo drivers/soc/imx/gpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a317f523570adfc9c5bf6d65dc4f831dada97b9 Author: Dong Aisheng Date: Thu Mar 23 12:53:19 2017 +0800 soc: imx: gpc: fix the wrong using of regmap cache Without providing the proper reg_defaults, the regmap registers first read out may be always 0 if enabling cache, which results in the following issue we met. e.g. During driver probe in imx6_pm_domain_power_on(): regmap_read(pd->regmap, pd->reg_offs + GPC_PGC_PUPSCR_OFFS, &val); The PGC_PUPSCR register val is always 0 but it's actually 0xf01 in HW. Since GPC registers are tightly related to CPU bring up and may be changed in bootloader, we don't want to provide defaults. And the cache really does not save too much for GPC module. Therefore, simply disable cache to fix the issue and make life easy. Reviewed-by: Lucas Stach Fixes: 721cabf6c660 ("soc: imx: move PGC handling to a new GPC driver") Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo drivers/soc/imx/gpc.c | 10 ---------- 1 file changed, 10 deletions(-) commit 55b0baa2542f1dbaf33989eab5a26a23a8aca345 Author: Dong Aisheng Date: Thu Mar 23 12:53:18 2017 +0800 soc: imx: gpc: fix gpc clk get error handling We got a following kernel crash once supplying one more IPG clock in GPC node in devicetree. The original error handling of clocks get is a bit wrong that when reaching the maximum clock get error, the index 'i' is already GPC_CLK_MAX which can't be used as the array index for clk_put operations. [ 3.000110] imx-gpc 20dc000.gpc: more than 6 clocks [ 3.005141] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 3.013487] pgd = c0004000 [ 3.016300] [00000000] *pgd=00000000 [ 3.020060] Internal error: Oops: 805 [#1] SMP ARM [ 3.024957] Modules linked in: [ 3.028122] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 4.11.0-rc1-00056-g813791b-dirty #1140 [ 3.037801] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 3.044435] task: ef298000 task.stack: ef294000 [ 3.049080] PC is at __clk_put+0x38/0xec [ 3.053103] LR is at 0x7f54ce9a [ 3.056345] pc : [] lr : [<7f54ce9a>] psr: 60000013 [ 3.056345] sp : ef295d48 ip : c8a582b2 fp : ef295d64 [ 3.068026] r10: ee9fc400 r9 : 00000000 r8 : ef398c10 [ 3.073354] r7 : ef398c10 r6 : c1071264 r5 : c10710f0 r4 : eea5be80 [ 3.079986] r3 : 00000000 r2 : 00000000 r1 : 00000100 r0 : 00000001 [ 3.086621] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 3.093863] Control: 10c5387d Table: 1000404a DAC: 00000051 [ 3.099712] Process swapper/0 (pid: 1, stack limit = 0xef294210) [ 3.105823] Stack: (0xef295d48 to 0xef296000) ... [ 3.292660] Backtrace: [ 3.295222] [] (__clk_put) from [] (clk_put+0x18/0x1c) [ 3.302206] r6:c1071264 r5:c10710f0 r4:c107124c r3:00000001 [ 3.307977] [] (clk_put) from [] (imx_pgc_get_clocks+0x64/0x78) [ 3.315747] [] (imx_pgc_get_clocks) from [] (imx_gpc_probe+0x204/0x31c) [ 3.324209] r7:00000000 r6:c1070eb0 r5:00000001 r4:ef398c00 [ 3.329980] [] (imx_gpc_probe) from [] (platform_drv_probe+0x5c/0xc0) [ 3.338270] r10:c0f00608 r9:00000000 r8:00000000 r7:fffffdfb r6:c1070f20 r5:ef398c10 [ 3.346207] r4:ef398c10 [ 3.348849] [] (platform_drv_probe) from [] (driver_probe_device+0x214/0x2ec) [ 3.357835] r7:c1070f20 r6:00000000 r5:c18cea74 r4:ef398c10 [ 3.363607] [] (driver_probe_device) from [] (__driver_attach+0xc4/0xc8) [ 3.372159] r9:c0f8b858 r8:c0f8b850 r7:00000000 r6:ef398c44 r5:c1070f20 r4:ef398c10 [ 3.380017] [] (__driver_attach) from [] (bus_for_each_dev+0x7c/0xb0) [ 3.388304] r6:c05e4328 r5:c1070f20 r4:00000000 r3:00000000 [ 3.394074] [] (bus_for_each_dev) from [] (driver_attach+0x28/0x30) [ 3.402188] r6:c107f3e8 r5:eea5be00 r4:c1070f20 [ 3.406913] [] (driver_attach) from [] (bus_add_driver+0x19c/0x224) [ 3.415034] [] (bus_add_driver) from [] (driver_register+0x88/0x108) [ 3.423235] r7:c10e1000 r6:00000000 r5:c0f57d2c r4:c1070f20 [ 3.429004] [] (driver_register) from [] (__platform_driver_register+0x40/0x54) [ 3.438160] r5:c0f57d2c r4:00000006 [ 3.441846] [] (__platform_driver_register) from [] (imx_gpc_driver_init+0x18/0x20) [ 3.451360] [] (imx_gpc_driver_init) from [] (do_one_initcall+0x4c/0x180) [ 3.460008] [] (do_one_initcall) from [] (kernel_init_freeable+0x130/0x1f8) [ 3.468820] r9:c0f8b858 r8:c0f8b850 r6:c0fc2414 r5:c10e1000 r4:00000006 [ 3.475637] [] (kernel_init_freeable) from [] (kernel_init+0x18/0x124) [ 3.484014] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0ae6ad4 [ 3.491951] r4:00000000 [ 3.494590] [] (kernel_init) from [] (ret_from_fork+0x14/0x24) [ 3.502267] r4:00000000 r3:ef294000 [ 3.505947] Code: e5943014 e5942018 e3530000 e3a01c01 (e5823000) [ 3.512215] ---[ end trace 375f9f2a5ddeff3c ]--- [ 3.517036] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b Cc: Lucas Stach Fixes: 721cabf6c660 ("soc: imx: move PGC handling to a new GPC driver") Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo drivers/soc/imx/gpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b408baf7f4f3ea94239d021a1f19e60cd8694de Author: Dan Carpenter Date: Tue Mar 21 23:43:05 2017 +0300 raid5-ppl: silence a misleading warning message The "need_cache_flush" variable is never set to false. When the variable is true that means we print a warning message at the end of the function. Fixes: 3418d036c81d ("raid5-ppl: Partial Parity Log write logging implementation") Signed-off-by: Dan Carpenter Reviewed-by: Artur Paszkiewicz Signed-off-by: Shaohua Li drivers/md/raid5-ppl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a32562becd95296a9403175d4992ee3b730e72a Author: Ido Schimmel Date: Thu Mar 23 11:14:24 2017 +0100 mlxsw: Remove debugfs interface We don't use it during development and we can't extend it either, so remove it. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.c | 177 ----------------------------- drivers/net/ethernet/mellanox/mlxsw/pci.c | 138 ---------------------- 2 files changed, 315 deletions(-) commit 584a88709bf4880ba5f8fed72da50512fbd9bdbb Author: Jacob Keller Date: Tue Mar 7 15:17:52 2017 -0800 i40e: make use of hlist_for_each_entry_continue Replace a complex if->continue->else->break construction in i40e_next_filter. We can simply use hlist_for_each_entry_continue instead. This drops a lot of confusing code. The resulting code is much easier to understand the intention, and follows the more normal pattern for using hlist loops. We could have also used a break with a "return next" at the end of the function, instead of return NULL, but the current implementation is explicitly clear that when you reach the end of the loop you get a NULL value. The alternative construction is less clear since the reader would have to know that next is NULL at the end of the loop. Change-Id: Ife74ca451dd79d7f0d93c672bd42092d324d4a03 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 55877012d5588ce7427919d6b869922f1a5f60bc Author: Jacob Keller Date: Mon Feb 6 14:38:52 2017 -0800 i40e: document drivers use of ntuple filters Add documentation describing the drivers use of ethtool ntuple filters, including the limitations that it has due to hardware, as well as how it reads and parses the user-def data block. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Documentation/networking/i40e.txt | 72 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit f223c8752a0b756b82ad8f077172054548a6d644 Author: Jacob Keller Date: Mon Feb 6 14:38:51 2017 -0800 i40e: add support for SCTPv4 FDir filters Enable FDir filters for SCTPv4 packets using the ethtool ntuple interface to enable filters. The ethtool API does not allow masking on the verification tag. Change-Id: I093e88a8143994c7e6f4b7b17a0bd5cf861d18e4 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 10 ++++ drivers/net/ethernet/intel/i40e/i40e_main.c | 2 + drivers/net/ethernet/intel/i40e/i40e_txrx.c | 80 ++++++++++++++++++++++++++ 4 files changed, 93 insertions(+) commit 0e588de17f086c32432d6ca7f4053b37c6fc487c Author: Jacob Keller Date: Mon Feb 6 14:38:50 2017 -0800 i40e: implement support for flexible word payload Add support for flexible payloads passed via ethtool user-def field. This support is somewhat limited due to hardware design. The input set can only be programmed once per filter type, and the flexible offset is part of this filter input set. This means that the user cannot program both a regular and a flexible filter at the same time for a given flow type. Additionally, the user may not program two flexible filters of the same flow type with different offsets, although they are allowed to configure different values at that offset location. We support a single flexible word (2byte) value per protocol type, and we handle the FLX_PIT register using a list of flexible entries so that each flow type may be configured separately. Due to hardware implementation, the flexible data is offset from the start of the packet payload, and thus may not be in part of the header data. For this reason, the offset provided by the user defined data is interpreted as a byte offset from the start of the matching payload. Previous implementations have tried to represent the offset as from the start of the frame, but this is not feasible because header sizes may change due to options. Change-Id: 36ed27995e97de63f9aea5ade5778ff038d6f811 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 83 ++++ drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 499 ++++++++++++++++++++++++- drivers/net/ethernet/intel/i40e/i40e_main.c | 16 + drivers/net/ethernet/intel/i40e/i40e_txrx.c | 27 ++ 4 files changed, 613 insertions(+), 12 deletions(-) commit e793095e8a576836da96ec6fc1d6064328d95929 Author: Jacob Keller Date: Mon Feb 6 14:38:49 2017 -0800 i40e: add parsing of flexible filter fields from userdef Add code to parse the user-def field into a data structure format. This code is intended to allow future extensions of the user-def field by keeping all code that actually reads and writes the field into a single location. This ensures that we do not litter the driver with references to the user-def field and minimizes the amount of bitwise operations we need to do on the data. Add code which parses the lower 32bits into a flexible word and its offset. This will be used in a future patch to enable flexible filters which can match on some arbitrary data in the packet payload. For now, we just return -EOPNOTSUPP when this is used. Add code to fill in the user-def field when reporting the filter back, even though we don't actually implement any user-def fields yet. Additionally, ensure that we mask the extended FLOW_EXT bit from the flow_type now that we will be accepting filters which have the FLOW_EXT bit set (and thus make use of the user-def field). Change-Id: I238845035c179380a347baa8db8223304f5f6dd7 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 9 ++ drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 110 ++++++++++++++++++++++++- 2 files changed, 118 insertions(+), 1 deletion(-) commit 43b15697a3993bf24b0190bccec369d314bc8c36 Author: Jacob Keller Date: Mon Feb 6 14:38:48 2017 -0800 i40e: partition the ring_cookie to get VF index Do not use the user-def field for determining the VF target. Instead, similar to ixgbe, partition the ring_cookie value into 8bits of VF index, along with 32bits of queue number. This is better than using the user-def field, because it leaves the field open for extension in a future patch which will enable flexible data. Also, this matches with convention used by ixgbe and other drivers. Change-Id: Ie36745186d817216b12f0313b99ec95cb8a9130c Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 74 ++++++++++++++------------ 1 file changed, 40 insertions(+), 34 deletions(-) commit 9229e9933471faf211e42bb56b8101621c489841 Author: Jacob Keller Date: Mon Feb 6 14:38:47 2017 -0800 i40e: allow changing input set for ntuple filters Add support to detect when we can update the input set for each flow type. Because the hardware only supports a single input set for all flows of that matching type, the driver shall only allow the input set to change if there are no other configured filters for that flow type. Thus, the first filter added for each flow type is allowed to change the input set, and all future filters must match the same input set. Display a diagnostic message whenever the filter input set changes, and a warning whenever a filter cannot be accepted because it does not match the configured input set. Change-Id: Ic22e1c267ae37518bb036aca4a5694681449f283 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 148 ++++++++++++++++++++++++- 1 file changed, 145 insertions(+), 3 deletions(-) commit 3bcee1e653c1c1d78485cc7a298b392675a1a56d Author: Jacob Keller Date: Mon Feb 6 14:38:46 2017 -0800 i40e: restore default input set for each flow type Ensure that the default input set is correctly reprogrammed when cleaning up after disabling flow director support. This ensures that the programmed value will be in a clean state. Although we do not yet have support for SCTPv4 filters, a future patch will add support for this protocol, so we will correctly restore the SCTPv4 input set here as well. Note that strictly speaking the default hardware value for SCTP includes matching the verification tag. However, the ethtool API does not have support for specifying this value, so there is no reason to keep the verification field enabled. This patch is the next step on the way to enabling partial tuple filters which will be implemented in a following patch. Change-Id: Ic22e1c267ae37518bb036aca4a5694681449f283 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 18 ++++++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_main.c | 19 +++++++++++++++++++ 2 files changed, 37 insertions(+) commit 36777d9fa24c1b823f6b4dc3b1ecf9078f182515 Author: Jacob Keller Date: Tue Mar 7 15:05:23 2017 -0800 i40e: check current configured input set when adding ntuple filters Do not assume that hardware has been programmed with the default mask, but instead read the input set registers to determine what is currently programmed. This ensures that all programmed filters match exactly how the hardware will interpret them, avoiding confusion regarding filter behavior. This sets the initial ground-work for allowing custom input sets where some fields are disabled. A future patch will fully implement this feature. Instead of using bitwise negation, we'll just explicitly check for the correct value. The use of htonl and htons are used to silence sparse warnings. The compiler should be able to handle the constant value and avoid actually performing a byteswap. Change-Id: I3d8db46cb28ea0afdaac8c5b31a2bfb90e3a4102 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 19 ++++ drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 117 +++++++++++++++++++++---- 2 files changed, 121 insertions(+), 15 deletions(-) commit faa16e0f384885e1e13a3e28e688347bf5456a8e Author: Jacob Keller Date: Tue Mar 7 15:05:22 2017 -0800 i40e: correctly honor the mask fields for ETHTOOL_SRXCLSRLINS The current implementation of .set_rxnfc does not properly read the mask field for filter entries. This results in incorrect driver behavior, as we do not reject filters which have masks set to ignore some fields. The current implementation simply assumes that every part of the tuple or "input set" is specified. This results in filters not behaving as expected, and not working correctly. As a first step in supporting some partial filters, add code which checks the mask fields and rejects any filters which do not have an acceptable mask. For now, we just assume that all fields must be set. This will get the driver one step towards allowing some partial filters. At a minimum, the ethtool commands which previously installed filters that would not function will now return a non-zero exit code indicating failure instead. We should now be meeting the minimum requirements of the .set_rxnfc API, by ensuring that all filters we program have a valid mask value for each field. Finally, add code to report the mask correctly so that the ethtool command properly reports the mask to the user. Note that the typecast to (__be16) when checking source and destination port masks is required because the ~ bitwise negation operator does not correctly handle variables other than integer size. Change-Id: Ia020149e07c87aa3fcec7b2283621b887ef0546f Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 83 ++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit 3dfc9b02864b19f4dab376f14479ee4ad1de6c9e Author: Tetsuo Handa Date: Wed Mar 22 19:46:19 2017 +0900 LSM: Initialize security_hook_heads upon registration. "struct security_hook_heads" is an array of "struct list_head" where elements can be initialized just before registration. There is no need to waste 350+ lines for initialization. Let's initialize "struct security_hook_heads" just before registration. Signed-off-by: Tetsuo Handa Acked-by: Kees Cook Cc: John Johansen Cc: Kees Cook Cc: Paul Moore Cc: Stephen Smalley Cc: Casey Schaufler Cc: James Morris Signed-off-by: James Morris security/security.c | 361 +--------------------------------------------------- 1 file changed, 7 insertions(+), 354 deletions(-) commit 80b120ca1a75c2df093d15936ab0591d90c99de9 Author: Rafael J. Wysocki Date: Thu Mar 23 00:00:47 2017 +0100 cpufreq: intel_pstate: Avoid transient updates of cpuinfo.max_freq Both intel_pstate_verify_policy() and intel_cpufreq_verify_policy() set policy->cpuinfo.max_freq depending on the turbo status, but the updates made by them are discarded by the core, because the policy object passed to them by the core is temporary and cpuinfo.max_freq from that object is not copied to the final policy object in cpufreq_set_policy(). However, cpufreq_set_policy() passes the temporary policy object to the ->setpolicy callback of the driver, so intel_pstate_set_policy() actually sees the policy->cpuinfo.max_freq value updated by intel_pstate_verify_policy() and not the final one. It also updates policy->max sometimes which basically has no effect after it returns, because the core discards that update. To avoid confusion, eliminate policy->cpuinfo.max_freq updates from intel_pstate_verify_policy() and intel_cpufreq_verify_policy() entirely and check the maximum frequency explicitly in intel_pstate_update_perf_limits() instead of relying on the transiently updated policy->cpuinfo.max_freq value. Moreover, move the max->policy adjustment carried out in intel_pstate_set_policy() to a separate function and call that function from the ->verify driver callbacks to ensure that it will actually be effective. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 47 +++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 19 deletions(-) commit c5a2ee7dde893e0a06044e75c16711f08d5c011d Author: Rafael J. Wysocki Date: Wed Mar 22 23:58:57 2017 +0100 cpufreq: intel_pstate: Active mode P-state limits rework The coordination of P-state limits used by intel_pstate in the active mode (ie. by default) is problematic, because it synchronizes all of the limits (ie. the global ones and the per-policy ones) so as to use one common pair of P-state limits (min and max) across all CPUs in the system. The drawbacks of that are as follows: - If P-states are coordinated in hardware, it is not necessary to coordinate them in software on top of that, so in that case all of the above activity is in vain. - If P-states are not coordinated in hardware, then the processor is actually capable of setting different P-states for different CPUs and coordinating them at the software level simply doesn't allow that capability to be utilized. - The coordination works in such a way that setting a per-policy limit (eg. scaling_max_freq) for one CPU causes the common effective limit to change (and it will affect all of the other CPUs too), but subsequent reads from the corresponding sysfs attributes for the other CPUs will return stale values (which is confusing). - Reads from the global P-state limit attributes, min_perf_pct and max_perf_pct, return the effective common values and not the last values set through these attributes. However, the last values set through these attributes become hard limits that cannot be exceeded by writes to scaling_min_freq and scaling_max_freq, respectively, and they are not exposed, so essentially users have to remember what they are. All of that is painful enough to warrant a change of the management of P-state limits in the active mode. To that end, redesign the active mode P-state limits management in intel_pstate in accordance with the following rules: (1) All CPUs are affected by the global limits (that is, none of them can be requested to run faster than the global max and none of them can be requested to run slower than the global min). (2) Each individual CPU is affected by its own per-policy limits (that is, it cannot be requested to run faster than its own per-policy max and it cannot be requested to run slower than its own per-policy min). (3) The global and per-policy limits can be set independently. Also, the global maximum and minimum P-state limits will be always expressed as percentages of the maximum supported turbo P-state. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 185 +++++++++++++++++++---------------------- 1 file changed, 85 insertions(+), 100 deletions(-) commit 553953453b4b64fbccba31691257d006cee36613 Author: Rafael J. Wysocki Date: Wed Mar 22 23:53:54 2017 +0100 cpufreq: intel_pstate: Use load-based P-state selection more widely Extend the set of systems for which intel_pstate will use the "powersave" P-state selection algorithm based on CPU load in the active mode by systems with ACPI preferred profile set to "tablet", "appliance PC", "desktop", or "workstation" (ie. everything with a specified preferred profile that is not a "server"). Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit eb5139d1a2272487b223c4879ecd2a1b48c2250e Author: Rafael J. Wysocki Date: Wed Mar 22 23:52:18 2017 +0100 cpufreq: intel_pstate: Support HWP processors in all operation modes Currently, some processors supporting HWP are only supported by intel_pstate if HWP is actually going to be used and not supported otherwise which is confusing. Specifically, they are not supported if "intel_pstate=no_hwp" is passed to the kernel in the command line or if the driver is started in the passive mode ("intel_pstate=passive"). There is no real reason for that, because everything about those processor is known anyway and the driver can work with them in all modes, so make that happen, but use the load-based P-state selection algorithm for the active mode "powersave" policy with them. Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit f1a91645b7f0896a12f91b57e1c6492fe137f85b Merge: 64897b2 5f98ced Author: Rafael J. Wysocki Date: Fri Mar 24 03:04:10 2017 +0100 Merge back intel_pstate updates for 4.12. commit 38d4ea229d25d30be6bf41bcd6cd663a587866ca Author: Rafael J. Wysocki Date: Wed Mar 22 18:32:47 2017 +0100 cpufreq: schedutil: Trace frequency only if it has changed sugov_update_commit() calls trace_cpu_frequency() to record the current CPU frequency if it has not changed in the fast switch case to prevent utilities from getting confused (they may report that the CPU is idle if the frequency has not been recorded for too long, for example). However, that may cause the tracepoint to be triggered quite often for no real reason (if the frequency doesn't change, we will not modify the last update time stamp and governor computations may run again shortly when that happens), so don't do that (arguably, it is done to work around a utilities bug anyway). That allows code duplication in sugov_update_commit() to be reduced somewhat too. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar kernel/sched/cpufreq_schedutil.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit add641e7dee31b36aee83412c29e39dd1f5e0c9c Author: Davide Caratti Date: Thu Mar 23 10:39:40 2017 +0100 sched: act_csum: don't mangle TCP and UDP GSO packets after act_csum computes the checksum on skbs carrying GSO TCP/UDP packets, subsequent segmentation fails because skb_needs_check(skb, true) returns true. Because of that, skb_warn_bad_offload() is invoked and the following message is displayed: WARNING: CPU: 3 PID: 28 at net/core/dev.c:2553 skb_warn_bad_offload+0xf0/0xfd <...> [] skb_warn_bad_offload+0xf0/0xfd [] __skb_gso_segment+0xec/0x110 [] validate_xmit_skb+0x12d/0x2b0 [] validate_xmit_skb_list+0x42/0x70 [] sch_direct_xmit+0xd0/0x1b0 [] __qdisc_run+0x120/0x270 [] __dev_queue_xmit+0x23d/0x690 [] dev_queue_xmit+0x10/0x20 Since GSO is able to compute checksum on individual segments of such skbs, we can simply skip mangling the packet. Signed-off-by: Davide Caratti Signed-off-by: David S. Miller net/sched/act_csum.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 67ff2c71bbf21fae0f63b367f252653c4abc3b12 Author: Jie Deng Date: Thu Mar 23 12:03:46 2017 +0800 net: dwc-xlgmac: use dual license The driver "dwc-xlgmac" is dual-licensed. Declare the dual license with MODULE_LICENSE(). Signed-off-by: Jie Deng Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc-xlgmac-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ea8c1c642ea501ccdbc31abaff8e624585e43711 Author: Jie Deng Date: Thu Mar 23 12:03:45 2017 +0800 net: dwc-xlgmac: declaration of dual license in headers The driver "dwc-xlgmac" is dual-licensed. This patch adds declaration of dual license in file headers. Signed-off-by: Jie Deng Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc-xlgmac-common.c | 6 ++---- drivers/net/ethernet/synopsys/dwc-xlgmac-desc.c | 6 ++---- drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c | 6 ++---- drivers/net/ethernet/synopsys/dwc-xlgmac-net.c | 6 ++---- drivers/net/ethernet/synopsys/dwc-xlgmac-pci.c | 6 ++---- drivers/net/ethernet/synopsys/dwc-xlgmac-reg.h | 6 ++---- drivers/net/ethernet/synopsys/dwc-xlgmac.h | 6 ++---- 7 files changed, 14 insertions(+), 28 deletions(-) commit 101a6e83d5e03c08f4ab7020bf543addb4df5734 Merge: 16ae1f2 51570a5 Author: David S. Miller Date: Thu Mar 23 17:02:07 2017 -0700 Merge branch 'bpf-socket-cookie-uid' Chenbo Feng says: ==================== net: core: Two Helper function about socket information Introduce two eBpf helper function to get the socket cookie and socket uid for each packet. The helper function is useful when the *sk field inside sk_buff is not empty. These helper functions can be used on socket and uid based traffic monitoring programs. Change since V7: * change the user namespace of uid helper function to sock_net(sk)->user_ns Change since V6: * change the user namespace of uid helper function back to init_user_ns since in some situation, for example, pinned bpf object, the current user namespace is not always applicable. Change since V5: * Delete unnecessary blank lines in sample program. * Refine the variable orders in get_uid helper function. Change since V4: * Using current user namespace to get uid instead of using init_ns. * Add compiling setup of example program in to Makefile. * Change the name style of the example program binaries. Change since V3: * Fixed some typos and incorrect comments in sample program * replaced raw insns with BPF_STX_XADD and add it to libbpf.h * Use a temp dir as mount point instead and added a check for the user input string. * Make the get uid helper function returns the user namespace uid instead of kuid. * Return a overflowuid instead of 0 when no uid information is found. Change since V2: * Add a sample program to demostrate the usage of the helper function. * Moved the helper function proto invoking place. * Add function header into tools/include * Apply sk_to_full_sk() before getting uid. Change since V1: * Removed the unnecessary declarations and export command * resolved conflict with master branch. * Examine if the socket is a full socket before getting the uid. ==================== Signed-off-by: David S. Miller commit 51570a5ab2b74a1b929e5a6c25b4df93652ac0aa Author: Chenbo Feng Date: Wed Mar 22 17:27:36 2017 -0700 A Sample of using socket cookie and uid for traffic monitoring Add a sample program to demostrate the possible usage of get_socket_cookie and get_socket_uid helper function. The program will store bytes and packets counting of in/out traffic monitored by iptables and store the stats in a bpf map in per socket base. The owner uid of the socket will be stored as part of the data entry. A shell script for running the program is also included. Acked-by: Alexei Starovoitov Acked-by: Willem de Bruijn Signed-off-by: Chenbo Feng Signed-off-by: David S. Miller samples/bpf/Makefile | 3 + samples/bpf/cookie_uid_helper_example.c | 217 +++++++++++++++++++++++++++ samples/bpf/libbpf.h | 10 ++ samples/bpf/run_cookie_uid_helper_example.sh | 14 ++ 4 files changed, 244 insertions(+) commit 6acc5c2910689fc6ee181bf63085c5efff6a42bd Author: Chenbo Feng Date: Wed Mar 22 17:27:35 2017 -0700 Add a eBPF helper function to retrieve socket uid Returns the owner uid of the socket inside a sk_buff. This is useful to perform per-UID accounting of network traffic or per-UID packet filtering. The socket need to be a fullsock otherwise overflowuid is returned. Signed-off-by: Chenbo Feng Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 9 ++++++++- net/core/filter.c | 22 ++++++++++++++++++++++ tools/include/uapi/linux/bpf.h | 3 ++- 3 files changed, 32 insertions(+), 2 deletions(-) commit 91b8270f2a4d1d9b268de90451cdca63a70052d6 Author: Chenbo Feng Date: Wed Mar 22 17:27:34 2017 -0700 Add a helper function to get socket cookie in eBPF Retrieve the socket cookie generated by sock_gen_cookie() from a sk_buff with a known socket. Generates a new cookie if one was not yet set.If the socket pointer inside sk_buff is NULL, 0 is returned. The helper function coud be useful in monitoring per socket networking traffic statistics and provide a unique socket identifier per namespace. Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: Willem de Bruijn Signed-off-by: Chenbo Feng Signed-off-by: David S. Miller include/linux/sock_diag.h | 1 + include/uapi/linux/bpf.h | 9 ++++++++- net/core/filter.c | 17 +++++++++++++++++ net/core/sock_diag.c | 2 +- tools/include/uapi/linux/bpf.h | 3 ++- 5 files changed, 29 insertions(+), 3 deletions(-) commit 16ae1f223601c44e5cb65c99257ffae003504704 Merge: 6f359f9 d038e3d Author: David S. Miller Date: Thu Mar 23 15:11:56 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Conflicts: drivers/net/ethernet/broadcom/genet/bcmmii.c drivers/net/hyperv/netvsc.c kernel/bpf/hashtab.c Almost entirely overlapping changes. Signed-off-by: David S. Miller commit deb518f6ae4d5da22fb1e8d6c6a690253ffa700d Author: Brian Norris Date: Thu Mar 9 18:46:14 2017 -0800 PCI: rockchip: Make 'return 0' more obvious in probe() There's no way to get here with 'err != 0'. Just return 0 to be more obvious and prevent future changes from accidentally erroring out here without going through the right error paths. Signed-off-by: Brian Norris Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73edd2b180a18024605c599074596a9e22d745d6 Author: Bjorn Helgaas Date: Thu Mar 23 17:21:26 2017 -0500 PCI: rockchip: Unindent rockchip_pcie_set_power_limit() If regulator_get_current_limit() returns 0 or error, return early so the body of the function doesn't have to be indented as the body of an "if" statement. No functional change intended. Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-rockchip.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 9c312e79d6afb673114ebe7aabd5594e79827eea Author: Markus Elfring Date: Sat Jan 14 20:40:12 2017 +0100 selinux: Delete an unnecessary variable initialisation in range_read() The local variable "rt" will be set to an appropriate pointer a bit later. Thus omit the explicit initialisation at the beginning which became unnecessary with a previous update step. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e70b8c6bf0003bf1691ac5cab5aff128747d494 Author: Chris Wilson Date: Thu Mar 23 13:48:03 2017 +0000 drm/i915/execlists: Relax the locked clear_bit(IRQ_EXECLIST) We only need to care about the ordering of the clearing of the bit with the uncached CSB read in order to correctly detect a new interrupt before the read completes. The uncached read itself acts as a full memory barrier, so we do not need to enforce another in the form of a locked clear_bit. v2: Clarify why the split and unlocked test/clear is harmless. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170323134803.10418-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_lrc.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 57152a5be08e240654993984a0f6e54254882626 Author: Markus Elfring Date: Sat Jan 14 19:35:59 2017 +0100 selinux: Return directly after a failed next_entry() in range_read() Return directly after a call of the function "next_entry" failed at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fcaa0051dfcc5fe77aee95061945d80e465a027 Author: Brian Norris Date: Thu Mar 9 18:46:13 2017 -0800 PCI: rockchip: Handle regulator_get_current_limit() failure correctly regulator_get_current_limit() can return negative error codes. We saved the return value in an unsigned "curr", and a subsequent check interpreted a negative error code as a positive (invalid) current limit. Save the return code as a signed value, which avoids messages like this, seen on Samsung Chromebook Plus: rockchip-pcie f8000000.pcie: invalid power supply [bhelgaas: changelog] Fixes: 4816c4c7b82b ("PCI: rockchip: Provide captured slot power limit and scale") Signed-off-by: Brian Norris Signed-off-by: Bjorn Helgaas Acked-by: Shawn Lin drivers/pci/host/pcie-rockchip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 02fcef27cc908e22ddb68d30ad1b7fd9ac3a1c24 Author: Markus Elfring Date: Sat Jan 14 19:02:42 2017 +0100 selinux: Delete an unnecessary variable assignment in filename_trans_read() The local variable "ft" was set to a null pointer despite of an immediate reassignment. Thus remove this statement from the beginning of a loop. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 1 - 1 file changed, 1 deletion(-) commit 315e01ada8047cba0520ecca050ad8f5237abb41 Author: Markus Elfring Date: Sat Jan 14 17:43:47 2017 +0100 selinux: One function call less in genfs_read() after null pointer detection Call the function "kfree" at the end only after it was determined that the local variable "newgenfs" contained a non-null pointer. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 996b9eedd061752bfa0f3a10381515d67db26b3e Author: Dmitry Torokhov Date: Thu Mar 23 10:02:50 2017 -0700 Input: synaptics - do not mix logical and bitwise operations Let's stop using !!x to reduce value of trackstick button expression to 0/1 and use shift instead. This removes the following sparse warning: CHECK drivers/input/mouse/synaptics.c drivers/input/mouse/synaptics.c:943:79: warning: dubious: !x | y Also, the bits we are testing are not capabilities, so lets drop "_CAP" suffix from macro names. Reviewed-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 6 +++--- drivers/input/mouse/synaptics.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit cf5cd9d4480a87da78768718cac194a71079b5cb Author: Javier Martinez Canillas Date: Thu Mar 23 13:33:12 2017 -0700 Input: qt1070 - add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. The compatible strings don't have a vendor prefix because that's how it's used currently, and changing this will be a Device Tree ABI break. Signed-off-by: Javier Martinez Canillas Signed-off-by: Dmitry Torokhov drivers/input/keyboard/qt1070.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 72bf60f19661e0451071f6a2f1940f9af1a3e33b Author: Javier Martinez Canillas Date: Thu Mar 23 13:31:50 2017 -0700 Input: synaptics_i2c - add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics_i2c.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 483e55d973473886d1c2c2785ee51b209c434950 Author: Javier Martinez Canillas Date: Thu Feb 23 00:44:28 2017 -0800 Input: silead - add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. As pointed by Hans de Goede, there's no mssl1680 and this is just used in some ACPI systems to identify the gsl1680 chip. So isn't included in the OF device ID table since a DT should use the proper device name instead. Signed-off-by: Javier Martinez Canillas Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/silead.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 3a0aa56518432a1a598ac3e48a93f2e99c66a393 Author: Markus Elfring Date: Sat Jan 14 16:34:25 2017 +0100 selinux: Return directly after a failed next_entry() in genfs_read() Return directly after a call of the function "next_entry" failed at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4e4686f65a3092f63ed01c887d9f56714d29f4a Author: Markus Elfring Date: Sat Jan 14 14:00:02 2017 +0100 selinux: Delete an unnecessary return statement in policydb_destroy() The script "checkpatch.pl" pointed information out like the following. WARNING: void function return statements are not generally useful Thus remove such a statement in the affected function. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 2 -- 1 file changed, 2 deletions(-) commit ad10a10567e243425d7be35a3d950709371fa048 Author: Markus Elfring Date: Sat Jan 14 13:08:59 2017 +0100 selinux: Use kcalloc() in policydb_index() Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit bb7d97862e456bd81ab2b6bc47073e63ea4e91a5 Author: Vignesh R Date: Wed Mar 22 21:06:34 2017 +0530 ARM: dts: am437x-gp-evm: Add pinmux for uart0 Add pinmux for rx,tx,cts and rts lines of uart0. This will enable uart0 to use hardware flow control. Signed-off-by: Vignesh R Signed-off-by: Tony Lindgren arch/arm/boot/dts/am437x-gp-evm.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 14eb6855b2532b8e05d7df3381f4d769fb9d676f Author: Franklin S Cooper Jr Date: Tue Mar 7 15:57:51 2017 -0600 ARM: dts: am335x-icev2: Add SPI based NOR Enable support for W25Q64CVSSIG which is a Winbond 64 Mbit SPI NOR. At boot you will see the following message: m25p80 spi1.0: found s25fl064k, expected w25q64 This is because the JEDEC ID for this chip is the same as s25fl064k. However, this should be harmless since both chips are essentially the same. Signed-off-by: Franklin S Cooper Jr Signed-off-by: Sekhar Nori Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-icev2.dts | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 346e400cfcebeb2a3dc3ede80cbd8b6fb95165ce Author: Jan Glauber Date: Thu Mar 2 11:34:07 2017 +0100 i2c: thunderx: ACPI support for clock settings Add support for reading the system clock and the TWSI clock frequency from ACPI DSDT. TWSI clock was already covered by using device_property_read(). Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-thunderx-pcidrv.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 617c3d973b6aff3ba2f1b88ee2a1a37f1dff0a79 Author: Sekhar Nori Date: Tue Mar 7 15:57:50 2017 -0600 Documentation: devicetree: mtd: add w25q64 to list of supported SPI flashes W25Q64 is found on TI's AM335x ICEv2 board. Add it to list for supported SPI flash devices. This flash can be identified using JEDEC READ ID opcode. Signed-off-by: Sekhar Nori Acked-by: Rob Herring Signed-off-by: Tony Lindgren Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt | 1 + 1 file changed, 1 insertion(+) commit a4e5e9f93854845e87dd8debed07afdb0b844412 Author: Dave Gerlach Date: Mon Mar 6 09:23:41 2017 -0600 ARM: dts: dra7: Add updated operating-points-v2 table for cpu After the ti-cpufreq driver has been added, we can now drop the operating-points table present in dra7.dtsi for the cpu and add an operating-points-v2 table with all OPPs available for all silicon revisions. Also add necessary data for use by ti-cpufreq to selectively enable the appropriate OPPs at runtime as part of the operating-points table. As we now need to define voltage ranges for each OPP, we define the minimum and maximum voltage to match the ranges possible for AVS class0 voltage as defined by the DRA7/AM57 Data Manual, with the exception of using a range for OPP_OD based on historical data to ensure that SoCs from older lots still continue to boot, even though more optimal voltages are now the standard. Once an AVS Class0 driver is in place it will be possible for these OPP voltages to be adjusted to any voltage within the provided range. Information from SPRS953, Revised December 2015. Signed-off-by: Dave Gerlach eviewed-by: Lukasz Majewski Acked-by: Viresh Kumar Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7.dtsi | 24 +++++++++++++++++++----- arch/arm/boot/dts/dra74x.dtsi | 5 +++++ 2 files changed, 24 insertions(+), 5 deletions(-) commit ca167c8760c2a9ab7cb2181dee9f0657d4db1b8f Author: Dave Gerlach Date: Mon Mar 6 09:23:40 2017 -0600 ARM: dts: am4372: Update operating-points-v2 table for cpu The operatings-points-v2 table for am4372 was merged before any user of it was present in the kernel and before the binding had been finalized. The new ti-cpufreq driver and binding expects the platform specific properties to be part of the operating-points-v2 table rather than the cpu node so let's move them there as the only user is the ti-cpufreq driver. Signed-off-by: Dave Gerlach eviewed-by: Lukasz Majewski Acked-by: Viresh Kumar Signed-off-by: Tony Lindgren arch/arm/boot/dts/am4372.dtsi | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit bc4b1736f246102e84ce6d3f1a32f614ae27d81f Author: Dave Gerlach Date: Mon Mar 6 09:23:39 2017 -0600 ARM: dts: am335x-boneblack: Enable 1GHz OPP for cpu Although all PG2.0 silicon may not support 1GHz OPP for the MPU, older Beaglebone Blacks may have PG2.0 silicon populated and these particular parts are guaranteed to support the OPP, so enable it for PG2.0 on am335x-boneblack only. Signed-off-by: Dave Gerlach eviewed-by: Lukasz Majewski Acked-by: Viresh Kumar Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-boneblack.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 4165bd4b91b9328fda07da8b2d1f49707f54abe1 Author: Jayachandran C Date: Sun Mar 12 10:54:55 2017 +0000 i2c: xlp9xx: update for ARCH_THUNDER2 ARCH_VULCAN arm64 platform (for Broadcom Vulcan ARM64 processors) has been discontinued. Cavium's ThunderX2 CN99XX (ARCH_THUNDER2) will be the next revision of the platform. Update compile dependencies and ACPI ID to reflect this change. There is not need to retain ARCH_VULCAN since the Vulcan processor was never in production and the config option will be removed soon. Signed-off-by: Jayachandran C Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 2 +- drivers/i2c/busses/i2c-xlp9xx.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 72ac40fcb164a3d8fbd1ff13647abe67df26ced5 Author: Dave Gerlach Date: Mon Mar 6 09:23:38 2017 -0600 ARM: dts: am33xx: Add updated operating-points-v2 table for cpu After the ti-cpufreq driver has been added, we can now drop the operating-points table present in am33xx.dtsi for the cpu and add an operating-points-v2 table with all OPPs available for all silicon revisions. Also add necessary data for use by ti-cpufreq to selectively enable the appropriate OPPs at runtime as part of the operating-points table. Information from AM335x Data Manual, SPRS717i, Revised December 2015, Table 5-7. Signed-off-by: Dave Gerlach eviewed-by: Lukasz Majewski Acked-by: Viresh Kumar Signed-off-by: Tony Lindgren arch/arm/boot/dts/am33xx.dtsi | 87 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 74 insertions(+), 13 deletions(-) commit 074363a5a08c1be345c7d4bd6b0cf0d87a76c729 Author: Philipp Zabel Date: Wed Mar 15 12:31:34 2017 +0100 i2c: mv64xxx: simplify optional reset handling As of commit bb475230b8e5 ("reset: make optional functions really optional"), the reset framework API calls use NULL pointers to describe optional, non-present reset controls. This allows to return errors from devm_reset_control_get_optional and to call reset_control_(de)assert unconditionally. Signed-off-by: Philipp Zabel Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mv64xxx.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit cb8d21e3640f18444c597bddaec156637eacecf8 Author: Markus Elfring Date: Sat Jan 14 12:36:59 2017 +0100 selinux: Adjust four checks for null pointers The script "checkpatch.pl" pointed information out like the following. Comparison to NULL could be written !… Thus fix affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/hashtab.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2f00e680fe25d8d2758879b772d54cb46a78b59d Author: Markus Elfring Date: Sat Jan 14 12:06:13 2017 +0100 selinux: Use kmalloc_array() in hashtab_create() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/hashtab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb13a312daa11005b0230695a1d6a0b4e2b27069 Author: Markus Elfring Date: Sat Jan 14 11:22:12 2017 +0100 selinux: Improve size determinations in four functions Replace the specification of data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/conditional.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e34cfef901badc0e17c2b296a535e7412ef038f3 Author: Markus Elfring Date: Sat Jan 14 11:00:23 2017 +0100 selinux: Delete an unnecessary return statement in cond_compute_av() The script "checkpatch.pl" pointed information out like the following. WARNING: void function return statements are not generally useful Thus remove such a statement in the affected function. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/conditional.c | 1 - 1 file changed, 1 deletion(-) commit 9f6b5728baffb32c4be480684b0149e791832f07 Author: Bartosz Golaszewski Date: Tue Mar 14 12:14:14 2017 +0100 ARM: dts: dm8168-evm: add SATA node Add the SATA controller node to the dm8168-evm device tree. Signed-off-by: Bartosz Golaszewski Signed-off-by: Tony Lindgren arch/arm/boot/dts/dm8168-evm.dts | 4 ++++ arch/arm/boot/dts/dm816x.dtsi | 7 +++++++ 2 files changed, 11 insertions(+) commit 69dfc190c43d671284fa75327191367a9c44ee20 Author: Bartosz Golaszewski Date: Tue Mar 14 12:14:13 2017 +0100 ARM: dts: dm8168-evm: add the external reference clock for SATA This board has an external oscillator supplying the reference clock signal for SATA. Its rate is fixed at 100Mhz. Add a corresponding device tree node. Signed-off-by: Bartosz Golaszewski Signed-off-by: Tony Lindgren arch/arm/boot/dts/dm8168-evm.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 10685a5d83cc5e25644ffafa01a9f68d6d601488 Author: Bartosz Golaszewski Date: Tue Mar 14 12:14:15 2017 +0100 ARM: omap2plus_defconfig: enable ahci-dm816 module This is now supported on the dm8168-evm board, so enable it in the defconfig for omap2+. Signed-off-by: Bartosz Golaszewski Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 1 + 1 file changed, 1 insertion(+) commit f6076f704aa29679fdba114b0f60e71e0884840a Author: Markus Elfring Date: Sat Jan 14 10:48:28 2017 +0100 selinux: Use kmalloc_array() in cond_init_bool_indexes() * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Paul Moore security/selinux/ss/conditional.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8ff42da411474893ae373d4280ea88954fa97fcc Author: Roger Quadros Date: Fri Mar 17 10:58:18 2017 +0200 ARM: OMAP2+ hwmod: Allow modules to disable HW_AUTO Introduce HWMOD_CLKDM_NOAUTO flag that allows the hwmod's clockdomain to be prevented from HW_AUTO while the hwmod is active. This is needed to workaround some modules which don't function correctly with HW_AUTO. e.g. DCAN on DRA7. Signed-off-by: Roger Quadros [nsekhar@ti.com: rebased to v4.9 kernel] Signed-off-by: Sekhar Nori Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod.c | 9 +++++++-- arch/arm/mach-omap2/omap_hwmod.h | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) commit 390c06828dd22549706946113a0783cb8e2a3240 Author: Sekhar Nori Date: Tue Mar 14 14:07:17 2017 +0200 ARM: OMAP2+: omap_hwmod: provide space for more hwmod flags 'flags' member of omap_hwmod structure is fast running out of space with 16 different flags already defined. Make flags a 32-bit entity so as to allow for more flags. This results is a ~2.3K data section size increase with omap2plus_defconfig on v4.11-rc2. before: text data bss dec hex filename 8186930 3082444 8252992 19522366 129e33e vmlinux after: text data bss dec hex filename 8186922 3084812 8252992 19524726 129ec76 vmlinux Signed-off-by: Sekhar Nori Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ae5214a22f51b42d5f63161e70cf8af4803ff55 Author: Jon Hunter Date: Thu Mar 23 11:56:56 2017 +0000 i2c: tegra-bpmp: Enable Tegra BPMP I2C adapter Enable the Tegra BPMP I2C adapter by default if the Tegra BPMP itself is enabled. This adapter is used as the I2C interface for the PMIC on the Tegra186 Jetson-TX2 platform. Signed-off-by: Jon Hunter Acked-by: Thierry Reding Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 0107042768658fea9f5f5a9c00b1c90f5dab6a06 Author: Tom Hromatka Date: Wed Jan 4 15:28:04 2017 -0700 sysrq: Reset the watchdog timers while displaying high-resolution timers On systems with a large number of CPUs, running sysrq- can cause watchdog timeouts. There are two slow sections of code in the sysrq- path in timer_list.c. 1. print_active_timers() - This function is called by print_cpu() and contains a slow goto loop. On a machine with hundreds of CPUs, this loop took approximately 100ms for the first CPU in a NUMA node. (Subsequent CPUs in the same node ran much quicker.) The total time to print all of the CPUs is ultimately long enough to trigger the soft lockup watchdog. 2. print_tickdevice() - This function outputs a large amount of textual information. This function also took approximately 100ms per CPU. Since sysrq- is not a performance critical path, there should be no harm in touching the nmi watchdog in both slow sections above. Touching it in just one location was insufficient on systems with hundreds of CPUs as occasional timeouts were still observed during testing. This issue was observed on an Oracle T7 machine with 128 CPUs, but I anticipate it may affect other systems with similarly large numbers of CPUs. Signed-off-by: Tom Hromatka Reviewed-by: Rob Gardner Signed-off-by: John Stultz kernel/time/timer_list.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 66893ea3757ceb2a95b57ac0fec6632003155f5b Author: Gargi Sharma Date: Mon Mar 20 14:00:42 2017 +0530 staging: adis16203: Remove locking on raw reads of IIO_CHAN_INFO_CALIBBIAS adis16203_read_raw does not need lock for IIO_CHAN_INFO_CALIBBIAS since adis_read_reg_16 is already atomic and nothing else needs to be protected. Signed-off-by: Gargi Sharma Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16203.c | 3 --- 1 file changed, 3 deletions(-) commit 745c6dad490d9ec99f2f1cc3ec4b38afa4f5a8ed Author: Narcisa Ana Maria Vasile Date: Mon Mar 20 14:18:26 2017 +0200 staging: iio: cdc: ad7746: Fix alignment with paranthesis This was reported by checkpatch.pl: CHECK: Alignment should match open parenthesis Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7746.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6602292e1d30498981177fce6a24aff4a81bce39 Author: Narcisa Ana Maria Vasile Date: Mon Mar 20 14:18:03 2017 +0200 staging: iio: Add blank lines after function declarations This was reported by checkpatch.pl: CHECK: Please use a blank line after function/struct/union/enum declarations Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Jonathan Cameron drivers/staging/iio/addac/adt7316.c | 1 + drivers/staging/iio/cdc/ad7152.c | 1 + 2 files changed, 2 insertions(+) commit fb4d75a9db652650c1813e989db2985f64dd8867 Author: Narcisa Ana Maria Vasile Date: Mon Mar 20 14:17:50 2017 +0200 staging: iio: adt7136: Remove unnecessary blank lines This was reported by checkpatch.pl Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Jonathan Cameron drivers/staging/iio/addac/adt7316.c | 4 ---- 1 file changed, 4 deletions(-) commit 755d0da465fb870d2972ed19ef32c9da2498e3a1 Author: Arushi Singhal Date: Tue Mar 21 01:21:34 2017 +0530 staging: ad7606: Replace mlock with driver private lock The IIO subsystem is redefining iio_dev->mlock to be used by the IIO core only for protecting device operating mode changes. ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. In this driver, mlock was being used to protect hardware state changes. Replace it with a lock in the devices global data. Signed-off-by: Arushi Singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/adc/ad7606.c | 9 +++++---- drivers/staging/iio/adc/ad7606.h | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) commit 64822be434d69b226503f9d319f7a57bdbce2609 Author: simran singhal Date: Tue Mar 21 23:33:55 2017 +0530 staging: iio: ade7753: Remove trailing whitespaces This patch removes trailing whitespaces in order to follow the Linux coding style. Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7753.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d62bb1ad0532c8c31f79d83b91d4b06a512b8408 Author: simran singhal Date: Mon Mar 20 20:45:05 2017 +0530 staging: ade7754: Clean up #includes Alphabetize and separate kernel and subsystem headers. Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7754.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 63bb38c000a2c5817f643273c0596828fe7ce05c Author: Arushi Singhal Date: Wed Mar 22 22:12:34 2017 +0530 staging: iio: Replace a bit shift by a use of BIT. This patch replaces bit shifting on 1 with the BIT(x) macro. This was done with coccinelle: @@ constant c; @@ -1 << c +BIT(c) Signed-off-by: Arushi Singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7150.c | 2 +- drivers/staging/iio/cdc/ad7746.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) commit 9dde479e9f9e5b2eafa3db8b7ce919b74533beb8 Author: simran singhal Date: Wed Mar 22 21:50:43 2017 +0530 staging: iio: adis16060: Remove iio_dev mlock and refactor code The IIO subsystem is redefining iio_dev->mlock to be used by the IIO core only for protecting device operating mode changes. ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. In this driver, mlock was being used to protect hardware state changes. In the driver, buf_lock protects both the adis16060_spi_write() and adis16060_spi_read() functions and both are always called in pair. First write, then read. Refactor the code to have one single function adis16060_spi_write_than_read() protected by the buf_lock. This removes the need for additional locking via mlock, so this locking is removed. Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/gyro/adis16060_core.c | 35 +++++++++---------------------- 1 file changed, 10 insertions(+), 25 deletions(-) commit f4363d810767fcbd0aaad2e1d456be5d76bf54eb Author: Andy Shevchenko Date: Thu Mar 23 21:17:49 2017 +0200 leds: lp3952: Use 'if (ret)' pattern Instead of unusual "if (!ret)" use "if (ret)" in lp3952_get_label(). Signed-off-by: Andy Shevchenko Signed-off-by: Jacek Anaszewski drivers/leds/leds-lp3952.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 96962178475ae8040f40dff3a44beb9f69181421 Author: Andy Shevchenko Date: Thu Mar 23 21:17:48 2017 +0200 leds: lp3952: Remove ACPI support for lp3952 In ACPI world any ID should be carefully chosen and registered officially. The discussion [1] as I read it gets to wilful assignment an ID for non-existing real DSDT example. Rafael already told [2] how this device would be enumerated using compatible string. To be more precise look at the possible DSDT excerpt below: Device (LDX0) { Name (_HID, "PRP0001") Name (_DDN, "TI LP3952 compatible led driver") ... }) Name (_DSD, Package () { ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package () {"compatible", "ti,lp3952"}, ... } }) Based on above, remove non-official ACPI IDs and enumeration from the driver. Note: currently driver has no compatible strings at all, to make above working one should add at least one. [1] https://e2e.ti.com/support/power_management/led_driver/f/192/t/524926 [2] https://www.spinics.net/lists/linux-acpi/msg67125.html Cc: Tony Makkiel Signed-off-by: Andy Shevchenko Signed-off-by: Jacek Anaszewski drivers/leds/Kconfig | 1 - drivers/leds/leds-lp3952.c | 11 ----------- 2 files changed, 12 deletions(-) commit 1b8955bc5ac575009835e371ae55e7f3af2197a9 Author: David Engraf Date: Fri Feb 17 08:51:03 2017 +0100 timers, sched_clock: Update timeout for clock wrap The scheduler clock framework may not use the correct timeout for the clock wrap. This happens when a new clock driver calls sched_clock_register() after the kernel called sched_clock_postinit(). In this case the clock wrap timeout is too long thus sched_clock_poll() is called too late and the clock already wrapped. On my ARM system the scheduler was no longer scheduling any other task than the idle task because the sched_clock() wrapped. Signed-off-by: David Engraf Signed-off-by: John Stultz kernel/time/sched_clock.c | 5 +++++ 1 file changed, 5 insertions(+) commit e1c09219af364d17bcc432d86ad342bec1653dc5 Author: John Stultz Date: Wed Feb 22 14:04:13 2017 -0800 MAINTAINERS: Add Stephen Boyd as timekeeping reviewer After showing expertise and presenting on the timekeeping subsystem at ELC[1], Stephen clearly should be included in the maintainer list. [1] https://www.youtube.com/watch?v=Puv4mW55bF8 Acked-by: Stephen Boyd Signed-off-by: John Stultz MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit e19e64aaf4057cc7ba20d4f573bcda8ea0df8a8c Author: Neil Armstrong Date: Mon Mar 13 10:10:52 2017 +0100 ARM64: dts: meson-gx: Prepend GX generic compatible like other nodes Prepend the compatible strings with a GX generic name in nodes compatible with the GXBB HW and keep the same scheme as other nodes. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 932b3363c0bcd45c90c436ab91c688f064fa8e82 Author: Neil Armstrong Date: Mon Mar 13 10:10:51 2017 +0100 ARM64: dts: meson-gx: empty line cleanup Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 1 - 1 file changed, 1 deletion(-) commit 04b36df4067d108383dc10c3ce7cfc45ddec409a Author: Neil Armstrong Date: Mon Mar 13 10:10:50 2017 +0100 ARM64: dts: meson-gx: Finally move common nodes to GX dtsi Since we know the GXBB and GXL/GXM share more hardware, we can safely move the remaining peripheral nodes present in the GXBB dtsi to the common GX dtsi. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 24 ++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 43 ++++++----------------------- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 8 ++++++ 3 files changed, 40 insertions(+), 35 deletions(-) commit ac572452156963588b285049ba3895bef0f17642 Author: Dan Carpenter Date: Thu Mar 23 13:40:49 2017 +0300 leds: mt6323: Fix an off by one bug in probe It should be ">= MT6323_MAX_LEDS" instead of ">". Also "reg" is a u32 so it can't be negative and we can remove the test for negative values. Fixes: 216ec6cc4c19 ("leds: Add LED support for MT6323 PMIC") Signed-off-by: Dan Carpenter Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski drivers/leds/leds-mt6323.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a9bc330df9b8fb3245d50a198b5c6d4d634b06f Author: Carlo Caione Date: Fri Mar 3 16:17:59 2017 +0100 firmware: meson-sm: Allow 0 as valid return value Some special SMC calls (i.e. the function used to retrieve the serial number of the Amlogic SoCs) returns 0 in the register 0 also when the data was successfully read instead of using the register to hold the number of bytes returned in the bounce buffer as expected. With the current implementation of the driver this is seen as an error and meson_sm_call_read() returns an error even though the data was correctly read. To deal with this when we have no information about the amount of read data (that is 0 is returned by the SMC call) we return to the caller the requested amount of data and 0 as return value. Signed-off-by: Carlo Caione Acked-by: Mark Rutland Signed-off-by: Kevin Hilman drivers/firmware/meson/meson_sm.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 83e007a0c6a3f4bfdf8f3f8d0fc266cda189b3d6 Author: Carlo Caione Date: Fri Mar 3 16:17:58 2017 +0100 firmware: meson-sm: Check for buffer output size After the data is read by the secure monitor driver it is being copied in the output buffer checking only the size of the bounce buffer but not the size of the output buffer. Fix this in the secure monitor driver slightly changing the API. Fix also the efuse driver that it is the only driver using this API to not break bisectability. Signed-off-by: Carlo Caione Acked-by: Srinivas Kandagatla # for nvmem Acked-by: Mark Rutland Signed-off-by: Kevin Hilman drivers/firmware/meson/meson_sm.c | 10 +++++++--- drivers/nvmem/meson-efuse.c | 2 +- include/linux/firmware/meson/meson_sm.h | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) commit 0695bd99c0d22bef4d9d4c72cf537b722ba98531 Author: Nicolai Stange Date: Mon Feb 6 22:12:04 2017 +0100 clockevents: Make clockevents_config() static A clockevent device's rate should be configured before or at registration and changed afterwards through clockevents_update_freq() only. For the configuration at registration, we already have clockevents_config_and_register(). Right now, there are no clockevents_config() users outside of the clockevents core. To mitigiate the risk of drivers errorneously reconfiguring their rates through clockevents_config() *after* device registration, make clockevents_config() static. Signed-off-by: Nicolai Stange Signed-off-by: John Stultz include/linux/clockchips.h | 1 - kernel/time/clockevents.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit a17e0178fa2898bd8c4ccaaefa83c729759a361c Author: Nicolai Stange Date: Mon Feb 6 22:12:03 2017 +0100 clocksource: h8300_timer8: Don't reset rate in ->set_state_oneshot() With the upcoming NTP correction related rate adjustments to be implemented in the clockevents core, the latter needs to get informed about every rate change of a clockevent device made after its registration. Currently, h8300_timer8 violates this requirement in that it registers its clockevent device with the correct rate, but resets its ->mult and ->rate values in timer8_clock_event_start(), called from its ->set_state_oneshot() function. It seems like commit 4633f4cac85a ("clocksource/drivers/h8300: Cleanup startup and remove module code."), which introduced the rate initialization at registration, missed to remove the manual setting of ->mult and ->shift from timer8_clock_event_start(). Purge the setting of ->mult, ->shift, ->min_delta_ns and ->max_delta_ns from timer8_clock_event_start(). Signed-off-by: Nicolai Stange Signed-off-by: John Stultz drivers/clocksource/h8300_timer8.c | 8 -------- 1 file changed, 8 deletions(-) commit 4e53aa2fde4124878fc6b2183d6e8ec46e12ceb0 Author: Nicolai Stange Date: Mon Feb 6 22:12:02 2017 +0100 clocksource: em_sti: Compute rate before registration With the upcoming NTP correction related rate adjustments to be implemented in the clockevents core, the latter needs to get informed about every rate change of a clockevent device made after its registration. Currently, em_sti violates this requirement in that it registers its clockevent device with a dummy rate and sets its final rate through clockevents_config() called from its ->set_state_oneshot(). This patch moves the setting of the clockevent device's rate to its registration. I checked all current em_sti users in arch/arm/mach-shmobile and right now, none of them changes any rate in any clock tree relevant to em_sti after their respective time_init(). Since all em_sti instances are created after time_init(), none of them should ever observe any clock rate changes. - Determine the ->rate value in em_sti_probe() at device probing rather than at first usage. - Set the clockevent device's rate at its registration. - Although not strictly necessary for the upcoming clockevent core changes, set the clocksource's rate at its registration for consistency. Signed-off-by: Nicolai Stange Signed-off-by: John Stultz drivers/clocksource/em_sti.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 3814ae092d36da04d5fbaf777c1564dc4ee68559 Author: Nicolai Stange Date: Mon Feb 6 22:12:01 2017 +0100 clocksource: em_sti: Split clock prepare and enable steps Currently, the em_sti driver prepares and enables the needed clock in em_sti_enable(), potentially called through its clockevent device's ->set_state_oneshot(). However, the clk_prepare() step may sleep whereas tick_program_event() and thus, ->set_state_oneshot(), can be called in atomic context. Split the clk_prepare_enable() in em_sti_enable() into two steps: - prepare the clock at device probing via clk_prepare() - and enable it in em_sti_enable() via clk_enable(). Slightly reorder resource initialization in em_sti_probe() in order to facilitate error handling in later patches. Signed-off-by: Nicolai Stange Signed-off-by: John Stultz drivers/clocksource/em_sti.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit c3c0a20df9fc55e2243a31f91a943b3e8ba61289 Author: Nicolai Stange Date: Mon Feb 6 22:12:00 2017 +0100 clocksource: sh_tmu: Compute rate before registration again With the upcoming NTP correction related rate adjustments to be implemented in the clockevents core, the latter needs to get informed about every rate change of a clockevent device made after its registration. Currently, sh_tmu violates this requirement in that it registers its clockevent device with a dummy rate and sets its final rate through clockevents_config() called from its ->set_state_oneshot() and ->set_state_periodic() functions respectively. This patch moves the setting of the clockevent device's rate to its registration. Note that there has been some back and forth regarding this question with respect to the clocksource also provided by this driver: commit 66f49121ffa4 ("clocksource: sh_tmu: compute mult and shift before registration") moves the rate determination from the clocksource's ->enable() function to before its registration. OTOH, the later commit 0aeac458d9eb ("clocksource: sh_tmu: __clocksource_updatefreq_hz() update") basically reverts this, saying "Without this patch the old code uses clocksource_register() together with a hack that assumes a never changing clock rate." However, I checked all current sh_tmu users in arch/sh as well as in arch/arm/mach-shmobile carefully and right now, none of them changes any rate in any clock tree relevant to sh_tmu after their respective time_init(). Since all sh_tmu instances are created after time_init(), none of them should ever observe any clock rate changes. What's more, both, a clocksource as well as a clockevent device, can immediately get selected for use at their registration and thus, enabled at this point already. So it's probably safer to assume a "never changing clock rate" here. - Move the struct sh_tmu_channel's ->rate member to struct sh_tmu_device: it's a property of the underlying clock which is in turn specific to the sh_tmu_device. - Determine the ->rate value in sh_tmu_setup() at device probing rather than at first usage. - Set the clockevent device's rate at its registration. - Although not strictly necessary for the upcoming clockevent core changes, set the clocksource's rate at its registration for consistency. Signed-off-by: Nicolai Stange Signed-off-by: John Stultz drivers/clocksource/sh_tmu.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 890f423b266623e1cfb3a97b864f3e5039bdfbb9 Author: Nicolai Stange Date: Mon Feb 6 22:11:59 2017 +0100 clocksource: sh_cmt: Compute rate before registration again With the upcoming NTP correction related rate adjustments to be implemented in the clockevents core, the latter needs to get informed about every rate change of a clockevent device made after its registration. Currently, sh_cmt violates this requirement in that it registers its clockevent device with a dummy rate and sets its final ->mult and ->shift values from its ->set_state_oneshot() and ->set_state_periodic() functions respectively. This patch moves the setting of the clockevent device's ->mult and ->shift values to before its registration. Note that there has been some back and forth regarding this question with respect to the clocksource also provided by this driver: commit f4d7c3565c16 ("clocksource: sh_cmt: compute mult and shift before registration") moves the rate determination from the clocksource's ->enable() function to before its registration. OTOH, the later commit 3593f5fe40a1 ("clocksource: sh_cmt: __clocksource_updatefreq_hz() update") basically reverts this, saying "Without this patch the old code uses clocksource_register() together with a hack that assumes a never changing clock rate." However, I checked all current sh_cmt users in arch/sh as well as in arch/arm/mach-shmobile carefully and right now, none of them changes any rate in any clock tree relevant to sh_cmt after their respective time_init(). Since all sh_cmt instances are created after time_init(), none of them should ever observe any clock rate changes. What's more, both, a clocksource as well as a clockevent device, can immediately get selected for use at their registration and thus, enabled at this point already. So it's probably safer to assume a "never changing clock rate" here. - Move the struct sh_cmt_channel's ->rate member to struct sh_cmt_device: it's a property of the underlying clock which is in turn specific to the sh_cmt_device. - Determine the ->rate value in sh_cmt_setup() at device probing rather than at first usage. - Set the clockevent device's ->mult and ->shift values right before its registration. - Although not strictly necessary for the upcoming clockevent core changes, set the clocksource's rate at its registration for consistency. Signed-off-by: Nicolai Stange Signed-off-by: John Stultz drivers/clocksource/sh_cmt.c | 45 ++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) commit f69ae4f58a198ad15b0422637434d2bcf6fc2e2a Author: Charles Keepax Date: Wed Mar 22 17:15:35 2017 +0000 pinctrl: samsung: Use devres version of gpiochip_add_data Use devm_gpiochip_add_data to simplify the error path in samsung_gpiolib_register. Signed-off-by: Charles Keepax Signed-off-by: Krzysztof Kozlowski drivers/pinctrl/samsung/pinctrl-samsung.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 1abd18d1a51a95bf90c10459f1ed5c692660408e Author: Charles Keepax Date: Wed Mar 22 17:15:34 2017 +0000 pinctrl: samsung: Register pinctrl before GPIO If we request a GPIO hog, then gpiochip_add_data will attempt to request some of its own GPIOs. The driver also uses gpiochip_generic_request which means that for any GPIO request to succeed the pinctrl needs to be registered. Currently however the driver registers the GPIO and then the pinctrl meaning all GPIO hog requests will fail, which then in turn causes the whole driver to fail probe. Fix this up by ensuring we register the pinctrl first. This does require us to manually set the GPIO base for the pinctrl. Fortunately the driver already assigns a fixed GPIO base, in samsung_gpiolib_register, and uses the same calculation it does for the pin_base. Meaning the two will always be the same and allowing us to reuse the pinbase and avoid the issue. Although currently there are no users of GPIO hogs in mainline there are plenty of Samsung based boards that are widely used for development purposes of other hardware. Indeed we hit this issue whilst attaching some additional hardware to an Arndale system. Signed-off-by: Charles Keepax Signed-off-by: Krzysztof Kozlowski drivers/pinctrl/samsung/pinctrl-samsung.c | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) commit e1d7eb0c8fc9c33ef60ac31172fb0fbb78c24271 Author: Marek Szyprowski Date: Thu Mar 23 09:03:23 2017 +0100 pinctrl: samsung: Add support for pad retention control for Exynos5433 SoCs This patch adds support for retention control for Exynos5433 SoCs. Three groups of pins has been defined for retention control: common shared group for ALIVE, CPIF, eSE, FINGER, IMEM, NFC, PERIC, TOUCH pin banks and separate control for FSYS and AUD pin banks, for which PMU retention registers match whole banks. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski drivers/pinctrl/samsung/pinctrl-exynos.c | 58 ++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 8fe9bf074268323353c4e44d6fdfff10204e14ba Author: Marek Szyprowski Date: Thu Mar 23 09:03:22 2017 +0100 pinctrl: samsung: Ensure that pad retention is disabled on driver init When pin controller device is a part of power domain, there is no guarantee that the power domain was not turned off and then on during boot process before probing of the pin control driver. If it happened, then pin control driver should ensure that pad retention is turned off during its probe call. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski drivers/pinctrl/samsung/pinctrl-exynos.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6f359f99b8c2ff3b09329611da00fe39a7c10e7e Author: Arnd Bergmann Date: Mon Mar 20 09:49:27 2017 +0100 qedf: fix wrong le16 conversion gcc points out that we are converting a 16-bit integer into a 32-bit little-endian type and assigning that to 16-bit little-endian will end up with a zero: drivers/scsi/qedf/drv_fcoe_fw_funcs.c: In function 'init_initiator_rw_fcoe_task': include/uapi/linux/byteorder/big_endian.h:32:26: error: large integer implicitly truncated to unsigned type [-Werror=overflow] t_st_ctx->read_write.rx_id = cpu_to_le32(FCOE_RX_ID); The correct solution appears to be to just use a 16-bit byte swap instead. Fixes: be086e7c53f1 ("qed*: Utilize Firmware 8.15.3.0") Signed-off-by: Arnd Bergmann Acked-by: Chad Dupuis Signed-off-by: David S. Miller drivers/scsi/qedf/drv_fcoe_fw_funcs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e15d2774b8c096f116bf7192b37e8652da71369e Author: Martin Blumenstingl Date: Sat Mar 18 13:36:57 2017 +0100 ARM64: dts: meson-gxl: add support for the Khadas VIM board The Khadas VIM series consists of two boards which are almost identical: They are both using the same GXL S905X SoC, 100Mbit/s ethernet (through the SoC-internal PHY), 2GB DDR3 memory, a micro-SD card slot, onboard eMMC, Broadcom based SDIO WIFI, 2x USB A and 1x USB Type-C (the latter with OTG support). The red LED is driven by PWM_AO_B (which allows dimming), while the blue LED is managed by the firmware. The differences are: - the VIM Pro has a 16GB eMMC module, while the VIM only has 8GB - the VIM Pro uses an AP6255 a/b/g/n/ac WIFI module, while the VIM comes with an AP6212 b/g/n SDIO WIFI module (the Vim uses an 8GB eMMC module, while The boards are based on Amlogic's GXL S905X P212 reference design, which is why most of the functionality (all MMC controllers and power sequences, IR remote input, the main UART, ADC and ethernet) is simply inherited from meson-gxl-s905x-p212.dtsi. Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/Makefile | 1 + .../dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 114 +++++++++++++++++++++ 2 files changed, 115 insertions(+) commit 02eff15eefc8c70c86f58683adcc553c778f73c2 Author: Martin Blumenstingl Date: Sat Mar 18 13:36:56 2017 +0100 dt-bindings: amlogic: add the Khadas VIM Signed-off-by: Martin Blumenstingl Acked-by: Rob Herring Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/arm/amlogic.txt | 2 ++ 1 file changed, 2 insertions(+) commit 40b9e3f92e616af1fa200827dd49f8a8ff3f8235 Author: Martin Blumenstingl Date: Sat Mar 18 13:36:55 2017 +0100 devicetree: add vendor prefix for Khadas Khadas is a new sub-brand of "Shenzhen Wesion Technology Co., Ltd.". They are developing Amlogic and Rockchip based "DIY boxes" (single board computers): http://khadas.com/ They are best know for their latest product: the Khadas VIM (an Amlogic GXL S905X based SBC). Signed-off-by: Martin Blumenstingl Acked-by: Rob Herring Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit e98fd13413672ce8c4f10b6fa3b34658f738715e Author: Martin Blumenstingl Date: Sat Mar 18 13:27:36 2017 +0100 ARM64: dts: amlogic: meson-gxl: add the missing PWM pins This adds the new DT nodes for the missing PWM pins in the EE and AO domain. Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Reviewed-by: Neil Armstrong Acked-by: Linus Walleij Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 56 ++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 028ba8aad3f103011f0110b7d5857a1b4fdd0e8d Merge: 4deece6 dec2653 Author: David S. Miller Date: Thu Mar 23 11:53:31 2017 -0700 Merge branch 'qed-management-interaction-and-feature-changes' Yuval Mintz says: ==================== qed: Management interaction & feature changes All patches in this series either affect direct interaction with the management firmware, or changes logic relating to some values retrieved from it. Patch #1 revises the basic logic for sending messages to the management firmware and there completion, and is the most significant [at least code-wise] of the bunch. Patch #2 changes infrastrcure in a way that should better protect us form mistakes leading to stack corruption such as was fixed in bb4802428432 ("qed: Prevent stack corruption on MFW interaction"). Patch #3 corrects some update API endian issue [sent here as it would create conflicts with #2, and because it's lack would create a rather insignifcant problem]. Patch #4 removes some unnecessary logging, allowing cleaner forward compatibility with future management firmware versions. Patches #5, #6 slightly change the number of possible L2 queues in some scenarios, leading to the possibility of having more queues / VFS. ==================== Signed-off-by: David S. Miller commit dec26533ae5b00f3f15759bc195cae6fe89a1f42 Author: Mintz, Yuval Date: Thu Mar 23 15:50:20 2017 +0200 qed: Reserve VF feature before PF Align the driver feature distribution with the flow utilized by the management firmware - first reserve L2 queues for VFs and use all the remaining for the PF. The current distribution might lead to PFs with an enormous amount of queues, but at the same time leave us with insufficient resources for starting all VFs. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit 810bb1f0d32e6d1d30580d4812409133ebc6fb8e Author: Mintz, Yuval Date: Thu Mar 23 15:50:19 2017 +0200 qed: Don't waste SBs unused by RoCE When RoCE is enabled on a given L2 interface, the interrupt lines are divided equally between L2 and RoCE - But in case number of lines needed for RoCE is limited by number of available CNQs, we can utilize the additional lines for L2. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 3981594409f3ee9ee7364d3262a22f0f1e504eee Author: Mintz, Yuval Date: Thu Mar 23 15:50:18 2017 +0200 qed: Reduce verbosity of unimplemented MFW messages Management firmware and driver are meant to be both backward and forward compatibile with each other. If a new mangement firmware would work with an older driver, it's possible that driver would receive indications which are meaningless to it. That's perfectly acceptible from the firmware part - so no need to log such messages at default verbosity; That would only serve to confuse users. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_mcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 179910020759bffe8d75f0b69e6307c25e4d660d Author: Mintz, Yuval Date: Thu Mar 23 15:50:17 2017 +0200 qed: Correct endian order of MAC passed to MFW The management firmware is running on a Big Endian processor, and when running on LE platform HW is configured to swap access to memory shared between management firmware and driver on 32-bit granulariy. As a result, for matters of simplicity most of the APIs between driver and management firmware are based on 32-bit variables. MAC settings are one exception, as driver needs to fill a byte array when indicating to management firmware that primary MAC has changed. Due to the swap, driver must make sure that the mac that was provided in byte-order would be translated into native order, otherwise after the swap the management firmware would read it swapped. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_mcp.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 2f67af8c596e16760dc7e7d28ee0edd7ce59f2b4 Author: Tomer Tayar Date: Thu Mar 23 15:50:16 2017 +0200 qed: Pass src/dst sizes when interacting with MFW The driver interaction with management firmware involves a union of all the data-members relating to the commands the driver prepares. Current interface assumes the caller always passes such a union - but thats cumbersome as well as risky [chancing a stack corruption in case caller accidentally passes a smaller member instead of union]. Change implementation so that caller could pass a pointer to any of the members instead of the union. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_mcp.c | 119 ++++++++++++++++-------------- drivers/net/ethernet/qlogic/qed/qed_mcp.h | 6 +- 2 files changed, 66 insertions(+), 59 deletions(-) commit 4ed1eea82a21ba460e53468cc1c73cfdf83d0e00 Author: Tomer Tayar Date: Thu Mar 23 15:50:15 2017 +0200 qed: Revise MFW command locking Interaction of driver -> management firmware is based on a one-pending mailbox [per interface], and various mailbox commands need to be synchronized. Current scheme is messy, and there's a difficulty extending it as it deals differently with various commands as well as making assumption on the required behavior for load/unload requests. Drop the current scheme into a completion-list-based approach; Each flow would try sending the command when possible, allowing one flow to complete another flow's completion and relieve the mailbox before sending its own command. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_mcp.c | 405 ++++++++++++++++++++---------- drivers/net/ethernet/qlogic/qed/qed_mcp.h | 11 +- 2 files changed, 280 insertions(+), 136 deletions(-) commit 6bff547451fb97c85f86f9b7589589fe1cb26a18 Merge: 342bef7 3cdf2f8 Author: Tony Lindgren Date: Thu Mar 23 11:31:46 2017 -0700 Merge branch 'hwmod-cleanup' into omap-for-v4.12/soc commit ab4949640d6674b617b314ad3c2c00353304bab9 Author: Arnd Bergmann Date: Thu Mar 23 16:06:13 2017 +0100 reiserfs: avoid a -Wmaybe-uninitialized warning The latest gcc-7.0.1 snapshot warns about an unintialized variable use: In file included from fs/reiserfs/lbalance.c:8:0: fs/reiserfs/lbalance.c: In function 'leaf_item_bottle.isra.3': fs/reiserfs/reiserfs.h:1279:13: error: '*((void *)&n_ih+8).v' may be used uninitialized in this function [-Werror=maybe-uninitialized] v2->v = (v2->v & cpu_to_le64(15ULL << 60)) | cpu_to_le64(offset); ~~^~~ fs/reiserfs/reiserfs.h:1279:13: error: '*((void *)&n_ih+8).v' may be used uninitialized in this function [-Werror=maybe-uninitialized] v2->v = (v2->v & cpu_to_le64(15ULL << 60)) | cpu_to_le64(offset); This happens because the offset/type pair that is stored in ih.key.u.k_offset_v2 is actually uninitialized when we call set_le_ih_k_offset() and set_le_ih_k_type(). After we have called both, all data is correct, but the first of the two reads uninitialized data for the type field and writes it back before it gets overwritten. This works around the warning by initializing the k_offset_v2 through the slightly larger memcpy(). [JK: Remove now unused define and make it obvious we initialize the key] Signed-off-by: Arnd Bergmann Signed-off-by: Jan Kara fs/reiserfs/lbalance.c | 2 +- fs/reiserfs/reiserfs.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 56222b212e8edb1cf51f5dd73ff645809b082b40 Author: Peter Zijlstra Date: Wed Mar 22 11:36:00 2017 +0100 futex: Drop hb->lock before enqueueing on the rtmutex When PREEMPT_RT_FULL does the spinlock -> rt_mutex substitution the PI chain code will (falsely) report a deadlock and BUG. The problem is that it hold hb->lock (now an rt_mutex) while doing task_blocks_on_rt_mutex on the futex's pi_state::rtmutex. This, when interleaved just right with futex_unlock_pi() leads it to believe to see an AB-BA deadlock. Task1 (holds rt_mutex, Task2 (does FUTEX_LOCK_PI) does FUTEX_UNLOCK_PI) lock hb->lock lock rt_mutex (as per start_proxy) lock hb->lock Which is a trivial AB-BA. It is not an actual deadlock, because it won't be holding hb->lock by the time it actually blocks on the rt_mutex, but the chainwalk code doesn't know that and it would be a nightmare to handle this gracefully. To avoid this problem, do the same as in futex_unlock_pi() and drop hb->lock after acquiring wait_lock. This still fully serializes against futex_unlock_pi(), since adding to the wait_list does the very same lock dance, and removing it holds both locks. Aside of solving the RT problem this makes the lock and unlock mechanism symetric and reduces the hb->lock held time. Reported-and-tested-by: Sebastian Andrzej Siewior Suggested-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Cc: juri.lelli@arm.com Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: dvhart@infradead.org Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170322104152.161341537@infradead.org Signed-off-by: Thomas Gleixner kernel/futex.c | 30 +++++++++++++++++-------- kernel/locking/rtmutex.c | 49 +++++++++++++++++++++++------------------ kernel/locking/rtmutex_common.h | 3 +++ 3 files changed, 52 insertions(+), 30 deletions(-) commit bebe5b514345f09be2c15e414d076b02ecb9cce8 Author: Peter Zijlstra Date: Wed Mar 22 11:35:59 2017 +0100 futex: Futex_unlock_pi() determinism The problem with returning -EAGAIN when the waiter state mismatches is that it becomes very hard to proof a bounded execution time on the operation. And seeing that this is a RT operation, this is somewhat important. While in practise; given the previous patch; it will be very unlikely to ever really take more than one or two rounds, proving so becomes rather hard. However, now that modifying wait_list is done while holding both hb->lock and wait_lock, the scenario can be avoided entirely by acquiring wait_lock while still holding hb-lock. Doing a hand-over, without leaving a hole. Signed-off-by: Peter Zijlstra (Intel) Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: dvhart@infradead.org Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170322104152.112378812@infradead.org Signed-off-by: Thomas Gleixner kernel/futex.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit cfafcd117da0216520568c195cb2f6cd1980c4bb Author: Peter Zijlstra Date: Wed Mar 22 11:35:58 2017 +0100 futex: Rework futex_lock_pi() to use rt_mutex_*_proxy_lock() By changing futex_lock_pi() to use rt_mutex_*_proxy_lock() all wait_list modifications are done under both hb->lock and wait_lock. This closes the obvious interleave pattern between futex_lock_pi() and futex_unlock_pi(), but not entirely so. See below: Before: futex_lock_pi() futex_unlock_pi() unlock hb->lock lock hb->lock unlock hb->lock lock rt_mutex->wait_lock unlock rt_mutex_wait_lock -EAGAIN lock rt_mutex->wait_lock list_add unlock rt_mutex->wait_lock schedule() lock rt_mutex->wait_lock list_del unlock rt_mutex->wait_lock -EAGAIN lock hb->lock After: futex_lock_pi() futex_unlock_pi() lock hb->lock lock rt_mutex->wait_lock list_add unlock rt_mutex->wait_lock unlock hb->lock schedule() lock hb->lock unlock hb->lock lock hb->lock lock rt_mutex->wait_lock list_del unlock rt_mutex->wait_lock lock rt_mutex->wait_lock unlock rt_mutex_wait_lock -EAGAIN unlock hb->lock It does however solve the earlier starvation/live-lock scenario which got introduced with the -EAGAIN since unlike the before scenario; where the -EAGAIN happens while futex_unlock_pi() doesn't hold any locks; in the after scenario it happens while futex_unlock_pi() actually holds a lock, and then it is serialized on that lock. Signed-off-by: Peter Zijlstra (Intel) Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: dvhart@infradead.org Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170322104152.062785528@infradead.org Signed-off-by: Thomas Gleixner kernel/futex.c | 77 +++++++++++++++++++++++++++++------------ kernel/locking/rtmutex.c | 26 ++++---------- kernel/locking/rtmutex_common.h | 1 - 3 files changed, 62 insertions(+), 42 deletions(-) commit 38d589f2fd08f1296aea3ce62bebd185125c6d81 Author: Peter Zijlstra Date: Wed Mar 22 11:35:57 2017 +0100 futex,rt_mutex: Restructure rt_mutex_finish_proxy_lock() With the ultimate goal of keeping rt_mutex wait_list and futex_q waiters consistent it's necessary to split 'rt_mutex_futex_lock()' into finer parts, such that only the actual blocking can be done without hb->lock held. Split split_mutex_finish_proxy_lock() into two parts, one that does the blocking and one that does remove_waiter() when the lock acquire failed. When the rtmutex was acquired successfully the waiter can be removed in the acquisiton path safely, since there is no concurrency on the lock owner. This means that, except for futex_lock_pi(), all wait_list modifications are done with both hb->lock and wait_lock held. [bigeasy@linutronix.de: fix for futex_requeue_pi_signal_restart] Signed-off-by: Peter Zijlstra (Intel) Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: dvhart@infradead.org Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170322104152.001659630@infradead.org Signed-off-by: Thomas Gleixner kernel/futex.c | 7 ++++-- kernel/locking/rtmutex.c | 52 +++++++++++++++++++++++++++++++++++------ kernel/locking/rtmutex_common.h | 8 ++++--- 3 files changed, 55 insertions(+), 12 deletions(-) commit 50809358dd7199aa7ce232f6877dd09ec30ef374 Author: Peter Zijlstra Date: Wed Mar 22 11:35:56 2017 +0100 futex,rt_mutex: Introduce rt_mutex_init_waiter() Since there's already two copies of this code, introduce a helper now before adding a third one. Signed-off-by: Peter Zijlstra (Intel) Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: dvhart@infradead.org Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170322104151.950039479@infradead.org Signed-off-by: Thomas Gleixner kernel/futex.c | 5 +---- kernel/locking/rtmutex.c | 12 +++++++++--- kernel/locking/rtmutex_common.h | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) commit 16ffa12d742534d4ff73e8b3a4e81c1de39196f0 Author: Peter Zijlstra Date: Wed Mar 22 11:35:55 2017 +0100 futex: Pull rt_mutex_futex_unlock() out from under hb->lock There's a number of 'interesting' problems, all caused by holding hb->lock while doing the rt_mutex_unlock() equivalient. Notably: - a PI inversion on hb->lock; and, - a SCHED_DEADLINE crash because of pointer instability. The previous changes: - changed the locking rules to cover {uval,pi_state} with wait_lock. - allow to do rt_mutex_futex_unlock() without dropping wait_lock; which in turn allows to rely on wait_lock atomicity completely. - simplified the waiter conundrum. It's now sufficient to hold rtmutex::wait_lock and a reference on the pi_state to protect the state consistency, so hb->lock can be dropped before calling rt_mutex_futex_unlock(). Signed-off-by: Peter Zijlstra (Intel) Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: dvhart@infradead.org Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170322104151.900002056@infradead.org Signed-off-by: Thomas Gleixner kernel/futex.c | 154 +++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 100 insertions(+), 54 deletions(-) commit 73d786bd043ebc855f349c81ea805f6b11cbf2aa Author: Peter Zijlstra Date: Wed Mar 22 11:35:54 2017 +0100 futex: Rework inconsistent rt_mutex/futex_q state There is a weird state in the futex_unlock_pi() path when it interleaves with a concurrent futex_lock_pi() at the point where it drops hb->lock. In this case, it can happen that the rt_mutex wait_list and the futex_q disagree on pending waiters, in particular rt_mutex will find no pending waiters where futex_q thinks there are. In this case the rt_mutex unlock code cannot assign an owner. The futex side fixup code has to cleanup the inconsistencies with quite a bunch of interesting corner cases. Simplify all this by changing wake_futex_pi() to return -EAGAIN when this situation occurs. This then gives the futex_lock_pi() code the opportunity to continue and the retried futex_unlock_pi() will now observe a coherent state. The only problem is that this breaks RT timeliness guarantees. That is, consider the following scenario: T1 and T2 are both pinned to CPU0. prio(T2) > prio(T1) CPU0 T1 lock_pi() queue_me() <- Waiter is visible preemption T2 unlock_pi() loops with -EAGAIN forever Which is undesirable for PI primitives. Future patches will rectify this. Signed-off-by: Peter Zijlstra (Intel) Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: dvhart@infradead.org Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170322104151.850383690@infradead.org Signed-off-by: Thomas Gleixner kernel/futex.c | 50 ++++++++++++++------------------------------------ 1 file changed, 14 insertions(+), 36 deletions(-) commit bf92cf3a5100f5a0d5f9834787b130159397cb22 Author: Peter Zijlstra Date: Wed Mar 22 11:35:53 2017 +0100 futex: Cleanup refcounting Add a put_pit_state() as counterpart for get_pi_state() so the refcounting becomes consistent. Signed-off-by: Peter Zijlstra (Intel) Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: dvhart@infradead.org Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170322104151.801778516@infradead.org Signed-off-by: Thomas Gleixner kernel/futex.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 734009e96d1983ad739e5b656e03430b3660c913 Author: Peter Zijlstra Date: Wed Mar 22 11:35:52 2017 +0100 futex: Change locking rules Currently futex-pi relies on hb->lock to serialize everything. But hb->lock creates another set of problems, especially priority inversions on RT where hb->lock becomes a rt_mutex itself. The rt_mutex::wait_lock is the most obvious protection for keeping the futex user space value and the kernel internal pi_state in sync. Rework and document the locking so rt_mutex::wait_lock is held accross all operations which modify the user space value and the pi state. This allows to invoke rt_mutex_unlock() (including deboost) without holding hb->lock as a next step. Nothing yet relies on the new locking rules. Signed-off-by: Peter Zijlstra (Intel) Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: dvhart@infradead.org Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170322104151.751993333@infradead.org Signed-off-by: Thomas Gleixner kernel/futex.c | 165 +++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 132 insertions(+), 33 deletions(-) commit 5293c2efda37775346885c7e924d4ef7018ea60b Author: Peter Zijlstra Date: Wed Mar 22 11:35:51 2017 +0100 futex,rt_mutex: Provide futex specific rt_mutex API Part of what makes futex_unlock_pi() intricate is that rt_mutex_futex_unlock() -> rt_mutex_slowunlock() can drop rt_mutex::wait_lock. This means it cannot rely on the atomicy of wait_lock, which would be preferred in order to not rely on hb->lock so much. The reason rt_mutex_slowunlock() needs to drop wait_lock is because it can race with the rt_mutex fastpath, however futexes have their own fast path. Since futexes already have a bunch of separate rt_mutex accessors, complete that set and implement a rt_mutex variant without fastpath for them. Signed-off-by: Peter Zijlstra (Intel) Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: dvhart@infradead.org Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170322104151.702962446@infradead.org Signed-off-by: Thomas Gleixner kernel/futex.c | 30 +++++++++++----------- kernel/locking/rtmutex.c | 55 ++++++++++++++++++++++++++++++----------- kernel/locking/rtmutex_common.h | 9 +++++-- 3 files changed, 62 insertions(+), 32 deletions(-) commit fffa954fb528963c2fb7b0c0084eb77e2be7ab52 Author: Peter Zijlstra Date: Wed Mar 22 11:35:50 2017 +0100 futex: Remove rt_mutex_deadlock_account_*() These are unused and clutter up the code. Signed-off-by: Peter Zijlstra (Intel) Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: dvhart@infradead.org Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170322104151.652692478@infradead.org Signed-off-by: Thomas Gleixner kernel/locking/rtmutex-debug.c | 9 -------- kernel/locking/rtmutex-debug.h | 3 --- kernel/locking/rtmutex.c | 47 ++++++++++++++++-------------------------- kernel/locking/rtmutex.h | 2 -- 4 files changed, 18 insertions(+), 43 deletions(-) commit 1b367ece0d7e696cab1c8501bab282cc6a538b3f Author: Peter Zijlstra Date: Wed Mar 22 11:35:49 2017 +0100 futex: Use smp_store_release() in mark_wake_futex() Since the futex_q can dissapear the instruction after assigning NULL, this really should be a RELEASE barrier. That stops loads from hitting dead memory too. Signed-off-by: Peter Zijlstra (Intel) Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: dvhart@infradead.org Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170322104151.604296452@infradead.org Signed-off-by: Thomas Gleixner kernel/futex.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 499f5aca2cdd5e958b27e2655e7e7f82524f46b1 Author: Peter Zijlstra Date: Wed Mar 22 11:35:48 2017 +0100 futex: Cleanup variable names for futex_top_waiter() futex_top_waiter() returns the top-waiter on the pi_mutex. Assinging this to a variable 'match' totally obscures the code. Signed-off-by: Peter Zijlstra (Intel) Cc: juri.lelli@arm.com Cc: bigeasy@linutronix.de Cc: xlpang@redhat.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: jdesfossez@efficios.com Cc: dvhart@infradead.org Cc: bristot@redhat.com Link: http://lkml.kernel.org/r/20170322104151.554710645@infradead.org Signed-off-by: Thomas Gleixner kernel/futex.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 8bc4793bd083158bd266157e85ea4762577a5be6 Author: Koji Matsuoka Date: Mon Feb 27 07:23:34 2017 -0300 [media] soc-camera: fix rectangle adjustment in cropping update_subrect() adjusts the sub-rectangle to be inside a base area. It checks width and height to not exceed those of the area, then it checks the low border (left or top) to lie within the area, then the high border (right or bottom) to lie there too. This latter check has a bug, which is fixed by this patch. Signed-off-by: Koji Matsuoka Signed-off-by: Yoshihiro Kaneko [g.liakhovetski@gmx.de: dropped supposedly wrong hunks] Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/soc_scale_crop.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 6713c88fd04733eb34438e78118c42bc5c7e0e05 Author: Bhumika Goyal Date: Mon Dec 12 11:59:42 2016 -0200 [media] media: i2c: soc_camera: constify v4l2_subdev_* structures v4l2_subdev_{core/video}_ops structures are stored in the fields of the v4l2_subdev_ops structure which are of type const. Also, v4l2_subdev_ops structure is passed to a function having its argument of type const. As these structures are never modified, so declare them as const. Done using Coccinelle: (One of the scripts used) @r1 disable optional_qualifier @ identifier i; position p; @@ static struct v4l2_subdev_video_ops i@p = {...}; @ok1@ identifier r1.i; position p; struct v4l2_subdev_ops obj; @@ obj.video=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct v4l2_subdev_video_ops i; File sizes before and after the changes: text data bss dec hex filename 3459 696 0 4155 103b /media/i2c/soc_camera/imx074.o 3835 320 0 4155 103b /media/i2c/soc_camera/imx074.o 4749 1048 8 5805 16ad /media/i2c/soc_camera/mt9m001.o 5133 672 8 5813 16b5 /media/i2c/soc_camera/mt9m001.o 5658 1112 8 6778 1a7a /media/i2c/soc_camera/mt9t031.o 6042 728 8 6778 1a7a /media/i2c/soc_camera/mt9t031.o 6726 784 0 7510 1d56 /media/i2c/soc_camera/mt9t112.o 7110 408 0 7518 1d5e /media/i2c/soc_camera/mt9t112.o 6700 960 16 7676 1dfc /media/i2c/soc_camera/mt9v022.o 7084 584 16 7684 1e04 /media/i2c/soc_camera/mt9v022.o 5569 1576 8 7153 1bf1 /media/i2c/soc_camera/ov2640.o 5953 1200 8 7161 1bf9 /media/i2c/soc_camera/ov2640.o 3018 2736 0 5754 167a /media/i2c/soc_camera/ov5642.o 3394 2352 0 5746 1672 /media/i2c/soc_camera/ov5642.o 8348 2104 8 10460 28dc /media/i2c/soc_camera/ov6650.o 8716 1728 8 10452 28d4 /media/i2c/soc_camera/ov6650.o 4165 696 8 4869 1305 /media/i2c/soc_camera/ov772x.o 4549 320 8 4877 130d /media/i2c/soc_camera/ov772x.o 4033 608 8 4649 1229 /media/i2c/soc_camera/ov9640.o 4417 232 8 4657 1231 /media/i2c/soc_camera/ov9640.o 4983 784 8 5775 168f /media/i2c/soc_camera/ov9740.o 5367 408 8 5783 1697 /media/i2c/soc_camera/ov9740.o 8578 1312 8 9898 26aa i2c/soc_camera/rj54n1cb0c.o 8962 936 8 9906 26b2 i2c/soc_camera/rj54n1cb0c.o 3886 696 0 4582 11e6 /media/i2c/soc_camera/tw9910.o 4270 320 0 4590 11ee /media/i2c/soc_camera/tw9910.o Signed-off-by: Bhumika Goyal Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/imx074.c | 6 +++--- drivers/media/i2c/soc_camera/mt9m001.c | 6 +++--- drivers/media/i2c/soc_camera/mt9t031.c | 6 +++--- drivers/media/i2c/soc_camera/mt9t112.c | 6 +++--- drivers/media/i2c/soc_camera/mt9v022.c | 6 +++--- drivers/media/i2c/soc_camera/ov2640.c | 6 +++--- drivers/media/i2c/soc_camera/ov5642.c | 6 +++--- drivers/media/i2c/soc_camera/ov6650.c | 6 +++--- drivers/media/i2c/soc_camera/ov772x.c | 6 +++--- drivers/media/i2c/soc_camera/ov9640.c | 6 +++--- drivers/media/i2c/soc_camera/ov9740.c | 6 +++--- drivers/media/i2c/soc_camera/rj54n1cb0c.c | 6 +++--- drivers/media/i2c/soc_camera/tw9910.c | 6 +++--- 13 files changed, 39 insertions(+), 39 deletions(-) commit 855749a75609122b57b2d4ebd872944836388a14 Author: Geliang Tang Date: Tue Nov 15 10:58:35 2016 -0200 [media] sh_mobile_ceu_camera: use module_platform_driver Use module_platform_driver() helper to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 54449af0e0b2ea43a8166611c95b730c850c3184 Author: Janusz Krzysztofik Date: Wed Jun 15 19:29:50 2016 -0300 [media] media: i2c/soc_camera: fix ov6650 sensor getting wrong clock After changes to v4l2_clk API introduced in v4.1 by commits a37462b919 '[media] V4L: remove clock name from v4l2_clk API' and 4f528afcfb '[media] V4L: add CCF support to the v4l2_clk API', ov6650 sensor stopped responding because v4l2_clk_get(), still called with depreciated V4L2 clock name "mclk", started to return respective CCF clock instead of the V4l2 one registered by soc_camera. Fix it by calling v4l2_clk_get() with NULL clock name. Created and tested on Amstrad Delta against Linux-4.7-rc3 with omap1_camera fixes. Signed-off-by: Janusz Krzysztofik Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/ov6650.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bb6669147d9037447baeb633deca8a64e1a55dd Author: Bjorn Helgaas Date: Thu Mar 23 12:29:56 2017 -0500 PCI/MSI: Use dev_printk() when possible Use dev_printk() when possible. This makes messages more consistent with other device-related messages and, in some cases, adds useful information. This changes messages like this: Unable to allocate affinity masks, ignoring to this: pci 0000:01:00.0: can't allocate MSI affinity masks for 4 vectors Signed-off-by: Bjorn Helgaas drivers/pci/msi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d5a7e744614c8b923066df0e77e74f7ab2cb7e28 Author: Fabrice Gasnier Date: Thu Jan 26 15:28:00 2017 +0100 ARM: dts: stm32: Enable pwm1 and pwm3 on stm32f429i-eval Define and enable pwm1 and pwm3, timers1 & 3 trigger outputs on on stm32f429i-eval board. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32429i-eval.dts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit bcd9b43eb1f986265481740e92a89ac912224c82 Author: Fabrice Gasnier Date: Thu Mar 23 18:14:58 2017 +0100 ARM: dts: stm32: Enable dma by default on stm32f4 adc Configure STM32F4 ADC to use dma by default. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f429.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 4cc627472cd69a738d7cb4283e8756e1d65971fa Author: Amelie Delaunay Date: Thu Mar 23 14:32:21 2017 +0100 ARM: dts: stm32: enable RTC on stm32746g-eval This patch enables RTC on stm32746g-eval with default LSE clock source. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32746g-eval.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 859e2647f09b5e057c7c1dec026a874e1f64ba35 Author: Amelie Delaunay Date: Thu Jan 19 14:45:00 2017 +0100 ARM: dts: stm32: Add RTC support for STM32F746 MCU This patch adds STM32 RTC bindings for STM32F746. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f746.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 91a7f89c8f88d3a7e102b2db13288e14864c7b65 Author: Amelie Delaunay Date: Thu Mar 23 14:28:40 2017 +0100 ARM: dts: stm32: set HSE_RTC clock frequency to 1 MHz on stm32f746 This patch set HSE_RTC clock frequency to 1 MHz, as the clock supplied to the RTC must be 1 MHz. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f746.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 156fdf11ae44fa7e572ce502e845848dedfb2048 Author: Gabriel Fernandez Date: Thu Mar 23 17:33:40 2017 +0100 dt-bindings: mfd: Add STM32F7 RCC numeric constants into DT include file This patch lists STM32F7's RCC numeric constants. It will be used by clock and reset drivers, and DT bindings. Signed-off-by: Gabriel Fernandez Acked-by: Lee Jones Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f746.dtsi | 51 ++++++++-------- include/dt-bindings/mfd/stm32f7-rcc.h | 112 ++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+), 25 deletions(-) commit 01e435d23b18621972097bbfb30a55be258b1ea2 Author: Gabriel Fernandez Date: Thu Mar 23 17:35:50 2017 +0100 ARM: dts: stm32: Enable clocks for STM32F746 MCU This patch enables clocks for STM32F746 MCU. Signed-off-by: Gabriel Fernandez Signed-off-by: Alexandre TORGUE arch/arm/boot/dts/stm32f746.dtsi | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) commit 66e56302842e9971426bd7e504c4db4f88cbb037 Author: Thomas Petazzoni Date: Thu Mar 16 16:16:28 2017 +0100 arm64: defconfig: enable MVPP2 The MVPP2 network driver is used for the ARM64 Marvell Armada 7K and 8K platforms, so enable it in the arm64 defconfig. Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 60894719241e2b3d6d202304de9ad33a8da3685c Author: Thomas Petazzoni Date: Thu Mar 16 16:16:27 2017 +0100 arm64: marvell: dts: add PPv2.2 description to Armada 7K/8K This commit adds the description of the PPv2.2 hardware block for the Marvell Armada 7K and Armada 8K processors, and their corresponding Armada 7040 and 8040 Development boards. Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-7040-db.dts | 25 +++++++++++++++ arch/arm64/boot/dts/marvell/armada-8040-db.dts | 16 ++++++++++ .../boot/dts/marvell/armada-cp110-master.dtsi | 37 ++++++++++++++++++++++ .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 37 ++++++++++++++++++++++ 4 files changed, 115 insertions(+) commit 85bee2af8abc1acff7cbf6fd1b4ce733c19c992b Author: Gregory CLEMENT Date: Wed Mar 8 18:35:19 2017 +0100 ARM64: dts: marvell: armada-3720 add RTC support The Armada 3720 DB board has an RTC on the I2C bus. It's a PT7C4337A from Pericom but which claims to be fully compatible with the ds1337. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-3720-db.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit a12af1c20751340ab6e449a5ef78b37d31123aca Author: Gregory CLEMENT Date: Wed Mar 8 18:33:15 2017 +0100 ARM64: dts: marvell: armada-3720-db: Add phy for USB3 Now that the gpio expander is present in the dts, use it to add an USB3 PHY using one of these gpio as a regulator. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-3720-db.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit e4afb4804ddce1306607dfcf913abed90b97c862 Author: Gregory CLEMENT Date: Wed Mar 8 18:33:14 2017 +0100 ARM64: dts: marvell: armada-37xx: Add clock resource for USB3 Now that clocks are available provide a clock resource for xhci node. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 1 + 1 file changed, 1 insertion(+) commit 86fcb2bca0b8eccf97991e601b1a75a9c5da0406 Author: Gregory CLEMENT Date: Wed Mar 8 18:33:13 2017 +0100 ARM64: dts: marvell: armada-37xx: Fix interrupt mapping for USB3 IRQ number for xhci controller was wrong, fix it. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd2f0d0d403b7eb779fba04ea9664faa3b625cde Author: Ralph Sennhauser Date: Thu Mar 16 06:53:19 2017 +0100 ARM: dts: mvebu: linksys: enable buffer manager support Add appropriate properties to devices in the Linksys WRT AC Series for the mvneta driver to use hardware buffer management. Also update "soc" ranges property and set the status of bm and bm-bppi to "okay" (SRAM). Signed-off-by: Ralph Sennhauser Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys.dtsi | 17 ++++++++++++++++- arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 17 ++++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) commit ab7090ffb24191d3704fcbf357329567b7016f8e Author: Geert Uytterhoeven Date: Sun Mar 12 14:16:49 2017 +0100 MAINTAINERS: Add file patterns for dove device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven Cc: Jason Cooper Cc: Andrew Lunn Cc: Sebastian Hesselbarth Cc: Gregory Clement Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Gregory CLEMENT MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 16a20b52d1b0c900ea2e7363cf6e10267a445002 Author: Brian King Date: Wed Mar 15 16:58:42 2017 -0500 scsi: ipr: Driver version 2.6.4 Bump driver version Signed-off-by: Brian King Reviewed-by: Wendy Xiong Tested-by: Wendy Xiong Signed-off-by: Martin K. Petersen drivers/scsi/ipr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ef97d8ae12eb20d81bea5d16a0c1e33dcbe44492 Author: Brian King Date: Wed Mar 15 16:58:41 2017 -0500 scsi: ipr: Fix SATA EH hang This patch fixes a hang that can occur in ATA EH with ipr. With ipr's usage of libata, commands should never end up on ap->eh_done_q. The timeout function we use for ipr, even for SATA devices, is scsi_times_out, so ATA_QCFLAG_EH_SCHEDULED never gets set for ipr and EH is driven completely by ipr and SCSI. The SCSI EH thread ends up calling ipr's eh_device_reset_handler, which then calls ata_std_error_handler. This ends up calling ipr_sata_reset, which issues a reset to the device. This should result in all pending commands getting failed back and having ata_qc_complete called for them, which should end up clearing ATA_QCFLAG_FAILED as qc->flags gets zeroed in ata_qc_free. This ensures that when we end up in ata_eh_finish, we don't do anything more with the command. On adapters that only support a single interrupt and when running with two MSI-X vectors or less, the adapter firmware guarantees that responses to all outstanding commands are sent back prior to sending the response to the SATA reset command. On newer adapters supporting multiple HRRQs, however, this can no longer be guaranteed, since the command responses and reset response may be processed on different HRRQs. If ipr returns from ipr_sata_reset before the outstanding command was returned, this sends us down the path of __ata_eh_qc_complete which then moves the associated scsi_cmd from the work_q in scsi_eh_bus_device_reset to ap->eh_done_q, which then will sit there forever and we will be wedged. This patch fixes this up by ensuring that any outstanding commands are flushed before returning from eh_device_reset_handler for a SATA device. Reported-by: David Jeffery Signed-off-by: Brian King Reviewed-by: Wendy Xiong Tested-by: Wendy Xiong Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 62 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 21 deletions(-) commit f646f325a829d73abc708088d2b67cd11b775fdf Author: Brian King Date: Wed Mar 15 16:58:39 2017 -0500 scsi: ipr: Error path locking fixes This patch closes up some potential race conditions observed in the error handling paths in ipr while debugging an issue resulting in a hang with SATA error handling. These patches ensure we are holding the correct lock when adding and removing commands from the free and pending queues in some error scenarios. Signed-off-by: Brian King Reviewed-by: Wendy Xiong Tested-by: Wendy Xiong Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 106 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 93 insertions(+), 13 deletions(-) commit 439ae285b9d9da12343e3d51a0dff1b473a6a6ac Author: Brian King Date: Wed Mar 15 16:58:39 2017 -0500 scsi: ipr: Fix abort path race condition This fixes a race condition in the error handlomg paths of ipr. While a command is outstanding to the adapter, it is placed on a pending queue for the hrrq it is associated with, while holding the HRRQ lock. When a command is completed, it is removed from the pending queue, under HRRQ lock, and placed on a local list. This list is then iterated through without any locks and each command's done function is invoked, inside of which, the command gets returned to the free list while grabbing the HRRQ lock. This fixes two race conditions when commands have been removed from the pending list but have not yet been added to the free list. Both of these changes fix race conditions that could result in returning success from eh_abort_handler and then later calling scsi_done for the same request. The first race condition is in ipr_cancel_op. It looks through each pending queue to see if the command to be aborted is still outstanding or not. Rather than looking on the pending queue, reverse the logic to check to look for commands that are NOT on the free queue. The second race condition can occur when in ipr_wait_for_ops where we are waiting for responses for commands we've aborted. Signed-off-by: Brian King Reviewed-by: Wendy Xiong Tested-by: Wendy Xiong Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 64 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 17 deletions(-) commit 960e96480ee2bff4f09472c64e25f1850bf06470 Author: Brian King Date: Wed Mar 15 16:58:37 2017 -0500 scsi: ipr: Remove redundant initialization Removes some code in __ipr_eh_dev_reset which was modifying the ipr_cmd done function. This should have already been setup at command allocation time and if its since been changed, it means we are in the ipr_erp* functions and need to wait for them to complete and don't want to override that here. Signed-off-by: Brian King Reviewed-by: Wendy Xiong Tested-by: Wendy Xiong Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 66a0d59cdd12546ddf01d229de28b07ccf6d637f Author: Brian King Date: Wed Mar 15 16:58:36 2017 -0500 scsi: ipr: Fix missed EH wakeup Following a command abort or device reset, ipr's EH handlers wait for the commands getting aborted to get sent back from the adapter prior to returning from the EH handler. This fixes up some cases where the completion handler was not getting called, which would have resulted in the EH thread waiting until it timed out, greatly extending EH time. Signed-off-by: Brian King Reviewed-by: Wendy Xiong Tested-by: Wendy Xiong Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 979800e73d2fcda96cda5076f3425f823fdda0d8 Author: Michał Kępień Date: Tue Mar 14 11:26:31 2017 +0100 platform/x86: fujitsu-laptop: remove pf_device field from struct fujitsu_bl Both struct fujitsu_bl and struct fujitsu_laptop have a pf_device field. Up until now the latter has been redundant, which is logically incorrect because the primary function of the platform device created by fujitsu-laptop is to provide laptop-related (not brightness-related) attributes to userspace. Remove the pf_device field from struct fujitsu_bl and make all module code use the pf_device field of struct fujitsu_laptop instead. Suggested-by: Alan Jenkins Signed-off-by: Michał Kępień Tested-by: Jonathan Woithe Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit c33f4c044d2bb99bb42e1315ede267843dd81d4a Author: Michał Kępień Date: Tue Mar 14 11:26:30 2017 +0100 platform/x86: fujitsu-laptop: only register platform device if FUJ02E3 is present The platform device registered by fujitsu-laptop is registered unconditionally while sysfs attributes attached to it depend on the FUJ02E3 ACPI device being present. Fix this by moving platform device creation and removal to acpi_fujitsu_laptop_add() and acpi_fujitsu_laptop_remove(), respectively. Signed-off-by: Michał Kępień Tested-by: Jonathan Woithe Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit d811b511c18d9349a3880a4a7fff4c9c1169ac03 Author: Michał Kępień Date: Tue Mar 14 11:26:29 2017 +0100 platform/x86: fujitsu-laptop: add and remove platform device in separate functions Platform device handling adds a lot of complexity to fujitsu_init(), which hinders its readability. Extract code responsible for adding and removing the platform device to separate functions. Adjust whitespace to make checkpatch happy. Signed-off-by: Michał Kępień Tested-by: Jonathan Woithe Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 66 +++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 26 deletions(-) commit b0c4b9c64e7ca4eaf39996429e98d97725d7098e Author: Michał Kępień Date: Tue Mar 14 11:26:28 2017 +0100 platform/x86: fujitsu-laptop: simplify platform device attribute definitions Use the DEVICE_ATTR_RO() macro to get rid of ignore_store() and shorten attribute definitions. Adjust whitespace to make checkpatch happy. Signed-off-by: Michał Kępień Tested-by: Jonathan Woithe Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) commit 78b2602fbb0e3fe33599ced64b74b73a681b1e56 Author: Michał Kępień Date: Tue Mar 14 11:26:27 2017 +0100 platform/x86: fujitsu-laptop: remove backlight-related attributes from the platform device Setting backlight level using a vendor-specific interface should only be possible when using the latter is either explicitly requested by the user or automatically selected by the kernel. fujitsu-laptop violates that premise by unconditionally attaching three backlight-related attributes to the platform device it registers. Remove the offending attributes from the platform device. Update module comments to reflect this change. Signed-off-by: Michał Kępień Tested-by: Jonathan Woithe Reviewed-by: Jonathan Woithe Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 90 ++--------------------------------- 1 file changed, 3 insertions(+), 87 deletions(-) commit 999ddbdf3c8354077660efbac9ab91c12187d6d2 Author: Pau Espin Pedrol Date: Fri Feb 10 18:48:37 2017 +0100 platform/x86: eeepc-laptop: Skip unknown key messages 0x50 0x51 Otherwise those are printed several times when (un)plugging the AC connector. Signed-off-by: Pau Espin Pedrol Acked-by: Dmitry Torokhov Signed-off-by: Darren Hart (VMware) drivers/platform/x86/eeepc-laptop.c | 2 ++ 1 file changed, 2 insertions(+) commit 4935933e07daaf829692fa54abe0c2ad9ac94ed9 Author: Xiaofei Tan Date: Thu Mar 23 01:25:39 2017 +0800 scsi: hisi_sas: add is_sata_phy_v2_hw() Add helper function is_sata_phy_v2_hw() to judge whether the attached device is SATA disk for a root PHY. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 6073b7719a63b42f0272917b4b2b552f5002f53d Author: Xiang Chen Date: Thu Mar 23 01:25:38 2017 +0800 scsi: hisi_sas: use dev_is_sata to identify SATA or SAS disk When SMP IO is sent, sas_protocol_ata couldn't judge whether the disk is SATA or SAS disk. So use dev_is_sata to identify SATA or SAS disk. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14d3f397f6496e04a6b9876a44469fbfaea287f8 Author: John Garry Date: Thu Mar 23 01:25:37 2017 +0800 scsi: hisi_sas: check hisi_sas_lu_reset() error message Unless we actually get some sort of failure in hisi_sas_lu_reset(), don't print a message. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ccbfe5a05a5be7670d1b91ad07d8b1f3b9dbd45e Author: Xiang Chen Date: Thu Mar 23 01:25:36 2017 +0800 scsi: hisi_sas: release SMP slot in lldd_abort_task When an SMP task timeouts, it will call lldd_abort_task to release the associated slot, and then will release the sas_task. Currently in lldd_abort_task, if we fail to internally abort IO, then the slot of SMP IO is not released, but sas_task will still be later released, so the slot's sas_task is NULL, which will cause NULL pointer when hisi_sas_slot_task_free happens later. To resolve, check the return value of internal abort, and release the slot if it failed. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 8b05ad6a9dbc4306c8eaf0f5269206647ed1ad7e Author: John Garry Date: Thu Mar 23 01:25:35 2017 +0800 scsi: hisi_sas: add hisi_sas_clear_nexus_ha() Add function for upper-layer to reset controller when all else fails. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4df642db5ba7f7362f72f033e359083b3fa873a3 Author: John Garry Date: Thu Mar 23 01:25:34 2017 +0800 scsi: hisi_sas: rename hisi_sas_link_timeout_{enable, disable}_link For consistency, remove the "hisi_sas_" prefix. Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 981843c6c4ecfa9f6bc2589e66849cde11ef820e Author: Xiaofei Tan Date: Thu Mar 23 01:25:33 2017 +0800 scsi: hisi_sas: handle PHY UP+DOWN simultaneous irq Handle the situation that PHY UP and DOWN irq happen simultaneously. There is no mechanism of SoC HW to ensure this situation will never happen. So, we add this handle just in case. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 56 +++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 17 deletions(-) commit f1dc751876e115a65e49e7fd016e52136572e6d5 Author: John Garry Date: Thu Mar 23 01:25:32 2017 +0800 scsi: hisi_sas: some modifications to v2 hw reg init values This patch includes: (1) Disable transport layer retry (2) Support CQ time and count interrupt coal (3) fix link FIFO full issue Signed-off-by: Xiang Chen Signed-off-by: Zhao Nenglong Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 634a9585f49c7c92d6416128a18ea134eb9ac381 Author: Xiang Chen Date: Thu Mar 23 01:25:31 2017 +0800 scsi: hisi_sas: process error codes according to their priority There are some rules to decide which error code has the high priority when errors happen together: (1) Error phase of CQ decides the error happens on RX or TX; (2) For TX error, when DMA/TRANS TX error happen simultaneously, the priority of DMA TX error is higher than TRANS TX error, so for the priority of TX error: DW2 (DMA TX part) > DW0; (3) For RX error, when TRANS/DMA/SIPC RX error happen simultaneously, the priority of TRANS RX error is higher than DMA and SIPC RX error, and we should also keep the rules (the priority of DW3 > DW2), so for the priority of RX error: DW1 > DW3 > DW2(SIPC RX part); (4) There are also a priority we should keep in the same error type. So, modify slot error code to handle this. In addition to this, some some error codes are modified according to recommendation from SoC designer. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 553 ++++++++++++++++++++++++--------- 1 file changed, 398 insertions(+), 155 deletions(-) commit 6fcdda805114f9ff588c08cefe6758b62bfcb9fc Author: John Garry Date: Thu Mar 23 01:25:30 2017 +0800 scsi: hisi_sas: remove task free'ing for timeouts When a TMF or internal abort times-out, do not free slot. We expect this to be done upon later escalated error handling. Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit 54c9dd2d26d0951891516a956893428feb9aea17 Author: John Garry Date: Thu Mar 23 01:25:29 2017 +0800 scsi: hisi_sas: fix some sas_task.task_state_lock locking Some more locking needs to be added/modified for when read-modify-writing sas_task.task_state_flags. Note: since we can attempt to grab this lock in interrupt context we should use irq variant of spin_lock. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 13 ++++++------- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 3 +++ drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 7 +++++-- 3 files changed, 14 insertions(+), 9 deletions(-) commit 6131243acd2c3aafa041935dcef44eb8255eeb46 Author: Xiang Chen Date: Thu Mar 23 01:25:28 2017 +0800 scsi: hisi_sas: free slots after hardreset After hardreset, we clear up IOs of remote disks, so we need to free those slots in LLDD. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit a305f33775c0b7202fe77cbd4cc3d7f2048efc52 Author: John Garry Date: Thu Mar 23 01:25:27 2017 +0800 scsi: hisi_sas: check for SAS_TASK_STATE_ABORTED in slot complete Check in slot_complete_v2_hw() for whether a task has already been completed by upper layer. Signed-off-by: John Garry Reviewed-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 055945df4c10eeb6057cf380906c9b88334dd63d Author: John Garry Date: Thu Mar 23 01:25:26 2017 +0800 scsi: hisi_sas: hardreset for SATA disk in LU reset When issuing an LU reset for a SATA target, issue an internal abort and a hard reset. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 38 ++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) commit c35279f2f1eef8f7f91b2b529fc22f01b25a244f Author: John Garry Date: Thu Mar 23 01:25:25 2017 +0800 scsi: hisi_sas: modify hisi_sas_abort_task() for SSP Currently an internal abort is executed regardless of the result of the TMF. We should also check the result of the internal abort to see if we should free the slot. So change the status code STAT_IO_COMPLETE to TMF_RESP_FUNC_SUCC, meaning the slot has been successfully aborted. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 28 ++++++++++++++++++---------- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 +- 2 files changed, 19 insertions(+), 11 deletions(-) commit fc8669514426b21b7aaa73e40a22fb1e1eb39259 Author: Xiang Chen Date: Thu Mar 23 01:25:24 2017 +0800 scsi: hisi_sas: modify error handling for v2 hw For error codes which need abort-and-retry, simulate IO timeout and let SCSI+ATA layers process those errors. Previously for SSP, we should try to abort the IO in the LLDD and then pass back to upper layer, but sometimes this would also error. So Instead of adding special error handling for this scenario in the LLDD, allow the upper layer to handle completely. No performance hit is seen by taking this approach. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit b4c67a6ca790ca3b8caa1e6582d61ccd5bd174e5 Author: John Garry Date: Thu Mar 23 01:25:23 2017 +0800 scsi: hisi_sas: only reset link for PHY_FUNC_LINK_RESET We currently do a hard reset for a link reset. Change this to do a link reset only. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ddabca216c7fb1af8e4edde9fc981992e26e50fc Author: John Garry Date: Thu Mar 23 01:25:22 2017 +0800 scsi: hisi_sas: error hisi_sas_task_prep() when port down When sas_port is NULL, then return SAS_PHY_DOWN. In addition, when the sas_dev is gone then explicitly return SAS_PHY_DOWN. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 405314df566c6168715413db682adeba297fd684 Author: John Garry Date: Thu Mar 23 01:25:21 2017 +0800 scsi: hisi_sas: remove hisi_sas_port_deformed() Currently when a root PHY is deformed from a asd_sas_port we try to release the slots in the LLDD, and fail. Regardless, it is not right to release this early. This patch removes the deformed function. As it was before, port deformation is still done in hisi_sas_phy_down(). It would be nice to actually remove the hisi_sas_port_{de}formed() pair, however we cannot as we need to know the asd_sas_port index libsas has associated with an asd_sas_phy. The hw does actually generate a port id for a PHY, but this seems to a random number, so ignored for this purpose. This patch also changes the code to link slots to the hisi_sas_device, and not hisi_sas_port. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 4 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 85 ++++++++++++++-------------------- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 9 ++-- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 13 +++--- 4 files changed, 46 insertions(+), 65 deletions(-) commit 7c594f0407de5d3c76e281aaedfcb441b5a5c776 Author: Xiang Chen Date: Thu Mar 23 01:25:20 2017 +0800 scsi: hisi_sas: add softreset function for SATA disk Add softreset to clear IO after internal abort device for SATA disk. The SATA error handling for the controller is based on device internal abort and softreset function. The controller does not support internal abort for single IO, so we need to execute internal abort for device. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/Kconfig | 2 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 70 ++++++++++++++++++++++++++++++++-- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 3 +- 3 files changed, 69 insertions(+), 6 deletions(-) commit 396b80448feed4636cb2b5a5bf7d26eaf6e000a7 Author: John Garry Date: Thu Mar 23 01:25:19 2017 +0800 scsi: hisi_sas: move PHY init to hisi_sas_scan_start() Relocate the PHY init code from LLDD hw init path to hisi_sas_scan_start(). Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 2 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 9 +++------ drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 3 +-- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 3 +-- 4 files changed, 6 insertions(+), 11 deletions(-) commit 06ec0fb97c028102c95d52422fd6dc5ac701039f Author: Xiang Chen Date: Thu Mar 23 01:25:18 2017 +0800 scsi: hisi_sas: add controller reset There are some scenarios that we need to warm-reset to reset registers of SAS controller. During reset we disable interrupts/DQs/PHYs, and after reset we re-init the hardware and rescan the topology to see if anything changed. Signed-off-by: Xiang Chen Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 7 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 134 +++++++++++++++++++++++++++++++-- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 94 +++++++++++++++++++++++ 3 files changed, 227 insertions(+), 8 deletions(-) commit 2e244f0f5bcaa95e8b9006282d7c1ad07605d4fe Author: John Garry Date: Thu Mar 23 01:25:17 2017 +0800 scsi: hisi_sas: add to_hisi_sas_port() Introduce function to get hisi_sas_port from asd_sas_port. Signed-off-by: John Garry Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 2 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 17 +++++++++++++---- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 4 +++- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 6 ++++-- 4 files changed, 22 insertions(+), 7 deletions(-) commit bf874fcf9f2fed58510dc83abcee388cee2b427e Author: Andi Kleen Date: Mon Mar 20 13:17:11 2017 -0700 perf list: Move extra details printing to new option Move the printing of perf expressions and internal events to a new clearer --details flag, instead of lumping it together with other debug options in --debug. This makes it clearer to use. Before perf list --debug ... unc_m_power_critical_throttle_cycles [Cycles all ranks are in critical thermal throttle. Unit: uncore_imc] uncore_imc_2/event=0x86/ MetricName: power_critical_throttle_cycles % MetricExpr: (unc_m_power_critical_throttle_cycles / unc_m_clockticks) * 100. after perf list --details ... unc_m_power_critical_throttle_cycles [Cycles all ranks are in critical thermal throttle. Unit: uncore_imc] uncore_imc_2/event=0x86/ MetricName: power_critical_throttle_cycles % MetricExpr: (unc_m_power_critical_throttle_cycles / unc_m_clockticks) * 100. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Link: http://lkml.kernel.org/r/20170320201711.14142-14-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-list.txt | 4 ++++ tools/perf/builtin-list.c | 14 ++++++++++---- tools/perf/util/parse-events.c | 5 +++-- tools/perf/util/parse-events.h | 2 +- tools/perf/util/pmu.c | 4 ++-- tools/perf/util/pmu.h | 2 +- 6 files changed, 21 insertions(+), 10 deletions(-) commit 962848142335e8b35d522be78f58f2011d976b17 Author: Andi Kleen Date: Mon Mar 20 13:17:10 2017 -0700 perf pmu: Add support for MetricName JSON attribute Add support for a new JSON event attribute to name MetricExpr for better output in perf stat. If the event has no MetricName it uses the normal event name instead to describe the metric. Before % perf stat -a -I 1000 -e '{unc_p_clockticks,unc_p_freq_max_os_cycles}' --metric-only time unc_p_freq_max_os_cycles 1.000149775 15.7 2.000344807 19.3 3.000502544 16.7 4.000640656 6.6 5.000779955 9.9 After % perf stat -a -I 1000 -e '{unc_p_clockticks,unc_p_freq_max_os_cycles}' --metric-only time freq_max_os_cycles % 1.000149775 15.7 2.000344807 19.3 3.000502544 16.7 4.000640656 6.6 5.000779955 9.9 Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170320201711.14142-13-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.c | 14 +++++++++++--- tools/perf/pmu-events/jevents.h | 3 ++- tools/perf/pmu-events/pmu-events.h | 1 + tools/perf/util/evsel.c | 1 + tools/perf/util/evsel.h | 1 + tools/perf/util/parse-events.c | 1 + tools/perf/util/pmu.c | 15 ++++++++++++--- tools/perf/util/pmu.h | 2 ++ tools/perf/util/stat-shadow.c | 4 +++- 9 files changed, 34 insertions(+), 8 deletions(-) commit 7f372a636d92e21d6fa41aebd6986ef590aefbfc Author: Andi Kleen Date: Mon Mar 20 13:17:09 2017 -0700 perf list: Support printing MetricExpr with --debug Output the metric expr in perf list when --debug is specified, so that the user can check the formula. Before: % perf list ... unc_m_power_channel_ppd [Cycles where DRAM ranks are in power down (CKE) mode. Derived from unc_m_power_channel_ppd. Unit: uncore_imc] uncore_imc_2/event=0x85/ After: % perf list --debug ... unc_m_power_channel_ppd [Cycles where DRAM ranks are in power down (CKE) mode. Derived from unc_m_power_channel_ppd. Unit: uncore_imc] Perf: uncore_imc_2/event=0x85/ MetricExpr: (unc_m_power_channel_ppd / unc_m_clockticks) * 100. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170320201711.14142-12-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 37932c188ef1b471eae29249df045c8e567772d0 Author: Andi Kleen Date: Mon Mar 20 13:17:08 2017 -0700 perf stat: Output JSON MetricExpr metric Add generic infrastructure to perf stat to output ratios for "MetricExpr" entries in the event lists. Many events are more useful as ratios than in raw form, typically some count in relation to total ticks. Transfer the MetricExpr information from the alias to the evsel. We mark the events that need to be collected for MetricExpr, and also link the events using them with a pointer. The code is careful to always prefer the right event in the same group to minimize multiplexing errors. At the moment only a single relation is supported. Then add a rblist to the stat shadow code that remembers stats based on the cpu and context. Then finally update and retrieve and print these values similarly to the existing hardcoded perf metrics. We use the simple expression parser added earlier to evaluate the expression. Normally we just output the result without further commentary, but for --metric-only this would lead to empty columns. So for this case use the original event as description. There is no attempt to automatically add the MetricExpr event, if it is missing, however we suggest it to the user, because the user tool doesn't have enough information to reliably construct a group that is guaranteed to schedule. So we leave that to the user. % perf stat -a -I 1000 -e '{unc_p_clockticks,unc_p_freq_max_os_cycles}' 1.000147889 800,085,181 unc_p_clockticks 1.000147889 93,126,241 unc_p_freq_max_os_cycles # 11.6 2.000448381 800,218,217 unc_p_clockticks 2.000448381 142,516,095 unc_p_freq_max_os_cycles # 17.8 3.000639852 800,243,057 unc_p_clockticks 3.000639852 162,292,689 unc_p_freq_max_os_cycles # 20.3 % perf stat -a -I 1000 -e '{unc_p_clockticks,unc_p_freq_max_os_cycles}' --metric-only # time freq_max_os_cycles % 1.000127077 0.9 2.000301436 0.7 3.000456379 0.0 v2: Change from DivideBy to MetricExpr v3: Use expr__ prefix. Support more than one other event. v4: Update description v5: Only print warning message once for multiple PMUs. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170320201711.14142-11-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 3 + tools/perf/util/evsel.c | 3 + tools/perf/util/evsel.h | 3 + tools/perf/util/parse-events.c | 1 + tools/perf/util/pmu.c | 2 + tools/perf/util/pmu.h | 1 + tools/perf/util/stat-shadow.c | 195 +++++++++++++++++++++++++++++++++++++++++ tools/perf/util/stat.h | 2 + 8 files changed, 210 insertions(+) commit 00636c3b48e8acac2acd2601274c6eab4ecf8201 Author: Andi Kleen Date: Mon Mar 20 13:17:07 2017 -0700 perf pmu: Support MetricExpr header in JSON event list Add support for parsing the MetricExpr header in the JSON event lists and storing them in the alias structure. Used in the next patch. v2: Change DividedBy to MetricExpr v3: Really catch all uses of DividedBy Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170320201711.14142-10-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.c | 18 ++++++++++++++---- tools/perf/pmu-events/jevents.h | 2 +- tools/perf/pmu-events/pmu-events.h | 1 + tools/perf/util/pmu.c | 9 ++++++--- tools/perf/util/pmu.h | 1 + 5 files changed, 23 insertions(+), 8 deletions(-) commit b90b3e9c11050e09279d2b9a318189e155910b20 Author: Andi Kleen Date: Mon Mar 20 13:17:06 2017 -0700 perf vendor events intel: Update Intel uncore JSON event files - Add MetricName to describe Metric - Remove redundant "derived from" in descriptions - Rename UNC_M_CAS_COUNT to LLC_MISSES.READ Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170320201711.14142-9-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/broadwellde/uncore-cache.json | 28 ++++++------ .../arch/x86/broadwellde/uncore-memory.json | 26 +++++------ .../arch/x86/broadwellde/uncore-power.json | 26 +++++++---- .../arch/x86/broadwellx/uncore-cache.json | 28 ++++++------ .../arch/x86/broadwellx/uncore-interconnect.json | 6 +-- .../arch/x86/broadwellx/uncore-memory.json | 21 +++++---- .../arch/x86/broadwellx/uncore-power.json | 26 +++++++---- .../pmu-events/arch/x86/haswellx/uncore-cache.json | 28 ++++++------ .../arch/x86/haswellx/uncore-interconnect.json | 6 +-- .../arch/x86/haswellx/uncore-memory.json | 21 +++++---- .../pmu-events/arch/x86/haswellx/uncore-power.json | 26 +++++++---- .../pmu-events/arch/x86/ivytown/uncore-cache.json | 22 ++++----- .../arch/x86/ivytown/uncore-interconnect.json | 12 +++-- .../pmu-events/arch/x86/ivytown/uncore-memory.json | 19 ++++---- .../pmu-events/arch/x86/ivytown/uncore-power.json | 53 ++++++++++++++++------ .../pmu-events/arch/x86/jaketown/uncore-cache.json | 13 +++--- .../arch/x86/jaketown/uncore-interconnect.json | 12 +++-- .../arch/x86/jaketown/uncore-memory.json | 21 +++++---- .../pmu-events/arch/x86/jaketown/uncore-power.json | 53 ++++++++++++++++------ 19 files changed, 267 insertions(+), 180 deletions(-) commit 075167363f8b53ade702cd83f5818eb47119b659 Author: Andi Kleen Date: Mon Mar 20 13:17:05 2017 -0700 perf tools: Add a simple expression parser for JSON Add a simple expression parser good enough to parse JSON relation expressions. The parser is implemented using bison. This is just intended as an simple parser for internal usage in the event lists, not the beginning of a "perf scripting language" v2: Use expr__ prefix instead of expr_ Support multiple free variables for parser Committer note: The v2 patch had: %define api.pure full In expr.y, that is a feature introduced in bison 2.7, to have reentrant parsers, not using global variables, which would make tools/perf stop building with the bison version shipped in older distros, so Andi realised that the other parsers (e.g. parse-events.y) were using: %pure-parser Which is present in older versions of bison and fits the bill. I added: CFLAGS_expr-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w To finally make it build, copying what was there for pmu-bison.o, another parser. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170320201711.14142-8-andi@firstfloor.org [ stdlib.h is needed in tests/expr.c for free() fixing build in systems such as ubuntu:16.04-x-s390 ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 4 + tools/perf/tests/expr.c | 56 +++++++++++++ tools/perf/tests/tests.h | 1 + tools/perf/util/Build | 6 ++ tools/perf/util/expr.h | 25 ++++++ tools/perf/util/expr.y | 173 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 266 insertions(+) commit 29d981217a5d091fb423763d0a6c8e390b20237b Author: Kefeng Wang Date: Mon Mar 20 20:42:55 2017 +0800 arm64: drop unnecessary newlines in show_regs() There are two unnecessary newlines, one is in show_regs, another is in __show_regs(), drop them. Signed-off-by: Kefeng Wang Signed-off-by: Catalin Marinas arch/arm64/kernel/process.c | 2 -- 1 file changed, 2 deletions(-) commit 7a88fa191944589b2ed795bbed32ca6e9e2df31f Author: Dan Carpenter Date: Thu Mar 23 13:24:55 2017 +0300 block: make nr_iovecs unsigned in bio_alloc_bioset() There isn't a bug here, but Smatch is not smart enough to know that "nr_iovecs" can't be negative so it complains about underflows. Really, it's slightly cleaner to make this parameter unsigned. Signed-off-by: Dan Carpenter Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio.c | 3 ++- include/linux/bio.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit d27cfa1fc823d35a6cf45ba51f5623db8a14a9b9 Author: Ard Biesheuvel Date: Thu Mar 9 21:52:09 2017 +0100 arm64: mm: set the contiguous bit for kernel mappings where appropriate This is the third attempt at enabling the use of contiguous hints for kernel mappings. The most recent attempt 0bfc445dec9d was reverted after it turned out that updating permission attributes on live contiguous ranges may result in TLB conflicts. So this time, the contiguous hint is not set for .rodata or for the linear alias of .text/.rodata, both of which are mapped read-write initially, and remapped read-only at a later stage. (Note that the latter region could also be unmapped and remapped again with updated permission attributes, given that the region, while live, is only mapped for the convenience of the hibernation code, but that also means the TLB footprint is negligible anyway, so why bother) This enables the following contiguous range sizes for the virtual mapping of the kernel image, and for the linear mapping: granule size | cont PTE | cont PMD | -------------+------------+------------+ 4 KB | 64 KB | 32 MB | 16 KB | 2 MB | 1 GB* | 64 KB | 2 MB | 16 GB* | * Only when built for 3 or more levels of translation. This is due to the fact that a 2 level configuration only consists of PGDs and PTEs, and the added complexity of dealing with folded PMDs is not justified considering that 16 GB contiguous ranges are likely to be ignored by the hardware (and 16k/2 levels is a niche configuration) Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/include/asm/pgtable.h | 10 +++ arch/arm64/mm/mmu.c | 140 +++++++++++++++++++++++++++------------ 2 files changed, 107 insertions(+), 43 deletions(-) commit 5bd466947160d1e0517747b63216806ea768c791 Author: Ard Biesheuvel Date: Thu Mar 9 21:52:08 2017 +0100 arm64/mm: remove pointless map/unmap sequences when creating page tables The routines __pud_populate and __pmd_populate only create a table entry at their respective level which refers to the next level page by its physical address, so there is no reason to map this page and then unmap it immediately after. Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/mm/mmu.c | 4 ---- 1 file changed, 4 deletions(-) commit b8e1aa3c72f461a12b350def015cf4bc87960711 Author: Satish Kharat Date: Wed Mar 22 16:55:01 2017 -0700 scsi: fnic: bug fix for fip.fip_subcode in fnic_fcoe_send_vlan_req This is a bug introduced when they moved the fip subcodes to central place. Was sending FIP_SC_VL_NOTE in fip.fip_subcode for VLAN request in fnic_fcoe_send_vlan_req. Change is to use FIP_SC_VL_REQ instead. Signed-off-by: Satish Kharat Signed-off-by: Sesidhar Baddela Signed-off-by: Martin K. Petersen drivers/scsi/fnic/fnic_fcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 445d2960862eb3c972012bbbb9cf4ee338334b0a Author: Satish Kharat Date: Tue Feb 28 16:15:59 2017 -0800 scsi: fnic: Adding debug IO and Abort latency counter to fnic stats The IO and Abort latency counter counts the time taken to complete the IO and abort command into broad buckets. This is not intended for performance measurement, just a debug statistic. current_max_io_time tries to keep track of the maximum time an IO has taken to complete if it is > 30sec. Signed-off-by: Satish Kharat Signed-off-by: Sesidhar Baddela Signed-off-by: Martin K. Petersen drivers/scsi/fnic/fnic.h | 2 +- drivers/scsi/fnic/fnic_scsi.c | 43 ++++++++++++++++++++++++++++++++++++++ drivers/scsi/fnic/fnic_stats.h | 15 ++++++++++++++ drivers/scsi/fnic/fnic_trace.c | 47 ++++++++++++++++++++++++++++++++++++++---- 4 files changed, 102 insertions(+), 5 deletions(-) commit 39fcbbc01b89550ca527ea8d640e3af7bfde41d7 Author: Satish Kharat Date: Tue Feb 28 16:15:44 2017 -0800 scsi: fnic: Adding Check Condition counter to misc fnicstats Just a simple counter of number of check conditions encountered on that host. Signed-off-by: Satish Kharat Signed-off-by: Sesidhar Baddela Signed-off-by: Martin K. Petersen drivers/scsi/fnic/fnic_scsi.c | 3 +++ drivers/scsi/fnic/fnic_stats.h | 1 + drivers/scsi/fnic/fnic_trace.c | 2 ++ 3 files changed, 6 insertions(+) commit b9202b4ae8171e9eaa21504d5a8c1c2e9d6ecd90 Author: Satish Kharat Date: Tue Feb 28 16:15:12 2017 -0800 scsi: fnic: Avoid false out-of-order detection for aborted command If SCSI-ML has already issued abort on a command i.e FNIC_IOREQ_ABTS_PENDING is set and we get a IO completion, avoid this being flagged as out-of-order completion by setting the FNIC_IO_DONE flag in fnic_fcpio_icmnd_cmpl_handler Signed-off-by: Satish Kharat Signed-off-by: Sesidhar Baddela Signed-off-by: Martin K. Petersen drivers/scsi/fnic/fnic_scsi.c | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) commit 7ef539c88d7d394410d547c9f082d477093a2a22 Author: Satish Kharat Date: Tue Feb 28 16:14:56 2017 -0800 scsi: fnic: Fix for "Number of Active IOs" in fnicstats becoming negative Fixing the IO stats update (Active IOs and IO completion) to prevent "Number of Active IOs" from becoming negative in the fnistats output. Signed-off-by: Satish Kharat Signed-off-by: Sesidhar Baddela Signed-off-by: Martin K. Petersen drivers/scsi/fnic/fnic_scsi.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit c0951366d4b7e00d2f60f6daae7069b240d370c0 Author: Ard Biesheuvel Date: Thu Mar 9 21:52:07 2017 +0100 arm64/mmu: replace 'page_mappings_only' parameter with flags argument In preparation of extending the policy for manipulating kernel mappings with whether or not contiguous hints may be used in the page tables, replace the bool 'page_mappings_only' with a flags field and a flag NO_BLOCK_MAPPINGS. Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/mm/mmu.c | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) commit 141d1497aae004808ecb156ca2bfb5e0bc460a2e Author: Ard Biesheuvel Date: Thu Mar 9 21:52:06 2017 +0100 arm64/mmu: add contiguous bit to sanity bug check A mapping with the contiguous bit cannot be safely manipulated while live, regardless of whether the bit changes between the old and new mapping. So take this into account when deciding whether the change is safe. Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/mm/mmu.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit eccc1bff1b0d168a136ecd51c6091cf0ba02151b Author: Ard Biesheuvel Date: Thu Mar 9 21:52:05 2017 +0100 arm64/mmu: ignore debug_pagealloc for kernel segments The debug_pagealloc facility manipulates kernel mappings in the linear region at page granularity to detect out of bounds or use-after-free accesses. Since the kernel segments are not allocated dynamically, there is no point in taking the debug_pagealloc_enabled flag into account for them, and we can use block mappings unconditionally. Note that this applies equally to the linear alias of text/rodata: we will never have dynamic allocations there given that the same memory is statically in use by the kernel image. Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/mm/mmu.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit e393cf40aecfe7e872ea630b5b9ecb8c05a78c7c Author: Ard Biesheuvel Date: Thu Mar 9 21:52:04 2017 +0100 arm64/mmu: align alloc_init_pte prototype with pmd/pud versions Align the function prototype of alloc_init_pte() with its pmd and pud counterparts by replacing the pfn parameter with the equivalent physical address. Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/mm/mmu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2ebe088b73a87c8fc70231b468c719337f258bf0 Author: Ard Biesheuvel Date: Thu Mar 9 21:52:03 2017 +0100 arm64: mmu: apply strict permissions to .init.text and .init.data To avoid having mappings that are writable and executable at the same time, split the init region into a .init.text region that is mapped read-only, and a .init.data region that is mapped non-executable. This is possible now that the alternative patching occurs via the linear mapping, and the linear alias of the init region is always mapped writable (but never executable). Since the alternatives descriptions themselves are read-only data, move those into the .init.text region. Reviewed-by: Laura Abbott Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/include/asm/sections.h | 2 ++ arch/arm64/kernel/vmlinux.lds.S | 25 ++++++++++++++++--------- arch/arm64/mm/mmu.c | 12 ++++++++---- 3 files changed, 26 insertions(+), 13 deletions(-) commit 28b066da69b937ea4104341cb5d9324109faab7f Author: Ard Biesheuvel Date: Thu Mar 9 21:52:02 2017 +0100 arm64: mmu: map .text as read-only from the outset Now that alternatives patching code no longer relies on the primary mapping of .text being writable, we can remove the code that removes the writable permissions post-init time, and map it read-only from the outset. To preserve the existing behavior under rodata=off, which is relied upon by external debuggers to manage software breakpoints (as pointed out by Mark), add an early_param() check for rodata=, and use RWX permissions if it set to 'off'. Reviewed-by: Laura Abbott Reviewed-by: Kees Cook Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/mm/mmu.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 5ea5306c3235a157f06040c59730b1133115ed26 Author: Ard Biesheuvel Date: Thu Mar 9 21:52:01 2017 +0100 arm64: alternatives: apply boot time fixups via the linear mapping One important rule of thumb when desiging a secure software system is that memory should never be writable and executable at the same time. We mostly adhere to this rule in the kernel, except at boot time, when regions may be mapped RWX until after we are done applying alternatives or making other one-off changes. For the alternative patching, we can improve the situation by applying the fixups via the linear mapping, which is never mapped with executable permissions. So map the linear alias of .text with RW- permissions initially, and remove the write permissions as soon as alternative patching has completed. Reviewed-by: Laura Abbott Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/include/asm/mmu.h | 1 + arch/arm64/kernel/alternative.c | 11 ++++++----- arch/arm64/kernel/smp.c | 1 + arch/arm64/mm/mmu.c | 22 +++++++++++++++++----- 4 files changed, 25 insertions(+), 10 deletions(-) commit aa8c09be7a6f58e1b0dd19413d872fffdb054677 Author: Ard Biesheuvel Date: Thu Mar 9 21:52:00 2017 +0100 arm64: mmu: move TLB maintenance from callers to create_mapping_late() In preparation of refactoring the kernel mapping logic so that text regions are never mapped writable, which would require adding explicit TLB maintenance to new call sites of create_mapping_late() (which is currently invoked twice from the same function), move the TLB maintenance from the call site into create_mapping_late() itself, and change it from a full TLB flush into a flush by VA, which is more appropriate here. Also, given that create_mapping_late() has evolved into a routine that only updates protection bits on existing mappings, rename it to update_mapping_prot() Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/mm/mmu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 63d7c6afc510a4a6265b119f7b988af0cc118889 Author: Ard Biesheuvel Date: Thu Mar 9 21:51:59 2017 +0100 arm: kvm: move kvm_vgic_global_state out of .text section The kvm_vgic_global_state struct contains a static key which is written to by jump_label_init() at boot time. So in preparation of making .text regions truly (well, almost truly) read-only, mark kvm_vgic_global_state __ro_after_init so it moves to the .rodata section instead. Acked-by: Marc Zyngier Reviewed-by: Laura Abbott Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas virt/kvm/arm/vgic/vgic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ccc6d704602b01f6ce48abdea53736db88c5470c Author: Satish Kharat Date: Tue Feb 28 16:14:33 2017 -0800 scsi: fnic: minor cleanup in fnic_fcpio_itmf_cmpl_handler, removing else case Getting rid of else case to make the flow look bit simpler. Signed-off-by: Satish Kharat Signed-off-by: Sesidhar Baddela Signed-off-by: Martin K. Petersen drivers/scsi/fnic/fnic_scsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b43abcbbd5b10d5f057c8388cc4eff9ff1fe2fd6 Author: Satish Kharat Date: Tue Feb 28 16:11:57 2017 -0800 scsi: fnic: Ratelimit printks to avoid flooding when vlan is not set by the switch.i This is to avoid the log from being filled with vlan discovery messages when there is no vlan configured on the switch. Signed-off-by: Satish Kharat Signed-off-by: Sesidhar Baddela Signed-off-by: Martin K. Petersen drivers/scsi/fnic/fnic_fcs.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit cca678dfbad4954d53e58ca6b132b306c56f4423 Author: Christoph Hellwig Date: Wed Feb 1 15:02:53 2017 +0100 scsi: fnic: switch to pci_alloc_irq_vectors Not a full cleanup for the IRQ code, for that we'd need to know if the max number of the various CQ types is going to stay 1 forever. Signed-off-by: Christoph Hellwig Acked-by: Satish Kharat Signed-off-by: Martin K. Petersen drivers/scsi/fnic/fnic.h | 1 - drivers/scsi/fnic/fnic_isr.c | 41 +++++++++++++---------------------------- 2 files changed, 13 insertions(+), 29 deletions(-) commit 292889e1ffa8bb56fda2c6208d3f884ce97e1189 Author: Ville Syrjälä Date: Fri Mar 17 23:18:01 2017 +0200 drm/i915: Extract i845_cursor_ctl() and i9xx_cursor_ctl() Pull the code to calculate the cursor control register value into separate functions. Allows us to pre-compute them in the future. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170317211808.14693-8-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 119 +++++++++++++++++++++-------------- 1 file changed, 72 insertions(+), 47 deletions(-) commit 0a37514795625713f8a0b6e7d33e42a3abd1dbe6 Author: Ville Syrjälä Date: Fri Mar 17 23:18:00 2017 +0200 drm/i915: Extract ilk_sprite_ctl() Pull the code to calculate the ILK-SNB sprite control register value into a separate function. Allows us to pre-compute it in the future. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170317211808.14693-7-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_sprite.c | 72 +++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 31 deletions(-) commit 41334f54a43ab00cbb294e6a08d0f57068f43025 Author: Marc Gonzalez Date: Fri Mar 17 15:53:19 2017 +0100 PCI: Include pci.h for struct pci_ops definition struct pci_ecam_ops embeds a struct pci_ops. Explicitly request the definition for struct pci_ops, otherwise gcc might complain: include/linux/pci-ecam.h:29:19: error: field 'pci_ops' has incomplete type Signed-off-by: Marc Gonzalez Signed-off-by: Bjorn Helgaas include/linux/pci-ecam.h | 1 + 1 file changed, 1 insertion(+) commit 45dea7b0c60738cc4920fa0d39b8d44398436659 Author: Ville Syrjälä Date: Fri Mar 17 23:17:59 2017 +0200 drm/i915: Extract ivb_sprite_ctl() Pull the code to calculate the IVB-BDW sprite control register value into a separate function. Allows us to pre-compute it in the future. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170317211808.14693-6-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_sprite.c | 80 ++++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 36 deletions(-) commit a0b028597d592038ff46b7a14bcc7f7a4c4ed81d Author: Hans de Goede Date: Thu Mar 23 14:23:25 2017 +0100 pinctrl: cherryview: Add support for GMMR GPIO opregion On some Cherry Trail devices the ASL uses the GMMR GPIO to access GPIOs so as to serialize MMIO accesses to GPIO registers with the OS, because: "Due to a silicon issue, a shared lock must be used to prevent concurrent accesses across the 4 GPIO controllers. See Intel Atom Z8000 Processor Series Specification Update (Rev. 005), errata #CHT34, for further information." This commit adds support for this opregion, this fixes a number of ASL errors on my Ezpad mini3 tablet and makes the otg port device/host muxing which is controlled in firmware on this model work properly. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-cherryview.c | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 96ef6854bb4c5ad23d81f69fd0a4aed238c40d34 Author: Ville Syrjälä Date: Fri Mar 17 23:17:58 2017 +0200 drm/i915: Extract vlv_sprite_ctl() Pull the code to calculate the VLV/CHV sprite control register value into a separate function. Allows us to pre-compute it in the future. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170317211808.14693-5-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_sprite.c | 71 +++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 34 deletions(-) commit 2e881264b47414e6798329783d9dd9b30d89b76d Author: Ville Syrjälä Date: Fri Mar 17 23:17:56 2017 +0200 drm/i915: Use skl_plane_ctl() for the SKL "sprite" planes On SKL the planes are uniform so the "sprites" can use the primary plane code perfectly fine. The only difference we have is the color key handling, but since we never enable that for the primary plane the same code works just fine. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170317211808.14693-3-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 16 +++++++++++----- drivers/gpu/drm/i915/intel_drv.h | 5 ++--- drivers/gpu/drm/i915/intel_sprite.c | 18 +----------------- 3 files changed, 14 insertions(+), 25 deletions(-) commit b0fe8f7b9b5adea2c85c72bba46e20fb21522769 Author: Suniel Mahesh Date: Tue Mar 21 14:31:04 2017 +0530 staging: rtl8192e: Fix issues reported by checkpatch.pl Fixed the following checkpatch.pl checks: spaces preferred around that 'operator', spacing provided Logical continuations should be on the previous line, modified accordingly Unnecessary parentheses around variables, removed Please use a blank line after function/struct/union/enum declarations, used Signed-off-by: Suniel Mahesh Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 46 +++++++++++++++------------- 1 file changed, 24 insertions(+), 22 deletions(-) commit e465274a3c55a846ed47e19491b575e665f5d0c6 Author: Suniel Mahesh Date: Tue Mar 21 14:31:02 2017 +0530 staging: rtl8192e: Rectify pointer comparisions with NULL This patch simplifies code by replacing explicit NULL comparison with ! or unmark operator Reported by checkpatch.pl for comparison to NULL could be written '!foo' or 'foo' Signed-off-by: Suniel Mahesh Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 46f788ba2e09c9f48d50f47e27c8e2cfc7e1c076 Author: Ville Syrjälä Date: Fri Mar 17 23:17:55 2017 +0200 drm/i915: Extract skl_plane_ctl() Pull the code to calculate the SKL plane control register value into a separate function. Allows us to pre-compute it in the future. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170317211808.14693-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 38 ++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) commit a959dec1155714260ff347020421ee6fce0d0f61 Author: Derek Robson Date: Sun Mar 19 14:16:02 2017 +1300 Staging: rtl8192e - fixed style of block comments Fixed style of block comment across whole driver Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 2 +- drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c | 2 +- drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.h | 2 +- drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c | 2 +- drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.h | 2 +- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.h | 2 +- .../staging/rtl8192e/rtl8192e/r8192E_firmware.c | 2 +- .../staging/rtl8192e/rtl8192e/r8192E_firmware.h | 2 +- drivers/staging/rtl8192e/rtl8192e/r8192E_hw.h | 2 +- drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h | 2 +- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 2 +- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h | 2 +- drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h | 4 +- drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_cam.h | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 30 ++++++------- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 4 +- drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_eeprom.c | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_eeprom.h | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_pm.c | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_pm.h | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_wx.h | 2 +- drivers/staging/rtl8192e/rtl819x_BA.h | 2 +- drivers/staging/rtl8192e/rtl819x_HT.h | 2 +- drivers/staging/rtl8192e/rtl819x_Qos.h | 2 +- drivers/staging/rtl8192e/rtl819x_TS.h | 2 +- drivers/staging/rtl8192e/rtllib.h | 6 ++- drivers/staging/rtl8192e/rtllib_debug.h | 2 +- drivers/staging/rtl8192e/rtllib_module.c | 52 +++++++++++----------- drivers/staging/rtl8192e/rtllib_wx.c | 52 +++++++++++----------- 34 files changed, 103 insertions(+), 101 deletions(-) commit 90a69692508283d40b4de523c8d2d38c1bde6cc0 Author: Ivan Safonov Date: Tue Mar 21 12:00:33 2017 +0300 staging:r8188eu: add iv length to frame data offset If this frame contains IV/ICV fields, ether_type field located a little farther. This bug already fixed here: https://github.com/lwfinger/rtl8188eu/blob/master/core/rtw_recv.c#L569 . Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ddd10774a1b8d5c980477943576bc19d31419043 Author: Xiangyang Zhang Date: Wed Mar 22 16:47:13 2017 +0800 staging: ks7010: fixed a coding style issue Fixed checkpatch.pl CHECK: Logical continuations should be on the previous line Signed-off-by: Xiangyang Zhang Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2c4951adfae24d901c699ebb918bb6e5c7865ab7 Author: Tobin C. Harding Date: Wed Mar 22 13:06:27 2017 +1100 staging: ks7010: invert if statement conditionals Checkpatch emits WARNING: Avoid multiple line dereference. Function uses if statement blocks to guard the body of the function. If we invert these conditionals and return, then the code becomes more readable and subsequent code is indented less. The checkpatch fix then follows trivially. Invert conditionals, return from function if new conditional evaluates to true. Reduce the level of indentation in subsequent code. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 6ad6e21bd4e4edd1a3f59dc74b5f238455c05e71 Author: Tobin C. Harding Date: Wed Mar 22 13:06:26 2017 +1100 staging: ks7010: remove redundant check Function checks for condition inside a loop that checks the same condition, this is redundant. Fix also removes checkpatch CHECK. Remove redundant check. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 61082bf69662ccd32c2d9de911fc3b9d1d1adeb1 Author: Tobin C. Harding Date: Wed Mar 22 11:59:55 2017 +1100 staging: ks7010: add braces to multi-line indent The addition of curly braces around single statements that span multiple lines makes the code more readable in general. Add curly braces to multi-line indented statement. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 310e916f54579b2d9a33fd6501cc46acc2d4dc70 Author: Tobin C. Harding Date: Wed Mar 22 11:59:54 2017 +1100 staging: ks7010: add explicit check to 'size' variables When checking the value of a variable that holds a 0 an explicit check is good style. i.e - if (!size) + if (size == 0) Update checks on 'numerical' variables to use explicit checks. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 4 ++-- drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/ks_wlan_net.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) commit b5ca039ac17594e870a12c68ca8847700aa300dd Author: Tobin C. Harding Date: Wed Mar 22 11:59:53 2017 +1100 staging: ks7010: add explicit check to memcmp() calls Calls to functions memcmp() and strcmp() are more clearly readable when the return value is explicitly checked. i.e if (memcmp(foo, bar, size) == 0) Modify driver to use an explicit check on the value returned by memcmp(). Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 15 +++++++-------- drivers/staging/ks7010/ks_wlan_net.c | 13 ++++++------- 2 files changed, 13 insertions(+), 15 deletions(-) commit 58af272b333eeba428ca53b5b80dbbcf120fe57a Author: Tobin C. Harding Date: Wed Mar 22 11:59:52 2017 +1100 staging: ks7010: fix memcmp() bug Call site to memcmp() treats return value as if it were an error code, it is not. If memcmp() finds inputs to be not the same, an error return code should be set explicitly. Correctly handle return value from call to memcmp(), set error code explicitly. Reported-by: Dan Carpenter Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 12eed2f2fb8ff7623295a5f69e22ef247273cd8f Author: Arushi Singhal Date: Wed Mar 22 22:28:28 2017 +0530 staging: fbtft: Replace a bit shift by a use of BIT. This patch replaces bit shifting on 1 with the BIT(x) macro. This was done with coccinelle: @@ constant c; @@ -1 << c +BIT(c) Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_agm1264k-fl.c | 2 +- drivers/staging/fbtft/fb_ili9163.c | 2 +- drivers/staging/fbtft/fb_ili9325.c | 2 +- drivers/staging/fbtft/fb_ssd1289.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 4f8f316be6bace82139e321e11674949ce446454 Author: Arushi Singhal Date: Wed Mar 22 18:47:57 2017 +0530 staging: rts5208: Replace a bit shift by a use of BIT. This patch replaces bit shifting on 1 with the BIT(x) macro. This was done with coccinelle: @@ constant c; @@ -1 << c +BIT(c) Signed-off-by: Arushi Singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_chip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 22d89cc86c35d510f305a5e2bb651627487d26e9 Author: Narcisa Ana Maria Vasile Date: Wed Mar 22 00:53:36 2017 +0200 staging: rtl8712: Invert comparison to reduce indentation Check the condition: "pdata->length < 32" first, to be able to return immediately in case of error and then continue with the rest of the function without one extra indentation level. This was found using the following Coccinelle script: @disable neg_if@ expression e,E; statement S; @@ *if (e) S else { return -E; } @disable neg_if@ expression e,E; statement S; identifier l; @@ *if (e) S else { rc = -E; goto l; } Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit ad93cc9f15a78a7cc6532db2a0cd0dd8d4311de6 Author: Narcisa Ana Maria Vasile Date: Wed Mar 22 00:53:16 2017 +0200 staging: rtl8712: Restructure code for clarity Invert if statements to be able to return immediately in case of error, and to avoid additional else branch. Improve layout of function since there is more horizontal space now. This was found using the following Coccinelle script: @disable neg_if@ expression e,E; statement S; @@ *if (e) S else { return -E; } @disable neg_if@ expression e,E; statement S; identifier l; @@ *if (e) S else { rc = -E; goto l; } Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 69 +++++++++++++-------------- 1 file changed, 33 insertions(+), 36 deletions(-) commit 09e1aa1aaa797a40d1f9657007e7c0a90eec96cf Author: Narcisa Ana Maria Vasile Date: Wed Mar 22 00:52:59 2017 +0200 staging: rtl8712: Invert the test on check_fwstate() to reduce indentation Negate if condition to be able to return immediately in case of error, and then continue with the rest of the function without extra indentation level. This was found using the following Coccinelle script: @disable neg_if@ expression e,E; statement S; @@ *if (e) S else { return -E; } @disable neg_if@ expression e,E; statement S; identifier l; @@ *if (e) S else { rc = -E; goto l; } Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit e6d9379507d77c08fb9f91c8430c3f87ceb38d29 Author: Narcisa Ana Maria Vasile Date: Wed Mar 22 00:52:40 2017 +0200 staging: rtl8712: Invert if statements to reduce indentation level Invert if statements to be able to return immediately in case of error, and to avoid additional else branch, and then continue with the rest of the function without excessive indentation. This was found using the following Coccinelle script: @disable neg_if@ expression e,E; statement S; @@ *if (e) S else { return -E; } @disable neg_if@ expression e,E; statement S; identifier l; @@ *if (e) S else { rc = -E; goto l; } Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 39 ++++++++++++--------------- 1 file changed, 17 insertions(+), 22 deletions(-) commit ff49304b5b7b0136eb2954163dfa7c0739312169 Author: Arushi Singhal Date: Tue Mar 21 20:36:38 2017 +0530 staging: sm750fb: Remove typedef from "typedef enum _spolarity_t" This patch removes typedefs from enum and renames it from "typedef enum _spolarity_t" to "enum spolarity" as per kernel coding standards." Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_mode.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit bf76023131b35dbd5b0ae2d23ea6872f1c15af95 Author: Arushi Singhal Date: Tue Mar 21 20:36:37 2017 +0530 staging: sm750fb: Remove typedef from "typedef struct _mode_parameter_t" This patch removes typedefs from struct and renames it from "typedef struct _mode_parameter_t" to "struct mode_parameter" as per kernel coding standards." Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_mode.c | 8 +++++--- drivers/staging/sm750fb/ddk750_mode.h | 8 +++----- drivers/staging/sm750fb/sm750_hw.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) commit fdbcd023576a4397dcef3acffa1b8c00993cbf90 Author: Abhishek Bhardwaj Date: Wed Mar 22 01:43:39 2017 -0700 staging: dgnc: remove tracing prints in dgnc_tty.c Remove tracing prints in dgnc_tty_send_xchar. The same functionality could be achieved by using ftrace. Signed-off-by: Abhishek Bhardwaj Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 4 ---- 1 file changed, 4 deletions(-) commit 65bf4ea10f31a72a9477d4602bcd728ffe510465 Author: Arushi Singhal Date: Tue Mar 21 17:12:34 2017 +0530 staging: speakup: Match alignment with open parenthesis. Fix checkpatch issues: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 2 +- drivers/staging/speakup/selection.c | 2 +- drivers/staging/speakup/serialio.c | 2 +- drivers/staging/speakup/speakup_acntpc.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) commit 3b4ad1ecd1e1e4d940310bbbb99dee3d163f292b Author: Arushi Singhal Date: Tue Mar 21 17:12:32 2017 +0530 staging: speakup: Removed Unnecessary parentheses. Unnecessary parentheses are removed to improve readability. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/kobjects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 205931ea88a0e91da6b438d79a335372f9095ec4 Author: Arushi Singhal Date: Tue Mar 21 17:12:31 2017 +0530 staging: speakup: spaces preferred around operator Fixed the checkpatch.pl issues like: CHECK: spaces preferred around that '&' (ctx:VxV) CHECK: spaces preferred around that '|' (ctx:VxV) CHECK: spaces preferred around that '-' (ctx:VxV) CHECK: spaces preferred around that '+' (ctx:VxV) etc. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/speakup.h | 12 ++++++------ drivers/staging/speakup/speakup_acntpc.c | 2 +- drivers/staging/speakup/speakup_decpc.c | 20 ++++++++++---------- drivers/staging/speakup/speakup_dtlk.c | 2 +- drivers/staging/speakup/speakup_keypc.c | 6 +++--- drivers/staging/speakup/speakup_ltlk.c | 2 +- 6 files changed, 22 insertions(+), 22 deletions(-) commit 23996ee52eb74cb5c4e98adc816724a7030c11e0 Author: Arushi Singhal Date: Tue Mar 21 17:12:30 2017 +0530 staging: speakup: Moved OR operator to previous line. Moved logical OR operator to previous line to fix the following checkpatch issue: CHECK: Logical continuations should be on the previous line. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0dcb2124138a6cdaf76bb0a8247bae0bb3307743 Author: Arushi Singhal Date: Tue Mar 21 17:12:28 2017 +0530 staging: speakup: fixes braces {} should be used on all arms of this statement This patch fixes the checks reported by checkpatch.pl for braces {} should be used on all arms of this statement. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 35 +++++++++++++++++++------------- drivers/staging/speakup/speakup_decext.c | 6 +++--- drivers/staging/speakup/speakup_decpc.c | 6 +++--- drivers/staging/speakup/speakup_dectlk.c | 6 +++--- drivers/staging/speakup/varhandlers.c | 12 ++++++----- 5 files changed, 37 insertions(+), 28 deletions(-) commit b8f107bc90a7e901e68a5335879dafb7c5645819 Author: Arushi Singhal Date: Tue Mar 21 17:12:27 2017 +0530 staging: speakup: Simplify "NULL" comparisons Fixed coding style for null comparisons in speakup driver to be more consistant with the rest of the kernel coding style. Replaced 'x != NULL' with 'x' and 'x = NULL' with '!x'. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/selection.c | 2 +- drivers/staging/speakup/varhandlers.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 049aa51558fbfe79606efe961ae452a63ea6df08 Author: Arushi Singhal Date: Tue Mar 21 17:12:25 2017 +0530 staging: speakup: Moved logical to previous line. Moved logical operator to previous line to fix the following checkpatch issue: CHECK: Logical continuations should be on the previous line. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ad5a942f6c2055597192b31f9a92c47bf851f90d Author: Pranay Kr. Srivastava Date: Tue Mar 21 12:40:23 2017 +0530 remove unnecessary initial allocation of vc This patch removes the unnecessary allocation of current foreground vc during initialization. This initialization is already handled in the loop that follows it for all available virtual consoles. Signed-off-by: Pranay Kr. Srivastava Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 11 ----------- 1 file changed, 11 deletions(-) commit 4e9cc9a0a5b6c03f3ab652719b3add6562dde25e Author: Pranay Kr. Srivastava Date: Tue Mar 21 12:40:22 2017 +0530 return same error value from spk_set_key_info This patch makes spk_set_key_info return -EINVAL in case of failure instead of returning 4 different values for the type of error that occurred. Print the offending values instead as debug message. Signed-off-by: Pranay Kr. Srivastava Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit 3b3c6c24de7f2de213e5e1e04a0c4b9082d61650 Author: Ard Biesheuvel Date: Mon Feb 6 15:02:42 2017 +0000 arm64: Revert "arm64: kaslr: fix breakage with CONFIG_MODVERSIONS=y" This reverts commit 9c0e83c371cf4696926c95f9c8c77cd6ea803426, which is no longer needed now that the modversions code plays nice with relocatable PIE kernels. Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/include/asm/module.h | 5 ----- 1 file changed, 5 deletions(-) commit 7477e137dcfdf259123815d0e0b02738840ea71e Author: Andy Shevchenko Date: Thu Mar 23 14:56:32 2017 +0200 gpio: merrifield: Don't use GPIOF_DIR_IN / GPIOF_DIR_OUT The mentioned flags are dedicated solely for consumer API. Replace them by explicit values. Signed-off-by: Andy Shevchenko [Made a !bang clamp to (0,1) instead of infix ? operator] Signed-off-by: Linus Walleij drivers/gpio/gpio-merrifield.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c14d2e426c3f91e94d3e29b22bb4abdfae10f9d Author: Alan Cox Date: Mon Mar 20 14:39:56 2017 +0000 ov5693: remove unused function It's commented out in the tree with a note saying to remove it. So let's remove it. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 23 ----------------------- 1 file changed, 23 deletions(-) commit e1f28c86a22d2c923bcc18abb22874482ce55951 Author: Samuel Thibault Date: Wed Mar 22 00:55:31 2017 +0100 speakup: Fix spurious space pronunciation on spelling letters This gathers emitting the caps start string, space, spelled letter string, space, and caps stop string, into one printf, to avoid sending to the synth a space character alone, which the synth would then pronounce. Similarly, emit space along control-letter and letter spelling. Signed-off-by: Samuel Thibault Tested-by: Zahari Yurukov Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 618ef005acf8bb5bd1574b9db12c7828e457776a Author: Oscar Mateo Date: Wed Mar 22 10:39:55 2017 -0700 drm/i915/guc: Move guc_interrupts_release next to guc_interrupts_capture They go better together. Signed-off-by: Oscar Mateo Cc: Joonas Lahtinen Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_guc_submission.c | 48 +++++++++++++++--------------- 1 file changed, 24 insertions(+), 24 deletions(-) commit 35815ea9cf2626c40e32743284380bc9fc3f8cad Author: Oscar Mateo Date: Wed Mar 22 10:39:54 2017 -0700 drm/i915/guc: Split out the mmio_white_list struct We are going to need it for future platforms. Signed-off-by: Oscar Mateo Cc: Joonas Lahtinen Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_guc_submission.c | 4 ++-- drivers/gpu/drm/i915/intel_guc_fwif.h | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) commit b09935a60d55265027db9f2b0177aa24317b714c Author: Oscar Mateo Date: Wed Mar 22 10:39:53 2017 -0700 drm/i915/guc: Refactor the concept "GuC context descriptor" into "GuC stage descriptor" A GuC context and a HW context are in no way related, so the name "GuC context descriptor" is very unfortunate, because a new reader of the code gets overwhelmed very quickly with a lot of things called "context" that refer to different things. We can improve legibility a lot by simply renaming a few objects in the GuC code. v2: - Rebased - s/ctx_desc_pool/stage_desc_pool - Move some explanations to the definition of the guc_stage_desc struct (Chris) v3: - Calculate gemsize with less intermediate steps (Joonas) - Use BIT() macro (Joonas) Signed-off-by: Oscar Mateo Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_debugfs.c | 4 +- drivers/gpu/drm/i915/i915_guc_submission.c | 118 +++++++++++++++-------------- drivers/gpu/drm/i915/intel_guc_fwif.h | 48 +++++++----- drivers/gpu/drm/i915/intel_guc_loader.c | 4 +- drivers/gpu/drm/i915/intel_uc.h | 8 +- 5 files changed, 96 insertions(+), 86 deletions(-) commit 397fce887ad033b10ec8a3270dfe38388f28db01 Author: Oscar Mateo Date: Wed Mar 22 10:39:52 2017 -0700 drm/i915/guc: A little bit more of doorbell sanitization Some recent refactoring patches have left the doorbell creation outside the GuC client allocation, which does not make a lot of sense (a client without a doorbell is something useless). Move it back there, and refactor the init_doorbell_hw consequently. Thanks to this, we can do some other improvements, like hoisting the check for GuC submission enabled out of the enable function. v2: Rebased. Signed-off-by: Oscar Mateo Cc: Michal Wajdeczko Cc: Arkadiusz Hiler Cc: Tvrtko Ursulin Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_guc_submission.c | 231 ++++++++++++++++------------- drivers/gpu/drm/i915/intel_uc.c | 21 +-- 2 files changed, 138 insertions(+), 114 deletions(-) commit ed2ec71f9f7c0e1682c0821e4fa2452430f70e5e Author: Oscar Mateo Date: Wed Mar 22 10:39:51 2017 -0700 drm/i915/guc: Wait for doorbell to be inactive before deallocating Doorbell release flow requires that we wait for GEN8_DRB_VALID bit to go to zero after updating db_status before we call the GuC to release the doorbell. Kudos to Daniele for finding this out. v2: WARN instead of DRM_ERROR (Joonas) Signed-off-by: Oscar Mateo Reviewed-by: Daniele Ceraolo Spurio Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_guc_submission.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0d7681261453e6f10e0a98e7b744fe4085743291 Author: Oscar Mateo Date: Wed Mar 22 10:39:50 2017 -0700 drm/i915/guc: Improve the GuC documentation & comments about proxy submissions While at it, fix a typo (s/ring_lcra/ring_lrca) and improve the naming of one firware interface field (s/ring_tail/submit_element_info, since it can contain more than just the ring tail). No change in functionality. v2: - Remove reference to "unique user" of the GuC (Daniele) - Keep mention to renaming from "GuC context" to "client" (Daniele) Signed-off-by: Oscar Mateo Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_guc_submission.c | 42 +++++++++++++++++++----------- drivers/gpu/drm/i915/intel_guc_fwif.h | 4 +-- drivers/gpu/drm/i915/intel_uc.h | 6 +++-- 3 files changed, 33 insertions(+), 19 deletions(-) commit 5e7cd37d68673d2f51d1bdd2e60f42289831af54 Author: Oscar Mateo Date: Wed Mar 22 10:39:49 2017 -0700 drm/i915/guc: Make intel_guc_send a function pointer Prepare for an alternate GuC communication interface. v2: Make a few functions static and name them correctly while we are at it (Oscar), but leave an intel_guc_send_mmio interface for users that require old-style communication. v3: Send intel_uc_init_early back to the top (Michal). Signed-off-by: Michel Thierry Signed-off-by: Michal Wajdeczko Signed-off-by: Oscar Mateo Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_uc.c | 16 +++++++++++----- drivers/gpu/drm/i915/intel_uc.h | 9 ++++++++- 2 files changed, 19 insertions(+), 6 deletions(-) commit e74654738baf465c92f0eec37ce4be891bac36da Author: Oscar Mateo Date: Wed Mar 22 10:39:48 2017 -0700 drm/i915/guc: Break out the GuC log extras into their own "runtime" struct When initializing the GuC log struct, there is an object we need to allocate always, since the GuC needs its address at fw load time. The rest is only needed during runtime, in the sense that we only create if we actually enable GuC logging. Make that distinction explicit by subdividing further the intel_guc_log struct. v2: Call the new struct "runtime", instead of "extras" (Joonas) v3: Check indent (Joonas) Signed-off-by: Oscar Mateo Cc: Daniele Ceraolo Spurio Reviewed-by: Michal Wajdeczko Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_irq.c | 4 +- drivers/gpu/drm/i915/intel_guc_log.c | 72 ++++++++++++++++++------------------ drivers/gpu/drm/i915/intel_uc.h | 12 +++--- 3 files changed, 45 insertions(+), 43 deletions(-) commit 0704df2b08e76dfb1fd2688f74bc4409dc66228d Author: Oscar Mateo Date: Wed Mar 22 10:39:47 2017 -0700 drm/i915/guc: The Additional Data Struct (ADS) should get enabled together with GuC submission It's mandatory and it gets created if and only if GuC submission is enabled, so that should be the condition for informing the GuC about it. Also s/guc_addon_create/guc_ads_create and s/guc_addon_destroy/guc_ads_destroy and, while at it, add an explanation of what things go inside the ADS object. Signed-off-by: Oscar Mateo Cc: Joonas Lahtinen Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_guc_submission.c | 17 ++++++++++++----- drivers/gpu/drm/i915/intel_guc_loader.c | 10 ++++------ 2 files changed, 16 insertions(+), 11 deletions(-) commit 3950bf3dbff1010e3309416f9fe2acbea03156d5 Author: Oscar Mateo Date: Wed Mar 22 10:39:46 2017 -0700 drm/i915/guc: Add onion teardown to the GuC setup Starting with intel_guc_loader, down to intel_guc_submission and finally to intel_guc_log. v2: - Null execbuf client outside guc_client_free (Daniele) - Assert if things try to get allocated twice (Daniele/Joonas) - Null guc->log.buf_addr when destroyed (Daniele) - Newline between returning success and error labels (Joonas) - Remove some unnecessary comments (Joonas) - Keep guc_log_create_extras naming convention (Joonas) - Helper function guc_log_has_extras (Joonas) - No need for separate relay_channel create/destroy. It's just another extra. - No need to nullify guc->log.flush_wq when destroyed (Joonas) - Hoist the check for has_extras out of guc_log_create_extras (Joonas) - Try to do i915_guc_log_register/unregister calls (kind of) symmetric (Daniele) - Make sure initel_guc_fini is not called before init is ever called (Daniele) v3: - Remove unnecessary parenthesis (Joonas) - Check for logs enabled on debugfs registration - Rebase on top of Tvrtko's "Fix request re-submission after reset" v4: - Rebased - Comment around enabling/disabling interrupts inside GuC logging (Joonas) Signed-off-by: Oscar Mateo Cc: Daniele Ceraolo Spurio Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 11 +- drivers/gpu/drm/i915/i915_gem.c | 10 +- drivers/gpu/drm/i915/i915_guc_submission.c | 97 ++++---- drivers/gpu/drm/i915/intel_guc_loader.c | 21 -- drivers/gpu/drm/i915/intel_guc_log.c | 364 ++++++++++++++--------------- drivers/gpu/drm/i915/intel_uc.c | 55 +++-- drivers/gpu/drm/i915/intel_uc.h | 8 +- 7 files changed, 297 insertions(+), 269 deletions(-) commit 73b055349c40ac721f4939263f173c2238524091 Author: Oscar Mateo Date: Wed Mar 22 10:39:45 2017 -0700 drm/i915/guc: Keep the ctx_pool_vaddr mapped, for easy access The GuC descriptor is big in size. If we use a local definition of guc_desc we have a chance to overflow stack, so avoid it. Also, Chris abhors scatterlists :) v2: Rebased, helper function to retrieve the context descriptor, s/ctx_pool_vma/ctx_pool/ v3: Zero out guc_context_desc before initialization v4: Do not do arithmetic on void pointers (Daniele) v5: Nicer than arithmetic on pointers (Chris, Joonas) Signed-off-by: Oscar Mateo Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_guc_submission.c | 94 +++++++++++++++--------------- drivers/gpu/drm/i915/intel_guc_loader.c | 2 +- drivers/gpu/drm/i915/intel_uc.h | 3 +- 3 files changed, 49 insertions(+), 50 deletions(-) commit 392910cf3f8a0161d3da45d02ea17f2910d9193b Author: Elena Reshetova Date: Mon Mar 6 16:20:49 2017 +0200 drivers, firewire: convert fw_node.ref_count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Greg Kroah-Hartman drivers/firewire/core-topology.c | 2 +- drivers/firewire/core.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit f7d88d24c5a2b66b02770e2776fce72b5fd70193 Author: Elena Reshetova Date: Mon Mar 6 16:20:50 2017 +0200 drivers, char: convert vma_data.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Greg Kroah-Hartman drivers/char/mspec.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit abddffdf3620e3974061fa0715a1db2142b6b893 Author: Joonas Lahtinen Date: Wed Mar 22 10:39:44 2017 -0700 drm/i915/guc: Sanitize GuC client initialization Started adding proper teardown to guc_client_alloc, ended up removing quite a few dead ends where errors communicating with the GuC were silently ignored. There also seemed to be quite a few erronous teardown actions performed in case of an error (ordering wrong). v2: - Increase function symmetry/proximity (Michal/Daniele) - Fix __reserve_doorbell accounting for high priority (Daniele) - Call __update_doorbell_desc! (Daniele) - Isolate __guc_{,de}allocate_doorbell (Michal/Daniele) v3: - "Select" a cacheline is a more accurate verb than "reserve" (Daniele). - We cannot update & create the doorbell without reserving it first, so move the whole doorbell creation for execbuf_client to the submission enable (Oscar).i - Add a fixme for ignoring possible doorbell destroy errors. v4: - Remove comment about is_high_priority (Daniele) - Debug message typo (Daniele) - Reuse __get_doorbell in more places (Daniele) - Do not do arithmetic on void pointers (Daniele) - Add comment to __reset_doorbell (Daniele) v5: - gccisms like arithmetic on void pointers are not frowned upon (Oscar) Signed-off-by: Joonas Lahtinen Cc: Michal Wajdeczko Cc: Arkadiusz Hiler Cc: Tvrtko Ursulin Cc: Chris Wilson Signed-off-by: Oscar Mateo Reviewed-by: Daniele Ceraolo Spurio drivers/gpu/drm/i915/i915_debugfs.c | 4 +- drivers/gpu/drm/i915/i915_guc_submission.c | 398 ++++++++++++++++------------- drivers/gpu/drm/i915/intel_guc_fwif.h | 4 +- drivers/gpu/drm/i915/intel_uc.h | 11 +- 4 files changed, 233 insertions(+), 184 deletions(-) commit 5370860a1f0e6b4197982dc1d323f988f7b1b11d Author: Johan Hovold Date: Fri Mar 17 11:35:50 2017 +0100 USB: usblp: refactor endpoint retrieval Use the new endpoint helpers to lookup the required bulk-out endpoint and the depending on protocol likewise required bulk-in endpoint. Cc: Pete Zaitcev Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/class/usblp.c | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) commit 80070a408ca34b2fe7aed30a3fa38dd19ece8197 Author: Johan Hovold Date: Fri Mar 17 11:35:49 2017 +0100 USB: storage: refactor endpoint retrieval Use the new endpoint helpers to lookup the required bulk-in and bulk-out endpoints and the (typically) optional interrupt-in endpoint. Cc: usb-storage@lists.one-eyed-alien.net Signed-off-by: Johan Hovold Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/usb.c | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) commit f8d8464bfc90e058fe68dee02121d46f661f68cd Author: Johan Hovold Date: Fri Mar 17 11:35:48 2017 +0100 USB: cdc-acm: refactor endpoint retrieval Use the new endpoint helpers to lookup the required bulk-in, bulk-out and interrupt-in endpoints for collapsed interfaces. Note that there is already a check verifying that there are exactly three endpoints so we'd still be bailing out if there's an unexpected endpoint type. Cc: Oliver Neukum Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) commit af59f8955fc572b2a0b61dedfbcd681265a19fde Author: Johan Hovold Date: Fri Mar 17 11:35:47 2017 +0100 USB: usb-skeleton: refactor endpoint retrieval Use the new endpoint helpers to lookup the required bulk-in and bulk-out endpoints. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/usb-skeleton.c | 59 ++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 34 deletions(-) commit 499841e678f911f894b2ef0cc4a6350bf11b15c6 Author: Johan Hovold Date: Fri Mar 17 11:35:45 2017 +0100 USB: yurex: refactor endpoint retrieval Use the new endpoint helpers to lookup the required interrupt-in endpoint. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/yurex.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 9fdc1c6fdfa0bdf1854c3c06f002e6a76155fa2b Author: Johan Hovold Date: Fri Mar 17 11:35:44 2017 +0100 USB: uss720: add debug endpoint-type check Use the new endpoint helpers to lookup the interrupt-in endpoint, and only print the corresponding debugging information in case it is found. Note that the descriptors are searched in reverse order to avoid any regressions. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/uss720.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit aac96ef9ed3aba10d97cbc5afaf79365701a2f14 Author: Johan Hovold Date: Fri Mar 17 11:35:43 2017 +0100 USB: usblcd: refactor endpoint retrieval Use the new endpoint helpers to lookup the required bulk-in and bulk-out endpoints. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usblcd.c | 47 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 29 deletions(-) commit e448054b5c63b834bba874453d1f2da4e7d39461 Author: Jani Nikula Date: Wed Mar 22 16:33:38 2017 +0200 drm/scdc: declare drm_scdc_get_scrambling_status Fix sparse warning: drivers/gpu/drm/drm_scdc_helper.c:138:6: warning: symbol 'drm_scdc_get_scrambling_status' was not declared. Should it be static? Fixes: 62c58af32c93 ("drm/edid: detect SCDC support in HF-VSDB") Cc: Shashank Sharma Reviewed-by: Shashank Sharma Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1490193218-24806-1-git-send-email-jani.nikula@intel.com include/drm/drm_scdc_helper.h | 2 ++ 1 file changed, 2 insertions(+) commit 9b181166f17534a82b4b628b13e524a893715dfc Author: Johan Hovold Date: Fri Mar 17 11:35:41 2017 +0100 USB: legousbtower: refactor endpoint retrieval Use the new endpoint helpers to lookup the required interrupt-in and interrupt-out endpoints. Note that the descriptors are searched in reverse order to avoid any regressions. Cc: Juergen Stuber Cc: legousb-devel@lists.sourceforge.net Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/legousbtower.c | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) commit 2707ca16c2d400c8e2e619944470fb72ea96489f Author: Johan Hovold Date: Fri Mar 17 11:35:40 2017 +0100 USB: ldusb: refactor endpoint retrieval Use the new endpoint helpers to lookup the required interrupt-in endpoint and optional interrupt-out endpoint. Note that the descriptors are searched in reverse order to avoid any regressions. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/ldusb.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 920df8d7facde29e4124cae95ebb8de1661e17e5 Author: Johan Hovold Date: Fri Mar 17 11:35:39 2017 +0100 USB: iowarrior: refactor endpoint retrieval Use the new endpoint helpers to lookup the required interrupt-in endpoint. IOWarror56 devices also requires an interrupt-out endpoint, which is looked up in a second call. Note that the descriptors are searched in reverse order to avoid any regressions. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/iowarrior.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) commit fa38442eaac1f5a3ba883c91bdc772e77d35bf27 Author: Johan Hovold Date: Fri Mar 17 11:35:38 2017 +0100 USB: idmouse: refactor endpoint retrieval Use the new endpoint helpers to lookup the required bulk-in endpoint. Note that we now pick the first bulk-in endpoint regardless of whether it happens to be the first descriptor. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/idmouse.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit 50129f74548b5075187fa4908c2ba3a081ec1b67 Author: Johan Hovold Date: Fri Mar 17 11:35:37 2017 +0100 USB: ftdi-elan: refactor endpoint retrieval Use the new endpoint helpers to lookup the required bulk-in and bulk-out endpoints. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/ftdi-elan.c | 42 +++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 25 deletions(-) commit a8bbb0f8db700f75e1f6f287a0de6d715af05cf9 Author: Johan Hovold Date: Fri Mar 17 11:35:36 2017 +0100 USB: chaoskey: refactor endpoint retrieval Use the new endpoint helpers to lookup the required bulk-in endpoint. Signed-off-by: Johan Hovold Reviewed-by: Keith Packard Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/chaoskey.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit c77b8855c6dadb97b1614ecee844c88b621d5493 Author: Johan Hovold Date: Fri Mar 17 11:35:35 2017 +0100 USB: appledisplay: refactor endpoint retrieval Use the new endpoint helpers to lookup the required interrupt-in endpoint. Note that the default retval was never used. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/appledisplay.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit e53e0342da4bd077ba3ef325685d7dd57fb8c4d1 Author: Johan Hovold Date: Fri Mar 17 11:35:34 2017 +0100 USB: adutux: refactor endpoint retrieval Use the new endpoint helpers to lookup the required interrupt-in and interrupt-out endpoints. Note that the descriptors are searched in reverse order to avoid any regressions. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/adutux.c | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) commit e0e9052034e34f2f7016197e27764f3587de87fe Author: Johan Hovold Date: Fri Mar 17 11:35:33 2017 +0100 USB: adutux: fix up error paths Make sure to return -ENOMEM on all allocation failures and -EIO on a string-retrieval error (instead of returning -ENODEV for some such errors). Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/adutux.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit 15a818f459d2081b17861472b4b953b8a19ea587 Author: Johan Hovold Date: Fri Mar 17 11:35:32 2017 +0100 USB: adutux: drop redundant sanity check Drop a redundant sanity check for a NULL parent usb device, which is never true. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/adutux.c | 5 ----- 1 file changed, 5 deletions(-) commit 279daf4e053470f22c9421a4ab05f8e5a9e9eeec Author: Johan Hovold Date: Fri Mar 17 11:35:31 2017 +0100 USB: core: add helpers to retrieve endpoints in reverse order Several drivers have implemented their endpoint look-up loops in such a way that they have picked the last endpoint descriptor of the specified type should more than one such descriptor exist. To avoid any regressions, add corresponding helpers to lookup endpoints by searching the endpoint descriptors in reverse order. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/core/usb.c | 112 +++++++++++++++++++++++++++++++++---------------- include/linux/usb.h | 35 ++++++++++++++++ 2 files changed, 111 insertions(+), 36 deletions(-) commit 66a359390e7e34f9a4c489467234b107b3d76169 Author: Johan Hovold Date: Fri Mar 17 11:35:30 2017 +0100 USB: core: add helpers to retrieve endpoints Many USB drivers iterate over the available endpoints to find required endpoints of a specific type and direction. Typically the endpoints are required for proper function and a missing endpoint should abort probe. To facilitate code reuse, add a helper to retrieve common endpoints (bulk or interrupt, in or out) and four wrappers to find a single endpoint. Note that the helpers are marked as __must_check to serve as a reminder to always verify that all expected endpoints are indeed present. This also means that any optional endpoints, typically need to be looked up through separate calls. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/core/usb.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/usb.h | 35 +++++++++++++++++++++ 2 files changed, 118 insertions(+) commit 96cfcc9c461ca0a45ec223120984e1ae852f867e Author: Baolin Wang Date: Thu Mar 23 14:08:31 2017 +0800 usb: phy: Remove unused config Since the old common Samsung USB PHY code has been removed by commit ea2fdf8423 ("usb: phy: samsung: remove old common USB PHY code"), thus remove the unused config. Signed-off-by: Baolin Wang Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/Kconfig | 7 ------- drivers/usb/phy/Makefile | 1 - 2 files changed, 8 deletions(-) commit d2061f9cc32dbb895191833063d9f3366fdaae78 Author: Heikki Krogerus Date: Tue Mar 21 13:56:48 2017 +0200 usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY This adds driver for the USB Type-C PHY on Intel WhiskeyCove PMIC which is available on some of the Intel Broxton SoC based platforms. Signed-off-by: Heikki Krogerus Reviewed-by: Mika Westerberg Reviewed-and-Tested-by: Felipe Balbi Tested-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/Kconfig | 15 ++ drivers/usb/typec/Makefile | 1 + drivers/usb/typec/typec_wcove.c | 377 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 393 insertions(+) commit fab9288428ec0fbd09adb67d3a17c51d78196f9c Author: Heikki Krogerus Date: Tue Mar 21 13:56:47 2017 +0200 usb: USB Type-C connector class The purpose of USB Type-C connector class is to provide unified interface for the user space to get the status and basic information about USB Type-C connectors on a system, control over data role swapping, and when the port supports USB Power Delivery, also control over power role swapping and Alternate Modes. Signed-off-by: Heikki Krogerus Reviewed-by: Mika Westerberg Reviewed-and-Tested-by: Felipe Balbi Tested-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-class-typec | 276 ++++++ Documentation/usb/typec.rst | 184 ++++ MAINTAINERS | 9 + drivers/usb/Kconfig | 2 + drivers/usb/Makefile | 2 + drivers/usb/typec/Kconfig | 7 + drivers/usb/typec/Makefile | 1 + drivers/usb/typec/typec.c | 1262 +++++++++++++++++++++++++++ include/linux/usb/typec.h | 243 ++++++ 9 files changed, 1986 insertions(+) commit e1fe7b6a7b376bfb54558725ddb2a89aaaa4adcc Author: Heikki Krogerus Date: Tue Mar 21 13:56:46 2017 +0200 lib/string: add sysfs_match_string helper Make a simple helper for matching strings with sysfs attribute files. In most parts the same as match_string(), except sysfs_match_string() uses sysfs_streq() instead of strcmp() for matching. This is more convenient when used with sysfs attributes. Signed-off-by: Heikki Krogerus Reviewed-by: Mika Westerberg Reviewed-by: Felipe Balbi Tested-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman include/linux/string.h | 10 ++++++++++ lib/string.c | 26 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) commit 4a56e413b50c11df35e6c6909312ce7418848b37 Author: Andy Shevchenko Date: Wed Mar 22 16:08:07 2017 +0200 usb: dwc3: pci: Switch to devm_acpi_dev_add_driver_gpios() Switch to use managed variant of acpi_dev_add_driver_gpios() to simplify error path and fix potentially wrong assignment if ->probe() fails. While here, add a debug message in case assignment fails to allow user see the cause of a potential issue. Signed-off-by: Andy Shevchenko Acked-by: Felipe Balbi Signed-off-by: Linus Walleij drivers/usb/dwc3/dwc3-pci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b2d476404601806c5a94a5f9bfc441d3898a5541 Author: Ksenija Stanojevic Date: Thu Mar 16 13:27:13 2017 +0100 dt-bindings: mfd: Move mxs-lradc binding document from IIO to MFD The bindings, which are now used in MFD, need also to be documented in the MFD binding document. Signed-off-by: Ksenija Stanojevic Reviewed-by: Marek Vasut Signed-off-by: Lee Jones .../devicetree/bindings/iio/adc/mxs-lradc.txt | 47 ---------------------- .../devicetree/bindings/mfd/mxs-lradc.txt | 47 ++++++++++++++++++++++ 2 files changed, 47 insertions(+), 47 deletions(-) commit 0d690cc41b164d420fc8696b86f4f259e105f65a Author: Ksenija Stanojevic Date: Thu Mar 16 13:27:12 2017 +0100 iio: adc: mxs-lradc: Remove driver Since the driver has been split into MFD there is no reason for it to stay, so remove it. Signed-off-by: Ksenija Stanojevic Acked-by: Jonathan Cameron Reviewed-by: Marek Vasut Signed-off-by: Lee Jones drivers/iio/adc/Kconfig | 14 - drivers/iio/adc/Makefile | 1 - drivers/iio/adc/mxs-lradc.c | 1750 ------------------------------------------- 3 files changed, 1765 deletions(-) commit d81ca730e3e40f4fd59ab3dfcad29aed6257944d Author: Ksenija Stanojevic Date: Thu Mar 16 13:27:11 2017 +0100 input: touchscreen: mxs-lradc: Add support for touchscreen Add 4-wire/5-wire touchscreen controller. Signed-off-by: Ksenija Stanojevic Acked-by: Dmitry Torokhov Reviewed-by: Marek Vasut Signed-off-by: Lee Jones drivers/input/touchscreen/Kconfig | 10 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/mxs-lradc-ts.c | 714 +++++++++++++++++++++++++++++++ 3 files changed, 725 insertions(+) commit 6dd112b9f85e5f24ac8c15d892690cb44a4b7936 Author: Ksenija Stanojevic Date: Thu Mar 16 13:27:10 2017 +0100 iio: adc: mxs-lradc: Add support for ADC driver Add support for sixteen-channel 12-bit resolution ADC and its functions, which include general-purpose ADC readings, battery voltage measurement, and die temperature measurement. Signed-off-by: Ksenija Stanojevic Reviewed-by: Jonathan Cameron Reviewed-by: Marek Vasut Signed-off-by: Lee Jones drivers/iio/adc/Kconfig | 13 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/mxs-lradc-adc.c | 843 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 857 insertions(+) commit ead25133e9352896af4de68d2f33f1ef68997e16 Author: Ksenija Stanojevic Date: Thu Mar 16 13:27:09 2017 +0100 mfd: mxs-lradc: Add support for mxs-lradc Add core files for low resolution analog-to-digital converter (mxs-lradc) MFD driver. Signed-off-by: Ksenija Stanojevic Reviewed-by: Marek Vasut Signed-off-by: Lee Jones drivers/mfd/Kconfig | 17 +++ drivers/mfd/Makefile | 1 + drivers/mfd/mxs-lradc.c | 267 ++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/mxs-lradc.h | 187 +++++++++++++++++++++++++++++ 4 files changed, 472 insertions(+) commit d223760f38b13f3c0a14978b6c4261b9bd690494 Author: Chris Wilson Date: Thu Mar 23 08:57:58 2017 +0000 drm/i915: Wait for all fences before installing an exclusive clflush fence Ensure that before we overwrite the reservation_object with our exclusive fence for the pending clflush operation, that we do wait upon all the fences in the current reservation_object. Fixes: 57822dc6b9cf ("drm/i915: Perform object clflushing asynchronously") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170323085758.11695-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem_clflush.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f7c7ceefe5e824e8333859bded12257a6d3548a Author: Charles Keepax Date: Fri Mar 17 10:05:20 2017 +0000 mfd: wm831x: Add device tree binding document Add a device tree binding document for the wm831x series of PMICs. Currently only support for the registering the device and the GPIOs are actually implemented in the driver. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/wm831x.txt | 81 ++++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 82 insertions(+) commit 9674a8dc5bd1f3cd27f4e6f668beadc64475f3e9 Author: Charles Keepax Date: Fri Mar 17 10:05:19 2017 +0000 gpio: wm831x: Add basic device tree support Now the wm831x-core has basic DT support we can update this driver to allow use of the GPIOs within a device tree system. Signed-off-by: Charles Keepax Acked-by: Linus Walleij Signed-off-by: Lee Jones drivers/gpio/gpio-wm831x.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f6dd8449cd50de25881b76cecf1086bebeb11fe8 Author: Charles Keepax Date: Fri Mar 17 10:05:18 2017 +0000 mfd: wm831x: Add basic device tree binding Add the basic ability to register the device through device tree, more work is needed to get each individual sub-driver functioning correctly but this is enough to get the device to probe from device tree. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/wm831x-core.c | 29 +++++++++++++++++++++-------- drivers/mfd/wm831x-i2c.c | 19 ++++++++++++++++++- drivers/mfd/wm831x-irq.c | 6 +++--- drivers/mfd/wm831x-spi.c | 18 ++++++++++++++++-- include/linux/mfd/wm831x/core.h | 9 ++++++++- 5 files changed, 66 insertions(+), 15 deletions(-) commit f7f6c060547c51691f9b943e6c33f63675c1a0a9 Author: Krzysztof Kozlowski Date: Tue Mar 14 18:46:52 2017 +0200 mfd: exynos-lpass: Use common soc/exynos-regs-pmu.h header The MFD-specific header will go away because it duplicates defines from exynos-regs-pmu.h. Reported-by: kbuild test robot Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Lee Jones drivers/mfd/exynos-lpass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 233ebf5733d51cb7581b8d330799520d69484cc4 Author: Chris Wilson Date: Thu Mar 23 10:19:44 2017 +0000 drm/i915: Drop uncore spinlock for reading debugfs forcewake counters The set of available structs is not protected by the spinlock, and for the single read we can use READ_ONCE instead. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170323101944.21627-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 6e3955a5af1c3a0b7d9a50be327a71e9065c64ae Author: Chris Wilson Date: Thu Mar 23 10:19:43 2017 +0000 drm/i915: All fw_domains share the same set/clear/reset values Since we reuse the same values for each fw_domain, move them onto uncore. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170323101944.21627-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 11 +++++----- drivers/gpu/drm/i915/intel_uncore.c | 40 +++++++++++++++++++------------------ 2 files changed, 27 insertions(+), 24 deletions(-) commit 0f966aaf5f8485576c56bab5a1ab03e0da445e3b Author: Chris Wilson Date: Thu Mar 23 10:19:42 2017 +0000 drm/i915: Remove posting-read for forcewake put We can relax the requirement upon ourselves that the forcewake is released immediately and just allow it to occur naturally following our mmio request. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170323101944.21627-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/intel_uncore.c | 33 +-------------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) commit d2dc94bce295e638a15e077cbaec410a74db86c6 Author: Chris Wilson Date: Thu Mar 23 10:19:41 2017 +0000 drm/i915: Skip unused fw_domains Use find-first-set bitop to quickly scan through the fw_domains mask and skip iterating over unused domains. v2: Move the WARN into the caller, to prevent compiler warnings in normal builds. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170323101944.21627-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 3 ++- drivers/gpu/drm/i915/i915_drv.h | 30 +++++++++++++------------- drivers/gpu/drm/i915/intel_uncore.c | 42 +++++++++++++++++++++++++------------ 3 files changed, 45 insertions(+), 30 deletions(-) commit cb3600db6e2d310532d250818d58ef83aef9ce90 Author: Chris Wilson Date: Thu Mar 23 10:19:40 2017 +0000 drm/i915: Use correct fw_domains during reset In the next patch we will begin to sanity check that we do not attempt to obtain the forcewake on an unsupport domain. However, that is exactly what we do during reset of the fw_domains - rectify it before it explodes. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170323101944.21627-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_uncore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd52750485e9d4b8372360a347c63788eb76db8a Author: Chris Wilson Date: Thu Mar 23 10:19:39 2017 +0000 drm/i915: Use correct fw_domains during initialisation In the next patch we will begin to sanity check that we do not attempt to obtain the forcewake on an unsupport domain. However, that is exactly what we do during our actual initialisation of fw_domains - rectify it before it explodes. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170323101944.21627-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_uncore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 577ac4bd4caeb0a2263b61c8b4fa8924ade2d9ee Author: Chris Wilson Date: Thu Mar 23 10:19:38 2017 +0000 drm/i915: Eliminate per-fw_domain i915 backpointer Pass along the drm_i915_private pointer from the caller, rather than looking it up from each fw_domain during fw_domains_get/_put. This allows us to then eliminate the backpointer, in exchange for a more complicated unwrapping procedure in the rare intel_uncore_fw_release_timer(). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170323101944.21627-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 33 ++++++++-------- drivers/gpu/drm/i915/intel_uncore.c | 77 ++++++++++++++++++++----------------- 2 files changed, 60 insertions(+), 50 deletions(-) commit 33575b25fff26085c17675b5b63d60e889cfe959 Author: Thomas Petazzoni Date: Tue Mar 21 11:04:05 2017 +0100 mtd: nand: fsmc: remove CONFIG_OF conditional Since commit 4404d7d821c33 ("mtd: nand: fsmc: remove stale non-DT probe path"), the fsmc NAND driver only supports Device Tree probing, and therefore has a "depends on OF" in its Kconfig option. Due to this the #ifdef CONFIG_OF ... #endif condition in the driver code is no longer necessary. Signed-off-by: Thomas Petazzoni Reviewed-by: Linus Walleij Signed-off-by: Boris Brezillon drivers/mtd/nand/fsmc_nand.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 77cc88d2b9848bac16c32c01eebf45f060f81f45 Author: Thomas Petazzoni Date: Tue Mar 21 11:04:04 2017 +0100 mtd: nand: fsmc: remove unused definitions These definitions are not used anywhere in the driver, so remove them. Signed-off-by: Thomas Petazzoni Reviewed-by: Linus Walleij Signed-off-by: Boris Brezillon drivers/mtd/nand/fsmc_nand.c | 9 --------- 1 file changed, 9 deletions(-) commit fb8ed2ca432443ef1898aad7501c6e63c5c94f8e Author: Thomas Petazzoni Date: Tue Mar 21 11:04:03 2017 +0100 mtd: nand: fsmc: use devm_clk_get() This commit switches the fsmc_nand driver from clk_get() to devm_clk_get(), which saves a few clk_put(). Signed-off-by: Thomas Petazzoni Reviewed-by: Linus Walleij Signed-off-by: Boris Brezillon drivers/mtd/nand/fsmc_nand.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit a1b1e1d5bdfe79e3d3b28387dd43bb16531be5a4 Author: Thomas Petazzoni Date: Tue Mar 21 11:04:02 2017 +0100 mtd: nand: fsmc: finally remove fsmc_nand_platform_data Since the driver now only supports DT probing, it doesn't make a lot of sense to have a private data structure called platform_data, fill it in with information coming from the DT, and then copying this into the driver-specific structure fsmc_nand_data. So instead, we remove fsmc_nand_platform_data entirely, and have fsmc_nand_probe_config_dt() fill in the fsmc_nand_data structure directly. This requires calling fsmc_nand_probe_config_dt() after fsmc_nand_data has been allocated instead of before. Also, as an added bonus, we now propagate properly the return value of fsmc_nand_probe_config_dt() instead of returning -ENODEV on failure. The error message is also removed, since it no longer made any sense. Signed-off-by: Thomas Petazzoni Reviewed-by: Linus Walleij Signed-off-by: Boris Brezillon drivers/mtd/nand/fsmc_nand.c | 73 +++++++++++++------------------------------- 1 file changed, 21 insertions(+), 52 deletions(-) commit c0d218c81621d847472e01f227eab3e4f0902ce2 Author: Thomas Petazzoni Date: Tue Mar 21 11:04:01 2017 +0100 mtd: nand: fsmc: remove duplicate nand_set_flash_node() It is already done a few lines before. Signed-off-by: Thomas Petazzoni Reviewed-by: Linus Walleij Signed-off-by: Boris Brezillon drivers/mtd/nand/fsmc_nand.c | 1 - 1 file changed, 1 deletion(-) commit ede29a020ec3b493748c5eb780aa9d5977f72db8 Author: Thomas Petazzoni Date: Tue Mar 21 11:04:00 2017 +0100 mtd: nand: fsmc: kill {nr_, }partitions structure fields The ->partitions and ->nr_partitions fields of struct fsmc_nand_platform_data are never set anywhere, so they are always NULL/0. The corresponding fields in 'struct fsmc_nand_data' are set to the value of the same fields in fsmc_nand_platform_data, i.e NULL/0. Therefore, we remove those two fields, and pass NULL/0 directly to mtd_device_register(), like many other NAND drivers already do. At the same time, we remove the comment about the fact that we pass partition info, since we are no longer doing this. Signed-off-by: Thomas Petazzoni Reviewed-by: Linus Walleij Signed-off-by: Boris Brezillon drivers/mtd/nand/fsmc_nand.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit feb1e57ee583502849fca9bbe8258327b3f4c61c Author: Thomas Petazzoni Date: Tue Mar 21 11:03:59 2017 +0100 mtd: nand: fmsc: kill {read, write}_dma_priv from fsmc_nand_platform_data The read_dma_priv and write_dma_priv fields of fsmc_nand_platform_data are never set, so this commit removes them. Signed-off-by: Thomas Petazzoni Reviewed-by: Linus Walleij Signed-off-by: Boris Brezillon drivers/mtd/nand/fsmc_nand.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit a04271a723c716da534ee6c20531aee487129dbd Author: Thomas Petazzoni Date: Tue Mar 21 11:03:58 2017 +0100 mtd: nand: fsmc: remove fsmc_select_chip() host->select_chip used to point to the ->select_bank() function provided by the platform data, but the latter no longer exists. Therefore host->select_chip is always NULL. Due to this, the fsmc_select_chip() does nothing, except: chip->cmd_ctrl(mtd, NAND_CMD_NONE, 0 | NAND_CTRL_CHANGE); when chipnr is -1, which is exactly what the default implementation of ->select_chip() does in the NAND framework. So, this commit kills fsmc_select_chip() entirely. Signed-off-by: Thomas Petazzoni Reviewed-by: Linus Walleij Signed-off-by: Boris Brezillon drivers/mtd/nand/fsmc_nand.c | 29 ----------------------------- 1 file changed, 29 deletions(-) commit 6324fb93a2594fa7e748ec45751033eee1fd7fee Author: Thomas Petazzoni Date: Tue Mar 21 11:03:57 2017 +0100 mtd: nand: fsmc: remove ->select_bank() from fsmc_nand_platform_data Since commit 4404d7d821c3 ("mtd: nand: fsmc: remove stale non-DT probe path"), only DT probing is used for the fsmc_nand driver. Due to this, the ->select_bank() field of fsmc_nand_platform_data is never used, so this commit gets rid of it. Signed-off-by: Thomas Petazzoni Reviewed-by: Linus Walleij Signed-off-by: Boris Brezillon drivers/mtd/nand/fsmc_nand.c | 4 ---- 1 file changed, 4 deletions(-) commit e7cda017f66e869738b1aba7e0cfe5ead000f155 Author: Thomas Petazzoni Date: Tue Mar 21 11:03:56 2017 +0100 mtd: nand: fsmc: move fsmc_nand_data definition This commit simply moves the "struct fsmc_nand_data" definition to be towards the beginning of the file, with the other defines and type definitions, instead of in the middle of the driver code. This is much more consistent with what most Linux drivers do. Signed-off-by: Thomas Petazzoni Reviewed-by: Linus Walleij Signed-off-by: Boris Brezillon drivers/mtd/nand/fsmc_nand.c | 98 ++++++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 49 deletions(-) commit ee56874f23e5c11576540bd695177a5ebc4f4352 Author: Thomas Petazzoni Date: Tue Mar 21 11:03:53 2017 +0100 mtd: nand: fsmc: fix NAND width handling In commit eea628199d5b ("mtd: Add device-tree support to fsmc_nand"), Device Tree support was added to the fmsc_nand driver. However, this code has a bug in how it handles the bank-width DT property to set the bus width. Indeed, in the function fsmc_nand_probe_config_dt() that parses the Device Tree, it sets pdata->width to either 8 or 16 depending on the value of the bank-width DT property. Then, the ->probe() function will test if pdata->width is equal to FSMC_NAND_BW16 (which is 2) to set NAND_BUSWIDTH_16 in nand->options. Therefore, with the DT probing, this condition will never match. This commit fixes that by removing the "width" field from fsmc_nand_platform_data and instead have the fsmc_nand_probe_config_dt() function directly set the appropriate nand->options value. It is worth mentioning that if this commit gets backported to older kernels, prior to the drop of non-DT probing, then non-DT probing will be broken because nand->options will no longer be set to NAND_BUSWIDTH_16. Fixes: eea628199d5b ("mtd: Add device-tree support to fsmc_nand") Signed-off-by: Thomas Petazzoni Reviewed-by: Linus Walleij Signed-off-by: Boris Brezillon drivers/mtd/nand/fsmc_nand.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 5d4bac5503fcc67dd7999571e243cee49371aef7 Author: Chris Wilson Date: Wed Mar 22 20:59:30 2017 +0000 drm/i915: Restore marking context objects as dirty on pinning Commit e8a9c58fcd9a ("drm/i915: Unify active context tracking between legacy/execlists/guc") converted the legacy intel_ringbuffer submission to the same context pinning mechanism as execlists - that is to pin the context until the subsequent request is retired. Previously it used the vma retirement of the context object to keep itself pinned until the next request (after i915_vma_move_to_active()). In the conversion, I missed that the vma retirement was also responsible for marking the object as dirty. Mark the context object as dirty when pinning (equivalent to execlists) which ensures that if the context is swapped out due to mempressure or suspend/hibernation, when it is loaded back in it does so with the previous state (and not all zero). Fixes: e8a9c58fcd9a ("drm/i915: Unify active context tracking between legacy/execlists/guc") Reported-by: Dennis Gilmore Reported-by: Mathieu Marquer Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99993 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100181 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: # v4.11-rc1 Link: http://patchwork.freedesktop.org/patch/msgid/20170322205930.12762-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_ringbuffer.c | 2 ++ 1 file changed, 2 insertions(+) commit 4ca8c1d4979cc60cc129318ce0a89d075c9eb49f Author: Dan Carpenter Date: Wed Mar 22 12:01:45 2017 +0300 mtd: nand: hynix: Fix an error code in init We should be return -ENOMEM instead of success. Fixes: 626994e07480 ("mtd: nand: hynix: Add read-retry support for 1x nm MLC NANDs") Signed-off-by: Dan Carpenter Reviewed-by: Richard Weinberger Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_hynix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e555e326459d6f6fca4ef859c471ecf8302ceb4d Author: Chris Wilson Date: Wed Mar 22 21:03:50 2017 +0000 drm/i915: Remove superfluous hw_flags from mi_set_context() Why have both hw_flags and flags, when just one will do? Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170322210350.6208-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_context.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 96530b3777a7852222ca5ffa5eb20afed1be13bf Author: Andy Shevchenko Date: Wed Mar 22 16:11:13 2017 +0200 gpio: pca953x: Expand comment for "reset" GPIO in ACPI case GPIO ACPI library is going to be stricter about resources, thus, expand comment regarding "reset" GPIO resource in this driver to clarify its usage in ACPI case. Signed-off-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit b413d7a01c1ade52864a1923a3b329a2281bf69e Author: Andy Shevchenko Date: Wed Mar 22 16:11:12 2017 +0200 gpio: pca953x: Sort headers alphabetically For sake of better maintenance sort the headers by alphabetical order. Signed-off-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 66e57192319bdd5cc469288267764c6353c4f621 Author: Andy Shevchenko Date: Wed Mar 22 16:11:11 2017 +0200 gpio: pca953x: Introduce a long awaited ->get_direction() Introduce ->get_direction() callback for the driver. Signed-off-by: Andy Shevchenko [Removed use of GPIOF_DIR* flags] Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 40149f00fb55263cf10066bafc8470d33b1ddcfc Author: Chris Wilson Date: Wed Mar 22 22:34:47 2017 +0000 drm/i915: Actually pass the reclaim gfp_t along to shmemfs! Words cannot describe the embarrassment at creating a new gfp_t relaim to only prevent the oomkiller but allow direct|kswapd reclaim, and then not use it in the shmem_read_mapping_page_gfp(). Fixes: 24f8e00a8a2e ("drm/i915: Prefer to report ENOMEM rather than incur the oom for gfx allocations") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170322223447.7493-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2cabc4a23f8dea6caf51279777d511c7d8a5045 Author: Ralph Sennhauser Date: Fri Mar 17 18:44:06 2017 +0100 gpio: mvebu: use BIT macro instead of bit shifting Use the BIT macro instead of explicitly shifting bits for some added clarity. Signed-off-by: Ralph Sennhauser Signed-off-by: Linus Walleij drivers/gpio/gpio-mvebu.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit b9c6dcab265e93c47bdcd99ab7c6acda90ed669b Author: Andy Yan Date: Fri Mar 17 18:18:36 2017 +0100 pinctrl: rockchip: rename RK1108 to RV1108 Rockchip finally named the SOC as RV1108, so change it. Signed-off-by: Andy Yan [adapted rk1108 dtsi to keep bisectability] Signed-off-by: Heiko Stuebner Signed-off-by: Linus Walleij arch/arm/boot/dts/rk1108.dtsi | 2 +- drivers/pinctrl/pinctrl-rockchip.c | 76 +++++++++++++++++++------------------- 2 files changed, 39 insertions(+), 39 deletions(-) commit ab714cfb4e773f083a15a20b6d7ec22eef542409 Author: Andy Yan Date: Fri Mar 17 18:18:35 2017 +0100 dt-bindings: rockchip,pinctrl: rename RK1108 to RV1108 Rockchip finally named the SOC as RV1108, so change it. Also move the compatible list to one compatible per line. Signed-off-by: Andy Yan Acked-by: Rob Herring Signed-off-by: Heiko Stuebner Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/rockchip,pinctrl.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit d468289a021c638c84da29e21db7924c66571f25 Author: Jeffy Chen Date: Thu Mar 2 13:56:52 2017 +0800 pinctrl: rockchip: add irq_enable & irq_disable ops Currently we are trying to enable/disable the clk of irq's gpio bank when unmask/mask irq. But the kernel's "lazy disable approach" will skip masking irq when the irq chip doesn't support irq_disable ops. So we may hit this case: irq_enable-> enable clk irq_disable-> noop irq_enable-> enable clk again irq_disable-> noop Signed-off-by: Jeffy Chen Reviewed-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 2afd450d78f5cff1659630265e65418b36caf709 Author: Masahiro Yamada Date: Thu Mar 16 02:38:15 2017 +0900 pinctrl: uniphier: make drivers non-modular At first these drivers were written as tristate, but the module usecases are actually not tested. Make all of them boolean. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/uniphier/Kconfig | 16 ++++++++-------- drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c | 11 +++-------- drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c | 11 +++-------- drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c | 12 ++++-------- drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c | 12 ++++-------- drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c | 12 ++++-------- drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c | 12 ++++-------- drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c | 12 ++++-------- drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c | 12 ++++-------- 9 files changed, 38 insertions(+), 72 deletions(-) commit 8ef364b3cee9d89a13549652d646bc5e61440d86 Author: Masahiro Yamada Date: Thu Mar 16 02:38:14 2017 +0900 pinctrl: uniphier: remove obsoleted compatibles Since commit 3e030b0b4e46 ("pinctrl: uniphier: allow to have pinctrl node under syscon node"), this driver has kept compatibility for the old DT files. Several releases have passed since then, so remove the obsoleted compatibles and clean up the code. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | 48 +++++++++++------------- drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c | 1 - drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c | 1 - drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c | 1 - drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c | 1 - drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c | 1 - drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c | 1 - drivers/pinctrl/uniphier/pinctrl-uniphier.h | 11 +----- 8 files changed, 23 insertions(+), 42 deletions(-) commit b8c90199b51aa59da06e1a82a22ba11e69bd8150 Author: Nathan Sullivan Date: Tue Mar 14 11:13:22 2017 -0500 gpio: mmio: add support for NI 169445 NAND GPIO The GPIO-based NAND controller on National Instruments 169445 hardware exposes a set of simple lines for the control signals. Signed-off-by: Nathan Sullivan Signed-off-by: Linus Walleij .../bindings/gpio/ni,169445-nand-gpio.txt | 38 ++++++++++++++++++++++ drivers/gpio/gpio-mmio.c | 1 + 2 files changed, 39 insertions(+) commit cc97a95f953be9a30c26982e39bfbce08ced3b9b Author: Martin Blumenstingl Date: Sat Mar 18 13:27:35 2017 +0100 pinctrl: meson: gxl: add the missing PWM pin definitions This adds support for the missing PWM pins on Meson GXL SoCs, namely: - PWM_A - PWM_B - PWM_C - PWM_F (GPIOX_7 and GPIOCLK_1 can be selected as output) - PWM_AO_A (GPIOAO_3 and GPIOAO_8 can be selected as output) Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Reviewed-by: Neil Armstrong Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxl.c | 54 +++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit e6790e4b5d5e97dc287f3496dd2cf2dbabdfdb35 Author: Peter Zijlstra Date: Fri Mar 17 20:44:45 2017 +0100 locking/atomic/x86: Use atomic_try_cmpxchg() Better code generation: text data bss name 10665111 4530096 843776 defconfig-build/vmlinux.3 10655703 4530096 843776 defconfig-build/vmlinux.4 Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/atomic.h | 27 +++++++++---------------- arch/x86/include/asm/atomic64_64.h | 40 +++++++++++++------------------------- 2 files changed, 22 insertions(+), 45 deletions(-) commit b78c0d471255e99411d6c1b3975df21c3cd9f349 Author: Peter Zijlstra Date: Wed Feb 1 16:07:55 2017 +0100 locking/refcounts: Use atomic_try_cmpxchg() Generates better code (GCC-6.2.1): text filename 1576 defconfig-build/lib/refcount.o.pre 1488 defconfig-build/lib/refcount.o.post Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar lib/refcount.c | 47 +++++++++++++++-------------------------------- 1 file changed, 15 insertions(+), 32 deletions(-) commit a9ebf306f52c756c4f9e50ee9a60cd6389d71344 Author: Peter Zijlstra Date: Wed Feb 1 16:39:38 2017 +0100 locking/atomic: Introduce atomic_try_cmpxchg() Add a new cmpxchg interface: bool try_cmpxchg(u{8,16,32,64} *ptr, u{8,16,32,64} *val, u{8,16,32,64} new); Where the boolean returns the result of the compare; and thus if the exchange happened; and in case of failure, the new value of *ptr is returned in *val. This allows simplification/improvement of loops like: for (;;) { new = val $op $imm; old = cmpxchg(ptr, val, new); if (old == val) break; val = old; } into: do { } while (!try_cmpxchg(ptr, &val, val $op $imm)); while also generating better code (GCC6 and onwards). Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/atomic.h | 6 ++++ arch/x86/include/asm/atomic64_64.h | 6 ++++ arch/x86/include/asm/cmpxchg.h | 69 ++++++++++++++++++++++++++++++++++++++ include/linux/atomic.h | 42 +++++++++++++++++++++++ 4 files changed, 123 insertions(+) commit 1f9ca184049724209cddbddac593d13eb87e48c0 Merge: b23adb7 d582799 Author: Ingo Molnar Date: Thu Mar 23 08:28:19 2017 +0100 Merge branch 'x86/process' into x86/mm, to create new base for further patches Signed-off-by: Ingo Molnar commit b23adb7d3f7d1d7cce03db9704de67a99ceeda38 Author: Andy Lutomirski Date: Wed Mar 22 14:32:34 2017 -0700 x86/xen/gdt: Use X86_FEATURE_XENPV instead of globals for the GDT fixup Xen imposes special requirements on the GDT. Rather than using a global variable for the pgprot, just use an explicit special case for Xen -- this makes it clearer what's going on. It also debloats 64-bit kernels very slightly. Signed-off-by: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Garnier Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/e9ea96abbfd6a8c87753849171bb5987ecfeb523.1490218061.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 1 - arch/x86/kernel/cpu/common.c | 28 +++++++++++++++++----------- arch/x86/xen/enlighten.c | 3 --- 3 files changed, 17 insertions(+), 15 deletions(-) commit 59c58ceb29d0f030eddb36a3a9dbadcc499786a6 Author: Andy Lutomirski Date: Wed Mar 22 14:32:33 2017 -0700 x86/gdt: Get rid of the get_*_gdt_*_vaddr() helpers There's a single caller that is only there because it's passing a pointer into a function (vmcs_writel()) that takes an unsigned long. Let's just cast it in place rather than having a bunch of trivial helpers. Signed-off-by: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Garnier Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/46108fb35e1699252b1b6a85039303ff562c9836.1490218061.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 20 -------------------- arch/x86/kvm/vmx.c | 4 ++-- 2 files changed, 2 insertions(+), 22 deletions(-) commit 23b2a4ddebdd17fad265b4bb77256c2e4ec37dee Author: Andy Lutomirski Date: Wed Mar 22 14:32:32 2017 -0700 x86/boot/32: Defer resyncing initial_page_table until per-cpu is set up The x86 smpboot trampoline expects initial_page_table to have the GDT mapped. If the GDT ends up in a virtually mapped per-cpu page, then it won't be in the page tables at all until perc-pu areas are set up. The result will be a triple fault the first time that the CPU attempts to access the GDT after LGDT loads the perc-pu GDT. This appears to be an old bug, but somehow the GDT fixmap rework is triggering it. This seems to have something to do with the memory layout. Signed-off-by: Andy Lutomirski Cc: Ard Biesheuvel Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Garnier Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/a553264a5972c6a86f9b5caac237470a0c74a720.1490218061.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/setup.c | 15 --------------- arch/x86/kernel/setup_percpu.c | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 15 deletions(-) commit 3fa1cabbc3b61224ef33d3ca4a1a96998529bc68 Author: Andy Lutomirski Date: Wed Mar 22 14:32:31 2017 -0700 x86/efi/32: Fix EFI on systems where the per-cpu GDT is virtually mapped __pa() on a per-cpu pointer is invalid. This bug appears to go *waaay* back, and I guess it's just never been triggered. Signed-off-by: Andy Lutomirski Cc: Ard Biesheuvel Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Garnier Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/5ba1d3ffca85e1a5b3ac99265ebe55df4cf0dbe4.1490218061.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/platform/efi/efi_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa4ea675528f3fa11e9663e5a32f55a81c34dcac Author: Andy Lutomirski Date: Wed Mar 22 14:32:30 2017 -0700 x86/gdt: Fix setup_fixmap_gdt() to use the correct PA __pa() cannot be used on percpu pointers because they may be virtually mapped. Use per_cpu_ptr_to_phys() instead. This fixes a boot crash on a some 32-bit configurations. I assume this is related to which allocation strategy is chosen by the percpu core. Signed-off-by: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Garnier Cc: Thomas Gleixner Fixes: 69218e47994d x86: ("Remap GDT tables in the fixmap section") Link: http://lkml.kernel.org/r/22e0069c29fba31998f193201e359eebfdac4960.1490218061.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 6 ++++++ arch/x86/kernel/cpu/common.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit 65973dd3fd31151823f4b8c289eebbb3fb7e6bc0 Author: Andy Lutomirski Date: Wed Mar 22 14:32:29 2017 -0700 selftests/x86/ldt_gdt_32: Work around a glibc sigaction() bug i386 glibc is buggy and calls the sigaction syscall incorrectly. This is asymptomatic for normal programs, but it blows up on programs that do evil things with segmentation. The ldt_gdt self-test is an example of such an evil program. This doesn't appear to be a regression -- I think I just got lucky with the uninitialized memory that glibc threw at the kernel when I wrote the test. This hackish fix manually issues sigaction(2) syscalls to undo the damage. Without the fix, ldt_gdt_32 segfaults; with the fix, it passes for me. See: https://sourceware.org/bugzilla/show_bug.cgi?id=21269 Signed-off-by: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Garnier Cc: Thomas Gleixner Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/aaab0f9f93c9af25396f01232608c163a760a668.1490218061.git.luto@kernel.org Signed-off-by: Ingo Molnar tools/testing/selftests/x86/ldt_gdt.c | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 8b373ffc797713337f42f0e58d832d5cae86752c Author: Peter Chen Date: Mon Mar 13 10:18:45 2017 +0800 usb: ehci: use bus->sysdev for DMA configuration Set the dma for ehci from sysdev. The sysdev is pointing to device that is known to the system firmware or hardware. Cc: Arnd Bergmann Cc: Sriram Dash Signed-off-by: Peter Chen Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-mem.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 4c39d4b949d36faffbc726525b469886cf311d1c Author: Arnd Bergmann Date: Mon Mar 13 10:18:44 2017 +0800 usb: xhci: use bus->sysdev for DMA configuration For xhci-hcd platform device, all the DMA parameters are not configured properly, notably dma ops for dwc3 devices. So, set the dma for xhci from sysdev. sysdev is pointing to device that is known to the system firmware or hardware. Cc: Baolin Wang Tested-by: Alexander Sverdlin Tested-by: Vivek Gautam Signed-off-by: Arnd Bergmann Signed-off-by: Sriram Dash Signed-off-by: Mathias Nyman Signed-off-by: Peter Chen Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 12 ++++++------ drivers/usb/host/xhci-plat.c | 35 +++++++++++++++++++++++++++-------- drivers/usb/host/xhci.c | 15 +++++++++++---- 3 files changed, 44 insertions(+), 18 deletions(-) commit 8123e4953fe6c1d3303d23eefe5e41d2934e2a06 Author: Arnd Bergmann Date: Mon Mar 13 10:18:43 2017 +0800 usb: ehci: fsl: use bus->sysdev for DMA configuration For the dual role ehci fsl driver, sysdev will handle the dma config. Signed-off-by: Arnd Bergmann Signed-off-by: Sriram Dash Signed-off-by: Mathias Nyman Signed-off-by: Peter Chen Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-fsl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aeb78cda51005fa00943e331c1fb47c6ad74015d Author: Arnd Bergmann Date: Mon Mar 13 10:18:42 2017 +0800 usb: chipidea: use bus->sysdev for DMA configuration Set the dma for chipidea from sysdev. This is inherited from its parent node. Also, do not set dma mask for child as it is not required now. Signed-off-by: Arnd Bergmann Signed-off-by: Sriram Dash Acked-by: Peter Chen Signed-off-by: Mathias Nyman Signed-off-by: Peter Chen Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/core.c | 3 --- drivers/usb/chipidea/host.c | 3 ++- drivers/usb/chipidea/udc.c | 10 ++++++---- 3 files changed, 8 insertions(+), 8 deletions(-) commit a8c06e407ef969461b7f51ec72839fe382dd3c29 Author: Arnd Bergmann Date: Mon Mar 13 10:18:41 2017 +0800 usb: separate out sysdev pointer from usb_bus For xhci-hcd platform device, all the DMA parameters are not configured properly, notably dma ops for dwc3 devices. The idea here is that you pass in the parent of_node along with the child device pointer, so it would behave exactly like the parent already does. The difference is that it also handles all the other attributes besides the mask. sysdev will represent the physical device, as seen from firmware or bus.Splitting the usb_bus->controller field into the Linux-internal device (used for the sysfs hierarchy, for printks and for power management) and a new pointer (used for DMA, DT enumeration and phy lookup) probably covers all that we really need. Signed-off-by: Arnd Bergmann Signed-off-by: Sriram Dash Tested-by: Baolin Wang Tested-by: Brian Norris Tested-by: Alexander Sverdlin Tested-by: Vivek Gautam Signed-off-by: Mathias Nyman Signed-off-by: Peter Chen Cc: Felipe Balbi Cc: Grygorii Strashko Cc: Sinjan Kumar Cc: David Fisher Cc: Catalin Marinas Cc: "Thang Q. Nguyen" Cc: Yoshihiro Shimoda Cc: Stephen Boyd Cc: Bjorn Andersson Cc: Ming Lei Cc: Jon Masters Cc: Dann Frazier Cc: Peter Chen Cc: Leo Li Signed-off-by: Greg Kroah-Hartman drivers/usb/core/buffer.c | 12 +++---- drivers/usb/core/hcd.c | 80 ++++++++++++++++++++++++++--------------------- drivers/usb/core/usb.c | 18 +++++------ include/linux/usb.h | 1 + include/linux/usb/hcd.h | 3 ++ 5 files changed, 64 insertions(+), 50 deletions(-) commit 628d4c46eef4fabe3ddbe07698577162c1cd5d41 Merge: 1e797f5 65d1086 Author: Daniel Vetter Date: Thu Mar 23 08:15:55 2017 +0100 Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux into drm-misc-next Resync with drm-next, I have a patch which currently can't be applied because drm-misc-next lacked the latest drm/i915 code. Signed-off-by: Daniel Vetter commit aa18bc8ddcb3ffe3fdb87a59b81371fb8bceea38 Merge: 93aa2a1 65d1086 Author: Daniel Vetter Date: Thu Mar 23 08:15:18 2017 +0100 Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued Backmerge drm-next to get at the hdmi2.0 helper functions. Signed-off-by: Daniel Vetter commit f5cccf49428447dfbc9edb7a04bb8fc316269781 Author: Guenter Roeck Date: Mon Mar 20 14:30:50 2017 -0700 usb: hub: Do not attempt to autosuspend disconnected devices While running a bind/unbind stress test with the dwc3 usb driver on rk3399, the following crash was observed. Unable to handle kernel NULL pointer dereference at virtual address 00000218 pgd = ffffffc00165f000 [00000218] *pgd=000000000174f003, *pud=000000000174f003, *pmd=0000000001750003, *pte=00e8000001751713 Internal error: Oops: 96000005 [#1] PREEMPT SMP Modules linked in: uinput uvcvideo videobuf2_vmalloc cmac ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat rfcomm xt_mark fuse bridge stp llc zram btusb btrtl btbcm btintel bluetooth ip6table_filter mwifiex_pcie mwifiex cfg80211 cdc_ether usbnet r8152 mii joydev snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device ppp_async ppp_generic slhc tun CPU: 1 PID: 29814 Comm: kworker/1:1 Not tainted 4.4.52 #507 Hardware name: Google Kevin (DT) Workqueue: pm pm_runtime_work task: ffffffc0ac540000 ti: ffffffc0af4d4000 task.ti: ffffffc0af4d4000 PC is at autosuspend_check+0x74/0x174 LR is at autosuspend_check+0x70/0x174 ... Call trace: [] autosuspend_check+0x74/0x174 [] usb_runtime_idle+0x20/0x40 [] __rpm_callback+0x48/0x7c [] rpm_idle+0x1e8/0x498 [] pm_runtime_work+0x88/0xcc [] process_one_work+0x390/0x6b8 [] worker_thread+0x480/0x610 [] kthread+0x164/0x178 [] ret_from_fork+0x10/0x40 Source: (gdb) l *0xffffffc00080dcc0 0xffffffc00080dcc0 is in autosuspend_check (drivers/usb/core/driver.c:1778). 1773 /* We don't need to check interfaces that are 1774 * disabled for runtime PM. Either they are unbound 1775 * or else their drivers don't support autosuspend 1776 * and so they are permanently active. 1777 */ 1778 if (intf->dev.power.disable_depth) 1779 continue; 1780 if (atomic_read(&intf->dev.power.usage_count) > 0) 1781 return -EBUSY; 1782 w |= intf->needs_remote_wakeup; Code analysis shows that intf is set to NULL in usb_disable_device() prior to setting actconfig to NULL. At the same time, usb_runtime_idle() does not lock the usb device, and neither does any of the functions in the traceback. This means that there is no protection against a race condition where usb_disable_device() is removing dev->actconfig->interface[] pointers while those are being accessed from autosuspend_check(). To solve the problem, synchronize and validate device state between autosuspend_check() and usb_disconnect(). Acked-by: Alan Stern Signed-off-by: Guenter Roeck Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/driver.c | 3 +++ drivers/usb/core/hub.c | 6 ++++++ 2 files changed, 9 insertions(+) commit 245b2eecee2aac6fdc77dcafaa73c33f9644c3c7 Author: Guenter Roeck Date: Mon Mar 20 11:16:11 2017 -0700 usb: hub: Fix error loop seen after hub communication errors While stress testing a usb controller using a bind/unbind looop, the following error loop was observed. usb 7-1.2: new low-speed USB device number 3 using xhci-hcd usb 7-1.2: hub failed to enable device, error -108 usb 7-1-port2: cannot disable (err = -22) usb 7-1-port2: couldn't allocate usb_device usb 7-1-port2: cannot disable (err = -22) hub 7-1:1.0: hub_ext_port_status failed (err = -22) hub 7-1:1.0: hub_ext_port_status failed (err = -22) hub 7-1:1.0: activate --> -22 hub 7-1:1.0: hub_ext_port_status failed (err = -22) hub 7-1:1.0: hub_ext_port_status failed (err = -22) hub 7-1:1.0: activate --> -22 hub 7-1:1.0: hub_ext_port_status failed (err = -22) hub 7-1:1.0: hub_ext_port_status failed (err = -22) hub 7-1:1.0: activate --> -22 hub 7-1:1.0: hub_ext_port_status failed (err = -22) hub 7-1:1.0: hub_ext_port_status failed (err = -22) hub 7-1:1.0: activate --> -22 hub 7-1:1.0: hub_ext_port_status failed (err = -22) hub 7-1:1.0: hub_ext_port_status failed (err = -22) hub 7-1:1.0: activate --> -22 hub 7-1:1.0: hub_ext_port_status failed (err = -22) hub 7-1:1.0: hub_ext_port_status failed (err = -22) hub 7-1:1.0: activate --> -22 hub 7-1:1.0: hub_ext_port_status failed (err = -22) hub 7-1:1.0: hub_ext_port_status failed (err = -22) hub 7-1:1.0: activate --> -22 hub 7-1:1.0: hub_ext_port_status failed (err = -22) hub 7-1:1.0: hub_ext_port_status failed (err = -22) hub 7-1:1.0: activate --> -22 hub 7-1:1.0: hub_ext_port_status failed (err = -22) hub 7-1:1.0: hub_ext_port_status failed (err = -22) ** 57 printk messages dropped ** hub 7-1:1.0: activate --> -22 ** 82 printk messages dropped ** hub 7-1:1.0: hub_ext_port_status failed (err = -22) This continues forever. After adding tracebacks into the code, the call sequence leading to this is found to be as follows. [] hub_activate+0x368/0x7b8 [] hub_resume+0x2c/0x3c [] usb_resume_interface.isra.6+0x128/0x158 [] usb_suspend_both+0x1e8/0x288 [] usb_runtime_suspend+0x3c/0x98 [] __rpm_callback+0x48/0x7c [] rpm_callback+0xa8/0xd4 [] rpm_suspend+0x84/0x758 [] rpm_idle+0x2c8/0x498 [] __pm_runtime_idle+0x60/0xac [] usb_autopm_put_interface+0x6c/0x7c [] hub_event+0x10ac/0x12ac [] process_one_work+0x390/0x6b8 [] worker_thread+0x480/0x610 [] kthread+0x164/0x178 [] ret_from_fork+0x10/0x40 kick_hub_wq() is called from hub_activate() even after failures to communicate with the hub. This results in an endless sequence of hub event -> hub activate -> wq trigger -> hub event -> ... Provide two solutions for the problem. - Only trigger the hub event queue if communication with the hub is successful. - After a suspend failure, only resume already suspended interfaces if the communication with the device is still possible. Each of the changes fixes the observed problem. Use both to improve robustness. Acked-by: Alan Stern Signed-off-by: Guenter Roeck Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/driver.c | 18 ++++++++++++++++++ drivers/usb/core/hub.c | 5 ++++- 2 files changed, 22 insertions(+), 1 deletion(-) commit 21a60f6e65181cad64fd66ccc8080d413721ba27 Author: Gerd Hoffmann Date: Mon Mar 20 09:11:49 2017 +0100 ohci-pci: add qemu quirk On a loaded virtualization host (dozen guests booting at the same time) it may happen that the ohci controller emulation doesn't manage to do timely frame processing, with the result that the io watchdog fires and considers the controller being dead, even though it's only the emulation being unusual slow due to the load peak. So, add a quirk for qemu and don't use the watchdog in case we figure we are running on emulated ohci. The virtual ohci controller masquerades as apple ohci controller, but we can identify it by subsystem id. Signed-off-by: Gerd Hoffmann Signed-off-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-hcd.c | 3 ++- drivers/usb/host/ohci-pci.c | 16 ++++++++++++++++ drivers/usb/host/ohci.h | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) commit bc4278987e3874da62edf585fe8b3bdd9b53f638 Author: Vincent Guittot Date: Fri Mar 17 14:47:22 2017 +0100 sched/fair: Fix FTQ noise bench regression A regression of the FTQ noise has been reported by Ying Huang, on the following hardware: 8 threads Intel(R) Core(TM)i7-4770 CPU @ 3.40GHz with 8G memory ... which was caused by this commit: commit 4e5160766fcc ("sched/fair: Propagate asynchrous detach") The only part of the patch that can increase the noise is the update of blocked load of group entity in update_blocked_averages(). We can optimize this call and skip the update of group entity if its load and utilization are already null and there is no pending propagation of load in the task group. This optimization partly restores the noise score. A more agressive optimization has been tried but has shown worse score. Reported-by: ying.huang@linux.intel.com Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dietmar.eggemann@arm.com Cc: ying.huang@intel.com Fixes: 4e5160766fcc ("sched/fair: Propagate asynchrous detach") Link: http://lkml.kernel.org/r/1489758442-2877-1-git-send-email-vincent.guittot@linaro.org [ Fixed typos, improved layout. ] Signed-off-by: Ingo Molnar kernel/sched/fair.c | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) commit d7921a5ddab8d30e06e321f37eec629f23797486 Author: Wanpeng Li Date: Thu Mar 16 19:45:19 2017 -0700 sched/core: Fix rq lock pinning warning after call balance callbacks This can be reproduced by running rt-migrate-test: WARNING: CPU: 2 PID: 2195 at kernel/locking/lockdep.c:3670 lock_unpin_lock() unpinning an unpinned lock ... Call Trace: dump_stack() __warn() warn_slowpath_fmt() lock_unpin_lock() __balance_callback() __schedule() schedule() futex_wait_queue_me() futex_wait() do_futex() SyS_futex() do_syscall_64() entry_SYSCALL64_slow_path() Revert the rq_lock_irqsave() usage here, the whole point of the balance_callback() was to allow dropping rq->lock. Reported-by: Fengguang Wu Signed-off-by: Wanpeng Li Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 8a8c69c32778 ("sched/core: Add rq->lock wrappers") Link: http://lkml.kernel.org/r/1489718719-3951-1-git-send-email-wanpeng.li@hotmail.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4ccb6aea4b3eb97c94575d1ed4bf10744169f082 Merge: f25d384 093b995 Author: Ingo Molnar Date: Thu Mar 23 07:35:15 2017 +0100 Merge branch 'linus' into x86/asm, to refresh the topic tree with fixes Signed-off-by: Ingo Molnar commit c34cd35ed98ffc2c6312c7fd19acd2bad55ff045 Author: Neil Armstrong Date: Thu Mar 9 15:52:46 2017 +0100 ARM64: dts: meson-gxbb-odroidc2: Fix TFLASH VDD regulator GPIO line The wrong GPIO line was provided here. Fixes: ef8d2ffedf18 ("ARM64: dts: meson-gxbb: add MMC support") Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b03c7d6438bbf59b559c3fe219a74d7a86bc6310 Author: Neil Armstrong Date: Thu Mar 9 15:52:45 2017 +0100 ARM64: dts: meson-gxbb-odroidc2: Add GPIO lines names This patch describes the GPIO lines usage on the Odroid-C2 board. This is useful in the debugfs gpio file and using the cdev gpio API. Signed-off-by: Neil Armstrong Reviewed-by: Linus Walleij Signed-off-by: Kevin Hilman .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 82838e6f523aa02332318f09599474ed2ac4d134 Author: Neil Armstrong Date: Tue Mar 7 11:40:22 2017 +0100 ARM64: dts: meson-gx: Add Buttons to Q200 and P230 boards This patch adds support for the P230 and Q200 ADC laddered button and GPIO button. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman .../boot/dts/amlogic/meson-gxl-s905d-p230.dts | 40 ++++++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts | 40 ++++++++++++++++++++++ 2 files changed, 80 insertions(+) commit 4deece6c9fe69f396812a956f526d1cb43e9c0f0 Merge: 6069f3f ce12b81 Author: David S. Miller Date: Wed Mar 22 19:38:57 2017 -0700 Merge branch 'netvsc-bug-fixes-and-cleanups' Stephen Hemminger says: ==================== netvsc: bug fixes and cleanups These fix NAPI issues and bugs found during testing of shutdown testing. ==================== Signed-off-by: David S. Miller commit ce12b81061a0a2647ca90c04d131d90edd5c5063 Author: stephen hemminger Date: Wed Mar 22 14:51:05 2017 -0700 netvsc: fix and cleanup rndis_filter_set_packet_filter Fix warning from unused set_complete variable. And rearrange code to eliminate unnecessary goto's. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/rndis_filter.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit ebc1dcf6008e562a8f88a6b1f4a4705f4d4c4fdd Author: stephen hemminger Date: Wed Mar 22 14:51:04 2017 -0700 netvsc: eliminate unnecessary skb == NULL checks Since there already is a special case goto for control messages (skb == NULL) in netvsc_send, there is no need for later checks in same code path. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 00ecfb3b34b69dd702dee1bd6de6fc100be384db Author: stephen hemminger Date: Wed Mar 22 14:51:03 2017 -0700 netvsc: remove unnecessary lock on shutdown The channel inbound lock was not being used at all by the netvsc device, but the spin_lock was helpful by providing necessary barrier before waiting. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/rndis_filter.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 43c7bd1ffcd1621c64cedf1be52156e2f95bba9b Author: stephen hemminger Date: Wed Mar 22 14:51:02 2017 -0700 netvsc: use refcount_t for keeping track of sub channels Rather than a lock and variable, use a refcount_t to keep track of the number of sub channels. Don't need to wait for subchannels on device removal since wait was already done in device_add. Also fix the error handling; don't wait forever in case of an error on request to create sub channels. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 4 ++-- drivers/net/hyperv/rndis_filter.c | 41 ++++++++++----------------------------- 2 files changed, 12 insertions(+), 33 deletions(-) commit a0be450e19d397e9ff215e32ed31bc51339b460a Author: stephen hemminger Date: Wed Mar 22 14:51:01 2017 -0700 netvsc: uses RCU instead of removal flag It is cleaner to use RCU protected pointer (nvdev_ctx->nvdev) to indicate device is in removed state, rather than having a separate boolean flag. By using the pointer the context can be checked by static checkers and dynamic lockdep. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 3 --- drivers/net/hyperv/netvsc.c | 4 ---- drivers/net/hyperv/netvsc_drv.c | 34 ++++++++++------------------------ 3 files changed, 10 insertions(+), 31 deletions(-) commit 545a8e79bd1cc8774877a26275171a2ec8881c9e Author: stephen hemminger Date: Wed Mar 22 14:51:00 2017 -0700 netvsc: use RCU to protect inner device structure The netvsc driver has an internal structure (netvsc_device) which is created when device is opened and released when device is closed. And also opened/released when MTU or number of channels change. Since this is referenced in the receive and transmit path, it is safer to use RCU to protect/prevent use after free problems. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 4 ++- drivers/net/hyperv/netvsc.c | 16 +++++++---- drivers/net/hyperv/netvsc_drv.c | 61 +++++++++++++++++++++++++++++------------ 3 files changed, 57 insertions(+), 24 deletions(-) commit 3071ada4916e26a8961c1b99f7766a73b9007bfc Author: stephen hemminger Date: Wed Mar 22 14:50:59 2017 -0700 netvsc: change max channel calculation The default number of maximum channels should be limited to the number of cpus available on the numa node of the primary channel. This also makes sure maximum channels <= num_online_cpus Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 3 +-- drivers/net/hyperv/rndis_filter.c | 25 ++++++++++--------------- 2 files changed, 11 insertions(+), 17 deletions(-) commit 163891d7d42935e7499daa0646a8eb3c44504300 Author: stephen hemminger Date: Wed Mar 22 14:50:58 2017 -0700 netvsc: handle offline mtu and channel change If device is not up, then changing MTU (or number of channels) should not re-enable the device. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) commit f4f1c23d6e41f5ee4973a6da65cba1e1c536ec29 Author: stephen hemminger Date: Wed Mar 22 14:50:57 2017 -0700 netvsc: fix NAPI performance regression When using NAPI, the single stream performance declined signifcantly because the poll routine was updating host after every burst of packets. This excess signalling caused host throttling. This fix restores the old behavior. Host is only signalled after the ring has been emptied. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 1 + drivers/net/hyperv/netvsc.c | 41 ++++++++++++++++++----------------------- 2 files changed, 19 insertions(+), 23 deletions(-) commit 6069f3fbde03211f4b839e188eba2439f8b8326a Author: VSR Burru Date: Wed Mar 22 11:54:50 2017 -0700 liquidio: fix tx completions in napi poll If there are no egress packets pending, then don't look for tx completions in napi poll. Also, fix broken tx queue wakeup logic. Signed-off-by: VSR Burru Signed-off-by: Felix Manlunas Signed-off-by: Satanand Burla Signed-off-by: Derek Chickles Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 20 +++++++++++--------- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 19 +++++++++++-------- 2 files changed, 22 insertions(+), 17 deletions(-) commit 031d4f1210a0401e938a27b229de2e9839311cde Author: Satanand Burla Date: Wed Mar 22 11:31:13 2017 -0700 liquidio: allocate RX buffers in OOM conditions in PF and VF Add workqueue that is periodically run to try to allocate RX buffers in OOM conditions in PF and VF. Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller .../ethernet/cavium/liquidio/cn23xx_pf_device.h | 2 + drivers/net/ethernet/cavium/liquidio/lio_core.c | 56 ++++++++++++++++++++++ drivers/net/ethernet/cavium/liquidio/lio_main.c | 5 ++ drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 5 ++ drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 26 ++++++++++ drivers/net/ethernet/cavium/liquidio/octeon_droq.h | 2 + .../net/ethernet/cavium/liquidio/octeon_network.h | 7 +++ 7 files changed, 103 insertions(+) commit 3426bd7277b987845e07e24ab6b4bc7afe8c1622 Author: Philippe Reynes Date: Wed Mar 22 08:27:57 2017 +0100 net: vmxnet3: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_ethtool.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit ebb6b4b1ff50635a17f1322e25372ffbf9407c48 Author: Philippe Reynes Date: Tue Mar 21 23:24:24 2017 +0100 net: virtio_net: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/virtio_net.c | 48 +++++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 19 deletions(-) commit 4ad23a976413aa57fe5ba7a25953dc35ccca5b71 Author: NeilBrown Date: Wed Mar 15 14:05:14 2017 +1100 MD: use per-cpu counter for writes_pending The 'writes_pending' counter is used to determine when the array is stable so that it can be marked in the superblock as "Clean". Consequently it needs to be updated frequently but only checked for zero occasionally. Recent changes to raid5 cause the count to be updated even more often - once per 4K rather than once per bio. This provided justification for making the updates more efficient. So we replace the atomic counter a percpu-refcount. This can be incremented and decremented cheaply most of the time, and can be switched to "atomic" mode when more precise counting is needed. As it is possible for multiple threads to want a precise count, we introduce a "sync_checker" counter to count the number of threads in "set_in_sync()", and only switch the refcount back to percpu mode when that is zero. We need to be careful about races between set_in_sync() setting ->in_sync to 1, and md_write_start() setting it to zero. md_write_start() holds the rcu_read_lock() while checking if the refcount is in percpu mode. If it is, then we know a switch to 'atomic' will not happen until after we call rcu_read_unlock(), in which case set_in_sync() will see the elevated count, and not set in_sync to 1. If it is not in percpu mode, we take the mddev->lock to ensure proper synchronization. It is no longer possible to quickly check if the count is zero, which we previously did to update a timer or to schedule the md_thread. So now we do these every time we decrement that counter, but make sure they are fast. mod_timer() already optimizes the case where the timeout value doesn't actually change. We leverage that further by always rounding off the jiffies to the timeout value. This may delay the marking of 'clean' slightly, but ensure we only perform atomic operation here when absolutely needed. md_wakeup_thread() current always calls wake_up(), even if THREAD_WAKEUP is already set. That too can be optimised to avoid calls to wake_up(). Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 70 ++++++++++++++++++++++++++++++++++++++------------------- drivers/md/md.h | 3 ++- 2 files changed, 49 insertions(+), 24 deletions(-) commit 210f7cdcf088c304ee0533ffd33d6f71a8821862 Author: NeilBrown Date: Wed Mar 15 14:05:14 2017 +1100 percpu-refcount: support synchronous switch to atomic mode. percpu_ref_switch_to_atomic_sync() schedules the switch to atomic mode, then waits for it to complete. Also export percpu_ref_switch_to_* so they can be used from modules. This will be used in md/raid to count the number of pending write requests to an array. We occasionally need to check if the count is zero, but most often we don't care. We always want updates to the counter to be fast, as in some cases we count every 4K page. Signed-off-by: NeilBrown Acked-by: Tejun Heo Signed-off-by: Shaohua Li include/linux/percpu-refcount.h | 1 + lib/percpu-refcount.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) commit 55cc39f345256af241deb6152ff5c06bedd10f11 Author: NeilBrown Date: Wed Mar 15 14:05:14 2017 +1100 md: close a race with setting mddev->in_sync If ->in_sync is being set just as md_write_start() is being called, it is possible that set_in_sync() won't see the elevated ->writes_pending, and md_write_start() won't see the set ->in_sync. To close this race, re-test ->writes_pending after setting ->in_sync, and add memory barriers to ensure the increment of ->writes_pending will be seen by the time of this second test, or the new ->in_sync will be seen by md_write_start(). Add a spinlock to array_state_show() to ensure this temporary instability is never visible from userspace. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6497709b5d1bccce7de1df678d5f147d614551d1 Author: NeilBrown Date: Wed Mar 15 14:05:14 2017 +1100 md: factor out set_in_sync() Three separate places in md.c check if the number of active writes is zero and, if so, sets mddev->in_sync. There are a few differences, but there shouldn't be: - it is always appropriate to notify the change in sysfs_state, and there is no need to do this outside a spin-locked region. - we never need to check ->recovery_cp. The state of resync is not relevant for whether there are any pending writes or not (which is what ->in_sync reports). So create set_in_sync() which does the correct tests and makes the correct changes, and call this in all three places. Any behaviour changes here a minor and cosmetic. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 54 ++++++++++++++++++++---------------------------------- 1 file changed, 20 insertions(+), 34 deletions(-) commit 84dd97a69092cef858483b775f1900d743d796a4 Author: NeilBrown Date: Wed Mar 15 14:05:14 2017 +1100 md/raid5: don't test ->writes_pending in raid5_remove_disk This test on ->writes_pending cannot be safe as the counter can be incremented at any moment and cannot be locked against. Change it to test conf->active_stripes, which at least can be locked against. More changes are still needed. A future patch will change ->writes_pending, and testing it here will be very inconvenient. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid5.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 37011e3afb0fdc462307dc006246358bddf61e92 Author: NeilBrown Date: Wed Mar 15 14:05:14 2017 +1100 md/raid1: stop using bi_phys_segment Change to use bio->__bi_remaining to count number of r1bio attached to a bio. See precious raid10 patch for more details. Like the raid10.c patch, this fixes a bug as nr_queued and nr_pending used to measure different things, but were being compared. This patch fixes another bug in that nr_pending previously did not could write-behind requests, so behind writes could continue while resync was happening. How that nr_pending counts all r1_bio, the resync cannot commence until the behind writes have completed. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid1.c | 89 ++++++++++++++---------------------------------------- 1 file changed, 23 insertions(+), 66 deletions(-) commit fd16f2e8489100eb8005483ff630856bce51f803 Author: NeilBrown Date: Wed Mar 15 14:05:13 2017 +1100 md/raid10: stop using bi_phys_segments raid10 currently repurposes bi_phys_segments on each incoming bio to count how many r10bio was used to encode the request. We need to know when the number of attached r10bio reaches zero to: 1/ call bio_endio() when all IO on the bio is finished 2/ decrement ->nr_pending so that resync IO can proceed. Now that the bio has its own __bi_remaining counter, that can be used instead. We can call bio_inc_remaining to increment the counter and call bio_endio() every time an r10bio completes, rather than only when bi_phys_segments reaches zero. This addresses point 1, but not point 2. bio_endio() doesn't (and cannot) report when the last r10bio has finished, so a different approach is needed. So: instead of counting bios in ->nr_pending, count r10bios. i.e. every time we attach a bio, increment nr_pending. Every time an r10bio completes, decrement nr_pending. Normally we only increment nr_pending after first checking that ->barrier is zero, or some other non-trivial tests and possible waiting. When attaching multiple r10bios to a bio, we only need the tests and the waiting once. After the first increment, subsequent increments can happen unconditionally as they are really all part of the one request. So introduce inc_pending() which can be used when we know that nr_pending is already elevated. Note that this fixes a bug. freeze_array() contains the line atomic_read(&conf->nr_pending) == conf->nr_queued+extra, which implies that the units for ->nr_pending, ->nr_queued and extra are the same. ->nr_queue and extra count r10_bios, but prior to this patch, ->nr_pending counted bios. If a bio ever resulted in multiple r10_bios (due to bad blocks), freeze_array() would not work correctly. Now it does. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid10.c | 76 ++++++++++++++++++----------------------------------- 1 file changed, 25 insertions(+), 51 deletions(-) commit 6b6c8110e173ce10f2b169d82a6670001f7184d1 Author: NeilBrown Date: Wed Mar 15 14:05:13 2017 +1100 md/raid1, raid10: move rXbio accounting closer to allocation. When raid1 or raid10 find they will need to allocate a new r1bio/r10bio, in order to work around a known bad block, they account for the allocation well before the allocation is made. This separation makes the correctness less obvious and requires comments. The accounting needs to be a little before: before the first rXbio is submitted, but that is all. So move the accounting down to where it makes more sense. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid1.c | 24 +++++++++++------------- drivers/md/raid10.c | 22 +++++++++------------- 2 files changed, 20 insertions(+), 26 deletions(-) commit b5bacf86b63e850e185dfd9d0e6f1bff51e8919e Merge: 9bdf64d 1ffa8a7 Author: David S. Miller Date: Wed Mar 22 19:17:15 2017 -0700 Merge branch 'xgene-v2-mdio-and-ethtool' Iyappan Subramanian says: ==================== drivers: net: xgene-v2: Add MDIO and ethtool support This patch set, - adds phy management and ethtool support - fixes ethernet reset - addresses review comments from previous patch set v2: Address review comments from v1 - removed mdio_lock, since there is a top level lock in mdio_bus.c v1: - Initial version ==================== Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller commit 1ffa8a7aa516473b3575ee8c30f4e0b1bb29a7d8 Author: Iyappan Subramanian Date: Tue Mar 21 18:18:05 2017 -0700 drivers: net: xgene-v2: misc fixes Fixed review comments from the previous patch-set. - changed return value check of platform_get_irq() to < 0 - replaced devm_request(free)_irq() calls by request(free)_irq() since they are called from open() and close() - changed sizeof(struct mystruct) to sizeof(*mystruct) - reduced indentation on tx_timeout() Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene-v2/main.c | 55 +++++++++++++++----------------- 1 file changed, 26 insertions(+), 29 deletions(-) commit b2180a8f28dbd66d6593a70ead791ad9b347bc74 Author: Iyappan Subramanian Date: Tue Mar 21 18:18:04 2017 -0700 drivers: net: xgene-v2: Fix port reset Fixed port reset sequence by adding ECC init. Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene-v2/enet.c | 24 ++++++++++++++++++------ drivers/net/ethernet/apm/xgene-v2/enet.h | 2 ++ drivers/net/ethernet/apm/xgene-v2/mac.h | 1 - 3 files changed, 20 insertions(+), 7 deletions(-) commit 617d795c7cb2d1b636db33d428f830f3ed18a36f Author: Iyappan Subramanian Date: Tue Mar 21 18:18:03 2017 -0700 drivers: net: xgene-v2: Add ethtool support Added basic ethtool support. Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene-v2/Makefile | 2 +- drivers/net/ethernet/apm/xgene-v2/ethtool.c | 121 ++++++++++++++++++++++++++++ drivers/net/ethernet/apm/xgene-v2/main.c | 1 + drivers/net/ethernet/apm/xgene-v2/main.h | 1 + 4 files changed, 124 insertions(+), 1 deletion(-) commit ea8ab16ab225a62bb4c4041f7f50556d1adfb0dc Author: Iyappan Subramanian Date: Tue Mar 21 18:18:02 2017 -0700 drivers: net: xgene-v2: Add MDIO support Added phy management support by using phy abstraction layer APIs. Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene-v2/Makefile | 2 +- drivers/net/ethernet/apm/xgene-v2/mac.c | 2 +- drivers/net/ethernet/apm/xgene-v2/mac.h | 1 + drivers/net/ethernet/apm/xgene-v2/main.c | 11 +- drivers/net/ethernet/apm/xgene-v2/main.h | 4 + drivers/net/ethernet/apm/xgene-v2/mdio.c | 167 +++++++++++++++++++++++++++++ 6 files changed, 182 insertions(+), 5 deletions(-) commit 97d53438081edd25ccb1de34051efe084d240828 Author: NeilBrown Date: Wed Mar 15 14:05:13 2017 +1100 Revert "md/raid5: limit request size according to implementation limits" This reverts commit e8d7c33232e5fdfa761c3416539bc5b4acd12db5. Now that raid5 doesn't abuse bi_phys_segments any more, we no longer need to impose these limits. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid5.c | 9 --------- 1 file changed, 9 deletions(-) commit a4d907b6a33ba22adbbfc443e22eb3c1aa2c73f6 Author: Christoph Hellwig Date: Wed Mar 22 15:01:53 2017 -0400 blk-mq: streamline blk_mq_make_request Turn the different ways of merging or issuing I/O into a series of if/else statements instead of the current maze of gotos. Note that this means we pin the CPU a little longer for some cases as the CTX put is moved to common code at the end of the function. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq.c | 51 +++++++++++++++------------------------------------ 1 file changed, 15 insertions(+), 36 deletions(-) commit 2299722c4b117af867425d097e470c8566e0c82e Author: Christoph Hellwig Date: Wed Mar 22 15:01:52 2017 -0400 blk-mq: split the plug and sync cases in blk_mq_make_request Now that we have a nice direct issue heper this helps simplifying the code a bit, and also gets rid of the old_rq variable. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 5eb6126e1c5c5b69d90003444acc99743881b7b7 Author: Christoph Hellwig Date: Wed Mar 22 15:01:51 2017 -0400 blk-mq: improve blk_mq_try_issue_directly Rename blk_mq_try_issue_directly to __blk_mq_try_issue_directly and add a new wrapper that takes care of RCU / SRCU locking to avoid having boileplate code in the caller which would get duplicated with new callers. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-mq.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit 254d259da0c3cb77f03a2adb8959c293f638a3d2 Author: Christoph Hellwig Date: Wed Mar 22 15:01:50 2017 -0400 blk-mq: merge mq and sq make_request instances They are mostly the same code anyway - this just one small conditional for the plug case that is different for both variants. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq.c | 164 +++++++++++---------------------------------------------- 1 file changed, 31 insertions(+), 133 deletions(-) commit 0472a42ba1f89ec85f070c731f4440d7cc38c44c Author: NeilBrown Date: Wed Mar 15 14:05:13 2017 +1100 md/raid5: remove over-loading of ->bi_phys_segments. When a read request, which bypassed the cache, fails, we need to retry it through the cache. This involves attaching it to a sequence of stripe_heads, and it may not be possible to get all the stripe_heads we need at once. We do what we can, and record how far we got in ->bi_phys_segments so we can pick up again later. There is only ever one bio which may have a non-zero offset stored in ->bi_phys_segments, the one that is either active in the single thread which calls retry_aligned_read(), or is in conf->retry_read_aligned waiting for retry_aligned_read() to be called again. So we only need to store one offset value. This can be in a local variable passed between remove_bio_from_retry() and retry_aligned_read(), or in the r5conf structure next to the ->retry_read_aligned pointer. Storing it there allows the last usage of ->bi_phys_segments to be removed from md/raid5.c. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid5.c | 24 ++++++++++++------------ drivers/md/raid5.h | 30 +----------------------------- 2 files changed, 13 insertions(+), 41 deletions(-) commit 7642747d674aff1f7cfe74ad9af7e9b12ab1d5ee Author: Christoph Hellwig Date: Wed Mar 22 15:01:49 2017 -0400 blk-mq: remove BLK_MQ_F_DEFER_ISSUE This flag was never used since it was introduced. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe block/blk-mq.c | 8 +------- include/linux/blk-mq.h | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) commit 016c76ac76e4c678b01a75a602dc6be0282f5b29 Author: NeilBrown Date: Wed Mar 15 14:05:13 2017 +1100 md/raid5: use bio_inc_remaining() instead of repurposing bi_phys_segments as a counter md/raid5 needs to keep track of how many stripe_heads are processing a bio so that it can delay calling bio_endio() until all stripe_heads have completed. It currently uses 16 bits of ->bi_phys_segments for this purpose. 16 bits is only enough for 256M requests, and it is possible for a single bio to be larger than this, which causes problems. Also, the bio struct contains a larger counter, __bi_remaining, which has a purpose very similar to the purpose of our counter. So stop using ->bi_phys_segments, and instead use __bi_remaining. This means we don't need to initialize the counter, as our caller initializes it to '1'. It also means we can call bio_endio() directly as it tests this counter internally. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 3 +-- drivers/md/raid5.c | 57 +++++++++++------------------------------------- drivers/md/raid5.h | 17 +-------------- 3 files changed, 15 insertions(+), 62 deletions(-) commit bd83d0a28c68bacba88a3193a1bd6a083bb8d9f5 Author: NeilBrown Date: Wed Mar 15 14:05:12 2017 +1100 md/raid5: call bio_endio() directly rather than queueing for later. We currently gather bios that need to be returned into a bio_list and call bio_endio() on them all together. The original reason for this was to avoid making the calls while holding a spinlock. Locking has changed a lot since then, and that reason is no longer valid. So discard return_io() and various return_bi lists, and just call bio_endio() directly as needed. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 13 +++++-------- drivers/md/raid5-log.h | 2 +- drivers/md/raid5.c | 38 ++++++++++---------------------------- drivers/md/raid5.h | 1 - 4 files changed, 16 insertions(+), 38 deletions(-) commit 16d997b78b157315f5c90fcbc2f9ce575cb3879f Author: NeilBrown Date: Wed Mar 15 14:05:12 2017 +1100 md/raid5: simplfy delaying of writes while metadata is updated. If a device fails during a write, we must ensure the failure is recorded in the metadata before the completion of the write is acknowleged. Commit c3cce6cda162 ("md/raid5: ensure device failure recorded before write request returns.") added code for this, but it was unnecessarily complicated. We already had similar functionality for handling updates to the bad-block-list, thanks to Commit de393cdea66c ("md: make it easier to wait for bad blocks to be acknowledged.") So revert most of the former commit, and instead avoid collecting completed writes if MD_CHANGE_PENDING is set. raid5d() will then flush the metadata and retry the stripe_head. As this change can leave a stripe_head ready for handling immediately after handle_active_stripes() returns, we change raid5_do_work() to pause when MD_CHANGE_PENDING is set, so that it doesn't spin. We check MD_CHANGE_PENDING *after* analyse_stripe() as it could be set asynchronously. After analyse_stripe(), we have collected stable data about the state of devices, which will be used to make decisions. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid5.c | 31 ++++++++----------------------- drivers/md/raid5.h | 3 --- 2 files changed, 8 insertions(+), 26 deletions(-) commit 497280509f32340d90feac030bce18006a3e3605 Author: NeilBrown Date: Wed Mar 15 14:05:12 2017 +1100 md/raid5: use md_write_start to count stripes, not bios We use md_write_start() to increase the count of pending writes, and md_write_end() to decrement the count. We currently count bios submitted to md/raid5. Change it count stripe_heads that a WRITE bio has been attached to. So now, raid5_make_request() calls md_write_start() and then md_write_end() to keep the count elevated during the setup of the request. add_stripe_bio() calls md_write_start() for each stripe_head, and the completion routines always call md_write_end(), instead of only calling it when raid5_dec_bi_active_stripes() returns 0. make_discard_request also calls md_write_start/end(). The parallel between md_write_{start,end} and use of bi_phys_segments can be seen in that: Whenever we set bi_phys_segments to 1, we now call md_write_start. Whenever we increment it on non-read requests with raid5_inc_bi_active_stripes(), we now call md_write_start(). Whenever we decrement bi_phys_segments on non-read requsts with raid5_dec_bi_active_stripes(), we now call md_write_end(). This reduces our dependence on keeping a per-bio count of active stripes in bi_phys_segments. md_write_inc() is added which parallels md_write_start(), but requires that a write has already been started, and is certain never to sleep. This can be used inside a spinlocked region when adding to a write request. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 17 +++++++++++++++++ drivers/md/md.h | 1 + drivers/md/raid5-cache.c | 2 +- drivers/md/raid5.c | 27 +++++++++++++-------------- 4 files changed, 32 insertions(+), 15 deletions(-) commit d01b2dcb441b14c3b860d3d16ecb9ed6ed4ba7fb Author: Jan Kara Date: Thu Mar 23 01:37:02 2017 +0100 block: Fix oops scsi_disk_get() When device open races with device shutdown, we can get the following oops in scsi_disk_get(): [11863.044351] general protection fault: 0000 [#1] SMP [11863.045561] Modules linked in: scsi_debug xfs libcrc32c netconsole btrfs raid6_pq zlib_deflate lzo_compress xor [last unloaded: loop] [11863.047853] CPU: 3 PID: 13042 Comm: hald-probe-stor Tainted: G W 4.10.0-rc2-xen+ #35 [11863.048030] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [11863.048030] task: ffff88007f438200 task.stack: ffffc90000fd0000 [11863.048030] RIP: 0010:scsi_disk_get+0x43/0x70 [11863.048030] RSP: 0018:ffffc90000fd3a08 EFLAGS: 00010202 [11863.048030] RAX: 6b6b6b6b6b6b6b6b RBX: ffff88007f56d000 RCX: 0000000000000000 [11863.048030] RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffffff81a8d880 [11863.048030] RBP: ffffc90000fd3a18 R08: 0000000000000000 R09: 0000000000000001 [11863.059217] R10: 0000000000000000 R11: 0000000000000000 R12: 00000000fffffffa [11863.059217] R13: ffff880078872800 R14: ffff880070915540 R15: 000000000000001d [11863.059217] FS: 00007f2611f71800(0000) GS:ffff88007f0c0000(0000) knlGS:0000000000000000 [11863.059217] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [11863.059217] CR2: 000000000060e048 CR3: 00000000778d4000 CR4: 00000000000006e0 [11863.059217] Call Trace: [11863.059217] ? disk_get_part+0x22/0x1f0 [11863.059217] sd_open+0x39/0x130 [11863.059217] __blkdev_get+0x69/0x430 [11863.059217] ? bd_acquire+0x7f/0xc0 [11863.059217] ? bd_acquire+0x96/0xc0 [11863.059217] ? blkdev_get+0x350/0x350 [11863.059217] blkdev_get+0x126/0x350 [11863.059217] ? _raw_spin_unlock+0x2b/0x40 [11863.059217] ? bd_acquire+0x7f/0xc0 [11863.059217] ? blkdev_get+0x350/0x350 [11863.059217] blkdev_open+0x65/0x80 ... As you can see RAX value is already poisoned showing that gendisk we got is already freed. The problem is that get_gendisk() looks up device number in ext_devt_idr and then does get_disk() which does kobject_get() on the disks kobject. However the disk gets removed from ext_devt_idr only in disk_release() (through blk_free_devt()) at which moment it has already 0 refcount and is already on its way to be freed. Indeed we've got a warning from kobject_get() about 0 refcount shortly before the oops. We fix the problem by using kobject_get_unless_zero() in get_disk() so that get_disk() cannot get reference on a disk that is already being freed. Tested-by: Lekshmi Pillai Reviewed-by: Bart Van Assche Acked-by: Tejun Heo Signed-off-by: Jan Kara Signed-off-by: Jens Axboe block/genhd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c70c176ff8c3ff0ac6ef9a831cd591ea9a66bd1a Author: Jan Kara Date: Thu Mar 23 01:37:01 2017 +0100 kobject: Export kobject_get_unless_zero() Make the function available for outside use and fortify it against NULL kobject. CC: Greg Kroah-Hartman Reviewed-by: Bart Van Assche Acked-by: Tejun Heo Signed-off-by: Jan Kara Signed-off-by: Jens Axboe include/linux/kobject.h | 2 ++ lib/kobject.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit f759741d9d913eb57784a94b9bca78b376fc26a9 Author: Jan Kara Date: Thu Mar 23 01:37:00 2017 +0100 block: Fix oops in locked_inode_to_wb_and_lock_list() When block device is closed, we call inode_detach_wb() in __blkdev_put() which sets inode->i_wb to NULL. That is contrary to expectations that inode->i_wb stays valid once set during the whole inode's lifetime and leads to oops in wb_get() in locked_inode_to_wb_and_lock_list() because inode_to_wb() returned NULL. The reason why we called inode_detach_wb() is not valid anymore though. BDI is guaranteed to stay along until we call bdi_put() from bdev_evict_inode() so we can postpone calling inode_detach_wb() to that moment. Also add a warning to catch if someone uses inode_detach_wb() in a dangerous way. Reported-by: Thiago Jung Bauermann Acked-by: Tejun Heo Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/block_dev.c | 8 ++------ include/linux/writeback.h | 1 + 2 files changed, 3 insertions(+), 6 deletions(-) commit b1c51afc00f164457e126dcfc946fdd563948d26 Author: Jan Kara Date: Thu Mar 23 01:36:59 2017 +0100 bdi: Rename cgwb_bdi_destroy() to cgwb_bdi_unregister() Rename cgwb_bdi_destroy() to cgwb_bdi_unregister() as it gets called from bdi_unregister() which is not necessarily called from bdi_destroy() and thus the name is somewhat misleading. Acked-by: Tejun Heo Signed-off-by: Jan Kara Signed-off-by: Jens Axboe mm/backing-dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4514451e79ae5baabb85d22ba3523602e59d5218 Author: Jan Kara Date: Thu Mar 23 01:36:58 2017 +0100 bdi: Do not wait for cgwbs release in bdi_unregister() Currently we wait for all cgwbs to get released in cgwb_bdi_destroy() (called from bdi_unregister()). That is however unnecessary now when cgwb->bdi is a proper refcounted reference (thus bdi cannot get released before all cgwbs are released) and when cgwb_bdi_destroy() shuts down writeback directly. Acked-by: Tejun Heo Signed-off-by: Jan Kara Signed-off-by: Jens Axboe include/linux/backing-dev-defs.h | 1 - mm/backing-dev.c | 22 +--------------------- 2 files changed, 1 insertion(+), 22 deletions(-) commit 5318ce7d46866e1dbc20ab9349b93753edba0b3e Author: Jan Kara Date: Thu Mar 23 01:36:57 2017 +0100 bdi: Shutdown writeback on all cgwbs in cgwb_bdi_destroy() Currently we waited for all cgwbs to get freed in cgwb_bdi_destroy() which also means that writeback has been shutdown on them. Since this wait is going away, directly shutdown writeback on cgwbs from cgwb_bdi_destroy() to avoid live writeback structures after bdi_unregister() has finished. To make that safe with concurrent shutdown from cgwb_release_workfn(), we also have to make sure wb_shutdown() returns only after the bdi_writeback structure is really shutdown. Acked-by: Tejun Heo Signed-off-by: Jan Kara Signed-off-by: Jens Axboe include/linux/backing-dev-defs.h | 1 + mm/backing-dev.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) commit e8cb72b322cf4a729633b7e2080fbeab477f6ea2 Author: Jan Kara Date: Thu Mar 23 01:36:56 2017 +0100 bdi: Unify bdi->wb_list handling for root wb_writeback Currently root wb_writeback structure is added to bdi->wb_list in bdi_init() and never removed. That is different from all other wb_writeback structures which get added to the list when created and removed from it before wb_shutdown(). So move list addition of root bdi_writeback to bdi_register() and list removal of all wb_writeback structures to wb_shutdown(). That way a wb_writeback structure is on bdi->wb_list if and only if it can handle writeback and it will make it easier for us to handle shutdown of all wb_writeback structures in bdi_unregister(). Acked-by: Tejun Heo Signed-off-by: Jan Kara Signed-off-by: Jens Axboe mm/backing-dev.c | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) commit 810df54a64fb7841d6511f67818f3e1589c249a2 Author: Jan Kara Date: Thu Mar 23 01:36:55 2017 +0100 bdi: Make wb->bdi a proper reference Make wb->bdi a proper refcounted reference to bdi for all bdi_writeback structures except for the one embedded inside struct backing_dev_info. That will allow us to simplify bdi unregistration. Acked-by: Tejun Heo Signed-off-by: Jan Kara Signed-off-by: Jens Axboe mm/backing-dev.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit b7d680d7bf584bce6023343304b819009a7c3336 Author: Jan Kara Date: Thu Mar 23 01:36:54 2017 +0100 bdi: Mark congested->bdi as internal congested->bdi pointer is used only to be able to remove congested structure from bdi->cgwb_congested_tree on structure release. Moreover the pointer can become NULL when we unregister the bdi. Rename the field to __bdi and add a comment to make it more explicit this is internal stuff of memcg writeback code and people should not use the field as such use will be likely race prone. We do not bother with converting congested->bdi to a proper refcounted reference. It will be slightly ugly to special-case bdi->wb.congested to avoid effectively a cyclic reference of bdi to itself and the reference gets cleared from bdi_unregister() making it impossible to reference a freed bdi. Acked-by: Tejun Heo Signed-off-by: Jan Kara Signed-off-by: Jens Axboe include/linux/backing-dev-defs.h | 4 +++- mm/backing-dev.c | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) commit 03e262798884b0a5f948b17433afd80606cb3497 Author: Jan Kara Date: Thu Mar 23 01:36:53 2017 +0100 block: Fix bdi assignment to bdev inode when racing with disk delete When disk->fops->open() in __blkdev_get() returns -ERESTARTSYS, we restart the process of opening the block device. However we forget to switch bdev->bd_bdi back to noop_backing_dev_info and as a result bdev inode will be pointing to a stale bdi. Fix the problem by setting bdev->bd_bdi later when __blkdev_get() is already guaranteed to succeed. Acked-by: Tejun Heo Reviewed-by: Hannes Reinecke Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/block_dev.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 65d1086c44791112188f6aebbdc3a27cab3736d3 Merge: edd849e 97da385 Author: Dave Airlie Date: Thu Mar 23 12:05:13 2017 +1000 BackMerge tag 'v4.11-rc3' into drm-next Linux 4.11-rc3 as requested by Daniel commit b7eaf1aab9f8bd2e49fceed77ebc66c1b5800718 Author: Rafael J. Wysocki Date: Wed Mar 22 00:08:50 2017 +0100 cpufreq: schedutil: Avoid reducing frequency of busy CPUs prematurely The way the schedutil governor uses the PELT metric causes it to underestimate the CPU utilization in some cases. That can be easily demonstrated by running kernel compilation on a Sandy Bridge Intel processor, running turbostat in parallel with it and looking at the values written to the MSR_IA32_PERF_CTL register. Namely, the expected result would be that when all CPUs were 100% busy, all of them would be requested to run in the maximum P-state, but observation shows that this clearly isn't the case. The CPUs run in the maximum P-state for a while and then are requested to run slower and go back to the maximum P-state after a while again. That causes the actual frequency of the processor to visibly oscillate below the sustainable maximum in a jittery fashion which clearly is not desirable. That has been attributed to CPU utilization metric updates on task migration that cause the total utilization value for the CPU to be reduced by the utilization of the migrated task. If that happens, the schedutil governor may see a CPU utilization reduction and will attempt to reduce the CPU frequency accordingly right away. That may be premature, though, for example if the system is generally busy and there are other runnable tasks waiting to be run on that CPU already. This is unlikely to be an issue on systems where cpufreq policies are shared between multiple CPUs, because in those cases the policy utilization is computed as the maximum of the CPU utilization values over the whole policy and if that turns out to be low, reducing the frequency for the policy most likely is a good idea anyway. On systems with one CPU per policy, however, it may affect performance adversely and even lead to increased energy consumption in some cases. On those systems it may be addressed by taking another utilization metric into consideration, like whether or not the CPU whose frequency is about to be reduced has been idle recently, because if that's not the case, the CPU is likely to be busy in the near future and its frequency should not be reduced. To that end, use the counter of idle calls in the timekeeping code. Namely, make the schedutil governor look at that counter for the current CPU every time before its frequency is about to be reduced. If the counter has not changed since the previous iteration of the governor computations for that CPU, the CPU has been busy for all that time and its frequency should not be decreased, so if the new frequency would be lower than the one set previously, the governor will skip the frequency update. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) Acked-by: Viresh Kumar Reviewed-by: Joel Fernandes include/linux/tick.h | 1 + kernel/sched/cpufreq_schedutil.c | 27 +++++++++++++++++++++++++++ kernel/time/tick-sched.c | 12 ++++++++++++ 3 files changed, 40 insertions(+) commit 53cee931f742a0b6afcaf17e2295ee10f4403d16 Author: Sebastian Reichel Date: Tue Mar 21 23:32:16 2017 +0100 ARM: dts: N9/N950: add bluetooth The Nokia N950 and N9 have a wl1271 (with nokia bootloader) bluetooth module connected to second UART. Signed-off-by: Sebastian Reichel Acked-by: Rob Herring Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-n950-n9.dtsi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 3d5c656858cb84b937ed016fdf837c5ccc3b6a6c Author: Sebastian Reichel Date: Tue Mar 21 23:32:15 2017 +0100 ARM: dts: N900: Add bluetooth Add bcm2048 node and its system clock to the N900 device tree file. Apart from that a reference to the new clock has been added to wl1251 (which uses it, too). Acked-by: Pavel Machek Signed-off-by: Sebastian Reichel Acked-by: Rob Herring Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-n900.dts | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit b9ed79fa91c5271ca166dfde99883ca3afb190fe Author: Brian Norris Date: Mon Mar 20 16:53:44 2017 -0700 arm64: dts: rockchip: add regulator info for Kevin digitizer We need to enable this regulator before the digitizer can be used. Wacom recommended waiting for 100 ms before talking to the HID. Signed-off-by: Brian Norris [store chip ident as comment until i2c multi-compatibles are sorted] Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts | 4 ++++ 1 file changed, 4 insertions(+) commit b4d8c7aea15efa8c6272c58d78296f8b017c4c6a Author: Joerg Roedel Date: Thu Mar 23 00:06:17 2017 +0100 iommu/iova: Fix compile error with CONFIG_IOMMU_IOVA=m The #ifdef in iova.h only catches the CONFIG_IOMMU_IOVA=y case, so that compilation as a module fails with duplicate function definition errors. Fix it by catching both cases in the #if. Signed-off-by: Joerg Roedel include/linux/iova.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edd849e5448c4f6ddc04a5fa1ac5479176660c27 Merge: be5df20 62c58af Author: Dave Airlie Date: Thu Mar 23 08:53:41 2017 +1000 Merge tag 'drm-misc-next-2017-03-21' of git://anongit.freedesktop.org/git/drm-misc into drm-next drm-misc for 4.12, 2nd attempt this week: - topic branch from Jon Corbet for the new graph kerneldoc support - lots of graphs for kms/atomic things using the above - some vblank query tuning from Chris - gem/cma_fops macros - moar docs Driver stuff: - vc4 hdmi audio, yay (Eric) - dw-hdmi polish from a bunch of people - some rockchip dp updates that didn't make last week (Chris Zhong) - misc bridge&driver updates * tag 'drm-misc-next-2017-03-21' of git://anongit.freedesktop.org/git/drm-misc: (37 commits) drm/edid: detect SCDC support in HF-VSDB drm/edid: detect SCDC support in HF-VSDB drm/edid: check for HF-VSDB block drm: Add SCDC helpers drm: bridge: dw-hdmi: add HDMI vendor specific infoframe config drm/bridge: dw_hdmi: support i2c extended read mode drm/msm: add stubs for msm_{perf,rd}_debugfs_cleanup drm: bochs: Don't remove uninitialized fbdev framebuffer drm: vc4: remove redundant check of plane being non-null drm/vc4: use platform_register_drivers dma-fence: add dma_fence_match_context helper drm/vc4: Add HDMI audio support dt-bindings: Document the dmas and dma-names properties for VC4 HDMI drm/atmel-hlcdc: Fix suspend/resume implementation drm: Skip the waitqueue setup for vblank queries drm: Defer disabling the vblank IRQ until the next interrupt (for instant-off) drm/doc: atomic overview, with graph drm/doc: diagram for mode objects and properties drm/doc: Consistent kerneldoc include order drm/doc: Add KMS overview graphs ... commit be5df20a34d78d986ddfb6e0fc87e4fa4d05268b Merge: 33d5f51 c5bd2e1 Author: Dave Airlie Date: Thu Mar 23 08:47:23 2017 +1000 Merge tag 'drm-intel-next-2017-03-20' of git://anongit.freedesktop.org/git/drm-intel into drm-next More in i915 for 4.12: - designware i2c fixes from Hans de Goede, in a topic branch shared with other subsystems (maybe, they didn't confirm, but requested the pull) - drop drm_panel usage from the intel dsi vbt panel (Jani) - vblank evasion improvements and tracing (Maarten and Ville) - clarify spinlock irq semantics again a bit (Tvrtko) - new ->pwrite backend hook (right now just for shmem pageche writes), from Chris - more planar/ccs work from Ville - hotplug safe connector iterators everywhere - userptr fixes (Chris) - selftests for cache coloring eviction (Matthew Auld) - extend debugfs drop_caches interface for shrinker testing (Chris) - baytrail "the rps kills the machine" fix (Chris) - use new atomic state iterators, a lot (Maarten) - refactor guc/huc code some (Arkadiusz Hiler) - tighten breadcrumbs rbtree a bit (Chris) - improve wrap-around and time handling in rps residency counters (Mika) - split reset-in-progress in two flags, backoff and handoff (Chris) - other misc reset improvements from a few people - bunch of vgpu interaction fixes with recent code changes - misc stuff all over, as usual * tag 'drm-intel-next-2017-03-20' of git://anongit.freedesktop.org/git/drm-intel: (144 commits) drm/i915: Update DRIVER_DATE to 20170320 drm/i915: Initialise i915_gem_object_create_from_data() directly drm/i915: Correct error handling for i915_gem_object_create_from_data() drm/i915: i915_gem_object_create_from_data() doesn't require struct_mutex drm/i915: Retire an active batch pool object rather than allocate new drm/i915: Add i810/i815 pci-ids for completeness drm/i915: Skip execlists_dequeue() early if the list is empty drm/i915: Stop using obj->obj_exec_link outside of execbuf drm/i915: Squelch WARN for VLV_COUNTER_CONTROL drm/i915/glk: Enable pooled EUs for Geminilake drm/i915: Remove superfluous i915_add_request_no_flush() helper drm/i915/vgpu: Neuter forcewakes for VGPU more thoroughly drm/i915: Fix vGPU balloon for ggtt guard page drm/i915: Avoid use-after-free of ctx in request tracepoints drm/i915: Assert that the context pin_counts do not overflow drm/i915: Wait for reset to complete before returning from debugfs/i915_wedged drm/i915: Restore engine->submit_request before unwedging drm/i915: Move engine->submit_request selection to a vfunc drm/i915: Split I915_RESET_IN_PROGRESS into two flags drm/i915: make context status notifier head be per engine ... commit 9bdf64d511c5c23e39b7a58ff4056d839060c026 Merge: b4f0a66 fb30d4b Author: David S. Miller Date: Wed Mar 22 15:45:46 2017 -0700 Merge branch 'bpf-map-in-map' Martin KaFai Lau says: ==================== bpf: Add map-in-map support This patchset adds map-in-map support (map->map). One use case is the (vips -> webservers) in the L4 load balancer so that different vips can be backed by different set of webservers. Please refer to the individual commit log for details. ==================== Signed-off-by: David S. Miller commit fb30d4b71214aa1811e997f8f753b14b46d5b912 Author: Martin KaFai Lau Date: Wed Mar 22 10:00:35 2017 -0700 bpf: Add tests for map-in-map Test cases for array of maps and hash of maps. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/Makefile | 4 + samples/bpf/bpf_helpers.h | 1 + samples/bpf/bpf_load.c | 22 +++- samples/bpf/test_map_in_map_kern.c | 173 ++++++++++++++++++++++++++++ samples/bpf/test_map_in_map_user.c | 116 +++++++++++++++++++ tools/include/uapi/linux/bpf.h | 3 + tools/lib/bpf/bpf.c | 17 +++ tools/lib/bpf/bpf.h | 2 + tools/testing/selftests/bpf/test_verifier.c | 131 ++++++++++++++++++--- 9 files changed, 451 insertions(+), 18 deletions(-) commit bcc6b1b7ebf857a9fe56202e2be3361131588c15 Author: Martin KaFai Lau Date: Wed Mar 22 10:00:34 2017 -0700 bpf: Add hash of maps support This patch adds hash of maps support (hashmap->bpf_map). BPF_MAP_TYPE_HASH_OF_MAPS is added. A map-in-map contains a pointer to another map and lets call this pointer 'inner_map_ptr'. Notes on deleting inner_map_ptr from a hash map: 1. For BPF_F_NO_PREALLOC map-in-map, when deleting an inner_map_ptr, the htab_elem itself will go through a rcu grace period and the inner_map_ptr resides in the htab_elem. 2. For pre-allocated htab_elem (!BPF_F_NO_PREALLOC), when deleting an inner_map_ptr, the htab_elem may get reused immediately. This situation is similar to the existing prealloc-ated use cases. However, the bpf_map_fd_put_ptr() calls bpf_map_put() which calls inner_map->ops->map_free(inner_map) which will go through a rcu grace period (i.e. all bpf_map's map_free currently goes through a rcu grace period). Hence, the inner_map_ptr is still safe for the rcu reader side. This patch also includes BPF_MAP_TYPE_HASH_OF_MAPS to the check_map_prealloc() in the verifier. preallocation is a must for BPF_PROG_TYPE_PERF_EVENT. Hence, even we don't expect heavy updates to map-in-map, enforcing BPF_F_NO_PREALLOC for map-in-map is impossible without disallowing BPF_PROG_TYPE_PERF_EVENT from using map-in-map first. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf.h | 2 + include/uapi/linux/bpf.h | 1 + kernel/bpf/hashtab.c | 121 +++++++++++++++++++++++++++++++++++++++++++++++ kernel/bpf/syscall.c | 8 +++- kernel/bpf/verifier.c | 4 +- 5 files changed, 134 insertions(+), 2 deletions(-) commit 56f668dfe00dcf086734f1c42ea999398fad6572 Author: Martin KaFai Lau Date: Wed Mar 22 10:00:33 2017 -0700 bpf: Add array of maps support This patch adds a few helper funcs to enable map-in-map support (i.e. outer_map->inner_map). The first outer_map type BPF_MAP_TYPE_ARRAY_OF_MAPS is also added in this patch. The next patch will introduce a hash of maps type. Any bpf map type can be acted as an inner_map. The exception is BPF_MAP_TYPE_PROG_ARRAY because the extra level of indirection makes it harder to verify the owner_prog_type and owner_jited. Multi-level map-in-map is not supported (i.e. map->map is ok but not map->map->map). When adding an inner_map to an outer_map, it currently checks the map_type, key_size, value_size, map_flags, max_entries and ops. The verifier also uses those map's properties to do static analysis. map_flags is needed because we need to ensure BPF_PROG_TYPE_PERF_EVENT is using a preallocated hashtab for the inner_hash also. ops and max_entries are needed to generate inlined map-lookup instructions. For simplicity reason, a simple '==' test is used for both map_flags and max_entries. The equality of ops is implied by the equality of map_type. During outer_map creation time, an inner_map_fd is needed to create an outer_map. However, the inner_map_fd's life time does not depend on the outer_map. The inner_map_fd is merely used to initialize the inner_map_meta of the outer_map. Also, for the outer_map: * It allows element update and delete from syscall * It allows element lookup from bpf_prog The above is similar to the current fd_array pattern. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf.h | 1 + include/uapi/linux/bpf.h | 2 + kernel/bpf/Makefile | 2 +- kernel/bpf/arraymap.c | 63 +++++++++++++++++++++++++++++++ kernel/bpf/map_in_map.c | 97 ++++++++++++++++++++++++++++++++++++++++++++++++ kernel/bpf/map_in_map.h | 23 ++++++++++++ kernel/bpf/syscall.c | 7 +++- kernel/bpf/verifier.c | 42 ++++++++++++++++----- 8 files changed, 225 insertions(+), 12 deletions(-) commit fad73a1a35ea61f13607a391aca669caad8c04ca Author: Martin KaFai Lau Date: Wed Mar 22 10:00:32 2017 -0700 bpf: Fix and simplifications on inline map lookup Fix in verifier: For the same bpf_map_lookup_elem() instruction (i.e. "call 1"), a broken case is "a different type of map could be used for the same lookup instruction". For example, an array in one case and a hashmap in another. We have to resort to the old dynamic call behavior in this case. The fix is to check for collision on insn_aux->map_ptr. If there is collision, don't inline the map lookup. Please see the "do_reg_lookup()" in test_map_in_map_kern.c in the later patch for how-to trigger the above case. Simplifications on array_map_gen_lookup(): 1. Calculate elem_size from map->value_size. It removes the need for 'struct bpf_array' which makes the later map-in-map implementation easier. 2. Remove the 'elem_size == 1' test Fixes: 81ed18ab3098 ("bpf: add helper inlining infra and optimize map_array lookup") Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/arraymap.c | 11 ++++------- kernel/bpf/verifier.c | 13 +++++++++++-- 2 files changed, 15 insertions(+), 9 deletions(-) commit b4f0a66155564aaf7e98492e027efad9f797c244 Author: Joao Pinto Date: Wed Mar 22 11:56:05 2017 +0000 net: stmmac: fix dma operation mode config for older versions The dma operation mode configuration routine was wrongly moved to a function (stmmac_mtl_configuration) that is only executed if the core version is >= 4.00. Fixes: 6deee2221e11 ("net: stmmac: prepare dma op mode config for multiple queues") Reported-by: Corentin Labbe Reviewed-by: Thierry Reding Signed-off-by: Joao Pinto Tested-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bbea124bc99df968011e76eba105fe964a4eceab Author: Joel Scherpelz Date: Wed Mar 22 18:19:04 2017 +0900 net: ipv6: Add sysctl for minimum prefix len acceptable in RIOs. This commit adds a new sysctl accept_ra_rt_info_min_plen that defines the minimum acceptable prefix length of Route Information Options. The new sysctl is intended to be used together with accept_ra_rt_info_max_plen to configure a range of acceptable prefix lengths. It is useful to prevent misconfigurations from unintentionally blackholing too much of the IPv6 address space (e.g., home routers announcing RIOs for fc00::/7, which is incorrect). Signed-off-by: Joel Scherpelz Acked-by: Lorenzo Colitti Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 13 +++++++++++-- include/linux/ipv6.h | 1 + include/uapi/linux/ipv6.h | 1 + include/uapi/linux/sysctl.h | 1 + net/ipv6/addrconf.c | 10 ++++++++++ net/ipv6/ndisc.c | 2 ++ 6 files changed, 26 insertions(+), 2 deletions(-) commit 9f3cd4537da071cfa4987ef7315990417585f169 Author: Alexander Kurz Date: Sat Mar 11 20:01:05 2017 +0100 drivers mtd: spi-nor: add Macronix MX25Ux033E and MX25Ux035 variants Macronix MX25U2033E, MX25U4033E and MX25U4035 devices are used in 4/5/6th generation Kindle ebook readers. Both MX25U403x variants share the same JEDEC id. Add those spi-nor variants and the similar MX25U8035 mentioned in the same set of datasheets. Signed-off-by: Alexander Kurz Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 3 +++ 1 file changed, 3 insertions(+) commit 34fc99dbf32d8cca7a2c6b85949bc3433767a113 Author: Alexander Kurz Date: Sat Mar 11 20:01:04 2017 +0100 drivers mtd: spi-nor: add Winbond W25Q20 variants Winbond W25Q20BW devices are used in 4/5th generation Kindle ebook readers. Add this spi-nor device and the similar W25Q20 devices to the list of known devices. Signed-off-by: Alexander Kurz Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 3 +++ 1 file changed, 3 insertions(+) commit 193fb3c1127d0c0fbc5c5a6ba63a99083b775ffd Author: mar.krzeminski Date: Fri Jan 6 18:19:01 2017 +0100 mtd: spi-nor: Disable chip erase for Micron n25q00. Micron n25q00 are stacked chips, thus do not support chip erase. >From now spi-nor framework will not send chip erase command, instead will use sector at time erase procedure. Signed-off-by: Marcin Krzeminski Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2f5ad7f0f3e16772bafa692ad42b5af4dea292f6 Author: mar.krzeminski Date: Fri Jan 6 18:19:00 2017 +0100 mtd: spi-nor: Fix whole chip erasing for stacked chips. Currently it is possible to disable chip erase for spi-nor driver. Some modern stacked (multi die) flash chips do not support chip erase opcode at all but spi-nor framework needs to cope with them too. This commit extends existing functionality to allow disable chip erase for a single flash chip. Signed-off-by: Marcin Krzeminski Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 3 +++ 1 file changed, 3 insertions(+) commit 1e797f556c616a42f1e039b1ff1d3c58f61b6104 Author: Pandiyan, Dhinakaran Date: Thu Mar 16 00:10:26 2017 -0700 drm/dp: Split drm_dp_mst_allocate_vcpi drm_dp_mst_allocate_vcpi() apart from setting up the vcpi structure, also finds if there are enough slots available. This check is a duplicate of that implemented in drm_dp_mst_find_vcpi_slots(). Let's move this check out and reuse the existing drm_dp_mst_find_vcpi_slots() function to check if there are enough vcpi slots before allocating them. This brings the check to one place. Additionally drivers that will use MST state tracking for atomic modesets can use the atomic version of find_vcpi_slots() and reuse drm_dp_mst_allocate_vcpi() Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Dave Airlie Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1489648231-30700-4-git-send-email-dhinakaran.pandiyan@intel.com drivers/gpu/drm/drm_dp_mst_topology.c | 21 ++++++++++----------- drivers/gpu/drm/i915/intel_dp_mst.c | 4 ++-- drivers/gpu/drm/nouveau/nv50_display.c | 3 ++- drivers/gpu/drm/radeon/radeon_dp_mst.c | 4 +++- include/drm/drm_dp_mst_helper.h | 3 ++- 5 files changed, 19 insertions(+), 16 deletions(-) commit feb2c3bc331576ed4e0bf9608966351b1bb9b622 Author: Pandiyan, Dhinakaran Date: Thu Mar 16 00:10:25 2017 -0700 drm/dp: Kill unused MST vcpi slot availability tracking The avail_slots member in the MST topology manager is never updated to reflect the available vcpi slots. The check is effectively against total slots, 63. So, let's make that check obvious and remove avail_slots. While at it, make debug messages more descriptive. Cc: Daniel Vetter Cc: Archit Taneja Cc: Maarten Lankhorst Cc: Chris Wilson Cc: Harry Wentland Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1489648231-30700-3-git-send-email-dhinakaran.pandiyan@intel.com drivers/gpu/drm/drm_dp_mst_topology.c | 15 ++++++++------- include/drm/drm_dp_mst_helper.h | 5 ----- 2 files changed, 8 insertions(+), 12 deletions(-) commit a538d6137dffc5dc8082b9ebe9819c4106fa3f83 Author: Pandiyan, Dhinakaran Date: Thu Mar 16 00:10:24 2017 -0700 drm/dp: Kill total_pbn and total_slots in struct drm_dp_mst_topology_mgr The total vcpi time slots is always 63 and does not depend on the link BW, remove total_slots from MST topology manager struct. The next change is to remove total_pbn which is hardcoded to 2560. The total PBN that the topology manager allocates from depends on the link rate and is not a constant. So, fix this by removing the total_pbn member itself. Cc: Daniel Vetter Cc: Archit Taneja Cc: Maarten Lankhorst Cc: Chris Wilson Cc: Harry Wentland Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1489648231-30700-2-git-send-email-dhinakaran.pandiyan@intel.com drivers/gpu/drm/drm_dp_mst_topology.c | 5 ++--- include/drm/drm_dp_mst_helper.h | 9 +-------- 2 files changed, 3 insertions(+), 11 deletions(-) commit eadf71cd8c6d837828b4e95e9130f666ab7b4c61 Author: Daniel Vetter Date: Tue Mar 21 16:52:28 2017 +0100 drm/doc: Document feature merge deadlines The discussion pretty much concluded without objections, let's document what we agreed on. Cc'ing linux-doc for the new tag in Documentation/process/index.rst. Acked-by: Dave Airlie Reviewed-by: Sean Paul Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Dave Airlie Cc: Sean Paul Cc: Jani Nikula Cc: Alex Deucher Cc: Lukas Wunner Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170321155228.30287-1-daniel.vetter@ffwll.ch Documentation/gpu/introduction.rst | 25 +++++++++++++++++++++++++ Documentation/process/index.rst | 1 + 2 files changed, 26 insertions(+) commit 93aa2a1c25e562cc0ca69c3175333fe33fdf055b Author: Ville Syrjälä Date: Tue Mar 14 17:10:50 2017 +0200 drm/i915: Fix SKL cursor watermarks Use intel_wm_plane_visible() to determine cursor visibility for SKL+ also. Previously SKL+ would check the actual visibility which now conflicts with the assumptions in intel_legacy_cursor_update(). We also change SKL+ to compute the cursor watermarks based on the unclipped cursor size, just as we do on all the other platforms. Using the clipped size could now result in garbage results. Testcase: igt/kms_chv_cursor_fail Fixes: a5509abda48e ("drm/i915: Fix legacy cursor vs. watermarks for ILK-BDW") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100195 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170314151050.12194-2-ville.syrjala@linux.intel.com Tested-by: Dorota Czaplejewicz Tested-by: Jari Tahvanainen Reviewed-by: Maarten Lankhorst Acked-by: Ander Conselvan de Oliveira drivers/gpu/drm/i915/intel_pm.c | 44 +++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 13 deletions(-) commit 24304d81930fdee0784ac27c0bf8d6a27f529382 Author: Ville Syrjälä Date: Tue Mar 14 17:10:49 2017 +0200 drm/i915: Extract intel_wm_plane_visible() All platforms that lack double buffered watermarks will need to handle the legacy cursor updates in the same way. So let's extract the logic to determine the plane visibility into a small helper. For simplicity we'll make the function DTRT for any plane, but only apply the special sauce for cursor planes. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170314151050.12194-1-ville.syrjala@linux.intel.com Tested-by: Dorota Czaplejewicz Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_pm.c | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) commit 0e4c9f13da28990064c958839e85c565f6adcbf5 Merge: 31c7ba9 ac0488e Author: David S. Miller Date: Wed Mar 22 12:59:10 2017 -0700 Merge branch 'nfp-concurrency' Jakub Kicinski says: ==================== nfp: allow concurrency in core and minor fixes The first 10 patches of this series prepare nfpcore for concurrent accesses. This will be needed by upcoming hwmon and devlink patches. Most locking is already in place, the patches in this series iron out a few bugs. Last 5 patches are fixes and cleanups to the netdev code, including removal of doorbell pointers used only on old versions of the chip, removal of unnecessarily defensive code and flushing xmit_more more carefully on error paths. ==================== Signed-off-by: David S. Miller commit ac0488ef59a54e42ad744ae1a91fafbcb2566a06 Author: Jakub Kicinski Date: Tue Mar 21 17:59:21 2017 -0700 nfp: disable FW on reconfiguration errors Since we no longer need to keep the FW enabled for .ndo_close() to work we can always stop FW after reconfiguration failure. This seems to make most FWs more resilient to faults (at least in error injection scenarios). Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_common.c | 29 ++++++++-------------- 1 file changed, 11 insertions(+), 18 deletions(-) commit 219ad6c1c35c95ff99a0c65cfba0ca9996831af5 Author: Jakub Kicinski Date: Tue Mar 21 17:59:20 2017 -0700 nfp: remove defensive checks around ndo_open()/ndo_close() Device open and close handlers check if the device is already in the desired state. Thanks to our reconfig infrastructure this should not be necessary, there doesn't seem to be any code in the driver which depends on it. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 10 ---------- 1 file changed, 10 deletions(-) commit 28b0cfee7b1b62ea214ebc50be5d5a92cbc30d42 Author: Jakub Kicinski Date: Tue Mar 21 17:59:19 2017 -0700 nfp: flush xmit_more on error paths In case of ring full or DMA mapping error remember to flush xmit_more delayed kicks. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 ++ 1 file changed, 2 insertions(+) commit 83d08a1d746522c3286c2f52608bea0f79c0e9df Author: Jakub Kicinski Date: Tue Mar 21 17:59:18 2017 -0700 nfp: remove RX queue pointers NFP6000 doesn't use queue pointers/doorbells for RX, it uses 'done' bit in descriptors. Remove the pointers from data structures. Since we are saving space in rx_ring structure make fields we previously compressed to 16bits word size again. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 8 ++------ drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 3 --- drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c | 15 ++++----------- 3 files changed, 6 insertions(+), 20 deletions(-) commit 87232d9615194334df75547db9a433293132d779 Author: Jakub Kicinski Date: Tue Mar 21 17:59:17 2017 -0700 nfp: don't use netdev_warn() before netdev is registered Fix warning which was using netdev_warn() instead of dev_warn() to early. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7d2da6038218ea08f3df74046f32bdff3589cf00 Author: Jakub Kicinski Date: Tue Mar 21 17:59:16 2017 -0700 nfp: fix nfp_cpp_read()/nfp_cpp_write() error paths When acquiring an area fails we can't call function doing both release and free. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 1bb665e3dd67f6f3477c55c2b247b42b1a5bfc95 Author: Jakub Kicinski Date: Tue Mar 21 17:59:15 2017 -0700 nfp: fix invalid area detection Core should detect when someone is trying to request an access window which is too large for a given type of access. Otherwise the requester will be put on a wait queue for ever without any error message. Add const qualifiers to clarify that we are only looking at read- -only members in relevant functions. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) commit 76e8f93e8951779119de5e56a889ff30d2c4038e Author: Jakub Kicinski Date: Tue Mar 21 17:59:14 2017 -0700 nfp: don't ignore return value of wait_event_interruptible When signal interrupts waiting for an area to become available we assume success. Pay attention to the return code. Unpack the code a little bit to make it more readable. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 56 +++++++++++++++------- 1 file changed, 38 insertions(+), 18 deletions(-) commit 69a4aa89315819e9eabd3a43211506d7302121a6 Author: Jakub Kicinski Date: Tue Mar 21 17:59:13 2017 -0700 nfp: correct return codes when msleep gets interrupted msleep_interruptible() returns time left to wait, not error code. Return ERESTARTSYS when interrupted. While at it correct a comment and make the polling a bit more aggressive. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a831ffb56048fdd1d99178c34d05469421fd2a36 Author: Jakub Kicinski Date: Tue Mar 21 17:59:12 2017 -0700 nfp: lock area cache earlier We shouldn't access area_cache_list without its lock even to check if it's empty. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 61e81abdceff5c0d756c04855f825f516141b516 Author: Jakub Kicinski Date: Tue Mar 21 17:59:11 2017 -0700 nfp: document expected locking in the core Document which fields of nfp_cpp are protected by which locks. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 33 ++++++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) commit 8672103f415535d0341005e411a1757865ddd220 Author: Jakub Kicinski Date: Tue Mar 21 17:59:10 2017 -0700 nfp: move mutex code out of nfp_cppcore.c After mutex cache removal we can put the mutex code in a separate source file. This makes it clear it doesn't play with internals of struct nfp_cpp any more. No functional changes. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + .../ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 304 ------------------ .../net/ethernet/netronome/nfp/nfpcore/nfp_mutex.c | 345 +++++++++++++++++++++ 3 files changed, 346 insertions(+), 304 deletions(-) commit 832ff9482ea44370e8a7f7e0d205be6be73d2257 Author: Jakub Kicinski Date: Tue Mar 21 17:59:09 2017 -0700 nfp: remove cpp mutex cache CPP mutex cache was introduced to work around the fact that the same host could successfully acquire a lock multiple times. It used to collapse multiple users to the same struct nfp_cpp_mutex and track use count. Unfortunately it's racy. Since we now force all nfp_mutex_lock() callers within the host to actually succeed at acquiring the lock we no longer need the cache, let's remove it. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 43 +--------------------- 1 file changed, 2 insertions(+), 41 deletions(-) commit f1ba63ec9073d5f270efde4cd86d811a441d54d0 Author: Jakub Kicinski Date: Tue Mar 21 17:59:08 2017 -0700 nfp: fail graciously when someone tries to grab global lock The global device lock is acquired to search the resource table. The lock is actually itself part of the table (entry 0). Therefore if someone asks for resource 0 we would deadlock since double locking is no longer allowed. Currently the driver doesn't try to lock that resource so let's simply make sure we fail graciously and not add special handling of this case until really need. Hide the relevant defines in the source file. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfpcore/nfp.h | 9 +-------- drivers/net/ethernet/netronome/nfp/nfpcore/nfp_resource.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 11 deletions(-) commit 3d4fc6eb4bc15cd81a150b065494f0e67d2493c0 Author: Jakub Kicinski Date: Tue Mar 21 17:59:07 2017 -0700 nfp: disallow sharing mutexes on the same machine NFP can be connected to multiple machines via PCI or other buses. Access to hardware resources is arbitrated using locks residing in device memory. Currently nfpcore only respects the mutexes when it comes to inter-host locking, but if we try to acquire the same lock again, on one host - it will simply return success because owner of the lock is already set to that host. This makes the locks useless for arbitration within one host and unfair because whichever host grabbed the lock will have a chance to reacquire it without others getting a shot. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 6 ------ 1 file changed, 6 deletions(-) commit 89d123106a97bf412a4c10482044c822f4b069f7 Author: Rob Herring Date: Tue Mar 21 09:01:08 2017 -0500 scripts/dtc: Update to upstream version v1.4.4-8-g756ffc4f52f6 This adds the following commits from upstream: 756ffc4f52f6 Build pylibfdt as part of the normal build process 8cb3896358e9 Adjust libfdt.h to work with swig b40aa8359aff Mention pylibfdt in the documentation 12cfb740cc76 Add tests for pylibfdt 50f250701631 Add an initial Python library for libfdt cdbb2b6c7a3a checks: Warn on node name unit-addresses with '0x' or leading 0s 4c15d5da17cc checks: Add bus checks for simple-bus buses 33c3985226d3 checks: Add bus checks for PCI buses 558cd81bdd43 dtc: Bump version to v1.4.4 c17a811c62eb fdtput: Remove star from value_len documentation 194d5caaefcb fdtget: Use @return to document the return value d922ecdd017b tests: Make realloc_fdt() really allocate *fdt 921cc17fec29 libfdt: overlay: Check the value of the right variable 9ffdf60bf463 dtc: Simplify asm_emit_string() implementation 881012e44386 libfdt: Change names of sparse helper macros bad5b28049e5 Fix assorted sparse warnings 672ac09ea04d Clean up gcc attributes 49300f2ade6a dtc: Don't abuse struct fdt_reserve_entry fa8bc7f928ac dtc: Bump version to v1.4.3 34a9886a177f Add printf format attributes f72508e2b6ca Correct some broken printf() like format mismatches 397d5ef0203c libfdt: Add fdt_setprop_empty() 69a1bd6ad3f9 libfdt: Remove undefined behaviour setting empty properties acd1b534a592 Print output filename as part of warning messages 120775eb1cf3 dtc: Use streq() in preference to strcmp() 852e9ecbe197 checks: Add Warning for stricter node name character checking ef0e8f061534 checks: Add Warning for stricter property name character checking 00d7bb1f4b0e dtc: pos parameter to srcpos_string() can't be NULL 95d57726bca4 livetree.c: Fix memory leak 3b9c97093d6e dtc: Fix NULL pointer use in dtlabel + dtref case 43eb551426ea manual: Fix typo it -> in 4baf15f7f13f Makefile: Add tags rule Signed-off-by: Rob Herring scripts/dtc/checks.c | 361 +++++++++++++++++++++++++++++++---- scripts/dtc/data.c | 16 +- scripts/dtc/dtc-lexer.l | 3 +- scripts/dtc/dtc-lexer.lex.c_shipped | 77 ++++---- scripts/dtc/dtc-parser.tab.c_shipped | 6 +- scripts/dtc/dtc-parser.y | 6 +- scripts/dtc/dtc.c | 9 +- scripts/dtc/dtc.h | 11 +- scripts/dtc/flattree.c | 58 +++--- scripts/dtc/libfdt/fdt_rw.c | 3 +- scripts/dtc/libfdt/libfdt.h | 51 ++++- scripts/dtc/libfdt/libfdt_env.h | 26 +-- scripts/dtc/livetree.c | 22 ++- scripts/dtc/srcpos.c | 2 +- scripts/dtc/srcpos.h | 11 +- scripts/dtc/treesource.c | 6 +- scripts/dtc/util.c | 11 +- scripts/dtc/util.h | 24 ++- scripts/dtc/version_gen.h | 2 +- 19 files changed, 523 insertions(+), 182 deletions(-) commit 86cef6144d273404d8cb5c0b215ada8d23e5dbeb Author: Rob Herring Date: Tue Mar 21 08:28:11 2017 -0500 scripts/dtc: automate getting dtc version and log in update script Further automate the dtc update script to fill in the dtc version and commit log. Signed-off-by: Rob Herring scripts/dtc/update-dtc-source.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 0634c2958927198797bf9e55d26fb51cce4c22b4 Author: Rob Herring Date: Wed Mar 22 09:16:27 2017 -0500 of: Add function for generating a DT modalias with a newline The modalias sysfs attr is lacking a newline for DT aliases on platform devices. The macio and ibmebus correctly add the newline, but open code it. Introduce a new function, of_device_modalias(), that fills the buffer with the modalias including the newline and update users of the old of_device_get_modalias function. Signed-off-by: Rob Herring Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Frank Rowand Cc: linuxppc-dev@lists.ozlabs.org Acked-by: Greg Kroah-Hartman arch/powerpc/platforms/pseries/ibmebus.c | 5 +---- drivers/base/platform.c | 2 +- drivers/macintosh/macio_sysfs.c | 7 +------ drivers/of/device.c | 18 ++++++++++++++++-- drivers/tty/serdev/core.c | 5 +---- drivers/usb/common/ulpi.c | 2 +- include/linux/of_device.h | 7 +++---- 7 files changed, 24 insertions(+), 22 deletions(-) commit 31c7ba9eff5d8a9f20057082eb44cc3c6a1fb3d6 Author: Dan Carpenter Date: Tue Mar 21 23:42:27 2017 +0300 net: dwc-xlgmac: fix an error code in xlgmac_alloc_pages() The dma_mapping_error() returns true if there is an error but we want to return -ENOMEM and not 1. Fixes: 65e0ace2c5cd ("net: dwc-xlgmac: Initial driver for DesignWare Enterprise Ethernet") Signed-off-by: Dan Carpenter Reviewed-by: Jie Deng Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc-xlgmac-desc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a7678c70ef624dde4f9f08ad6e99f2ff4dbdee57 Author: David Ahern Date: Tue Mar 21 12:22:26 2017 -0700 rtnetlink: Add dump all for netconf Use the rtnl_dump_all to dump all netconf handlers that have been registered. Allows userspace to send a dump request for PF_UNSPEC and get all families. Cc: Nicolas Dichtel Signed-off-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 1 + 1 file changed, 1 insertion(+) commit 276a74d835fb0c2ee82831106b4e737421df91ae Merge: 2d72d50 060fbc8 Author: David S. Miller Date: Wed Mar 22 12:43:01 2017 -0700 Merge branch 'phy-mmd-cleanup' Russell King says: ==================== Clean up PHY MMD accessors This series cleans up phylib's MMD accessors, so that we have a common way of accessing the Clause 45 register set. The current situation is far from ideal - we have phy_(read|write)_mmd() which accesses Clause 45 registers over Clause 45 accesses, and we have phy_(read|write)_mmd_indirect(), which accesses Clause 45 registers via Clause 22 register 13/14. Generic code uses the indirect methods to access standard Clause 45 features, and when we come to add Clause 45 PHY support to phylib, we would need to make these conditional upon the PHY type, or duplicate these functions. An alternative solution is to merge these accessors together, and select the appropriate access method depending upon the 802.3 clause that the PHY conforms with. The result is that we have a single set of phy_(read|write)_mmd() accessors. For cases which require special handling, we still allow PHY drivers to override all MMD accesses - except rather than just overriding the indirect accesses. This keeps existing overrides working. Combining the two also has another beneficial side effect - we get rid of similar functions that take arguments in different orders. The old direct accessors took the phy structure, devad and register number, whereas the indirect accessors took the phy structure, register number and devad in that order. Care must be taken when updating future drivers that the argument order is correct, and the function name is not merely replaced. This patch set is against net-next. ==================== Signed-off-by: David S. Miller commit 060fbc894bf9ac8a226d63c5b0c8059a527155e2 Author: Russell King Date: Tue Mar 21 16:37:08 2017 +0000 net: phy: clean up mmd_phy_indirect() Make mmd_phy_indirect() use the same terminology as the rest of the code, making clear what each address is - phy address, devad, and register number. While here, remove the "inline" from this static function, leaving it to the compiler to decide whether to inline this function, and get rid of unnecessary parens. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/phy-core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 3b85d8df2655a4a5831ee8233108b53e69efa1ed Author: Russell King Date: Tue Mar 21 16:37:03 2017 +0000 net: phy: remove the indirect MMD read/write methods Remove the indirect MMD read/write methods which are now no longer necessary. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/phy-core.c | 119 +++++++++++++-------------------------------- include/linux/phy.h | 42 ---------------- 2 files changed, 34 insertions(+), 127 deletions(-) commit d11437e0af73d7e4ed98e4b8373ff906622db5ae Author: Russell King Date: Tue Mar 21 16:36:58 2017 +0000 net: phy: convert micrel to new read_mmd/write_mmd driver methods Convert micrel to the new read_mmd/write_mmd driver methods. This Clause 22 PHY does not support any MMD access method. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/micrel.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit a6d99fcd3fc4f6e71630eba8e7f4d2b3b396c4c9 Author: Russell King Date: Tue Mar 21 16:36:53 2017 +0000 net: phy: switch remaining users to phy_(read|write)_mmd() Switch everyone over to using phy_read_mmd() and phy_write_mmd() now that they are able to handle both Clause 22 indirect addressing and Clause 45 direct addressing methods to the MMD registers. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/bcm-phy-lib.c | 12 ++++-------- drivers/net/phy/dp83867.c | 25 +++++++++++-------------- drivers/net/phy/intel-xway.c | 26 +++++++++++++------------- drivers/net/phy/microchip.c | 5 ++--- drivers/net/phy/phy.c | 25 ++++++++++--------------- drivers/net/phy/phy_device.c | 4 ++-- 6 files changed, 42 insertions(+), 55 deletions(-) commit 5f61367729b8c6e8c5f7068d49ff5e57f1e8a925 Author: Russell King Date: Tue Mar 21 16:36:48 2017 +0000 net: lan78xx: update for phy_(read|write)_mmd_indirect() removal lan78xx appears to use phylib in a rather weird way, accessing the PHY partly through phylib, and partly by making direct accesses to it, including to the Clause 45 registers. As the indirect MMD accessors are going away, update this driver to use the plain phy_(read|write)_mmd() accessors instead. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Acked-by: Woojung Huh Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1ee6b9bc6206cd0837bc16e46f580e40fe663384 Author: Russell King Date: Tue Mar 21 16:36:43 2017 +0000 net: phy: make phy_(read|write)_mmd() generic MMD accessors Make phy_(read|write)_mmd() generic 802.3 clause 45 register accessors for both Clause 22 and Clause 45 PHYs, using either the direct register reading for Clause 45, or the indirect method for Clause 22 PHYs. Allow this behaviour to be overriden by PHY drivers where necessary. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/phy-core.c | 33 +++++++++++++++++++++++++-------- include/linux/phy.h | 24 ++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 8 deletions(-) commit 9860118b58241169f67ba77dfeb935fcf53ce4cd Author: Russell King Date: Tue Mar 21 16:36:37 2017 +0000 net: phy: move phy MMD accessors to phy-core.c Move the phy_(read|write)__mmd() helpers out of line, they will become our main MMD accessor functions, and so will be a little more complex. This complexity doesn't belong in an inline function. Also move the _indirect variants as well to keep like functionality together. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/Makefile | 2 +- drivers/net/phy/phy-core.c | 135 +++++++++++++++++++++++++++++++++++++++++++++ drivers/net/phy/phy.c | 85 ---------------------------- include/linux/phy.h | 20 +------ 4 files changed, 138 insertions(+), 104 deletions(-) commit 24f8e00a8a2eae92491f8668939dbfdc123d6e75 Author: Chris Wilson Date: Wed Mar 22 11:05:21 2017 +0000 drm/i915: Prefer to report ENOMEM rather than incur the oom for gfx allocations Since gfx allocations tend to be large, unmovable and disposable, report the allocation failure back to userspace as an ENOMEM rather than incur the oomkiller. We have already tried to make room by purging our own cached gfx objects, and the oomkiller doesn't attribute ownership of gfx objects so will likely pick the wrong candidate. Instead, let userspace see the ENOMEM. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170322110521.29930-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Acked-by: Daniel Vetter drivers/gpu/drm/i915/i915_gem.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 2d72d5016f00fc7d64b95e79405787dea73669af Author: Thierry Reding Date: Tue Mar 21 16:12:11 2017 +0100 net: stmmac: Use AVB mode by default Prior to the recent multi-queue changes the driver would configure the queues to use the AVB mode, but the mode then got switched to DCB. The hardware still works fine in DCB mode, but my testing capabilities are limited, so it's safer to revert to the prior setting anyway. Signed-off-by: Thierry Reding Acked-By: Joao Pinto Signed-off-by: David S. Miller include/linux/stmmac.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 33e85b8dd69e7f2fbf77f04bfc97ea7c76bccf9b Author: Thierry Reding Date: Tue Mar 21 16:12:10 2017 +0100 net: stmmac: Restore DT backwards-compatibility Recent changes to support multiple queues in the device tree bindings resulted in the number of RX and TX queues to be initialized to zero for device trees not adhering to the new bindings. Restore backwards-compatibility with those device trees by falling back to a single RX and TX queues each. Signed-off-by: Thierry Reding Acked-By: Joao Pinto Tested-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f39768744fd6cd45291c957bd4bf2f68f073ed73 Author: Thierry Reding Date: Tue Mar 21 16:12:09 2017 +0100 net: stmmac: Always enable MAC RX queues The MAC RX queues always need to be enabled in order to receive network packets. Remove the condition that this only needs to be done for multi- queue configurations. Signed-off-by: Thierry Reding Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 396a1200d8202f7cd154e26dcc47438e28ef6c70 Author: Paulo Zanoni Date: Wed Mar 22 15:58:44 2017 -0300 drm/i915: simplify intel_ddi_pll_select() Because {hsw,skl,bxt}_ddi_pll_select all pretty much do the same thing in slightly different ways. Replace everything with a simple copy of the function and inline it inside intle_ddi_pll_select(). v2: s/return pll/return pll != NULL/ (Ville) Reviewed-by: Ville Syrjälä Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1490209125-20046-1-git-send-email-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_ddi.c | 58 +++++----------------------------------- 1 file changed, 7 insertions(+), 51 deletions(-) commit 4c355cdfbba537971b5c3849680b1b6453a7a383 Author: Reshetova, Elena Date: Tue Mar 21 13:59:19 2017 +0200 net: convert sk_filter.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/filter.h | 3 ++- net/core/filter.c | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) commit 8cbeb06dc6b584009d7492c667a3c9a4b96cdefa Author: Pandiyan, Dhinakaran Date: Tue Mar 14 15:45:56 2017 -0700 drm/i915: Implement cdclk restrictions based on Azalia BCLK According to BSpec, "The CD clock frequency must be at least twice the frequency of the Azalia BCLK." and BCLK is configured to 96 MHz by default. This check is needed because BXT and GLK support cdclk frequencies less than 192 MHz. v2: Include other Gen9 platforms too for completeness.(Paulo) Cc: Paulo Zanoni Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Paulo Zanoni Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1489531556-2926-1-git-send-email-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_cdclk.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 78cfa580f81e69857815c59c8908aee454726da1 Author: Pandiyan, Dhinakaran Date: Tue Mar 7 16:12:51 2017 -0800 drm/i915/glk: Apply cdclk workaround for DP audio Implement the DP-Audio cdclk restriction for GLK, similar to what is implemented for BDW and other GEN9 platforms. The max. pixel clock adjustment for GLK, however factors in the 2 pixels per clock output that GLK generates. Separating min. cdclk and max. pixel_rate would be nicer, but let's defer that to future and fix the GLK bug for now. Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Paulo Zanoni Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1488931972-2865-1-git-send-email-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_cdclk.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 726bceca81ba09956226ea03c9fb58e037c3db7d Author: Tobias Klauser Date: Tue Mar 21 11:24:38 2017 +0100 net: greth: Utilize of_get_mac_address() Do not open code getting the MAC address exclusively from the "local-mac-address" property, but instead use of_get_mac_address() which looks up the MAC address using the 3 typical property names. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/aeroflex/greth.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 58ad3198342bda5eeb97c070dde76335bf0b7203 Author: Felix Manlunas Date: Mon Mar 20 19:04:48 2017 -0700 liquidio: fix Coverity scan errors Fix Coverity scan errors by not dereferencing lio->glists_dma_base pointer if it's NULL. See http://marc.info/?l=linux-netdev&m=149002294305614&w=2 Reported-by: Stephen Hemminger Signed-off-by: Felix Manlunas Signed-off-by: VSR Burru Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 3 ++- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit cfc62d878f8d436e6a2a99cef5559a7a98c43b3c Author: Gao Feng Date: Tue Mar 21 09:28:03 2017 +0800 net: tcp: Permit user set TCP_MAXSEG to default value When user_mss is zero, it means use the default value. But the current codes don't permit user set TCP_MAXSEG to the default value. It would return the -EINVAL when val is zero. Signed-off-by: Gao Feng Signed-off-by: David S. Miller net/ipv4/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7606e07856e0148e540fb67d68418400fd6b33b4 Author: Mark Rutland Date: Fri Jan 13 17:51:27 2017 +0000 KVM: arm64: Use common Set/Way sys definitions Now that we have common definitions for the encoding of Set/Way cache maintenance operations, make the KVM code use these, simplifying the sys_reg_descs table. Signed-off-by: Mark Rutland Acked-by: Christoffer Dall Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu arch/arm64/kvm/sys_regs.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 851050a573e1d2c192e6f59921e36fcbfcbcf207 Author: Mark Rutland Date: Thu Jan 19 18:39:39 2017 +0000 KVM: arm64: Use common sysreg definitions Now that we have common definitions for the remaining register encodings required by KVM, make the KVM code use these, simplifying the sys_reg_descs table and the genericv8_sys_regs table. Signed-off-by: Mark Rutland Acked-by: Christoffer Dall Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu arch/arm64/kvm/sys_regs.c | 94 +++++++++--------------------------- arch/arm64/kvm/sys_regs_generic_v8.c | 4 +- 2 files changed, 25 insertions(+), 73 deletions(-) commit 0d449541c185f23347feed6f9ea1994fd1707a06 Author: Mark Rutland Date: Fri Jan 13 18:36:26 2017 +0000 KVM: arm64: use common invariant sysreg definitions Now that we have common definitions for the register encodings used by KVM, make the KVM code uses thse for invariant sysreg definitions. This makes said definitions a reasonable amount shorter, especially as many comments are rendered redundant and can be removed. Signed-off-by: Mark Rutland Acked-by: Christoffer Dall Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu arch/arm64/kvm/sys_regs.c | 57 ++++++++++++++++------------------------------- 1 file changed, 19 insertions(+), 38 deletions(-) commit b2d693ced214f808059d539b6cc0fe551d1bc0e4 Author: Mark Rutland Date: Thu Mar 9 16:50:51 2017 +0000 KVM: arm64: Use common physical timer sysreg definitions Now that we have common definitions for the physical timer control registers, make the KVM code use these, simplifying the sys_reg_descs table. Signed-off-by: Mark Rutland Acked-by: Christoffer Dall Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu arch/arm64/kvm/sys_regs.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit e804d208979db63be87305fac6e659162d719d97 Author: Mark Rutland Date: Fri Jan 20 18:02:39 2017 +0000 KVM: arm64: Use common GICv3 sysreg definitions Now that we have common definitions for the GICv3 register encodings, make the KVM code use these, simplifying the sys_reg_descs table. Signed-off-by: Mark Rutland Acked-by: Christoffer Dall Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu arch/arm64/kvm/sys_regs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 174ed3e47591d58b4ad04250e11891618ea0048b Author: Mark Rutland Date: Fri Jan 20 17:43:20 2017 +0000 KVM: arm64: Use common performance monitor sysreg definitions Now that we have common definitions for the performance monitor register encodings, make the KVM code use these, simplifying the sys_reg_descs table. The comments for PMUSERENR_EL0 and PMCCFILTR_EL0 are kept, as these describe non-obvious details regarding the registers. However, a slight fixup is applied to bring these into line with the usual comment style. Signed-off-by: Mark Rutland Acked-by: Christoffer Dall Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu arch/arm64/kvm/sys_regs.c | 78 +++++++++++++---------------------------------- 1 file changed, 22 insertions(+), 56 deletions(-) commit ee1b64e6ccddbd31c0549851e8a6c00eef138acd Author: Mark Rutland Date: Fri Jan 13 17:19:12 2017 +0000 KVM: arm64: Use common debug sysreg definitions Now that we have common definitions for the debug register encodings, make the KVM code use these, simplifying the sys_reg_descs table. The table previously erroneously referred to MDCCSR_EL0 as MDCCSR_EL1. This is corrected (as is necessary in order to use the common sysreg definition). Signed-off-by: Mark Rutland Acked-by: Christoffer Dall Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu arch/arm64/kvm/sys_regs.c | 73 ++++++++++++++--------------------------------- 1 file changed, 21 insertions(+), 52 deletions(-) commit 8db5d8f141db8c05d7e4ff44e15fedf142511fc9 Author: Mark Rutland Date: Fri Jan 13 17:25:11 2017 +0000 KVM: arm64: add SYS_DESC() This patch adds a macro enabling us to initialise sys_reg_desc structures based on common sysreg encoding definitions in . Subsequent patches will use this to simplify the KVM code. Signed-off-by: Mark Rutland Acked-by: Christoffer Dall Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu arch/arm64/kvm/sys_regs.h | 5 +++++ 1 file changed, 5 insertions(+) commit b2a1674aa145c1730acde73f9399539cfd987e90 Merge: 29dd5ec bef7f75 Author: David S. Miller Date: Wed Mar 22 11:28:35 2017 -0700 Merge branch 'ovs-sample-action-optimization' Andy Zhou says: ==================== net-next sample action optimization v4 The sample action can be used for translating Openflow 'clone' action. However its implementation has not been sufficiently optimized for this use case. This series attempts to close the gap. Patch 3 commit message has more details on the specific optimizations implemented. --- v3->v4: Enhance patch 4. Fix two bugs pointed out by Pravin, Remove 'is_sample' variable. v2->v3: Enhance patch 4, Rafctor to move more common logic to clone_execute(). v1->v2: Address Pravin's comment, Refactor recirc and sample to share more common code ==================== Signed-off-by: David S. Miller commit bef7f7567a104a0b4dba5f51b8c12ce28947144b Author: andy zhou Date: Mon Mar 20 16:32:30 2017 -0700 Openvswitch: Refactor sample and recirc actions implementation Added clone_execute() that both the sample and the recirc action implementation can use. Signed-off-by: Andy Zhou Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/actions.c | 176 ++++++++++++++++++++++++---------------------- 1 file changed, 93 insertions(+), 83 deletions(-) commit 798c166173ffb50128993641fcf791df51bed48e Author: andy zhou Date: Mon Mar 20 16:32:29 2017 -0700 openvswitch: Optimize sample action for the clone use cases With the introduction of open flow 'clone' action, the OVS user space can now translate the 'clone' action into kernel datapath 'sample' action, with 100% probability, to ensure that the clone semantics, which is that the packet seen by the clone action is the same as the packet seen by the action after clone, is faithfully carried out in the datapath. While the sample action in the datpath has the matching semantics, its implementation is only optimized for its original use. Specifically, there are two limitation: First, there is a 3 level of nesting restriction, enforced at the flow downloading time. This limit turns out to be too restrictive for the 'clone' use case. Second, the implementation avoid recursive call only if the sample action list has a single userspace action. The main optimization implemented in this series removes the static nesting limit check, instead, implement the run time recursion limit check, and recursion avoidance similar to that of the 'recirc' action. This optimization solve both #1 and #2 issues above. One related optimization attempts to avoid copying flow key as long as the actions enclosed does not change the flow key. The detection is performed only once at the flow downloading time. Another related optimization is to rewrite the action list at flow downloading time in order to save the fast path from parsing the sample action list in its original form repeatedly. Signed-off-by: Andy Zhou Acked-by: Pravin B Shelar Signed-off-by: David S. Miller include/uapi/linux/openvswitch.h | 15 +++++ net/openvswitch/actions.c | 107 ++++++++++++++--------------- net/openvswitch/datapath.h | 2 - net/openvswitch/flow_netlink.c | 141 +++++++++++++++++++++++++++------------ 4 files changed, 167 insertions(+), 98 deletions(-) commit 4572ef52a00bf671fa0fb5a85ee75b1af30cc18b Author: andy zhou Date: Mon Mar 20 16:32:28 2017 -0700 openvswitch: Refactor recirc key allocation. The logic of allocating and copy key for each 'exec_actions_level' was specific to execute_recirc(). However, future patches will reuse as well. Refactor the logic into its own function clone_key(). Signed-off-by: Andy Zhou Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/actions.c | 66 ++++++++++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 26 deletions(-) commit 47c697aa2d07f4bf258e7ad53cdb6c77c339b843 Author: andy zhou Date: Mon Mar 20 16:32:27 2017 -0700 openvswitch: Deferred fifo API change. add_deferred_actions() API currently requires actions to be passed in as a fully encoded netlink message. So far both 'sample' and 'recirc' actions happens to carry actions as fully encoded netlink messages. However, this requirement is more restrictive than necessary, future patch will need to pass in action lists that are not fully encoded by themselves. Signed-off-by: Andy Zhou Acked-by: Joe Stringer Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/actions.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 29dd5ec094e5ec469d220ef85d4a47ada10e9b4e Merge: a2d133b a9ec54d Author: David S. Miller Date: Wed Mar 22 11:19:48 2017 -0700 Merge branch 'vrf-perf' David Ahern says: ==================== net: vrf: performance improvements Device based features for VRF such as qdisc, netfilter and packet captures are implemented by switching the dst on skbuffs to its per-VRF dst. This has the effect of controlling the output function which points a function in the VRF driver. [1] The skb proceeds down the stack with dst->dev pointing to the VRF device. Netfilter, qdisc and tc rules and network taps are evaluated based on this device. Finally, the skb makes it to the vrf_xmit function which resets the dst based on a FIB lookup. The feature comes at cost - between 5 and 10% depending on test (TCP vs UDP, stream vs RR and IPv4 vs IPv6). The main cost is requiring a FIB lookup in the VRF driver for each packet sent through it. The FIB lookup is required because the real dst gets dropped so that the skb can traverse the stack with dst->dev set to the VRF device. All of that is really driven by the qdisc and not replicating the processing of __dev_queue_xmit if a qdisc is set up on the device. But, VRF devices by default do not have a qdisc and really have no need for multiple Tx queues. This means the performance overhead is inflicted upon all users for the potential use case of a qdisc being configured. The overhead can be avoided by checking if the default configuration applies to a specific VRF device before switching the dst. If a device does not have a qdisc, the pass through netfilter hooks and packet taps can be done inline without dropping the dst and thus avoiding the performance penalty. With this change performance overhead of VRF drops to neglible (difference with run-over-run variance) to 3% depending on test type. netperf performance comparison for 3 cases: 1. L3_MASTER_DEVICE compiled out 2. VRF with this patch set 3. current VRF code IPv4 ---- no-l3mdev new-vrf old-vrf TCP_RR 28778 28938* 27169 TCP_CRR 10706 10490 9770 UDP_RR 30750 29813 29256 * Although higher in the final run used for submitting this patch set, I think what this really represents is a neglible performance overhead for VRF with this change (i.e, within the +-1% variance of runs). Most notably the FIB lookups in the Tx path are avoided for TCP_RR. IPv6 ---- no-l3mdev new-vrf old-vrf TCP_RR 29495 29432 27794 TCP_CRR 10520 10338 9870 UDP_RR 26137 27019* 26511 * UDP is consistently better with VRF for two reasons: 1. Source address selection with L3 domains is considering fewer addresses since only addresses on interfaces in the domain are considered for the selection. Specifically, perf-top shows shows ipv6_get_saddr_eval, ipv6_dev_get_saddr and __ipv6_dev_get_saddr running much lower with vrf than without. 2. The VRF table contains all routes (i.e, there are no separate local and main tables per VRF). That means ip6_pol_route_output only has 1 lookup for VRF where it does 2 without it (1 in the local table and 1 in the main table). [1] http://netdevconf.org/1.2/papers/ahern-what-is-l3mdev-paper.pdf ==================== Signed-off-by: David S. Miller commit a9ec54d1b0cdfd94eda44c7d5d1ce9e8ede1e402 Author: David Ahern Date: Mon Mar 20 11:19:45 2017 -0700 net: vrf: performance improvements for IPv6 The VRF driver allows users to implement device based features for an entire domain. For example, a qdisc or netfilter rules can be attached to a VRF device or tcpdump can be used to view packets for all devices in the L3 domain. The device-based features come with a performance penalty, most notably in the Tx path. The VRF driver uses the l3mdev_l3_out hook to switch the dst on an skb to its private dst. This allows the skb to traverse the xmit stack with the device set to the VRF device which in turn enables the netfilter and qdisc features. The VRF driver then performs the FIB lookup again and reinserts the packet. This patch avoids the redirect for IPv6 packets if a qdisc has not been attached to a VRF device which is the default config. In this case the netfilter hooks and network taps are directly traversed in the l3mdev_l3_out handler. If a qdisc is attached to a VRF device, then the redirect using the vrf dst is done. Additional overhead is removed by only checking packet taps if a socket is open on the device (vrf_dev->ptype_all list is not empty). Packet sockets bound to any device will still get a copy of the packet via the real ingress or egress interface. The end result of this change is a decrease in the overhead of VRF for the default, baseline case (ie., no netfilter rules, no packet sockets, no qdisc) from a +3% improvement for UDP which has a lookup per packet (VRF being better than no l3mdev) to ~2% loss for TCP_CRR which connects a socket for each request-response. Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 56 insertions(+), 10 deletions(-) commit dcdd43c41e60d7618ad54369d77ee39f122d41e4 Author: David Ahern Date: Mon Mar 20 11:19:44 2017 -0700 net: vrf: performance improvements for IPv4 The VRF driver allows users to implement device based features for an entire domain. For example, a qdisc or netfilter rules can be attached to a VRF device or tcpdump can be used to view packets for all devices in the L3 domain. The device-based features come with a performance penalty, most notably in the Tx path. The VRF driver uses the l3mdev_l3_out hook to switch the dst on an skb to its private dst. This allows the skb to traverse the xmit stack with the device set to the VRF device which in turn enables the netfilter and qdisc features. The VRF driver then performs the FIB lookup again and reinserts the packet. This patch avoids the redirect for IPv4 packets if a qdisc has not been attached to a VRF device which is the default config. In this case the netfilter hooks and network taps are directly traversed in the l3mdev_l3_out handler. If a qdisc is attached to a VRF device, then the redirect using the vrf dst is done. Additional overhead is removed by only checking packet taps if a socket is open on the device (vrf_dev->ptype_all list is not empty). Packet sockets bound to any device will still get a copy of the packet via the real ingress or egress interface. The end result of this change is a decrease in the overhead of VRF for the default, baseline case (ie., no netfilter rules, no packet sockets, no qdisc) to ~3% for UDP which has a lookup per packet and < 1% overhead for connected sockets that leverage early demux and avoid FIB lookups. Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 106 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 96 insertions(+), 10 deletions(-) commit a2d133b1d465016d0d97560b11f54ba0ace56d3e Author: Josh Hunt Date: Mon Mar 20 15:22:03 2017 -0400 sock: introduce SO_MEMINFO getsockopt Allows reading of SK_MEMINFO_VARS via socket option. This way an application can get all meminfo related information in single socket option call instead of multiple calls. Adds helper function, sk_get_meminfo(), and uses that for both getsockopt and sock_diag_put_meminfo(). Suggested by Eric Dumazet. Signed-off-by: Josh Hunt Reviewed-by: Jason Baron Acked-by: Eric Dumazet Signed-off-by: David S. Miller arch/alpha/include/uapi/asm/socket.h | 2 ++ arch/avr32/include/uapi/asm/socket.h | 2 ++ arch/frv/include/uapi/asm/socket.h | 2 ++ arch/ia64/include/uapi/asm/socket.h | 2 ++ arch/m32r/include/uapi/asm/socket.h | 2 ++ arch/mips/include/uapi/asm/socket.h | 3 +++ arch/mn10300/include/uapi/asm/socket.h | 2 ++ arch/parisc/include/uapi/asm/socket.h | 2 ++ arch/powerpc/include/uapi/asm/socket.h | 2 ++ arch/s390/include/uapi/asm/socket.h | 2 ++ arch/sparc/include/uapi/asm/socket.h | 2 ++ arch/xtensa/include/uapi/asm/socket.h | 2 ++ include/net/sock.h | 2 ++ include/uapi/asm-generic/socket.h | 2 ++ net/core/sock.c | 30 ++++++++++++++++++++++++++++++ net/core/sock_diag.c | 10 +--------- 16 files changed, 60 insertions(+), 9 deletions(-) commit 4e0b1ab72b8af961bcaca9ec1475279c1cd9579c Author: Fan Zhang Date: Tue Nov 29 07:17:55 2016 +0100 KVM: s390: gs support for kvm guests This patch adds guarded storage support for KVM guest. We need to setup the necessary control blocks, the kvm_run structure for the new registers, the necessary wrappers for VSIE, as well as the machine check save areas. GS is enabled lazily and the register saving and reloading is done in KVM code. As this feature adds new content for migration, we provide a new capability for enablement (KVM_CAP_S390_GS). Signed-off-by: Fan Zhang Reviewed-by: Christian Borntraeger Reviewed-by: Janosch Frank Signed-off-by: Christian Borntraeger Documentation/virtual/kvm/api.txt | 9 ++++++ arch/s390/include/asm/kvm_host.h | 8 ++++- arch/s390/include/uapi/asm/kvm.h | 14 ++++++++- arch/s390/kvm/intercept.c | 1 + arch/s390/kvm/interrupt.c | 33 +++++++++++++++++++-- arch/s390/kvm/kvm-s390.c | 62 +++++++++++++++++++++++++++++++++++++++ arch/s390/kvm/kvm-s390.h | 1 + arch/s390/kvm/priv.c | 27 +++++++++++++++++ arch/s390/kvm/vsie.c | 39 ++++++++++++++++++++++++ include/uapi/linux/kvm.h | 1 + 10 files changed, 191 insertions(+), 4 deletions(-) commit c7cd4c9bf8df87027e739fe66d0a55951f6875d8 Author: Colin Ian King Date: Mon Mar 20 11:37:22 2017 +0000 mlxsw: spectrum: fix swapped order of arguments packets and bytes The arguments packets and bytes to call mlxsw_sp_acl_rule_get_stats are in the wrong order. Fix this by swapping them. Detected by CoverityScan, CID#1419705 ("Arguments in wrong order") Fixes: 7c1b8eb175b69add8ea ("mlxsw: spectrum: Add support for TC flower offload statistics") Signed-off-by: Colin Ian King Acked-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c2b3e0ddc063f61a201ccb70a121fecc8373a49 Merge: 947b897 916cda1 Author: Christian Borntraeger Date: Wed Mar 22 18:54:52 2017 +0100 Merge remote-tracking branch 's390/guarded-storage' into kvms390/next commit bb58d07964f2f09e133b46541447c567a7306dc1 Author: Arjun Vynipadath Date: Mon Mar 20 14:22:38 2017 +0530 cxgb4: Update IngPad and IngPack values We are using the smallest padding boundary (8 bytes), which isn't smaller than the Memory Controller Read/Write Size We get best performance in 100G when the Packing Boundary is a multiple of the Maximum Payload Size. Its related to inefficient chopping of DMA packets by PCIe, that causes more overhead on bus. So driver is helping by making the starting address alignment to be MPS size. We will try to determine PCIE MaxPayloadSize capabiltiy and set IngPackBoundary based on this value. If cache line size is greater than MPS or determinig MPS fails, we will use cache line size to determine IngPackBoundary(as before). Signed-off-by: Arjun Vynipadath Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 75 +++++++++++++++++++------- drivers/net/ethernet/chelsio/cxgb4/t4_values.h | 4 ++ 2 files changed, 60 insertions(+), 19 deletions(-) commit 3588f29e061cef19ac0092e4f6917717fed5b1d4 Author: Arnd Bergmann Date: Mon Mar 20 09:51:13 2017 +0100 net: dwc-xlgmac: add module license When building the driver as a module, we get a warning about the lack of a license: WARNING: modpost: missing MODULE_LICENSE() in drivers/net/ethernet/synopsys/dwc-xlgmac.o see include/linux/module.h for more information Curiously the text in the .c files only mentions GPLv2+, while the license tag in the PCI driver contains both GPL and BSD. I picked the license text as the more definite reference here and put a GPL tag in there. Fixes: 65e0ace2c5cd ("net: dwc-xlgmac: Initial driver for DesignWare Enterprise Ethernet") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc-xlgmac-common.c | 1 + 1 file changed, 1 insertion(+) commit 424fa00ea325b0153c321667f39643f68ae9d1b0 Author: Arnd Bergmann Date: Mon Mar 20 09:51:12 2017 +0100 net: dwc-xlgmac: include dcbnl.h Without this header, we can run into a build error: drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c: In function 'xlgmac_config_queue_mapping': drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c:1548:36: error: 'IEEE_8021QAZ_MAX_TCS' undeclared (first use in this function) prio_queues = min_t(unsigned int, IEEE_8021QAZ_MAX_TCS, Fixes: 65e0ace2c5cd ("net: dwc-xlgmac: Initial driver for DesignWare Enterprise Ethernet") Signed-off-by: Arnd Bergmann Reviewed-by: Jie Deng Signed-off-by: David S. Miller drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c | 1 + 1 file changed, 1 insertion(+) commit 7b8f7a402d4cfc3a1361a2766066127f9bccadc4 Author: Roopa Prabhu Date: Sun Mar 19 22:01:28 2017 -0700 neighbour: fix nlmsg_pid in notifications neigh notifications today carry pid 0 for nlmsg_pid in all cases. This patch fixes it to carry calling process pid when available. Applications (eg. quagga) rely on nlmsg_pid to ignore notifications generated by their own netlink operations. This patch follows the routing subsystem which already sets this correctly. Reported-by: Vivek Venkatraman Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller include/net/neighbour.h | 3 ++- net/atm/clip.c | 4 ++-- net/core/neighbour.c | 32 ++++++++++++++++++-------------- net/ipv4/arp.c | 6 +++--- net/ipv6/ndisc.c | 2 +- 5 files changed, 26 insertions(+), 21 deletions(-) commit 6a0f9ebfc5e753bb948c13353615324462d73795 Author: Ville Syrjälä Date: Tue Mar 21 20:12:16 2017 +0200 drm: Add mode_config .get_format_info() hook Allow drivers to return a custom drm_format_info structure for special fb layouts. We'll use this for the compression control surface in i915. v2: Fix drm_get_format_info() kernel doc (Laurent) Don't pass 'dev' to the new hook (Laurent) v3: s/compresssion/compression/ (Ben) Cc: Laurent Pinchart Cc: Ben Widawsky Cc: Jason Ekstrand Signed-off-by: Ville Syrjälä Reviewed-by: Ben Widawsky Link: http://patchwork.freedesktop.org/patch/msgid/20170321181218.10042-4-ville.syrjala@linux.intel.com drivers/gpu/drm/drm_fb_cma_helper.c | 2 +- drivers/gpu/drm/drm_fourcc.c | 25 +++++++++++++++++++++++++ drivers/gpu/drm/drm_framebuffer.c | 9 +++++++-- drivers/gpu/drm/drm_modeset_helper.c | 2 +- include/drm/drm_fourcc.h | 6 ++++++ include/drm/drm_mode_config.h | 14 ++++++++++++++ 6 files changed, 54 insertions(+), 4 deletions(-) commit 33f673aa55e96ee37bb85200a24e4da12ba4d3f2 Author: Ville Syrjälä Date: Tue Mar 21 20:12:15 2017 +0200 drm: Remove fb hsub/vsub alignment requirement Allow framebuffers dimesions to be misaligned w.r.t. the subsampling factors. No real reason the core should have to enforce this, and it definitely starts to cause us issues with the i915 CCS support. So let's just lift the restriction. Let's start to round up when computing the color plane dimesions so that we'll not end up with too low an estimate for the memory requirements and whatnot. Cc: Ben Widawsky Cc: Jason Ekstrand Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170321181218.10042-3-ville.syrjala@linux.intel.com Reviewed-by: Ben Widawsky drivers/gpu/drm/drm_framebuffer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 568c5e453666fd8e0a8b11b440291f59e4da28c8 Author: Ville Syrjälä Date: Tue Mar 21 20:12:14 2017 +0200 drm: Share the code to compute color plane dimesions framebuffer_check() has some hand rolled code to compute the color plane dimensions based on the subsampled information. Let's share the code between framebuffer_check() and drm_framebuffer_plane_{width,height}(). Cc: Ben Widawsky Cc: Jason Ekstrand Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170321181218.10042-2-ville.syrjala@linux.intel.com Reviewed-by: Ben Widawsky drivers/gpu/drm/drm_framebuffer.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) commit 9be83448951a404a6fd5cf43ee0245a9bccc02c1 Author: Elaine Zhang Date: Wed Feb 22 10:59:55 2017 +0800 clk: rockchip: add pll_wait_lock for pll_enable If pll is power down,when power up pll need wait pll lock. The reference documents section: PLL frequency change and lock check Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-pll.c | 3 +++ 1 file changed, 3 insertions(+) commit 7ada7ca562714632d0fc9abb24e27cab67bdbf0d Merge: 592d42a f22913d Author: David S. Miller Date: Wed Mar 22 10:31:27 2017 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2017-03-21 This series contains updates to e1000, e1000e, igb, igbvf and ixgb. This finishes up the work Philippe Reynes did to update the Intel drivers to the new API for ethtool (get|set)_link_ksettings. ==================== Signed-off-by: David S. Miller commit d61c97a7773d0848b4bf5c4697855c7ce117362c Author: Mark Rutland Date: Wed Feb 15 14:54:17 2017 +0000 arm64: move !VHE work to end of el2_setup We only need to initialise sctlr_el1 if we're installing an EL2 stub, so we may as well defer this until we're doing so. Similarly, we can defer intialising CPTR_EL2 until then, as we do not access any trapped functionality as part of el2_setup. This patch modified el2_setup accordingly, allowing us to remove a branch and simplify the code flow. Acked-by: Marc Zyngier Signed-off-by: Mark Rutland Cc: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/kernel/head.S | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) commit 3ad47d055aa88d9f4189253f5b5c485f4c4626b2 Author: Mark Rutland Date: Wed Feb 15 14:54:16 2017 +0000 arm64: reduce el2_setup branching The early el2_setup code is a little convoluted, with two branches where one would do. This makes the code more painful to read than is necessary. We can remove a branch and simplify the logic by moving the early return in the booted-at-EL1 case earlier in the function. This separates it from all the setup logic that only makes sense for EL2. Acked-by: Marc Zyngier Signed-off-by: Mark Rutland Cc: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/kernel/head.S | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit fda89d9efcabaafcbbb189e969d46dc634574b67 Author: Chris Redmon Date: Thu Mar 16 18:10:43 2017 -0400 arm64: struct debug_info: Check CONFIG_HAVE_HW_BREAKPOINT Check if CONFIG_HAVE_HW_BREAKPOINT is enabled before compiling in extra data required for hardware breakpoints. Compiling out this code when hw breakpoints are disabled saves about 272 bytes per struct task_struct. Signed-off-by: Chris Redmon Signed-off-by: Catalin Marinas arch/arm64/include/asm/processor.h | 2 ++ 1 file changed, 2 insertions(+) commit 44176bb38fa48726a9658b2ccf407ea94113c760 Author: Geert Uytterhoeven Date: Tue Mar 7 18:43:32 2017 +0100 arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU Add support for allocating physically contiguous DMA buffers on arm64 systems with an IOMMU. This can be useful when two or more devices with different memory requirements are involved in buffer sharing. Note that as this uses the CMA allocator, setting the DMA_ATTR_FORCE_CONTIGUOUS attribute has a runtime-dependency on CONFIG_DMA_CMA, just like on arm32. For arm64 systems using swiotlb, no changes are needed to support the allocation of physically contiguous DMA buffers: - swiotlb always uses physically contiguous buffers (up to IO_TLB_SEGSIZE = 128 pages), - arm64's __dma_alloc_coherent() already calls dma_alloc_from_contiguous() when CMA is available. Signed-off-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Reviewed-by: Robin Murphy Signed-off-by: Catalin Marinas arch/arm64/mm/dma-mapping.c | 63 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 15 deletions(-) commit f13d52cb3fad03c237572be2ee691e1fe2d1d7bb Author: Arnd Bergmann Date: Tue Mar 14 22:39:21 2017 +0100 arm64: define BUG() instruction without CONFIG_BUG This mirrors commit e9c38ceba8d9 ("ARM: 8455/1: define __BUG as asm(BUG_INSTR) without CONFIG_BUG") to make the behavior of arm64 consistent with arm and x86, and avoids lots of warnings in randconfig builds, such as: kernel/seccomp.c: In function '__seccomp_filter': kernel/seccomp.c:666:1: error: no return statement in function returning non-void [-Werror=return-type] Acked-by: Will Deacon Signed-off-by: Arnd Bergmann Signed-off-by: Catalin Marinas arch/arm64/include/asm/bug.h | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit 0f11736df6de29de86d9a28dd5d8de39bff807c7 Author: Rob Herring Date: Tue Mar 21 21:03:08 2017 -0500 ARM: dts: bcm: fix msi-controller name and unit address The unit address for the msi controller is not valid as there is no reg property, so remove it. Also, msi-controller is the preferred node name. Signed-off-by: Rob Herring Cc: Ray Jui Cc: Scott Branden Cc: Jon Mason Cc: bcm-kernel-feedback-list@broadcom.com Acked-by: Ray Jui Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-cygnus.dtsi | 4 ++-- arch/arm/boot/dts/bcm-nsp.dtsi | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 7e2a9035c1dbc4632f1897a8fe580fc90f33c013 Author: Andy Yan Date: Fri Mar 17 18:18:38 2017 +0100 clk: rockchip: rename RK1108 to RV1108 Rockchip finally named the SOC as RV1108, so change it. Signed-off-by: Andy Yan [include rename in rk1108.dtsi to prevent compile errors] Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk1108.dtsi | 2 +- drivers/clk/rockchip/Makefile | 2 +- drivers/clk/rockchip/clk-rk1108.c | 531 --------------------------------- drivers/clk/rockchip/clk-rv1108.c | 531 +++++++++++++++++++++++++++++++++ drivers/clk/rockchip/clk.h | 28 +- include/dt-bindings/clock/rk1108-cru.h | 269 ----------------- include/dt-bindings/clock/rv1108-cru.h | 269 +++++++++++++++++ 7 files changed, 816 insertions(+), 816 deletions(-) commit b61753a4c44eb372078e5e719686c383f91834b2 Author: Andy Yan Date: Fri Mar 17 18:18:37 2017 +0100 dt-bindings: rk1108-cru: rename RK1108 to RV1108 Rockchip finally named the SOC as RV1108, so change it. Signed-off-by: Andy Yan Acked-by: Rob Herring Signed-off-by: Heiko Stuebner .../bindings/clock/rockchip,rk1108-cru.txt | 59 ---------------------- .../bindings/clock/rockchip,rv1108-cru.txt | 59 ++++++++++++++++++++++ 2 files changed, 59 insertions(+), 59 deletions(-) commit 41b464ef10219e45513d1bcaddacd47ce0bd6136 Author: Shawn Lin Date: Mon Mar 20 10:38:00 2017 +0800 arm64: dts: rockchip: fix PCIe domain number for rk3399 It's suggested to fix the domain number for all PCIe host bridges or not set it at all. However, if we don't fix it, the domain number will keep increasing ever when doing unbind/bind test, which makes the bus tree of lspci introduce pointless domain hierarchy. More investigation shows the domain number allocater of PCI doesn't consider the conflict of domain number if we have more than one PCIe port belonging to different domains. So once unbinding/binding one of them and keep others would going to overflow the domain number so that finally it will share the same domain as others, but actually it shouldn't. We should fix the domain number for PCIe or invent new indexing ID mechanisms. However it isn't worth inventing new indexing ID mechanisms personlly, Just look at how other Root Complex drivers did, for instance, broadcom and qualcomm, it seems fixing the domain number was more popular. So this patch gonna fix the domain number of PCIe for rk3399. Signed-off-by: Shawn Lin Reviewed-by: Brian Norris Tested-by: Brian Norris Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 + 1 file changed, 1 insertion(+) commit 3a599e0dbc03ffc51568cf3376633d127451632d Author: Rafał Miłecki Date: Wed Mar 15 18:03:28 2017 +0100 ARM: dts: BCM53573: Specify serial console parameters This adds baud rate, parity & number of data bits. It's required to get serial working correctly. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm53573.dtsi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5be82d0475941dc96eeeee3c754baf48365f7bf5 Author: Rafał Miłecki Date: Wed Mar 15 18:03:27 2017 +0100 ARM: dts: BCM5301X: Specify serial console params in dtsi files So far every Northstar device we have seen was using the same serial console params (115200n8). It probably make the most sense to put it in some proper dtsi files instead of repeating over and over for every single device. As different boards may use different bootloaders it seems the safest idea is to use board specific dtsi files. Just in case some vendor decides to use different UART (parameters) this can be always easily overwritten. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm4708.dtsi | 8 ++++++++ arch/arm/boot/dts/bcm47081.dtsi | 8 ++++++++ arch/arm/boot/dts/bcm5301x.dtsi | 4 ---- arch/arm/boot/dts/bcm94708.dts | 8 -------- arch/arm/boot/dts/bcm94709.dts | 8 -------- arch/arm/boot/dts/bcm953012er.dts | 8 -------- arch/arm/boot/dts/bcm953012hr.dts | 5 ----- arch/arm/boot/dts/bcm953012k.dts | 4 ---- 8 files changed, 16 insertions(+), 37 deletions(-) commit 7a9b248446dfd7c2d65030159e5c152a911aaf42 Author: Tony Lindgren Date: Tue Mar 14 17:39:42 2017 -0700 ARM: dts: omap4-droid4: Configure EHCI so modems can be accessed Droid 4 has two modems, mdm6600 and w3glte. Both are on the HCI USB controller. Let's add a configuration for the HCI so the modems can be enabled. Note that the modems still need additional GPIO based configuration. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Tested-by: Sebastian Reichel [tony@atomide.com: left out url] Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 836a0b0bb96d7a743c570b89e6655c0217062a42 Author: Sebastian Reichel Date: Sun Mar 5 18:22:34 2017 +0100 ARM: dts: motorola-cpcap-mapphone: add LEDs Add LEDs. Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit d9bed1447988a10bff6101b95ab474ca06b6e33b Author: Tony Lindgren Date: Sun Mar 5 20:11:59 2017 -0800 ARM: dts: omap4-droid4: Add LCD The LCD panel on droid 4 is a command mode LCD. The binding follows the standard omapdrm binding and the changes needed for omapdrm command mode panels are posted separately. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Cc: Tomi Valkeinen Tested-By: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 60 ++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 50cdcc0b01e500eaef02d4298694548f25dd60cb Author: Tony Lindgren Date: Sun Mar 5 20:11:59 2017 -0800 ARM: dts: omap4-droid4: Add HDMI support We can get HDMI working as long as the 5V regulator is on. There is probably an encoder chip there too, but so far no idea what it might be. Let's keep the 5V HDMI regulator always enabled for now as otherwise we cannot detect the monitor properly. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Cc: Tomi Valkeinen Tested-By: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 65 ++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit fdec8edbbee5a9a85ac1aeae48c4d3ae43a6ad27 Author: Tony Lindgren Date: Sun Mar 5 20:11:58 2017 -0800 ARM: dts: omap4-droid4: Add tmp105 sensor for droid 4 Add tmp105 sensor for droid 4. This can be used with modprobe lm75.ko and running sensors from lm-sensors package. Note that the lm75.c driver does not yet support alert interrupt but droid 4 seems to be wired for it. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Tested-By: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 9946f937d482abeb697dde44a58a8d821f45df0c Author: Tony Lindgren Date: Sun Mar 5 20:11:58 2017 -0800 ARM: dts: omap4-droid4: Add GPIO poweroff Droid 4 has a GPIO line that we can use with CONFIG_POWER_RESET_GPIO. It is probably connected to the CPCAP PMIC, and seems to power down the whole device taking power consumption to zero based on what I measured. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Tested-By: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 771e4feb273a98aeccd3e0c3edd05ecde513d280 Author: Tony Lindgren Date: Sun Mar 5 20:11:58 2017 -0800 ARM: dts: omap4-droid4: Add LCD backlight The TI LMU driver has not yet been merged, but the device tree binding for TI LMU drivers has been acked already earlier by Rob Herring . So it should be safe to apply to cut down the number of pending patches. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Cc: Rob Herring Acked-by: Milo Kim Tested-By: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 94bbdd77247d8c16eed5f55dddcf1cbc38d06cc4 Author: Alexander Kochetkov Date: Tue Mar 21 18:13:47 2017 +0300 ARM: dts: rockchip: setup DMA-channels for mmc0 and emmc for rk3188 This commit enable DMA-based transfers for SD/eMMC card adapters and reduce number of interrupts produced by SD-card/eMMC-card adapters. Sometimes interrupts from SD-card/eMMC-card adapters running in PIO mode blocks execution of hrtimers and I2S DMA callbacks for a long periods (100 ms or more). Signed-off-by: Alexander Kochetkov [moved dma properties to rk3xxx.dtsi and added sdio dma] Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3xxx.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 273df9635385b2156851c7ee49f40658d7bcb29d Author: Robin Murphy Date: Thu Mar 16 17:00:19 2017 +0000 iommu/dma: Make PCI window reservation generic Now that we're applying the IOMMU API reserved regions to our IOVA domains, we shouldn't need to privately special-case PCI windows, or indeed anything else which isn't specific to our iommu-dma layer. However, since those aren't IOMMU-specific either, rather than start duplicating code into IOMMU drivers let's transform the existing function into an iommu_get_resv_regions() helper that they can share. Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu-v3.c | 2 ++ drivers/iommu/arm-smmu.c | 2 ++ drivers/iommu/dma-iommu.c | 38 ++++++++++++++++++++++++++++---------- include/linux/dma-iommu.h | 5 +++++ 4 files changed, 37 insertions(+), 10 deletions(-) commit 7c1b058c8b5a310f2f0439aff14e454aa9afe502 Author: Robin Murphy Date: Thu Mar 16 17:00:18 2017 +0000 iommu/dma: Handle IOMMU API reserved regions Now that it's simple to discover the necessary reservations for a given device/IOMMU combination, let's wire up the appropriate handling. Basic reserved regions and direct-mapped regions we simply have to carve out of IOVA space (the IOMMU core having already mapped the latter before attaching the device). For hardware MSI regions, we also pre-populate the cookie with matching msi_pages. That way, irqchip drivers which normally assume MSIs to require mapping at the IOMMU can keep working without having to special-case their iommu_dma_map_msi_msg() hook, or indeed be aware at all of quirks preventing the IOMMU from translating certain addresses. Reviewed-by: Eric Auger Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 76 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 69 insertions(+), 7 deletions(-) commit 938f1bbe35e3a7cb07e1fa7c512e2ef8bb866bdf Author: Robin Murphy Date: Thu Mar 16 17:00:17 2017 +0000 iommu/dma: Don't reserve PCI I/O windows Even if a host controller's CPU-side MMIO windows into PCI I/O space do happen to leak into PCI memory space such that it might treat them as peer addresses, trying to reserve the corresponding I/O space addresses doesn't do anything to help solve that problem. Stop doing a silly thing. Fixes: fade1ec055dc ("iommu/dma: Avoid PCI host bridge windows") Reviewed-by: Eric Auger Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6e4c8480bd2eb95309ad3c875e11d2cad98f9188 Author: Anton Sviridenko Date: Thu Mar 9 10:46:18 2017 -0300 [media] solo6x10: release vb2 buffers in solo_stop_streaming() Fixes warning that appears in dmesg after closing V4L2 userspace application that plays video from the display device (first device from V4L2 device nodes provided by solo, usually /dev/video0 when no other V4L2 devices are present). Encoder device nodes are not affected. Can be reproduced by starting and closing ffplay -f video4linux2 /dev/video0 [ 8130.281251] ------------[ cut here ]------------ [ 8130.281256] WARNING: CPU: 1 PID: 20414 at drivers/media/v4l2-core/videobuf2-core.c:1651 __vb2_queue_cancel+0x14b/0x230 [ 8130.281257] Modules linked in: ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat solo6x10 x86_pkg_temp_thermal vboxpci(O) vboxnetadp(O) vboxnetflt(O) vboxdrv(O) [ 8130.281264] CPU: 1 PID: 20414 Comm: ffplay Tainted: G O 4.10.0-gentoo #1 [ 8130.281264] Hardware name: ASUS All Series/B85M-E, BIOS 2301 03/30/2015 [ 8130.281265] Call Trace: [ 8130.281267] dump_stack+0x4f/0x72 [ 8130.281270] __warn+0xc7/0xf0 [ 8130.281271] warn_slowpath_null+0x18/0x20 [ 8130.281272] __vb2_queue_cancel+0x14b/0x230 [ 8130.281273] vb2_core_streamoff+0x23/0x90 [ 8130.281275] vb2_streamoff+0x24/0x50 [ 8130.281276] vb2_ioctl_streamoff+0x3d/0x50 [ 8130.281278] v4l_streamoff+0x15/0x20 [ 8130.281279] __video_do_ioctl+0x25e/0x2f0 [ 8130.281280] video_usercopy+0x279/0x520 [ 8130.281282] ? v4l_enum_fmt+0x1330/0x1330 [ 8130.281285] ? unmap_region+0xdf/0x110 [ 8130.281285] video_ioctl2+0x10/0x20 [ 8130.281286] v4l2_ioctl+0xce/0xe0 [ 8130.281289] do_vfs_ioctl+0x8b/0x5b0 [ 8130.281290] ? __fget+0x72/0xa0 [ 8130.281291] SyS_ioctl+0x74/0x80 [ 8130.281294] entry_SYSCALL_64_fastpath+0x13/0x94 [ 8130.281295] RIP: 0033:0x7ff86fee6b27 [ 8130.281296] RSP: 002b:00007ffe467f6a08 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 8130.281297] RAX: ffffffffffffffda RBX: 00000000d1a4d788 RCX: 00007ff86fee6b27 [ 8130.281297] RDX: 00007ffe467f6a14 RSI: 0000000040045613 RDI: 0000000000000006 [ 8130.281298] RBP: 000000000373f8d0 R08: 00000000ffffffff R09: 00007ff860001140 [ 8130.281298] R10: 0000000000000243 R11: 0000000000000246 R12: 0000000000000000 [ 8130.281299] R13: 00000000000000a0 R14: 00007ffe467f6530 R15: 0000000001f32228 [ 8130.281300] ---[ end trace 00695dc96be646e7 ]--- Signed-off-by: Anton Sviridenko Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/solo6x10/solo6x10-v4l2.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 31a32d7463d2a9f9aebdbbcfd2119626de50fa98 Author: Bartosz Golaszewski Date: Tue Feb 28 13:08:54 2017 -0300 [media] media: dt-bindings: vpif: extend the example with an output port This makes the example more or less correspond with the da850-evm hardware setup. Signed-off-by: Bartosz Golaszewski Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/ti,da850-vpif.txt | 40 +++++++++++++++++----- 1 file changed, 32 insertions(+), 8 deletions(-) commit 47cd34488f205307e9128aff583e9a9922bca591 Author: Bartosz Golaszewski Date: Tue Feb 28 13:08:53 2017 -0300 [media] media: dt-bindings: vpif: fix whitespace errors The examples have been copied from the DT with whitespace errors. Fix them. Signed-off-by: Bartosz Golaszewski Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/ti,da850-vpif.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a16cb91ad9c4bb959e7d1be69d83d8c24a88e9f2 Author: Bartosz Golaszewski Date: Thu Feb 16 16:08:01 2017 -0200 [media] media: vpif: use a configurable i2c_adapter_id for vpif display The vpif display driver uses a static i2c adapter ID of 1 but on the da850-evm board in DT boot mode the i2c adapter ID is actually 0. Make the adapter ID configurable like it already is for vpif capture. Signed-off-by: Bartosz Golaszewski Acked-by: Kevin Hilman Acked-by: Lad, Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab arch/arm/mach-davinci/board-da850-evm.c | 1 + drivers/media/platform/davinci/vpif_display.c | 2 +- include/media/davinci/vpif_types.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 28af1325e11d46a759ca8443df5492916328819b Author: Javier Martinez Canillas Date: Wed Feb 22 13:11:27 2017 -0300 [media] soc-camera: ov5642: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Acked-by: Guennadi Liakhovetski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/ov5642.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 21aff52ab2c831c2f07d48e2fa8d4bab26a66992 Author: Thierry Reding Date: Mon Mar 20 20:11:28 2017 +0100 iommu: Add dummy implementations for !IOMMU_IOVA Currently, building code which uses the API guarded by the IOMMU_IOVA will fail to link if IOMMU_IOVA is not enabled. Often this code will be using the API provided by the IOMMU_API Kconfig symbol, but support for this can be optional, with code falling back to contiguous memory. This commit implements dummy functions for the IOVA API so that it can be compiled out. With both IOMMU_API and IOMMU_IOVA optional, code can now be built with or without support for IOMMU without having to resort to #ifdefs in the user code. Signed-off-by: Thierry Reding Signed-off-by: Joerg Roedel include/linux/iova.h | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) commit 82df0a4368c62e68d6622e19a8f4dca2c7eccd3a Author: Thierry Reding Date: Mon Mar 20 20:11:27 2017 +0100 MAINTAINERS: Add related headers to IOMMU section The linux/iommu.h and linux/iova.h headers belong to the IOMMU subsystem but scripts/get_maintainers.pl currently fails to assign them because they aren't listed in MAINTAINERS. Signed-off-by: Thierry Reding Signed-off-by: Joerg Roedel MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 61012985eb132a2fa5e4a3eddbc33528334fa377 Author: Andy Shevchenko Date: Thu Mar 16 16:23:55 2017 +0200 iommu/vt-d: Use lo_hi_readq() / lo_hi_writeq() There is already helper functions to do 64-bit I/O on 32-bit machines or buses, thus we don't need to reinvent the wheel. Signed-off-by: Andy Shevchenko Signed-off-by: Joerg Roedel include/linux/intel-iommu.h | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit f9808079aa7626d71215a71661dbed5c4ff101d2 Author: Andy Shevchenko Date: Thu Mar 16 16:23:54 2017 +0200 iommu/dmar: Remove redundant ' != 0' when check return code Usual pattern when we check for return code, which might be negative errno, is either (ret) or (!ret). Remove extra ' != 0' from condition. Signed-off-by: Andy Shevchenko Signed-off-by: Joerg Roedel drivers/iommu/dmar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f6db6591a2decad5f223a7dcfc01d2a3c15e187 Author: Andy Shevchenko Date: Thu Mar 16 16:23:53 2017 +0200 iommu/dmar: Remove redundant assignment of ret There is no need to assign ret to 0 in some cases. Moreover it might shadow some errors in the future. Remove such assignments. Signed-off-by: Andy Shevchenko Signed-off-by: Joerg Roedel drivers/iommu/dmar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4a8ed2b819402ae450e3c53a1fe5eec59e3f423e Author: Andy Shevchenko Date: Thu Mar 16 16:23:52 2017 +0200 iommu/dmar: Return directly from a loop in dmar_dev_scope_status() There is no need to have a temporary variable. Signed-off-by: Andy Shevchenko Signed-off-by: Joerg Roedel drivers/iommu/dmar.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 8326c5d2057a06adb082f3547c5d1f75cfd33e57 Author: Andy Shevchenko Date: Thu Mar 16 16:23:51 2017 +0200 iommu/dmar: Rectify return code handling in detect_intel_iommu() There is inconsistency in return codes across the functions called from detect_intel_iommu(). Make it consistent and propagate return code to the caller. Signed-off-by: Andy Shevchenko Signed-off-by: Joerg Roedel drivers/iommu/dmar.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 9e00695364fb74f3aa9912a6a686db8446dcd695 Author: Frank Schaefer Date: Sun Feb 19 15:29:17 2017 -0300 [media] em28xx: reduce stack usage in sensor probing functions It's no longer necessary to keep the i2c_client in the device struct unmodified until a sensor is found, so reduce stack usage in em28xx_probe_sensor_micron() and em28xx_probe_sensor_omnivision() by using a pointer to the client instead of a local copy. Reported-by: Arnd Bergmann Signed-off-by: Frank Schäfer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-camera.c | 42 +++++++++++++++----------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit 3b8b2e1cea78652ecf7b976a68f87220a3f27b28 Author: Sakari Ailus Date: Thu Mar 9 06:40:18 2017 -0300 [media] docs-rst: media: Push CEC documentation under CEC section The CEC documentation added two sections on the main media kAPI level. There should be only one. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/cec-core.rst | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit c7423b72639e51ab83ed0dd268b65b6fdde07496 Author: Fengguang Wu Date: Wed Mar 8 17:57:12 2017 -0300 [media] vcodec: mediatek: fix platform_no_drv_owner.cocci warnings drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:1296:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Rick Chang Signed-off-by: Fengguang Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 1 - 1 file changed, 1 deletion(-) commit 73a0159920359d84e2f93d7e93f3e86900365ba4 Author: Laurent Pinchart Date: Wed Mar 8 12:33:27 2017 -0300 [media] v4l: soc-camera: Remove videobuf1 support All remaining soc-camera drivers use videobuf2, drop support for videobuf1. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil [hans.verkuil@cisco.com: also drop 'select VIDEOBUF_GEN' from Kconfig] Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/soc_camera/Kconfig | 1 - drivers/media/platform/soc_camera/soc_camera.c | 103 +++++-------------------- include/media/soc_camera.h | 14 +--- 3 files changed, 20 insertions(+), 98 deletions(-) commit e8a2a41ee290c35e118f7a372454401e5a0f8b51 Author: Wu-Cheng Li Date: Wed Mar 8 00:40:58 2017 -0300 [media] mtk-vcodec: check the vp9 decoder buffer index from VPU VPU firmware has a bug and may return invalid buffer index for some vp9 videos. Check the buffer indexes before accessing the buffer. Signed-off-by: Wu-Cheng Li Acked-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 33 +++++++++++++++++----- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h | 2 ++ .../media/platform/mtk-vcodec/vdec/vdec_vp9_if.c | 26 +++++++++++++++++ drivers/media/platform/mtk-vcodec/vdec_drv_if.h | 2 ++ 4 files changed, 56 insertions(+), 7 deletions(-) commit 586fd401065a789405a7baca699aadcee4c71336 Author: Randy Dunlap Date: Mon Mar 6 15:32:22 2017 -0300 [media] media/platform/mtk-jpeg: add slab.h to fix build errors Include to fix these build errors: ../drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c: In function 'mtk_jpeg_open': ../drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:1017:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration] ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); ../drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:1017:6: warning: assignment makes pointer from integer without a cast [enabled by default] ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); ../drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:1047:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration] kfree(ctx); Signed-off-by: Randy Dunlap Cc: Ming Hsiu Tsai Cc: Rick Chang Cc: Bin Liu Cc: Mauro Carvalho Chehab Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 1 + 1 file changed, 1 insertion(+) commit 4e42e5f2f513ba0f6987a3d28643eff5773564ea Author: Javier Martinez Canillas Date: Wed Feb 22 13:11:29 2017 -0300 [media] si4713: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/si4713/si4713.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 3876420a88807e7d21057920d571ca9daf5fa615 Author: Wei Yongjun Date: Tue Feb 7 13:16:20 2017 -0200 [media] mtk-vcodec: remove redundant return value check of platform_get_resource() Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun Acked-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 5 ----- 1 file changed, 5 deletions(-) commit db0f4691d9749d5dd758b8636290cec8fd88aa26 Author: Sebastian Reichel Date: Tue Feb 14 20:38:49 2017 -0200 [media] v4l: Allow calling v4l2_device_register_subdev_nodes() multiple times Previously multiple calls to v4l2_device_register_subdev_nodes() ended up corrupting memory and leaking some, too. This patch changes the behaviour so that sub-devices the device nodes of which are already registered are ignored. Signed-off-by: Sebastian Reichel Signed-off-by: Ivaylo Dimitrov Signed-off-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-device.c | 3 +++ 1 file changed, 3 insertions(+) commit 974f4a385cbf7fe056b51b39f7ef8cbf9528a57c Author: Sakari Ailus Date: Tue Feb 21 12:43:09 2017 -0300 [media] docs-rst: media: Explicitly refer to sub-sampling in scaling documentation Skipping, which is sometimes used in terminology related to sensors when referring to sub-sampling is replaced by more suitable sub-sampling instead. Skipping is retained in a note in parentheses. Suggested-by: Russell King Acked-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/mediactl/media-types.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5ace69341c97db4f94e32627dc8b741c35e46968 Author: Javier Martinez Canillas Date: Mon Feb 20 17:16:16 2017 -0300 [media] et8ek8: Export OF device ID as module aliases The I2C core always reports a MODALIAS of the form i2c: even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. Before this patch: $ modinfo drivers/media/i2c/et8ek8/et8ek8.ko | grep alias alias: i2c:et8ek8 After this patch: $ modinfo drivers/media/i2c/et8ek8/et8ek8.ko | grep alias alias: i2c:et8ek8 alias: of:N*T*Ctoshiba,et8ek8C* alias: of:N*T*Ctoshiba,et8ek8 Signed-off-by: Javier Martinez Canillas Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/et8ek8/et8ek8_driver.c | 1 + 1 file changed, 1 insertion(+) commit a8e97e531afaaef24a4985a822a041fcc099788d Author: Hans Verkuil Date: Tue Feb 28 10:20:50 2017 -0300 [media] cec: don't Feature Abort msgs from Unregistered Feature Abort shouldn't be sent in reply to messages from Unregistered, since that would make it a broadcast message. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 3 +++ 1 file changed, 3 insertions(+) commit 79cabaa320d7ba07a233afb944dd151d26b7ddbd Author: Hans Verkuil Date: Mon Feb 20 17:19:13 2017 -0300 [media] cec: log reason for returning -EINVAL When validating the struct cec_s_log_addrs input a debug message is printed for all except two of the 'return -EINVAL' paths. Also log the reason for the missing two paths. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 25c2107896c5094318f04af8f975266e57d15528 Author: Hans Verkuil Date: Mon Feb 27 10:54:09 2017 -0300 [media] cec: improve cec_transmit_msg_fh logging Several error paths didn't log why an error was returned. Add this. Also handle the corner case of "adapter is unconfigured AND the message is from Unregistered to TV AND reply is non-zero" separately and return EINVAL in that case, since it really is an invalid value and not an unconfigured CEC device. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 17 +++++++++++++---- drivers/media/cec/cec-api.c | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) commit 5a137df1d6570de438ce12f33d6b4308b5e965fb Author: Hans Verkuil Date: Mon Feb 27 10:54:09 2017 -0300 [media] cec: use __func__ in log messages The hardcoded function name is actually wrong. Use __func__ instead. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit fabd5bd68f3248761d754ee242a75cd09e6a02f8 Author: Hans Verkuil Date: Mon Feb 27 10:53:39 2017 -0300 [media] cec: document the special unconfigured case Even when the CEC device is unconfigured due to an invalid physical address it is still allowed to send a message from 0xf (Unregistered) to 0 (TV). This is a corner case explicitly allowed by the CEC specification. Document this corner case. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/cec/cec-ioc-receive.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 491314b8d41bb680f6ddb2632c1a36dd3959d5b3 Author: Hans Verkuil Date: Mon Feb 20 17:21:19 2017 -0300 [media] cec: document the error codes Document all the various error codes returned by the CEC ioctls. These were never documented, instead the documentation relied on a reference to the generic error codes, but that's not sufficient. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/uapi/cec/cec-ioc-adap-g-log-addrs.rst | 13 ++++++++ .../media/uapi/cec/cec-ioc-adap-g-phys-addr.rst | 13 ++++++++ Documentation/media/uapi/cec/cec-ioc-dqevent.rst | 11 +++++++ Documentation/media/uapi/cec/cec-ioc-g-mode.rst | 12 +++++++ Documentation/media/uapi/cec/cec-ioc-receive.rst | 37 ++++++++++++++++++++++ 5 files changed, 86 insertions(+) commit 059d1460cacb7e1ee499a02d92ac2b0b84d310fc Author: Hans Verkuil Date: Mon Feb 27 09:18:35 2017 -0300 [media] cec: return -EPERM when no LAs are configured The CEC_TRANSMIT ioctl now returns -EPERM if an attempt is made to transmit a message for an unconfigured adapter (i.e. userspace never called CEC_ADAP_S_LOG_ADDRS). This differentiates this case from when LAs are configured, but no physical address is set. In that case -ENONET is returned. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 533a3f7bc7919f8f5462d6b921532cf1d1ccf6cd Author: Hans Verkuil Date: Fri Feb 10 13:02:31 2017 -0200 [media] cec: allow specific messages even when unconfigured The CEC specifications explicitly allows you to send poll messages and Image/Text View On messages to a TV, even when unconfigured (i.e. there is no hotplug signal detected). Some TVs will pull the HPD low when switching to another input, or when going into standby, but CEC should still be allowed to wake up such a display. Add support for sending messages with initiator 0xf (Unregistered) and destination 0 (TV) when no physical address is present. This also required another change: the CEC adapter has to stay enabled as long as 1) the CEC device is configured or 2) at least one filehandle is open for the CEC device. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 27 ++++++++++++++++++++------- drivers/media/cec/cec-api.c | 19 +++++++++++++++++-- 2 files changed, 37 insertions(+), 9 deletions(-) commit b39f93efc698fadc94a5fa273798f9e317089c72 Author: Hans Verkuil Date: Fri Feb 10 13:02:31 2017 -0200 [media] cec: improve flushing queue When the adapter is unloaded or unconfigured, then all transmits and pending waits should be flushed. Move this code into its own function and improve the code that cancels delayed work to avoid having to unlock adap->lock. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 66 +++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 31 deletions(-) commit bcf54d5385abaea9c8026aae6f4eeb348671a52d Author: Rob Herring Date: Mon Jan 16 14:28:39 2017 -0600 of: fix of_device_get_modalias returned length when truncating buffers If the length of the modalias is greater than the buffer size, then the modalias is truncated. However the untruncated length is returned which will cause an error. Fix this to return the truncated length. If an error in the case was desired, then then we should just return -ENOMEM. The reality is no device will ever have 4KB of compatible strings to hit this case. Signed-off-by: Rob Herring Cc: Frank Rowand drivers/of/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b94dffd65c5cf09d8d3420581bd099dc61e7c3f2 Author: Hans Verkuil Date: Mon Feb 27 10:14:55 2017 -0300 [media] cec: documentation fixes Fixed a few spelling mistakes, but mostly incorrect rst syntax that caused wrong references or font style. No actual documentation changes, just fixes. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/cec/cec-func-ioctl.rst | 2 +- Documentation/media/uapi/cec/cec-func-open.rst | 2 +- Documentation/media/uapi/cec/cec-func-poll.rst | 4 ++-- Documentation/media/uapi/cec/cec-ioc-dqevent.rst | 2 +- Documentation/media/uapi/cec/cec-ioc-receive.rst | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) commit 5086924ad4f219ad6498b2cb217a98637b0b55b9 Author: Hans Verkuil Date: Mon Mar 6 11:23:15 2017 -0300 [media] vivid: fix try_fmt behavior vivid_try_fmt_vid_cap() called tpg_calc_line_width to calculate the sizeimage value, but that tpg function uses the current format, not the proposed (tried) format. Rewrote this code to calculate this correctly. The vivid_try_fmt_vid_out() code was completely wrong w.r.t. sizeimage, and neither did it take the vdownsampling[] factors into account. Signed-off-by: Hans Verkuil Tested-by: Vincent Abriou Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-vid-cap.c | 13 ++++++++++--- drivers/media/platform/vivid/vivid-vid-out.c | 22 ++++++++++++++-------- 2 files changed, 24 insertions(+), 11 deletions(-) commit 733e009c37b6caa219d7057838582d1259c4554f Author: Dmitry Torokhov Date: Wed Mar 1 20:50:03 2017 -0300 [media] Staging: media: radio-bcm2048: remove incorrect __exit markups Even if bus is not hot-pluggable, devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes. Signed-off-by: Dmitry Torokhov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/bcm2048/radio-bcm2048.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 78cea55c60fbfbf80f826b8574851de59a661028 Author: Dmitry Torokhov Date: Wed Mar 1 20:41:23 2017 -0300 [media] ad5820: remove incorrect __exit markups Even if bus is not hot-pluggable, devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes. Signed-off-by: Dmitry Torokhov Acked-by: Pavel Machek Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ad5820.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 79e92dc0ecc64dd221383960a8bc3399c6723d03 Author: Hans Verkuil Date: Wed Mar 1 12:31:20 2017 -0300 [media] videodev2.h: map xvYCC601/709 to limited range quantization The xvYCC601/709 encodings were mapped by default to full range quantization. This is actually wrong since these encodings use limited range quantization, but accept values outside of the limited range. This makes sense since for values within the limited range it behaves exactly the same as BT.601 or Rec. 709. The only difference is that with the xvYCC encodings the values outside of the limited range also produce value colors. Talking to people who know a lot more about this than I do made me realize that mapping xvYCC to full range quantization was wrong, so this patch corrects this and also improves the documentation. These formats are very rare, and since the formula for decoding these Y'CbCr encodings is actually fixed and independent of the quantization field value it is safe to make this change. The main advantage is that keeps the V4L2 specification in sync with the corresponding colorspace, HDMI and CEA861 standards when it comes to these xvYCC formats. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-007.rst | 13 +++++++++---- include/uapi/linux/videodev2.h | 3 +-- 2 files changed, 10 insertions(+), 6 deletions(-) commit 27430d19a91615245babaa9b216d0807636903a0 Author: Arnd Bergmann Date: Tue Feb 28 18:14:37 2017 -0300 [media] tw5864: use dev_warn instead of WARN to shut up warning tw5864_frameinterval_get() only initializes its output when it successfully identifies the video standard in tw5864_input. We get a warning here because gcc can't always track the state if initialized warnings across a WARN() macro, and thinks it might get used incorrectly in tw5864_s_parm: media/pci/tw5864/tw5864-video.c: In function 'tw5864_s_parm': media/pci/tw5864/tw5864-video.c:816:38: error: 'time_base.numerator' may be used uninitialized in this function [-Werror=maybe-uninitialized] media/pci/tw5864/tw5864-video.c:819:31: error: 'time_base.denominator' may be used uninitialized in this function [-Werror=maybe-uninitialized] Using dev_warn() instead of WARN() avoids the __branch_check__() in unlikely and lets the compiler see that the initialization is correct. Signed-off-by: Arnd Bergmann Acked-by: Andrey Utkin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw5864/tw5864-video.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c3d173a396c2700cb1ba02744fdc112f461f8177 Author: Gustavo Padovan Date: Wed Feb 15 15:55:33 2017 -0200 [media] go7007: improve subscribe event handling We already check for the V4L2_EVENT_CTRL inside v4l2_ctrl_subscribe_event() so just move this function to the default: branch of the switch and let it does the job for us. Signed-off-by: Gustavo Padovan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/go7007/go7007-v4l2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cc0a5a867a6934e1a344a2e6b94dbcec7b9b457c Author: Gustavo Padovan Date: Wed Feb 15 15:55:32 2017 -0200 [media] vivid: improve subscribe event handling We already check for the V4L2_EVENT_CTRL inside v4l2_ctrl_subscribe_event() so just move this fuction to the default: branch of the switch and let it does the job for us. Signed-off-by: Gustavo Padovan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-vid-out.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit aac5987a54a25d243d3045d4ae33756a56498a5e Author: Gustavo Padovan Date: Wed Feb 15 15:55:31 2017 -0200 [media] tw5864: improve subscribe event handling We already check for the V4L2_EVENT_CTRL inside v4l2_ctrl_subscribe_event() so just move this function to the default: branch of the switch and let it does the job for us. Signed-off-by: Gustavo Padovan Acked-by: Andrey Utkin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw5864/tw5864-video.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f4fde9a742c2683c4362207f59e33f1137f33f2b Author: Gustavo Padovan Date: Wed Feb 15 15:55:30 2017 -0200 [media] solo6x10: improve subscribe event handling We already check for the V4L2_EVENT_CTRL inside v4l2_ctrl_subscribe_event() so just move the function to the default: branch of the switch and let it does the job for us. Signed-off-by: Gustavo Padovan Acked-by: Andrey Utkin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 88b172f9f9d42bd83b6e22473321bd2fd4052c47 Author: Gustavo Padovan Date: Wed Feb 15 15:55:29 2017 -0200 [media] ivtv: improve subscribe_event handling Simplify logic and call v4l2_ctrl_subscribe_event() directly instead of copying its content over to ivtv_subscribe_event(). Signed-off-by: Gustavo Padovan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ivtv/ivtv-ioctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 938e20adfd2ccfac0f3858ee898f3a0e2641d457 Author: Gustavo Padovan Date: Wed Feb 15 15:55:28 2017 -0200 [media] vb2: only check ret if we assigned it Move the ret check to the right level under if (pb). It is not used by the code before that point if pb is NULL. Signed-off-by: Gustavo Padovan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-core.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit d5798ee3422b9a763fda6294f8589c5f9e8ee797 Author: Mauro Carvalho Chehab Date: Thu Mar 9 17:16:41 2017 -0300 [media] coda: fix warnings when compiling with 64 bits drivers/media/platform/coda/coda-common.c: In function ‘coda_alloc_aux_buf’: ./include/linux/kern_levels.h:4:18: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ ./include/media/v4l2-common.h:69:9: note: in definition of macro ‘v4l2_printk’ printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ ./include/linux/kern_levels.h:10:18: note: in expansion of macro ‘KERN_SOH’ #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~~~~~ ./include/media/v4l2-common.h:72:14: note: in expansion of macro ‘KERN_ERR’ v4l2_printk(KERN_ERR, dev, fmt , ## arg) ^~~~~~~~ drivers/media/platform/coda/coda-common.c:1341:3: note: in expansion of macro ‘v4l2_err’ v4l2_err(&dev->v4l2_dev, ^~~~~~~~ Hans wrote a similar patch, but it was fold with a Kconfig change. So, I opted to keep my version. Signed-off-by Hans Verkuil Acked-by Philipp Zabel Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1b5e3db0b985ee76bdb023fc2dd637cc0d8aed2 Author: Mauro Carvalho Chehab Date: Thu Mar 9 16:55:48 2017 -0300 [media] platform: compile VIDEO_CODA with COMPILE_TEST Currently, IMX_VDOA and VIDEO_CODA only builds on ARCH_MXC. That prevented me to build-test the driver, causing a bad patch to be applied, and to see other warnings on this driver. Hans wrote a similar patch, but his version was fold with a warning fixup hunk. So, I opted to keep my version. Reported-by: Russell King Signed-off-by: Mauro Carvalho Chehab Signed-off-by Hans Verkuil Acked-by Philipp Zabel drivers/media/platform/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 155ee528fbfdb422a718d2cb2e320cde946e5ce6 Author: Mauro Carvalho Chehab Date: Thu Mar 9 17:06:49 2017 -0300 [media] coda: get rid of unused var Some vars are not used, as warned by gcc: drivers/media/platform/coda/coda-common.c: In function 'coda_buf_is_end_of_stream': drivers/media/platform/coda/coda-common.c:816:20: warning: variable 'src_vq' set but not used [-Wunused-but-set-variable] struct vb2_queue *src_vq; ^~~~~~ Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1e9b71d53ddc3b8df81ef6be052e31b70442a47f Author: Philipp Zabel Date: Wed Mar 8 09:30:50 2017 -0300 [media] coda: restore original firmware locations Recently, an unfinished patch was merged that added a third entry to the beginning of the array of firmware locations without changing the code to also look at the third element, thus pushing an old firmware location off the list. Fixes: 8af7779f3cbc ("[media] coda: add Freescale firmware compatibility location") Signed-off-by: Philipp Zabel Acked-by: Baruch Siach Reviewed-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 691222713d43466c037b45993cd7ce9589c04536 Author: Philipp Zabel Date: Fri Mar 3 09:12:50 2017 -0300 [media] coda: disable reordering for baseline profile h.264 streams With reordering enabled, the sequence init in CODA960 firmware requests an unreasonable number of internal frames for some baseline profile streams. Disabling the reordering feature manually if baseline streams are detected fixes this problem. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 44 ++++++++++++++++++++- drivers/media/platform/coda/coda-common.c | 12 ++++++ drivers/media/platform/coda/coda-h264.c | 63 +++++++++++++++++++++++++++++++ drivers/media/platform/coda/coda.h | 5 +++ 4 files changed, 122 insertions(+), 2 deletions(-) commit 0eef89403ece8879c5159a5b70e95b3a853921f2 Author: Philipp Zabel Date: Fri Mar 3 09:12:49 2017 -0300 [media] coda: pad first h.264 buffer to 512 bytes The bitstream reader needs 512 bytes ready to read to examine the headers in the first frame. If that frame is too small, prepend it with a filler NAL. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 28 ++++++++++++++++++++++++++-- drivers/media/platform/coda/coda-h264.c | 24 ++++++++++++++++++------ drivers/media/platform/coda/coda.h | 1 + 3 files changed, 45 insertions(+), 8 deletions(-) commit 331e7860f3da430500559c665bd0ea63260fc9dc Author: Philipp Zabel Date: Fri Mar 3 09:12:48 2017 -0300 [media] coda: keep queued buffers on a temporary list during start_streaming Keeping buffers filled into the bitstream on a temporary list instead of immediately calling vb2_buffer_done on each of them immediately allows start_streaming to correctly decide whether they should be marked as done or requeued if an error occurs after the bitstream has been filled. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 28 ++++++++++++++++++++++------ drivers/media/platform/coda/coda-common.c | 29 ++++++++++++++++++++++------- drivers/media/platform/coda/coda.h | 2 +- 3 files changed, 45 insertions(+), 14 deletions(-) commit 888708b1decb7d12e09095cd67e5b6442401cd51 Author: Michael Tretter Date: Fri Mar 3 09:12:47 2017 -0300 [media] coda: Use && instead of & for non-bitfield conditions streamon and streamoff are used as boolean values, not as bitfields. Therefore, the logical && should be used to combine them. Signed-off-by: Michael Tretter Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89ed025d5c53f4ca0193ed71bfaf007259be2a8f Author: Philipp Zabel Date: Thu Mar 2 07:19:52 2017 -0300 [media] coda: disable BWB for all codecs on CODA 960 I don't know what the BWB unit is, I guess W is for write and one of the Bs is for burst. All I know is that there repeatedly have been issues with it hanging on certain streams (ENGR00223231, ENGR00293425), with various firmware versions, sometimes blocking something related to the GDI bus or the GDI AXI adapter. There are some error cases that we don't know how to recover from without a reboot. Apparently this unit can be disabled by setting bit 12 in the FRAME_MEM_CTRL mailbox register to zero, so do that to avoid crashes. Side effects are reduced burst lengths when writing out decoded frames to memory, so there is an "enable_bwb" module parameter to turn it back on. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 7 ++++++- drivers/media/platform/coda/coda_regs.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) commit 59195ceb2d3d1ef82589159be3652d11a902a215 Author: Philipp Zabel Date: Thu Mar 2 06:51:44 2017 -0300 [media] coda: implement encoder stop command There is no need to call v4l2_m2m_try_schedule to kick off draining the bitstream buffer for the encoder, but we have to wake up the destination queue in case there are no new OUTPUT buffers to be encoded and userspace is already polling for new CAPTURE buffers. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 47 +++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit fbd4676cc2930ba40d507eaadf3ff06d3eba7e6a Author: Philipp Zabel Date: Mon Feb 13 07:24:36 2017 -0200 [media] tc358743: put lanes in STOP state before starting streaming Without calling tc358743_set_csi after stopping streaming (or calling tc358743_s_dv_timings or tc358743_set_fmt from userspace after stopping the stream), the i.MX6 MIPI CSI2 input fails waiting for lanes to enter STOP state when streaming is started again. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 4 ++++ 1 file changed, 4 insertions(+) commit f0a18a00f0ed9492df54c02ffcdbcfb0218beb54 Author: Linus Walleij Date: Mon Mar 13 00:18:41 2017 +0100 ARM: gemini: select the right GPIO block We want to select the GPIO_FTGPIO010 symbol for the generic Faraday FTGPIO010 driver, not the old driver. Cc: Jonas Jensen Signed-off-by: Linus Walleij arch/arm/mach-gemini/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 552c804afe9b7d843f5ffae165ca5543f89b5293 Author: Linus Walleij Date: Mon Mar 13 00:20:45 2017 +0100 ARM: dts: augment Gemini GPIO nodes The binding should state "cortina,gemini-gpio", "faraday,ftgpio010" stating the full name of the IP part. Cc: Jonas Jensen Signed-off-by: Linus Walleij arch/arm/boot/dts/gemini.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 04dc7f62037b0d3aead0dc62231efad89affa9f3 Author: Heiko Stuebner Date: Fri Mar 17 09:38:06 2017 +0100 arm64: dts: rockchip: add rk3399 dw-mmc resets dw-mmc got its reset-properties specified, so add the softresets for it on the rk3399. Signed-off-by: Heiko Stuebner Tested-by: Shawn Lin Reviewed-by: Shawn Lin arch/arm64/boot/dts/rockchip/rk3399.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit d0302e06798f553992e2879f3eeba4cdff64595e Author: Heiko Stuebner Date: Fri Mar 17 08:11:01 2017 +0100 arm64: dts: rockchip: add rk3368 dw-mmc resets dw-mmc got its reset-properties specified, so add the softresets for it on the rk3368. Signed-off-by: Heiko Stuebner Reviewed-by: Shawn Lin arch/arm64/boot/dts/rockchip/rk3368.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit ec9b506fe37f8820c6fb6ce8cdd1d499aab9b3e0 Author: Jianqun Xu Date: Fri Mar 17 11:32:44 2017 +0800 arm64: dts: rockchip: disable mailbox of RK3368 SoCs per default Default to disable mailbox in rk3368 core dts file. Signed-off-by: Jianqun Xu Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3368.dtsi | 1 + 1 file changed, 1 insertion(+) commit f7d89dfe1e31b315efb6bb43bdb7a9e4063154b7 Author: Jianqun Xu Date: Fri Mar 17 11:32:43 2017 +0800 arm64: dts: rockchip: add i2s nodes support for RK3368 SoCs I2S of RK3368 SoCs keep same as RK3066 SoCs found on Rockchip, add nodes to support them. Signed-off-by: Jianqun Xu Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3368.dtsi | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 4b4c0db538fa6e3f31bc40ddc17c1d5facb49d36 Author: Huibin Hong Date: Fri Mar 3 17:49:09 2017 +0800 arm64: dts: rockchip: add dmac nodes for rk3368 SoCs Add dmac bus and dmac peri dts nodes for peripherals, such as I2S, SPI, UART and so on. Signed-off-by: Huibin Hong Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3368.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 531b3c49b384c29baec7b7b271a7739a23858e3a Author: Heiko Stuebner Date: Tue Feb 16 08:55:41 2016 +0100 arm64: dts: rockchip: remove wrongly added idle states on rk3368 As reported by Lorenzo, the residency/latency values defined in the idle-state for rk3368 "make no sense". When introducing them I simply took the idle-state node from the vendor kernel in error as I didn't look up if these values were sane in the first place. Talking to people and determining why they were used in this way showed that it was meant to make sure the cpu_suspend callback got initialized which at the 3.10 time was somehow required even for wfi-based idle handling. Of course the generic arch_cpu_idle() now does wfi-based idle-handling already and the rk3368 does not implement any other idle states than the default WFI, so these wrong idle-states should go away. Reported-by: Lorenzo Pieralisi Signed-off-by: Heiko Stuebner Acked-by: Lorenzo Pieralisi arch/arm64/boot/dts/rockchip/rk3368.dtsi | 20 -------------------- 1 file changed, 20 deletions(-) commit c831c583f8d93185928096b6f3e4735c013f1969 Merge: 1770ae9 02b829f Author: Greg Kroah-Hartman Date: Wed Mar 22 11:56:03 2017 +0100 Merge tag 'iio-for-4.12b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: 2nd set of new device support, features and cleanups for IIO in the 4.12 cycle A good collection of outreachy related patches in here - mostly staging driver cleanup. Also a fair number of patches added explicit OF device ID tables for i2c drivers - a precursor to dropping (eventually) the implicit probing. New Device Support * Allwinner SoC ADC. - So far covers the sun4i-a10, sun5i-a13 and sun6i-a31 general purpose ADCs, including thermal side of things. This missed the last cycle due to my incompetence, so good to get in now, particularly as various patches dependent on it are appearing. * ltc2632 - new driver supporting ltc2632-l12, ltc2632-l10, ltc2632-l8, ltc2632-h12, ltc-2632-h10, ltc-2632-h8 dacs Cleanups * Documentation - drop a broken reference to i2c/trivial-devices * ad2s1200 - drop & from function pointers for consistency. * ad2s1210 - formatting fixes. * ad7152 - octal permissions instead of symbolic. - drop & from function pointers for consistent usage. * ad7192 - drop & from function pointers for consistent usage. * ad7280 - replace core mlock usage with a local lock as mlock is intended only to protect the current device state (direct reads, or triggered and buffered) * ad7746 - drop & from function pointers for consistent usage. - replace core mlock usage with a local lock as mlock is intended only to protect the current device state (direct reads, or triggered and buffered) * ad7754 - move contents of header file into source file as not used anywhere else. * ad7759 - move contents of header file into source file as not used anywhere else. * ad7780 - drop & from function pointers for consistent usage. * ad7832 - replace core mlock usage with a local lock as mlock is intended only to protect the current device state (direct reads, or triggered and buffered) * ad9834 - replace core mlock usage with a local lock as mlock is intended only to protect the current device state (direct reads, or triggered and buffered) - drop an unnecessary goto in favour of direct return. * adis16060 - drop & from function pointers as inconsistent. * adis16201 - drop a local mutex as the adis core already protects everything necessary. - drop & from function pointers for consistent usage. * adis16203 - drop & from function pointers for consistent usage. * adis16209 - drop a local mutex as the adis core already protects everything necessary. - use an enum for scan index giving slightly nicer code. - drop & from function pointers for consistent usage. * adis16240 - drop a local mutex as the adis core already protects everything necessary. - use an enum for scan index giving slightly nicer code. - drop & from function pointers for consistent usage. * apds9960 - add OF device ID table. * bma180 - add OF device ID table. - prefer unsigned int to bare use of unsigned. * bmc150_magn - add OF device ID table. * hmp03 - add OF device ID table. * ina2xx - add OF device ID table. * itg3200 - add OF device ID table. * mag3110 - add OF device ID table. * max11100 - remove .owner field as it is set by the spi core. * max5821 - add .of_match_table set to the ID table which was present but not used. * mcp4725 - add OF device ID table. * mlx96014 - add OF device ID table. * mma7455 - add OF device ID table. * mma7660 - add OF device ID table. * mpl3115 - add OF device ID table. * mpu6050 - add OF device ID table. * pc104 - mask pc104 drivers behind a global pc104 config option. * ti-ads1015 - add OF device ID table. * tsl2563 - add OF device ID table. * us5182d - add OF device ID table. commit acaa71a6c746df80b33ace88689b336de96e833e Author: Brian Norris Date: Mon Mar 20 16:53:43 2017 -0700 arm64: dts: rockchip: describe Gru/Kevin OPPs + CPU regulators Used for Gru/Kevin only, as they're the only ones which have a described CPU regulator. Also, I'm not sure we've validated this table non-Gru boards. At the same time, partially describe PWM regulators for Gru, so cpufreq doesn't think it can crank up the clock speed without changing the voltage. However, we don't yet have the DT bindings to fully describe the Over Voltage Protection (OVP) circuits on these boards. Without that description, we might end up changing the voltage too much, too fast. Add the pwm-regulator descriptions and associate the CPU OPPs, but leave them disabled. Signed-off-by: Brian Norris [shared gru/kevin parts on a gru device] Tested-by: Enric Balletbo i Serra [with a bit of reordering] Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 139 +++++++++++++++++++++++++ arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi | 145 +++++++++++++++++++++++++++ 2 files changed, 284 insertions(+) commit 48f4d9796d990850f6339b61eeeac9ca7fdb3695 Author: Brian Norris Date: Mon Mar 20 16:53:42 2017 -0700 arm64: dts: rockchip: add Gru/Kevin DTS Kevin is part of a family of boards called Gru. As best as possible, the properties shared by the Gru family are placed in rk3399-gru.dtsi, while Kevin-specific bits are in rk3399-gru-kevin.dts. This does not add full support for the base Gru board. Working and tested (to some extent): * EC support -- including keyboard, battery, PWM, and probably more * UART / console * Thermal * Touchscreen * Touchpad * Digitizer (regulator still WIP) * PCIe / Wifi * Bluetooth / Webcam * SD card * eMMC * USB2 on TypeC - This works much of the time, but USB3 devices may or may not detect properly. Waiting on proper extcon support for USB3 over TypeC. - Depends on XHCI/DWC3 fixes for ARM64 that still haven't landed * Backlight Not working: * CPUFreq -- relies on special OVP support for our PWM regulator circuits * EC / extcon support -- and with it, USB3/TypeC/DP * DRM -- won't even build on ARM64, so all display, eDP, etc. is not enabled Not tested: * Audio Signed-off-by: Brian Norris [shared gru/kevin parts on a gru device] Tested-by: Enric Balletbo i Serra [with a bit of reordering] Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/Makefile | 1 + arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts | 302 +++++++ arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 964 ++++++++++++++++++++++ 3 files changed, 1267 insertions(+) commit 70968d63a1bf52a421f930b4bc55489449168b3c Author: Brian Norris Date: Mon Mar 20 16:53:41 2017 -0700 dt-bindings: Document rk3399 Gru/Kevin Gru is a base dev board for a family of devices, including Kevin. Both utilize Rockchip RK3399, and they share much of their design. Signed-off-by: Brian Norris Acked-by: Rob Herring [added Samsung Chromebook Plus hint] Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 7144224f2c2b1a10c0b294423c8a74c2b280017c Author: Brian Norris Date: Thu Feb 9 17:05:17 2017 -0800 arm64: dts: rockchip: support dwc3 USB for rk3399 Add the dwc3 usb needed node information for rk3399. Signed-off-by: Brian Norris Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 54 ++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit a3a5129e122709306cfa6409781716c2933df99b Author: Andreas Pape Date: Mon Sep 5 13:20:29 2016 +0200 batman-adv: handle race condition for claims between gateways Consider the following situation which has been found in a test setup: Gateway B has claimed client C and gateway A has the same backbone network as B. C sends a broad- or multicast to B and directly after this packet decides to send another packet to A due to a better TQ value. B will forward the broad-/multicast into the backbone as it is the responsible gw and after that A will claim C as it has been chosen by C as the best gateway. If it now happens that A claims C before it has received the broad-/multicast forwarded by B (due to backbone topology or due to some delay in B when forwarding the packet) we get a critical situation: in the current code A will immediately unclaim C when receiving the multicast due to the roaming client scenario although the position of C has not changed in the mesh. If this happens the multi-/broadcast forwarded by B will be sent back into the mesh by A and we have looping packets until one of the gateways claims C again. In order to prevent this, unclaiming of a client due to the roaming client scenario is only done after a certain time is expired after the last claim of the client. 100 ms are used here, which should be slow enough for big backbones and slow gateways but fast enough not to break the roaming client use case. Acked-by: Simon Wunderlich Signed-off-by: Andreas Pape [sven@narfation.org: fix conflicts with current version] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bridge_loop_avoidance.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 4dd72f73605412d81f94114a3eeb04fa60e29ae6 Author: Andreas Pape Date: Mon Sep 5 13:20:28 2016 +0200 batman-adv: changed debug messages for easier bla debugging Some of the bla debug messages are extended and additional messages are added for easier bla debugging. Some debug messages introduced with the dat changes in prior patches of this patch series have been changed to be more compliant to other existing debug messages. Acked-by: Simon Wunderlich Signed-off-by: Andreas Pape [sven@narfation.org: fix conflicts with current version] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bridge_loop_avoidance.c | 18 ++++++++++++++---- net/batman-adv/routing.c | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) commit 9e794b6bf4a2c65d698d7433ddfabc54a5d53a88 Author: Andreas Pape Date: Mon Sep 5 13:20:27 2016 +0200 batman-adv: drop unicast packets from other backbone gw Additional dropping of unicast packets received from another backbone gw if the same backbone network before being forwarded to the same backbone again is necessary. It was observed in a test setup that in rare cases these frames lead to looping unicast traffic backbone->mesh->backbone. Signed-off-by: Andreas Pape Acked-by: Simon Wunderlich [sven@narfation.org: fix conflicts with current version] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/routing.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 9aa5cd79b5abde1d0ebcff825726e242e0b7efea Author: Andreas Pape Date: Mon Sep 5 13:20:26 2016 +0200 batman-adv: prevent duplication of ARP replies when DAT is used If none of the backbone gateways in a bla setup has already knowledge of the mac address searched for in an incoming ARP request from the backbone an address resolution via the DHT of DAT is started. The gateway can send several ARP requests to different DHT nodes and therefore can get several replies. This patch assures that not all of the possible ARP replies are returned to the backbone by checking the local DAT cache of the gateway. If there is an entry in the local cache the gateway has already learned the requested address and there is no need to forward the additional reply to the backbone. Furthermore it is checked if this gateway has claimed the source of the ARP reply and only forwards it to the backbone if it has claimed the source or if there is no claim at all. Signed-off-by: Andreas Pape Acked-by: Simon Wunderlich [sven@narfation.org: fix conflicts with current version] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/distributed-arp-table.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 00311de5fbf998877f2c3109688857a99f45fdd8 Author: Andreas Pape Date: Mon Sep 5 13:20:25 2016 +0200 batman-adv: prevent multiple ARP replies sent by gateways if dat enabled If dat is enabled it must be made sure that only the backbone gw which has claimed the remote destination for the ARP request answers the ARP request directly if the MAC address is known due to the local dat table. This prevents multiple ARP replies in a common backbone if more than one gateway already knows the remote mac searched for in the ARP request. Signed-off-by: Andreas Pape Acked-by: Simon Wunderlich [sven@narfation.org: fix conflicts with current version] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bridge_loop_avoidance.c | 49 ++++++++++++++++++++++++++++++++++ net/batman-adv/bridge_loop_avoidance.h | 11 ++++++++ net/batman-adv/distributed-arp-table.c | 15 +++++++++++ 3 files changed, 75 insertions(+) commit 2e157681eb2f44f8a521ed91c76bfd62e29bb744 Author: Liang Chen Date: Thu Mar 16 21:17:20 2017 +0800 dt-bindings: i2c: rk3x: add support for rk3328 The rk3328 i2c is the same as rk3399 Signed-off-by: Liang Chen Reviewed-by: Heiko Stuebner Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-rk3x.txt | 1 + 1 file changed, 1 insertion(+) commit 41977e86c984fcdddb454a3d7887de5d47b5f530 Author: Roman Yeryomin Date: Tue Mar 21 00:43:00 2017 +0100 rt2x00: add support for MT7620 Basic support for MT7620 built-in wireless radio was added to OpenWrt in r41441. It has seen some heavy cleaning and refactoring since in order to match the Kernel's code quality standards. Signed-off-by: Roman Yeryomin Signed-off-by: Daniel Golle Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/Kconfig | 2 +- drivers/net/wireless/ralink/rt2x00/rt2800.h | 177 +++ drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 1421 +++++++++++++++++++++++- drivers/net/wireless/ralink/rt2x00/rt2800lib.h | 4 + drivers/net/wireless/ralink/rt2x00/rt2x00.h | 1 + 5 files changed, 1578 insertions(+), 27 deletions(-) commit ca260ece6a57dc7d751e0685f51fa2c55d851873 Author: Johan Hovold Date: Mon Mar 13 13:44:21 2017 +0100 zd1211rw: fix NULL-deref at probe Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer or accessing memory beyond the endpoint array should a malicious device lack the expected endpoints. Fixes: a1030e92c150 ("[PATCH] zd1211rw: Convert installer CDROM device into WLAN device") Cc: Daniel Drake Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo drivers/net/wireless/zydas/zd1211rw/zd_usb.c | 3 +++ 1 file changed, 3 insertions(+) commit a3d411fb38c0472ce96aea58062db87cc9357780 Author: Hans de Goede Date: Mon Mar 13 23:25:10 2017 +0100 i2c: designware: Disable pm for PMIC i2c-bus even if there is no _SEM method Cherrytrail devices use the dw i2c-bus with uid 7 to access their PMIC. Even if the i2c-bus to the PMIC is not shared with the SoC's P-Unit and i2c-designware-baytrail.c thus does not set the pm_disabled flag, we still need to disable pm so that ACPI PMIC opregions can access the PMIC during late-suspend and early-resume. This fixes errors like these blocking suspend: i2c_designware 808622C1:06: timeout waiting for bus ready ACPI Exception: AE_ERROR, Returned by Handler for [UserDefinedRegion] acpi 80860F14:02: Failed to change power state to D3hot PM: late suspend of devices failed Signed-off-by: Hans de Goede Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-platdrv.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 41c80b8a63bccf9de96698b4eb0916e223fb6e72 Author: Hans de Goede Date: Mon Mar 13 23:25:09 2017 +0100 i2c: designware: Never suspend i2c-busses used for accessing the system PMIC Currently we are already setting a pm_runtime_disabled flag and disabling runtime-pm for i2c-busses used for accessing the system PMIC on x86. But this is not enough, there are ACPI opregions which may want to access the PMIC during late-suspend and early-resume, so we need to completely disable pm to be safe. This commit renames the flag from pm_runtime_disabled to pm_disabled and adds the following new behavior if the flag is set: 1) Call dev_pm_syscore_device(dev, true) which disables normal suspend / resume and remove the pm_runtime_disabled check from dw_i2c_plat_resume since that will now never get called. This fixes suspend_late handlers which use ACPI PMIC opregions causing errors like these: PM: Suspending system (freeze) PM: suspend of devices complete after 1127.751 msecs i2c_designware 808622C1:06: timeout waiting for bus ready ACPI Exception: AE_ERROR, Returned by Handler for [UserDefinedRegion] acpi 80860F14:02: Failed to change power state to D3hot PM: late suspend of devices failed 2) Set IRQF_NO_SUSPEND irq flag. This fixes resume_early handlers which handlers which use ACPI PMIC opregions causing errors like these: PM: resume from suspend-to-idle i2c_designware 808622C1:06: controller timed out ACPI Exception: AE_ERROR, Returned by Handler for [UserDefinedRegion] Signed-off-by: Hans de Goede Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-baytrail.c | 2 +- drivers/i2c/busses/i2c-designware-core.c | 11 +++++++++-- drivers/i2c/busses/i2c-designware-core.h | 4 ++-- drivers/i2c/busses/i2c-designware-platdrv.c | 10 ++++------ 4 files changed, 16 insertions(+), 11 deletions(-) commit d8307c09206b35a9526bfdf076c9f516c0b5e6f1 Author: Linus Walleij Date: Mon Mar 13 00:28:17 2017 +0100 gpio: moxart: Switch to using the FTGPIO010 driver This just deletes the Moxa ART driver and replaces it with the more versatile Faraday FTGPIO010 driver. Make this default on for ARCH_GEMINI and ARCH_MOXART so we do not get Kconfig glitches. Tested-by: Jonas Jensen Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 10 +----- drivers/gpio/Makefile | 1 - drivers/gpio/gpio-moxart.c | 84 ---------------------------------------------- 3 files changed, 1 insertion(+), 94 deletions(-) commit 78c43af2c1d79653e2e6fb9a05c8f3def7c87940 Author: Oliver Neukum Date: Mon Mar 20 14:37:30 2017 +0100 i2c-designware: increase timeout of semaphore transfer Our testing shows the semaphore failing to be transferred on CherryTrail in about 0.5% of all cases. The existing timeout needs to be lengthened to accommodate the worst cases. V2: Rebased on https://cgit.freedesktop.org/drm-intel/commit/?h=topic/designware-baytrail Signed-off-by: Oliver Neukum Reviewed-by: Hans de Goede Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-baytrail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d3a15aaaec41252ad7c6592305264e52a801be7 Author: Linus Walleij Date: Mon Mar 13 00:28:16 2017 +0100 gpio: gemini: rename to match Faraday IP The Gemini driver is actually a driver for the Faraday Technology FTGPIO010 IP block. We rename the driver and the Kconfig symbol and put in a a new compatible string for the Moxa ART SoC that is also using this IP block. Tested-by: Jonas Jensen Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 7 +- drivers/gpio/Makefile | 2 +- drivers/gpio/gpio-ftgpio010.c | 242 ++++++++++++++++++++++++++++++++++++++++++ drivers/gpio/gpio-gemini.c | 236 ---------------------------------------- 4 files changed, 247 insertions(+), 240 deletions(-) commit 32d9617234f53d7fef18ec94d9bcfc805bb9df16 Author: Linus Walleij Date: Mon Mar 13 00:28:13 2017 +0100 gpio: gemini: augment DT bindings The DT bindings assumed that this IP block was coming from Cortina Systems, which turns out not to be true. It is a standard IP block from Faraday Technology and also used in the Moxa moxart SoC. We augment the bindings to cover all existing parts and rename it after the IP block. This involves deleting the old Moxa bindings that now are contained in this binding. Cc: devicetree@vger.kernel.org Cc: Jonas Jensen Acked-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/gpio/cortina,gemini-gpio.txt | 24 ------------------- .../devicetree/bindings/gpio/faraday,ftgpio010.txt | 27 ++++++++++++++++++++++ .../devicetree/bindings/gpio/moxa,moxart-gpio.txt | 19 --------------- 3 files changed, 27 insertions(+), 43 deletions(-) commit a528fab6cc66acdccb48552a79300bc1fbda6b5b Merge: 97da385 264ec1a Author: Wolfram Sang Date: Wed Mar 22 09:32:44 2017 +0100 Merge tag 'topic/designware-baytrail-2017-03-02' of git://anongit.freedesktop.org/git/drm-intel into i2c/for-next Pull immutable branch as a common base for further development: "Baytrail PMIC vs. PMU race fixes from Hans de Goede This time the right version (v4), with the compile fix." commit 2e1aa605faddb810b2bd5dac7ed418d898268e40 Author: Heiko Stuebner Date: Wed Mar 22 00:05:16 2017 +0100 ARM: dts: rockchip: fix PPI misconfiguration on Cortex-A9 socs According to [0] pointed out by Marc Zyngier in a report about a similar error message, PPIs 11 and 13 are edge triggered on Cortex-A9 socs including the rk3066 and rk3188 which currently mark them as level triggered. Until some time ago the gic did not care but commit 992345a58e0c ("irqchip/gic: WARN if setting the interrupt type for a PPI fails") introduced a warning for that case. Fix the warning on these socs by describing the interrupts correctly and also using the binding constants for easier reading in the future. [0] http://infocenter.arm.com/help/topic/com.arm.doc.ddi0407f/CCHEIGIC.html Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3188.dtsi | 4 ++-- arch/arm/boot/dts/rk3xxx.dtsi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 0b7bb6af1d734b15dbebec942767708e8ca40ca3 Author: Heiko Carstens Date: Mon Mar 20 14:39:28 2017 +0100 s390/facilities: get rid of __ASSEMBLY__ in facility header file There is no need for the __ASSEMBLY__ ifdefery anymore since the architecture level set code that deals with facility bits was converted to C in the meantime. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/facility.h | 4 ---- arch/s390/kernel/head.S | 1 - 2 files changed, 5 deletions(-) commit 6f5165e864d240d15675cc2fb5a369d57e1f60d0 Author: Heiko Carstens Date: Mon Mar 20 14:29:50 2017 +0100 s390/facilites: use stfle_fac_list array size for MAX_FACILITY_BIT Use the actual size of the facility list array within the lowcore structure for the MAX_FACILITY_BIT define instead of a comment which states what this is good for. This makes it a bit harder to break things. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/facility.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdd3bd9d618d7a4a3920a193e20ca40736b878e9 Author: Heiko Carstens Date: Mon Mar 13 16:15:06 2017 +0100 s390/sysinfo: provide remaining stsi information via debugfs Provide the remaining stsi information via debugfs files. This also might be useful for debugging purposes. Suggested-by: Christian Borntraeger Acked-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/sysinfo.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit ae5ca67acaf070ced4e3ba324160ad6a99637e71 Author: Heiko Carstens Date: Mon Mar 13 15:58:59 2017 +0100 s390/sysinfo,topology: provide raw stsi 15,1,x data via debugfs Provide the raw stsi 15,1,x data contents via debugfs. This makes it much easier to debug unexpected scheduling domains on machines that provide cpu topology information. Therefore this file adds a new 's390/stsi' debugfs directory with a file for each possible topology nesting level that is allowed by the architecture. The files will be created regardless if the machine supports all, or any, level. If a level is not supported, or no data is available, user space can recognize this with a -EINVAL error code when trying to read such data. In addition a 'topology' symlink is created that points to the file that contains the data that is used to create the scheduling domains. Acked-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/sysinfo.h | 9 +++++ arch/s390/kernel/sysinfo.c | 80 +++++++++++++++++++++++++++++++++++++++++ arch/s390/kernel/topology.c | 2 +- 3 files changed, 90 insertions(+), 1 deletion(-) commit 050f99b1b85876a8456b76ebfee7d43746d37f6c Author: Heiko Carstens Date: Mon Mar 13 15:58:35 2017 +0100 s390/debugfs: introduce top-level 's390' directory Introduce a top-level 's390' directory which should be used when adding new s390 specific debug feature files and/or directories. This makes hopefully sure that the contents of the s390 directory will be a bit more structured. Right now we have a couple of top-level files where it is not easy to tell to which subsystem they belong to. Acked-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/kdebugfs.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) commit e61a6134e7a547939a0b7056bcf6b12d75b6d355 Author: Harald Freudenberger Date: Wed Mar 15 11:08:27 2017 +0100 s390/pkey: Introduce new API for secure key verification User space needs some information about the secure key(s) before actually invoking the pkey and/or paes funcionality. This patch introduces a new ioctl API and in kernel API to verify the the secure key blob and give back some information about the key (type, bitsize, old MKVP). Both APIs are described in detail in the header files arch/s390/include/asm/pkey.h and arch/s390/include/uapi/asm/pkey.h. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pkey.h | 21 +++++++++++++ arch/s390/include/uapi/asm/pkey.h | 19 ++++++++++++ drivers/s390/crypto/pkey_api.c | 64 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 103 insertions(+), 1 deletion(-) commit 15d3387c3c7cfe8c8c790bfbe829364782b70d43 Author: Michael Holzheu Date: Thu Mar 16 13:33:18 2017 +0100 s390/configs//zfcpdump_defconfig: Remove CONFIG_SCSI_SRP_ATTRS Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky arch/s390/configs/zfcpdump_defconfig | 1 - 1 file changed, 1 deletion(-) commit 2f8876f98447ccbddb5bccc8f74ee20a69e83a3e Author: Heiko Carstens Date: Sat Mar 11 12:22:11 2017 +0100 s390/dump_stack: use control program identification string If running within a level 3 hypervisor, the hypervisor provides a SYSIB block which contains a control program indentifier string. Use this string instead of the simple KVM and z/VM strings only. In case of z/VM this provides addtional information: the z/VM version. The new string looks similar to this: Hardware name: IBM 2964 N96 702 (z/VM 6.4.0) Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/early.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit d2f039742537c4aec6488fa4de0c91a641210fd9 Author: Heiko Carstens Date: Sat Mar 11 11:58:27 2017 +0100 s390/dump_stack: remove whitespace from arch description The arch description provided for the "Hardware name:" contains lots of extra whitespace due to the way the SYSIB contents are defined (strings aren't zero terminated). This looks a bit odd and therefore remove the extra whitespace characters. This also gives the opportunity to add more information, if required, without hitting the magic 80 characters per line limit. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/early.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) commit 59808fc81942834964e3b4e65f08e5855a3914a2 Author: Heiko Carstens Date: Mon Mar 13 15:45:54 2017 +0100 s390/sysinfo: allow compiler warnings again Allow compiler warnings again for the sysinfo file. Compiler warnings were disabled when the bogomips calculation with math-emu code was introduced ("[S390] Calibrate delay and bogomips."). Since that code is gone, we can enable warnings again. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/Makefile | 2 -- 1 file changed, 2 deletions(-) commit 4fd4dd8bffb112d1e6549e0ff09e9fa3c8cc2b96 Author: Heiko Carstens Date: Mon Mar 13 13:36:10 2017 +0100 s390/topology: fix typo in early topology code Use MACHINE_FLAG_TOPOLOGY instead of MACHINE_HAS_TOPOLOGY when clearing the bit that indicates if the machine provides topology information (and if it should be used). Currently works anyway. Fixes: 68cc795d1933 ("s390/topology: make "topology=off" parameter work") Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/early.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 251ea0ca408b827e888d622eac5e89e4b9502ea2 Author: Heiko Carstens Date: Thu Mar 9 10:02:28 2017 +0100 s390/topology: get rid of core mask array Use a single long value instead of a single element array to represent the core mask. The array is a leftover from 32/31 bit code so we were able to use bitops helper functions. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/sysinfo.h | 3 +-- arch/s390/kernel/topology.c | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) commit 9b62330fa06346da3399a3799f67822fa081a8fe Author: Heiko Carstens Date: Thu Mar 9 09:51:22 2017 +0100 s390/bitops: remove outdated comment The s390 specific little endian bitop macros are gone since a long time. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/bitops.h | 8 -------- 1 file changed, 8 deletions(-) commit faee35a57bc1758864fb325740c3f0d5ca0b3771 Author: Michal Hocko Date: Tue Mar 7 16:48:40 2017 +0100 s390: get rid of superfluous __GFP_REPEAT __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. page_table_alloc then uses the flag for a single page allocation. This means that this flag has never been actually useful here because it has always been used only for PAGE_ALLOC_COSTLY requests. An earlier attempt to remove the flag 10d58bf297e2 ("s390: get rid of superfluous __GFP_REPEAT") has missed this one but the situation is very same here. Signed-off-by: Michal Hocko Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/mm/pgalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 157467ba9fb7e379f0540707dd89111de441e45e Author: Heiko Carstens Date: Sat Feb 25 12:16:48 2017 +0100 s390/cpuinfo: show facilities as reported by stfle Add a new line to /proc/cpuinfo which shows all available facilities as reported by the stfle instruction: > cat /proc/cpuinfo ... facilities : 0 1 2 3 4 6 7 ... ... Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/processor.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 09214545c4a40943ecb6cedc511cd4bd709c85a6 Author: Heiko Carstens Date: Sat Feb 25 12:16:31 2017 +0100 s390/bitops: add for_each_set_bit_inv helper Same helper function like for_each_set_bit in generic code. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/bitops.h | 5 +++++ 1 file changed, 5 insertions(+) commit bffc880b451f1e440efe1b8bd3af365018ec314a Merge: ca681ec 916cda1 Author: Martin Schwidefsky Date: Wed Mar 22 08:22:02 2017 +0100 Merge branch 'guarded-storage' into 'features' to make merging with the KVM tree easier. commit 916cda1aa1b412d7cf2991c3af7479544942d121 Author: Martin Schwidefsky Date: Tue Jan 26 14:10:34 2016 +0100 s390: add a system call for guarded storage This adds a new system call to enable the use of guarded storage for user space processes. The system call takes two arguments, a command and pointer to a guarded storage control block: s390_guarded_storage(int command, struct gs_cb *gs_cb); The second argument is relevant only for the GS_SET_BC_CB command. The commands in detail: 0 - GS_ENABLE Enable the guarded storage facility for the current task. The initial content of the guarded storage control block will be all zeros. After the enablement the user space code can use load-guarded-storage-controls instruction (LGSC) to load an arbitrary control block. While a task is enabled the kernel will save and restore the current content of the guarded storage registers on context switch. 1 - GS_DISABLE Disables the use of the guarded storage facility for the current task. The kernel will cease to save and restore the content of the guarded storage registers, the task specific content of these registers is lost. 2 - GS_SET_BC_CB Set a broadcast guarded storage control block. This is called per thread and stores a specific guarded storage control block in the task struct of the current task. This control block will be used for the broadcast event GS_BROADCAST. 3 - GS_CLEAR_BC_CB Clears the broadcast guarded storage control block. The guarded- storage control block is removed from the task struct that was established by GS_SET_BC_CB. 4 - GS_BROADCAST Sends a broadcast to all thread siblings of the current task. Every sibling that has established a broadcast guarded storage control block will load this control block and will be enabled for guarded storage. The broadcast guarded storage control block is used up, a second broadcast without a refresh of the stored control block with GS_SET_BC_CB will not have any effect. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/elf.h | 1 + arch/s390/include/asm/lowcore.h | 9 +- arch/s390/include/asm/nmi.h | 12 ++- arch/s390/include/asm/processor.h | 5 ++ arch/s390/include/asm/setup.h | 2 + arch/s390/include/asm/switch_to.h | 3 + arch/s390/include/asm/thread_info.h | 12 +-- arch/s390/include/uapi/asm/Kbuild | 1 + arch/s390/include/uapi/asm/guarded_storage.h | 77 ++++++++++++++++ arch/s390/include/uapi/asm/unistd.h | 2 +- arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/asm-offsets.c | 2 +- arch/s390/kernel/compat_wrapper.c | 1 + arch/s390/kernel/early.c | 2 + arch/s390/kernel/entry.S | 26 +++++- arch/s390/kernel/entry.h | 2 + arch/s390/kernel/guarded_storage.c | 128 +++++++++++++++++++++++++++ arch/s390/kernel/machine_kexec.c | 13 ++- arch/s390/kernel/nmi.c | 19 +++- arch/s390/kernel/process.c | 7 +- arch/s390/kernel/processor.c | 2 +- arch/s390/kernel/ptrace.c | 86 +++++++++++++++--- arch/s390/kernel/setup.c | 18 +++- arch/s390/kernel/smp.c | 43 +++++++-- arch/s390/kernel/syscalls.S | 2 +- arch/s390/kvm/interrupt.c | 4 +- include/uapi/linux/elf.h | 1 + 27 files changed, 436 insertions(+), 46 deletions(-) commit 132c93d4215c5ea12f8bb291249ede159d507b6e Author: Cyril Bur Date: Wed Mar 22 14:13:28 2017 +1100 drivers/misc: Aspeed LPC control fix compile error and warning pgprot_dmachoerent() is not defined on every architecture. Having COMPILE_TEST set for the driver causes it to be compiled on architectures which do not have pgprot_dmachoerent(): drivers/misc/aspeed-lpc-ctrl.c: In function 'aspeed_lpc_ctrl_mmap': drivers/misc/aspeed-lpc-ctrl.c:51:9: error: implicit declaration of function 'pgprot_dmacoherent' [-Werror=implicit-function-declaration] prot = pgprot_dmacoherent(prot); There are two possible solutions: 1. Remove COMPILE_TEST to ensure the driver is only compiled on ARM 2. Use pgprot_noncached() instead of pgprot_dmachoerent() The first option results in less compile testing of the LPC control driver which is undesirable. The second option uses a function that is declared on all architectures and therefore should always build. Currently there is no practical difference between pgprot_noncached() and pgprot_dmachoerent() for the aspeed chips that this driver is compatible with. The reason for pgprot_dmachoerent() was that there may be chips made at some point in the future that could include hardware that pgprot_dmachoerent() could optimise for. As none of this hardware has even been announced there isn't really a need for pgprot_dmachoerent(). Using pgprot_noncached() is completely correct and optimal for all existing hardware on which the LPC control driver will run. This commit also addresses that phys_addr_t should be printed using %pap rather than %x: In file included from include/linux/miscdevice.h:6:0, from drivers/misc/aspeed-lpc-ctrl.c:11: drivers/misc/aspeed-lpc-ctrl.c: In function 'aspeed_lpc_ctrl_probe': drivers/misc/aspeed-lpc-ctrl.c:232:17: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'phys_addr_t {aka long long unsigned int}' [-Wformat=] dev_info(dev, "Loaded at 0x%08x (0x%08x)\n", Signed-off-by: Cyril Bur Reported-by: kbuild test robot Signed-off-by: Greg Kroah-Hartman drivers/misc/aspeed-lpc-ctrl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit eea54ed46edd42cf703be752d21731567142aa28 Author: Shawn Guo Date: Tue Mar 21 16:59:55 2017 +0800 drm: zte: remove leftover 'inf' from struct zx_hdmi There is a leftover 'inf' field in struct zx_hdmi from commit '831a8d5e0bef ("drm: zte: move struct vou_inf into zx_vou driver")'. Remove it. Signed-off-by: Shawn Guo Reviewed-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1490086795-17925-1-git-send-email-shawnguo@kernel.org drivers/gpu/drm/zte/zx_hdmi.c | 1 - 1 file changed, 1 deletion(-) commit 8f73cbb7d4f300eda84a00ffe8bf9f7cf2d3ea06 Author: Kinglong Mee Date: Sat Mar 18 09:26:13 2017 +0800 f2fs: more reasonable mem_size calculating of ino_entry Signed-off-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 70874fb34fbd8b34b1aa45b30ca7eb216b1376d4 Author: Kinglong Mee Date: Sat Mar 18 09:25:05 2017 +0800 f2fs: calculate the f2fs_stat_info into base_mem The memory size of f2fs_stat_info also should be calculated. Signed-off-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 684ca7e55de1f3defb13c491e0b5eb8f27ffe79c Author: Kinglong Mee Date: Sat Mar 18 09:20:55 2017 +0800 f2fs: avoid stat_inc_atomic_write for non-atomic file After filemap_write_and_wait_range fail, the FI_ATOMIC_FILE flags is removed, so that f2fs should not increase the stat of atomic_write. Signed-off-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit a58f24495d072c5cf2177a5343dd8d751383fdc7 Author: Chao Yu Date: Fri Mar 17 18:46:14 2017 +0800 f2fs: add missing INMEM_REVOKE trace enum definition Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim include/trace/events/f2fs.h | 1 + 1 file changed, 1 insertion(+) commit c6f89dfd528041de2e71788495579a18c0363869 Author: Kinglong Mee Date: Wed Mar 15 21:12:50 2017 +0800 f2fs: sanity check of crc_offset from raw checkpoint The crc_offset towards or beyond the end of block is wrong, sanity check it. Signed-off-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d03ba4cc3fa639916a86b61c5a3d817cb6aa91a0 Author: Kinglong Mee Date: Fri Mar 10 16:28:46 2017 +0800 f2fs: cleanup the disk level filename updating As discuss with Jaegeuk and Chao, "Once checkpoint is done, f2fs doesn't need to update there-in filename at all." The disk-level filename is used only one case, 1. create a file A under a dir 2. sync A 3. godown 4. umount 5. mount (roll_forward) Only the rename/cross_rename changes the filename, if it happens, a. between step 1 and 2, the sync A will caused checkpoint, so that, the roll_forward at step 5 never happens. b. after step 2, the roll_forward happens, file A will roll forward to the result as after step 1. So that, any updating the disk filename is useless, just cleanup it. Signed-off-by: Kinglong Mee Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 25 ++++--------------------- fs/f2fs/f2fs.h | 2 -- fs/f2fs/file.c | 8 -------- fs/f2fs/inline.c | 2 -- fs/f2fs/namei.c | 29 ----------------------------- 5 files changed, 4 insertions(+), 62 deletions(-) commit 346fe752c431bcef5d05614263a4b4a0cfe88e10 Author: Chao Yu Date: Mon Mar 13 20:10:41 2017 +0800 f2fs: cover update_free_nid_bitmap with nid_list_lock free_nid_bitmap and free_nid_count in update_free_nid_bitmap should be updated atomically, use nid_list_lock cover them to avoid race in concurrent scenario. Signed-off-by: Chao Yu Reviewed-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 1 - fs/f2fs/node.c | 27 +++++++++++---------------- 2 files changed, 11 insertions(+), 17 deletions(-) commit a83d50bc16c4f5d0a359790015b5b32f3f0e52db Author: Kinglong Mee Date: Mon Mar 13 16:35:13 2017 +0800 f2fs: fix bad prefetchw of NULL page For f2fs_read_data_pages, the f2fs_mpage_readpages gets "page == NULL", so that, the prefetchw(&page->flags) is operated on NULL. Fixes: f1e8866016 ("f2fs: expose f2fs_mpage_readpages") Signed-off-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bd4667cb4b77f02a16dd14443ba66884d755c7e6 Author: Kinglong Mee Date: Fri Mar 10 20:43:20 2017 +0800 f2fs: clear FI_DATA_EXIST flag in truncate_inline_inode Clear FI_DATA_EXIST flag atomically in truncate_inline_inode, and the return value from truncate_inline_inode isn't used, remove it. Signed-off-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 8 +------- fs/f2fs/file.c | 4 +--- fs/f2fs/inline.c | 21 +++++++++++---------- 3 files changed, 13 insertions(+), 20 deletions(-) commit d7563861722a471cf0ca348b00fa7a1c34507dea Author: Kinglong Mee Date: Fri Mar 10 17:55:07 2017 +0800 f2fs: move mnt_want_write_file after arguments checking It's needless of mnt_want_write_file for arguments checking. Signed-off-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) commit 46e82fb1b5349e75d8e64df40760f5f5a46bd80f Author: Kinglong Mee Date: Fri Mar 10 17:54:52 2017 +0800 f2fs: check new size by inode_newsize_ok in f2fs_insert_range The inode_newsize_ok is better than only checking the maxbytes, eg. the rlimit etc. Signed-off-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3cecfa5f6700c07ef943ab3d457f82f9868c4bfa Author: Kinglong Mee Date: Fri Mar 10 17:54:26 2017 +0800 f2fs: avoid copy date to user-space if move file range fail If move file range return error, the data copied to user-space is duplicate. Signed-off-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 2 ++ 1 file changed, 2 insertions(+) commit 087d3d8bae58415d9996ea5936d9738f881cd156 Author: Kinglong Mee Date: Fri Mar 10 17:54:03 2017 +0800 f2fs: drop duplicate new_size assign in f2fs_zero_range Signed-off-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 2 -- 1 file changed, 2 deletions(-) commit 8a6aa32502549b1f15f0a28e3d2fcc5edabc3f19 Author: Fan Li Date: Wed Mar 8 13:39:16 2017 +0800 f2fs: adjust the way of calculating nat block use a slightly simpler expression to calculate nat block with nid. Signed-off-by: Fan Li Signed-off-by: Jaegeuk Kim fs/f2fs/node.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 14b44d238ce7402a99db30b806e08b3e4eddcdbe Author: Jaegeuk Kim Date: Thu Mar 9 15:24:24 2017 -0800 f2fs: add fault injection on f2fs_truncate Inject a fault during f2fs_truncate(). Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 1 + fs/f2fs/file.c | 6 ++++++ fs/f2fs/super.c | 1 + 3 files changed, 8 insertions(+) commit 1941d7bcb474aa38caca16e6d3416e623d37d800 Author: Sheng Yong Date: Wed Mar 8 10:47:12 2017 +0800 f2fs: check range before defragment This patch checks the parameter range passed by ioctl to void that range exceeds the max_file_blocks limit. Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b0beab5016d04009a7c1d4639ccb5b3d46dad56f Author: Sheng Yong Date: Wed Mar 8 10:47:11 2017 +0800 f2fs: use parameter max_items instead of PIDVEC_SIZE Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d6a650febdd762c90fe477aa53b9413fd7d97df Author: Yunlei He Date: Thu Mar 2 10:36:20 2017 +0800 f2fs: add a punch discard command function This patch add a function to punch discard command if one segment reuse before discard. Split this segment from multi-segments discard range, and discard the left bigger range. Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit c81abe34fe1ec5e60e5cba6adc912d30e44cc40d Author: Jaegeuk Kim Date: Tue Mar 7 18:02:02 2017 -0800 f2fs: allocate a bio for discarding when actually issuing it Let's allocate a bio when issuing discard commands later. Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 4 +- fs/f2fs/segment.c | 138 +++++++++++++++++++++++++++++------------------------- 2 files changed, 78 insertions(+), 64 deletions(-) commit a29d0e0bc0eeefad2a50a8aa7e3f4b98f72c7feb Author: Yunlei He Date: Wed Mar 1 18:07:10 2017 +0800 f2fs: skip writeback meta pages if cp_mutex acquire failed Skip writeback meta pages if cp_mutex lock acquire failed, cp will flush dirty pages instead. Signed-off-by: Yunlei He Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5ce4738a0250ba9b6fbc89900ee0fc92a5eb60db Author: Jaegeuk Kim Date: Tue Mar 7 13:54:56 2017 -0800 f2fs: show more precise message on orphan recovery failure This case is not caused by fsck.f2fs. User needs to retry mount. Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc7d5bc427219eab268edb75cc9bfc7fdd8174e4 Author: Kinglong Mee Date: Tue Feb 28 21:34:37 2017 +0800 f2fs: remove dead macro PGOFS_OF_NEXT_DNODE Fixes: 3cf4574705 ("f2fs: introduce get_next_page_offset to speed up SEEK_DATA") Signed-off-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 6 ------ 1 file changed, 6 deletions(-) commit 0b28b71e298fb7b74ee8a74e2f9d4d45c44f5483 Author: Kinglong Mee Date: Tue Feb 28 21:34:47 2017 +0800 f2fs: drop duplicate radix tree lookup of nat_entry_set The nat entry is listed from the set list for freeing, it's duplicate to do radix tree lookup again. Signed-off-by: Kinglong Mee [Jaegeuk Kim: remove unnecessary f2fs_bug_on] Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 20fda56b018550cfd3a352b2f027eb42b1991bc4 Author: Kinglong Mee Date: Sat Mar 4 22:13:10 2017 +0800 f2fs: make sure trace all f2fs_issue_flush The root device's issue flush trace is missing, add it and tracing the result from submit. Fixes d50aaeec90 ("f2fs: show actual device info in tracepoints") Signed-off-by: Kinglong Mee Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 24 +++++++++++++----------- include/trace/events/f2fs.h | 11 +++++++---- 2 files changed, 20 insertions(+), 15 deletions(-) commit 8ff0971f1500953935339c23c91f660793fd4c64 Author: Chao Yu Date: Fri Mar 17 15:43:57 2017 +0800 f2fs: don't allow volatile writes for non-regular file Now f2fs only supports volatile writes for journal db regular file. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 3 +++ 1 file changed, 3 insertions(+) commit e811898c97f83aef6c1652fbfbf5294bf542159c Author: Jaegeuk Kim Date: Fri Mar 17 10:04:15 2017 +0800 f2fs: don't allow atomic writes for not regular files The atomic writes only supports regular files for database. Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 3 +++ 1 file changed, 3 insertions(+) commit 8c242db9b8c01b252290e23827163787f07e01d1 Author: Jaegeuk Kim Date: Fri Mar 17 09:55:52 2017 +0800 f2fs: fix stale ATOMIC_WRITTEN_PAGE private pointer When I forced to enable atomic operations intentionally, I could hit the below panic, since we didn't clear page->private in f2fs_invalidate_page called by file truncation. The panic occurs due to NULL mapping having page->private. BUG: unable to handle kernel paging request at ffffffffffffffff IP: drop_buffers+0x38/0xe0 PGD 5d00c067 PUD 5d00e067 PMD 0 CPU: 3 PID: 1648 Comm: fsstress Tainted: G D OE 4.10.0+ #5 Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 task: ffff9151952863c0 task.stack: ffffaaec40db4000 RIP: 0010:drop_buffers+0x38/0xe0 RSP: 0018:ffffaaec40db74c8 EFLAGS: 00010292 Call Trace: ? page_referenced+0x8b/0x170 try_to_free_buffers+0xc5/0xe0 try_to_release_page+0x49/0x50 shrink_page_list+0x8bc/0x9f0 shrink_inactive_list+0x1dd/0x500 ? shrink_active_list+0x2c0/0x430 shrink_node_memcg+0x5eb/0x7c0 shrink_node+0xe1/0x320 do_try_to_free_pages+0xef/0x2e0 try_to_free_pages+0xe9/0x190 __alloc_pages_slowpath+0x390/0xe70 __alloc_pages_nodemask+0x291/0x2b0 alloc_pages_current+0x95/0x140 __page_cache_alloc+0xc4/0xe0 pagecache_get_page+0xab/0x2a0 grab_cache_page_write_begin+0x20/0x40 get_read_data_page+0x2e6/0x4c0 [f2fs] ? f2fs_mark_inode_dirty_sync+0x16/0x30 [f2fs] ? truncate_data_blocks_range+0x238/0x2b0 [f2fs] get_lock_data_page+0x30/0x190 [f2fs] __exchange_data_block+0xaaf/0xf40 [f2fs] f2fs_fallocate+0x418/0xd00 [f2fs] vfs_fallocate+0x157/0x220 SyS_fallocate+0x48/0x80 Signed-off-by: Yunlei He Signed-off-by: Chao Yu [Chao Yu: use INMEM_INVALIDATE for better tracing] Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 2 +- fs/f2fs/f2fs.h | 2 ++ fs/f2fs/segment.c | 30 ++++++++++++++++++++++++++++++ include/trace/events/f2fs.h | 2 ++ 4 files changed, 35 insertions(+), 1 deletion(-) commit 592d42ac7fd36408979e09bf2f170f2595dab7b8 Merge: f9fe1c1 e50728e Author: David S. Miller Date: Tue Mar 21 19:02:38 2017 -0700 Merge branch 'qed-IOV-cleanups' Yuval Mintz says: ==================== qed: IOV related clenaups This patch series targets IOV functionality [on both PF and VF]. Patches #2, #3 and #5 fix flows relating to malicious VFs, either by upgrading and aligning current safe-guards or by correcing racy flows. Patches #1 and #8 make some malicious/dysnfunctional VFs logging appear by default in logs. The rest of the patches either cleanup the existing code or else correct some possible [yet fairly insignicant] issues in VF behavior. ==================== Signed-off-by: David S. Miller commit e50728effe1126eae39445ba144078b1305b7047 Author: Mintz, Yuval Date: Sun Mar 19 13:08:20 2017 +0200 qed: Always publish VF link from leading hwfn The link information exists only on the leading hwfn, but some of its derivatives [e.g., min/max rate] need to be configured for each hwfn. When re-basing the VF link view, use the leading hwfn information as basis for all existing hwfns to allow said configurations to stick. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_sriov.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit e99a21cb81214293f158a0ff09328818e24af47b Author: Mintz, Yuval Date: Sun Mar 19 13:08:19 2017 +0200 qed: Raise verbosity of Malicious VF indications Malicious VF existance should be interesting enough for the hyperuser. Change the PF indication that one of its child VF became malicious to appear by default. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_sriov.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit cccf6f5cdc96ef6fa02f27ecd8073406a402929a Author: Mintz, Yuval Date: Sun Mar 19 13:08:18 2017 +0200 qed: Make qed_iov_mark_vf_flr() return bool Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_sriov.c | 9 +++++---- drivers/net/ethernet/qlogic/qed/qed_sriov.h | 10 +++++----- 2 files changed, 10 insertions(+), 9 deletions(-) commit 4c4fa793002ea301421c029a72138576be213c19 Author: Mintz, Yuval Date: Sun Mar 19 13:08:17 2017 +0200 qed: Deprecate VF multiple queue-stop The PF<->VF interface allows for the VF to request multiple queues closure via a single message, but this has never been used by any official driver. We now deprecate this option, forcing each queue close to arrive via a different command; This would be required for future TLVs that are going to extend the queue TLVs with additional information on a per-queue basis. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_sriov.c | 104 ++++++++++++++++------------ drivers/net/ethernet/qlogic/qed/qed_vf.h | 4 ++ 2 files changed, 62 insertions(+), 46 deletions(-) commit f109c240c419b73c4dccab820e3525ef8e922f51 Author: Mintz, Yuval Date: Sun Mar 19 13:08:16 2017 +0200 qed: Uniform IOV queue validation PF needs to validate the status of VF queues before asking firmware to configure anything for them, but that validation is done in various different forms - sometimes inadequate. Add auxillary functions that can be used for testing of the queue state and convert the various flows to use those instead of current existing flows; Also, add missing validations where needed. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_sriov.c | 123 +++++++++++++++++++++------- 1 file changed, 92 insertions(+), 31 deletions(-) commit b801b1591c10f546206d4db29a31793a4e1efbbb Author: Mintz, Yuval Date: Sun Mar 19 13:08:15 2017 +0200 qed: Correct default VF coalescing configuration When starting the VF's vport, the PF would first configure the status blocks of the VF and then reset them. That would cause some of the configured information to be lost - specifically it would mean that all the VFs queues would use the Rx coalescing state-machine of the status block. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_sriov.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d91940818d81ca1761de855c17f3528b3ec7eabe Author: Mintz, Yuval Date: Sun Mar 19 13:08:14 2017 +0200 qed: Set HW-channel to ready before ACKing VF When PF responds to the VF requests it also cleans the HW-channel indication in firmware to allow further VF messages to arrive, but the order currently applied is wrong - The PF is copying by DMAE the response the VF is polling on for completion, and only afterwards sets the HW-channel to ready state. This creates a race condition where the VF would be able to send an additional message to the PF before the channel would get ready again, causing the firmware to consider the VF as malicious. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_sriov.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 4e9b2a67269a26d17608411db6ae2539f34ca191 Author: Mintz, Yuval Date: Sun Mar 19 13:08:13 2017 +0200 qed: Clean VF malicious indication when disabling IOV When a VF is considered malicious, driver handling of the VF FLR flow would clean said indication - but not if the FLR is part of an sriov-disable flow. That leads to further issues, as PF wouldn't re-enable the previously malicious VF when sriov is re-enabled. No reason for that - simply clean malicious indications in the sriov-disable flow as well. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_sriov.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 81e64ef673962826038d51845f3c1a56bc898fb2 Author: Mintz, Yuval Date: Sun Mar 19 13:08:12 2017 +0200 qed: Increase verbosity of VF -> PF errors VFs are currently logging errors when communicating with their PFs in a too-low verbosity that wouldn't be shown by default. As timeouts and failed commands are crucial for VF operability, make them appear by default. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_vf.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit f9fe1c12d126f9887441fa5bb165046f30ddd4b5 Author: Andreas Gruenbacher Date: Sat Mar 18 00:36:15 2017 +0100 rhashtable: Add rhashtable_lookup_get_insert_fast Add rhashtable_lookup_get_insert_fast for fixed keys, similar to rhashtable_lookup_get_insert_key for explicit keys. Signed-off-by: Andreas Gruenbacher Acked-by: Herbert Xu Signed-off-by: David S. Miller include/linux/rhashtable.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 9549c6c872beee08ddb5bb92715bfde3b7161a88 Author: Rick Farrington Date: Fri Mar 17 15:43:26 2017 -0700 liquidio: fix for vf mac addr command sent to nic firmware Change to support host<->firmware command return value. Fix for vf mac addr state command. 1. Added support for firmware commands to return a value: - previously, the returned code overlapped with host codes, thus commands were only returning 0 (success) or -1 (interpreted as timeout) - per 'response_manager.h', the error codes are split into two fields (major/minor) now, firmware commands are grouped into their own 'major' group, separate from the host's 'major' group, which allow f/w commands to return any 16-bit value 2. The command to set vf mac addr was logging a success message even if command failed. Now command uses a callback function to log the status message. 3. The command to set vf mac addr was not logging a message when set via the host 'ip' command. Now, the callback function will log an appropriate message. Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_core.c | 19 ++++++++++++++----- drivers/net/ethernet/cavium/liquidio/lio_main.c | 3 ++- .../net/ethernet/cavium/liquidio/response_manager.c | 11 +++++++++-- .../net/ethernet/cavium/liquidio/response_manager.h | 5 +++++ 4 files changed, 30 insertions(+), 8 deletions(-) commit 71dbc3414caaf68d1914f63864b65d2a4d0bc39c Author: Philippe Reynes Date: Fri Mar 17 23:34:04 2017 +0100 net: usb: pegasus: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Acked-by: Petko Manolov Signed-off-by: David S. Miller drivers/net/usb/pegasus.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 71f0cfe84b502ec20ccb2103beed13b063286f63 Merge: e74bad6 ea5509f Author: David S. Miller Date: Tue Mar 21 17:46:14 2017 -0700 Merge branch 'ibmvnic-init' John Allen says: ==================== ibmvnic: Initialization fixes and improvements These patches resolve issues with the ibmvnic initialization process. ==================== Signed-off-by: David S. Miller commit ea5509f53ce81662eb409c514086734d1ce16207 Author: John Allen Date: Fri Mar 17 17:13:43 2017 -0500 ibmvnic: Correct ibmvnic handling of device open/close When closing the ibmvnic device we need to release the resources used in communicating to the virtual I/O server. These need to be re-negotiated with the server at open time. This patch moves the releasing of resources a separate routine and updates the open and close handlers to release all resources at close and re-negotiate and allocate these resources at open. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 114 +++++++++++++++++++++---------------- drivers/net/ethernet/ibm/ibmvnic.h | 1 + 2 files changed, 67 insertions(+), 48 deletions(-) commit f6ef6408e840f6e1a7c016d6dd1b4341bc1023f6 Author: John Allen Date: Fri Mar 17 17:13:42 2017 -0500 ibmvnic: Move ibmvnic adapter intialization to its own routine The intialization of the ibmvnic driver with respect to the virtual server it connects to should be moved to its own routine. This will alolow the driver to initiate this process from places outside of the drivers probe routine. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 110 ++++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 50 deletions(-) commit a57a5d25a56bd9625722d17fecacf21cbe9818d8 Author: John Allen Date: Fri Mar 17 17:13:41 2017 -0500 ibmvnic: Move login to its own routine Move the code that handles login and renegotiation of ibmvnic capabilities to its own routine. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit bd0b6723139416fd22acd5849b93edbd32d561f3 Author: John Allen Date: Fri Mar 17 17:13:40 2017 -0500 ibmvnic: Move login and queue negotiation into ibmvnic_open VNIC server expects LINK_STATE_UP to be sent within 30s of the login. If we exceed the timeout, VNIC server will attempt to fail over. Since time between probe and open of the device is indeterminate, move login and queue negotiation into ibmvnic open so we can guarantee that login and sending LINK_STATE_UP occur within the 30s window. Signed-off-by: John Allen Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 88 +++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 45 deletions(-) commit e74bad6b015b732d8269a8ddfb303c9b33092722 Author: Philippe Reynes Date: Fri Mar 17 22:54:04 2017 +0100 net: sun: sungem: rix a possible null dereference The function gem_begin_auto_negotiation dereference the pointer ep before testing if it's null. This patch add a check on ep before dereferencing it. Fixes: 92552fdda557 ("net: sun: sungem: use new api ethtool_{get|set}_link_ksettings") Reported-by: Dan Carpenter Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/sun/sungem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c5b71e633da381c299990341ec88694bd00ecad1 Author: Rick Farrington Date: Fri Mar 17 11:23:08 2017 -0700 liquidio: add debug error messages to report command timeout Add timeout error message in lio_process_ordered_list(). Add host failure status in existing error message in if_cfg_callback(). Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 4 ++-- drivers/net/ethernet/cavium/liquidio/response_manager.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit 1f697ab109d60392f14c5e79eb6caf96805e68e9 Author: Satanand Burla Date: Fri Mar 17 10:50:05 2017 -0700 liquidio: remove duplicate code Remove code duplicated in PF and VF; define that code once only in a common header file included by PF and VF. Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 36 ---------------------- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 36 ---------------------- .../net/ethernet/cavium/liquidio/octeon_network.h | 36 ++++++++++++++++++++++ 3 files changed, 36 insertions(+), 72 deletions(-) commit af48251cc1aa94b8590453eeeee7cdcff9e07c31 Merge: 8855e14 cfb9f93 Author: Olof Johansson Date: Tue Mar 21 17:38:11 2017 -0700 Merge tag 'renesas-dt-bindings-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Renesas ARM Based SoC DT Bindings Updates for v4.12 * Document RZ/G1N and RZ/G1H SoC DT bindings * tag 'renesas-dt-bindings-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: Document RZ/G1N SoC DT binding ARM: shmobile: Document RZ/G1H SoC DT binding Signed-off-by: Olof Johansson commit 49240e87a03fdb27413bfd9a1b9785257d7961d5 Merge: a618a73 cd59de8 Author: Olof Johansson Date: Tue Mar 21 17:36:35 2017 -0700 Merge tag 'renesas-drivers-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers Renesas ARM Based SoC Drivers Updates for v4.12 * Identify RZ/G1N and RZ/G1H * tag 'renesas-drivers-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: soc: renesas: Identify RZ/G1N soc: renesas: Identify RZ/G1H Signed-off-by: Olof Johansson commit 8855e14d61e96966dd2b2c045304b89cbb504fa9 Merge: c2a736b d01ff18 Author: Olof Johansson Date: Tue Mar 21 17:35:06 2017 -0700 Merge tag 'renesas-dt-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Renesas ARM Based SoC DT Updates for v4.12 Cleanup: * Drop superfluous status update for frequency override on various boards * Always use status "okay" to enable devices on porger board * Add INTC-SYS clock to device tree of various SoCs * Tidyup Audio-DMAC channel for DVC on r8a779[013] SoCs * Remove unit-address and reg from integrated cache on various SoCs * Switch from ARCH_SHMOBILE_MULTI to ARCH_RENESAS * Fix SCIFB0 dmas indentation on r8a774[35] SoCs Enhancements: * Add watchdog timer to r7s72100 SoC * Update sdhi clock bindings on r7s72100 SoC * tag 'renesas-dt-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (31 commits) ARM: dts: silk: Drop superfluous status update for frequency override ARM: dts: alt: Drop superfluous status update for frequency override ARM: dts: gose: Drop superfluous status update for frequency override ARM: dts: porter: Drop superfluous status update for frequency override ARM: dts: koelsch: Drop superfluous status updates for frequency overrides ARM: dts: lager: Drop superfluous status update for frequency override ARM: dts: marzen: Drop superfluous status update for frequency override ARM: dts: bockw: Drop superfluous status update for frequency override ARM: dts: porter: Always use status "okay" to enable devices ARM: dts: r8a7793: Add INTC-SYS clock to device tree ARM: dts: r8a7793: Tidyup Audio-DMAC channel for DVC ARM: dts: r8a7791: Tidyup Audio-DMAC channel for DVC ARM: dts: r8a7794: Add INTC-SYS clock to device tree ARM: dts: r8a7792: Add INTC-SYS clock to device tree ARM: dts: r8a7791: Add INTC-SYS clock to device tree ARM: dts: r8a7790: Add INTC-SYS clock to device tree ARM: dts: r8a73a4: Add INTC-SYS clock to device tree ARM: dts: r7s72100: Add watchdog timer ARM: dts: r8a7790: Tidyup Audio-DMAC channel for DVC ARM: dts: r8a7794: Remove unit-address and reg from integrated cache ... Signed-off-by: Olof Johansson commit 5344df631b9991328943cc931bc677325b09d863 Merge: 7df6fcf 3cbe333 Author: Olof Johansson Date: Tue Mar 21 17:34:09 2017 -0700 Merge tag 'renesas-arm64-dt-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt64 Renesas ARM64 Based SoC DT Updates for v4.12 Cleanup: * Drop superfluous status update for frequency override from all r8a779[56] boards * Tidyup Audio-DMAC channel for DVC for r8a7795 SoC * Remove unit-address and reg from integrated cache on r8a779[56] SoCs Enhancements: * Add all Cortex-A53 and Cortex-A57 CPU cores to r8a7796 SoC * Add Cortex-A53 CPU cores to r8a7795 SoC * Update memory node to 4 GiB map on h3ulcb board * Upgrade to PSCI v1.0 to support Suspend-to-RAM on r8a779[56] SoCs * Add SCIF1 (DEBUG1) to r8a7796/salvator-x board * Add all SCIF and HSCIF nodes with DMA enabled to r8a7796 SoC * Set drive-strength for ravb pins for r8a7795/salvator-x board * Enable gigabit ethernet on r8a779[56]/salvator-x boards * Enable I2C for DVFS device r8a779[56]/salvator-x boards * tag 'renesas-arm64-dt-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (32 commits) arm64: dts: r8a7796: salvator-x: Drop superfluous status update for frequency override arm64: dts: m3ulcb: Drop superfluous status update for frequency override arm64: dts: r8a7795: salvator-x: Drop superfluous status updates for frequency overrides arm64: dts: h3ulcb: Drop superfluous status update for frequency override arm64: dts: r8a7796: Add Cortex-A53 PMU node arm64: dts: r8a7796: Add Cortex-A53 CPU cores arm64: dts: r8a7796: Add CA53 L2 cache-controller node arm64: dts: r8a7796: Add Cortex-A57 PMU node arm64: dts: r8a7796: Add Cortex-A57 CPU cores arm64: dts: r8a7795: Tidyup Audio-DMAC channel for DVC arm64: dts: r8a7795: salvator-x: Set drive-strength for ravb pins arm64: dts: r8a7796: Remove unit-address and reg from integrated cache arm64: dts: r8a7795: Remove unit-addresses and regs from integrated caches arm64: dts: r8a7796: Upgrade to PSCI v1.0 to support Suspend-to-RAM arm64: dts: r8a7795: Upgrade to PSCI v1.0 to support Suspend-to-RAM arm64: dts: r8a7795: Add Cortex-A53 PMU node arm64: dts: r8a7795: Add Cortex-A53 CPU cores arm64: dts: r8a7796: Enable HSCIF DMA arm64: dts: r8a7796: salvator-x: add SCIF1 (DEBUG1) arm64: dts: r8a7796: Enable SCIF DMA ... Signed-off-by: Olof Johansson commit a618a7349f1947c775200c83ccfaeae681c5dbcb Merge: 4495c08 11282a4 Author: Olof Johansson Date: Tue Mar 21 17:33:38 2017 -0700 Merge tag 'reset-for-4.12-1' of git://git.pengutronix.de/git/pza/linux into next/drivers Reset controller changes for v4.12 - make reset drivers with bool Kconfig options explicitly non-modular - fix uniphier non-static symbol warnings - fix socfpga nr_resets property - new drivers for the Arria10 and i.MX7 system reset controllers - fix sunxi 64-bit compilation * tag 'reset-for-4.12-1' of git://git.pengutronix.de/git/pza/linux: reset: sunxi: fix for 64-bit compilation reset: Add Altera Arria10 SR Reset Controller dt-bindings: reset: a10sr: Add Arria10 SR Reset Controller offsets reset: Add i.MX7 SRC reset driver reset-socfpga: Fix nr_resets property reset: uniphier: fix non static symbol warnings reset: pistachio: make it explicitly non-modular reset: ath79: make it explicitly non-modular reset: oxnas: make it explicitly non-modular reset: meson: make it explicitly non-modular Signed-off-by: Olof Johansson commit c2a736b698008d296c5010ec39077eeb5796109f Author: Linus Walleij Date: Sat Mar 18 17:40:01 2017 +0100 ARM: dts: Adjust moxart IRQ controller and flags The moxart interrupt line flags were not respected in previous driver: instead of assigning them per-consumer, a fixes mask was set in the controller. With the migration to a standard Faraday driver we need to set up and handle the consumer flags correctly. Also remove the Moxart-specific flags when switching to using real consumer flags. Extend the register window to 0x100 bytes as we may have a few more registers in there and it doesn't hurt. Tested-by: Jonas Jensen Signed-off-by: Jonas Jensen Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/boot/dts/moxart-uc7112lx.dts | 2 +- arch/arm/boot/dts/moxart.dtsi | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) commit 7df6fcfb520fbc5249caa8a0676bd3a8309acbb0 Merge: 4495c08 0a6081b Author: Olof Johansson Date: Tue Mar 21 17:26:09 2017 -0700 Merge branch 'shared/dt-symlinks' into next/dt64 * shared/dt-symlinks: arm64: dts: add arm/arm64 include symlinks ARM: dts: add arm/arm64 include symlinks Signed-off-by: Olof Johansson commit 03e1de503046b10864e3fb24e452d6974470b6f9 Merge: de6b08f abe80fd Author: David S. Miller Date: Tue Mar 21 17:24:02 2017 -0700 Merge branch 'stmmac-mq-part3' Joao Pinto says: ==================== net: stmmac: adding multiple buffers and routing As agreed with David Miller, this patch-set is the third and last to enable multiple queues in stmmac. This third one focuses on: a) Enable multiple buffering to the driver and queue independent data b) Configuration of RX and TX queues' priority c) Configuration of RX queues' routing ==================== Signed-off-by: David S. Miller commit abe80fdc6ee664b2f8515f91b45e852b65dbb1a1 Author: Joao Pinto Date: Fri Mar 17 16:11:07 2017 +0000 net: stmmac: RX queue routing configuration This patch adds the configuration of RX queues' routing. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/stmmac.txt | 6 ++++ drivers/net/ethernet/stmicro/stmmac/common.h | 17 +++++++++++ drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 16 ++++++++++ drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 34 ++++++++++++++++++++++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 25 ++++++++++++++++ drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 3 ++ .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 14 +++++++++ include/linux/stmmac.h | 1 + 8 files changed, 116 insertions(+) commit a8f5102af2a7740a4b3200a27beddf27f23f921a Author: Joao Pinto Date: Fri Mar 17 16:11:06 2017 +0000 net: stmmac: TX and RX queue priority configuration This patch adds the configuration of RX and TX queues' priority. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/stmmac.txt | 5 +++ drivers/net/ethernet/stmicro/stmmac/common.h | 4 ++ drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 13 ++++++ drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 37 +++++++++++++++++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 48 ++++++++++++++++++++++ drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 4 ++ .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 16 ++++++++ include/linux/stmmac.h | 4 ++ 8 files changed, 131 insertions(+) commit aff3d9eff84399e433c4aca65a9bb236581bc082 Author: Joao Pinto Date: Fri Mar 17 16:11:05 2017 +0000 net: stmmac: enable multiple buffers This patch creates 2 new structures (stmmac_tx_queue and stmmac_rx_queue) in include/linux/stmmac.h, enabling that each RX and TX queue has its own buffers and data. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/chain_mode.c | 45 +- drivers/net/ethernet/stmicro/stmmac/ring_mode.c | 46 +- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 49 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1306 ++++++++++++++------- 4 files changed, 973 insertions(+), 473 deletions(-) commit 223b9ad701b81f2311bac2562bfc67d8d9d96de1 Merge: db51536 0a6081b Author: Olof Johansson Date: Tue Mar 21 17:21:44 2017 -0700 Merge branch 'shared/dt-symlinks' into next/dt * shared/dt-symlinks: arm64: dts: add arm/arm64 include symlinks ARM: dts: add arm/arm64 include symlinks Signed-off-by: Olof Johansson commit 0a6081b673bb6aaec31771b3111dd6741c94382f Author: Heiko Stuebner Date: Sun Feb 26 07:00:58 2017 +0100 arm64: dts: add arm/arm64 include symlinks Allow including of dtsi files in an architecture-independent manner. Some dtsi files may be shared between architectures and one suggestion was to have symlinks and let these includes get accessed via a #include So add the necessary symlinks for arm32. Suggested-by: Olof Johansson Signed-off-by: Heiko Stuebner Signed-off-by: Olof Johansson arch/arm64/boot/dts/include/arm | 1 + arch/arm64/boot/dts/include/arm64 | 1 + 2 files changed, 2 insertions(+) commit 4027494ae6e351951d618c6505592b971b3883e9 Author: Heiko Stuebner Date: Sun Feb 26 07:00:57 2017 +0100 ARM: dts: add arm/arm64 include symlinks Allow including of dtsi files in an architecture-independent manner. Some dtsi files may be shared between architectures and one suggestion was to have symlinks and let these includes get accessed via a #include So add the necessary symlinks for arm32. Suggested-by: Olof Johansson Signed-off-by: Heiko Stuebner Signed-off-by: Olof Johansson arch/arm/boot/dts/include/arm | 1 + arch/arm/boot/dts/include/arm64 | 1 + 2 files changed, 2 insertions(+) commit de6b08fd82087778c579dc3f3c28bb1c878a993a Author: Tobias Klauser Date: Fri Mar 17 11:52:15 2017 +0100 net: ethoc: Use ether_addr_copy() Use ether_addr_copy() instead of memcpy() to set netdev->dev_addr (which is 2-byte aligned). Signed-off-by: Tobias Klauser Reviewed-by: Thierry Reding Signed-off-by: David S. Miller drivers/net/ethernet/ethoc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ed48440979b9fe870869be8be30dcf679aa27d3 Merge: 33928ee abbdf4b Author: David S. Miller Date: Tue Mar 21 17:16:10 2017 -0700 Merge branch 'mlxsw-cleanups' Jiri Pirko says: ==================== mlxsw: small driver update Contains two cleanup patches. ==================== Signed-off-by: David S. Miller commit abbdf4bd7dd0d814f1af2bd90112e74a2be2c573 Author: Or Gerlitz Date: Fri Mar 17 09:38:01 2017 +0100 mlxsw: spectrum: Align the matchall default case returned value Align the default case for matchall offload with what's there for flower. Signed-off-by: Or Gerlitz Acked-by: Yotam Gigi Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf95233e206983d5a05a2e27700d2678ffdef62c Author: Arkadi Sharshevsky Date: Fri Mar 17 09:38:00 2017 +0100 mlxsw: spectrum: Cosmetic naming change Currently the struct representing router interface "mlxsw_sp_rif" is reffered as "r" in various places in the driver. Furthermore it contains a member which specify the index which is called "rif". This patch change "r" to "rif" and "rif" to "rif_index". Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 8 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 282 +++++++++++---------- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 4 +- 4 files changed, 152 insertions(+), 146 deletions(-) commit 33928eed8d934bb912d8168cd5e57fa80f9122c4 Author: hayeswang Date: Fri Mar 17 11:20:13 2017 +0800 r8152: check hw version first Check hw version first in probe(). Do nothing if the driver doesn't support the chip. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 102 ++++++++++++++++++++++++++++++------------------ 1 file changed, 63 insertions(+), 39 deletions(-) commit a83b576c9c25cf771fb0b15ec5eb2e7510ec2f5a Author: Jens Axboe Date: Tue Mar 21 17:20:01 2017 -0600 block: fix stacked driver stats init and free If a driver allocates a queue for stacked usage, then it does not currently get stats allocated. This causes the later init of, eg, writeback throttling to blow up. Move the init to the queue allocation instead. Additionally, allow a NULL callback unregistration. This avoids having the caller check for that, fixing another oops on removal of a block device that doesn't have poll stats allocated. Fixes: 34dbad5d26e2 ("blk-stat: convert to callback-based statistics reporting") Signed-off-by: Jens Axboe block/blk-core.c | 10 ++++++---- block/blk-stat.c | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) commit b6e13aeaa40017a6caeec89759827e220381d27d Merge: 37a30b4 bde87ad Author: David S. Miller Date: Tue Mar 21 16:04:01 2017 -0700 Merge branch 'usbnet-ksettings' Philippe Reynes says: ==================== net: usbnet: move to new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. On usbnet, it was often implemented with usbnet_{get|set}_settings. In this series, I add usbnet_{get|set}_link_ksettings in the first patch, then I update all the driver to use this new api, and in the last patch I remove the old api usbnet_{get|set}_settings. ==================== Signed-off-by: David S. Miller commit bde87ad64c4cee7a1d5b41d217b440e21050813e Author: Philippe Reynes Date: Thu Mar 16 23:18:57 2017 +0100 net: usb: usb: remove old api ethtool_{get|set}_settings The function usbnet_{get|set}_settings is no longer used, so we remove it. Signed-off-by: Philippe Reynes Acked-by: Oliver Neukum Signed-off-by: David S. Miller drivers/net/usb/usbnet.c | 35 ----------------------------------- include/linux/usb/usbnet.h | 4 ---- 2 files changed, 39 deletions(-) commit fd4f0a75f5f3c722a84cea999b0e9b00853ef3bd Author: Philippe Reynes Date: Thu Mar 16 23:18:56 2017 +0100 net: usb: asix: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/usb/asix_devices.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 39f49eadc3e56609dc50c4abfeba0e4d77a590a3 Author: Philippe Reynes Date: Thu Mar 16 23:18:55 2017 +0100 net: usb: sr9700: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/usb/sr9700.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a44017a504b4d9161eeefbae067af3ef0147526d Author: Philippe Reynes Date: Thu Mar 16 23:18:54 2017 +0100 net: usb: smsc75xx: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/usb/smsc75xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 90a8e95e87720eaf202fb40cc420da02d9072b23 Author: Philippe Reynes Date: Thu Mar 16 23:18:53 2017 +0100 net: usb: sierra_net: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/usb/sierra_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 17400f77b87cd2cf29fde358a05d5efc7b0eabab Author: Philippe Reynes Date: Thu Mar 16 23:18:52 2017 +0100 net: usb: mcs7830: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Tested-by: poma Signed-off-by: David S. Miller drivers/net/usb/mcs7830.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bcb58f777eb1b7030fbe525477530cbf0ac6480d Author: Philippe Reynes Date: Thu Mar 16 23:18:51 2017 +0100 net: usb: dm9601: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/usb/dm9601.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d0b3ab309fd896f80fefa4b1d1a7e45de1fa8a36 Author: Philippe Reynes Date: Thu Mar 16 23:18:50 2017 +0100 net: usb: cdc_ncm: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/usb/cdc_ncm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d8c3de2e8603f31de502f63e6997e55e7439eab9 Author: Philippe Reynes Date: Thu Mar 16 23:18:49 2017 +0100 net: usb: sr9800: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/usb/sr9800.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eaf9a32a448bf01468bee5737c9391110ec05725 Author: Philippe Reynes Date: Thu Mar 16 23:18:48 2017 +0100 net: usb: smsc95xx: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/usb/smsc95xx.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 8bae3551e93de4e8a5b959c495b06de9264be0d5 Author: Philippe Reynes Date: Thu Mar 16 23:18:47 2017 +0100 net: usb: usbnet: add new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We add the new api {get|set}_link_ksettings to this driver. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Acked-by: Oliver Neukum Signed-off-by: David S. Miller drivers/net/usb/usbnet.c | 36 ++++++++++++++++++++++++++++++++++++ include/linux/usb/usbnet.h | 4 ++++ 2 files changed, 40 insertions(+) commit f22913d0b5560ae621e8a7391e9547d5a6fd8893 Author: Philippe Reynes Date: Mon Feb 6 00:11:11 2017 +0100 ixgb: use new API ethtool_{get|set}_link_ksettings The ethtool API {get|set}_settings is deprecated. We move this driver to new API {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgb/ixgb_ethtool.c | 39 +++++++++++++++----------- 1 file changed, 23 insertions(+), 16 deletions(-) commit 1120ecd5aa38c385e747b8fb300d5597dcb2d19c Author: Philippe Reynes Date: Sun Feb 5 23:55:19 2017 +0100 igbvf: use new API ethtool_{get|set}_link_ksettings The ethtool API {get|set}_settings is deprecated. We move this driver to new API {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igbvf/ethtool.c | 38 +++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit c19153008ba0f7b86234820e8a87d58806707a15 Author: Philippe Reynes Date: Sun Feb 5 18:55:44 2017 +0100 igb: use new API ethtool_{get|set}_link_ksettings The ethtool API {get|set}_settings is deprecated. We move this driver to new API {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_ethtool.c | 138 ++++++++++++++------------- 1 file changed, 73 insertions(+), 65 deletions(-) commit fb052fdd2662f7725b9b86889a6664523f872aab Author: Philippe Reynes Date: Thu Jan 26 22:19:53 2017 +0100 e1000e: use new API ethtool_{get|set}_link_ksettings The ethtool API {get|set}_settings is deprecated. We move this driver to new API {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/ethtool.c | 111 +++++++++++++++------------- 1 file changed, 59 insertions(+), 52 deletions(-) commit 37a30b435b92a6b577795c642b6326fd0ea96e3f Author: Florian Fainelli Date: Thu Mar 16 10:27:08 2017 -0700 net: bcmgenet: Track per TX/RX rings statistics __bcmgenet_tx_reclaim() is currently summing TX bytes/packets in a way that is not SMP friendly, mutliples CPUs could run __bcmgenet_tx_reclaim() independently and still update stats->tx_bytes and stats->tx_packets, cloberring the other CPUs statistics. Fix this by tracking per RX and TX rings the number of bytes, packets, dropped and errors statistics, and provide a bcmgenet_get_stats() function which aggregates everything and returns a consistent output. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 77 +++++++++++++++++++++++--- drivers/net/ethernet/broadcom/genet/bcmgenet.h | 6 ++ 2 files changed, 75 insertions(+), 8 deletions(-) commit 5add2f9a1bcca38410bce1d376271be3fef8d23f Author: Philippe Reynes Date: Sat Jan 21 16:06:03 2017 +0100 e1000: use new API ethtool_{get|set}_link_ksettings The ethtool API {get|set}_settings is deprecated. We move this driver to new API {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 117 +++++++++++------------ 1 file changed, 58 insertions(+), 59 deletions(-) commit bf4e0a3db97eb882368fd82980b3b1fa0b5b9778 Author: Nikolay Aleksandrov Date: Thu Mar 16 15:28:00 2017 +0200 net: ipv4: add support for ECMP hash policy choice This patch adds support for ECMP hash policy choice via a new sysctl called fib_multipath_hash_policy and also adds support for L4 hashes. The current values for fib_multipath_hash_policy are: 0 - layer 3 (default) 1 - layer 4 If there's an skb hash already set and it matches the chosen policy then it will be used instead of being calculated (currently only for L4). In L3 mode we always calculate the hash due to the ICMP error special case, the flow dissector's field consistentification should handle the address order thus we can remove the address reversals. If the skb is provided we always use it for the hash calculation, otherwise we fallback to fl4, that is if skb is NULL fl4 has to be set. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 8 +++ include/net/ip_fib.h | 14 ++---- include/net/netns/ipv4.h | 1 + include/net/route.h | 6 +-- net/ipv4/fib_semantics.c | 11 ++-- net/ipv4/icmp.c | 19 +------ net/ipv4/route.c | 92 ++++++++++++++++++++++++++-------- net/ipv4/sysctl_net_ipv4.c | 9 ++++ 8 files changed, 100 insertions(+), 60 deletions(-) commit 88997e4208aea117627898e5f6f9801cf3cd42d2 Author: Andrey Vagin Date: Wed Mar 15 17:41:14 2017 -0700 net/8021q: create device with all possible features in wanted_features wanted_features is a set of features which have to be enabled if a hardware allows that. Currently when a vlan device is created, its wanted_features is set to current features of its base device. The problem is that the base device can get new features and they are not propagated to vlan-s of this device. If we look at bonding devices, they doesn't have this problem and this patch suggests to fix this issue by the same way how it works for bonding devices. We meet this problem, when we try to create a vlan device over a bonding device. When a system are booting, real devices require time to be initialized, so bonding devices created without slaves, then vlan devices are created and only then ethernet devices are added to the bonding device. As a result we have vlan devices with disabled scatter-gather. * create a bonding device $ ip link add bond0 type bond $ ethtool -k bond0 | grep scatter scatter-gather: off tx-scatter-gather: off [requested on] tx-scatter-gather-fraglist: off [requested on] * create a vlan device $ ip link add link bond0 name bond0.10 type vlan id 10 $ ethtool -k bond0.10 | grep scatter scatter-gather: off tx-scatter-gather: off tx-scatter-gather-fraglist: off * Add a slave device to bond0 $ ip link set dev eth0 master bond0 And now we can see that the bond0 device has got the scatter-gather feature, but the bond0.10 hasn't got it. [root@laptop linux-task-diag]# ethtool -k bond0 | grep scatter scatter-gather: on tx-scatter-gather: on tx-scatter-gather-fraglist: on [root@laptop linux-task-diag]# ethtool -k bond0.10 | grep scatter scatter-gather: off tx-scatter-gather: off tx-scatter-gather-fraglist: off With this patch the vlan device will get all new features from the bonding device. Here is a call trace how features which are set in this patch reach dev->wanted_features. register_netdevice vlan_dev_init ... dev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE | NETIF_F_HIGHDMA | NETIF_F_SCTP_CRC | NETIF_F_ALL_FCOE; dev->features |= dev->hw_features; ... dev->wanted_features = dev->features & dev->hw_features; __netdev_update_features(dev); vlan_dev_fix_features ... Cc: Alexey Kuznetsov Cc: Patrick McHardy Cc: "David S. Miller" Signed-off-by: Andrei Vagin Signed-off-by: David S. Miller net/8021q/vlan_dev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b3407c8e5eb78e4e0b57a97a4dd2e411354b60cd Author: Ezequiel Lara Gomez Date: Sat Mar 11 20:06:01 2017 +0000 Cleanup some warning from timestamping code. Following checkpatch.pl recommendations (which include replacing with the , since linux/io.h includes it). Signed-off-by: Ezequiel Lara Gomez Signed-off-by: David S. Miller drivers/net/loopback.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 6df014cffbe335ea7f41ee5324d8ba2047d3f0d0 Author: Ezequiel Lara Gomez Date: Sat Mar 11 20:06:54 2017 +0000 Enable tx timestamping on loopback and dummy This enables developing code that uses SOF_TIMESTAMPING_TX_SOFTWARE by using localhost addresses (without needing to send packets outside), as well as enabling unit and functional testing of TX timestamping code without needing hardware support or network access. It also fulfills the expectation of software network devices supporting software-based timestamping. Tested on qemu using txtimestamping.c from the kernel selftests, and ethtool -T. Signed-off-by: Ezequiel Lara Gomez Signed-off-by: David S. Miller drivers/net/dummy.c | 15 +++++++++++++++ drivers/net/loopback.c | 15 +++++++++++++++ 2 files changed, 30 insertions(+) commit 406910a8ba0f0d4d36d1106f3106c47d6c86a33d Merge: 41e9573 c6da525 Author: David S. Miller Date: Tue Mar 21 14:35:21 2017 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-03-20 This series contains updates to i40e and i40evf only. Philippe Reynes updates i40e and i40evf to use the new ethtool API for {get|set}_link_ksettings. Jake provides the remaining patches in the series, starting with a fix for i40e where the firmware expected the port numbers for the offloaded UDP tunnels in Little Endian format and we were sending them in Big Endian format which put the wrong port number to be put in the UDP tunnel list. Changed the driver to use __be32 values instead of arrays for (src|dst)_ip. Refactored the exit flow of i40e_add_fdir_ethtool() which removes the dependency on having a non-zero return value. Fixed a memory leak by running kfree() and returning immediately when we fail to add flow director filter. Fixed a potential issue where could update the filter count without actually succeeding in adding a filter, by moving the ATR exit check to after we have sent the TCP/IPv4 filter to the ring successfully. Ensures that the fd_tcp_rule count is reset to 0, before we reprogram the filters so that we do not end up with a stale count which does not correctly reflect the number of programmed filters. Added a check whether we have TCP/IPv4 filters before re-enabling ATR after flushing and replaying FDIR filters. Added counters for each filter type in preparation for adding code to properly check the mask value. Fixed potential issues by explicitly checking the flow type at the start of i40e_add_fdir_ethtool(). To avoid possible memory leaks, we now unconditionally delete the old filter, even if it is identical to the new filter and ensures will always update the filters as expected. ==================== Signed-off-by: David S. Miller commit 41e95736b30833710c1e77a2877c2d71133450f7 Merge: b9974d7 4485a84 Author: David S. Miller Date: Tue Mar 21 14:28:08 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next The following patchset contains Netfilter/IPVS updates for your net-next tree. A couple of new features for nf_tables, and unsorted cleanups and incremental updates for the Netfilter tree. More specifically, they are: 1) Allow to check for TCP option presence via nft_exthdr, patch from Phil Sutter. 2) Add symmetric hash support to nft_hash, from Laura Garcia Liebana. 3) Use pr_cont() in ebt_log, from Joe Perches. 4) Remove some dead code in arp_tables reported via static analysis tool, from Colin Ian King. 5) Consolidate nf_tables expression validation, from Liping Zhang. 6) Consolidate set lookup via nft_set_lookup(). 7) Remove unnecessary rcu read lock side in bridge netfilter, from Florian Westphal. 8) Remove unused variable in nf_reject_ipv4, from Tahee Yoo. 9) Pass nft_ctx struct to object initialization indirections, from Florian Westphal. 10) Add code to integrate conntrack helper into nf_tables, also from Florian. 11) Allow to check if interface index or name exists via NFTA_FIB_F_PRESENT, from Phil Sutter. 12) Simplify resolve_normal_ct(), from Florian. 13) Use per-limit spinlock in nft_limit and xt_limit, from Liping Zhang. 14) Use rwlock in nft_set_rbtree set, also from Liping Zhang. 15) One patch to remove a useless printk at netns init path in ipvs, and several patches to document IPVS knobs. 16) Use refcount_t for reference counter in the Netfilter/IPVS code, from Elena Reshetova. ==================== Signed-off-by: David S. Miller commit b9974d76f2f505ab0fe9101766b302511988dece Merge: fe723df 3a1eb6d Author: David S. Miller Date: Tue Mar 21 14:19:20 2017 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2017-03-17 This series contains updates to mainly igb, with one fix for ixgbe. Alex does all the changes in the series, starting with adding support for DMA_ATTR_WEAK_ORDERING to improve performance on some platforms. Modified igb to use the length of the packet instead of the DD status bit to determine if a new descriptor is ready to be processed. Modified the driver to only go through the region in the receive ring that was designated to be cleaned up, instead of going through the entire ring on cleanup. Cleaned up the transmit side, by clearing the transmit buffer_info only when resetting the rings. Added a new upper limit for receive, which is based on the size of a 2K buffer minus padding, which will allow us to support build_skb going forward. Fixed ethtool testing to only sync on the size of the frame that is being tested, instead of the entire receive buffer. Updated the handling of page addresses to always use a void pointer with the consistent name of "va" to indicate that we are working with a virtual address. Added a "chicken bit" so that we can turn off the new receive allocation feature, in the case where we need to fallback to the legacy receive path. Added support for using 3K buffers in order 1 pages the same way we were using 2K buffers in 4K pages. Added support for padding packet, since we limit the size of the frame, we are able to write to an offset within the buffer instead of having to write at the very start of the buffer. This allows us to leaving padding room for things like supporting XDP in the future. Refactored the receive buffer page management, since there are 2-3 paths that can be taken depending on what receive modes are enabled, so to improve maintainability, break out the common bits into their own functions. Add support for build_skb, again. Lastly, fixed a typo in igb and ixgbe code comments. ==================== Signed-off-by: David S. Miller commit aa51d08a11784a431266055d58d28b4c4c76a79e Author: Jaegeuk Kim Date: Tue Mar 7 13:41:22 2017 -0800 f2fs: build stat_info before orphan inode recovery f2fs_sync_fs() -> write_checkpoint() calls stat_inc_cp_count(sbi->stat_info), which needs stat_info allocation. Otherwise, we can hit: [254042.598623] ? count_shadow_nodes+0xa0/0xa0 [254042.598633] f2fs_sync_fs+0x65/0xd0 [f2fs] [254042.598645] f2fs_balance_fs_bg+0xe4/0x1c0 [f2fs] [254042.598657] f2fs_write_node_pages+0x34/0x1a0 [f2fs] [254042.598664] ? pagevec_lookup_entries+0x1e/0x30 [254042.598673] do_writepages+0x1e/0x30 [254042.598682] __writeback_single_inode+0x45/0x330 [254042.598688] writeback_single_inode+0xd7/0x190 [254042.598694] write_inode_now+0x86/0xa0 [254042.598699] iput+0x122/0x200 [254042.598709] f2fs_fill_super+0xd4a/0x14d0 [f2fs] [254042.598717] mount_bdev+0x184/0x1c0 [254042.598934] ? f2fs_commit_super+0x100/0x100 [f2fs] [254042.599142] f2fs_mount+0x15/0x20 [f2fs] [254042.599349] mount_fs+0x39/0x160 [254042.599554] ? __alloc_percpu+0x15/0x20 [254042.599759] vfs_kern_mount+0x67/0x110 [254042.599972] do_mount+0x1bb/0xc80 [254042.600175] ? memdup_user+0x42/0x60 [254042.600380] SyS_mount+0x83/0xd0 [254042.600583] entry_SYSCALL_64_fastpath+0x1e/0xad Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 10a875f82b50adc83036368086df9c4cfff7888c Author: Kinglong Mee Date: Wed Mar 8 09:49:53 2017 +0800 f2fs: fix the fault of calculating blkstart twice When the zone type is BLK_ZONE_TYPE_CONVENTIONAL, the blkstart is calculated twice. Signed-off-by: Kinglong Mee Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e2f0e962ac2190ab4e0d1ee4b258273d3a51e689 Author: Kinglong Mee Date: Sat Mar 4 21:48:28 2017 +0800 f2fs: fix the fault of checking F2FS_LINK_MAX for rename inode The parent directory's nlink will change, not the inode. Signed-off-by: Kinglong Mee Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/namei.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4f1bca9f0db3dc82297092eafdb95f58ecef5d7a Author: Jaegeuk Kim Date: Tue Mar 7 11:22:45 2017 -0800 f2fs: don't allow to get pino when filename is encrypted After renaming an encrypted file, we have no way to get its encrypted filename from its dentry. Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 3 +++ 1 file changed, 3 insertions(+) commit 8c1b3c0fb6d633d09507ab2dbb23d384941a850a Author: Jaegeuk Kim Date: Tue Mar 7 13:32:20 2017 -0800 f2fs: fix wrong error injection for evict_inode The previous one was not a proper location to inject an error, since there is no point to get errors. Instead, we can emulate EIO during truncation, and the below logic should handle it correctly. Signed-off-by: Jaegeuk Kim fs/f2fs/inode.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 10047f537c8fb33599bae599ed0e1d9551639d80 Author: Kinglong Mee Date: Sat Mar 11 21:18:01 2017 +0800 f2fs: le32_to_cpu for ckpt->cp_pack_total_block_count Fixes: 22ad0b6ab4 ("f2fs: add bitmaps for empty or full NAT blocks") Signed-off-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b71deadbc4d0271cd3b298e57ad8be70b0c391c3 Author: Jaegeuk Kim Date: Fri Mar 10 09:36:10 2017 -0800 f2fs: le16_to_cpu for xattr->e_value_size This patch fixes missing le16 conversion, reported by kbuild test robot. Fixes: 5f35a2cd5 ("f2fs: Don't update the xattr data that same as the exist") Reviewed-by: Kinglong Mee Signed-off-by: Jaegeuk Kim fs/f2fs/xattr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4f295443bff1701430249beec5eb9dc875decc9c Author: Jaegeuk Kim Date: Sat Mar 4 13:56:10 2017 -0800 f2fs: don't need to invalidate wrong node page If f2fs_new_inode() is failed, the bad inode will invalidate 0'th node page during f2fs_evict_inode(), which doesn't need to do. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/inode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a78aaa2c3cf1e60f57ff7b2b3c07f0d469306984 Author: Yunlei He Date: Tue Feb 28 20:32:41 2017 +0800 f2fs: fix an error return value in truncate_partial_data_page This patch fix a error return value in truncate_partial_data_page Signed-off-by: Yunlei He Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7e252fcddfa573bb1ee275b53bba6cef85671d4 Author: Wolfram Sang Date: Mon Mar 6 15:38:59 2017 +0100 Documentation: devicetree: move trivial-devices out of I2C realm The I2C directory is for I2C master controllers, not for clients. So, move the file describing trivial devices one layer upwards where it fits its generic nature way better. Signed-off-by: Wolfram Sang Signed-off-by: Rob Herring .../devicetree/bindings/i2c/trivial-devices.txt | 174 --------------------- .../devicetree/bindings/trivial-devices.txt | 174 +++++++++++++++++++++ 2 files changed, 174 insertions(+), 174 deletions(-) commit b8c8963076cf973186a95e6a676fe991c6bac292 Author: Jerome Brunet Date: Mon Mar 6 18:44:49 2017 +0100 dt-bindings: add vendor prefix for Dioo Dioo (http://http://www.dioo.com) design and produce power analog and mixed signal IC. Signed-off-by: Jerome Brunet Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 4ed91d48259d9ddd378424d008f2e6559f7e78f8 Author: Richard Genoud Date: Fri Mar 3 15:41:47 2017 +0100 dt-bindings: display: atmel: Fix path to atmel-hlcdc.txt The relative path pointed to Documentation/devicetree/bindings/display/mfd/atmel-hlcdc.txt instead of Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt Signed-off-by: Richard Genoud Signed-off-by: Rob Herring Documentation/devicetree/bindings/display/atmel/hlcdc-dc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0bb7b196627640fc38bea1d5859855bfee62ee2 Author: Richard Genoud Date: Fri Mar 3 15:41:46 2017 +0100 dt-bindings: mfd: Fix path to atmel/hlcdc-dc.txt Atmel hlcdc-dc documentation is actually in Documentation/devicetree/bindings/display/atmel/hlcdc-dc.txt Signed-off-by: Richard Genoud Signed-off-by: Rob Herring Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0549519991ace9549170270f22cc26077ddb9490 Author: Greentime Hu Date: Thu Feb 23 10:53:47 2017 +0800 dt-bindings: net: generalize moxart-mac to support all faraday based ftmac IP Andestech and moxa use the same faraday mac IP, so we use faraday,ftmac.txt to describe it. Signed-off-by: Greentime Hu Signed-off-by: Rob Herring .../devicetree/bindings/net/faraday,ftmac.txt | 24 ++++++++++++++++++++++ .../devicetree/bindings/net/moxa,moxart-mac.txt | 21 ------------------- 2 files changed, 24 insertions(+), 21 deletions(-) commit 93bad0678fe27ce61dd9a87cea362bdcd04958c7 Author: Marco Franchi Date: Thu Feb 16 10:23:44 2017 -0200 dt: Add vendor prefix for Sensirion Sensirion is a sensor manufacturer, providing relative humidity sensors, temperature sensor and flow sensor solutions. Signed-off-by: Marco Franchi Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 6234004ce46a87d34106f9b738365f25dc224668 Author: Sean Wang Date: Mon Mar 20 14:47:24 2017 +0800 dt-bindings: leds: Add document bindings for leds-mt6323 This patch adds documentation for devicetree bindings for LED support on MT6323 PMIC. Signed-off-by: Sean Wang Signed-off-by: Jacek Anaszewski .../devicetree/bindings/leds/leds-mt6323.txt | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 216ec6cc4c1939050e91ff2834db1b2e0392e576 Author: Sean Wang Date: Mon Mar 20 14:47:26 2017 +0800 leds: Add LED support for MT6323 PMIC MT6323 PMIC is a multi-function device that includes LED function. It allows attaching up to 4 LEDs which can either be on, off or dimmed and/or blinked with the controller. Signed-off-by: Sean Wang Signed-off-by: Jacek Anaszewski drivers/leds/Kconfig | 8 + drivers/leds/Makefile | 1 + drivers/leds/leds-mt6323.c | 502 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 511 insertions(+) commit a820e33547aee9fd0460106c1fc577a125c23975 Author: Andi Kleen Date: Mon Mar 20 13:17:04 2017 -0700 perf pmu: Special case uncore_ prefix Special case uncore_ prefix in PMU match, to allow for shorter event uncore specifications. Before: perf stat -a -e uncore_cbox/event=0x35,umask=0x1,filter_opc=0x19C/ sleep 1 After perf stat -a -e cbox/event=0x35,umask=0x1,filter_opc=0x19C/ sleep 1 Committer tests: # perf list uncore List of pre-defined events (to be used in -e): uncore_cbox_0/clockticks/ [Kernel PMU event] uncore_cbox_1/clockticks/ [Kernel PMU event] uncore_imc/data_reads/ [Kernel PMU event] uncore_imc/data_writes/ [Kernel PMU event] # perf stat -a -e cbox_0/clockticks/ sleep 1 Performance counter stats for 'system wide': 281,474,976,653,084 cbox_0/clockticks/ 1.000870129 seconds time elapsed # Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Link: http://lkml.kernel.org/r/20170320201711.14142-7-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.y | 3 +++ 1 file changed, 3 insertions(+) commit 8255718f4bedbfb3558fba10ff40a70934f2117d Author: Andi Kleen Date: Mon Mar 20 13:17:03 2017 -0700 perf pmu: Expand PMU events by prefix match When the user specifies a pmu directly, expand it automatically with a prefix match for all available PMUs, similar as we do for the normal aliases now. This allows to specify attributes for duplicated boxes quickly. For example uncore_cbox_{0,6}/.../ can be now specified as uncore_cbox/.../ and it gets automatically expanded for all boxes. This generally makes it more concise to write uncore specifications, and also avoids the need to know the exact topology of the system. Before: % perf stat -a -e uncore_cbox_0/event=0x35,umask=0x1,filter_opc=0x19C/,\ uncore_cbox_1/event=0x35,umask=0x1,filter_opc=0x19C/,\ uncore_cbox_2/event=0x35,umask=0x1,filter_opc=0x19C/,\ uncore_cbox_3/event=0x35,umask=0x1,filter_opc=0x19C/,\ uncore_cbox_4/event=0x35,umask=0x1,filter_opc=0x19C/,\ uncore_cbox_5/event=0x35,umask=0x1,filter_opc=0x19C/ sleep 1 After: % perf stat -a -e uncore_cbox/event=0x35,umask=0x1,filter_opc=0x19C/ sleep 1 v2: Handle all bison rules. Move multi add code to separate function. Handle uncore_ prefix correctly. v3: Move parse_events_multi_pmu_add to separate patch. Move uncore prefix check to separate patch. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170320201711.14142-6-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 25 +++++++++++++++++++++++++ tools/perf/util/parse-events.h | 3 +++ tools/perf/util/parse-events.y | 40 ++++++++++++++++++++++++++-------------- 3 files changed, 54 insertions(+), 14 deletions(-) commit 2073ad3326b7e4577af3d6789edd03df79519d21 Author: Andi Kleen Date: Mon Mar 20 13:17:02 2017 -0700 perf tools: Factor out PMU matching in parser Factor out the PMU name matching in the event parser into a separate function, to use the same code for other grammar rules later. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170320201711.14142-5-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.c | 46 ++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/parse-events.h | 5 +++++ tools/perf/util/parse-events.y | 30 +-------------------------- 3 files changed, 52 insertions(+), 29 deletions(-) commit b4229e9d4cac2295f8f04ec26acd571a391c6c37 Author: Andi Kleen Date: Mon Mar 20 13:17:01 2017 -0700 perf stat: Handle partially bad results with merging When any result that is being merged is bad, mark them all bad to give consistent output in interval mode. No before/after, because the issue was only found in theoretical review and it is hard to reproduce Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170320201711.14142-4-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 430daf2dc7aff16096a137347e6fd03d4af609e9 Author: Andi Kleen Date: Mon Mar 20 13:17:00 2017 -0700 perf stat: Collapse identically named events The uncore PMU has a lot of duplicated PMUs for different subsystems. When expanding an uncore alias we usually end up with a large number of identically named aliases, which makes perf stat output difficult to read. Automatically sum them up in perf stat, unless --no-merge is specified. This can be default because only the uncores generally have duplicated aliases. Other PMUs have unique names. Before: % perf stat --no-merge -a -e unc_c_llc_lookup.any sleep 1 Performance counter stats for 'system wide': 694,976 Bytes unc_c_llc_lookup.any 706,304 Bytes unc_c_llc_lookup.any 956,608 Bytes unc_c_llc_lookup.any 782,720 Bytes unc_c_llc_lookup.any 605,696 Bytes unc_c_llc_lookup.any 442,816 Bytes unc_c_llc_lookup.any 659,328 Bytes unc_c_llc_lookup.any 509,312 Bytes unc_c_llc_lookup.any 263,936 Bytes unc_c_llc_lookup.any 592,448 Bytes unc_c_llc_lookup.any 672,448 Bytes unc_c_llc_lookup.any 608,640 Bytes unc_c_llc_lookup.any 641,024 Bytes unc_c_llc_lookup.any 856,896 Bytes unc_c_llc_lookup.any 808,832 Bytes unc_c_llc_lookup.any 684,864 Bytes unc_c_llc_lookup.any 710,464 Bytes unc_c_llc_lookup.any 538,304 Bytes unc_c_llc_lookup.any 1.002577660 seconds time elapsed After: % perf stat -a -e unc_c_llc_lookup.any sleep 1 Performance counter stats for 'system wide': 2,685,120 Bytes unc_c_llc_lookup.any 1.002648032 seconds time elapsed v2: Split collect_aliases. Rename alias flag. v3: Make sure unsupported/not counted is always printed. v4: Factor out callback change into separate patch. v5: Move check for bad results here Move merged check into collect_data Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170320201711.14142-3-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-stat.txt | 3 +++ tools/perf/builtin-stat.c | 38 ++++++++++++++++++++++++++++++---- tools/perf/util/evsel.h | 1 + 3 files changed, 38 insertions(+), 4 deletions(-) commit fbe51fba82901fd15d3e0a068388fcd7d02dc047 Author: Andi Kleen Date: Mon Mar 20 13:16:59 2017 -0700 perf stat: Factor out callback for collecting event values To be used in next patch to support automatic summing of alias events. v2: Move check for bad results to next patch v3: Remove trivial addition. v4: Use perf_evsel__cpus instead of evsel->cpus Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170320201711.14142-2-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 103 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 80 insertions(+), 23 deletions(-) commit ed7b339fb570749042332169e62541b208fc4296 Author: Arnaldo Carvalho de Melo Date: Tue Mar 21 16:00:50 2017 -0300 perf annotate: Add comment clarifying how the source code line is parsed The source code line number (lineno) needs to be kept in accross calls to symbol__parse_objdump_line() when parsing the output of 'objdump -l -dS', so that it can associate it with the instructions till the next line. See disasm_line__new() and struct disasm_line::line_nr. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Taeung Song Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-7hpx8f8ybdpiujceysaj229w@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9e854388b0d7ed2d77578e2c01d5904c206ce3c7 Merge: 9123aa8 eb3abae Author: Mark Brown Date: Tue Mar 21 18:48:58 2017 +0000 Merge branch 'fix/sun8i' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-sunxi commit 9006a7b3220e7293ef8bc1ac9bba6c54411051c1 Author: Frode Isaksen Date: Tue Mar 21 16:48:46 2017 +0100 spi: spidev_test: add option to continuously transfer data Add option to send+recv bytes with iterations and show the transfer rate every 5 seconds. Example: rate: tx 4235.2kbps, rx 4235.2kbps total: tx 4882.8KB, rx 4882.8KB Signed-off-by: Frode Isaksen Signed-off-by: Mark Brown tools/spi/spidev_test.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 88 insertions(+), 5 deletions(-) commit 02b829f9e11fd9e6eeebc1e85e4d5ae641706c70 Author: Maxime Roussin-Belanger Date: Fri Mar 17 14:04:02 2017 -0400 iio: dac: Add support for ltc2632 DACs Add support for Linear Technology LTC2632 (SPI) family of· dual 12- 10-, and 8-bits output DACs. Signed-off-by: Maxime Roussin-Belanger Signed-off-by: Jean-Francois Dagenais Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/dac/ltc2632.txt | 23 ++ drivers/iio/dac/Kconfig | 10 + drivers/iio/dac/Makefile | 1 + drivers/iio/dac/ltc2632.c | 314 +++++++++++++++++++++ 4 files changed, 348 insertions(+) commit d7fba9dcf6cd74cb8a8ab1c4c2629a3f7df00bc9 Author: Harsha Priya Date: Wed Mar 15 16:28:25 2017 -0700 ASoC: Intel: Update bxt_da7219_max98357a to add a new This patch adds a platform clock widget to turn off the clock only when both headset capture and headset playback are not in use. This removes turning off the clock in hw_free so that the clock is on when either capture or playback of headset is in progress. Signed-off-by: Harsha Priya Signed-off-by: Sathyanarayana Nujella Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_da7219_max98357a.c | 97 +++++++++++++++------------ 1 file changed, 53 insertions(+), 44 deletions(-) commit e7cb9de211ebb2924d87fdeb77e50d74c2e673d1 Author: Taeung Song Date: Mon Mar 20 11:56:57 2017 +0900 perf annotate: More exactly grep -v of the objdump command The 'grep -v "filename"' applied to the objdump command output cause a side effect eliminating filename:linenr of output of 'objdump -l' if the object file name and source file name are the same, fix it. E.g. the output of the following objdump command in symbol__disassemble(): $ objdump -l -d -S -C /home/taeung/hello --start-address=... /home/taeung/hello: file format elf64-x86-64 Disassembly of section .text: 0000000000400526
: main(): /home/taeung/hello.c:4 void main() { 400526: 55 push %rbp 400527: 48 89 e5 mov %rsp,%rbp /home/taeung/hello.c:5 ... But it uses grep -v "filename" e.g. "/home/taeung/hello" in the objdump command to remove the first line containing file name and file format ("/home/taeung/hello: file format elf64-x86-64"): Before: $ objdump -l -d -S -C /home/taeung/hello | grep /home/taeung/hello But this causes a side effect, removing filename:linenr too, because the object file and source file have the same name e.g. "/home/taueng/hello", "/home/taeung/hello.c" So more do a better match by using grep -v as below to correctly remove that first line: "/home/taeung/hello: file format elf64-x86-64" After: $ objdump -l -d -S -C /home/taeung/hello | grep /home/taeung/hello: Signed-off-by: Taeung Song Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1489978617-31396-5-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c92bdfe8e7a6133fdbe8a2a08c68446dc2e52a17 Author: Hanjun Guo Date: Tue Mar 7 20:39:58 2017 +0800 ACPI/IORT: Rework iort_match_node_callback() return value handling The return value handling in iort_match_node_callback() is too convoluted; update the iort_match_node_callback() return value handling to make code easier to read. Signed-off-by: Hanjun Guo [lorenzo.pieralisi@arm.com: rewrote commit log] Signed-off-by: Lorenzo Pieralisi Tested-by: Ming Lei Tested-by: Wei Xu Tested-by: Sinan Kaya Cc: Lorenzo Pieralisi Cc: Tomasz Nowicki drivers/acpi/arm64/iort.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 6cb6bf56dc15ec3954186524cd9a41347a18ebc8 Author: Hanjun Guo Date: Tue Mar 7 20:39:57 2017 +0800 ACPI/IORT: Add missing comment for iort_dev_find_its_id() Add missing req_id parameter to the iort_dev_find_its_id() function kernel-doc comment. Signed-off-by: Hanjun Guo Signed-off-by: Lorenzo Pieralisi Tested-by: Ming Lei Tested-by: Wei Xu Tested-by: Sinan Kaya Cc: Lorenzo Pieralisi Cc: Tomasz Nowicki drivers/acpi/arm64/iort.c | 1 + 1 file changed, 1 insertion(+) commit d89cf2e4182603a04e34bdf5622b21a287986bea Author: Hanjun Guo Date: Tue Mar 7 20:39:56 2017 +0800 ACPI/IORT: Fix the indentation in iort_scan_node() The indentation in the iort_scan_node() function is wrong, fix it. Signed-off-by: Hanjun Guo [lorenzo.pieralisi@arm.com: massaged commit log] Signed-off-by: Lorenzo Pieralisi Tested-by: Ming Lei Tested-by: Wei Xu Tested-by: Sinan Kaya drivers/acpi/arm64/iort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c70d219bef3a2636c8220368a71436c339f9ae2e Author: Krzysztof Kozlowski Date: Sat Mar 11 19:25:27 2017 +0200 ARM: dts: s5pv210: Fix infinite interrupt in soft mode In soft (no-reboot) mode, the driver self-pings watchdog upon expiration of an interrupt. The interrupt has to be cleared, because otherwise system enters infinite interrupt handling loop. Use a samsung,s3c6410-wdt compatible to select appropriate quirk for clearing the watchdog interrupt. Signed-off-by: Krzysztof Kozlowski Acked-by: Guenter Roeck Reviewed-by: Bartlomiej Zolnierkiewicz arch/arm/boot/dts/s5pv210.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f55342cc2de36d0720df1e7fc902eac82c145cf Author: Krzysztof Kozlowski Date: Sat Mar 11 19:25:26 2017 +0200 ARM: dts: s3c64xx: Fix infinite interrupt in soft mode In soft (no-reboot) mode, the driver self-pings watchdog upon expiration of an interrupt. The interrupt has to be cleared, because otherwise system enters infinite interrupt handling loop. Use a samsung,s3c6410-wdt compatible to select appropriate quirk for clearing the watchdog interrupt. Signed-off-by: Krzysztof Kozlowski Acked-by: Guenter Roeck Reviewed-by: Bartlomiej Zolnierkiewicz arch/arm/boot/dts/s3c64xx.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e93df3526b5dfc0ea76cb01041d7057f9fae478 Author: Krzysztof Kozlowski Date: Sat Mar 11 19:25:25 2017 +0200 ARM: dts: exynos: Fix infinite interrupt in soft mode on Exynos4210 and Exynos5440 In soft (no-reboot) mode, the driver self-pings watchdog upon expiration of an interrupt. The interrupt has to be cleared, because otherwise system enters infinite interrupt handling loop. Use a samsung,s3c6410-wdt compatible to select appropriate quirk for clearing the watchdog interrupt. Signed-off-by: Krzysztof Kozlowski Acked-by: Guenter Roeck Reviewed-by: Bartlomiej Zolnierkiewicz arch/arm/boot/dts/exynos4210.dtsi | 2 +- arch/arm/boot/dts/exynos5440.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c834f0e8a8bb3025aac38e802fca2e686720f544 Author: Kees Cook Date: Mon Mar 20 17:14:11 2017 -0700 Kbuild: make designated_init attribute fatal If a structure is marked with __attribute__((designated_init)) from GCC or Sparse, it needs to have all static initializers using designated initialization. Fail the build for any missing cases. This attribute will be used by the randstruct plugin to make sure randomized structures are being correctly initialized. Signed-off-by: Kees Cook Signed-off-by: Masahiro Yamada Makefile | 3 +++ 1 file changed, 3 insertions(+) commit 0edf17984f251e633465e028a0115d57b1b7eb88 Author: Krzysztof Kozlowski Date: Tue Mar 14 19:10:26 2017 +0200 arm64: defconfig: Enable video, DRM and LPASS drivers for Exynos5433 and Exynos7 Enable drivers specific to Exynos5433 and Exynos7: 1. MFD Low Power Audio SubSystem (LPASS), 2. DRM drivers (DECON display, outputs), 3. Drivers for video-related sub-blocks (JPEG, Multi Format Codec, GScaler). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi arch/arm64/configs/defconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) commit caab3df98247b4f0991bf67db2b75d06f97aefdb Author: Krzysztof Kozlowski Date: Tue Mar 14 19:10:28 2017 +0200 arm64: exynos: Enable Exynos PMU and PM domains drivers Enable EXYNOS_PM_DOMAINS because recently Exynos5433 got support for Power Management domains. The Exynos5433 pinctrl driver requires EXYNOS_PMU to get the syscon-regmap for PMU address space. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Alim Akhtar Reviewed-by: Chanwoo Choi arch/arm64/Kconfig.platforms | 2 ++ 1 file changed, 2 insertions(+) commit a0ebf66267ebab093cd7e230e70d29249768d249 Author: Krzysztof Kozlowski Date: Tue Mar 14 19:10:27 2017 +0200 soc: samsung: Do not build ARMv7 PMU drivers on ARMv8 The Exynos Power Management Unit (PMU) drivers contain quite large static arrays of register values necessary for given Exynos SoC to enter low power mode. All this data is useless for ARMv8 SoC like Exynos5433, because the image will not be shared between ARMv7 and ARMv8. Add additional Kconfig symbol for selecting the SoC-specific driver addons thus skipping the useless data in the final image (this is similar approach to chosen for Exynos clock controller drivers): - exynos-pmu driver will be compiled on both architectures ARMv7 and ARMv8, - additional driver_data for ARMv7 SoCs will not be built on ARMv8 and a macro will return NULL for them in of_device_id - this should be safe as these compatibles cannot match on ARMv7 and driver anyway handles NULL driver_data, - on ARMv8 compile only exynos-pmu driver which exposes the syscon-regmap for PMU address space. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Alim Akhtar drivers/soc/samsung/Kconfig | 8 +++++++- drivers/soc/samsung/Makefile | 4 +++- drivers/soc/samsung/exynos-pmu.c | 22 ++++++++++++++++------ drivers/soc/samsung/exynos-pmu.h | 3 +++ 4 files changed, 29 insertions(+), 8 deletions(-) commit 34dbad5d26e2f4b88e60f0e9ad03f99480802812 Author: Omar Sandoval Date: Tue Mar 21 08:56:08 2017 -0700 blk-stat: convert to callback-based statistics reporting Currently, statistics are gathered in ~0.13s windows, and users grab the statistics whenever they need them. This is not ideal for both in-tree users: 1. Writeback throttling wants its own dynamically sized window of statistics. Since the blk-stats statistics are reset after every window and the wbt windows don't line up with the blk-stats windows, wbt doesn't see every I/O. 2. Polling currently grabs the statistics on every I/O. Again, depending on how the window lines up, we may miss some I/Os. It's also unnecessary overhead to get the statistics on every I/O; the hybrid polling heuristic would be just as happy with the statistics from the previous full window. This reworks the blk-stats infrastructure to be callback-based: users register a callback that they want called at a given time with all of the statistics from the window during which the callback was active. Users can dynamically bucketize the statistics. wbt and polling both currently use read vs. write, but polling can be extended to further subdivide based on request size. The callbacks are kept on an RCU list, and each callback has percpu stats buffers. There will only be a few users, so the overhead on the I/O completion side is low. The stats flushing is also simplified considerably: since the timer function is responsible for clearing the statistics, we don't have to worry about stale statistics. wbt is a trivial conversion. After the conversion, the windowing problem mentioned above is fixed. For polling, we register an extra callback that caches the previous window's statistics in the struct request_queue for the hybrid polling heuristic to use. Since we no longer have a single stats buffer for the request queue, this also removes the sysfs and debugfs stats entries. To replace those, we add a debugfs entry for the poll statistics. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-core.c | 6 +- block/blk-mq-debugfs.c | 99 +++++++-------- block/blk-mq.c | 76 +++++++---- block/blk-mq.h | 1 - block/blk-stat.c | 311 ++++++++++++++++++++++------------------------ block/blk-stat.h | 181 +++++++++++++++++++++++++-- block/blk-sysfs.c | 31 +---- block/blk-wbt.c | 51 +++----- block/blk-wbt.h | 2 +- include/linux/blk_types.h | 1 - include/linux/blkdev.h | 10 +- 11 files changed, 449 insertions(+), 320 deletions(-) commit 4875253fddd7b6d322f028ad023d44b6efb7f73b Author: Omar Sandoval Date: Tue Mar 21 08:56:07 2017 -0700 blk-stat: move BLK_RQ_STAT_BATCH definition to blk-stat.c This is an implementation detail that no-one outside of blk-stat.c uses. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-stat.c | 2 ++ include/linux/blk_types.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit fa2e39cb9ee78f440d99a1bcfa47462c48a6fc11 Author: Omar Sandoval Date: Tue Mar 21 08:56:06 2017 -0700 blk-stat: use READ and WRITE instead of BLK_STAT_{READ,WRITE} The stats buckets will become generic soon, so make the existing users use the common READ and WRITE definitions instead of one internal to blk-stat. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 12 ++++---- block/blk-mq.c | 12 ++++---- block/blk-stat.c | 80 ++++++++++++++++++++++++-------------------------- block/blk-stat.h | 5 ---- block/blk-sysfs.c | 4 +-- block/blk-wbt.c | 12 ++++---- 6 files changed, 59 insertions(+), 66 deletions(-) commit 0315b159085621d2ff72dbf69ca6fb4a5b32bae2 Author: Omar Sandoval Date: Tue Mar 21 08:56:05 2017 -0700 block: remove extra calls to wbt_exit() We always call wbt_exit() from blk_release_queue(), so these are unnecessary. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-core.c | 1 - block/blk-mq.c | 2 -- 2 files changed, 3 deletions(-) commit 7d8d00140715a115193bf502fa3b0cfe620f0dd9 Author: Omar Sandoval Date: Thu Mar 16 09:46:14 2017 -0600 blk-stat: fix blk_stat_sum() if all samples are batched We need to flush the batch _before_ we check the number of samples, otherwise we'll miss all of the batched samples. Fixes: cf43e6b ("block: add scalable completion tracking of requests") Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-stat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6f9655b1b81f2aa9207ec3837641299406a26b69 Author: Joe Perches Date: Tue Mar 21 16:13:10 2017 +0100 drivers/video: Convert remaining uses of pr_warning to pr_warn To enable eventual removal of pr_warning This makes pr_warn use consistent for drivers/video Prior to this patch, there were 6 uses of pr_warning and 25 uses of pr_warn in drivers/video Signed-off-by: Joe Perches Cc: Benjamin Herrenschmidt Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/aty/radeon_base.c | 4 ++-- drivers/video/fbdev/core/fbmon.c | 4 ++-- drivers/video/fbdev/pxafb.c | 7 +++---- 3 files changed, 7 insertions(+), 8 deletions(-) commit 9f7886d07f36f9be23c9bcc526b7f9dae65db8c5 Author: Tvrtko Ursulin Date: Tue Mar 21 10:55:11 2017 +0000 drm/i915: Spinlocks in tasklets can use spin_(un)lock_irq The tasklets callbacks are only called from tasklet context so it is safe do to this. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170321105511.18269-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_guc_submission.c | 5 ++--- drivers/gpu/drm/i915/intel_lrc.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) commit ac34b970a9ec536c59faa8cdd5678daeae8b9dd3 Author: Bartosz Golaszewski Date: Sun Mar 12 19:56:08 2017 +0100 HID: cp2112: select GPIOLIB_IRQCHIP instead of depending on it GPIOLIB_IRQCHIP is not visible to user, so we can't depend on it. Depend on GPIOLIB but select GPIOLIB_IRQCHIP. Signed-off-by: Bartosz Golaszewski Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 733aca90300b76575b8a465dc49cbed7a991fd8b Author: Jaejoong Kim Date: Fri Mar 3 17:54:01 2017 +0900 HID: hiddev: reallocate hiddev's minor number We need to store the minor number each drivers. In case of hidraw, the minor number is stored stores in struct hidraw. But hiddev's minor is located in struct hid_device. The hid-core driver announces a kernel message which driver is loaded when HID device connected, but hiddev's minor number is always zero. To proper display hiddev's minor number, we need to store the minor number asked from usb core and do some refactoring work (move from hiddev.c to hiddev.h) to access hiddev in hid-core. [jkosina@suse.cz: rebase on top of newer codebase] Reviewed-by: Benjamin Tissoires Signed-off-by: Jaejoong Kim Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 2 +- drivers/hid/usbhid/hiddev.c | 13 ++----------- include/linux/hid.h | 1 - include/linux/hiddev.h | 12 ++++++++++++ 4 files changed, 15 insertions(+), 13 deletions(-) commit fe085f13c7901203445fd2ab26c0f499313b8258 Author: Chris Wilson Date: Tue Mar 21 10:25:52 2017 +0000 drm/i915: Remove intel_ring.last_retired_head Storing the position of the breadcrumb of the last retired request as a separate last_retired_head is superfluous as we always copy that into head prior to recalculation of the intel_ring.space. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170321102552.24357-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 5 ++--- drivers/gpu/drm/i915/i915_gem_request.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 2 -- drivers/gpu/drm/i915/intel_ringbuffer.c | 21 ++++----------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 10 ---------- drivers/gpu/drm/i915/selftests/mock_engine.c | 1 - 6 files changed, 7 insertions(+), 34 deletions(-) commit 42cb6b35b9e6b226c9b762627beec353642ff521 Author: Jaejoong Kim Date: Fri Mar 3 17:54:00 2017 +0900 HID: cp2112: use proper hidraw name with minor number The cp2112 driver is working on hidraw not hiddev. So we need to use proper hidraw name with hidraw's minor number. Reviewed-by: Benjamin Tissoires Signed-off-by: Jaejoong Kim Signed-off-by: Jiri Kosina drivers/hid/hid-cp2112.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 899f6204c0f8117d33226e586d3a630b3cf9bce0 Author: Chris Wilson Date: Tue Mar 21 11:33:20 2017 +0000 drm/i915/execlists: Split the atomic test_and_clear_bit for irq handler Rather than impose the cost of a locked test before queuing a new request, reduce it to a simple test_bit() with a following clear_bit() prior to doing the CSB check. This ensure that if an interrupt does occur whilst reading from the CSB, we still detect it (the interrupt would trigger a rescheduling of the tasklet anyway). Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170321113320.2603-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_lrc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit df848bc05db1c49756a2befbe03ab03ce34a6bcc Author: Roderick Colenbrander Date: Tue Mar 7 15:45:11 2017 -0800 HID: sony: Perform duplicate device check earlier on Game controllers can be connected twice through USB and BT. Only one connection is allowed. Currently we perform a check for duplicate controllers halfway through device initialization. To prevent 'transient' devices, we should do this check as early as we can. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 510c8b7c168bcad75e2864f73e5125d7218ee3cf Author: Roderick Colenbrander Date: Tue Mar 7 15:45:10 2017 -0800 HID: sony: Expose DS3 motion sensors through separate device This patch adds a separate evdev node for the DS3 its motion sensors. We only expose the accelerometers as the gyroscope is extremely difficult to manage and behavior varies a lot between hardware revisions. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 130 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 105 insertions(+), 25 deletions(-) commit 80ecc48c0ade5e99cc9d84febd17c44a4f011c13 Author: Roderick Colenbrander Date: Tue Mar 7 15:45:09 2017 -0800 HID: sony: Print error on failure to active DS3 / Navigation controllers This patch adds printing when we failed to activate DS3 / Nagivation controllers and checks the return value for these failures earlier in sony_input_configured. This paves the way for other configuration logic for these devices, which we don't want to call if for example the activation failed. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit e19a267b9987135c00155a51e683e434b9abb56b Author: Roderick Colenbrander Date: Tue Mar 7 15:45:08 2017 -0800 HID: sony: DS3 comply to Linux gamepad spec The axis and button mapping for the DS3 is strange. This is mostly due to the device reporting many axes as for every digital button it also has an analog button. Due to amount of analog values it is even leaking well into the MT axes range. We felt it is best to remove the many analog buttons and just report digital and comply to the Linux gamepad spec. The analog buttons are rarely used on the official platform, let alone on Linux. This patch does remove motion sensor support (added back in another patch). Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 176 +++++++++++++++++++++++-------------------------- 1 file changed, 81 insertions(+), 95 deletions(-) commit b9f7d245e34b1f42b5389b015962a2f022d4ece2 Author: Roderick Colenbrander Date: Tue Mar 7 15:45:07 2017 -0800 HID: sony: Mark DS4 touchpad device as a pointer Currently the DS4 touchpad device is neither classified as a direct input device nor as a pointer device. It makes most sense to mark it as a pointer device. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2f47c385d2babf44cbd2ec2be4f2b29b88041bc Author: Roderick Colenbrander Date: Tue Mar 7 15:45:06 2017 -0800 HID: sony: Support motion sensor calibration on dongle The DualShock 4 dongle isn't connected to a real DualShock 4 at time of driver loading. When a DualShock 4 is plugged in, we need to obtain calibration data (the dongle would have zeros). This patch adds calibration logic, which we schedule on a hotplug from sony_raw_event. In addition this patch adds dongle state handling. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 89 insertions(+), 7 deletions(-) commit b53227360dc2e30fb8809815dfdc39339a34b8dd Author: Roderick Colenbrander Date: Tue Mar 7 15:45:05 2017 -0800 HID: sony: Make work handling more generic The driver currently uses sony_schedule_work to submit output reports for the different devices for LEDs or rumble. This patch adds a new parameter to sony_schedule_work to allow scheduling for other types of work. The next patch in this series will utilize this functionality. Considering the driver structure and all error handling it felt best to reuse sony_schedule_work and sony_cancel_work. The idea was inspired by the wacom driver which does something similar. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit 35f436c31ea81d240ed53fe3467946e2a53032bb Author: Roderick Colenbrander Date: Tue Mar 7 15:45:04 2017 -0800 HID: sony: Treat the ds4 dongle as a separate device This patch adds a new quirk, which allows us to differentiate between the DualShock 4 USB and the dongle. So far they have been treated the same, but handling of calibration data differs as the dongle behaves like Bluetooth, for other requests it behaves like USB. In addition this patches changes usb/dongle/bt handling in sony_raw_event, which makes the code cleaner to read. In addition another patch in this series will add more dongle logic, so this change paves the road for that. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 99 ++++++++++++++++++++++++++------------------------ 1 file changed, 51 insertions(+), 48 deletions(-) commit d03ae2e1080026951376d787b96109169926a15c Author: Roderick Colenbrander Date: Tue Mar 7 15:45:03 2017 -0800 HID: sony: Remove report descriptor fixup for DS4 The DS4 in BT mode sends initial input reports through report 1, which is described in the HID report descriptors. When activated after sending a certain feature report, the device uses report 17. Currently the hid-sony driver fixes up the BT HID report descriptors, so the HID layer can manage input reports for report 17. We think it is best to eliminate this fixup and do the handling ourselves, which is what this patch does. The main motivation is that there are various users of DS4 through hidraw, including various cross-platform applications/games, which have their own HID parsing across Linux/Win/OSX. Due to the fixup the descriptors differ, which is causing pain for many developers including major game publishers (who reached out privately). Without the fixup, the Windows titles also have a fighting chance for working on Wine, which provides HID support now. Overall it felt best because of these reasons to remove the fixup. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 261 +++++++++++-------------------------------------- 1 file changed, 59 insertions(+), 202 deletions(-) commit 80786eb9abebce64ec471de12d8ab3072834b333 Author: Roderick Colenbrander Date: Tue Mar 7 15:45:02 2017 -0800 HID: sony: Report hardware timestamp for DS4 sensor values Report the hardware timestamp inside each HID report through MSC_TIMESTAMP for motion sensor values. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 55a07d62db0feda2e37f6962a1b2799e2a8b42ba Author: Roderick Colenbrander Date: Tue Mar 7 15:45:01 2017 -0800 HID: sony: Calibrate DS4 motion sensors The DS4 motion sensors require calibration for accurate operation. This patch adds calibration for both the accelerometer and the gyroscope. Calibration requires reading device specific scaling factors and offsets. For precision reasons we store these values as a numerator and denominator and apply the values when processing the data. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 212 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 184 insertions(+), 28 deletions(-) commit 227c011b2e046dd4d36d9e00e3d9c88097b2a4c3 Author: Roderick Colenbrander Date: Tue Mar 7 15:45:00 2017 -0800 HID: sony: Report DS4 motion sensors through a separate device The DS4 motion sensors are currently mapped by the hid-core driver to non-existing axes in between ABS_MISC and ABS_MT_SLOT, because the device already exhausted ABS_X-ABS_RZ. For a part the mapping by hid-core is accomplished by a fixup in hid-sony as the motion axes actually use vendor specific usage pages. This patch makes the DS4 use a separate input device for the motion sensors and reports acceleration data through ABS_X-ABS_Z and gyroscope data through ABS_RX-ABS_RZ. In addition it extends the event spec to allow gyroscope data through ABS_RX-ABS_RZ when INPUT_PROP_ACCELEROMETER is set. This change was suggested by Peter Hutterer during a discussion on linux-input. [jkosina@suse.cz: rebase onto slightly newer codebase] Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina Documentation/input/event-codes.txt | 5 +- drivers/hid/hid-sony.c | 397 ++++++++++-------------------------- include/uapi/linux/input.h | 11 +- 3 files changed, 117 insertions(+), 296 deletions(-) commit 8544d24c3204f94c0ba9788d3113b7a83d5edc0d Author: Ravi Bangoria Date: Thu Feb 2 16:41:40 2017 +0530 perf sdt x86: Add renaming logic for rNN and other registers 'perf probe' is failing for sdt markers whose arguments has rNN (with postfix b/w/d), %rsp, %esp, %sil etc. registers. Add renaming logic for these registers. Signed-off-by: Ravi Bangoria Acked-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Alexis Berlemont Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Naveen N. Rao Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170202111143.14319-3-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/perf_regs.c | 44 ++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 12 deletions(-) commit c846fe9ce90a5ab0329de7f08d7523fb58c1251e Author: Martyn Welch Date: Tue Feb 14 14:17:56 2017 +0000 HID: Accutouch: Add driver for ELO Accutouch 2216 USB Touchscreens The Accutouch 2216 is reporting BTN_LEFT/BTN_MOUSE rather than BTM_TOUCH in it's capabilities, which is what user space expects a touchscreen device to report. This is causing udev to consider the device to be a "VMware's USB mouse" rather than as a touchscreen, which results in a mouse cursor being displayed in Weston. This patch adds a special driver for the device to correct the capabilities reported. Signed-off-by: Martyn Welch Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 12 +++++++++++ drivers/hid/Makefile | 1 + drivers/hid/hid-accutouch.c | 52 +++++++++++++++++++++++++++++++++++++++++++++ drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 1 + 5 files changed, 67 insertions(+) commit 9143059fafd4eebed2d43ffb5455178d4010e60a Author: Benjamin Tissoires Date: Wed Mar 8 15:11:14 2017 +0100 HID: remove initial reading of reports at connect It looks like a bunch of devices do not like to be polled for their reports at init time. When you look into the details, it seems that for those that are requiring the quirk HID_QUIRK_NO_INIT_REPORTS, the driver fails to retrieve part of the features/inputs while others (more generic) work. IMO, it should be acceptable to remove the need for the quirk in the general case. On the small amount of cases where we actually need to read the current values, the driver in charge (hid-mt or wacom) already retrieves the features manually. There are 2 cases where we might need to retrieve the reports at init: 1. hiddev devices with specific use-space tool 2. a device that would require the driver to fetch a specific feature/input at plug For case 2, I have seen this a few time on hid-multitouch. It is solved in hid-multitouch directly by fetching the feature. I hope it won't be too common and this can be solved on a per-case basis (crossing fingers). For case 1, we moved the implementation of HID_QUIRK_NO_INIT_REPORTS in hiddev. When somebody starts calling ioctls that needs an initial update, the hiddev device will fetch the initial state of the reports to mimic the current behavior. This adds a small amount of time during the first HIDIOCGUSAGE(S), but it should be acceptable in most cases. To keep the currently known broken devices, we have to keep around HID_QUIRK_NO_INIT_REPORTS, but the scope will only be for hiddev. Note that I don't think hidraw would be affected and I checked that the FF drivers that need to interact with the report fields are all using output reports, which are not initialized by usbhid_init_reports(). NO_INIT_INPUT_REPORTS is then replaced by HID_QUIRK_NO_INIT_REPORTS: there is no point keeping it for just one device. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/i2c-hid/i2c-hid.c | 63 ----------------------------------------- drivers/hid/usbhid/hid-core.c | 11 ++----- drivers/hid/usbhid/hid-quirks.c | 2 +- drivers/hid/usbhid/hiddev.c | 13 +++++++++ include/linux/hid.h | 2 +- 5 files changed, 18 insertions(+), 73 deletions(-) commit 3b1f8311f6963cd11a7d1efbcd2fd900d472ba5c Author: Alexis Berlemont Date: Wed Dec 14 01:07:32 2016 +0100 perf probe: Add sdt probes arguments into the uprobe cmd string An sdt probe can be associated with arguments but they were not passed to the user probe tracing interface (uprobe_events); this patch adapts the sdt argument descriptors according to the uprobe input format. As the uprobe parser does not support scaled address mode, perf will skip arguments which cannot be adapted to the uprobe format. Here are the results: $ perf buildid-cache -v --add test_sdt $ perf probe -x test_sdt sdt_libfoo:table_frob $ perf probe -x test_sdt sdt_libfoo:table_diddle $ perf record -e sdt_libfoo:table_frob -e sdt_libfoo:table_diddle test_sdt $ perf script test_sdt ... 666.255678: sdt_libfoo:table_frob: (4004d7) arg0=0 arg1=0 test_sdt ... 666.255683: sdt_libfoo:table_diddle: (40051a) arg0=0 arg1=0 test_sdt ... 666.255686: sdt_libfoo:table_frob: (4004d7) arg0=1 arg1=2 test_sdt ... 666.255689: sdt_libfoo:table_diddle: (40051a) arg0=3 arg1=4 test_sdt ... 666.255692: sdt_libfoo:table_frob: (4004d7) arg0=2 arg1=4 test_sdt ... 666.255694: sdt_libfoo:table_diddle: (40051a) arg0=6 arg1=8 Signed-off-by: Alexis Berlemont Acked-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Hemant Kumar Cc: Peter Zijlstra Cc: Ravi Bangoria Link: http://lkml.kernel.org/r/20161214000732.1710-3-alexis.berlemont@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/perf_regs.c | 83 +++++++++++++++++ tools/perf/util/perf_regs.c | 6 ++ tools/perf/util/perf_regs.h | 6 ++ tools/perf/util/probe-file.c | 170 ++++++++++++++++++++++++++++++++++- 4 files changed, 261 insertions(+), 4 deletions(-) commit d751751a9f7f2f8e406d5a09565d337f009835d6 Author: Marek Szyprowski Date: Fri Feb 24 12:13:37 2017 +0100 iommu/iova: Consolidate code for adding new node to iovad domain rbtree This patch consolidates almost the same code used in iova_insert_rbtree() and __alloc_and_insert_iova_range() functions. While touching this code, replace BUG() with WARN_ON(1) to avoid taking down the whole system in case of corrupted iova tree or incorrect calls. Signed-off-by: Marek Szyprowski Signed-off-by: Joerg Roedel drivers/iommu/iova.c | 87 ++++++++++++++++++++-------------------------------- 1 file changed, 33 insertions(+), 54 deletions(-) commit be88184b1c7054719296387c6063748fb48fa645 Author: Alexis Berlemont Date: Wed Dec 14 01:07:31 2016 +0100 perf sdt: Add scanning of sdt probes arguments During a "perf buildid-cache --add" command, the section ".note.stapsdt" of the "added" binary is scanned in order to list the available SDT markers available in a binary. The parts containing the probes arguments were left unscanned. The whole section is now parsed; the probe arguments are extracted for later use. Signed-off-by: Alexis Berlemont Acked-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Hemant Kumar Cc: Peter Zijlstra Cc: Ravi Bangoria Link: http://lkml.kernel.org/r/20161214000732.1710-2-alexis.berlemont@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol-elf.c | 25 +++++++++++++++++++++++-- tools/perf/util/symbol.h | 1 + 2 files changed, 24 insertions(+), 2 deletions(-) commit c3883fe06488a483658ba5d849b70e49bee15e7c Author: Tomasz Kramkowski Date: Tue Mar 14 13:29:13 2017 +0000 HID: clamp input to logical range if no null state This patch fixes an issue in drivers/hid/hid-input.c where values outside of the logical range are not clamped when "null state" bit of the input control is not set. This was discussed on the lists [1] and this change stems from the fact due to the ambiguity of the HID specification it might be appropriate to follow Microsoft's own interpretation of the specification. As noted in Microsoft's documentation [2] in the section titled "Required HID usages for digitizers" it is noted that values reported outside the logical range "will be considered as invalid data and the value will be changed to the nearest boundary value (logical min/max)." This patch fixes an issue where the (1292:4745) Innomedia INNEX GENESIS/ATARI reports out of range values for its X and Y axis of the DPad which, due to the null state bit being unset, are forwarded to userspace as is. Now these values will get clamped to the logical range before being forwarded to userspace. This device was also used to test this patch. This patch expands on commit 3f3752705dbd ("HID: reject input outside logical range only if null state is set"). [1]: http://lkml.kernel.org/r/20170307131036.GA853@gaia.local [2]: https://msdn.microsoft.com/en-us/library/windows/hardware/dn672278(v=vs.85).asp Signed-off-by: Tomasz Kramkowski Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-input.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 70946723eeb859466f026274b29c6196e39149c4 Author: Kefeng Wang Date: Fri Mar 17 16:16:32 2017 +0800 perf probe: Return errno when not hitting any event On old perf, when using 'perf probe -d' to delete an inexistent event, it returns errno, eg, -bash-4.3# perf probe -d xxx || echo $? Info: Event "*:xxx" does not exist. Error: Failed to delete events. 255 But now perf_del_probe_events() will always set ret = 0, different from previous del_perf_probe_events(). After this, it returns errno again, eg, -bash-4.3# ./perf probe -d xxx || echo $? "xxx" does not hit any event. Error: Failed to delete events. 254 And it is more appropriate to return -ENOENT instead of -EPERM. Signed-off-by: Kefeng Wang Acked-by: Masami Hiramatsu Cc: Hanjun Guo Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Wang Nan Fixes: dddc7ee32fa1 ("perf probe: Fix an error when deleting probes successfully") Link: http://lkml.kernel.org/r/1489738592-61011-1-git-send-email-wangkefeng.wang@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-probe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2e1f8f7895731a8592d483a7364a23855843af17 Author: Ravi Bangoria Date: Tue Feb 7 11:15:47 2017 +0530 perf probe: Change MAX_CMDLEN There are many SDT markers in powerpc whose uprobe definition goes beyond current MAX_CMDLEN, especially when target filename is long and sdt marker has long list of arguments. For example, definition of sdt marker method__compile__end: 8@17 8@9 8@10 -4@8 8@7 -4@6 8@5 -4@4 1@37(28) from file /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-2.b14.fc22.ppc64/jre/lib/ppc64/server/libjvm.so is p:sdt_hotspot/method__compile__end /usr/lib/jvm/java-1.8.0-openjdk-\ 1.8.0.91-2.b14.fc22.ppc64/jre/lib/ppc64/server/libjvm.so:0x4c4e00\ arg1=%gpr17:u64 arg2=%gpr9:u64 arg3=%gpr10:u64 arg4=%gpr8:s32\ arg5=%gpr7:u64 arg6=%gpr6:s32 arg7=%gpr5:u64 arg8=%gpr4:s32\ arg9=+37(%gpr28):u8 'perf probe' fails with segfault for such markers. As the uprobe_events file accepts definitions up to 4094 characters(4096 - 2 (\n\0)), increase value of MAX_CMDLEN match that. Signed-off-by: Ravi Bangoria Acked-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Alexis Berlemont Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Naveen N. Rao Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170207054547.3690-1-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-event.c | 1 - tools/perf/util/probe-file.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1b326277798aa820c1043617786609b9bb4bee78 Author: Lu Baolu Date: Tue Mar 21 16:01:33 2017 +0800 usb/doc: Add document for USB3 debug port usage Add Documentation/usb/usb3-debug-port.rst. This document includes the guide for using USB3 debug port. Signed-off-by: Lu Baolu Acked-by: Thomas Gleixner Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Mathias Nyman Cc: Peter Zijlstra Cc: linux-doc@vger.kernel.org Cc: linux-usb@vger.kernel.org Link: http://lkml.kernel.org/r/1490083293-3792-6-git-send-email-baolu.lu@linux.intel.com Signed-off-by: Ingo Molnar Documentation/usb/usb3-debug-port.rst | 100 ++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) commit 57fb47279a04cd53641dc5ae55a6d47e4f32a2fd Author: Lu Baolu Date: Tue Mar 21 16:01:32 2017 +0800 usb/serial: Add DBC debug device support to usb_debug This patch adds DBC debug device support to the usb_debug driver. Signed-off-by: Lu Baolu Acked-by: Thomas Gleixner Acked-by: Johan Hovold Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Mathias Nyman Cc: Peter Zijlstra Cc: linux-usb@vger.kernel.org Link: http://lkml.kernel.org/r/1490083293-3792-5-git-send-email-baolu.lu@linux.intel.com Signed-off-by: Ingo Molnar drivers/usb/serial/usb_debug.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit 1b5aeebf3a92273b4d85aeff37a16037bc3c3abf Author: Lu Baolu Date: Tue Mar 21 16:01:31 2017 +0800 x86/earlyprintk: Add support for earlyprintk via USB3 debug port Add support for earlyprintk by writing debug messages to the USB3 debug port. Users can use this type of early printk by specifying the kernel parameter of "earlyprintk=xdbc". This gives users a chance of providing debugging output. The hardware for USB3 debug port requires DMA memory blocks. This requires to delay setting up debugging hardware and registering boot console until the memblocks are filled. Signed-off-by: Lu Baolu Acked-by: Thomas Gleixner Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Mathias Nyman Cc: Peter Zijlstra Cc: linux-usb@vger.kernel.org Link: http://lkml.kernel.org/r/1490083293-3792-4-git-send-email-baolu.lu@linux.intel.com Signed-off-by: Ingo Molnar Documentation/admin-guide/kernel-parameters.txt | 1 + arch/x86/kernel/early_printk.c | 5 +++++ arch/x86/kernel/setup.c | 4 ++++ 3 files changed, 10 insertions(+) commit aeb9dd1de98c1a5f2007ea5d2a154c1244caf8a0 Author: Lu Baolu Date: Tue Mar 21 16:01:30 2017 +0800 usb/early: Add driver for xhci debug capability XHCI debug capability (DbC) is an optional but standalone functionality provided by an xHCI host controller. Software learns this capability by walking through the extended capability list of the host. XHCI specification describes DbC in section 7.6. This patch introduces the code to probe and initialize the debug capability hardware during early boot. With hardware initialized, the debug target (system on which this code is running) will present a debug device through the debug port (normally the first USB3 port). The debug device is fully compliant with the USB framework and provides the equivalent of a very high performance (USB3) full-duplex serial link between the debug host and target. The DbC functionality is independent of the xHCI host. There isn't any precondition from the xHCI host side for the DbC to work. One use for this feature is kernel debugging, for example when your machine crashes very early before the regular console code is initialized. Other uses include simpler, lockless logging instead of a full-blown printk console driver and klogd. Signed-off-by: Lu Baolu Acked-by: Thomas Gleixner Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Mathias Nyman Cc: Peter Zijlstra Cc: linux-usb@vger.kernel.org Link: http://lkml.kernel.org/r/1490083293-3792-3-git-send-email-baolu.lu@linux.intel.com [ Small fix to the Kconfig help text. ] Signed-off-by: Ingo Molnar arch/x86/Kconfig.debug | 27 +- drivers/usb/Makefile | 2 +- drivers/usb/early/Makefile | 1 + drivers/usb/early/xhci-dbc.c | 1014 +++++++++++++++++++++++++++++++++++++++++ drivers/usb/early/xhci-dbc.h | 211 +++++++++ include/linux/usb/xhci-dbgp.h | 29 ++ 6 files changed, 1281 insertions(+), 3 deletions(-) commit dd759d93f4dd4fd2f345a78ad1223bb3edf3ee7b Author: Lu Baolu Date: Tue Mar 21 16:01:29 2017 +0800 x86/timers: Add simple udelay calibration Add a simple udelay calibration in x86 architecture-specific boot-time initializations. This will get a workable estimate for loops_per_jiffy. Hence, udelay() could be used after this initialization. Signed-off-by: Lu Baolu Acked-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Greg Kroah-Hartman Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Mathias Nyman Cc: Peter Zijlstra Cc: linux-usb@vger.kernel.org Link: http://lkml.kernel.org/r/1490083293-3792-2-git-send-email-baolu.lu@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/setup.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit c7e790c5f4c3e923664f45dfbc84492406bef045 Author: Nicholas Piggin Date: Tue Mar 14 22:36:48 2017 +1000 powerpc/64s: POWER8 add missing machine check definitions POWER8 uses bit 36 in SRR1 like POWER9 for i-side machine checks, and contains several conditions for link timeouts that are not currently handled. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/mce_power.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit 755309be770695cafa4137520789c584903caa39 Author: Nicholas Piggin Date: Tue Mar 14 22:36:47 2017 +1000 powerpc/64s: Data driven machine check handling Move the handling (corrective action) of machine checks to the table based evaluation. This changes P7 and P8 ERAT flushing from using SLB flush to using ERAT flush. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/mce_power.c | 328 +++++++++------------------------------- 1 file changed, 74 insertions(+), 254 deletions(-) commit 631bc46c8c8e7014f2e90c94e356bf59e1fbf800 Author: Nicholas Piggin Date: Tue Mar 14 22:36:46 2017 +1000 powerpc/64s: Data driven machine check evaluation Have machine types define i-side and d-side tables to describe their machine check encodings, and match entries to evaluate (for reporting) machine checks. Functionality is mostly unchanged (tested with a userspace harness), but it does make a change in that it no longer records DAR as the effective address for those errors where it is specified to be invalid (which is a reporting change only). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/mce_power.c | 569 +++++++++++++++++++++++----------------- 1 file changed, 326 insertions(+), 243 deletions(-) commit 58c8d17f2ed7367f9886908633fbe85624e41e78 Author: Nicholas Piggin Date: Tue Mar 14 22:36:45 2017 +1000 powerpc/64s: Move POWER machine check defines into mce_power.c Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mce.h | 91 ---------------------------------------- arch/powerpc/kernel/mce_power.c | 92 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 91 deletions(-) commit 88c6511a8c0c09bbc5f9792c4a2c252c7e47e49b Author: Nicholas Piggin Date: Tue Mar 14 22:36:44 2017 +1000 powerpc/64s: Clean up machine check recovery flushing Use the flush function introduced with the POWER9 machine check handler for POWER7 and 8, rather than open coding it multiple times in callers. There is a specific ERAT flush type introduced for POWER9, but the POWER7-8 ERAT errors continue to do SLB flushing (which also flushes ERAT), so as not to introduce functional changes with this cleanup patch. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/mce_power.c | 97 ++++++++++------------------------------- 1 file changed, 23 insertions(+), 74 deletions(-) commit fc84427b7e1471b0a1220c56072f574618335edc Author: Nicholas Piggin Date: Tue Mar 14 22:36:43 2017 +1000 powerpc/64s: Machine check print NIP Print the faulting address of the machine check that may help with debugging. The effective address reported can be a target memory address rather than the faulting instruction address. Fix up a dangling bracket while here. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/mce.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6c8343e82bec46ece4fe773304a84c7fd57fdd8d Author: Michael Ellerman Date: Sat Sep 10 20:01:30 2016 +1000 drivers/pcmcia: NO_IRQ removal for electra_cf.c We'd like to eventually remove NO_IRQ on powerpc, so remove usages of it from electra_cf.c which is a powerpc-only driver. Signed-off-by: Michael Ellerman drivers/pcmcia/electra_cf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 58f169139e9692e290a7d5d9b034b79ee20d06b3 Author: Geert Uytterhoeven Date: Sun Mar 12 14:17:00 2017 +0100 MAINTAINERS: Add file patterns for powerpc device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven Signed-off-by: Michael Ellerman MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 43a8888f0a70db62488fc3ad1505f6c6a2267803 Author: Ben Hutchings Date: Fri Dec 2 02:38:38 2016 +0000 powerpc: Fix missing CRCs, add more asm-prototypes.h declarations Add declarations for: - __mfdcr, __mtdcr (if CONFIG_PPC_DCR_NATIVE=y; through ) - switch_mmu_context (if CONFIG_PPC_BOOK3S_64=n; through ) Signed-off-by: Ben Hutchings Signed-off-by: Michael Ellerman arch/powerpc/include/asm/asm-prototypes.h | 2 ++ 1 file changed, 2 insertions(+) commit 3072601375ffff92bddd0ce810dd64f6e3c7f45c Author: Ben Hutchings Date: Fri Dec 2 02:35:52 2016 +0000 powerpc/32: Remove Mac-on-Linux/rtlinux hooks The symbols exported for use by MOL/rtlinux aren't getting CRCs and I was about to fix that. But MOL is dead upstream, and the latest work on it was to make it use KVM instead of its own kernel module. So remove them instead. Signed-off-by: Ben Hutchings Signed-off-by: Michael Ellerman arch/powerpc/kernel/head_32.S | 16 +--------------- arch/powerpc/mm/hash_low_32.S | 2 -- 2 files changed, 1 insertion(+), 17 deletions(-) commit 819cdcdb7b2ac6f8294a969eb2d9003b1be222bf Author: Laurent Dufour Date: Tue Feb 14 17:45:12 2017 +0100 powerpc/mm: Move mmap_sem unlocking in do_page_fault() Since the fault retry is now handled earlier, we can release the mmap_sem lock earlier too and remove later unlocking previously done in mm_fault_error(). Reviewed-by: Aneesh Kumar K.V Signed-off-by: Laurent Dufour Signed-off-by: Michael Ellerman arch/powerpc/mm/fault.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 14c02e419a395c4bd7950175fc47eda1ecaa8c69 Author: Laurent Dufour Date: Tue Feb 14 17:45:11 2017 +0100 powerpc/mm: Handle VM_FAULT_RETRY earlier In do_page_fault() if handle_mm_fault() returns VM_FAULT_RETRY, retry the page fault handling before anything else. This would simplify the handling of the mmap_sem lock in this part of the code. Reviewed-by: Aneesh Kumar K.V Signed-off-by: Laurent Dufour Signed-off-by: Michael Ellerman arch/powerpc/mm/fault.c | 67 ++++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 29 deletions(-) commit c2294e0ffe741c8b34c630a71c7dc44d30503538 Author: Laurent Dufour Date: Tue Feb 14 17:45:10 2017 +0100 powerpc/mm: Move mmap_sem unlock up from do_sigbus Move mmap_sem releasing in the do_sigbus()'s unique caller : mm_fault_error() No functional changes. Reviewed-by: Aneesh Kumar K.V Signed-off-by: Laurent Dufour Signed-off-by: Michael Ellerman arch/powerpc/mm/fault.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 272bce17cc3ef4629e28c38324d81ca72a862115 Author: Arnd Bergmann Date: Mon Mar 20 10:40:28 2017 +0100 drm/i915: split out check for noncontiguous pfn range We get a warning with gcc-7 about a pointless comparison when using a linear memmap: drivers/gpu/drm/i915/selftests/scatterlist.c: In function 'alloc_table': drivers/gpu/drm/i915/selftests/scatterlist.c:219:66: error: self-comparison always evaluates to false [-Werror=tautological-compare] Splitting out the comparison into a separate function avoids the warning and makes it slightly more obvious what happens. Fixes: 935a2f776aa5 ("drm/i915: Add some selftests for sg_table manipulation") Signed-off-by: Arnd Bergmann Link: http://patchwork.freedesktop.org/patch/msgid/20170320094335.1266306-2-arnd@arndb.de Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/selftests/scatterlist.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 3091ae775fae17084013021d01513bc1ad274e6a Author: Geert Uytterhoeven Date: Thu Mar 9 19:20:48 2017 +0100 pinctrl: sh-pfc: Update info pointer after SoC-specific init Update the sh_pfc_soc_info pointer after calling the SoC-specific initialization function, as it may have been updated to e.g. handle different SoC revisions. This makes sure the correct subdriver name is printed later. Fixes: 0c151062f32c9db8 ("sh-pfc: Add support for SoC-specific initialization") Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/core.c | 3 +++ 1 file changed, 3 insertions(+) commit b332da51a929de9081058b17d108008cd6a0d15f Author: Geert Uytterhoeven Date: Sat Mar 11 12:12:43 2017 +0100 pinctrl: sh-pfc: r8a7795: Restore sort order Somehow the QSPI and SCIF_CLK fragments were inserted at the wrong positions. Restore sort order (alphabetically, per group). Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 171 ++++++++++++++++++----------------- 1 file changed, 86 insertions(+), 85 deletions(-) commit 4324b6084f45b9faebda8d6563d8625d22b4b5df Author: Geert Uytterhoeven Date: Sat Mar 11 12:26:09 2017 +0100 pinctrl: sh-pfc: r8a7795: Fix hscif2_clk_b and hscif4_ctrl Fix typos in hscif2_clk_b_mux[] and hscif4_ctrl_mux[]. Fixes: a56069c46c102710 ("pinctrl: sh-pfc: r8a7795: Add HSCIF pins, groups, and functions") Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cecbe87d73006cb321dec79b349e3fefd1a80962 Author: Geert Uytterhoeven Date: Fri Mar 10 11:46:10 2017 +0100 clk: renesas: rcar-gen3: Add workaround for PLL0/2/4 errata on H3 ES1.0 Add a workaround for errata on R-Car H3 ES1.0, where the PLL0, PLL2, and PLL4 clock frequencies are off by a factor of two. Inspired by a patch by Dien Pham in the BSP. Signed-off-by: Geert Uytterhoeven Cc: Dien Pham drivers/clk/renesas/rcar-gen3-cpg.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 5f3a432a44b135db002d22446827cfa061fc0bfb Author: Geert Uytterhoeven Date: Fri Mar 10 11:36:33 2017 +0100 clk: renesas: rcar-gen3-cpg: Pass mode pins to rcar_gen3_cpg_init() Pass the mode pin states from the SoC-specific CPG/MSSR driver to the R-Car Gen3 CPG driver core, as their state will be needed to make some core clock configuration decisions. Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7795-cpg-mssr.c | 2 +- drivers/clk/renesas/r8a7796-cpg-mssr.c | 2 +- drivers/clk/renesas/rcar-gen3-cpg.c | 4 +++- drivers/clk/renesas/rcar-gen3-cpg.h | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) commit c013fc7d23ca5b29f0cdc37d58b2466ead4fd5f6 Author: Geert Uytterhoeven Date: Thu Nov 10 13:18:25 2016 +0100 clk: renesas: r8a7796: Reformat core clock table For easier comparison with other clock drivers. No functional changes. Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3c969cec16176e98f9d8c976c163d2bb519c7c87 Author: Geert Uytterhoeven Date: Thu Nov 10 13:16:57 2016 +0100 clk: renesas: r8a7795: Reformat core clock table For easier comparison with other clock drivers. No functional changes. Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7795-cpg-mssr.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 89aa58a3951bcf242c7755075a7429d0ed6640de Author: Geert Uytterhoeven Date: Tue Feb 28 17:18:08 2017 +0100 clk: renesas: r8a7796: Correct name of watchdog clock There's only a single watchdog clock, and it's named "rwdt". Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2122b56d30e4fb25b383f137e83e6b901e5b05ae Author: Geert Uytterhoeven Date: Tue Feb 28 17:17:31 2017 +0100 clk: renesas: r8a7795: Correct name of watchdog clock There's only a single watchdog clock, and it's named "rwdt". Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7795-cpg-mssr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a843ed3f6c3e856f9091b042c6b4ed34c02a3187 Author: Geert Uytterhoeven Date: Tue Feb 28 17:31:59 2017 +0100 clk: renesas: r8a7795: Correct parent clock and sort order for Audio DMACs The parent clock of the Audio DMACs is the "ZS" AXI bus clock, which maps to S3D1 on R-Car H3 ES1.x. All module clocks must be sorted by clock ID. Signed-off-by: Geert Uytterhoeven Acked-by: Kuninori Morimoto drivers/clk/renesas/r8a7795-cpg-mssr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 947b897204c417d22ad90e5f354858d78de15a07 Author: Farhan Ali Date: Fri Mar 17 09:59:32 2017 -0400 KVM: s390: Use defines for intercept code Let's use #define values for better readability. Signed-off-by: Farhan Ali Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 3 +++ arch/s390/kvm/intercept.c | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) commit 24caf6559393f68eeefa39faf8c47c0d51a63cee Author: Chris Wilson Date: Mon Mar 20 14:56:09 2017 +0000 drm/i915: intel_engine_init_global_seqno() requires atomic kmap As intel_engine_init_global_seqno() may be called by nop_submit_request() from inside irq context, we have to use atomic versions of kmap/kunmap. This is rare as this requires using gen8 legacy ringbuffer submission. Reported-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170320145609.4898-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 467221bc60c1b500b2f7dc1df77f1a88c725cd4a Author: Chris Wilson Date: Mon Mar 20 14:31:33 2017 +0000 drm/i915: Protect intel_engine_wakeup() for call from irq context intel_engine_wakeup() is called by nop_request_submit() which is installed to handle third party fences completed from within irq context. As such, it needs the full irqsave/irqrestore and not the partial spin_irq_lock handling. [18942.714467] ================================= [18942.719076] [ INFO: inconsistent lock state ] [18942.723522] 4.11.0-rc2-CI-CI_DRM_2368+ #1 Tainted: G U W [18942.729970] --------------------------------- [18942.734466] inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. [18942.740594] gem_eio/1275 [HC0[0]:SC0[0]:HE1:SE1] takes: [18942.745932] (&(&fence->lock)->rlock){+.?...}, at: [] dma_fence_signal+0x100/0x 230 [18942.755331] {IN-SOFTIRQ-W} state was registered at: [18942.760356] __lock_acquire+0x5d0/0x1bb0 [18942.764444] lock_acquire+0xc9/0x220 [18942.768196] _raw_spin_lock_irqsave+0x41/0x60 [18942.772747] dma_fence_signal+0x100/0x230 [18942.776927] vgem_fence_timeout+0x9/0x10 [vgem] [18942.781701] call_timer_fn+0x92/0x380 [18942.785557] expire_timers+0x150/0x1f0 [18942.789491] run_timer_softirq+0x7c/0x160 [18942.793705] __do_softirq+0x116/0x4c0 [18942.797560] irq_exit+0xa9/0xc0 [18942.800873] smp_apic_timer_interrupt+0x38/0x50 [18942.805611] apic_timer_interrupt+0x90/0xa0 [18942.810008] cpuidle_enter_state+0x135/0x380 [18942.814503] cpuidle_enter+0x12/0x20 [18942.818250] call_cpuidle+0x1e/0x40 [18942.821906] do_idle+0x17e/0x1f0 [18942.825333] cpu_startup_entry+0x18/0x20 [18942.829463] rest_init+0x127/0x130 [18942.833025] start_kernel+0x3f1/0x3fe [18942.836908] x86_64_start_reservations+0x2a/0x2c [18942.841733] x86_64_start_kernel+0x173/0x186 [18942.846234] verify_cpu+0x0/0xfc [18942.849604] irq event stamp: 30568 [18942.853140] hardirqs last enabled at (30567): [] ktime_get+0xef/0x120 [18942.861468] hardirqs last disabled at (30568): [] _raw_spin_lock_irqsave+0x17/0 x60 [18942.870812] softirqs last enabled at (30462): [] __do_softirq+0x1d9/0x4c0 [18942.879443] softirqs last disabled at (30439): [] irq_exit+0xa9/0xc0 [18942.887616] [18942.887616] other info that might help us debug this: [18942.894279] Possible unsafe locking scenario: [18942.894279] [18942.900336] CPU0 [18942.902851] ---- [18942.905362] lock(&(&fence->lock)->rlock); [18942.909647] [18942.912330] lock(&(&fence->lock)->rlock); [18942.916821] [18942.916821] *** DEADLOCK *** [18942.916821] [18942.922862] 1 lock held by gem_eio/1275: [18942.926859] #0: (&(&fence->lock)->rlock){+.?...}, at: [] dma_fence_signal+0x1 00/0x230 [18942.936651] [18942.936651] stack backtrace: [18942.941142] CPU: 3 PID: 1275 Comm: gem_eio Tainted: G U W 4.11.0-rc2-CI-CI_DRM_2368+ # 1 [18942.950367] Hardware name: Gigabyte Technology Co., Ltd. Z170X-UD5/Z170X-UD5-CF, BIOS F21 01/06/2 017 [18942.959756] Call Trace: [18942.962244] dump_stack+0x67/0x92 [18942.965626] print_usage_bug.part.23+0x259/0x268 [18942.970362] mark_lock+0x12c/0x6f0 [18942.973851] ? check_usage_forwards+0x130/0x130 [18942.978487] mark_held_locks+0x6f/0xa0 [18942.982329] ? _raw_spin_unlock_irq+0x27/0x50 [18942.986797] trace_hardirqs_on_caller+0x150/0x200 [18942.991599] trace_hardirqs_on+0xd/0x10 [18942.995515] _raw_spin_unlock_irq+0x27/0x50 [18942.999796] intel_engine_wakeup+0x26/0x30 [i915] [18943.004670] intel_engine_init_global_seqno+0x131/0x1a0 [i915] [18943.010745] nop_submit_request+0x2e/0x40 [i915] [18943.015476] submit_notify+0x3f/0x5c [i915] [18943.019763] __i915_sw_fence_complete+0x176/0x220 [i915] [18943.025234] ? try_to_del_timer_sync+0x4d/0x60 [18943.029825] i915_sw_fence_complete+0x25/0x40 [i915] [18943.034887] dma_i915_sw_fence_wake+0x26/0x60 [i915] [18943.039959] dma_fence_signal+0x146/0x230 [18943.044109] vgem_fence_signal_ioctl+0x6c/0xc0 [vgem] [18943.049275] drm_ioctl+0x200/0x450 [18943.052758] ? vgem_fence_attach_ioctl+0x270/0x270 [vgem] [18943.058334] do_vfs_ioctl+0x90/0x6e0 [18943.061991] ? entry_SYSCALL_64_fastpath+0x5/0xb1 [18943.066843] ? __this_cpu_preempt_check+0x13/0x20 [18943.071643] ? trace_hardirqs_on_caller+0xe7/0x200 [18943.076532] SyS_ioctl+0x3c/0x70 [18943.079842] entry_SYSCALL_64_fastpath+0x1c/0xb1 [18943.084558] RIP: 0033:0x7f0dfcc14357 [18943.088240] RSP: 002b:00007ffeb4628da8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [18943.095996] RAX: ffffffffffffffda RBX: ffffffff8147eb93 RCX: 00007f0dfcc14357 [18943.103311] RDX: 00007ffeb4628de0 RSI: 0000000040086442 RDI: 0000000000000005 [18943.110574] RBP: ffffc9000176ff88 R08: 0000000000000004 R09: 0000000000000000 [18943.117845] R10: 0000000000000029 R11: 0000000000000246 R12: 0000000000000001 [18943.125168] R13: 0000000000000005 R14: 0000000040086442 R15: 0000000000000000 [18943.132520] ? __this_cpu_preempt_check+0x13/0x20 Fixes: cdc3a4539034 ("drm/i915: No need to save/restore irq status in intel_engine_wakeup") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170320143133.1507-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_breadcrumbs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d582799fe5de1c1ca127d7f364db12a660cf46d4 Author: Kyle Huey Date: Mon Mar 20 16:05:35 2017 -0700 um/arch_prctl: Fix fallout from x86 arch_prctl() rework The recent arch_prctl rework added a bracket instead of a comma. Fix it. Fixes: 17a6e1b8e8e8 ("x86/arch_prctl/64: Rename do_arch_prctl() to do_arch_prctl_64()") Signed-off-by: Kyle Huey Cc: Andy Lutomirski Cc: kbuild-all@01.org Link: http://lkml.kernel.org/r/20170320230535.11281-1-khuey@kylehuey.com Signed-off-by: Thomas Gleixner arch/x86/um/syscalls_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1efab6e91e8e789f98a11d6618f0fd66f1c51f98 Author: Geert Uytterhoeven Date: Thu Mar 16 15:07:26 2017 +0100 ARM: dts: r8a7745: Add reset control properties Add properties to describe the reset topology for on-SoC devices: - Add the "#reset-cells" property to the CPG/MSSR device node, - Add resets and reset-names properties to the various device nodes. This allows to reset SoC devices using the Reset Controller API. Note that all resets added match the corresponding module clocks. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit d20747b7df51178db5f5c7a03cbf17a91bdb6f0e Author: Geert Uytterhoeven Date: Thu Mar 16 15:07:25 2017 +0100 ARM: dts: r8a7743: Add reset control properties Add properties to describe the reset topology for on-SoC devices: - Add the "#reset-cells" property to the CPG/MSSR device node, - Add resets and reset-names properties to the various device nodes. This allows to reset SoC devices using the Reset Controller API. Note that all resets added match the corresponding module clocks. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit bec0948e810fffce38b9b886b0283a44eb025043 Author: Geert Uytterhoeven Date: Thu Mar 16 15:07:24 2017 +0100 arm64: dts: r8a7796: Add reset control properties Add properties to describe the reset topology for on-SoC devices: - Add the "#reset-cells" property to the CPG/MSSR device node, - Add resets and reset-names properties to the various device nodes. This allows to reset SoC devices using the Reset Controller API. Note that all resets added match the corresponding module clocks. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit dcccc13210eff0e5be2b36548198952c5683f3db Author: Geert Uytterhoeven Date: Thu Mar 16 15:07:23 2017 +0100 arm64: dts: r8a7795: Add reset control properties Add properties to describe the reset topology for on-SoC devices: - Add the "#reset-cells" property to the CPG/MSSR device node, - Add resets and reset-names properties to the various device nodes. This allows to reset SoC devices using the Reset Controller API. Note that all resets added match the corresponding module clocks. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 93 ++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit 66e303e988c8df9f43cb7e61a7ec6d1b44ad0bb2 Author: Tvrtko Ursulin Date: Mon Mar 20 13:25:56 2017 +0000 drm/i915/guc: Correct the request_in tracepoint position It has to be called after the global seqno has been assigned. Signed-off-by: Tvrtko Ursulin Fixes: 31de73501ac9 ("drm/i915/scheduler: emulate a scheduler for guc") Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Michał Winiarski Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170320132556.29286-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_guc_submission.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62c58af32c935a98a1e8d8ceb39a3a47b36fbbcd Author: Shashank Sharma Date: Mon Mar 13 16:54:02 2017 +0530 drm/edid: detect SCDC support in HF-VSDB This patch does following: - Adds a new structure (drm_hdmi_info) in drm_display_info. This structure will be used to save and indicate if sink supports advanced HDMI 2.0 features - Adds another structure drm_scdc within drm_hdmi_info, to reflect scdc support and capabilities in connected HDMI 2.0 sink. - Checks the HF-VSDB block for presence of SCDC, and marks it in scdc structure - If SCDC is present, checks if sink is capable of generating SCDC read request, and marks it in scdc structure. V2: Addressed review comments Thierry: - Fix typos in commit message and make abbreviation consistent across the commit message. - Change structure object name from hdmi_info -> hdmi - Fix typos and abbreviations in description of structure drm_hdmi_info end the description with a full stop. - Create a structure drm_scdc, and keep all information related to SCDC register set (supported, read request supported) etc in it. Ville: - Change rr -> read_request - Call drm_detect_scrambling function drm_parse_hf_vsdb so that all of HF-VSDB parsing can be kept in same function, in incremental patches. V3: Rebase. V4: Rebase. V5: Rebase. V6: Addressed review comments from Ville - Add clock rate calculations for 1/10 and 1/40 ratios - Remove leftovers from old patchset V7: Added R-B from Jose. V8: Rebase. V9: Rebase. V10: Rebase. Signed-off-by: Shashank Sharma Reviewed-by: Thierry Reding Reviewed-by: Jose Abreu Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1489404244-16608-5-git-send-email-shashank.sharma@intel.com drivers/gpu/drm/drm_edid.c | 33 ++++++++++- drivers/gpu/drm/drm_scdc_helper.c | 121 ++++++++++++++++++++++++++++++++++++++ include/drm/drm_connector.h | 19 ++++++ include/drm/drm_edid.h | 1 - include/drm/drm_scdc_helper.h | 27 +++++++++ 5 files changed, 199 insertions(+), 2 deletions(-) commit afa1c763653e0fd68f2d1e3dca869c9453d8ef06 Author: Shashank Sharma Date: Mon Mar 13 16:54:01 2017 +0530 drm/edid: detect SCDC support in HF-VSDB This patch does following: - Adds a new structure (drm_hdmi_info) in drm_display_info. This structure will be used to save and indicate if sink supports advanced HDMI 2.0 features - Adds another structure drm_scdc within drm_hdmi_info, to reflect scdc support and capabilities in connected HDMI 2.0 sink. - Checks the HF-VSDB block for presence of SCDC, and marks it in scdc structure - If SCDC is present, checks if sink is capable of generating SCDC read request, and marks it in scdc structure. V2: Addressed review comments Thierry: - Fix typos in commit message and make abbreviation consistent across the commit message. - Change structure object name from hdmi_info -> hdmi - Fix typos and abbreviations in description of structure drm_hdmi_info end the description with a full stop. - Create a structure drm_scdc, and keep all information related to SCDC register set (supported, read request supported) etc in it. Ville: - Change rr -> read_request - Call drm_detect_scrambling function drm_parse_hf_vsdb so that all of HF-VSDB parsing can be kept in same function, in incremental patches. V3: Rebase. V4: Rebase. V5: Rebase. V6: Rebase. V7: Added R-B from Jose. V8: Rebase. V9: Rebase. V10: Rebase. Signed-off-by: Shashank Sharma Reviewed-by: Thierry Reding Reviewed-by: Jose Abreu Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1489404244-16608-4-git-send-email-shashank.sharma@intel.com drivers/gpu/drm/drm_edid.c | 14 ++++++++++++++ include/drm/drm_connector.h | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) commit 50dd1bd1e2395a78e5adfad96487092e215483e0 Author: Thierry Reding Date: Mon Mar 13 16:54:00 2017 +0530 drm/edid: check for HF-VSDB block This patch implements a small function that finds if a given CEA db is hdmi-forum vendor specific data block or not. V2: Rebase. V3: Added R-B from Jose. V4: Rebase V5: Rebase V6: Rebase V7: Rebase V8: Rebase V9: Rebase V10: Rebase Signed-off-by: Thierry Reding Signed-off-by: Shashank Sharma Reviewed-by: Jose Abreu Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1489404244-16608-3-git-send-email-shashank.sharma@intel.com drivers/gpu/drm/drm_edid.c | 15 +++++++++++++++ include/linux/hdmi.h | 1 + 2 files changed, 16 insertions(+) commit 3ad33ae2bc800496e979b9f7920a57835740083d Author: Thierry Reding Date: Mon Mar 13 16:53:59 2017 +0530 drm: Add SCDC helpers SCDC is a mechanism defined in the HDMI 2.0 specification that allows the source and sink devices to communicate. This commit introduces helpers to access the SCDC and provides the symbolic names for the various registers defined in the specification. V2: Rebase. V3: Added R-B from Jose. V4: Rebase V5: Addressed review comments from Ville - Handle the I2c return values in a better way (dp_dual_mode) - Make the macros for SCDC Major/Minor more readable, by adding a 'GET' in the macro names V6: Rebase V7: Rebase V8: Rebase V9: Rebase V10: Rebase Signed-off-by: Thierry Reding Signed-off-by: Shashank Sharma Reviewed-by: Jose Abreu Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1489404244-16608-2-git-send-email-shashank.sharma@intel.com Documentation/gpu/drm-kms-helpers.rst | 12 ++++ drivers/gpu/drm/Makefile | 3 +- drivers/gpu/drm/drm_scdc_helper.c | 123 +++++++++++++++++++++++++++++++ include/drm/drm_scdc_helper.h | 132 ++++++++++++++++++++++++++++++++++ 4 files changed, 269 insertions(+), 1 deletion(-) commit e9f0089b2d8a3d450b8ec02eccfb92b950110fbe Author: Magnus Damm Date: Mon Mar 20 17:49:21 2017 +0900 arm64: dts: r8a7795: Correct SATA device size to 2MiB Update the r8a7795 SATA device node to use a 2MiB I/O space as specified in the "72. Serial-ATA" section of R-Car-Gen3-rev0.52E.pdf Signed-off-by: Magnus Damm Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1770ae9d3f7f2849d7a7a24f93af44a59790a647 Author: Tobin C. Harding Date: Tue Mar 21 13:37:12 2017 +1100 staging: ks7010: rename return value identifier Driver uses multiple identifier names for the same task (retval, ret, rc). It would be easier to read the code if a single task is identified with a single name. 'ret' is the most common return value identifier name found in the kernel tree, following the principle of least surprise using 'ret' is a decent choice. Rename rc -> ret Rename retval -> ret Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 142 +++++++++++++++++------------------ drivers/staging/ks7010/ks_hostif.c | 16 ++-- drivers/staging/ks7010/ks_wlan_net.c | 10 +-- 3 files changed, 84 insertions(+), 84 deletions(-) commit 1e765f318824b2f182dedb5e74e05b9f132e07ca Author: Tobin C. Harding Date: Tue Mar 21 13:37:11 2017 +1100 staging: ks7010: remove zero comparison Comparison, equal to zero, is redundant 'if (foo == 0)' is equal to 'if (!foo)' Typical kernel coding style is to use the shorter form. Remove unnecessary zero comparison. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c133b9bd8ff18323f57859c5add3be9e872224c3 Author: Tobin C. Harding Date: Tue Mar 21 13:37:10 2017 +1100 staging: ks7010: remove non-zero comparison Comparison, does not equal zero, is redundant 'if (foo != 0)' is equal to 'if (foo)' Typical kernel coding style is to use the shorter form. Remove unnecessary non-zero comparison. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 4 ++-- drivers/staging/ks7010/ks_hostif.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit f283dd6901cad0d823cf469e71db5700d456d1f6 Author: Tobin C. Harding Date: Tue Mar 21 13:37:09 2017 +1100 staging: ks7010: make goto labels uniform Driver uses different label forms for similar purposes. It would be more clear if single use case has uniform label. 'out' is generic and adds no meaning to label. Documentation/process/coding-style.rst: Choose label names which say what the goto does or why the goto exists. Rename labels so as to better describe what they do. If an execution path only exists for the label on an error, prefix the label with 'err_'. If a non-error execution path exist do not use prefix. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 70 ++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 35 deletions(-) commit 13b05e467d8f22c8ce871ffc7daa536df1beb0ce Author: Tobin C. Harding Date: Tue Mar 21 13:37:08 2017 +1100 staging: ks7010: return directly on error Function uses goto label with no clean up code. In this case we should just return directly. Remove goto statement, return directly on error. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 10 ++++------ drivers/staging/ks7010/ks_wlan_net.c | 7 +++---- 2 files changed, 7 insertions(+), 10 deletions(-) commit 0185f6c9637211757256aef3f519202dcc54b231 Author: Tobin C. Harding Date: Tue Mar 21 13:37:07 2017 +1100 staging: ks7010: fix checkpatch MULTIPLE_ASSIGNMENTS Checkpatch emits CHECK: multiple assignments should be avoided. Move multiple line assignment to individual lines. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5a21405ddbd58a4985081b2642837b978a5d7011 Author: Tobin C. Harding Date: Tue Mar 21 13:37:06 2017 +1100 staging: ks7010: fix checkpatch BRACES Checkpatch emits CHECK: Unbalanced braces around else statement. Statements in question are single statements so we do not need braces. Checkpatch also warns about multiple line dereference for this code. Fix if/else/else if statement use of braces. Fix function argument layout at the same time since it is the same statement. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 44c3cd5e0459fe1b6611bba9eb6b4d7d8c650686 Author: Tobin C. Harding Date: Tue Mar 21 13:37:05 2017 +1100 staging: ks7010: fix checkpatch PARENTHESIS_ALIGNMENT Checkpatch emits CHECK: Alignment should match open parenthesis. Fix alignment to open parenthesis in line with kernel coding style. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 4 ++-- drivers/staging/ks7010/ks_wlan_net.c | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) commit f842397229e447615d5abb3cac34a978ce8f8072 Author: Tobin C. Harding Date: Tue Mar 21 13:37:04 2017 +1100 staging: ks7010: fix checkpatch SPACING Checkpatch emits CHECK: No space is necessary after a cast. Remove unnecessary space after cast. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/michael_mic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 44f2bf55e2f8e000d7e6e6384844a899f66e78ab Author: Tobin C. Harding Date: Tue Mar 21 13:37:03 2017 +1100 staging: ks7010: fix checkpatch LINE_SPACING Checkpatch emits CHECK: Please use a blank line after function/struct/union/enum declarations. Add blank line after function definition. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 1 + 1 file changed, 1 insertion(+) commit 2ea91ce574a3c0e02e024a55312dc453410bca04 Author: Stefan Wahren Date: Sat Mar 18 08:42:11 2017 +0000 staging: vchiq_arm: Fix MODULE_LICENSE Regarding to the header the driver is licensed under BSD and GPL. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b4eda001704f3a26e55d99b1d61844d81b12361 Author: Arvind Yadav Date: Fri Mar 17 12:21:23 2017 +0530 Staging: media: Unmap and release region obtained by ioremap_nocache Free memory mapping, if vpfe_ipipe_init is not successful. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 9aa1eca095579b8a8ea84d9bbd1fbdeff49cebd4 Author: Nickey Yang Date: Tue Mar 21 15:36:17 2017 +0800 drm: bridge: dw-hdmi: add HDMI vendor specific infoframe config Vendor specific infoframe is mandatory for 4K2K resolution. Without this, the HDMI protocol compliance fails. Signed-off-by: Nickey Yang Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1490081777-2232-1-git-send-email-nickey.yang@rock-chips.com drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 53 +++++++++++++++++++++++++++++++ drivers/gpu/drm/bridge/synopsys/dw-hdmi.h | 4 +++ 2 files changed, 57 insertions(+) commit 94bb4dc132ed2e3a4d16649b0096c49d13670fe8 Author: Nickey Yang Date: Mon Mar 20 10:57:31 2017 +0800 drm/bridge: dw_hdmi: support i2c extended read mode "I2C Master Interface Extended Read Mode" implements a segment pointer-based read operation using the Special Register configuration. This patch fix https://patchwork.kernel.org/patch/7098101/ mentioned "The current implementation does not support "I2C Master Interface Extended Read Mode" to read data addressed by non-zero segment pointer, this means that if EDID has more than 1 extension blocks, EDID reading operation won't succeed" With this patch, dw-hdmi can read EDID data with 1/2/4 blocks. Signed-off-by: Nickey Yang Reviewed-by: Douglas Anderson Acked-by: Vladimir Zapolskiy Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1489978651-16647-1-git-send-email-nickey.yang@rock-chips.com drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 38 +++++++++++++++++++------------ 1 file changed, 24 insertions(+), 14 deletions(-) commit 7369e062fde2fe64502011c85b11176eb3c5ea06 Author: Arushi Singhal Date: Mon Mar 20 19:36:56 2017 +0530 staging:sm750fb: Code readability is improved. New variables are added to make the code more readable. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_mode.c | 55 +++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 25 deletions(-) commit 50d94eac3ef4e5c26f3f68c9c10e9363c9a4b962 Author: Ding-Chi Wang Date: Sat Mar 18 16:59:14 2017 +0800 staging: rtl8712: checkpatch: Avoid multiple line dereferences "WARNING: Avoid multiple line dereference - prefer 'poid_par_priv->information_buf_len'" "WARNING: Avoid multiple line dereference - prefer 'padapter->registrypriv.dev_network.Configuration'" "WARNING: Avoid multiple line dereference - prefer 'Adapter->mppriv.workparam.io_value'" Signed-off-by: Ding-Chi Wang Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_ioctl_rtl.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 217d31c4cdc5ff7160e6c6928a81ce9598cadc6e Author: Narcisa Ana Maria Vasile Date: Sat Mar 18 18:56:00 2017 +0200 staging: lustre: libcfs: Define pr_fmt() to include relevant name Define a pr_fmt() for tracefile.c Remove redundant prefix 'Lustre' from pr_*() calls. Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/libcfs/tracefile.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit f7b24d53970742362b70c3282eb17845e07f4244 Author: Narcisa Ana Maria Vasile Date: Sat Mar 18 18:55:25 2017 +0200 staging: lustre: libcfs: Replace printk() with pr_*() Convert printk() calls into corresponding pr_*() calls. Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/libcfs/tracefile.c | 50 ++++++++++++-------------- 1 file changed, 22 insertions(+), 28 deletions(-) commit 447a7f934e82284bc0cd3270f6491412fcab3f6d Author: Jérémy Lefaure Date: Mon Mar 20 22:48:26 2017 -0400 staging: media: atomisp: fix build errors when PM is disabled The function atomisp_restore_iumit_reg is unused when PM is disabled. Adding __maybe_unused to the function definition avoids a warning. The function atomisp_mrfld_power_down is defined only when PM is enabled. So in atomisp_pci_probe, it should be called only when PM is enabled. Signed-off-by: Jérémy Lefaure Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 435ec8afa59e28b4bcf2933da86b2c32fa326f8c Author: Daeseok Youn Date: Tue Mar 21 11:12:57 2017 +0900 staging: atomisp: remove useless condition in if-statements The css_pipe_id was checked with 'CSS_PIPE_ID_COPY' in previous if- statement. In this case, if the css_pipe_id equals to 'CSS_PIPE_ID_COPY', it could not enter the next if-statement. But the "next" if-statement has the condition to check whether the css_pipe_id equals to 'CSS_PIPE_ID_COPY' or not. It should be removed. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 00987f507c865269f69c49b56f7f8f2aad19f2ad Author: Varsha Rao Date: Sun Mar 19 18:06:24 2017 +0530 staging: media: atomisp: Remove unnecessary braces. Remove braces which are not required to fix the check patch issue. The following coccinelle script is used to fix this issue. @@ expression e,e1; @@ if(e) -{ e1; -} Signed-off-by: Varsha Rao Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman .../pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2.host.c | 3 +-- .../pci/atomisp2/css2400/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c | 3 +-- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) commit 2e58bb4a3327d2842f8537bf994c623c9eee8cc6 Author: Varsha Rao Date: Sun Mar 19 18:03:13 2017 +0530 staging: media: atomisp: Remove unnecessary blank lines. Remove multiple blank lines, which are not required. This patch fixes the following check patch issue: CHECK: Please don't use multiple blank lines Signed-off-by: Varsha Rao Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman .../pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2.host.c | 2 -- .../pci/atomisp2/css2400/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c | 5 ----- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c | 2 -- .../staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 2 -- 4 files changed, 11 deletions(-) commit 3cd0d0920ffe5ce3bdc3cce8475508e4ae0eed2a Author: Varsha Rao Date: Sun Mar 19 18:00:04 2017 +0530 staging: media: atomisp: Fix block comments warning. Use kernel preferred block commenting style, to fix the checkpatch issue. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman .../css2400/isp/kernels/ctc/ctc2/ia_css_ctc2.host.c | 19 +++++++++---------- .../isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c | 9 ++++++--- 2 files changed, 15 insertions(+), 13 deletions(-) commit 217fa187ea58aad4f649d00600e6945eaa8e8a18 Author: Varsha Rao Date: Sun Mar 19 17:57:21 2017 +0530 staging: media: atomisp: Added spaces around arithmetic operators. Add spaces around arithmetic operators (/, +, -), to fix the checkpatch issue. Signed-off-by: Varsha Rao Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman .../css2400/isp/kernels/ctc/ctc2/ia_css_ctc2.host.c | 14 +++++++------- .../css2400/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c | 6 +++--- .../atomisp/platform/intel-mid/atomisp_gmin_platform.c | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) commit 325b5b6c96a863989078df402d1670d061f52d88 Author: Michael Zoran Date: Tue Mar 14 17:01:25 2017 -0700 staging: bcm2835-audio: Add support for simultanous HDMI and Headphone audio The firmware for the Raspberry PI already supports simultanous output of audio through both the HDMI and the Headphone jack. The current implementation of ALSA doesn't expose this well to user mode since the firmware audio is represented as a single card. A newer approach is taken here and a virtual card is created for each output(HDMI, Headphones, and Traditional ALSA). The firmware has the concept of channels or streams for which the number to use is passed in the device tree. These streams are allocated to each of the virtual cards. As a side effect of this change, since each output is represented independenly it's now very easy to use PulseAudio to control the priorities of the outputs. Testing: Audacity and VLC were both loaded at the same time. Each application was assigned to a different card. With this change I was able to play different music files at the same time through the HDMI and Headphones jacks and control the audio independently. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-audio/bcm2835-ctl.c | 86 +++++ .../vc04_services/bcm2835-audio/bcm2835-pcm.c | 40 +- .../staging/vc04_services/bcm2835-audio/bcm2835.c | 412 ++++++++++++++++----- .../staging/vc04_services/bcm2835-audio/bcm2835.h | 11 +- 4 files changed, 450 insertions(+), 99 deletions(-) commit f7d51372d7d1779bf60f7de35a4b12850442a9de Author: Dave Stevenson Date: Tue Mar 14 08:10:40 2017 -0700 bcm2835-v4l2: Fix buffer overflow problem https://github.com/raspberrypi/linux/issues/1447 port_parameter_get() failed to account for the header (u32 id and u32 size) in the size before memcpying the response into the response buffer, so overrunning the provided buffer by 8 bytes. Account for those bytes, and also a belt-and-braces check to ensure we never copy more than *value_size bytes into value. Signed-off-by: Dave Stevenson Signed-off-by: Michael Zoran Tested-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ce95e3a9c59916d248df0a1a80494969777565df Author: Arnd Bergmann Date: Mon Mar 20 10:35:28 2017 +0100 staging: vc04_services: make BCM_VIDEOCORE tristate Adding the 'bool' symbol brought back a randconfig build bug that I had fixed before: drivers/staging/built-in.o: In function `vchiq_probe': (.text+0x1da30): undefined reference to `rpi_firmware_get' drivers/staging/built-in.o: In function `vchiq_platform_init': (.text+0x27494): undefined reference to `rpi_firmware_property' The problem is that when RASPBERRYPI_FIRMWARE is a loadable module, but BCM2835_VCHIQ can again be built-in. Making BCM_VIDEOCORE itself tristate will make Kconfig honor the dependency correctly. Fixes: 6bbfe4a76158 ("staging: vc04_services: Create new BCM_VIDEOCORE setting for VideoCore services.") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35060a228e70c712cb626ef3eabaedc40903eb77 Author: Colin Ian King Date: Mon Mar 20 14:08:50 2017 +0000 staging: vc04_services: fix NULL pointer dereference on pointer 'service' Currently, if pservice is null then service is set to NULL and immediately afterwards service is dereferenced causing a null pointer dereference. Fix this by bailing out early of the function with a null return. Detected by CoverityScan, CID#1419681 ("Explicit null dereferenced") Signed-off-by: Colin Ian King Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef37bc361442545a5be3c56c49a08c3153032127 Author: Thomas Garnier Date: Tue Mar 21 08:17:25 2017 +0100 x86/headers: Simplify asm/fixmap.h inclusion into asm/pgtable*.h Instead of including fixmap.h twice in pgtable_32.h and pgtable_64.h, include it only once, in the common asm/pgtable.h header. Signed-off-by: Thomas Garnier Cc: Alexander Potapenko Cc: Andrew Morton Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Chris Wilson Cc: Dave Hansen Cc: Dmitry Vyukov Cc: Hugh Dickins Cc: Kees Cook Cc: Linus Torvalds Cc: Matthew Wilcox Cc: Michal Hocko Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Xiao Guangrong Cc: kasan-dev@googlegroups.com Cc: kernel-hardening@lists.openwall.com Cc: linux-mm@kvack.org Cc: richard.weiyang@gmail.com Cc: zijun_hu Link: http://lkml.kernel.org/r/20170321071725.GA15782@gmail.com [ Generated this patch from two other patches and wrote changelog. ] Signed-off-by: Ingo Molnar arch/x86/include/asm/pgtable.h | 1 + arch/x86/include/asm/pgtable_32.h | 1 - arch/x86/include/asm/pgtable_64.h | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) commit c62990801d3beb7e6182c742832128ef3e2b1100 Author: Daeseok Youn Date: Mon Mar 20 14:42:55 2017 +0000 staging: atomisp: simplify if statement in atomisp_get_sensor_fps() If v4l2_subdev_call() gets the global frame interval values, it returned 0 and it could be checked whether numerator is zero or not. If the numerator is not zero, the fps could be calculated in this function. If not, it just returns 0. Signed-off-by: Daeseok Youn Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 3797616eaa3000f5526aab8ef02000a92fbc5415 Author: Alan Cox Date: Mon Mar 20 14:42:41 2017 +0000 atomisp: remove a sysfs error message that can be used to log spam Instead of logging this just report ERANGE as an error, which will give something close to the right user space report. The others of these were already removed by Dan Carpenter's patch. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 02838938a9414d6f3fe5f427c34efd8d87365862 Author: Daeseok Youn Date: Mon Mar 20 14:42:23 2017 +0000 staging: atomisp: remove redudant condition in if-statement The V4L2_FIELD_ANY is zero, so the (!field) is same meaning with (field == V4L2_FIELD_ANY) in if-statement. Signed-off-by: Daeseok Youn Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9f11ace35ac6d37f04153c236dddc8308b0bdc2 Author: Daeseok Youn Date: Mon Mar 20 14:42:15 2017 +0000 staging: atomisp: remove else statement after return It doesn't need to have else statement after return. Signed-off-by: Daeseok Youn Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9b7edbb60bb8ee2b9a0c93dd776be82a6b0ea666 Author: Arnd Bergmann Date: Mon Mar 20 14:42:05 2017 +0000 staging/atomisp: add ACPI dependency Without ACPI, some of the code fails to build: media/atomisp/platform/intel-mid/atomisp_gmin_platform.c: In function 'atomisp_register_i2c_module': media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:174:7: error: dereferencing pointer to incomplete type 'struct acpi_device' We could work around that in the code, but since we already have a hard dependency on x86, adding the ACPI dependency seems to be the easiest solution. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Arnd Bergmann Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19740d6840b558bae61d5cbe75c6f430ad1e71b0 Author: Arnd Bergmann Date: Mon Mar 20 14:41:55 2017 +0000 staging/atomisp: add PCI dependency Without CONFIG_PCI, config space reads never return any data, leading to undefined behavior that gcc warns about: platform/intel-mid/intel_mid_pcihelpers.c: In function 'intel_mid_msgbus_read32_raw': platform/intel-mid/intel_mid_pcihelpers.c:66:9: error: 'data' is used uninitialized in this function [-Werror=uninitialized] platform/intel-mid/intel_mid_pcihelpers.c: In function 'intel_mid_msgbus_read32_raw_ext': platform/intel-mid/intel_mid_pcihelpers.c:84:9: error: 'data' is used uninitialized in this function [-Werror=uninitialized] platform/intel-mid/intel_mid_pcihelpers.c: In function 'intel_mid_msgbus_read32': platform/intel-mid/intel_mid_pcihelpers.c:137:9: error: 'data' is used uninitialized in this function [-Werror=uninitialized] With a dependency on CONFIG_PCI, we don't get this warning. This seems safe as PCI config space accessors should always return something when PCI is enabled. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Arnd Bergmann Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 418eaad30eea3183f8a4338d1603877596f34b08 Author: Arnd Bergmann Date: Mon Mar 20 14:41:47 2017 +0000 staging/atomisp: add VIDEO_V4L2_SUBDEV_API dependency The driver fails to build if this is disabled, so we need an explicit Kconfig dependency: drivers/staging/media/atomisp/pci/atomisp2/./atomisp_cmd.c:6085:48: error: 'struct v4l2_subdev_fh' has no member named 'pad' Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Arnd Bergmann Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 902ea5fcd577417af0b779b79272a45a3a3b7f5b Author: Arnd Bergmann Date: Mon Mar 20 14:41:38 2017 +0000 staging/atomisp: remove sh_css_lace_stat code I ran into a build warning on my randconfig build box: drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c: In function 'ia_css_lace_statistics_free': drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:2845:64: error: parameter 'me' set but not used [-Werror=unused-but-set-parameter] It turns out that not only the parameter is unused but the entire function has no caller. Let's just remove it. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Arnd Bergmann Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../staging/media/atomisp/pci/atomisp2/Makefile | 1 - .../media/atomisp/pci/atomisp2/css2400/ia_css.h | 1 - .../atomisp/pci/atomisp2/css2400/ia_css_buffer.h | 1 - .../pci/atomisp2/css2400/ia_css_lace_stat.h | 37 ---------------------- .../atomisp/pci/atomisp2/css2400/sh_css_internal.h | 1 - .../pci/atomisp2/css2400/sh_css_lace_stat.c | 16 ---------- .../atomisp/pci/atomisp2/css2400/sh_css_params.c | 15 --------- 7 files changed, 72 deletions(-) commit a22933221c43bf4bb9f018bc734c1465953d67c2 Author: Arnd Bergmann Date: Mon Mar 20 14:41:29 2017 +0000 stating/atomisp: fix -Wold-style-definition warning ia_css_dequeue_param_buffers does not have an arguement type, causing a warning: drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c: In function 'ia_css_dequeue_param_buffers': drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:3728:6: error: old-style function definition [-Werror=old-style-definition] This adds a 'void' keywork to silence the warning. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Arnd Bergmann Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72d2b01e84b25a5ff66662bcd97201c800130169 Author: Arnd Bergmann Date: Mon Mar 20 14:41:20 2017 +0000 staging/atomisp: fix empty-body warning Defining a debug function to nothing causes a warning with an empty block after if()/else(): drivers/staging/media/atomisp/i2c/ov2680.c: In function 'ov2680_s_stream': drivers/staging/media/atomisp/i2c/ov2680.c:1208:55: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] This changes the empty debug statement to dev_dbg(), which by default also does nothing, but avoids this warning and also checks the format string. As a side-effect, we can now use dynamic debugging to turn on the output at runtime. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Arnd Bergmann Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/ov2680.c | 37 +++++++++++++++--------------- 1 file changed, 19 insertions(+), 18 deletions(-) commit 55a9177612fc4cb5d816f30667b4d9caf0f5a493 Author: Jérémy Lefaure Date: Mon Mar 20 14:41:02 2017 +0000 staging: media: atomisp: add missing dependencies in Kconfig Two dependencies were missing to build atomisp drivers: _ MEDIA_CONTROLLER: to use the entity field of v4l2_subdev structure. Since every atomisp driver needs MEDIA_CONTROLLER has a dependency, let's add it to INTEL_ATOMISP _ EFI: to use efivar_entry_get: drivers/built-in.o: In function `gmin_get_config_var': (.text+0xe062b): undefined reference to `efivar_entry_get' Signed-off-by: Jérémy Lefaure Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/Kconfig | 2 +- drivers/staging/media/atomisp/i2c/ov5693/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5e43d672d4cc5b60a64ec8fb5994ba56f5c7e648 Author: Jérémy Lefaure Date: Mon Mar 20 14:40:50 2017 +0000 staging: media: atomisp: select REGMAP_I2C needed by ap1302.c REGMAP_I2C should be enabled to build the driver ap1302 because it uses regmap functions. Signed-off-by: Jérémy Lefaure Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/Kconfig | 1 + 1 file changed, 1 insertion(+) commit b5563094d7dffac4dda654db476036b97a614e3a Author: Dan Carpenter Date: Mon Mar 20 14:40:41 2017 +0000 Staging: atomisp: fix an uninitialized variable bug There are some error paths in atomisp_css_frame_allocate() which don't initialize "res" so it could lead us to try release random memory. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Dan Carpenter Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af4fd0e7a43633e768685b8baf0b5d11d952bbe6 Author: Dan Carpenter Date: Mon Mar 20 14:40:32 2017 +0000 Staging: atomisp: fix locking in alloc_user_pages() We call this function with the lock held and should also return with the lock held as well. This one error path is not-consistent because we should return without the lock held. Signed-off-by: Dan Carpenter Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 1 + 1 file changed, 1 insertion(+) commit 08dcded491c90229295027771447bf0ff9882be6 Author: Alan Cox Date: Mon Mar 20 14:40:20 2017 +0000 atomisp: remove another pair of 2400/2401 differences The first of these checks the PCI identifier in order to decide what to do so needs no ifdef. The other is simply a variation on what is dumped for debug - so favour dumping the most. Signed-off-by Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 7 ------- drivers/staging/media/atomisp/pci/atomisp2/atomisp_dfs_tables.h | 4 ---- 2 files changed, 11 deletions(-) commit 9bc30b3a7951a2568817a8c8024e6bdc469e305e Author: Alan Cox Date: Mon Mar 20 14:40:06 2017 +0000 atomisp/imx: Fix locking bug on error path This was reported by Dan Carpenter. When we error with an IMX 227 we don't release the lock and the sensor would then hang. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/imx/imx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b8340109400321d1ac23db0ad20a1d7bf17bff04 Author: Alan Cox Date: Mon Mar 20 14:39:21 2017 +0000 atomisp: ia_css_bh_hmem_encode is a no-op so remove it This is a do nothing function so we can replace it with nothing and eliminate it entirely. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../hive_isp_css_2400_system_generated/ia_css_isp_params.c | 6 ------ .../ia_css_isp_params.c | 6 ------ .../hive_isp_css_2401_system_generated/ia_css_isp_params.c | 6 ------ .../pci/atomisp2/css2400/isp/kernels/bh/bh_2/ia_css_bh.host.c | 11 ----------- .../pci/atomisp2/css2400/isp/kernels/bh/bh_2/ia_css_bh.host.h | 6 ------ 5 files changed, 35 deletions(-) commit ceb68bb69441c465f707b8d9f01d1b1ebb5e735b Author: Alan Cox Date: Mon Mar 20 14:38:59 2017 +0000 atomisp: remove another layer of allocator indirection Our driver only ever uses one set of routines for the allocators used by the CSS layer to manage memory and the memory management on the ISP. We can thus remove the function vectors and simply call the intended routines directly. These routines in turn are simply wrappers around another layer of code so remove this second layer of wrappers and call the hrt methods directly. In time we can remove this layer of indirection as well. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../atomisp/pci/atomisp2/atomisp_compat_css20.c | 66 ---------------------- .../ia_css_isp_states.h | 1 - .../ia_css_isp_states.h | 1 - .../ia_css_isp_states.h | 1 - .../atomisp/pci/atomisp2/css2400/ia_css_env.h | 48 ---------------- .../pci/atomisp2/css2400/ia_css_memory_access.c | 64 +++++++++++---------- .../pci/atomisp2/css2400/ia_css_memory_access.h | 24 -------- .../css2400/isp/kernels/bh/bh_2/ia_css_bh.host.c | 1 - .../raw_aa_binning_1.0/ia_css_raa.host.c | 1 - .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 4 -- 10 files changed, 35 insertions(+), 176 deletions(-) commit 962da22bbadd4dd07677f8b2c55588cf900a8b32 Author: Alan Cox Date: Mon Mar 20 14:38:42 2017 +0000 atomisp: remove the unused debug wrapping from the mmgr layer We don't need this layer of indirection and the debugging information is not used. With this removed we can then go on to try and remove the abstraction layer entirely. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../memory_access/memory_access.h | 80 +++------------------- .../pci/atomisp2/css2400/ia_css_memory_access.c | 30 +++----- 2 files changed, 20 insertions(+), 90 deletions(-) commit 6eb04a8c7f650542c8a474eb79e6f61b6c72d541 Author: Alan Cox Date: Mon Mar 20 14:38:27 2017 +0000 atomisp: remove aa kernel wrappers The aa kernel is used but it consists of nothing more than a set of wrappers for a memset and an assignment. Replace these at the calling points with the memset and assignment. Keep the structures for now - those should disappear as the next layer up gets unwrapped. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../ia_css_isp_params.c | 29 +++++------------- .../ia_css_isp_states.c | 7 ++--- .../ia_css_isp_params.c | 27 ++++------------- .../ia_css_isp_states.c | 8 ++--- .../ia_css_isp_params.c | 27 ++++------------- .../ia_css_isp_states.c | 8 ++--- .../css2400/isp/kernels/aa/aa_2/ia_css_aa2.host.c | 34 ---------------------- .../css2400/isp/kernels/aa/aa_2/ia_css_aa2.host.h | 23 --------------- .../atomisp/pci/atomisp2/css2400/sh_css_params.c | 2 -- 9 files changed, 26 insertions(+), 139 deletions(-) commit 46a85fcdea45538bc8a0a3d6a784e34017da8919 Author: Alan Cox Date: Mon Mar 20 14:38:13 2017 +0000 atomisp: remove the iefd2 kernel While this is included and the headers pulled in nothing actually uses this functionality in the driver, so remove it. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../staging/media/atomisp/pci/atomisp2/Makefile | 3 - .../ia_css_isp_params.c | 1 - .../ia_css_isp_states.h | 1 - .../ia_css_isp_params.c | 1 - .../ia_css_isp_states.h | 1 - .../ia_css_isp_params.c | 1 - .../ia_css_isp_states.h | 1 - .../isp/kernels/iefd2_6/ia_css_iefd2_6.host.c | 200 --------------------- .../isp/kernels/iefd2_6/ia_css_iefd2_6.host.h | 46 ----- .../kernels/iefd2_6/ia_css_iefd2_6_default.host.c | 144 --------------- .../kernels/iefd2_6/ia_css_iefd2_6_default.host.h | 23 --- .../isp/kernels/iefd2_6/ia_css_iefd2_6_param.h | 83 --------- .../isp/kernels/iefd2_6/ia_css_iefd2_6_state.h | 32 ---- .../isp/kernels/iefd2_6/ia_css_iefd2_6_types.h | 164 ----------------- 14 files changed, 701 deletions(-) commit e56f334f0ff60a6cf82c06a03899e4b1e7e99f1d Author: David Binder Date: Fri Mar 17 11:27:27 2017 -0400 staging: unisys: include: channel.h: Fix #define formatting In an effort to create a more uniform coding style within the Unisys s-Par driver set, this patch adjusts the formatting of all #define directives within this source file to match the following template, and thereby eliminate irregular usage of whitespace: Reviewed-by: Tim Sell The amount of whitespace used between the and the is dependent on what is needed to make the surrounding #define directives as uniform as possible. Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 4830aec8267e2bf0c05b1d59e03ba32052c7f00e Author: David Binder Date: Fri Mar 17 11:27:26 2017 -0400 staging: unisys: include: visorbus.h: Fix #define formatting In an effort to create a more uniform coding style within the Unisys s-Par driver set, this patch adjusts the formatting of all #define directives within this source file to match the following template, and thereby eliminate irregular usage of whitespace: Reviewed-by: Tim Sell The amount of whitespace used between the and the is dependent on what is needed to make the surrounding #define directives as uniform as possible. Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31a9f6450b30fd221da3d1bf0513ae37fc2ff30b Author: David Binder Date: Fri Mar 17 11:27:25 2017 -0400 staging: unisys: include: iochannel.h: Fix #define formatting In an effort to create a more uniform coding style within the Unisys s-Par driver set, this patch adjusts the formatting of all #define directives within this source file to match the following template, and thereby eliminate irregular usage of whitespace: Reviewed-by: Tim Sell The amount of whitespace used between the and the is dependent on what is needed to make the surrounding #define directives as uniform as possible. Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/iochannel.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 393bde46b8dc914e862293b39209940fbb392e42 Author: David Binder Date: Fri Mar 17 11:27:24 2017 -0400 staging: unisys: visorhba: visorhba_main.c: Fix #define formatting In an effort to create a more uniform coding style within the Unisys s-Par driver set, this patch adjusts the formatting of all #define directives within this source file to match the following template, and thereby eliminate irregular usage of whitespace: Reviewed-by: Tim Sell The amount of whitespace used between the and the is dependent on what is needed to make the surrounding #define directives as uniform as possible. Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorhba/visorhba_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b9b2c242fabcf5cb82cfe27d8ff20b7116cf391c Author: David Binder Date: Fri Mar 17 11:27:23 2017 -0400 staging: unisys: visorinput: visorinput.c: Fix #define formatting In an effort to create a more uniform coding style within the Unisys s-Par driver set, this patch adjusts the formatting of all #define directives within this source file to match the following template, and thereby eliminate irregular usage of whitespace: Reviewed-by: Tim Sell The amount of whitespace used between the and the is dependent on what is needed to make the surrounding #define directives as uniform as possible. Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorinput/visorinput.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 07b7eef2c507c7494da0f62fd87e2197c386b856 Author: David Binder Date: Fri Mar 17 11:27:22 2017 -0400 staging: unisys: visorbus: vmcallinterface.h: Fix #define formatting In an effort to create a more uniform coding style within the Unisys s-Par driver set, this patch adjusts the formatting of all #define directives within this source file to match the following template, and thereby eliminate irregular usage of whitespace: Reviewed-by: Tim Sell The amount of whitespace used between the and the is dependent on what is needed to make the surrounding #define directives as uniform as possible. Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/vmcallinterface.h | 26 +++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) commit 9757518eb1913d388f6d462c6f0825110acfd2c0 Author: David Binder Date: Fri Mar 17 11:27:21 2017 -0400 staging: unisys: visorbus: vbuschannel.h: Fix #define formatting In an effort to create a more uniform coding style within the Unisys s-Par driver set, this patch adjusts the formatting of all #define directives within this source file to match the following template, and thereby eliminate irregular usage of whitespace: Reviewed-by: Tim Sell The amount of whitespace used between the and the is dependent on what is needed to make the surrounding #define directives as uniform as possible. Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/vbuschannel.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit ccc0d7bf29ce716c648627bb7c03b3c5a08251f7 Author: David Binder Date: Fri Mar 17 11:27:20 2017 -0400 staging: unisys: visorbus: visorchipset.c: Fix #define formatting In an effort to create a more uniform coding style within the Unisys s-Par driver set, this patch adjusts the formatting of all #define directives within this source file to match the following template, and thereby eliminate irregular usage of whitespace: Reviewed-by: Tim Sell The amount of whitespace used between the and the is dependent on what is needed to make the surrounding #define directives as uniform as possible. Signed-off-by: David Binder 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 941affcbe039a3951cab2ac081f7c11ee79f9b17 Author: David Binder Date: Fri Mar 17 11:27:19 2017 -0400 staging: unisys: visorbus: controlvmchannel.h: Fix #define formatting In an effort to create a more uniform coding style within the Unisys s-Par driver set, this patch adjusts the formatting of all #define directives within this source file to match the following template, and thereby eliminate irregular usage of whitespace: Reviewed-by: Tim Sell The amount of whitespace used between the and the is dependent on what is needed to make the surrounding #define directives as uniform as possible. Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/controlvmchannel.h | 134 ++++++++++----------- 1 file changed, 67 insertions(+), 67 deletions(-) commit ffcdb1012d0cd16ebe51759d417775f43cdfcc80 Author: David Binder Date: Fri Mar 17 11:27:18 2017 -0400 staging: unisys: visorbus: visorbus_main.c: Fix #define formatting In an effort to create a more uniform coding style within the Unisys s-Par driver set, this patch adjusts the formatting of all #define directives within this source file to match the following template, and thereby eliminate irregular usage of whitespace: Reviewed-by: Tim Sell The amount of whitespace used between the and the is dependent on what is needed to make the surrounding #define directives as uniform as possible. Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2a60109a37e6d47c30ea94d4bb0fb644ab4aad2 Author: David Binder Date: Fri Mar 17 11:27:17 2017 -0400 staging: unisys: visorbus: visorchannel.c: Fix #define formatting In an effort to create a more uniform coding style within the Unisys s-Par driver set, this patch adjusts the formatting of all #define directives within this source file to match the following template, and thereby eliminate irregular usage of whitespace: Reviewed-by: Tim Sell The amount of whitespace used between the and the is dependent on what is needed to make the surrounding #define directives as uniform as possible. Signed-off-by: David Binder Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 2c97273edddb4721d5ba1f8da3468276812d379e Author: Jon Frisch Date: Fri Mar 17 11:27:16 2017 -0400 staging: unisys: visorbus: remove #pragma directive This patch removes the #pragma directive from visorchannel.h and adds the __packed keyword to all structs to suppress structure padding. Signed-off-by: Jon Frisch Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/vbuschannel.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit a7d2ab20f8793da469482029564203feea57c01e Author: Jon Frisch Date: Fri Mar 17 11:27:15 2017 -0400 staging: unisys: visornic: remove inline functions This patch removes inline functions in visornic_main.c. Signed-off-by: Jon Frisch Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit bc043daa77b5162608acfd689cf5dcfbe6c432b2 Author: Jon Frisch Date: Fri Mar 17 11:27:14 2017 -0400 staging: unisys: include: remove irrelevant comments This patch removes comments that are no longer relevant in channel.h. Signed-off-by: Jon Frisch Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 10 ---------- 1 file changed, 10 deletions(-) commit a54e78088974e26770337bfafecced497e64ac2c Author: Jon Frisch Date: Fri Mar 17 11:27:13 2017 -0400 staging: unisys: include: removed unused function declarations This patch removes the unused function declarations in channel.h. Signed-off-by: Jon Frisch Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 80 -------------------------------- 1 file changed, 80 deletions(-) commit 245b746d459c3732861b37ceef6523c6098ad3d0 Author: Jon Frisch Date: Fri Mar 17 11:27:12 2017 -0400 staging: unisys: include: remove macro lengthof This patch removes the unused macro lengthof. Signed-off-by: Jon Frisch Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 3 --- 1 file changed, 3 deletions(-) commit 5da77f375d2364385842602b50057aafc039e543 Author: David Binder Date: Fri Mar 17 11:27:11 2017 -0400 staging: unisys: visorbus: Remove pointer cast that causes sparse warning Removes unnecessary cast of to __iomem of a non-io-mapped pointer, thereby eliminating the following sparse warning: visorchannel.c:159:17: warning: cast adds address space to expression () Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_private.h | 2 +- drivers/staging/unisys/visorbus/visorchannel.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit c4549595c9bbbc8354f89111f96221466a6809ec Author: David Kershner Date: Fri Mar 17 11:27:10 2017 -0400 staging: unisys: include: simplify spar_check_channel_client The function spar_check_channel_client shouldn't need to do readq's, it is referencing a local copy of the channel header. Simplify it to just access the fields directly. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 37 +++++++++++--------------------- 1 file changed, 13 insertions(+), 24 deletions(-) commit 3cda79c664dfdbbfc471a055ea64ece7407ae5a0 Author: David Binder Date: Fri Mar 17 11:27:09 2017 -0400 staging: unisys: include: Add function definition argument identifier Adds identifier to function definition arguments to satisfy checkpatch warnings: WARNING: function definition argument 'struct visor_driver *' should also have an identifier name WARNING: function definition argument 'struct visor_driver *' should also have an identifier name Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f1844d1bcd5cde311f01e68f974e04d5db3c4f9a Author: David Binder Date: Fri Mar 17 11:27:08 2017 -0400 staging: unisys: visorinput: Remove unnecessary usage of local variable Remove local variable on stack by directly returning the value in the array. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorinput/visorinput.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 999bc1ffb7dc8f2e0739fb3bf48fdcb79f562dca Author: David Binder Date: Fri Mar 17 11:27:07 2017 -0400 staging: unisys: visorbus: Rename what vmcallinterface.h #define Renames __IOMONINTF_H__ to __VMCALLINTERFACE_H__, which more closely reflects the naming conventions of the code. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/vmcallinterface.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ea0d207564e3211658ceba9736dcca76bd8276b7 Author: David Binder Date: Fri Mar 17 11:27:06 2017 -0400 staging: unisys: visornic: Move function to appropriate location Move function add_physinfo_entries() to visornic_main.c, which is the only function where it is used. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/iochannel.h | 37 ------------------------- drivers/staging/unisys/visornic/visornic_main.c | 37 +++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 37 deletions(-) commit 392064a0c1253fd648fe7d2d7b879ed841306ea6 Author: David Binder Date: Fri Mar 17 11:27:05 2017 -0400 staging: unisys: include: Change out-of-date references Replace references to virtpci to visornic in iochannel.h. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/iochannel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 750d82f2628fed8b391e13f80dce73e262275925 Author: David Binder Date: Fri Mar 17 11:27:04 2017 -0400 staging: unisys: visorbus: Rename #define VMCALL_IO_CONTROLVM_ADDR Rename #define VMCALL_IO_CONTROLVM_ADDR to VMCALL_CONTROLVM_ADDR, as this vmcall can be used by any partition, not just the IO partition. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 +- drivers/staging/unisys/visorbus/vmcallinterface.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit bf8d0e947fd885e62daa66cfb14fd85dc97e73af Author: David Binder Date: Fri Mar 17 11:27:03 2017 -0400 staging: unisys: visorbus: Remove useless checks in visorbus_main.c Removes checks that all visor_device instances have an associated visorchannel. Due to the design of the s-Par drivers these checks are unnecessary. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) commit 287f13f48e0c343000ed2fd96dca67f994e40bce Author: David Binder Date: Fri Mar 17 11:27:02 2017 -0400 staging: unisys: include: Remove unused visorchannel #defines Removes unused #defines pertaining to visorchannel UUIDs. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 13 ------------- 1 file changed, 13 deletions(-) commit 9abbbf22640e1de778b57627f4a468a17453d3a8 Author: David Binder Date: Fri Mar 17 11:27:01 2017 -0400 staging: unisys: include: Wrap macro argument in parenthesis Addresses checkpatch check by wrapping macro argument in parenthesis. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f0a9eb04b971697d10efd48d08ce6adf8c4a332 Author: Sameer Wadgaonkar Date: Fri Mar 17 11:27:00 2017 -0400 staging: unisys: visorbus: remove inline keyword in visorchannel.c Removed inline keyword from functions sig_read_data and sig_write_data in visorchannel.c Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7d91a1f15ebbc53dcb0e5a6112735beb67a3618c Author: Sameer Wadgaonkar Date: Fri Mar 17 11:26:59 2017 -0400 staging: unisys: visorbus: remove inline keyword from visorchipset Removed inline keyword from the functions in visorchipset: * issue_vmcall_io_controlvm_addr() Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 841f4e468928ad33c5ab94eb0dd14c59d8650dc3 Author: Sameer Wadgaonkar Date: Fri Mar 17 11:26:58 2017 -0400 staging: unisys: visorhba: remove inline keyword Removed inline keyword from the function complete_taskmgmt_command in visorhba_main.c Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorhba/visorhba_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 89dd54d0ebe669bbf4d4da77ec5c56de48f20a7d Author: Sameer Wadgaonkar Date: Fri Mar 17 11:26:57 2017 -0400 staging: unisys: visorbus: remove unused functions in visorchipset Removed unused functions issue_vmcall_update_physical_time() and issue_vmcall_query_guest_virtual_time_offset() from visorchipset.c Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 18 ------------------ 1 file changed, 18 deletions(-) commit c247a28e22a00713c3cb54027722826a0cffbd2a Author: Sameer Wadgaonkar Date: Fri Mar 17 11:26:56 2017 -0400 staging: unisys: include: remove unused macro spar_signal_init Removed unused macro spar_signal_init from channel.h Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 14 -------------- 1 file changed, 14 deletions(-) commit 036594112c58421bb7b01444620188fde21962a6 Author: Sameer Wadgaonkar Date: Fri Mar 17 11:26:55 2017 -0400 staging: unisys: include: remove unused function spar_check_channel_server Removed unused function spar_check_channel_server from channel.h Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 19 ------------------- 1 file changed, 19 deletions(-) commit dba878468bc1ca8a169c4f9c8b36bc8115def58b Author: Sameer Wadgaonkar Date: Fri Mar 17 11:26:54 2017 -0400 staging: unisys: visorbus: removed unused structure pci_id Removed unused structure pci_id from controlvmchannel.h Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/controlvmchannel.h | 8 -------- 1 file changed, 8 deletions(-) commit db1512895f08d5ecdf9a59c43789aa45ed88d2fb Author: Alexander Curtin Date: Fri Mar 17 11:26:53 2017 -0400 staging: unisys: visorbus_main: removed revference to virtpci The comment referencing virtpci was irrelevant. Signed-off-by: Alexander Curtin Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 4 ---- 1 file changed, 4 deletions(-) commit 66b3a75976191ae504956e89a34a455489544fd7 Author: Alexander Curtin Date: Fri Mar 17 11:26:52 2017 -0400 staging: unisys: include: replaced COVERQ with DIV_ROUND_UP COVERQ is functionally equivalent to DIV_ROUND_UP and was only used to define the COVER macro. Signed-off-by: Alexander Curtin Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 267dd0a07eefbb37264fcfad984fffc8856898ad Merge: 61f63e3 affa6c1 Author: Ingo Molnar Date: Tue Mar 21 07:41:29 2017 +0100 Merge tag 'perf-core-for-mingo-4.12-20170320' 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: Fixes: - Fix concat_probe_trace_events() in 'perf probe', it should dereference a pointer, not test its value (Ravi Bangoria) User visible changes: - Handle partial AUX records, checking if 'kvm_intel.ko' is loaded and if its 'vmm_exclusive' parameter is set to 0, suggesting tweaking it to reduce gaps (Alexander Shishkin) Infrastructure changes: - Sync the kvm.h, cpufeatures.h and perf_event.h tools/ headers copies with the kernel (Arnaldo Carvalho de Melo, Alexander Shishkin) - 'perf lock' subcommands should include common options, using OPT_PARENT() (Changbin Du) - Ditto for 'perf timechart' (Arnaldo Carvalho de Melo) Documentation changes: Correct 'perf stat --no-aggr' description (Ravi Bangoria) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit ac1ddc584e9817d9d0a4572f3245305d907c6e61 Author: Logan Gunthorpe Date: Fri Mar 17 12:48:22 2017 -0600 scsi: utilize new cdev_device_add helper function This driver did not set kobj.parent so it likely suffered from a potential use after free race if the user unregistered the device while it was in use. This was not so straightforward a conversion but I think this patch cleans up its probe's error path significantly. This patch adds device_initialize, which is required for cdev_device_add. Then it switches to put_device instead of kfree as recommended by device_initialize's documentation. This removes a lot from the error path which was already in __remove. A couple things needed to be re-ordered to be entirely correct, though. ida_remove is also moved out of __remove and into unregister to simplify things and follow the pattern other devices are using. This also drop an extra unnecessary get_device/put_device in the code. Signed-off-by: Logan Gunthorpe Signed-off-by: Greg Kroah-Hartman drivers/scsi/osd/osd_uld.c | 56 +++++++++++++++++----------------------------- 1 file changed, 20 insertions(+), 36 deletions(-) commit d5ed9177f64fe95d9de79e6504d41612d9127e8a Author: Logan Gunthorpe Date: Fri Mar 17 12:48:21 2017 -0600 rtc: utilize new cdev_device_add helper function Mostly straightforward, but we had to remove the rtc_dev_add/del_device functions as they split up the cdev_add and the device_add. Doing this also revealed that there was likely another subtle bug: seeing cdev_add was done after device_register, the cdev probably was not ready before device_add when the uevent occurs. This would race with userspace, if it tried to use the device directly after the uevent. This is fixed just by using the new helper function. Another weird thing is this driver would, in some error cases, call cdev_add() without calling cdev_init. This patchset corrects this by avoiding calling cdev_add if the devt is not set. Signed-off-by: Logan Gunthorpe Acked-by: Alexandre Belloni Signed-off-by: Greg Kroah-Hartman drivers/rtc/class.c | 14 ++++++++++---- drivers/rtc/rtc-core.h | 10 ---------- drivers/rtc/rtc-dev.c | 17 ----------------- 3 files changed, 10 insertions(+), 31 deletions(-) commit dbef390d2eb0a7b0a6be21381a326d4e13953aba Author: Logan Gunthorpe Date: Fri Mar 17 12:48:20 2017 -0600 rapidio: utilize new cdev_device_add helper function This driver did not originally set kobj.parent so it likely had potential a use after free bug which this patch fixes. We convert from device_register to device_initialize/cdev_device_add. While we are at it we use put_device instead of kfree (as recommended by the device_initialize documentation). We also remove an unnecessary extra get_device from the code. Signed-off-by: Logan Gunthorpe Signed-off-by: Greg Kroah-Hartman drivers/rapidio/devices/rio_mport_cdev.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit 493cfaeaa0c9bc0c79ce5751193d49fdac9aaaec Author: Logan Gunthorpe Date: Fri Mar 17 12:48:19 2017 -0600 mtd: utilize new cdev_device_add helper function This is not as straightforward a conversion as the others in this series. These drivers did not originally make use of kobj.parent so they likely suffered from a use after free bug if someone unregistered the devices while they are being used. In order to make the conversions, switch from device_register to device_initialize / cdev_device_add. In build.c, this patch unwinds a complicated mess of extra get_device/put_devices and reference tracking by moving device_initialize early in the attach process. Then it always uses put_device and instead of using device_unregister and extra get_devices everywhere we just use cdev_device_del and one put_device once everything is completely done. This simplifies things dramatically and makes it easier to reason about. In vmt.c, the patch pushes device initialization up to the beginning of the device creation and then that function only needs to use put_device in the error path which simplifies things a good deal. Signed-off-by: Logan Gunthorpe Signed-off-by: Greg Kroah-Hartman drivers/mtd/ubi/build.c | 91 +++++++++---------------------------------------- drivers/mtd/ubi/vmt.c | 49 +++++++++----------------- 2 files changed, 33 insertions(+), 107 deletions(-) commit 857313e51006ff51524579bcd8808b70f9a80812 Author: Logan Gunthorpe Date: Fri Mar 17 12:48:18 2017 -0600 media: utilize new cdev_device_add helper function Replace the open coded registration of the cdev and dev with the new device_add_cdev() helper. The helper replaces a common pattern by taking the proper reference against the parent device and adding both the cdev and the device. Signed-off-by: Logan Gunthorpe Acked-by: Hans Verkuil Signed-off-by: Greg Kroah-Hartman drivers/media/cec/cec-core.c | 16 ++++------------ drivers/media/media-devnode.c | 20 +++++--------------- 2 files changed, 9 insertions(+), 27 deletions(-) commit 38923911dcc343f7f6624fc77a4ad63f2528fbcd Author: Logan Gunthorpe Date: Fri Mar 17 12:48:17 2017 -0600 iio:core: utilize new cdev_device_add helper function Replace the open coded registration of the cdev and dev with the new device_add_cdev() helper. The helper replaces a common pattern by taking the proper reference against the parent device and adding both the cdev and the device. In doing so we have to remove a guard statement from cdev_del, but this doesn't appear to be required in any way. Signed-off-by: Logan Gunthorpe Signed-off-by: Greg Kroah-Hartman drivers/iio/industrialio-core.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 985087157cebd2e710c3e65d8c3eabde4c591f1c Author: Logan Gunthorpe Date: Fri Mar 17 12:48:16 2017 -0600 infiniband: utilize the new cdev_set_parent function This replaces the suspect looking cdev.kobj.parent lines with the equivalent cdev_set_parent function. This is a straightforward change that's largely cosmetic but it does push the kobj.parent ownership into char_dev.c where it belongs. Signed-off-by: Logan Gunthorpe Signed-off-by: Greg Kroah-Hartman drivers/infiniband/core/user_mad.c | 4 ++-- drivers/infiniband/core/uverbs_main.c | 2 +- drivers/infiniband/hw/hfi1/device.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit a0d78193dcf2bfa7c3d169c55a7a30a5a89fca7a Author: Jason Gunthorpe Date: Fri Mar 17 12:48:15 2017 -0600 IB/ucm: utilize new cdev_device_add helper function The use after free is not triggerable here because the cdev holds the module lock and the only device_unregister is only triggered by module unload, however make the change for consistency. To make this work the cdev_del needs to move out of the struct device release function. This cleans up the error path significantly and thus also fixes a minor bug where the devnum would not be released if cdev_add failed. Signed-off-by: Jason Gunthorpe Signed-off-by: Logan Gunthorpe Reviewed-by: Logan Gunthorpe Reviewed-by: Leon Romanovsky Signed-off-by: Greg Kroah-Hartman drivers/infiniband/core/ucm.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 1c1d152cc5ac3a67d199728a9ba0b4f54a498f8b Author: Logan Gunthorpe Date: Fri Mar 17 12:48:14 2017 -0600 platform/chrome: cros_ec_dev - utilize new cdev_device_add helper function Replace the open coded registration of the cdev and dev with the new device_add_cdev() helper. The helper replaces a common pattern by taking the proper reference against the parent device and adding both the cdev and the device. At the same time we cleanup the error path through device_probe function: we use put_device instead of kfree directly as recommended by the device_initialize documentation. Signed-off-by: Logan Gunthorpe Signed-off-by: Greg Kroah-Hartman drivers/platform/chrome/cros_ec_dev.c | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) commit 8dbbf582518190b22681c0fa0d9a129b047138a2 Author: Logan Gunthorpe Date: Fri Mar 17 12:48:13 2017 -0600 tpm-chip: utilize new cdev_device_add helper function Replace the open coded registration of the cdev and dev with the new device_add_cdev() helper. The helper replaces a common pattern by taking the proper reference against the parent device and adding both the cdev and the device. Signed-off-by: Logan Gunthorpe Reviewed-by: Jason Gunthorpe Reviewed-by: Jarkko Sakkinen Signed-off-by: Greg Kroah-Hartman drivers/char/tpm/tpm-chip.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit 111379dcccebc3eaf50ccf7daeb7d72210c1314c Author: Logan Gunthorpe Date: Fri Mar 17 12:48:12 2017 -0600 gpiolib: utilize new cdev_device_add helper function Replace the open coded registration of the cdev and dev with the new device_add_cdev() helper. The helper replaces a common pattern by taking the proper reference against the parent device and adding both the cdev and the device. Signed-off-by: Logan Gunthorpe Reviewed-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman drivers/gpio/gpiolib.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit 92a3fa075d3d2716b9c662814540f1d660cbf2f5 Author: Logan Gunthorpe Date: Fri Mar 17 12:48:10 2017 -0600 device-dax: utilize new cdev_device_add helper function Replace the open coded registration of the cdev and dev with the new device_add_cdev() helper. The helper replaces a common pattern by taking the proper reference against the parent device and adding both the cdev and the device. Signed-off-by: Logan Gunthorpe Reviewed-by: Dan Williams Reviewed-by: Johannes Thumshirn Signed-off-by: Greg Kroah-Hartman drivers/dax/dax.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 358a89ca2c9680ceddc219ab25d1583619e9159f Author: Logan Gunthorpe Date: Fri Mar 17 12:48:11 2017 -0600 input: utilize new cdev_device_add helper function Replace the open coded registration of the cdev and dev with the new device_add_cdev() helper in evdev, joydev and mousedev. The helper replaces a common pattern by taking the proper reference against the parent device and adding both the cdev and the device. Signed-off-by: Logan Gunthorpe Acked-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman drivers/input/evdev.c | 11 ++--------- drivers/input/joydev.c | 11 ++--------- drivers/input/mousedev.c | 11 ++--------- 3 files changed, 6 insertions(+), 27 deletions(-) commit ed01e50acdd3e4a640cf9ebd28a7e810c3ceca97 Author: Dan Williams Date: Fri Mar 17 12:48:09 2017 -0600 device-dax: fix cdev leak If device_add() fails, cleanup the cdev. Otherwise, we leak a kobj_map() with a stale device number. As Jason points out, there is a small possibility that userspace has opened and mapped the device in the time between cdev_add() and the device_add() failure. We need a new kill_dax_dev() helper to invalidate any established mappings. Fixes: ba09c01d2fa8 ("dax: convert to the cdev api") Cc: Reported-by: Jason Gunthorpe Signed-off-by: Dan Williams Signed-off-by: Logan Gunthorpe Reviewed-by: Johannes Thumshirn Signed-off-by: Greg Kroah-Hartman drivers/dax/dax.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 233ed09d7fdacf592ee91e6c97ce5f4364fbe7c0 Author: Logan Gunthorpe Date: Fri Mar 17 12:48:08 2017 -0600 chardev: add helper function to register char devs with a struct device Credit for this patch goes is shared with Dan Williams [1]. I've taken things one step further to make the helper function more useful and clean up calling code. There's a common pattern in the kernel whereby a struct cdev is placed in a structure along side a struct device which manages the life-cycle of both. In the naive approach, the reference counting is broken and the struct device can free everything before the chardev code is entirely released. Many developers have solved this problem by linking the internal kobjs in this fashion: cdev.kobj.parent = &parent_dev.kobj; The cdev code explicitly gets and puts a reference to it's kobj parent. So this seems like it was intended to be used this way. Dmitrty Torokhov first put this in place in 2012 with this commit: 2f0157f char_dev: pin parent kobject and the first instance of the fix was then done in the input subsystem in the following commit: 4a215aa Input: fix use-after-free introduced with dynamic minor changes Subsequently over the years, however, this issue seems to have tripped up multiple developers independently. For example, see these commits: 0d5b7da iio: Prevent race between IIO chardev opening and IIO device (by Lars-Peter Clausen in 2013) ba0ef85 tpm: Fix initialization of the cdev (by Jason Gunthorpe in 2015) 5b28dde [media] media: fix use-after-free in cdev_put() when app exits after driver unbind (by Shauh Khan in 2016) This technique is similarly done in at least 15 places within the kernel and probably should have been done so in another, at least, 5 places. The kobj line also looks very suspect in that one would not expect drivers to have to mess with kobject internals in this way. Even highly experienced kernel developers can be surprised by this code, as seen in [2]. To help alleviate this situation, and hopefully prevent future wasted effort on this problem, this patch introduces a helper function to register a char device along with its parent struct device. This creates a more regular API for tying a char device to its parent without the developer having to set members in the underlying kobject. This patch introduce cdev_device_add and cdev_device_del which replaces a common pattern including setting the kobj parent, calling cdev_add and then calling device_add. It also introduces cdev_set_parent for the few cases that set the kobject parent without using device_add. [1] https://lkml.org/lkml/2017/2/13/700 [2] https://lkml.org/lkml/2017/2/10/370 Signed-off-by: Logan Gunthorpe Signed-off-by: Dan Williams Reviewed-by: Hans Verkuil Reviewed-by: Alexandre Belloni Signed-off-by: Greg Kroah-Hartman fs/char_dev.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/cdev.h | 5 +++ 2 files changed, 91 insertions(+) commit c6da525de724e3fbe439b8dad385395bb4fd2211 Author: Jacob Keller Date: Mon Feb 6 14:39:13 2017 -0800 i40e: always remove old filter when adding new FDir filter The previous code relied on i40e_match_fdir_input_set to determine when determining whether to free the old filter. Change this code so that we simply unconditionally delete the old filter, even if it's identical to the new filter. This ensures that we don't leak any memory, and that we always update the filters as expected. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 32 ++++++-------------------- 1 file changed, 7 insertions(+), 25 deletions(-) commit 1ec8deac8c63505194e773b9657824ed3c2fbdd8 Author: Jacob Keller Date: Mon Feb 6 14:39:12 2017 -0800 i40e: explicitly fail on extended MAC field for ethtool_rx_flow_spec Although we will fail the filter later due to checking flow_type which will have a bogus invalid type, it is possible future refactoring will remove this hidden failure case. Avoid a possible issue in the future by explicitly checking the flow type at the start. Change-Id: Ia98eb26f7b93ccbe38c7141e8f203ef496fc6598 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 4 ++++ 1 file changed, 4 insertions(+) commit 097dbf52505962d06f9b707a3984d48d4f25fbe9 Author: Jacob Keller Date: Mon Feb 6 14:38:46 2017 -0800 i40e: add counters for UDP/IPv4 and IPv4 filters In preparation for adding code to properly check the mask values, we will need to know the number of active filters for each type. Add counters for each filter type. Rename the already existing fd_tcp_rule to fd_tcp4_filter_cnt to match the style of other names. To avoid style warnings, avoid assigning multiple parameters at once, and fix up one other case where we did so previously. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 9 ++++++++- drivers/net/ethernet/intel/i40e/i40e_main.c | 19 +++++++++++++------ drivers/net/ethernet/intel/i40e/i40e_txrx.c | 17 +++++++++++++---- 3 files changed, 34 insertions(+), 11 deletions(-) commit 510dd4609f581329a421fa20e1b802b629bb7ee2 Author: Jacob Keller Date: Mon Feb 6 14:38:45 2017 -0800 i40e: don't re-enable ATR when flushing filters if SB has TCP4/IPv4 rules When flushing and replaying FDIR filters, it is possible we would disable ATR, and then re-enable it even though we should have kept it disabled due to existing TCP/IPv4 filters. Fix this by checking whether we have TCP4/IPv4 filters before re-enabling. Alternatively, we could instead restore ATR and then replay filters, however, this would cause us to rapidly enable and then disable ATR in some cases. Change-ID: I076e4cc1e4409bce7f98f3c213295433a4ff43d8 Signed-off-by: Jacob Keller Reviewed-by: Avinash Dayanand Reviewed-by: Alan Brady Reviewed-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d069425f0fcafff5bfdd292e5f345ce55d46a43 Author: Jacob Keller Date: Mon Feb 6 14:38:44 2017 -0800 i40e: reset fd_tcp_rule count when restoring filters Since we're about to reprogram the filters, we need to ensure that the fd_tcp_rule count is correctly reset to 0. Otherwise, we will keep a stale count that does not accurately reflect the number of programmed TCPv4 filters. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +++ 1 file changed, 3 insertions(+) commit e122eb7482d4af67bec77055ca2a9009867491e9 Author: Jacob Keller Date: Mon Feb 6 14:38:43 2017 -0800 i40e: remove redundant check for fd_tcp_rule when restoring filters i40e_fdir_filter_restore re-adds all existing filters, which already checks when adding a TCPv4 filter to disable ATR. We don't need to make the check twice, so remove this redundant code. Change-ID: Ia0b0690e23523915199d601494557def135c9d7f Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 6 ------ 1 file changed, 6 deletions(-) commit 377cc24980588d03abf3a2a843b8c53dfc8b5a1b Author: Jacob Keller Date: Mon Feb 6 14:38:42 2017 -0800 i40e: exit ATR mode only when adding TCP/IPv4 filter succeeds Move ATR exit check after we have sent the TCP/IPv4 filter to the ring successfully. This avoids an issue where we potentially update the filter count without actually succeeding in adding the filter. Now, we only increment the fd_tcp_rule after we've succeeded. Additionally, we will re-enable ATR mode only after deletion of the filter is actually posted to the FDIR ring. Change-ID: If5c1dea422081cc5e2de65618b01b4c3bf6bd586 Signed-off-by: Jacob Keller Reviewed-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 34 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit e5187ee3ee9a95b1aa32a9a3daf4f07a9f89c20c Author: Jacob Keller Date: Mon Feb 6 14:38:41 2017 -0800 i40e: return immediately when failing to add fdir filter Instead of setting err=true and checking this to determine when to free the raw_packet near the end of the function, simply kfree and return immediately. The resulting code is a bit cleaner and has one less variable. This also resolves a subtle bug in the ipv4 case which could fail to add the first filter and then never free the memory, resulting in a small memory leak. Change-ID: I7583aac033481dc794b4acaa14445059c8930ff1 Signed-off-by: Jacob Keller Reviewed-by: Avinash Dayanand Reviewed-by: Alan Brady Reviewed-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 33 ++++++++++++----------------- 1 file changed, 14 insertions(+), 19 deletions(-) commit 01016da1e58136518252822738fe833c662df916 Author: Jacob Keller Date: Mon Feb 6 14:38:40 2017 -0800 i40e: rework exit flow of i40e_add_fdir_ethtool Refactor the exit flow of the i40e_add_fdir_ethtool function. Move the input_label to the end of the function, removing the dependency on having a non-zero return value. Add a comment explaining why it is ok not to free the fdir data structure, because the structure is now stored in the fdir_filter_list. Change-Id: I723342181d59cd0c9f3b31140c37961ba37bb242 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 8ce43dce6f272202dcd127e0e288b37277ca87dd Author: Jacob Keller Date: Mon Feb 6 14:38:39 2017 -0800 i40e: don't use arrays for (src|dst)_ip The code originally included src_ip and dst_ip with enough space to support ipv6 filters. However, no actual support for ipv6 filters has been implemented. Thus, remove the arrays and just use __be32 values. Should ipv6 support be added in the future, we can replace these with a union that has sizes for both values. Change-Id: I1bc04032244a80eb6ebc8a4e6c723a4a665c1dd5 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 4 ++-- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 12 ++++++------ drivers/net/ethernet/intel/i40e/i40e_txrx.c | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) commit fe0b0cd97b4f210ecd1693edba6eec10820e11f2 Author: Jacob Keller Date: Mon Feb 6 14:38:38 2017 -0800 i40e: send correct port number to AdminQ when enabling UDP tunnels The firmware expects the port numbers for offloaded UDP tunnels in Little Endian format. We accidentally sent the value in Big Endian format which obviously will cause the wrong port number to be put into the UDP tunnels list. This results in VxLAN and Geneve tunnel Rx offloads being essentially disabled, unless the port number happens to be identical after byte swapping. Note that i40e_aq_add_udp_tunnel() will byteswap the parameter from host order into Little Endian so we don't need worry about passing strictly a __le16 value to the command. This patch essentially reverts b3f5c7bc88ba ("i40e: Fix for extra byte swap in tunnel setup", 2016-08-24), but in a way that makes the result much more clear to the reader. Fixes: b3f5c7bc88ba ("i40e: Fix for extra byte swap in tunnel setup", 2016-08-24) Signed-off-by: Jacob Keller Reviewed-by: Williams, Mitch A Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 3 ++- drivers/net/ethernet/intel/i40e/i40e_main.c | 17 ++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 48ce88022dbc28eebddc524d1fc2b913f03f64ba Author: Philippe Reynes Date: Sat Feb 4 23:49:03 2017 +0100 i40evf: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 31 +++++++++++----------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 116503a62a5ab6d79397500ab37239ce088f03e3 Author: Mikko Perttunen Date: Wed Dec 14 13:16:17 2016 +0200 arm64: tegra: Enable IOMMU for host1x on Tegra210 The host1x driver now supports operation behind an IOMMU, so add its IOMMU domain to the device tree. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 24963d1becbb26e4649b752e0011dd90c378f100 Author: Mikko Perttunen Date: Wed Dec 14 13:16:16 2016 +0200 arm64: tegra: Enable VIC on Tegra210 Enable the VIC (Video Image Compositor) host1x unit on Tegra210 systems. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210.dtsi | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit affa6c169bae8dc9cb1a2d070c7cd2fe1939c5b8 Author: Arnaldo Carvalho de Melo Date: Wed Mar 15 17:40:19 2017 -0300 tools headers: Sync {tools/,}arch/powerpc/include/uapi/asm/kvm.h The changes in the following csets are not relevant for what is used in tools/perf/arch/powerpc/util/kvm-stat.c, but lets sync it to silence the diff detector in the tools build system: c92701322711 ("KVM: PPC: Book3S HV: Add userspace interfaces for POWER9 MMU") 17d48610ae0f ("KVM: PPC: Book 3S: XICS: Implement ICS P/Q states") Cc: Alexander Yarygin Cc: David Ahern Cc: Li Zhong Cc: Michael Ellerman Cc: Naveen N. Rao Cc: Paul Mackerras Cc: Scott Wood Cc: Srikar Dronamraju Link: http://lkml.kernel.org/n/tip-nsqxpyzcv4ywesikhhhrgfgc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/powerpc/include/uapi/asm/kvm.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit f0a30dca5f84fe8048271799b56677ac2279de66 Author: Ravi Bangoria Date: Wed Mar 8 12:29:07 2017 +0530 perf probe: Fix concat_probe_trace_events '*ntevs' contains number of elements present in 'tevs' array. If there are no elements in array, 'tevs2' can be directly assigned to 'tevs' without allocating more space. So the condition should be '*ntevs == 0' not 'ntevs == 0'. Signed-off-by: Ravi Bangoria Acked-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Peter Zijlstra Fixes: 42bba263eb58 ("perf probe: Allow wildcard for cached events") Link: http://lkml.kernel.org/r/20170308065908.4128-1-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit efc9c05681c589ed942bf8c55a774853938ca8d4 Author: Ravi Bangoria Date: Mon Mar 20 18:07:18 2017 +0530 perf stat: Correct --no-aggr description Description of --no-aggr in perf-stat man page is outdated. --no-aggr can also be used while profiling specific set of cpus. For ex, $ perf stat -e cycles,instructions -C 1-2 --no-aggr -- sleep 1 Performance counter stats for 'CPU(s) 1-2': CPU1 5,94,92,795 cycles CPU2 2,69,72,403 cycles CPU1 2,02,08,327 instructions # 0.34 insn per cycle CPU2 73,17,123 instructions # 0.12 insn per cycle 1.000989132 seconds time elapsed Signed-off-by: Ravi Bangoria Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1490013438-5713-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-stat.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit eedb3c44313ae0785e1dc62c6910557953887388 Author: Arnaldo Carvalho de Melo Date: Wed Mar 15 17:40:19 2017 -0300 tools headers: Sync {tools/,}arch/arm{64}/include/uapi/asm/kvm.h The changes in the following csets are not relevant for 'perf kvm' usage but lets sync it to silence the diff detector in the tools build system: e96a006cb066 ("KVM: arm/arm64: vgic: Implement KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO ioctl") d017d7b0bd7a ("KVM: arm/arm64: vgic: Implement VGICv3 CPU interface access") 94574c9488e2 ("KVM: arm/arm64: vgic: Add distributor and redistributor access") Cc: Hemant Kumar Cc: Marc Zyngier Cc: Vijaya Kumar K Cc: Yunlong Song Link: http://lkml.kernel.org/n/tip-nsqxpyzcv4ywesikhhhrgfgc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/arm/include/uapi/asm/kvm.h | 13 +++++++++++++ tools/arch/arm64/include/uapi/asm/kvm.h | 13 +++++++++++++ 2 files changed, 26 insertions(+) commit 3fc4f2f94c9a7c5689d6c70774bab1bb4ff8f297 Author: Takeshi Kihara Date: Mon Mar 20 18:31:00 2017 +0100 video/logo: tidyup fb_logo_late_init initcall timing Some video driver might returns -EPROBE_DEFER when probe timing, but logo init function doesn't care it. Thus, such kernel can't have logo when boot time. This patch solves this issue by exchanging current late_initcall to late_initcall_sync Signed-off-by: Takeshi Kihara Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Cc: Laurent Cc: Fabian Frederick Cc: Andrew Morton Cc: shimoda Cc: Koji Matsuoka Cc: shiiba Cc: sakato Cc: Hosoya Cc: Fukawa Cc: Hien Dang Cc: Khiem Nguyen Cc: Kouei Abe Cc: Harunobu Kurokawa Cc: Hiroyuki Yokoyama Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/logo/logo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c6457504f9a8806409c4885a620faedf1348dca Author: Dmitry Torokhov Date: Mon Mar 20 18:31:00 2017 +0100 video: fbdev: i810: remove incorrect __exit markups Even if bus is not hot-pluggable, devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes. Signed-off-by: Dmitry Torokhov Cc: Antonino Daplas Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/i810/i810_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2988f8f946e6cd6713e9ee06181bed3a1f90a62a Author: Dmitry Torokhov Date: Mon Mar 20 18:31:00 2017 +0100 video: fbdev: pmag-aa-fb: remove incorrect __exit markups Even if bus is not hot-pluggable, devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes. Signed-off-by: Dmitry Torokhov Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/pmag-aa-fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b48c3cebd1337fb3da0c9ef78a9c9e6f36316176 Author: Dmitry Torokhov Date: Mon Mar 20 18:31:00 2017 +0100 video: fbdev: pmagb-b-fb: remove incorrect __exit markups Even if bus is not hot-pluggable, the devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes. Signed-off-by: Dmitry Torokhov Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/pmagb-b-fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 982711ccb04bd1ea30b45a837c67692ef897f689 Author: Dmitry Torokhov Date: Mon Mar 20 18:30:59 2017 +0100 video: fbdev: pmag-ba-fb: remove incorrect __exit markups Even if bus is not hot-pluggable, the devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes. Signed-off-by: Dmitry Torokhov Cc: "Maciej W. Rozycki" Cc: Tomi Valkeinen Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/pmag-ba-fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0348aaa34412e24ebe622a2b1b013e68d6ae5412 Author: Arvind Yadav Date: Mon Mar 20 18:30:59 2017 +0100 omapfb: dss: Handle return errors in dss_init_ports() dss_init_ports() is not handling return errors from dpi_init_port() and sdi_init_port(). It is also always returning 0 currently which results in part of error handling code in dss_bind() being unused. Fix dss_init_ports() to handle return errors from dpi_init_port() and sdi_init_port(). Signed-off-by: Arvind Yadav Cc: tomi.valkeinen@ti.com [b.zolnierkie: fail early on errors, minor fixups] Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/omap2/omapfb/dss/dss.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 5ce33b603063f36272fcfb1b4a5fde69f46eca88 Author: Daniel Golle Date: Thu Mar 9 00:54:22 2017 +0100 rt2x00: fix TX_PWR_CFG_4 register definition Some of the macros used to describe the TX_PWR_CFG_4 register accidentally refer to TX_PWR_CFG_3, probably a copy&paste error. Fix that. Signed-off-by: Daniel Golle Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 889cdff72b85cc553d7820de071887593690b7d2 Author: Colin Ian King Date: Mon Feb 27 23:40:19 2017 +0000 ipw2200: remove redundant check of rc < 0 The check for rc < 0 is always false so the check is redundant and can be removed. Detected with CoverityScan, CID#101143 ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/intel/ipw2x00/ipw2200.c | 3 --- 1 file changed, 3 deletions(-) commit 66ded1f8b33cdd9d6d3e20f5f8dd23615a110e70 Author: Franky Lin Date: Fri Mar 10 21:17:06 2017 +0000 brcmfmac: wrap brcmf_fws_reset_interface into bcdc layer Create a new protocol interface function brcmf_proto_reset_if for core module to notify protocol layer when interface role changes. Signed-off-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 7 +++++++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c | 3 +-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.h | 9 +++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) commit c02a5eb82056f75615cb48aa540bfd245f489b99 Author: Franky Lin Date: Fri Mar 10 21:17:05 2017 +0000 brcmfmac: wrap brcmf_fws_del_interface into bcdc layer Create a new protocol interface function brcmf_proto_del_if for core module to notify protocol layer upon interface deletion. Signed-off-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 7 +++++++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 4 ++-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.h | 9 +++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) commit 9fdc64bbdbe7bd546e0fbcedd2f1c03448c6df42 Author: Franky Lin Date: Fri Mar 10 21:17:04 2017 +0000 brcmfmac: wrap brcmf_fws_add_interface into bcdc layer fwsignal is only used by bcdc. Create a new protocol interface function brcmf_proto_add_if for core module to notify protocol layer upon a new interface is created. Signed-off-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 7 +++++++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c | 3 ++- drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.h | 9 +++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) commit 7b584396b7a760bc77bbde4625f83ef173159d3e Author: Franky Lin Date: Fri Mar 10 21:17:03 2017 +0000 brcmfmac: move brcmf_txcomplete to bcdc layer brcmf_txcomplete is invoked by sdio and usb bus module which are using bcdc protocol. So move it from core module into bcdc layer. Signed-off-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 20 ++++++++++++++++++++ .../net/wireless/broadcom/brcm80211/brcmfmac/bcdc.h | 2 ++ .../net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 3 --- .../net/wireless/broadcom/brcm80211/brcmfmac/core.c | 18 ------------------ .../net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 3 ++- .../net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 2 +- 6 files changed, 25 insertions(+), 23 deletions(-) commit 20ec4f57498f8770c7a1a3e2a316fa752a424178 Author: Franky Lin Date: Fri Mar 10 21:17:02 2017 +0000 brcmfmac: move brcmf_txflowblock to bcdc layer brcmf_txflowblock is invoked by sdio and usb bus module which are using bcdc protocol. This patch makes it a bcdc API instead of a core module function. Reviewed-by: Arend Van Spriel Signed-off-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 10 ++++++++++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.h | 1 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 2 -- drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 10 ---------- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 5 +++-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 5 +++-- 6 files changed, 17 insertions(+), 16 deletions(-) commit b9472a2e3e452c414634b3ccb1ef6c4098878686 Author: Hans de Goede Date: Wed Mar 8 14:50:17 2017 +0100 brcmfmac: Handle status == BRCMF_E_STATUS_ABORT in cfg80211_escan_handler If a scan gets aborted BRCMF_SCAN_STATUS_BUSY gets cleared in cfg->scan_status and when we receive an abort event from the firmware the BRCMF_SCAN_STATUS_BUSY check in the cfg80211_escan_handler will trigger resulting in multiple errors getting logged. Check for a status of BRCMF_E_STATUS_ABORT and in this case simply cleanly exit the cfg80211_escan_handler. This also avoids a BRCMF_E_STATUS_ABORT event arriving after a new scan has been started causing the new scan to complete prematurely without any data. Signed-off-by: Hans de Goede Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +++ 1 file changed, 3 insertions(+) commit 26e537884a8ef451f5c60f6949b1615069931ffa Author: Hans de Goede Date: Wed Mar 8 14:50:16 2017 +0100 brcmfmac: Do not complain about country code "00" The country code gets set to "00" by default at boot, ignore this rather then logging an error about it. Signed-off-by: Hans de Goede Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 ++++ 1 file changed, 4 insertions(+) commit d79fe4cb70d8deab7b8dc1de547ed4b915574414 Author: Hans de Goede Date: Wed Mar 8 14:50:15 2017 +0100 brcmfmac: Do not print the firmware version as an error Using pr_err for things which are not errors is a bad idea. E.g. it will cause the plymouth bootsplash screen to drop back to the text console so that the user can see the error, which is not what we normally want to happen. Instead add a new brcmf_info macro and use that. Signed-off-by: Hans de Goede Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) commit f1ac3aa212af6dd0a36dc07a63f95f91be6f4935 Author: Rafał Miłecki Date: Fri Feb 24 17:32:46 2017 +0100 brcmfmac: always print error when PSM's watchdog fires So far we were attaching BRCMF_E_PSM_WATCHDOG event listener in brcmf_debug_attach which gets compiled only with CONFIG_BRCMDBG. This event means something went wrong and firmware / hardware usually can't be expected to work (reliably). Such a problem is significant for user experience so I believe we should print an error unconditionally (even with debugging disabled). What can be indeed optional is dumping bus memory as this is clearly part of debugging process. In the future we may also try to extend this listener by trying to recover from the error or at least signal it to the cfg80211. Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo .../wireless/broadcom/brcm80211/brcmfmac/core.c | 22 ++++++++++++++++++ .../wireless/broadcom/brcm80211/brcmfmac/debug.c | 26 +++------------------- .../wireless/broadcom/brcm80211/brcmfmac/debug.h | 9 ++++++++ 3 files changed, 34 insertions(+), 23 deletions(-) commit f825f6ed20e37a20ad5feaf607acfb84bfdf9d99 Author: Rafał Miłecki Date: Fri Mar 3 11:34:15 2017 +0100 bcma: fill core OF info independently of bus type PCI devices can be described in DT as well so we should always execute relevant code. This will make bcma e.g. set of_node for cores described in DT. Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo drivers/bcma/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5e48a4cd2ee916a98fbc36c944b21a7c935cf4f4 Author: Rafał Miłecki Date: Fri Mar 3 11:34:14 2017 +0100 bcma: use helper function to set core dev's parent A tiny code deduplication thanks to the bcma_bus_get_host_dev. Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo drivers/bcma/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 48d1977655341f1e004beb81eda8e93316c55963 Author: Rafał Miłecki Date: Fri Mar 3 11:33:30 2017 +0100 bcma: drop unneeded check for CONFIG_OF_IRQ We already have the same check in bcma_of_get_irq which really calls symbols available with CONFIG_OF_IRQ only. It appears this duplicated check was accidentally added in commit c58d900cc96a ("bcma: fix building without OF_IRQ"). The rest of code in bcma_of_fill_device should work fine without CONFIG_OF_IRQ. Signed-off-by: Rafał Miłecki Cc: Arnd Bergmann Acked-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/bcma/main.c | 3 --- 1 file changed, 3 deletions(-) commit 74a7dfbcc64986504dbf9f5f7c7cca521db4d230 Author: Ping-Ke Shih Date: Thu Feb 23 11:19:57 2017 -0600 rtlwifi: Add QoS-NULL and BT-QoS-NULL to reserved page. Two additional preset responses are added to the reserved page on the wifi device. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 64 +++++++- .../net/wireless/realtek/rtlwifi/rtl8192ee/fw.h | 4 + .../net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 4 +- .../net/wireless/realtek/rtlwifi/rtl8723be/fw.c | 69 ++++++++- .../net/wireless/realtek/rtlwifi/rtl8723be/fw.h | 4 + .../net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 165 ++++++++++++++++++--- .../net/wireless/realtek/rtlwifi/rtl8821ae/fw.h | 2 + .../net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 8 +- 8 files changed, 287 insertions(+), 33 deletions(-) commit f70e4df2b384d21e36a7c30a591639592692e0ec Author: Larry Finger Date: Thu Feb 23 11:19:56 2017 -0600 rtlwifi: Add code to read new versions of firmware Changes in the drivers for RTL8723BE and RTL8821AE require corresponding changes in the firmware. This new firmware has been accepted into the Linux firmware repo. To handle the case where the kernel has been updated before the firmware, the new versions have been given new names. The code will attempt to read the new name, and fall back to the old one if the new one is not available. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 15 ++++++++++++--- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) commit e6042859302eb43ff788df909626090d23ab416e Author: Ping-Ke Shih Date: Thu Feb 23 11:19:55 2017 -0600 rtlwifi: Update 8812ae new phy parameters and its parser. Update PHY tables for the RTL8812AE. A new parser is also needed. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 8 +- .../net/wireless/realtek/rtlwifi/rtl8821ae/table.c | 1805 ++++++-------------- .../net/wireless/realtek/rtlwifi/rtl8821ae/table.h | 15 +- 3 files changed, 531 insertions(+), 1297 deletions(-) commit 84d26fda52e2eb1ee75dd6a2df9d8e595994b8f8 Author: Ping-Ke Shih Date: Thu Feb 23 11:19:54 2017 -0600 rtlwifi: Update 8821ae new phy parameters and its parser. There are new PHY table values for the RTL8821AE. The changes require new parsing code. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 377 +++++++++------------ .../net/wireless/realtek/rtlwifi/rtl8821ae/table.c | 55 +-- .../net/wireless/realtek/rtlwifi/rtl8821ae/table.h | 13 +- drivers/net/wireless/realtek/rtlwifi/wifi.h | 18 + 4 files changed, 214 insertions(+), 249 deletions(-) commit 5caa7f384629eb2b02f2289ffea1277a401adfcb Author: Brian Norris Date: Thu Mar 16 14:36:07 2017 -0700 mwifiex: fix kernel crash after shutdown command timeout We observed a SHUTDOWN command timeout during reboot stress test due to a corner case firmware bug. It can lead to either a use-after-free + OOPS (on either the adapter structure, or the 'card' structure) or an abort (where, e.g., the PCI device is "disabled" before we're done dumping the FW). We can avoid this by canceling/flushing the FW dump work: (a) after we've terminated all other work queues (e.g., for processing commands which could time out) (b) after we've disabled all interrupts (which could also queue more work for us) (c) after we've unregistered the netdev and wiphy structures (and implicitly, and debugfs entries which could manually trigger FW dumps) (d) before we've actually disabled the device (e.g., pci_device_disable()) Altogether, this means no card->work will be scheduled if we sync at a point that satisfies the above. This can be done at the beginning of the .cleanup_if() callback. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 4 ++-- drivers/net/wireless/marvell/mwifiex/sdio.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 0a5cc49750b89717ad02abf132aa119743c0e5d4 Author: Amitkumar Karwar Date: Thu Mar 16 16:16:11 2017 +0530 mwifiex: send fewer channels to scan while connected Application triggers periodic background scans when device is connected. We will scan less number of channels per scan command so that data traffic won't get affected. Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/scan.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 92c70a958b0b6b7e729a47a7c85762636859eee9 Author: Devidas Puranik Date: Thu Mar 9 14:06:17 2017 +0530 mwifiex: fix for unaligned reads Using the accessor function e.g. get_unaligned_le32 instead of le32_to_cpu to avoid the unaligned access. This is for the architectures that don't handle the unaligned memory access Signed-off-by: Devidas Puranik Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cmdevt.c | 4 +-- drivers/net/wireless/marvell/mwifiex/pcie.c | 37 ++++++++++------------ drivers/net/wireless/marvell/mwifiex/sdio.c | 23 ++++++++------ drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 19 +++++------ drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | 4 +-- drivers/net/wireless/marvell/mwifiex/sta_event.c | 8 ++--- drivers/net/wireless/marvell/mwifiex/tdls.c | 10 +++--- drivers/net/wireless/marvell/mwifiex/uap_event.c | 2 +- drivers/net/wireless/marvell/mwifiex/util.c | 6 ++-- 9 files changed, 56 insertions(+), 57 deletions(-) commit 5653c6462f56e13cb943cd572fdae9252157a523 Author: Daniel Mentz Date: Thu Mar 9 14:06:16 2017 +0530 mwifiex: Use accessors routines for unaligned values Synopsys' ARCompact architecture does not support loading from or storing values to unaligned memory locations. We saw a series of misaligned access exceptions on ARC. To work around this issue, we bulk replaced le16_to_cpu and le32_to_cpu with get_unaligned_le16 and get_unaligned_le32, respectively. We also added le16_unaligned_add_cpu which is similar to le16_add_cpu but works with unaligned values. Signed-off-by: Daniel Mentz Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/11h.c | 3 ++- drivers/net/wireless/marvell/mwifiex/ie.c | 15 +++++++------ drivers/net/wireless/marvell/mwifiex/main.h | 2 +- drivers/net/wireless/marvell/mwifiex/scan.c | 26 +++++++++++++--------- drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 30 +++++++++++++++----------- drivers/net/wireless/marvell/mwifiex/util.h | 5 +++++ 6 files changed, 49 insertions(+), 32 deletions(-) commit 5c0b87987432ad9d2c7068dc739d9f21bb6ff72e Author: Karthik Ananthapadmanabha Date: Thu Mar 9 14:06:15 2017 +0530 mwifiex: add qualifier to firmware structures Adding qualifier "__packed" indicates that no padding should be performed on the qualified object for alignment. This patch adds qualifier __packed to the required firmware structures in mwifiex driver. Signed-off-by: Karthik Ananthapadmanabha Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/fw.h | 36 +++++++++++++++--------------- drivers/net/wireless/marvell/mwifiex/usb.h | 4 ++-- 2 files changed, 20 insertions(+), 20 deletions(-) commit 520334156213b3cf1becc238f881bd5333172b4d Author: Brian Norris Date: Tue Mar 7 12:47:46 2017 -0800 mwifiex: pcie: clean up error prints in mwifiex_pcie_reset_notify() We shouldn't be printing a kernel pointer as a decimal integer. But we really shouldn't be printing this case at all; we should never get here with NULL drvdata. We've eliminated this unnecessary conditional in several other places, so kill it here too. Similarly, there's no need to check for '!pdev'; we are guaranteed to have a real device here. And finally, use dev_err() instead of pr_err(). This yields (for failed PCIe resets): [ 68.286586] mwifiex_pcie 0000:01:00.0: mwifiex_pcie_reset_notify: adapter structure is not valid instead of: [ 82.932658] mwifiex_pcie: mwifiex_pcie_reset_notify: Card or adapter structure is not valid (-270880688088) Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit ef7e0714742541dcce75b646b64f7a376b7d4368 Author: Jeffy Chen Date: Fri Feb 24 14:24:31 2017 +0800 mwifiex: wake system up when receives a wake irq Currrently we are disabling this wake irq after receiving it. If this happens before we finish suspend and the pm event check is disabled, the system will continue suspending, and this irq would not work again. We may need to abort system suspend to avoid that. Signed-off-by: Jeffy Chen Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 3 +++ 1 file changed, 3 insertions(+) commit 5c5105666de5ac1eef6c3b0710b88d5536b7f6dd Author: Alexandre Belloni Date: Thu Feb 23 17:14:45 2017 +0100 atmel: remove time_t usage last_qual never really holds a time. It only holds jiffies. Make it the same type as jiffies. Signed-off-by: Alexandre Belloni Signed-off-by: Kalle Valo drivers/net/wireless/atmel/atmel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c651aae5a7732287c1c9bc974ece4ed798780544 Author: Suzuki K Poulose Date: Tue Mar 14 18:13:27 2017 +0000 arm64: v8.3: Support for weaker release consistency ARMv8.3 adds new instructions to support Release Consistent processor consistent (RCpc) model, which is weaker than the RCsc model. Signed-off-by: Suzuki K Poulose Signed-off-by: Catalin Marinas Documentation/arm64/cpu-feature-registers.txt | 2 ++ arch/arm64/include/asm/sysreg.h | 1 + arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/kernel/cpufeature.c | 2 ++ arch/arm64/kernel/cpuinfo.c | 1 + 5 files changed, 7 insertions(+) commit cb567e79fa504575cb97fb2f866d2040ed1c92e7 Author: Suzuki K Poulose Date: Tue Mar 14 18:13:26 2017 +0000 arm64: v8.3: Support for complex number instructions ARM v8.3 adds support for new instructions to aid floating-point multiplication and addition of complex numbers. Expose the support via HWCAP and MRS emulation Signed-off-by: Suzuki K Poulose Signed-off-by: Catalin Marinas Documentation/arm64/cpu-feature-registers.txt | 2 ++ arch/arm64/include/asm/sysreg.h | 1 + arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/kernel/cpufeature.c | 2 ++ arch/arm64/kernel/cpuinfo.c | 1 + 5 files changed, 7 insertions(+) commit c8c3798d2369e4285da44b244638eafe446a8f8a Author: Suzuki K Poulose Date: Tue Mar 14 18:13:25 2017 +0000 arm64: v8.3: Support for Javascript conversion instruction ARMv8.3 adds support for a new instruction to perform conversion from double precision floating point to integer to match the architected behaviour of the equivalent Javascript conversion. Expose the availability via HWCAP and MRS emulation. Signed-off-by: Suzuki K Poulose Signed-off-by: Catalin Marinas Documentation/arm64/cpu-feature-registers.txt | 8 ++++++++ arch/arm64/include/asm/sysreg.h | 3 +++ arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/kernel/cpufeature.c | 8 +++++++- arch/arm64/kernel/cpuinfo.c | 1 + 5 files changed, 20 insertions(+), 1 deletion(-) commit 87da236ebc711644dcff2339ee5b854f1abf1fca Author: Will Deacon Date: Fri Mar 10 20:32:25 2017 +0000 arm64: KVM: Add support for VPIPT I-caches A VPIPT I-cache has two main properties: 1. Lines allocated into the cache are tagged by VMID and a lookup can only hit lines that were allocated with the current VMID. 2. I-cache invalidation from EL1/0 only invalidates lines that match the current VMID of the CPU doing the invalidation. This can cause issues with non-VHE configurations, where the host runs at EL1 and wants to invalidate I-cache entries for a guest running with a different VMID. VHE is not affected, because the host runs at EL2 and I-cache invalidation applies as expected. This patch solves the problem by invalidating the I-cache when unmapping a page at stage 2 on a system with a VPIPT I-cache but not running with VHE enabled. Hopefully this is an obscure enough configuration that the overhead isn't anything to worry about, although it does mean that the by-range I-cache invalidation currently performed when mapping at stage 2 can be elided on such systems, because the I-cache will be clean for the guest VMID following a rollover event. Acked-by: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/include/asm/kvm_mmu.h | 9 +++++---- arch/arm64/kvm/hyp/tlb.c | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) commit dda288d7e4f605632dc6e19c69063f1725056208 Author: Will Deacon Date: Fri Mar 10 20:32:24 2017 +0000 arm64: cache: Identify VPIPT I-caches Add support for detecting VPIPT I-caches, as introduced by ARMv8.2. Acked-by: Mark Rutland Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/include/asm/cache.h | 7 +++++++ arch/arm64/kernel/cpuinfo.c | 4 ++++ 2 files changed, 11 insertions(+) commit 02f7760e6e5c3d726cd9622749cdae17c571b9a3 Author: Will Deacon Date: Fri Mar 10 20:32:23 2017 +0000 arm64: cache: Merge cachetype.h into cache.h cachetype.h and cache.h are small and both obviously related to caches. Merge them together to reduce clutter. Acked-by: Mark Rutland Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/include/asm/cache.h | 31 ++++++++++++++++++++- arch/arm64/include/asm/cachetype.h | 55 -------------------------------------- arch/arm64/include/asm/kvm_mmu.h | 2 +- arch/arm64/kernel/cpuinfo.c | 2 +- arch/arm64/mm/flush.c | 2 +- 5 files changed, 33 insertions(+), 59 deletions(-) commit 155433cb365ee4666bdf7c3c7bc2978b17be36a4 Author: Will Deacon Date: Fri Mar 10 20:32:22 2017 +0000 arm64: cache: Remove support for ASID-tagged VIVT I-caches As a recent change to ARMv8, ASID-tagged VIVT I-caches are removed retrospectively from the architecture. Consequently, we don't need to support them in Linux either. Acked-by: Mark Rutland Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/include/asm/cachetype.h | 8 -------- arch/arm64/include/asm/kvm_mmu.h | 2 +- arch/arm64/kernel/cpufeature.c | 4 ++-- arch/arm64/kernel/cpuinfo.c | 9 +++------ arch/arm64/mm/context.c | 3 --- arch/arm64/mm/flush.c | 2 -- 6 files changed, 6 insertions(+), 22 deletions(-) commit a8d4636f96ad075dc6d6af182b3de0b5498dc301 Author: Will Deacon Date: Fri Mar 10 20:32:21 2017 +0000 arm64: cacheinfo: Remove CCSIDR-based cache information probing The CCSIDR_EL1.{NumSets,Associativity,LineSize} fields are only for use in conjunction with set/way cache maintenance and are not guaranteed to represent the actual microarchitectural features of a design. The architecture explicitly states: | You cannot make any inference about the actual sizes of caches based | on these parameters. Furthermore, CCSIDR_EL1.{WT,WB,RA,WA} have been removed retrospectively from ARMv8 and are now considered to be UNKNOWN. Since the kernel doesn't make use of set/way cache maintenance and it is not possible for userspace to execute these instructions, we have no need for the CCSIDR information in the kernel. This patch removes the accessors, along with the related portions of the cacheinfo support, which should instead be reintroduced when firmware has a mechanism to provide us with reliable information. Acked-by: Mark Rutland Acked-by: Sudeep Holla Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/include/asm/cachetype.h | 24 ------------------------ arch/arm64/kernel/cacheinfo.c | 38 -------------------------------------- 2 files changed, 62 deletions(-) commit 3689c75af2a3bc944826e6da663deee50c97d910 Author: Will Deacon Date: Fri Mar 10 20:32:20 2017 +0000 arm64: cpuinfo: remove I-cache VIPT aliasing detection The CCSIDR_EL1.{NumSets,Associativity,LineSize} fields are only for use in conjunction with set/way cache maintenance and are not guaranteed to represent the actual microarchitectural features of a design. The architecture explicitly states: | You cannot make any inference about the actual sizes of caches based | on these parameters. We currently use these fields to determine whether or the I-cache is aliasing, which is bogus and known to break on some platforms. Instead, assume the I-cache is always aliasing if it advertises a VIPT policy. Acked-by: Mark Rutland Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/include/asm/cachetype.h | 13 ------------- arch/arm64/kernel/cpuinfo.c | 23 ++++++++++------------- 2 files changed, 10 insertions(+), 26 deletions(-) commit 39133505caf993c2d61c7adc8cab753e8a0b815d Author: Thierry Reding Date: Mon Mar 20 17:14:14 2017 +0100 clk: tegra: Fix build warnings on Tegra20/Tegra30 The recent conversion of proper const usage was only partial and didn't include Tegra20 and Tegra30 support. Fix that up. Signed-off-by: Thierry Reding drivers/clk/tegra/clk-periph.c | 2 +- drivers/clk/tegra/clk.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d2c14c64d678713fced6f2261ce7d398b4351de5 Author: Colin Ian King Date: Mon Mar 20 13:58:05 2017 +0000 spi: loopback-test: fix potential integer overflow on multiple A multiplication of 8U * xfer-len with the type of a 32 bit unsigned int is evaluated using 32 bit arithmetic and then used in a context that expects an expression of type unsigned long long (64 bits). Avoid any potential overflow by casting BITS_PER_BYTE to unsigned long long. Detected by CoverityScan, CID#1419691 ("Unintentional integer overflow") Fixes: ea9936f324356 ("spi: loopback-test: add elapsed time check") Signed-off-by: Colin Ian King Signed-off-by: Mark Brown drivers/spi/spi-loopback-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3288d5cb40c09213e86d67b5cab09de1deb65a5c Author: Icenowy Zheng Date: Mon Mar 20 22:38:49 2017 +0800 spi: sun6i: update max transfer size reported The spi-sun6i driver have already got the ability to do large transfers. However, the max transfer size reported is still fifo depth - 1. Update the max transfer size reported to the max value possible. Reported-by: Martin Ayotte Signed-off-by: Icenowy Zheng Signed-off-by: Mark Brown drivers/spi/spi-sun6i.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b51040fc375c194e20164be489668d4d28001f53 Author: Rostyslav Khudolii Date: Thu Mar 16 11:22:17 2017 +0200 ath6kl: Remove old 802.11a-only channels Channels 34/38/42/46 can only be used for compatibility with old devices sold in Japan. Modern products, such as AR6003/AR6004 don't support these channels. Keeping them in the upstream is error prone and requires full network stack support. A custom patch should be used in case such compatibility is required. Without this one, a user is able to start an AP using wpa_supplicant, for example, on one of these channels (34/38/42/46), without getting any warning/error from the cfg80211 or ath6kl - which is correct (since these channels match regdom rules). However, the AR6003 and its firmware (we're using v3.4.0.225) will fail and return "WMI_CMDERROR_EVENTID" with "INVALID_PARAM" error code. Signed-off-by: Rostyslav Khudolii Cc: Attila Sukosd Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath6kl/cfg80211.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit eed4721fb6172b3051a8341f9089b728681a9454 Author: Colin Ian King Date: Wed Mar 15 16:36:41 2017 +0000 ath10k: remove redundant check of len with buf_len The check of len > buf_len is redundant as len is initialized to 0 and buf_len to 4096, so this comparison is always false. Remove it. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/debug.c | 3 --- 1 file changed, 3 deletions(-) commit 0a7d88e432e7fc968dee1ddbd214cf1bb966b6f9 Author: Mohammed Shafi Shajakhan Date: Tue Mar 14 17:03:24 2017 +0530 ath10k: fix typo in wmi header file Fix typo (spelling mistake) in wmi.h Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46bc92bedbd3cc9594bf572897e6a38346067176 Author: Kalle Valo Date: Thu Mar 16 11:11:02 2017 +0200 ath10k: fix warnings from an earlier commit I failed to notice that commit 523f6701dbab ("ath10k: update available channel list for 5G radio") added two new warnings: drivers/net/wireless/ath/ath10k/mac.c:3129:6: warning: symbol 'ath10k_mac_update_channel_list' was not declared. Should it be static? drivers/net/wireless/ath/ath10k/mac.c:3170: Alignment should match open parenthesis Fix those. Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e9ea1e7f53b852147cbd568b0568c7ad97ec21a3 Author: Kyle Huey Date: Mon Mar 20 01:16:26 2017 -0700 x86/arch_prctl: Add ARCH_[GET|SET]_CPUID Intel supports faulting on the CPUID instruction beginning with Ivy Bridge. When enabled, the processor will fault on attempts to execute the CPUID instruction with CPL>0. Exposing this feature to userspace will allow a ptracer to trap and emulate the CPUID instruction. When supported, this feature is controlled by toggling bit 0 of MSR_MISC_FEATURES_ENABLES. It is documented in detail in Section 2.3.2 of https://bugzilla.kernel.org/attachment.cgi?id=243991 Implement a new pair of arch_prctls, available on both x86-32 and x86-64. ARCH_GET_CPUID: Returns the current CPUID state, either 0 if CPUID faulting is enabled (and thus the CPUID instruction is not available) or 1 if CPUID faulting is not enabled. ARCH_SET_CPUID: Set the CPUID state to the second argument. If cpuid_enabled is 0 CPUID faulting will be activated, otherwise it will be deactivated. Returns ENODEV if CPUID faulting is not supported on this system. The state of the CPUID faulting flag is propagated across forks, but reset upon exec. Signed-off-by: Kyle Huey Cc: Grzegorz Andrejczuk Cc: kvm@vger.kernel.org Cc: Radim Krčmář Cc: Peter Zijlstra Cc: Dave Hansen Cc: Andi Kleen Cc: linux-kselftest@vger.kernel.org Cc: Nadav Amit Cc: Robert O'Callahan Cc: Richard Weinberger Cc: "Rafael J. Wysocki" Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Len Brown Cc: Shuah Khan Cc: user-mode-linux-devel@lists.sourceforge.net Cc: Jeff Dike Cc: Alexander Viro Cc: user-mode-linux-user@lists.sourceforge.net Cc: David Matlack Cc: Boris Ostrovsky Cc: Dmitry Safonov Cc: linux-fsdevel@vger.kernel.org Cc: Paolo Bonzini Link: http://lkml.kernel.org/r/20170320081628.18952-9-khuey@kylehuey.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/msr-index.h | 2 + arch/x86/include/asm/processor.h | 2 + arch/x86/include/asm/thread_info.h | 6 ++- arch/x86/include/uapi/asm/prctl.h | 11 ++++-- arch/x86/kernel/cpu/intel.c | 18 +++++---- arch/x86/kernel/process.c | 78 ++++++++++++++++++++++++++++++++++++++ fs/exec.c | 1 + include/linux/thread_info.h | 4 ++ 8 files changed, 109 insertions(+), 13 deletions(-) commit 90218ac77d0582eaf2d0872d8d900cbd5bf1f205 Author: Kyle Huey Date: Mon Mar 20 01:16:25 2017 -0700 x86/cpufeature: Detect CPUID faulting support Intel supports faulting on the CPUID instruction beginning with Ivy Bridge. When enabled, the processor will fault on attempts to execute the CPUID instruction with CPL>0. This will allow a ptracer to emulate the CPUID instruction. Bit 31 of MSR_PLATFORM_INFO advertises support for this feature. It is documented in detail in Section 2.3.2 of https://bugzilla.kernel.org/attachment.cgi?id=243991 Detect support for this feature and expose it as X86_FEATURE_CPUID_FAULT. Signed-off-by: Kyle Huey Reviewed-by: Borislav Petkov Cc: Grzegorz Andrejczuk Cc: kvm@vger.kernel.org Cc: Radim Krčmář Cc: Peter Zijlstra Cc: Dave Hansen Cc: Andi Kleen Cc: linux-kselftest@vger.kernel.org Cc: Nadav Amit Cc: Robert O'Callahan Cc: Richard Weinberger Cc: "Rafael J. Wysocki" Cc: Andy Lutomirski Cc: Len Brown Cc: Shuah Khan Cc: user-mode-linux-devel@lists.sourceforge.net Cc: Jeff Dike Cc: Alexander Viro Cc: user-mode-linux-user@lists.sourceforge.net Cc: David Matlack Cc: Boris Ostrovsky Cc: Dmitry Safonov Cc: linux-fsdevel@vger.kernel.org Cc: Paolo Bonzini Link: http://lkml.kernel.org/r/20170320081628.18952-8-khuey@kylehuey.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/msr-index.h | 2 ++ arch/x86/kernel/cpu/intel.c | 24 +++++++++++++++++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) commit 79170fda313ed5be2394f87aa2a00d597f8ed4a1 Author: Kyle Huey Date: Mon Mar 20 01:16:24 2017 -0700 x86/syscalls/32: Wire up arch_prctl on x86-32 Hook up arch_prctl to call do_arch_prctl() on x86-32, and in 32 bit compat mode on x86-64. This allows to have arch_prctls that are not specific to 64 bits. On UML, simply stub out this syscall. Signed-off-by: Kyle Huey Cc: Grzegorz Andrejczuk Cc: kvm@vger.kernel.org Cc: Radim Krčmář Cc: Peter Zijlstra Cc: Dave Hansen Cc: Andi Kleen Cc: linux-kselftest@vger.kernel.org Cc: Nadav Amit Cc: Robert O'Callahan Cc: Richard Weinberger Cc: "Rafael J. Wysocki" Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Len Brown Cc: Shuah Khan Cc: user-mode-linux-devel@lists.sourceforge.net Cc: Jeff Dike Cc: Alexander Viro Cc: user-mode-linux-user@lists.sourceforge.net Cc: David Matlack Cc: Boris Ostrovsky Cc: Dmitry Safonov Cc: linux-fsdevel@vger.kernel.org Cc: Paolo Bonzini Link: http://lkml.kernel.org/r/20170320081628.18952-7-khuey@kylehuey.com Signed-off-by: Thomas Gleixner arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/kernel/process_32.c | 7 +++++++ arch/x86/kernel/process_64.c | 7 +++++++ arch/x86/um/Makefile | 2 +- arch/x86/um/syscalls_32.c | 7 +++++++ include/linux/compat.h | 2 ++ 6 files changed, 25 insertions(+), 1 deletion(-) commit b0b9b014016d16ca7a192da986aa8ebae21bb995 Author: Kyle Huey Date: Mon Mar 20 01:16:23 2017 -0700 x86/arch_prctl: Add do_arch_prctl_common() Add do_arch_prctl_common() to handle arch_prctls that are not specific to 64 bit mode. Call it from the syscall entry point, but not any of the other callsites in the kernel, which all want one of the existing 64 bit only arch_prctls. Signed-off-by: Kyle Huey Cc: Grzegorz Andrejczuk Cc: kvm@vger.kernel.org Cc: Radim Krčmář Cc: Peter Zijlstra Cc: Dave Hansen Cc: Andi Kleen Cc: linux-kselftest@vger.kernel.org Cc: Nadav Amit Cc: Robert O'Callahan Cc: Richard Weinberger Cc: "Rafael J. Wysocki" Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Len Brown Cc: Shuah Khan Cc: user-mode-linux-devel@lists.sourceforge.net Cc: Jeff Dike Cc: Alexander Viro Cc: user-mode-linux-user@lists.sourceforge.net Cc: David Matlack Cc: Boris Ostrovsky Cc: Dmitry Safonov Cc: linux-fsdevel@vger.kernel.org Cc: Paolo Bonzini Link: http://lkml.kernel.org/r/20170320081628.18952-6-khuey@kylehuey.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/proto.h | 3 +++ arch/x86/kernel/process.c | 6 ++++++ arch/x86/kernel/process_64.c | 8 +++++++- 3 files changed, 16 insertions(+), 1 deletion(-) commit 17a6e1b8e8e8539f89156643f8c3073f09ec446a Author: Kyle Huey Date: Mon Mar 20 01:16:22 2017 -0700 x86/arch_prctl/64: Rename do_arch_prctl() to do_arch_prctl_64() In order to introduce new arch_prctls that are not 64 bit only, rename the existing 64 bit implementation to do_arch_prctl_64(). Also rename the second argument of that function from 'addr' to 'arg2', because it will no longer always be an address. Signed-off-by: Kyle Huey Reviewed-by: Andy Lutomirski Cc: Grzegorz Andrejczuk Cc: kvm@vger.kernel.org Cc: Radim Krčmář Cc: Peter Zijlstra Cc: Dave Hansen Cc: Andi Kleen Cc: linux-kselftest@vger.kernel.org Cc: Nadav Amit Cc: Robert O'Callahan Cc: Richard Weinberger Cc: "Rafael J. Wysocki" Cc: Borislav Petkov Cc: Len Brown Cc: Shuah Khan Cc: user-mode-linux-devel@lists.sourceforge.net Cc: Jeff Dike Cc: Alexander Viro Cc: user-mode-linux-user@lists.sourceforge.net Cc: David Matlack Cc: Boris Ostrovsky Cc: Dmitry Safonov Cc: linux-fsdevel@vger.kernel.org Cc: Paolo Bonzini Link: http://lkml.kernel.org/r/20170320081628.18952-5-khuey@kylehuey.com Signed-off-by: Thomas Gleixner arch/um/include/shared/os.h | 2 +- arch/x86/include/asm/proto.h | 3 +-- arch/x86/kernel/process_64.c | 32 +++++++++++++++++--------------- arch/x86/kernel/ptrace.c | 8 ++++---- arch/x86/um/os-Linux/prctl.c | 4 ++-- arch/x86/um/syscalls_64.c | 14 +++++++------- 6 files changed, 32 insertions(+), 31 deletions(-) commit ff3f097eef30151f5ee250859e0fe8a0ec02c160 Author: Kyle Huey Date: Mon Mar 20 01:16:21 2017 -0700 x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl() Use the SYSCALL_DEFINE2 macro instead of manually defining it. Signed-off-by: Kyle Huey Cc: Grzegorz Andrejczuk Cc: kvm@vger.kernel.org Cc: Radim Krčmář Cc: Peter Zijlstra Cc: Dave Hansen Cc: Andi Kleen Cc: linux-kselftest@vger.kernel.org Cc: Nadav Amit Cc: Robert O'Callahan Cc: Richard Weinberger Cc: "Rafael J. Wysocki" Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Len Brown Cc: Shuah Khan Cc: user-mode-linux-devel@lists.sourceforge.net Cc: Jeff Dike Cc: Alexander Viro Cc: user-mode-linux-user@lists.sourceforge.net Cc: David Matlack Cc: Boris Ostrovsky Cc: Dmitry Safonov Cc: linux-fsdevel@vger.kernel.org Cc: Paolo Bonzini Link: http://lkml.kernel.org/r/20170320081628.18952-4-khuey@kylehuey.com Signed-off-by: Thomas Gleixner arch/x86/kernel/process_64.c | 3 ++- arch/x86/um/syscalls_64.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit dd93938a92dc067aba70c401bdf2e50ed58083db Author: Kyle Huey Date: Mon Mar 20 01:16:20 2017 -0700 x86/arch_prctl: Rename 'code' argument to 'option' The x86 specific arch_prctl() arbitrarily changed prctl's 'option' to 'code'. Before adding new options, rename it. Signed-off-by: Kyle Huey Cc: Grzegorz Andrejczuk Cc: kvm@vger.kernel.org Cc: Radim Krčmář Cc: Peter Zijlstra Cc: Dave Hansen Cc: Andi Kleen Cc: linux-kselftest@vger.kernel.org Cc: Nadav Amit Cc: Robert O'Callahan Cc: Richard Weinberger Cc: "Rafael J. Wysocki" Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Len Brown Cc: Shuah Khan Cc: user-mode-linux-devel@lists.sourceforge.net Cc: Jeff Dike Cc: Alexander Viro Cc: user-mode-linux-user@lists.sourceforge.net Cc: David Matlack Cc: Boris Ostrovsky Cc: Dmitry Safonov Cc: linux-fsdevel@vger.kernel.org Cc: Paolo Bonzini Link: http://lkml.kernel.org/r/20170320081628.18952-3-khuey@kylehuey.com Signed-off-by: Thomas Gleixner arch/um/include/shared/os.h | 4 ++-- arch/x86/include/asm/proto.h | 2 +- arch/x86/kernel/process_64.c | 8 ++++---- arch/x86/um/asm/ptrace.h | 2 +- arch/x86/um/os-Linux/prctl.c | 4 ++-- arch/x86/um/syscalls_64.c | 13 +++++++------ 6 files changed, 17 insertions(+), 16 deletions(-) commit ab6d9468631a6e56e4c071c6ce6710956485fe08 Author: Kyle Huey Date: Mon Mar 20 01:16:19 2017 -0700 x86/msr: Rename MISC_FEATURE_ENABLES to MISC_FEATURES_ENABLES This matches the only public Intel documentation of this MSR, in the "Virtualization Technology FlexMigration Application Note" (preserved at https://bugzilla.kernel.org/attachment.cgi?id=243991) Signed-off-by: Kyle Huey Cc: Grzegorz Andrejczuk Cc: kvm@vger.kernel.org Cc: Radim Krčmář Cc: Peter Zijlstra Cc: Dave Hansen Cc: Andi Kleen Cc: linux-kselftest@vger.kernel.org Cc: Nadav Amit Cc: Robert O'Callahan Cc: Richard Weinberger Cc: "Rafael J. Wysocki" Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Len Brown Cc: Shuah Khan Cc: user-mode-linux-devel@lists.sourceforge.net Cc: Jeff Dike Cc: Alexander Viro Cc: user-mode-linux-user@lists.sourceforge.net Cc: David Matlack Cc: Boris Ostrovsky Cc: Dmitry Safonov Cc: linux-fsdevel@vger.kernel.org Cc: Paolo Bonzini Link: http://lkml.kernel.org/r/20170320081628.18952-2-khuey@kylehuey.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/msr-index.h | 6 +++--- arch/x86/kernel/cpu/intel.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) commit 3a270e4dcc8a0ee808fd1f2af52d45e8bcfeb9a6 Author: Arnd Bergmann Date: Mon Mar 20 10:39:25 2017 +0100 drm/msm: add stubs for msm_{perf,rd}_debugfs_cleanup We now call those two functions even when they are not defined or declared anywhere because DEBUG_FS is disabled: drivers/gpu/drm/msm/msm_drv.c: In function 'msm_drm_uninit': drivers/gpu/drm/msm/msm_drv.c:244:2: error: implicit declaration of function 'msm_perf_debugfs_cleanup';did you mean 'msm_framebuffer_cleanup'? [-Werror=implicit-function-declaration] drivers/gpu/drm/msm/msm_drv.c:245:2: error: implicit declaration of function 'msm_rd_debugfs_cleanup';did you mean 'msm_framebuffer_cleanup'? [-Werror=implicit-function-declaration] This adds empty stub implementations for that case. Fixes: 85eac4700ede ("drm/msm: Remove msm_debugfs_cleanup()") Signed-off-by: Arnd Bergmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170320093936.1255573-1-arnd@arndb.de drivers/gpu/drm/msm/msm_drv.h | 2 ++ 1 file changed, 2 insertions(+) commit bea1baa1e7722c82631fa263653c1279002dd273 Author: Peter De Schrijver Date: Tue Feb 28 17:19:50 2017 +0200 clk: tegra: Mark TEGRA210_CLK_DBGAPB as always on This is needed to make the JTAG debugging interface work. Signed-off-by: Peter De Schrijver [treding@nvidia.com: add TODO comment] Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 2 ++ 1 file changed, 2 insertions(+) commit 09549aa1baa90d9e273ecd6c69c493bea6473dec Author: Michal Marek Date: Tue Nov 22 22:34:34 2016 +0100 deb-pkg: Remove the KBUILD_IMAGE workaround The arch Makefile are fixed to set KBUILD_IMAGE to the full patch, so the workaround is no longer needed. Signed-off-by: Michal Marek Reviewed-by: Riku Voipio Signed-off-by: Masahiro Yamada scripts/package/builddeb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 41f5b8db796fdea5d5265798add260e66d44276b Author: Michal Marek Date: Tue Nov 22 22:34:33 2016 +0100 unicore32: Use full path in KBUILD_IMAGE definition The KBUILD_IMAGE variable is used by the rpm and deb-pkg targets, which expect it to point to the image file in the build directory. The builddeb script has a workaround for architectures which only provide the basename, but let's provide a clean interface for packaging tools. Cc: Guan Xuetao Signed-off-by: Michal Marek Signed-off-by: Masahiro Yamada arch/unicore32/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e62c527efb07fa62a549cb03109a4d0265cedce2 Author: Michal Marek Date: Tue Nov 22 22:34:32 2016 +0100 sh: Use full path in KBUILD_IMAGE definition The KBUILD_IMAGE variable is used by the rpm and deb-pkg targets, which expect it to point to the image file in the build directory. The builddeb script has a workaround for architectures which only provide the basename, but let's provide a clean interface for packaging tools. Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Signed-off-by: Michal Marek Signed-off-by: Masahiro Yamada arch/sh/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 5e40f0fd234f36564881b03d28deaa69653ae9f2 Author: Michal Marek Date: Tue Nov 22 22:34:31 2016 +0100 arc: Use full path in KBUILD_IMAGE definition The KBUILD_IMAGE variable is used by the rpm and deb-pkg targets, which expect it to point to the image file in the build directory. The builddeb script has a workaround for architectures which only provide the basename, but let's provide a clean interface for packaging tools. Cc: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Michal Marek Signed-off-by: Masahiro Yamada arch/arc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 152e6744ebfc8fa6cc9fff4ba36271f5f1ba2821 Author: Michal Marek Date: Tue Nov 22 22:34:30 2016 +0100 arm: Use full path in KBUILD_IMAGE definition The KBUILD_IMAGE variable is used by the rpm and deb-pkg targets, which expect it to point to the image file in the build directory. The builddeb script has a workaround for architectures which only provide the basename, but let's provide a clean interface for packaging tools. Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Michal Marek Signed-off-by: Masahiro Yamada arch/arm/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 06995804b5762f016c7a80503406da853a8f3785 Author: Michal Marek Date: Tue Nov 22 22:34:29 2016 +0100 arm64: Use full path in KBUILD_IMAGE definition The KBUILD_IMAGE variable is used by the rpm and deb-pkg targets, which expect it to point to the image file in the build directory. The builddeb script has a workaround for architectures which only provide the basename, but let's provide a clean interface for packaging tools. Cc: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Michal Marek Acked-by: Will Deacon Signed-off-by: Masahiro Yamada arch/arm64/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 59af78d78db8bde6a63e09772aa44192f772fa96 Author: Peter De Schrijver Date: Wed Mar 15 17:42:05 2017 +0200 clk: tegra: Add SATA seq input control This will be used by the powergating driver to ensure proper sequencer state when the SATA domain is powergated. Signed-off-by: Peter De Schrijver Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 25 +++++++++++++++++++++++++ include/linux/clk/tegra.h | 1 + 2 files changed, 26 insertions(+) commit 68d724cedcca8ab86eee824682f7da0af5e6e50d Author: Peter De Schrijver Date: Wed Mar 15 14:59:32 2017 +0200 clk: tegra: Add Tegra210 special resets Tegra210 has 2 special resets which don't follow the normal pattern: DVCO and ADSP. Add them in this patch. Changelog: v2: add DT bindings file Signed-off-by: Peter De Schrijver Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 85 ++++++++++++++++++++++++++++++++ include/dt-bindings/reset/tegra210-car.h | 13 +++++ 2 files changed, 98 insertions(+) commit e745f992cf4b030ef73c5cdceecd03d9d3c727e9 Author: Peter De Schrijver Date: Tue Mar 14 16:12:49 2017 +0200 clk: tegra: Rework pll_u In normal operation pll_u is under hardware control and has a fixed rate of 480MHz. Hardware will turn on pll_u on whenever any of the XUSB powerdomains is on. From a software point of view we model this is if pll_u is always on using a fixed rate clock. However the bootloader might or might not have configured pll_u this way. So we will check the current state of pll_u at boot and reconfigure it if required. There are 3 possiblities at kernel boot: 1) pll_u is under hardware control: do nothing 2) pll_u is under hardware control and enabled: enable hardware control 3) pll_u is disabled: enable pll_u and enable hardware control In all cases we also check if UTMIPLL is under hardware control at boot and configure it for hardware control if that is not the case. The same is done during SC7 resume. Thanks to Joseph Lo for bug fixes. Signed-off-by: Peter De Schrijver Signed-off-by: Thierry Reding drivers/clk/tegra/clk-pll.c | 174 ----------------------- drivers/clk/tegra/clk-tegra210.c | 295 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 272 insertions(+), 197 deletions(-) commit 4236e752f19d4dae372336859a18ca8a5bed9374 Author: Mikko Perttunen Date: Thu Mar 2 16:16:16 2017 +0200 clk: tegra: Implement reset control reset For completeness, also implement this reset framework API for Tegra. Signed-off-by: Mikko Perttunen Reviewed-by: Peter De Schrijver Reviewed-by: Arto Merilainen Signed-off-by: Peter De Schrijver Signed-off-by: Thierry Reding drivers/clk/tegra/clk.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 9619dba8325fce098bbc9ee2911d1b0150fec0c9 Author: Peter De Schrijver Date: Thu Mar 2 15:22:05 2017 +0200 clk: tegra: Fix disable unused for clocks sharing enable bit In case 2 clocks share an enable bit and one of them is enabled by a driver and the other one is not, CCF will think it's enabled because it will only look at the HW state. Therefore it will disable the clock and thus also disable the other clock which was enabled. Solve this by reading the initial state of the enable bit and incrementing the refcount if it's set. Signed-off-by: Peter De Schrijver Signed-off-by: Thierry Reding drivers/clk/tegra/clk-periph-gate.c | 3 +++ 1 file changed, 3 insertions(+) commit 3843832fc8cadc2d48ba4ea4cd350a696906ac42 Author: Peter De Schrijver Date: Tue Feb 28 17:19:24 2017 +0200 clk: tegra: Handle UTMIPLL IDDQ Export UTMIPLL IDDQ functions. These will be needed when powergating the XUSB partition. Signed-off-by: BH Hsieh Signed-off-by: Peter De Schrijver Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 26 ++++++++++++++++++++++++++ include/linux/clk/tegra.h | 2 ++ 2 files changed, 28 insertions(+) commit 24c3ebef1ab6d5620eaaa51f69223118cac97db6 Author: Peter De Schrijver Date: Tue Feb 28 16:37:22 2017 +0200 clk: tegra: Add aclk This clock clocks the ADSP Cortex-A9. Signed-off-by: Peter De Schrijver Reviewed-by: Mikko Perttunen Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 10 ++++++++++ include/dt-bindings/clock/tegra210-car.h | 2 ++ 2 files changed, 12 insertions(+) commit e827ba1840bc6a9540deb81c6df6943a19e0e891 Author: Peter De Schrijver Date: Tue Feb 28 16:37:21 2017 +0200 clk: tegra: Add super clock mux/divider Add a super clock type which implements both mux and divider. This is used for aclk. Signed-off-by: Peter De Schrijver Reviewed-by: Mikko Perttunen Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/clk/tegra/clk-super.c | 87 +++++++++++++++++++++++++++++++++++++++++-- drivers/clk/tegra/clk.h | 7 +++- 2 files changed, 89 insertions(+), 5 deletions(-) commit 6cfc8bc9ee66677fbd1b3331167d6f520e30b6fd Author: Peter De Schrijver Date: Tue Feb 28 16:37:20 2017 +0200 clk: tegra: Define Tegra210 DMIC clocks Tegra210 has 3 inputs for Digital Microphones (DMICs). Provide the required clocks for them. Signed-off-by: Peter De Schrijver Reviewed-by: Mikko Perttunen Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/clk/tegra/clk-id.h | 5 ++++- drivers/clk/tegra/clk-tegra-periph.c | 21 +++++++++++++++++++++ drivers/clk/tegra/clk-tegra210.c | 3 +++ 3 files changed, 28 insertions(+), 1 deletion(-) commit 9e8c93edd22cc466bfb71b7a73c8122df0f39597 Author: Peter De Schrijver Date: Tue Feb 28 16:37:19 2017 +0200 clk: tegra: Fix constness for peripheral clocks checkpatch now warns for const ** and expects const * const * to be used instead. This means we have to update the prototypes and function declarations to handle this change. Signed-off-by: Peter De Schrijver Reviewed-by: Mikko Perttunen Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/clk/tegra/clk-periph.c | 4 ++-- drivers/clk/tegra/clk.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 319af7975c9ff500a30b2e6c4433c1f327283884 Author: Peter De Schrijver Date: Tue Feb 28 16:37:18 2017 +0200 clk: tegra: Define Tegra210 DMIC sync clocks Tegra210 has 3 DMIC inputs which can be clocked from the recovered clock of several other audio inputs (eg. i2s0, i2s1, ...). To model this, we add a 3 new clocks similar to the audio* clocks which handle the same function for the I2S and SPDIF clocks. Signed-off-by: Peter De Schrijver Reviewed-by: Mikko Perttunen Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/clk/tegra/clk-id.h | 6 +++ drivers/clk/tegra/clk-tegra-audio.c | 85 +++++++++++++++++++++++--------- drivers/clk/tegra/clk-tegra210.c | 6 +++ include/dt-bindings/clock/tegra210-car.h | 9 +++- 4 files changed, 81 insertions(+), 25 deletions(-) commit bfa34832df1fffb79c1719d4016e9cacf0f83b22 Author: Peter De Schrijver Date: Tue Feb 28 16:37:17 2017 +0200 clk: tegra: Add CEC clock This clock is used to clock the HDMI CEC interface. Signed-off-by: Peter De Schrijver Reviewed-by: Mikko Perttunen Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/clk/tegra/clk-id.h | 1 + drivers/clk/tegra/clk-tegra-periph.c | 1 + drivers/clk/tegra/clk-tegra114.c | 1 + drivers/clk/tegra/clk-tegra124.c | 1 + drivers/clk/tegra/clk-tegra210.c | 1 + drivers/clk/tegra/clk-tegra30.c | 1 + include/dt-bindings/clock/tegra114-car.h | 2 +- include/dt-bindings/clock/tegra124-car-common.h | 2 +- include/dt-bindings/clock/tegra210-car.h | 2 +- include/dt-bindings/clock/tegra30-car.h | 2 +- 10 files changed, 10 insertions(+), 4 deletions(-) commit e589376dab0753bc24c20867cd4f65290ff76381 Author: Peter De Schrijver Date: Thu Feb 23 12:44:44 2017 +0200 clk: tegra: Fix type for m field When used as part of fractional ndiv calculations, the current range is not enough because the denominator of the fraction is multiplied with m. Signed-off-by: Peter De Schrijver Reviewed-by: Mikko Perttunen Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/clk/tegra/clk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef6ed2b9562c1b2354dbbbcfeacd37ce91111502 Author: Peter De Schrijver Date: Thu Feb 23 12:44:43 2017 +0200 clk: tegra: Correct tegra210_pll_fixed_mdiv_cfg rate calculation Return the actually achieved rate in cfg->output_rate rather than just the requested rate. This is important to make clk_round_rate() return the correct result. Signed-off-by: Peter De Schrijver Reviewed-by: Mikko Perttunen Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 8dce89a1c2cf458875e0a703f3671bdb72b54c53 Author: Peter De Schrijver Date: Thu Feb 23 12:44:42 2017 +0200 clk: tegra: Don't warn for PLL defaults unnecessarily If the PLL is on, only warn if the defaults are not yet set. Otherwise be silent. Signed-off-by: Peter De Schrijver Reviewed-by: Mikko Perttunen Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 8809eeac21c4fc8c964a4bbcda53c7228ad23370 Author: Peter De Schrijver Date: Thu Feb 23 12:44:41 2017 +0200 clk: tegra: Remove non-existing pll_m_out1 clock This clock doesn't actually exist, so remove it. Signed-off-by: Peter De Schrijver Reviewed-by: Mikko Perttunen Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 5 ----- 1 file changed, 5 deletions(-) commit e7a49675e2c273e5490ac4a5187fa1eeddbdd4b4 Author: Peter De Schrijver Date: Thu Feb 23 12:44:40 2017 +0200 clk: tegra: Correct afi clock parent The parent for afi is actually mselect, not clk_m. Signed-off-by: Peter De Schrijver Reviewed-by: Mikko Perttunen Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra-periph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34ac2c278b306cc3006dd5cbfaff4ec52065bf6f Author: Peter De Schrijver Date: Thu Feb 23 12:44:39 2017 +0200 clk: tegra: Fix ISP clock modelling The 2 ISP clocks (ispa and ispb) share a mux/divider control. So model this as 1 mux/divider clock and child gate clocks. Signed-off-by: Peter De Schrijver Reviewed-by: Mikko Perttunen Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/clk/tegra/clk-id.h | 1 + drivers/clk/tegra/clk-tegra-periph.c | 11 +++++++++-- drivers/clk/tegra/clk-tegra210.c | 1 + include/dt-bindings/clock/tegra210-car.h | 4 ++-- 4 files changed, 13 insertions(+), 4 deletions(-) commit 9326947f2215e1816a9133b0b47e4c9200552777 Author: Peter De Schrijver Date: Thu Feb 23 12:44:38 2017 +0200 clk: tegra: Fix pll_a1 iddq register, add pll_a1 pll_a1 was using CLK_RST_CONTROLLER_PLLA1_MISC_0 for IDDQ control rather than the correct register CLK_RST_CONTROLLER_PLLA1_MISC_1. Also add pll_a1 to the set of clocks defined for Tegra210. Signed-off-by: Peter De Schrijver Reviewed-by: Mikko Perttunen Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a16fbb85c78a3ce56dc4515ffb8632b82cc969c7 Author: Matthias Kaehlcke Date: Wed Mar 15 15:41:23 2017 -0700 ALSA: hda/ca0132: Remove double parentheses The extra pairs of parantheses are not needed and causes clang to generate warnings like this: sound/pci/hda/patch_ca0132.c:1171:14: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] if ((buffer == NULL)) ~~~~~~~^~~~~~~ sound/pci/hda/patch_ca0132.c:1171:14: note: remove extraneous parentheses around the comparison to silence this warning if ((buffer == NULL)) ~ ^ ~ sound/pci/hda/patch_ca0132.c:1171:14: note: use '=' to turn this equality comparison into an assignment if ((buffer == NULL)) Signed-off-by: Matthias Kaehlcke Signed-off-by: Takashi Iwai sound/pci/hda/patch_ca0132.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2261cf1ce63ff1ca01772542a41b57eaac286841 Author: Bhumika Goyal Date: Sat Mar 18 19:34:11 2017 +0530 ASoC: omap: constify snd_soc_ops structures Declare snd_soc_ops structures as const as they are only stored in the ops field of a snd_soc_dai_link structure. This field is of type const, so snd_soc_ops structures having this property can be made const too. Cross compiled the .o files for arm architecture. Signed-off-by: Bhumika Goyal Reviewed-by: Sebastian Reichel Acked-by: Jarkko Nikula Signed-off-by: Mark Brown sound/soc/omap/am3517evm.c | 2 +- sound/soc/omap/n810.c | 2 +- sound/soc/omap/omap-abe-twl6040.c | 2 +- sound/soc/omap/omap-twl4030.c | 2 +- sound/soc/omap/omap3pandora.c | 2 +- sound/soc/omap/osk5912.c | 2 +- sound/soc/omap/rx51.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit 424dfbf2c0dee6f9c13d43d6d209a6e57a492d57 Author: Bhumika Goyal Date: Sat Mar 18 23:13:14 2017 +0530 ASoC: mediatek: constify snd_soc_ops structures Declare snd_soc_ops structures as const as they are only stored in the ops field of a snd_soc_dai_link structure. This field is of type const, so snd_soc_ops structures having this property can be made const too. Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown sound/soc/mediatek/mt2701/mt2701-cs42448.c | 2 +- sound/soc/mediatek/mt8173/mt8173-max98090.c | 2 +- sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c | 2 +- sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c | 2 +- sound/soc/mediatek/mt8173/mt8173-rt5650.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 17febfa6071bc673892edda6b1998ccfc7456c4e Author: Bard Liao Date: Mon Mar 20 10:20:54 2017 +0800 ASoC: rt5665: fix wrong pre div reg of IF2 and IF3 The pre divider control register of IF1 and IF2/3 are different. The driver used the same register for all interfaces which was a mistake. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5665.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit cd7d1eab8545c6b7bbcd03dd723247ce1bb9954b Author: Nicolas Iooss Date: Mon Mar 13 20:22:50 2017 +0100 ALSA: es1688: Use strcpy() instead of sprintf() There is no point in using sprintf() without a format string when strcpy() can perform the same operation. Signed-off-by: Nicolas Iooss Signed-off-by: Takashi Iwai sound/isa/es1688/es1688_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebe2aa911fc85b7c1ce6c433dec72a4b044b22c6 Merge: cc3a47a eeed4cd Author: Takashi Iwai Date: Mon Mar 20 12:24:26 2017 +0100 Merge branch 'topic/for-4.12' into for-next commit 3c85871a8a7f079cd4a24877ac9e0bcc0b1c2e4a Author: Antonio Borneo Date: Mon Mar 20 10:59:59 2017 +0100 spi: pl022: Document property values The property "pl022,com-mode" can only assume one of the values of the enum ssp_mode, defined in include/linux/amba/pl022.h List the possible numeric values and report the associated meaning. Signed-off-by: Antonio Borneo Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi_pl022.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b3bbef45e97526e8c56fd542d75e505776eecc01 Author: Linus Walleij Date: Mon Mar 20 10:13:52 2017 +0100 ASoC: wm8903: add regulator handling The WM8903 has four different voltage inputs: AVDD, CPVDD, DBVDD and DCVDD. On the Qualcomm APQ8060 Dragonboard these are all supplied from proper regulators and thus need activating and binding. This is a quick-and-dirty solution just grabbing and enabling the regulator supplies on probe() and disabling them on remove() and the errorpath. More elaborate power management is likely possible. I assume the nVidia designs using this codec have some hard-wired always-on power and will be happy with using the dummy regulators for this. But someone from the nVidia camp should probably check whether they can bind these to proper regulators instead. We also amend the DT binding document. A small change like this does not warrant a separate patch for augmenting these. Cc: devicetree@vger.kernel.org Cc: Mark Brown Cc: Liam Girdwood Cc: Stephen Warren Cc: Charles Keepax Signed-off-by: Linus Walleij Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/wm8903.txt | 13 +++++++++ sound/soc/codecs/wm8903.c | 31 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) commit e6a72e057fa3e0ad38ec59c4779647a7bd390a37 Author: Antonio Borneo Date: Mon Mar 20 10:57:18 2017 +0100 spi: pl022: remove nonexistent properties from DT binding example The properties "pl022,hierarchy" and "pl022,slave-tx-disable" were initially proposed till patch V4 [1] but then discarded in V5 [2] when the patch set was taken over by another developer, as explained in patch history in [3]. The above properties never landed in mainline code but were then listed in the binding example by a following commit dc715452e914 ("spi: pl022: use generic DMA slave configuration if possible") and later on they were copy-paste in some board's DT. Remove the nonexistent properties from the example. Also remove a spaces-only line at the end of the file. [1] https://lkml.org/lkml/2012/7/9/421 [2] https://lkml.org/lkml/2012/8/21/427 [3] https://lkml.org/lkml/2012/8/21/436 Signed-off-by: Antonio Borneo Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi_pl022.txt | 3 --- 1 file changed, 3 deletions(-) commit 54ec12af2fb8ee761b092fabbf6e135648d23041 Author: Chris Wilson Date: Sat Mar 18 10:42:57 2017 +0000 drm/i915: Skip force-wake for uncached mmio flush of GGTT writes The trick of using an uncached mmio read to ensure that the GGTT writes are flushed does not require us to do the forcewake dance, so avoid it in the hope of reducing the frequency that we do keep the device forced awake. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170318104257.694-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit c9203e82773a3cc965292bdf13eee422682fc018 Author: Chris Wilson Date: Sat Mar 18 10:28:59 2017 +0000 drm/i915: Reset tasklet back to execlists after disabling guc When switching back to execlists, we also now need to restore the tasklet handler. Reported-by: Oscar Mateo Fixes: 31de73501ac9 ("drm/i915/scheduler: emulate a scheduler for guc") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Michał Winiarski Cc: Oscar Mateo Link: http://patchwork.freedesktop.org/patch/msgid/20170318102859.24101-1-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/intel_lrc.c | 1 + 1 file changed, 1 insertion(+) commit 4fa13dbe8c86382a846584e65c47bce09297f75b Author: Gabriel Krisman Bertazi Date: Fri Mar 17 15:14:09 2017 -0300 drm: bochs: Don't remove uninitialized fbdev framebuffer In the same spirit of the fix for QXL in commit 861078381ba5 ("drm: qxl: Don't alloc fbdev if emulation is not supported"), prevent the Oops in the unbind path of Bochs if fbdev emulation is disabled. [ 112.176009] Oops: 0002 [#1] SMP [ 112.176009] Modules linked in: bochs_drm [ 112.176009] CPU: 0 PID: 3002 Comm: bash Not tainted 4.11.0-rc1+ #111 [ 112.176009] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014 [ 112.176009] task: ffff8800743bbac0 task.stack: ffffc90000b5c000 [ 112.176009] RIP: 0010:mutex_lock+0x18/0x30 [ 112.176009] RSP: 0018:ffffc90000b5fc78 EFLAGS: 00010246 [ 112.176009] RAX: 0000000000000000 RBX: 0000000000000260 RCX: 0000000000000000 [ 112.176009] RDX: ffff8800743bbac0 RSI: ffff8800787176e0 RDI: 0000000000000260 [ 112.176009] RBP: ffffc90000b5fc80 R08: ffffffff00000000 R09: 00000000ffffffff [ 112.176009] R10: ffff88007b463650 R11: 0000000000000000 R12: 0000000000000260 [ 112.176009] R13: ffff8800787176e0 R14: ffffffffa0003068 R15: 0000000000000060 [ 112.176009] FS: 00007f20564c7b40(0000) GS:ffff88007ce00000(0000) knlGS:0000000000000000 [ 112.176009] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 112.176009] CR2: 0000000000000260 CR3: 000000006b89c000 CR4: 00000000000006f0 [ 112.176009] Call Trace: [ 112.176009] drm_mode_object_unregister+0x1e/0x50 [ 112.176009] drm_framebuffer_unregister_private+0x15/0x20 [ 112.176009] bochs_fbdev_fini+0x57/0x70 [bochs_drm] [ 112.176009] bochs_unload+0x16/0x50 [bochs_drm] [ 112.176009] drm_dev_unregister+0x37/0xd0 [ 112.176009] drm_put_dev+0x31/0x60 [ 112.176009] bochs_pci_remove+0x10/0x20 [bochs_drm] [ 112.176009] pci_device_remove+0x34/0xb0 [ 112.176009] device_release_driver_internal+0x150/0x200 [ 112.176009] device_release_driver+0xd/0x10 [ 112.176009] unbind_store+0x108/0x150 [ 112.176009] drv_attr_store+0x20/0x30 [ 112.176009] sysfs_kf_write+0x32/0x40 [ 112.176009] kernfs_fop_write+0x10b/0x190 [ 112.176009] __vfs_write+0x23/0x120 [ 112.176009] ? security_file_permission+0x36/0xb0 [ 112.176009] ? rw_verify_area+0x49/0xb0 [ 112.176009] vfs_write+0xb0/0x190 [ 112.176009] SyS_write+0x41/0xa0 [ 112.176009] entry_SYSCALL_64_fastpath+0x1a/0xa9 [ 112.176009] RIP: 0033:0x7f2055bd5620 [ 112.176009] RSP: 002b:00007ffed2f487d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 112.176009] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f2055bd5620 [ 112.176009] RDX: 000000000000000d RSI: 0000000000ee0008 RDI: 0000000000000001 [ 112.176009] RBP: 0000000000000001 R08: 00007f2055e94760 R09: 00007f20564c7b40 [ 112.176009] R10: 0000000000000073 R11: 0000000000000246 R12: 0000000000000000 [ 112.176009] R13: 00007ffed2f48d70 R14: 0000000000000000 R15: 0000000000000000 [ 112.176009] Code: 00 00 00 55 be 02 00 00 00 48 89 e5 e8 62 fb ff ff 5d c3 55 48 89 e5 53 48 89 fb e8 53 e9 ff ff 65 48 8b 14 25 40 c4 00 00 31 c0 48 0f b1 13 48 85 c0 74 08 48 89 df e8c6 ff ff ff 5b 5d c3 [ 112.176009] RIP: mutex_lock+0x18/0x30 RSP: ffffc90000b5fc78 [ 112.176009] CR2: 0000000000000260 [ 112.205622] ---[ end trace 76189cd7a9bdd155 ]--- Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170317181409.4183-1-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/bochs/bochs_fbdev.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 4485a841be171dbd8d3f0701b00f59d389e94ce6 Author: Reshetova, Elena Date: Mon Mar 20 11:43:28 2017 +0200 netfilter: fix the warning on unused refcount variable net/netfilter/nfnetlink_acct.c: In function 'nfnl_acct_try_del': net/netfilter/nfnetlink_acct.c:329:15: warning: unused variable 'refcount' [-Wunused-variable] unsigned int refcount; ^ Fixes: b54ab92b84b6 ("netfilter: refcounter conversions") Signed-off-by: Elena Reshetova Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_acct.c | 1 - 1 file changed, 1 deletion(-) commit b44327d198b4f1bbebaf83f714cde450471de644 Author: Masahiro Yamada Date: Sun Feb 26 12:07:01 2017 +0900 ARM: oxnas: remove redundant select CPU_V6K MACH_OX820 depends on ARCH_MULTI_V6, which already selects CPU_V6K. Signed-off-by: Masahiro Yamada Acked-by: Neil Armstrong arch/arm/mach-oxnas/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 28ebb7700c650d59d321fd71db119feb7f8dda0a Author: Icenowy Zheng Date: Thu Mar 2 02:01:08 2017 +0800 arm64: only select PINCTRL for Allwinner platforms As the pinctrl driver selecting is refactored in Kconfig file of pinctrl-sunxi, now we can select only PINCTRL for Allwinner platform, and the default value of several pinctrl drivers useful on ARM64 Allwinner SoCs will become Y. This is the situation of 32-bit ARM ARCH_SUNXI option. Drop the select of per-SoC pinctrl choices, but keep selecting PINCTRL. Signed-off-by: Icenowy Zheng Acked-by: Linus Walleij Signed-off-by: Maxime Ripard arch/arm64/Kconfig.platforms | 1 - 1 file changed, 1 deletion(-) commit 20f13b95eef1b3ca75535e313357b0b096d39336 Author: Alexey Kardashevskiy Date: Tue Feb 21 13:40:20 2017 +1100 powerpc/powernv/npu: Remove dead iommu code PNV_IODA_PE_DEV is only used for NPU devices (emulated PCI bridges representing NVLink). These are added to IOMMU groups with corresponding NVIDIA devices after all non-NPU PEs are setup; a special helper - pnv_pci_ioda_setup_iommu_api() - handles this in pnv_pci_ioda_fixup(). The pnv_pci_ioda2_setup_dma_pe() helper sets up DMA for a PE. It is called for VFs (so it does not handle NPU case) and PCI bridges but only IODA1 and IODA2 types. An NPU bridge has its own type id (PNV_PHB_NPU) so pnv_pci_ioda2_setup_dma_pe() cannot be called on NPU and therefore (pe->flags & PNV_IODA_PE_DEV) is always "false". This removes not used iommu_add_device(). This should not cause any behavioral change. Signed-off-by: Alexey Kardashevskiy Acked-by: Gavin Shan Reviewed-by: David Gibson Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 81d5fe1a3b1acfaadc7921d08609e097c6345d7f Author: Alexey Kardashevskiy Date: Tue Feb 21 13:38:54 2017 +1100 powerpc/powernv: Fix it_ops::get() callback to return in cpu endian The iommu_table_ops callbacks are declared CPU endian as they take and return "unsigned long"; underlying hardware tables are big-endian. However get() was missing be64_to_cpu(), this adds the missing conversion. The only caller of this is crash dump at arch/powerpc/kernel/iommu.c, iommu_table_clear() which only compares TCE to zero so this change should not cause behavioral change. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Acked-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3a7864c6feb0fb30bc2cd3726570746bec41697 Author: Tobin C. Harding Date: Mon Mar 6 19:49:46 2017 +1100 powerpc/ftrace: Add prototype for prepare_ftrace_return() Sparse emits a warning: symbol 'prepare_ftrace_return' was not declared. Should it be static? prepare_ftrace_return() is called from assembler and should not be static. Add a prototype for it to asm-prototypes.h and include that in ftrace.c. Signed-off-by: Tobin C. Harding Signed-off-by: Michael Ellerman arch/powerpc/include/asm/asm-prototypes.h | 2 ++ arch/powerpc/kernel/ftrace.c | 1 + 2 files changed, 3 insertions(+) commit 1fc439c81312cd27aed553964c0d9d48946582ce Author: Tobin C. Harding Date: Mon Mar 6 19:25:31 2017 +1100 powerpc/swsusp: Include suspend.h to silence sparse warnings Sparse emits two symbol not declared warnings for swsusp.c. The two functions, save_processor_state() and restore_processor_state() are declared already in suspend.h, so include it. Signed-off-by: Tobin C. Harding Reviewed-by: Daniel Axtens Signed-off-by: Michael Ellerman arch/powerpc/kernel/swsusp.c | 1 + 1 file changed, 1 insertion(+) commit 017614a5d6c09ec9e0dc3fd46a5018c20b407d92 Author: Tobin C. Harding Date: Tue Mar 7 20:32:42 2017 +1100 powerpc/pseries: Move struct hcall_stats to hvCall_inst.c struct hcall_stats is only used in hvCall_inst.c, so move it there. Signed-off-by: Tobin C. Harding Signed-off-by: Michael Ellerman arch/powerpc/include/asm/hvcall.h | 10 ---------- arch/powerpc/platforms/pseries/hvCall_inst.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) commit b8b6ff019689ec7e61f0d3fa97929214507f7427 Author: Michael Ellerman Date: Mon Feb 6 21:13:28 2017 +1100 selftests/powerpc: Add cache_shape sniff test This is a very basic test of the new cache shape AUXV entries. All it does at the moment is look for the entries and error out if we don't find all the ones we expect. Primarily intended for folks bringing up a new chip to check that the cache info is making it all the way to userspace correctly. Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/Makefile | 1 + .../selftests/powerpc/cache_shape/.gitignore | 1 + .../testing/selftests/powerpc/cache_shape/Makefile | 10 ++ .../selftests/powerpc/cache_shape/cache_shape.c | 125 +++++++++++++++++++++ 4 files changed, 137 insertions(+) commit e3028437cb45c04a9caae4d6372bfe08e70293cd Author: Michael Ellerman Date: Mon Feb 6 21:13:27 2017 +1100 selftests/powerpc: Refactor the AUXV routines Refactor the AUXV routines so they are more composable. In a future test we want to look for many AUXV entries and we don't want to have to read /proc/self/auxv each time. Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/include/utils.h | 6 ++- tools/testing/selftests/powerpc/utils.c | 53 +++++++++++++++++-------- 2 files changed, 41 insertions(+), 18 deletions(-) commit cabed14891c52618688533bd413b206bf2ebf5c5 Author: Hamish Martin Date: Fri Feb 24 13:52:10 2017 +1300 powerpc/64: Allow for THREAD_SIZE > 16k Fix an assembler error when the THREAD_SIZE is greater than 16k. Signed-off-by: Hamish Martin Reviewed-by: Chris Packham Signed-off-by: Michael Ellerman arch/powerpc/kernel/head_64.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 476134070c037820bd909ff6e43e0d3eae33f376 Author: Hamish Martin Date: Fri Feb 24 13:52:09 2017 +1300 powerpc: Move THREAD_SHIFT config to Kconfig Shift the logic for defining THREAD_SHIFT logic to Kconfig in order to allow override by users. Signed-off-by: Hamish Martin Reviewed-by: Chris Packham Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 10 ++++++++++ arch/powerpc/include/asm/thread_info.h | 10 +--------- 2 files changed, 11 insertions(+), 9 deletions(-) commit 901f26bce64a96bd9d038fda3604bd0ab1098c3b Author: Greg Ungerer Date: Fri Mar 17 15:03:02 2017 +1000 ARM: imx: set correct chip_select in platform setup Some platform based configuration setup of spi-imx SPI devices does not set the "chip_select" to the actual hardware chip select used. This works because the cs_gpio mapping that is associated with this platform setup maps the chip_select offset used to the appropriate hardware chip select. The spi-imx driver uses the chip_select as an index into the cs_gpio array and ultimately gets the correct hardware chip select for its hardware setup. The motivation is to be able to eventually modify the spi-imx code to use the "chip_select" directly for harwdare setup instead of indirectly via the cs_gpio mapping array. This change only affects platforms using the hardware chip select addressing method for their SPI devices (sometimes called native chip select). The majority of devices using the spi-imx driver use the GPIO addressing method. The change to use the correct "chip_select" is strait forward. But the cs_gpio mapping arrary also needs to be modifed to match that change. In simple terms the cs_gpio mapping should always have the hardware chip select number at its same index offset. There is no functional change with these patches. The three affected platforms should work exactly as before. However I don't have any of these platforms (or access to them) and so I can't test them. So this patch is compile tested only. Signed-off-by: Greg Ungerer Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-mx31_3ds.c | 7 +++++-- arch/arm/mach-imx/mach-mx31moboard.c | 4 ++-- arch/arm/mach-imx/mach-pcm037_eet.c | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) commit c5bd2e14e85d180bc7fb3b8b62ac9348bddaf898 Author: Daniel Vetter Date: Mon Mar 20 08:21:05 2017 +0100 drm/i915: Update DRIVER_DATE to 20170320 Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 33d5f513c60d5ccd63f8d06d42b4aa4620f4073f Merge: b7d6c8d 7d5ed29 Author: Dave Airlie Date: Mon Mar 20 16:49:20 2017 +1000 Merge tag 'imx-drm-next-2017-03-17' of git://git.pengutronix.de/git/pza/linux into drm-next imx-drm PRE/PRG support, deferred plane disabling, separate alpha support - Initial support for the Prefetch Resolve Engine/Gasket on i.MX6QP, improving linear scanout buffer memory bandwidth utilization. This will in the future grow reordering support and allow direct scanout of Vivante tiled renderbuffers from the GPU. - Deferred plane disabling gets rid of some busy waiting in the atomic plane disable and crtc disable paths that lead to wait_for_vblank timeouts. - Add support for RGBA formats with a separate alpha plane, that can reduce memory bandwidth utilization for mostly transparent overlay planes by skipping color reads for completely transparent regions. - Allow moving an active overlay plane without enforcing a modeset. - Add 8-bit and 16-bit bayer formats to ipu_cpmem_set_image. - Set the base address in ipu_cpmem_set_image even for invalid formats to increase robustness against errors. - Use drm_plane_helper_check_state in plane atomic_check. - Some cleanup. * tag 'imx-drm-next-2017-03-17' of git://git.pengutronix.de/git/pza/linux: (22 commits) drm/imx: Remove unneeded definition for structure imx_drm_component drm/imx: use PRG/PRE when possible drm/imx: enable/disable PRG on CRTC enable/disable gpu: ipu-v3: only set non-zero AXI ID for IC when PRG is absent gpu: ipu-v3: hook up PRG unit gpu: ipu-v3: document valid IPUv3 compatibles and extend for i.MX6 QuadPlus gpu: ipu-v3: add driver for Prefetch Resolve Gasket gpu: ipu-v3: add DT binding for the Prefetch Resolve Gasket gpu: ipu-v3: add driver for Prefetch Resolve Engine gpu: ipu-v3: add DT binding for the Prefetch Resolve Engine drm/imx: ipuv3-plane: add support for separate alpha planes drm/imx: extend drm_plane_state_to_eba for separate channel support gpu: ipu-v3: add support for separate alpha channels drm: add RGB formats with separate alpha plane drm/imx: add deferred plane disabling drm/imx: don't wait for vblank and stop calling cleanup_planes in commit_tail gpu: ipu-v3: add unsynchronised DP channel disabling gpu: ipu-v3: remove IRQ dance on DC channel disable gpu: ipu-cpmem: add bayer formats to ipu_cpmem_set_image gpu: ipu-cpmem: set image base address even for incorrect formats ... commit 3f816bac24f0d3c139c740f22d6c945645ca9eed Author: sayli karnik Date: Sun Mar 19 03:04:24 2017 +0530 Documentation: device-mapper: cache.txt: Fix typos Fix a spelling error (hexidecimal->hexadecimal). Signed-off-by: sayli karnik Signed-off-by: Jonathan Corbet Documentation/device-mapper/cache.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b781c7e317fcf9f74475dc82bfce2e359dfca13 Author: Andy Lutomirski Date: Sat Mar 18 22:17:24 2017 -0700 x86/tls: Forcibly set the accessed bit in TLS segments For mysterious historical reasons, struct user_desc doesn't indicate whether segments are accessed. set_thread_area() has always programmed segments as non-accessed, so the first write will set the accessed bit. This will fault if the GDT is read-only. Fix it by making TLS segments start out accessed. If this ends up breaking something, we could, in principle, leave TLS segments non-accessed and fix them up when we get the page fault. I'd be surprised, though -- AFAIK all the nasty legacy segmented programs (DOSEMU, Wine, things that run on DOSEMU and Wine, etc.) do their nasty segmented things using the LDT and not the GDT. I assume this is mainly because old OSes (Linux and otherwise) didn't historically provide APIs to do nasty things in the GDT. Fixes: 45fc8757d1d2 ("x86: Make the GDT remapping read-only on 64-bit") Signed-off-by: Andy Lutomirski Cc: Linus Torvalds Cc: Borislav Petkov Cc: Thomas Garnier Link: http://lkml.kernel.org/r/62b7748542df0164af7e0a5231283b9b13858c45.1489900519.git.luto@kernel.org Signed-off-by: Thomas Gleixner arch/x86/kernel/tls.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit dba968c4fea0f9368e709966666d6e35dfe05e62 Author: Gargi Sharma Date: Fri Mar 17 13:29:30 2017 +0530 staging: iio: ad7280: Replace mlock with driver private lock The IIO subsystem is redefining iio_dev->mlock to be used by the IIO core only for protecting device operating mode changes. ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. In this driver, mlock was being used to protect hardware state changes. Replace it with a lock in the devices global data. Signed-off-by: Gargi Sharma Signed-off-by: Jonathan Cameron drivers/staging/iio/adc/ad7280a.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 2b7cb7bed6e209a1b1560fe288087f84614cc793 Author: Miguel Robles Date: Thu Mar 16 15:28:29 2017 +0100 Staging: iio: resolver: ad2s1210: Fix warning, statements should start on a tabstop Fix checkpatch warning: Statements should start on a tabstop. Signed-off-by: Miguel Robles Signed-off-by: Jonathan Cameron drivers/staging/iio/resolver/ad2s1210.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1aca20261083ab5d0a94fff8caec34f7370eb195 Author: Miguel Robles Date: Thu Mar 16 14:02:19 2017 +0100 Staging: iio: cdc: ad7746: use octal permissions instead of symbolic Fix checkpatch warnings: Symbolic permissions 'S_IWUSR' are not preferred. Signed-off-by: Miguel Robles Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7746.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ae81abcb6a490aff04091aed59baf1c290cc657e Author: Narcisa Ana Maria Vasile Date: Wed Mar 15 19:00:14 2017 +0200 staging: iio: adis16209: Remove mutex_lock() and mutex_unlock() calls The function adis16209_read_raw() is safe to be run in parallel. The call to adis_read_reg_16() is safe since adis_read_reg() uses the txrx_lock from struct adis to protect simultaneous changes. Remove mutex.h inclusion since it is no longer needed. Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16209.c | 4 ---- 1 file changed, 4 deletions(-) commit 91b4b166175066349f01ce67e091355f8f27e4a7 Author: Javier Martinez Canillas Date: Wed Mar 15 01:45:05 2017 -0300 iio: gyro: itg3200: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/gyro/itg3200_core.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f1c088a7696873337ae390739d06165c8b81e6e0 Author: Javier Martinez Canillas Date: Wed Mar 15 01:45:04 2017 -0300 iio: accel: mma7660: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/accel/mma7660.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 77496c078c274e36fc96aad15fb1be615119a742 Author: Javier Martinez Canillas Date: Wed Mar 15 01:45:03 2017 -0300 iio: pressure: mpl3115: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/pressure/mpl3115.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f414bb19b79ec9ca1d4bd19a7964b1471146b341 Author: Javier Martinez Canillas Date: Wed Mar 15 01:45:02 2017 -0300 iio: accel: mma7455_i2c: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/accel/mma7455_i2c.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ee9a90735b44ee35521ebdb8f898335a8fe86427 Author: Javier Martinez Canillas Date: Wed Mar 15 01:45:01 2017 -0300 iio: magnetometer: mag3110: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/mag3110.c | 7 +++++++ 1 file changed, 7 insertions(+) commit c172d22d33de5edc26440def1ed7c2c1a1ec724c Author: Javier Martinez Canillas Date: Wed Mar 15 01:45:00 2017 -0300 iio: adc: ti-ads1015: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/adc/ti-ads1015.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 7373340367d8546910128ac301bd2c0d47e71e85 Author: Javier Martinez Canillas Date: Wed Mar 15 01:44:59 2017 -0300 iio: dac: max5821: Set .of_match_table to OF device ID table The driver has a OF device ID table but the struct i2c_driver .of_match_table field is not set. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/dac/max5821.c | 1 + 1 file changed, 1 insertion(+) commit ae4e825b88666f27dcee8a85a7a0222c9d4dcd14 Author: Javier Martinez Canillas Date: Wed Mar 15 01:44:58 2017 -0300 iio: light: apds9960: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/light/apds9960.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 16f1b4f0bac46b0b94db4d31ba45fd17d1e8123e Author: Javier Martinez Canillas Date: Wed Mar 15 01:44:57 2017 -0300 iio: accel: bma180: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/accel/bma180.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 34591a162fa053896e491e3b5f0c8192259fa4f9 Author: Javier Martinez Canillas Date: Wed Mar 15 01:44:56 2017 -0300 iio: imu: inv_mpu6050: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 38 +++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) commit 72fc0270a9ab2c1ca08ebbe5c2730eef0adcd9d6 Author: Javier Martinez Canillas Date: Wed Mar 15 01:44:55 2017 -0300 iio: pressure: hp03: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/pressure/hp03.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 9d3922b236501f42fd6325a91b5c7d3e7a0360ca Author: Javier Martinez Canillas Date: Wed Mar 15 01:44:54 2017 -0300 iio: light: tsl2563: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/light/tsl2563.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 152abf3770f3da14f321a191c29570ac92dd941a Author: Javier Martinez Canillas Date: Wed Mar 15 01:44:53 2017 -0300 iio: light: us5182d: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/light/us5182d.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8414af1ed18867b7d7c52fb52a427b4d5ac8a90c Author: Javier Martinez Canillas Date: Wed Mar 15 01:44:52 2017 -0300 iio: dac: mcp4725: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/dac/mcp4725.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 49926b121674ed3e80e1a655ffd64ccf0e566efa Author: Javier Martinez Canillas Date: Wed Mar 15 01:44:51 2017 -0300 iio: magnetometer: bmc150_magn_i2c: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/bmc150_magn_i2c.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 58623b33770351db42f3ee2d46b68f098aa64bad Author: Javier Martinez Canillas Date: Wed Mar 15 01:44:50 2017 -0300 iio: mlx96014: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Tested-by: Crt Mori Acked-by: Crt Mori Signed-off-by: Jonathan Cameron drivers/iio/temperature/mlx90614.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 62aaca0de935221eafe0dfa728d289b588bd768f Author: Javier Martinez Canillas Date: Wed Mar 15 01:44:49 2017 -0300 iio: adc: ina2xx: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jonathan Cameron drivers/iio/adc/ina2xx-adc.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit 7fa6790c22350442073610ebbb036e2951c99c0e Author: Miguel Robles Date: Fri Mar 17 00:35:45 2017 +0100 iio: accel: Prefer unsigned int to bare use of unsigned Fix checkpatch warnings: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Miguel Robles Signed-off-by: Jonathan Cameron drivers/iio/accel/bma180.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 099c4cef24a6cb77e2c03e9e66199d460ed4a5a1 Author: Aishwarya Pant Date: Sat Mar 18 03:13:56 2017 +0530 staging: iio: accel: adis16201: remove iio_dev mlock In the driver adis16201 read raw does not require an iio_dev->mlock for reads. It can run concurrently as adis_read_reg_16() is protected by a transaction lock. Signed-off-by: Aishwarya Pant Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16201.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 1953d4ad9703cee288ef3eb11d964c627dddc5d6 Author: Linus Walleij Date: Mon Jan 30 20:13:34 2017 +0100 ARM: gemini: select gemini poweroff It's especially annoying if the system cannot be properly powered down so select the poweroff driver from the Kconfig. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij arch/arm/mach-gemini/Kconfig | 1 + 1 file changed, 1 insertion(+) commit e9f2c2aeb5bb354e6df3c9b3dfe051b0d7d7b22c Author: Linus Walleij Date: Mon Jan 30 20:21:49 2017 +0100 ARM: dts: add power controller to the Gemini DTS This adds the Gemini power controller to the SoC DTSI file. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij arch/arm/boot/dts/gemini.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit ec73ab6b4d2acb8f5fd9344e9491c62973904a7e Author: Steve Lin Date: Wed Feb 22 16:22:23 2017 -0500 ARM: dts: NSP: Add crypto (SPU) to dtsi Adds crypto hardware (SPU) to Northstar Plus device tree file. Signed-off-by: Steve Lin Acked-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-nsp.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 17d517172300a8e56349f97700b3dafb95a566da Author: Steve Lin Date: Thu Feb 23 09:49:51 2017 -0500 ARM: dts: NSP: Add mailbox (PDC) to NSP Adds mailbox / PDC to NSP device tree. Needs new compatibility string to differentiate from NS2 version. Signed-off-by: Steve Lin Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-nsp.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit a7996761d1dacbac10c892c16faa90dfe46affcd Author: Steve Lin Date: Wed Mar 15 16:59:35 2017 -0400 ARM: dts: BCM953012HR: Add ethernet aliases Adding ethernet aliases. These are used, for example, by bootloaders, to modify the MAC addresses in the device tree. Signed-off-by: Steve Lin Acked-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm953012hr.dts | 3 +++ 1 file changed, 3 insertions(+) commit d6661da842bbeec2082b7263c9e682792e7951a9 Author: Rafał Miłecki Date: Tue Mar 14 11:39:41 2017 +0100 ARM: dts: BCM5301X: Add support for TP-LINK Archer C5 V2 This is BCM47081A0 based home router with BCM43217 and BCM4352 wireless chipsets. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts | 98 ++++++++++++++++++++++ 2 files changed, 99 insertions(+) commit 6822d7729ea60ebd49f126db1007d42cc1ad63d8 Author: Jon Mason Date: Tue Mar 7 18:34:55 2017 -0500 ARM: dts: NSP: disable i2c DT entry by default The i2c device tree entry should be disabled by default to match the current convention in other device tree files. Similarily, enable it on the XMC board, where it is being used. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-nsp.dtsi | 1 + arch/arm/boot/dts/bcm958525xmc.dts | 2 ++ 2 files changed, 3 insertions(+) commit 1d8ece6639e1ebe008a8b53dcc04366cae7ac2d2 Author: Jon Mason Date: Tue Mar 7 18:34:04 2017 -0500 ARM: dts: NSP: Add EHCI/OHCI USB nodes to device tree Add the EHCI and OHCI entries to the Northstar Plus device tree files. Signed-off-by: Yendapally Reddy Dhananjaya Reddy Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-nsp.dtsi | 14 ++++++++++++++ arch/arm/boot/dts/bcm958522er.dts | 10 +++++++++- arch/arm/boot/dts/bcm958525er.dts | 10 +++++++++- arch/arm/boot/dts/bcm958525xmc.dts | 8 ++++++++ arch/arm/boot/dts/bcm958622hr.dts | 10 +++++++++- arch/arm/boot/dts/bcm958623hr.dts | 10 +++++++++- arch/arm/boot/dts/bcm958625hr.dts | 8 ++++++++ arch/arm/boot/dts/bcm958625k.dts | 8 ++++++++ arch/arm/boot/dts/bcm988312hr.dts | 10 +++++++++- 9 files changed, 83 insertions(+), 5 deletions(-) commit bb097e3e00457bd69ad3a767f6b99424e2e06411 Author: Jon Mason Date: Mon Mar 6 11:24:45 2017 -0500 ARM: dts: BCM5301X: Add I2C support to the DT Add I2C support to the bcm5301x Device Tree. Since no driver changes are needed to enable this hardware, only the device tree changes are required to make this functional. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm5301x.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f22c635e585471d01a38b829c0753c1467b5058e Author: Jon Mason Date: Mon Mar 6 11:24:44 2017 -0500 ARM: dts: BCM5301X: Add TWD WD Support to DT Add support for the ARM TWD Watchdog to the bcm5301x device tree. The ARM TWD timer allocated the register space for the WDT, so this patch necessitated shrinking that. Also, the GIC masks were added for these. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm5301x.dtsi | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 0e34079cd1f674449749aafe4be07336177de90d Author: Jon Mason Date: Thu Mar 2 19:21:32 2017 -0500 ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags GIC_PPI flags were misconfigured for the timers, resulting in errors like: [ 0.000000] GIC: PPI11 is secure or misconfigured Changing them to being edge triggered corrects the issue Suggested-by: Rafał Miłecki Signed-off-by: Jon Mason Fixes: d27509f1 ("ARM: BCM5301X: add dts files for BCM4708 SoC") Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm5301x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2e2c8d227ac9bc31a7df7401a6508dd73c25a2b6 Author: Varsha Rao Date: Tue Mar 14 21:53:18 2017 +0530 staging: iio: adis16240: Remove mutex_lock() and mutex_unlock() function call. Remove mutex_lock() and mutex_unlock() function calls, as the adis16240_spi_read_signed() function can be run parallel and safely multiple times. Also remove the mutex.h header file and comment, which are no longer required. As indio_dev is declared and initialized in adis16240_spi_read_signed(), again declaration to same type and initialization to same value is not required, remove it from adis16240_read_12bit_signed(). Simplify the return logic, by merging assignment and return into a single line. Signed-off-by: Varsha Rao Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16240.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit 5204bf17031b69fa5faa4dc80a9dc1e2446d74f9 Author: Yazen Ghannam Date: Wed Mar 15 12:30:55 2017 -0500 x86/mce: Init some CPU features early When the MCA banks in __mcheck_cpu_init_generic() are polled for leftover errors logged during boot or from the previous boot, its required to have CPU features detected sufficiently so that the reading out and handling of those early errors is done correctly. If those features are not available, the decoding may miss some information and get incomplete errors logged. For example, on SMCA systems the MCA_IPID and MCA_SYND registers are not logged and MCA_ADDR is not masked appropriately. To cure that, do a subset of the basic feature detection early while the rest happens in its usual place in __mcheck_cpu_init_vendor(). Signed-off-by: Yazen Ghannam Cc: Tony Luck Cc: linux-edac Cc: x86-ml Link: http://lkml.kernel.org/r/1489599055-20756-1-git-send-email-Yazen.Ghannam@amd.com [ Massage commit message and simplify. ] Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/mcheck/mce.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit cf8178f78645148dc38b28263b9d3f604148e3a8 Author: Colin Ian King Date: Wed Mar 15 17:10:10 2017 +0000 x86/microcode/AMD: Remove redundant NULL check on mc mc is a pointer to the static u8 array amd_ucode_patch and therefore can never be null, so the check is redundant. Remove it. Detected by CoverityScan, CID#1372871 ("Logically Dead Code") Signed-off-by: Colin Ian King Cc: kernel-janitors@vger.kernel.org Cc: x86-ml Link: http://lkml.kernel.org/r/20170315171010.17536-1-colin.king@canonical.com Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/microcode/amd.c | 2 -- 1 file changed, 2 deletions(-) commit 2947ba054a4dabbd82848728d765346886050029 Author: Kirill A. Shutemov Date: Fri Mar 17 00:39:06 2017 +0300 x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation This patch provides all required callbacks required by the generic get_user_pages_fast() code and switches x86 over - and removes the platform specific implementation. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Aneesh Kumar K . V Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dann Frazier Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Steve Capper Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170316213906.89528-1-kirill.shutemov@linux.intel.com [ Minor readability edits. ] Signed-off-by: Ingo Molnar arch/arm/Kconfig | 2 +- arch/arm64/Kconfig | 2 +- arch/powerpc/Kconfig | 2 +- arch/x86/Kconfig | 3 + arch/x86/include/asm/mmu_context.h | 12 - arch/x86/include/asm/pgtable-3level.h | 47 ++++ arch/x86/include/asm/pgtable.h | 53 ++++ arch/x86/include/asm/pgtable_64.h | 16 +- arch/x86/mm/Makefile | 2 +- arch/x86/mm/gup.c | 496 ---------------------------------- mm/Kconfig | 2 +- mm/gup.c | 10 +- 12 files changed, 128 insertions(+), 519 deletions(-) commit 73e10a61817dfc97fe7418bfad1f608e562d7348 Author: Kirill A. Shutemov Date: Thu Mar 16 18:26:54 2017 +0300 mm/gup: Provide callback to check if __GUP_fast() is allowed for the range This is a preparation patch for the transition of x86 to the generic GUP_fast() implementation. On x86, get_user_pages_fast() does a couple of sanity checks to see if we can call __get_user_pages_fast() for the range. This kind of wrapping protection should be useful for the generic code too. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Aneesh Kumar K . V Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dann Frazier Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Steve Capper Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170316152655.37789-7-kirill.shutemov@linux.intel.com [ Small readability edits. ] Signed-off-by: Ingo Molnar mm/gup.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit b59f65fa076a8eac2ff3a8ab7f8e1705b9fa86cb Author: Kirill A. Shutemov Date: Thu Mar 16 18:26:53 2017 +0300 mm/gup: Implement the dev_pagemap() logic in the generic get_user_pages_fast() function This is a preparation patch for the transition of x86 to the generic GUP_fast() implementation. Prepare generic GUP_fast() to handle dev_pagemap(). At the moment, it's only implemented on x86. On non-x86, the new code will be compiled out. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Aneesh Kumar K . V Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dan Williams Cc: Dann Frazier Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Steve Capper Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170316152655.37789-6-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar include/linux/mm.h | 4 +++ mm/gup.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 89 insertions(+), 2 deletions(-) commit e93480537fd7ecaf5ed1a662a979376f6fee50e3 Author: Kirill A. Shutemov Date: Thu Mar 16 18:26:52 2017 +0300 mm/gup: Mark all pages PageReferenced in generic get_user_pages_fast() This is a preparation patch for the transition of x86 to the generic GUP_fast() implementation. Unlike generic GUP_fast(), the x86 version makes all pages it touches referenced. It seems required for GRU and EPT. See the following commit: 8ee53820edfd ("thp: mmu_notifier_test_young") Signed-off-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Andrew Morton Cc: Aneesh Kumar K . V Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dann Frazier Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Steve Capper Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170316152655.37789-5-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar mm/gup.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0005d20b2ff1e501e186b3b3bc587085ac305fdc Author: Kirill A. Shutemov Date: Thu Mar 16 18:26:51 2017 +0300 mm/gup: Move page table entry dereference into helper function This is a preparation patch for the transition of x86 to the generic GUP_fast() implementation. On x86 PAE, page table entry is larger than sizeof(long) and we would need to provide a helper that can read the entry atomically. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Aneesh Kumar K . V Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dann Frazier Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Steve Capper Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170316152655.37789-4-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar mm/gup.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit e7884f8ead4a301b04687a3238527b06feef8ea0 Author: Kirill A. Shutemov Date: Thu Mar 16 18:26:50 2017 +0300 mm/gup: Move permission checks into helpers This is a preparation patch for the transition of x86 to the generic GUP_fast() implementation. On x86, we would need to do additional permission checks to determine if access is allowed. Let's abstract it out into separate helpers. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Aneesh Kumar K . V Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dann Frazier Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Steve Capper Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170316152655.37789-3-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar include/asm-generic/pgtable.h | 25 +++++++++++++++++++++++++ mm/gup.c | 15 ++++++++++----- 2 files changed, 35 insertions(+), 5 deletions(-) commit 9a804fecee232e71b47ac37d62fd3d5d66b08b91 Author: Kirill A. Shutemov Date: Thu Mar 16 18:26:49 2017 +0300 mm/gup: Drop the arch_pte_access_permitted() MMU callback The only arch that defines it to something meaningful is x86. But x86 doesn't use the generic GUP_fast() implementation -- the only place where the callback is called. Let's drop it. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Aneesh Kumar K . V Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dann Frazier Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Steve Capper Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170316152655.37789-2-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/powerpc/include/asm/mmu_context.h | 6 ------ arch/s390/include/asm/mmu_context.h | 6 ------ arch/um/include/asm/mmu_context.h | 6 ------ arch/unicore32/include/asm/mmu_context.h | 6 ------ arch/x86/include/asm/mmu_context.h | 4 ---- include/asm-generic/mm_hooks.h | 6 ------ mm/gup.c | 3 --- 7 files changed, 37 deletions(-) commit f991376e444aee8f5643a45703c1433bf7948940 Author: Thomas Garnier Date: Fri Mar 17 10:50:34 2017 -0700 x86/mm: Correct fixmap header usage on adaptable MODULES_END This patch removes fixmap header usage on non-x86 code that was introduced by the adaptable MODULE_END change. Signed-off-by: Thomas Garnier Cc: Andrew Morton Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170317175034.4701-1-thgarnie@google.com Signed-off-by: Ingo Molnar arch/x86/include/asm/pgtable_64.h | 1 + arch/x86/kernel/module.c | 1 - arch/x86/mm/dump_pagetables.c | 1 - arch/x86/mm/kasan_init_64.c | 1 - mm/vmalloc.c | 4 ---- 5 files changed, 1 insertion(+), 7 deletions(-) commit a7f909405bf9bd3a737a39d3a433a4eae4d7eb21 Author: Philippe Reynes Date: Sat Feb 4 22:05:06 2017 +0100 i40e: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 264 ++++++++++++++----------- 1 file changed, 153 insertions(+), 111 deletions(-) commit 7f31a955a0c34de0463f7ff50b2bd62a5cce4204 Author: Gerd Hoffmann Date: Wed Mar 8 10:19:05 2017 +0100 ARM: dts: bcm2835: add sdhost controller to devicetree Signed-off-by: Gerd Hoffmann Acked-by: Eric Anholt Acked-by: Stefan Wahren arch/arm/boot/dts/bcm2835-rpi.dtsi | 6 ++++++ arch/arm/boot/dts/bcm283x.dtsi | 10 ++++++++++ 2 files changed, 16 insertions(+) commit fef5f569db06ea80ae3a864b1ba4bda6e359311d Author: Joe Perches Date: Fri Mar 17 17:15:38 2017 -0700 Input: convert remaining uses of pr_warning to pr_warn To enable eventual removal of pr_warning This makes pr_warn use consistent for drivers/input Prior to this patch, there were 8 uses of pr_warning and 17 uses of pr_warn in drivers/input Signed-off-by: Joe Perches Signed-off-by: Dmitry Torokhov drivers/input/gameport/gameport.c | 4 ++-- drivers/input/joystick/gamecon.c | 3 ++- drivers/input/misc/apanel.c | 3 ++- drivers/input/misc/xen-kbdfront.c | 8 ++++---- drivers/input/serio/serio.c | 8 ++++---- 5 files changed, 14 insertions(+), 12 deletions(-) commit 3c9d36192802d60fca73c85c7096221371c36be7 Author: Gerd Hoffmann Date: Wed Mar 8 10:19:09 2017 +0100 arm64: set CONFIG_MMC_BCM2835=y in defconfig We need to enable this controller so that we can switch the SD card's pinmux over to it by default, which will improve storage performance. Read access (dd with 64k blocks on rpi2): CONFIG_MMC_SDHCI_IPROC: 11-12 MB/s CONFIG_MMC_BCM2835: 19-20 MB/s Differences on write access are pretty much in the noise. Signed-off-by: Gerd Hoffmann Reviewed-by: Eric Anholt arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 51a08de0fd3d1d25d28f99ef992cb429cced56a5 Author: Gerd Hoffmann Date: Wed Mar 8 10:19:07 2017 +0100 arm: set CONFIG_MMC_BCM2835=y in bcm2835_defconfig and multi_v7_defconfig We need to enable this controller so that we can switch the SD card's pinmux over to it by default, which will improve storage performance. Read access (dd with 64k blocks on rpi2): CONFIG_MMC_SDHCI_IPROC: 11-12 MB/s CONFIG_MMC_BCM2835: 19-20 MB/s Differences on write access are pretty much in the noise. Signed-off-by: Gerd Hoffmann Reviewed-by: Eric Anholt arch/arm/configs/bcm2835_defconfig | 1 + arch/arm/configs/multi_v7_defconfig | 1 + 2 files changed, 2 insertions(+) commit 7b34734816d5170f40329598390de22d0166e4e9 Author: Colin Ian King Date: Thu Mar 16 18:54:18 2017 +0000 drm: vc4: remove redundant check of plane being non-null The pointer plane is always null on the error path at label 'fail' hence the check if it is non-null is redundant. We can therefore remove the check and the destruction of plane as well as the fail error path and instead just return an -ENOMEM ERR_PTR. Detected by CoverityScan, CID#1339532 ("Logically Dead Code") Signed-off-by: Colin Ian King Reviewed-by: Eric Anholt Link: http://patchwork.freedesktop.org/patch/msgid/20170316185418.32765-1-colin.king@canonical.com drivers/gpu/drm/vc4/vc4_plane.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit cc2e6da1b5a8986dc2831d5b63f4d0a15704e4f1 Author: Philipp Zabel Date: Fri Mar 17 18:00:59 2017 +0100 drm/vc4: use platform_register_drivers Use platform_register_drivers instead of open coding the iteration over component platform drivers in the vc4_drv module. Signed-off-by: Philipp Zabel Reviewed-by: Eric Anholt Link: http://patchwork.freedesktop.org/patch/msgid/20170317170059.17821-1-p.zabel@pengutronix.de drivers/gpu/drm/vc4/vc4_drv.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit be062fa42738822b8b91351752ff89275e25b516 Author: Chris Wilson Date: Fri Mar 17 19:46:48 2017 +0000 drm/i915: Initialise i915_gem_object_create_from_data() directly Use pagecache_write to avoid shmemfs clearing the pages prior to us immediately overwriting them with our data. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170317194648.12468-2-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/i915_gem.c | 45 ++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 16 deletions(-) commit f3ddd2c14fdc08798a7fa2d32b39786585162f50 Author: Chris Wilson Date: Fri Mar 17 20:53:17 2017 +0000 drm/i915: Correct error handling for i915_gem_object_create_from_data() i915_gem_object_create_from_data() always returns an error pointer on failure, there is no need to check against NULL. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170317205317.7885-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/intel_uc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ce8ff099c47be277e56461b91270a4926954dc98 Author: Chris Wilson Date: Fri Mar 17 19:46:47 2017 +0000 drm/i915: i915_gem_object_create_from_data() doesn't require struct_mutex Both object creation and backing storage page allocation do not require struct_mutex, so do not require the caller to take it. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170317194648.12468-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/i915_gem.c | 4 +--- drivers/gpu/drm/i915/intel_uc.c | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) commit 1234e8398fe03267bf2e353e36825dbd0abc2fc6 Author: Frode Isaksen Date: Fri Mar 17 16:41:10 2017 +0100 spi: davinci: add comment about dummy tx buffer usage Add explanation about using the the rx buffer as the dummy tx buffer. Signed-off-by: Frode Isaksen Signed-off-by: Mark Brown drivers/spi/spi-davinci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8687113e1515f4c9104a6eaedc384ec762c6550f Author: Akinobu Mita Date: Sat Mar 18 03:17:31 2017 +0900 spi: loopback-test: add test spi_message with delay after transfers This adds a new test to check whether the spi_transfer.delay_usecs setting has properly taken effect. Signed-off-by: Akinobu Mita Signed-off-by: Mark Brown drivers/spi/spi-loopback-test.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit ea9936f32435699907807aaac87f993482208578 Author: Akinobu Mita Date: Sat Mar 18 03:17:30 2017 +0900 spi: loopback-test: add elapsed time check This adds checks whether the elapsed time is longer than the minimam estimated time. The estimated time is calculated with the total transfer length per clock rate and optional spi_transfer.delay_usecs. Signed-off-by: Akinobu Mita Signed-off-by: Mark Brown drivers/spi/spi-loopback-test.c | 38 ++++++++++++++++++++++++++++++++++++++ drivers/spi/spi-test.h | 2 ++ 2 files changed, 40 insertions(+) commit 0bd7fda56b94002d9985040c02bb701956fa657e Author: Akinobu Mita Date: Sat Mar 18 03:17:29 2017 +0900 spi: loopback-test: test zero-length transfer In order to test various spi_messages including zero-length transfer, this adds zero length into the iterate_len list. Signed-off-by: Akinobu Mita Signed-off-by: Mark Brown drivers/spi/spi-test.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8916671e93a38c509e2ffb02c2ce3f37efe8af40 Author: Akinobu Mita Date: Sat Mar 18 03:17:28 2017 +0900 spi: loopback-test: add ability to test zero-length transfer The spi-loopback-test module currently cannot test the spi_message including a zero-length transfer. Because the zero-length transfer is treated as a special value in several meanings. 1. The number of spi_transfer to execute in one test case is described by spi_test.transfer_count. It is normally computed by counting number of transfers with len > 0 in spi_test.transfers array. This change stops the detection for the number of spi_transfer. Each spi_test.transfer_count needs to be filled by hand now. 2. The spi_test.iterate_len is a list of transfer length to iterate on. This list is terminated by zero, so zero-length transfer cannot be included. This changes the terminal value from 0 to -1. 3. The length for the spi_transfer masked by spi_test.iterate_transfer_mask is iterated. Before starting the iteration, the default value which is statically initialized is applied. In order to specify the default value, zero-length is reserved. Currently, the default values are always '1'. So this removes this trick and add '1' to iterate_len list. By applying all these changes, the spi-loopback-test can execute spi messages with zero-length transfer. Signed-off-by: Akinobu Mita Signed-off-by: Mark Brown drivers/spi/spi-loopback-test.c | 55 +++++++++++++---------------------------- drivers/spi/spi-test.h | 19 +++++++------- 2 files changed, 26 insertions(+), 48 deletions(-) commit 8494801db1fc21867f587dae465236100bf228cc Author: Akinobu Mita Date: Sat Mar 18 03:17:27 2017 +0900 spi: loopback-test: don't skip comparing the first byte of rx_buf When the loopback parameter is set, rx_buf are compared with tx_buf after the spi_message is executed. But the first byte of buffer is not checked. Signed-off-by: Akinobu Mita Signed-off-by: Mark Brown drivers/spi/spi-loopback-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4e121aeb754f1ac5f2bcc791aa4177dcfb3b401 Author: Akinobu Mita Date: Sat Mar 18 03:17:26 2017 +0900 spi: loopback-test: correct mismatched test description and configuration The test "two tx-transfers - alter first" actually alters the second not the first transfer. Similarly the test "two tx-transfers - alter second" actually alters the first not the second transfer. The mismatches for the two symmetrical tests cancel each other's mistakes. But it's better to fix the mismatches to avoid confusion. Signed-off-by: Akinobu Mita Signed-off-by: Mark Brown drivers/spi/spi-loopback-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5d3d0ad688eacf9567d7d67a5eec3c436cc1064c Author: Charles Keepax Date: Fri Mar 17 15:44:55 2017 +0000 ASoC: cs35l35: Stash dev pointer directly rather than CODEC pointer The driver stashes a CODEC pointer in the cs35l35_private structure, which is used to obtain a struct device pointer for error messages in the interrupt handler. However, doing so is not very safe as the interrupt is registered, as it should be in bus probe, but the CODEC pointer can't be safely stored until the ASoC level probe. This leaves a window between the two probes where if any interrupts are received a NULL pointer will be deferenced in the IRQ handler. Fix this issue by saving a pointer to the device directly and passing that to the error messages in the interrupt handler rather than using the CODEC pointer to access the device pointer. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/cs35l35.c | 29 ++++++++++++++--------------- sound/soc/codecs/cs35l35.h | 2 +- 2 files changed, 15 insertions(+), 16 deletions(-) commit 4c3362f44980aba8e1e69cd6970effbd9f17dc69 Author: Hans de Goede Date: Fri Mar 17 14:03:54 2017 -0700 Input: soc_button_array - add support for ACPI 6.0 Generic Button Device Windows 10 tablets with gpio buttons will typically use the ACPI 6.0 Generic Button Device with a HID of ACPI0011 for these buttons. The ACPI description for these in the ACPI0011 devices _DSD object uses something resembling HID descriptors, except that instead of indicating a bit index into a HID input report, the index indicates the _CRS index for the GPIO. The use of 1 interrupt per button, some of which need to be wakeup sources, instead of using input reports makes it impossible to use the HID subsystem for this. This really is just another gpio-keys input device with the platform data described in ACPI, so this commit adds parsing for this new way to describe gpio-keys to the soc_button_array driver. Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/misc/soc_button_array.c | 159 +++++++++++++++++++++++++++++++++- 1 file changed, 158 insertions(+), 1 deletion(-) commit 7283b47d5d4d8e6528a08dc6c7ac6ff7cfed66d9 Author: Hans de Goede Date: Fri Mar 17 14:03:28 2017 -0700 Input: soc_button_array - get rid of MAX_NBUTTONS Count how much gpio_keys we actually need, this is a preparation patch for adding support for the new Win10 / ACPI-6.0 "Generic Buttons Device" support. Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/misc/soc_button_array.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 3a1eb6d10c9350fa7adce850a752693460ac62d6 Author: Alexander Duyck Date: Wed Feb 15 09:15:59 2017 -0800 igb/ixgbe: Fix typo in igb_build_skb and/or ixgbe_build_skb code comment There was a typo that I had left in the code comments for the igb and ixgbe functions that enabled build_skb support. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 01aa1a5c468b6407d2f5b1d76e27b436b2d3d45f Author: Ladislav Michl Date: Fri Mar 17 12:12:00 2017 -0700 ARM: dts: omap3-igep: OneNAND support Add OneNAND node for IGEP and leave it disabled by default. It is up to bootloader to enable proper node. Timing just works, but values are copied over from N900 as I was unable to find chip datasheet. Signed-off-by: Ladislav Michl Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-igep.dtsi | 52 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit a5e743c4ba9cb4a2ded420da9b53b772f7c61b6a Author: Yegor Yefremov Date: Fri Mar 17 12:11:55 2017 -0700 ARM: dts: AM35x: Add hecc node HECC node description for am35x SOCs Signed-off-by: Anton Glukhov Signed-off-by: Yegor Yefremov Signed-off-by: Tony Lindgren arch/arm/boot/dts/am3517.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b1bb2eb0a0deb03e9847d8e29eb1e75ce141e4d9 Author: Alexander Duyck Date: Mon Feb 6 18:27:36 2017 -0800 igb: Re-add support for build_skb in igb This reverts commit f9d40f6a9921 ("igb: Revert support for build_skb in igb") and adds a few changes to update it to work with the latest version of igb. We are now able to revert the removal of this due to the fact that with the recent changes to the page count and the use of DMA_ATTR_SKIP_CPU_SYNC we can make the pages writable so we should not be invalidating the additional data added when we call build_skb. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 47 +++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit e014272672b964471608a2624e4cdf1d5e7c22ea Author: Alexander Duyck Date: Mon Feb 6 18:27:26 2017 -0800 igb: Break out Rx buffer page management At this point we have 2 to 3 paths that can be taken depending on what Rx modes are enabled. In order to better support that and improve the maintainability I am breaking out the common bits from those paths and making them into their own functions. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 235 +++++++++++++++--------------- 1 file changed, 121 insertions(+), 114 deletions(-) commit e3cdf68d4a861d91ef62ed615483e673f07fccfe Author: Alexander Duyck Date: Mon Feb 6 18:27:14 2017 -0800 igb: Add support for padding packet With the size of the frame limited we can now write to an offset within the buffer instead of having to write at the very start of the buffer. The advantage to this is that it allows us to leave padding room for things like supporting XDP in the future. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb.h | 11 +++++++++++ drivers/net/ethernet/intel/igb/igb_main.c | 14 ++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) commit 8649aaef4044681257ed38cf8706aea88430f2c4 Author: Alexander Duyck Date: Mon Feb 6 18:27:03 2017 -0800 igb: Add support for using order 1 pages to receive large frames This patch adds support for using 3K buffers in order 1 pages the same way we were using 2K buffers in 4K pages. We are reserving 1K of room for now to have space available for future headroom and tailroom when we enable build_skb support. One side effect of this patch is that we can end up using a larger buffer if jumbo frames is enabled. The impact shouldn't be too great, but it could hurt small packet performance for UDP workloads if jumbo frames is enabled as the truesize of frames will be larger. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb.h | 30 ++++++++++++++- drivers/net/ethernet/intel/igb/igb_main.c | 64 +++++++++++++++++++++++-------- 2 files changed, 76 insertions(+), 18 deletions(-) commit e08912985b296b33b18a563cc126e3e2f018c2e1 Author: Alexander Duyck Date: Mon Feb 6 18:26:52 2017 -0800 igb: Add support for ethtool private flag to allow use of legacy Rx Since there are potential drawbacks to the new Rx allocation approach I thought it best to add a "chicken bit" so that we can turn the feature off if in the event that a problem is found. It also provides a means of validating the legacy Rx path in the event that we are forced to fall back. At some point in the future when we are convinced we don't need it anymore we might be able to drop the legacy-rx flag. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb.h | 1 + drivers/net/ethernet/intel/igb/igb_ethtool.c | 48 ++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) commit 3456fd53421e7f499395542d6c2e76e0b46ab4d3 Author: Alexander Duyck Date: Mon Feb 6 18:26:40 2017 -0800 igb: Use page_address offset from page instead of masking virtual address Update the handling of page addresses so that we always refer to them using a void pointer, and try to use the consistent name of va indicating we are working with a virtual address. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb.h | 2 +- drivers/net/ethernet/intel/igb/igb_main.c | 11 +++++------ drivers/net/ethernet/intel/igb/igb_ptp.c | 3 +-- 3 files changed, 7 insertions(+), 9 deletions(-) commit cb0ef1d1dc8739e307f70493b7eb1184685dbbde Author: Alexander Duyck Date: Mon Feb 6 18:26:26 2017 -0800 igb: Only sync size of expected frame in ethtool testing We only need to sync the size of the frame that is read to test. We don't need to sync the entire Rx buffer. This way the testing is more consistent with how we handle things in the receive path. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cfbc871c2174f352542053d25659920d6841ed41 Author: Alexander Duyck Date: Mon Feb 6 18:26:15 2017 -0800 igb: Limit maximum frame Rx based on MTU In order to support the use of build_skb going forward it will be necessary to place a maximum limit on the amount of data we can receive when jumbo frames is not enabled. In order to do this I am adding a new upper limit for receive based on the size of a 2K buffer minus padding. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb.h | 10 +++++++++- drivers/net/ethernet/intel/igb/igb_main.c | 21 +++++++++++++++++---- 2 files changed, 26 insertions(+), 5 deletions(-) commit 7cc6fd4c60f267e17b0baef1580d7a6258c0a6f0 Author: Alexander Duyck Date: Mon Feb 6 18:26:02 2017 -0800 igb: Don't bother clearing Tx buffer_info in igb_clean_tx_ring In the case of the Tx rings we need to only clear the Tx buffer_info when we are resetting the rings. Ideally we do this when we configure the ring to bring it back up instead of when we are taking it down in order to avoid dirtying pages we don't need to. In addition we don't need to clear the Tx descriptor ring since we will fully repopulate it when we begin transmitting frames and next_to_watch can be cleared to prevent the ring from being cleaned beyond that point instead of needing to touch anything in the Tx descriptor ring. Finally with these changes we can avoid having to reset the skb member of the Tx buffer_info structure in the cleanup path since the skb will always be associated with the first buffer which has next_to_watch set. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb.h | 1 - drivers/net/ethernet/intel/igb/igb_ethtool.c | 11 ++- drivers/net/ethernet/intel/igb/igb_main.c | 120 ++++++++++++++++----------- 3 files changed, 83 insertions(+), 49 deletions(-) commit d2bead576e67c34fe9ea174bb245254d0fe237b5 Author: Alexander Duyck Date: Mon Feb 6 18:25:50 2017 -0800 igb: Clear Rx buffer_info in configure instead of clean This change makes it so that instead of going through the entire ring on Rx cleanup we only go through the region that was designated to be cleaned up and stop when we reach the region where new allocations should start. In addition we can avoid having to perform a memset on the Rx buffer_info structures until we are about to start using the ring again. By deferring this we can avoid dirtying the cache any more than we have to which can help to improve the time needed to bring the interface down and then back up again in a reset or suspend/resume cycle. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 7ec0116c9131a8cd58dc456ae2bd5bc9976460d1 Author: Alexander Duyck Date: Mon Feb 6 18:25:41 2017 -0800 igb: Use length to determine if descriptor is done This change makes it so that we use the length of the packet instead of the DD status bit to determine if a new descriptor is ready to be processed. The obvious advantage is that it cuts down on reads as we don't really even need the DD bit if going from a 0 to a non-zero value on size is enough to inform us that the packet has been completed. In addition I have updated the code so that we only reset the Rx descriptor length for descriptor zero when resetting a ring instead of having to do a memset with 0 over the entire ring. By doing this we can save some time on initialization. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 +- drivers/net/ethernet/intel/igb/igb_main.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) commit 7bd175928280c3e5d741cb9948cffaa61b7cc7c6 Author: Alexander Duyck Date: Mon Feb 6 18:25:26 2017 -0800 igb: Add support for DMA_ATTR_WEAK_ORDERING Since we are already using DMA attributes in igb for Rx there is no reason why we can't also apply DMA_ATTR_WEAK_ORDERING which is needed on some platforms to improve performance. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb.h | 3 +++ drivers/net/ethernet/intel/igb/igb_main.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) commit d771495274c7ec73268d6c5f91a327d7a0f192bb Author: Tamara Diaconita Date: Fri Mar 17 20:14:08 2017 +0200 Documentation: md: md-cluster.txt: Fix typos Fix typos in md-cluster.txt file to make documentation clear. Signed-off-by: Tamara Diaconita Signed-off-by: Jonathan Corbet Documentation/md/md-cluster.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8035223cb0f452b8242b0dbd801b1c2394f78527 Author: Tamara Diaconita Date: Fri Mar 17 20:00:34 2017 +0200 Documentation: mmc: mmc-dev-attrs.txt: Fix typos Fix typos in mmc-dev-attrs.txt to make documentation clear. Signed-off-by: Tamara Diaconita Signed-off-by: Jonathan Corbet Documentation/mmc/mmc-dev-attrs.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eb790aee176761f85a724abb1ea9b79ea00a77a4 Author: Tamara Diaconita Date: Fri Mar 17 19:29:48 2017 +0200 Documentaion: leds: leds-lp55xx.txt: Fix typos Fix spelling mistakes in leds-lp55xx.txt file to make documentation clear. Signed-off-by: Tamara Diaconita Signed-off-by: Jonathan Corbet Documentation/leds/leds-lp55xx.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce8cd407cc825d22858cf25c666aa12873d77419 Author: Tamara Diaconita Date: Thu Mar 16 17:42:16 2017 +0200 Documentation: vfio-mediated-device.txt: Fix typos Correct spelling mistakes in vfio-mediates-device.txt to make documentation clear. Signed-off-by: Tamara Diaconita Signed-off-by: Jonathan Corbet Documentation/vfio-mediated-device.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7bc41a655db9b9e7ba195b27f9070ec957a89816 Author: Tamara Diaconita Date: Thu Mar 16 17:39:46 2017 +0200 Documentation: sync_file.txt: Fix typos Fix spelling mistakes in sync_file.txt to make documentation clear. Signed-off-by: Tamara Diaconita Signed-off-by: Jonathan Corbet Documentation/sync_file.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f8998c226587fba2faa1f2dfff231b2b1af9a229 Author: Hans Holmberg Date: Thu Mar 16 09:37:32 2017 +0100 lib/Kconfig.debug: correct documentation paths A bunch of documentation files have moved, correct the paths. Signed-off-by: Hans Holmberg Signed-off-by: Jonathan Corbet lib/Kconfig.debug | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit f4baccdea5eb8deaf27dca6afd6ec86c29ca273c Author: Tamara Diaconita Date: Wed Mar 15 01:05:43 2017 +0200 Documentation: acpi: Fix typos Fix typos in acpi directory to make documentation grammatically correct. Signed-off-by: Tamara Diaconita Signed-off-by: Jonathan Corbet Documentation/acpi/aml-debugger.txt | 2 +- Documentation/acpi/enumeration.txt | 6 +++--- Documentation/acpi/linuxized-acpica.txt | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) commit d5b72a2123dfaf9416b1a1177b4be041f8a8b6d4 Author: Philipp Zabel Date: Fri Mar 17 17:34:49 2017 +0100 dma-fence: add dma_fence_match_context helper Add a helper to check if all fences in a fence array are from a given context. For convenience, the function can also handle being given a non-array fence. Signed-off-by: Philipp Zabel Reviewed-by: Gustavo Padovan Acked-by: Sumit Semwal Signed-off-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/1489768492-25190-1-git-send-email-p.zabel@pengutronix.de drivers/dma-buf/dma-fence-array.c | 26 ++++++++++++++++++++++++++ include/linux/dma-fence-array.h | 2 ++ 2 files changed, 28 insertions(+) commit f2ba3ee08eb9af666c6f948ccbb866ae6d3c9107 Author: Arnaldo Carvalho de Melo Date: Wed Mar 15 17:40:19 2017 -0300 tools headers: Sync {tools/,}arch/x86/include/asm/cpufeatures.h We use those in tools/arch/x86/lib/mem{cpy,set}_64.S, in turn used in the 'perf bench mem' benchmarks. The changes in the following csets are not relevant for this usecase, but lets sync it to silence the diff detector in the tools build system: 6fb895692a03 ("x86/cpufeature: Add 5-level paging detection") Link: http://lkml.kernel.org/n/tip-nsqxpyzcv4ywesikhhhrgfgc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/asm/cpufeatures.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 51a575d957fcb2848babb7163cb6e44a028a29ae Author: Chris Wilson Date: Thu Mar 16 13:19:53 2017 +0000 drm/i915: Retire an active batch pool object rather than allocate new Since obj->active_count is only updated upon retirement, if we see an active object in the batch pool, double check that is still active before deciding to allocate a new object. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170316132006.7976-3-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_batch_pool.c | 37 ++++++++++++++---------------- 1 file changed, 17 insertions(+), 20 deletions(-) commit 016da20148a1692e34d35d1f1787400a2a2d2c58 Author: Stephen Boyd Date: Thu Mar 16 18:08:13 2017 -0700 hrtimer: Remove hrtimer_peek_ahead_timers() leftovers This function was removed in commit c6eb3f70d448 (hrtimer: Get rid of hrtimer softirq, 2015-04-14) but the prototype wasn't ever deleted. Delete it now. Signed-off-by: Stephen Boyd Link: http://lkml.kernel.org/r/20170317010814.2591-1-sboyd@codeaurora.org Signed-off-by: Thomas Gleixner include/linux/hrtimer.h | 4 ---- kernel/time/hrtimer.c | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-) commit 92a0256e9acf20ee3f0add61b5aa774bfdf214cc Author: Chris Wilson Date: Mon Mar 13 11:28:10 2017 +0000 drm/i915: Add i810/i815 pci-ids for completeness To improve our historical record and to simplify userspace that wants to include i915_pciids.h as its canonical breakdown of PCI IDs and their respective generations, include the gen1 ids for i810 and i815. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170313112810.4202-1-chris@chris-wilson.co.uk Acked-by: Jani Nikula include/drm/i915_pciids.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6c943de6686f181fe28df7586aedd0917b4a9fe0 Author: Chris Wilson Date: Fri Mar 17 12:07:16 2017 +0000 drm/i915: Skip execlists_dequeue() early if the list is empty Do an early read of the execlists' queue before we take the spinlock and start checking. This is safe as the first writer to the execlists queue will cause the tasklet to be run again after a memory barrier. v2: Keep guc in sync with execlists queue changes v3: Explain the mb between the tasklet running on one cpu and the execlist_first update and schedule from a second cpu. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Michał Winiarski Reviewed-by: Tvrtko Ursulin Reviewed-by: Michał Winiarski Link: http://patchwork.freedesktop.org/patch/msgid/20170317120716.17191-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_guc_submission.c | 12 ++++++++++++ drivers/gpu/drm/i915/intel_lrc.c | 12 ++++++++++++ 2 files changed, 24 insertions(+) commit e637d2cba8f34ef5d67a988f18a7f6560e2e51f1 Author: Chris Wilson Date: Thu Mar 16 13:19:57 2017 +0000 drm/i915: Stop using obj->obj_exec_link outside of execbuf i915_gem_stolen_list_info() sneakily takes advantage of the obj->obj_exec_link to save itself from having to allocate. Enough of the subterfuge, just allocate an array of pointers and sort them instead of the list. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170316132006.7976-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 60 +++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 25 deletions(-) commit facbecad717155dbe57eced608fba5dcc1c972aa Author: Chris Wilson Date: Fri Mar 17 12:59:18 2017 +0000 drm/i915: Squelch WARN for VLV_COUNTER_CONTROL Before rc6 is initialised (after driver load or resume), the value inside VLV_COUNTER_CONTROL is undefined so we cannot make an assertion that is in HIGH_RANGE mode. Fixes: 6b7f6aa75e38 ("drm/i915: Use coarse grained residency counter with byt") Testcase: igt/drv_suspend/debugfs-reader Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170317125918.11351-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_pm.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 234516afbba56cc32b29cb9d166b63043f6dc6eb Author: Ander Conselvan de Oliveira Date: Fri Mar 17 16:04:36 2017 +0200 drm/i915/glk: Enable pooled EUs for Geminilake Geminilake also supports pooled EUs. Enable it. It is unclear if the recommendation to disable it for 2x6 configurations from commit e015dd69b2cf ("drm/i915/bxt: Add WaEnablePooledEuFor2x6") should also apply to GLK, but it is applied anyway to be on the safe side. That restriction can be lifted later if determined not to impact performance. The extra restriction should not impact user space either. The only user space that uses this feature is Beignet, and it only does so for 3x6 devices. See See Beignet's commit 6901899ec90a ("Runtime: set the sub slice according to kernel pooled EU configure."). v2: Improve commit message. (Mika, Roy) Cc: Arun Siluvery Cc: Mika Kuoppala Cc: Tvrtko Ursulin Cc: Yang Rong Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Mika Kuoppala Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170317140436.24645-1-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_device_info.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 05a1f47ed47a83736aca117aeee96e926cc0dfd0 Author: Alexander Shishkin Date: Thu Mar 16 18:41:59 2017 +0200 perf tools: Handle partial AUX records and print a warning This patch decodes the 'partial' flag in AUX records and prints a warning to the user, so that they don't have to guess why their PT traces contain gaps (or missing altogether): Warning: AUX data had gaps in it 8 times out of 8! Are you running a KVM guest in the background? Trying to be even more helpful, we will detect if the user's kvm driver sets up exclusive VMX root mode for the entire lifespan of the kvm process: Reloading kvm_intel module with vmm_exclusive=0 will reduce the gaps to only guest's timeslices. Note however, that you'll still have gaps in cpu-wide traces even with vmm_exclusive=0, but the number of gaps will be below 100% (as opposed to the above example). Currently this is the only reason for partial records. Signed-off-by: Alexander Shishkin Cc: Adrian Hunter Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vince Weaver Link: http://lkml.kernel.org/r/8760j941ig.fsf@ashishki-desk.ger.corp.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.c | 5 +++-- tools/perf/util/event.h | 1 + tools/perf/util/session.c | 27 ++++++++++++++++++++++++--- 3 files changed, 28 insertions(+), 5 deletions(-) commit 38a33f07122f6e6194bf5402c0cd057d1cc50be8 Author: Alexander Shishkin Date: Thu Mar 16 18:41:59 2017 +0200 tools include: Sync {,tools/}include/uapi/linux/perf_event.h To get PERF_AUX_FLAG_PARTIAL, introduced in: ae0c2d995d64 ("perf/core: Add a flag for partial AUX records") and that will be used to warn the user about gaps in AUX records due to VMX being used in KVM guests. Silences the kernel/tools file copy detector: Warning: include/uapi/linux/perf_event.h differs from kernel Signed-off-by: Alexander Shishkin Cc: Adrian Hunter Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vince Weaver Link: http://lkml.kernel.org/r/8760j941ig.fsf@ashishki-desk.ger.corp.intel.com [ Split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/perf_event.h | 1 + 1 file changed, 1 insertion(+) commit b9835a90084bd3cc45d7ab80c37f282046bc13d3 Author: Alexander Shishkin Date: Thu Mar 16 18:41:59 2017 +0200 tools lib api fs: Introduce sysfs__read_bool Will be used in a upcoming patch warning about PERF_RECORD_AUX data gaps, reading the "module/kvm_intel/parameters/vmm_exclusive" sysfs entry. Signed-off-by: Alexander Shishkin Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vince Weaver Link: http://lkml.kernel.org/r/8760j941ig.fsf@ashishki-desk.ger.corp.intel.com [ split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo tools/lib/api/fs/fs.c | 29 +++++++++++++++++++++++++++++ tools/lib/api/fs/fs.h | 1 + 2 files changed, 30 insertions(+) commit f371594a514a4d3bc8fca6913ce9b5d9e325095d Author: Arnaldo Carvalho de Melo Date: Fri Mar 17 11:23:21 2017 -0300 perf timechart: Use OPT_PARENT for common options Move -T/--tasks-only and -P/--power-only options to a separate options array that then gets referenced via OPT_PARENT from the 'perf timechart' and 'perf timechart record' option arrays. Cc: Adrian Hunter Cc: Changbin Du Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-j80lol9wj1i6556ibh48iebe@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-timechart.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit b40e36121e23031f1e8916a70110ffc841230670 Author: Arnaldo Carvalho de Melo Date: Fri Mar 17 11:16:02 2017 -0300 perf lock: Make 'f' part of the common 'lock_options' All options need the -f/--force option, so move it to the array referenced via OPT_PARENT. Cc: Adrian Hunter Cc: Changbin Du Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-unbeionpi58rioh4e9w8kp4n@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 249eed53152167c64c6dc66fa269a1d8b415a7b4 Author: Changbin Du Date: Fri Mar 17 13:53:42 2017 +0800 perf lock: Subcommands should include common options When I use -i option for report subcommand, it doesn't accept it. We need add common options using OPT_PARENT macro. perf lock report -i lock_perf.data Error: unknown switch `i' Usage: perf lock report [] -f, --force don't complain, do it -k, --key key for sorting ... Signed-off-by: Changbin Du Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170317055342.8284-1-changbin.du@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-lock.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 0630b614391f8cbc35e837b4645ec8faaaa6465e Author: Stephen Boyd Date: Thu Mar 16 18:07:14 2017 -0700 regulator: Mark supply_name const and duplicate it as such The supply_name member of struct regulator can be const as we don't change it in the regulator core. Furthermore, when we copy the supply name we can use kstrdup_const() here to avoid a copy if the name is in the ro data section. Signed-off-by: Stephen Boyd Signed-off-by: Mark Brown drivers/regulator/core.c | 4 ++-- drivers/regulator/internal.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit e542f7e63cb17242fcfc1be5edd69532cf434697 Author: Frode Isaksen Date: Fri Mar 17 12:07:58 2017 +0100 spi: loopback-test: fix compile error on x86 Fix compile error caused by missing vmalloc() definition on x86 (and maybe other platforms) by including vmalloc.h. Signed-off-by: Frode Isaksen Signed-off-by: Mark Brown drivers/spi/spi-loopback-test.c | 1 + 1 file changed, 1 insertion(+) commit e642c85b03de10eb1b411884ba27550651d0100b Author: Chris Wilson Date: Fri Mar 17 11:47:09 2017 +0000 drm/i915: Remove superfluous i915_add_request_no_flush() helper The only time we need to emit a flush inside request emission is after an execbuffer, for which we can use the full __i915_add_request(). All other instances want the simpler i915_add_request() without flushing, so remove the useless helper. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170317114709.8388-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gvt/scheduler.c | 2 +- drivers/gpu/drm/i915/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/i915_gem_request.h | 2 -- drivers/gpu/drm/i915/intel_display.c | 4 ++-- drivers/gpu/drm/i915/intel_overlay.c | 8 ++++---- drivers/gpu/drm/i915/intel_pm.c | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) commit 13b0ea0f5934ac30bf75c21554d3061b02abbad4 Author: Tobias Klauser Date: Fri Mar 17 12:08:59 2017 +0100 batman-adv: Omit unnecessary memset of netdev private data The memory for netdev_priv is allocated using kzalloc in alloc_netdev (or alloc_netdev_mq respectively) so there is no need to set it to 0 again. Signed-off-by: Tobias Klauser Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/soft-interface.c | 4 ---- 1 file changed, 4 deletions(-) commit 4e09991af206539add91e9d793ec1de61ec72e66 Author: Sven Eckelmann Date: Wed Mar 8 12:43:59 2017 +0100 batman-adv: Use __func__ to add function names to messages The name of the function might change in which these messages are printed. It is therefore better to let the compiler handle the insertion of the correct function name. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/tp_meter.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b54ab92b84b6161f91b1ad9160199422b3699009 Author: Reshetova, Elena Date: Thu Mar 16 10:03:34 2017 +0200 netfilter: refcounter conversions refcount_t type and corresponding API (see include/linux/refcount.h) should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Pablo Neira Ayuso include/net/ip_vs.h | 16 +++++++++------- include/net/netfilter/nf_conntrack_expect.h | 4 +++- include/net/netfilter/nf_conntrack_timeout.h | 3 ++- net/ipv4/netfilter/ipt_CLUSTERIP.c | 19 ++++++++++--------- net/netfilter/ipvs/ip_vs_conn.c | 24 ++++++++++++------------ net/netfilter/ipvs/ip_vs_core.c | 4 ++-- net/netfilter/ipvs/ip_vs_ctl.c | 12 ++++++------ net/netfilter/ipvs/ip_vs_lblc.c | 2 +- net/netfilter/ipvs/ip_vs_lblcr.c | 6 +++--- net/netfilter/ipvs/ip_vs_nq.c | 2 +- net/netfilter/ipvs/ip_vs_proto_sctp.c | 2 +- net/netfilter/ipvs/ip_vs_proto_tcp.c | 2 +- net/netfilter/ipvs/ip_vs_rr.c | 2 +- net/netfilter/ipvs/ip_vs_sed.c | 2 +- net/netfilter/ipvs/ip_vs_wlc.c | 2 +- net/netfilter/ipvs/ip_vs_wrr.c | 2 +- net/netfilter/nf_conntrack_expect.c | 10 +++++----- net/netfilter/nf_conntrack_netlink.c | 4 ++-- net/netfilter/nfnetlink_acct.c | 16 +++++++++------- net/netfilter/nfnetlink_cttimeout.c | 12 ++++++------ net/netfilter/nfnetlink_log.c | 14 ++++++++------ 21 files changed, 85 insertions(+), 75 deletions(-) commit b6ecfd469e82886308b44bf715d48fbe7b19ad4c Author: Johannes Berg Date: Fri Mar 17 10:24:15 2017 +0100 cfg80211: preserve wdev ID across netns changes When a wdev changes network namespace, its wdev ID will get reassigned since NETDEV_REGISTER is called again, in the new network namespace. Avoid that by checking if it was already assigned before, and document why we do that. Reported-and-tested-by: Arend Van Spriel Signed-off-by: Johannes Berg net/wireless/core.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit b7ede5a1f5905ac394cc8e61712a13e3c5cb7b8f Author: Ard Biesheuvel Date: Wed Feb 22 19:40:12 2017 +0100 ARM: 8662/1: module: split core and init PLT sections Since commit 35fa91eed817 ("ARM: kernel: merge core and init PLTs"), the ARM module PLT code allocates all PLT entries in a single core section, since the overhead of having a separate init PLT section is not justified by the small number of PLT entries usually required for init code. However, the core and init module regions are allocated independently, and there is a corner case where the core region may be allocated from the VMALLOC region if the dedicated module region is exhausted, but the init region, being much smaller, can still be allocated from the module region. This puts the PLT entries out of reach of the relocated branch instructions, defeating the whole purpose of PLTs. So split the core and init PLT regions, and name the latter ".init.plt" so it gets allocated along with (and sufficiently close to) the .init sections that it serves. Also, given that init PLT entries may need to be emitted for branches that target the core module, modify the logic that disregards defined symbols to only disregard symbols that are defined in the same section. Fixes: 35fa91eed817 ("ARM: kernel: merge core and init PLTs") Cc: # v4.9+ Reported-by: Angus Clark Tested-by: Angus Clark Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King arch/arm/include/asm/module.h | 9 ++++- arch/arm/kernel/module-plts.c | 87 +++++++++++++++++++++++++++++-------------- arch/arm/kernel/module.lds | 1 + 3 files changed, 68 insertions(+), 29 deletions(-) commit f08578e6da96043ec07a695fb6f4cba27a9d22d7 Author: Chris Brandt Date: Thu Feb 16 18:55:55 2017 +0100 ARM: 8661/1: dts: r7s72100: add l2 cache Note that early-bresp-disable and full-line-zero-disable are required because the sideband signals between the CPU and L2C were not connected in this SoC. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Signed-off-by: Russell King arch/arm/boot/dts/r7s72100.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit a96bb197693eb9e7a7221867bd944ccd6b6e12e6 Author: Chris Brandt Date: Thu Feb 16 18:54:39 2017 +0100 ARM: 8660/1: shmobile: r7s72100: Enable L2 cache Even though L2C is specified in the DT, you still need to add the aux settings in the machine_desc. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Signed-off-by: Russell King arch/arm/mach-shmobile/setup-r7s72100.c | 2 ++ 1 file changed, 2 insertions(+) commit 471b5e42cc7d76678314542d0ce079e5f3cfb706 Author: Chris Brandt Date: Thu Feb 16 18:53:29 2017 +0100 ARM: 8659/1: l2c: allow CA9 optimizations to be disabled If a PL310 is added to a system, but the sideband signals are not connected, some Cortex A9 optimizations cannot be used. In particular, enabling Full Line of Zeros in the CA9 without sidebands connected will crash the system since the CA9 will expect the L2C to perform operations, yet the L2C never gets the commands. Early BRESP also does not work without sideband signals. Signed-off-by: Chris Brandt Signed-off-by: Russell King Documentation/devicetree/bindings/arm/l2c2x0.txt | 3 +++ arch/arm/mm/cache-l2x0.c | 13 +++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) commit e3b1895fc1d29ebd8a8e3374fc076f138a1f8f4b Author: Tvrtko Ursulin Date: Fri Mar 10 09:57:47 2017 +0000 drm/i915/vgpu: Neuter forcewakes for VGPU more thoroughly If we avoid initializing forcewake domains when running as a guest, and also use gen2 mmio accessors in that case, we can avoid the timer traffic and any looping through the forcewake code which is currently just so it can end up in the no-op forcewake implementation. Signed-off-by: Tvrtko Ursulin Cc: Weinan Li Cc: Chris Wilson Reviewed-by: Chris Wilson Tested-by: Terrence Xu Link: http://patchwork.freedesktop.org/patch/msgid/20170310095747.12258-1-tvrtko.ursulin@linux.intel.com [tursulin: commit spelling fix] drivers/gpu/drm/i915/intel_uncore.c | 76 +++++++++++++------------------------ 1 file changed, 27 insertions(+), 49 deletions(-) commit fa7e8b55e939468c2988cd01f893348f5d36ed0a Author: Zhenyu Wang Date: Fri Mar 10 10:22:38 2017 +0800 drm/i915: Fix vGPU balloon for ggtt guard page From commit a6508ded2a66 ("drm/i915: Use page coloring to provide the guard page at the end of the GTT"), we no longer explicitly subtract guard page at end for GGTT address space init, so shouldn't subtract that for vGPU balloon too, as that will leave that end page to be available for vGPU. Change balloon to cover full range too. This fixes to use recent drm-intel tip kernel for guest OS. Found by GVT-g cmd parser that guest kernel uses end page as scratch then try to run MI_STORE_REG_MEM onto it. v2: remove old comments Cc: Terrence Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20170310022238.3191-1-zhenyuw@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_vgpu.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 60367132a21449c2119f0bb27eef907bc95828af Author: Chris Wilson Date: Thu Mar 16 20:42:35 2017 +0000 drm/i915: Avoid use-after-free of ctx in request tracepoints trace_i915_gem_request_out may be used after the request is completed, and so the request may have been retired on another thread, invalidating the rq->ctx. Avoid dereferencing rq->ctx in the tracepoint by switching to the fence context id instead, updating all tracepoints to match. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170316204235.27786-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_trace.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 74c8ce958dbf0b64f198becb5d8aa93afb967438 Merge: 45fc875 d11507e Author: Ingo Molnar Date: Fri Mar 17 08:55:01 2017 +0100 Merge branch 'linus' into x86/mm, to pick up a bugfix Signed-off-by: Ingo Molnar commit a729782e2d444d51ee21052fd0db076d3fd4955f Author: Dylan Leggio Date: Thu Mar 16 20:57:03 2017 -0400 Staging: wilc1000: fix two typos in #define's GAS_INTIAL_REQ should be GAS_INITIAL_REQ. GAS_INTIAL_RSP should be GAS_INITIAL_RSP. Improves readability of code. Signed-off-by: Dylan Leggio Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6e9f6b54c51f23fd663912d720c3420c057e5bfc Author: Colin Ian King Date: Thu Mar 16 23:21:45 2017 +0000 staging: wilc1000: fix incorrect copy of pmkid data The pmkid data is meant be be copied to the previous item in the pmkidlist, however the code is just copying the data to itself because the src index into pmkidlist is the same as the dst index into pmkidlist. Fix this with i + 1 instead of i. Detected by CoverityScan,CID#13339465 ("Overlapping buffer in memory copy") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe3184556e2efc9472c73533af8d103058dd5190 Author: Jérémy Lefaure Date: Thu Mar 16 22:31:09 2017 -0400 staging: media: atomisp: add missing include in vlv2_plat_clock.c To use IO functions like writel, readl, ioremap_nocache and iounmap, linux/io.h should be included. Signed-off-by: Jérémy Lefaure Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/platform/clock/vlv2_plat_clock.c | 1 + 1 file changed, 1 insertion(+) commit ab1ae47e8b94c92728e741d71bbc89bbe86e31eb Author: sayli karnik Date: Fri Mar 17 08:55:51 2017 +0530 staging: lustre: llite: rw26: Remove unused function definition The patch removes unused function definition ll_get_user_pages(). The use of ll_get_user_pages() was replaced with iov_iter_get_pages_alloc() in commit 91f79c43d1b54d7154b118860d81b39bad07dfff. Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/rw26.c | 26 -------------------------- 1 file changed, 26 deletions(-) commit 98c1fda752b604c68f2d7c9a0e10c6aaa3bd2a17 Author: Okash Khawaja Date: Thu Mar 16 08:10:17 2017 +0000 staging: speakup: move those functions which do outgoing serial comms, into serialio.c This moves spk_synth_immediate and spk_serial_synth_probe functions into serialio.c. These functions do outgoing serial comms. The move is a step towards collecting all serial comms in serialio.c. This also renames spk_synth_immediate to spk_serial_synth_immediate. Code inside those functions has not been changed. Along the way, this patch also fixes a couple of spots which were calling spk_synth_immediate directly, so that the calls now happen via the spk_syth struct. Signed-off-by: Okash Khawaja Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/serialio.c | 46 ++++++++++++++++++++++++++++++++ drivers/staging/speakup/speakup_acntsa.c | 4 +-- drivers/staging/speakup/speakup_apollo.c | 2 +- drivers/staging/speakup/speakup_audptr.c | 4 +-- drivers/staging/speakup/speakup_bns.c | 2 +- drivers/staging/speakup/speakup_decext.c | 4 +-- drivers/staging/speakup/speakup_dectlk.c | 2 +- drivers/staging/speakup/speakup_dummy.c | 2 +- drivers/staging/speakup/speakup_ltlk.c | 4 +-- drivers/staging/speakup/speakup_spkout.c | 2 +- drivers/staging/speakup/speakup_txprt.c | 2 +- drivers/staging/speakup/spk_priv.h | 2 +- drivers/staging/speakup/synth.c | 46 -------------------------------- 13 files changed, 61 insertions(+), 61 deletions(-) commit 5e492ab566f7302d2143d739361cf33076da8e71 Author: Mohsin Shan Date: Wed Mar 15 20:51:42 2017 -0700 Staging: goldfish: use __func__ instead of embedded function names Embedded function names are less appropriate to use when refactoring, can cause function renaming. Prefer the use of "%s", __func__ to embedded function names Signed-off-by: Mohsin Shan Signed-off-by: Greg Kroah-Hartman drivers/staging/goldfish/goldfish_nand.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 9ca98bd077480473d075a2c50647da42d5ad6b50 Author: Jérémy Lefaure Date: Thu Mar 16 22:13:51 2017 -0400 Revert "staging: media: atomisp: fill properly hmm_bo_type_strings when ION is disabled" This reverts commit fde469701c7efabebf885e785edf367bfb1a8f3f. Adding a preprocessor condition is not the best solution to fix this issue. Let's revert this commit before fixing this problem in a more appropriate way. Signed-off-by: Jérémy Lefaure Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 2 -- 1 file changed, 2 deletions(-) commit d47d88361feea2ce11f39bd70467ffc19a61d2d3 Author: Geert Uytterhoeven Date: Fri Mar 10 15:15:21 2017 +0100 auxdisplay: Add HD44780 Character LCD support The Hitachi HD44780 Character LCD Controller is commonly used on character LCDs that can display one or more lines of text. This driver supports character LCDs connected to GPIOs, using either a 4-bit or 8-bit data bus, and provides access through the charlcd core and /dev/lcd. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/auxdisplay/Kconfig | 11 ++ drivers/auxdisplay/Makefile | 1 + drivers/auxdisplay/hd44780.c | 325 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 337 insertions(+) commit dd9502a9e9156dd854dd0bec0dd385b4662bab3e Author: Geert Uytterhoeven Date: Fri Mar 10 15:15:20 2017 +0100 dt-bindings: auxdisplay: Add bindings for Hitachi HD44780 Add DT bindings for an Hitachi HD44780 Character LCD Controller where its M6800 bus interface is connected to GPIOs. Memory-mapped configurations are not yet supported. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/auxdisplay/hit,hd44780.txt | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 1d3b2af213902059d9f4b35eb15b53f8062dc3b3 Author: Geert Uytterhoeven Date: Fri Mar 10 15:15:19 2017 +0100 auxdisplay: charlcd: Add support for displays with more than two lines On displays with more than two lines, the additional lines are stored in the buffers used for the first two lines, but beyond the visible parts. Adjust the DDRAM address calculation to cater for this. When clearing the display, avoid writing more spaces than the actual size of the physical buffer. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/auxdisplay/charlcd.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit ac201479cc695cb0140e425b9ca8ab2ecdcd2f0d Author: Geert Uytterhoeven Date: Fri Mar 10 15:15:18 2017 +0100 auxdisplay: charlcd: Add support for 4-bit interfaces In 4-bit mode, 8-bit commands and data are written using two raw writes to the data interface: high nibble first, low nibble last. This must be handled by the low-level driver. However, as we don't know in which mode (4-bit or 8-bit) nor 4-bit phase the LCD was left, initialization must always be handled using raw writes, and needs to configure the LCD for 8-bit mode first. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/auxdisplay/charlcd.c | 36 ++++++++++++++++++++++++++++++------ include/misc/charlcd.h | 2 ++ 2 files changed, 32 insertions(+), 6 deletions(-) commit 39f8ea46724efbed3ca021863a22337c31be264c Author: Geert Uytterhoeven Date: Fri Mar 10 15:15:17 2017 +0100 auxdisplay: charlcd: Extract character LCD core from misc/panel Extract the character LCD core from the Parallel port LCD/Keypad Panel driver in the misc subsystem, and convert it into a subdriver in the auxdisplay subsystem. This allows the character LCD core to be used by other drivers later. Compilation is controlled by its own Kconfig symbol CHARLCD, which is to be selected by its users, but can be enabled manually for compile-testing. All functions changed their prefix from "lcd_" to "charlcd_", and gained a "struct charlcd *" parameter to operate on a specific instance. While the driver API thus is ready to support multiple instances, the current limitation of a single display (/dev/lcd has a single misc minor assigned) is retained. No functional changes intended. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/auxdisplay/Kconfig | 3 + drivers/auxdisplay/Makefile | 1 + drivers/auxdisplay/charlcd.c | 790 +++++++++++++++++++++++++++++++++++++++++ drivers/misc/Kconfig | 1 + drivers/misc/panel.c | 827 +++++-------------------------------------- include/misc/charlcd.h | 40 +++ 6 files changed, 927 insertions(+), 735 deletions(-) commit 2eec10807a2fbf0f240c55070b71b8cd5c09ab23 Author: Joe Perches Date: Thu Feb 16 23:11:26 2017 -0800 drivers/char: Convert remaining use of pr_warning to pr_warn To enable eventual removal of pr_warning This makes pr_warn use consistent for drivers/char Prior to this patch, there were 1 use of pr_warning and 40 uses of pr_warn in drivers/char Signed-off-by: Joe Perches Reviewed-by: Amit Shah Signed-off-by: Greg Kroah-Hartman drivers/char/virtio_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e447d4c06868d85342f6e35db499c463519a27d0 Author: Mariusz Bialonczyk Date: Thu Feb 23 07:38:45 2017 +0100 w1: w1_ds2760.h: fix defines indentation Signed-off-by: Mariusz Bialonczyk Signed-off-by: Greg Kroah-Hartman drivers/w1/slaves/w1_ds2760.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 6d691550ea0d67a86be351bb78fcd6d28bb60fff Author: Mariusz Bialonczyk Date: Thu Feb 23 07:38:44 2017 +0100 w1: add documentation for w1_ds2438 Signed-off-by: Mariusz Bialonczyk Signed-off-by: Greg Kroah-Hartman Documentation/w1/slaves/00-INDEX | 2 ++ Documentation/w1/slaves/w1_ds2438 | 63 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) commit e3af95e60738e2f0ecedca96f8f3baa2fa4d1b7d Author: Mariusz Bialonczyk Date: Thu Feb 23 07:38:43 2017 +0100 w1: add support for DS2438 Smart Battery Monitor Detailed information about support and provided sysfs files in my next commit which creates a documentation file: Documentation/w1/slaves/w1_ds2438 Signed-off-by: Mariusz Bialonczyk Signed-off-by: Greg Kroah-Hartman drivers/w1/slaves/Kconfig | 6 + drivers/w1/slaves/Makefile | 1 + drivers/w1/slaves/w1_ds2438.c | 390 ++++++++++++++++++++++++++++++++++++++++++ drivers/w1/w1_family.h | 1 + 4 files changed, 398 insertions(+) commit a9ee205883a36e3d51dff5b8f3a7c2c1c4fbab57 Author: Mariusz Bialonczyk Date: Thu Feb 23 07:38:42 2017 +0100 w1: add missing DS2413 documentation Signed-off-by: Mariusz Bialonczyk Signed-off-by: Greg Kroah-Hartman Documentation/w1/slaves/00-INDEX | 2 ++ Documentation/w1/slaves/w1_ds2413 | 50 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) commit c2a49fe8eeef301b40d0c8065d817c5425d31b11 Author: Matt Ranostay Date: Fri Mar 10 15:19:45 2017 -0800 pps: fix padding issue with PPS_FETCH for ioctl_compat Issue is that x86 32-bit aligns to 4-bytes instead of 8-bytes so this patchset works around the issue and corrects the data returned in pps_fdata_compat. Acked-by: Rodolfo Giometti Signed-off-by: Matt Ranostay Signed-off-by: Greg Kroah-Hartman drivers/pps/pps.c | 110 ++++++++++++++++++++++++++++++++++------------- include/uapi/linux/pps.h | 19 ++++++++ 2 files changed, 98 insertions(+), 31 deletions(-) commit 2ac6665701afd1946e1c93bd1308e97fd2b0ce10 Author: Matt Ranostay Date: Fri Mar 10 15:19:44 2017 -0800 pps: add ioctl_compat function to correct ioctl definitions ioctl definitions use the pointer size of the architecture which is fine when userspace and kernel are the same bitsize. This patchset workarounds an issue with mixed bitsize kernel + userspace by rewriting the cmd to the kernelspace architecture pointer size. Acked-by: Rodolfo Giometti Signed-off-by: Matt Ranostay Signed-off-by: Greg Kroah-Hartman drivers/pps/pps.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 48a5e6bdc2dd82281d7d6623a7395be7d6c3a95b Author: Martyn Welch Date: Sat Mar 4 00:34:30 2017 +0000 docs: Update VME documentation to include kerneldoc comments Update VME documentation given that kerneldoc comments are now provided. Add "VME API" section to VME RST to pull in kerneldoc comments. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/vme.rst | 363 ++++++++++----------------------------- 1 file changed, 93 insertions(+), 270 deletions(-) commit b5bc980a4929bb2a449fef3e0b7131466815d0b1 Author: Martyn Welch Date: Sat Mar 4 00:34:29 2017 +0000 docs: Add kernel-doc comments to VME driver API Add kernel-doc comments to the VME driver API and structures. This documentation will be integrated into the RST documentation in a later patch. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman drivers/vme/vme.c | 469 ++++++++++++++++++++++++++++++++++++++++++++++++---- include/linux/vme.h | 12 +- 2 files changed, 449 insertions(+), 32 deletions(-) commit 5cd5e6ad0ede862432e1e766bfe02a9ad447533e Author: Matthias Kaehlcke Date: Mon Mar 13 11:57:25 2017 -0700 hpet: Make cmd parameter of hpet_ioctl_common() unsigned The value passed by the two callers of the function is unsigned anyway. Making the parameter unsigned fixes the following warning when building with clang: drivers/char/hpet.c:588:7: error: overflow converting case value to switch condition type (2149083139 to 18446744071563667459) [-Werror,-Wswitch] case HPET_INFO: ^ include/uapi/linux/hpet.h:18:19: note: expanded from macro 'HPET_INFO' ^ include/uapi/asm-generic/ioctl.h:77:28: note: expanded from macro '_IOR' ^ include/uapi/asm-generic/ioctl.h:66:2: note: expanded from macro '_IOC' (((dir) << _IOC_DIRSHIFT) | \ Signed-off-by: Matthias Kaehlcke Acked-by: Clemens Ladisch Signed-off-by: Greg Kroah-Hartman drivers/char/hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c4e976785011dfbe461821d0bfc58cfd60eac56 Author: Cyril Bur Date: Fri Feb 17 14:28:49 2017 +1100 drivers/misc: Add Aspeed LPC control driver In order to manage server systems, there is typically another processor known as a BMC (Baseboard Management Controller) which is responsible for powering the server and other various elements, sometimes fans, often the system flash. The Aspeed BMC family which is what is used on OpenPOWER machines and a number of x86 as well is typically connected to the host via an LPC (Low Pin Count) bus (among others). The LPC bus is an ISA bus on steroids. It's generally used by the BMC chip to provide the host with access to the system flash (via MEM/FW cycles) that contains the BIOS or other host firmware along with a number of SuperIO-style IOs (via IO space) such as UARTs, IPMI controllers. On the BMC chip side, this is all configured via a bunch of registers whose content is related to a given policy of what devices are exposed at a per system level, which is system/vendor specific, so we don't want to bolt that into the BMC kernel. This started with a need to provide something nicer than /dev/mem for user space to configure these things. One important aspect of the configuration is how the MEM/FW space is exposed to the host (ie, the x86 or POWER). Some registers in that bridge can define a window remapping all or portion of the LPC MEM/FW space to a portion of the BMC internal bus, with no specific limits imposed in HW. I think it makes sense to ensure that this window is configured by a kernel driver that can apply some serious sanity checks on what it is configured to map. In practice, user space wants to control this by flipping the mapping between essentially two types of portions of the BMC address space: - The flash space. This is a region of the BMC MMIO space that more/less directly maps the system flash (at least for reads, writes are somewhat more complicated). - One (or more) reserved area(s) of the BMC physical memory. The latter is needed for a number of things, such as avoiding letting the host manipulate the innards of the BMC flash controller via some evil backdoor, we want to do flash updates by routing the window to a portion of memory (under control of a mailbox protocol via some separate set of registers) which the host can use to write new data in bulk and then request the BMC to flash it. There are other uses, such as allowing the host to boot from an in-memory flash image rather than the one in flash (very handy for continuous integration and test, the BMC can just download new images). It is important to note that due to the way the Aspeed chip lets the kernel configure the mapping between host LPC addresses and BMC ram addresses the offset within the window must be a multiple of size. Not doing so will fragment the accessible space rather than simply moving 'zero' upwards. This is caused by the nature of HICR8 being a mask and the way host LPC addresses are translated. Signed-off-by: Cyril Bur Reviewed-by: Joel Stanley Reviewed-by: Benjamin Herrenschmidt Signed-off-by: Greg Kroah-Hartman drivers/misc/Kconfig | 8 ++ drivers/misc/Makefile | 1 + drivers/misc/aspeed-lpc-ctrl.c | 267 +++++++++++++++++++++++++++++++++++ include/uapi/linux/aspeed-lpc-ctrl.h | 60 ++++++++ 4 files changed, 336 insertions(+) commit 87e715deb8e24bf1a6a9a1babaf465c28c93889c Author: Dmitry Torokhov Date: Tue Feb 14 12:24:09 2017 -0800 zorro: stop creating attributes by hand Instead of creating attributes one by one, define attribute_group array and attach it to bus->dev_groups, so that all needed attributes are created automatically when a new device is registered on the bus. Also switch to using standard DEVICE_ATTR_RO() macros. Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman drivers/zorro/zorro-driver.c | 15 +++++---- drivers/zorro/zorro-sysfs.c | 76 +++++++++++++++++++++++--------------------- drivers/zorro/zorro.c | 3 -- drivers/zorro/zorro.h | 3 +- 4 files changed, 50 insertions(+), 47 deletions(-) commit a553910fbaafbd7c18823c0f1e5dcc2d12c9fd2a Author: Ming Lei Date: Thu Feb 23 09:29:26 2017 +0800 MAINTAINERS: update firmware loader entry This email of 'ming.lei@canonical.com' isn't valid any more, please remove the entry. Signed-off-by: Ming Lei Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 70359c4a6802caa9e5a9233b863c6175e011abeb Author: Dmitry Torokhov Date: Wed Feb 15 11:50:55 2017 -0800 rapidio: use is_visible() to hide switch-specific attributes Instead of creating switch-specific attributes by hand, implement is_visible() method of attribute group and hide them when dealing with non-switch devices. This will ensure that all attributes are created together, before userspace gets notified of new device. Also, remove rio-sysfs.c from list of files that are scanned when compiling RapiodIO documentations as it no longer has any structured comments, and leaving it in leads to warning when building docs. Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman Documentation/DocBook/rapidio.tmpl | 3 -- drivers/rapidio/rio-sysfs.c | 76 +++++++++++++++++--------------------- drivers/rapidio/rio.c | 3 -- drivers/rapidio/rio.h | 2 - 4 files changed, 33 insertions(+), 51 deletions(-) commit dde04eb116fa1b0b0d443532af8c167520402b70 Author: Rob Herring Date: Wed Feb 15 09:35:15 2017 -0600 binder: Add 'hwbinder' to the default devices As AOSP master is now starting to require a hwbinder device, add it to the the default Kconfig. Having the hwbinder device when not needed shouldn't hurt anything either. Cc: Greg Kroah-Hartman Cc: John Stultz Cc: Martijn Coenen Cc: Arve Hjønnevåg Cc: Amit Pundir Cc: Serban Constantinescu Cc: Dmitry Shmidt Cc: Rom Lemarchand Cc: Android Kernel Team Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman drivers/android/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c248aad81c8903981db9f12fd74189fa01b3789 Author: K. Y. Srinivasan Date: Tue Mar 14 18:01:39 2017 -0700 Drivers: hv: Base autoeoi enablement based on hypervisor hints Don't enable auto-eoi if the hypervisor recommends otherwise. This will enable vAPIC functionality if available. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/include/uapi/asm/hyperv.h | 5 +++++ drivers/hv/hv.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 4539673a6ac027e3ba95901379b5f36c5eb3c9dc Author: K. Y. Srinivasan Date: Tue Mar 14 18:01:38 2017 -0700 Drivers: hv: Fix a typo Fix a typo in the macro. Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/include/uapi/asm/hyperv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4827ee1dca5691c9fc568883170a568db94f9b38 Author: Stephen Hemminger Date: Sat Mar 4 18:27:18 2017 -0700 vmbus: expose debug info for drivers Allow driver to get debug information about state of the ring. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hyperv_vmbus.h | 11 ----------- drivers/hv/ring_buffer.c | 1 + include/linux/hyperv.h | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 11 deletions(-) commit 2a9d7de2038e87bb2a1085ac73c4246c260263f0 Author: Stephen Hemminger Date: Sat Mar 4 18:27:17 2017 -0700 vmbus: cleanup header file style Minor changes to align hyper-v vmbus include files with current linux kernel style. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hyperv_vmbus.h | 16 ++++++++-------- include/linux/hyperv.h | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) commit e6242fa0fb50570acb6364446dec369d7b9b5b2c Author: Stephen Hemminger Date: Sat Mar 4 18:27:16 2017 -0700 vmbus: make channel_message table constant This table is immutable and should be const. Cleanup indentation and whitespace for this as well. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 48 +++++++++++++++++++++++------------------------ drivers/hv/hyperv_vmbus.h | 2 +- drivers/hv/vmbus_drv.c | 2 +- 3 files changed, 26 insertions(+), 26 deletions(-) commit 42dd2715428f24d4ac990ed9207ce28c60a4b7f6 Author: Stephen Hemminger Date: Sat Mar 4 18:27:15 2017 -0700 hyperv: remove unnecessary return variable hv_ringbuffer_read cleanup. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/ring_buffer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit bdc1dd47dbcd39f266f0a6c8727a2b1995b36ef2 Author: Stephen Hemminger Date: Sat Mar 4 18:27:14 2017 -0700 vmbus: fix spelling errors Several spelling errors in comments Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 10 +++++----- drivers/hv/hv_kvp.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) commit 2c616a8b6bd3b51b560d994f3412da998fe7ee48 Author: Stephen Hemminger Date: Sat Mar 4 18:27:13 2017 -0700 vmbus: remove unnecessary initialization Don't initialize variables that are then set a few lines later. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/ring_buffer.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 8b1f91fb4c1a8a860b8edc0c383821b2ff8a1ece Author: Stephen Hemminger Date: Sat Mar 4 18:27:12 2017 -0700 vmbus: remove useless return's No need for empty return at end of void function Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/hv_balloon.c | 2 -- drivers/hv/hv_fcopy.c | 2 -- drivers/hv/hv_kvp.c | 2 -- drivers/hv/hv_snapshot.c | 2 -- drivers/hv/ring_buffer.c | 2 -- drivers/hv/vmbus_drv.c | 2 -- include/linux/hyperv.h | 2 -- 7 files changed, 14 deletions(-) commit 670718161852c6acdb8d6bca6a73510f7b9f4320 Author: Stephen Hemminger Date: Sat Mar 4 18:27:11 2017 -0700 hyperv: fix warning about missing prototype Compiling with warnings enabled finds missing prototype for hv_do_hypercall. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/hyperv/hv_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ada6eb11137be0baf846e00fca40fc096ba85a28 Author: Stephen Hemminger Date: Sat Mar 4 18:27:10 2017 -0700 vmbus: only reschedule tasklet if time limit exceeded The change to reschedule tasklet if more data arrives in ring buffer can cause performance regression if host timing is such that the next response happens in small window. Go back to a modified version of the original looping behavior. If the race occurs in a small time, then loop. But if the tasklet has been running for a long interval due to flood, then reschedule the tasklet to allow migration to ksoftirqd. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/connection.c | 65 ++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 31 deletions(-) commit c37235cce31d5e03b73692f31e994964f18e2dc2 Author: Moritz Fischer Date: Fri Mar 10 12:47:11 2017 -0800 fpga: bridge: Replace open-coded list_for_each + list_entry Replaces open-coded list_for_each() + list_entry() with macro list_for_each_entry() Signed-off-by: Moritz Fischer Cc: linux-fpga@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman drivers/fpga/fpga-bridge.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 21f8ba2ef378d906374a26f7abc05fb92219e9c6 Author: Joel Holdsworth Date: Mon Feb 27 16:14:26 2017 -0600 fpga: Add support for Lattice iCE40 FPGAs This patch adds support to the FPGA manager for configuring the SRAM of iCE40LM, iCE40LP, iCE40HX, iCE40 Ultra, iCE40 UltraLite and iCE40 UltraPlus devices, through slave SPI. Signed-off-by: Joel Holdsworth Reviewed-by: Marek Vasut Reviewed-by: Moritz Fischer Acked-by: Alan Tull Signed-off-by: Greg Kroah-Hartman drivers/fpga/Kconfig | 6 ++ drivers/fpga/Makefile | 1 + drivers/fpga/ice40-spi.c | 207 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 214 insertions(+) commit e10c11d2739fd3657d8d1d5b1fa06f9185b4f012 Author: Joel Holdsworth Date: Mon Feb 27 16:14:25 2017 -0600 Documentation: Add binding document for Lattice iCE40 FPGA manager This adds documentation of the device tree bindings of the Lattice iCE40 FPGA driver for the FPGA manager framework. Signed-off-by: Joel Holdsworth Acked-by: Rob Herring Acked-by: Alan Tull Acked-by: Moritz Fischer Acked-by: Marek Vasut Signed-off-by: Greg Kroah-Hartman .../bindings/fpga/lattice-ice40-fpga-mgr.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit f677e0f3ed45a4fcd6270d43b25ff9abb92da608 Author: Florian Fainelli Date: Mon Feb 27 16:14:23 2017 -0600 ARM: ep93xx: Register ts73xx-fpga manager driver for TS-7300 Register the TS-7300 FPGA manager device drivers which allows us to load bitstreams into the on-board Altera Cyclone II FPGA. Acked-by: H Hartley Sweeten Signed-off-by: Florian Fainelli Acked-by: Alan Tull Acked-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman arch/arm/mach-ep93xx/ts72xx.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 4348f7e2ae250d9b986b08c8e8ea8a402790f369 Author: Florian Fainelli Date: Mon Feb 27 16:14:22 2017 -0600 FPGA: Add TS-7300 FPGA manager Add support for loading bitstreams on the Altera Cyclone II FPGA populated on the TS-7300 board. This is done through the configuration and data registers offered through a memory interface between the EP93xx SoC and the FPGA via an intermediate CPLD device. The EP93xx SoC on the TS-7300 does not have direct means of configuring the on-board FPGA other than by using the special memory mapped interface to the CPLD. No other entity on the system can control the FPGA bitstream. Signed-off-by: Florian Fainelli Acked-by: Alan Tull Acked-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman drivers/fpga/Kconfig | 7 ++ drivers/fpga/Makefile | 1 + drivers/fpga/ts73xx-fpga.c | 156 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 164 insertions(+) commit 161db575ef6c3b0a6d96dc263abb39cd0dc0f0c2 Author: Moritz Fischer Date: Mon Feb 27 09:19:02 2017 -0600 fpga: region: Add fpga-region property 'encrypted-fpga-config' Add fpga-region property to allow passing the fact that the bitstream is encrypted to the fpga-region and ultimately to the low-level driver. Signed-off-by: Moritz Fischer Acked-by: Michal Simek Signed-off-by: Alan Tull Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/fpga/fpga-region.txt | 1 + drivers/fpga/fpga-region.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 7f33bbca14de25f24660441af5087440dd0d2fca Author: Moritz Fischer Date: Mon Feb 27 09:19:01 2017 -0600 fpga: zynq: Add support for encrypted bitstreams Add support for encrypted bitstreams. For this to work the system must be booted in secure mode. In order for on-the-fly decryption to work, the PCAP clock rate needs to be lowered via the PCAP_RATE_EN bit. Signed-off-by: Moritz Fischer Acked-by: Michal Simek Signed-off-by: Alan Tull Signed-off-by: Greg Kroah-Hartman drivers/fpga/zynq-fpga.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit 0f4f0c8ff1da9171bca0dc01ce5551e8b6d2f0f3 Author: Moritz Fischer Date: Mon Feb 27 09:19:00 2017 -0600 fpga: Add flag to indicate bitstream needs decrypting Add a flag that is passed to the write_init() callback, indicating that the bitstream is encrypted. The low-level driver will deal with the flag, or return an error, if encrypted bitstreams are not supported. Signed-off-by: Moritz Fischer Acked-by: Michal Simek Signed-off-by: Alan Tull Signed-off-by: Greg Kroah-Hartman include/linux/fpga/fpga-mgr.h | 1 + 1 file changed, 1 insertion(+) commit 47910a49db876397150b9754bc66f0c179448854 Author: Dinh Nguyen Date: Mon Feb 27 09:18:59 2017 -0600 fpga: fix sparse warnings in fpga-mgr and fpga-bridge Fix up these sparse warnings: drivers/fpga/fpga-mgr.c:189:21: warning: symbol '__fpga_mgr_get' was not declared. Should it be static? drivers/fpga/fpga-bridge.c:30:12: warning: symbol 'bridge_list_lock' was not declared. Should it be static? Signed-off-by: Dinh Nguyen Acked-by: Moritz Fischer Signed-off-by: Alan Tull Signed-off-by: Greg Kroah-Hartman drivers/fpga/fpga-bridge.c | 2 +- drivers/fpga/fpga-mgr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit acbdad8dd1abd98b216d8c37ff9c6de4aa595534 Author: Philipp Zabel Date: Wed Mar 15 12:31:50 2017 +0100 serial: 8250_dw: simplify optional reset handling As of commit bb475230b8e5 ("reset: make optional functions really optional"), the reset framework API calls use NULL pointers to describe optional, non-present reset controls. This allows to return errors from devm_reset_control_get_optional and to call reset_control_(de)assert unconditionally. Signed-off-by: Philipp Zabel Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 22077b091a4720d4336bd806e9c93b2a81fcc38a Author: Jiri Slaby Date: Wed Mar 15 12:00:23 2017 +0100 tty: serial_core, remove state checks in uart_poll* Coverity complains about uart_state checks in polling functions. And it is indeed correct. We do something like this: struct uart_state *state = drv->state + line; if (!state) return; Adding 'line' to drv->state would move the potential NULL pointer to something near NULL and the check is useless. Even if we checked pure drv->state, nothing guarantees it is not freed and NULLed after the check. So if the only user of this interface (kgdboc) needs to assure something, this is neither the correct thing, nor place to do so. Signed-off-by: Jiri Slaby Cc: linux-serial@vger.kernel.org Cc: Jason Wessel Cc: kgdb-bugreport@lists.sourceforge.net Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit fab8a02b73eb2a42c589f943c377143f04b2bb73 Author: Lukas Redlinger Date: Tue Mar 14 15:09:14 2017 +0100 serial: 8250_fintek: Enable high speed mode on Fintek F81866 Fintek F81866 supports baud rates higher than 115200 but needs to raise it's clock speed from 1.84 to 14.76 MHz. This is eight times faster, so gives 921600 as resulting baud_base. F81866 clock register 0xf2: Bit 7-2 reserved Bit 1-0 00: 1.8432MHz 01: 18.432MHz 10: 24MHz 11: 14.769MHz Signed-off-by: Lukas Redlinger Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_fintek.c | 43 +++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 5 deletions(-) commit 71472fa9c52b1da27663c275d416d8654b905f05 Author: Peter Hurley Date: Thu Mar 16 14:08:26 2017 +1100 tty: Fix ldisc crash on reopened tty If the tty has been hungup, the ldisc instance may have been destroyed. Continued input to the tty will be ignored as long as the ldisc instance is not visible to the flush_to_ldisc kworker. However, when the tty is reopened and a new ldisc instance is created, the flush_to_ldisc kworker can obtain an ldisc reference before the new ldisc is completely initialized. This will likely crash: BUG: unable to handle kernel paging request at 0000000000002260 IP: [] n_tty_receive_buf_common+0x6d/0xb80 PGD 2ab581067 PUD 290c11067 PMD 0 Oops: 0000 [#1] PREEMPT SMP Modules linked in: nls_iso8859_1 ip6table_filter [.....] CPU: 2 PID: 103 Comm: kworker/u16:1 Not tainted 4.6.0-rc7+wip-xeon+debug #rc7+wip Hardware name: Dell Inc. Precision WorkStation T5400 /0RW203, BIOS A11 04/30/2012 Workqueue: events_unbound flush_to_ldisc task: ffff8802ad16d100 ti: ffff8802ad31c000 task.ti: ffff8802ad31c000 RIP: 0010:[] [] n_tty_receive_buf_common+0x6d/0xb80 RSP: 0018:ffff8802ad31fc70 EFLAGS: 00010296 RAX: 0000000000000000 RBX: ffff8802aaddd800 RCX: 0000000000000001 RDX: 00000000ffffffff RSI: ffffffff810db48f RDI: 0000000000000246 RBP: ffff8802ad31fd08 R08: 0000000000000000 R09: 0000000000000001 R10: ffff8802aadddb28 R11: 0000000000000001 R12: ffff8800ba6da808 R13: ffff8802ad18be80 R14: ffff8800ba6da858 R15: ffff8800ba6da800 FS: 0000000000000000(0000) GS:ffff8802b0a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000002260 CR3: 000000028ee5d000 CR4: 00000000000006e0 Stack: ffffffff81531219 ffff8802aadddab8 ffff8802aadddde0 ffff8802aadddd78 ffffffff00000001 ffff8800ba6da858 ffff8800ba6da860 ffff8802ad31fd30 ffffffff81885f78 ffffffff81531219 0000000000000000 0000000200000000 Call Trace: [] ? flush_to_ldisc+0x49/0xd0 [] ? mutex_lock_nested+0x2c8/0x430 [] ? flush_to_ldisc+0x49/0xd0 [] n_tty_receive_buf2+0x14/0x20 [] tty_ldisc_receive_buf+0x22/0x50 [] flush_to_ldisc+0xbe/0xd0 [] process_one_work+0x1ed/0x6e0 [] ? process_one_work+0x16f/0x6e0 [] worker_thread+0x4e/0x490 [] ? process_one_work+0x6e0/0x6e0 [] kthread+0xf2/0x110 [] ? preempt_count_sub+0x4c/0x80 [] ret_from_fork+0x22/0x50 [] ? kthread_create_on_node+0x220/0x220 Code: ff ff e8 27 a0 35 00 48 8d 83 78 05 00 00 c7 45 c0 00 00 00 00 48 89 45 80 48 8d 83 e0 05 00 00 48 89 85 78 ff ff ff 48 8b 45 b8 <48> 8b b8 60 22 00 00 48 8b 30 89 f8 8b 8b 88 04 00 00 29 f0 8d RIP [] n_tty_receive_buf_common+0x6d/0xb80 RSP CR2: 0000000000002260 Ensure the kworker cannot obtain the ldisc reference until the new ldisc is completely initialized. Fixes: 892d1fa7eaae ("tty: Destroy ldisc instance on hangup") Reported-by: Mikulas Patocka Signed-off-by: Peter Hurley Signed-off-by: Michael Neuling Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_ldisc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 77dae6134440420bac334581a3ccee94cee1c054 Author: Wang YanQing Date: Wed Feb 22 19:37:08 2017 +0800 tty: pty: Fix ldisc flush after userspace become aware of the data already While using emacs, cat or others' commands in konsole with recent kernels, I have met many times that CTRL-C freeze konsole. After konsole freeze I can't type anything, then I have to open a new one, it is very annoying. See bug report: https://bugs.kde.org/show_bug.cgi?id=175283 The platform in that bug report is Solaris, but now the pty in linux has the same problem or the same behavior as Solaris :) It has high possibility to trigger the problem follow steps below: Note: In my test, BigFile is a text file whose size is bigger than 1G 1:open konsole 1:cat BigFile 2:CTRL-C After some digging, I find out the reason is that commit 1d1d14da12e7 ("pty: Fix buffer flush deadlock") changes the behavior of pty_flush_buffer. Thread A Thread B -------- -------- 1:n_tty_poll return POLLIN 2:CTRL-C trigger pty_flush_buffer tty_buffer_flush n_tty_flush_buffer 3:attempt to check count of chars: ioctl(fd, TIOCINQ, &available) available is equal to 0 4:read(fd, buffer, avaiable) return 0 5:konsole close fd Yes, I know we could use the same patch included in the BUG report as a workaround for linux platform too. But I think the data in ldisc is belong to application of another side, we shouldn't clear it when we want to flush write buffer of this side in pty_flush_buffer. So I think it is better to disable ldisc flush in pty_flush_buffer, because its new hehavior bring no benefit except that it mess up the behavior between POLLIN, and TIOCINQ or FIONREAD. Also I find no flush_buffer function in others' tty driver has the same behavior as current pty_flush_buffer. Fixes: 1d1d14da12e7 ("pty: Fix buffer flush deadlock") CC: stable@vger.kernel.org # v4.0+ Signed-off-by: Wang YanQing Signed-off-by: Greg Kroah-Hartman drivers/tty/pty.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit b44b96a060f3fd06456214cac7dfdd3ddf0caf2b Author: Sam Povilus Date: Wed Mar 15 20:43:24 2017 -0600 uartlite: Adding a kernel parameter for the number of uartlites The number of uartlites should be set by a kernel parameter instead of using a #define. This allows the user to set the number of uartlites using only kconfig and not modifying kernel source. The uartlite is used by FPGAs that support a basically unlimited number of uarts so limiting it at 16 dosn't make sense as users might need more than that. Signed-off-by: Sam Povilus Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/Kconfig | 9 +++++++++ drivers/tty/serial/uartlite.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) commit 81e33b51ed69d2b2eaf3fbeb043144b9d9ec7629 Author: Shubhrajyoti Datta Date: Wed Mar 15 08:38:56 2017 -0700 serial: xuartps: Cleanup the clock enable The core handles the clocking now. Remove the clock disable in suspend. In resume we enable the clocks and disable after register write. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 9d1d994d33fe4863c8caeeaac264664815f4c321 Author: Andrey Smirnov Date: Thu Mar 16 08:14:16 2017 -0700 linux/serdev.h: Replace 'ctrl->serdev' with 'serdev' Replace 'ctrl->serdev' with 'serdev' in serdev_controller_write_wakeup() and serdev_controller_receive_buf(). Cc: Rob Herring Cc: cphealy@gmail.com Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Andrey Smirnov Signed-off-by: Greg Kroah-Hartman include/linux/serdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0dcc0542a00656f6b4ae0ff9f0ba06b6ceec257e Author: Tobias Klauser Date: Tue Mar 14 14:11:25 2017 +0100 serial: altera_jtaguart: add earlycon support Nios2 currently uses its own early printk implementation, rather than using unified earlycon support to show boot messages on altera_jtaguart (and altera_uart for that matter). Add earlycon support to altera_jtaguart so that other archs may use it. Also, this will allow the early printk implementation in arch/nios2 to eventually be removed in a future patch. Cc: Ley Foon Tan Signed-off-by: Tobias Klauser Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/Kconfig | 1 + drivers/tty/serial/altera_jtaguart.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) commit 47baf1ad81ed10c158c314ab9f304e674ae32531 Author: Tobias Klauser Date: Mon Mar 13 12:00:50 2017 +0100 tty: n_gsm: Use net_device_stats from struct net_device Instead of using a private copy of struct net_device_stats in struct gsm_mux_net, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit d437fa9109bab8b83a9427d48bebff6c3e053010 Author: Joe Perches Date: Thu Feb 16 23:11:44 2017 -0800 drivers/tty: Convert remaining uses of pr_warning to pr_warn To enable eventual removal of pr_warning This makes pr_warn use consistent for drivers/tty Prior to this patch, there were 2 uses of pr_warning and 23 uses of pr_warn in drivers/tty Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman drivers/tty/hvc/hvcs.c | 2 +- drivers/tty/tty_io.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit fe723dff0fa4181ddb8116e72bc67d00d4239cb6 Author: Manish Awasthi Date: Thu Mar 16 16:16:17 2017 -0700 liquidio: fix wrong information about link modes reported to ethtool Information reported to ethtool about link modes is wrong for 25G NIC. Fix it by checking for presence of 25G NIC, checking the link speed reported by NIC firmware, and then assigning proper values to the ethtool_link_ksettings struct. Signed-off-by: Manish Awasthi Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 513d2d01b7df2ac7e2a3482cbefcacc83c174b55 Merge: 3a70418 76f5ed8 Author: David S. Miller Date: Thu Mar 16 21:39:51 2017 -0700 Merge branch 'netvsc-small-changes' Stephen Hemminger says: ==================== netvsc: small changes for net-next One bugfix, and two non-code patches ==================== Signed-off-by: David S. Miller commit 76f5ed881c8de0264283c5b934deb33bf87209a8 Author: stephen hemminger Date: Thu Mar 16 16:12:39 2017 -0700 netvsc: remove unused #define Not used anywhere. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 3 --- 1 file changed, 3 deletions(-) commit 262b7f142a50badde4032e925902a0d0ad89eb7f Author: stephen hemminger Date: Thu Mar 16 16:12:38 2017 -0700 netvsc: add comments about callback's and NAPI Add some short description of how callback's and NAPI interoperate. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 6de38af611ca81a970965c06231cd2d5f30b2566 Author: stephen hemminger Date: Thu Mar 16 16:12:37 2017 -0700 netvsc: avoid race with callback Change the argument to channel callback from the channel pointer to the internal data structure containing per-channel info. This avoids any possible races when callback happens during initialization and makes IRQ code simpler. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 18 +++++------------- drivers/net/hyperv/rndis_filter.c | 15 ++++++++++----- 2 files changed, 15 insertions(+), 18 deletions(-) commit d3d6ef1fb908b286a610fe063613e519bc50178b Author: Yoshihiro Shimoda Date: Mon Mar 13 15:25:24 2017 +0900 usb: host: ohci-platform: set hcd->phy to avoid phy_get() in usb_add_hcd() This patch sets hcd->phy from own phy context to avoid phy_get() in usb_add_hcd(). Since core/hcd.c manages the phy only in usb_add_hcd() and usb_remove_hcd(), there is difficult to manage the phy in suspend/resume. Signed-off-by: Yoshihiro Shimoda Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-platform.c | 3 +++ 1 file changed, 3 insertions(+) commit 42a58c9949ddf16e557f5c2e22566f3440e7b60f Author: Yoshihiro Shimoda Date: Mon Mar 13 15:25:23 2017 +0900 usb: host: ehci-platform: set hcd->phy to avoid phy_get() in usb_add_hcd() This patch sets hcd->phy from own phy context to avoid phy_get() in usb_add_hcd(). Since core/hcd.c manages the phy only in usb_add_hcd() and usb_remove_hcd(), there is difficult to manage the phy in suspend/resume. Signed-off-by: Yoshihiro Shimoda Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-platform.c | 3 +++ 1 file changed, 3 insertions(+) commit 4fc056ed55d2378905983c753afa64fb2c7e7f29 Author: Gregory CLEMENT Date: Thu Mar 9 18:52:58 2017 +0100 ARM64: dts: marvell: armada-37xx: Add USB2 node Armada 37xx SoC embedded an EHCI controller. This patch adds the device tree node enabling its support. Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT Signed-off-by: Greg Kroah-Hartman arch/arm64/boot/dts/marvell/armada-3720-db.dts | 6 ++++++ arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 7 +++++++ 2 files changed, 13 insertions(+) commit ccc0d3850ba08a099b52a4da2cbd7e9ec8029a47 Author: Gregory CLEMENT Date: Thu Mar 9 18:52:57 2017 +0100 usb: host: Allow to build ehci orion with mvebu SoCs The mvebu ARM64 SoCs no longer select PLAT_ORION. However Armada 37xx use the Orion EHCI controller. This patch allows the Orion EHCI driver to be built when ARCH_MVEBU is selected. Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT Signed-off-by: Greg Kroah-Hartman drivers/usb/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 356c50079b96e5947db4a974da620cd2c4b20e9e Author: Hua Jing Date: Thu Mar 9 18:52:56 2017 +0100 usb: orion-ehci: Add support for the Armada 3700 - Add a new compatible string for the Armada 3700 SoCs - add sbuscfg support for orion usb controller driver. For the SoCs without hlock, need to program BAWR/BARD/AHBBRST fields in the sbuscfg register to guarantee the AHB master's burst would not overrun or underrun the FIFO. - the sbuscfg register has to be set after the usb controller reset, otherwise the value would be overridden to 0. In order to do this, the reset callback is registered. [gregory.clement@free-electrons.com: - reword commit and comments - fix error path in ehci_orion_drv_reset() - fix checkpatch warning] Signed-off-by: Hua Jing Signed-off-by: Gregory CLEMENT Reviewed-by: Andrew Lunn Acked-by: Rob Herring Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/usb/ehci-orion.txt | 4 ++- drivers/usb/host/ehci-orion.c | 36 ++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) commit 8d66db50b2ac9dbf5cca9ede64f1c859d7b86eb6 Author: Elena Reshetova Date: Mon Mar 6 16:21:14 2017 +0200 drivers, usb: convert ep_data.count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/legacy/inode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b7ddc981d7b9e2fbfb33cb7cc47603d6e5d93bc9 Author: Elena Reshetova Date: Mon Mar 6 16:21:13 2017 +0200 drivers, usb: convert dev_data.count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/legacy/inode.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 43938613c6fd2e58a0be212c832e1878bedefe5a Author: Elena Reshetova Date: Mon Mar 6 16:21:12 2017 +0200 drivers, usb: convert ffs_data.ref from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_fs.c | 8 ++++---- drivers/usb/gadget/function/u_fs.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) commit a25557f2472c958536ef8b6a5bf340a008a651b3 Author: Jiri Slaby Date: Wed Mar 15 12:00:09 2017 +0100 USB: misc: sisusb_con: fix coccinelle warning After commit d705ff3818 (tty: vt, cleanup and document con_scroll), in the coccinelle output, we can see: drivers/usb/misc/sisusbvga/sisusb_con.c:852:8-9: WARNING: return of 0/1 in function 'sisusbcon_scroll_area' with return type bool Return true instead of 1 in the function returning bool which was intended to do in d705ff3818 but omitted. Signed-off-by: Jiri Slaby Fixes: d705ff3818 (tty: vt, cleanup and document con_scroll) Cc: Thomas Winischhofer Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Cc: cocci@systeme.lip6.fr Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/sisusbvga/sisusb_con.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd1203c91bd648a31b872e74df8f2003df2c785c Author: Pierre-Yves Kerbrat Date: Tue Feb 28 22:02:51 2017 +0100 usb: storage: karma: remove useless variable Remove the useless variable 'partial' storing the actual length transferred. Nothing was done with it, so simply get rid of it as usb_stor_bulk_transfer_buf can handle having NULL instead. This also fixes the following sparse issues (-Wtypesign): drivers/usb/storage/karma.c:122:51: warning: incorrect type in argument 5 (different signedness) drivers/usb/storage/karma.c:122:51: expected unsigned int *act_len drivers/usb/storage/karma.c:122:51: got int * drivers/usb/storage/karma.c:127:52: warning: incorrect type in argument 5 (different signedness) drivers/usb/storage/karma.c:127:52: expected unsigned int *act_len drivers/usb/storage/karma.c:127:52: got int * Signed-off-by: Pierre-Yves Kerbrat Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/karma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4d72e35da22857b253d0807d0c7a54c3cabf19b5 Author: Milian Reichardt Date: Sat Mar 4 03:42:33 2017 +0100 USB: misc: ldusb: changed '*' location to fit coding Style Changed the location of '*' to fit the current coding style and easy readability. Signed-of-by: Milian Reichardt Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/ldusb.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit e314621b4779f67b17a9a46743e3067c98d1febf Author: Milian Reichardt Date: Sat Mar 4 03:42:34 2017 +0100 USB: misc: ldusb: Added Space after ',' to fit the coding style Added a Space after ',' to get rid of an error message in checkpatch.pl and improve readability Signed-of-by: Milian Reichardt Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/ldusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d1a4673d87689f1822f395b2ed03b0a3ff126ab Author: Milian Reichardt Date: Sat Mar 4 03:42:32 2017 +0100 USB: misc: ldusb: fixed decimal permission coding issue Fixed ERROR: Use 4 digit octal (0777) not decimal permissions to fulfill the current coding-style. Signed-of-by: Milian Reichardt Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/ldusb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 144a3cbe12ecabc0c11f8a0f2c5d878fe4fa6392 Author: Gustavo A. R. Silva Date: Mon Feb 20 17:28:46 2017 -0600 usb: misc: remove unnecessary code 'val' is an unsigned variable, and less-than-zero comparison of an unsigned variable is never true. Addresses-Coverity-ID: 1230257 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Peter Senna Tschudin Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/lvstest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4d75128b8fd727d42c775a16b41634d09409dba Author: Yoshihiro Shimoda Date: Tue Feb 21 19:59:48 2017 +0900 usb: host: ehci-platform: fix usb 1.1 device is not connected in system resume This patch fixes an issue that a usb 1.1 device is not connected in system resume and then the following message appeared if debug messages are enabled: usb 2-1: Waited 2000ms for CONNECT To resolve this issue, the EHCI controller must be resumed after its companion controllers. So, this patch adds such code on the driver. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-platform.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 5095cb89c62acc78b4cfaeb9a4072979d010510a Author: Yoshihiro Shimoda Date: Tue Feb 21 19:59:47 2017 +0900 usb: of: add functions to bind a companion controller EHCI controllers will have a companion controller. However, on platform bus, there was difficult to bind them in previous code. So, this patch adds helper functions to bind them using a "companion" property. Signed-off-by: Yoshihiro Shimoda Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/generic.txt | 1 + drivers/usb/core/of.c | 23 +++++++++++++++++++++++ include/linux/usb/of.h | 5 +++++ 3 files changed, 29 insertions(+) commit cfd6ed4537a9e938fa76facecd4b9cd65b6d1563 Author: Jonathan Dieter Date: Mon Feb 27 10:31:04 2017 +0200 usbip: Fix implicit fallthrough warning GCC 7 now warns when switch statements fall through implicitly, and with -Werror enabled in configure.ac, that makes these tools unbuildable. We fix this by notifying the compiler that this particular case statement is meant to fall through. Reviewed-by: Peter Senna Tschudin Signed-off-by: Jonathan Dieter Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/src/usbip.c | 2 ++ 1 file changed, 2 insertions(+) commit e5dfa3f902b9a642ae8c6997d57d7c41e384a90b Author: Jonathan Dieter Date: Mon Feb 27 10:31:03 2017 +0200 usbip: Fix potential format overflow in userspace tools The usbip userspace tools call sprintf()/snprintf() and don't check for the return value which can lead the paths to overflow, truncating the final file in the path. More urgently, GCC 7 now warns that these aren't checked with -Wformat-overflow, and with -Werror enabled in configure.ac, that makes these tools unbuildable. This patch fixes these problems by replacing sprintf() with snprintf() in one place and adding checks for the return value of snprintf(). Reviewed-by: Peter Senna Tschudin Signed-off-by: Jonathan Dieter Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/libsrc/usbip_common.c | 9 ++++++++- tools/usb/usbip/libsrc/usbip_host_common.c | 28 +++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 6 deletions(-) commit 2c93e790e8253552227bf9b46a8d49dca3f71b06 Author: yuan linyu Date: Sat Feb 25 19:20:55 2017 +0800 usb: add CONFIG_USB_PCI for system have both PCI HW and non-PCI based USB HW a lot of embeded system SOC (e.g. freescale T2080) have both PCI and USB modules. But USB module is controlled by registers directly, it have no relationship with PCI module. when say N here it will not build PCI related code in USB driver. Signed-off-by: yuan linyu Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/Kconfig | 12 +++++++++++- drivers/usb/Makefile | 2 +- drivers/usb/chipidea/Kconfig | 2 +- drivers/usb/core/Makefile | 2 +- drivers/usb/dwc2/Kconfig | 2 +- drivers/usb/dwc3/Kconfig | 2 +- drivers/usb/gadget/udc/Kconfig | 8 ++++---- drivers/usb/gadget/udc/bdc/Kconfig | 2 +- drivers/usb/gadget/udc/net2272.c | 8 ++++---- drivers/usb/gadget/udc/net2272.h | 2 +- drivers/usb/host/Kconfig | 10 +++++----- drivers/usb/host/Makefile | 4 +--- drivers/usb/host/ehci-dbg.c | 2 +- drivers/usb/host/ohci-hcd.c | 2 +- drivers/usb/host/ohci.h | 2 +- drivers/usb/host/pci-quirks.h | 4 ++-- drivers/usb/host/uhci-hcd.c | 2 +- drivers/usb/host/uhci-hcd.h | 2 +- drivers/usb/host/xhci.c | 2 +- drivers/usb/isp1760/isp1760-if.c | 8 ++++---- include/linux/usb/hcd.h | 4 ++-- 21 files changed, 46 insertions(+), 38 deletions(-) commit 3a70418b9c315ca4343d11a82bf1555043056d30 Merge: 4396e46 95ff141 Author: David S. Miller Date: Thu Mar 16 20:44:12 2017 -0700 Merge branch 'bpf-inline-lookups' Alexei Starovoitov says: ==================== bpf: inline bpf_map_lookup_elem() bpf_map_lookup_elem() is one of the most frequently used helper functions. Improve JITed program performance by inlining this helper. bpf_map_type before after hash 58M 74M array 174M 280M The values are number of lookups per second in ideal conditions measured by micro-benchmark in patch 6. The 'perf report' for HASH map type: before: 54.23% map_perf_test [kernel.kallsyms] [k] __htab_map_lookup_elem 14.24% map_perf_test [kernel.kallsyms] [k] lookup_elem_raw 8.84% map_perf_test [kernel.kallsyms] [k] htab_map_lookup_elem 5.93% map_perf_test [kernel.kallsyms] [k] bpf_map_lookup_elem 2.30% map_perf_test [kernel.kallsyms] [k] bpf_prog_da4fc6a3f41761a2 1.49% map_perf_test [kernel.kallsyms] [k] kprobe_ftrace_handler after: 60.03% map_perf_test [kernel.kallsyms] [k] __htab_map_lookup_elem 18.07% map_perf_test [kernel.kallsyms] [k] lookup_elem_raw 2.91% map_perf_test [kernel.kallsyms] [k] bpf_prog_da4fc6a3f41761a2 1.94% map_perf_test [kernel.kallsyms] [k] _einittext 1.90% map_perf_test [kernel.kallsyms] [k] __audit_syscall_exit 1.72% map_perf_test [kernel.kallsyms] [k] kprobe_ftrace_handler so the cost of htab_map_lookup_elem() and bpf_map_lookup_elem() is gone after inlining. 'per-cpu' and 'lru' map types can be optimized similarly in the future. Note the sparse will complain that bpf is addictive ;) kernel/bpf/hashtab.c:438:19: sparse: subtraction of functions? Share your drugs kernel/bpf/verifier.c:3342:38: sparse: subtraction of functions? Share your drugs it's not a new warning, just in new places. ==================== Signed-off-by: David S. Miller commit 95ff141e52f84f476fcde50560f42d4f118539c0 Author: Alexei Starovoitov Date: Wed Mar 15 18:26:44 2017 -0700 samples/bpf: add map_lookup microbenchmark $ map_perf_test 128 speed of HASH bpf_map_lookup_elem() in lookups per second w/o JIT w/JIT before 46M 58M after 42M 74M perf report before: 54.23% map_perf_test [kernel.kallsyms] [k] __htab_map_lookup_elem 14.24% map_perf_test [kernel.kallsyms] [k] lookup_elem_raw 8.84% map_perf_test [kernel.kallsyms] [k] htab_map_lookup_elem 5.93% map_perf_test [kernel.kallsyms] [k] bpf_map_lookup_elem 2.30% map_perf_test [kernel.kallsyms] [k] bpf_prog_da4fc6a3f41761a2 1.49% map_perf_test [kernel.kallsyms] [k] kprobe_ftrace_handler after: 60.03% map_perf_test [kernel.kallsyms] [k] __htab_map_lookup_elem 18.07% map_perf_test [kernel.kallsyms] [k] lookup_elem_raw 2.91% map_perf_test [kernel.kallsyms] [k] bpf_prog_da4fc6a3f41761a2 1.94% map_perf_test [kernel.kallsyms] [k] _einittext 1.90% map_perf_test [kernel.kallsyms] [k] __audit_syscall_exit 1.72% map_perf_test [kernel.kallsyms] [k] kprobe_ftrace_handler Notice that bpf_map_lookup_elem() and htab_map_lookup_elem() are trivial functions, yet they take sizeable amount of cpu time. htab_map_gen_lookup() removes bpf_map_lookup_elem() and converts htab_map_lookup_elem() into three BPF insns which causing cpu time for bpf_prog_da4fc6a3f41761a2() slightly increase. $ map_perf_test 256 speed of ARRAY bpf_map_lookup_elem() in lookups per second w/o JIT w/JIT before 97M 174M after 64M 280M before: 37.33% map_perf_test [kernel.kallsyms] [k] array_map_lookup_elem 13.95% map_perf_test [kernel.kallsyms] [k] bpf_map_lookup_elem 6.54% map_perf_test [kernel.kallsyms] [k] bpf_prog_da4fc6a3f41761a2 4.57% map_perf_test [kernel.kallsyms] [k] kprobe_ftrace_handler after: 32.86% map_perf_test [kernel.kallsyms] [k] bpf_prog_da4fc6a3f41761a2 6.54% map_perf_test [kernel.kallsyms] [k] kprobe_ftrace_handler array_map_gen_lookup() removes calls to array_map_lookup_elem() and bpf_map_lookup_elem() and replaces them with 7 bpf insns. The performance without JIT is slower, since executing extra insns in the interpreter is slower than running native C code, but with JIT the performance gains are obvious, since native C->x86 code is replaced with fewer bpf->x86 instructions. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/map_perf_test_kern.c | 33 +++++++++++++++++++++++++++++++++ samples/bpf/map_perf_test_user.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) commit 9015d2f5953590e8273392b44c2b0f864350b427 Author: Alexei Starovoitov Date: Wed Mar 15 18:26:43 2017 -0700 bpf: inline htab_map_lookup_elem() Optimize: bpf_call bpf_map_lookup_elem map->ops->map_lookup_elem htab_map_lookup_elem __htab_map_lookup_elem into: bpf_call __htab_map_lookup_elem to improve performance of JITed programs. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/hashtab.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit 81ed18ab3098b6519274545e80a29caacb77d160 Author: Alexei Starovoitov Date: Wed Mar 15 18:26:42 2017 -0700 bpf: add helper inlining infra and optimize map_array lookup Optimize bpf_call -> bpf_map_lookup_elem() -> array_map_lookup_elem() into a sequence of bpf instructions. When JIT is on the sequence of bpf instructions is the sequence of native cpu instructions with significantly faster performance than indirect call and two function's prologue/epilogue. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf.h | 1 + include/linux/bpf_verifier.h | 5 ++++- include/linux/filter.h | 10 ++++++++++ kernel/bpf/arraymap.c | 29 +++++++++++++++++++++++++++++ kernel/bpf/verifier.c | 36 +++++++++++++++++++++++++++++++++--- 5 files changed, 77 insertions(+), 4 deletions(-) commit 8041902dae5299c1f194ba42d14383f734631009 Author: Alexei Starovoitov Date: Wed Mar 15 18:26:41 2017 -0700 bpf: adjust insn_aux_data when patching insns convert_ctx_accesses() replaces single bpf instruction with a set of instructions. Adjust corresponding insn_aux_data while patching. It's needed to make sure subsequent 'for(all insn)' loops have matching insn and insn_aux_data. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 44 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 5 deletions(-) commit 79741b3bdec01a8628368fbcfccc7d189ed606cb Author: Alexei Starovoitov Date: Wed Mar 15 18:26:40 2017 -0700 bpf: refactor fixup_bpf_calls() reduce indent and make it iterate over instructions similar to convert_ctx_accesses(). Also convert hard BUG_ON into soft verifier error. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 76 ++++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 41 deletions(-) commit e245c5c6a5656e4d61aa7bb08e9694fd6e5b2b9d Author: Alexei Starovoitov Date: Wed Mar 15 18:26:39 2017 -0700 bpf: move fixup_bpf_calls() function no functional change. move fixup_bpf_calls() to verifier.c it's being refactored in the next patch Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/syscall.c | 56 -------------------------------------------------- kernel/bpf/verifier.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 56 deletions(-) commit 4396e46187ca5070219b81773c4e65088dac50cc Author: Soheil Hassas Yeganeh Date: Wed Mar 15 16:30:46 2017 -0400 tcp: remove tcp_tw_recycle The tcp_tw_recycle was already broken for connections behind NAT, since the per-destination timestamp is not monotonically increasing for multiple machines behind a single destination address. After the randomization of TCP timestamp offsets in commit 8a5bd45f6616 (tcp: randomize tcp timestamp offsets for each connection), the tcp_tw_recycle is broken for all types of connections for the same reason: the timestamps received from a single machine is not monotonically increasing, anymore. Remove tcp_tw_recycle, since it is not functional. Also, remove the PAWSPassive SNMP counter since it is only used for tcp_tw_recycle, and simplify tcp_v4_route_req and tcp_v6_route_req since the strict argument is only set when tcp_tw_recycle is enabled. Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Cc: Lutz Vieweg Cc: Florian Westphal Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 5 ----- include/net/netns/ipv4.h | 1 - include/net/tcp.h | 3 +-- include/uapi/linux/snmp.h | 1 - net/ipv4/proc.c | 1 - net/ipv4/sysctl_net_ipv4.c | 7 ------- net/ipv4/tcp_input.c | 30 +++++------------------------- net/ipv4/tcp_ipv4.c | 15 ++------------- net/ipv6/tcp_ipv6.c | 5 +---- 9 files changed, 9 insertions(+), 59 deletions(-) commit d82bae12dc38d79a2b77473f5eb0612a3d69c55b Author: Soheil Hassas Yeganeh Date: Wed Mar 15 16:30:45 2017 -0400 tcp: remove per-destination timestamp cache Commit 8a5bd45f6616 (tcp: randomize tcp timestamp offsets for each connection) randomizes TCP timestamps per connection. After this commit, there is no guarantee that the timestamps received from the same destination are monotonically increasing. As a result, the per-destination timestamp cache in TCP metrics (i.e., tcpm_ts in struct tcp_metrics_block) is broken and cannot be relied upon. Remove the per-destination timestamp cache and all related code paths. Note that this cache was already broken for caching timestamps of multiple machines behind a NAT sharing the same address. Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Cc: Lutz Vieweg Cc: Florian Westphal Signed-off-by: David S. Miller include/net/tcp.h | 6 +- net/ipv4/tcp_input.c | 6 +- net/ipv4/tcp_ipv4.c | 4 -- net/ipv4/tcp_metrics.c | 147 ++--------------------------------------------- net/ipv4/tcp_minisocks.c | 22 ++----- net/ipv6/tcp_ipv6.c | 5 -- 6 files changed, 11 insertions(+), 179 deletions(-) commit 8b705f5241adb2d0b5d009abea5a865601666974 Merge: 19ddde1 9c5a3a1 Author: David S. Miller Date: Thu Mar 16 20:29:55 2017 -0700 Merge branch 'sunvnet-better-connection-management' Shannon Nelson says: ==================== sunvnet: better connection management These patches remove some problems in handling of carrier state with the ldmvsw vswitch, remove an xoff misuse in sunvnet, and add stats for debug and tracking of point-to-point connections between the ldom VMs. v2: - added ldmvsw ndo_open to reset the LDC channel - updated copyrights ==================== Signed-off-by: David S. Miller commit 9c5a3a1f9388100d4b03e85faf0cce8264985302 Author: Shannon Nelson Date: Tue Mar 14 10:24:43 2017 -0700 sunvnet: xoff not needed when removing port link The sunvnet netdev is connected to the controlling ldom's vswitch for network bridging. However, for higher performance between ldoms, there also is a channel between each client ldom. These connections are represented in the sunvnet driver by a queue for each ldom. The driver uses select_queue to tell the stack which queue to use by tracking the mac addresses on the other end of each port. When a connected ldom shuts down, the driver receives an LDC_EVENT_RESET and the port is removed from the driver, thus a queue with no ldom on the other end will never be selected for Tx. The driver was trying to reinforce the "don't use this queue" notion with netif_tx_stop_queue() and netif_tx_wake_queue(), which really should only be used to signal a Tx queue is full (aka XOFF). This misuse of queue state resulted in NETDEV WATCHDOG messages and lots of unnecessary calls into the driver's tx_timeout handler. Simply removing these takes care of the problem. Orabug: 25190537 Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunvnet_common.c | 4 ---- 1 file changed, 4 deletions(-) commit b12a96f5cd04583f45a1b6554b8f3786b26db913 Author: Shannon Nelson Date: Tue Mar 14 10:24:42 2017 -0700 sunvnet: count multicast packets Make sure multicast packets get counted in the device. Orabug: 25190537 Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunvnet_common.c | 2 ++ 1 file changed, 2 insertions(+) commit e1f1e5f711265ee9d881afd12ff252b2d01e1174 Author: Shannon Nelson Date: Tue Mar 14 10:24:41 2017 -0700 sunvnet: track port queues correctly Track our used and unused queue indexies correctly. Otherwise, as ports dropped out and returned, they all eventually ended up with the same queue index. Orabug: 25190537 Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunvnet_common.c | 24 ++++++++++++++++++++---- drivers/net/ethernet/sun/sunvnet_common.h | 11 ++--------- 2 files changed, 22 insertions(+), 13 deletions(-) commit 0f512c84544b9a8f8de53b6f4bc0c372c45d8693 Author: Shannon Nelson Date: Tue Mar 14 10:24:40 2017 -0700 sunvnet: add stats to track ldom to ldom packets and bytes In this driver, there is a "port" created for the connection to each of the other ldoms; a netdev queue is mapped to each port, and they are collected under a single netdev. The generic netdev statistics show us all the traffic in and out of our network device, but don't show individual queue/port stats. This patch breaks out the traffic counts for the individual ports and gives us a little view into the state of those connections. Orabug: 25190537 Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunvnet.c | 116 +++++++++++++++++++++++++++++- drivers/net/ethernet/sun/sunvnet_common.c | 6 ++ drivers/net/ethernet/sun/sunvnet_common.h | 15 ++++ 3 files changed, 136 insertions(+), 1 deletion(-) commit 867fa150f8f7ee6e9e5a9ab768e2d0dc675a968b Author: Shannon Nelson Date: Tue Mar 14 10:24:39 2017 -0700 ldmvsw: better use of link up and down on ldom vswitch When an ldom VM is bound, the network vswitch infrastructure is set up for it, but was being forced 'UP' by the userland switch configuration script. When 'UP' but not actually connected to a running VM, the ipv6 neighbor probes fail (not a horrible thing) and start cluttering up the kernel logs. Funny thing: these are debug messages that never actually show up, but we do see the net_ratelimited messages that say N callbacks were suppressed. This patch defers the netif_carrier_on() until an actual link has been established with the VM, as indicated by receiving an LDC_EVENT_UP from the underlying LDC protocol. Similarly, we take the link down when we see the LDC_EVENT_RESET. Now when we see the ndo_open(), we reset the link to get things talking again. Orabug: 25525312 Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller drivers/net/ethernet/sun/ldmvsw.c | 27 +++++++++++++++++++++++---- drivers/net/ethernet/sun/sunvnet_common.c | 20 +++++++++++++++++--- drivers/net/ethernet/sun/sunvnet_common.h | 1 + 3 files changed, 41 insertions(+), 7 deletions(-) commit 19ddde1eeca1ee81f4add5e04da66055e09281ac Author: Jarod Wilson Date: Tue Mar 14 11:48:32 2017 -0400 bonding: add 802.3ad support for 25G speeds Cut-n-paste enablement of 802.3ad bonding on 25G NICs, which currently report 0 as their bandwidth. CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson Acked-by: Andy Gospodarek Signed-off-by: David S. Miller drivers/net/bonding/bond_3ad.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit be7164cd579edab53edd184382b0bcd35f3bcc0a Author: chun Long Date: Tue Mar 14 15:26:24 2017 +0800 tcp_westwood: fix tcp_westwood_info() style mistakes replace comma to semi colons in tcp_westwood_info(). Acked-by: Stephen Hemminger Signed-off-by: David S. Miller net/ipv4/tcp_westwood.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0c88a76148432097aa9859bcd08ad07c05507725 Author: Rick Farrington Date: Mon Mar 13 12:58:04 2017 -0700 liquidio: use meaningful names for IRQs All IRQs owned by the PF and VF drivers share the same nondescript name "octeon"; this makes it difficult to setup interrupt affinity. Change the IRQ names to reflect their specific purpose: LiquidIO--- Examples: LiquidIO0-pf0-rxtx-3 LiquidIO1-vf1-rxtx-0 LiquidIO0-pf0-aux We cannot use netdev->name for naming the IRQs because: 1. Early during init, the PF and VF drivers require interrupts to send/receive control data from the NIC firmware; so the PF and VF must request IRQs long before the netdev struct is registered. 2. The IRQ name can only be specified at the time it is requested. It cannot be changed after that. Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas Signed-off-by: Satanand Burla Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 72 ++++++++++++++++++---- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 37 +++++++++-- .../net/ethernet/cavium/liquidio/liquidio_common.h | 5 ++ .../net/ethernet/cavium/liquidio/octeon_device.h | 3 + 4 files changed, 101 insertions(+), 16 deletions(-) commit b229487b36a418c755eab6485aae74582d52d4a4 Author: Rick Farrington Date: Mon Mar 13 12:07:32 2017 -0700 liquidio: remove/replace invalid code Remove invalid call to dma_sync_single_for_cpu() because previous DMA allocation was coherent--not streaming. Remove code that references fields in struct list_head; replace it with calls to list_empty() and list_first_entry(). Also, add comment to clarify complicated if statement. Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas Signed-off-by: Derek Chickles Signed-off-by: David S. Miller .../ethernet/cavium/liquidio/response_manager.c | 26 +++++++++------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit 5080f39e8c72e01cf37e8359023e7018e2a4901e Author: Nik Unger Date: Mon Mar 13 10:16:58 2017 -0700 netem: apply correct delay when rate throttling I recently reported on the netem list that iperf network benchmarks show unexpected results when a bandwidth throttling rate has been configured for netem. Specifically: 1) The measured link bandwidth *increases* when a higher delay is added 2) The measured link bandwidth appears higher than the specified limit 3) The measured link bandwidth for the same very slow settings varies significantly across machines The issue can be reproduced by using tc to configure netem with a 512kbit rate and various (none, 1us, 50ms, 100ms, 200ms) delays on a veth pair between network namespaces, and then using iperf (or any other network benchmarking tool) to test throughput. Complete detailed instructions are in the original email chain here: https://lists.linuxfoundation.org/pipermail/netem/2017-February/001672.html There appear to be two underlying bugs causing these effects: - The first issue causes long delays when the rate is slow and no delay is configured (e.g., "rate 512kbit"). This is because SKBs are not orphaned when no delay is configured, so orphaning does not occur until *after* the rate-induced delay has been applied. For this reason, adding a tiny delay (e.g., "rate 512kbit delay 1us") dramatically increases the measured bandwidth. - The second issue is that rate-induced delays are not correctly applied, allowing SKB delays to occur in parallel. The indended approach is to compute the delay for an SKB and to add this delay to the end of the current queue. However, the code does not detect existing SKBs in the queue due to improperly testing sch->q.qlen, which is nonzero even when packets exist only in the rbtree. Consequently, new SKBs do not wait for the current queue to empty. When packet delays vary significantly (e.g., if packet sizes are different), then this also causes unintended reordering. I modified the code to expect a delay (and orphan the SKB) when a rate is configured. I also added some defensive tests that correctly find the latest scheduled delivery time, even if it is (unexpectedly) for a packet in sch->q. I have tested these changes on the latest kernel (4.11.0-rc1+) and the iperf / ping test results are as expected. Signed-off-by: Nik Unger Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller net/sched/sch_netem.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit b7d6c8db498cdbbd0004970d02c86210ce3a6cbc Author: Alexandre Courbot Date: Fri Mar 10 17:16:48 2017 +0900 drm/nouveau/secboot: fix NULL pointer dereference The msgqueue pointer validity should be checked by its owner, not by the msgqueue code itself to avoid this situation. Signed-off-by: Alexandre Courbot Reported-by: Julia Lawall Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nvkm/engine/sec2/base.c | 7 +++++++ drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.c | 5 ++--- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm20b.c | 6 ++++++ 3 files changed, 15 insertions(+), 3 deletions(-) commit aa7fc0ca759eb25eea6dc0fee4373e5883a17498 Author: Alexandre Courbot Date: Wed Mar 15 14:44:34 2017 +0900 drm/nouveau/secboot: fix inconsistent pointer checking We were returning PTR_ERR() on a NULL pointer, which obviously won't work. nvkm_engine_ref() will return an error in case something went wrong. Signed-off-by: Alexandre Courbot Reported-by: Dan Carpenter Signed-off-by: Dave Airlie drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp102.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 48df498daf62e1292868005675331929305067f0 Author: Guoqing Jiang Date: Tue Mar 14 09:40:20 2017 +0800 md: move bitmap_destroy to the beginning of __md_stop Since we have switched to sync way to handle METADATA_UPDATED msg for md-cluster, then process_metadata_update is depended on mddev->thread->wqueue. With the new change, clustered raid could possible hang if array received a METADATA_UPDATED msg after array unregistered mddev->thread, so we need to stop clustered raid (bitmap_destroy -> bitmap_free -> md_cluster_stop) earlier than unregister thread (mddev_detach -> md_unregister_thread). And this change should be safe for non-clustered raid since all writes are stopped before the destroy. Also in md_run, we activate the personality (pers->run()) before activating the bitmap (bitmap_create()). So it is pleasingly symmetric to stop the bitmap (bitmap_destroy()) before stopping the personality (__md_stop() calls pers->free()), we achieve this by move bitmap_destroy to the beginning of __md_stop. But we don't want to break the codes for waiting behind IO as Shaohua mentioned, so introduce bitmap_wait_behind_writes to call the codes, and call the new fun in both mddev_detach and bitmap_destroy, then we will not break original behind IO code and also fit the new condition well. Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/bitmap.c | 16 ++++++++++++++++ drivers/md/bitmap.h | 1 + drivers/md/md.c | 13 ++----------- 3 files changed, 19 insertions(+), 11 deletions(-) commit ea17481fb48888fa11f412766bde36be9171247e Author: Song Liu Date: Thu Mar 9 21:23:39 2017 -0800 md/r5cache: generate R5LOG_PAYLOAD_FLUSH In r5c_finish_stripe_write_out(), R5LOG_PAYLOAD_FLUSH is append to log->current_io. Appending R5LOG_PAYLOAD_FLUSH in quiesce needs extra writes to journal. To simplify the logic, we just skip R5LOG_PAYLOAD_FLUSH in quiesce. Even R5LOG_PAYLOAD_FLUSH supports multiple stripes per payload. However, current implementation is one stripe per R5LOG_PAYLOAD_FLUSH, which is simpler. Signed-off-by: Song Liu Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 45 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) commit 2d4f468753777a29124f779cdffd1ec009d70597 Author: Song Liu Date: Tue Mar 7 17:44:21 2017 -0800 md/r5cache: handle R5LOG_PAYLOAD_FLUSH in recovery This patch adds handling of R5LOG_PAYLOAD_FLUSH in journal recovery. Next patch will add logic that generate R5LOG_PAYLOAD_FLUSH on flush finish. When R5LOG_PAYLOAD_FLUSH is seen in recovery, pending data and parity will be dropped from recovery. This will reduce the number of stripes to replay, and thus accelerate the recovery process. Signed-off-by: Song Liu Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 47 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 6 deletions(-) commit ba903a3ea465bd2f2bb9316054b295e79a7a518e Author: Artur Paszkiewicz Date: Thu Mar 9 10:00:03 2017 +0100 raid5-ppl: runtime PPL enabling or disabling Allow writing to 'consistency_policy' attribute when the array is active. Add a new function 'change_consistency_policy' to the md_personality operations structure to handle the change in the personality code. Values "ppl" and "resync" are accepted and turn PPL on and off respectively. When enabling PPL its location and size should first be set using 'ppl_sector' and 'ppl_size' attributes and a valid PPL header should be written at this location on each member device. Enabling or disabling PPL is performed under a suspended array. The raid5_reset_stripe_cache function frees the stripe cache and allocates it again in order to allocate or free the ppl_pages for the stripes in the stripe cache. Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li drivers/md/md.c | 12 +++++++++--- drivers/md/md.h | 2 ++ drivers/md/raid5-ppl.c | 4 ++++ drivers/md/raid5.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 3 deletions(-) commit 6358c239d88c751a9f14152a8d4ad2b69f5be48f Author: Artur Paszkiewicz Date: Thu Mar 9 10:00:02 2017 +0100 raid5-ppl: support disk hot add/remove with PPL Add a function to modify the log by removing an rdev when a drive fails or adding when a spare/replacement is activated as a raid member. Removing a disk just clears the child log rdev pointer. No new stripes will be accepted for this child log in ppl_write_stripe() and running io units will be processed without writing PPL to the device. Adding a disk sets the child log rdev pointer and writes an empty PPL header. Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li drivers/md/raid5-log.h | 9 +++++++++ drivers/md/raid5-ppl.c | 45 ++++++++++++++++++++++++++++++++++++++++++++- drivers/md/raid5.c | 12 +++++++++++- 3 files changed, 64 insertions(+), 2 deletions(-) commit 4536bf9ba2d03404655586b07f8830b6f2106242 Author: Artur Paszkiewicz Date: Thu Mar 9 10:00:01 2017 +0100 raid5-ppl: load and recover the log Load the log from each disk when starting the array and recover if the array is dirty. The initial empty PPL is written by mdadm. When loading the log we verify the header checksum and signature. For external metadata arrays the signature is verified in userspace, so here we read it from the header, verifying only if it matches on all disks, and use it later when writing PPL. In addition to the header checksum, each header entry also contains a checksum of its partial parity data. If the header is valid, recovery is performed for each entry until an invalid entry is found. If the array is not degraded and recovery using PPL fully succeeds, there is no need to resync the array because data and parity will be consistent, so in this case resync will be disabled. Due to compatibility with IMSM implementations on other systems, we can't assume that the recovery data block size is always 4K. Writes generated by MD raid5 don't have this issue, but when recovering PPL written in other environments it is possible to have entries with 512-byte sector granularity. The recovery code takes this into account and also the logical sector size of the underlying drives. Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li drivers/md/raid5-ppl.c | 489 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/md/raid5.c | 5 +- 2 files changed, 493 insertions(+), 1 deletion(-) commit 664aed04446c7f653d8acbe2cdf7989f28238524 Author: Artur Paszkiewicz Date: Thu Mar 9 10:00:00 2017 +0100 md: add sysfs entries for PPL Add 'consistency_policy' attribute for array. It indicates how the array maintains consistency in case of unexpected shutdown. Add 'ppl_sector' and 'ppl_size' for rdev, which describe the location and size of the PPL space on the device. They can't be changed for active members if the array is started and PPL is enabled, so in the setter functions only basic checks are performed. More checks are done in ppl_validate_rdev() when starting the log. These attributes are writable to allow enabling PPL for external metadata arrays and (later) to enable/disable PPL for a running array. Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li Documentation/admin-guide/md.rst | 32 ++++++++++- drivers/md/md.c | 115 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+), 3 deletions(-) commit 3418d036c81dcb604b7c7c71b209d5890a8418aa Author: Artur Paszkiewicz Date: Thu Mar 9 09:59:59 2017 +0100 raid5-ppl: Partial Parity Log write logging implementation Implement the calculation of partial parity for a stripe and PPL write logging functionality. The description of PPL is added to the documentation. More details can be found in the comments in raid5-ppl.c. Attach a page for holding the partial parity data to stripe_head. Allocate it only if mddev has the MD_HAS_PPL flag set. Partial parity is the xor of not modified data chunks of a stripe and is calculated as follows: - reconstruct-write case: xor data from all not updated disks in a stripe - read-modify-write case: xor old data and parity from all updated disks in a stripe Implement it using the async_tx API and integrate into raid_run_ops(). It must be called when we still have access to old data, so do it when STRIPE_OP_BIODRAIN is set, but before ops_run_prexor5(). The result is stored into sh->ppl_page. Partial parity is not meaningful for full stripe write and is not stored in the log or used for recovery, so don't attempt to calculate it when stripe has STRIPE_FULL_WRITE. Put the PPL metadata structures to md_p.h because userspace tools (mdadm) will also need to read/write PPL. Warn about using PPL with enabled disk volatile write-back cache for now. It can be removed once disk cache flushing before writing PPL is implemented. Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li Documentation/md/raid5-ppl.txt | 44 +++ drivers/md/Makefile | 2 +- drivers/md/raid5-log.h | 24 ++ drivers/md/raid5-ppl.c | 703 +++++++++++++++++++++++++++++++++++++++++ drivers/md/raid5.c | 64 +++- drivers/md/raid5.h | 10 +- include/uapi/linux/raid/md_p.h | 27 ++ 7 files changed, 869 insertions(+), 5 deletions(-) commit ff875738edd44e3bc892d378deacc50bccc9d70c Author: Artur Paszkiewicz Date: Thu Mar 9 09:59:58 2017 +0100 raid5: separate header for log functions Move raid5-cache declarations from raid5.h to raid5-log.h, add inline wrappers for functions which will be shared with ppl and use them in raid5 core instead of direct calls to raid5-cache. Remove unused parameter from r5c_cache_data(), move two duplicated pr_debug() calls to r5l_init_log(). Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 17 +++++++--- drivers/md/raid5-log.h | 81 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/md/raid5.c | 48 ++++++++-------------------- drivers/md/raid5.h | 30 ------------------ 4 files changed, 107 insertions(+), 69 deletions(-) commit ea0213e0c7cc1c1b52badf27bd7db4f50a67baaa Author: Artur Paszkiewicz Date: Thu Mar 9 09:59:57 2017 +0100 md: superblock changes for PPL Include information about PPL location and size into mdp_superblock_1 and copy it to/from rdev. Because PPL is mutually exclusive with bitmap, put it in place of 'bitmap_offset'. Add a new flag MD_FEATURE_PPL for 'feature_map', analogically to MD_FEATURE_BITMAP_OFFSET. Add MD_HAS_PPL to mddev->flags to indicate that PPL is enabled on an array. Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li drivers/md/md.c | 19 +++++++++++++++++++ drivers/md/md.h | 8 ++++++++ drivers/md/raid0.c | 3 ++- drivers/md/raid1.c | 3 ++- include/uapi/linux/raid/md_p.h | 18 ++++++++++++++---- 5 files changed, 45 insertions(+), 6 deletions(-) commit effe6ee7523aa50d0517bd7da141e112b44d89fa Author: Song Liu Date: Tue Mar 7 16:49:17 2017 -0800 md/r5cache: improve recovery with read ahead page pool In r5cache recovery, the journal device is scanned page by page. Currently, we use sync_page_io() to read journal device. This is not efficient when we have to recovery many stripes from the journal. To improve the speed of recovery, this patch introduces a read ahead page pool (ra_pool) to recovery_ctx. With ra_pool, multiple consecutive pages are read in one IO. Then the recovery code read the journal from ra_pool. With ra_pool, r5l_recovery_ctx has become much bigger. Therefore, r5l_recovery_log() is refactored so r5l_recovery_ctx is not using stack space. Signed-off-by: Song Liu Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 221 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 175 insertions(+), 46 deletions(-) commit aaf9f12ebfafd1ea603d61ead6dbcf456a86e0f3 Author: Shaohua Li Date: Fri Mar 3 22:06:12 2017 -0800 md/raid5: sort bios Previous patch (raid5: only dispatch IO from raid5d for harddisk raid) defers IO dispatching. The goal is to create better IO pattern. At that time, we don't sort the deffered IO and hope the block layer can do IO merge and sort. Now the raid5-cache writeback could create large amount of bios. And if we enable muti-thread for stripe handling, we can't control when to dispatch IO to raid disks. In a lot of time, we are dispatching IO which block layer can't do merge effectively. This patch moves further for the IO dispatching defer. We accumulate bios, but we don't dispatch all the bios after a threshold is met. This 'dispatch partial portion of bios' stragety allows bios coming in a large time window are sent to disks together. At the dispatching time, there is large chance the block layer can merge the bios. To make this more effective, we dispatch IO in ascending order. This increases request merge chance and reduces disk seek. Signed-off-by: Shaohua Li drivers/md/raid5.c | 138 +++++++++++++++++++++++++++++++++++++++++++---------- drivers/md/raid5.h | 14 +++++- 2 files changed, 126 insertions(+), 26 deletions(-) commit 84890c03b6c5d7e8d76ea5e20b6aaf7e7ad410f0 Author: Shaohua Li Date: Wed Feb 15 19:58:05 2017 -0800 md/raid5-cache: bump flush stripe batch size Bump the flush stripe batch size to 2048. For my 12 disks raid array, the stripes takes: 12 * 4k * 2048 = 96MB This is still quite small. A hardware raid card generally has 1GB size, which we suggest the raid5-cache has similar cache size. The advantage of a big batch size is we can dispatch a lot of IO in the same time, then we can do some scheduling to make better IO pattern. Last patch prioritizes stripes, so we don't worry about a big flush stripe batch will starve normal stripes. Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 535ae4eb1225f19e1d1848c65eafea8b7e9112f4 Author: Shaohua Li Date: Wed Feb 15 19:37:32 2017 -0800 md/raid5: prioritize stripes for writeback In raid5-cache writeback mode, we have two types of stripes to handle. - stripes which aren't cached yet - stripes which are cached and flushing out to raid disks Upperlayer is more sensistive to latency of the first type of stripes generally. But we only one handle list for all these stripes, where the two types of stripes are mixed together. When reclaim flushes a lot of stripes, the first type of stripes could be noticeably delayed. On the other hand, if the log space is tight, we'd like to handle the second type of stripes faster and free log space. This patch destinguishes the two types stripes. They are added into different handle list. When we try to get a stripe to handl, we prefer the first type of stripes unless log space is tight. This should have no impact for !writeback case. Signed-off-by: Shaohua Li drivers/md/raid5.c | 48 +++++++++++++++++++++++++++++++++++++++--------- drivers/md/raid5.h | 2 ++ 2 files changed, 41 insertions(+), 9 deletions(-) commit 818da59f97d6764edb91fa9d1f63d333d54eb999 Author: Guoqing Jiang Date: Wed Mar 1 16:42:40 2017 +0800 md-cluster: add the support for resize To update size for cluster raid, we need to make sure all nodes can perform the change successfully. However, it is possible that some of them can't do it due to failure (bitmap_resize could fail). So we need to consider the issue before we set the capacity unconditionally, and we use below steps to perform sanity check. 1. A change the size, then broadcast METADATA_UPDATED msg. 2. B and C receive METADATA_UPDATED change the size excepts call set_capacity, sync_size is not update if the change failed. Also call bitmap_update_sb to sync sb to disk. 3. A checks other node's sync_size, if sync_size has been updated in all nodes, then send CHANGE_CAPACITY msg otherwise send msg to revert previous change. 4. B and C call set_capacity if receive CHANGE_CAPACITY msg, otherwise pers->resize will be called to restore the old value. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li Documentation/md/md-cluster.txt | 2 +- drivers/md/md-cluster.c | 76 +++++++++++++++++++++++++++++++++++++++++ drivers/md/md-cluster.h | 1 + drivers/md/md.c | 21 +++++++++--- 4 files changed, 94 insertions(+), 6 deletions(-) commit b98938d16a108d0201d54b8db1337dac71aebfdd Author: Guoqing Jiang Date: Wed Mar 1 16:42:39 2017 +0800 md-cluster: introduce cluster_check_sync_size Support resize is a little complex for clustered raid, since we need to ensure all the nodes share the same knowledge about the size of raid. We achieve the goal by check the sync_size which is in each node's bitmap, we can only change the capacity after cluster_check_sync_size returns 0. Also, get_bitmap_from_slot is added to get a slot's bitmap. And we exported some funcs since they are used in cluster_check_sync_size(). We can also reuse get_bitmap_from_slot to remove redundant code existed in bitmap_copy_from_slot. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/bitmap.c | 41 ++++++++++++++++++++++++--------- drivers/md/bitmap.h | 2 ++ drivers/md/md-cluster.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+), 10 deletions(-) commit 7da3d203330305695f38302c076ee0d32c005ede Author: Guoqing Jiang Date: Wed Mar 1 16:42:38 2017 +0800 md-cluster: add CHANGE_CAPACITY message type The msg type CHANGE_CAPACITY is introduced to support resize clustered raid in later patch, and it is sent after all the nodes have the same sync_size, receiver node just need to set new capacity once received this msg. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md-cluster.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0ba959774e93911caff596de6391f085fb640ac4 Author: Guoqing Jiang Date: Wed Mar 1 17:30:29 2017 +0800 md-cluster: use sync way to handle METADATA_UPDATED msg Previously, when node received METADATA_UPDATED msg, it just need to wakeup mddev->thread, then md_reload_sb will be called eventually. We taken the asynchronous way to avoid a deadlock issue, the deadlock issue could happen when one node is receiving the METADATA_UPDATED msg (wants reconfig_mutex) and trying to run the path: md_check_recovery -> mddev_trylock(hold reconfig_mutex) -> md_update_sb-metadata_update_start (want EX on token however token is got by the sending node) Since we will support resizing for clustered raid, and we need the metadata update handling to be synchronous so that the initiating node can detect failure, so we need to change the way for handling METADATA_UPDATED msg. But, we obviously need to avoid above deadlock with the sync way. To make this happen, we considered to not hold reconfig_mutex to call md_reload_sb, if some other thread has already taken reconfig_mutex and waiting for the 'token', then process_recvd_msg() can safely call md_reload_sb() without taking the mutex. This is because we can be certain that no other thread will take the mutex, and we also certain that the actions performed by md_reload_sb() won't interfere with anything that the other thread is in the middle of. To make this more concrete, we added a new cinfo->state bit MD_CLUSTER_HOLDING_MUTEX_FOR_RECVD Which is set in lock_token() just before dlm_lock_sync() is called, and cleared just after. As lock_token() is always called with reconfig_mutex() held (the specific case is the resync_info_update which is distinguished well in previous patch), if process_recvd_msg() finds that the new bit is set, then the mutex must be held by some other thread, and it will keep waiting. So process_metadata_update() can call md_reload_sb() if either mddev_trylock() succeeds, or if MD_CLUSTER_HOLDING_MUTEX_FOR_RECVD is set. The tricky bit is what to do if neither of these apply. We need to wait. Fortunately mddev_unlock() always calls wake_up() on mddev->thread->wqueue. So we can get lock_token() to call wake_up() on that when it sets the bit. There are also some related changes inside this commit: 1. remove RELOAD_SB related codes since there are not valid anymore. 2. mddev is added into md_cluster_info then we can get mddev inside lock_token. 3. add new parameter for lock_token to distinguish reconfig_mutex is held or not. And, we need to set MD_CLUSTER_HOLDING_MUTEX_FOR_RECVD in below: 1. set it before unregister thread, otherwise a deadlock could appear if stop a resyncing array. This is because md_unregister_thread(&cinfo->recv_thread) is blocked by recv_daemon -> process_recvd_msg -> process_metadata_update. To resolve the issue, MD_CLUSTER_HOLDING_MUTEX_FOR_RECVD is also need to be set before unregister thread. 2. set it in metadata_update_start to fix another deadlock. a. Node A sends METADATA_UPDATED msg (held Token lock). b. Node B wants to do resync, and is blocked since it can't get Token lock, but MD_CLUSTER_HOLDING_MUTEX_FOR_RECVD is not set since the callchain (md_do_sync -> sync_request -> resync_info_update -> sendmsg -> lock_comm -> lock_token) doesn't hold reconfig_mutex. c. Node B trys to update sb (held reconfig_mutex), but stopped at wait_event() in metadata_update_start since we have set MD_CLUSTER_SEND_LOCK flag in lock_comm (step 2). d. Then Node B receives METADATA_UPDATED msg from A, of course recv_daemon is blocked forever. Since metadata_update_start always calls lock_token with reconfig_mutex, we need to set MD_CLUSTER_HOLDING_MUTEX_FOR_RECVD here as well, and lock_token don't need to set it twice unless lock_token is invoked from lock_comm. Finally, thanks to Neil for his great idea and help! Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md-cluster.c | 82 +++++++++++++++++++++++++++++++++++++++---------- drivers/md/md.c | 4 --- drivers/md/md.h | 3 -- 3 files changed, 66 insertions(+), 23 deletions(-) commit 33bd712be7d2e3bd60262957052abc19c71c4765 Author: Colin Ian King Date: Wed Mar 15 16:46:24 2017 +0000 scsi: esas2r: Remove redundant NULL check on buffer Buffer is a pointer to the static char array event_buffer and therefore can never be null, so the check is redundant. Remove it. Detected by CoverityScan, CID#1077556 ("Logically Dead Code") Signed-off-by: Colin Ian King Acked-by: Bradley Grove Signed-off-by: Martin K. Petersen drivers/scsi/esas2r/esas2r_log.c | 5 ----- 1 file changed, 5 deletions(-) commit 65e9e65cebbea755db638875a44b227a1027570e Author: Dan Carpenter Date: Tue Mar 14 10:56:30 2017 +0300 rtc: cpcap: kfreeing devm allocated memory We shouldn't kfree(rtc) because is devm_ managed memory. It leads to a double free. Fixes: dd3bf50b35e3 ("rtc: cpcap: new rtc driver") Signed-off-by: Dan Carpenter Acked-By: Sebastian Reichel Signed-off-by: Alexandre Belloni drivers/rtc/rtc-cpcap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7a8128e2e2aca47ded4347d97585129e19c82451 Author: Nobuhiro Iwamatsu Date: Sat Mar 11 15:42:13 2017 +0900 rtc: wm8350: Remove unused to_wm8350_from_rtc_dev The to_wm8350_from_rtc_dev macro is not used by anything in the rtc-wm8350 driver. Signed-off-by: Nobuhiro Iwamatsu Acked-by: Charles Keepax Signed-off-by: Alexandre Belloni drivers/rtc/rtc-wm8350.c | 2 -- 1 file changed, 2 deletions(-) commit 3075b62d15df424b8e87447eb13e1604240293f2 Author: Boris Brezillon Date: Wed Mar 15 14:39:11 2017 +0100 pata: remove the at91 driver This driver is orphan since commit b2026f708e09 ("ARM: at91: remove at91sam9260/at91sam9g20 legacy board support"). Given that nobody cared adding DT support to it, it probably means it's no longer used and is thus a good candidate for removal. Signed-off-by: Boris Brezillon Acked-by: Bartlomiej Zolnierkiewicz Acked-by: Nicolas Ferre Signed-off-by: Tejun Heo drivers/ata/Kconfig | 8 - drivers/ata/Makefile | 1 - drivers/ata/pata_at91.c | 503 ------------------------------------------------ 3 files changed, 512 deletions(-) commit f07708c43b37842fcc28faf2404a78c085aab140 Author: Ralph Sennhauser Date: Thu Mar 16 07:34:01 2017 +0100 gpio: mvebu: let the compiler inline A modern compiler should know better when to inline, so drop the inline keywords. Signed-off-by: Ralph Sennhauser Signed-off-by: Linus Walleij drivers/gpio/gpio-mvebu.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit f4c240ca4b15af938d9043b93826201dd8bdf0fb Author: Ralph Sennhauser Date: Thu Mar 16 07:34:00 2017 +0100 gpio: mvebu: extra whitespace fixes Fix whitespace errors missed by checkpatch. Signed-off-by: Ralph Sennhauser Signed-off-by: Linus Walleij drivers/gpio/gpio-mvebu.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 163ad364cc8d77236f68acff6ab3c23ff96b1a36 Author: Ralph Sennhauser Date: Thu Mar 16 07:33:59 2017 +0100 gpio: mvebu: checkpatch: whitespace fixes Fix whitespace errors reported by checkpatch. Signed-off-by: Ralph Sennhauser Signed-off-by: Linus Walleij drivers/gpio/gpio-mvebu.c | 1 + 1 file changed, 1 insertion(+) commit d276de70d2e43c71827d8a253cb72a8b3d012e67 Author: Ralph Sennhauser Date: Thu Mar 16 07:33:58 2017 +0100 gpio: mvebu: checkpatch: unsigned int fixes Use unsigned int instead of plain unsigned as reported by checkpatch. Signed-off-by: Ralph Sennhauser Signed-off-by: Linus Walleij drivers/gpio/gpio-mvebu.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 899c37edfedbe1a732ecb7619748f9839227ede5 Author: Ralph Sennhauser Date: Thu Mar 16 07:33:57 2017 +0100 gpio: mvebu: start multiline block comments with blank line While this isn't an issue according to checkpatch two styles are used. Add a blank line to the block comments missing a blank line at the start so multiline block comments look the same across the file. Signed-off-by: Ralph Sennhauser Signed-off-by: Linus Walleij drivers/gpio/gpio-mvebu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7077f4cc1efc998dbaf9b516c7acf8f1397ccf22 Author: Ralph Sennhauser Date: Thu Mar 16 07:33:56 2017 +0100 gpio: mvebu: checkpatch: block comment fixes Fix issues in block comments reported by checkpatch. Signed-off-by: Ralph Sennhauser Signed-off-by: Linus Walleij drivers/gpio/gpio-mvebu.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 6798d7271cb44ba8354356a389047d84058a7828 Author: Hans de Goede Date: Mon Mar 13 23:04:21 2017 +0100 gpio: acpi: Ignore -EPROBE_DEFER for unselected gpioints When acpi_dev_gpio_irq_get gets called with an index of say 2, it should not care if acpi_get_gpiod for index 0 or 1 returns -EPROBE_DEFER. This allows drivers which request a gpioint with index > 0 to function if there is no gpiochip driver (loaded) for gpioints with a lower index. Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit c5097538c86a60c655f7fac33dfd565d22909dae Author: Andy Shevchenko Date: Mon Feb 20 18:15:49 2017 +0200 Input: soc_button_array - Propagate error from gpiod_count() Since gpiod_count() does not return 0 anymore, we don't need to shadow its error code and would safely propagate to the user. While here, replace second parameter by NULL in order to prevent side effects on _DSD enabled firmware. Cc: Benjamin Tissoires Signed-off-by: Andy Shevchenko Acked-by: Dmitry Torokhov Signed-off-by: Linus Walleij drivers/input/misc/soc_button_array.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 562e7a4032d1ff33e283d7ba1d5f10fe7ea96669 Author: Andy Shevchenko Date: Mon Feb 20 18:15:48 2017 +0200 platform/x86: surface3_button: Propagate error from gpiod_count() Since gpiod_count() does not return 0 anymore, we don't need to shadow its error code and would safely propagate to the user. While here, replace second parameter by NULL in order to prevent side effects on _DSD enabled firmware. Cc: Benjamin Tissoires Signed-off-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/platform/x86/surface3_button.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4033d4a4f5236b01200010bf38928347af75d86e Author: Andy Shevchenko Date: Mon Feb 20 18:15:47 2017 +0200 gpio: of: Don't return 0 on dt_gpio_count() It's unusual to have error checking like (ret <= 0) in cases when counting GPIO resources. In case when it's mandatory we propagate the error (-ENOENT), otherwise we don't use the result. This makes consistent behaviour across all possible variants called in gpiod_count(). Signed-off-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4ed55016d763325887461d43d0aec4010adcab65 Author: Andy Shevchenko Date: Mon Feb 20 18:15:46 2017 +0200 gpio: acpi: Don't return 0 on acpi_gpio_count() It's unusual to have error checking like (ret <= 0) in cases when counting GPIO resources. In case when it's mandatory we propagate the error (-ENOENT), otherwise we don't use the result. This makes consistent behaviour across all possible variants called in gpiod_count(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 529f75d8ca214aa52ed609d1a909bbe3a71504bf Author: Jayachandran C Date: Sun Mar 12 11:14:28 2017 +0000 gpio: xlp: Update for ARCH_THUNDER2 ARCH_VULCAN arm64 platform (for Broadcom Vulcan ARM64 processors) has been discontinued. Cavium's ThunderX2 CN99XX (ARCH_THUNDER2) will be the next revision of this platform. Update compile dependencies and ACPI ID to reflect this change. Signed-off-by: Jayachandran C [Drop depreciation of ARCH_VULCAN] Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-xlp.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 8c41ab4f0521918452851392ed40ed03923623e2 Author: Julia Cartwright Date: Thu Mar 9 10:21:58 2017 -0600 gpio: zx: make use of raw_spinlock variants The zx gpio driver currently implements an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Signed-off-by: Linus Walleij drivers/gpio/gpio-zx.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit a0a584f0e92af068f4308586bad1ca5ea1e28d79 Author: Julia Cartwright Date: Thu Mar 9 10:21:57 2017 -0600 gpio: ws16c48: make use of raw_spinlock variants The ws16c48 gpio driver currently implements an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Acked-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-ws16c48.c | 46 ++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit 99b9b45de8808994ea9a176241e52bb6fab71cdd Author: Julia Cartwright Date: Thu Mar 9 10:21:56 2017 -0600 gpio: pl061: make use of raw_spinlock variants The pl061 gpio driver currently implements an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Signed-off-by: Linus Walleij drivers/gpio/gpio-pl061.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit f9c56536d50b4c55d42d7fb3396501906f7518fa Author: Julia Cartwright Date: Thu Mar 9 10:21:55 2017 -0600 gpio: etraxfs: make use of raw_spinlock variants The etraxfs gpio driver currently implements an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Signed-off-by: Linus Walleij drivers/gpio/gpio-etraxfs.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit a080ce53eea56407779eb7ccf0ff00af0734bcdf Author: Julia Cartwright Date: Thu Mar 9 10:21:53 2017 -0600 gpio: ath79: make use of raw_spinlock variants The ath79 gpio driver currently implements an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Acked-by: Aban Bedel Signed-off-by: Linus Walleij drivers/gpio/gpio-ath79.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit c69fcea57e9d2b27025235b3205861c3895fa618 Author: Julia Cartwright Date: Thu Mar 9 10:21:54 2017 -0600 gpio: bcm-kona: make use of raw_spinlock variants The bcm-kona gpio driver currently implements an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Signed-off-by: Linus Walleij drivers/gpio/gpio-bcm-kona.c | 48 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) commit 45897809d518c7a84b215c79b58e4add9b8a1d40 Author: Julia Cartwright Date: Thu Mar 9 10:21:52 2017 -0600 gpio: 104-dio-48e: make use of raw_spinlock variants The 104-dio-48e gpio driver currently implements an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Acked-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-dio-48e.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 21d01c9c081ab231d6ef9d94ad9345c58b6568c1 Author: Julia Cartwright Date: Thu Mar 9 10:21:49 2017 -0600 gpio: altera: make use of raw_spinlock variants The altera gpio driver currently implements an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Signed-off-by: Linus Walleij drivers/gpio/gpio-altera.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit a533b4ba776c16bce53b9739c47409ed3cfe5776 Author: Chris Wilson Date: Thu Mar 16 17:16:28 2017 +0000 drm/i915: Assert that the context pin_counts do not overflow This should be impossible, but let's assert that we do not pin a context 4 billion times before retiring! v2: Fix the assertion -- the patch had just one job to do! Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170316171628.3228-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_lrc.c | 1 + drivers/gpu/drm/i915/intel_ringbuffer.c | 1 + 2 files changed, 2 insertions(+) commit e584b06c4730f1b6d9ccb47fc8b7d79411eb9012 Author: Jon Mason Date: Wed Mar 1 10:53:13 2017 -0500 PCI: iproc: Add PCI_DOMAIN dependency to PCI Kconfig 2+ PCI devices fail to be discovered due to each bus having the same PCI domain. This is because the domain defined in the device tree file is not being added due to PCI_DOMAIN not being enabled. So, every PCI bus has a domain of zero. When PCI_DOMAIN is selected by the Kconfig, it picks up the domain defined in the device tree file and everything works as expected. Since both PCIE_IPROC_PLATFORM and PCIE_IPROC_BCMA need PCI_DOMAIN, move it to PCIE_IPROC so it will be automatically selected for both. Signed-off-by: Jon Mason Signed-off-by: Bjorn Helgaas drivers/pci/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7a2bd6544657f125d2c8a8b4f231a8cd225ee8f Author: Sven Eckelmann Date: Wed Feb 22 17:16:42 2017 +0100 batman-adv: Convert BATADV_PRINT_VID macro to function The BATADV_PRINT_VID is not free of of possible side-effects. This can be avoided when the the macro is converted to a simple inline function. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bridge_loop_avoidance.c | 38 +++++++++++++++++----------------- net/batman-adv/distributed-arp-table.c | 6 +++--- net/batman-adv/main.h | 16 ++++++++++++-- net/batman-adv/translation-table.c | 36 ++++++++++++++++---------------- 4 files changed, 54 insertions(+), 42 deletions(-) commit a09c94d07becd85b5be57074fd4553e197ce97a4 Author: Sven Eckelmann Date: Wed Feb 22 17:16:41 2017 +0100 batman-adv: Fix possible side-effects in _batadv_dbg An argument of a macro should not be evaluated multiple times. Otherwise embedded operations in these arguments will be executed multiple times. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/log.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1fda4c0ac00353beceb33b524888c3b71432b6d6 Author: Sven Eckelmann Date: Wed Feb 22 17:16:40 2017 +0100 batman-adv: Fix unbalanced braces around else statement Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/translation-table.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c1bacea053fdaa20cbb37287eb33198ddef255bd Author: Sven Eckelmann Date: Wed Feb 22 17:16:39 2017 +0100 batman-adv: Reduce preprocessor checks in multicast.c It is not necessary to disable these code sections in case other kernel features are disabled. Instead the IS_ENABLED tests can be added directly in the code and the compiler can remove the unnecessary code parts during its optimization run. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/multicast.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit b96a89818805d90513ac5516e17ecd9d8c19313a Author: Simon Wunderlich Date: Tue Feb 28 17:25:12 2017 +0100 batman-adv: Start new development cycle Signed-off-by: Simon Wunderlich net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc963a11b67b796c25c5b827b25d2bcc92ce1779 Author: Bob Peterson Date: Thu Mar 16 15:29:13 2017 -0400 GFS2: Temporarily zero i_no_addr when creating a dinode Before this patch i_no_addr was not initialized until after the return from allocating its block. That meant the i_no_addr was temporarily uninitialized storage. Ordinarily that's not a concern, but if inplace_reserve can't find space, it can call try_rgrp_unlink which references i_no_addr as a block to avoid. That can result in unpredictable behavior. More importantly, the trace point in gfs2_alloc_blocks references ip->i_no_addr before it is set, which is misleading when reading the kernel traces. This patch makes it look like the new dinode block was assigned in the name of inode 0 rather than a random inode that's completely unrelated. Signed-off-by: Bob Peterson fs/gfs2/inode.c | 1 + 1 file changed, 1 insertion(+) commit cd918afd023a7c213a5b0a397c94c91c96b36e35 Merge: 2f77139 a5e6a3b Author: David S. Miller Date: Thu Mar 16 12:02:15 2017 -0700 Merge branch 'sched-cleanups' Or Gerlitz says: ==================== small set of sched cleanups Just two cleanups -- but for the 2nd one I think we need ack from Cong Wang to make sure this isn't actually a bug report.. changes from V1: - addressed comment from Sergei to use 12 hex digits etc ==================== Signed-off-by: David S. Miller commit a5e6a3b0222fb19eaae424226533eadb0be20e93 Author: Or Gerlitz Date: Thu Mar 16 12:53:42 2017 +0200 net/sched: fq_codel: Avoid set-but-unused variable The code introduced by commit 2ccccf5fb43f ("net_sched: update hierarchical backlog too") only sets prev_backlog in fq_codel_dequeue() but not using that anywhere, remove that setting. Cc: Cong Wang Signed-off-by: Or Gerlitz Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/sched/sch_fq_codel.c | 2 -- 1 file changed, 2 deletions(-) commit 4dba87b07394ebf9fa4693d90f4074bda977449b Author: Or Gerlitz Date: Thu Mar 16 12:53:41 2017 +0200 net/sched: act_ife: Staticfy find_decode_metaid() As it's used only on that file. Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller net/sched/act_ife.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2f771399a3a2c371c140ff33544a583c6fbc5fd9 Author: Steve Lin Date: Thu Mar 16 11:48:58 2017 -0400 net: ethernet: bgmac: Allow MAC address to be specified in DTB Allows the BCMA version of the bgmac driver to obtain MAC address from the device tree. If no MAC address is specified there, then the previous behavior (obtaining MAC address from SPROM) is used. Signed-off-by: Steve Lin Reviewed-by: Florian Fainelli Acked-by: Jon Mason Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac-bcma.c | 39 ++++++++++++++++++------------ 1 file changed, 23 insertions(+), 16 deletions(-) commit bdd3c25423cb42171446940bca0946e0443e1a84 Author: Stefan Wahren Date: Sat Mar 4 09:43:51 2017 +0000 ARM: bcm2835: Enable missing CMA settings for VC4 driver Currently bcm2835_defconfig has CMA disabled which makes the HDMI output on a Raspberry Pi 1 stop working during boot: fb: switching to vc4drmfb from simple Console: switching to colour dummy device 80x30 [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0 [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [drm] Driver supports precise vblank timestamp query. vc4-drm soc:gpu: failed to allocate buffer with size 9216000 vc4-drm soc:gpu: Failed to set initial hw configuration. So enable CMA and DMA_CMA in bcm2835_defconfig. Signed-off-by: Stefan Wahren Fixes: 4400d9ac05ee ("ARM: bcm2835: Enable the VC4 graphics driver in the defconfig") Reviewed-by: Eric Anholt arch/arm/configs/bcm2835_defconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 01ac2994c0d566f2e816ef0c88ab8e4f8b1b3ed1 Author: Christophe Leroy Date: Thu Mar 16 10:18:04 2017 +0100 net: ethernet: fs_enet: Remove useless includes CONFIG_8xx is being deprecated. Since the includes dependent on CONFIG_8xx are useless, just drop them. Signed-off-by: Christophe Leroy Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 6 ------ drivers/net/ethernet/freescale/fs_enet/mac-scc.c | 6 ------ 2 files changed, 12 deletions(-) commit b79df0fc60c5b459ac7ba60c03467d672745954b Author: Christophe Leroy Date: Thu Mar 16 10:18:02 2017 +0100 isdn: hardware: mISDN: Remove reference to CONFIG_8xx CONFIG_8xx is deprecated and should soon be removed in favor of CONFIG_PPC_8xx. Anyway, hfc_multi_8xx.h only uses 8xx I/O ports which are linked to the CPM1 communication processor included in the 8xx rather than the 8xx itself. This patch therefore makes it dependent on CONFIG_CPM1 instead, like several other drivers. Signed-off-by: Christophe Leroy Signed-off-by: David S. Miller drivers/isdn/hardware/mISDN/Kconfig | 6 +++--- drivers/isdn/hardware/mISDN/hfc_multi_8xx.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit d46d2c6380c10e80e99f6af9067356128bffac6b Author: Boris Brezillon Date: Thu Feb 2 11:37:36 2017 +0100 ARM: dts: bcm283x: Add HDMI audio related properties Add the dmas and dma-names properties to support HDMI audio. Signed-off-by: Boris Brezillon Signed-off-by: Eric Anholt arch/arm/boot/dts/bcm283x.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit bb7d78568814a31a11fa14f1479a9fe51f1582ad Author: Eric Anholt Date: Mon Feb 27 12:28:02 2017 -0800 drm/vc4: Add HDMI audio support The HDMI encoder IP embeds all needed blocks to output audio, with a custom DAI called MAI moving audio between the two parts of the HDMI core. This driver now exposes a sound card to let users stream audio to their display. Using the hdmi-codec driver has been considered here, but MAI meant having to significantly rework hdmi-codec, and it would have left little shared code with the I2S mode anyway. The encoder requires that the audio be SPDIF-formatted frames only, which alsalib will format-convert for us. This patch is the combined work of Eric Anholt (initial register setup with a separate dmaengine driver and using simple-audio-card) and Boris Brezillon (moving it all into HDMI, massive debug to get it actually working), and which Eric has the permission to release. v2: Drop "-audio" from sound card name, since that's already implied (suggestion by Boris) Signed-off-by: Eric Anholt Acked-by: Boris Brezillon Link: http://patchwork.freedesktop.org/patch/msgid/20170227202803.12855-2-eric@anholt.net drivers/gpu/drm/vc4/Kconfig | 4 + drivers/gpu/drm/vc4/vc4_hdmi.c | 494 ++++++++++++++++++++++++++++++++++++++++- drivers/gpu/drm/vc4/vc4_regs.h | 107 ++++++++- 3 files changed, 603 insertions(+), 2 deletions(-) commit 199a76946d4303ce047e6ac9a49eefa0105f6e78 Author: Boris Brezillon Date: Mon Feb 27 12:28:01 2017 -0800 dt-bindings: Document the dmas and dma-names properties for VC4 HDMI These are optional, but necessary for HDMI audio support. Signed-off-by: Boris Brezillon Signed-off-by: Eric Anholt Acked-by: Rob Herring Link: http://patchwork.freedesktop.org/patch/msgid/20170227202803.12855-1-eric@anholt.net Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt | 3 +++ 1 file changed, 3 insertions(+) commit 9768b45ceb0bc7bdee61837afad331dd6bf7977f Author: Jane Li Date: Thu Mar 16 16:22:28 2017 +0800 net: mvneta: support suspend and resume Add basic support for handling suspend and resume. Signed-off-by: Jane Li Reviewed-by: Jisheng Zhang Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 61 ++++++++++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 4 deletions(-) commit 7e3f4f3ac5b5fe2615eb7feb96e9d84a0ee78856 Merge: ce594e9 c7f6e66 Author: David S. Miller Date: Thu Mar 16 10:18:35 2017 -0700 Merge branch 'mlxsw-vrf' Jiri Pirko says: ==================== mlxsw: Enable VRF offload Ido says: Packets received from netdevs enslaved to different VRF devices are forwarded using different FIB tables. In the Spectrum ASIC this is achieved by binding different router interfaces (RIFs) to different virtual routers (VRs). Each RIF represents an enslaved netdev and each VR has its own FIB table according to which packets are forwarded. The first three patches add an helper to check if a FIB rule is a default rule and extend the FIB notification chain to include the rule's info as part of the RULE_{ADD,DEL} events. This allows offloading drivers to sanitize the rules they don't support and flush their tables. The fourth patch introduces a small change in the VRF driver to allow capable drivers to more easily offload VRFs. Finally, the last patches gradually add support for VRFs in the mlxsw driver. First, on top of port netdevs, stacked LAG and VLAN devices and then on top of bridges. Some limitations I would like to point out: 1) The old model where 'oif' / 'iif' rules were programmed for each L3 master device isn't supported. Upon insertion of these rules the driver will flush its tables and forwarding will be done by the kernel instead. It's inferior in every way to the single 'l3mdev' rule, so this shouldn't be an issue. 2) Inter-VRF routes pointing to a VRF device aren't offloaded. Packets hitting these routes will be forwarded by the kernel. Inter-VRF routes pointing to netdevs enslaved to a different VRF are offloaded. 3) There's a small discrepancy between the kernel's datapath and the device's. By default, packets forwarded by the kernel first do a lookup in the local table and then in the VRF's table (assuming no match). In the device, lookup is done only in the VRF's table, which is probably the intended behavior. Changes in v2 allow user to properly re-order the default rules without triggering the abort mechanism. Changes in v3: * Remove 'l3mdev' from the matchall list, as it's related to the action and not the selector (David Ahern). * Use container_of() instead of typecasting (David Ahern). * Add David's Acked-by to the second patch. * Add an helper in IPv4 code to check if rule is a default rule (David Ahern). Changes in v2: * Drop default rule indication and allow re-ordering of default rules (David Ahern). * Remove ifdef around 'struct fib_rule_notifier_info' and drop redundant dependency on IP_MULTIPLE_TABLES from rocker and mlxsw. * Add David's Acked-by to the fourth patch. * Remove netif_is_vrf_master() and use netif_is_l3_master() instead (David Ahern). ==================== Signed-off-by: David S. Miller commit c7f6e6658b771c64a07b69852ac4362a8e781ab6 Author: Ido Schimmel Date: Thu Mar 16 09:08:20 2017 +0100 mlxsw: spectrum_router: Don't abort on l3mdev rules Now that port netdevs can be enslaved to a VRF master we need to make sure the device's routing tables won't be flushed upon the insertion of a l3mdev rule. Note that we assume the notified l3mdev rule is a simple rule as used by the VRF master. We don't check for the presence of other selectors such as 'iif' and 'oif'. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d70e458be3af878216f8c97fb4c0926cc003e31 Author: Ido Schimmel Date: Thu Mar 16 09:08:19 2017 +0100 mlxsw: spectrum_router: Add support for VRFs on top of bridges In a similar fashion to the previous patch, allow bridges and VLAN devices on top of bridges to be enslaved to a VRF master device. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 52 +++++++++++++++++++++- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 ++ .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 26 +++++++++++ 3 files changed, 81 insertions(+), 1 deletion(-) commit 7179eb5acd59d64cb8bef2d8788af8e9647f6986 Author: Ido Schimmel Date: Thu Mar 16 09:08:18 2017 +0100 mlxsw: spectrum_router: Add support for VRFs Allow port netdevs, LAG and VLAN devices stacked on top of these to be enslaved to a VRF master device. Upon enslavement, create a router interface (RIF) for the enslaved netdev and associate it with a virtual router (VR) based on the VRF's table ID. If a RIF already exists for the netdev (f.e., due to the existence of an IP address), then it's deleted and a new one is created with the appropriate VR binding. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 19 ++++++++-- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 +++ .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 41 ++++++++++++++++++++++ 3 files changed, 61 insertions(+), 3 deletions(-) commit 9db032bb1e8eed0721884c01a6c87f55f3d400fa Author: Ido Schimmel Date: Thu Mar 16 09:08:17 2017 +0100 mlxsw: spectrum_router: Don't destroy RIF if L3 slave We usually destroy the netdev's router interface (RIF) when the last IP address is removed from it. However, we shouldn't do that if it's enslaved to an L3 master device. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 57837885e3c74e42596a8d8c3e6831be1c0a7974 Author: Ido Schimmel Date: Thu Mar 16 09:08:16 2017 +0100 mlxsw: spectrum_router: Associate RIFs with correct VR When a router interface (RIF) is created due to a netdev being enslaved to a VRF master, then it should be associated with the appropriate virtual router (VR) and not the default one. If netdev is a VRF slave, lookup the VR based on the VRF's table ID. Otherwise default to the MAIN table. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit fdeea7be88b12742bfd50d9e19a06c0d2e702400 Author: Ido Schimmel Date: Thu Mar 16 09:08:15 2017 +0100 net: vrf: Set slave's private flag before linking Allow listeners of the subsequent CHANGEUPPER notification to retrieve the VRF's table ID by calling l3mdev_fib_table() with the slave netdev. Without this change, the netdev won't be considered an L3 slave and the function would return 0. This is consistent with other master device such as bridge and bond that set the slave's private flag before linking. It also makes do_vrf_{add,del}_slave() symmetric. Signed-off-by: Ido Schimmel Acked-by: David Ahern Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/vrf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5d7bfd141924a5ece21eb612ad3c56612f041c1e Author: Ido Schimmel Date: Thu Mar 16 09:08:14 2017 +0100 ipv4: fib_rules: Dump FIB rules when registering FIB notifier In commit c3852ef7f2f8 ("ipv4: fib: Replay events when registering FIB notifier") we dumped the FIB tables and replayed the events to the passed notification block. However, we merely sent a RULE_ADD notification in case custom rules were in use. As explained in previous patches, this approach won't work anymore. Instead, we should notify the caller about all the FIB rules and let it act accordingly. Upon registration to the FIB notification chain, replay a RULE_ADD notification for each programmed FIB rule, custom or not. The integrity of the dump is ensured by the mechanism introduced in the above mentioned commit. Prevent regressions by making sure current listeners correctly sanitize the notified rules. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Acked-by: David Ahern Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 13 ++++++++++++- drivers/net/ethernet/rocker/rocker_main.c | 17 +++++++++++++++-- net/ipv4/fib_rules.c | 19 ++++++++++++++++--- 3 files changed, 43 insertions(+), 6 deletions(-) commit 6a003a5ff29499a94373110202631743663569c6 Author: Ido Schimmel Date: Thu Mar 16 09:08:13 2017 +0100 ipv4: fib_rules: Add notifier info to FIB rules notifications Whenever a FIB rule is added or removed, a notification is sent in the FIB notification chain. However, listeners don't have a way to tell which rule was added or removed. This is problematic as we would like to give listeners the ability to decide which action to execute based on the notified rule. Specifically, offloading drivers should be able to determine if they support the reflection of the notified FIB rule and flush their LPM tables in case they don't. Do that by adding a notifier info to these notifications and embed the common FIB rule struct in it. Signed-off-by: Ido Schimmel Acked-by: David Ahern Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/ip_fib.h | 5 +++++ net/ipv4/fib_rules.c | 13 ++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) commit 3c71006d15fd3a99071a2b20d01de3edabc85767 Author: Ido Schimmel Date: Thu Mar 16 09:08:12 2017 +0100 ipv4: fib_rules: Check if rule is a default rule Currently, when non-default (custom) FIB rules are used, devices capable of layer 3 offloading flush their tables and let the kernel do the forwarding instead. When these devices' drivers are loaded they register to the FIB notification chain, which lets them know about the existence of any custom FIB rules. This is done by sending a RULE_ADD notification based on the value of 'net->ipv4.fib_has_custom_rules'. This approach is problematic when VRF offload is taken into account, as upon the creation of the first VRF netdev, a l3mdev rule is programmed to direct skbs to the VRF's table. Instead of merely reading the above value and sending a single RULE_ADD notification, we should iterate over all the FIB rules and send a detailed notification for each, thereby allowing offloading drivers to sanitize the rules they don't support and potentially flush their tables. While l3mdev rules are uniquely marked, the default rules are not. Therefore, when they are being notified they might invoke offloading drivers to unnecessarily flush their tables. Solve this by adding an helper to check if a FIB rule is a default rule. Namely, its selector should match all packets and its action should point to the local, main or default tables. As noted by David Ahern, uniquely marking the default rules is insufficient. When using VRFs, it's common to avoid false hits by moving the rule for the local table to just before the main table: Default configuration: $ ip rule show 0: from all lookup local 32766: from all lookup main 32767: from all lookup default Common configuration with VRFs: $ ip rule show 1000: from all lookup [l3mdev-table] 32765: from all lookup local 32766: from all lookup main 32767: from all lookup default Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Acked-by: David Ahern Signed-off-by: David S. Miller include/net/fib_rules.h | 1 + include/net/ip_fib.h | 7 +++++++ net/core/fib_rules.c | 14 ++++++++++++++ net/ipv4/fib_rules.c | 21 +++++++++++++++++++++ 4 files changed, 43 insertions(+) commit d3df42b76f583c6c4c6235a1b44339505eaff559 Author: Chris Wilson Date: Thu Mar 16 17:13:05 2017 +0000 drm/i915: Wait for reset to complete before returning from debugfs/i915_wedged Provide some serialisation between user operations by waiting for the reset initiated by setting i915_wedged to complete. The automatic wait here makes echo 1 > i915_wedged; cat i915_error_state do the right thing, and not risk reporting "No error collected". Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170316171305.12972-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2e8f9d322948406fb3aa0b27bda4d40a34e57123 Author: Chris Wilson Date: Thu Mar 16 17:13:04 2017 +0000 drm/i915: Restore engine->submit_request before unwedging When we wedge the device, we override engine->submit_request with a nop to ensure that all in-flight requests are marked in error. However, igt would like to unwedge the device to test -EIO handling. This requires us to flush those in-flight requests and restore the original engine->submit_request. v2: Use a vfunc to unify enabling request submission to engines v3: Split new vfunc to a separate patch. v4: Make the wait interruptible -- the third party fences we wait upon may be indefinitely broken, so allow the reset to be aborted. Fixes: 821ed7df6e2a ("drm/i915: Update reset path to fix incomplete requests") Testcase: igt/gem_eio Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin #v3 Link: http://patchwork.freedesktop.org/patch/msgid/20170316171305.12972-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 9 ++++--- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem.c | 59 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 3 deletions(-) commit ff44ad51ebf8e4693bd66ae41aa37a6bc88a134f Author: Chris Wilson Date: Thu Mar 16 17:13:03 2017 +0000 drm/i915: Move engine->submit_request selection to a vfunc It turns out that we may want to restore the original engine->submit_request (and engine->schedule) callbacks from more than just the guc <-> execlists transition. Move this to a vfunc so we can have a common interface. v2: Move initial selection to intel_engines_init_common(), repaint vfunc with engine->set_default_submission (and a similar colour for the helper). Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170316171305.12972-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_guc_submission.c | 2 +- drivers/gpu/drm/i915/intel_engine_cs.c | 12 ++++++++++++ drivers/gpu/drm/i915/intel_lrc.c | 15 +++++---------- drivers/gpu/drm/i915/intel_lrc.h | 1 - drivers/gpu/drm/i915/intel_ringbuffer.c | 15 +++++++++++++-- drivers/gpu/drm/i915/intel_ringbuffer.h | 4 ++++ 6 files changed, 35 insertions(+), 14 deletions(-) commit 8c185ecaf4ee6966144c3897afdda557c5849bb0 Author: Chris Wilson Date: Thu Mar 16 17:13:02 2017 +0000 drm/i915: Split I915_RESET_IN_PROGRESS into two flags I915_RESET_IN_PROGRESS is being used for both signaling the requirement to i915_mutex_lock_interruptible() to avoid taking the struct_mutex and to instruct a waiter (already holding the struct_mutex) to perform the reset. To allow for a little more coordination, split these two meaning into a couple of distinct flags. I915_RESET_BACKOFF tells i915_mutex_lock_interruptible() not to acquire the mutex and I915_RESET_HANDOFF tells the waiter to call i915_reset(). Signed-off-by: Chris Wilson Acked-by: Michel Thierry Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170316171305.12972-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 16 +++++----- drivers/gpu/drm/i915/i915_drv.c | 7 +++-- drivers/gpu/drm/i915/i915_drv.h | 40 +++++++++++++++++++++--- drivers/gpu/drm/i915/i915_gem.c | 5 +-- drivers/gpu/drm/i915/i915_gem_request.c | 2 +- drivers/gpu/drm/i915/i915_irq.c | 38 ++++------------------ drivers/gpu/drm/i915/intel_display.c | 4 +-- drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 18 +++++++---- 8 files changed, 71 insertions(+), 59 deletions(-) commit ce594e9824ab6ed41ac86f672203f1832b87de79 Author: hayeswang Date: Thu Mar 16 14:32:22 2017 +0800 r8152: simply the arguments Replace &tp->napi with napi and tp->netdev with netdev. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) commit 61f63e383784bd0ab6529cfc95ddc59c713afcc9 Merge: ee36842 61f35d7 Author: Ingo Molnar Date: Thu Mar 16 17:29:23 2017 +0100 Merge tag 'perf-core-for-mingo-4.12-20170316' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: New features: - Add 'brstackinsn' field in 'perf script' to reuse the x86 instruction decoder used in the Intel PT code to study hot paths to samples (Andi Kleen) Kernel changes: - Default UPROBES_EVENTS to Y (Alexei Starovoitov) - Fix check for kretprobe offset within function entry (Naveen N. Rao) Infrastructure changes: - Introduce util func is_sdt_event() (Ravi Bangoria) - Make perf_event__synthesize_mmap_events() scale on older kernels where reading /proc/pid/maps is way slower than reading /proc/pid/task/pid/maps (Stephane Eranian) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 3fc03069bc6e6c316f19bb526e3c8ce784677477 Author: Changbin Du Date: Mon Mar 13 10:47:11 2017 +0800 drm/i915: make context status notifier head be per engine GVTg has introduced the context status notifier to schedule the GVTg workload. At that time, the notifier is bound to GVTg context only, so GVTg is not aware of host workloads. Now we are going to improve GVTg's guest workload scheduler policy, and add Guc emulation support for new Gen graphics. Both these two features require acknowledgment for all contexts running on hardware. (But will not alter host workload.) So here try to make some change. The change is simple: 1. Move the context status notifier head from i915_gem_context to intel_engine_cs. Which means there is a notifier head per engine instead of per context. Execlist driver still call notifier for each context sched-in/out events of current engine. 2. At GVTg side, it binds a notifier_block for each physical engine at GVTg initialization period. Then GVTg can hear all context status events. In this patch, GVTg do nothing for host context event, but later will add a function there. But in any case, the notifier callback is a noop if this is no active vGPU. Since intel_gvt_init() is called at early initialization stage and require the status notifier head has been initiated, I initiate it in intel_engine_setup(). v2: remove a redundant newline. (chris) Fixes: 3c7ba6359d70 ("drm/i915: Introduce execlist context status change notification") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100232 Signed-off-by: Changbin Du Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Zhi Wang Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170313024711.28591-1-changbin.du@intel.com Acked-by: Zhenyu Wang Signed-off-by: Chris Wilson drivers/gpu/drm/i915/gvt/gvt.h | 2 +- drivers/gpu/drm/i915/gvt/scheduler.c | 45 ++++++++++++++------------------- drivers/gpu/drm/i915/i915_gem_context.c | 1 - drivers/gpu/drm/i915/i915_gem_context.h | 3 --- drivers/gpu/drm/i915/intel_engine_cs.c | 2 ++ drivers/gpu/drm/i915/intel_lrc.c | 3 ++- drivers/gpu/drm/i915/intel_ringbuffer.h | 3 +++ 7 files changed, 27 insertions(+), 32 deletions(-) commit 61f35d750683b21e9e3836e309195c79c1daed74 Author: Arnaldo Carvalho de Melo Date: Thu Mar 16 12:42:02 2017 -0300 uprobes: Default UPROBES_EVENTS to Y As it is already turned on by most distros, so just flip the default to Y. Suggested-by: Alexei Starovoitov Acked-by: David Ahern Acked-by: Ingo Molnar Acked-by: Masami Hiramatsu Acked-by: Namhyung Kim Acked-by: Srikar Dronamraju Acked-by: Wang Nan Cc: Alexander Shishkin Cc: Anton Blanchard Cc: David Miller Cc: Hemant Kumar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170316005817.GA6805@ast-mbp.thefacebook.com Signed-off-by: Arnaldo Carvalho de Melo kernel/trace/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f658ed3642cd1872c536c820597b85a9da2ddded Author: Julia Cartwright Date: Thu Mar 9 10:22:06 2017 -0600 pinctrl: sunxi: make use of raw_spinlock variants The sunxi pinctrl driver currently implement an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sunxi.c | 26 +++++++++++++------------- drivers/pinctrl/sunxi/pinctrl-sunxi.h | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) commit 82e529c1c7befe82fc7fc258b956e973056c20bb Author: Julia Cartwright Date: Thu Mar 9 10:22:05 2017 -0600 pinctrl: sirf: atlas7: make use of raw_spinlock variants The sirf atlas7 pinctrl drivers currently implement an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Signed-off-by: Linus Walleij drivers/pinctrl/sirf/pinctrl-atlas7.c | 44 +++++++++++++++++------------------ 1 file changed, 22 insertions(+), 22 deletions(-) commit 229710fecdd805abb753c480778ea0de47cbb1e2 Author: Julia Cartwright Date: Thu Mar 9 10:22:04 2017 -0600 pinctrl: amd: make use of raw_spinlock variants The amd pinctrl drivers currently implement an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 66 +++++++++++++++++++++---------------------- drivers/pinctrl/pinctrl-amd.h | 2 +- 2 files changed, 34 insertions(+), 34 deletions(-) commit cb96a66243a84f16590ba0a7658d4257267e50df Author: Julia Cartwright Date: Thu Mar 9 10:22:03 2017 -0600 pinctrl: bcm: make use of raw_spinlock variants The bcm pinctrl drivers currently implement an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 44 +++++++++++++++--------------- drivers/pinctrl/bcm/pinctrl-nsp-gpio.c | 46 ++++++++++++++++---------------- 2 files changed, 45 insertions(+), 45 deletions(-) commit a9ee6bd44cc808ab1ec5d9a54899addd777e8342 Author: Timur Tabi Date: Mon Mar 6 17:32:02 2017 -0600 pinctrl: qcom: qdf2xxx: add names to the gpios The sysfs and debugfs entries for pin control drivers work better when the individual pins are given real names, even if they are all just "gpio0", "gpio1", etc. Signed-off-by: Timur Tabi Acked-by: Bjorn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-qdf2xxx.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 31de73501ac92ef62971d4b7f6c941508422f3af Author: Chris Wilson Date: Thu Mar 16 12:56:18 2017 +0000 drm/i915/scheduler: emulate a scheduler for guc This emulates execlists on top of the GuC in order to defer submission of requests to the hardware. This deferral allows time for high priority requests to gazump their way to the head of the queue, however it nerfs the GuC by converting it back into a simple execlist (where the CPU has to wake up after every request to feed new commands into the GuC). v2: Drop hack status - though iirc there is still a lockdep inversion between fence and engine->timeline->lock (which is impossible as the nesting only occurs on different fences - hopefully just requires some judicious lockdep annotation) v3: Apply lockdep nesting to enabling signaling on the request, using the pattern we already have in __i915_gem_request_submit(); v4: Replaying requests after a hang also now needs the timeline spinlock, to disable the interrupts at least v5: Hold wq lock for completeness, and emit a tracepoint for enabling signal v6: Reorder interrupt checking for a happier gcc. v7: Only signal the tasklet after a user-interrupt if using guc scheduling v8: Restore lost update of rq through the i915_guc_irq_handler (Tvrtko) v9: Avoid re-initialising the engine->irq_tasklet from inside a reset v10: Hook up the execlists-style tracepoints v11: Clear the execlists irq_posted bit after taking over the interrupt/tasklet Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170316125619.6856-1-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/i915_guc_submission.c | 110 ++++++++++++++++++++++++++--- drivers/gpu/drm/i915/i915_irq.c | 13 +++- drivers/gpu/drm/i915/intel_lrc.c | 5 +- 3 files changed, 112 insertions(+), 16 deletions(-) commit 14a6bbf9e5359568f782a936c22a46502c258107 Author: Chris Wilson Date: Tue Mar 14 11:14:52 2017 +0000 drm/i915: Replace irq_seqno_barrier on hws write with a clflush When manually overwriting the HWS, rather than assume irq_seqno_barrier does the right thing, we can explicitly flush the cacheline instead. This avoids us calling the engine->irq_seqno_barrier() from an illegal context: [ 1472.651797] BUG: scheduling while atomic: migration/0/11/0x00000002 [ 1472.651807] Modules linked in: ctr ccm arc4 snd_hda_codec_hdmi bnep rfcomm iwldvm snd_hda_codec_conexant snd_hda_codec_generic snd_hda_intel mac80211 snd_hda_codec snd_hda_core snd_pcm dm_multipath snd_hwdep intel_powerclamp coretemp snd_seq_midi crct10dif_pclmul snd_seq_midi_event crc32_pclmul iwlwifi ghash_clmulni_intel btusb snd_rawmidi btrtl aesni_intel btbcm aes_x86_64 crypto_simd btintel cryptd glue_helper bluetooth snd_seq cfg80211 snd_timer snd_seq_device intel_ips binfmt_misc snd mei_me soundcore mei dm_mirror dm_region_hash dm_log i915 intel_gtt i2c_algo_bit drm_kms_helper cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea prime_numbers e1000e drm ahci libahci [ 1472.651897] CPU: 0 PID: 11 Comm: migration/0 Tainted: G U 4.11.0-rc1+ #203 [ 1472.651899] Hardware name: LENOVO 514328U/514328U, BIOS 6QET44WW (1.14 ) 04/20/2010 [ 1472.651900] Call Trace: [ 1472.651913] dump_stack+0x63/0x90 [ 1472.651922] __schedule_bug+0x5d/0x6b [ 1472.651930] __schedule+0x46a/0x5f0 [ 1472.651934] schedule+0x38/0x90 [ 1472.651938] schedule_hrtimeout_range_clock+0x85/0x110 [ 1472.651945] ? hrtimer_init+0x10/0x10 [ 1472.651949] schedule_hrtimeout_range+0xe/0x10 [ 1472.651952] usleep_range+0x4d/0x60 [ 1472.652037] gen5_seqno_barrier+0x13/0x20 [i915] [ 1472.652101] intel_engine_init_global_seqno+0xd7/0x160 [i915] [ 1472.652160] __i915_gem_set_wedged_BKL+0xa0/0x180 [i915] [ 1472.652166] multi_cpu_stop+0xbb/0xe0 [ 1472.652170] ? cpu_stop_queue_work+0x90/0x90 [ 1472.652174] cpu_stopper_thread+0x82/0x110 [ 1472.652179] smpboot_thread_fn+0x137/0x190 [ 1472.652184] kthread+0xf7/0x130 [ 1472.652187] ? sort_range+0x20/0x20 [ 1472.652191] ? kthread_park+0x90/0x90 [ 1472.652195] ret_from_fork+0x2c/0x40 Testcase: igt/gem_eio #ilk Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170314111452.9375-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_engine_cs.c | 3 +-- drivers/gpu/drm/i915/intel_ringbuffer.h | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) commit d27f3b4a2d81e873de4d11899e510a1a507da8e3 Author: Kuninori Morimoto Date: Wed Mar 15 04:44:16 2017 +0000 ASoC: simple-scu-card: add new simple_priv_to_card() macro Current simple card driver is directly calling priv->snd_card everywhere, but it makes unreadable code. Let's use simple_priv_to_card() macro for it Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-scu-card.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) commit 5be509576cf634ad384025f50fc4fcb941d14256 Author: Kuninori Morimoto Date: Wed Mar 15 04:44:00 2017 +0000 ASoC: simple-card: add new simple_priv_to_card() macro Current simple card driver is directly calling priv->snd_card everywhere, but it makes unreadable code. Let's use simple_priv_to_card() macro for it Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) commit 40b68dac75a1d16266d3c89244ccf7b899afac3e Author: Kuninori Morimoto Date: Wed Mar 15 04:43:40 2017 +0000 ASoC: simple-scu-card: use defined dev on probe() Current asoc_simple_card_probe() already has dev definition, but some place doesn't use it. Let's fix this issue. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-scu-card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dcee9bfe8904518266c95d44a4f435a5f1fa59a1 Author: Kuninori Morimoto Date: Wed Mar 15 04:43:21 2017 +0000 ASoC: simple-card: use defined dev on probe() Current asoc_simple_card_probe() already has dev definition, but some place doesn't use it. Let's fix this issue. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b5d3865b3b410d21213807642b47e84a3fc081b Author: Bard Liao Date: Thu Mar 16 13:58:41 2017 +0800 ASoC: rt5665: set i2s pin share configuration I2S2 and I2S3 are share pins. We need to configure it when i2s is active and disable it when i2s is inactive. To disable i2s pins means to set them as gpio. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5665.c | 58 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) commit 972b044eeca582ef173d063773e292bd9e8633d6 Author: Andreas Gruenbacher Date: Thu Mar 16 09:54:57 2017 -0400 gfs2: Don't pack struct lm_lockname As per a suggestion by Linus, don't pack struct lm_lockname: we did that because the struct is used as a rhashtable key, but packing tells the compiler that the 64-bit fields in the struct may be unaligned, causing it to generate worse code on some architectures. Instead, rearrange the fields in the struct so that there is no padding between fields, and exclude any tail padding from the hash key size. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/glock.c | 2 +- fs/gfs2/incore.h | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) commit b685b264636b4f3f3eaa0b62fee674a45f2b1679 Author: Jia Jie Ho Date: Thu Mar 16 08:05:46 2017 -0500 ARM: socfpga: updates for socfpga_defconfig This patch enables Altera TSE support in socfpga_defconfig Signed-off-by: Jia Jie Ho Signed-off-by: Dinh Nguyen arch/arm/configs/socfpga_defconfig | 1 + 1 file changed, 1 insertion(+) commit 7fed0cbffe1db3383ae1900fffc8f4e14d2735c8 Author: Thor Thayer Date: Thu Mar 16 07:57:16 2017 -0500 ARM: dts: socfpga: Add Devkit A10-SR Reset Controller Add the Altera Arria10 System Resource Reset Controller to the MFD Signed-off-by: Thor Thayer Signed-off-by: Dinh Nguyen --- v2 change commit header to ARM: dts: socfpga. arch/arm/boot/dts/socfpga_arria10_socdk.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 3c679cba588a46ba81a264673e192bbd3c92455b Author: Hangbin Liu Date: Mon Feb 20 16:31:38 2017 +0800 ipvs: Document sysctl pmtu_disc Document sysctl pmtu_disc based on commit 3654e61137db ("ipvs: add pmtu_disc option to disable IP DF for TUN packets"). Signed-off-by: Hangbin Liu Signed-off-by: Simon Horman Documentation/networking/ipvs-sysctl.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 24b444155b1e237accb2571ac656cf40c941a2a7 Author: Hangbin Liu Date: Mon Feb 20 16:31:37 2017 +0800 ipvs: Document sysctl sync_ports Document sysctl sync_ports based on commit f73181c8288f ("ipvs: add support for sync threads"). Signed-off-by: Hangbin Liu Signed-off-by: Simon Horman Documentation/networking/ipvs-sysctl.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 237e5722bc615c3440d8476a694448074380fa01 Author: Hangbin Liu Date: Mon Feb 20 16:31:36 2017 +0800 ipvs: Document sysctl sync_qlen_max and sync_sock_size Document sysctl sync_qlen_max and sync_sock_size based on commit 1c003b1580e2 ("ipvs: wakeup master thread"). Signed-off-by: Hangbin Liu Signed-off-by: Simon Horman Documentation/networking/ipvs-sysctl.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit a2f346d82bcab1927a199f475dc299c00413ec39 Author: Hangbin Liu Date: Mon Feb 20 16:31:35 2017 +0800 ipvs: fix sync_threshold description and add sync_refresh_period, sync_retries Fix sync_threshold description which should have two values. Also add sync_refresh_period and sync_retries based on commit 749c42b620a9 ("ipvs: reduce sync rate with time thresholds"). Signed-off-by: Hangbin Liu Signed-off-by: Simon Horman Documentation/networking/ipvs-sysctl.txt | 40 +++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 9 deletions(-) commit 864e91ca981ea1d18f05a8f5063520d103373266 Author: Cong Wang Date: Fri Dec 9 21:09:59 2016 -0800 ipvs: remove an annoying printk in netns init At most it is used for debugging purpose, but I don't think it is even useful for debugging, just remove it. Signed-off-by: Cong Wang Signed-off-by: Simon Horman net/netfilter/ipvs/ip_vs_core.c | 2 -- 1 file changed, 2 deletions(-) commit 2d1f1d4c9fb70b611bd041d0d59aeafc55c79022 Author: Heiko Stuebner Date: Thu Mar 2 00:50:39 2017 +0100 ARM: dts: rockchip: add rk322x dw-mmc resets dw-mmc got its reset-properties specified, so add the softresets for it in rk3228/rk3229. Signed-off-by: Heiko Stuebner Reviwed-by: Shawn Lin arch/arm/boot/dts/rk322x.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit ee0024fdeca8c2fe82df93aaed98fd754a5b3f9c Author: Heiko Stuebner Date: Thu Mar 2 00:43:21 2017 +0100 ARM: dts: rockchip: add rk3066/rk3188 dw-mmc resets dw-mmc got its reset-properties specified, so add the softresets for it in rk3066/rk3188. Signed-off-by: Heiko Stuebner Reviwed-by: Shawn Lin arch/arm/boot/dts/rk3xxx.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit e124f2d36169ad15cd5f491fc666ef0aaabc51a2 Author: Heiko Stuebner Date: Thu Mar 2 00:42:52 2017 +0100 ARM: dts: rockchip: add rk3036 dw-mmc resets dw-mmc got its reset-properties specified, so add the softresets for it in rk3036. Signed-off-by: Heiko Stuebner Reviwed-by: Shawn Lin arch/arm/boot/dts/rk3036.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 06ecaae97f927fdf2c834272f88b984e11e3b730 Author: Heiko Stuebner Date: Thu Mar 2 00:26:51 2017 +0100 ARM: dts: rockchip: add rk3288 dw-mmc resets dw-mmc got its reset-properties specified, so add the softresets for it in rk3288. Signed-off-by: Heiko Stuebner Reviwed-by: Shawn Lin arch/arm/boot/dts/rk3288.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 48d02a1d5c137d362defd11a5d57d0af4a75a983 Author: Andi Kleen Date: Thu Feb 23 15:46:34 2017 -0800 perf script: Add 'brstackinsn' for branch stacks Implement printing instruction sequences as hex dump for branch stacks. This relies on the x86 instruction decoder used by the PT decoder to find the lengths of instructions to dump them individually. This is good enough for pattern matching. This allows to study hot paths for individual samples, together with branch misprediction and cycle count / IPC information if available (on Skylake systems). % perf record -b ... % perf script -F brstackinsn ... read_hpet+67: ffffffff9905b843 insn: 74 ea # PRED ffffffff9905b82f insn: 85 c9 ffffffff9905b831 insn: 74 12 ffffffff9905b833 insn: f3 90 ffffffff9905b835 insn: 48 8b 0f ffffffff9905b838 insn: 48 89 ca ffffffff9905b83b insn: 48 c1 ea 20 ffffffff9905b83f insn: 39 f2 ffffffff9905b841 insn: 89 d0 ffffffff9905b843 insn: 74 ea # PRED Only works when no special branch filters are specified. Occasionally the path does not reach up to the sample IP, as the LBRs may be frozen before executing a final jump. In this case we print a special message. The instruction dumper piggy backs on the existing infrastructure from the IP PT decoder. An earlier iteration of this patch relied on a disassembler, but this version only uses the existing instruction decoder. Committer note: Added hint about how to get suitable perf.data files for use with '-F brstackinsm': $ perf record usleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.018 MB perf.data (8 samples) ] $ $ perf script -F brstackinsn Display of branch stack assembler requested, but non all-branch filter set Hint: run 'perf record -b ...' $ Signed-off-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Michael Ellerman Link: http://lkml.kernel.org/r/20170223234634.583-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 13 +- tools/perf/builtin-script.c | 264 ++++++++++++++++++++- tools/perf/util/Build | 1 + tools/perf/util/dump-insn.c | 14 ++ tools/perf/util/dump-insn.h | 22 ++ .../util/intel-pt-decoder/intel-pt-insn-decoder.c | 24 ++ 6 files changed, 327 insertions(+), 11 deletions(-) commit 74beb09a80ca248ba9d54dede80aebc2557ccb30 Author: Arnaldo Carvalho de Melo Date: Wed Mar 15 17:40:19 2017 -0300 tools headers: Sync {tools/,}arch/x86/include/asm/cpufeatures.h We use those in tools/arch/x86/lib/mem{cpy,set}_64.S, in turn used in the 'perf bench mem' benchmarks. The changes in the following csets are not relevant for this usecase, but lets sync it to silence the diff detector in the tools build system: 78d1b296843a ("x86/cpu: Add X86_FEATURE_CPUID") 3bba73b1b7a8 ("x86/cpufeature: Move RING3MWAIT feature to avoid conflicts") Cc: Borislav Petkov Cc: Jiri Olsa Cc: Namhyung Kim Cc: Thomas Gleixner Link: http://lkml.kernel.org/n/tip-nsqxpyzcv4ywesikhhhrgfgc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/asm/cpufeatures.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 92ecd73a887c4a2b94daf5fc35179d75d1c4ef95 Author: Andreas Gruenbacher Date: Thu Mar 9 09:48:05 2017 -0500 gfs2: Deduplicate gfs2_{glocks,glstats}_open Both functions are identical except for the seq_operations used. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/glock.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) commit cc37a62785a584f4875788689f3fd1fa6e4eb291 Author: Andreas Gruenbacher Date: Thu Mar 9 09:38:51 2017 -0500 gfs2: Replace rhashtable_walk_init with rhashtable_walk_enter Function rhashtable_walk_init is deprecated. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/glock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d1c7ae9d849bdd3146e322f1e46fd3300e66d5f Author: Bob Peterson Date: Fri Mar 3 12:37:14 2017 -0500 GFS2: Prevent BUG from occurring when normal Withdraws occur When the GFS2 file system withdraws due to metadata corruption, it often has outstanding transactions in the journal and delayed work queued for its glocks. This patch adds some new checks for a withdrawn file system before proceeding with operations that would obviously cause a BUG() to be triggered. That allows GFS2 to be safely unmounted rather than cause the system to go down. Signed-off-by: Bob Peterson fs/gfs2/glock.c | 2 ++ fs/gfs2/super.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 0c9d86833dfdafaf580cc49735661d002ef07ee3 Author: David Hildenbrand Date: Mon Mar 13 11:48:28 2017 +0100 KVM: s390: use defines for execution controls Let's replace the bitmasks by defines. Reconstructed from code, comments and commit messages. Tried to keep the defines short and map them to feature names. In case they don't completely map to features, keep them in the stye of ICTL defines. This effectively drops all "U" from the existing numbers. I think this should be fine (as similarly done for e.g. ICTL defines). I am not 100% sure about the ECA_MVPGI and ECA_PROTEXCI bits as they are always used in pairs. Signed-off-by: David Hildenbrand Message-Id: <20170313104828.13362-1-david@redhat.com> Signed-off-by: Christian Borntraeger [some renames, add one missing place] arch/s390/include/asm/kvm_host.h | 18 +++++++++++++++++- arch/s390/kvm/gaccess.c | 6 +++--- arch/s390/kvm/kvm-s390.c | 36 ++++++++++++++++++------------------ arch/s390/kvm/kvm-s390.h | 2 +- arch/s390/kvm/priv.c | 2 +- arch/s390/kvm/vsie.c | 33 ++++++++++++++++----------------- 6 files changed, 56 insertions(+), 41 deletions(-) commit c0a6bfdc18b83290b65372a7687134052f382bdf Author: Christian Borntraeger Date: Mon Feb 27 21:14:47 2017 +0100 KVM: s390: Handle sthyi also for instruction intercept Right now we handle the STHYI only via the operation exception intercept (illegal instruction). If hardware ever decides to provide an instruction intercept for STHYI, we should handle that as well. Signed-off-by: Christian Borntraeger arch/s390/kvm/intercept.c | 3 +-- arch/s390/kvm/priv.c | 1 + arch/s390/kvm/sthyi.c | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) commit 4d5f2c04c8a462a1c7ad3fdc138515c84fa65379 Author: Christian Borntraeger Date: Thu Feb 9 17:15:41 2017 +0100 KVM: s390: log runtime instrumentation enablement We handle runtime instrumentation enablement either lazy or via sync_regs on migration. Make sure to add a debug log entry for that per CPU on the first occurrence. Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 14 ++++++++------ arch/s390/kvm/priv.c | 1 + 2 files changed, 9 insertions(+), 6 deletions(-) commit 91b4634632e0138b655a63fdb1704edbbcd6cdda Author: Ben Whitten Date: Thu Mar 16 11:00:30 2017 +0000 spi: spidev: Add sx1301 to device tree compatibility list Add entry for the semtech sx1301 baseband processor implementing a LoRa concentrator IP. At this time this chip requires an spidev userspace driver. Signed-off-by: Ben Whitten Signed-off-by: Steve deRosier Signed-off-by: Mark Brown drivers/spi/spidev.c | 1 + 1 file changed, 1 insertion(+) commit 6b7f6aa75e38ef4e2bfb9e13726f6561e682892f Author: Mika Kuoppala Date: Wed Mar 15 18:12:59 2017 +0200 drm/i915: Use coarse grained residency counter with byt Set byt rc residency counters high level as chv does by default. We lose some accuracy on byt but we can do the calculation without extra hw read on both platforms, as now they behave identically in this respect. v2: use ktime v3: keep comparison u32 (Chris) Cc: Chris Wilson Cc: Ville Syrjälä Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1489592584-10422-1-git-send-email-mika.kuoppala@intel.com drivers/gpu/drm/i915/i915_irq.c | 7 +------ drivers/gpu/drm/i915/intel_pm.c | 9 +++------ 2 files changed, 4 insertions(+), 12 deletions(-) commit 679cb6c1320bc0d4b1572a4cf0988c3bba66becf Author: Mika Kuoppala Date: Wed Mar 15 17:43:03 2017 +0200 drm/i915: Use ktime to calculate rc0 residency We have used cz timestamp register to gain a reference time wrt to residency calculations. The residency counts are in cz clk ticks (333Mhz clock) but for some reason the cz timestamp register gives 100us units. Perhaps for some other usage, the base-ten based values are easier, but in residency calculations raw units would have been the easiest. As there is not much advantage of using base-ten clock through a more costly punit access, take our reference times directly from kernel clock. v2: use ktime (Chris, Ville) Cc: Chris Wilson Cc: Ville Syrjälä Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_irq.c | 10 ++++------ drivers/gpu/drm/i915/i915_reg.h | 2 -- 3 files changed, 5 insertions(+), 9 deletions(-) commit 1362877ed24462520d6de902e58da99def3cb60f Author: Mika Kuoppala Date: Wed Mar 15 17:43:02 2017 +0200 drm/i915: Convert debugfs to use generic residency calculator Use intel_rc6_residency to get benefit for increased resolution in byt/chv. v2: output raw and time (Chris) Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_debugfs.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 47c21d9a1a7b4b3177dde686ce0eb71cdf25e07b Author: Mika Kuoppala Date: Wed Mar 15 18:07:13 2017 +0200 drm/i915: Extend vlv/chv residency resolution Vlv and chv residency counters are 40 bits in width. With a control bit, we can choose between upper or lower 32 bit window into this counter. Lets toggle this bit on and off on and read both parts. As a result we can push the wrap from 13 seconds to 54 minutes. v2: commit msg, loop readability, goto elimination (Chris) v3: bug ref, divide outside runtime pm lock (Chris) References: https://bugs.freedesktop.org/show_bug.cgi?id=94852 Reported-by: Len Brown Cc: Chris Wilson Cc: Ville Syrjälä Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_pm.c | 60 ++++++++++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 9 deletions(-) commit c5a0ad114b6a9f4ad03f30bd7c61994bc6e8ab52 Author: Mika Kuoppala Date: Wed Mar 15 17:43:00 2017 +0200 drm/i915: Return residency as microseconds Change the granularity from milliseconds to microseconds when returning rc6 residencies. This is in preparation for increased resolution on some platforms. v2: use 64bit div macro (Chris) Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/i915_sysfs.c | 3 ++- drivers/gpu/drm/i915/intel_pm.c | 12 ++++++------ 3 files changed, 10 insertions(+), 9 deletions(-) commit 135bafa551de3e7a8fff29e80a714b44d7dfd778 Author: Mika Kuoppala Date: Wed Mar 15 17:42:59 2017 +0200 drm/i915: Move residency calculation into intel_pm.c Plan is to make generic residency calculation utility function for usage outside of sysfs. As a first step move residency calculation into intel_pm.c Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_sysfs.c | 27 +-------------------------- drivers/gpu/drm/i915/intel_pm.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 26 deletions(-) commit 99ed4d7eb2870ef114b3a1309836d021005e4292 Author: Boris Brezillon Date: Wed Mar 1 13:31:01 2017 +0100 drm/atmel-hlcdc: Fix suspend/resume implementation The current suspend resume implementation is assuming register values are kept when entering suspend, which is no longer the case with the suspend-to-RAM on the sama5d2. While at it, switch to the generic infrastructure to enter suspend mode (drm_atomic_helper_suspend/resume()). Signed-off-by: Boris Brezillon Acked-by: Daniel Vetter Tested-by: Sylvain Rochet Link: http://patchwork.freedesktop.org/patch/msgid/1488371461-22243-1-git-send-email-boris.brezillon@free-electrons.com drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 33 -------------------------- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 31 ++++++++++++------------ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 8 ++++--- 3 files changed, 21 insertions(+), 51 deletions(-) commit 15c344f4d0cbebd6215c94d2011863b4aa302a02 Author: Chris Wilson Date: Wed Mar 15 14:01:50 2017 +0000 drm/i915/userptr: Reinvent GGTT self-faulting protection lockdep doesn't like us taking the mm->mmap_sem inside the get_pages callback for a couple of reasons. The straightforward deadlock: [13755.434059] ============================================= [13755.434061] [ INFO: possible recursive locking detected ] [13755.434064] 4.11.0-rc1-CI-CI_DRM_297+ #1 Tainted: G U [13755.434066] --------------------------------------------- [13755.434068] gem_userptr_bli/8398 is trying to acquire lock: [13755.434070] (&mm->mmap_sem){++++++}, at: [] i915_gem_userptr_get_pages+0x5a/0x2e0 [i915] [13755.434096] but task is already holding lock: [13755.434098] (&mm->mmap_sem){++++++}, at: [] __do_page_fault+0x105/0x560 [13755.434105] other info that might help us debug this: [13755.434108] Possible unsafe locking scenario: [13755.434110] CPU0 [13755.434111] ---- [13755.434112] lock(&mm->mmap_sem); [13755.434115] lock(&mm->mmap_sem); [13755.434117] *** DEADLOCK *** [13755.434121] May be due to missing lock nesting notation [13755.434126] 2 locks held by gem_userptr_bli/8398: [13755.434128] #0: (&mm->mmap_sem){++++++}, at: [] __do_page_fault+0x105/0x560 [13755.434135] #1: (&obj->mm.lock){+.+.+.}, at: [] __i915_gem_object_get_pages+0x1d/0x70 [i915] [13755.434156] stack backtrace: [13755.434161] CPU: 3 PID: 8398 Comm: gem_userptr_bli Tainted: G U 4.11.0-rc1-CI-CI_DRM_297+ #1 [13755.434165] Hardware name: GIGABYTE GB-BKi7(H)A-7500/MFLP7AP-00, BIOS F4 02/20/2017 [13755.434169] Call Trace: [13755.434174] dump_stack+0x67/0x92 [13755.434178] __lock_acquire+0x133a/0x1b50 [13755.434182] lock_acquire+0xc9/0x220 [13755.434200] ? i915_gem_userptr_get_pages+0x5a/0x2e0 [i915] [13755.434204] down_read+0x42/0x70 [13755.434221] ? i915_gem_userptr_get_pages+0x5a/0x2e0 [i915] [13755.434238] i915_gem_userptr_get_pages+0x5a/0x2e0 [i915] [13755.434255] ____i915_gem_object_get_pages+0x25/0x60 [i915] [13755.434272] __i915_gem_object_get_pages+0x59/0x70 [i915] [13755.434288] i915_gem_fault+0x397/0x6a0 [i915] [13755.434304] ? i915_gem_fault+0x1a1/0x6a0 [i915] [13755.434308] ? __lock_acquire+0x449/0x1b50 [13755.434311] ? __lock_acquire+0x449/0x1b50 [13755.434315] ? vm_mmap_pgoff+0xa9/0xd0 [13755.434318] __do_fault+0x19/0x70 [13755.434321] __handle_mm_fault+0x863/0xe50 [13755.434325] handle_mm_fault+0x17f/0x370 [13755.434329] ? handle_mm_fault+0x40/0x370 [13755.434332] __do_page_fault+0x279/0x560 [13755.434336] do_page_fault+0xc/0x10 [13755.434339] page_fault+0x22/0x30 [13755.434342] RIP: 0033:0x7f5ab91b5880 [13755.434345] RSP: 002b:00007fff62922218 EFLAGS: 00010216 [13755.434348] RAX: 0000000000b74500 RBX: 00007f5ab7f81000 RCX: 0000000000000000 [13755.434352] RDX: 0000000000100000 RSI: 00007f5ab7f81000 RDI: 00007f5aba61c000 [13755.434355] RBP: 00007f5aba61c000 R08: 0000000000000007 R09: 0000000100000000 [13755.434359] R10: 000000000000037d R11: 00007f5ab91b5840 R12: 0000000000000001 [13755.434362] R13: 0000000000000005 R14: 0000000000000001 R15: 0000000000000000 and cyclic deadlocks: [ 2566.458979] ====================================================== [ 2566.459054] [ INFO: possible circular locking dependency detected ] [ 2566.459127] 4.11.0-rc1+ #26 Not tainted [ 2566.459194] ------------------------------------------------------- [ 2566.459266] gem_streaming_w/759 is trying to acquire lock: [ 2566.459334] (&obj->mm.lock){+.+.+.}, at: [] i915_gem_object_pin_pages+0x0/0xc0 [i915] [ 2566.459605] [ 2566.459605] but task is already holding lock: [ 2566.459699] (&mm->mmap_sem){++++++}, at: [] __do_page_fault+0x121/0x500 [ 2566.459814] [ 2566.459814] which lock already depends on the new lock. [ 2566.459814] [ 2566.459934] [ 2566.459934] the existing dependency chain (in reverse order) is: [ 2566.460030] [ 2566.460030] -> #1 (&mm->mmap_sem){++++++}: [ 2566.460139] lock_acquire+0xfe/0x220 [ 2566.460214] down_read+0x4e/0x90 [ 2566.460444] i915_gem_userptr_get_pages+0x6e/0x340 [i915] [ 2566.460669] ____i915_gem_object_get_pages+0x8b/0xd0 [i915] [ 2566.460900] __i915_gem_object_get_pages+0x6a/0x80 [i915] [ 2566.461132] __i915_vma_do_pin+0x7fa/0x930 [i915] [ 2566.461352] eb_add_vma+0x67b/0x830 [i915] [ 2566.461572] eb_lookup_vmas+0xafe/0x1010 [i915] [ 2566.461792] i915_gem_do_execbuffer+0x715/0x2870 [i915] [ 2566.462012] i915_gem_execbuffer2+0x106/0x2b0 [i915] [ 2566.462152] drm_ioctl+0x36c/0x670 [drm] [ 2566.462236] do_vfs_ioctl+0x12c/0xa60 [ 2566.462317] SyS_ioctl+0x41/0x70 [ 2566.462399] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 2566.462477] [ 2566.462477] -> #0 (&obj->mm.lock){+.+.+.}: [ 2566.462587] __lock_acquire+0x1602/0x1790 [ 2566.462661] lock_acquire+0xfe/0x220 [ 2566.462893] i915_gem_object_pin_pages+0x4c/0xc0 [i915] [ 2566.463116] i915_gem_fault+0x2c2/0x8c0 [i915] [ 2566.463197] __do_fault+0x42/0x130 [ 2566.463276] __handle_mm_fault+0x92c/0x1280 [ 2566.463356] handle_mm_fault+0x1e2/0x440 [ 2566.463443] __do_page_fault+0x1c4/0x500 [ 2566.463529] do_page_fault+0xc/0x10 [ 2566.463613] page_fault+0x1f/0x30 [ 2566.463693] [ 2566.463693] other info that might help us debug this: [ 2566.463693] [ 2566.463820] Possible unsafe locking scenario: [ 2566.463820] [ 2566.463918] CPU0 CPU1 [ 2566.463988] ---- ---- [ 2566.464068] lock(&mm->mmap_sem); [ 2566.464143] lock(&obj->mm.lock); [ 2566.464226] lock(&mm->mmap_sem); [ 2566.464304] lock(&obj->mm.lock); [ 2566.464378] [ 2566.464378] *** DEADLOCK *** [ 2566.464378] [ 2566.464504] 1 lock held by gem_streaming_w/759: [ 2566.464576] #0: (&mm->mmap_sem){++++++}, at: [] __do_page_fault+0x121/0x500 [ 2566.464699] [ 2566.464699] stack backtrace: [ 2566.464801] CPU: 0 PID: 759 Comm: gem_streaming_w Not tainted 4.11.0-rc1+ #26 [ 2566.464881] Hardware name: GIGABYTE GB-BXBT-1900/MZBAYAB-00, BIOS F8 03/02/2016 [ 2566.464983] Call Trace: [ 2566.465061] dump_stack+0x68/0x9f [ 2566.465144] print_circular_bug+0x20b/0x260 [ 2566.465234] __lock_acquire+0x1602/0x1790 [ 2566.465323] ? debug_check_no_locks_freed+0x1a0/0x1a0 [ 2566.465564] ? i915_gem_object_wait+0x238/0x650 [i915] [ 2566.465657] ? debug_lockdep_rcu_enabled.part.4+0x1a/0x30 [ 2566.465749] lock_acquire+0xfe/0x220 [ 2566.465985] ? i915_sg_trim+0x1b0/0x1b0 [i915] [ 2566.466223] i915_gem_object_pin_pages+0x4c/0xc0 [i915] [ 2566.466461] ? i915_sg_trim+0x1b0/0x1b0 [i915] [ 2566.466699] i915_gem_fault+0x2c2/0x8c0 [i915] [ 2566.466939] ? i915_gem_pwrite_ioctl+0xce0/0xce0 [i915] [ 2566.467030] ? __lock_acquire+0x642/0x1790 [ 2566.467122] ? __lock_acquire+0x642/0x1790 [ 2566.467209] ? debug_lockdep_rcu_enabled+0x35/0x40 [ 2566.467299] ? get_unmapped_area+0x1b4/0x1d0 [ 2566.467387] __do_fault+0x42/0x130 [ 2566.467474] __handle_mm_fault+0x92c/0x1280 [ 2566.467564] ? __pmd_alloc+0x1e0/0x1e0 [ 2566.467651] ? vm_mmap_pgoff+0x160/0x190 [ 2566.467740] ? handle_mm_fault+0x111/0x440 [ 2566.467827] handle_mm_fault+0x1e2/0x440 [ 2566.467914] ? handle_mm_fault+0x5d/0x440 [ 2566.468002] __do_page_fault+0x1c4/0x500 [ 2566.468090] do_page_fault+0xc/0x10 [ 2566.468180] page_fault+0x1f/0x30 [ 2566.468263] RIP: 0033:0x557895ced32a [ 2566.468337] RSP: 002b:00007fffd6dd8a10 EFLAGS: 00010202 [ 2566.468419] RAX: 00007f659a4db000 RBX: 0000000000000003 RCX: 00007f659ad032da [ 2566.468501] RDX: 0000000000000000 RSI: 0000000000100000 RDI: 0000000000000000 [ 2566.468586] RBP: 0000000000000007 R08: 0000000000000003 R09: 0000000100000000 [ 2566.468667] R10: 0000000000000001 R11: 0000000000000246 R12: 0000557895ceda60 [ 2566.468749] R13: 0000000000000001 R14: 00007fffd6dd8ac0 R15: 00007f659a4db000 By checking the status of the gup worker (serialized by the obj->mm.lock) we can determine whether it is still active, has failed or has succeeded. If the worker is still active (or failed), we know that it cannot be bound and so we can skip taking struct_mutex (risking potential recursion). As we check the worker status, we mark it to discard any partial results, forcing us to restart on the next get_pages. Reported-by: Sergey Senozhatsky Fixes: 1c8782dd313e ("drm/i915/userptr: Disallow wrapping GTT into a userptr") Testcase: igt/gem_userptr_blits/map-fixed-invalidate-gup Testcase: igt/gem_userptr_blits/dmabuf-sync Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170315140150.19432-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_userptr.c | 54 ++++++++------------------------- 1 file changed, 13 insertions(+), 41 deletions(-) commit 28845b079b9611b3082aa53e2dae2ea10a16a1c2 Author: Krzysztof Kozlowski Date: Sat Mar 11 08:11:00 2017 +0200 MAINTAINERS: Add maintianer entry for crypto/s5p-sss Add Krzysztof Kozlowski and Vladimir Zapolskiy as maintainers of s5p-sss driver for handling reviews, testing and getting bug reports from the users. Cc: Vladimir Zapolskiy Cc: Herbert Xu Signed-off-by: Krzysztof Kozlowski Acked-by: Vladimir Zapolskiy Signed-off-by: Herbert Xu MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 986bdd5944b3d630431198759517e79f60bd8fff Author: Fabien DESSENNE Date: Thu Mar 9 10:40:05 2017 +0100 crypto: doc - fix typo (struct sdesc) Add missing " " in api-samples.rst Signed-off-by: Fabien Dessenne Signed-off-by: Herbert Xu Documentation/crypto/api-samples.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9aa2fcb8cf8b1030db2ed5afaa8737e94437a27c Author: Ryder Lee Date: Thu Mar 9 10:11:19 2017 +0800 crypto: mediatek - make hardware operation flow more efficient This patch refines data structures, which are used to control engine's data path, to make it more efficient. Hence current change are: - gathers the broken pieces of structures 'mtk_aes_ct''mtk_aes_tfm' into struct mtk_aes_info hence avoiding additional DMA-mapping. - adds 'keymode' in struct mtk_aes_base_ctx. When .setkey() callback is called, we store keybit setting in keymode. Doing so, there is no need to check keylen second time in mtk_aes_info_init() / mtk_aes_gcm_info_init(). Besides, this patch also removes unused macro definitions and adds helper inline function to write security information(key, IV,...) to info->state. Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 263 ++++++++++++++++++-------------------- drivers/crypto/mediatek/mtk-sha.c | 90 ++++++------- 2 files changed, 165 insertions(+), 188 deletions(-) commit 98b10235f348ddb88be7afc1da167a85f88fcb56 Author: Ryder Lee Date: Thu Mar 9 10:11:18 2017 +0800 crypto: mediatek - add mtk_aes_gcm_tag_verify() This patch adds mtk_aes_gcm_tag_verify() which is used to compare authenticated tag. Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 24 ++++++++++++++++++++++-- drivers/crypto/mediatek/mtk-platform.h | 2 ++ 2 files changed, 24 insertions(+), 2 deletions(-) commit 5041d714fc3e32a4cb0408312ce71d80114413b5 Author: Ryder Lee Date: Thu Mar 9 10:11:17 2017 +0800 crypto: mediatek - fix error handling in mtk_aes_complete() This patch fixes how errors should be handled by mtk_aes_complete(). Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) commit 0d4a826611676198aea8ae531b84dd980a4b5f61 Author: Ryder Lee Date: Thu Mar 9 10:11:16 2017 +0800 crypto: mediatek - add queue_task tasklet This patch adds 'queue_task' to dequeue crypto requset. This will help to avoid directly calling mtk_aes_handle_queue() / mtk_sha_handle_queue() from done tasklet or error handler. In order to avoid confusion, the new code properly renames DMA completion "task" to "done_task". Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 20 ++++++++++++++++---- drivers/crypto/mediatek/mtk-platform.h | 12 ++++++++---- drivers/crypto/mediatek/mtk-sha.c | 19 +++++++++++++++---- 3 files changed, 39 insertions(+), 12 deletions(-) commit 3d21c41f7e9b51c70d37b316f11cf5cce9dd3311 Author: Ryder Lee Date: Thu Mar 9 10:11:15 2017 +0800 crypto: mediatek - simplify descriptor ring management This patch replaces cmd_pos/res_pos with pointer cmd_next/res_next. In old code, we must to add one to shift ring to the next segment, and then use this value to caculate current offset from ring base for each DMA operation. Now these pointers helps us to simplify flow, so we just need to move pointers and check the boundaries of ring. Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 14 ++++++++------ drivers/crypto/mediatek/mtk-platform.c | 3 +++ drivers/crypto/mediatek/mtk-platform.h | 8 ++++---- drivers/crypto/mediatek/mtk-sha.c | 35 ++++++++++++++++++---------------- 4 files changed, 34 insertions(+), 26 deletions(-) commit 82445fe995f4b1edf131157a7328796d5aec1efb Author: Ryder Lee Date: Thu Mar 9 10:11:14 2017 +0800 crypto: mediatek - make mtk_sha_xmit() more generic This is a transitional patch. It merges mtk_sha_xmit() and mtk_sha_xmit2() to make transmit function more generic. In addition, res->buf and cryp->tmp_dma in mtk_sha_xmit() are useless, since crypto engine writes the result digests into ctx->tfm.digest instead of res->buf. It's better to remove it. Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-platform.h | 4 -- drivers/crypto/mediatek/mtk-sha.c | 116 ++++++++++----------------------- 2 files changed, 34 insertions(+), 86 deletions(-) commit b7a2be388b5574428170e1a22f800f1d71cbfd64 Author: Ryder Lee Date: Thu Mar 9 10:11:13 2017 +0800 crypto: mediatek - add MTK_* prefix and correct annotations. Dummy patch to add MTK_* prefix to ring enum and fix incorrect annotations. Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 12 ++++++------ drivers/crypto/mediatek/mtk-platform.c | 12 ++++++------ drivers/crypto/mediatek/mtk-platform.h | 26 +++++++++++++------------- drivers/crypto/mediatek/mtk-sha.c | 14 +++++++------- 4 files changed, 32 insertions(+), 32 deletions(-) commit 132c57caefeddde914350d42bb6e3b5a3688faa5 Author: Ryder Lee Date: Thu Mar 9 10:11:12 2017 +0800 crypto: mediatek - rework interrupt handler This patch removes redundant task that used to handle interrupt from ring manager, so that the same task/handler can be shared. It also uses aes->id and sha-id to distinguish interrupt sources. Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 73 +++++++++++----------------------- drivers/crypto/mediatek/mtk-platform.h | 4 ++ drivers/crypto/mediatek/mtk-sha.c | 73 ++++++++++------------------------ 3 files changed, 49 insertions(+), 101 deletions(-) commit 43ec540e6f9b8e795dc9000114636ff72afc5b01 Author: Thomas Petazzoni Date: Tue Mar 7 15:14:49 2017 +0100 hwrng: omap - move clock related code to omap_rng_probe() Currently, the code that takes a reference to the clock and enables it is located inside of_get_omap_rng_device_details(), called only when probing through the Device Tree. However, there is nothing that makes this clock logic dependent on the Device Tree, so it makes more sense to have it in omap_rng_probe() directly. Moreover, we make sure to bail out if we can't enable the clock. Indeed, while the clock is optional, if a clock is present, we really want to succeed in enabling it. And we fix the error message to fit on one line, so that it is grep-friendly. Signed-off-by: Thomas Petazzoni Signed-off-by: Herbert Xu drivers/char/hw_random/omap-rng.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 7a794a73d4440cb257f541cc29630c7560266cf7 Author: Heiner Kallweit Date: Wed Feb 22 08:02:31 2017 +0100 hwrng: meson - add clock handling to driver Add handling of RNG0 clock to the driver. Signed-off-by: Heiner Kallweit Signed-off-by: Herbert Xu drivers/char/hw_random/meson-rng.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 1b3f6d148692ef3c3c96af1647083ff38d429e46 Author: Heiner Kallweit Date: Wed Feb 22 08:00:55 2017 +0100 ARM64: dts: meson-gx: add clock CLKID_RNG0 to hwrng node Add clock CLKID_RNG0 to HW randon number generator node. Signed-off-by: Heiner Kallweit Signed-off-by: Herbert Xu arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit e56e12acfe6f5895299f420174e111b49ef69380 Author: Heiner Kallweit Date: Wed Feb 22 07:59:08 2017 +0100 dt-bindings: rng: add clock to DT binding documentation for hwrng Add clock to DT binding documentation. Signed-off-by: Heiner Kallweit Acked-by: Rob Herring Signed-off-by: Herbert Xu Documentation/devicetree/bindings/rng/amlogic,meson-rng.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit eff041553d2e4d7978e47f99e7cffb866c71d98f Author: Heiner Kallweit Date: Wed Feb 22 07:55:24 2017 +0100 clk: meson-gxbb: expose clock CLKID_RNG0 Expose clock CLKID_RNG0 which is needed for the HW random number generator. Signed-off-by: Heiner Kallweit Reviewed-by: Neil Armstrong Signed-off-by: Herbert Xu drivers/clk/meson/gxbb.h | 2 +- include/dt-bindings/clock/gxbb-clkc.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 335d534938d327d5ba266564b7e6beaf5d456dd2 Author: Masashi Honma Date: Thu Mar 16 10:57:17 2017 +0900 nl80211: Use signed function for a signed variable The rssi_threshold is defined as s32. Signed-off-by: Masashi Honma Signed-off-by: Johannes Berg net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c19dfbe964f4bbb38c1868b851adf4855fc93ff Author: Ondřej Lysoněk Date: Thu Mar 9 10:34:36 2017 +0100 mac80211: Use setup_timer instead of init_timer for mesh path Use setup_timer() and setup_deferrable_timer() to set the data and function timer fields. It makes the code cleaner and will allow for easier change of the timer struct internals. Signed-off-by: Ondřej Lysoněk Cc: Jiri Slaby Cc: Johannes Berg Cc: "David S. Miller" Cc: Cc: Signed-off-by: Johannes Berg net/mac80211/mesh_pathtbl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 44dd182861f99f04171256f29b9dc51940757e5d Author: Christophe Leroy Date: Fri Feb 10 15:01:10 2017 +0100 mtd: nand: gpio: make nCE GPIO optional On some hardware, the nCE signal is wired to the ChipSelect associated to bus address of the NAND, so it is automatically driven during the memory access and it is not managed by a GPIO. Signed-off-by: Christophe Leroy Reviewed-by: Marek Vasut Signed-off-by: Boris Brezillon drivers/mtd/nand/gpio.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 2ac8fc51ddf152fdd2344c6d286976803183d59c Author: Johan Hovold Date: Thu Mar 2 12:51:34 2017 +0100 USB: serial: whiteheat: simplify endpoint check Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Note that the driver registers four ports but uses five bulk-endpoint pairs. Signed-off-by: Johan Hovold drivers/usb/serial/whiteheat.c | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) commit e2cd017f1b7c2e79b3a89d3c8e31c88ad365243a Author: Johan Hovold Date: Thu Mar 2 12:51:33 2017 +0100 USB: serial: symbolserial: simplify endpoint check Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Signed-off-by: Johan Hovold drivers/usb/serial/symbolserial.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit bdd154436077391e40fd20be8ff384d4002b3970 Author: Johan Hovold Date: Thu Mar 2 12:51:32 2017 +0100 USB: serial: spcp8x5: simplify endpoint check Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Signed-off-by: Johan Hovold drivers/usb/serial/spcp8x5.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 590298b2232503ee5088c3abfe6cf69d51ade427 Author: Johan Hovold Date: Thu Mar 2 12:51:31 2017 +0100 USB: serial: pl2303: simplify endpoint check Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Signed-off-by: Johan Hovold drivers/usb/serial/pl2303.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 32814c87f446b90efe4350bb97924eca53152d26 Author: Johan Hovold Date: Thu Mar 2 12:51:30 2017 +0100 USB: serial: oti6858: simplify endpoint check Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Signed-off-by: Johan Hovold drivers/usb/serial/oti6858.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit 5e5b6444d099ac7b883f5cc112f5415fe619a595 Author: Johan Hovold Date: Thu Mar 2 12:51:29 2017 +0100 USB: serial: opticon: simplify endpoint check Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Signed-off-by: Johan Hovold drivers/usb/serial/opticon.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 8ee1592d125a95dc8a554398e014b65ee04cd80c Author: Johan Hovold Date: Thu Mar 2 12:51:28 2017 +0100 USB: serial: omninet: simplify endpoint check Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Note that the driver uses the second bulk-out endpoint for writing. Signed-off-by: Johan Hovold drivers/usb/serial/omninet.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 206ff831bebb816087da29a34fcff5bd603602e1 Author: Johan Hovold Date: Thu Mar 2 12:51:27 2017 +0100 USB: serial: mos7720: simplify endpoint check Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Note that the driver expects two bulk-endpoint pairs also for mcs7715 devices for which only one serial port is registered. Signed-off-by: Johan Hovold drivers/usb/serial/mos7720.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 35194572b4ede8b021d4c70c8785cd4d5c3fae0a Author: Johan Hovold Date: Thu Mar 2 12:51:26 2017 +0100 USB: serial: kobil_sct: simplify endpoint check Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Signed-off-by: Johan Hovold drivers/usb/serial/kobil_sct.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit b714d5dc0631285d2cf237c1d4ed16ba9b68c6fb Author: Johan Hovold Date: Thu Mar 2 12:51:25 2017 +0100 USB: serial: keyspan_pda: simplify endpoint check Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Signed-off-by: Johan Hovold drivers/usb/serial/keyspan_pda.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit fb527736ebcca0c8b67bc4754a3804e6048b6dff Author: Johan Hovold Date: Thu Mar 2 12:51:24 2017 +0100 USB: serial: iuu_phoenix: simplify endpoint check Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Signed-off-by: Johan Hovold drivers/usb/serial/iuu_phoenix.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit fd0c883e597493d85d0800629798fc6fcce8e24e Author: Johan Hovold Date: Thu Mar 2 12:51:23 2017 +0100 USB: serial: io_edgeport: simplify and tighten endpoint check Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Also require the presence of a bulk-out endpoint, something which prevents the driver from trying to send bulk messages over the control pipe should a bulk-out endpoint be missing. Signed-off-by: Johan Hovold drivers/usb/serial/io_edgeport.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit e7d6507e5ba7aa015b454f4871d4dec1e751d3ce Author: Johan Hovold Date: Thu Mar 2 12:51:22 2017 +0100 USB: serial: digi_acceleport: simplify endpoint check Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Note that this driver uses an additional bulk-endpoint pair as an out-of-band port. Signed-off-by: Johan Hovold drivers/usb/serial/digi_acceleport.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) commit d183b9b43390cf58ec01e05e81defe764b410a77 Author: Johan Hovold Date: Thu Mar 2 12:51:21 2017 +0100 USB: serial: cyberjack: simplify endpoint check Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Signed-off-by: Johan Hovold drivers/usb/serial/cyberjack.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 52ccf4607a5581234fb5c5cff1d38a8c1b69fdc2 Author: Johan Hovold Date: Thu Mar 2 12:51:20 2017 +0100 USB: serial: ark3116: simplify endpoint sanity check Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Signed-off-by: Johan Hovold drivers/usb/serial/ark3116.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit 92e6b2c675e1d247317ec41a078f49aaade7f716 Author: Johan Hovold Date: Thu Mar 2 12:51:19 2017 +0100 USB: serial: add endpoint sanity check to core Allow drivers to specify a minimum number of endpoints per type, which USB serial core will verify after subdriver probe has returned (where the current alternate setting may have been changed). Signed-off-by: Johan Hovold drivers/usb/serial/usb-serial.c | 17 ++++++++++++----- include/linux/usb/serial.h | 9 +++++++++ 2 files changed, 21 insertions(+), 5 deletions(-) commit 8520ac0d70d6c1709bf6768cb79f3b75115def09 Author: Johan Hovold Date: Thu Mar 2 12:51:18 2017 +0100 USB: serial: replace runtime overflow check Since commit 0a8fd1346254 ("USB: fix problems with duplicate endpoint addresses") USB core guarantees that there are no more than 15 endpoint descriptors per type (and altsetting) so the corresponding overflow checks can now be replaced with a compile-time check on the array sizes (and indirectly the maximum number of ports). Signed-off-by: Johan Hovold drivers/usb/serial/usb-serial.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit ff0c5703a4b11fca86886e5b7ce40c396bef8381 Author: Johan Hovold Date: Thu Mar 2 12:51:17 2017 +0100 USB: serial: allow up to 16 ports per device Raise the arbitrary limit of how many ports a single device can claim from eight to 16. This specifically enables the upper eight ports of some mxuport devices. Signed-off-by: Johan Hovold include/linux/usb/serial.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1546e6aecb2490c4510bcd953cbb522d85957791 Author: Johan Hovold Date: Thu Aug 21 19:33:25 2014 +0200 USB: serial: refactor and clean up endpoint handling Refactor and clean up endpoint handling. This specifically moves the endpoint-descriptor arrays of the stack. Note that an err_free_epds label is not yet added to avoid a compilation warning when neither CONFIG_USB_SERIAL_PL2303 or CONFIG_USB_SERIAL_GENERIC is selected. Signed-off-by: Johan Hovold drivers/usb/serial/usb-serial.c | 154 +++++++++++++++++++++------------------- 1 file changed, 80 insertions(+), 74 deletions(-) commit 01eb9ae1aeaf776653a861bb38aaa816a911da58 Author: Alison Wang Date: Mon Feb 13 14:46:56 2017 +0800 mtd: nand: Update dependency of IFC for LS1021A As NAND support for Freescale/NXP IFC controller is available on LS1021A, the dependency for LS1021A is added. LS1021A is an earlier product and is not compatible with later LayerScape architecture. So ARCH_LAYERSCAPE can't cover LS1021A. Signed-off-by: Alison Wang Signed-off-by: Boris Brezillon drivers/mtd/nand/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4edafe391e8914c19b92e500b72e1ea5aa3a26f2 Author: Alison Wang Date: Mon Feb 13 14:46:55 2017 +0800 memory: ifc: Update dependency of IFC for LS1021A As Freescale/NXP IFC controller is available on LS1021A, the dependency for LS1021A is added. LS1021A is an earlier product and is not compatible with later LayerScape architecture. So ARCH_LAYERSCAPE can't cover LS1021A. Signed-off-by: Alison Wang Signed-off-by: Boris Brezillon drivers/memory/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1932a9646b777c448aec9d992995b0bb0648b11d Author: Boris Brezillon Date: Mon Feb 20 14:10:07 2017 +0100 mtd: nand: tango: Enforce DMA direction type do_dma() uses an int to pass the DMA data direction information and pass the same value to dmaengine_prep_slave_sg(). Currently, DMA_{FROM,TO}_DEVICE match DMA_{DEV_TO_MEM,MEM_TO_DEV} definitions so it works fine, but assuming this will always be the case is not safe. Enforce enum dma_data_direction type in the function prototype and make the enum dma_data_direction -> enum dma_transfer_direction conversion explicit. Reported-by: Richard Weinberger Signed-off-by: Boris Brezillon Acked-by: Marc Gonzalez drivers/mtd/nand/tango_nand.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 215157fb5338129b4b9f2dca23826084e71bcf4d Author: Colin Ian King Date: Thu Feb 23 11:30:48 2017 +0000 mtd: nand: nandsim: fix spelling mistake: "weakpagess" -> "weakpages" trivial fix to spelling mistake in NS_ERR error message Signed-off-by: Colin Ian King Acked-by: Marek Vasut Signed-off-by: Boris Brezillon drivers/mtd/nand/nandsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d5ed2920d15a8583084f7ca689a30277ef9af55 Author: Liu Ying Date: Wed Mar 15 14:52:17 2017 +0800 drm/imx: Remove unneeded definition for structure imx_drm_component No one is using the structure imx_drm_component, so let's remove the definition to save several lines. Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-drm-core.c | 5 ----- 1 file changed, 5 deletions(-) commit 00514e8593350498790d19c7e21b720fee899cf7 Author: Lucas Stach Date: Wed Mar 8 12:13:21 2017 +0100 drm/imx: use PRG/PRE when possible Allow the planes to use the PRG/PRE units as linear prefetchers when possible. This improves DRAM efficiency a bit and reduces the chance for display underflow when the memory subsystem is under load. This does not yet support scanning out tiled buffers directly, as this needs more work, but it already wires up the basic interaction between imx-drm, the IPUv3 driver and the PRG and PRE drivers. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-drm-core.c | 5 ++ drivers/gpu/drm/imx/imx-drm.h | 3 + drivers/gpu/drm/imx/ipuv3-plane.c | 124 ++++++++++++++++++++++++++++++++++++- 3 files changed, 129 insertions(+), 3 deletions(-) commit e0fb7dd2f00440b5449f625dee7b442219d8a56e Author: Lucas Stach Date: Wed Mar 8 12:13:20 2017 +0100 drm/imx: enable/disable PRG on CRTC enable/disable On i.MX6 QuadPlus the PRG needs to be clocked in order to pass through the data access requests from the IDMAC. This call is a no-op for other all other SoCs. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-crtc.c | 2 ++ 1 file changed, 2 insertions(+) commit 320a89ad7bdaf90700fcdc3cb8a811b9b7a1a919 Author: Lucas Stach Date: Wed Mar 8 12:13:19 2017 +0100 gpu: ipu-v3: only set non-zero AXI ID for IC when PRG is absent Using non-zero AXI IDs for anything other than the display channels collides with the PRG AXI snooping, so only do this if there is no PRG present. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-image-convert.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 92681fe7e98eb8c0a3ef6e850db399b2de192562 Author: Lucas Stach Date: Wed Mar 8 12:13:18 2017 +0100 gpu: ipu-v3: hook up PRG unit The i.MX6 QuadPlus IPU needs to PRG unit to gain access to the data bus. Make sure it is present and available to be used. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-common.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 0d6c9a424498d7167b6c6759b58bd649e96dbf80 Author: Lucas Stach Date: Wed Mar 8 12:13:17 2017 +0100 gpu: ipu-v3: document valid IPUv3 compatibles and extend for i.MX6 QuadPlus Document the valid compatible strings for the IPUv3. On i.MX6 QuadPlus the IPU needs to know which PRG has to be used for this IPU instance. Add a "fsl,prg" property containing a phandle pointing to the correct PRG device. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit ea9c260514c15f14d43a4c099646c44238dccf1e Author: Lucas Stach Date: Wed Mar 8 12:13:16 2017 +0100 gpu: ipu-v3: add driver for Prefetch Resolve Gasket This adds support for the i.MX6 QUadPlus PRG unit. It glues together the IPU and the PRE units. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel --- v4: add missing ipu_soc->prg_priv drivers/gpu/ipu-v3/Makefile | 2 +- drivers/gpu/ipu-v3/ipu-common.c | 1 + drivers/gpu/ipu-v3/ipu-prg.c | 424 ++++++++++++++++++++++++++++++++++++++++ drivers/gpu/ipu-v3/ipu-prv.h | 6 + include/video/imx-ipu-v3.h | 15 ++ 5 files changed, 447 insertions(+), 1 deletion(-) commit ef88f33fc1ee0a12a1e5eee7e4f70b7743100a19 Author: Johan Hovold Date: Thu Mar 2 12:51:15 2017 +0100 USB: serial: clean up endpoint and port-counter types Use unsigned-char type for the endpoint and port counters. Signed-off-by: Johan Hovold drivers/usb/serial/usb-serial.c | 14 +++++++------- include/linux/usb/serial.h | 11 ++++++----- 2 files changed, 13 insertions(+), 12 deletions(-) commit c2fef4564cae387c2f724a95350084c2e9371250 Author: Johan Hovold Date: Thu Mar 2 12:51:14 2017 +0100 USB: serial: clean up probe error paths Clean up the probe error paths by adding a couple of new error labels. Signed-off-by: Johan Hovold drivers/usb/serial/usb-serial.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit b5a6a4e5baeff6a20a5c5e8711d8b08658efacbb Author: Romain Perier Date: Wed Mar 8 17:19:53 2017 +0100 usb: gadget: amd5536udc: Replace PCI pool old API The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/amd5536udc.c | 8 ++++---- drivers/usb/gadget/udc/amd5536udc.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit d293408ef303c30388835e3f367e59332e3d4b6b Author: Romain Perier Date: Wed Mar 8 17:19:55 2017 +0100 usb: gadget: pch_udc: Replace PCI pool old API The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/pch_udc.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit fa9ed6f69d7dac9eb1a044f54570d3bcb3335295 Author: Romain Perier Date: Wed Mar 8 17:19:54 2017 +0100 usb: gadget: net2280: Replace PCI pool old API The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/net2280.c | 12 ++++++------ drivers/usb/gadget/udc/net2280.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 324c54fab707921d6c68a05e5829b9d87cc5d884 Author: Romain Perier Date: Wed Mar 8 17:19:56 2017 +0100 usb: host: Remove remaining pci_pool in comments This replaces remaining occurences of pci_pool by dma_pool, as this is the new API that could be used for that purpose. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-hcd.c | 2 +- drivers/usb/host/fotg210-hcd.c | 2 +- drivers/usb/host/oxu210hp-hcd.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit c4ba329cabca7c839ab48fb58b5bcc2582951a48 Author: Oliver Neukum Date: Tue Mar 14 12:05:07 2017 +0100 usb: misc: lvs: fix race condition in disconnect handling There is a small window during which the an URB may remain active after disconnect has returned. If in that case already freed memory may be accessed and executed. The fix is to poison the URB befotre the work is flushed. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/lvstest.c | 1 + 1 file changed, 1 insertion(+) commit e4ecd155d2a62246fc7722aeaa5819262904f40b Author: Prarit Bhargava Date: Mon Feb 20 09:04:44 2017 -0500 tools/usb: Add .gitignore file Add .gitignore file for untracked files in tools/usb. Signed-off-by: Prarit Bhargava Signed-off-by: Greg Kroah-Hartman tools/usb/.gitignore | 2 ++ 1 file changed, 2 insertions(+) commit b7963dac6871563ee0139d9c7f00ae4405133bde Author: Gustavo A. R. Silva Date: Thu Feb 16 15:25:44 2017 -0600 usb: misc: remove unnecessary code 'val' is an unsigned variable, and less-than-zero comparison of an unsigned variable is never true. Addresses-Coverity-ID: 1230256 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/lvstest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78f74f75bd80b8d3cc731da91d2065b172c67817 Author: Gustavo A. R. Silva Date: Thu Feb 16 16:27:36 2017 -0600 usb: atm: remove unnecessary code 'index' is an unsigned variable, and less-than-zero comparison of an unsigned variable is never true. Addresses-Coverity-ID: 115396 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/cxacru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a28f6f27a88f047f03f04b9246ca260ebc91455e Author: Mohammed Shafi Shajakhan Date: Wed Mar 8 18:03:32 2017 +0530 ath10k: fix fetching channel during potential radar detection Fetch target operating channel during potential radar detection when the interface is just brought up, but no channel is assigned from userspace. In this scenario rx_channel may not be having a valid pointer hence fetch the target operating channel to avoid warnings as below which can be triggered by the commands with DFS testing over longer run comamnds: iw wlan1 set type mesh ifconfig wlan1 up (valid tgt_oper_chan only) iw wlan1 cac trigger freq 5260 HT20 (valid rx_channel, tgt_oper_chan) iw wlan1 cac trigger freq 5280 HT20 iw wlan1 cac trigger freq 5300 HT20 Once the CAC expires, current channel context will be removed and we are only left with the fallback option of using 'target operating channel' Firmware and driver log: ath: phy1: DFS: radar found on freq=5300: id=1, pri=1125, count=5, count_false=4 ath: phy1: DFS: radar found on freq=5260: id=5, pri=3151, count=6, count_false=11 ath: phy1: DFS: radar found on freq=5280: id=1, pri=1351, count=6, count_false=4 ath: phy1: DFS: radar found on freq=5300: id=1, pri=1125, count=5, count_false=4 ath10k_pci 0001:01:00.0: failed to derive channel for radar pulse, treating as radar ath10k_pci 0001:01:00.0: failed to derive channel for radar pulse, treating as radar Call trace: WARNING: CPU: 1 PID: 2145 at backports-20161201-3.14.77-9ab3068/net/wireless/chan.c:265 cfg80211_set_dfs_state+0x3c/0x88 [cfg80211]() Workqueue: phy1 ieee80211_dfs_radar_detected_work [mac80211] [] (warn_slowpath_null) from [] (cfg80211_set_dfs_state+0x3c/0x88 [cfg80211]) [] (cfg80211_set_dfs_state [cfg80211]) from [] (cfg80211_radar_event+0xc4/0x140 [cfg80211]) [] (cfg80211_radar_event [cfg80211]) from [] (ieee80211_dfs_radar_detected_work+0xa8/0xb4 [mac80211]) [] (ieee80211_dfs_radar_detected_work [mac80211]) from [] (process_one_work+0x298/0x4a4) Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi.c | 5 +++++ 1 file changed, 5 insertions(+) commit d4a70a10f56f9a598d9bed0b492bc1221311c4bf Author: Michal Wajdeczko Date: Wed Mar 15 13:37:41 2017 +0000 drm/i915: Make intel_uc_sanitize_options() more robust After negative guc fw selection we could leave guc submission flag still turned on. Reorder some checks to cover this case. While here, fix info message and return early if there is no Guc. Signed-off-by: Michal Wajdeczko Cc: Arkadiusz Hiler Cc: Joonas Lahtinen Reviewed-by: Arkadiusz Hiler [tursulin: fixup bad alignment] Signed-off-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170315133741.150420-1-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uc.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit bf7b3ac2e36ac054f93e5dd8d85dfd754b5e1c09 Author: Peter Zijlstra Date: Fri Mar 3 13:57:56 2017 +0100 locking/ww_mutex: Improve test to cover acquire context changes Currently each thread starts an acquire context only once, and performs all its loop iterations under it. This means that the Wound/Wait relations between threads are fixed. To make things a little more realistic and cover more of the functionality with the test, open a new acquire context for each loop. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Chris Wilson Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/locking/test-ww_mutex.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 383776fa7527745224446337f2dcfb0f0d1b8b56 Author: Thomas Gleixner Date: Mon Feb 27 15:37:36 2017 +0100 locking/lockdep: Handle statically initialized PER_CPU locks properly If a PER_CPU struct which contains a spin_lock is statically initialized via: DEFINE_PER_CPU(struct foo, bla) = { .lock = __SPIN_LOCK_UNLOCKED(bla.lock) }; then lockdep assigns a seperate key to each lock because the logic for assigning a key to statically initialized locks is to use the address as the key. With per CPU locks the address is obvioulsy different on each CPU. That's wrong, because all locks should have the same key. To solve this the following modifications are required: 1) Extend the is_kernel/module_percpu_addr() functions to hand back the canonical address of the per CPU address, i.e. the per CPU address minus the per CPU offset. 2) Check the lock address with these functions and if the per CPU check matches use the returned canonical address as the lock key, so all per CPU locks have the same key. 3) Move the static_obj(key) check into look_up_lock_class() so this check can be avoided for statically initialized per CPU locks. That's required because the canonical address fails the static_obj(key) check for obvious reasons. Reported-by: Mike Galbraith Signed-off-by: Thomas Gleixner [ Merged Dan's fixups for !MODULES and !SMP into this patch. ] Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Dan Murphy Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170227143736.pectaimkjkan5kow@linutronix.de Signed-off-by: Ingo Molnar include/linux/module.h | 6 ++++++ include/linux/percpu.h | 1 + kernel/locking/lockdep.c | 33 +++++++++++++++++++++++---------- kernel/module.c | 36 ++++++++++++++++++++++++------------ mm/percpu.c | 37 +++++++++++++++++++++++-------------- 5 files changed, 77 insertions(+), 36 deletions(-) commit 6419c4af777a773a45a1b1af735de0fcd9a7dcc7 Author: J. R. Okajima Date: Fri Feb 3 01:38:17 2017 +0900 locking/lockdep: Add new check to lock_downgrade() Commit: f8319483f57f ("locking/lockdep: Provide a type check for lock_is_held") didn't fully cover rwsems as downgrade_write() was left out. Introduce lock_downgrade() and use it to add new checks. See-also: http://marc.info/?l=linux-kernel&m=148581164003149&w=2 Originally-written-by: Peter Zijlstra Signed-off-by: J. R. Okajima Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1486053497-9948-3-git-send-email-hooanon05g@gmail.com [ Rewrote the changelog. ] Signed-off-by: Ingo Molnar include/linux/lockdep.h | 3 +++ kernel/locking/lockdep.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ kernel/locking/rwsem.c | 6 ++---- 3 files changed, 60 insertions(+), 4 deletions(-) commit e969970be033841d4c16b2e8ec8a3608347db861 Author: J. R. Okajima Date: Fri Feb 3 01:38:16 2017 +0900 locking/lockdep: Factor out the validate_held_lock() helper function Behaviour should not change. Signed-off-by: J. R. Okajima Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1486053497-9948-2-git-send-email-hooanon05g@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) commit 41c2c5b86a5e1a691ddacfc03b631b87a0b19043 Author: J. R. Okajima Date: Fri Feb 3 01:38:15 2017 +0900 locking/lockdep: Factor out the find_held_lock() helper function A simple consolidataion to factor out repeated patterns. The behaviour should not change. Signed-off-by: J. R. Okajima Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1486053497-9948-1-git-send-email-hooanon05g@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 114 ++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 60 deletions(-) commit 51f60b8b6979da361c97602d6b6df3c3f72c7c4c Author: Colin Ian King Date: Tue Feb 28 11:14:39 2017 +0000 ath10k: remove redundant error check The check on ret for an error is redundant because it is already been checked for non-zero earlier on and ret is never non-zero at this point. Fix this by removing the redundant check and error message. Detected by CoverityScan, CID#1357170 ("Logically Dead Code") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 6 ------ 1 file changed, 6 deletions(-) commit 45c3d550b0684343b9d4b25aeec9b49c6effc1f9 Author: Zefir Kurtisi Date: Mon Feb 27 15:49:36 2017 +0100 ath9k: don't trigger spectral scan when not enabled Doing so enables the FFT generation without prior configuration, leading to an IRQ storm caused by invalid (or at least unwanted) PHY errors. Signed-off-by: Zefir Kurtisi Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/common-spectral.c | 3 +++ 1 file changed, 3 insertions(+) commit 6833b82e98af18954fa4d13dc9975e97afc8338f Author: Arkadiusz Hiler Date: Wed Mar 15 14:34:15 2017 +0100 drm/i915/uc: Rename intel_uc_fw.fw to .type This field is used to determine which kind of firmware the struct describes (GuC/HuC) - the name does not reflect. The enum used here have "type" in the name, so let's go with that. Cc: Tvrtko Ursulin Cc: Oscar Mateo Signed-off-by: Arkadiusz Hiler Reviewed-by: Michal Wajdeczko Signed-off-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170315133415.15343-1-arkadiusz.hiler@intel.com drivers/gpu/drm/i915/intel_guc_loader.c | 2 +- drivers/gpu/drm/i915/intel_huc.c | 2 +- drivers/gpu/drm/i915/intel_uc.c | 4 ++-- drivers/gpu/drm/i915/intel_uc.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 6b244bbf0ddfcb5539bcf4e60d8799c926b0108d Author: Philipp Zabel Date: Wed Mar 15 12:31:47 2017 +0100 mtd: nand: sunxi: simplify optional reset handling As of commit bb475230b8e5 ("reset: make optional functions really optional"), the reset framework API calls use NULL pointers to describe optional, non-present reset controls. This allows to return errors from devm_reset_control_get_optional and to call reset_control_(de)assert unconditionally. Signed-off-by: Philipp Zabel Signed-off-by: Boris Brezillon drivers/mtd/nand/sunxi_nand.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 523f6701dbabbe63b35d16bb676d35212b22e204 Author: Tamizh chelvam Date: Thu Feb 23 18:48:22 2017 +0530 ath10k: update available channel list for 5G radio If a 5 GHz radio is calibrated for operation in both the low band (channels 36 to 64) and high band(channels 100 to 169), hardware allows operations in all the listed channels. However, if the chip has been calibrated only for the low/high band and a high/low band channel is configured, due to lack of calibration there will be potentially invalid signal on those non calibrated channels. To avoid this problem this patch sets IEEE80211_CHAN_DISABLED flag for those non calibrated channels by using low_5ghz_chan and high_5ghz_chan values which we get from target through wmi service ready event. Driver initialized flags are getting re initialized in handle_channel in cfg80211. So calling the function to disable the non supported channel from reg_notifier(). Signed-off-by: Tamizh chelvam Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.h | 2 ++ drivers/net/wireless/ath/ath10k/mac.c | 19 +++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.c | 6 ++++++ drivers/net/wireless/ath/ath10k/wmi.h | 2 ++ 4 files changed, 29 insertions(+) commit 82c8e025b577a4b9b87fbbc2a1c4dd401e3a2521 Author: Chris Wilson Date: Wed Mar 15 20:40:26 2017 +0000 drm: Skip the waitqueue setup for vblank queries Avoid adding to the waitqueue and reprobing the current vblank if the caller is only querying the current vblank sequence and timestamp, where we know that the wait would return immediately. v2: Add CRTC identifier to debug messages Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Michel Dänzer Cc: Laurent Pinchart Cc: Dave Airlie , Cc: Mario Kleiner Reviewed-by: Michel Dänzer Reviewed-and-tested-by: Mario Kleiner Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170315204027.20160-2-chris@chris-wilson.co.uk drivers/gpu/drm/drm_irq.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit f2c716e4dd2489200589f90be1c4b82787bcc1e9 Merge: bd17416 17fcbd5 Author: Ingo Molnar Date: Thu Mar 16 09:51:37 2017 +0100 Merge branch 'locking/urgent' into locking/core, to pick up fixes Signed-off-by: Ingo Molnar commit ca07baab0b1e627ae1d4a55d190fb1c9d32a3445 Author: Mohammed Shafi Shajakhan Date: Wed Feb 22 21:03:11 2017 +0530 ath10k: disallow DFS simulation if DFS channel is not enabled If DFS is not enabled in hostapd (ieee80211h=0) DFS channels shall not be available for use even though the hardware may have the capability to support DFS. With this configuration (DFS disabled in hostapd) trying to bring up ath10k device in DFS channel for AP mode fails and trying to simulate DFS in ath10k debugfs results in a warning in cfg80211 complaining invalid channel and this should be avoided in the driver itself rather than false propogating RADAR detection to mac80211/cfg80211. Fix this by checking for the first vif 'is_started' state(should work for client mode as well) as all the vifs shall be configured for the same channel sys/kernel/debug/ieee80211/phy1/ath10k# echo 1 > dfs_simulate_radar WARNING: at net/wireless/chan.c:265 cfg80211_radar_event+0x24/0x60 Workqueue: phy0 ieee80211_dfs_radar_detected_work [mac80211] [] (warn_slowpath_null) from [] (cfg80211_radar_event+0x24/0x60 [cfg80211]) [] (cfg80211_radar_event [cfg80211]) from [] (ieee80211_dfs_radar_detected_work+0x94/0xa0 [mac80211]) [] (ieee80211_dfs_radar_detected_work [mac80211]) from [] (process_one_work+0x20c/0x32c) WARNING: at net/wireless/nl80211.c:2488 nl80211_get_mpath+0x13c/0x4cc Workqueue: phy0 ieee80211_dfs_radar_detected_work [mac80211] [] (warn_slowpath_null) from [] (cfg80211_radar_event+0x24/0x60 [cfg80211]) [] (cfg80211_radar_event [cfg80211]) from [] (ieee80211_dfs_radar_detected_work+0x94/0xa0 [mac80211]) [] (ieee80211_dfs_radar_detected_work [mac80211]) from [] (process_one_work+0x20c/0x32c) Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/debug.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 608b20506941969ea30d8c08dc9ae02bb87dbf7d Author: Chris Wilson Date: Wed Mar 15 20:40:25 2017 +0000 drm: Defer disabling the vblank IRQ until the next interrupt (for instant-off) On vblank instant-off systems, we can get into a situation where the cost of enabling and disabling the vblank IRQ around a drmWaitVblank query dominates. And with the advent of even deeper hardware sleep state, touching registers becomes ever more expensive. However, we know that if the user wants the current vblank counter, they are also very likely to immediately queue a vblank wait and so we can keep the interrupt around and only turn it off if we have no further vblank requests queued within the interrupt interval. After vblank event delivery, this patch adds a shadow of one vblank where the interrupt is kept alive for the user to query and queue another vblank event. Similarly, if the user is using blocking drmWaitVblanks, the interrupt will be disabled on the IRQ following the wait completion. However, if the user is simply querying the current vblank counter and timestamp, the interrupt will be disabled after every IRQ and the user will enabled it again on the first query following the IRQ. v2: Mario Kleiner - After testing this, one more thing that would make sense is to move the disable block at the end of drm_handle_vblank() instead of at the top. Turns out that if high precision timestaming is disabled or doesn't work for some reason (as can be simulated by echo 0 > /sys/module/drm/parameters/timestamp_precision_usec), then with your delayed disable code at its current place, the vblank counter won't increment anymore at all for instant queries, ie. with your other "instant query" patches. Clients which repeatedly query the counter and wait for it to progress will simply hang, spinning in an endless query loop. There's that comment in vblank_disable_and_save: "* Skip this step if there isn't any high precision timestamp * available. In that case we can't account for this and just * hope for the best. */ With the disable happening after leading edge of vblank (== hw counter increment already happened) but before the vblank counter/timestamp handling in drm_handle_vblank, that step is needed to keep the counter progressing, so skipping it is bad. Now without high precision timestamping support, a kms driver must not set dev->vblank_disable_immediate = true, as this would cause problems for clients, so this shouldn't matter, but it would be good to still make this robust against a future kms driver which might have unreliable high precision timestamping, e.g., high precision timestamping that intermittently doesn't work. v3: Patch before coffee needs extra coffee. Testcase: igt/kms_vblank Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Michel Dänzer Cc: Laurent Pinchart Cc: Dave Airlie , Cc: Mario Kleiner Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170315204027.20160-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_irq.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit ee368428aac96d94a9804b9109a81355451c3cd9 Author: Alexander Shishkin Date: Mon Feb 20 15:33:52 2017 +0200 perf/x86/intel/pt: Handle VMX better Since commit: 1c5ac21a0e ("perf/x86/intel/pt: Don't die on VMXON") ... PT events depend on re-scheduling to get enabled after a VMX session has taken place. This is, in particular, a problem for CPU context events, which don't normally get re-scheduled, unless there is a reason. This patch changes the VMX handling so that PT event gets re-enabled when VMX root mode exits. Also, notify the user when there's a gap in PT data due to VMX root mode by flagging AUX records as partial. In combination with vmm_exclusive=0 parameter of the kvm_intel driver, this will result in trace gaps only for the duration of the guest's timeslices. Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: vince@deater.net Link: http://lkml.kernel.org/r/20170220133352.17995-5-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/pt.c | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) commit ae0c2d995d648d5165545d5e05e2869642009b38 Author: Alexander Shishkin Date: Mon Feb 20 15:33:51 2017 +0200 perf/core: Add a flag for partial AUX records The Intel PT driver needs to be able to communicate partial AUX transactions, that is, transactions with gaps in data for reasons other than no room left in the buffer (i.e. truncated transactions). Therefore, this condition does not imply a wakeup for the consumer. To this end, add a new "partial" AUX flag. 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: Mathieu Poirier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: vince@deater.net Link: http://lkml.kernel.org/r/20170220133352.17995-4-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar include/uapi/linux/perf_event.h | 1 + kernel/events/ring_buffer.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit f4c0b0aa58d9b7e30ab0a95e33da84d53b3d764a Author: Will Deacon Date: Mon Feb 20 15:33:50 2017 +0200 perf/core: Keep AUX flags in the output handle In preparation for adding more flags to perf AUX records, introduce a separate API for setting the flags for a session, rather than appending more bool arguments to perf_aux_output_end. This allows to set each flag at the time a corresponding condition is detected, instead of tracking it in each driver's private state. Signed-off-by: Will Deacon 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: Mathieu Poirier Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: vince@deater.net Link: http://lkml.kernel.org/r/20170220133352.17995-3-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/bts.c | 16 +++++------ arch/x86/events/intel/pt.c | 17 ++++++------ arch/x86/events/intel/pt.h | 1 - drivers/hwtracing/coresight/coresight-etb10.c | 9 +++---- drivers/hwtracing/coresight/coresight-etm-perf.c | 9 +++---- drivers/hwtracing/coresight/coresight-priv.h | 2 -- drivers/hwtracing/coresight/coresight-tmc-etf.c | 7 +++-- include/linux/coresight.h | 2 +- include/linux/perf_event.h | 8 +++--- kernel/events/ring_buffer.c | 34 ++++++++++++++++-------- 10 files changed, 56 insertions(+), 49 deletions(-) commit ed827adb009490673c9c63e0b716e0fa36afbcc1 Author: Kan Liang Date: Fri Feb 10 02:23:58 2017 -0500 perf/x86: Add Top Down events to Intel Goldmont Goldmont supports full Top Down level 1 metrics (FrontendBound, Retiring, Backend Bound and Bad Speculation). It has 3 wide pipeline. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1486711438-80058-1-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 2b95bd7d58d368fe5dcbe6f4e494847ea082d89d Merge: ffa86c2f 69eea5a Author: Ingo Molnar Date: Thu Mar 16 09:50:50 2017 +0100 Merge branch 'linus' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit a6b0a141289db58d4934345fa2617602bf859a44 Author: Chris Wilson Date: Wed Mar 15 22:22:59 2017 +0000 drm/i915/breadcrumbs: Tweak commentary Tvrtko spotted a stale reference to b->lock (now b->rb_lock) so review the comments and try to improve them in passing. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170315222259.1469-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_breadcrumbs.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 15ff991e8047561bb4a4e800ec60f60939be5fd4 Author: Peter Zijlstra Date: Wed Oct 5 17:59:32 2016 +0200 sched/core: Avoid double update_rq_clock() in move_queued_task() Address this case: WARNING: CPU: 0 PID: 2070 at ../kernel/sched/core.c:109 update_rq_clock+0x74/0x80 rq->clock_update_flags & RQCF_UPDATED Call Trace: update_rq_clock() move_queued_task() __set_cpus_allowed_ptr() ... Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/sched/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5704ac0ae7f59581a264f45ddfc0ab4235aa052a Author: Peter Zijlstra Date: Tue Feb 21 17:15:21 2017 +0100 sched/core: Fix double update_rq_clock) calls in attach_task()/detach_task() Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/sched/fair.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7a57f32a4d5c80c7790929dd7f4441bb6bff7480 Author: Peter Zijlstra Date: Tue Feb 21 14:47:02 2017 +0100 sched/core: Avoid obvious double update_rq_clock() Add DEQUEUE_NOCLOCK to all places where we just did an update_rq_clock() already. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/sched/core.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit bce4dc80c66ad355c74e876c82ce371020754627 Author: Peter Zijlstra Date: Tue Feb 21 14:40:35 2017 +0100 sched/core: Simplify update_rq_clock() in __schedule() Instead of relying on deactivate_task() to call update_rq_clock() and handling the case where it didn't happen (task_on_rq_queued), unconditionally do update_rq_clock() and skip any further updates. This also avoids a double update on deactivate_task() + ttwu_local(). Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/sched/core.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 77558e4d01ac0c7fa8cb1af4a61c2ab508d79f30 Author: Peter Zijlstra Date: Tue Feb 21 14:36:23 2017 +0100 sched/core: Make sched_ttwu_pending() atomic in time Since all tasks on the wake_list are woken under a single rq->lock avoid calling update_rq_clock() for each task. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/sched/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7134b3e941613dcb959b4b178cc4a35e45cbbc0d Author: Peter Zijlstra Date: Tue Feb 21 14:23:38 2017 +0100 sched/core: Add ENQUEUE_NOCLOCK to ENQUEUE_RESTORE In all cases, ENQUEUE_RESTORE should also have ENQUEUE_NOCLOCK because DEQUEUE_SAVE will have done an update_rq_clock(). Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/sched/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0a67d1ee30ef1efe6a412b3590e08734902aed43 Author: Peter Zijlstra Date: Tue Oct 4 16:29:45 2016 +0200 sched/core: Add {EN,DE}QUEUE_NOCLOCK flags Currently {en,de}queue_task() do an unconditional update_rq_clock(). However since we want to avoid duplicate updates, so that each rq->lock section appears atomic in time, we need to be able to skip these clock updates. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/sched/core.c | 10 ++++++++-- kernel/sched/sched.h | 8 +++++--- 2 files changed, 13 insertions(+), 5 deletions(-) commit 8a8c69c32778865affcedc2111bb5d938b50516f Author: Peter Zijlstra Date: Tue Oct 4 16:04:35 2016 +0200 sched/core: Add rq->lock wrappers The missing update_rq_clock() check can work with partial rq->lock wrappery, since a missing wrapper can cause the warning to not be emitted when it should have, but cannot cause the warning to trigger when it should not have. The duplicate update_rq_clock() check however can cause false warnings to trigger. Therefore add more comprehensive rq->lock wrappery. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/sched/core.c | 155 ++++++++++++++++++++++++--------------------------- kernel/sched/fair.c | 71 ++++++++++++----------- kernel/sched/sched.h | 57 +++++++++++++++++++ 3 files changed, 171 insertions(+), 112 deletions(-) commit 26ae58d23b94a075ae724fd18783a3773131cfbc Author: Peter Zijlstra Date: Mon Oct 3 16:53:49 2016 +0200 sched/core: Add WARNING for multiple update_rq_clock() calls Now that we have no missing calls, add a warning to find multiple calls. By having only a single update_rq_clock() call per rq-lock section, the section appears 'atomic' wrt time. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/sched/core.c | 3 +++ kernel/sched/features.h | 7 +++++++ 2 files changed, 10 insertions(+) commit 3e777f9909483b603946685d88acfae89f31b07b Author: Steven Rostedt (VMware) Date: Tue Feb 28 15:50:30 2017 -0500 sched/rt: Add comments describing the RT IPI pull method While looking into optimizations for the RT scheduler IPI logic, I realized that the comments are lacking to describe it efficiently. It deserves a lengthy description describing its design. Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Clark Williams Cc: Daniel Bristot de Oliveira Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170228155030.30c69068@gandalf.local.home [ Small typographical edits. ] Signed-off-by: Ingo Molnar kernel/sched/rt.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit 45fc8757d1d2128e342b4e7ef39adedf7752faac Author: Thomas Garnier Date: Tue Mar 14 10:05:08 2017 -0700 x86: Make the GDT remapping read-only on 64-bit This patch makes the GDT remapped pages read-only, to prevent accidental (or intentional) corruption of this key data structure. This change is done only on 64-bit, because 32-bit needs it to be writable for TSS switches. The native_load_tr_desc function was adapted to correctly handle a read-only GDT. The LTR instruction always writes to the GDT TSS entry. This generates a page fault if the GDT is read-only. This change checks if the current GDT is a remap and swap GDTs as needed. This function was tested by booting multiple machines and checking hibernation works properly. KVM SVM and VMX were adapted to use the writeable GDT. On VMX, the per-cpu variable was removed for functions to fetch the original GDT. Instead of reloading the previous GDT, VMX will reload the fixmap GDT as expected. For testing, VMs were started and restored on multiple configurations. Signed-off-by: Thomas Garnier Cc: Alexander Potapenko Cc: Andrew Morton Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Chris Wilson Cc: Christian Borntraeger Cc: Dmitry Vyukov Cc: Frederic Weisbecker Cc: Jiri Kosina Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Len Brown Cc: Linus Torvalds Cc: Lorenzo Stoakes Cc: Luis R . Rodriguez Cc: Matt Fleming Cc: Michal Hocko Cc: Paolo Bonzini Cc: Paul Gortmaker Cc: Pavel Machek Cc: Peter Zijlstra Cc: Radim Krčmář Cc: Rafael J . Wysocki Cc: Rusty Russell Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tim Chen Cc: Vitaly Kuznetsov Cc: kasan-dev@googlegroups.com Cc: kernel-hardening@lists.openwall.com Cc: kvm@vger.kernel.org Cc: lguest@lists.ozlabs.org Cc: linux-doc@vger.kernel.org Cc: linux-efi@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-pm@vger.kernel.org Cc: xen-devel@lists.xenproject.org Cc: zijun_hu Link: http://lkml.kernel.org/r/20170314170508.100882-3-thgarnie@google.com Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 106 +++++++++++++++++++++++++-------------- arch/x86/include/asm/processor.h | 1 + arch/x86/kernel/cpu/common.c | 28 ++++++++--- arch/x86/kvm/svm.c | 4 +- arch/x86/kvm/vmx.c | 12 ++--- 5 files changed, 96 insertions(+), 55 deletions(-) commit 69218e47994da614e7af600bf06887750ab6657a Author: Thomas Garnier Date: Tue Mar 14 10:05:07 2017 -0700 x86: Remap GDT tables in the fixmap section Each processor holds a GDT in its per-cpu structure. The sgdt instruction gives the base address of the current GDT. This address can be used to bypass KASLR memory randomization. With another bug, an attacker could target other per-cpu structures or deduce the base of the main memory section (PAGE_OFFSET). This patch relocates the GDT table for each processor inside the fixmap section. The space is reserved based on number of supported processors. For consistency, the remapping is done by default on 32 and 64-bit. Each processor switches to its remapped GDT at the end of initialization. For hibernation, the main processor returns with the original GDT and switches back to the remapping at completion. This patch was tested on both architectures. Hibernation and KVM were both tested specially for their usage of the GDT. Thanks to Boris Ostrovsky for testing and recommending changes for Xen support. Signed-off-by: Thomas Garnier Cc: Alexander Potapenko Cc: Andrew Morton Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Chris Wilson Cc: Christian Borntraeger Cc: Dmitry Vyukov Cc: Frederic Weisbecker Cc: Jiri Kosina Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Len Brown Cc: Linus Torvalds Cc: Lorenzo Stoakes Cc: Luis R . Rodriguez Cc: Matt Fleming Cc: Michal Hocko Cc: Paolo Bonzini Cc: Paul Gortmaker Cc: Pavel Machek Cc: Peter Zijlstra Cc: Radim Krčmář Cc: Rafael J . Wysocki Cc: Rusty Russell Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tim Chen Cc: Vitaly Kuznetsov Cc: kasan-dev@googlegroups.com Cc: kernel-hardening@lists.openwall.com Cc: kvm@vger.kernel.org Cc: lguest@lists.ozlabs.org Cc: linux-doc@vger.kernel.org Cc: linux-efi@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-pm@vger.kernel.org Cc: xen-devel@lists.xenproject.org Cc: zijun_hu Link: http://lkml.kernel.org/r/20170314170508.100882-2-thgarnie@google.com Signed-off-by: Ingo Molnar arch/x86/entry/vdso/vma.c | 2 +- arch/x86/include/asm/desc.h | 58 ++++++++++++++++++++++++++++++++--- arch/x86/include/asm/fixmap.h | 4 +++ arch/x86/include/asm/processor.h | 1 + arch/x86/include/asm/stackprotector.h | 2 +- arch/x86/kernel/acpi/sleep.c | 2 +- arch/x86/kernel/apm_32.c | 6 ++-- arch/x86/kernel/cpu/common.c | 29 ++++++++++++++++-- arch/x86/kernel/setup_percpu.c | 2 +- arch/x86/kernel/smpboot.c | 2 +- arch/x86/platform/efi/efi_32.c | 4 +-- arch/x86/power/cpu.c | 7 +++-- arch/x86/xen/enlighten.c | 5 ++- arch/x86/xen/mmu.c | 1 + arch/x86/xen/smp.c | 2 +- drivers/lguest/x86/core.c | 6 ++-- drivers/pnp/pnpbios/bioscalls.c | 10 +++--- 17 files changed, 114 insertions(+), 29 deletions(-) commit f06bdd4001c257792c54dce9427399f2896470af Author: Thomas Garnier Date: Tue Mar 14 10:05:06 2017 -0700 x86/mm: Adapt MODULES_END based on fixmap section size This patch aligns MODULES_END to the beginning of the fixmap section. It optimizes the space available for both sections. The address is pre-computed based on the number of pages required by the fixmap section. It will allow GDT remapping in the fixmap section. The current MODULES_END static address does not provide enough space for the kernel to support a large number of processors. Signed-off-by: Thomas Garnier Cc: Alexander Potapenko Cc: Andrew Morton Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Chris Wilson Cc: Christian Borntraeger Cc: Dmitry Vyukov Cc: Frederic Weisbecker Cc: Jiri Kosina Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Len Brown Cc: Linus Torvalds Cc: Lorenzo Stoakes Cc: Luis R . Rodriguez Cc: Matt Fleming Cc: Michal Hocko Cc: Paolo Bonzini Cc: Paul Gortmaker Cc: Pavel Machek Cc: Peter Zijlstra Cc: Radim Krčmář Cc: Rafael J . Wysocki Cc: Rusty Russell Cc: Stanislaw Gruszka Cc: Thomas Gleixner Cc: Tim Chen Cc: Vitaly Kuznetsov Cc: kasan-dev@googlegroups.com Cc: kernel-hardening@lists.openwall.com Cc: kvm@vger.kernel.org Cc: lguest@lists.ozlabs.org Cc: linux-doc@vger.kernel.org Cc: linux-efi@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-pm@vger.kernel.org Cc: xen-devel@lists.xenproject.org Cc: zijun_hu Link: http://lkml.kernel.org/r/20170314170508.100882-1-thgarnie@google.com [ Small build fix. ] Signed-off-by: Ingo Molnar Documentation/x86/x86_64/mm.txt | 5 ++++- arch/x86/include/asm/pgtable_64_types.h | 3 ++- arch/x86/kernel/module.c | 1 + arch/x86/mm/dump_pagetables.c | 1 + arch/x86/mm/kasan_init_64.c | 1 + mm/vmalloc.c | 4 ++++ 6 files changed, 13 insertions(+), 2 deletions(-) commit a2d3ebab836dee08805f35aa13a593427042dd04 Merge: 02cb24e b3fd38d Author: David S. Miller Date: Wed Mar 15 21:52:53 2017 -0700 Merge branch 'xgene-bug-fixes' Iyappan Subramanian says: ==================== drivers: net: xgene: Bug fixes and errata workarounds This patch set addresses bug fixes and errata workarounds. ==================== Signed-off-by: Iyappan Subramanian Signed-off-by: Quan Nguyen Signed-off-by: David S. Miller commit b3fd38d27320c2bf2dfe5de495ffa57f366d0bce Author: Iyappan Subramanian Date: Wed Mar 15 13:27:21 2017 -0700 MAINTAINERS: Update X-Gene SoC ethernet maintainer Signed-off-by: Iyappan Subramanian Signed-off-by: Keyur Chudgar Signed-off-by: Quan Nguyen Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 4902a92270fb2abec57a215d237a74f5ca16c9c7 Author: Iyappan Subramanian Date: Wed Mar 15 13:27:20 2017 -0700 drivers: net: xgene: Add workaround for errata 10GE_8/ENET_11 This patch implements workaround for errata 10GE_8 and ENET_11: "HW reports length error for valid 64 byte frames with len <46 bytes" by recovering them from error. Signed-off-by: Iyappan Subramanian Signed-off-by: Quan Nguyen Signed-off-by: Toan Le Tested-by: Fushen Chen Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 2 +- drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 1 + drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 43 +++++++++++++++--------- drivers/net/ethernet/apm/xgene/xgene_enet_main.h | 1 + 4 files changed, 30 insertions(+), 17 deletions(-) commit 7eac928c19d7cb2dee9339a321c3f1abbb81358d Author: Quan Nguyen Date: Wed Mar 15 13:27:19 2017 -0700 drivers: net: xgene: Add workaround for errata 10GE_1 This patch implements workaround for errata 10GE_1: 10Gb Ethernet port FIFO threshold default values are incorrect. Signed-off-by: Quan Nguyen Signed-off-by: Toan Le Signed-off-by: Iyappan Subramanian Tested-by: Fushen Chen Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c | 7 +++++++ drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.h | 5 +++++ 2 files changed, 12 insertions(+) commit 0a0400c3094b5d5cedd479ddbf1329de74c09c4b Author: Iyappan Subramanian Date: Wed Mar 15 13:27:18 2017 -0700 drivers: net: xgene: Fix Rx checksum validation logic This patch fixes Rx checksum validation logic and adds NETIF_F_RXCSUM flag. Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 27 +++++++++++++++--------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 11623fce0f9afef30c45e3f2120b063de3809a8f Author: Quan Nguyen Date: Wed Mar 15 13:27:17 2017 -0700 drivers: net: xgene: Fix wrong logical operation This patch fixes the wrong logical OR operation by changing it to bit-wise OR operation. Fixes: 3bb502f83080 ("drivers: net: xgene: fix statistics counters race condition") Signed-off-by: Iyappan Subramanian Signed-off-by: Quan Nguyen Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e026e700d940a1ea3d3bc84d92ac668b1f015462 Author: Quan Nguyen Date: Wed Mar 15 13:27:16 2017 -0700 drivers: net: xgene: Fix hardware checksum setting This patch fixes the hardware checksum settings by properly program the classifier. Otherwise, packet may be received with checksum error on X-Gene1 SoC. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 1 + drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 1 + 2 files changed, 2 insertions(+) commit 4b72436dc3dd2457056b22d6f147777368c869fa Author: Quan Nguyen Date: Wed Mar 15 13:27:15 2017 -0700 drivers: net: phy: xgene: Fix mdio write This patches fixes a typo in the argument to xgene_enet_wr_mdio_csr(). Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller drivers/net/phy/mdio-xgene.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 893e2aad4612096c17a51c4fbc7f3897b7e45606 Author: Yuantian Tang Date: Wed Mar 15 15:10:25 2017 +0800 arm64: dts: ls1012a: add thermal monitor node There is a thermal monitoring unit on ls1012a soc which can monitor and record the temperature of cores so that appropriate actions can be taken or alarm the user when the temperature exceeds a programmed temperature threshold. Signed-off-by: Tang Yuantian Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 77 ++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) commit 54b5ba8fdc35df5e2340cbbd6406f7ae14be5d5a Author: Jagan Teki Date: Tue Mar 14 15:18:17 2017 +0530 ARM: imx_v6_v7_defconfig: Select hid-multitouchdriver Select CONFIG_HID_MULTITOUCH so that we can have multi touchscreen funtionality via USB by default on Engicam i.CoreM6 Quad with OpenFrame Cap 10.1 display boards. Cc: Matteo Lisi Cc: Michael Trimarchi Cc: Shawn Guo Signed-off-by: Jagan Teki arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 604318912af25630dc6bc8b27e93f5cfdf8e938b Author: Jagan Teki Date: Tue Mar 14 15:18:16 2017 +0530 ARM: imx_v6_v7_defconfig: Select max11801_ts touchscreen driver Select CONFIG_TOUCHSCREEN_MAX11801 so that we can have touchscreen funtionality by default on Engicam i.CoreM6 Quad boards. Cc: Matteo Lisi Cc: Michael Trimarchi Cc: Shawn Guo Signed-off-by: Jagan Teki arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 7bc49cb9b9b8bad32536c4b6d1aff1824c1adc6c Author: Aya Mahfouz Date: Wed Mar 15 22:34:20 2017 +0200 staging: gdm724x: fix checkpatch.pl camelCase warning Fixes the checkpatch.pl warning: Avoid CamelCase Signed-off-by: Aya Mahfouz Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_lte.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 656874d3d083582ce31ea3dfbb92ac484b19f82a Author: Tuomo Rinne Date: Wed Mar 15 21:32:43 2017 +0000 staging: vt6655: Copy argument names from function definition to declaration to fix checkpatch warnings Copied function argument names from definition to delcaration. This fixes some checkpatch warnings. Signed-off-by: Tuomo Rinne Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/rxtx.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 01f23a1dc05c4174d8bed763c63218dd1801a28f Author: Tahia Khan Date: Tue Mar 14 23:32:13 2017 -0400 staging: sm750fb: Removes unused variable from sm750_hw_copyarea Removes unused variable opSign from sm750_hw_copyarea. Identified using coccinelle script 'unused.cocci'. Signed-off-by: Tahia Khan Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750_accel.c | 3 --- 1 file changed, 3 deletions(-) commit 0e8af100528ffb6ed63b2d3dc9d4d3e716913e9a Author: Tamara Diaconita Date: Tue Mar 14 14:10:38 2017 +0200 staging: wilc1000: Remove unnecessary brackets Remove unnecessary brackets and correspondingly unindent code. Signed-off-by: Tamara Diaconita Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_spi.c | 39 +++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 21 deletions(-) commit e08b667058004119349f8230ad15b408e85716ab Author: Tamara Diaconita Date: Tue Mar 14 14:10:37 2017 +0200 staging: wilc1000: Correct name of variables Correct misspelled variables: 'happended' to 'happened' to make the code grammatically correct. Signed-off-by: Tamara Diaconita Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_spi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5844e42c291242145133e773139ac187e09d0f78 Author: Tamara Diaconita Date: Tue Mar 14 14:10:36 2017 +0200 staging: wilc1000: Declare variables to top of function Move declaration of variables to top of function to make the code more readable. Signed-off-by: Tamara Diaconita Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_spi.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit f15e60ce4ee90b713e1d84653c715dc8fa0d49ec Author: Tobin C. Harding Date: Wed Mar 15 10:44:29 2017 +1100 staging: dgnc: preserve return code Return code from tty_check_change() should be being preserved. Preserve return code from call to tty_check_change(). Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9280b3a61ce006c803b616a922a635d04ffb040b Author: Tobin C. Harding Date: Wed Mar 15 16:14:38 2017 +1100 staging: ks7010: fix checkpatch PARENTHESIS_ALIGNMENT Checkpatch emits WARNING and CHECK for prototype declarations. WARNING: function definition argument 'void *' should also have an identifier name CHECK: Alignment should match open parenthesis Also prototype parameters wrap more than is necessary. Tidy up function prototypes. Fix 5 error/warning instances. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 2ccabd0521697e9b12dcc9ebb0dd20623ad8ffc4 Author: Tobin C. Harding Date: Wed Mar 15 16:14:37 2017 +1100 staging: ks7010: fix checkpatch BLOCK_COMMENT_STYLE Checkpatch emits WARNING: Block comments use a trailing */ on a separate line. Move comments to (kernel doc format) struct comment. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.h | 50 ++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 10 deletions(-) commit 015842ce66d416b2a5532116189a09afc879ddfe Author: Tobin C. Harding Date: Wed Mar 15 16:14:36 2017 +1100 staging: ks7010: fix checkpatch SPACING Checkpatch emits WARNING: Unnecessary space before function pointer arguments. Remove unnecessary space before function pointer. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6cdd65389892c6017666c499993fb1affc16223e Author: Tobin C. Harding Date: Wed Mar 15 13:57:32 2017 +1100 staging: ks7010: remove dead code Driver has dead code compiled out using preprocessor directives. TODO file asks for these not to be removed - ignore this. Remove dead code. Remove 'do not remove #if 0/1 ...' from TODO file. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/TODO | 2 - drivers/staging/ks7010/ks7010_sdio.c | 40 ++--- drivers/staging/ks7010/ks_wlan_net.c | 297 +---------------------------------- 3 files changed, 13 insertions(+), 326 deletions(-) commit f160bc206489b9b2ee128bc3b39acdec92bc4297 Author: Tobin C. Harding Date: Wed Mar 15 13:57:31 2017 +1100 staging: ks7010: remove superfluous comments Driver uses custom function comment format. These comments are on functions with internal likage. Comment string /*--------/* adds nothing to the driver. Comment 'Wireless Handler' does not have allot of meaning. Remove superfluous function comments. Leave comments that add meaning. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 137 ++--------------------------------- 1 file changed, 6 insertions(+), 131 deletions(-) commit aa6ca807baace49992ad6990c9aeda22289be5cd Author: Tobin C. Harding Date: Tue Mar 14 21:20:12 2017 +1100 staging: ks7010: remove custom return values Driver code uses custom return values (often positive) to signal error condition instead of using standard kernel error codes. Replace custom return values with standard kernel error codes. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 161 ++++++++++++++++------------------- drivers/staging/ks7010/ks_hostif.c | 26 +++--- drivers/staging/ks7010/ks_wlan_net.c | 4 +- 3 files changed, 93 insertions(+), 98 deletions(-) commit 7bb6313d011f16405b338a228f540d3ab5aee58a Author: Tobin C. Harding Date: Wed Mar 15 12:01:07 2017 +1100 staging: ks7010: fix off by one error Bug introduced in commit 7676b72 by Tobin C. Harding. Remove equals sign from comparison, fixing off by one error. Fixes: 7676b72428e8 ("staging: ks7010: move comparison to right hand side") Reported-by: Dan Carpenter Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53044529769b38daf7af3a185f6f13890a6fe738 Author: Dan Carpenter Date: Tue Mar 14 10:56:44 2017 +0300 staging: atomicsp: fix a loop timeout It's a post-op loop so we timeout with "max_wait" set to -1, not 0. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cad1589108fc55b1fa9c42ae610337847f2f100 Author: Gargi Sharma Date: Wed Mar 15 00:13:21 2017 +0530 staging: rtl8192u: Remove multiple assignments This patch removes multiple assignments by factorizing them. This was done with Coccinelle for the if branch. For the else part the change was done manually since Coccinelle only detects constants. Braces were also added to the else part to remove the checkpatch warning, "braces should be on all arms of if-else statements". @@ identifier i1,i2; constant c; @@ - i1=i2=c; + i1=c; + i2=c; Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_dm.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit adab24a4a785d4bd7f2b2fd25e2129973caff667 Author: Andrii Vladyka Date: Tue Mar 14 11:29:44 2017 +0200 staging: rtl8188eu: removed blank lines coding style problem Fix 'multiple blank lines' coding style problem reported by checkpatch.pl. Signed-off-by: Andrii Vladyka Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 1 - 1 file changed, 1 deletion(-) commit 5629ff0ffe77ce4e5037e45e8d9f2877754d00c7 Author: Dan Carpenter Date: Tue Mar 14 10:56:19 2017 +0300 staging: rtl8188eu: fix some inverted conditions We converted these conditions from == NULL and != NULL but messed up and inverted some. Fixes: e31447f934d3 ("staging: rtl8188eu: Replace x==NULL by !x") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 702d8d0f0e6927ab8802f1496c80167ad41e97d9 Author: Gargi Sharma Date: Wed Mar 15 22:17:41 2017 +0530 staging: vc04_services: Replace typedef with struct Using typedef for a structure type and upper case struct names is not suggested in Linux kernel coding style guidelines. Hence, occurences of typedefs have been removed and struct names converted to lowercase in the file. Grep was also used to ensure that all occurence of the typedefs have been removed. The module compiles without any warnings or errors. Script 1: @r1@ type T; @@ typedef struct { ... } T; @script:python c1@ T2; T << r1.T; @@ if T[-2:] =="_T": coccinelle.T2 = T[:-2].lower(); print T else: coccinelle.T2=T.lower(); @r2@ type r1.T; identifier c1.T2; @@ -typedef struct + T2 { ... } -T ; @r3@ type r1.T; identifier c1.T2; @@ - T + struct T2 Script 2: @@ typedef VCHIQ_ELEMENT_T; @@ ( - VCHIQ_ELEMENT_T + struct vchiq_element ) Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 12 ++++++------ drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h | 4 ++-- .../staging/vc04_services/interface/vchiq_arm/vchiq_ioctl.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) commit 363c6fefa68b22d09ec8be6620f843272b8fef06 Author: Gargi Sharma Date: Wed Mar 15 18:41:11 2017 +0530 staging: vc04_services: Remove type and function prototype The function prototype is for a function that is not even in the kernel, and hence has been removed. The type VCHIQ_SHARED_MEM_INFO_T is not used anywhere in the kernel as well. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/interface/vchiq_arm/vchiq_memdrv.h | 12 ------------ 1 file changed, 12 deletions(-) commit fb03333f51ab81dd6e611b4263f1565985a4dc3c Author: Jean-Baptiste Abbadie Date: Tue Mar 14 20:14:20 2017 +0100 staging: vc04_services: Remove unused functions These four functions are not used and report errors with sparse. Signed-off-by: Jean-Baptiste Abbadie Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 50 ---------------------- 1 file changed, 50 deletions(-) commit d9a1126476b7b2ded3fc13b4c45d785130232410 Author: Jérémy Lefaure Date: Wed Mar 15 14:09:21 2017 -0400 staging: media: atomisp: remove duplicate includes These duplicate includes have been found with scripts/checkincludes.pl but they have been removed manually to avoid removing false positives. Signed-off-by: Jérémy Lefaure Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/ap1302.c | 1 - drivers/staging/media/atomisp/i2c/mt9m114.c | 1 - .../atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf.host.c | 1 - .../media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c | 1 - 4 files changed, 4 deletions(-) commit fde469701c7efabebf885e785edf367bfb1a8f3f Author: Jérémy Lefaure Date: Wed Mar 15 14:09:20 2017 -0400 staging: media: atomisp: fill properly hmm_bo_type_strings when ION is disabled When CONFIG_ION is disabled, HMM_BO_LAST is 3. In this case, "i" should not be added in hmm_bo_type_strings. Signed-off-by: Jérémy Lefaure Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 2 ++ 1 file changed, 2 insertions(+) commit 4995706d6f04a80976f06cf5aa1d855a03fb5621 Author: Daeseok Youn Date: Wed Mar 15 14:56:19 2017 +0900 staging: atomisp: fix "alignment should match open parenthesis" Fix checkpatch.pl issues in atomisp_cmd.c : "CHECK: Alignment should match open parenthesis" Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 179 +++++++++++---------- 1 file changed, 90 insertions(+), 89 deletions(-) commit 0489864ac37dc75aefe2f510ede0b8bb6ac280f8 Author: Daeseok Youn Date: Wed Mar 15 14:55:58 2017 +0900 staging: atomisp: remove useless #ifdef ISP2401 on top of atomisp_cmd.c There is no reason to have "#ifdef ISP2401" condition on top of atomisp_cmd.c file Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 3 --- 1 file changed, 3 deletions(-) commit 2217f7849a0c0fb701731030572ee2a57fd4b354 Author: Daeseok Youn Date: Wed Mar 15 14:55:29 2017 +0900 staging: atomisp: fix inconsistent indenting Fix warnings from the smatch tool atomisp_cmd.c:5698 atomisp_set_fmt_to_snr() warn: inconsistent indenting atomisp_cmd.c:5714 atomisp_set_fmt_to_snr() warn: inconsistent indenting Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1fe996642108d44c3e649640850e709724f9f311 Author: Daeseok Youn Date: Wed Mar 15 14:55:06 2017 +0900 staging: atomisp: fix unsigned int comparison with less than zero Fix warnings from the smatch tool atomisp_cmd.c:2649 atomisp_set_array_res() warn: unsigned 'config->width' is never less than zero. atomisp_cmd.c:2650 atomisp_set_array_res() warn: unsigned 'config->height' is never less than zero. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit eb465ea39148efd0253f018fc7c200cc406ecae2 Author: Tahia Khan Date: Wed Mar 15 00:03:14 2017 -0400 staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_get_size Repaces pointer comparison to 0 with NULL in ia_css_queue_get_size to improve code readability. Identified with coccinelle script 'badzero.cocci'. Signed-off-by: Tahia Khan Signed-off-by: Greg Kroah-Hartman .../media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 118c07f978b676c790372e2f43ee654b5490bc97 Author: Tahia Khan Date: Wed Mar 15 00:03:09 2017 -0400 staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_dequeue Repaces pointer comparison to 0 with NULL in ia_css_queue_dequeue to improve code readability. Identified with coccinelle script 'badzero.cocci'. Signed-off-by: Tahia Khan Signed-off-by: Greg Kroah-Hartman .../media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c526ec265376562f69c78203c26f994f003661ff Author: Tahia Khan Date: Wed Mar 15 00:03:05 2017 -0400 staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_enqueue Repaces pointer comparison to 0 with NULL in ia_css_queue_enqueue to improve code readability. Identified with coccinelle script 'badzero.cocci'. Signed-off-by: Tahia Khan Signed-off-by: Greg Kroah-Hartman .../media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd1c0f278b0e59c80f07b1c491a6cb5d2cf13844 Author: Tobias Regnery Date: Tue Mar 14 12:47:17 2017 +0100 staging: media: atomisp: fix build error in ov5693 driver The ov5693 driver unconditionally uses the entity member of struct v4l2_subdev. However this member is conditionally compiled in if CONFIG_MEDIA_CONTROLLER is set. This results in the following build error if CONFIG_MEDIA_CONTROLLER is not set: drivers/staging/media/atomisp/i2c/ov5693/ov5693.c: In function 'ov5693_remove': drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:1961:31: error: 'struct v4l2_subdev' has no member named 'entity' media_entity_cleanup(&dev->sd.entity); drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:2023:9: error: 'struct v4l2_subdev' has no member named 'entity' dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; ^ drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:2045:39: error: 'struct v4l2_subdev' has no member named 'entity' ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); Add the corresponding Kconfig dependency to solve this error. Signed-off-by: Tobias Regnery Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/ov5693/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc44a73e17374d23b84ad3021bb3ed5f126eac23 Author: Dan Carpenter Date: Tue Mar 14 10:53:52 2017 +0300 Staging: atomisp: kfreeing a devm allocated pointer We shouldn't pass devm allocated pointers to kfree() or it leads to a double free. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/imx/otp_brcc064_e2prom.c | 1 - drivers/staging/media/atomisp/i2c/imx/otp_e2prom.c | 1 - 2 files changed, 2 deletions(-) commit 5d1ae279c235e5f353d0f11e6b4bed3079732327 Author: Dan Carpenter Date: Tue Mar 14 10:55:01 2017 +0300 staging: atomisp: silence an array overflow warning Static checkers complain that we should check if "i" is in bounds before we check if "var8[i]" is a NUL char. This bug is harmless but also easy to fix. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman .../staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2bbe97830ae623a519291eece719ee74108571ff Author: Dan Carpenter Date: Tue Mar 14 10:51:50 2017 +0300 staging/atomisp: silence uninitialized variable warnings These print an uninitialized value for "opt". Let's just remove the printk. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman .../staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit f07d4b4270670b099a7034936e519d2efecf81ec Author: Dan Carpenter Date: Tue Mar 14 10:51:31 2017 +0300 staging: atomisp: off by one in atomisp_acc_load_extensions() We should be doing i-- on all error paths but we don't if the loop finishes successfully. I've re-arranged this so that we don't read beyond the end of acc_flag_to_pipe[] array. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d86219718650433cc3fe56e640aaa0f4dd89b2f4 Author: Julia Lawall Date: Tue Mar 14 06:40:21 2017 +0100 staging: media: atomisp: fix semicolon.cocci warnings Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95fab47ba2dda5789ece087323da8312c0c0549e Author: Arushi Singhal Date: Tue Mar 14 19:25:07 2017 +0530 staging: dvb-frontends: removed code in comments. Commenting out Code is a Bad Idea. Comments are their to explain the code and how the code achieves its goal and as codes in the comments does not explain what the code is doing so there is no use of commenting them. So in this patch codes in the comments are removed. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/media/dvb-frontends/drxk_hard.c | 1 - 1 file changed, 1 deletion(-) commit 79bd555462e7a2f0295eff5c16b4fc2d3c65d285 Author: Arushi Singhal Date: Tue Mar 14 19:25:06 2017 +0530 staging: speakup: identation should use tabs Indentation should always use tabs and never spaces. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/speakup_dtlk.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit defaa9ad58dfc561192b350b826dc65b6fb84098 Author: Arushi Singhal Date: Tue Mar 14 10:46:42 2017 +0530 staging: speakup: Add blank line after declarations Patch fixes the warnings reported by checkpatch.pl for please use a blank line after function/struct/union/enum declarations. Add a blank line after enum and struct declarations. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 1 + drivers/staging/speakup/serialio.c | 1 + drivers/staging/speakup/speakup_dtlk.c | 1 + 3 files changed, 3 insertions(+) commit 0b4139ad5e654b53c593aa84eb6bf36eb6644512 Author: Samuel Thibault Date: Tue Mar 14 20:56:21 2017 +0100 speakup: Fix bogus caps on speaking unicode characters commit 33590c185299 ("speakup: Support spelling unicode characters") mistakenly passed unicode characters to IS_CHAR(), which only supports latin1. Let's assume non-latin1 is lower case, like is done in spell_word(). Signed-off-by: Samuel Thibault Reviewed-by: Chris Brannon Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a50ef3165489c74c7d7c9f7559d9bbb198dca154 Author: Okash Khawaja Date: Tue Mar 14 13:41:54 2017 +0000 staging: speakup: move spk_stop_serial_interrupt into synth-specific release function This moves call to spk_stop_serial_interrupt() function out of synth_release() and into release() method of specific spk_synth instances. This is because the spk_stop_serial_interrupt() call is specific to current serial i/o implementation. Moving it into each synth's release() method gives the decision of calling spk_stop_serial_interrupt() to that synth. Signed-off-by: Okash Khawaja Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/serialio.c | 2 ++ drivers/staging/speakup/speakup_acntpc.c | 1 + drivers/staging/speakup/speakup_decpc.c | 1 + drivers/staging/speakup/speakup_dtlk.c | 1 + drivers/staging/speakup/speakup_keypc.c | 1 + drivers/staging/speakup/synth.c | 1 - 6 files changed, 6 insertions(+), 1 deletion(-) commit 1e441594e509c35a222e397d224de17cee103740 Author: Okash Khawaja Date: Tue Mar 14 13:41:53 2017 +0000 staging: speakup: add spk_io_ops struct to spk_synth This patch adds spk_io_ops struct which contain those methods whose job is to communicate with synth device. Currently, all comms with external synth device use raw serial i/o. The idea is to group all methods which do the actual communication with external device into this new struct. Then migrating a serial-based synth over to an alternative to raw serial i/o will mean swapping serial spk_io_ops instance with the io_ops instance of the new method, making the migration simpler. At the moment, this struct only contains one method, synth_out but more will be added in future when migrating synths which require input functionality. Also at the moment, synth_out method has one implementation which uses serial i/o. Plan is to add an alternative. Signed-off-by: Okash Khawaja Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/serialio.c | 7 ++++++- drivers/staging/speakup/speakup_acntpc.c | 1 + drivers/staging/speakup/speakup_acntsa.c | 1 + drivers/staging/speakup/speakup_apollo.c | 7 ++++--- drivers/staging/speakup/speakup_audptr.c | 3 ++- drivers/staging/speakup/speakup_bns.c | 1 + drivers/staging/speakup/speakup_decext.c | 9 +++++---- drivers/staging/speakup/speakup_decpc.c | 1 + drivers/staging/speakup/speakup_dectlk.c | 13 +++++++------ drivers/staging/speakup/speakup_dtlk.c | 1 + drivers/staging/speakup/speakup_dummy.c | 1 + drivers/staging/speakup/speakup_keypc.c | 1 + drivers/staging/speakup/speakup_ltlk.c | 1 + drivers/staging/speakup/speakup_soft.c | 1 + drivers/staging/speakup/speakup_spkout.c | 1 + drivers/staging/speakup/speakup_txprt.c | 1 + drivers/staging/speakup/spk_priv.h | 3 ++- drivers/staging/speakup/spk_types.h | 7 +++++++ drivers/staging/speakup/synth.c | 8 ++++---- 19 files changed, 48 insertions(+), 20 deletions(-) commit 9176d156ca8d931bec0bf5fa3239524d94da866a Author: Okash Khawaja Date: Tue Mar 14 13:41:52 2017 +0000 staging: speakup: spk_serial_out and spk_wait_for_xmitr to take synth arg These two functions are always called from a context where spk_synth instance is available. They also use the spk_synth instance but instead of taking it as an argument, they rely on a global spk_synth instance inside synth.c which points to the same synth as the one being passed in as argument. Signed-off-by: Okash Khawaja Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/serialio.c | 14 +++++++------- drivers/staging/speakup/speakup_apollo.c | 6 +++--- drivers/staging/speakup/speakup_audptr.c | 2 +- drivers/staging/speakup/speakup_decext.c | 8 ++++---- drivers/staging/speakup/speakup_dectlk.c | 12 ++++++------ drivers/staging/speakup/spk_priv.h | 4 ++-- drivers/staging/speakup/synth.c | 12 ++++++------ 7 files changed, 29 insertions(+), 29 deletions(-) commit ba21222d00a450ce3bfced0e047f52470372634d Author: Dmitry Torokhov Date: Wed Mar 1 17:38:38 2017 -0800 scsi: remove incorrect __exit markups Even if bus is not hot-pluggable, devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes. Signed-off-by: Dmitry Torokhov Signed-off-by: Martin K. Petersen drivers/scsi/sgiwd93.c | 2 +- drivers/scsi/sni_53c710.c | 2 +- drivers/scsi/zalon.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 61b745fa63dbac366104c3585c0866562a8292be Author: Charles Date: Fri Feb 17 10:52:38 2017 +0800 scsi: stex: Add S6 support 1. Add reboot notifier and register it in stex_probe for all supported device. 2. For all supported device in restart flow, we get a callback from notifier and set S6flag for stex_shutdown & stex_hba_stop to send restart command to FW. Signed-off-by: Charles.Chiou Signed-off-by: Paul.Lyu Signed-off-by: Martin K. Petersen drivers/scsi/stex.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit d65702272c8d35afc8d7e85fa8100a914f0b787f Author: Charles Date: Fri Feb 17 10:51:34 2017 +0800 scsi: stex: Support Pegasus 3 product Pegasus series is a RAID support product using Thunderbolt technology. The newest product, Pegasus 3(P3) supports Thunderbolt 3 technology with a different chip. 1. Change driver version. 2. Add P3 VID, DID and define it's device address. 3. P3 use msi interrupt, so stex_request_irq P3 type enable msi. 4. For hibernation, use msi_lock in stex_ss_handshake to prevent msi register write again when handshaking. 5. P3 doesn't need read() as flush. 6. In stex_ss_intr & stex_abort, P3 only clear interrupt register when getting vendor defined interrupt. Signed-off-by: Charles.Chiou Signed-off-by: Paul.Lyu Signed-off-by: Martin K. Petersen drivers/scsi/stex.c | 262 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 195 insertions(+), 67 deletions(-) commit 19678ffb9fd6f216f530714e62fb469a961874db Author: Viresh Kumar Date: Tue Mar 14 10:48:31 2017 +0530 cpufreq: dbx500: Manage cooling device from cpufreq driver The best place to register the CPU cooling device is from the cpufreq driver as we would know if all the resources are already available or not. That's what is done for the cpufreq-dt.c driver as well. The cpu-cooling driver for dbx500 platform was just (un)registering with the thermal framework and that can be handled easily by the cpufreq driver as well and in proper sequence as well. Get rid of the cooling driver and its its users and manage everything from the cpufreq driver instead. Signed-off-by: Viresh Kumar Tested-by: Linus Walleij Signed-off-by: Rafael J. Wysocki arch/arm/boot/dts/ste-dbx5x0.dtsi | 5 -- drivers/cpufreq/dbx500-cpufreq.c | 20 ++++++ drivers/thermal/Kconfig | 12 ---- drivers/thermal/Makefile | 1 - drivers/thermal/db8500_cpufreq_cooling.c | 105 ------------------------------- 5 files changed, 20 insertions(+), 123 deletions(-) commit 2e2a0db8c88d47123d3dd29d46eba12c26f71149 Author: Yegor Yefremov Date: Fri Mar 10 16:26:08 2017 -0800 Input: tps6507x-ts - update to devm_* API Update the code to use devm_* API so that driver core will manage resources. Signed-off-by: Yegor Yefremov Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/tps6507x-ts.c | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) commit 6dc618cdd6b896791313926becb1f86ede0e046a Author: Elena Reshetova Date: Thu Mar 9 13:46:58 2017 +0200 scsi: libiscsi: qedi: convert iscsi_task.refcount from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Acked-by: Chris Leech Signed-off-by: Martin K. Petersen drivers/scsi/libiscsi.c | 8 ++++---- drivers/scsi/qedi/qedi_iscsi.c | 2 +- include/scsi/libiscsi.h | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) commit 22c70d1a9c639b432ffdf083bea44752ad9fc8f3 Author: Elena Reshetova Date: Thu Mar 9 09:44:02 2017 +0200 scsi: libfc: convert fc_fcp_pkt.ref_cnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Acked-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_fcp.c | 6 +++--- include/scsi/libfc.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) commit 02cb24e9d97e3fca1ed61dc5661f128fb5c9300f Merge: 1aed181 9ff74f2 Author: David S. Miller Date: Wed Mar 15 15:34:14 2017 -0700 Merge branch 'dsa-check-out-of-range-ageing-time' Vivien Didelot says: ==================== net: dsa: check out-of-range ageing time The ageing time limits supported by DSA drivers vary depending on the switch model. If a driver returns -ERANGE for out-of-range values, the switchdev commit phase will fail with the following stacktrace: # brctl setageing br0 4 [ 8530.082179] WARNING: CPU: 0 PID: 910 at net/switchdev/switchdev.c:291 switchdev_port_attr_set_now+0xbc/0xc0 [ 8530.090679] br0: Commit of attribute (id=5) failed. [ 8530.094256] Modules linked in: [ 8530.096032] CPU: 0 PID: 910 Comm: kworker/0:4 Tainted: G W 4.10.0 #361 [ 8530.102412] Hardware name: Freescale Vybrid VF5xx/VF6xx (Device Tree) [ 8530.107571] Workqueue: events switchdev_deferred_process_work [ 8530.112039] Backtrace: [ 8530.113224] [<8010ca34>] (dump_backtrace) from [<8010cd3c>] (show_stack+0x20/0x24) [ 8530.119521] r6:00000000 r5:80834da0 r4:80ca7e48 r3:8120ca3c [ 8530.123908] [<8010cd1c>] (show_stack) from [<8037ad40>] (dump_stack+0x24/0x28) [ 8530.129873] [<8037ad1c>] (dump_stack) from [<80118de4>] (__warn+0xf4/0x10c) [ 8530.135545] [<80118cf0>] (__warn) from [<80118e44>] (warn_slowpath_fmt+0x48/0x50) [ 8530.141760] r9:00000000 r8:81252bec r7:80f19d90 r6:9dc3c000 r5:80ca7e7c r4:80834de8 [ 8530.148235] [<80118e00>] (warn_slowpath_fmt) from [<80670b20>] (switchdev_port_attr_set_now+0xbc/0xc0) [ 8530.156240] r3:9dc3c000 r2:80834de8 [ 8530.158539] r4:ffffffde [ 8530.159788] [<80670a64>] (switchdev_port_attr_set_now) from [<80670b44>] (switchdev_port_attr_set_deferred+0x20/0x6c) [ 8530.169118] r7:806705a8 r6:9dc3c000 r5:80f19d90 r4:80f19d80 [ 8530.173500] [<80670b24>] (switchdev_port_attr_set_deferred) from [<80670580>] (switchdev_deferred_process+0x50/0xe8) [ 8530.182742] r6:80ca6000 r5:81252bec r4:80f19d80 r3:80670b24 [ 8530.187115] [<80670530>] (switchdev_deferred_process) from [<80670930>] (switchdev_deferred_process_work+0x1c/0x24) [ 8530.196277] r8:00000000 r7:9ffdc100 r6:8120ad6c r5:9ddefc00 r4:81252bf4 r3:9de343c0 [ 8530.202756] [<80670914>] (switchdev_deferred_process_work) from [<8012f770>] (process_one_work+0x120/0x3b0) [ 8530.211231] [<8012f650>] (process_one_work) from [<8012fa70>] (worker_thread+0x70/0x534) [ 8530.218046] r10:9ddefc00 r9:8120ad6c r8:80ca6038 r7:8120ad80 r6:81211f80 r5:9ddefc18 [ 8530.224579] r4:8120ad6c [ 8530.225830] [<8012fa00>] (worker_thread) from [<80135640>] (kthread+0x114/0x144) [ 8530.231955] r10:9f4e9e94 r9:9de1fe58 r8:8012fa00 r7:9ddefc00 r6:9de1fdc0 r5:00000000 [ 8530.238497] r4:9de1fe40 [ 8530.239750] [<8013552c>] (kthread) from [<80108cd8>] (ret_from_fork+0x14/0x3c) [ 8530.245679] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:8013552c [ 8530.252234] r4:9de1fdc0 r3:80ca6000 [ 8530.254512] ---[ end trace 87475cc71b80ef73 ]--- [ 8530.257852] br0: failed (err=-34) to set attribute (id=5) This patchset fixes this by adding ageing_time_min and ageing_time_max fields to the dsa_switch structure, which can optionally be set by a DSA driver. If provided, the DSA core will check for out-of-range values in the SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME prepare phase and return -ERANGE accordingly. Finally set these limits in the mv88e6xxx driver. ==================== Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9ff74f249db8c80f13568460e26d168f5c6d55cd Author: Vivien Didelot Date: Wed Mar 15 15:53:50 2017 -0400 net: dsa: mv88e6xxx: specify ageing time limits Now that DSA has ageing time limits, specify them when registering a switch so that out-of-range values are handled correctly by the core. Signed-off-by: Vivien Didelot Reported-by: Jason Cobham Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ 1 file changed, 2 insertions(+) commit 0f3da6afeef1f63c7254965253f7e6535dc7910c Author: Vivien Didelot Date: Wed Mar 15 15:53:49 2017 -0400 net: dsa: check out-of-range ageing time value If a DSA switch driver cannot program an ageing time value due to it being out-of-range, switchdev will raise a stack trace before failing. To fix this, add ageing_time_min and ageing_time_max members to the dsa_switch in order for the switch drivers to optionally specify their supported ageing time limits. The DSA core will now check for provided ageing time limits and return -ERANGE from the switchdev prepare phase if the value is out-of-range. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 4 ++++ net/dsa/slave.c | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit e893de1ba1d39e78750ffadf7191aef8133c8fe8 Author: Vivien Didelot Date: Wed Mar 15 15:53:48 2017 -0400 net: dsa: dsa_fastest_ageing_time return unsigned The ageing time is defined as unsigned int, so make dsa_fastest_ageing_time return an unsigned int instead of int. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 743cc37561188e222eff5200d4507eabcccf9d41 Author: Julia Cartwright Date: Thu Mar 9 10:21:59 2017 -0600 i2c: mux: pca954x: make use of raw_spinlock variants The pca954x i2c mux driver currently implements an irq_chip for handling interrupts; due to how irq_chip handling is done, it's necessary for the irq_chip methods to be invoked from hardirq context, even on a a real-time kernel. Because the spinlock_t type becomes a "sleeping" spinlock w/ RT kernels, it is not suitable to be used with irq_chips. A quick audit of the operations under the lock reveal that they do only minimal, bounded work, and are therefore safe to do under a raw spinlock. Signed-off-by: Julia Cartwright Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-mux-pca954x.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1aed18141317a43029293135e5c988a719757907 Merge: 5b76964 56f36ac Author: David S. Miller Date: Wed Mar 15 15:20:28 2017 -0700 Merge branch 'mqprio-offload-more-info' Alexander Duyck says: ==================== Add support for passing more information in mqprio offload This patch series lays the groundwork for future work to allow us to make full use of the mqprio options when offloading them to hardware. Currently when we specify the hardware offload for mqprio the queue configuration is completely ignored and the hardware is only notified of the total number of traffic classes. The problem is this leads to multiple issues, one specific issue being you can pass the queue configuration you want and it is totally ignored by the hardware. What I am planning to do is add support for "hw" values in the configuration greater than 1. So for example we might have one mode of mqprio offload that uses 1 and only offloads the TC counts like we currently do. Then we might look at adding an option 2 which would factor in the TCs and the queue count information. This way we can select between the type of offload we actually want and existing drivers that don't support this can just fall back to their legacy configuration. ==================== Signed-off-by: David S. Miller commit 56f36acd215cf7c28372b2fdb4f33f6900e97e05 Author: Amritha Nambiar Date: Wed Mar 15 10:39:25 2017 -0700 mqprio: Modify mqprio to pass user parameters via ndo_setup_tc. The configurable priority to traffic class mapping and the user specified queue ranges are used to configure the traffic class, overriding the hardware defaults when the 'hw' option is set to 0. However, when the 'hw' option is non-zero, the hardware QOS defaults are used. This patch makes it so that we can pass the data the user provided to ndo_setup_tc. This allows us to pull in the queue configuration if the user requested it as well as any additional hardware offload type requested by using a value other than 1 for the hw value. Finally it also provides a means for the device driver to return the level supported for the offload type via the qopt->hw value. Previously we were just always assuming the value to be 1, in the future values beyond just 1 may be supported. Signed-off-by: Amritha Nambiar Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 3 ++- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 5 ++++- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 +++- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 16 ++++++++++------ drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 4 +++- drivers/net/ethernet/intel/i40e/i40e_main.c | 7 +++++-- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 +++- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 4 +++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 +++- drivers/net/ethernet/sfc/falcon/tx.c | 4 +++- drivers/net/ethernet/sfc/tx.c | 4 +++- drivers/net/ethernet/ti/netcp_core.c | 12 ++++++++---- include/linux/netdevice.h | 2 +- net/sched/sch_mqprio.c | 17 +++++++++++------ 14 files changed, 62 insertions(+), 28 deletions(-) commit 2026fecf516bc04df20cb50874957cd8c364fb4e Author: Alexander Duyck Date: Wed Mar 15 10:39:18 2017 -0700 mqprio: Change handling of hw u8 to allow for multiple hardware offload modes This patch is meant to allow for support of multiple hardware offload type for a single device. There is currently no bounds checking for the hw member of the mqprio_qopt structure. This results in us being able to pass values from 1 to 255 with all being treated the same. On retreiving the value it is returned as 1 for anything 1 or greater being set. With this change we are currently adding limited bounds checking by defining an enum and using those values to limit the reported hardware offloads. Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller include/uapi/linux/pkt_sched.h | 8 ++++++++ net/sched/sch_mqprio.c | 26 ++++++++++++++++---------- 2 files changed, 24 insertions(+), 10 deletions(-) commit 01d2de39cd765461562ff6cc69dfc419d9fc63b6 Author: sayli karnik Date: Mon Mar 13 23:26:18 2017 +0530 staging: iio: ad9834: Remove unnecessary goto statement The patch removes unnecessary use of goto statement. Signed-off-by: sayli karnik Signed-off-by: Jonathan Cameron drivers/staging/iio/frequency/ad9834.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c63313c605c3edcbb9ee95afb5f42148d4e5eb26 Author: sayli karnik Date: Mon Mar 13 22:05:27 2017 +0530 staging: iio: ad9834: Use private driver lock instead of mlock iio_dev->mlock should be used by the IIO core only for protecting device operating mode changes. ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. Replace mlock with a lock in the device's global data to protect hardware state changes. Signed-off-by: sayli karnik Signed-off-by: Jonathan Cameron drivers/staging/iio/frequency/ad9834.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 5b7696499c68a6b84127018d063649597e31627a Author: Colin Ian King Date: Wed Mar 15 15:31:58 2017 +0000 netxen_nic: remove redundant check if retries is zero At the end of the timeout loop, retries will always be zero so the check for zero is redundant so remove it. Also replace printk with pr_err as recommended by checkpatch. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 8fa06c902ac91633b3354974f2a23668bb932067 Author: Miguel Robles Date: Tue Mar 14 16:52:43 2017 +0100 Staging: iio: cdc: ad7152.c, use octal permissions instead of symbolic Fix checkpatch warnings: Symbolic permissions are not preferred. Consider using octal permissions. Signed-off-by: Miguel Robles Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7152.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3c1de602f6dde2b030ffad522757c5d5b4b0a658 Author: William Breathitt Gray Date: Tue Jan 10 13:51:29 2017 -0500 iio: pc104: Mask PC/104 drivers via the PC104 Kconfig option PC/104 drivers should be hidden on machines which do not support PC/104 devices. This patch adds the PC104 Kconfig option as a dependency for the relevant PC/104 device driver Kconfig options. Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Signed-off-by: William Breathitt Gray Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 2 +- drivers/iio/counter/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d47b51ad31e21ab8129da64d42e2fc48e7a215eb Author: Florian Fainelli Date: Thu Mar 9 10:51:20 2017 -0800 ARM: brcmstb: Add entry for 7260 BCM7260 has the same UART base address as 7268, order the entries by ascending chip number and alias the 7268 definition to the 7260 definition. Signed-off-by: Florian Fainelli arch/arm/include/debug/brcmstb.S | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 59f181aa9d633fb7dbdd322877a58fab8b94ba42 Author: Danesh Petigara Date: Thu Mar 9 10:51:19 2017 -0800 ARM: brcmstb: Enable ARCH_HAS_HOLES_MEMORYMODEL Due to the brcmstb SoC's memory map, we may have holes in the memory if we don't populate the maximum amount of memory supported by e.g: the first memory controller which spans either the first 1GiB or first 2GiB of memory. We need to select ARCH_HAS_HOLES_MEMORYMODEL in order to enable CONFIG_HAVE_ARCH_PFN_VALID on platforms that have CONFIG_SPARSEMEM enabled. Signed-off-by: Danesh Petigara [florian: Detailed commit message] Signed-off-by: Florian Fainelli arch/arm/mach-bcm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 3c51b9c7f1fae00c25f1e34da649a288e3fea1ae Author: Al Cooper Date: Thu Mar 9 10:51:18 2017 -0800 ARM: brcmstb: Enable ZONE_DMA for non 64-bit capable peripherals Some Host Controller hardware blocks, like the OHCI, EHCI and SDIO controllers, have hardware blocks that are not capable of doing 64 bit DMA. These host controllers fail on boards with >3GB of memory because the memory above 3GB is located physically >= 0x100000000 and can only be accessed using 64 DMA. The way Linux is currently configured for BRCMSTB systems, the memory given to drivers for DMA through functions like dma_alloc_coherent() comes from CMA memory and CMA memory is taken from the top of physical memory. When these drivers get a DMA buffer with an address >=0x100000000, they end up dropping the upper 32 bit of the address causing the hardware to DMA to incorrect memory, typically BMEM (custom memory carveout). This issue was discovered on a BCM97449SSV_DDR4 system with 4GB or memory. The fix is to enable CONFIG_ZONE_DMA. On ARM systems this makes sure that all DMA memory is located within the first 32 bits of address space. Signed-off-by: Al Cooper Signed-off-by: Florian Fainelli arch/arm/mach-bcm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 9854a1b5c46573d06b7b053aa78213b7a22bfacf Author: Aishwarya Pant Date: Tue Mar 14 03:34:25 2017 +0530 staging:iio:cdc:ade7746 replace mlock with driver private lock The IIO subsystem is redefining iio_dev mlock to be used by IIO core only for protecting device operating mode changes. In driver ad7746 wherever mlock was used to protect hardware state changes, it has been replaced with a driver private lock. Signed-off-by: Aishwarya Pant Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7746.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 231b362aec8c38a35bdbb2456c42b503ad6ce620 Author: Jon Mason Date: Mon Mar 6 11:29:04 2017 -0500 arm64: dts: NS2: convert "ok" to "okay" Per e-mail from Sergei Shtylyov, the DT spec dictates it should be "okay" (although "ok" is also recognized). Thus, changing all "ok" to "okay" in NS2 device tree files Suggested-by: Sergei Shtylyov Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/ns2-svk.dts | 38 ++++++++++++++++---------------- arch/arm64/boot/dts/broadcom/ns2-xmc.dts | 20 ++++++++--------- 2 files changed, 29 insertions(+), 29 deletions(-) commit db93991bf515916e181aa3ddb5a6cbc8b86bdc42 Author: Chris Wilson Date: Wed Mar 15 21:07:26 2017 +0000 drm/i915: Only attempt to signal the request once from the interrupt handler Check that request has not been signaled before acquiring a reference to the request for signaling later in the interrupt handler. The loading of the cacheline (for request->fence.flags) should be "free" when followed by the locked increment of the request->fence.refcount (which then sets the cacheline to exclusive mode), i.e. the cost of test_bit prior to an atomic_inc should be negligible. This should benefit us when we have a pile of bare breadcrumbs (interrupted execbuf) where we may get interrupts faster than we can get rid of the intel_wait, or if the device is too slow to run the bottom-half between interrupts. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170315210726.12095-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_irq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 908a6cbf84db77f33d8522f8ff9d9bf34dd7441f Author: Chris Wilson Date: Wed Mar 15 21:07:25 2017 +0000 drm/i915/breadcrumbs: Assert that we do not shortcut the current bottom-half We need to ensure that we always serialize updates to the bottom-half using the breadcrumbs.irq_lock so that we don't race with a concurrent interrupt handler. This is most important just prior to leaving the waiter (when the intel_wait will be overwritten), so make sure we are not the current bottom-half when skipping the irq locks. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170315210726.12095-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a5cae7b8edefe01a77ad6288367026f65fbfb91d Author: Chris Wilson Date: Wed Mar 15 21:07:24 2017 +0000 drm/i915/breadcrumbs: Disable interrupt bottom-half first on idling Before walking the rbtree of waiters (marking them as complete and waking them), decouple the interrupt handler. This prevents a race between the missed waiter waking up and removing its intel_wait (which skips checking the lock) and the interrupt handler dereferencing the intel_wait. (Though we do not expect to encounter waiters during idle!) Fixes: e1c0c91bdaec ("drm/i915: Wake up all waiters before idling") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170315210726.12095-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 429732e860fda07fc1bb96fe23c43146c27e08e0 Author: Chris Wilson Date: Wed Mar 15 21:07:23 2017 +0000 drm/i915/breadcrumbs: Update bottom-half before marking as complete When adding a new request to the breadcrumb rbtree, we mark all those requests inside the rbtree that are already completed as complete. This wakes those waiters up and allows them to skip the spinlock before returning to userspace. If one of those is the current bottom-half and allocated its intel_wait on the stack, it may then overwrite the b->irq_wait upon exiting i915_wait_request() just as the interrupt handler dereferences it. Fixes: 56299fb7d904 ("drm/i915: Signal first fence from irq handler if complete") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170315210726.12095-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 34 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 4bd66391dd34399b734b11203eb3bf39e7f43bf0 Author: Chris Wilson Date: Wed Mar 15 21:07:22 2017 +0000 drm/i915/breadcrumbs: Use booleans for intel_breadcrumbs_busy() Since commit 9b6586ae9f6b ("drm/i915: Keep a global seqno per-engine") converted intel_breadcrumbs_busy() to reporting a single boolean, we need only compute a boolean internally (and not needlessly compute the flag). Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170315210726.12095-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a28453c042f7fe1760ae5aa0fb8fa80c751bcb64 Merge: e0304f5 7bac4e1 Author: David S. Miller Date: Wed Mar 15 14:44:33 2017 -0700 Merge branch 'stmmac-dma-ops-multiqueue' Joao Pinto says: ==================== net: stmmac: prepare dma operations for multiple queues As agreed with David Miller, this patch-set is the second of 3 to enable multiple queues in stmmac. This second one concentrates on dma operations adding functionalities as: a) DMA Operation Mode configuration per channel and done in the multiple queues configuration function b) DMA IRQ enable and Disable by channel c) DMA start and stop by channel d) RX and TX ring length configuration by channel e) RX and TX set tail pointer by channel f) DMA Channel initialization broke into Channel comon, RX and TX initialization g) TSO being configured for all available channels h) DMA interrupt treatment by channel ==================== Signed-off-by: David S. Miller commit 7bac4e1ec3ca2342929a39638d615c6b672c27a0 Author: Joao Pinto Date: Wed Mar 15 11:04:55 2017 +0000 net: stmmac: stmmac interrupt treatment prepared for multiple queues This patch prepares the main ISR for multiple queues. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 28 ++++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 146617b88b86c3d1f1309604d5d4cb38d5b24f1a Author: Joao Pinto Date: Wed Mar 15 11:04:54 2017 +0000 net: stmmac: tso init prepared for multiple queues This patch configures TSO for all available tx queues. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 47f2a9ce527addf8a2c384efc47f0c812dc1a162 Author: Joao Pinto Date: Wed Mar 15 11:04:53 2017 +0000 net: stmmac: dma channel init prepared for multiple queues This patch prepares the DMA initialization process for multiple queues. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 8 +++ drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 66 ++++++++++++++--------- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 51 ++++++++++++++---- 3 files changed, 88 insertions(+), 37 deletions(-) commit 89cc57c55c1a7627b5dc912184da7e68d0d193bd Author: Joao Pinto Date: Wed Mar 15 11:04:52 2017 +0000 net: stmmac: prepare rx/tx set tail function for multiple queues This patch prepares RX and TX set tail functions for multiple queues. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4854ab9966e10ca002e4cc7a12e34c1444357d3d Author: Joao Pinto Date: Wed Mar 15 11:04:51 2017 +0000 net: stmmac: rx and tx ring length prepared for multiple queues This patch prepares tx and rx ring length configuration for multiple queues. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 4 +-- drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h | 4 +-- drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c | 8 +++--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 32 +++++++++++++++++------ 4 files changed, 32 insertions(+), 16 deletions(-) commit 3c55d4d08bc9e94901a26eb57c9aa0b8c76a18c0 Author: Joao Pinto Date: Wed Mar 15 11:04:50 2017 +0000 net: stmmac: rx watchdog config prepared for multiple queues This patch adds rx watchdog configuration for all queues. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c | 3 ++- drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 8 ++++---- drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 3 ++- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++- 5 files changed, 11 insertions(+), 8 deletions(-) commit d62a107a4f154c9aa826dbe03ac2322a389b37b5 Author: Joao Pinto Date: Wed Mar 15 11:04:49 2017 +0000 net: stmmac: prepare dma interrupt treatment for multiple queues This patch prepares DMA interrupts treatment for multiple queues. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c | 8 ++-- drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h | 3 +- drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 51 +++++++++++++---------- 6 files changed, 39 insertions(+), 29 deletions(-) commit 4e593262290c3488ca7ab8b41a5c70c284e12b57 Author: Joao Pinto Date: Wed Mar 15 11:04:48 2017 +0000 net: stmmac: prepare stmmac_tx_err for multiple queues This patch prepares stmmac_err for multiple queues. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit ae4f0d46830814e11ec91b8c76ebf3ae3f8140d7 Author: Joao Pinto Date: Wed Mar 15 11:04:47 2017 +0000 net: stmmac: rx/tx dma start/stop prepared for multiple queues This patch prepares the RX/TX DMA stop/start process for multiple queues. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 8 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h | 8 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c | 24 ++--- drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h | 8 +- drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 8 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 108 +++++++++++++++++++--- 6 files changed, 125 insertions(+), 39 deletions(-) commit 4f513ecd2f60d9ebd2ac0fa4cd0b5d0612d70233 Author: Joao Pinto Date: Wed Mar 15 11:04:46 2017 +0000 net: stmmac: enable/disable dma irq prepared for multiple queues This patch prepares the DMA IRQ enable/disable process for multiple queues. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 4 ++-- drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h | 6 +++--- drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c | 12 ++++++------ drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h | 4 ++-- drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 4 ++-- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 13 +++++++------ 6 files changed, 22 insertions(+), 21 deletions(-) commit 6deee2221e110f6574988120dba6cab7e7313f44 Author: Joao Pinto Date: Wed Mar 15 11:04:45 2017 +0000 net: stmmac: prepare dma op mode config for multiple queues This patch prepares DMA Operation Mode configuration for multiple queues. The work consisted on breaking the DMA operation Mode configuration function into RX and TX scope and adapting its mechanism in stmmac_main. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 3 + drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 118 +++++++++++----------- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 82 +++++++++++---- 3 files changed, 124 insertions(+), 79 deletions(-) commit 88b897a30c525c2eee6e7f16e1e8d0f18830845e Author: Stephane Eranian Date: Wed Mar 15 10:17:13 2017 -0700 perf tools: Make perf_event__synthesize_mmap_events() scale This patch significantly improves the execution time of perf_event__synthesize_mmap_events() when running perf record on systems where processes have lots of threads. It just happens that cat /proc/pid/maps support uses a O(N^2) algorithm to generate each map line in the maps file. If you have 1000 threads, then you have necessarily 1000 stacks. For each vma, you need to check if it corresponds to a thread's stack. With a large number of threads, this can take a very long time. I have seen latencies >> 10mn. As of today, perf does not use the fact that a mapping is a stack, therefore we can work around the issue by using /proc/pid/tasks/pid/maps. This entry does not try to map a vma to stack and is thus much faster with no loss of functonality. The proc-map-timeout logic is kept in case users still want some upper limit. In V2, we fix the file path from /proc/pid/tasks/pid/maps to actual /proc/pid/task/pid/maps, tasks -> task. Thanks Arnaldo for catching this. Committer note: This problem seems to have been elliminated in the kernel since commit : b18cb64ead40 ("fs/proc: Stop trying to report thread stacks"). Signed-off-by: Stephane Eranian Acked-by: Jiri Olsa Cc: Andy Lutomirski Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170315135059.GC2177@redhat.com Link: http://lkml.kernel.org/r/1489598233-25586-1-git-send-email-eranian@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1d585e70905e03e8c19c9aaf523ec246ae6b18a1 Author: Naveen N. Rao Date: Wed Mar 8 13:56:06 2017 +0530 trace/kprobes: Fix check for kretprobe offset within function entry perf specifies an offset from _text and since this offset is fed directly into the arch-specific helper, kprobes tracer rejects installation of kretprobes through perf. Fix this by looking up the actual offset from a function for the specified sym+offset. Refactor and reuse existing routines to limit code duplication -- we repurpose kprobe_addr() for determining final kprobe address and we split out the function entry offset determination into a separate generic helper. Before patch: naveen@ubuntu:~/linux/tools/perf$ sudo ./perf probe -v do_open%return probe-definition(0): do_open%return symbol:do_open file:(null) line:0 offset:0 return:1 lazy:(null) 0 arguments Looking at the vmlinux_path (8 entries long) Using /boot/vmlinux for symbols Open Debuginfo file: /boot/vmlinux Try to find probe point from debuginfo. Matched function: do_open [2d0c7ff] Probe point found: do_open+0 Matched function: do_open [35d76dc] found inline addr: 0xc0000000004ba9c4 Failed to find "do_open%return", because do_open is an inlined function and has no return point. An error occurred in debuginfo analysis (-22). Trying to use symbols. Opening /sys/kernel/debug/tracing//README write=0 Opening /sys/kernel/debug/tracing//kprobe_events write=1 Writing event: r:probe/do_open _text+4469776 Failed to write event: Invalid argument Error: Failed to add events. Reason: Invalid argument (Code: -22) naveen@ubuntu:~/linux/tools/perf$ dmesg | tail [ 33.568656] Given offset is not valid for return probe. After patch: naveen@ubuntu:~/linux/tools/perf$ sudo ./perf probe -v do_open%return probe-definition(0): do_open%return symbol:do_open file:(null) line:0 offset:0 return:1 lazy:(null) 0 arguments Looking at the vmlinux_path (8 entries long) Using /boot/vmlinux for symbols Open Debuginfo file: /boot/vmlinux Try to find probe point from debuginfo. Matched function: do_open [2d0c7d6] Probe point found: do_open+0 Matched function: do_open [35d76b3] found inline addr: 0xc0000000004ba9e4 Failed to find "do_open%return", because do_open is an inlined function and has no return point. An error occurred in debuginfo analysis (-22). Trying to use symbols. Opening /sys/kernel/debug/tracing//README write=0 Opening /sys/kernel/debug/tracing//kprobe_events write=1 Writing event: r:probe/do_open _text+4469808 Writing event: r:probe/do_open_1 _text+4956344 Added new events: probe:do_open (on do_open%return) probe:do_open_1 (on do_open%return) You can now use it in all perf tools, such as: perf record -e probe:do_open_1 -aR sleep 1 naveen@ubuntu:~/linux/tools/perf$ sudo cat /sys/kernel/debug/kprobes/list c000000000041370 k kretprobe_trampoline+0x0 [OPTIMIZED] c0000000004ba0b8 r do_open+0x8 [DISABLED] c000000000443430 r do_open+0x0 [DISABLED] Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Steven Rostedt Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/d8cd1ef420ec22e3643ac332fdabcffc77319a42.1488961018.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo include/linux/kprobes.h | 1 + kernel/kprobes.c | 40 ++++++++++++++++++++++++++-------------- kernel/trace/trace_kprobe.c | 2 +- 3 files changed, 28 insertions(+), 15 deletions(-) commit af9100ad149cf31a1ab1160f71bb4025443dbdb6 Author: Ravi Bangoria Date: Tue Mar 14 20:36:52 2017 +0530 perf probe: Introduce util func is_sdt_event() Factor out the SDT event name checking routine as is_sdt_event(). Signed-off-by: Ravi Bangoria Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ananth N Mavinakayanahalli Cc: Andi Kleen Cc: Brendan Gregg Cc: He Kuang Cc: Hemant Kumar Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mathieu Poirier Cc: Naveen N. Rao Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Cc: Taeung Song Cc: Wang Nan Link: http://lkml.kernel.org/r/20170314150658.7065-2-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.h | 20 ++++++++++++++++++++ tools/perf/util/probe-event.c | 9 +-------- 2 files changed, 21 insertions(+), 8 deletions(-) commit e0304f58e895d06a7955e1077b97d2f6c9738d0a Merge: 101c431 b77ac97 Author: David S. Miller Date: Wed Mar 15 13:00:28 2017 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-03-15 This series contains updates to i40e and i40evf only. Aaron fixes an issue on x710 devices where simultaneous read accesses were interfering with each other, so make sure all devices acquire the NVM lock before reads on all devices. Shannon adds Wake On LAN support feature for x722 devices and cleaned up the opcodes so that they are in numerical order. Mitch adds a client interface to the VF driver, in preparation for the upcoming RDMA-capable hardware (and client driver). Cleaned up the client interface in the PF driver, since it was originally over engineered to handle multiple clients on multiple netdevs, but that did not happen and now there will be one client per driver, so apply the "KISS" (Keep It Simple & Stupid) to the i40e client interface. Bumped the number of MAC filters an untrusted VF can create. Jake fixes an issue where a recent refactor of queue pairs accidentally added all remaining vecotrs to the num_lan_msix which can adversely affect performance. Lihong fixes an ethtool issue with x722 devices where "-e" will error out since its EEPROM has a scope limit at offset 0x5B9FFF, so set the EEPROM length to the scope limit. Also fixed an issue where RSS offloading only worked on PF0. Filip cleans up and clarifies code comment so there is no confusion about MAC/VLAN filter initialization routine. Alex adds support for DMA_ATTR_SKIP_CPU_SYNC and DMA_ATTR_WEAK_ORDERING, which improves performance on architectures that implement either one. Harshitha cleans up confusion on flags disabled due to hardware limitation versus featured disabled by the user, so rename auto_disable_flags to hw_disabled_flags to avoid the confusion. v2: Merged patch #1 and #4 in first version to make patch #3 in this series based on feedback from David Miller. ==================== Signed-off-by: David S. Miller commit 576333a1fb940767e8638fafea908214682e8acd Author: Frode Isaksen Date: Thu Feb 23 19:02:01 2017 +0100 spi: loopback-test: add option to use vmalloc'ed buffers Using vmalloc'ed buffers will use one SG entry for each page, that may provoke DMA errors for large transfers. Also vmalloc'ed buffers may cause errors on CPU's with VIVT cache. Add this option to catch these errors when testing. Note that to catch VIVT cache errors, checking the rx range has to be disabled, so this option has been added as well. Signed-off-by: Frode Isaksen Signed-off-by: Mark Brown drivers/spi/spi-loopback-test.c | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) commit 4dd9becbce4f10009322c3e2297f9db3ace94a10 Author: Frode Isaksen Date: Thu Feb 23 19:02:00 2017 +0100 spi: davinci: do not use DMA for vmalloc'ed buffers Using vmalloc'ed buffers will fail since daVinci has VIVT cache and only the kernel lowmem virtual address is invalidated/flushed when performing DMA. The virtual address returned from vmalloc() is not invalidated/flushed and may contain stale data when returning from spi_sync(). Fixes errors when running UBIFS over SPI NOR. Revert this when all upper layer users of vmalloc'ed buffers sent to SPI handles cache flushing/invalidating. Signed-off-by: Frode Isaksen Signed-off-by: Mark Brown drivers/spi/spi-davinci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0718b764880434ac7a5b7c0f5cb2c805c589a807 Author: Frode Isaksen Date: Thu Feb 23 19:01:59 2017 +0100 spi: davinci: do not use DMA if transfer length is less than 16 Higher bitrate and lower CPU load if using PIO in this case. Signed-off-by: Frode Isaksen Signed-off-by: Mark Brown drivers/spi/spi-davinci.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 6b3a631e7f8eca75a987ed760898d28fb3628143 Author: Frode Isaksen Date: Thu Feb 23 19:01:58 2017 +0100 spi: davinci: use rx buffer as dummy tx buffer When doing rx-only transfer, the transfer will fail if the number of SG entries exceeds 20. This happens because the eDMA DMA engine is limited to 20 SG entries in one transaction, and when the DMA transcation is resumed (which takes > 150us), rx errors occurs because the slave is still transmitting. Fix this by using the rx buffer as the dummy tx buffer, so that resuming the rx transcation happens at the same time as resuming the tx transcation. Signed-off-by: Frode Isaksen Signed-off-by: Mark Brown drivers/spi/spi-davinci.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 101c431492d297dd0d111b461d8d324895676bee Merge: 9c79dda 95422de Author: David S. Miller Date: Wed Mar 15 11:59:10 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Conflicts: drivers/net/ethernet/broadcom/genet/bcmgenet.c net/core/sock.c Conflicts were overlapping changes in bcmgenet and the lockdep handling of sockets. Signed-off-by: David S. Miller commit ffa86c2f1a8862cf58c873f6f14d4b2c3250fb48 Merge: 84e5b54 5f6bee3 Author: Ingo Molnar Date: Wed Mar 15 19:27:27 2017 +0100 Merge tag 'perf-core-for-mingo-4.12-20170314' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: New features: - Add PERF_RECORD_NAMESPACES so that the kernel can record information required to associate samples to namespaces, helping in container problem characterization. Now the 'perf record has a --namespace' option to ask for such info, and when present, it can be used, initially, via a new sort order, 'cgroup_id', allowing histogram entry bucketization by a (device, inode) based cgroup identifier (Hari Bathini) - Add --next option to 'perf sched timehist', showing what is the next thread to run (Brendan Gregg) Fixes: - Fix segfault with basic block 'cycles' sort dimension (Changbin Du) - Add c2c to command-list.txt, making it appear in the 'perf help' output (Changbin Du) - Fix zeroing of 'abs_path' variable in the perf hists browser switch file code (Changbin Du) - Hide tips messages when -q/--quiet is given to 'perf report' (Namhyung Kim) Infrastructure changes: - Use ref_reloc_sym + offset to setup kretprobes (Naveen Rao) - Ignore generated files pmu-events/{jevents,pmu-events.c} for git (Changbin Du) Documentation changes: - Document +field style argument support for --field option (Changbin Du) - Clarify 'perf c2c --stats' help message (Namhyung Kim) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 9123aa8645463ca30ac8c62a07eb23e07c3aa091 Author: Mylène Josserand Date: Thu Mar 9 10:56:01 2017 +0100 ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN Update the driver to use SND_SOC_DAPM_AIF_IN instead of SND_SOC_DAPM_DAC. Rename the interface's widgets to be more precise on which slot the interface is connected. Signed-off-by: Mylène Josserand Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 80405d44c3721c775f5c508f0cdbcc0e8498eeef Author: Mylène Josserand Date: Thu Mar 9 10:56:00 2017 +0100 ASoC: sun8i-codec: Fix space on audio-routing widget An unwanted space is present in an audio widget's name on the dapm routing. It causes an error on the recognition of this widget (error: ("no dapm match for AIF1 Slot 0 Right"). Remove the space fixes it. Signed-off-by: Mylène Josserand Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ff4eb7e5d8aa4e5f4d6eb22be1deaae735de92c Author: Icenowy Zheng Date: Sun Mar 5 21:36:59 2017 +0800 ASoC: sun8i-codec-analog: split out line in Allwinner V3s features an analog codec without LINEIN. Split out this part, in order to prepare for the V3s analog codec. Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec-analog.c | 76 ++++++++++++++++++++++++++++++------ 1 file changed, 65 insertions(+), 11 deletions(-) commit 3f48947d56ff3e42e2e490714025e984af817f5d Author: Icenowy Zheng Date: Sun Mar 5 21:36:58 2017 +0800 ASoC: sun8i-codec-analog: split out mic2 Allwinner V3s features an analog codec without MIC2. Split out this part, in order to prepare for the V3s analog codec. Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec-analog.c | 92 +++++++++++++++++++++++++++++------- 1 file changed, 76 insertions(+), 16 deletions(-) commit e54fde61715df828c2f06883a6eb756bb5d88006 Author: Bryce Ferguson Date: Mon Feb 27 08:17:42 2017 -0600 ASoC: Add AU1761 audio codec as selectable option This commit adds the ADI AU1761 audio codec as a selectable option in the kernel config. Currently the driver can only be selected for ADI blackfin devices or if SND_SOC_ALL_CODECS is enabled. Signed-off-by: Bryce Ferguson Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit bf3e5ef5d549f650c13bef2b2192057cfef33d38 Author: Dharageswari R Date: Mon Mar 13 22:11:32 2017 +0530 ASoC: Intel: Skylake: Fix parameter overwrite for KPB Module KPB module default parameter were overwritten by the dynamic instance id once use case is executed. This will cause module crash from subsequent execution of use case as the updated parameters are used. So instead of over writing the default parameter, make a copy and update the module parameter and use this in IPC message. Signed-off-by: Dharageswari R Signed-off-by: Kranthikumar, GudishaX Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 47 +++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 18 deletions(-) commit b7d0254c51f3ce79a8931690e8a2f035208f6b55 Author: Jeeja KP Date: Mon Mar 13 22:11:31 2017 +0530 ASoC: Intel: Skylake: Fix module load when module size > DMA buffer size When module size > DMA buffer size, driver copies first chunk and waits for the BDL complete interrupt. BDL complete interrupt never occurs and wait time expires as module load IPC is not send to start the DMA from DSP. To fix the above issue need to follow the below steps: 1. After copying the first chunk, send the module load IPC to start the DMA. 2. Wait for the BDL interrupt. Once interrupt is received, copy the next chunk. 3. Continue step 2 till all bytes are copied. 4. When all the bytes are copied (bytes_left = 0), wait for module load IPC response 5. Handled module load IPC response messages, check the load module IPC response and wake up the thread to complete module load. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-cldma.c | 26 ++++++++----- sound/soc/intel/skylake/skl-sst-cldma.h | 2 +- sound/soc/intel/skylake/skl-sst-dsp.h | 1 + sound/soc/intel/skylake/skl-sst-ipc.c | 66 ++++++++++++++++++++++----------- sound/soc/intel/skylake/skl-sst-ipc.h | 5 +++ sound/soc/intel/skylake/skl-sst.c | 53 ++++++++++++++++++++------ 6 files changed, 110 insertions(+), 43 deletions(-) commit 7bd86a30599de479bd863e18472207337485d339 Author: G Kranthi Date: Mon Mar 13 22:11:30 2017 +0530 ASoC: Intel: Skylake: Remove get dsp_ops in cleanup routine dsp ops is already set in init, so use this in cleanup routine instead of again retrieving it. Also constify struct skl_dsp_ops. Signed-off-by: G Kranthi Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 8 ++------ sound/soc/intel/skylake/skl-sst-ipc.h | 2 ++ 2 files changed, 4 insertions(+), 6 deletions(-) commit cb729d80b5c556acf38f1f04a1f0550472a75987 Author: G Kranthi Date: Mon Mar 13 22:11:29 2017 +0530 ASoC: Intel: Skylake: Disable notifications at boot after DSP FW init DSP firmware sends notification every 1ms, which is disabled in runtime suspend. But if a system has no runtime pm, we keep getting notification, so disable after FW init as well. Signed-off-by: G Kranthi Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 2 +- sound/soc/intel/skylake/skl-pcm.c | 1 + sound/soc/intel/skylake/skl-sst-dsp.h | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) commit 3643ff10d48140a283d2e50c0e0a47f290cc3e4d Author: Jeeja KP Date: Mon Mar 13 22:11:28 2017 +0530 ASoC: Intel: Skylake: Remove BE prepare ops Remove BE prepare ops which enables MCLK by default. If MCLK is required to be enabled for any specific platform, it needs to be enabled in the corresponding machine driver. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 03de8c2ef82fae29d53de7eb86b0ca10501499fc Author: Jeeja KP Date: Mon Mar 13 22:11:27 2017 +0530 ASoC: Intel: bxtn: Reload the firmware in case of D3 failure If D3 IPC fails or times out, firmware needs to be reloaded as driver continues the reset. So set the fw_load flag to false to reload the firmware in D0. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 1fb344a33a2f99378128281df97770e2c5182c2d Author: Jeeja KP Date: Mon Mar 13 22:11:26 2017 +0530 ASoC: Intel: bxtn: Update DSP core state in D0 In system suspend, firmware needs to be re-downloaded as IMR is cleared. When firmware is downloaded in D0, core state is not set to running state causing instability with subsequent D0-D3 cycles. So set the core state correctly during D0 and check the DSP core state if not in reset to set the DSP to D3. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 1 + sound/soc/intel/skylake/skl-sst-dsp.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit 5518af9f97940e84de6a4bf6fed212a95278f818 Author: Jeeja KP Date: Mon Mar 13 22:11:25 2017 +0530 ASoC: Intel: bxtn: Disable interrupt when DSP is in D3 When DSP is in D3, no interrupts are expected, so disable interrupt while entering D3. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3b563e0a8406bf47cd39ca59f8453b3d968d996a Author: Guneshwor Singh Date: Mon Mar 13 22:11:24 2017 +0530 ASoC: Intel: Skylake: Fix not to stop src pipe in pre pmd event handler If the widget is a mixin module, just unbind between source and sink and don't stop the source pipe as there can be multiple sinks connected. Signed-off-by: Guneshwor Singh Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 9 --------- 1 file changed, 9 deletions(-) commit 6914968b8203aef72edf936319c4d46c6d46401b Author: Jeeja KP Date: Mon Mar 13 22:11:23 2017 +0530 ASoC: Intel: Skylake: Fix to delete DSP pipe after stopping pipe DSP pipe needs to stopped before deleting the pipe. Currently check is for pipe state > STARTED, which is incorrect. So changed to include pipe state STARTED to stop the pipe if it started. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1604a86d08053f936e2820208ed952807fb4c4f0 Author: Chris Wilson Date: Tue Mar 14 17:18:40 2017 +0000 drm/i915: Extend rpm wakelock during i915_handle_error() We take the runtime pm wakelock during i915_handle_error() to ensure that all paths that reach the error handler keep the device awake during the hw reads. However, we need to extend that from the reset handler to include the earlier capture routines. Reported-by: Antonio Argenziano Signed-off-by: Chris Wilson Cc: Michel Thierry Link: http://patchwork.freedesktop.org/patch/msgid/20170314171840.25706-1-chris@chris-wilson.co.uk Reviewed-by: Michel Thierry drivers/gpu/drm/i915/i915_irq.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit 16f11f46964fda7c1f8ee0cd137689abea142365 Author: Michal Wajdeczko Date: Tue Mar 14 13:33:09 2017 +0000 drm/i915/guc: Use formalized struct definition for ads object Manual pointer manipulation is error prone. Let compiler calculate right offsets for us in case we need to change ads layout. v2: don't call it object (Chris) v3: restyle offset assignments (Chris) v4: stylistic reductions Signed-off-by: Michal Wajdeczko Cc: Oscar Mateo Cc: Joonas Lahtinen Cc: Daniele Ceraolo Spurio Cc: Chris Wilson Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170314133309.126432-1-michal.wajdeczko@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_guc_submission.c | 69 ++++++++++++++---------------- drivers/gpu/drm/i915/i915_utils.h | 2 + 2 files changed, 33 insertions(+), 38 deletions(-) commit 63863d43e8f98691a714673991884732db8c8487 Author: Lucas Stach Date: Wed Mar 8 12:13:15 2017 +0100 gpu: ipu-v3: add DT binding for the Prefetch Resolve Gasket This adds the the devicetree binding for the Prefetch Resolve Gasket, as found on i.MX6 QuadPlus. The PRG is fairly simple in that it only has a configuration register range and two clocks, one for the AHB slave port and one for the AXI ports and the functional units. The PRE connections need to be described in the DT, as the PRE<->PRG assignment is a mix between fixed and muxable connections. Signed-off-by: Lucas Stach Acked-by: Rob Herring Signed-off-by: Philipp Zabel .../bindings/display/imx/fsl-imx-drm.txt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit d2a34232580a5d2c9f58baa5270836c5c9ab83ba Author: Lucas Stach Date: Wed Mar 8 12:13:14 2017 +0100 gpu: ipu-v3: add driver for Prefetch Resolve Engine This adds support for the i.MX6 QuadPlus PRE units. Currently only linear prefetch into SRAM is supported, other modes of operation like the tiled-to-linear conversion will be added later. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/Makefile | 2 +- drivers/gpu/ipu-v3/ipu-common.c | 17 ++- drivers/gpu/ipu-v3/ipu-pre.c | 289 ++++++++++++++++++++++++++++++++++++++++ drivers/gpu/ipu-v3/ipu-prv.h | 14 ++ 4 files changed, 320 insertions(+), 2 deletions(-) commit dcddda561b91fe82a8201ba7f5b4237be4c79219 Author: Lucas Stach Date: Wed Mar 8 12:13:13 2017 +0100 gpu: ipu-v3: add DT binding for the Prefetch Resolve Engine The Prefetch Resolve Engine is a prefetch and tile resolve engine which prefetches display data from DRAM to an internal SRAM region. It has a single clock for configuration register access and the functional units. A single shared interrupt is used for status and error signaling. The only external dependency is the SRAM region to use for the prefetch double buffer. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel .../bindings/display/imx/fsl-imx-drm.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit f6b50ef14ea84725c1b41c9ffea611cdfb71c7dd Author: Philipp Zabel Date: Fri Jul 22 12:02:45 2016 +0200 drm/imx: ipuv3-plane: add support for separate alpha planes The IPUv3 can read 8-bit alpha values from a separate plane buffer using a companion IDMAC channel driven by the Alpha Transparency Controller (ATC) for the graphics channels. The conditional read mechanism allows to reduce memory bandwidth by skipping reads of color data for completely transparent bursts. Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 97 ++++++++++++++++++++++++++++++++++++++- drivers/gpu/drm/imx/ipuv3-plane.h | 1 + 2 files changed, 97 insertions(+), 1 deletion(-) commit 0bfd56f05552b7d0d08a8c39b6198018b52de7f5 Author: Philipp Zabel Date: Fri Jul 22 12:01:11 2016 +0200 drm/imx: extend drm_plane_state_to_eba for separate channel support Allow to calculate EBA for planes other than plane 0. This is in preparation for the following patch, which adds support for separate alpha planes. Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e72db3b1e50febff493bc5e3fb57da9cb8cc3d91 Author: Philipp Zabel Date: Fri Jan 9 11:03:13 2015 +0100 gpu: ipu-v3: add support for separate alpha channels The IPUv3 can read 8-bit alpha values from a separate IDMAC channel driven by the Alpha Transparency Controller (ATC) for the graphics IDMAC channels. This allows to reduce memory bandwidth via a conditional read mechanism or to support planar YUV formats with alpha transparency. Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-common.c | 6 +++++ drivers/gpu/ipu-v3/ipu-cpmem.c | 57 +++++++++++++++++++++++++++++++++++++++++ include/video/imx-ipu-v3.h | 22 ++++++++++++++++ 3 files changed, 85 insertions(+) commit ba2b5277dc52cc96944d9765281bdf1e12681f66 Author: Philipp Zabel Date: Fri Jan 9 11:05:13 2015 +0100 drm: add RGB formats with separate alpha plane Some hardware can read the alpha components separately and then conditionally fetch color components only for non-zero alpha values. This patch adds fourcc definitions for two-plane RGB formats with an 8-bit alpha channel on a second plane. Signed-off-by: Philipp Zabel drivers/gpu/drm/drm_fourcc.c | 8 ++++++++ include/uapi/drm/drm_fourcc.h | 14 ++++++++++++++ 2 files changed, 22 insertions(+) commit eb8c88808c8307b05ce42e101753cb2518c6d14e Author: Philipp Zabel Date: Fri Feb 24 18:31:05 2017 +0100 drm/imx: add deferred plane disabling The DP (display processor) channel disable code tried to busy wait for the DP sync flow end interrupt status bit when disabling the partial plane without a full modeset. That never worked reliably, and it was disabled completely by the recent "gpu: ipu-v3: remove IRQ dance on DC channel disable" patch, causing ipu_wait_interrupt to always time out after 50 ms, which in turn would trigger a timeout in drm_atomic_helper_wait_for_vblanks. This patch changes ipu_plane_atomic_disable to only queue a DP channel register update at the next frame boundary and set a flag, which can be done without any waiting whatsoever. The imx_drm_atomic_commit_tail then calls a new ipu_plane_disable_deferred function that does the actual IDMAC teardown of the planes that are flagged for deferred disabling, after waiting for the vblank. Signed-off-by: Philipp Zabel Reviewed-by: Lucas Stach drivers/gpu/drm/imx/imx-drm-core.c | 18 ++++++++++++++++++ drivers/gpu/drm/imx/ipuv3-crtc.c | 22 +++++++++++++++++++++- drivers/gpu/drm/imx/ipuv3-plane.c | 25 ++++++++++++++++++------- drivers/gpu/drm/imx/ipuv3-plane.h | 5 +++++ drivers/gpu/ipu-v3/ipu-dp.c | 3 --- 5 files changed, 62 insertions(+), 11 deletions(-) commit cf92fefd040e6117fbcd4ce2baa9c54ae515e0c6 Author: Philipp Zabel Date: Fri Feb 24 18:16:47 2017 +0100 drm/imx: don't wait for vblank and stop calling cleanup_planes in commit_tail drm_atomic_helper_cleanup_planes only calls the cleanup_fb plane helpers, which we don't implement as a CMA framebuffer based driver. There is no reason to wait for vblanks in commit_tail only to do nothing afterwards. Signed-off-by: Philipp Zabel Reviewed-by: Lucas Stach drivers/gpu/drm/imx/imx-drm-core.c | 4 ---- 1 file changed, 4 deletions(-) commit f9bb7acb9b19a40dbd9d1b89380335dc8e23925f Author: Philipp Zabel Date: Fri Feb 24 18:23:55 2017 +0100 gpu: ipu-v3: add unsynchronised DP channel disabling When disabling the foreground DP channel during a modeset, the DC is already disabled without waiting for end of frame. There is no reason to wait for a frame boundary before updating the DP registers in that case. Add support to apply updates immediately. No functional changes, yet. Signed-off-by: Philipp Zabel Reviewed-by: Lucas Stach drivers/gpu/drm/imx/ipuv3-plane.c | 2 +- drivers/gpu/ipu-v3/ipu-common.c | 8 +++++--- drivers/gpu/ipu-v3/ipu-dp.c | 12 ++++++------ drivers/gpu/ipu-v3/ipu-prv.h | 7 ++++++- include/video/imx-ipu-v3.h | 2 +- 5 files changed, 19 insertions(+), 12 deletions(-) commit 2212a780b9c515cd54a5707713307efab9896b4f Author: Lucas Stach Date: Tue Nov 8 16:13:25 2016 +0100 gpu: ipu-v3: remove IRQ dance on DC channel disable This has never worked properly, as the IRQ got retriggered immediately on unmask. Remove the IRQ wait dance, as it is apparently safe to disable the DC channel at any point in time. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-dc.c | 61 +++------------------------------------------ 1 file changed, 4 insertions(+), 57 deletions(-) commit 1762ed65c700efb843df8d19a55742566872aade Author: Philipp Zabel Date: Mon Feb 6 12:44:08 2017 +0100 gpu: ipu-cpmem: add bayer formats to ipu_cpmem_set_image The IPU does not natively understand bayer formats, but it can pass them through unchanged. Add support for setting the image base address and cropping offset to ipu_cpmem_set_image. Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-cpmem.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 5cd4337135f5d79bf655fa421980e467d76ba125 Author: Philipp Zabel Date: Mon Feb 6 12:39:01 2017 +0100 gpu: ipu-cpmem: set image base address even for incorrect formats Otherwise, if the image base address is kept at zero, and if the user ignores the error return value, the IPU may be configured to write into the dma-apbh@00110000 region for large frames, which will lock up the system. Reported-by: Russell King Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-cpmem.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 2e9a71218ee34ee652f45cd9d7ba713e1b0155e4 Author: Philipp Zabel Date: Thu Oct 20 15:37:52 2016 +0200 drm/imx: ipuv3-plane: update overlay plane position also without modeset Previously, the overlay plane position would only be updated when the plane was first enabled or during a modeset. We can instruct the DP to move the plane also when just updating the EBA. Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 03ee3da8ce8d51013e7952108bdb0cd4e973a7de Author: Philipp Zabel Date: Wed Oct 19 10:50:26 2016 +0200 drm/imx: ipuv3-plane: use drm_plane_helper_check_state, clipped coordinates Use drm_plane_helper_check_state to clip raw user coordinates to crtc bounds. This checks for full plane coverage and scaling already, so we can drop some custom checks. Use the clipped coordinates everywhere. Suggested-by: Ville Syrjälä Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 80 +++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 42 deletions(-) commit 5ace37bd7947e28dec5559a57ddc6e1d997dbec5 Author: Bhumika Goyal Date: Tue Mar 14 00:42:22 2017 +0530 ASoC: fsl: constify snd_soc_ops structures Declare snd_soc_ops structures as const as they are only stored in the ops field of a snd_soc_dai_link structure. This field is of type const, so snd_soc_ops structures having this property can be made const too. The following .o files did not compile: sound/soc/fsl/{p1022_rdk.c/p1022_ds.c/mpc8610_hpcd.c} Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown sound/soc/fsl/eukrea-tlv320.c | 2 +- sound/soc/fsl/imx-mc13783.c | 2 +- sound/soc/fsl/mpc8610_hpcd.c | 2 +- sound/soc/fsl/mx27vis-aic32x4.c | 2 +- sound/soc/fsl/p1022_ds.c | 2 +- sound/soc/fsl/p1022_rdk.c | 2 +- sound/soc/fsl/phycore-ac97.c | 2 +- sound/soc/fsl/wm1133-ev1.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) commit 943b73112dfdd6747871a3347f70de6876f4dd4b Author: Bhumika Goyal Date: Tue Mar 14 01:16:40 2017 +0530 ASoC: pxa: constify snd_soc_ops structures Declare snd_soc_ops structures as const as they are only stored in the ops field of a snd_soc_dai_link structure. This field is of type const, so snd_soc_ops structures having this property can be made const too. The .o files did not compile for all the changed .c files. Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown sound/soc/pxa/brownstone.c | 2 +- sound/soc/pxa/corgi.c | 2 +- sound/soc/pxa/hx4700.c | 2 +- sound/soc/pxa/imote2.c | 2 +- sound/soc/pxa/magician.c | 4 ++-- sound/soc/pxa/poodle.c | 2 +- sound/soc/pxa/raumfeld.c | 2 +- sound/soc/pxa/spitz.c | 2 +- sound/soc/pxa/tosa.c | 2 +- sound/soc/pxa/z2.c | 2 +- sound/soc/pxa/zylonite.c | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) commit 6cd6ad0e45b9ea48bf3b62eee2dd7238f3e4dd7c Author: Fabio Estevam Date: Mon Mar 13 16:56:03 2017 -0300 ASoC: tas2552: Improve DT binding document example Improve DT binding document example by providing the mandatory regulator properties. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/tas2552.txt | 3 +++ 1 file changed, 3 insertions(+) commit f49efce4ed6fdec17a32406eccb56fc167f43b6c Author: Jianqun Xu Date: Wed Mar 15 14:14:00 2017 +0800 ASoC: rockchip: add bindings for rk3368 i2s Add devicetree bindings for i2s controller found on rk3368 processors from rockchip. Signed-off-by: Jianqun Xu Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rockchip-i2s.txt | 1 + 1 file changed, 1 insertion(+) commit b3420dde38d7458c5b0a37e909de6d2e015bfb67 Author: Arkadiusz Hiler Date: Tue Mar 14 15:28:14 2017 +0100 drm/i915/uc: Add params for specifying firmware `guc_firmware_path` and `huc_firmware_path` module parameters are added. Using the parameter disables version checks and loads desired firmware instead of the default one. v2: make params unsafe && notice about disabled fw check (J. Lahtinen) Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Michal Winiarski Signed-off-by: Arkadiusz Hiler Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_params.c | 10 ++++++++++ drivers/gpu/drm/i915/i915_params.h | 2 ++ drivers/gpu/drm/i915/intel_guc_loader.c | 6 +++++- drivers/gpu/drm/i915/intel_huc.c | 6 +++++- drivers/gpu/drm/i915/intel_uc.c | 6 ++++-- 5 files changed, 26 insertions(+), 4 deletions(-) commit b551f610b36e3f04d6e583cd732cb8805fe86b87 Author: Arkadiusz Hiler Date: Tue Mar 14 15:28:13 2017 +0100 drm/i915/uc: Separate firmware selection and preparation intel_{h,g}uc_init_fw selects correct firmware and then triggers it's preparation (fetch + initial parsing). This change separates out select steps, so those can be called by the sanitize_options(). Then, during the init_fw(), we prepare the firmware if the firmware was selected. Cc: Michal Winiarski Cc: Joonas Lahtinen Signed-off-by: Arkadiusz Hiler Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_guc_loader.c | 14 +++++--------- drivers/gpu/drm/i915/intel_huc.c | 14 ++------------ drivers/gpu/drm/i915/intel_uc.c | 18 ++++++++++++------ drivers/gpu/drm/i915/intel_uc.h | 4 ++-- 4 files changed, 21 insertions(+), 29 deletions(-) commit 8fc2a4e427991433ea6358117fdbcc07494ff8c5 Author: Arkadiusz Hiler Date: Tue Mar 14 15:28:12 2017 +0100 drm/i915/uc: Simplify firmware path handling Currently fw->path values can represent one of three possible states: 1) NULL - device without the uC 2) '\0' - device with the uC but have no firmware 3) else - device with the uC and we have firmware Second case is used only to WARN at a later stage. We can WARN right away and merge cases 1 and 2. Code can be even further simplified and common (HuC/GuC logic) happening right before the fetch can be offloaded to the common function. v2: fewer temporary variables, more straightforward flow (M. Wajdeczko) v3: DRM_ERROR instead of WARN (M. Wajdeczko) v4: coding standard (J. Lahtinen) v5: non-trivial rebase v6: remove path check, we are checking fetch status (M. Wajdeczko) Cc: Anusha Srivatsa Cc: Tvrtko Ursulin Cc: Michal Winiarski Cc: Michal Wajdeczko Cc: Joonas Lahtinen Signed-off-by: Arkadiusz Hiler Reviewed-by: Tvrtko Ursulin Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_guc_loader.c | 36 ++++++++++----------------------- drivers/gpu/drm/i915/intel_huc.c | 21 ++++++------------- drivers/gpu/drm/i915/intel_uc.c | 4 +++- 3 files changed, 20 insertions(+), 41 deletions(-) commit 6cd5a72c357732ed7f4566545b9d58eb4fcb1aa2 Author: Arkadiusz Hiler Date: Tue Mar 14 15:28:11 2017 +0100 drm/i915/guc: Simplify intel_guc_init_hw() Current version of intel_guc_init_hw() does a lot: - cares about submission - loads huc - implement WA This change offloads some of the logic to intel_uc_init_hw(), which now cares about the above. v2: rename guc_hw_reset and fix typo in define name (M. Wajdeczko) v3: rename once again v4: remove spurious comments and add some style (J. Lahtinen) v5: flow changes, got rid of dead checks (M. Wajdeczko) v6: rebase v7: rebase & onion teardown (J. Lahtinen) Cc: Anusha Srivatsa Cc: Michal Winiarski Cc: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Joonas Lahtinen Signed-off-by: Arkadiusz Hiler Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/intel_guc_loader.c | 138 +++----------------------------- drivers/gpu/drm/i915/intel_uc.c | 111 +++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_uc.h | 1 + 4 files changed, 122 insertions(+), 130 deletions(-) commit d2be9f2f41a8e361def96f8ca3eebf2db1c280a5 Author: Arkadiusz Hiler Date: Tue Mar 14 15:28:10 2017 +0100 drm/i915/guc: Extract param logic form guc_init_fw() Let intel_guc_init_fw() focus on determining and fetching the correct firmware. This patch introduces intel_uc_sanitize_options() that is called from intel_sanitize_options(). Then, if we have GuC, we can call intel_guc_init_fw() conditionally and we do not have to do the internal checks. v2: fix comment, notify when nuking GuC explicitly enabled (M. Wajdeczko) v3: fix comment again, change the nuke message (M. Wajdeczko) v4: update title to reflect new function name + rebase v5: text && remove 2 uneccessary checks (M. Wajdeczko) Cc: Michal Winiarski Cc: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Joonas Lahtinen Signed-off-by: Arkadiusz Hiler Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 2 ++ drivers/gpu/drm/i915/intel_guc_loader.c | 18 +----------------- drivers/gpu/drm/i915/intel_huc.c | 3 --- drivers/gpu/drm/i915/intel_uc.c | 28 +++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_uc.h | 1 + 5 files changed, 31 insertions(+), 21 deletions(-) commit 29ad6a30de84f25f5ec8ac13c5d97b2fcc4bf605 Author: Arkadiusz Hiler Date: Tue Mar 14 15:28:09 2017 +0100 drm/i915/uc: Introduce intel_uc_init_fw() Instead of calling intel_guc_init() and intel_huc_init() one by one this patch introduces intel_uc_init_fw() function that calls them both. Called functions are renamed accordingly. Trying to have subject_verb_object ordering and more descriptive names, the intel_huc_init() and intel_guc_init() functions are renamed. For guc_init(): * `intel_guc` is the subject, so those functions now take intel_guc structure, instead of the dev_priv * init is the verb * fw is the object which better describes the function's role huc_init() change follows the same reasoning. v2: settle on intel_uc_fetch_fw name (M. Wajdeczko) v3: yet another rename - intel_uc_init_fw (J. Lahtinen) v4: non-trivial rebase Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Michal Wajdeczko Cc: Michal Winiarski Signed-off-by: Arkadiusz Hiler Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 3 +-- drivers/gpu/drm/i915/intel_guc_loader.c | 30 ++++++++++++------------- drivers/gpu/drm/i915/intel_huc.c | 39 +++++++++++++++++---------------- drivers/gpu/drm/i915/intel_uc.c | 6 +++++ drivers/gpu/drm/i915/intel_uc.h | 5 +++-- 5 files changed, 45 insertions(+), 38 deletions(-) commit 4c0fed7911fab26c39ab1b125582f28ac3e5622a Author: Arkadiusz Hiler Date: Tue Mar 14 15:28:08 2017 +0100 drm/i915/uc: Move intel_uc_fw_fetch() to intel_uc.c The file fits better. Additionally rename it to intel_uc_prepare_fw(), as the function does more than simple fetch. `obj` cleanup in the function is also fixed (i.e. removed). In the fail scenario it was always 'put' but there's no possible flow that initializes the obj properly and then goes to the fail label. v2: remove second declaration, reorder (M. Wajdeczko) v3: non-trivial rebase v4: remove obj cleanup in the fail scenario (C. Wilson) Cc: Chris Wilson Cc: Michal Wajdeczko Signed-off-by: Arkadiusz Hiler Reviewed-by: Michal Wajdeczko Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_guc_loader.c | 137 +------------------------------- drivers/gpu/drm/i915/intel_huc.c | 2 +- drivers/gpu/drm/i915/intel_uc.c | 131 ++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_uc.h | 4 +- 4 files changed, 135 insertions(+), 139 deletions(-) commit 882d1db09bf0631ad94f20e0abf037b3d471a6d5 Author: Arkadiusz Hiler Date: Tue Mar 14 15:28:07 2017 +0100 drm/i915/uc: Rename intel_?uc_{setup, load}() to _init_hw() GuC historically has two "startup" functions called _init() and _setup() Then HuC came with it's _init() and _load(). This commit renames intel_guc_setup() and intel_huc_load() to *uc_init_hw() as they called from the i915_gem_init_hw(). The aim is to be consistent in that entry points called during particular driver init phases (e.g. init_hw) are all suffixed by that phase. When reading the leaf functions, it should be clear at what stage during the driver load it is called and therefore what operations are legal at that point. Also, since the functions start with intel_guc and intel_huc they take appropiate structure. v2: commit message update (Chris Wilson) v3: change taken parameters to be more "semantic" (M. Wajdeczko) Cc: Chris Wilson Cc: Michal Winiarski Cc: Michal Wajdeczko Signed-off-by: Arkadiusz Hiler Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/intel_guc_loader.c | 44 ++++++++++++++++----------------- drivers/gpu/drm/i915/intel_huc.c | 44 ++++++++++++++++----------------- drivers/gpu/drm/i915/intel_uc.h | 4 +-- 4 files changed, 47 insertions(+), 47 deletions(-) commit 50beba55e8e27903019611354624322677462cb7 Author: Arkadiusz Hiler Date: Tue Mar 14 15:28:06 2017 +0100 drm/i915/huc: Add huc_to_i915 Used to obtain "dev_priv" from huc struct pointer. We already have similar thing for guc. Cc: Michal Wajdeczko Signed-off-by: Arkadiusz Hiler Reviewed-by: Michal Wajdeczko Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.h | 5 +++++ 1 file changed, 5 insertions(+) commit 0417a2b3a15b0d87d518ddd2d6c00ed6c739884e Author: Arkadiusz Hiler Date: Tue Mar 14 15:28:05 2017 +0100 drm/i915/uc: Drop superfluous externs in intel_uc.h Externs are implicit and we generally try to avoid them. Cc: Michal Wajdeczko Signed-off-by: Arkadiusz Hiler Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_uc.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 11282a49b735ad7f4cea187de2b8dc5489343e4b Author: Andre Przywara Date: Mon Mar 6 01:35:56 2017 +0000 reset: sunxi: fix for 64-bit compilation The Allwinner reset controller has 32-bit registers, so translating the reset cell number into a register and bit offset should not use any architecture dependent data size. Otherwise this breaks for 64-bit architectures like arm64. Fix this by making it clear that it's the hardware register width which matters here in the calculation. Signed-off-by: Andre Przywara Acked-by: Chen-Yu Tsai Signed-off-by: Philipp Zabel drivers/reset/reset-sunxi.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 627006820268f92b62b2bde486c76ccd0fadb671 Author: Thor Thayer Date: Wed Feb 22 11:10:17 2017 -0600 reset: Add Altera Arria10 SR Reset Controller This patch adds the reset controller functionality for Peripheral PHYs to the Arria10 System Resource Chip. Signed-off-by: Thor Thayer Signed-off-by: Philipp Zabel MAINTAINERS | 1 + drivers/reset/Kconfig | 7 +++ drivers/reset/Makefile | 1 + drivers/reset/reset-a10sr.c | 138 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 147 insertions(+) commit 843fc75af8f5fb690656d1529b250584d8923d2c Author: Thor Thayer Date: Wed Feb 22 11:10:16 2017 -0600 dt-bindings: reset: a10sr: Add Arria10 SR Reset Controller offsets The Arria10 System Resource Chip reset controller handles the Arria10 peripheral PHYs. This patch adds the offsets for these PHYs. Signed-off-by: Thor Thayer Signed-off-by: Philipp Zabel MAINTAINERS | 1 + include/dt-bindings/reset/altr,rst-mgr-a10sr.h | 33 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) commit abf97755ae31aaaf35156438dd3036e96f66da83 Author: Andrey Smirnov Date: Tue Feb 21 08:13:31 2017 -0800 reset: Add i.MX7 SRC reset driver Add reset controller driver exposing various reset faculties, implemented by System Reset Controller IP block. Cc: Lucas Stach Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov Acked-by: Rob Herring Signed-off-by: Philipp Zabel .../devicetree/bindings/reset/fsl,imx7-src.txt | 47 ++++++ drivers/reset/Kconfig | 7 + drivers/reset/Makefile | 2 + drivers/reset/reset-imx7.c | 158 +++++++++++++++++++++ include/dt-bindings/reset/imx7-reset.h | 62 ++++++++ 5 files changed, 276 insertions(+) commit 660549e05d6bf7ed7160de51da2948c2f1646f7e Author: William Breathitt Gray Date: Tue Jan 10 13:51:06 2017 -0500 gpio: pc104: Mask PC/104 drivers via PC104 Kconfig option PC/104 drivers should be hidden on machines which do not support PC/104 devices. This patch adds the PC104 Kconfig option as a dependency for the relevant PC/104 device driver Kconfig options. Cc: Linus Walleij Cc: Alexandre Courbot Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7ad63c790bc725f60a8baf298be2cdfd1268469d Author: Bartosz Golaszewski Date: Sat Mar 4 17:23:40 2017 +0100 gpio: sta2x11: use resource management for irqs Use device resource managed variants of irq_alloc_descs() and request_irq() and remove the code manually freeing irq resources. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-sta2x11.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 8514b5439c90f077fadaf981b5f1aec9cde7be76 Author: Bartosz Golaszewski Date: Sat Mar 4 17:23:39 2017 +0100 gpio: mxs: use devm_irq_alloc_descs() This driver never frees the interrupt descriptors it allocates. Fix it by using the resource managed version of irq_alloc_descs(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-mxs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c553c3c4786b9bfbf46b90ebac9c28192377fc13 Author: Bartosz Golaszewski Date: Sat Mar 4 17:23:38 2017 +0100 gpio: mxc: use devm_irq_alloc_descs() This driver never frees the interrupt descriptors it allocates. Fix it by using the resource managed version of irq_alloc_descs(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-mxc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 74dd9ebffff21295e2276ef4cff695a1324bfedd Author: Bartosz Golaszewski Date: Sat Mar 4 17:23:37 2017 +0100 gpio: sodaville: use resource management for irqs Use device resource managed variants of irq_alloc_descs() and request_irq() and remove the code manually freeing irq resources. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-sodaville.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit a1a3c2d551792747f85857a0c18609650d5948d8 Author: Bartosz Golaszewski Date: Sat Mar 4 17:23:36 2017 +0100 gpio: davinci: use devm_irq_alloc_descs() This driver never frees the interrupt descriptors it allocates. Fix it by using the resource managed version of irq_alloc_descs(). Signed-off-by: Bartosz Golaszewski Acked-by: Keerthy Signed-off-by: Linus Walleij drivers/gpio/gpio-davinci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bda61a192a512abf8d9962e3d30d6b63be13797a Author: Bartosz Golaszewski Date: Sat Mar 4 17:23:35 2017 +0100 gpio: pxa: use devm_irq_alloc_descs() This driver never frees the interrupt descriptors it allocates. Fix it by using the resource managed version of irq_alloc_descs(). Signed-off-by: Bartosz Golaszewski Acked-by: Robert Jarzmik Signed-off-by: Linus Walleij drivers/gpio/gpio-pxa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31bd86d9834fc1fb5bd00247358754bebabf0639 Author: Bartosz Golaszewski Date: Sat Mar 4 17:23:34 2017 +0100 gpio: xlp: use resource management for irqs Use the resource managed variant of irq_alloc_descs() and remove the code manually freeing allocated interrupt descriptors. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-xlp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e971ac9a564a4f3fbaeaae111079837928226870 Author: Bartosz Golaszewski Date: Sat Mar 4 17:23:33 2017 +0100 gpio: ml-ioh: use resource management for irqs Use device resource managed variants of irq_alloc_descs() and request_irq() and remove the code manually freeing irq resources. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-ml-ioh.c | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) commit f57f3e60038358a903d5d867f9cb688e1e8d9142 Author: Bartosz Golaszewski Date: Sat Mar 4 17:23:32 2017 +0100 gpio: pch: use resource management for irqs Use device resource managed variants of irq_alloc_descs() and request_irq() and remove the code manually freeing irq resources. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-pch.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 2ed36f30139f773e3c99eeca2307b7a6596f4b90 Author: Bartosz Golaszewski Date: Sat Mar 4 17:23:31 2017 +0100 gpio: omap: use devm_irq_alloc_descs() This driver never frees the allocated interrupt descriptors. Fix it by using a resource managed variant of irq_alloc_descs(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9bc81137e8082eaa73f1b116e1df2c75673d64df Author: Bartosz Golaszewski Date: Sat Mar 4 17:23:30 2017 +0100 gpio: twl4030: use devm_irq_alloc_descs() This driver never frees the irq descriptors it allocates. Fix it by using a resource managed variant of irq_alloc_descs(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-twl4030.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 62a7ca0735f47e5799a892daab39be3c67979de9 Author: Bartosz Golaszewski Date: Sat Mar 4 17:23:29 2017 +0100 gpio: mockup: use devm_irq_alloc_descs() Use the resource managed variant of irq_alloc_descs(). This allows us to remove gpio_mockup_remove(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Bamvor Jian Zhang Signed-off-by: Linus Walleij drivers/gpio/gpio-mockup.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit f73b15487acecb52bc028cee7df4fc0d0871fcc8 Author: David Daney Date: Tue Feb 28 17:48:50 2017 -0800 dt-bindings: gpio: Add binding documentation for gpio-thunderx Signed-off-by: David Daney Acked-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/gpio-thunderx.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit eddeae073760aa3186e2fa0d14a12794687fa786 Author: Axel Lin Date: Sun Feb 26 22:36:58 2017 +0800 gpio: exar: Set proper output level in exar_direction_output Current code does not set output level in exar_direction_output, fix it. Also move the direction_output/direction_input code block to avoid forward declaration for exar_set_value(). Signed-off-by: Axel Lin Signed-off-by: Linus Walleij drivers/gpio/gpio-exar.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 22c403676dbbb7c6f186099527af7f065498ef45 Author: Dmitry Torokhov Date: Sun Feb 12 17:13:55 2017 -0800 gpio: return NULL from gpiod_get_optional when GPIOLIB is disabled Given the intent behind gpiod_get_optional() and friends it does not make sense to return -ENOSYS when GPIOLIB is disabled: the driver is expected to work just fine without gpio so let's behave as if gpio was not found. Otherwise we have to special-case -ENOSYS in drivers. Note that there was objection that someone might forget to enable GPIOLIB when dealing with a platform that has device that actually specifies optional gpio and we'll break it. I find this unconvincing as that would have to be the *only GPIO* in the system, which is extremely unlikely. Signed-off-by: Dmitry Torokhov Signed-off-by: Linus Walleij Documentation/gpio/consumer.txt | 6 ++++++ include/linux/gpio/consumer.h | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) commit 85c73d50e57eb8ad43955fe38714bc5fba1acd92 Author: Andy Shevchenko Date: Thu Mar 2 15:48:05 2017 +0200 gpio: acpi: Add managed variant of acpi_dev_add_driver_gpios() Introduce device managed variant of acpi_dev_add_driver_gpios() and its counterpart acpi_dev_remove_driver_gpios(). The functions in most cases are used in driver's ->probe() and ->remove() callbacks, that's why it's useful to have managed variant of them. Signed-off-by: Andy Shevchenko Acked-by: Rafael J. Wysocki Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 31 +++++++++++++++++++++++++++++++ include/linux/acpi.h | 11 +++++++++++ 2 files changed, 42 insertions(+) commit b77ac975930741f0b6612b18e55d7a72c81ea2ac Author: Harshitha Ramamurthy Date: Fri Feb 3 10:57:42 2017 -0800 i40e: rename auto_disable_flags to hw_disabled_flags A previous commit introduced a field that tracks the features that are disabled due to HW resource limitations as opposed to the featured disabled by the user. This patch changes the name of the field to make it more readable since it might get confusing when looking at code containing both the flags field and the auto_disable_features field together. Change-ID: Idcc9888659698f6fe3ccff17c8c3f09b5026f708 Signed-off-by: Harshitha Ramamurthy Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 8 ++++++-- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 10 ++++----- drivers/net/ethernet/intel/i40e/i40e_main.c | 28 +++++++++++++------------- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 20 +++++++++--------- 4 files changed, 35 insertions(+), 31 deletions(-) commit 15990832cd3e7e8904f8dacdabfa33adb9a836d6 Author: Bimmy Pujari Date: Mon Jan 30 12:29:37 2017 -0800 i40e/i40evf: Change version from 1.6.27 to 2.1.7 Signed-off-by: Bimmy Pujari Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 6 +++--- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 4dbc56613962bfa597c345d8eff839870293c0a5 Author: Mitch Williams Date: Mon Jan 30 12:29:36 2017 -0800 i40e: Allow untrusted VFs to have more filters Our original filter limit of 8 was based on behavior that we saw from Linux VMs. Now we're running Other Operating Systems under KVM and we see that they commonly use more MAC filters. Since it seems weird to require people to enable trusted VFs just to boot their OS, bump the number of filters allowed by default. Change-ID: I76b2dcb2ad6017e39231ad3096c3fb6f065eef5e Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59605bc09630c2b577858c371edf89c099b5f925 Author: Alexander Duyck Date: Mon Jan 30 12:29:35 2017 -0800 i40e/i40evf: Add support for mapping pages with DMA attributes This patch adds support for DMA_ATTR_SKIP_CPU_SYNC and DMA_ATTR_WEAK_ORDERING. By enabling both of these for the Rx path we are able to see performance improvements on architectures that implement either one due to the fact that page mapping and unmapping only has to sync what is actually being used instead of the entire buffer. In addition by enabling the weak ordering attribute enables a performance improvement for architectures that can associate a memory ordering with a DMA buffer such as Sparc. Change-ID: If176824e8231c5b24b8a5d55b339a6026738fc75 Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 31 ++++++++++++++++++++++----- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 3 +++ drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 31 ++++++++++++++++++++++----- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 3 +++ 4 files changed, 58 insertions(+), 10 deletions(-) commit 3954b39102677c879d7663621fb9a7e0da349274 Author: Filip Sadowski Date: Mon Jan 30 12:29:34 2017 -0800 i40e: Clarify steps in MAC/VLAN filters initialization routine This patch clarifies the reason for removal of automatically firmware-generated filter and explicit addition of filter which accepts frames with any VLAN id. Change-ID: Iabf180b6d61c4d8a36d3bcf8457c377a6f2aca0e Signed-off-by: Filip Sadowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 26f77e53cfee2b1b066071353be03988897e23c3 Author: Lihong Yang Date: Mon Jan 30 12:29:33 2017 -0800 i40e: fix RSS queues only operating on PF0 This patch fixes the issue that RSS offloading only works on PF0 by using the direct register writing of the hash keys for the VFs instead of using the admin queue command to do so. Change-ID: Ia02cda7dbaa23def342e8786097a2c03db6f580b Signed-off-by: Lihong Yang Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 11 +++-------- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 6 ++---- 2 files changed, 5 insertions(+), 12 deletions(-) commit c271dd6c391b535226cf1a81aaad9f33cb5899d3 Author: Lihong Yang Date: Mon Jan 30 12:29:32 2017 -0800 i40e: fix ethtool to get EEPROM data from X722 interface Currently ethtool -e will error out with a X722 interface as its EEPROM has a scope limit at offset 0x5B9FFF. This patch fixes the issue by setting the EEPROM length to the scope limit to avoid NVM read failure beyond that. Change-ID: I0b7d4dd6c7f2a57cace438af5dffa0f44c229372 Signed-off-by: Lihong Yang Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 5 +++++ 1 file changed, 5 insertions(+) commit c0cf70a6fc373570f86c6dc4799d775363b9946e Author: Jacob Keller Date: Tue Jan 24 10:24:01 2017 -0800 i40e: don't add more vectors to num_lan_msix than number of CPUs This is a solution to avoid adding too many queues to num_lan_msix. A recent refactor of queue pairs accidentally added all remaining vectors to the num_lan_msix which can have adverse performance issues, due to enabling more queues than the number of CPU cores. This patch removes the old calculation, and replaces it with a simple algorithm. 1) add queue pairs up to num_online_cpus(), but capped at half of total vectors 2) then add alternative features such as flow directory and similar 3) finally, add the remaining vectors back to queue pairs, but capped such that the total number of queue pairs does not exceed num_online_cpus(). Change-ID: I668abf67d5011a1248866daba8885f4ff00cb8d9 Signed-off-by: Jacob Keller Signed-off-by: Harshitha Ramamurthy Signed-off-by: Carolyn Wyborny Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 30 ++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) commit 0ef2d5afb12d379f4dd5df696219a01b88bb778a Author: Mitch Williams Date: Tue Jan 24 10:24:00 2017 -0800 i40e: KISS the client interface (KISS is Keep It Simple, Stupid. Or is it?) The client interface vastly overengineered for what it needs to do. It was originally designed to support multiple clients on multiple netdevs, possibly even with multiple drivers. None of this happened, and now we know that there will only ever be one client for i40e (i40iw) and one for i40evf (i40iwvf). So, time for some KISS. Since i40e and i40evf are a Dynasty, we'll simplify this one to match the VF interface. First, be a Destroyer and remove all of the lists and locks required to support multiple clients. Keep one static around to keep track of one client, and track the client instances for each netdev in the driver's pf (or adapter) struct. Now it's Almost Human. Since we already know the client type is iWarp, get rid of any checks for this. Same for VSI type - it's always going to be the same type, so it's just a Parasite. While we're at it, fix up some comments. This makes the function headers actually match the functions. These changes reduce code complexity, simplify maintenance, squash some lurking timing bugs, and allow us to Rock and Roll All Nite. Change-ID: I1ea79948ad73b8685272451440a34507f9a9012e Signed-off-by: Mitch Williams Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 8 +- drivers/net/ethernet/intel/i40e/i40e_client.c | 457 +++++++-------------- drivers/net/ethernet/intel/i40e/i40e_client.h | 8 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 32 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +- 5 files changed, 179 insertions(+), 328 deletions(-) commit ed0e894de7c1339be55ca0dcc11783d923ac5248 Author: Mitch Williams Date: Tue Jan 24 10:23:59 2017 -0800 i40evf: add client interface In preparation for upcoming RDMA-capable hardware, add a client interface to the VF driver. This is a slightly-simplified version of the PF client interface, with the names changed to protect the innocent. Due to the nature of the VF<->PF interactions, the client interface sometimes needs to call back into itself to pass messages. Because of this, we can't use the coarse-grained locking like the PF's client interface uses. Instead, we handle all client interactions in a separate thread so the watchdog can still run and process virtual channel messages. Signed-off-by: Mitch Williams Signed-off-by: Jesse Brandeburg Signed-off-by: Anjali Singhai Jain Signed-off-by: Avinash Dayanand Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/Makefile | 2 +- drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h | 33 ++ drivers/net/ethernet/intel/i40evf/i40evf.h | 29 +- drivers/net/ethernet/intel/i40evf/i40evf_client.c | 563 +++++++++++++++++++++ drivers/net/ethernet/intel/i40evf/i40evf_client.h | 166 ++++++ drivers/net/ethernet/intel/i40evf/i40evf_main.c | 83 ++- .../net/ethernet/intel/i40evf/i40evf_virtchnl.c | 13 +- 7 files changed, 879 insertions(+), 10 deletions(-) commit 1fe55309462cc9b2dcefe6eb91e7adeba5e59e89 Author: Michał Kępień Date: Thu Mar 9 10:36:51 2017 +0100 platform/x86: intel-hid: do not set parents of input devices explicitly devm_input_allocate_device() already causes the supplied struct device to be set as the parent of the input device, so doing it again is redundant. Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-and-tested-by: Alex Hung drivers/platform/x86/intel-hid.c | 2 -- 1 file changed, 2 deletions(-) commit db8f95d0141926a673484d228cd4040f5b10972f Author: Michał Kępień Date: Thu Mar 9 13:11:50 2017 +0100 platform/x86: toshiba_acpi: remove sparse_keymap_free() calls As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko drivers/platform/x86/toshiba_acpi.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit c6d973f474cfdc4d9f0f18b7f539c5cc7847188d Author: Michał Kępień Date: Thu Mar 9 13:11:49 2017 +0100 platform/x86: toshiba-wmi: remove sparse_keymap_free() calls As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko drivers/platform/x86/toshiba-wmi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 3f2e1a323a8391a142943ebbc862de5633a381e0 Author: Michał Kępień Date: Thu Mar 9 13:11:48 2017 +0100 platform/x86: topstar-laptop: remove sparse_keymap_free() calls As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko drivers/platform/x86/topstar-laptop.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit b09b9195b3722928918a5e612f7aec5719a061bb Author: Michał Kępień Date: Thu Mar 9 13:11:47 2017 +0100 platform/x86: panasonic-laptop: remove sparse_keymap_free() calls As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). As this reduces acpi_pcc_destroy_input() to one line, replace all calls to that function with direct calls to input_unregister_device(). Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko drivers/platform/x86/panasonic-laptop.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 0788e3375ae33c5a175ba3d394b995d4fdc823b5 Author: Michał Kępień Date: Thu Mar 9 13:11:46 2017 +0100 platform/x86: msi-wmi: remove sparse_keymap_free() calls As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko drivers/platform/x86/msi-wmi.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 7cb8aa8cafbe9ebc5ecd7ac6125264c958db48ad Author: Michał Kępień Date: Thu Mar 9 13:11:45 2017 +0100 platform/x86: msi-laptop: remove sparse_keymap_free() calls As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). As this reduces msi_laptop_input_destroy() to one line, replace all calls to that function with direct calls to input_unregister_device(). Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko drivers/platform/x86/msi-laptop.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit c973d4b578a46f8fb822bed2d3a0d3a752d02ecf Author: Michał Kępień Date: Thu Mar 9 13:11:44 2017 +0100 platform/x86: ideapad-laptop: remove sparse_keymap_free() calls As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko drivers/platform/x86/ideapad-laptop.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 3a3c1115ce55f02e6185338808a4b7959b46e334 Author: Michał Kępień Date: Thu Mar 9 13:11:43 2017 +0100 platform/x86: hp-wmi: remove sparse_keymap_free() calls As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko drivers/platform/x86/hp-wmi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit de3c91c1ce073445e9cab5ad43fb038f896919b6 Author: Michał Kępień Date: Thu Mar 9 13:11:42 2017 +0100 platform/x86: eeepc-laptop: remove sparse_keymap_free() calls As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko drivers/platform/x86/eeepc-laptop.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 815edfe7ad887323c6d261dce3a0589d49671d1e Author: Michał Kępień Date: Thu Mar 9 13:11:41 2017 +0100 platform/x86: dell-wmi: remove sparse_keymap_free() calls As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). As this reduces dell_wmi_input_destroy() to one line, replace all calls to that function with direct calls to input_unregister_device(). Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko drivers/platform/x86/dell-wmi.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 469b0170450e7cbb0230b22036622005906b878a Author: Michał Kępień Date: Thu Mar 9 13:11:40 2017 +0100 platform/x86: dell-wmi-aio: remove sparse_keymap_free() calls As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko drivers/platform/x86/dell-wmi-aio.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c2ef3a1c97adbe26d1a10d878e353436a3978409 Author: Michał Kępień Date: Thu Mar 9 13:11:39 2017 +0100 platform/x86: asus-wmi: remove sparse_keymap_free() calls As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-wmi.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f118b312bdd729b33165c6614e2370f019baad6e Author: Michał Kępień Date: Thu Mar 9 13:11:38 2017 +0100 platform/x86: asus-laptop: remove sparse_keymap_free() calls As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-laptop.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit cd1aaef0b2846cead3662d37d82384660a7bbd63 Author: Michał Kępień Date: Thu Mar 9 13:11:37 2017 +0100 platform/x86: acer-wmi: remove sparse_keymap_free() calls As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free(). Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko drivers/platform/x86/acer-wmi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 98f647779945e584d6b2e0c4bbb9e878327ded5c Merge: c2cddd4 fabeb16 Author: Darren Hart Date: Tue Mar 14 22:57:36 2017 -0700 Merge branch 'ib/4.10-sparse-keymap-managed' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input into testing commit c2cddd4f7d686ae7185af44885894202b5c8af63 Author: Michał Kępień Date: Fri Mar 10 11:50:36 2017 +0100 platform/x86: fujitsu-laptop: cleanup error labels in fujitsu_init() Error labels currently used in fujitsu_init() are really hard to follow: some (fail_laptop) indicate which operation has failed, others (fail_sysfs_group) indicate where unrolling should start and the rest (fail_platform_driver) is simply confusing. Change them to follow the pattern used throughout the rest of the module, i.e. make every label indicate the first unrolling operation it leads to. Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-and-tested-by: Jonathan Woithe drivers/platform/x86/fujitsu-laptop.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit aea3137c2cb641e69b80ee5b3c376120034e458d Author: Michał Kępień Date: Fri Mar 10 11:50:35 2017 +0100 platform/x86: fujitsu-laptop: only register backlight device if FUJ02B1 is present As the backlight device registered by fujitsu-laptop relies on the FUJ02B1 ACPI device being present, only register the backlight device once that ACPI device is detected. Suggested-by: Alan Jenkins Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-and-tested-by: Jonathan Woithe drivers/platform/x86/fujitsu-laptop.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 1877e267b39eceac0499af11993bfe00819bb65b Author: Michał Kępień Date: Fri Mar 10 11:50:34 2017 +0100 platform/x86: fujitsu-laptop: sync backlight power status in acpi_fujitsu_laptop_add() Registering an ACPI driver does not mean the device it handles has to exist. As the code which syncs backlight power status uses call_fext_func(), it needs the FUJ02E3 ACPI device to be present, so ensure that code is only run once the FUJ02E3 device is detected. Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-and-tested-by: Jonathan Woithe drivers/platform/x86/fujitsu-laptop.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b8d69c16a0bdc2cae1ad709f0a9e6a2484c457a9 Author: Michał Kępień Date: Fri Mar 10 11:50:33 2017 +0100 platform/x86: fujitsu-laptop: register backlight device in a separate function Move code responsible for backlight device registration to a separate function in order to simplify error handling and decrease indentation. Simplify initialization of struct backlight_properties. Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-and-tested-by: Jonathan Woithe drivers/platform/x86/fujitsu-laptop.c | 38 ++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 16 deletions(-) commit d2aa3ae86daca0486da4301702e709b2d519b6cb Author: Michał Kępień Date: Wed Mar 1 07:42:54 2017 +0100 platform/x86: fujitsu-laptop: simplify brightness key event generation logic Returning early when there is no brightness change allows removal of a duplicate code block, makes the purpose of the following code clearer and allows the condition surrounding key event generation to be removed. Local integer variables can also be declared in a single line. Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-and-tested-by: Jonathan Woithe drivers/platform/x86/fujitsu-laptop.c | 40 +++++++++++++---------------------- 1 file changed, 15 insertions(+), 25 deletions(-) commit 5efc800463bc340abf6b5e7abd84f7a9522a428d Author: Michał Kępień Date: Wed Mar 1 07:42:53 2017 +0100 platform/x86: fujitsu-laptop: decrease indentation in acpi_fujitsu_bl_notify() acpi_fujitsu_bl_notify() is pretty deeply nested, which hurts readability. Strip off one level of indentation by returning early when the event code supplied as argument is not ACPI_FUJITSU_NOTIFY_CODE1. Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-and-tested-by: Jonathan Woithe drivers/platform/x86/fujitsu-laptop.c | 64 ++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 31 deletions(-) commit 1f3bc53d843f92d6e7e7cf56ee79acec918e6421 Author: Sven Rebhan Date: Tue Feb 21 20:53:48 2017 +0100 platform/x86: ideapad-laptop: Add IdeaPad 310-15IKB to no_hw_rfkill Like other Lenovo models the IdeaPad 310-15IKB does not have an hw rfkill switch. This results in hard-blocked radios after boot, resulting in always blocked radios rendering them unusable. Add the IdeaPad 310-15IKB to the no_hw_rfkill DMI list and allows using the built-in radios. Signed-off-by: Sven Rebhan [andy: massaged commit message] Signed-off-by: Andy Shevchenko drivers/platform/x86/ideapad-laptop.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 696c6523ec8f2a8f30f3dffef7e382f0fe5c2010 Author: Christian Kellner Date: Tue Feb 28 17:10:57 2017 +0100 platform/x86: thinkpad_acpi: add mapping for new hotkeys The T470, X270 emits new hkey events in the 0x1311 - 0x1315 range. According to the user manual they should launch a user selected favorite application (star icon, 0x1311), snipping tool (0x1312, currently ignored), enable/disable bluetooth (0x1314) and open they keyboard settings (0x1315). The third nibble (0xf00) is used to differentiate between the original hotkeys, the adaptive keyboard codes and the new, additional ones. Signed-off-by: Christian Kellner Reviewed-by: Hans de Goede Acked-by: Henrique de Moraes Holschuh Signed-off-by: Andy Shevchenko drivers/platform/x86/thinkpad_acpi.c | 91 +++++++++++++++++++++++++++++++----- 1 file changed, 79 insertions(+), 12 deletions(-) commit 149c8c75b38be528b8648d907195f188bc8fb0fb Author: Christian Kellner Date: Tue Feb 28 17:10:56 2017 +0100 platform/x86: thinkpad_acpi: guard generic hotkey case Currently when dispatching hotkeys we check if the scancode is in the range of 0 and TPACPI_HOTKEY_MAP_LEN, although the bottom 20 entries in the hotkey keymap are already adaptive keycodes. Therefore we introduce a TP_ACPI_HOTKEYSCAN_ADAPTIVE_START and ensure that we are in the range 0 and ADAPTIVE_START for the generic keycode case. Signed-off-by: Christian Kellner Reviewed-by: Hans de Goede Acked-by: Henrique de Moraes Holschuh Signed-off-by: Andy Shevchenko drivers/platform/x86/thinkpad_acpi.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit faf667efdbe5f6c8d6962aab8680680838678097 Author: Michał Kępień Date: Fri Feb 24 11:33:09 2017 +0100 platform/x86: intel-hid: remove redundant set_bit() call Remove redundant set_bit() call for KEY_RFKILL as it is already made by sparse_keymap_setup() due to KEY_RFKILL being assigned to event code 8 in intel_hid_keymap. Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-and-tested-by: Alex Hung drivers/platform/x86/intel-hid.c | 1 - 1 file changed, 1 deletion(-) commit 175cc9b72fb5ca65dfb79e7c2500304476486717 Author: Michał Kępień Date: Fri Feb 24 11:33:08 2017 +0100 platform/x86: intel-hid: use devm_input_allocate_device() for HID events input device intel_hid_input_setup() is only called from the platform driver's .probe callback. Use the devm variant of input_allocate_device() for allocating memory for the HID events input device in order to simplify two error paths and get rid of intel_hid_input_destroy(). Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-and-tested-by: Alex Hung drivers/platform/x86/intel-hid.c | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) commit 99a75e7b05c764b82a1ba4b632c66d1b58b8fff7 Author: Michał Kępień Date: Fri Feb 24 11:33:07 2017 +0100 platform/x86: intel-hid: make intel_hid_set_enable() take a boolean argument As the integer value passed to intel_hid_set_enable() is always explicitly passed and is used solely as a boolean value, make it a bool. Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-and-tested-by: Alex Hung drivers/platform/x86/intel-hid.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 93ed249075599497fa0667d1b9873d66831fd0e0 Author: Michał Kępień Date: Fri Feb 24 11:33:06 2017 +0100 platform/x86: intel-hid: simplify enabling/disabling HID events ACPI method HDSM takes a single integer argument. Use acpi_execute_simple_method() instead of acpi_evaluate_object() for calling that ACPI method to simplify code and reduce the number of local variables inside intel_hid_set_enable(). Signed-off-by: Michał Kępień Signed-off-by: Andy Shevchenko Reviewed-and-tested-by: Alex Hung drivers/platform/x86/intel-hid.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4f4555cfe704913ce4ce836ab2707825d784a7cc Author: Li Jun Date: Tue Mar 7 10:35:01 2017 +0800 usb: chipidea: udc: update gadget state after bus resume Gadget state is set to be suspended when bus suspened, but not updated after resume, this patch saves the gadget state before suspend and restores it after resume. Signed-off-by: Li Jun Signed-off-by: Peter Chen drivers/usb/chipidea/ci.h | 2 ++ drivers/usb/chipidea/udc.c | 21 +++++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) commit 9c233760a65cec0c98df7b62bc5185d8889e5fc7 Merge: 6796b12 a452165 Author: Dave Airlie Date: Wed Mar 15 11:32:01 2017 +1000 Merge tag 'drm-misc-next-2017-03-12' of git://anongit.freedesktop.org/git/drm-misc into drm-next More drm-misc stuff for 4.12: - drm_platform removal from Laurent - more dw-hdmi bridge driver updates (Laurent, Kieran, Neil) - more header cleanup and documentation - more drm_debugs_remove_files removal (Noralf) - minor qxl updates (Gerd) - edp crc support in helper + analogix_dp (Tomeu) for more igt testing! - old/new iterator roll-out (Maarten) - new bridge drivers: lvds (Laurent), megachips-something (Peter Senna) * tag 'drm-misc-next-2017-03-12' of git://anongit.freedesktop.org/git/drm-misc: (51 commits) drm: bridge: dw-hdmi: Move the driver to a separate directory. drm: bridge: dw-hdmi: Switch to regmap for register access drm: bridge: dw-hdmi: Remove device type from platform data drm: bridge: dw-hdmi: Add support for custom PHY configuration drm: bridge: dw-hdmi: Create PHY operations drm: bridge: dw-hdmi: Fix the PHY power up sequence drm: bridge: dw-hdmi: Fix the PHY power down sequence drm: bridge: dw-hdmi: Enable CSC even for DVI drm: bridge: dw-hdmi: Move CSC configuration out of PHY code drm: bridge: dw-hdmi: Remove unused functions drm: Extract drm_file.h drm: Remove DRM_MINOR_CNT drm: rename drm_fops.c to drm_file.c drm/doc: document fallback behaviour for atomic events drm: Remove drmP.h include from drm_kms_helper_common.c drm: Extract drm_pci.h drm: Move drm_lock_data out of drmP.h drm: Extract drm_prime.h drm/doc: Add todo about connector_list_iter drm/qxl: Remove qxl_debugfs_remove_files() ... commit d60be2ca9c42e127702a8fd556d696b101f3c09b Author: Shannon Nelson Date: Tue Jan 24 10:23:58 2017 -0800 i40e: fix up recent proxy and wol bits for X722_SUPPORT Some opcodes added & reordered to be in numerical order with the rest of the opcodes. This patch adds admin queue structs to support Wake on LAN feature for X722. Signed-off-by: Shannon Nelson Signed-off-by: Carolyn Wyborny Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 65 +++++++++++++++++++++- .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 65 +++++++++++++++++++++- 2 files changed, 128 insertions(+), 2 deletions(-) commit 96a39aed25e6559b160786117df124084feb9080 Author: Aaron Salter Date: Fri Dec 2 12:33:02 2016 -0800 i40e: Acquire NVM lock before reads on all devices Acquire NVM lock before reads on all devices. Previously, locks were only used for X722 and later. Fixes an issue where simultaneous X710 NVM accesses were interfering with each other. Change-ID: If570bb7acf958cef58725ec2a2011cead6f80638 Signed-off-by: Aaron Salter Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_nvm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 9ded9b0fa8dc3d039ded0f5a0bdc3f82eb4b9259 Author: Martin Blumenstingl Date: Sat Mar 4 10:52:13 2017 +0100 ARM64: dts: meson-gxl: improve support for the P212 reference design The Amlogic P212 reference design is used by other devices as well, such as (for example) the Khadas VIM boards. Thus this patch adds and moves all common entries from meson-gxl-s905x-p212.dts to a new, separate meson-gxl-s905x-p212.dtsi (which can be re-used on boards such as the Khadas VIM). Support for all boards based on the P212 reference design includes: - enabling IR support - enabling the SAR ADC (SARADC_CH1 is connected to a resistor which indicates the hardware revision, a similar design is found on the Khadas VIM boards) - all MMC controllers (which means that SDIO wifi, the SD card and the eMMC are now supported) - pwm_ef as dependency for the SDIO wifi modules - uart_A which is connected to the bluetooth module (the bluetooth module itself is not enabled yet due to missing devicetree bindings for the Broadcom serial bluetooth devices) - uart_AO is moved to the .dtsi (as all known devices use it as their boot-console) Specific to the P212 board: - this also enables the CVBS connector (which is not available on the Khadas VIM boards for example) - Realtek based SDIO wifi (instead of Broadcom which most other devices use) Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Tested-by: Kevin Hilman Signed-off-by: Kevin Hilman .../boot/dts/amlogic/meson-gxl-s905x-p212.dts | 21 +-- .../boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 173 +++++++++++++++++++++ 2 files changed, 185 insertions(+), 9 deletions(-) commit 3cdf2f800b09850bf2d185f3673b9b3899691ea5 Author: Tony Lindgren Date: Tue Mar 14 13:13:20 2017 -0700 ARM: OMAP2+: Make hwmod clkdm_name const This can be const, and will need to be const when we start initializing it from clkdm data. Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca5339b18c6b0a94d869ef72861bc8423c788ad0 Author: Tony Lindgren Date: Tue Mar 14 13:13:19 2017 -0700 ARM: OMAP2+: Remove unused CLOCKACT_TEST_ICLK This is not used so let's remove it. Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod.c | 2 +- arch/arm/mach-omap2/omap_hwmod.h | 1 - arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 1 - arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 4 ---- arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 2 -- arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 2 -- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 1 - 7 files changed, 1 insertion(+), 12 deletions(-) commit b8e1bddc9826c08ba479a785ea3c212ed6f54ef8 Author: Tony Lindgren Date: Tue Mar 14 13:13:19 2017 -0700 ARM: OMAP2+: Use list_for_each_entry for hwmod slave_ports We are just iterating over the slave_ports lists, so we can use list_for_each_entry() no problem. Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod.c | 83 +++++----------------------------------- 1 file changed, 10 insertions(+), 73 deletions(-) commit a1e312355d41cd63b9f47081ade9168eedc4574d Author: Tony Lindgren Date: Tue Mar 14 13:13:19 2017 -0700 ARM: OMAP2+: Remove mostly unused hwmod linkspace We want to be able to dynamically allocate struct omap_hwmod_ocp_if and struct omap_hwmod at device driver probe time based on .dts data. Current setup with the linkspace using memblock_virt_alloc() makes this tricky, so let's get rid of struct linkspace and directly set up struct omap_hwmod_ocp_if as the master and slave lists. As we are currently not using the master_ports either, let's remove it too. And let's add the struct omap_hwmod_ocp_if node directly to the slave_ports list. Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod.c | 116 +-------------------------------------- arch/arm/mach-omap2/omap_hwmod.h | 13 +---- 2 files changed, 4 insertions(+), 125 deletions(-) commit a26356ab9392e0c5f8ad87d76c42e7c58c036d24 Author: Thomas Petazzoni Date: Tue Feb 28 15:31:16 2017 +0100 of/pci: Remove unused MSI controller helpers All users of the small MSI controller API have been migrated to use the generic MSI infrastructure instead. We no longer need a global chained list of msi_controller. Instead, MSI controllers are now represented as IRQ domains attached to OF nodes, and the resolution between a device requesting an MSI and the corresponding MSI controller is done by the generic interrupt resolution logic. Therefore, this API is now completely useless, and can be removed from the kernel. Signed-off-by: Thomas Petazzoni Signed-off-by: Bjorn Helgaas Acked-by: Marc Zyngier Acked-by: Rob Herring drivers/of/of_pci.c | 45 --------------------------------------------- include/linux/of_pci.h | 11 ----------- 2 files changed, 56 deletions(-) commit 393bf9b38ad3f29c6663e8e76fce4f034e6ef673 Author: Thomas Petazzoni Date: Tue Feb 28 15:31:15 2017 +0100 PCI: mvebu: Remove useless MSI enabling code Since commit fcc392d501bd2 ("irqchip/armada-370-xp: Use the generic MSI infrastructure"), the irqchip driver used on Armada 370, XP, 375, 38x, 39x for the MPIC interrupt controller has been converted to use the generic MSI infrastructure. Since this commit, it is no longer registering an msi_controller structure with the of_pci_msi_chip_add() function. Therefore, having the PCI driver used on the same platform calling of_pci_find_msi_chip_by_node() is pretty useless. The MSI resolution is now done in the generic interrupt resolution code, since the MSI controller is an irq domain attached to the interrupt controller node, which is pointed to by the msi-parent DT property in the PCIe controller node. Signed-off-by: Thomas Petazzoni Signed-off-by: Bjorn Helgaas Acked-by: Marc Zyngier drivers/pci/host/pci-mvebu.c | 17 ----------------- 1 file changed, 17 deletions(-) commit f21a8b1b68379c116a6d55821f5f6024ce4f3a48 Author: Thomas Petazzoni Date: Tue Feb 28 15:31:14 2017 +0100 PCI: aardvark: Move to MSI handling using generic MSI support The MSI support introduced with the initial Aardvark driver was based on the msi_controller structure and the of_pci_msi_chip_add() / of_pci_find_msi_chip_by_node() API, which are being deprecated in favor of the generic MSI support. Update the Aardvark driver to use the generic MSI support. Signed-off-by: Thomas Petazzoni Signed-off-by: Bjorn Helgaas Acked-by: Marc Zyngier drivers/pci/host/pci-aardvark.c | 173 ++++++++++++++++------------------------ 1 file changed, 67 insertions(+), 106 deletions(-) commit 50b2b540c00941ced618df9deafccc30826b13b5 Author: Adrian Hunter Date: Tue Mar 14 15:21:58 2017 +0200 PCI/PM: Don't sleep at all when d3_delay or d3cold_delay is zero msleep() still sleeps 1 jiffy even when told to sleep for zero milliseconds. That can end up being 1-2 milliseconds or more. In the cases of d3_delay and d3cold_delay, that unnecessarily increases suspend and/or resume latencies. Do not sleep at all for the respective cases if d3_delay is zero or d3cold_delay is zero. Signed-off-by: Adrian Hunter Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki drivers/pci/pci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9c79ddaa0f962d1f26537a670b0652ff509a6fe0 Author: Mintz, Yuval Date: Tue Mar 14 16:23:54 2017 +0200 qed*: Add support for QL41xxx adapters This adds the necessary infrastructure changes for initializing and working with the new series of QL41xxx adapaters. It also adds 2 new PCI device-IDs to qede: - 0x8070 for QL41xxx PFs - 0x8090 for VFs spawning from QL41xxx PFs Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 29 +++- drivers/net/ethernet/qlogic/qed/qed_debug.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_dev.c | 186 ++++++++++++++++---- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 61 +++++-- drivers/net/ethernet/qlogic/qed/qed_l2.c | 184 ++++++++++++-------- drivers/net/ethernet/qlogic/qed/qed_main.c | 7 +- drivers/net/ethernet/qlogic/qed/qed_mcp.h | 9 +- drivers/net/ethernet/qlogic/qed/qed_ptp.c | 12 +- drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 17 +- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 30 +++- drivers/net/ethernet/qlogic/qede/qede.h | 43 +++-- drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 85 +++++---- drivers/net/ethernet/qlogic/qede/qede_main.c | 222 +++++++++++++----------- include/linux/qed/qed_if.h | 48 +++-- include/linux/qed/rdma_common.h | 3 +- 15 files changed, 630 insertions(+), 308 deletions(-) commit 5f6bee34707973ea7879a7857fd63ddccc92fff3 Author: Naveen N. Rao Date: Wed Mar 8 22:34:15 2017 +0530 kprobes: Convert kprobe_exceptions_notify to use NOKPROBE_SYMBOL commit fc62d0207ae0 ("kprobes: Introduce weak variant of kprobe_exceptions_notify()") used the __kprobes annotation to exclude kprobe_exceptions_notify from being probed. Since NOKPROBE_SYMBOL() is a better way to do this enabling the symbol to be discovered as being blacklisted, change over to using NOKPROBE_SYMBOL(). Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Link: http://lkml.kernel.org/r/3f25bf400da5c222cd9b10eec6ded2d6b58209f8.1488991670.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo kernel/kprobes.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c1ac094d5061e757624a47217d2195ba24a75450 Author: Naveen N. Rao Date: Wed Mar 8 22:34:14 2017 +0530 doc: trace/kprobes: add information about NOKPROBE_SYMBOL Update kprobe tracer documentation to also mention that NOKPROBE_SYMBOL() and nokprobe_inline add symbols to the kprobes blacklist. Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Link: http://lkml.kernel.org/r/d924e20de099579ace4286e610304f054cd798db.1488991670.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo Documentation/trace/kprobetrace.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 44ca9341f65295c56e904cce4c84f5778f5c8537 Author: Naveen N. Rao Date: Wed Mar 8 13:56:10 2017 +0530 perf powerpc: Choose local entry point with kretprobes perf now uses an offset from _text/_stext for kretprobes if the kernel supports it, rather than the actual function name. As such, let's choose the LEP for powerpc ABIv2 so as to ensure the probe gets hit. Do it only if the kernel supports specifying offsets with kretprobes. Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Steven Rostedt Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/7445b5334673ef5404ac1d12609bad4d73d2b567.1488961018.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/powerpc/util/sym-handling.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 7ab31d94bff96f4f80b38dc5147622b9f3889ac6 Author: Naveen N. Rao Date: Wed Mar 8 13:56:09 2017 +0530 perf kretprobes: Offset from reloc_sym if kernel supports it We indicate support for accepting sym+offset with kretprobes through a line in ftrace README. Parse the same to identify support and choose the appropriate format for kprobe_events. As an example, without this perf patch, but with the ftrace changes: naveen@ubuntu:~/linux/tools/perf$ sudo cat /sys/kernel/debug/tracing/README | grep kretprobe place (kretprobe): [:][+]| naveen@ubuntu:~/linux/tools/perf$ naveen@ubuntu:~/linux/tools/perf$ sudo ./perf probe -v do_open%return probe-definition(0): do_open%return symbol:do_open file:(null) line:0 offset:0 return:1 lazy:(null) 0 arguments Looking at the vmlinux_path (8 entries long) Using /boot/vmlinux for symbols Open Debuginfo file: /boot/vmlinux Try to find probe point from debuginfo. Matched function: do_open [2d0c7d8] Probe point found: do_open+0 Matched function: do_open [35d76b5] found inline addr: 0xc0000000004ba984 Failed to find "do_open%return", because do_open is an inlined function and has no return point. An error occurred in debuginfo analysis (-22). Trying to use symbols. Opening /sys/kernel/debug/tracing//kprobe_events write=1 Writing event: r:probe/do_open do_open+0 Writing event: r:probe/do_open_1 do_open+0 Added new events: probe:do_open (on do_open%return) probe:do_open_1 (on do_open%return) You can now use it in all perf tools, such as: perf record -e probe:do_open_1 -aR sleep 1 naveen@ubuntu:~/linux/tools/perf$ sudo cat /sys/kernel/debug/kprobes/list c000000000041370 k kretprobe_trampoline+0x0 [OPTIMIZED] c0000000004433d0 r do_open+0x0 [DISABLED] c0000000004433d0 r do_open+0x0 [DISABLED] And after this patch (and the subsequent powerpc patch): naveen@ubuntu:~/linux/tools/perf$ sudo ./perf probe -v do_open%return probe-definition(0): do_open%return symbol:do_open file:(null) line:0 offset:0 return:1 lazy:(null) 0 arguments Looking at the vmlinux_path (8 entries long) Using /boot/vmlinux for symbols Open Debuginfo file: /boot/vmlinux Try to find probe point from debuginfo. Matched function: do_open [2d0c7d8] Probe point found: do_open+0 Matched function: do_open [35d76b5] found inline addr: 0xc0000000004ba984 Failed to find "do_open%return", because do_open is an inlined function and has no return point. An error occurred in debuginfo analysis (-22). Trying to use symbols. Opening /sys/kernel/debug/tracing//README write=0 Opening /sys/kernel/debug/tracing//kprobe_events write=1 Writing event: r:probe/do_open _text+4469712 Writing event: r:probe/do_open_1 _text+4956248 Added new events: probe:do_open (on do_open%return) probe:do_open_1 (on do_open%return) You can now use it in all perf tools, such as: perf record -e probe:do_open_1 -aR sleep 1 naveen@ubuntu:~/linux/tools/perf$ sudo cat /sys/kernel/debug/kprobes/list c000000000041370 k kretprobe_trampoline+0x0 [OPTIMIZED] c0000000004433d0 r do_open+0x0 [DISABLED] c0000000004ba058 r do_open+0x8 [DISABLED] Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Steven Rostedt Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/496ef9f33c1ab16286ece9dd62aa672807aef91c.1488961018.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-event.c | 12 +++++------- tools/perf/util/probe-file.c | 7 +++++++ tools/perf/util/probe-file.h | 1 + 3 files changed, 13 insertions(+), 7 deletions(-) commit 3da3ea7a8e205edc24b9491a459b46527c70b5b1 Author: Naveen N. Rao Date: Wed Mar 8 13:56:08 2017 +0530 perf probe: Factor out the ftrace README scanning Simplify and separate out the ftrace README scanning logic into a separate helper. This is used subsequently to scan for all patterns of interest and to cache the result. Since we are only interested in availability of probe argument type x, we will only scan for that. Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Steven Rostedt Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/6dc30edc747ba82a236593be6cf3a046fa9453b5.1488961018.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-file.c | 70 +++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 33 deletions(-) commit 292c4a8f985b35b3738d5900fe256c4fed4cd3f5 Author: Brendan Gregg Date: Tue Mar 14 01:56:29 2017 +0000 perf sched timehist: Add --next option The --next option shows the next task for each context switch, providing more context for the sequence of scheduler events. $ perf sched timehist --next | head Samples do not have callchains. time cpu task name waittime schdelay run time [tid/pid] (msec) (msec) (msec) ---------- --- ---------- --------- ------ ----- 374.793792 [0] 0.000 0.000 0.000 next: rngd[1524] 374.793801 [0] rngd[1524] 0.000 0.000 0.009 next: swapper/0[0] 374.794048 [7] 0.000 0.000 0.000 next: yes[30884] 374.794066 [7] yes[30884] 0.000 0.000 0.018 next: swapper/7[0] 374.794126 [2] 0.000 0.000 0.000 next: rngd[1524] 374.794140 [2] rngd[1524] 0.325 0.006 0.013 next: swapper/2[0] 374.794281 [3] 0.000 0.000 0.000 next: perf[31070] Signed-off-by: Brendan Gregg Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1489456589-32555-1-git-send-email-bgregg@netflix.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-sched.txt | 4 ++++ tools/perf/builtin-sched.c | 25 ++++++++++++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) commit d890a98c9217892575761d0c1311c41612844c4d Author: Hari Bathini Date: Wed Mar 8 02:12:13 2017 +0530 perf tools: Add 'cgroup_id' sort order keyword This patch introduces a cgroup identifier entry field in perf report to identify or distinguish data of different cgroups. It uses the device number and inode number of cgroup namespace, included in perf data with the new PERF_RECORD_NAMESPACES event, as cgroup identifier. With the assumption that each container is created with it's own cgroup namespace, this allows assessment/analysis of multiple containers at once. A simple test for this would be to clone a few processes passing SIGCHILD & CLONE_NEWCROUP flags to each of them, execute shell and run different workloads on each of those contexts, while running perf record command with --namespaces option. Shown below is the output of perf report, sorted with cgroup identifier, on perf.data generated with the above test scenario, clearly indicating one context's considerable use of kernel memory in comparison with others: $ perf report -s cgroup_id,sample --stdio # # Total Lost Samples: 0 # # Samples: 5K of event 'kmem:kmalloc' # Event count (approx.): 5965 # # Overhead cgroup id (dev/inode) Samples # ........ ..................... ............ # 81.27% 3/0xeffffffb 4848 16.24% 3/0xf00000d0 969 1.16% 3/0xf00000ce 69 0.82% 3/0xf00000cf 49 0.50% 0/0x0 30 While this is a start, there is further scope of improving this. For example, instead of cgroup namespace's device and inode numbers, dev and inode numbers of some or all namespaces may be used to distinguish which processes are running in a given container context. Also, scripts to map device and inode info to containers sounds plausible for better tracing of containers. Signed-off-by: Hari Bathini Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Ananth N Mavinakayanahalli Cc: Aravinda Prasad Cc: Brendan Gregg Cc: Daniel Borkmann Cc: Eric Biederman Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Sargun Dhillon Cc: Steven Rostedt Link: http://lkml.kernel.org/r/148891933338.25309.756882900782042645.stgit@hbathini.in.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-report.txt | 4 +++- tools/perf/util/hist.c | 7 ++++++ tools/perf/util/hist.h | 1 + tools/perf/util/sort.c | 41 ++++++++++++++++++++++++++++++++ tools/perf/util/sort.h | 7 ++++++ 5 files changed, 59 insertions(+), 1 deletion(-) commit 96a44bbccdd8ff263829d42fe934e6094ea5bb20 Author: Hari Bathini Date: Wed Mar 8 02:12:06 2017 +0530 perf script: Add script print support for namespace events Introduce a new option to display events of type PERF_RECORD_NAMESPACES and update perf-script documentation accordingly. Shown below is output (trimmed) of perf script command with the newly introduced option, on perf.data generated with perf record command using --namespaces option. $ perf script --show-namespace-events swapper 0 [000] 0.000000: PERF_RECORD_NAMESPACES 1/1 - nr_namespaces: 7 [0/net: 3/0xf000001c, 1/uts: 3/0xeffffffe, 2/ipc: 3/0xefffffff, 3/pid: 3/0xeffffffc, 4/user: 3/0xeffffffd, 5/mnt: 3/0xf0000000, 6/cgroup: 3/0xeffffffb] swapper 0 [000] 0.000000: PERF_RECORD_NAMESPACES 2/2 - nr_namespaces: 7 [0/net: 3/0xf000001c, 1/uts: 3/0xeffffffe, 2/ipc: 3/0xefffffff, 3/pid: 3/0xeffffffc, 4/user: 3/0xeffffffd, 5/mnt: 3/0xf0000000, 6/cgroup: 3/0xeffffffb] Commiter notes: Testing it: Investigating that double PERF_RECORD_NAMESPACES for the 19155 pid/tid... Its more than that, there are two PERF_RECORD_COMM as well, and with zeroed timestamps, so probably a synthesizing artifact... # perf script --show-task --show-namespace perf 0 [000] 0.000000: PERF_RECORD_COMM: perf:19154/19154 perf 0 [000] 0.000000: PERF_RECORD_FORK(19155:19155):(19154:19154) perf 0 [000] 0.000000: PERF_RECORD_NAMESPACES 19155/19155 - nr_namespaces: 7 [0/net: 3/0xf0000081, 1/uts: 3/0xeffffffe, 2/ipc: 3/0xefffffff, 3/pid: 3/0xeffffffc, 4/user: 3/0xeffffffd, 5/mnt: 3/0xf0000000, 6/cgroup: 3/0xeffffffb] perf 0 [000] 0.000000: PERF_RECORD_COMM: perf:19155/19155 perf 0 [000] 0.000000: PERF_RECORD_COMM: perf:19155/19155 perf 0 [000] 0.000000: PERF_RECORD_NAMESPACES 19155/19155 - nr_namespaces: 7 [0/net: 3/0xf0000081, 1/uts: 3/0xeffffffe, 2/ipc: 3/0xefffffff, 3/pid: 3/0xeffffffc, 4/user: 3/0xeffffffd, 5/mnt: 3/0xf0000000, 6/cgroup: 3/0xeffffffb] swapper 0 [000] 3110.881834: 1 cycles: ffffffffa7060bf6 native_write_msr (/lib/modules/4.11.0-rc1+/build/vmlinux) Signed-off-by: Hari Bathini Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Ananth N Mavinakayanahalli Cc: Aravinda Prasad Cc: Brendan Gregg Cc: Daniel Borkmann Cc: Eric Biederman Cc: Peter Zijlstra Cc: Sargun Dhillon Cc: Steven Rostedt Link: http://lkml.kernel.org/r/148891932627.25309.1941587059154176221.stgit@hbathini.in.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 3 +++ tools/perf/builtin-script.c | 40 ++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) commit e907caf3a07ee42ef08ba689a436fd1eb99fbf62 Author: Hari Bathini Date: Wed Mar 8 02:11:51 2017 +0530 perf record: Synthesize namespace events for current processes Synthesize PERF_RECORD_NAMESPACES events for processes that were running prior to invocation of perf record. The data for this is taken from /proc/$PID/ns. These changes make way for analyzing events with regard to namespaces. Committer notes: Check if 'tool' is NULL in perf_event__synthesize_namespaces(), as in the test__mmap_thread_lookup case, i.e. 'perf test Lookup mmap thread". Testing it: # ps axH > /tmp/allthreads # perf record -a --namespaces usleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 1.169 MB perf.data (8 samples) ] # perf report -D | grep PERF_RECORD_NAMESPACES | wc -l 602 # wc -l /tmp/allthreads 601 /tmp/allthreads # tail /tmp/allthreads 16951 pts/4 T 0:00 git rebase -i a033bf1bfacdaa25642e6bcc857a7d0f67cc3c92^ 16952 pts/4 T 0:00 /bin/sh /usr/libexec/git-core/git-rebase -i a033bf1bfacdaa25642e6bcc857a7d0f67cc3c92^ 17176 pts/4 T 0:00 git commit --amend --no-post-rewrite 17204 pts/4 T 0:00 vim /home/acme/git/linux/.git/COMMIT_EDITMSG 18939 ? S 0:00 [kworker/2:1] 18947 ? S 0:00 [kworker/3:0] 18974 ? S 0:00 [kworker/1:0] 19047 ? S 0:00 [kworker/0:1] 19152 pts/6 S+ 0:00 weechat 19153 pts/7 R+ 0:00 ps axH # perf report -D | grep PERF_RECORD_NAMESPACES | tail 0 0 0x125068 [0xa0]: PERF_RECORD_NAMESPACES 17176/17176 - nr_namespaces: 7 0 0 0x1255b8 [0xa0]: PERF_RECORD_NAMESPACES 17204/17204 - nr_namespaces: 7 0 0 0x125df0 [0xa0]: PERF_RECORD_NAMESPACES 18939/18939 - nr_namespaces: 7 0 0 0x125f00 [0xa0]: PERF_RECORD_NAMESPACES 18947/18947 - nr_namespaces: 7 0 0 0x126010 [0xa0]: PERF_RECORD_NAMESPACES 18974/18974 - nr_namespaces: 7 0 0 0x126120 [0xa0]: PERF_RECORD_NAMESPACES 19047/19047 - nr_namespaces: 7 0 0 0x126230 [0xa0]: PERF_RECORD_NAMESPACES 19152/19152 - nr_namespaces: 7 0 0 0x129330 [0xa0]: PERF_RECORD_NAMESPACES 19154/19154 - nr_namespaces: 7 0 0 0x12a1f8 [0xa0]: PERF_RECORD_NAMESPACES 19155/19155 - nr_namespaces: 7 0 0 0x12b0b8 [0xa0]: PERF_RECORD_NAMESPACES 19155/19155 - nr_namespaces: 7 # Humm, investigate why we got two record for the 19155 pid/tid... Signed-off-by: Hari Bathini Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Ananth N Mavinakayanahalli Cc: Aravinda Prasad Cc: Brendan Gregg Cc: Daniel Borkmann Cc: Eric Biederman Cc: Peter Zijlstra Cc: Sargun Dhillon Cc: Steven Rostedt Link: http://lkml.kernel.org/r/148891931111.25309.11073854609798681633.stgit@hbathini.in.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 29 ++++++++++++-- tools/perf/util/event.c | 94 ++++++++++++++++++++++++++++++++++++++++++--- tools/perf/util/event.h | 6 +++ 3 files changed, 119 insertions(+), 10 deletions(-) commit f78271dfb77353c4d045f9735deebe21839fb2ed Author: Masahiro Yamada Date: Sun Jan 22 23:02:32 2017 +0900 kbuild: drop unneeded patterns '.*.orig' and '.*.rej' from distclean The patterns '.*.orig' and '.*.rej' are cleaned away by '*.orig' and '*.rej' seen two lines above. Signed-off-by: Masahiro Yamada Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e13b73dd9c8003993b171173ba803363faf74238 Author: Dmitry Safonov Date: Tue Mar 14 14:41:26 2017 +0300 x86/hugetlb: Adjust to the new native/compat mmap bases Commit 1b028f784e8c introduced two mmap() bases for 32-bit syscalls and for 64-bit syscalls. The mmap() code in x86 was modified to handle the separation, but the patch series missed to update the hugetlb code. As a consequence a 32bit application mapping a file on hugetlbfs uses the 64-bit mmap base for address space allocation, which fails. Adjust the hugetlb mapping code to use the proper bases depending on the syscall invocation mode (64-bit or compat). [ tglx: Massaged changelog and switched from asm/compat.h to linux/compat.h ] Fixes: commit 1b028f784e8c ("x86/mm: Introduce mmap_compat_base() for 32-bit mmap()") Reported-by: kernel test robot Signed-off-by: Dmitry Safonov Cc: 0x7f454c46@gmail.com Cc: linux-mm@kvack.org Cc: Andy Lutomirski Cc: Cyrill Gorcunov Cc: Borislav Petkov Cc: "Kirill A. Shutemov" Link: http://lkml.kernel.org/r/20170314114126.9280-1-dsafonov@virtuozzo.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/elf.h | 1 + arch/x86/kernel/sys_x86_64.c | 12 ------------ arch/x86/mm/hugetlbpage.c | 9 ++++++--- arch/x86/mm/mmap.c | 14 ++++++++++++++ 4 files changed, 21 insertions(+), 15 deletions(-) commit f3b3614a284deb124018155a618a7b19694c8b5c Author: Hari Bathini Date: Wed Mar 8 02:11:43 2017 +0530 perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info Introduce a new option to record PERF_RECORD_NAMESPACES events emitted by the kernel when fork, clone, setns or unshare are invoked. And update perf-record documentation with the new option to record namespace events. Committer notes: Combined it with a later patch to allow printing it via 'perf report -D' and be able to test the feature introduced in this patch. Had to move here also perf_ns__name(), that was introduced in another later patch. Also used PRIu64 and PRIx64 to fix the build in some enfironments wrt: util/event.c:1129:39: error: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type 'long long unsigned int' [-Werror=format=] ret += fprintf(fp, "%u/%s: %lu/0x%lx%s", idx ^ Testing it: # perf record --namespaces -a ^C[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 1.083 MB perf.data (423 samples) ] # # perf report -D 3 2028902078892 0x115140 [0xa0]: PERF_RECORD_NAMESPACES 14783/14783 - nr_namespaces: 7 [0/net: 3/0xf0000081, 1/uts: 3/0xeffffffe, 2/ipc: 3/0xefffffff, 3/pid: 3/0xeffffffc, 4/user: 3/0xeffffffd, 5/mnt: 3/0xf0000000, 6/cgroup: 3/0xeffffffb] 0x1151e0 [0x30]: event: 9 . . ... raw event: size 48 bytes . 0000: 09 00 00 00 02 00 30 00 c4 71 82 68 0c 7f 00 00 ......0..q.h.... . 0010: a9 39 00 00 a9 39 00 00 94 28 fe 63 d8 01 00 00 .9...9...(.c.... . 0020: 03 00 00 00 00 00 00 00 ce c4 02 00 00 00 00 00 ................ NAMESPACES events: 1 # Signed-off-by: Hari Bathini Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Ananth N Mavinakayanahalli Cc: Aravinda Prasad Cc: Brendan Gregg Cc: Daniel Borkmann Cc: Eric Biederman Cc: Peter Zijlstra Cc: Sargun Dhillon Cc: Steven Rostedt Link: http://lkml.kernel.org/r/148891930386.25309.18412039920746995488.stgit@hbathini.in.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/perf_event.h | 32 +++++++++++++++++- tools/perf/Documentation/perf-record.txt | 3 ++ tools/perf/builtin-annotate.c | 1 + tools/perf/builtin-diff.c | 1 + tools/perf/builtin-inject.c | 13 ++++++++ tools/perf/builtin-kmem.c | 1 + tools/perf/builtin-kvm.c | 2 ++ tools/perf/builtin-lock.c | 1 + tools/perf/builtin-mem.c | 1 + tools/perf/builtin-record.c | 6 ++++ tools/perf/builtin-report.c | 1 + tools/perf/builtin-sched.c | 1 + tools/perf/builtin-script.c | 1 + tools/perf/builtin-trace.c | 3 +- tools/perf/perf.h | 1 + tools/perf/util/Build | 1 + tools/perf/util/data-convert-bt.c | 1 + tools/perf/util/event.c | 56 ++++++++++++++++++++++++++++++++ tools/perf/util/event.h | 13 ++++++++ tools/perf/util/evsel.c | 3 ++ tools/perf/util/machine.c | 34 +++++++++++++++++++ tools/perf/util/machine.h | 3 ++ tools/perf/util/namespaces.c | 36 ++++++++++++++++++++ tools/perf/util/namespaces.h | 26 +++++++++++++++ tools/perf/util/session.c | 7 ++++ tools/perf/util/thread.c | 44 +++++++++++++++++++++++-- tools/perf/util/thread.h | 6 ++++ tools/perf/util/tool.h | 2 ++ 28 files changed, 296 insertions(+), 4 deletions(-) commit bd784b7cc41af7a19cfb705fa6d800e511c4ab02 Author: Chris Wilson Date: Tue Mar 14 11:50:19 2017 +0000 drm/i915: Avoid rcu_barrier() from reclaim paths (shrinker) The rcu_barrier() takes the cpu_hotplug mutex which itself is not reclaim-safe, and so rcu_barrier() is illegal from inside the shrinker. [ 309.661373] ========================================================= [ 309.661376] [ INFO: possible irq lock inversion dependency detected ] [ 309.661380] 4.11.0-rc1-CI-CI_DRM_2333+ #1 Tainted: G W [ 309.661383] --------------------------------------------------------- [ 309.661386] gem_exec_gttfil/6435 just changed the state of lock: [ 309.661389] (rcu_preempt_state.barrier_mutex){+.+.-.}, at: [] _rcu_barrier+0x31/0x160 [ 309.661399] but this lock took another, RECLAIM_FS-unsafe lock in the past: [ 309.661402] (cpu_hotplug.lock){+.+.+.} [ 309.661404] and interrupts could create inverse lock ordering between them. [ 309.661410] other info that might help us debug this: [ 309.661414] Possible interrupt unsafe locking scenario: [ 309.661417] CPU0 CPU1 [ 309.661419] ---- ---- [ 309.661421] lock(cpu_hotplug.lock); [ 309.661425] local_irq_disable(); [ 309.661432] lock(rcu_preempt_state.barrier_mutex); [ 309.661441] lock(cpu_hotplug.lock); [ 309.661446] [ 309.661448] lock(rcu_preempt_state.barrier_mutex); [ 309.661453] *** DEADLOCK *** [ 309.661460] 4 locks held by gem_exec_gttfil/6435: [ 309.661464] #0: (sb_writers#10){.+.+.+}, at: [] vfs_write+0x17d/0x1f0 [ 309.661475] #1: (debugfs_srcu){......}, at: [] debugfs_use_file_start+0x41/0xa0 [ 309.661486] #2: (&attr->mutex){+.+.+.}, at: [] simple_attr_write+0x37/0xe0 [ 309.661495] #3: (&dev->struct_mutex){+.+.+.}, at: [] i915_drop_caches_set+0x3a/0x150 [i915] [ 309.661540] the shortest dependencies between 2nd lock and 1st lock: [ 309.661547] -> (cpu_hotplug.lock){+.+.+.} ops: 829 { [ 309.661553] HARDIRQ-ON-W at: [ 309.661560] __lock_acquire+0x5e5/0x1b50 [ 309.661565] lock_acquire+0xc9/0x220 [ 309.661572] __mutex_lock+0x6e/0x990 [ 309.661576] mutex_lock_nested+0x16/0x20 [ 309.661583] get_online_cpus+0x61/0x80 [ 309.661590] kmem_cache_create+0x25/0x1d0 [ 309.661596] debug_objects_mem_init+0x30/0x249 [ 309.661602] start_kernel+0x341/0x3fe [ 309.661607] x86_64_start_reservations+0x2a/0x2c [ 309.661612] x86_64_start_kernel+0x173/0x186 [ 309.661619] verify_cpu+0x0/0xfc [ 309.661622] SOFTIRQ-ON-W at: [ 309.661627] __lock_acquire+0x611/0x1b50 [ 309.661632] lock_acquire+0xc9/0x220 [ 309.661636] __mutex_lock+0x6e/0x990 [ 309.661641] mutex_lock_nested+0x16/0x20 [ 309.661646] get_online_cpus+0x61/0x80 [ 309.661650] kmem_cache_create+0x25/0x1d0 [ 309.661655] debug_objects_mem_init+0x30/0x249 [ 309.661660] start_kernel+0x341/0x3fe [ 309.661664] x86_64_start_reservations+0x2a/0x2c [ 309.661669] x86_64_start_kernel+0x173/0x186 [ 309.661674] verify_cpu+0x0/0xfc [ 309.661677] RECLAIM_FS-ON-W at: [ 309.661682] mark_held_locks+0x6f/0xa0 [ 309.661687] lockdep_trace_alloc+0xb3/0x100 [ 309.661693] kmem_cache_alloc_trace+0x31/0x2e0 [ 309.661699] __smpboot_create_thread.part.1+0x27/0xe0 [ 309.661704] smpboot_create_threads+0x61/0x90 [ 309.661709] cpuhp_invoke_callback+0x9c/0x8a0 [ 309.661713] cpuhp_up_callbacks+0x31/0xb0 [ 309.661718] _cpu_up+0x7a/0xc0 [ 309.661723] do_cpu_up+0x5f/0x80 [ 309.661727] cpu_up+0xe/0x10 [ 309.661734] smp_init+0x71/0xb3 [ 309.661738] kernel_init_freeable+0x94/0x19e [ 309.661743] kernel_init+0x9/0xf0 [ 309.661748] ret_from_fork+0x2e/0x40 [ 309.661752] INITIAL USE at: [ 309.661757] __lock_acquire+0x234/0x1b50 [ 309.661761] lock_acquire+0xc9/0x220 [ 309.661766] __mutex_lock+0x6e/0x990 [ 309.661771] mutex_lock_nested+0x16/0x20 [ 309.661775] get_online_cpus+0x61/0x80 [ 309.661780] __cpuhp_setup_state+0x44/0x170 [ 309.661785] page_alloc_init+0x23/0x3a [ 309.661790] start_kernel+0x124/0x3fe [ 309.661794] x86_64_start_reservations+0x2a/0x2c [ 309.661799] x86_64_start_kernel+0x173/0x186 [ 309.661804] verify_cpu+0x0/0xfc [ 309.661807] } [ 309.661813] ... key at: [] cpu_hotplug+0xb0/0x100 [ 309.661817] ... acquired at: [ 309.661821] lock_acquire+0xc9/0x220 [ 309.661825] __mutex_lock+0x6e/0x990 [ 309.661829] mutex_lock_nested+0x16/0x20 [ 309.661833] get_online_cpus+0x61/0x80 [ 309.661837] _rcu_barrier+0x9f/0x160 [ 309.661841] rcu_barrier+0x10/0x20 [ 309.661847] netdev_run_todo+0x5f/0x310 [ 309.661852] rtnl_unlock+0x9/0x10 [ 309.661856] default_device_exit_batch+0x133/0x150 [ 309.661862] ops_exit_list.isra.0+0x4d/0x60 [ 309.661866] cleanup_net+0x1d8/0x2c0 [ 309.661872] process_one_work+0x1f4/0x6d0 [ 309.661876] worker_thread+0x49/0x4a0 [ 309.661881] kthread+0x107/0x140 [ 309.661884] ret_from_fork+0x2e/0x40 [ 309.661890] -> (rcu_preempt_state.barrier_mutex){+.+.-.} ops: 179 { [ 309.661896] HARDIRQ-ON-W at: [ 309.661901] __lock_acquire+0x5e5/0x1b50 [ 309.661905] lock_acquire+0xc9/0x220 [ 309.661910] __mutex_lock+0x6e/0x990 [ 309.661914] mutex_lock_nested+0x16/0x20 [ 309.661919] _rcu_barrier+0x31/0x160 [ 309.661923] rcu_barrier+0x10/0x20 [ 309.661928] netdev_run_todo+0x5f/0x310 [ 309.661932] rtnl_unlock+0x9/0x10 [ 309.661936] default_device_exit_batch+0x133/0x150 [ 309.661941] ops_exit_list.isra.0+0x4d/0x60 [ 309.661946] cleanup_net+0x1d8/0x2c0 [ 309.661951] process_one_work+0x1f4/0x6d0 [ 309.661955] worker_thread+0x49/0x4a0 [ 309.661960] kthread+0x107/0x140 [ 309.661964] ret_from_fork+0x2e/0x40 [ 309.661968] SOFTIRQ-ON-W at: [ 309.661972] __lock_acquire+0x611/0x1b50 [ 309.661977] lock_acquire+0xc9/0x220 [ 309.661981] __mutex_lock+0x6e/0x990 [ 309.661986] mutex_lock_nested+0x16/0x20 [ 309.661990] _rcu_barrier+0x31/0x160 [ 309.661995] rcu_barrier+0x10/0x20 [ 309.661999] netdev_run_todo+0x5f/0x310 [ 309.662003] rtnl_unlock+0x9/0x10 [ 309.662008] default_device_exit_batch+0x133/0x150 [ 309.662013] ops_exit_list.isra.0+0x4d/0x60 [ 309.662017] cleanup_net+0x1d8/0x2c0 [ 309.662022] process_one_work+0x1f4/0x6d0 [ 309.662027] worker_thread+0x49/0x4a0 [ 309.662031] kthread+0x107/0x140 [ 309.662035] ret_from_fork+0x2e/0x40 [ 309.662039] IN-RECLAIM_FS-W at: [ 309.662043] __lock_acquire+0x638/0x1b50 [ 309.662048] lock_acquire+0xc9/0x220 [ 309.662053] __mutex_lock+0x6e/0x990 [ 309.662058] mutex_lock_nested+0x16/0x20 [ 309.662062] _rcu_barrier+0x31/0x160 [ 309.662067] rcu_barrier+0x10/0x20 [ 309.662089] i915_gem_shrink_all+0x33/0x40 [i915] [ 309.662109] i915_drop_caches_set+0x141/0x150 [i915] [ 309.662114] simple_attr_write+0xc7/0xe0 [ 309.662119] full_proxy_write+0x4f/0x70 [ 309.662124] __vfs_write+0x23/0x120 [ 309.662128] vfs_write+0xc6/0x1f0 [ 309.662133] SyS_write+0x44/0xb0 [ 309.662138] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 309.662142] INITIAL USE at: [ 309.662147] __lock_acquire+0x234/0x1b50 [ 309.662151] lock_acquire+0xc9/0x220 [ 309.662156] __mutex_lock+0x6e/0x990 [ 309.662160] mutex_lock_nested+0x16/0x20 [ 309.662165] _rcu_barrier+0x31/0x160 [ 309.662169] rcu_barrier+0x10/0x20 [ 309.662174] netdev_run_todo+0x5f/0x310 [ 309.662178] rtnl_unlock+0x9/0x10 [ 309.662183] default_device_exit_batch+0x133/0x150 [ 309.662188] ops_exit_list.isra.0+0x4d/0x60 [ 309.662192] cleanup_net+0x1d8/0x2c0 [ 309.662197] process_one_work+0x1f4/0x6d0 [ 309.662202] worker_thread+0x49/0x4a0 [ 309.662206] kthread+0x107/0x140 [ 309.662210] ret_from_fork+0x2e/0x40 [ 309.662214] } [ 309.662220] ... key at: [] rcu_preempt_state+0x508/0x780 [ 309.662225] ... acquired at: [ 309.662229] check_usage_forwards+0x12b/0x130 [ 309.662233] mark_lock+0x360/0x6f0 [ 309.662237] __lock_acquire+0x638/0x1b50 [ 309.662241] lock_acquire+0xc9/0x220 [ 309.662245] __mutex_lock+0x6e/0x990 [ 309.662249] mutex_lock_nested+0x16/0x20 [ 309.662253] _rcu_barrier+0x31/0x160 [ 309.662257] rcu_barrier+0x10/0x20 [ 309.662279] i915_gem_shrink_all+0x33/0x40 [i915] [ 309.662298] i915_drop_caches_set+0x141/0x150 [i915] [ 309.662303] simple_attr_write+0xc7/0xe0 [ 309.662307] full_proxy_write+0x4f/0x70 [ 309.662311] __vfs_write+0x23/0x120 [ 309.662315] vfs_write+0xc6/0x1f0 [ 309.662319] SyS_write+0x44/0xb0 [ 309.662323] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 309.662329] stack backtrace: [ 309.662335] CPU: 1 PID: 6435 Comm: gem_exec_gttfil Tainted: G W 4.11.0-rc1-CI-CI_DRM_2333+ #1 [ 309.662342] Hardware name: Hewlett-Packard HP Compaq 8100 Elite SFF PC/304Ah, BIOS 786H1 v01.13 07/14/2011 [ 309.662348] Call Trace: [ 309.662354] dump_stack+0x67/0x92 [ 309.662359] print_irq_inversion_bug.part.19+0x1a4/0x1b0 [ 309.662365] check_usage_forwards+0x12b/0x130 [ 309.662369] mark_lock+0x360/0x6f0 [ 309.662374] ? print_shortest_lock_dependencies+0x1a0/0x1a0 [ 309.662379] __lock_acquire+0x638/0x1b50 [ 309.662383] ? __mutex_unlock_slowpath+0x3e/0x2e0 [ 309.662388] ? trace_hardirqs_on+0xd/0x10 [ 309.662392] ? _rcu_barrier+0x31/0x160 [ 309.662396] lock_acquire+0xc9/0x220 [ 309.662400] ? _rcu_barrier+0x31/0x160 [ 309.662404] ? _rcu_barrier+0x31/0x160 [ 309.662409] __mutex_lock+0x6e/0x990 [ 309.662412] ? _rcu_barrier+0x31/0x160 [ 309.662416] ? _rcu_barrier+0x31/0x160 [ 309.662421] ? synchronize_rcu_expedited+0x35/0xb0 [ 309.662426] ? _raw_spin_unlock_irqrestore+0x52/0x60 [ 309.662434] mutex_lock_nested+0x16/0x20 [ 309.662438] _rcu_barrier+0x31/0x160 [ 309.662442] rcu_barrier+0x10/0x20 [ 309.662464] i915_gem_shrink_all+0x33/0x40 [i915] [ 309.662484] i915_drop_caches_set+0x141/0x150 [i915] [ 309.662489] simple_attr_write+0xc7/0xe0 [ 309.662494] full_proxy_write+0x4f/0x70 [ 309.662498] __vfs_write+0x23/0x120 [ 309.662503] ? rcu_read_lock_sched_held+0x75/0x80 [ 309.662507] ? rcu_sync_lockdep_assert+0x2a/0x50 [ 309.662512] ? __sb_start_write+0x102/0x210 [ 309.662516] ? vfs_write+0x17d/0x1f0 [ 309.662520] vfs_write+0xc6/0x1f0 [ 309.662524] ? trace_hardirqs_on_caller+0xe7/0x200 [ 309.662529] SyS_write+0x44/0xb0 [ 309.662533] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 309.662537] RIP: 0033:0x7f507eac24a0 [ 309.662541] RSP: 002b:00007fffda8720e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 309.662548] RAX: ffffffffffffffda RBX: ffffffff81482bd3 RCX: 00007f507eac24a0 [ 309.662552] RDX: 0000000000000005 RSI: 00007fffda8720f0 RDI: 0000000000000005 [ 309.662557] RBP: ffffc9000048bf88 R08: 0000000000000000 R09: 000000000000002c [ 309.662561] R10: 0000000000000014 R11: 0000000000000246 R12: 00007fffda872230 [ 309.662566] R13: 00007fffda872228 R14: 0000000000000201 R15: 00007fffda8720f0 [ 309.662572] ? __this_cpu_preempt_check+0x13/0x20 Fixes: 0eafec6d3244 ("drm/i915: Enable lockless lookup of request tracking via RCU") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100192 Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: # v4.9+ Link: http://patchwork.freedesktop.org/patch/msgid/20170314115019.18127-1-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a8e2292874e57ab6245ee16a8048729423d289d Author: Daniel Vetter Date: Thu Mar 2 16:16:38 2017 +0100 drm/doc: atomic overview, with graph I want to split up a few more things and document some details better (like how exactly to subclass drm_atomic_state). And maybe also split up the helpers a bit per-topic, but this should be a ok-ish start for better atomic overview. v2: Spelling and clarifications (Eric). v3: Implement suggestion from Gabriel to fix the graph. v4: Review from Laurent. Reviewed-by: Laurent Pinchart Cc: Gabriel Krisman Bertazi Acked-by: Eric Anholt Cc: Eric Anholt Cc: Laurent Pinchart Cc: Harry Wentland Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170302151638.1882-6-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms-helpers.rst | 2 + Documentation/gpu/drm-kms.rst | 84 ++++++++++++++++++++++++++++++++++- 2 files changed, 85 insertions(+), 1 deletion(-) commit b2b82c26c7c1702cacde241cf63137eddd6524bf Author: Daniel Vetter Date: Thu Mar 2 16:16:37 2017 +0100 drm/doc: diagram for mode objects and properties Resulted in confusion a few times in the past. v2: Spelling fix (Eric). Cc: Eric Anholt Acked-by: Eric Anholt Cc: Laurent Pinchart Cc: Manasi Navare Reviewed-by: Gabriel Krisman Bertazi Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170302151638.1882-5-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 1ea3576874790ba81ab00c3a0f1a3fc23e687062 Author: Daniel Vetter Date: Thu Mar 2 16:16:36 2017 +0100 drm/doc: Consistent kerneldoc include order First overview text (if there is any), then headers (since generally you want to start out with the data structures), then all the other stuff with functions. Most of this is pre-shpinx, since with the old docbook only the overview stuff was pulled in directly. Everything else was put in a per-section index, so include order didn't really matter. Acked-by: Eric Anholt Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170302151638.1882-4-daniel.vetter@ffwll.ch Documentation/gpu/drm-internals.rst | 6 +++--- Documentation/gpu/drm-kms-helpers.rst | 22 +++++++++++----------- Documentation/gpu/drm-kms.rst | 24 ++++++++++++------------ Documentation/gpu/drm-mm.rst | 24 ++++++++++++------------ 4 files changed, 38 insertions(+), 38 deletions(-) commit 2564d0b043cbe9d762f97104029281102cfe4be2 Author: Daniel Vetter Date: Thu Mar 2 16:16:35 2017 +0100 drm/doc: Add KMS overview graphs Oh, the shiny and pretties! v2: Review from Laurent. Cc: Laurent Pinchart Acked-by: Eric Anholt Reviewed-by: Gabriel Krisman Bertazi Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170302151638.1882-3-daniel.vetter@ffwll.ch Documentation/gpu/drm-kms-helpers.rst | 4 + Documentation/gpu/drm-kms.rst | 134 +++++++++++++++++++++++++++++++++- 2 files changed, 137 insertions(+), 1 deletion(-) commit b70366e5d31788650b2a5cec5cd13ea80ac7e44a Merge: f42e181 db6ccf2 Author: Daniel Vetter Date: Tue Mar 14 15:07:33 2017 +0100 Merge tag 'doc-4.11-images' of git://git.lwn.net/linux into drm-misc-next Pointer for Markus's image conversion work. We need this so we can merge all the pretty drm graphs for 4.12. Signed-off-by: Daniel Vetter commit 3465dbddf07084b36cd36c1f5f25b1734b85eff4 Author: Ander Conselvan de Oliveira Date: Fri Mar 10 12:18:34 2017 +0200 drm/i915/glk: Improve rounding caused by pre-CSC gamma tables The 33rd entry in the pre-CSC gamma table in Geminilake can represent a value of 1.0 as 17 bits fixed point with one integer bit. However, the table was generated such that the value of 1.0 would be 0.ffff with all the intervals scaled accordingly. For instance, 0.5 mapped to 0.7fff instead of 0.8000. For a reason that is not clear to the author, the rounding seems to be different when a cursor plane is used, leading to some seemingly random failures of the kms_cursor_crc igt tests. The differences weren't perceptible at 8bpc with images captured by a Chamelium device, but did cause CRC mismatches. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170310101835.29845-1-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_color.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 728d3f5afd991a44b4ec9d019d8556d8cb68db3f Author: david.wu Date: Thu Mar 2 15:11:24 2017 +0800 pinctrl: rockchip: Add input schmitt support for rk3328 Signed-off-by: David Wu Reviewed-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit e3b357d7dfe6b38a6064562bacf5c912b3443ac0 Author: david.wu Date: Thu Mar 2 15:11:23 2017 +0800 pinctrl: rockchip:Add input schmitt support To prevent external signal crosstalk, some pins need to enable input schmitt, like i2c pins, 32k-input pin and so on. Signed-off-by: David Wu Reviewed-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 73 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit 9396f4415343df2e51818956d661440b97190a74 Author: Icenowy Zheng Date: Wed Mar 1 03:08:15 2017 +0800 pinctrl: sunxi: select GPIOLIB Allwinner pin controllers are also GPIO controllers. Currently, if GPIOLIB is forgot to be chosen, the build of pinctrl-sunxi.c will fail for lacking a lot of gpiochip_* functions. Select GPIOLIB to ensure this driver can be built. Signed-off-by: Icenowy Zheng Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 14c868b00f0fc9d220675d96e1cae10e17406069 Author: Icenowy Zheng Date: Thu Mar 2 02:09:30 2017 +0800 pinctrl: sunxi: Add A64 R_PIO controller support The A64 has a R_PIO pin controller, similar to the one found on the H3 SoC. Add support for the pins controlled by the R_PIO controller. Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/Kconfig | 4 + drivers/pinctrl/sunxi/Makefile | 1 + drivers/pinctrl/sunxi/pinctrl-sun50i-a64-r.c | 125 +++++++++++++++++++++++++++ 3 files changed, 130 insertions(+) commit 9836b1ac2d77ad734d77173dbbbb49a33270d7bb Author: Icenowy Zheng Date: Thu Mar 2 02:01:10 2017 +0800 dt: bindings: add binding for Allwinner A64 R_PIO pinctrl Allwinner A64 SoC has also a dedicated pin controller for Port L GPIOs, which is called "Port Controller (CPUs-PORT)" in SoC User Manual. Add a binding for this pin controller, like the ones in A23/33 and H3. Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 + 1 file changed, 1 insertion(+) commit caf9db13a776830a7564953d9aba7214ac113046 Author: Icenowy Zheng Date: Thu Mar 2 02:01:09 2017 +0800 dt-bindings: fix for Allwinner H5 pinctrl's compatible The compatible for Allwinner H5 pin controller is wrong written as allwinner,sun50i-h5-r-pinctrl, however, it's really a generic pinctrl rather than a "r" one. Fix this compatible string. Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 082bc28c0232a8756141cacf608341895ea5d643 Author: Icenowy Zheng Date: Thu Mar 2 02:01:07 2017 +0800 pinctrl: sunxi: refactor pinctrl choice selecting for ARM64 ARM64 Allwinner SoCs used to have every pinctrl driver selected in ARCH_SUNXI. Change this to make their default value to (ARM64 && ARCH_SUNXI). Signed-off-by: Icenowy Zheng Reviewed-by: Andre Przywara Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3ec440e33f6895dc7d72a18b3ec2a44074f7d276 Author: Andy Shevchenko Date: Tue Feb 28 16:59:56 2017 +0200 pinctrl: Fix spelling typos Just fix spelling typos in comments. Signed-off-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 2 +- drivers/pinctrl/pinconf-generic.c | 2 +- drivers/pinctrl/pinconf.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit c825676b0823fd43a4d08bf865f81bb188b51db1 Author: Rick Altherr Date: Tue Feb 14 22:09:14 2017 -0800 pinctrl: aspeed: Allow disabling Port D and Port E loopback mode Port D and port E GPIO loopback modes are commonly enabled via hardware straps for use with front-panel buttons. When the BMC is powered off or fails to boot, the front-panel buttons are directly connected to the host chipset via the loopback to allow direct power-on and reset control. Once the BMC has booted, the loopback mode must be disabled for the BMC to take over control of host power-on and reset. Disabling these loopback modes requires writing to the hardware strap register which violates the current design of assuming the system designer chose the strap settings for a specific reason and they should be treated as read-only. Only the two bits of the strap register related to these loopback modes are allowed to be written and comments have been added to explain why. Signed-off-by: Rick Altherr Acked-by: Joel Stanley Reviewed-by: Andrew Jeffery Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 3818e4a7678ea70508b6b6e72a4cbf445e1e7dfa Author: david.wu Date: Fri Feb 10 18:23:49 2017 +0800 pinctrl: rockchip: Add rk3328 pinctrl support Note, the iomux of following pins are special, need to be recalculated specially. - gpio2_b4 - gpio2_b7 - gpio2_c7 Signed-off-by: David Wu Reviewed-by: Heiko Stuebner Signed-off-by: Linus Walleij .../bindings/pinctrl/rockchip,pinctrl.txt | 4 +- drivers/pinctrl/pinctrl-rockchip.c | 70 ++++++++++++++++++++++ 2 files changed, 72 insertions(+), 2 deletions(-) commit ea262ad6e4019f622f6b64dc42a8e839201b6046 Author: david.wu Date: Fri Feb 10 18:23:48 2017 +0800 pinctrl: rockchip: Add mux recalculation support Some pins are special at a bank so that add IOMUX_RECALCED type to indicate which iomux source of the bank need to be recalculated. If the mux recalculateed callback and IOMUX_RECALCED type were set, recalculate the pins' iomux by using mux recalculated data struct. Signed-off-by: David Wu Reviewed-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 41 ++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) commit 8b6c6f930da9d2f8f40f9c54a90efafb20fdad84 Author: david.wu Date: Fri Feb 10 18:23:47 2017 +0800 pinctrl: rockchip: Add 3bit width mux support This patch supports 3bit width iomux type. Signed-off-by: David Wu Reviewed-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 84b90e0cabf6b71a1d6292fbe936f669328a3881 Author: Charles Keepax Date: Thu Feb 16 13:27:15 2017 +0000 pinctrl: samsung: Remove unused local variable The local variable drvdata is not used in samsung_gpio_set_direction. Signed-off-by: Charles Keepax Reviewed-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij drivers/pinctrl/samsung/pinctrl-samsung.c | 2 -- 1 file changed, 2 deletions(-) commit f42e181935d5e5670c87d31ae48063a495bbacae Author: Daniel Vetter Date: Wed Mar 8 15:12:57 2017 +0100 drm/gem: Add DEFINE_DRM_GEM_FOPS Sadly there's only 1 driver which can use it, everyone else is special for some reason: - gma500 has a horrible runtime PM ioctl wrapper that probably doesn't really work but meh. - i915 needs special compat_ioctl handler because regrets. - arcgpu needs to fixup the pgprot because (no idea why it can't do that in the fault handler like everyone else). - tegra does even worse stuff with pgprot - udl does something with vm_flags too ... - cma helpers, etnaviv, mtk, msm, rockchip, omap all implement some variation on prefaulting. - exynos is exynos, I got lost in the midlayers. - vc4 has to reinvent half of cma helpers because those are too much midlayer, plus vm_flags dances. - vgem also seems unhappy with the default vm_flags. So pretty sad divergence and I'm sure we could do better, but not really an idea. Oh well, maybe this macro here helps to encourage more consistency at least going forward. Reviewed-by: Sean Paul Reviewed-by: Liviu Dudau Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-25-daniel.vetter@ffwll.ch drivers/gpu/drm/armada/armada_drv.c | 11 +---------- drivers/gpu/drm/drm_file.c | 8 +++----- include/drm/drm_gem.h | 26 ++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 15 deletions(-) commit d55f7e5d54c31c8ed61fdbfc59835cd6804ba954 Author: Daniel Vetter Date: Wed Mar 8 15:12:56 2017 +0100 drm: Create DEFINE_DRM_GEM_CMA_FOPS and roll it out to drivers Less code ftw. This converts all drivers except the tinydrm helper module. That one needs more work, since it gets the THIS_MODULE reference from tinydrm.ko instead of the actual driver module like it should. Probably needs a similar trick like I used here with generating the entire struct with a macro. Cc: Noralf Trønnes Reviewed-by: Sean Paul Reviewed-by: Liviu Dudau Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-24-daniel.vetter@ffwll.ch drivers/gpu/drm/arm/hdlcd_drv.c | 12 +----------- drivers/gpu/drm/arm/malidp_drv.c | 12 +----------- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 12 +----------- drivers/gpu/drm/drm_file.c | 3 +++ drivers/gpu/drm/drm_gem_cma_helper.c | 3 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 12 +----------- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 12 +----------- drivers/gpu/drm/imx/imx-drm-core.c | 11 +---------- drivers/gpu/drm/meson/meson_drv.c | 14 +------------ drivers/gpu/drm/mxsfb/mxsfb_drv.c | 14 +------------ drivers/gpu/drm/rcar-du/rcar_du_drv.c | 12 +----------- drivers/gpu/drm/shmobile/shmob_drm_drv.c | 12 +----------- drivers/gpu/drm/sti/sti_drv.c | 11 +---------- drivers/gpu/drm/sun4i/sun4i_drv.c | 12 +----------- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 12 +----------- drivers/gpu/drm/zte/zx_drm_drv.c | 14 +------------ include/drm/drm_gem_cma_helper.h | 26 +++++++++++++++++++++++++ 17 files changed, 46 insertions(+), 158 deletions(-) commit 098899fee681b96905da97bbcce1a548e8f9e645 Author: Daniel Vetter Date: Wed Mar 8 15:12:50 2017 +0100 drm/vgem: switch to postclose I didn't spot anything that would require ordering here (well not anywhere else either), and I'm trying to unify at least modern drivers on one close hook. Cc: Chris Wilson Reviewed-by: Sean Paul Reviewed-by: Liviu Dudau Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-18-daniel.vetter@ffwll.ch drivers/gpu/drm/vgem/vgem_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b93658f83fa7f89cde5cfba7158da2be8cac42b2 Author: Daniel Vetter Date: Wed Mar 8 15:12:44 2017 +0100 drm/doc: Document drm_file.[hc] Well, mostly drm_file.h, and clean up all related things: - I didnt' figure out the difference between preclose and postclose. The existing explanation in drm-internals.rst didn't convince me, since it's also really outdated - we clean up pending DRM events in the core nowadays. I put a FIXME in for the future. - Another FIXME is to have a macro for default fops. - Lots of links all around, main areas are to tie the overview in drm_file.c more into the callbacks in struct drm_device, and the other is to link render/primary node code to the right sections in drm-uapi.rst. - Also moved the open/close stuff to drm_drv.h from drm-internals.rst, seems like the better place for that information. Since that section was rather outdated this amounted to full-on rewrite. A big missing piece here is some overview graph, but I think better to wait with that one until drm_device and drm_driver are also fully documented. v2: Nits from Sean. Reviewed-by: Sean Paul Reviewed-by: Liviu Dudau Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-12-daniel.vetter@ffwll.ch Documentation/gpu/drm-internals.rst | 52 +------ Documentation/gpu/drm-uapi.rst | 4 + drivers/gpu/drm/drm_file.c | 66 +++++---- include/drm/drm_drv.h | 81 ++++++++++- include/drm/drm_file.h | 265 ++++++++++++++++++++++++++++++++---- 5 files changed, 354 insertions(+), 114 deletions(-) commit 7d52cb88c9ca20c32288de6ed62b32410c936ccc Author: Daniel Vetter Date: Wed Mar 8 15:12:43 2017 +0100 drm: Remove drm_pending_event->pid We might as well dump the drm_file pointer, that's about as useful a cookie as the pid. Noticed while typing docs for drm_file and friends. Since the only consumer of this is the tracepoints I think we can safely change this - those tracepoints should not be uapi relevant at all. It all goes back to commit b9c2c9ae882f058084e13e339925dbf8d2d20271 Author: Jesse Barnes Date: Thu Jul 1 16:48:09 2010 -0700 drm: add per-event vblank event trace points which doesn't give a special justification for using pid over a pointer. Also note that the nouveau code setting it is entirely pointless: Since this isn't a vblank event, it will never hit the vblank tracepoints. Cc: Ben Skeggs Reviewed-by: Sean Paul Reviewed-by: Liviu Dudau Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-11-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_irq.c | 5 ++--- drivers/gpu/drm/drm_trace.h | 20 ++++++++++---------- drivers/gpu/drm/nouveau/nouveau_usif.c | 1 - include/drm/drm_file.h | 2 -- 4 files changed, 12 insertions(+), 16 deletions(-) commit 7d2ec88149926b7ad875b9f95595e763e43d6105 Author: Daniel Vetter Date: Wed Mar 8 15:12:45 2017 +0100 drm/i915: Merge pre/postclose hooks There's really not a reason afaics that we can't just clean up everything at the end, in the terminal postclose hook: Since this is closing a file descriptor we know no one else can have a reference or a thread doing something with that drm_file except the close code. Ordering shouldn't matter, as long as we don't kfree before we clean stuff up. In the past this was more relevant when drivers still had to track and clean up pending drm events, but that's all done by the core now. Reviewed-by: Sean Paul Reviewed-by: Liviu Dudau Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-13-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/i915_drv.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 9f02a486da2a06687460fb2fd5303ca29b711f87 Author: Tamara Diaconita Date: Tue Mar 14 10:38:35 2017 +0200 Documentation: admin-guide: Fix typos Fix typos in admin-guide directory. Make documentation clear and grammatically correct. Signed-off-by: Tamara Diaconita Signed-off-by: Jonathan Corbet Documentation/admin-guide/kernel-parameters.rst | 2 +- Documentation/admin-guide/ras.rst | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit ee5cb7c465360f8eabc351196554e534675bdf6b Author: Dan Carpenter Date: Tue Mar 14 10:54:10 2017 +0300 drm: qxl: add missing return check My static checker complains that "release" is uninitialized if qxl_alloc_release_reserved() fails, so let's add a check for that. Signed-off-by: Dan Carpenter Link: http://patchwork.freedesktop.org/patch/msgid/20170314075410.GB5984@mwanda Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_display.c | 2 ++ 1 file changed, 2 insertions(+) commit 43c27940227039223abbb5107a2eb3d799c8a2ec Author: Gerd Hoffmann Date: Mon Mar 13 09:22:26 2017 +0100 drm: virtio: fix kmem_cache_alloc error check kmem_cache_alloc returns NULL on error, not ERR_PTR. Fixes: f5985bf9cadd4e3ed8d5d9a9cbbb2e39cdb81cd9 Reported-by: Jiri Slaby Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1489393346-13874-1-git-send-email-kraxel@redhat.com drivers/gpu/drm/virtio/virtgpu_vq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit db6a3d03e22f3daf09d8d1532bd1d3747062a561 Author: Akinobu Mita Date: Tue Mar 14 00:59:12 2017 +0900 dmaengine: xilinx: avoid memory corruption for device_prep_dma_memcpy() The device_prep_dma_memcpy() callback for this driver allocates a new xilinx_dma_tx_descriptor whose TX segments list is initialized as empty, but then gets invalid TX segment pointer by list_last_entry() from the empty TX segments list and memory corruption happens by the attempt to update the next descriptor in invalid TX segment pointer. This removes unnecessary memory access for nonexistent tail TX segment which causes memory corruption. Cc: Vinod Koul Cc: Kedareswara rao Appana Cc: Michal Simek Signed-off-by: Akinobu Mita Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_dma.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 676f9c26c330d087125769200bcf080c3c88488e Author: Akinobu Mita Date: Tue Mar 14 00:59:11 2017 +0900 dmaengine: xilinx: fix device_terminate_all() callback for AXI CDMA The device_terminate_all() callback for this driver stops current DMA operations by clearing RUNSTOP bit in the control register and waiting HALTED bit set in the status register. But AXI CDMA which is one of the supported DMA engine by this driver does not provide the run / stop controls and those bits in the control and status registers are reserved. So when device_terminate_all() is called, the error message is printed and the channel is marked as having errors in xilinx_dma_halt(). This change adds stop_transfer() callback which differentiates CDMA and other DMA engine. The CDMA's one avoids the unsupported operations and instead polls the status register to check if the DMA operations are in progress for AXI CDMA. Cc: Vinod Koul Cc: Kedareswara rao Appana Cc: Michal Simek Signed-off-by: Akinobu Mita Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_dma.c | 49 +++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 16 deletions(-) commit ca0241a55f4f2d3a76e6753d2442b262264b938f Author: Ville Syrjälä Date: Wed Mar 8 16:33:34 2017 +0200 Revert "drm/i915: Ignore panel type from OpRegion on SKL" This reverts commit bb10d4ec3be4b069bfb61c60ca4f708f58f440f1. Since commit c8ebfad7a063 ("drm/i915: Ignore OpRegion panel type except on select machines") we ignore the OpRegion panel type except for specific machines (handled via a DMI match), so having SKL explicitly excluded from using the OpRegion panel type is redundant. So let's remove the SKL check. Cc: Jani Nikula Cc: Daniel Vetter Cc: James Bottomley Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170308143334.21216-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/intel_opregion.c | 11 ----------- 1 file changed, 11 deletions(-) commit ff21378a321f05e8c11265a3bd7622b89df8032e Author: Andy Shevchenko Date: Tue Feb 28 17:03:12 2017 +0200 gpiolib: Fix spelling of 'successful' Remove extra 'l' in "successfull". Signed-off-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/devres.c | 2 +- drivers/gpio/gpiolib.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 265ffed739d313bd876c8faa9be15d3a101b8175 Author: kbuild test robot Date: Sun Mar 12 22:46:36 2017 +0800 drm/tinydrm: fix semicolon.cocci warnings drivers/gpu/drm/tinydrm/mipi-dbi.c:657:2-3: Unneeded semicolon drivers/gpu/drm/tinydrm/mipi-dbi.c:593:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Fengguang Wu Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170312144636.GA91808@lkp-g5.lkp.intel.com drivers/gpu/drm/tinydrm/mipi-dbi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 05df49e73bd7480de8c68ac814e463eb19dc51ed Author: Daniel Vetter Date: Sun Mar 12 21:53:40 2017 +0100 drm/i915: annote drop_caches debugfs interface with lockdep The trouble we have is that we can't really test all the shrinker recursion stuff exhaustively in BAT because any kind of thrashing stress test just takes too long. But that leaves a really big gap open, since shrinker recursions are one of the most annoying bugs. Now lockdep already has support for checking allocation deadlocks: - Direct reclaim paths are marked up with lockdep_set_current_reclaim_state() and lockdep_clear_current_reclaim_state(). - Any allocation paths are marked with lockdep_trace_alloc(). If we simply mark up our debugfs with the reclaim annotations, any code and locks taken in there will automatically complete the picture with any allocation paths we already have, as long as we have a simple testcase in BAT which throws out a few objects using this interface. Not stress test or thrashing needed at all. v2: Need to EXPORT_SYMBOL_GPL to make it compile as a module. v3: Fixup rebase fail (spotted by Chris). Cc: Chris Wilson Cc: Peter Zijlstra Cc: Ingo Molnar Cc: linux-kernel@vger.kernel.org Reviewed-by: Chris Wilson Acked-by: Peter Zijlstra (Intel) Link: http://patchwork.freedesktop.org/patch/msgid/20170312205340.16202-1-daniel.vetter@ffwll.ch Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_debugfs.c | 2 ++ kernel/locking/lockdep.c | 2 ++ 2 files changed, 4 insertions(+) commit bb1d132935c2f87cd261eb559759fe49d5e5dc43 Author: Jani Nikula Date: Fri Mar 10 15:27:58 2017 +0200 drm/i915/vbt: split out defaults that are set when there is no VBT The main thing are the DDI ports. If there's a VBT that says there are no outputs, we should trust that, and not have semi-random defaults. Unfortunately, the defaults have resulted in some Chromebooks without VBT to rely on this behaviour, so we split out the defaults for the missing VBT case. Reviewed-by: Manasi Navare Cc: Manasi Navare Cc: Ville Syrjälä Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/95c26079ff640d43f53b944f17e9fc356b36daec.1489152288.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 427700a7ca54a2d7f83456d4299778ccf97a4722 Author: Yuantian Tang Date: Tue Mar 14 10:29:34 2017 +0800 arm64: dts: updated sata node on ls1012a platform Updated sata node to add ecc register address and dma coherence property. Enable sata on ls1012a platforms as well. Signed-off-by: Tang Yuantian Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts | 4 ++++ arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts | 4 ++++ arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts | 4 ++++ arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 5 ++++- 4 files changed, 16 insertions(+), 1 deletion(-) commit 06c830a48346643e195801460dfe16d96ba4dff5 Author: Kirill A. Shutemov Date: Mon Mar 13 17:33:09 2017 +0300 x86/power: Add 5-level paging support set_up_temporary_text_mapping() and relocate_restore_code() require adjustments to handle additional page table level. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Michal Hocko Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170313143309.16020-7-kirill.shutemov@linux.intel.com [ Minor readability edits. ] Signed-off-by: Ingo Molnar arch/x86/power/hibernate_64.c | 47 ++++++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 14 deletions(-) commit b50858ce3e2a25a7f4638464e857853fbfc81823 Author: Kirill A. Shutemov Date: Mon Mar 13 17:33:08 2017 +0300 x86/mm/vmalloc: Add 5-level paging support Modify vmalloc_fault() to handle additional page table level. With 4-level paging, copying happens on p4d level, as we have pgd_none() always false if p4d_t is folded. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Michal Hocko Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170313143309.16020-6-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/fault.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) commit ea3b5e60ce804403ca019039d6331368521348de Author: Kirill A. Shutemov Date: Mon Mar 13 17:33:07 2017 +0300 x86/mm/ident_map: Add 5-level paging support Add additional page table level handing. It's mostly mechanical. The only quirk is that with p4d folded, 'pgd' is equal to 'p4d' in kernel_ident_mapping_init(). The pgd entry has to point to the pud page table in this case. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Michal Hocko Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170313143309.16020-5-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/ident_map.c | 51 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 7 deletions(-) commit 0318e5abe1c0933b8bf6763a1a0d3caec4f0826d Author: Kirill A. Shutemov Date: Mon Mar 13 17:33:06 2017 +0300 x86/mm/gup: Add 5-level paging support Extend get_user_pages_fast() to handle an additional page table level. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Michal Hocko Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170313143309.16020-4-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/mm/gup.c | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) commit e0c4f6750e130541cca7390739d25feb522acfff Author: Kirill A. Shutemov Date: Mon Mar 13 17:33:05 2017 +0300 x86/mm: Convert trivial cases of page table walk to 5-level paging This patch only covers simple cases. Less trivial cases will be converted with separate patches. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Michal Hocko Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170313143309.16020-3-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/tboot.c | 6 +++++- arch/x86/kernel/vm86_32.c | 6 +++++- arch/x86/mm/fault.c | 39 +++++++++++++++++++++++++++++++++------ arch/x86/mm/init_32.c | 22 ++++++++++++++++------ arch/x86/mm/ioremap.c | 3 ++- arch/x86/mm/pgtable.c | 4 +++- arch/x86/mm/pgtable_32.c | 8 +++++++- arch/x86/platform/efi/efi_64.c | 13 +++++++++---- arch/x86/power/hibernate_32.c | 7 +++++-- 9 files changed, 85 insertions(+), 23 deletions(-) commit fe1e8c3e9634071ac608172e29bf997596d17c7c Author: Kirill A. Shutemov Date: Mon Mar 13 17:33:04 2017 +0300 x86/mm: Extend headers with basic definitions to support 5-level paging This patch extends x86 headers to enable 5-level paging support. It's still based on . We will get to the point where we can have later. Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Michal Hocko Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170313143309.16020-2-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/pgtable-2level_types.h | 1 + arch/x86/include/asm/pgtable-3level_types.h | 1 + arch/x86/include/asm/pgtable.h | 26 ++++++++++++++++++++----- arch/x86/include/asm/pgtable_64_types.h | 1 + arch/x86/include/asm/pgtable_types.h | 30 ++++++++++++++++++++++++++++- 5 files changed, 53 insertions(+), 6 deletions(-) commit 942c56ad07d111714899ec4bfb32212a65f40ac5 Author: Roopa Prabhu Date: Mon Mar 13 23:04:48 2017 -0700 lwtunnel: remove unused but set variable silences the below warning: net/core/lwtunnel.c: In function ‘lwtunnel_valid_encap_type_attr’: net/core/lwtunnel.c:165:17: warning: variable ‘nla’ set but not used [-Wunused-but-set-variable] Fixes: 9ed59592e3e3 ("lwtunnel: fix autoload of lwt modules") Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/core/lwtunnel.c | 2 -- 1 file changed, 2 deletions(-) commit 92cd12c5ed432c5eebd2462d666772a8d8442c3b Merge: 62a9fa0 569f41d Author: David S. Miller Date: Mon Mar 13 23:20:06 2017 -0700 Merge branch 'rds-ib-trivial-patches' Zhu Yanjun says: ==================== rds: ib: trivial patches v2 -> v3 remove err from messages. ==================== Signed-off-by: David S. Miller commit 569f41d187ac2c9a9809b9f4e27109fc558053eb Author: Zhu Yanjun Date: Mon Mar 13 01:43:48 2017 -0400 rds: ib: unmap the scatter/gather list when error When some errors occur, the scatter/gather list mapped to DMA addresses should be handled. Cc: Joe Jin Cc: Junxiao Bi Acked-by: Santosh Shilimkar Signed-off-by: Zhu Yanjun Signed-off-by: David S. Miller net/rds/ib_fmr.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit edd08f96db4f06beb09acdd71e00b07a1f6c13ca Author: Zhu Yanjun Date: Mon Mar 13 01:43:47 2017 -0400 rds: ib: add the static type to the function The function rds_ib_map_fmr is used only in the ib_fmr.c file. As such, the static type is added to limit it in this file. Cc: Joe Jin Cc: Junxiao Bi Acked-by: Santosh Shilimkar Signed-off-by: Zhu Yanjun Signed-off-by: David S. Miller net/rds/ib_fmr.c | 5 +++-- net/rds/ib_mr.h | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) commit ea69c883644a5c574ab518ae86ca3ce58e101072 Author: Zhu Yanjun Date: Mon Mar 13 01:43:46 2017 -0400 rds: ib: remove redundant ib_dealloc_fmr The function ib_dealloc_fmr will never be called. As such, it should be removed. Cc: Joe Jin Cc: Junxiao Bi Reviewed-by: Yuval Shaia Reviewed-by: Johannes Thumshirn Acked-by: Santosh Shilimkar Signed-off-by: Zhu Yanjun Signed-off-by: David S. Miller net/rds/ib_fmr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit b418c5276a41c821c25410542df83d283bbc0b2a Author: Zhu Yanjun Date: Mon Mar 13 01:43:45 2017 -0400 rds: ib: drop unnecessary rdma_reject When rdma_accept fails, rdma_reject is called in it. As such, it is not necessary to execute rdma_reject again. Cc: Joe Jin Cc: Junxiao Bi Acked-by: Santosh Shilimkar Signed-off-by: Zhu Yanjun Signed-off-by: David S. Miller net/rds/ib_cm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 62a9fa01add88082b32096211e0a88016e996713 Merge: c55fa3c 4213808 Author: David S. Miller Date: Mon Mar 13 21:51:51 2017 -0700 Merge branch 'bcmgenet-add-support-for-GENETv5' Doug Berger says: ==================== net: bcmgenet: add support for GENETv5 This collection of patches contains changes related to adding support for the BCM7260, BCM7268, and BCM7271 devices that contain a new version of the GENET MAC IP block (v5) and a new fast ethernet (10/100BASE-T) internal PHY. These patches were originally developed on top of the bug fixes of the "[PATCH v2 net 0/8] net: bcmgenet: minor bug fixes" patch set previously accepted into the net repository, but this submission is designed to be applied to the current net-next that does not yet include them. As a result there will be some merge conflicts that I would be happy to help resolve if desired. Specifically, conflicts should occur with these patches from the minor bug fixes set: [PATCH v2 net 3/8] net: bcmgenet: reserved phy revisions must be checked first [PATCH v2 net 5/8] net: bcmgenet: synchronize irq0 status between the isr and task [PATCH v2 net 8/8] net: bcmgenet: decouple flow control from bcmgenet_tx_reclaim ==================== Signed-off-by: David S. Miller commit 421380856d9c7466a28a1410cce2055acaf84ffd Author: Doug Berger Date: Mon Mar 13 17:41:42 2017 -0700 net: bcmgenet: add support for the GENETv5 hardware This commit adds support for the GENETv5 implementation. The GENETv5 reports a major version of 6 instead of 5 so compensate for this when verifying the configuration of the driver. Also the EPHY revision is now contained in the MDIO registers of the PHY so the EPHY revision of 0 in GENET_VER_FMT is expected for GENETv5. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 91 ++++++++++++++++++++------ drivers/net/ethernet/broadcom/genet/bcmgenet.h | 12 +++- drivers/net/ethernet/broadcom/genet/bcmmii.c | 62 ++++++++++-------- drivers/net/phy/mdio-bcm-unimac.c | 3 +- 4 files changed, 118 insertions(+), 50 deletions(-) commit 0ce5aa1d6c97425ae0fd4082066049edcaffe01b Author: Doug Berger Date: Mon Mar 13 17:41:41 2017 -0700 dt-bindings: net: update bcmgenet binding for GENETv5 The device tree documentation must be updated to reflect the new compatible strings "brcm,genet-v5" and "brcm,genet-mdio-v5" used by the GENETv5 driver. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/brcm,bcmgenet.txt | 10 +++++----- Documentation/devicetree/bindings/net/brcm,unimac-mdio.txt | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) commit 75835695ad6362c94b918ef28799ed6b593f947c Author: Doug Berger Date: Mon Mar 13 17:41:40 2017 -0700 dt-bindings: net: document bcmgenet WoL interrupt A third interrupt cell can be provided to optionally specify the interrupt used for handling Wake on LAN events. Typically the wake up handling uses a separate interrupt controller, so the interrupts-extended property is used to accommodate this. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/brcm,bcmgenet.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 54fecff3461143bfc4c4f0431e9145e8748977ce Author: Doug Berger Date: Mon Mar 13 17:41:39 2017 -0700 net: bcmgenet: return EOPNOTSUPP for unknown ioctl commands This commit changes the ioctl handling behavior to return the EOPNOTSUPP error code instead of the EINVAL error code when an unknown ioctl command value is detected. It also removes some redundant parsing of the ioctl command value and allows the SIOCSHWTSTAMP value to be handled. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit c4d453d2b14d4c844fd6b492fbd16ce0615a59d8 Author: Doug Berger Date: Mon Mar 13 17:41:38 2017 -0700 net: bcmgenet: correct return value of __bcmgenet_tx_reclaim The reclaim function should return the number of buffer descriptors reclaimed, not just the number corresponding to skb packets. Also, remove the unnecessary computation when updating the consumer index. While this is not a functional problem it could degrade performance of napi in a fragmented transmit stream. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d5810ca3252a5bf61e5b2fc789da456e0f65ba8c Author: Doug Berger Date: Mon Mar 13 17:41:37 2017 -0700 net: bcmgenet: clear status to reduce spurious interrupts Since the DMA interrupt status is latched and the DMA servicing can be polled, it is a good idea to clear the latched status of a DMA interrupt before performing the service that would be invoked by the interrupt. This prevents old status from causing spurious interrupts when the interrupt is unmasked at a later time. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit b1ec494deea8322e88063c8a6bee903255a0590d Author: Doug Berger Date: Mon Mar 13 17:41:36 2017 -0700 net: bcmgenet: remove handling of wol interrupts from isr0 The bcmgenet_wol_isr() handler performs the necessary processing for waking from a GENET event. There is no necessary functionality behind servicing the UMAC_IRQ_MPD_R event in the handling of isr0. Therefore the code that unmasks and masks this interrupt and that gets invoked in response to it is removed by this commit. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 10 +--------- drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c | 15 +-------------- 2 files changed, 2 insertions(+), 23 deletions(-) commit 6689da155bdcd17abfe4d3a8b1e245d9ed4b5f2c Author: Doug Berger Date: Mon Mar 13 17:41:35 2017 -0700 net: bcmgenet: manage dma interrupts in napi code This commit moves DMA interrupt enabling out of init_umac() and adds the masking of these interrupts to the napi enable and disable code. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 39 +++++++++++++++----------- 1 file changed, 22 insertions(+), 17 deletions(-) commit 556c2cf4eff18bb7f41056796d2d37b48239278b Author: Doug Berger Date: Mon Mar 13 17:41:34 2017 -0700 net: bcmgenet: remove meaningless lines An assortment of non-functional lines are removed to reduce confusion and some typos in comments are corrected. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit c298ede2fe21e034ab6ba4f15340fadc03ae9663 Author: Doug Berger Date: Mon Mar 13 17:41:33 2017 -0700 net: bcmgenet: simplify circular pointer arithmetic A 2's complement subtraction will always do a borrow, so masking off the sign bits is the same as conditionally adding (mask+1). Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 83ee102a6998f808ac4c626e8f72344f0a355527 Author: Doug Berger Date: Mon Mar 13 17:41:32 2017 -0700 net: phy: bcm7xxx: add support for 28nm EPHY This commit adds support for the internal fast ethernet 10/100 PHY found in the BCM7260, BCM7268, and BCM7271 devices. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/bcm7xxx.c | 215 +++++++++++++++++++++++++++++++++++++++++++++- include/linux/brcmphy.h | 3 + 2 files changed, 216 insertions(+), 2 deletions(-) commit cda792c3f9b77acc3f42e4947d30f3a46e4da183 Author: Doug Berger Date: Mon Mar 13 17:41:31 2017 -0700 net: phy: bcm-phylib: replace obsolete EEE macro references The macros MDIO_AN_EEE_ADV_100TX and MDIO_AN_EEE_ADV_1000T are now considered obsolete and are replaced in the kernel with the generic macros MDIO_EEE_100TX and MDIO_EEE_1000T respectively. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/bcm-phy-lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6f3125ceb66120796f62e7797a1a313418a5911a Author: Lucas Stach Date: Wed Mar 8 10:13:09 2017 +0100 dmaengine: imx-sdma: advertise correct residue granularity The SDMA hardware/driver does not actually report the transfer residue at burst size granularity, but in fact is only able to report residue after each finished segment. Signed-off-by: Lucas Stach Tested-by: Fabio Estevam Signed-off-by: Vinod Koul drivers/dma/imx-sdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b59902805f5224b6f27a958cf2cbe9bf6b9b0004 Author: Nobuhiro Iwamatsu Date: Fri Feb 10 11:21:33 2017 -0600 ARM: dts: socfpga: sodia: enable qspi Enable the qspi controller on sodia board and add the flash chip (n25q512a). Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_cyclone5_sodia.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 940f6daec092819674ce26f1b6f0be4bbb9923a8 Author: Daeseok Youn Date: Tue Mar 14 11:07:45 2017 +0900 staging: dgnc: remove useless switch-case statements The dgnc_tty_send_break() has a switch-case condition for msec. It is no use except case -1. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit dec5b6c569d2992e550951662ba27576f24924f7 Author: Daeseok Youn Date: Tue Mar 14 11:05:32 2017 +0900 staging: dgnc: ch->ch_bd is already assigned to bd variable The bd variables in functions are already assigned from ch->ch_bd but it is not used in those functions except checking NULL. The ch->ch_bd could be replaced with bd variable. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9836a882fe5e028e5734b3ece25b3bc5132350ec Author: Roy Pledge Date: Mon Mar 13 15:02:04 2017 -0400 bus: fsl-mc: dpio: add maintainer for DPIO add Roy Pledge as maintainer of DPIO Signed-off-by: Roy Pledge Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 993fec7e11ca81bf4cce740aa1a708cad23e54e8 Author: Roy Pledge Date: Mon Mar 13 15:02:03 2017 -0400 bus: fsl-mc: dpio: add the DPAA2 DPIO object driver The DPIO driver registers with the fsl-mc bus to handle bus-related events for DPIO objects. Key responsibility is mapping I/O regions, setting up interrupt handlers, and calling the DPIO service initialization during probe. Signed-off-by: Roy Pledge Signed-off-by: Haiying Wang Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpio/Makefile | 2 +- drivers/staging/fsl-mc/bus/dpio/dpio-driver.c | 296 ++++++++++++++++++++++++++ 2 files changed, 297 insertions(+), 1 deletion(-) commit 780b626323d7212bdb03797d3160b33394f792cc Author: Roy Pledge Date: Mon Mar 13 15:02:02 2017 -0400 bus: fsl-mc: dpio: add the DPAA2 DPIO service interface The DPIO service interface handles initialization of DPIO objects and exports APIs to be used by other DPAA2 object drivers to perform queuing and buffer management related operations. The service allows registration of callbacks when frames or notifications are received. Signed-off-by: Roy Pledge Signed-off-by: Haiying Wang Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpio/Makefile | 2 +- drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 618 +++++++++++++++++++++++++ drivers/staging/fsl-mc/include/dpaa2-io.h | 139 ++++++ 3 files changed, 758 insertions(+), 1 deletion(-) commit 321eecb06bfba0522f33582335f0b09e5003b1e3 Author: Roy Pledge Date: Mon Mar 13 15:02:01 2017 -0400 bus: fsl-mc: dpio: add QBMan portal APIs for DPAA2 Add QBman APIs for frame queue and buffer pool operations. Signed-off-by: Roy Pledge Signed-off-by: Haiying Wang Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpio/Makefile | 2 +- drivers/staging/fsl-mc/bus/dpio/qbman-portal.c | 1033 ++++++++++++++++++++++++ drivers/staging/fsl-mc/bus/dpio/qbman-portal.h | 469 +++++++++++ 3 files changed, 1503 insertions(+), 1 deletion(-) commit ba8005b989564c58e09e19eac09a82d488ed48a9 Author: Roy Pledge Date: Mon Mar 13 15:02:00 2017 -0400 bus: fsl-mc: dpio: add global dpaa2 definitions Create header for global dpaa2 definitions. Add definitions for dequeue results. Signed-off-by: Roy Pledge Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/dpaa2-global.h | 202 ++++++++++++++++++++++++++ 1 file changed, 202 insertions(+) commit d3269bdc7ebcf8bce7969a68d7108ec5890d8173 Author: Roy Pledge Date: Mon Mar 13 15:01:59 2017 -0400 bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs Add global definitions for DPAA2 frame descriptors and scatter gather entries. Signed-off-by: Roy Pledge Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/include/dpaa2-fd.h | 448 ++++++++++++++++++++++++++++++ 1 file changed, 448 insertions(+) commit 2704aedb5c219721ce9144f56bc13fd9995dbf13 Author: Ioana Radulescu Date: Mon Mar 13 15:01:58 2017 -0400 bus: fsl-mc: dpio: add APIs for DPIO objects Add the command build/parse APIs for operating on DPIO objects through the DPAA2 Management Complex. Signed-off-by: Ioana Radulescu Signed-off-by: Roy Pledge Signed-off-by: Stuart Yoder Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/Kconfig | 10 ++ drivers/staging/fsl-mc/bus/Makefile | 3 + drivers/staging/fsl-mc/bus/dpio/Makefile | 9 ++ drivers/staging/fsl-mc/bus/dpio/dpio-cmd.h | 75 ++++++++++ drivers/staging/fsl-mc/bus/dpio/dpio.c | 224 +++++++++++++++++++++++++++++ drivers/staging/fsl-mc/bus/dpio/dpio.h | 109 ++++++++++++++ 6 files changed, 430 insertions(+) commit 0e6437941e44d6771d939e79cde04f203845cbdc Author: Stuart Yoder Date: Mon Mar 13 15:01:57 2017 -0400 bus: fsl-mc: dpio: add DPIO driver overview document add document describing the dpio driver and it's role, components and major interfaces Signed-off-by: Stuart Yoder Signed-off-by: Roy Pledge Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt | 135 ++++++++++++++++++++++++ 1 file changed, 135 insertions(+) commit d62100f1aac28d18057c05410f706c65baf748fa Author: Shubhrajyoti Datta Date: Thu Mar 9 11:19:07 2017 +0530 serial: xilinx_uartps: Add pm runtime support Adds pm runtime support to xilinx uart ps. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 50 ++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 8 deletions(-) commit f48180a70e2f2676f87ba70c08f779ea9e699cc6 Author: Vignesh R Date: Wed Mar 8 17:49:43 2017 +0530 serial: 8250: 8250_core: Use dev_name() during request_irq() Passing "serial" as name during request_irq() results in all serial port irqs have same name. This does not help much to easily identify which irq belongs to which serial port instance. Therefore pass dev_name() during request_irq() so that better identifiable name is listed for serial ports in cat /proc/interrupts output. Output of cat /proc/interrupts Before this patch: 26: 689 0 GICv2 309 Edge serial After this patch: 26: 696 0 GICv2 309 Edge 2530c00.serial Signed-off-by: Vignesh R Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22a33651a56fa2a66339db059dcc247aa7131ced Author: Elena Reshetova Date: Mon Mar 6 16:21:15 2017 +0200 drivers: convert sbd_duart.map_guard from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sb1250-duart.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 8961df8950b1235cb7594e143a31bcc63757b660 Author: Richard Genoud Date: Fri Mar 3 15:13:44 2017 +0100 tty/serial: atmel: move atmel_serial header into driver directory atmel_serial.h is only used by atmel_serial.c, so there's no need for it to lie in include/linux. Suggested-by: Joe Perches Signed-off-by: Richard Genoud Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 +- drivers/tty/serial/atmel_serial.c | 2 +- drivers/tty/serial/atmel_serial.h | 169 ++++++++++++++++++++++++++++++++++++++ include/linux/atmel_serial.h | 169 -------------------------------------- 4 files changed, 171 insertions(+), 171 deletions(-) commit 2b57b7ff9d0322e188a83fd80837afe6af1efa02 Author: Andy Shevchenko Date: Tue Feb 28 16:54:41 2017 +0200 serial: 8250_exar: Fix spelling of "driver" Fix typo in "Dricer". Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_exar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 488ae82d973c421229c9f02363e94545086313da Author: Alexandre Belloni Date: Tue Feb 21 13:03:57 2017 +0100 tty/serial: atmel: remove cache when unnecessary struct cache is only used in suspend/resume. Exclude it when PM is not selected. Suggested-by: Richard Genoud Signed-off-by: Alexandre Belloni Acked-by: Richard Genoud Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 2 ++ 1 file changed, 2 insertions(+) commit 432f974801e2f3590c95a666ab4546346d1c60a9 Author: Alexandre Belloni Date: Tue Feb 21 13:03:56 2017 +0100 tty/serial: atmel: increase ATMEL_MAX_UART The samx7 family uses the same UART/USART IP as the at91/sama5 families but has 8 of those. Suggested-by: Szemző András Signed-off-by: Alexandre Belloni Acked-by: Richard Genoud Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3c9101766b502a0163d1d437fada5801cf616be2 Author: Takatoshi Akiyama Date: Mon Feb 27 15:56:31 2017 +0900 serial: sh-sci: Fix panic when serial console and DMA are enabled This patch fixes an issue that kernel panic happens when DMA is enabled and we press enter key while the kernel booting on the serial console. * An interrupt may occur after sci_request_irq(). * DMA transfer area is initialized by setup_timer() in sci_request_dma() and used in interrupt. If an interrupt occurred between sci_request_irq() and setup_timer() in sci_request_dma(), DMA transfer area has not been initialized yet. So, this patch changes the order of sci_request_irq() and sci_request_dma(). Fixes: 73a19e4c0301 ("serial: sh-sci: Add DMA support.") Signed-off-by: Takatoshi Akiyama [Shimoda changes the commit log] Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 713b93f1b849527e8c440753fc92cc6c202f2092 Author: Aleksey Makarov Date: Wed Mar 1 18:23:02 2017 +0300 Revert "tty: serial: pl011: add ttyAMA for matching pl011 console" The original patch makes the condition always true, so it is wrong. It masks (but not fixes) the bug described in the commit message but introduces a regression (no console is selected by SPCR) in regular (no 'console=ttyAMA') case. s/||/&&/ would not fix the problem as the root cause was identified incorrectly. This reverts commit aea9a80ba98a0c9b4de88850260e9fbdcc98360b. Signed-off-by: Aleksey Makarov Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c3f4309a0e5d70d164c60cd160262db21cb050d Author: Colin Ian King Date: Wed Mar 1 14:07:21 2017 +0000 dmaengine: mv_xor: remove redundant null check on cd The check to see if cd is null is redundant, pdata->channels is never null at this point, and hence &pdata->channels[i] cannot be null, so remove the null check. Detected by CoverityScan, CID#1357194 ("Logically Dead Code") Signed-off-by: Colin Ian King Signed-off-by: Vinod Koul drivers/dma/mv_xor.c | 5 ----- 1 file changed, 5 deletions(-) commit 7e040726850a106587485c21bdacc0bfc8a0cbed Author: Greg KH Date: Wed Mar 8 19:03:44 2017 +0100 eventpoll.h: add missing epoll event masks [resend due to me forgetting to cc: linux-api the first time around I posted these back on Feb 23] From: Greg Kroah-Hartman For some reason these values are not in the uapi header file, so any libc has to define it themselves. To prevent them from needing to do this, just have the kernel provide the correct values. Reported-by: Elliott Hughes Signed-off-by: Greg Kroah-Hartman include/uapi/linux/eventpoll.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 6f051e4a685b768f3704c7c069aa1edee3010622 Author: Greg KH Date: Wed Mar 8 19:03:03 2017 +0100 eventpoll.h: fix epoll event masks [resend due to me forgetting to cc: linux-api the first time around I posted these back on Feb 23] From: Greg Kroah-Hartman When userspace tries to use these defines, it complains that it needs to be an unsigned 1 that is shifted, so libc implementations have to create their own version. Fix this by defining it properly so that libcs can just use the kernel uapi header. Reported-by: Elliott Hughes Signed-off-by: Greg Kroah-Hartman include/uapi/linux/eventpoll.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 902f49ca3cbd20d4a4c8fd8b7cc6178a731cdc3f Author: Tobin C. Harding Date: Tue Mar 14 09:54:10 2017 +1100 staging: ks7010: refactor, whitespace only Code may be refactored to take advantage of previous patches which reduced the level of indentation. Function parameter line breaks can be adjusted in line with kernel coding standards. Refactor layout of function call parameters. Make whitespace changes only. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) commit f0a4c596f2f8106d1060bf0cc6ed1e3c2ed3b16d Author: Tobin C. Harding Date: Tue Mar 14 09:54:09 2017 +1100 staging: ks7010: reduce level of indentation Checkpatch emits WARNING: Too many leading tabs - consider code refactoring. One level of indentation may be removed by inverting an if statement conditional (and returning if new conditional evaluates to true). Code contains switch statement that also contains multiple layers of indentation. Indentation may be reduced by breaking out of the case statement in multiple places instead of guarding code with if/else statements. Invert conditional. Return original error code if new conditional evaluates to true. Break out of case blocks instead of using if/else. Do not modify program logic. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 195 ++++++++++++++++++----------------- 1 file changed, 98 insertions(+), 97 deletions(-) commit f0b7d3a67bce75bc1e5910e30c3890ae01e3be04 Author: Tobin C. Harding Date: Tue Mar 14 09:54:08 2017 +1100 staging: ks7010: fix checkpatch memset warning Checkpatch emits WARNING: single byte memset is suspicious. Swapped 2nd/3rd argument? Call site in question is correct but is an unusual use of memset() to zero a single byte. The same can be achieved by assigning 0 directly to the memory location. Dereference pointer and assign 0 to that memory location. Use '\0' to make explicit that it is a char pointer. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad1e187f41a6dc008e5057805dc713551108799a Author: Tobin C. Harding Date: Tue Mar 14 09:54:07 2017 +1100 staging: ks7010: remove unnecessary cast Return value from kmalloc() does not require a cast. Remove unnecessary cast. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44dc9c86f9ed0e49b864e8337f98bbb1c09e0570 Author: Tobin C. Harding Date: Tue Mar 14 09:54:06 2017 +1100 staging: ks7010: remove unnecessary else statement Checkpatch emits WARNING: else is not generally useful after a break or return. Two warnings of this type are emitted, both are the result of a else statement after a return statement. The 'else' can safely be removed. Remove unnecessary else statement. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 7676b72428e84f344bd64fecc1d4c840e57a68d8 Author: Tobin C. Harding Date: Tue Mar 14 09:54:05 2017 +1100 staging: ks7010: move comparison to right hand side Checkpatch emits WARNING: Comparisons should place the constant on the right side of the test. Move constant to right hand side of test, modify operator to ensure logic is maintained. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e00b9bb34e2784f41bdfc7083c7d37ca1b97aca3 Author: Tobin C. Harding Date: Tue Mar 14 09:54:04 2017 +1100 staging: ks7010: remove multiple assignment Checkpatch emits CHECK: multiple assignments should be avoided. Move multiple assignment onto separate lines. Fix comment to use more natural English. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b5492d65eab0b56766a72a501469415a09a83e96 Author: Tobin C. Harding Date: Tue Mar 14 09:54:03 2017 +1100 staging: ks7010: remove dead code Checkpatch emits CHECK: Alignment should match open parenthesis. This is due to commented out code. Remove commented out (dead) code. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 2 -- 1 file changed, 2 deletions(-) commit a359491ad28183756ad883cf49e2bb3a0235145d Author: Tobin C. Harding Date: Tue Mar 14 09:54:02 2017 +1100 staging: ks7010: fix logical line continuation Checkpatch emits CHECK: Logical continuations should be on the previous line. Move logical continuation to previous line. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 64068bc31547946f635aed3beadb67031a473157 Author: Tobin C. Harding Date: Tue Mar 14 09:54:00 2017 +1100 staging: ks7010: fix checkpatch BLOCK_COMMENT_STYLE Checkpatch emits block comments warnings. Change comments blocks to be inline with kernel coding style for networking code. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 51 ++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 19 deletions(-) commit 03d55ab9f486ae46755a649e33949faac84beaf7 Author: Tobin C. Harding Date: Tue Mar 14 09:53:59 2017 +1100 staging: ks7010: fix checkpatch SPACING Checkpatch emits over 100 instances of CHECK: No space is necessary after a cast. Remove unnecessary space. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 212 +++++++++++++++++------------------ 1 file changed, 106 insertions(+), 106 deletions(-) commit 86ea6167cde51212319155c8515db22d58bf89b6 Author: Tobin C. Harding Date: Tue Mar 14 10:46:42 2017 +1100 staging: ks7010: fix spelling of Michael MIC Driver mixes spelling michael and michel in symbol names and comments. Michael here references the IEEE 802.11i Message Integrity Code. It is incorrect to spell it michel and confusing having two spellings for the same thing. Change michel -> micheal in both symbol names and comments. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 16 ++++++++-------- drivers/staging/ks7010/michael_mic.c | 8 ++++---- drivers/staging/ks7010/michael_mic.h | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) commit 879a0418ba0e4bb325b28937947f64a3c9c4e29a Author: simran singhal Date: Mon Mar 13 18:55:01 2017 +0530 staging: rtl8192u: ieee80211: Remove code in comments Commenting out code is a bad idea. As comments are for explaining what code is about. Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 4 ---- 1 file changed, 4 deletions(-) commit 9e7b319e1d1e6cba41ae96f791789a7806b29584 Author: Colin Ian King Date: Mon Mar 13 18:20:28 2017 +0000 staging: atomisp: fix missing break in switch statement I believe there is a missing break in the switch statement for case V4L2_CID_FOCUS_STATUS as the current fall-through looks suspect to me. Detected by CoverityScan, CID#1416580 ("Missing break in switch") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03028868eb195dad2ab69f81776779b91c3f9a42 Author: Colin Ian King Date: Mon Mar 13 17:55:12 2017 +0000 staging/atomisp: remove redundant null check on frame There is no need to perform a null check on frame as there is an earlier null check check and return hence making the null check redundant. Remove it. Detected by CoverityScan, CID#1416563 ("Logically Dead Code") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman .../media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 39c116dcfd5f4df42167f06414dd81fba0ffe74c Author: Dan Carpenter Date: Mon Mar 13 15:34:14 2017 +0300 staging: atomisp: potential underflow in atomisp_get_metadata_by_type() md_type is an enum. On my tests, GCC treats it as unsigned but according to the C standard it's an implementation dependant thing so we should check for negatives. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Dan Carpenter Acked-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cfd23945be7413351ef57ff5b07c5b037a7f9995 Author: simran singhal Date: Sun Mar 12 22:40:23 2017 +0530 staging: media: Remove unused function atomisp_set_stop_timeout() The function atomisp_set_stop_timeout on being called, simply returns back. The function hasn't been mentioned in the TODO and doesn't have FIXME code around. Hence, atomisp_set_stop_timeout and its calls have been removed. This was done using Coccinelle. @@ identifier f; @@ void f(...) { -return; } Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 1 - drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat.h | 1 - drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c | 5 ----- 3 files changed, 7 deletions(-) commit 68f9c65467614d140619476bd6e0eba3b0d23c77 Author: Varsha Rao Date: Sun Mar 12 21:49:08 2017 +0530 staging: media: atomisp: Remove gc2235_init() function. Remove gc2235_init() function definition and call, as it is used only once in gc2235.c file. Replace the function call with return value, __gc2235_init() function call. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/gc2235.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit d64fe06e1e4617865d7890b293990c100c72f086 Author: Varsha Rao Date: Sun Mar 12 21:47:04 2017 +0530 staging: media: atomisp: Compress return logic into one line. Simplify function return by merging assignment and return into a single line. The following coccinelle script is used to fix this issue. @@ expression e; local idexpression ret; @@ -ret = e; -return ret; +return e; This patch also removes unnecessary declarations. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/gc2235.c | 9 ++------- drivers/staging/media/atomisp/i2c/ov8858.c | 4 +--- 2 files changed, 3 insertions(+), 10 deletions(-) commit 87bb40171cf75e46076dfd18b5801021eb4873f2 Author: sayli karnik Date: Sun Mar 12 21:25:20 2017 +0530 staging: media: mt9m114: Use true/false instead of 1/0 for bool initialisations Bool initializations should use true and false instead of 1 and 0. Detected by coccinelle/misc/boolinit.cocci. Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/mt9m114.c | 4 ++-- drivers/staging/media/atomisp/i2c/mt9m114.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 0adbfd4694c2b2ae2f48b04295eadafed70612ad Author: Aishwarya Pant Date: Sun Mar 12 21:10:07 2017 +0530 staging: bcm2835-audio: fix memory leak in bcm2835_audio_open_connection() In bcm2835_audio_open_connection(), if VCHI connection fails or initialisation of VCHI audio instance fails vchi_instance needs to be deallocated otherwise it will cause a memory leak. Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 1 + 1 file changed, 1 insertion(+) commit e3173e5783ffdf3aa7bcc8ac0a150b17d83c1792 Author: Aishwarya Pant Date: Sun Mar 12 21:09:49 2017 +0530 staging: bcm2835-audio: deallocate work when queue_work(...) fails This patch de-allocates work when queue_work(..) fails in the bcm2835-audio work functions Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 3 +++ 1 file changed, 3 insertions(+) commit 8f1fff07b07fdb15d1d585f6eb1ea56e748bc637 Author: Aishwarya Pant Date: Sun Mar 12 21:09:31 2017 +0530 staging: bcm2835-audio: use conditional only for error case * Refactor conditional to check if memory allocation has failed and immediately return (-ENOMEM); if block for success case is removed. * Return the error value -EBUSY when queue_work() fails. Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 67 +++++++++++----------- 1 file changed, 32 insertions(+), 35 deletions(-) commit 5e00b25853ef2d5602d14f0e6039268cc89e6afe Author: Aishwarya Pant Date: Sun Mar 12 21:09:14 2017 +0530 staging: bcm2835-audio: propagate PTR_ERR value instead of -EPERM It is better to propagate PTR_ERR value instead of a hardcoded value (-EPERM here) Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d676e37fb656a091653b61c38357c228353f09fe Author: Aishwarya Pant Date: Sun Mar 12 21:09:00 2017 +0530 staging: bcm2835-audio: replace null with error pointer value This patch replaces NULL values returned by vc_vchi_audio_init(...) with error pointer values: - Return ERR_PTR(-EINVAL) when too many instances of audio service are initialised - Return ERR_PTR(-ENOMEM) when kzalloc fails - RETURN ERR_PTR(-EPERM) when vchi connections fail to open Similarly, a NULL check where vc_vchi_audio_init(...) is called is replaced by IS_ERR(..) Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit fc8612b1cbd55d805b5df3c867d21699873a95b3 Author: Aishwarya Pant Date: Sun Mar 12 21:08:43 2017 +0530 staging: bcm2835-audio: Replace kmalloc with kzalloc Replace kmalloc and memset with kzalloc. Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4cd3096dfdeed58ee072a18f0c079e1d9357961c Author: Arushi Singhal Date: Tue Mar 14 02:18:49 2017 +0530 staging: sm750fb: Alignment should match open parenthesis Fix checkpatch issues: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_mode.c | 79 +++++++++++++++++------------------ 1 file changed, 39 insertions(+), 40 deletions(-) commit 23b6fc73ced83deef168698ea691d82b2e7d93b5 Author: Arushi Singhal Date: Tue Mar 14 02:18:48 2017 +0530 staging: sm750fb: fixes add blank line after function/struct/union/enum declarations This patch fixes the warnings reported by checkpatch.pl for please use a blank line after function/struct/union/enum declarations. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750_cursor.c | 3 +++ 1 file changed, 3 insertions(+) commit d228cf8744150351a693c26032bcf6745ed5ba98 Author: Arushi Singhal Date: Tue Mar 14 02:18:47 2017 +0530 staging: sm750fb: function prototype argument should have an identifier name function prototype arguments like 'struct vb_device_info *','unsigned long' etc. should have an identifier name. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_display.h | 2 +- drivers/staging/sm750fb/ddk750_mode.h | 2 +- drivers/staging/sm750fb/ddk750_power.h | 2 +- drivers/staging/sm750fb/sm750.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) commit 1e4390ae1015fea75b2c66abeff104fa903f6f60 Author: Martin Kepplinger Date: Sun Mar 12 12:54:24 2017 +0100 Documentation: input: fix path to struct ff_effect's definition The UAPI header split failed to update the documentation here; fix things accordingly. Signed-off-by: Martin Kepplinger Signed-off-by: Jonathan Corbet Documentation/input/ff.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 30e010f64a9da9928dc3df205b96155e68c2eff1 Author: Martin Kepplinger Date: Sun Mar 12 12:54:23 2017 +0100 Documentation: admin-guide: fix path to input key definitions The UAPI header split failed to update the documentation here; fix things accordingly. Signed-off-by: Martin Kepplinger Signed-off-by: Jonathan Corbet Documentation/admin-guide/sysrq.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 28a5c9648bcb8e55ee6b9ff8a707c5c654f3b633 Author: Martin Kepplinger Date: Sun Mar 12 12:54:22 2017 +0100 Documentation: input: fix path to input code defnitions The UAPI header split failed to update the documentation in input-programming.txt; fix things accordingly. Signed-off-by: Martin Kepplinger Signed-off-by: Jonathan Corbet Documentation/input/input-programming.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1e1f780f8bbb08afdc01311e635778d2bd09fe9b Author: Martin Kepplinger Date: Sun Mar 12 12:54:21 2017 +0100 Documentation: hid: fix path to input bus definitions The UAPI header split failed to update the documentation here; fix things accordingly. Signed-off-by: Martin Kepplinger Signed-off-by: Jonathan Corbet Documentation/hid/hidraw.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 904d94f063cc7763a130625c0e32b64b6f9ffc0d Author: Baruch Siach Date: Wed Mar 8 21:50:31 2017 +0200 doc: ABI: vdso: update parse_vdso.c reference Since commit f9b6b0ef603 ("selftests: move vDSO tests from Documentation/vDSO") parse_vdso.c moved under selftests. Update the reference to match. Cc: Jonathan Corbet Signed-off-by: Baruch Siach Signed-off-by: Jonathan Corbet Documentation/ABI/stable/vdso | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2a0e49279850d28c450f27e51b419ce90bacdcdc Author: Rafael J. Wysocki Date: Mon Mar 13 23:59:57 2017 +0100 cpufreq: User/admin documentation update and consolidation The user/admin documentation of cpufreq is badly outdated. It conains stale and/or inaccurate information along with things that are not particularly useful. Also, some of the important pieces are missing from it. For this reason, add a new user/admin document for cpufreq containing current information to admin-guide and drop the old outdated .txt documents it is replacing. Since there will be more PM documents in admin-guide going forward, create a separate directory for them and put the cpufreq document in there right away. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Signed-off-by: Jonathan Corbet Documentation/admin-guide/index.rst | 1 + Documentation/admin-guide/pm/cpufreq.rst | 700 +++++++++++++++++++++++++++++++ Documentation/admin-guide/pm/index.rst | 15 + Documentation/cpu-freq/boost.txt | 93 ---- Documentation/cpu-freq/governors.txt | 301 ------------- Documentation/cpu-freq/index.txt | 7 - Documentation/cpu-freq/user-guide.txt | 228 ---------- 7 files changed, 716 insertions(+), 629 deletions(-) commit db515368c3464cd261fa7c7ecb4e87ad59881684 Merge: 4495c08 6ae4d21 Author: Olof Johansson Date: Mon Mar 13 16:06:38 2017 -0700 Merge tag 'gemini-dts-base' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into next/dt Base patches for Gemini device trees: - Bindings for the platform. - Device trees for everything that was available as board files previously. - New device tree for my target system SQ201. - Device tree bindings for the watchdog. The driver was merged to the watchdog subsystem so this was probably just missed by the maintainer, and it is ACKed by Rob Herring. * tag 'gemini-dts-base' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: dts: add watchdog to the Gemini watchdog: add DT bindings for Cortina Gemini ARM: dts: add a devicetree for Wiliboard WBD-222 ARM: dts: add a devicetree for Wiliboard WBD-111 ARM: dts: add a devicetree for Teltonika RUT1xx ARM: dts: add a devicetree for Raidsonic NAS IB-4220-B ARM: dts: add device tree for Gemini SoC and SQ201 ARM: dts: add top-level DT bindings for Cortina Gemini Signed-off-by: Olof Johansson commit 736d830145c214dccee4aa1bba2fdb74c2b6fda4 Merge: 4495c08 6dbb708 Author: Olof Johansson Date: Mon Mar 13 16:05:29 2017 -0700 Merge tag 'gemini-multiplat-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into next/soc This patchset: - Converts the Gemini platform to device tree. - Deletes all the board files. - Fixes the prerequisities for a multiplatform boot and switches to multiplatform. * tag 'gemini-multiplat-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: gemini: convert to ARMv4 multiplatform ARM: gemini: select ARM_PATCH_PHYS_VIRT and AUTO_ZRELADDR ARM: gemini: switch to sparse IRQs ARM: gemini: delete all boardfiles ARM: gemini: DT for the Cortina Gemini SoC platforms ARM: gemini: convert to MULTI_IRQ_HANDLER Signed-off-by: Olof Johansson commit 1a002a297b0aac5e720c4b16ffcc52053ab18754 Merge: 4495c08 58e7696 Author: Olof Johansson Date: Mon Mar 13 16:02:37 2017 -0700 Merge tag 'renesas-arm64-defconfig-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/arm64 Renesas ARM64 Based SoC Defconfig Updates for v4.12 * Enable SH Mobile I2C controller * tag 'renesas-arm64-defconfig-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: defconfig: Enable SH Mobile I2C controller Signed-off-by: Olof Johansson commit 8fa1bb506fc9b5b0f7b5e42cee4f8213325a98ee Author: Mauro Carvalho Chehab Date: Thu Mar 9 15:14:52 2017 -0300 docs-rst: Don't use explicit Makefile rules to build SVG and DOT files Now that we have an extension to handle images, use it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/media/Makefile | 47 +--------------------- Documentation/media/intro.rst | 6 +-- Documentation/media/uapi/dvb/intro.rst | 6 +-- Documentation/media/uapi/v4l/crop.rst | 4 +- Documentation/media/uapi/v4l/dev-raw-vbi.rst | 22 +++++----- Documentation/media/uapi/v4l/dev-subdev.rst | 22 +++++----- Documentation/media/uapi/v4l/field-order.rst | 11 +++-- Documentation/media/uapi/v4l/pixfmt-nv12mt.rst | 8 ++-- Documentation/media/uapi/v4l/selection-api-003.rst | 6 +-- Documentation/media/uapi/v4l/subdev-formats.rst | 4 +- 10 files changed, 45 insertions(+), 91 deletions(-) commit c55fa3cccbc2c672e7f118be8f7484e53a8e9e77 Author: Francois Romieu Date: Sat Mar 11 19:41:36 2017 -0500 atm: remove an unnecessary loop Andrey reported this kernel warning: WARNING: CPU: 0 PID: 4114 at kernel/sched/core.c:7737 __might_sleep+0x149/0x1a0 do not call blocking ops when !TASK_RUNNING; state=1 set at [] prepare_to_wait+0x182/0x530 The deeply nested alloc_skb is a problem. Diagnosis: nesting is wrong. It makes zero sense. Fix it and the implicit task state change problem automagically goes away. alloc_skb() does not need to be in the "while" loop. alloc_skb() does not need to be in the {prepare_to_wait/add_wait_queue ... finish_wait/remove_wait_queue} block. I claim that: - alloc_tx() should only perform the "wait_for_decent_tx_drain" part - alloc_skb() ought to be done directly in vcc_sendmsg - alloc_skb() failure can be handled gracefully in vcc_sendmsg - alloc_skb() may use a (m->msg_flags & MSG_DONTWAIT) dependent GFP_{KERNEL / ATOMIC} flag Reported-by: Andrey Konovalov Reviewed-and-Tested-by: Chas Williams <3chas3@gmail.com> Signed-off-by: Chas Williams <3chas3@gmail.com> Signed-off-by: David S. Miller net/atm/common.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit be086e7c53f1fac51eed14523b28f2214b548dd2 Author: Mintz, Yuval Date: Sat Mar 11 18:39:18 2017 +0200 qed*: Utilize Firmware 8.15.3.0 This patch advances the qed* drivers into using the newer firmware - This solves several firmware bugs, mostly related [but not limited to] various init/deinit issues in various offloaded protocols. It also introduces a major 4-Cached SGE change in firmware, which can be seen in the storage drivers' changes. In addition, this firmware is required for supporting the new QL41xxx series of adapters; While this patch doesn't add the actual support, the firmware contains the necessary initialization & firmware logic to operate such adapters [actual support would be added later on]. Changes from Previous versions: ------------------------------- - V2 - fix kbuild-test robot warnings Signed-off-by: Tomer Tayar Signed-off-by: Ram Amrani Signed-off-by: Manish Rangankar Signed-off-by: Chad Dupuis Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/infiniband/hw/qedr/main.c | 5 +- drivers/infiniband/hw/qedr/qedr.h | 3 +- drivers/infiniband/hw/qedr/qedr_cm.c | 3 - drivers/infiniband/hw/qedr/qedr_hsi.h | 56 - drivers/infiniband/hw/qedr/verbs.c | 3 +- drivers/net/ethernet/qlogic/qed/qed.h | 2 +- drivers/net/ethernet/qlogic/qed/qed_cxt.c | 5 +- drivers/net/ethernet/qlogic/qed/qed_debug.c | 1564 ++++++++++++-------- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 764 +++++++++- .../net/ethernet/qlogic/qed/qed_init_fw_funcs.c | 56 +- drivers/net/ethernet/qlogic/qed/qed_init_ops.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 48 +- drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 30 + drivers/net/ethernet/qlogic/qed/qed_roce.c | 220 ++- drivers/net/ethernet/qlogic/qed/qed_roce.h | 11 +- drivers/net/ethernet/qlogic/qed/qed_spq.c | 13 +- drivers/net/ethernet/qlogic/qede/qede.h | 2 +- drivers/scsi/qedf/Makefile | 2 +- drivers/scsi/qedf/drv_fcoe_fw_funcs.c | 190 +++ drivers/scsi/qedf/drv_fcoe_fw_funcs.h | 93 ++ drivers/scsi/qedf/drv_scsi_fw_funcs.c | 44 + drivers/scsi/qedf/drv_scsi_fw_funcs.h | 85 ++ drivers/scsi/qedf/qedf.h | 23 +- drivers/scsi/qedf/qedf_els.c | 25 +- drivers/scsi/qedf/qedf_io.c | 670 +++------ drivers/scsi/qedi/Makefile | 2 +- drivers/scsi/qedi/qedi_fw.c | 1068 ++++++------- drivers/scsi/qedi/qedi_fw_api.c | 781 ++++++++++ drivers/scsi/qedi/qedi_fw_iscsi.h | 117 ++ drivers/scsi/qedi/qedi_fw_scsi.h | 55 + drivers/scsi/qedi/qedi_iscsi.c | 12 +- drivers/scsi/qedi/qedi_iscsi.h | 2 +- drivers/scsi/qedi/qedi_version.h | 4 +- include/linux/qed/common_hsi.h | 30 +- include/linux/qed/eth_common.h | 3 + include/linux/qed/fcoe_common.h | 180 +-- include/linux/qed/iscsi_common.h | 241 ++- include/linux/qed/roce_common.h | 17 + include/linux/qed/storage_common.h | 30 +- include/linux/qed/tcp_common.h | 1 + 40 files changed, 4234 insertions(+), 2228 deletions(-) commit 6a019c5c5059aa0d14788d015aba2f5934aa16ec Merge: b66239b a59166e Author: David S. Miller Date: Mon Mar 13 15:29:23 2017 -0700 Merge branch 'mpls-ttl-propagation' Robert Shearman says: ==================== mpls: allow TTL propagation from IP packets to be configured Allow TTL propagation from IP packets to MPLS packets to be configured. Add a new optional LWT attribute, MPLS_IPTUNNEL_TTL, which allows the TTL to be set in the resulting MPLS packet, with the value of 0 having the semantics of enabling propagation of the TTL from the IP header (i.e. non-zero values disable propagation). Also allow the configuration to be overridden globally by reusing the same sysctl to control whether the TTL is propagated from IP packets into the MPLS header. If the per-LWT attribute is set then it overrides the global configuration. If the TTL isn't propagated then a default TTL value is used which can be configured via a new sysctl, "net.mpls.default_ttl". This is kept separate from the configuration of whether IP TTL propagation is enabled as it can be used in the future when non-IP payloads are supported (i.e. where there is no payload TTL that can be propagated). ==================== Signed-off-by: Robert Shearman Acked-by: Roopa Prabhu Signed-off-by: David S. Miller commit a59166e470868d92f0813977817e99e699398af5 Author: Robert Shearman Date: Fri Mar 10 20:43:25 2017 +0000 mpls: allow TTL propagation from IP packets to be configured Allow TTL propagation from IP packets to MPLS packets to be configured. Add a new optional LWT attribute, MPLS_IPTUNNEL_TTL, which allows the TTL to be set in the resulting MPLS packet, with the value of 0 having the semantics of enabling propagation of the TTL from the IP header (i.e. non-zero values disable propagation). Also allow the configuration to be overridden globally by reusing the same sysctl to control whether the TTL is propagated from IP packets into the MPLS header. If the per-LWT attribute is set then it overrides the global configuration. If the TTL isn't propagated then a default TTL value is used which can be configured via a new sysctl, "net.mpls.default_ttl". This is kept separate from the configuration of whether IP TTL propagation is enabled as it can be used in the future when non-IP payloads are supported (i.e. where there is no payload TTL that can be propagated). Signed-off-by: Robert Shearman Acked-by: David Ahern Tested-by: David Ahern Signed-off-by: David S. Miller Documentation/networking/mpls-sysctl.txt | 8 ++++ include/net/mpls_iptunnel.h | 2 + include/net/netns/mpls.h | 1 + include/uapi/linux/mpls_iptunnel.h | 2 + net/mpls/af_mpls.c | 11 +++++ net/mpls/mpls_iptunnel.c | 73 ++++++++++++++++++++++++++------ 6 files changed, 84 insertions(+), 13 deletions(-) commit 5b441ac8784c1e7f3c619f14da4c3f52e87348d5 Author: Robert Shearman Date: Fri Mar 10 20:43:24 2017 +0000 mpls: allow TTL propagation to IP packets to be configured Provide the ability to control on a per-route basis whether the TTL value from an MPLS packet is propagated to an IPv4/IPv6 packet when the last label is popped as per the theoretical model in RFC 3443 through a new route attribute, RTA_TTL_PROPAGATE which can be 0 to mean disable propagation and 1 to mean enable propagation. In order to provide the ability to change the behaviour for packets arriving with IPv4/IPv6 Explicit Null labels and to provide an easy way for a user to change the behaviour for all existing routes without having to reprogram them, a global knob is provided. This is done through the addition of a new per-namespace sysctl, "net.mpls.ip_ttl_propagate", which defaults to enabled. If the per-route attribute is set (either enabled or disabled) then it overrides the global configuration. Signed-off-by: Robert Shearman Acked-by: David Ahern Tested-by: David Ahern Signed-off-by: David S. Miller Documentation/networking/mpls-sysctl.txt | 11 ++++ include/net/netns/mpls.h | 2 + include/uapi/linux/rtnetlink.h | 1 + net/mpls/af_mpls.c | 87 +++++++++++++++++++++++++++++--- net/mpls/internal.h | 7 +++ 5 files changed, 100 insertions(+), 8 deletions(-) commit 8f86b9118427949b902310fdfa479dfdb25a6052 Author: Tobin C. Harding Date: Mon Mar 13 12:37:34 2017 +1100 staging: dgnc: remove explicit cast Function return type is 'int'. Returned variable is of type 'uint'. uint can be implicitly converted to int. Most significant bit is not set so there is no risk in implicit conversion. Remove unnecessary type cast. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7261fb9bcb40251e4d3153f30624bffe1bba914d Author: Tobin C. Harding Date: Mon Mar 13 12:37:33 2017 +1100 staging: dgnc: fix whitespace before return Checkpatch emits CHECK: Blank lines aren't necessary before a close brace '}'. Previous attempts were made to make uniform the error handling in dgnc but improvements are still possible. Undo whitespace changes that should not have been made :(. Make return statement placement uniform throughout dgnc. Fix checkpatch CHECK. Make whitespace changes only. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 6 +++++- drivers/staging/dgnc/dgnc_mgmt.c | 3 ++- drivers/staging/dgnc/dgnc_tty.c | 9 +++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) commit 93cf5f43421513ee6c07da68903221003a490f11 Author: Tobin C. Harding Date: Mon Mar 13 12:37:32 2017 +1100 staging: dgnc: return error code directly In various functions a return code variable is defined at the top of function, for example; rc = -ENODEV; and then the variable is returned. This makes it harder to read since it separates the error code from the return site. Return the error code directly instead of using a variable. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 68 +++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 36 deletions(-) commit cb52fce16027d79a97d0870a1110d4a4493fa0a8 Author: simran singhal Date: Sun Mar 12 22:25:42 2017 +0530 staging: comedi: amplc_pci224: Convert macro GAT_CONFIG to static inline function Convert macro GAT_CONFIG to static inline function as static inline functions are preferred over macros. This change is possible since the arguments at all call sites have the same type. The uses were updated with Coccinelle: @r1@ expression dev,reg,chan,src; @@ -GAT_CONFIG(chan, src) +pci224_gat_config(chan, src) Also, the comment describing the macro has been removed. Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/amplc_pci224.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 06cb6b5434937180251d0ddb3d9a4cb2af6015da Author: Varsha Rao Date: Sun Mar 12 20:37:30 2017 +0530 staging: comedi: Compress return logic into one line. Simplify function return by merging assignment and return into a single line. The following coccinelle script is used to fix this issue. @@ expression e; local idexpression ret; @@ -ret = e; -return ret; +return e; Signed-off-by: Varsha Rao Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/cb_pcidas64.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b66239b6824f387361bf18747a7e93760ac3c0fb Author: Philippe Reynes Date: Sun Mar 12 23:16:25 2017 +0100 net: usb: rtl8150: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/usb/rtl8150.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) commit 06144dcfd3b473a0b21c6c836ceb0a9cc4aab1c3 Author: Philippe Reynes Date: Sun Mar 12 22:41:58 2017 +0100 net: usb: r8152: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Acked-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit de1e98c69bc22870342a099c2fc1257b09b15b7a Author: Philippe Reynes Date: Sun Mar 12 22:08:26 2017 +0100 net: usb: catc: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/usb/catc.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit 3c9b803b87b5ecb4f15b24886f7f97116cc4e1d8 Author: Philippe Reynes Date: Sun Mar 12 18:02:36 2017 +0100 net: usb: asix88179_178a: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/usb/ax88179_178a.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 29ccc49d69615818743b2d31b16d698b6eea8aad Author: Philippe Reynes Date: Sat Mar 11 22:03:50 2017 +0100 net: tun: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/tun.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit a062d19e941071bac9f67b61a4bd5f851fd4ede9 Author: Philippe Reynes Date: Thu Mar 9 23:10:13 2017 +0100 net: net_netdev: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ntb_netdev.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit cb5de2f8aab4a3f43c0f958c332a986c4b3c44cb Author: Craig Inches Date: Sun Mar 12 19:18:40 2017 +0000 staging: lustre shorten multiple lines over 80 char in lu_object.h This patch adjusts lines so that they are less than 80 char. Checkpatch.pl idenitified the issue. Signed-off-by: Craig Inches Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lu_object.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d3cfd5b9c8dc2bd6dff08acb074973a09ba30751 Author: Elena Reshetova Date: Mon Mar 6 16:21:10 2017 +0200 drivers: convert vme_user_vma_priv.refcnt from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Greg Kroah-Hartman drivers/staging/vme/devices/vme_user.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6a386dd070f707ca40d96c8d20043733478ef49e Author: Maciej Billewicz Date: Mon Mar 13 22:32:19 2017 +0100 Staging: android: ion: ion_dummy_driver: remove unnecessary empty line Fix coding style issue. Signed-off-by: Maciej Billewicz Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_dummy_driver.c | 1 - 1 file changed, 1 deletion(-) commit 650cd16b0d6cb6a59dc7b1de664ca0ec8817d8a6 Author: Tobin C. Harding Date: Mon Mar 13 18:54:08 2017 +1100 staging: ks7010: add parentheses to complex macro Checkpatch emits ERROR: Macros with complex values should be enclosed in parentheses. Error may be fixed by adding parentheses around macro definition, macros are simple arithmetic statement. Add parentheses around macro definitions. Fix 24 cases of identical error. Do commented out macros also to save the next developer from having to add them. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_ioctl.h | 64 +++++++++++++++++----------------- 1 file changed, 32 insertions(+), 32 deletions(-) commit 3d2033e33a2aa1d64bae208d83a9be127c633f53 Author: Tobin C. Harding Date: Mon Mar 13 18:54:07 2017 +1100 staging: ks7010: fix checkpatch whitespace warns Checkpatch emits various warnings, errors and checks; ERROR:TRAILING_WHITESPACE: trailing whitespace WARNING:SPACE_BEFORE_TAB: please, no space before tabs WARNING:SPACE_BEFORE_TAB: please, no space before tabs ERROR:CODE_INDENT: code indent should use tabs where possible CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis These are all trivial whitespace fixes. Fix them all in one patch. Change only whitespace. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_ioctl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dfe41b4f4c8d9d46a95da6959d2852757dfa8b3b Author: Tobin C. Harding Date: Mon Mar 13 17:38:22 2017 +1100 staging: ks7010: add variables key, key_index 'auth_type - 1' is used as an index into a key table. Adding a variable appropriately named simplifies the code and adds meaning when reading. Adding a pointer variable of type struct *kpa_key_t adds to readability by removing the table access each time the key is used. The key index is used to create a string so having it named adds additional meaning when creating the string. Declare variable 'key_index' and define it at declaration time. Declare a pointer variable 'key' and define it to point to the correct key in the key table. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 1b45ba65091483cbdfae57b2afc256936e3a3d96 Author: Tobin C. Harding Date: Mon Mar 13 17:38:21 2017 +1100 staging: ks7010: reduce length of comment string Comment string is unnecessarily verbose. Checkpatch emits WARNING: line over 80 characters. Reduce comment string without loss of meaning. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e37c7154a91bde5ca8b7f9bf2bec93518f74553 Author: Tobin C. Harding Date: Mon Mar 13 17:38:20 2017 +1100 staging: ks7010: move quoted string onto single line Checkpatch emits WARNING: quoted string split across lines. Line is already over 80 characters long, adding 3 more does little to effect line length while improving readibility. Concatenate split string into single line. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c60b486d4bbb65c764b654588bb0e90bd953d1d5 Author: Tobin C. Harding Date: Mon Mar 13 17:38:19 2017 +1100 staging: ks7010: refactor newly separated function Checkpatch emits various warnings and checks; WARNING: Avoid multiple line dereference CHECK: Alignment should match open parenthesis WARNING: line over 80 characters CHECK: Blank lines aren't necessary before a close brace '}' These are all whitespace fixes. Refactor whitespace inline with kernel coding style. Fix various checkpatch warnings. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 42 +++++++++++++++----------------------- 1 file changed, 17 insertions(+), 25 deletions(-) commit 6422c6efb3b1d296ee2b79b6961a02952a75ee53 Author: Tobin C. Harding Date: Mon Mar 13 17:38:18 2017 +1100 staging: ks7010: fix line continuations Checkpatch emits CHECK: Logical continuations should be on the previous line. Also the same code section causes checkpatch to emit WARNING: Avoid multiple line dereference. Move logical line continuations onto the previous line. Move multiple line dereferences onto single line. Make these two changes in a single patch to give review a chance to critique the final layout of the *complex* logical statement. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit dfd6b480c9e63d520aac932b2ed1a729a1f4a6a6 Author: Tobin C. Harding Date: Mon Mar 13 17:38:17 2017 +1100 staging: ks7010: reduce level of indentation Code is deeply nested. One level of indentation may be removed by inverting if statement conditional. Invert conditional, return if new conditional evaluates to true. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 136 +++++++++++++++++++------------------ 1 file changed, 69 insertions(+), 67 deletions(-) commit 034a7178d21381d82dd83330776cff30a707bc00 Author: Tobin C. Harding Date: Mon Mar 13 17:38:16 2017 +1100 staging: ks7010: move WPA code to separate function Checkpatch emits WARNING: Too many leading tabs - consider code refactoring. Function contains 5 levels of nesting and 14 local variables. Code can be simplified and nesting reduced by refactoring into separate functions. WPA code is contained and may be factored out into a separate function. This will reduce the length and complexity of hostif_data_indication(). At times within the WPA code errors result in the function returning. In order to maintain this behaviour new function should return a status integer. Factor out WPA code into separate function. Add only code needed to get compilation to pass, including modifying return statements. Make no other code changes, program logic is unchanged. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 176 ++++++++++++++++++++----------------- 1 file changed, 97 insertions(+), 79 deletions(-) commit 33590c18529973683d41ba0bc942f8e162ab3a21 Author: Samuel Thibault Date: Mon Mar 13 01:17:14 2017 +0100 speakup: Support spelling unicode characters This supports spelling unicode characters by just passing them to the speech synthesis in direct mode. Signed-off-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit c188966067b48acb94fea37aed06a142e3001122 Author: Samuel Thibault Date: Mon Mar 13 01:17:13 2017 +0100 speakup: make get_char actually get unicode characters 9831013cbdbd3d06430a1db01d8c32d50c7d1c04 ('speakup: convert screen reading to 16bit characters') paved the way for handling unicode characters in speakup, but for the review mode, it missed actually getting unicode characters from the VC. This fixes by just turning the use_unicode parameter to 1. Signed-off-by: Samuel Thibault Tested-by: Zahari Yurukov Reviewed-by: Chris Brannon Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 533131df8a1a554089d6b356866f61e553917b16 Author: Arushi Singhal Date: Tue Mar 14 02:10:18 2017 +0530 staging: speakup: fix "Alignment match open parenthesis" Fix checkpatch issues: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/kobjects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d042a0e43cab5850b0a085b02a20eae3ba033039 Author: Derek Robson Date: Sat Feb 11 11:28:25 2017 +1300 Staging: media: davinci_vpfe - style fix Fixed alignment of block commenents across whole driver. Found using checkpatch. Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman .../staging/media/davinci_vpfe/davinci_vpfe_user.h | 24 +++++++++++----------- .../staging/media/davinci_vpfe/dm365_ipipe_hw.c | 4 ++-- .../staging/media/davinci_vpfe/dm365_isif_regs.h | 20 +++++++++--------- drivers/staging/media/davinci_vpfe/dm365_resizer.c | 6 +++--- 4 files changed, 27 insertions(+), 27 deletions(-) commit 87ddb91067b944cb983db23bcd3dff2ef77c7f8a Author: Derek Robson Date: Sat Feb 11 13:42:38 2017 +1300 Staging: media: lirc - style fix Changed permissions to octal across whole driver Found by checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_sasem.c | 2 +- drivers/staging/media/lirc/lirc_sir.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit f3e59ec8880575a45035ed226481d708faa41ed2 Author: simran singhal Date: Mon Mar 13 19:26:24 2017 +0530 staging: android: ion: 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: simran singhal Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0bdd35bd955726eb9983d0750e97e2f23e43c818 Author: Narcisa Ana Maria Vasile Date: Sun Mar 5 18:26:54 2017 +0200 staging: iio: adis16240: Group similar macros into enums Group the scan indexes into an enum. Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16240.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a3b2ce9635ebfc034d97349aa2c626c4c3b00245 Author: Narcisa Ana Maria Vasile Date: Sun Mar 5 18:26:41 2017 +0200 staging: iio: adis16209: Group similar macros into enums Group the scan indexes into an enum. Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16209.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit e7d87687cbe9d94b2d3799dd31681b87adee84be Author: simran singhal Date: Sat Mar 11 19:56:44 2017 +0530 staging: iio: gyro: Remove & on function name to conform to similar IIO drivers Remove & from function pointers to conform to the style preferred in IIO. (Note that this is fine in staging drivers, but would create too much churn to do outside of staging, unless otherwise working on a driver). Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/gyro/adis16060_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67cba0264a99602175695c7686f2c034250cd0c1 Author: simran singhal Date: Sat Mar 11 19:56:43 2017 +0530 staging: iio: resolver: Remove & on function name to align with other IIO drivers. Remove & from function pointers to conform to the style found in the wider subsystem. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/resolver/ad2s1200.c | 2 +- drivers/staging/iio/resolver/ad2s90.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3167d9259cf16a5decad88516a376203ce70b8ff Author: simran singhal Date: Sat Mar 11 19:56:42 2017 +0530 staging: iio: adis16203: Remove exceptional & on function name Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16203.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ebfb115c9cedc7dfef93b3f071caa71b063f4a5d Author: simran singhal Date: Sat Mar 11 19:56:41 2017 +0530 staging: iio: adis16209: Remove exceptional & on function name Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16209.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f3e8556702ab84d45a3866e3dea2aa7078429fc1 Author: simran singhal Date: Sat Mar 11 19:56:40 2017 +0530 staging: iio: adis16201: Remove exceptional & on function name Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16201.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0701dccb211ac3a6a490afe14be2b197b5462b2d Author: simran singhal Date: Sat Mar 11 19:56:39 2017 +0530 staging: iio: adis16240: Remove exceptional & on function name Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16240.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4a7fa6278628aae127da06d87596e74cbba30da3 Author: simran singhal Date: Sat Mar 11 19:56:38 2017 +0530 staging: iio: cdc: ad7152: Remove exceptional & on function name Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7152.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 95d73c616b8c689a67533641f05b7ffc40cc6914 Author: simran singhal Date: Sat Mar 11 19:56:37 2017 +0530 staging: iio: cdc: ad7746: Remove exceptional & on function name Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7746.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2c4ef48a26c82844be17b90120ee32b7d2888653 Author: simran singhal Date: Sat Mar 11 19:56:36 2017 +0530 staging: iio: ad7780: Remove exceptional & on function name Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/adc/ad7780.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 705d5ed2dcdaf5aeb13978d8e05cf46bfcde7f09 Author: simran singhal Date: Sat Mar 11 19:56:35 2017 +0530 staging: iio: ad7192: Remove exceptional & on function name Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/adc/ad7192.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a2392d26881505b777b18869d47c71a275e23d75 Author: sayli karnik Date: Wed Mar 8 12:44:08 2017 +0530 staging: iio: ade7754: Move contents of header file to source file The contents of ade7754.h are only used in ade7754.c. Move the header contents to the source file and delete the header file. Signed-off-by: sayli karnik Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7754.c | 87 ++++++++++++++++++++++++++++++++++- drivers/staging/iio/meter/ade7754.h | 90 ------------------------------------- 2 files changed, 86 insertions(+), 91 deletions(-) commit 4b88e516a6a304eac79caa81f0bc5f712894cd69 Author: Alison Schofield Date: Thu Mar 9 12:46:24 2017 -0800 staging: iio: ad9832: replace mlock with driver private lock The IIO subsystem is redefining iio_dev->mlock to be used by the IIO core only for protecting device operating mode changes. ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. In this driver, mlock was being used to protect hardware state changes. Replace it with a lock in the devices global data. Signed-off-by: Alison Schofield Signed-off-by: Jonathan Cameron drivers/staging/iio/frequency/ad9832.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit fbe22d280014e783fe2454db2a0ba44fc4f68a5a Author: Max Filippov Date: Mon Mar 13 10:34:36 2017 -0700 xtensa: ISS: update kernel command line in platform_setup Move platform_setup call higher in initialization sequence so that it could change kernel command line. Check command line passed to simulator in ISS platform_stup and update kernel command line if there's anything. Signed-off-by: Max Filippov arch/xtensa/kernel/setup.c | 5 ++--- arch/xtensa/platforms/iss/setup.c | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) commit e8cd8da934f29a0aca2c4bd96310a0b6ba6e31a7 Author: Max Filippov Date: Mon Mar 13 10:23:02 2017 -0700 xtensa: ISS: add argc/argv simcall definitions There are three simcalls implemented by ISS and QEMU related to argc/argv processing: SYS_iss_argc (get number of command line arguments), SYS_iss_argv_size (get size of command line argument block) and SYS_iss_set_argv (copy command line arguments to virtual guest address). Add definitions for these calls to iss/include/platform/simcall.h Signed-off-by: Max Filippov arch/xtensa/platforms/iss/include/platform/simcall.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 3ced97305ded104e0c2814241952e261997dbb65 Author: Max Filippov Date: Mon Mar 13 10:28:33 2017 -0700 xtensa: ISS: cleanup setup.c Drop commented out code, unused extern definition, extra blank lines. Rewrite iss_panic_block initialization in C99 style. Signed-off-by: Max Filippov arch/xtensa/platforms/iss/setup.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) commit 5ba039a55498d78a787edaf8cc915f29a17cecf3 Author: Dou Liyang Date: Mon Mar 6 21:08:10 2017 +0800 x86/apic: Fix a comment in init_apic_mappings() commit c0104d38a740 ("x86, apic: Unify identical register_lapic_address() functions") renames acpi_register_lapic_address to register_lapic_address. But acpi_register_lapic_address remains in a comment, and renaming it to register_lapic_address is not suitable for this comment. Remove acpi_register_lapic_address and rewrite the comment. [ tglx: LAPIC address can be registered either by ACPI/MADT or MP info ] Signed-off-by: Dou Liyang Cc: yinghai@kernel.org Link: http://lkml.kernel.org/r/1488805690-5055-1-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/apic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e7ea7c9806a2681807257ea89085339d33f7fa0b Author: Arun Raghavan Date: Wed Mar 1 20:23:09 2017 +0530 rlimits: Print more information when CPU/RT limits are exceeded When a process is sent a SIGKILL because it exceeded CPU or RT limits, the cause may not be obvious in userspace -- daemonised processes just get killed, and even foreground process just see a 'Killed' message. The lack of any information on why this might be happening in logs can be confusing to users who are not aware of this mechanism. Add messages which dump the process name and tid in dmesg when a process exceeds its CPU or RT limits (soft and hard) in order to make it clearer to people debugging such issues. Signed-off-by: Arun Raghavan Link: http://lkml.kernel.org/r/20170301145309.27214-1-arun@arunraghavan.net Signed-off-by: Thomas Gleixner kernel/time/posix-cpu-timers.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5d64d209c4f672e221ea304106b30793f10d95a4 Author: Dou Liyang Date: Wed Mar 8 19:07:50 2017 +0800 x86/apic: Remove the SET_APIC_ID(x) macro The SET_APIC_ID() macro obfusates the code. Remove it to increase readability and add a comment to the apic struct to document that the callback is required on 64-bit. Signed-off-by: Dou Liyang Link: http://lkml.kernel.org/r/1488971270-14359-1-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/apic.h | 7 +------ arch/x86/kernel/apic/apic.c | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) commit 3e3eec09311a48c64104cafa193984cc807ab9e0 Merge: 68e5cfa 101cfbc Author: David S. Miller Date: Mon Mar 13 13:04:31 2017 -0700 Merge branch 'gtp-misc-improvements' Andreas Schultz says: ==================== gtp: misc improvements This is a resent of last series that missed the merge window. There are no changes compared to v4. v4: Compared to v3 it contains mostly smallish naming and spelling fixes. It also drops the documentation patch, Harald did a better job with the documentation and the some things I described do not yet match the implementation. I'll readd the relevant parts with a follow up series. This series lays the groundwork for removing the socket references from the GTP netdevice by removing duplicate code and simplifying the logic on some code paths. It slighly changes the GTP genl API by making the socket parameters optional (though one of them is still required). The removal of the socket references will break the 1:1 releation between GTP netdevice and GTP socket that prevents us to support multiple VRFs with overlapping IP addresse spaces attached to the same GTP-U entity (needed for multi APN support, coming a follow up series). Pablo found a socket hold problem in v2. In order to solve that I had to switch the socket references from the struct socket to the internal struct sock. This should have no functionl impact, but we can now hang on to the reference without blocking user space from closing the GTP socket. v4->v5: * resent for new merge window v3->v4: * drop the documentation patch * spelling fixes * pass nlattr instead of genl_info into gtp_find_dev, makes the code slightly more compact and readable v2->v3: * add documentation to explain the goal of all these changes * incorporate review comments * switch from struct socket to struct sock ==================== Signed-off-by: David S. Miller commit 101cfbc155d082e8567f697f86f89853c790be5e Author: Andreas Schultz Date: Thu Mar 9 17:43:02 2017 +0100 gtp: add socket to pdp context Having the socket present in context simplifies the sending logic. It also fixes the invalid assumption that we have to use the same sending socket for all client IP's on a specific gtp interface. Signed-off-by: Andreas Schultz Signed-off-by: David S. Miller drivers/net/gtp.c | 94 +++++++++++++++++++++++++++---------------------------- 1 file changed, 47 insertions(+), 47 deletions(-) commit 6b5e2e7401de30903ad05d3ef18e3a72d835ce24 Author: Andreas Schultz Date: Thu Mar 9 17:43:01 2017 +0100 gtp: consolidate pdp context destruction into helper Consolidate duplicate code into helper. Signed-off-by: Andreas Schultz Signed-off-by: David S. Miller drivers/net/gtp.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit d9e2dd122637034a0697bf268eed9233701b9dca Author: Andreas Schultz Date: Thu Mar 9 17:43:00 2017 +0100 gtp: unify genl_find_pdp and prepare for per socket lookup This unifies duplicate code into a helper. It also prepares the groundwork to add a lookup version that uses the socket to find attached pdp contexts. Signed-off-by: Andreas Schultz Signed-off-by: David S. Miller drivers/net/gtp.c | 121 ++++++++++++++++++++++-------------------------------- 1 file changed, 50 insertions(+), 71 deletions(-) commit 5b171f9cfe5e628c3537be159fa36fff1f5cec8f Author: Andreas Schultz Date: Thu Mar 9 17:42:59 2017 +0100 gtp: consolidate gtp socket rx path Add network device to gtp context in preparation for splitting the TEID from the network device. Use this to rework the socker rx path. Move the common RX part of v0 and v1 into a helper. Also move the final rx part into that helper as well. Signed-off-by: Andreas Schultz Signed-off-by: David S. Miller drivers/net/gtp.c | 80 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 36 deletions(-) commit 3fb94617ca1b2f60119ae14643a83a66079fe4c9 Author: Andreas Schultz Date: Thu Mar 9 17:42:58 2017 +0100 gtp: merge gtp_get_net and gtp_genl_find_dev Both function are always used together with the final goal to get the gtp_dev. This simplifies the code by merging them together. The netdevice lookup is changed to use the regular dev_get_by_index. The gtp netdevice list is now only used to find the PDP contexts for imcomming packets. It can be completely eliminated Once the TEID hash is moved into the GTP socket. Signed-off-by: Andreas Schultz Signed-off-by: David S. Miller drivers/net/gtp.c | 140 +++++++++++++++++++++++++----------------------------- 1 file changed, 66 insertions(+), 74 deletions(-) commit 1e3a3abd8b28cfda9d0d0167e50e0fe11bc372a9 Author: Andreas Schultz Date: Thu Mar 9 17:42:57 2017 +0100 gtp: make GTP sockets in gtp_newlink optional Having both GTPv0-U and GTPv1-U is not always desirable. Fallback from GTPv1-U to GTPv0-U was depreciated from 3GPP Rel-8 onwards. Post Rel-8 implementation are discuraged from listening on the v0 port (see 3GPP TS 29.281, Sect. 1). A future change will completely decouple the sockets from the network device. Till then, at least one of the sockets needs to be specified (either v0 or v1), the other is optional. Signed-off-by: Andreas Schultz Signed-off-by: David S. Miller drivers/net/gtp.c | 142 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 75 insertions(+), 67 deletions(-) commit 17886c4705853fe402d06b2820ae155d38fb345e Author: Andreas Schultz Date: Thu Mar 9 17:42:56 2017 +0100 gtp: switch from struct socket to struct sock for the GTP sockets After enabling the UDP encapsulation, only the sk member is used. Holding the socket would prevent user space from closing the socket, but holding a reference to the sk member does not have the same effect. This change will make it simpler to later detach the sockets from the netdevice. Signed-off-by: Andreas Schultz Signed-off-by: David S. Miller drivers/net/gtp.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) commit facc7a551cda4c7091b0413438b280e654659890 Author: Masahiro Yamada Date: Tue Mar 14 04:56:32 2017 +0900 ARM: dts: uniphier: add pagesize property to EEPROM of proto boards ST's spec says the page size of 24C64 is 32 byte. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-pro4-ace.dts | 1 + arch/arm/boot/dts/uniphier-pro4-sanji.dts | 1 + arch/arm/boot/dts/uniphier-pxs2-gentil.dts | 1 + 3 files changed, 3 insertions(+) commit 0ef48433586960817a293d21447b2ff48e566517 Author: Masahiro Yamada Date: Tue Mar 14 04:47:54 2017 +0900 ARM: dts: uniphier: add pagesize property to EEPROM of Support Card Microchip's spec says the page size of 24LC128 is 64 byte. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-ref-daughter.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9346ab7d72c0e0526bd9cea70fa4ad768fe27c20 Author: Chris Zhong Date: Wed Mar 8 10:27:57 2017 +0800 drm/rockchip: cdn-dp: add more log for video config In order to analyze some video config failed, add some useful printouts. Signed-off-by: Chris Zhong Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1488940077-22297-4-git-send-email-zyw@rock-chips.com drivers/gpu/drm/rockchip/cdn-dp-reg.c | 4 ++++ 1 file changed, 4 insertions(+) commit 05c00c2f196757cd59d5738ec4d02e365cf9e7a0 Author: Chris Zhong Date: Wed Mar 8 10:27:56 2017 +0800 drm/rockchip: cdn-dp: Correct PHY register address Correct some DP register address for PHY Configuration according to latest datasheet. Signed-off-by: Chris Zhong Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1488940077-22297-3-git-send-email-zyw@rock-chips.com drivers/gpu/drm/rockchip/cdn-dp-reg.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit a68b5bb6708e73d58b30680421df8166898e5cfc Author: Chris Zhong Date: Wed Mar 8 10:27:55 2017 +0800 drm/rockchip: cdn-dp: return error code when clk_get_rate failed The clk_get_rate return 0 if something goes wrong, so it can never be less then zero, the ret should be set a error code, otherwise the cdn_dp_clk_enable will return 0 when it failed at clk_get_rate. In addition, clk_get_rate() returns an "unsigned long", so use "unsigned long" instead of "u32" is better. Signed-off-by: Chris Zhong Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1488940077-22297-2-git-send-email-zyw@rock-chips.com drivers/gpu/drm/rockchip/cdn-dp-core.c | 5 +++-- drivers/gpu/drm/rockchip/cdn-dp-reg.c | 2 +- drivers/gpu/drm/rockchip/cdn-dp-reg.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) commit 5bc329503e8191c91c4c40836f062ef771d8ba83 Author: Xunlei Pang Date: Mon Mar 13 10:50:19 2017 +0100 x86/mce: Handle broadcasted MCE gracefully with kexec When we are about to kexec a crash kernel and right then and there a broadcasted MCE fires while we're still in the first kernel and while the other CPUs remain in a holding pattern, the #MC handler of the first kernel will timeout and then panic due to never completing MCE synchronization. Handle this in a similar way as to when the CPUs are offlined when that broadcasted MCE happens. [ Boris: rewrote commit message and comments. ] Suggested-by: Borislav Petkov Signed-off-by: Xunlei Pang Signed-off-by: Borislav Petkov Acked-by: Tony Luck Cc: Naoya Horiguchi Cc: kexec@lists.infradead.org Cc: linux-edac Link: http://lkml.kernel.org/r/1487857012-9059-1-git-send-email-xlpang@redhat.com Link: http://lkml.kernel.org/r/20170313095019.19351-1-bp@alien8.de Signed-off-by: Thomas Gleixner arch/x86/include/asm/reboot.h | 1 + arch/x86/kernel/cpu/mcheck/mce.c | 18 ++++++++++++++++-- arch/x86/kernel/reboot.c | 5 +++-- 3 files changed, 20 insertions(+), 4 deletions(-) commit 44e921d4a19846e39fa818afa9d2d22c3117210a Author: Ville Syrjälä Date: Thu Mar 9 17:44:34 2017 +0200 drm/i915: Optimize VLV/CHV display FIFO updates Use I915_{READ,WRITE}_FW() for updating the DSPARB registers on VLV/CHV. This is less expesive as we can grab the uncore.lock across the entire sequence of reads and writes instead of each register access grabbing it. This also allows us to eliminate the dsparb lock entirely as the uncore.lock now effectively protects the contents of the DSPARB registers. v2: Add a note that interrupts are already disabled (Chris) Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170309154434.29303-6-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/i915_drv.c | 1 - drivers/gpu/drm/i915/i915_drv.h | 3 --- drivers/gpu/drm/i915/intel_pm.c | 39 ++++++++++++++++++++++++--------------- 3 files changed, 24 insertions(+), 19 deletions(-) commit dd584fc0711a28fb338bf66a623178e468c82272 Author: Ville Syrjälä Date: Thu Mar 9 17:44:33 2017 +0200 drm/i915: Use I915_READ_FW for plane updates Optimize the plane register accesses a little bit by grabbing the uncore lock manually across the entire pile of accesses and using I915_READ_FW(). This helps keep the pipe update vblank evade critical section below our 100 usec deadline, particularly with lockdep enabled. And in general we want to keep that critical section as short as possible as it's executed with interrupts disabled. Not all plane updates currently happen from within the vblank evade critical section, so we must use the irqsave/irqrestore variants of the spinlock functions in the plane hooks. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170309154434.29303-5-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 158 ++++++++++++++---------- drivers/gpu/drm/i915/intel_sprite.c | 228 ++++++++++++++++++++--------------- 2 files changed, 228 insertions(+), 158 deletions(-) commit 78587de299dd653d64c731e40f17050cb66d0c27 Author: Ville Syrjälä Date: Thu Mar 9 17:44:32 2017 +0200 drm/i915: Organize plane register writes into tighter bunches Pull all the plane register writes closer together to avoid having a lot of unrelated stuff in between them. This will make things more clear once we'll grab the uncore lock around the entire bunch. Also in the future we might even consider moving more of the register value computation out from the plane update hooks. This should make that easier to do. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170309154434.29303-4-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 44 +++++++++++++++------------ drivers/gpu/drm/i915/intel_sprite.c | 59 ++++++++++++++++++------------------ 2 files changed, 54 insertions(+), 49 deletions(-) commit 707bdd3f66b0314bc861f74e8215fc17ac5e28f0 Author: Ville Syrjälä Date: Thu Mar 9 17:44:31 2017 +0200 drm/i915: s/__raw_i915_read32/I915_READ_FW/ in the SKL+ scanline read w/a Replace __raw_i915_read32() with I915_READ_FW() in the workaround for the SKL+ scanline counter hardware fail. The two are the same thing but everyone else uses I915_READ_FW() so let's follow suit. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170309154434.29303-3-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/i915_irq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 694e409daa90f2e21a97e43121c943a84e843bf9 Author: Ville Syrjälä Date: Thu Mar 9 17:44:30 2017 +0200 drm/i915: Use I915_READ_FW in i915_get_vblank_counter() Optimize the multi-register read in i915_get_vblank_counter() a little bit by grabbing the uncore lock manually and using I915_READ_FW(). Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170309154434.29303-2-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/i915_irq.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 68e5cfaffaca73bda1263c503f9b186a196dd97b Author: Joao Pinto Date: Mon Mar 13 10:36:29 2017 +0000 net: stmmac: added default rx queue size in stmmac_dma_interrupt This patch adds the rx queue default size when dma interrupts are treated, since dma op mode can be also set there. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++ 1 file changed, 3 insertions(+) commit 26d6851fd24ed5d88580d66b4c8384947d5ca29b Author: Joao Pinto Date: Mon Mar 13 10:07:07 2017 +0000 net: stmmac: set default number of rx and tx queues in stmmac_pci This patch configures default number of RX and TX queues when using the pci glue driver. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 4 ++++ 1 file changed, 4 insertions(+) commit e422267322cd319e2695a535e47c5b1feeac45eb Author: Hari Bathini Date: Wed Mar 8 02:11:36 2017 +0530 perf: Add PERF_RECORD_NAMESPACES to include namespaces related info With the advert of container technologies like docker, that depend on namespaces for isolation, there is a need for tracing support for namespaces. This patch introduces new PERF_RECORD_NAMESPACES event for recording namespaces related info. By recording info for every namespace, it is left to userspace to take a call on the definition of a container and trace containers by updating perf tool accordingly. Each namespace has a combination of device and inode numbers. Though every namespace has the same device number currently, that may change in future to avoid the need for a namespace of namespaces. Considering such possibility, record both device and inode numbers separately for each namespace. Signed-off-by: Hari Bathini Acked-by: Jiri Olsa Acked-by: Peter Zijlstra Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Ananth N Mavinakayanahalli Cc: Aravinda Prasad Cc: Brendan Gregg Cc: Daniel Borkmann Cc: Eric Biederman Cc: Sargun Dhillon Cc: Steven Rostedt Link: http://lkml.kernel.org/r/148891929686.25309.2827618988917007768.stgit@hbathini.in.ibm.com Signed-off-by: Arnaldo Carvalho de Melo include/linux/perf_event.h | 2 + include/uapi/linux/perf_event.h | 32 ++++++++- kernel/events/core.c | 139 ++++++++++++++++++++++++++++++++++++++++ kernel/fork.c | 2 + kernel/nsproxy.c | 3 + 5 files changed, 177 insertions(+), 1 deletion(-) commit 03e5fd0e9bcc1f34b7a542786b34b8f771e7c260 Author: Liping Zhang Date: Sun Mar 12 19:38:47 2017 +0800 netfilter: nft_set_rbtree: use per-set rwlock to improve the scalability Karel Rericha reported that in his test case, ICMP packets going through boxes had normally about 5ms latency. But when running nft, actually listing the sets with interval flags, latency would go up to 30-100ms. This was observed when router throughput is from 600Mbps to 2Gbps. This is because we use a single global spinlock to protect the whole rbtree sets, so "dumping sets" will race with the "key lookup" inevitably. But actually they are all _readers_, so it's ok to convert the spinlock to rwlock to avoid competition between them. Also use per-set rwlock since each set is independent. Reported-by: Karel Rericha Tested-by: Karel Rericha Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_rbtree.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit 2cb4bbd75bdf9d423b9f6c629f81eb66ee312fac Author: Liping Zhang Date: Sat Mar 11 14:08:09 2017 +0800 netfilter: limit: use per-rule spinlock to improve the scalability The limit token is independent between each rules, so there's no need to use a global spinlock. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_limit.c | 10 +++++----- net/netfilter/xt_limit.c | 11 ++++++----- 2 files changed, 11 insertions(+), 10 deletions(-) commit fc09e4a75a12552b9374a5b0c5f5815aecf8c37a Author: Florian Westphal Date: Thu Mar 9 12:57:15 2017 +0100 netfilter: nf_conntrack: reduce resolve_normal_ct args also mark init_conntrack noinline, in most cases resolve_normal_ct will find an existing conntrack entry. text data bss dec hex filename 16735 5707 176 22618 585a net/netfilter/nf_conntrack_core.o 16687 5707 176 22570 582a net/netfilter/nf_conntrack_core.o Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 57 ++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 31 deletions(-) commit de44097b256146fb633f843b250f2515b838e031 Author: Krzysztof Kozlowski Date: Sat Mar 11 19:25:24 2017 +0200 ARM: dts: exynos: Enable watchdog on all Exynos4 boards Watchdog module does not have external dependencies so it can be safely enabled in exynos4.dtsi thus making it available for all Exynos4-based boards. Signed-off-by: Krzysztof Kozlowski Acked-by: Guenter Roeck arch/arm/boot/dts/exynos4210-origen.dts | 4 ---- arch/arm/boot/dts/exynos4210.dtsi | 1 - arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi | 4 ---- arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 4 ---- arch/arm/boot/dts/exynos4412-origen.dts | 4 ---- arch/arm/boot/dts/exynos4412.dtsi | 1 - 6 files changed, 18 deletions(-) commit b5acdc38b8ceba1b642ba354be8845a8ac2b35d1 Author: Krzysztof Kozlowski Date: Sat Mar 11 19:25:23 2017 +0200 ARM: dts: s3c64xx: Enable watchdog on all S3C64xx boards Watchdog module does not have external dependencies so it can be safely enabled in s3c64xx.dtsi thus making it available for all S3C64xx-based boards. Signed-off-by: Krzysztof Kozlowski Acked-by: Guenter Roeck arch/arm/boot/dts/s3c64xx.dtsi | 1 - 1 file changed, 1 deletion(-) commit bdc42353ba3dd3619b6186748701f87ecc8e7458 Author: Krzysztof Kozlowski Date: Sat Mar 11 19:25:22 2017 +0200 ARM: dts: exynos: Fix watchdog reset on Exynos4412 The Exynos4412 has the same watchdog as newer SoCs (e.g. Exynos5250). Just like the others, for working it requires additional steps in Power Management Unit: unmasking the reset request and enabling the system reset. Without these additional steps in PMU, the watchdog will not be able to reset the system on expiration event. Change the compatible of Exynos4412 watchdog device node to samsung,exynos5250-wdt which includes the additional PMU steps. This will also fix infinite watchdog interrupt in soft mode (lack of interrupt clear) because it is also included in samsung,exynos5250-wdt. Signed-off-by: Krzysztof Kozlowski Acked-by: Guenter Roeck arch/arm/boot/dts/exynos4.dtsi | 9 --------- arch/arm/boot/dts/exynos4210.dtsi | 9 +++++++++ arch/arm/boot/dts/exynos4412.dtsi | 10 ++++++++++ 3 files changed, 19 insertions(+), 9 deletions(-) commit af27e01cfcfcdf7f45488e023b474eb6de5f732e Author: Jason Yan Date: Fri Mar 10 10:05:40 2017 +0800 libata: make ata_sg_clean static over again Fixes the following sparse warning: drivers/ata/libata-core.c:4913:6: warning: symbol 'ata_sg_clean' was not declared. Should it be static? Signed-off-by: Jason Yan drivers/ata/libata-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c92357c91a917fd882801604bba2cb1f1fdde23 Author: Geliang Tang Date: Sat Mar 11 08:47:01 2017 +0800 libata: use setup_deferrable_timer Use setup_deferrable_timer() instead of init_timer_deferrable() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 28d2ca39be43fab0caee2f13d818504e9e802ef7 Author: Bard Liao Date: Thu Mar 9 19:31:14 2017 +0800 ASoC: rt5665: move set_sysclk to codec level Move set_sysclk to codec level and people can use it at both codec and dai level. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5665.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit ccd00d5911ce1e144c79799f3d105961a11e4009 Author: Bard Liao Date: Thu Mar 9 19:31:13 2017 +0800 ASoC: rt5665: move set_pll to codec level Move set_pll function to codec level and people can use it at both codec and dai level. Also, lower case "source" to keep it consistent. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5665.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit bfe41c678d49f440de3ae80b945f7f94d5dbd340 Author: Dan Carpenter Date: Mon Mar 13 15:32:37 2017 +0300 ASoC: cs35l35: returning uninitialized in probe() If cs35l35->pdata.stereo is false then "ret" isn't initialized. Fixes: 6387f866a2cc ("ASoC: Add support for Cirrus Logic CS35L35 Amplifier") Signed-off-by: Dan Carpenter Acked-by: Paul Handrigan Signed-off-by: Mark Brown sound/soc/codecs/cs35l35.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 251831bd4f4903415da7f0ce04dc0de26bc43f1d Author: Jayachandran C Date: Sun Mar 12 11:11:43 2017 +0000 spi: xlp: update for ARCH_VULCAN2 ARCH_VULCAN arm64 platform (for Broadcom Vulcan ARM64 processors) has been discontinued. Cavium's ThunderX2 CN99XX (ARCH_THUNDER2) will be the next revision of the platform. Update compile dependencies and ACPI ID to reflect this change. There is not need to retain ARCH_VULCAN since the Vulcan processor was never in production and ARCH_VULCAN will be deleted soon. Signed-off-by: Jayachandran C Signed-off-by: Mark Brown drivers/acpi/acpi_apd.c | 1 + drivers/spi/Kconfig | 2 +- drivers/spi/spi-xlp.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit f3a612a655c1ca585c89c654c06e56eb2f8539e4 Author: kbuild test robot Date: Sun Mar 12 09:11:32 2017 +0800 ASoC: cs35l35: fix semicolon.cocci warnings sound/soc/codecs/cs35l35.c:706:2-3: Unneeded semicolon sound/soc/codecs/cs35l35.c:543:4-5: Unneeded semicolon sound/soc/codecs/cs35l35.c:553:4-5: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci CC: Brian Austin Signed-off-by: Fengguang Wu Signed-off-by: Mark Brown sound/soc/codecs/cs35l35.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 03ff570c6b45b27e233f5cb1fd04404374fd883f Author: Colin Ian King Date: Sat Mar 11 19:19:22 2017 +0000 ASoC: cs35l35: trivial fix to indentation Remove extraneous tab to correct the nesting level indentation Detected by CoverityScan, CID#1416584 ("Nesting level does not match indentation") Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/codecs/cs35l35.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5339c34f3906b34ddcd8c9614232ae1302d30c7b Author: Krzysztof Kozlowski Date: Sat Mar 11 21:01:24 2017 +0200 regulator: s2mpa01: Fix inconsistent indenting Broken indenting makes code more difficult to read and brings confusion. Fix warning reported by Smatch: s2mpa01.c:362 s2mpa01_pmic_probe() warn: inconsistent indenting Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: Mark Brown drivers/regulator/s2mpa01.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8a05eb190238d44a101a7db9addddbe74be0968e Author: Krzysztof Kozlowski Date: Sat Mar 11 21:01:23 2017 +0200 regulator: s5m8767: Constify regulator_ops Static struct regulator_ops is not modified so can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: Mark Brown drivers/regulator/s5m8767.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 71b4540f61e9cc5597e2a0c0236781efd40af4c6 Author: Krzysztof Kozlowski Date: Sat Mar 11 21:01:22 2017 +0200 regulator: s2mps11: Constify regulator_ops Static struct regulator_ops is not modified so can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: Mark Brown drivers/regulator/s2mps11.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit f465bf9b05303154a86fdd74a571733b0f37af7c Author: Krzysztof Kozlowski Date: Sat Mar 11 21:01:21 2017 +0200 regulator: s2mpa01: Constify regulator_ops Static struct regulator_ops is not modified so can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: Mark Brown drivers/regulator/s2mpa01.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8c2cd4697bfe524639ad3212f8f152c322941889 Author: Krzysztof Kozlowski Date: Sat Mar 11 21:01:20 2017 +0200 regulator: max8660: Constify regulator_ops Static struct regulator_ops (except max8660_dcdc_ops) are not modified so can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: Mark Brown drivers/regulator/max8660.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a08904fdb8b5be2334f3873cbeea4bc004528d02 Author: Krzysztof Kozlowski Date: Sat Mar 11 21:01:19 2017 +0200 regulator: max77693: Constify regulator_ops Static struct regulator_ops is not modified so can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: Mark Brown drivers/regulator/max77693-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f6ce809a518d736232de5f496b957733b1b4724 Author: Krzysztof Kozlowski Date: Sat Mar 11 21:01:18 2017 +0200 regulator: max1586: Constify regulator_ops Static struct regulator_ops is not modified so can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: Mark Brown drivers/regulator/max1586.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 82875163a8ef1e25477402c5ebb8f5beaea5e93e Author: Axel Lin Date: Sat Mar 11 20:57:07 2017 +0800 ASoC: cs35l35: Fix display revision id Signed-off-by: Axel Lin Acked-by: Paul Handrigan Signed-off-by: Mark Brown sound/soc/codecs/cs35l35.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9b6567d03196dc73ace1c34925c7496fb194447 Author: Pierre-Louis Bossart Date: Thu Mar 9 18:19:02 2017 -0600 ASoC: Intel: Enable bytcht_nocodec machine driver Make sure this machine driver is only used if enabled explicitly and if there is no information found in the SSDT. Signed-off-by: Pierre-Louis Bossart Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 759db1c4660b558345573c7476a45c76a6aa07d2 Author: Pierre-Louis Bossart Date: Thu Mar 9 18:19:01 2017 -0600 ASoC: Intel: boards: add card for MinnowBoardMax/Up I2S access Add card with dummy codec and DAI to make I2S signals observable. Uses Mic and Speaker pins/widgets to control DAPM Signed-off-by: Pierre-Louis Bossart Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 12 ++ sound/soc/intel/boards/Makefile | 2 + sound/soc/intel/boards/bytcht_nocodec.c | 208 ++++++++++++++++++++++++++++++++ 3 files changed, 222 insertions(+) commit a63b8a117d39ba1b979daa71c6ab350a043694f5 Author: Pierre-Louis Bossart Date: Thu Mar 9 18:19:00 2017 -0600 ASoC: Intel: Atom: enable BYT/CHT+DA7213 machine driver Add entries in HID table and reference to bytcht_da7213 driver Signed-off-by: Pierre-Louis Bossart Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 82cf89de2c9c2efcafde452ed76f85e7ef7f6ce0 Author: Pierre-Louis Bossart Date: Thu Mar 9 18:18:59 2017 -0600 ASoC: Intel: add machine driver for BYT/CHT + DA7213 Add new machine driver, tested with Ard-Audio-DA7212 [1] connected to MinnowBoardMAX Turbot. The MCLK is managed by the codec driver using the "mclk" handle to reuse existing code, but it could just as well be handled by this machine driver. [1] http://www.dialog-semiconductor.com/content/ard-audio-da7212 Signed-off-by: Pierre-Louis Bossart Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 12 ++ sound/soc/intel/boards/Makefile | 2 + sound/soc/intel/boards/bytcht_da7213.c | 283 +++++++++++++++++++++++++++++++++ 3 files changed, 297 insertions(+) commit 5bd933fe4481688d595ae1dd0440006c8675a1a8 Author: David Daney Date: Tue Mar 7 17:31:08 2017 -0800 module: set .init_array alignment to 8 The proper idiom for aligning linker sections in modules is different than for built-in sections. ". = ALIGN();" followed by a forced output address of 0 does nothing, as forcing the address changes the value of ".". Use output section alignment specifier instead. Fixes: 9ddf82521c86 ("kernel: add support for .init_array.* constructors") Reviewed-by: Andrey Ryabinin Signed-off-by: David Daney Signed-off-by: Jessica Yu scripts/module-common.lds | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8f42c23a9861df7796e019d32fd5c4dea01c8e51 Author: Pierre-Louis Bossart Date: Thu Mar 9 18:18:58 2017 -0600 ASoC: da7213: add ACPI support Add DLGS7212 and DLGS7213 HID Signed-off-by: Pierre-Louis Bossart Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/da7213.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 500a32abaf818b3f4afe5b7f0ba9ca9b7a3aa65e Author: Liu Xiang Date: Thu Mar 9 22:40:01 2017 +0800 spi: fsl: Call irq_dispose_mapping in err path Irq_dispose_mapping should be called in err path to release the resources that irq_of_parse_and_map requested. Signed-off-by: Liu Xiang Signed-off-by: Mark Brown drivers/spi/spi-fsl-spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c6182ac96096f35c7216e4e6a3c64c7374dadeb7 Author: George McCollister Date: Thu Mar 9 08:14:43 2017 -0600 regulator: pfuze100-regulator: add coin support Add support for PF0200 coin cell/super capacitor charger which works as a current limited voltage source via the LICELL pin. When VIN goes below a certain threshold LICELL is used to provide power for VSNVS which is usually used to hold up secure non-volatile storage and the real-time clock on the SoC. Signed-off-by: George McCollister Signed-off-by: Mark Brown .../devicetree/bindings/regulator/pfuze100.txt | 8 +++++++- drivers/regulator/pfuze100-regulator.c | 24 ++++++++++++++++++++++ include/linux/regulator/pfuze100.h | 1 + 3 files changed, 32 insertions(+), 1 deletion(-) commit bf5043d69c9bf33696f9151552175f1203f8c9d9 Author: Charles Keepax Date: Wed Mar 8 16:42:51 2017 +0000 ASoC: cs35l35: Add IRQF_SHARED to IRQ flags As it is quite common to use a stereo pair of amps but share the IRQ line between them both add the IRQF_SHARED flag whilst requesting cs35l35's IRQ. Signed-off-by: Charles Keepax Acked-by: Brian Austin Signed-off-by: Mark Brown sound/soc/codecs/cs35l35.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1f758cd9da61a1ae2202405746d259ba640d1e8a Author: Charles Keepax Date: Wed Mar 8 16:42:50 2017 +0000 ASoC: cs35l35: Add local variable for dev in probe Tidy up the code a little by adding a local variable for i2c_client->dev rather than referring to it explicitly everytime. Signed-off-by: Charles Keepax Acked-by: Brian Austin Signed-off-by: Mark Brown sound/soc/codecs/cs35l35.c | 66 ++++++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 40 deletions(-) commit 8d45f2d23864ae1582d095c54605540cd3640169 Author: Charles Keepax Date: Wed Mar 8 16:42:49 2017 +0000 ASoC: cs35l35: Add for configuring drive mode in unused slots Add support for setting how the I2S pins are driven in unused slots, currently the chip will just use the default of drive 0, however this causes issues when multiple devices are attached to the same bus. Signed-off-by: Charles Keepax Acked-by: Brian Austin Signed-off-by: Mark Brown include/sound/cs35l35.h | 2 ++ sound/soc/codecs/cs35l35.c | 7 +++++++ sound/soc/codecs/cs35l35.h | 4 ++++ 3 files changed, 13 insertions(+) commit 45114c364d476ba0bbc294d63955f49fbf378779 Author: Charles Keepax Date: Wed Mar 8 16:42:48 2017 +0000 ASoC: cs35l35: Add device tree binding for I2S drive configuration Add a binding for setting how the I2S pins are driven in unused slots, currently the chip will just use the default of drive 0, however this causes issues when multiple devices are attached to the same bus. Signed-off-by: Charles Keepax Acked-by: Brian Austin Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/cs35l35.txt | 5 +++++ 1 file changed, 5 insertions(+) commit 1bb06ada038548b4e2449159e80badf106bb779f Author: Charles Keepax Date: Wed Mar 8 16:42:47 2017 +0000 ASoC: cs35l35: Add missing return in probe A return statement is missing just before the error paths at the end of probe. This causes us to fall straight into the error path and disable the supplies and re-enable reset, as these are only controlled during probe this causes the part to no longer function. Signed-off-by: Charles Keepax Acked-by: Brian Austin Signed-off-by: Mark Brown sound/soc/codecs/cs35l35.c | 2 ++ 1 file changed, 2 insertions(+) commit 998d6fb5123d5b27edd3abd85b767c822bf766fc Author: Takashi Sakamoto Date: Wed Mar 8 17:47:02 2017 +0900 ASoC: Intel: Skylake: code cleanup for pin fixup limitation As a commit 4cd9899f0d16 ("ASoC: Intel: Skylake: Add multiple pin formats") describes, 'fixups is applied to pin 0 only'. On the other hand, the commit left some codes as what they were. This might confuses readers. This commit fixes the issue. This doesn't change driver behaviour at all. Fixes: 4cd9899f0d16 ("ASoC: Intel: Skylake: Add multiple pin formats") Signed-off-by: Takashi Sakamoto Acked-by: Vinod Koul Tested-by: Subhransu S. Prusty Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit c750bdd3e7e204cc88b32806c3864487a03cd84b Author: Ville Syrjälä Date: Mon Feb 13 19:58:18 2017 +0200 drm/i915: Reject HDMI 12bpc if the sink doesn't indicate support Check that the sink really declared 12bpc support before we enable it. This should not actually never happen since it's mandatory for HDMI sinks to support 12bpc if they support any deep color modes. But reality disagrees with the theory and there are actually sinks in the wild that violate the spec. v2: Fix the output_types check Update commit message to state that these things are in fact real Cc: stable@vger.kernel.org Cc: Nicholas Sielicki Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99250 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170213175818.24958-1-ville.syrjala@linux.intel.com Reviewed-by: Shashank Sharma drivers/gpu/drm/i915/intel_hdmi.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit f1ce25f292e7ef7a86e44ec4d30a7e179d3ddce0 Author: Ian Abbott Date: Wed Mar 8 16:03:01 2017 +0000 USB: serial: ftdi_sio: allow other bases for "event_char" The 'store' function for the "event_char" device attribute currently expects a base 10 value. The value is composed of an enable bit in bit 8 and an 8-bit "event character" code in bits 7 to 0. It seems reasonable to allow hexadecimal and octal numbers to be written to the device attribute in addition to decimal. Make it so. Change the debug message to show the value in hexadecimal, rather than decimal. Signed-off-by: Ian Abbott Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d0559a2f294c9b50d7795a8362931f0db8953de1 Author: Ian Abbott Date: Wed Mar 8 16:03:00 2017 +0000 USB: serial: ftdi_sio: only allow valid event_char values The "event_char" device attribute value, when written, is interpreted as an enable bit in bit 8, and an "event character" in bits 7 to 0. Return an error -EINVAL for out-of-range values. Use kstrtouint() to parse the integer instead of the obsolete simple_strtoul(). Signed-off-by: Ian Abbott Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit db9240662a44e1b7781c8dbf35631bcec7a369c6 Author: Ian Abbott Date: Wed Mar 8 16:02:59 2017 +0000 USB: serial: ftdi_sio: only allow valid latency timer values Valid latency timer values are between 1 ms and 255 ms in 1 ms steps. The store function for the "latency_timer" device attribute currently allows any value, although only the lower 16 bits will be sent to the device, and the device only stores the lower 8 bits. The hardware appears to accept the (invalid) value 0 and treats it the same as 1 (resulting in a latency of 1 ms). Change the latency_timer_store() function to accept only the values 0 to 255, returning an error -EINVAL for out-of-range values. Call kstrtou8() to parse the integer instead of the obsolete simple_strtoul(). Signed-off-by: Ian Abbott Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7e1e6ceda3f07a40445ae1c4ac5549a899d5e252 Author: Ian Abbott Date: Wed Mar 8 16:02:58 2017 +0000 USB: serial: ftdi_sio: detect BM chip with iSerialNumber bug If a BM type chip has iSerialNumber set to 0 in its EEPROM, an incorrect value is read from the bcdDevice field of the USB descriptor, making it look like an AM type chip. Attempt to correct this in ftdi_determine_type() by attempting to read the latency timer for an AM type chip if it has iSerialNumber set to 0. If that succeeds, assume it is a BM type chip. Currently, read_latency_timer() bails out without reading the latency timer for an AM type chip, so factor out the guts of read_latency_timer() into a new function _read_latency_timer() that attempts to read the latency timer regardless of chip type, and returns either the latency timer value or a negative error number. Signed-off-by: Ian Abbott Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) commit 7ab2463550e2a3a5b97dfa82e5bf8038b986f007 Author: Jonas Gorski Date: Wed Mar 1 10:08:14 2017 +0100 spi/bcm63xx-hsspi: allow for probing through devicetree Add required binding support to probe through device tree. Signed-off-by: Jonas Gorski Acked-by: Florian Fainelli Signed-off-by: Mark Brown drivers/spi/spi-bcm63xx-hsspi.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit 8c0951afd8a7585a4281980b9a21dcc8a419cad9 Author: Jonas Gorski Date: Wed Mar 1 10:08:13 2017 +0100 spi/bcm63xx-hsspi: document bcm63xx HS SPI devicetree bindings Add documentation for the bindings of the high speed SPI controller found on newer bcm63xx SoCs. Signed-off-by: Jonas Gorski Acked-by: Rob Herring Signed-off-by: Mark Brown .../devicetree/bindings/spi/spi-bcm63xx-hsspi.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit ff18e1ef04e2073889569b07a5ddd54a6527917f Author: Jonas Gorski Date: Wed Mar 1 10:08:12 2017 +0100 spi/bcm63xx-hsspi: allow providing clock rate through a second clock The HSSPI block actually has two clock inputs, one for gating the block, and one for the PLL rate. To allow these to be represented as two clocks, add support for retrieving the rate from a separate "pll" clock, if the "hsspi" clock does not provide one. Signed-off-by: Jonas Gorski Acked-by: Florian Fainelli Signed-off-by: Mark Brown drivers/spi/spi-bcm63xx-hsspi.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 2dea7cd7287781cd4bfd0167dba423e0f486ef61 Author: Ian Abbott Date: Wed Mar 8 16:02:57 2017 +0000 USB: serial: ftdi_sio: don't access latency timer on old chips The latency timer was introduced with the FT232BM and FT245BM chips. Do not bother attempting to read or write it for older chip versions. Signed-off-by: Ian Abbott Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 3ef5b4023c64c16c793a066a7a2ed6ea3767e0d7 Author: Changbin Du Date: Mon Mar 13 19:46:52 2017 +0800 perf hists browser: Fix typo in function switch_data_file Should clear buf 'abs_path', not 'options'. Signed-off-by: Changbin Du Cc: Feng Tang Cc: Peter Zijlstra Fixes: 341487ab561f ("perf hists browser: Add option for runtime switching perf data file") Link: http://lkml.kernel.org/r/20170313114652.9207-1-changbin.du@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d35fa1e75fdb308ae8a1a3efffe7ddedbd6051e2 Author: Changbin Du Date: Mon Mar 13 16:32:52 2017 +0800 perf report: Document +field style argument support for --field option Commit 2f3f9bcf000b ("perf tools: Add +field argument support for --field option") by Jiri Olsa introduced +field style argument support for --field option. This is useful but not updated documentation. This add a little description there. Signed-off-by: Changbin Du Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170313083252.23644-1-changbin.du@intel.com [ Slightly improved the phrase structure ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-report.txt | 3 +++ 1 file changed, 3 insertions(+) commit 4b0b3aa6a2756e6115fdf275c521e4552a7082f3 Author: Changbin Du Date: Mon Mar 13 16:31:48 2017 +0800 perf sort: Fix segfault with basic block 'cycles' sort dimension Skip the sample which doesn't have branch_info to avoid segmentation fault: The fault can be reproduced by: perf record -a perf report -F cycles Signed-off-by: Changbin Du Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Peter Zijlstra Fixes: 0e332f033a82 ("perf tools: Add support for cycles, weight branch_info field") Link: http://lkml.kernel.org/r/20170313083148.23568-1-changbin.du@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 5 +++++ 1 file changed, 5 insertions(+) commit cf632bd6c6e937a2e98f523d25891f511084647a Author: Chris Wilson Date: Mon Mar 13 09:56:17 2017 +0000 drm/i915: Extend rpm wakelock for debugfs/i915_drpc_info i915_drpc_info missed covering a few register read with the runtime pm wakelock. Be simple and cover the entire function with a single wakelock so that new additions are not similarly missed in future. WARNING: CPU: 2 PID: 1334 at drivers/gpu/drm/i915/intel_drv.h:1743 gen6_read32+0x192/0x1e0 [i915] RPM wakelock ref not held during HW access Modules linked in: rpcsec_gss_krb5 nfsv4 dns_resolver netconsole nfsd auth_rpcgss ipmi_watchdog ipmi_poweroff ipmi_devintf ipmi_msghandler overlay btrfs xor raid6_pq dm_mod sg sd_mod snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ata_generic pata_acpi intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp snd_hda_intel kvm_intel snd_hda_codec kvm eeepc_wmi irqbypass snd_hda_core crct10dif_pclmul crc32_pclmul crc32c_intel asus_wmi sparse_keymap ghash_clmulni_intel snd_hwdep i915 rfkill ppdev pcbc aesni_intel ata_piix crypto_simd glue_helper snd_pcm pata_via cryptd pcspkr snd_timer drm_kms_helper syscopyarea snd sysfillrect libata sysimgblt fb_sys_fops soundcore shpchp drm wmi parport_pc parport tpm_infineon video CPU: 2 PID: 1334 Comm: php5 Not tainted 4.10.0-rc8-01615-g1f58c8e #1 Hardware name: System manufacturer System Product Name/P8H67-M PRO, BIOS 1002 04/01/2011 Call Trace: dump_stack+0x63/0x8a __warn+0xcb/0xf0 warn_slowpath_fmt+0x4f/0x60 ? seq_vprintf+0x35/0x50 gen6_read32+0x192/0x1e0 [i915] i915_drpc_info+0x55d/0x990 [i915] seq_read+0xf2/0x3b0 full_proxy_read+0x51/0x80 __vfs_read+0x28/0x130 ? security_file_permission+0x9b/0xc0 ? rw_verify_area+0x4e/0xb0 vfs_read+0xa8/0x170 SyS_read+0x46/0xa0 entry_SYSCALL_64_fastpath+0x1a/0xa9 RIP: 0033:0x7fd97bf175a0 RSP: 002b:00007ffdf730db68 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007fd978028738 RCX: 00007fd97bf175a0 RDX: 0000000000002000 RSI: 00007fd97740e0d8 RDI: 0000000000000005 RBP: 0000000000000001 R08: 0000000000e97840 R09: 00007fd977ef8d58 R10: 0000000000000027 R11: 0000000000000246 R12: 00007fd977ef8d58 R13: 0000000000000000 R14: 0000000000eb4640 R15: 0000000000000000 Reported-by: kernel test robot Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170313095617.29010-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_debugfs.c | 38 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 25 deletions(-) commit 1300b4f804d38b14d257a239669128ec84782668 Author: Chris Wilson Date: Sun Mar 12 13:54:26 2017 +0000 drm/i915: Inline gen6_sanitize_rps_pm_mask() gen6_sanitize_rps_pm_mask() is small enough that inlining it shrinks the object code. v2: Use const markup Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170312135426.2216-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_irq.c | 5 ----- drivers/gpu/drm/i915/intel_drv.h | 8 +++++++- 2 files changed, 7 insertions(+), 6 deletions(-) commit 12a601c64339d2d28af534d2324f87cf00ba8cd8 Author: Changbin Du Date: Mon Mar 13 16:30:26 2017 +0800 perf tools: Ignore generated files pmu-events/{jevents,pmu-events.c} for git Ignore two files: pmu-events/{jevents,pmu-events.c} which are generated during the build. Committer notes: Testing it: $ make -C tools/perf/ $ git status On branch perf/core Untracked files: (use "git add ..." to include in what will be committed) tools/perf/pmu-events/jevents tools/perf/pmu-events/pmu-events.c nothing added to commit but untracked files present (use "git add" to track) $ After the patch: $ git status On branch perf/core nothing to commit, working tree clean $ Signed-off-by: Changbin Du Tested-by: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170313083026.23487-1-changbin.du@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/.gitignore | 2 ++ 1 file changed, 2 insertions(+) commit f9c10cd645a3defc24110ac71f93e8d18a50d0d6 Author: Changbin Du Date: Mon Mar 13 16:28:45 2017 +0800 perf tools: Missing c2c command in command-list Add the c2c command to command-list.txt so perf help can list this command. Committer notes: Before: # perf help | grep c2c # After: # perf help | grep c2c c2c Shared Data C2C/HITM Analyzer. # Signed-off-by: Changbin Du Tested-by: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170313082845.23373-1-changbin.du@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/command-list.txt | 1 + 1 file changed, 1 insertion(+) commit 3e6ef9c80946f781fc25e8490c9875b1d2b61158 Author: Dmitry Safonov Date: Mon Mar 6 17:17:20 2017 +0300 x86/mm: Make mmap(MAP_32BIT) work correctly mmap(MAP_32BIT) is broken due to the dependency on the TIF_ADDR32 thread flag. For 64bit applications MAP_32BIT will force legacy bottom-up allocations and the 1GB address space restriction even if the application issued a compat syscall, which should not be subject of these restrictions. For 32bit applications, which issue 64bit syscalls the newly introduced mmap base separation into 64-bit and compat bases changed the behaviour because now a 64-bit mapping is returned, but due to the TIF_ADDR32 dependency MAP_32BIT is ignored. Before the separation a 32-bit mapping was returned, so the MAP_32BIT handling was irrelevant. Replace the check for TIF_ADDR32 with a check for the compat syscall. That solves both the 64-bit issuing a compat syscall and the 32-bit issuing a 64-bit syscall problems. [ tglx: Massaged changelog ] Signed-off-by: Dmitry Safonov Cc: 0x7f454c46@gmail.com Cc: linux-mm@kvack.org Cc: Andy Lutomirski Cc: Cyrill Gorcunov Cc: Borislav Petkov Cc: "Kirill A. Shutemov" Link: http://lkml.kernel.org/r/20170306141721.9188-5-dsafonov@virtuozzo.com Signed-off-by: Thomas Gleixner arch/x86/kernel/sys_x86_64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1b028f784e8c341e762c264f70dc0ca1418c8b7a Author: Dmitry Safonov Date: Mon Mar 6 17:17:19 2017 +0300 x86/mm: Introduce mmap_compat_base() for 32-bit mmap() mmap() uses a base address, from which it starts to look for a free space for allocation. The base address is stored in mm->mmap_base, which is calculated during exec(). The address depends on task's size, set rlimit for stack, ASLR randomization. The base depends on the task size and the number of random bits which are different for 64-bit and 32bit applications. Due to the fact, that the base address is fixed, its mmap() from a compat (32bit) syscall issued by a 64bit task will return a address which is based on the 64bit base address and does not fit into the 32bit address space (4GB). The returned pointer is truncated to 32bit, which results in an invalid address. To solve store a seperate compat address base plus a compat legacy address base in mm_struct. These bases are calculated at exec() time and can be used later to address the 32bit compat mmap() issued by 64 bit applications. As a consequence of this change 32-bit applications issuing a 64-bit syscall (after doing a long jump) will get a 64-bit mapping now. Before this change 32-bit applications always got a 32bit mapping. [ tglx: Massaged changelog and added a comment ] Signed-off-by: Dmitry Safonov Cc: 0x7f454c46@gmail.com Cc: linux-mm@kvack.org Cc: Andy Lutomirski Cc: Cyrill Gorcunov Cc: Borislav Petkov Cc: "Kirill A. Shutemov" Link: http://lkml.kernel.org/r/20170306141721.9188-4-dsafonov@virtuozzo.com Signed-off-by: Thomas Gleixner arch/Kconfig | 7 +++++++ arch/x86/Kconfig | 1 + arch/x86/include/asm/elf.h | 3 +++ arch/x86/kernel/sys_x86_64.c | 23 ++++++++++++++++++---- arch/x86/mm/mmap.c | 47 ++++++++++++++++++++++++++++++++------------ include/linux/mm_types.h | 5 +++++ 6 files changed, 69 insertions(+), 17 deletions(-) commit 8f3e474f3cea7b2470218a6ed6da47ff02147dce Author: Dmitry Safonov Date: Mon Mar 6 17:17:18 2017 +0300 x86/mm: Add task_size parameter to mmap_base() To correctly handle 32-bit and 64-bit mmap() syscalls in 64bit applications its required to have separate address bases to place a mapping. The tasksize can be used as an indicator to select the proper parameters for mmap_base(). This requires the following changes: - Add task_size argument to mmap_base() and make the calculation based on it. - Provide mmap_legacy_base() as a seperate function - Use the new functions in arch_pick_mmap_layout() [ tglx: Massaged changelog ] Signed-off-by: Dmitry Safonov Cc: 0x7f454c46@gmail.com Cc: linux-mm@kvack.org Cc: Andy Lutomirski Cc: Cyrill Gorcunov Cc: Borislav Petkov Cc: "Kirill A. Shutemov" Link: http://lkml.kernel.org/r/20170306141721.9188-3-dsafonov@virtuozzo.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/elf.h | 24 ++++++++++--------- arch/x86/include/asm/processor.h | 4 +++- arch/x86/mm/mmap.c | 50 +++++++++++++++++++++++++--------------- 3 files changed, 48 insertions(+), 30 deletions(-) commit 6a0b41d1e23dd3318568461593ae5e36d966981e Author: Dmitry Safonov Date: Mon Mar 6 17:17:17 2017 +0300 x86/mm: Introduce arch_rnd() to compute 32/64 mmap random base The compat (32bit) mmap() sycall issued by a 64-bit task results in a mapping above 4GB. That's outside the compat mode address space and prevents CRIU to restore 32bit processes from a 64bit application. As a first step to address this, split out the address base randomizing calculation from arch_mmap_rnd() into a helper function, which can be used independent of mmap_ia32() based decisions. [ tglx: Massaged changelog ] Suggested-by: Thomas Gleixner Signed-off-by: Dmitry Safonov Cc: 0x7f454c46@gmail.com Cc: linux-mm@kvack.org Cc: Andy Lutomirski Cc: Cyrill Gorcunov Cc: Borislav Petkov Cc: "Kirill A. Shutemov" Link: http://lkml.kernel.org/r/20170306141721.9188-2-dsafonov@virtuozzo.com Signed-off-by: Thomas Gleixner arch/x86/mm/mmap.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 2f2a033fb5819c393d65da9b6233e095f3690f15 Author: Andrew Banman Date: Thu Mar 9 10:42:14 2017 -0600 x86/platform/uv/BAU: Implement uv4_wait_completion with read_status UV4 does not employ a software-timeout as in previous generations so a new wait_completion routine without this logic is required. Certain completion statuses require the AUX status bit in addition to ERROR and BUSY. Add the read_status routine to construct the full completion status. Use read_status in the uv4_wait_completion routine to handle all possible completion statuses. Signed-off-by: Andrew Banman Acked-by: Ingo Molnar Acked-by: Mike Travis Cc: sivanich@hpe.com Cc: rja@hpe.com Cc: akpm@linux-foundation.org Link: http://lkml.kernel.org/r/1489077734-111753-7-git-send-email-abanman@hpe.com Signed-off-by: Thomas Gleixner arch/x86/platform/uv/tlb_uv.c | 58 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) commit 2620bbbf1f4f187952fb35861f4473860c432728 Author: Andrew Banman Date: Thu Mar 9 10:42:13 2017 -0600 x86/platform/uv/BAU: Add wait_completion to bau_operations Remove the present wait_completion routine and add a function pointer by the same name to the bau_operations struct. Rather than switching on the UV hub version during message processing, set the architecture-specific uv*_wait_completion during initialization. The uv123_bau_ops struct must be split into uv1 and uv2_3 versions to accommodate the corresponding wait_completion routines. Signed-off-by: Andrew Banman Acked-by: Ingo Molnar Acked-by: Mike Travis Cc: sivanich@hpe.com Cc: rja@hpe.com Cc: akpm@linux-foundation.org Link: http://lkml.kernel.org/r/1489077734-111753-6-git-send-email-abanman@hpe.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/uv/uv_bau.h | 2 ++ arch/x86/platform/uv/tlb_uv.c | 31 ++++++++++++++++++------------- 2 files changed, 20 insertions(+), 13 deletions(-) commit dfeb28f068ff9cc4f714c7d1edaf61597ea1768b Author: Andrew Banman Date: Thu Mar 9 10:42:12 2017 -0600 x86/platform/uv/BAU: Add status mmr location fields to bau_control The location of the ERROR and BUSY status bits depends on the descriptor index, i.e. the CPU, of the message. Since this index does not change, there is no need to calculate the mmr and index location during message processing. The less work we do in the hot path the better. Add status_mmr and status_index fields to bau_control and compute their values during initialization. Add kerneldoc descriptions for the new fields. Update uv*_wait_completion to use these fields rather than receiving the information as parameters. Signed-off-by: Andrew Banman Acked-by: Ingo Molnar Acked-by: Mike Travis Cc: sivanich@hpe.com Cc: rja@hpe.com Cc: akpm@linux-foundation.org Link: http://lkml.kernel.org/r/1489077734-111753-5-git-send-email-abanman@hpe.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/uv/uv_bau.h | 10 +++++++-- arch/x86/platform/uv/tlb_uv.c | 46 +++++++++++++++++++--------------------- 2 files changed, 30 insertions(+), 26 deletions(-) commit 8e3b21b6dbf0318d5b3a598572acc23f07189c40 Author: Andrew Banman Date: Thu Mar 9 10:42:11 2017 -0600 x86/platform/uv/BAU: Cleanup bau_operations declaration and instances Move the bau_operations declaration after bau struct declarations so the bau structs can be referenced when adding new functions to bau_operations. That way we avoid forward declarations of the bau structs. Likewise, move uv*_bau_ops structs down to avoid forward declarations of new functions defined in the same file. Declare these structs __initconst since they are only used during initialization. Similarly, declare the bau_operations ops instance __ro_after_init as it is read-only after initialization. This is a preparatory patch for adding wait_completion to bau_operations. Signed-off-by: Andrew Banman Acked-by: Ingo Molnar Acked-by: Mike Travis Cc: sivanich@hpe.com Cc: rja@hpe.com Cc: akpm@linux-foundation.org Link: http://lkml.kernel.org/r/1489077734-111753-4-git-send-email-abanman@hpe.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/uv/uv_bau.h | 22 ++++++++++---------- arch/x86/platform/uv/tlb_uv.c | 43 ++++++++++++++++++++-------------------- 2 files changed, 32 insertions(+), 33 deletions(-) commit e9be36443cecda1be20b2cc3b891676ff2af9dff Author: Andrew Banman Date: Thu Mar 9 10:42:10 2017 -0600 x86/platform/uv/BAU: Add payload descriptor qualifier On UV4, the destination agent verifies each message by checking the descriptor qualifier field of the message payload. Messages without this field set to 0x534749 will cause a hub error to assert. Split bau_message_payload into uv1_2_3 and uv4 versions to account for the different payload formats. Enforce the size of each field by using the appropriate u** integer type. Replace extraneous comments with KernelDoc comment. Signed-off-by: Andrew Banman Acked-by: Ingo Molnar Acked-by: Mike Travis Cc: sivanich@hpe.com Cc: rja@hpe.com Cc: akpm@linux-foundation.org Link: http://lkml.kernel.org/r/1489077734-111753-3-git-send-email-abanman@hpe.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/uv/uv_bau.h | 41 ++++++++++++++++++++++++++++------------ arch/x86/platform/uv/tlb_uv.c | 27 ++++++++++++++++++-------- 2 files changed, 48 insertions(+), 20 deletions(-) commit 491bd88cdb256cdabd25362b923d94ab80cf72c9 Author: Andrew Banman Date: Thu Mar 9 10:42:09 2017 -0600 x86/platform/uv/BAU: Add uv_bau_version enumerated constants Define enumerated constants for each UV hub version and replace magic numbers with the appropriate constant. Signed-off-by: Andrew Banman Acked-by: Ingo Molnar Cc: sivanich@hpe.com Cc: rja@hpe.com Cc: mike.travis@hpe.com Cc: akpm@linux-foundation.org Link: http://lkml.kernel.org/r/1489077734-111753-2-git-send-email-abanman@hpe.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/uv/uv_bau.h | 7 +++++++ arch/x86/platform/uv/tlb_uv.c | 16 ++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) commit ef47a0e0f49d5302819ea7a30920af05399ee4d5 Author: Chris Wilson Date: Mon Mar 13 12:47:24 2017 +0000 drm/i915/selftests: Catch error from mock_file() The patch 791ff39ae32a: "drm/i915: Live testing for context execution" from Feb 13, 2017, leads to the following static checker warning: drivers/gpu/drm/i915/selftests/i915_gem_context.c:347 igt_ctx_exec() error: 'file' dereferencing possible ERR_PTR() Reported-by: Dan Carpenter Fixes: 791ff39ae32a ("drm/i915: Live testing for context execution") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Matthew Auld Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Link: http://patchwork.freedesktop.org/patch/msgid/20170313124724.10614-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/selftests/i915_gem_context.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 055c4b34b94f696d9bd9aad53a11378a0fc409c9 Author: Phil Sutter Date: Fri Mar 10 18:08:02 2017 +0100 netfilter: nft_fib: Support existence check Instead of the actual interface index or name, set destination register to just 1 or 0 depending on whether the lookup succeeded or not if NFTA_FIB_F_PRESENT was set in userspace. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nft_fib.h | 2 +- include/uapi/linux/netfilter/nf_tables.h | 1 + net/ipv4/netfilter/nft_fib_ipv4.c | 4 ++-- net/ipv6/netfilter/nft_fib_ipv6.c | 2 +- net/netfilter/nft_fib.c | 14 +++++++++----- 5 files changed, 14 insertions(+), 9 deletions(-) commit 1a64edf54f55d7956cf5a0d95898bc1f84f9b818 Author: Florian Westphal Date: Wed Mar 8 16:48:44 2017 +0100 netfilter: nft_ct: add helper set support this allows to assign connection tracking helpers to connections via nft objref infrastructure. The idea is to first specifiy a helper object: table ip filter { ct helper some-name { type "ftp" protocol tcp l3proto ip } } and then assign it via nft add ... ct helper set "some-name" helper assignment works for new conntracks only as we cannot expand the conntrack extension area once it has been committed to the main conntrack table. ipv4 and ipv6 protocols are tracked stored separately so we can also handle families that observe both ipv4 and ipv6 traffic. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 12 ++- net/netfilter/nft_ct.c | 171 +++++++++++++++++++++++++++++++ 2 files changed, 182 insertions(+), 1 deletion(-) commit 84fba05511c8e0e1a6e6c8ec2c3c85616c39a8c1 Author: Florian Westphal Date: Wed Mar 8 16:48:43 2017 +0100 netfilter: provide nft_ctx in object init function this is needed by the upcoming ct helper object type -- we'd like to be able use the table family (ip, ip6, inet) to figure out which helper has to be requested. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 3 ++- net/netfilter/nf_tables_api.c | 7 ++++--- net/netfilter/nft_counter.c | 3 ++- net/netfilter/nft_quota.c | 3 ++- 4 files changed, 10 insertions(+), 6 deletions(-) commit 1257e0f804b7c2191691c0dbd455775944b9107f Author: Chris Wilson Date: Mon Mar 13 10:07:50 2017 +0000 drm/i915/selftests: Fix error path for ggtt walk_hole() The patch 6e32ab3d4777: "drm/i915: Fill different pages of the GTT" from Feb 13, 2017, leads to the following static checker warning: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:583 walk_hole() error: 'vma' dereferencing possible ERR_PTR() Reported-by: Dan Carpenter Fixes: 6e32ab3d4777 ("drm/i915: Fill different pages of the GTT" Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Matthew Auld Cc: Mika Kuoppala Cc: Link: http://patchwork.freedesktop.org/patch/msgid/20170313100750.2685-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 7f5f95d8aca44661efb4c66d405c21ca703a8e44 Author: Chris Wilson Date: Fri Mar 10 00:09:42 2017 +0000 drm/i915: Move whole object to CPU domain for coherent shmem access If the object is coherent, we can simply update the cache domain on the whole object rather than calculate the before/after clflushes. The advantage is that we then get correct tracking of ellided flushes when changing coherency later. Testcase: igt/gem_pwrite_snooped Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170310000942.11661-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.h | 6 +++--- drivers/gpu/drm/i915/i915_gem.c | 45 +++++++++++++++++++++-------------------- 2 files changed, 26 insertions(+), 25 deletions(-) commit 655d49ef77fa8d5788e05966445f9a4a124c8fbd Author: Chris Wilson Date: Sun Mar 12 13:27:45 2017 +0000 drm/i915: Rename REDIRECT_TO_GUC bit The REDIRECT_TO_GUC bit is a strange beast as it is a disable bit - setting the bit in the pm interrupt generation stops the interrupt going to the guc (not sending it to the guc as the name implies). To help the reader rename it to DISABLE_REDIRECT_TO_GUC so that we keep the bspec greppable name without it being as confusing! Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Oscar Mateo Cc: Radoslaw Szwichtenberg Cc: Sagar Arun Kamble Link: http://patchwork.freedesktop.org/patch/msgid/20170312132745.9618-1-chris@chris-wilson.co.uk Reviewed-by: Sagar Arun Kamble drivers/gpu/drm/i915/i915_guc_submission.c | 5 ++--- drivers/gpu/drm/i915/i915_irq.c | 2 +- drivers/gpu/drm/i915/i915_reg.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) commit e6963ccf5b4ced6412bcfad23410ff27d619dc3c Author: Maarten Lankhorst Date: Thu Mar 9 15:52:05 2017 +0100 drm/i915: Use new atomic iterator macros in cdclk Calculating the max pixel rate requires the new state, so use it there. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1489071125-917-6-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_cdclk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa5e9b47b90156f0c35b9ff46fe658c565ce0ef9 Author: Maarten Lankhorst Date: Thu Mar 9 15:52:04 2017 +0100 drm/i915: Use new atomic iterator macros in display code Add a big fat warning in __intel_display_resume that the old state is invalid, and use the correct state everywhere. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1489071125-917-5-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä Reviewed-by: Daniel Vetter [mlankhorst: Change one occurence of conn_state to new_conn_state in verify_connector_state, and drop old_conn_state there] drivers/gpu/drm/i915/intel_display.c | 161 ++++++++++++++++++----------------- 1 file changed, 82 insertions(+), 79 deletions(-) commit 6ebdb5a02948d09093af486b237a9692fd21c998 Author: Maarten Lankhorst Date: Thu Mar 9 15:52:03 2017 +0100 drm/i915: Use new atomic iterator macros in wm code The watermark code needs to look at the new allocations, so use for_each_new_crtc_in_state everywhere. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1489071125-917-4-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_pm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e96b206f543c64532a1342f2e5ce277911102ec9 Author: Maarten Lankhorst Date: Thu Mar 9 15:52:02 2017 +0100 drm/i915: Use new atomic iterator macros in fbc Use for_each_new_plane_in_state, only the new state is needed. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1489071125-917-3-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_fbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b77c7a90bef40a3ade6d5f7a96d8e73ff4ccd456 Author: Maarten Lankhorst Date: Thu Mar 9 15:52:01 2017 +0100 drm/i915: Use new atomic iterator macros in ddi Use for_each_new_connector_in_state instead of for_each_connector_in_state. Also make the function static, it's only used inside intel_ddi.c Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1489071125-917-2-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/intel_ddi.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) commit 3dd0c8d06511c7c61c62305fcf431ca28884d263 Author: Mikhail Kurinnoi Date: Fri Jan 27 19:23:01 2017 +0300 ima: provide ">" and "<" operators for fowner/uid/euid rules. For now we have only "=" operator for fowner/uid/euid rules. This patch provide two more operators - ">" and "<" in order to make fowner/uid/euid rules more flexible. Examples of usage. Appraise all files owned by special and system users (SYS_UID_MAX 999): appraise fowner<1000 Don't appraise files owned by normal users (UID_MIN 1000): dont_appraise fowner>999 Appraise all files owned by users with UID 1000-1010: dont_appraise fowner>1010 appraise fowner>999 Changelog v3: - Removed code duplication in ima_parse_rule(). - Fix ima_policy_show() - (Mimi) Changelog v2: - Fixed default policy rules. Signed-off-by: Mikhail Kurinnoi Signed-off-by: Mimi Zohar security/integrity/ima/ima_policy.c | 115 +++++++++++++++++++++++++++--------- 1 file changed, 87 insertions(+), 28 deletions(-) security/integrity/ima/ima_policy.c | 115 +++++++++++++++++++++++++++--------- 1 file changed, 87 insertions(+), 28 deletions(-) commit 665788572c6410b7efadc2e3009c5d830b6d8ef9 Author: Jani Nikula Date: Fri Mar 10 15:27:57 2017 +0200 drm/i915/vbt: don't propagate errors from intel_bios_init() We don't use the error return for anything other than reporting and logging that there is no VBT. We can pull the logging in the function, and remove the error status return. Moreover, if we needed the information for something later on, we'd probably be better off storing the bit in dev_priv, and using it where it's needed, instead of using the error return. While at it, improve the comments. Cc: Manasi Navare Cc: Ville Syrjälä Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/438ebbb0d5f0d321c625065b9cc78532a1dab24f.1489152288.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.c | 4 +--- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_bios.c | 31 ++++++++++++++++--------------- 3 files changed, 18 insertions(+), 19 deletions(-) commit cd59de80dd34dd2d1a3ca97d7a6e712c048b135a Author: Geert Uytterhoeven Date: Fri Mar 10 14:48:30 2017 +0100 soc: renesas: Identify RZ/G1N Add support for identifying the RZ/G1N (r8a7744) SoC. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman drivers/soc/renesas/renesas-soc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8848e1b14231a40ed66229fb3ee98519b32f2ae7 Author: Geert Uytterhoeven Date: Fri Mar 10 14:48:29 2017 +0100 soc: renesas: Identify RZ/G1H Add support for identifying the RZ/G1H (r8a7742) SoC. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman drivers/soc/renesas/renesas-soc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit cfb9f93437eb6663ca99e85c47bb3656ccfe59c5 Author: Geert Uytterhoeven Date: Fri Mar 10 14:48:28 2017 +0100 ARM: shmobile: Document RZ/G1N SoC DT binding Document the RZ/G1N (r8a7744) SoC. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++ 1 file changed, 2 insertions(+) commit 368d03531f39ffaa793a98b9a17c79d660b1cd1a Author: Geert Uytterhoeven Date: Fri Mar 10 14:48:27 2017 +0100 ARM: shmobile: Document RZ/G1H SoC DT binding Document the RZ/G1H (r8a7742) SoC. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++ 1 file changed, 2 insertions(+) commit 3cbe33367d4fd480a92fbc131a96fa925be9e95d Author: Geert Uytterhoeven Date: Fri Mar 10 14:19:16 2017 +0100 arm64: dts: r8a7796: salvator-x: Drop superfluous status update for frequency override The scif_clk device node is already enabled in r8a7796.dtsi, so there is no need to update its status again. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 1 - 1 file changed, 1 deletion(-) commit cb4de4ece41a55ba125e6e8d1fa727457132dc41 Author: Geert Uytterhoeven Date: Fri Mar 10 14:19:15 2017 +0100 arm64: dts: m3ulcb: Drop superfluous status update for frequency override The scif_clk device node is already enabled in r8a7796.dtsi, so there is no need to update its status again. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts | 1 - 1 file changed, 1 deletion(-) commit 971939d1da07c7b55d35aca31288cce297731c71 Author: Geert Uytterhoeven Date: Fri Mar 10 14:19:14 2017 +0100 arm64: dts: r8a7795: salvator-x: Drop superfluous status updates for frequency overrides The scif_clk and pcie_bus_clk device nodes are already enabled in r8a7795.dtsi, so there is no need to update their statuses again. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 2 -- 1 file changed, 2 deletions(-) commit c9060f50d82fc9b548571a9adea9ebff22b3347b Author: Geert Uytterhoeven Date: Fri Mar 10 14:19:13 2017 +0100 arm64: dts: h3ulcb: Drop superfluous status update for frequency override The scif_clk device node is already enabled in r8a7795.dtsi, so there is no need to update its status again. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 1 - 1 file changed, 1 deletion(-) commit d01ff18992218f3a13f45f45a886b3bf8f250f14 Author: Geert Uytterhoeven Date: Fri Mar 10 14:19:12 2017 +0100 ARM: dts: silk: Drop superfluous status update for frequency override The scif_clk device node is already enabled in r8a7794.dtsi, so there is no need to update its status again. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794-silk.dts | 1 - 1 file changed, 1 deletion(-) commit e5fada0cf2131b901e411bb65c22ddc98b6dcf98 Author: Geert Uytterhoeven Date: Fri Mar 10 14:19:11 2017 +0100 ARM: dts: alt: Drop superfluous status update for frequency override The scif_clk device node is already enabled in r8a7794.dtsi, so there is no need to update its status again. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794-alt.dts | 1 - 1 file changed, 1 deletion(-) commit e68f8b428d84c304ca534505eafa98cb02a5bae0 Author: Geert Uytterhoeven Date: Fri Mar 10 14:19:10 2017 +0100 ARM: dts: gose: Drop superfluous status update for frequency override The scif_clk device node is already enabled in r8a7793.dtsi, so there is no need to update its status again. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7793-gose.dts | 1 - 1 file changed, 1 deletion(-) commit b546d090c8ecca05c83e71d931f6d9ad72a8d730 Author: Geert Uytterhoeven Date: Fri Mar 10 14:19:09 2017 +0100 ARM: dts: porter: Drop superfluous status update for frequency override The pcie_bus_clk device node is already enabled in r8a7791.dtsi, so there is no need to update its status again. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791-porter.dts | 1 - 1 file changed, 1 deletion(-) commit b20b1de4b542749a500c426796bb7fa400b03e58 Author: Geert Uytterhoeven Date: Fri Mar 10 14:19:08 2017 +0100 ARM: dts: koelsch: Drop superfluous status updates for frequency overrides The scif_clk and pcie_bus_clk device nodes are already enabled in r8a7791.dtsi, so there is no need to update their statuses again. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791-koelsch.dts | 2 -- 1 file changed, 2 deletions(-) commit 2507e3d41a3f0f09e7d756b34e3bb953d6d3b76d Author: Geert Uytterhoeven Date: Fri Mar 10 14:19:07 2017 +0100 ARM: dts: lager: Drop superfluous status update for frequency override The scif_clk device node is already enabled in r8a7790.dtsi, so there is no need to update its status again. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790-lager.dts | 1 - 1 file changed, 1 deletion(-) commit 2f69fd8cb2187631ad68531a07406ad6b179b122 Author: Geert Uytterhoeven Date: Fri Mar 10 14:19:06 2017 +0100 ARM: dts: marzen: Drop superfluous status update for frequency override The scif_clk device node is already enabled in r8a7779.dtsi, so there is no need to update its status again. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7779-marzen.dts | 1 - 1 file changed, 1 deletion(-) commit ffbb98d4d1f194e455bae2bc2eab2995188c652e Author: Geert Uytterhoeven Date: Fri Mar 10 14:19:05 2017 +0100 ARM: dts: bockw: Drop superfluous status update for frequency override The scif_clk device node is already enabled in r8a7778.dtsi, so there is no need to update its status again. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7778-bockw.dts | 1 - 1 file changed, 1 deletion(-) commit d8fc23051a9b6dd66ed0cc3c2a676991493b8112 Author: Geert Uytterhoeven Date: Fri Mar 10 14:19:04 2017 +0100 ARM: dts: porter: Always use status "okay" to enable devices While status "ok" does work, the canonical form is "okay", so update the few places that used the former. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791-porter.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2f25c2d1cdf04ab0f247351e286d3fdefbdad09b Author: Geert Uytterhoeven Date: Mon Mar 6 17:58:10 2017 +0100 ARM: dts: r8a7793: Add INTC-SYS clock to device tree Link the ARM GIC to the INTC-SYS module clock, and add it to the "always on" PM Domain, so it can be power managed using that clock. Note that currently the GIC-400 driver doesn't support module clocks nor Runtime PM, so this must be handled as a critical clock. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7793.dtsi | 11 ++++++++--- include/dt-bindings/clock/r8a7793-clock.h | 5 +++-- 2 files changed, 11 insertions(+), 5 deletions(-) commit f103560cf7c2abc10283dd0ba9889f3de5b7ac7e Merge: 1f3b1fd 264ec1a Author: Daniel Vetter Date: Mon Mar 13 09:26:06 2017 +0100 Merge tag 'topic/designware-baytrail-2017-03-02' of git://anongit.freedesktop.org/git/drm-intel into drm-intel-next-queued Baytrail PMIC vs. PMU race fixes from Hans de Goede This time the right version (v4), with the compile fix. Signed-off-by: Daniel Vetter commit e33cc31630c3ca1de47c2470ec8d41dee0683b11 Author: David S. Miller Date: Mon Mar 13 00:00:03 2017 -0700 sch_tbf: Remove bogus semicolon in if() conditional. Fixes: 49b499718fa1 ("net: sched: make default fifo qdiscs appear in the dump") Reported-by: kbuild test robot Signed-off-by: David S. Miller net/sched/sch_tbf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bcf165ac6556dc55a596d524b8187d1ba7a8c7d Author: Zhu Yanjun Date: Sun Mar 12 05:02:54 2017 -0400 r8169: replace init_timer with setup_timer Replace init_timer with setup_timer to simplify the source code. Signed-off-by: Zhu Yanjun Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 13d61c3adb5d8dc471a5f73ebe13b4f1a1e93c4f Merge: 0f230ca 0c68f66 Author: David S. Miller Date: Sun Mar 12 23:54:08 2017 -0700 Merge branch 'mv88e6xxx-rework-ATU-support' Vivien Didelot says: ==================== net: dsa: mv88e6xxx: rework ATU support The purpose of this patch series is to rework the code related to the Address Translation Unit (ATU), and bring support for it to the 88E6390 family of switch chips. All Global (1) ATU related code have been reworked and moved to its own file. Some port related bits used for ATU configuration (such as the Learn2All and MessagePort feature) have also been taken care of. The ports' mode and egress flooding mode have been refactored to fix the egress of frames with unknown unicast or multicast destination address, and write all these bits regardless the port mode (Normal, DSA, etc.) Finally remove the eth_addr_greater which was only used by mv88e6xxx. Changes in v2: - add Reviewed-by tags - split mv88e6xxx_g1_atu_set_age_time and mv88e6xxx_atu_setup addition - remove DSA_TAG_PROTO_TRAILER check - split Message Port and Learn2All addition - remove unused MV88E6XXX_FLAG_G1_ATU_FID flag - add dsa_is_normal_port helper ==================== Signed-off-by: David S. Miller commit 0c68f666d4cc8835ed888ffdd58f76d4d8e2da51 Author: Vivien Didelot Date: Sat Mar 11 16:13:03 2017 -0500 etherdevice: remove unused eth_addr_greater eth_addr_greater() was introduced for the mv88e6xxx driver, but is not used anymore. There is no other user, thus remove this function. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller include/linux/etherdevice.h | 15 --------------- 1 file changed, 15 deletions(-) commit 9dbfb4e1ca45c069bd1156adedfbc95e0c24be28 Author: Vivien Didelot Date: Sat Mar 11 16:13:02 2017 -0500 net: dsa: mv88e6xxx: add port priority override op Add a new operation to disable the DA, SA and VTU priority override. Setting such limit is not likely to be used soon, so provide a port_disable_pri_override operation directly. This can be changed later for port_set_pri_override when we'll need it. Also remove the now obsolete mv88e6xxx_6320_family helper. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 39 +++++++++++++++++++++++------------ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + drivers/net/dsa/mv88e6xxx/port.c | 7 +++++++ drivers/net/dsa/mv88e6xxx/port.h | 1 + 4 files changed, 35 insertions(+), 13 deletions(-) commit c8c94891527a9e624a40a2e40c5934698443fd9c Author: Vivien Didelot Date: Sat Mar 11 16:13:01 2017 -0500 net: dsa: mv88e6xxx: add port ATU learn limit op Add a new operation to disable the limiting of learnt MAC addresses. Setting such limit is not likely to be used soon, so provide a port_disable_learn_limit operation directly. This can be changed later for port_set_learn_limit when we'll need it. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 36 +++++++++++++++++++++++++++++------ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + drivers/net/dsa/mv88e6xxx/port.c | 7 +++++++ drivers/net/dsa/mv88e6xxx/port.h | 3 +++ 4 files changed, 41 insertions(+), 6 deletions(-) commit 601aeed371a36e6675f3c7f7f6cf8bc181f1f276 Author: Vivien Didelot Date: Sat Mar 11 16:13:00 2017 -0500 net: dsa: mv88e6xxx: fix port egress flooding mode The Marvell switch ports can be configured to allow or prevent egress of frames with an unknown unicast or multicast destination address. Some switch chips such as 88E6095 and 88E6185 have two disjoint bits in Port Control Register (0x04) bit 2 "Forward Unknown" (for unicast) and Port Control 2 Register (0x08) bit 6 "Default Forward" (for multicast). Other chips such as 88E6085, 88E6123, 88E6352, and 88E6390 have a 2-bit value in Port Control Register (0x04) bits 3:2 "EgressFloods". The current code does not fully implement the disjoint bits variant and assigns incorrect ones to some chip models. Fix that with two implementation references (6185 and 6352 that I currently have) of a port_set_egress_floods operation (as named in datasheets). Old chips such as 88E6060 don't have egress flooding mode, so don't error out if the operation is not provided. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 103 +++++++++++++--------------------- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 15 +++-- drivers/net/dsa/mv88e6xxx/port.c | 44 ++++++++++----- drivers/net/dsa/mv88e6xxx/port.h | 10 ++-- 4 files changed, 80 insertions(+), 92 deletions(-) commit 4314557c6505a14043717de01036dc0e3a357010 Author: Vivien Didelot Date: Sat Mar 11 16:12:59 2017 -0500 net: dsa: mv88e6xxx: rework port mode setup A switch port mode is defined by the association of its egress mode, its frame mode and if supported or required, the ether type value. Pack all this in a mv88e6xxx_set_port_mode function and provide helpers for the Normal Network mode, the DSA mode, and the Ether Type DSA mode, as well as an helper to setup a port's mode depending on its nature. Define PORT_ETH_TYPE_DEFAULT for the 0x9100 reset value of port E Type. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 106 +++++++++++++++++++--------------- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + 2 files changed, 60 insertions(+), 47 deletions(-) commit 6cd456f38207b56ba18c444d50fe49a7fe8b2a0a Author: Vivien Didelot Date: Sat Mar 11 16:12:58 2017 -0500 net: dsa: add dsa_is_normal_port helper Introduce a dsa_is_normal_port helper to check if a given port is a normal user port as opposed to a CPU port or DSA link. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller include/net/dsa.h | 5 +++++ 1 file changed, 5 insertions(+) commit 01bd96c8831e54a3ba2794c647a269d130872750 Author: Vivien Didelot Date: Sat Mar 11 16:12:57 2017 -0500 net: dsa: mv88e6xxx: rename the port vector member Not all Marvell switch chips support port trunking, which is embedded in the port vector data for ATU operations. Rename the portv_trunkid member of the mv88e6xxx_atu_entry structure to portvec to be more concise and consistent with the different chips. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 8 ++++---- drivers/net/dsa/mv88e6xxx/global1_atu.c | 8 ++++---- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) commit d7f435f9671ed207231c3711d175a0178356514d Author: Vivien Didelot Date: Sat Mar 11 16:12:56 2017 -0500 net: dsa: mv88e6xxx: rename new FID helper Rename the _mv88e6xxx_fid_new helper to mv88e6xxx_atu_new to get rid of the old underscore prefix naming convention and be consistent with the rest of the chip-wide ATU API. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e606ca36bbf2e243171d42186573df254b33a123 Author: Vivien Didelot Date: Sat Mar 11 16:12:55 2017 -0500 net: dsa: mv88e6xxx: rework ATU Remove Add a fresh documented implementation of the ATU Move operation, and use it to replace the current ATU Remove operation. Note that not all Marvell switch chip support the ATU Move operation. For those supporting it, the number of bits used to mask the destination port may vary. 6352 and such use 4-bit, while 6390 use 5-bit. Thus add a new atu_move_port_mask member in the info structure to describe the presence and variant of ATU Move operation. Note that the ATU Move operation is not documented in the 6185 datasheet but the chip does support the operation. All remaining _mv88e6xxx_atu_* functions are now unused as well as the MV88E6XXX_FLAG_G1_ATU_FID flag, thus remove them. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 140 +++++++------------------------- drivers/net/dsa/mv88e6xxx/global1.h | 2 + drivers/net/dsa/mv88e6xxx/global1_atu.c | 29 +++++++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 18 ++-- 4 files changed, 67 insertions(+), 122 deletions(-) commit daefc94321ee146df2a750a4575bfbde98bad2d9 Author: Vivien Didelot Date: Sat Mar 11 16:12:54 2017 -0500 net: dsa: mv88e6xxx: rework ATU Flush Add a fresh documented implementation of the ATU Flush/Move operation. Use it to replace the current ATU Flush operation. _mv88e6xxx_atu_flush_move is still used by the Move operation so keep it until the Move operation is refactored in a next commit. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 22 +++++--------------- drivers/net/dsa/mv88e6xxx/global1.h | 1 + drivers/net/dsa/mv88e6xxx/global1_atu.c | 37 +++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 17 deletions(-) commit dabc1a968ae17bcd99c216f509be101dfdeac664 Author: Vivien Didelot Date: Sat Mar 11 16:12:53 2017 -0500 net: dsa: mv88e6xxx: rework ATU GetNext Add and use a fresh documented implementation of the ATU GetNext. Since it is not necessary to write the MAC address to iterate from, only do it once directly in the ATU GetNext operation, if the provided ATU entry structure is not valid. This makes the user code simpler. Also, there is no need to loop when getting a single ATU entry. So remove the mv88e6xxx_atu_get helper and add a simpler snippet in mv88e6xxx_port_db_load_purge to lookup a given MAC address. The _mv88e6xxx_atu_mac_{read,write} are not used anymore thus remove them. _mv88e6xxx_atu_data_{read,write} are still used so keep them. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 140 ++++---------------------------- drivers/net/dsa/mv88e6xxx/global1.h | 2 + drivers/net/dsa/mv88e6xxx/global1_atu.c | 66 +++++++++++++++ 3 files changed, 84 insertions(+), 124 deletions(-) commit 9c13c0267683733f549bb883220ab042028e1c7d Author: Vivien Didelot Date: Sat Mar 11 16:12:52 2017 -0500 net: dsa: mv88e6xxx: rework ATU Load/Purge All Marvell switch chips have an ATU accessed using the same Global (1) register layout. Only the handling of the FID differs as more bits were necessary to support more and more databases. Add and use a fresh documented implementation of the ATU Load/Purge. The static mv88e6xxx_g1_atu_{fid_write,op_wait,op,data_write,mac_write} functions won't need to be exposed in the end so for the moment keep their counterparts _mv88e6xxx_atu_{wait,cmd,data_write,mac_write} as is, since they are still used by other ATU operations. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 22 +------ drivers/net/dsa/mv88e6xxx/global1.h | 2 + drivers/net/dsa/mv88e6xxx/global1_atu.c | 108 ++++++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+), 21 deletions(-) commit c3a7d4ade5a5ac5bec63382bda35a92629447efb Author: Vivien Didelot Date: Sat Mar 11 16:12:51 2017 -0500 net: dsa: mv88e6xxx: enable ATU Learn2All The ATU Learn2All feature allows newly learnt addresses to be spanned on ports marked as "Message Port", currently all DSA ports. This commit enables this feature which is necessary and quite convenient for multi-chip switch fabrics. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 15 ++++++--------- drivers/net/dsa/mv88e6xxx/global1.h | 1 + drivers/net/dsa/mv88e6xxx/global1_atu.c | 17 +++++++++++++++++ 3 files changed, 24 insertions(+), 9 deletions(-) commit ea698f4f70937f02961f2041db82d4baf6c986d6 Author: Vivien Didelot Date: Sat Mar 11 16:12:50 2017 -0500 net: dsa: mv88e6xxx: setup message ports All interconnectable Marvell switch chips have an ATU Learn2All feature which allows newly learnt addresses to be spanned on ports marked as "Message Port". This commit configures the DSA ports as Message Port. Note that this has no effect until the Learn2All feature is enabled. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 12 ++++++++---- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + drivers/net/dsa/mv88e6xxx/port.c | 18 ++++++++++++++++++ drivers/net/dsa/mv88e6xxx/port.h | 2 ++ 4 files changed, 29 insertions(+), 4 deletions(-) commit a2ac29d2cccdaa647b67355786d961196140491b Author: Vivien Didelot Date: Sat Mar 11 16:12:49 2017 -0500 net: dsa: mv88e6xxx: add ATU setup helper Move the configuration of the default ageing time in a new mv88e6xxx_atu_setup function. That function will be extended later to contain all ATU related configuration bits. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 720c6343ef67de926251b0c1b3bb0b76d2cff946 Author: Vivien Didelot Date: Sat Mar 11 16:12:48 2017 -0500 net: dsa: mv88e6xxx: move ATU ageing time setter Move the ATU ageing time setter code in a new global1_atu.c file, which will be extended in future patches to contains all consequent Global (1) ATU support code. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/Makefile | 1 + drivers/net/dsa/mv88e6xxx/chip.c | 31 ++---------------------- drivers/net/dsa/mv88e6xxx/global1.h | 3 +++ drivers/net/dsa/mv88e6xxx/global1_atu.c | 43 +++++++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 29 deletions(-) commit 4d294af2cd932e0c1b2534137b143920c17dffd6 Author: Vivien Didelot Date: Sat Mar 11 16:12:47 2017 -0500 net: dsa: mv88e6xxx: add port mask helper Add a mv88e6xxx_port_mask() helper to get the bitmask of ports in a switch chip, that will be used in several features. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 5 +++++ drivers/net/dsa/mv88e6xxx/port.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) commit 0f230ca9407037ee00205fae1ada8a6cd06ddda2 Merge: 27303fc 7c1b8eb Author: David S. Miller Date: Sun Mar 12 23:50:15 2017 -0700 Merge branch 'mlxsw-tc-flower-offload-stats' Jiri Pirko says: ==================== mlxsw: Add support for TC flower offload statistics Arkadi says: This patchset adds support for retrieving TC flower statistics for offloaded rules, which includes packets count, bytes count and last used time stamp. Currently The statistics are gathered on a per-rule basis. This patchset also includes generic allocator for counters. ==================== Signed-off-by: David S. Miller commit 7c1b8eb175b69add8eac105409d2a59723574675 Author: Arkadi Sharshevsky Date: Sat Mar 11 09:42:59 2017 +0100 mlxsw: spectrum: Add support for TC flower offload statistics Add support for TC flower offload statistics including number of packets, bytes and last use timestamp. Currently the statistics are gathered on a per-rule basis. Signed-off-by: Arkadi Sharshvesky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 3 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 + drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 28 +++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_flower.c | 49 ++++++++++++++++++++++ 4 files changed, 82 insertions(+) commit 4817072950ad38229991ab0019fa28fece39285b Author: Arkadi Sharshevsky Date: Sat Mar 11 09:42:58 2017 +0100 mlxsw: spectrum: Add support for counters on TCAM entries Add support for packets and byte statistics on TCAM entries. The counters are allocated from the generic flow counters pool. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 7 +++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 35 ++++++++++++++++++++++ 2 files changed, 42 insertions(+) commit 938ab60860e81f123460b56b8463d6b5d6c51ac7 Author: Arkadi Sharshevsky Date: Sat Mar 11 09:42:57 2017 +0100 mlxsw: spectrum: Add support for Policing and Counting action block Add support for Policing and Counting action block. This action block will be used to bind counter to TCAM entries. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../mellanox/mlxsw/core_acl_flex_actions.c | 51 ++++++++++++++++++++++ .../mellanox/mlxsw/core_acl_flex_actions.h | 2 + 2 files changed, 53 insertions(+) commit 446a154187b9d9a35f97f9d981501d6b55d8d6ed Author: Arkadi Sharshevsky Date: Sat Mar 11 09:42:56 2017 +0100 mlxsw: spectrum: Add periodic ACL rule activity update Introduce periodic task for dumping the activity status for the ACL rule TCAM entries. This is done in order to emulate last use statistics. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 74 +++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) commit 096e914f69dcb07ee6f82f8507325e9668979395 Author: Arkadi Sharshevsky Date: Sat Mar 11 09:42:55 2017 +0100 mlxsw: spectrum: Add support for direct rule access Currently the ACL rules can be accessed only by hashing. In order to dump the activity the rules are also placed in a list. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7fd056c2ef50088b891f2044af52bbb28699f4e6 Author: Arkadi Sharshevsky Date: Sat Mar 11 09:42:54 2017 +0100 mlxsw: spectrum_acl_tcam: Add support for retrieving TCAM entry activity Add support for retrieving TCAM entry activity. In order to support ACL rule activity corresponding TCAM entry should be queried. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 ++ .../ethernet/mellanox/mlxsw/spectrum_acl_tcam.c | 42 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) commit 1abcbcc292ee6c66e659b2a7a5e84e5d151e9334 Author: Arkadi Sharshevsky Date: Sat Mar 11 09:42:53 2017 +0100 mlxsw: spectrum: Add support for generic flow counter allocation Add support for allocating generic flow counter. Generic flow counter can count packets or packets and bytes and can be assigned to different hardware processes. First use will be for counting packets and bytes of ACL rules, and will be introduced in the following patches. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/resources.h | 2 + drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 54 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 7 +++ drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.c | 23 ++++++++- drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.h | 3 +- 5 files changed, 86 insertions(+), 3 deletions(-) commit 5766532abcee1e06897f3e1865c763f5d6eac495 Author: Arkadi Sharshevsky Date: Sat Mar 11 09:42:52 2017 +0100 mlxsw: reg: Add Monitoring General Purpose Counter Set register The MGPC register retrieves generic flow counter value. It will be used to query ACL counters. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit ff7b0d27208bd730aa71bd91087f0ff80ca60eda Author: Arkadi Sharshevsky Date: Sat Mar 11 09:42:51 2017 +0100 mlxsw: spectrum: Add support for counter allocator Add implementation for counter allocator. The ASIC has special memory pool for various counting purposes. Counter memory is distributed between equal size banks. The static sub-pool configuration should specify the following parameters for each sub-pool: - Number of required banks. - Maximum entry size. Each module can add dedicated sub-pool or use existing one. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/Makefile | 3 +- drivers/net/ethernet/mellanox/mlxsw/resources.h | 2 + drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 10 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 + drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.c | 177 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.h | 54 +++++++ 6 files changed, 247 insertions(+), 1 deletion(-) commit 27303fcf5734d84c8d018b79d1db154ceaf88df8 Author: Geliang Tang Date: Sat Mar 11 08:46:59 2017 +0800 drop_monitor: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller net/core/drop_monitor.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0329b7daff75eddcf1df2eecf2cf97a91c33d0ee Author: Geliang Tang Date: Sat Mar 11 08:46:56 2017 +0800 ambassador: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller drivers/atm/ambassador.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d1523099419990fce4360e828d5d0120360ad7ae Merge: 6dc6826 6fe0c3b Author: David S. Miller Date: Sun Mar 12 23:43:20 2017 -0700 Merge branch 'nfp-xdp_adjust_head' Jakub Kicinski says: ==================== nfp: XDP adjust head support This series adds support for XDP adjust head. Bulk of the code is actually just paying technical debt. On reconfiguration request nfp was allocating new resources separately leaving device running with the existing set of rings. We used to manage the new resources in special ring set structures. This set is simply separating the datapath part of the device structure from the control information allowing the new datapath structure to be allocated with all new memory and rings. The swap operation is now greatly simplified. We also save a lot of parameter passing this way. Hopefully the churn is worth the negative diffstat. Support for XDP adjust head is done in a pretty standard way. NFP is a bit special because it prepends metadata before packet data so we have to do a bit of memcpying in case XDP will run. We also luck out a little bit because the fact that we already have prepend space allocated means that one byte is enough to store the extra XDP space (256 of standard prepend space is a bit inconvenient since it would normally require 16bits or boolean with additional shifts). ==================== Signed-off-by: David S. Miller commit 6fe0c3b43804c9803a4a31c9d2ed8c2014bc0dc3 Author: Jakub Kicinski Date: Fri Mar 10 10:38:39 2017 -0800 nfp: add support for xdp_adjust_head() Support prepending data from XDP. We are already always allocating some headroom because FW may prepend metadata to packets. xdp_adjust_head() can be supported by making sure that headroom is big enough for XDP. In case FW had prepended metadata to the packet, however, we have to move it out of the way before we call XDP. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 2 + .../net/ethernet/netronome/nfp/nfp_net_common.c | 98 +++++++++++++++------- 2 files changed, 70 insertions(+), 30 deletions(-) commit b92fb77f27af90d3ee785eedc326f80cb6190597 Author: Jakub Kicinski Date: Fri Mar 10 10:38:38 2017 -0800 nfp: prepare metadata handling for xdp_adjust_head() XDP may require us to move metadata to make room for pushing headers. Track meta data location with a pointer and pass it explicitly to functions. While at it validate that meta_len from the descriptor is not bogus. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_common.c | 28 +++++++++++++++------- 1 file changed, 19 insertions(+), 9 deletions(-) commit 1abae31953996283e1956af0b8ffa72c2b682e77 Author: Jakub Kicinski Date: Fri Mar 10 10:38:37 2017 -0800 nfp: reorganize pkt_off variable Rename pkt_off variable to dma_off, it should hold data offset counting from beginning of DMA mapping. Compute the value only in XDP context. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 97717aca618a85d9e52327b4509a3b95c2f8f121 Author: Jakub Kicinski Date: Fri Mar 10 10:38:36 2017 -0800 nfp: validate rx offset from the BAR and size down it's field NFP_NET_CFG_RX_OFFSET is 32bit wide, make sure what we read from there is reasonable for packet headroom. This allows us to store the rx_offset in a 8bit variable. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 6 +++--- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 14 +++++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) commit c487e6b199eab3af14e54406d97cc3c149e591e1 Author: Jakub Kicinski Date: Fri Mar 10 10:38:35 2017 -0800 nfp: store dma direction in data path structure Instead of testing if xdp_prog is present store the dma direction in data path structure. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 11 ++++-- .../net/ethernet/netronome/nfp/nfp_net_common.c | 45 ++++++++-------------- 2 files changed, 24 insertions(+), 32 deletions(-) commit 892a7f700b361882105739632ccbd6ceb848c21d Author: Jakub Kicinski Date: Fri Mar 10 10:38:34 2017 -0800 nfp: switch to using data path structures for reconfiguration Instead of passing around sets of rings and their parameters just store all information in the data path structure. We will no longer user xchg() on XDP programs when we swap programs while the traffic is guaranteed not to be flowing. This allows us to simply assign the entire data path structures instead of copying field by field. The optimization to reallocate only the rings on the side (RX/TX) which has been changed is also removed since it seems like it's not worth the code complexity. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 10 +- .../net/ethernet/netronome/nfp/nfp_net_common.c | 260 ++++++--------------- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 46 +--- 3 files changed, 89 insertions(+), 227 deletions(-) commit 9dc6b116e21b9ff258334c09d78ce26caa5ade45 Author: Jakub Kicinski Date: Fri Mar 10 10:38:33 2017 -0800 nfp: use dp to carry xdp_prog at reconfig time Use xdp_prog member of data path struct to carry the xdp_prog to alloc/free free functions. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 1 - .../net/ethernet/netronome/nfp/nfp_net_common.c | 82 +++++++++------------- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 6 +- 3 files changed, 37 insertions(+), 52 deletions(-) commit 76e1e1a89351832ea5d9f7b57677e7420ba6bc92 Author: Jakub Kicinski Date: Fri Mar 10 10:38:32 2017 -0800 nfp: use dp to carry mtu at reconfig time Move the mtu member from ring set to data path struct. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 4 +++- .../net/ethernet/netronome/nfp/nfp_net_common.c | 23 +++++++++++----------- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 2 -- 3 files changed, 15 insertions(+), 14 deletions(-) commit 2195c2637f90e97ef8cd8f8e0fe11c1829e7f1f6 Author: Jakub Kicinski Date: Fri Mar 10 10:38:31 2017 -0800 nfp: use dp to carry fl_bufsz at reconfig time Use fl_bufsz member of data path struct to carry desired size of free list entries. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 3 -- .../net/ethernet/netronome/nfp/nfp_net_common.c | 56 +++++++++++----------- 2 files changed, 27 insertions(+), 32 deletions(-) commit 512e94dc3229a824190e310c899a3f6d08216477 Author: Jakub Kicinski Date: Fri Mar 10 10:38:30 2017 -0800 nfp: use dp to carry number of stack tx rings and vectors Instead of passing variables around use dp to store number of tx rings for the stack and number of IRQ vectors. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_common.c | 62 +++++++++++----------- 1 file changed, 31 insertions(+), 31 deletions(-) commit 783496b0ddc2bd4ad561864138596ebb336a7100 Author: Jakub Kicinski Date: Fri Mar 10 10:38:29 2017 -0800 nfp: pass new data path to ring reconfig Make callers of nfp_net_ring_reconfig() pass newly allocated data path structure. We will gradually make use of that structure instead of passing parameters around to all the allocation functions. This commit adds allocation and propagation of new data path struct, no parameters are converted, yet. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 5 +- .../net/ethernet/netronome/nfp/nfp_net_common.c | 108 ++++++++++++++------- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 14 ++- 3 files changed, 91 insertions(+), 36 deletions(-) commit d2b84397601f370ca11a5a37a40787d31af778b7 Author: Jakub Kicinski Date: Fri Mar 10 10:38:28 2017 -0800 nfp: move control BAR pointer into data path structure Control BAR pointer is used to unmask interrupts so it should be in the first cacheline of adapter structure. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 21 +++++++++++---------- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 14 +++++++------- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c | 4 ++-- 4 files changed, 21 insertions(+), 20 deletions(-) commit 79c12a752cea61d41fd2f95600eaaaaafb99fe9e Author: Jakub Kicinski Date: Fri Mar 10 10:38:27 2017 -0800 nfp: separate data path information from the reset of adapter structure Move all data path information into a separate structure. This way we will be able to allocate new data path with all new rings etc. and swap it in easily. No functional changes. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 105 ++-- .../net/ethernet/netronome/nfp/nfp_net_common.c | 602 +++++++++++---------- .../net/ethernet/netronome/nfp/nfp_net_debugfs.c | 4 +- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 64 +-- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 30 +- .../net/ethernet/netronome/nfp/nfp_net_offload.c | 30 +- .../net/ethernet/netronome/nfp/nfp_netvf_main.c | 15 +- 7 files changed, 436 insertions(+), 414 deletions(-) commit bd174169c7a12a37b3b4aa2221f084ade010b182 Author: David Windsor Date: Fri Mar 10 10:34:12 2017 -0500 locking/refcount: Add refcount_t API kernel-doc comments Signed-off-by: David Windsor Acked-by: Peter Zijlstra Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Thomas Gleixner Cc: elena.reshetova@intel.com Cc: kernel-hardening@lists.openwall.com Link: http://lkml.kernel.org/r/1489160052-20293-1-git-send-email-dwindsor@gmail.com Signed-off-by: Ingo Molnar include/linux/refcount.h | 19 ++++++++ lib/refcount.c | 122 ++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 129 insertions(+), 12 deletions(-) commit 6dc6826f873cb7e73d9ebef7500d3d3f805533fd Merge: 429a372 19d9187 Author: David S. Miller Date: Sun Mar 12 23:41:04 2017 -0700 Merge branch 'stmmac-multiqueue-mac-prep' Joao Pinto says: ==================== prepare mac operations for multiple queues As agreed with David Miller, this patch-set is the first of 3 to enable multiple queues in stmmac. This first one concentrates on mac operations adding functionalities as: a) Configuration through DT b) RX and TX scheduling algorithms programming b) TX queues weight programming (essential in weightes algorithms) c) RX enable as DCB or AVB (preparing for future AVB support) d) Mapping RX queue to DMA channel e) IRQ treatment prepared for multiple queues f) Debug dump prepared for multiple queues g) CBS configuration In v3 patch-set version I included a new patch to enable CBS configuration (Patch 9). ==================== Signed-off-by: David S. Miller commit 19d9187317979cf0c25f67017d2676149abc46b2 Author: Joao Pinto Date: Fri Mar 10 18:24:59 2017 +0000 net: stmmac: configuration of CBS in case of a TX AVB queue This patch adds the configuration of the AVB Credit-Based Shaper. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/stmmac.txt | 22 +++++++++-- drivers/net/ethernet/stmicro/stmmac/common.h | 4 ++ drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 33 ++++++++++++++++ drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 46 +++++++++++++++++++++- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 29 ++++++++++++++ .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 29 ++++++++++++-- include/linux/stmmac.h | 12 ++++-- 7 files changed, 164 insertions(+), 11 deletions(-) commit ad5a87d7e3c5fcea987728027a3fae2c2f067173 Author: Joao Pinto Date: Fri Mar 10 18:24:58 2017 +0000 net: stmmac: mac debug prepared for multiple queues This patch prepares mac debug dump for multiple queues. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 3 +- .../net/ethernet/stmicro/stmmac/dwmac1000_core.c | 3 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 107 +++++++++++---------- .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 5 +- 4 files changed, 64 insertions(+), 54 deletions(-) commit 8f71a88d3619db0abbca3bd18ba15a479a5abf1b Author: Joao Pinto Date: Fri Mar 10 18:24:57 2017 +0000 net: stmmac: prepare irq_status for mtl This patch prepares mac irq status treatment for multiple queues. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 2 ++ drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 40 ++++++++++++++--------- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +++ 4 files changed, 33 insertions(+), 16 deletions(-) commit 29feff39000bb57fe6c25f5ec1435489196c8838 Author: Joao Pinto Date: Fri Mar 10 18:24:56 2017 +0000 net: stmmac: flow_ctrl functions adapted to mtl This patch adapts flow_ctrl function to prepare it for multiple queues. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 3 ++- drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c | 3 ++- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 20 +++++++++++++------- drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 3 ++- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 17 ++++++++++++++--- 6 files changed, 34 insertions(+), 14 deletions(-) commit d43042f4da3e1c2e4ccac3b1d9153cb0798533a4 Author: Joao Pinto Date: Fri Mar 10 18:24:55 2017 +0000 net: stmmac: mapping mtl rx to dma channel This patch adds the functionality of RX queue to dma channel mapping based on configuration. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 2 ++ drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 7 +++++++ drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 25 +++++++++++++++++++++++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 21 +++++++++++++++++++ 4 files changed, 55 insertions(+) commit 4f6046f5872c7db6a152b923cee21c37a04d56b8 Author: Joao Pinto Date: Fri Mar 10 18:24:54 2017 +0000 net: stmmac: mtl rx queue enabled as dcb or avb This patch introduces the enabling of RX queues as DCB or as AVB based on configuration. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 8 ++++++-- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 19 +++++++------------ 3 files changed, 14 insertions(+), 15 deletions(-) commit 6a3a7193b2811537c64eb513e39473050a72f1a4 Author: Joao Pinto Date: Fri Mar 10 18:24:53 2017 +0000 net: stmmac: configure tx queue weight This patch adds TX queues weight programming. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 3 +++ drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 7 +++++++ drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 12 ++++++++++++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 20 ++++++++++++++++++++ 4 files changed, 42 insertions(+) commit d0a9c9f9c6d0b1f0773e0aba5ab519b8ddc87a7a Author: Joao Pinto Date: Fri Mar 10 18:24:52 2017 +0000 net: stmmac: configure mtl rx and tx algorithms This patch adds the RX and TX scheduling algorithms programming. It introduces the multiple queues configuration function (stmmac_mtl_configuration) in stmmac_main. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 4 ++ drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 10 +++++ drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 48 +++++++++++++++++++++++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 31 +++++++++++++-- 4 files changed, 90 insertions(+), 3 deletions(-) commit d976a525c371276cebd2517349d1d3568a0e48b5 Author: Joao Pinto Date: Fri Mar 10 18:24:51 2017 +0000 net: stmmac: multiple queues dt configuration This patch adds the multiple queues configuration in the Device Tree. It was also created a set of structures to keep the RX and TX queues configurations to be used in the driver. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/stmmac.txt | 40 ++++++++++ .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 91 ++++++++++++++++++++++ include/linux/stmmac.h | 30 +++++++ 3 files changed, 161 insertions(+) commit 429a372e3ec020534bd314dca94e5281dc453d29 Merge: 8f48ba7 e6ea2d1 Author: David S. Miller Date: Sun Mar 12 23:35:21 2017 -0700 Merge branch 'stmmac-tegra186' Thierry Reding says: ==================== net: stmmac: Fixes and Tegra186 support This series of patches start with a few cleanups that I ran across while adding Tegra186 support to the stmmac driver. It then adds code for FIFO size parsing from feature registers and finally enables support for the incarnation of the Synopsys DWC QOS IP found on NVIDIA Tegra186 SoCs. This is based on next-20170310. Changes in v2: - address review comments by Mikko and Joao - add two additional cleanup patches ==================== Signed-off-by: David S. Miller commit e6ea2d16fc615e82bbd9c022c6a4302f22f418bf Author: Thierry Reding Date: Fri Mar 10 17:35:01 2017 +0100 net: stmmac: dwc-qos: Add Tegra186 support The NVIDIA Tegra186 SoC contains an instance of the Synopsys DWC ethernet QOS IP core. The binding that it uses is slightly different from existing ones because of the integration (clocks, resets, ...). Signed-off-by: Thierry Reding Signed-off-by: David S. Miller .../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 247 +++++++++++++++++++++ drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 1 + 2 files changed, 248 insertions(+) commit cee45b2edafaa1063bd3a43ba3577490a26fed4c Author: Thierry Reding Date: Fri Mar 10 17:35:00 2017 +0100 net: stmmac: dwc-qos: Split out ->probe() and ->remove() Split out the binding specific parts of ->probe() and ->remove() to enable the driver to support variants of the binding. This is useful in order to keep backwards-compatibility while making it easy for a sub- driver to deal only with the updated bindings rather than having to add compatibility quirks all over the place. Reviewed-by: Mikko Perttunen Reviewed-By: Joao Pinto Signed-off-by: Thierry Reding Signed-off-by: David S. Miller .../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 124 ++++++++++++++++----- 1 file changed, 98 insertions(+), 26 deletions(-) commit 356b7557857e43c52561ac722168ea173f5f6ddc Author: Thierry Reding Date: Fri Mar 10 17:34:59 2017 +0100 net: stmmac: Program RX queue size and flow control Program the receive queue size based on the RX FIFO size and enable hardware flow control for large FIFOs. Signed-off-by: Thierry Reding Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 12 ++++++ drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 52 +++++++++++++++++++++++- 2 files changed, 62 insertions(+), 2 deletions(-) commit 11fbf811c8e8a11529214a494eab25e21ca86739 Author: Thierry Reding Date: Fri Mar 10 17:34:58 2017 +0100 net: stmmac: Parse FIFO sizes from feature registers New version of this core encode the FIFO sizes in one of the feature registers. Use these sizes as default, but still allow device tree to override them for backwards compatibility. Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 3 +++ drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 2 ++ drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 5 +++++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++ 4 files changed, 13 insertions(+) commit 937071c171ff3656e196c965c5179ba3f9f6a2fc Author: Thierry Reding Date: Fri Mar 10 17:34:57 2017 +0100 net: stmmac: Check for DMA mapping errors When DMA mapping an SKB fragment, the mapping must be checked for errors, otherwise the DMA debug code will complain upon unmap. Signed-off-by: Thierry Reding Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 0ad2be79f254965f277fabdd7c64512527208f64 Author: Thierry Reding Date: Fri Mar 10 17:34:56 2017 +0100 net: stmmac: Balance PTP reference clock enable/disable clk_prepare_enable() and clk_disable_unprepare() for this clock aren't properly balanced, which can trigger a WARN_ON() in the common clock framework. Reviewed-By: Joao Pinto Signed-off-by: Thierry Reding Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++++ drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) commit c66f6c3775bed342693feec2925276fd13bb1355 Author: Thierry Reding Date: Fri Mar 10 17:34:55 2017 +0100 net: stmmac: Disable PTP reference clock on error If an error occurs while opening the device, make sure to disable the PTP reference clock. Signed-off-by: Thierry Reding Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6c1e5abe0780cecafdc24b64aefc84ce6924dda9 Author: Thierry Reding Date: Fri Mar 10 17:34:54 2017 +0100 net: stmmac: Stop PHY and remove TX timer on error If an error occurs while opening the device, make sure that both the TX timer and the PHY are properly cleaned up. Signed-off-by: Thierry Reding Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 9fbb9dd8eee459e810560a7d459103d865c48beb Author: Thierry Reding Date: Fri Mar 10 17:34:53 2017 +0100 net: stmmac: Rename clk_ptp_ref clock to ptp_ref There aren't currently any users of the "clk_ptp_ref", but there are other references to "ptp_ref", so I'm leaning towards considering that a typo. Fix it. Cc: Mark Rutland Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Thierry Reding Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/stmmac.txt | 6 +++--- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 8f48ba71ede12231d5d63fdd34bd8ce7908a3377 Author: Vincent Bernat Date: Fri Mar 10 16:30:24 2017 +0100 vxlan: use appropriate family on L3 miss When sending a L3 miss, the family is set to AF_INET even for IPv6. This causes userland (eg "ip monitor") to be confused. Ensure we send the appropriate family in this case. For L2 miss, keep using AF_INET. Signed-off-by: Vincent Bernat Signed-off-by: David S. Miller drivers/net/vxlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b57fd1ec13e22b3e722891ff7a6e6ccaf286779 Author: Gao Feng Date: Fri Mar 10 12:38:47 2017 +0800 net: Eliminate duplicated codes by creating one new function in_dev_select_addr There are two duplicated loops codes which used to select right address in current codes. Now eliminate these codes by creating one new function in_dev_select_addr. Signed-off-by: Gao Feng Signed-off-by: David S. Miller net/ipv4/devinet.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit 81663bee1676d1ecbd3281e2c752a1b6f6e133b9 Merge: b3ca9af c0d8bab Author: David S. Miller Date: Sun Mar 12 23:22:24 2017 -0700 Merge branch 'sctp-rx-side-stream-reconf-asoc-reset-and-add-streams-and-response' Xin Long says: ==================== sctp: add receiver-side procedures for stream reconf asoc reset and add streams and response Patch 2/7, 4/7, 5/7, 6/7 are to implement the process of asoc reset request, add streams requests and all kinds of responses. Patch 1/7 and 3/7 are ahead of 2/7 and 4/7 to add two event notification for asoc reset and add streams. Patch 7/7 is the last patch for implementing rfc6525 sctp stream reconf to add sysctl and sockopt interface for users to enable sctp stream reconf. After this patchset, sctp stream reconf will be able to work as rfc6525. v1->v2: - put these into a smaller group. - rename the titles of the commits and improve some changelogs. - improve sctp_chunk_lookup_strreset_param and reuse it in patch 4/7. - process addstrm outreq as the ack of in addstrm inreq if strreset_chunk is not NULL in patch 4/7. - remove the stream alloc when sending addstrm inreq, and the process in peer will response it by sending a addstrm out request back in patch 5/7. - adjust the process of addstrm in resp to fit in the codes that only alloc streams through addstrm outreq in patch 6/7. ==================== Signed-off-by: David S. Miller commit c0d8bab6ae518cedfb5246e99ece43fe51d79b56 Author: Xin Long Date: Fri Mar 10 12:11:12 2017 +0800 sctp: add get and set sockopt for reconf_enable This patchset is to add SCTP_RECONFIG_SUPPORTED sockopt, it would set and get asoc reconf_enable value when asoc_id is set, or it would set and get ep reconf_enalbe value if asoc_id is 0. It is also to add sysctl interface for users to set the default value for reconf_enable. After this patch, stream reconf will work. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/uapi/linux/sctp.h | 1 + net/sctp/socket.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++ net/sctp/sysctl.c | 7 ++++ 3 files changed, 89 insertions(+) commit 11ae76e67a179f25ae8f772d62a7ddf717b1cdf3 Author: Xin Long Date: Fri Mar 10 12:11:11 2017 +0800 sctp: implement receiver-side procedures for the Reconf Response Parameter This patch is to implement Receiver-Side Procedures for the Re-configuration Response Parameter in rfc6525 section 5.2.7. sctp_process_strreset_resp would process the response for any kind of reconf request, and the stream reconf is applied only when the response result is success. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/sm.h | 4 ++ net/sctp/sm_statefuns.c | 6 +- net/sctp/stream.c | 154 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 161 insertions(+), 3 deletions(-) commit c5c4ebb3ab87fd87e44a47ec8289238e6f6084c1 Author: Xin Long Date: Fri Mar 10 12:11:10 2017 +0800 sctp: implement receiver-side procedures for the Add Incoming Streams Request Parameter This patch is to implement Receiver-Side Procedures for the Add Incoming Streams Request Parameter described in rfc6525 section 5.2.6. It is also to fix that it shouldn't have add streams when sending addstrm in request, as the process in peer will handle it by sending a addstrm out request back. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/sm.h | 4 +++ net/sctp/sm_statefuns.c | 3 ++ net/sctp/stream.c | 74 +++++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 69 insertions(+), 12 deletions(-) commit 50a41591f11022dcf76c23238dce1a1a62470c46 Author: Xin Long Date: Fri Mar 10 12:11:09 2017 +0800 sctp: implement receiver-side procedures for the Add Outgoing Streams Request Parameter This patch is to add Receiver-Side Procedures for the Add Outgoing Streams Request Parameter described in section 5.2.5. It is also to improve sctp_chunk_lookup_strreset_param, so that it can be used for processing addstrm_out request. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/sm.h | 4 +++ net/sctp/sm_statefuns.c | 3 ++ net/sctp/stream.c | 89 +++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 86 insertions(+), 10 deletions(-) commit b444153fb5a647448c2080ad28656ad183cae4fc Author: Xin Long Date: Fri Mar 10 12:11:08 2017 +0800 sctp: add support for generating add stream change event notification This patch is to add Stream Change Event described in rfc6525 section 6.1.3. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/ulpevent.h | 4 ++++ include/uapi/linux/sctp.h | 15 +++++++++++++++ net/sctp/ulpevent.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) commit 692787cef6515188f25a5b6cdf008cfe10acf89f Author: Xin Long Date: Fri Mar 10 12:11:07 2017 +0800 sctp: implement receiver-side procedures for the SSN/TSN Reset Request Parameter This patch is to implement Receiver-Side Procedures for the SSN/TSN Reset Request Parameter described in rfc6525 section 6.2.4. The process is kind of complicate, it's wonth having some comments from section 6.2.4 in the codes. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/sm.h | 4 +++ net/sctp/sm_statefuns.c | 3 ++ net/sctp/stream.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+) commit c95129d127c6d3d9fca189c6f94c539a7f086b1a Author: Xin Long Date: Fri Mar 10 12:11:06 2017 +0800 sctp: add support for generating assoc reset event notification This patch is to add Association Reset Event described in rfc6525 section 6.1.2. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/ulpevent.h | 4 ++++ include/uapi/linux/sctp.h | 15 +++++++++++++++ net/sctp/ulpevent.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) commit b3ca9af0fb65098dd2afecca6831c361a585f37f Author: VSR Burru Date: Thu Mar 9 17:03:24 2017 -0800 liquidio: optimize DMA in NUMA systems Optimize DMA in NUMA systems by allocating memory from NUMA node that NIC is plugged in to; DMA will no longer cross NUMA nodes. If NIC IRQs are pinned to a local CPU, that CPU's access to the DMA'd data is also optimized. Signed-off-by: VSR Burru Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: Satanand Burla Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 +- drivers/net/ethernet/cavium/liquidio/octeon_device.c | 4 ++-- drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 10 ++-------- drivers/net/ethernet/cavium/liquidio/octeon_iq.h | 2 +- drivers/net/ethernet/cavium/liquidio/request_manager.c | 13 +++---------- 5 files changed, 9 insertions(+), 22 deletions(-) commit de12e4fb8f5f35bfeada567dabf597ef6004127d Merge: 115a731e 79cd874 Author: David S. Miller Date: Sun Mar 12 23:15:44 2017 -0700 Merge branch 'netvsc-fix-module-removal-hangs' Stephen Hemminger says: ==================== netvsc: fix module removal hangs A couple of patches are necessary to make netvsc driver module removable again. ==================== Signed-off-by: David S. Miller commit 79cd874c96b38694fb2b4ee3850f6fbbc3015439 Author: stephen hemminger Date: Thu Mar 9 15:04:15 2017 -0800 netvsc: fix hang on netvsc module removal The code in netvsc_device_remove was incorrectly calling napi_disable repeatedly on the same element. This would cause attempts to remove netvsc module to hang. Fixes: 2506b1dc4bbe ("netvsc: implement NAPI") Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d6dd35784e76bc3e052ffa13c6839d5c9bcb449 Author: stephen hemminger Date: Thu Mar 9 15:04:14 2017 -0800 netvsc: need napi scheduled during removal Since rndis_halt_device waits until all outstanding sends and receives are completed. Netvsc device needs to still schedule NAPI to see those completions. Fixes: 2506b1dc4bbe ("netvsc: implement NAPI") Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 115a731e528bbb6b8314ed9d1103b77d01d57680 Merge: 5425077 7fe1e29 Author: David S. Miller Date: Sun Mar 12 23:01:07 2017 -0700 Merge branch 'dpaa_eth-next' of git://git.freescale.com/ppc/upstream/linux Madalin Bucur says: ==================== QorIQ DPAA 1 updates This patch set introduces a series of fixes and features to the DPAA 1 drivers. Besides activating hardware Rx checksum offloading, four traffic classes are added for Tx traffic prioritisation. changes from v1: added patch to enable context-A stashing ==================== Signed-off-by: David S. Miller commit 5425077d73e0c8e7e9267ca8397cc0e2293c1fb9 Author: subashab@codeaurora.org Date: Wed Mar 8 16:36:49 2017 -0700 net: ipv6: Add early demux handler for UDP unicast While running a single stream UDPv6 test, we observed that amount of CPU spent in NET_RX softirq was much greater than UDPv4 for an equivalent receive rate. The test here was run on an ARM64 based Android system. On further analysis with perf, we found that UDPv6 was spending significant time in the statistics netfilter targets which did socket lookup per packet. These statistics rules perform a lookup when there is no socket associated with the skb. Since there are multiple instances of these rules based on UID, there will be equal number of lookups per skb. By introducing early demux for UDPv6, we avoid the redundant lookups. This also helped to improve the performance (800Mbps -> 870Mbps) on a CPU limited system in a single stream UDPv6 receive test with 1450 byte sized datagrams using iperf. v1->v2: Use IPv6 cookie to validate dst instead of 0 as suggested by Eric Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller net/ipv6/udp.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 49b499718fa1b0d639663cfd03085b9bfd23cdc8 Author: Jiri Kosina Date: Wed Mar 8 16:03:32 2017 +0100 net: sched: make default fifo qdiscs appear in the dump The original reason [1] for having hidden qdiscs (potential scalability issues in qdisc_match_from_root() with single linked list in case of large amount of qdiscs) has been invalidated by 59cc1f61f0 ("net: sched: convert qdisc linked list to hashtable"). This allows us for bringing more clarity and determinism into the dump by making default pfifo qdiscs visible. We're not turning this on by default though, at it was deemed [2] too intrusive / unnecessary change of default behavior towards userspace. Instead, TCA_DUMP_INVISIBLE netlink attribute is introduced, which allows applications to request complete qdisc hierarchy dump, including the ones that have always been implicit/invisible. Singleton noop_qdisc stays invisible, as teaching the whole infrastructure about singletons would require quite some surgery with very little gain (seeing no qdisc or seeing noop qdisc in the dump is probably setting the same user expectation). [1] http://lkml.kernel.org/r/1460732328.10638.74.camel@edumazet-glaptop3.roam.corp.google.com [2] http://lkml.kernel.org/r/20161021.105935.1907696543877061916.davem@davemloft.net Signed-off-by: Jiri Kosina Signed-off-by: David S. Miller include/net/pkt_sched.h | 2 +- include/net/sch_generic.h | 1 + include/uapi/linux/rtnetlink.h | 1 + net/sched/sch_api.c | 42 ++++++++++++++++++++++++++++++------------ net/sched/sch_cbq.c | 5 +++++ net/sched/sch_drr.c | 2 ++ net/sched/sch_dsmark.c | 2 ++ net/sched/sch_generic.c | 2 +- net/sched/sch_hfsc.c | 4 ++++ net/sched/sch_htb.c | 2 ++ net/sched/sch_mq.c | 2 +- net/sched/sch_mqprio.c | 2 +- net/sched/sch_multiq.c | 2 ++ net/sched/sch_prio.c | 5 ++++- net/sched/sch_qfq.c | 2 ++ net/sched/sch_red.c | 2 ++ net/sched/sch_sfb.c | 2 ++ net/sched/sch_tbf.c | 2 ++ 18 files changed, 65 insertions(+), 17 deletions(-) commit 5e8456fdd23c23bbfa06e0d647c90758102a4410 Author: Philippe Reynes Date: Wed Mar 8 23:41:04 2017 +0100 net: hyperv: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Tested-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) commit 031e51445a065d94639faf1581d0377438a33b96 Author: Philippe Reynes Date: Wed Mar 8 23:16:11 2017 +0100 net: fjes: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/fjes/fjes_ethtool.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 92f4a13efd8b2ab263e589e8bb814ef49f4fc6f9 Author: Philippe Reynes Date: Wed Mar 8 22:20:20 2017 +0100 net: via: via-velocity: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/via/via-velocity.c | 62 +++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 27 deletions(-) commit f918b9861f222bae04747fe0ec804d1825337f8e Author: Philippe Reynes Date: Tue Mar 7 23:46:16 2017 +0100 net: via: via-rhine: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/via/via-rhine.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 8704f21c8449d4ee0ea22a16014b6af6e757ec81 Author: Philippe Reynes Date: Tue Mar 7 23:32:25 2017 +0100 net: intel: ixgbe: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 168 ++++++++++++----------- 1 file changed, 91 insertions(+), 77 deletions(-) commit 99bdb400f7a5c998e106aeef3954e94b1d3d4ca5 Author: Philippe Reynes Date: Mon Mar 6 23:26:09 2017 +0100 net: tundra: tsi108: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/tundra/tsi108_eth.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit cba1dfb57b94c234728b689d9b00d4267fa1a879 Author: Viresh Kumar Date: Thu Mar 9 09:34:54 2017 +0530 cpufreq: schedutil: Refactor sugov_next_freq_shared() The loop in sugov_next_freq_shared() contains an if block to skip the loop for the current CPU. This turns out to be an unnecessary conditional in the scheduler's hot-path for every CPU in the policy. It would be better to drop the conditional and make the loop treat all the CPUs in the same way. That would eliminate the need of calling sugov_iowait_boost() at the top of the routine. To keep the code optimized to return early if the current CPU has RT/DL flags set, move the flags check to sugov_update_shared() instead in order to avoid the function call entirely. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki kernel/sched/cpufreq_schedutil.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) commit 994a8f2514e91c16616c4a1b53e9eb2b24de97b7 Author: Viresh Kumar Date: Tue Feb 21 10:15:18 2017 +0530 cpufreq: schedutil: Redefine the rate_limit_us tunable The rate_limit_us tunable is intended to reduce the possible overhead from running the schedutil governor. However, that overhead can be divided into two separate parts: the governor computations and the invocation of the scaling driver to set the CPU frequency. The latter is where the real overhead comes from. The former is much less expensive in terms of execution time and running it every time the governor callback is invoked by the scheduler, after rate_limit_us interval has passed since the last frequency update, would not be a problem. For this reason, redefine the rate_limit_us tunable so that it means the minimum time that has to pass between two consecutive invocations of the scaling driver by the schedutil governor (to set the CPU frequency). Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki kernel/sched/cpufreq_schedutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6f19363503541ee6020d35b468a998c213bace36 Author: Geert Uytterhoeven Date: Sun Mar 12 14:16:47 2017 +0100 MAINTAINERS: Add file patterns for cpufreq device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit b51d3388e2350138f6acc5cacda009a67f6f6352 Author: YuanTian Tang Date: Fri Mar 10 09:28:43 2017 +0800 cpufreq: qoriq: enhance bus frequency calculation On some platforms, property device-type may be missed in soc node in dts which caused the bus-frequency can not be obtained correctly. This patch enhanced the bus-frequency calculation. When property device-type is missed in dts, bus-frequency will be obtained by looking up clock table to get platform clock and hence get its frequency. Signed-off-by: Tang Yuantian Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/qoriq-cpufreq.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit cf9a2438257da2cbc55f82085b2e0add7583cf79 Author: Daniel Kurtz Date: Thu Mar 2 19:03:45 2017 +0800 cpufreq: mediatek: Add support for MT8176 and MT817x The Mediatek MT8173 is just one of several SOCs from the same MT817x family, including the 6-core (4-little/2-big) MT8176. The mt8173-cpufreq driver supports all of these SOCs, however, machines using them may use a different machine compatible. Since this driver checks explicitly for the machine compatible string, add support for the whole family. Signed-off-by: Daniel Kurtz Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/mt8173-cpufreq.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 08a74cbb1ba337fca6add5674506440c044b2c03 Author: Daniel Kurtz Date: Thu Mar 2 19:08:58 2017 +0800 cpufreq: mt8173: Mark mt8173_cpufreq_driver_init as __init This function is only called once at boot by device_initcall(), so mark it as __init. Signed-off-by: Daniel Kurtz Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/mt8173-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7db36b1c3ca0904c1673f2ccab4099b25637e49f Author: David Wu Date: Thu Feb 23 20:33:11 2017 +0800 PM / AVS: rockchip-io: add io selectors and supplies for rk3328 This adds the necessary data for handling io voltage domains on the rk3328. As interesting tidbit, the rk3328 only contains one iodomain area in the regular General Register Files (GRF). Signed-off-by: David Wu Reviewed-by: Heiko Stuebner Reviewed-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki .../bindings/power/rockchip-io-domain.txt | 1 + drivers/power/avs/rockchip-io-domain.c | 41 ++++++++++++++++++++++ 2 files changed, 42 insertions(+) commit 5f98ced1c95e7706af6895f7b7b0d2216f075d59 Author: Rafael J. Wysocki Date: Thu Mar 9 16:30:38 2017 +0100 cpufreq: intel_pstate: Drop redundant wrapper function intel_pstate_hwp_set_policy() is a wrapper around intel_pstate_hwp_set(), but the only value it adds is to check hwp_active before calling the latter and one of its two callers has already checked hwp_active before that happens, so in that code path the additional check is redundant and using the wrapper is rather pointless. For this reason, drop intel_pstate_hwp_set_policy() and make its callers invoke intel_pstate_hwp_set() directly (after checking hwp_active). Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/intel_pstate.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 7a201e31422b208cfedd15c08e9b0442871e2d97 Author: Masahiro Yamada Date: Sun Mar 12 23:58:17 2017 +0900 arm64: dts: uniphier: re-order reset deassertion of USB of LD11 Deassert the bit in the System Control block before the MIO block. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 38081c71859efee77c7f3fec07bc4748acb248dc Author: Narcisa Ana Maria Vasile Date: Fri Mar 10 00:53:44 2017 +0200 staging: speakup: i18n.c: Refactor conditionals in spk_msg_set Reduce the indentation level in spk_msg_set and remove unnecessary return variable. Signed-off-by: Narcisa Ana Maria Vasile Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/i18n.c | 44 +++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 24 deletions(-) commit eaeab71f27c485e8940782304158f41c3fff7139 Author: Narcisa Ana Maria Vasile Date: Fri Mar 10 00:53:23 2017 +0200 staging: speakup: i18n.c: Change return type from int to bool The possible return values (0 or 1) for compare_specifiers and fmt_validate represent whether a condition holds or not, so conceptually, they are booleans. Update documentation for these two functions. Change type of variable 'still_comparing' from int to bool too, inside fmt_validate, because it is intended to hold truth values as well. Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/i18n.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 37c002299c14f4d2cd49c42fc5cc2f8c77207ae2 Author: Alex Yashchenko Date: Sat Mar 11 20:13:24 2017 +0300 staging: rtl8188eu: Fix redundant space coding style issue Signed-off-by: Alex Yashchenko Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5dee68828ac1286b6735bcb87c7242014bf95510 Author: Thibaut SAUTEREAU Date: Sat Mar 11 19:27:27 2017 +0100 staging: rtl8712: fix bad indentation Fix bad indentation as reported by checkpatch.pl script. Signed-off-by: Thibaut SAUTEREAU Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_led.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 841e3bcc64e4f5841a3ff5083d1c31e765dca934 Author: sayli karnik Date: Fri Mar 10 17:59:04 2017 +0530 staging: vt6655: baseband: Add identifier name to function definition argument The patch resolves the checkpatch warning: WARNING: function definition argument should also have an identifier name Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/baseband.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0d82b57c7cfc26c17e895ba3d9aab80250cd9257 Author: simran singhal Date: Fri Mar 10 18:37:23 2017 +0530 staging: css2400/sh_css: Remove parentheses from return arguments The sematic patch used for this is: @@ identifier i; constant c; @@ return - ( \(i\|-i\|i(...)\|c\) - ) ; Signed-off-by: simran singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 7d57b8947ff1bdeb9c326675690963b4a2927078 Author: simran singhal Date: Fri Mar 10 18:37:24 2017 +0530 staging: sh_css_firmware: Remove parentheses from return arguments The sematic patch used for this is: @@ identifier i; constant c; @@ return - ( \(i\|-i\|i(...)\|c\) - ) ; Signed-off-by: simran singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68e009ed1cc699a32557705d76877c5209400103 Author: Adrien Descamps Date: Thu Mar 9 21:15:19 2017 +0100 Staging: wlan-ng: Fix endian error sparse report fixed: drivers/staging//wlan-ng//hfa384x_usb.c:3517:35: warning: restricted __be64 degrades to integer drivers/staging//wlan-ng//hfa384x_usb.c:3517:33: warning: incorrect type in assignment (different base types) drivers/staging//wlan-ng//hfa384x_usb.c:3517:33: expected restricted __be64 [usertype] mactime drivers/staging//wlan-ng//hfa384x_usb.c:3517:33: got unsigned long long Computation on the value should be done when in machine format, not in big endian format. Signed-off-by: Adrien Descamps Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a18ffdf4ea7c6ac496f940d0852d42e1074c3450 Author: Adrien Descamps Date: Thu Mar 9 21:15:18 2017 +0100 Staging: wlan-ng: Fix sparse warnings by using appropriate endian types Fix some sparse warning by using correct endian types in structs and local variables. This patch only fix sparse warnings and do not change the logic. Signed-off-by: Adrien Descamps Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x.h | 54 +++++++++++++++++------------------ drivers/staging/wlan-ng/hfa384x_usb.c | 2 +- 2 files changed, 28 insertions(+), 28 deletions(-) commit c672f377671c7666d1bf774af0f58ca33be546be Author: Manoj Sawai Date: Fri Mar 10 00:33:18 2017 +0530 Staging: xgifb: XGI_main_26.c: non-standard C Fixes following checkpatch warning: "WARNING: %Lx is non-standard C, use %llx" Signed-off-by: Manoj Sawai Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/XGI_main_26.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d0dee553a345639fa12f0669c7886cf4d3c844e6 Author: Derek Robson Date: Sat Mar 11 16:01:59 2017 +1300 Staging: bcm2835: Fixed style of block comments Fixed style of block comments across whole driver Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/bcm2835-camera.c | 24 ++++++++++++++-------- .../vc04_services/bcm2835-camera/controls.c | 22 +++++++++++--------- .../vc04_services/bcm2835-camera/mmal-msg-port.h | 6 ++++-- .../vc04_services/bcm2835-camera/mmal-msg.h | 18 ++++++++-------- .../vc04_services/bcm2835-camera/mmal-vchiq.c | 3 ++- .../vc04_services/bcm2835-camera/mmal-vchiq.h | 4 ++-- 6 files changed, 45 insertions(+), 32 deletions(-) commit 2ba835dd3e0457bd81662570d49e4123851fe159 Author: Aishwarya Pant Date: Fri Mar 10 22:09:27 2017 +0530 staging: bcm2835-camera: remove anonymous field declarations Anonymous field declarations are error prone. This patch replaces anonymous declarations with explicit field declarations for typedef SERVICE_CREATION_T in vchiq_mmal_init(..) Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/mmal-vchiq.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 7ebe438c64385edaeb4d26e9707991e4819914d2 Author: Aishwarya Pant Date: Fri Mar 10 22:09:11 2017 +0530 staging: bcm2835-audio: remove anonymous field declarations Anonymous field declarations are error prone. This patch replaces anonymous declarations with explicit field declarations for typedef SERVICE_CREATION_T in vc_vchi_audio_init(..) Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 5e4e2ef774138958036cfe1dd7a907c7dd3cb1bb Author: Shiva Kerdel Date: Sun Mar 12 03:30:01 2017 +0100 Staging: ks7010: ks_hostif.*: Use preferred 'u32' kernel type over 'uint32_t' Fix prefer kernel type 'u32' over 'uint32_t' checks. Signed-off-by: Shiva Kerdel Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 18 +++++++++--------- drivers/staging/ks7010/ks_hostif.h | 30 +++++++++++++++--------------- 2 files changed, 24 insertions(+), 24 deletions(-) commit 81952f3876c2cef2a7310f2154d4061ad519ba64 Author: Shiva Kerdel Date: Sun Mar 12 03:30:00 2017 +0100 Staging: ks7010: ks_hostif.*: Use preferred 'u16' kernel type over 'uint16_t' Fix prefer kernel type 'u16' over 'uint16_t' checks. Signed-off-by: Shiva Kerdel Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 20 +++--- drivers/staging/ks7010/ks_hostif.h | 134 ++++++++++++++++++------------------- 2 files changed, 77 insertions(+), 77 deletions(-) commit 184eb0c5b6d7293947bd02058eef9323cc2c8631 Author: Shiva Kerdel Date: Sun Mar 12 03:29:59 2017 +0100 Staging: ks7010: ks_*: Use preferred 'u8' kernel type over 'uint8_t' Fix prefer kernel type 'u8' over 'uint8_t' checks. Signed-off-by: Shiva Kerdel Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 4 +- drivers/staging/ks7010/ks_hostif.h | 114 +++++++++++++++++------------------ drivers/staging/ks7010/ks_wlan_net.c | 2 +- 3 files changed, 60 insertions(+), 60 deletions(-) commit d2c94a351b263e1ef86c9a3a8961873ed7f51452 Author: Ian Abbott Date: Wed Mar 8 18:44:33 2017 +0000 staging: comedi: jr3_pci: change module description Change the MODULE_DESCRIPTION string from the generic "Comedi low-level driver" to the more specific "Comedi driver for JR3/PCI force sensor board". Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6541964dcd0c4ebffb55f0fc3e79b3794c55a869 Author: Ian Abbott Date: Wed Mar 8 18:44:32 2017 +0000 staging: comedi: jr3_pci: fix initial range[8] max value `jr3_pci_alloc_spriv()` initializes `spriv->range[8]` to use a maximum value of 65536, but that will be overwritten with 65535 at a later time by `jr3_pci_poll_subdevice()` once the "set full scales" command is complete. The initial setting looks like a mistake. This range is only associated with a couple of dummy channels (channels 56 and 57) to read back the model number and serial number, so no user code should be attempting to convert those numbers to physical units. Just change the initial value to 65535 to match the final value. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8abde9acdfc82aacbfd96e65fe416c29c4856500 Author: Ian Abbott Date: Wed Mar 8 18:44:31 2017 +0000 staging: comedi: jr3_pci: check PCI BAR 0 size The various supported boards have different numbers of subdevices from 1 to 4. Each subdevice needs a block of registers in PCI BAR 0. Check the region is large enough for the required number of subdevices. Return an error from `jr3_pci_auto_attach()` if it is too small. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 3 +++ 1 file changed, 3 insertions(+) commit 7cb1c5c2cd5fe2d4303eee415ca2ed207bd932a5 Author: Ian Abbott Date: Wed Mar 8 18:44:30 2017 +0000 staging: comedi: jr3_pci: check sizes at compile time The driver currently checks the size of `struct jr3_sensor` is correct when a device is attached, returning an error if it is wrong. Replace that with a compile-time check. We don't care too much about the size of `struct jr3_sensor` as it is embedded in the larger `struct jr3_block` and is followed by a lot of padding. We should care more that the size of `struct jr3_block` is correct, as it describes the overall register layout of a block, and there is an array of such blocks (one per subdevice). Check its size at compile-time using the `BUILD_BUG_ON()` macro. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 6fbd1330e50383a8a30f0fc67e690a22b99fd2d5 Author: Ian Abbott Date: Wed Mar 8 18:44:29 2017 +0000 staging: comedi: jr3_pci: omit pointless debug info `jr3_pci_open()` outputs several debug log messages containing serial numbers of the sensors (one per subdevice) along with a pointer to the subdevice private data structure. The latter is of no use, so reformat the debug log to omit it. `jr3_pci_alloc_spriv()` outputs a debug log message containing more useless information about the remapped base address of the board registers, the sensor registers, and the difference between them. Get rid of it. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 9d6a94291e002d3fa499ccef73fcd286cddeeb6f Author: Ian Abbott Date: Wed Mar 8 18:44:28 2017 +0000 staging: comedi: jr3_pci: use struct jr3_block instead of jr3_t `struct jr3_t` contains a single array member `block` of member type `struct jr3_block`. Rather than using pointers to `struct jr3_t`, just use pointers to `struct jr3_block` instead and treat it as an array. Replace the local variables `struct jr3_t __iomem *iobase` with `struct jr3_block __iomem *block`. Remove the definition of `struct jr3_t` as it is no longer needed. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 24 ++++++++++++------------ drivers/staging/comedi/drivers/jr3_pci.h | 4 ---- 2 files changed, 12 insertions(+), 16 deletions(-) commit 4e861f0fd828d2c058271ace21963fa2ef7e861d Author: Ian Abbott Date: Wed Mar 8 18:44:27 2017 +0000 staging: comedi: jr3_pci: separate out block type `struct jr3_t` contains a single array member `block` of a tag-less `struct` type. Rename the tag-less `struct` type to `struct jr3_block` and move its definition outside of `struct jr3_t`. This will allow us to use pointers of this type. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 6c7f58084fce3f07d4954555173171348ddff8f5 Author: Ian Abbott Date: Wed Mar 8 18:44:26 2017 +0000 staging: comedi: jr3_pci: rename 'channel' to 'block' The term "channel" is overloaded in this driver. Rename the `channel` member of `struct jr3_t` to `block` to reduce confusion. `block` is an array of an anonymous `struct` type, with each element covering the registers for one subdevice. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 10 +++++----- drivers/staging/comedi/drivers/jr3_pci.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit ef3ab9f85c9c3ed3eb2ef8c07ce969a5ce861ec6 Author: Ian Abbott Date: Wed Mar 8 18:44:25 2017 +0000 staging: comedi: jr3_pci: rename data to sensor Rename the `channel[x].data` member of `struct jr3_t` to `channel[x].sensor` to match its type `struct jr3_sensor`. Also rename local variable `ch0data` in `jr3_pci_show_copyright()` to `sensor0` for consistency. It points to the `struct jr3_sensor` embedded in the registers for "channel" 0. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 10 +++++----- drivers/staging/comedi/drivers/jr3_pci.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit 713eab88c66de4ef0a851f30f24ea8b922f6791b Author: Ian Abbott Date: Wed Mar 8 18:44:24 2017 +0000 staging: comedi: jr3_pci: rename channel to sensor The driver overloads the term "channel" a lot. To help reduce confusion, rename the `channel` member of `struct jr3_pci_subdev_private` to `sensor` as it points to a `struct jr3_sensor`. Also rename the various function parameters and local variables called `channel` that point to a `struct jr3_sensor` to `sensor`. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 152 +++++++++++++++---------------- 1 file changed, 75 insertions(+), 77 deletions(-) commit c5ad0c7b51ae904c2d8ff7725d549e1b5cb5dcc0 Author: Ian Abbott Date: Wed Mar 8 18:44:23 2017 +0000 staging: comedi: jr3_pci: rename struct jr3_channel to jr3_sensor The driver overloads the term "channel" a lot. To help reduce confusion, rename `struct jr3_channel` to `struct jr3_sensor`. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 28 ++++++++++++++-------------- drivers/staging/comedi/drivers/jr3_pci.h | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) commit b612a9762b20be3c30a16625adb292e9f1ff25a6 Author: Colin Ian King Date: Sat Mar 11 19:32:05 2017 +0000 staging: atomisp: clean up return logic, remove redunant code There is no need to check if ret is non-zero, remove this redundant check and just return the error status from the call to mt9m114_write_reg_array. Detected by CoverityScan, CID#1416577 ("Identical code for different branches") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/mt9m114.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit b8ff636cd7d72334951a7fa1dfe9f21ba4d2107b Author: Colin Ian King Date: Sat Mar 11 19:48:19 2017 +0000 staging: atomisp: remove redundant check for client being null The previous statement checks if client is null, so the null check when assigning dev is redundant and can be removed. Detected by CoverityScan, CID#1416555 ("Logically Dead Code") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman .../staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9573878611f4dd4d7be2e649814bef3270f4e5bd Author: simran singhal Date: Fri Mar 10 10:43:10 2017 +0530 staging: atomisp_fops: Clean up tests if NULL returned on failure Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...); ... - e == NULL + !e Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cf51d34af7ad86fc14bbc2217d733f271e396e7 Author: simran singhal Date: Fri Mar 10 10:43:11 2017 +0530 staging: vpfe_mc_capture: Clean up tests if NULL returned on failure Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...); ... - e == NULL + !e Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1e8b15d06a0ec40180134736aad3674137cad4d9 Author: simran singhal Date: Fri Mar 10 10:43:12 2017 +0530 staging: lirc_zilog: Clean up tests if NULL returned on failure Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...); ... - e == NULL + !e Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/media/lirc/lirc_zilog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 49637a458b61629672a8ae19fdae2058c64815cf Author: Greg Kroah-Hartman Date: Sun Mar 12 14:51:52 2017 +0100 staging: media: atomisp: remove '.' from pci Makefile Remove the odd './' usage in the Makefile to make the build output a bit more sane looking and match the normal kernel build style. Cc: Alan Cox Signed-off-by: Greg Kroah-Hartman .../staging/media/atomisp/pci/atomisp2/Makefile | 374 ++++++++++----------- 1 file changed, 187 insertions(+), 187 deletions(-) commit c537f916d0402b593040034d9c1d96b71584f53d Author: Alan Cox Date: Fri Mar 10 11:35:17 2017 +0000 atomisp: remove FPGA defines These are not relevant to an upstream kernel driver. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../hive_isp_css_common/host/hive_isp_css_hrt_modified.h | 16 ---------------- 1 file changed, 16 deletions(-) commit 9403fbe39635f75d6e89f1d23b6a7dacb46d52c2 Author: Alan Cox Date: Fri Mar 10 11:35:06 2017 +0000 atomisp: remove pdaf kernel This is not used on either Baytrail or Cherrytrail so can simply be deleted Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../staging/media/atomisp/pci/atomisp2/Makefile | 2 - .../css2400/isp/kernels/pdaf/ia_css_pdaf.host.c | 84 ---------------------- .../css2400/isp/kernels/pdaf/ia_css_pdaf.host.h | 37 ---------- .../css2400/isp/kernels/pdaf/ia_css_pdaf_param.h | 62 ---------------- .../css2400/isp/kernels/pdaf/ia_css_pdaf_types.h | 54 -------------- 5 files changed, 239 deletions(-) commit 43da435042c5c978fc116e5f57544ad256e5095d Author: Alan Cox Date: Fri Mar 10 11:34:41 2017 +0000 atomisp: tidy firmware loading code a little The FWNAME define is never used so can be removed. The option to skip firmware loading isn't really Cherrytrail specific so remove this and complete the merging of the two driver versions for this file. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit f406d0338ea1bcd6005b1d41c656164f11aaaf29 Author: Alan Cox Date: Fri Mar 10 11:34:27 2017 +0000 atomisp: eliminate intel_mid_pm.h We can do this because the only thing it is used for is identifying the platform for power management purposes. The driver only supports Baytrail and Cherrytrail and both of those always need the IPU to be power managed directly not via PCI D3 states. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../media/atomisp/include/linux/intel_mid_pm.h | 233 --------------------- .../media/atomisp/pci/atomisp2/atomisp_v4l2.c | 33 +-- 2 files changed, 10 insertions(+), 256 deletions(-) commit 5ac0a3447a3192f4664b9af4c28b24c634f0be21 Author: Alan Cox Date: Fri Mar 10 11:34:11 2017 +0000 atomisp: remove C_RUN define and code We are not going to be building for anything but Linux so the code bracketed by C_RUN is not used and not needed. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../css_2400_system/hrt/isp2400_mamoiada_params.h | 4 --- .../pci/atomisp2/css2400/css_2400_system/hrt/var.h | 25 ---------------- .../css2400/hive_isp_css_common/host/isp.c | 19 ------------ .../css2400/hive_isp_css_common/host/isp_private.h | 20 +++---------- .../css2400/hive_isp_css_common/host/sp_local.h | 23 -------------- .../css2400/hive_isp_css_common/host/sp_private.h | 35 ---------------------- .../css2400/hive_isp_css_common/host/vmem.c | 21 ------------- .../css2400/hive_isp_css_common/vmem_global.h | 4 --- .../css2400/hive_isp_css_include/assert_support.h | 4 --- .../pci/atomisp2/css2400/runtime/bufq/src/bufq.c | 4 --- .../css2400/runtime/debug/src/ia_css_debug.c | 4 +-- .../atomisp2/css2400/runtime/spctrl/src/spctrl.c | 2 +- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 8 ++--- .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 2 +- .../media/atomisp/pci/atomisp2/hrt/device_access.c | 11 ------- 15 files changed, 12 insertions(+), 174 deletions(-) commit de3ae0d0870d04beb8e47f0dc8a25522415024a4 Author: Alan Cox Date: Fri Mar 10 11:33:59 2017 +0000 atomisp: remove HIVECC We are only going to be building for Linux with gcc, so we can lose bits of material related to other build targets. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../css2400/hive_isp_css_common/dma_global.h | 52 ---------------------- .../css2400/hive_isp_css_include/assert_support.h | 9 ---- .../css2400/hive_isp_css_include/error_support.h | 7 --- .../css2400/hive_isp_css_include/storage_class.h | 2 - .../css2400/hive_isp_css_include/type_support.h | 11 ----- .../pci/atomisp2/css2400/ia_css_device_access.h | 6 --- .../css2400/isp/modes/interface/isp_const.h | 8 ---- .../css2400/runtime/debug/src/ia_css_debug.c | 2 +- .../atomisp/pci/atomisp2/css2400/sh_css_internal.h | 2 - 9 files changed, 1 insertion(+), 98 deletions(-) commit d9b16766fe2d50cbdeaf9c536312e1e5667a64a6 Author: Alan Cox Date: Fri Mar 10 11:33:45 2017 +0000 atomisp: remove unused code and unify a header KLOCWORK is never defined so we can remove the workarounds for this in the code. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../css2400/hive_isp_css_include/assert_support.h | 11 -------- .../atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c | 32 +--------------------- 2 files changed, 1 insertion(+), 42 deletions(-) commit 5a0ff3683d68ec5c7898899ca3445ca6cb10c928 Author: Alan Cox Date: Fri Mar 10 11:33:33 2017 +0000 atomisp: remove dead code for SSSE3 This is another define which is never used and references a header that doesn't exist, so consider it dead. Our memcpy is pretty smart anyway. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 32 +--------------------- 1 file changed, 1 insertion(+), 31 deletions(-) commit cbe7023526d5026e93613dc3694f0c20a2ea8573 Author: Gargi Sharma Date: Sat Mar 11 20:27:20 2017 +0530 staging: rtl8192e: Remove multiple assignments This patch removes multiple assignments by factorizing them. This was done with Coccinelle for the if branch. For the else part the change was done manually. Braces were also added to the else part to remove the checkpatch warning, "braces should be on all arms of if-else statements". @ identifier i1,i2; constant c; @@ - i1=i2=c; + i1=c; + i2=c; Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit a4a987decb4b12b546d18946e70a7770d5434d80 Author: simran singhal Date: Sat Mar 11 22:51:00 2017 +0530 staging: rtl8192u: Remove typedef phy_ofdm_rx_status_rxsc_sgien_exintfflag Remove typdef phy_ofdm_rx_status_rxsc_sgien_exintfflag and replace its uses in the code. Signed-off-by: simran singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U.h | 4 ++-- drivers/staging/rtl8192u/r8192U_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 4d567cef1b573b5b976d55b9106a59b9fe85e532 Author: Gargi Sharma Date: Sun Mar 12 02:11:37 2017 +0530 staging: lustre: Use min3 macro Replace comparsions between three expressions using two min macros with min3 macro. Done using Coccinelle Script: @@ expression e1; expression e2; expression e3; @@ ( - min(min(e1, e2), e3) + min3(e1, e2, e3) | - min(e1, min(e2, e3)) + min3(e1, e2, e3) ) Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2437a9e023fe1df77c053b222762357bb73212e8 Author: Tobin C. Harding Date: Tue Mar 7 20:57:04 2017 +1100 staging: dgnc: remove item from TODO list TODO file contains task to verify and correct function return sites. Need to check for and implement correct usage of goto's when there is work to be done before returning. Remove task from TODO list after already having completed audit of directory drivers/staging/dgnc. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/TODO | 1 - 1 file changed, 1 deletion(-) commit 4f22e0fa01f5b33c9df42863980b8cfac200af2f Author: Tobin C. Harding Date: Tue Mar 7 20:57:03 2017 +1100 staging: dgnc: audit goto's in dgnc_tty TODO file requests fix up of error handling. Audit dgnc_mgmt.c and fix all return paths to be uniform and inline with kernel coding style. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 219 ++++++++++++++++++++-------------------- 1 file changed, 112 insertions(+), 107 deletions(-) commit 7029064dd16b975139fb2bc739b8e094400c21d8 Author: Tobin C. Harding Date: Tue Mar 7 20:57:02 2017 +1100 staging: dgnc: audit goto's in dgnc_mgmt TODO file requests fix up of error handling. Audit dgnc_mgmt.c and fix all return paths to be uniform and inline with kernel coding style. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_mgmt.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) commit c8863b3ff7749c22c1745b7358d15456f86044f7 Author: Tobin C. Harding Date: Tue Mar 7 20:57:01 2017 +1100 staging: dgnc: audit goto's in dgnc_driver TODO file requests fix up of error handling. Audit dgnc_driver.c and fix all return paths to be uniform and inline with kernel coding style. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) commit 1f3b1fd386e6b8cde64e530a58264981e00bafa0 Author: Sagar Arun Kamble Date: Sat Mar 11 08:07:01 2017 +0530 drm/i915/guc: Update rps.pm_intrmsk_mbz in guc_interrupts_capture/release Different state is to be maintained for rps.pm_intrmsk_mbz for GuC and Execlists. Updating it inside guc_interrupts_* routines as in those routines GuC load/submission params are sanitized and it should not be set based on HAS_GUC_SCHED during intel_irq_init. Cc: Tvrtko Ursulin Cc: Chris Wilson Cc: Oscar Mateo Cc: Radoslaw Szwichtenberg Reviewed-by: Chris Wilson Signed-off-by: Sagar Arun Kamble Link: http://patchwork.freedesktop.org/patch/msgid/1489199821-6707-3-git-send-email-sagar.a.kamble@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_guc_submission.c | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_irq.c | 24 ------------------------ 2 files changed, 26 insertions(+), 24 deletions(-) commit 5dd0455667b2555970a17d60b9e4d545f316364f Author: Sagar Arun Kamble Date: Sat Mar 11 08:07:00 2017 +0530 drm/i915: s/pm_intr_keep/pm_intrmsk_mbz "pm_intr_keep" is not conveying the intent that it is bitmask of interrupts that must be zero(mbz) in GEN6_PMINTRMSK. Name it "pm_intrmsk_mbz". Cc: Chris Wilson Cc: Radoslaw Szwichtenberg Reviewed-by: Chris Wilson Signed-off-by: Sagar Arun Kamble Link: http://patchwork.freedesktop.org/patch/msgid/1489199821-6707-2-git-send-email-sagar.a.kamble@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_debugfs.c | 3 ++- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_irq.c | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 12 deletions(-) commit 7762ebb9a455db18eef5c366da5496fb38429d56 Author: Sagar Arun Kamble Date: Sat Mar 11 08:06:59 2017 +0530 drm/i915/guc: Release GuC interrupts in i915_guc_submission_disable Like capture of GuC interrupts while enabling GuC submission, release them while disabling GuC submission. Cc: Tvrtko Ursulin Cc: Chris Wilson Cc: Oscar Mateo Reviewed-by: Chris Wilson Signed-off-by: Sagar Arun Kamble Link: http://patchwork.freedesktop.org/patch/msgid/1489199821-6707-1-git-send-email-sagar.a.kamble@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_guc_submission.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/i915/intel_guc_loader.c | 21 --------------------- 2 files changed, 23 insertions(+), 21 deletions(-) commit 6dbb708a8fb8eef552d8de2b7574d92741b3bb31 Author: Linus Walleij Date: Sat Jan 21 22:43:08 2017 +0100 ARM: gemini: convert to ARMv4 multiplatform This converts the Gemini platform to ARMv4 multiplatform, deleting the local include directory, moving an idiomatic local idling function into the .machine_init() call and getting rid of the Makefile.boot finally. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij arch/arm/Kconfig | 21 +------- arch/arm/mach-gemini/Kconfig | 13 +++++ arch/arm/mach-gemini/Makefile | 2 +- arch/arm/mach-gemini/Makefile.boot | 1 - arch/arm/mach-gemini/board-dt.c | 24 +++++++++ arch/arm/mach-gemini/idle.c | 31 ----------- arch/arm/mach-gemini/include/mach/hardware.h | 71 -------------------------- arch/arm/mach-gemini/include/mach/uncompress.h | 42 --------------- 8 files changed, 40 insertions(+), 165 deletions(-) commit 8e39061ec8910848d537384bc30f574299f0d3f5 Author: Linus Walleij Date: Sat Jan 21 21:49:27 2017 +0100 ARM: gemini: select ARM_PATCH_PHYS_VIRT and AUTO_ZRELADDR This platform survives physical to virtual patching without any hickups, and can use AUTO_ZRELADDR. We still need to keep Makefile.boot but it is now empty. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij arch/arm/Kconfig | 2 ++ arch/arm/mach-gemini/Makefile.boot | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) commit 46abf938db42f31d92481f35bbba3bd044901c6b Author: Linus Walleij Date: Sat Jan 21 21:35:52 2017 +0100 ARM: gemini: switch to sparse IRQs There is no boardfiles or anything else using the fixed IRQs anymore, switch the platform to use sparse IRQs and delete the header. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij arch/arm/Kconfig | 1 + arch/arm/mach-gemini/include/mach/irqs.h | 53 -------------------------------- 2 files changed, 1 insertion(+), 53 deletions(-) commit ee149d66d76057e40fe1354c08572f8611cf50e4 Author: Linus Walleij Date: Sat Jan 21 21:30:29 2017 +0100 ARM: gemini: delete all boardfiles Delete the Gemini boardfiles: we have corresponding, fully-featured device trees for all these boards. Delete the referenced include files. Delete the local config symbols, especially one for "swapped memory", as all supported boards have swapped memory, and would a new board be supported this is likely not the right way to achieve it anyways. Only the Kconfig options in the central arch/arm/Kconfig remains. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij arch/arm/Kconfig | 2 - arch/arm/mach-gemini/Kconfig | 40 ---- arch/arm/mach-gemini/Makefile | 15 +- arch/arm/mach-gemini/Makefile.boot | 6 - arch/arm/mach-gemini/board-nas4220b.c | 106 ---------- arch/arm/mach-gemini/board-rut1xx.c | 92 -------- arch/arm/mach-gemini/board-wbd111.c | 133 ------------ arch/arm/mach-gemini/board-wbd222.c | 133 ------------ arch/arm/mach-gemini/common.h | 33 --- arch/arm/mach-gemini/devices.c | 118 ----------- arch/arm/mach-gemini/gpio.c | 231 -------------------- arch/arm/mach-gemini/include/mach/global_reg.h | 278 ------------------------- arch/arm/mach-gemini/irq.c | 120 ----------- arch/arm/mach-gemini/mm.c | 82 -------- arch/arm/mach-gemini/reset.c | 25 --- arch/arm/mach-gemini/time.c | 239 --------------------- 16 files changed, 2 insertions(+), 1651 deletions(-) commit 41d9830cd09f652936be95431cecfbac39ed09f7 Author: Linus Walleij Date: Sat Jan 21 12:59:05 2017 +0100 ARM: gemini: DT for the Cortina Gemini SoC platforms This adds initial and compulsory device tree support to the Gemini ARMv4 platform. We are selecting a bunch of "absolute minimals" for getting a working system up with just device tree: - We select USE_OF for natural reasons or nothing works. - We select CLKSRC_OF and GEMINI_TIMER so we get timekeeping from the clocksource. - We select GPIO_GEMINI because these are used as irqchips, and for a generic driver it is not reasonable for those to have to select every possible irqchip in the world to work, the platform should simply provide the available irqchips. - We select a UART that can be exprected to work with SERIAL_OF_PLATFORM which is the name for an 8250 OF-probed serial port. - We select the syscon-based reset controller: it's not fun when "reboot" doesn't work because of Kconfig, so we just select POWER_RESET and POWER_RESET_SYSCON. - We perhaps a bit controversiallt select ARM_APPENDED_DTB, because this platform is using the ancient RedBoot, and can *NOT* be expected to upgrade its bootloaders. Appended device tree is simply how these devices have to work with device tree. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij arch/arm/Kconfig | 10 ++++++++-- arch/arm/mach-gemini/Makefile | 2 +- arch/arm/mach-gemini/board-dt.c | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 3 deletions(-) commit c12ddfe1ed41b59c3122b67a37195c085f9da9c6 Author: Linus Walleij Date: Fri Jan 13 23:55:54 2017 +0100 ARM: gemini: convert to MULTI_IRQ_HANDLER In order to enable device tree boot on this machine we must first convert it to runtime-manage its irq handler, so do this. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij arch/arm/Kconfig | 1 + arch/arm/mach-gemini/include/mach/entry-macro.S | 33 ------------------------- arch/arm/mach-gemini/irq.c | 15 +++++++++++ 3 files changed, 16 insertions(+), 33 deletions(-) commit 6ae4d211ab066ad3b808a2b7f0851837c44f495d Author: Linus Walleij Date: Sun Jan 22 23:34:38 2017 +0100 ARM: dts: add watchdog to the Gemini This adds watchdog support to the Gemini SoC DTSI file. Signed-off-by: Linus Walleij arch/arm/boot/dts/gemini.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 4317c020ae9dc248034051ba74023130c60fa1b7 Author: Linus Walleij Date: Sun Jan 22 23:19:03 2017 +0100 watchdog: add DT bindings for Cortina Gemini This adds DT bindings for the Cortina systems Gemini SoC watchdog timer. Cc: devicetree@vger.kernel.org Reviewed-by: Guenter Roeck Acked-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/watchdog/cortina,gemini-watchdog.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit c4fa8b272e6984f511ba155acf97db535e2b7fc3 Author: Linus Walleij Date: Sat Jan 21 20:55:46 2017 +0100 ARM: dts: add a devicetree for Wiliboard WBD-222 This devicetree is simply based on the board file in arch/arm/mach-gemini/board-wbd222.c and contain the equivalent platform data, mainly just moving the GPIOs from the global numberspace to explicitly reference their parent GPIO. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/gemini-wbd222.dts | 102 ++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 1 deletion(-) commit 2aeeb18201c2e13cdca202b6e1e2662950b7e33a Author: Linus Walleij Date: Sat Jan 21 19:37:58 2017 +0100 ARM: dts: add a devicetree for Wiliboard WBD-111 This devicetree is simply based on the board file in arch/arm/mach-gemini/board-wbd111.c and contain the equivalent platform data, mainly just moving the GPIOs from the global numberspace to explicitly reference their parent GPIO. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/gemini-wbd111.dts | 102 ++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 1 deletion(-) commit d08bd6b36c3e94ac3c8a82f26cc95a5c5304798a Author: Linus Walleij Date: Sat Jan 21 14:05:57 2017 +0100 ARM: dts: add a devicetree for Teltonika RUT1xx This devicetree is simply based on the board file in arch/arm/mach-gemini/board-rut1xx.c and contain the equivalent platform data, mainly just moving the GPIOs from the global numberspace to explicitly reference their parent GPIO. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/gemini-rut1xx.dts | 65 +++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) commit fe7bf9dcfff5b47d138476f2cb4ed8cdc716dfd4 Author: Linus Walleij Date: Sat Jan 21 13:26:58 2017 +0100 ARM: dts: add a devicetree for Raidsonic NAS IB-4220-B This devicetree is simply based on the board file in arch/arm/mach-gemini/board-nas4220b.c and contain the equivalent platform data, mainly just moving the GPIOs from the global numberspace to explicitly reference &gpio1. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Florian Fainelli Signed-off-by: Hans Ulli Kroll Signed-off-by: Linus Walleij arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/gemini-nas4220b.dts | 102 ++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) commit 9be0d7f87eff95c38ba62a8312d6bf1df26e811b Author: Linus Walleij Date: Sat Jan 21 13:00:15 2017 +0100 ARM: dts: add device tree for Gemini SoC and SQ201 This adds a device tree for the Gemini SoC and the ITian Square One SQ201 board that has been my testing target for Gemini device tree support. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/gemini-sq201.dts | 96 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/gemini.dtsi | 102 +++++++++++++++++++++++++++++++++++++ 3 files changed, 200 insertions(+) commit d5651944205c5cba8a5813b66119bf776501df1f Author: Linus Walleij Date: Sat Jan 21 13:38:22 2017 +0100 ARM: dts: add top-level DT bindings for Cortina Gemini This adds the top level SoC bindings for Cortina systems Gemini platforms. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/arm/gemini.txt | 86 ++++++++++++++++++++++++ 1 file changed, 86 insertions(+) commit 0a124e98f4a5b9b03950af02a57a067ccc1016c1 Author: Bo Yu Date: Thu Mar 9 22:57:38 2017 -0500 Staging: iio: return expression instead of return ret The following Coccinelle script was used to detect this: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Bo YU Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7754.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3a1e3293857568f04b8886246b7a0fec130f5055 Author: sayli karnik Date: Wed Mar 8 15:16:38 2017 +0530 staging: iio: ade7759: Move contents of header file to source file The contents of ade7759.h are only used in ade7759.c. Move the header contents to the source file and delete the header file. Signed-off-by: sayli karnik Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7759.c | 50 +++++++++++++++++++++++++++++++++- drivers/staging/iio/meter/ade7759.h | 53 ------------------------------------- 2 files changed, 49 insertions(+), 54 deletions(-) commit 9c0a9700a185156e952a23ecca592a2f0682012a Author: Masahiro Yamada Date: Sun Mar 12 00:38:05 2017 +0900 arm64: dts: uniphier: add pinctrl property to eMMC node for LD11/LD20 Now everything is ready to enable this pinctrl. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 2 ++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 2 ++ 2 files changed, 4 insertions(+) commit 66b2f567767d2ce6cda8cfc73161595aed31f3c4 Author: Masahiro Yamada Date: Sun Mar 12 00:36:56 2017 +0900 ARM: dts: uniphier: fix pin groups of eMMC pin-mux node The eMMC devices on UniPhier boards are generally used in the 8-bit mode. So, DAT4-7 pins should be controlled. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-pinctrl.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23866a3def0851fa19da32212658c51cf89451cc Author: Masahiro Yamada Date: Sat Mar 11 22:52:59 2017 +0900 ARM: dts: uniphier: move memory node below aliases node These UniPhier DT files are fine as long as they are compiled in the Linux build system. It is true that Linux is the biggest user of DT, but DT is project neutral from its concept. DT files are often re-used for other projects. Especially for the UniPhier platform, these DT files are re-used for U-Boot as well. If I feed these DT files to the FDTGREP tool in U-Boot, it complains about the node order. FDTGREP spl/u-boot-spl.dtb Error at 'fdt_find_regions': FDT_ERR_BADLAYOUT /aliases node must come before all other nodes Given that DT is not very sensitive to the order of nodes, this is a problem of FDTGREP. I filed a bug report a year ago, but it has not been fixed yet. Differentiating DT is painful. So, I am up-streaming the requirement from the down-stream project. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-ld4-ref.dts | 10 +++++----- arch/arm/boot/dts/uniphier-ld6b-ref.dts | 10 +++++----- arch/arm/boot/dts/uniphier-pro4-ace.dts | 10 +++++----- arch/arm/boot/dts/uniphier-pro4-ref.dts | 10 +++++----- arch/arm/boot/dts/uniphier-pro4-sanji.dts | 10 +++++----- arch/arm/boot/dts/uniphier-pxs2-gentil.dts | 10 +++++----- arch/arm/boot/dts/uniphier-pxs2-vodka.dts | 10 +++++----- arch/arm/boot/dts/uniphier-sld3-ref.dts | 12 ++++++------ arch/arm/boot/dts/uniphier-sld8-ref.dts | 10 +++++----- 9 files changed, 46 insertions(+), 46 deletions(-) commit b9f2fc38115344fa8c8631c7257948f4de0eec73 Author: Masahiro Yamada Date: Sat Mar 11 22:58:59 2017 +0900 arm64: dts: uniphier: move memory node below aliases node These UniPhier DT files are fine as long as they are compiled in the Linux build system. It is true that Linux is the biggest user of DT, but DT is project neutral from its concept. DT files are often re-used for other projects. Especially for the UniPhier platform, these DT files are re-used for U-Boot as well. If I feed these DT files to the FDTGREP tool in U-Boot, it complains about the node order. FDTGREP spl/u-boot-spl.dtb Error at 'fdt_find_regions': FDT_ERR_BADLAYOUT /aliases node must come before all other nodes Given that DT is not very sensitive to the order of nodes, this is a problem of FDTGREP. I filed a bug report a year ago, but it has not been fixed yet. Differentiating DT is painful. So, I am up-streaming the requirement from the down-stream project. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11-ref.dts | 10 +++++----- arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) commit 90b20432aeb850ef84086a72893cd9411479d896 Author: Vitaly Kuznetsov Date: Fri Mar 3 14:21:42 2017 +0100 x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method Hyper-V TSC page clocksource is suitable for vDSO, however, the protocol defined by the hypervisor is different from VCLOCK_PVCLOCK. Implement the required support by adding hvclock_page VVAR. Signed-off-by: Vitaly Kuznetsov Cc: Stephen Hemminger Cc: Haiyang Zhang Cc: Dexuan Cui Cc: Andy Lutomirski Cc: devel@linuxdriverproject.org Cc: "K. Y. Srinivasan" Cc: virtualization@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20170303132142.25595-4-vkuznets@redhat.com Signed-off-by: Thomas Gleixner arch/x86/entry/vdso/vclock_gettime.c | 24 ++++++++++++++++++++++++ arch/x86/entry/vdso/vdso-layout.lds.S | 3 ++- arch/x86/entry/vdso/vdso2c.c | 3 +++ arch/x86/entry/vdso/vma.c | 7 +++++++ arch/x86/hyperv/hv_init.c | 3 +++ arch/x86/include/asm/clocksource.h | 3 ++- arch/x86/include/asm/vdso.h | 1 + 7 files changed, 42 insertions(+), 2 deletions(-) commit 0733379b512ce36ba0b10942f9597b74f579f063 Author: Vitaly Kuznetsov Date: Fri Mar 3 14:21:41 2017 +0100 x86/hyperv: Move TSC reading method to asm/mshyperv.h As a preparation to making Hyper-V TSC page suitable for vDSO move the TSC page reading logic to asm/mshyperv.h. While on it, do the following: - Document the reading algorithm. - Simplify the code a bit. - Add explicit READ_ONCE() to not rely on 'volatile'. - Add explicit barriers to prevent re-ordering (we need to read sequence strictly before and after) - Use mul_u64_u64_shr() instead of assembly, gcc generates a single 'mul' instruction on x86_64 anyway. [ tglx: Simplified the loop ] Signed-off-by: Vitaly Kuznetsov Cc: Stephen Hemminger Cc: Haiyang Zhang Cc: Dexuan Cui Cc: Andy Lutomirski Cc: devel@linuxdriverproject.org Cc: "K. Y. Srinivasan" Cc: virtualization@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20170303132142.25595-3-vkuznets@redhat.com Signed-off-by: Thomas Gleixner arch/x86/hyperv/hv_init.c | 36 ++++---------------------------- arch/x86/include/asm/mshyperv.h | 46 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 32 deletions(-) commit bd2a9adaadb8defcaf6c284bca7ff41634105f51 Author: Vitaly Kuznetsov Date: Fri Mar 3 14:21:40 2017 +0100 x86/hyperv: Implement hv_get_tsc_page() To use Hyper-V TSC page clocksource from vDSO we need to make tsc_pg available. Implement hv_get_tsc_page() and add CONFIG_HYPERV_TSCPAGE to make #ifdef-s simple. Signed-off-by: Vitaly Kuznetsov Cc: Stephen Hemminger Cc: Haiyang Zhang Cc: Dexuan Cui Cc: Andy Lutomirski Cc: devel@linuxdriverproject.org Cc: "K. Y. Srinivasan" Cc: virtualization@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20170303132142.25595-2-vkuznets@redhat.com Signed-off-by: Thomas Gleixner arch/x86/hyperv/hv_init.c | 9 +++++++-- arch/x86/include/asm/mshyperv.h | 8 ++++++++ drivers/hv/Kconfig | 3 +++ 3 files changed, 18 insertions(+), 2 deletions(-) commit 6415813bae75feba10b8ca3ed6634a72c2a4d313 Author: Mathias Krause Date: Sun Feb 12 22:12:08 2017 +0100 x86/cpu: Drop wp_works_ok member of struct cpuinfo_x86 Remove the wp_works_ok member of struct cpuinfo_x86. It's an optimization back from Linux v0.99 times where we had no fixup support yet and did the CR0.WP test via special code in the page fault handler. The < 0 test was an optimization to not do the special casing for each NULL ptr access violation but just for the first one doing the WP test. Today it serves no real purpose as the test no longer needs special code in the page fault handler and the only call side -- mem_init() -- calls it just once, anyway. However, Xen pre-initializes it to 1, to skip the test. Doing the test again for Xen should be no issue at all, as even the commit introducing skipping the test (commit d560bc61575e ("x86, xen: Suppress WP test on Xen")) mentioned it being ban aid only. And, in fact, testing the patch on Xen showed nothing breaks. The pre-fixup times are long gone and with the removal of the fallback handling code in commit a5c2a893dbd4 ("x86, 386 removal: Remove CONFIG_X86_WP_WORKS_OK") the kernel requires a working CR0.WP anyway. So just get rid of the "optimization" and do the test unconditionally. Signed-off-by: Mathias Krause Acked-by: Borislav Petkov Cc: Jesper Nilsson Cc: Jeremy Fitzhardinge Cc: Arnd Hannemann Cc: Mikael Starvik Cc: Geert Uytterhoeven Cc: Andrew Morton Cc: "David S. Miller" Link: http://lkml.kernel.org/r/1486933932-585-3-git-send-email-minipli@googlemail.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/processor.h | 4 +--- arch/x86/kernel/cpu/proc.c | 5 ++--- arch/x86/kernel/setup.c | 11 ++++------- arch/x86/mm/init_32.c | 9 +++++---- arch/x86/xen/enlighten.c | 1 - 5 files changed, 12 insertions(+), 18 deletions(-) commit 04402116846f36adea9503d7cd5104a7ed27a1a6 Author: Mathias Krause Date: Sun Feb 12 22:12:07 2017 +0100 x86/cpu: Drop unneded members of struct cpuinfo_x86 Those member serve no purpose -- not even fill padding for alignment or such. So just get rid of them. Signed-off-by: Mathias Krause Acked-by: Borislav Petkov Cc: Jesper Nilsson Cc: Mikael Starvik Cc: Geert Uytterhoeven Cc: Andrew Morton Cc: "David S. Miller" Link: http://lkml.kernel.org/r/1486933932-585-2-git-send-email-minipli@googlemail.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/processor.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 45e5202213ae6541f7916bb3c64fbcd3019ec473 Author: Charles Keepax Date: Tue Mar 7 16:28:18 2017 +0000 genirq: Add support for nested shared IRQs On a specific audio system an interrupt input of an audio CODEC is used as a shared interrupt. That interrupt input is handled by a CODEC specific irq chip driver and triggers a CPU interrupt via the CODEC irq output line. The CODEC interrupt handler demultiplexes the CODEC interrupt inputs and the interrupt handlers for these demultiplexed inputs run nested in the context of the CODEC interrupt handler. The demultiplexed interrupts use handle_nested_irq() as their interrupt handler, which unfortunately has no support for shared interrupts. So the above hardware cannot be supported. Add shared interrupt support to handle_nested_irq() by iterating over the interrupt action chain. [ tglx: Massaged changelog ] Signed-off-by: Charles Keepax Cc: patches@opensource.wolfsonmicro.com Link: http://lkml.kernel.org/r/1488904098-5350-1-git-send-email-ckeepax@opensource.wolfsonmicro.com Signed-off-by: Thomas Gleixner kernel/irq/chip.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5a920155e388ec22a22e0532fb695b9215c9b34d Author: Thomas Gleixner Date: Tue Feb 14 00:11:04 2017 -0800 x86/process: Optimize TIF_NOTSC switch Provide and use a toggle helper instead of doing it with a branch. x86_64: arch/x86/kernel/process.o text data bss dec hex 3008 8577 16 11601 2d51 Before 2976 8577 16 11569 2d31 After i386: arch/x86/kernel/process.o text data bss dec hex 2925 8673 8 11606 2d56 Before 2893 8673 8 11574 2d36 After Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Andy Lutomirski Link: http://lkml.kernel.org/r/20170214081104.9244-4-khuey@kylehuey.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/tlbflush.h | 10 ++++++++++ arch/x86/kernel/process.c | 22 ++++------------------ 2 files changed, 14 insertions(+), 18 deletions(-) commit b9894a2f5bd18b1691cb6872c9afe32b148d0132 Author: Kyle Huey Date: Tue Feb 14 00:11:03 2017 -0800 x86/process: Correct and optimize TIF_BLOCKSTEP switch The debug control MSR is "highly magical" as the blockstep bit can be cleared by hardware under not well documented circumstances. So a task switch relying on the bit set by the previous task (according to the previous tasks thread flags) can trip over this and not update the flag for the next task. To fix this its required to handle DEBUGCTLMSR_BTF when either the previous or the next or both tasks have the TIF_BLOCKSTEP flag set. While at it avoid branching within the TIF_BLOCKSTEP case and evaluating boot_cpu_data twice in kernels without CONFIG_X86_DEBUGCTLMSR. x86_64: arch/x86/kernel/process.o text data bss dec hex 3024 8577 16 11617 2d61 Before 3008 8577 16 11601 2d51 After i386: No change [ tglx: Made the shift value explicit, use a local variable to make the code readable and massaged changelog] Originally-by: Thomas Gleixner Signed-off-by: Kyle Huey Cc: Peter Zijlstra Cc: Andy Lutomirski Link: http://lkml.kernel.org/r/20170214081104.9244-3-khuey@kylehuey.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/msr-index.h | 1 + arch/x86/kernel/process.c | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) commit af8b3cd3934ec60f4c2a420d19a9d416554f140b Author: Kyle Huey Date: Tue Feb 14 00:11:02 2017 -0800 x86/process: Optimize TIF checks in __switch_to_xtra() Help the compiler to avoid reevaluating the thread flags for each checked bit by reordering the bit checks and providing an explicit xor for evaluation. With default defconfigs for each arch, x86_64: arch/x86/kernel/process.o text data bss dec hex 3056 8577 16 11649 2d81 Before 3024 8577 16 11617 2d61 After i386: arch/x86/kernel/process.o text data bss dec hex 2957 8673 8 11638 2d76 Before 2925 8673 8 11606 2d56 After Originally-by: Thomas Gleixner Signed-off-by: Kyle Huey Cc: Peter Zijlstra Cc: Andy Lutomirski Link: http://lkml.kernel.org/r/20170214081104.9244-2-khuey@kylehuey.com Signed-off-by: Thomas Gleixner arch/x86/kernel/process.c | 65 ++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 29 deletions(-) commit a45216547e8925078b18b2a6b539100c3814e973 Merge: 35dc8aa 76adb46 Author: Daniel Vetter Date: Sat Mar 11 11:46:03 2017 +0100 Merge branch 'drm/next/platform' of git://linuxtv.org/pinchartl/media into drm-misc-next Merge Laurent's drm_platform removal code. Only conflict is with the drm_pci.h extraction, which allows me to fix up the misplayed drm_platform_init fumble that 0day and Stephen Rothwell reported. Signed-off-by: Daniel Vetter commit 35288e30ebca59effbd44c5976afc71a342e9a85 Author: Seung-Woo Kim Date: Fri Mar 10 11:01:00 2017 +0900 Kbuild: fix file name in comment about extra gcc checks Extra gcc checks like W=1 were moved to scripts/Makefile.exrawarn, so the file name in comment needs to be fixed. Signed-off-by: Seung-Woo Kim Signed-off-by: Masahiro Yamada Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65ba6fa439e7c3cbf97de9dce9e7a3390ae2638c Author: Stephen Boyd Date: Thu Feb 16 13:18:20 2017 -0800 scripts: objdiff: Ignore debug info when comparing If the kernel is configured to be built with debug symbols, or has bug tables, comparing files may not work if line numbers change. This makes comparing object files with these options harder to do. Let's strip out the debug info and drop the __bug_table here so that we don't see false positives. There may be other things to drop later, and it may be architecture specific, but this works for me with my ARM64 build. Signed-off-by: Stephen Boyd Reviewed-by: Jason Cooper Signed-off-by: Masahiro Yamada scripts/objdiff | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6e18675e107251d5b1998cea6c6e1875a8ef2de8 Author: Carlo Caione Date: Sat Mar 4 21:26:24 2017 +0100 ARM64: dts: meson-gxl: Add support for HwaCom AmazeTV This patch adds support for the HwaCom AmazeTV set-top-box. The hardware configuration is really similar to the other GXL boards but for this hardware we need to limit the max-frequency of the eMMC to have it working. Acked-by: Rob Herring Signed-off-by: Carlo Caione Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/Makefile | 1 + .../dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts | 164 +++++++++++++++++++++ 2 files changed, 165 insertions(+) commit f370f48d7f4f2acbcf88966e660ffc26c5dd8c7f Author: Carlo Caione Date: Sat Mar 4 21:26:23 2017 +0100 dt-bindings: amlogic: Add HwaCom board Signed-off-by: Carlo Caione Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/arm/amlogic.txt | 1 + 1 file changed, 1 insertion(+) commit e2f586bd83177d22072b275edd4b8b872daba924 Author: Alexander Potapenko Date: Mon Mar 6 19:46:14 2017 +0100 selinux: check for address length in selinux_socket_bind() KMSAN (KernelMemorySanitizer, a new error detection tool) reports use of uninitialized memory in selinux_socket_bind(): ================================================================== BUG: KMSAN: use of unitialized memory inter: 0 CPU: 3 PID: 1074 Comm: packet2 Tainted: G B 4.8.0-rc6+ #1916 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 0000000000000000 ffff8800882ffb08 ffffffff825759c8 ffff8800882ffa48 ffffffff818bf551 ffffffff85bab870 0000000000000092 ffffffff85bab550 0000000000000000 0000000000000092 00000000bb0009bb 0000000000000002 Call Trace: [< inline >] __dump_stack lib/dump_stack.c:15 [] dump_stack+0x238/0x290 lib/dump_stack.c:51 [] kmsan_report+0x276/0x2e0 mm/kmsan/kmsan.c:1008 [] __msan_warning+0x5b/0xb0 mm/kmsan/kmsan_instr.c:424 [] selinux_socket_bind+0xf41/0x1080 security/selinux/hooks.c:4288 [] security_socket_bind+0x1ec/0x240 security/security.c:1240 [] SYSC_bind+0x358/0x5f0 net/socket.c:1366 [] SyS_bind+0x82/0xa0 net/socket.c:1356 [] do_syscall_64+0x58/0x70 arch/x86/entry/common.c:292 [] entry_SYSCALL64_slow_path+0x25/0x25 arch/x86/entry/entry_64.o:? chained origin: 00000000ba6009bb [] save_stack_trace+0x27/0x50 arch/x86/kernel/stacktrace.c:67 [< inline >] kmsan_save_stack_with_flags mm/kmsan/kmsan.c:322 [< inline >] kmsan_save_stack mm/kmsan/kmsan.c:337 [] kmsan_internal_chain_origin+0x118/0x1e0 mm/kmsan/kmsan.c:530 [] __msan_set_alloca_origin4+0xc3/0x130 mm/kmsan/kmsan_instr.c:380 [] SYSC_bind+0x129/0x5f0 net/socket.c:1356 [] SyS_bind+0x82/0xa0 net/socket.c:1356 [] do_syscall_64+0x58/0x70 arch/x86/entry/common.c:292 [] return_from_SYSCALL_64+0x0/0x6a arch/x86/entry/entry_64.o:? origin description: ----address@SYSC_bind (origin=00000000b8c00900) ================================================================== (the line numbers are relative to 4.8-rc6, but the bug persists upstream) , when I run the following program as root: ======================================================= #include #include #include int main(int argc, char *argv[]) { struct sockaddr addr; int size = 0; if (argc > 1) { size = atoi(argv[1]); } memset(&addr, 0, sizeof(addr)); int fd = socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP); bind(fd, &addr, size); return 0; } ======================================================= (for different values of |size| other error reports are printed). This happens because bind() unconditionally copies |size| bytes of |addr| to the kernel, leaving the rest uninitialized. Then security_socket_bind() reads the IP address bytes, including the uninitialized ones, to determine the port, or e.g. pass them further to sel_netnode_find(), which uses them to calculate a hash. Signed-off-by: Alexander Potapenko Acked-by: Eric Dumazet [PM: fixed some whitespace damage] Signed-off-by: Paul Moore security/selinux/hooks.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit c017c71ce09f4c7a5378fccbec6a3d7e96b0c5c2 Author: Nicolas Iooss Date: Sun Mar 5 15:01:52 2017 +0100 selinux: include sys/socket.h in host programs to have PF_MAX Compiling with clang and -Wundef makes the compiler report a usage of undefined PF_MAX macro in security/selinux/include/classmap.h: In file included from scripts/selinux/mdp/mdp.c:48: security/selinux/include/classmap.h:37:31: warning: no previous extern declaration for non-static variable 'secclass_map' [-Wmissing-variable-declarations] struct security_class_mapping secclass_map[] = { ^ security/selinux/include/classmap.h:235:5: error: 'PF_MAX' is not defined, evaluates to 0 [-Werror,-Wundef] #if PF_MAX > 43 ^ In file included from scripts/selinux/genheaders/genheaders.c:17: security/selinux/include/classmap.h:37:31: warning: no previous extern declaration for non-static variable 'secclass_map' [-Wmissing-variable-declarations] struct security_class_mapping secclass_map[] = { ^ security/selinux/include/classmap.h:235:5: error: 'PF_MAX' is not defined, evaluates to 0 [-Werror,-Wundef] #if PF_MAX > 43 ^ PF_MAX is defined in include/linux/socket.h but not in include/uapi/linux/socket.h. Therefore host programs have to rely on the definition from libc's /usr/include/bits/socket.h, included by . Fix the issue by using sys/socket.h in mdp and genheaders. When classmap.h is included by security/selinux/avc.c, it uses the kernel definition of PF_MAX, which makes the test consistent. Signed-off-by: Nicolas Iooss Signed-off-by: Paul Moore scripts/selinux/genheaders/genheaders.c | 1 + scripts/selinux/mdp/mdp.c | 1 + 2 files changed, 2 insertions(+) commit 01461abe62df44844efc5a57f9a365270a7c0299 Merge: 71e8727 d05f7a7 Author: David S. Miller Date: Fri Mar 10 09:45:10 2017 -0800 Merge branch 'fib-notifications-cleanup' Jiri Pirko says: ==================== ipv4: fib: FIB notifications cleanup Ido says: The first patch moves the core FIB notification code to a separate file, so that code related to FIB rules is placed in fib_rules.c and not fib_trie.c. The reason for the change will become even more apparent in follow-up patchset where we extend the FIB rules notifications. Second patch removes a redundant argument. ==================== Signed-off-by: David S. Miller commit d05f7a7dd470f71dc45c2928dbf76afe2b1c2f07 Author: Ido Schimmel Date: Fri Mar 10 08:56:19 2017 +0100 ipv4: fib: Remove redundant argument We always pass the same event type to fib_notify() and fib_rules_notify(), so we can safely drop this argument. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Acked-by: David Ahern Signed-off-by: David S. Miller include/net/ip_fib.h | 9 +++------ net/ipv4/fib_notifier.c | 4 ++-- net/ipv4/fib_rules.c | 5 ++--- net/ipv4/fib_trie.c | 15 ++++++--------- 4 files changed, 13 insertions(+), 20 deletions(-) commit c0243892cbb0e48873d6132f673c830602808245 Author: Ido Schimmel Date: Fri Mar 10 08:56:18 2017 +0100 ipv4: fib: Move FIB notification code to a separate file Most of the code concerned with the FIB notification chain currently resides in fib_trie.c, but this isn't really appropriate, as the FIB notification chain is also used for FIB rules. Therefore, it makes sense to move the common FIB notification code to a separate file and have it export the relevant functions, which can be invoked by its different users (e.g., fib_trie.c, fib_rules.c). Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Acked-by: David Ahern Signed-off-by: David S. Miller include/net/ip_fib.h | 15 ++++++++ net/ipv4/Makefile | 2 +- net/ipv4/fib_notifier.c | 86 +++++++++++++++++++++++++++++++++++++++++++ net/ipv4/fib_rules.c | 9 +++++ net/ipv4/fib_trie.c | 97 +------------------------------------------------ 5 files changed, 113 insertions(+), 96 deletions(-) commit 71e8727ebee78f7f6711f272d6ba5d78d0852835 Merge: 1015d74 b5d90e6 Author: David S. Miller Date: Fri Mar 10 09:36:07 2017 -0800 Merge branch 'mlxsw-vrf-offload-prep' Jiri Pirko says: ==================== mlxsw: Preparations for VRF offload Ido says: This patchset aims to prepare the mlxsw driver for VRF offload. The follow-up patchsets that introduce VRF support can be found here: https://github.com/idosch/linux/tree/idosch-next The first four patches are mainly concerned with the netdevice notification block. There are no functional changes, but merely restructuring to more easily integrate VRF enslavement. Patches 5-10 remove various assumptions throughout the code about a single virtual router (VR) and also restructure the internal data structures to more accurately represent the device's operation. ==================== Signed-off-by: David S. Miller commit b5d90e6d6b19477c49ad699c173bbcfa3e4725bd Author: Ido Schimmel Date: Fri Mar 10 08:53:43 2017 +0100 mlxsw: spectrum_router: Make abort mechanism VR-aware When the abort mechanism is invoked it binds the first virtual router (VR) to an LPM tree and inserts a default route to direct packets to the CPU. With VRFs, we can have router interfaces (RIFs) bound to multiple VRs, so we need to make sure packets are trapped from all VRs and not just the first one. Upon abort invocation, bind all active VRs to the same LPM tree and insert a default route in each. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 39 +++++++++++++++------- 1 file changed, 27 insertions(+), 12 deletions(-) commit 6913229eea27e63df086f55372e52021727fd0a7 Author: Ido Schimmel Date: Fri Mar 10 08:53:42 2017 +0100 mlxsw: spectrum_router: Explicitly Associate RIFs with VRs Up until now we implicitly associated all the router interfaces (RIFs) with the first virtual router (VR). This must be changed in order to enable VRF offload. Otherwise, a packet received via a VRF slave would do a FIB lookup in the same table used by other VRFs. Instead, bind the RIF to a VR according to the table where FIB lookup should be performed for packets received via the RIF. Currently, we only care about the MAIN and LOCAL tables (which we squash together). Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 4 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 63 ++++++++++++++++------ 3 files changed, 50 insertions(+), 18 deletions(-) commit 76610ebbde1883527cf5afa8708a5b0599439a28 Author: Ido Schimmel Date: Fri Mar 10 08:53:41 2017 +0100 mlxsw: spectrum_router: Refactor virtual router handling A virtual router (VR) is an entity within the device to which routing tables and interfaces can be bound to. It can be used to implement VRFs. In the initial implementation we associated the VR with a specific protocol (e.g., IPv4) and an LPM tree. However, this isn't really accurate, as the same VR can be used for both IPv4 and IPv6 traffic, by binding a different LPM tree to a {VR, Proto} pair. This patch aims to restructure the VR code according to the above logic, so that VRs are more accurately represented by the driver's data structures. The main motivation behind this change is to prepare the driver for VRF offload. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 5 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 326 +++++++++++---------- 2 files changed, 180 insertions(+), 151 deletions(-) commit 382dbb40145076f3a023992117ddaaae1ced5af8 Author: Ido Schimmel Date: Fri Mar 10 08:53:40 2017 +0100 mlxsw: spectrum_router: Simplify LPM tree allocation When looking for a new LPM tree we should always consider all the unused trees. It doesn't matter if the new tree is required due to changes in currently used prefixes inside an existing routing table or because a route was inserted into an empty table. Both cases are functionally identical and therefore should be treated the same. When looking for a new LPM tree, consider all unused trees and don't reserve trees for specific cases. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 4724ba561a1ae0fcad2f2f2d3a5b1d4fd0840a9d Author: Ido Schimmel Date: Fri Mar 10 08:53:39 2017 +0100 mlxsw: spectrum_router: Place RIF related code with router code The inetaddr notification block is currently implemented in the main driver file, but this isn't really appropriate, as it mainly creates and destroys router interfaces (RIFs) which belong with the rest of the router code. This will become even more apparent later on when we'll need to bind these RIFs to virtual routers according to the VRF's table. Structure the driver better and prevent unnecessary function exports by moving the RIF related code with the rest of the router code. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 541 +--------------- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 45 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 700 +++++++++++++++++++-- 3 files changed, 644 insertions(+), 642 deletions(-) commit 97989ee0f5e855f4f5ec473b292c17f39cbaac58 Author: Ido Schimmel Date: Fri Mar 10 08:53:38 2017 +0100 mlxsw: spectrum_router: Allow more route types to be programmed Allow 'unreachable', 'blackhole' and 'prohibit' route types to be programmed into the device by sending any packet hitting them to the CPU. This is needed so that users will be able to program a default route into the VRF's table, thereby preventing lookup from leaking to other tables. Audit the code paths to make sure we don't rely on the presence of a nexthop netdev, as it doesn't exist for above mentioned route types. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 31 ++++++++++++++++------ 1 file changed, 23 insertions(+), 8 deletions(-) commit f4a761d2030289229e5e7837a8afd35e48af464c Author: Ido Schimmel Date: Fri Mar 10 08:53:37 2017 +0100 mlxsw: spectrum: Destroy RIFs based on last removed address We only use the RIF reference count to determine when the last IP address was removed, but instead we can just test 'in_dev->ifa_list'. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 7 +++---- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) commit 186962ebb7ecd74d305cf167e99bf1885b89ea8c Author: Ido Schimmel Date: Fri Mar 10 08:53:36 2017 +0100 mlxsw: spectrum: Associate PVID vPort with appropriate netdev When a VLAN device is configured on top of a LAG device (f.e., bond0.10), a vPort is created on top of each of the LAG's slaves and its 'dev' pointer is set to the VLAN device. This is in contrast to the implicit PVID vPort (representing 'bond0'), whose 'dev' pointer keeps pointing to the port netdev itself (f.e., 'sw1p1'). Make both cases consistent by setting their 'dev' pointer to the actual netdev they represent. Either the LAG device itself (in the case of the PVID vPort) or the VLAN device on top of it. This will later allow us to more easily understand for which netdev we should create the router interface (RIF) upon enslavement to a VRF master. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1f88061ee409f5ec3d3451fc3235965aa3789af1 Author: Ido Schimmel Date: Fri Mar 10 08:53:35 2017 +0100 mlxsw: spectrum: Don't assume upper device's type When an upper device is configured on top of a vPort we make sure it's a bridge master during PRECHANGEUPPER and fail otherwise. Therefore, when CHANGEUPPER is later received we don't bother checking the upper's type. Make the code more extendable in preparation for VRF uppers, by checking the upper's type. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit b414970e210d39d81cc70b46f7d9aa8e07b9297f Author: Ido Schimmel Date: Fri Mar 10 08:53:34 2017 +0100 mlxsw: spectrum: Sanitize bridge's upper devices We're going to allow bridges stacked on top of port netdevs to be enslaved to a VRF, but for now, only VLAN uppers of the VLAN-aware bridge are supported. Sanitize any other bridge upper. This is consistent with the way we sanitize port netdevs' uppers. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 31 ++++++++++++++++---------- 1 file changed, 19 insertions(+), 12 deletions(-) commit b27d5250062ef7438f86d8ab6d0549dc912f4267 Author: Thierry Reding Date: Thu Feb 23 18:30:53 2017 +0100 arm64: tegra: Add GPIO expanders on P2771 The P2771 development board expands the number of GPIOs via two I2C chips. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit b693b3d709c855a4f4a4dc5d2ac75ca794e0fa5e Author: Thierry Reding Date: Thu Feb 23 18:30:52 2017 +0100 arm64: tegra: Add power monitors on P2771 The P2771 development board comes with two power monitors that can be used to determine power consumption in different parts of the board. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 59686a92782c38e0f8bd603fcfef3c6b5f307c97 Author: Thierry Reding Date: Thu Feb 23 18:30:51 2017 +0100 arm64: tegra: Add GPIO keys on P2771 The P2771 has three keys (power, volume up and volume down) that are connected to pins on the AON GPIO controller. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit b64994d18fcdb7ad5a1eedf291a0e95a44344e17 Author: Thierry Reding Date: Thu Feb 23 18:30:50 2017 +0100 arm64: tegra: Enable current monitors on P3310 The P3310 processor module contains two current monitors that can be used to determine the current flow across various parts of the board design. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b0ddea853919e6165d58b68dc086ad575112965b Author: Thierry Reding Date: Wed Mar 8 14:31:45 2017 +0100 arm64: tegra: Enable SD/MMC slot on P2771 The P3310 processor module makes provisions for exposing the SDMMC1 controller via a standard SD/MMC slot, which the P2771 supports. Hook up the power supply provided on the P2771 carrier board and enable the device tree node. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 80fdf7b426f1c37571b68a4494fb72a7a73a31fd Author: Thierry Reding Date: Thu Feb 23 18:30:49 2017 +0100 arm64: tegra: Enable SDHCI controllers on P3110 The P3110 processor module wires one of the SDHCI controllers to an on- board eMMC and exposes another set of SD/MMC signals on the connector to support an external SD/MMC card. A third controller is connected to the SDIO pins of an M.2 KEY E connector. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 02df3f03a8db3e64348b8fce3d8ce2449ada3fa6 Author: Thierry Reding Date: Thu Feb 23 18:30:48 2017 +0100 arm64: tegra: Add initial power tree for P3310 Enable the Maxim MAX77620 PMIC found on P3310 and add some fixed regulators to model the power tree. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi | 220 +++++++++++++++++++++++++ 1 file changed, 220 insertions(+) commit ef44bca87c6b505df0d54e12d67e839837cbcd30 Merge: c1ae3cf fde42bf Author: Masahiro Yamada Date: Sat Mar 11 01:18:25 2017 +0900 Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull Michal's unmerged branch into the new Kbuild repository. * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: genksyms: Regenerate parser genksyms: Fix segfault with invalid declarations commit 7c0a16ad7c5f7f6278da78edb5a416f30fe28d08 Author: Chris Wilson Date: Thu Mar 9 21:12:32 2017 +0000 drm/i915: Defer unmasking RPS interrupts until after making adjustments To make our adjustments to RPS requires taking a mutex and potentially sleeping for an unknown duration - until we have completed our adjustments further RPS interrupts are immaterial (they are based on stale thresholds) and we can safely ignore them. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170309211232.28878-3-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_irq.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit 569884e3d47d54d943c13eb14d653a6100937f14 Author: Chris Wilson Date: Thu Mar 9 21:12:31 2017 +0000 drm/i915: Use max(render, media) for Baytrail busyness calculation Currently, we sum the render and media cycles (on different engines) to compute a percentage - but we fail to factor in the duplication into the threshold calculations. This makes us very eager to upclock! If we just consider the maximum busy cycles of either counter, we should have an accurate reflection on whether there are cycles to spare to handle the workload at this frequency. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170309211232.28878-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_irq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e0e8c7cb6eb68e9256de2d8cbeb481d3701c05ac Author: Chris Wilson Date: Thu Mar 9 21:12:30 2017 +0000 drm/i915: Stop using RP_DOWN_EI on Baytrail On Baytrail, we manually calculate busyness over the evaluation interval to avoid issues with miscaluations with RC6 enabled. However, it turns out that the DOWN_EI interrupt generator is completely bust - it operates in two modes, continuous or never. Neither of which are conducive to good behaviour. Stop unmask the DOWN_EI interrupt and just compute everything from the UP_EI which does seem to correspond to the desired interval. v2: Fixup gen6_rps_pm_mask() as well v3: Inline vlv_c0_above() to combine the now identical elapsed calculation for up/down and simplify the threshold testing Fixes: 43cf3bf084ba ("drm/i915: Improved w/a for rps on Baytrail") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: # v4.1+ Link: http://patchwork.freedesktop.org/patch/msgid/20170309211232.28878-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_irq.c | 73 ++++++++++++++++------------------------- drivers/gpu/drm/i915/intel_pm.c | 5 +-- 3 files changed, 32 insertions(+), 48 deletions(-) commit 14e21cb8f811100a2104e952b8f5bc0326a5e213 Author: Jerome Forissier Date: Tue Mar 22 16:38:45 2016 +0100 arm64: dt: hikey: Add optee node Acked-by: Wei Xu Signed-off-by: Jerome Forissier Signed-off-by: Jens Wiklander arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit 6a6e77006fcdba89708214556c6d560323e850fc Author: Jens Wiklander Date: Mon Jun 1 16:15:25 2015 +0200 Documentation: tee subsystem and op-tee driver Acked-by: Andreas Dannenberg Signed-off-by: Jens Wiklander Documentation/00-INDEX | 2 + Documentation/tee.txt | 118 +++++++++++++++++++++++++++++++++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 121 insertions(+) commit 4fb0a5eb364d239722e745c02aef0dbd4e0f1ad2 Author: Jens Wiklander Date: Tue Apr 14 14:33:20 2015 +0200 tee: add OP-TEE driver Adds a OP-TEE driver which also can be compiled as a loadable module. * Targets ARM and ARM64 * Supports using reserved memory from OP-TEE as shared memory * Probes OP-TEE version using SMCs * Accepts requests on privileged and unprivileged device * Uses OPTEE message protocol version 2 to communicate with secure world Acked-by: Andreas Dannenberg Tested-by: Jerome Forissier (HiKey) Tested-by: Volodymyr Babchuk (RCAR H3) Tested-by: Scott Branden Reviewed-by: Javier González Signed-off-by: Jens Wiklander MAINTAINERS | 5 + drivers/tee/Kconfig | 10 + drivers/tee/Makefile | 1 + drivers/tee/optee/Kconfig | 7 + drivers/tee/optee/Makefile | 5 + drivers/tee/optee/call.c | 444 +++++++++++++++++++++++++++ drivers/tee/optee/core.c | 622 ++++++++++++++++++++++++++++++++++++++ drivers/tee/optee/optee_msg.h | 418 +++++++++++++++++++++++++ drivers/tee/optee/optee_private.h | 183 +++++++++++ drivers/tee/optee/optee_smc.h | 450 +++++++++++++++++++++++++++ drivers/tee/optee/rpc.c | 396 ++++++++++++++++++++++++ drivers/tee/optee/supp.c | 273 +++++++++++++++++ 12 files changed, 2814 insertions(+) commit 8eadc19b380d5650e9d9c58e8ecc28e9f2b4a371 Author: Chris Wilson Date: Wed Mar 8 14:46:22 2017 +0000 drm/i915: Extend debugfs/i915_drop_caches to call i915_gem_shrink_all() Sometimes we want to explicitly page out all available objects from igt, i.e. call i915_gem_shrink_all() and check that subsequent operations succeed. This adds DROP_SHRINK_ALL [0x8] to the set of flags for debugfs/i915_drop_caches for that purpose. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170308144622.23194-1-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/i915_debugfs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 504ae4024131c5a01c3ce8382d49b801375e039c Author: Chris Wilson Date: Fri Mar 10 11:55:18 2017 +0000 drm/i915/cmdparser: Limit clflush to active cachelines We only need to clflush those cachelines that we have validated to be read by the GPU. Userspace typically fills the batch length in correctly, the exceptions tend to be explicit tests within igt. v2: Use ptr_mask_bits() to make Mika happy v3: cmd is not advanced on MI_BBE, so make sure to include an extra dword in the clflush. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170310115518.13832-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_cmd_parser.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit b8473050805f35add97f3ff57570d55a01808df5 Author: Tvrtko Ursulin Date: Fri Mar 10 09:32:49 2017 +0000 drm/i915: Fix forcewake active domain tracking In commit 003342a50021 ("drm/i915: Keep track of active forcewake domains in a bitmask") I forgot to adjust the newly introduce fw_domains_active state across reset. This caused the assert_forcewakes_inactive to trigger during suspend and resume if there were user held forcewakes. v2: Bitmask checks are required since vfuncs are not always present. v3: Move bitmask tracking to get/put vfunc for simplicity. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Fixes: 003342a50021 ("drm/i915: Keep track of active forcewake domains in a bitmask") Testcase: igt/drv_suspend/forcewake Cc: Tvrtko Ursulin Cc: "Paneri, Praveen" Cc: Chris Wilson Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: v4.10+ Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170310093249.4484-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_uncore.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 35dc8aabc8783d6322a59d774af2858e5955d2ab Author: Laurent Pinchart Date: Fri Mar 10 15:48:12 2017 +0530 drm: bridge: dw-hdmi: Move the driver to a separate directory. The driver is already made of 5 separate source files. Move it to a newly created directory named synopsys where more Synopsys bridge drivers can be added later (for the DisplayPort controller for instance). Suggested-by: Jose Abreu Signed-off-by: Laurent Pinchart Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170303172007.26541-10-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/Kconfig | 26 +- drivers/gpu/drm/bridge/Makefile | 4 +- drivers/gpu/drm/bridge/dw-hdmi-ahb-audio.c | 652 ------ drivers/gpu/drm/bridge/dw-hdmi-audio.h | 21 - drivers/gpu/drm/bridge/dw-hdmi-i2s-audio.c | 141 -- drivers/gpu/drm/bridge/dw-hdmi.c | 2314 -------------------- drivers/gpu/drm/bridge/dw-hdmi.h | 1153 ---------- drivers/gpu/drm/bridge/synopsys/Kconfig | 23 + drivers/gpu/drm/bridge/synopsys/Makefile | 5 + .../gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c | 652 ++++++ drivers/gpu/drm/bridge/synopsys/dw-hdmi-audio.h | 21 + .../gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 141 ++ drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2314 ++++++++++++++++++++ drivers/gpu/drm/bridge/synopsys/dw-hdmi.h | 1153 ++++++++++ 14 files changed, 4312 insertions(+), 4308 deletions(-) commit 1524e93e1eb42e5c3ea8a8b380fbcf15c52d2663 Author: Shashank Sharma Date: Thu Mar 9 19:13:41 2017 +0530 drm/i915: Remove intel_ prefix from encoder variables in intel_ddi.c In I915 driver, there are many places where variable name for intel_encoder object is given as 'intel_encoder' whereas it would make more sense to call it just 'encoder' when possible. This patch does this cleanup in file intel_ddi.c. PS: There are few functions where both drm_encoder and intel_encoder are present. For such functions, this patch does nothing. Suggested-by: Ander Conselvan De Oliveira Signed-off-by: Shashank Sharma Acked-by: Jani Nikula Reviewed-by: Ander Conselvan De Oliveira Signed-off-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1489067021-4709-1-git-send-email-shashank.sharma@intel.com drivers/gpu/drm/i915/intel_ddi.c | 66 ++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 33 deletions(-) commit 920c480a73a341de93cf0e8816ea0becab729e1e Author: Elaine Zhang Date: Tue Mar 7 19:16:48 2017 +0800 clk: rockchip: mark some rk3368 core-clks as critical Mark pclk_pd_alive, pclk_peri, hclk_peri as critical Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3368.c | 3 +++ 1 file changed, 3 insertions(+) commit 4f060850ecd66368316249557a2c0e4344bf36fa Author: Elaine Zhang Date: Tue Mar 7 19:05:18 2017 +0800 clk: rockchip: export SCLK_TIMERXX id for timers on rk3368 Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3368.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 9bb4db62327ebfd125fa6a8c892ebe3152a9f531 Author: Elaine Zhang Date: Mon Feb 6 10:50:35 2017 +0800 clk: rockchip: describe clk_gmac using the new muxgrf type on rk3328 With the newly introduced clk type for muxes in the grf we now can describe some missing clocks, like the clk_gmac2io and clk_gmac2phy that selects between clk_mac2io_src and gmac_clkin based on a bit set in the general register files. Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3328.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 4d00542b27e2fd34761b93e9077fae09a19ffc0d Merge: 60aadea 710fbd7 Author: Heiko Stuebner Date: Fri Mar 10 11:18:53 2017 +0100 Merge branch 'v4.12-shared/clkids' into v4.12-clk/next commit 710fbd769c9c9ba80f5b2727dd6bf4e06bb69b9e Author: Elaine Zhang Date: Tue Mar 7 19:05:17 2017 +0800 clk: rockchip: add clock ids for timer10-15 of RK3368 SoCs Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rk3368-cru.h | 6 ++++++ 1 file changed, 6 insertions(+) commit a4fa90d24b4bb7d171fbcb2ceffd0315a6e29050 Author: Elaine Zhang Date: Tue Mar 7 19:05:15 2017 +0800 clk: rockchip: fix up rk3368 timer-ids The timer-ids are wrong compared to the manual, probably due a simple copy-paste mistake from the otherwise very similar rk3288. And there are even more timers in the system than the ones wrongly listed here. Timer-Ids were unused both in clock-driver as well as devicetree till now, so fixing them won't break anything. Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rk3368-cru.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit bdc7dd67e7d9a50af992fd6c5e21b080475321e3 Author: Elaine Zhang Date: Mon Feb 6 10:50:34 2017 +0800 clk: rockchip: add rk3328 clk_mac2io_ext ID Signed-off-by: Elaine Zhang Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rk3328-cru.h | 1 + 1 file changed, 1 insertion(+) commit 80e2f97968b537fc9c1789fce1b7f61609a5aae4 Author: Neil Armstrong Date: Fri Mar 3 19:20:06 2017 +0200 drm: bridge: dw-hdmi: Switch to regmap for register access The Synopsys Designware HDMI TX Controller does not enforce register access on platforms instanciating it. The current driver supports two different types of memory-mapped flat register access, but in order to support the Amlogic Meson SoCs integration, and provide a more generic way to handle all sorts of register mapping, switch the register access to use the regmap infrastructure. In the case of registers that are not flat memory-mapped or do not conform to the current driver implementation, a regmap struct can be given in the plat_data and be used at probe or bind. Since the AHB audio driver is only available with direct memory access, only allow the I2S audio driver to be registered is directly memory-mapped. Signed-off-by: Neil Armstrong Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Tested-by: Neil Armstrong Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170303172007.26541-10-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 109 +++++++++++++++++++++------------------ include/drm/bridge/dw_hdmi.h | 1 + 2 files changed, 59 insertions(+), 51 deletions(-) commit 2e6777e8d5dd883b983c8de8797ff92bcb158f7c Author: Kieran Bingham Date: Fri Mar 3 19:20:05 2017 +0200 drm: bridge: dw-hdmi: Remove device type from platform data The device type isn't used anymore now that workarounds and PHY-specific operations are performed based on version information read at runtime. Remove it. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Tested-by: Neil Armstrong Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170303172007.26541-9-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 2 -- drivers/gpu/drm/imx/dw_hdmi-imx.c | 2 -- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 1 - include/drm/bridge/dw_hdmi.h | 7 ------- 4 files changed, 12 deletions(-) commit 2ef9dfedefd60a12d2b02b1ee0a42be3506c43f2 Author: Kieran Bingham Date: Fri Mar 3 19:20:04 2017 +0200 drm: bridge: dw-hdmi: Add support for custom PHY configuration The DWC HDMI TX controller interfaces with a companion PHY. While Synopsys provides multiple standard PHYs, SoC vendors can also integrate a custom PHY. Modularize PHY configuration to support vendor PHYs through platform data. The existing PHY configuration code was originally written to support the DWC HDMI 3D TX PHY, and seems to be compatible with the DWC MLP PHY. The HDMI 2.0 PHY will require a separate configuration function. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Tested-by: Neil Armstrong Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170303172007.26541-8-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 109 ++++++++++++++++++++++++++------------- include/drm/bridge/dw_hdmi.h | 7 +++ 2 files changed, 81 insertions(+), 35 deletions(-) commit f1585f6e29f5aba34e2cd6e3db9f0dd33b046809 Author: Laurent Pinchart Date: Mon Mar 6 01:36:15 2017 +0200 drm: bridge: dw-hdmi: Create PHY operations The HDMI TX controller support different PHYs whose programming interface can vary significantly, especially with vendor PHYs that are not provided by Synopsys. To support them, create a PHY operation structure that can be provided by the platform glue layer. The existing PHY handling code (limited to Synopsys PHY support) is refactored into a set of default PHY operations that are used automatically when the platform glue doesn't provide its own operations. Signed-off-by: Laurent Pinchart Tested-by: Neil Armstrong Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170305233615.11993-1-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 95 ++++++++++++++++++++++++++++------------ include/drm/bridge/dw_hdmi.h | 18 +++++++- 2 files changed, 82 insertions(+), 31 deletions(-) commit 181e0ef092a4952aa523c5b9cb21394cf43bcd46 Author: Laurent Pinchart Date: Mon Mar 6 01:35:57 2017 +0200 drm: bridge: dw-hdmi: Fix the PHY power up sequence When powering the PHY up we need to wait for the PLL to lock. This is done by polling the TX_PHY_LOCK bit in the HDMI_PHY_STAT0 register (interrupt-based wait could be implemented as well but is likely overkill). The bit is asserted when the PLL locks, but the current code incorrectly waits for the bit to be deasserted. Fix it, and while at it, replace the udelay() with a sleep as the code never runs in non-sleepable context. To be consistent with the power down implementation move the poll loop to the power off function. Signed-off-by: Laurent Pinchart Tested-by: Neil Armstrong Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170305233557.11945-1-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 65 +++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 28 deletions(-) commit ccc499330dbcaa8f6065bd1b10a64ca09fa96c3e Author: Geert Uytterhoeven Date: Tue Mar 7 19:03:26 2017 +0100 arm64: dts: r8a7796: Add Cortex-A53 PMU node Enable the performance monitor unit for the Cortex-A53 cores on the R8A7796 SoC. Extracted from a patch by Takeshi Kihara in the BSP. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b4dc3b4b1a65fec829ee8704c7647c06a8038108 Author: Geert Uytterhoeven Date: Tue Mar 7 19:03:25 2017 +0100 arm64: dts: r8a7796: Add Cortex-A53 CPU cores This patch adds Cortex-A53 CPU cores of R8A7796 SoC, and sets a total of 6 cores (2 x Cortex-A57 + 4 x Cortex-A53). Based on a patch by Takeshi Kihara in the BSP. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 46 ++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 5 deletions(-) commit a681e6d63285b879bb9bab0bd79e2021e6dcbda1 Author: Geert Uytterhoeven Date: Tue Mar 7 19:03:24 2017 +0100 arm64: dts: r8a7796: Add CA53 L2 cache-controller node Add a device node for the Cortex-A53 L2 cache-controller. The L2 cache for the Cortex-A53 CPU cores is 512 KiB large (organized as 32 KiB x 16 ways). Extracted from a patch by Takeshi Kihara in the BSP. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 9fccf4d6103eeb5db88c1ae026d61b87f722414a Author: Takeshi Kihara Date: Tue Mar 7 19:03:23 2017 +0100 arm64: dts: r8a7796: Add Cortex-A57 PMU node Enable the performance monitor unit for the Cortex-A57 cores on the R8A7796 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7328be4a03b10c19e49a564f4c2e3a9ebcf34ca7 Author: Takeshi Kihara Date: Tue Mar 7 19:03:22 2017 +0100 arm64: dts: r8a7796: Add Cortex-A57 CPU cores This patch adds Cortex-A57 CPU cores to R8A7796 SoC for a total of 2 x Cortex-A57. Signed-off-by: Takeshi Kihara [geert: Rebased] Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit d2b10f99962aa5ec9865a77827931bf20211a39c Author: Kuninori Morimoto Date: Tue Mar 7 05:29:43 2017 +0000 ARM: dts: r8a7793: Tidyup Audio-DMAC channel for DVC Current Audio-DMAC is assigned "rx" as Audio-DMAC0, "tx" as Audio-DMAC1. Thus, DVC "tx" should be assigned as Audio-DMAC1, instead of Audio-DMAC0. Because of this, current platform board (using SRC/DVC/SSI) Playback/Capture both will use same Audio-DMAC0 (but it depends on audio data path). First note is that this "rx" and "tx" are from each IP point, it doesn't mean Playback/Capture. Second note is that Audio DMAC assigned on DT is only for Audio-DMAC, Audio-DMAC-peri-peri has no entry. => Audio-DMAC -> Audio-DMAC-peri-peri -- HW connection Playback case [Mem] => [SRC]--[DVC] -> [SSI]--[Codec] rx ~~~~~~~~~~~~ Capture [Mem] <= [DVC]--[SRC] <- [SSI]--[Codec] tx ~~~~~~~~~~~~ Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7793.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d49db72b567d6273f41f045b0c146837d3e50f8d Author: Kuninori Morimoto Date: Tue Mar 7 05:29:21 2017 +0000 ARM: dts: r8a7791: Tidyup Audio-DMAC channel for DVC Current Audio-DMAC is assigned "rx" as Audio-DMAC0, "tx" as Audio-DMAC1. Thus, DVC "tx" should be assigned as Audio-DMAC1, instead of Audio-DMAC0. Because of this, current platform board (using SRC/DVC/SSI) Playback/Capture both will use same Audio-DMAC0 (but it depends on audio data path). First note is that this "rx" and "tx" are from each IP point, it doesn't mean Playback/Capture. Second note is that Audio DMAC assigned on DT is only for Audio-DMAC, Audio-DMAC-peri-peri has no entry. => Audio-DMAC -> Audio-DMAC-peri-peri -- HW connection Playback case [Mem] => [SRC]--[DVC] -> [SSI]--[Codec] rx ~~~~~~~~~~~~ Capture [Mem] <= [DVC]--[SRC] <- [SSI]--[Codec] tx ~~~~~~~~~~~~ Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 133a3f1a19c99218a39e9d3e91e9e5442fa0f191 Author: Geert Uytterhoeven Date: Mon Mar 6 17:58:11 2017 +0100 ARM: dts: r8a7794: Add INTC-SYS clock to device tree Link the ARM GIC to the INTC-SYS module clock, and add it to the "always on" PM Domain, so it can be power managed using that clock. Note that currently the GIC-400 driver doesn't support module clocks nor Runtime PM, so this must be handled as a critical clock. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794.dtsi | 9 ++++++--- include/dt-bindings/clock/r8a7794-clock.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) commit 90dce5428ae5499f06d91297ef10b3b613044774 Author: Geert Uytterhoeven Date: Mon Mar 6 17:58:09 2017 +0100 ARM: dts: r8a7792: Add INTC-SYS clock to device tree Link the ARM GIC to the INTC-SYS module clock, and add it to the "always on" PM Domain, so it can be power managed using that clock. Note that currently the GIC-400 driver doesn't support module clocks nor Runtime PM, so this must be handled as a critical clock. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 11 ++++++++--- include/dt-bindings/clock/r8a7792-clock.h | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) commit c2f2e266acb39f86bda1461874568ced7eaa6752 Author: Geert Uytterhoeven Date: Mon Mar 6 17:58:08 2017 +0100 ARM: dts: r8a7791: Add INTC-SYS clock to device tree Link the ARM GIC to the INTC-SYS module clock, and add it to the "always on" PM Domain, so it can be power managed using that clock. Note that currently the GIC-400 driver doesn't support module clocks nor Runtime PM, so this must be handled as a critical clock. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791.dtsi | 9 ++++++--- include/dt-bindings/clock/r8a7791-clock.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) commit 9e58523624fc063ce43ad3ef2bf6d603bda50a5e Author: Geert Uytterhoeven Date: Mon Mar 6 17:58:07 2017 +0100 ARM: dts: r8a7790: Add INTC-SYS clock to device tree Link the ARM GIC to the INTC-SYS module clock, and add it to the "always on" PM Domain, so it can be power managed using that clock. Note that currently the GIC-400 driver doesn't support module clocks nor Runtime PM, so this must be handled as a critical clock. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790.dtsi | 9 ++++++--- include/dt-bindings/clock/r8a7790-clock.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) commit c11333cc2e7ebe41e2aa4fa353abafa1f21a0662 Author: Geert Uytterhoeven Date: Mon Mar 6 17:58:06 2017 +0100 ARM: dts: r8a73a4: Add INTC-SYS clock to device tree Link the ARM GIC to the INTC-SYS module clock and the C4 power domain, so it can be power managed using that clock in the future. Note that currently the GIC-400 driver doesn't support module clocks nor Runtime PM, so this must be handled as a critical clock. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a73a4.dtsi | 13 +++++++++---- include/dt-bindings/clock/r8a73a4-clock.h | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) commit 69ed50de582eff6307fd3fa050fdc505731f0a2d Author: Chris Brandt Date: Sat Mar 4 17:37:37 2017 -0500 ARM: dts: r7s72100: Add watchdog timer Add watchdog timer support for RZ/A1. For the RZ/A1, the only way to do a reset is to overflow the WDT, so this is useful even if you don't need the watchdog functionality. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Acked-by: Guenter Roeck Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 82c41a994c1f4313ec595387a60d2360e42fdf3b Author: Michael Zoran Date: Thu Mar 9 23:41:10 2017 -0800 staging: vchi: Remove ARM64 from TODO list ARM64 for core vchiq which is the core of vc04_services should now be work complete. The driver compiles without any errors or warnings, and works just as well as 32 bit mode. The necessary compatibility wrappers for the 32 bit ioctls have been written and merged. Since no more ARM64 specific changes should be needed, perhaps it's best to remove it from the TODO list. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchi/TODO | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) commit b8f93267628b22e452251a5f1913b069544b29f7 Author: Aishwarya Pant Date: Fri Mar 10 00:31:36 2017 +0530 staging: bcm2835-camera: use kernel preferred style for handling errors This patch replaces NULL error values with error pointer values. Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6aec8c56bc36f4fb4f315d14a8b6da434dd756a4 Author: Aishwarya Pant Date: Fri Mar 10 00:31:20 2017 +0530 staging: bcm2835-camera: replace kmalloc with kzalloc This patch replaces kmalloc and memset with kzalloc Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit a1d76d7a3cb2ba10ee43da559f6a54cc9dd2d26c Author: Aishwarya Pant Date: Fri Mar 10 00:30:58 2017 +0530 staging: bcm2835-camera: add check to avoid null pointer dereference This patch adds checks after memory allocation to avoid possible null pointer dereferences. Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit fcd1f55359125348f81f4d1b409cd5b391c523e4 Author: Michael Zoran Date: Thu Mar 9 21:08:59 2017 -0800 staging: bcm2835-camera: remove depends on ARM Since all the arm64 specific issues have been fixed now and the camera is working fine with a arm64 kernel, the depends on ARM can be removed from Kconfig. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 2367eb3fbeb2eb97bd96427cb203fd34c3a8a1b6 Author: Michael Zoran Date: Thu Mar 9 21:08:58 2017 -0800 staging: bcm2835-camera: Fix bogus compiler warnings regarding constants In debug logging code, the compiler is warning about imposible situations and size of constants not matching the format specifier. This change fixes all three instances of this. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h | 4 ++-- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) commit 85b1ac7359366e7386fb593427ee3e981e065259 Author: Michael Zoran Date: Thu Mar 9 21:08:57 2017 -0800 staging: bcm2835-camera: Fix buffer overflow calculation on query of camera properties The code that queries properties on the camera has a check for buffer overruns if the firmware sends too much data. This check is incorrect, and during testing I was seeing stack corruption. I believe this error can actually happen in normal use, just for some reason it doesn't appear on 32 bit as often. So perhaps it's best for the check to be fixed. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74369b5f22b72a4b4fd38a12f36251d38c022831 Author: Michael Zoran Date: Thu Mar 9 21:08:56 2017 -0800 staging: bcm2835-camera: Convert spinlock to mutex in handle mapping code The handle mapping code that converts context pointers to handles uses a spinlock. Since the btree implementation can sleep while allocating memory, turning on several kernel debugging options will result in errors in the log. Since this code path is never called in atomic context, perhaps it's better to just use a mutex. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/mmal-vchiq.c | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) commit 68aeab51063a8e7fd4c0b05dc9eeef085fa01fa0 Author: Michael Zoran Date: Thu Mar 9 21:08:55 2017 -0800 staging: bcm2835-camera: Convert struct mmal_buffer_header info fields to u32 The struct mmal_buffer_header has multiple fields used for informational and debugging purposes. These are safe to convert to u32. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-msg.h | 10 +++++----- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) commit 3fd4674fc41a3e6a4b85287f9eb407c246ecf09c Author: Michael Zoran Date: Thu Mar 9 21:08:54 2017 -0800 staging: bcm2835-camera: Convert struct mmal_port info fields to u32 The struct mmal_port has a few informational fields. Convert these to u32. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-msg-port.h | 10 +++++----- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit 7beb354f8560d8c3ce035af4013e035ac06196c2 Author: Michael Zoran Date: Thu Mar 9 21:08:53 2017 -0800 staging: bcm2835-camera: Convert client_context field to a 32 bit handle The client_context field is passed around which is really just a pointer to a msg_context. A lookup table mechanism for msg_context was added previously, so convert this field to a handle as well. The firmware never interperates the client_context, just passed it back. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-msg.h | 2 +- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) commit c45fe9c65742a75b6fada7a2153aa2f8bea0d6dd Author: Michael Zoran Date: Thu Mar 9 21:08:52 2017 -0800 staging: bcm2835-camera: Convert delayed_buffer to u32 A delayed buffer field is passed between the firmware and the kernel. This field is never used either so it's safe to change it to a u32. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-msg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fe08093094e5f6b360f143a299f46ac551695dd Author: Michael Zoran Date: Thu Mar 9 21:08:51 2017 -0800 staging: bcm2835-camera: Convert client_component field to u32 In the messages passed back and forth between the camera and the firmware, a client_component field is passed. This is a pointer to a structure that represents part of the camera. Luckly, it's only used for debug logging, so simply convert it to a u32. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-msg.h | 4 ++-- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit ad428fc0af2eed6f2fe7fa51a7ffca5746cef1a3 Author: Michael Zoran Date: Thu Mar 9 21:08:50 2017 -0800 staging: bcm2835-camera: Create struct mmal_es_format_local to mirror struct mmal_es_format The struct struct mmal_es_format is passed between the firmware which has pointers. A local version of mmal_es_format is also used. Luckly, the two versions are always memberwise copied from each other so simply have different structures for the local and msg versions. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/bcm2835-camera.c | 2 +- .../vc04_services/bcm2835-camera/mmal-msg-format.h | 29 ++++++++++++++++++---- .../vc04_services/bcm2835-camera/mmal-vchiq.h | 2 +- 3 files changed, 26 insertions(+), 7 deletions(-) commit 188540137a74980ae2f52092e82c01b35fbc5ed5 Author: Andrew Morton Date: Thu Mar 9 15:47:37 2017 -0800 drivers/gpu/drm/i915/selftests/i915_selftest.c: fix build with gcc-4.4.4 gcc-4.4.4 has issues with anonymous union initializers. In file included from drivers/gpu/drm/i915/selftests/i915_selftest.c:68: drivers/gpu/drm/i915/selftests/i915_mock_selftests.h:11: error: unknown field 'mock' specified in initializer drivers/gpu/drm/i915/selftests/i915_mock_selftests.h:11: warning: missing braces around initializer drivers/gpu/drm/i915/selftests/i915_mock_selftests.h:11: warning: (near initialization for 'mock_selftests[0].') drivers/gpu/drm/i915/selftests/i915_mock_selftests.h:12: error: unknown field 'mock' specified in initializer drivers/gpu/drm/i915/selftests/i915_mock_selftests.h:13: error: unknown field 'm ... Work around this. Fixes: 953c7f82eb89 ("drm/i915: Provide a hook for selftests") Cc: Chris Wilson Signed-off-by: Andrew Morton Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170310090314.3142-1-chris@chris-wilson.co.uk Signed-off-by: Chris Wilson drivers/gpu/drm/i915/selftests/i915_selftest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b0e583e5b6b90eed40456c394410c154a5160814 Author: Laurent Pinchart Date: Mon Mar 6 01:35:39 2017 +0200 drm: bridge: dw-hdmi: Fix the PHY power down sequence The PHY requires us to wait for the PHY to switch to low power mode after deasserting TXPWRON and before asserting PDDQ in the power down sequence, otherwise power down will fail. The PHY power down can be monitored though the TX_READY bit, available through I2C in the PHY registers, or the TX_PHY_LOCK bit, available through the HDMI TX registers. As the two are equivalent, let's pick the easier solution of polling the TX_PHY_LOCK bit. The power down code is currently duplicated in multiple places. To avoid spreading multiple calls to a TX_PHY_LOCK poll function, we have to refactor the power down code and group it all in a single function. Tests showed that one poll iteration was enough for TX_PHY_LOCK to become low, without requiring any additional delay. Retrying the read five times with a 1ms to 2ms delay between each attempt should thus be more than enough. Signed-off-by: Laurent Pinchart Tested-by: Neil Armstrong Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170305233539.11898-1-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 52 +++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 9 deletions(-) commit 14247d7ce769cfc2269a8b6a58157abb26813f3e Author: Neil Armstrong Date: Fri Mar 3 19:20:00 2017 +0200 drm: bridge: dw-hdmi: Enable CSC even for DVI If the input pixel format is not RGB, the CSC must be enabled in order to provide valid pixel to DVI sinks. This patch removes the hdmi only dependency on the CSC enabling. Reviewed-by: Jose Abreu Reviewed-by: Laurent Pinchart Signed-off-by: Neil Armstrong Tested-by: Neil Armstrong Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170303172007.26541-4-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8b9e1c0de3d81c7b2118f8c403a84fad758c3305 Author: Laurent Pinchart Date: Fri Mar 3 19:19:59 2017 +0200 drm: bridge: dw-hdmi: Move CSC configuration out of PHY code The color space converter isn't part of the PHY, move its configuration out of PHY code. Signed-off-by: Laurent Pinchart Tested-by: Neil Armstrong Reviewed-by: Jose Abreu Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170303172007.26541-3-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 12a3a328eeb1467ef7170b9a710c0b53ee0273eb Author: Laurent Pinchart Date: Fri Mar 3 19:19:58 2017 +0200 drm: bridge: dw-hdmi: Remove unused functions Most of the hdmi_phy_test_*() functions are unused. Remove them. Signed-off-by: Laurent Pinchart Tested-by: Neil Armstrong Reviewed-by: Jose Abreu Tested-by: Nickey Yang Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170303172007.26541-2-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dw-hdmi.c | 26 -------------------------- 1 file changed, 26 deletions(-) commit cbf4b77af11ba93ea2ed7effa37da2a39e970851 Author: Tvrtko Ursulin Date: Thu Mar 9 13:20:04 2017 +0000 drm/i915/guc: Fix request re-submission after reset In order to ensure no missed interrupts we must first re-direct the interrupts to GuC, and only then re-submit the requests to be replayed after a GPU reset. Otherwise context switch can fire before GuC has been set up to receive it triggering more hangs. v2: Rebase. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Cc: Michal Wajdeczko Cc: Mika Kuoppala Cc: Oscar Mateo Cc: Sagar Arun Kamble Cc: Arkadiusz Hiler Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170309132005.1317-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_guc_submission.c | 32 ++++++++++++++++++++++++++---- drivers/gpu/drm/i915/intel_guc_loader.c | 21 -------------------- 2 files changed, 28 insertions(+), 25 deletions(-) commit 1015d743fedab72ff2f5bbbc31bcc1a2a291c3c5 Merge: a30aad5 9caab08 Author: David S. Miller Date: Thu Mar 9 18:35:35 2017 -0800 Merge branch 'mlxsw-VLAN-offload-cls_flower' Jiri Pirko says: ==================== mlxsw: spectrum: Add support for VLAN offload for cls_flower This patchset adds support to offload VLAN modify TC action and adds support to offload cls_flower rules that include VID and PCP matching. ==================== Signed-off-by: David S. Miller commit 9caab08a7685c874e7f20ef16f8191daf85609ae Author: Petr Machata Date: Thu Mar 9 09:25:20 2017 +0100 mlxsw: spectrum: Add support for flower matches on VLAN ID, PCP Introduce MLXSW_AFK_ELEMENT_VID, PCP and declare them in afk_element infos that contain them. Use the elements when VLAD ID or priority are used in the flow. Also add MLXSW_AFK_ELEMENT_VID, PCP to mlxsw_sp_acl_tcam_pattern_ipv4. Both items are included in mlxsw_sp_afk_element_info_l2_dmac, resp. _smac, and both MLXSW_AFK_ELEMENT_SMAC and _DMAC are already in the pattern. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/core_acl_flex_keys.h | 6 +++++- .../mellanox/mlxsw/spectrum_acl_flex_keys.h | 6 ++++++ .../ethernet/mellanox/mlxsw/spectrum_acl_tcam.c | 2 ++ .../net/ethernet/mellanox/mlxsw/spectrum_flower.c | 24 +++++++++++++++++++++- 4 files changed, 36 insertions(+), 2 deletions(-) commit a150201a70da3bcbe76c85c255c6ab2d342c3278 Author: Petr Machata Date: Thu Mar 9 09:25:19 2017 +0100 mlxsw: spectrum: Add support for vlan modify TC action Add VLAN action offloading. Invoke it from Spectrum flower handler for "vlan modify" actions. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../mellanox/mlxsw/core_acl_flex_actions.c | 83 ++++++++++++++++++++++ .../mellanox/mlxsw/core_acl_flex_actions.h | 2 + drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3 + drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 29 ++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_flower.c | 10 +++ include/net/tc_act/tc_vlan.h | 5 ++ 6 files changed, 132 insertions(+) commit a30aad50c26cac63026e5dfcc2e055ae63fe6ef7 Author: Alexey Kodanev Date: Thu Mar 9 13:53:55 2017 +0300 tcp: rename *_sequence_number() to *_seq_and_tsoff() The functions that are returning tcp sequence number also setup TS offset value, so rename them to better describe their purpose. No functional changes in this patch. Suggested-by: Eric Dumazet Signed-off-by: Alexey Kodanev Signed-off-by: David S. Miller include/net/secure_seq.h | 6 +++--- include/net/tcp.h | 2 +- net/core/secure_seq.c | 13 ++++++------- net/ipv4/tcp_input.c | 4 ++-- net/ipv4/tcp_ipv4.c | 22 +++++++++++----------- net/ipv6/tcp_ipv6.c | 22 +++++++++++----------- 6 files changed, 34 insertions(+), 35 deletions(-) commit 9efd3831d5ae3babb45a37ae7d6b18642a0745de Author: Sergey Shcherbakov Date: Thu Mar 9 02:58:14 2017 +0200 net: ks8851: Added support for half-duplex SPI In original driver was implemented support for half- and full-duplex modes, but it was not enabled. Instead of it ks8851_rx_1msg method always returns "true" that means "full-duplex" mode. This patch replaces hard-coded functionality with flexible solution that supports both SPI modes. Signed-off-by: Sergey Shcherbakov Signed-off-by: David S. Miller drivers/net/ethernet/micrel/ks8851.c | 41 ++++++++++-------------------------- 1 file changed, 11 insertions(+), 30 deletions(-) commit 825d2c509a04d94b208eeebc7295f04bb70a1929 Merge: 96d7552 dc9c4d0 Author: David S. Miller Date: Thu Mar 9 17:33:30 2017 -0800 Merge branch 'bonding-winter-cleanup' Mahesh Bandewar says: ==================== bonding: winter cleanup Few cleanup patches that I have accumulated over some time now. (a) First two patches are basically to move the work-queue initialization from every ndo_open / bond_open operation to once at the beginning while port creation. Work-queue initialization is an unnecessary operation for every 'ifup' operation. However we have some mode-specific work-queues and mode can change anytime after port creation. So the second patch is to ensure the correct work-handler is called based on the mode. (b) Third patch is simple and straightforward that removes hard-coded value that was added into the initial commit and replaces it with the default value configured. (c) The final patch in the series removes the unimplemented "port-moved" state from the LACP state machine. This state is defined but never set so removing from the state machine logic makes code little cleaner. (d) Reduce scope of some global variables to local. Note: None of these patches are making any functional changes. ==================== Signed-off-by: David S. Miller commit dc9c4d0fe023b508f1b41dbe2a3f3133f81b4d29 Author: Mahesh Bandewar Date: Wed Mar 8 10:56:02 2017 -0800 bonding: reduce scope of some global variables Many of the bond param variables are declared global while it's not really necessary for these variables to be global. So moving them to the location these are used. Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit ec891c8b8da2c3862a5f76ba72f6d140c418d812 Author: Mahesh Bandewar Date: Wed Mar 8 10:55:59 2017 -0800 bonding: remove "port-moved" state that was never implemented LACP state-machine defines "port-moved" state when the same ActorSystemID and Port are seen in a LACPDU received on different port. The state is never set since it's not implemented. However the state-machine attempts to clear that state occasionally. LACP state machine is already complicated and since this state is not implemented, removing it's checks makes the state-machine little simpler. Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/bonding/bond_3ad.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 8b426dc54cf4056984bab7dfa48c92ee79a46434 Author: Mahesh Bandewar Date: Wed Mar 8 10:55:56 2017 -0800 bonding: remove hardcoded value Eliminate hard-coded value and use the default that is set. Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 4493b81bea24269df898339dee638d7c5cb2b2df Author: Mahesh Bandewar Date: Wed Mar 8 10:55:54 2017 -0800 bonding: initialize work-queues during creation of bond Initializing work-queues every time ifup operation performed is unnecessary and can be performed only once when the port is created. Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d5e73f7be850323ae3adbbe84ed37a38b0c31476 Author: Mahesh Bandewar Date: Wed Mar 8 10:55:51 2017 -0800 bonding: restructure arp-monitor In preparation to move the work-queue initialization to port creation from current port_open phase. Work-queue initialization does not make sense every time we do 'ifup/ifdown'. So moving to port creation phase. Arp monitoring work depends on the bonding mode and that is not tied to the port creation and can change anytime during the life after port creation. So this restructuring allows us to move the initialization at creation without losing the ability to arm the correct work for the mode user has selected. Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 96d7552e99393fdffddfc589e697c62a5fd98640 Merge: 581319c 5692dbb Author: David S. Miller Date: Thu Mar 9 16:40:00 2017 -0800 Merge branch 'nfp-crc32-rss-hash-port-name-reporting-and-misc-fastpath-cleanups' Jakub Kicinski says: ==================== nfp: CRC32 RSS hash, port name reporting and misc fastpath cleanups This series adds support for CRC32 RSS hash function to kernel API of which NFP driver immediately makes use. There is also a .ndo_get_phys_port_name() implementation conforming to switchdev name format. Small patch takes advantage of napi_complete_done()'s return code. Simon provides a fix for potentially trusting values returned from FW too much. A handful of unassuming fast path adjustments is also thrown in to make the upcoming xdp_adjust_head() series easier to review. ==================== Signed-off-by: David S. Miller commit 5692dbb56e6012c0755614ee64fe4c221f357e7a Author: Simon Horman Date: Wed Mar 8 08:57:08 2017 -0800 nfp: prevent theoretical buffer overrun in nfp_eth_read_ports Prevent theoretical buffer overrun by returning an error if the number of entries returned by the firmware does not match those present. Also use a common handling error path. Found by inspection. Signed-off-by: Simon Horman Tested-by: Jakub Kicinski Signed-off-by: David S. Miller .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 34 +++++++++++++--------- 1 file changed, 20 insertions(+), 14 deletions(-) commit b9dcf88a47ebab2743a0c627a95126c4cb3e9883 Author: Jakub Kicinski Date: Wed Mar 8 08:57:07 2017 -0800 nfp: add metadata format bit We only need FW version in the first cache line of adapter struct because we need to know the metadata format. To save space add a metadata format bit. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 2 ++ drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 7de5f115e1fd8a6df7aa89078cb70700e725173d Author: Jakub Kicinski Date: Wed Mar 8 08:57:06 2017 -0800 nfp: avoid rearming the interrupts when in busy poll Make use of return code from napi_complete_done() to avoid rearming interrupts when busy polling is on. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit fa43d2a895e61defdd32f6ed825740bd2f08106c Author: Jakub Kicinski Date: Wed Mar 8 08:57:05 2017 -0800 nfp: store device pointer for the fastpath We really only need the device pointer on the fast path, stash it at the beginning of the adapter structure and move pci_dev pointer down. This saves up a few lines of code. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 6 ++- .../net/ethernet/netronome/nfp/nfp_net_common.c | 51 ++++++++++------------ drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 5 +-- .../net/ethernet/netronome/nfp/nfp_net_offload.c | 7 ++- 4 files changed, 31 insertions(+), 38 deletions(-) commit bef6b1b7a6ffaa9afc8776c5e09e4ea11ac1727e Author: Jakub Kicinski Date: Wed Mar 8 08:57:04 2017 -0800 nfp: reorder variables in nfp_net_tx() Reorder variables longest to shortest to comply with netdev coding style. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 43860c1211650ef4f2e03413cacb3420fdb69cde Author: Jakub Kicinski Date: Wed Mar 8 08:57:03 2017 -0800 nfp: move more ring debug info to debugfs We already print most of ring configuration including descriptors in debugfs, add the few missing pieces and remove debug prints. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 9 --------- drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c | 13 +++++++++---- 2 files changed, 9 insertions(+), 13 deletions(-) commit 47465aed3220c3b95646bd53d3a6fd11cbf1ebfe Author: Jakub Kicinski Date: Wed Mar 8 08:57:02 2017 -0800 nfp: implement .ndo_get_phys_port_name() NSP reports to us port labels. First id is the id of the physical port, the other one tells us which logical interface is it within a split port. Instead of printing them as string keep them in integer format. Compute which interfaces are part of port split. On netdev side use port labels and split information to provide a .ndo_get_phys_port_name() implementation. We follow the name format of mlxsw which is also suggested in "Port Netdev Naming" section of Documentation/networking/switchdev.txt. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 4 +++ .../net/ethernet/netronome/nfp/nfp_net_common.c | 22 +++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 2 ++ .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 31 +++++++++++++++++++--- .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.h | 15 +++++++++-- 5 files changed, 69 insertions(+), 5 deletions(-) commit 9ff304bfaf58c119ef8ba3e20326edeed9983aef Author: Jakub Kicinski Date: Wed Mar 8 08:57:01 2017 -0800 nfp: add support for reporting CRC32 hash function Some firmware images may reuse CRC32 hardware to compute RXHASH. Make sure we report the correct hash function. Note that we don't support changing functions at runtime. That would also require a few more additions to the way the key is set because different functions have different key sizes. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 3 ++ .../net/ethernet/netronome/nfp/nfp_net_common.c | 46 ++++++++++++++++++++-- drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 14 ++++++- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 23 +++++++---- 4 files changed, 75 insertions(+), 11 deletions(-) commit abb521e36b9286c262971974ebaeda2d67dadd86 Author: Jakub Kicinski Date: Wed Mar 8 08:57:00 2017 -0800 ethtool: add CRC32 as an RSS hash function CRC32 engines are usually easily available in hardware and generate OK spread for RSS hash. Add CRC32 RSS hash function to ethtool API. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller include/linux/ethtool.h | 2 ++ net/core/ethtool.c | 1 + 2 files changed, 3 insertions(+) commit 581319c58600b54612c417aff32ae9bbd79f4cdb Author: Paolo Abeni Date: Thu Mar 9 13:54:08 2017 +0100 net/socket: use per af lockdep classes for sk queues Currently the sock queue's spin locks get their lockdep classes by the default init_spin_lock() initializer: all socket families get - usually, see below - a single class for rx, another specific class for tx, etc. This can lead to false positive lockdep splat, as reported by Andrey. Moreover there are two separate initialization points for the sock queues, one in sk_clone_lock() and one in sock_init_data(), so that e.g. the rx queue lock can get one of two possible, different classes, depending on the socket being cloned or not. This change tries to address the above, setting explicitly a per address family lockdep class for each queue's spinlock. Also, move the duplicated initialization code to a single location. v1 -> v2: - renamed the init helper rfc -> v1: - no changes, tested with several different workload Suggested-by: Cong Wang Signed-off-by: Paolo Abeni Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/core/sock.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 78 insertions(+), 18 deletions(-) commit 688769f643bfce894f14dc7141bfc6c010f52750 Author: Bjorn Helgaas Date: Thu Mar 9 15:45:14 2017 -0600 PCI/MSI: Make pci_msi_shutdown() and pci_msix_shutdown() static pci_msi_shutdown() and pci_msix_shutdown() are used only in drivers/pci/msi.c, so make them static. Signed-off-by: Bjorn Helgaas drivers/pci/msi.c | 4 ++-- include/linux/pci.h | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) commit 65e0ace2c5cdd7aa898fea17d6e7bdc909394bf9 Author: Jie Deng Date: Wed Mar 8 14:06:18 2017 +0800 net: dwc-xlgmac: Initial driver for DesignWare Enterprise Ethernet Synopsys provides a new DesignWare Core Enterprise Ethernet MAC IP (DWC-XLGMAC) for Ethernet designs. It is compliant with the IEEE 802.3-2012 specifications, including IEEE 802.3ba and consortium specifications. This patch provides the initial 25G/40G/50G/100G Ethernet driver for Synopsys XLGMAC IP Prototyping Kit. Signed-off-by: Jie Deng Signed-off-by: David S. Miller MAINTAINERS | 6 + drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/Makefile | 1 + drivers/net/ethernet/synopsys/Kconfig | 41 + drivers/net/ethernet/synopsys/Makefile | 9 + drivers/net/ethernet/synopsys/dwc-xlgmac-common.c | 736 +++++ drivers/net/ethernet/synopsys/dwc-xlgmac-desc.c | 648 +++++ drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c | 3146 +++++++++++++++++++++ drivers/net/ethernet/synopsys/dwc-xlgmac-net.c | 1334 +++++++++ drivers/net/ethernet/synopsys/dwc-xlgmac-pci.c | 80 + drivers/net/ethernet/synopsys/dwc-xlgmac-reg.h | 746 +++++ drivers/net/ethernet/synopsys/dwc-xlgmac.h | 651 +++++ 12 files changed, 7399 insertions(+) commit 7342a72cc40b4cf50013f8230a6b879e2ba5a73e Author: Chris Wilson Date: Thu Mar 9 14:20:49 2017 +0000 drm/i915: Ignore skl+ for debugfs/i915_sr_status There is no easily digestible single self-refresh status bit, so don't report one for debugfs/i915_sr_status on gen9+. For the moment this avoids a read of the non-existent WM1_LP_ILK register. Signed-off-by: Chris Wilson Cc: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170309142049.16033-1-chris@chris-wilson.co.uk Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/i915_debugfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 24d79ce0dc39390cce85ac954890931309a15b39 Merge: 35ae57e 70dbd9b Author: David S. Miller Date: Thu Mar 9 13:25:05 2017 -0800 Merge branch 'xgene-v2' Iyappan Subramanian says: ==================== drivers: net: xgene-v2: Add RGMII based 1G driver This patch set adds support for RGMII based 1GbE hardware which uses a linked list of DMA descriptor architecture (v2) for APM X-Gene SoCs. v4: Address review comments from v3 - fixed local variable declarations to reverse christmas tree order v3: Address review comments from v2 - fixed kbuild warnings (this 'if' clause does not guard) v2: Address review comments from v1 - moved create_desc_ring and delete_desc_ring to open() and close() respectively - changed to use dma_zalloc APIs - fixed tx_timeout() - removed tx completion polling upper bound - added error checking on rx packets - added netif_stop_queue() and netif_wake_queue() v1: - Initial version ==================== Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller commit 70dbd9b258d5a6a21d9a41ae798f5476dcdb086c Author: Iyappan Subramanian Date: Tue Mar 7 17:08:45 2017 -0800 MAINTAINERS: Add entry for APM X-Gene SoC Ethernet (v2) driver This patch adds a MAINTAINERS entry for the ethernet driver for the on-chip ethernet interface which uses a linked list of DMA descriptor architecture (v2) for APM X-Gene SoCs. Signed-off-by: Iyappan Subramanian Signed-off-by: Keyur Chudgar Signed-off-by: David S. Miller MAINTAINERS | 6 ++++++ drivers/net/ethernet/apm/xgene-v2/mac.c | 2 +- drivers/net/ethernet/apm/xgene-v2/main.c | 8 ++++---- 3 files changed, 11 insertions(+), 5 deletions(-) commit b105bcdaaa0efac4512d108495f1cc19abe7b7a4 Author: Iyappan Subramanian Date: Tue Mar 7 17:08:44 2017 -0800 drivers: net: xgene-v2: Add transmit and receive This patch adds, - Transmit - Transmit completion poll - Receive poll - NAPI handler and enables the driver. Signed-off-by: Iyappan Subramanian Signed-off-by: Keyur Chudgar Signed-off-by: David S. Miller drivers/net/ethernet/apm/Kconfig | 1 + drivers/net/ethernet/apm/Makefile | 1 + drivers/net/ethernet/apm/xgene-v2/Kconfig | 11 ++ drivers/net/ethernet/apm/xgene-v2/Makefile | 6 + drivers/net/ethernet/apm/xgene-v2/main.c | 248 ++++++++++++++++++++++++++++- drivers/net/ethernet/apm/xgene-v2/main.h | 1 + 6 files changed, 267 insertions(+), 1 deletion(-) commit 3b3f9a75d93186613bb5ee19484454928af469c3 Author: Iyappan Subramanian Date: Tue Mar 7 17:08:43 2017 -0800 drivers: net: xgene-v2: Add base driver This patch adds, - probe, remove, shutdown - open, close and stats - create and delete ring - request and delete irq Signed-off-by: Iyappan Subramanian Signed-off-by: Keyur Chudgar Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene-v2/main.c | 510 +++++++++++++++++++++++++++++++ 1 file changed, 510 insertions(+) commit 272d6dc1fcab6307c10bd411c614933bf10877e5 Author: Iyappan Subramanian Date: Tue Mar 7 17:08:42 2017 -0800 drivers: net: xgene-v2: Add ethernet hardware configuration This patch adds functions to configure ethernet hardware. Signed-off-by: Iyappan Subramanian Signed-off-by: Keyur Chudgar Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene-v2/enet.c | 71 ++++++++++++++++++++++++++++++++ drivers/net/ethernet/apm/xgene-v2/enet.h | 43 +++++++++++++++++++ 2 files changed, 114 insertions(+) commit 81ccd0cab29b682a0f5337fd2076a77aa8e4472e Author: Iyappan Subramanian Date: Tue Mar 7 17:08:41 2017 -0800 drivers: net: xgene-v2: Add mac configuration This patch adds functions to configure and control mac. This patch also adds helper functions to get/set registers. Signed-off-by: Iyappan Subramanian Signed-off-by: Keyur Chudgar Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene-v2/mac.c | 116 ++++++++++++++++++++++++++++++++ drivers/net/ethernet/apm/xgene-v2/mac.h | 110 ++++++++++++++++++++++++++++++ 2 files changed, 226 insertions(+) commit 384fe7a4d732c3812542142ce5bb353973b34638 Author: Iyappan Subramanian Date: Tue Mar 7 17:08:40 2017 -0800 drivers: net: xgene-v2: Add DMA descriptor This patch adds DMA descriptor setup and interrupt enable/disable functions. Signed-off-by: Iyappan Subramanian Signed-off-by: Keyur Chudgar Signed-off-by: David S. Miller drivers/net/ethernet/apm/xgene-v2/main.h | 74 +++++++++++++++++++ drivers/net/ethernet/apm/xgene-v2/ring.c | 81 +++++++++++++++++++++ drivers/net/ethernet/apm/xgene-v2/ring.h | 119 +++++++++++++++++++++++++++++++ 3 files changed, 274 insertions(+) commit 35ae57eae9135f891640f3076fd0a3c990632af0 Author: Rick Farrington Date: Tue Mar 7 11:40:41 2017 -0800 liquidio: add support for XPS Add support for XPS. Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas Signed-off-by: Derek Chickles Signed-off-by: Satanand Burla Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 64f48e593a54a8bee8bee4bf8391d5a4e9057d34 Author: Joao Pinto Date: Tue Mar 7 15:27:36 2017 +0000 net: stmicro: replace kzalloc with devm_kzalloc The axi variable was not being freed upon device removal. With devm_kzalloc it ensures that it is properly freed. Signed-off-by: Joao Pinto Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3c36e483b4806a6bf28db411f79ea9aad61ec78 Author: Tobias Klauser Date: Tue Mar 7 16:27:10 2017 +0100 net: mediatek: Use eth_hw_addr_random() Use eth_hw_addr_random() to set a random dev_addr and update addr_assign_type instead of open-coding it. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 038e893d78037b5876771f84722b459b3916bfaf Author: Florian Fainelli Date: Mon Mar 6 12:56:02 2017 -0800 tg3: Add the ability to conditionally build w/ HWMON Introduce a Kconfig option: CONFIG_TIGON3_HWMON which allows to build in/out support for thermal sensors reported by Tigon3 NICs. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/Kconfig | 8 +++++++- drivers/net/ethernet/broadcom/tg3.c | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) commit fda78d7a0ead144f4b2cdb582dcba47911f4952c Author: Prarit Bhargava Date: Thu Jan 26 14:07:47 2017 -0500 PCI/MSI: Stop disabling MSI/MSI-X in pci_device_shutdown() The pci_bus_type .shutdown method, pci_device_shutdown(), is called from device_shutdown() in the kernel restart and shutdown paths. Previously, pci_device_shutdown() called pci_msi_shutdown() and pci_msix_shutdown(). This disables MSI and MSI-X, which causes the device to fall back to raising interrupts via INTx. But the driver is still bound to the device, it doesn't know about this change, and it likely doesn't have an INTx handler, so these INTx interrupts cause "nobody cared" warnings like this: irq 16: nobody cared (try booting with the "irqpoll" option) CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.2-1.el7_UNSUPPORTED.x86_64 #1 Hardware name: Hewlett-Packard HP Z820 Workstation/158B, BIOS J63 v03.90 06/ ... The MSI disabling code was added by d52877c7b1af ("pci/irq: let pci_device_shutdown to call pci_msi_shutdown v2") because a driver left MSI enabled and kdump failed because the kexeced kernel wasn't prepared to receive the MSI interrupts. Subsequent commits 1851617cd2da ("PCI/MSI: Disable MSI at enumeration even if kernel doesn't support MSI") and e80e7edc55ba ("PCI/MSI: Initialize MSI capability for all architectures") changed the kexeced kernel to disable all MSIs itself so it no longer depends on the crashed kernel to clean up after itself. Stop disabling MSI/MSI-X in pci_device_shutdown(). This resolves the "nobody cared" unhandled IRQ issue above. It also allows PCI serial devices, which may rely on the MSI interrupts, to continue outputting messages during reboot/shutdown. [bhelgaas: changelog, drop pci_msi_shutdown() and pci_msix_shutdown() calls altogether] Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=187351 Signed-off-by: Prarit Bhargava Signed-off-by: Bjorn Helgaas CC: Alex Williamson CC: David Arcari CC: Myron Stowe CC: Lukas Wunner CC: Keith Busch CC: Mika Westerberg drivers/pci/pci-driver.c | 2 -- 1 file changed, 2 deletions(-) commit 0b660259e927177dc0c6eb3b1c39f23c6a011c5f Author: Rafał Miłecki Date: Wed Mar 8 07:41:05 2017 +0100 ARM: dts: BCM5301X: Don't use nonexistent "default-off" LED trigger Such a trigger doesn't exist in Linux and is not needed as LED is being turned off by default. This could cause errors in LEDs core code when trying to set default trigger. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts | 5 ----- arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts | 2 -- arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts | 5 ----- arch/arm/boot/dts/bcm4708-netgear-r6250.dts | 3 --- arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts | 3 --- arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 10 ---------- arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 2 -- arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 4 ---- arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts | 2 -- arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts | 8 -------- arch/arm/boot/dts/bcm4709-netgear-r7000.dts | 7 ------- arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 9 --------- arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts | 8 -------- arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 6 ------ arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts | 8 -------- arch/arm/boot/dts/bcm47094-netgear-r8500.dts | 6 ------ 16 files changed, 88 deletions(-) commit 820a3e952b266d4355e89ed91c9b11945030321e Author: Rafał Miłecki Date: Wed Mar 8 07:41:04 2017 +0100 ARM: dts: BCM53573: Don't use nonexistent "default-off" LED trigger Such a trigger doesn't exist in Linux and is not needed as LED is being turned off by default. This could cause errors in LEDs core code when trying to set default trigger. Signed-off-by: Rafał Miłecki Acked-by: Pavel Machek Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm47189-tenda-ac9.dts | 4 ---- 1 file changed, 4 deletions(-) commit 4da14d5922e99dbbd609a85b18f84c32d1c27a57 Author: Michael Sartain Date: Thu Mar 9 09:58:06 2017 -0700 staging: greybus: firmware: Convert sscanf calls to strtoul Also convert the fw_update_type and fw_timeout variables to unsigned and update the printf specifier to %u. The FW_MGMT_IOC_SET_TIMEOUT_MS ioctl takes an unsigned int and checkpatch was complaining about not checking the sscanf return values. Signed-off-by: Michael Sartain Acked-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/firmware/firmware.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit afb5fdfc12acfda45b1486abdbb595bcb6d57cc0 Author: Michael Sartain Date: Thu Mar 9 09:58:05 2017 -0700 staging: greybus: firmware: Change long long unsigned to unsigned long long Fixes checkpatch warning: type 'long long unsigned int' should be specified in [[un]signed] [short|int|long|long long] order Signed-off-by: Michael Sartain Acked-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/firmware/authenticate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5099c4c4a6edca35a50d27016091f37002e86d4a Author: Michael Sartain Date: Thu Mar 9 09:58:04 2017 -0700 staging: greybus: firmware: Remove extra braces from single line if Fixes checkpatch warning: braces {} are not necessary for any arm of this statement Signed-off-by: Michael Sartain Acked-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/firmware/firmware.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 0c3801875c526b16fcd4719cd728e45ed092f9dd Author: Michael Sartain Date: Thu Mar 9 09:58:03 2017 -0700 staging: greybus: firmware: Remove trailing semicolon from FW_TIMEOUT_DEFAULT Fixes checkpatch warning: macros should not use a trailing semicolon Signed-off-by: Michael Sartain Acked-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/firmware/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 001943e8ea3c8db6805d333b0ac6767a700f6120 Author: Narcisa Ana Maria Vasile Date: Sat Mar 4 22:02:42 2017 +0200 staging: vc04_services: Refactor conditionals Refactor conditionals to reduce one level of indentation and improve code readability. Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_core.c | 222 ++++++++++----------- 1 file changed, 109 insertions(+), 113 deletions(-) commit 418314821b26b6e002b29cbb415ef91681c4350b Author: Narcisa Ana Maria Vasile Date: Sat Mar 4 22:02:31 2017 +0200 staging: vc04_services: Remove error message on kmalloc() failure Remove 'Out of memory' message because kmalloc already prints a message in case of error. Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 3 --- 1 file changed, 3 deletions(-) commit 9c13e8d0c29303d86321c1f3042bf6e46e98fced Merge: 3f2aa56 fc5e155 Author: David S. Miller Date: Thu Mar 9 10:12:14 2017 -0800 Merge branch 'mvpp2-add-initial-support-for-PPv2.2' Thomas Petazzoni says: ==================== net: mvpp2: add initial support for PPv2.2 The goal of this patch series is to add basic support for PPv2.2 in the existing mvpp2 driver. mvpp2 currently supported the PPv2.1 version of the IP, used in the 32 bits Marvell Armada 375 SoC. PPv2.2 is an evolution of this IP block, used in the 64 bits Marvell Armada 7K/8K SoCs. In order to ease the review, the introduction of PPv2.2 support has been made into multiple small commits, with the final commit adding the compatible string that makes the PPv2.2 support actually usable. The series remain fully bisectable. People interested in testing the code will find the full series (plus a few Device Tree patches) at: https://github.com/MISL-EBU-System-SW/mainline-public/tree/4.11/mvpp2.2-support-v3 I'd like to thank Stefan Chulski and Marcin Wojtas, who helped me a lot in the development of this patch series, by reviewing the patches, and giving lots of useful hints to debug the driver on PPv2.2. Thanks as well to Russell King for reviewing previous iterations of this series, and providing suggestions and fixes. Changes between v2 and v3: - Rebased on v4.11-rc1. - Add patch "net: mvpp2: fix DMA address calculation in mvpp2_txq_inc_put()", to properly take into account the "packet offset" field of the TX descriptors. Without this, we were getting DMA_API_DEBUG warnings that we are unmapping DMA mappings with a non-mapped DMA address. - In patch "net: mvpp2: add and use accessors for TX/RX descriptors", add a function named mvpp2_txdesc_offset_get(), which is needed for the DMA address calculation fix. - In patch "net: mvpp2: add and use accessors for TX/RX descriptors", fix the calculation of tx_desc physical address and packet offset in mvpp2_tx_frag_process(). The offset was assigned into the buffer physical address, and the physical address to the packet offset, which meant the fragment process was completely broken. - In patch "net: mvpp2: adjust the allocation/free of BM pools for PPv2.2" fix how MVPP22_BM_ADDR_HIGH_VIRT_RLS_MASK is used. This mask is already shifted. So the value should be shifted before being masked and not the opposite. - Add a new patch "net: mvpp2: set dma mask and coherent dma mask on PPv2.2", to set the DMA mask and DMA coherent mask. By setting the DMA mask to 40 bits we avoid using bounce buffers when network packets are above the 4 GB limit. The coherent mask remains set to 32 bits, because the BM pools must all have the same high 32 bits in their addresses. - Use "dma" instead of "phys" where appropriate, as suggested by Russell King. - Use the "cookie" field of the RX descriptor to store the physical address instead of the virtual address, and then use phys_to_virt() to get the virtual address. This allows to work around the limit that the "cookie" field only has 40 bits, which is not sufficient to store a virtual address on 64 bits platforms. This was suggested by Russell King. As part of this change, also got rid of all the compile time conditionals on CONFIG_ARCH_DMA_ADDR_T_64BIT, to get better compile-time coverage. - In patch "net: mvpp2: handle misc PPv2.1/PPv2.2 differences": * Instead of calling mvpp21_port_power_up(port) only on PPv2.1, remove this function, and call its relevant parts directly from ->probe(). Only mvpp2_port_fc_adv_enable() is PPv2.1 specific. Reported by Russell King. * Add a mvpp22_port_mii_set() function that properly initializes SGMII support on PPv2.2. Code provided by Russell King. - In patch "net: mvpp2: handle register mapping and access for PPv2.2": * Adjust the code to match the change of the DT binding in terms of mapping the second register area on PPv2.2. * Rework the register accessors to remove the get_cpu()/put_cpu(), and instead use separate accessors for global registers vs. per-CPU registers. - Add a few new patches removing dead/unused/useless code: net: mvpp2: remove support for buffer header net: mvpp2: remove unused register definition MVPP2_TXQ_THRESH_REG net: mvpp2: remove mvpp2_txq_pend_desc_num_get() function - Fix a number of checkpatch warnings. Changes between v1 and v2: - Made a separate series from the set of patches doing preparation changes/fixes to the mvpp2 driver. - Rebased on top of v4.10-rc1. - Update Kconfig text of the mvpp2 driver to mention the support for Armada 7K and 8K (PPv2.2). ==================== Signed-off-by: David S. Miller commit fc5e1550e5c365ecd94497fe6d2f230a5e8a2a22 Author: Thomas Petazzoni Date: Tue Mar 7 16:53:20 2017 +0100 net: mvpp2: finally add the PPv2.2 compatible string Now that the mvpp2 driver has been modified to accommodate the support for PPv2.2, we can finally advertise this support by adding the appropriate compatible string. At the same time, we update the Kconfig description of the MVPP2 driver. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/Kconfig | 4 ++-- drivers/net/ethernet/marvell/mvpp2.c | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) commit 2067e0a13cfe0b1bdca7b91bc5e4f2740b07d478 Author: Thomas Petazzoni Date: Tue Mar 7 16:53:19 2017 +0100 net: mvpp2: set dma mask and coherent dma mask on PPv2.2 On PPv2.2, the streaming mappings can be anywhere in the first 40 bits of the physical address space. However, for the coherent mappings, we still need them to be in the first 32 bits of the address space, because all BM pools share a single register to store the high 32 bits of the BM pool address, which means all BM pools must be allocated in the same 4GB memory area. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit fceb55d41508c01ac05f1c9382d7efddcdf71409 Author: Thomas Petazzoni Date: Tue Mar 7 16:53:18 2017 +0100 net: mvpp2: add support for an additional clock needed for PPv2.2 The PPv2.2 variant of the network controller needs an additional clock, the "MG clock" in order for the IP block to operate properly. This commit adds support for this additional clock to the driver, reworking as needed the error handling path. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit 59b9a31ede18ef54dcac466052706bb47a394ab5 Author: Thomas Petazzoni Date: Tue Mar 7 16:53:17 2017 +0100 net: mvpp2: adapt rxq distribution to PPv2.2 In PPv2.1, we have a maximum of 8 RXQs per port, with a default of 4 RXQs per port, and we were assigning RXQs 0->3 to the first port, 4->7 to the second port, 8->11 to the third port, etc. In PPv2.2, we have a maximum of 32 RXQs per port, and we must allocate RXQs from the range of 32 RXQs available for each port. So port 0 must use RXQs in the range 0->31, port 1 in the range 32->63, etc. This commit adapts the mvpp2 to this difference between PPv2.1 and PPv2.2: - The constant definition MVPP2_MAX_RXQ is replaced by a new field 'max_port_rxqs' in 'struct mvpp2', which stores the maximum number of RXQs per port. This field is initialized during ->probe() depending on the IP version. - MVPP2_RXQ_TOTAL_NUM is removed, and instead we calculate the total number of RXQs by multiplying the number of ports by the maximum of RXQs per port. This was anyway used in only one place. - In mvpp2_port_probe(), the calculation of port->first_rxq is adjusted to cope with the different allocation strategy between PPv2.1 and PPv2.2. Due to this change, the 'next_first_rxq' argument of this function is no longer needed and is removed. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit a73fef100275d5228cad5041b3e55af859f30d1e Author: Thomas Petazzoni Date: Tue Mar 7 16:53:16 2017 +0100 net: mvpp2: rework RXQ interrupt group initialization for PPv2.2 This commit adjusts how the MVPP2_ISR_RXQ_GROUP_REG register is configured, since it changed between PPv2.1 and PPv2.2. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 46 ++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) commit 6763ce3127ed6f346fe60975deea12e290dca719 Author: Thomas Petazzoni Date: Tue Mar 7 16:53:15 2017 +0100 net: mvpp2: add AXI bridge initialization for PPv2.2 The PPv2.2 unit is connected to an AXI bus on Armada 7K/8K, so this commit adds the necessary initialization of the AXI bridge. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 85 ++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) commit 2697582144dd813b0e071ac18e4e59b4f53192de Author: Thomas Petazzoni Date: Tue Mar 7 16:53:14 2017 +0100 net: mvpp2: handle misc PPv2.1/PPv2.2 differences This commit handles a few miscellaneous differences between PPv2.1 and PPv2.2 in different areas, where code done for PPv2.1 doesn't apply for PPv2.2 or needs to be adjusted (getting the MAC address, disabling PHY polling, etc.). Thanks to Russell King for providing the initial implementation of mvpp22_port_mii_set(). Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 85 ++++++++++++++++++++++++++++-------- 1 file changed, 67 insertions(+), 18 deletions(-) commit a786841df72e37d574b6135b05ebcdb903034224 Author: Thomas Petazzoni Date: Tue Mar 7 16:53:13 2017 +0100 net: mvpp2: handle register mapping and access for PPv2.2 This commit adjusts the mvpp2 driver register mapping and access logic to support PPv2.2, to handle a number of differences. Due to how the registers are laid out in memory, the Device Tree binding for the "reg" property is different: - On PPv2.1, we had a first area for the packet processor registers (common to all ports), and then one area per port. - On PPv2.2, we have a first area for the packet processor registers (common to all ports), and a second area for numerous other registers, including a large number of per-port registers In addition, on PPv2.2, the area for the common registers is split into so-called "address spaces" of 64 KB each. They allow to access per-CPU registers, where each CPU has its own copy of some registers. A few other registers, which have a single copy, also need to be accessed from those per-CPU windows if they are related to a per-CPU register. For example: - Writing to MVPP2_TXQ_NUM_REG selects a TX queue. This register is a per-CPU register, it must be accessed from the current CPU register window. - Then a write to MVPP2_TXQ_PENDING_REG, MVPP2_TXQ_DESC_ADDR_REG (and a few others) will affect the TX queue that was selected by the write to MVPP2_TXQ_NUM_REG. It must be accessed from the same CPU window as the write to the TXQ_NUM_REG. Therefore, the ->base member of 'struct mvpp2' is replaced with a ->cpu_base[] array, each entry pointing to a mapping of the per-CPU area. Since PPv2.1 doesn't have this concept of per-CPU windows, all entries in ->cpu_base[] point to the same io-remapped area. The existing mvpp2_read() and mvpp2_write() accessors use cpu_base[0], they are used for registers for which the CPU window doesn't matter. mvpp2_percpu_read() and mvpp2_percpu_write() are new accessors added to access the registers for which the CPU window does matter, which is why they take a "cpu" as argument. The driver is then changed to use mvpp2_percpu_read() and mvpp2_percpu_write() where it matters. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 257 +++++++++++++++++++++++++---------- 1 file changed, 188 insertions(+), 69 deletions(-) commit b02f31fbf92d01ad47a7ea1e071301134be2d332 Author: Thomas Petazzoni Date: Tue Mar 7 16:53:12 2017 +0100 net: mvpp2: adjust mvpp2_{rxq, txq}_init for PPv2.2 In PPv2.2, the MVPP2_RXQ_DESC_ADDR_REG and MVPP2_TXQ_DESC_ADDR_REG registers have a slightly different layout, because they need to contain a 64-bit address for the RX and TX descriptor arrays. This commit adjusts those functions accordingly. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 3d9017d9449bf8756f881970c970999c9148d306 Author: Thomas Petazzoni Date: Tue Mar 7 16:53:11 2017 +0100 net: mvpp2: adapt mvpp2_defaults_set() to PPv2.2 This commit modifies the mvpp2_defaults_set() function to not do the loopback and FIFO threshold initialization, which are not needed for PPv2.2. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 5eac892ac937a9edb490a8ad8755db874c63983e Author: Thomas Petazzoni Date: Tue Mar 7 16:53:10 2017 +0100 net: mvpp2: adapt the mvpp2_rxq_*_pool_set functions to PPv2.2 The MVPP2_RXQ_CONFIG_REG register has a slightly different layout between PPv2.1 and PPv2.2, so this commit adapts the functions modifying this register to accommodate for both the PPv2.1 and PPv2.2 cases. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit d01524d8abab00e3688c7435bcae4aeb461b51f7 Author: Thomas Petazzoni Date: Tue Mar 7 16:53:09 2017 +0100 net: mvpp2: adjust the allocation/free of BM pools for PPv2.2 This commit adjusts the allocation and freeing of BM pools to support PPv2.2. This involves: - Checking that the number of buffer pointers is a multiple of 16, as required by the hardware. - Adjusting the size of the DMA coherent area allocated for buffer pointers. Indeed, PPv2.2 needs space for 2 pointers of 64-bits per buffer, as opposed to 2 pointers of 32-bits per buffer in PPv2.1. The size in bytes is now stored in a new field of the mvpp2_bm_pool structure. - On PPv2.2, getting the DMA address and cookie (used for the physical address) of each buffer requires reading the MVPP22_BM_ADDR_HIGH_ALLOC to get the high order bits of those addresses. A new utility function mvpp2_bm_bufs_get_addrs() is introduced to handle this. - On PPv2.2, releasing a buffer requires writing the high order 32 bits of the DMA address and cookie to MVPP22_BM_PHY_VIRT_HIGH_RLS_REG. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 81 +++++++++++++++++++++++++++++++----- 1 file changed, 71 insertions(+), 10 deletions(-) commit e7c5359f2eedf2ad3b1b586552d3b6dfa44c2a79 Author: Thomas Petazzoni Date: Tue Mar 7 16:53:08 2017 +0100 net: mvpp2: introduce PPv2.2 HW descriptors and adapt accessors This commit adds the definition of the PPv2.2 HW descriptors, adjusts the mvpp2_tx_desc and mvpp2_rx_desc structures accordingly, and adapts the accessors to work on both PPv2.1 and PPv2.2. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 88 +++++++++++++++++++++++++++++++----- 1 file changed, 76 insertions(+), 12 deletions(-) commit 054f6372dc9c0a02a1b6491ef182f1edafa0b189 Author: Thomas Petazzoni Date: Tue Mar 7 16:53:07 2017 +0100 net: mvpp2: introduce an intermediate union for the TX/RX descriptors Since the format of the HW descriptors is different between PPv2.1 and PPv2.2, this commit introduces an intermediate union, with for now only the PPv2.1 descriptors. The bulk of the driver code only manipulates opaque mvpp2_tx_desc and mvpp2_rx_desc pointers, and the descriptors can only be accessed and modified through the accessor functions. A follow-up commit will add the descriptor definitions for PPv2.2. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 45 +++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 14 deletions(-) commit faca9247980238f297b04f6701cb0f0f3f18b40c Author: Thomas Petazzoni Date: Tue Mar 7 16:53:06 2017 +0100 net: mvpp2: add hw_version field in "struct mvpp2" In preparation to the introduction for the support of PPv2.2 in the mvpp2 driver, this commit adds a hw_version field to the struct mvpp2, and uses the .data field of the DT match table to fill it in. Having the MVPP21 and MVPP22 definitions available will allow to start adding the necessary conditional code to support PPv2.2. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit ac3dd277826979f50214894eb2781df4b85ab2a8 Author: Thomas Petazzoni Date: Tue Mar 7 16:53:05 2017 +0100 net: mvpp2: add and use accessors for TX/RX descriptors The PPv2.2 IP has a different TX and RX descriptor layout compared to PPv2.1. In order to prepare for the introduction of PPv2.2 support in mvpp2, this commit adds accessors for the different fields of the TX and RX descriptors, and changes the code to use them. For now, the mvpp2_port argument passed to the accessors is not used, but it will be used in follow-up to update the descriptor according to the version of the IP being used. Apart from the mechanical changes to use the newly introduced accessors, a few other changes, needed to use the accessors, are made: - The mvpp2_txq_inc_put() function now takes a mvpp2_port as first argument, as it is needed to use the accessors. - Similarly, the mvpp2_bm_cookie_build() gains a mvpp2_port first argument, for the same reason. - In mvpp2_rx_error(), instead of accessing the RX descriptor in each case of the switch, we introduce a local variable to store the packet size. - In mvpp2_tx_frag_process() and mvpp2_tx() instead of accessing the packet size from the TX descriptor, we use the actual value available in the function, which is used to set the TX descriptor packet size a few lines before. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 194 ++++++++++++++++++++++++++--------- 1 file changed, 145 insertions(+), 49 deletions(-) commit 4e4a105f1fde326a5d1b0fbcbba8254c54a673e4 Author: Thomas Petazzoni Date: Tue Mar 7 16:53:04 2017 +0100 net: mvpp2: store physical address of buffer in rx_desc->buf_cookie The RX descriptors of the PPv2 hardware allow to store several information, amongst which: - the DMA address of the buffer in which the data has been received - a "cookie" field, left to the use of the driver, and not used by the hardware In the current implementation, the "cookie" field is used to store the virtual address of the buffer, so that in the receive completion path, we can easily get the virtual address of the buffer that corresponds to a completed RX descriptors. On PPv2.1, used on 32-bit platforms, those two fields are 32-bit wide, which is enough to store a DMA address in the first field, and a virtual address in the second field. On PPv2.2, used on 64-bit platforms, these two fields have been extended to 40 bits. While 40 bits is enough to store a DMA address (as long as the DMA mask is 40 bits or lower), it is not enough to store a virtual address. Therefore, the "cookie" field can no longer be used to store the virtual address of the buffer. However, as Russell King pointed out, the RX buffers are always allocated in the kernel linear mapping, and therefore using phys_to_virt() on the physical address of the RX buffer is possible and correct. Therefore, this commit changes the driver to use the "cookie" field to store the physical address instead of the virtual address. phys_to_virt() is used in the receive completion path to retrieve the virtual address from the physical address. It is obviously important to realize that the DMA address and physical address are two different things, which is why we store both in the RX descriptors. While those addresses may be identical in some situations, it remains two distinct concepts, and both addresses should be handled separately. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 40 +++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 14 deletions(-) commit 4d6c2a677fe5a903ed6483865cc14ff00a2054b5 Author: Thomas Petazzoni Date: Tue Mar 7 16:53:03 2017 +0100 net: mvpp2: remove mvpp2_txq_pend_desc_num_get() function The mvpp2_txq_pend_desc_num_get() function only selects a TX queue, and reads the number of pending descriptors. It is used in only one place, in mvpp2_txq_clean(), where the TX queue has already been selected by a write to MVPP2_TXQ_NUM_REG. Therefore, this function is useless, and the caller can simply read the value of the MVPP2_TXQ_PENDING_REG register instead. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit df905f2e21b42a948b662d39de82039e02b88de3 Author: Thomas Petazzoni Date: Tue Mar 7 16:53:02 2017 +0100 net: mvpp2: remove unused register definition MVPP2_TXQ_THRESH_REG This register is no longer used since commit edc660fa09e2 ("net: mvpp2: replace TX coalescing interrupts with hrtimer"). Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 3 --- 1 file changed, 3 deletions(-) commit aeb3d1109afad0f4ebb5c9e27bbb67b755c5f47d Author: Thomas Petazzoni Date: Tue Mar 7 16:53:01 2017 +0100 net: mvpp2: remove support for buffer header The "buffer header" functionality is a functionality used by the hardware to split an incoming packets over multiple BM buffers if they are not large enough. However, the mvpp2 driver guarantees that a pool of BM buffers has buffers with a size large enough to store MTU-sized packets. Therefore, this functionality is completely unused, and the code can be removed, and we should never get a descriptor with bit MVPP2_RXD_BUF_HDR set. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 77 ------------------------------------ 1 file changed, 77 deletions(-) commit 20396136fbe563feac927151966a5931c1bac7a9 Author: Thomas Petazzoni Date: Tue Mar 7 16:53:00 2017 +0100 net: mvpp2: use "dma" instead of "phys" where appropriate As indicated by Russell King, the mvpp2 driver currently uses a lot "phys" or "phys_addr" to store what really is a DMA address. This commit clarifies this by using "dma" or "dma_addr" where appropriate. This is especially important as we are going to introduce more changes where the distinction between physical address and DMA address will be key. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 148 +++++++++++++++++------------------ 1 file changed, 74 insertions(+), 74 deletions(-) commit aee441193ee2609070418af5843bff55907c713c Author: Thomas Petazzoni Date: Tue Mar 7 16:52:59 2017 +0100 dt-bindings: net: update Marvell PPv2 binding for PPv2.2 support The Marvell PPv2 Device Tree binding was so far only used to describe the PPv2.1 network controller, used in the Marvell Armada 375. A new version of this IP block, PPv2.2 is used in the Marvell Armada 7K/8K processor. This commit extends the existing binding so that it can also be used to describe PPv2.2 hardware. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller .../devicetree/bindings/net/marvell-pp2.txt | 62 ++++++++++++++++++---- 1 file changed, 51 insertions(+), 11 deletions(-) commit 83e4e8d2c20c0fa4158c49d07a34ed87447160a9 Author: Arushi Singhal Date: Thu Mar 9 21:43:46 2017 +0530 staging: ks7010: removed code in comments. Commenting Code Is a Bad Idea. Comments are their to explain the code and how the code achieves its goal and as codes in the comments does not explain what the code is doing so there is no use of commenting them. So in this patch codes in the comments are removed. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 2 -- 1 file changed, 2 deletions(-) commit a2be06266b65c17df7ec5d1331670eb61b848993 Author: Varsha Rao Date: Thu Mar 9 19:49:01 2017 +0530 staging: comedi: Remove useless cast. Variable dac_data is already declared as of type u8. Again explicit type casting of dac_data to u8, is not required. Hence this patch removes it by using the following coccinelle script. @@ type T; T *ptr; T p; @@ ( - (T *)(&p) + &p | - (T *)ptr + ptr | - (T *)(ptr) + ptr | - (T)(p) + p ) Signed-off-by: Varsha Rao Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/s626.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d493859392000828804c0f1bfe500e3ce17d533f Author: Gargi Sharma Date: Wed Mar 8 22:36:22 2017 +0530 staging: vc04_services: Use ARRAY_SIZE macro Use ARRAY_SIZE to calculate the size of an array. The semantic patch used can be found here: https://github.com/coccinelle/coccinellery/blob/master/arraysize/array.cocci Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ecf2d4aa7abe3128bf3f49d7b21f269c8a937cf2 Author: Aapo Vienamo Date: Tue Mar 7 13:52:47 2017 +0200 staging: wlan-ng: add byte order annotation to struct p80211_caphdr Fixes the following sparse warnings around line 3514 in hfa384x_usb.c: warning: incorrect type in assignment (different base types) expected unsigned int [unsigned] [usertype] version got restricted __be32 [usertype] Signed-off-by: Aapo Vienamo Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211conv.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 8d2aa8bff9249f5d317b77d110bb0bb12700a330 Author: Stefan Wahren Date: Mon Mar 6 19:24:57 2017 +0000 staging: vchiq_utils: Don't include headers twice There is no need to include types.h and vmalloc.h twice. This issue has been found by make includecheck. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.h | 2 -- 1 file changed, 2 deletions(-) commit 6c849caf817da0c4e61003644043d55009114af8 Author: simran singhal Date: Sat Mar 4 22:16:55 2017 +0530 staging: vc04_services: Clean up tests if NULL returned on failure Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...); ... - e == NULL + !e Signed-off-by: simran singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e1c89dec89ac2b94faf2b1b39197086d0a6352d Author: Varsha Rao Date: Sat Mar 4 18:26:02 2017 +0530 staging: sm750fb: Removed unnecessary parentheses. Removed parentheses on the right hand side of assignment, as they are not required. The following coccinelle script was used to fix this issue: @@ local idexpression id; expression e; @@ id = -( e -) Signed-off-by: Varsha Rao Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_chip.c | 2 +- drivers/staging/sm750fb/ddk750_hwi2c.c | 2 +- drivers/staging/sm750fb/sm750_accel.c | 2 +- drivers/staging/sm750fb/sm750_cursor.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) commit 52e4f1d601daaee0bad6b22765befc21b180d701 Author: Dmitry Torokhov Date: Wed Mar 8 09:36:23 2017 -0800 Input: dm355evm_keys - switch to using managed resources Using devm_* APIs simpifies error handling and device teardown. Signed-off-by: Dmitry Torokhov drivers/input/misc/dm355evm_keys.c | 76 +++++++++++++------------------------- 1 file changed, 26 insertions(+), 50 deletions(-) commit fc2a6e5048c6812253590b8ae26eed3236b25eac Author: Dmitry Torokhov Date: Wed Mar 8 09:27:27 2017 -0800 Input: wistron_btns - remove use of sparse_keymap_free Now that sparse keymap uses managed memory, we no longer need to clean it up manually. Signed-off-by: Dmitry Torokhov drivers/input/misc/wistron_btns.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit a227954756de74d8e70d70135e405d69dea4e3fe Author: Dmitry Torokhov Date: Wed Mar 8 09:21:13 2017 -0800 Input: dm355evm_keys - remove use of sparse_keymap_free Now that sparse keymap uses managed memory, we no longer need to clean it up manually. Signed-off-by: Dmitry Torokhov drivers/input/misc/dm355evm_keys.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 7b179e251ba089898b4e8e6d065be8ae2c0a4a3e Merge: a01cd17 fabeb16 Author: Dmitry Torokhov Date: Thu Mar 9 10:03:22 2017 -0800 Merge branch 'ib/4.10-sparse-keymap-managed' into next This brings in version of sparse keymap code that uses managed memory. commit a01cd17000a4eb35060666f181f1d46832b59030 Author: Hans de Goede Date: Thu Mar 9 09:58:30 2017 -0800 Input: soc_button_array - use NULL for GPIO connection ID The gpiolib-acpi code is becoming more strict and connection-IDs may only be used with devices which have a _DSD with matching IDs in there. Since the soc_button_array ACPI binding is pure index based pass in NULL as connection-ID to avoid the more strict cheks resulting in gpiod_count and gpiod_get_index not returning any gpios. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov drivers/input/misc/soc_button_array.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b13a4ca8d2c44ca659d8df65f15c48c2e9b9316 Author: Hans de Goede Date: Thu Mar 9 09:55:49 2017 -0800 Input: axp20x-pek - do not register input device on some systems On some systems (Intel tablets with axp288 pmic) the powerbutton is also connected to a gpio pin of the SoC, advertised through the "INTCFD9" / "PNP0C40" acpi device. This leads to double reporting of powerbutton events, which is undesirable, so one driver needs to not report input events in this case. Since the soc_button_array driver for the "PNP0C40" acpi device also handles wake from suspend on these tablets and since the axp20x-pel driver requires relative expensive i2c accrsses, it is best for the axp20x-pek driver to not register an input device in this case. Note that this commit leaves the axp20x-driver bound to the device, rather then returning -ENODEV, this is done so that the sysfs attributes it offers are kept around. Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/misc/axp20x-pek.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit f2bd5a9ec5edc307e5f84dc9df14253898e19678 Author: Hans de Goede Date: Thu Mar 9 09:47:24 2017 -0800 Input: axp20x_pek - add axp20x_pek_probe_input_device helper Move all input device related initialization into a new axp20x_pek_probe_input_device helper function. This introduces one functional change, the input device is now registered before the sysfs attr get registered. This is not a problem as the sysfs attr are to configure some long press settings (forced poweroff) in the hardware and do not interact with the input_device. This is a preparation patch for not always registering the input dev. Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/misc/axp20x-pek.c | 47 +++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 18 deletions(-) commit 73915f369e6957c0d7ddca9f7435cc6f76d5320a Author: Hans de Goede Date: Thu Mar 9 09:47:01 2017 -0800 Input: axp20x-pek - use our own device for errors Before this commit axp20x-pek was mixing 2 style error reporting calls: dev_err(&pdev->dev, ...); dev_err(axp20x->dev, ...); But the second is our parent device, not our own device, so switch to using &pdev->dev everywhere. Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov drivers/input/misc/axp20x-pek.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bc682a50a0716f556cf6dfb209bd8d772c1d635c Author: Jingkui Wang Date: Thu Mar 9 09:46:17 2017 -0800 Input: drv260x - remove OF dependency As the driver is using generic device properties, it should work properly when CONFIG_OF is turned off. This patch removes the ifdef CONFIGOF and make sure the driver always have of_match_table. Signed-off-by: Jingkui Wang Signed-off-by: Dmitry Torokhov drivers/input/misc/drv260x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3f2aa566d4c991988d6acec98a0e1978e915f43b Merge: 3c66d1c 68b8df4 Author: David S. Miller Date: Thu Mar 9 09:54:48 2017 -0800 Merge branch 'mlx4-order-0-allocations-and-page-recycling' Eric Dumazet says: ==================== mlx4: order-0 allocations and page recycling As mentioned half a year ago, we better switch mlx4 driver to order-0 allocations and page recycling. This reduces vulnerability surface thanks to better skb->truesize tracking and provides better performance in most cases. (33 Gbit for one TCP flow on my lab hosts) I will provide for linux-4.13 a patch on top of this series, trying to improve data locality as described in https://www.spinics.net/lists/netdev/msg422258.html v2 provides an ethtool -S new counter (rx_alloc_pages) and code factorization, plus Tariq fix. v3 includes various fixes based on Tariq tests and feedback from Saeed and Tariq. v4 rebased on net-next for inclusion in linux-4.12, as requested by Tariq. Worth noting this patch series deletes ~250 lines of code ;) ==================== Signed-off-by: David S. Miller commit 68b8df464406e39925a54955294d5994df46bcf4 Author: Eric Dumazet Date: Wed Mar 8 08:17:18 2017 -0800 mlx4: remove duplicate code in mlx4_en_process_rx_cq() We should keep one way to build skbs, regardless of GRO being on or off. Note that I made sure to defer as much as possible the point we need to pull data from the frame, so that future prefetch() we might add are more effective. These skb attributes derive from the CQE or ring : ip_summed, csum hash vlan offload hwtstamps queue_mapping As a bonus, this patch removes mlx4 dependency on eth_get_headlen() which is very often broken enough to give us headaches. Signed-off-by: Eric Dumazet Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 209 ++++++----------------------- 1 file changed, 41 insertions(+), 168 deletions(-) commit 6969cf0fdbe9e67ed14cdf7ec95977abcf4a14af Author: Eric Dumazet Date: Wed Mar 8 08:17:17 2017 -0800 mlx4: make validate_loopback() more generic Testing a boolean in fast path is not worth duplicating the code allocating packets, when GRO is on or off. If this proves to be a problem, we might later use a jump label. Next patch will remove this duplicated code and ease code review. Signed-off-by: Eric Dumazet Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 23 ++++++++++------------- drivers/net/ethernet/mellanox/mlx4/en_selftest.c | 6 ------ 2 files changed, 10 insertions(+), 19 deletions(-) commit 02e6fd3e5598bace683e05ee783f134722cb21b4 Author: Eric Dumazet Date: Wed Mar 8 08:17:16 2017 -0800 mlx4: factorize page_address() calls We need to compute the frame virtual address at different points. Do it once. Following patch will use the new va address for validate_loopback() Signed-off-by: Eric Dumazet Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 9e8c0395a7e87a8f0eb008297df25ffdf3e0e5b3 Author: Eric Dumazet Date: Wed Mar 8 08:17:15 2017 -0800 mlx4: do not access rx_desc from mlx4_en_process_rx_cq() Instead of fetching dma address from rx_desc->data[0].addr, prefer using frags[0].dma + frags[0].page_offset to avoid a potential cache line miss. Signed-off-by: Eric Dumazet Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 7d7bfc6a3f69d2debe104656fadd8d568fda0e5b Author: Eric Dumazet Date: Wed Mar 8 08:17:14 2017 -0800 mlx4: add rx_alloc_pages counter in ethtool -S This new counter tracks number of pages that we allocated for one port. lpaa24:~# ethtool -S eth0 | egrep 'rx_alloc_pages|rx_packets' rx_packets: 306755183 rx_alloc_pages: 932897 Signed-off-by: Eric Dumazet Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 2 +- drivers/net/ethernet/mellanox/mlx4/en_port.c | 2 ++ drivers/net/ethernet/mellanox/mlx4/en_rx.c | 11 +++++++---- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 + drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) commit 34db548bfb9580f33d9a7faecafe4da61a4428a3 Author: Eric Dumazet Date: Wed Mar 8 08:17:13 2017 -0800 mlx4: add page recycling in receive path Same technique than some Intel drivers, for arches where PAGE_SIZE = 4096 In most cases, pages are reused because they were consumed before we could loop around the RX ring. This brings back performance, and is even better, a single TCP flow reaches 30Gbit on my hosts. v2: added full memset() in mlx4_en_free_frag(), as Tariq found it was needed if we switch to large MTU, as priv->log_rx_info can dynamically be changed. Signed-off-by: Eric Dumazet Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 258 +++++++++------------------ drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 - 2 files changed, 82 insertions(+), 177 deletions(-) commit b5a54d9a313645ec9607dc557b67d9325c28884c Author: Eric Dumazet Date: Wed Mar 8 08:17:12 2017 -0800 mlx4: use order-0 pages for RX Use of order-3 pages is problematic in some cases. This patch might add three kinds of regression : 1) a CPU performance regression, but we will add later page recycling and performance should be back. 2) TCP receiver could grow its receive window slightly slower, because skb->len/skb->truesize ratio will decrease. This is mostly ok, we prefer being conservative to not risk OOM, and eventually tune TCP better in the future. This is consistent with other drivers using 2048 per ethernet frame. 3) Because we allocate one page per RX slot, we consume more memory for the ring buffers. XDP already had this constraint anyway. Signed-off-by: Eric Dumazet Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 72 +++++++++++++--------------- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 5 -- 2 files changed, 33 insertions(+), 44 deletions(-) commit 60c7f5ae5416a8491216bcccf6b3b3d842d69fa4 Author: Eric Dumazet Date: Wed Mar 8 08:17:11 2017 -0800 mlx4: removal of frag_sizes[] We will soon use order-0 pages, and frag truesize will more precisely match real sizes. In the new model, we prefer to use <= 2048 bytes fragments, so that we can use page-recycle technique on PAGE_SIZE=4096 arches. We will still pack as much frames as possible on arches with big pages, like PowerPC. Signed-off-by: Eric Dumazet Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 24 ++++++++++-------------- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 8 -------- 2 files changed, 10 insertions(+), 22 deletions(-) commit acd7628de05c73118aab7ae4847a5b5b2c6999c9 Author: Eric Dumazet Date: Wed Mar 8 08:17:10 2017 -0800 mlx4: reduce rx ring page_cache size We only need to store the page and dma address. Signed-off-by: Eric Dumazet Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 17 ++++++++++------- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 2 -- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 6 +++++- 3 files changed, 15 insertions(+), 10 deletions(-) commit d85f6c14e967b0bddfa9712daa17d79e297d18b8 Author: Eric Dumazet Date: Wed Mar 8 08:17:09 2017 -0800 mlx4: rx_headroom is a per port attribute No need to duplicate it per RX queue / frags. Signed-off-by: Eric Dumazet Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 6 +++--- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit aaca121dd6cfedc9afb9d0ee23ded9d84e217e20 Author: Eric Dumazet Date: Wed Mar 8 08:17:08 2017 -0800 mlx4: get rid of frag_prefix_size Using per frag storage for frag_prefix_size is really silly. mlx4_en_complete_rx_desc() has all needed info already. Signed-off-by: Eric Dumazet Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 27 ++++++++++++--------------- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 3 +-- 2 files changed, 13 insertions(+), 17 deletions(-) commit 159ddfd2ca30a2361324111ef64fdedf43e7dc32 Author: Eric Dumazet Date: Wed Mar 8 08:17:07 2017 -0800 mlx4: remove order field from mlx4_en_frag_info This is really a port attribute, no need to duplicate it per RX queue and per frag. Signed-off-by: Eric Dumazet Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 6 +++--- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 69ba943151b2e40e201700cf5b3a94e433c6fd83 Author: Eric Dumazet Date: Wed Mar 8 08:17:06 2017 -0800 mlx4: dma_dir is a mlx4_en_priv attribute No need to duplicate it for all queues and frags. num_frags & log_rx_info become u8 to save space. u8 accesses are a bit faster than u16 anyway. Signed-off-by: Eric Dumazet Acked-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 16 ++++++++-------- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 2 +- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) commit e5619b1350946d7aabe8ed6b0210458a7057dd24 Author: simran singhal Date: Sat Mar 4 21:00:52 2017 +0530 staging: rts5208: 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: simran singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_transport.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c95d2e87fca1402e1a6a2a8577bf78abd401671f Author: Gargi Sharma Date: Tue Mar 7 23:50:27 2017 +0530 staging: gdm724x: Replace ternary operator with min macro Use macro min() to get the minimum of two values for brevity and readability. The macro MUX_TX_MAX_SIZE has a value of 2048 which is well within the integer limits. This check was done manually. 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: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_tty.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 55edcbb2db3a41c1520425b84c620286f4e5e394 Author: Tiberiu Breana Date: Wed Feb 15 14:00:26 2017 +0200 ARM: imx: Add AXI address filter support for MMDC profiling Add support for an extra config parameter for perf commands: axi_id, which will be written in the MMDC's MADPCR1 register, to filter memory usage profiling (see i.MX6 reference manual, chapter 44.7 MMDC Profiling for AXI id usage). Signed-off-by: Tiberiu Breana Acked-by: Frank Li Signed-off-by: Shawn Guo arch/arm/mach-imx/mmdc.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 9304b5b0d4fe8498d3d059db4bb8a7de253355a5 Author: Matthieu Simon Date: Sat Mar 4 23:38:47 2017 -0800 staging: rtl8192u: Fix sparse warnings in r8192U_dm.c Fix these warnings: drivers/staging//rtl8192u/r8192U_dm.c:2307:49: warning: cast from restricted __le16 drivers/staging//rtl8192u/r8192U_dm.c:2308:44: warning: cast from restricted __le16 drivers/staging//rtl8192u/r8192U_dm.c:2309:44: warning: cast from restricted __le16 Signed-off-by: Matthieu Simon Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_dm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 36a803d8c0b518ff498fb543f29aa48429147d37 Author: Sebastian Haas Date: Sat Mar 4 23:06:33 2017 +0100 staging: rtl8188eu: fix typos in macros Rename macro definition and usage to represent correct spelling of DEFAULT: ODM_REG_RX_DEFUALT_A_11N => ODM_REG_RX_DEFAULT_A_11N ODM_REG_RX_DEFUALT_B_11N => ODM_REG_RX_DEFAULT_B_11N Signed-off-by: Sebastian Haas Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/odm_RTL8188E.c | 4 ++-- drivers/staging/rtl8188eu/include/odm_RegDefine11N.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit fae4ab6b4be4c40c6d5424eff2087444e7042c1b Author: Sebastian Haas Date: Sat Mar 4 23:06:17 2017 +0100 staging: rtl8188eu: fix typos in comments Fix typos reported by checkpatch.pl Signed-off-by: Sebastian Haas Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/Hal8188EPhyReg.h | 2 +- drivers/staging/rtl8188eu/include/odm_debug.h | 2 +- drivers/staging/rtl8188eu/include/pwrseq.h | 2 +- drivers/staging/rtl8188eu/include/rtl8188e_spec.h | 2 +- drivers/staging/rtl8188eu/include/rtw_cmd.h | 2 +- drivers/staging/rtl8188eu/include/rtw_mp_phy_regdef.h | 2 +- drivers/staging/rtl8188eu/include/rtw_recv.h | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) commit 3956c8ac3999e0a5e36bdf0586f811db5ef28594 Author: simran singhal Date: Sat Mar 4 22:16:53 2017 +0530 staging: rtl8192u: Clean up tests if NULL returned on failure Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...); ... - e == NULL + !e Signed-off-by: simran singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) commit 579616bac106282b1f0d4cf4026e54a1e1326a2f Author: Tiberiu Breana Date: Wed Feb 15 14:00:25 2017 +0200 ARM: imx: Fix mmdc_pmu_write_accesses event definition Fixed an error in the "write-accesses" event definition. Signed-off-by: Tiberiu Breana Acked-by: Frank Li Signed-off-by: Shawn Guo arch/arm/mach-imx/mmdc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c946c698bc0d8b66570180d046c57177545c0f6e Author: Elia Geretto Date: Tue Mar 7 18:33:45 2017 +0100 Staging: rtl8192u: clean up some white space issues This patch fixes two coding style errors, reported by the checkpatch script. Signed-off-by: Elia Geretto Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8ad835b9bc1ae473114348495d125526e7c2a262 Author: Georgiana Rodica Chelu Date: Wed Mar 8 00:19:11 2017 +0200 staging: rtl8192e: Indent the code Indent the code in order to follow the rules and to increase the readability of the code. Signed-off-by: Georgiana Rodica Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_wx.c | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 4db665e50ccc75ee64eb3ccdf53850956a83cbb6 Author: Gargi Sharma Date: Thu Mar 9 00:15:49 2017 +0530 staging: rtl8192e: Remove useless type conversion Some type conversions like casting a pointer/non-pointer to a pointer of same type, casting to the original type using addressof(&) operator, etc. are not needed. Therefore, remove them. Done using coccinelle: @@ type t; t *p; t a; @@ ( - (t)(a) + a | - (t *)(p) + p | - (t *)(&a) + &a ) Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 32 +++++++++++--------------- 1 file changed, 13 insertions(+), 19 deletions(-) commit 1f9f72f46aaa33f2935c6e31a5a91e75b4908ff6 Author: Tamara Diaconita Date: Thu Mar 2 20:43:10 2017 +0200 staging: cxd2099: Remove redundant code Removed redundant code marked with #if 0 to fix the following checkpath.pl issue: CHECK: if this code is redundant consider removing it. Signed-off-by: Tamara Diaconita Reviewed-by: Daniel Baluta Signed-off-by: Greg Kroah-Hartman drivers/staging/media/cxd2099/cxd2099.c | 74 +-------------------------------- 1 file changed, 1 insertion(+), 73 deletions(-) commit 783dd92b5ba5ec804c52861e62f1bfae8ddf4308 Author: Tamara Diaconita Date: Thu Mar 2 20:42:52 2017 +0200 staging: cxd2099: Change kzalloc parameter Changed the structure tag 'struct cxd' with the variable '*ci' to fix the following checkpath.pl issue: CHECK: Prefer kzalloc(sizeof(*ci)...) over kzalloc(sizeof(struct cxd)). Signed-off-by: Tamara Diaconita Signed-off-by: Greg Kroah-Hartman drivers/staging/media/cxd2099/cxd2099.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e5bb54b31f21e6d9d1d0be3a5b4a041ce041265 Author: Tamara Diaconita Date: Thu Mar 2 20:41:58 2017 +0200 staging: cxd2099: Remove multiple blank lines Removed multiple blank lines to fix the checkpath.pl issue: CHECK: Please don't use multiple blank lines. Signed-off-by: Tamara Diaconita Signed-off-by: Greg Kroah-Hartman drivers/staging/media/cxd2099/cxd2099.c | 5 ----- 1 file changed, 5 deletions(-) commit 03173b48f60ef839775657225a8cca3089fa03c2 Author: Tamara Diaconita Date: Thu Mar 2 20:41:26 2017 +0200 staging: cxd2099: Add spaces around arithmetical operators Added spaces around multiple arithmetical operators to fix the checkpatch.pl issue: CHECK: spaces preferred around that 'operator'. Signed-off-by: Tamara Diaconita Signed-off-by: Greg Kroah-Hartman drivers/staging/media/cxd2099/cxd2099.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 4dc529257d9dd6a2c930c794ed8077cdd6e843ce Author: Mark Rutland Date: Fri Jan 13 17:47:46 2017 +0000 arm64: sysreg: add Set/Way sys encodings Cache maintenance ops fall in the SYS instruction class, and KVM needs to handle them. So as to keep all SYS encodings in one place, this patch adds them to sysreg.h. The encodings were taken from ARM DDI 0487A.k_iss10775, Table C5-2. To make it clear that these are instructions rather than registers, and to allow us to change the way these are handled in future, a new sys_insn() alias for sys_reg() is added and used for these new definitions. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Suzuki K Poulose Cc: Will Deacon arch/arm64/include/asm/sysreg.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 14ae7518dd5553ddff7750895ee86539ff56c407 Author: Mark Rutland Date: Fri Jan 13 18:36:51 2017 +0000 arm64: sysreg: add register encodings used by KVM This patch adds sysreg definitions for registers which KVM needs the encodings for, which are not currently describe in . Subsequent patches will make use of these definitions. The encodings were taken from ARM DDI 0487A.k_iss10775, Table C5-6, but this is not an exhaustive addition. Additions are only made for registers used today by KVM. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Suzuki K Poulose Cc: Will Deacon arch/arm64/include/asm/sysreg.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 147a70ceda533f4b4c8fab17efa97efe11018f09 Author: Mark Rutland Date: Thu Mar 9 16:47:06 2017 +0000 arm64: sysreg: add physical timer registers This patch adds sysreg definitions for system registers used to control the architected physical timer. Subsequent patches will make use of these definitions. The encodings were taken from ARM DDI 0487A.k_iss10775, Table C5-6. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Suzuki K Poulose Cc: Will Deacon arch/arm64/include/asm/sysreg.h | 4 ++++ 1 file changed, 4 insertions(+) commit 6c9769cffab236f01bdceb6bed284b381731086e Author: Sreya Mittal Date: Sun Mar 5 17:42:28 2017 +0530 staging: vt6655: Remove unnecessary parentheses Fix the checkpatch warnings of kind: Unnecessary parentheses around priv->apTD1Rings[0] Remove the parentheses around variables being referenced. Signed-off-by: Sreya Mittal Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 8284d2057ea9882f85275a446eb42501e87d4f75 Author: Varsha Rao Date: Thu Mar 9 21:23:46 2017 +0530 staging: media: atomisp: Match alignment with open parenthesis. This patch matches alignment with open parenthesis, removes extra space before '||' operators and fixes the checkpatch issue. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/gc2235.c | 4 ++-- drivers/staging/media/atomisp/i2c/mt9m114.c | 4 ++-- drivers/staging/media/atomisp/i2c/ov2722.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit bf5d0300f1ac9399c3e3d900c5b767081d5f4af9 Author: Varsha Rao Date: Thu Mar 9 21:20:04 2017 +0530 staging: media: atomisp: Remove useless cast. Explicit type casting of variable, with same type as that of variable, is not required. The following coccinelle script is used to remove it. @@ type T; T *ptr; T p; @@ ( - (T *)(&p) + &p | - (T *)ptr + ptr | - (T *)(ptr) + ptr | - (T)(p) + p ) This patch also removes unnecessary parentheses. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/gc2235.c | 16 ++++++++-------- drivers/staging/media/atomisp/i2c/mt9m114.c | 4 ++-- drivers/staging/media/atomisp/i2c/ov2722.c | 6 +++--- .../atomisp2/css2400/runtime/isys/src/isys_dma_rmgr.c | 2 +- .../media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 8 ++++---- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-) commit f4fa03701d8ad94846f3577d46cd8cc782fe9d8a Author: Gargi Sharma Date: Wed Mar 8 00:02:05 2017 +0530 staging: lustre: Remove max_u64 function Removed the max_u64 function to find the maximum value of two unsigned 64 bit numbers to use the linux macro max instead. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/interval_tree.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 91800b05caeb22ab1623e64809937b1816e533ca Author: simran singhal Date: Sat Mar 4 21:00:51 2017 +0530 staging: lustre: lustre: 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: simran singhal Acked-by: Julia Lawall Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/range_lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ac539f96a35079fbc74a67f2cce2d47fec486e8 Author: simran singhal Date: Sat Mar 4 21:00:50 2017 +0530 staging: lustre: 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: simran singhal Acked-by: Julia Lawall Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lmv/lmv_obd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ac15649c1c9c674c595e084d7162027c7cf12338 Author: simran singhal Date: Sat Mar 4 21:00:49 2017 +0530 staging: nvec: 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: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/nvec/nvec_kbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c66de311168b679cb5d2c3d2f936f3e54730d8ae Author: simran singhal Date: Sat Mar 4 21:00:53 2017 +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: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_recv.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 4c3ff837e5fbb325a915b50e487dc91a6546b146 Author: Derek Robson Date: Thu Mar 2 18:27:01 2017 +1300 Staging: rtl8712: rtl871x_mp_ioctl.h - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 191 ++++++++++++++++------------- 1 file changed, 107 insertions(+), 84 deletions(-) commit 8c8a4186edb7b9e19542bf3c9db987d39bc1d037 Author: Alexander Kapshuk Date: Sat Mar 4 11:00:14 2017 +0200 staging/fbtft: Hush checkpatch.pl warning about unnecessary line continuations Use a single string literal as the fmt argument passed to dev_err() instead of multiple string literals split with an embedded backslash character. Signed-off-by: Alexander Kapshuk Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ssd1331.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 74ec0a0e373bfbf107f1eaba7eec8bbaf4e1d021 Author: Heiner Kallweit Date: Thu Mar 2 22:20:42 2017 +0100 staging: fbtft: fb_sh1106: use new helper helper fbtft_write_buf_dc Make use of new helper fbtft_write_buf_dc. Signed-off-by: Heiner Kallweit Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_sh1106.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit e70065fdc11d86fac671c9e4103d69ac099f46c9 Author: Heiner Kallweit Date: Thu Mar 2 22:19:00 2017 +0100 staging: fbtft: use helper fbtft_write_buf_dc in fbtft-bus.c Make use of new helper fbtft_write_buf_dc. Signed-off-by: Heiner Kallweit Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-bus.c | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) commit 60da70204ead415ce43f6865ae237cb073f3a5a0 Author: Heiner Kallweit Date: Thu Mar 2 22:12:46 2017 +0100 staging: fbtft: add helper fbtft_write_buf_dc Factor out setting DC GPIO and writing buffer content to helper fbtft_write_buf_dc. Signed-off-by: Heiner Kallweit Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-core.c | 15 +++++++++++++++ drivers/staging/fbtft/fbtft.h | 1 + 2 files changed, 16 insertions(+) commit 82472b86186194458c9549516e53becbc33e941d Author: Heiner Kallweit Date: Thu Mar 2 21:03:44 2017 +0100 staging: fbtft: fb_sh1106: use own implementation of write_register The default implementation of write_register keeps DC low for the first byte only. SH1106 requires DC to be low for all bytes of a multi-byte command. To deal with this limitation we currently use a separate call to write_reg for each single command byte what is not really efficient. Therefore override the default implementation of write_register with an own one which keeps DC low for all bytes. Signed-off-by: Heiner Kallweit Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_sh1106.c | 65 ++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 32 deletions(-) commit 18c6142168d061916f7020b80b2f746d4323b65d Author: Heiner Kallweit Date: Thu Mar 2 20:48:53 2017 +0100 staging: fbtft: improve a syslog message in fbtft_register_framebuffer There are drivers like fb_sh1106 which allocate a txbuf less than 1 KiB. In this case the message would include "0 KiB buffer memory" what doesn't make sense and in general I doubt that there is any benefit in informing the user about allocation of a very small buffer. Therefore omit this message part if the buffer has less than 1 KiB. Signed-off-by: Heiner Kallweit Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 425e586cf95b83b424bc949ea1c0c8bb2a2be608 Author: Samuel Thibault Date: Sat Mar 4 15:01:57 2017 +0100 speakup: add unicode variant of /dev/softsynth This adds /dev/softsynthu, along /dev/softsynth, which emits output in UTF-8 encoding, thus allowing to support 16bit characters. Most of the code is shared, only the read function has to behave differently in latin1 and in unicode mode. Since Linux only supports 16bit characters, we can just hardcode the UTF-8 encoding. Signed-off-by: Samuel Thibault Reviewed-by: Chris Brannon Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/speakup_soft.c | 93 +++++++++++++++++++++++++++++----- 1 file changed, 81 insertions(+), 12 deletions(-) commit 9831013cbdbd3d06430a1db01d8c32d50c7d1c04 Author: Samuel Thibault Date: Sat Mar 4 15:01:56 2017 +0100 speakup: convert screen reading to 16bit characters This adds 16bit character support to most of the screen reading by extending characters to u16 throughout the code. Non-latin1 characters are assumed to be alphabetic type for now. non-latin1 vt_notifier_call-provided characters are not ignored any more, and the 16bit character returned by get_char is not truncated any more. For simplicity, speak_char still only supports latin1 characters. Its direct mode however does support 16bit characters, so in practice this will not be a limitation, non-latin1 languages will be handled by the synthesizer. spelling words does not support direct mode yet, for simplicity for now it will ignore 16bit characters. For simplicity again, speakup messages are left in latin1 for now. Some coding style is fixed along the way. Signed-off-by: Samuel Thibault Reviewed-by: Okash Khawaja Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 146 ++++++++++++++++++++---------------- drivers/staging/speakup/speakup.h | 1 + drivers/staging/speakup/spk_types.h | 2 +- 3 files changed, 82 insertions(+), 67 deletions(-) commit 89fc2ae80bb1eeca1d967723c1918c0b156508a0 Author: Samuel Thibault Date: Sat Mar 4 15:01:55 2017 +0100 speakup: extend synth buffer to 16bit unicode characters This extends the synth buffer slots to 16bit, so as to hold 16bit unicode characters. synth_buffer_getc and synth_buffer_peek now return 16bit characters. Speech synthesizers which do not support characters beyond latin1 can use the synth_buffer_skip_nonlatin1() helper to skip the non-latin1 characters before getting or peeking. All synthesizers are made to use it for now. This makes synth_buffer_add take a 16bit character. For simplicity for now, synth_printf is left to using latin1 formats and strings. synth_putwc, synth_putwc_s, synth_putws and synth_putws_s helpers are however added to put 16bit characters and strings. Signed-off-by: Samuel Thibault Reviewed-by: Chris Brannon Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/buffers.c | 36 +++++++++++++++++++++----------- drivers/staging/speakup/speakup.h | 2 +- drivers/staging/speakup/speakup_acntpc.c | 1 + drivers/staging/speakup/speakup_apollo.c | 1 + drivers/staging/speakup/speakup_decext.c | 1 + drivers/staging/speakup/speakup_decpc.c | 1 + drivers/staging/speakup/speakup_dectlk.c | 1 + drivers/staging/speakup/speakup_dtlk.c | 1 + drivers/staging/speakup/speakup_keypc.c | 1 + drivers/staging/speakup/speakup_soft.c | 1 + drivers/staging/speakup/spk_priv.h | 9 ++++++-- drivers/staging/speakup/synth.c | 30 ++++++++++++++++++++++++++ 12 files changed, 70 insertions(+), 15 deletions(-) commit 0e9884fe63c68d7c9043410fd3ee009c1fc78985 Author: Mark Rutland Date: Thu Jan 19 17:57:43 2017 +0000 arm64: sysreg: subsume GICv3 sysreg definitions Unlike most sysreg defintiions, the GICv3 definitions don't have a SYS_ prefix, and they don't live in . Additionally, some definitions are duplicated elsewhere (e.g. in the KVM save/restore code). For consistency, and to make it possible to share a common definition for these sysregs, this patch moves the definitions to , adding a SYS_ prefix, and sorting the registers per their encoding. Existing users of the definitions are fixed up so that this change is not problematic. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Suzuki K Poulose Cc: Will Deacon arch/arm64/include/asm/arch_gicv3.h | 81 ++++++------------------------------- arch/arm64/include/asm/sysreg.h | 52 ++++++++++++++++++++++++ arch/arm64/kernel/head.S | 8 ++-- 3 files changed, 69 insertions(+), 72 deletions(-) commit c7a3c61fc60642b9b1462c6deb9fd531d30e333d Author: Mark Rutland Date: Fri Jan 20 16:25:51 2017 +0000 arm64: sysreg: add performance monitor registers This patch adds sysreg definitions for system registers which are part of the performance monitors extension. Subsequent patches will make use of these definitions. The set of registers is described in ARM DDI 0487A.k_iss10775, Table D5-9. The encodings were taken from Table C5-6 in the same document. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Suzuki K Poulose Cc: Will Deacon arch/arm64/include/asm/sysreg.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit d9801207cc633760f6f92cae5b64e3c0f65b7c64 Author: Mark Rutland Date: Fri Jan 13 16:55:01 2017 +0000 arm64: sysreg: add debug system registers This patch adds sysreg definitions for system registers in the debug and trace system register encoding space. Subsequent patches will make use of these definitions. The encodings were taken from ARM DDI 0487A.k_iss10775, Table C5-5. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Suzuki K Poulose Cc: Will Deacon arch/arm64/include/asm/sysreg.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 47863d41ecf84541ad1392515b68e327125c908c Author: Mark Rutland Date: Thu Jan 19 17:18:30 2017 +0000 arm64: sysreg: sort by encoding Out sysreg definitions are largely (but not entirely) in ascending order of op0:op1:CRn:CRm:op2. It would be preferable to enforce this sort, as this makes it easier to verify the set of encodings against documentation, and provides an obvious location for each addition in future, minimising conflicts. This patch enforces this order, by moving the few items that break it. There should be no functional change. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Suzuki K Poulose Cc: Will Deacon arch/arm64/include/asm/sysreg.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit a8f8b1d9b8701465f1309d551fba2ebda6760f49 Author: Daniel Vetter Date: Wed Mar 8 15:12:42 2017 +0100 drm: Extract drm_file.h I'm torn on whether drm_minor really should be here or somewhere else. Maybe with more clarity after untangling drmP.h more this is easier to decide, for now I've put a FIXME comment right next to it. Right now we need struct drm_minor for the inline drm_file type helpers, and so it does kinda make sense to have them here. Next patch will kerneldoc-ify the entire pile. Reviewed-by: Gustavo Padovan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-10-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_file.c | 5 +- include/drm/drmP.h | 127 +-------------------------------- include/drm/drm_file.h | 172 +++++++++++++++++++++++++++++++++++++++++++++ include/drm/drm_prime.h | 1 + 4 files changed, 178 insertions(+), 127 deletions(-) commit 721dacbbeb062b99adea9ab6046b6ec04a8ec5fc Author: Daniel Vetter Date: Wed Mar 8 15:12:41 2017 +0100 drm: Remove DRM_MINOR_CNT This was originally added by David Herrmann for range checks, but entirely unused. It confused me, so let's remove it. Cc: David Herrmann Reviewed-by: David Herrmann Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-9-daniel.vetter@ffwll.ch include/drm/drmP.h | 1 - 1 file changed, 1 deletion(-) commit 9acdac68bcdc8c186353e5575a872465e103de74 Author: Daniel Vetter Date: Wed Mar 8 15:12:40 2017 +0100 drm: rename drm_fops.c to drm_file.c It's not just file ops, but drm_file stuff in general. This is prep work to extracting a drm_file.h header in the next patch. Reviewed-by: Gustavo Padovan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-8-daniel.vetter@ffwll.ch Documentation/gpu/drm-internals.rst | 4 +- drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_file.c | 734 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/drm_fops.c | 737 ------------------------------------ drivers/gpu/drm/drm_internal.h | 2 +- include/drm/drmP.h | 2 +- 6 files changed, 739 insertions(+), 742 deletions(-) commit 66f8c10003966130b0b2812fcbdfa6389bccd577 Author: Daniel Vetter Date: Wed Mar 8 15:12:39 2017 +0100 drm/doc: document fallback behaviour for atomic events Worst case if the hw can't support completion signalling in a race-free way we want the event to be too late, not too early. Text adapted from a proposal from Laurent - the other side of how to make hw work correctly where it's possible is imo already sufficiently documented. v2: Review from Laurent. Cc: Laurent Pinchart Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-7-daniel.vetter@ffwll.ch include/drm/drm_crtc.h | 6 ++++++ 1 file changed, 6 insertions(+) commit b0b7d372dfa2ffb434b08bceec2c4d9427d1f64f Author: Daniel Vetter Date: Wed Mar 8 15:12:38 2017 +0100 drm: Remove drmP.h include from drm_kms_helper_common.c An easy one as a drive-by. Reviewed-by: Gustavo Padovan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-6-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_kms_helper_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 23ef59ef6dcc9b62bf077490a74df93b3bb0d530 Author: Daniel Vetter Date: Wed Mar 8 15:12:37 2017 +0100 drm: Extract drm_pci.h Just another step in finally making drmP.h obsolete. Reviewed-by: Gustavo Padovan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-5-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_pci.c | 7 +++++ include/drm/drmP.h | 43 +++----------------------- include/drm/drm_pci.h | 78 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 39 deletions(-) commit d891b9c78ac83a14d0b7c5bbd652572bcd58c823 Author: Daniel Vetter Date: Wed Mar 8 15:12:36 2017 +0100 drm: Move drm_lock_data out of drmP.h And remove the semi-kernel-doc stuff, to make sure no one uses this. Reviewed-by: Gustavo Padovan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-4-daniel.vetter@ffwll.ch include/drm/drmP.h | 15 --------------- include/drm/drm_auth.h | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 15 deletions(-) commit c6bb9baa03b1ed413ebd449d9d7f9389fda1f309 Author: Daniel Vetter Date: Wed Mar 8 15:12:35 2017 +0100 drm: Extract drm_prime.h Plus a little bit more documentation. v2: Untangle the missing forward decls to make drm_prime|gem.h free-standing. Reviewed-by: Gustavo Padovan Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-3-daniel.vetter@ffwll.ch Documentation/gpu/drm-mm.rst | 3 ++ drivers/gpu/drm/drm_prime.c | 3 +- include/drm/drmP.h | 32 ++---------------- include/drm/drm_gem.h | 4 +++ include/drm/drm_prime.h | 79 +++++++++++++++++++++++++++++++++++++++++++ include/drm/drm_vma_manager.h | 1 - 6 files changed, 91 insertions(+), 31 deletions(-) commit aabbcab6db535a3342876cdaa5c941d569e72589 Author: Daniel Vetter Date: Wed Mar 8 15:12:34 2017 +0100 drm/doc: Add todo about connector_list_iter At least radeon, amdgpu and nouveau should be converted. We have patches for i915 already. v2: Spelling (Sean). Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-2-daniel.vetter@ffwll.ch Documentation/gpu/todo.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 967c9cca2cc50569efc65945325c173cecba83bd Author: Jens Wiklander Date: Wed Mar 11 14:39:39 2015 +0100 tee: generic TEE subsystem Initial patch for generic TEE subsystem. This subsystem provides: * Registration/un-registration of TEE drivers. * Shared memory between normal world and secure world. * Ioctl interface for interaction with user space. * Sysfs implementation_id of TEE driver A TEE (Trusted Execution Environment) driver is a driver that interfaces with a trusted OS running in some secure environment, for example, TrustZone on ARM cpus, or a separate secure co-processor etc. The TEE subsystem can serve a TEE driver for a Global Platform compliant TEE, but it's not limited to only Global Platform TEEs. This patch builds on other similar implementations trying to solve the same problem: * "optee_linuxdriver" by among others Jean-michel DELORME and Emmanuel MICHEL * "Generic TrustZone Driver" by Javier González Acked-by: Andreas Dannenberg Tested-by: Jerome Forissier (HiKey) Tested-by: Volodymyr Babchuk (RCAR H3) Tested-by: Scott Branden Reviewed-by: Javier González Signed-off-by: Jens Wiklander Documentation/ioctl/ioctl-number.txt | 1 + MAINTAINERS | 7 + drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/tee/Kconfig | 8 + drivers/tee/Makefile | 4 + drivers/tee/tee_core.c | 893 +++++++++++++++++++++++++++++++++++ drivers/tee/tee_private.h | 129 +++++ drivers/tee/tee_shm.c | 358 ++++++++++++++ drivers/tee/tee_shm_pool.c | 156 ++++++ include/linux/tee_drv.h | 277 +++++++++++ include/uapi/linux/tee.h | 346 ++++++++++++++ 12 files changed, 2182 insertions(+) commit 981b7ae9ad9b3a9ccb83a7be6cfc57a05f61185f Author: Gargi Sharma Date: Wed Mar 8 22:37:03 2017 +0530 staging: greybus: Remove unneeded header file module.h contains a call to moduleparam.h making the call to it redundant and useless. @ includesmodule @ @@ #include @ depends on includesmodule @ @@ - #include Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/gbphy.c | 1 - 1 file changed, 1 deletion(-) commit 285d02a18c5932a06e52d8f68809915469e8afa2 Author: Varsha Rao Date: Wed Mar 8 09:42:46 2017 +0530 staging: wilc1000: Remove useless cast. Variable ip_addr is already declared as pointer to u8. Again explicit type casting of ip_addr to u8, is not required. Hence this patch removes it by using the following coccinelle script. @@ type T; T *ptr,p; @@ ( - (T *)(&p) + &p | - (T *)ptr + ptr | - (T *)(ptr) + ptr | - (T)(p) + p ) Signed-off-by: Varsha Rao Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 069baa6a5e010060ce4fa37977555e6b8e9b21ba Author: Tahia Khan Date: Wed Mar 8 18:21:38 2017 -0500 staging: wilc1000: removes redundant 'continue' in while loop conditional blocks Removing 6 continue statements from a while loop. The continue statements are redundant here since control already returns to the beginning of the loop upon exit of any of the conditional blocks. Found using Coccinelle. Signed-off-by: Tahia Khan Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 7 ------- 1 file changed, 7 deletions(-) commit 28c828595516866ea16083e4aa8ec8b2ce77fcb8 Author: Tahia Khan Date: Tue Mar 7 19:26:44 2017 -0500 staging: wilc1000: Fixes camel-casing in wilc_gnrl_info_received Fixes checkpatch warning by renaming pu8Buffer to buffer and u32Length to length in wilc_gnrl_info_received. Signed-off-by: Tahia Khan Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/coreconfigurator.h | 3 +-- drivers/staging/wilc1000/host_interface.c | 11 +++++------ 2 files changed, 6 insertions(+), 8 deletions(-) commit bdb27e64e7aebbe31cbaefcf8c0379263195f7a7 Author: Tahia Khan Date: Tue Mar 7 19:26:41 2017 -0500 staging: wilc1000: Fixes camel-casing in wilc_network_info_received Fixes checkpatch warning by renaming pu8Buffer to buffer and u32Length to length in wilc_network_info_received. Signed-off-by: Tahia Khan Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/coreconfigurator.h | 3 +-- drivers/staging/wilc1000/host_interface.c | 11 +++++------ 2 files changed, 6 insertions(+), 8 deletions(-) commit dade3c62974f1d2c764f0c5f3b8a94cf9e372124 Author: Tahia Khan Date: Tue Mar 7 19:26:37 2017 -0500 staging: wilc1000: Fixes camel-casing in wilc_scan_complete_received Fixes checkpatch warning by renaming pu8Buffer to buffer and u32Length to length in wilc_scan_complete_received. Signed-off-by: Tahia Khan Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/coreconfigurator.h | 3 +-- drivers/staging/wilc1000/host_interface.c | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) commit 6847fc05884484a0beafac75ac3458534157d7ac Author: Georgios Emmanouil Date: Thu Mar 2 19:07:04 2017 +0200 Staging:wilc1000:wilc_spi: Added blank line after function and modified comment style Added blank line after function and modified comment style. Signed-off-by: Georgios Emmanouil Reviewed-by: Julian Calaby Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_spi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit e908ed0337299e359a016177d3495e1fd5c5a020 Author: Georgios Emmanouil Date: Thu Mar 2 19:06:19 2017 +0200 Staging:wilc1000:wilc_spi: Fixed spelling error Fixed spelling error. 'unkmown' to 'unknown'. Signed-off-by: Georgios Emmanouil Reviewed-by: Julian Calaby Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_spi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 086959e66e97fc9376e6941cde550cc60d45e05c Author: Georgios Emmanouil Date: Thu Mar 2 19:04:28 2017 +0200 Staging:wilc1000:wilc_spi: Fixed comment style to the preferred kernel comment style Fixed comment style to the preferred kernel comment style. Signed-off-by: Georgios Emmanouil Reviewed-by: Julian Calaby Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_spi.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit a2c9377424661cf27a4b5f8167a4b99e5c26909e Author: Georgios Emmanouil Date: Thu Mar 2 18:41:16 2017 +0200 Staging:wilc1000:wilc_sdio: Modified comment style to preferred kernel comment style Modified comment style to preferred kernel comment style. Signed-off-by: Georgios Emmanouil Reviewed-by: Julian Calaby Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_sdio.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 33a32243fcd6b4883b22ffdd812f534b011a63b7 Author: Georgios Emmanouil Date: Thu Mar 2 17:38:05 2017 +0200 Staging:wilc1000:host_interface: Integrated two 'if' statements to a single 'if' statement Removed unnecessary 'if' statement and integrated the condition to the previous 'if' statement. Signed-off-by: Georgios Emmanouil Reviewed-by: Julian Calaby Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 2631fffebf0817881e2d5e59a4be646ab262955a Author: Georgios Emmanouil Date: Thu Mar 2 17:35:05 2017 +0200 Staging:wilc1000:host_interface: Removed unnecessary blank line Removed unnecessary blank line. Signed-off-by: Georgios Emmanouil Reviewed-by: Julian Calaby Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 1 - 1 file changed, 1 deletion(-) commit ba100438e4bf942c249ddd11e964361fd761374b Author: Sreya Mittal Date: Wed Mar 8 01:42:16 2017 +0530 staging: vc04_services: bcm2835-audio: Align with parenthesis Fix the checkpatch issue: Alignment should match open parenthesis Signed-off-by: Sreya Mittal Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9862fe6dd4fc28793ad2fee363d0452c1506da7 Author: Tamara Diaconita Date: Tue Mar 7 18:38:59 2017 +0200 staging: speakup: kobjects: Delete comparison Comparison to NULL is not necessary because 'if' statement tests if 'synth' is NULL anyway. Delete comparison in 'if' structure to fix the checkpath.pl issue : CHECK: Comparison to NULL could be written 'synth'. Signed-off-by: Tamara Diaconita Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/kobjects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f7c59a8c75f16fd4e872792ec45e83e7ed9e03e Author: Tamara Diaconita Date: Tue Mar 7 18:38:40 2017 +0200 staging: speakup: kobjects: Rearrange headers Put a part from the headers of some functions in a new line to have less than 80 characters. Fixed the checkpath.pl issue: CHECK: line over 80 characters. Signed-off-by: Tamara Diaconita Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/kobjects.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c9219a55f0ab3db6f34c018cc935a43a70e8674e Author: Tamara Diaconita Date: Tue Mar 7 18:38:20 2017 +0200 staging: speakup: kobjects: Align the code Fixed the checkpath.pl issue: CHECK: Aligment should match open paranthesis. Added and deleted spaces and tabs to align the code. Signed-off-by: Tamara Diaconita Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/kobjects.c | 64 +++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 32 deletions(-) commit 51c3d03470a2f8ee9833e3f052d5b1518eeb2c48 Author: Tamara Diaconita Date: Tue Mar 7 18:38:01 2017 +0200 staging: speakup: kobjects: Delete blank line Delet the blank line after an open brace '{' to fix the checkpath.pl issue: CHECK: Blank lines aren't necessary after an open brace '{'. Signed-off-by: Tamara Diaconita Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/kobjects.c | 1 - 1 file changed, 1 deletion(-) commit b10ef8aae9656f9d4372d7f4b57b65262146bd87 Author: Tamara Diaconita Date: Tue Mar 7 18:37:41 2017 +0200 staging: speakup: kobjects: Delete space Added a space after multiple casts to fix the checkpath.pl issue: CHECK: No space is necessary after a cast. Signed-off-by: Tamara Diaconita Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/kobjects.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4be4c379299e47ca00768f67ae47515ac74af3bd Author: simran singhal Date: Sat Mar 4 22:16:54 2017 +0530 staging: speakup: Clean up tests if NULL returned on failure Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...); ... - e == NULL + !e Signed-off-by: simran singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1839f03706d6f0f196bb15b1f99c4a5fe76a829e Author: Tamara Diaconita Date: Sat Mar 4 00:07:01 2017 +0200 staging:speakup:i18n.c: Align open paranthesis Fixed the following checkpath.pl issue: CHECK: alignment should match open paranthesis. Deleted a tab and added spaces to align open paranthesis. Signed-off-by: Tamara Diaconita Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/i18n.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c7049eb500d8ca407124da74363a672c8fec603 Author: Tuomo Rinne Date: Thu Mar 2 21:58:30 2017 +0000 staging: speakup: Fixed coding style errors and aligned indents Fixed indentation to use tabs and aligned all the fields to same level. Signed-off-by: Tuomo Rinne Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/speakup_decpc.c | 90 ++++++++++++++++----------------- 1 file changed, 44 insertions(+), 46 deletions(-) commit ae8784fcdc9bd3137fe65d6247129a19cab520b5 Author: Joe Perches Date: Sat Mar 4 08:13:11 2017 -0800 staging: speakup: Add __printf format/arg verification, fix fallout Using __printf allows the compiler to verify formats and arguments. Use it and fix the single misuse found. Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 2 +- drivers/staging/speakup/spk_priv.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit d5dc063ca2b1201781f973a7d55b21d000c48641 Author: Arushi Singhal Date: Thu Mar 2 01:03:03 2017 +0530 staging: speakup:indentation should use tabs Indentation should always use tabs and never spaces. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/i18n.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a71c8e9b8efc30459d4dbae9dff90fba46f46c63 Author: Varsha Rao Date: Thu Mar 2 23:27:11 2017 +0530 staging: emxx_udc: Add comment for spinlock_t definition. Members of nbu2ss_udc structure can change device state, maintain completion state and control driver. Also provide access to read and write to register. Hence, exclusive access to nbu2ss_udc is required. The lock variable of type spinlock_t guarantees the exclusive access and protects it. In this patch, comment is added for spinlock_t definition, to fix the following checkpatch issue: CHECK: spinlock_t definition without comment Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/emxx_udc/emxx_udc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7e5500a5d5107732b48aec7011f2dbdbae60242 Author: Arushi Singhal Date: Wed Mar 1 22:15:15 2017 +0530 staging: xgifb: Improved coding style New variable is added to make the code more readable. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/XGI_main_26.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) commit feb254a7b5f9b4916c4cb9019ccc4fbfab7dc4f9 Author: Gargi Sharma Date: Thu Mar 2 11:16:14 2017 +0530 staging: rtl8192u: Constify ieee80211_qos_parameters structure Declare ieee80211_qos_parameters structure constant it is only passed as src parameter to the function memcpy. The fields of def_qos_parameters structure are never modified and hence it can be declared as const. Coccinelle Script: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct ieee80211_qos_parameters i@p ={...}; @ok1@ identifier r1.i; position p; expression e1,e2; @@ memcpy(e1,&i@p,e2) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct ieee80211_qos_parameters i={...}; Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08680307eb876e389e068ae75f6f6a84248e2263 Author: Ian Abbott Date: Wed Mar 8 18:02:05 2017 +0000 staging: comedi: ni_atmio: make device_ids const The `device_ids[]` passed to `MODULE_DEVICE_TABLE()` should be `const`. When the "ni_atmio" driver is built-in, gcc warns about `device_ids` being defined but ununsed. Make it `const`. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_atmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 144113b003cf9b26f1ed45ff06d867711f4133c6 Author: Ian Abbott Date: Wed Mar 8 18:02:04 2017 +0000 staging: comedi: allow it to be built-in There is no particular reason why comedi has to be built as kernel modules. Remove the `depends on m` from the Kconfig file to allow it to be built-in. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/Kconfig | 1 - 1 file changed, 1 deletion(-) commit d1d78d20800f8e1bd41518d45d5a3d604d9b1040 Author: Cheah Kok Cheong Date: Wed Mar 8 02:13:58 2017 +0800 Staging: comedi: comedi_fops: Change comedi_num_legacy_minors type Change to unsigned to allow removal of negative value check in init section. Use smaller data type since the max possible value currently is 48. Signed-off-by: Cheah Kok Cheong Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_fops.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 2d27ca88f21eaa1fbe1c94bf588ac5130ecaaea7 Author: Tobin C. Harding Date: Thu Mar 9 15:47:04 2017 +1100 staging: ks7010: fix spelling mistake Comment contains misspelled work 'Adress'. Correct spelling: Adress -> Address Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 745cab03e94c605de8b6966b770f6d520fa70107 Author: Tobin C. Harding Date: Thu Mar 9 15:47:02 2017 +1100 staging: ks7010: fix checkpatch CONSTANT_COMPARISON Checkpatch emits WARNING: Comparisons should place the constant on the right side of the test. Move comparison constant to the right side of the test. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c88ff5ae49a7f0e9eb2da2ddaba58475d45fbf31 Author: Tobin C. Harding Date: Thu Mar 9 15:47:01 2017 +1100 staging: ks7010: fix checkpatch whitespace warnings Checkpatch emits various warnings/errors pointing to misplaced spaces. - trailing whitespace - please, no spaces at the start of a line - please, no space before tabs - Unnecessary space before function pointer arguments - unnecessary whitespace before a quoted newline - code indent should use tabs where possible Remove all undesirable whitespace. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 2 -- drivers/staging/ks7010/ks_hostif.h | 50 +++++++++++++++++++------------------- 2 files changed, 25 insertions(+), 27 deletions(-) commit 3ad900479523921323de8b751bb231b40027f884 Author: Tamara Diaconita Date: Thu Mar 9 10:00:31 2017 +0200 staging: ks7010: eap_packet: Format comments to fit in line Split lines to have less than 80 characters. Fix the checkpatch.pl warning: WARNING: line over 80 characters. Signed-off-by: Tamara Diaconita Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/eap_packet.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit be04661703522d201590c4541248cb8c92d89f2e Author: Arushi Singhal Date: Wed Mar 1 16:27:54 2017 +0530 staging: ks7010: Unnecessary parentheses removed and improved coding style. Unnecessary parentheses are removed as reported by checkpatch.pl to make coder nicer and to improve readability. Also coding style is improved as it's often nicer to read if &(foo[0]) is converted to foo like: memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 23 +++++++++++------------ drivers/staging/ks7010/ks_wlan_net.c | 18 +++++++++--------- 2 files changed, 20 insertions(+), 21 deletions(-) commit 915e70f9263d56fbf103742265025f7a492aa625 Author: Michal Hocko Date: Wed Feb 22 13:01:21 2017 +0100 staging, android: remove lowmemory killer from the tree Lowmemory killer is sitting in the staging tree since 2008 without any serious interest for fixing issues brought up by the MM folks. The main objection is that the implementation is basically broken by design: - it hooks into slab shrinker API which is not suitable for this purpose. lowmem_count implementation just shows this nicely. There is no scaling based on the memory pressure and no feedback to the generic shrinker infrastructure. Moreover lowmem_scan is called way too often for the heavy work it performs. - it is not reclaim context aware - no NUMA and/or memcg awareness. As the code stands right now it just adds a maintenance overhead when core MM changes have to update lowmemorykiller.c as well. It also seems that the alternative LMK implementation will be solely in the userspace so this code has no perspective it seems. The staging tree is supposed to be for a code which needs to be put in shape before it can be merged which is not the case here obviously. Signed-off-by: Michal Hocko Signed-off-by: Greg Kroah-Hartman drivers/staging/android/Kconfig | 10 -- drivers/staging/android/Makefile | 1 - drivers/staging/android/lowmemorykiller.c | 212 ------------------------------ include/linux/sched.h | 4 - 4 files changed, 227 deletions(-) commit 12ab16597189993deb6a17827e137c0357ef0de6 Author: Michael Zoran Date: Tue Mar 7 19:23:36 2017 -0800 staging: vchiq_arm: Disable ability to dump memory by default vc04_services has an ioctl interface to dump arbitrary memory to a custom debug log. This is typically only needed by diagnostic tools, and can potentially be a security issue if the devtmpfs node doesn't have adequate permissions set. Since the ability to dump memory still has debugging value, create a new build configuration and disable the feature by default. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/Kconfig | 12 ++++++++++++ .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 14 ++++++++++++++ 2 files changed, 26 insertions(+) commit 5569a1260933ae105acdd50d70decfa868f7c3b5 Author: Michael Zoran Date: Tue Mar 7 19:23:35 2017 -0800 staging: vchiq_arm: Add compatibility wrappers for ioctls This patch adds compatibility wrappers for the ioctls exposed by vchiq/vc04_services. The compat ioctls are completely implemented on top of the native ioctls. No existing lines are modified. While the ideal approach would be to cleanup the existing code, this path is simplier and easier to review. While it does have a small runtime performance penality vs seperating the existing code into wrapper+worker functions, the penality is small since only the metadata is copied back onto the 32 bit user mode stack. The on top of approach is the approach used by several existing performance critical subsystems of Linux such as the DRM 3D graphics subsystem. Testing: 1. A 32 bit chroot was created on a RPI 3 and vchiq_test was built for armhf. The usual tests were run such as vchiq_test -f 10 and vchiq_test -p. 2. This patch was copied onto the shipping version of the Linux kernel used for the RPI and that kernel was built for arm64. That kernel was used to boot Raspbian. Many of the builtin features are now functional such as the "hello_pi" examples, and minecraft_pi. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 483 +++++++++++++++++++++ 1 file changed, 483 insertions(+) commit 4e6bafdfb9f394d2d7fdffcf9b489a0c747fda3b Author: Michael Zoran Date: Wed Mar 8 21:10:10 2017 -0800 staging: bcm2835_camera: Use a mapping table for context field of mmal_msg_header The camera driver passes messages back and forth between the firmware with requests and replies. One of the fields of the message header called context is a pointer so the size changes between 32 bit and 64 bit. The context field is used to pair reply messages from the firmware with request messages from the kernel. The simple solution would be to use the padding field for the upper 32 bits of pointers, but this would rely on the firmware always copying the pad field. So instead handles are generated that are 32 bit numbers and a mapping stored in a btree as implemented by the btree library in the kernel lib directory. The mapping pairs the handle with the pointer to the actual data. The btree library was chosen since it's very easy to use and red black trees would be overkill. The camera driver also now forces in the btree library if the camera is included in the build. The btree library is a hidden configuration option. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/bcm2835-camera/Kconfig | 1 + .../vc04_services/bcm2835-camera/mmal-msg.h | 2 +- .../vc04_services/bcm2835-camera/mmal-vchiq.c | 176 ++++++++++++++++++--- 3 files changed, 156 insertions(+), 23 deletions(-) commit 81b2cbdbf34f6696c2e2b657873c62489ef1f773 Author: Michael Zoran Date: Wed Mar 8 21:10:09 2017 -0800 staging: bcm2835_camera: Convert control_service field of mmal_msg_header to u32 The camera driver passes messages back and forth between the firmware with requests and replies. One of the fields of the message header called control_service is a pointer so the size changes between 32 bit and 64 bit. Luckly, the field is not interperated by the driver, so it can be changed to a u32 which has a fixed size. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-msg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9735b04d0c1b766255e5860c09928b4cd46c092a Author: Sagar Arun Kamble Date: Tue Mar 7 10:22:35 2017 +0530 drm/i915: Initialize pm_intr_keep during intel_irq_init for GuC Driver needs to ensure that it doesn't mask the PM interrupts, which are unmasked/needed by GuC firmware. For that, Driver maintains a bitmask of interrupts to be kept unmasked, pm_intr_keep. pm_intr_keep was determined across GuC load. GuC gets loaded in different scenarios and it is not going to change the pm_intr_keep so this patch moves its setup to intel_irq_init. This patch fixes incorrect RPS masking leading to UP interrupts triggered even when at cur_freq=max and inversly for Down interrupts. Cc: Radoslaw Szwichtenberg Cc: Arkadiusz Hiler Cc: Michal Wajdeczko Cc: Michal Winiarski Cc: Daniele Ceraolo Spurio Signed-off-by: Sagar Arun Kamble Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1488862355-9768-1-git-send-email-sagar.a.kamble@intel.com drivers/gpu/drm/i915/i915_irq.c | 24 ++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_reg.h | 3 ++- drivers/gpu/drm/i915/intel_guc_loader.c | 26 -------------------------- 3 files changed, 26 insertions(+), 27 deletions(-) commit d2c2a85cfe829f9d0736dba567edc86ba8524fb2 Author: Marcelo Cerri Date: Mon Feb 27 09:38:26 2017 -0300 crypto: ctr - Propagate NEED_FALLBACK bit When requesting a fallback algorithm, we should propagate the NEED_FALLBACK bit when search for the underlying algorithm. This will prevents drivers from allocating unnecessary fallbacks that are never called. For instance, currently the vmx-crypto driver will use the following chain of calls when calling the fallback implementation: p8_aes_ctr -> ctr(p8_aes) -> aes-generic However p8_aes will always delegate its calls to aes-generic. With this patch, p8_aes_ctr will be able to use ctr(aes-generic) directly as its fallback. The same applies to aes_s390. Signed-off-by: Marcelo Henrique Cerri Signed-off-by: Herbert Xu crypto/ctr.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit e6c2e65c70a6f606ea764f301e4024c85e0cd7a8 Author: Marcelo Cerri Date: Mon Feb 27 09:38:25 2017 -0300 crypto: cbc - Propagate NEED_FALLBACK bit When requesting a fallback algorithm, we should propagate the NEED_FALLBACK bit when search for the underlying algorithm. This will prevents drivers from allocating unnecessary fallbacks that are never called. For instance, currently the vmx-crypto driver will use the following chain of calls when calling the fallback implementation: p8_aes_cbc -> cbc(p8_aes) -> aes-generic However p8_aes will always delegate its calls to aes-generic. With this patch, p8_aes_cbc will be able to use cbc(aes-generic) directly as its fallback. The same applies to aes_s390. Signed-off-by: Marcelo Henrique Cerri Signed-off-by: Herbert Xu crypto/cbc.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit b13b1e0c6b171b4f6ad94dd99020708719983494 Author: Eric Biggers Date: Fri Feb 24 15:46:59 2017 -0800 crypto: testmgr - constify all test vectors Cryptographic test vectors should never be modified, so constify them to enforce this at both compile-time and run-time. This moves a significant amount of data from .data to .rodata when the crypto tests are enabled. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/testmgr.c | 71 ++++---- crypto/testmgr.h | 512 +++++++++++++++++++++++++++---------------------------- 2 files changed, 297 insertions(+), 286 deletions(-) commit 5527dfb6ddac2aac98c2939f27840cb47abd5693 Author: Eric Biggers Date: Fri Feb 24 15:46:58 2017 -0800 crypto: kpp - constify buffer passed to crypto_kpp_set_secret() Constify the buffer passed to crypto_kpp_set_secret() and kpp_alg.set_secret, since it is never modified. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/dh.c | 3 ++- crypto/ecdh.c | 3 ++- drivers/crypto/qat/qat_common/qat_asym_algs.c | 2 +- include/crypto/kpp.h | 6 +++--- 4 files changed, 8 insertions(+), 6 deletions(-) commit cd220ae6c7fbb0c80c3301e011e1baf4f352e497 Author: Colin Ian King Date: Wed Feb 22 23:51:38 2017 +0000 crypto: bcm - fix spelling mistake: "genereate" -> "generate" trivial fix to spelling mistake in pr_err message Signed-off-by: Colin Ian King Acked-by: Steve Lin Signed-off-by: Herbert Xu drivers/crypto/bcm/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09ae5d37e0935c8f0bcb63d80543347daa209e25 Author: Mahipal Challa Date: Wed Feb 15 10:45:10 2017 +0530 crypto: zip - Add Compression/Decompression statistics Add statistics for compression/decompression hardware offload under debugfs. Signed-off-by: Mahipal Challa Signed-off-by: Jan Glauber Signed-off-by: Herbert Xu drivers/crypto/cavium/zip/zip_deflate.c | 10 ++ drivers/crypto/cavium/zip/zip_inflate.c | 12 ++ drivers/crypto/cavium/zip/zip_main.c | 234 ++++++++++++++++++++++++++++++++ drivers/crypto/cavium/zip/zip_main.h | 15 ++ 4 files changed, 271 insertions(+) commit f05845fcba12579ad84f58386b60adbfc14397b2 Author: Mahipal Challa Date: Wed Feb 15 10:45:09 2017 +0530 crypto: zip - Wire-up Compression / decompression HW offload This contains changes for adding compression/decompression h/w offload functionality for both DEFLATE and LZS. Signed-off-by: Mahipal Challa Signed-off-by: Jan Glauber Signed-off-by: Herbert Xu drivers/crypto/cavium/zip/Makefile | 5 +- drivers/crypto/cavium/zip/zip_crypto.c | 313 ++++++++++++++++++++++++++++++++ drivers/crypto/cavium/zip/zip_crypto.h | 2 + drivers/crypto/cavium/zip/zip_deflate.c | 190 +++++++++++++++++++ drivers/crypto/cavium/zip/zip_deflate.h | 62 +++++++ drivers/crypto/cavium/zip/zip_device.c | 1 + drivers/crypto/cavium/zip/zip_inflate.c | 211 +++++++++++++++++++++ drivers/crypto/cavium/zip/zip_inflate.h | 62 +++++++ drivers/crypto/cavium/zip/zip_main.c | 57 ------ 9 files changed, 845 insertions(+), 58 deletions(-) commit 640035a2dc5534b49cd64580e41874b71f131a1c Author: Mahipal Challa Date: Wed Feb 15 10:45:08 2017 +0530 crypto: zip - Add ThunderX ZIP driver core Add a driver for the ZIP engine found on Cavium ThunderX SOCs. The ZIP engine supports hardware accelerated compression and decompression. It includes 2 independent ZIP cores and supports: - DEFLATE compression and decompression (RFC 1951) - LZS compression and decompression (RFC 2395 and ANSI X3.241-1994) - ADLER32 and CRC32 checksums for ZLIB (RFC 1950) and GZIP (RFC 1952) The ZIP engine is presented as a PCI device. It supports DMA and scatter-gather. Signed-off-by: Mahipal Challa Signed-off-by: Jan Glauber Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 7 + drivers/crypto/Makefile | 1 + drivers/crypto/cavium/Makefile | 4 + drivers/crypto/cavium/zip/Makefile | 8 + drivers/crypto/cavium/zip/common.h | 202 +++++ drivers/crypto/cavium/zip/zip_crypto.h | 77 ++ drivers/crypto/cavium/zip/zip_device.c | 201 +++++ drivers/crypto/cavium/zip/zip_device.h | 108 +++ drivers/crypto/cavium/zip/zip_main.c | 552 +++++++++++++ drivers/crypto/cavium/zip/zip_main.h | 106 +++ drivers/crypto/cavium/zip/zip_mem.c | 114 +++ drivers/crypto/cavium/zip/zip_mem.h | 78 ++ drivers/crypto/cavium/zip/zip_regs.h | 1347 ++++++++++++++++++++++++++++++++ 13 files changed, 2805 insertions(+) commit 27c539aeffe2851bf9aeeeba8a58038187a05019 Author: Ard Biesheuvel Date: Tue Feb 14 21:51:02 2017 +0000 crypto: algapi - annotate expected branch behavior in crypto_inc() To prevent unnecessary branching, mark the exit condition of the primary loop as likely(), given that a carry in a 32-bit counter occurs very rarely. On arm64, the resulting code is emitted by GCC as 9a8: cmp w1, #0x3 9ac: add x3, x0, w1, uxtw 9b0: b.ls 9e0 9b4: ldr w2, [x3,#-4]! 9b8: rev w2, w2 9bc: add w2, w2, #0x1 9c0: rev w4, w2 9c4: str w4, [x3] 9c8: cbz w2, 9d0 9cc: ret where the two remaining branch conditions (one for size < 4 and one for the carry) are statically predicted as non-taken, resulting in optimal execution in the vast majority of cases. Also, replace the open coded alignment test with IS_ALIGNED(). Cc: Jason A. Donenfeld Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/algapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b56f5cbc7e08ec7d31c42fc41e5247677f20b143 Author: Ard Biesheuvel Date: Tue Feb 14 21:51:01 2017 +0000 crypto: arm/aes-neonbs - resolve fallback cipher at runtime Currently, the bit sliced NEON AES code for ARM has a link time dependency on the scalar ARM asm implementation, which it uses as a fallback to perform CBC encryption and the encryption of the initial XTS tweak. The bit sliced NEON code is both fast and time invariant, which makes it a reasonable default on hardware that supports it. However, the ARM asm code it pulls in is not time invariant, and due to the way it is linked in, cannot be overridden by the new generic time invariant driver. In fact, it will not be used at all, given that the ARM asm code registers itself as a cipher with a priority that exceeds the priority of the fixed time cipher. So remove the link time dependency, and allocate the fallback cipher via the crypto API. Note that this requires this driver's module_init call to be replaced with late_initcall, so that the (possibly generic) fallback cipher is guaranteed to be available when the builtin test is performed at registration time. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/Kconfig | 2 +- arch/arm/crypto/aes-neonbs-glue.c | 60 +++++++++++++++++++++++++++++---------- 2 files changed, 46 insertions(+), 16 deletions(-) commit 3ea996ddfb1756658523f371c7ed1137841facaa Author: Eric Biggers Date: Tue Feb 14 13:43:30 2017 -0800 crypto: gf128mul - constify 4k and 64k multiplication tables Constify the multiplication tables passed to the 4k and 64k multiplication functions, as they are not modified by these functions. Cc: Alex Cope Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/gf128mul.c | 6 +++--- include/crypto/gf128mul.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit f33fd64778f2593b3b377cef47b8604462d56a57 Author: Eric Biggers Date: Tue Feb 14 13:43:29 2017 -0800 crypto: gf128mul - rename the byte overflow tables Though the GF(2^128) byte overflow tables were named the "lle" and "bbe" tables, they are not actually tied to these element formats specifically, but rather to particular a "bit endianness". For example, the bbe table is actually used for both bbe and ble multiplication. Therefore, rename the tables to "le" and "be" and update the comment to explain this. Cc: Alex Cope Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/gf128mul.c | 49 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 17 deletions(-) commit 2416e4fa98b9763ea06e0f441c23ce7a293a87f4 Author: Eric Biggers Date: Tue Feb 14 13:43:28 2017 -0800 crypto: gf128mul - remove xx() macro The xx() macro serves no purpose and can be removed. Cc: Alex Cope Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/gf128mul.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 63be5b53b6d15f7706ad21e9801dae5b723e8340 Author: Eric Biggers Date: Tue Feb 14 13:43:27 2017 -0800 crypto: gf128mul - fix some comments Fix incorrect references to GF(128) instead of GF(2^128), as these are two entirely different fields, and fix a few other incorrect comments. Cc: Alex Cope Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/gf128mul.c | 13 +++++++------ include/crypto/gf128mul.h | 26 ++++++++++++++------------ 2 files changed, 21 insertions(+), 18 deletions(-) commit a0a68fb6872f545acd49035ea17c52a9f30d07dc Author: Chen-Yu Tsai Date: Thu Mar 9 18:05:29 2017 +0800 drm/sun4i: Pass pointer for underlying backend into layer init sun4i_layer only controls the backend hardware block of the display pipeline. Pass pointers to the underlying backend in the layer init function, instead of trying to fetch it from the drm_device structure. This avoids the headache of trying to figure out which device the layers actually belong to. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_crtc.c | 2 +- drivers/gpu/drm/sun4i/sun4i_layer.c | 13 ++++++------- drivers/gpu/drm/sun4i/sun4i_layer.h | 3 ++- 3 files changed, 9 insertions(+), 9 deletions(-) commit 18c3b300837b864e875d23f22eef5b7acefeccf1 Author: Chen-Yu Tsai Date: Thu Mar 9 18:05:28 2017 +0800 drm/sun4i: Pass pointers for associated backend and tcon into crtc init sun4i_crtc controls the backend and tcon hardware blocks of the display pipeline. Pass pointers to the underlying devices into the crtc init function, instead of trying to fetch them from the drm_device structure. This avoids the headache of trying to figure out which devices the crtc is actually associated with. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_crtc.c | 9 +++++---- drivers/gpu/drm/sun4i/sun4i_crtc.h | 4 +++- drivers/gpu/drm/sun4i/sun4i_tcon.c | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) commit 279156a33c33b385a78c1266ddf6ebc2d473193d Author: Chen-Yu Tsai Date: Thu Mar 9 18:05:27 2017 +0800 drm/sun4i: tv: Get tcon and backend pointers from associated crtc The drm_encoder structure provides us with a pointer to the crtc currently tied to the encoder. Subsequently we can extract the tcon and backend pointers from our crtc structure, instead of getting it directly from the sun4i_drv structure. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_tv.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit e4cdcb7cce2949fb36a04b9848f856a107a0a2da Author: Chen-Yu Tsai Date: Thu Mar 9 18:05:26 2017 +0800 drm/sun4i: Use embedded tcon pointer to get the tcon's output port node A pointer to the underlying tcon of the crtc was added to the sun4i_crtc structure in "drm/sun4i: Add backend and tcon pointers to sun4i_crtc". However the crtc init function was still using the copy from sun4i_drv to set drm_crtc.port. This was an oversight when the patches were reordered. Switch to using the embedded tcon pointer to get the tcon's ouptut port and assign it to drm_crtc.port. This makes it possible to remove the usage of sun4i_drv completely in subsequent patches. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23a1cb11d90d8e66bfe3a506cfaa88486bbcfc61 Author: Chen-Yu Tsai Date: Thu Mar 9 18:05:25 2017 +0800 drm/sun4i: Fix tcon channel 0 comment about backporch = backporch + hsync The backporch programmed into the tcon registers is actually the backporch + hsync length from the display timings, as indicated in the interface timing diagrams found in the user manual of the A31 and A33 SoCs. The comments for channel 0 mistakenly describe the discrepancy as TCON backporch = frontporch + hsync. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d38146b9ee16264ff9a88bf3391ab9f2f5af3646 Author: Maarten Lankhorst Date: Wed Mar 8 13:00:07 2017 +0100 drm/i915: Nuke skl_update_plane debug message from the pipe update critical section printks are slow so we should not be doing them from the vblank evade critical section. These could explain why we sometimes seem to blow past our 100 usec deadline. The problem has been there ever since commit c331879ce8ea ("drm/i915: skylake sprite plane scaling using shared scalers.") but it may not have been readily visible until commit e1edbd44e23b ("drm/i915: Complain if we take too long under vblank evasion.") increased our chances of noticing it. Signed-off-by: Maarten Lankhorst Cc: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1488974407-25175-1-git-send-email-maarten.lankhorst@linux.intel.com Fixes: c331879ce8ea ("drm/i915: skylake sprite plane scaling using shared scalers") Cc: # v4.2+ Reviewed-by: Ville Syrjälä [mlankhorst: Add missing tags, point to the correct offending commit] drivers/gpu/drm/i915/intel_sprite.c | 3 --- 1 file changed, 3 deletions(-) commit 4c7f16d14a33a9cfb4af9cb780d8a73bcca64a92 Author: Chen-Yu Tsai Date: Thu Mar 9 18:05:24 2017 +0800 drm/sun4i: Fix TCON clock and regmap initialization sequence The TCON driver calls sun4i_tcon_init_regmap and sun4i_tcon_init_clocks in its bind function. The former creates a regmap and writes to several register to clear its configuration to a known default. The latter initializes various clocks. This includes enabling the bus clock for register access and creating the dotclock. In order for the first step's writes to work, the bus clock must be enabled which is done in the second step. but the dotclock's ops use the regmap created in the first step. Rearrange the function calls such that the clocks are initialized before the regmap, and split out the dot clock creation to after the regmap is initialized. Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_tcon.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit db6ccf23e8ba40fc2e8914ec9c0eb950df71d9fe Author: Markus Heiser Date: Mon Mar 6 14:09:27 2017 +0100 docs-rst: automatically convert Graphviz and SVG images This patch brings scalable figure, image handling and a concept to embed *render* markups: * DOT (http://www.graphviz.org) * SVG For image handling use the 'image' replacement:: .. kernel-image:: svg_image.svg :alt: simple SVG image For figure handling use the 'figure' replacement:: .. kernel-figure:: svg_image.svg :alt: simple SVG image SVG image example Embed *render* markups (or languages) like Graphviz's **DOT** is provided by the *render* directive.:: .. kernel-render:: DOT :alt: foobar digraph :caption: Embedded **DOT** (Graphviz) code. digraph foo { "bar" -> "baz"; } The *render* directive is a concept to integrate *render* markups and languages, yet supported markups: * DOT: render embedded Graphviz's **DOT** * SVG: render embedded Scalable Vector Graphics (**SVG**) Cc: Jani Nikula Cc: Laurent Pinchart Tested-by: Mauro Carvalho Chehab Tested-by: Daniel Vetter Signed-off-by: Daniel Vetter (v2 - v5) Signed-off-by: Markus Heiser (v1, v6) Signed-off-by: Jonathan Corbet Documentation/conf.py | 2 +- Documentation/doc-guide/hello.dot | 3 + Documentation/doc-guide/sphinx.rst | 98 +++++- Documentation/doc-guide/svg_image.svg | 10 + Documentation/process/changes.rst | 7 +- Documentation/sphinx/kfigure.py | 551 ++++++++++++++++++++++++++++++++++ 6 files changed, 665 insertions(+), 6 deletions(-) commit c3c53600f62b5fa92acf3a7f5eb71bacb25f6b01 Author: Daniel Vetter Date: Thu Mar 2 16:16:33 2017 +0100 doc: Explain light-handed markup preference a bit better We're still pretty far away from anything like a consensus, but there's clearly a lot of people who prefer an as-light as possible approach to converting existing .txt files to .rst. Make sure this is properly taken into account and clear. Motivated by discussions with Peter and Christoph and others. Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Jani Nikula Cc: Mauro Carvalho Chehab Signed-off-by: Daniel Vetter Signed-off-by: Jonathan Corbet Documentation/doc-guide/sphinx.rst | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 54f5d13b708a64177d4437a2b23fb05035f90716 Author: sayli karnik Date: Thu Mar 9 11:48:21 2017 +0530 Documentation: cpu-freq: cpu-drivers: Fix repetition of word 'to' The patch replaces 'to to' with 'to' in the documentation. Signed-off-by: sayli karnik Acked-by: Viresh Kumar Signed-off-by: Jonathan Corbet Documentation/cpu-freq/cpu-drivers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fceb43033d4d2023b376bab7f76c5bd63f732aec Author: Matthew Auld Date: Mon Mar 6 23:54:02 2017 +0000 drm/i915/selftests: exercise cache domain eviction Add a selftest to exercise evicting neighbouring nodes that conflict due to page colouring in the GTT. v2: add a peppering of comments Signed-off-by: Matthew Auld Cc: Chris Wilson Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170306235414.23407-4-matthew.auld@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 90 +++++++++++++++++++++++++ 1 file changed, 90 insertions(+) commit fe65cbdbc97929e4a522716ed279a36783656142 Author: Matthew Auld Date: Mon Mar 6 23:54:01 2017 +0000 drm/i915: use correct node for handling cache domain eviction It looks like we were incorrectly comparing vma->node against itself instead of the target node, when evicting for a node on systems where we need guard pages between regions with different cache domains. As a consequence we can end up trying to needlessly evict neighbouring nodes, even if they have the same cache domain, and if they were pinned we would fail the eviction. Fixes: 625d988acc28 ("drm/i915: Extract reserving space in the GTT to a helper") Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170306235414.23407-3-matthew.auld@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem_evict.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a5dd8f5a5041ee98374a897bf32e53d14bd9a7b4 Author: Matthew Auld Date: Mon Mar 6 23:54:00 2017 +0000 drm/i915/selftests: don't leak the gem object For our fake dma objects we can leak the underlying gem object if we fail to pin our "backing storage". [ 39.952618] ============================================================================= [ 39.952625] BUG mock_object (Tainted: G U ): Objects remaining in mock_object on __kmem_cache_shutdown() [ 39.952629] ----------------------------------------------------------------------------- [ 39.952633] Disabling lock debugging due to kernel taint [ 39.952635] INFO: Slab 0xffffea00086c6a00 objects=21 used=1 fp=0xffff88021b1abc00 flags=0x5fff8000008100 [ 39.952640] CPU: 1 PID: 1258 Comm: drv_selftest Tainted: G BU 4.10.0+ #46 [ 39.952641] Hardware name: Apple Inc. MacBookPro11,1/Mac-189A3D4F975D5FFC, BIOS MBP111.88Z.0138.B17.1602221718 02/22/2016 [ 39.952642] Call Trace: [ 39.952648] dump_stack+0x4d/0x6f [ 39.952651] slab_err+0x9d/0xb0 [ 39.952654] ? ksm_migrate_page+0xe0/0xe0 [ 39.952657] ? on_each_cpu_cond+0x9a/0xc0 [ 39.952658] ? __kmalloc+0x1af/0x1c0 [ 39.952660] ? __kmem_cache_shutdown+0x173/0x3e0 [ 39.952661] __kmem_cache_shutdown+0x196/0x3e0 [ 39.952664] kmem_cache_destroy+0xa0/0x150 [ 39.952708] mock_device_release+0x113/0x140 [i915] [ 39.952726] drm_dev_release+0x20/0x40 [drm] [ 39.952735] drm_dev_unref+0x23/0x30 [drm] [ 39.952768] i915_gem_gtt_mock_selftests+0x55/0x70 [i915] [ 39.952803] __run_selftests+0x169/0x1c0 [i915] [ 39.952805] ? 0xffffffffa0151000 [ 39.952840] i915_mock_selftests+0x30/0x60 [i915] [ 39.952869] i915_init+0xc/0x78 [i915] [ 39.952870] ? 0xffffffffa0151000 [ 39.952872] do_one_initcall+0x43/0x170 [ 39.952874] ? __vunmap+0x81/0xd0 [ 39.952875] ? kmem_cache_alloc_trace+0x37/0x170 [ 39.952877] ? do_init_module+0x27/0x1f8 [ 39.952879] do_init_module+0x5f/0x1f8 [ 39.952881] load_module+0x2423/0x29b0 [ 39.952882] ? __symbol_put+0x40/0x40 [ 39.952885] ? kernel_read_file+0x1a3/0x1c0 [ 39.952887] SYSC_finit_module+0xbc/0xf0 [ 39.952889] SyS_finit_module+0xe/0x10 [ 39.952892] entry_SYSCALL_64_fastpath+0x13/0x94 v2: use onion teardown and favour i915_gem_object_put Fixes: 8d28ba4568f4 ("drm/i915: Exercise filling the top/bottom portions of the ppgtt") Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170306235414.23407-2-matthew.auld@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit b8c31b5d6c232a36c821bdd556b60c033a1c1577 Author: Lior David Date: Wed Mar 8 13:52:19 2017 +0200 wil6210: add oob_mode for AP certification Add a new value to the oob_mode module parameter for supporting AP certification. All enabled values of oob_mode (>0) are intended only for debugging and diagnostics. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/main.c | 24 ++++++++++++++++++------ drivers/net/wireless/ath/wil6210/wil6210.h | 1 + 2 files changed, 19 insertions(+), 6 deletions(-) commit 3b56c15fa3315942b4cb02e57ff842f2f9b14ef7 Author: Dedy Lansky Date: Wed Mar 8 13:52:18 2017 +0200 wil6210: correctly report locally generated disconnect in STA mode Driver always invoke cfg80211_disconnected() with locally_generated as false. Fix this by reporting true whenever the disconnect is triggered from upper layers (cfg80211) or from within the driver itself (reset, deinit). Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 1 + drivers/net/wireless/ath/wil6210/main.c | 5 ++++- drivers/net/wireless/ath/wil6210/wil6210.h | 1 + drivers/net/wireless/ath/wil6210/wmi.c | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) commit 628639b1c976a5f02792dc6595a4d199b7b70d85 Author: Dedy Lansky Date: Wed Mar 8 13:52:17 2017 +0200 wil6210: use WMI_DISCONNECT_CMDID upon connect timeout Upon connect timeout driver invokes _wil6210_disconnect() which iterates over sta array and disconnects each connected sta. In practice, because the connection is still ongoing and because cid is not yet allocated, disconnect is not actually happening. This leaves FW in connecting state while driver is in disconnected state. To fix this, upon connect timeout, explicitly send WMI_DISCONNECT_CMDID to FW to make sure it gets disconnected. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/main.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) commit f6b29b6585593b28c4fde142727bfef350372b83 Author: Hamad Kadmany Date: Wed Mar 8 13:52:16 2017 +0200 wil6210: protect list of pending wmi events during flush When flush is done, pending events list is manipulated without taking the proper spinlock, which could lead to memory corruption if list is manipulated by wmi worker or by interrupt routine. Signed-off-by: Hamad Kadmany Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/wmi.c | 5 +++++ 1 file changed, 5 insertions(+) commit bcdd49b074d0ea48f54bc6d24a66efab8688b43a Author: Dedy Lansky Date: Wed Mar 8 13:52:15 2017 +0200 wil6210: store bss object and use cfg80211_connect_bss() In a fast disconnect/connect sequence, cfg80211_connect_result() can fail to find the bss object which the driver is connecting to. Detailed sequence of events: * Driver is connected in STA mode * Disconnect request arrives from user space. Driver disconnects and calls cfg80211_disconnected() which adds new event to the cfg80211_wq worker thread * Connect request arrives from user space. cfg80211_connect() stores ssid/ssid_len and calls rdev_connect() * __cfg80211_disconnected() runs in worker thread and zero wdev->ssid_len * Connect succeeds. Driver calls cfg80211_connect_result() which fails to find the bss because wdev->ssid_len is zero To overcome this, upon connect request, store the bss object in the driver and upon connect completion pass it to kernel using cfg80211_connect_bss(). Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 1 + drivers/net/wireless/ath/wil6210/main.c | 1 + drivers/net/wireless/ath/wil6210/wil6210.h | 1 + drivers/net/wireless/ath/wil6210/wmi.c | 14 +++++++++----- 4 files changed, 12 insertions(+), 5 deletions(-) commit 18618a9fba33f87a1cc6083a22a541972cd3f3b3 Author: Maya Erez Date: Wed Mar 8 13:52:14 2017 +0200 wil6210: missing reinit_completion in HALP voting After setting HALP ICR bit, we keep it set until HALP unvote. Masking HALP ICR should protect the driver from hitting the HALP ICR over and over again. However, in case there is another MISC ICR we will read the HALP ICR and issue a completion. This can lead to a case where HALP voting is completed immediately, as the completion is already set. Reinit the HALP completion before the actual vote will clear previous completions and protect from such cases. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/main.c | 1 + 1 file changed, 1 insertion(+) commit 5eb443e9af87776f94e77a9b72e54ceb81cbabc1 Author: Dedy Lansky Date: Wed Mar 8 13:52:13 2017 +0200 wil6210: use print_hex_dump_debug instead of print_hex_dump_bytes Some dynamic debug printouts in driver are using print_hex_dump_bytes. However, with dynamic debug disabled, print_hex_dump_bytes outputs to log unconditionally. Use print_hex_dump_debug instead to prevent log pollution when dynamic debug disabled. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 41 +++++++++++++++-------------- drivers/net/wireless/ath/wil6210/wil6210.h | 12 +++++++++ 2 files changed, 33 insertions(+), 20 deletions(-) commit 9953a782f9fac1becccb8f48f1a276c310f2ab5a Author: Lior David Date: Wed Mar 8 13:52:12 2017 +0200 wil6210: bus_request platform operation refinement The driver uses the bus_request platform operation to request resources from the platform for a specific bandwidth. Currently the driver requests resources for the maximum theoretical bandwidth, when interface is brought up. Refine this process a bit: now the driver will request a small amount of resources when interface is up, and will only issue the maximum request when connected. This mechanism will be improved further in the future to make more refined requests based on actual bandwidth. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 4 ++++ drivers/net/wireless/ath/wil6210/main.c | 14 +++++++++----- drivers/net/wireless/ath/wil6210/wil6210.h | 5 +++-- drivers/net/wireless/ath/wil6210/wmi.c | 1 + 4 files changed, 17 insertions(+), 7 deletions(-) commit 4a0e45a78328957b012f554fb2ffcd5c69fe418a Author: Lior David Date: Wed Mar 8 13:52:11 2017 +0200 wil6210: do not start regular scan on stopped p2p device The driver should not allow starting any type of scan on a stopped P2P device. Current implementation only checked social scan. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit f2de576dcfd094b02297c251223b0e2c9de96c33 Author: Hamad Kadmany Date: Wed Mar 8 13:52:10 2017 +0200 wil6210: set dma mask to reflect device capability device supports 48bit addresses, reflect that by setting the dma mask accordingly. Signed-off-by: Hamad Kadmany Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/pcie_bus.c | 16 ++++++++++++++++ drivers/net/wireless/ath/wil6210/pmc.c | 17 ++++++++++++++++- drivers/net/wireless/ath/wil6210/txrx.c | 19 ++++++++++++++++++- drivers/net/wireless/ath/wil6210/wil6210.h | 1 + 4 files changed, 51 insertions(+), 2 deletions(-) commit 4aa2d31f5df8c47cc92ccacf49a2dff3db6c1d53 Author: Christophe Jaillet Date: Wed Mar 8 13:52:09 2017 +0200 wcn36xx: Fix error handling Reorder 'out_free_dxe_pool' and 'out_free_dxe_ctl' error handling labels in order to match the way resources have been allocated. Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 34c9d524103fc8d4657b41ab9f1120e936010793 Author: Noralf Trønnes Date: Tue Mar 7 21:49:24 2017 +0100 drm/qxl: Remove qxl_debugfs_remove_files() drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so it's not necessary to call drm_debugfs_remove_files(). Cc: airlied@linux.ie Cc: kraxel@redhat.com Signed-off-by: Noralf Trønnes Link: http://patchwork.freedesktop.org/patch/msgid/20170307204924.1002-4-noralf@tronnes.org [ kraxel: solved conflict ] Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_debugfs.c | 13 ------------- drivers/gpu/drm/qxl/qxl_drv.h | 1 - drivers/gpu/drm/qxl/qxl_kms.c | 1 - 3 files changed, 15 deletions(-) commit c73f8c00330f59ce9b1ace9ff698aca83390d358 Author: Mohammed Shafi Shajakhan Date: Wed Mar 8 13:52:06 2017 +0200 ath10k: fix a warning during channel switch with multiple vaps Doing a channel switch via hostapd_cli seems to update the new channel context for each VAP's appropriately as below in 'ath10k_mac_update_vif_chan', hence we can safely suppress the warning that shows up during this operation and dump the warning only if no vaps are available for channel switch hostapd_cli -i wlan0 chan_switch 5 5200 OK ath10k_pci : mac chanctx switch n_vifs 3 mode 1 ath10k_pci : mac chanctx switch vdev_id 2 freq 5180->5200 width 0->0 ath10k_pci : mac chanctx switch vdev_id 1 freq 5180->5200 width 0->0 ath10k_pci : mac chanctx switch vdev_id 0 freq 5180->5200 width 0->0 Call Trace: WARNING: backports-20161201-3.14.77-9ab3068/drivers/net/wireless/ath/ath10k/mac.c:7126 [] (warn_slowpath_null) from [] (ath10k_reconfig_complete+0xe4/0x25c [ath10k_core]) [] (ath10k_reconfig_complete [ath10k_core]) [] (ath10k_mac_vif_ap_csa_work+0x214/0x370 [ath10k_core]) [] (ath10k_mac_op_change_chanctx+0x108/0x128 [ath10k_core]) [] (ieee80211_recalc_chanctx_min_def+0x30c/0x430 [mac80211]) [] (ieee80211_recalc_smps_chanctx+0x2ec/0x840 [mac80211]) [] (ieee80211_vif_use_reserved_context+0x7c/0xf8 [mac80211]) [] (ieee80211_vif_use_reserved_context [mac80211]) [] (ieee80211_csa_finalize_work+0x5c/0x88 [mac80211]) Fixes: d7bf4b4aba05 ("ath10k: fix ar->rx_channel updating logic") Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16ff1fb0e32f76a5d285a6f23b82d21aa52813c6 Author: Dmitry Tunin Date: Wed Mar 8 13:52:07 2017 +0200 ath9k_htc: Add support of AirTies 1eda:2315 AR9271 device T: Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#= 7 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs= 1 P: Vendor=1eda ProdID=2315 Rev=01.08 S: Manufacturer=ATHEROS S: Product=USB2.0 WLAN S: SerialNumber=12345 C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 6 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none) Signed-off-by: Dmitry Tunin Cc: stable@vger.kernel.org Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/hif_usb.c | 1 + 1 file changed, 1 insertion(+) commit 912b6e8850a51a09ec771aedf2b4428ac9b34e20 Author: Ryan Hsu Date: Wed Mar 8 13:52:05 2017 +0200 ath10k: improve the firmware download time for QCA9377 QCA9377 is the family of QCA61x4 which shared the same procedure to enable the hardware clock that could improve the firmware download time. Signed-off-by: Ryan Hsu Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 583a6629432ca95813a585a7117331ffe36fe939 Author: Ryan Hsu Date: Wed Mar 8 13:52:04 2017 +0200 ath10k: improve the firmware download time for QCA6174 Len Brown reported the system resume time is taking more than 2 seconds in bug - https://bugzilla.kernel.org/show_bug.cgi?id=185621. The reason of the 2 seconds is due to the firmware download time. The chip is booted up in the default reference clock speed to handle the firmware download to chip memory and advanced to the support higher speed clock to run the firmware after all. The default reference clock in the hardware is slow so that the firmware download time is taking up to 2 seconds for a 600KB firmware file. [76796.349701] ath10k_pci : boot uploading firmware image len 688691 [76798.334612] ath10k_pci : htt tx max num pending tx 1056 The resolution here is to enable the higher speed clock if the hardware supported before the firmware download at BMI stage, so that the hardware can handle the firmare download in a more efficient way. This can help to improve the firmware download time from 2 seconds to around 500ms for the same 600KB firmware file. [322858.577919] ath10k_pci boot uploading firmware image len 688691 [322859.093094] ath10k_pci htt tx max num pending tx 1056 The steps to advance to the higher speed clock is very hardware specific, so adding the hardware ops for the hardware that can support this. Reported-by: Len Brown Tested-by: Paul Menzel Signed-off-by: Ryan Hsu Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/bmi.c | 72 +++++++++ drivers/net/wireless/ath/ath10k/bmi.h | 2 + drivers/net/wireless/ath/ath10k/core.c | 4 +- drivers/net/wireless/ath/ath10k/hw.c | 265 +++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/hw.h | 69 +++++++++ 5 files changed, 411 insertions(+), 1 deletion(-) commit 88486bee065ace1aa9cdd6fa48586ef3f2d62ec9 Author: sayli karnik Date: Thu Mar 9 11:47:07 2017 +0530 Documentation: ABI: testing: sysfs-bus-pci: Fix repetition of word 'the' The patch replaces 'the the' with 'the' in the documentation. Signed-off-by: sayli karnik Signed-off-by: Jonathan Corbet Documentation/ABI/testing/sysfs-bus-pci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b742fd6b0c701bdb2697a83f0acf8a702eb545c8 Author: sayli karnik Date: Thu Mar 9 11:46:22 2017 +0530 Documentation: phy: Fix repetition of word 'the' The patch replaces 'the the' with 'the' in the documantation. Signed-off-by: sayli karnik Signed-off-by: Jonathan Corbet Documentation/phy.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c8782dd313ed7ca72719ebea1cfce82059e7da2 Author: Chris Wilson Date: Wed Mar 8 21:59:03 2017 +0000 drm/i915/userptr: Disallow wrapping GTT into a userptr If we allow the user to convert a GTT mmap address into a userptr, we may end up in recursion hell, where currently we hit a mutex deadlock but other possibilities include use-after-free during the unbind/cancel_userptr. [ 143.203989] gem_userptr_bli D 0 902 898 0x00000000 [ 143.204054] Call Trace: [ 143.204137] __schedule+0x511/0x1180 [ 143.204195] ? pci_mmcfg_check_reserved+0xc0/0xc0 [ 143.204274] schedule+0x57/0xe0 [ 143.204327] schedule_timeout+0x383/0x670 [ 143.204374] ? trace_hardirqs_on_caller+0x187/0x280 [ 143.204457] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 143.204507] ? usleep_range+0x110/0x110 [ 143.204657] ? irq_exit+0x89/0x100 [ 143.204710] ? retint_kernel+0x2d/0x2d [ 143.204794] ? trace_hardirqs_on_caller+0x187/0x280 [ 143.204857] ? _raw_spin_unlock_irq+0x33/0x60 [ 143.204944] wait_for_common+0x1f0/0x2f0 [ 143.205006] ? out_of_line_wait_on_atomic_t+0x170/0x170 [ 143.205103] ? wake_up_q+0xa0/0xa0 [ 143.205159] ? flush_workqueue_prep_pwqs+0x15a/0x2c0 [ 143.205237] wait_for_completion+0x1d/0x20 [ 143.205292] flush_workqueue+0x2e9/0xbb0 [ 143.205339] ? flush_workqueue+0x163/0xbb0 [ 143.205418] ? __schedule+0x533/0x1180 [ 143.205498] ? check_flush_dependency+0x1a0/0x1a0 [ 143.205681] i915_gem_userptr_mn_invalidate_range_start+0x1c7/0x270 [i915] [ 143.205865] ? i915_gem_userptr_dmabuf_export+0x40/0x40 [i915] [ 143.205955] __mmu_notifier_invalidate_range_start+0xc6/0x120 [ 143.206044] ? __mmu_notifier_invalidate_range_start+0x51/0x120 [ 143.206123] zap_page_range_single+0x1c7/0x1f0 [ 143.206171] ? unmap_single_vma+0x160/0x160 [ 143.206260] ? unmap_mapping_range+0xa9/0x1b0 [ 143.206308] ? vma_interval_tree_subtree_search+0x75/0xd0 [ 143.206397] unmap_mapping_range+0x18f/0x1b0 [ 143.206444] ? zap_vma_ptes+0x70/0x70 [ 143.206524] ? __pm_runtime_resume+0x67/0xa0 [ 143.206723] i915_gem_release_mmap+0x1ba/0x1c0 [i915] [ 143.206846] i915_vma_unbind+0x5c2/0x690 [i915] [ 143.206925] ? __lock_is_held+0x52/0x100 [ 143.207076] i915_gem_object_set_tiling+0x1db/0x650 [i915] [ 143.207236] i915_gem_set_tiling_ioctl+0x1d3/0x3b0 [i915] [ 143.207377] ? i915_gem_set_tiling_ioctl+0x5/0x3b0 [i915] [ 143.207457] drm_ioctl+0x36c/0x670 [ 143.207535] ? debug_lockdep_rcu_enabled.part.0+0x1a/0x30 [ 143.207730] ? i915_gem_object_set_tiling+0x650/0x650 [i915] [ 143.207793] ? drm_getunique+0x120/0x120 [ 143.207875] ? __handle_mm_fault+0x996/0x14a0 [ 143.207939] ? vm_insert_page+0x340/0x340 [ 143.208028] ? up_write+0x28/0x50 [ 143.208086] ? vm_mmap_pgoff+0x160/0x190 [ 143.208163] do_vfs_ioctl+0x12c/0xa60 [ 143.208218] ? debug_lockdep_rcu_enabled+0x35/0x40 [ 143.208267] ? ioctl_preallocate+0x150/0x150 [ 143.208353] ? __do_page_fault+0x36a/0x6e0 [ 143.208400] ? mark_held_locks+0x23/0xc0 [ 143.208479] ? up_read+0x1f/0x40 [ 143.208526] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 143.208669] ? __fget_light+0xa7/0xc0 [ 143.208747] SyS_ioctl+0x41/0x70 To prevent the possibility of a deadlock, we defer scheduling the worker until after we have proven that given the current mm, the userptr range does not overlap a GGTT mmaping. If another thread tries to remap the GGTT over the userptr before the worker is scheduled, it will be stopped by its invalidate-range flushing the current work, before the deadlock can occur. v2: Improve discussion of how we end up in the deadlock. v3: Don't forget to mark the userptr as active after a successful gup_fast. Rename overlaps_ggtt to noncontiguous_or_overlaps_ggtt. v4: Fix test ordering between invalid GTT mmaping and range completion (Tvrtko) Reported-by: Michał Winiarski Testcase: igt/gem_userptr_blits/map-fixed-invalidate-gup Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170308215903.24171-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_userptr.c | 88 +++++++++++++++++++++++---------- 1 file changed, 62 insertions(+), 26 deletions(-) commit d151e9ce9876a134d9c46e191d920292d47d302e Author: Chris Wilson Date: Tue Mar 7 20:58:50 2017 +0000 drm/i915/userptr: Only flush the workqueue if required To avoid waiting for work from other invalidate-range threads where not required, only wait on the userptr cancel workqueue if we have added some work to it. Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170307205851.32578-2-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_userptr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 42953b3c517af6fe64e45e6491921f0c7c90511b Author: Chris Wilson Date: Tue Mar 7 20:58:49 2017 +0000 drm/i915/userptr: Deactivate a failed userptr if the worker reports an EFAULT If the worker fails, it no longer has pages to release and can be immediately removed from the invalidate-tree. Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170307205851.32578-1-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_userptr.c | 2 ++ 1 file changed, 2 insertions(+) commit 3c66d1c7ed4131bbaea128803cfa247defa2c376 Merge: 95964c6 61793af Author: David S. Miller Date: Wed Mar 8 23:17:39 2017 -0800 Merge branch 'mlxsw-cosmetics' Jiri Pirko says: ==================== mlxsw: cosmetics Couple of cosmetic mlxsw patches ==================== Signed-off-by: David S. Miller commit 61793af6ab8b4455cdfd7a41b45991f8e3900dc8 Author: Ido Schimmel Date: Mon Mar 6 21:25:21 2017 +0100 mlxsw: pci: Remove unused bit The overrun ignore bit isn't supported by the device's firmware and was recently removed from the programmer's reference manual (PRM). Remove it from the driver as well. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/cmd.h | 12 ------------ drivers/net/ethernet/mellanox/mlxsw/pci.c | 2 -- 2 files changed, 14 deletions(-) commit 1182e53639518698e3bc5a6cc9a09659623e7cac Author: Jiri Pirko Date: Mon Mar 6 21:25:20 2017 +0100 mlxsw: spectrum: Fix helper function and port variable names Commit dd82364c3ab9 ("mlxsw: Flip to the new dev walk API") did some small changes in mlxsw code, but it did not respect the naming conventions. So fix this now. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 95964c6de787eb21468a29b94e9d25e1a24d6a37 Author: Eric Dumazet Date: Mon Mar 6 11:23:55 2017 -0800 net: use proper lockdep annotation in __sk_dst_set() __sk_dst_set() must be called while we own the socket. We can get proper lockdep coverage using lockdep_sock_is_held() and rcu_dereference_protected() Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/sock.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 337e63923a5674882be99bbc03b2f0f27c112b8e Merge: fa383d6 7c92de8 Author: David S. Miller Date: Wed Mar 8 23:08:59 2017 -0800 Merge branch 'flow_dissector-improvements' Jiri Pirko says: ==================== flow dissector improvements This patchset follows-up the discussion about future extensions of flow dissector and tries to address the mentioned concerns. Some parts are cut out into sub-functions. Also, the processing of the code (ARP, MPLS) is made dependent on user actually requiring the bisected values. This prepares the code for future extensions to bisect IPv6 ND messages, TCP flags, etc. ==================== Signed-off-by: David S. Miller commit 7c92de8eaabfff42f6f57466c12f255cbd718f58 Author: Jiri Pirko Date: Mon Mar 6 16:39:55 2017 +0100 flow_dissector: Move GRE dissection into a separate function Make the main flow_dissect function a bit smaller and move the GRE dissection into a separate function. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/core/flow_dissector.c | 244 +++++++++++++++++++++++++--------------------- 1 file changed, 134 insertions(+), 110 deletions(-) commit c5ef188e9318694a073ceacb26011f62d7ed9b3f Author: Jiri Pirko Date: Mon Mar 6 16:39:54 2017 +0100 flow_dissector: rename "proto again" goto label Align with "ip_proto_again" label used in the same function and rename vague "again" to "proto_again". Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/core/flow_dissector.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d5774b93f04252b81bd2c2cc84ec663c6aa798d1 Author: Jiri Pirko Date: Mon Mar 6 16:39:53 2017 +0100 flow_dissector: Fix GRE header error path Now, when an unexpected element in the GRE header appears, we break so the l4 ports are processed. But since the ports are processed unconditionally, there will be certainly random values dissected. Fix this by just bailing out in such situations. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/core/flow_dissector.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4a5d6c8b14b81e3704607a354434321e390d228a Author: Jiri Pirko Date: Mon Mar 6 16:39:52 2017 +0100 flow_dissector: Move MPLS dissection into a separate function Make the main flow_dissect function a bit smaller and move the MPLS dissection into a separate function. Along with that, do the MPLS header processing only in case the flow dissection user requires it. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/core/flow_dissector.c | 56 ++++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 22 deletions(-) commit 9bf881ffc5c0e65343fb51eef10dd989b36d1c1f Author: Jiri Pirko Date: Mon Mar 6 16:39:51 2017 +0100 flow_dissector: Move ARP dissection into a separate function Make the main flow_dissect function a bit smaller and move the ARP dissection into a separate function. Along with that, do the ARP header processing only in case the flow dissection user requires it. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/core/flow_dissector.c | 120 ++++++++++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 53 deletions(-) commit 7fe1e290bfca75061d77ad2a67b12c23d6d35e7b Author: Madalin Bucur Date: Tue Feb 14 17:17:28 2017 +0200 dpaa_eth: enable context-A stashing Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2ea08f8261b1469c728204aaacfca1d046eb0bff Author: Camelia Groza Date: Mon Jul 25 16:54:56 2016 +0300 dpaa_eth: enable multiple Tx traffic classes Implement the setup_tc ndo to configure prioritised Tx traffic classes. Priorities range from 0 (lowest) to 3 (highest). The driver assigns NR_CPUS queues to each traffic class. Signed-off-by: Camelia Groza Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit c44efa1d75e4c0a720fd39d7095a0bd6b306576e Author: Camelia Groza Date: Mon Jul 25 16:38:21 2016 +0300 dpaa_eth: add four prioritised Tx traffic classes Each traffic class corresponds to a WQ priority level. The number of Tx netdev queues and frame queues is increased to NR_CPUS queues for each traffic class. In addition, the priority of the Rx, Error and Conf queues is lowered but their order is maintained. By default, only one traffic class is enabled, only the low priority Tx queues are used and only the corresponding netdev queues are advertised. Signed-off-by: Camelia Groza Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 43 +++++++++++++++++++++----- drivers/net/ethernet/freescale/dpaa/dpaa_eth.h | 8 ++++- 2 files changed, 42 insertions(+), 9 deletions(-) commit 7f8a6a1b8fa4915548e2e426e9780e7c217c3e0e Author: Madalin Bucur Date: Mon Feb 13 17:20:01 2017 +0200 dpaa_eth: do not ignore port api return value Reported-by: Dan Carpenter Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 65 +++++++++++++++++--------- 1 file changed, 43 insertions(+), 22 deletions(-) commit 5accb28241e027c9d816b348a870ee3f27c499ff Author: Madalin Bucur Date: Thu Jan 26 14:34:02 2017 +0200 dpaa_eth: enable Rx checksum offload Use the FMan HW parser L4CV flag to offload Rx checksumming. Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 29 ++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) commit 4529da5b7feab8f9bef585b5a56c7e33bef66e19 Author: Madalin Bucur Date: Thu Jan 12 09:54:28 2017 +0200 dpaa_eth: remove redundant initialization Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de8b1e41a251577bdd6eb44a7702473fb22ae497 Author: Madalin Bucur Date: Tue Feb 14 15:09:07 2017 +0200 fsl/fman: enlarge FIFO to allow for the 5th port Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/fman/fman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 226327b236c97c860fe644a409fc536da53d5a98 Author: Madalin Bucur Date: Mon Feb 13 17:10:46 2017 +0200 fsl/fman: remove wrong free Reported-by: Dan Carpenter Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/fman/fman_port.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1df653cfea251386e8ecd8c9f983caacd965c78e Author: Madalin Bucur Date: Wed Jan 25 13:41:28 2017 +0200 fsl/fman: set HW parser as BMI next engine Enable the HW parser for all DPAA interfaces. Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/fman/fman.c | 21 ++++++++ drivers/net/ethernet/freescale/fman/fman_port.c | 72 +++++++++++++++++++++++-- 2 files changed, 90 insertions(+), 3 deletions(-) commit 3907e490d358aa82bf7446fc9d340f688c97c6de Author: Madalin Bucur Date: Thu Jan 12 10:00:17 2017 +0200 fsl/fman: parse result data is big endian Signed-off-by: Madalin Bucur drivers/net/ethernet/freescale/fman/fman.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fa383d663e3804ef76382c32524802b419b43770 Author: Philippe Reynes Date: Sun Mar 5 23:46:00 2017 +0100 net: toshiba: spider_net: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/toshiba/spider_net_ethtool.c | 24 +++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 60f285129905c33203f66111363c5503ccbc5c41 Author: Philippe Reynes Date: Sun Mar 5 23:21:06 2017 +0100 net: toshiba: ps3_genic_net: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Tested-by: Geoff Levand Signed-off-by: David S. Miller drivers/net/ethernet/toshiba/ps3_gelic_net.c | 51 ++++++++++++++++------------ 1 file changed, 29 insertions(+), 22 deletions(-) commit e016cc64423d2b6476e5c99d8a278f9093d53407 Author: Philippe Reynes Date: Sun Mar 5 22:25:39 2017 +0100 net: sun: sunhme: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/sun/sunhme.c | 62 +++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 28 deletions(-) commit 92552fdda557d1a9d7a819a79d0e356d439e8cfc Author: Philippe Reynes Date: Sun Mar 5 00:04:18 2017 +0100 net: sun: sungem: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/sun/sungem.c | 98 +++++++++++++++++++++++---------------- 1 file changed, 57 insertions(+), 41 deletions(-) commit d972253146867b65ecff0bcc0e551a970b3efa1b Author: Philippe Reynes Date: Sat Mar 4 17:50:06 2017 +0100 net: sun: niu: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/sun/niu.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) commit 2c784b0087d8b03b97bfcdbad8b162539dc614c6 Author: Philippe Reynes Date: Sat Mar 4 16:16:12 2017 +0100 net: sun: cassini: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/sun/cassini.c | 98 ++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 46 deletions(-) commit c4df19a66617a4818769468975019c736a84e0c9 Author: Philippe Reynes Date: Sat Mar 4 12:42:39 2017 +0100 net: smsc: smc91x: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Tested-by: Robert Jarzmik Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smc91x.c | 47 ++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 22 deletions(-) commit 9e0b516af24eb72502bb61d383c22cfbe0407c2c Author: Philippe Reynes Date: Tue Feb 28 23:49:38 2017 +0100 net: smsc: smc911x: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smc911x.c | 51 ++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 24 deletions(-) commit dd3bf50b35e3e111d6325207177b12af88aec824 Author: Sebastian Reichel Date: Thu Mar 2 01:27:09 2017 +0100 rtc: cpcap: new rtc driver This driver supports the Motorola CPCAP PMIC found on some of Motorola's mobile phones, such as the Droid 4. Tested-by: Tony Lindgren Signed-off-by: Sebastian Reichel Acked-by: Rob Herring Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/cpcap-rtc.txt | 18 ++ drivers/rtc/Kconfig | 7 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-cpcap.c | 332 +++++++++++++++++++++ 4 files changed, 358 insertions(+) commit 0522de00929e9e9ee51235fc40035179e4d45381 Author: Sebastian Reichel Date: Thu Mar 2 01:27:08 2017 +0100 dt-bindings: Add vendor prefix for Motorola Motorola was involved in semiconductor and mobile phone business. The "motorola," prefix is already used by a couple of bindings: * rtc/rtc-cmos.txt * mfd/motorola-cpcap.txt * regulator/cpcap-regulator.txt Apart from that it is used in the DT file for the Droid 4 mobile phone. Acked-by: Rob Herring Signed-off-by: Sebastian Reichel Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 0c749eacaa80a36b9d2b74c6c99c61baa0196eb9 Author: Dmitry Torokhov Date: Wed Mar 1 15:34:38 2017 -0800 rtc: omap: mark PM methods as __maybe_unused Instead of using #ifdef guards around PM methods, let's annotate them as __maybe_unused, as it provides better compile coverage. Also drop empty stub for omap_rtc_runtime_resume(). Signed-off-by: Dmitry Torokhov Signed-off-by: Alexandre Belloni drivers/rtc/rtc-omap.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit b9de1a1dae8c78de05a59e40632aa8241ef78e1a Author: Dmitry Torokhov Date: Wed Mar 1 15:33:23 2017 -0800 rtc: omap: remove incorrect __exit markups Even if bus is not hot-pluggable, devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe(), which specifically disables sysfs bind/unbind attributes. Signed-off-by: Dmitry Torokhov Reviewed-By: Sebastian Reichel Signed-off-by: Alexandre Belloni drivers/rtc/rtc-omap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ff764b88e63a097a6a8383f0f1f76e7fa5a5e096 Author: Javier Martinez Canillas Date: Fri Mar 3 11:29:24 2017 -0300 rtc: rs5c372: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rs5c372.c | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) commit eb235c561d04ea64d19a0d3e1413f9c3bc25596c Author: Javier Martinez Canillas Date: Fri Mar 3 11:29:23 2017 -0300 rtc: m41t80: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 2 deletions(-) commit ffbecfbdbeeebe9749398fe9eb9eab2dd47ddff4 Author: Javier Martinez Canillas Date: Fri Mar 3 11:29:22 2017 -0300 rtc: rx8581: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rx8581.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 21f274327080271dc5adb7ae9852ffa5e028ce55 Author: Javier Martinez Canillas Date: Fri Mar 3 11:29:21 2017 -0300 rtc: s35390a: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s35390a.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0383550402352c0036129524f751d8182e837960 Author: Javier Martinez Canillas Date: Fri Mar 3 11:29:20 2017 -0300 rtc: isl1208: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-isl1208.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit abac12e1105e7f3572f641db7583547069c1deaf Author: Javier Martinez Canillas Date: Fri Mar 3 11:29:19 2017 -0300 rtc: ds1374: Set .of_match_table to OF device ID table The driver has a OF device ID table but the struct i2c_driver .of_match_table field is not set. Signed-off-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1374.c | 1 + 1 file changed, 1 insertion(+) commit 23194ac0992be4f4f6ebd0926dac473ed03568d0 Author: Javier Martinez Canillas Date: Fri Mar 3 11:29:18 2017 -0300 rtc: rtc-ds1672: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1672.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 4dfbd1378dceaa418ec1634428ffe038e0870b66 Author: Javier Martinez Canillas Date: Fri Mar 3 11:29:17 2017 -0300 rtc: ds3232: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds3232.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 81b779ce5f3bb1df54d0accd83834a1c90a32121 Author: Javier Martinez Canillas Date: Fri Mar 3 11:29:16 2017 -0300 rtc: rx8010: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rx8010.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7ef6d2c266e5b0eb09ba0d5f5aa2dfc11df19745 Author: Javier Martinez Canillas Date: Fri Mar 3 11:29:15 2017 -0300 rtc: ds1307: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) commit 36138c70e69c9272bd7e0be517f1ac7ad0c4f0df Author: Javier Martinez Canillas Date: Fri Mar 3 11:29:14 2017 -0300 rtc: bq32k: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-bq32k.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e696a1dd7e80ee64fd930982d9e1c6b152635534 Author: Javier Martinez Canillas Date: Fri Mar 3 11:29:13 2017 -0300 rtc: rv3029: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv3029c2.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 740ad8f43c78a8dc3ec73515b7b847ca0edac781 Author: Javier Martinez Canillas Date: Fri Mar 3 11:29:12 2017 -0300 rtc: rv8803: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv8803.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 4b9502e63b5e2b1b5ef491919d3219b9440fe0b3 Author: Elena Reshetova Date: Wed Mar 8 10:00:40 2017 +0200 kernel: convert css_set.refcount from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Tejun Heo include/linux/cgroup-defs.h | 3 ++- kernel/cgroup/cgroup-internal.h | 5 +++-- kernel/cgroup/cgroup-v1.c | 4 ++-- kernel/cgroup/cgroup.c | 6 +++--- 4 files changed, 10 insertions(+), 8 deletions(-) commit 86b04268d4b25c3a00fa5f77ceebabecf681040a Author: Daniel Vetter Date: Wed Mar 1 10:52:26 2017 +0100 drm/i915: Fix up verify_encoder_state The trouble here is that looking at all connector->state in the verifier isn't good, because that's run from the commit work, which doesn't hold the connection_mutex. Which means we're only allowed to look at states in our atomic update. The simple fix for future proofing would be to switch over to drm_for_each_connector_in_state, but that has the problem that the verification then fails if not all connectors are in the state. And we also need to be careful to check both old and new encoders, and not screw things up when an encoder gets reassigned. Note that this isn't the full fix, since we still look at connector->state. To fix that, we need Maarten's patch series to switch over to state pointers within drm_atomic_state, but that's a different series. v2: Use oldnew iterator (Maarten). v3: Rebase onto the iter_get/put->iter_begin/end rename. Cc: Thierry Reding Cc: Maarten Lankhorst Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170301095226.30584-6-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/intel_display.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit f9e905cabdccfda0be094debbf21cb2cc45b8c51 Author: Daniel Vetter Date: Wed Mar 1 10:52:25 2017 +0100 drm/i915: use for_each_intel_connector_iter in intel_display.c This gets rid of the last users of for_each_intel_connector(), remove that too. At first I wasn't sure whether the 2 loops in the modeset state checker should instead only loop over the connectors in the atomic commit. But we never add connectors to an atomic update if they don't (or won't have) a CRTC assigned, which means there'd be a gap in check coverage. Hence loop over everything on those too. v2: Rebase onto the iter_get/put->iter_begin/end rename. Cc: Thierry Reding Cc: Maarten Lankhorst Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170301095226.30584-5-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/i915_drv.h | 5 ----- drivers/gpu/drm/i915/intel_display.c | 20 ++++++++++++++++---- 2 files changed, 16 insertions(+), 9 deletions(-) commit 51ec53da407a7a6e1c28e973524a15d521f96c7a Author: Daniel Vetter Date: Wed Mar 1 10:52:24 2017 +0100 drm/i915: Make intel_get_pipe_from_connector atomic Drive-by fixup while looking at all the connector_list walkers - holding connection_mutex does actually _not_ give you locking to look at the legacy drm_connector->encoder->crtc pointer chain. That one is solely owned by the atomic commit workers. Instead we must inspect the atomic state. Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170301095226.30584-4-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/intel_display.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f57c84212d8da657def31ca04a898a2e98396cfa Author: Daniel Vetter Date: Wed Mar 1 10:52:23 2017 +0100 drm/i915: use drm_connector_list_iter in intel_opregion.c One case where I nuked a now unecessary locking, otherwise all just boring stuff. v2: Rebase onto the iter_get/put->iter_begin/end rename. Cc: Thierry Reding Cc: Maarten Lankhorst Cc: Jani Nikula Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170301095226.30584-3-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/intel_opregion.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit cc3ca4f33d922f3de3fb8e3ca3708f258eb953b1 Author: Daniel Vetter Date: Wed Mar 1 10:52:22 2017 +0100 drm/i915: use drm_connector_list_iter in intel_hotplug.c Nothing special, just rote conversion. v2: Rebase onto the iter_get/put->iter_begin/end rename. Cc: Thierry Reding Cc: Maarten Lankhorst Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170301095226.30584-2-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/intel_hotplug.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit 3f6a5e1ea6b91ec08548101010fe0ab33c25950b Author: Daniel Vetter Date: Wed Mar 1 10:52:21 2017 +0100 drm/i915: Use drm_connector_list_iter in debugfs While at it also try to reduce the locking a bit to what's really just needed instead of everything that we could possibly lock. Added a new for_each_intel_connector_iter which includes the cast to intel_connector. Otherwise just plain transformation with nothing special going on. v2: Review from Maarten: - Stick with modeset_lock_all in sink_crc, it looks at crtc->state. - Fix up early loop exit in i915_displayport_test_active_write. v3: Rebase onto the iter_get/put->iter_begin/end rename. Cc: Thierry Reding Cc: Maarten Lankhorst Reviewed-by: Maarten Lankhorst (v2) Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170301095226.30584-1-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/i915_debugfs.c | 59 ++++++++++++++++++++++++------------- drivers/gpu/drm/i915/i915_drv.h | 3 ++ 2 files changed, 42 insertions(+), 20 deletions(-) commit fabeb165afd52a3fb05b9b68e5a3550609b8e157 Author: Michał Kępień Date: Wed Mar 8 09:20:10 2017 -0800 Input: sparse-keymap - use a managed allocation for keymap copy Some platform drivers use devm_input_allocate_device() together with sparse_keymap_setup() in their .probe callbacks. While using the former simplifies error handling, using the latter necessitates calling sparse_keymap_free() in the error path and upon module unloading to avoid leaking the copy of the keymap allocated by sparse_keymap_setup(). To help prevent such leaks and enable simpler error handling, make sparse_keymap_setup() use devm_kmemdup() to create the keymap copy so that it gets automatically freed. This works for both managed and non-managed input devices as the keymap is freed after the last reference to the input device is dropped. Note that actions previously taken by sparse_keymap_free(), i.e. taking the input device's mutex and zeroing its keycode and keycodemax fields, are now redundant because the managed keymap will always be freed after the input device is unregistered. Signed-off-by: Michał Kępień Signed-off-by: Dmitry Torokhov drivers/input/sparse-keymap.c | 39 +++++++++------------------------------ 1 file changed, 9 insertions(+), 30 deletions(-) commit 626994e0748019f9987ac520f1dcfd0adb7e34c6 Author: Boris Brezillon Date: Fri May 27 10:15:03 2016 +0200 mtd: nand: hynix: Add read-retry support for 1x nm MLC NANDs All Hynix MLC NANDs produced with the 1x nm process support read-retry. This read retry implementation should also be re-usable for other Hynix NANDs, but the method to retrieve the read-retry parameters from the read-retry OTP area might change a bit (some NANDs are even using a fixed set of values instead of retrieving those information from the OTP area). Signed-off-by: Boris Brezillon Acked-by: Richard Weinberger drivers/mtd/nand/nand_hynix.c | 357 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 356 insertions(+), 1 deletion(-) commit 78f3482d74809f278614470fb68536db16152ec8 Author: Boris Brezillon Date: Fri May 27 14:36:36 2016 +0200 mtd: nand: hynix: Rework NAND ID decoding to extract more information The current NAND ID detection in nand_hynix.c is not handling the different scheme used by Hynix, thus forcing developers to add new entry to the nand_ids table each time they want to support a new MLC NAND. Enhance the detection logic to handle all known formats. This does not necessarily mean we are handling all the cases, but if new formats are discovered, the code should evolve to take them into account instead of adding more full-id entries to the nand_ids table. Signed-off-by: Boris Brezillon Acked-by: Richard Weinberger drivers/mtd/nand/nand_hynix.c | 228 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 209 insertions(+), 19 deletions(-) commit 8fc82d456e40a073d7e85d7825a345698f4b5a40 Author: Hans de Goede Date: Wed Jun 8 10:45:28 2016 +0200 mtd: nand: samsung: Retrieve ECC requirements from extended ID On some nand controllers with hw-ecc the controller code wants to know the ecc strength and size and having these as 0, 0 is not accepted. Specifying these in devicetree is possible but undesirable as the nand may be different in different production runs of the same board, so it is better to get this info from the nand id where possible. This commit adds code to read the ecc strength and size from the nand for Samsung extended-id nands. This code is based on the info for the 5th id byte in the datasheets for the following Samsung nands: K9GAG08U0E, K9GAG08U0F, K9GAG08X0D, K9GBG08U0A, K9GBG08U0B. These all use these bits in the exact same way. Signed-off-by: Hans de Goede Acked-by: Richard Weinberger Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_samsung.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 3b5206f4be9b65d2f0f85b3239cf117a1d0de7ce Author: Boris Brezillon Date: Wed Jun 8 10:43:26 2016 +0200 mtd: nand: Move Macronix specific initialization in nand_macronix.c Move Macronix specific initialization logic into nand_macronix.c. This is part of the "separate vendor specific code from core" cleanup process. Signed-off-by: Boris Brezillon drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/nand_base.c | 11 ----------- drivers/mtd/nand/nand_ids.c | 2 +- drivers/mtd/nand/nand_macronix.c | 30 ++++++++++++++++++++++++++++++ include/linux/mtd/nand.h | 1 + 5 files changed, 33 insertions(+), 12 deletions(-) commit 229204da53b31d576fcc1c93a33626943ea8202c Author: Boris Brezillon Date: Wed Jun 8 10:42:23 2016 +0200 mtd: nand: Move AMD/Spansion specific init/detection logic in nand_amd.c Move AMD/Spansion specific initialization/detection logic into nand_amd.c. This is part of the "separate vendor specific code from core" cleanup process. Signed-off-by: Boris Brezillon Acked-by: Richard Weinberger drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/nand_amd.c | 51 ++++++++++++++++++++++++++++++++++++++++++++ drivers/mtd/nand/nand_base.c | 18 +--------------- drivers/mtd/nand/nand_ids.c | 2 +- include/linux/mtd/nand.h | 1 + 5 files changed, 55 insertions(+), 18 deletions(-) commit 10d4e75c36f6c16311dde1461f318210da357219 Author: Boris Brezillon Date: Wed Jun 8 10:38:57 2016 +0200 mtd: nand: Move Micron specific init logic in nand_micron.c Move Micron specific initialization logic into nand_micron.c. This is part of the "separate vendor specific code from core" cleanup process. Signed-off-by: Boris Brezillon Acked-by: Richard Weinberger drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/nand_base.c | 32 +--------------- drivers/mtd/nand/nand_ids.c | 2 +- drivers/mtd/nand/nand_micron.c | 86 ++++++++++++++++++++++++++++++++++++++++++ include/linux/mtd/nand.h | 21 +---------- 5 files changed, 91 insertions(+), 51 deletions(-) commit 9b2d61f80b060ce3ea5af2a99e148b0b214932b2 Author: Boris Brezillon Date: Wed Jun 8 10:34:57 2016 +0200 mtd: nand: Move Toshiba specific init/detection logic in nand_toshiba.c Move Toshiba specific initialization and detection logic into nand_toshiba.c. This is part of the "separate vendor specific code from core" cleanup process. Signed-off-by: Boris Brezillon Acked-by: Richard Weinberger drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/nand_base.c | 19 ++------------- drivers/mtd/nand/nand_ids.c | 2 +- drivers/mtd/nand/nand_toshiba.c | 51 +++++++++++++++++++++++++++++++++++++++++ include/linux/mtd/nand.h | 1 + 5 files changed, 56 insertions(+), 18 deletions(-) commit 01389b6bd2f4f7649cdbb4a99a15d9e0c05d6f8c Author: Boris Brezillon Date: Wed Jun 8 10:30:18 2016 +0200 mtd: nand: Move Hynix specific init/detection logic in nand_hynix.c Move Hynix specific initialization and detection logic into nand_hynix.c. This is part of the "separate vendor specific code from core" cleanup process. Signed-off-by: Boris Brezillon Acked-by: Richard Weinberger drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/nand_base.c | 114 +++++++++++------------------------------- drivers/mtd/nand/nand_hynix.c | 84 +++++++++++++++++++++++++++++++ drivers/mtd/nand/nand_ids.c | 2 +- include/linux/mtd/nand.h | 1 + 5 files changed, 115 insertions(+), 87 deletions(-) commit c51d0ac59f24200dfdccc897ff7c3c9446c7599a Author: Boris Brezillon Date: Wed Jun 8 10:22:19 2016 +0200 mtd: nand: Move Samsung specific init/detection logic in nand_samsung.c Move Samsung specific initialization and detection logic into nand_samsung.c. This is part of the "separate vendor specific code from core" cleanup process. Signed-off-by: Boris Brezillon Acked-by: Richard Weinberger drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/nand_base.c | 52 ++--------------------- drivers/mtd/nand/nand_ids.c | 4 +- drivers/mtd/nand/nand_samsung.c | 92 +++++++++++++++++++++++++++++++++++++++++ include/linux/mtd/nand.h | 2 + 5 files changed, 101 insertions(+), 50 deletions(-) commit abbe26d144ec22bb067fa414d717b9f7ca2e12bd Author: Boris Brezillon Date: Wed Jun 8 09:32:55 2016 +0200 mtd: nand: Add manufacturer specific initialization/detection steps A lot of NANDs are implementing generic features in a non-generic way, or are providing advanced auto-detection logic where the NAND ID bytes meaning changes with the NAND generation. Providing this vendor specific initialization step will allow us to get rid of full-id entries in the nand_ids table or all the vendor specific cases added over the time in the generic NAND ID decoding logic. Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 75 ++++++++++++++++++++++++++++++++++++++------ include/linux/mtd/nand.h | 35 +++++++++++++++++++++ 2 files changed, 100 insertions(+), 10 deletions(-) commit bcc678c2d7a0e0af14cb3d858ebd367be378c172 Author: Boris Brezillon Date: Sat Jan 7 15:48:25 2017 +0100 mtd: nand: Do not expose the NAND manufacturer table directly There is no reason to expose the NAND manufacturer table. Provide an helper function to find manufacturers by their id. We also turn the nand_manufacturers table into a const array, since its members are not modified after the initial assignment. Finally, we remove the sentinel manufacturer entry from the manufacturers table (we already have the array size information given by ARRAY_SIZE()), and add the nand_manufacturer_name() helper to handle the "Unknown" case properly. Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 23 +++++++++++------------ drivers/mtd/nand/nand_ids.c | 22 ++++++++++++++++++++-- include/linux/mtd/nand.h | 9 ++++++++- 3 files changed, 39 insertions(+), 15 deletions(-) commit f16bd7ca045729e1104a9353dfd792ea98931b80 Author: Boris Brezillon Date: Tue May 24 23:07:46 2016 +0200 mtd: nand: Kill the MTD_NAND_IDS Kconfig option MTD_NAND_IDS is selected by MTD_NAND, which makes it useless. Remove the Kconfig option and link nand_ids.o into the nand.o object file. Doing that also prevents creating an extra nand_ids.ko module when MTD_NAND is activated as a module. Since nand_ids.c is no longer compiled as a standalone module and the nand_manuf_ids/nand_flash_ids symbols are only used in nand_base.c, we can get rid of the MODULE_XXX() and EXPORT_SYMBOL() definitions. Signed-off-by: Boris Brezillon arch/cris/arch-v32/drivers/Kconfig | 1 - drivers/mtd/nand/Kconfig | 4 ---- drivers/mtd/nand/Makefile | 3 +-- drivers/mtd/nand/nand_ids.c | 7 ------- 4 files changed, 1 insertion(+), 14 deletions(-) commit 8cfb9ab68f90703d419870fce7ac21ac401399f2 Author: Boris Brezillon Date: Sat Jan 7 15:15:57 2017 +0100 mtd: nand: Rename the nand_manufacturers struct Drop the 's' at the end of nand_manufacturers since the struct is actually describing a single manufacturer, not a manufacturer table. Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_ids.c | 2 +- include/linux/mtd/nand.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 7bb427990ee36482afcae859b1883e5fa1244ef2 Author: Boris Brezillon Date: Tue May 24 20:55:33 2016 +0200 mtd: nand: Rename nand_get_flash_type() into nand_detect() Since commit 4722c0e958e6 ("mtd: nand: change return type of nand_get_flash_type() to int"), nand_get_flash_type() no longer returns a nand_flash_dev object. Rename the function to match this new behavior. Signed-off-by: Boris Brezillon Acked-by: Richard Weinberger drivers/mtd/nand/nand_base.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 29a198a1592d83f2bc1be3b2631b3bcf3d5b380f Author: Boris Brezillon Date: Tue May 24 20:17:48 2016 +0200 mtd: nand: Get rid of busw parameter Auto-detection functions are passed a busw parameter to retrieve the actual NAND bus width and eventually set the correct value in chip->options. Rework the nand_get_flash_type() function to get rid of this extra parameter and let detection code directly set the NAND_BUSWIDTH_16 flag in chip->options if needed. Signed-off-by: Boris Brezillon Acked-by: Richard Weinberger Reviewed-by: Marek Vasut drivers/mtd/nand/nand_base.c | 68 ++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 31 deletions(-) commit 7f501f0a72036dc29ad9a53811474c393634b401 Author: Boris Brezillon Date: Tue May 24 19:20:05 2016 +0200 mtd: nand: Store nand ID in struct nand_chip Store the NAND ID in struct nand_chip to avoid passing id_data and id_len as function parameters. Signed-off-by: Boris Brezillon Acked-by: Richard Weinberger Reviewed-by: Marek Vasut drivers/mtd/nand/nand_base.c | 55 ++++++++++++++++++++++++-------------------- include/linux/mtd/nand.h | 13 +++++++++++ 2 files changed, 43 insertions(+), 25 deletions(-) commit cbe435a182d15d82a10a6b56a96406d957ceb35c Author: Boris Brezillon Date: Tue May 24 16:56:22 2016 +0200 mtd: nand: Get rid of the mtd parameter in all auto-detection functions Now that struct nand_chip embeds an mtd_info object we can get rid of the mtd parameter and extract it from the chip parameter with the nand_to_mtd() helper. Signed-off-by: Boris Brezillon Acked-by: Richard Weinberger Reviewed-by: Marek Vasut drivers/mtd/nand/nand_base.c | 54 ++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 24 deletions(-) commit 5b5554c51d38a227c4c5bee6e57026e4ebb0bde9 Author: Chris Wilson Date: Wed Mar 8 14:22:38 2017 +0000 drm/i915: Check for an invalid seqno before __i915_gem_request_started __i915_gem_request_started() asserts that the seqno is valid, but i915_spin_request() was not checking before querying whether the request had started. Reported-by: Michał Winiarski Fixes: 754c9fd57649 ("drm/i915: Protect the request->global_seqno with the engine->timeline lock") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Michał Winiarski Link: http://patchwork.freedesktop.org/patch/msgid/20170308142238.22994-1-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_request.h | 3 +++ 1 file changed, 3 insertions(+) commit f166244a6dafdbb6c4e9eba77a04fd55a5bf9657 Author: Chris Wilson Date: Wed Mar 8 13:26:29 2017 +0000 drm/i915: Purge i915_gem_object_is_dead() i915_gem_object_is_dead() was a temporary lockdep aide whilst transitioning to a new locking structure for obj->mm. Since commit 1233e2db199d ("drm/i915: Move object backing storage manipulation to its own locking") it is now unused and should be removed. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170308132629.7987-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_object.h | 6 ------ 1 file changed, 6 deletions(-) commit 03d1cac6eefef523fa6118f156e811252e6276b4 Author: Chris Wilson Date: Wed Mar 8 13:26:28 2017 +0000 drm/i915: Avoiding recursing on ww_mutex inside shrinker We have to avoid taking ww_mutex inside the shrinker as we use it as a plain mutex type and so need to avoid recursive deadlocks: [ 602.771969] ================================= [ 602.771970] [ INFO: inconsistent lock state ] [ 602.771973] 4.10.0gpudebug+ #122 Not tainted [ 602.771974] --------------------------------- [ 602.771975] inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage. [ 602.771978] kswapd0/40 [HC0[0]:SC0[0]:HE1:SE1] takes: [ 602.771979] (reservation_ww_class_mutex){+.+.?.}, at: [] i915_gem_object_wait+0x39a/0x410 [i915] [ 602.772020] {RECLAIM_FS-ON-W} state was registered at: [ 602.772024] mark_held_locks+0x76/0x90 [ 602.772026] lockdep_trace_alloc+0xb8/0xc0 [ 602.772028] __kmalloc_track_caller+0x5d/0x130 [ 602.772031] krealloc+0x89/0xb0 [ 602.772033] reservation_object_reserve_shared+0xaf/0xd0 [ 602.772055] i915_gem_do_execbuffer.isra.35+0x1413/0x18b0 [i915] [ 602.772075] i915_gem_execbuffer2+0x10e/0x1d0 [i915] [ 602.772078] drm_ioctl+0x291/0x480 [ 602.772079] do_vfs_ioctl+0x695/0x6f0 [ 602.772081] SyS_ioctl+0x3c/0x70 [ 602.772084] entry_SYSCALL_64_fastpath+0x18/0xad [ 602.772085] irq event stamp: 5197423 [ 602.772088] hardirqs last enabled at (5197423): [] kfree+0xdd/0x170 [ 602.772091] hardirqs last disabled at (5197422): [] kfree+0xb9/0x170 [ 602.772095] softirqs last enabled at (5190992): [] __do_softirq+0x221/0x280 [ 602.772097] softirqs last disabled at (5190575): [] irq_exit+0x64/0xc0 [ 602.772099] other info that might help us debug this: [ 602.772100] Possible unsafe locking scenario: [ 602.772101] CPU0 [ 602.772101] ---- [ 602.772102] lock(reservation_ww_class_mutex); [ 602.772104] [ 602.772105] lock(reservation_ww_class_mutex); [ 602.772107] *** DEADLOCK *** [ 602.772109] 2 locks held by kswapd0/40: [ 602.772110] #0: (shrinker_rwsem){++++..}, at: [] shrink_slab.constprop.62+0x35/0x280 [ 602.772116] #1: (&dev->struct_mutex){+.+.+.}, at: [] i915_gem_shrinker_lock+0x27/0x60 [i915] [ 602.772141] stack backtrace: [ 602.772144] CPU: 2 PID: 40 Comm: kswapd0 Not tainted 4.10.0gpudebug+ #122 [ 602.772145] Hardware name: LENOVO 42433ZG/42433ZG, BIOS 8AET64WW (1.44 ) 07/26/2013 [ 602.772147] Call Trace: [ 602.772151] dump_stack+0x68/0xa1 [ 602.772153] print_usage_bug+0x1d4/0x1f0 [ 602.772155] mark_lock+0x390/0x530 [ 602.772157] ? print_irq_inversion_bug+0x200/0x200 [ 602.772159] __lock_acquire+0x405/0x1260 [ 602.772181] ? i915_gem_object_wait+0x39a/0x410 [i915] [ 602.772183] lock_acquire+0x60/0x80 [ 602.772205] ? i915_gem_object_wait+0x39a/0x410 [i915] [ 602.772207] mutex_lock_nested+0x69/0x760 [ 602.772229] ? i915_gem_object_wait+0x39a/0x410 [i915] [ 602.772231] ? kfree+0xdd/0x170 [ 602.772253] ? i915_gem_object_wait+0x163/0x410 [i915] [ 602.772255] ? trace_hardirqs_on_caller+0x18d/0x1c0 [ 602.772256] ? trace_hardirqs_on+0xd/0x10 [ 602.772278] i915_gem_object_wait+0x39a/0x410 [i915] [ 602.772300] i915_gem_object_unbind+0x5e/0x130 [i915] [ 602.772323] i915_gem_shrink+0x22d/0x3d0 [i915] [ 602.772347] i915_gem_shrinker_scan+0x3f/0x80 [i915] [ 602.772349] shrink_slab.constprop.62+0x1ad/0x280 [ 602.772352] shrink_node+0x52/0x80 [ 602.772355] kswapd+0x427/0x5c0 [ 602.772358] kthread+0x122/0x130 [ 602.772360] ? try_to_free_pages+0x270/0x270 [ 602.772362] ? kthread_stop+0x70/0x70 [ 602.772365] ret_from_fork+0x2e/0x40 v2: Add commentary about the pruning being opportunistic Reported-by: Jan Nordholz Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99977#c10 Fixes: e54ca9774777 ("drm/i915: Remove completed fences after a wait") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Matthew Auld Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170308132629.7987-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit d1caa99055382c91b57244343020ea37c4fa4d09 Author: Quentin Schulz Date: Tue Dec 13 15:33:32 2016 +0100 iio: adc: add support for Allwinner SoCs ADC The Allwinner SoCs all have an ADC that can also act as a touchscreen controller and a thermal sensor. This patch adds the ADC driver which is based on the MFD for the same SoCs ADC. This also registers the thermal adc channel in the iio map array so iio_hwmon could use it without modifying the Device Tree. This registers the driver in the thermal framework. The thermal sensor requires the IP to be in touchscreen mode to return correct values. Therefore, if the user is continuously reading the ADC channel(s), the thermal framework in which the thermal sensor is registered will switch the IP in touchscreen mode to get a temperature value and requires a delay of 100ms (because of the mode switching), then the ADC will switch back to ADC mode and requires also a delay of 100ms. If the ADC readings are critical to user and the SoC temperature is not, this driver is capable of not registering the thermal sensor in the thermal framework and thus, "quicken" the ADC readings. This driver probes on three different platform_device_id to take into account slight differences (registers bit and temperature computation) between Allwinner SoCs ADCs. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Acked-by: Jonathan Cameron Acked-for-MFD-by: Lee Jones Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 17 ++ drivers/iio/adc/Makefile | 1 + drivers/iio/adc/sun4i-gpadc-iio.c | 613 ++++++++++++++++++++++++++++++++++++++ include/linux/mfd/sun4i-gpadc.h | 2 + 4 files changed, 633 insertions(+) commit e0033faac39b814d23e11249d32b4e22daeeff33 Author: Wolfram Sang Date: Mon Feb 6 17:54:11 2017 +0100 MAINTAINERS: drop broken reference to i2c/trivial-devices Due to RST rework, the reference to i2c/trivial-devices was changed, but the result is broken. However, let's just drop the whole reference, since it doesn't make sense in the first place to reference this "global" file for a single driver. Fixes: 8c27ceff3604b2 ("docs: fix locations of several documents that got moved") Signed-off-by: Wolfram Sang Cc: Mauro Carvalho Chehab Cc: Kevin Tsai Cc: Jonathan Cameron Signed-off-by: Jonathan Cameron MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit db233ef8a355d2a9fc62815ec37fb8edee581958 Author: Wei Yongjun Date: Mon Feb 6 16:41:42 2017 +0000 iio: adc: max11100: remove .owner field for driver Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun Signed-off-by: Jonathan Cameron drivers/iio/adc/max11100.c | 1 - 1 file changed, 1 deletion(-) commit 7ea79ae86c28e729d51fa5703b093d27cca25217 Author: Rafał Miłecki Date: Mon Mar 6 06:19:45 2017 +0100 leds: gpio: use OF variant of LED registering function In leds-gpio we support LEDs specified in DT so we should use (devm_)of_led_classdev_register. This allows passing DT node as argument for use by the LED subsystem. Signed-off-by: Rafał Miłecki Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski drivers/leds/leds-gpio.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 442c609830e98919faa78b797e9b89c53bab9cbf Author: Rafał Miłecki Date: Mon Mar 6 06:19:44 2017 +0100 leds: core: add OF variants of LED registering functions These new functions allow passing an additional device_node argument that will be internally set for created LED device. Thanks to this LED core code and triggers will be able to access DT node for reading extra info. The easiest solution for achieving this was reworking old functions to more generic ones & adding simple defines for API compatibility. Signed-off-by: Rafał Miłecki Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski drivers/leds/led-class.c | 26 ++++++++++++++++---------- include/linux/leds.h | 14 ++++++++++---- 2 files changed, 26 insertions(+), 14 deletions(-) commit c1183db8853d14df390748aa6baa69734db151aa Author: Taehee Yoo Date: Tue Mar 7 22:02:50 2017 +0900 netfilter: nf_reject: remove unused variable variable oiph is not used. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/nf_reject_ipv4.c | 3 --- 1 file changed, 3 deletions(-) commit efc9b8e33b8b5ef890288758454ce62a1319c94a Author: Florian Westphal Date: Tue Mar 7 12:45:04 2017 +0100 netfilter: bridge: remove unneeded rcu_read_lock as comment says, the function is always called with rcu read lock held. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/bridge/br_netfilter_hooks.c | 3 --- 1 file changed, 3 deletions(-) commit 3e062eb21df80977a63e630d7da326c9b1e9ab51 Author: Colin Ian King Date: Wed Feb 22 23:35:52 2017 +0000 rtlwifi: fix spelling mistake: "conuntry" -> "country" trivial fix to spelling mistake in RT_TRACE message Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/regd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3beb27028c446dce74a1690ea3ef2dfae7503e74 Author: Nils Holland Date: Mon Feb 20 00:59:28 2017 +0100 rtl8187: Enable monitor mode to fix multicast reception The rtl8187 cards don't seem to receive multicast frames, which, among other things, makes them fail to receive RAs in IPv6 networks. The cause seems to be that the RTL818X_RX_CONF_MULTICAST flag doesn't have the desired effect. Fix the issue by setting RTL818X_RX_CONF_MONITOR instead, which puts the card into monitor mode and resolves the problem so that multicast frames are sucessfully passed to the kernel. The existence of the problem and the effectiveness of the solution has originally been confirmed on an 8187B based card with the USB id of 0bda:8197. Subsequent testing by Larry Finger on an 8187L based card, which follows the second (8187, i.e. "non-b") code path in the driver, has confirmed that the fix does not cause any noticeable regresssions there either. Signed-off-by: Nils Holland Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit dd35cc0896faff5ed9d22eac9ea4a1920e2eec0c Author: Stanislaw Gruszka Date: Wed Feb 15 10:25:13 2017 +0100 rt2x00: fix rt2x00debug_dump_frame comment Reported-by: Jeroen Roovers Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb47ada8dc3c30c8e7b415da155742b49536c61e Author: Stanislaw Gruszka Date: Wed Feb 15 10:25:12 2017 +0100 rt2800: use TXOP_BACKOFF for probe frames Even if we do not set AMPDU bit in TXWI, device still can aggregate frame and send it with rate not corresponding to requested. That mean we can do not sent probe frames with requested rate. To prevent that use TXOP_BACKOFF for probe frames. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 9d7a7a4d2b02bcd30fb5fe4270278212353cc332 Author: Stanislaw Gruszka Date: Wed Feb 15 10:25:11 2017 +0100 rt2800: status based rate flags for nomatch case We use skb_desc->tx_rate_flags from entry as rate[].flags even if skb does not match status. Patch corrects flags and also fixes mcs for legacy rates. rt2800_rate_from_status() is based on Felix's mt76 mt76x2_mac_process_tx_rate() function. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800.h | 2 ++ drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 35 +++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) commit 293dff78ee058ec1e0b90e05a803c512b6a2097f Author: Stanislaw Gruszka Date: Wed Feb 15 10:25:10 2017 +0100 rt2x00: use txdone_nomatch on rt2800usb If we do not match skb entry, provide tx status via nomatch procedure. Currently in that case we do rt2x00lib_txdone_noinfo(TXDONE_NOINFO), which actually assume that entry->skb was posted without retries and provide rate saved in skb desc as successful. Patch changed that to rate read from TX_STAT_FIFO, however still do not provide correct number of retries. On SoC/PCI devices we keep providing status via standard txdone procedure, no change in those devices, though we should thing about it. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 31 ++++++++++++++++++++----- drivers/net/wireless/ralink/rt2x00/rt2800lib.h | 3 ++- drivers/net/wireless/ralink/rt2x00/rt2800mmio.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 18 ++++++-------- 4 files changed, 35 insertions(+), 19 deletions(-) commit ec80ad70d778af7665992672896633ebd3b02ac8 Author: Stanislaw Gruszka Date: Wed Feb 15 10:25:09 2017 +0100 rt2x00: fixup fill_tx_status for nomatch case Add bits rt2x00lib_fill_tx_status() when filling status in nomatch case and hopefully do not break the function for existing cases. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 6 +++++- drivers/net/wireless/ralink/rt2x00/rt2x00queue.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) commit a09305d052166cb489402a63a5d275e954e0b923 Author: Stanislaw Gruszka Date: Wed Feb 15 10:25:08 2017 +0100 rt2x00: add txdone nomatch function This txdone nomatch function will be used when we get status from the HW, but we could not match it with any sent skb. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00.h | 2 ++ drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 50 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) commit 56646adf9cd60b488ddc5633a2d9aa1f30efa5db Author: Stanislaw Gruszka Date: Wed Feb 15 10:25:07 2017 +0100 rt2x00: separte clearing entry from rt2x00lib_txdone This makes rt2x00lib_txdone a bit simpler and will allow to reuse code in different variant of txdone which I'm preparing. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 51 +++++++++++++++----------- 1 file changed, 29 insertions(+), 22 deletions(-) commit 5edb05afebba8f488a30db29550e55c42eea6d6a Author: Stanislaw Gruszka Date: Wed Feb 15 10:25:06 2017 +0100 rt2x00: separte filling tx status from rt2x00lib_txdone This makes rt2x00lib_txdone a bit simpler and will allow to reuse code in different variant of txdone which I'm preparing. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 141 +++++++++++++------------ 1 file changed, 76 insertions(+), 65 deletions(-) commit a13d985f26f6df07d5c5c0e190477628e236babc Author: Stanislaw Gruszka Date: Wed Feb 15 10:25:05 2017 +0100 rt2800: identify station based on status WCID Add framework to identify sta based on tx status WCID. This is currently not used, will start be utilized in the future patch. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 5 +++++ drivers/net/wireless/ralink/rt2x00/rt2800lib.h | 1 + drivers/net/wireless/ralink/rt2x00/rt2x00queue.h | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) commit 96609f366c6f792421e1939c5c834abbe24eb88a Author: Gabor Juhos Date: Wed Feb 15 10:25:04 2017 +0100 rt2x00: rt2800lib: move rt2800_drv_data declaration into rt2800lib.h The rt2800_drv_data structure contains driver specific information. Move the declaration into the rt2800lib.h header which is a more logical place for it. Also fix the comment style to avoid checkpatch warning. The patch contains no functional changes, it is in preparation for the next patch. Signed-off-by: Gabor Juhos Signed-off-by: Daniel Golle Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800.h | 25 ------------------------- drivers/net/wireless/ralink/rt2x00/rt2800lib.h | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 25 deletions(-) commit a4bb5b1b47cb50ac6feb662fade4608f8dd0248b Author: Rafał Miłecki Date: Tue Feb 14 23:03:46 2017 +0100 bcma: gpio: set of_node regardless of the host type DT allows describing many device types, not only platform ones. If e.g. bcma is hosted on PCI(e) and it has its of_node, let's pass it to the GPIO subsystem. This allows GPIO code to handle more hardware details not only for bcma on a SoC. Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo drivers/bcma/driver_gpio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 144cc143d401b22eb153b4c095ae7e8521414d68 Author: Ville Syrjälä Date: Tue Mar 7 21:42:10 2017 +0200 drm/i915: Use DRM_DEBUG_KMS() for framebuffer failure debug messages DRM_UT_CORE generates way too much noise usually, so having the framebuffer init failures use DRM_UT_CORE is a pain when trying to find out the reason why you failed in creating a framebuffer. Let's use DRM_UT_KMS for these debug messages instead. v2: s/at less than/at most/ in the debug message (Imre) Signed-off-by: Ville Syrjälä Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/20170307194210.13400-6-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 66 ++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 33 deletions(-) commit 3ca46c0a22a7a0873d599e977c5a80b753ac69ce Author: Ville Syrjälä Date: Tue Mar 7 21:42:09 2017 +0200 drm/i915: Pass the correct plane index to _intel_compute_tile_offset() intel_fill_fb_info() should pass the correct plane index to _intel_compute_tile_offset() once we start to care about the AUX surface. Signed-off-by: Ville Syrjälä Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/20170307194210.13400-5-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b500535c513ac57fff89e917bda5863739636ad Author: Ville Syrjälä Date: Tue Mar 7 21:42:08 2017 +0200 drm/i915: Avoid div-by-zero when computing aux_stride w/o an aux plane To make life easier let's allow skl_plane_stride() to be called for the AUX surface even when there is no AUX surface. Avoids special cases in the callers. Signed-off-by: Ville Syrjälä Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/20170307194210.13400-4-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit b90c1ee17b9e57a3fef241c2ebb26b5db7cc1937 Author: Ville Syrjälä Date: Tue Mar 7 21:42:07 2017 +0200 drm/i915: Move nv12 chroma plane handling into intel_surf_alignment() Let's try to keep the alignment requirements in one place, and so towards that end let's move the AUX_DIST alignment handling into intel_surf_alignment() alongside the main surface alignment stuff. Signed-off-by: Ville Syrjälä Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/20170307194210.13400-3-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit d88c4afddc5519d49ee621e0437abb9c6a25fafb Author: Ville Syrjälä Date: Tue Mar 7 21:42:06 2017 +0200 drm/i915: Plumb drm_framebuffer into more places Now that framebuffers can be used even before calling drm_framebuffer_init() we can start to plumb them into more places, instead of passing individual pieces for fb metadata. Signed-off-by: Ville Syrjälä Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/20170307194210.13400-2-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 132 ++++++++++++++--------------------- drivers/gpu/drm/i915/intel_drv.h | 11 +-- drivers/gpu/drm/i915/intel_fbdev.c | 4 +- 3 files changed, 57 insertions(+), 90 deletions(-) commit 132a7444eda233df106a430aadfef91ff2547c4e Author: Michael Heimpold Date: Thu Feb 9 08:42:45 2017 +0100 dt-bindings: arm: add entries for I2SE boards This patch adds the missing devicetree binding documentation for I2SE's Duckbill and Duckbill 2 series boards. Signed-off-by: Michael Heimpold Cc: Stefan Wahren Acked-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/i2se.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 768716f4af35ee7b60bc70b7273e2a8c8c57342f Author: Michael Heimpold Date: Thu Feb 9 08:42:44 2017 +0100 ARM: dts: imx28-duckbill: update to match vendor distributed DT This patch updates the Duckbill device tree and synchronize it with the vendor distributed file. The changes in mostly pin-muxing stuff, but also some minor fixes. In detail: - enable SPI pins - enable I2C pins - enable UART pins - enable LRADC pin - adjust USB DR mode - add default triggers for LEDs - get rid of regulators simple-bus container - adjust phy reset duration According to phy datasheet, 25ms are sufficient. This also reduces the time to boot the system. Signed-off-by: Michael Heimpold Cc: Stefan Wahren Signed-off-by: Shawn Guo arch/arm/boot/dts/imx28-duckbill.dts | 81 +++++++++++++++++++++++++----------- 1 file changed, 56 insertions(+), 25 deletions(-) commit 620885e8d4117d29048cb0bbec395d6678f034f7 Author: Michael Heimpold Date: Thu Feb 9 08:42:43 2017 +0100 ARM: dts: imx28: add alternative muxing for mmc2_sck_cfg Signed-off-by: Michael Heimpold Cc: Stefan Wahren Acked-by: Stefan Wahren Signed-off-by: Shawn Guo arch/arm/boot/dts/imx28.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 45e89549ac47d4c91e326c900e1624f0aca91987 Author: Michael Heimpold Date: Thu Feb 9 08:42:42 2017 +0100 ARM: dts: imx28: rename mmc2_sck_cfg This patch renames mmc2_sck_cfg in order to prepare for an alternative muxing setup. Signed-off-by: Michael Heimpold Cc: Stefan Wahren Acked-by: Stefan Wahren Signed-off-by: Shawn Guo arch/arm/boot/dts/imx28-m28cu3.dts | 2 +- arch/arm/boot/dts/imx28.dtsi | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit df93726be96468ba67ef973f2166747e44bfa5db Author: Michael Heimpold Date: Thu Feb 9 08:42:41 2017 +0100 ARM: dts: imx28: add alternative pinmuxing for mmc2 Signed-off-by: Michael Heimpold Cc: Stefan Wahren Acked-by: Stefan Wahren Signed-off-by: Shawn Guo arch/arm/boot/dts/imx28.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit c8cc48acb25cc951401b48f3ba778ea960a6ecfc Author: Tang Yuantian Date: Thu Feb 9 14:29:15 2017 +0800 arm64: dts: added ecc register address to sata node on ls1046a For ls1046 sata, ecc should be disabled due to a erratum. Provide the ecc register address for driver to use. Signed-off-by: Tang Yuantian Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 85f1dfae159cc3a5f1edc5851fae16126a9d6cee Author: Tang Yuantian Date: Thu Feb 9 14:29:14 2017 +0800 arm64: dts: added ecc register address to sata node on ls1043a For ls1043 sata, ecc should be disabled due to a erratum. Provide the ecc register address for driver to use. Signed-off-by: Tang Yuantian Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b1eaa950f7e905aaffca0454aa05101ce4f6446a Author: Amir Goldstein Date: Wed Jan 11 12:07:46 2017 +0200 ovl: lockdep annotate of nested stacked overlayfs inode lock An overlayfs instance can be the lower layer of another overlayfs instance. This setup triggers a lockdep splat of possible recursive locking of sb->s_type->i_mutex_key in iterate_dir(). Trimmed snip: [ INFO: possible recursive locking detected ] bash/2468 is trying to acquire lock: &sb->s_type->i_mutex_key#14, at: iterate_dir+0x7d/0x15c but task is already holding lock: &sb->s_type->i_mutex_key#14, at: iterate_dir+0x7d/0x15c One problem observed with this splat is that ovl_new_inode() does not call lockdep_annotate_inode_mutex_key() to annotate the dir inode lock as &sb->s_type->i_mutex_dir_key like other fs do. The other problem is that the 2 nested levels of overlayfs inode lock are annotated using the same key, which is the cause of the false positive lockdep warning. Fix this by annotating overlayfs inode lock in ovl_fill_inode() according to stack level of the super block instance and use different key for dir vs. non-dir like other fs do. Here is an edited snip from /proc/lockdep_chains after iterate_dir() of nested overlayfs: [...] &ovl_i_mutex_dir_key[depth] (stack_depth=2) [...] &ovl_i_mutex_dir_key[depth]#2 (stack_depth=1) [...] &type->i_mutex_dir_key (stack_depth=0) Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 4480de8245b7f02c2fa0109efd80f4773397e36a Author: Fabio Estevam Date: Wed Feb 8 10:33:51 2017 -0200 ARM: dts: imx53-qsb: Constrain the TVE DAC voltage Quoting Philipp Zabel: "Since this regulator is used as the TVDAC analog power supply, this range should at least be limited to the analog power supply range of the TVDAC, listed in Table 74-9. of the i.MX53 reference manual (2.5-2.75V). But since the nominal voltage is 2.75V, which was used to determine the analog gain that is supposed to result in the necessary 0.7V peak-to-peak amplitude on the VGA output, I'd say we should just fix the voltage to 2750000 here." , so limit the TVDAC analog power supply as suggested. Suggested-by: Lucas Stach Suggested-by: Philipp Zabel Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-qsb.dts | 4 ++-- arch/arm/boot/dts/imx53-qsrb.dts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 89d39a63b2c25c8da1a038fdb208bfed041c889c Author: Alexandre Courbot Date: Mon Mar 6 15:11:34 2017 +0900 MAINTAINERS: tegra: Remove self as maintainer I have not been doing any Tegra maintainance work for a while, and this is unlikely to change in the foreseeable future. Better reflect the actual state of things by removing myself from the list. Signed-off-by: Alexandre Courbot Signed-off-by: Thierry Reding MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit a06eb006237017a35141fa75c779d62cc0fd1931 Author: Thierry Reding Date: Thu Feb 23 18:16:18 2017 +0100 MAINTAINERS: tegra: Replace Stephen with Jon For a while now, Stephen's been focussing on other areas of the open source community and within NVIDIA. Jon Hunter's been doing a great job keeping things working. Replace Stephen's entry with Jon's. Acked-by: Stephen Warren Signed-off-by: Thierry Reding MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10517429b5ac242498d7d847f79f10c21d7eedb0 Author: Jiri Kosina Date: Wed Mar 8 14:27:05 2017 +0100 livepatch: make klp_mutex proper part of API klp_mutex is shared between core.c and transition.c, and as such would rather be properly located in a header so that we don't have to play 'extern' games from .c sources. This also silences sparse warning (wrongly) suggesting that klp_mutex should be defined static. Acked-by: Miroslav Benes Acked-by: Josh Poimboeuf Signed-off-by: Jiri Kosina kernel/livepatch/core.c | 1 + kernel/livepatch/core.h | 6 ++++++ kernel/livepatch/transition.c | 3 +-- 3 files changed, 8 insertions(+), 2 deletions(-) commit e8e4f5280ddd0a7b43a795f90a0758e3c99df6a6 Author: Johannes Berg Date: Wed Mar 8 11:12:10 2017 +0100 mac80211: reject/clear user rate mask if not usable If the user rate mask results in no (basic) rates being usable, clear it. Also, if we're already operating when it's set, reject it instead. Technically, selecting basic rates as the criterion is a bit too restrictive, but calculating the usable rates over all stations (e.g. in AP mode) is harder, and all stations must support the basic rates. Similarly, in client mode, the basic rates will be used anyway for control frames. This fixes the "no supported rates (...) in rate_mask ..." warning that occurs on TX when you've selected a rate mask that's not compatible with the connection (e.g. an AP that enables only the rates 36, 48, 54 and you've selected only 6, 9, 12.) Reported-by: Kirtika Ruchandani Signed-off-by: Johannes Berg net/mac80211/cfg.c | 18 +++++++++++++++++- net/mac80211/mlme.c | 2 ++ net/mac80211/rate.c | 27 +++++++++++++++++++++++++++ net/mac80211/rate.h | 2 ++ 4 files changed, 48 insertions(+), 1 deletion(-) commit fa22ca4f905d7001ed966bc95bcffb890a1b8d73 Author: Mylène Josserand Date: Fri Feb 10 10:41:32 2017 +0100 ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY SOC_MIXER_ARRAY is a simplified function of SND_SOC_DAPM_MIXER which handles automatically the ARRAY_SIZE of controls. Update the driver to use SOC_MIXER_ARRAY. Signed-off-by: Mylène Josserand Acked-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit ca14da6e611674cad275f29ac2aaf1e2eb427c6b Author: Mylène Josserand Date: Fri Feb 10 10:41:31 2017 +0100 ASoC: sun8i-codec: Update mixer to use SOC_DAPM_DOUBLE Update the driver to use the new SOC_DAPM_DOUBLE definition on the digital DAC mixer. Update the names accordingly as, when they are shared, the controls are not prefixed with the widget's name anymore. Signed-off-by: Mylène Josserand Acked-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec.c | 45 ++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 24 deletions(-) commit 4aa8146c89f336230de7f449805bd0edfc878fd4 Author: Mylène Josserand Date: Fri Feb 10 10:41:30 2017 +0100 ASoC: sun8i-codec: Remove analog "HP" widget The "HP" widget is already present and take part to the analog part (sun8i-codec-analog). Remove it from the digital part as it is unnecessary. Signed-off-by: Mylène Josserand Acked-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec.c | 6 ------ 1 file changed, 6 deletions(-) commit 2e2c3a5a97f9e0c82deef6624f8b31bbbc5298ff Author: Fabio Estevam Date: Tue Feb 7 19:14:38 2017 -0200 ARM: dts: imx6ul-14x14-evk: Remove unnecessary node imx6ul.dtsi already contains: cpu0: cpu@0 { .... arm-supply = <®_arm>; soc-supply = <®_soc>; }; , so remove the duplication. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-14x14-evk.dts | 5 ----- 1 file changed, 5 deletions(-) commit 39841944c651f2e019d6e77aceb349a2695d8e2d Author: Bard Liao Date: Wed Mar 8 19:05:30 2017 +0800 ASoC: rt5665: enhance jack type detection function Use manual mode for jack detection function to increase accuracy. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5665.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 948059ddf93f4dfbb1f2f00885d2172b835a03b1 Author: Bard Liao Date: Wed Mar 8 19:05:36 2017 +0800 ASoC: rt5665: enable TDM if more than 2 channels TDM is necessary for more than 2 channels. And there is no control bit to specify which slots are using. Machine driver will not need to call snd_soc_dai_set_tdm_slot if we do it in rt5665_hw_params. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5665.c | 114 ++++++++++++++++++++++++---------------------- 1 file changed, 59 insertions(+), 55 deletions(-) commit 246126b0a4f24f8e88f148c9d0d6d72e6fafe6cc Author: Bard Liao Date: Wed Mar 8 19:05:33 2017 +0800 ASoC: rt5665: increase button detection accuracy Use sar adc for button detection to increase accuracy. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5665.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1d3da3fed1a211d11d33aff1fb2438a1fc27740e Author: Alan Cox Date: Wed Mar 8 11:39:20 2017 +0000 atomisp: USE_KMEM_CACHE is always defined so remove the dead code Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/Makefile | 2 +- .../media/atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c | 16 ---------------- .../media/atomisp/pci/atomisp2/include/hmm/hmm_pool.h | 2 -- .../media/atomisp/pci/atomisp2/include/mmu/isp_mmu.h | 2 -- drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c | 12 ------------ 5 files changed, 1 insertion(+), 33 deletions(-) commit 2267a75047de86993b1280f59ba59bc8e3c0b599 Author: Alan Cox Date: Wed Mar 8 11:39:08 2017 +0000 atomisp: HRT_KERNEL is always defined so clean up the ifdef use Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/Makefile | 2 +- drivers/staging/media/atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.h | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) commit 5cacee52f93d54df66bdc09b1ecaf2852b399e48 Author: Alan Cox Date: Wed Mar 8 11:39:59 2017 +0000 atomisp: trim unused mmgr code This cuts it back to what is basically a few wrapper functions. At some point we can kill most of these too by changing the callers. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../memory_access/memory_access.h | 79 ------ .../media/atomisp/pci/atomisp2/hrt/memory_access.c | 268 ++------------------- 2 files changed, 14 insertions(+), 333 deletions(-) commit f6a681e0164725a5699bd403cb0f0d3497a86a48 Author: Alan Cox Date: Wed Mar 8 11:39:48 2017 +0000 atomisp: HRT_CSIM is never defined Remove the content that is guarded by this define Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../hive_isp_css_common/host/input_formatter.c | 7 -- .../css2400/hive_isp_css_common/host/irq.c | 11 +-- .../css2400/runtime/debug/src/ia_css_debug.c | 16 ---- .../atomisp2/css2400/runtime/spctrl/src/spctrl.c | 85 +--------------------- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 42 ----------- .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 11 +-- .../atomisp/pci/atomisp2/css2400/sh_css_mipi.c | 3 - .../atomisp/pci/atomisp2/css2400/sh_css_params.c | 29 -------- 8 files changed, 6 insertions(+), 198 deletions(-) commit e35d4427b44217f8a1188e6301ea61bfafb37b4e Author: Alan Cox Date: Wed Mar 8 11:39:38 2017 +0000 atomisp: __SP is never defined so scrub this ifdef Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../css2400/base/circbuf/interface/ia_css_circbuf.h | 9 --------- .../atomisp/pci/atomisp2/css2400/base/circbuf/src/circbuf.c | 13 ------------- .../atomisp2/css2400/hive_isp_css_include/math_support.h | 4 ++-- .../media/atomisp/pci/atomisp2/css2400/ia_css_acc_types.h | 4 ++-- .../media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h | 4 ++-- .../pci/atomisp2/css2400/isp/modes/interface/isp_exprs.h | 5 ----- .../pci/atomisp2/css2400/isp/modes/interface/isp_types.h | 2 +- .../media/atomisp/pci/atomisp2/css2400/sh_css_defs.h | 5 +---- .../media/atomisp/pci/atomisp2/css2400/sh_css_internal.h | 12 ++++-------- 9 files changed, 12 insertions(+), 46 deletions(-) commit 0d93fe75d44884e26fe3d2c308c2b0261fb655e8 Author: Alan Cox Date: Wed Mar 8 11:39:29 2017 +0000 atomisp: comment out some unused defines Once we are a bit more sure of their obsolescence they will be deleted Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7e8dbea410322092af3d2c0635da5a3341b19998 Author: Michael Zoran Date: Wed Mar 8 04:21:51 2017 -0800 staging: bcm2835-camera: Remove explicit cache flush operations The camera code has an explicit cache flush operation which is not portable. Now that vc04_services is using portable DMA APIs that already do the cache flushing, explicit flushes should no longer be needed. The one call to __cpuc_flush_dcache_area has been removed. Testing: The offical V2 camera for the RPI was tested on a RPI 3 running in 32 bit mode(armhf). The cheese application and ffmpeg was used to view and stream video from the camera. Nothing new seems to be broken without the cache flushing. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 4 ---- 1 file changed, 4 deletions(-) commit 24975b8c218ad7206f98062c97c9380c2163f6e2 Author: Thierry Reding Date: Thu Feb 23 18:30:47 2017 +0100 arm64: tegra: Enable ethernet on P3310 The P3310 processor module provides networking via the ethernet controller found on NVIDIA Tegra186 SoCs. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit a4c7aab2eaaeb479ae18a8299c69e8d28b50591b Author: Thierry Reding Date: Thu Feb 23 18:30:46 2017 +0100 arm64: tegra: Enable I2C controllers on P3310 The P3310 processor modules use seven I2C controllers for various peripherals. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi | 40 +++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) commit 93dbb44c5c2678aaed08c096968ffd4fb171e154 Author: Thierry Reding Date: Thu Feb 23 18:30:45 2017 +0100 arm64: tegra: Invert the PMC interrupt on P3310 The PMC interrupt is inverted on P3310, so mark it as such in the device tree to avoid a flood of interrupts when the PMIC is enabled. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 0caafbde07ec36bc34b4746017a6c0ce4d22ab0b Author: Thierry Reding Date: Thu Feb 23 18:30:44 2017 +0100 arm64: tegra: Add ethernet support for Tegra186 The NVIDIA Tegra186 SoC contains an instance of the Synopsys DWC ethernet QOS IP block, which supports 10, 100 and 1000 Mbps data transfer rates. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 73bf90d4d4e388a59f656e14fbc240de8fe8f728 Author: Thierry Reding Date: Thu Feb 23 18:30:43 2017 +0100 arm64: tegra: Add PMC controller on Tegra186 The NVIDIA Tegra186 SoC has a Power Management Controller that performs various tasks related to system power, boot as well as suspend/resume. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 937d9a012af5422dc7e3a8ce87ed4abf03b22f45 Author: Valentin Raevsky Date: Wed Feb 8 21:44:04 2017 +0100 ARM: dts: imx6q-cm-fx6: add analog audio support The cm-fx6 module has an onboard Wolfson wm8731 codec which is muxed to the ssi2 controller. Unlike most (all?) supported i.MX6 board/codec combinations the wm8731 is operated in slave mode and the clock setup is static. Add support for it. Signed-off-by: Valentin Raevsky [christopher.spinrath@rwth-aachen.de: enhanced commit message, ported to upstream and some cleanup] Signed-off-by: Christopher Spinrath Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-cm-fx6.dts | 83 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit 71ce8430348f989d0c78871828d96e0e616056dd Author: Wei Yongjun Date: Mon Feb 6 16:23:18 2017 +0000 soc: zte: pm_domains: Remove .owner field for driver Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun Signed-off-by: Shawn Guo drivers/soc/zte/zx296718_pm_domains.c | 1 - 1 file changed, 1 deletion(-) commit e3a059c0ba9f2b8284065de6997770d4604077fa Author: Wei Yongjun Date: Mon Feb 6 16:23:02 2017 +0000 soc: zte: pm_domains: Remove redundant dev_err call in zx2967_pd_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun Signed-off-by: Shawn Guo drivers/soc/zte/zx2967_pm_domains.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a94f2b92d3cfd31bd838f2fbf0c2f8fb8d826af7 Author: Bing Niu Date: Wed Mar 8 15:14:03 2017 -0500 drm/i915: suppress atomic commit error message under gvt-g env under virtualization enviroment, it is possible guest update pipe registers across vblank intervals due to overhead of mmio traps or vm schedule out. However, it is safe since those pipe update happen in virual registers and will not be committed to hardware. suppress that atomic commit error message under virtualization case to avoid confusing user. v2: per ville's comment: return early and against Maarten's patch v3: coding style clean Signed-off-by: Bing Niu Acked-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1489004043-15449-1-git-send-email-bing.niu@intel.com Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/intel_sprite.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6c0afb503937a12a8d20a805fcf263e31afa9871 Author: Tero Kristo Date: Thu Feb 9 11:24:37 2017 +0200 clk: ti: convert to use proper register definition for all accesses Currently, TI clock driver uses an encapsulated struct that is cast into a void pointer to store all register addresses. This can be considered as rather nasty hackery, and prevents from expanding the register address field also. Instead, replace all the code to use proper struct in place for this, which contains all the previously used data. This patch is rather large as it is touching multiple files, but this can't be split up as we need to avoid any boot breakage. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren arch/arm/mach-omap2/clkt2xxx_dpllcore.c | 3 +- arch/arm/mach-omap2/clock.c | 2 +- arch/arm/mach-omap2/clock.h | 2 ++ arch/arm/mach-omap2/cm.h | 5 +-- arch/arm/mach-omap2/cm2xxx.c | 9 ++--- arch/arm/mach-omap2/cm3xxx.c | 10 ++---- arch/arm/mach-omap2/cm_common.c | 2 +- drivers/clk/ti/apll.c | 47 ++++++++++++------------- drivers/clk/ti/autoidle.c | 18 +++++----- drivers/clk/ti/clk-3xxx.c | 55 +++++++++++++++-------------- drivers/clk/ti/clk.c | 47 ++++++++++++------------- drivers/clk/ti/clkt_dflt.c | 61 ++++++++++++--------------------- drivers/clk/ti/clkt_dpll.c | 6 ++-- drivers/clk/ti/clkt_iclk.c | 29 ++++++++-------- drivers/clk/ti/clock.h | 11 +++--- drivers/clk/ti/clockdomain.c | 8 ----- drivers/clk/ti/divider.c | 24 +++++++------ drivers/clk/ti/dpll.c | 48 ++++++++++---------------- drivers/clk/ti/dpll3xxx.c | 38 ++++++++++---------- drivers/clk/ti/dpll44xx.c | 14 ++++---- drivers/clk/ti/gate.c | 32 ++++++++--------- drivers/clk/ti/interface.c | 22 ++++++------ drivers/clk/ti/mux.c | 41 +++++++++------------- include/linux/clk/ti.h | 46 +++++++++++++------------ 24 files changed, 264 insertions(+), 316 deletions(-) commit 473adbf4e02857a6b78dfb3d9fcf752638bbadb9 Author: Tero Kristo Date: Thu Feb 9 11:25:28 2017 +0200 clk: ti: dpll44xx: fix clksel register initialization clksel register pointer should be used for the DPLL-MX autoidle handling. Currently this is not setup at all. Fix by adding proper handling for the register. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren drivers/clk/ti/dpll.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 9a00fa6843953cff1e3420002a454a61edfdd5f0 Author: Tero Kristo Date: Thu Feb 9 11:10:19 2017 +0200 clk: ti: gate: export gate_clk_ops locally These are going to be used by the clkctrl support that will be introduced later. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren drivers/clk/ti/clock.h | 1 + drivers/clk/ti/gate.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 4f6be5655dc95a83882e5e6f743baf603fcc1fbd Author: Tero Kristo Date: Thu Feb 9 14:46:53 2017 +0200 clk: ti: divider: add driver internal API for parsing divider data This can be used from the divider itself, and also from the clkctrl clocks once this is introduced. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren drivers/clk/ti/clock.h | 4 +++ drivers/clk/ti/divider.c | 63 +++++++++++++++++++++++++++++++----------------- 2 files changed, 45 insertions(+), 22 deletions(-) commit 6dbde94756adb14fe1e3516249cb8eee725bd5e0 Author: Tero Kristo Date: Thu Feb 9 14:45:45 2017 +0200 clk: ti: divider: convert TI divider clock to use its own data representation Instead of using the generic clock driver data struct, use one internal for the TI clock driver itself. This allows modifying the register access parts in subsequent patch. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren drivers/clk/ti/clock.h | 11 +++++++++++ drivers/clk/ti/divider.c | 22 +++++++++++----------- drivers/clk/ti/gate.c | 4 ++-- 3 files changed, 24 insertions(+), 13 deletions(-) commit d83bc5b69f2f86ac8354cdb8bbf1b56f34c4ddee Author: Tero Kristo Date: Thu Feb 9 14:40:40 2017 +0200 clk: ti: mux: convert TI mux clock to use its internal data representation Instead of using the generic clock driver data struct, use one internal for the TI clock driver itself. This allows modifying the register access parts in subsequent patch. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren drivers/clk/ti/clock.h | 11 +++++++++++ drivers/clk/ti/mux.c | 10 +++++----- 2 files changed, 16 insertions(+), 5 deletions(-) commit c91f07801f144920f8467486a1e36e42ed9d9ff2 Author: Tero Kristo Date: Mon Jan 30 16:01:36 2017 +0200 clk: ti: drop unnecessary MEMMAP_ADDRESSING flag This has been superceded by the usage of ti_clk_ll_ops for now. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren drivers/clk/ti/apll.c | 1 - drivers/clk/ti/dpll.c | 2 -- drivers/clk/ti/gate.c | 4 +--- drivers/clk/ti/interface.c | 1 - include/linux/clk/ti.h | 2 -- 5 files changed, 1 insertion(+), 9 deletions(-) commit c3f8ad57a01a31397e5a0349a226a32f35ddc19c Author: Ville Syrjälä Date: Tue Mar 7 22:54:19 2017 +0200 drm/i915: Nuke debug messages from the pipe update critical section printks are slow so we should not be doing them from the vblank evade critical section. These could explain why we sometimes seem to blow past our 100 usec deadline. The problem has been there ever since commit bfd16b2a23dc ("drm/i915: Make updating pipe without modeset atomic.") but it may not have been readily visible until commit e1edbd44e23b ("drm/i915: Complain if we take too long under vblank evasion.") increased our chances of noticing it. Cc: stable@vger.kernel.org Cc: Maarten Lankhorst Fixes: bfd16b2a23dc ("drm/i915: Make updating pipe without modeset atomic.") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170307205419.19447-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit b6312da57f4dfaff083e31e3aa61faa9e20d9ad5 Author: Tero Kristo Date: Tue Mar 22 16:10:55 2016 +0200 clk: ti: omap4: cleanup unnecessary clock aliases Cleanup any unnecessary DT_CLK() alias entries from the OMAP4 clock file. Most of these are now handled dynamically by the driver code. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren drivers/clk/ti/clk-44xx.c | 188 +--------------------------------------------- 1 file changed, 2 insertions(+), 186 deletions(-) commit ce382d4766bd82b8fdd487bb57afb1c4f9546de2 Author: Tero Kristo Date: Wed Oct 5 15:37:02 2016 +0300 clk: ti: enforce const types on string arrays Constant string arrays should use const char * const instead of just const char *. Change the implementations using these to proper type. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren drivers/clk/ti/clock.h | 2 +- drivers/clk/ti/composite.c | 2 +- drivers/clk/ti/mux.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) commit 2e1a294c0f2273a6d3537c91965ca46a6483bd8c Author: Tero Kristo Date: Fri Sep 30 14:13:38 2016 +0300 clk: ti: move omap2_init_clk_clkdm under TI clock driver This is not needed outside the driver, so move it inside it and remove the prototype from the public header also. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren arch/arm/mach-omap2/clock.c | 32 -------------------------------- drivers/clk/ti/clock.h | 1 + drivers/clk/ti/clockdomain.c | 30 ++++++++++++++++++++++++++++++ include/linux/clk/ti.h | 1 - 4 files changed, 31 insertions(+), 33 deletions(-) commit b6f27b2db2df395d65b02a758861c7fc54edbec1 Author: Tero Kristo Date: Fri Sep 30 14:10:11 2016 +0300 clk: ti: add clkdm_lookup to the exported functions This will be needed to move some additional clockdomain functionality under clock driver. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren arch/arm/mach-omap2/clock.c | 1 + include/linux/clk/ti.h | 2 ++ 2 files changed, 3 insertions(+) commit 1ae79c46cf195ea39407bd5a2b234304d537980f Author: Tero Kristo Date: Thu Sep 29 12:06:40 2016 +0300 clk: ti: use automatic clock alias generation framework Generate clock aliases automatically for all TI clock drivers. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren drivers/clk/ti/apll.c | 2 +- drivers/clk/ti/clk-dra7-atl.c | 11 ++++++++++- drivers/clk/ti/clk.c | 20 +++++++++++++++----- drivers/clk/ti/composite.c | 16 +++++++++++++++- drivers/clk/ti/divider.c | 2 +- drivers/clk/ti/dpll.c | 6 +++--- drivers/clk/ti/fixed-factor.c | 1 + drivers/clk/ti/gate.c | 2 +- drivers/clk/ti/interface.c | 2 +- drivers/clk/ti/mux.c | 2 +- 10 files changed, 49 insertions(+), 15 deletions(-) commit c17435c56bb1feb7365ebffcfbe98baae50a0fb4 Author: Tero Kristo Date: Thu Sep 29 12:05:00 2016 +0300 clk: ti: add API for creating aliases automatically for simple clock types This API generates clock aliases automatically for simple clock types (fixed-clock, fixed-factor-clock), so that we don't need to add the data for these statically into tables. Shall be called from the SoC specific clock init. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren drivers/clk/ti/clk.c | 26 ++++++++++++++++++++++++++ drivers/clk/ti/clock.h | 1 + 2 files changed, 27 insertions(+) commit 21f0bf2d3dcc7b18cebe2fa3da700e3263c3a3ce Author: Tero Kristo Date: Thu Sep 29 12:00:57 2016 +0300 clk: ti: add support for automatic clock alias generation Large portions of the OMAP framework still depend on the support of having clock aliases in place, so add support functions for generating these automatically. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren drivers/clk/ti/clk.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ drivers/clk/ti/clock.h | 3 +++ 2 files changed, 67 insertions(+) commit 923386f761f5ff35da2ac778839876fe4a2f165f Author: Tero Kristo Date: Fri Dec 18 15:36:57 2015 +0200 clk: ti: remove un-used definitions from public clk_hw_omap struct Clksel support has been deprecated a while back, so remove these from the struct also. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren include/linux/clk/ti.h | 4 ---- 1 file changed, 4 deletions(-) commit 721cabf6c6600dbe689ee2782bc087270e97e652 Author: Lucas Stach Date: Fri Feb 17 20:02:44 2017 +0100 soc: imx: move PGC handling to a new GPC driver This is an almost complete re-write of the previous GPC power gating control code found in the IMX architecture code. It supports both the old and the new DT binding, allowing more domains to be added later and generally makes the driver easier to extend, while keeping compatibility with existing DTBs. As the result, all functionality regarding the power gating controller gets removed from the IMX architecture GPC driver. It keeps only the IRQ controller code in the architecture, as this is closely coupled to the CPU idle implementation. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo MAINTAINERS | 1 + arch/arm/mach-imx/gpc.c | 217 --------------------- drivers/soc/Makefile | 1 + drivers/soc/imx/Makefile | 1 + drivers/soc/imx/gpc.c | 487 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 490 insertions(+), 217 deletions(-) commit b7a24a7d9e5577271952a1ea4458dd4d9a1c0588 Author: Lucas Stach Date: Fri Feb 17 20:02:43 2017 +0100 dt-bindings: add multidomain support to i.MX GPC DT binding This adds a new binding for the Freescale i.MX GPC block, which allows to describe multiple power domains in a more natural way. The driver will continue to support the old binding for existing DTBs, but new features like the additional domains present on i.MX6SX will only be usable with the new binding. Signed-off-by: Lucas Stach Acked-by: Rob Herring Signed-off-by: Shawn Guo .../devicetree/bindings/power/fsl,imx-gpc.txt | 80 ++++++++++++++-------- 1 file changed, 53 insertions(+), 27 deletions(-) commit 1bdb5d5b8e571b8a1ce7b0f0e3abbb359c303bef Author: Noralf Trønnes Date: Tue Mar 7 21:49:23 2017 +0100 drm/debugfs: Remove the drm_driver.debugfs_cleanup callback Remove the .debugfs_cleanup() callback now that all the users are gone. Signed-off-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170307204924.1002-3-noralf@tronnes.org drivers/gpu/drm/drm_debugfs.c | 5 ----- include/drm/drm_drv.h | 1 - 2 files changed, 6 deletions(-) commit 85eac4700ede7c583aab29ad6bdfe135f693c29b Author: Noralf Trønnes Date: Tue Mar 7 21:49:22 2017 +0100 drm/msm: Remove msm_debugfs_cleanup() Move the contents of msm_debugfs_cleanup() to msm_drm_uninit() to free up the drm_driver->debugfs_cleanup callback. Also remove the mdp_kms_funcs->debugfs_cleanup callback which has no users. Cc: robdclark@gmail.com Signed-off-by: Noralf Trønnes Acked-by: Rob Clark Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170307204924.1002-2-noralf@tronnes.org drivers/gpu/drm/msm/msm_debugfs.c | 15 --------------- drivers/gpu/drm/msm/msm_debugfs.h | 1 - drivers/gpu/drm/msm/msm_drv.c | 4 +++- drivers/gpu/drm/msm/msm_drv.h | 4 ++-- drivers/gpu/drm/msm/msm_kms.h | 1 - drivers/gpu/drm/msm/msm_perf.c | 5 ++--- drivers/gpu/drm/msm/msm_rd.c | 5 ++--- 7 files changed, 9 insertions(+), 26 deletions(-) commit cb7d53b499f95febd4b5bc80a473706c717d5d2c Author: Alin Grigorean Date: Sat Feb 25 12:47:26 2017 +0200 ASoC: fsl: Remove unneeded init of static variable This was reported by checkpatch.pl Signed-off-by: Alin Grigorean Acked-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/imx-pcm-fiq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e15e762cddf68a401df5c6aa45da3c27712e856 Author: Takashi Sakamoto Date: Mon Mar 6 16:12:22 2017 +0900 ASoC: Intel: Skylake: use a helper macro to rounding-up calculation In 'include/linux/kernel.h', there's a helper macro to round numerical value. Let's use it. Signed-off-by: Takashi Sakamoto Acked-by: Vinod Koul Tested-by: Subhransu S. Prusty Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 70d435ba1cd6a955e715b8a4729bbc9044e9d7ff Author: Lucas Stach Date: Wed Mar 8 10:17:02 2017 +0100 ASoC: imx-pcm-dma: simplify pcm_config The generic snd_dmaengine_pcm is able to retrieve all the needed information from the attached dmaengine and is in fact able to provide much more accurate flags to userspace, like the SDMA engine being only able to operate in batch mode. To avoid any future inconsistencies between the dmaengine and the pcm_config, rip out the fixed config and rely on the core to fill in the right flags derived from the dmaengine information. Signed-off-by: Lucas Stach Signed-off-by: Mark Brown sound/soc/fsl/imx-pcm-dma.c | 28 ---------------------------- 1 file changed, 28 deletions(-) commit 7ffe939dd9c71e149f31817394b70b52b4067304 Merge: 7c55e2c 6796b12 Author: Daniel Vetter Date: Wed Mar 8 10:54:45 2017 +0100 Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued Backmerge drm-next to get at all the good stuff in drm-misc. We need that because: - drm_connector_list_iter conversion for i915 needs the core patches. - Maarten's patches to use the new atomic state iterators also need the core patches. - We need the new link status property to complete the DP retraining work, merging through 2 branches wasn't a good idea and we had to partially backtrack. - Chris needs reservation_object_trylock and we want to roll out kref_read everywhere. Signed-off-by: Daniel Vetter commit a844a652e7f2b6e44b5e69c6874c8e2ad2d2f5e6 Author: Gregory CLEMENT Date: Wed Feb 22 18:31:45 2017 +0100 ARM64: dts: marvell: armada-3720-db: add gpio expander A gpio expander is present on the i2c bus on the Armada 3720 DB board. This patch add it to the device tree. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-3720-db.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 0ddd48de1e844ec5e0f3e3cc8622d85e00edbe35 Author: Gregory CLEMENT Date: Wed Feb 22 18:31:44 2017 +0100 ARM64: dts: marvell: armada37xx: add address and size property for i2c cells These property were missing when the nodes were added and their lack generate warning messages when adding i2c device in the subnodes. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit bbedcf586534189b334d3213794c8519574c8e43 Author: Gregory CLEMENT Date: Mon Feb 20 18:38:50 2017 +0100 arm64: dts: marvell: add RTC description for Armada 7K/8K This RTC IP is found in the CP110 master and slave which are part of the Armada 8K SoCs and of the subset family the Armada 7K. There is one RTC in each CP but the RTC requires an external oscillator. However on the Armada 80x0, the RTC clock in CP master is not connected (by package) to the oscillator. So this one is disabled for the Armada 8020 and the Armada 8040. As the RTC clock in CP slave is connected to the oscillator this one is let enabled. and will be used on these SoCs (80x0). Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-8020.dtsi | 10 ++++++++++ arch/arm64/boot/dts/marvell/armada-8040.dtsi | 9 +++++++++ arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 7 +++++++ arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 7 +++++++ 4 files changed, 33 insertions(+) commit 23988bab04575261c74743b2828d624946cd3b57 Author: Chris Packham Date: Fri Mar 3 11:42:39 2017 +1300 ARM: dts: mvebu: remove unnecessary PCI range from 98dx3236 The Marvell 98dx3236 SoC only has a single PCIe x1 interface. The "Port 0.1 MEM" range was errantly kept when creating a specific dts for the SoC. Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-xp-98dx3236.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b4bcfccb2cecb9df1fc8860288e6356ef5c1c2f3 Author: Chris Packham Date: Thu Feb 16 21:50:40 2017 +1300 ARM: dts: mvebu: Move mv98dx3236 clock bindings Previously the coreclk binding for the 98dx3236 SoC was inherited from the armada-370/xp. This block is present in as much as it is possible to read from the register location without causing any harm. However the actual sampled at reset values are reflected in the DFX block. Moving the binding to the DFX block enables support for different clock strapping options in hardware. Signed-off-by: Chris Packham Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT .../devicetree/bindings/clock/mvebu-core-clock.txt | 7 +++++++ .../devicetree/bindings/clock/mvebu-gated-clock.txt | 11 +++++++++++ arch/arm/boot/dts/armada-xp-98dx3236.dtsi | 14 +++++++------- 3 files changed, 25 insertions(+), 7 deletions(-) commit 43e28ba877089a53b76b029fe8f0facc9d2b56f4 Author: Chris Packham Date: Thu Feb 16 21:50:37 2017 +1300 ARM: dts: Use armada-370-xp as a base for armada-xp-98dx3236 The Marvell datasheets refer to the integrated CPU as "Armada-XP". In reality there are a number of differences to the actual Armada-XP so rather than including armada-xp.dtsi and disabling many of the IP blocks. Include armada-370-xp.dtsi and add the required nodes. Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-xp-98dx3236.dtsi | 194 ++++++++++++++++++++------ arch/arm/boot/dts/armada-xp-98dx3336.dtsi | 2 +- arch/arm/boot/dts/armada-xp-98dx4251.dtsi | 2 +- arch/arm/boot/dts/armada-xp-db-dxbc2.dts | 2 +- arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts | 2 +- 5 files changed, 155 insertions(+), 47 deletions(-) commit 35a647f12c843b1e507e0956398138ba3d92c338 Author: Chris Packham Date: Thu Feb 16 21:50:36 2017 +1300 ARM: dts: armada-xp-98dx3236: combine dfx server nodes Rather than having a separate node for the dfx server add a reg property to the parent node. This give some compatibility with the Marvell supplied SDK. As no upstream driver currently exists for this block and support for this SoC is still quite fresh in the kernel it should not be necessary to retain a backwards compatible binding. Signed-off-by: Chris Packham Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT Documentation/devicetree/bindings/net/marvell,prestera.txt | 13 +++++-------- arch/arm/boot/dts/armada-xp-98dx3236.dtsi | 10 +++------- 2 files changed, 8 insertions(+), 15 deletions(-) commit a4ee7e18d8085606878d9a9990e6275ef693a9c8 Author: Ansuel Smith Date: Tue Feb 28 14:15:50 2017 +0100 ARM: dts: armada: Add default trigger for sata led In others board we have the sata led set to function with the sata led trigger by default. This patch makes the same for these board that have sata led but get disabled by not associating it to any trigger. Signed-off-by: Ansuel Smith Acked-by: Jason Cooper Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys-caiman.dts | 1 + arch/arm/boot/dts/armada-385-linksys-cobra.dts | 1 + arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 1 + 3 files changed, 3 insertions(+) commit b69f4697c8ae2ea603e2818a9c74c2fcaa806069 Author: Gregory CLEMENT Date: Thu Feb 16 17:29:28 2017 +0100 ARM: dts: armada-38x: Adjust mbus controller description on Armada 38x The mbus binding had been extended more than two years ago, but the device tree files for Armada 38x didn't change. Adding this third entry will allow the mbus going to suspend which was the last thing preventing the SoC going to standby mode Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-38x.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3ec24776bfd09668079df7dca0c0136d80820ab4 Author: Josh Poimboeuf Date: Mon Mar 6 11:20:29 2017 -0600 livepatch: allow removal of a disabled patch Currently we do not allow patch module to unload since there is no method to determine if a task is still running in the patched code. The consistency model gives us the way because when the unpatching finishes we know that all tasks were marked as safe to call an original function. Thus every new call to the function calls the original code and at the same time no task can be somewhere in the patched code, because it had to leave that code to be marked as safe. We can safely let the patch module go after that. Completion is used for synchronization between module removal and sysfs infrastructure in a similar way to commit 942e443127e9 ("module: Fix mod->mkobj.kobj potentially freed too early"). Note that we still do not allow the removal for immediate model, that is no consistency model. The module refcount may increase in this case if somebody disables and enables the patch several times. This should not cause any harm. With this change a call to try_module_get() is moved to __klp_enable_patch from klp_register_patch to make module reference counting symmetric (module_put() is in a patch disable path) and to allow to take a new reference to a disabled module when being enabled. Finally, we need to be very careful about possible races between klp_unregister_patch(), kobject_put() functions and operations on the related sysfs files. kobject_put(&patch->kobj) must be called without klp_mutex. Otherwise, it might be blocked by enabled_store() that needs the mutex as well. In addition, enabled_store() must check if the patch was not unregisted in the meantime. There is no need to do the same for other kobject_put() callsites at the moment. Their sysfs operations neither take the lock nor they access any data that might be freed in the meantime. There was an attempt to use kobjects the right way and prevent these races by design. But it made the patch definition more complicated and opened another can of worms. See https://lkml.kernel.org/r/1464018848-4303-1-git-send-email-pmladek@suse.com [Thanks to Petr Mladek for improving the commit message.] Signed-off-by: Miroslav Benes Signed-off-by: Josh Poimboeuf Reviewed-by: Petr Mladek Acked-by: Miroslav Benes Signed-off-by: Jiri Kosina Documentation/livepatch/livepatch.txt | 28 ++++-------- include/linux/livepatch.h | 3 ++ kernel/livepatch/core.c | 80 ++++++++++++++++++++++------------- kernel/livepatch/transition.c | 37 ++++++++++++++-- samples/livepatch/livepatch-sample.c | 1 - 5 files changed, 96 insertions(+), 53 deletions(-) commit 7c23b330011690705613a66a8239d2ca64a41d4d Author: Josh Poimboeuf Date: Mon Feb 13 19:42:41 2017 -0600 livepatch: add /proc//patch_state Expose the per-task patch state value so users can determine which tasks are holding up completion of a patching operation. Signed-off-by: Josh Poimboeuf Reviewed-by: Petr Mladek Reviewed-by: Miroslav Benes Signed-off-by: Jiri Kosina Documentation/filesystems/proc.txt | 18 ++++++++++++++++++ fs/proc/base.c | 15 +++++++++++++++ 2 files changed, 33 insertions(+) commit d518d9cab17d42f04da3b1de001693bb8780e39e Author: Rojhalat Ibrahim Date: Wed Feb 15 19:10:58 2017 +0100 reset-socfpga: Fix nr_resets property The SoC-FPGA reset controller driver defines NR_BANKS as 4 and uses that define for two unrelated purposes. It is used 1. as an increment for reset line banks which are 32-bit registers with 4-byte aligned addresses. 2. as the total number of reset line banks which together with the number of resets per bank (32) limits the total number of useable resets to 128 and the highest useable reset ID to 127. This is clearly wrong as there are resets with higher IDs than 127 defined in include/dt-bindings/reset/altr,rst-mgr.h and altr,rst-mgr-a10.h. The patch introduces a new define BANK_INCREMENT for calculating the register addresses as before and increases NR_BANKS to 8 for useable reset IDs up to 255. Signed-off-by: Rojhalat Ibrahim Signed-off-by: Philipp Zabel drivers/reset/reset-socfpga.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 716adfe3f0806d2a607bada871af6cc2e08eb490 Author: Wei Yongjun Date: Wed Feb 8 15:56:20 2017 +0000 reset: uniphier: fix non static symbol warnings Fixes the following sparse warnings: drivers/reset/reset-uniphier.c:68:34: warning: symbol 'uniphier_sld3_sys_reset_data' was not declared. Should it be static? drivers/reset/reset-uniphier.c:73:34: warning: symbol 'uniphier_pro4_sys_reset_data' was not declared. Should it be static? drivers/reset/reset-uniphier.c:81:34: warning: symbol 'uniphier_pro5_sys_reset_data' was not declared. Should it be static? drivers/reset/reset-uniphier.c:89:34: warning: symbol 'uniphier_pxs2_sys_reset_data' was not declared. Should it be static? drivers/reset/reset-uniphier.c:103:34: warning: symbol 'uniphier_ld11_sys_reset_data' was not declared. Should it be static? drivers/reset/reset-uniphier.c:108:34: warning: symbol 'uniphier_ld20_sys_reset_data' was not declared. Should it be static? drivers/reset/reset-uniphier.c:137:34: warning: symbol 'uniphier_sld3_mio_reset_data' was not declared. Should it be static? drivers/reset/reset-uniphier.c:157:34: warning: symbol 'uniphier_pro5_sd_reset_data' was not declared. Should it be static? drivers/reset/reset-uniphier.c:174:34: warning: symbol 'uniphier_ld4_peri_reset_data' was not declared. Should it be static? drivers/reset/reset-uniphier.c:187:34: warning: symbol 'uniphier_pro4_peri_reset_data' was not declared. Should it be static? Signed-off-by: Wei Yongjun Acked-by: Masahiro Yamada Signed-off-by: Philipp Zabel drivers/reset/reset-uniphier.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 01db1cb154af04e6e6b7025ed4c93074f0981e8c Author: Paul Gortmaker Date: Tue Feb 7 19:18:45 2017 -0500 reset: pistachio: make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/reset/Kconfig:config RESET_PISTACHIO drivers/reset/Kconfig: bool "Pistachio Reset Driver" if COMPILE_TEST ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the 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: Damien Horsley Signed-off-by: Paul Gortmaker Signed-off-by: Philipp Zabel drivers/reset/reset-pistachio.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 90ce95ab3d661417ce2a17eebc894285960f7068 Author: Paul Gortmaker Date: Tue Feb 7 19:18:44 2017 -0500 reset: ath79: make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/reset/Kconfig:config RESET_ATH79 drivers/reset/Kconfig: bool "AR71xx Reset Driver" if COMPILE_TEST ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Alban Bedel Signed-off-by: Paul Gortmaker Acked-by: Alban Bedel Signed-off-by: Philipp Zabel drivers/reset/reset-ath79.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) commit 80b8b1a15cbf24827e588d397500d1c1dc1e7a43 Author: Paul Gortmaker Date: Tue Feb 7 19:18:47 2017 -0500 reset: oxnas: make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/reset/Kconfig:config RESET_OXNAS drivers/reset/Kconfig: bool ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. Cc: linux-oxnas@lists.tuxfamily.org Signed-off-by: Paul Gortmaker Acked-by: Neil Armstrong Signed-off-by: Philipp Zabel drivers/reset/reset-oxnas.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8290924e6878069683254e118fdc3a9e422a0ac0 Author: Paul Gortmaker Date: Tue Feb 7 19:18:46 2017 -0500 reset: meson: make it explicitly non-modular The Kconfig currently controlling compilation of this code is: arch/arm/mach-meson/Kconfig:menuconfig ARCH_MESON arch/arm/mach-meson/Kconfig: bool "Amlogic Meson SoCs" arch/arm64/Kconfig.platforms:config ARCH_MESON arch/arm64/Kconfig.platforms: bool "Amlogic Platforms" ...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 was (or is now) contained at the top of the file in the comments. Cc: Carlo Caione Cc: Kevin Hilman Cc: linux-amlogic@lists.infradead.org Signed-off-by: Paul Gortmaker Acked-by: Neil Armstrong Signed-off-by: Philipp Zabel drivers/reset/reset-meson.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit d83a7cb375eec21f04c83542395d08b2f6641da2 Author: Josh Poimboeuf Date: Mon Feb 13 19:42:40 2017 -0600 livepatch: change to a per-task consistency model Change livepatch to use a basic per-task consistency model. This is the foundation which will eventually enable us to patch those ~10% of security patches which change function or data semantics. This is the biggest remaining piece needed to make livepatch more generally useful. This code stems from the design proposal made by Vojtech [1] in November 2014. It's a hybrid of kGraft and kpatch: it uses kGraft's per-task consistency and syscall barrier switching combined with kpatch's stack trace switching. There are also a number of fallback options which make it quite flexible. Patches are applied on a per-task basis, when the task is deemed safe to switch over. When a patch is enabled, livepatch enters into a transition state where tasks are converging to the patched state. Usually this transition state can complete in a few seconds. The same sequence occurs when a patch is disabled, except the tasks converge from the patched state to the unpatched state. An interrupt handler inherits the patched state of the task it interrupts. The same is true for forked tasks: the child inherits the patched state of the parent. Livepatch uses several complementary approaches to determine when it's safe to patch tasks: 1. The first and most effective approach is stack checking of sleeping tasks. If no affected functions are on the stack of a given task, the task is patched. In most cases this will patch most or all of the tasks on the first try. Otherwise it'll keep trying periodically. This option is only available if the architecture has reliable stacks (HAVE_RELIABLE_STACKTRACE). 2. The second approach, if needed, is kernel exit switching. A task is switched when it returns to user space from a system call, a user space IRQ, or a signal. It's useful in the following cases: a) Patching I/O-bound user tasks which are sleeping on an affected function. In this case you have to send SIGSTOP and SIGCONT to force it to exit the kernel and be patched. b) Patching CPU-bound user tasks. If the task is highly CPU-bound then it will get patched the next time it gets interrupted by an IRQ. c) In the future it could be useful for applying patches for architectures which don't yet have HAVE_RELIABLE_STACKTRACE. In this case you would have to signal most of the tasks on the system. However this isn't supported yet because there's currently no way to patch kthreads without HAVE_RELIABLE_STACKTRACE. 3. For idle "swapper" tasks, since they don't ever exit the kernel, they instead have a klp_update_patch_state() call in the idle loop which allows them to be patched before the CPU enters the idle state. (Note there's not yet such an approach for kthreads.) All the above approaches may be skipped by setting the 'immediate' flag in the 'klp_patch' struct, which will disable per-task consistency and patch all tasks immediately. This can be useful if the patch doesn't change any function or data semantics. Note that, even with this flag set, it's possible that some tasks may still be running with an old version of the function, until that function returns. There's also an 'immediate' flag in the 'klp_func' struct which allows you to specify that certain functions in the patch can be applied without per-task consistency. This might be useful if you want to patch a common function like schedule(), and the function change doesn't need consistency but the rest of the patch does. For architectures which don't have HAVE_RELIABLE_STACKTRACE, the user must set patch->immediate which causes all tasks to be patched immediately. This option should be used with care, only when the patch doesn't change any function or data semantics. In the future, architectures which don't have HAVE_RELIABLE_STACKTRACE may be allowed to use per-task consistency if we can come up with another way to patch kthreads. The /sys/kernel/livepatch//transition file shows whether a patch is in transition. Only a single patch (the topmost patch on the stack) can be in transition at a given time. A patch can remain in transition indefinitely, if any of the tasks are stuck in the initial patch state. A transition can be reversed and effectively canceled by writing the opposite value to the /sys/kernel/livepatch//enabled file while the transition is in progress. Then all the tasks will attempt to converge back to the original patch state. [1] https://lkml.kernel.org/r/20141107140458.GA21774@suse.cz Signed-off-by: Josh Poimboeuf Acked-by: Miroslav Benes Acked-by: Ingo Molnar # for the scheduler changes Signed-off-by: Jiri Kosina Documentation/ABI/testing/sysfs-kernel-livepatch | 8 + Documentation/livepatch/livepatch.txt | 186 +++++++- include/linux/init_task.h | 9 + include/linux/livepatch.h | 42 +- include/linux/sched.h | 3 + kernel/fork.c | 3 + kernel/livepatch/Makefile | 2 +- kernel/livepatch/core.c | 105 ++++- kernel/livepatch/patch.c | 59 +++ kernel/livepatch/patch.h | 1 + kernel/livepatch/transition.c | 543 +++++++++++++++++++++++ kernel/livepatch/transition.h | 14 + kernel/sched/idle.c | 4 + samples/livepatch/livepatch-sample.c | 17 + 14 files changed, 947 insertions(+), 49 deletions(-) commit 31c212e1b0a51d032e161017ced9a1a953a9c802 Author: Ralph Sennhauser Date: Tue Feb 14 20:17:42 2017 +0100 ARM: dts: armada-385: add support for the Linksys WRT1900ACS (Shelby) The Linksys WRT1900ACS (Shelby) is another Armada 385 based router in the Linksys WRT AC Series which got released in October 2015. The file armada-385-linksys-shelby.dts is taken from OpenWrt as-is and originally authored by Imre Kaloz. URL: https://github.com/openwrt/openwrt/blob/8466384db1154a107b86bf3ca10b166a21bd81d0/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-linksys-shelby.dts CC: Imre Kaloz Signed-off-by: Ralph Sennhauser Signed-off-by: Imre Kaloz Reviewed-by: Andrew Lunn Acked-by: Jason Cooper Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/armada-385-linksys-shelby.dts | 114 ++++++++++++++++++++++++ 2 files changed, 115 insertions(+) commit f5e547f4ac785c65a39211f0b8e4ffc4fe09112d Author: Josh Poimboeuf Date: Mon Feb 13 19:42:39 2017 -0600 livepatch: store function sizes For the consistency model we'll need to know the sizes of the old and new functions to determine if they're on the stacks of any tasks. Signed-off-by: Josh Poimboeuf Acked-by: Miroslav Benes Reviewed-by: Petr Mladek Reviewed-by: Kamalesh Babulal Signed-off-by: Jiri Kosina include/linux/livepatch.h | 3 +++ kernel/livepatch/core.c | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) commit 68ae4b2b687c3da59ca1d762646ddece4ea1c438 Author: Josh Poimboeuf Date: Mon Feb 13 19:42:38 2017 -0600 livepatch: use kstrtobool() in enabled_store() The sysfs enabled value is a boolean, so kstrtobool() is a better fit for parsing the input string since it does the range checking for us. Suggested-by: Petr Mladek Signed-off-by: Josh Poimboeuf Acked-by: Miroslav Benes Reviewed-by: Petr Mladek Signed-off-by: Jiri Kosina kernel/livepatch/core.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit c349cdcaba589fb49cf105093ebc695eb8b9ff08 Author: Josh Poimboeuf Date: Mon Feb 13 19:42:37 2017 -0600 livepatch: move patching functions into patch.c Move functions related to the actual patching of functions and objects into a new patch.c file. Signed-off-by: Josh Poimboeuf Acked-by: Miroslav Benes Reviewed-by: Petr Mladek Reviewed-by: Kamalesh Babulal Signed-off-by: Jiri Kosina kernel/livepatch/Makefile | 2 +- kernel/livepatch/core.c | 202 +------------------------------------------ kernel/livepatch/patch.c | 213 ++++++++++++++++++++++++++++++++++++++++++++++ kernel/livepatch/patch.h | 32 +++++++ 4 files changed, 247 insertions(+), 202 deletions(-) commit aa82dc3e00da63751bb9dfab26983037b79fc39d Author: Josh Poimboeuf Date: Mon Feb 13 19:42:36 2017 -0600 livepatch: remove unnecessary object loaded check klp_patch_object()'s callers already ensure that the object is loaded, so its call to klp_is_object_loaded() is unnecessary. This will also make it possible to move the patching code into a separate file. Signed-off-by: Josh Poimboeuf Acked-by: Miroslav Benes Reviewed-by: Petr Mladek Reviewed-by: Kamalesh Babulal Signed-off-by: Jiri Kosina kernel/livepatch/core.c | 3 --- 1 file changed, 3 deletions(-) commit 0dade9f374f1c15f9b43ab01ab75a3b459bba5f6 Author: Josh Poimboeuf Date: Mon Feb 13 19:42:35 2017 -0600 livepatch: separate enabled and patched states Once we have a consistency model, patches and their objects will be enabled and disabled at different times. For example, when a patch is disabled, its loaded objects' funcs can remain registered with ftrace indefinitely until the unpatching operation is complete and they're no longer in use. It's less confusing if we give them different names: patches can be enabled or disabled; objects (and their funcs) can be patched or unpatched: - Enabled means that a patch is logically enabled (but not necessarily fully applied). - Patched means that an object's funcs are registered with ftrace and added to the klp_ops func stack. Also, since these states are binary, represent them with booleans instead of ints. Signed-off-by: Josh Poimboeuf Acked-by: Miroslav Benes Reviewed-by: Petr Mladek Reviewed-by: Kamalesh Babulal Signed-off-by: Jiri Kosina include/linux/livepatch.h | 17 ++++------- kernel/livepatch/core.c | 72 +++++++++++++++++++++++------------------------ 2 files changed, 42 insertions(+), 47 deletions(-) commit 2f09ca60a56dd9c217d32d68340e1b08cbbe1ace Author: Miroslav Benes Date: Mon Feb 13 19:42:34 2017 -0600 livepatch/s390: add TIF_PATCH_PENDING thread flag Update a task's patch state when returning from a system call or user space interrupt, or after handling a signal. This greatly increases the chances of a patch operation succeeding. If a task is I/O bound, it can be patched when returning from a system call. If a task is CPU bound, it can be patched when returning from an interrupt. If a task is sleeping on a to-be-patched function, the user can send SIGSTOP and SIGCONT to force it to switch. Since there are two ways the syscall can be restarted on return from a signal handling process, it is important to clear the flag before do_signal() is called. Otherwise we could miss the migration if we used SIGSTOP/SIGCONT procedure or fake signal to migrate patching blocking tasks. If we place our hook to sysc_work label in entry before TIF_SIGPENDING is evaluated we kill two birds with one stone. The task is correctly migrated in all return paths from a syscall. Signed-off-by: Miroslav Benes Signed-off-by: Josh Poimboeuf Acked-by: Heiko Carstens Signed-off-by: Jiri Kosina arch/s390/include/asm/thread_info.h | 2 ++ arch/s390/kernel/entry.S | 31 ++++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) commit 30d64f1904d44a7e52a93d711d57aabbac2efd72 Author: Jiri Slaby Date: Mon Feb 13 19:42:33 2017 -0600 livepatch/s390: reorganize TIF thread flag bits Group the TIF thread flag bits by their inclusion in the _TIF_WORK and _TIF_TRACE macros. Signed-off-by: Jiri Slaby Signed-off-by: Josh Poimboeuf Reviewed-by: Miroslav Benes Acked-by: Heiko Carstens Signed-off-by: Jiri Kosina arch/s390/include/asm/thread_info.h | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit a768f78429fd9b0b07f5795dd62f31a519fc1bae Author: Josh Poimboeuf Date: Mon Feb 13 19:42:32 2017 -0600 livepatch/powerpc: add TIF_PATCH_PENDING thread flag Add the TIF_PATCH_PENDING thread flag to enable the new livepatch per-task consistency model for powerpc. The bit getting set indicates the thread has a pending patch which needs to be applied when the thread exits the kernel. The bit is included in the _TIF_USER_WORK_MASK macro so that do_notify_resume() and klp_update_patch_state() get called when the bit is set. Signed-off-by: Josh Poimboeuf Reviewed-by: Petr Mladek Reviewed-by: Miroslav Benes Reviewed-by: Kamalesh Babulal Reviewed-by: Balbir Singh Acked-by: Michael Ellerman (powerpc) Signed-off-by: Jiri Kosina arch/powerpc/include/asm/thread_info.h | 4 +++- arch/powerpc/kernel/signal.c | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit afb94c9e0b413bbdea779192eaca076c43ede031 Author: Josh Poimboeuf Date: Mon Feb 13 19:42:31 2017 -0600 livepatch/x86: add TIF_PATCH_PENDING thread flag Add the TIF_PATCH_PENDING thread flag to enable the new livepatch per-task consistency model for x86_64. The bit getting set indicates the thread has a pending patch which needs to be applied when the thread exits the kernel. The bit is placed in the _TIF_ALLWORK_MASK macro, which results in exit_to_usermode_loop() calling klp_update_patch_state() when it's set. Signed-off-by: Josh Poimboeuf Acked-by: Andy Lutomirski Reviewed-by: Petr Mladek Reviewed-by: Miroslav Benes Reviewed-by: Kamalesh Babulal Acked-by: Ingo Molnar # for the x86 changes Signed-off-by: Jiri Kosina arch/x86/entry/common.c | 9 ++++++--- arch/x86/include/asm/thread_info.h | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) commit 46c5a0113f843be5c55b1c40dd486538891156d4 Author: Josh Poimboeuf Date: Mon Feb 13 19:42:30 2017 -0600 livepatch: create temporary klp_update_patch_state() stub Create temporary stubs for klp_update_patch_state() so we can add TIF_PATCH_PENDING to different architectures in separate patches without breaking build bisectability. Signed-off-by: Josh Poimboeuf Reviewed-by: Petr Mladek Signed-off-by: Jiri Kosina include/linux/livepatch.h | 5 ++++- kernel/livepatch/core.c | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 3a404842547c92e71127870a613319a29cdebe49 Author: Josh Poimboeuf Date: Mon Feb 13 19:42:29 2017 -0600 x86/entry: define _TIF_ALLWORK_MASK flags explicitly The _TIF_ALLWORK_MASK macro automatically includes the least-significant 16 bits of the thread_info flags, which is less than obvious and tends to create confusion and surprises when reading or modifying the code. Define the flags explicitly. Signed-off-by: Josh Poimboeuf Reviewed-by: Petr Mladek Reviewed-by: Miroslav Benes Reviewed-by: Kamalesh Babulal Acked-by: Ingo Molnar # for the x86 changes Signed-off-by: Jiri Kosina arch/x86/include/asm/thread_info.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit af085d9084b48530153f51e6cad19fd0b1a13ed7 Author: Josh Poimboeuf Date: Mon Feb 13 19:42:28 2017 -0600 stacktrace/x86: add function for detecting reliable stack traces For live patching and possibly other use cases, a stack trace is only useful if it can be assured that it's completely reliable. Add a new save_stack_trace_tsk_reliable() function to achieve that. Note that if the target task isn't the current task, and the target task is allowed to run, then it could be writing the stack while the unwinder is reading it, resulting in possible corruption. So the caller of save_stack_trace_tsk_reliable() must ensure that the task is either 'current' or inactive. save_stack_trace_tsk_reliable() relies on the x86 unwinder's detection of pt_regs on the stack. If the pt_regs are not user-mode registers from a syscall, then they indicate an in-kernel interrupt or exception (e.g. preemption or a page fault), in which case the stack is considered unreliable due to the nature of frame pointers. It also relies on the x86 unwinder's detection of other issues, such as: - corrupted stack data - stack grows the wrong way - stack walk doesn't reach the bottom - user didn't provide a large enough entries array Such issues are reported by checking unwind_error() and !unwind_done(). Also add CONFIG_HAVE_RELIABLE_STACKTRACE so arch-independent code can determine at build time whether the function is implemented. Signed-off-by: Josh Poimboeuf Reviewed-by: Miroslav Benes Acked-by: Ingo Molnar # for the x86 changes Signed-off-by: Jiri Kosina arch/Kconfig | 6 +++ arch/x86/Kconfig | 1 + arch/x86/include/asm/unwind.h | 6 +++ arch/x86/kernel/stacktrace.c | 96 +++++++++++++++++++++++++++++++++++++++++- arch/x86/kernel/unwind_frame.c | 2 + include/linux/stacktrace.h | 9 ++-- kernel/stacktrace.c | 12 +++++- 7 files changed, 126 insertions(+), 6 deletions(-) commit 4c74ea4e20b582bf90a2cf509d88aa7c2dbffb12 Author: Hoegeun Kwon Date: Wed Mar 8 13:54:09 2017 +0900 ARM: dts: exynos: Add the burst and esc clock frequency properties to DSI node Add the burst and esc clock frequency properties to the parent (DSI node). Currently the clock is parsed from the port node, while it should be taken from the dsi node. Signed-off-by: Hoegeun Kwon Reviewed-by: Andrzej Hajda Reviewed-by: Andi Shyti Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos3250-rinato.dts | 2 ++ arch/arm/boot/dts/exynos4210-trats.dts | 2 ++ arch/arm/boot/dts/exynos4412-trats2.dts | 2 ++ 3 files changed, 6 insertions(+) commit e3c07546747cdec07ff15c984bc6cebc9c9f788c Author: Hoegeun Kwon Date: Wed Mar 8 13:54:08 2017 +0900 arm64: dts: exynos: Add the burst and esc clock frequency properties to DSI node Add the burst and esc clock frequency properties to the parent (DSI node). Currently the clock is parsed from the port node, while it should be taken from the dsi node. Signed-off-by: Hoegeun Kwon Reviewed-by: Andrzej Hajda Reviewed-by: Andi Shyti Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 5be7ade3020490b891fcdef1c92ca28fa0983ab7 Author: Hyungwon Hwang Date: Wed Mar 8 10:42:37 2017 +0900 arm64: dts: exynos: Add support for S6E3HA2 panel device on TM2 board This patch add the panel device tree node for S6E3HA2 display controller to TM2 dts. Signed-off-by: Hyungwon Hwang Signed-off-by: Andrzej Hajda Signed-off-by: Chanwoo Choi Signed-off-by: Hoegeun Kwon Tested-by: Chanwoo Choi Reviewed-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433-tm2.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 6796b129b0e98162a84e0b6322ac28587556d427 Merge: 2e16101 97e5268 Author: Dave Airlie Date: Wed Mar 8 12:54:58 2017 +1000 Merge branch 'linux-4.12' of git://github.com/skeggsb/linux into drm-next - Re-architecture of the code to handle proprietary fw, more abstracted to support the multitude of differences that NVIDIA introduce - Support in the said code for GP10x ACR and GR fw, giving acceleration support \o/ - Fix for GTX 970 GPUs that are in an odd MMU configuration * 'linux-4.12' of git://github.com/skeggsb/linux: (60 commits) drm/nouveau/fb/gf100-: rework ram detection drm/nouveau/fb/gm200: split ram implementation from gm107 drm/nouveau/fb/gf108: split implementation from gf100 drm/nouveau/fb/gf100-: modify constructors to allow more customisation drm/nouveau/kms/nv50: use drm core i2c-over-aux algorithm drm/nouveau/i2c/g94-: return REPLY_M value on reads drm/nouveau/i2c: modify aux interface to return length actually transferred drm/nouveau/gp10x: enable secboot and GR drm/nouveau/gr/gp102: initial support drm/nouveau/falcon: support for gp10x msgqueue drm/nouveau/secboot: add gp102/gp104/gp106/gp107 support drm/nouveau/secboot: put HS code loading code into own file drm/nouveau/secboot: support for r375 ACR drm/nouveau/secboot: support for r367 ACR drm/nouveau/secboot: support for r364 ACR drm/nouveau/secboot: workaround bug when starting SEC2 firmware drm/nouveau/secboot: support standard NVIDIA HS binaries drm/nouveau/secboot: support for unload blob bootloader drm/nouveau/secboot: let callers interpret return value of blobs drm/nouveau/secboot: support for different load and unload falcons ... commit 2e16101780e9cc8c4c68566db002e7513a1530eb Merge: b558dfd 505b681 Author: Dave Airlie Date: Wed Mar 8 12:41:47 2017 +1000 Merge tag 'drm-intel-next-2017-03-06' of git://anongit.freedesktop.org/git/drm-intel into drm-next 4 weeks worth of stuff since I was traveling&lazy: - lspcon improvements (Imre) - proper atomic state for cdclk handling (Ville) - gpu reset improvements (Chris) - lots and lots of polish around fences, requests, waiting and everything related all over (both gem and modeset code), from Chris - atomic by default on gen5+ minus byt/bsw (Maarten did the patch to flip the default, really this is a massive joint team effort) - moar power domains, now 64bit (Ander) - big pile of in-kernel unit tests for various gem subsystems (Chris), including simple mock objects for i915 device and and the ggtt manager. - i915_gpu_info in debugfs, for taking a snapshot of the current gpu state. Same thing as i915_error_state, but useful if the kernel didn't notice something is stick. From Chris. - bxt dsi fixes (Umar Shankar) - bxt w/a updates (Jani) - no more struct_mutex for gem object unreference (Chris) - some execlist refactoring (Tvrtko) - color manager support for glk (Ander) - improve the power-well sync code to better take over from the firmware (Imre) - gem tracepoint polish (Tvrtko) - lots of glk fixes all around (Ander) - ctx switch improvements (Chris) - glk dsi support&fixes (Deepak M) - dsi fixes for vlv and clanups, lots of them (Hans de Goede) - switch to i915.ko types in lots of our internal modeset code (Ander) - byt/bsw atomic wm update code, yay (Ville) * tag 'drm-intel-next-2017-03-06' of git://anongit.freedesktop.org/git/drm-intel: (432 commits) drm/i915: Update DRIVER_DATE to 20170306 drm/i915: Don't use enums for hardware engine id drm/i915: Split breadcrumbs spinlock into two drm/i915: Refactor wakeup of the next breadcrumb waiter drm/i915: Take reference for signaling the request from hardirq drm/i915: Add FIFO underrun tracepoints drm/i915: Add cxsr toggle tracepoint drm/i915: Add VLV/CHV watermark/FIFO programming tracepoints drm/i915: Add plane update/disable tracepoints drm/i915: Kill level 0 wm hack for VLV/CHV drm/i915: Workaround VLV/CHV sprite1->sprite0 enable underrun drm/i915: Sanitize VLV/CHV watermarks properly drm/i915: Only use update_wm_{pre,post} for pre-ilk platforms drm/i915: Nuke crtc->wm.cxsr_allowed drm/i915: Compute proper intermediate wms for vlv/cvh drm/i915: Skip useless watermark/FIFO related work on VLV/CHV when not needed drm/i915: Compute vlv/chv wms the atomic way drm/i915: Compute VLV/CHV FIFO sizes based on the PM2 watermarks drm/i915: Plop vlv/chv fifo sizes into crtc state drm/i915: Plop vlv wm state into crtc_state ... commit 9c28286b1b4b9bce6e35dd4c8a1265f03802a89a Author: Gao Feng Date: Sat Mar 4 22:10:28 2017 +0800 decnet: Use TCP nagle macro instead of literal number in decnet Use existing TCP nagle macro TCP_NAGLE_OFF and TCP_NAGLE_CORK instead of the literal number 1 and 2 in the current decnet codes. Signed-off-by: Gao Feng Signed-off-by: David S. Miller net/decnet/af_decnet.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 30800d9977ec271a7836d777848dba6773d12a3b Author: Kees Cook Date: Tue Mar 7 13:57:11 2017 -0800 pstore: simplify write_user_compat() Nothing actually uses write_user_compat() currently, but there is no reason to reuse the dmesg buffer. Instead, just allocate a new record buffer, copy in from userspace, and pass it to write() as normal. Signed-off-by: Kees Cook fs/pstore/platform.c | 46 ++++++++++++++++++++-------------------------- 1 file changed, 20 insertions(+), 26 deletions(-) commit 4c9ec219766a217468fb94a281c416455a884dda Author: Kees Cook Date: Sun Mar 5 22:41:10 2017 -0800 pstore: Remove write_buf() callback Now that write() and write_buf() are functionally identical, this removes write_buf(), and renames write_buf_user() to write_user(). Additionally adds sanity-checks for pstore_info's declared functions and flags at registration time. Signed-off-by: Kees Cook fs/pstore/ftrace.c | 4 ++-- fs/pstore/platform.c | 35 ++++++++++++++++++++--------------- fs/pstore/pmsg.c | 4 ++-- fs/pstore/ram.c | 10 +++++----- include/linux/pstore.h | 29 ++++++++++------------------- 5 files changed, 39 insertions(+), 43 deletions(-) commit fdd0311863b32b42bb2c54e60c987bbbabc0c430 Author: Kees Cook Date: Sun Mar 5 00:56:38 2017 -0800 pstore: Replace arguments for write_buf_user() API Removes argument list in favor of pstore record, though the user buffer remains passed separately since it must carry the __user annotation. Signed-off-by: Kees Cook fs/pstore/platform.c | 35 ++++++++++++----------------------- fs/pstore/pmsg.c | 9 ++++++--- fs/pstore/ram.c | 14 +++++--------- include/linux/pstore.h | 23 +++++++---------------- 4 files changed, 30 insertions(+), 51 deletions(-) commit b10b471145f28c219d9ddcc309a67e053776865a Author: Kees Cook Date: Sun Mar 5 00:27:54 2017 -0800 pstore: Replace arguments for write_buf() API As with the other API updates, this removes the long argument list in favor of passing a single pstore recaord. Signed-off-by: Kees Cook fs/pstore/ftrace.c | 9 +++++++-- fs/pstore/platform.c | 30 +++++++++++++++++++++--------- fs/pstore/ram.c | 44 ++++++++++++++++++++++---------------------- include/linux/pstore.h | 21 +++++---------------- 4 files changed, 55 insertions(+), 49 deletions(-) commit a61072aae693ba08390f92eed1dd0573fa5c3cd9 Author: Kees Cook Date: Sat Mar 4 23:31:19 2017 -0800 pstore: Replace arguments for erase() API This removes the argument list for the erase() callback and replaces it with a pointer to the backend record details to be removed. Signed-off-by: Kees Cook drivers/acpi/apei/erst.c | 8 +++----- drivers/firmware/efi/efi-pstore.c | 26 +++++++++++--------------- fs/pstore/inode.c | 12 +++++------- fs/pstore/ram.c | 15 +++++++-------- include/linux/pstore.h | 16 +++++----------- 5 files changed, 31 insertions(+), 46 deletions(-) commit 83f70f0769ddd8a368cb6346a918102818232962 Author: Kees Cook Date: Sat Mar 4 23:12:24 2017 -0800 pstore: Do not duplicate record metadata This switches the inode-private data from carrying duplicate metadata to keeping the record passed in during pstore_mkfile(). Signed-off-by: Kees Cook fs/pstore/inode.c | 57 ++++++++++++++++++++++++++-------------------------- fs/pstore/platform.c | 6 ++---- 2 files changed, 30 insertions(+), 33 deletions(-) commit 2a2b0acf768cfb2a9cf6c3b42b0e0eb25cbb5814 Author: Kees Cook Date: Sat Mar 4 22:57:26 2017 -0800 pstore: Allocate records on heap instead of stack In preparation for handling records off to pstore_mkfile(), allocate the record instead of reusing stack. This still always frees the record, though, since pstore_mkfile() isn't yet keeping it. Signed-off-by: Kees Cook fs/pstore/platform.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 1dfff7dd67d1a3be4d0ab4a5313f0363966bc70d Author: Kees Cook Date: Sat Mar 4 22:46:41 2017 -0800 pstore: Pass record contents instead of copying pstore_mkfile() shouldn't have to memcpy the record contents. It can use the existing copy instead. This adjusts the allocation lifetime management and renames the contents variable from "data" to "buf" to assist moving to struct pstore_record in the future. Signed-off-by: Kees Cook fs/pstore/inode.c | 22 +++++++++++++++------- fs/pstore/platform.c | 16 ++++++++++++---- 2 files changed, 27 insertions(+), 11 deletions(-) commit 7e8cc8dce17574e432945fa75882cd401c3ef673 Author: Kees Cook Date: Sat Mar 4 22:28:46 2017 -0800 pstore: Always allocate buffer for decompression Currently, pstore_mkfile() performs a memcpy() of the record contents, so it can live anywhere. However, this is needlessly wasteful. In preparation of pstore_mkfile() keeping the record contents, always allocate a buffer for the contents. Signed-off-by: Kees Cook fs/pstore/platform.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) commit 76cc9580e3fbd323651d06e8184a5a54e0e1066e Author: Kees Cook Date: Fri Mar 3 23:28:53 2017 -0800 pstore: Replace arguments for write() API Similar to the pstore_info read() callback, there were too many arguments. This switches to the new struct pstore_record pointer instead. This adds "reason" and "part" to the record structure as well. Signed-off-by: Kees Cook arch/powerpc/kernel/nvram_64.c | 27 +++++------------ drivers/acpi/apei/erst.c | 18 +++++------- drivers/firmware/efi/efi-pstore.c | 18 +++++------- fs/pstore/platform.c | 62 ++++++++++++++++++++++----------------- include/linux/pstore.h | 36 +++++++++++------------ 5 files changed, 76 insertions(+), 85 deletions(-) commit 125cc42baf8ab2149c207f8a360ea25668b8422d Author: Kees Cook Date: Fri Mar 3 22:09:18 2017 -0800 pstore: Replace arguments for read() API The argument list for the pstore_read() interface is unwieldy. This changes passes the new struct pstore_record instead. The erst backend was already doing something similar internally. Signed-off-by: Kees Cook arch/powerpc/kernel/nvram_64.c | 61 +++++++++++----------- drivers/acpi/apei/erst.c | 38 ++++++-------- drivers/firmware/efi/efi-pstore.c | 104 ++++++++++++++++---------------------- fs/pstore/platform.c | 7 +-- fs/pstore/ram.c | 53 ++++++++++--------- include/linux/pstore.h | 20 +++----- 6 files changed, 124 insertions(+), 159 deletions(-) commit 1edd1aa397ad3ca5f1fca1961c13910ef53f16e8 Author: Kees Cook Date: Fri Mar 3 18:16:32 2017 -0800 pstore: Switch pstore_mkfile to pass record Instead of the long list of arguments, just pass the new record struct. Signed-off-by: Kees Cook fs/pstore/inode.c | 57 +++++++++++++++++++++++++++++----------------------- fs/pstore/internal.h | 5 +---- fs/pstore/platform.c | 6 +----- 3 files changed, 34 insertions(+), 34 deletions(-) commit 634f8f5167c88052ce6d28e519ff6325172191dc Author: Kees Cook Date: Fri Mar 3 17:35:25 2017 -0800 pstore: Move record decompression to function This moves the record decompression logic out to a separate function to avoid the deep indentation. Signed-off-by: Kees Cook fs/pstore/platform.c | 67 +++++++++++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 30 deletions(-) commit 9abdcccc3d5f3c72f25cd48160f60d911353bee9 Author: Kees Cook Date: Fri Mar 3 16:59:29 2017 -0800 pstore: Extract common arguments into structure The read/mkfile pair pass the same arguments and should be cleared between calls. Move to a structure and wipe it after every loop. Signed-off-by: Kees Cook fs/pstore/platform.c | 55 +++++++++++++++++++++++++++----------------------- include/linux/pstore.h | 28 ++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 26 deletions(-) commit 0edae0b3ffa6fc968d63932347a4d74b0ad0340b Author: Kees Cook Date: Fri Mar 3 12:16:16 2017 -0800 pstore: Add kernel-doc for struct pstore_info This adds documentation for struct pstore_info, which also includes the basic API the backends need to implement. Signed-off-by: Kees Cook include/linux/pstore.h | 133 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 128 insertions(+), 5 deletions(-) commit ca1fa1a8a6dae3e10c73bc5f1da728e662ee9d8b Author: L. D. Pinney Date: Tue Feb 14 16:27:13 2017 -0600 mtd: spi-nor: Add support for ESMT F25L32QA and F25L64QA Add support for the ESMT F25L32QA and F25L64QA. These are 4MB and 8MB SPI-NOR Chips from Elite Semiconductor Memory Technology. Signed-off-by: L. D. Pinney Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 2 ++ 1 file changed, 2 insertions(+) commit 0621ce1db336b40985658f6f0447936610f87fc2 Author: Tomeu Vizoso Date: Tue Mar 7 21:35:11 2017 +0100 drm/dp: Add missing description to parameter Gabriel Krisman reported these warnings when building the documentation: ./drivers/gpu/drm/drm_dp_helper.c:1165: warning: No description found for parameter 'crtc' ./drivers/gpu/drm/drm_dp_helper.c:1166: warning: No description found for parameter 'crtc' Reported-by: Gabriel Krisman Bertazi Signed-off-by: Tomeu Vizoso Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170307203511.14258-1-tomeu.vizoso@collabora.com drivers/gpu/drm/drm_dp_helper.c | 1 + 1 file changed, 1 insertion(+) commit 7c55e2c5772dcf3cbacd0fa2bcfeefae416b73f7 Author: Chris Wilson Date: Tue Mar 7 12:03:38 2017 +0000 drm/i915: Use pagecache write to prepopulate shmemfs from pwrite-ioctl Before we instantiate/pin the backing store for our use, we can prepopulate the shmemfs filp efficiently using a write into the pagecache. We avoid the penalty of instantiating all the pages, important if the user is just writing to a few and never uses the object on the GPU, and using a direct write into shmemfs allows it to avoid the cost of retrieving a page (mostly the clear-before-use, but in theory we could curtail swapin) before it is overwritten. This can be extended later to provide additional specialisation for other backends (other than shmemfs). For now it provides a defense against very large write-only allocations from exhausting all of system memory. v2: Smelling fixes. Fixes: fe115628d567 ("drm/i915: Implement pwrite without struct-mutex") References: https://bugs.freedesktop.org/show_bug.cgi?id=99107 Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Cc: Mika Kuoppala Cc: # v4.10+ Reviewed-by: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170307120338.7277-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 78 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_object.h | 3 ++ 2 files changed, 81 insertions(+) commit 4e5462ee843c883790e9609cf560d88960ea4227 Author: Chris Wilson Date: Tue Mar 7 13:20:31 2017 +0000 drm/i915: Store a permanent error in obj->mm.pages Once the object has been truncated, it is unrecoverable. To facilitate detection of this state store the error in obj->mm.pages. This is required for the next patch which should be applied to v4.10 (via stable), so we also need to mark this patch for backporting. In that regard, let's consider this to be a fix/improvement too. v2: Avoid dereferencing the ERR_PTR when freeing the object. Fixes: 1233e2db199d ("drm/i915: Move object backing storage manipulation to its own locking") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: # v4.10+ Link: http://patchwork.freedesktop.org/patch/msgid/20170307132031.32461-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 596afb6f051382aa0cb067e4d6b3080e51531ddc Author: Maxime Ripard Date: Thu Feb 9 17:39:18 2017 +0100 drm/sun4i: Grab reserved memory region Allow to provide an optional memory region to allocate from for our DRM driver. Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_drv.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 3c64fb37475d7eb99aa01b46af1edb3863261640 Author: Chen-Yu Tsai Date: Thu Feb 23 16:05:43 2017 +0800 drm/sun4i: Add backend and tcon pointers to sun4i_crtc sun4i_crtc controls the backend and tcon hardware blocks of the display pipeline. Instead of doing so through the master drm structure, leave pointers to the corresponding backend and tcon in itself. Also drop the drm_device pointer, since it is no longer needed. The next step forward would be to pass the pointers in through sun4i_crtc_init as parameters. This would make it easier to support multiple display pipelines layer on. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_crtc.c | 18 +++++++----------- drivers/gpu/drm/sun4i/sun4i_crtc.h | 3 ++- 2 files changed, 9 insertions(+), 12 deletions(-) commit ace6c095ba3b113b5b41e30c1e6be1ca024ccef8 Author: Chen-Yu Tsai Date: Thu Feb 23 16:05:42 2017 +0800 drm/sun4i: Add backend pointer to sun4i_layer sun4i_layer only controls the backend hardware block of the display pipeline. Instead of getting a pointer to the underlying backend through the drm_device structure, leave one in itself. Also drop the drm_device pointer, since it is no longer needed. The next step forward would be to pass the pointer in through sun4i_layers_init as a parameter. This would make it easier to support multiple display pipelines layer on. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_layer.c | 8 +++----- drivers/gpu/drm/sun4i/sun4i_layer.h | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) commit b9c8506cb88b974522133d7eccc3d924ed29cf23 Author: Chen-Yu Tsai Date: Thu Feb 23 16:05:41 2017 +0800 drm/sun4i: rgb: Pass tcon pointer when initializing RGB encoder The RGB encoder represents channel 0 of the TCON. Instead of fetching the pointer to its TCON from the main sun4i_drv structure, pass it in as part of the init call, save it, and use it directly in the encoder and connector callbacks. We can also drop the otherwise unused sun4i_drv pointer. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_rgb.c | 27 +++++++++------------------ drivers/gpu/drm/sun4i/sun4i_rgb.h | 2 +- drivers/gpu/drm/sun4i/sun4i_tcon.c | 2 +- 3 files changed, 11 insertions(+), 20 deletions(-) commit 78428d672c2ecdb54c72ae427071c239650cb6c7 Author: Chen-Yu Tsai Date: Thu Feb 23 16:05:40 2017 +0800 drm/sun4i: tv: Switch to drm_of_find_possible_crtcs Now that the crtcs have their .port field set properly, we can use drm_of_find_possible_crtcs to find the connected crtcs, instead of hardcoding the first crtc as usable. The new code also defers binding when the upstream crtc hasn't been registered yet. This makes it easier to support multiple tcons/crtcs. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_tv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit a5154a4d01d7958788366894ceeddd9e1aab5b13 Author: Chen-Yu Tsai Date: Thu Feb 23 16:05:39 2017 +0800 drm/sun4i: Drop hardcoded .possible_crtcs values from layers To support multiple display pipelines, we would have multiple crtcs, with one or more planes bound to them. Obviously having hardcoded values for the drm_plane .possible_crtcs field is not going to work. For primary and cursor planes, the value is set by drm_crtc_init_with_planes. We just need to set it for overlay planes. We also fix the value set for the RGB encoder, by referencing the crtc set in sun4i_drv. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_crtc.c | 9 +++++++++ drivers/gpu/drm/sun4i/sun4i_layer.c | 3 ++- drivers/gpu/drm/sun4i/sun4i_rgb.c | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) commit dcd215801b0279f0a021516526cf7c0b67d5302e Author: Chen-Yu Tsai Date: Thu Feb 23 16:05:38 2017 +0800 drm/sun4i: Drop primary layer pointer from sun4i_drv The current layer init code keeps a pointer to the primary plane layer in sun4i_drv. When we eventually support multiple display pipelines, this would force us to keep track of primary planes for all crtcs. And these pointers only get used at bind time. Instead, have the crtc init code iterate through the returned layers to find the primary and cursor layers. And drop the pointer from the sun4i_drv structure. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_crtc.c | 25 +++++++++++++++++++++---- drivers/gpu/drm/sun4i/sun4i_drv.h | 1 - drivers/gpu/drm/sun4i/sun4i_layer.c | 3 --- 3 files changed, 21 insertions(+), 8 deletions(-) commit 46cce6dac316a707309b374d9b6786b4269e7274 Author: Chen-Yu Tsai Date: Thu Feb 23 16:05:37 2017 +0800 drm/sun4i: Initialize crtc from tcon bind function The tcon provides part of the functionality of the crtc, and also provides the device node for the output port of the crtc. To be able to use drm_of_find_possible_crtcs(), all crtc must be initialized before any downstream encoders. The other part of the crtc is the display backend. The Rockchip DRM driver does this by first binding all vops, which is their crtc, and this step also creates the crtc objects. Then all remaining hardware components are bound. With the Allwinner display pipeline, we have multiple components comprising the crtc, and varying depths of the display pipeline. Since components are added with a depth first search of the of_graph, we can initialize the crtc object within the tcon bind function. Since the backend precedes the tcon, and the backends cannot be muxed or switched around, we can be sure that the associated backend is already initialized. This patch also moves the crtc pointer from the main drm_device data to the tcon device data. Besides the crtc callbacks, the crtc structure is only used within the tcon driver to signal vblank events from its interrupt handler. As the crtc and layer bits are now called from the tcon bits, we must move them from the sun4i-drm module to the sun4i-tcon module to avoid circular dependencies between the two modules. This is because sun4i-drm also calls into sun4i-tcon. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/Makefile | 4 ++-- drivers/gpu/drm/sun4i/sun4i_drv.c | 8 -------- drivers/gpu/drm/sun4i/sun4i_drv.h | 1 - drivers/gpu/drm/sun4i/sun4i_tcon.c | 10 ++++++++-- drivers/gpu/drm/sun4i/sun4i_tcon.h | 3 +++ 5 files changed, 13 insertions(+), 13 deletions(-) commit b3f266e428db3f08bb57f6edd6be10c4d092c38d Author: Chen-Yu Tsai Date: Thu Feb 23 16:05:36 2017 +0800 drm/sun4i: Move layers from sun4i_drv to sun4i_crtc This patch moves the sun4i_layers_init call from sun4i_drv_bind to sun4i_crtc_init, and the layers pointer from struct sun4i_drv to struct sun4i_crtc. The layers are bound to a specific crtc, and they are not directly used once initiated. They are used through their included drm_plane structures. Moving the layers into the crtc facilitates binding them to the crtc explicitly, by setting the corresponding bit in their .possible_crtcs fields right after the crtc is initialized. This is done in a later patch. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_crtc.c | 8 ++++++++ drivers/gpu/drm/sun4i/sun4i_crtc.h | 1 + drivers/gpu/drm/sun4i/sun4i_drv.c | 10 +--------- drivers/gpu/drm/sun4i/sun4i_drv.h | 2 -- 4 files changed, 10 insertions(+), 11 deletions(-) commit 2b2c22bf1c7017d8b4ac088c33b58fae4786d569 Author: Chen-Yu Tsai Date: Thu Feb 23 16:05:35 2017 +0800 drm/sun4i: Add end of list element for sun4i_layers_init's returned list The number of defined planes in sun4i_layer is unknown to other parts of the sun4i drm driver. Since the return value of sun4i_layers_init is a list of layers, make it return 1 more empty layer as an end of list guard value. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_layer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7544860733d158e3edbf309f27e79e258c8f66bd Author: Chen-Yu Tsai Date: Thu Feb 23 16:05:34 2017 +0800 drm/sun4i: Set drm_crtc.port to the underlying TCON's output port node The way drm_of_find_possible_crtcs works is it tries to match the remote-endpoint of the given node's various endpoints to all the crtc's .port field. Thus we need to set drm_crtc.port to the output port node of the underlying TCON. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_crtc.c | 5 +++++ 1 file changed, 5 insertions(+) commit a6fbffb0301196df7735aa4aacd35610858e471f Author: Chen-Yu Tsai Date: Thu Feb 23 16:05:33 2017 +0800 drm/sun4i: Make sunxi_rgb2yuv_coef constant sunxi_rgb2yuv_coef is a table of RGB-to-YUV conversion coefficients. They are programmed into the hardware, and can be declared constant. Reported-by: Priit Laes Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea411fd2c8d5704fc247be106026d436d27c900f Author: Chen-Yu Tsai Date: Fri Feb 17 11:13:30 2017 +0800 drm/sun4i: Make sun4i_crtc_init return ERR_PTR style error codes sun4i_crtc_init can fail for a number of reasons. Instead of returning a NULL pointer when it fails, pass back the encountered error using ERR_PTR. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_crtc.c | 4 ++-- drivers/gpu/drm/sun4i/sun4i_drv.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 903795d60ffa89918b521064b0cbcba139ae4047 Author: Chen-Yu Tsai Date: Fri Feb 17 11:13:29 2017 +0800 drm/sun4i: Save newly created layer in layers array in sun4i_layers_init sun4i_layers_init allocates an array to store pointers to newly created layers returned by sun4i_layer_init_one(), but fails to actually store them. But it actually returns the empty array to unsuspecting users. Save the pointers in the array, so that they may be used later. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_layer.c | 1 + 1 file changed, 1 insertion(+) commit 8a16469b74af0fb584686e5e18d2cf3570424e4b Author: Chen-Yu Tsai Date: Fri Feb 17 11:13:28 2017 +0800 drm/sun4i: Drop useless assignment in sun4i_layers_init The assignment found in the main loop in sun4i_layers_init: struct sun4i_layer *layer = layers[i]; is useless as it gets overwritten by the next line: layer = sun4i_layer_init_one(drm, plane); Drop the assignment. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_layer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f43fbe7a59b6e2fd8b366321e5163c3499b80b26 Author: Chen-Yu Tsai Date: Fri Feb 17 11:13:27 2017 +0800 drm/sun4i: Fix kcalloc element size in sun4i_layers_init In sun4i_layers_init we are allocating an array of pointers to struct sun4i_layer: layers = devm_kcalloc(drm->dev, ARRAY_SIZE(sun4i_backend_planes), sizeof(**layers), GFP_KERNEL); The element size should be the size of an individual element of the array. Change it to sizeof(*layers) to avoid wasting a lot of memory. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_layer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92b300c4e6f7f6fc22e1cc02d7c07627769a6339 Author: Chen-Yu Tsai Date: Fri Feb 17 11:13:26 2017 +0800 drm/sun4i: Check return value of drm_vblank_init drm_vblank_init can fail due to insufficient memory. Ignoring the error and proceeding may cause the kernel to dereference an invalid pointer when vblank is enabled. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 9d56defb44b15427f4342c543a70fb7886fc06f5 Author: Chen-Yu Tsai Date: Fri Feb 17 11:13:25 2017 +0800 drm/sun4i: Fix up error path cleanup for master bind function The master bind function calls numerous drm functions which initialize underlying structures. It also tries to bind the various components of the display pipeline, some of which may add additional drm objects. This patch adds proper cleanup functions in the error path of the master bind function. This requires the patch "drm/sun4i: Move drm_mode_config_cleanup call to main driver", which splits out drm_mode_config_cleanup from sun4i_framebuffer_free so we can call it separately. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_drv.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 92caf9bede544d4f26c183bf7e5b390b5d80a66e Author: Chen-Yu Tsai Date: Fri Feb 17 11:13:24 2017 +0800 drm/sun4i: Move drm_mode_config_cleanup call to main driver drm_mode_config_cleanup is the complement of drm_mode_config_init, which is called in the bind function of sun4i_drv. drm_mode_config_cleanup should be put in the unbind function to match. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_drv.c | 1 + drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 011de1b1db534b0ab4ad8099b99c12a17e7c68e0 Author: Nicholas Mc Guire Date: Mon Feb 13 09:14:21 2017 +0100 mtd: spi-nor: intel: use ERR_CAST in return statement This fixes a sparse warning about incorrect type in return expression. Signed-off-by: Nicholas Mc Guire Acked-by: Marek Vasut Acked-by: Mika Westerberg Acked-by: Boris Brezillon Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/intel-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22d61878565916a0f0ff4babe9207365d0dc8bd6 Author: Nicholas Mc Guire Date: Mon Feb 13 09:13:56 2017 +0100 mtd: spi-nor: intel: use true/false for boolean writeable in struct intel_spi is a boolean and assignment should be to true/false not 1/0 as recommended by boolinit.cocci. Signed-off-by: Nicholas Mc Guire Acked-by: Marek Vasut Acked-by: Mika Westerberg Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/intel-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a5165a83c624cddb3dfa227a9324acac9ec413c Author: Alexey Khoroshilov Date: Sat Feb 18 01:08:17 2017 +0300 mtd: spi-nor: hisi: do not ignore clk_prepare_enable() failure hisi_spi_nor_probe() ignores clk_prepare_enable() error code. The patch fixes that. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Acked-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/hisi-sfc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 57dacfedf856c475a10890c1f8ebcc1c63473cd1 Author: Timur Tabi Date: Tue Feb 28 17:16:02 2017 -0600 net: qcom/emac: optimize QDF2400 SGMII RX/TX impedence values Adjust the impedance values of the RX and TX lanes in the SGMII block so that they are closer to optimal values. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-sgmii-qdf2400.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 28928a3ce142b2e4e5a7a0f067cefb41a3d2c3f9 Author: Krzysztof Kozlowski Date: Sat Feb 11 22:14:56 2017 +0200 ARM: dts: exynos: Do not ignore real-world fuse values for thermal zone 0 on Exynos5420 In Odroid XU3 Lite board, the temperature levels reported for thermal zone 0 were weird. In warm room: /sys/class/thermal/thermal_zone0/temp:32000 /sys/class/thermal/thermal_zone1/temp:51000 /sys/class/thermal/thermal_zone2/temp:55000 /sys/class/thermal/thermal_zone3/temp:54000 /sys/class/thermal/thermal_zone4/temp:51000 Sometimes after booting the value was even equal to ambient temperature which is highly unlikely to be a real temperature of sensor in SoC. The thermal sensor's calibration (trimming) is based on fused values. In case of the board above, the fused values are: 35, 52, 43, 58 and 43 (corresponding to each TMU device). However driver defined a minimum value for fused data as 40 and for smaller values it was using a hard-coded 55 instead. This lead to mapping data from sensor to wrong temperatures for thermal zone 0. Various vendor 3.10 trees (Hardkernel's based on Samsung LSI, Artik 10) do not impose any limits on fused values. Since we do not have any knowledge about these limits, use 0 as a minimum accepted fused value. This should essentially allow accepting any reasonable fused value thus behaving like vendor driver. The exynos5420-tmu-sensor-conf.dtsi is copied directly from existing exynos4412 with one change - the samsung,tmu_min_efuse_value. Signed-off-by: Krzysztof Kozlowski Acked-by: Bartlomiej Zolnierkiewicz Acked-by: Eduardo Valentin Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Reviewed-by: Anand Moon Tested-by: Anand Moon arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi | 25 +++++++++++++++++++++++ arch/arm/boot/dts/exynos5420.dtsi | 10 ++++----- 2 files changed, 30 insertions(+), 5 deletions(-) commit 2c221f5d41662e1b4a26d09fb953bbe4f4b025b3 Author: Jaehoon Chung Date: Tue Feb 28 16:00:26 2017 +0900 ARM: dts: exynos: Add phy-pcie node for pcie to Exynos5440 Add pcie-phy node to phy-exynos-pcie along with some changes to other nodes: 1. Remove the configuration space from "ranges" property because this was the old way of getting it. Preferred is to use "config" reg. 2. Use the reg-names as "elbi" and "config" so the purpose of addresses will be easily known. Signed-off-by: Jaehoon Chung Reviewed-by: Pankaj Dubey Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5440.dtsi | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 2b17d2f8bc55e0abe5f03fda065d73cfcf465e5c Author: Andi Shyti Date: Fri Feb 10 11:17:21 2017 +0900 arm64: dts: exynos: Add stmfts touchscreen node for TM2 and TM2E TM2 and TM2E devices are provided with a ST-Microelectronics Finger Tip S device with small differences: - screen size - TM2E uses the stmfts also as a touchkey for "back" and "menu" In this commit the initial value of the interrupt line is set to EXYNOS_PIN_PULL_UP as the interrupt is triggered when the line goes down. Signed-off-by: Andi Shyti Reviewed-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 15 ++++++++++++++- arch/arm64/boot/dts/exynos/exynos5433-tm2.dts | 5 +++++ arch/arm64/boot/dts/exynos/exynos5433-tm2e.dts | 7 +++++++ 3 files changed, 26 insertions(+), 1 deletion(-) commit b2a4b7862d6ba5c90746fc625e494b8ec5937fa1 Author: Bartlomiej Zolnierkiewicz Date: Tue Mar 7 14:56:40 2017 +0100 ata: allow subsystem to be used on m32r and s390 archs Both archs should work just fine with libata subsystem nowadays. Suggested-by: Christoph Hellwig Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Tejun Heo drivers/ata/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 0ed797f70567dedceb26afd01f0cafd7b785f483 Author: Andi Shyti Date: Fri Feb 10 11:22:38 2017 +0900 arm64: dts: exynos: Enable ir-spi in the TM2 and TM2E boards Add the device tree node for the ir-spi driver which enables the IR LED for remote controlling. This patch sets first the GPR3[3] gpio line as a regulator-fixed for enabling an external regulator which powers the IR LED. Removes also the default assignment of GPG3[7] related to the MOSI line of the SPI3 bus. Signed-off-by: Andi Shyti Reviewed-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski .../boot/dts/exynos/exynos5433-tm2-common.dtsi | 26 +++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit 5b6d458e87e1a1937cab15b6d44eff2ae9ed8b55 Author: Andrea Ghittino Date: Sat Mar 4 18:20:50 2017 +0100 staging: unisys: fix sparse warnings Sparse generates two warnings related to incorrect type in assignment. This patch changes the types in the struct defined in unisys Signed-off-by: Andrea Ghittino Acked-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/iochannel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 766ceda083dabc0d112939bbdc1f26abc409483d Author: simran singhal Date: Fri Mar 3 21:29:04 2017 +0530 staging: wlan-ng: Replace "the the " with "the" This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: simran singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd63eb0c1f546ab39f5647faeac44c5b8ca3bbcc Author: simran singhal Date: Fri Mar 3 21:29:05 2017 +0530 staging: rtl8192u: Replace "the the " with "the" This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: simran singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bffa320f295fd91a8c92bf1e98981e03b575aa8d Author: simran singhal Date: Fri Mar 3 21:29:06 2017 +0530 staging: unisys: Replace "the the " with "the" This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: simran singhal Acked-by: David Kershner Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e13b567d522ece7ec2aeb1cdcf1f6aa04dee7eea Author: Derek Robson Date: Sat Feb 11 14:10:42 2017 +1300 Staging: media: platform: bcm2835 - style fix Changed permissions to octal style Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d01e631855b6a501c99f55b89f2f724e15b12eb0 Author: Aishwarya Pant Date: Tue Mar 7 01:27:41 2017 +0530 staging: bcm2835-audio: remove unused semaphores This patch removes unused semaphores alsa_stream->buffers_update_sem and alsa_stream->control_sem from struct bcm2835_alsa_stream Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 2 -- drivers/staging/vc04_services/bcm2835-audio/bcm2835.h | 2 -- 2 files changed, 4 deletions(-) commit 85fa002f2e9102ba3305c419badc9871ca3b1ae0 Author: Narcisa Ana Maria Vasile Date: Tue Mar 7 17:22:03 2017 +0200 staging: bcm2835-camera: Replace ternary operator with min_t macro Use macro min_t to get the minimum of two values for readability. Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit fd2694a112d6b53eba8d8e182fef0dccdab6c9e8 Author: Shuah Khan Date: Tue Feb 28 12:12:21 2017 -0700 ARM: exynos_defconfig: Increase CONFIG_CMA_SIZE_MBYTES to 96 Current CMA size of 64 Mbytes is right on the edge of being small when several drivers need to allocate large CMA buffers. For example, if the s5p-mfc driver needs to pre-allocate CMA memory to decode a H.264 1080p video, then there won't be enough CMA memory left for other drivers, such as the exynos-drm driver that may need to allocate GEM buffers for the display manager. Increasing CMA size to 96 Mbytes in exynos_defconfig addresses use-cases such as these. Suggested-by: Marek Szyprowski Signed-off-by: Shuah Khan Reviewed-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm/configs/exynos_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb1e87656e0f9c24cd6a9dbc664cdd493a70a57c Author: simran singhal Date: Sat Mar 4 23:11:01 2017 +0530 staging: comedi: Replace "is is" with "is" This patch replace "is is " with "is". The replacement couldn't be automated because sometimes the first "is" was meant to be another word. Signed-off-by: simran singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_usb6501.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc109dc597d7f4c153eb09a56d29dcfed8d40585 Author: simran singhal Date: Sat Mar 4 23:10:59 2017 +0530 staging: rtl8192u: Replace "is is" with "is" This patch replace "is is " with "is". The replacement couldn't be automated because sometimes the first "is" was meant to be another word. Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r819xU_cmdpkt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3b6e2706dbb7595cf4e5e59ffffe4528ee02517 Author: Krzysztof Kozlowski Date: Mon Jan 30 21:27:49 2017 +0200 ARM: exynos_defconfig: Enable DYNAMIC_DEBUG and get rid of old ext3 DYNAMIC_DEBUG is quite useful for debugging kernels and should not cause noticeable performance regressions. It makes the kernel bigger (around 4%) but this difference should not impact typical developer and reference usage of this defconfig. Sizes: zImage-old: 4641496 bytes zImage-new: 4811384 bytes text data bss dec hex filename 7031229 2570916 327016 9929161 9781c9 vmlinux-old 7205921 2800052 327016 10332989 9dab3d vmlinux-new Additionally, remove the EXT3_FS symbol because it is entirely replaced by EXT4_FS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas arch/arm/configs/exynos_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7d835840219d06515bf7aa860cc915840ee00d43 Author: Gargi Sharma Date: Thu Mar 2 23:12:55 2017 +0530 staging: lustre: Remove lustre_eacl.h The structures and the macros in the header file are not used anywhere inside the kernel (verified by using grep). The structures and macros were leftover from the patch 341f1f0affed1c24712f37c95bb654b3b33ab2c6 "staging: lustre: remove remote client support". Also, removed the include statements for lustre_eacl.h. Signed-off-by: Gargi Sharma Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/include/lustre_eacl.h | 74 ---------------------- .../staging/lustre/lustre/llite/llite_internal.h | 1 - drivers/staging/lustre/lustre/llite/xattr.c | 1 - 3 files changed, 76 deletions(-) commit fb1c3256477207846ad0e626dc8adf173c1ba376 Author: Gargi Sharma Date: Thu Mar 2 22:27:15 2017 +0530 staging: lustre: lnet: Constify kernel_param_ops structure The structure is used as an argument to module_param macro. This macro calls a bunch of other macros and finally assigns the instance of the kernel_param_ops structure to the const struct kernel_param_ops* field of a variable of type kernel_param. Hence, const can be added to the structure. Coccinelle Script: @r disable optional_qualifier@ identifier i; position p; @@ static struct kernel_param_ops i@p = { ... }; @ok1@ identifier r.i; expression e; position p; @@ e = i@p @script:python s@ i << r.i; t; @@ coccinelle.t = i[10:]; @ok2@ declarer name module_param; expression e1,e2; position p; @@ module_param(e1,s.t@p,e2); @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct kernel_param_ops i = { ... }; Signed-off-by: Gargi Sharma Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/libcfs/debug.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fd535ae7847513b89c50c7fe485c101a51fa6d23 Author: Mario Bambagini Date: Thu Mar 2 00:57:09 2017 +0100 staging: lustre: fix sparse warning about different address spaces fixed the following sparse warning by adding proper cast: drivers/staging//lustre/lustre/obdclass/obd_config.c:1055:74: warning: incorrect type in argument 2 (different address spaces) drivers/staging//lustre/lustre/obdclass/obd_config.c:1055:74: expected char const [noderef] * drivers/staging//lustre/lustre/obdclass/obd_config.c:1055:74: got char *[assigned] sval Signed-off-by: Mario Bambagini Acked-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/obd_config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fad358a06c51bd40a131f4f94711c46e5d77cdae Author: Guan Ben Date: Tue Mar 7 10:25:27 2017 -0800 Input: pwm-beeper - support customized freq for SND_BELL Extend the pwm-beeper driver to support customized frequency for SND_BELL from device properties. Signed-off-by: Guan Ben Signed-off-by: Mark Jonas Signed-off-by: Heiko Schocher Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/pwm-beeper.txt | 1 + drivers/input/misc/pwm-beeper.c | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) commit 400a0befc96240f7bb2a53b9622deffd55d385fe Author: Mikulas Patocka Date: Wed Jan 4 20:23:52 2017 +0100 dm bufio: add sector start offset to dm-bufio interface Introduce dm_bufio_set_sector_offset() interface to allow setting a sector offset for a dm-bufio client. This is a prereq for the DM integrity target. Signed-off-by: Mikulas Patocka Signed-off-by: Milan Broz Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 51 ++++++++++++++++++++++++++++++++------------------- drivers/md/dm-bufio.h | 7 +++++++ 2 files changed, 39 insertions(+), 19 deletions(-) commit 9b4b5a797cf8a8d904df979891a8de53f2cb9694 Author: Milan Broz Date: Wed Jan 4 20:23:51 2017 +0100 dm table: add flag to allow target to handle its own integrity metadata Add DM_TARGET_INTEGRITY flag that specifies bio integrity metadata is not inherited but implemented in the target itself. Signed-off-by: Milan Broz Signed-off-by: Mike Snitzer drivers/md/dm-table.c | 11 +++++++++++ include/linux/device-mapper.h | 6 ++++++ 2 files changed, 17 insertions(+) commit b29d4986d0da1a27cd35917cdb433672f5c95d7f Author: Joe Thornber Date: Thu Dec 15 04:57:31 2016 -0500 dm cache: significant rework to leverage dm-bio-prison-v2 The cache policy interfaces have been updated to work well with the new bio-prison v2 interface's ability to queue work immediately (promotion, demotion, etc) -- overriding benefit being reduced latency on processing IO through the cache. Previously such work would be left for the DM cache core to queue on various lists and then process in batches later -- this caused a serious delay in latency for IO driven by the cache. The background tracker code was factored out so that all cache policies can make use of it. Also, the "cleaner" policy has been removed and is now a variant of the smq policy that simply disallows migrations. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/Kconfig | 8 - drivers/md/Makefile | 5 +- drivers/md/dm-cache-background-tracker.c | 238 +++ drivers/md/dm-cache-background-tracker.h | 46 + drivers/md/dm-cache-metadata.h | 2 + drivers/md/dm-cache-policy-cleaner.c | 469 ------ drivers/md/dm-cache-policy-internal.h | 76 +- drivers/md/dm-cache-policy-smq.c | 821 +++++----- drivers/md/dm-cache-policy.h | 187 +-- drivers/md/dm-cache-target.c | 2485 +++++++++++++----------------- 10 files changed, 1930 insertions(+), 2407 deletions(-) commit e1cd3325b7a7b57717b6e84028edb33164a83bab Author: Paulo Zanoni Date: Tue Feb 21 18:23:27 2017 -0300 drm/i915: move the {skl, bxt}_{i, uni}nit_cdclk declarations Move the {skl,bxt}_{i,uni}nit_cdclk declarations to the place where the intel_cdclk.c functions are declared since these functions have moved there. Signed-off-by: Paulo Zanoni Reviewed-by: Dhinakaran Pandiyan Link: http://patchwork.freedesktop.org/patch/msgid/1487712207-17181-1-git-send-email-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_drv.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6b9e441df4b56f6cc9be0cbd2b4015b240d217dd Author: Paulo Zanoni Date: Mon Feb 20 17:00:41 2017 -0300 drm/i915: remove potentially confusing IS_G4X checks The IS_G4X macro is defined as IS_G45 || IS_GM45. We have two points in our code where we have an if statement checking for GM45 followed by an else if statement checking for IS_G4X. This can be confusing since the IS_G4X check won't be catching the previously-checked GM45. Someone quickly trying to check which functions run on each platform may end up getting confused while reading the code. Fix the potential confusion by limiting the else if statements to only check for the platform that was not already checked earlier in the if ladder. Signed-off-by: Paulo Zanoni Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1487620842-22893-3-git-send-email-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_cdclk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit efbd24646abc044f70afc53bd331c7b520f499fd Author: Gregory CLEMENT Date: Wed Feb 22 18:31:46 2017 +0100 arm64: defconfig: enable I2C_PXA Now that the Armada 37xx SoCs support the i2c pxa driver, enable it by default. Signed-off-by: Gregory CLEMENT arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit a3cbfd56ff909393e2d59236d94205ae17dfc5d5 Author: Pali Rohár Date: Tue Mar 7 09:43:35 2017 -0800 Input: alps - cleanup alps_model_data Sort all devices in alps_model_data by signature and remove command_mode_resp which is not used anymore. Signed-off-by: Pali Rohár Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 56 +++++++++++++++++++++------------------------- drivers/input/mouse/alps.h | 5 ----- 2 files changed, 25 insertions(+), 36 deletions(-) commit c9815232c3cca58bb2b664f37b681841981ed4a9 Author: Pali Rohár Date: Tue Mar 7 09:42:46 2017 -0800 Input: alps - warn about unsupported ALPS V9 touchpad Support for devices with ALPS_PROTO_V9 is not implemented yet but we can detect these alps touchpads and warn users about it. Signed-off-by: Pali Rohár Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 10 ++++++++++ drivers/input/mouse/alps.h | 1 + 2 files changed, 11 insertions(+) commit 09c398bc01f507e31b9c1325a10e231d271fea00 Author: Pali Rohár Date: Tue Mar 7 09:41:34 2017 -0800 Input: alps - move ALPS_PROTO_V4 out of alps_model_data table Like for other protocols create alps_v4_protocol_data and use it in alps_identify() function. Signed-off-by: Pali Rohár Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit d7ec74f412f5e5c6b964a4b635b1e3f1d72a7b34 Author: Gregory CLEMENT Date: Mon Feb 20 18:27:17 2017 +0100 arm64: defconfig: enable MVNETA Now that the Armada 37xx SoCs support the mvneta driver, enable it by default. It is especially useful when booting on an NFS root. Signed-off-by: Gregory CLEMENT arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 64486ae7a9a9cc048c2842ba7628df7ce7374019 Author: Chris Wilson Date: Tue Mar 7 15:59:08 2017 +0000 drm/i915: Flush idle work when changing missed-irq fault injection In order for the missed-irq update to take effect, the device must be idle. So when the user updates the fault injection via debugfs, idle the device. v2: Idle is explicitly required for setting test_irq, and good behaviour for clearing the missed_irq. v3: Use matching types; expanding to more than ulong rings is left as an exercise to the reader. Testcase: igt/drv_missed_irq Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170307155908.14576-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 55 +++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 15 deletions(-) commit a58d73340b0ec93fc29a826e45fbbfbc3f81b7eb Author: Willy Tarreau Date: Sun Feb 12 10:30:35 2017 +0100 ARM: dts: armada-385-synology-ds116: add support for Synology DS116 NAS This commit adds the device tree description for the Synology DS116 NAS. It is a one-bay NAS powered by a Marvell Armada 385 at 1.866 GHz. The device features the following items : - 1 GB DDR3 RAM - a 8MB SPI flash - 2 USB3 ports, power-controlled via a GPIO for each - 1 gigabit ethernet interface connected over SGMII to a 88e1514 phy - a single SATA port, power-controlled via a GPIO - a battery-powered RTC - one UART connected to the serial console (2mm connector on board) - the Tx line of the second UART connected to a PIC microcontroller dealing with beep, reset, power-off and LED blinking (9600 Bps) - some of the front-panel LEDs are connected to GPIOs, one is directly connected to the SATA link to report disk activity. - a GPIO-controlled fan (3 bits for 7 speeds and OFF) With this DTS, my NAS is 100% functional starting with kernel 4.9. Reviewed-by: Andrew Lunn Signed-off-by: Willy Tarreau Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/armada-385-synology-ds116.dts | 321 ++++++++++++++++++++++++ 2 files changed, 322 insertions(+) commit 742c8fdc31e820503f9267070311d894978d1349 Author: Joe Thornber Date: Fri Oct 21 10:06:40 2016 -0400 dm bio prison v2: new interface for the bio prison The deferred set is gone and all methods have _v2 appended to the end of their names to allow for continued use of the original bio prison in DM thin-provisioning. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/Makefile | 1 + drivers/md/dm-bio-prison-v1.c | 464 ++++++++++++++++++++++++++++++++++++++++++ drivers/md/dm-bio-prison-v1.h | 138 +++++++++++++ drivers/md/dm-bio-prison-v2.c | 369 +++++++++++++++++++++++++++++++++ drivers/md/dm-bio-prison-v2.h | 152 ++++++++++++++ drivers/md/dm-bio-prison.c | 424 -------------------------------------- drivers/md/dm-bio-prison.h | 138 ------------- drivers/md/dm-cache-target.c | 2 +- drivers/md/dm-thin.c | 2 +- 9 files changed, 1126 insertions(+), 564 deletions(-) commit 0d7cd09a3dbbdb3d4932cddbef613b2a6de28b75 Author: Kees Cook Date: Fri Mar 3 12:11:40 2017 -0800 pstore: Improve register_pstore() error reporting Uncommon errors are better to get reported to dmesg so developers can more easily figure out why pstore is unhappy with a backend attempting to register. Signed-off-by: Kees Cook fs/pstore/platform.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 1344dd86f35c7669c94aceb2273676e356cff848 Author: Kees Cook Date: Fri Mar 3 17:45:38 2017 -0800 pstore: Avoid race in module unloading Technically, it might be possible for struct pstore_info to go out of scope after the module_put(), so report the backend name first. Signed-off-by: Kees Cook fs/pstore/platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6330d5534786d5315d56d558aa6d20740f97d80a Author: Kees Cook Date: Mon Mar 6 12:42:12 2017 -0800 pstore: Shut down worker when unregistering When built as a module and running with update_ms >= 0, pstore will Oops during module unload since the work timer is still running. This makes sure the worker is stopped before unloading. Signed-off-by: Kees Cook Cc: stable@vger.kernel.org fs/pstore/platform.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit e9a330c4289f2ba1ca4bf98c2b430ab165a8931b Author: Kees Cook Date: Sun Mar 5 22:08:58 2017 -0800 pstore: Use dynamic spinlock initializer The per-prz spinlock should be using the dynamic initializer so that lockdep can correctly track it. Without this, under lockdep, we get a warning at boot that the lock is in non-static memory. Fixes: 109704492ef6 ("pstore: Make spinlock per zone instead of global") Fixes: 76d5692a5803 ("pstore: Correctly initialize spinlock and flags") Signed-off-by: Kees Cook Cc: stable@vger.kernel.org fs/pstore/ram_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3faf93543ccb3410bfaf992a0de4a925631a3526 Author: Bhumika Goyal Date: Sun Feb 19 15:07:53 2017 +0530 pstore: constify pstore_zbackend structures The references of pstore_zbackend structures are stored into the pointer zbackend of type struct pstore_zbackend. The pointer zbackend can be made const as it is only dereferenced. After making this change the pstore_zbackend structures whose references are stored into the pointer zbackend can be made const too. File size before: text data bss dec hex filename 4817 541 172 5530 159a fs/pstore/platform.o File size after: text data bss dec hex filename 4865 477 172 5514 158a fs/pstore/platform.o Signed-off-by: Bhumika Goyal Signed-off-by: Kees Cook fs/pstore/platform.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a126de75c1b88dbfb0a313bc34d9cedf3b9dd644 Author: Chris Packham Date: Wed Feb 1 22:02:59 2017 +1300 ARM: dts: armada-38x add node labels As was done with Armada XP, add node labels to Armada 38x common and SoC specific nodes to make them easier to reference in board device trees. Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385.dtsi | 20 +++++++++----------- arch/arm/boot/dts/armada-388.dtsi | 9 ++++----- arch/arm/boot/dts/armada-38x.dtsi | 38 +++++++++++++++++++------------------- 3 files changed, 32 insertions(+), 35 deletions(-) commit 1936feae54a6724a27a6ca1b948fd0e80371f7b0 Author: Namhyung Kim Date: Wed Mar 8 00:08:33 2017 +0900 perf c2c: Fix display bug when using pipe Currently 'perf c2c report' determines display mode using the --stdio option, but it could be a problem if stdout is not a tty since setup_browser falls back to stdio in this case. But perf c2c didn't know this and tried to use TUI browser anyway. It should check "use_browser" variable instead. For example, the following command showed nothing and broke terminal setting. Now it's fixed.. $ perf c2c report | head ================================================= Trace Event Information ================================================= Total records : 136 Locked Load/Store Operations : 6 Load Operations : 62 Loads - uncacheable : 0 Loads - IO : 1 Loads - Miss : 7 Loads - no mapping : 2 Committer notes: When trying it without a proper perf.data file it results in a stuck terminal, just as Namhyung reported above: [acme@jouet ~]$ perf c2c report | head WARNING: no sample cpu value[acme@jouet ~]$ One has to kill it from some other xterm. Confirm that this patch fixes it: After: $ perf c2c report | head WARNING: no sample cpu value================================================= Trace Event Information ================================================= Total records : 14 Locked Load/Store Operations : 0 Load Operations : 0 Loads - uncacheable : 0 Loads - IO : 0 Loads - Miss : 0 Loads - no mapping : 0 $ Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Peter Zijlstra Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170307150851.22304-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f75d2895e053efb2a69194d98754e4d5f4fa3a28 Author: Namhyung Kim Date: Wed Mar 8 00:08:32 2017 +0900 perf c2c: Clarify help message of --stats option As it is not strictly asking for only stdio output, but will imply using it. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Peter Zijlstra Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170307150851.22304-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b53dbef2aeaad6bf532bd4db2f4b2beefd42e49 Author: Namhyung Kim Date: Wed Mar 8 00:08:29 2017 +0900 perf report: Hide tip message when -q option is given The tip message at the end was printed regardless of the -q option. Originally, the message suggested only '-s comm,dso' option for higher level view when no sort option and parent option were given. Now it shows random help message regardless of the options so the condition can be simplified to honor the -q option. Committer notes: Before: $ perf report --stdio -q 42.77% ls ls [.] _init 13.21% ls ld-2.24.so [.] match_symbol 12.55% ls libc-2.24.so [.] __strcoll_l 11.94% ls libc-2.24.so [.] _init # # (Tip: Show current config key-value pairs: perf config --list) # $ After: $ perf report --stdio -q 42.77% ls ls [.] _init 13.21% ls ld-2.24.so [.] match_symbol 12.55% ls libc-2.24.so [.] __strcoll_l 11.94% ls libc-2.24.so [.] _init $ We still have those two extra lines tho (that git commit insists in turning into one, or git commit --amend doesn't make me add), food for another patch... Reported-and-Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170307150851.22304-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-report.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 84052652feb89e76fde6fd37d26c9649da715557 Author: Codrut Grosu Date: Sat Feb 25 12:12:21 2017 +0200 ASoC: txx9: Added requiered spaces. This was reported by checpatch.pl Signed-off-by: Codrut GROSU Signed-off-by: Mark Brown sound/soc/txx9/txx9aclc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 114ab993e1845a4152bc01d1075b1fb38e741df9 Author: Calin Cruceru Date: Sat Feb 25 12:11:11 2017 +0200 ASoC: samsung: Remove extra blank lines This was reported by checkpatch.pl Signed-off-by: Calin Cruceru Signed-off-by: Mark Brown sound/soc/samsung/bells.c | 1 - sound/soc/samsung/i2s-regs.h | 2 -- sound/soc/samsung/i2s.c | 1 - sound/soc/samsung/s3c-i2s-v2.c | 1 - 4 files changed, 5 deletions(-) commit 3e2e1258443ea97e40dfb4a3cf15108d17939066 Author: Fabien Parent Date: Thu Feb 23 19:01:57 2017 +0100 spi: davinci: enable DMA when channels are defined in DT When booting with DT the SPI driver is always using the SPI_IO_TYPE_INTR mode to transfer data even if DMA channels are defined in the DT. This commit changes the behaviour to select the SPI_IO_TYPE_DMA mode if DMA channels are defined in the DT and will keep SPI_IO_TYPE_INTR if the channels are not defined in it. Signed-off-by: Fabien Parent Signed-off-by: Frode Isaksen Signed-off-by: Mark Brown drivers/spi/spi-davinci.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8aedbf580d21121d2a032e4c8ea12d8d2d85e275 Author: Fabien Parent Date: Thu Feb 23 19:01:56 2017 +0100 spi: davinci: Use SPI framework to handle DMA mapping Uppers layers like MTD can pass vmalloc'd buffers to the SPI driver, and the current implementation will fail to map these kind of buffers. The SPI framework is able to detect the best way to handle and map buffers. This commit updates the davinci SPI driver in order to use the SPI framework to handle the DMA mapping of buffers coming from an upper layer. Signed-off-by: Fabien Parent Signed-off-by: Frode Isaksen Signed-off-by: Mark Brown drivers/spi/spi-davinci.c | 69 +++++++++++++---------------------------------- 1 file changed, 18 insertions(+), 51 deletions(-) commit 45493684f5953d83cb2621027ad0792d167bedab Author: Milo Kim Date: Tue Feb 28 16:50:40 2017 +0900 regulator: lm363x: Use generic property for hardware enable pins With index usages, device specific properties can be replaced with generic one. Vpos is index 0 and Vneg is index 1. DT examples are added as well. Signed-off-by: Milo Kim Signed-off-by: Mark Brown .../bindings/regulator/lm363x-regulator.txt | 78 +++++++++++++++++++++- 1 file changed, 76 insertions(+), 2 deletions(-) commit 9503b5085fd0e7cfc6e32b1a473a997303d7e26a Author: Milo Kim Date: Tue Feb 28 16:50:41 2017 +0900 regulator: lm363x: Use generic DT property name for external control pins Vpos and Vneg LDOs can be enabled or disabled by external GPIOs. Use general DT property 'enable-gpios' for this usage. Two enable pins are differentiable by selecting the index number. Signed-off-by: Milo Kim Signed-off-by: Mark Brown drivers/regulator/lm363x-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ea2a2ad17ca1e9dbb01ac935f1b1b53f99f73b13 Author: Jerome Brunet Date: Tue Mar 7 14:12:22 2017 +0100 ASoC: dio2125: use gpiod_set_value_cansleep Use the "cansleep" variant of gpiod_set_value so the driver can be used with slow gpio controllers as well. Fixes: 85825d5e8869 ("ASoC: dio2125: add dio2125 amp driver") Reported-by: Mark Brown Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown sound/soc/codecs/dio2125.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7be5c5fe9287c7f5cc0f2f3c742d602c82daa2d6 Author: Codrut Grosu Date: Sat Feb 25 22:25:23 2017 +0200 ASoC: pxa: Add space around '=' This was reported by checkpatch.pl Signed-off-by: Codrut Grosu Acked-by: Robert Jarzmik Signed-off-by: Mark Brown sound/soc/pxa/e750_wm9705.c | 2 +- sound/soc/pxa/e800_wm9712.c | 2 +- sound/soc/pxa/em-x270.c | 2 +- sound/soc/pxa/mioa701_wm9713.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit adbdba3fa1b618376363db317324c69d8ce5659c Author: Codrut Grosu Date: Sat Feb 25 21:59:33 2017 +0200 ASoC: sirf: Added blank line after declarations This was reported by checkpatch.pl Signed-off-by: Codrut GROSU Signed-off-by: Mark Brown sound/soc/sirf/sirf-audio-port.c | 1 + sound/soc/sirf/sirf-audio.c | 1 + sound/soc/sirf/sirf-usp.c | 3 +++ 3 files changed, 5 insertions(+) commit fe3a980cd39125efb7e9ddd67dd0f1a9ef237171 Author: Codrut Grosu Date: Sat Feb 25 21:50:21 2017 +0200 ASoC: ux500: Added blank line after declarations This was reported by checkpatch.pl Signed-off-by: Codrut GROSU Signed-off-by: Mark Brown sound/soc/ux500/ux500_msp_dai.c | 1 + 1 file changed, 1 insertion(+) commit b1c5d923720a066b95249f3702a94d27b5714ee9 Author: Codrut Grosu Date: Sat Feb 25 21:41:25 2017 +0200 ASoC: ux500: Remove unuseful break after return This was reported by checkpatch.pl Signed-off-by: Codrut GROSU Signed-off-by: Mark Brown sound/soc/ux500/ux500_msp_i2s.c | 1 - 1 file changed, 1 deletion(-) commit 8fcf1e5eb460d8f032c699280f5a33fbf3716c29 Author: Codrut Grosu Date: Sat Feb 25 21:33:22 2017 +0200 ASoC: ux500: Added */ to the next line This was reported by checkpatch.pl Signed-off-by: Codrut GROSU Signed-off-by: Mark Brown sound/soc/ux500/ux500_msp_dai.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c2dcce361ab7161e494e93f19a2945574c5a2cd7 Author: Codrut Grosu Date: Sat Feb 25 21:17:53 2017 +0200 ASoC: txx9: Added blank line after declarations This was reported by checkpatch.pl Signed-off-by: Codrut GROSU Signed-off-by: Mark Brown sound/soc/txx9/txx9aclc.c | 1 + 1 file changed, 1 insertion(+) commit bf3c6ef7f5b1e43739ad0356a5afee5127c86465 Author: Codrut Grosu Date: Sat Feb 25 20:59:17 2017 +0200 ASoC: tegra: Add blank line after declarations This was reported by checkpatch.pl Signed-off-by: Codrut GROSU Acked-by: Thierry Reding Signed-off-by: Mark Brown sound/soc/tegra/tegra20_das.c | 1 + sound/soc/tegra/tegra30_ahub.c | 1 + 2 files changed, 2 insertions(+) commit 8804e073a8b7b85e98e46a239da4d2d92adfe124 Author: Adriana Constantinescu Date: Sun Feb 26 21:12:06 2017 +0200 ASoC: omap: Remove unnecessary 'out of memory' message Out of memory message detected using checkpatch.pl Signed-off-by: Adriana Constantinescu Acked-by: Jarkko Nikula Signed-off-by: Mark Brown sound/soc/omap/rx51.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 34e82433c26ea6908fa19783fee2c4bba5bad9c8 Author: Codrut Grosu Date: Sat Feb 25 23:40:31 2017 +0200 ASoC: pxa-ssp: Line up *s in block comments This was reported by checkpatch.pl Signed-off-by: Codrut Grosu Signed-off-by: Mark Brown sound/soc/pxa/pxa-ssp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 17339f6099154678485244cc17d700f19ece0dc0 Author: Codrut Grosu Date: Sat Feb 25 23:06:36 2017 +0200 ASoC: pxa: Remove unneeded return statement in void function This was reported by checkpatch.pl Signed-off-by: Codrut Grosu Signed-off-by: Mark Brown sound/soc/pxa/mmp-pcm.c | 1 - sound/soc/pxa/mmp-sspa.c | 1 - 2 files changed, 2 deletions(-) commit 672e3cbe783e2f3f40bdc19e5cb09accdd3e4b6b Author: Codrut Grosu Date: Sat Feb 25 22:50:29 2017 +0200 ASoC: pxa: Remove spaces before tabs This was reported by checkpatch.pl Signed-off-by: Codrut Grosu Signed-off-by: Mark Brown sound/soc/pxa/pxa2xx-i2s.c | 6 +++--- sound/soc/pxa/pxa2xx-pcm.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit ca87cfad69e6b657a4f5fa665b67aee275792af4 Author: Codrut Grosu Date: Sat Feb 25 22:42:33 2017 +0200 ASoC: pxa: Add space around ':' and '(' This was reported by checkpatch.pl Signed-off-by: Codrut Grosu Signed-off-by: Mark Brown sound/soc/pxa/pxa2xx-i2s.c | 2 +- sound/soc/pxa/tosa.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 05af0917aaf8a0755de8fbbf72153ad6ca1f5443 Author: Codrut Grosu Date: Sat Feb 25 23:54:16 2017 +0200 ASoC: pxa: The open brace is placed with the previous line This was reported by checkpatch.pl Signed-off-by: Codrut Grosu Signed-off-by: Mark Brown sound/soc/pxa/raumfeld.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 291aaff0c6f2c56645061b9c8afadc0bb1251676 Author: Codrut Grosu Date: Sat Feb 25 23:26:56 2017 +0200 ASoC: pxa: Remove unneeded else after return statement This was reported by checkpatch.pl Signed-off-by: Codrut Grosu Signed-off-by: Mark Brown sound/soc/pxa/pxa2xx-ac97.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3e22e9d702ee719c8106fd44578b12ce27999ae6 Author: Codrut Grosu Date: Sat Feb 25 22:33:00 2017 +0200 ASoC: pxa: Remove space before semicolon This was reported by checkpatch.pl Signed-off-by: Codrut Grosu Signed-off-by: Mark Brown sound/soc/pxa/spitz.c | 4 ++-- sound/soc/pxa/z2.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 1dbe692380de6eebdd3702b820a4bee6b931a2e5 Author: Codrut Grosu Date: Sat Feb 25 23:33:50 2017 +0200 ASoC: pxa-ssp: Added blank line after declarations This was reported by checkpatch.pl Signed-off-by: Codrut Grosu Signed-off-by: Mark Brown sound/soc/pxa/pxa-ssp.c | 1 + 1 file changed, 1 insertion(+) commit 7fba8306ccebb651bdba0c04692022a0b519cfea Author: Jani Nikula Date: Mon Mar 6 16:31:30 2017 +0200 drm/i915/dsi: arrange intel_dsi.h according to relevant files No functional changes. Reviewed-by: Hans de Goede Reviewed-by: Bob Paauwe Cc: Madhav Chauhan Cc: Hans de Goede Cc: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/fadc3b0de70d2c7db7a6ecbe7121328483330f04.1488810382.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5431fc03adc8a5a8d13e9cb24fc918e8d8d37ba8 Author: Jani Nikula Date: Mon Mar 6 16:31:29 2017 +0200 drm/i915/dsi: rename intel_dsi_panel_vbt.c to intel_dsi_vbt.c Emphasize that the VBT file is nowadays more about initializing and running stuff based on the VBT contents, not so much about being a "panel driver". No functional changes. Reviewed-by: Hans de Goede Reviewed-by: Bob Paauwe Cc: Madhav Chauhan Cc: Hans de Goede Cc: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/b13cb012a555ff5eb56b5e4bb2b0205c3e025a99.1488810382.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile | 2 +- drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 798 ----------------------------- drivers/gpu/drm/i915/intel_dsi_vbt.c | 798 +++++++++++++++++++++++++++++ 3 files changed, 799 insertions(+), 799 deletions(-) commit fefc51e89c160241a15156bc26070b7b746f25f7 Author: Jani Nikula Date: Tue Mar 7 11:24:19 2017 +0200 drm/i915/dsi: rename intel_dsi_pre_disable to intel_dsi_disable The hook names reflect more the phase in the mode set sequence the hooks are called in than what they actually do in terms of the specific encoder. Stick to that scheme, and rename intel_dsi_pre_disable to intel_dsi_disable. Unify the comments around this while at it. No functional changes. v2: Add more sense in the enable/disable hook comments (Ville) Reviewed-by: Hans de Goede Reviewed-by: Bob Paauwe Cc: Madhav Chauhan Cc: Hans de Goede Cc: Bob Paauwe Cc: Ville Syrjälä Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1488878659-10386-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit b0dd6887029c1e11806cb92e41a46c314edcef23 Author: Jani Nikula Date: Mon Mar 6 16:31:27 2017 +0200 drm/i915/dsi: rename intel_dsi_exec_vbt_sequence to intel_dsi_vbt_exec_sequence Use the prefix intel_dsi_vbt for all the DSI VBT functions. No functional changes. Reviewed-by: Hans de Goede Reviewed-by: Bob Paauwe Reviewed-by: Daniel Vetter Cc: Madhav Chauhan Cc: Hans de Goede Cc: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/0a05abca364f3bc7f9caf90c9bd3a68eef5f222f.1488810382.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 24 ++++++++++++------------ drivers/gpu/drm/i915/intel_dsi.h | 5 ++--- drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 2 +- 3 files changed, 15 insertions(+), 16 deletions(-) commit 3f751d6517d2108acd292c028f350a4494945538 Author: Jani Nikula Date: Mon Mar 6 16:31:26 2017 +0200 drm/i915/dsi: stop using the drm_panel framework completely Now that we've stopped using the drm_panel hooks, there aren't any benefits left with using the drm_panel framework. Remove the rest of the drm_panel use. No functional changes. Reviewed-by: Hans de Goede Reviewed-by: Bob Paauwe Reviewed-by: Daniel Vetter Cc: Madhav Chauhan Cc: Hans de Goede Cc: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/6602e36641451952065092401bd6e6cfbe93e208.1488810382.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 14 ++--------- drivers/gpu/drm/i915/intel_dsi.h | 5 ++-- drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 39 ++++++------------------------ 3 files changed, 11 insertions(+), 47 deletions(-) commit b9e56754ec797da839cbf103222084228a67c65e Author: Jani Nikula Date: Mon Mar 6 16:31:25 2017 +0200 drm/i915/dsi: call vbt_panel_get_modes directly instead of via drm_panel Commit 18a00095a5f3 ("drm/i915/dsi: Make intel_dsi_enable/disable directly exec VBT sequences") started calling the VBT sequence functions directly instead of using the drm_panel hooks. Remove the last drm_panel hook by calling vbt_panel_get_modes() directly. No functional changes. Reviewed-by: Hans de Goede Reviewed-by: Bob Paauwe Reviewed-by: Daniel Vetter Cc: Madhav Chauhan Cc: Hans de Goede Cc: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/63d0d41f29583507f5968b42b5f52e6574a1f245.1488810382.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 2 +- drivers/gpu/drm/i915/intel_dsi.h | 1 + drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 7 +------ 3 files changed, 3 insertions(+), 7 deletions(-) commit 7967ef6a02c7e6a85d780ab20b38ece4f210243a Author: Jani Nikula Date: Mon Mar 6 16:31:24 2017 +0200 drm/i915/dsi: remove support for more than one panel driver Fact is, there are no other panel drivers except the VBT based one. Simplify the code and maintenance. No functional changes. Reviewed-by: Hans de Goede Reviewed-by: Bob Paauwe Reviewed-by: Daniel Vetter Cc: Madhav Chauhan Cc: Hans de Goede Cc: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/7dfd041dd25e8e930150ede09589bb232f6248d5.1488810382.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 19 +------------------ drivers/gpu/drm/i915/intel_dsi.h | 2 +- drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 2 +- 3 files changed, 3 insertions(+), 20 deletions(-) commit 79d243a042155b4421a06faaac15d775a133e6c8 Author: Borislav Petkov Date: Sat Mar 4 10:56:10 2017 +0100 x86/boot/64: Rename start_cpu() It doesn't really start a CPU but does a far jump to C code. So call it that. Eliminate the unconditional JMP to it from secondary_startup_64() but make the jump to C code piece part of secondary_startup_64() instead. Also, it doesn't need to be a global symbol either so make it a local label. One less needlessly global symbol in the symbol table. No functionality change. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170304095611.11355-1-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/head_64.S | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit ec5a82d6c0b860bf4cba5c7ef8646ae5dad9f5a6 Author: Adrian Dinu Date: Sat Feb 25 13:23:00 2017 +0200 ASoC: Add space around '=' This was reported by checkpatch.pl Signed-off-by: Adrian Dinu Signed-off-by: Mark Brown sound/soc/soc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2c187a689b4a717024ba90c67a6ecd8ff36a23e Author: Codrut Grosu Date: Sat Feb 25 13:18:08 2017 +0200 ASoC: tegra: Remove unnecessary 'out of memory' message This was reported by checkpatch.pl Signed-off-by: Codrut GROSU Acked-by: Thierry Reding Signed-off-by: Mark Brown sound/soc/tegra/tegra20_ac97.c | 1 - sound/soc/tegra/tegra20_das.c | 1 - sound/soc/tegra/tegra20_i2s.c | 1 - sound/soc/tegra/tegra20_spdif.c | 5 ++--- sound/soc/tegra/tegra30_ahub.c | 4 +--- sound/soc/tegra/tegra30_i2s.c | 1 - sound/soc/tegra/tegra_alc5632.c | 4 +--- sound/soc/tegra/tegra_max98090.c | 4 +--- sound/soc/tegra/tegra_rt5640.c | 4 +--- sound/soc/tegra/tegra_sgtl5000.c | 4 +--- sound/soc/tegra/tegra_wm8753.c | 4 +--- sound/soc/tegra/tegra_wm8903.c | 4 +--- sound/soc/tegra/tegra_wm9712.c | 4 +--- sound/soc/tegra/trimslice.c | 4 +--- 14 files changed, 11 insertions(+), 34 deletions(-) commit 7d3f91dc1e4db18b644695c9442c62679a5dff6e Author: Jeeja KP Date: Fri Feb 17 22:48:57 2017 +0530 ASoC: Intel: bxtn: optimize ROM init retries During S3->S0 transition, sometime ROM init fails because of authentication engine loads later than the OS. In this case driver waits for a longer period and then retries the FW download causing huge delay in resume time of audio device. To avoid this, ROM INIT wait time is set to a optimal value and increased the retries for firmware download. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit 31d648f051fe82c9d6c2176b1b5ee402b1a18f21 Author: Jeeja KP Date: Fri Feb 17 22:48:56 2017 +0530 ASoC: Intel: bxtn: Store the FW/Library context at boot Store the DSP firmware/library at boot, so that for S3 to S0 transition use the stored ctx for downloading the firmware to DSP memory. Signed-off-by: Jeeja KP Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 55 +++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 19 deletions(-) commit b3ec72ace939b0abd75d5d875e77cf0b777debb7 Author: Andy Shevchenko Date: Mon Feb 20 19:46:10 2017 +0200 ASoC: Intel: bdw-rt5677: Use devm_gpiod_get() Since index is always 0 replace devm_gpiod_get_index() by devm_gpiod_get() and apply proper flags. Signed-off-by: Andy Shevchenko Acked-by: Liam Girdwood Signed-off-by: Mark Brown sound/soc/intel/boards/bdw-rt5677.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 08458871b60c4bfe49973ce1c27a2b4bc4c159b0 Author: Colin Ian King Date: Tue Feb 21 18:50:05 2017 +0000 ASoC: Intel: Skylake: fix spelling mistake: "allocationf" -> "allocation" Trivial fix to spelling mistake in dev_err message. Signed-off-by: Colin Ian King Acked-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e03580b3a7213292fae9a6677edfaa83843fa4e Author: Jerome Brunet Date: Mon Mar 6 18:44:51 2017 +0100 ASoC: dio2125: add dt-bindings Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/dioo,dio2125.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 85825d5e886912655f6c1896d76035ce1316254b Author: Jerome Brunet Date: Mon Mar 6 18:44:50 2017 +0100 ASoC: dio2125: add dio2125 amp driver The dio2125 is a stereo output driver with adjustable gain. Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 5 ++ sound/soc/codecs/Makefile | 2 + sound/soc/codecs/dio2125.c | 120 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+) commit ed864461bfbdacefc242d4c0675989915a1431b0 Author: Brian Austin Date: Mon Mar 6 08:08:00 2017 -0600 ASoC: cs35l35: Add bindings file for CS35L35 Add bindings documentation for CS35L35 Amplifier Signed-off-by: Brian Austin Signed-off-by: Mark Brown .../devicetree/bindings/sound/cs35l35.txt | 171 +++++++++++++++++++++ 1 file changed, 171 insertions(+) commit 6387f866a2ccbf393ed5ffe7e2754eb5d0781441 Author: Brian Austin Date: Mon Mar 6 08:07:59 2017 -0600 ASoC: Add support for Cirrus Logic CS35L35 Amplifier This patch adds support for the Cirrus Logic CS35L35 9V Boosted Amplifier Signed-off-by: Brian Austin Signed-off-by: Mark Brown include/sound/cs35l35.h | 103 +++ sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/cs35l35.c | 1553 ++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/cs35l35.h | 284 ++++++++ 5 files changed, 1947 insertions(+) commit 25016567be26887232aa3f6fd0d0116356691cc3 Author: Greg Kroah-Hartman Date: Tue Mar 7 13:21:24 2017 +0100 staging: atomisp: fix include Makefile mess Using LINUXINCLUDE is a very old hack, and doesn't play well with building objects in a different directory than the kernel source is in. So fix up the include file references to be relative to make it obvious we are pulling in local include files, which need to get fixed up. Reported-by: kbuild test robot Reported-by: Stephen Rothwell Cc: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/Makefile | 2 -- drivers/staging/media/atomisp/i2c/ap1302.c | 2 +- drivers/staging/media/atomisp/i2c/ap1302.h | 2 +- drivers/staging/media/atomisp/i2c/gc0310.c | 2 +- drivers/staging/media/atomisp/i2c/gc0310.h | 2 +- drivers/staging/media/atomisp/i2c/gc2235.c | 2 +- drivers/staging/media/atomisp/i2c/gc2235.h | 2 +- drivers/staging/media/atomisp/i2c/imx/ad5816g.h | 2 +- drivers/staging/media/atomisp/i2c/imx/drv201.h | 2 +- drivers/staging/media/atomisp/i2c/imx/dw9714.h | 2 +- drivers/staging/media/atomisp/i2c/imx/dw9718.h | 2 +- drivers/staging/media/atomisp/i2c/imx/dw9719.h | 2 +- drivers/staging/media/atomisp/i2c/imx/imx.c | 4 ++-- drivers/staging/media/atomisp/i2c/imx/imx.h | 4 ++-- drivers/staging/media/atomisp/i2c/imx/vcm.c | 2 +- drivers/staging/media/atomisp/i2c/libmsrlisthelper.c | 2 +- drivers/staging/media/atomisp/i2c/lm3554.c | 6 +++--- drivers/staging/media/atomisp/i2c/mt9m114.c | 2 +- drivers/staging/media/atomisp/i2c/mt9m114.h | 4 ++-- drivers/staging/media/atomisp/i2c/ov2680.c | 2 +- drivers/staging/media/atomisp/i2c/ov2680.h | 2 +- drivers/staging/media/atomisp/i2c/ov2722.c | 2 +- drivers/staging/media/atomisp/i2c/ov2722.h | 2 +- drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 2 +- drivers/staging/media/atomisp/i2c/ov5693/ov5693.h | 2 +- drivers/staging/media/atomisp/i2c/ov8858.c | 2 +- drivers/staging/media/atomisp/i2c/ov8858.h | 2 +- drivers/staging/media/atomisp/i2c/ov8858_btns.h | 2 +- drivers/staging/media/atomisp/include/linux/atomisp_gmin_platform.h | 2 +- drivers/staging/media/atomisp/include/linux/intel_mid_pm.h | 2 +- drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.h | 2 +- drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.h | 2 +- drivers/staging/media/atomisp/pci/atomisp2/atomisp_common.h | 2 +- drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat.h | 2 +- drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h | 4 ++-- drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 6 +++--- drivers/staging/media/atomisp/platform/clock/vlv2_plat_clock.c | 2 +- .../media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 6 +++--- .../staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c | 2 +- 39 files changed, 48 insertions(+), 50 deletions(-) commit 913f536c6c18a2e19e32f06971101c1d0ae3739c Author: Icenowy Zheng Date: Mon Mar 6 20:14:43 2017 +0800 spi: sun6i: Allow transfers larger than FIFO size The spi-sun6i driver have the same problem that spi-sun4i used to have -- SPI transfers are limited to one FIFO depth. This commit fixes this problem in the same way it's fixed in spi-sun4i. See commit 196737912da5 ("spi: sun4i: Allow transfers larger than FIFO size") for more information. The sun6i SPI controllers features changeable interrupt trigger level, but I set it to 3/4 of fifo depth, as same as the the sun4i SPI controllers. Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard Signed-off-by: Mark Brown drivers/spi/spi-sun6i.c | 90 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 81 insertions(+), 9 deletions(-) commit b7cd1b1386ff46e60452ad1f16530645761ca7b8 Author: Bartosz Golaszewski Date: Mon Mar 6 17:34:48 2017 +0100 regulator: core: use snprintf() instead of scnprintf() When creating the link to the device sysfs entry, the regulator core calls scnprintf() and then checks if the returned value is greater or equal than the buffer size. The former can never happen as scnprintf() returns the number of bytes that were actually written to the buffer, not the bytes that *would* have been written. Use the right function in this case: snprintf(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Mark Brown drivers/regulator/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1ac202e978e18f045006d75bd549612620c6ec3a Author: Daniel Glöckner Date: Fri Feb 24 15:05:14 2017 +0100 ima: accept previously set IMA_NEW_FILE Modifying the attributes of a file makes ima_inode_post_setattr reset the IMA cache flags. So if the file, which has just been created, is opened a second time before the first file descriptor is closed, verification fails since the security.ima xattr has not been written yet. We therefore have to look at the IMA_NEW_FILE even if the file already existed. With this patch there should no longer be an error when cat tries to open testfile: $ rm -f testfile $ ( echo test >&3 ; touch testfile ; cat testfile ) 3>testfile A file being new is no reason to accept that it is missing a digital signature demanded by the policy. Signed-off-by: Daniel Glöckner Cc: stable@vger.kernel.org Signed-off-by: Mimi Zohar security/integrity/ima/ima_appraise.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d08839153049ac175f4f13181bc20636dd473f38 Author: Ken Lin Date: Fri Feb 3 09:21:14 2017 +0800 ARM: dts: imx6q-bx50v3: change pca953x GPIO default settings Leave pca953x P06,P07 pins on b850v3 platform and P06 pin on b450v3/b650v3 unconfigured in the kernel space since they could be configured as DP1_RST and DP2_RST by the applications for the DP FW update support. Signed-off-by: Ken Lin Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-b450v3.dts | 7 +++++++ arch/arm/boot/dts/imx6q-b650v3.dts | 7 +++++++ arch/arm/boot/dts/imx6q-bx50v3.dtsi | 14 -------------- 3 files changed, 14 insertions(+), 14 deletions(-) commit df72c23ea2fc62e97e8f202d77b8102eff9d296d Author: Abhimanyu Saini Date: Wed Feb 1 11:58:36 2017 +0530 arm64: dts: freescale: ls2088a: Add DTS support for FSL's LS2088A SoC This patch adds the device tree support for FSL LS2088A SoC based on ARMv8 architecture. Following levels of DTSI/DTS files have been created for the LS2088A SoC family: - fsl-ls2088a.dtsi: DTS-Include file for FSL LS2088A SoC. - fsl-ls2088a-qds.dts: DTS file for FSL LS2088A QDS board. - fsl-ls2088a-rdb.dts: DTS file for FSL LS2088A RDB board. Signed-off-by: Priyanka Jain Signed-off-by: Ashish Kumar Signed-off-by: Abhimanyu Saini Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/Makefile | 2 + arch/arm64/boot/dts/freescale/fsl-ls2088a-qds.dts | 64 +++++++++ arch/arm64/boot/dts/freescale/fsl-ls2088a-rdb.dts | 64 +++++++++ arch/arm64/boot/dts/freescale/fsl-ls2088a.dtsi | 165 ++++++++++++++++++++++ 4 files changed, 295 insertions(+) commit c2f6a472be3aadd4a41f4383b0a03c2cd83d825e Author: Abhimanyu Saini Date: Wed Feb 1 11:58:35 2017 +0530 arm64: dts: freescale: ls2080a: Split devicetree for code resuability LS2088A and LS2080A are similar SoCs with a few differences like ARM cores etc. Reorganize the LS2080A device tree to move the common nodes to: - fsl-ls208xa.dtsi - fsl-ls208xa-rdb.dtsi - fsl-ls208xa-qds.dtsi Signed-off-by: Priyanka Jain Signed-off-by: Ashish Kumar Signed-off-by: Abhimanyu Saini Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dts | 155 +--- arch/arm64/boot/dts/freescale/fsl-ls2080a-rdb.dts | 110 +-- arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 863 +++------------------ arch/arm64/boot/dts/freescale/fsl-ls208xa-qds.dtsi | 196 +++++ arch/arm64/boot/dts/freescale/fsl-ls208xa-rdb.dtsi | 151 ++++ arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 737 ++++++++++++++++++ 6 files changed, 1182 insertions(+), 1030 deletions(-) commit 67972c55d634e27dc6f7ba1be482ec057ec5dd30 Author: Abhimanyu Saini Date: Wed Feb 1 11:58:34 2017 +0530 dt-bindings: Add compatible for LS2088A QDS and RDB board Signed-off-by: Abhimanyu Saini Signed-off-by: Priyanka Jain Signed-off-by: Ashish Kumar Acked-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f8914131f7da23ab604efd8d1b95a416e5d8fc44 Author: Bartosz Golaszewski Date: Tue Feb 28 17:15:16 2017 +0100 ARM: dts: da850-evm: add the output port to the vpif node Extend the vpif node with an output port with a single channel. NOTE: this is still mostly just hardware description - the actual driver is registered using pdata-quirks. We need the node however for correct pin control function selection. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-evm.dts | 15 +++++++++++---- arch/arm/boot/dts/da850.dtsi | 8 +++++++- 2 files changed, 18 insertions(+), 5 deletions(-) commit 2aabeffec6df47732a436ad12f73bdf0a7f1df93 Author: Bartosz Golaszewski Date: Tue Feb 28 17:15:15 2017 +0100 ARM: dts: da850-evm: add IO expander node on UI card We need the expander to be probed to allow the VPIF controller to receive interrupts from the video decoder. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-evm.dts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 99228481331cdd75981767b23b83ef0ca7aa11da Author: Bartosz Golaszewski Date: Tue Feb 28 17:02:00 2017 +0100 ARM: davinci: add pdata-quirks for da850-evm vpif display Similarly to vpif capture: we need to register the vpif display driver and the corresponding adv7343 encoder in pdata-quirks as the DT support is not complete - there isn't currently a way to define the output_routing in the V4L2 drivers (c.f. s_routing) via DT. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/mach-davinci/pdata-quirks.c | 66 ++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit e503eaa314d3cb1f6c2c1820bb382d50de61acad Author: Bartosz Golaszewski Date: Tue Feb 28 17:01:59 2017 +0100 ARM: da850-evm: add a fixed regulator for the UI board IO expander Without this regulator the tca6416 GPIO expander on the UI board can't be probed in board file mode and we're not getting VPIF IRQs. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/mach-davinci/board-da850-evm.c | 3 +++ 1 file changed, 3 insertions(+) commit 7ee77194143ba7cee8d55956adc85914ce49a277 Author: Kevin Hilman Date: Tue Feb 28 17:01:58 2017 +0100 ARM: davinci: da8xx: add pdata-quirks for VPIF capture For da8xx DT platforms, use pdata-quirks to add legacy platform data for vpif_capture driver. Passing legacy platform_data is required until the V4L2 framework, and subdevice drivers (such as the tvp514x) grow a way of selecting input and output routing (c.f. V4L2 s_routing API) Signed-off-by: Kevin Hilman [Bartosz: - removed unnecessary #ifdefs - split the init function into two separate routines for the lcdk and evm boards] Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/mach-davinci/pdata-quirks.c | 111 +++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) commit 79617a528b8d6486bcb9f0ca3bdbcf8852f8feee Author: Kevin Hilman Date: Tue Feb 28 17:01:57 2017 +0100 ARM: davinci: da8xx: add OF_DEV_AUXDATA() for vpif This is needed for the driver to access the vpif clock. Signed-off-by: Kevin Hilman [Bartosz: split the pdata-quirks patch in two with one adding the OF_DEV_AUXDATA entry] Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/mach-davinci/da8xx-dt.c | 1 + 1 file changed, 1 insertion(+) commit ce932a0bee9712c1817c6b8efbaf1d17adc350d9 Author: Kevin Hilman Date: Tue Feb 28 17:01:56 2017 +0100 ARM: davinci: board-da850-evm: add I2C ID for VPIF VPIF capture driver now has a way to specific I2C adapter ID (was previously hard-coded.) Use the new interface. Signed-off-by: Kevin Hilman Signed-off-by: Sekhar Nori arch/arm/mach-davinci/board-da850-evm.c | 1 + 1 file changed, 1 insertion(+) commit d2e04b1f90ef1f919d69adcea4b9706db36ccaec Author: Bartosz Golaszewski Date: Tue Feb 28 17:01:55 2017 +0100 ARM: davinci: allow having multiple pdata-quirks We currently bail-out after applying a single quirk. We will want to reuse the function doing the vpif capture registration so remove the break; and continue iterating over the quirk array. Signed-off-by: Bartosz Golaszewski Reviewed-by: Kevin Hilman Signed-off-by: Sekhar Nori arch/arm/mach-davinci/pdata-quirks.c | 1 - 1 file changed, 1 deletion(-) commit 5ff94828b1def0853888a4d8ebfb077dcd544b91 Author: Bartosz Golaszewski Date: Tue Feb 28 17:15:14 2017 +0100 ARM: dts: da850: add vpif video display pins Add a new pinctrl sub-node for vpif display pins. Move VP_CLKIN3 and VP_CLKIN2 to the display node where they actually belong (vide section 36.2.2 of the OMAP-L138 technical reference manual). Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850.dtsi | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit c42d37c72a812a8052c5f742044071a104c63bd0 Author: Bartosz Golaszewski Date: Tue Feb 28 17:15:13 2017 +0100 ARM: dts: da850-evm: fix whitespace errors The da850-evm dts file contains whitespace errors in the vpif node. This patch fixes them. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-evm.dts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d2fa80a50a366bc87c8c0bd73d531dec974d20ae Author: Chris Wilson Date: Fri Mar 3 15:46:44 2017 +0000 drm/i915: Avoid clearing the base drm_crtc_state To prevent having to preserve the drm_crtc_state as we clear the intel_crtc_state, only memset our extended state. Fixes: drivers/gpu/drm/i915/intel_display.c: In function ‘clear_intel_crtc_state’: drivers/gpu/drm/i915/intel_display.c:11301:1: error: the frame size of 1056 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] v2: Add a comment and BUILD_BUG_ON to explain the memset() Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170303154644.6709-1-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 507c318d5ee7d05da6d94041dd42abe0cfdd62cf Author: David Lechner Date: Tue Feb 7 13:22:08 2017 -0600 ARM: davinci_all_defconfig: Enable TI ADS7950 This enables the TI ADS7950 IIO driver. This is used on LEGO MINDSTORMS EV3. The other IIO configs removed in this patch are selected by CONFIG_TI_ADS7950, so they are not actually being desabled. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7723d70bebd749ef24fef19db52d827c7fd7f858 Author: David Lechner Date: Tue Feb 7 13:22:09 2017 -0600 ARM: da850-lego-ev3: Add device tree node for sound This adds a device tree node for sound on LEGO MINDSTORMS EV3. The EV3 uses one of the SoC PWMs connected to an amplifier to create sound from a speaker. The PWM is passed through a low-pass filter, so it is actually possible to do PCM playback, but there is no existing driver, so just using pwm-beeper for now, since it is also a compatible mode of operation. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lego-ev3.dts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 8a81ff173c5c9a0ab1df84fab17971dbcce8490a Author: David Lechner Date: Tue Feb 7 13:22:07 2017 -0600 ARM: da850-lego-ev3: Add device tree node for A/DC This adds a node for the TI ADS7957 analog/digital converter on LEGO MINDSTORMS EV3 as well as a regulator node that is used by the A/DC node. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lego-ev3.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit b61fbda180b5c9f5f3ce7f2e63b0253c84ffdf09 Author: Johannes Berg Date: Mon Mar 6 22:59:59 2017 +0100 mac80211: remove ieee80211_tx_rate_control.max_rate_idx As promised a little more than 7 years ago, remove it now since nothing uses it anymore. Signed-off-by: Johannes Berg include/net/mac80211.h | 4 ---- net/mac80211/tx.c | 8 -------- 2 files changed, 12 deletions(-) commit ce1d834f9d213c9f76f693762710f7ecfbb69503 Author: Johannes Berg Date: Mon Mar 6 23:04:09 2017 +0100 iwlwifi: dvm: remove usage of txrc->max_rate_idx Just calculate it like mac80211 does today, so we can get rid of the calculation in mac80211 for everyone else. Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/dvm/rs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3f9d596b1ea9cf7db482879a8aeb91f54a87e75 Author: Johannes Berg Date: Mon Mar 6 23:04:09 2017 +0100 iwlegacy: remove usage of txrc->max_rate_idx Just calculate it like mac80211 does today, so we can get rid of the calculation in mac80211 for everyone else. Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlegacy/3945-rs.c | 2 +- drivers/net/wireless/intel/iwlegacy/4965-rs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a6289d3fcc7349402e198ea8fb22d63ed4cb09dd Author: Johannes Berg Date: Mon Mar 6 22:59:04 2017 +0100 mac80211: ignore VHT membership selector when parsing rates There isn't really much harm in not ignoring, since it doesn't represent a valid rate, but since we already ignore the HT one also ignore VHT. Also simplify the code a bit. Fix a typo in the related comment (pointed out by Arend) while at it. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4f68b09ea3ed5b9619568625d967569da055f487 Author: Alexandre Bailon Date: Mon Jan 30 18:49:21 2017 +0100 dmaengine: cppi41: Fix teardown warnings During the teardown of a RX channel, because there is only one completion queue available for RX channel, descriptor of another channel may be popped which will cause 2 warnings: - the first one because we popped a wrong descriptor (neither the channel's descriptor, nor the teardown descriptor). - the second one happen during the teardown of another channel, because we can't find the channel descriptor (that is, the one that caused the first warning). To avoid that, use one free queue instead of a transmit completion queue. Note that fix doesn't fix all the teardown warnings: I still get some when I run some corner case. Signed-off-by: Alexandre Bailon Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e3fa49acf00a6db3bfdee725ac5d688dd98dc2c9 Author: Alexandre Bailon Date: Mon Jan 30 18:49:20 2017 +0100 dmaengine: cppi41: Add support of DA8xx to CPPI 4.1 The DA8xx has a CPPI 4.1 DMA controller. This is add the glue layer required to make it work on DA8xx. Signed-off-by: Alexandre Bailon Signed-off-by: Vinod Koul drivers/dma/Kconfig | 6 +++--- drivers/dma/cppi41.c | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) commit d567206e478f744f90b52f80b85debc3377ea5a0 Author: Alexandre Bailon Date: Mon Jan 30 18:49:19 2017 +0100 dt/bindings: da8xx-usb: Add binding for the CPPI 4.1 DMA controller DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx CPPI 4.1 DMA controller. Signed-off-by: Alexandre Bailon Acked-by: Rob Herring Signed-off-by: Vinod Koul .../devicetree/bindings/usb/da8xx-usb.txt | 41 +++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) commit a15382b75b903fa918a3a3c4d3b87e8061790312 Author: Alexandre Bailon Date: Wed Feb 15 14:56:36 2017 +0100 dmaengine: cppi41: Remove isr callback from glue layer All the platform code to manage IRQ has been moved to MUSB, and now the interrupt handler is completely generic. Remove the isr callback that is not useful anymore. Signed-off-by: Alexandre Bailon Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5e46fe98ab658eab817398abd895908854bb4c43 Author: Alexandre Bailon Date: Wed Feb 15 14:56:35 2017 +0100 dmaengine: cppi41: init_sched(): Get number of channels from DT Despite the driver is already using DT to get the number of channels, init_sched() is using an hardcoded value to get it. Use DT to get the number of channels. Signed-off-by: Alexandre Bailon Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 2d535b2629bfdf30c972ea394669bd146f752091 Author: Alexandre Bailon Date: Wed Feb 15 14:56:34 2017 +0100 dmaengine: cppi41: Move some constants to glue layer Some constants are defined and use by the driver whereas they are specifics to AM335x. Add new variables to the glue layer, initialize them with the constants, and use them in the driver. Signed-off-by: Alexandre Bailon Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit e1f40bf02d1f8b8af42b3fad5151bcd3449e085f Author: Alexandre Bailon Date: Wed Feb 15 14:56:33 2017 +0100 dmaengine: cppi41: rename platform variables Currently, only the AM335x is supported by the driver. Though the driver has a glue layer to support different platforms, some platform variable names are not prefixed with the platform name. To facilitate the addition of a new platform, rename some variables owned by the AM335x glue. Signed-off-by: Alexandre Bailon Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 6ee60246ac684407a062ccfa4404d6b6e8e7d7c7 Author: Alexandre Bailon Date: Wed Feb 15 14:56:32 2017 +0100 dmaengine: cppi41: Remove usbss_mem In order to make CPPI 4.1 DMA driver more generic, accesses to USBSS have been removed. So it is not required anymore to map the "glue" register's. Remove usbss_mem. Signed-off-by: Alexandre Bailon Signed-off-by: Vinod Koul drivers/dma/cppi41.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit aebfd1d37194e00d4c417e7be97efeb736cd9c04 Author: Anusha Srivatsa Date: Wed Feb 22 11:55:36 2017 -0800 drm/i915/: DMC 1.04 for Geminilake There is a nre version of DMC available for GLK. The release notes mentions: This FW has the fix to remove the hang conditions due to some debug related issues. Cc: Rodrigo Vivi Signed-off-by: Anusha Srivatsa Reviewed-by: Ander Conselvan de Oliveira Signed-off-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1487793336-31857-1-git-send-email-anusha.srivatsa@intel.com drivers/gpu/drm/i915/intel_csr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f25d384755191690b1196776d319cb6a4e899f28 Author: Borislav Petkov Date: Thu Feb 9 01:34:49 2017 +0100 x86/asm: Optimize clear_page() Currently, we CALL clear_page() which then JMPs to the proper function chosen by the alternatives. What we should do instead is CALL the proper function directly. (This was something Ingo suggested a while ago). So let's do that. Measuring our favourite kernel build workload shows that there are no significant changes in performance. AMD === -- /tmp/before 2017-02-09 18:01:46.451961188 +0100 ++ /tmp/after 2017-02-09 18:01:54.883961175 +0100 @@ -1,15 +1,15 @@ Performance counter stats for 'system wide' (5 runs): - 1028960.373643 cpu-clock (msec) # 6.000 CPUs utilized ( +- 1.41% ) + 1023086.018961 cpu-clock (msec) # 6.000 CPUs utilized ( +- 1.20% ) - 518,744 context-switches # 0.504 K/sec ( +- 1.04% ) + 518,254 context-switches # 0.507 K/sec ( +- 1.01% ) - 38,112 cpu-migrations # 0.037 K/sec ( +- 1.95% ) + 37,917 cpu-migrations # 0.037 K/sec ( +- 1.02% ) - 20,874,266 page-faults # 0.020 M/sec ( +- 0.07% ) + 20,918,897 page-faults # 0.020 M/sec ( +- 0.18% ) - 2,043,646,230,667 cycles # 1.986 GHz ( +- 0.14% ) (66.67%) + 2,045,305,584,032 cycles # 1.999 GHz ( +- 0.16% ) (66.67%) - 553,698,855,431 stalled-cycles-frontend # 27.09% frontend cycles idle ( +- 0.07% ) (66.67%) + 555,099,401,413 stalled-cycles-frontend # 27.14% frontend cycles idle ( +- 0.13% ) (66.67%) - 621,544,286,390 stalled-cycles-backend # 30.41% backend cycles idle ( +- 0.39% ) (66.67%) + 621,371,430,254 stalled-cycles-backend # 30.38% backend cycles idle ( +- 0.32% ) (66.67%) - 1,738,364,431,659 instructions # 0.85 insn per cycle + 1,739,895,771,901 instructions # 0.85 insn per cycle - # 0.36 stalled cycles per insn ( +- 0.11% ) (66.67%) + # 0.36 stalled cycles per insn ( +- 0.13% ) (66.67%) - 391,170,943,850 branches # 380.161 M/sec ( +- 0.13% ) (66.67%) + 391,398,551,757 branches # 382.567 M/sec ( +- 0.13% ) (66.67%) - 22,567,810,411 branch-misses # 5.77% of all branches ( +- 0.11% ) (66.67%) + 22,574,726,683 branch-misses # 5.77% of all branches ( +- 0.13% ) (66.67%) - 171.480741921 seconds time elapsed ( +- 1.41% ) + 170.509229451 seconds time elapsed ( +- 1.20% ) Intel ===== -- /tmp/before 2017-02-09 20:36:19.851947473 +0100 ++ /tmp/after 2017-02-09 20:36:30.151947458 +0100 @@ -1,15 +1,15 @@ Performance counter stats for 'system wide' (5 runs): - 2207248.598126 cpu-clock (msec) # 8.000 CPUs utilized ( +- 0.69% ) + 2213300.106631 cpu-clock (msec) # 8.000 CPUs utilized ( +- 0.73% ) - 899,342 context-switches # 0.407 K/sec ( +- 0.68% ) + 898,381 context-switches # 0.406 K/sec ( +- 0.79% ) - 80,553 cpu-migrations # 0.036 K/sec ( +- 1.13% ) + 80,979 cpu-migrations # 0.037 K/sec ( +- 1.11% ) - 36,171,148 page-faults # 0.016 M/sec ( +- 0.02% ) + 36,179,791 page-faults # 0.016 M/sec ( +- 0.02% ) - 6,665,288,826,484 cycles # 3.020 GHz ( +- 0.07% ) (83.33%) + 6,671,638,410,799 cycles # 3.014 GHz ( +- 0.06% ) (83.33%) - 5,065,975,115,197 stalled-cycles-frontend # 76.01% frontend cycles idle ( +- 0.11% ) (83.33%) + 5,076,835,183,223 stalled-cycles-frontend # 76.10% frontend cycles idle ( +- 0.11% ) (83.33%) - 3,841,556,350,614 stalled-cycles-backend # 57.64% backend cycles idle ( +- 0.13% ) (66.67%) + 3,852,823,974,333 stalled-cycles-backend # 57.75% backend cycles idle ( +- 0.12% ) (66.67%) - 4,148,398,171,079 instructions # 0.62 insn per cycle + 4,148,997,156,059 instructions # 0.62 insn per cycle - # 1.22 stalled cycles per insn ( +- 0.10% ) (83.33%) + # 1.22 stalled cycles per insn ( +- 0.11% ) (83.33%) - 887,187,118,591 branches # 401.943 M/sec ( +- 0.09% ) (83.33%) + 887,271,341,121 branches # 400.882 M/sec ( +- 0.11% ) (83.33%) - 30,139,439,034 branch-misses # 3.40% of all branches ( +- 0.09% ) (83.33%) + 30,134,864,997 branch-misses # 3.40% of all branches ( +- 0.06% ) (83.33%) - 275.904405540 seconds time elapsed ( +- 0.69% ) + 276.660352016 seconds time elapsed ( +- 0.73% ) allmodconfig vmlinux size grows by a ~1Kb but that's fine - we optimize our calling of the clear_page variants. text data bss dec hex filename 9051979 23067670 27009024 59128673 3863b61 vmlinux 9053000 23067670 27009024 59129694 3863f5e vmlinux.clear_page Reported-by: kernel test robot Tested-by: Fengguang Wu Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170215111927.emdgxf2pide3kwro@pd.tnic Signed-off-by: Ingo Molnar arch/x86/include/asm/page_64.h | 16 +++++++++++++++- arch/x86/lib/clear_page_64.S | 17 +++++++---------- 2 files changed, 22 insertions(+), 11 deletions(-) commit 49978be705dd7c202f58bb401ce82bdca6cf9756 Author: Kees Cook Date: Mon Mar 6 11:13:51 2017 -0800 docs: Clarify details for reporting security bugs The kernel security team is regularly asked to provide CVE identifiers, which we don't normally do. This updates the documentation to mention this and adds some more details about coordination and patch handling that come up regularly. Based on an earlier draft by Willy Tarreau. Signed-off-by: Kees Cook Acked-by: Willy Tarreau Signed-off-by: Jonathan Corbet Documentation/admin-guide/security-bugs.rst | 39 +++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 5 deletions(-) commit 9fe64e15148d1ff81fa0bcb5fd58531e3ae2aa3a Merge: fd5d666 c1ae3cf Author: Jonathan Corbet Date: Tue Mar 7 00:22:51 2017 -0700 Merge tag 'v4.11-rc1' into docs-next Linux 4.11-rc1 commit cdc3a45390341e579421957257e3607c017a0785 Author: Tvrtko Ursulin Date: Mon Mar 6 15:03:21 2017 +0000 drm/i915: No need to save/restore irq status in intel_engine_wakeup It is called from either the process or timer context so it is correct to always disable interrupts. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170306150321.29024-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_breadcrumbs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a9e64931eec57b17d1e7c71c93f8aea57a3435b2 Author: Tvrtko Ursulin Date: Mon Mar 6 15:03:20 2017 +0000 drm/i915: No need to save/restore irq status in intel_breadcrumbs_fake_irq Timer callback is a known context so it is correct to always disable interrupts. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_breadcrumbs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2c33b5410de595d8eaa64f6ac47db96ce4008503 Author: Tvrtko Ursulin Date: Mon Mar 6 15:03:19 2017 +0000 drm/i915: No need to save/restore irq status in __i915_request_irq_complete It is always called from thread context. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 84e5b549214f2160c12318aac549de85f600c79a Merge: c1ae3cf 001916b Author: Ingo Molnar Date: Tue Mar 7 08:14:14 2017 +0100 Merge tag 'perf-core-for-mingo-4.11-20170306' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: New features: - Allow sorting by symbol_size in 'perf report' and 'perf top' (Charles Baylis) E.g.: # perf report -s symbol_size,symbol Samples: 9K of event 'cycles:k', Event count (approx.): 2870461623 Overhead Symbol size Symbol 14.55% 326 [k] flush_tlb_mm_range 7.20% 1045 [k] filemap_map_pages 5.82% 124 [k] vma_interval_tree_insert 5.18% 2430 [k] unmap_page_range 2.57% 571 [k] vma_interval_tree_remove 1.94% 494 [k] page_add_file_rmap 1.82% 740 [k] page_remove_rmap 1.66% 1017 [k] release_pages 1.57% 1636 [k] update_blocked_averages 1.57% 76 [k] unlock_page - Add support for -p/--pid, -a/--all-cpus and -C/--cpu in 'perf ftrace' (Namhyung Kim) Change in behaviour: - Make system wide (-a) the default option if no target was specified and one of following conditions is met: - No workload specified (current behaviour) - A workload is specified but all requested events are system wide ones, like uncore ones. (Jiri Olsa) Fixes: - Add missing initialization to the instruction decoder used in the intel PT/BTS code, which was causing lots of failures in 'perf test', looking for a value when there was none (Adrian Hunter) Infrastructure changes: - Add arch code needed to adopt the kernel's refcount_t to aid in catching bugs when using atomic_t as a reference counter, basically cmpxchg related functions (Arnaldo Carvalho de Melo) - Convert the code using atomic_t as reference counts to refcount_t (Elena Rashetova) - Add feature test for sched_getcpu() to more easily check for its presence in the many libc implementations and accross different versions of such C libraries (Arnaldo Carvalho de Melo) - Issue a HW watchdog disable hint in 'perf stat' for when some of the requested events can't get counted because a PMU counter is taken by that watchdog (Borislav Petkov). - Add mapping for Intel's KnightsMill PMU events (Karol Wachowski) Documentation changes: - Clarify the term 'convergence' in: perf bench numa numa-mem -h --show_convergence (Jiri Olsa) Kernel code changes: - Ensure probe location is at function entry in kretprobes (Naveen N. Rao) - Allow return probes with offsets and absolute addresses (Naveen N. Rao) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 97e5268d57bb2ec9c82cf8758fa97a2f04ea9d1b Author: Ben Skeggs Date: Thu Mar 2 13:53:05 2017 +1000 drm/nouveau/fb/gf100-: rework ram detection This commit reworks the RAM detection algorithm, using RAM-per-LTC to determine whether a board has a mixed-memory configuration instead of using RAM-per-FBPA. I'm not certain the algorithm is perfect, but it should handle all currently known configurations in the very least. This should fix GTX 970 boards with 4GiB of RAM where the last 512MiB isn't fully accessible, as well as only detecting half the VRAM on GF108 boards. As a nice side-effect, GP10x memory detection now reuses the majority of the code from earlier chipsets. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 6 ++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h | 18 +++- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 113 ++++++++++++++-------- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf108.c | 22 +++++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c | 10 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm107.c | 14 ++- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm200.c | 29 +++++- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c | 68 +++---------- 8 files changed, 179 insertions(+), 101 deletions(-) commit ba4c063d47562d28aed3d440959fb6b13802e921 Author: Ben Skeggs Date: Fri Mar 3 08:44:01 2017 +1000 drm/nouveau/fb/gm200: split ram implementation from gm107 Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm200.c | 41 +++++++++++++++++++++++ 4 files changed, 44 insertions(+), 1 deletion(-) commit 904e703c8065f57665e21cdd170ea2b6b809da79 Author: Ben Skeggs Date: Fri Mar 3 08:36:48 2017 +1000 drm/nouveau/fb/gf108: split implementation from gf100 Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf108.c | 42 +++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf108.c | 40 +++++++++++++++++++++ 6 files changed, 87 insertions(+), 1 deletion(-) commit fcb371a1d5fc7def715227f74dfcb9be73a597e8 Author: Ben Skeggs Date: Thu Mar 2 14:34:16 2017 +1000 drm/nouveau/fb/gf100-: modify constructors to allow more customisation GF108/GM107 implementations will want slightly different functions for the upcoming RAM detection improvements. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h | 15 +++++- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 39 ++++++++------ drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c | 66 +++++++++++------------ drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm107.c | 13 ++++- 4 files changed, 81 insertions(+), 52 deletions(-) commit df8dc97cd17269474344d73cc02739532c468d04 Author: Ben Skeggs Date: Wed Mar 1 09:42:04 2017 +1000 drm/nouveau/kms/nv50: use drm core i2c-over-aux algorithm I'm not entirely sure NVKM needs to support this now, but I haven't removed it as of yet just in case it's needed from DEVINIT scripts where DRM isn't available. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nv50_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5c68d91ee072fcaae8c6c8dfa5a50a4ebf14bc96 Author: Ben Skeggs Date: Wed Mar 1 09:38:29 2017 +1000 drm/nouveau/i2c/g94-: return REPLY_M value on reads This value represents the actual number of bytes recieved on the AUX channel as the result of a read transaction. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c | 1 + 2 files changed, 2 insertions(+) commit 1af5c410cc0cae4808fd25e5cd88de303b8975fd Author: Ben Skeggs Date: Wed Mar 1 09:01:08 2017 +1000 drm/nouveau/i2c: modify aux interface to return length actually transferred Apparently sinks are allows to respond with ACK even if they didn't fully complete a transaction... It seems like a missed opportunity for DEFER to me, but what do I know :) Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h | 8 +++++--- drivers/gpu/drm/nouveau/nouveau_connector.c | 5 +++-- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/anx9805.c | 14 +++++++------- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.h | 4 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c | 10 +++++----- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c | 10 +++++----- 7 files changed, 29 insertions(+), 26 deletions(-) commit 36510adde3d9c073a538e441c38515b7741d1732 Author: Alexandre Courbot Date: Thu Feb 16 15:50:27 2017 +0900 drm/nouveau/gp10x: enable secboot and GR All the bricks are in place for secure boot to be enabled. This in turn makes GR usable so enable them all. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 424321befd2102dc1609e3ae280a28eab61c522b Author: Ben Skeggs Date: Wed Nov 30 15:48:00 2016 +1000 drm/nouveau/gr/gp102: initial support Differences from GP100: - 3 PPCs/GPC. - Another random reg to calculate/write. - Attrib CB setup a little different. - PascalB - PascalComputeB Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 2 + drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 4 + drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp100.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp102.c | 98 +++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 4 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c | 6 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gp102.c | 66 +++++++++++++++ 9 files changed, 183 insertions(+), 4 deletions(-) commit 4eb3390e345e4dc5b17673f64660098eaa21522d Author: Alexandre Courbot Date: Thu Feb 16 15:46:25 2017 +0900 drm/nouveau/falcon: support for gp10x msgqueue Add support for the msgqueue firmware used to process SEC2 commands for gp10x chips. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/falcon/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.c | 3 + drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.h | 1 + .../drm/nouveau/nvkm/falcon/msgqueue_0148cdec.c | 263 +++++++++++++++++++++ 4 files changed, 268 insertions(+) commit 5429f82f341524deb9f66193892a69dea2f862a3 Author: Alexandre Courbot Date: Thu Jan 26 15:18:25 2017 +0900 drm/nouveau/secboot: add gp102/gp104/gp106/gp107 support These gp10x chips are supporting using (roughly) the same firmware. Compared to previous secure chips, ACR runs on SEC2 and so does the low-secure msgqueue. ACR for these chips is based on r367. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/subdev/secboot.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/secboot/Kbuild | 1 + .../gpu/drm/nouveau/nvkm/subdev/secboot/gp102.c | 251 +++++++++++++++++++++ 3 files changed, 253 insertions(+) commit 84074e5b10acc7154d5aff8630f9379870e71be6 Author: Alexandre Courbot Date: Thu Feb 16 18:57:03 2017 +0900 drm/nouveau/secboot: put HS code loading code into own file We will also need to load HS blobs outside of acr_r352 (for instance, to run the NVDEC VPR scrubber), so make this code reusable. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/Kbuild | 1 + .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 100 +-------------------- .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h | 27 +----- .../gpu/drm/nouveau/nvkm/subdev/secboot/hs_ucode.c | 97 ++++++++++++++++++++ .../gpu/drm/nouveau/nvkm/subdev/secboot/hs_ucode.h | 81 +++++++++++++++++ 5 files changed, 182 insertions(+), 124 deletions(-) commit 717bad8273530ca94ae3ff27ff80c90b3721d163 Author: Alexandre Courbot Date: Tue Nov 15 16:30:52 2016 +0900 drm/nouveau/secboot: support for r375 ACR r375 ACR uses a unified bootloader descriptor for the GR and PMU firmwares. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr.h | 1 + .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r375.c | 165 +++++++++++++++++++++ 3 files changed, 167 insertions(+) commit 0f8fb2ab1e093c031ff4ce91570951e82fef6ca1 Author: Alexandre Courbot Date: Tue Nov 15 16:30:26 2016 +0900 drm/nouveau/secboot: support for r367 ACR r367 uses a different hsflcn_desc layout and LS firmware signature format, requiring a rewrite of some functions. It also makes use of the shadow region, and uses SEC as the boot falcon. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr.h | 1 + .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r367.c | 388 +++++++++++++++++++++ .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r367.h | 35 ++ 4 files changed, 425 insertions(+) commit 810997ff40783853491babc5d3d82b510704674f Author: Alexandre Courbot Date: Tue Nov 15 15:34:29 2016 +0900 drm/nouveau/secboot: support for r364 ACR r364 is similar to r361, but uses a different hsflcn_desc structure to introduce the shadow region address (even though it is not yet used by this version). Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr.h | 1 + .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r364.c | 117 +++++++++++++++++++++ 3 files changed, 119 insertions(+) commit ec91cb028511d68193c792f27a1bcd8d3e756280 Author: Alexandre Courbot Date: Thu Feb 16 15:13:49 2017 +0900 drm/nouveau/secboot: workaround bug when starting SEC2 firmware For some unknown reason the LS SEC2 firmware needs to be started twice to operate. Detect and address that condition. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit c5e1fef4875b75df48a7e9828243062799e444dc Author: Alexandre Courbot Date: Thu Jan 26 16:12:10 2017 +0900 drm/nouveau/secboot: support standard NVIDIA HS binaries I had the brilliant idea to "improve" the binary format by removing a useless indirection in the HS binary files. In the end it just makes things more complicated than they ought to be as NVIDIA-provided files need to be adapted. Since the format used can be identified by the header, support both. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 60 +++++++++++++++++++--- 1 file changed, 52 insertions(+), 8 deletions(-) commit b58b41716302ed95df16d8fcefc7edb1ce5cf794 Author: Alexandre Courbot Date: Thu Jan 26 17:23:11 2017 +0900 drm/nouveau/secboot: support for unload blob bootloader If the load and unload falcons are different, then a different bootloader must also be used. Support this case. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 64 ++++++++++++---------- .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h | 3 + 2 files changed, 37 insertions(+), 30 deletions(-) commit c93cfe35c4da46502ffb0b8a9ded3a1f1a819b9d Author: Alexandre Courbot Date: Thu Feb 23 13:05:27 2017 +0900 drm/nouveau/secboot: let callers interpret return value of blobs Since the HS blobs are provided and signed by NVIDIA, we cannot expect always-consistent behavior. In this case, on GP10x the unload blob may return 0x1d even though things have run perfectly well. This behavior has been confirmed by NVIDIA. So let the callers of the run_blob() hook receive the blob return's value (a positive integer) and decide what it means. This allows us to workaround the 0x1d code instead of issuing an error. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 23 ++++++++++++++++------ .../gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 10 ++++------ 2 files changed, 21 insertions(+), 12 deletions(-) commit 7defd1daacef6bfae5387e95bcd7b57c9183aaf7 Author: Alexandre Courbot Date: Thu Jan 26 17:18:49 2017 +0900 drm/nouveau/secboot: support for different load and unload falcons On some secure boot instances (e.g. gp10x) the load and unload blobs do not run on the same falcon. Support this case by introducing a new member to the ACR structure and making related functions take the falcon to use as an argument instead of assuming the boot falcon is to be used. The rule is that the load blob can be run on either the SEC or PMU falcons, but the unload blob must be always run on PMU. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/secboot.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 12 ++++++------ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/base.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 8 ++++---- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.h | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h | 3 ++- 7 files changed, 18 insertions(+), 14 deletions(-) commit a13edd0b21748b76220c60f5c73f49e99591ab0d Author: Alexandre Courbot Date: Thu Feb 16 20:13:59 2017 +0900 drm/nouveau/secboot: share r361 BL structures and functions Share elements of r361 that will be reused in other ACRs. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r361.c | 41 +----------- .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r361.h | 72 ++++++++++++++++++++++ 2 files changed, 74 insertions(+), 39 deletions(-) commit 114223aa1a7f9926960d2c3d6b2b51317df1aa9e Author: Alexandre Courbot Date: Thu Jan 26 16:57:24 2017 +0900 drm/nouveau/secboot: add support for SEC LS firmware Support running a message queue firmware on SEC. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/engine/falcon.h | 1 + .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r361.c | 42 ++++++++++++++++++++++ .../gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode.h | 2 ++ .../nvkm/subdev/secboot/ls_ucode_msgqueue.c | 32 +++++++++++++++++ 4 files changed, 77 insertions(+) commit 48387f0ca5493258add078de7f5520756ddc510a Author: Alexandre Courbot Date: Thu Jan 26 16:56:45 2017 +0900 drm/nouveau/secboot: support running ACR on SEC Add support for running the ACR binary on the SEC falcon. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/secboot.h | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 18 +++++++++++++++--- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/base.c | 8 ++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) commit c3433603cab756bcad0d8629c291f43b4f591b7d Author: Alexandre Courbot Date: Thu Jan 26 16:04:14 2017 +0900 drm/nouveau/secboot: get start address of blob from ACR The start address used for secure blobs is not unique to the ACR, but rather blob-dependent. Remove the unique member stored in the ACR structure and make the load function return the start address for the current blob instead. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr.h | 2 -- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 10 ++++------ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 7 +++++-- 3 files changed, 9 insertions(+), 10 deletions(-) commit e9462417f1fedec381dd148cbc1d29d21bec4500 Author: Alexandre Courbot Date: Tue Nov 15 16:28:37 2016 +0900 drm/nouveau/secboot: add shadow blob argument ACR firmware from r364 on need a shadow region for the ACR to copy the WPR region into. Add a flag to indicate that a shadow region is required and manage memory allocations accordingly. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 16 ++++++++++++++-- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) commit 9706d8f9d1ebc499192f8974abba03acdcf1094a Author: Alexandre Courbot Date: Thu Feb 23 18:14:30 2017 +0900 drm/nouveau/falcon/msgqueue: add SEC2 support Add support for running a msgqueue on the SEC2 falcon. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.c | 3 +++ 1 file changed, 3 insertions(+) commit 6ac2cc209e0096dabc8e902a8620d45f41b9fc0b Author: Alexandre Courbot Date: Tue Feb 14 15:56:10 2017 +0900 drm/nouveau/falcon: support for EMEM On SEC, DMEM is unaccessible by the CPU when the falcon is running in LS mode. This makes communication with the firmware using DMEM impossible. For this purpose, a new kind of memory (EMEM) has been added. It works similarly to DMEM, with the difference that its address space starts at 0x1000000. For this reason, it makes sense to treat it like a special case of DMEM. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/engine/falcon.h | 1 + drivers/gpu/drm/nouveau/nvkm/falcon/base.c | 1 + drivers/gpu/drm/nouveau/nvkm/falcon/v1.c | 63 ++++++++++++++++++++++ 3 files changed, 65 insertions(+) commit cfd044b02873b02236bcd93ff398504d489ddc13 Author: Alexandre Courbot Date: Thu Jan 26 16:49:43 2017 +0900 drm/nouveau/falcon: fix base address of FBIF registers All falcons have their FBIF registers starting at offset 0x600, with the exception of the PMU and NVENC engines. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/falcon/v1.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit ad147b7f57547a5597ed338f2c46f03809d7792e Author: Alexandre Courbot Date: Wed Feb 22 20:50:09 2017 +0900 drm/nouveau/falcon: better detection of debug register Not all falcons have a debug register, and it is not always found at the same offset. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/falcon/base.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit b62880f7966781eb0b3b1e50f63d6aac362476d3 Author: Alexandre Courbot Date: Thu Feb 23 18:41:41 2017 +0900 drm/nouveau/core: add SEC2 engine SEC2 is the name given by NVIDIA to the SEC engine post-Fermi (reasons unknown). Even though it shares the same address range as SEC, its usage is quite different and this justifies a new engine. Add this engine and make TOP use it all post-TOP devices should use this implementation and not the older SEC. Also quickly add the short gp102 implementation which will be used for falcon booting purposes. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 3 + drivers/gpu/drm/nouveau/include/nvkm/engine/sec2.h | 13 +++ 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/sec2/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/engine/sec2/base.c | 101 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/sec2/gp102.c | 30 ++++++ drivers/gpu/drm/nouveau/nvkm/engine/sec2/priv.h | 9 ++ drivers/gpu/drm/nouveau/nvkm/subdev/top/gk104.c | 2 +- 11 files changed, 164 insertions(+), 1 deletion(-) commit 16307b5d720af3fec8d2153a68e23066e20c481f Author: Alexandre Courbot Date: Thu Jan 26 15:16:32 2017 +0900 drm/nouveau/nvdec: add gp102 support gp10x' secure boot requires a blob to be run on NVDEC. Expose the falcon through a dummy device. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 4 +- .../gpu/drm/nouveau/include/nvkm/engine/nvdec.h | 8 +++ drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/nvdec/Kbuild | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/nvdec/base.c | 59 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/nvdec/gp102.c | 30 +++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/nvdec/priv.h | 6 +++ 7 files changed, 108 insertions(+), 4 deletions(-) commit 9e4397579fa4cd5cc411d47815eb805e337d0203 Author: Alexandre Courbot Date: Wed Feb 22 20:48:30 2017 +0900 drm/nouveau/falcon: delay construction of falcons to oneinit() Reading registers at device construction time can be harmful, as there is no guarantee the underlying engine will be up, or in its runtime configuration. Defer register reading to the oneinit() hook and update users accordingly. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/engine/falcon.h | 6 +++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 29 +++++++++++----------- drivers/gpu/drm/nouveau/nvkm/falcon/base.c | 3 +++ drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c | 10 +++++++- 4 files changed, 32 insertions(+), 16 deletions(-) commit 65d9376b74ff651a8d4c6736d32a3bb3aa47bf09 Author: Alexandre Courbot Date: Thu Jan 26 15:00:45 2017 +0900 drm/nouveau/falcon: use NXTCTX register instead of NEW_INSTBLK Both registers allow to bind a new context, but NXTCTX will work on all falcons, while legacy NEW_INSTBLK is reserved to PMU. After setting NXTCTX we trigger a context switch by writing 0x090 and 0x0a4. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/falcon/v1.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1106459e9f691e0655d3559734f2ff2084711474 Author: Alexandre Courbot Date: Wed Oct 26 13:08:14 2016 +0900 drm/nouveau/secboot/gm20b: enable PMU firmware Enable the PMU firmware in gm20b, managed by secure boot. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 937deb06d0604b87f44f1e45b9f6e15bb6fb316f Author: Alexandre Courbot Date: Fri Feb 10 16:29:01 2017 +0900 drm/nouveau/pmu/gm20b: add msgqueue support gm20b PMU firmware is driven by a msgqueue, so connect relevant PMU hooks to their msgqueue counterparts. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm20b.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit fc12745717392b5a4421a72c98cfce2c1f287d70 Author: Alexandre Courbot Date: Tue Nov 15 16:26:09 2016 +0900 drm/nouveau/secboot: check that WPR region is properly set The ACR firmware may return no error but fail nonetheless. Such cases can be detected by verifying that the WPR region has been properly set in FB. If this is not the case, this is an error, but the unload firmware should still not be run. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 41 ++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) commit 7775d0dcb215ce0eb639940d201fb9f557823bd7 Author: Alexandre Courbot Date: Fri Nov 18 17:47:08 2016 +0900 drm/nouveau/secboot: support optional falcons PMU support has been enabled for r352 ACR, but it must remain optional if we want to preserve existing user-space that do not include it. Allow ACR to be instanciated with a list of optional LS falcons, that will not produce a fatal error if their firmware is not loaded. Also change the secure boot bootstrap logic to be able to fall back to legacy behavior if it turns out the boot falcon's LS firmware cannot be loaded. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr.h | 2 + .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 62 +++++++++++++--------- 2 files changed, 39 insertions(+), 25 deletions(-) commit bb5ec9c9dd1cc71bbae37a31229d72ffab9b6df4 Author: Alexandre Courbot Date: Thu Oct 27 14:25:02 2016 +0900 drm/nouveau/secboot: support PMU LS firmware Add the PMU bootloader generator and PMU LS ops that will enable proper PMU operation if the PMU falcon is designated as managed. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 80 ++++++++++++++++++++++ .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r361.c | 54 +++++++++++++++ 2 files changed, 134 insertions(+) commit 7579e22f38ffe0acf0c4daea0932847023450ac7 Author: Alexandre Courbot Date: Thu Oct 27 14:24:34 2016 +0900 drm/nouveau/secboot: base support for PMU falcon Adapt secboot's behavior if a PMU firmware is present, in particular the way LS falcons are reset. Without PMU firmware, secboot needs to be performed again from scratch so all LS falcons are reset. With PMU firmware, we can ask the PMU's ACR unit to reset a specific falcon through a PMU message. As we must preserve the old behavior to avoid breaking user-space, add a few conditionals to the way falcons are reset. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 98 ++++++++++++++++++---- 1 file changed, 82 insertions(+), 16 deletions(-) commit eabe4ea6a418a60b4df666154f2b0d8cd7d5ba29 Author: Alexandre Courbot Date: Thu Oct 27 14:22:28 2016 +0900 drm/nouveau/secboot: support for loading LS PMU firmware Allow secboot to load a LS PMU firmware. LS PMU is one instance of firmwares based on the message queue mechanism, which is also used for other firmwares like SEC, so name its source file accordingly. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/Kbuild | 1 + .../gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode.h | 4 +- .../nvkm/subdev/secboot/ls_ucode_msgqueue.c | 117 +++++++++++++++++++++ 3 files changed, 121 insertions(+), 1 deletion(-) commit 9ce480fead6cf57640a2bde8024578e61acb77a3 Author: Alexandre Courbot Date: Thu Jan 19 13:16:40 2017 +0900 drm/nouveau/pmu: add msgqueue member NVIDIA-provided PMU firmware is controlled by a msgqueue. Add a member to the PMU structure as well as the required cleanup code if this feature is used. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/pmu.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c | 2 ++ 2 files changed, 3 insertions(+) commit 42847d8a1f8fa38f11ab54b4a186fdb8b7b26a1d Author: Alexandre Courbot Date: Thu Feb 16 17:25:59 2017 +0900 drm/nouveau/falcon: support for gm20b msgqueue Add support for the msgqueue firmware used to process PMU commands for gm20b. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/falcon/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.c | 3 + drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.h | 2 + .../drm/nouveau/nvkm/falcon/msgqueue_0137c63d.c | 323 +++++++++++++++++++++ 4 files changed, 329 insertions(+) commit 9b536e9d525191cab931c997556af6b9b4637164 Author: Alexandre Courbot Date: Thu Jan 19 12:52:50 2017 +0900 drm/nouveau/falcon: add msgqueue interface A message queue firmware implements a specific protocol allowing the host to send "commands" to a falcon, and the falcon to reply using "messages". This patch implements the common part of this protocol and defines the interface that the host can use. Due to the way the firmware is developped internally at NVIDIA (where kernel driver and firmware evolve in lockstep), firmwares taken at different points in time can have frustratingly subtle differences that must be taken into account. This code is architectured to make implementing such differences as easy as possible. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/core/msgqueue.h | 47 ++ drivers/gpu/drm/nouveau/nvkm/falcon/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.c | 544 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.h | 204 ++++++++ 4 files changed, 796 insertions(+) commit 0117b3369f669e6f6ab9cc408358ba745dfc6d26 Author: Alexandre Courbot Date: Wed Oct 26 15:15:42 2016 +0900 drm/nouveau/secboot: add LS firmware post-run hooks Add the ability for LS firmwares to declare a post-run hook that is invoked right after the HS firmware is executed. This allows them to e.g. write some initialization data into the falcon's DMEM. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 11 +++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h | 2 ++ 2 files changed, 13 insertions(+) commit 9bb55bb79f480d6422db55f0ed5052d3b0a2d22e Author: Alexandre Courbot Date: Tue Nov 1 15:05:03 2016 +0900 drm/nouveau/secboot: abstract fixup_hs_desc function As different firmare versions use different HS descriptor formats, we need to abstract this part as well. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 8 +++++--- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h | 3 +++ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r361.c | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) commit f7152a232c6f72c196ec6c64ae5ebb040396ec31 Author: Alexandre Courbot Date: Fri Jan 20 11:59:23 2017 +0900 drm/nouveau/secboot: make specialized ls_ucode_img struct private This structure does not need to be shared anymore. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 90 ++++++++++++++++++++ .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h | 96 ---------------------- 2 files changed, 90 insertions(+), 96 deletions(-) commit 48eee549da0cd95456f23489fe9830a69c3565df Author: Alexandre Courbot Date: Tue Nov 15 15:02:27 2016 +0900 drm/nouveau/secboot: store ucode offset in base image structure This allows the bootloader descriptor generation code to not rely on specialized ls_ucode_img structures, making it reusable in other instances. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 9 ++++----- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r361.c | 7 +++---- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode.h | 2 ++ 3 files changed, 9 insertions(+), 9 deletions(-) commit 5c4e0602d692fee7310cf468157d6056f61196eb Author: Alexandre Courbot Date: Tue Nov 15 16:29:02 2016 +0900 drm/nouveau/secboot: fix usage of hsf_load_header Offsets were not properly computed. This went unnoticed because we are only using one app for now. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 6 ++-- .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h | 33 ++++++++++++++++------ .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r361.c | 4 +-- 3 files changed, 30 insertions(+), 13 deletions(-) commit 913b97f94478db1c93cc5a1f07fa03ee4e2d5f8b Author: Alexandre Courbot Date: Tue Jan 24 19:29:39 2017 +0900 drm/nouveau/secboot: prevent address trimming Using 32-bit integers would trim the WPR address if it is allocated above 4GB. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 098ee77224bc76026e736e05407ff46c78f13d22 Author: Alexandre Courbot Date: Thu Jan 26 14:55:56 2017 +0900 drm/nouveau/secboot: fix WPR region alignment A WPR region smaller than 256K will result in secure boot failure. Adjust the minimal size. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3e8fbe3191d1fd94d4b25f72d383c4db7309ca4a Author: Alexandre Courbot Date: Tue Jan 31 18:16:08 2017 +0900 drm/nouveau/secboot: fix WPR address to be 64-bit The WPR address parameter of the ls_write_wpr hook was defined as a u32, which will very likely overflow on boards with more than 4GB VRAM. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit a335f078df6006bd7694a1480e7dfbcf7e0de00c Author: Alexandre Courbot Date: Mon Jan 23 12:48:09 2017 +0900 drm/nouveau/secboot: make sure requested falcons are supported Check at contruction time that we have support for all the LS firmwares asked by the caller. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 489a5fe868f1d1b09d1c1337424c09e686437c3c Author: Alexandre Courbot Date: Fri Dec 16 18:00:44 2016 +0900 drm/nouveau/secboot: remove unused hook Remove a leftover that became obsolete with the falcon interface. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr.h | 2 -- .../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 27 ---------------------- 2 files changed, 29 deletions(-) commit 17c602e3760da48697ce8e1fb7d992629fa7e876 Author: Alexandre Courbot Date: Tue Feb 14 15:55:23 2017 +0900 drm/nouveau/falcon: fix IMEM port access All IMEM registers are duplicated per port. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/falcon/v1.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit ca179c852a8befe76221d64dc47105726f64f065 Author: Alexandre Courbot Date: Tue Feb 14 15:52:54 2017 +0900 drm/nouveau/falcon: fix port offset for DMEM register DMEM registers are replicated with a stride of 8 bytes. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/falcon/v1.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit e444de56bc60ce0a388e328bcf86dcd0baabc32e Author: Alexandre Courbot Date: Thu Jan 19 12:11:15 2017 +0900 drm/nouveau/falcon: protect against concurrent DMEM accesses The falcon library may be used concurrently, especially after the introduction of the msgqueue interface. Make it safe to use it that way. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h | 1 + drivers/gpu/drm/nouveau/nvkm/falcon/base.c | 9 +++++++++ 2 files changed, 10 insertions(+) commit 6bd4b5233d2f0c14344d5a1ae4be8961c4f0edfa Author: Alexandre Courbot Date: Thu Jan 26 14:59:56 2017 +0900 drm/nouveau/falcon: add missing context binding memory target This is not used currently, but is added for the sake of completeness. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/falcon/v1.c | 1 + 1 file changed, 1 insertion(+) commit 485a20eff20a2cbc55c9061724356cae3df01781 Author: Alexandre Courbot Date: Thu Nov 17 16:37:29 2016 +0900 drm/nouveau/pmu: make sure the reset hook exists before running it Some PMU implementations (in particular the ones managed by secure boot) may not have a reset() hook. Make sure we don't crash in that case. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ba735d061dcbbb061721f302f1ef519c547d5bab Author: Alexandre Courbot Date: Thu Dec 15 14:40:25 2016 +0900 drm/nouveau/secboot: make nvkm_secboot_falcon_name visible Make nvkm_secboot_falcon_name publicly visible as other subdevs will need to use it for debug messages. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/secboot.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit 69d468f4775b0da504140d0ed5e8f25c6ac44e7a Author: Ben Skeggs Date: Tue Feb 21 10:05:58 2017 +1000 drm/nouveau/priv: punt messages to debug level Ideally we'd be able to keep these at a more obvious error level, as they're a good indication of us doing something wrong. However, NVIDIA's FECS/GPCCS firmware touches registers that trigger priv ring faults, and we can't do anything to fix that ourselves due to the need for them to be signed by NVIDIA. This issue was reported a while back, but hasn't been fixed, so, for now we will hide the messages to prevent spamming Optimus users with messages whenever the NVIDIA GPU is powered off and on again. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit b5a8ffad0eb0c1e5e601253edac163b2da9e855d Author: Kuninori Morimoto Date: Tue Mar 7 05:30:06 2017 +0000 arm64: dts: r8a7795: Tidyup Audio-DMAC channel for DVC Current Audio-DMAC is assigned "rx" as Audio-DMAC0, "tx" as Audio-DMAC1. Thus, DVC "tx" should be assigned as Audio-DMAC1, instead of Audio-DMAC0. Because of this, current platform board (using SRC/DVC/SSI) Playback/Capture both will use same Audio-DMAC0 (but it depends on audio data path). First note is that this "rx" and "tx" are from each IP point, it doesn't mean Playback/Capture. Second note is that Audio DMAC assigned on DT is only for Audio-DMAC, Audio-DMAC-peri-peri has no entry. => Audio-DMAC -> Audio-DMAC-peri-peri -- HW connection Playback case [Mem] => [SRC]--[DVC] -> [SSI]--[Codec] rx ~~~~~~~~~~~~ Capture [Mem] <= [DVC]--[SRC] <- [SSI]--[Codec] tx ~~~~~~~~~~~~ Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7d73a4da2681dc5d04e8ed9f4aa96c1deed2dbc5 Author: Niklas Söderlund Date: Mon Dec 5 18:43:10 2016 +0100 arm64: dts: r8a7795: salvator-x: Set drive-strength for ravb pins The EthernetAVB should not depend on the bootloader to setup correct drive-strength values. Values for drive-strength where found by examining the registers after the bootloader has configured the registers and successfully used the EthernetAVB. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 57a4fd420c6e8a04b6a87ff24d34250cd7c48f15 Author: Geert Uytterhoeven Date: Fri Mar 3 14:18:17 2017 +0100 arm64: dts: r8a7796: Remove unit-address and reg from integrated cache The Cortex-A57 cache controller is an integrated controller, and thus the device node representing it should not have a unit-addresses or reg property. Fixes: 1561f20760ec96db ("arm64: dts: r8a7796: Add Renesas R8A7796 SoC support") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d165856de103a6d317a9c9a5782eacd5dc90a9dc Author: Geert Uytterhoeven Date: Fri Mar 3 14:18:16 2017 +0100 arm64: dts: r8a7795: Remove unit-addresses and regs from integrated caches The Cortex-A57/A53 cache controllers are integrated controllers, and thus the device nodes representing them should not have unit-addresses or reg properties. Fixes: 6f7bf82cc912441f ("arm64: dts: r8a7795: Fix W=1 dtc warnings") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b3f26910c0daafded536cf5edceab2ab469252cb Author: Khiem Nguyen Date: Fri Feb 24 14:49:14 2017 +0100 arm64: dts: r8a7796: Upgrade to PSCI v1.0 to support Suspend-to-RAM >From PSCI v1.0, Suspend-to-RAM is supported via SYSTEM_SUSPEND PSCI function call. Hence, upgrade PSCI version for R-Car M3-W to support Suspend-to-RAM. The Suspend-to-RAM is highly dependent on ARM Trusted Firwmare support since necessary callback functions will be registered after a query to ARM Trusted Firmware about SYSTEM_SUSPEND support. Since PSCI v1.0 is backward compatible with PSCI v0.2, CPU Hotplug and CPUIdle should be able to work normally with this change. Signed-off-by: Khiem Nguyen Signed-off-by: Takeshi Kihara [geert: Keep "arm,psci-0.2"] Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71585040b77e7b388708dc35bdc49f106fa55a4a Author: Khiem Nguyen Date: Fri Feb 24 14:49:13 2017 +0100 arm64: dts: r8a7795: Upgrade to PSCI v1.0 to support Suspend-to-RAM >From PSCI v1.0, Suspend-to-RAM is supported via SYSTEM_SUSPEND PSCI function call. Hence, upgrade PSCI version for R-Car H3 to support Suspend-to-RAM. The Suspend-to-RAM is highly dependent on ARM Trusted Firwmare support since necessary callback functions will be registered after a query to ARM Trusted Firmware about SYSTEM_SUSPEND support. Since PSCI v1.0 is backward compatible with PSCI v0.2, CPU Hotplug and CPUIdle should be able to work normally with this change. Signed-off-by: Khiem Nguyen Signed-off-by: Takeshi Kihara [geert: Keep "arm,psci-0.2"] Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9190748fd608dc3aa80edacab9e6818f2d6f71b6 Author: Geert Uytterhoeven Date: Fri Feb 24 14:59:28 2017 +0100 arm64: dts: r8a7795: Add Cortex-A53 PMU node Enable the performance monitor unit for the Cortex-A53 cores on the R8A7795 SoC. Extracted from a patch by Takeshi Kihara in the BSP. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 799a75abdef348500bab14e873e7711afa426aaf Author: Geert Uytterhoeven Date: Fri Feb 24 14:59:27 2017 +0100 arm64: dts: r8a7795: Add Cortex-A53 CPU cores This patch adds Cortex-A53 CPU cores to r8a7795 SoC for a total of 8 cores (4 x Cortex-A57 + 4 x Cortex-A53). Based on work by Takeshi Kihara and Dirk Behme. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 46 ++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 5 deletions(-) commit 6d50bb8935042c4b7747b57df064ff41295e4769 Author: Ulrich Hecht Date: Wed Dec 7 17:44:48 2016 +0100 arm64: dts: r8a7796: Enable HSCIF DMA Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit d5566d251f5e839e36db8db8105d8f8f57e54768 Author: Ulrich Hecht Date: Fri Feb 3 11:38:20 2017 +0100 arm64: dts: r8a7796: salvator-x: add SCIF1 (DEBUG1) Enables the SCIF hooked up to the DEBUG1 connector. Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit dbcae5ea4bd27409291e3329c9106f37f0118590 Author: Ulrich Hecht Date: Wed Dec 7 17:44:27 2016 +0100 arm64: dts: r8a7796: Enable SCIF DMA Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 19d76f3ec8fc6ff38f1c5ca534d75a957c8661ea Author: Ulrich Hecht Date: Wed Dec 7 17:44:26 2016 +0100 arm64: dts: r8a7796: Add all SCIF nodes Add the device nodes for all R-Car H3 SCIF serial ports, incl. clocks and power domain. Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 65 ++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 68cd161072605c276d4e6c8cd06fbe7b00a0f680 Author: Ulrich Hecht Date: Wed Dec 7 17:44:47 2016 +0100 arm64: dts: r8a7796 dtsi: Add all HSCIF nodes Add the device nodes for all HSCIF serial ports, incl. clocks, and power domain. Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven [simon: express register size in hex; refer to power domain in changelog] Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 70 ++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit c4a59df9de199426b773a15e0c774ae25f628d5d Author: Kuninori Morimoto Date: Tue Mar 7 05:28:57 2017 +0000 ARM: dts: r8a7790: Tidyup Audio-DMAC channel for DVC Current Audio-DMAC is assigned "rx" as Audio-DMAC0, "tx" as Audio-DMAC1. Thus, DVC "tx" should be assigned as Audio-DMAC1, instead of Audio-DMAC0. Because of this, current platform board (using SRC/DVC/SSI) Playback/Capture both will use same Audio-DMAC0 (but it depends on data path). First note is that this "rx" and "tx" are from each IP point, it doesn't mean Playback/Capture. Second note is that Audio DMAC assigned on DT is only for Audio-DMAC, Audio-DMAC-peri-peri has no entry. => Audio-DMAC -> Audio-DMAC-peri-peri -- HW connection Playback case [Mem] => [SRC]--[DVC] -> [SSI]--[Codec] rx ~~~~~~~~~~~~ Capture [Mem] <= [DVC]--[SRC] <- [SSI]--[Codec] tx ~~~~~~~~~~~~ Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65d0b7ed40f8a3a41a0ac5ed5ca4d1874c6aaf2d Author: Geert Uytterhoeven Date: Mon Mar 6 17:40:43 2017 +0100 ARM: dts: r8a7794: Remove unit-address and reg from integrated cache The Cortex-A7 cache controller is an integrated controller, and thus the device node representing it should not have a unit-addresses or reg property. Fixes: 34ea4b4a827b4ee7 ("ARM: dts: r8a7794: Fix W=1 dtc warnings") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit beffa8872a3680ef804eb0320ec77037170f4686 Author: Geert Uytterhoeven Date: Mon Mar 6 17:40:42 2017 +0100 ARM: dts: r8a7793: Remove unit-address and reg from integrated cache The Cortex-A15 cache controller is an integrated controller, and thus the device node representing it should not have a unit-addresses or reg property. Fixes: ad53f5f00b095a0d ("ARM: dts: r8a7793: Fix W=1 dtc warnings") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7793.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a0504f0880c11da301dc2b5a5135bd02376e367e Author: Geert Uytterhoeven Date: Mon Mar 6 17:40:41 2017 +0100 ARM: dts: r8a7792: Remove unit-address and reg from integrated cache The Cortex-A15 cache controller is an integrated controller, and thus the device node representing it should not have a unit-addresses or reg property. Fixes: 7c4163aae3d8e5b9 ("ARM: dts: r8a7792: initial SoC device tree") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5d6a2165abd4635ecf5ece3d02fe8677f00d32c5 Author: Geert Uytterhoeven Date: Mon Mar 6 17:40:40 2017 +0100 ARM: dts: r8a7791: Remove unit-address and reg from integrated cache The Cortex-A15 cache controller is an integrated controller, and thus the device node representing it should not have a unit-addresses or reg property. Fixes: 6f9314ce258c8504 ("ARM: dts: r8a7791: Fix W=1 dtc warnings") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d492909c84b895564d7ac413546ae988945c68db Author: Geert Uytterhoeven Date: Mon Mar 6 17:40:39 2017 +0100 ARM: dts: r8a7790: Remove unit-addresses and regs from integrated caches The Cortex-A15/A7 cache controllers are integrated controllers, and thus the device nodes representing them should not have unit-addresses or reg properties. Fixes: 2c3de36700d4f3a5 ("ARM: dts: r8a7790: Fix W=1 dtc warnings") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790.dtsi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 51c00a9f730dd27da23e9dec593c22c0f9f5a1b1 Author: Geert Uytterhoeven Date: Mon Mar 6 17:40:38 2017 +0100 ARM: dts: r8a7745: Remove unit-address and reg from integrated cache The Cortex-A7 cache controller is an integrated controller, and thus the device node representing it should not have a unit-addresses or reg property. Fixes: c95360247bdd67d3 ("ARM: dts: r8a7745: initial SoC device tree") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 37f0c804e57ac93ca37a98aa5a210c6b73e6572a Author: Geert Uytterhoeven Date: Mon Mar 6 17:40:37 2017 +0100 ARM: dts: r8a7743: Remove unit-address and reg from integrated cache The Cortex-A15 cache controller is an integrated controller, and thus the device node representing it should not have a unit-addresses or reg property. Fixes: 34e8d993a68ae459 ("ARM: dts: r8a7743: initial SoC device tree") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cdaf6417b723e380501f46e555abf0c1c3090124 Author: Geert Uytterhoeven Date: Mon Mar 6 17:40:36 2017 +0100 ARM: dts: r8a73a4: Remove unit-addresses and regs from integrated caches The Cortex-A15/A7 cache controllers are integrated controllers, and thus the device nodes representing them should not have unit-addresses or reg properties. Fixes: b0da45c60d2f7b08 ("ARM: dts: r8a73a4: Fix W=1 dtc warnings") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a73a4.dtsi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4452b090a18ead601e9e7c543c2f4acd5821d888 Author: simran singhal Date: Sat Mar 4 23:11:00 2017 +0530 staging: greybus: Replace "is is" with "is" This patch replace "is is " with "is". The replacement couldn't be automated because sometimes the first "is" was meant to be another word. Signed-off-by: simran singhal Acked-by: Julia Lawall Acked-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35fd2485d75702f58891bab7fe1c21f760e313fd Author: Jonathan Bowie Date: Wed Mar 1 02:46:30 2017 -0800 staging: greybus: loop_backtest: fixed consistent spacing style issue Fixed incosistent spacing around arithmetic operator. Signed-off-by: Jonathan Bowie Reviewed-by: Johan Hovold Acked-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 105d3b970b74d422b3af312f6f8edc7208cc8702 Author: Aishwarya Pant Date: Wed Mar 1 18:06:30 2017 +0530 staging: dgnc: replace usleep_range with udelay udelay is impelmented using a busy-wait loop and consumes CPU cycles while usleep_range is implemented using interrupts.cls_flush_uart_write() is called after a channel lock is acquired i.e. an atomic context. Hence delay in this method should use udelay instead of usleep_range. Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_cls.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 541e68e0c3d0be9a940632edc5181788fff11d88 Author: Gargi Sharma Date: Sun Mar 5 15:21:44 2017 +0530 staging: dgnc: Constify ktermios structure The ktermios structure is a local default termios struct. All ports are initially created with this termios. Since, the structure is never modified, it can be declared as const. Coccinelle Script: @r disable optional_qualifier@ identifier s,i; position p; @@ static struct ktermios i@p = { ... }; @ok1@ identifier r.i; expression e; position p; @@ e = i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ktermios i = { ... }; File Size before: text data bss dec hex filename 25469 2048 256 27773 6c7d drivers/staging/dgnc/dgnc_tty.o File Size after: text data bss dec hex filename 25636 2016 256 27908 6d04 drivers/staging/dgnc/dgnc_tty.o Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5985bf9cadd4e3ed8d5d9a9cbbb2e39cdb81cd9 Author: Gerd Hoffmann Date: Wed Mar 1 15:09:08 2017 +0100 drm: virtio: use kmem_cache Just use kmem_cache instead of rolling our own, limited implementation. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1488377348-5006-1-git-send-email-kraxel@redhat.com drivers/gpu/drm/virtio/virtgpu_drv.h | 4 +-- drivers/gpu/drm/virtio/virtgpu_vq.c | 57 +++++++----------------------------- 2 files changed, 11 insertions(+), 50 deletions(-) commit 2d856f94e6d253225cc68beaaf942dc0ea7772cb Author: Gerd Hoffmann Date: Wed Mar 1 11:12:34 2017 +0100 qxl: fix qxl_conn_get_modes Call qxl_add_monitors_config_modes() unconditionally. Do all sanity checks in that function. Fix sanity checks. monitors_config is the current monitor configuration, whereas client_monitors_config is the configuration requested by the spice client. So when filling the mode list, based on the spice client request, we need to look at client_monitors_config->count not monitors_config->count. Signed-off-by: Gerd Hoffmann Reviewed-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/1488363154-6889-5-git-send-email-kraxel@redhat.com drivers/gpu/drm/qxl/qxl_display.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit c50fad8f62d1a6fe0083fa2c700e5e7bfc7dea0c Author: Gerd Hoffmann Date: Wed Mar 1 11:12:33 2017 +0100 qxl: read monitors config at boot Try to read the client monitors config at driver load time, even without explicit notification. So in case that info was filled before the driver loaded and we've missed the notifications because of that the settings will still be used. With that place we now have to take care to properly handle a empty client monitors config, so we don't trip over an uninitialized client monitors config. Signed-off-by: Gerd Hoffmann Reviewed-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/1488363154-6889-4-git-send-email-kraxel@redhat.com drivers/gpu/drm/qxl/qxl_display.c | 5 +++++ 1 file changed, 5 insertions(+) commit 9062155de0dfdc5cdfd38caf09d7f14b1833a2ca Author: Gerd Hoffmann Date: Wed Mar 1 11:12:32 2017 +0100 qxl: limit monitor config read retries When reading the monitor config fails, don't retry forever. If it fails ten times in a row just give up to avoid the driver hangs. Also add a small delay after each attempt, so the host has a chance to complete a partial update. Signed-off-by: Gerd Hoffmann Reviewed-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/1488363154-6889-3-git-send-email-kraxel@redhat.com drivers/gpu/drm/qxl/qxl_display.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit ecefd94e8bde7de4f03d6fc874378d826537df7b Author: Gerd Hoffmann Date: Wed Mar 1 11:12:31 2017 +0100 qxl: drop mode_info.modes & related code. very old qxl hardware revisions (predating qxl ksm support by a few years) supported a fixed list of video modes only. The list is still provided by the virtual hardware, for backward compatibility reasons. The qxl kms driver never ever looks at it, except for dumping it to the kernel log at load time in case debug logging is enabled. Drop that pointless code. Signed-off-by: Gerd Hoffmann Reviewed-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/1488363154-6889-2-git-send-email-kraxel@redhat.com drivers/gpu/drm/qxl/qxl_drv.h | 2 -- drivers/gpu/drm/qxl/qxl_kms.c | 22 ---------------------- 2 files changed, 24 deletions(-) commit 861078381ba56b56808113736000d9e7ead349c8 Author: Gabriel Krisman Bertazi Date: Mon Feb 27 17:33:30 2017 -0300 drm: qxl: Don't alloc fbdev if emulation is not supported If fbdev emulation is disabled, the QXL shutdown path will try to clean a framebuffer that wasn't initialized, hitting the Oops below. The problem is that even when FBDEV_EMULATION is disabled we allocate the qfbdev strutucture, but we don't initialize it. The fix is to stop allocating the memory, since it won't be used. This allows the existing verification in the cleanup hook to do it's job preventing the oops. Now that we don't allocate the unused fbdev structure, we need to be careful when dereferencing it in the PM suspend hook. [ 24.284684] BUG: unable to handle kernel NULL pointer dereference at 00000000000002e0 [ 24.285627] IP: mutex_lock+0x18/0x30 [ 24.286049] PGD 78cdf067 [ 24.286050] PUD 7940f067 [ 24.286344] PMD 0 [ 24.286649] [ 24.287072] Oops: 0002 [#1] SMP [ 24.287422] Modules linked in: qxl [ 24.287806] CPU: 0 PID: 2328 Comm: bash Not tainted 4.10.0-rc5+ #97 [ 24.288515] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014 [ 24.289681] task: ffff88007c4c0000 task.stack: ffffc90001b58000 [ 24.290354] RIP: 0010:mutex_lock+0x18/0x30 [ 24.290812] RSP: 0018:ffffc90001b5bcb0 EFLAGS: 00010246 [ 24.291401] RAX: 0000000000000000 RBX: 00000000000002e0 RCX: 0000000000000000 [ 24.292209] RDX: ffff88007c4c0000 RSI: 0000000000000001 RDI: 00000000000002e0 [ 24.292987] RBP: ffffc90001b5bcb8 R08: fffffffffffffffe R09: 0000000000000001 [ 24.293797] R10: ffff880078d80b80 R11: 0000000000011400 R12: 0000000000000000 [ 24.294601] R13: 00000000000002e0 R14: ffffffffa0009c28 R15: 0000000000000060 [ 24.295439] FS: 00007f30e3acbb40(0000) GS:ffff88007fc00000(0000) knlGS:0000000000000000 [ 24.296364] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 24.296997] CR2: 00000000000002e0 CR3: 0000000078c7b000 CR4: 00000000000006f0 [ 24.297813] Call Trace: [ 24.298097] drm_framebuffer_cleanup+0x1f/0x70 [ 24.298612] qxl_fbdev_fini+0x68/0x90 [qxl] [ 24.299074] qxl_modeset_fini+0xd/0x30 [qxl] [ 24.299562] qxl_pci_remove+0x22/0x50 [qxl] [ 24.300025] pci_device_remove+0x34/0xb0 [ 24.300507] device_release_driver_internal+0x150/0x200 [ 24.301082] device_release_driver+0xd/0x10 [ 24.301587] unbind_store+0x108/0x150 [ 24.301993] drv_attr_store+0x20/0x30 [ 24.302402] sysfs_kf_write+0x32/0x40 [ 24.302827] kernfs_fop_write+0x108/0x190 [ 24.303269] __vfs_write+0x23/0x120 [ 24.303678] ? security_file_permission+0x36/0xb0 [ 24.304193] ? rw_verify_area+0x49/0xb0 [ 24.304636] vfs_write+0xb0/0x190 [ 24.305004] SyS_write+0x41/0xa0 [ 24.305362] entry_SYSCALL_64_fastpath+0x1a/0xa9 [ 24.305887] RIP: 0033:0x7f30e31d9620 [ 24.306285] RSP: 002b:00007ffc54b47e68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 24.307128] RAX: ffffffffffffffda RBX: 00007f30e3497600 RCX: 00007f30e31d9620 [ 24.307928] RDX: 000000000000000d RSI: 0000000000da2008 RDI: 0000000000000001 [ 24.308727] RBP: 000000000070bc60 R08: 00007f30e3498760 R09: 00007f30e3acbb40 [ 24.309504] R10: 0000000000000073 R11: 0000000000000246 R12: 0000000000000001 [ 24.310295] R13: 0000000000000000 R14: 0000000000000000 R15: 00007ffc54b47f34 [ 24.311095] Code: 0e 01 e9 7b fe ff ff 66 90 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 53 48 89 fb e8 83 e8 ff ff 65 48 8b 14 25 40 c4 00 00 31 c0 <3e> 48 0f b1 13 48 85 c0 74 08 48 89 df e8 66 fd ff ff 5b 5d c3 [ 24.313182] RIP: mutex_lock+0x18/0x30 RSP: ffffc90001b5bcb0 [ 24.313811] CR2: 00000000000002e0 [ 24.314208] ---[ end trace 29669c1593cae14b ]--- Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170227203330.18542-1-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_fb.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 5ad7288bb988088e362859acf5bdb055a48370b1 Author: Arushi Singhal Date: Sat Mar 4 21:27:40 2017 +0530 staging: wilc1000: Logical continuations should be on the previous line This patch fixes the checkpatch issue: CHECK: Logical continuations should be on the previous line. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_spi.c | 4 ++-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) commit 804b8ca681ef05bce8c3dbfd2c7673cb14106a85 Author: Arushi Singhal Date: Sat Mar 4 21:27:39 2017 +0530 staging: wilc1000: function prototype argument should have identifier name function prototype argument should have an identifier name as reported by checkpatch.pl. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 27f2d03e5949ecffa95a5f75bd62f6f5d567fd0f Author: Arushi Singhal Date: Sat Mar 4 21:27:38 2017 +0530 staging: wilc1000: Alignment should match open parenthesis Fix checkpatch issues: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 2 +- drivers/staging/wilc1000/wilc_spi.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 16 ++++++++-------- drivers/staging/wilc1000/wilc_wlan.c | 10 +++++----- 4 files changed, 15 insertions(+), 15 deletions(-) commit b558dfd56a5c1f915327967ecfe1181cf2a7a494 Merge: c1ae3cf ca39b44 Author: Dave Airlie Date: Tue Mar 7 13:59:53 2017 +1000 Merge tag 'drm-misc-next-2017-03-06' of git://anongit.freedesktop.org/git/drm-misc into drm-next First slice of drm-misc-next for 4.12: Core/subsystem-wide: - link status core patch from Manasi, for signalling link train fail to userspace. I also had the i915 patch in here, but that had a small buglet in our CI, so reverted. - more debugfs_remove removal from Noralf, almost there now (Noralf said he'll try to follow up with the stragglers). - drm todo moved into kerneldoc, for better visibility (see Documentation/gpu/todo.rst), lots of starter tasks in there. - devm_ of helpers + use it in sti (from Ben Gaignard, acked by Rob Herring) - extended framebuffer fbdev support (for fbdev flipping), and vblank wait ioctl fbdev support (Maxime Ripard) - misc small things all over, as usual - add vblank callbacks to drm_crtc_funcs, plus make lots of good use of this to simplify drivers (Shawn Guo) - new atomic iterator macros to unconfuse old vs. new state Small drivers: - vc4 improvements from Eric - vc4 kerneldocs (Eric)! - tons of improvements for dw-mipi-dsi in rockchip from John Keeping and Chris Zhong. - MAINTAINERS entries for drivers managed in drm-misc. It's not yet official, still an experiment, but definitely not complete fail and better to avoid confusion. We kinda screwed that up with drm-misc a bit when we started committers last year. - qxl atomic conversion (Gabriel Krisman) - bunch of virtual driver polish (qxl, virgl, ...) - misc tiny patches all over This is the first time we've done the same merge-window blackout for drm-misc as we've done for drm-intel for ages, hence why we have a _lot_ of stuff queued already. But it's still only half of drm-intel (room to grow!), and the drivers in drm-misc experiment seems to work at least insofar as that you also get lots of driver updates here alredy. * tag 'drm-misc-next-2017-03-06' of git://anongit.freedesktop.org/git/drm-misc: (141 commits) drm/vc4: Fix OOPSes from trying to cache a partially constructed BO. drm/vc4: Fulfill user BO creation requests from the kernel BO cache. Revert "drm/i915: Implement Link Rate fallback on Link training failure" drm/fb-helper: implement ioctl FBIO_WAITFORVSYNC drm: Update drm_fbdev_cma_init documentation drm/rockchip/dsi: add dw-mipi power domain support drm/rockchip/dsi: fix insufficient bandwidth of some panel dt-bindings: add power domain node for dw-mipi-rockchip drm/rockchip/dsi: remove mode_valid function drm/rockchip/dsi: dw-mipi: correct the coding style drm/rockchip/dsi: dw-mipi: support RK3399 mipi dsi dt-bindings: add rk3399 support for dw-mipi-rockchip drm/rockchip: dw-mipi-dsi: add reset control drm/rockchip: dw-mipi-dsi: support non-burst modes drm/rockchip: dw-mipi-dsi: defer probe if panel is not loaded drm/rockchip: vop: test for P{H,V}SYNC drm/rockchip: dw-mipi-dsi: use positive check for N{H, V}SYNC drm/rockchip: dw-mipi-dsi: use specific poll helper drm/rockchip: dw-mipi-dsi: improve PLL configuration drm/rockchip: dw-mipi-dsi: properly configure PHY timing ... commit d9c0eb0c91121c2d32333a457376da505fc0ffa7 Merge: 452349c f3537b3 Author: David S. Miller Date: Mon Mar 6 17:17:48 2017 -0800 Merge branch 'bgmac-cleanups-PM-support' Jon Mason says: ==================== net: ethernet: bgmac: PM support and clean-ups Changes in v3: * Corrected a bug Florian found and added his Reviewed-by Changes in v2: * Reworked the PM patch with Florian's suggestions Add code to support Power Management (only tested on NS2), and add some code clean-ups ==================== Signed-off-by: David S. Miller commit f3537b3494c06a98a8636c375b6d7a5060c5ac2d Author: Joey Zhong Date: Tue Feb 28 13:51:01 2017 -0500 net: ethernet: bgmac: driver power manangement Implement suspend/resume callbacks in the bgmac driver. This makes sure that we de-initialize and re-initialize the hardware correctly before entering suspend and when resuming. Signed-off-by: Joey Zhong Signed-off-by: Jon Mason Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac-platform.c | 34 +++++++++++++++++ drivers/net/ethernet/broadcom/bgmac.c | 51 ++++++++++++++++++++++++++ drivers/net/ethernet/broadcom/bgmac.h | 2 + 3 files changed, 87 insertions(+) commit cb1b0f90acfedd2164e524b327d9e60b097646cc Author: Jon Mason Date: Tue Feb 28 13:51:00 2017 -0500 net: ethernet: bgmac: unify code of the same family BCM471X and BCM535X are of the same family (from what I can derive from internal documents). Group them into the case statement together, which results in more code reuse. Also, use existing helper variables to make the code a little more readable too. Signed-off-by: Jon Mason Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac-bcma.c | 64 +++++++++++++----------------- 1 file changed, 28 insertions(+), 36 deletions(-) commit 02083c3aeda7b5fab49920b7fd9277b2c9ec50a9 Author: Jon Mason Date: Tue Feb 28 13:50:59 2017 -0500 net: ethernet: bgmac: use #defines for MAX size The maximum frame size is really just the standard ethernet frame size and FCS. So use those existing defines to make the code a little more beautiful. Signed-off-by: Jon Mason Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 452349c3235252aaccaf30cc75402827d43b72d4 Author: Tobias Klauser Date: Tue Feb 28 12:21:12 2017 +0100 net: axienet: use eth_hw_addr_random() Use eth_hw_addr_random() to set a random MAC address in order to make sure ndev->addr_assign_type will be properly set to NET_ADDR_RANDOM. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81fa846a75f5a5ffe684c41dd29b193bb6527a08 Merge: 1a4691b e91e7dd Author: David S. Miller Date: Mon Mar 6 17:13:14 2017 -0800 Merge branch 'netvsc-NAPI' Stephen Hemminger says: ==================== NAPI support for Hyper-V These patches enable NAPI, GRO and napi_alloc_skb for Hyper-V netvsc driver. ==================== Signed-off-by: David S. Miller commit e91e7dd71dedbf4508513c8a66212248a853ecbe Author: stephen hemminger Date: Mon Feb 27 10:26:51 2017 -0800 netvsc: replace netdev_alloc_skb_ip_align with napi_alloc_skb Gives potential performance gain. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 742fe54c7b03c83ce8067822a8739a4091c319ed Author: stephen hemminger Date: Mon Feb 27 10:26:50 2017 -0800 netvsc: enable GRO Use GRO when receiving packets. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 15a863bf7436124e799ba175a801e25f7b57191e Author: stephen hemminger Date: Mon Feb 27 10:26:49 2017 -0800 netvsc: implement NAPI Use NAPI (softirq), to handle receive packets and send completions. Previously this was handled by tasklet. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 2 + drivers/net/hyperv/netvsc.c | 140 ++++++++++++++++++++++++++------------ drivers/net/hyperv/netvsc_drv.c | 5 -- drivers/net/hyperv/rndis_filter.c | 2 + 4 files changed, 102 insertions(+), 47 deletions(-) commit f3dd3f4797652c311df9c074436d420f1ad3566e Author: stephen hemminger Date: Mon Feb 27 10:26:48 2017 -0800 vmbus: introduce in-place packet iterator This is mostly just a refactoring of previous functions (get_pkt_next_raw, put_pkt_raw and commit_rd_index) to make it easier to use for other drivers and NAPI. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/hv/ring_buffer.c | 94 +++++++++++++++++++++++++++++++++++++++++++- drivers/net/hyperv/netvsc.c | 34 +++++----------- include/linux/hyperv.h | 96 ++++++++++++++------------------------------- 3 files changed, 133 insertions(+), 91 deletions(-) commit 50698d80f8bb1db989b7b9fa433f588fade5e382 Author: stephen hemminger Date: Mon Feb 27 10:26:47 2017 -0800 netvsc: don't overload variable in same function There are two variables named packet in the same function. One is the metadata descriptor from host (vmpacket_descriptor) and the other is the control block in the skb used to hold metadata from send. Change name to avoid possible confusion and bugs. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1a4691b204e75a853ec74947bed0dd6966558d29 Author: Haiyang Zhang Date: Fri Feb 24 17:30:32 2017 +0000 tools: hv: Add clean up function for Ubuntu config This patch adds a function to clean up duplicate config info on Ubuntu. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller tools/hv/bondvf.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit df789fe752065f2ce761ba434125e335b514899f Author: David Forster Date: Thu Feb 23 16:27:18 2017 +0000 ipv6: Provide ipv6 version of "disable_policy" sysctl This provides equivalent functionality to the existing ipv4 "disable_policy" systcl. ie. Allows IPsec processing to be skipped on terminating packets on a per-interface basis. Signed-off-by: David Forster Signed-off-by: David S. Miller include/linux/ipv6.h | 1 + include/uapi/linux/ipv6.h | 1 + net/ipv6/addrconf.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+) commit 88da73a3a5da989cc986a4b1f6a40e3292fc93d1 Author: Philippe Reynes Date: Fri Mar 3 23:39:35 2017 +0100 net: smsc: smc91c92_cs: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smc91c92_cs.c | 98 +++++++++++++++++---------------- 1 file changed, 52 insertions(+), 46 deletions(-) commit 60269ae1b01e640aac8fc879aaf1e3dc98beb83b Author: Philippe Reynes Date: Mon Feb 27 23:43:14 2017 +0100 net: smsc: epic100: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/smsc/epic100.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 7d59e319d94f2cffaf5d9d3604bbd841baec933f Author: Philippe Reynes Date: Mon Feb 27 23:17:37 2017 +0100 net: sis: sis900: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/sis/sis900.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit fb70eb20fea66426aee0a21cfa35ab79d3d10e1c Author: Philippe Reynes Date: Mon Feb 27 23:06:41 2017 +0100 net: sis: sis190: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/sis/sis190.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a972c3062f982c63525f20cbce00a6f329406c0a Author: Philippe Reynes Date: Mon Feb 27 22:50:25 2017 +0100 net: silan: sc92031: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/silan/sc92031.c | 83 ++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 36 deletions(-) commit b61a26f8d495edea3795079c87b3e4ad8ee93e1c Author: Philippe Reynes Date: Sun Feb 26 22:48:59 2017 +0100 net: sgi: ioc3-eth: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/sgi/ioc3-eth.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit de48015054fa697f647826ecee94d8f34633809f Author: Philippe Reynes Date: Sun Feb 26 19:00:29 2017 +0100 net: rocker: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker_main.c | 55 ++++++++++++++++++------------- 1 file changed, 32 insertions(+), 23 deletions(-) commit 6fa1ba61520576cf1346c4ff09a056f2950cb3bf Author: Philippe Reynes Date: Thu Feb 23 22:34:43 2017 +0100 net: realtek: r8169: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 41 ++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 16 deletions(-) commit 182ed075e3c706e5e272b0b0135c8d02df59572f Author: Philippe Reynes Date: Thu Feb 23 00:14:08 2017 +0100 net: realtek: 8139too: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/realtek/8139too.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit df6f37225d62316f8505f10ef1099ee40fa3978b Author: Philippe Reynes Date: Wed Feb 22 08:50:27 2017 +0100 net: realtek: 8139cp: use new api ethtool_{get|set}_link_ksettings The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes Signed-off-by: David S. Miller drivers/net/ethernet/realtek/8139cp.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 080b47def5e5e28b2509c5bb92160d1df730f27b Author: Logan Gunthorpe Date: Mon Mar 6 18:30:54 2017 -0600 MicroSemi Switchtec management interface driver Microsemi's "Switchtec" line of PCI switch devices is already well supported by the kernel with standard PCI switch drivers. However, the Switchtec device advertises a special management endpoint with a separate PCI function address and class code. This endpoint enables some additional functionality which includes: * Packet and Byte Counters * Switch Firmware Upgrades * Event and Error logs * Querying port link status * Custom user firmware commands Add a switchtec kernel module which provides PCI driver that exposes a char device. The char device provides userspace access to this interface through read, write and (optionally) poll calls. A userspace tool and library which utilizes this interface is available at [1]. This tool takes inspiration (and borrows some code) from nvme-cli [2]. The tool is largely complete at this time but additional features may be added in the future. [1] https://github.com/sbates130272/switchtec-user [2] https://github.com/linux-nvme/nvme-cli [Dan Carpenter : don't invert error codes] [Christophe JAILLET : fix switchtec_dev_open() error handling] Tested-by: Krishna Dhulipala Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates Signed-off-by: Bjorn Helgaas Reviewed-by: Wei Zhang Reviewed-by: Jens Axboe Reviewed-by: Greg Kroah-Hartman MAINTAINERS | 8 + drivers/pci/Kconfig | 1 + drivers/pci/Makefile | 1 + drivers/pci/switch/Kconfig | 13 + drivers/pci/switch/Makefile | 1 + drivers/pci/switch/switchtec.c | 1006 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 1030 insertions(+) commit bad4417b692ede5cf31105b329cea1544875b526 Author: James Morris Date: Mon Feb 13 16:34:35 2017 +1100 integrity: mark default IMA rules as __ro_after_init The default IMA rules are loaded during init and then do not change, so mark them as __ro_after_init. Signed-off-by: James Morris Signed-off-by: Mimi Zohar security/integrity/ima/ima_policy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6cca3869c598e87fccbb506a1310aa5bca29ac84 Author: Sean Paul Date: Mon Mar 6 15:02:26 2017 -0500 drm/rockchip: Fix link error when CONFIG_DRM_ANALOGIX_DP undefined Fixes the following link error when CONFIG_DRM_ANALOGIX_DP is not defined: ERROR: "analogix_dp_start_crc" [drivers/gpu/drm/rockchip/rockchipdrm.ko] undefined! ERROR: "analogix_dp_stop_crc" [drivers/gpu/drm/rockchip/rockchipdrm.ko] undefined! Fixes: 3190e58dafaf ("drm/rockchip: Implement CRC debugfs API") Cc: Tomeu Vizoso Cc: Mark Yao Cc: Sean Paul Cc: Heiko Stuebner Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: Emil Velikov Reviewed-by: Emil Velikov Signed-off-by: Sean Paul drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 47f6cdd2cb0bed3d8337626d45efc9301337bf1d Author: Sean Paul Date: Mon Mar 6 15:00:17 2017 -0500 drm: Fix compilation error when CONFIG_DEBUG_FS is undefined This patch fixes the following compilation error when CONFIG_DEBUG_FS is not defined. ../drivers/gpu/drm/drm_dp_helper.c: In function ‘drm_dp_aux_crc_work’: ../drivers/gpu/drm/drm_dp_helper.c:1029:13: error: ‘struct drm_crtc’ has no member named ‘crc’ ../drivers/gpu/drm/drm_dp_helper.c:1031:12: error: ‘struct drm_crtc’ has no member named ‘crc’ make[4]: *** [drivers/gpu/drm/drm_dp_helper.o] Error 1 make[4]: *** Waiting for unfinished jobs.... Fixes: 79c1da7c3bf7 ("drm/dp: add helpers for capture of frame CRCs") Cc: Tomeu Vizoso Cc: Sean Paul Cc: Daniel Vetter Cc: Jani Nikula Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Reviewed-by: Emil Velikov Signed-off-by: Sean Paul include/drm/drm_crtc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34869353774bc6de05291fc6ad50d7f471fa3cd8 Author: Florian Vaussard Date: Mon Mar 6 16:02:58 2017 -0600 ARM: dts: socfpga: Add support for PMU The dual Cortex-A9 MPCore inside socfpga has a standard PMU unit for each core mapped in the DAP memory space. Add support for it! Tested with perf on a Cyclone 5 SoC DK. Reported-by: Alberto Dassatti Signed-off-by: Florian Vaussard Tested-by: Alberto Dassatti Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit e3e6dba1af55cf34a2025373e0cfa4ea76222870 Author: Florian Vaussard Date: Mon Mar 6 16:02:17 2017 -0600 ARM: dts: socfpga: Add labels for CPU nodes This makes it easier to reference the CPU nodes afterwards. Signed-off-by: Florian Vaussard Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 439f559109beab39351876633f7bffdd9d749216 Author: Florian Vaussard Date: Mon Feb 27 10:44:06 2017 -0600 ARM: dts: socfpga: Do not include skeleton.dtsi The skeleton.dtsi file is now deprecated as noted in commit 9c0da3cc61f1 ("ARM: dts: explicitly mark skeleton.dtsi as deprecated"). The SoCFPGA device trees already contain the nodes that are defined in skeleton.dtsi (#address-cells, #size-cells, chosen, aliases, memory). Including skeleton.dtsi is useless and will produce the following warning when compiled with W=1: Node /memory has a reg or ranges property, but no unit name Signed-off-by: Florian Vaussard Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga.dtsi | 1 - arch/arm/boot/dts/socfpga_arria10.dtsi | 1 - 2 files changed, 2 deletions(-) commit cfa6384a0128552b0db714c3061f81183772b0b3 Author: Florian Vaussard Date: Mon Feb 27 10:42:21 2017 -0600 ARM: dts: socfpga: Remove unit name for LEDs in EBV SOCrates GPIO LEDs in the Cyclone5 EBV SOCrates board have a unit name but no reg property. Indeed, GPIO LEDs do not need such a property. They do not need a unit name neither. This will trigger the following warnings when compiled with W=1: Node /gpio-leds/led@0 has a unit name, but no reg property Node /gpio-leds/led@1 has a unit name, but no reg property Node /gpio-leds/led@2 has a unit name, but no reg property The solution is to remove the unit name. In order to have unique node names, a rename is necessary. This should be harmless as all the LEDs have a 'label' property, hence their name do not derive from the node name and will stay the same after this patch. Signed-off-by: Florian Vaussard Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_cyclone5_socrates.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fbc06b0e10b56c2a6bf76bef4466642f6b0e68c7 Author: Florian Vaussard Date: Mon Feb 27 10:41:01 2017 -0600 ARM: dts: socfpga: Remove unneeded reg from stmpe_touchscreen The stmpe_touchscreen node in Cyclone5 MCV EVK has a reg property, but this is not used by the driver. Moreover the binding documentation do not define this property. Having a reg property without a unit name will trigger the following warning when compiled with W=1: Node /soc/i2c@ffc04000/stmpe811@41/stmpe_touchscreen has a reg or ranges property, but no unit name Remove the superfluous reg property. Signed-off-by: Florian Vaussard Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_cyclone5_mcvevk.dts | 1 - 1 file changed, 1 deletion(-) commit 0c9ff6158655ee40485a6ec0858549562013f29b Author: Florian Vaussard Date: Mon Feb 27 10:39:47 2017 -0600 ARM: dts: socfpga: Remove unneeded unit names Node eccmgr has a unit name, but do not have a reg property as only the child nodes do have this property. Likewise the usbphy node do not have a reg property. This will trigger the following warnings when compiled with W=1: Node /soc/eccmgr@ffd08140 has a unit name, but no reg property Node /soc/usbphy@0 has a unit name, but no reg property Remove the superfluous unit names. Signed-off-by: Florian Vaussard Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga.dtsi | 4 ++-- arch/arm/boot/dts/socfpga_arria10.dtsi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 332ddfab426ebe677be313444e450c382e2bc309 Author: Florian Vaussard Date: Mon Feb 27 10:38:39 2017 -0600 ARM: dts: socfpga: Add unit name to memory nodes Memory nodes in Arria5, Cyclone5 and Arria10 do not have a unit name. This will trigger several warnings like this one (when compiled with W=1): Node /memory has a reg or ranges property, but no unit name Add the corresponding unit name to each node. Signed-off-by: Florian Vaussard Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_arria10_socdk.dtsi | 2 +- arch/arm/boot/dts/socfpga_arria5_socdk.dts | 2 +- arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts | 2 +- arch/arm/boot/dts/socfpga_cyclone5_mcv.dtsi | 2 +- arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 2 +- arch/arm/boot/dts/socfpga_cyclone5_sockit.dts | 2 +- arch/arm/boot/dts/socfpga_cyclone5_socrates.dts | 2 +- arch/arm/boot/dts/socfpga_cyclone5_sodia.dts | 2 +- arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts | 2 +- arch/arm/boot/dts/socfpga_vt.dts | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) commit 9f24e8165917b574c03f80f2a7fee6ed986d9062 Author: Florian Vaussard Date: Mon Feb 27 10:35:02 2017 -0600 ARM: dts: socfpga: Add unit name to clock nodes Most clock nodes in Arria5, Cyclone5 and Arria10 have a reg property but does not have a unit name. This will trigger several warnings like this one (when compiled with W=1): Node /soc/clkmgr@ffd04000/clocks/periph_pll has a reg or ranges property, but no unit name Add the corresponding unit name to each node. Signed-off-by: Florian Vaussard Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga.dtsi | 38 ++++++++++++++-------------- arch/arm/boot/dts/socfpga_arria10.dtsi | 46 +++++++++++++++++----------------- 2 files changed, 42 insertions(+), 42 deletions(-) commit ab768386116d0d88b944d0ef958adff082c088a8 Author: Michał Kępień Date: Fri Feb 17 08:57:53 2017 +0100 platform/x86: dell-wmi-led: fix coding style issues Fix coding style issues in dell-wmi-led to make sure the module gets a clean start in the x86 platform driver subsystem. Signed-off-by: Michał Kępień Signed-off-by: Jacek Anaszewski drivers/platform/x86/dell-wmi-led.c | 66 +++++++++++++++---------------------- 1 file changed, 26 insertions(+), 40 deletions(-) commit 7a3319c1cd63fb10d54d5700c1f0f41ff46f05a8 Author: Michał Kępień Date: Fri Feb 17 08:57:52 2017 +0100 dell-led: move driver to drivers/platform/x86/dell-wmi-led.c The dell-led driver handles a specific WMI GUID present on some Dell laptops and as such it belongs in the x86 platform driver subsystem. Source code is moved along with the relevant Kconfig and Makefile entries, with some minor modifications: - Kconfig option is renamed from CONFIG_LEDS_DELL_NETBOOKS to CONFIG_DELL_WMI_LED, - the X86 Kconfig dependency is removed as the whole drivers/platform/x86 menu depends on it, so there is no need to duplicate it, - the name of the module's source file is removed from the header comment to avoid the need to update it in the future. Signed-off-by: Michał Kępień Tested-by: Alex Hung Reviewed-by: Pali Rohár Acked-by: Pavel Machek Acked-by: Andy Shevchenko Signed-off-by: Jacek Anaszewski drivers/leds/Kconfig | 8 -- drivers/leds/Makefile | 1 - drivers/leds/dell-led.c | 202 ------------------------------------ drivers/platform/x86/Kconfig | 8 ++ drivers/platform/x86/Makefile | 1 + drivers/platform/x86/dell-wmi-led.c | 200 +++++++++++++++++++++++++++++++++++ 6 files changed, 209 insertions(+), 211 deletions(-) commit e5aa482a8add7673ae7260d704ef49749cd3af95 Author: Michał Kępień Date: Fri Feb 17 08:57:51 2017 +0100 dell-led: remove code related to mic mute LED With dell_micmute_led_set() moved to drivers/platform/x86/dell-laptop.c, all remnants of the mic mute LED handling code can be removed from drivers/leds/dell-led.c, restoring it back to the state it was in before commit db6d8cc00773 ("dell-led: add mic mute led interface"). Signed-off-by: Michał Kępień Tested-by: Alex Hung Reviewed-by: Pali Rohár Signed-off-by: Jacek Anaszewski drivers/leds/Kconfig | 1 - drivers/leds/dell-led.c | 25 +++++++------------------ 2 files changed, 7 insertions(+), 19 deletions(-) commit 44319ab7e0ed13e550bc1714e32f037550c0d858 Author: Michał Kępień Date: Fri Feb 17 08:57:50 2017 +0100 platform/x86: dell-laptop: import dell_micmute_led_set() from drivers/leds/dell-led.c To ensure all users of dell-smbios are in drivers/platform/x86, move the dell_micmute_led_set() method from drivers/leds/dell-led.c to drivers/platform/x86/dell-laptop.c. Signed-off-by: Michał Kępień Tested-by: Alex Hung Reviewed-by: Pali Rohár Acked-by: Andy Shevchenko Acked-by: Takashi Iwai Signed-off-by: Jacek Anaszewski drivers/leds/dell-led.c | 29 ----------------------------- drivers/platform/x86/dell-laptop.c | 28 ++++++++++++++++++++++++++++ sound/pci/hda/dell_wmi_helper.c | 6 +++--- 3 files changed, 31 insertions(+), 32 deletions(-) commit 5dba8804e8c40f03c7bcf4f043089edb232a9084 Author: Michał Kępień Date: Fri Feb 17 08:57:49 2017 +0100 ALSA: hda - rename dell_led_set_func to dell_micmute_led_set_func With dell_app_wmi_led_set() replaced by dell_micmute_led_set(), rename the function pointer to the latter for consistency. Signed-off-by: Michał Kępień Tested-by: Alex Hung Reviewed-by: Pali Rohár Acked-by: Takashi Iwai Signed-off-by: Jacek Anaszewski sound/pci/hda/dell_wmi_helper.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit fa5923cea8da3b5d4eb943651922b327b1df673c Author: Michał Kępień Date: Fri Feb 17 08:57:48 2017 +0100 ALSA: hda - use dell_micmute_led_set() instead of dell_app_wmi_led_set() The dell_app_wmi_led_set() method introduced in commit db6d8cc00773 ("dell-led: add mic mute led interface") was implemented as an easily extensible entry point for other modules to set the state of various LEDs. However, almost three years later it is still only used to control the mic mute LED, so it will be replaced with direct calls to dell_micmute_led_set(). Signed-off-by: Michał Kępień Tested-by: Alex Hung Reviewed-by: Pali Rohár Acked-by: Takashi Iwai Signed-off-by: Jacek Anaszewski drivers/leds/dell-led.c | 20 ++------------------ include/linux/dell-led.h | 6 +----- sound/pci/hda/dell_wmi_helper.c | 12 ++++++------ 3 files changed, 9 insertions(+), 29 deletions(-) commit 6dbea8535d179af4db6a42383b6c29ecb489c32a Author: Michał Kępień Date: Fri Feb 17 08:57:47 2017 +0100 dell-led: remove GUID check from dell_micmute_led_set() As dell_micmute_led_set() no longer uses the dell_wmi_perform_query() method, which was removed in commit 0c41a08e131d ("dell-led: use dell_smbios_send_request() for performing SMBIOS calls"), the DELL_APP_GUID check is redundant and thus can be safely removed. Signed-off-by: Michał Kępień Tested-by: Alex Hung Reviewed-by: Pali Rohár Signed-off-by: Jacek Anaszewski drivers/leds/dell-led.c | 3 --- 1 file changed, 3 deletions(-) commit 0b88b71c7762a406ff99c625935474dc42a25003 Author: Paulo Costa Date: Thu Feb 9 21:07:35 2017 -0200 leds/trigger/cpu: Add LED trigger for all CPUs aggregated Currently there is one CPU led trigger per cpu ('cpu0', 'cpu1', ...) This patch adds a new trigger, 'cpu', with brightness proportional to the number of active CPUs. If multiple brightness levels aren't supported on the LED, it effectively indicates if there is any CPU active. This is particularly useful on tiny linux boards with more CPU cores than LED pins. Signed-off-by: Paulo Costa Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski drivers/leds/trigger/ledtrig-cpu.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) commit c30fb26b116e4735597c46ff80cddb582c3c2727 Author: Geliang Tang Date: Sun Feb 26 08:58:21 2017 +0800 workqueue: use setup_deferrable_timer Use setup_deferrable_timer() instead of init_timer_deferrable() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Tejun Heo kernel/workqueue.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 487d499c6758d81954d684f1dd8edc54257cad0f Author: Belen Sarabia Date: Mon Feb 27 22:41:18 2017 +0100 Delete redundant return value check of platform_get_resource() Delete error handling from the result of a call to platform_get_resource() when the value is immediately passed to devm_ioremap_resource(). Signed-off-by: Belen Sarabia Signed-off-by: Tejun Heo drivers/ata/ahci_octeon.c | 5 ----- 1 file changed, 5 deletions(-) commit 2201c7f10d4f55e35acd93b9323cdf37ea49d95c Author: Masahiro Yamada Date: Sun Feb 26 14:04:08 2017 +0900 ARM: dts: uniphier: fix no unit name warnings Fix warnings reported when built with W=1: Node /memory has a reg or ranges property, but no unit name Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-ld4-ref.dts | 2 +- arch/arm/boot/dts/uniphier-ld6b-ref.dts | 2 +- arch/arm/boot/dts/uniphier-pro4-ace.dts | 2 +- arch/arm/boot/dts/uniphier-pro4-ref.dts | 2 +- arch/arm/boot/dts/uniphier-pro4-sanji.dts | 2 +- arch/arm/boot/dts/uniphier-pxs2-gentil.dts | 2 +- arch/arm/boot/dts/uniphier-pxs2-vodka.dts | 2 +- arch/arm/boot/dts/uniphier-sld3-ref.dts | 2 +- arch/arm/boot/dts/uniphier-sld8-ref.dts | 2 +- arch/arm/boot/dts/uniphier-support-card.dtsi | 5 +++-- 10 files changed, 12 insertions(+), 11 deletions(-) commit b5027603c4c77a5cac750c5ec35125e875a53e55 Author: Masahiro Yamada Date: Sun Feb 26 14:04:09 2017 +0900 arm64: dts: uniphier: fix no unit name warnings Fix warnings reported when built with W=1: Node /memory has a reg or ranges property, but no unit name Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11-ref.dts | 2 +- arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 2 +- arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts | 2 +- arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 8e2b908b9f26258c2679d13d7001a9d571baff94 Author: Masahiro Yamada Date: Sun Feb 26 14:04:07 2017 +0900 ARM: dts: uniphier: remove skeleton.dtsi inclusion Commit 9c0da3cc61f1 ("ARM: dts: explicitly mark skeleton.dtsi as deprecated") declared that skeleton.dtsi was deprecated. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-ld4.dtsi | 4 ++-- arch/arm/boot/dts/uniphier-pro4.dtsi | 4 ++-- arch/arm/boot/dts/uniphier-pro5.dtsi | 4 ++-- arch/arm/boot/dts/uniphier-pxs2.dtsi | 4 ++-- arch/arm/boot/dts/uniphier-sld3.dtsi | 4 ++-- arch/arm/boot/dts/uniphier-sld8.dtsi | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) commit e3779f6a4e7359bc0f83c3e2d34702a6c495e66e Author: Bhumika Goyal Date: Thu Mar 2 01:03:28 2017 +0530 ata: constify of_device_id structures Declare of_device_id structures as const as they are either passed to the macro MODULE_DEVICE_TABLE or stored in the of_match_table field of a device_driver structure. This field is of type const, so of_device_id structures having this property can be made const too. Cross compiled the files drivers/ata/pata_macio.c and drivers/ata/pata_mpc52xx.c for powerpc architecture. Signed-off-by: Bhumika Goyal Signed-off-by: Tejun Heo drivers/ata/pata_macio.c | 2 +- drivers/ata/pata_mpc52xx.c | 2 +- drivers/ata/pata_of_platform.c | 2 +- drivers/ata/sata_fsl.c | 2 +- drivers/ata/sata_mv.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 387ad9674b0013c8756ad20d854ff005b0c313ad Author: Elena Reshetova Date: Mon Feb 20 12:19:00 2017 +0200 kernel: convert cgroup_namespace.count from atomic_t to refcount_t refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: Hans Liljestrand Signed-off-by: Kees Cook Signed-off-by: David Windsor Signed-off-by: Tejun Heo include/linux/cgroup.h | 7 ++++--- kernel/cgroup/cgroup.c | 2 +- kernel/cgroup/namespace.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) commit efd59256f429394665b7434e05a51cb1ed16e959 Author: Aditya Xavier Date: Sat Jan 28 20:07:49 2017 +0530 ARM: dts: BCM5301X: Add missing Netgear R8000 LEDs and Keys Added two WAN status LEDs and a GPIO key for brightness which were missing. Signed-off-by: Aditya Xavier Acked-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit cd84661314b932e7428d7b6371105c2ee468ef37 Author: Rafał Miłecki Date: Sat Jan 28 12:51:35 2017 +0100 ARM: dts: BCM5301X: Relicense DTS files I created to the ISC It's preferred to have DT source files licensed under BSD compatible license. All new BCM5301X DTS files use ISC so let's also relicense old ones to it. Except for me only Hauke was ever touched these files in his commit 9faa5960eef3 ("ARM: BCM5301X: add NAND flash chip description") and commit bb1d8fba1965 ("ARM: BCM5301X: add NAND flash chip description for Asus RT-AC87U"). Signed-off-by: Rafał Miłecki Acked-by: Hauke Mehrtens Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts | 12 +++++++++++- arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts | 12 +++++++++++- arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts | 12 +++++++++++- arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 12 +++++++++++- arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 12 +++++++++++- arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts | 12 +++++++++++- arch/arm/boot/dts/bcm47081.dtsi | 12 +++++++++++- arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts | 12 +++++++++++- arch/arm/boot/dts/bcm4709-netgear-r7000.dts | 12 +++++++++++- arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 12 +++++++++++- arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 12 +++++++++++- 11 files changed, 121 insertions(+), 11 deletions(-) commit 342bef7c880bdab718e672f284a058e6f5169efd Author: Geert Uytterhoeven Date: Fri Feb 17 17:10:35 2017 +0100 ARM: OMAP: PM: Drop useless checks for PM_SUSPEND_STANDBY As OMAP uses the standard suspend_valid_only_mem() for its platform_suspend_ops.valid() callback, its platform_suspend_ops.enter() callback will never be called with state equal to PM_SUSPEND_STANDBY. Signed-off-by: Geert Uytterhoeven Signed-off-by: Tony Lindgren arch/arm/mach-omap1/pm.c | 1 - arch/arm/mach-omap2/pm.c | 1 - 2 files changed, 2 deletions(-) commit 14767520517b3e4b2c045eca95d232457c460a8f Author: Carlo Caione Date: Wed Feb 22 17:31:30 2017 +0100 dt-bindings: Add vendor prefix for Hwacom Systems Inc. Hwacom Systems Inc. is a broadband system integrator and supplier of mobile, fixed and IP networks related services as well as multimedia application. Website: http://www.hwacom.com/ Signed-off-by: Carlo Caione Acked-by: Rob Herring [khilman: change shortlog prefix to dt-bindings] Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit c344698648af9010699f8f68e7833e183f178834 Author: Martin Blumenstingl Date: Sun Feb 19 22:41:49 2017 +0100 ARM64: dts: meson-gx: remove the phy-mode property from meson-gx The ethmac node has to be configured for each board due to different pinctrl nodes for RGMII/RMII. Thus the phy-mode should be specified at the same place (= in the board .dts), making it easier to read the board .dts file (because the phy-mode is stated explicitly, without requiring developers to read all "parent" .dtsi as well). Signed-off-by: Martin Blumenstingl Reviewed-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 1 - 1 file changed, 1 deletion(-) commit 093d23db4fffeb9ed26d2a41907c02969df8355b Author: Martin Blumenstingl Date: Sun Feb 19 22:41:48 2017 +0100 ARM64: dts: amlogic: add the ethernet TX delay configuration This adds the amlogic,tx-delay-ns property with the old (hardcoded) default value of 2ns to all boards which are using an RGMII ethernet PHY. Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Reviewed-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 ++ arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts | 2 ++ arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 2 ++ arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts | 2 ++ arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts | 2 ++ arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts | 2 ++ arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 2 ++ arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts | 2 ++ 8 files changed, 16 insertions(+) commit 23edd1b2d83c384949b5f77cdb940006a5d56279 Author: Martin Blumenstingl Date: Sun Feb 19 22:41:47 2017 +0100 ARM64: dts: meson-gxbb-p201: fix ethernet support Amlogic's own .dts specifies that the P201 board uses a RMII PHY (with the reset GPIO being GPIOZ_14). However our P201 board .dts simply inherits the phy-mode setting from from meson-gx.dtsi where it defaults to RGMII mode. Remove all ethernet settings from meson-gxbb-p20x.dtsi as it only specifies the RGMII pins which are only valid for the P200 board. Instead we add the ethmac node to the meson-gxbb-p201.dts and configure the pinctrl property and the phy-mode for an RMII PHY. An MDIO node (which would also specify the PHY) is not added since we don't know which PHY is being used (and thus which PHY address would have to be used). Signed-off-by: Martin Blumenstingl Acked-by: Neil Armstrong Reviewed-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts | 11 +++++++++++ arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 6 ------ 2 files changed, 11 insertions(+), 6 deletions(-) commit 695dcb2ba1363d06384b8e98c1adc46e79b36239 Author: Martin Blumenstingl Date: Sun Feb 19 22:41:46 2017 +0100 ARM64: dts: meson-gxbb-wetek-play2: add the ethernet PHY's reset GPIO This resets the ethernet PHY during boot to get the PHY into a "clean" state. While here also specify the phy-handle of the ethmac node to make the PHY configuration similar to the one we have on GXL devices. This will allow us to specify OF-properties for the PHY itself. Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Reviewed-by: Jerome Brunet Signed-off-by: Kevin Hilman .../boot/dts/amlogic/meson-gxbb-wetek-play2.dts | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit be5f7befbd75ec95f0d444813ae85e26851eff3b Author: Martin Blumenstingl Date: Sun Feb 19 22:41:45 2017 +0100 ARM64: dts: meson-gxbb-wetek-hub: add the ethernet PHY's reset GPIO This resets the ethernet PHY during boot to get the PHY into a "clean" state. While here also specify the phy-handle of the ethmac node to make the PHY configuration similar to the one we have on GXL devices. This will allow us to specify OF-properties for the PHY itself. Signed-off-by: Martin Blumenstingl Reviewed-by: Jerome Brunet Signed-off-by: Kevin Hilman .../boot/dts/amlogic/meson-gxbb-wetek-hub.dts | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 67d49f3066649b423d788a2b84cfeb83af7f3a59 Author: Martin Blumenstingl Date: Sun Feb 19 22:41:44 2017 +0100 ARM64: dts: meson-gxbb-nexbox-a95x: add the ethernet PHY's reset GPIO This resets the ethernet PHY during boot to get the PHY into a "clean" state. While here also specify the phy-handle of the ethmac node to make the PHY configuration similar to the one we have on GXL devices. This will allow us to specify OF-properties for the PHY itself. Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Reviewed-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 1220b29749d4e2afb2213a652a237b9669382852 Author: Martin Blumenstingl Date: Sun Feb 19 22:41:43 2017 +0100 ARM64: dts: meson-gxbb-vega-s95: add the ethernet PHY's reset GPIO This resets the ethernet PHY during boot to get the PHY into a "clean" state. While here also specify the phy-handle of the ethmac node to make the PHY configuration similar to the one we have on GXL devices. This will allow us to specify OF-properties for the PHY itself. Signed-off-by: Martin Blumenstingl Reviewed-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 2f739c17507e339edd8cfad1c1af5580e261a853 Author: Martin Blumenstingl Date: Sun Feb 19 22:41:42 2017 +0100 ARM64: dts: meson-gxbb-p200: add the ethernet PHY's reset GPIO This resets the ethernet PHY during boot to get the PHY into a "clean" state. While here also specify the phy-handle of the ethmac node to make the PHY configuration similar to the one we have on GXL devices. This will allow us to specify OF-properties for the PHY itself. Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Reviewed-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit b6ff27217e58d3b3a900debbd90924375aa62d30 Author: Martin Blumenstingl Date: Sun Feb 19 22:41:41 2017 +0100 ARM64: dts: meson-gxbb-odroidc2: add the ethernet PHY's reset GPIO This resets the ethernet PHY during boot to get the PHY into a "clean" state. While here also explicitly specify the phy-mode instead of relying on the default-value from meson-gx.dtsi. Signed-off-by: Martin Blumenstingl Tested-by: Neil Armstrong Reviewed-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 95fbe8b08b2d420e4f5a77701f165d6b23827862 Author: Martin Blumenstingl Date: Sun Feb 19 23:23:25 2017 +0100 ARM64: defconfig: enable the leds-pwm driver and default-on trigger This enables the leds-pwm driver to support LEDs which are PWM-powered (and thus dimmable). Additionally we have to enable the "default-on" trigger - this was not required before because the gpio-leds driver has a separate "default-state" property which can be used to enable the LED by default. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit c7a72e3fdb5d77486ca3a0ac942c0a2e0d80d5bb Author: Pablo Neira Ayuso Date: Mon Mar 6 17:46:20 2017 +0100 netfilter: nf_tables: add nft_set_lookup() This new function consolidates set lookup via either name or ID by introducing a new nft_set_lookup() function. Replace existing spots where we can use this too. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 9 +++++---- net/netfilter/nf_tables_api.c | 31 ++++++++++++++++++++++++------- net/netfilter/nft_dynset.c | 14 ++++---------- net/netfilter/nft_lookup.c | 14 ++++---------- net/netfilter/nft_objref.c | 14 ++++---------- 5 files changed, 41 insertions(+), 41 deletions(-) commit c56e3956c17bb24d18470122c0513d963e332205 Author: Liping Zhang Date: Sun Mar 5 21:02:23 2017 +0800 netfilter: nf_tables: validate the expr explicitly after init successfully When we want to validate the expr's dependency or hooks, we must do two things to accomplish it. First, write a X_validate callback function and point ->validate to it. Second, call X_validate in init routine. This is very common, such as fib, nat, reject expr and so on ... It is a little ugly, since we will call X_validate in the expr's init routine, it's better to do it in nf_tables_newexpr. So we can avoid to do this again and again. After doing this, the second step listed above is not useful anymore, remove them now. Patch was tested by nftables/tests/py/nft-test.py and nftables/tests/shell/run-tests.sh. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/nft_reject_bridge.c | 6 +----- net/netfilter/nf_tables_api.c | 11 +++++++++++ net/netfilter/nft_compat.c | 8 -------- net/netfilter/nft_fib.c | 2 +- net/netfilter/nft_masq.c | 4 ---- net/netfilter/nft_meta.c | 4 ---- net/netfilter/nft_nat.c | 4 ---- net/netfilter/nft_redir.c | 4 ---- net/netfilter/nft_reject.c | 5 ----- net/netfilter/nft_reject_inet.c | 6 +----- 10 files changed, 14 insertions(+), 40 deletions(-) commit 4aba4cf820545ca8ec23785c7bac40bba7e505c5 Author: Eric Anholt Date: Tue Dec 13 15:15:10 2016 -0800 ARM: dts: bcm2835: Add the DSI module nodes and clocks. The modules stay disabled by default, and if you want to enable DSI you'll need an overlay that connects a panel to it. Signed-off-by: Eric Anholt arch/arm/boot/dts/bcm2835-rpi.dtsi | 8 +++++++ arch/arm/boot/dts/bcm283x.dtsi | 48 +++++++++++++++++++++++++++++++++++--- 2 files changed, 53 insertions(+), 3 deletions(-) commit 3190e58dafaf10cedab3005f3859ee0c16700c14 Author: Tomeu Vizoso Date: Fri Mar 3 14:39:36 2017 +0100 drm/rockchip: Implement CRC debugfs API Implement the .set_crc_source() callback and call the DP helpers accordingly to start and stop CRC capture. This is only done if this CRTC is currently using the eDP connector. v3: Remove superfluous check on rockchip_crtc_state->output_type v6: Remove superfluous variable Signed-off-by: Tomeu Vizoso Acked-by: Mark Yao Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170303133936.14964-5-tomeu.vizoso@collabora.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 737d6e339f50dcdbd5a8444d04dede2f0d305361 Author: Tomeu Vizoso Date: Fri Mar 3 14:39:35 2017 +0100 drm/bridge: analogix_dp: add helpers for capture of frame CRCs Add two simple functions that just take the drm_dp_aux from our struct and calls the corresponding DP helpers with it. v6: Pass to the DP helper the drm_crtc of the current connector (Sean Paul) Signed-off-by: Tomeu Vizoso Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170303133936.14964-4-tomeu.vizoso@collabora.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 22 ++++++++++++++++++++++ include/drm/bridge/analogix_dp.h | 3 +++ 2 files changed, 25 insertions(+) commit 79c1da7c3bf74be9b1dae9450ef79f32dd22def6 Author: Tomeu Vizoso Date: Fri Mar 3 14:39:34 2017 +0100 drm/dp: add helpers for capture of frame CRCs Adds helpers for starting and stopping capture of frame CRCs through the DPCD. When capture is on, a worker waits for vblanks and retrieves the frame CRC to put it in the queue on the CRTC that is using the eDP connector, so it's passed to userspace. v2: Reuse drm_crtc_wait_one_vblank Update locking, as drm_crtc_add_crc_entry now takes the lock v3: Don't call wake_up_interruptible directly, that's now done in drm_crtc_add_crc_entry. v4: Style fixes (Sean Paul) Reworked retry of CRC reads (Sean Paul) Flush worker after stopping CRC generationa (Sean Paul) v5: Move back to make the retry explicitly once v6: Set and use the drm_crtc backpointer (Sean Paul) Signed-off-by: Tomeu Vizoso Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170303133936.14964-3-tomeu.vizoso@collabora.com drivers/gpu/drm/drm_dp_helper.c | 126 ++++++++++++++++++++++++++++++++++++++++ include/drm/drm_dp_helper.h | 7 +++ 2 files changed, 133 insertions(+) commit 4bb310fd9eea254b68b2f48b376fe149f65e3fbb Author: Tomeu Vizoso Date: Fri Mar 3 14:39:33 2017 +0100 drm/dp: add crtc backpointer to drm_dp_aux This backpointer allows DP helpers to access the crtc it's currently being used for. v6: Have the backpointer be to drm_crtc (Sean Paul) Signed-off-by: Tomeu Vizoso Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170303133936.14964-2-tomeu.vizoso@collabora.com include/drm/drm_dp_helper.h | 2 ++ 1 file changed, 2 insertions(+) commit 74664cf286dc0d2bf6960293cb219e5f741ac92b Author: Colin Ian King Date: Tue Feb 28 11:31:15 2017 +0000 netfilter: arp_tables: remove redundant check on ret being non-zero ret is initialized to zero and if it is set to non-zero in the xt_entry_foreach loop then we exit via the out_free label. Hence the check for ret being non-zero is redundant and can be removed. Detected by CoverityScan, CID#1357132 ("Logically Dead Code") Signed-off-by: Colin Ian King Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/arp_tables.c | 2 -- 1 file changed, 2 deletions(-) commit 346ab44e65ac0e9aa1cd70b910fe06f8feb151c4 Author: Eric Anholt Date: Thu Feb 23 10:15:27 2017 -0800 MAINTAINERS: Add Stefan Wahren to bcm2835. Stefan has been active on the platform since 2015, helping to polish drivers for upstreaming and providing review feedback to other contributors, along with doing new development. Signed-off-by: Eric Anholt Acked-by: Stefan Wahren MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit d944a0f260d5c12258e227472e0f911a26aa764d Author: Stephen Warren Date: Tue Feb 21 19:43:21 2017 -0700 MAINTAINERS: remove swarren from bcm2835 I haven't been active in BCM2835 maintenance for quite a while; Eric's been doing a great job. As such, remove myself from MAINTAINERS for that. Signed-off-by: Stephen Warren Signed-off-by: Eric Anholt MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 13fa745da251606fcdbf58acd6b4a551bea6ae99 Author: Joe Perches Date: Tue Feb 28 14:09:24 2017 -0800 netfilter: Use pr_cont where appropriate Logging output was changed when simple printks without KERN_CONT are now emitted on a new line and KERN_CONT is required to continue lines so use pr_cont. Miscellanea: o realign arguments o use print_hex_dump instead of a local variant Signed-off-by: Joe Perches Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebt_log.c | 34 +++++++++++++++++----------------- net/ipv4/netfilter/nf_nat_snmp_basic.c | 15 ++------------- 2 files changed, 19 insertions(+), 30 deletions(-) commit 579fc0dc09111c1f8b94742a0ed5a0bb8fdddbb9 Author: James Morris Date: Mon Mar 6 11:58:08 2017 -0500 selinux: constify nlmsg permission tables Constify nlmsg permission tables, which are initialized once and then do not change. Signed-off-by: James Morris Signed-off-by: Paul Moore security/selinux/nlmsgtab.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3206caded81ad9bdb2e7ff4c0b94ec5913df8618 Author: Laura Garcia Liebana Date: Thu Mar 2 17:00:14 2017 +0100 netfilter: nft_hash: support of symmetric hash This patch provides symmetric hash support according to source ip address and port, and destination ip address and port. For this purpose, the __skb_get_hash_symmetric() is used to identify the flow as it uses FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL flag by default. The new attribute NFTA_HASH_TYPE has been included to support different types of hashing functions. Currently supported NFT_HASH_JENKINS through jhash and NFT_HASH_SYM through symhash. The main difference between both types are: - jhash requires an expression with sreg, symhash doesn't. - symhash supports modulus and offset, but not seed. Examples: nft add rule ip nat prerouting ct mark set jhash ip saddr mod 2 nft add rule ip nat prerouting ct mark set symhash mod 2 By default, jenkins hash will be used if no hash type is provided for compatibility reasons. Signed-off-by: Laura Garcia Liebana Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 13 +++++ net/netfilter/nft_hash.c | 99 +++++++++++++++++++++++++++++++- 2 files changed, 111 insertions(+), 1 deletion(-) commit 511040eea2234d9add3f33ba0e6c2e17944fdfb6 Author: Laura Garcia Liebana Date: Thu Feb 23 12:10:15 2017 +0100 netfilter: nft_hash: rename nft_hash to nft_jhash This patch renames the local nft_hash structure and functions to nft_jhash in order to prepare the nft_hash module code to add new hash functions. Signed-off-by: Laura Garcia Liebana Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_hash.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 3c1fece8819ed25257461b71e7c75a1f33eaa61d Author: Phil Sutter Date: Mon Feb 20 17:52:27 2017 +0100 netfilter: nft_exthdr: Allow checking TCP option presence, too Honor NFT_EXTHDR_F_PRESENT flag so we check if the TCP option is present. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_exthdr.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 69c8ab148006a2ec7ac1a1f08945e95febc1c132 Author: Dave Gerlach Date: Mon Mar 6 09:23:42 2017 -0600 ARM: omap2plus_defconfig: Enable support for ti-cpufreq AM335x, AM437x, DRA7xx, and AM57xx platforms all now depend on ti-cpufreq driver to enable proper OPPs for use with cpufreq, so enable the same. Signed-off-by: Dave Gerlach Reviewed-by: Lukasz Majewski Signed-off-by: Tony Lindgren arch/arm/configs/omap2plus_defconfig | 1 + 1 file changed, 1 insertion(+) commit 0526364ce48fe586a1b745494be6fe82cb018b7a Author: Tony Lindgren Date: Sun Mar 5 20:11:58 2017 -0800 ARM: dts: omap4-droid4: Add touchscreen Droid4's touchscreen can be used with mainline's maxtouch driver. The touchscreen's lower area is used for four soft buttons (KEY_MENU, KEY_HOME, KEY_BACK, KEY_SEARCH), but that does not seem to be currently supported by the mainline kernel. The mxt224 configuration can be saved with "mxt-app" for the kernel to load. It can be saved after the first boot with: # mxt-app -d i2c-dev:1-004a --save /lib/firmware/maxtouch.cfg Where the mxt-app can be found at: https://github.com/atmel-maxtouch/mxt-app The firmware for the droid 4 mxt224 comes with GPLv2 license in the Motorola Linux kernel sources. This firmware can be dumped out with "droid4-touchscreen-firmware" program at: https://github.com/tmlind/droid4-touchscreen-firmware The related LCD patches are still pending, but when merged, the touchscreen can be rotated in X with something like: # xrandr --output DSI-1 --rotate right # xinput set-prop 6 'Coordinate Transformation Matrix' \ 0 1 0 -1 0 1 0 0 1 For now, we rely on a gpio-hog but later on we can add the reset gpio handling to the driver and have it load the maxtouch.cfg and maxtouch.fw on boot. This patch is based on combined similar patches done by me and Sebastian. Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 6f1a0744162e54a6d1baae157c8cb27eb6cde42c Author: Sebastian Reichel Date: Sun Mar 5 20:11:57 2017 -0800 ARM: dts: omap4-droid4: Add accelerometer Add accelerometer. Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit d2913a69929b777af896f3343edd0dcde5ff700d Author: Sebastian Reichel Date: Sun Mar 5 20:11:57 2017 -0800 ARM: dts: omap4-droid4: Add compass Add compass. Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 594e808bfa2d296c9e4ce8ff0132c27f2b1259de Author: Sebastian Reichel Date: Sun Mar 5 20:11:57 2017 -0800 ARM: dts: motorola-cpcap-mapphone: add pwrbutton Add power button. Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 45ce6cf0c6dc91386a01f14da1a6352c9bce37d1 Author: Sebastian Reichel Date: Sun Mar 5 20:11:56 2017 -0800 ARM: dts: motorola-cpcap-mapphone: add rtc Add rtc. Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 5937a55cf9a94214cae83248e73f8e4ddc27db48 Author: Sebastian Reichel Date: Sun Mar 5 20:11:56 2017 -0800 ARM: dts: omap4-droid4: Add gpio-keys On Droid 4 "Volume Down" and "Keypad Slide" keys are connected via SoC GPIOs, "Power Key" via CPCAP and all other keys via SoC keypad Matrix. This adds the GPIO keys. Signed-off-by: Sebastian Reichel [tony@atomide.com: updated to apply on omap4-keypad patch] Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 0d4cb3ccee589a18306b73be6274bf79209a4dcd Author: Tony Lindgren Date: Sun Mar 5 20:11:56 2017 -0800 ARM: dts: Configure regulators for droid 4 With drivers/mfd/motorola-cpcap.c and drivers/regulator/cpcap-regulator.c we can now configure proper regulators for droid 4. Let's add regulator voltages and switch over MMC, eMMC and WLAN to use the CPCAP regulators. Cc: devicetree@vger.kernel.org Cc: Marcel Partap Cc: Michael Scott Tested-By: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 151 +++++++++++++++++++++++++ arch/arm/boot/dts/omap4-droid4-xt894.dts | 25 +--- 2 files changed, 155 insertions(+), 21 deletions(-) commit 001916b94a04809a94abb07daba6f9ace01906ba Author: Jiri Olsa Date: Sun Mar 5 17:40:11 2017 +0100 perf bench numa: Add more comment for -c option Adding more commentary for -c/--show_convergence option, to explain how the convergence is defined. Before: -c, --show_convergence show convergence details Now: -c, --show_convergence convergence is reached when each process \ (all its threads) is running on a single NUMA node. Suggested--by: Jiri Hladky Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Jiri Hladky Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1488732011-27384-1-git-send-email-jolsa@kernel.org [ Rephrased a bit based on a IRC conversation with Jiri ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/numa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 181df2d458f3e84eb4809083655fd2fd4ef33642 Author: Chris Wilson Date: Mon Mar 6 09:29:16 2017 +0000 drm/i915: Take rpm wakelock for releasing the fence on unbind Unbind the vma may happen at any time, outside of the normal GT wakeref. As such it relies on having a wakeref of its own. However, we can forgo clearing the register whilst the device is asleep and just mark it as unused - so that when we do wake up the device, we will clear the unused fence register (see i915_gem_restore_fences). [22423.944631] WARNING: CPU: 3 PID: 26178 at drivers/gpu/drm/i915/intel_drv.h:1739 i915_vma_put_fence+0xf3/0x100 [i915] [22423.946053] RPM wakelock ref not held during HW access [22423.946056] Modules linked in: vgem(E) i915(E) nls_ascii(E) nls_cp437(E) vfat(E) fat(E) x86_pkg_temp_thermal(E) crct10dif_pclmul(E) crc32_pclmul(E) crc32c_intel(E) ghash_clmulni_intel(E) intel_gtt(E) i2c_algo_bit(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) evdev(E) aesni_intel(E) aes_x86_64(E) crypto_simd(E) cryptd(E) glue_helper(E) sysimgblt(E) fb_sys_fops(E) prime_numbers(E) drm(E) efivars(E) mei_me(E) lpc_ich(E) mei(E) mfd_core(E) battery(E) video(E) acpi_pad(E) button(E) tpm_tis(E) tpm_tis_core(E) tpm(E) autofs4(E) i2c_i801(E) thermal(E) fan(E) i2c_designware_platform(E) i2c_designware_core(E) [22423.946438] CPU: 2 PID: 26178 Comm: gem_concurrent_ Tainted: G E 4.10.0+ #101 [22423.946513] Hardware name: ��������������������������������� ���������������������������������/���������������������������������, BIOS RYBDWi35.86A.0246.2 [22423.946600] Call Trace: [22423.946641] dump_stack+0x68/0x9f [22423.946703] __warn+0x107/0x130 [22423.946763] warn_slowpath_fmt+0xa8/0xe0 [22423.946825] ? __warn+0x130/0x130 [22423.946868] ? free_hot_cold_page_list+0x53/0x70 [22423.946942] ? mark_lock+0xcc/0x7f0 [22423.946997] ? __lock_is_held+0x84/0x100 [22423.947115] ? i915_vma_put_fence+0x64/0x100 [i915] [22423.947224] i915_vma_put_fence+0xf3/0x100 [i915] [22423.947335] i915_vma_unbind+0x4da/0x560 [i915] [22423.947387] ? rb_erase+0x812/0x8a0 [22423.947439] ? kfree+0xa2/0xd0 [22423.947562] i915_vma_close+0x159/0x180 [i915] [22423.947674] intel_ring_free+0x31/0x50 [i915] [22423.947776] i915_gem_context_free+0x1ff/0x3d0 [i915] [22423.947887] context_close+0x106/0x110 [i915] [22423.947989] context_idr_cleanup+0xc/0x10 [i915] [22423.948041] idr_for_each+0x14d/0x1d0 [22423.948158] ? context_close+0x110/0x110 [i915] [22423.948206] ? get_from_free_list+0x70/0x70 [22423.948261] ? __lock_is_held+0x84/0x100 [22423.948325] ? __mutex_unlock_slowpath+0xd4/0x400 [22423.948448] i915_gem_context_close+0x4b/0x90 [i915] [22423.948544] i915_driver_preclose+0x28/0x50 [i915] [22423.948620] drm_release+0x175/0x690 [drm] [22423.948681] ? fcntl_setlk+0x5e0/0x5e0 [22423.948746] __fput+0x17d/0x300 [22423.948807] ____fput+0x9/0x10 [22423.948859] task_work_run+0xa7/0xe0 [22423.948924] do_exit+0x4d2/0x13e0 [22423.948986] ? mm_update_next_owner+0x320/0x320 [22423.949051] ? __do_page_fault+0x209/0x5c0 [22423.949110] ? mark_held_locks+0x23/0xc0 [22423.949166] ? entry_SYSCALL_64_fastpath+0x5/0xb1 [22423.949232] do_group_exit+0x93/0x160 [22423.949289] SyS_exit_group+0x18/0x20 [22423.949350] entry_SYSCALL_64_fastpath+0x1c/0xb1 [22423.949403] RIP: 0033:0x7f9cc2e154c8 [22423.949484] RSP: 002b:00007ffd7e81b448 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [22423.949557] RAX: ffffffffffffffda RBX: ffffffff810ef1f0 RCX: 00007f9cc2e154c8 [22423.949617] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [22423.949677] RBP: ffff880367e9ff98 R08: 00000000000000e7 R09: ffffffffffffff88 [22423.949741] R10: 00007f9cc1d5c000 R11: 0000000000000246 R12: 00007f9cc30f6c30 [22423.949798] R13: 0000000000000000 R14: 00007f9cc30f6c20 R15: 0000000000000003 [22423.949868] ? trace_hardirqs_off_caller+0xc0/0x110 v2: Move the rpm check down a layer so that we still perform the vma/fence update required for the deferred mmio write on resume. v3: Don't touch i915_gem_object_set_cache_level() and leave the rpm to the low level routines (such as i915_vma_put_fence). v4: vma may be null in fence_write, so extract drm_i915_private from fence->i915 Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170306092916.11623-3-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_fence_reg.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit e9d0a26d34818e0f9340316f8016129231560966 Author: HungNien Chen Date: Mon Mar 6 11:30:14 2017 +0800 HID: multitouch: change for touch height/width Quoting from Jonathan Clarke in previous thread(2017/01/24): "This division by 2 was added along with the touch width/height fields 6 years ago so that those fields 'match the visual scale of the touch' for a specific device (3M PCT)" "The scaling is also discarding information about touch size (1 bit for each of width/height) which is useful for any application that wants to know about it." Jonathan mentioned just what I thought in a new project recently. It dosen't make sense to discard 1 bit width/height in general case according to the spec in multi-touch-protocol.txt so I would like to make a slight change here. A quirk MT_QUIRK_TOUCH_SIZE_SCALING was added to service devices like 3M PCT with a special visual scale and the division by 2 only take effect with devices like that. [jkosina@suse.cz: reformat changelog] Signed-off-by: HungNien Chen Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit e1c0c91bdaec0702ebbfdc546926989dd63d19ef Author: Chris Wilson Date: Mon Mar 6 09:29:15 2017 +0000 drm/i915: Wake up all waiters before idling When we idle, we wakeup the first waiter (checking to see if it missed an earlier wakeup) and disarm the breadcrumbs. However, we now assert that there are no waiter when the interrupt is disabled, triggering an assert if there were multiple waiters when we idled. [ 420.842275] invalid opcode: 0000 [#1] PREEMPT SMP [ 420.842285] Modules linked in: vgem snd_hda_codec_realtek x86_pkg_temp_thermal snd_hda_codec_generic intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_intel snd_hda_codec snd_hwdep mei_me snd_hda_core mei snd_pcm lpc_ich i915 r8169 mii prime_numbers [ 420.842357] CPU: 4 PID: 8714 Comm: kms_pipe_crc_ba Tainted: G U W 4.10.0-CI-CI_DRM_2280+ #1 [ 420.842377] Hardware name: Hewlett-Packard HP Pro 3500 Series/2ABF, BIOS 8.11 10/24/2012 [ 420.842395] task: ffff880117ddce40 task.stack: ffffc90001114000 [ 420.842439] RIP: 0010:__intel_engine_remove_wait+0x1f4/0x200 [i915] [ 420.842454] RSP: 0018:ffffc90001117b18 EFLAGS: 00010046 [ 420.842467] RAX: 0000000000000000 RBX: ffff88010c25c2a8 RCX: 0000000000000001 [ 420.842481] RDX: 0000000000000001 RSI: 00000000ffffffff RDI: ffffc90001117c50 [ 420.842495] RBP: ffffc90001117b58 R08: 0000000011e52352 R09: c4d16acc00000000 [ 420.842511] R10: ffffffff82789eb0 R11: ffff880117ddce40 R12: ffffc90001117c50 [ 420.842525] R13: ffffc90001117c50 R14: 0000000000000078 R15: 0000000000000000 [ 420.842540] FS: 00007fe47dda0a40(0000) GS:ffff88011fb00000(0000) knlGS:0000000000000000 [ 420.842559] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 420.842571] CR2: 00007fd6c0a2cec4 CR3: 000000010a5e5000 CR4: 00000000001406e0 [ 420.842586] Call Trace: [ 420.842595] ? do_raw_spin_lock+0xad/0xb0 [ 420.842635] intel_engine_remove_wait.part.3+0x26/0x40 [i915] [ 420.842678] intel_engine_remove_wait+0xe/0x20 [i915] [ 420.842721] i915_wait_request+0x4f0/0x8c0 [i915] [ 420.842736] ? wake_up_q+0x70/0x70 [ 420.842747] ? wake_up_q+0x70/0x70 [ 420.842787] i915_gem_object_wait_fence+0x7d/0x1a0 [i915] [ 420.842829] i915_gem_object_wait+0x30d/0x520 [i915] [ 420.842842] ? __this_cpu_preempt_check+0x13/0x20 [ 420.842884] i915_gem_wait_ioctl+0x12e/0x2e0 [i915] [ 420.842924] ? i915_gem_wait_ioctl+0x22/0x2e0 [i915] [ 420.842939] drm_ioctl+0x200/0x450 [ 420.842976] ? i915_gem_set_wedged+0x90/0x90 [i915] [ 420.842993] do_vfs_ioctl+0x90/0x6e0 [ 420.843003] ? entry_SYSCALL_64_fastpath+0x5/0xb1 [ 420.843017] ? __this_cpu_preempt_check+0x13/0x20 [ 420.843030] ? trace_hardirqs_on_caller+0xe7/0x200 [ 420.843042] SyS_ioctl+0x3c/0x70 [ 420.843054] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 420.843065] RIP: 0033:0x7fe47c4b9357 [ 420.843075] RSP: 002b:00007ffc3c0633c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 420.843094] RAX: ffffffffffffffda RBX: ffffffff81482393 RCX: 00007fe47c4b9357 [ 420.843109] RDX: 00007ffc3c063400 RSI: 00000000c010646c RDI: 0000000000000004 [ 420.843123] RBP: ffffc90001117f88 R08: 0000000000000008 R09: 0000000000000000 [ 420.843137] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 420.843151] R13: 0000000000000004 R14: 00000000c010646c R15: 0000000000000000 [ 420.843168] ? __this_cpu_preempt_check+0x13/0x20 [ 420.843180] Code: 81 48 c7 c1 40 6a 16 a0 48 c7 c2 47 29 15 a0 be 17 01 00 00 48 c7 c7 10 6a 16 a0 e8 c7 ea fe e0 e9 5d ff ff ff 0f 0b 0f 0b 0f 0b <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 e8 67 41 7e e1 [ 420.843325] RIP: __intel_engine_remove_wait+0x1f4/0x200 [i915] RSP: ffffc90001117b18 Fixes: b66255f0f779 ("drm/i915: Refactor wakeup of the next breadcrumb waiter") Fixes: 67b807a89230 ("drm/i915: Delay disabling the user interrupt for breadcrumbs") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170306092916.11623-2-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_breadcrumbs.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 52150c78270db56ef5c0de0bf9d13d1d437d1236 Author: Joe Perches Date: Wed Mar 1 17:35:07 2017 -0800 HID: usbhid: Use pr_ and remove unnecessary OOM messages Use a more common logging style and remove the unnecessary OOM messages as there is default dump_stack when OOM. Miscellanea: o Hoist an assignment in an if o Realign arguments o Realign a deeply indented if descendent above a printk Signed-off-by: Joe Perches Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/usbhid/hid-core.c | 16 +++++++--------- drivers/hid/usbhid/hid-quirks.c | 11 ++++------- 2 files changed, 11 insertions(+), 16 deletions(-) commit 50842cbd3486287a5902ee9532f698fab545e4ba Author: Charles Keepax Date: Mon Feb 13 10:11:03 2017 +0000 pinctrl: Fix trivial spelling typo in a comment Signed-off-by: Charles Keepax Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a72b8c4a63e2a3375b5d3af4a2b70c172570c354 Author: Hoan Tran Date: Tue Feb 21 11:32:43 2017 -0800 gpio: dwapb: Add support for next generation of X-Gene SoC Next generation of X-Gene SoC's GPIO hardware register map is very similar to DW GPIO. It only differs by a few register addresses. This patch modifies DW GPIO driver to accommodate the difference in a few register addresses. Signed-off-by: Hoan Tran Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/gpio/gpio-dwapb.c | 91 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 74 insertions(+), 17 deletions(-) commit 933bfe4d271ef5931bc7513a1239751ed251db04 Author: Tobias Jakobi Date: Sat Feb 25 20:27:27 2017 +0100 HID: usbhid: extend polling interval configuration to joysticks For mouse devices we can currently change the polling interval via usbhid.mousepoll. Implement the same thing for joysticks, so users can reduce input latency this way. This has been tested with a Logitech RumblePad 2 with jspoll=2, resulting in a polling rate of 500Hz (verified with evhz). Signed-off-by: Tobias Jakobi Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina Documentation/admin-guide/kernel-parameters.txt | 3 +++ drivers/hid/usbhid/hid-core.c | 18 +++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) commit d3d9adfe3059cb5cb330a2da74ea0bad49b482c0 Author: Christophe JAILLET Date: Sun Feb 19 13:07:59 2017 +0100 HID: i2c-hid: Fix error handling According to error handling in this function, it is likely that some resources should be freed before returning. Replace 'return ret', with 'goto err'. While at it, remove some spaces at the beginning of the lines to be more consistent. Fixes: ead0687fe304a ("HID: i2c-hid: support regulator power on/off") Signed-off-by: Christophe JAILLET Signed-off-by: Jiri Kosina drivers/hid/i2c-hid/i2c-hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25280d9774c0bad948470e704a8dd597f7d4b245 Author: Aishwarya Pant Date: Fri Mar 3 23:50:53 2017 +0530 staging: bcm2835-audio: use min_t() macro instead of min() use min_t() macro in place of min() to replace the two typecasts of min. Change suggested by checkpatch script. Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8280337226fc45e7b84a00de5ac6e740369a342 Author: Aishwarya Pant Date: Fri Mar 3 23:47:51 2017 +0530 staging: bcm2835-audio: match alignment with open parenthesis Fix the following checkpatch warning issued on bcm2835-vchiq.c: CHECK: Alignment should match open parenthesis Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 30b3adf06dbbafad3ce724e47b16d28b3b92be20 Author: Aishwarya Pant Date: Fri Mar 3 23:47:32 2017 +0530 staging: bcm2835-audio: fix typo in word fix typo in word receives Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c05f4ad13980020f2fa5cd4d9d4c79133f9e2745 Author: Aishwarya Pant Date: Fri Mar 3 23:47:16 2017 +0530 staging: bcm2835-audio: use braces on all arms of statement Add braces on all arms of the if-else statements in bcm2835-vchiq.c to comply with kernel coding style. Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit da2ee3eeb8a4000844a2cceb2c07cb4b3ea8bb1c Author: Aishwarya Pant Date: Fri Mar 3 23:46:53 2017 +0530 staging: bcm2835-audio: remove spaces after cast Remove instances of unnecessary blank space after cast in bcm2835-vchiq.c Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 637e078eafa21b11001490f0abd0255690be2166 Author: Aishwarya Pant Date: Fri Mar 3 00:28:16 2017 +0530 staging: bcm2835-audio: replace printk(KERN_ERR...) with dev_err(...) Use dev_err(... in place of printk(KERN_ERR ... Problem found by checkpatch Signed-off-by: Aishwarya Pant Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1f52aaf8538079ab7aa950f55a55903b4ce9211c Author: Aishwarya Pant Date: Fri Mar 3 00:27:11 2017 +0530 staging: bcm2835-audio: remove extra blank line Fix the warning: Blank lines aren't necessary after an open brace '{' issued by checkpatch on bcm2835-ctl.c Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c | 1 - 1 file changed, 1 deletion(-) commit d812cd58c815421b44197daf1dbeee2c230f480a Author: Aishwarya Pant Date: Fri Mar 3 00:26:41 2017 +0530 staging: bcm2835-audio: use kernel preferred block commenting style Fix block comment formatting to suppress the following warning thrown by checkpatch: Block comments use a trailing */ on a separate line Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 01fb592f9383a405c9f061d385f434fdf207d51e Author: Aishwarya Pant Date: Fri Mar 3 00:25:56 2017 +0530 staging: bcm2835-audio: move logical continuation to the same line Keep logical continuations on the same line to improve code readability Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d561c885603910554f2dbc6f105c966b14694708 Author: Aishwarya Pant Date: Fri Mar 3 00:24:58 2017 +0530 staging: bcm2835-audio: remove space after cast Remove instances of unnecessary blank space after cast in bcm2835-ctl.c Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d793ff81879a5747109f3106bd18e77662cb5187 Author: Ping Cheng Date: Tue Feb 14 21:27:45 2017 -0800 HID: wacom: generic: support touch on/off softkey Wacom Cintiq Pro has a softkey to turn touch on/off. Since it is a softkey, hardware/firmware still reports touch events no matter what state the softkey is. We need to ignore touch events when the key is in off mode. Signed-off-by: Ping Cheng Reviewed-by: Benjamin Tissoires Tested-by: Aaron Armstrong Skomra Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 4 +++- drivers/hid/wacom_wac.c | 18 +++++++++++++++++- drivers/hid/wacom_wac.h | 2 ++ 3 files changed, 22 insertions(+), 2 deletions(-) commit 4082da80f46a6683439bb0357faadb18f0f5b2a6 Author: Benjamin Tissoires Date: Tue Feb 14 21:27:18 2017 -0800 HID: wacom: generic: add mode change touch key Wacom Cintiq Pro added a touch key to switch the tablet between display and opaque mode. This patch informs the change by removing the old devices and creating new ones with proper properties. Signed-off-by: Benjamin Tissoires Signed-off-by: Ping Cheng Tested-by: Aaron Armstrong Skomra Signed-off-by: Jiri Kosina drivers/hid/wacom.h | 5 +++++ drivers/hid/wacom_sys.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/hid/wacom_wac.c | 17 ++++++++++++++++- drivers/hid/wacom_wac.h | 4 ++++ 4 files changed, 74 insertions(+), 1 deletion(-) commit 4eb220cb35a9c4f69a2438b987bb3d509d56cc80 Author: Ping Cheng Date: Tue Feb 14 21:26:21 2017 -0800 HID: wacom: generic: add 3 tablet touch keys This patch add support to the 3 touch keys on Wacom Cintiq Pro. These touch keys are in the middle of the other two keys on the top edge of the tablet. Signed-off-by: Ping Cheng Reviewed-by: Benjamin Tissoires Tested-by: Aaron Armstrong Skomra Acked-by: Dmitry Torokhov Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 12 ++++++++++++ drivers/hid/wacom_wac.h | 3 +++ include/uapi/linux/input-event-codes.h | 1 + 3 files changed, 16 insertions(+) commit 9547837bdccb4af127528b36a73377150658b4ac Author: Tomasz Kramkowski Date: Tue Feb 14 23:14:33 2017 +0000 HID: usbhid: add quirk for innomedia INNEX GENESIS/ATARI adapter The (1292:4745) Innomedia INNEX GENESIS/ATARI adapter needs HID_QUIRK_MULTI_INPUT to split the device up into two controllers instead of inputs from both being merged into one. Signed-off-by: Tomasz Kramkowski Acked-By: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 3 +++ drivers/hid/usbhid/hid-quirks.c | 1 + 2 files changed, 4 insertions(+) commit 3f3752705dbd50b66b66ad7b4d54fe33d2f746ed Author: Valtteri Heikkilä Date: Tue Feb 14 23:14:32 2017 +0000 HID: reject input outside logical range only if null state is set This patch fixes an issue in drivers/hid/hid-input.c where USB HID control null state flag is not checked upon rejecting inputs outside logical minimum-maximum range. The check should be made according to USB HID specification 1.11, section 6.2.2.5, p.31. The fix will resolve issues with some game controllers, such as: https://bugzilla.kernel.org/show_bug.cgi?id=68621 [tk@the-tk.com: shortened and fixed spelling in commit message] Signed-off-by: Valtteri Heikkilä Signed-off-by: Tomasz Kramkowski Acked-By: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-input.c | 1 + 1 file changed, 1 insertion(+) commit 32c2aafcbffe9a5179e13dbaf68fc57b654d64d1 Author: Michael Zoran Date: Wed Mar 1 19:10:49 2017 -0800 staging: bcm2835-camera: select BCM2835_VCHIQ rather then depending on it. Change the camera's dependency on BCM2835_VCHIQ to a select since camera support is typically more important to people then base VCHIQ(which they may not even know what it's for). Also, with a dependency the camera support would not be visiable until VCHIQ is selected first, and that may not be what most people would expect. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8400dbe9da7ad5332668c0fb05e97ecfa9f5cd4c Author: Michael Zoran Date: Wed Mar 1 19:10:48 2017 -0800 staging: bcm2835-audio: select BCM2835_VCHIQ rather then depending on it. Change the audio's dependency on BCM2835_VCHIQ to a select since audio support is typically more important to people then base VCHIQ(which they may not even know what it's for). Also, with a dependency the audio support would not be visiable until VCHIQ is selected first, and that may not be what most people would expect. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6bbfe4a761583d60eb16aee3d9d2817e29167305 Author: Michael Zoran Date: Wed Mar 1 19:10:47 2017 -0800 staging: vc04_services: Create new BCM_VIDEOCORE setting for VideoCore services. Create a new memuconfig for Broadcom VideoCore services since VideoCore is a general term used by Broadcom for a large family of products that includes more then the BCM2835. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/Kconfig | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 36b4894e4a03293f20a7e34e20336f2f05b546d1 Author: Aishwarya Pant Date: Wed Mar 1 23:54:01 2017 +0530 staging: bcm2835-camera: prefer allocating memory using sizeof(*ptr) instead of sizeof(struct type name) Using sizeof(*ptr) instead of sizeof(struct type name) is more robust to errors. Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16255382204b92fd7b657e01469442e4be8d0082 Author: Narcisa Ana Maria Vasile Date: Wed Mar 1 19:27:10 2017 +0200 staging: bcm2835-camera: Replace 'uint32_t' with kernel type u32 This patch fixes the checkpatch.pl issue: CHECK: Prefer kernel type 'u32' over 'uint32_t' Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3213a6e5a88e805cbf98e665e843b563cc8349eb Author: Narcisa Ana Maria Vasile Date: Wed Mar 1 18:59:29 2017 +0200 staging: bcm2835-camera: Add spaces around '<<' This patch fixes the checkpatch.pl issue: CHECK: spaces preferred around that '<<' (ctx:VxV) Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/controls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a68eb156d2390bb92251032fc1d014c0901f9919 Author: Narcisa Ana Maria Vasile Date: Wed Mar 1 18:59:16 2017 +0200 staging: bcm2835-camera: Remove unnecessary blank lines This patch fixes the checkpatch.pl issue: CHECK: Please don't use multiple blank lines Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-encodings.h | 1 - drivers/staging/vc04_services/bcm2835-camera/mmal-msg-format.h | 1 - drivers/staging/vc04_services/bcm2835-camera/mmal-msg.h | 7 ------- drivers/staging/vc04_services/bcm2835-camera/mmal-parameters.h | 2 -- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.h | 4 ---- 5 files changed, 15 deletions(-) commit 3302603e14838b19e41c46cbc400debfe95451db Author: Narcisa Ana Maria Vasile Date: Wed Mar 1 17:37:27 2017 +0200 staging: vc04_services: bcm2835-camera: Remove unnecessary variable Instead of storing the result, make the function return directly Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 8976672736d6089ae011fda3482e30e4380276f8 Author: Vasanthakumar Thiagarajan Date: Mon Feb 27 17:04:35 2017 +0530 cfg80211: Share Channel DFS state across wiphys of same DFS domain Sharing DFS channel state across multiple wiphys (radios) could be useful with multiple radios on the system. When one radio completes CAC and markes the channel available another radio can use this information and start beaconing without really doing CAC. Whenever there is a state change in dfs channel associated to a particular wiphy the the same state change is propagated to other wiphys having the same DFS reg domain configuration. Also when a new wiphy is created the dfs channel state of other existing wiphys of same DFS domain is copied. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Johannes Berg net/wireless/chan.c | 30 ++++++++++--- net/wireless/core.c | 37 ++++++++++++++++ net/wireless/core.h | 6 +++ net/wireless/mlme.c | 10 +++++ net/wireless/reg.c | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++ net/wireless/reg.h | 22 ++++++++++ 6 files changed, 218 insertions(+), 7 deletions(-) commit 34373d12f3cbb74960a73431138ef619d857996f Author: Vasanthakumar Thiagarajan Date: Mon Feb 27 17:04:34 2017 +0530 cfg80211: Disallow moving out of operating DFS channel in non-ETSI For non-ETSI regulatory domain, CAC result on DFS channel may not be valid once moving out of that channel (as done during remain-on-channel, scannning and off-channel tx). Running CAC on an operating DFS channel after every off-channel operation will only add complexity and disturb the current link. Better do not allow any off-channel switch from a DFS operating channel in non-ETSI domain. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Johannes Berg net/wireless/nl80211.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit b35a51c7dd25a823767969e3089542d7478777e9 Author: Vasanthakumar Thiagarajan Date: Mon Feb 27 17:04:33 2017 +0530 cfg80211: Make pre-CAC results valid only for ETSI domain DFS requirement for ETSI domain (section 4.7.1.4 in ETSI EN 301 893 V1.8.1) is the only one which explicitly states that once DFS channel is marked as available afer the CAC, this channel will remain in available state even moving to a different operating channel. But the same is not explicitly stated in FCC DFS requirement. Also, Pre-CAC requriements are not explicitly mentioned in FCC requirement. Current implementation in keeping DFS channel in available state is same as described in ETSI domain. For non-ETSI DFS domain, this patch gives a grace period of 2 seconds since the completion of successful CAC before moving the channel's DFS state to 'usable' from 'available' state. The same grace period is checked against the channel's dfs_state_entered timestamp while deciding if a DFS channel is available for operation. There is a new radar event, NL80211_RADAR_PRE_CAC_EXPIRED, reported when DFS channel is moved from available to usable state after the grace period. Also make sure the DFS channel state is reset to usable once the beaconing operation on that channel is brought down (like stop_ap, leave_ibss and leave_mesh) in non-ETSI domain. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 5 +++ net/wireless/ap.c | 5 +++ net/wireless/chan.c | 101 +++++++++++++++++++++++++++++++++++++++++++ net/wireless/core.h | 10 +++++ net/wireless/ibss.c | 1 + net/wireless/mesh.c | 1 + net/wireless/mlme.c | 40 +++++++++++++---- net/wireless/reg.c | 28 ++++++++++++ net/wireless/reg.h | 14 ++++++ 9 files changed, 196 insertions(+), 9 deletions(-) commit 572d3c6444979a6a49c6b464110563f578e8dece Author: Brian Norris Date: Thu Feb 9 18:03:57 2017 -0800 HID: i2c-hid: support regulator power on/off On some boards, we need to enable a regulator before using the HID, and it's also nice to save power in suspend by disabling it. Support an optional "vdd-supply" and a companion initialization delay. Signed-off-by: Brian Norris Signed-off-by: Caesar Wang Acked-by: Benjamin Tissoires Reviewed-by: Dmitry Torokhov Cc: Jiri Kosina Cc: linux-input@vger.kernel.org Signed-off-by: Jiri Kosina drivers/hid/i2c-hid/i2c-hid.c | 42 ++++++++++++++++++++++++++++++++++++++++-- include/linux/i2c/i2c-hid.h | 6 ++++++ 2 files changed, 46 insertions(+), 2 deletions(-) commit cb5cfd91a7ae5ae355e657e5ce4931836b7665eb Author: Caesar Wang Date: Thu Feb 9 18:03:56 2017 -0800 devicetree: i2c-hid: Add regulator support Document a "vdd-supply" and an initialization delay. Can be used for powering on/off a HID. Signed-off-by: Caesar Wang Cc: Rob Herring Cc: Jiri Kosina Cc: linux-input@vger.kernel.org Signed-off-by: Brian Norris Acked-by: Rob Herring Signed-off-by: Jiri Kosina Documentation/devicetree/bindings/input/hid-over-i2c.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 765a1077c85e5f2efcc43582f80caf43a052e903 Author: Frank Praznik Date: Wed Feb 8 13:58:43 2017 -0500 HID: sony: Use LED_CORE_SUSPENDRESUME The LED subsystem provides the LED_CORE_SUSPENDRESUME flag to handle automatically turning off and restoring the state of device LEDs during suspend/resume. Use this flag instead of saving and restoring the state locally. Signed-off-by: Frank Praznik Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 45 +++++++++++++++------------------------------ 1 file changed, 15 insertions(+), 30 deletions(-) commit 7f813ce1bd103a28e2333bd97cc6782c8e2fc8a9 Author: Johannes Berg Date: Wed Nov 6 10:37:34 2013 +0100 mac80211_hwsim: report survey data for scanned channels Currently, hwsim is reporting survey data (only a fake noise floor) for the current channel. This breaks when the multi-channel support is enabled since then there's no current channel. Make the dummy implementation closer to a real one and only report data while scanning, for all the scanned channels. At other times, no survey data might be available (in real hardware) due to power- save for example. Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 73 ++++++++++++++++++++++++++++------- 1 file changed, 60 insertions(+), 13 deletions(-) commit f8f118ceaa562d5b49252ecbfd7fe1f704f4e076 Author: Ondřej Lysoněk Date: Fri Mar 3 13:45:35 2017 +0100 mac80211: Use setup_timer instead of init_timer Use setup_timer() and setup_deferrable_timer() to set the data and function timer fields. It makes the code cleaner and will allow for easier change of the timer struct internals. Signed-off-by: Ondřej Lysoněk Signed-off-by: Jiri Slaby Cc: Johannes Berg Cc: "David S. Miller" Cc: Cc: Signed-off-by: Johannes Berg net/mac80211/agg-rx.c | 12 ++++++------ net/mac80211/agg-tx.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) commit 85bbd80373a7cc9d06d3ef103b1a93d934a8da43 Author: Jouni Malinen Date: Mon Mar 6 11:56:06 2017 +0200 mac80211_hwsim: Add channel 169 (5845 MHz) This channel is defined in the IEEE 802.11 standard and available in number of countries, so extend the mac80211_hwsim channel list to cover channel 169 to enable additional testing. Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 1 + 1 file changed, 1 insertion(+) commit 91b0faa50cc12b343a6e728a90f03517d9dc6740 Author: Alan Cox Date: Mon Mar 6 11:48:30 2017 +0000 atomisp: fix __udiv warning Certain combinations of compiler and compiler options product an imx.o that calls compiler helpers for a u64 divide. Use the do_div() call instead. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/imx/imx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 34ff6c2fe366f389dbe45badb5d100bd3aa02bea Merge: cc4e33d 2df79e1 Author: Greg Kroah-Hartman Date: Mon Mar 6 13:17:21 2017 +0100 Merge tag 'iio-for-4.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First set of IIO new device support, features and cleanup for the 4.12 cycle. Quite a bit of outreachy activity here with a driver from a current intern and a number of cleanup patches as part of the next round. Getting a pull request in early this cycle as it's looking like another large cycle for IIO. New device support * adxl345 - initial device support. Note, once complete support is done the intent is to superceded the driver in input/misc. - bindings. - conversion from i2c direct calls to regmap and driver split. - spi support. * chromeos light and proximity. - new driver. * devantech srf04 ultrasonic ranger - new driver with device tree bindings. * hid temperature - new driver for environemntal temperature support from hid devices. * max30102 oximeter - new driver with device tree bindings. * st lsm6dsx - refactor and addition of device support for lsm6dsl and lsm6ds3h. Staging graduation * isl29028 including copyright notice update to reflect Brian's work. * lpc32xx_adc. * spear adc. It's not perfect and there are some datasheet disagreements, but it works and is good enough to graduate. New features * documentation - abi docs for in_proximity_sampling_frequency_available. - generalise counting direction ABI docs as a second driver is going to use them. * hid-sensor-prox - Add support for HID_USAGE_SENSOR_HUMAN_PRESENCE if used on a particular device. * isl29028 - runtime pm. * meson-saradc - switch from polling to interrupt mode and improved read_raw_sample function to avoid unnecessary loop. * tmp007 - interrupt and threshold event support. Cleanups and minor fixes * ad2s1210 - permissions to octal. * ad7192 - permissions to octal. - use BIT macro. * ad9832 - merge header definitions into source file. * ad9834 - merge header definitions into source file. * ade7753 - merge header definitions into source file. - cleanup include ordering. * ade7854 - simplify return logic. * adis16201 - merge header definitions into source file. - rename _core.c to .c as there is nothing else. * adis16203 - merge header definitions into source file. - rename _core.c to .c as there is nothing else. * adis16209 - merge header definitions into source file. - rename _core.c to .c as there is nothing else. * adis16240 - permissions to octal. - merge header definitions into source file. - rename _core.c to .c as there is nothing else. * adt7136 - permissions to octal. * cio-dac - set missing parent device. * documentation - update version numbers on sysfs ABI for counter bits that didn't quite. make 4.9. * isl29028 - mdelay to msleep. - incorrrect sleep time when taking first proximity reading. * lmp91000 - set missing parent device. * lpc32xx - Consistent prefixes for defines. - rename local state structure to _state. * max30100 - set missing parent device. * max30102 - set missing parent device. * maxim-thermocouple - set missing parent device. * meter driver header - permissions to octal. * pulsedlight-lidar-lite-v2 - set missing parent device. * quad-8 - set missing parent device. * st104 - set missing parent device. Other * Mailmap - update Matt Ranostay's email address to the Konsolko one. commit 07e88a35dcea7d606caae797dff6e82c642d3f68 Author: Jonathan Tomer Date: Wed Feb 1 11:54:57 2017 -0800 HID: Add quirk driver for NTI USB-SUN adapter These adapters allow pre-USB Sun keyboards to be connected to USB-only machines, but include the wrong maximum keycode in their report descriptor, making most of the keys present on Sun keyboards but not 101-key PC keyboards nonfunctional. This patch implements a quirk that overrides the maximum keycode in the report descriptor. Signed-off-by: Jonathan Tomer Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 6 +++++ drivers/hid/Makefile | 1 + drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 3 +++ drivers/hid/hid-nti.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 70 insertions(+) commit e1edbd44e23b4119161fe4accc967878bae93831 Author: Maarten Lankhorst Date: Tue Feb 28 15:28:48 2017 +0100 drm/i915: Complain if we take too long under vblank evasion. Instead of only complaining when we actually miss a vblank, always complain if we take longer than 100 us. This will make it easier to find cases where we potentially miss vblanks. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1488292128-14540-2-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä [mlankhorst: Add commit message.] drivers/gpu/drm/i915/intel_sprite.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 567f0792a6ad11c0c2620944b8eeb777359fb85a Author: Maarten Lankhorst Date: Tue Feb 28 15:28:47 2017 +0100 drm/i915: Move updating color management to before vblank evasion This cannot be done reliably during vblank evasasion since the color management registers are not double buffered. The original commit that moved it always during vblank evasion was wrong, so revert it to before vblank evasion again. Signed-off-by: Maarten Lankhorst Fixes: 20a34e78f0d7 ("drm/i915: Update color management during vblank evasion.") Cc: stable@vger.kernel.org # v4.7+ Link: http://patchwork.freedesktop.org/patch/msgid/1488292128-14540-1-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/intel_display.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit b23b29506ab5e817d8eac19c5a689f0e2a3140b3 Author: Geert Uytterhoeven Date: Fri Feb 17 17:10:34 2017 +0100 ARM: davinci: PM: Drop useless check for PM_SUSPEND_STANDBY As DaVinci uses the standard suspend_valid_only_mem() for its platform_suspend_ops.valid() callback, its platform_suspend_ops.enter() callback will never be called with state equal to PM_SUSPEND_STANDBY. Signed-off-by: Geert Uytterhoeven Signed-off-by: Sekhar Nori arch/arm/mach-davinci/pm.c | 1 - 1 file changed, 1 deletion(-) commit 57866ff86d578b4b4b50eff05934e17cd3eb8525 Author: Bartosz Golaszewski Date: Thu Feb 16 18:58:40 2017 +0100 ARM: davinci_all_defconfig: enable IRQ support for pca953x We need IRQs from the tca6416 expander for vpif capture to work on the da850-evm board. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 1 + 1 file changed, 1 insertion(+) commit b3119405e18ba907801f587c1a9c779cebe9cd4b Author: Bartosz Golaszewski Date: Thu Feb 16 18:58:39 2017 +0100 ARM: davinci_all_defconfig: enable VPIF display modules Enable the VPIF display module and the video encoder present on the da850-evm UI board. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit cc4e33d961276bd2e72add5188a124f51c11801d Author: Alan Cox Date: Mon Mar 6 11:21:04 2017 +0000 atomisp2: unify some ifdef cases caused by format changes The two drivers were originally merged by tools, and the tools didn't always spot white space only changes. Fix a few of them found by zero-day and clean up some more by hand. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 29 +------- .../media/atomisp/pci/atomisp2/atomisp_ioctl.c | 21 +----- .../media/atomisp/pci/atomisp2/atomisp_subdev.c | 81 +--------------------- .../media/atomisp/pci/atomisp2/atomisp_v4l2.c | 8 +-- 4 files changed, 6 insertions(+), 133 deletions(-) commit d9321a03efcda867b3a8c6327e01808516f0acd7 Author: Ander Conselvan de Oliveira Date: Mon Mar 6 10:56:51 2017 +0200 drm/i915/glk: Remove MODULE_FIRMWARE() tag from Geminilake's DMC Geminilake's DMC is not yet available in the linux-firmware repository. To prevent userspace tools such as mkinitramfs to complain about missing firmware, remove the MODULE_FIRMWARE() tag for now. Fixes: dbb28b5c3d3c ("drm/i915/DMC/GLK: Load DMC on GLK") Cc: Rodrigo Vivi Cc: Anusha Srivatsa Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: Signed-off-by: Ander Conselvan de Oliveira Acked-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170306085651.14008-1-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_csr.c | 1 - 1 file changed, 1 deletion(-) commit 6c8a9312946374947287ac1bd3b94aba850a5d1f Author: Sergei Shtylyov Date: Sun Feb 19 00:39:26 2017 +0300 clk: renesas: r8a7796: Add IMR clocks Add the IMR[0-1] clocks to the R8A7796 CPG/MSSR driver. Signed-off-by: Sergei Shtylyov [geert: Correct parent clocks] Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 2 ++ 1 file changed, 2 insertions(+) commit 7d0a7c7bdf7f849ff864a539f1c0c20b8a053f2e Author: Sergei Shtylyov Date: Tue Feb 14 00:06:04 2017 +0300 clk: renesas: r8a7795: Add IMR clocks Add the IMR[0-3] clocks to the R8A7795 CPG/MSSR driver. Based on the original (and large) patch by Konstantin Kozhevnikov . Signed-off-by: Konstantin Kozhevnikov Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7795-cpg-mssr.c | 4 ++++ 1 file changed, 4 insertions(+) commit 59c15fcd7b8f3e85baba167a3b7c0cbc692ebd90 Author: Jerome Brunet Date: Mon Feb 27 16:47:24 2017 +0100 ASoC: es7134: add dt-bindings for the es7134 dac Signed-off-by: Jerome Brunet Acked-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/everest,es7134.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 9000b59d7a12503ece61414fff3ce58773ebf033 Author: Jerome Brunet Date: Mon Feb 27 16:47:23 2017 +0100 ASoC: es7134: add es7134 DAC driver The es7134 is 24bit, 192Khz i2s DA converter for PCM audio. Datasheet is available here : http://www.everest-semi.com/pdf/ES7134LV%20DS.pdf This driver is also compatible with the es7144, which is the same as the es7134, with 2 additional pins for filtering capacitors. Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 4 ++ sound/soc/codecs/Makefile | 2 + sound/soc/codecs/es7134.c | 116 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 122 insertions(+) commit f1013cdeeeb978e3d8ef254bee1f007da4c862f3 Author: Linus Walleij Date: Tue Feb 28 15:43:43 2017 +0100 ASoC: ux500: drop platform DAI assignments This platform is completely probed by device tree nowadays, so we need to do a bigger cleanup removing all the non-DT codepaths. This cleanup must however go in as a fix since it fixes a regression. Currently when Ux500 audio is enabled, dmesg complains like this: entry->name == "prealloc" entry->name == "prealloc_max" entry->name == "prealloc" ------------[ cut here ]------------ WARNING: CPU: 0 PID: 95 at ../fs/proc/generic.c:346 proc_register+0xf0/0x110 proc_dir_entry 'sub0/prealloc' already registered (...) entry->name == "prealloc_max" ------------[ cut here ]------------ WARNING: CPU: 0 PID: 95 at ../fs/proc/generic.c:346 proc_register+0xf0/0x110 proc_dir_entry 'sub0/prealloc_max' already registered (...) snd-soc-mop500 soc:sound: ab8500-codec-dai.0 <-> 80124000.msp mapping ok entry->name == "prealloc" entry->name == "prealloc_max" entry->name == "prealloc" ------------[ cut here ]------------ WARNING: CPU: 0 PID: 95 at ../fs/proc/generic.c:346 proc_register+0xf0/0x110 proc_dir_entry 'sub0/prealloc' already registered (...) entry->name == "prealloc_max" ------------[ cut here ]------------ WARNING: CPU: 0 PID: 95 at ../fs/proc/generic.c:346 proc_register+0xf0/0x110 proc_dir_entry 'sub0/prealloc_max' already registered snd-soc-mop500 soc:sound: ab8500-codec-dai.1 <-> 80125000.msp mapping ok This is because PCMs are created twice for the same hardware, and this happens because both "platform" and "CPU" DAI links are specified. But platform/CPU is an either/or pair, not a both/and pair. This has maybe worked in the past, but it is causing trouble now, so let us begin the cleanups by removing the platform assignment and silencing the boot noise, and make a proper DT cleanup for the next kernel cycle. Cc: Ulf Hansson Cc: Lee Jones Signed-off-by: Linus Walleij Signed-off-by: Mark Brown sound/soc/ux500/mop500.c | 4 ---- 1 file changed, 4 deletions(-) commit 62c7bdc0496d6c9b6a6f683e42d949a21cb99181 Author: Maarten Lankhorst Date: Thu Feb 16 15:47:10 2017 +0100 drm/blend: Use new atomic iterator macros. There are new iterator macros that annotate whether the new or old state should be used. This is better than using a state that depends on whether it's called before or after swap. For clarity, also rename the variables from $obj_state to (old,new)_$obj_state as well. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1487256430-7625-6-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart drivers/gpu/drm/drm_blend.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit b4d93679d0eb0dd7a894726fc38d14cdf4f04cc7 Author: Maarten Lankhorst Date: Wed Mar 1 10:22:10 2017 +0100 drm/atomic: Convert get_existing_state callers to get_old/new_state, v4. This is a straightforward conversion that converts all the users of get_existing_state in atomic core to use get_old_state or get_new_state Changes since v1: - Fix using the wrong state in drm_atomic_helper_update_legacy_modeset_state. Changes since v2: - Use the correct state in disable_outputs() Changes since v3: - Rebase for link status training. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/df91a9f9-005e-bcbd-1f74-03c38e1e21dd@linux.intel.com Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart drivers/gpu/drm/drm_atomic.c | 6 ++--- drivers/gpu/drm/drm_atomic_helper.c | 47 +++++++++++++++++---------------- drivers/gpu/drm/drm_blend.c | 3 +-- drivers/gpu/drm/drm_simple_kms_helper.c | 4 +-- 4 files changed, 30 insertions(+), 30 deletions(-) commit 2107777c0249e95f9493f3341dcb4fd89b965385 Author: Maarten Lankhorst Date: Thu Feb 16 15:47:08 2017 +0100 drm/atomic: Add macros to access existing old/new state, v2. After atomic commit, these macros should be used in place of get_existing_state. Also after commit get_xx_state should no longer be used because it may not have the required locks. The calls to drm_atomic_get_existing_$obj_state should no longer be used, and converted over to these new calls. Changes since v1: - Expand commit message. - Deprecate get_existing_*_state functions in the documentation. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1487256430-7625-4-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart include/drm/drm_atomic.h | 108 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) commit 51ffa12d90baebc56eef6781233873f7ad558d54 Author: Maarten Lankhorst Date: Thu Feb 16 15:47:07 2017 +0100 drm/atomic: Make drm_atomic_plane_disabling easier to understand. This function becomes a lot simpler when having passed both the old and new state to it. Looking at all callers, it seems that old_plane_state is never NULL so the check can be dropped. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1487256430-7625-3-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart drivers/gpu/drm/drm_atomic_helper.c | 7 ++++--- drivers/gpu/drm/drm_plane_helper.c | 2 +- include/drm/drm_atomic_helper.h | 26 ++++++++------------------ 3 files changed, 13 insertions(+), 22 deletions(-) commit a03faba972cb0f9b3a46d8054e674d5492e06c38 Author: Liviu Dudau Date: Wed Mar 1 12:26:28 2017 +0000 ASoC: TLV320AIC23: Unquote NULL from control name Without this I am getting the following messages at boot on my Trimslice: tlv320aic23-codec 2-001a: Control not supported for path LLINEIN -> [NULL] -> Line Input tlv320aic23-codec 2-001a: ASoC: no dapm match for LLINEIN --> NULL --> Line Input tlv320aic23-codec 2-001a: ASoC: Failed to add route LLINEIN -> NULL -> Line Input tlv320aic23-codec 2-001a: Control not supported for path RLINEIN -> [NULL] -> Line Input tlv320aic23-codec 2-001a: ASoC: no dapm match for RLINEIN --> NULL --> Line Input tlv320aic23-codec 2-001a: ASoC: Failed to add route RLINEIN -> NULL -> Line Input tlv320aic23-codec 2-001a: Control not supported for path MICIN -> [NULL] -> Mic Input tlv320aic23-codec 2-001a: ASoC: no dapm match for MICIN --> NULL --> Mic Input tlv320aic23-codec 2-001a: ASoC: Failed to add route MICIN -> NULL -> Mic Input tegra-snd-trimslice sound: tlv320aic23-hifi <-> 70002800.i2s mapping ok Signed-off-by: Liviu Dudau Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic23.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 89433a284d2cc07ca07d4fa414485aa241fc98e2 Author: Romain Perier Date: Wed Mar 1 10:11:07 2017 +0100 ASoC: rockchip: Enable 192khz in hw_params operation As the sampling frequency is supported by es8328 in slave mode, add support for it in the corresponding operation. Signed-off-by: Romain Perier Signed-off-by: Mark Brown sound/soc/rockchip/rk3288_hdmi_analog.c | 3 +++ 1 file changed, 3 insertions(+) commit 415c3ac3f2565a7fffab1fdb5ef4f9b6bc0065f1 Author: Maarten Lankhorst Date: Wed Mar 1 10:21:26 2017 +0100 drm/atomic: Fix atomic helpers to use the new iterator macros, v3. There are new iterator macros that annotate whether the new or old state should be used. This is better than using a state that depends on whether it's called before or after swap. For clarity, also rename the variables from $obj_state to (old,new)_$obj_state as well. Changes since v1: - Use old/new_*_state for variable names as much as possible. (pinchartl) - Expand commit message. Changes since v2: - Rebase on top of link training patches. - free -> cleanup (pinchartl) Signed-off-by: Maarten Lankhorst Reviewed-by: Laurent Pinchart Link: http://patchwork.freedesktop.org/patch/msgid/aafa0d4d-474d-441f-3685-fa6c042ef37e@linux.intel.com Tested-by: Laurent Pinchart drivers/gpu/drm/drm_atomic_helper.c | 446 +++++++++++++++++++----------------- 1 file changed, 230 insertions(+), 216 deletions(-) commit 2e589fdc35c281fe1b1abe8a70004022ca504cf7 Author: Romain Perier Date: Wed Mar 1 10:11:07 2017 +0100 ASoC: rockchip: Enable 192khz in hw_params operation As the sampling frequency is supported by es8328 in slave mode, add support for it in the corresponding operation. Signed-off-by: Romain Perier Signed-off-by: Mark Brown sound/soc/rockchip/rk3288_hdmi_analog.c | 3 +++ 1 file changed, 3 insertions(+) commit 404785f9eff34086a3f67a9b5cefe6495d7b0a4a Author: Romain Perier Date: Wed Mar 1 10:11:06 2017 +0100 ASoC: es8328: Enabling support for 192k The master and slave modes don't share the same table for MCLK/LRCLK ratios. The slaves mode has bigger ratios that allow to use BCLK that matche sampling frequency of 192khz. This commit enables this rate only for slave mode, i.e it does not declare this frequency in sysclk_contraints, resulting to an error in master mode (not supported CLK). Signed-off-by: Romain Perier Signed-off-by: Mark Brown sound/soc/codecs/es8328.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c7ad841eaef66114d404c8fc02a67f5ef507b1bb Author: Romain Perier Date: Wed Mar 1 10:11:04 2017 +0100 ASoC: es8328: Simplify rates definition Currently most of the standard rates are supported by this driver. Instead of defining each supported rate one by one, we use the SND macro SNDRV_PCM_RATE_8000_48000. Also adds support for 88.2khz as the codec supports it and the sys clocks are already supported. Signed-off-by: Romain Perier Signed-off-by: Mark Brown sound/soc/codecs/es8328.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit ae884ae78a238c36e4abfdb53d4659d5fca67433 Author: Romain Perier Date: Wed Mar 1 10:11:05 2017 +0100 ASoC: es8328: Let device auto detect ratios in slave mode In master mode, SCLK and LRCLK signals are generated by the CODEC when any of the ADC/DAC are enabled. SCLK is derived from MCLK via a programmable division set by BLK_DIV, LRCLK is derived from MCLK via another programmable division set by ADCFsRatio/DACFsRatio. In slave mode, SCLK and LRCLK signals are received as inputs and supplied externally. LRCLK and SCLK must be synchronously derived from MCLK with specific rates. The device can auto detect MCLK/LRCLK ratio according to a predefined table. LRCLK/SCLK ratio is usually 64 (SCLK = 64 * LRCLK) This commits adds support to let to device auto detect and decide which ratio to use. The mclkdiv2 and BCLK_DIV ratio and put to zero. Signed-off-by: Romain Perier Signed-off-by: Mark Brown sound/soc/codecs/es8328.c | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) commit f974cf57b1b95839b224b01335c45347f746a365 Author: Dmitry Torokhov Date: Tue Feb 28 14:25:19 2017 -0800 spi: allow registering empty spi_board_info lists Many boards form list of spi_board_info entries depending on config, and it is possible to end up with empty list. Do not report error in such cases. Signed-off-by: Dmitry Torokhov Signed-off-by: Mark Brown drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 826cf175ed705f70a49d04aca832c1cc9ff048d8 Author: Dmitry Torokhov Date: Tue Feb 28 14:25:18 2017 -0800 spi: allow attaching device properties to SPI board info Generic device properties support statically defined property sets. For them to be usable, we need to attach these property sets before devices are registered and probed. Allowing to attach property list to spi_board_info structure will allow non-ACPI non-DT boards switch to using generic properties and get rid of custom platform data. Signed-off-by: Dmitry Torokhov Signed-off-by: Mark Brown drivers/spi/spi.c | 32 ++++++++++++++++++++++++++++---- include/linux/spi/spi.h | 4 ++++ 2 files changed, 32 insertions(+), 4 deletions(-) commit c8bfafb1594435889b571b79325011e8b7fd087b Author: Jens Wiklander Date: Thu May 21 07:47:09 2015 +0200 dt/bindings: add bindings for optee Introduces linaro prefix and adds bindings for ARM TrustZone based OP-TEE implementation. Acked-by: Rob Herring Signed-off-by: Jens Wiklander .../bindings/arm/firmware/linaro,optee-tz.txt | 31 ++++++++++++++++++++++ .../devicetree/bindings/vendor-prefixes.txt | 1 + 2 files changed, 32 insertions(+) commit c9d9602f36d0b4fb2ac55506cffddc797a3954fc Author: Varsha Rao Date: Sat Mar 4 22:54:09 2017 +0530 staging: media: atomisp: Replace NULL comparison. Replaced x == NULL with !x, by using the following coccinelle script: @disable is_null@ expression e; @@ -e==NULL +!e This patch fixes the checkpatch issue. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/gc0310.c | 10 +++++----- drivers/staging/media/atomisp/i2c/gc2235.c | 10 +++++----- drivers/staging/media/atomisp/i2c/ov2680.c | 10 +++++----- drivers/staging/media/atomisp/i2c/ov2722.c | 12 ++++++------ 4 files changed, 21 insertions(+), 21 deletions(-) commit da79269d98a59bd1a129577da808da08df353ffa Author: Varsha Rao Date: Sat Mar 4 22:52:07 2017 +0530 staging: media: atomisp: Fixed typo. Correct the spelling of initialize. This patch fixes the checkpatch issue. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman .../atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm.host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2289d5267b2f80a9a66c0fe41d2f9bb7c6013cd Author: Varsha Rao Date: Sat Mar 4 22:50:07 2017 +0530 staging: media: atomisp: Use unsigned int instead of unsigned. Usage of unsigned int is preferred over unsigned and this patch fixes the checkpatch issue. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman .../atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5.host.c | 6 +++--- .../atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5.host.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 0ec73c0aeea05210b50604d92850d7d4a8fa223d Author: Varsha Rao Date: Sat Mar 4 22:49:29 2017 +0530 staging: media: atomisp: Removes the FSF mailing address. This patch fixes the checkpatch issue by removing the Free Software Foundation's mailing address from the sample GPL notice. Because the FSF has changed address in the past, and may change again. Linux already includes a copy of the GPL. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/gc0310.c | 5 ----- drivers/staging/media/atomisp/i2c/gc2235.c | 5 ----- drivers/staging/media/atomisp/i2c/ov2680.c | 5 ----- drivers/staging/media/atomisp/i2c/ov2722.c | 5 ----- 4 files changed, 20 deletions(-) commit e17a17a0306db76ad487667b41e35be12bbf85e9 Author: Varsha Rao Date: Sat Mar 4 22:45:35 2017 +0530 staging: media: atomisp: Fix block comments warning. Used kernel preferred block commenting style, to fix the following checkpatch issue: WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/gc0310.c | 3 ++- drivers/staging/media/atomisp/i2c/gc2235.c | 3 ++- drivers/staging/media/atomisp/i2c/ov2680.c | 7 ++++--- drivers/staging/media/atomisp/i2c/ov2722.c | 6 ++++-- .../pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm.host.c | 6 +++--- 5 files changed, 15 insertions(+), 10 deletions(-) commit 80833c18a748f6915cd65df1105e4c75ab477d46 Author: Varsha Rao Date: Sat Mar 4 22:42:00 2017 +0530 staging: media: atomisp: Replace 'uint32_t' with kernel type u32. Replaced 'uint32_t' with kernel type u32, to fix the checkpatch issue. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman .../pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm.host.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 56b41836147bbc0dab013c3433bb2ca21ed4bff1 Author: Varsha Rao Date: Sat Mar 4 22:41:58 2017 +0530 staging: media: atomisp: Added spaces around arithmetic and bitwise operators. Added spaces around arithmetic operators (/, *, +) and bitwise operators (<<, >>), to fix the checkpatch issue. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/gc0310.c | 2 +- drivers/staging/media/atomisp/i2c/gc2235.c | 4 ++-- drivers/staging/media/atomisp/i2c/ov2680.c | 6 +++--- drivers/staging/media/atomisp/i2c/ov2722.c | 6 +++--- .../css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5.host.c | 10 +++++----- 5 files changed, 14 insertions(+), 14 deletions(-) commit 92d1765132d0c553bb11bb7c17882b3b39c2d175 Author: Varsha Rao Date: Sat Mar 4 22:34:13 2017 +0530 staging: media: atomisp: Fix line over 80 characters. Line over 80 characters are split to fix the following checkpatch issue: WARNING: line over 80 characters Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6c492211fbbb4085ebf7a8d62a9424ce2423794f Author: Varsha Rao Date: Sat Mar 4 22:34:02 2017 +0530 staging: media: atomisp: Removed unnecessary parentheses. Removed parentheses on the right hand side of assignment, as they are not required. The following coccinelle script is used to fix this issue: @@ binary operator op = {<<,>>,+,/}; local idexpression id; expression e1, e2; @@ id = -( e1 op e2 -) Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/gc0310.c | 4 ++-- drivers/staging/media/atomisp/i2c/gc2235.c | 4 ++-- drivers/staging/media/atomisp/i2c/ov2680.c | 4 ++-- drivers/staging/media/atomisp/i2c/ov2722.c | 4 ++-- drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 2 +- drivers/staging/media/atomisp/i2c/ov8858.c | 2 +- .../css2400/isp/kernels/bnlm/ia_css_bnlm.host.c | 2 +- .../isp/kernels/macc/macc1_5/ia_css_macc1_5.host.c | 2 +- .../css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a.host.c | 2 +- .../media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c | 18 +++++++++--------- 10 files changed, 22 insertions(+), 22 deletions(-) commit d89f191e0c8127813b39324440b0a82ba7a84ed8 Author: kbuild test robot Date: Wed Mar 1 22:17:49 2017 +0000 staging/atomisp: fix semicolon.cocci warnings drivers/staging/media/atomisp/pci/atomisp2/./atomisp_v4l2.c:465:2-3: Unneeded semicolon drivers/staging/media/atomisp/pci/atomisp2/./atomisp_v4l2.c:511:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Fengguang Wu Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 26ac851ba381f09425f2ebe550afbb8220e99b89 Author: kbuild test robot Date: Wed Mar 1 22:17:36 2017 +0000 staging/atomisp: fix returnvar.cocci warnings drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.c:161:5-8: Unneeded variable: "ret". Return "0" on line 163 Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci Signed-off-by: Fengguang Wu Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e407377f39f814253e3635c401f125200deae8e0 Author: kbuild test robot Date: Wed Mar 1 22:17:18 2017 +0000 staging/atomisp: fix platform_no_drv_owner.cocci warnings drivers/staging/media/atomisp/i2c/imx/../ov8858.c:2199:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/ov8858.c | 1 - 1 file changed, 1 deletion(-) commit dfb52d5ea98cf9cdefbb40612fd7e7ad2aeb2d16 Author: kbuild test robot Date: Wed Mar 1 22:17:06 2017 +0000 staging/atomisp: fix returnvar.cocci warnings drivers/staging/media/atomisp/pci/atomisp2/./atomisp_ioctl.c:560:5-8: Unneeded variable: "ret". Return "0" on line 577 Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci Signed-off-by: Fengguang Wu Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5dd3894745b947271298577779de6fcc8dd2db0e Author: kbuild test robot Date: Wed Mar 1 22:16:55 2017 +0000 staging/atomisp: fix platform_no_drv_owner.cocci warnings drivers/staging/media/atomisp/platform/clock/vlv2_plat_clock.c:248:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/platform/clock/vlv2_plat_clock.c | 1 - 1 file changed, 1 deletion(-) commit 2d6dcdefa54a27822b9aa48f0351183a1b286d61 Author: kbuild test robot Date: Wed Mar 1 22:16:43 2017 +0000 staging/atomisp: fix platform_no_drv_owner.cocci warnings drivers/staging/media/atomisp/i2c/ov2722.c:1352:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/ov2722.c | 1 - 1 file changed, 1 deletion(-) commit bd2e36a1bdba980aea779147b66432e8c1122c5c Author: kbuild test robot Date: Wed Mar 1 22:16:32 2017 +0000 staging/atomisp: fix platform_no_drv_owner.cocci warnings drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:2066:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 1 - 1 file changed, 1 deletion(-) commit ab1b7229781bedb5450fcbc95e0228d7fb26f7a3 Author: kbuild test robot Date: Wed Mar 1 22:16:18 2017 +0000 staging/atomisp: fix platform_no_drv_owner.cocci warnings drivers/staging/media/atomisp/i2c/lm3554.c:986:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/lm3554.c | 1 - 1 file changed, 1 deletion(-) commit a24d389323b51f2f7c79c0db791ea7423f1f6d49 Author: kbuild test robot Date: Wed Mar 1 22:16:07 2017 +0000 staging/atomisp: fix platform_no_drv_owner.cocci warnings drivers/staging/media/atomisp/i2c/mt9m114.c:1946:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/mt9m114.c | 1 - 1 file changed, 1 deletion(-) commit bbe022f77d3f0213b5f8660d5ddfeeea871de5d7 Author: kbuild test robot Date: Wed Mar 1 22:15:56 2017 +0000 staging/atomisp: fix platform_no_drv_owner.cocci warnings drivers/staging/media/atomisp/i2c/gc0310.c:1470:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/gc0310.c | 1 - 1 file changed, 1 deletion(-) commit 56f25569873d9a7232f0c8fd440874431cdff504 Author: kbuild test robot Date: Wed Mar 1 22:15:46 2017 +0000 staging/atomisp: fix platform_no_drv_owner.cocci warnings drivers/staging/media/atomisp/i2c/imx/imx.c:2486:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/imx/imx.c | 1 - 1 file changed, 1 deletion(-) commit 77d39d6f01af4144dff8473ca3d615769ed94e75 Author: kbuild test robot Date: Wed Mar 1 22:15:33 2017 +0000 staging/atomisp: fix platform_no_drv_owner.cocci warnings drivers/staging/media/atomisp/i2c/gc2235.c:1208:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/gc2235.c | 1 - 1 file changed, 1 deletion(-) commit a0a0a380692937d541e61bee4e90d97a96b21e3a Author: kbuild test robot Date: Wed Mar 1 22:15:19 2017 +0000 staging/atomisp: fix platform_no_drv_owner.cocci warnings drivers/staging/media/atomisp/i2c/ap1302.c:1250:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/i2c/ap1302.c | 1 - 1 file changed, 1 deletion(-) commit 41e596a1fcd9988d041d663cf5ac51188a451be5 Author: Greg Kroah-Hartman Date: Mon Mar 6 11:09:02 2017 +0100 staging: media: atomisp: handle sched.h breakup This fixes a build issue where sched.h changed around a bit in 4.11-rc1. Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cba8638f9daf898fce118b70b5128d81a7daf235 Author: Patrice Chotard Date: Mon Feb 20 14:00:30 2017 +0100 ARM: dts: STiH407-family: fix spi nodes Some SPI nodes are missing #address-cells and #size-cells. This is causing warning at device tree compilation when some SPI device sub-nodes are defined. Signed-off-by: Patrice Chotard arch/arm/boot/dts/stih407-family.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 700ea5e0e0dd70420a04e703ff264cc133834cba Merge: 3dc2046 c1ae3cf Author: Mauro Carvalho Chehab Date: Mon Mar 6 06:49:34 2017 -0300 Merge tag 'v4.11-rc1' into patchwork Linux 4.11-rc1 * tag 'v4.11-rc1': (10730 commits) Linux 4.11-rc1 strparser: destroy workqueue on module exit Documentation/sphinx: fix primary_domain configuration docs: Fix htmldocs build failure doc/ko_KR/memory-barriers: Update control-dependencies section pcieaer doc: update the link Documentation: Update path to sysrq.txt sfc: fix IPID endianness in TSOv2 sfc: avoid max() in array size rds: remove unnecessary returned value check rxrpc: Fix potential NULL-pointer exception nfp: correct DMA direction in XDP DMA sync nfp: don't tell FW about the reserved buffer space net: ethernet: bgmac: mac address change bug net: ethernet: bgmac: init sequence bug xen-netback: don't vfree() queues under spinlock xen-netback: keep a local pointer for vif in backend_disconnect() netfilter: nf_tables: don't call nfnetlink_set_err() if nfnetlink_send() fails netfilter: nft_set_rbtree: incorrect assumption on lower interval lookups netfilter: nf_conntrack_sip: fix wrong memory initialisation ... commit b0f0daa8fe9e74b85f6360288d38224ad1c2f2f4 Author: Priit Laes Date: Thu Mar 2 22:55:27 2017 +0200 clk: sunxi-ng: sun5i: Fix mux width for csi clock Mux for CSI clock is 3 bits, not 2. Signed-off-by: Priit Laes Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun5i.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05c04bef445d695917fe74422e05352b1b46f3c8 Author: Peter Robinson Date: Thu Mar 2 17:43:57 2017 +0000 clk: sunxi-ng: tighten SoC deps on explicit AllWinner SoCs Tighten the depends on the various AllWinn SoCs so we don't inadvertantly get clock drivers when we're not wanting them like 32 bit SoC clocks for 64 bit configs. Ensure there's still test coverage though. Signed-off-by: Peter Robinson Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9be1c8afb4926aee043d48493c0474c0eea56540 Author: Icenowy Zheng Date: Thu Mar 2 04:13:39 2017 +0800 clk: sunxi-ng: add Allwinner H5 CCU support for H3 CCU driver Allwinner H5 is a SoC that features a design which keeps the peripheral compatible with H3, so that it have also a CCU like the one on H3 -- only one bus gate/reset is added, and the mmc sample/output phases are removed because of MMC controller update. Add its support in our existing H3 CCU driver. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard .../devicetree/bindings/clock/sunxi-ccu.txt | 1 + drivers/clk/sunxi-ng/Kconfig | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 327 ++++++++++++++++++++- drivers/clk/sunxi-ng/ccu-sun8i-h3.h | 3 +- include/dt-bindings/clock/sun8i-h3-ccu.h | 5 +- include/dt-bindings/reset/sun8i-h3-ccu.h | 5 +- 6 files changed, 332 insertions(+), 11 deletions(-) commit 845d6b0ff92d2c8151892c81f2050b873d7a7ef7 Author: Chen-Yu Tsai Date: Tue Feb 14 11:35:23 2017 +0800 clk: sunxi-ng: gate: Support common pre-dividers Some clock gates have a pre-divider between the source input and the gate itself. A notable example is the HSIC 12 MHz clock found on the A83T, which has the 24 MHz main oscillator as its input, and a /2 pre-divider. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_gate.c | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 9ed2d4bc5c0c244da8851ed1200605db48408a38 Author: Geert Uytterhoeven Date: Thu Feb 9 11:18:48 2017 +0100 ARM: dts: renesas: Switch from ARCH_SHMOBILE_MULTI to ARCH_RENESAS Commit 9b5ba0df4ea4 ("ARM: shmobile: Introduce ARCH_RENESAS") started the migration from ARCH_SHMOBILE_MULTI to ARCH_RENESAS. Update the Makefile to build DTBs for Renesas platforms to use the new symbol, and move the Renesas section to preserve sort order. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/Makefile | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit ad20bb6868f1d29f9c911f14087be4f93c098604 Author: Geert Uytterhoeven Date: Wed Feb 8 19:00:44 2017 +0100 ARM: dts: r8a7745: Fix SCIFB0 dmas indentation Fixes: e0d2da54c4d01ba2 ("ARM: dts: r8a7745: add [H]SCIF{|A|B} support") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8290f9f2e1d119512e1821fc13d1d145aa23f77 Author: Geert Uytterhoeven Date: Wed Feb 8 19:00:43 2017 +0100 ARM: dts: r8a7743: Fix SCIFB0 dmas indentation Fixes: 809c013426914694 ("ARM: dts: r8a7743: add [H]SCIF{A|B} support") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d2abda02ad2d06d5f22de7f6b0f39126670bc48 Author: Chris Brandt Date: Wed Jan 25 15:28:10 2017 -0500 ARM: dts: r7s72100: update sdhi clock bindings The SDHI controller in the RZ/A1 has 2 clock sources per channel and both need to be enabled/disabled for proper operation. This fixes the fact that the define for R7S72100_CLK_SDHI1 was not correct to begin with (typo), and that all 4 clock sources need to be defined an used. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100.dtsi | 17 ++++++++++++----- include/dt-bindings/clock/r7s72100-clock.h | 6 ++++-- 2 files changed, 16 insertions(+), 7 deletions(-) commit 58e7696e0e3c085804fb6754a7dadf7267d0fa77 Author: Simon Horman Date: Thu Jan 26 09:52:26 2017 +0100 arm64: defconfig: Enable SH Mobile I2C controller Enable SH Mobile I2C controller for use on R-Car Gen3 SoCs. Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit ef3f08c83fd186ab4bbad6a6250c5a347fbf6551 Author: Kazuya Mizuguchi Date: Wed Feb 1 09:42:04 2017 +0100 arm64: dts: r8a7796: salvator-x: Fix EthernetAVB PHY timing Set PHY rxc-skew-ps to 1500 and all other values to their default values. This is intended to to address failures in the case of 1Gbps communication using the by salvator-x board with the KSZ9031RNX phy. This has been reported to occur with both the r8a7795 (H3) and r8a7796 (M3-W) SoCs. Signed-off-by: Kazuya Mizuguchi Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 325f39010b431f6a1ece74d69f10dcca2329c08d Author: Kazuya Mizuguchi Date: Wed Feb 1 09:42:03 2017 +0100 arm64: dts: r8a7796: Use rgmii-txid phy-mode for EthernetAVB Since commit 61fccb2d6274 ("ravb: Add tx and rx clock internal delays mode of APSR") the EthernetAVB driver enables tx and rx clock internal delay modes (TDM and RDM) depending on the phy mode as follows: phy mode | ASPR delay mode -----------+---------------- rgmii-id | TDM and RDM rgmii-rxid | RDM rgmii-txid | TDM And prior to the above commit no internal delay mode settings were implemented for any phy mode. With this and the above change present tx internal delay mode is enabled which has been observed to address failures in the case of 1Gbps communication using the by salvator-x board with the KSZ9031RNX phy. This has been reported to occur with both the r8a7795 (H3) and r8a7796 (M3-W) SoCs. With the above patch present but this patch present tx and rx internal delay modes are enabled; and with the above patch and this present absent no internal delay modes are enabled. In both cases failures have been observed when using 1Gbps communication in the environments described above. Signed-off-by: Kazuya Mizuguchi Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b9fd1962f605a31842371471e559407c293131f Author: Vladimir Barinov Date: Wed Feb 1 09:42:02 2017 +0100 arm64: dts: h3ulcb: Fix EthernetAVB PHY timing Set PHY rxc-skew-ps to 1500 and all other values to their default values. This is intended to to address failures in the case of 1Gbps communication using the by h3ulcb board with the KSZ9031RNX phy. Signed-off-by: Vladimir Barinov Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 0e45da1c6ea6b18616d95c697ecd6234bc504ef6 Author: Kazuya Mizuguchi Date: Wed Feb 1 09:42:01 2017 +0100 arm64: dts: r8a7795: salvator-x: Fix EthernetAVB PHY timing Set PHY rxc-skew-ps to 1500 and all other values to their default values. This is intended to to address failures in the case of 1Gbps communication using the by salvator-x board with the KSZ9031RNX phy. This has been reported to occur with both the r8a7795 (H3) and r8a7796 (M3-W) SoCs. Signed-off-by: Kazuya Mizuguchi Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit dda3887907d743385f2599fa18c765bd295ae2da Author: Kazuya Mizuguchi Date: Wed Feb 1 09:42:00 2017 +0100 arm64: dts: r8a7795: Use rgmii-txid phy-mode for EthernetAVB Since commit 61fccb2d6274 ("ravb: Add tx and rx clock internal delays mode of APSR") the EthernetAVB driver enables tx and rx clock internal delay modes (TDM and RDM) depending on the phy mode as follows: phy mode | ASPR delay mode -----------+---------------- rgmii-id | TDM and RDM rgmii-rxid | RDM rgmii-txid | TDM And prior to the above commit no internal delay mode settings were implemented for any phy mode. With this and the above change present tx internal delay mode is enabled which has been observed to address failures in the case of 1Gbps communication using the by salvator-x board with the KSZ9031RNX phy. This has been reported to occur with both the r8a7795 (H3) and r8a7796 (M3-W) SoCs. With the above patch present but this patch present tx and rx internal delay modes are enabled; and with the above patch and this present absent no internal delay modes are enabled. In both cases failures have been observed when using 1Gbps communication in the environments described above. Signed-off-by: Kazuya Mizuguchi Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a262d66224c4c34bc2bee16d4d37d460a738788c Author: Vladimir Barinov Date: Thu Jan 26 18:13:52 2017 +0300 arm64: dts: h3ulcb: Update memory node to 4 GiB map This patch adds memory region: - After changes, the H3ULCB board has the following map: Bank0: 1GiB RAM : 0x000048000000 -> 0x0007fffffff Bank1: 1GiB RAM : 0x000500000000 -> 0x0053fffffff Bank2: 1GiB RAM : 0x000600000000 -> 0x0063fffffff Bank3: 1GiB RAM : 0x000700000000 -> 0x0073fffffff - Before changes, the old map looked like this: Bank0: 1GiB RAM : 0x000048000000 -> 0x0007fffffff Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 006ced572a3b2247639ce06443aff00704888001 Author: Keita Kobayashi Date: Thu Jan 26 09:52:30 2017 +0100 arm64: dts: r8a7795: salvator-x: Enable I2C for DVFS device This patch enables I2C for DVFS device for for Salvator-X board on R8A7795 SoC. Signed-off-by: Keita Kobayashi Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 4 ++++ 1 file changed, 4 insertions(+) commit d7e0d64a46f97f67ecbc0194ce6a394f512109c5 Author: Keita Kobayashi Date: Thu Jan 26 09:52:29 2017 +0100 arm64: dts: r8a7795: Add I2C for DVFS core to dtsi This patch adds I2C for DVFS device support for R8A7795 SoC. Signed-off-by: Keita Kobayashi Signed-off-by: Gaku Inami Signed-off-by: Dien Pham Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a7795.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit d8e62f0729bb404caa6ba42b65d5a1e4d370a6e3 Author: Dien Pham Date: Thu Jan 26 09:52:28 2017 +0100 arm64: dts: r8a7796: salvator-x: Add I2C for DVFS device support This patch adds support of I2C for DVFS device for Salvator-X board on R8A7796 SoC. Signed-off-by: Dien Pham Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 0fb1fd20043f619e444720062e61cdc40130c0c5 Author: Dien Pham Date: Thu Jan 26 09:52:27 2017 +0100 arm64: dts: r8a7796: Add I2C for DVFS device node This patch adds I2C for DVFS device node for R8A7796 SoC. Signed-off-by: Dien Pham Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a7796.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit a49d25364dfb9f8a64037488a39ab1f56c5fa419 Author: Alan Cox Date: Fri Feb 17 16:55:17 2017 +0000 staging/atomisp: Add support for the Intel IPU v2 This patch adds support for the Intel IPU v2 as found on Android and IoT Baytrail-T and Baytrail-CR platforms (those with the IPU PCI mapped). You will also need the firmware files from your device (Android usually puts them into /etc) - or you can find them in the downloadable restore/upgrade kits if you blew them away for some reason. It may be possible to extend the driver to handle the BYT/T windows platforms such as the ASUS T100TA. These platforms don't expose the IPU via the PCI interface but via ACPI buried in the GPU description and with the camera information somewhere unknown so would need a platform driver interface adding to the codebase *IFF* the firmware works on such devices. To get good results you also need a suitable support library such as libxcam. The camera is intended to be driven from Android so it has a lot of features that many desktop apps don't fully spport. In theory all the pieces are there to build it with -DISP2401 and some differing files to get CherryTrail/T support, but unifying the drivers properlly is a work in progress. The IPU driver represents the work of a lot of people within Intel over many years. It's historical goal was portability rather than Linux upstream. Any queries about the upstream aimed driver should be sent to me not to the original authors. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/staging/media/Kconfig | 1 + drivers/staging/media/Makefile | 1 + drivers/staging/media/atomisp/Kconfig | 11 + drivers/staging/media/atomisp/Makefile | 8 + drivers/staging/media/atomisp/TODO | 64 + drivers/staging/media/atomisp/i2c/Kconfig | 105 + drivers/staging/media/atomisp/i2c/Makefile | 23 + drivers/staging/media/atomisp/i2c/ap1302.c | 1262 ++ drivers/staging/media/atomisp/i2c/ap1302.h | 198 + drivers/staging/media/atomisp/i2c/gc0310.c | 1495 +++ drivers/staging/media/atomisp/i2c/gc0310.h | 459 + drivers/staging/media/atomisp/i2c/gc2235.c | 1233 ++ drivers/staging/media/atomisp/i2c/gc2235.h | 672 ++ drivers/staging/media/atomisp/i2c/imx/Kconfig | 9 + drivers/staging/media/atomisp/i2c/imx/Makefile | 8 + drivers/staging/media/atomisp/i2c/imx/ad5816g.c | 225 + drivers/staging/media/atomisp/i2c/imx/ad5816g.h | 49 + drivers/staging/media/atomisp/i2c/imx/common.h | 65 + drivers/staging/media/atomisp/i2c/imx/drv201.c | 218 + drivers/staging/media/atomisp/i2c/imx/drv201.h | 38 + drivers/staging/media/atomisp/i2c/imx/dw9714.c | 235 + drivers/staging/media/atomisp/i2c/imx/dw9714.h | 63 + drivers/staging/media/atomisp/i2c/imx/dw9718.c | 238 + drivers/staging/media/atomisp/i2c/imx/dw9718.h | 64 + drivers/staging/media/atomisp/i2c/imx/dw9719.c | 209 + drivers/staging/media/atomisp/i2c/imx/dw9719.h | 58 + drivers/staging/media/atomisp/i2c/imx/imx.c | 2510 ++++ drivers/staging/media/atomisp/i2c/imx/imx.h | 766 ++ drivers/staging/media/atomisp/i2c/imx/imx132.h | 566 + drivers/staging/media/atomisp/i2c/imx/imx134.h | 2464 ++++ drivers/staging/media/atomisp/i2c/imx/imx135.h | 3374 ++++++ drivers/staging/media/atomisp/i2c/imx/imx175.h | 1959 ++++ drivers/staging/media/atomisp/i2c/imx/imx208.h | 550 + drivers/staging/media/atomisp/i2c/imx/imx219.h | 227 + drivers/staging/media/atomisp/i2c/imx/imx227.h | 726 ++ drivers/staging/media/atomisp/i2c/imx/otp.c | 39 + .../media/atomisp/i2c/imx/otp_brcc064_e2prom.c | 81 + drivers/staging/media/atomisp/i2c/imx/otp_e2prom.c | 90 + drivers/staging/media/atomisp/i2c/imx/otp_imx.c | 191 + drivers/staging/media/atomisp/i2c/imx/vcm.c | 45 + .../staging/media/atomisp/i2c/libmsrlisthelper.c | 209 + drivers/staging/media/atomisp/i2c/lm3554.c | 1010 ++ drivers/staging/media/atomisp/i2c/mt9m114.c | 1969 ++++ drivers/staging/media/atomisp/i2c/mt9m114.h | 1786 +++ drivers/staging/media/atomisp/i2c/ov2680.c | 1562 +++ drivers/staging/media/atomisp/i2c/ov2680.h | 940 ++ drivers/staging/media/atomisp/i2c/ov2722.c | 1377 +++ drivers/staging/media/atomisp/i2c/ov2722.h | 1267 ++ drivers/staging/media/atomisp/i2c/ov5693/Kconfig | 11 + drivers/staging/media/atomisp/i2c/ov5693/Makefile | 3 + drivers/staging/media/atomisp/i2c/ov5693/ad5823.h | 67 + drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 2090 ++++ drivers/staging/media/atomisp/i2c/ov5693/ov5693.h | 1381 +++ drivers/staging/media/atomisp/i2c/ov8858.c | 2224 ++++ drivers/staging/media/atomisp/i2c/ov8858.h | 1482 +++ drivers/staging/media/atomisp/i2c/ov8858_btns.h | 1284 +++ .../atomisp/include/asm/intel_mid_pcihelpers.h | 37 + .../staging/media/atomisp/include/linux/atomisp.h | 1367 +++ .../atomisp/include/linux/atomisp_gmin_platform.h | 40 + .../media/atomisp/include/linux/atomisp_platform.h | 262 + .../media/atomisp/include/linux/intel_mid_pm.h | 233 + .../media/atomisp/include/linux/libmsrlisthelper.h | 32 + .../media/atomisp/include/linux/vlv2_plat_clock.h | 30 + .../staging/media/atomisp/include/media/lm3554.h | 136 + .../staging/media/atomisp/include/media/lm3642.h | 153 + drivers/staging/media/atomisp/pci/Kconfig | 13 + drivers/staging/media/atomisp/pci/Makefile | 5 + .../staging/media/atomisp/pci/atomisp2/Makefile | 380 + .../media/atomisp/pci/atomisp2/atomisp-regs.h | 209 + .../media/atomisp/pci/atomisp2/atomisp_acc.c | 610 + .../media/atomisp/pci/atomisp2/atomisp_acc.h | 124 + .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 6804 +++++++++++ .../media/atomisp/pci/atomisp2/atomisp_cmd.h | 457 + .../media/atomisp/pci/atomisp2/atomisp_common.h | 79 + .../media/atomisp/pci/atomisp2/atomisp_compat.h | 669 ++ .../atomisp/pci/atomisp2/atomisp_compat_css20.c | 4800 ++++++++ .../atomisp/pci/atomisp2/atomisp_compat_css20.h | 282 + .../atomisp/pci/atomisp2/atomisp_compat_ioctl32.c | 1263 ++ .../atomisp/pci/atomisp2/atomisp_compat_ioctl32.h | 369 + .../media/atomisp/pci/atomisp2/atomisp_csi2.c | 446 + .../media/atomisp/pci/atomisp2/atomisp_csi2.h | 61 + .../atomisp/pci/atomisp2/atomisp_dfs_tables.h | 416 + .../media/atomisp/pci/atomisp2/atomisp_drvfs.c | 218 + .../media/atomisp/pci/atomisp2/atomisp_drvfs.h | 29 + .../media/atomisp/pci/atomisp2/atomisp_file.c | 245 + .../media/atomisp/pci/atomisp2/atomisp_file.h | 47 + .../media/atomisp/pci/atomisp2/atomisp_fops.c | 1304 +++ .../media/atomisp/pci/atomisp2/atomisp_fops.h | 54 + .../media/atomisp/pci/atomisp2/atomisp_helper.h | 33 + .../media/atomisp/pci/atomisp2/atomisp_internal.h | 331 + .../media/atomisp/pci/atomisp2/atomisp_ioctl.c | 3151 +++++ .../media/atomisp/pci/atomisp2/atomisp_ioctl.h | 73 + .../media/atomisp/pci/atomisp2/atomisp_subdev.c | 1516 +++ .../media/atomisp/pci/atomisp2/atomisp_subdev.h | 471 + .../media/atomisp/pci/atomisp2/atomisp_tables.h | 191 + .../media/atomisp/pci/atomisp2/atomisp_tpg.c | 181 + .../media/atomisp/pci/atomisp2/atomisp_tpg.h | 42 + .../atomisp/pci/atomisp2/atomisp_trace_event.h | 133 + .../media/atomisp/pci/atomisp2/atomisp_v4l2.c | 1649 +++ .../media/atomisp/pci/atomisp2/atomisp_v4l2.h | 44 + .../media/atomisp/pci/atomisp2/css2400/Makefile | 4 + .../base/circbuf/interface/ia_css_circbuf.h | 386 + .../base/circbuf/interface/ia_css_circbuf_comm.h | 56 + .../base/circbuf/interface/ia_css_circbuf_desc.h | 170 + .../atomisp2/css2400/base/circbuf/src/circbuf.c | 334 + .../base/refcount/interface/ia_css_refcount.h | 83 + .../atomisp2/css2400/base/refcount/src/refcount.c | 281 + .../camera/pipe/interface/ia_css_pipe_binarydesc.h | 297 + .../camera/pipe/interface/ia_css_pipe_stagedesc.h | 52 + .../camera/pipe/interface/ia_css_pipe_util.h | 39 + .../css2400/camera/pipe/src/pipe_binarydesc.c | 883 ++ .../css2400/camera/pipe/src/pipe_stagedesc.c | 115 + .../atomisp2/css2400/camera/pipe/src/pipe_util.c | 51 + .../css2400/camera/util/interface/ia_css_util.h | 141 + .../pci/atomisp2/css2400/camera/util/src/util.c | 227 + .../ia_css_isp_configs.c | 360 + .../ia_css_isp_configs.h | 189 + .../ia_css_isp_params.c | 3238 ++++++ .../ia_css_isp_params.h | 399 + .../ia_css_isp_states.c | 217 + .../ia_css_isp_states.h | 74 + .../atomisp2/css2400/css_2400_system/hrt/bits.h | 104 + .../css2400/css_2400_system/hrt/cell_params.h | 42 + .../hrt/css_receiver_2400_common_defs.h | 200 + .../css_2400_system/hrt/css_receiver_2400_defs.h | 258 + .../atomisp2/css2400/css_2400_system/hrt/defs.h | 36 + .../css2400/css_2400_system/hrt/dma_v2_defs.h | 199 + .../css2400/css_2400_system/hrt/gdc_v2_defs.h | 170 + .../css2400/css_2400_system/hrt/gp_regs_defs.h | 22 + .../css2400/css_2400_system/hrt/gp_timer_defs.h | 36 + .../css2400/css_2400_system/hrt/gpio_block_defs.h | 42 + .../css_2400_system/hrt/hive_isp_css_defs.h | 416 + .../hrt/hive_isp_css_host_ids_hrt.h | 84 + .../hrt/hive_isp_css_irq_types_hrt.h | 72 + .../hrt/hive_isp_css_streaming_to_mipi_types_hrt.h | 26 + .../css2400/css_2400_system/hrt/hive_types.h | 128 + .../atomisp2/css2400/css_2400_system/hrt/if_defs.h | 22 + .../hrt/input_formatter_subsystem_defs.h | 53 + .../css_2400_system/hrt/input_selector_defs.h | 89 + .../css_2400_system/hrt/input_switch_2400_defs.h | 30 + .../css_2400_system/hrt/input_system_ctrl_defs.h | 254 + .../css_2400_system/hrt/input_system_defs.h | 126 + .../css_2400_system/hrt/irq_controller_defs.h | 28 + .../css_2400_system/hrt/isp2400_mamoiada_params.h | 258 + .../css2400/css_2400_system/hrt/isp2400_support.h | 38 + .../css_2400_system/hrt/isp_acquisition_defs.h | 234 + .../css2400/css_2400_system/hrt/isp_capture_defs.h | 310 + .../css2400/css_2400_system/hrt/mmu_defs.h | 23 + .../hrt/scalar_processor_2400_params.h | 20 + .../atomisp2/css2400/css_2400_system/hrt/sp_hrt.h | 24 + .../css2400/css_2400_system/hrt/str2mem_defs.h | 39 + .../css_2400_system/hrt/streaming_to_mipi_defs.h | 28 + .../css_2400_system/hrt/timed_controller_defs.h | 22 + .../pci/atomisp2/css2400/css_2400_system/hrt/var.h | 99 + .../atomisp2/css2400/css_2400_system/hrt/version.h | 20 + .../atomisp2/css2400/css_2400_system/spmem_dump.c | 3634 ++++++ .../css2400/css_2401_csi2p_system/csi_rx_global.h | 63 + .../ia_css_isp_configs.c | 360 + .../ia_css_isp_configs.h | 189 + .../ia_css_isp_params.c | 3239 ++++++ .../ia_css_isp_params.h | 399 + .../ia_css_isp_states.c | 218 + .../ia_css_isp_states.h | 74 + .../css2400/css_2401_csi2p_system/host/csi_rx.c | 41 + .../css_2401_csi2p_system/host/csi_rx_local.h | 61 + .../css_2401_csi2p_system/host/csi_rx_private.h | 282 + .../css2400/css_2401_csi2p_system/host/ibuf_ctrl.c | 22 + .../css_2401_csi2p_system/host/ibuf_ctrl_local.h | 58 + .../css_2401_csi2p_system/host/ibuf_ctrl_private.h | 233 + .../host/input_system_local.h | 106 + .../host/input_system_private.h | 128 + .../css2400/css_2401_csi2p_system/host/isys_dma.c | 40 + .../css_2401_csi2p_system/host/isys_dma_local.h | 20 + .../css_2401_csi2p_system/host/isys_dma_private.h | 60 + .../css2400/css_2401_csi2p_system/host/isys_irq.c | 39 + .../css_2401_csi2p_system/host/isys_irq_local.h | 35 + .../css_2401_csi2p_system/host/isys_irq_private.h | 108 + .../css_2401_csi2p_system/host/isys_stream2mmio.c | 21 + .../host/isys_stream2mmio_local.h | 36 + .../host/isys_stream2mmio_private.h | 168 + .../css_2401_csi2p_system/host/pixelgen_local.h | 50 + .../css_2401_csi2p_system/host/pixelgen_private.h | 164 + .../css_2401_csi2p_system/host/system_local.h | 381 + .../hrt/PixelGen_SysBlock_defs.h | 126 + .../css2400/css_2401_csi2p_system/hrt/bits.h | 104 + .../css_2401_csi2p_system/hrt/cell_params.h | 42 + .../hrt/css_receiver_2400_common_defs.h | 200 + .../hrt/css_receiver_2400_defs.h | 258 + .../css2400/css_2401_csi2p_system/hrt/defs.h | 36 + .../css_2401_csi2p_system/hrt/dma_v2_defs.h | 199 + .../css_2401_csi2p_system/hrt/gdc_v2_defs.h | 170 + .../css_2401_csi2p_system/hrt/gp_regs_defs.h | 22 + .../css_2401_csi2p_system/hrt/gp_timer_defs.h | 36 + .../css_2401_csi2p_system/hrt/gpio_block_defs.h | 42 + .../hrt/hive_isp_css_2401_irq_types_hrt.h | 68 + .../css_2401_csi2p_system/hrt/hive_isp_css_defs.h | 435 + .../hrt/hive_isp_css_host_ids_hrt.h | 119 + .../hrt/hive_isp_css_streaming_to_mipi_types_hrt.h | 26 + .../css2400/css_2401_csi2p_system/hrt/hive_types.h | 128 + .../css_2401_csi2p_system/hrt/ibuf_cntrl_defs.h | 138 + .../css2400/css_2401_csi2p_system/hrt/if_defs.h | 22 + .../hrt/input_formatter_subsystem_defs.h | 53 + .../hrt/input_selector_defs.h | 89 + .../hrt/input_switch_2400_defs.h | 30 + .../hrt/input_system_ctrl_defs.h | 254 + .../css_2401_csi2p_system/hrt/input_system_defs.h | 126 + .../hrt/irq_controller_defs.h | 28 + .../css_2401_csi2p_system/hrt/isp2400_support.h | 38 + .../hrt/isp2401_mamoiada_params.h | 258 + .../hrt/isp_acquisition_defs.h | 234 + .../css_2401_csi2p_system/hrt/isp_capture_defs.h | 310 + .../hrt/mipi_backend_common_defs.h | 210 + .../css_2401_csi2p_system/hrt/mipi_backend_defs.h | 215 + .../css2400/css_2401_csi2p_system/hrt/mmu_defs.h | 23 + .../css_2401_csi2p_system/hrt/rx_csi_defs.h | 175 + .../hrt/scalar_processor_2400_params.h | 20 + .../css2400/css_2401_csi2p_system/hrt/sp_hrt.h | 24 + .../css_2401_csi2p_system/hrt/str2mem_defs.h | 39 + .../css_2401_csi2p_system/hrt/stream2mmio_defs.h | 71 + .../hrt/streaming_to_mipi_defs.h | 28 + .../hrt/timed_controller_defs.h | 22 + .../css2400/css_2401_csi2p_system/hrt/var.h | 99 + .../css2400/css_2401_csi2p_system/hrt/version.h | 20 + .../css_2401_csi2p_system/ibuf_ctrl_global.h | 80 + .../css_2401_csi2p_system/input_system_global.h | 206 + .../css_2401_csi2p_system/isys_dma_global.h | 87 + .../css_2401_csi2p_system/isys_irq_global.h | 35 + .../isys_stream2mmio_global.h | 39 + .../css_2401_csi2p_system/pixelgen_global.h | 91 + .../css2400/css_2401_csi2p_system/spmem_dump.c | 3686 ++++++ .../css2400/css_2401_csi2p_system/system_global.h | 458 + .../ia_css_isp_configs.c | 360 + .../ia_css_isp_configs.h | 189 + .../ia_css_isp_params.c | 3239 ++++++ .../ia_css_isp_params.h | 399 + .../ia_css_isp_states.c | 218 + .../ia_css_isp_states.h | 74 + .../atomisp2/css2400/css_2401_system/hrt/bits.h | 104 + .../css2400/css_2401_system/hrt/cell_params.h | 42 + .../hrt/css_receiver_2400_common_defs.h | 200 + .../css_2401_system/hrt/css_receiver_2400_defs.h | 258 + .../atomisp2/css2400/css_2401_system/hrt/defs.h | 36 + .../css2400/css_2401_system/hrt/dma_v2_defs.h | 199 + .../css2400/css_2401_system/hrt/gdc_v2_defs.h | 170 + .../css2400/css_2401_system/hrt/gp_regs_defs.h | 22 + .../css2400/css_2401_system/hrt/gp_timer_defs.h | 36 + .../css2400/css_2401_system/hrt/gpio_block_defs.h | 42 + .../hrt/hive_isp_css_2401_irq_types_hrt.h | 69 + .../css_2401_system/hrt/hive_isp_css_defs.h | 435 + .../hrt/hive_isp_css_host_ids_hrt.h | 119 + .../hrt/hive_isp_css_streaming_to_mipi_types_hrt.h | 26 + .../css2400/css_2401_system/hrt/hive_types.h | 128 + .../atomisp2/css2400/css_2401_system/hrt/if_defs.h | 22 + .../hrt/input_formatter_subsystem_defs.h | 53 + .../css_2401_system/hrt/input_selector_defs.h | 89 + .../css_2401_system/hrt/input_switch_2400_defs.h | 30 + .../css_2401_system/hrt/input_system_ctrl_defs.h | 254 + .../css_2401_system/hrt/input_system_defs.h | 126 + .../css_2401_system/hrt/irq_controller_defs.h | 28 + .../css2400/css_2401_system/hrt/isp2400_support.h | 38 + .../css_2401_system/hrt/isp2401_mamoiada_params.h | 258 + .../css_2401_system/hrt/isp_acquisition_defs.h | 234 + .../css2400/css_2401_system/hrt/isp_capture_defs.h | 310 + .../css2400/css_2401_system/hrt/mmu_defs.h | 23 + .../hrt/scalar_processor_2400_params.h | 20 + .../atomisp2/css2400/css_2401_system/hrt/sp_hrt.h | 24 + .../css2400/css_2401_system/hrt/str2mem_defs.h | 39 + .../css_2401_system/hrt/streaming_to_mipi_defs.h | 28 + .../css_2401_system/hrt/timed_controller_defs.h | 22 + .../pci/atomisp2/css2400/css_2401_system/hrt/var.h | 99 + .../atomisp2/css2400/css_2401_system/hrt/version.h | 20 + .../atomisp2/css2400/css_2401_system/spmem_dump.c | 3634 ++++++ .../atomisp/pci/atomisp2/css2400/css_api_version.h | 673 ++ .../media/atomisp/pci/atomisp2/css2400/css_trace.h | 388 + .../css2400/hive_isp_css_common/debug_global.h | 83 + .../css2400/hive_isp_css_common/dma_global.h | 307 + .../hive_isp_css_common/event_fifo_global.h | 20 + .../hive_isp_css_common/fifo_monitor_global.h | 32 + .../css2400/hive_isp_css_common/gdc_global.h | 90 + .../css2400/hive_isp_css_common/gp_device_global.h | 85 + .../css2400/hive_isp_css_common/gp_timer_global.h | 33 + .../css2400/hive_isp_css_common/gpio_global.h | 45 + .../css2400/hive_isp_css_common/hmem_global.h | 45 + .../css2400/hive_isp_css_common/host/debug.c | 72 + .../css2400/hive_isp_css_common/host/debug_local.h | 21 + .../hive_isp_css_common/host/debug_private.h | 99 + .../css2400/hive_isp_css_common/host/dma.c | 299 + .../css2400/hive_isp_css_common/host/dma_local.h | 207 + .../css2400/hive_isp_css_common/host/dma_private.h | 41 + .../css2400/hive_isp_css_common/host/event_fifo.c | 19 + .../hive_isp_css_common/host/event_fifo_local.h | 57 + .../hive_isp_css_common/host/event_fifo_private.h | 75 + .../hive_isp_css_common/host/fifo_monitor.c | 567 + .../hive_isp_css_common/host/fifo_monitor_local.h | 99 + .../host/fifo_monitor_private.h | 79 + .../css2400/hive_isp_css_common/host/gdc.c | 127 + .../css2400/hive_isp_css_common/host/gdc_local.h | 20 + .../css2400/hive_isp_css_common/host/gdc_private.h | 20 + .../css2400/hive_isp_css_common/host/gp_device.c | 108 + .../hive_isp_css_common/host/gp_device_local.h | 143 + .../hive_isp_css_common/host/gp_device_private.h | 46 + .../css2400/hive_isp_css_common/host/gp_timer.c | 70 + .../hive_isp_css_common/host/gp_timer_local.h | 45 + .../hive_isp_css_common/host/gp_timer_private.h | 22 + .../css2400/hive_isp_css_common/host/gpio_local.h | 20 + .../hive_isp_css_common/host/gpio_private.h | 44 + .../host/hive_isp_css_ddr_hrt_modified.h | 148 + .../host/hive_isp_css_hrt_modified.h | 95 + .../css2400/hive_isp_css_common/host/hmem.c | 19 + .../css2400/hive_isp_css_common/host/hmem_local.h | 20 + .../hive_isp_css_common/host/hmem_private.h | 30 + .../hive_isp_css_common/host/input_formatter.c | 234 + .../host/input_formatter_local.h | 120 + .../host/input_formatter_private.h | 46 + .../hive_isp_css_common/host/input_system.c | 1823 +++ .../hive_isp_css_common/host/input_system_local.h | 533 + .../host/input_system_private.h | 116 + .../css2400/hive_isp_css_common/host/irq.c | 455 + .../css2400/hive_isp_css_common/host/irq_local.h | 136 + .../css2400/hive_isp_css_common/host/irq_private.h | 44 + .../css2400/hive_isp_css_common/host/isp.c | 148 + .../css2400/hive_isp_css_common/host/isp_local.h | 57 + .../css2400/hive_isp_css_common/host/isp_private.h | 169 + .../css2400/hive_isp_css_common/host/mmu.c | 50 + .../css2400/hive_isp_css_common/host/mmu_local.h | 20 + .../css2400/hive_isp_css_common/host/mmu_private.h | 44 + .../atomisp2/css2400/hive_isp_css_common/host/sp.c | 81 + .../css2400/hive_isp_css_common/host/sp_local.h | 124 + .../css2400/hive_isp_css_common/host/sp_private.h | 198 + .../hive_isp_css_common/host/system_local.h | 306 + .../css2400/hive_isp_css_common/host/timed_ctrl.c | 74 + .../hive_isp_css_common/host/timed_ctrl_local.h | 20 + .../hive_isp_css_common/host/timed_ctrl_private.h | 34 + .../css2400/hive_isp_css_common/host/vamem_local.h | 20 + .../hive_isp_css_common/host/vamem_private.h | 37 + .../css2400/hive_isp_css_common/host/vmem.c | 279 + .../css2400/hive_isp_css_common/host/vmem_local.h | 55 + .../hive_isp_css_common/host/vmem_private.h | 20 + .../hive_isp_css_common/input_formatter_global.h | 130 + .../hive_isp_css_common/input_system_global.h | 155 + .../css2400/hive_isp_css_common/irq_global.h | 45 + .../css2400/hive_isp_css_common/isp_global.h | 115 + .../css2400/hive_isp_css_common/mmu_global.h | 22 + .../css2400/hive_isp_css_common/resource_global.h | 35 + .../css2400/hive_isp_css_common/sp_global.h | 93 + .../css2400/hive_isp_css_common/system_global.h | 348 + .../hive_isp_css_common/timed_ctrl_global.h | 56 + .../css2400/hive_isp_css_common/vamem_global.h | 34 + .../css2400/hive_isp_css_common/vmem_global.h | 32 + .../css2400/hive_isp_css_common/xmem_global.h | 20 + .../css2400/hive_isp_css_include/assert_support.h | 127 + .../atomisp2/css2400/hive_isp_css_include/bamem.h | 47 + .../css2400/hive_isp_css_include/bbb_config.h | 27 + .../css2400/hive_isp_css_include/bitop_support.h | 25 + .../css2400/hive_isp_css_include/cpu_mem_support.h | 59 + .../atomisp2/css2400/hive_isp_css_include/csi_rx.h | 48 + .../atomisp2/css2400/hive_isp_css_include/debug.h | 48 + .../device_access/device_access.h | 194 + .../atomisp2/css2400/hive_isp_css_include/dma.h | 48 + .../css2400/hive_isp_css_include/error_support.h | 77 + .../css2400/hive_isp_css_include/event_fifo.h | 47 + .../css2400/hive_isp_css_include/fifo_monitor.h | 47 + .../css2400/hive_isp_css_include/gdc_device.h | 49 + .../css2400/hive_isp_css_include/gp_device.h | 47 + .../css2400/hive_isp_css_include/gp_timer.h | 47 + .../atomisp2/css2400/hive_isp_css_include/gpio.h | 47 + .../atomisp2/css2400/hive_isp_css_include/hmem.h | 47 + .../hive_isp_css_include/host/csi_rx_public.h | 135 + .../hive_isp_css_include/host/debug_public.h | 99 + .../css2400/hive_isp_css_include/host/dma_public.h | 73 + .../hive_isp_css_include/host/event_fifo_public.h | 79 + .../host/fifo_monitor_public.h | 110 + .../css2400/hive_isp_css_include/host/gdc_public.h | 59 + .../hive_isp_css_include/host/gp_device_public.h | 58 + .../hive_isp_css_include/host/gp_timer_public.h | 34 + .../hive_isp_css_include/host/gpio_public.h | 45 + .../hive_isp_css_include/host/hmem_public.h | 32 + .../hive_isp_css_include/host/ibuf_ctrl_public.h | 93 + .../host/input_formatter_public.h | 115 + .../host/input_system_public.h | 376 + .../css2400/hive_isp_css_include/host/irq_public.h | 184 + .../hive_isp_css_include/host/isp2400_config.h | 24 + .../hive_isp_css_include/host/isp2500_config.h | 29 + .../hive_isp_css_include/host/isp2600_config.h | 34 + .../hive_isp_css_include/host/isp2601_config.h | 70 + .../css2400/hive_isp_css_include/host/isp_config.h | 24 + .../css2400/hive_isp_css_include/host/isp_op1w.h | 845 ++ .../hive_isp_css_include/host/isp_op1w_types.h | 54 + .../css2400/hive_isp_css_include/host/isp_op2w.h | 675 ++ .../hive_isp_css_include/host/isp_op2w_types.h | 49 + .../hive_isp_css_include/host/isp_op_count.h | 226 + .../css2400/hive_isp_css_include/host/isp_public.h | 186 + .../hive_isp_css_include/host/isys_dma_public.h | 38 + .../hive_isp_css_include/host/isys_irq_public.h | 45 + .../hive_isp_css_include/host/isys_public.h | 37 + .../host/isys_stream2mmio_public.h | 101 + .../css2400/hive_isp_css_include/host/mmu_public.h | 82 + .../hive_isp_css_include/host/osys_public.h | 20 + .../hive_isp_css_include/host/pipeline_public.h | 18 + .../hive_isp_css_include/host/pixelgen_public.h | 79 + .../hive_isp_css_include/host/ref_vector_func.h | 1222 ++ .../host/ref_vector_func_types.h | 385 + .../css2400/hive_isp_css_include/host/sp_public.h | 223 + .../css2400/hive_isp_css_include/host/tag_public.h | 41 + .../hive_isp_css_include/host/timed_ctrl_public.h | 59 + .../hive_isp_css_include/host/vamem_public.h | 20 + .../hive_isp_css_include/host/vmem_public.h | 20 + .../css2400/hive_isp_css_include/ibuf_ctrl.h | 49 + .../css2400/hive_isp_css_include/input_formatter.h | 47 + .../css2400/hive_isp_css_include/input_system.h | 47 + .../atomisp2/css2400/hive_isp_css_include/irq.h | 47 + .../atomisp2/css2400/hive_isp_css_include/isp.h | 47 + .../css2400/hive_isp_css_include/isys_dma.h | 49 + .../css2400/hive_isp_css_include/isys_irq.h | 40 + .../hive_isp_css_include/isys_stream2mmio.h | 49 + .../css2400/hive_isp_css_include/math_support.h | 224 + .../memory_access/memory_access.h | 317 + .../css2400/hive_isp_css_include/memory_realloc.h | 38 + .../css2400/hive_isp_css_include/misc_support.h | 26 + .../css2400/hive_isp_css_include/mmu_device.h | 49 + .../atomisp2/css2400/hive_isp_css_include/mpmath.h | 330 + .../atomisp2/css2400/hive_isp_css_include/osys.h | 48 + .../css2400/hive_isp_css_include/pixelgen.h | 49 + .../hive_isp_css_include/platform_support.h | 42 + .../css2400/hive_isp_css_include/print_support.h | 45 + .../atomisp2/css2400/hive_isp_css_include/queue.h | 47 + .../css2400/hive_isp_css_include/resource.h | 48 + .../atomisp2/css2400/hive_isp_css_include/socket.h | 48 + .../pci/atomisp2/css2400/hive_isp_css_include/sp.h | 47 + .../css2400/hive_isp_css_include/storage_class.h | 36 + .../css2400/hive_isp_css_include/stream_buffer.h | 48 + .../css2400/hive_isp_css_include/string_support.h | 167 + .../css2400/hive_isp_css_include/system_types.h | 25 + .../atomisp2/css2400/hive_isp_css_include/tag.h | 46 + .../css2400/hive_isp_css_include/timed_ctrl.h | 47 + .../css2400/hive_isp_css_include/type_support.h | 93 + .../atomisp2/css2400/hive_isp_css_include/vamem.h | 47 + .../css2400/hive_isp_css_include/vector_func.h | 39 + .../css2400/hive_isp_css_include/vector_ops.h | 32 + .../atomisp2/css2400/hive_isp_css_include/vmem.h | 47 + .../atomisp2/css2400/hive_isp_css_include/xmem.h | 47 + .../css2400/hive_isp_css_shared/host/queue_local.h | 20 + .../hive_isp_css_shared/host/queue_private.h | 18 + .../css2400/hive_isp_css_shared/host/tag.c | 95 + .../css2400/hive_isp_css_shared/host/tag_local.h | 22 + .../css2400/hive_isp_css_shared/host/tag_private.h | 18 + .../css2400/hive_isp_css_shared/queue_global.h | 19 + .../css2400/hive_isp_css_shared/socket_global.h | 53 + .../hive_isp_css_shared/stream_buffer_global.h | 26 + .../css2400/hive_isp_css_shared/sw_event_global.h | 36 + .../css2400/hive_isp_css_shared/tag_global.h | 56 + .../media/atomisp/pci/atomisp2/css2400/ia_css.h | 58 + .../media/atomisp/pci/atomisp2/css2400/ia_css_3a.h | 188 + .../pci/atomisp2/css2400/ia_css_acc_types.h | 468 + .../atomisp/pci/atomisp2/css2400/ia_css_buffer.h | 85 + .../atomisp/pci/atomisp2/css2400/ia_css_control.h | 157 + .../pci/atomisp2/css2400/ia_css_device_access.c | 95 + .../pci/atomisp2/css2400/ia_css_device_access.h | 65 + .../atomisp/pci/atomisp2/css2400/ia_css_dvs.h | 299 + .../atomisp/pci/atomisp2/css2400/ia_css_env.h | 159 + .../atomisp/pci/atomisp2/css2400/ia_css_err.h | 63 + .../pci/atomisp2/css2400/ia_css_event_public.h | 196 + .../atomisp/pci/atomisp2/css2400/ia_css_firmware.h | 74 + .../atomisp/pci/atomisp2/css2400/ia_css_frac.h | 37 + .../pci/atomisp2/css2400/ia_css_frame_format.h | 101 + .../pci/atomisp2/css2400/ia_css_frame_public.h | 365 + .../pci/atomisp2/css2400/ia_css_host_data.h | 46 + .../pci/atomisp2/css2400/ia_css_input_port.h | 66 + .../atomisp/pci/atomisp2/css2400/ia_css_irq.h | 235 + .../pci/atomisp2/css2400/ia_css_lace_stat.h | 37 + .../pci/atomisp2/css2400/ia_css_memory_access.c | 107 + .../pci/atomisp2/css2400/ia_css_memory_access.h | 24 + .../atomisp/pci/atomisp2/css2400/ia_css_metadata.h | 71 + .../atomisp/pci/atomisp2/css2400/ia_css_mipi.h | 82 + .../atomisp/pci/atomisp2/css2400/ia_css_mmu.h | 32 + .../pci/atomisp2/css2400/ia_css_mmu_private.h | 31 + .../atomisp/pci/atomisp2/css2400/ia_css_morph.h | 39 + .../atomisp/pci/atomisp2/css2400/ia_css_pipe.h | 228 + .../pci/atomisp2/css2400/ia_css_pipe_public.h | 659 ++ .../atomisp/pci/atomisp2/css2400/ia_css_prbs.h | 53 + .../pci/atomisp2/css2400/ia_css_properties.h | 41 + .../atomisp/pci/atomisp2/css2400/ia_css_shading.h | 40 + .../atomisp/pci/atomisp2/css2400/ia_css_stream.h | 110 + .../pci/atomisp2/css2400/ia_css_stream_format.h | 94 + .../pci/atomisp2/css2400/ia_css_stream_public.h | 582 + .../atomisp/pci/atomisp2/css2400/ia_css_timer.h | 84 + .../atomisp/pci/atomisp2/css2400/ia_css_tpg.h | 78 + .../atomisp/pci/atomisp2/css2400/ia_css_types.h | 654 ++ .../atomisp/pci/atomisp2/css2400/ia_css_version.h | 40 + .../pci/atomisp2/css2400/ia_css_version_data.h | 33 + .../css2400/isp/kernels/aa/aa_2/ia_css_aa2.host.c | 66 + .../css2400/isp/kernels/aa/aa_2/ia_css_aa2.host.h | 50 + .../css2400/isp/kernels/aa/aa_2/ia_css_aa2_param.h | 24 + .../css2400/isp/kernels/aa/aa_2/ia_css_aa2_state.h | 41 + .../css2400/isp/kernels/aa/aa_2/ia_css_aa2_types.h | 48 + .../isp/kernels/anr/anr_1.0/ia_css_anr.host.c | 60 + .../isp/kernels/anr/anr_1.0/ia_css_anr.host.h | 39 + .../isp/kernels/anr/anr_1.0/ia_css_anr_param.h | 25 + .../isp/kernels/anr/anr_1.0/ia_css_anr_types.h | 36 + .../isp/kernels/anr/anr_2/ia_css_anr2.host.c | 46 + .../isp/kernels/anr/anr_2/ia_css_anr2.host.h | 35 + .../isp/kernels/anr/anr_2/ia_css_anr2_table.host.c | 52 + .../isp/kernels/anr/anr_2/ia_css_anr2_table.host.h | 22 + .../isp/kernels/anr/anr_2/ia_css_anr2_types.h | 32 + .../isp/kernels/anr/anr_2/ia_css_anr_param.h | 27 + .../bayer_ls_1.0/ia_css_bayer_load_param.h | 20 + .../bayer_ls/bayer_ls_1.0/ia_css_bayer_ls_param.h | 42 + .../bayer_ls_1.0/ia_css_bayer_store_param.h | 21 + .../css2400/isp/kernels/bh/bh_2/ia_css_bh.host.c | 78 + .../css2400/isp/kernels/bh/bh_2/ia_css_bh.host.h | 38 + .../css2400/isp/kernels/bh/bh_2/ia_css_bh_param.h | 40 + .../css2400/isp/kernels/bh/bh_2/ia_css_bh_types.h | 37 + .../css2400/isp/kernels/bnlm/ia_css_bnlm.host.c | 183 + .../css2400/isp/kernels/bnlm/ia_css_bnlm.host.h | 41 + .../isp/kernels/bnlm/ia_css_bnlm_default.host.c | 71 + .../isp/kernels/bnlm/ia_css_bnlm_default.host.h | 22 + .../css2400/isp/kernels/bnlm/ia_css_bnlm_param.h | 63 + .../css2400/isp/kernels/bnlm/ia_css_bnlm_state.h | 31 + .../css2400/isp/kernels/bnlm/ia_css_bnlm_types.h | 106 + .../isp/kernels/bnr/bnr2_2/ia_css_bnr2_2.host.c | 122 + .../isp/kernels/bnr/bnr2_2/ia_css_bnr2_2.host.h | 35 + .../isp/kernels/bnr/bnr2_2/ia_css_bnr2_2_param.h | 47 + .../isp/kernels/bnr/bnr2_2/ia_css_bnr2_2_types.h | 71 + .../isp/kernels/bnr/bnr_1.0/ia_css_bnr.host.c | 64 + .../isp/kernels/bnr/bnr_1.0/ia_css_bnr.host.h | 34 + .../isp/kernels/bnr/bnr_1.0/ia_css_bnr_param.h | 30 + .../isp/kernels/cnr/cnr_1.0/ia_css_cnr.host.c | 28 + .../isp/kernels/cnr/cnr_1.0/ia_css_cnr.host.h | 25 + .../isp/kernels/cnr/cnr_1.0/ia_css_cnr_param.h | 24 + .../isp/kernels/cnr/cnr_1.0/ia_css_cnr_state.h | 33 + .../isp/kernels/cnr/cnr_2/ia_css_cnr2.host.c | 76 + .../isp/kernels/cnr/cnr_2/ia_css_cnr2.host.h | 43 + .../isp/kernels/cnr/cnr_2/ia_css_cnr2_param.h | 32 + .../isp/kernels/cnr/cnr_2/ia_css_cnr2_types.h | 55 + .../isp/kernels/cnr/cnr_2/ia_css_cnr_param.h | 20 + .../isp/kernels/cnr/cnr_2/ia_css_cnr_state.h | 33 + .../conversion_1.0/ia_css_conversion.host.c | 36 + .../conversion_1.0/ia_css_conversion.host.h | 33 + .../conversion_1.0/ia_css_conversion_param.h | 28 + .../conversion_1.0/ia_css_conversion_types.h | 32 + .../copy_output_1.0/ia_css_copy_output.host.c | 47 + .../copy_output_1.0/ia_css_copy_output.host.h | 34 + .../copy_output_1.0/ia_css_copy_output_param.h | 26 + .../isp/kernels/crop/crop_1.0/ia_css_crop.host.c | 64 + .../isp/kernels/crop/crop_1.0/ia_css_crop.host.h | 41 + .../isp/kernels/crop/crop_1.0/ia_css_crop_param.h | 32 + .../isp/kernels/crop/crop_1.0/ia_css_crop_types.h | 35 + .../isp/kernels/csc/csc_1.0/ia_css_csc.host.c | 132 + .../isp/kernels/csc/csc_1.0/ia_css_csc.host.h | 54 + .../isp/kernels/csc/csc_1.0/ia_css_csc_param.h | 34 + .../isp/kernels/csc/csc_1.0/ia_css_csc_types.h | 78 + .../isp/kernels/ctc/ctc1_5/ia_css_ctc1_5.host.c | 120 + .../isp/kernels/ctc/ctc1_5/ia_css_ctc1_5.host.h | 33 + .../isp/kernels/ctc/ctc1_5/ia_css_ctc1_5_param.h | 46 + .../isp/kernels/ctc/ctc1_5/ia_css_ctc_param.h | 20 + .../isp/kernels/ctc/ctc2/ia_css_ctc2.host.c | 160 + .../isp/kernels/ctc/ctc2/ia_css_ctc2.host.h | 33 + .../isp/kernels/ctc/ctc2/ia_css_ctc2_param.h | 49 + .../isp/kernels/ctc/ctc2/ia_css_ctc2_types.h | 55 + .../isp/kernels/ctc/ctc_1.0/ia_css_ctc.host.c | 63 + .../isp/kernels/ctc/ctc_1.0/ia_css_ctc.host.h | 36 + .../isp/kernels/ctc/ctc_1.0/ia_css_ctc_param.h | 44 + .../kernels/ctc/ctc_1.0/ia_css_ctc_table.host.c | 215 + .../kernels/ctc/ctc_1.0/ia_css_ctc_table.host.h | 24 + .../isp/kernels/ctc/ctc_1.0/ia_css_ctc_types.h | 110 + .../css2400/isp/kernels/de/de_1.0/ia_css_de.host.c | 79 + .../css2400/isp/kernels/de/de_1.0/ia_css_de.host.h | 44 + .../isp/kernels/de/de_1.0/ia_css_de_param.h | 27 + .../isp/kernels/de/de_1.0/ia_css_de_state.h | 26 + .../isp/kernels/de/de_1.0/ia_css_de_types.h | 43 + .../css2400/isp/kernels/de/de_2/ia_css_de2.host.c | 54 + .../css2400/isp/kernels/de/de_2/ia_css_de2.host.h | 38 + .../css2400/isp/kernels/de/de_2/ia_css_de2_param.h | 30 + .../css2400/isp/kernels/de/de_2/ia_css_de2_types.h | 42 + .../css2400/isp/kernels/de/de_2/ia_css_de_param.h | 20 + .../css2400/isp/kernels/de/de_2/ia_css_de_state.h | 21 + .../css2400/isp/kernels/dp/dp_1.0/ia_css_dp.host.c | 132 + .../css2400/isp/kernels/dp/dp_1.0/ia_css_dp.host.h | 47 + .../isp/kernels/dp/dp_1.0/ia_css_dp_param.h | 36 + .../isp/kernels/dp/dp_1.0/ia_css_dp_state.h | 36 + .../isp/kernels/dp/dp_1.0/ia_css_dp_types.h | 50 + .../css2400/isp/kernels/dpc2/ia_css_dpc2.host.c | 65 + .../css2400/isp/kernels/dpc2/ia_css_dpc2.host.h | 40 + .../isp/kernels/dpc2/ia_css_dpc2_default.host.c | 26 + .../isp/kernels/dpc2/ia_css_dpc2_default.host.h | 23 + .../css2400/isp/kernels/dpc2/ia_css_dpc2_param.h | 53 + .../css2400/isp/kernels/dpc2/ia_css_dpc2_state.h | 30 + .../css2400/isp/kernels/dpc2/ia_css_dpc2_types.h | 59 + .../isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c | 306 + .../isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.h | 60 + .../isp/kernels/dvs/dvs_1.0/ia_css_dvs_param.h | 39 + .../isp/kernels/dvs/dvs_1.0/ia_css_dvs_types.h | 30 + .../isp/kernels/eed1_8/ia_css_eed1_8.host.c | 321 + .../isp/kernels/eed1_8/ia_css_eed1_8.host.h | 46 + .../kernels/eed1_8/ia_css_eed1_8_default.host.c | 94 + .../kernels/eed1_8/ia_css_eed1_8_default.host.h | 22 + .../isp/kernels/eed1_8/ia_css_eed1_8_param.h | 154 + .../isp/kernels/eed1_8/ia_css_eed1_8_state.h | 40 + .../isp/kernels/eed1_8/ia_css_eed1_8_types.h | 86 + .../isp/kernels/fc/fc_1.0/ia_css_formats.host.c | 62 + .../isp/kernels/fc/fc_1.0/ia_css_formats.host.h | 45 + .../isp/kernels/fc/fc_1.0/ia_css_formats_param.h | 25 + .../isp/kernels/fc/fc_1.0/ia_css_formats_types.h | 38 + .../fixedbds/fixedbds_1.0/ia_css_fixedbds.host.c | 47 + .../fixedbds/fixedbds_1.0/ia_css_fixedbds.host.h | 37 + .../fixedbds/fixedbds_1.0/ia_css_fixedbds_param.h | 33 + .../fixedbds/fixedbds_1.0/ia_css_fixedbds_types.h | 26 + .../isp/kernels/fpn/fpn_1.0/ia_css_fpn.host.c | 89 + .../isp/kernels/fpn/fpn_1.0/ia_css_fpn.host.h | 44 + .../isp/kernels/fpn/fpn_1.0/ia_css_fpn_param.h | 35 + .../isp/kernels/fpn/fpn_1.0/ia_css_fpn_types.h | 52 + .../css2400/isp/kernels/gc/gc_1.0/ia_css_gc.host.c | 118 + .../css2400/isp/kernels/gc/gc_1.0/ia_css_gc.host.h | 65 + .../isp/kernels/gc/gc_1.0/ia_css_gc_param.h | 61 + .../isp/kernels/gc/gc_1.0/ia_css_gc_table.host.c | 214 + .../isp/kernels/gc/gc_1.0/ia_css_gc_table.host.h | 24 + .../isp/kernels/gc/gc_1.0/ia_css_gc_types.h | 97 + .../css2400/isp/kernels/gc/gc_2/ia_css_gc2.host.c | 110 + .../css2400/isp/kernels/gc/gc_2/ia_css_gc2.host.h | 79 + .../css2400/isp/kernels/gc/gc_2/ia_css_gc2_param.h | 43 + .../isp/kernels/gc/gc_2/ia_css_gc2_table.host.c | 132 + .../isp/kernels/gc/gc_2/ia_css_gc2_table.host.h | 26 + .../css2400/isp/kernels/gc/gc_2/ia_css_gc2_types.h | 54 + .../css2400/isp/kernels/hdr/ia_css_hdr.host.c | 41 + .../css2400/isp/kernels/hdr/ia_css_hdr.host.h | 31 + .../css2400/isp/kernels/hdr/ia_css_hdr_param.h | 53 + .../css2400/isp/kernels/hdr/ia_css_hdr_types.h | 64 + .../isp/kernels/iefd2_6/ia_css_iefd2_6.host.c | 200 + .../isp/kernels/iefd2_6/ia_css_iefd2_6.host.h | 46 + .../kernels/iefd2_6/ia_css_iefd2_6_default.host.c | 144 + .../kernels/iefd2_6/ia_css_iefd2_6_default.host.h | 23 + .../isp/kernels/iefd2_6/ia_css_iefd2_6_param.h | 83 + .../isp/kernels/iefd2_6/ia_css_iefd2_6_state.h | 32 + .../isp/kernels/iefd2_6/ia_css_iefd2_6_types.h | 164 + .../io_ls/bayer_io_ls/ia_css_bayer_io.host.c | 86 + .../io_ls/bayer_io_ls/ia_css_bayer_io.host.h | 31 + .../io_ls/bayer_io_ls/ia_css_bayer_io_param.h | 22 + .../io_ls/bayer_io_ls/ia_css_bayer_io_types.h | 22 + .../kernels/io_ls/common/ia_css_common_io_param.h | 22 + .../kernels/io_ls/common/ia_css_common_io_types.h | 31 + .../io_ls/plane_io_ls/ia_css_plane_io_param.h | 22 + .../io_ls/plane_io_ls/ia_css_plane_io_types.h | 30 + .../io_ls/yuv420_io_ls/ia_css_yuv420_io_param.h | 22 + .../io_ls/yuv420_io_ls/ia_css_yuv420_io_types.h | 22 + .../io_ls/yuv444_io_ls/ia_css_yuv444_io_param.h | 22 + .../io_ls/yuv444_io_ls/ia_css_yuv444_io_types.h | 22 + .../ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.c | 86 + .../ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.h | 31 + .../ipu2_io_ls/bayer_io_ls/ia_css_bayer_io_param.h | 22 + .../ipu2_io_ls/bayer_io_ls/ia_css_bayer_io_types.h | 22 + .../ipu2_io_ls/common/ia_css_common_io_param.h | 22 + .../ipu2_io_ls/common/ia_css_common_io_types.h | 31 + .../ipu2_io_ls/plane_io_ls/ia_css_plane_io_param.h | 22 + .../ipu2_io_ls/plane_io_ls/ia_css_plane_io_types.h | 30 + .../yuv420_io_ls/ia_css_yuv420_io_param.h | 22 + .../yuv420_io_ls/ia_css_yuv420_io_types.h | 22 + .../yuv444_io_ls/ia_css_yuv444_io.host.c | 86 + .../yuv444_io_ls/ia_css_yuv444_io.host.h | 31 + .../yuv444_io_ls/ia_css_yuv444_io_param.h | 22 + .../yuv444_io_ls/ia_css_yuv444_io_types.h | 22 + .../iterator/iterator_1.0/ia_css_iterator.host.c | 80 + .../iterator/iterator_1.0/ia_css_iterator.host.h | 34 + .../iterator/iterator_1.0/ia_css_iterator_param.h | 38 + .../isp/kernels/macc/macc1_5/ia_css_macc1_5.host.c | 74 + .../isp/kernels/macc/macc1_5/ia_css_macc1_5.host.h | 41 + .../kernels/macc/macc1_5/ia_css_macc1_5_param.h | 31 + .../macc/macc1_5/ia_css_macc1_5_table.host.c | 32 + .../macc/macc1_5/ia_css_macc1_5_table.host.h | 22 + .../kernels/macc/macc1_5/ia_css_macc1_5_types.h | 74 + .../isp/kernels/macc/macc_1.0/ia_css_macc.host.c | 49 + .../isp/kernels/macc/macc_1.0/ia_css_macc.host.h | 42 + .../isp/kernels/macc/macc_1.0/ia_css_macc_param.h | 25 + .../kernels/macc/macc_1.0/ia_css_macc_table.host.c | 47 + .../kernels/macc/macc_1.0/ia_css_macc_table.host.h | 23 + .../isp/kernels/macc/macc_1.0/ia_css_macc_types.h | 63 + .../isp/kernels/norm/norm_1.0/ia_css_norm.host.c | 16 + .../isp/kernels/norm/norm_1.0/ia_css_norm.host.h | 20 + .../isp/kernels/norm/norm_1.0/ia_css_norm_param.h | 19 + .../isp/kernels/norm/norm_1.0/ia_css_norm_types.h | 21 + .../css2400/isp/kernels/ob/ob2/ia_css_ob2.host.c | 79 + .../css2400/isp/kernels/ob/ob2/ia_css_ob2.host.h | 40 + .../css2400/isp/kernels/ob/ob2/ia_css_ob2_param.h | 29 + .../css2400/isp/kernels/ob/ob2/ia_css_ob2_types.h | 45 + .../css2400/isp/kernels/ob/ob_1.0/ia_css_ob.host.c | 159 + .../css2400/isp/kernels/ob/ob_1.0/ia_css_ob.host.h | 53 + .../isp/kernels/ob/ob_1.0/ia_css_ob_param.h | 48 + .../isp/kernels/ob/ob_1.0/ia_css_ob_types.h | 69 + .../kernels/output/output_1.0/ia_css_output.host.c | 162 + .../kernels/output/output_1.0/ia_css_output.host.h | 75 + .../output/output_1.0/ia_css_output_param.h | 36 + .../output/output_1.0/ia_css_output_types.h | 48 + .../css2400/isp/kernels/pdaf/ia_css_pdaf.host.c | 84 + .../css2400/isp/kernels/pdaf/ia_css_pdaf.host.h | 37 + .../css2400/isp/kernels/pdaf/ia_css_pdaf_param.h | 62 + .../css2400/isp/kernels/pdaf/ia_css_pdaf_types.h | 54 + .../kernels/qplane/qplane_2/ia_css_qplane.host.c | 61 + .../kernels/qplane/qplane_2/ia_css_qplane.host.h | 43 + .../kernels/qplane/qplane_2/ia_css_qplane_param.h | 30 + .../kernels/qplane/qplane_2/ia_css_qplane_types.h | 33 + .../isp/kernels/raw/raw_1.0/ia_css_raw.host.c | 136 + .../isp/kernels/raw/raw_1.0/ia_css_raw.host.h | 38 + .../isp/kernels/raw/raw_1.0/ia_css_raw_param.h | 38 + .../isp/kernels/raw/raw_1.0/ia_css_raw_types.h | 37 + .../raw_aa_binning_1.0/ia_css_raa.host.c | 36 + .../raw_aa_binning_1.0/ia_css_raa.host.h | 27 + .../isp/kernels/ref/ref_1.0/ia_css_ref.host.c | 74 + .../isp/kernels/ref/ref_1.0/ia_css_ref.host.h | 41 + .../isp/kernels/ref/ref_1.0/ia_css_ref_param.h | 36 + .../isp/kernels/ref/ref_1.0/ia_css_ref_state.h | 26 + .../isp/kernels/ref/ref_1.0/ia_css_ref_types.h | 28 + .../isp/kernels/s3a/s3a_1.0/ia_css_s3a.host.c | 386 + .../isp/kernels/s3a/s3a_1.0/ia_css_s3a.host.h | 77 + .../isp/kernels/s3a/s3a_1.0/ia_css_s3a_param.h | 54 + .../isp/kernels/s3a/s3a_1.0/ia_css_s3a_types.h | 266 + .../kernels/s3a_stat_ls/ia_css_s3a_stat_ls_param.h | 45 + .../s3a_stat_ls/ia_css_s3a_stat_store_param.h | 21 + .../css2400/isp/kernels/satm/ia_css_satm.host.c | 27 + .../css2400/isp/kernels/satm/ia_css_satm.host.h | 29 + .../css2400/isp/kernels/satm/ia_css_satm_param.h | 30 + .../css2400/isp/kernels/satm/ia_css_satm_types.h | 35 + .../css2400/isp/kernels/sc/sc_1.0/ia_css_sc.host.c | 130 + .../css2400/isp/kernels/sc/sc_1.0/ia_css_sc.host.h | 77 + .../isp/kernels/sc/sc_1.0/ia_css_sc_param.h | 71 + .../isp/kernels/sc/sc_1.0/ia_css_sc_types.h | 136 + .../kernels/scale/scale_1.0/ia_css_scale_param.h | 20 + .../kernels/sdis/common/ia_css_sdis_common.host.h | 99 + .../kernels/sdis/common/ia_css_sdis_common_types.h | 232 + .../isp/kernels/sdis/common/ia_css_sdis_param.h | 22 + .../isp/kernels/sdis/sdis_1.0/ia_css_sdis.host.c | 424 + .../isp/kernels/sdis/sdis_1.0/ia_css_sdis.host.h | 101 + .../isp/kernels/sdis/sdis_1.0/ia_css_sdis_param.h | 21 + .../isp/kernels/sdis/sdis_1.0/ia_css_sdis_types.h | 53 + .../isp/kernels/sdis/sdis_2/ia_css_sdis2.host.c | 338 + .../isp/kernels/sdis/sdis_2/ia_css_sdis2.host.h | 95 + .../isp/kernels/sdis/sdis_2/ia_css_sdis2_types.h | 69 + .../isp/kernels/sdis/sdis_2/ia_css_sdis_param.h | 21 + .../isp/kernels/tdf/tdf_1.0/ia_css_tdf.host.c | 76 + .../isp/kernels/tdf/tdf_1.0/ia_css_tdf.host.h | 39 + .../kernels/tdf/tdf_1.0/ia_css_tdf_default.host.c | 36 + .../kernels/tdf/tdf_1.0/ia_css_tdf_default.host.h | 23 + .../isp/kernels/tdf/tdf_1.0/ia_css_tdf_param.h | 43 + .../isp/kernels/tdf/tdf_1.0/ia_css_tdf_types.h | 53 + .../isp/kernels/tnr/tnr3/ia_css_tnr3_types.h | 61 + .../isp/kernels/tnr/tnr_1.0/ia_css_tnr.host.c | 130 + .../isp/kernels/tnr/tnr_1.0/ia_css_tnr.host.h | 56 + .../isp/kernels/tnr/tnr_1.0/ia_css_tnr_param.h | 48 + .../isp/kernels/tnr/tnr_1.0/ia_css_tnr_state.h | 26 + .../isp/kernels/tnr/tnr_1.0/ia_css_tnr_types.h | 60 + .../isp/kernels/uds/uds_1.0/ia_css_uds.host.c | 35 + .../isp/kernels/uds/uds_1.0/ia_css_uds.host.h | 33 + .../isp/kernels/uds/uds_1.0/ia_css_uds_param.h | 31 + .../css2400/isp/kernels/vf/vf_1.0/ia_css_vf.host.c | 141 + .../css2400/isp/kernels/vf/vf_1.0/ia_css_vf.host.h | 47 + .../isp/kernels/vf/vf_1.0/ia_css_vf_param.h | 37 + .../isp/kernels/vf/vf_1.0/ia_css_vf_types.h | 32 + .../css2400/isp/kernels/wb/wb_1.0/ia_css_wb.host.c | 89 + .../css2400/isp/kernels/wb/wb_1.0/ia_css_wb.host.h | 39 + .../isp/kernels/wb/wb_1.0/ia_css_wb_param.h | 29 + .../isp/kernels/wb/wb_1.0/ia_css_wb_types.h | 47 + .../kernels/xnr/xnr3_0_11/ia_css_xnr3_0_11.host.c | 155 + .../kernels/xnr/xnr3_0_11/ia_css_xnr3_0_11.host.h | 58 + .../kernels/xnr/xnr3_0_11/ia_css_xnr3_0_11_param.h | 50 + .../kernels/xnr/xnr3_0_11/ia_css_xnr3_0_11_types.h | 33 + .../kernels/xnr/xnr3_0_5/ia_css_xnr3_0_5.host.c | 154 + .../kernels/xnr/xnr3_0_5/ia_css_xnr3_0_5.host.h | 59 + .../kernels/xnr/xnr3_0_5/ia_css_xnr3_0_5_param.h | 50 + .../kernels/xnr/xnr3_0_5/ia_css_xnr3_0_5_types.h | 33 + .../isp/kernels/xnr/xnr_1.0/ia_css_xnr.host.c | 66 + .../isp/kernels/xnr/xnr_1.0/ia_css_xnr.host.h | 47 + .../isp/kernels/xnr/xnr_1.0/ia_css_xnr_param.h | 51 + .../kernels/xnr/xnr_1.0/ia_css_xnr_table.host.c | 81 + .../kernels/xnr/xnr_1.0/ia_css_xnr_table.host.h | 22 + .../isp/kernels/xnr/xnr_1.0/ia_css_xnr_types.h | 71 + .../isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c | 268 + .../isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.h | 42 + .../isp/kernels/xnr/xnr_3.0/ia_css_xnr3_param.h | 96 + .../isp/kernels/xnr/xnr_3.0/ia_css_xnr3_types.h | 98 + .../xnr/xnr_3.0/ia_css_xnr3_wrapper_param.h | 20 + .../isp/kernels/ynr/ynr_1.0/ia_css_ynr.host.c | 219 + .../isp/kernels/ynr/ynr_1.0/ia_css_ynr.host.h | 60 + .../isp/kernels/ynr/ynr_1.0/ia_css_ynr_param.h | 49 + .../isp/kernels/ynr/ynr_1.0/ia_css_ynr_state.h | 26 + .../isp/kernels/ynr/ynr_1.0/ia_css_ynr_types.h | 81 + .../isp/kernels/ynr/ynr_2/ia_css_ynr2.host.c | 125 + .../isp/kernels/ynr/ynr_2/ia_css_ynr2.host.h | 56 + .../isp/kernels/ynr/ynr_2/ia_css_ynr2_param.h | 45 + .../isp/kernels/ynr/ynr_2/ia_css_ynr2_types.h | 94 + .../isp/kernels/ynr/ynr_2/ia_css_ynr_param.h | 20 + .../isp/kernels/ynr/ynr_2/ia_css_ynr_state.h | 21 + .../yuv_ls/yuv_ls_1.0/ia_css_yuv_load_param.h | 20 + .../yuv_ls/yuv_ls_1.0/ia_css_yuv_ls_param.h | 39 + .../yuv_ls/yuv_ls_1.0/ia_css_yuv_store_param.h | 21 + .../css2400/isp/modes/interface/input_buf.isp.h | 73 + .../css2400/isp/modes/interface/isp_const.h | 506 + .../css2400/isp/modes/interface/isp_exprs.h | 314 + .../css2400/isp/modes/interface/isp_types.h | 128 + .../atomisp/pci/atomisp2/css2400/memory_realloc.c | 81 + .../runtime/binary/interface/ia_css_binary.h | 333 + .../atomisp2/css2400/runtime/binary/src/binary.c | 1873 +++ .../css2400/runtime/bufq/interface/ia_css_bufq.h | 197 + .../runtime/bufq/interface/ia_css_bufq_comm.h | 66 + .../pci/atomisp2/css2400/runtime/bufq/src/bufq.c | 596 + .../css2400/runtime/debug/interface/ia_css_debug.h | 508 + .../debug/interface/ia_css_debug_internal.h | 31 + .../runtime/debug/interface/ia_css_debug_pipe.h | 84 + .../css2400/runtime/debug/src/ia_css_debug.c | 3628 ++++++ .../css2400/runtime/event/interface/ia_css_event.h | 46 + .../pci/atomisp2/css2400/runtime/event/src/event.c | 126 + .../runtime/eventq/interface/ia_css_eventq.h | 69 + .../atomisp2/css2400/runtime/eventq/src/eventq.c | 77 + .../css2400/runtime/frame/interface/ia_css_frame.h | 180 + .../runtime/frame/interface/ia_css_frame_comm.h | 132 + .../pci/atomisp2/css2400/runtime/frame/src/frame.c | 1027 ++ .../css2400/runtime/ifmtr/interface/ia_css_ifmtr.h | 49 + .../pci/atomisp2/css2400/runtime/ifmtr/src/ifmtr.c | 568 + .../runtime/inputfifo/interface/ia_css_inputfifo.h | 69 + .../css2400/runtime/inputfifo/src/inputfifo.c | 613 + .../runtime/isp_param/interface/ia_css_isp_param.h | 118 + .../isp_param/interface/ia_css_isp_param_types.h | 107 + .../css2400/runtime/isp_param/src/isp_param.c | 227 + .../css2400/runtime/isys/interface/ia_css_isys.h | 201 + .../runtime/isys/interface/ia_css_isys_comm.h | 69 + .../css2400/runtime/isys/src/csi_rx_rmgr.c | 179 + .../css2400/runtime/isys/src/csi_rx_rmgr.h | 43 + .../css2400/runtime/isys/src/ibuf_ctrl_rmgr.c | 141 + .../css2400/runtime/isys/src/ibuf_ctrl_rmgr.h | 55 + .../css2400/runtime/isys/src/isys_dma_rmgr.c | 103 + .../css2400/runtime/isys/src/isys_dma_rmgr.h | 41 + .../atomisp2/css2400/runtime/isys/src/isys_init.c | 141 + .../runtime/isys/src/isys_stream2mmio_rmgr.c | 105 + .../runtime/isys/src/isys_stream2mmio_rmgr.h | 41 + .../pci/atomisp2/css2400/runtime/isys/src/rx.c | 607 + .../css2400/runtime/isys/src/virtual_isys.c | 898 ++ .../css2400/runtime/isys/src/virtual_isys.h | 41 + .../runtime/pipeline/interface/ia_css_pipeline.h | 308 + .../pipeline/interface/ia_css_pipeline_common.h | 42 + .../css2400/runtime/pipeline/src/pipeline.c | 806 ++ .../css2400/runtime/queue/interface/ia_css_queue.h | 192 + .../runtime/queue/interface/ia_css_queue_comm.h | 69 + .../pci/atomisp2/css2400/runtime/queue/src/queue.c | 412 + .../css2400/runtime/queue/src/queue_access.c | 192 + .../css2400/runtime/queue/src/queue_access.h | 101 + .../css2400/runtime/rmgr/interface/ia_css_rmgr.h | 89 + .../runtime/rmgr/interface/ia_css_rmgr_vbuf.h | 115 + .../pci/atomisp2/css2400/runtime/rmgr/src/rmgr.c | 55 + .../atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c | 360 + .../runtime/spctrl/interface/ia_css_spctrl.h | 87 + .../runtime/spctrl/interface/ia_css_spctrl_comm.h | 61 + .../atomisp2/css2400/runtime/spctrl/src/spctrl.c | 285 + .../tagger/interface/ia_css_tagger_common.h | 59 + .../pci/atomisp2/css2400/runtime/timer/src/timer.c | 48 + .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 11529 +++++++++++++++++++ .../atomisp/pci/atomisp2/css2400/sh_css_defs.h | 413 + .../atomisp/pci/atomisp2/css2400/sh_css_dvs_info.h | 36 + .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 363 + .../atomisp/pci/atomisp2/css2400/sh_css_firmware.h | 57 + .../atomisp/pci/atomisp2/css2400/sh_css_frac.h | 40 + .../pci/atomisp2/css2400/sh_css_host_data.c | 42 + .../atomisp/pci/atomisp2/css2400/sh_css_hrt.c | 84 + .../atomisp/pci/atomisp2/css2400/sh_css_hrt.h | 34 + .../atomisp/pci/atomisp2/css2400/sh_css_internal.h | 1119 ++ .../atomisp/pci/atomisp2/css2400/sh_css_irq.c | 16 + .../pci/atomisp2/css2400/sh_css_lace_stat.c | 16 + .../atomisp/pci/atomisp2/css2400/sh_css_legacy.h | 88 + .../atomisp/pci/atomisp2/css2400/sh_css_metadata.c | 16 + .../atomisp/pci/atomisp2/css2400/sh_css_metrics.c | 176 + .../atomisp/pci/atomisp2/css2400/sh_css_metrics.h | 76 + .../atomisp/pci/atomisp2/css2400/sh_css_mipi.c | 754 ++ .../atomisp/pci/atomisp2/css2400/sh_css_mipi.h | 49 + .../atomisp/pci/atomisp2/css2400/sh_css_mmu.c | 62 + .../atomisp/pci/atomisp2/css2400/sh_css_morph.c | 16 + .../pci/atomisp2/css2400/sh_css_param_dvs.c | 267 + .../pci/atomisp2/css2400/sh_css_param_dvs.h | 86 + .../pci/atomisp2/css2400/sh_css_param_shading.c | 417 + .../pci/atomisp2/css2400/sh_css_param_shading.h | 39 + .../atomisp/pci/atomisp2/css2400/sh_css_params.c | 5314 +++++++++ .../atomisp/pci/atomisp2/css2400/sh_css_params.h | 188 + .../pci/atomisp2/css2400/sh_css_params_internal.h | 21 + .../atomisp/pci/atomisp2/css2400/sh_css_pipe.c | 16 + .../pci/atomisp2/css2400/sh_css_properties.c | 43 + .../atomisp/pci/atomisp2/css2400/sh_css_shading.c | 16 + .../media/atomisp/pci/atomisp2/css2400/sh_css_sp.c | 1898 +++ .../media/atomisp/pci/atomisp2/css2400/sh_css_sp.h | 262 + .../atomisp/pci/atomisp2/css2400/sh_css_stream.c | 16 + .../pci/atomisp2/css2400/sh_css_stream_format.c | 76 + .../pci/atomisp2/css2400/sh_css_stream_format.h | 23 + .../atomisp/pci/atomisp2/css2400/sh_css_struct.h | 80 + .../atomisp/pci/atomisp2/css2400/sh_css_uds.h | 37 + .../atomisp/pci/atomisp2/css2400/sh_css_version.c | 30 + .../staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 769 ++ .../media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 1542 +++ .../media/atomisp/pci/atomisp2/hmm/hmm_bo_dev.c | 333 + .../atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c | 257 + .../atomisp/pci/atomisp2/hmm/hmm_reserved_pool.c | 258 + .../media/atomisp/pci/atomisp2/hmm/hmm_vm.c | 218 + .../media/atomisp/pci/atomisp2/hrt/device_access.c | 127 + .../atomisp2/hrt/hive_isp_css_custom_host_hrt.h | 107 + .../atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.c | 193 + .../atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.h | 92 + .../media/atomisp/pci/atomisp2/hrt/memory_access.c | 369 + .../media/atomisp/pci/atomisp2/include/hmm/hmm.h | 106 + .../atomisp/pci/atomisp2/include/hmm/hmm_bo.h | 323 + .../atomisp/pci/atomisp2/include/hmm/hmm_bo_dev.h | 130 + .../atomisp/pci/atomisp2/include/hmm/hmm_common.h | 100 + .../atomisp/pci/atomisp2/include/hmm/hmm_pool.h | 121 + .../atomisp/pci/atomisp2/include/hmm/hmm_vm.h | 68 + .../atomisp/pci/atomisp2/include/mmu/isp_mmu.h | 177 + .../atomisp/pci/atomisp2/include/mmu/sh_mmu.h | 76 + .../pci/atomisp2/include/mmu/sh_mmu_mrfld.h | 28 + drivers/staging/media/atomisp/pci/atomisp2/list | 182 + .../media/atomisp/pci/atomisp2/mmu/isp_mmu.c | 606 + .../media/atomisp/pci/atomisp2/mmu/sh_mmu_mrfld.c | 93 + drivers/staging/media/atomisp/platform/Makefile | 6 + .../staging/media/atomisp/platform/clock/Makefile | 6 + .../platform/clock/platform_vlv2_plat_clk.c | 40 + .../platform/clock/platform_vlv2_plat_clk.h | 27 + .../media/atomisp/platform/clock/vlv2_plat_clock.c | 266 + .../media/atomisp/platform/intel-mid/Makefile | 5 + .../platform/intel-mid/atomisp_gmin_platform.c | 760 ++ .../platform/intel-mid/intel_mid_pcihelpers.c | 297 + 920 files changed, 204645 insertions(+) commit 372499b589ae5ec38d3dec88b72f2bde3b3790d4 Author: Narcisa Ana Maria Vasile Date: Wed Mar 1 02:40:59 2017 +0200 staging: vc04_services: Removed unnecessary variable Removed unnecessary variable and used instead the parameter that was already defined Signed-off-by: Narcisa Ana Maria Vasile Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit fa2ccd35d7deb4b00b5474e215691028a39c1b56 Author: Narcisa Ana Maria Vasile Date: Wed Mar 1 01:52:53 2017 +0200 staging: bcm2835-camera: Refactored get_format function Now, when the condition inside the for is fulfilled, I return the result, instead of checking afterwards whether the counter has reached or not the end of the list. Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 2430125c1ff167cb19029b0790501a2a1a24a326 Author: Sreya Mittal Date: Wed Mar 1 02:38:13 2017 +0530 staging: speakup: Clean up if conditions Found by checkpatch.pl Logical conditions are on the next line, useless parentheses present Clean up the if tests by * Put logical conditions on the previous line * Line up the tests Signed-off-by: Sreya Mittal Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/keyhelp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 4cb3150a8c2d1f74c67f22ecd71070a0dafcb64f Author: Sreya Mittal Date: Wed Mar 1 02:38:12 2017 +0530 staging: speakup: Align with parentheses Align next line of print statements to the right of open parentheses. Signed-off-by: Sreya Mittal Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/keyhelp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5e38c984dbd98fa9f1998ff239775fd467beeb2c Author: Aishwarya Pant Date: Mon Feb 27 22:31:39 2017 +0530 staging: dgnc: replace udelay with usleep_range Fix checkpatch warning on dgnc_cls.c: CHECK usleep_range is preferred over udelay. udelay(t) in function cls_uart_init is within non-atomic context and can be safely replaced by usleep_range(t, t + delta) where delta is t (as t is between 10 and 20 microseconds). Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_cls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bc58d16753b99e45d84388d7e63b93d7f913a98 Author: Aishwarya Pant Date: Tue Feb 28 16:52:50 2017 +0530 staging: vc04_services: bcm2835-camera: Simplify NULL comparisons Remove instances of explicit NULL comparisons in bcm2835-camera driver for code compaction. Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 14 +++++++------- .../staging/vc04_services/bcm2835-camera/bcm2835-camera.h | 4 ++-- drivers/staging/vc04_services/bcm2835-camera/controls.c | 4 +--- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 10 +++++----- 4 files changed, 15 insertions(+), 17 deletions(-) commit 037651950d5800f236407e139572433a53efb798 Author: Johannes Berg Date: Thu Mar 2 09:39:40 2017 +0100 mac80211_hwsim: fix command documentation indentation Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f7d3b4f5203832f57ece96300888323fd5a6c6b3 Author: Andrew Zaborowski Date: Thu Feb 23 13:02:10 2017 +0100 mac80211_hwsim: Make sure NEW_RADIO contains final name ieee80211_alloc_hw_nm will validate the requested name (if any) before creating the new device and may use a name different from the one requested rather than fail. Make sure the HWSIM_CMD_NEW_RADIO event/response generated has the final name or userspace will receive the wrong name. Note that mac80211_hwsim_new_radio may now modify params. A check for duplicate radio name could be added separately. Signed-off-by: Andrew Zaborowski Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 3 +++ 1 file changed, 3 insertions(+) commit fe56c9c17b09769691e8b91747b32aa2555bef35 Author: Manoharan, Rajkumar Date: Wed Feb 15 12:46:50 2017 -0800 mac80211: fix mesh fail_avg check Mesh failure average never be more than 100. Only in case of fixed path, average will be more than threshold limit (95%). With recent EWMA changes it may go upto 99 as it is scaled to 100. It make sense to return maximum metric when average is greater than threshold limit. Signed-off-by: Rajkumar Manoharan Signed-off-by: Johannes Berg net/mac80211/mesh_hwmp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 75b99bc300463e65f87c90425704c2688489f963 Author: Johannes Berg Date: Wed Feb 15 15:02:10 2017 +0100 ieee80211: define HT operation CCFS2 field The Channel Center Frequency Segment 2 field is used in 802.11-2016 for encoding the actual channel position of the 80+80/160 MHz channel, if the max NSS is restricted. This is used for backwards compatibility. Signed-off-by: Johannes Berg include/linux/ieee80211.h | 2 ++ 1 file changed, 2 insertions(+) commit 7f406cd16a0f0965c761ea02bc1f03154b06bbfb Author: Johannes Berg Date: Wed Feb 15 15:02:09 2017 +0100 mac80211: encode rate type (legacy, HT, VHT) with fewer bits We don't really need three different bits for each, since the types are mutually exclusive. Use just two bits for it. Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 11 ++++++++--- net/mac80211/sta_info.h | 13 +++++++------ 2 files changed, 15 insertions(+), 9 deletions(-) commit 0c1eca4e2f96000077900e0108fff23994c73486 Author: Johannes Berg Date: Wed Feb 15 15:02:08 2017 +0100 cfg80211: refactor cfg80211_calculate_bitrate() This function contains the HT calculations, which makes no sense - split that out into a separate function. As a side effect, this makes the 60G flag independent from HT_MCS so remove the MCS one from wil6210 (also deleting a duplicate assignment.) Signed-off-by: Johannes Berg drivers/net/wireless/ath/wil6210/cfg80211.c | 3 +- net/wireless/util.c | 60 +++++++++++++++-------------- 2 files changed, 33 insertions(+), 30 deletions(-) commit a858958b689211dcfe54cdd94c93160d2d659eba Author: Johannes Berg Date: Wed Feb 15 15:02:07 2017 +0100 mac80211: remove local pointer from rate_ctrl_ref This pointer really isn't needed, so remove it. Signed-off-by: Johannes Berg net/mac80211/rate.c | 10 +++++----- net/mac80211/rate.h | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) commit 2fb51c35815dc08638a7d9b1a497a9d7cb4109b8 Author: Johannes Berg Date: Wed Feb 15 15:02:06 2017 +0100 ieee80211: rename CCFS1/CCFS2 to CCFS0/CCFS1 This matches the spec, and otherwise things are really confusing with the next patch adding CCFS2. Signed-off-by: Johannes Berg drivers/net/wireless/marvell/mwifiex/tdls.c | 2 +- include/linux/ieee80211.h | 4 ++-- net/mac80211/spectmgmt.c | 4 ++-- net/mac80211/util.c | 22 +++++++++++----------- 4 files changed, 16 insertions(+), 16 deletions(-) commit 68506e9af132a6b5735c1dd4b11240da0cf5eeae Author: Arkadiusz Miskiewicz Date: Wed Feb 15 14:21:27 2017 +0100 mac80211: Print text for disassociation reason When disassociation happens only numeric reason is printed in ieee80211_rx_mgmt_disassoc(). Add text variant, too. Signed-off-by: Arkadiusz Miśkiewicz Signed-off-by: Johannes Berg net/mac80211/mlme.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f22775ede2eb58ed84b55e30768d041f607a2199 Author: Avraham Stern Date: Mon Feb 13 14:37:41 2017 +0200 ieee80211: add FT-PSK AKM suite selector Signed-off-by: Avraham Stern Signed-off-by: Johannes Berg include/linux/ieee80211.h | 1 + 1 file changed, 1 insertion(+) commit d4f29978675d7d07e7bb9da30ed05ecf588820a0 Author: Johannes Berg Date: Mon Feb 13 20:53:38 2017 +0100 cfg80211: combine two nested ifs into a single condition Combine two instances of having two nested if statements into a single one with a combined condition to reduce the indentation. Signed-off-by: Johannes Berg net/wireless/core.c | 12 ++++++------ net/wireless/util.c | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) commit ae44b502669d0cd1f167cdb48994292aa20fd3dd Author: Andrew Zaborowski Date: Fri Feb 10 04:50:23 2017 +0100 wireless: Set NL80211_EXT_FEATURE_CQM_RSSI_LIST in multiple drivers Set the NL80211_EXT_FEATURE_CQM_RSSI_LIST wiphy extended feature wholesale in all mac80211-based drivers that do not set the IEEE80211_VIF_BEACON_FILTER flags on their interfaces. mac80211 will be processing supplied RSSI values in ieee80211_rx_mgmt_beacon and will detect when the thresholds set by ieee80211_set_cqm_rssi_range_config are crossed. Remaining (few) drivers need code to enable the firmware to monitor the thresholds. This is mostly only compile-tested. Signed-off-by: Andrew Zaborowski Signed-off-by: Johannes Berg drivers/net/wireless/admtek/adm8211.c | 2 ++ drivers/net/wireless/ath/ar5523/ar5523.c | 2 ++ drivers/net/wireless/ath/ath10k/mac.c | 2 ++ drivers/net/wireless/ath/ath5k/base.c | 2 ++ drivers/net/wireless/ath/ath9k/htc_drv_init.c | 2 ++ drivers/net/wireless/ath/ath9k/init.c | 2 ++ drivers/net/wireless/ath/carl9170/main.c | 2 ++ drivers/net/wireless/ath/wcn36xx/main.c | 3 +++ drivers/net/wireless/atmel/at76c50x-usb.c | 2 ++ drivers/net/wireless/broadcom/b43/main.c | 2 ++ drivers/net/wireless/broadcom/b43legacy/main.c | 2 ++ drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c | 2 ++ drivers/net/wireless/intel/iwlegacy/3945-mac.c | 2 ++ drivers/net/wireless/intel/iwlegacy/4965-mac.c | 2 ++ drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c | 2 ++ drivers/net/wireless/mac80211_hwsim.c | 2 ++ drivers/net/wireless/marvell/libertas_tf/main.c | 2 ++ drivers/net/wireless/marvell/mwl8k.c | 2 ++ drivers/net/wireless/mediatek/mt7601u/init.c | 2 ++ drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 3 +++ drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c | 2 ++ drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 2 ++ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 ++ drivers/net/wireless/rsi/rsi_91x_mac80211.c | 2 ++ drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 2 ++ 25 files changed, 52 insertions(+) commit 2c3c5f8c0cfa8e88a4c34d7651b5712c558ab9b7 Author: Andrew Zaborowski Date: Fri Feb 10 04:50:22 2017 +0100 mac80211: Add set_cqm_rssi_range_config Support .set_cqm_rssi_range_config if the beacons are available for processing in mac80211. There's no reason that this couldn't be offloaded by mac80211-based drivers but there's no driver method for that added in this patch. Signed-off-by: Andrew Zaborowski Signed-off-by: Johannes Berg include/net/mac80211.h | 6 ++++++ net/mac80211/cfg.c | 28 ++++++++++++++++++++++++++++ net/mac80211/mlme.c | 24 ++++++++++++++++++++++++ 3 files changed, 58 insertions(+) commit 4a4b8169501b18c3450ac735a7e277b24886a651 Author: Andrew Zaborowski Date: Fri Feb 10 10:02:31 2017 +0100 cfg80211: Accept multiple RSSI thresholds for CQM Change the SET CQM command's RSSI threshold attribute to accept any number of thresholds as a sorted array. The API should be backwards compatible so that if one s32 threshold value is passed, the old mechanism is enabled. The netlink event generated is the same in both cases. cfg80211 handles an arbitrary number of RSSI thresholds but drivers have to provide a method (set_cqm_rssi_range_config) that configures a range set by a high and a low value. Drivers have to call back when the RSSI goes out of that range and there's no additional event for each time the range is reconfigured as there was with the current one-threshold API. This method doesn't have a hysteresis parameter because there's no benefit to the cfg80211 code from having the hysteresis be handled by hardware/driver in terms of the number of wakeups. At the same time it would likely be less consistent between drivers if offloaded or done in the drivers. Signed-off-by: Andrew Zaborowski Signed-off-by: Johannes Berg include/net/cfg80211.h | 13 ++++ include/uapi/linux/nl80211.h | 9 ++- net/wireless/core.c | 9 +++ net/wireless/core.h | 9 +++ net/wireless/nl80211.c | 138 +++++++++++++++++++++++++++++++++++++++---- net/wireless/rdev-ops.h | 12 ++++ net/wireless/trace.h | 22 +++++++ 7 files changed, 198 insertions(+), 14 deletions(-) commit 3eb0928fc3e4b4702462164b399acddb7f0f09fd Author: Manoharan, Rajkumar Date: Tue Feb 14 12:27:16 2017 -0800 mac80211: use DECLARE_EWMA for mesh_fail_avg As moving average is not considering fractional part, it will get stuck at the same level after certain state. For example, with current values, it can get stuck at 96. Fortunately the current threshold 95%, but if it were increased to 96 or more mesh paths would never be deactivated. Fix failure average movement by using EWMA helpers, which does take into account fractional parts. Signed-off-by: Rajkumar Manoharan [johannes: pick a larger EWMA factor for more precision with the limited range that we will feed into it, adjust to new API] Signed-off-by: Johannes Berg net/mac80211/mesh_hwmp.c | 21 +++++++++++++++------ net/mac80211/mesh_pathtbl.c | 3 +++ net/mac80211/sta_info.h | 5 ++++- 3 files changed, 22 insertions(+), 7 deletions(-) commit 69385ad9abc34a9051e983f0b62a8f8e472a9037 Author: Gargi Sharma Date: Tue Feb 28 12:31:47 2017 +0530 staging: lustre: Replace typedef with struct As per the Linux kernel coding style guidelines, using typedef for a structure type is not recommended. Hence, occurences of typedefs have been removed. To find the occurences of the structures grep was used and no uses were found. Coccinelle script: @r1@ type T; @@ typedef struct { ... } T; @script:python c1@ T2; T << r1.T; @@ coccinelle.T2=T; @@ type r1.T; identifier c1.T2; @@ -typedef struct + T2 { ... } -T ; Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_eacl.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 22171e328fc629165d0cc48841076cac1972aa42 Author: Manoj Sawai Date: Tue Feb 28 17:44:53 2017 +0530 Staging: xgifb: vb_setmode.c: Fix checkpath warnings Fix the following checkpatch.pl warnings: 1: Avoid multiple line dereference - prefer 'XGI330_RefIndex[RefreshRateTableIndex+i].ModeID' 2: Avoid multiple line dereference - prefer 'XGI330_RefIndex[RefreshRateTableIndex+(*i)].Ext_InfoFlag' Signed-off-by: Manoj Sawai Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/vb_setmode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8b0a4c106743e3a64f5e0a7bf92a815659201236 Author: Manoj Sawai Date: Tue Feb 28 17:44:52 2017 +0530 Staging: xgifb: vb_setmode.c: Fix checkpath warning Fix the following checkpatch.pl warning: Avoid multiple line dereference - prefer 'XGI330_RefIndex[RefreshRateTableIndex+(*i)].Ext_InfoFlag' Signed-off-by: Manoj Sawai Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/vb_setmode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 6cc0c259d034c6ab48f4e12f505213988e73d380 Author: Colin Ian King Date: Tue Feb 28 11:47:33 2017 +0000 staging: wilc1000: add check for kmalloc allocation failure. Add a sanity check that wid.val has been allocated, fixes a null pointer deference on stamac when calling ether_add_copy. Detected by CoverityScan, CID#1369537 ("Dereference null return value") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 2 ++ 1 file changed, 2 insertions(+) commit 2af5f669be1446a7db56c699265bc9e4cda92577 Author: Colin Ian King Date: Tue Feb 28 12:05:48 2017 +0000 staging: wilc1000: remove redundant result < 0 check The check for result < 0 is redundant because at that point result is always zero, hence we can remove this check and the netdev_err message. Detected by CoverityScan, CID#1357147 ("Logically Dead Code") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 4 ---- 1 file changed, 4 deletions(-) commit 079306e979d7f8bb1081ce43c7fc1fa8c1d45d55 Author: Heiner Kallweit Date: Tue Feb 28 08:10:38 2017 +0100 staging: fbtft: add adriver for SH1106 This patch adds support for the SH1106 OLED controller chip. It's similar to the SSD1306, however it supports only a subset of commands and the internal video memory has a different width. Major differences: - Internal video memory has a width of 132 pixels - Only a subset of commands is supported - Only page addressing mode is supported, no support for vertical and horizontal addressing - SPI frequency limited to 2 MHz according to the datasheet Successfully tested with a 1.3" OLED display with this chip and SPI interface. Signed-off-by: Heiner Kallweit Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/Kconfig | 6 ++ drivers/staging/fbtft/Makefile | 1 + drivers/staging/fbtft/fb_sh1106.c | 203 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 210 insertions(+) commit 2fad31423d1db01a341b4a7fac697e1af128c281 Author: Narcisa Ana Maria Vasile Date: Tue Feb 28 17:50:06 2017 +0200 staging: fbtft: Merged two identical conditionals into one. Merged two if conditionals into a single one, since they had exactly the same condition. Signed-off-by: Narcisa Ana Maria Vasile Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft_device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5963db92cf05cd6381b78692c33cb90d3604c53f Author: Cezary Gapinski Date: Mon Feb 27 22:26:40 2017 +0100 staging: fbtft: fix unnecessary line continuations Fix the following formatting issues: WARNING: Avoid unnecessary line continuations Signed-off-by: Cezary Gapinski Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ce08c27d1098512208a32e01aad0f80f615602d Author: Jitendra Kumar Khasdev Date: Sun Feb 26 01:48:40 2017 +0530 Staging: vt6656: Fix spaces and char limit This is a patch to usbpipe.c to fix space and char limit warning found by checkpatch tool. Signed-off-by: Jitendra Khasdev Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/usbpipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dd4eab3a3a3ea108732fe08d3332269e37751c2c Author: Stefan Wahren Date: Sat Feb 25 13:25:44 2017 +0000 staging: vchiq_arm: Don't define PAGE_SIZE There is no need to define PAGE_SIZE in the vchiq driver so remove the define from vchiq_pagelist.h . Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_pagelist.h | 3 --- 1 file changed, 3 deletions(-) commit 6d80d6362045ba87c8a5d07e656360e86c849166 Author: Stefan Wahren Date: Sat Feb 25 13:25:43 2017 +0000 staging: vchiq_arm: Include linux/mm.h vchiq_2835_arm.c uses functions and macros like put_page() or PAGE_ALIGN(). So we better include the necessary header. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 1 + 1 file changed, 1 insertion(+) commit 3791ea92b759037024c11fe05f9d6ca719fbee95 Author: Stefan Wahren Date: Sat Feb 25 13:25:42 2017 +0000 staging: vchiq_arm: Remove unnecessary includes Including those headers is unnecessary, so we better remove them. Signed-off-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 -- 1 file changed, 2 deletions(-) commit 1935c1450a8035bafee41cb3878880ffe8b4bccd Author: Arushi Singhal Date: Tue Feb 28 16:38:25 2017 +0530 staging: ks7010: Unnecessary parentheses removed and improved coding style. Unnecessary parentheses are removed as reported by checkpatch.pl to make coder nicer and to improve readability. Also coding style is improved as it's often nicer to read if &(foo[0]) is converted to foo like: memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN); memcpy(ap->bssid, ap_info->bssid, ETH_ALEN); Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit eb1397d16fe7733321d99b5f331a49167478b952 Author: Gargi Sharma Date: Mon Feb 27 10:57:50 2017 +0530 staging: rtl8192u: Remove ternary operator Relational and logical operators evaluate to either true or false. Lines with ternary operators were found using coccinelle script. In a few cases using logical && operator would suffice. Hence those were changed to improve readability. Coccinelle Script: @r@ expression A,B; symbol true,false; binary operator b = {==,!=,&&,||,>=,<=,>,<}; @@ - (A b B) ? true : false + A b B Signed-off-by: Gargi Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 483b10084d5d301089e6ad9e16a24cf501c5d253 Author: Chetan Sethi Date: Tue Feb 28 12:01:27 2017 +0900 staging: ks7010: fix coding style issue of aligning comments properly This patch fixes coding style issue of having block comments using a trailing */ on a separate line, warning as issued by checkpatch Signed-off-by: Chetan Sethi Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d670333e808a2a0e9b96b91a4ad5487a6bbb7d57 Author: Chetan Sethi Date: Tue Feb 28 12:01:07 2017 +0900 staging: ks7010: fix coding style issue of using __func__ instead of __FUNCTION__ This patch fixes coding style issue of using __func__ instead of gcc specific __FUNCTION__, warning as issued by checkpatch Signed-off-by: Chetan Sethi Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1227d7696835ae5b53a7f01649dda487bd436b1f Author: Chetan Sethi Date: Tue Feb 28 12:00:45 2017 +0900 staging: ks7010: fix coding style issue of using pr_notice instead of printk Signed-off-by: Chetan Sethi Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05be989d98b7a8ceaa3b10dd60f1f14bd163a06f Author: Chetan Sethi Date: Tue Feb 28 12:00:23 2017 +0900 staging: ks7010: fix coding style issue of enclosing complex macro value in parentheses This patch fixes error of enclosing complex macro value in parentheses, error as issued by checkpatch Signed-off-by: Chetan Sethi Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 01d9de8071dbc5585a217f579151dac5cf276e57 Author: Chetan Sethi Date: Tue Feb 28 11:59:36 2017 +0900 staging: ks7010: fixed warning of avoiding line over 80 characters This patch fixes warning of line over 80 characters, as issued by checkpatch.pl Signed-off-by: Chetan Sethi Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit c89e986910cffded3bcdf5becd96d6c50ba2de69 Author: Georgiana Rodica Chelu Date: Mon Feb 27 23:29:48 2017 +0200 staging:rtl8188eu Add spaces around binary operator Add spaces around binary operator '&' in order to increase the readability of the code. Signed-off-by: Georgiana Rodica Chelu Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_xmit.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 15411ed5c6bc98d19f85a15239e9abd7d5cd7eee Author: Narcisa Ana Maria Vasile Date: Sun Feb 26 19:47:51 2017 +0200 staging: bcm2835-audio: Fixed spacing around '&' This was reported by checkpatch.pl Signed-off-by: Narcisa Ana Maria Vasile Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac3c5ec8d4d6aa026465e61fb70bbf8baabd073b Author: Alexandru Jercaianu Date: Sat Feb 25 10:19:41 2017 +0000 Staging: bcm2835-audio: Removed redundant check This was reported by checkpatch.pl Signed-off-by: Alexandru Jercaianu Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 128aacf2c9a3625b9d54f2253e361963370514a3 Author: Michael Zoran Date: Mon Feb 27 15:35:15 2017 -0800 staging: bcm2835-camera: Update driver name Update the name of the camera driver as displayed by the Kconfig to match the audio driver style. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa5dc7c4d072decb321f80549ba775c3cdc84d82 Author: Michael Zoran Date: Mon Feb 27 15:35:14 2017 -0800 staging: bcm2835-audio: Update driver description The audio driver description contains a reference to a card. Since this is for built in audio, drop the card reference from the description. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 212afb97efe15b5b1b596a746fb6042e6f9b36a9 Author: Michael Zoran Date: Mon Feb 27 15:35:13 2017 -0800 staging: bcm2835-camera: Move driver under vc04_services The bcm2835-camera driver is part of v04_services, so it makes sense for it to be located under vc04_services to make configuration clearer. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/media/Kconfig | 2 - drivers/staging/media/Makefile | 1 - drivers/staging/media/platform/bcm2835/Kconfig | 10 - drivers/staging/media/platform/bcm2835/Makefile | 10 - drivers/staging/media/platform/bcm2835/TODO | 39 - .../media/platform/bcm2835/bcm2835-camera.c | 2028 -------------------- .../media/platform/bcm2835/bcm2835-camera.h | 145 -- drivers/staging/media/platform/bcm2835/controls.c | 1333 ------------- .../staging/media/platform/bcm2835/mmal-common.h | 53 - .../media/platform/bcm2835/mmal-encodings.h | 127 -- .../media/platform/bcm2835/mmal-msg-common.h | 50 - .../media/platform/bcm2835/mmal-msg-format.h | 81 - .../staging/media/platform/bcm2835/mmal-msg-port.h | 107 -- drivers/staging/media/platform/bcm2835/mmal-msg.h | 404 ---- .../media/platform/bcm2835/mmal-parameters.h | 689 ------- .../staging/media/platform/bcm2835/mmal-vchiq.c | 1916 ------------------ .../staging/media/platform/bcm2835/mmal-vchiq.h | 178 -- drivers/staging/vc04_services/Kconfig | 2 + drivers/staging/vc04_services/Makefile | 1 + .../staging/vc04_services/bcm2835-camera/Kconfig | 11 + .../staging/vc04_services/bcm2835-camera/Makefile | 10 + drivers/staging/vc04_services/bcm2835-camera/TODO | 39 + .../vc04_services/bcm2835-camera/bcm2835-camera.c | 2028 ++++++++++++++++++++ .../vc04_services/bcm2835-camera/bcm2835-camera.h | 145 ++ .../vc04_services/bcm2835-camera/controls.c | 1333 +++++++++++++ .../vc04_services/bcm2835-camera/mmal-common.h | 53 + .../vc04_services/bcm2835-camera/mmal-encodings.h | 127 ++ .../vc04_services/bcm2835-camera/mmal-msg-common.h | 50 + .../vc04_services/bcm2835-camera/mmal-msg-format.h | 81 + .../vc04_services/bcm2835-camera/mmal-msg-port.h | 107 ++ .../vc04_services/bcm2835-camera/mmal-msg.h | 404 ++++ .../vc04_services/bcm2835-camera/mmal-parameters.h | 689 +++++++ .../vc04_services/bcm2835-camera/mmal-vchiq.c | 1916 ++++++++++++++++++ .../vc04_services/bcm2835-camera/mmal-vchiq.h | 178 ++ 34 files changed, 7174 insertions(+), 7173 deletions(-) commit 051420a997a58fcf87fd71650ffe2e4d89f6757e Author: Michael Zoran Date: Mon Feb 27 15:35:12 2017 -0800 staging: bcm2835-audio: Move driver under vc04_services The bcm2835-audio driver is part of v04_services, so it makes sense for it to be located under vc04_services to make configuration clearer. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/bcm2835-audio/Kconfig | 7 - drivers/staging/bcm2835-audio/Makefile | 5 - drivers/staging/bcm2835-audio/TODO | 29 - drivers/staging/bcm2835-audio/bcm2835-ctl.c | 345 -------- drivers/staging/bcm2835-audio/bcm2835-pcm.c | 554 ------------- drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 910 --------------------- drivers/staging/bcm2835-audio/bcm2835.c | 250 ------ drivers/staging/bcm2835-audio/bcm2835.h | 170 ---- .../staging/bcm2835-audio/vc_vchi_audioserv_defs.h | 108 --- drivers/staging/vc04_services/Kconfig | 9 +- drivers/staging/vc04_services/Makefile | 2 + .../staging/vc04_services/bcm2835-audio/Kconfig | 7 + .../staging/vc04_services/bcm2835-audio/Makefile | 5 + drivers/staging/vc04_services/bcm2835-audio/TODO | 29 + .../vc04_services/bcm2835-audio/bcm2835-ctl.c | 345 ++++++++ .../vc04_services/bcm2835-audio/bcm2835-pcm.c | 554 +++++++++++++ .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 910 +++++++++++++++++++++ .../staging/vc04_services/bcm2835-audio/bcm2835.c | 250 ++++++ .../staging/vc04_services/bcm2835-audio/bcm2835.h | 170 ++++ .../bcm2835-audio/vc_vchi_audioserv_defs.h | 108 +++ 22 files changed, 2388 insertions(+), 2382 deletions(-) commit 4529d8914e33bf8b522b45ece87d751d006e7897 Author: Varsha Rao Date: Mon Feb 27 15:49:31 2017 +0530 staging: sm750fb: Remove blank lines after { and before } braces. Removed unnecessary blank lines after open brace and before closed braces, to fix the check patch issue. Also removed braces which were not required. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.c | 1 - drivers/staging/sm750fb/sm750_accel.c | 4 ---- drivers/staging/sm750fb/sm750_cursor.c | 4 ---- 3 files changed, 9 deletions(-) commit a4ce938653a763cb9a76b4913055fb8b76b0c645 Author: Varsha Rao Date: Mon Feb 27 15:42:55 2017 +0530 staging: sm750fb: Replace NULL comparison. Replaced NULL comparison with pCurrentDviCtrl->pfnInit. This patch fixes the following checkpatch issue: CHECK: Comparison to NULL could be written "pCurrentDviCtrl->pfnInit" Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_dvi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dca633d49c0362e9c8ac6beff151176dfd982d08 Author: Varsha Rao Date: Mon Feb 27 15:40:52 2017 +0530 staging: sm750fb: Added spaces around arithmetic operators. Added spaces around arithmetic operators (/, *), to fix the checkpatch issue. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.h | 2 +- drivers/staging/sm750fb/sm750_accel.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4e7f31c0d432654392c3a0a3ef14d012638315e6 Author: Varsha Rao Date: Mon Feb 27 15:39:47 2017 +0530 staging: sm750fb: Remove unnecessary blank lines. Removed multiple blank lines, which are not required. This patch fixes the following check patch issues: CHECK: Please don't use multiple blank lines Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_display.h | 5 ----- drivers/staging/sm750fb/ddk750_dvi.c | 4 ---- drivers/staging/sm750fb/ddk750_mode.c | 5 ----- drivers/staging/sm750fb/ddk750_mode.h | 2 -- drivers/staging/sm750fb/ddk750_power.c | 5 ----- drivers/staging/sm750fb/ddk750_power.h | 1 - drivers/staging/sm750fb/ddk750_reg.h | 4 ---- 7 files changed, 26 deletions(-) commit 47c565ea8d65d74f8030f59898682b461438a169 Author: Varsha Rao Date: Mon Feb 27 15:38:07 2017 +0530 staging: sm750fb: Add identifier to function definition argument. Added pinit_param as the identifier to function definition argument struct initchip_param and this patch fixes the checkpatch issue. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_chip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8726d48863f214af2eee5fd7e86442596231542f Author: Varsha Rao Date: Mon Feb 27 15:35:33 2017 +0530 staging: sm750fb: Fix line over 80 characters. Line over 80 characters are split to fix the following checkpatch issue: WARNING: line over 80 characters Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_chip.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f0588efb5ab12210fb2018486c0f9a437ec485fc Author: Varsha Rao Date: Mon Feb 27 15:33:45 2017 +0530 staging: sm750fb: Add braces around if statement. Added braces around if statement. This patch fixes the following checkpatch issue: CHECK: braces {} should be used on all arms of this statement Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_chip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dad5980e313ec44f87f6306cc9186ed50cfecc8a Author: Tobin C. Harding Date: Mon Feb 27 14:14:48 2017 +1100 staging: ks7010: refactor function call parameters Function call parameters are split over more lines than necessary. Also assignment statements are split after the '=' sign. This adds extra lines to the function and may also reduces readability. Refactor function call parameters and reduce the number of lines used. Put assignment statements onto single line. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 40 ++++++++++++------------------------ 1 file changed, 13 insertions(+), 27 deletions(-) commit 3188bc092655a0ef032eda9d5a251323b3008d40 Author: Tobin C. Harding Date: Mon Feb 27 14:14:47 2017 +1100 staging: ks7010: remove switch statement Switch statement uses one [trivial] case and a default case holding bulk of code. We can swap the switch statement with an if/return statement as replacement for the original switch. This can be done without changing the program logic. Remove switch statement. Use original switch parameter as conditional and return if conditional evaluates to true. Reduce level of indentation. Do not change the program logic. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 89 +++++++++++++++++------------------- 1 file changed, 43 insertions(+), 46 deletions(-) commit cf57e659d5be6459e642dd451268bdb3437af7ff Author: Tobin C. Harding Date: Mon Feb 27 14:14:46 2017 +1100 staging: ks7010: move logic operator to end of line Logic operator (&&) is place at the start of the line. Kernel standards suggest that logical operators should be placed at the end of the line. Move logical operator to the end of the previous line. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9f9d7030e4e1f9c9096a60dcb6429b41868e0ba9 Author: Tobin C. Harding Date: Mon Feb 27 14:14:45 2017 +1100 staging: ks7010: fix checkpatch MULTILINE_DEREFERENCE Checkpatch emits WARNING: Avoid multiple line dereference. Move dereference onto single line. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d5f1db31fb03072a11d8e5bb1e81c9b3982195b7 Author: Tobin C. Harding Date: Mon Feb 27 14:14:44 2017 +1100 staging: ks7010: invert conditional, reduce indent Function _ks_wlan_hw_power_save has 5 levels of indentation. Reducing the amount of indentation may make code clearer to read. Also a number of other checkpatch warnings may be removed if we first reduce the level of indentation in this function. Invert conditional and return from function if new conditional evaluates to true. Repeat on subsequent conditional. Reduce indentation without changing the program logic. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 122 ++++++++++++++++++----------------- 1 file changed, 62 insertions(+), 60 deletions(-) commit 6d642eaa957d86d1b42e7d958f8fe7aa978ac840 Author: Tahia Khan Date: Fri Feb 24 17:05:10 2017 -0500 staging: wilc1000: Rename network_info member str_rssi to rssi_history Change name of str_rssi to rssi_history within the network_info struct for clarity. Signed-off-by: Tahia Khan Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/coreconfigurator.h | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) commit 36d98c1898ab2bb8b7839608431807025ee444c7 Author: Tahia Khan Date: Fri Feb 24 17:05:07 2017 -0500 staging: wilc1000: Rename tstrRSSI members and change type of u8Full to bool Remove Hungarian notation and camel casing from all tstrRSSI members' names. Additionally, change type of u8Full to bool since it only takes values 1 or 0. Signed-off-by: Tahia Khan Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/coreconfigurator.h | 6 +++--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) commit f3ae44fc8ecca22aad4b8505fed296f5763e5788 Author: Tahia Khan Date: Fri Feb 24 17:05:04 2017 -0500 staging: wilc1000: Rename struct tstrRSSI to rssi_history_buffer Rename struct tstrRSSI to rssi_history_buffer for clarity and to remove camel casing. Signed-off-by: Tahia Khan Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/coreconfigurator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d351c2db5420bb17dcd2d9aac7ddb5f64c6d04b3 Author: Varsha Rao Date: Sat Feb 25 17:53:58 2017 +0530 staging: speakup: Replace BUG_ON() with WARN_ON(). BUG_ON() is replaced with WARN_ON() and EINVAL is returned, when WARN_ON() is true. This fixes the following checkpatch issue: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON(). Signed-off-by: Varsha Rao Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/kobjects.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ec72ba7bffdf98e1e53ad168259cd78cd48af3b5 Author: James Simmons Date: Sun Feb 26 19:41:59 2017 -0500 staging: lustre: lnet: use struct bio_vec instead of typedef Kill off lnet_kiov_t and use struct bio_vec directly. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 8 ++++---- drivers/staging/lustre/include/linux/lnet/lib-types.h | 6 +++--- drivers/staging/lustre/include/linux/lnet/types.h | 7 +++---- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 6 +++--- drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h | 12 ++++++------ drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 6 +++--- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c | 4 ++-- drivers/staging/lustre/lnet/lnet/lib-move.c | 10 +++++----- drivers/staging/lustre/lnet/selftest/conrpc.c | 4 ++-- drivers/staging/lustre/lnet/selftest/selftest.h | 2 +- 10 files changed, 32 insertions(+), 33 deletions(-) commit f997ffa1831a4c3a412f53b1a74acf6c53d50f17 Author: James Simmons Date: Sun Feb 26 19:41:58 2017 -0500 staging: lustre: lnet: remove unused lnet_md_iovec_t The typedef lnet_md_iovec_t is never used so kill it off. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/types.h | 3 --- 1 file changed, 3 deletions(-) commit c2c2a39b4f373c721a56016b07b514a3e82dd6ac Author: James Simmons Date: Sun Feb 26 19:41:57 2017 -0500 staging: lustre: lnet: remove LNET_SEQ_BASETYPE The lnet_seq_t is a simple unsigned long so lets simplify it. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lib-types.h | 4 ++-- drivers/staging/lustre/include/linux/lnet/types.h | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) commit 8942bc2bca3884100725414b36d7741de029dbdd Author: James Simmons Date: Sun Feb 26 19:41:56 2017 -0500 staging: lustre: lnet: change lnet_ack_req_t to proper enum Change lnet_ack_req_t from typedef to proper enum. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/api.h | 2 +- drivers/staging/lustre/include/linux/lnet/types.h | 4 ++-- drivers/staging/lustre/lnet/lnet/lib-move.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 4d237d631ea3b1dbc8b645ba23bb27444c043c7d Author: James Simmons Date: Sun Feb 26 19:41:55 2017 -0500 staging: lustre: lnet: change lnet_event_kind_t to proper enum Change lnet_event_kind_t from typedef to proper enum. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/api.h | 2 +- drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 2 +- drivers/staging/lustre/include/linux/lnet/types.h | 6 +++--- drivers/staging/lustre/lnet/lnet/lib-move.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-msg.c | 2 +- drivers/staging/lustre/lnet/selftest/selftest.h | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) commit 9abb74226c20e5ee2e4eccbdf0ab206dd95cdec9 Author: James Simmons Date: Sun Feb 26 19:41:54 2017 -0500 staging: lustre: lnet: change lnet_ins_pos_t to proper enum Change lnet_ins_pos_t from typedef to proper enum. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/api.h | 4 ++-- drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 2 +- drivers/staging/lustre/include/linux/lnet/types.h | 6 +++--- drivers/staging/lustre/lnet/lnet/lib-me.c | 4 ++-- drivers/staging/lustre/lnet/lnet/lib-ptl.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) commit 058b88d3122b609979969ced4e3f62b634e56487 Author: James Simmons Date: Sun Feb 26 19:41:53 2017 -0500 staging: lustre: lnet: change lnet_unlink_t to proper enum Change lnet_unlink_t from typedef to proper enum. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/api.h | 8 ++++---- drivers/staging/lustre/include/linux/lnet/lib-types.h | 2 +- drivers/staging/lustre/include/linux/lnet/types.h | 4 ++-- drivers/staging/lustre/lnet/lnet/lib-md.c | 4 ++-- drivers/staging/lustre/lnet/lnet/lib-me.c | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) commit 77f49e9b0a2babb948c5a17c8e2cce1ec5117b61 Author: James Simmons Date: Sun Feb 26 19:41:52 2017 -0500 staging: lustre: lnet: change lnet_msg_type_t to proper enum Change lnet_msg_type_t from typedef to proper enum. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 06ef1af8b48455d17e26732bbcdc685d6b319a02 Author: James Simmons Date: Sun Feb 26 19:41:51 2017 -0500 staging: lustre: lnet: change lnet_process_id_t to proper structure Change lnet_process_id_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/api.h | 12 ++++---- .../staging/lustre/include/linux/lnet/lib-lnet.h | 11 +++---- .../staging/lustre/include/linux/lnet/lib-types.h | 6 ++-- drivers/staging/lustre/include/linux/lnet/lnetst.h | 12 ++++---- drivers/staging/lustre/include/linux/lnet/nidstr.h | 2 +- drivers/staging/lustre/include/linux/lnet/types.h | 12 ++++---- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 4 +-- .../staging/lustre/lnet/klnds/socklnd/socklnd.c | 26 ++++++++-------- .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 15 +++++----- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 11 +++---- drivers/staging/lustre/lnet/lnet/api-ni.c | 24 +++++++-------- drivers/staging/lustre/lnet/lnet/lib-me.c | 6 ++-- drivers/staging/lustre/lnet/lnet/lib-move.c | 20 ++++++------- drivers/staging/lustre/lnet/lnet/lib-ptl.c | 8 ++--- drivers/staging/lustre/lnet/lnet/nidstrings.c | 2 +- drivers/staging/lustre/lnet/lnet/router.c | 2 +- drivers/staging/lustre/lnet/selftest/brw_test.c | 4 +-- drivers/staging/lustre/lnet/selftest/conrpc.c | 2 +- drivers/staging/lustre/lnet/selftest/console.c | 35 +++++++++++----------- drivers/staging/lustre/lnet/selftest/console.h | 14 +++++---- drivers/staging/lustre/lnet/selftest/framework.c | 4 +-- drivers/staging/lustre/lnet/selftest/ping_test.c | 2 +- drivers/staging/lustre/lnet/selftest/rpc.c | 11 +++---- drivers/staging/lustre/lnet/selftest/selftest.h | 22 +++++++------- drivers/staging/lustre/lustre/include/lustre_net.h | 8 ++--- drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- drivers/staging/lustre/lustre/llite/super25.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 5 ++-- drivers/staging/lustre/lustre/ptlrpc/client.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/connection.c | 6 ++-- drivers/staging/lustre/lustre/ptlrpc/events.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 4 +-- 32 files changed, 153 insertions(+), 145 deletions(-) commit 16b9ab7f527b294e08f166e640baf7f3ed4c5c98 Author: James Simmons Date: Sun Feb 26 19:41:50 2017 -0500 staging: lustre: lnet: change lnet_event_t to proper structure Change lnet_event_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/api.h | 4 ++-- drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 4 ++-- drivers/staging/lustre/include/linux/lnet/lib-types.h | 4 ++-- drivers/staging/lustre/include/linux/lnet/types.h | 6 +++--- drivers/staging/lustre/lnet/lnet/api-ni.c | 4 ++-- drivers/staging/lustre/lnet/lnet/lib-eq.c | 16 ++++++++-------- drivers/staging/lustre/lnet/lnet/lib-md.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-me.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-move.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-msg.c | 8 ++++---- drivers/staging/lustre/lnet/lnet/router.c | 2 +- drivers/staging/lustre/lnet/selftest/rpc.c | 2 +- drivers/staging/lustre/lustre/include/lustre_net.h | 12 ++++++------ drivers/staging/lustre/lustre/ptlrpc/events.c | 14 +++++++------- 14 files changed, 41 insertions(+), 41 deletions(-) commit ef391eac72ea09cc1d33be88209c0e360bb375e9 Author: James Simmons Date: Sun Feb 26 19:41:49 2017 -0500 staging: lustre: lnet: change lnet_md_t to proper structure Change lnet_md_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/api.h | 4 +-- .../staging/lustre/include/linux/lnet/lib-lnet.h | 4 +-- drivers/staging/lustre/include/linux/lnet/types.h | 30 +++++++++++----------- drivers/staging/lustre/lnet/lnet/api-ni.c | 4 +-- drivers/staging/lustre/lnet/lnet/lib-md.c | 10 ++++---- drivers/staging/lustre/lnet/lnet/router.c | 2 +- drivers/staging/lustre/lnet/selftest/rpc.c | 4 +-- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 8 +++--- drivers/staging/lustre/lustre/ptlrpc/pers.c | 2 +- .../staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 2 +- 10 files changed, 35 insertions(+), 35 deletions(-) commit d9331056ba22b3d19e4def6d3f11d0f01be933fe Author: James Simmons Date: Sun Feb 26 19:41:48 2017 -0500 staging: lustre: lnet: change lnet_counter_t to proper structure Change lnet_counter_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 2 +- drivers/staging/lustre/include/linux/lnet/lib-types.h | 2 +- drivers/staging/lustre/include/linux/lnet/types.h | 4 ++-- drivers/staging/lustre/lnet/lnet/api-ni.c | 10 +++++----- drivers/staging/lustre/lnet/lnet/lib-msg.c | 6 +++--- drivers/staging/lustre/lnet/lnet/router_proc.c | 2 +- drivers/staging/lustre/lnet/selftest/console.c | 4 ++-- drivers/staging/lustre/lnet/selftest/rpc.h | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) commit 79d2c25cfe89a6e54da3c5847f804fef89aa84c2 Author: James Simmons Date: Sun Feb 26 19:41:47 2017 -0500 staging: lustre: lnet: give LNET_MATCH* enum a name The LNET_MATCH* flags are an enum without a name. Lets label that enum. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lib-types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a6cd850fec67a747bdee6ddd853ea4fd5ed5663 Author: James Simmons Date: Sun Feb 26 19:41:46 2017 -0500 staging: lustre: lnet: change lnet_t to proper structure Change lnet_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 2 +- drivers/staging/lustre/include/linux/lnet/lib-types.h | 4 ++-- drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 5342a3378b0321cfdf9bf2b71de546281dd82ffe Author: James Simmons Date: Sun Feb 26 19:41:45 2017 -0500 staging: lustre: lnet: change lnet_portal_t to proper structure Change lnet_portal_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 10 +++++----- drivers/staging/lustre/include/linux/lnet/lib-types.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) commit e99cc0f1a29d6e85eb7317120e6053d470b52a8d Author: James Simmons Date: Sun Feb 26 19:41:44 2017 -0500 staging: lustre: lnet: change lnet_rtrbuf_t to proper structure Change lnet_rtrbuf_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 2 +- drivers/staging/lustre/include/linux/lnet/lib-types.h | 4 ++-- drivers/staging/lustre/lnet/lnet/lib-move.c | 8 ++++---- drivers/staging/lustre/lnet/lnet/router.c | 18 +++++++++--------- 4 files changed, 16 insertions(+), 16 deletions(-) commit 91a39e293d612949a3e2b81785e93dad69688ebd Author: James Simmons Date: Sun Feb 26 19:41:43 2017 -0500 staging: lustre: lnet: change lnet_rtrbufpool_t to proper structure Change lnet_rtrbufpool_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 2 +- drivers/staging/lustre/include/linux/lnet/lib-types.h | 8 ++++---- drivers/staging/lustre/lnet/lnet/lib-move.c | 10 +++++----- drivers/staging/lustre/lnet/lnet/router.c | 18 +++++++++--------- drivers/staging/lustre/lnet/lnet/router_proc.c | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) commit 37c324c61c3a03a8c489e90acb960facb09f0cee Author: James Simmons Date: Sun Feb 26 19:41:42 2017 -0500 staging: lustre: lnet: change lnet_remotenet_t to proper structure Change lnet_remotenet_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/lnet/lib-lnet.h | 2 +- .../staging/lustre/include/linux/lnet/lib-types.h | 4 ++-- drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-move.c | 6 +++--- drivers/staging/lustre/lnet/lnet/router.c | 24 +++++++++++----------- drivers/staging/lustre/lnet/lnet/router_proc.c | 4 ++-- 6 files changed, 21 insertions(+), 21 deletions(-) commit e3d2716c6f70b8142becd109cb07708d1bca0626 Author: James Simmons Date: Sun Feb 26 19:41:41 2017 -0500 staging: lustre: lnet: change lnet_route_t to proper structure Change lnet_route_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/lnet/lib-lnet.h | 2 +- .../staging/lustre/include/linux/lnet/lib-types.h | 6 ++--- drivers/staging/lustre/lnet/lnet/lib-move.c | 12 +++++----- drivers/staging/lustre/lnet/lnet/router.c | 26 ++++++++++++---------- drivers/staging/lustre/lnet/lnet/router_proc.c | 11 ++++----- 5 files changed, 30 insertions(+), 27 deletions(-) commit 5716397ac2bba4a9e60ed8bb80926a7322e73565 Author: James Simmons Date: Sun Feb 26 19:41:40 2017 -0500 staging: lustre: lnet: change lnet_peer_t to proper structure Change lnet_peer_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/lnet/lib-lnet.h | 20 +++++++-------- .../staging/lustre/include/linux/lnet/lib-types.h | 6 ++--- drivers/staging/lustre/lnet/lnet/lib-move.c | 20 +++++++-------- drivers/staging/lustre/lnet/lnet/peer.c | 30 +++++++++++----------- drivers/staging/lustre/lnet/lnet/router.c | 30 +++++++++++----------- drivers/staging/lustre/lnet/lnet/router_proc.c | 10 +++++--- 6 files changed, 59 insertions(+), 57 deletions(-) commit ff67f7f679562d99e17b79dfbf64811f419df0d4 Author: James Simmons Date: Sun Feb 26 19:41:39 2017 -0500 staging: lustre: lnet: change lnet_rc_data_t to proper structure Change lnet_rc_data_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lib-types.h | 6 +++--- drivers/staging/lustre/lnet/lnet/router.c | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) commit 21e86fd3885209988c0fa1007c3f243a309d26da Author: James Simmons Date: Sun Feb 26 19:41:38 2017 -0500 staging: lustre: lnet: change lnet_ni_t to proper structure Change lnet_ni_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/lnet/lib-lnet.h | 42 ++++++++--------- .../staging/lustre/include/linux/lnet/lib-types.h | 10 ++-- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 26 ++++++----- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 17 +++---- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 53 ++++++++++++---------- .../lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c | 2 +- .../staging/lustre/lnet/klnds/socklnd/socklnd.c | 43 +++++++++--------- .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 41 +++++++++-------- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 15 +++--- drivers/staging/lustre/lnet/lnet/acceptor.c | 2 +- drivers/staging/lustre/lnet/lnet/api-ni.c | 40 ++++++++-------- drivers/staging/lustre/lnet/lnet/config.c | 8 ++-- drivers/staging/lustre/lnet/lnet/lib-move.c | 38 ++++++++-------- drivers/staging/lustre/lnet/lnet/lib-msg.c | 2 +- drivers/staging/lustre/lnet/lnet/lo.c | 8 ++-- drivers/staging/lustre/lnet/lnet/peer.c | 8 ++-- drivers/staging/lustre/lnet/lnet/router.c | 14 +++--- drivers/staging/lustre/lnet/lnet/router_proc.c | 5 +- 18 files changed, 195 insertions(+), 179 deletions(-) commit 0fffc2612796433cfc37f3a65e4741efd1e0add6 Author: James Simmons Date: Sun Feb 26 19:41:37 2017 -0500 staging: lustre: lnet: change lnd_t to proper structure Change lnd_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 6 +++--- drivers/staging/lustre/include/linux/lnet/lib-types.h | 6 +++--- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 4 ++-- drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 2 +- drivers/staging/lustre/lnet/lnet/api-ni.c | 14 +++++++------- drivers/staging/lustre/lnet/lnet/lo.c | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) commit f1e0bfb073c431432bd3455ccd5345f9ad6f8a99 Author: James Simmons Date: Sun Feb 26 19:41:36 2017 -0500 staging: lustre: lnet: change lnet_test_peer_t to proper structure Change lnet_test_peer_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lib-types.h | 4 ++-- drivers/staging/lustre/lnet/lnet/lib-move.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) commit 5272e8068fc4361cdfbdde4ed5432cd8489759f9 Author: James Simmons Date: Sun Feb 26 19:41:35 2017 -0500 staging: lustre: lnet: change lnet_libmd_t to proper structure Change lnet_libmd_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/lnet/lib-lnet.h | 40 +++++++++++----------- .../staging/lustre/include/linux/lnet/lib-types.h | 4 +-- drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-md.c | 12 +++---- drivers/staging/lustre/lnet/lnet/lib-me.c | 4 +-- drivers/staging/lustre/lnet/lnet/lib-move.c | 6 ++-- drivers/staging/lustre/lnet/lnet/lib-msg.c | 6 ++-- drivers/staging/lustre/lnet/lnet/lib-ptl.c | 6 ++-- 8 files changed, 40 insertions(+), 40 deletions(-) commit 70ec6db9ea6a5d8822326b98f949522ff157a558 Author: James Simmons Date: Sun Feb 26 19:41:34 2017 -0500 staging: lustre: lnet: change lnet_me_t to proper structure Change lnet_me_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 18 +++++++++--------- drivers/staging/lustre/include/linux/lnet/lib-types.h | 6 +++--- drivers/staging/lustre/lnet/lnet/lib-md.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-me.c | 4 ++-- drivers/staging/lustre/lnet/lnet/lib-ptl.c | 14 +++++++------- 5 files changed, 22 insertions(+), 22 deletions(-) commit 96e78422183e0663f82bb7bd84ec2e9c0d735d3c Author: James Simmons Date: Sun Feb 26 19:41:33 2017 -0500 staging: lustre: lnet: change lnet_eq_t to proper structure Change lnet_eq_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 14 +++++++------- drivers/staging/lustre/include/linux/lnet/lib-types.h | 6 +++--- drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-eq.c | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) commit 3589a055706511c1f94646022ae86576ba0b87be Author: James Simmons Date: Sun Feb 26 19:41:32 2017 -0500 staging: lustre: lnet: change lnet_libhandle_t to proper structure Change lnet_libhandle_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 16 ++++++++-------- drivers/staging/lustre/include/linux/lnet/lib-types.h | 10 +++++----- drivers/staging/lustre/lnet/lnet/api-ni.c | 7 ++++--- 3 files changed, 17 insertions(+), 16 deletions(-) commit a9a5ac68c5217f3fac3f090f9329804c3ee706bb Author: James Simmons Date: Sun Feb 26 19:41:31 2017 -0500 staging: lustre: lnet: change lnet_msg_t to proper structure Change lnet_msg_t from typedef to proper structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/lnet/lib-lnet.h | 43 +++++++------ .../staging/lustre/include/linux/lnet/lib-types.h | 11 ++-- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 8 +-- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 10 +-- .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 6 +- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 8 +-- drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-move.c | 75 +++++++++++----------- drivers/staging/lustre/lnet/lnet/lib-msg.c | 25 ++++---- drivers/staging/lustre/lnet/lnet/lib-ptl.c | 4 +- drivers/staging/lustre/lnet/lnet/lo.c | 6 +- 11 files changed, 102 insertions(+), 96 deletions(-) commit 971175ccde9332573c617f65d4f53b836c934270 Author: James Simmons Date: Sun Feb 26 19:41:30 2017 -0500 staging: lustre: lnet: remove generic lnet_handle_any_t With the creation of unique handlers we can remove the barely used generic handlers. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/api.h | 1 - drivers/staging/lustre/include/linux/lnet/types.h | 41 ++--------------------- drivers/staging/lustre/lnet/lnet/api-ni.c | 11 ------ 3 files changed, 3 insertions(+), 50 deletions(-) commit 175888102b17ec080636710b2c1388000656e0e7 Author: James Simmons Date: Sun Feb 26 19:41:29 2017 -0500 staging: lustre: lnet: change lnet_handle_me_t to proper struct Change lnet_handle_me_t from a typedef of another typedef into a proper stand alone structure. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/api.h | 10 +++++----- drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 4 ++-- drivers/staging/lustre/include/linux/lnet/types.h | 6 ++++-- drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-md.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-me.c | 8 ++++---- drivers/staging/lustre/lnet/selftest/rpc.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 6 +++--- 8 files changed, 21 insertions(+), 19 deletions(-) commit 9bcb80cb59fc2a008331d92cd8a2111f868ec8db Author: James Simmons Date: Sun Feb 26 19:41:28 2017 -0500 staging: lustre: lnet: change lnet_handle_md_t to proper struct Change lnet_handle_md_t from a typedef of another typedef into a proper stand alone structure. Create the inline functions LNetInvalidateMDHandle and LNetMDHandleIsInvalid to handle this new piece of data. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/api.h | 10 ++++----- .../staging/lustre/include/linux/lnet/lib-lnet.h | 4 ++-- .../staging/lustre/include/linux/lnet/lib-types.h | 4 ++-- drivers/staging/lustre/include/linux/lnet/types.h | 25 ++++++++++++++++++++-- drivers/staging/lustre/lnet/lnet/api-ni.c | 21 ++++++++++-------- drivers/staging/lustre/lnet/lnet/lib-md.c | 7 +++--- drivers/staging/lustre/lnet/lnet/lib-move.c | 4 ++-- drivers/staging/lustre/lnet/lnet/router.c | 12 +++++------ drivers/staging/lustre/lnet/selftest/rpc.c | 10 ++++----- drivers/staging/lustre/lnet/selftest/selftest.h | 16 +++++++------- drivers/staging/lustre/lustre/include/lustre_net.h | 10 ++++----- drivers/staging/lustre/lustre/ptlrpc/client.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 4 ++-- 13 files changed, 77 insertions(+), 52 deletions(-) commit 48be378d0facca74a4f0ffe12ad122b7ed9e3939 Author: James Simmons Date: Sun Feb 26 19:41:27 2017 -0500 staging: lustre: lnet: change lnet_handle_eq_t to proper struct Change lnet_handle_eq_t from a typedef of another typedef into a proper stand alone structure. Create the inline functions LNetInvalidateEQHandle and LNetEQHandleIsInvalid to handle this new piece of data. Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/lnet/api.h | 8 +++---- .../staging/lustre/include/linux/lnet/lib-lnet.h | 6 +++--- .../staging/lustre/include/linux/lnet/lib-types.h | 4 ++-- drivers/staging/lustre/include/linux/lnet/types.h | 25 ++++++++++++++++++++-- drivers/staging/lustre/lnet/lnet/api-ni.c | 4 ++-- drivers/staging/lustre/lnet/lnet/lib-eq.c | 6 +++--- drivers/staging/lustre/lnet/lnet/lib-md.c | 4 ++-- drivers/staging/lustre/lnet/lnet/router.c | 2 +- drivers/staging/lustre/lnet/selftest/rpc.c | 4 ++-- drivers/staging/lustre/lustre/include/lustre_net.h | 2 +- drivers/staging/lustre/lustre/ptlrpc/events.c | 2 +- 11 files changed, 44 insertions(+), 23 deletions(-) commit 8ea43b5a62f8227594b2a093c21978842b33376e Author: James Simmons Date: Sun Feb 26 19:41:26 2017 -0500 staging: lustre: socklnd: change UAPI typedefs to proper structure The upstream kernel requires proper structures so convert all the UAPI typedefs in socklnd.h. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/18506 Reviewed-by: Dmitry Eremin Reviewed-by: Doug Oucharek Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/lnet/socklnd.h | 14 ++++---- .../staging/lustre/lnet/klnds/socklnd/socklnd.c | 8 ++--- .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 14 ++++---- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 22 ++++++------- .../lustre/lnet/klnds/socklnd/socklnd_proto.c | 38 +++++++++++----------- 5 files changed, 48 insertions(+), 48 deletions(-) commit ccbadf70c69b7eb9fd9aaab38cac0296d91fe3e9 Author: Derek Robson Date: Sun Feb 26 15:33:29 2017 +1300 Staging: rtl8712: wlan_bssdef.h - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/wlan_bssdef.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit de640ee3b68be396505472f199c809128b430052 Author: Derek Robson Date: Sun Feb 26 15:33:09 2017 +1300 Staging: rtl8712: wifi.h - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/wifi.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 732e5ab109a62a8dc20dbcc671cc7582dd09d39a Author: Derek Robson Date: Sun Feb 26 15:32:48 2017 +1300 Staging: rtl8712: rtl871x_recv.h - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_recv.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b355da4c7cfbfd1ac17d2f68f98aa944a83b8f14 Author: Derek Robson Date: Sun Feb 26 15:32:29 2017 +1300 Staging: rtl8712: rtl871x_pwrctrl.h - style fix Fixed style fo block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_pwrctrl.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 875f3a6bcedd6cbea88b1ff2c9707bd47c207699 Author: Derek Robson Date: Sun Feb 26 15:31:33 2017 +1300 Staging: rtl8712: rtl871x_mlme.h - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_mlme.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit a81ad0da850e1d3fb8b466b0d38634b23a852c9c Author: Derek Robson Date: Sun Feb 26 15:31:12 2017 +1300 Staging: rtl8712: rtl871x_io.h - style fix Fixed style of block comments. Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_io.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 404da57fe9a768c53567fac30f3e9267b2ebc5e6 Author: Derek Robson Date: Sun Feb 26 15:30:53 2017 +1300 Staging: rtl8712: rtl871x_event.h - style fix Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_event.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 50b75bd5ba9c255b4ba23e62dd2ddbf65e04a2ce Author: Derek Robson Date: Sun Feb 26 15:30:31 2017 +1300 Staging: rtl8712: rtl871x_cmd.h - block comments Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3cbd227956c2f8f61c53068d176443d46fa81e64 Author: Alexander Mikhalevich Date: Sat Feb 25 23:42:08 2017 +0300 staging: rtl8712: Fix checkpatch.pl warning WARNING: Avoid multiple line dereference - prefer 'param->u.crypt.key' Signed-off-by: Alexander Mikhalevich Acked-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1b59ea8424c626a3e58c4fa8cdad622a2ce272ae Author: Varsha Rao Date: Sat Feb 25 15:25:30 2017 +0530 staging: rtl8712: Remove space after a cast. This patch fixes the following checkpatch issue: CHECK: No space is necessary after a cast Signed-off-by: Varsha Rao Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/os_intfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eafe040b9d3908f1e1bfa1e6e2e6caa0141c73ca Author: Varsha Rao Date: Sat Feb 25 15:25:26 2017 +0530 staging: rtl8712: Removes the FSF mailing address. This patch fixes the checkpatch issue by removing the Free Software Foundation's mailing address from the sample GPL notice. Because the FSF has changed address in the past, and may change again. Linux already includes a copy of the GPL. Signed-off-by: Varsha Rao Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/os_intfs.c | 4 ---- 1 file changed, 4 deletions(-) commit 91001b423241a934ee9a82399e5602d8d6d2a8ef Author: Abhijit Naik Date: Thu Feb 23 18:31:00 2017 +0530 staging: bcm2835-audio: Removed braces of single statement blocks bcm2835-vchiq.c: fixing WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Abhijit Naik Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 01bf2ffa22dbdb9fdac0ed1d2896ebb5f60bf26f Author: Abhijit Naik Date: Thu Feb 23 18:30:59 2017 +0530 staging: bcm2835-audi: Removed return statement from void functions bcm2835-vchiq.c: fixing WARNING: void function return statements are not generally useful Signed-off-by: Abhijit Naik Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 3 --- 1 file changed, 3 deletions(-) commit 36ba7ca84ac8612b80a7af5229b5ace5c631dcf2 Author: Nathan Howard Date: Fri Feb 17 15:16:19 2017 -0500 staging: bcm2835-audio: bcm2835.h: fix macro coding style issue Fix checkpatch.pl warning of the form "CHECK: Macro argument 'vol' may be better as '(vol)' to avoid precedence issues." Signed-off-by: Nathan Howard Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1e26728d90cdde8a655437ee8c2714ac4908b3cb Author: Nathan Howard Date: Fri Feb 17 15:16:18 2017 -0500 staging: bcm2835-audio: bcm2835.h: fix printk coding style issue Fix checkpatch.pl warning of the form "WARNING: Prefer subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ..." Signed-off-by: Nathan Howard Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b41fb0ac8fe74fa1d3f825f21d874a5c625530a2 Author: Nathan Howard Date: Fri Feb 17 15:16:17 2017 -0500 staging: bcm2835-audio: bcm2835.h: fix block comment warning Fix checkpatch.pl warning: "Block comments use * on subsequent lines." Signed-off-by: Nathan Howard Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a17b3703614e020c69351eed914d9f2ff3f1b77a Author: Daniel Perez de Andres Date: Fri Feb 17 10:18:19 2017 +0100 Staging: BCM2835-Audio: bcm2835-pcm: single line block statement braces fix A single line statement under an if clause doesn't require braces {} Signed-off-by: Daniel Perez de Andres Signed-off-by: Greg Kroah-Hartman drivers/staging/bcm2835-audio/bcm2835-pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8e17858a8818b40d66e83de2bf3724c64eaad72d Author: Dan Carpenter Date: Sat Feb 18 02:20:15 2017 +0300 staging: bcm2835-camera: fix error handling in init The unwinding here isn't right. We don't free gdev[0] and instead free 1 step past what was allocated. Also we can't allocate "dev" then we should unwind instead of returning directly. Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Signed-off-by: Dan Carpenter Acked-by: walter harms Signed-off-by: Greg Kroah-Hartman drivers/staging/media/platform/bcm2835/bcm2835-camera.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 0743a78fde7cc561ad53b657be693e7f9981a73a Author: Gargi Sharma Date: Mon Feb 20 00:44:18 2017 +0530 staging: media: Remove ternary operator Relational and logical operators evaluate to either true or false. Explicit conversion is not needed so remove the ternary operator. Done using coccinelle: @r@ expression A,B; symbol true,false; binary operator b = {==,!=,&&,||,>=,<=,>,<}; @@ - (A b B) ? true : false + A b B Signed-off-by: Gargi Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/media/platform/bcm2835/controls.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 47db0f6c9a2210dc5a7c45551d63d7d69b5600a6 Author: Gargi Sharma Date: Fri Feb 24 01:58:18 2017 +0530 staging: vc04_services: Remove explicit NULL comparison Replace explicit NULL comparison with ! operator to simplify code. Found with Coccinelle script: @@ expression ptr; position p; statement s0, s1; @@ ptr@p = \(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|usb_alloc_urb\| alloc_netdev\|dev_alloc_skb\)(...) ... when != ptr if ( ( + ! ptr - == NULL ) ) s0 else s1 Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ee64912417a1021924c99f4c808cb1fffec55d1 Author: Yamanappagouda Patil Date: Thu Feb 23 20:00:53 2017 +0530 staging: vc04_services: Fixed "space prohibited after that open/close parenthesis" erros. Fixed checkpath.pl erros "space prohibited after that open/close parenthesis" in vchiq_version.c file. Signed-off-by: Yamanappagouda Patil Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_version.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 0169acaea518098001bcdc239436cea821b28e1f Author: simran singhal Date: Wed Feb 22 00:21:03 2017 +0530 staging: vc04_services: Using macro DIV_ROUND_UP The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)). It clarifies the divisor calculations. This occurence was detected 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: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 +- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6e475350a4068580bfcec63ba5d9836d31965784 Author: Yamanappagouda Patil Date: Tue Feb 21 21:31:01 2017 +0530 staging: vc04_services: Fixed 'missing a blank line' warnings. Fixed checkpatch.pl "missing a blank line after declarations" warning messages in vc04_services module. Signed-off-by: Yamanappagouda Patil Signed-off-by: Greg Kroah-Hartman .../interface/vchiq_arm/vchiq_2835_arm.c | 3 ++ .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 39 +++++++++++++++++++--- .../vc04_services/interface/vchiq_arm/vchiq_core.c | 34 ++++++++++++++++++- .../interface/vchiq_arm/vchiq_debugfs.c | 3 ++ .../interface/vchiq_arm/vchiq_kern_lib.c | 4 +++ .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 10 ++++++ 6 files changed, 88 insertions(+), 5 deletions(-) commit 57ce4df98ee10a1d8438599a20c80388802c9488 Author: simran singhal Date: Sun Feb 19 02:52:07 2017 +0530 staging: vt6655: Compress return logic Simplify function returns by merging assignment and return into one command line. Found with Coccinelle @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit dff1e0ef86cba81bf3d892036a28e8b889b7e72c Author: Katie Dunne Date: Mon Feb 20 13:53:07 2017 -0800 staging: vt6656: remove blank lines at opening and closing braces Removes unnecessary blank lines after opening and before closing braces. These instances were found by checkpatch.pl. Signed-off-by: Katie Dunne Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/wcmd.c | 3 --- 1 file changed, 3 deletions(-) commit bdc58e3bef647b39145ebc951bb4b1904e239212 Author: simran singhal Date: Wed Feb 22 14:40:15 2017 +0530 staging: most: Using macro DIV_ROUND_UP The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)). It clarifies the divisor calculations. This occurence was detected 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: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/most/hdm-dim2/dim2_hal.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 3efc66167007f4bd77d7690bf35ef1339b8bf374 Author: Katie Dunne Date: Sun Feb 19 21:14:29 2017 -0800 staging: sm750fb: add spaces around operators Add spaces around operators -, *, ?:, >>, << to conform to kernel style. These instances were found with checkpatch.pl Signed-off-by: Katie Dunne Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750_cursor.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 144634a6b42146834fb58ddd629545edd3e518db Author: Katie Dunne Date: Sun Feb 19 20:38:57 2017 -0800 staging: sm750fb: add curly braces to if-statements Add curly braces to if-statements for style compliance. These cases are found by checkpatch.pl Signed-off-by: Katie Dunne Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 06f6c8d4010d074c2f163eb0e1d17ad5e5574784 Author: Sreya Mittal Date: Fri Feb 24 21:30:14 2017 +0530 staging: speakup: Clean up if tests Put logical continuations on the next line; remove useless parentheses; and line up the tests. Signed-off-by: Sreya Mittal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/i18n.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 58b0de1cc0f5b4fd2a930244fe9fff862079d7af Author: sayli karnik Date: Thu Feb 23 17:37:31 2017 +0530 staging: speakup: i18n: Add spaces around operators The patch adds spaces around binary operators as suggested by checkpatch.pl Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/kobjects.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 75e6b00f72d6930870b7f9d405e3f9150881eac0 Author: sayli karnik Date: Thu Feb 23 17:25:08 2017 +0530 staging: speakup: i18n: Replace 'x!=NULL' with 'x' The patch removes the explicit NULL comparison by replacing 'x!=NULL' with 'x'. This issue was found by checkpatch.pl Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/i18n.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e3bab5eb1aaa966a0db2eeb032bc53b2995a9221 Author: Varsha Rao Date: Wed Feb 22 23:16:40 2017 +0530 staging: speakup: Added spaces around arithmetic operators. Added spaces around arithmetic operators (+, -, /), to fix the checkpatch issue. Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/kobjects.c | 6 +++--- drivers/staging/speakup/selection.c | 2 +- drivers/staging/speakup/serialio.c | 12 ++++++------ drivers/staging/speakup/speakup_acntpc.c | 10 +++++----- 4 files changed, 15 insertions(+), 15 deletions(-) commit 8190e15c40d0d8e8c937fe8c41fcec1a20ddf4a4 Author: Varsha Rao Date: Wed Feb 22 23:11:33 2017 +0530 staging: speakup: Removed blank line after open braces. Remove blank line after open braces, to fix the following checkpatch issue: CHECK: Blank lines aren't necessary after an open brace '{' Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/kobjects.c | 1 - drivers/staging/speakup/serialio.c | 1 - 2 files changed, 2 deletions(-) commit 904cf12dd3c6a1b5fd1166d73584509cb505eaf1 Author: Olav Haugan Date: Thu Feb 16 21:08:32 2017 -0800 staging: speakup: (coding style) Limit line to 80 chars Fix checkpatch warning about line being over 80 characters. Signed-off-by: Olav Haugan Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/synth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2ffb795f4cc5c35eb576fb055fe279a1327473a9 Author: Olav Haugan Date: Thu Feb 16 21:08:31 2017 -0800 staging: speakup: (coding style) Simplify comparisons to NULL Fix checkpatch check notices by simplifying comparisons to NULL. Signed-off-by: Olav Haugan Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/synth.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 6796cd84610a56beb7d3fa2818989727e4f26550 Author: sayli karnik Date: Mon Feb 20 22:40:28 2017 +0530 staging: greybus: loopback_test: Fix open error path Change array index from the loop bound variable to loop index. If a poll file fails to open for any intermediate device, all poll files with fds of devices from 0 upto that device must be closed in the open_poll_files() function. The current code only closes the poll file with the most recent fd allocated, and at times tries to close the same file multiple times. Detected by coccinelle: @@ expression arr,ex1,ex2; @@ for(ex1 = 0; ex1 < ex2; ex1++) { <... arr[ - ex2 + ex1 ] ...> } Signed-off-by: sayli karnik Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fea3860d7d69b0a82e0b96617258ffaf0ff250d4 Author: Gargi Sharma Date: Wed Feb 22 21:08:21 2017 +0530 staging: greybus: loopback_test: fix device-name leak All the device names were being always leaked. Also, illegal free was being called upon namelist[n] which was coincidentally NULL. The pointer to dirent structures must be individually freed before freeing the pointer array. Coccinelle Script: @@ expression arr,ex1,ex2; @@ for(ex1 = 0; ex1 < ex2; ex1++) { <... arr[ - ex2 + ex1 ] ...> } Signed-off-by: Gargi Sharma Reviewed by: Johan Hovold Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95ee706e9a6e3b18d8bf37cbb238e55ba37b37a7 Author: Varsha Rao Date: Fri Feb 17 10:42:38 2017 +0530 staging: rtl8712: Moved logical OR operator to previous line. Moved logical OR operator to previous line to fix the following checkpatch issue: CHECK: Logical continuations should be on the previous line. Signed-off-by: Varsha Rao Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/ieee80211.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6e3a0785ea18ea13980cc303c8aa17120e72a6e4 Author: Varsha Rao Date: Sat Feb 18 19:44:15 2017 +0530 staging: rtl8712: Remove unnecessary parentheses. Removed unnecessary parentheses around pointers to fix the following checkpatch issues: CHECK: Unnecessary parentheses around padapter->xmitpriv CHECK: Unnecessary parentheses around padapter->recvpriv Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/os_intfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9de60ba959d2553c8e3f5d437507b4be32d16849 Author: Varsha Rao Date: Sat Feb 18 20:03:07 2017 +0530 staging: rtl8712: Match alignment with open parenthesis. Matched function arguments alignment with its open parenthesis. This patch fixes the following checkpatch issue: CHECK: Alignment should match open parenthesis Signed-off-by: Varsha Rao Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/os_intfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5043bd3c33e1ffee3fd20e5057742f3a6abb34b7 Author: Gargi Sharma Date: Fri Feb 24 01:36:59 2017 +0530 staging: rtl8192e: replace explicit NULL comparison Replace explicit NULL comparison with ! operator to simplify code. Found with Coccinelle script: @@ expression ptr; position p; statement s0, s1; @@ ptr@p = \(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|usb_alloc_urb\| alloc_netdev\|dev_alloc_skb\)(...) ... when != ptr if ( ( + ! ptr - == NULL ) ) s0 else s1 Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl819x_BAProc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3337134e419bd392cf4d63c66848536ae0c9d8df Author: Gargi Sharma Date: Fri Feb 24 01:46:46 2017 +0530 staging: rtl8192u: Replace explicit NULL comparison Replace explicit NULL comparison with ! operator to simplify code. Found with Coccinelle script: @@ expression ptr; position p; statement s0, s1; @@ ptr@p = \(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|usb_alloc_urb\| alloc_netdev\|dev_alloc_skb\)(...) ... when != ptr if ( ( + ! ptr - == NULL ) ) s0 else s1 Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c01496a7d2abe8462e10c9a536b5e0c46a460d06 Author: Gargi Sharma Date: Fri Feb 24 01:10:51 2017 +0530 staging: rtl8188eu: replace explicit NULL comparison Replace explicit NULL comparison with ! operator to simplify code. Found with Coccinelle script: @@ expression ptr; position p; statement s0; @@ ptr@p = \(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|usb_alloc_urb\| alloc_netdev\|dev_alloc_skb\)(...) ... when != ptr if ( ( + ! ptr - == NULL ) ) s0 Signed-off-by: Gargi Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/xmit_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24542a004bdadd0f8e724b7da1c068f557d390c6 Author: Gargi Sharma Date: Wed Feb 22 20:32:12 2017 +0530 staging: rtl8192e: Remove useless parentheses Parentheses are not needed on the right side of assignment. Additionally added space around '+'and '*' to remove checkpatch issue, space required around '+' and '*'. Parentheses Removed using the coccinelle script: @@ binary operator bop = {+,-,>>,<<}; expression e, e1, e2; @@ e = -( e1 bop e2 -) Signed-off-by: Gargi Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 +- drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit fc988e144cca2aa568e45be8d7e7e9f87d0434ea Author: Yamanappagouda Patil Date: Tue Feb 21 20:29:21 2017 +0530 staging: rtl8188eu: Fixed "Missing a blank line after declarations". Fixed checkpatch.pl "missing a blank line after declarations" waring messages from rtl8188eu module. Signed-off-by: Yamanappagouda Patil Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/odm.c | 3 +++ drivers/staging/rtl8188eu/hal/odm_RTL8188E.c | 1 + drivers/staging/rtl8188eu/hal/phy.c | 1 + drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | 1 + drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 1 + drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 1 + drivers/staging/rtl8188eu/hal/usb_halinit.c | 14 ++++++++++++++ 7 files changed, 22 insertions(+) commit 2f55aa548354e71fd0cc550b9a9088416618bc98 Author: Sebastian Haas Date: Tue Feb 21 00:31:47 2017 +0100 staging: rtl8192u: Fix endianness warnings in ieee80211_rx.c Fixes the endianness warning "restricted __le16 degrades to integer" by converting __le16 to short before using it in bitmasks or in the macro WLAN_FC_GET_STYPE. Signed-off-by: Sebastian Haas Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 52 +++++++++++------------ 1 file changed, 26 insertions(+), 26 deletions(-) commit 1c19f3794d8e286ce5188175ef1d9a66ecb8d28e Author: maomao xu Date: Fri Feb 17 20:04:02 2017 +0800 staging: rtl8192u: Fix warnings about endianness drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:564:37: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:564:37: expected unsigned short [unsigned] [usertype] len drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:564:37: got restricted __be16 [usertype] Signed-off-by: maomao xu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ffb0b4f5f3547a76645f90af6072b16c7b9c8b71 Author: sayli karnik Date: Fri Feb 17 15:43:07 2017 +0530 staging: rtl8192u: ieee80211: Remove typedef to the tx_pending_t structure Using typedef for a structure type is not suggested in Linux kernel coding style guidelines. So remove typedef from structure tx_pending_t. The typedef name is not used anywhere. All variables of this type are declared using "struct tx_pending_t". Also change the structure name to tx_pending since it is normally only typedefs that have names that end in _t. Signed-off-by: sayli karnik Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5a12a59ec95010349bdc0b283fda3de7d9f64352 Author: Gargi Sharma Date: Fri Feb 17 11:50:30 2017 +0530 staging: rtl8188eu: Add a blank line Add a blank line after function declaration to fix the checkpatch issue Please use a blank line after function/struct/union/enum declarations. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 1 + 1 file changed, 1 insertion(+) commit f10ee27e830e42947c0e79a750141f87b269e5e4 Author: Gargi Sharma Date: Fri Feb 17 11:50:29 2017 +0530 staging: rtl8188eu: Remove multiple blank lines Remove blank lines to fix the checkpatch issue, don't use multiple blank lines. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 11 ----------- 1 file changed, 11 deletions(-) commit 43a7ea6e3dca132669a805bfb0f333468230a5f3 Author: Gargi Sharma Date: Fri Feb 17 11:50:28 2017 +0530 staging: rtl8188eu: Remove unnecessary blank lines Remove unnecessary blank lines to fix the checkpatch issue, blank lines are not required before '}'. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 -- 1 file changed, 2 deletions(-) commit 2091eda1f21dba61387304ae39d68d45e274ead2 Author: Gargi Sharma Date: Fri Feb 17 11:50:27 2017 +0530 staging: rtl8188eu: Put constant on right side of comparison Constants should be on the right side of comparisons. Issue found by checkpatch.pl script. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit de109778e7cf0e22a1a474b622372c1979b01ae0 Author: Gargi Sharma Date: Fri Feb 17 11:50:26 2017 +0530 staging: rtl8188eu: Fix block comments warning Align * on each line and move final */ to a new line, to conform to the kernel coding style for block comments. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 61 ++++++++++++++++--------------- 1 file changed, 31 insertions(+), 30 deletions(-) commit e31447f934d3f053d21ebc3bfa0780eff9f287de Author: Gargi Sharma Date: Fri Feb 17 11:50:25 2017 +0530 staging: rtl8188eu: Replace x==NULL by !x Replace x==NULL by !x, to fix the checkpatch issue comparsion with NULL could be written as !x. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit f4c04b8fef4f6bec720e244d857a08ed35d59070 Author: simran singhal Date: Fri Feb 17 02:52:05 2017 +0530 staging: rtl8192u: Fixed 'tabstop' coding style warning Replace a mix of tabs and spaces indentation by tabs only. Fixed checkpatch warning "Statements should start on a tabstop" in rtl8192u module. Signed-off-by: simran singhal Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aec35f8d1073004fcfdb2f373b3c7c8b4cbd0a42 Author: simran singhal Date: Fri Feb 17 02:06:56 2017 +0530 staging: rtl8192u: Replace symbolic permissions with octal permissions Octal permissions should be used instead of symbolic ones for easier reading. WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred. Consider using octal permissions '0644'. This warning is detected by checkpatch.pl Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_module.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f6712b9fd1265da32739f6aa3f660f3afc9304a5 Author: Ivan Safonov Date: Wed Feb 15 01:25:32 2017 +0300 staging:r8188eu: remove unused MCS_rate_2R array MCS_rate_2R[] does not used. Remove it. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 1 - drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 1 - drivers/staging/rtl8188eu/include/rtw_mlme.h | 1 - 3 files changed, 3 deletions(-) commit ca5508bd0b9ae0d94a1d4bdb89b7eb4dd268e411 Author: Ivan Safonov Date: Wed Feb 15 01:25:31 2017 +0300 staging:r8188eu: remove unused HW_VAR_RF_TYPE parameter of HT_caps_handler rtw_hal_get_hwreg() does not used with HW_VAR_RF_TYPE parameter. Remove HW_VAR_RF_TYPE switch case in rtw_hal_get_hwreg and definition. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/usb_halinit.c | 3 --- drivers/staging/rtl8188eu/include/hal_intf.h | 1 - 2 files changed, 4 deletions(-) commit 19a6e10e145580817ce9cf65a0d372c14de479e7 Author: Ivan Safonov Date: Wed Feb 15 01:25:30 2017 +0300 staging:r8188eu: refactor HT_caps_handler() - remove rtw_hal_get_hwreg() call rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value. Replace the function call with RF_1T1R value and refactor HT_caps_handler(). Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 8241f9261027d3583c1ac7aef03d98553350ed81 Author: Ivan Safonov Date: Wed Feb 15 01:25:29 2017 +0300 staging:r8188eu: refactor rtw_update_ht_cap() - remove rtw_hal_get_hwreg() call rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value. Replace the function call with RF_1T1R value and refactor rtw_update_ht_cap(). Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 465095ef1c24904eb0f234011f69ed048bfa5fb9 Author: Ivan Safonov Date: Wed Feb 15 01:25:28 2017 +0300 staging:r8188eu: refactor issue_assocreq() - remove rtw_hal_get_hwreg() call rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value. Replace the function call with RF_1T1R value and refactor issue_assocreq(). Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) commit 06b2775ecab4baf7efbbe207d0d347a038569071 Author: Ivan Safonov Date: Wed Feb 15 01:25:27 2017 +0300 staging:r8188eu: refactor rtw_get_cur_max_rate() - remove rtw_hal_get_hwreg() call rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value. Replace the function call with RF_1T1R value and refactor rtw_get_cur_max_rate(). Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a7980ce2e12d47539446f7470f6401b012f65f7a Author: Ivan Safonov Date: Wed Feb 15 01:25:26 2017 +0300 staging:r8188eu: refactor rtw_check_beacon_data() - remove rtw_hal_get_hwreg() call rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value. Replace the function call with RF_1T1R value and refactor rtw_check_beacon_data(). Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit b6ba87d54f4f6347b4d04fbe6e1546478b0a5936 Author: Ivan Safonov Date: Wed Feb 15 01:25:25 2017 +0300 staging:r8188eu: refactor add_RATid() - remove rtw_hal_get_hwreg() call rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value. Replace the function call with RF_1T1R value and refactor add_RATid(). Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 0bb2b81ee41397630ae94764a7db2e4caaa8df78 Author: Ivan Safonov Date: Wed Feb 15 01:25:24 2017 +0300 staging:r8188eu: use DIV_ROUND_UP() in rtw_signal_stat_timer_hdl() DIV_ROUND_UP macro is shorter and look better than if-else construction. DIV_ROUND_UP used in rtw_signal_stat_timer_hdl(). Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_recv.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit d680d24eacac3124fc0d6a2fab0eef0074f09efd Author: Katie Dunne Date: Sun Feb 19 18:30:00 2017 -0800 staging: ks7010: remove unecessary spaces after casts Remove spaces after casts found by checkpatch.pl. In some cases, remove returns after casts and place them on a single line. Signed-off-by: Katie Dunne Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 206 ++++++++++++++++++------------------- 1 file changed, 102 insertions(+), 104 deletions(-) commit 8f4d00cd2390f68336337c5b6ac175090021ffdd Author: Shiva Kerdel Date: Fri Feb 17 22:41:54 2017 +0100 Staging: ks7010: ks_*: Braces should be used on all arms of these statements Braces should be used on all arms of these statements (CHECK).. Signed-off-by: Shiva Kerdel Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 6 ++++-- drivers/staging/ks7010/ks_wlan_net.c | 42 +++++++++++++++++++++++------------- 2 files changed, 31 insertions(+), 17 deletions(-) commit f3f45c734eb8b1e352908f6f2af2e2e4951906be Author: Shiva Kerdel Date: Fri Feb 17 00:18:35 2017 +0100 Staging: ks7010: ks_*: Use the BIT macro for bitwise checks Changed bit swifting operators to BIT macros (preferred), This change will also solve the preferred space surrounding the operator checks. Signed-off-by: Shiva Kerdel Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.h | 20 ++++++++++---------- drivers/staging/ks7010/ks_wlan.h | 30 +++++++++++++++--------------- 2 files changed, 25 insertions(+), 25 deletions(-) commit bd18762dc91c737701269005b4d5ca5379e3ca54 Author: Kenneth Hsu Date: Wed Feb 22 18:58:14 2017 -0800 staging: olpc_dcon: add whitespace around binary operators This fixes a coding style issue where whitespace characters were missing around some binary OR operators. Signed-off-by: Kenneth Hsu Signed-off-by: Greg Kroah-Hartman drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fce3444aeae22edc2bb6100888be8039a6e9bb5b Author: simran singhal Date: Wed Feb 22 15:02:04 2017 +0530 staging: lustre: Using macro DIV_ROUND_UP The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)). It clarifies the divisor calculations. This occurence was detected 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: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 +- drivers/staging/lustre/lnet/selftest/conrpc.c | 11 ++++------- drivers/staging/lustre/lustre/ptlrpc/client.c | 3 +-- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 2 +- 5 files changed, 8 insertions(+), 12 deletions(-) commit 2720ecceb73c9acd66a5644c3de335467d33f49f Author: James Simmons Date: Sat Feb 18 16:47:15 2017 -0500 staging: lustre: lprocfs: move lprocfs_stats_[un]lock to a source file When compiling the kernel without optimization, when using GCOV, the lprocfs_stats_alloc_one() symbol is not properly exported to other modules and causes the ptlrpc module to fail loading with an unknown symbol. There is no reason to export the function lprocfs_stats_alloc_one. The reason is due to the functions lprocfs_stats_[un]lock being inline functions in a header file. Lets untangle this mess and turn those inline functions into real functions in a source file. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8836 Reviewed-on: https://review.whamcloud.com/23773 Reviewed-by: Andreas Dilger Reviewed-by: Dmitry Eremin Reviewed-by: John L. Hammond Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/include/lprocfs_status.h | 120 ++------------------- .../lustre/lustre/obdclass/lprocfs_status.c | 111 +++++++++++++++++++ 2 files changed, 121 insertions(+), 110 deletions(-) commit 9672a610adfdadf6fe30dc34865e3add5d368aa4 Author: Niu Yawei Date: Sat Feb 18 16:47:12 2017 -0500 staging: lustre: ldlm: fix race of starting bl threads There is race in the code of starting bl threads which leads to thread number exceeds the maximum number when race happened, it can also lead to duplicated thread name. This patch fixes the race and cleanup the code a bit. Signed-off-by: Niu Yawei Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7330 Reviewed-on: http://review.whamcloud.com/17026 Reviewed-by: Bobi Jam Reviewed-by: Andreas Dilger Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 49 ++++++++++++++----------- 1 file changed, 28 insertions(+), 21 deletions(-) commit 0cd491a9020d04790f9b4f111e4c223aaceade0a Author: Vitaly Fertman Date: Sat Feb 18 16:47:11 2017 -0500 staging: lustre: ldlm: disconnect speedup disconnect takes too long time if there are many locks to cancel. besides the amount of time spent on each lock cancel, there is a resched() in cfs_hash_for_each_relax(), i.e. disconnect or eviction may take unexpectedly long time. While this patch only contains the client side fixes the original fix covered changes to both the server and client code to ensure proper disconnect handling. Below details the change done on both the server and client so people can examine the disconnect behavior with both source bases. - do not cancel locks on disconnect_export; - export will be left in obd_unlinked_exports list pinned by live locks; - new re-connects will created other non-conflicting exports; - new locks will cancel obsolete locks on conflicts; - once all the locks on the disconnected export will be cancelled, the export will be destroyed on the last ref put; - do not cancel in small portions, cancel all together in just 1 dedicated thread - use server side blocking thread for that; - cancel blocked locks first so that waiting locks could proceed; - take care about blocked waiting locks, so that they would get cancelled quickly too; - do not remove lock from waiting list on AST error before moving it to elt_expired_locks list, because it removes it from export list too; otherwise this blocked lock will not be cancelled immediately on failed export; - cancel lock instead of just destroy for failed export, to make full cleanup, i.e. remove it from export list. Signed-off-by: Vitaly Fertman Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3031 Xyratex-bug-id: MRP-395 MRP-1366 MRP-1366 Reviewed-by: Andriy Skulysh Reviewed-by: Alexey Lyashkov Reviewed-on: http://review.whamcloud.com/5843 Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lustre_dlm.h | 11 +- .../staging/lustre/lustre/include/obd_support.h | 1 + drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 5 +- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 1 - drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 143 +++++++++++++-------- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 4 + 6 files changed, 101 insertions(+), 64 deletions(-) commit dc06bc210cf4e81a8cdab4cb0bbb4ce0d3155462 Author: Vitaly Fertman Date: Sat Feb 18 16:47:10 2017 -0500 staging: lustre: ldlm: reduce ldlm pool recalc window Reduce the sleep period from 50 seconds down to LDLM_POOL_CLI_DEF_RECALC_PERIOD which is 10 seconds. Signed-off-by: Vitaly Fertman Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3031 Xyratex-bug-id: MRP-395 MRP-1366 MRP-1366 Reviewed-by: Andriy Skulysh Reviewed-by: Alexey Lyashkov Reviewed-on: http://review.whamcloud.com/5843 Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 99df22b584f2afce1653d2cefe87ec26ce056b23 Author: Andreas Dilger Date: Sat Feb 18 16:47:09 2017 -0500 staging: lustre: llite: remove extraneous export parameter The ll_close_inode_openhandle() and ll_md_close() functions passed an extra "obd_export *md_exp" parameter, but it turns out that all of the callers already pass inode->i_sb->s_fs_info->lsi_llsbi->ll_md_exp in one form or another, so it can just be extracted from "inode" directly as needed. Signed-off-by: Andreas Dilger Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6627 Reviewed-on: http://review.whamcloud.com/14953 Reviewed-by: Frank Zago Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/file.c | 33 +++++++++++++----------------- 1 file changed, 14 insertions(+), 19 deletions(-) commit 3ee45c7eb68ab64a25b93d821da062ca60164f48 Author: Yang Sheng Date: Sat Feb 18 16:47:08 2017 -0500 staging: lustre: lov: trying smaller memory allocations Reduce struct lov_io_sub to smaller memory usage on wide-stripe file systems. Signed-off-by: Yang Sheng Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7085 Reviewed-on: http://review.whamcloud.com/17476 Reviewed-by: Bob Glossman Reviewed-by: Jian Yu Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 6 ++-- drivers/staging/lustre/lustre/llite/file.c | 16 ++++----- drivers/staging/lustre/lustre/llite/glimpse.c | 4 +-- drivers/staging/lustre/lustre/llite/lcommon_cl.c | 8 ++--- drivers/staging/lustre/lustre/llite/lcommon_misc.c | 2 +- .../staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/llite_mmap.c | 4 +-- drivers/staging/lustre/lustre/llite/lproc_llite.c | 2 +- drivers/staging/lustre/lustre/llite/rw.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_dev.c | 10 +++--- drivers/staging/lustre/lustre/llite/xattr.c | 2 +- .../staging/lustre/lustre/lov/lov_cl_internal.h | 41 +++++++++++----------- drivers/staging/lustre/lustre/lov/lov_object.c | 2 +- drivers/staging/lustre/lustre/obdclass/cl_object.c | 6 ++-- .../staging/lustre/lustre/obdecho/echo_client.c | 6 ++-- drivers/staging/lustre/lustre/osc/lproc_osc.c | 2 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 2 +- drivers/staging/lustre/lustre/osc/osc_lock.c | 12 +++---- drivers/staging/lustre/lustre/osc/osc_page.c | 4 +-- drivers/staging/lustre/lustre/osc/osc_request.c | 2 +- 20 files changed, 67 insertions(+), 68 deletions(-) commit 37471504b001717e1b30f5458de2ccb36037fc27 Author: Jinshan Xiong Date: Sat Feb 18 16:47:07 2017 -0500 staging: lustre: osc: further LRU OSC cleanup after eviction Define osc_lru_reserve() and osc_lru_unreserve() to reserve LRU slots in osc_io_write_iter_init() and unreserve them in fini(); Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6271 Reviewed-on: http://review.whamcloud.com/16456 Reviewed-by: Bobi Jam Reviewed-by: John L. Hammond Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lustre/osc/osc_cl_internal.h | 4 +- drivers/staging/lustre/lustre/osc/osc_internal.h | 3 +- drivers/staging/lustre/lustre/osc/osc_io.c | 48 +++++--------- drivers/staging/lustre/lustre/osc/osc_lock.c | 46 ++++++++------ drivers/staging/lustre/lustre/osc/osc_object.c | 8 ++- drivers/staging/lustre/lustre/osc/osc_page.c | 73 +++++++++++++++++++--- 6 files changed, 118 insertions(+), 64 deletions(-) commit 46ff82f9561be47a37385d5a35fb1eb6c8644930 Author: Jinshan Xiong Date: Sat Feb 18 16:47:06 2017 -0500 staging: lustre: ldlm: handle ldlm lock cancel race when evicting client. A ldlm lock could be canceled simutaneously by ldlm bl thread and cleanup_resource(). In this case, only one side will win the race and the other side should wait for the work to complete. Eviction on group lock is now well supported. Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6271 Reviewed-on: http://review.whamcloud.com/16456 Reviewed-by: Bobi Jam Reviewed-by: John L. Hammond Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/cl_object.h | 7 +++- .../lustre/lustre/include/lustre_dlm_flags.h | 3 ++ drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 46 ++++++++++++++++------ drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 14 ++++++- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_io.c | 1 + drivers/staging/lustre/lustre/osc/osc_lock.c | 2 + drivers/staging/lustre/lustre/osc/osc_request.c | 10 ++++- 8 files changed, 68 insertions(+), 17 deletions(-) commit 5fd8f8b8d5e4aff6c05229bcd51c1852d4fa04f5 Author: Jinshan Xiong Date: Sat Feb 18 16:47:05 2017 -0500 staging: lustre: lov: cleanup when cl_io_iter_init() fails In lov_io_iter_init(), if cl_io_iter_init() against sub io fails, it should call cl_io_iter_fini() to cleanup leftover information; Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6271 Reviewed-on: http://review.whamcloud.com/16456 Reviewed-by: Bobi Jam Reviewed-by: John L. Hammond Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/lov/lov_io.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 719e9e08aa91a3f5c2f66aa8655dcc71f0e5651c Author: Jinshan Xiong Date: Sat Feb 18 16:47:04 2017 -0500 staging: lustre: osc: remove obsolete asserts Remove the no longer needed assert in the function osc_cache_truncate_start(). The assertion in osc_object_prune() will become faulty with upcoming changes. The reason this will become a problem is that there may exist freeing pages in object's radix tree at the time of osc_object_prune(), which causes failure at the assertion of (osc->oo_npages == 0). This patch prevents that problem from happening. Signed-off-by: Jinshan Xiong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6271 Reviewed-on: http://review.whamcloud.com/16456 Reviewed-on: http://review.whamcloud.com/16727 Reviewed-by: Bobi Jam Reviewed-by: John L. Hammond Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/osc_cache.c | 1 - drivers/staging/lustre/lustre/osc/osc_object.c | 4 ---- 2 files changed, 5 deletions(-) commit 1f0833a85794958c6924e5ad7053c43d0e0096c5 Author: Bobi Jam Date: Sat Feb 18 16:47:03 2017 -0500 staging: lustre: llite: omit to update wire data In ll_setattr_raw(), after op_data->op_attr has been copied, the attr is updated and op_data->op_attr does not get updated afterward. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6813 Reviewed-on: http://review.whamcloud.com/16462 Reviewed-by: Jinshan Xiong Reviewed-by: Niu Yawei Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/llite_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1011487fac205bf34ca3081a346b343b9ff7f9fc Author: Bobi Jam Date: Sat Feb 18 16:47:02 2017 -0500 staging: lustre: llite: lower message level for ll_setattr_raw() Truncate and write can happen at the same time, so that a file can be set modified even though the file is not restored from released state, and ll_hsm_state_set() is not applicable for the file, and it will return error in this case, we'd lower the error message level in this case. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6817 Reviewed-on: http://review.whamcloud.com/15541 Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/llite_lib.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit e0ccf5d085ab7393a418e6f6eea50eb686a9b9ad Author: Doug Oucharek Date: Sat Feb 18 10:04:10 2017 -0800 staging: lustre: ko2iblnd: Adapt to the removal of ib_get_dma_mr() In Linux kernel 4.9-rc1, the function ib_get_dma_mr() was removed and a second parameter was added to ib_alloc_pd(). As this broke the building of the ko2iblnd module in staging, the Kconfig for LNet has marked ko2iblnd as broken and stopped building it. This patch fixes this breakage by: - Removing the BROKEN tag from lnet/Kconfig. - Make it so the module parameter map_on_demand can no longer be zero (we have to configure FMR/FastReg pools; it can no longer be off). - No longer try to use the global DMA memory region, but make use of the FMR/FastReg pool for all RDMA Tx operations. - Everywhere we are using the device DMA mr to derive the L-key for non-registered memory regions, use the pd->local_dma_lkey value instead. - Make the default map_on_demand = 256. This will allow nodes with this patch to still connected to older nodes without this patch and FMR/FastReg turned off. When FMR/FastReg is turned off, we use 256 as the max frags so the two sides will still be able to communicate and work. - Fix a mistake with BUILD_BUG_ON calls in o2iblnd.c which caused compiling to fail. Signed-off-by: Doug Oucharek Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9026 Reviewed-on: https://review.whamcloud.com/#/c/24931/ Reviewed-by: James Simmons Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/Kconfig | 1 - .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 77 ++-------------------- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 3 - .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 17 +---- .../lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c | 12 ++-- 5 files changed, 16 insertions(+), 94 deletions(-) commit c519822a8a7d480ecc1b5bb67b80ba73e747c4a4 Author: Georgios Emmanouil Date: Thu Feb 16 22:13:32 2017 +0200 Staging: wlan-ng: prism2mgmt: Removed an empty line Removed an empty line. Signed-off-by: Georgios Emmanouil Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2mgmt.c | 1 - 1 file changed, 1 deletion(-) commit 8954ef903fa5f86a42580bcf80cb0116ab2b3c02 Author: Gargi Sharma Date: Sat Feb 18 11:07:41 2017 +0530 staging: wlan-ng: remove extra parentheses Removes extra parentheses around function arguments. Issue detected and resolved using the following coccinelle script: @@ expression e; identifier f; @@ f(..., -( e -) ,...) Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/p80211conv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e65a60e5cd14e2416bf5a1e1092ce1ae9defdef5 Author: Lucian Zala Date: Thu Feb 16 20:42:47 2017 +0200 staging: fsl-mc: fix coding style warning Fix for "WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data'" found by checkpatch.pl in bus/irq-gic-v3-its-fsl-mc-msi.c. Signed-off-by: Lucian Zala Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eb10dec55193eb08f561f28ea27e5b609f2620a5 Author: Arushi Singhal Date: Wed Feb 22 23:46:39 2017 +0530 staging: xgifb: function prototype argument should also have an identifier name function prototype argument 'struct vb_device_info *' and 'unsigned long' should also have an identifier name. Signed-off-by: Arushi Singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/vb_init.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a8ba84626b1b33ff53c4adaff9b69304eb41877f Author: Katie Dunne Date: Mon Feb 20 12:24:40 2017 -0800 staging: xgifb: add braces around if-statements Add braces to instances of if-statements found by checkpatch.pl to conform to kernel style. Signed-off-by: Katie Dunne Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/XGI_main_26.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 7bc6edf95b20b526b12b3a326845b21ba7adfe31 Author: Gargi Sharma Date: Fri Feb 17 00:09:55 2017 +0530 staging: xgifb: add braces around if statement add braces around if statment to fix the checkpatch issue, braces {} should be used on all arms of this statement. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/XGI_main_26.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 999c8c28a89f1c8a681be01964c7239c3cc2685d Author: Joe Perches Date: Wed Feb 22 21:54:57 2017 -0800 staging: fbtft: Make some s16 arrays const Using const reduces data size. $ size drivers/staging/fbtft/built-in.o* text data bss dec hex filename 89909 41584 2928 134421 20d15 drivers/staging/fbtft/built-in.o.new 88053 43392 2928 134373 20ce5 drivers/staging/fbtft/built-in.o.old Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ili9481.c | 2 +- drivers/staging/fbtft/fb_ili9486.c | 2 +- drivers/staging/fbtft/fb_s6d02a1.c | 2 +- drivers/staging/fbtft/fb_st7735r.c | 2 +- drivers/staging/fbtft/fbtft_device.c | 8 ++++---- drivers/staging/fbtft/flexfb.c | 16 ++++++++-------- 6 files changed, 16 insertions(+), 16 deletions(-) commit 0a859b31ec9c8bce9aacc9ccae3af6aab84b04c7 Author: Joe Perches Date: Wed Feb 22 21:54:56 2017 -0800 staging: fbtft: Make the pointers to s16 init arrays const This allows making some of the actual arrays const. Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-core.c | 2 +- drivers/staging/fbtft/fbtft.h | 4 ++-- drivers/staging/fbtft/flexfb.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit eb1d69c21cfe617a9474a0ad0ac5a858a55e4adb Author: Anthony Brandon Date: Tue Feb 21 14:25:28 2017 +0100 staging:fbtft: Fix some warnings regarding types. Running make C=1 M=drivers/staging/fbtft reports warnings about conversion from __be16 to unsigned short. Change the type of the variables being assigned into __be16 to remove those warnings. Signed-off-by: Anthony Brandon Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ra8875.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8e9cd97860adaecf98ced1fbf175287b86671d4 Author: Julián de Gortari Date: Sun Feb 19 21:02:32 2017 -0600 Staging: fbtft: fb_watterott: fix incorrect type in assignments __be16 type variables should be used with return value of macro cpu_to_be16() Signed-off-by: Julián de Gortari Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_watterott.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 027bcc5d28e7251acbca78039d99b51f3bb9e73a Author: Gargi Sharma Date: Fri Feb 17 01:41:57 2017 +0530 staging: fbtft: Remove blank line Remove blank line before closing brace to fix the checkpatch issue blank lines aren't necessary before a close brace '}'. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-core.c | 1 - 1 file changed, 1 deletion(-) commit 4da2f4b775519b0aee0ff2c23e4d0897913cbc1d Author: Gargi Sharma Date: Fri Feb 17 01:41:56 2017 +0530 staging: fbtft: Match alignment with open parentheses Indent code to match alignment with open parentheses, to fix the checkpatch issue alignment should match open parenthesis. Signed-off-by: Gargi Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-core.c | 54 +++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 423875c96f168f7357369268aad62d121a812266 Author: Tobin C. Harding Date: Wed Feb 15 14:27:25 2017 +1100 staging: fbtft: Add check on strlcpy() return value Return value of strlcpy() is not checked. Name string is silently truncated if longer that SPI_NAME_SIZE, whilst not detrimental to the program logic it would be nice to notify the user. Module is currently quite verbose, adding extra pr_warn() calls will not overly impact this verbosity. Check return value from call to strlcpy(). If source string is truncated call pr_warn() to notify user. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft_device.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit dbc364054c2e2c7008129237cdaa558656de104d Author: Tobin C. Harding Date: Wed Feb 15 14:27:24 2017 +1100 staging: fbtft: Replace magic number with constant Current call to strncmp() uses a magic number. There is a compile time constant defined for this buffer, included and used already at other sites in the file. Remove magic number. Replace with pre-existing compile time constant. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8414fe11ba2ff2422c4b73bbef3b035a2562c88a Author: Tobin C. Harding Date: Wed Feb 15 14:27:23 2017 +1100 staging: fbtft: Fix buffer overflow vulnerability Module copies a user supplied string (module parameter) into a buffer using strncpy() and does not check that the buffer is null terminated. Replace call to strncpy() with call to strlcpy() ensuring that the buffer is null terminated. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca5af1f303d16cdf183354abffba46528b72a163 Author: simran singhal Date: Wed Feb 22 07:31:09 2017 +0530 staging: gdm724x: Drop useless initialisation Removed initialisation of a varible if it is immediately reassigned. Changes were made using Coccinelle. @@ type T; constant C; expression e; identifier i; @@ T i - = C ; i = e; Signed-off-by: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_lte.c | 2 +- drivers/staging/gdm724x/gdm_mux.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit efe96779e55eb59c1d22c9b89b655b639aea6c99 Author: Javier Rodriguez Date: Tue Feb 14 18:16:22 2017 +0100 staging: gdm724x: modify icmp6_checksum for returning a correct data type. The icmp6_checksum was returning an invalid data type as the expected type is __sum16. For returning such data type, icmp6_checksum, now, is using the kernel functions for computing the checksum. Here, the sparse message: drivers/staging/gdm724x/gdm_lte.c:311:39: warning: incorrect type in assignment (different base types) drivers/staging/gdm724x/gdm_lte.c:311:39: expected restricted __sum16 [addressable] [assigned] [usertype] icmp6_cksum drivers/staging/gdm724x/gdm_lte.c:311:39: got int Signed-off-by: Javier Rodriguez Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_lte.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 607b6cd3d083ae1deaf93ff2634abe147459c9bc Author: Cheah Kok Cheong Date: Wed Feb 22 01:25:08 2017 +0800 Staging: comedi: drivers: comedi_test: Avoid multiple line dereference Fix checkpatch warning "Avoid multiple line dereference" using a pointer variable to avoid line wrap. Signed-off-by: Cheah Kok Cheong Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/comedi_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7dfc6971243430dd9edef3c4c0694d3a97b321f7 Author: simran singhal Date: Tue Feb 21 23:58:26 2017 +0530 staging: comedi: Using macro DIV_ROUND_UP The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)). It clarifies the divisor calculations. This occurence was detected 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: simran singhal Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/addi_apci_3xxx.c | 2 +- drivers/staging/comedi/drivers/cb_pcidas64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 427fda4e5c3406fcca5ab87aabccdbb2840b7544 Author: Tobin C. Harding Date: Wed Feb 22 09:45:41 2017 +1100 staging: comedi: s626: Kernel doc format comments Checkpatch emits WARNING: Block comments use a trailing */ on a separate line. Offending comments are commenting variables within the main data structure of s626 driver. We can move these comments to kernel doc format with the benefit of clearing the warning and improving the documentation for the driver. Remove comments on structure members. Add original comments to the head of the structure definition in kernel doc format. Signed-off-by: Tobin C. Harding Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/s626.c | 46 ++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 19 deletions(-) commit 138bec76296851e9bb151a451b2b324089cffdf2 Author: Ian Abbott Date: Fri Feb 17 11:09:18 2017 +0000 staging: comedi: jr3_pci: replace devpriv->iobase with dev->mmio The "jr3_pci" driver currently uses the `iobase` member of its private device data `struct jr3_pci_dev_private` to store a pointer to its ioremapped register region. Use the `mmio` member of the `struct comedi_device` to store this instead, and remove the `iobase` member. The `iobase` member was of type `struct jr3_t __iomem *`, with the board's complicated register layout described by `struct jr3_t`. The `mmio` member is a generic `void __iomem *`, so its value needs converting to a `struct jr3_t __iomem *` for our purposes. Change the clean-up in `jr3_pci_detach()` to call `comedi_pci_detach()` instead of `comedi_pci_disable()`, as that will iounmap `dev->mmio` for us. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit 8c8022fcd8de5262fbf15177979553c1847bdc55 Author: Ian Abbott Date: Fri Feb 17 11:09:17 2017 +0000 staging: comedi: jr3_pci: pass transform by reference Local function `set_transforms` has a parameter of type `struct jr3_pci_transform`. This has a size 32 bytes, which is quite large for passing around in a function call. Change it to use type `const struct jr3_pci_transform *`. (In practice, it is probably inlined by the compiler anyway, but doing this seems to save a few bytes.) Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4af8c8195188b5d9ceaea4925a0e7f48a3e3c6c0 Author: Ian Abbott Date: Fri Feb 17 11:09:16 2017 +0000 staging: comedi: jr3_pci: re-work struct jr3_pci_subdev_private range The `range` member of `struct jr3_pci_subdev_private` is an array of a tag-less `struct` type whose layout is similar to `struct comedi_lrange`. Both `struct` types end with a member also called `range`. In the case of tag-less `struct` type, it is a single `struct comedi_krange`. In the case of `struct comedi_lrange`, it is a flexible array of `struct comedi_krange`. Elements of the `range` array member in `struct jr3_pci_subdev_private` are pointed to by elements of the `range_table_list` array member, which are of type `const struct comedi_lrange *`. This requires some dodgy type casting. To avoid the dodgy type casting, change the element type of the `range` member of `struct jr3_pci_subdev_private` to be a new type `union jr3_pci_single_range`. This contains a member `l` of type `struct comedi_lrange`, and an array member `_reserved` that is large enough to encompass the `struct comedi_lrange` plus a single `struct comedi_krange`. It is the same size as the previous type. Accesses to `spriv->range[i].length` and `spriv->range[i].range` are replaced with `spriv->range[i].l.length` and `spriv->range[i].l.range[0]` respectively (where `spriv` is a `struct jr3_pci_subdev_private *`, and `i` is an array index). Type-casted pointers to `spriv->range[i]` are replaced with pointers to `spriv->range[i].l`, which do not require the type casts. Since we defined a new type, we can define local variables of the corresponding pointer type to shorten some lines of code. This is made use of in `jr3_pci_alloc_spriv()`. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 70 ++++++++++++++++---------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit de98befe56960dbeea0501d3cefa42c89825e39f Author: Ian Abbott Date: Fri Feb 17 11:09:15 2017 +0000 staging: comedi: jr3_pci: separate out poll state enum The type of the `state` member of `struct jr3_pci_subdev_private` is defined in-situ as an enumerated type without a tag. For aesthetic reasons, define the type as `enum jr3_pci_poll_state` outside the containing `struct`. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit dc5761db873f8fc03105a43e97970ee4b862e1e1 Author: Ian Abbott Date: Fri Feb 17 11:09:14 2017 +0000 staging: comedi: jr3_pci: remove next_time_max member The `next_time_max` member of `struct jr3_pci_subdev_private` is assigned to, but never read. Remove it. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 4 ---- 1 file changed, 4 deletions(-) commit 67aa069d9354299cfdd45d6a6287f593e7258f33 Author: Ian Abbott Date: Fri Feb 17 11:09:13 2017 +0000 staging: comedi: jr3_pci: remove unneeded 'spriv' checks If `jr3_pci_auto_attach()` returns with no error, we can now be sure that the COMEDI subdevice private data structures have been allocated. Remove the tests for a valid pointer to the private data structure in `jr3_pci_ai_insn_read()`, `jr3_pci_open()`, and `jr3_pci_poll_subdevice()`, since they will not be called if the pointer is invalid. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 048ad49af32fe910259bc5f1a49f464b63a03029 Author: Ian Abbott Date: Fri Feb 17 11:09:12 2017 +0000 staging: comedi: jr3_pci: re-work firmware copyright display If debug messages are enabled, the card initialization done in `jr3_pci_auto_attach()` spits out 24 (0x18) debug messages to show the null-terminated copyright string embedded in the firmware, one character at a time, including the ASCII NUL characters at the end. Factor out the copyright display into a new function `jr3_pci_show_copyright()` and re-work it to copy the whole copyright string into a buffer, so that it can be shown with a single debug message. Incidentally, this also removes a checkpatch warning "Avoid multiple line dereference" in the original code. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 47ba9b528501273712b8e14bc1cb4c772fcfe9f2 Author: Ian Abbott Date: Fri Feb 17 11:09:11 2017 +0000 staging: comedi: jr3_pci: struct comedi_lrange should normally be const Fix three checkpatch warnings of the form: WARNING: struct comedi_lrange should normally be const Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 800f35d773b038677fc7d6d0b2fc34a31005dd23 Author: Ian Abbott Date: Fri Feb 17 11:09:10 2017 +0000 staging: comedi: jr3_pci: Reset all DSPs The various JR3 PCI models have from 1 to 4 DSPs, one per subdevice. Prior to loading the firmware to all the DSPs, the initialization code in `jr3_pci_auto_attach()` resets the first DSP. As far as I can tell, it should reset all of them. Change it to do so. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8ec04a491825e08068e92bed0bba7821893b6433 Author: Ian Abbott Date: Fri Feb 17 11:09:09 2017 +0000 staging: comedi: jr3_pci: cope with jiffies wraparound The timer expiry routine `jr3_pci_poll_dev()` checks for expiry by checking whether the absolute value of `jiffies` (stored in local variable `now`) is greater than the expected expiry time in jiffy units. This will fail when `jiffies` wraps around. Also, it seems to make sense to handle the expiry one jiffy earlier than the current test. Use `time_after_eq()` to check for expiry. Cc: # 3.15+ Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45292be0b3db0b7f8286683b376e2d9f949d11f9 Author: Ian Abbott Date: Fri Feb 17 11:09:08 2017 +0000 staging: comedi: jr3_pci: fix possible null pointer dereference For some reason, the driver does not consider allocation of the subdevice private data to be a fatal error when attaching the COMEDI device. It tests the subdevice private data pointer for validity at certain points, but omits some crucial tests. In particular, `jr3_pci_auto_attach()` calls `jr3_pci_alloc_spriv()` to allocate and initialize the subdevice private data, but the same function subsequently dereferences the pointer to access the `next_time_min` and `next_time_max` members without checking it first. The other missing test is in the timer expiry routine `jr3_pci_poll_dev()`, but it will crash before it gets that far. Fix the bug by returning `-ENOMEM` from `jr3_pci_auto_attach()` as soon as one of the calls to `jr3_pci_alloc_spriv()` returns `NULL`. The COMEDI core will subsequently call `jr3_pci_detach()` to clean up. Cc: # 3.15+ Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/jr3_pci.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 15c012d5452809c1ff0ac0007b4dd3addef00b63 Author: Sameer Wadgaonkar Date: Tue Feb 21 12:53:31 2017 -0500 staging: unisys: visorbus: remove visorchipset_platform_device Removed visorchipset_platform_device and all the unused structures and functions and using chipset_dev.acpi_device instead. Reported-by: Greg Kroah-Hartman Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 48 ++++++++++---------------- 1 file changed, 19 insertions(+), 29 deletions(-) commit c7cca540ebde2b1435f70a542f7b4ebc64fedc6b Author: Sameer Wadgaonkar Date: Tue Feb 21 12:53:30 2017 -0500 staging: unisys: visorbus: remove character device interface Removed the character device interface from visorchipset and removed the major and minor numbers. Reported-by: Greg Kroah-Hartman Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 158 ------------------------- 1 file changed, 158 deletions(-) commit 765b2f8280f57c0b138062236f7278ed050dfac7 Author: Sameer Wadgaonkar Date: Tue Feb 21 12:53:29 2017 -0500 staging: unisys: visorbus: added struct visorchipset_device Added the structure visorchipset_device and moved the globals to the struct. The visorchipset_init() function saves acpi_device within this structure. Reported-by: Greg Kroah-Hartman Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 197 ++++++++++++++----------- 1 file changed, 112 insertions(+), 85 deletions(-) commit c0487e7e83f1367a9f9c1de545d20e0b53e4190e Author: David Binder Date: Tue Feb 21 12:53:28 2017 -0500 staging: unisys: visorhba: visorhba_main.c: Remove kernel-doc comments Removes kernel-doc formatting for comments that precede static functions. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorhba/visorhba_main.c | 64 ++++++++++++------------- 1 file changed, 32 insertions(+), 32 deletions(-) commit 0bb10830e5b8f0ba51960170ebb137bdaa11db9c Author: David Binder Date: Tue Feb 21 12:53:27 2017 -0500 staging: unisys: visornic: visornic_main.c: Remove kernel-doc comments Removes kernel-doc formatting for comments that precede static functions. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 70 ++++++++++++------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit 4a1f98f15ddde53fff2c3508189cbe19f2a0ce9e Author: David Binder Date: Tue Feb 21 12:53:26 2017 -0500 staging: unisys: visorbus: vbuschannel.h: Remove kernel-doc comment Removes kernel-doc formatting for comment that precedes a static function. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/vbuschannel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04dbfea65ac9c4fe60e689e1d748e4774d3c0437 Author: David Binder Date: Tue Feb 21 12:53:25 2017 -0500 staging: unisys: visorbus: visorchipset.c: Remove kernel-doc comments Removes kernel-doc formatting for comments that precede static functions. Reported-by: Greg Kroah-Hartman Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit b84be59a5e1f49cf748a580948f05101a217ba91 Author: David Binder Date: Tue Feb 21 12:53:24 2017 -0500 staging: unisys: visorbus: visorbus_main.c: Remove kernel-doc comments Removes kernel-doc formatting for comments that precede static functions. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 36 ++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) commit 3a8bc4b72c8625d012d2e392ac90807e3abf75a5 Author: David Binder Date: Tue Feb 21 12:53:23 2017 -0500 staging: unisys: visorbus: visorchannel.c: Remove kernel-doc comment Removes kernel-doc formatting for comment that precedes a static function. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a330727a8232317dd2548c9155820854c260cb1 Author: David Binder Date: Tue Feb 21 12:53:22 2017 -0500 staging: unisys: visorhba: Make miscellaneous comment corrections Fixes miscellaneous comment issues in visorhba_main.c. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorhba/visorhba_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ce4617ef9f0b4978f7fe857ab3cb40f809495db4 Author: David Binder Date: Tue Feb 21 12:53:21 2017 -0500 staging: unisys: visorbus: Fix spelling mistake Fixes a minor spelling mistake in a function comment. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7ec83df07f01161c194eb5f8a21fc6e929fc0357 Author: David Binder Date: Tue Feb 21 12:53:20 2017 -0500 staging: unisys: visorbus: Move kernel-doc comment to proper location Moves kernel-doc comment in front of the function it describes. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit a2f1538bc7bad676ef96acaefa4b71db7f4758a9 Author: Cédric Le Goater Date: Wed Mar 1 15:26:43 2017 +0100 ARM: aspeed: Add CONFIG_SPI_ASPEED_SMC Signed-off-by: Cédric Le Goater Signed-off-by: Joel Stanley arch/arm/configs/aspeed_g4_defconfig | 3 +++ arch/arm/configs/aspeed_g5_defconfig | 3 +++ 2 files changed, 6 insertions(+) commit 505b681539a7e14aeb866515d3ef1a67375839bc Author: Daniel Vetter Date: Mon Mar 6 08:34:44 2017 +0100 drm/i915: Update DRIVER_DATE to 20170306 Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 66c373228dc4e3b1e511e013aebd8dc6e1853ba6 Author: Maxime Ripard Date: Thu Feb 9 16:01:18 2017 +0100 ARM: sun8i: a33: Add the Mali OPPs The Mali GPU in the A33 has various operating frequencies used in the Allwinner BSP. Add them to our DT. Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a33.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 6b76eb80d0b68a725a805ffe01fe9333962cde46 Author: Maxime Ripard Date: Thu Feb 9 16:42:51 2017 +0100 dt-bindings: gpu: mali: Add optional OPPs The operating-points-v2 binding gives a way to provide the OPP of the GPU. Let's use it. Signed-off-by: Maxime Ripard Acked-by: Rob Herring Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt | 4 ++++ 1 file changed, 4 insertions(+) commit b6b204eabe8eba8d9194349365a03b311fdba580 Author: Maxime Ripard Date: Thu Feb 9 16:45:04 2017 +0100 dt-bindings: gpu: mali: Add optional memory-region The reserved memory bindings allow us to specify which memory areas our buffers can be allocated from. Let's use it. Signed-off-by: Maxime Ripard Acked-by: Rob Herring Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 7daa213700758b5b08fc0daab09bb139dd334165 Author: Emmanuel Vadot Date: Thu Feb 23 07:55:39 2017 +0100 ARM: dts: sunxi: Add regulators for Sinovoip BPI-M2 Add the needed node for DFVS on Sinovoip BPI-M2. This add the axp221 under the p2wi node, the regulators and the cpu-supply property for cpu0. Signed-off-by: Emmanuel Vadot Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts | 57 ++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 69b292a0479588b848f014b0519e343e73c42fa1 Author: Marcus Cooper Date: Mon Feb 20 17:22:18 2017 +0100 ARM: dts: sun8i-h3: Add mmc2 node to the X2 The Beelink X2 has an on-board eMMC so add a node enabling the mmc2 controller. Signed-off-by: Marcus Cooper Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ce74381ef9c6bdd995da0302e9dc7783f49c492e Author: Jonathan Liu Date: Fri Feb 10 20:33:37 2017 +1100 ARM: sun7i: Enable audio codec on A20-OLinuXino-Micro The A20-OLinuXino-Micro has 3.5 mm sockets for headphone output and microphone input. Signed-off-by: Jonathan Liu Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 4 ++++ 1 file changed, 4 insertions(+) commit e05225a910427a7c97f9b312dabeafc48d1b8078 Author: Jelle van der Waa Date: Wed Feb 8 20:44:44 2017 +0100 ARM: dts: sun8i: Add dts file for NanoPi NEO Air add support for the NanoPi NEO Air H3 board from friendlyarm.com . This board contains WiFi, Bluetooth, 8GB eMMC storage and 512 MB DDR3 ram. Signed-off-by: Jelle van der Waa Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts | 97 +++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) commit 1f4ce3b6ca79bdb0ffbe82990c9b94b5a4a02d66 Author: Maxime Ripard Date: Fri Feb 3 16:01:27 2017 +0100 ARM: sun5i: gr8: Use common sun5i DTSI Most of the GR8 DTSI is duplicated with the common sun5i DTSI, and some of the extra nodes defined there actually apply to all of the sun5i family. Move those into the common DTSI so that all SoCs can benefit from it, and include the sun5i DTSI. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i-gr8-chip-pro.dts | 4 +- arch/arm/boot/dts/sun5i-gr8-evb.dts | 4 +- arch/arm/boot/dts/sun5i-gr8.dtsi | 617 ++----------------------------- arch/arm/boot/dts/sun5i.dtsi | 45 +++ 4 files changed, 78 insertions(+), 592 deletions(-) commit bea13693b2bb7ed4d2364d3c6f8ee268fe8f98ec Author: Maxime Ripard Date: Fri Feb 3 16:01:27 2017 +0100 ARM: sun5i: r8: Merge common controllers into the common DTSI Some controllers found in the R8 DTSI actually apply to all of the sun5i family. Move those into the common DTSI so that all SoCs can benefit from it. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i-r8.dtsi | 40 ---------------------------------------- arch/arm/boot/dts/sun5i.dtsi | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 40 deletions(-) commit 78f6d98278353d28388b70b2785566177f957b5f Author: Maxime Ripard Date: Fri Feb 3 16:01:27 2017 +0100 ARM: sun5i: a10s: Merge common controllers into the common DTSI Some controllers found in the A10s DTSI actually apply to all of the sun5i family. Move those into the common DTSI so that all SoCs can benefit from it. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i-a10s.dtsi | 70 --------------------------------------- arch/arm/boot/dts/sun5i.dtsi | 62 ++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 70 deletions(-) commit 85870196258f34aabe66fcf2780b5a698c572b4f Author: Maxime Ripard Date: Fri Feb 3 16:01:27 2017 +0100 ARM: sun5i: a13: Merge common controllers into the common DTSI Some controllers found in the A13 DTSI actually apply to all of the sun5i family. Move those into the common DTSI so that all SoCs can benefit from it. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i-a13.dtsi | 139 -------------------------------------- arch/arm/boot/dts/sun5i.dtsi | 140 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+), 139 deletions(-) commit e6f50b223da10de6bd70b8b9d217bd0c77ae5c13 Author: Maxime Ripard Date: Sun Feb 5 17:56:40 2017 +0100 ARM: sun5i: Rename UART3 flow control pins The UART3 pin group for the CTS and RTS signals doesn't follow our usual pattern. Rename it so that it matches. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i-r8-chip.dts | 2 +- arch/arm/boot/dts/sun5i.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bab86b948e8e1052a82c8723db717ae3d727f2fa Author: Maxime Ripard Date: Sun Feb 5 17:55:01 2017 +0100 ARM: sun5i: Add UART2 pin group There's one UART2 pin group that can be used across all sun5i SoCs. However, the A10s already has one pin group for that controller. Change the index of the one in the A10s DTSI, and add the common one to sun5i.dtsi Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 2 +- arch/arm/boot/dts/sun5i-a10s.dtsi | 2 +- arch/arm/boot/dts/sun5i.dtsi | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) commit b8fa6ca601908653a14bddc75691f41d29d15f76 Author: Maxime Ripard Date: Sun Feb 5 18:02:43 2017 +0100 ARM: sun5i: a10s: switch simple framebuffer indices Of the three simple framebuffer setups we have in the A10s, two of them can be shared with the other SoCs from the sun5i family (LCD panel and composite output). However, the only one we cannot share is the HDMI, which is the first listed in the A10s DTSI. In order to make it more logical and so that we can share the framebuffer nodes in the common DTSI, reorder those nodes. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i-a10s.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 60d9c3a838d3d96f063f32aedddac7793409909d Author: Maxime Ripard Date: Sun Feb 5 18:01:22 2017 +0100 ARM: sun5i: A10s: Switch the EMAC pins indices One of the pins group for the EMAC can be used by all the SoCs of the sun5i family, and as such can be moved to the common DTSI. Unfortunately, this group is the second one we declare in our DT for now. Make it the first one so that it's more logical and consistent with the rest of our DTs before moving it. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 2 +- arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts | 2 +- arch/arm/boot/dts/sun5i-a10s.dtsi | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 7cae7ef89e360cd3dc139eaac2f480c25bc7bfa1 Author: Rask Ingemann Lambertsen Date: Wed Feb 8 23:09:31 2017 +0100 ARM: multi_v7_defconfig: Switch AXP20x driver from module to built-in The AXP20X regulator support is currently built as a module, which means it's not available until the root fs has been mounted, but the boot loader might not have enabled the required regulators, so build their drivers into the kernel. Signed-off-by: Rask Ingemann Lambertsen Signed-off-by: Maxime Ripard arch/arm/configs/multi_v7_defconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f48a203cc44f26921f05911c047db49d2864c797 Author: Rask Ingemann Lambertsen Date: Wed Feb 8 23:08:45 2017 +0100 ARM: multi_v7_defconfig: Enable AC100 RTC driver Enable the AC100 RTC driver so boards with it can keep track of time. Signed-off-by: Rask Ingemann Lambertsen Signed-off-by: Maxime Ripard arch/arm/configs/multi_v7_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 5741e07b465d32458945d363ce87c0e2b7fd028d Author: Rask Ingemann Lambertsen Date: Wed Feb 8 23:08:00 2017 +0100 ARM: multi_v7_defconfig: Switch sunxi RSB driver from module to built-in The sunxi RSB bus is used for peripherals like voltage regulators and real-time clocks which should be available early in the boot process. As a module, the driver will not be available until the root fs has been mounted, so build the driver into the kernel. Signed-off-by: Rask Ingemann Lambertsen Signed-off-by: Maxime Ripard arch/arm/configs/multi_v7_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f5dbd68682ae77942bb4985485e0b2bf5dff28a Author: Rask Ingemann Lambertsen Date: Wed Feb 8 23:07:15 2017 +0100 ARM: sunxi_defconfig: Enable AC100 RTC driver Enable the AC100 RTC driver so boards with it can keep track of time. Signed-off-by: Rask Ingemann Lambertsen Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/configs/sunxi_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 202fc71b95e35eca1f1bb8fbf8873a17a5ba47c5 Author: Maxime Ripard Date: Thu Feb 9 17:39:21 2017 +0100 ARM: sunxi: Select PM_OPP Device frequency scaling is implemented through devfreq in the kernel, which requires CONFIG_PM_OPP. Let's select it. Signed-off-by: Maxime Ripard arch/arm/mach-sunxi/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 041cf7e064996373148b24788e1aa7a036266986 Author: Colin Ian King Date: Tue Feb 21 18:30:45 2017 +0000 dmaengine: stm32-dma: fix up error dev_err message Trivial fix to spelling mistake and make channel plural. Signed-off-by: Colin Ian King Signed-off-by: Vinod Koul drivers/dma/stm32-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59e1a4afaf2c38a8de4cd6ffcf35b10a0a76435a Author: Tony Lindgren Date: Sun Mar 5 20:11:56 2017 -0800 ARM: dts: Add keypad support for droid 4 Let's configure the keypad in a way where it's usable out of the box for Linux console use. We want to have the keyboard usable with Linux console for example when stuck into an initramfs during boot, for when installing a distro. As we need to need to have keys mapped in the user space anyways for some of the keys to match the labels, this non-standard mapping or usability should be OK. Some keys don't match the labels either as they don't follow the PC keyboard style. For example we have "shift + ," produce "<", and "shift + ." produce ">" instead of ";" and ":". So let's follow the standard PC keyboard layout for ctrl, shift and alt keys: Ctrl = what is labeled as shift Alt = what is labeled as SYM Shift = what is lableled as caps lock This way we have Ctrl key for console use. Who knows where they got the caps lock idea.. Probably from some focus group popularity vote or something. For the OK key, let's keep it as the useless KEY_OK unless we can come up with some standard mapping for it we can stick with. We have at least Esc, Delete, Meta, and Page Down keys missing, but none of them seem to be better than others. PC keyboard often has Page Down in that location. Esc would be probably the most usable one when installing a Linux distro but is the opposite of OK. Note that the LCD keys are just touchscreen hot spots, so I'm not sure if the driver or hardware allows setting them up as keys for the console. Anyways, the rest can be mapped in the user space. Cc: Marcel Partap Cc: Mark Rutland Cc: Michael Scott Tested-By: Sebastian Reichel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-droid4-xt894.dts | 75 ++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit 60aadea57ed98e734a7e9edb3076b5a72eff0b0d Author: Douglas Anderson Date: Tue Feb 14 13:01:14 2017 -0800 clk: rockchip: Set "ignore unused" for PMU M0 clocks on rk3399 The PMU Cortex M0 on rk3399 is intended to be used for things like DDRFreq transitions, suspend/resume, and other things that are the purview of ARM Trusted Firmware and not the kernel. As such, the kernel shouldn't be messing with the clocks. Add CLK_IGNORE_UNUSED to these clocks. Without this change, the following was observed on a Chromebook with a rk3399 (using not-yet-upstream ARM Trusted Firmware code and not-yet-upstream kernel code based on kernel-4.4): 1. We init the clock framework. 2. We start up "DDRFreq", which causes ATF to occasionally fire up the M0 for transitions. Each time ATF fires up the M0 it will turn on these clocks and each time it is done it will turn them off. 3. We finally get to the the part of the kernel that calls clk_disable_unused() and we disables the clocks. You can see the race above. Basically everything is fine as long as ARM Trusted Firmware isn't starting up the M0 at exactly the same time that the kernel is disabling unused clocks. ...but if the race happens then we go boom. Signed-off-by: Douglas Anderson Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3399.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 66aef3cb9125583522d7d8da38d420d77287728a Author: Brian Norris Date: Thu Feb 9 17:05:21 2017 -0800 arm64: dts: rockchip: sort rk3399-pcie by unit address f8000000 is less than all the other (top-level) unit addresses. Signed-off-by: Brian Norris Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 88 ++++++++++++++++---------------- 1 file changed, 44 insertions(+), 44 deletions(-) commit 223599514133293bb9afe7b82937140c3b275877 Author: Eddie Cai Date: Tue Feb 14 18:07:31 2017 +0800 ARM: dts: rockchip: add dts for RK3288-Tinker board This patch add basic support for RK3288-Tinker board. We can boot in to rootfs with this patch. Signed-off-by: Eddie Cai Signed-off-by: Heiko Stuebner arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/rk3288-tinker.dts | 536 ++++++++++++++++++++++++++++++++++++ 2 files changed, 537 insertions(+) commit a7a24e9259771a11caad783ef6e85087ecb49703 Author: Eddie Cai Date: Tue Feb 14 18:07:30 2017 +0800 dt-bindings: add rk3288-based Asus Tinker board Tinker board is a credit card size develop board designed by Asus. Powered by RK3288. Acked-by: Rob Herring Signed-off-by: Eddie Cai Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.txt | 3 +++ 1 file changed, 3 insertions(+) commit f5de310cf4f0eddd7e6c63ddd9f47f244516e27a Author: Willy Tarreau Date: Sat Feb 11 09:56:45 2017 +0100 ARM: dts: rockchip: fix the MiQi board's LED definition The MiQi board's green LED doesn't work at all with the mainline kernel. There are multiple reasons to this. First, the gpio number is wrong, it is declared on gpio220 (chip 7 pin 4) instead of gpio218 (chip 7 pin 2). Second, a pinctrl is referenced, also declared with the same wrong value while it is not unused. Third, the GPIO polarity was wrong (active low instead of active high) with the default value set to "default-on", resulting in the LED being turned off even when the GPIO is correct. This patch fixes all these inconsistencies at once since these they are related to each other, and also restores the "timer" trigger which is the same as the one used by the kernels shipped with the board. It's important to note that during the port to mainline, the led's label was changed from "System" to "miqi:green:user", so scripts making use of the name will still not work until they're fixed. Fixes: b1a76f75d76e ("ARM: dts: rockchip: add MiQi board from mqmaker") Signed-off-by: Willy Tarreau Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-miqi.dts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit db3347846f7f20fe7e6d0da8e5d31f6c50313611 Author: Romain Perier Date: Fri Feb 3 15:38:00 2017 +0100 ARM: dts: rockchip: Add support for ES8388 to the Radxa Rock 2 This commit adds the DT definition of the es8388 i2c device found at address 0x10. It also adds the definition for connecting the Rockchip I2S to the es8388 analog output. This commit is based on the initial work that was done by Sjoerd Simons with some improvements. Signed-off-by: Romain Perier Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-rock2-som.dtsi | 2 +- arch/arm/boot/dts/rk3288-rock2-square.dts | 41 +++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) commit 444f02c458db00bd6049cc1bfe4254e80f57459e Author: Al Viro Date: Tue Dec 27 18:19:09 2016 -0500 uaccess: drop pointless ifdefs None of those file is ever included from uapi stuff, so __KERNEL__ is always defined. None of them is ever included from assembler (they are only pulled from linux/uaccess.h, which _can't_ be included from assembler), so __ASSEMBLY__ is never defined. Signed-off-by: Al Viro arch/cris/include/asm/uaccess.h | 3 --- arch/microblaze/include/asm/uaccess.h | 6 ------ arch/powerpc/include/asm/uaccess.h | 6 ------ arch/sparc/include/asm/uaccess_32.h | 6 ------ arch/sparc/include/asm/uaccess_64.h | 6 ------ 5 files changed, 27 deletions(-) commit af1d5b37d6211c814fac0d5d0b71ec695618054a Author: Al Viro Date: Tue Dec 27 18:14:09 2016 -0500 uaccess: drop duplicate includes from asm/uaccess.h Signed-off-by: Al Viro arch/alpha/include/asm/uaccess.h | 4 ---- arch/arc/include/asm/uaccess.h | 2 -- arch/arm/include/asm/uaccess.h | 2 -- arch/arm64/include/asm/uaccess.h | 2 -- arch/avr32/include/asm/uaccess.h | 3 --- arch/blackfin/include/asm/uaccess.h | 1 - arch/cris/include/asm/uaccess.h | 2 -- arch/frv/include/asm/uaccess.h | 1 - arch/hexagon/include/asm/uaccess.h | 1 - arch/ia64/include/asm/uaccess.h | 2 -- arch/m32r/include/asm/uaccess.h | 2 -- arch/m68k/include/asm/uaccess_mm.h | 2 -- arch/m68k/include/asm/uaccess_no.h | 1 - arch/metag/include/asm/uaccess.h | 1 - arch/microblaze/include/asm/uaccess.h | 2 -- arch/mips/include/asm/uaccess.h | 2 -- arch/mn10300/include/asm/uaccess.h | 2 -- arch/nios2/include/asm/uaccess.h | 2 -- arch/openrisc/include/asm/uaccess.h | 2 -- arch/parisc/include/asm/uaccess.h | 2 -- arch/powerpc/include/asm/uaccess.h | 2 -- arch/s390/include/asm/uaccess.h | 2 -- arch/score/include/asm/uaccess.h | 2 -- arch/sh/include/asm/uaccess.h | 2 -- arch/sparc/include/asm/uaccess_32.h | 2 -- arch/sparc/include/asm/uaccess_64.h | 2 -- arch/tile/include/asm/uaccess.h | 1 - arch/um/include/asm/uaccess.h | 1 - arch/unicore32/include/asm/uaccess.h | 3 --- arch/x86/include/asm/uaccess.h | 2 -- arch/x86/include/asm/uaccess_32.h | 2 -- arch/x86/include/asm/uaccess_64.h | 1 - arch/xtensa/include/asm/uaccess.h | 3 --- include/asm-generic/uaccess.h | 1 - include/linux/uaccess.h | 1 + 35 files changed, 1 insertion(+), 64 deletions(-) commit 5e6039d8a307d8411422c154f3d446b44fa32b6d Author: Al Viro Date: Tue Dec 27 18:00:15 2016 -0500 uaccess: move VERIFY_{READ,WRITE} definitions to linux/uaccess.h Signed-off-by: Al Viro arch/alpha/include/asm/uaccess.h | 3 --- arch/arm/include/asm/uaccess.h | 3 --- arch/arm64/include/asm/uaccess.h | 3 --- arch/avr32/include/asm/uaccess.h | 3 --- arch/blackfin/include/asm/uaccess.h | 3 --- arch/cris/include/asm/uaccess.h | 3 --- arch/frv/include/asm/uaccess.h | 3 --- arch/hexagon/include/asm/uaccess.h | 2 -- arch/ia64/include/asm/uaccess.h | 3 --- arch/m32r/include/asm/uaccess.h | 3 --- arch/m68k/include/asm/uaccess_mm.h | 3 --- arch/m68k/include/asm/uaccess_no.h | 3 --- arch/metag/include/asm/uaccess.h | 3 --- arch/microblaze/include/asm/uaccess.h | 3 --- arch/mips/include/asm/uaccess.h | 3 --- arch/mn10300/include/asm/uaccess.h | 3 --- arch/nios2/include/asm/uaccess.h | 3 --- arch/openrisc/include/asm/uaccess.h | 3 --- arch/parisc/include/asm/uaccess.h | 3 --- arch/powerpc/include/asm/uaccess.h | 3 --- arch/s390/include/asm/uaccess.h | 3 --- arch/score/include/asm/uaccess.h | 3 --- arch/sh/include/asm/uaccess.h | 3 --- arch/sparc/include/asm/uaccess_32.h | 3 --- arch/sparc/include/asm/uaccess_64.h | 3 --- arch/tile/include/asm/uaccess.h | 3 --- arch/x86/include/asm/uaccess.h | 3 --- arch/xtensa/include/asm/asm-uaccess.h | 3 --- arch/xtensa/include/asm/uaccess.h | 3 --- include/asm-generic/uaccess.h | 3 --- include/linux/uaccess.h | 4 ++++ 31 files changed, 4 insertions(+), 89 deletions(-) commit d722bc94615d582d2cdb0e9b6f1a56a2628d0c77 Author: Jon Mason Date: Wed Feb 8 18:43:23 2017 -0500 MAINTAINERS: Add Jon Mason to BCM5301X maintainers Adding myself as a maintainer for Broadcom Northstar SoCs. Also, adding a regex entry to discover the SVK DTs already present. Signed-off-by: Jon Mason Acked-by: Hauke Mehrtens Signed-off-by: Florian Fainelli MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit bd0faf08dc7fcb3e555b35f556c9012b3c93de3b Author: Florian Fainelli Date: Tue Feb 14 16:41:57 2017 -0800 soc: bcm: brcmstb: Match additional compatible strings Match all known sun-top-ctrl compatible strings from our MIPS chips counterparts. This allows us to properly report the SoC information to user-space through our SoC driver. Signed-off-by: Florian Fainelli drivers/soc/bcm/brcmstb/common.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit b94c478a8f1470c68122e0f8de23d56724b09363 Author: Rafał Miłecki Date: Tue Feb 14 17:49:06 2017 +0100 ARM: dts: BCM53573: Add Tenda AC9 2 GHz LED It's connected to a GPIO pin of an extra controller placed on the PCIe card. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm47189-tenda-ac9.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b76907ccfaef5910bb849aeb99e339d87a764398 Author: Rafał Miłecki Date: Tue Feb 14 17:49:05 2017 +0100 ARM: dts: BCM53573: Describe Tenda AC9 PCIe card in DT Tenda AC9 has PCIe controller with just one device connected to it: 0000:00:00.0 14e4:d145 Bridge Device └─ 0000:01:00.0 14e4:a8db Network Controller This card is directly on SoC (doesn't use physical connector) and has BCM43217 chipset with bcma bus. One of its components is ChipCommon core which is also a GPIO controller. We need to describe it to be able to add devices using its GPIO pins. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm47189-tenda-ac9.dts | 27 +++++++++++++++++++++++++++ arch/arm/boot/dts/bcm53573.dtsi | 4 ++++ 2 files changed, 31 insertions(+) commit c9db2d49d5aba1e75aef7dc2a078c572d4f626e9 Author: Steve Lin Date: Thu Feb 23 14:23:03 2017 -0500 ARM: dts: BCM5301X: Add support for BCM953012HR Initial version of DTS to support Broadcom BCM953012HR Northstar HR platform, similar to, but not the same as existing 953012K. Signed-off-by: Steve Lin Acked-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm953012hr.dts | 99 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) commit 7e2f4e3024c95c5de3e41c0b044a5b8fbfc10680 Author: Rafał Miłecki Date: Thu Feb 23 14:06:36 2017 +0100 ARM: dts: BCM5301X: Add basic DT for Linksys EA9500 It's tri-band wireless home router based on BCM47094 AKA BCM4709C0. It uses 3 x BCM4366 chipsets for wireless. Panamera seems to be board name used by Linksys. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 36 +++++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit 1c8f4065072387d3b6ee7adcf0dbe3c7ba80c268 Author: Jon Mason Date: Wed Feb 8 15:45:16 2017 -0500 ARM: dts: BCM5301X: convert to iProc QSPI The iproc-qspi driver is the SPI driver that should be used going forward. Modify the SPI DT entry to use this driver, and add an entry in the bcm953012k DTS file to enable the SPI. Tested on the bcm953012k board. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm5301x.dtsi | 50 +++++++++++++++++++++++++++++----------- arch/arm/boot/dts/bcm953012k.dts | 26 +++++++++++++++++++++ 2 files changed, 62 insertions(+), 14 deletions(-) commit df2992050f2606acd3b6db82abf3bda07e73c47d Author: Jon Mason Date: Wed Feb 8 15:45:15 2017 -0500 ARM: dts: BCM5301X: Add NAND entries to bcm953012k Add the NAND entry in the DTS for the bcm953012k reference board. Signed-off-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm953012k.dts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 4317d557e6290e3982db47f6379dee0ed4c9333a Author: Rafał Miłecki Date: Wed Jan 25 10:44:17 2017 +0100 ARM: dts: BCM5301X: Add basic DT for Linksys EA6300 V1 It's wireless home router based on BCM4708A0 with BCM4360 + BCM43217 wireless chipsets. LEDs will be hopefully added later to the DT. According to some sources it may use the same board as EA6400 and just differ by an original vendor firmware. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts | 41 +++++++++++++++++++++++++ 2 files changed, 42 insertions(+) commit 9e0a805bd77a7bf622bcea05aabfb250348b17ee Author: Rafał Miłecki Date: Wed Jan 25 08:09:16 2017 +0100 ARM: dts: BCM5301X: Add basic DT for Linksys EA9200 It's tri-band wireless home router based on BCM4709A0 with 3 x BCM43602 chipsets. LEDs will be hopefully added later to the DT. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm4709-linksys-ea9200.dts | 42 ++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) commit 264f5f2673d6c60de7233b8437b56717475a48f3 Author: Rob Rice Date: Fri Feb 3 12:55:34 2017 -0500 arm64: dts: NS2: Add Broadcom SPU driver DT entry Add Northstar2 device tree entry for Broadcom Secure Processing Unit (SPU) crypto hardware. Signed-off-by: Steve Lin Signed-off-by: Rob Rice Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/ns2.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit ca97d939db114c8d1619e10a3b82af8615372dae Author: James Morris Date: Wed Feb 15 00:18:51 2017 +1100 security: mark LSM hooks as __ro_after_init Mark all of the registration hooks as __ro_after_init (via the __lsm_ro_after_init macro). Signed-off-by: James Morris Acked-by: Stephen Smalley Acked-by: Kees Cook security/apparmor/lsm.c | 2 +- security/commoncap.c | 2 +- security/loadpin/loadpin.c | 2 +- security/security.c | 2 +- security/selinux/hooks.c | 2 +- security/smack/smack_lsm.c | 2 +- security/tomoyo/tomoyo.c | 2 +- security/yama/yama_lsm.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) commit dd0859dccbe291cf8179a96390f5c0e45cb9af1d Author: James Morris Date: Wed Feb 15 00:17:24 2017 +1100 security: introduce CONFIG_SECURITY_WRITABLE_HOOKS Subsequent patches will add RO hardening to LSM hooks, however, SELinux still needs to be able to perform runtime disablement after init to handle architectures where init-time disablement via boot parameters is not feasible. Introduce a new kernel configuration parameter CONFIG_SECURITY_WRITABLE_HOOKS, and a helper macro __lsm_ro_after_init, to handle this case. Signed-off-by: James Morris Acked-by: Stephen Smalley Acked-by: Casey Schaufler Acked-by: Kees Cook include/linux/lsm_hooks.h | 7 +++++++ security/Kconfig | 5 +++++ security/selinux/Kconfig | 6 ++++++ 3 files changed, 18 insertions(+) commit 84e6885e9e6a818d1ca1eabb9b720b357ab07a8b Author: Stephen Smalley Date: Tue Feb 28 09:35:08 2017 -0500 selinux: fix kernel BUG on prlimit(..., NULL, NULL) commit 79bcf325e6b32b3c ("prlimit,security,selinux: add a security hook for prlimit") introduced a security hook for prlimit() and implemented it for SELinux. However, if prlimit() is called with NULL arguments for both the new limit and the old limit, then the hook is called with 0 for the read/write flags, since the prlimit() will neither read nor write the process' limits. This would in turn lead to calling avc_has_perm() with 0 for the requested permissions, which triggers a BUG_ON() in avc_has_perm_noaudit() since the kernel should never be invoking avc_has_perm() with no permissions. Fix this in the SELinux hook by returning immediately if the flags are 0. Arguably prlimit64() itself ought to return immediately if both old_rlim and new_rlim are NULL since it is effectively a no-op in that case. Reported by the lkp-robot based on trinity testing. Signed-off-by: Stephen Smalley Acked-by: Paul Moore Signed-off-by: James Morris security/selinux/hooks.c | 2 ++ 1 file changed, 2 insertions(+) commit 791ec491c372f49cea3ea7a7143454a9023ac9d4 Author: Stephen Smalley Date: Fri Feb 17 07:57:00 2017 -0500 prlimit,security,selinux: add a security hook for prlimit When SELinux was first added to the kernel, a process could only get and set its own resource limits via getrlimit(2) and setrlimit(2), so no MAC checks were required for those operations, and thus no security hooks were defined for them. Later, SELinux introduced a hook for setlimit(2) with a check if the hard limit was being changed in order to be able to rely on the hard limit value as a safe reset point upon context transitions. Later on, when prlimit(2) was added to the kernel with the ability to get or set resource limits (hard or soft) of another process, LSM/SELinux was not updated other than to pass the target process to the setrlimit hook. This resulted in incomplete control over both getting and setting the resource limits of another process. Add a new security_task_prlimit() hook to the check_prlimit_permission() function to provide complete mediation. The hook is only called when acting on another task, and only if the existing DAC/capability checks would allow access. Pass flags down to the hook to indicate whether the prlimit(2) call will read, write, or both read and write the resource limits of the target process. The existing security_task_setrlimit() hook is left alone; it continues to serve a purpose in supporting the ability to make decisions based on the old and/or new resource limit values when setting limits. This is consistent with the DAC/capability logic, where check_prlimit_permission() performs generic DAC/capability checks for acting on another task, while do_prlimit() performs a capability check based on a comparison of the old and new resource limits. Fix the inline documentation for the hook to match the code. Implement the new hook for SELinux. For setting resource limits, we reuse the existing setrlimit permission. Note that this does overload the setrlimit permission to mean the ability to set the resource limit (soft or hard) of another process or the ability to change one's own hard limit. For getting resource limits, a new getrlimit permission is defined. This was not originally defined since getrlimit(2) could only be used to obtain a process' own limits. Signed-off-by: Stephen Smalley Signed-off-by: James Morris include/linux/lsm_hooks.h | 18 +++++++++++++++--- include/linux/security.h | 13 +++++++++++++ kernel/sys.c | 30 ++++++++++++++++++------------ security/security.c | 8 ++++++++ security/selinux/hooks.c | 14 ++++++++++++++ security/selinux/include/classmap.h | 2 +- 6 files changed, 69 insertions(+), 16 deletions(-) commit 74dc3cd32e062b664e78c2e61331b4e0caac7822 Author: Cédric Le Goater Date: Wed Mar 1 15:26:42 2017 +0100 ARM: dts: aspeed: add SPI controller bindings Let's define the SPI controllers in the Aspeed SoCs AST2500 and AST2400 and also enable these, as well as the chips, on the associated platforms. Signed-off-by: Cédric Le Goater Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-ast2500-evb.dts | 20 +++++++++ arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 16 +++++++ arch/arm/boot/dts/aspeed-g4.dtsi | 29 ++++++++++++ arch/arm/boot/dts/aspeed-g5.dtsi | 63 +++++++++++++++++++++++++++ 4 files changed, 128 insertions(+) commit 1142f1760a4c1b6f55835de89424114b085b1ca1 Author: Cristian Birsan Date: Thu Feb 16 19:16:28 2017 +0200 ARM: dts: at91: Disable SPI on at91sam9x5ek to allow MCI1 to work. The A13 hardware line is shared by SPI and MCI1 controller.This patch disables the SPI controller so that the MCI1 (the big MMC card slot) can be used. Signed-off-by: Cristian Birsan Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91sam9x5ek.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8682827f66fb37fcc41cedefc754ba4f5075df6f Author: Boris Brezillon Date: Mon Feb 13 12:01:54 2017 +0100 ARM: dts: at91: Fix matrix compatible The matrix node was defined before the documentation for the bus matrix configuration was submitted. Patch the device tree to match the DT doc. Signed-off-by: Boris Brezillon Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91sam9261.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 367daf8916b99a3a544f6cfd2cba2baa3a7bc1d7 Author: Alexandre Belloni Date: Thu Feb 2 19:53:17 2017 +0100 ARM: dts: at91: sama5d2_xplained: enable RTC wakeup The sama5d2 Xplained can wake up with its RTC. Enable that feature. Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d2_xplained.dts | 1 + 1 file changed, 1 insertion(+) commit 4ea5a9ef3c1285a62bc274be7638a4c894f64826 Author: Alexandre Belloni Date: Thu Feb 2 19:51:39 2017 +0100 ARM: dts: at91: sama5d2: add sfrbu SFRBU, the Special Function Registers Backup manage specific aspects of the integrated memory, bridge implementations, processor and other functionality not controlled elsewhere. Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/arm/atmel-at91.txt | 3 ++- arch/arm/boot/dts/sama5d2.dtsi | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 7160d57b6f81185c4bcf2365dc152c1905ff2ab7 Author: Laurent Pinchart Date: Thu Mar 2 12:47:28 2017 +0200 drm: bridge: lvds-encoder: Add thine,thc63lvdm83d compatible string The THC63LVDM83D is a transparent LVDS encoder. Unlike dumb LVDS encoders it can be controlled through a few pins (power down, LVDS swing, clock edge selection) and requires power supplies. However, on several boards where the device is used neither the control pins nor the power supply are controllable. To avoid developing a separate device-specific driver add a "thine,thc63lvdm83d" compatible entry to the lvds-encoder driver. This will allow supporting many THC63LVDM83D-based boards easily, while allowing future development of an thc63lvdm83d driver when needed without breaking backward compatibility. Signed-off-by: Laurent Pinchart Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170302104728.7150-5-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/lvds-encoder.c | 1 + 1 file changed, 1 insertion(+) commit d29ffab591235c46e4eb9c72422c8d6789764db4 Author: Laurent Pinchart Date: Thu Mar 2 12:47:27 2017 +0200 drm: bridge: vga-dac: Add adi,adv7123 compatible string The ADV7123 is a transparent VGA DAC. Unlike dumb VGA DACs it can be controlled through a power save pin, and requires a power supply. However, on most boards where the device is used neither the power save signal nor the power supply are controllable. To avoid developing a separate device-specific driver add an "adi,adv7123" compatible entry to the dumb-vga-dac driver. This will allow supporting most ADV7123-based boards easily, while allowing future development of an adv7123 driver when needed without breaking backward compatibility. Signed-off-by: Laurent Pinchart Acked-by: Maxime Ripard Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170302104728.7150-4-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/dumb-vga-dac.c | 1 + 1 file changed, 1 insertion(+) commit 67cc3e22b00f9027eaa0902ecf52ac5f4f5cac97 Author: Laurent Pinchart Date: Thu Mar 2 12:47:26 2017 +0200 drm: bridge: Add LVDS encoder driver The LVDS encoder driver is a DRM bridge driver that supports the parallel to LVDS encoders that don't require any configuration. The driver thus doesn't interact with the device, but creates an LVDS connector for the panel and exposes its size and timing based on information retrieved from DT. Signed-off-by: Laurent Pinchart Acked-by: Daniel Vetter Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170302104728.7150-3-laurent.pinchart+renesas@ideasonboard.com drivers/gpu/drm/bridge/Kconfig | 9 ++ drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/lvds-encoder.c | 209 ++++++++++++++++++++++++++++++++++ 3 files changed, 219 insertions(+) commit 67db256ed1e09fa03551f90ab3562df34c802a0b Author: Laurent Pinchart Date: Thu Mar 2 12:47:25 2017 +0200 devicetree/bindings: display: bridge: Add LVDS encoder DT bindings The DT bindings support parallel to LVDS encoders that don't require any configuration, similarly to the dumb VGA DAC DT bindings. Signed-off-by: Laurent Pinchart Acked-by: Rob Herring Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170302104728.7150-2-laurent.pinchart+renesas@ideasonboard.com .../bindings/display/bridge/lvds-transmitter.txt | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit fcfa0ddc18ed2100fbe80d15a543846b629774c0 Author: Peter Senna Tschudin Date: Fri Mar 3 16:57:09 2017 +0100 drm/bridge: Drivers for megachips-stdpxxxx-ge-b850v3-fw (LVDS-DP++) The video processing pipeline on the second output on the GE B850v3: Host -> LVDS|--(STDP4028)--|DP -> DP|--(STDP2690)--|DP++ -> Video output Each bridge has a dedicated flash containing firmware for supporting the custom design. The result is that in this design neither the STDP4028 nor the STDP2690 behave as the stock bridges would. The compatible strings include the suffix "-ge-b850v3-fw" to make it clear that the driver is for the bridges with the firmware which is specific for the GE B850v3. The driver is powerless to control the video processing pipeline, as the two bridges behaves as a single one. The driver is only needed for telling the host about EDID / HPD, and for giving the host powers to ack interrupts. This driver adds one i2c_device for each bridge, but only one drm_bridge. This design allows the creation of a functional connector that is capable of reading EDID from the STDP2690 while handling interrupts on the STDP4028. Cc: Laurent Pinchart Cc: Martyn Welch Cc: Martin Donnelly Cc: Daniel Vetter Cc: Enric Balletbo i Serra Cc: Philipp Zabel Cc: Rob Herring Cc: Fabio Estevam Cc: David Airlie Cc: Thierry Reding Cc: Thierry Reding Cc: Archit Taneja Cc: Enric Balletbo Signed-off-by: Peter Senna Tschudin Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/ad92919f2eaff2623a551aac94cf11ef948ff9ee.1488555615.git.peter.senna@collabora.com drivers/gpu/drm/bridge/Kconfig | 11 + drivers/gpu/drm/bridge/Makefile | 1 + .../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 428 +++++++++++++++++++++ 3 files changed, 440 insertions(+) commit 2df79e1bddc46ea6ce9746a171220c3f68e378da Author: Narcisa Ana Maria Vasile Date: Sat Mar 4 21:43:12 2017 +0200 staging: iio: accel: Rename source files and update Makefile Rename adis162xx_core.c files to adis162xx.c because these are the only source files for these drivers. Update Makefile to correspond to the new file names. Signed-off-by: Narcisa Ana Maria Vasile rename drivers/staging/iio/accel/{adis16201_core.c => adis16201.c} (100%) rename drivers/staging/iio/accel/{adis16203_core.c => adis16203.c} (100%) rename drivers/staging/iio/accel/{adis16209_core.c => adis16209.c} (100%) rename drivers/staging/iio/accel/{adis16240_core.c => adis16240.c} (100%) Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/Makefile | 7 - drivers/staging/iio/accel/adis16201.c | 386 +++++++++++++++++++++++ drivers/staging/iio/accel/adis16201_core.c | 386 ----------------------- drivers/staging/iio/accel/adis16203.c | 336 ++++++++++++++++++++ drivers/staging/iio/accel/adis16203_core.c | 336 -------------------- drivers/staging/iio/accel/adis16209.c | 386 +++++++++++++++++++++++ drivers/staging/iio/accel/adis16209_core.c | 386 ----------------------- drivers/staging/iio/accel/adis16240.c | 474 +++++++++++++++++++++++++++++ drivers/staging/iio/accel/adis16240_core.c | 474 ----------------------------- 9 files changed, 1582 insertions(+), 1589 deletions(-) commit 521dbebf70189bdc7ee1830ea393c8a74fd24f21 Author: Benjamin Gaignard Date: Wed Mar 1 15:45:05 2017 +0100 iio: Generalize counting direction modes Move counting direction documentation for 104-quad-8 to sysfs-bus-iio to avoid duplicated for other incoming drivers Signed-off-by: Benjamin Gaignard Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio | 14 ++++++++++++++ Documentation/ABI/testing/sysfs-bus-iio-counter-104-quad-8 | 8 -------- 2 files changed, 14 insertions(+), 8 deletions(-) commit 59d0f2da35693bfbcf6ffb014213cb8e225c8928 Author: Song Hongyan Date: Fri Mar 3 21:44:32 2017 +0800 iio: hid: Add temperature sensor support Environmental temperature sensor is a hid defined sensor, it measures temperature. More information can be found in: http://www.usb.org/developers/hidpage/HUTRR39b.pdf According to IIO ABI definition, IIO_TEMP data output unit is milli degrees Celsius. Add the unit convert from degree to milli degree. Signed-off-by: Song Hongyan Acked-by: Srinivas Pandruvada Signed-off-by: Jonathan Cameron .../iio/common/hid-sensors/hid-sensor-attributes.c | 3 + drivers/iio/temperature/Kconfig | 14 + drivers/iio/temperature/Makefile | 1 + drivers/iio/temperature/hid-sensor-temperature.c | 311 +++++++++++++++++++++ include/linux/hid-sensor-ids.h | 4 + 5 files changed, 333 insertions(+) commit 0f0c106aa95243c5e59f06fb447ed7ea89818be1 Author: Katie Dunne Date: Fri Mar 3 07:38:37 2017 -0800 staging: iio: meter: ade7753: Clean up includes Alphabetize header files. Signed-off-by: Katie Dunne Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7753.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 63a98d2511e2d2fb6fb305c0093ad8a066c43d08 Author: Katie Dunne Date: Fri Mar 3 07:35:52 2017 -0800 staging: iio: meter: ade7753: Move header content to implementation file The contents of ade7753.h are only used in ade7753.c. Move the header contents to the implementation file and delete the header file. Signed-off-by: Katie Dunne Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7753.c | 69 ++++++++++++++++++++++++++++++++++- drivers/staging/iio/meter/ade7753.h | 72 ------------------------------------- 2 files changed, 68 insertions(+), 73 deletions(-) commit fb0e5250a8a11d5a923c396704ae53b4e35a1da3 Author: Eva Rachel Retuya Date: Sat Mar 4 16:31:26 2017 +0800 iio: accel: adxl345: Add SPI support Add SPI driver that initializes SPI regmap for the adxl345 core driver. The driver supports the same functionality as I2C namely the x, y, z and scale readings. Signed-off-by: Eva Rachel Retuya Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron drivers/iio/accel/Kconfig | 14 +++++++ drivers/iio/accel/Makefile | 1 + drivers/iio/accel/adxl345_spi.c | 81 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+) commit 5170512cf6a17373b3a8bb63187a6e90ddf7c1ca Author: Eva Rachel Retuya Date: Sat Mar 4 16:31:25 2017 +0800 iio: accel: adxl345: Split driver into core and I2C Move I2C-specific code into its own file and rely on regmap to access registers. The core code provides access to x, y, z and scale readings. Signed-off-by: Eva Rachel Retuya Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron drivers/iio/accel/Kconfig | 13 ++- drivers/iio/accel/Makefile | 3 +- drivers/iio/accel/adxl345.c | 214 --------------------------------------- drivers/iio/accel/adxl345.h | 18 ++++ drivers/iio/accel/adxl345_core.c | 179 ++++++++++++++++++++++++++++++++ drivers/iio/accel/adxl345_i2c.c | 73 +++++++++++++ 6 files changed, 281 insertions(+), 219 deletions(-) commit 31fd2c70b26d1fb803283c0488e3f84a2de1f329 Author: Eva Rachel Retuya Date: Sat Mar 4 16:31:24 2017 +0800 iio: accel: adxl345: Use I2C regmap instead of direct I2C access Convert the driver to use regmap instead of I2C-specific functions. This is done in preparation for splitting this driver into core and I2C-specific code as well as introduction of SPI driver. Signed-off-by: Eva Rachel Retuya Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron drivers/iio/accel/Kconfig | 1 + drivers/iio/accel/adxl345.c | 66 +++++++++++++++++++++++++++++---------------- 2 files changed, 44 insertions(+), 23 deletions(-) commit a70b93bcb36ffe0844b7b4ca33e5c5234f629006 Author: Eva Rachel Retuya Date: Sat Mar 4 16:31:23 2017 +0800 dt-bindings: iio: accel: Document ADXL345 accelerometer binding Add the device tree binding documentation for the ADXL345 3-axis digital accelerometer. Signed-off-by: Eva Rachel Retuya Acked-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/accel/adxl345.txt | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit aa04a7078b950e4c705ab6cf9080fb8d49c8d87c Author: Narcisa Ana Maria Vasile Date: Sat Mar 4 15:47:19 2017 +0200 staging: iio: adis16240: Move contents of the header to the source file The contents of the header file are used only by this single source file. Move content into .c file and remove header. Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16240.h | 179 ----------------------------- drivers/staging/iio/accel/adis16240_core.c | 175 +++++++++++++++++++++++++++- 2 files changed, 174 insertions(+), 180 deletions(-) commit 21a123beaff48df4b2e8fde7819bb1ad0dc268bb Author: Narcisa Ana Maria Vasile Date: Sat Mar 4 15:47:08 2017 +0200 staging: iio: adis16209: Move contents of the header to the source file The contents of the header file are used only by this single source file. Move content into .c file and remove header. Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16209.h | 144 ----------------------------- drivers/staging/iio/accel/adis16209_core.c | 140 +++++++++++++++++++++++++++- 2 files changed, 139 insertions(+), 145 deletions(-) commit 237ae7c79e2683723a6bf83e1d7db40fc890b285 Author: Michal Wajdeczko Date: Wed Mar 1 20:26:15 2017 +0000 drm/i915: Don't use enums for hardware engine id Generally we are using macros for any hardware identifiers as these may change between Gens. Do the same with hardware engine ids. v2: move hw engine defs to i915_reg.h (Chris) Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170301202615.118632-1-michal.wajdeczko@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_reg.h | 6 ++++++ drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++-- drivers/gpu/drm/i915/intel_ringbuffer.h | 32 ++++++++++++++++---------------- 3 files changed, 24 insertions(+), 18 deletions(-) commit c8c188679ccfc86d9c7bac57ecf4b8205a061a06 Author: Arnaldo Carvalho de Melo Date: Thu Mar 2 16:00:26 2017 -0300 tools build: Use the same CC for feature detection and actual build When build with: 'make CC=clang' we were not using that CC to do feature detection, which resulted in features being detected with gcc and then the actual tools being built with clang. Most of the time these compilers are compatible enough, so no problem was being noticed. As soon as a system with an old enough clang, one that hasn't the cpuid.h header is used, and a gcc with it, the "get_cpuid" feature will be found available but then code that will use can't be compiled. Noticed with this combination: / $ gcc --version | head -1 gcc (Alpine 6.3.0) 6.3.0 / $ clang --version | head -1 clang version 3.8.1 (tags/RELEASE_381/final) / $ cat /etc/alpine-release 3.5.0 / $ Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-60q18nvlvgpyfv7e2qqgx4ou@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/build/feature/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a0f213e14bb5cf4f190809b5811e1292bd614899 Author: Arnaldo Carvalho de Melo Date: Thu Mar 2 15:44:19 2017 -0300 perf bench futex: Fix build on musl + clang When building with clang on a musl libc system, Alpine Linux, we end up hitting a problem where memset() is used but its prototype is not present, add it to avoid this: bench/futex-wake.c:99:3: error: implicitly declaring library function 'memset' with type 'void *(void *, int, unsigned long)' [-Werror,-Wimplicit-function-declaration] CPU_ZERO(&cpu); ^ /usr/include/sched.h:127:23: note: expanded from macro 'CPU_ZERO' #define CPU_ZERO(set) CPU_ZERO_S(sizeof(cpu_set_t),set) ^ /usr/include/sched.h:110:30: note: expanded from macro 'CPU_ZERO_S' #define CPU_ZERO_S(size,set) memset(set,0,size) ^ bench/futex-wake.c:99:3: note: include the header or explicitly provide a declaration for 'memset' Found while updating my test build containers to build perf with clang in more systems. Cc: Adrian Hunter Cc: David Ahern Cc: Davidlohr Bueso Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-jh10vaz2r98zl6gm5iau8prr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/futex-hash.c | 1 + tools/perf/bench/futex-lock-pi.c | 1 + tools/perf/bench/futex-requeue.c | 1 + tools/perf/bench/futex-wake-parallel.c | 1 + tools/perf/bench/futex-wake.c | 1 + 5 files changed, 5 insertions(+) commit b8d1fd7ec661f5ccb9facd57589a563f627df230 Author: Arnaldo Carvalho de Melo Date: Thu Mar 2 15:31:43 2017 -0300 perf bench futex: Use __maybe_unused Instead of attributing a variable to itself to silence the compiler, use the attribute designed for that, avoiding this: In file included from bench/futex-hash.c:24: bench/futex.h:95:7: error: explicitly assigning value of variable of type 'pthread_attr_t *' to itself [-Werror,-Wself-assign] attr = attr; ~~~~ ^ ~~~~ bench/futex.h:96:13: error: explicitly assigning value of variable of type 'size_t' (aka 'unsigned long') to itself [-Werror,-Wself-assign] cpusetsize = cpusetsize; ~~~~~~~~~~ ^ ~~~~~~~~~~ bench/futex.h:97:9: error: explicitly assigning value of variable of type 'cpu_set_t *' (aka 'struct cpu_set_t *') to itself [-Werror,-Wself-assign] cpuset = cpuset; ~~~~~~ ^ ~~~~~~ That is only triggered when HAVE_PTHREAD_ATTR_SETAFFINITY_NP isn't set. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-14ws1d1elj2d5ej8g7cwdqau@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/futex.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 120010cb1eea151d38a3e66f5ffc79a0c3110292 Author: Arnaldo Carvalho de Melo Date: Thu Mar 2 12:55:49 2017 -0300 tools build: Add test for sched_getcpu() Instead of trying to go on adding more ifdef conditions, do a feature test and define HAVE_SCHED_GETCPU_SUPPORT instead, then use it to provide the prototype. No need to change the stub, as it is already a __weak symbol. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-yge89er9g90sc0v6k0a0r5tr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/build/Makefile.feature | 1 + tools/build/feature/Makefile | 6 +++++- tools/build/feature/test-all.c | 5 +++++ tools/build/feature/test-sched_getcpu.c | 7 +++++++ tools/perf/Makefile.config | 4 ++++ tools/perf/util/cloexec.h | 6 ------ tools/perf/util/util.h | 4 ++-- 7 files changed, 24 insertions(+), 9 deletions(-) commit e3ba76deef23064fc272424b86b506cd80b04fc5 Author: Jiri Olsa Date: Mon Feb 27 10:48:18 2017 +0100 perf tools: Force uncore events to system wide monitoring Make system wide (-a) the default option if no target was specified and one of following conditions is met: - there's no workload specified (current behaviour) - there is workload specified but all requested events are system wide ones Mixed events core/uncore with workload: $ perf stat -e 'uncore_cbox_0/clockticks/,cycles' sleep 1 Performance counter stats for 'sleep 1': uncore_cbox_0/clockticks/ 980,489 cycles 1.000897406 seconds time elapsed Uncore event with workload: $ perf stat -e 'uncore_cbox_0/clockticks/' sleep 1 Performance counter stats for 'system wide': 281,473,897,192,670 uncore_cbox_0/clockticks/ 1.000833784 seconds time elapsed Committer note: When testing I realized the default case for !root, i.e. no events passed via -e, was broke by v2 of this patch, reported and after a patch provided by Jiri it is back working: [acme@jouet linux]$ perf stat usleep 1 Performance counter stats for 'usleep 1': 0.401335 task-clock:u (msec) # 0.297 CPUs utilized 0 context-switches:u # 0.000 K/sec 0 cpu-migrations:u # 0.000 K/sec 48 page-faults:u # 0.120 M/sec 458,146 cycles:u # 1.142 GHz 245,113 instructions:u # 0.54 insn per cycle 47,991 branches:u # 119.578 M/sec 4,022 branch-misses:u # 8.38% of all branches 0.001350029 seconds time elapsed [acme@jouet linux]$ Suggested-and-Tested-by: Borislav Petkov Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170227094818.GA12764@krava Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 33 ++++++++++++++++++++++++++++++--- tools/perf/util/parse-events.c | 5 +++-- 2 files changed, 33 insertions(+), 5 deletions(-) commit d0e02579c282ccf34c79818045ec2d2934b56c19 Author: Steven Rostedt (VMware) Date: Mon Feb 27 11:52:04 2017 -0500 trace/kprobes: Add back warning about offset in return probes Let's not remove the warning about offsets and return probes when the offset is invalid. Signed-off-by: Steven Rostedt Acked-by: Masami Hiramatsu Acked-by: Naveen N. Rao Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20170227115204.00f92846@gandalf.local.home Signed-off-by: Arnaldo Carvalho de Melo kernel/trace/trace_kprobe.c | 5 +++++ 1 file changed, 5 insertions(+) commit f1c4d1ad39b5f7c617572f93658bb7159ec9c686 Author: Adrian Hunter Date: Tue Feb 28 12:02:36 2017 +0200 perf intel-PT/BTS: Add missing initialization $ perf test decoder 57: x86 instruction decoder - new instructions : FAILED! $ Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 1b 80 78 56 34 12 bndstx %bnd0,0x12345678(%rax) Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 1b 85 78 56 34 12 bndstx %bnd0,0x12345678(%rbp) Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 1b 84 01 78 56 34 12 bndstx %bnd0,0x12345678(%rcx,%rax,1) Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 1b 84 05 78 56 34 12 bndstx %bnd0,0x12345678(%rbp,%rax,1) Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 1b 84 08 78 56 34 12 bndstx %bnd0,0x12345678(%rax,%rcx,1) There is missing initialization. It only affects the test because it is checking 'rel' even in cases where there is no value. Fix it. Reported-and-Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/08c6ad07-7994-3e56-b20e-d75727ca7765@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c | 2 ++ 1 file changed, 2 insertions(+) commit e491bc2f0dd9f1b4a23ba6f3da88f6b695c4a4c9 Author: Naveen N. Rao Date: Thu Feb 23 17:07:23 2017 +0530 perf probe: Generalize probe event file open routine Generalize probe event file open routine into a generic function for opening trace files. Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Steven Rostedt Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/b580465c7a4dcd5d3b40fdf8568e6be45d0a6333.1487849577.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-file.c | 20 +++++++++++--------- tools/perf/util/probe-file.h | 1 + 2 files changed, 12 insertions(+), 9 deletions(-) commit 35b6f55aa9ba65141f2def0997e23aab13715d3f Author: Naveen N. Rao Date: Wed Feb 22 19:23:39 2017 +0530 trace/kprobes: Allow return probes with offsets and absolute addresses Since the kernel includes many non-global functions with same names, we will need to use offsets from other symbols (typically _text/_stext) or absolute addresses to place return probes on specific functions. Also, the core register_kretprobe() API never forbid use of offsets or absolute addresses with kretprobes. Allow its use with the trace infrastructure. To distinguish kernels that support this, update ftrace README to explicitly call this out. Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Steven Rostedt Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/183e7ce2921a08c9c755ee9a5da3134febc6695b.1487770934.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo kernel/trace/trace.c | 1 + kernel/trace/trace_kprobe.c | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) commit 90ec5e89e393c76e19afc845d8f88a5dc8315919 Author: Naveen N. Rao Date: Wed Feb 22 19:23:37 2017 +0530 kretprobes: Ensure probe location is at function entry kretprobes can be registered by specifying an absolute address or by specifying offset to a symbol. However, we need to ensure this falls at function entry so as to be able to determine the return address. Validate the same during kretprobe registration. By default, there should not be any offset from a function entry, as determined through a kallsyms_lookup(). Introduce arch_function_offset_within_entry() as a way for architectures to override this. Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Steven Rostedt Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/f1583bc4839a3862cfc2acefcc56f9c8837fa2ba.1487770934.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo include/linux/kprobes.h | 1 + kernel/kprobes.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) commit 583359646fde8526ea9456618cc24dc359b34094 Author: Namhyung Kim Date: Fri Feb 24 10:12:51 2017 +0900 perf ftrace: Use pager for displaying result It's convenient to use the pager when seeing many lines of result. Note that setup_pager() should be called after perf_evlist__prepare_workload() since they can interfere each other regarding shared stdio streams. Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170224011251.14946-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-ftrace.c | 3 +++ 1 file changed, 3 insertions(+) commit dc23103278c5ad53c177a25e209ef687e6d5d293 Author: Namhyung Kim Date: Fri Feb 24 10:12:50 2017 +0900 perf ftrace: Add support for -a and -C option The -a/--all-cpus and -C/--cpu option is for controlling tracing cpus. Signed-off-by: Namhyung Kim Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170224011251.14946-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-ftrace.txt | 14 ++++++++ tools/perf/builtin-ftrace.c | 60 ++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) commit 4400ac8a9a900318f8516dc0fb94075cb3fdb50d Author: Namhyung Kim Date: Fri Feb 24 10:12:49 2017 +0900 perf cpumap: Introduce cpu_map__snprint_mask() The cpu_map__snprint_mask() generates a string representation of a cpumask bitmap. For cpu 0 to 11, it'll return "fff". Committer notes: Fix compiler warning on some toolchains: 19 fedora:24-x-ARC-uClibc: FAIL CC /tmp/build/perf/util/cpumap.o util/cpumap.c: In function 'hex_char': util/cpumap.c:679:2: error: comparison is always true due to limited range of data type [-Werror=type-limits] if (0 <= val && val <= 9) ^ cc1: all warnings being treated as errors Applying patch from Namhyung that makes function receive an 'unsigned char', that is what the callers are passing to this function. Signed-off-by: Namhyung Kim Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170224011251.14946-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cpumap.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/cpumap.h | 1 + 2 files changed, 47 insertions(+) commit a9af6be5bc25214f7870fef2b6d3490fe8b87bf7 Author: Namhyung Kim Date: Fri Feb 24 10:12:48 2017 +0900 perf ftrace: Add support for --pid option The -p (--pid) option enables to trace existing process by its pid. Committer notes: Testing it: Using the function_graph tracer on a process that is just waiting for user input and thus will make 'perf ftrace' sit there waiting for that, then press any key on that mutt session and see what happens: # perf ftrace -t function_graph -p `pidof mutt` | head -40 2) 1.038 us | switch_mm_irqs_off(); ------------------------------------------ 2) -0 => mutt-3595 ------------------------------------------ 2) | finish_task_switch() { 2) | smp_irq_work_interrupt() { 2) | irq_enter() { 2) 0.180 us | rcu_irq_enter(); 2) 1.248 us | } 2) | __wake_up() { 2) 0.126 us | _raw_spin_lock_irqsave(); 2) | __wake_up_common() { 2) | pollwake() { 2) | default_wake_function() { 2) | try_to_wake_up() { 2) 0.662 us | _raw_spin_lock_irqsave(); 2) | select_task_rq_fair() { 2) 1.719 us | effective_load.isra.41(); 2) 1.343 us | effective_load.isra.41(); 2) | select_idle_sibling() { 2) 0.331 us | idle_cpu(); 2) 1.458 us | } 2) 8.350 us | } 2) 0.200 us | _raw_spin_lock(); 2) | ttwu_do_activate() { 2) | activate_task() { 2) 0.136 us | update_rq_clock.part.77(); 2) | enqueue_task_fair() { 2) | enqueue_entity() { 2) 0.146 us | update_curr(); 2) 0.330 us | account_entity_enqueue(); 2) 0.280 us | update_cfs_shares(); 2) 0.321 us | place_entity(); 2) 0.206 us | __enqueue_entity(); 2) 6.926 us | } 2) | enqueue_entity() { 2) 0.105 us | update_curr(); 2) 0.175 us | account_entity_enqueue(); 2) 0.531 us | update_cfs_shares(); # Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20170224011251.14946-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-ftrace.txt | 4 ++ tools/perf/builtin-ftrace.c | 91 ++++++++++++++++++++++---------- 2 files changed, 68 insertions(+), 27 deletions(-) commit 7768f8dada66d6052fccbc2ddc375f3e650455b9 Author: Charles Baylis Date: Fri Feb 24 13:32:56 2017 +0000 perf tools: Allow sorting by symbol size Add new sort key 'symbol_size' to allow user to sort by symbol size, or (more usefully) display the symbol size using --fields=...,symbol_size. Committer note: Testing it together with the recently added -q, to remove the headers, and using the '+' sign with -s, to add the symbol_size sort order to the default, which is '-s/--sort comm,dso,symbol': # perf report -q -s +symbol_size | head -10 10.39% swapper [kernel.vmlinux] [k] intel_idle 270 3.45% swapper [kernel.vmlinux] [k] update_blocked_averages 1546 2.61% swapper [kernel.vmlinux] [k] update_load_avg 1292 2.36% swapper [kernel.vmlinux] [k] update_cfs_shares 240 1.83% swapper [kernel.vmlinux] [k] __hrtimer_run_queues 606 1.74% swapper [kernel.vmlinux] [k] update_cfs_rq_load_avg. 1187 1.66% swapper [kernel.vmlinux] [k] apic_timer_interrupt 152 1.60% CPU 0/KVM [kvm] [k] kvm_set_msr_common 3046 1.60% gnome-shell libglib-2.0.so.0 [.] g_slist_find 37 1.46% gnome-termina libglib-2.0.so.0 [.] g_hash_table_lookup 370 # Signed-off-by: Charles Baylis Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Maxim Kuvyrkov Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1487943176-13840-1-git-send-email-charles.baylis@linaro.org [ Use symbol__size(), remove needless %lld + (long long) casting ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-report.txt | 1 + tools/perf/util/hist.h | 1 + tools/perf/util/sort.c | 41 ++++++++++++++++++++++++++++++++ tools/perf/util/sort.h | 1 + 4 files changed, 44 insertions(+) commit 4738ca30b4a7a113084d7863846175094f95c62f Author: Arnaldo Carvalho de Melo Date: Thu Feb 23 13:24:34 2017 -0300 perf evlist: Clarify a bit the use of perf_mmap->refcnt This is an odd refcount use case, so add some more comments to help understand that when it hits zero it really means that the mmap()ed area (on a perf_event_open() returned fd) has been munmap()ed. Cc: Adrian Hunter Cc: David Ahern Cc: Elena Reshetova Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/20170223162344.GD3595@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evlist.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 364fed351369e0193244fa2c78df855724cdddb9 Author: Elena Reshetova Date: Tue Feb 21 17:35:03 2017 +0200 perf thread_map: Convert thread_map.refcnt from atomic_t to refcount_t The refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: David Windsor Signed-off-by: Hans Liljestrand Signed-off-by: Kees Kook Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andrew Morton Cc: David Windsor Cc: Greg Kroah-Hartman Cc: Hans Liljestrand Cc: Jiri Olsa Cc: Kees Kook Cc: Mark Rutland Cc: Matija Glavinic Pecotic Cc: Peter Zijlstra Cc: alsa-devel@alsa-project.org Link: http://lkml.kernel.org/r/1487691303-31858-10-git-send-email-elena.reshetova@intel.com [ Did missing tests/thread-map.c conversion ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/thread-map.c | 6 +++--- tools/perf/util/thread_map.c | 20 ++++++++++---------- tools/perf/util/thread_map.h | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) commit e34f5b11cd51fbe723e481c1db03a77260be6f4c Author: Elena Reshetova Date: Tue Feb 21 17:35:02 2017 +0200 perf thread: convert thread.refcnt from atomic_t to refcount_t The refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: David Windsor Signed-off-by: Hans Liljestrand Signed-off-by: Kees Kook Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andrew Morton Cc: David Windsor Cc: Greg Kroah-Hartman Cc: Hans Liljestrand Cc: Jiri Olsa Cc: Kees Kook Cc: Mark Rutland Cc: Matija Glavinic Pecotic Cc: Peter Zijlstra Cc: alsa-devel@alsa-project.org Link: http://lkml.kernel.org/r/1487691303-31858-9-git-send-email-elena.reshetova@intel.com [ Did missing conversion in __machine__remove_thread() ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/machine.c | 2 +- tools/perf/util/thread.c | 6 +++--- tools/perf/util/thread.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 25a3720cf45779900246ec17e238fbb674ce4e67 Author: Elena Reshetova Date: Tue Feb 21 17:35:01 2017 +0200 perf evlist: Convert perf_map.refcnt from atomic_t to refcount_t The refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: David Windsor Signed-off-by: Hans Liljestrand Signed-off-by: Kees Kook Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andrew Morton Cc: David Windsor Cc: Greg Kroah-Hartman Cc: Hans Liljestrand Cc: Jiri Olsa Cc: Kees Kook Cc: Mark Rutland Cc: Matija Glavinic Pecotic Cc: Peter Zijlstra Cc: alsa-devel@alsa-project.org Link: http://lkml.kernel.org/r/1487691303-31858-8-git-send-email-elena.reshetova@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evlist.c | 18 +++++++++--------- tools/perf/util/evlist.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) commit ead05e8f3fffe2860f0f8d1c23d74c526e9f2a3c Author: Elena Reshetova Date: Tue Feb 21 17:35:00 2017 +0200 perf map: Convert map_groups.refcnt from atomic_t to refcount_t The refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: David Windsor Signed-off-by: Hans Liljestrand Signed-off-by: Kees Kook Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andrew Morton Cc: David Windsor Cc: Greg Kroah-Hartman Cc: Hans Liljestrand Cc: Jiri Olsa Cc: Kees Kook Cc: Mark Rutland Cc: Matija Glavinic Pecotic Cc: Peter Zijlstra Cc: alsa-devel@alsa-project.org Link: http://lkml.kernel.org/r/1487691303-31858-7-git-send-email-elena.reshetova@intel.com [ Did the missing conversion of tests/thread-mg-share.c too ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/thread-mg-share.c | 12 ++++++------ tools/perf/util/map.c | 4 ++-- tools/perf/util/map.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) commit e3a42cdd3e35d6c2181d5acfa191eb448aea6ace Author: Elena Reshetova Date: Tue Feb 21 17:34:59 2017 +0200 perf map: Convert map.refcnt from atomic_t to refcount_t The refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: David Windsor Signed-off-by: Hans Liljestrand Signed-off-by: Kees Kook Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andrew Morton Cc: David Windsor Cc: Greg Kroah-Hartman Cc: Hans Liljestrand Cc: Jiri Olsa Cc: Kees Kook Cc: Mark Rutland Cc: Matija Glavinic Pecotic Cc: Peter Zijlstra Cc: alsa-devel@alsa-project.org Link: http://lkml.kernel.org/r/1487691303-31858-6-git-send-email-elena.reshetova@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/map.c | 6 +++--- tools/perf/util/map.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 7100810a75b9854f1b05550b54500497c5914d4b Author: Elena Reshetova Date: Tue Feb 21 17:34:58 2017 +0200 perf dso: Convert dso.refcnt from atomic_t to refcount_t The refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: David Windsor Signed-off-by: Hans Liljestrand Signed-off-by: Kees Kook Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andrew Morton Cc: David Windsor Cc: Greg Kroah-Hartman Cc: Hans Liljestrand Cc: Jiri Olsa Cc: Kees Kook Cc: Mark Rutland Cc: Matija Glavinic Pecotic Cc: Peter Zijlstra Cc: alsa-devel@alsa-project.org Link: http://lkml.kernel.org/r/1487691303-31858-5-git-send-email-elena.reshetova@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dso.c | 6 +++--- tools/perf/util/dso.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 6df74bc08bc2201f65fb0e81cd5feb787575f7ce Author: Elena Reshetova Date: Tue Feb 21 17:34:57 2017 +0200 perf comm: Convert comm_str.refcnt from atomic_t to refcount_t The refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: David Windsor Signed-off-by: Hans Liljestrand Signed-off-by: Kees Kook Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andrew Morton Cc: David Windsor Cc: Greg Kroah-Hartman Cc: Hans Liljestrand Cc: Jiri Olsa Cc: Kees Kook Cc: Mark Rutland Cc: Matija Glavinic Pecotic Cc: Peter Zijlstra Cc: alsa-devel@alsa-project.org Link: http://lkml.kernel.org/r/1487691303-31858-4-git-send-email-elena.reshetova@intel.com [ Reinstated comm_str__get() function, needed when reusing entries in the rbtree ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/comm.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit ec09a42a6dbd2afde9b8fd4bb8f98bbd94ca904c Author: Elena Reshetova Date: Tue Feb 21 17:34:56 2017 +0200 perf cpumap: Convert cpu_map.refcnt from atomic_t to refcount_t The refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: David Windsor Signed-off-by: Hans Liljestrand Signed-off-by: Kees Kook Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andrew Morton Cc: David Windsor Cc: Greg Kroah-Hartman Cc: Hans Liljestrand Cc: Jiri Olsa Cc: Kees Kook Cc: Mark Rutland Cc: Matija Glavinic Pecotic Cc: Peter Zijlstra Cc: alsa-devel@alsa-project.org Link: http://lkml.kernel.org/r/1487691303-31858-3-git-send-email-elena.reshetova@intel.com [ fixed mixed conversion to refcount in tests/cpumap.c ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/cpumap.c | 2 +- tools/perf/util/cpumap.c | 16 ++++++++-------- tools/perf/util/cpumap.h | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) commit 79c5fe6db8c70558d3a64959f55596d137ccc6e6 Author: Elena Reshetova Date: Tue Feb 21 17:34:55 2017 +0200 perf cgroup: Convert cgroup_sel.refcnt from atomic_t to refcount_t The refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova Signed-off-by: David Windsor Signed-off-by: Hans Liljestrand Signed-off-by: Kees Kook Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: alsa-devel@alsa-project.org Cc: Andrew Morton Cc: David Windsor Cc: Greg Kroah-Hartman Cc: Hans Liljestrand Cc: Jiri Olsa Cc: Kees Kook Cc: Mark Rutland Cc: Matija Glavinic Pecotic Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1487691303-31858-2-git-send-email-elena.reshetova@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cgroup.c | 6 +++--- tools/perf/util/cgroup.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 73a9bf95ed1c05698ecabe2f28c47aedfa61b52b Author: Arnaldo Carvalho de Melo Date: Wed Feb 22 17:00:53 2017 -0300 tools include: Adopt kernel's refcount.h To aid in catching bugs when using atomics as a reference count. This is a trimmed down version with just what is used by tools/ at this point. After this, the patches submitted by Elena for tools/ doing the conversion from atomic_ to recount_ methods can be applied and tested. To activate it, buint perf with: make DEBUG=1 -C tools/perf Cc: Adrian Hunter Cc: David Ahern Cc: Elena Reshetova Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-dqtxsumns9ov0l9r5x398f19@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/refcount.h | 151 +++++++++++++++++++++++++++++++++++++++++ tools/perf/MANIFEST | 1 + 2 files changed, 152 insertions(+) commit eaa75b5117d52adf1efd3c6c3fb4bd8f97de648b Author: Arnaldo Carvalho de Melo Date: Wed Feb 22 17:42:40 2017 -0300 tools include: Add UINT_MAX def to kernel.h The kernel has it and some files we got from there would require us including the userland header for that, so add it conditionally. Cc: Adrian Hunter Cc: David Ahern Cc: Elena Reshetova Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-gmwyal7c9vzzttlyk6u59rzn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/kernel.h | 4 ++++ 1 file changed, 4 insertions(+) commit ed4aad50ea0384737034b39f952f29cfb2da52ac Author: Arnaldo Carvalho de Melo Date: Thu Feb 23 15:33:02 2017 -0300 tools include: Provide gcc based cmpxchg fallback for !x86 We've been using an atomic_t implementation subset based on the gcc builtin functions for a while, now, with refcount.h we need cmpxchg(), use gcc's __sync_val_compare_and_swap() for that. Cc: Adrian Hunter Cc: David Ahern Cc: Elena Reshetova Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-b9zovyxgpa0c4vi3nm0kjo97@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/asm-generic/atomic-gcc.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2bcdeadbc094b4f6511aedea1e5b8052bf0cc89c Author: Arnaldo Carvalho de Melo Date: Wed Feb 22 16:57:53 2017 -0300 tools include: Introduce atomic_cmpxchg_{relaxed,release}() Will be used by refcnt.h Cc: Adrian Hunter Cc: David Ahern Cc: Elena Reshetova Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-jszriruqfqpez1bkivwfj6qb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/atomic.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 8a73615df3b8973df2de1455c00e9169522d8257 Author: Arnaldo Carvalho de Melo Date: Wed Feb 22 16:55:43 2017 -0300 tools arch x86: Introduce atomic_cmpxchg() Will be used by atomic_cmpxchg_relaxed(), in turn used by refcount.h. Cc: Adrian Hunter Cc: David Ahern Cc: Elena Reshetova Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-kdmovd3l4gw5b1w31ypr6ddv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/asm/atomic.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 3337e682d9f3043bb0b925d976558ed5c41b0a09 Author: Arnaldo Carvalho de Melo Date: Wed Feb 22 16:54:53 2017 -0300 tools arch x86: Include asm/cmpxchg.h Will be included from atomic.h and used in refcount.h Cc: Adrian Hunter Cc: David Ahern Cc: Elena Reshetova Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-pzrydfee75mhq64kazxmf9it@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/asm/cmpxchg.h | 89 ++++++++++++++++++++++++++++++++++++ tools/perf/MANIFEST | 1 + tools/scripts/Makefile.include | 9 ++++ 3 files changed, 99 insertions(+) commit 4900653829175f60356efc279695bb23c59483c3 Author: Arnaldo Carvalho de Melo Date: Wed Feb 22 16:48:24 2017 -0300 tools include: Adopt __compiletime_error From the kernel, get the gcc one and provide the fallback so that we can continue build with other compilers, such as with clang. Will be used by tools/arch/x86/include/asm/cmpxchg.h. Cc: Adrian Hunter Cc: David Ahern Cc: Elena Reshetova Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-pecgz6efai4a9euuk4rxuotr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/compiler-gcc.h | 4 ++++ tools/include/linux/compiler.h | 4 ++++ 2 files changed, 8 insertions(+) commit 02d492e5dcb72c004d213756eb87c9d62a6d76a7 Author: Borislav Petkov Date: Tue Feb 7 01:40:05 2017 +0100 perf stat: Issue a HW watchdog disable hint When using perf stat on an AMD F15h system with the default hw events attributes, some of the events don't get counted: Performance counter stats for 'sleep 1': 0.749208 task-clock (msec) # 0.001 CPUs utilized 1 context-switches # 0.001 M/sec 0 cpu-migrations # 0.000 K/sec 54 page-faults # 0.072 M/sec 1,122,815 cycles # 1.499 GHz 286,740 stalled-cycles-frontend # 25.54% frontend cycles idle stalled-cycles-backend (0.00%) ^^^^^^^^^^^^ instructions (0.00%) ^^^^^^^^^^^^ branches (0.00%) branch-misses (0.00%) 1.001550070 seconds time elapsed The reason is that we have the HW watchdog consuming one PMU counter and when perf tries to schedule 6 events on 6 counters and some of those counters are constrained to only a specific subset of PMCs by the hardware, the event scheduling fails. So issue a hint to disable the HW watchdog around a perf stat session. Committer note: Testing it... # perf stat -d usleep 1 Performance counter stats for 'usleep 1': 1.180203 task-clock (msec) # 0.490 CPUs utilized 1 context-switches # 0.847 K/sec 0 cpu-migrations # 0.000 K/sec 54 page-faults # 0.046 M/sec 184,754 cycles # 0.157 GHz 714,553 instructions # 3.87 insn per cycle 154,661 branches # 131.046 M/sec 7,247 branch-misses # 4.69% of all branches 219,984 L1-dcache-loads # 186.395 M/sec 17,600 L1-dcache-load-misses # 8.00% of all L1-dcache hits (90.16%) LLC-loads (0.00%) LLC-load-misses (0.00%) 0.002406823 seconds time elapsed Some events weren't counted. Try disabling the NMI watchdog: echo 0 > /proc/sys/kernel/nmi_watchdog perf stat ... echo 1 > /proc/sys/kernel/nmi_watchdog # Signed-off-by: Borislav Petkov Acked-by: Ingo Molnar Tested-by: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Robert Richter Cc: Vince Weaver Link: http://lkml.kernel.org/r/20170211183218.ijnvb5f7ciyuunx4@pd.tnic Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 771ceddaadd0a2b31603034b36dca50943ff6836 Author: Karol Wachowski Date: Mon Feb 20 12:50:40 2017 +0100 perf vendor events: Add mapping for KnightsMill PMU events Reuse events from KnightsLanding for KnightsMill Signed-off-by: Karol Wachowski Cc: Alexander Shishkin Cc: Andi Kleen Cc: Dave Hansen Cc: Kan Liang Cc: Peter Zijlstra Cc: Piotr Luc Cc: Srinivas Pandruvada Link: http://lkml.kernel.org/r/1487591440-25172-1-git-send-email-karol.wachowski@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/mapfile.csv | 1 + 1 file changed, 1 insertion(+) commit 61d3dc708077de316bdcafd66016c2285da07275 Author: Chris Wilson Date: Fri Mar 3 19:08:24 2017 +0000 drm/i915: Split breadcrumbs spinlock into two As we now take the breadcrumbs spinlock within the interrupt handler, we wish to minimise its hold time. During the interrupt we do not care about the state of the full rbtree, only that of the first element, so we can guard that with a separate lock. v2: Rename first_wait to irq_wait to make it clearer that it is guarded by irq_lock. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170303190824.1330-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 12 ++-- drivers/gpu/drm/i915/i915_drv.h | 8 +-- drivers/gpu/drm/i915/i915_gpu_error.c | 8 +-- drivers/gpu/drm/i915/i915_irq.c | 6 +- drivers/gpu/drm/i915/intel_breadcrumbs.c | 80 ++++++++++++---------- drivers/gpu/drm/i915/intel_ringbuffer.h | 8 ++- drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c | 4 +- 7 files changed, 68 insertions(+), 58 deletions(-) commit 15a83f7dde6094de161c68aa7158ecaff00cc92b Author: Peter Senna Tschudin Date: Fri Mar 3 16:57:08 2017 +0100 MAINTAINERS: Add entry for megachips-stdpxxxx-ge-b850v3-fw Add MAINTAINERS entry for the second video output of the GE B850v3: STDP4028-ge-b850v3-fw bridges (LVDS-DP) STDP2690-ge-b850v3-fw bridges (DP-DP++) Cc: Laurent Pinchart Cc: Martyn Welch Cc: Martin Donnelly Cc: Daniel Vetter Cc: Enric Balletbo i Serra Cc: Philipp Zabel Cc: Rob Herring Cc: Fabio Estevam CC: David Airlie CC: Thierry Reding CC: Thierry Reding CC: Archit Taneja Signed-off-by: Peter Senna Tschudin Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/a62877dcaee004d82809fe77b6d154b65f466729.1488555615.git.peter.senna@collabora.com MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit b2fdab37aa8c8985eeeb33a9b2eb1a45dfcd5d79 Author: Peter Senna Tschudin Date: Fri Mar 3 16:57:07 2017 +0100 dt-bindings: display: megachips-stdpxxxx-ge-b850v3-fw Devicetree binding documentation for the second video output of the GE B850v3: STDP4028-ge-b850v3-fw bridges (LVDS-DP) STDP2690-ge-b850v3-fw bridges (DP-DP++) Added entry for MegaChips at: Documentation/devicetree/bindings/vendor-prefixes.txt Cc: Laurent Pinchart Cc: Martyn Welch Cc: Martin Donnelly Cc: Javier Martinez Canillas Cc: Enric Balletbo i Serra Cc: Philipp Zabel Cc: Rob Herring Cc: Fabio Estevam Acked-by: Rob Herring Signed-off-by: Peter Senna Tschudin Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/c2712336226c5170cfdc45103527fb2338d3d6cf.1488555615.git.peter.senna@collabora.com .../bridge/megachips-stdpxxxx-ge-b850v3-fw.txt | 94 ++++++++++++++++++++++ .../devicetree/bindings/vendor-prefixes.txt | 1 + 2 files changed, 95 insertions(+) commit b66255f0f77902ef41b09163a6a092d2d905e151 Author: Chris Wilson Date: Fri Mar 3 17:14:22 2017 +0000 drm/i915: Refactor wakeup of the next breadcrumb waiter Refactor the common task of updating the first_waiter, serialised with the interrupt handler. When we update the first_waiter, we also need to wakeup the new bottom-half in order to complete the actions that we may have delegated to it (such as checking the irq-seqno coherency or waking up other lower priority concurrent waiters). Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170303171422.4735-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 48 ++++++++++++-------------------- 1 file changed, 18 insertions(+), 30 deletions(-) commit 3dc2046ca78b3cac6c8c9098a4e3024cd91abdb4 Author: Benoit Parrot Date: Mon Feb 13 11:06:58 2017 -0200 [media] media: ti-vpe: vpe: allow use of user specified stride Bytesperline/stride was always overwritten by VPE to the most adequate value based on needed alignment. However in order to make use of arbitrary size DMA buffer it is better to use the user space provide stride instead. The driver will still calculate an appropriate stride but will use the provided one when it is larger than the calculated one. Signed-off-by: Benoit Parrot Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/ti-vpe/vpe.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit da4414eaed15f9f800b37e2e5c04da35dc863dd4 Author: Benoit Parrot Date: Mon Feb 13 11:06:57 2017 -0200 [media] media: ti-vpe: vpdma: add support for user specified stride This patch introduce the needed vpdma API changes to support user space specified stride instead of forcing a driver calculated one. Signed-off-by: Benoit Parrot Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/ti-vpe/vpdma.c | 14 ++++---------- drivers/media/platform/ti-vpe/vpdma.h | 6 +++--- drivers/media/platform/ti-vpe/vpe.c | 6 ++++-- 3 files changed, 11 insertions(+), 15 deletions(-) commit f9fa0f2bebaa629aff839b7b992298b1fce453d2 Author: Stefan Brüns Date: Sun Feb 12 13:02:13 2017 -0200 [media] dvb-usb-firmware: don't do DMA on stack The buffer allocation for the firmware data was changed in commit 43fab9793c1f ("[media] dvb-usb: don't use stack for firmware load") but the same applies for the reset value. Fixes: 43fab9793c1f ("[media] dvb-usb: don't use stack for firmware load") Cc: stable@vger.kernel.org Signed-off-by: Stefan Brüns Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dvb-usb-firmware.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 5dfaacb2d6a48c4505db43cebc2575923a7f0e2a Author: Avraham Shukron Date: Thu Feb 9 15:01:57 2017 -0200 [media] staging: omap4iss: fix coding style issue Broke argument list so that it won't exceed 80 characters Signed-off-by: Avraham Shukron Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/omap4iss/iss_video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 24754d751cb86f6069315d8d613e23afcab06c91 Author: Chris Wilson Date: Fri Mar 3 14:45:57 2017 +0000 drm/i915: Take reference for signaling the request from hardirq Being inside a spinlock signaling that the hardware just completed a request doesn't prevent a second thread already spotting that the request is complete, freeing it and reallocating it! The code currently tries to prevent this using RCU -- but that only prevents the request from being freed, it doesn't prevent us from reallocating it - that requires us to take a reference. [ 206.922985] BUG: spinlock already unlocked on CPU#4, gem_exec_parall/7796 [ 206.922994] lock: 0xffff8801c6047120, .magic: dead4ead, .owner: /-1, .owner_cpu: -1 [ 206.923000] CPU: 4 PID: 7796 Comm: gem_exec_parall Not tainted 4.10.0-CI-Patchwork_4008+ #1 [ 206.923006] Hardware name: System manufacturer System Product Name/Z170M-PLUS, BIOS 1805 06/20/2016 [ 206.923012] Call Trace: [ 206.923014] [ 206.923019] dump_stack+0x67/0x92 [ 206.923023] spin_dump+0x73/0xc0 [ 206.923027] do_raw_spin_unlock+0x79/0xb0 [ 206.923031] _raw_spin_unlock_irqrestore+0x27/0x60 [ 206.923042] dma_fence_signal+0x160/0x230 [ 206.923060] notify_ring+0xae/0x2e0 [i915] [ 206.923073] ? ibx_hpd_irq_handler+0xc0/0xc0 [i915] [ 206.923086] gen8_gt_irq_handler+0x219/0x290 [i915] [ 206.923100] gen8_irq_handler+0x8e/0x6b0 [i915] [ 206.923105] __handle_irq_event_percpu+0x58/0x370 [ 206.923109] handle_irq_event_percpu+0x1e/0x50 [ 206.923113] handle_irq_event+0x34/0x60 [ 206.923117] handle_edge_irq+0xbe/0x150 [ 206.923122] handle_irq+0x15/0x20 [ 206.923126] do_IRQ+0x63/0x130 [ 206.923142] ? i915_mutex_lock_interruptible+0x39/0x140 [i915] [ 206.923148] common_interrupt+0x90/0x90 [ 206.923153] RIP: 0010:osq_lock+0x77/0x110 [ 206.923157] RSP: 0018:ffffc90001cabaa0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff6e [ 206.923164] RAX: 0000000000000000 RBX: ffff880236d1abc0 RCX: ffff8801ef642fc0 [ 206.923169] RDX: ffff8801ef6427c0 RSI: ffffffff81c6e7fd RDI: ffffffff81c7c848 [ 206.923175] RBP: ffffc90001cabab8 R08: 00000000692bb19b R09: 08c1493200000000 [ 206.923180] R10: 0000000000000001 R11: 0000000000000001 R12: ffff880236cdabc0 [ 206.923185] R13: ffff8802207f00b0 R14: ffffffffa00b7cd9 R15: ffff8802207f0070 [ 206.923191] [ 206.923206] ? i915_mutex_lock_interruptible+0x39/0x140 [i915] [ 206.923213] __mutex_lock+0x649/0x990 [ 206.923217] ? __mutex_lock+0xb0/0x990 [ 206.923221] ? _raw_spin_unlock+0x2c/0x50 [ 206.923226] ? __pm_runtime_resume+0x56/0x80 [ 206.923242] ? i915_mutex_lock_interruptible+0x39/0x140 [i915] [ 206.923249] mutex_lock_interruptible_nested+0x16/0x20 [ 206.923264] i915_mutex_lock_interruptible+0x39/0x140 [i915] [ 206.923270] ? __pm_runtime_resume+0x56/0x80 [ 206.923285] i915_gem_do_execbuffer.isra.15+0x442/0x1d10 [i915] [ 206.923291] ? __lock_acquire+0x449/0x1b50 [ 206.923296] ? __might_fault+0x3e/0x90 [ 206.923301] ? __might_fault+0x87/0x90 [ 206.923305] ? __might_fault+0x3e/0x90 [ 206.923320] i915_gem_execbuffer2+0xb5/0x220 [i915] [ 206.923327] drm_ioctl+0x200/0x450 [ 206.923341] ? i915_gem_execbuffer+0x330/0x330 [i915] [ 206.923348] do_vfs_ioctl+0x90/0x6e0 [ 206.923352] ? __fget+0x108/0x200 [ 206.923356] ? expand_files+0x2b0/0x2b0 [ 206.923361] SyS_ioctl+0x3c/0x70 [ 206.923365] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 206.923369] RIP: 0033:0x7fdd75fc6357 [ 206.923373] RSP: 002b:00007fdd20e59bf8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 206.923380] RAX: ffffffffffffffda RBX: ffffffff81481ff3 RCX: 00007fdd75fc6357 [ 206.923385] RDX: 00007fdd20e59c70 RSI: 0000000040406469 RDI: 0000000000000003 [ 206.923390] RBP: ffffc90001cabf88 R08: 0000000000000040 R09: 00000000000003f7 [ 206.923396] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 206.923401] R13: 0000000000000003 R14: 0000000040406469 R15: 0000000001cf9cb0 [ 206.923408] ? __this_cpu_preempt_check+0x13/0x20 Fixes: 56299fb7d904 ("drm/i915: Signal first fence from irq handler if complete") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100051 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170303144557.4815-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_irq.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 53a7915cd28b17536609bed6416701b40e8a10de Author: Ville Syrjälä Date: Thu Mar 2 19:15:08 2017 +0200 drm/i915: Add FIFO underrun tracepoints Add tracepoints for display FIFO underruns. Makes it more convenient to correlate the underruns with other display tracepoints. v2: s/i915/intel/ in the tracepoint name Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-19-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_trace.h | 43 ++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_fifo_underrun.c | 11 ++++++-- 2 files changed, 52 insertions(+), 2 deletions(-) commit 1489bba82433d8960d6bfef7453eae77ef9c926a Author: Ville Syrjälä Date: Thu Mar 2 19:15:07 2017 +0200 drm/i915: Add cxsr toggle tracepoint Add a tracepoint for observing changes in the cxsr state. The tracepoint will dump out the frame and scanline counters for each pipe so that the information can be compared with eg. plane update tracepoints. Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-18-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_trace.h | 30 ++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_pm.c | 2 ++ 2 files changed, 32 insertions(+) commit c137d6605fd73635900597d386e3fa8af26d7787 Author: Ville Syrjälä Date: Thu Mar 2 19:15:06 2017 +0200 drm/i915: Add VLV/CHV watermark/FIFO programming tracepoints Add tracepoints for observing the WM/FIFO programming on VLV/CHV. When compared with the plane and pipe update tracepoints this can be used to verify that everything is performed in the right sequence. Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-17-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_trace.h | 71 +++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_pm.c | 4 +++ 2 files changed, 75 insertions(+) commit 722595362cad7f254d8930b9576e4202010917b6 Author: Ville Syrjälä Date: Thu Mar 2 19:15:05 2017 +0200 drm/i915: Add plane update/disable tracepoints Add tracepoints for plane programming. The tracepoints will dump the frame and scanline counters, so this can be used to verify eg. that the plane gets reprogrammed at the right time with respect to watermark programming (if we have appropriate tracepoints for that as well). v2: Rebase due to legacy cursor changes Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-16-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_irq.c | 3 ++ drivers/gpu/drm/i915/i915_trace.h | 56 +++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_atomic_plane.c | 11 ++++-- drivers/gpu/drm/i915/intel_display.c | 15 +++++++-- 4 files changed, 80 insertions(+), 5 deletions(-) commit 7373728ddf5ebb199b8e000d8e097eb534ab6e6d Author: Ville Syrjälä Date: Thu Mar 2 19:15:04 2017 +0200 drm/i915: Kill level 0 wm hack for VLV/CHV We now compute the watermarks correctly, so just return an error if we can't support the configuration. Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-15-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_pm.c | 4 ---- 1 file changed, 4 deletions(-) commit 1a10ae6ba8c3df4af9bcdb6f40348af71e72bd13 Author: Ville Syrjälä Date: Thu Mar 2 19:15:03 2017 +0200 drm/i915: Workaround VLV/CHV sprite1->sprite0 enable underrun On VLV/CHV enabling sprite0 when sprite1 has already been enabled may lead to an underrun. This only happens when sprite0 FIFO size is zero prior to enabling it. Hence an effective workaround is to always allocate at least one cacheline for sprite0 when sprite1 is active. I've not observed this sort of failure during any other type of plane enable/disable sequence. v2: s/noninverted/raw/ for consistency with other platforms Testcase: igt/kms_plane_blinker Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-14-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_pm.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 602ae835505603eca8b50d813e00a56f56158434 Author: Ville Syrjälä Date: Thu Mar 2 19:15:02 2017 +0200 drm/i915: Sanitize VLV/CHV watermarks properly Clear out the watermark for all disabled planes to 0. This is required to avoid falsely thinking that the inherited watermarks are bogus in case the watermark is actually higher than the FIFO size. v2: s/noninverted/raw/ for consistency with other platforms Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-13-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 17 +++++++----- drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 50 +++++++++++++++++++++++++++++++++++- 3 files changed, 61 insertions(+), 7 deletions(-) commit b4ede6dfa0c5a952161bac6c5f840469a13386ce Author: Ville Syrjälä Date: Thu Mar 2 19:15:01 2017 +0200 drm/i915: Only use update_wm_{pre,post} for pre-ilk platforms Now that vlv/chv have more proper wm programming support, let's reduce the the update_wm_{pre,post} flags to only cover the pre-ilk platforms. When we finally convert those as well we can drop these flags entirely. Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-12-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 5eeb798bbe398bbbcb09d7e6851825cb584b5bf8 Author: Ville Syrjälä Date: Thu Mar 2 19:15:00 2017 +0200 drm/i915: Nuke crtc->wm.cxsr_allowed Remove crtc->wm.cxsr_allowed and just rely on crtc_state->disable_cxsr instead. This was used only by vlv/chv to indicate whether to enable cxsr in the wm computation. That doesn't really work anymore, and as far as the optimal watermarks go we'll just consider the number of planes and the current pipe, and for the intermediate watermarks we'll also start to consider disable_cxsr which is set appropriately when planes are being enabled/disabled. We'll also flip over the crtc_state->wm.need_postvbl_update setup so that it's the wm code that will set it. Previously the generic code set it up, and then the wm code cleared it again if it thought it's not needed after all. Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-11-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 44 +++++++++++------------------------- drivers/gpu/drm/i915/intel_drv.h | 3 --- drivers/gpu/drm/i915/intel_pm.c | 14 ++++++------ 3 files changed, 20 insertions(+), 41 deletions(-) commit 4841da51a753ca65909441e561236de82b6b48a5 Author: Ville Syrjälä Date: Thu Mar 2 19:14:59 2017 +0200 drm/i915: Compute proper intermediate wms for vlv/cvh Since the watermark registers arent double buffered on VLV/CHV, we'll need to play around with intermediate watermarks same was as we do on ILK-BDW. The watermark registers on VLV/CHV contain inverted values, so to find the intermediate watermark value we just take the minimum of the active and optimal values. This also means that, unlike ILK-BDW, there's no chance that we'd fail to find a working intermediate watermarks. As long as both the active and optimal watermarks are valid the intermediate watermarks will come out valid as well. Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-10-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_drv.h | 2 ++ drivers/gpu/drm/i915/intel_pm.c | 59 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 60 insertions(+), 1 deletion(-) commit 236c48e692458fb55ec96ac1823a176f2bce09f1 Author: Ville Syrjälä Date: Thu Mar 2 19:14:58 2017 +0200 drm/i915: Skip useless watermark/FIFO related work on VLV/CHV when not needed Check whether anything relevant has actually change when we compute new watermarks for each plane in the state. If the watermarks for no primary/sprite planes changed we don't have to recompute the FIFO split or reprogram the DSBARB registers. And even the cursor watermarks didn't change we can skip the merge+invert step between all the planes on the pipe as well. v2: s/noninverted/raw/ for consistency with other platforms v3: Drop duplicated vlv_get_fifo_size() call during init Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-9-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_atomic.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 71 +++++++++++++++++++++++++++++-------- 3 files changed, 58 insertions(+), 15 deletions(-) commit ff32c54ef1ce774ad3640d4635803ad35d64b8e8 Author: Ville Syrjälä Date: Thu Mar 2 19:14:57 2017 +0200 drm/i915: Compute vlv/chv wms the atomic way Start computing the vlv/chv watermarks the atomic way, from the .compute_pipe_wm() hook. We'll recompute the actual watermarks for only planes that are part of the state, the other planes will keep their watermark from the last time it was computed. And the actual watermark programming will happen from the .initial_watermarks() hook. For now we'll just compute the optimal watermarks, and we'll hook up the intermediate watermarks properly later. The DSPARB registers responsible for the FIFO paritioning are double buffered, so they will be programming from intel_begin_crtc_commit(). v2: s/noninverted/raw/ for consistency with other platforms s/vlv_plane_wm_set/vlv_raw_plane_wm_set/ for clarity Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-8-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 8 + drivers/gpu/drm/i915/intel_display.c | 21 ++- drivers/gpu/drm/i915/intel_drv.h | 2 - drivers/gpu/drm/i915/intel_pm.c | 302 +++++++++++++++++++++++------------ 4 files changed, 228 insertions(+), 105 deletions(-) commit 5012e604891a8ac3eafc7f59335dc688a6c388f6 Author: Ville Syrjälä Date: Thu Mar 2 19:14:56 2017 +0200 drm/i915: Compute VLV/CHV FIFO sizes based on the PM2 watermarks Let's compute the watermarks first and the FIFO size second. This way we can make sure the FIFO split is the most accommodating to the watermarks. Previously we could have potentially computed a FIFO split that couldn't accommodate the PM2 watermarks simply due to a bad split even if the total FIFO size would have been sufficient. It'll also allow us to avoid recomputing the wms for all planes whenever the FIFO split would change. Thus we don't have to add any extra planes to the state when the FIFO needs to be repartitioned. To help with this we'll keep around copies of the non-inverted watermarks in the crtc state. For now that doesn't help too much, but once we start to do the watermark computation only for the planes that change we'll need the non-inverted values around for the other planes. v2: s/noninverted/raw/ for consistency with other platforms Fix the memset() of the "raw" watermarks Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-7-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_drv.h | 2 + drivers/gpu/drm/i915/intel_pm.c | 111 ++++++++++++++++++--------------------- 2 files changed, 53 insertions(+), 60 deletions(-) commit 814e7f0bf7b7d5805a5ef030348c25647103b6a8 Author: Ville Syrjälä Date: Thu Mar 2 19:14:55 2017 +0200 drm/i915: Plop vlv/chv fifo sizes into crtc state Move the vlv/chv FIFO size tracking into the crtc_state. As with the wms for now this just acts as temporary storage. Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-6-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_drv.h | 12 ++++++------ drivers/gpu/drm/i915/intel_pm.c | 26 +++++++++++++++----------- 2 files changed, 21 insertions(+), 17 deletions(-) commit 855c79f5212acced123c1a6be3c12601f45e8da9 Author: Ville Syrjälä Date: Thu Mar 2 19:14:54 2017 +0200 drm/i915: Plop vlv wm state into crtc_state Relocate the vlv/chv wm state to live under intel_crtc_state. Note that for now this just behaves as a temporary storage. But it'll be easier to conver the thing over to properly pre-computing the state when it's already in the right place. Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-5-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_drv.h | 30 +++++++++++++++++++++--------- drivers/gpu/drm/i915/intel_pm.c | 32 ++++++++++++++++---------------- 2 files changed, 37 insertions(+), 25 deletions(-) commit 7eb4941f048f317b59d5bd5683baf76b440dc891 Author: Ville Syrjälä Date: Thu Mar 2 19:14:53 2017 +0200 drm/i915: Move vlv wms from crtc->wm_state to crtc->wm.active.vlv In an effort to make the vlv/chv wm code look and behave more like the ilk+ code, let's move the current active wms next to the corresponding ilk wms. Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-4-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_drv.h | 3 +-- drivers/gpu/drm/i915/intel_pm.c | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) commit f07d43d2da1cbf4f335359a5fe39f773133c2be4 Author: Ville Syrjälä Date: Thu Mar 2 19:14:52 2017 +0200 drm/i915: Track plane fifo sizes under intel_crtc Track the plane fifo sizes under intel_crtc instead of under each intel_plane. Avoids looping over the planes in a bunch of places, and later we'll move this tracking into the crtc state properly. v2: Nuke intel_plane_wm_parameters (Maarten) Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-3-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_drv.h | 32 ++--------- drivers/gpu/drm/i915/intel_pm.c | 115 ++++++++++++++++----------------------- 2 files changed, 54 insertions(+), 93 deletions(-) commit e9728bd888e1fa2d5c1f77de8817a96eeba31747 Author: Ville Syrjälä Date: Thu Mar 2 19:14:51 2017 +0200 drm/i915: Track visible planes in a bitmask In a lot of place we wish to know which planes on the crtc are actually visible, or how many of them there are. Let's start tracking that in a bitmask in the crtc state. We already track enabled planes (ie. ones with an fb and crtc specified by the user) but that's not quite the same thing as enabled planes may still end up being invisible due to clipping and whatnot. Signed-off-by: Ville Syrjälä Reviewed-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-2-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_atomic_plane.c | 6 +++ drivers/gpu/drm/i915/intel_display.c | 74 +++++++++++++++++++++---------- drivers/gpu/drm/i915/intel_drv.h | 3 ++ 3 files changed, 60 insertions(+), 23 deletions(-) commit 054b9acde6f9b7bd5e1e9739777d1cddda048305 Author: Mika Kuoppala Date: Tue Feb 28 17:28:11 2017 +0200 drm/i915/gtt: Setup vm callbacks late If we manage to tangle errorpaths and get call to callbacks, it is better to defensively keep them as null until object init is finished so that we get clean null deref on callsite, instead of more cryptic wreckage with partly initialized vm objects. Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1488295691-9404-5-git-send-email-mika.kuoppala@intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit e71677698b27f3b460d44f67389b43c4353522dd Author: Mika Kuoppala Date: Tue Feb 28 17:28:10 2017 +0200 drm/i915: Avoid using word legacy with ppgtt The term legacy is subjective. Use 3lvl and 4lvl where appropriate. Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1488295691-9404-4-git-send-email-mika.kuoppala@intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 18 ++++++++---------- drivers/gpu/drm/i915/i915_gem_gtt.h | 21 +++++++++++---------- drivers/gpu/drm/i915/intel_lrc.c | 4 ++-- 3 files changed, 21 insertions(+), 22 deletions(-) commit 1e6437b0e064746a4a2b6b3578c639797cafe4b1 Author: Mika Kuoppala Date: Tue Feb 28 17:28:09 2017 +0200 drm/i915/gtt: Prefer i915_vm_is_48bit() over macro If we setup the vm size early, we can use the newly introduced i915_vm_is_48bit() in majority of callsites wanting to know the vm size. As we operate either with 3lvl or 4lvl page table structure, wrap the vm size query inside a function which tells us if 4lvl setup is needed for particular vm, as the following code uses the function names where level is noted. v2: use_4lvl (Chris) Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1488295691-9404-3-git-send-email-mika.kuoppala@intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 63 ++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 25 deletions(-) commit 54af56dbf883f65396917a88e4ce8c37f9d52009 Author: Mika Kuoppala Date: Tue Feb 28 17:28:08 2017 +0200 drm/i915: Don't mark pdps clear if pdps are not submitted Don't mark pdps clear if never do the necessary actions with the hardware to make them clear. v2: totally get rid of confusing ppgtt bool (Chris) Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1488295691-9404-2-git-send-email-mika.kuoppala@intel.com drivers/gpu/drm/i915/intel_lrc.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 3e490042a80f82df80141fce1dbef1baa7850160 Author: Mika Kuoppala Date: Tue Feb 28 17:28:07 2017 +0200 drm/i915/gtt: Make I915_PDPES_PER_PDP inline function The macro takes a vm pointer at some sites, and dev_priv on others We were saved as the internal macro never deferences the pointer given. As the number of pdpes depend on vm configuration, make it as a inline function that accepts vm pointer. Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1488295691-9404-1-git-send-email-mika.kuoppala@intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 12 +++++++----- drivers/gpu/drm/i915/i915_gem_gtt.h | 26 ++++++++++++++++---------- 2 files changed, 23 insertions(+), 15 deletions(-) commit b2a4ab7268a65bf59385e9a5cdfd4b2f1eaf6c31 Author: Avraham Shukron Date: Thu Feb 9 14:57:55 2017 -0200 [media] staging: omap4iss: fix multiline comment style Fixed multi-line comments to their preferred style (First line empty) Signed-off-by: Avraham Shukron Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/omap4iss/iss_video.c | 38 ++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 13 deletions(-) commit 0542524944c2ae3264ca8e6b5f0c7a111f09a2c2 Author: Chris Wilson Date: Fri Mar 3 12:19:47 2017 +0000 drm/i915: Generalise wait for execlists to be idle The code to check for execlists completion is generic, so move it to intel_engine_cs.c, where we can reuse the new intel_engine_is_idle(). Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170303121947.20482-2-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 8 +++---- drivers/gpu/drm/i915/intel_engine_cs.c | 13 +++++++++++ drivers/gpu/drm/i915/intel_lrc.c | 28 ----------------------- drivers/gpu/drm/i915/intel_lrc.h | 1 - drivers/gpu/drm/i915/intel_ringbuffer.h | 1 + drivers/gpu/drm/i915/selftests/i915_gem_request.c | 2 +- 6 files changed, 19 insertions(+), 34 deletions(-) commit 5400367a864ddafdfb9d5d04cf6f9979665ef349 Author: Chris Wilson Date: Fri Mar 3 12:19:46 2017 +0000 drm/i915: Ensure the engine is idle before manually changing HWS During reset_all_global_seqno() on seqno rollover, we have to update the HWS. This causes all in flight requests to be completed, so first we wait. However, we were only waiting for the requests themselves to be completed and clearing out the waiter rbtrees - what I had missed was the extra reference in execlists->port[]. Since commit fe9ae7a3bfdb ("drm/i915/execlists: Detect an out-of-order context switch") we can detect when the request is retired before the context switch interrupt is completed. The impact should be neglible outside of debugging. Testcase: igt/gem_exec_whisper Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170303121947.20482-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem_request.c | 3 +++ drivers/gpu/drm/i915/intel_engine_cs.c | 31 +++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_ringbuffer.h | 2 ++ 3 files changed, 36 insertions(+) commit f8585ce655e9cdeabc38e8e2580b05735110e4a5 Author: Evgeny Plehov Date: Tue Feb 7 19:37:01 2017 -0200 [media] dvb-usb-cxusb: Geniatech T230C support Updated Geniatech DVB-T/T2 stick support. Signed-off-by: Evgeny Plehov Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/cxusb.c | 139 +++++++++++++++++++++++++++++++++++++- 1 file changed, 138 insertions(+), 1 deletion(-) commit 690d55def830f98981f5c55dc535776bb00dd1e9 Author: Evgeny Plehov Date: Tue Feb 7 19:35:46 2017 -0200 [media] si2157: Si2141/2151 tuner support Support for new tuner version. Signed-off-by: Evgeny Plehov Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/si2157.c | 70 ++++++++++++++++++++++++++++++++++---- drivers/media/tuners/si2157_priv.h | 2 ++ 2 files changed, 66 insertions(+), 6 deletions(-) commit 50d644620781024da229e35722538f75fd779672 Author: Evgeny Plehov Date: Tue Feb 7 19:33:47 2017 -0200 [media] si2168: Si2168-D60 support Support for new demod version. Signed-off-by: Evgeny Plehov Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/si2168.c | 4 ++++ drivers/media/dvb-frontends/si2168_priv.h | 2 ++ 2 files changed, 6 insertions(+) commit 105e8442551ed204a146e1073459cc1d4c836942 Author: Rick Chang Date: Wed Dec 14 06:04:50 2016 -0200 [media] vcodec: mediatek: Add Maintainers entry for Mediatek JPEG driver Signed-off-by: Rick Chang Signed-off-by: Minghsiu Tsai Signed-off-by: Bin Liu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit b2f0d2724ba477d326e9d654d4db1c93e98f8b93 Author: Rick Chang Date: Wed Dec 14 06:04:48 2016 -0200 [media] vcodec: mediatek: Add Mediatek JPEG Decoder Driver Add v4l2 driver for Mediatek JPEG Decoder Signed-off-by: Rick Chang Signed-off-by: Minghsiu Tsai Reviewed-by: Ricky Liang Tested-by: Ricky Liang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 15 + drivers/media/platform/Makefile | 2 + drivers/media/platform/mtk-jpeg/Makefile | 2 + drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 1306 ++++++++++++++++++++++ drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h | 139 +++ drivers/media/platform/mtk-jpeg/mtk_jpeg_hw.c | 417 +++++++ drivers/media/platform/mtk-jpeg/mtk_jpeg_hw.h | 91 ++ drivers/media/platform/mtk-jpeg/mtk_jpeg_parse.c | 160 +++ drivers/media/platform/mtk-jpeg/mtk_jpeg_parse.h | 25 + drivers/media/platform/mtk-jpeg/mtk_jpeg_reg.h | 58 + 10 files changed, 2215 insertions(+) commit 84a67742b1c447f7b3055ceaf654748689c9d3f3 Author: Rick Chang Date: Wed Dec 14 06:04:47 2016 -0200 [media] dt-bindings: mediatek: Add a binding for Mediatek JPEG Decoder Add a DT binding documentation for Mediatek JPEG Decoder of MT2701 SoC. Signed-off-by: Rick Chang Signed-off-by: Minghsiu Tsai Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../bindings/media/mediatek-jpeg-decoder.txt | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 1abfa3b352490f25acf82154da8da80497590c14 Author: Thibault Saunier Date: Wed Feb 1 18:05:22 2017 -0200 [media] exynos-gsc: Add support for NV{16,21,61}M pixel formats Those are useful formats that should be handled. Signed-off-by: Thibault Saunier Signed-off-by: Javier Martinez Canillas Acked-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos-gsc/gsc-core.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit d7f3e33df4fbdc9855fb151f4a328ec46447e3ba Author: Thibault Saunier Date: Wed Feb 1 18:05:21 2017 -0200 [media] exynos-gsc: Do not swap cb/cr for semi planar formats In the case of semi planar formats cb and cr are in the same plane in memory, meaning that will be set to 'cb' whatever the format is, and whatever the (packed) order of those components are. Suggested-by: Nicolas Dufresne Signed-off-by: Thibault Saunier Signed-off-by: Javier Martinez Canillas Acked-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos-gsc/gsc-core.c | 2 -- 1 file changed, 2 deletions(-) commit 446aba663b8240b24202cb8902b0d5c8f91aa3da Author: Mauro Carvalho Chehab Date: Fri Mar 3 07:28:29 2017 -0300 [media] tveeprom: get rid of unused arg on tveeprom_hauppauge_analog() tveeprom_hauppauge_analog() used to need the I2C adapter in order to print debug messages. As it now uses pr_foo() facilities since commit 6037b3ca28f4 ("[media] tveeprom: print log messages using pr_foo()"), the first argument of the function is not needed anymore. So, get rid of it. Signed-off-by: Mauro Carvalho Chehab drivers/media/common/tveeprom.c | 4 ++-- drivers/media/pci/bt8xx/bttv-cards.c | 2 +- drivers/media/pci/cx18/cx18-driver.c | 2 +- drivers/media/pci/cx23885/cx23885-cards.c | 3 +-- drivers/media/pci/cx88/cx88-cards.c | 2 +- drivers/media/pci/ivtv/ivtv-driver.c | 2 +- drivers/media/pci/saa7134/saa7134-cards.c | 2 +- drivers/media/pci/saa7164/saa7164-cards.c | 4 +--- drivers/media/usb/au0828/au0828-cards.c | 2 +- drivers/media/usb/cx231xx/cx231xx-cards.c | 3 +-- drivers/media/usb/dvb-usb-v2/mxl111sf.c | 4 ++-- drivers/media/usb/em28xx/em28xx-cards.c | 3 +-- drivers/media/usb/pvrusb2/pvrusb2-eeprom.c | 2 +- include/media/tveeprom.h | 2 +- 14 files changed, 16 insertions(+), 21 deletions(-) commit e081c8463ac947e75f20ee11c6516f089efddaf6 Author: Ander Conselvan de Oliveira Date: Thu Mar 2 14:58:57 2017 +0200 drm/i915: Remove duplicate DDI enabling logic from MST path The logic to enable a DDI in intel_mst_pre_enable_dp() is essentially the same as in intel_ddi_pre_enable_dp(). So reuse the latter function by calling the post_disable hook on the intel_dig_port instead of duplicating that code. v2: Don't oops because of a NULL encoder->crtc. (Ville) v3: Warn for MST + PORT_E too. (Ville) Cc: Imre Deak Cc: Ville Syrjälä Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170302125857.14665-8-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_ddi.c | 2 ++ drivers/gpu/drm/i915/intel_dp_mst.c | 23 +++-------------------- 2 files changed, 5 insertions(+), 20 deletions(-) commit 3dc38eea665f383c84cc8d858b9a7645c0b29c54 Author: Ander Conselvan de Oliveira Date: Thu Mar 2 14:58:56 2017 +0200 drm/i915: Remove direct usages of intel_crtc->config from DDI code Remove direct usages of intel_crtc->config from the DDI code. Functions that didn't yet take a pipe_config as an argument were coverted to do so. v2: s/pipe_config/const crtc_state/ (Ville) - take crtc from crtc_state. (Ville) Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170302125857.14665-7-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_ddi.c | 62 +++++++++++++++++++----------------- drivers/gpu/drm/i915/intel_display.c | 12 +++---- drivers/gpu/drm/i915/intel_drv.h | 11 ++++--- 3 files changed, 44 insertions(+), 41 deletions(-) commit e9ce1a625fcae9d9dd64a877535c8d10ddfb89a0 Author: Ander Conselvan de Oliveira Date: Thu Mar 2 14:58:55 2017 +0200 drm/i915: Pass intel_crtc to DDI functions called from crtc en/disable Pass intel_crtc to functions intel_ddi_enable_transcoder_func(), intel_ddi_set_pipe_settings() and intel_ddi_set_vc_payload_alloc(), instead of the generic crtc type. By changing the functions intel_ddi_get_crtc_encoder() so that it receives an intel_crtc parameter, there is no need for the drm_crtc in the callers. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170302125857.14665-6-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_ddi.c | 62 ++++++++++++++++-------------------- drivers/gpu/drm/i915/intel_display.c | 8 ++--- drivers/gpu/drm/i915/intel_drv.h | 6 ++-- 3 files changed, 34 insertions(+), 42 deletions(-) commit dc4a109474c6bffacaf754440fa88ff0dd957667 Author: Ander Conselvan de Oliveira Date: Thu Mar 2 14:58:54 2017 +0200 drm/i915: Pass pipe_config to fdi_link_train() functions It is preferred to pass pipe_config to functions instead of accessing crtc->config directly. Follow suit and pass pipe_config to the fdi link train functions. v2: Add const; s/pipe_config/crtc_state/ (Ville) Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170302125857.14665-5-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/intel_ddi.c | 9 +++++---- drivers/gpu/drm/i915/intel_display.c | 19 +++++++++++-------- drivers/gpu/drm/i915/intel_drv.h | 3 ++- 4 files changed, 20 insertions(+), 14 deletions(-) commit 2ce42273248a8b0fe7a819cb2624896ef1c60fe1 Author: Ander Conselvan de Oliveira Date: Thu Mar 2 14:58:53 2017 +0200 drm/i915: Pass pipe_config to pch_enable() functions Using crtc->config directly is being removed in favor of passing a pipe_config. Follow the trend and pass pipe_config to pch_enable() functions. v2: s/pipe_config/crtc_state/ (Ville) - constify crtc_state. (Ville) - take crtc from crtc_state. (Ville) Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170302125857.14665-4-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_display.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 0dcdc382c3823e959e9253f2f0c4e436e7ef9a32 Author: Ander Conselvan de Oliveira Date: Thu Mar 2 14:58:52 2017 +0200 drm/i915: Pass intel_crtc to intel_lpt_pch_enable() The function intel_lpt_pch_enable() needs an intel_crtc so pass that instead of the generic crtc type. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170302125857.14665-3-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_display.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 4cbe4b2b175c9dcfffa2311ea9dddd34be1a4f41 Author: Ander Conselvan de Oliveira Date: Thu Mar 2 14:58:51 2017 +0200 drm/i915: Pass intel_crtc to fdi_link_train() hooks The implementation of the fdi_link_train() hooks need an intel_crtc so just pass that instead of the generic crtc type. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170302125857.14665-2-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_ddi.c | 13 ++++---- drivers/gpu/drm/i915/intel_display.c | 63 +++++++++++++++++------------------- drivers/gpu/drm/i915/intel_drv.h | 2 +- 4 files changed, 37 insertions(+), 43 deletions(-) commit 3406e89ae11407187596f5a2c2c156bc0fa87713 Author: Hans Verkuil Date: Fri Feb 10 06:19:14 2017 -0200 [media] vidioc-g-dv-timings.rst: update v4l2_bt_timings struct The new picture_aspect, cea861_vic and hdmi_vic fields were not documented, even though the corresponding flags were. Add documentation for these new fields. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-g-dv-timings.rst | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 6e9b73c695022b2c083517aaed455671ed0cdb2b Author: Hans Verkuil Date: Thu Feb 9 13:14:13 2017 -0200 [media] cec.h: small typo fix ad -> as It won't bring about world peace, but every little bit helps :-) Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/cec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 227dc9b6bfdfe994ea67b26e6c8d72e4c21bd743 Author: Arnd Bergmann Date: Thu Feb 9 13:09:08 2017 -0200 [media] coda/imx-vdoa: platform_driver should not be const The device driver platform is actually written to during registration, for setting the owner field, so platform_driver_register() does not take a const pointer: drivers/media/platform/coda/imx-vdoa.c: In function 'vdoa_driver_init': drivers/media/platform/coda/imx-vdoa.c:333:213: error: passing argument 1 of '__platform_driver_register' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] module_platform_driver(vdoa_driver); In file included from drivers/media/platform/coda/imx-vdoa.c:22:0: include/linux/platform_device.h:199:12: note: expected 'struct platform_driver *' but argument is of type 'const struct platform_driver *' extern int __platform_driver_register(struct platform_driver *, ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/coda/imx-vdoa.c: In function 'vdoa_driver_exit': drivers/media/platform/coda/imx-vdoa.c:333:626: error: passing argument 1 of 'platform_driver_unregister' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] Remove the modifier again. Fixes: d2fe28feaebb ("[media] coda/imx-vdoa: constify structs") Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/imx-vdoa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3538aa6ecfb2dd727a40f9ebbbf25a0c2afe6226 Author: Arnd Bergmann Date: Wed Feb 8 19:14:13 2017 -0200 [media] tc358743: fix register i2c_rd/wr functions While testing with CONFIG_UBSAN, I got this warning: drivers/media/i2c/tc358743.c: In function 'tc358743_probe': drivers/media/i2c/tc358743.c:1930:1: error: the frame size of 2480 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] The problem is that the i2c_rd8/wr8/rd16/... functions in this driver pass a pointer to a local variable into a common function, and each call to one of them adds another variable plus redzone to the stack. I also noticed that the way this is done is broken on big-endian machines, as we copy the registers in CPU byte order. To address both those problems, I'm adding two helper functions for reading a register of up to 32 bits with correct endianess and change all other functions to use that instead. Just to be sure we don't get the problem back with changed optimizations in gcc, I'm also marking the new functions as 'noinline', although my tests with gcc-7 don't require that. Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 46 ++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 21 deletions(-) commit 371d1143a5581718f7c687e4da259f80ab0c4634 Author: Arnd Bergmann Date: Thu Feb 2 12:53:07 2017 -0200 [media] mxl111sf: reduce stack usage in init function mxl111sf uses a lot of kernel stack memory as it puts an i2c_client structure on the stack: drivers/media/usb/dvb-usb-v2/mxl111sf.c: In function 'mxl111sf_init': drivers/media/usb/dvb-usb-v2/mxl111sf.c:953:1: error: the frame size of 1248 bytes is larger than 1152 bytes [-Werror=frame-larger-than=] We can avoid doing this by open-coding the call to i2c_transfer() instead of calling tveeprom_read(), and not passing an i2c_client pointer to tveeprom_hauppauge_analog(), which would ignore that anyway. Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/mxl111sf.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 4063987c9bb419bb14d83b9ad812ad3d6a3c65e4 Author: Arnd Bergmann Date: Thu Feb 2 12:53:06 2017 -0200 [media] cx231xx-i2c: reduce stack size in bus scan The cx231xx_do_i2c_scan function needs a lot of stack because it puts an i2c_client structure on it: drivers/media/usb/cx231xx/cx231xx-i2c.c: In function 'cx231xx_do_i2c_scan': drivers/media/usb/cx231xx/cx231xx-i2c.c:518:1: error: the frame size of 1248 bytes is larger than 1152 bytes [-Werror=frame-larger-than=] This changes it to call i2c_transfer() directly instead, avoiding the need for the structure. Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-i2c.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 6830733d53a4517588e56227b9c8538633f0c496 Author: Arnd Bergmann Date: Thu Feb 2 12:53:04 2017 -0200 [media] pvrusb2: reduce stack usage pvr2_eeprom_analyze() The driver uses a relatively large data structure on the stack, which showed up on my radar as we get a warning with the "latent entropy" GCC plugin: drivers/media/usb/pvrusb2/pvrusb2-eeprom.c:153:1: error: the frame size of 1376 bytes is larger than 1152 bytes [-Werror=frame-larger-than=] The warning is usually hidden as we raise the warning limit to 2048 when the plugin is enabled, but I'd like to lower that again in the future, and making this function smaller helps to do that without build regressions. Further analysis shows that putting an 'i2c_client' structure on the stack is not really supported, as the embedded 'struct device' is not initialized here, and we are only saved by the fact that the function that is called here does not use the pointer at all. Fixes: d855497edbfb ("V4L/DVB (4228a): pvrusb2 to kernel 2.6.18") Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pvrusb2/pvrusb2-eeprom.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 8ecc54138aa1fc1be10bac7890248a0c00065427 Author: Vincent ABRIOU Date: Mon Sep 12 05:47:27 2016 -0300 [media] vivid: support for contiguous DMA buffers It allows to simulate the behavior of hardware with such limitations or to connect vivid to real hardware with such limitations. Add the "allocators" module parameter option to let vivid use the dma-contig instead of vmalloc. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Vincent Abriou Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/v4l-drivers/vivid.rst | 8 ++++++++ drivers/media/platform/vivid/Kconfig | 2 ++ drivers/media/platform/vivid/vivid-core.c | 32 ++++++++++++++++++++++++++----- 3 files changed, 37 insertions(+), 5 deletions(-) commit 93d4a26c3dabcee4d8bd6c9a1aba779484dc3cc3 Author: Songjun Wu Date: Tue Jan 24 06:05:57 2017 -0200 [media] atmel-isc: add the isc pipeline function Image Sensor Controller has an internal image processor. It can convert raw format to the other formats, like RGB565, YUV420P. A module parameter 'sensor_preferred' is used to enable or disable the pipeline function. Some v4l2 controls are added to tuning the image when the pipeline function is enabled. Signed-off-by: Songjun Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc-regs.h | 102 ++++- drivers/media/platform/atmel/atmel-isc.c | 627 +++++++++++++++++++++----- 2 files changed, 620 insertions(+), 109 deletions(-) commit 50ad58f9dc11ebdf7d66253dd1f4cd3f6642749d Author: Shilpa P Date: Sat Dec 3 05:02:01 2016 -0200 [media] staging: Replaced BUG_ON with warnings Don't crash the Kernel for driver errors Signed-off-by: Shilpa P Acked-by: Allen Pais Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/bcm2048/radio-bcm2048.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit eb3f1b7f2d09ffcc9638b03c4e7e69354e2d3cbb Author: Shailendra Verma Date: Fri Dec 2 02:48:01 2016 -0200 [media] bdisp: Clean up file handle in open() error path The File handle is not yet added in the vdev list.So no need to call v4l2_fh_del(&ctx->fh)if it fails to create control. Signed-off-by: Shailendra Verma Reviewed-by: Fabien Dessenne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8352aea3c3f44ea9065b77d3baedc58921710d49 Author: Chris Wilson Date: Fri Mar 3 09:00:56 2017 +0000 drm/i915: Differentiate between hangcheck waiting for timer or scheduler Check timer_pending() as well as work_pending() to see if the timer for the hangcheck has already expired and the work is pending execution on some list somewhere. v2: Use a more compact if-chain Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170303090056.19973-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_debugfs.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit c8659efac544b7df1106022d78617a1ca1d9a38c Author: Chris Wilson Date: Thu Mar 2 12:25:25 2017 +0000 drm/i915: Drop spinlocks around adding to the client request list Adding to the tail of the client request list as the only other user is in the throttle ioctl that iterates forwards over the list. It only needs protection against deletion of a request as it reads it, it simply won't see a new request added to the end of the list, or it would be too early and rejected. We can further reduce the number of spinlocks required when throttling by removing stale requests from the client_list as we throttle. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170302122525.19675-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_gem.c | 14 ++++++------ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 14 ++++++++---- drivers/gpu/drm/i915/i915_gem_request.c | 34 ++++++------------------------ drivers/gpu/drm/i915/i915_gem_request.h | 4 +--- 5 files changed, 24 insertions(+), 44 deletions(-) commit dc35fa5628ff2ffc1adfb7be4c415216252df0d5 Author: Narcisa Ana Maria Vasile Date: Tue Feb 28 00:15:11 2017 +0200 staging: iio: ad9834: Moved contents of the header to the source file Moved the contents of the header(ad9834.h) into the corresponding source file with the exception of the platform data struct which is supposed to be used from somewhere else other than the driver. Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Jonathan Cameron drivers/staging/iio/frequency/ad9834.c | 72 ++++++++++++++++++++++++++++++++++ drivers/staging/iio/frequency/ad9834.h | 72 ---------------------------------- 2 files changed, 72 insertions(+), 72 deletions(-) commit 5be6e33400992d3450e1c8234a5af353e1560580 Author: Ville Syrjälä Date: Mon Feb 20 16:04:43 2017 +0200 drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks Currently ILK-BDW explicitly disable LP1+ watermarks from their .init_clock_gating() hooks. Unfortunately that hook gets called way too late since by that time we've already initialized all the watermark state tracking which then gets out of sync with the hardware state. We may eventually want to consider killing off the explicit LP1+ disable from .init_clock_gating(). In the meantime however, we can avoid the problem by reordering the init sequence such that intel_modeset_init_hw()->intel_init_clock_gating() gets called prior to the hardware state takeover. I suppose prior to the two stage watermark programming we were magically saved by something that forced the watermarks to be reprogrammed fully after .init_clock_gating() got called. But now that no longer happens. Note that the diff might look a bit odd as it kills off one call of intel_update_cdclk(), but that's fine because intel_modeset_init_hw() does the exact same thing. Previously we just did it twice. Actually even this new init sequence is pretty bogus as .init_clock_gating() really should be called before any gem hardware init since it can configure various clock gating workarounds and whatnot that affect the GT side as well. Also intel_modeset_init() really should get split up into better defined init stages. Another "fun" detail is that intel_modeset_gem_init() is where RPS/RC6 gets configured. Why that is done from the display code is beyond me. I've decided to leave all this be for now, and just try to fix the init sequence enough for watermarks to work. Cc: stable@vger.kernel.org Cc: Gabriele Mazzotta Cc: David Purton Cc: Matt Roper Cc: Maarten Lankhorst Reported-by: Gabriele Mazzotta Reported-by: David Purton Tested-by: Gabriele Mazzotta Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96645 Fixes: ed4a6a7ca853 ("drm/i915: Add two-stage ILK-style watermark programming (v11)") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170220140443.30891-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit d89aa24585a5e350ec406fb4d11bf6968bfe0cf0 Author: Narcisa Ana Maria Vasile Date: Mon Feb 27 19:28:16 2017 +0200 staging: iio: ad9832: Moved contents of the header to the source file Moved the contents of the header(ad9832.h) into the corresponding source file with the exception of the platform data struct which is supposed to be used from somewhere else other than the driver. Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Jonathan Cameron drivers/staging/iio/frequency/ad9832.c | 92 ++++++++++++++++++++++++++++++++++ drivers/staging/iio/frequency/ad9832.h | 92 ---------------------------------- 2 files changed, 92 insertions(+), 92 deletions(-) commit a8baa3c02a7faa5405adb03eac240e915dca79ea Author: Varsha Rao Date: Wed Mar 1 00:03:42 2017 +0530 staging: iio: adis16203: Move header file content to source file. The contents of the header file are used only by this single source file. Moved content into adis16203_core.c file and removed adis16203.h file. Arranged #include files in alphabetical order. Signed-off-by: Varsha Rao Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16203.h | 125 -------------------------- drivers/staging/iio/accel/adis16203_core.c | 136 +++++++++++++++++++++++++++-- 2 files changed, 128 insertions(+), 133 deletions(-) commit 346834727af71eecec770906c8f68c881a19bed4 Author: simran singhal Date: Wed Mar 1 00:21:17 2017 +0530 staging: iio: accel: adis16201: Move header file content to source file The contents of the header file are used only by this single source file. Move content into .c and remove .h. Signed-off-by: simran singhal Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16201.h | 144 ----------------------------- drivers/staging/iio/accel/adis16201_core.c | 140 +++++++++++++++++++++++++++- 2 files changed, 139 insertions(+), 145 deletions(-) commit ca39b449f6d03e8235969f12f5dd25b8eb4304d6 Author: Eric Anholt Date: Wed Mar 1 10:56:02 2017 -0800 drm/vc4: Fix OOPSes from trying to cache a partially constructed BO. If a CMA allocation failed, the partially constructed BO would be unreferenced through the normal path, and we might choose to put it in the BO cache. If we then reused it before it expired from the cache, the kernel would OOPS. Signed-off-by: Eric Anholt Fixes: c826a6e10644 ("drm/vc4: Add a BO cache.") Reviewed-by: Boris Brezillon Link: http://patchwork.freedesktop.org/patch/msgid/20170301185602.6873-2-eric@anholt.net drivers/gpu/drm/vc4/vc4_bo.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit eb981383ff74f109c72c8c94f4d63705d51cba20 Author: Eric Anholt Date: Wed Mar 1 10:56:01 2017 -0800 drm/vc4: Fulfill user BO creation requests from the kernel BO cache. The from_cache flag was actually "the BO is invisible to userspace", so we can repurpose it to just zero out a cached BO and return it to userspace. Improves wall time for a loop of 5 glsl-algebraic-add-add-1 by -1.44989% +/- 0.862891% (n=28, 1 outlier removed from each that appeared to be other system noise) Note that there's an intel-gpu-tools test to check for the proper zeroing behavior here, which we continue to pass. Signed-off-by: Eric Anholt Reviewed-by: Boris Brezillon Link: http://patchwork.freedesktop.org/patch/msgid/20170301185602.6873-1-eric@anholt.net drivers/gpu/drm/vc4/vc4_bo.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit e5aac87eaed761f39e747e8711faadb7306df488 Author: Chris Wilson Date: Thu Mar 2 15:15:44 2017 +0000 drm/i915: Include power-management state in gpu error dump Useful for double checking that the device is powered up when it hung, include both the status of the power management and our rpm wakelock. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170302151544.16915-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gpu_error.c | 4 ++++ 2 files changed, 6 insertions(+) commit f73b567462e0f086bbff5ae22040ff1bc3d87487 Author: Chris Wilson Date: Thu Mar 2 15:03:56 2017 +0000 drm/i915: Include GT/seqno activity in engine/hangcheck debugfs Whilst investigating some mysterious failures with hangcheck not running during gem_busy/basic-hang-default, the question is why did we decide to cancel the retire_work (which queues the hangcheck)? That decision is based around GT activity, so include that information in the debug report. v2: Include the GT awake status in the error state Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170302150356.9713-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_debugfs.c | 17 +++++++++++++---- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gpu_error.c | 3 +++ 3 files changed, 17 insertions(+), 4 deletions(-) commit 25afdf89ad8c8751be25100b55ee7f09fddaa52e Author: Chris Wilson Date: Thu Mar 2 14:53:23 2017 +0000 drm/i915/guc: Disable irq for __i915_guc_submit wq_lock __i915_guc_submit may be, despite my assertion, called from outside of an irq-safe spinlock so we need to use a full spin_lock_irqsave and not cheat using a spin_lock. (The initial notify callback from the completed fence is called before the spinlock is taken to wake up all waiters and call their callbacks.) [ 48.166581] kernel BUG at drivers/gpu/drm/i915/i915_guc_submission.c:527! [ 48.166617] invalid opcode: 0000 [#1] PREEMPT SMP [ 48.166644] Modules linked in: i915 prime_numbers x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel mei_me mei i2c_i801 netconsole i2c_hid [last unloaded: i915] [ 48.166733] CPU: 2 PID: 5 Comm: kworker/u8:0 Tainted: G U 4.10.0nightly-170302-guc_scrub+ #19 [ 48.166778] Hardware name: /NUC6i5SYB, BIOS SYSKLi35.86A.0054.2016.0930.1102 09/30/2016 [ 48.166835] Workqueue: i915 __intel_autoenable_gt_powersave [i915] [ 48.166865] task: ffff88084ab7cf40 task.stack: ffffc90000064000 [ 48.166921] RIP: 0010:__i915_guc_submit+0x1e6/0x2a0 [i915] [ 48.166953] RSP: 0018:ffffc90000067c80 EFLAGS: 00010202 [ 48.166979] RAX: 0000000000000202 RBX: ffff8808465e0c68 RCX: 0000000000000201 [ 48.167016] RDX: 0000000080000201 RSI: ffff88084ab7d798 RDI: ffff88082b8a8040 [ 48.167054] RBP: ffffc90000067cd8 R08: 0000000000000001 R09: 0000000000000000 [ 48.167085] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88082b8a8148 [ 48.167126] R13: 0000000000000000 R14: ffff88082f440000 R15: ffff88082e85e660 [ 48.167156] FS: 0000000000000000(0000) GS:ffff88086ed00000(0000) knlGS:0000000000000000 [ 48.167195] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 48.167226] CR2: 000055862ffcdc2c CR3: 0000000001e0f000 CR4: 00000000003406e0 [ 48.167257] Call Trace: [ 48.168112] ? trace_hardirqs_on+0xd/0x10 [ 48.168966] ? _raw_spin_unlock_irqrestore+0x4a/0x80 [ 48.169831] i915_guc_submit+0x1a/0x20 [i915] [ 48.170680] submit_notify+0x89/0xc0 [i915] [ 48.171512] __i915_sw_fence_complete+0x175/0x220 [i915] [ 48.172340] i915_sw_fence_complete+0x2a/0x50 [i915] [ 48.173158] i915_sw_fence_commit+0x21/0x30 [i915] [ 48.173968] __i915_add_request+0x238/0x530 [i915] [ 48.174764] __intel_autoenable_gt_powersave+0x8b/0xb0 [i915] [ 48.175549] process_one_work+0x218/0x690 [ 48.176318] ? process_one_work+0x197/0x690 [ 48.177183] worker_thread+0x4e/0x4a0 [ 48.178039] kthread+0x10c/0x140 [ 48.178878] ? process_one_work+0x690/0x690 [ 48.179718] ? kthread_create_on_node+0x40/0x40 [ 48.180568] ret_from_fork+0x31/0x40 [ 48.181423] Code: 02 00 00 43 89 84 ae 50 11 00 00 e8 75 01 62 e1 48 83 c4 30 5b 41 5c 41 5d 41 5e 41 5f 5d c3 48 c1 e0 20 48 09 c2 49 89 d0 eb 82 <0f> 0b 0f 0b 0f 0b 0f 0b 0f 0b 0f 0b 49 c1 e8 20 44 89 43 34 4a [ 48.183336] RIP: __i915_guc_submit+0x1e6/0x2a0 [i915] RSP: ffffc90000067c80 Reported-by: Arkadiusz Hiler Fixes: 349ab9192cc3 ("drm/i915/guc: Make wq_lock irq-safe") Fixes: 67b807a89230 ("drm/i915: Delay disabling the user interrupt for breadcrumbs") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Arkadiusz Hiler Link: http://patchwork.freedesktop.org/patch/msgid/20170302145323.12886-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin Reviewed-by: Arkadiusz Hiler Tested-by: Arkadiusz Hiler drivers/gpu/drm/i915/i915_guc_submission.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 675204153e82c1048886da419b411bb95e83c797 Author: Chris Wilson Date: Thu Mar 2 13:28:01 2017 +0000 drm/i915: s/assert_spin_locked/lockdep_assert_held/ assert_spin_locked() becomes an unconditionally compiled BUG_ON(), adding debug code right into the heart of critical routines like interrupt handlers. text data bss dec hex 1296480 19944 2272 1318696 141f28 before (lockdep disabled) 1295984 19944 2272 1318200 141d38 after 1336261 21139 3208 1360608 14c2e0 before (lockdep enabled) 1339920 21139 3208 1364267 14d12b after Small saving for release; hopefully more instructive in debug. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Mika Kuoppala Cc: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170302132801.599-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_request.c | 4 ++-- drivers/gpu/drm/i915/i915_irq.c | 30 +++++++++++++++--------------- drivers/gpu/drm/i915/i915_perf.c | 2 +- drivers/gpu/drm/i915/intel_breadcrumbs.c | 12 ++++++------ drivers/gpu/drm/i915/intel_fifo_underrun.c | 14 +++++++------- drivers/gpu/drm/i915/intel_hotplug.c | 2 +- drivers/gpu/drm/i915/intel_pipe_crc.c | 2 +- drivers/gpu/drm/i915/intel_pm.c | 8 ++++---- drivers/gpu/drm/i915/intel_uncore.c | 4 ++-- 9 files changed, 39 insertions(+), 39 deletions(-) commit e60a870d7f83517e583e6094ff5646d3a8d732db Author: Chris Wilson Date: Thu Mar 2 11:51:30 2017 +0000 drm/i915: Assert that fence->lock is held in an irq-safe manner Everytime we take the fence->lock (aka request->lock), we must do so with irqs disabled since it may be used from within an hardirq context. As sometimes we are taking the lock in a nested manner, assert that the caller did disable the irqs for us. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170302115130.28434-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_request.c | 5 ++++- drivers/gpu/drm/i915/intel_breadcrumbs.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 264ec1a8221c60f9ccf13f58ac597da21235132d Author: Hans de Goede Date: Fri Feb 10 11:28:02 2017 +0100 drm/i915: Listen for PMIC bus access notifications Listen for PMIC bus access notifications and get FORCEWAKE_ALL while the bus is accessed to avoid needing to do any forcewakes, which need PMIC bus access, while the PMIC bus is busy: This fixes errors like these showing up in dmesg, usually followed by a gfx or system freeze: [drm:fw_domains_get [i915]] *ERROR* render: timed out waiting for forcewake ack request. [drm:fw_domains_get [i915]] *MEDIA* render: timed out waiting for forcewake ack request. i2c_designware 808622C1:06: punit semaphore timed out, resetting i2c_designware 808622C1:06: PUNIT SEM: 2 i2c_designware 808622C1:06: couldn't acquire bus ownership Downside of this approach is that it causes wakeups whenever the PMIC bus is accessed. Unfortunately we cannot simply wait for the PMIC bus to go idle when we hit a race, as forcewakes may be done from interrupt handlers where we cannot sleep to wait for the i2c PMIC bus access to finish. Note that the notifications and thus the wakeups will only happen on baytrail / cherrytrail devices using PMICs with a shared i2c bus for P-Unit and host PMIC access (i2c busses with a _SEM method in their APCI node), e.g. an axp288 PMIC. I plan to write some patches for drivers accessing the PMIC bus to limit their bus accesses to a bare minimum (e.g. cache registers, do not update battery level more often then 4 times a minute), to limit the amount of wakeups. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=155241 Signed-off-by: Hans de Goede Tested-by: tagorereddy Reviewed-by: Ville Syrjälä [danvet: Wiggle in conflicts.] Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/Kconfig | 1 + drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_uncore.c | 39 +++++++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) commit 68f60946c1b6d1504af8994f4a419769217e4f23 Author: Hans de Goede Date: Fri Feb 10 11:28:01 2017 +0100 drm/i915: Add intel_uncore_suspend / resume functions Rename intel_uncore_early_sanitize to intel_uncore_resume, dropping the (always true) restore_forcewake argument and add a new intel_uncore_resume function to replace the intel_uncore_forcewake_reset(dev_priv, false) calls done from the suspend / runtime_suspend functions and make intel_uncore_forcewake_reset private. This is a preparation patch for adding PMIC bus access notifier support. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=155241 Signed-off-by: Hans de Goede Tested-by: tagorereddy Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170210102802.20898-12-hdegoede@redhat.com drivers/gpu/drm/i915/i915_drv.c | 6 +++--- drivers/gpu/drm/i915/i915_drv.h | 6 ++---- drivers/gpu/drm/i915/intel_uncore.c | 14 +++++++++----- 3 files changed, 14 insertions(+), 12 deletions(-) commit d93a6ed370667be38c465c675229d3229fc8681e Author: Hans de Goede Date: Fri Feb 10 11:28:00 2017 +0100 i2c: designware-baytrail: Call pmic_bus_access_notifier_chain Call the iosf_mbi pmic_bus_access_notifier_chain on bus acquire / release. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=155241 Signed-off-by: Hans de Goede Tested-by: tagorereddy Reviewed-by: Andy Shevchenko Acked-by: Wolfram Sang Acked-by: Jarkko Nikula Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170210102802.20898-11-hdegoede@redhat.com drivers/i2c/busses/i2c-designware-baytrail.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5b2cacceb7a877f5eea60ffc7bb6ccd62c4d51cc Author: Hans de Goede Date: Fri Feb 10 11:27:59 2017 +0100 i2c: designware-baytrail: Acquire P-Unit access on bus acquire Acquire P-Unit access to stop others from accessing the P-Unit while the PMIC i2c bus is in use. This is necessary because accessing the P-Unit from the kernel may result in the P-Unit trying to access the PMIC i2c bus, which results in a hang when it happens while we own the PMIC i2c bus semaphore. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=155241 Signed-off-by: Hans de Goede Tested-by: tagorereddy Acked-by: Wolfram Sang Acked-by: Jarkko Nikula Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170210102802.20898-10-hdegoede@redhat.com drivers/i2c/busses/i2c-designware-baytrail.c | 4 ++++ 1 file changed, 4 insertions(+) commit fd476fa22a1f432658b799b023f351f291f2db8b Author: Hans de Goede Date: Fri Feb 10 11:27:58 2017 +0100 i2c: designware-baytrail: Add support for cherrytrail The cherrytrail punit has the pmic i2c bus access semaphore at a different register address. Signed-off-by: Hans de Goede Reviewed-by: Takashi Iwai Tested-by: Takashi Iwai Reviewed-by: Andy Shevchenko Acked-by: Jarkko Nikula Acked-by: Wolfram Sang Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170210102802.20898-9-hdegoede@redhat.com drivers/i2c/busses/i2c-designware-baytrail.c | 19 +++++++++++++++---- drivers/i2c/busses/i2c-designware-core.h | 2 ++ drivers/i2c/busses/i2c-designware-pcidrv.c | 26 +++++++++++++++++++------- drivers/i2c/busses/i2c-designware-platdrv.c | 2 +- 4 files changed, 37 insertions(+), 12 deletions(-) commit 519e23a7f51e853dbe5dc4abb193c0c0db303b3a Author: Hans de Goede Date: Fri Feb 10 11:27:57 2017 +0100 i2c: designware-baytrail: Fix race when resetting the semaphore Use iosf_mbi_modify instead of iosf_mbi_read + iosf_mbi_write so that we keep the iosf_mbi_lock locked during the read-modify-write done to reset the semaphore. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Acked-by: Jarkko Nikula Acked-by: Wolfram Sang Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170210102802.20898-8-hdegoede@redhat.com drivers/i2c/busses/i2c-designware-baytrail.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 086cb4afef45262806ee5bf26c34244e5867712c Author: Hans de Goede Date: Fri Feb 10 11:27:56 2017 +0100 i2c: designware-baytrail: Disallow the CPU to enter C6 or C7 while holding the punit semaphore On my cherrytrail tablet with axp288 pmic, just doing a bunch of repeated reads from the pmic, e.g. "i2cdump -y 14 0x34" would lookup the tablet in 1 - 3 runs guaranteed. This seems to be causes by the cpu trying to enter C6 or C7 while we hold the punit bus semaphore, at which point everything just hangs. Avoid this by disallowing the CPU to enter C6 or C7 before acquiring the punit bus semaphore. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=109051 Signed-off-by: Hans de Goede Tested-by: Takashi Iwai Reviewed-by: Andy Shevchenko Acked-by: Jarkko Nikula Acked-by: Wolfram Sang Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170210102802.20898-7-hdegoede@redhat.com drivers/i2c/busses/i2c-designware-baytrail.c | 24 ++++++++++++++++++++++-- drivers/i2c/busses/i2c-designware-core.h | 9 +++++++-- drivers/i2c/busses/i2c-designware-platdrv.c | 4 +++- 3 files changed, 32 insertions(+), 5 deletions(-) commit e234ed2f06fad95680710976bcddae91d7fb7af9 Author: Hans de Goede Date: Fri Feb 10 11:27:55 2017 +0100 i2c: designware-baytrail: Only check iosf_mbi_available() for shared hosts If (!shared_host) simply return 0, this avoids delaying the probe if iosf_mbi_available() returns false when an i2c bus is not using the punit semaphore. Also move the if (!iosf_mbi_available()) check to above the dev_info, so that we do not repeat the dev_info on every probe until iosf_mbi_available() returns true. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Acked-by: Jarkko Nikula Tested-by: Takashi Iwai Acked-by: Wolfram Sang Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170210102802.20898-6-hdegoede@redhat.com drivers/i2c/busses/i2c-designware-baytrail.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 62aee937535fcb7c5c23aafe5dfccd977bfe658e Author: Hans de Goede Date: Fri Feb 10 11:27:54 2017 +0100 i2c: designware-baytrail: Pass dw_i2c_dev into helper functions Pass dw_i2c_dev into the helper functions, this is a preparation patch for the punit semaphore fixes done in the other patches in this set. Signed-off-by: Hans de Goede Reviewed-by: Takashi Iwai Tested-by: Takashi Iwai Reviewed-by: Andy Shevchenko Acked-by: Jarkko Nikula Acked-by: Wolfram Sang Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170210102802.20898-5-hdegoede@redhat.com drivers/i2c/busses/i2c-designware-baytrail.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 86524e54025f4ffb0a2e4966ad244424a080329f Author: Hans de Goede Date: Fri Feb 10 11:27:53 2017 +0100 i2c: designware: Rename accessor_flags to flags Rename accessor_flags to flags, so that we can use the field for other flags too. This is a preparation patch for adding cherrytrail support to the punit semaphore code. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Acked-by: Jarkko Nikula Tested-by: Takashi Iwai Acked-by: Wolfram Sang Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170210102802.20898-4-hdegoede@redhat.com drivers/i2c/busses/i2c-designware-core.c | 14 +++++++------- drivers/i2c/busses/i2c-designware-core.h | 2 +- drivers/i2c/busses/i2c-designware-platdrv.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) commit 528e649b5c79683202a0ccd22e33a41e35f81a0b Author: Hans de Goede Date: Fri Feb 24 10:29:02 2017 +0100 x86/platform/intel/iosf_mbi: Add a PMIC bus access notifier Some drivers may need to acquire P-Unit managed resources from interrupt context, where they cannot call iosf_mbi_punit_acquire(). This commit adds a notifier chain which allows a driver to get notified (in a process context) before other drivers start accessing the PMIC bus, so that the driver can acquire any resources, which it may need during the window the other driver is accessing the PMIC, before hand. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=155241 Signed-off-by: Hans de Goede Tested-by: tagorereddy Reviewed-by: Andy Shevchenko Signed-off-by: Daniel Vetter arch/x86/include/asm/iosf_mbi.h | 56 ++++++++++++++++++++++++++++++++++++++ arch/x86/platform/intel/iosf_mbi.c | 36 ++++++++++++++++++++++++ 2 files changed, 92 insertions(+) commit a5509abda48ecfc133fac6268e83fc1a93dba039 Author: Ville Syrjälä Date: Fri Feb 17 17:01:59 2017 +0200 drm/i915: Fix legacy cursor vs. watermarks for ILK-BDW In order to make cursor updates actually safe wrt. watermark programming we have to clear the legacy_cursor_update flag in the atomic state. That will cause the regular atomic update path to do the necessary vblank wait after the plane update if needed, otherwise the vblank wait would be skipped and we'd feed the optimal watermarks to the hardware before the plane update has actually happened. To make the slow vs. fast path determination in intel_legacy_cursor_update() a little simpler we can ignore the actual visibility of the plane (which can only get computed once we've already chosen out path) and instead we simply check whether the fb is being set or cleared by the user. This means a fully clipped but logically visible cursor will be considered visible as far as watermark programming is concerned. We can do that for the cursor since it's a fixed size plane and the clipped size doesn't play a role in the watermark computation. This should fix underruns that can occur when the cursor gets enable/disabled or the size gets changed. Hopefully it's good enough that only pure cursor movement and flips go through unthrottled. Cc: Maarten Lankhorst Cc: Daniel Vetter Cc: Uwe Kleine-König Reported-by: Uwe Kleine-König Fixes: f79f26921ee1 ("drm/i915: Add a cursor hack to allow converting legacy page flip to atomic, v3.") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170217150159.11683-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst Tested-by: Rafael Ristovski drivers/gpu/drm/i915/intel_display.c | 29 ++++++++++++++++++----------- drivers/gpu/drm/i915/intel_pm.c | 20 ++++++++++++-------- 2 files changed, 30 insertions(+), 19 deletions(-) commit 9ce53745edd515ebfc1d5f9bd3ded77dabce27fd Author: Madhav Chauhan Date: Thu Mar 2 00:01:22 2017 +0530 drm/i915/glk: Fix DSI enable I/O sequence One of the if statement covers the next line in enable I/O sequence. This patch correct the same by adding error message. Fixes: 4644848369c0 ("drm/i915/glk: Add MIPIIO Enable/disable sequence") Reported-by: Chris Wilson Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1488393082-30660-1-git-send-email-madhav.chauhan@intel.com drivers/gpu/drm/i915/intel_dsi.c | 1 + 1 file changed, 1 insertion(+) commit 13e867f6faaafe4d7fdaa4a894a061d041d0dc88 Author: Anusha Srivatsa Date: Wed Mar 1 11:58:55 2017 -0800 i915/HuC: Add an extra check for platforms that do not have HUC Return silently without producing much noise on platforms that have a HuC but the firmware is absent. Cc: Ander Conselvan De Oliveira Cc: Rodrigo Vivi Signed-off-by: Anusha Srivatsa Reviewed-by: Ander Conselvan de Oliveira Signed-off-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1488398335-13121-1-git-send-email-anusha.srivatsa@intel.com drivers/gpu/drm/i915/intel_huc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1f58c8e7eac0d4a7a59037dc18dbed2a9b5bd342 Author: Chris Wilson Date: Thu Mar 2 07:41:57 2017 +0000 drm/i915: Restore the invalid access without RPM warning A long time ago we turned off the warning as it was too painful, we had too much broken code. Turn it back on now as we are mostly clean and need to prevent returning to such orangeness. Signed-off-by: Chris Wilson Cc: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/20170302074157.21631-2-chris@chris-wilson.co.uk Reviewed-by: Imre Deak drivers/gpu/drm/i915/intel_drv.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c998e8a0f43a9e73c65f6f3e969805090cf4ac93 Author: Chris Wilson Date: Thu Mar 2 08:30:29 2017 +0000 drm/i915: Hold rpm during GEM suspend in driver unload/suspend i915_gem_suspend() tries to access the device to ensure it is idle and all writes from the device are flushed to memory. It assumed is already held the runtime pm wakeref, but we should explicitly acquire it for our access to be safe. [ 619.926287] WARNING: CPU: 3 PID: 9353 at drivers/gpu/drm/i915/intel_drv.h:1750 gen6_write32+0x23e/0x2a0 [i915] [ 619.926300] RPM wakelock ref not held during HW access [ 619.926311] Modules linked in: vgem x86_pkg_temp_thermal intel_powerclamp snd_hda_codec_hdmi snd_hda_codec_generic snd_hda_codec coretemp snd_hwdep crct10dif_pclmul snd_hda_core crc32_pclmul snd_pcm mei_me mei lpc_ich ghash_clmulni_intel i915(-) sdhci_pci sdhci mmc_core e1000e ptp pps_core prime_numbers [last unloaded: snd_hda_intel] [ 619.926578] CPU: 3 PID: 9353 Comm: drv_module_relo Tainted: G U 4.10.0-CI-Trybot_609+ #1 [ 619.926585] Hardware name: LENOVO 42962WU/42962WU, BIOS 8DET56WW (1.26 ) 12/01/2011 [ 619.926592] Call Trace: [ 619.926609] dump_stack+0x67/0x92 [ 619.926625] __warn+0xc6/0xe0 [ 619.926640] warn_slowpath_fmt+0x4a/0x50 [ 619.926726] gen6_write32+0x23e/0x2a0 [i915] [ 619.926801] gen6_mm_switch+0x38/0x70 [i915] [ 619.926871] i915_switch_context+0xec/0xa10 [i915] [ 619.926942] i915_gem_switch_to_kernel_context+0x13c/0x2b0 [i915] [ 619.927019] i915_gem_suspend+0x2b/0x180 [i915] [ 619.927079] i915_driver_unload+0x22/0x200 [i915] [ 619.927093] ? __this_cpu_preempt_check+0x13/0x20 [ 619.927105] ? trace_hardirqs_on_caller+0xe7/0x200 [ 619.927118] ? trace_hardirqs_on+0xd/0x10 [ 619.927128] ? _raw_spin_unlock_irqrestore+0x3d/0x60 [ 619.927192] i915_pci_remove+0x14/0x20 [i915] [ 619.927205] pci_device_remove+0x34/0xb0 [ 619.927219] device_release_driver_internal+0x158/0x210 [ 619.927234] driver_detach+0x3b/0x80 [ 619.927245] bus_remove_driver+0x53/0xd0 [ 619.927256] driver_unregister+0x27/0x50 [ 619.927267] pci_unregister_driver+0x25/0xa0 [ 619.927351] i915_exit+0x1a/0xb1a [i915] [ 619.927362] SyS_delete_module+0x193/0x1e0 [ 619.927378] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 619.927386] RIP: 0033:0x7f82b46c5d37 [ 619.927393] RSP: 002b:00007ffdb6f610d8 EFLAGS: 00000246 ORIG_RAX: 00000000000000b0 [ 619.927408] RAX: ffffffffffffffda RBX: ffffffff81481ff3 RCX: 00007f82b46c5d37 [ 619.927415] RDX: 0000000000000001 RSI: 0000000000000800 RDI: 000000000224f558 [ 619.927422] RBP: ffffc90001187f88 R08: 0000000000000000 R09: 00007ffdb6f61100 [ 619.927428] R10: 000000000224f4e0 R11: 0000000000000246 R12: 0000000000000000 [ 619.927435] R13: 00007ffdb6f612b0 R14: 0000000000000000 R15: 0000000000000000 [ 619.927451] ? __this_cpu_preempt_check+0x13/0x20 or [ 641.646590] WARNING: CPU: 1 PID: 8913 at drivers/gpu/drm/i915/intel_drv.h:1750 intel_runtime_pm_get_noresume+0x8b/0x90 [i915] [ 641.646595] RPM wakelock ref not held during HW access [ 641.646600] Modules linked in: vgem snd_hda_codec_hdmi snd_hda_codec_generic x86_pkg_temp_thermal intel_powerclamp coretemp snd_hda_codec snd_hwdep crct10dif_pclmul snd_hda_core crc32_pclmul ghash_clmulni_intel snd_pcm mei_me mei i915(-) r8169 mii prime_numbers i2c_hid [last unloaded: snd_hda_intel] [ 641.646825] CPU: 1 PID: 8913 Comm: drv_module_relo Tainted: G U 4.10.0-CI-Trybot_609+ #1 [ 641.646836] Hardware name: TOSHIBA SATELLITE P50-C/06F4 , BIOS 1.20 10/08/2015 [ 641.646843] Call Trace: [ 641.646857] dump_stack+0x67/0x92 [ 641.646869] __warn+0xc6/0xe0 [ 641.646880] warn_slowpath_fmt+0x4a/0x50 [ 641.646893] ? __this_cpu_preempt_check+0x13/0x20 [ 641.646904] ? trace_hardirqs_on_caller+0xe7/0x200 [ 641.646957] intel_runtime_pm_get_noresume+0x8b/0x90 [i915] [ 641.647022] __i915_add_request+0x423/0x540 [i915] [ 641.647080] i915_gem_switch_to_kernel_context+0x148/0x2b0 [i915] [ 641.647145] i915_gem_suspend+0x2b/0x180 [i915] [ 641.647189] i915_driver_unload+0x22/0x200 [i915] [ 641.647200] ? __this_cpu_preempt_check+0x13/0x20 [ 641.647210] ? trace_hardirqs_on_caller+0xe7/0x200 [ 641.647220] ? trace_hardirqs_on+0xd/0x10 [ 641.647231] ? _raw_spin_unlock_irqrestore+0x3d/0x60 [ 641.647276] i915_pci_remove+0x14/0x20 [i915] [ 641.647293] pci_device_remove+0x34/0xb0 [ 641.647307] device_release_driver_internal+0x158/0x210 [ 641.647321] driver_detach+0x3b/0x80 [ 641.647330] bus_remove_driver+0x53/0xd0 [ 641.647338] driver_unregister+0x27/0x50 [ 641.647348] pci_unregister_driver+0x25/0xa0 [ 641.647415] i915_exit+0x1a/0xb1a [i915] [ 641.647429] SyS_delete_module+0x193/0x1e0 [ 641.647444] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 641.647453] RIP: 0033:0x7fc622bd2d37 [ 641.647463] RSP: 002b:00007ffff8ffb5c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000b0 [ 641.647475] RAX: ffffffffffffffda RBX: ffffffff81481ff3 RCX: 00007fc622bd2d37 [ 641.647480] RDX: 0000000000000001 RSI: 0000000000000800 RDI: 0000000000d49118 [ 641.647485] RBP: ffffc90000997f88 R08: 0000000000000000 R09: 00007ffff8ffb5f0 [ 641.647491] R10: 0000000000d490a0 R11: 0000000000000246 R12: 0000000000000000 [ 641.647498] R13: 00007ffff8ffb7a0 R14: 0000000000000000 R15: 0000000000000000 [ 641.647510] ? __this_cpu_preempt_check+0x13/0x20 v2: Keep holding rpm until the end to cover i915_gem_sanitize() as well. Fixes: 5ab57c702069 ("drm/i915: Flush logical context image out to memory upon suspend") Fixes: 1c777c5d1dc ("drm/i915/hsw: Fix GPU hang during resume from S3-devices state") Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170302083029.19576-1-chris@chris-wilson.co.uk Reviewed-by: Imre Deak Cc: # v4.9+ drivers/gpu/drm/i915/i915_gem.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit a746095c2db08d765222bf0058e76fb329d69e0e Author: Ander Conselvan de Oliveira Date: Wed Mar 1 16:13:11 2017 +0200 drm/i915: Enable DDI IO power domains in the DP MST path Commit 62b695662a24 ("drm/i915: Only enable DDI IO power domains after enabling DPLL") changed how the DDI IO power domains get enabled, but neglected the need to enable those domains when enabling a DP connector with MST enabled, leading to Kernel panic - not syncing: Timeout: Not all CPUs entered broadcast exception handler Fixes: 62b695662a24 ("drm/i915: Only enable DDI IO power domains after enabling DPLL") Cc: Imre Deak Cc: Ander Conselvan de Oliveira Cc: David Weinehall Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: Ville Syrjälä Reported-by: Ville Syrjälä Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/20170301141318.3607-2-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_dp_mst.c | 3 +++ 1 file changed, 3 insertions(+) commit afc1ebf4562a14b8a981a0de2a3aa063dbd4c5b2 Author: Daniel Vetter Date: Wed Mar 1 18:17:49 2017 +0100 Revert "drm/i915: Implement Link Rate fallback on Link training failure" This reverts commit 233ce881dd91fb13eb6b09deefae33168e6ead4c. I assumed it's ok, but really should have double-checked - CI caught tons of fail :( Cc: Jani Nikula Cc: Manasi Navare Acked-by: Manasi Navare Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170301171749.13053-1-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/intel_dp.c | 27 --------------------------- drivers/gpu/drm/i915/intel_dp_link_training.c | 22 ++-------------------- drivers/gpu/drm/i915/intel_drv.h | 3 --- 3 files changed, 2 insertions(+), 50 deletions(-) commit 0f3bbe074dd179dfbdaabcc601086bc4f6ab885b Author: Maxime Ripard Date: Tue Feb 28 16:36:51 2017 +0100 drm/fb-helper: implement ioctl FBIO_WAITFORVSYNC Implement legacy framebuffer ioctl FBIO_WAITFORVSYNC in the generic framebuffer emulation driver. Legacy framebuffer users like non kms/drm based OpenGL(ES)/EGL implementations may require the ioctl to synchronize drawing or buffer flip for double buffering. It is tested on the i.MX6. Signed-off-by: Maxime Ripard Tested-by: Neil Armstrong Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_fb_helper.c | 68 +++++++++++++++++++++++++++++++++++++++++ include/drm/drm_fb_helper.h | 12 +++++++- 2 files changed, 79 insertions(+), 1 deletion(-) commit 35f5022fbe9b05ea7ab479f299dc1b63b0ceb8c6 Author: Gabriel Krisman Bertazi Date: Wed Mar 1 16:01:05 2017 -0300 drm: Update drm_fbdev_cma_init documentation Commit be7f735cd5ea ("drm: Rely on mode_config data for fb_helper initialization") dropped the num_crtc argument. Update the documentation to reflect that and prevent the kernel-doc warnings below: ./drivers/gpu/drm/drm_fb_cma_helper.c:557: warning: Excess function parameter 'num_crtc' description in 'drm_fbdev_cma_init' ./drivers/gpu/drm/drm_fb_cma_helper.c:558: warning: Excess function parameter 'num_crtc' description in 'drm_fbdev_cma_init' Fixes: be7f735cd5ea ("drm: Rely on mode_config data for fb_helper initialization") Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/87o9xkvn2m.fsf@dilma.collabora.co.uk drivers/gpu/drm/drm_fb_cma_helper.c | 1 - 1 file changed, 1 deletion(-) commit 02e012f1727f9c8fe24872c74d91019e35e5897b Author: Chris Wilson Date: Wed Mar 1 12:11:31 2017 +0000 drm/i915: Move w/a LRI debug message from context-init to driver load The spam of every context initialisation saying the same thing is annoying me! Move the information to the setup of the engine. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170301121131.11588-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_engine_cs.c | 38 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 80a9a059d4e4670bc7fbd6a10618feba93144911 Author: Chris Zhong Date: Mon Feb 20 16:02:23 2017 +0800 drm/rockchip/dsi: add dw-mipi power domain support Reference the power domain incase dw-mipi power down when in use. Signed-off-by: Chris Zhong Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1487577744-2855-8-git-send-email-zyw@rock-chips.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit ad1c974bf19ca5481ac5dfee01c9c8f14b91d5c3 Author: Chris Zhong Date: Mon Feb 20 16:02:22 2017 +0800 drm/rockchip/dsi: fix insufficient bandwidth of some panel Set the lanes bps to 1 / 0.9 times of pclk, the margin is not enough for some panel, it will cause the screen display is not normal, so increases the badnwidth to 1 / 0.8. Signed-off-by: Chris Zhong Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1487577744-2855-7-git-send-email-zyw@rock-chips.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7df1207f3bc6b242404fa164f61092c7d57795c6 Author: Chris Zhong Date: Mon Feb 20 16:02:21 2017 +0800 dt-bindings: add power domain node for dw-mipi-rockchip Signed-off-by: Chris Zhong Acked-by: Rob Herring Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1487577744-2855-6-git-send-email-zyw@rock-chips.com .../devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt | 3 +++ 1 file changed, 3 insertions(+) commit 975f4aa24fdb5459d24733c3154d286d5438d47c Author: Chris Zhong Date: Mon Feb 20 16:02:20 2017 +0800 drm/rockchip/dsi: remove mode_valid function The MIPI DSI do not need check the validity of resolution, the max resolution should depend VOP. Hence, remove rk3288_mipi_dsi_mode_valid here. Signed-off-by: Chris Zhong Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1487577744-2855-5-git-send-email-zyw@rock-chips.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 39 ---------------------------------- 1 file changed, 39 deletions(-) commit a432e05405f5b5df9676fe797822a41b7611c2bd Author: Chris Zhong Date: Mon Feb 20 16:02:19 2017 +0800 drm/rockchip/dsi: dw-mipi: correct the coding style correct the coding style, according the checkpatch scripts Signed-off-by: Chris Zhong Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1487577744-2855-4-git-send-email-zyw@rock-chips.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit ef6eba19927c72c8168db6ef73b1c9a424b4b660 Author: Chris Zhong Date: Mon Feb 20 16:02:18 2017 +0800 drm/rockchip/dsi: dw-mipi: support RK3399 mipi dsi The vopb/vopl switch register of RK3399 mipi is different from RK3288, the default setting for mipi dsi mode is different too, so add a of_device_id structure to distinguish them, and make sure set the correct mode before mipi phy init. Signed-off-by: Chris Zhong Signed-off-by: Mark Yao Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1487577744-2855-3-git-send-email-zyw@rock-chips.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 72 +++++++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 10 deletions(-) commit 7fea5243d1ae912285b7caea81d756ff18f2bcaa Author: Chris Zhong Date: Mon Feb 20 16:02:17 2017 +0800 dt-bindings: add rk3399 support for dw-mipi-rockchip The dw-mipi-dsi of rk3399 is almost the same as rk3288, the rk3399 has additional phy config clock. Signed-off-by: Chris Zhong Acked-by: Rob Herring Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1487577744-2855-2-git-send-email-zyw@rock-chips.com .../devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f3b7a5b83896cb11deecab6aa30c5f53e19a83d5 Author: John Keeping Date: Fri Feb 24 12:55:06 2017 +0000 drm/rockchip: dw-mipi-dsi: add reset control In order to fully reset the state of the MIPI controller we must assert this reset. This is slightly more complicated than it could be in order to maintain compatibility with device trees that do not specify the reset property. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-24-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 03a5832c0ed8086fa0726d7160e936f71eccc25b Author: John Keeping Date: Fri Feb 24 12:55:05 2017 +0000 drm/rockchip: dw-mipi-dsi: support non-burst modes Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-23-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 2f8f2d29912885778ca198da682935748e42f0d6 Author: John Keeping Date: Fri Feb 24 12:55:04 2017 +0000 drm/rockchip: dw-mipi-dsi: defer probe if panel is not loaded This ensures that the output resolution is known before fbcon loads. mipi_dsi_host_register() is moved above dw_mipi_dsi_register() to simplify error cleanup since the order of these operations does not matter. Signed-off-by: John Keeping Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-22-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit d790ad03ed3432839151bc54c611ec87df8bf896 Author: John Keeping Date: Fri Feb 24 12:55:03 2017 +0000 drm/rockchip: vop: test for P{H,V}SYNC When connected to the MIPI DSI output, we need to use N{H,V}SYNC for the internal connection but these flags are meaningless for DSI panels. Switch the test so that we do not set the P{H,V}SYNC bits unless the mode requires it. Signed-off-by: John Keeping Reviewed-by: Mark Yao Reviewed-by: Sean Paul [seanpaul resolved conflict using macros instead of hardcoded values] Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-21-john@metanate.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2b0c4b70b1a4f6ad1810b62057b0d8208c3c65a8 Author: John Keeping Date: Fri Feb 24 12:55:02 2017 +0000 drm/rockchip: dw-mipi-dsi: use positive check for N{H, V}SYNC This matches other drivers. Signed-off-by: John Keeping Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-20-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4413697141d6f08f9924afaee9dacc4de164fe92 Author: John Keeping Date: Fri Feb 24 12:55:01 2017 +0000 drm/rockchip: dw-mipi-dsi: use specific poll helper As the documentation for readx_poll_timeout says, we want to use the specialized macro for readl rather than using the generic version directly. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-19-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b0a45fec5974f84aff7c249f7da6674f81b61bf6 Author: John Keeping Date: Fri Feb 24 12:55:00 2017 +0000 drm/rockchip: dw-mipi-dsi: improve PLL configuration The multiplication ratio for the PLL is required to be even due to the use of a "by 2 pre-scaler". Currently we are likely to end up with an odd multiplier even though there is an equivalent set of parameters with an even multiplier. For example, using the 324MHz bit rate with a reference clock of 24MHz we end up with M = 27, N = 2 whereas the example in the PHY databook gives M = 54, N = 4 for this bit rate and reference clock. By walking down through the available multiplier instead of up we are more likely to hit an even multiplier. With the above example we do now get M = 54, N = 4 as given by the databook. While doing this, change the loop limits to encode the actual limits on the divisor, which are: 40MHz >= (pllref / N) >= 5MHz Signed-off-by: John Keeping Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-18-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 3fdfb4f170df4d113a3b6663ebf115e10601d0e9 Author: John Keeping Date: Fri Feb 24 12:54:59 2017 +0000 drm/rockchip: dw-mipi-dsi: properly configure PHY timing These values are specified as constant time periods but the PHY configuration is in terms of the current lane byte clock so using constant values guarantees that the timings will be outside the specification with some display configurations. Derive the necessary configuration from the byte clock in order to ensure that the PHY configuration is correct. Signed-off-by: John Keeping Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-17-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 35 ++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) commit d969c1553c41c5d5a0d88268aa65f4e77130a5dd Author: John Keeping Date: Fri Feb 24 12:54:58 2017 +0000 drm/rockchip: dw-mipi-dsi: configure PHY before enabling The bias, bandgap and PLL should all be configured before we enable them. Signed-off-by: John Keeping Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-16-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit efe83cee34472c787df7a0a0ef66967f6096bef5 Author: John Keeping Date: Fri Feb 24 12:54:57 2017 +0000 drm/rockchip: dw-mipi-dsi: ensure PHY is reset Also don't power up the DSI host at this point since this is not necessary in order to configure the PHY and we do so later when selecting video or command mode. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-15-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1bef24bae2ed4d9eabc5cde33e293b2fe95796ef Author: John Keeping Date: Fri Feb 24 12:54:56 2017 +0000 drm/rockchip: dw-mipi-dsi: fix escape clock rate This clock rate is derived from the PHY PLL, so it should be calculated dynamically. This calculation is the same as that used by the vendor kernel and ensures that the escape clock runs at <20MHz as required by the MIPI specification. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-14-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 96ad6f0b8d7ec1d35dc3df87947e840b6a738380 Author: John Keeping Date: Fri Feb 24 12:54:55 2017 +0000 drm/rockchip: dw-mipi-dsi: allow commands in panel_disable Panel drivers may want to sent commands during the disable function, for example MIPI_DCS_SET_DISPLAY_OFF before the video signal ends. In order to send commands we need to write to registers, so pclk must be enabled. While changing this, remove the unnecessary code after the panel unprepare call which seems to be a workaround for a specific panel and thus belongs in the panel driver. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-13-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 8a7df73ff97d8b373c132b71a15960402526aa8a Author: John Keeping Date: Fri Feb 24 12:54:54 2017 +0000 drm/rockchip: dw-mipi-dsi: prepare panel after phy init Some panels need to be configured with commands sent over the MIPI link, which they will do in the prepare hook. Call this after the PHY has been initialized so that we are able to send commands to the panel. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-12-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1ed498b03d3e999dd270815a2f18f0b81998b83f Author: John Keeping Date: Fri Feb 24 12:54:53 2017 +0000 drm/rockchip: dw-mipi-dsi: don't assume buffer is aligned By dereferencing the MIPI command buffer as a u32* we rely on it being correctly aligned on ARM, but this may not be the case. Copy it into a stack variable that will be correctly aligned. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-11-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 7361c6f82940db147e6bbfd3ae2b8359d1004020 Author: John Keeping Date: Fri Feb 24 12:54:52 2017 +0000 drm/rockchip: dw-mipi-dsi: only request HS clock when required Requesting the HS clock from the PHY before we initialize it causes an invalid signal to be sent out since the input clock is not yet configured. The PHY databook suggests only asserting this signal when performing HS transfers, so let's do that. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-10-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 52c66e4f6e28f37239f21ed1b79c341d33f49655 Author: John Keeping Date: Fri Feb 24 12:54:51 2017 +0000 drm/rockchip: dw-mipi-dsi: respect message flags Instead of always sending commands in LP mode, respect the MIPI_DSI_MSG_USE_LPM flag to decide how to send each message. Also request acks if MIPI_DSI_MSG_REQ_ACK is set. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-9-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 028316fb6fe9c042fa2ab90e768d7733edfbaa89 Author: John Keeping Date: Fri Feb 24 12:54:50 2017 +0000 drm/rockchip: dw-mipi-dsi: include bad value in error message As an aid to debugging. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-8-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dad17ed01e81c1d697b98632ea126d95e2a1e8d4 Author: John Keeping Date: Fri Feb 24 12:54:49 2017 +0000 drm/rockchip: dw-mipi-dsi: avoid out-of-bounds read on tx_buf As a side-effect of this, encode the endianness explicitly rather than casting a u16. Signed-off-by: John Keeping Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-7-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 480564a033360779dd8494e918c7586ff72c395b Author: John Keeping Date: Fri Feb 24 12:54:48 2017 +0000 drm/rockchip: dw-mipi-dsi: fix generic packet status check We want to check that both the GEN_CMD_EMPTY and GEN_PLD_W_EMPTY bits are set so we can't just check "val & mask" because that will be true if either bit is set. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-6-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d3852c212dffdb98fb8e8b8ff876fcaa61b33307 Author: John Keeping Date: Fri Feb 24 12:54:47 2017 +0000 drm/rockchip: dw-mipi-dsi: fix command header writes In a couple of places here we use "val" for the value that is about to be written to a register but then reuse the same variable for the value of a status register before we get around to writing it. Rename the value to be written to so that we write the value we intend to and not what we have just read from the status register. Signed-off-by: John Keeping Tested-by: Chris Zhong Reviewed-by: Chris Zhong Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-5-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 2ba0f4a4c3494daa682e5f67bf279b051a906990 Author: John Keeping Date: Fri Feb 24 12:54:46 2017 +0000 drm/rockchip: dw-mipi-dsi: remove mode_set hook This is not needed since we can access the mode via the CRTC from the enable hook. Also remove the "mode" field that is no longer used. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-4-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 0f2c3ad54a4ae2d437242eb61412385f99ebfc2b Author: John Keeping Date: Fri Feb 24 12:54:45 2017 +0000 drm/rockchip: dw-mipi-dsi: pass mode in where needed This shows that we only use the mode from the enable function and prepares us to remove the "mode" field and the mode_set hook in the next commit. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-3-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 41 ++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 19 deletions(-) commit 5e408d7a28513ffa4a4fdab77f917a1123851cf7 Author: John Keeping Date: Fri Feb 24 12:54:44 2017 +0000 drm/rockchip: dw-mipi-dsi: don't configure hardware in mode_set for MIPI With atomic modesetting the hardware will be powered off when the mode_set function is called. We should configure the hardware in the enable function, which is the atomic version of "commit" so let's use the enable hook rather than commit while we're at it. Signed-off-by: John Keeping Reviewed-by: Sean Paul Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-2-john@metanate.com drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 49 +++++++++++++++------------------- 1 file changed, 21 insertions(+), 28 deletions(-) commit dd689287b977597a46adf8c3de19d40212f0ea9f Author: Chris Wilson Date: Wed Mar 1 15:41:28 2017 +0000 drm/i915: Prevent concurrent tiling/framebuffer modifications Reintroduce a lock around tiling vs framebuffer creation to prevent modification of the obj->tiling_and_stride whilst the framebuffer is being created. Rather than use struct_mutex once again, use the per-object lock - this will also be required in future to prevent changing the tiling whilst submitting rendering. Reported-by: Ville Syrjälä Fixes: 24dbf51a5517 ("drm/i915: struct_mutex is not required for allocating the framebuffer") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170301154128.2841-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_object.h | 18 +++++++++++++++++- drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +- drivers/gpu/drm/i915/i915_gem_tiling.c | 9 ++++++++- drivers/gpu/drm/i915/intel_display.c | 25 ++++++++++++++++--------- 4 files changed, 42 insertions(+), 12 deletions(-) commit 9aceb5c15d84d4b960f5f80fba846c753554d092 Author: Chris Wilson Date: Wed Mar 1 15:41:27 2017 +0000 drm/i915: Fix all intel_framebuffer_init failures to take the error path No more direct return -EINVAL as we have to unwind the obj->framebuffer_references. Fixes: 24dbf51a5517 ("drm/i915: struct_mutex is not required for allocating the framebuffer") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170301154128.2841-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_display.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 4f95963558d4ed0019938b5410a3402700a1bc4c Author: Dmitry Torokhov Date: Tue Feb 28 11:56:20 2017 -0800 Input: ad7879 - do not manipulate capability bits directly Instead of manipulating capabilities bits of input device directly, let's use input_set_capability() API. Also, stop setting ABS_X/Y bits explicitly as input_set_abs_params() does this for us. Acked-by: Michael Hennerich Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ad7879.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 3a97c3d16b9e087a1741c527ecd8cbb4039d609f Author: Dmitry Torokhov Date: Tue Feb 28 11:50:56 2017 -0800 Input: ad7879 - try parsing properties on non-DT systems We have switched the driver to use generic device properties API, so there is no need to check for presence of DT node before trying parse properties. Acked-by: Michael Hennerich Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ad7879.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4e34025b340174e220646d82a3e81641fc02f42b Author: Dmitry Torokhov Date: Tue Feb 28 11:43:52 2017 -0800 Input: ad7879 - return plain error code from ad7879_probe() With the switch to devm, there is no need for ad7879_probe() to return the touchscreen structure, we can use plain error code. This also fixes issue introduced with devm concersion, where we returned 0 on success (which worked OK since IS_ERR(0) would not trigger, but was not correct regardless). Fixes: 381f688eee3d ("Input: ad7879 - use more devm interfaces") Acked-by: Michael Hennerich Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ad7879-i2c.c | 9 ++------- drivers/input/touchscreen/ad7879-spi.c | 7 +------ drivers/input/touchscreen/ad7879.c | 28 ++++++++++++++-------------- drivers/input/touchscreen/ad7879.h | 5 ++--- 4 files changed, 19 insertions(+), 30 deletions(-) commit af160c542e40c133b12b18d9dddd4fc555611ef1 Author: Dmitry Torokhov Date: Tue Feb 28 13:57:21 2017 -0800 Input: ad7879 - make sure we set up drvdata The conversion to devm accidentally removed setting up of I2C client data upon successful probe of the touchscreen. Let's move this setting into the core, so we do not forger about it again. Fixes: 381f688eee3d ("Input: ad7879 - use more devm interfaces") Acked-by: Michael Hennerich Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ad7879-spi.c | 2 -- drivers/input/touchscreen/ad7879.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit 233ce881dd91fb13eb6b09deefae33168e6ead4c Author: Manasi Navare Date: Fri Dec 16 12:29:07 2016 +0200 drm/i915: Implement Link Rate fallback on Link training failure If link training at a link rate optimal for a particular mode fails during modeset's atomic commit phase, then we let the modeset complete and then retry. We save the link rate value at which link training failed, update the link status property to "BAD" and use a lower link rate to prune the modes. It will redo the modeset on the current mode at lower link rate or if the current mode gets pruned due to lower link constraints then, it will send a hotplug uevent for userspace to handle it. This is also required to pass DP CTS tests 4.3.1.3, 4.3.1.4, 4.3.1.6. v9: * Use the trimmed max values of link rate/lane count based on link train fallback (Daniel Vetter) v8: * Set link_status to BAD first and then call mode_valid (Jani Nikula) v7: Remove the redundant variable in previous patch itself v6: * Obtain link rate index from fallback_link_rate using the helper intel_dp_link_rate_index (Jani Nikula) * Include fallback within intel_dp_start_link_train (Jani Nikula) v5: * Move set link status to drm core (Daniel Vetter, Jani Nikula) v4: * Add fallback support for non DDI platforms too * Set connector->link status inside set_link_status function (Jani Nikula) v3: * Set link status property to BAd unconditionally (Jani Nikula) * Dont use two separate variables link_train_failed and link_status to indicate same thing (Jani Nikula) v2: * Squashed a few patches (Jani Nikula) Acked-by: Tony Cheng Acked-by: Harry Wentland Cc: Jani Nikula Cc: Daniel Vetter Cc: Ville Syrjala Signed-off-by: Manasi Navare Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/d796cc0c2814d668a47ef43c464f9a4089d46d64.1481883920.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_dp.c | 27 +++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_dp_link_training.c | 22 ++++++++++++++++++++-- drivers/gpu/drm/i915/intel_drv.h | 3 +++ 3 files changed, 50 insertions(+), 2 deletions(-) commit 41232c1b7405666e74cfab74168864bb86ef21ae Author: Manasi Navare Date: Wed Mar 1 06:45:10 2017 -0800 drm: Fix the kernel doc warning for drm_link_status This fixes the kernel doc warning that was introduced in the 'commit 40ee6fbef75fe6 ("drm: Add a new connector atomic property for link status")'. Description has been added for the enum values. Signed-off-by: Manasi Navare Cc: Jani Nikula Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1488379510-15059-1-git-send-email-manasi.d.navare@intel.com include/drm/drm_connector.h | 5 +++++ 1 file changed, 5 insertions(+) commit 81895b54093af47549d572608677c624972055da Author: Noralf Trønnes Date: Thu Jan 26 23:56:11 2017 +0100 drm/msm: Remove drm_debugfs_remove_files() calls drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so it's not necessary to call drm_debugfs_remove_files(). Additionally it uses debugfs_remove_recursive() to clean up the debugfs files, so no need to do that. Cc: robdclark@gmail.com Signed-off-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-10-noralf@tronnes.org drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 7 ------- drivers/gpu/drm/msm/msm_debugfs.c | 2 -- drivers/gpu/drm/msm/msm_perf.c | 29 +++-------------------------- drivers/gpu/drm/msm/msm_rd.c | 31 +++---------------------------- 4 files changed, 6 insertions(+), 63 deletions(-) commit b05eeb0f47a3f9f2530f1c46b11dacfa0ca71876 Author: Noralf Trønnes Date: Thu Jan 26 23:56:21 2017 +0100 drm/i915: Remove i915_debugfs_unregister() drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so no need to do this explicitly. Additionally it uses debugfs_remove_recursive() to clean up the debugfs files, so no need for adding fake drm_info_node entries. Cc: daniel.vetter@intel.com Cc: jani.nikula@linux.intel.com Signed-off-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-20-noralf@tronnes.org drivers/gpu/drm/i915/i915_debugfs.c | 97 +++++------------------------------ drivers/gpu/drm/i915/i915_drv.c | 1 - drivers/gpu/drm/i915/i915_drv.h | 2 - drivers/gpu/drm/i915/intel_drv.h | 1 - drivers/gpu/drm/i915/intel_pipe_crc.c | 68 ++++-------------------- 5 files changed, 23 insertions(+), 146 deletions(-) commit cc14d46ba1cf21d2f1163add493e07ffbe0e222b Author: Noralf Trønnes Date: Thu Jan 26 23:56:20 2017 +0100 drm/qxl: Remove qxl_debugfs_takedown() drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so the drm_driver.debugfs_cleanup callback is not needed. Cc: airlied@linux.ie Cc: kraxel@redhat.com Signed-off-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-19-noralf@tronnes.org drivers/gpu/drm/qxl/qxl_debugfs.c | 9 --------- drivers/gpu/drm/qxl/qxl_drv.c | 1 - drivers/gpu/drm/qxl/qxl_drv.h | 1 - 3 files changed, 11 deletions(-) commit e663112e27807b10cbb7769c89462faff8da06a9 Author: Noralf Trønnes Date: Thu Jan 26 23:56:19 2017 +0100 drm/virtio: Remove virtio_gpu_debugfs_takedown() drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so the drm_driver.debugfs_cleanup callback is not needed. Cc: airlied@linux.ie Cc: kraxel@redhat.com Signed-off-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-18-noralf@tronnes.org drivers/gpu/drm/virtio/virtgpu_debugfs.c | 8 -------- drivers/gpu/drm/virtio/virtgpu_drv.c | 1 - drivers/gpu/drm/virtio/virtgpu_drv.h | 1 - 3 files changed, 10 deletions(-) commit 1a54082a950c969cb3234167f788af99e2062f29 Author: Noralf Trønnes Date: Thu Jan 26 23:56:12 2017 +0100 drm/nouveau: Remove nouveau_drm_debugfs_cleanup() drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so the drm_driver.debugfs_cleanup callback is not needed. Additionally it uses debugfs_remove_recursive() to clean up the debugfs files, so no need for adding fake drm_info_node entries. Cc: bskeggs@redhat.com Signed-off-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-11-noralf@tronnes.org drivers/gpu/drm/nouveau/nouveau_debugfs.c | 62 ++++++------------------------- drivers/gpu/drm/nouveau/nouveau_debugfs.h | 6 --- drivers/gpu/drm/nouveau/nouveau_drm.c | 1 - 3 files changed, 12 insertions(+), 57 deletions(-) commit b516a6c9549a99907940bd070a8244f716c23733 Author: Noralf Trønnes Date: Thu Jan 26 23:56:07 2017 +0100 drm/armada: Remove armada_drm_debugfs_cleanup() drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so no need to do this explicitly. Additionally it uses debugfs_remove_recursive() to clean up the debugfs files, so no need for adding fake drm_info_node entries. And finally there's no need to clean up on error, drm_debugfs_cleanup() is called in the error path. Cc: linux@armlinux.org.uk Signed-off-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-6-noralf@tronnes.org drivers/gpu/drm/armada/armada_debugfs.c | 65 +++++---------------------------- drivers/gpu/drm/armada/armada_drm.h | 1 - drivers/gpu/drm/armada/armada_drv.c | 3 -- 3 files changed, 10 insertions(+), 59 deletions(-) commit 25b4620ee822d5f3c2deb3f1358e82763578788f Author: Hans de Goede Date: Wed Mar 1 15:15:06 2017 +0200 drm/i915/dsi: Skip delays for v3 VBTs in vid-mode For v3 VBTs in vid-mode the delays are part of the VBT sequences, so we should not also delay ourselves otherwise we get double delays. Signed-off-by: Hans de Goede Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-11-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 38dec5c0892a4c475d9ac89fea25f8a84e17a464 Author: Hans de Goede Date: Wed Mar 1 15:15:05 2017 +0200 drm/i915/dsi: Call MIPI_SEQ_TEAR_ON and DISPLAY_ON for cmd-mode (untested) According to the spec we should call MIPI_SEQ_TEAR_ON and DISPLAY_ON on enable for cmd-mode, just like we already call their counterparts on disable. Note: untested, my panel is a vid-mode panel. Signed-off-by: Hans de Goede Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-10-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 2 ++ 1 file changed, 2 insertions(+) commit 7108b436c2b53cf5d9c3a90139973bdee95898c8 Author: Hans de Goede Date: Wed Mar 1 15:15:04 2017 +0200 drm/i915/dsi: Execute MIPI_SEQ_TEAR_OFF from intel_dsi_post_disable For v3+ VBTs we should call MIPI_SEQ_TEAR_OFF before MIPI_SEQ_DISPLAY_OFF, v2 VBTs do not have MIPI_SEQ_TEAR_OFF so there this is a nop. Signed-off-by: Hans de Goede Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-9-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 2 ++ 1 file changed, 2 insertions(+) commit 398314516446ad12959e29556a3bafb6534a1065 Author: Hans de Goede Date: Wed Mar 1 15:15:03 2017 +0200 drm/i915/dsi: Document always using v3 SHUTDOWN / MIPI_SEQ_DISPLAY_OFF order According to the spec for v2 VBTs we should call MIPI_SEQ_DISPLAY_OFF before sending SHUTDOWN, where as for v3 VBTs we should send SHUTDOWN first. Since the v2 order has known issues, we use the v3 order everywhere, add a comment documenting this. Signed-off-by: Hans de Goede Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-8-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 5 +++++ 1 file changed, 5 insertions(+) commit f5bce6df8868668d547c5757d9da70471ea40e50 Author: Hans de Goede Date: Wed Mar 1 15:15:02 2017 +0200 drm/i915/dsi: Group MIPI_SEQ_BACKLIGHT_ON/OFF with panel_[en|dis]able_backlight Execute the MIPI_SEQ_BACKLIGHT_ON/OFF VBT sequences at the same time as we call intel_panel_enable_backlight() / intel_panel_disable_backlight(). Signed-off-by: Hans de Goede Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-7-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3e40fa8a3168da060e3835a17cf1ada5a837ddd6 Author: Hans de Goede Date: Wed Mar 1 15:15:01 2017 +0200 drm/i915/dsi: Execute MIPI_SEQ_DEASSERT_RESET before calling device_ready() Execute MIPI_SEQ_DEASSERT_RESET before putting the device in ready state (LP-11), this is the sequence in which things should be done according to the spec. Signed-off-by: Hans de Goede Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-6-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit deae2006a3a8d71ebf2b07a9f8621cfda0b3b6e7 Author: Hans de Goede Date: Wed Mar 1 15:15:00 2017 +0200 drm/i915/dsi: Group DPOunit clock gate workaround with PLL enable Move the DPOunit clock gate workaround to directly after the PLL enable. The exact location of the workaround does not matter and there are 2 reasons to group it with the PLL enable: 1) This moves it out of the middle of the init sequence from the spec, making it easier to follow the init sequence / compare it to the spec 2) It is grouped with the pll disable call in intel_dsi_post_disable, so for consistency it should be grouped with the pll enable in intel_dsi_pre_enable Signed-off-by: Hans de Goede Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-5-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit c7dc5275bcbda8bff2acfad98a08964017644186 Author: Hans de Goede Date: Wed Mar 1 15:14:59 2017 +0200 drm/i915/dsi: Move MIPI_SEQ_POWER_ON/OFF calls together with pmic gpio calls Now that we are no longer bound to the drm_panel_ callbacks, call MIPI_SEQ_POWER_ON/OFF at the proper place. Signed-off-by: Hans de Goede Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-4-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 19c17df3cb5e6a7f4cc2b8df63a9409c12c5a610 Author: Hans de Goede Date: Wed Mar 1 15:14:58 2017 +0200 drm/i915/dsi: Drop bogus MIPI_SEQ_ASSERT_RESET before POWER_ON intel_dsi_post_disable(), which does the MIPI_SEQ_ASSERT_RESET, will always be called at some point before intel_dsi_pre_enable() making the MIPI_SEQ_ASSERT_RESET in intel_dsi_pre_enable() redundant. In addition, calling MIPI_SEQ_ASSERT_RESET in the enable path goes against the VBT spec. Signed-off-by: Hans de Goede Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-3-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 1 - 1 file changed, 1 deletion(-) commit 249f6962353117de4f98654b416f581f4216013c Author: Hans de Goede Date: Wed Mar 1 15:14:57 2017 +0200 drm/i915/dsi: Document the panel enable / disable sequences from the spec Document the DSI panel enable / disable sequences from the spec, for easy comparison between the code and the spec. Signed-off-by: Hans de Goede Acked-by: Jani Nikula Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1488374106-4949-2-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit ad2fca0721d1376c1689d909fdfcf5d7e240dac7 Author: Hauke Mehrtens Date: Mon Feb 27 23:21:25 2017 +0100 spi: lantiq-ssc: add LTQ_ prefix to defines The blackfin architecture has a SPI_STAT define which conflicts with the define from the spi-lantiq-ssc driver in compile test mode. Fix this by adding a prefix in front of every define. Reported-by: kbuild test robot Signed-off-by: Hauke Mehrtens Signed-off-by: Mark Brown drivers/spi/spi-lantiq-ssc.c | 437 ++++++++++++++++++++++--------------------- 1 file changed, 222 insertions(+), 215 deletions(-) commit 9160095c0e89a4fd58b74b64645b0ceaf11d119c Author: Jani Nikula Date: Tue Feb 28 13:11:43 2017 +0200 drm/i915: use BUILD_BUG_ON to ensure platform name has been set up Leave the runtime check in place in case the platform variable itself comes from bogus sources. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1488280303-9323-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_device_info.c | 2 ++ 2 files changed, 3 insertions(+) commit 0129936ddda26afd5d9d207c4e86b2425952579f Author: Imre Deak Date: Fri Feb 24 16:32:10 2017 +0200 drm/i915/gen9: Increase PCODE request timeout to 50ms After commit 2c7d0602c815277f7cb7c932b091288710d8aba7 Author: Imre Deak Date: Mon Dec 5 18:27:37 2016 +0200 drm/i915/gen9: Fix PCODE polling during CDCLK change notification there is still one report of the CDCLK-change request timing out on a KBL machine, see the Reference link. On that machine the maximum time the request took to succeed was 34ms, so increase the timeout to 50ms. v2: - Change timeout from 100 to 50 ms to maintain the current 50 ms limit for atomic waits in the driver. (Chris, Tvrtko) Reference: https://bugs.freedesktop.org/show_bug.cgi?id=99345 Cc: Ville Syrjälä Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Signed-off-by: Imre Deak Acked-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1487946730-17162-1-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_pm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 4644848369c0c06352e9ba3bad830c9dd7281380 Author: Deepak M Date: Wed Mar 1 12:51:33 2017 +0530 drm/i915/glk: Add MIPIIO Enable/disable sequence v2: Addressed Jani's Review comments(renamed bit field macros) v3: Jani's Review comment for aligning code to platforms and added wrapper functions. v4: Corrected enable/disable seuqence as per BSPEC v5: Corrected waiting twice for same bit (Review comments: Jani) v6: Rebased to Han's patches(dsi restructuring code) Signed-off-by: Deepak M Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1488352893-29916-2-git-send-email-madhav.chauhan@intel.com drivers/gpu/drm/i915/intel_dsi.c | 206 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 195 insertions(+), 11 deletions(-) commit f4c3a88e5f044e0200cd4b03a4d86cd6b6306ec4 Author: Chris Wilson Date: Tue Feb 28 14:55:19 2017 +0000 drm/i915: Tighten mmio arrays for MIPI_PORT drivers/gpu/drm/i915/intel_dsi.c: In function ‘intel_dsi_prepare’: drivers/gpu/drm/i915/intel_dsi.c:1308:1: error: the frame size of 2488 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] which is caused by the compiling expanding every _MIPI_PORT into an on-stack array of u32[3] at every callsite. Not sure why only one machine/compiler appears susceptible, but with a minor tweak to _MIPI_PORT we can defer the error until later. This is a partial revert of commit ce64645d86ac ("drm/i915: use variadic macros and arrays to choose port/pipe based registers") for a particular bad offender. Signed-off-by: Chris Wilson Cc: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170228145519.18012-1-chris@chris-wilson.co.uk Acked-by: Jani Nikula drivers/gpu/drm/i915/i915_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75bb485d741aa7d7df68b77b85a177227f4b5941 Author: Neil Armstrong Date: Wed Mar 1 10:20:18 2017 +0100 MAINTAINERS: drm-meson: Update git entries Add the main git entry and the drm-misc experiment git for small patches. Cc: Daniel Vetter Signed-off-by: Neil Armstrong Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1488360018-16835-1-git-send-email-narmstrong@baylibre.com MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 2140a9942b84dd4bf559dd1215b8f43c36ece5b5 Author: Jan Beulich Date: Fri Feb 3 02:03:25 2017 -0700 x86/entry/64: Relax pvops stub clobber specifications Except for the error_exit case, none of the code paths following the {DIS,EN}ABLE_INTERRUPTS() invocations being modified here make any assumptions on register values, so all registers can be clobbered there. In the error_exit case a minor adjustment to register usage (at once eliminating an instruction) also allows for this to be true. Signed-off-by: Jan Beulich Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/5894556D02000078001366D3@prv-mh.provo.novell.com Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit fdbd518adfaf2c10903250dffe70c61ed90b7dd7 Author: Jan Beulich Date: Fri Feb 3 01:58:03 2017 -0700 x86/entry/32: Relax a pvops stub clobber specification The code at .Lrestore_nocheck does not make any assumptions on register values, so all registers can be clobbered on code paths leading there. Signed-off-by: Jan Beulich Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/5894542B02000078001366C5@prv-mh.provo.novell.com Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa6d513aefe4fda3ce0c6b29cc78624bde8d2813 Author: Joan Jani Date: Tue Feb 28 18:59:52 2017 +0000 drivers:gpu: vga :vga_switcheroo.c : Fixed some coding style issues Fixed the following style issues drivers/gpu/vga/vga_switcheroo.c:98: WARNING: please, no space before tabs drivers/gpu/vga/vga_switcheroo.c:99: WARNING: please, no space before tabs drivers/gpu/vga/vga_switcheroo.c:102: WARNING: please, no space before tabs drivers/gpu/vga/vga_switcheroo.c:103: WARNING: please, no space before tabs drivers/gpu/vga/vga_switcheroo.c:129: WARNING: please, no space before tabs drivers/gpu/vga/vga_switcheroo.c:135: WARNING: please, no space before tabs drivers/gpu/vga/vga_switcheroo.c:217: WARNING: line over 80 characters drivers/gpu/vga/vga_switcheroo.c:218: WARNING: line over 80 characters drivers/gpu/vga/vga_switcheroo.c:308: WARNING: please, no space before tabs drivers/gpu/vga/vga_switcheroo.c:340: WARNING: line over 80 characters drivers/gpu/vga/vga_switcheroo.c:1087: WARNING: Block comments use * on subsequent lines drivers/gpu/vga/vga_switcheroo.c:1087: WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Joan Jani Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/HE1PR1001MB1148F38207BC31C860FAF06DC9560@HE1PR1001MB1148.EURPRD10.PROD.OUTLOOK.COM drivers/gpu/vga/vga_switcheroo.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 8dfe162ac74f56b382d6e3d37365672897422f51 Author: Joe Perches Date: Tue Feb 28 04:55:54 2017 -0800 gpu: drm: drivers: Convert printk(KERN_ to pr_ Use a more common logging style. Miscellanea: o Coalesce formats and realign arguments o Neaten a few macros now using pr_ Signed-off-by: Joe Perches Acked-by: Rob Clark Acked-by: Sinclair Yeh Acked-by: Patrik Jakobsson Acked-by: Tomi Valkeinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/76355db47b31668bb64d996865ceee53bd66b11f.1488285953.git.joe@perches.com drivers/gpu/drm/gma500/cdv_intel_lvds.c | 9 ++++----- drivers/gpu/drm/gma500/oaktrail_lvds.c | 18 +++++++++--------- drivers/gpu/drm/gma500/psb_drv.h | 5 ++--- drivers/gpu/drm/gma500/psb_intel_lvds.c | 7 +++---- drivers/gpu/drm/i915/i915_sw_fence.c | 8 ++++---- drivers/gpu/drm/mgag200/mgag200_mode.c | 2 +- drivers/gpu/drm/msm/msm_drv.c | 2 +- drivers/gpu/drm/nouveau/nouveau_acpi.c | 7 ++++--- drivers/gpu/drm/nouveau/nouveau_vga.c | 4 ++-- drivers/gpu/drm/nouveau/nv50_display.c | 22 +++++++++++----------- drivers/gpu/drm/nouveau/nvkm/core/mm.c | 10 +++++----- drivers/gpu/drm/omapdrm/dss/dsi.c | 17 ++++++++--------- drivers/gpu/drm/omapdrm/dss/dss.c | 3 +-- drivers/gpu/drm/omapdrm/dss/dss.h | 15 ++++++--------- drivers/gpu/drm/omapdrm/omap_gem.c | 5 ++--- drivers/gpu/drm/r128/r128_cce.c | 7 +++---- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 6 ++---- drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c | 3 +-- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 4 ++-- 20 files changed, 72 insertions(+), 84 deletions(-) commit 687d77a5f7b2aae4ea0507888648823f7c24e974 Author: Ingo Molnar Date: Wed Mar 1 08:49:47 2017 +0100 x86/xen: Update e820 table handling to the new core x86 E820 code Note that I restructured the Xen E820 logic a bit: instead of trying to sort the boot parameters, only the kernel's E820 table is sorted. This is how the x86 code does it and it reduces coupling between the in-kernel E820 code and the (unchanged) boot parameters. Cc: Konrad Rzeszutek Wilk Cc: Juergen Gross Cc: Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/xen/enlighten.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 0871d5a66da5c41151e0896a90298b163e42f2e0 Merge: e22af0b 2d6be4a Author: Ingo Molnar Date: Wed Mar 1 09:02:26 2017 +0100 Merge branch 'linus' into WIP.x86/boot, to fix up conflicts and to pick up updates Conflicts: arch/x86/xen/setup.c Signed-off-by: Ingo Molnar commit 0f44548676b690d039286cad22f930fc23290dbf Author: Daniel Vetter Date: Tue Feb 28 20:36:57 2017 +0100 MAINTAINERS: Update git entries for drivers in drm-misc It's still just an experiment, but one lesson learned from drm-misc is that not updating MAINTAINERS just leads to confusion. And this is easy to revert. Cc: Boris Brezillon Cc: Mark Yao Cc: Eric Anholt Cc: Gerd Hoffmann Cc: Shawn Guo Acked-by: Gerd Hoffmann Acked-by: Eric Anholt Acked-by: Boris Brezillon Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170228193657.3559-1-daniel.vetter@ffwll.ch MAINTAINERS | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit b787963ae243a4a25057c9d1285a600e2c3f6237 Author: Eric Anholt Date: Mon Feb 27 12:11:44 2017 -0800 drm/vc4: Add a paragraph at the top of vc4 docs introducing what it is. This makes for more sensible documentation of the whole module than jumping straight into the details of display. Signed-off-by: Eric Anholt Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170227201144.10970-5-eric@anholt.net Documentation/gpu/vc4.rst | 3 +++ drivers/gpu/drm/vc4/vc4_drv.c | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) commit f6c01530fd987eb70e051580d831ac04ef920352 Author: Eric Anholt Date: Mon Feb 27 12:11:43 2017 -0800 drm/vc4: Extend and edit documentation for output from the RST I had written most of my comments as if I was describing the individual code files the way I used to for doxygen, while for RST we want to describe things in a more chapter/section way where there's no obvious relation to .c files. Additionally, several of the files had stub descriptions that I've taken this opportunity to extend. Signed-off-by: Eric Anholt Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170227201144.10970-4-eric@anholt.net drivers/gpu/drm/vc4/vc4_crtc.c | 7 ++++--- drivers/gpu/drm/vc4/vc4_dpi.c | 3 ++- drivers/gpu/drm/vc4/vc4_hdmi.c | 23 ++++++++++++++++++++--- drivers/gpu/drm/vc4/vc4_hvs.c | 12 ++++++------ drivers/gpu/drm/vc4/vc4_render_cl.c | 4 ++++ drivers/gpu/drm/vc4/vc4_validate.c | 24 ++++++++++++++---------- drivers/gpu/drm/vc4/vc4_validate_shaders.c | 21 +++++++++++++-------- drivers/gpu/drm/vc4/vc4_vec.c | 6 ++++++ 8 files changed, 69 insertions(+), 31 deletions(-) commit 60c5d3b72989ec9922f9aa2bb5edc331659389dd Author: Eric Anholt Date: Mon Feb 27 12:11:42 2017 -0800 drm/vc4: Add RST to bring together vc4 kerneldoc. This doesn't yet produce coherent documentation of the module, but at least gets the kerneldoc built and somewhat glued together. Signed-off-by: Eric Anholt Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170227201144.10970-3-eric@anholt.net Documentation/gpu/index.rst | 1 + Documentation/gpu/vc4.rst | 86 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) commit 72f793f14afcec9697fadb8cd4e5d33327b108cd Author: Eric Anholt Date: Mon Feb 27 12:11:41 2017 -0800 drm/vc4: Convert existing documentation to actual kerneldoc. I'm going to hook vc4 up to the sphinx build, so clean up its comments to not generate warnings when we do. Signed-off-by: Eric Anholt Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170227201144.10970-2-eric@anholt.net drivers/gpu/drm/vc4/vc4_bo.c | 5 ++++- drivers/gpu/drm/vc4/vc4_dsi.c | 5 +++-- drivers/gpu/drm/vc4/vc4_gem.c | 26 +++++++++++++++++++++----- drivers/gpu/drm/vc4/vc4_irq.c | 3 ++- drivers/gpu/drm/vc4/vc4_validate.c | 10 +++++++--- 5 files changed, 37 insertions(+), 12 deletions(-) commit 6d24c1c5918907ab78a5729b78c0d165deb3cc2b Author: Michael Zoran Date: Thu Feb 23 17:54:31 2017 -0800 drm/vc4: Don't wait for vblank when updating the cursor Commonly used desktop environments such as xfce4 and gnome on debian sid can flood the graphics drivers with cursor updates. Because the current implementation is waiting for a vblank between cursor updates, this will cause the display to hang for a long time since a typical refresh rate is only 60Hz. This is unnecessary and unexpected by user mode software, so simply swap out the cursor frame buffer without waiting. Signed-off-by: Michael Zoran Reviewed-by: Eric Anholt Link: http://patchwork.freedesktop.org/patch/msgid/20170224015431.24583-1-mzoran@crowfest.net drivers/gpu/drm/vc4/vc4_plane.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit eeed4cd15ae0a8d3f2751adae8b56a3571e8aeca Author: Chris Chiu Date: Tue Feb 28 14:17:15 2017 -0600 ALSA: hda/realtek - Fix speaker support for Asus AiO ZN270IE Asus AiO ZN270IE with ALC256 has no audio ouput for internal speaker and headphone. It requires GPIO 2 as an amp. This commit enables the GPIO and pulls it high. Signed-off-by: Chris Chiu Signed-off-by: Daniel Drake Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 216d7aebbfbe1d3361e21c3a97d1607e1c1c48cd Author: Chris Chiu Date: Tue Feb 28 14:17:14 2017 -0600 ALSA: hda/realtek - Fix headset mic and speaker on Asus X441SA/X441UV ASUS X441SA and X441UV laptops with ALC3236 (ALC223) codec require the known fixup (ALC269_FIXUP_HEADSET_MIC) and a different pin value on pin 0x19 to make the headset mic work. To make the speaker work, it requires an EAPD verb fixup. Signed-off-by: Chris Chiu Signed-off-by: Daniel Drake Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit c1732ede5e8008324f908861077b50f4ca55701d Author: Chris Chiu Date: Tue Feb 28 14:17:13 2017 -0600 ALSA: hda/realtek - Fix headset and mic on several Asus laptops with ALC256 Enable jack sensing and fix internal mic and headset mic on Asus X555UB and X540SA. Fix internal mic and headset mic on Asus E402NA and E403NA. Fix headset mic on Asus X541UV, X541SA and Z550SA. Unfortunately jack sensing for the headset mic is still not working. We believe this is a codec limitation. Some of these quirks were authored by João Paulo Rechi Vita. Signed-off-by: Chris Chiu Signed-off-by: Daniel Drake Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 615966adc4b616dbc2f67ec2c44c25034d458cd9 Author: Chris Chiu Date: Tue Feb 28 14:17:12 2017 -0600 ALSA: hda/realtek - Fix headset mic on several Asus laptops with ALC255 Add pin quirks to enable use of the headset mic on Asus Z550MA, X540LA, X540LJ, X556UR, Z450LA, and X441NC. Signed-off-by: Chris Chiu Signed-off-by: Daniel Drake Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 5824ce8de7b1c0a75e5942e4df4652d04f3e263d Author: Chris Chiu Date: Tue Feb 28 14:17:11 2017 -0600 ALSA: hda/realtek - Add support for Acer Aspire E5-475 headset mic The Acer laptop Aspire E5-475 with ALC255 can't detect the headset microphone until we modify a pin definition. Signed-off-by: Chris Chiu Signed-off-by: Daniel Drake Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit fb4fe33f9331790238fe36e2398c3bb38005a428 Author: Gabriel Krisman Bertazi Date: Mon Feb 27 17:43:28 2017 -0300 drm: qxl: Enable atomic modesetting ioctl Now that atomic support is implemented, enable the atomic flag. Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170227204328.18761-15-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9973c879cff7b6d7485e51a0e69caf60ad028d3f Author: Gabriel Krisman Bertazi Date: Mon Feb 27 17:43:27 2017 -0300 drm: qxl: Atomic phase 3: Wire up atomic page_flip helper Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170227204328.18761-14-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_display.c | 47 +-------------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) commit bc8a00d9cc769bb16e479fe8ff1d125c1f27c9cd Author: Gabriel Krisman Bertazi Date: Mon Feb 27 17:43:26 2017 -0300 drm: qxl: Atomic phase 3: Wire up atomic set_config helper Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170227204328.18761-13-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_display.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 472e6d46c04de60c5641594f1787d82fb7f4978c Author: Gabriel Krisman Bertazi Date: Mon Feb 27 17:43:25 2017 -0300 drm: qxl: Atomic phase 3: Use atomic handlers for planes Now that the state objects are wired up, we can move to the final atomic handlers. Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170227204328.18761-12-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_display.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 10a0bd8969f8d333fe794a08ebc5ebd60d1fe958 Author: Gabriel Krisman Bertazi Date: Mon Feb 27 17:43:24 2017 -0300 drm: qxl: Atomic phase 2: Use drm_atomic_set_fb_for_plane helper Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170227204328.18761-11-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_display.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9ade8b98d77a43bb90cf3ef351b764dbaf087870 Author: Gabriel Krisman Bertazi Date: Mon Feb 27 17:43:23 2017 -0300 drm: qxl: Atomic phase 2: Wire up state object handlers Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170227204328.18761-10-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_display.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 37235451c6990683a85ef7ee12de07136570751f Author: Gabriel Krisman Bertazi Date: Mon Feb 27 17:43:22 2017 -0300 drm: qxl: Atomic phase 1: Don't unpin primary when disabling crtc In the qxl atomic model, the primary doesn't stay pinned all the time, instead it is only pinned/unpinned between prepare_fb and cleanup_fb. So, we no longer need a final unpin of the primary framebuffer when disabling the crtc. Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170227204328.18761-9-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_display.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 3538e80a869be74764ae7db484b371894f04d0f8 Author: Gabriel Krisman Bertazi Date: Mon Feb 27 17:43:21 2017 -0300 drm: qxl: Atomic phase 1: Implement mode_set_nofb Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170227204328.18761-8-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_display.c | 88 +++++++-------------------------------- 1 file changed, 16 insertions(+), 72 deletions(-) commit c2ff663260fee318f72ee2f149e1db59ede1bc63 Author: Gabriel Krisman Bertazi Date: Mon Feb 27 17:43:20 2017 -0300 drm: qxl: Atomic phase 1: Use drm_plane_helpers for primary plane Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170227204328.18761-7-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_display.c | 101 +++++++++++++++++++++++++++++++++++++- 1 file changed, 100 insertions(+), 1 deletion(-) commit 1277eed5fecb8830c8cc414ad70c1ef640464bc0 Author: Gabriel Krisman Bertazi Date: Mon Feb 27 17:43:19 2017 -0300 drm: qxl: Atomic phase 1: convert cursor to universal plane In preparation for atomic conversion, let's use the transitional atomic helpers drm_plane_helper_update/disable. Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170227204328.18761-6-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_display.c | 441 +++++++++++++++++--------------------- drivers/gpu/drm/qxl/qxl_drv.h | 5 - 2 files changed, 202 insertions(+), 244 deletions(-) commit d3e7e42db2b3ecffb17d92a9b4ce5234a2f0e1b2 Author: Gabriel Krisman Bertazi Date: Mon Feb 27 17:43:18 2017 -0300 drm: qxl: Expose creation of universal primary plane Let's expose the primary plane initialization inside the qxl driver in preparation for universal planes and atomic. Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170227204328.18761-5-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_display.c | 71 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) commit 64ca824e71b5d045ae1decc1b9f5a78a85dcd57b Author: Gabriel Krisman Bertazi Date: Mon Feb 27 17:43:17 2017 -0300 drm: qxl: Don't initialize vblank support qxl don't have support for hardware vblanks so we can't initialize it here, otherwise we risk getting stuck in drm_wait_one_vblank. Signed-off-by: Gabriel Krisman Bertazi Link: http://patchwork.freedesktop.org/patch/msgid/20170227204328.18761-4-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_display.c | 20 -------------------- drivers/gpu/drm/qxl/qxl_drv.c | 8 +------- 2 files changed, 1 insertion(+), 27 deletions(-) commit 715a11fabbe6aa01daefc7bef34a08f4933237ce Author: Gabriel Krisman Bertazi Date: Mon Feb 27 17:43:16 2017 -0300 drm: qxl: Consolidate bo reservation when pinning Every attempt to pin/unpin objects in memory requires qxl_bo_reserve/unreserve calls around the pinning operation to protect the object from concurrent access, which causes that call sequence to be reproduced every place where pinning is needed. In some cases, that sequence was not executed correctly, resulting in potential unprotected pinning operations. This commit encapsulates the reservation inside a new wrapper to make sure it is always handled properly. In cases where reservation must be done beforehand, for some reason, one can use the unprotected version __qxl_bo_pin/unpin. Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Gustavo Padovan Link: http://patchwork.freedesktop.org/patch/msgid/20170227204328.18761-3-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_display.c | 52 ++++++--------------------------------- drivers/gpu/drm/qxl/qxl_fb.c | 25 ++++++------------- drivers/gpu/drm/qxl/qxl_object.c | 41 ++++++++++++++++++++++++++++-- 3 files changed, 54 insertions(+), 64 deletions(-) commit aa5b62bac05d4b2bf7e5b3a006fa87625ee7beec Author: Gabriel Krisman Bertazi Date: Mon Feb 27 17:43:15 2017 -0300 drm: qxl: Drop device flags attribute There are no device specific flags that we need to keep track of here. Let it vanish. Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Gustavo Padovan Link: http://patchwork.freedesktop.org/patch/msgid/20170227204328.18761-2-krisman@collabora.co.uk Signed-off-by: Gerd Hoffmann drivers/gpu/drm/qxl/qxl_drv.c | 2 +- drivers/gpu/drm/qxl/qxl_drv.h | 3 +-- drivers/gpu/drm/qxl/qxl_kms.c | 5 +---- 3 files changed, 3 insertions(+), 7 deletions(-) commit b982dab1e66d2b998e80a97acb6eaf56518988d3 Author: Thierry Reding Date: Tue Feb 28 15:46:43 2017 +0100 drm: Rename connector list iterator API Currently the functions that initialize and tear down a connector iterator use the _get() and _put() suffixes. However, these suffixes are typically used by reference counting functions. Make these function names a little more consistent by changing the suffixes to _begin() and _end(), which is a fairly common pattern in the rest of the Linux kernel. Suggested-by: Jani Nikula Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/20170228144643.5668-8-thierry.reding@gmail.com drivers/gpu/drm/drm_atomic.c | 10 +++++----- drivers/gpu/drm/drm_atomic_helper.c | 14 +++++++------- drivers/gpu/drm/drm_connector.c | 24 ++++++++++++------------ drivers/gpu/drm/drm_crtc_helper.c | 36 ++++++++++++++++++------------------ drivers/gpu/drm/drm_encoder.c | 6 +++--- drivers/gpu/drm/drm_fb_helper.c | 4 ++-- drivers/gpu/drm/drm_mode_config.c | 18 +++++++++--------- drivers/gpu/drm/drm_plane_helper.c | 4 ++-- drivers/gpu/drm/drm_probe_helper.c | 12 ++++++------ include/drm/drm_connector.h | 12 ++++++------ 10 files changed, 70 insertions(+), 70 deletions(-) commit 6472e5090be7c78749a3c279b4faae87ab835c40 Author: Thierry Reding Date: Tue Feb 28 15:46:42 2017 +0100 drm: Introduce drm_property_blob_{get,put}() For consistency with other reference counting APIs in the kernel, add drm_property_blob_get() and drm_property_blob_put() to reference count DRM blob properties. Compatibility aliases are added to keep existing code working. To help speed up the transition, all the instances of the old functions in the DRM core are already replaced in this commit. A semantic patch is provided that can be used to convert all drivers to the new helpers. Reviewed-by: Sean Paul Acked-by: Christian König Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/20170228144643.5668-7-thierry.reding@gmail.com drivers/gpu/drm/drm_atomic.c | 16 ++++++------- drivers/gpu/drm/drm_atomic_helper.c | 18 +++++++------- drivers/gpu/drm/drm_mode_config.c | 2 +- drivers/gpu/drm/drm_property.c | 40 ++++++++++++++++---------------- include/drm/drm_property.h | 35 ++++++++++++++++++++++++---- scripts/coccinelle/api/drm-get-put.cocci | 10 ++++++++ 6 files changed, 78 insertions(+), 43 deletions(-) commit e6b62714e87c8811d5564b6a0738dcde63a51774 Author: Thierry Reding Date: Tue Feb 28 15:46:41 2017 +0100 drm: Introduce drm_gem_object_{get,put}() For consistency with other reference counting APIs in the kernel, add drm_gem_object_get() and drm_gem_object_put(), as well as an unlocked variant of the latter, to reference count GEM buffer objects. Compatibility aliases are added to keep existing code working. To help speed up the transition, all the instances of the old functions in the DRM core are already replaced in this commit. The existing semantic patch for the DRM subsystem-wide conversion is extended to account for these new helpers. Reviewed-by: Sean Paul Acked-by: Christian König Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/20170228144643.5668-6-thierry.reding@gmail.com Documentation/gpu/drm-mm.rst | 14 +++--- drivers/gpu/drm/drm_fb_cma_helper.c | 16 +++---- drivers/gpu/drm/drm_gem.c | 44 +++++++++--------- drivers/gpu/drm/drm_gem_cma_helper.c | 10 ++-- drivers/gpu/drm/drm_prime.c | 10 ++-- include/drm/drm_gem.h | 80 +++++++++++++++++++++++++------- scripts/coccinelle/api/drm-get-put.cocci | 20 ++++++++ 7 files changed, 130 insertions(+), 64 deletions(-) commit a4a69da06bc11a937a6e417938b1bb698ee1fa46 Author: Thierry Reding Date: Tue Feb 28 15:46:40 2017 +0100 drm: Introduce drm_framebuffer_{get,put}() For consistency with other reference counting APIs in the kernel, add drm_framebuffer_get() and drm_framebuffer_put() to reference count DRM framebuffers. Compatibility aliases are added to keep existing code working. To help speed up the transition, all the instances of the old functions in the DRM core are already replaced in this commit. The existing semantic patch for the DRM subsystem-wide conversion is extended to account for these new helpers. Reviewed-by: Sean Paul Acked-by: Christian König Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/20170228144643.5668-5-thierry.reding@gmail.com drivers/gpu/drm/drm_atomic.c | 6 ++-- drivers/gpu/drm/drm_atomic_helper.c | 4 +-- drivers/gpu/drm/drm_crtc.c | 8 +++--- drivers/gpu/drm/drm_framebuffer.c | 34 +++++++++++----------- drivers/gpu/drm/drm_plane.c | 12 ++++---- include/drm/drm_framebuffer.h | 49 ++++++++++++++++++++++++-------- scripts/coccinelle/api/drm-get-put.cocci | 10 +++++++ 7 files changed, 79 insertions(+), 44 deletions(-) commit ad09360750afa18a0a0ce0253d6ea6033abc22e7 Author: Thierry Reding Date: Tue Feb 28 15:46:39 2017 +0100 drm: Introduce drm_connector_{get,put}() For consistency with other reference counting APIs in the kernel, add drm_connector_get() and drm_connector_put() functions to reference count connectors. Compatibility aliases are added to keep existing code working. To help speed up the transition, all the instances of the old functions in the DRM core are already replaced in this commit. The existing semantic patch for mode object reference count conversion is extended for these new helpers. Reviewed-by: Sean Paul Acked-by: Christian König Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/20170228144643.5668-4-thierry.reding@gmail.com drivers/gpu/drm/drm_atomic.c | 8 +++---- drivers/gpu/drm/drm_atomic_helper.c | 4 ++-- drivers/gpu/drm/drm_connector.c | 10 ++++---- drivers/gpu/drm/drm_crtc.c | 2 +- drivers/gpu/drm/drm_crtc_helper.c | 6 ++--- drivers/gpu/drm/drm_fb_helper.c | 12 +++++----- drivers/gpu/drm/drm_mode_config.c | 2 +- include/drm/drm_connector.h | 41 +++++++++++++++++++++++++------- scripts/coccinelle/api/drm-get-put.cocci | 10 ++++++++ 9 files changed, 65 insertions(+), 30 deletions(-) commit 020a218f95bd3ceff7dd1022ff7ebc0497bc7bf9 Author: Thierry Reding Date: Tue Feb 28 15:46:38 2017 +0100 drm: Introduce drm_mode_object_{get,put}() For consistency with other reference counting APIs in the kernel, add drm_mode_object_get() and drm_mode_object_put() to reference count DRM mode objects. Compatibility aliases are added to keep existing code working. To help speed up the transition, all the instances of the old functions in the DRM core are already replaced in this commit. A semantic patch is provided that can be used to convert all drivers to the new helpers. Reviewed-by: Sean Paul Acked-by: Christian König Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/20170228144643.5668-3-thierry.reding@gmail.com drivers/gpu/drm/drm_atomic.c | 14 +++++------ drivers/gpu/drm/drm_mode_object.c | 26 ++++++++++---------- drivers/gpu/drm/drm_property.c | 6 ++--- include/drm/drm_mode_object.h | 36 ++++++++++++++++++++++----- scripts/coccinelle/api/drm-get-put.cocci | 42 ++++++++++++++++++++++++++++++++ 5 files changed, 95 insertions(+), 29 deletions(-) commit 2135ea7aafa26b6bfbbd304459fdb624e82e021e Author: Thierry Reding Date: Tue Feb 28 15:46:37 2017 +0100 drm: Rename drm_mode_object_get() Subsequent patches will introduce reference counting APIs that are more consistent with similar APIs throughout the Linux kernel. These APIs use the _get() and _put() suffixes and will collide with this existing function. Rename the function to drm_mode_object_add() which is a slightly more accurate description of what it does. Also the kerneldoc for this function gives an indication that it's badly named because it doesn't actually acquire a reference to anything. Reviewed-by: Sean Paul Acked-by: Christian König Signed-off-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/20170228144643.5668-2-thierry.reding@gmail.com drivers/gpu/drm/drm_connector.c | 6 +++--- drivers/gpu/drm/drm_crtc.c | 2 +- drivers/gpu/drm/drm_crtc_internal.h | 12 +++++------- drivers/gpu/drm/drm_encoder.c | 2 +- drivers/gpu/drm/drm_framebuffer.c | 4 ++-- drivers/gpu/drm/drm_mode_object.c | 18 +++++++----------- drivers/gpu/drm/drm_modes.c | 2 +- drivers/gpu/drm/drm_plane.c | 2 +- drivers/gpu/drm/drm_property.c | 6 +++--- 9 files changed, 24 insertions(+), 30 deletions(-) commit 0c33518db7d394d4eef1ce13f9dce32713f14beb Author: Chris Wilson Date: Tue Feb 28 11:28:03 2017 +0000 drm/i915/guc: Reorder __i915_guc_submit to reduce spinlock holdtime A couple of operations, the flushes and the tracepoint, do not require serialisation by client->wq_lock, so move them before we take it. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170228112803.11646-3-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_guc_submission.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 349ab9192cc32e578ce981936c6ab99ae3a96165 Author: Chris Wilson Date: Tue Feb 28 11:28:02 2017 +0000 drm/i915/guc: Make wq_lock irq-safe Following the use of dma_fence_signal() from within our interrupt handler, we need to make guc->wq_lock also irq-safe. This was done previously as part of the guc scheduler patch (which also started mixing our fences with the interrupt handler), but is now required to fix the current guc submission backend. v4: Document that __i915_guc_submit is always under an irq disabled section v5: Move wq_rsvd adjustment to its own function Fixes: 67b807a89230 ("drm/i915: Delay disabling the user interrupt for breadcrumbs") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Michal Wajdeczko Link: http://patchwork.freedesktop.org/patch/msgid/20170228112803.11646-2-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_guc_submission.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 499447db0ebf43596d05a3a5301123ae25110024 Author: Joe Perches Date: Tue Feb 28 04:55:53 2017 -0800 gpu: drm: core: Convert printk(KERN_ to pr_ Use a more common logging style. Miscellanea: o Coalesce formats and realign arguments Signed-off-by: Joe Perches [danvet: Resolve minor conflict in drm_edid.c] Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_cache.c | 12 ++++++------ drivers/gpu/drm/drm_edid.c | 4 ++-- drivers/gpu/drm/drm_ioc32.c | 3 +-- 3 files changed, 9 insertions(+), 10 deletions(-) commit 4e8be453a41125a4060df9a7371a72239f8fe462 Author: Daniel Vetter Date: Sun Feb 26 20:38:51 2017 +0100 drm/doc: Capture TODO for deferred fbdev setup Also became a bit a FAQ recently. Cc: John Stultz Acked-by: Thierry Reding Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170226193851.3245-2-daniel.vetter@ffwll.ch Documentation/gpu/todo.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 1a80cc1c6d576ccc9613008e65b244ccd26d2af4 Author: Daniel Vetter Date: Sun Feb 26 20:38:50 2017 +0100 drm/docs: Record TODO about plane clipping It's such a mess that it's become a FAQ :( Cc: Ville Syrjälä Cc: Russell King - ARM Linux Acked-by: Thierry Reding Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170226193851.3245-1-daniel.vetter@ffwll.ch Documentation/gpu/todo.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit db8f6403e88a9664e1ffae2e60d19e10120921b6 Author: Maarten Lankhorst Date: Tue Feb 21 14:51:41 2017 +0100 drm: Convert drm_framebuffer_remove to atomic, v4. Instead of trying to do everything in 1 go, just do a basic safe conversion first. We've been bitten by too many regressions in the past. This patch only converts drm_framebuffer_remove to atomic. The regression sensitive part is split out to a separate patch. v2: - Remove plane->fb assignment, done by drm_atomic_clean_old_fb. - Add WARN_ON when atomic_remove_fb fails. - Always call drm_atomic_state_put. v3: - Use drm_drv_uses_atomic_modeset - Handle the case where the first plane-disable-only commit fails with -EINVAL. Some drivers do not support this, fall back to disabling all crtc's in this case. v4: - Solve vmwgfx compatibility issue in their driver, was fixed in this patch by v3. - Move only disabling primary to a separate patch. Signed-off-by: Daniel Vetter Signed-off-by: Daniel Vetter Signed-off-by: Maarten Lankhorst Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1487685102-31991-3-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic.c | 88 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/drm_crtc_internal.h | 1 + drivers/gpu/drm/drm_framebuffer.c | 7 +++ 3 files changed, 96 insertions(+) commit 9b2104f423de5c148749a07e8197dbab4c449877 Author: Maarten Lankhorst Date: Tue Feb 21 14:51:40 2017 +0100 drm/atomic: Make disable_all helper fully disable the crtc. It seems that nouveau requires this, so best to do this in the helper. This allows nouveau to use the atomic suspend helper. Cc: nouveau@lists.freedesktop.org Acked-by: Ben Skeggs #irc Signed-off-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1487685102-31991-2-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 51 ++++++++++---- drivers/gpu/drm/nouveau/nouveau_display.c | 113 +----------------------------- 2 files changed, 38 insertions(+), 126 deletions(-) commit 9a45d33cdf82f138cc290236cde83483c6567394 Author: Boris Brezillon Date: Mon Feb 6 18:57:19 2017 +0100 drm/atmel-hlcdc: Simplify the HLCDC layer logic An HLCDC layers in Atmel's nomenclature is either a DRM plane or a 'Post Processing Layer' which can be used to output the results of the HLCDC composition in a memory buffer. atmel_hlcdc_layer.c was designed to be generic enough to be re-usable in both cases, but we're not exposing the post-processing layer yet, and even if we were, I'm not sure the code would provide the necessary tools to manipulate this kind of layer. Moreover, the code in atmel_hlcdc_{plane,layer}.c was designed before the atomic modesetting API, and was trying solve the check-setting/commit-if-ok/rollback-otherwise problem, which is now entirely solved by the existing core infrastructure. And finally, the code in atmel_hlcdc_layer.c is over-complicated compared to what we really need. This rework is a good excuse to simplify it. Note that this rework solves an existing resource leak (leading to a -EBUSY error) which I failed to clearly identify. Signed-off-by: Boris Brezillon Acked-by: Daniel Vetter Reviewed-by: Eric Anholt Tested-by: Nicolas Ferre drivers/gpu/drm/atmel-hlcdc/Makefile | 1 - drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 39 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 82 +-- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 361 +++++++++++-- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c | 666 ------------------------ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h | 399 -------------- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 645 +++++++++++------------ 7 files changed, 697 insertions(+), 1496 deletions(-) commit 1e08a260b178a6cb5547a28153f88661970474e5 Author: Hans de Goede Date: Tue Feb 28 11:26:21 2017 +0200 drm/i915/dsi: VLV/CHT Only wait for LP00 on MIPI PORT A On some devices only MIPI PORT C is used, in this case checking the MIPI PORT A CTRL AFE_LATCHOUT bit (there is no such bit for PORT C on VLV/CHT) will result in false positive "DSI LP not going Low" errors as this checks the PORT A clk status. In case both ports are used we have already checked the AFE_LATCHOUT bit when going through the for_each_dsi_port() loop for PORT A and checking the same bit again for PORT C is a no-op. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97061 Signed-off-by: Hans de Goede Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/242e4438bf29ebffc66eaa182f22b9d60d304bc2.1488273823.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 18a00095a5f3b73cabab513119db9275afb62321 Author: Hans de Goede Date: Tue Feb 28 11:26:20 2017 +0200 drm/i915/dsi: Make intel_dsi_enable/disable directly exec VBT sequences The drm_panel_enable/disable and drm_panel_prepare/unprepare calls are not fine grained enough to abstract all the different steps we need to take (and VBT sequences we need to exec) properly. So simply remove the panel _enable/disable and prepare/unprepare callbacks and instead export intel_dsi_exec_vbt_sequence() from intel_dsi_panel_vbt.c and call that from intel_dsi_enable/disable(). No functional changes. Signed-off-by: Hans de Goede Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/b4ca5185d4788d92df2ed60837a24b8962a8e8ba.1488273823.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 14 +++++++--- drivers/gpu/drm/i915/intel_dsi.h | 3 +++ drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 43 ++---------------------------- 3 files changed, 15 insertions(+), 45 deletions(-) commit 14be7a5c29c2bf3b9567da1e41a514c4bbcdacdf Author: Hans de Goede Date: Tue Feb 28 11:26:19 2017 +0200 drm/i915/dsi: Move intel_dsi_clear_device_ready() Move the intel_dsi_clear_device_ready() function to higher up in intel_dsi.c this pairs it with intel_dsi_device_ready(); and pairs intel_dsi_*enable* with intel_dsi_*disable without intel_dsi_clear_device_ready() sitting in the middle of them. This commit purely moves code around, it does not make any changes what-so-ever. Signed-off-by: Hans de Goede Acked-by: Jani Nikula Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/f971d18ea6d350890447860aeb541dba072a6e47.1488273823.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 86 ++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 43 deletions(-) commit c7991ecad6a99664506cf290118ecec985854011 Author: Hans de Goede Date: Tue Feb 28 11:26:18 2017 +0200 drm/i915/dsi: Add intel_dsi_unprepare() helper The enable path has an intel_dsi_prepare() helper which prepares various registers for the mode-set. Move the code undoing this to a new intel_dsi_unprepare() helper function for better symmetry between the enable and disable paths. No functional changes. Signed-off-by: Hans de Goede Acked-by: Jani Nikula Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/cc0baaf04ea74a20031b4b5bb128591dcfa78406.1488273823.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) commit 5a2e65e742cac8939ab411f38ef1a36ef927181c Author: Hans de Goede Date: Tue Feb 28 11:26:17 2017 +0200 drm/i915/dsi: Merge intel_dsi_disable/enable into their respective callers intel_dsi_disable/enable only have one caller, merge them into their respective callers. Change msleep(2) into usleep_range(2000, 5000) to make checkpatch happy, otherwise no functional changes. The main advantage of this change is that it makes it easier to follow all the steps of the panel enable / disable sequence when reading the code. Signed-off-by: Hans de Goede Acked-by: Jani Nikula Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/d7249612e6d2e9639ecd1d8d106ca37d5794f2a4.1488273823.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 108 ++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 64 deletions(-) commit 3870b89a810bc7a3e26ec469ee86077c1de6f9b2 Author: Hans de Goede Date: Tue Feb 28 11:26:16 2017 +0200 drm/i915/dsi: Move calling of wait_for_dsi_fifo_empty to mipi_exec_send_packet Instead of calling wait_for_dsi_fifo_empty on all dsi ports after calling a drm_panel_foo helper which calls VBT sequences, move it to the VBT mipi_exec_send_packet helper, which is the one VBT instruction which actually puts data in the fifo. This results in a nice cleanup making it clearer what all the steps on intel_dsi_enable / disable are and this also makes the VBT code properly wait till a command has actually been send before executing the next steps (typically a delay) in the VBT sequence. Signed-off-by: Hans de Goede Reviewed-by: Bob Paauwe Acked-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/289977b5699e252fea5c211d1d1645f9e79cca79.1488273823.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_dsi.c | 12 +----------- drivers/gpu/drm/i915/intel_dsi.h | 2 ++ drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 2 ++ 3 files changed, 5 insertions(+), 11 deletions(-) commit 6140cf20341975400fb2ee7a72fa6316c1bc74f0 Author: Jani Nikula Date: Mon Feb 20 10:51:48 2017 +0200 drm: add drm_get_connector_force_name Follow the naming in debugfs also for logging, add "unknown" for values beyond the enumerated ones. v2: add \n in connector_show, make internal to drm (Chris) Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1487580708-29340-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/drm_connector.c | 40 ++++++++++++++++++++++--------------- drivers/gpu/drm/drm_crtc_internal.h | 1 + drivers/gpu/drm/drm_debugfs.c | 24 +--------------------- 3 files changed, 26 insertions(+), 39 deletions(-) commit 80166e406e4b88e49b5091cec1ac6b03b6f372ed Author: Chris Wilson Date: Tue Feb 28 08:50:18 2017 +0000 drm/i915: Consolidate reporting of "missed breadcrumbs" Move the setting of gpu_error->missed_irq_ring bit to a common function so that we can get the debug logging for either path. v2: Add %pF caller Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170228085018.3225-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit ebeac38025ff36b76b0f6fa0aeb52729e96bb6bc Author: Madhav Chauhan Date: Fri Feb 17 18:13:35 2017 +0530 drm/i915/glk: Validate only DSI PORT A PLL divider As per BSPEC, GLK supports MIPI DSI 8X clk only on PORT A. Therefore only for PORT A PLL divider value should be validated. Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1487335415-14766-8-git-send-email-madhav.chauhan@intel.com drivers/gpu/drm/i915/intel_dsi_pll.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit bcc65700484115dc4f80817de91dc86eeeb8b361 Author: Deepak M Date: Fri Feb 17 18:13:34 2017 +0530 drm/i915/glk: Program txesc clock divider for GLK v2: Addressed Jani's Review comments(renamed bit field macros) Txesc clock divider is calculated and programmed for geminilake platform. Signed-off-by: Deepak M Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1487335415-14766-7-git-send-email-madhav.chauhan@intel.com drivers/gpu/drm/i915/i915_reg.h | 5 +++ drivers/gpu/drm/i915/intel_dsi_pll.c | 61 ++++++++++++++++++++++++++++++++++-- 2 files changed, 64 insertions(+), 2 deletions(-) commit 09a568e7ac2c053a2f51653deb11744d133d41a4 Author: Deepak M Date: Fri Feb 17 18:13:33 2017 +0530 drm/i915i/glk: Program MIPI_CLOCK_CTRL only for BXT Register MIPI_CLOCK_CTRL is applicable only for BXT platform. Future platform have other registers to program the escape clock dividers. Signed-off-by: Deepak M Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1487335415-14766-6-git-send-email-madhav.chauhan@intel.com drivers/gpu/drm/i915/intel_dsi_pll.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit f340c2ff5ebdd213682fe8b9a14838878cd0ff01 Author: Deepak M Date: Fri Feb 17 18:13:32 2017 +0530 drm/i915/glk: Add DSI PLL divider range for glk PLL divider range for GLK is different than that of BXT, hence adding the GLK range check in this patch. v2: Code restructure using min and max ratio variables (Ander) v3: Code changes to avoid "maybe-uninitialized" warning (Jani) Signed-off-by: Deepak M Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1487335415-14766-5-git-send-email-madhav.chauhan@intel.com drivers/gpu/drm/i915/i915_reg.h | 4 ++++ drivers/gpu/drm/i915/intel_dsi_pll.c | 24 +++++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) commit b426f985158d9a723ab195258748c0c5e0793a52 Author: Deepak M Date: Fri Feb 17 18:13:30 2017 +0530 drm/i915/glk: Program new MIPI DSI PHY registers for GLK Program the clk lane and tlpx time count registers to configure DSI PHY. v2: Addressed Jani's Review comments(renamed bit field macros) v3: Program clk lane timing reg same as dphy param reg. v4: Removed "line over 80 character" warning Signed-off-by: Deepak M Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1487335415-14766-3-git-send-email-madhav.chauhan@intel.com drivers/gpu/drm/i915/i915_reg.h | 8 ++++++++ drivers/gpu/drm/i915/intel_dsi.c | 8 ++++++++ 2 files changed, 16 insertions(+) commit 39299838eea1a310b1309b538b80cd00603698fd Author: Deepak M Date: Fri Feb 17 18:13:29 2017 +0530 drm/i915/glk: Program dphy param reg for GLK For GEMINILAKE, dphy param reg values are programmed in terms of HS byte clock count while for older platforms in terms of HS ddr clk count. v2: Added comments to clarify ddr clock count calculation v3: Use multiplier variable instead of IS_GEMINILAKE() check everywhere (Jani) Signed-off-by: Deepak M Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1487335415-14766-2-git-send-email-madhav.chauhan@intel.com drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 31 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit 0eb9acda36ac41e43afd152a96c2e769200bc264 Author: Lorenzo Stoakes Date: Mon Feb 27 21:50:08 2017 +0000 drm/via: use get_user_pages_unlocked() Moving from get_user_pages() to get_user_pages_unlocked() simplifies the code and takes advantage of VM_FAULT_RETRY functionality when faulting in pages. Signed-off-by: Lorenzo Stoakes Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170227215008.21457-1-lstoakes@gmail.com drivers/gpu/drm/via/via_dmablit.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit a65895e0ee3a9e4f7f38e0d0fa4054b30b811035 Author: Mihai Burduselu Date: Sun Feb 26 01:30:38 2017 +0200 ALSA: vx: remove 'out of memory' message Reported by checkpatch.pl Signed-off-by: Mihai Burduselu Signed-off-by: Takashi Iwai sound/drivers/vx/vx_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 67b807a892302d184f6987b0c3cc2dc2505e4a2d Author: Chris Wilson Date: Mon Feb 27 20:58:50 2017 +0000 drm/i915: Delay disabling the user interrupt for breadcrumbs A significant cost in setting up a wait is the overhead of enabling the interrupt. As we disable the interrupt whenever the queue of waiters is empty, if we are frequently waiting on alternating batches, we end up re-enabling the interrupt on a frequent basis. We do want to disable the interrupt during normal operations as under high load it may add several thousand interrupts/s - we have been known in the past to occupy whole cores with our interrupt handler after accidentally leaving user interrupts enabled. As a compromise, leave the interrupt enabled until the next IRQ, or the system is idle. This gives a small window for a waiter to keep the interrupt active and not be delayed by having to re-enable the interrupt. v2: Restore hangcheck/missed-irq detection for continuations v3: Be more careful restoring the hangcheck timer after reset v4: Be more careful restoring the fake irq after reset (if required!) v5: Redo changes to intel_engine_wakeup() v6: Factor out __intel_engine_wakeup() v7: Improve commentary for declaring a missed wakeup Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170227205850.2828-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 4 +- drivers/gpu/drm/i915/i915_irq.c | 2 + drivers/gpu/drm/i915/intel_breadcrumbs.c | 176 ++++++++++++++++++++----------- drivers/gpu/drm/i915/intel_ringbuffer.h | 7 +- 4 files changed, 125 insertions(+), 64 deletions(-) commit 19d0a5727123509f0fd8b84551d4715e86937df9 Author: Chris Wilson Date: Mon Feb 27 20:58:49 2017 +0000 drm/i915: Defer enabling hangcheck to the first fake breadcrumb interrupt By deferring hangcheck to the fake breadcrumb interrupt, we can simply the enabling procedure slightly - as by enabling the fake, we then enable the hangcheck. By always enabling the hangcheck from each fake interrupt (it will be a no-op for an already queued hangcheck), it will make restoring the breadcrumbs after a reset simpler in the next patch. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170227205850.2828-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) commit 56299fb7d9047cc1d25362827073b2ac0984ed21 Author: Chris Wilson Date: Mon Feb 27 20:58:48 2017 +0000 drm/i915: Signal first fence from irq handler if complete As execlists and other non-semaphore multi-engine devices coordinate between engines using interrupts, we can shave off a few 10s of microsecond of scheduling latency by doing the fence signaling from the interrupt as opposed to a RT kthread. (Realistically the delay adds about 1% to an individual cross-engine workload.) We only signal the first fence in order to limit the amount of work we move into the interrupt handler. We also have to remember that our breadcrumbs may be unordered with respect to the interrupt and so we still require the waiter process to perform some heavyweight coherency fixups, as well as traversing the tree of waiters. v2: No need for early exit in irq handler - it breaks the flow between patches and prevents the tracepoint v3: Restore rcu hold across irq signaling of request Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170227205850.2828-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 13 ++++++------ drivers/gpu/drm/i915/i915_gem_request.c | 2 +- drivers/gpu/drm/i915/i915_gem_request.h | 2 ++ drivers/gpu/drm/i915/i915_irq.c | 36 +++++++++++++++++++++++++++++--- drivers/gpu/drm/i915/intel_breadcrumbs.c | 32 +++++++--------------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 8 +++---- 6 files changed, 54 insertions(+), 39 deletions(-) commit 8d769ea7bc16c34c9dc5143be021e943014c4cd1 Author: Chris Wilson Date: Mon Feb 27 20:58:47 2017 +0000 drm/i915: Report both waiters and success from intel_engine_wakeup() The two users of the return value from intel_engine_wakeup() are expecting different results. In the breadcrumbs hangcheck, we are using it to determine whether wake_up_process() detected the waiter was currently running (and if so we presume that it hasn't yet missed the interrupt). However, in the fake_irq path, we are using the return value as a check as to whether there are any waiters, and so we may incorrectly stop the fake-irq if that waiter was currently running. To handle the two different needs, return both bits of information! We uninline it from the irq path in preparation for the next patch which makes the irq hotpath special and relegates intel_engine_wakeup() to the slow fixup paths. v2: s/ret/result/ Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170227205850.2828-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 28 +++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_ringbuffer.h | 26 +++----------------------- 2 files changed, 30 insertions(+), 24 deletions(-) commit b0734f77b3d1ae00603bf478611662d5bf6c9b54 Author: Chris Wilson Date: Thu Feb 23 14:10:20 2017 +0000 drm/i915: Distinguish between timeout and error in sideband transactions After initiating a sideband transaction, we only want to wait for the transaction to become idle. If, as we are, we wait for both the busy and error flag to clear, if an error is raised we just spin until the timeout. Once the hw is idle, we can then check to see if the hw flagged an error, and report it distinctly. Signed-off-by: Chris Wilson Cc: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170223141020.13250-1-chris@chris-wilson.co.uk Reviewed-by: Jani Nikula drivers/gpu/drm/i915/intel_sideband.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit ac7d3af84b24eb20d2ac945c525147d24d7b230b Author: Benjamin Gaignard Date: Fri Feb 24 17:14:34 2017 +0100 drm: sti: make driver use devm_of_platform_populate() This make sure that of_platform_depopulate() is called if an error occur in probe after populating the date from the device tree. Signed-off-by: Benjamin Gaignard Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1487952874-23635-3-git-send-email-benjamin.gaignard@linaro.org drivers/gpu/drm/sti/sti_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 38b0b219fbe89d824213beabf03bfb00b5d2c8fa Author: Benjamin Gaignard Date: Fri Feb 24 17:14:33 2017 +0100 of: add devm_ functions for populate and depopulate Lots of calls to of_platform_populate() are not unbalanced by a call to of_platform_depopulate(). This create issues while drivers are bind/unbind. In way to solve those issues is to add devm_of_platform_populate() which will call of_platform_depopulate() when the device is unbound from the bus. Signed-off-by: Benjamin Gaignard Acked-by: Rob Herring Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1487952874-23635-2-git-send-email-benjamin.gaignard@linaro.org drivers/of/platform.c | 71 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/of_platform.h | 11 +++++++ 2 files changed, 82 insertions(+) commit afeddf50811253ee512fb9192cfb443891929776 Author: Chris Wilson Date: Mon Feb 27 13:59:13 2017 +0000 drm/i915: Reduce context alignment No hardware was ever shipped that needed more than 4096 byte alignment and future hardware will not use this legacy path. So reduce the alignment to make it easier and quicker to launch workloads. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170227135913.8056-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 17 ----------------- drivers/gpu/drm/i915/i915_gem_context.h | 2 -- drivers/gpu/drm/i915/intel_ringbuffer.c | 3 ++- 3 files changed, 2 insertions(+), 20 deletions(-) commit 12946eceeb97a36a7087995646e077e9872ac99b Author: Chris Wilson Date: Mon Feb 27 13:59:12 2017 +0000 drm/i915: Remove redundant TLB invalidate on switching ppgtt We are required to reload the TLBs around ppgtt switches. However, we already do an unconditional TLB invalidate before every batch and a flush afterwards, so this condition is already satisfied without extra flushes around the LRI instructions. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170227135913.8056-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 17 ----------------- 1 file changed, 17 deletions(-) commit 20fe17aa52dcafd3bdeb9e37281d027b0c1c5a15 Author: Chris Wilson Date: Mon Feb 27 13:59:11 2017 +0000 drm/i915: Remove redundant TLB invalidate on switching contexts We are required to reload the TLBs around context switches (MI_SET_CONTEXT specifically) and the recommendation is do that before the MI_SET_CONTEXT so that it is serialised with the switch and not forgotten: [DevSNB] If Flush TLB invalidation Mode is enabled it’s the driver’s responsibility to invalidate the TLBs at least once after the previous context switch after any GTT mappings changed (including new GTT entries). This can be done by a pipeline PIPE_CONTROL with TLB inv bit set immediately before MI_SET_CONTEXT. However, we already do an unconditional TLB invalidate before every batch so this condition is satifisfied. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170227135913.8056-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 11 ----------- 1 file changed, 11 deletions(-) commit 6067a27d1f0184596d51decbac1c1fdc4acb012f Author: Mika Kuoppala Date: Wed Feb 15 15:52:59 2017 +0200 drm/i915: Avoid tweaking evaluation thresholds on Baytrail v3 Certain Baytrails, namely the 4 cpu core variants, have been plaqued by spurious system hangs, mostly occurring with light loads. Multiple bisects by various people point to a commit which changes the reclocking strategy for Baytrail to follow its bigger brethen: commit 8fb55197e64d ("drm/i915: Agressive downclocking on Baytrail") There is also a review comment attached to this commit from Deepak S on avoiding punit access on Cherryview and thus it was excluded on common reclocking path. By taking the same approach and omitting the punit access by not tweaking the thresholds when the hardware has been asked to move into different frequency, considerable gains in stability have been observed. With J1900 box, light render/video load would end up in system hang in usually less than 12 hours. With this patch applied, the cumulative uptime has now been 34 days without issues. To provoke system hang, light loads on both render and bsd engines in parallel have been used: glxgears >/dev/null 2>/dev/null & mpv --vo=vaapi --hwdec=vaapi --loop=inf vid.mp4 So far, author has not witnessed system hang with above load and this patch applied. Reports from the tenacious people at kernel bugzilla are also promising. Considering that the punit access frequency with this patch is considerably less, there is a possibility that this will push the, still unknown, root cause past the triggering point on most loads. But as we now can reliably reproduce the hang independently, we can reduce the pain that users are having and use a static thresholds until a root cause is found. v3: don't break debugfs and simplification (Chris Wilson) References: https://bugzilla.kernel.org/show_bug.cgi?id=109051 Cc: Chris Wilson Cc: Ville Syrjälä Cc: Len Brown Cc: Daniel Vetter Cc: Jani Nikula Cc: fritsch@xbmc.org Cc: miku@iki.fi Cc: Ezequiel Garcia CC: Michal Feix Cc: Hans de Goede Cc: Deepak S Cc: Jarkko Nikula Cc: # v4.2+ Acked-by: Daniel Vetter Acked-by: Chris Wilson Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1487166779-26945-1-git-send-email-mika.kuoppala@intel.com drivers/gpu/drm/i915/intel_pm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 31c7effa39f21f0fea1b3250ae9ff32b9c7e1ae5 Author: Chris Wilson Date: Mon Feb 27 12:26:54 2017 +0000 drm/i915: Remove the vma from the drm_mm if binding fails As we track whether a vma has been inserted into the drm_mm using the vma->flags, if we fail to bind the vma into the GTT we do not update those bits and will attempt to reinsert the vma into the drm_mm on future passes. To prevent that, we want to unwind i915_vma_insert() if we fail in our attempt to bind. Fixes: 59bfa1248e22 ("drm/i915: Start passing around i915_vma from execbuffer") Testcase: igt/drv_selftest/live_gtt Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Cc: # v4.9+ Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170227122654.27651-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_vma.c | 57 ++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 20 deletions(-) commit 2f7399af94a2d6f6459373969d266708e6a7fc38 Author: Chris Wilson Date: Mon Feb 27 12:26:53 2017 +0000 drm/i915: Unwind vma->pages allocation upon failure If we fail to allocate the ppgtt range after allocating the pages for the vma, we should unwind the local allocation before reporting back the failure. Fixes: ff685975d97f ("drm/i915: Move allocate_va_range to GTT") Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170227122654.27651-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit bf75d59eff679d2e2b7af5c6958a088f8a458f7a Author: Chris Wilson Date: Mon Feb 27 12:26:52 2017 +0000 drm/i915: Only unwind the local pgtable layer if empty Only if we allocated the layer and the lower level failed should we remove this layer when unwinding. Otherwise we ignore the overlapping entries by overwriting the old layer with scratch. Fixes: c5d092a4293f ("drm/i915: Remove bitmap tracking for used-pml4") Fixes: e2b763caa6eb ("drm/i915: Remove bitmap tracking for used-pdpes") Reported-by: Matthew Auld Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99947 Testcase: igt/drv_selftest/live_gtt Signed-off-by: Chris Wilson Cc: Matthew Auld Tested-by: Matthew Auld Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170227122654.27651-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) commit 69060d96440b83da151989d83fd180eb05d84780 Author: Kelvin Gardiner Date: Fri Feb 24 11:15:24 2017 -0800 drm/i915/bdw: Do not write the replay bit of the ring mode register The replay bit of the ring mode register is not a valid bit for Gen8+. Do not write to this bit. Signed-off-by: Kelvin Gardiner Cc: Joonas Lahtinen Cc: Ceraolo Spurio, Daniele Reviewed-by: Daniele Ceraolo Spurio [Joonas: Fixed commit message line to be under 72 chars] Signed-off-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1487963724-4824-1-git-send-email-kelvin.gardiner@intel.com drivers/gpu/drm/i915/intel_lrc.c | 1 - 1 file changed, 1 deletion(-) commit ca7a45ba6fb9e7ceca56d10b91db29c2f3451a2e Author: Michał Winiarski Date: Mon Feb 27 12:22:56 2017 +0100 drm/i915/skl: Add missing SKL ID Used by production device: Intel(R) Iris(TM) Graphics P555 Cc: Cc: Mika Kuoppala Cc: Rodrigo Vivi Signed-off-by: Michał Winiarski Reviewed-by: Rodrigo Vivi Reviewed-by: Mika Kuoppala Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170227112256.20060-1-michal.winiarski@intel.com include/drm/i915_pciids.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 40ee6fbef75fe6452dc9e69e6f9f1a2c7808ed67 Author: Manasi Navare Date: Fri Dec 16 12:29:06 2016 +0200 drm: Add a new connector atomic property for link status At the time userspace does setcrtc, we've already promised the mode would work. The promise is based on the theoretical capabilities of the link, but it's possible we can't reach this in practice. The DP spec describes how the link should be reduced, but we can't reduce the link below the requirements of the mode. Black screen follows. One idea would be to have setcrtc return a failure. However, it already should not fail as the atomic checks have passed. It would also conflict with the idea of making setcrtc asynchronous in the future, returning before the actual mode setting and link training. Another idea is to train the link "upfront" at hotplug time, before pruning the mode list, so that we can do the pruning based on practical not theoretical capabilities. However, the changes for link training are pretty drastic, all for the sake of error handling and DP compliance, when the most common happy day scenario is the current approach of link training at mode setting time, using the optimal parameters for the mode. It is also not certain all hardware could do this without the pipe on; not even all our hardware can do this. Some of this can be solved, but not trivially. Both of the above ideas also fail to address link degradation *during* operation. The solution is to add a new "link-status" connector property in order to address link training failure in a way that: a) changes the current happy day scenario as little as possible, to avoid regressions, b) can be implemented the same way by all drm drivers, c) is still opt-in for the drivers and userspace, and opting out doesn't regress the user experience, d) doesn't prevent drivers from implementing better or alternate approaches, possibly without userspace involvement. And, of course, handles all the issues presented. In the usual happy day scenario, this is always "good". If something fails during or after a mode set, the kernel driver can set the link status to "bad" and issue a hotplug uevent for userspace to have it re-check the valid modes through GET_CONNECTOR IOCTL, and try modeset again. If the theoretical capabilities of the link can't be reached, the mode list is trimmed based on that. v7 by Jani: * Rebase, simplify set property while at it, checkpatch fix v6: * Fix a typo in kernel doc (Sean Paul) v5: * Clarify doc for silent rejection of atomic properties by driver (Daniel Vetter) v4: * Add comments in kernel-doc format (Daniel Vetter) * Update the kernel-doc for link-status (Sean Paul) v3: * Fixed a build error (Jani Saarinen) v2: * Removed connector->link_status (Daniel Vetter) * Set connector->state->link_status in drm_mode_connector_set_link_status_property (Daniel Vetter) * Set the connector_changed flag to true if connector->state->link_status changed. * Reset link_status to GOOD in update_output_state (Daniel Vetter) * Never allow userspace to set link status from Good To Bad (Daniel Vetter) Reviewed-by: Sean Paul Reviewed-by: Daniel Vetter Reviewed-by: Jani Nikula Acked-by: Tony Cheng Acked-by: Harry Wentland Cc: Jani Nikula Cc: Daniel Vetter Cc: Ville Syrjala Cc: Chris Wilson Cc: Sean Paul Signed-off-by: Manasi Navare Signed-off-by: Jani Nikula Acked-by: Eric Anholt (for the -modesetting patch) Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/0182487051aa9f1594820e35a4853de2f8747b4e.1481883920.git.jani.nikula@intel.com drivers/gpu/drm/drm_atomic.c | 16 ++++++++++++ drivers/gpu/drm/drm_atomic_helper.c | 15 +++++++++++ drivers/gpu/drm/drm_connector.c | 52 +++++++++++++++++++++++++++++++++++++ include/drm/drm_connector.h | 19 ++++++++++++++ include/drm/drm_mode_config.h | 5 ++++ include/uapi/drm/drm_mode.h | 4 +++ 6 files changed, 111 insertions(+) commit c771633daf951439ef1875b0da52b56e5696d19f Merge: 62b6956 64a5771 Author: Daniel Vetter Date: Mon Feb 27 09:30:11 2017 +0100 Merge airlied/drm-next into drm-misc-next Backmerge the main pull request to sync up with all the newly landed drivers. Otherwise we'll have chaos even before 4.12 started in earnest. Signed-off-by: Daniel Vetter commit 62b695662a2413286a25df418b0af665bf2899c5 Author: Ander Conselvan de Oliveira Date: Fri Feb 24 16:19:59 2017 +0200 drm/i915: Only enable DDI IO power domains after enabling DPLL According to bspec, the DDI IO power domains should be enabled after enabling the DPLL and mapping it to the DDI. The current order doesn't seem to create problems with Skylake and Kabylake, but causes enable timeouts in Geminilake. v2: Rebase. - Take power domain references before sanitizing encoders. (Imre) - Add comment to get_encoder_power_domains() defition. (Ander) v3: Don't put the domain if called with HSW/BDW's analog encoder. (CI) v4: Put IO power domain before unmapping DPLL. (Imre) - Change return type of intel_ddi_get_power_domains() to u64. (Imre) Cc: David Weinehall Cc: Imre Deak Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: David Weinehall # v1 Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/20170224141959.5955-1-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_drv.h | 5 +++ drivers/gpu/drm/i915/intel_ddi.c | 49 ++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_display.c | 20 ++++++++++ drivers/gpu/drm/i915/intel_drv.h | 4 ++ drivers/gpu/drm/i915/intel_runtime_pm.c | 68 +++++++++++++++++++-------------- 5 files changed, 117 insertions(+), 29 deletions(-) commit 71cc22e5db8994ff69c947a296235e8547039188 Author: Ander Conselvan de Oliveira Date: Wed Feb 22 08:34:30 2017 +0200 drm/i915/glk: Don't enable DDI IO power domains during init In Geminilake, the DDI IO power domains can't be enabled before a DPLL is running and mapped to the appropriate DDI. At least on Geminilake, attempting to enable those during init will lead to a timeout. The failure to enable the power domain also causes issues with the state verifier during resume from suspend. After all the init power domains are enabled, the call to intel_power_domains_sync_hw() from the resume path will cause the hw_enabled field on the respective power wells to be false while the usage count remains above zero. Further attempts to enable the power domain caused by a modeset will simply update the usage count without doing anything else. When the state verifier attempts to read the state of a DDI encoder, intel_display_power_get_if_enabled() returns false, leading to the following WARN: WARNING: CPU: 3 PID: 1743 at drivers/gpu/drm/i915/intel_display.c:7001 verify_connector_state.isra.80+0x26c/0x2b0 [i915] attached crtc is active, but connector isn't Modules linked in: i915(E) tun ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_broute bridge stp llc ebtable_nat ip6table_mangle ip6table_security ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_raw iptable_mangle iptable_security iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables x86_pkg_temp_thermal coretemp kvm_intel kvm i2c_algo_bit drm_kms_helper irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel drm shpchp tpm_tis tpm_tis_core tpm nfsd auth_rpcgss nfs_acl lockd grace sunrpc crc32c_intel serio_raw [last unloaded: i915] CPU: 3 PID: 1743 Comm: kworker/u8:22 Tainted: G W E 4.10.0-rc3ander+ #300 Hardware name: Intel Corp. Geminilake/GLK RVP1 DDR4 (05), BIOS GELKRVPA.X64.0023.B40.1611302145 11/30/2016 Workqueue: events_unbound async_run_entry_fn Call Trace: dump_stack+0x86/0xc3 __warn+0xcb/0xf0 warn_slowpath_fmt+0x5f/0x80 verify_connector_state.isra.80+0x26c/0x2b0 [i915] intel_atomic_commit_tail+0x520/0x1000 [i915] ? remove_wait_queue+0x70/0x70 intel_atomic_commit+0x3f8/0x520 [i915] ? intel_runtime_pm_put+0x6e/0xa0 [i915] drm_atomic_commit+0x4b/0x50 [drm] __intel_display_resume+0x72/0xc0 [i915] intel_display_resume+0x107/0x150 [i915] i915_drm_resume+0xe0/0x180 [i915] i915_pm_restore+0x1e/0x30 [i915] i915_pm_resume+0xe/0x10 [i915] pci_pm_resume+0x64/0xa0 dpm_run_callback+0xa1/0x2a0 ? pci_pm_thaw+0x90/0x90 device_resume+0xe3/0x200 async_resume+0x1d/0x50 async_run_entry_fn+0x39/0x170 process_one_work+0x212/0x670 ? process_one_work+0x197/0x670 worker_thread+0x4e/0x490 kthread+0x101/0x140 ? process_one_work+0x670/0x670 ? kthread_create_on_node+0x60/0x60 ret_from_fork+0x2a/0x40 Cc: David Weinehall Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: David Weinehall Link: http://patchwork.freedesktop.org/patch/msgid/20170222063431.10060-6-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_runtime_pm.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit f4f4b59be52b28823642f82312e15369d783d858 Author: Ander Conselvan de Oliveira Date: Wed Feb 22 08:34:29 2017 +0200 drm/i915/glk: Implement WaDDIIOTimeout Implement WaDDIIOTimeout to avoid a timeout when enabling the DDI IO power domains. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/20170222063431.10060-5-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_drv.h | 6 ++++++ drivers/gpu/drm/i915/i915_reg.h | 5 +++++ drivers/gpu/drm/i915/intel_pm.c | 10 ++++++++++ 3 files changed, 21 insertions(+) commit 9a5da00b7ce0dec87fc0707c5cd17fed03e183cd Author: Ander Conselvan de Oliveira Date: Fri Feb 24 16:18:45 2017 +0200 drm/i915: Check encoder type in enc_to_dig_port() Don't allow conversion from arbitraty encoder types to a digital port. Calling enc_to_dig_port() with the wrong encoder may seem far fetched, but certain paths of the ddi code may be called with hasell's analog encoder and the conversion is wrong for DP mst encoders too, so safe guard against it. v2: Warn if encoder type is unknown and device is not DDI. (Imre) v3: Remove stray hunk from rebase error. (Ander) Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/20170224141845.5836-1-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_drv.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 79f255a0c99cf5d871161959d91bd7ba711f949f Author: Ander Conselvan de Oliveira Date: Wed Feb 22 08:34:27 2017 +0200 drm/i915: Store encoder power domain in struct intel_encoder The encoder power domain is obviously tied to the encoder, so store it in struct intel_encoder. This avoids some indirection. v2: Rebase Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/20170222063431.10060-3-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_crt.c | 21 +++++++++------------ drivers/gpu/drm/i915/intel_ddi.c | 15 +++++++-------- drivers/gpu/drm/i915/intel_display.c | 31 ++----------------------------- drivers/gpu/drm/i915/intel_dp.c | 8 ++++---- drivers/gpu/drm/i915/intel_dp_mst.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 4 ++-- drivers/gpu/drm/i915/intel_dsi.c | 9 +++++---- drivers/gpu/drm/i915/intel_dvo.c | 1 + drivers/gpu/drm/i915/intel_hdmi.c | 8 ++++---- drivers/gpu/drm/i915/intel_lvds.c | 8 ++++---- drivers/gpu/drm/i915/intel_sdvo.c | 1 + drivers/gpu/drm/i915/intel_tv.c | 1 + 12 files changed, 41 insertions(+), 67 deletions(-) commit 5432fcaff3cee045ddbd94f29802ee3ac4f50283 Author: Ander Conselvan de Oliveira Date: Wed Feb 22 08:34:26 2017 +0200 drm/i915: Store aux power domain in intel_dp The aux power domain only makes sense in the DP code. Storing it in struct intel_dp avoids some indirection. v2: Rebase Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Imre Deak Link: http://patchwork.freedesktop.org/patch/msgid/20170222063431.10060-2-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_display.c | 50 ----------------------------- drivers/gpu/drm/i915/intel_dp.c | 61 ++++++++++++++---------------------- drivers/gpu/drm/i915/intel_drv.h | 3 +- 3 files changed, 24 insertions(+), 90 deletions(-) commit 7adbd209ce5a1b17754e2b73ec43aed392ee950c Author: Archit Taneja Date: Wed Feb 22 14:17:41 2017 +0530 drm/doc: Fix up some kms function names A couple of the kms functions didn't have the correct/newest names. This prevented them to be identified as refs in the html doc. Reviewed-by: Eric Engestrom Tested-by: Eric Engestrom Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170222084741.8485-1-architt@codeaurora.org include/drm/drm_mode_config.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8c47c0860b90094e3bdd05303a34884c8e3b6f77 Author: kbuild test robot Date: Fri Feb 24 00:46:48 2017 +0800 drm/tinydrm: fix semicolon.cocci warnings drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c:454:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Fengguang Wu Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170223164647.GA2519@lkp-ws02 drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b29461d6dbd6e2f59199f5177d5a2c5ef46656ad Author: Colin Ian King Date: Thu Feb 23 00:07:17 2017 +0000 drm: kselftest: fix spelling mistake: "misalinged" -> "misaligned" trivial fix to spelling mistake in pr_err message Signed-off-by: Colin Ian King Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170223000717.8898-1-colin.king@canonical.com drivers/gpu/drm/selftests/test-drm_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2955b73def6712b693fc7ad82b34b3831faaa146 Author: Chris Wilson Date: Tue Feb 21 09:30:00 2017 +0000 dma-buf/reservation: Wrap ww_mutex_trylock In a similar fashion to reservation_object_lock() and reservation_object_unlock(), ww_mutex_trylock is also useful and so is worth wrapping for consistency. Signed-off-by: Chris Wilson Cc: Sumit Semwal Cc: Joonas Lahtinen Cc: Daniel Vetter [danvet: Add __must_check Joonas wants.] Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170221093000.22802-1-chris@chris-wilson.co.uk include/linux/reservation.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 5f15257689bfaacfc1ecd7d91a2e0515a5d3d104 Author: Xinliang Liu Date: Wed Feb 15 17:19:08 2017 +0100 drm/fb-helper: Add multi buffer support for cma fbdev This patch add a config to support to create multi buffer for cma fbdev. Such as double buffer and triple buffer. Cma fbdev is convient to add a legency fbdev. And still many Android devices use fbdev now and at least double buffer is needed for these Android devices, so that a buffer flip can be operated. It will need some time for Android device vendors to abondon legency fbdev. So multi buffer for fbdev is needed. Signed-off-by: Xinliang Liu [s.christ@phytec.de: Picking patch from https://lkml.org/lkml/2015/9/14/188] Signed-off-by: Stefan Christ Signed-off-by: Maxime Ripard Acked-by: Dave Airlie Tested-by: Neil Armstrong Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/075ffb50cc16ab055b5d47b30163401bb356ab51.1487175046.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/Kconfig | 9 +++++++++ drivers/gpu/drm/drm_fb_helper.c | 10 ++++++++++ 2 files changed, 19 insertions(+) commit cd2523569a733d85788b6fc016e4e23cb3549a25 Author: Gabriel Krisman Bertazi Date: Thu Feb 16 14:44:42 2017 -0200 drm: Always prepare null framebuffer in transitional helper Despite the documentation claim that cleanup_fb will match prior calls to prepare_fb, in case of NULL framebuffers in the transitional helpers, the code will skip the call to prepare_fb but not the corresponding cleanup_fb call. This asymmetry in semantics is unnecessarily surprising for developers transitioning drivers to atomic model, specially because the final atomic handlers don't have the issue - the prepare_fb is always called, despite the new state framebuffer being null. The only current user of the transitional helper that doesn't take care of null framebuffers explicitly inside the prepare_fb hook is atmel_hlcdc, so we take special care to make sure we don't break anything there. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170216164442.28704-1-krisman@collabora.co.uk drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 3 +++ drivers/gpu/drm/drm_plane_helper.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) commit 3c6d6e0fbf5eb6367dfc8a97f72bd625e78b1aae Author: Joe Perches Date: Wed Feb 15 15:33:18 2017 -0800 drm: drm_printer: add __printf validation drm_printf does not currently use the compiler to verify format and arguments. Make it do so. Miscellanea: o Add appropriate #include files for __printf and struct va_format o Convert dev_printk to dev_info Signed-off-by: Joe Perches Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/133858f214e9b90f92bb8eb44c6b1dc04429933d.1487201526.git.joe@perches.com drivers/gpu/drm/drm_print.c | 2 +- include/drm/drm_print.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 8e22e1b3499a446df48c2b26667ca36c55bf864c Merge: 00d3c14 64a5771 Author: Daniel Vetter Date: Sun Feb 26 21:34:42 2017 +0100 Merge airlied/drm-next into drm-misc-next Backmerge the main pull request to sync up with all the newly landed drivers. Otherwise we'll have chaos even before 4.12 started in earnest. Signed-off-by: Daniel Vetter commit 9260a0409794a59079393e843511414d5f08c14b Author: Hans de Goede Date: Fri Feb 10 11:27:51 2017 +0100 x86/platform/intel/iosf_mbi: Add a mutex for P-Unit access One some systems the P-Unit accesses the PMIC to change various voltages through the same bus as other kernel drivers use for e.g. battery monitoring. If a driver sends requests to the P-Unit which require the P-Unit to access the PMIC bus while another driver is also accessing the PMIC bus various bad things happen. This commit adds a mutex to protect the P-Unit against simultaneous accesses and 2 functions to lock / unlock this mutex. Note on these systems the i2c-bus driver will request a sempahore from the P-Unit for exclusive access to the PMIC bus when i2c drivers are accessing it, but this does not appear to be sufficient, we still need to avoid making certain P-Unit requests during the access window to avoid problems. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=155241 Signed-off-by: Hans de Goede Tested-by: tagorereddy Reviewed-by: Andy Shevchenko Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170210102802.20898-2-hdegoede@redhat.com arch/x86/include/asm/iosf_mbi.h | 31 +++++++++++++++++++++++++++++++ arch/x86/platform/intel/iosf_mbi.c | 13 +++++++++++++ 2 files changed, 44 insertions(+) commit 9e89f9ee3b16cca56bed5fa45e63f422d3ac2c3a Author: Chris Wilson Date: Sat Feb 25 18:11:22 2017 +0000 drm/i915: Advance start address on crossing PML (48b ppgtt) boundary When advancing onto the next 4th level page table entry, we need to reset our indices to 0. Currently we restart from the original address which means we start with an offset into the next PML table. Fixes: 894ccebee2b0 ("drm/i915: Micro-optimise gen8_ppgtt_insert_entries()") Reported-by: Matthew Auld Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99948 Testcase: igt/drv_selftest/live_gtt Signed-off-by: Chris Wilson Cc: Matthew Auld Tested-by: Matthew Auld Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170225181122.4788-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 63 ++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 22 deletions(-) commit aa149431279166025bc457007e5a1fdcb4d2db9b Author: Chris Wilson Date: Sat Feb 25 18:11:21 2017 +0000 drm/i915: Sanity check the vma->node prior to binding into the GTT We rely on the VMA being allocated inside the drm_mm and for its allotted node being large enough to accommodate all the vma->pages. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170225181122.4788-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_vma.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 357480ce2fe4dc11ff0b77706d77e2319c96fe31 Author: Chris Wilson Date: Sat Feb 25 18:11:20 2017 +0000 drm/i915: Assert we do not overflow 4lvl page directories Before looking up the page directory entry, check we are still within bounds. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170225181122.4788-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b3bb82885feb74feadc101a700e64ed7ede84b04 Author: Chris Wilson Date: Sat Feb 25 18:11:19 2017 +0000 drm/i915: Assert all sg are initialised in fake_dma_object for selftests Double check that we allocated the right amount of scatterlist elements for our obj->size. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170225181122.4788-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 ++ 1 file changed, 2 insertions(+) commit 6afb6b6ed866c743629b4dd9ac381e418222cc98 Author: H. Nikolaus Schaller Date: Thu Feb 23 09:32:36 2017 -0800 Input: ad7846 - move bindings to touchscreen subdirectory This moves device tree bindings for ADS7846 together with the other touchscreen bindings. Signed-off-by: H. Nikolaus Schaller Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/ads7846.txt | 94 ---------------------- .../bindings/input/touchscreen/ads7846.txt | 94 ++++++++++++++++++++++ 2 files changed, 94 insertions(+), 94 deletions(-) commit a4deb14712bdd0bd261de38be1d9f01f5b26543d Author: Randy Dunlap Date: Sat Feb 25 10:32:58 2017 -0800 Input: ad7879 - add header file to fix ad7879.c build errors Add header file to fix these build errors: ../drivers/input/touchscreen/ad7879.c: In function 'ad7879_parse_dt': ../drivers/input/touchscreen/ad7879.c:505:2: error: implicit declaration of function 'device_property_read_u32' [-Werror=implicit-function-declaration] err = device_property_read_u32(dev, "adi,resistance-plate-x", &tmp); ^ ../drivers/input/touchscreen/ad7879.c:512:2: error: implicit declaration of function 'device_property_read_u8' [-Werror=implicit-function-declaration] device_property_read_u8(dev, "adi,first-conversion-delay", ^ ../drivers/input/touchscreen/ad7879.c:521:2: error: implicit declaration of function 'device_property_read_bool' [-Werror=implicit-function-declaration] ts->swap_xy = device_property_read_bool(dev, "touchscreen-swapped-x-y"); ^ Signed-off-by: Randy Dunlap Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ad7879.c | 1 + 1 file changed, 1 insertion(+) commit 8f867691ebbce7f03b3bcf79fad61b0454e89e91 Author: sayli karnik Date: Mon Feb 20 01:28:35 2017 +0530 staging: iio: ad7152: Use BIT() macro for left shifting 1 Replace left shifting on 1 with the BIT(x) macro as suggested by checkpatch.pl. Signed-off-by: sayli karnik Acked-by: Julia Lawall Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7152.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b0105002816907daf72e984a72e16e3a5f2471cc Author: Song Hongyan Date: Wed Feb 22 17:23:33 2017 +0800 hid: hid-sensor-prox: Add more data field for hysteresis parsing Add HID_USAGE_SENSOR_HUMAN_PRESENCE support for Human Presence sensitivity parsing, in case some implementation uses it as sensitivity modifier. Signed-off-by: Song Hongyan Acked-by: Srinivas Pandruvada Signed-off-by: Jonathan Cameron drivers/iio/light/hid-sensor-prox.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 91e32157de148ce37422d8110f6f8a84d05da1ec Author: Chris Wilson Date: Fri Feb 24 19:33:15 2017 +0000 drm/i915: Timeout lowlevel_hole GTT selftest early Check for a timeout in the lowlevel_hole GTT before we allocate state for that pass, as our cleanup phase stops on the iteration before the timeout. References: https://bugs.freedesktop.org/show_bug.cgi?id=99947 Signed-off-by: Chris Wilson Cc: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170224193315.21072-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit ef0f411f51475f4eebf9fc1b19a85be698af19ff Author: Kenneth Graunke Date: Wed Feb 15 01:34:46 2017 -0800 drm/i915: Drop support for I915_EXEC_CONSTANTS_* execbuf parameters. This patch makes the I915_PARAM_HAS_EXEC_CONSTANTS getparam return 0 (indicating the optional feature is not supported), and makes execbuf always return -EINVAL if the flags are used. Apparently, no userspace ever shipped which used this optional feature: I checked the git history of Mesa, xf86-video-intel, libva, and Beignet, and there were zero commits showing a use of these flags. Kernel commit 72bfa19c8deb4 apparently introduced the feature prematurely. According to Chris, the intention was to use this in cairo-drm, but "the use was broken for gen6", so I don't think it ever happened. 'relative_constants_mode' has always been tracked per-device, but this has actually been wrong ever since hardware contexts were introduced, as the INSTPM register is saved (and automatically restored) as part of the render ring context. The software per-device value could therefore get out of sync with the hardware per-context value. This meant that using them is actually unsafe: a client which tried to use them could damage the state of other clients, causing the GPU to interpret their BO offsets as absolute pointers, leading to bogus memory reads. These flags were also never ported to execlist mode, making them no-ops on Gen9+ (which requires execlists), and Gen8 in the default mode. On Gen8+, userspace can write these registers directly, achieving the same effect. On Gen6-7.5, it likely makes sense to extend the command parser to support them. I don't think anyone wants this on Gen4-5. Based on a patch by Dave Gordon. v3: Return -ENODEV for the getparam, as this is what we do for other obsolete features. Suggested by Chris Wilson. Cc: stable@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92448 Signed-off-by: Kenneth Graunke Reviewed-by: Joonas Lahtinen Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170215093446.21291-1-kenneth@whitecape.org Acked-by: Daniel Vetter Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.c | 4 +-- drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_gem.c | 2 -- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 50 ++---------------------------- 4 files changed, 3 insertions(+), 55 deletions(-) commit e393d0d6c12527b2bd7faf0b5ca7edde2543c451 Author: Imre Deak Date: Wed Feb 22 17:10:52 2017 +0200 drm/i915/lspcon: Switch back to PCON mode after output replug At least a ParadTech PS175 LSPCON chip/firmware uses long instead of short pulses to signal output unplug/plug events. This is contrary to how branch devices normally work which use short HPD signaling. This chip will also switch to LS mode after an unplug event, which could be the consequence of the long HPD signaling semantics and an effort to save power automatically. Because of this we'll fail to do AUX and detect the output after a replug event. To fix this make sure we are in PCON mode during connector detection. v2: - Switch the mode in the proper spot. Cc: raptorteak@gmail.com Cc: Shashank Sharma Cc: Ville Syrjälä Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98912 Reported-and-tested-by: raptorteak@gmail.com Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1487776252-6288-1-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_dp.c | 4 ++++ 1 file changed, 4 insertions(+) commit fe9ae7a3bfdb1d5933210f53e9efa7655768d238 Author: Chris Wilson Date: Thu Feb 23 14:50:31 2017 +0000 drm/i915/execlists: Detect an out-of-order context switch We require that the request is completed before the context is switched away. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170223145031.26210-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_lrc.c | 1 + 1 file changed, 1 insertion(+) commit ffe5111e28e52212040db1617a75035d6d6f9447 Author: Ville Syrjälä Date: Thu Feb 23 19:49:01 2017 +0200 drm/i915: Introduce intel_ddi_dp_voltage_max() Rather than sprinkling ideas of how big the DDI buf translation tables are somewhere in intel_dp.c, let's concentrate it all in intel_ddi.c where the actual tables are defined. To that end we introduce intel_ddi_dp_voltage_max() which will actually look at the proper translation table to determine what is the maximum voltage swing level supported. v2: Mask out the preemphasis bits from the return value of intel_ddi_dp_voltage_max() Signed-off-by: Ville Syrjälä Reviewed-by: David Weinehall Link: http://patchwork.freedesktop.org/patch/msgid/20170223174901.26749-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_ddi.c | 19 +++++++++++++++++++ drivers/gpu/drm/i915/intel_dp.c | 5 ++--- drivers/gpu/drm/i915/intel_drv.h | 2 ++ 3 files changed, 23 insertions(+), 3 deletions(-) commit 97eeb872764ce524d87d0e0e9e25b1c9fae10b3a Author: Ville Syrjälä Date: Thu Feb 23 19:35:06 2017 +0200 drm/i915: Refactor translate_signal_level() Convert the big switch statement in translate_signal_level() into a neat table. The table also serves as documentation for the translation tables. We'll also have other uses for this table later on. v2: Remove superfluous space (David) Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170223173507.17600-2-ville.syrjala@linux.intel.com Reviewed-by: David Weinehall drivers/gpu/drm/i915/intel_ddi.c | 60 ++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 39 deletions(-) commit 7d1c42e679f920529df5cc11c6f827f17d4f8022 Author: Ville Syrjälä Date: Thu Feb 23 19:35:05 2017 +0200 drm/i915: Refactor code to select the DDI buf translation table Split the code to select the correct translation table into DP, eDP and FDI specific helpers. This reduces the clutter in intel_prepare_dp_ddi_buffers(), and we'll have other uses for some of these new helper functions later on. v2: Fix typo in commit message (David) Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170223173507.17600-1-ville.syrjala@linux.intel.com Reviewed-by: David Weinehall drivers/gpu/drm/i915/intel_ddi.c | 126 +++++++++++++++++++++++---------------- 1 file changed, 73 insertions(+), 53 deletions(-) commit 754a76591b12c88f57ad8b4ca533a5c9566a1922 Author: Chris Wilson Date: Fri Feb 24 11:43:06 2017 +0000 drm/i915/fbdev: Stop repeating tile configuration on stagnation If we cease making progress in finding matching outputs for a tiled configuration, stop looping over the remaining unconfigured outputs. v2: Use conn_seq (instead of pass) to only apply tile configuration on first pass. Fixes: b0ee9e7fa5b4 ("drm/fb: add support for tiled monitor configurations. (v2)") Signed-off-by: Chris Wilson Cc: Tomasz Lis Cc: Dave Airlie Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: # v3.19+ Reviewed-by: Tomasz Lis Link: http://patchwork.freedesktop.org/patch/msgid/20170224114306.4400-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_fbdev.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 8d0e9bcb2b0cbc2d5c3668e1a445571b4b73317f Author: Chris Wilson Date: Thu Feb 23 12:20:37 2017 +0000 drm/i915: Suppress fbc suggestion to increase stolen if disabled If the reserved region of memory has not been setup (most probably because it has been limited by hardware or virtualisation), don't tell the user to try and increase the amount of memory reserved for graphics. Signed-off-by: Chris Wilson Cc: Rodrigo Vivi Link: http://patchwork.freedesktop.org/patch/msgid/20170223122037.16174-1-chris@chris-wilson.co.uk eviewed-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_fbc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a685f48cf6bc88d3902cd051838558079eaf02a0 Merge: 9dd46c0 db4572f Author: Dmitry Torokhov Date: Thu Feb 23 09:22:10 2017 -0800 Merge branch 'tsc2007' into next Bring in TSC2007 improvements. commit 9dd46c02532a6bed6240101ecf4bbc407f8c6adf Author: Dmitry Torokhov Date: Mon Feb 13 15:45:59 2017 -0800 Input: tca8418_keypad - remove double read of key event register There is no need to tread the same register twice in a row. Fixes: ea4348c8462a ("Input: tca8418_keypad - hide gcc-4.9 -Wmaybe-un ...") Signed-off-by: Dmitry Torokhov drivers/input/keyboard/tca8418_keypad.c | 2 -- 1 file changed, 2 deletions(-) commit c852270a62cc07ef900f99ee812c0512f9c3583a Author: Michael Hennerich Date: Wed Feb 22 10:33:32 2017 -0800 Input: ad7879 - add SPI device tree binding example Signed-off-by: Michael Hennerich Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/touchscreen/ad7879.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 2581e5d104298fc72022a6f849921533693d08fe Author: Michael Hennerich Date: Wed Feb 22 10:34:20 2017 -0800 Input: ad7879 - update MODULE_AUTHOR email address Signed-off-by: Michael Hennerich Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ad7879-i2c.c | 2 +- drivers/input/touchscreen/ad7879-spi.c | 2 +- drivers/input/touchscreen/ad7879.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit b4816f794d672494deb6e87bb0a8ef41ca1ca329 Author: Michael Hennerich Date: Wed Feb 22 10:32:48 2017 -0800 Input: ad7879-spi - remove bits_per_word = 16 enforcement Using regmap this is no longer required. Signed-off-by: Michael Hennerich Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ad7879-spi.c | 8 -------- 1 file changed, 8 deletions(-) commit b621e30be6120f1b20c6077a3462dd261d6ecc90 Author: Dmitry Torokhov Date: Fri Feb 17 10:45:59 2017 -0800 Input: ad7879 - allow exporting AUX/VBAT/GPIO pin via device property Up until now only platforms using legacy platform data were able to switch AUX/VBAT/GPIO pin in GPIO mode and use it as regular GPIO line. Let's allow platforms using generic device properties to do the same. Reviewed-by: Michael Hennerich Tested-by: Michael Hennerich Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/touchscreen/ad7879.txt | 1 + drivers/input/touchscreen/ad7879.c | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) commit 069b2e2cd7ef5b42e1ab8ee991347f9dbf9f51d1 Author: Dmitry Torokhov Date: Fri Feb 17 09:29:40 2017 -0800 Input: ad7879 - use more devm interfaces gpiochip_add now has a managed version, and we can remove sysfs attribute group via devm_add_action_or_reset (at least until we have devm version of sysfs_create_group). This allows us to get rid of ad7879_remove(). Reviewed-by: Michael Hennerich Tested-by: Michael Hennerich Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ad7879-i2c.c | 12 ------- drivers/input/touchscreen/ad7879-spi.c | 10 ------ drivers/input/touchscreen/ad7879.c | 60 ++++++++++++---------------------- drivers/input/touchscreen/ad7879.h | 1 - 4 files changed, 21 insertions(+), 62 deletions(-) commit 404a24c35db8c44dce91010023f12b73f2f44441 Author: Dmitry Torokhov Date: Thu Feb 16 23:22:38 2017 -0800 Input: ad7879 - convert to use regmap Instead of rolling our own infrastructure to provide uniform access to I2C and SPI buses, let's switch to using regmap. Reviewed-by: Michael Hennerich Tested-by: Michael Hennerich Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/Kconfig | 2 + drivers/input/touchscreen/ad7879-i2c.c | 50 ++++----------- drivers/input/touchscreen/ad7879-spi.c | 110 +++++---------------------------- drivers/input/touchscreen/ad7879.c | 46 +++++++++----- drivers/input/touchscreen/ad7879.h | 12 +--- 5 files changed, 64 insertions(+), 156 deletions(-) commit 00d3c14f14d51babd8aeafd5fa734ccf04f5ca3d Author: Ander Conselvan de Oliveira Date: Wed Feb 22 14:59:28 2017 +0200 drm: Add name for DRM_DP_DUAL_MODE_LSPCON Handle DRM_DP_DUAL_MODE_LSPCON in drm_dp_get_dual_mode_type_name(), otherwise a call to that function can theoretically trigger a WARN. Fixes: 056996b95686 ("drm: Helper for lspcon in drm_dp_dual_mode") Cc: Shashank Sharma Cc: Rodrigo Vivi Cc: Dave Airlie Cc: Ville Syrjälä Cc: Jani Nikula Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Reviewed-by: Shashank Sharma Signed-off-by: Ander Conselvan de Oliveira Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/20170222125928.30223-1-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/drm_dp_dual_mode_helper.c | 2 ++ 1 file changed, 2 insertions(+) commit e0ba12ea5e1329bc25a774174ea0a102b7876f30 Author: Andrzej Hajda Date: Wed Feb 22 12:47:37 2017 +0100 drm/bridge/sii8620: add missing error handling in probe devm_request_threaded_irq result should be checked for errors. Signed-off-by: Andrzej Hajda Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1487764057-23362-1-git-send-email-a.hajda@samsung.com drivers/gpu/drm/bridge/sil-sii8620.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0f2f61d4a8d4611155e7d1633db271ead9057981 Author: Chris Wilson Date: Thu Feb 23 07:44:22 2017 +0000 drm/i915: Remove one level of indention from wait-for-execute Now that the code is getting simpler, we can reduce the indentation when waiting for the global_seqno. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-17-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 39 +++++++++++++++------------------ 1 file changed, 18 insertions(+), 21 deletions(-) commit 24f417ec0c41a8e2b27ae7d2d64fe0ea13f322dd Author: Chris Wilson Date: Thu Feb 23 07:44:21 2017 +0000 drm/i915: Immediately process a reset before starting waiting As we handoff the GPU reset to the waiter, we need to check we don't miss a wakeup if it has already been sent prior to us starting the wait. v2: Tweak checking for reset to be clear to the need before sleeping after changing the task state. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-16-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_request.c | 3 +++ 1 file changed, 3 insertions(+) commit e07051142cbcb991e4fedf86afd8f00425dbc89a Author: Chris Wilson Date: Thu Feb 23 07:44:20 2017 +0000 drm/i915: Refactor direct GPU reset from request waiters Combine the common code for the pair of waiters into a single function. v2: Rename reset_request to wait_request_check_and_reset Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-15-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_request.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit a49625f90662799426dd99daab97559ef620dce1 Author: Chris Wilson Date: Thu Feb 23 07:44:19 2017 +0000 drm/i915: Replace reset_wait_queue with default_wake_function If we change the wait_queue_t from using the autoremove_wake_function to the default_wake_function, we no longer have to restore the wait_queue_t entry on the wait_queue_head_t list after being woken up by it, as we are unusual in sleeping multiple times on the same wait_queue_t. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-14-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) commit 591c0fb85d1c351d28334fb249bf1faaafcf326b Author: Chris Wilson Date: Thu Feb 23 07:44:18 2017 +0000 drm/i915: Exercise request cancellation using a mock selftest Add a mock selftest to preempt a request and check that we cancel it, requeue the request and then complete its execution. v2: Error leaks no more. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-13-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/selftests/i915_gem_request.c | 64 +++++++++++++++++++++++ drivers/gpu/drm/i915/selftests/mock_request.c | 19 +++++++ drivers/gpu/drm/i915/selftests/mock_request.h | 2 + 3 files changed, 85 insertions(+) commit d6a2289d9d6b3ea47514cf29fed56340fb8fec7e Author: Chris Wilson Date: Thu Feb 23 07:44:17 2017 +0000 drm/i915: Remove the preempted request from the execution queue After the request is cancelled, we then need to remove it from the global execution timeline and return it to the context timeline, the inverse of submit_request(). v2: Move manipulation of struct intel_wait to helpers Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-12-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_request.c | 55 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_request.h | 3 ++ drivers/gpu/drm/i915/intel_breadcrumbs.c | 17 ++++++++-- 3 files changed, 73 insertions(+), 2 deletions(-) commit 9eb143bbec7dfdfce8aa7f6a3b0f40af4e95e7b7 Author: Chris Wilson Date: Thu Feb 23 07:44:16 2017 +0000 drm/i915: Allow a request to be cancelled If we preempt a request and remove it from the execution queue, we need to undo its global seqno and restart any waiters. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-11-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 71 +++++++++++++++++++++++++------- drivers/gpu/drm/i915/intel_ringbuffer.h | 1 + 2 files changed, 57 insertions(+), 15 deletions(-) commit cced5e2f098d9db26cf4119e309068b79cca1274 Author: Chris Wilson Date: Thu Feb 23 07:44:15 2017 +0000 drm/i915: Take a reference whilst processing the signaler request The plan in the near-future is to allow requests to be removed from the signaler. We can no longer then rely on holding a reference to the request for the duration it is in the signaling tree, and instead must obtain a reference to the request for the current operation using RCU. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-10-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 22 +++++++++++++++------- drivers/gpu/drm/i915/intel_ringbuffer.h | 2 +- 2 files changed, 16 insertions(+), 8 deletions(-) commit 754c9fd5764909bc7c3ba9779355d55cb357be8a Author: Chris Wilson Date: Thu Feb 23 07:44:14 2017 +0000 drm/i915: Protect the request->global_seqno with the engine->timeline lock A request is assigned a global seqno only when it is on the hardware execution queue. The global seqno can be used to maintain a list of requests on the same engine in retirement order, for example for constructing a priority queue for waiting. Prior to its execution, or if it is subsequently removed in the event of preemption, its global seqno is zero. As both insertion and removal from the execution queue may operate in IRQ context, it is not guarded by the usual struct_mutex BKL. Instead those relying on the global seqno must be prepared for its value to change between reads. Only when the request is complete can the global seqno be stable (due to the memory barriers on submitting the commands to the hardware to write the breadcrumb, if the HWS shows that it has passed the global seqno and the global seqno is unchanged after the read, it is indeed complete). Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-9-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 17 +++++- drivers/gpu/drm/i915/i915_gem.c | 16 ++++-- drivers/gpu/drm/i915/i915_gem_request.c | 45 ++++++++++----- drivers/gpu/drm/i915/i915_gem_request.h | 66 +++++++++++++++++----- drivers/gpu/drm/i915/intel_breadcrumbs.c | 11 ++-- drivers/gpu/drm/i915/intel_ringbuffer.h | 39 ++++++++++++- drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c | 6 +- 7 files changed, 155 insertions(+), 45 deletions(-) commit fe49789fab974dd04c0fef26a4ce7f7f411b40dd Author: Chris Wilson Date: Thu Feb 23 07:44:13 2017 +0000 drm/i915: Deconstruct execute fence On reflection, we are only using the execute fence as a waitqueue on the global_seqno and not using it for dependency tracking between fences (unlike the submit and dma fences). By only treating it as a waitqueue, we can then treat it similar to the other waitqueues during submit, making the code simpler. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-8-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 50 ++++++++------------------------- drivers/gpu/drm/i915/i915_gem_request.h | 10 +------ 2 files changed, 13 insertions(+), 47 deletions(-) commit 541ca6ed79f0058f8885b2b41409204731946767 Author: Chris Wilson Date: Thu Feb 23 07:44:12 2017 +0000 drm/i915: Inline __i915_gem_request_wait_for_execute() It had only one callsite and existed to keep the code clearer. Now having shared the wait-on-error between phases and with plans to change the wait-for-execute in the next few patches, remove the out of line wait loop and move it into the main body of i915_wait_request. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 78 ++++++++++++--------------------- 1 file changed, 29 insertions(+), 49 deletions(-) commit 7de53bf7e6f3f823267f77b1fe19e6db7532000d Author: Chris Wilson Date: Thu Feb 23 07:44:11 2017 +0000 drm/i915: Add ourselves to the gpu error waitqueue for the entire wait Add ourselves to the gpu error waitqueue earlier on, even before we determine we have to wait on the seqno. This is so that we can then share the waitqueue between stages in subsequent patches. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4b36b2e506779008c302784437dc102d1ccc7537 Author: Chris Wilson Date: Thu Feb 23 07:44:10 2017 +0000 drm/i915: Use a local to shorten req->i915->gpu_error.wait_queue Use a local variable to avoid having to type out the full name of the gpu_error wait_queue. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 12d3173b2e55b4abeb6710dbd7b823f5241c4a45 Author: Chris Wilson Date: Thu Feb 23 07:44:09 2017 +0000 drm/i915: Move reserve_seqno() next to unreserve_seqno() Move the companion functions next to each other. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 161 +++++++++++++++----------------- 1 file changed, 77 insertions(+), 84 deletions(-) commit 9b6586ae9f6bf2115cf414d6004bbe69a4255692 Author: Chris Wilson Date: Thu Feb 23 07:44:08 2017 +0000 drm/i915: Keep a global seqno per-engine Replace the global device seqno with one for each engine, and account for in-flight seqno on each separately. This is consistent with dma-fence as each timeline has separate fence-contexts for each engine and a seqno is only ordered within a fence-context (i.e. seqno do not need to be ordered wrt to other engines, just ordered within a single engine). This is required to enable request rewinding for preemption on individual engines (we have to rewind the global seqno to avoid overflow, and we do not have to rewind all engines just to preempt one.) v2: Rename active_seqno to inflight_seqnos to more clearly indicate that it is a counter and not equivalent to the existing seqno. Update functions that operated on active_seqno similarly. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 11 +---- drivers/gpu/drm/i915/i915_gem_request.c | 83 +++++++++++++++++--------------- drivers/gpu/drm/i915/i915_gem_request.h | 8 +-- drivers/gpu/drm/i915/i915_gem_timeline.h | 9 +++- drivers/gpu/drm/i915/intel_breadcrumbs.c | 33 ++++++------- drivers/gpu/drm/i915/intel_engine_cs.c | 2 - drivers/gpu/drm/i915/intel_ringbuffer.h | 4 +- 7 files changed, 70 insertions(+), 80 deletions(-) commit 309663ab7b4f0de1540aff212fd067e3dd92acf3 Author: Chris Wilson Date: Thu Feb 23 07:44:07 2017 +0000 drm/i915: Check against the signaled bit for fences/requests When dma_fence_signal() is called, it sets a flag to indicate the fence is complete. Before the dma_fence is signaled, the seqno check will first be passed. During an unlocked check (such as inside a waiter), it is possible for the fence to be signaled even though the seqno has been reset (by engine wraparound). In this case the waiter will be kicked, but for an extra layer of protection we can check the persistent signaled bit from the fence. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit a5570fe5c2ca012f92666eb790973827554e19df Author: Chris Wilson Date: Thu Feb 23 11:51:02 2017 +0000 Revert "drm/i915/dp: Ratelimit DP aux timeout messages" This reverts commit 7ee686034b8b "drm/i915/dp: Ratelimit DP aux timeout messages" as although it successfully squelches the debug messages, when it does so it generates a warning instead. CI lights up orange with all the warnings! In its current incarnation DRM_DEBUG_RATELIMITED is not usable for us, and we need to first teach lib/ratelimit.c not to warn when used for debug messages. Fixes: 7ee686034b8b ("drm/i915/dp: Ratelimit DP aux timeout messages") Signed-off-by: Chris Wilson Cc: Lyude Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Link: http://patchwork.freedesktop.org/patch/msgid/20170223115102.7059-1-chris@chris-wilson.co.uk Acked-by: Ville Syrjälä drivers/gpu/drm/i915/intel_dp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 08f5ba97aa9c975e8b3113620123c25998348dc4 Author: Ander Conselvan de Oliveira Date: Thu Feb 23 09:16:00 2017 +0200 drm/i915/glk: Fix Geminilake scalers mode programming Geminilake scalers can do 7x7 filtering for all supported input sizes, so it doesn't need the "high quality" mode programming, which was actually removed from that platform. v2: Split dev_priv parameter change out. (Ville) Cc: Ville Syrjälä , Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170223071600.14356-5-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_atomic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6ebc69238df36bc61380a68f607a1c2039af134f Author: Ander Conselvan de Oliveira Date: Thu Feb 23 09:15:59 2017 +0200 drm/i915/glk: Pass dev_priv to intel_atomic_setup_scalers() Pass dev_priv to intel_atomic_setup_scalers(). The next patch will need a dev_priv pointer. Cc: Ville Syrjälä Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170223071600.14356-4-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_atomic.c | 10 +++++----- drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) commit 5b7280f03cdcfcc8af7f087771bb3e49c4caa81b Author: Ander Conselvan de Oliveira Date: Thu Feb 23 09:15:58 2017 +0200 drm/i915/glk: Fix maximum scaling factor for Geminilake scalers Geminilake can output two pixels per clock, and that affects the maximum scaling factor for its scalers. Take that into account and avoid the following warning: WARNING: CPU: 1 PID: 593 at drivers/gpu/drm/i915/intel_display.c:13223 skl_max_scale.part.129+0x78/0x80 [i915] WARN_ON_ONCE(!crtc_clock || cdclk < crtc_clock) Modules linked in: x86_pkg_temp_thermal i915 coretemp kvm_intel kvm i2c_algo_bit drm_kms_helper irqbypass crct10dif_pclmul prime_numbers crc32_pclmul drm ghash_clmulni_intel shpchp tpm_tis tpm_tis_core tpm nfsd authw CPU: 1 PID: 593 Comm: kworker/u8:3 Tainted: G W 4.10.0-rc8ander+ #330 Hardware name: Intel Corp. Geminilake/GLK RVP1 DDR4 (05), BIOS GELKRVPA.X64.0035.B33.1702150552 02/15/2017 Workqueue: events_unbound async_run_entry_fn Call Trace: dump_stack+0x86/0xc3 __warn+0xcb/0xf0 warn_slowpath_fmt+0x5f/0x80 skl_max_scale.part.129+0x78/0x80 [i915] intel_check_primary_plane+0xa6/0xc0 [i915] intel_plane_atomic_check_with_state+0xd1/0x1a0 [i915] ? drm_printk+0xb5/0xc0 [drm] intel_plane_atomic_check+0x3d/0x80 [i915] drm_atomic_helper_check_planes+0x7c/0x200 [drm_kms_helper] intel_atomic_check+0xa5b/0x11a0 [i915] drm_atomic_check_only+0x353/0x600 [drm] ? drm_atomic_add_affected_connectors+0x10c/0x120 [drm] drm_atomic_commit+0x18/0x50 [drm] restore_fbdev_mode+0x14c/0x2a0 [drm_kms_helper] drm_fb_helper_restore_fbdev_mode_unlocked+0x34/0x80 [drm_kms_helper] drm_fb_helper_set_par+0x2d/0x60 [drm_kms_helper] intel_fbdev_set_par+0x1a/0x70 [i915] fbcon_init+0x582/0x610 visual_init+0xd6/0x130 do_bind_con_driver+0x1da/0x3c0 do_take_over_console+0x116/0x180 do_fbcon_takeover+0x5c/0xb0 fbcon_event_notify+0x772/0x8a0 ? __blocking_notifier_call_chain+0x35/0x70 notifier_call_chain+0x4a/0x70 __blocking_notifier_call_chain+0x4d/0x70 blocking_notifier_call_chain+0x16/0x20 fb_notifier_call_chain+0x1b/0x20 register_framebuffer+0x278/0x360 drm_fb_helper_initial_config+0x253/0x440 [drm_kms_helper] intel_fbdev_initial_config+0x18/0x30 [i915] async_run_entry_fn+0x39/0x170 process_one_work+0x212/0x670 ? process_one_work+0x197/0x670 worker_thread+0x4e/0x490 kthread+0x101/0x140 ? process_one_work+0x670/0x670 ? kthread_create_on_node+0x60/0x60 ret_from_fork+0x31/0x40 v2: s/max_pixclk/max_dotclk/ (Ville) Cc: Rodrigo Vivi Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170223071600.14356-3-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_display.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 19c3164db457e0fc65d4501fd354506228576241 Author: Ander Conselvan de Oliveira Date: Thu Feb 23 09:15:57 2017 +0200 drm/i915/glk: Fix watermark computations for third sprite plane Geminilake has a third sprite plane (or fourth universal plane) that is independent from the cursor. Make sure that for_each_plane_id_on_crtc() is aware of that extra plane so that the watermark code takes it into account. Fixes: e9c9882556fc ("drm/i915/glk: Configure number of sprite planes properly") Cc: Ander Conselvan de Oliveira Cc: Rodrigo Vivi Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170223071600.14356-2-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + 1 file changed, 1 insertion(+) commit 4509276ee824bb967885c095c610767e42345c36 Author: Chris Wilson Date: Mon Feb 20 12:47:18 2017 +0000 drm/i915: Remove Braswell GGTT update w/a Testing with concurrent GGTT accesses no longer show the coherency problems from yonder, commit 5bab6f60cb4d ("drm/i915: Serialise updates to GGTT with access through GGTT on Braswell"). My presumption is that the root cause was more likely fixed by commit 3b5724d702ef ("drm/i915: Wait for writes through the GTT to land before reading back"), along with the use of WC updates to the global gTT in commit 8448661d65f6 ("drm/i915: Convert clflushed pagetables over to WC maps". Given that the original symptoms can no longer be reproduced, time to remove the workaround. Testcase: igt/gem_concurrent_blit Signed-off-by: Chris Wilson Cc: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170220124718.14796-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_gtt.c | 28 ---------------------------- 1 file changed, 28 deletions(-) commit db4572ff0e2a017ea73ab532ed5257d7be351c88 Author: H. Nikolaus Schaller Date: Wed Feb 22 23:53:02 2017 -0800 Input: tsc2007 - correctly report pressure and not resistance to user space Previously, tsc2007 would report as ABS_PRESSURE: 0 for no pressure (resistance infinite) high value for soft pressure (high resistance) low value for firm pressure (lower resistance) This does not matter for most applications (e.g. GUI, Menu, Scrolling etc.) where the ABS_PRESSURE is ignored and only BTN_TOUCH is processed to detect screen taps. Only some special graphics applications read the pressure channel and they will be mixed up by this non-monotonic relation. So we fix it to become: 0 for no pressure (resistance infinite) low value for soft pressure (high resistance) high value for firm pressure (lower resistance) While this patch changes the values reported to userspace, ABS_PRESSURE is used rarely by userspace. Most software only relies on BTN_TOUCH (boolean), which is not affected by this patch. Some graphics software makes use of the interface and does not work correctly with the currently used inverted behaviour. Signed-off-by: H. Nikolaus Schaller Reviewed-By: Sebastian Reichel Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/tsc2007_core.c | 2 ++ 1 file changed, 2 insertions(+) commit deec586d4fcbc14a262f8b887543abcb1c64af98 Author: H. Nikolaus Schaller Date: Wed Feb 22 23:49:02 2017 -0800 Input: tsc2007 - rename function tsc2007_calculate_pressure Rename tsc2007_calculate_pressure to tsc2007_calculate_resistance because that is what it does. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/tsc2007.h | 3 +-- drivers/input/touchscreen/tsc2007_core.c | 8 ++++---- drivers/input/touchscreen/tsc2007_iio.c | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) commit c61ebe83e7fba0ad4d88dc114121cf8ff7ca8d47 Author: Dmitry Torokhov Date: Fri Feb 17 14:51:13 2017 -0800 Input: tsc2007 - switch to using input_set_capability() Do not manipulate evbits/keybits directly, use helper for that. Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/tsc2007_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7ee686034b8b008f19bfd913473acffc1ad51735 Author: Lyude Date: Wed Feb 22 22:31:02 2017 -0500 drm/i915/dp: Ratelimit DP aux timeout messages Right now this is just leaving a lot of spam in dmesg that makes real issues more difficult to debug. As well (as noted by the comment right above the DRM_DEBUG_KMS() call) this is normal behavior when there's nothing connected to the DisplayPort connector. Signed-off-by: Lyude drivers/gpu/drm/i915/intel_dp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 68c97b92c0a0dfdc134564f1f1c04b1c8ed27bba Author: Javier Martinez Canillas Date: Wed Feb 22 15:14:20 2017 -0300 spi: sc18is602: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Mark Brown drivers/spi/spi-sc18is602.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit d59b21ec6f33b6df7933e86b9906e9f4ee9b218d Author: Chris Wilson Date: Wed Feb 22 11:40:49 2017 +0000 drm/i915: Remove 'retire' parameter from intel_fb_obj_flush Setting retire=true is identical to using origin=ORIGIN_CS, so make the same simplification to intel_fb_obj_flush() as already employed for intel_fb_obj_invalidate(). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170222114049.28456-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 12 ++++++------ drivers/gpu/drm/i915/i915_gem_clflush.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_frontbuffer.c | 3 +-- drivers/gpu/drm/i915/intel_frontbuffer.h | 8 ++------ 5 files changed, 11 insertions(+), 16 deletions(-) commit 57822dc6b9cfeb5300e467ff83d8371aead90047 Author: Chris Wilson Date: Wed Feb 22 11:40:48 2017 +0000 drm/i915: Perform object clflushing asynchronously Flushing the cachelines for an object is slow, can be as much as 100ms for a large framebuffer. We currently do this under the struct_mutex BKL on execution or on pageflip. But now with the ability to add fences to obj->resv for both flips and execbuf (and we naturally wait on the fence before CPU access), we can move the clflush operation to a workqueue and signal a fence for completion, thereby doing the work asynchronously and not blocking the driver or its clients. v2: Introduce i915_gem_clflush.h and use a new name, split out some extras into separate patches. Suggested-by: Akash Goel Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Matthew Auld Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170222114049.28456-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 54 +-------- drivers/gpu/drm/i915/i915_gem_clflush.c | 189 +++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_clflush.h | 37 ++++++ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 9 +- drivers/gpu/drm/i915/intel_display.c | 44 ++++--- 7 files changed, 264 insertions(+), 72 deletions(-) commit f6aaba4dfbc8eaa1b2b756b989fb423a789ee4e8 Author: Chris Wilson Date: Wed Feb 22 11:40:47 2017 +0000 drm/i915: Skip clflushes for all non-page backed objects Generalise the skip for physical and stolen objects by skipping anything we do not have a valid address for inside the sg. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170222114049.28456-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5a97bcc69cc02d4da9599ed2c256b65fc3bd4ee7 Author: Chris Wilson Date: Wed Feb 22 11:40:46 2017 +0000 drm/i915: Amalgamate flushing of display objects We have three different paths by which userspace wants to flush the display plane (i.e. objects with obj->pin_display). Use a common helper to identify those paths and to simplify a later change. v2: Include the conditional in the name, i915_gem_object_flush_if_display Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170222114049.28456-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 41 +++++++++++++++++++++------------- drivers/gpu/drm/i915/i915_gem_object.h | 2 ++ drivers/gpu/drm/i915/intel_display.c | 9 ++------ 3 files changed, 30 insertions(+), 22 deletions(-) commit e59dc1721180b9499ce409945667763628c678c8 Author: Chris Wilson Date: Wed Feb 22 11:40:45 2017 +0000 drm/i915: Move cpu_cache_is_coherent() to header For use in the next patch, take the current is-coherent helper and add it to i915_gem_object.h Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170222114049.28456-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 6 ++++++ drivers/gpu/drm/i915/i915_gem.c | 20 ++++++-------------- 2 files changed, 12 insertions(+), 14 deletions(-) commit 208b84a3757e15a1c002820aefa941a3293b9efa Author: Chris Wilson Date: Wed Feb 22 11:40:44 2017 +0000 drm/i915: Remove change_domain tracepoint The change_domain tracepoint has been inaccurate for a few years - it doesn't fully capture the domains, especially with userspace bypassing them. It is defunct, misleading and time to be removed. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170222114049.28456-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 30 ------------------------------ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 3 --- drivers/gpu/drm/i915/i915_trace.h | 24 ------------------------ 3 files changed, 57 deletions(-) commit e6b377dbbb944d5e3ceef4e5d429fc5c841e3692 Merge: 9eeb0ed c470abd Author: Mauro Carvalho Chehab Date: Wed Feb 22 07:44:15 2017 -0300 Merge tag 'v4.10' into patchwork Linux 4.10 * tag 'v4.10': (1558 commits) Linux 4.10 Fix missing sanity check in /dev/sg scsi: don't BUG_ON() empty DMA transfers ipv6: release dst on error in ip6_dst_lookup_tail printk: use rcuidle console tracepoint ARM: multi_v7_defconfig: enable Qualcomm RPMCC irda: Fix lockdep annotations in hashbin_delete(). vxlan: fix oops in dev_fill_metadata_dst dccp: fix freeing skb too early for IPV6_RECVPKTINFO dpaa_eth: small leak on error packet: Do not call fanout_release from atomic contexts reset: fix shared reset triggered_count decrement on error ntb: ntb_hw_intel: link_poll isn't clearing the pending status properly ntb_transport: Pick an unused queue ntb: ntb_perf missing dmaengine_unmap_put NTB: ntb_transport: fix debugfs_remove_recursive Revert "nohz: Fix collision between tick and other hrtimers" vfs: fix uninitialized flags in splice_to_pipe() drm/radeon: Use mode h/vdisplay fields to hide out of bounds HW cursor ARM: 8658/1: uaccess: fix zeroing of 64-bit get_user() ... commit 1d6aa7a339713179e5aa15f11a70e244b2334d32 Author: Chris Wilson Date: Tue Feb 21 16:26:19 2017 +0000 drm/i915: Add i915_param charp macro magic Handling the dynamic charp module parameter requires us to copy it for the error state, or remember to lock it when reading (in case it used with 0600). v2: Use __always_inline and __builtin_strcmp Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170221162619.15954-1-chris@chris-wilson.co.uk Reviewed-by: Jani Nikula drivers/gpu/drm/i915/i915_debugfs.c | 2 ++ drivers/gpu/drm/i915/i915_gpu_error.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) commit 718e884a0183b09a2af8c06818df5d60f94243ce Author: Chuanxiao Dong Date: Thu Feb 16 14:36:40 2017 +0800 drm/i915/gvt: set ring buffer size to default for guc submission When not using GuC submission, the ring buffer size for GVT context is 512KB which is the max size. When switching to GuC submission, the ring buffer size is required to be less than 16KB. So use the GVT context default ring buffer size if GuC submission is enabled. Signed-off-by: Chuanxiao Dong Link: http://patchwork.freedesktop.org/patch/msgid/20170216063639.GA17107@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ccd0657c33b2c3701c5b14725284b7e671d3fb93 Author: Jonas Gorski Date: Wed Feb 22 00:30:40 2017 +0100 spi/bcm63xx: fix typo in bcm63xx_spi_max_length breaking compilation Fix compilation by renaming argument dev to spi as expected by the code. Fixes the following error: drivers/spi/spi-bcm63xx.c: In function ‘bcm63xx_spi_max_length’: drivers/spi/spi-bcm63xx.c:434:50: error: ‘spi’ undeclared (first use in this function) struct bcm63xx_spi *bs = spi_master_get_devdata(spi->master); ^~~ Fixes: 0135c03df914 ("spi/bcm63xx: make spi subsystem aware of message size limits") Signed-off-by: Jonas Gorski Signed-off-by: Mark Brown drivers/spi/spi-bcm63xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 870e0ddc4345e71239bfe4af03ad47976b5fa502 Author: Baoyou Xie Date: Thu Feb 16 19:05:06 2017 +0800 ASoC: zx-tdm: add zte's tdm controller driver This patch adds tdm controller driver for zte's SoC family. Signed-off-by: Baoyou Xie Reviewed-by: Shawn Guo Signed-off-by: Mark Brown sound/soc/zte/Kconfig | 8 + sound/soc/zte/Makefile | 1 + sound/soc/zte/zx-tdm.c | 461 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 470 insertions(+) commit 5949dae3a4512fa1ca61eac947c349442acc12b0 Author: Baoyou Xie Date: Thu Feb 16 19:05:04 2017 +0800 ASoC: zx-tdm: add bindings doc for zte's tdm controller This patch adds dt-binding documentation for zte's tdm controller. Signed-off-by: Baoyou Xie Reviewed-by: Shawn Guo Signed-off-by: Mark Brown .../devicetree/bindings/sound/zte,tdm.txt | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 54e43b6085f12bec3718806d0bf6ba4a3e4b2078 Author: Jonas Gorski Date: Tue Feb 21 11:58:21 2017 +0100 spi/bcm63xx: document bcm63xx SPI devicetree bindings Add documentation for the bindings of the low speed SPI controller found on most bcm63xx SoCs. Signed-off-by: Jonas Gorski Signed-off-by: Mark Brown .../devicetree/bindings/spi/spi-bcm63xx.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit c29f08890ae337e398becf5ba586114553e99771 Author: Jonas Gorski Date: Tue Feb 21 11:58:22 2017 +0100 spi/bcm63xx: allow for probing through devicetree Add required binding support to probe through device tree. Use the compatible instead of the resource size for identifiying the block type, and allow reducing the number of cs lines through OF. Signed-off-by: Jonas Gorski Signed-off-by: Mark Brown drivers/spi/spi-bcm63xx.c | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) commit 04bab35044e7aa54031e55e3f7039141c54e70d7 Author: Bhumika Goyal Date: Wed Feb 22 01:33:27 2017 +0530 ALSA: usb-audio: constify snd_kcontrol_new structures Declare snd_kcontrol_new structures as const as they are only passed as an argument to the function add_new_ctl. This agrument is of type const, so snd_kcontrol_new structures having this property can be made const too. Signed-off-by: Bhumika Goyal Signed-off-by: Takashi Iwai sound/usb/mixer_scarlett.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f3b827e0b1841f4cfc18436e09f4f269f3be908e Author: Bhumika Goyal Date: Mon Feb 20 00:18:09 2017 +0530 ALSA: pci: constify snd_kcontrol_new structures Declare snd_kcontrol_new structures as const as they are only passed as an argument to the function snd_ctl_new1. This argument is of type const, so snd_kcontrol_new structures having the same property can be made const too. Done using Coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct snd_kcontrol_new i@p = {...}; @ok1@ identifier r1.i; position p; expression e1; @@ snd_ctl_new1(&i@p,e1) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct snd_kcontrol_new i; Signed-off-by: Bhumika Goyal Signed-off-by: Takashi Iwai sound/pci/au88x0/au88x0_a3d.c | 2 +- sound/pci/au88x0/au88x0_eq.c | 6 +++--- sound/pci/au88x0/au88x0_pcm.c | 2 +- sound/pci/aw2/aw2-alsa.c | 2 +- sound/pci/bt87x.c | 6 +++--- sound/pci/ca0106/ca0106_mixer.c | 4 ++-- sound/pci/cmipci.c | 6 +++--- sound/pci/cs4281.c | 4 ++-- sound/pci/echoaudio/echoaudio.c | 26 +++++++++++++------------- sound/pci/emu10k1/emu10k1x.c | 6 +++--- sound/pci/emu10k1/emumixer.c | 30 +++++++++++++++--------------- sound/pci/emu10k1/emupcm.c | 2 +- sound/pci/ens1370.c | 4 ++-- sound/pci/hda/hda_codec.c | 4 ++-- sound/pci/hda/patch_hdmi.c | 2 +- sound/pci/ice1712/delta.c | 2 +- sound/pci/ice1712/ews.c | 4 ++-- sound/pci/ice1712/ice1712.c | 30 +++++++++++++++--------------- sound/pci/ice1712/ice1724.c | 20 ++++++++++---------- sound/pci/lola/lola_mixer.c | 2 +- sound/pci/lx6464es/lx6464es.c | 2 +- sound/pci/mixart/mixart_mixer.c | 6 +++--- sound/pci/pcxhr/pcxhr_mix22.c | 6 +++--- sound/pci/pcxhr/pcxhr_mixer.c | 22 +++++++++++----------- sound/pci/trident/trident_main.c | 22 +++++++++++----------- sound/pci/via82xx.c | 6 +++--- sound/pci/vx222/vx222_ops.c | 4 ++-- sound/pci/ymfpci/ymfpci_main.c | 14 +++++++------- 28 files changed, 123 insertions(+), 123 deletions(-) commit c314341557d3e8369b89eabde0b864997cf7f420 Author: Javier Martinez Canillas Date: Tue Feb 21 11:29:05 2017 -0300 regulator: ltc3676: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Mark Brown drivers/regulator/ltc3676.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 45a86172452a168f3157e2b0f16cfb113b43fa79 Author: Javier Martinez Canillas Date: Tue Feb 21 11:29:04 2017 -0300 regulator: ltc3589: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas Signed-off-by: Mark Brown drivers/regulator/ltc3589.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 56d2c61d611a50e58dba521be1325dc90f9cc933 Author: Wolfram Sang Date: Mon Feb 20 22:05:07 2017 +0100 ASoC: rsnd: check return value of init function Currently, this function cannot fail for the ADG case. Still, let's apply defensive programming techniques to make sure we fail gracefully whenever rsnd_mod_init() gets extended with another failure case. Reported by Coverity (CID 1397893). Signed-off-by: Wolfram Sang Signed-off-by: Mark Brown sound/soc/sh/rcar/adg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 34157f7bec8276b4296cf2ec172fc13385ac8af7 Author: Wolfram Sang Date: Mon Feb 20 21:58:34 2017 +0100 ASoC: rsnd: drop useles self-assignments Coverity reported (CID 1397992) this self-assignment. I think the code stays readable even with the assignments removed. Signed-off-by: Wolfram Sang Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 2 -- 1 file changed, 2 deletions(-) commit 0135c03df914f0481c61f097c78d37cece84f330 Author: Jonas Gorski Date: Mon Feb 20 11:50:09 2017 +0100 spi/bcm63xx: make spi subsystem aware of message size limits The bcm63xx SPI controller does not allow manual control of the CS lines and will toggle it automatically before and after sending data, so we are limited to messages that fit in the FIFO buffer. Since the CS lines aren't available as GPIOs either, we will need to make slave drivers aware of this limitation so they can handle them accordingly. Signed-off-by: Jonas Gorski Signed-off-by: Mark Brown drivers/spi/spi-bcm63xx.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit a5b0443c9bf42173f0847889d880a45de67e0f8f Author: kbuild test robot Date: Mon Feb 20 01:33:10 2017 +0800 spi: lantiq-ssc: fix platform_no_drv_owner.cocci warnings drivers/spi/spi-lantiq-ssc.c:973:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu Acked-by: Hauke Mehrtens Signed-off-by: Mark Brown drivers/spi/spi-lantiq-ssc.c | 1 - 1 file changed, 1 deletion(-) commit 54d82e0f2d5e64b2c4ed81785e7005f285ba42aa Author: Shawn Guo Date: Tue Feb 7 17:16:27 2017 +0800 drm: qxl: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. Signed-off-by: Shawn Guo Cc: Dave Airlie Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-16-git-send-email-shawnguo@kernel.org drivers/gpu/drm/qxl/qxl_display.c | 16 ++++++++++++++++ drivers/gpu/drm/qxl/qxl_drv.c | 18 ------------------ 2 files changed, 16 insertions(+), 18 deletions(-) commit a5073a5b7aaa097d070ead9034621b69d163cb3f Author: Shawn Guo Date: Tue Feb 7 17:16:25 2017 +0800 drm: mediatek: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. Signed-off-by: Shawn Guo Cc: CK Hu Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-14-git-send-email-shawnguo@kernel.org drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 8 ++++---- drivers/gpu/drm/mediatek/mtk_drm_crtc.h | 2 -- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 3 --- 3 files changed, 4 insertions(+), 9 deletions(-) commit d4f6750f9b816bd7448e7a63fa71ca84fd77e3e9 Author: Shawn Guo Date: Tue Feb 7 17:16:23 2017 +0800 drm: kirin: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. Reviewed-by: Xinliang Liu Signed-off-by: Shawn Guo Cc: Xinliang Liu Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-12-git-send-email-shawnguo@kernel.org drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 15f080f08d48af9388142e45a247c8410736178b Author: Jani Nikula Date: Fri Feb 17 17:20:53 2017 +0200 drm/edid: respect connector force for drm_get_edid ddc probe Skip DDC probe for forced connector status. Don't try to read the EDID if the connector is forced off. Skipping probe for forced on connectors will make more sense when drm_do_get_edid() will handle override and firmware EDIDs. Suggested-by: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1487344854-18777-4-git-send-email-jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e9bd0b84f4bb758f8410fba930fc38facc665c40 Author: Jani Nikula Date: Fri Feb 17 17:20:52 2017 +0200 drm: do not debug log about missing CEA extensions on NULL edid Make the drm_edid_to_eld() function useful for resetting, not just setting, the ELD and HDMI VSDB data, without debug warnings about missing CEA extensions. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1487344854-18777-3-git-send-email-jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 3 +++ 1 file changed, 3 insertions(+) commit 07c2b84b9956dd5d0871d47f5f0bbf9388d2d83f Author: Jani Nikula Date: Fri Feb 17 17:20:51 2017 +0200 drm: move edid property update and add modes out of edid firmware loader Make the firmware loader more generic and generally useful. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1487344854-18777-2-git-send-email-jani.nikula@intel.com drivers/gpu/drm/drm_edid_load.c | 17 ++++------------- drivers/gpu/drm/drm_probe_helper.c | 8 +++++++- include/drm/drm_edid.h | 7 ++++--- 3 files changed, 15 insertions(+), 17 deletions(-) commit 99c181a0fac084470842133bdeb3f78de3203ba9 Author: Tvrtko Ursulin Date: Tue Feb 21 09:13:50 2017 +0000 drm/i915/tracepoints: Add hw_id to context tracepoints It is useful to provide this info to match the one provided in the request tracepoints. Signed-off-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170221091350.14605-1-tvrtko.ursulin@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_trace.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit d7d96833f277827871f9103def3552fec79cf012 Author: Tvrtko Ursulin Date: Tue Feb 21 11:03:00 2017 +0000 drm/i915/tracepoints: Add backend level request in and out tracepoints Two new tracepoints placed at the call sites where requests are actually passed to the GPU enable userspace to track engine utilisation. These tracepoints are only enabled when the DRM_I915_LOW_LEVEL_TRACEPOINTS Kconfig option is enabled. v2: Fix compilation with !CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS. v3: Name global seqno consistently across tracepoints. v4: Remove port info from request out tracepoint. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_guc_submission.c | 2 ++ drivers/gpu/drm/i915/i915_trace.h | 49 ++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_lrc.c | 2 ++ 3 files changed, 53 insertions(+) commit dffabc8f4ee3fce98821bc212bf3c5e31247e2b9 Author: Tvrtko Ursulin Date: Tue Feb 21 09:13:48 2017 +0000 drm/i915/tracepoints: Rename i915_gem_request_notify i915_gem_ring_notify is more appropriate since we do not have the request information at this point, but it is simply a signal from the engine that some request has been completed. v2: * Always trace and log if there were any waiters. * Rename to intel_engine_notify. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_irq.c | 6 ++++-- drivers/gpu/drm/i915/i915_trace.h | 13 ++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) commit 354d036fcf70654cff2e2cbdda54a835d219b9d2 Author: Tvrtko Ursulin Date: Tue Feb 21 11:01:42 2017 +0000 drm/i915/tracepoints: Add request submit and execute tracepoints These new tracepoints are emitted once the request is ready to be submitted to the GPU and once the request is about to be submitted to the GPU, respectively. Former condition triggers as soon as all the fences and dependencies have been resolved, and the latter once the backend is about to submit it to the GPU. New tracepoint are enabled via the new DRM_I915_LOW_LEVEL_TRACEPOINTS Kconfig option which is disabled by default to alleviate the performance impact concerns. v2: Move execute tracepoint to __i915_gem_request_submit. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson drivers/gpu/drm/i915/Kconfig.debug | 11 +++++++++++ drivers/gpu/drm/i915/i915_gem_request.c | 2 ++ drivers/gpu/drm/i915/i915_trace.h | 24 ++++++++++++++++++++++++ 3 files changed, 37 insertions(+) commit 90aa412d50a94b5d48de8991614877d3242f46b1 Author: Tvrtko Ursulin Date: Tue Feb 21 09:13:46 2017 +0000 drm/i915/tracepoints: Remove unused i915_gem_request_complete Tracepoint is not used and won't be suitable for its replacement. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_trace.h | 5 ----- 1 file changed, 5 deletions(-) commit 936925029808242d6cd0950736046abde5b89e0e Author: Tvrtko Ursulin Date: Tue Feb 21 11:00:24 2017 +0000 drm/i915/tracepoints: Tidy i915_gem_request_wait_begin Provide the same information as the other request event classes. v2: Pass in flags so we can properly report the blocking status. (Chris Wilson) v3: Log hex with 0x prefix for clarity. v4: Derive blocking status from flags. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_gem_request.c | 2 +- drivers/gpu/drm/i915/i915_trace.h | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) commit 1cce8922df06ca662da9dff817cae7f3aca4276c Author: Tvrtko Ursulin Date: Tue Feb 21 09:13:44 2017 +0000 drm/i915/tracepoints: Adjust i915_gem_ring_dispatch Rename it to i915_gem_request_queue and fix the logged info equivalent to the i915_gem_request even class. Also moved it a bit further apart from the i915_gem_request_add tracepoint since they otherwise provide similar information too close in time. v2: Remove sw fence singalling. We will rely on the soon to come GuC scheduling backend to enable that. (Chris Wilson) v3: Log hex with 0x prefix for clarity. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 ++-- drivers/gpu/drm/i915/i915_trace.h | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) commit e235b53019a3d1225601d535795f9a4f7f44587b Author: Tvrtko Ursulin Date: Tue Feb 21 09:13:43 2017 +0000 drm/i915/tracepoints: Tidy request event class At the moment only the global seqno is logged which is not set until the request is ready for submission. Add the per-contex seqno and the context hardware id which are both interesting data points. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_trace.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 56e51bf03666728d4eb1d8319215865c8dbf4338 Author: Tvrtko Ursulin Date: Tue Feb 21 09:58:39 2017 +0000 drm/i915: Tidy execlists_init_reg_state Compact the name of the macro and reg_state variable, and cache some data in local variables to make the function more compact and more readable. v2: Fixup some checkpatch warnings. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170221095839.30525-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_lrc.c | 127 +++++++++++++++++---------------------- 1 file changed, 56 insertions(+), 71 deletions(-) commit e2989f140e707f31afa5fa617512961b3f692aca Author: Chris Wilson Date: Tue Feb 21 09:17:23 2017 +0000 drm/i915: Use reservation_object_lock() Replace the calls to ww_mutex_lock(&resv->lock) with the helper reservation_object_lock(resv) and similarly for unlock. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170221091723.6219-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_batch_pool.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 944a36d472be642d0d082d2480fe2b40046602a9 Author: Chris Wilson Date: Fri Feb 17 16:38:33 2017 +0000 drm/i915: Assert that the request->tail is always qword aligned The hardware requires that the tail pointer only advance in qword units, so assert that the value we write is aligned to qwords, and similarly enforce this restriction onto the request->tail. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170217163833.731-1-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/intel_lrc.c | 4 ++++ drivers/gpu/drm/i915/intel_ringbuffer.c | 3 +++ 2 files changed, 7 insertions(+) commit 8d8c386c38692c1183b2c0ecffb84de91b8b32b0 Author: Imre Deak Date: Fri Feb 17 17:39:46 2017 +0200 drm/i915: Add power well SW/HW state verification Verify that the refcount of all power wells match their HW enabled state at the end of modeset HW state readout. Also add documentation on how the reference count for each power well is supposed to be acquired during initialization and HW state readout. Suggested by Ander. Cc: Ander Conselvan de Oliveira Cc: David Weinehall Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1487345986-26511-6-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_display.c | 2 + drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_runtime_pm.c | 85 ++++++++++++++++++++++++++++++++- 3 files changed, 87 insertions(+), 1 deletion(-) commit 16e849145dc2ba9d9fc2027c530fc0a682d5ae61 Author: Imre Deak Date: Fri Feb 17 17:39:45 2017 +0200 drm/i915: Preserve the state of power wells not explicitly enabled Atm, power wells that BIOS has enabled, but which we don't explicitly enable during power domain initialization would get disabled as we clear the BIOS request bit in the given power well sync_hw hook. To prevent this copy over any set request bits in the BIOS request register to the driver request register and clear the BIOS request bit only afterwards. This doesn't make a difference now, since we enable all power wells during power domain initialization. A follow-up patchset will add power wells for which this isn't true, so fix up the inconsistency. Cc: Ander Conselvan de Oliveira Cc: David Weinehall Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1487345986-26511-5-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_runtime_pm.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 14544e134905b4276dc72122ad8c09965bbc7f41 Author: Imre Deak Date: Fri Feb 17 17:39:44 2017 +0200 drm/i915/gen9: Fix clearing of the BIOS power well request register Atm, in the power well sync_hw hook we are clearing all BIOS request bits, not just the one corresponding to the given power well. This could turn off an unrelated power well inadvertently if it didn't have a request bit set in the driver request register. This didn't cause a problem so far, since we enabled all power wells explicitly before clearing the BIOS request register. A follow-up patchset will add power wells that won't get enabled this way, so fix up the inconsistency. Note that this patch only makes the clearing of the BIOS req register more logical. Power wells without a reference would still get disabled by the end of power domain initialization, that is fixed by the next patch. v2: - Clarify in the commit log that this patch doesn't address the case of power wells without a reference. (Ander) Cc: Ander Conselvan de Oliveira Cc: David Weinehall Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1487345986-26511-4-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_runtime_pm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 75ccb2ecb8fc8cfcc676afd24ccad4777f130d58 Author: Imre Deak Date: Fri Feb 17 17:39:43 2017 +0200 drm/i915: Call the sync_hw hook for power wells without a domain So far the sync_hw hook wasn't called for power wells not belonging to any power domain, that is the GEN9 PW1 and MISC_IO power wells. This wasn't a problem so far since the goal of the sync_hw hook - to clear the corresponding BIOS request bit - was guaranteed by clearing the whole BIOS request register elsewhere. This will change with the next patch, so fix up the inconsistency. While at it clean up the power well iterator helpers and move them to the rest of iterators. v2: - Clean up the power well iterator helpers. (Ander) - Move the helpers to i915_drv.h. Cc: Ander Conselvan de Oliveira Cc: David Weinehall Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1487345986-26511-3-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/i915_drv.h | 20 ++++++++++++++++++++ drivers/gpu/drm/i915/intel_runtime_pm.c | 28 ++++------------------------ 2 files changed, 24 insertions(+), 24 deletions(-) commit 3c1b38e63018ea717148a0a6817eec27b020212d Author: Imre Deak Date: Fri Feb 17 17:39:42 2017 +0200 drm/i915: Remove redundant toggling from the power well sync_hw hooks Doing an explicit enable/disable in the power well sync_hw hook based on the power well's reference count is redundant, since by the time these hooks are called all the power wells are enabled and have a reference. So remove the redundant toggling. This is needed by a follow-up patchset that adds power wells which we can't enable/disable during power domain initialization and so want to preserve their state until modeset init time. Cc: Ander Conselvan de Oliveira Cc: David Weinehall Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1487345986-26511-2-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_runtime_pm.c | 52 +++++++-------------------------- 1 file changed, 10 insertions(+), 42 deletions(-) commit e18b9431e46ac0deada6694e047cf80c043a26c0 Author: Chris Wilson Date: Mon Feb 20 09:47:09 2017 +0000 drm/i915: Remove unrequired POSTING_READ from gen6_set_rps() The uncached mmio is sufficient to queue the mmio writes without raising forcewake. The forced flush along with acquiring forcewake from the posting read is not required for adjusting the RPS frequency. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170220094713.22874-3-chris@chris-wilson.co.uk Reviewed-by: Radoslaw Szwichtenberg drivers/gpu/drm/i915/intel_pm.c | 2 -- 1 file changed, 2 deletions(-) commit 76e4e4b532bc9f289039c569063ec4b2e0ef2cc4 Author: Chris Wilson Date: Mon Feb 20 09:47:08 2017 +0000 drm/i915: Store the requested frequency whilst RPS is disabled If intel_set_rps() is called whilst the hw is disabled, just store the requested frequency (from the user) for application when we wake the hw up. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170220094713.22874-2-chris@chris-wilson.co.uk Reviewed-by: Radoslaw Szwichtenberg drivers/gpu/drm/i915/intel_pm.c | 5 +++++ 1 file changed, 5 insertions(+) commit cfd1c48805208b1f1d5f4df153a15fa4a280eb54 Author: Chris Wilson Date: Mon Feb 20 09:47:07 2017 +0000 drm/i915: Move the common RPS warnings to intel_set_rps() Instead of having each back-end provide identical guards, just have a singular set in intel_set_rps() to verify that the caller is obeying the rules. Signed-off-by: Chris Wilson Reviewed-by: Radoslaw Szwichtenberg Link: http://patchwork.freedesktop.org/patch/msgid/20170220094713.22874-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_pm.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 784f2f1a9da22b0ab00c1b364ee2c10573f5c248 Author: Tvrtko Ursulin Date: Mon Feb 20 10:46:57 2017 +0000 drm/i915: Fix typo in semaphore debug message Pronounces less rude when fixed. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170220104657.5237-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23f4a287fc97d94b6110ee0e17ec92670cc8de89 Author: Chris Wilson Date: Sat Feb 18 11:27:08 2017 +0000 drm/i915: Prevent divide-by-zero in debugfs/i915_rps_boost_info Either by chance, or by misread, the current evaluation interval may be zero. If that is the case, don't divide by it! Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170218112708.24504-1-chris@chris-wilson.co.uk Reviewed-by: Radoslaw Szwichtenberg drivers/gpu/drm/i915/i915_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 48cb91203e1811e24532ab9204d45f645b69a0e7 Author: Chris Wilson Date: Sat Feb 18 15:00:50 2017 +0000 drm/i915: Remove unneeded struct_mutex around rpm We don't need struct_mutex for acquiring an rpm wakeref, and do not need to serialise those register read (it's the wrong mutex for those registers in any case). Begone! Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170218150050.10414-1-chris@chris-wilson.co.uk Reviewed-by: Radoslaw Szwichtenberg drivers/gpu/drm/i915/i915_debugfs.c | 7 ------- 1 file changed, 7 deletions(-) commit 5a55b527af43423fea51e9927185a1a6e9c80ee7 Author: Chris Wilson Date: Fri Feb 17 14:14:55 2017 +0000 drm/i915: Only apply legacy PDE overflow detection to 3lvl machines Prevent the overflow check from firing on machines with the full 4lvl page tables, that are not restricted to GEN8_LEGACY_PDES. v2: Also fix the off-by-one in the compare Fixes: 894ccebee2b0 ("drm/i915: Micro-optimise gen8_ppgtt_insert_entries()") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170217141455.19877-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem_gtt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f4a791819ed00a749a90387aa139706a507aa690 Author: Rodrigo Vivi Date: Thu Feb 16 17:38:35 2017 -0800 drm/i915: DMC 1.03 for Geminilake There is a new version of DMC available for Geminilake. It's release notes only mention: - Enhancement in the FW to restore the PG2 state v2: Fixed the platform name on commit message. Noticed by Jani S. v3: cook on top of drm-tip without depending on kbl one so CI can check. v4: make v3 on top of v2. Cc: David Weinehall Cc: Jani Saarinen Cc: Ander Conselvan de Oliveira Signed-off-by: Rodrigo Vivi Reviewed-by: Ander Conselvan de Oliveira Signed-off-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/1487295515-15396-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_csr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fbad6c24396b265d4e19cc78aef9b1c7e7e6de64 Author: Christophe JAILLET Date: Sun Feb 19 14:19:02 2017 +0100 spi: spi-fsl-dspi: Fix error handling According to error handling in this function, it is likely that going to 'out_master_put' was expected here. Signed-off-by: Christophe JAILLET Signed-off-by: Mark Brown drivers/spi/spi-fsl-dspi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6a882a2cbeb09b7c32610a644d5915d17b80b617 Author: Heiner Kallweit Date: Wed Feb 15 20:31:55 2017 +0100 iio: adc: meson-saradc: improve meson_sar_adc_read_raw_sample After sampling there should always be only one value in the FIFO. This also applies to averaging mode as the averaging is done chip-internally. So we don't have to loop and let the driver complain if there's not exactly one value in the FIFO. If the value belongs to a different channel then don't silently swallow the value but complain. Signed-off-by: Heiner Kallweit Acked-by: Martin Blumenstingl Signed-off-by: Jonathan Cameron drivers/iio/adc/meson_saradc.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) commit 3af109131b7eb880ba0711344912d7a523a812b4 Author: Heiner Kallweit Date: Wed Feb 15 20:31:45 2017 +0100 iio: adc: meson-saradc: switch from polling to interrupt mode Switch from polling to interrupt mode. Successfully tested on a S905GXBB-based Odroid C2. Signed-off-by: Heiner Kallweit Acked-by: Martin Blumenstingl Tested-by: Martin Blumenstingl Signed-off-by: Jonathan Cameron .../bindings/iio/adc/amlogic,meson-saradc.txt | 2 + drivers/iio/adc/meson_saradc.c | 56 ++++++++++++++++++++-- 2 files changed, 53 insertions(+), 5 deletions(-) commit 74e2419b00d870b373ada4878e3d66d8dc97f4b0 Author: Lars-Peter Clausen Date: Sat Feb 11 13:34:21 2017 +0100 iio: maxim_thermocouple: Set parent device Initialize the parent of the IIO device to the device that registered it. This makes sure that the IIO device appears the right level in the device hierarchy. Signed-off-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron drivers/iio/temperature/maxim_thermocouple.c | 1 + 1 file changed, 1 insertion(+) commit b2027d16df9194ec22eb5d315776532a7476bdb1 Author: Lars-Peter Clausen Date: Sat Feb 11 13:34:20 2017 +0100 iio: pulsedlight-lidar-lite-v2: Set parent device Initialize the parent of the IIO device to the device that registered it. This makes sure that the IIO device appears the right level in the device hierarchy. Signed-off-by: Lars-Peter Clausen Reviewed-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 1 + 1 file changed, 1 insertion(+) commit e78c1f5710bc1a394d17850a50de0429aa5e2938 Author: Lars-Peter Clausen Date: Sat Feb 11 13:34:19 2017 +0100 iio: lmp91000: Set parent device Initialize the parent of the IIO device to the device that registered it. This makes sure that the IIO device appears the right level in the device hierarchy. Signed-off-by: Lars-Peter Clausen Reviewed-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/potentiostat/lmp91000.c | 1 + 1 file changed, 1 insertion(+) commit fa722499bbf89b5976bdfc77139f7d623a69a18a Author: Lars-Peter Clausen Date: Sat Feb 11 13:34:18 2017 +0100 iio: max30102: Set parent device Initialize the parent of the IIO device to the device that registered it. This makes sure that the IIO device appears the right level in the device hierarchy. Signed-off-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron drivers/iio/health/max30102.c | 1 + 1 file changed, 1 insertion(+) commit 5d548b733eb4b5cfb03e1acbcbfafca97455132c Author: Lars-Peter Clausen Date: Sat Feb 11 13:34:17 2017 +0100 iio: max30100: Set parent device Initialize the parent of the IIO device to the device that registered it. This makes sure that the IIO device appears the right level in the device hierarchy. Signed-off-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron drivers/iio/health/max30100.c | 1 + 1 file changed, 1 insertion(+) commit 83535359c4302cb0f928eb931b7b1bc0a21a66c5 Author: Lars-Peter Clausen Date: Sat Feb 11 13:34:16 2017 +0100 iio: cio-dac: Set parent device Initialize the parent of the IIO device to the device that registered it. This makes sure that the IIO device appears the right level in the device hierarchy. Signed-off-by: Lars-Peter Clausen Acked-by: William Breathitt Gray Signed-off-by: Jonathan Cameron drivers/iio/dac/cio-dac.c | 1 + 1 file changed, 1 insertion(+) commit ed165e91719b2c99336786d721d8ae30700c62cb Author: Lars-Peter Clausen Date: Sat Feb 11 13:34:15 2017 +0100 iio: quad-8: Set parent device Initialize the parent of the IIO device to the device that registered it. This makes sure that the IIO device appears the right level in the device hierarchy. Signed-off-by: Lars-Peter Clausen Acked-by: William Breathitt Gray Signed-off-by: Jonathan Cameron drivers/iio/counter/104-quad-8.c | 1 + 1 file changed, 1 insertion(+) commit c5c7d1f34c333d0a14f1f80d3d46eed4f338211e Author: Lars-Peter Clausen Date: Sat Feb 11 13:34:14 2017 +0100 iio: stx104: Set parent device Initialize the parent of the IIO device to the device that registered it. This makes sure that the IIO device appears the right level in the device hierarchy. Signed-off-by: Lars-Peter Clausen Acked-by: William Breathitt Gray drivers/iio/adc/stx104.c | 1 + 1 file changed, 1 insertion(+) commit 31b9f91913cb18d7eb2276640bf0a56fb352d7b6 Author: Derek Robson Date: Sun Feb 12 20:22:40 2017 +1300 Staging: iio: impedance-analyzer: ad5933.c - style fix Change permissions to octal style. Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Jonathan Cameron drivers/staging/iio/impedance-analyzer/ad5933.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit fb364cea3d245fff5cb4c953c8c9a4b1efcbe4c6 Author: Gargi Sharma Date: Fri Feb 17 22:47:21 2017 +0530 staging: iio: compress return logic Simplify function returns by merging assignment and return. Found with Coccinelle. Semantic patch: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Gargi Sharma Acked-by: Julia Lawall Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7854.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit bf0adab4cd0d69eb22495f89e53f79941bb62300 Author: sayli karnik Date: Fri Feb 17 23:38:07 2017 +0530 staging: iio: adis16240_core: Replace symbolic permission with octal permission The patch resolves following checkpatch issue: WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. Signed-off-by: sayli karnik Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16240_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f14434040ce0d1bcaac167fb08286e31d48ca9a5 Author: H. Nikolaus Schaller Date: Fri Feb 17 12:53:32 2017 -0800 Input: tsc2007 - add iio interface to read external ADC input and temperature The tsc2007 chip not only has a resistive touch screen controller but also an external AUX adc imput which can be used for an ambient light sensor, battery voltage monitoring or any general purpose. Additionally it can measure the chip temperature. This extension provides an iio interface for these adc channels. Since it is not wasting much resources and is very straightforward, we simply provide all other adc channels as optional iio interfaces as weel. This can be used for debugging or special applications. This patch also splits the tsc2007 driver in several source files: tsc2007.h -- constants, structs and stubs tsc2007_core.c -- functional parts of the original driver tsc2007_iio.c -- the optional iio stuff Makefile magic allows to conditionally link the iio stuff if CONFIG_IIO=y or =m in a way that it works with CONFIG_TOUCHSCREEN_TSC2007=m. Signed-off-by: H. Nikolaus Schaller Reviewed-by: Jonathan Cameron Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/Kconfig | 10 + drivers/input/touchscreen/Makefile | 2 + drivers/input/touchscreen/tsc2007.c | 504 ------------------------------- drivers/input/touchscreen/tsc2007.h | 102 +++++++ drivers/input/touchscreen/tsc2007_core.c | 457 ++++++++++++++++++++++++++++ drivers/input/touchscreen/tsc2007_iio.c | 140 +++++++++ 6 files changed, 711 insertions(+), 504 deletions(-) commit 934df23171e7c5b71d937104d4957891c39748ff Author: H. Nikolaus Schaller Date: Fri Feb 17 12:51:19 2017 -0800 Input: tsc2007 - check for presence and power down tsc2007 during probe 1. check if chip is really present and don't succeed if it isn't. 2. if it succeeds, power down the chip until accessed Signed-off-by: H. Nikolaus Schaller Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/tsc2007.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit e54ca97747770a6b08413ae9afa776c0d8c4f6c3 Author: Chris Wilson Date: Fri Feb 17 15:13:04 2017 +0000 drm/i915: Remove completed fences after a wait If we wait upon the full (i.e. all shared fences, or upon an exclusive fence) reservation object successfully, we know that all fences beneath it have been signaled, so long as no new fences were added whilst we slept. If the reservation_object remains the same, as detected by its seqcount, we can then reap all the fences upon completion. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170217151304.16665-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 6ef98ea0dacd8bee62d6823b1dea80269137c240 Author: Chris Wilson Date: Fri Feb 17 15:13:03 2017 +0000 drm/i915: Only start with the fake-irq timer if interrupts are dead As a backup to waiting on a user-interrupt from the GPU, we use a heavy and frequent timer to wake up the waiting process should we detect an inconsistency whilst waiting. After seeing a "missed interrupt", the next time we wait, we restart the heavy timer. This patch is more reluctant to restart the timer and will only do so if we have not see any interrupts since when we started the fake irq timer. If we are seeing interrupts, then the waiters are being woken normally and we had an incoherency that caused to miss last time - that is unlikely to reoccur and so taking the risk of stalling again seems pragmatic. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170217151304.16665-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 8998567b51141f79309d1267640c919dfd23d3a4 Author: Chris Wilson Date: Fri Feb 17 15:13:02 2017 +0000 drm/i915: Defer declaration of missed-interrupt until the waiter is asleep If the waiter was currently running, assume it hasn't had a chance to process the pending interrupt (e.g, low priority task on a loaded system) and wait until it sleeps before declaring a missed interrupt. References: https://bugs.freedesktop.org/show_bug.cgi?id=99816 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170217151304.16665-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit c33ed067d13b7fae9e19ef1a9e302b8fc90c43d8 Author: Chris Wilson Date: Fri Feb 17 15:13:01 2017 +0000 drm/i915: Break i915_spin_request() if we see an interrupt If an interrupt has been posted, and we were spinning on the active seqno waiting for it to advance but it did not, then we can expect that it will not see its advance in the immediate future and should call into the irq-seqno barrier. We can stop spinning at this point, and leave the difficulty of handling the coherency to the caller. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170217151304.16665-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 2246bea6cf773552106d98ab31ba7952c4ddb3f9 Author: Chris Wilson Date: Fri Feb 17 15:13:00 2017 +0000 drm/i915: Postpone fake breadcrumb interrupt until real interrupts cease When the timer expires for checking on interrupt processing, check to see if any interrupts arrived within the last time period. If real interrupts are still being delivered, we can be reassured that we haven't missed the final interrupt as the waiter will still be woken. Only once all activity ceases, do we have to worry about the waiter never being woken and so need to install a timer to kick the waiter for a slow arrival of a seqno. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170217151304.16665-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_irq.c | 1 + drivers/gpu/drm/i915/intel_breadcrumbs.c | 22 +++++++++------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 3 ++- 3 files changed, 12 insertions(+), 14 deletions(-) commit 3bb56da78153150d72c67ceb8b7df49f36ae269c Author: Ander Conselvan de Oliveira Date: Fri Feb 17 14:06:29 2017 +0200 drm/i915/glk: Enable pipe CSC Now that the pre-csc degamma table is set up correctly in Geminilake, pipe CSC can be enabled without causing a black screen. v2: Rebase. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170217120630.6143-3-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_sprite.c | 1 + 2 files changed, 2 insertions(+) commit 8d371db4b0a7aa919df9be2be430187fe3e70399 Author: Ander Conselvan de Oliveira Date: Fri Feb 17 14:06:28 2017 +0200 drm/i915/glk: Load the degamma LUT even in legacy gamma mode In Geminilake, the degamma table is enabled or disabled by the pipe CSC enable bit, so its active even when running in the legacy gamma mode. So always set sane values for that table, since the default value is all zeroes. This fixes blank screens after a suspend/resume cycle while legacy gamma is in use. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170217120630.6143-2-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_color.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 76adb460fd939756db689f238d5c2ddb45469705 Author: Laurent Pinchart Date: Sun Dec 18 00:01:19 2016 +0200 drm: Remove the struct drm_device platformdev field The field contains a pointer to the parent platform device of the DRM device. As struct drm_device also contains a dev pointer to the struct device embedded in the platform_device structure, the platformdev field is redundant. Remove it and use the dev pointer directly. Signed-off-by: Laurent Pinchart Reviewed-by: Daniel Vetter Acked-by: Jyri Sarha Acked-by: Vincent Abriou # For sti Acked-by: Russell King # For armada Acked-by: Rob Clark # For msm Acked-by: Xinwei Kong drivers/gpu/drm/armada/armada_drv.c | 3 +-- drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 2 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c | 2 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_mdss.c | 2 +- drivers/gpu/drm/msm/msm_drv.c | 1 - drivers/gpu/drm/nouveau/nouveau_drm.c | 3 +-- drivers/gpu/drm/sti/sti_drv.c | 2 -- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 1 - include/drm/drmP.h | 1 - 9 files changed, 5 insertions(+), 12 deletions(-) commit 620f74f51ccd9c954530655e46ce5907d88f1e9a Author: Laurent Pinchart Date: Tue Dec 13 21:24:34 2016 +0200 drm: Remove unused drm_platform midlayer Now that the last driver has been converted, the drm_platform midlayer is unused. Remove it. Signed-off-by: Laurent Pinchart Reviewed-by: Daniel Vetter Documentation/gpu/drm-internals.rst | 3 -- drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_platform.c | 87 ------------------------------------- include/drm/drmP.h | 3 -- 4 files changed, 1 insertion(+), 94 deletions(-) commit 896bbc3ef1b065688163ce6c09c31e55fb4cd9f5 Author: Laurent Pinchart Date: Mon Dec 12 11:28:47 2016 +0200 drm: exynos: Perform initialization/cleanup at probe/remove time The drm driver .load() operation is prone to race conditions as it initializes the driver after registering the device nodes. Its usage is deprecated, inline it in the probe function and call drm_dev_alloc() and drm_dev_register() explicitly. For consistency inline the .unload() handler in the remove function as well. Signed-off-by: Laurent Pinchart Reviewed-by: Sean Paul Reviewed-by: Daniel Vetter Reviewed-by: Daniel Stone Acked-by: Inki Dae drivers/gpu/drm/exynos/exynos_dp.c | 1 - drivers/gpu/drm/exynos/exynos_drm_dpi.c | 1 - drivers/gpu/drm/exynos/exynos_drm_drv.c | 241 ++++++++++++++++-------------- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1 - drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 3 +- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 1 - drivers/gpu/drm/exynos/exynos_hdmi.c | 1 - 7 files changed, 126 insertions(+), 123 deletions(-) commit 8f1597c8f1a58830b67a033309e4b141ee99e379 Author: Laurent Pinchart Date: Mon Dec 12 11:28:47 2016 +0200 drm: shmobile: Perform initialization/cleanup at probe/remove time The drm driver .load() operation is prone to race conditions as it initializes the driver after registering the device nodes. Its usage is deprecated, inline it in the probe function and call drm_dev_alloc() and drm_dev_register() explicitly. For consistency inline the .unload() handler in the remove function as well. Signed-off-by: Laurent Pinchart Acked-by: Daniel Vetter drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 7 +- drivers/gpu/drm/shmobile/shmob_drm_drv.c | 204 +++++++++++++++--------------- 2 files changed, 104 insertions(+), 107 deletions(-) commit 9f235dfa495856ed7b264ee08920601df57333da Author: Tvrtko Ursulin Date: Thu Feb 16 12:23:25 2017 +0000 drm/i915: Consolidate gen8_emit_pipe_control We have a few open coded instances in the execlists code and an almost suitable helper in intel_ringbuf.c We can consolidate to a single helper if we change the existing helper to emit directly to ring buffer memory and move the space reservation outside it. v2: Drop memcpy for memset. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170216122325.31391-2-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_lrc.c | 77 +++++++++++---------------------- drivers/gpu/drm/i915/intel_ringbuffer.c | 45 +++++++------------ drivers/gpu/drm/i915/intel_ringbuffer.h | 11 +++++ 3 files changed, 52 insertions(+), 81 deletions(-) commit 097d4f1c121f324d655d17b9bc5238107f7a1761 Author: Tvrtko Ursulin Date: Fri Feb 17 07:58:59 2017 +0000 drm/i915: Tidy workaround batch buffer emission Use the "*batch++ = " style as in the ring emission for better readability and also simplify the logic a bit by consolidating the offset and size calculations and overflow checking. The latter is a programming error so it is not required to check for it after each write to the object, but rather do it once the whole state has been written and fail the driver if something went wrong. v2: Rebase. v3: Keep track of offsets and sizes in bytes for simplicity and rename function pointer variable to _fn suffix. (Chris Wilson) v4: Fix size calc broken in v3 and add alignment warning. (Chris Wilson) v5: Fix return code. v6: I added an exit from loop in v5 but forgot to put back the object teardown. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson (v5) Cc: Chris Wilson Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_lrc.c | 318 ++++++++++++++------------------------- 1 file changed, 117 insertions(+), 201 deletions(-) commit 133b4bd74d89220c612d4adfabb2f41f6f432184 Author: Tvrtko Ursulin Date: Thu Feb 16 12:23:23 2017 +0000 drm/i915: Move common workaround code to intel_engine_cs It is used by all submission backends. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_engine_cs.c | 550 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_ringbuffer.c | 550 -------------------------------- 2 files changed, 550 insertions(+), 550 deletions(-) commit 8ee7c6e23bb1b3c37ef27e81395db056bd7eac53 Author: Tvrtko Ursulin Date: Thu Feb 16 12:23:22 2017 +0000 drm/i915: Simplify cleanup path in intel_engines_init We can call the engine cleanup vfunc instead of duplicating the decision making here. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_engine_cs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2f35afe94af0f7dc451253d848af442e5d7a7715 Author: Tvrtko Ursulin Date: Thu Feb 16 12:23:21 2017 +0000 drm/i915: Make int __intel_ring_space static It is only used within intel_ringbuffer.c Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit fabef825626d7bd05a321e4427fdf31a169b5173 Author: Chris Wilson Date: Wed Feb 15 10:59:19 2017 +0000 drm/i915: Drop struct_mutex around frontbuffer flushes Since the frontbuffer has self-contained locking, it does not require us to hold the BKL struct_mutex as we send invalidate and flush messages. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170215105919.7347-3-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_fbdev.c | 43 +++++++++++++++----------------------- 1 file changed, 17 insertions(+), 26 deletions(-) commit 24dbf51a5517b79de9585dd216488aed09fd5ee8 Author: Chris Wilson Date: Wed Feb 15 10:59:18 2017 +0000 drm/i915: struct_mutex is not required for allocating the framebuffer We do not need the BKL struct_mutex in order to allocate a GEM object, nor to create the framebuffer, so resist the temptation to take the BKL willy nilly. As this changes the locking contract around internal API calls, the patch is a little larger than a plain removal of a pair of mutex_lock/unlock. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170215105919.7347-2-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_display.c | 109 +++++++++++++++-------------------- drivers/gpu/drm/i915/intel_drv.h | 7 +-- drivers/gpu/drm/i915/intel_fbdev.c | 21 +++---- 3 files changed, 59 insertions(+), 78 deletions(-) commit 70001cd256548391add796cce40bd2e2394d4297 Author: Chris Wilson Date: Thu Feb 16 09:46:21 2017 +0000 drm/i915: Remove struct_mutex for destroying framebuffers We do not need to hold struct_mutex for destroying drm_i915_gem_objects any longer, and with a little care taken over tracking obj->framebuffer_references, we can relinquish BKL locking around the destroy of intel_framebuffer. v2: Use atomic check for WARN_ON framebuffer miscounting Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170216094621.3426-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_object.h | 2 +- drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +- drivers/gpu/drm/i915/i915_gem_tiling.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 9 ++++----- 4 files changed, 7 insertions(+), 8 deletions(-) commit 581ab1fe520b05447b4869fb7e3136c3a600abad Author: Chris Wilson Date: Wed Feb 15 16:39:00 2017 +0000 drm/i915: Unwind conversion to i915_gem_phys_ops on failure The physical object is treated as permanently pinned. If we fail to take this initial pin during i915_gem_object_attach_phys() we need to revert it back to an ordinary shmemfs object before reporting the failure. v2: git-add Reported-by: Mika Kuoppala Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170215163900.11606-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit c1d2061b28c2aa25ec39b60d9c248e6beebd7315 Author: Chris Wilson Date: Thu Feb 16 12:54:41 2017 +0000 drm/i915: Squelch any ktime/jiffie rounding errors for wait-ioctl We wait upon jiffies, but report the time elapsed using a high-resolution timer. This discrepancy can lead to us timing out the wait prior to us reporting the elapsed time as complete. This restores the squelching lost in commit e95433c73a11 ("drm/i915: Rearrange i915_wait_request() accounting with callers"). Fixes: e95433c73a11 ("drm/i915: Rearrange i915_wait_request() accounting with callers") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Cc: # v4.10-rc1+ Cc: stable@vger.kernel.org Link: http://patchwork.freedesktop.org/patch/msgid/20170216125441.30923-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit fb70046cf1743ade43116ef0c0876576fc6391b9 Author: Gustavo Padovan Date: Wed Feb 15 16:00:08 2017 -0200 drm/virtio: call drm_plane_cleanup() at destroy phase virtio was missing this call to clean up core plane usage. Signed-off-by: Gustavo Padovan Link: http://patchwork.freedesktop.org/patch/msgid/20170215180009.7091-1-gustavo@padovan.org Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_plane.c | 1 + 1 file changed, 1 insertion(+) commit bbdf0b2ff32aa75c7bd167569130e9391d2e6282 Author: Uma Shankar Date: Wed Feb 8 16:20:56 2017 +0530 drm/i915/bxt: Disable device ready before shutdown command Disable device ready before MIPI port shutdown command. This helps to avoid mipi split screen issues. Signed-off-by: Uma Shankar Signed-off-by: Vidya Srinivas Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1486551058-22596-8-git-send-email-vidya.srinivas@intel.com drivers/gpu/drm/i915/intel_dsi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit eba4daf0dc5861703000f58b1d51110ced2b2fb5 Author: Uma Shankar Date: Wed Feb 8 16:20:54 2017 +0530 drm/i915/bxt: Fix BXT DSI ULPS sequence Fix the Sequence to program BXT DSI Latch and ULPS. Signed-off-by: Uma Shankar Signed-off-by: Vidya Srinivas Reviewed-by: Bob Paauwe Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1486551058-22596-6-git-send-email-vidya.srinivas@intel.com drivers/gpu/drm/i915/intel_dsi.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) commit 6043801f937ada9c9ed9dfa3c6ce542a79643401 Author: Deepak M Date: Tue Feb 14 18:46:16 2017 +0530 drm/i915: Set the Z inversion overlap field Dual link Z-inversion overlap field is present in MIPI_CTRL register unlike the older platforms, hence setting the same in this patch. Signed-off-by: Deepak M Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1487078180-15147-5-git-send-email-madhav.chauhan@intel.com drivers/gpu/drm/i915/intel_dsi.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 3582ad1361644ba0f937cf6aa59d5c9ead6763ca Author: sagar.a.kamble@intel.com Date: Fri Feb 3 13:58:33 2017 +0530 drm/i915: Do RPM Wake during GuC/HuC status read HUC_STATUS, GUC_STATUS, SOFT_SCRATCH registers are read in debugfs and getparam ioctl. This patch covers those accesses by RPM get/put. v2: Covering access in i915_getparam(I915_PARAM_HUC_STATUS) (ChrisW) Cc: Arkadiusz Hiler Cc: Anusha Srivatsa Cc: Fiedorowicz, Lukasz Signed-off-by: Sagar Arun Kamble Reviewed-by: Arkadiusz Hiler Signed-off-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1486110513-12130-1-git-send-email-sagar.a.kamble@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 6 ++++++ drivers/gpu/drm/i915/i915_drv.c | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) commit 262fd485ac6b476479f41f00bb104f6a1766ae66 Author: Chris Wilson Date: Wed Feb 15 13:15:47 2017 +0000 drm/i915: Only enable hotplug interrupts if the display interrupts are enabled In order to prevent accessing the hpd registers outside of the display power wells, we should refrain from writing to the registers before the display interrupts are enabled. [ 4.740136] WARNING: CPU: 1 PID: 221 at drivers/gpu/drm/i915/intel_uncore.c:795 __unclaimed_reg_debug+0x44/0x50 [i915] [ 4.740155] Unclaimed read from register 0x1e1110 [ 4.740168] Modules linked in: i915(+) intel_gtt drm_kms_helper prime_numbers [ 4.740190] CPU: 1 PID: 221 Comm: systemd-udevd Not tainted 4.10.0-rc6+ #384 [ 4.740203] Hardware name: / , BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015 [ 4.740220] Call Trace: [ 4.740236] dump_stack+0x4d/0x6f [ 4.740251] __warn+0xc1/0xe0 [ 4.740265] warn_slowpath_fmt+0x4a/0x50 [ 4.740281] ? insert_work+0x77/0xc0 [ 4.740355] ? fwtable_write32+0x90/0x130 [i915] [ 4.740431] __unclaimed_reg_debug+0x44/0x50 [i915] [ 4.740507] fwtable_read32+0xd8/0x130 [i915] [ 4.740575] i915_hpd_irq_setup+0xa5/0x100 [i915] [ 4.740649] intel_hpd_init+0x68/0x80 [i915] [ 4.740716] i915_driver_load+0xe19/0x1380 [i915] [ 4.740784] i915_pci_probe+0x32/0x90 [i915] [ 4.740799] pci_device_probe+0x8b/0xf0 [ 4.740815] driver_probe_device+0x2b6/0x450 [ 4.740828] __driver_attach+0xda/0xe0 [ 4.740841] ? driver_probe_device+0x450/0x450 [ 4.740853] bus_for_each_dev+0x5b/0x90 [ 4.740865] driver_attach+0x19/0x20 [ 4.740878] bus_add_driver+0x166/0x260 [ 4.740892] driver_register+0x5b/0xd0 [ 4.740906] ? 0xffffffffa0166000 [ 4.740920] __pci_register_driver+0x47/0x50 [ 4.740985] i915_init+0x5c/0x5e [i915] [ 4.740999] do_one_initcall+0x3e/0x160 [ 4.741015] ? __vunmap+0x7c/0xc0 [ 4.741029] ? kmem_cache_alloc+0xcf/0x120 [ 4.741045] do_init_module+0x55/0x1c4 [ 4.741060] load_module+0x1f3f/0x25b0 [ 4.741073] ? __symbol_put+0x40/0x40 [ 4.741086] ? kernel_read_file+0x100/0x190 [ 4.741100] SYSC_finit_module+0xbc/0xf0 [ 4.741112] SyS_finit_module+0x9/0x10 [ 4.741125] entry_SYSCALL_64_fastpath+0x17/0x98 [ 4.741135] RIP: 0033:0x7f8559a140f9 [ 4.741145] RSP: 002b:00007fff7509a3e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 4.741161] RAX: ffffffffffffffda RBX: 00007f855aba02d1 RCX: 00007f8559a140f9 [ 4.741172] RDX: 0000000000000000 RSI: 000055b6db0914f0 RDI: 0000000000000011 [ 4.741183] RBP: 0000000000020000 R08: 0000000000000000 R09: 000000000000000e [ 4.741193] R10: 0000000000000011 R11: 0000000000000246 R12: 000055b6db0854d0 [ 4.741204] R13: 000055b6db091150 R14: 0000000000000000 R15: 000055b6db035924 v2: Set dev_priv->display_irqs_enabled to true for all platforms other than vlv/chv that manually control the display power domain. Fixes: 19625e85c6ec ("drm/i915: Enable polling when we don't have hpd") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97798 Suggested-by: Ville Syrjälä Signed-off-by: Chris Wilson Cc: Lyude Cc: Daniel Vetter Cc: Ville Syrjälä Cc: Hans de Goede Cc: stable@vger.kernel.org Link: http://patchwork.freedesktop.org/patch/msgid/20170215131547.5064-1-chris@chris-wilson.co.uk Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/i915_irq.c | 10 ++++++++++ drivers/gpu/drm/i915/intel_hotplug.c | 14 ++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) commit f2254d293790a030ccf12ff4bb0d77b679be3f4d Author: Jani Nikula Date: Wed Feb 15 17:21:39 2017 +0200 drm/i915/bxt: remove WaRsDisableCoarsePowerGating for early BXT No need to cater for old A revisions. Reviewed-by: Imre Deak Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1487172099-24873-4-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 362f8b9edb1066b12a9bfa14e72d0ccb66fc742b Author: Jani Nikula Date: Wed Feb 15 17:21:38 2017 +0200 drm/i915/bxt: remove snooping workaround on old A revisions No need to cater for old A revisions. Reviewed-by: Imre Deak Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1487172099-24873-3-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_device_info.c | 4 ---- 1 file changed, 4 deletions(-) commit 8aeaf64c96a8698f05664a8726337855a4d4fdf2 Author: Jani Nikula Date: Wed Feb 15 17:21:37 2017 +0200 drm/i915/bxt: apply clock gating workaround to all revisions No need to cater for old A revisions. Reviewed-by: Imre Deak Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1487172099-24873-2-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_pm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f642de16c86e9f31d084aa98a50d3a2c923450c2 Author: Gustavo Padovan Date: Wed Feb 15 15:57:25 2017 -0200 dma-buf/dma-fence: improve doc for dma_fence_add_callback() Document return values for this function. Signed-off-by: Gustavo Padovan Reviewed-by: Chris Wilson Signed-off-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/20170215175725.6692-1-gustavo@padovan.org drivers/dma-buf/dma-fence.c | 2 ++ 1 file changed, 2 insertions(+) commit a49bf8fb0a311cc8f68329e9853c15c6f0d12f9e Author: Eric Anholt Date: Wed Feb 8 12:47:01 2017 -0800 drm/vc4: Drop debug print at boot with DPI enabled. Unlike the other encoders in the driver, I've also dropped the debug dump function. There's only really one register to this device, and we have the debugfs reg entry still. Signed-off-by: Eric Anholt Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170208204701.29013-1-eric@anholt.net drivers/gpu/drm/vc4/vc4_dpi.c | 13 ------------- 1 file changed, 13 deletions(-) commit 06a20d2d2d4187b9bc1a4c2f62e989a97a086a76 Author: Uma Shankar Date: Wed Feb 8 16:20:51 2017 +0530 drm/i915: Fix PLL 8x/3 divider for MIPI video mode MIPI Video Mode for high res panels (requiring dual link), need a 8X/3 divider to be programmed as 0x2. Modifying the same in this patch. Signed-off-by: Uma Shankar Signed-off-by: Vidya Srinivas Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1486551058-22596-3-git-send-email-vidya.srinivas@intel.com drivers/gpu/drm/i915/intel_dsi_pll.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 645a2f6e03ed4a998da4b3642d80dd25d371b6b1 Author: Uma Shankar Date: Wed Feb 8 16:20:50 2017 +0530 drm/i915: Check for platform specific GPIO config Panel GPIO control should be done based on platform. Add a check to restrict VLV and CHT specific GPIO confirguration, so that they dont apply to other platforms. The VBT spec fails to mention the PMIC backlight control option is valid only for VLV/CHT, and the field may be set to "PMIC" for BXT even if PMIC is not desired or possible. Signed-off-by: Uma Shankar Signed-off-by: Vidya Srinivas [Jani: amended commit message a bit and fixed indentation.] Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1486551058-22596-2-git-send-email-vidya.srinivas@intel.com drivers/gpu/drm/i915/intel_dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d7e8ef02a6b3d11f0c3ad99c0f656341151c50b9 Author: Manasi Navare Date: Tue Feb 7 16:54:11 2017 -0800 drm/i915/dp: Reset the link params on HPD/connected boot/resume The max link parameters should be set/reset only on HPD or connected boot case or on system resume. Add a flag reset_link_params to intel_dp to decide when to reset the max link parameters. This prevents the parameters from getting reset/overwritten through all other connector->funcs->detect() calls. This is important when link training fails and the max link params are modified to the lower fallback values. Cc: Ville Syrjala Reviewed-by: Ville Syrjälä Signed-off-by: Manasi Navare Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1486515251-23469-1-git-send-email-manasi.d.navare@intel.com drivers/gpu/drm/i915/intel_dp.c | 16 ++++++++++++---- drivers/gpu/drm/i915/intel_drv.h | 1 + 2 files changed, 13 insertions(+), 4 deletions(-) commit 75c7b0b8620ce5a672da02e721a775acb7863c64 Author: Chris Wilson Date: Wed Feb 15 08:43:57 2017 +0000 drm/i915: Use preferred kernel types in i915_gem_gtt.c Make checkpatch happy and make the use of u32/u64 consistent throughout i915_gem_gtt.[ch] Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-23-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 83 +++++++++++++++++++------------------ drivers/gpu/drm/i915/i915_gem_gtt.h | 56 ++++++++++++------------- 2 files changed, 69 insertions(+), 70 deletions(-) commit 57202f47af85381f31f317a2a75fe76ea4c76925 Author: Chris Wilson Date: Wed Feb 15 08:43:56 2017 +0000 drm/i915: Differentiate the aliasing_ppgtt with an invalid filp Use an invalid filp so that the aliasing_ppgtt can be clearly identified. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-22-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e565ceb086d70e577e41315b921014dcfb991a6b Author: Chris Wilson Date: Wed Feb 15 08:43:55 2017 +0000 drm/i915: Only preallocate the aliasing GTT to the extents of the global GTT As the aliasing GTT is only accessed via the global GTT, we will never use more of it than we expose via the Global GTT and so we only need to preallocate sufficient space within the ppgtt for the full GTT. Equally, if the aliasing GTT is smaller than the global GTT, we have a serious issue and must bail. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-21-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 381b943b07027f54083ed685368e261c1089ce53 Author: Chris Wilson Date: Wed Feb 15 08:43:54 2017 +0000 drm/i915: Remove i915_address_space.start Once upon a time, back in the UMS days, we supported userspace initialising the GTT and sharing portions of the GTT with other users. Now, we own the GTT (both global and per-process) and the tables always start at 0 - so we can remove i915_address_space.start and forget about this old complication. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-20-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_gem_evict.c | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 16 ++++++---------- drivers/gpu/drm/i915/i915_gem_gtt.h | 1 - drivers/gpu/drm/i915/i915_vgpu.c | 9 ++++----- 5 files changed, 12 insertions(+), 18 deletions(-) commit 998f6c00a1dcb8c63de3744c37155eefcf27a421 Author: Chris Wilson Date: Wed Feb 15 08:43:53 2017 +0000 drm/i915: Remove unused ppgtt->enable() We never assign or use the ppgtt->enable() callback, so remove it. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-19-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.h | 1 - 1 file changed, 1 deletion(-) commit 3dc523eacef1f73c71b30babad91f028e2946b7d Author: Chris Wilson Date: Wed Feb 15 08:43:52 2017 +0000 drm/i915: Remove defunct GTT tracepoints The tracepoints are now entirely synonymous with binding and unbinding the VMA (and the tracepoints there). Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-18-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 4 -- drivers/gpu/drm/i915/i915_trace.h | 97 ------------------------------------- 2 files changed, 101 deletions(-) commit 75afcf72c714cd324b0be5f23916d2d501bdb9e6 Author: Chris Wilson Date: Wed Feb 15 08:43:51 2017 +0000 drm/i915: Always mark the PDP as dirty when altered We want to reload the PDP (and flush the TLB) when the addresses are changed. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-17-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ec151f31cd81cc99b957d6b528709d6ecfb25801 Author: Chris Wilson Date: Wed Feb 15 08:43:50 2017 +0000 drm/i915: Remove superfluous posting reads after clear GGTT The barrier here is not required - we apply the barrier before the range is ever reused by the GPU instead. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-16-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 3 --- 1 file changed, 3 deletions(-) commit c5d092a4293fa33559d5464c5bd58a2e3a44d6d7 Author: Chris Wilson Date: Wed Feb 15 08:43:49 2017 +0000 drm/i915: Remove bitmap tracking for used-pml4 We only operate on known extents (both for alloc/clear) and so we can use both the knowledge of the bind/unbind range along with the knowledge of the existing pagetable to avoid having to allocate temporary and auxiliary bitmaps. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-15-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 132 +++++++++++------------------------- drivers/gpu/drm/i915/i915_gem_gtt.h | 2 - 2 files changed, 38 insertions(+), 96 deletions(-) commit e2b763caa6eb68ea56918ee6f79b40b82bdcf7c9 Author: Chris Wilson Date: Wed Feb 15 08:43:48 2017 +0000 drm/i915: Remove bitmap tracking for used-pdpes We only operate on known extents (both for alloc/clear) and so we can use both the knowledge of the bind/unbind range along with the knowledge of the existing pagetable to avoid having to allocate temporary and auxiliary bitmaps. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-14-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 279 +++++++++++------------------------- drivers/gpu/drm/i915/i915_gem_gtt.h | 3 +- 2 files changed, 86 insertions(+), 196 deletions(-) commit fe52e37fa85d8b1404bed1389dde16297dad706a Author: Chris Wilson Date: Wed Feb 15 08:43:47 2017 +0000 drm/i915: Remove bitmap tracking for used-pdes We only operate on known extents (both for alloc/clear) and so we can use both the knowledge of the bind/unbind range along with the knowledge of the existing pagetable to avoid having to allocate temporary and auxiliary bitmaps. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-13-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 246 ++++++++++++------------------------ drivers/gpu/drm/i915/i915_gem_gtt.h | 6 +- 2 files changed, 84 insertions(+), 168 deletions(-) commit dd19674bacba227ae5d3ce680cbc5668198894dc Author: Chris Wilson Date: Wed Feb 15 08:43:46 2017 +0000 drm/i915: Remove bitmap tracking for used-ptes We only operate on known extents (both for alloc/clear) and so we can use both the knowledge of the bind/unbind range along with the knowledge of the existing pagetable to avoid having to allocate temporary and auxiliary bitmaps. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99295 Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Reviewed-by: Michał Winiarski Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-12-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 330 ++++++++++++------------------------ drivers/gpu/drm/i915/i915_gem_gtt.h | 5 +- drivers/gpu/drm/i915/i915_trace.h | 19 +-- 3 files changed, 117 insertions(+), 237 deletions(-) commit 16a011c8be2f36f972fd9295d0c350c7dffd4779 Author: Chris Wilson Date: Wed Feb 15 08:43:45 2017 +0000 drm/i915: Tidy gen6_write_pde() Stop passing around unused parameters makes the code more compact. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-11-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 39 +++++++++++++------------------------ 1 file changed, 14 insertions(+), 25 deletions(-) commit f0a22974acbdd17b03cff4bdee880e4f08cccf6d Author: Chris Wilson Date: Wed Feb 15 08:43:44 2017 +0000 drm/i915: Remove redundant clear of appgtt Upon creation of the va range, it is initialised to point at scratch. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-10-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ---- 1 file changed, 4 deletions(-) commit 52c126ee907f436fc871bfc15836b8011f6eb76d Author: Chris Wilson Date: Wed Feb 15 08:43:43 2017 +0000 drm/i915: Always preallocate gen6/7 ppgtt The hardware does not cope very well with us changing the PD within an active context (the context must be idle for it to re-read the PD). As we only check whether the page is idle before changing the entry (and on through the PD tree), we cannot reliably replace PD entries on gen6/gen7. To fully avoid changing the tree at runtime, preallocate it on init. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-9-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit ff685975d97f8cb28e2fe4e6d90a71fd93244815 Author: Chris Wilson Date: Wed Feb 15 08:43:42 2017 +0000 drm/i915: Move allocate_va_range to GTT In the future, we need to call allocate_va_range on the aliasing-ppgtt which means moving the call down from the vma into the vm (which is more appropriate for calling the vm function). Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-8-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 39 +++++++++++++++++++++++++------------ drivers/gpu/drm/i915/i915_vma.c | 9 --------- 2 files changed, 27 insertions(+), 21 deletions(-) commit 9231da70b338b336b982c74fad4afab5b55e6534 Author: Chris Wilson Date: Wed Feb 15 08:43:41 2017 +0000 drm/i915: Remove kmap/kunmap wrappers As these are now both plain and simple kmap_atomic/kunmap_atomic pairs, we can remove the wrappers for a small gain of clarity (in particular, not hiding the atomic critical sections!). Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 69 ++++++++++++++----------------------- 1 file changed, 26 insertions(+), 43 deletions(-) commit 8448661d65f6f5dbcdb9c5cba185b284f2464b65 Author: Chris Wilson Date: Wed Feb 15 08:43:40 2017 +0000 drm/i915: Convert clflushed pagetables over to WC maps We flush the entire page every time we update a few bytes, making the update of a page table many, many times slower than is required. If we create a WC map of the page for our updates, we can avoid the clflush but incur additional cost for creating the pagetable. We amoritize that cost by reusing page vmappings, and only changing the page protection in batches. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_drv.h | 2 - drivers/gpu/drm/i915/i915_gem_gtt.c | 333 +++++++++++++------------- drivers/gpu/drm/i915/i915_gem_gtt.h | 8 + drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 8 +- 4 files changed, 181 insertions(+), 170 deletions(-) commit cbc4e9e6a6d31fcc44921d2be41104425be8ab01 Author: Chris Wilson Date: Wed Feb 15 08:43:39 2017 +0000 drm/i915: Split ggtt/alasing_gtt unbind_vma Similar to how we already split the bind_vma for ggtt/aliasing_gtt, also split up the unbind for symmetry. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit 1188bc66eb33e64ac7452b5acd62ce0395204148 Author: Chris Wilson Date: Wed Feb 15 08:43:38 2017 +0000 drm/i915: Don't special case teardown of aliasing_ppgtt The aliasing_ppgtt is a regular ppgtt, and we can use the regular i915_ppgtt_put() to properly tear it down. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 50 +++++++++++-------------------------- 1 file changed, 15 insertions(+), 35 deletions(-) commit 894ccebee2b0e606ba9638d20dd87b33568482d7 Author: Chris Wilson Date: Wed Feb 15 08:43:37 2017 +0000 drm/i915: Micro-optimise gen8_ppgtt_insert_entries() Improve the sg iteration and in hte process eliminate a bug in miscomputing the pml4 length as orig_nents< Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 172 +++++++++++++++++++----------------- 1 file changed, 93 insertions(+), 79 deletions(-) commit b31144c0daa8c570d3fb60ddbd0e26ba1ea62485 Author: Chris Wilson Date: Wed Feb 15 08:43:36 2017 +0000 drm/i915: Micro-optimise gen6_ppgtt_insert_entries() Inline the address computation to avoid the vfunc call for every page. We still have to pay the high overhead of sg_page_iter_next(), but now at least GCC can optimise the inner most loop, giving a significant boost to some thrashing Unreal Engine workloads. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 68 ++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 35 deletions(-) commit ba7a5741b9ee6e9f682f949c8db6a96201ab4ca1 Author: Chris Wilson Date: Wed Feb 15 08:43:35 2017 +0000 drm/i915: Micro-optimise i915_get_ggtt_vma_pages() The predominant VMA class is normal GTT, so allow gcc to emphasize that path and avoid unnecessary stack movement. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 61 +++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 29 deletions(-) commit dfb65e71ea2c1d97ac373cc0587dc60b3307581a Author: Hans de Goede Date: Tue Feb 14 18:12:38 2017 +0200 drm/i915: Fix not finding the VBT when it overlaps with OPREGION_ASLE_EXT If there is no OPREGION_ASLE_EXT then a VBT stored in mailbox #4 may use the ASLE_EXT parts of the opregion. Adjust the vbt_size calculation for a vbt in mailbox #4 for this. This fixes the driver not finding the VBT on a jumper ezpad mini3 cherrytrail tablet and on a ACER SW5_017 machine. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1487088758-30050-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_opregion.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 4ac9659ef9f110a8f651e5a75c24e1ac439b44ff Author: Tvrtko Ursulin Date: Tue Feb 14 15:00:17 2017 +0000 drm/i915: Remove duplicate intel_logical_ring_workarounds_emit intel_ring_workarounds_emit is exactly the same code. Signed-off-by: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170214150017.16058-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_lrc.c | 35 +-------------------------------- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.h | 1 + 3 files changed, 3 insertions(+), 35 deletions(-) commit bd64818dfe3b19ecdcf47a7b0726c4b59ff4fb5e Author: Chris Wilson Date: Fri Feb 10 15:03:48 2017 +0000 drm/i915: Only apply the jump to the "efficient RPS" frequency on startup Currently we apply the jump to rpe if we are below it and the GPU needs more power. For some GPUs, the rpe is 75% of the maximum range causing us to dramatically overshoot low power applications *and* unable to reach the low frequency that can most efficiently deliver their workload. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170210150348.22146-3-chris@chris-wilson.co.uk Reviewed-by: Radoslaw Szwichtenberg drivers/gpu/drm/i915/i915_irq.c | 8 -------- drivers/gpu/drm/i915/intel_pm.c | 11 +++++++++-- 2 files changed, 9 insertions(+), 10 deletions(-) commit 17136d548e1b5ecd947da996f125907a671313d9 Author: Chris Wilson Date: Fri Feb 10 15:03:47 2017 +0000 drm/i915: Don't accidentally increase the frequency in handling DOWN rps If we receive a DOWN_TIMEOUT rps interrupt, we respond by reducing the GPU clocks significantly. Before we do, double check that the frequency we pick is actually a decrease. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170210150348.22146-2-chris@chris-wilson.co.uk Reviewed-by: Radoslaw Szwichtenberg drivers/gpu/drm/i915/i915_irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db4c5e0b726f021e864e887e6b49ad6ecebabf5a Author: Chris Wilson Date: Fri Feb 10 15:03:46 2017 +0000 drm/i915: Enable fine-tuned RPS for cherryview When the RPS tuning was applied to Baytrail, in commit 8fb55197e64d ("drm/i915: Agressive downclocking on Baytrail"), concern was given that it might cause Cherryview excess wakeups of the common power well. However, the static thresholds perform poorly for Kodi, and the GPU is unable to deliver the video frames on time. Enabling the dynamic, finer thresholds used on all other platforms (including Skylake and Broxton that also have the same multiple powerwell concerns) allows the GPU to pick a more appropriate frequency and not drop frames. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170210150348.22146-1-chris@chris-wilson.co.uk Reviewed-by: Radoslaw Szwichtenberg drivers/gpu/drm/i915/intel_pm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5a4c6f1b1b2d91c5252cedf1c7b68a894c3f117e Author: Chris Wilson Date: Tue Feb 14 16:46:11 2017 +0000 drm/i915: The return of i915_gpu_info to debugfs Once upon a time before we had automated GPU state capture upon hangs, we had intel_gpu_dump. Now we come almost full circle and reinstate that view of the current GPU queues and registers by using the error capture facility to snapshot the GPU state when debugfs/.../i915_gpu_info is opened - which should provided useful debugging to both the error capture routines (without having to cause a hang and avoid the error state being eaten by igt) and generally. v2: Rename drm_i915_error_state to i915_gpu_state to alleviate some name collisions between the error state dump and inspecting the gpu state. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170214164611.11381-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 113 ++++++++++++----------- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 46 ++++++---- drivers/gpu/drm/i915/i915_gpu_error.c | 165 ++++++++++++++++++---------------- drivers/gpu/drm/i915/i915_sysfs.c | 26 +++--- drivers/gpu/drm/i915/intel_display.c | 2 +- 6 files changed, 190 insertions(+), 164 deletions(-) commit 65300b1f6e04a905200ac5943cb9bfdadc3651a2 Author: Chris Wilson Date: Tue Feb 14 13:34:20 2017 +0000 drm/i915/guc: Don't take struct_mutex for object unreference We no longer need to take the struct_mutex for freeing objects, and on the finalisation paths here the mutex is not been used for serialisation of the pointer access, so remove the BKL wart. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170214133420.7977-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_guc_loader.c | 14 ++++++-------- drivers/gpu/drm/i915/intel_huc.c | 9 ++++----- 2 files changed, 10 insertions(+), 13 deletions(-) commit b8f2169db98eba2c5009cc67a448dc48a0fd4c48 Author: Chris Wilson Date: Tue Feb 14 14:35:09 2017 +0000 drm/i915: Silence compiler warning for seltests/i915_gem_coherency In general, the compiler should not be able to detect if we do any passes through the test loops: In file included from drivers/gpu/drm/i915/i915_gem.c:5029: drivers/gpu/drm/i915/selftests/i915_gem_coherency.c: In function 'igt_gem_coherency': drivers/gpu/drm/i915/selftests/i915_gem_coherency.c:274: error: 'err' may be used uninitialized in this function Reported-by: kbuild test robot Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170214143509.15719-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/selftests/i915_gem_coherency.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72affdf9729d9e9a81498196ed5ada4d8f1c599e Author: Chris Wilson Date: Tue Feb 14 11:37:56 2017 +0000 drm/i915: Silence compiler for GTT selftests gcc-4.7 spotted that In file included from drivers/gpu/drm/i915/i915_gem_gtt.c:3791:0: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c: In function ‘pot_hole’: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:594:6: error: ‘err’ may be used uninitialized in this function [-Werror=maybe-uninitialized] So set it to 0 should we ever skip over a hole smaller than a few pages. Signed-off-by: Chris Wilson Cc: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170214113756.27834-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e1c5f754067b594de58d387aa5873dec83b6c9fd Author: Chris Wilson Date: Tue Feb 14 09:23:44 2017 +0000 drm/i915: Avoid overflow in computing pot_hole loop termination When using the mock_ppgtt selftest, the GTT is large enough to cause an overflow in pot_hole() when adding 2 pages to the address. Avoid the overflow by computing the final valid address and iterating up to that address. Signed-off-by: Chris Wilson Cc: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170214092344.12330-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 813a787861a41da45678176b3923c6992e084cc2 Author: Chris Wilson Date: Fri Feb 10 19:59:13 2017 +0000 drm: Reduce EDID warnings from DRM_ERROR to DRM_NOTE The warnings from parsing the EDID are not driver errors, but the "normal but significant" conditions from the external device. As such, they do not need the ferocity of an *ERROR*, but can use the less harsh DRM_NOTE instead. Signed-off-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170210195913.9878-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_edid.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 96676fe3a18e61ee2d67992da537d6b68f45df66 Author: Deepak S Date: Fri Aug 12 18:46:41 2016 +0530 drm/i915/chv: Set min freq to RPn on CHV. With latest Punit FW, vgg input voltag drop falling to minimum is fixed. So reverting the WA patch & moving to turbo freq opreation range to [RPn -> RP0] This is not a 1:1 revert of the commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44. You can refer to commit 5b5929cbe3f7 ("drm/i915/chv: remove pre-production hardware workarounds") as the reason for the discrepancy commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44 Author: Deepak S Date: Sat May 9 18:15:46 2015 +0530 drm/i915/chv: Set min freq to efficient frequency on chv v2: Fix inconsistent return type. (Chris) v3: drop pre-production hw case (Ville) Acked-by: Chris Wilson Signed-off-by: Deepak S Link: http://patchwork.freedesktop.org/patch/msgid/1471007801-86075-1-git-send-email-deepak.s@linux.intel.com Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/intel_pm.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 64d83e34264bb4eeaf4f0f0fa69b8cf0bc558a7e Author: Ville Syrjälä Date: Wed Dec 21 16:31:14 2016 +0200 drm/i915: Dump more configuration information for DSI Dump out more of the DSI configuration details during init. This includes pclk, burst_mode_ratio, lane_count, pixel_overlap, video_mode_format and reset_timer_val. v2: Dump more info (Chris) v3: Use the VIDEO_MODE_ defines for consistency (Chris) Dump dphy_reg too (Chris) Cc: Chris Wilson Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20161221143114.23530-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 9cc19733fd7c83ac0577f2b80121dae3c289351b Author: Robert Bragg Date: Sun Feb 12 13:32:52 2017 +0000 drm/i915: fix for WaDisableDopClockGating:bdw This workaround for BDW was incomplete as it also requires EUTC clock gating to be disabled via UCGCTL1. v2: read modify write UCGTL1 in broadwell_init_clock_gating (Ville) Signed-off-by: Robert Bragg Cc: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170212133252.20990-1-robert@sixbynine.org Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/intel_pm.c | 8 ++++++++ drivers/gpu/drm/i915/intel_ringbuffer.c | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit 6ac7c5481168324d2d46479476cd781d847cf3a3 Author: Russell King Date: Mon Feb 13 12:27:03 2017 +0000 drm: ensure atomic messages consistently include the name of the component Most DRM messages include three pieces of information: the type of the component (CRTC, ENCODER, CONNECTOR etc), the DRM object ID of the component, and the component name. However, there are some messages which omit the last piece of identifying information. This makes it harder to debug failures when these messages are printed, because the DRM object ID doesn't supply enough information to know which piece of hardware had a problem. Update the atomic modeset code to always print the component name along with the type and DRM object ID. Fixes: 4cba68507cf5 ("drm/atomic-helper: Reject legacy flips on a disabled pipe") Fixes: 8d4d0d700dda ("drm/atomic-helper: Print an error if vblank wait times out") Fixes: 5481c8fb1da2 ("drm/atomic-helper: Check encoder/crtc constraints") Fixes: 99cf4a29fa24 ("drm/atomic: Add current-mode blob to CRTC state") Fixes: cc4ceb484b37 ("drm: Global atomic state handling") Signed-off-by: Russell King Reviewed-by: Maarten Lankhorst Acked-by: Thierry Reding [danvet: Wiggle in conflicting hunk.] Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_atomic.c | 9 +++++---- drivers/gpu/drm/drm_atomic_helper.c | 12 +++++++----- 2 files changed, 12 insertions(+), 9 deletions(-) commit cd57b48a4a33faa57f147623beee193759e69ba6 Author: Wei Yongjun Date: Thu Feb 9 15:19:07 2017 +0000 drm/msm/dsi: fix error return code in msm_dsi_host_init() Fix to return error code -ENOMEM from the malloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170209151907.28800-1-weiyj.lk@gmail.com drivers/gpu/drm/msm/dsi/dsi_host.c | 1 + 1 file changed, 1 insertion(+) commit 5721a3808fcdf6f23e5a6b8338e76e468d7bac4f Author: Maarten Lankhorst Date: Mon Jan 16 10:37:40 2017 +0100 drm/atomic: Use new atomic iterator macros. For consistency and all that, roll them out. Signed-off-by: Maarten Lankhorst Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1484559464-27107-4-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 5351bbdd19a6fe01b1d9fef835d3b3f38cba1461 Author: Maarten Lankhorst Date: Mon Jan 16 10:37:39 2017 +0100 drm/atomic: Make add_affected_connectors look at crtc_state. This kills another dereference of connector->state. connector_mask holds all unchanged connectors at least and any changed connectors are already in state anyway. Signed-off-by: Maarten Lankhorst Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1484559464-27107-3-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 581e49fe6b411f407102a7f2377648849e0fa37f Author: Maarten Lankhorst Date: Mon Jan 16 10:37:38 2017 +0100 drm/atomic: Add new iterators over all state, v3. Add for_each_(old)(new)_(plane,connector,crtc)_in_state iterators to replace the old for_each_xxx_in_state ones. This is useful for >1 flip depth and getting rid of all xxx->state dereferences. This requires extra fixups done when committing a state after duplicating, which in general isn't valid but is used by suspend/resume. To handle these, introduce drm_atomic_helper_commit_duplicated_state which performs those fixups before checking & committing the state. Changes since v1: - Remove nonblock parameter for commit_duplicated_state. Changes since v2: - Use commit_duplicated_state for i915 load detection. - Add WARN_ON(old_state != obj->state) before swapping. Signed-off-by: Maarten Lankhorst Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1484559464-27107-2-git-send-email-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic.c | 6 +++ drivers/gpu/drm/drm_atomic_helper.c | 65 +++++++++++++++++++++++++---- drivers/gpu/drm/i915/intel_display.c | 13 +++--- include/drm/drm_atomic.h | 81 ++++++++++++++++++++++++++++++++++-- include/drm/drm_atomic_helper.h | 2 + 5 files changed, 149 insertions(+), 18 deletions(-) commit a937eaf8242a44f402f63a8ed135026bdc2ab0e9 Author: Tvrtko Ursulin Date: Tue Feb 14 15:29:01 2017 +0000 drm/i915: Fix uninitialized return from mi_set_context For some reason my compiler (and CI as well) failed to spot the uninitialized ret in mi_set_context. Signed-off-by: Tvrtko Ursulin Fixes: 73dec95e6ba3 ("drm/i915: Emit to ringbuffer directly") Cc: Tvrtko Ursulin Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170214152901.20361-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_gem_context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 73dec95e6ba37d8138bb111be5c9b8a1f3a622ae Author: Tvrtko Ursulin Date: Tue Feb 14 11:32:42 2017 +0000 drm/i915: Emit to ringbuffer directly This removes the usage of intel_ring_emit in favour of directly writing to the ring buffer. intel_ring_emit was preventing the compiler for optimising fetch and increment of the current ring buffer pointer and therefore generating very verbose code for every write. It had no useful purpose since all ringbuffer operations are started and ended with intel_ring_begin and intel_ring_advance respectively, with no bail out in the middle possible, so it is fine to increment the tail in intel_ring_begin and let the code manage the pointer itself. Useless instruction removal amounts to approximately two and half kilobytes of saved text on my build. Not sure if this has any measurable performance implications but executing a ton of useless instructions on fast paths cannot be good. v2: * Change return from intel_ring_begin to error pointer by popular demand. * Move tail increment to intel_ring_advance to enable some error checking. v3: * Move tail advance back into intel_ring_begin. * Rebase and tidy. v4: * Complete rebase after a few months since v3. v5: * Remove unecessary cast and fix !debug compile. (Chris Wilson) v6: * Make intel_ring_offset take request as well. * Fix recording of request postfix plus a sprinkle of asserts. (Chris Wilson) v7: * Use intel_ring_offset to get the postfix. (Chris Wilson) * Convert GVT code as well. v8: * Rename *out++ to *cs++. v9: * Fix GVT out to cs conversion in GVT. v10: * Rebase for new intel_ring_begin in selftests. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Zhi Wang Reviewed-by: Chris Wilson Acked-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170214113242.29241-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gvt/cmd_parser.c | 36 +- drivers/gpu/drm/i915/i915_gem_context.c | 76 ++- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 40 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 69 ++- drivers/gpu/drm/i915/i915_gem_request.c | 8 +- drivers/gpu/drm/i915/intel_display.c | 131 ++--- drivers/gpu/drm/i915/intel_lrc.c | 207 ++++--- drivers/gpu/drm/i915/intel_mocs.c | 51 +- drivers/gpu/drm/i915/intel_overlay.c | 79 ++- drivers/gpu/drm/i915/intel_ringbuffer.c | 592 ++++++++++----------- drivers/gpu/drm/i915/intel_ringbuffer.h | 30 +- .../gpu/drm/i915/selftests/i915_gem_coherency.c | 33 +- 12 files changed, 625 insertions(+), 727 deletions(-) commit d2d1501625e96170958f38646a9fcc9b69bbc2df Author: Ander Conselvan de Oliveira Date: Mon Feb 13 16:57:33 2017 +0200 drm/i915: Convert remaining users of 32bit power domain masks I screwed up the rebase of commit d8fc70b7367b ("drm/i915: Make power domain masks 64 bit long") before sending v2, causing a couple of conversions from 32 to 64 bit masks to be lost. Fixes: d8fc70b7367b ("drm/i915: Make power domain masks 64 bit long") Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Ville Syrjälä Cc: Ander Conselvan de Oliveira Cc: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213145733.8779-1-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d892e9398ecf6defc7972a62227b77dad6be20bd Author: Chris Wilson Date: Sun Feb 12 21:53:43 2017 +0000 drm/i915: Pass timeout==0 on to i915_gem_object_wait_fence() The i915_gem_object_wait_fence() uses an incoming timeout=0 to query whether the current fence is busy or idle, without waiting. This can be used by the wait-ioctl to implement a busy query. Fixes: e95433c73a11 ("drm/i915: Rearrange i915_wait_request() accounting with callers") Testcase: igt/gem_wait/basic-busy-write-all Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Cc: # v4.10-rc1+ Cc: stable@vger.kernel.org Link: http://patchwork.freedesktop.org/patch/msgid/20170212215344.16600-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 04a68a35ce6d7b54749989f943993020f48fed62 Author: Chris Wilson Date: Wed Nov 9 10:39:05 2016 +0000 drm/i915/gvt: Disable access to stolen memory as a guest Explicitly disable stolen memory when running as a guest in a virtual machine, since the memory is not mediated between clients and reserved entirely for the host. The actual size should be reported as zero, but like every other quirk we want to tell the user what is happening. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99028 Signed-off-by: Chris Wilson Cc: Zhenyu Wang Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20161109103905.17860-1-chris@chris-wilson.co.uk Reviewed-by: Zhenyu Wang Cc: stable@vger.kernel.org drivers/gpu/drm/i915/i915_gem_stolen.c | 5 +++++ 1 file changed, 5 insertions(+) commit 496b575e3ccbf6fbe57a674c721af43dc8826361 Author: Chris Wilson Date: Mon Feb 13 17:15:58 2017 +0000 drm/i915: Add initial selftests for hang detection and resets Check that we can reset the GPU and continue executing from the next request. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-47-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 4 +- drivers/gpu/drm/i915/intel_hangcheck.c | 4 + .../gpu/drm/i915/selftests/i915_live_selftests.h | 1 + drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 537 +++++++++++++++++++++ 4 files changed, 544 insertions(+), 2 deletions(-) commit 7db4dceafa443f0b6c7df90f01b16ec8b9f8b25d Author: Chris Wilson Date: Mon Feb 13 17:15:57 2017 +0000 drm/i915: Exercise crossing pot boundaries in the GTT As the page-table trees within the GTT are naturally aligned to power-of-two boundaries, by inserting an object that crosses a power-of-two (and the power-of-two intervals) we can quickly check the code for errors in switching between levels in the tree. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-46-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 94 +++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit af85f50d1890e4ff29e083ad9ba2f93dbc684276 Author: Chris Wilson Date: Mon Feb 13 17:15:56 2017 +0000 drm/i915: Exercise manipulate of single pages in the GGTT Move a single page of an object around within the GGTT and check coherency of writes and reads. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-45-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 91 +++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) commit 210e8ac48f26c965d07db16cff7a5b3d02f8e337 Author: Chris Wilson Date: Mon Feb 13 17:15:55 2017 +0000 drm/i915: Add mock tests for GTT/VMA handling Use the live tests against the mock ppgtt for quick testing on all platforms of the VMA layer. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-44-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 5f32616edb8d717f5ef99ab9391388a6185afc58 Author: Chris Wilson Date: Mon Feb 13 17:15:54 2017 +0000 drm/i915: Add mock exercise for i915_gem_gtt_insert i915_gem_gtt_insert should allocate from the available free space in the GTT, evicting as necessary to create space. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-43-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 208 ++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) commit e619cd0d223d55b69732d0d61d1c497e506670ac Author: Chris Wilson Date: Mon Feb 13 17:15:53 2017 +0000 drm/i915: Add mock exercise for i915_gem_gtt_reserve i915_gem_gtt_reserve should put the node exactly as requested in the GTT, evicting as required. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-42-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 195 +++++++++++++++++++++ .../gpu/drm/i915/selftests/i915_mock_selftests.h | 1 + 2 files changed, 196 insertions(+) commit f40a7b7558ef95bbd869b3c8268c0b2a239087c9 Author: Chris Wilson Date: Mon Feb 13 17:15:52 2017 +0000 drm/i915: Initial selftests for exercising eviction Very simple tests to just ask eviction to find some free space in a full GTT and one with some available space. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-41-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_evict.c | 4 + drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 260 +++++++++++++++++++++ .../gpu/drm/i915/selftests/i915_mock_selftests.h | 1 + 3 files changed, 265 insertions(+) commit 92fdf8d4a39a9545c27b7ec2d5b138ff8cde5f91 Author: Chris Wilson Date: Mon Feb 13 17:15:51 2017 +0000 drm/i915: Force an aliasing_ppgtt test for context execution Ensure that we minimally exercise the aliasing_ppgtt, even on a full-ppgtt, by allocating one and similarly creating a context to use it. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-40-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_context.c | 61 +++++++++++++++++++++-- 1 file changed, 58 insertions(+), 3 deletions(-) commit 6cde9a02e001532744a56052b2aecbda8c51bf16 Author: Chris Wilson Date: Mon Feb 13 17:15:50 2017 +0000 drm/i915: Extract aliasing ppgtt setup In order to force testing of the aliasing ppgtt, extract its initialisation function. v2: Also extract the cleanup function for symmetry. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-39-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 90 +++++++++++++++++++++++-------------- drivers/gpu/drm/i915/i915_gem_gtt.h | 3 ++ 2 files changed, 59 insertions(+), 34 deletions(-) commit 791ff39ae32a34816cdca40891f142f4122ad409 Author: Chris Wilson Date: Mon Feb 13 17:15:49 2017 +0000 drm/i915: Live testing for context execution Check we can create and execution within a context. v2: Write one set of dwords through each context/engine to exercise more contexts within the same time period. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-38-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 1 + drivers/gpu/drm/i915/selftests/i915_gem_context.c | 404 +++++++++++++++++++++ .../gpu/drm/i915/selftests/i915_live_selftests.h | 1 + 3 files changed, 406 insertions(+) commit af1f83a152b5cf6a9a780b7204805cbe0ff905da Author: Chris Wilson Date: Mon Feb 13 17:15:48 2017 +0000 drm/i915: Test creation of partial VMA Mock testing to ensure we can create and lookup partial VMA. v2: Named phases Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-37-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_vma.c | 192 ++++++++++++++++++++++++++++++ 1 file changed, 192 insertions(+) commit a231bf643dcc5a221afbc52093e73f23d50d96ff Author: Chris Wilson Date: Mon Feb 13 17:15:47 2017 +0000 drm/i915: Verify page layout for rotated VMA Exercise creating rotated VMA and checking the page order within. v2..v3: Be more creative in rotated params Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-36-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_vma.c | 179 ++++++++++++++++++++++++++++++ 1 file changed, 179 insertions(+) commit 782a3e9ef2051f2bec7c4fb255aa6a8f7c530da8 Author: Chris Wilson Date: Mon Feb 13 17:15:46 2017 +0000 drm/i915: Exercise i915_vma_pin/i915_vma_insert High-level testing of the struct drm_mm by verifying our handling of weird requests to i915_vma_pin. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-35-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_vma.c | 4 +- drivers/gpu/drm/i915/i915_vma.h | 4 +- drivers/gpu/drm/i915/selftests/i915_vma.c | 151 ++++++++++++++++++++++++++++++ 3 files changed, 155 insertions(+), 4 deletions(-) commit e3c7a1c5377e54f99689a18cb85ae7f3b633b58a Author: Chris Wilson Date: Mon Feb 13 17:15:45 2017 +0000 drm/i915: Test creation of VMA Simple test to exercise creation and lookup of VMA within an object. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-34-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_vma.c | 3 + .../gpu/drm/i915/selftests/i915_mock_selftests.h | 1 + drivers/gpu/drm/i915/selftests/i915_vma.c | 224 +++++++++++++++++++++ 3 files changed, 228 insertions(+) commit aae4a3d811753d3f79c43c932b8f7d1bcbf42fb0 Author: Chris Wilson Date: Mon Feb 13 17:15:44 2017 +0000 drm/i915: Use fault-injection to force the shrinker to run in live GTT tests It is possible whilst allocating the page-directory tree for a ppgtt bind that the shrinker may run and reap unused parts of the tree. If the shrinker happens to remove a chunk of the tree that the allocate_va_range has already processed, we may then try to insert into the dangling tree. This test uses the fault-injection framework to force the shrinker to be invoked before we allocate new pages, i.e. new chunks of the PD tree. References: https://bugs.freedesktop.org/show_bug.cgi?id=99295 Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld drivers/gpu/drm/i915/Kconfig.debug | 1 + drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++ drivers/gpu/drm/i915/i915_selftest.h | 2 + drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 98 +++++++++++++++++++++++++++ 5 files changed, 109 insertions(+) commit 4a6f13fce1331df68e1fc7dd4eb0c0b461d5f845 Author: Chris Wilson Date: Mon Feb 13 17:15:43 2017 +0000 drm/i915: Live testing of lowlevel GTT operations Directly test allocating the va range and clearing it, this bypasses the use of i915_vma_bind() and inserting the pages to focus on testing of the pagetables. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-32-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 98 +++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) commit 5c3bff482ad19657d6bb07659b8a29554a909b58 Author: Chris Wilson Date: Mon Feb 13 17:15:42 2017 +0000 drm/i915: Exercise filling and removing random ranges from the live GTT Test the low-level i915_address_space interfaces to sanity check the live insertion/removal of address ranges. v2: Split out the low-level operations to a new test Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-31-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 113 ++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) commit 6e32ab3d47776247526ca83e434d6d0a746cfd64 Author: Chris Wilson Date: Mon Feb 13 17:15:41 2017 +0000 drm/i915: Fill different pages of the GTT Exercise filling different pages of the GTT v2: Walk all holes until we timeout Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-30-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 93 +++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit 62c981cfe78513aace9a156b0abf0246ba7c79f2 Author: Chris Wilson Date: Mon Feb 13 17:15:40 2017 +0000 drm/i915: Exercise filling the top/bottom portions of the global GTT Same test as previously for the per-process GTT instead applied to the global GTT. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-29-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 61 ++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) commit 8d28ba4568f4973b7fc5b12100a720979c16b4f0 Author: Chris Wilson Date: Mon Feb 13 17:15:39 2017 +0000 drm/i915: Exercise filling the top/bottom portions of the ppgtt Allocate objects with varying number of pages (which should hopefully consist of a mixture of contiguous page chunks and so coalesced sg lists) and check that the sg walkers in insert_pages cope. v2: Check both small <-> large Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-28-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_object.h | 3 + drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 362 ++++++++++++++++++++++++++ 2 files changed, 365 insertions(+) commit 1c42819a14a0868edd5d4b2db4594c1f7fc324d4 Author: Chris Wilson Date: Mon Feb 13 17:15:38 2017 +0000 drm/i915: Add initial selftests for i915_gem_gtt Simple starting point for adding selftests for i915_gem_gtt, first try creating a ppGTT and filling it. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-27-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 1 + drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 99 ++++++++++++++++++++++ .../gpu/drm/i915/selftests/i915_live_selftests.h | 1 + 3 files changed, 101 insertions(+) commit ced01afdf672d6ceab71f14e0aefb79b914ddd34 Author: Chris Wilson Date: Mon Feb 13 17:15:37 2017 +0000 drm/i915: Add a live dmabuf selftest Though we have good coverage of our dmabuf interface through the mock tests, we also want to check the heavy module unload paths of the live i915 driver. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-26-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c | 9 +++++++++ drivers/gpu/drm/i915/selftests/i915_live_selftests.h | 1 + 2 files changed, 10 insertions(+) commit 6cca22ede8a448d341b3e4565943f54bd8b8dcd0 Author: Chris Wilson Date: Mon Feb 13 17:15:36 2017 +0000 drm/i915: Add some mock tests for dmabuf interop Check that we can create both dmabuf and objects from dmabuf. v2: Cleanups, correct include, fix unpin on dead path and prevent explosion on dmabuf init failure Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-25-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_dmabuf.c | 5 + drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c | 294 +++++++++++++++++++++ .../gpu/drm/i915/selftests/i915_mock_selftests.h | 1 + drivers/gpu/drm/i915/selftests/mock_dmabuf.c | 176 ++++++++++++ drivers/gpu/drm/i915/selftests/mock_dmabuf.h | 41 +++ 5 files changed, 517 insertions(+) commit a8fb2bad82b64047d9c6090b859467cacc69e9d2 Author: Chris Wilson Date: Mon Feb 13 17:15:35 2017 +0000 drm/i915: Sanity check all registers for matching fw domains Add a late selftest that walks over all forcewake registers (those below 0x40000) and uses the mmio debug register to check to see if any are unclaimed. This is possible if we fail to wake the appropriate powerwells for the register. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-24-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/intel_uncore.c | 59 +++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 9852d543a85f3aaeb408259f5e462c4ce7f1dc99 Author: Chris Wilson Date: Mon Feb 13 17:15:34 2017 +0000 drm/i915: Test all fw tables during mock selftests In addition to just testing the fw table we load, during the initial mock testing we can test that all tables are valid (so the testing is not limited to just the platforms that load that particular table). Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-23-chris@chris-wilson.co.uk .../gpu/drm/i915/selftests/i915_mock_selftests.h | 1 + drivers/gpu/drm/i915/selftests/intel_uncore.c | 49 ++++++++++++++++------ 2 files changed, 37 insertions(+), 13 deletions(-) commit 26e7a2a17971400fee4fcacc0132439c043fd0e6 Author: Chris Wilson Date: Mon Feb 13 17:15:33 2017 +0000 drm/i915: Move uncore selfchecks to live selftest infrastructure Now that the kselftest infrastructure exists, put it to use and add to it the existing consistency checks on the fw register lookup tables. v2: s/tabke/table/ Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-22-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_uncore.c | 52 +---------- .../gpu/drm/i915/selftests/i915_live_selftests.h | 1 + drivers/gpu/drm/i915/selftests/intel_uncore.c | 100 +++++++++++++++++++++ 3 files changed, 105 insertions(+), 48 deletions(-) commit 170594502cf591fd0789d7e5239937b1a87af4c6 Author: Chris Wilson Date: Mon Feb 13 17:15:32 2017 +0000 drm/i915: Test coherency of and barriers between cache domains Write into an object using WB, WC, GTT, and GPU paths and make sure that our internal API is sufficient to ensure coherent reads and writes. v2: Avoid invalid free upon allocation error Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-21-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 1 + drivers/gpu/drm/i915/i915_selftest.h | 2 + .../gpu/drm/i915/selftests/i915_gem_coherency.c | 384 +++++++++++++++++++++ .../gpu/drm/i915/selftests/i915_live_selftests.h | 1 + 4 files changed, 388 insertions(+) commit 3d81d589d6e3c89b687771074f65cb8f3b59ccf3 Author: Chris Wilson Date: Mon Feb 13 17:15:31 2017 +0000 drm/i915: Test exhaustion of the mmap space An unlikely error condition that we can simulate by stealing most of the range before trying to insert new objects. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-20-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_object.c | 138 +++++++++++++++++++++++ 1 file changed, 138 insertions(+) commit 48d898172075e55cb6fdea52410795b4aeff1352 Author: Chris Wilson Date: Mon Feb 13 17:15:30 2017 +0000 drm/i915: Test partial mappings Create partial mappings to cover a large object, investigating tiling (fenced regions) and VMA reuse. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-19-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_object.c | 293 +++++++++++++++++++++++ 1 file changed, 293 insertions(+) commit 12d30d879398acf14cb2d5300a1c4b2ec777ee02 Author: Chris Wilson Date: Mon Feb 13 17:15:29 2017 +0000 drm/i915: Add a live seftest for GEM objects Starting with a placeholder test just to reassure that we can create a test object, Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-18-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_object.c | 49 ++++++++++++++++++++++ .../gpu/drm/i915/selftests/i915_live_selftests.h | 1 + 2 files changed, 50 insertions(+) commit 8335fd65ce6c880876ea0f94f427aa2499bcd05a Author: Chris Wilson Date: Mon Feb 13 17:15:28 2017 +0000 drm/i915: Add selftests for object allocation, phys The phys object is a rarely used device (only very old machines require a chunk of physically contiguous pages for a few hardware interactions). As such, it is not exercised by CI and to combat that we want to add a test that exercises the phys object on all platforms. v2: Always set err on error paths and not rely on inheriting the err. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-17-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 1 + drivers/gpu/drm/i915/selftests/i915_gem_object.c | 120 +++++++++++++++++++++ .../gpu/drm/i915/selftests/i915_mock_selftests.h | 1 + 3 files changed, 122 insertions(+) commit cd3862dc6e89817dbeefa02881400da926ffceeb Author: Chris Wilson Date: Mon Feb 13 17:15:27 2017 +0000 drm/i915: Live testing of empty requests Primarily to emphasize the difference between just advancing the breadcrumb using a bare request and the overhead of dispatching an execbuffer. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-16-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_request.c | 155 ++++++++++++++++++++++ 1 file changed, 155 insertions(+) commit 97b592b11a262356079aaa66eeb97c077515212c Author: Chris Wilson Date: Mon Feb 13 17:15:26 2017 +0000 drm/i915: Test request ordering between engines A request on one engine with a dependency on a request on another engine must wait for completion of the first request before starting. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-15-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_request.c | 132 ++++++++++++++++++++++ 1 file changed, 132 insertions(+) commit cf8be13df2ce232ccf0a7a7220613b476f7fedfa Author: Chris Wilson Date: Mon Feb 13 17:15:25 2017 +0000 drm/i915: Test simultaneously submitting requests to all engines Use a recursive-batch to busy spin on each to ensure that each is being run simultaneously. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-14-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_request.c | 184 ++++++++++++++++++++++ 1 file changed, 184 insertions(+) commit b348090d6758cc391dc91f8a8233b18f0acc8458 Author: Chris Wilson Date: Mon Feb 13 17:15:24 2017 +0000 drm/i915: Simple selftest to exercise live requests Just create several batches of requests and expect it to not fall over! Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-13-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_request.c | 147 +++++++++++++++++++++ .../gpu/drm/i915/selftests/i915_live_selftests.h | 1 + 2 files changed, 148 insertions(+) commit 5fd4d112d26cae71c0f92f9d83c0d29a22510025 Author: Chris Wilson Date: Mon Feb 13 17:15:23 2017 +0000 drm/i915: Add a simple fence selftest to i915_gem_request Do a quick selftest on in the interoperability of dma_fence_wait on a i915_gem_request. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-12-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_request.c | 61 +++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit f1ae924d1871391f5a8b21d8220531830475a902 Author: Chris Wilson Date: Mon Feb 13 17:15:22 2017 +0000 drm/i915: Add a simple request selftest for waiting A trivial kselftest to submit a request and wait upon it. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-11-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_request.c | 71 +++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit c835c5508358311d7922ea7b18bcaf611d1f8bb9 Author: Chris Wilson Date: Mon Feb 13 17:15:21 2017 +0000 drm/i915: Add selftests for i915_gem_request Simple starting point for adding seltests for i915_gem_request, first mock a device (with engines and contexts) that allows us to construct and execute a request, along with waiting for the request to complete. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-10-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_request.c | 5 ++ drivers/gpu/drm/i915/selftests/i915_gem_request.c | 68 ++++++++++++++++++++++ .../gpu/drm/i915/selftests/i915_mock_selftests.h | 1 + 3 files changed, 74 insertions(+) commit 44653988ef7c70bf7c55a5e642e22ce5446fb6b1 Author: Chris Wilson Date: Mon Feb 13 17:15:20 2017 +0000 drm/i915: Create a fake object for testing huge allocations We would like to be able to exercise huge allocations even on memory constrained devices. To do this we create an object that allocates only a few pages and remaps them across its whole range - each page is reused multiple times. We can therefore pretend we are rendering into a much larger object. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-9-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 1 + drivers/gpu/drm/i915/i915_gem_object.h | 20 ++-- drivers/gpu/drm/i915/selftests/huge_gem_object.c | 135 +++++++++++++++++++++++ drivers/gpu/drm/i915/selftests/huge_gem_object.h | 45 ++++++++ 4 files changed, 193 insertions(+), 8 deletions(-) commit 0daf0113cff6884ed947ffe0870a926e73d52f79 Author: Chris Wilson Date: Mon Feb 13 17:15:19 2017 +0000 drm/i915: Mock infrastructure for request emission Create a fake engine that runs requests using a timer to simulate hw. v2: Prevent leaks of ctx->name along error paths Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-8-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 4 + drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c | 11 +- drivers/gpu/drm/i915/selftests/mock_context.c | 78 ++++++++++ drivers/gpu/drm/i915/selftests/mock_context.h | 34 ++++ drivers/gpu/drm/i915/selftests/mock_engine.c | 172 +++++++++++++++++++-- drivers/gpu/drm/i915/selftests/mock_engine.h | 18 ++- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 95 +++++++++++- drivers/gpu/drm/i915/selftests/mock_gem_device.h | 1 + drivers/gpu/drm/i915/selftests/mock_request.c | 44 ++++++ drivers/gpu/drm/i915/selftests/mock_request.h | 44 ++++++ 10 files changed, 483 insertions(+), 18 deletions(-) commit 3b5bb0a37665ce1efaf3b9a551c945c09a726504 Author: Chris Wilson Date: Mon Feb 13 17:15:18 2017 +0000 drm/i915: Mock a GGTT for self-testing A very simple mockery, just a random manager and timeline. Useful for inserting objects and ordering retirement; and not much else. v2: mock_fini_ggtt() to complement mock_init_ggtt(). Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 4 + drivers/gpu/drm/i915/selftests/mock_gem_device.c | 31 +++++ drivers/gpu/drm/i915/selftests/mock_gtt.c | 138 +++++++++++++++++++++++ drivers/gpu/drm/i915/selftests/mock_gtt.h | 35 ++++++ 4 files changed, 208 insertions(+) commit 66d9cb5d805af70229ffe6f961bf06adc511f469 Author: Chris Wilson Date: Mon Feb 13 17:15:17 2017 +0000 drm/i915: Mock the GEM device for self-testing A simulacrum of drm_i915_private to let us pretend interactions with the device. v2: Tidy init error paths Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 4 + drivers/gpu/drm/i915/i915_gem.c | 1 + drivers/gpu/drm/i915/selftests/mock_drm.c | 54 ++++++++++++ drivers/gpu/drm/i915/selftests/mock_drm.h | 31 +++++++ drivers/gpu/drm/i915/selftests/mock_gem_device.c | 104 +++++++++++++++++++++++ drivers/gpu/drm/i915/selftests/mock_gem_device.h | 8 ++ drivers/gpu/drm/i915/selftests/mock_gem_object.h | 8 ++ 7 files changed, 210 insertions(+) commit e62e8ad1ba5701e0e0c1371041cbb677f75ba3fb Author: Chris Wilson Date: Mon Feb 13 17:15:16 2017 +0000 drm/i915: Add unit tests for the breadcrumb rbtree, wakeups Third retroactive test, make sure that the seqno waiters are woken. v2: Smattering of comments, rearrange code v3: Fix IDLE assert to avoid startup/sleep races Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c | 201 +++++++++++++++++++++ 1 file changed, 201 insertions(+) commit ae1f8090b1a7f163a16d72ddc4214a327ce989e0 Author: Chris Wilson Date: Mon Feb 13 17:15:15 2017 +0000 drm/i915: Add unit tests for the breadcrumb rbtree, completion Second retroactive test, make sure that the waiters are removed from the global wait-tree when their seqno completes. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c | 107 +++++++++++++++++++++ drivers/gpu/drm/i915/selftests/mock_engine.h | 6 ++ 2 files changed, 113 insertions(+) commit f97fbf9606a1a96d61d171e1ed1606b2b812fb01 Author: Chris Wilson Date: Mon Feb 13 17:15:14 2017 +0000 drm/i915: Add unit tests for the breadcrumb rbtree, insert/remove First retroactive test, make sure that the waiters are in global seqno order after random inserts and removals. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 21 +++ drivers/gpu/drm/i915/intel_engine_cs.c | 4 + drivers/gpu/drm/i915/intel_ringbuffer.h | 2 + .../gpu/drm/i915/selftests/i915_mock_selftests.h | 1 + drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c | 172 +++++++++++++++++++++ drivers/gpu/drm/i915/selftests/mock_engine.c | 55 +++++++ drivers/gpu/drm/i915/selftests/mock_engine.h | 32 ++++ 7 files changed, 287 insertions(+) commit 935a2f776aa523cd6ad20c9b7c7d019ba9418759 Author: Chris Wilson Date: Mon Feb 13 17:15:13 2017 +0000 drm/i915: Add some selftests for sg_table manipulation Start exercising the scattergather lists, especially looking at iteration after coalescing. v2: Comment on the peculiarity of table construction (i.e. why this sg_table might be interesting). v3: Added one __func__ to identify expect_pfn_sg() v4: Loop until we have crossed the chain boundary (forcing sg_table to do multiple allocations) before squelching a potential ENOMEM from oom. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 11 +- .../gpu/drm/i915/selftests/i915_mock_selftests.h | 1 + drivers/gpu/drm/i915/selftests/scatterlist.c | 355 +++++++++++++++++++++ 3 files changed, 364 insertions(+), 3 deletions(-) commit 953c7f82eb890085c60dbe22578e883d6837c674 Author: Chris Wilson Date: Mon Feb 13 17:15:12 2017 +0000 drm/i915: Provide a hook for selftests Some pieces of code are independent of hardware but are very tricky to exercise through the normal userspace ABI or via debugfs hooks. Being able to create mock unit tests and execute them through CI is vital. Start by adding a central point where we can execute unit tests and a parameter to enable them. This is disabled by default as the expectation is that these tests will occasionally explode. To facilitate integration with igt, any parameter beginning with i915.igt__ is interpreted as a subtest executable independently via igt/drv_selftest. Two classes of selftests are recognised: mock unit tests and integration tests. Mock unit tests are run as soon as the module is loaded, before the device is probed. At that point there is no driver instantiated and all hw interactions must be "mocked". This is very useful for writing universal tests to exercise code not typically run on a broad range of architectures. Alternatively, you can hook into the live selftests and run when the device has been instantiated - hw interactions are real. v2: Add a macro for compiling conditional code for mock objects inside real objects. v3: Differentiate between mock unit tests and late integration test. v4: List the tests in natural order, use igt to sort after modparam. v5: s/late/live/ v6: s/unsigned long/unsigned int/ v7: Use igt_ prefixes for long helpers. v8: Deobfuscate macros overriding functions, stop using -I$(src) Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170213171558.20942-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Kconfig.debug | 16 ++ drivers/gpu/drm/i915/Makefile | 3 + drivers/gpu/drm/i915/i915_pci.c | 31 ++- drivers/gpu/drm/i915/i915_selftest.h | 102 +++++++++ .../gpu/drm/i915/selftests/i915_live_selftests.h | 11 + .../gpu/drm/i915/selftests/i915_mock_selftests.h | 11 + drivers/gpu/drm/i915/selftests/i915_random.c | 63 ++++++ drivers/gpu/drm/i915/selftests/i915_random.h | 50 +++++ drivers/gpu/drm/i915/selftests/i915_selftest.c | 250 +++++++++++++++++++++ tools/testing/selftests/drivers/gpu/i915.sh | 1 + 10 files changed, 531 insertions(+), 7 deletions(-) commit 2ae557388d9feb7049ee311ab1b36bb4c6f6feb6 Author: Chris Wilson Date: Sun Feb 12 17:20:02 2017 +0000 drm/i915: Clear the last_retired_context following a hang/reset Following a hang and reset, we know that the engine is idle and all context state has been saved or lost. Consequently, we know that the engine is no longer referencing the last context and we can relinquish our tracking. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170212172002.23072-5-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit fe3288b5da2c1286a7aac1fb1b2234caa752a81b Author: Chris Wilson Date: Sun Feb 12 17:20:01 2017 +0000 drm/i915: Park the breadcrumbs signaler across a GPU reset The signal threads may be running concurrently with the GPU reset. The completion from the GPU run asynchronous with the reset and two threads may see different snapshots of the state, and the signaler may mark a request as complete as we try to reset it. We don't tolerate 2 different views of the same state and complain if we try to mark a request as failed if it is already complete. Disable the signal threads during reset to prevent this conflict (even though the conflict implies that the state we resetting to is invalid, we have already made our decision!). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99733 References: https://bugs.freedesktop.org/show_bug.cgi?id=99671 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170212172002.23072-4-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 16 +++++++++++++++- drivers/gpu/drm/i915/intel_breadcrumbs.c | 3 +++ 2 files changed, 18 insertions(+), 1 deletion(-) commit 1d309634bcf4e3ce1c2b112bb04fcdec82ac70e1 Author: Chris Wilson Date: Sun Feb 12 17:20:00 2017 +0000 drm/i915: Kill the tasklet then disable Disabling the tasklet leaves it if scheduled on the ready to run list until it is re-enabled. This will leave the ksoftird thread spinning until satisfied. To prevent this situation on starting the GPU reset, we want to kill the tasklet first and then disable. The same problem will arise when a tasklet is scheduled from another device, so a better solution is required for the general case. Reported-by: Tvrtko Ursulin Fixes: 1f7b847d72c3 ("drm/i915: Disable engine->irq_tasklet around resets") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170212172002.23072-3-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d613c539c74fa9055f88f4116196d7c820bd98f Author: Chris Wilson Date: Sun Feb 12 17:19:59 2017 +0000 drm/i915: Always call i915_gem_reset_finish() following i915_gem_reset_prepare() As i915_gem_reset_finish() undoes the steps from i915_gem_reset_prepare() to leave the system in a fully-working state, e.g. to be able to free the breadcrumb signal threads, make sure that we always call it even on the error path. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170212172002.23072-2-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c00122f33fe65c00103330e9f85dd2d3a63a3d2c Author: Chris Wilson Date: Sun Feb 12 17:19:58 2017 +0000 drm/i915: Assert that the active request hasn't been signaled As the request is not complete, it should not be signaled. Assert that this is true before we process the request for a reset. References: https://bugs.freedesktop.org/show_bug.cgi?id=99671 Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170212172002.23072-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 2 ++ 1 file changed, 2 insertions(+) commit 5b47d08900796081b7a1b1edf3aaedc119b625d4 Author: Wei Yongjun Date: Thu Feb 9 15:25:49 2017 +0000 drm/bridge/tfp410: Make symbol tfp410_platform_driver static Fixes the following sparse warning: drivers/gpu/drm/bridge/ti-tfp410.c:223:24: warning: symbol 'tfp410_platform_driver' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/20170209152549.30711-1-weiyj.lk@gmail.com drivers/gpu/drm/bridge/ti-tfp410.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4b10ccead4de0cf46bffb32fcb9e134b202676b Author: Laurent Pinchart Date: Mon Jan 2 11:16:13 2017 +0200 drm: Constify drm_mode_config atomic helper private pointer The drm_mode_config helper private field points to a structure of function pointers that don't need to be modified at runtime. Make it const. Signed-off-by: Laurent Pinchart Reviewed-by: Gabriel Krisman Bertazi Acked-by: Brian Starkey Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170102091613.6310-1-laurent.pinchart@ideasonboard.com drivers/gpu/drm/arm/malidp_drv.c | 2 +- drivers/gpu/drm/drm_atomic_helper.c | 2 +- drivers/gpu/drm/imx/imx-drm-core.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 2 +- drivers/gpu/drm/virtio/virtgpu_display.c | 2 +- include/drm/drm_mode_config.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 0097e20e7771c482c07cdf397e2a6b9e1154fad8 Author: Jonathan Cameron Date: Sun Feb 5 13:07:00 2017 +0000 staging:iio:adc:lpc32xx Move out of staging. There are a few more little cleanups that could be done on this driver, but I don't think any are sufficient to justify not moving it out of staging. It's a very simple driver (presumably for a simple part) so not much that can go wrong. I think it was only ever in staging because that's where IIO was as a whole at the time and then we forgot about it! Signed-off-by: Jonathan Cameron Cc: Roland Stigge Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 12 ++ drivers/iio/adc/Makefile | 1 + drivers/iio/adc/lpc32xx_adc.c | 219 ++++++++++++++++++++++++++++++++++ drivers/staging/iio/adc/Kconfig | 12 -- drivers/staging/iio/adc/Makefile | 1 - drivers/staging/iio/adc/lpc32xx_adc.c | 219 ---------------------------------- 6 files changed, 232 insertions(+), 232 deletions(-) commit 7901b2a1453e48c9defff2c97c67d3089bf4df7a Author: Jonathan Cameron Date: Sun Feb 5 13:06:59 2017 +0000 staging:iio:adc:lpc32xx rename local state structure to _state Previously it was called _info with instances as info. This caused some confusion against the info structure that are used in the core of IIO. Since this driver was written it's become a fairly strong convention to use _state and st for instances so change to that. Signed-off-by: Jonathan Cameron drivers/staging/iio/adc/lpc32xx_adc.c | 46 +++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) commit 5023574adc735a7c85fc4b1150fe82f8d3e0e076 Author: Jonathan Cameron Date: Sun Feb 5 13:06:58 2017 +0000 staging:iio:adc:lpc32xx Apply consistent prefix to local defines There was a bit of a random mixture going on here so change all prefixes to LPC32XXAD_ Signed-off-by: Jonathan Cameron drivers/staging/iio/adc/lpc32xx_adc.c | 54 +++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 25 deletions(-) commit af8f651b399798c4599e4994708afcf1f206120e Author: Jonathan Cameron Date: Sun Feb 5 12:34:00 2017 +0000 staging:iio:adc:spear Move out of staging. There are some unanswered questions due to disagreements between the code and various datasheets (including between different datasheets for the same part). I don't think that is necessarily a reason to keep it in staging however. I'm partly posting this patch inorder to reignite debate and with a bit of luck find someone who has one of these to test! Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 11 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/spear_adc.c | 395 ++++++++++++++++++++++++++++++++++++ drivers/staging/iio/adc/Kconfig | 10 - drivers/staging/iio/adc/Makefile | 1 - drivers/staging/iio/adc/spear_adc.c | 395 ------------------------------------ 6 files changed, 407 insertions(+), 406 deletions(-) commit b061f1a57c3d2e6ab0fc3988619eaab77917592b Author: William Breathitt Gray Date: Wed Feb 8 09:01:45 2017 -0500 Documentation: iio: 104-quad-8: Fix KernelVersion in sysfs ABI documentation The ACCES 104-QUAD-8 IIO driver did not appear in the 4.9 version of the Linux kernel. This patch fixes the KernelVersion lines of the 104-QUAD-8 sysfs ABI documentation. Fixes: 28e5d3bb0325 ("iio: 104-quad-8: Add IIO support for the ACCES 104-QUAD-8") Signed-off-by: William Breathitt Gray Signed-off-by: Jonathan Cameron .../ABI/testing/sysfs-bus-iio-counter-104-quad-8 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 7527a6ed033dc23048e21e5e8ddee681d204dd1e Author: William Breathitt Gray Date: Wed Feb 8 09:01:35 2017 -0500 Documentation: iio: Fix KernelVersion in counter sysfs ABI documentation The IIO counter driver support did not appear in the 4.9 version of the Linux kernel. This patch fixes the KernelVersion lines of the relevant IIO counter sysfs ABI documentation. Fixes: 1a8f324aa1f2 ("iio: Implement counter channel type and info constants") Signed-off-by: William Breathitt Gray Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a18ac95442c29caa6e1e6b7e3768de95aa19e79f Author: Brian Masney Date: Wed Feb 8 20:54:30 2017 -0500 iio: Documentation: add ABI documentation for in_proximity_sampling_frequency_available Add entry for the in_proximity_sampling_frequency_available sysfs entry to the existing sampling_frequency_available ABI documentation. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio | 1 + 1 file changed, 1 insertion(+) commit bcbbd0fa82de02ea47fbdaac4f1f42c819392884 Author: Brian Masney Date: Wed Feb 8 20:54:29 2017 -0500 staging: iio: isl29028: add copyright Add Brian Masney's copyright to the header for the several rounds of staging cleanups that has been done to this driver. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 1 + 1 file changed, 1 insertion(+) commit 0b59c388f89caeba22e205f7c6c985f4958323e4 Author: Brian Masney Date: Wed Feb 8 20:54:28 2017 -0500 staging: iio: isl29028: use the runtime power management for system sleep With the introduction of runtime power management in commit 2db5054ac28d ("staging: iio: isl29028: add runtime power management support"), the system could go to sleep and turn off the device without notifying the runtime power management code. This patch changes the system suspend and resume to go through the runtime power management. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 45e2852b8b27b92fb0f1ad9c94a8edd65c5a61c8 Author: Brian Masney Date: Wed Feb 8 20:54:26 2017 -0500 staging: iio: isl29028: fix incorrect sleep time when taking initial proximity reading When proximity is enabled in isl29028_enable_proximity(), the function msleep() is called with the sampling frequency, which is not correct. This patch changes the code to sleep the specified amount of time listed in the datasheet instead. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit 55bf851b4ad76778ce4e591dbb79006d7107cf3d Author: Brian Masney Date: Wed Feb 8 20:54:25 2017 -0500 staging: iio: isl29028: change mdelay() to msleep() This driver in some cases can busy wait for upwards of 100 ms. Since the kernel at this point is not running in atomic context, and is running in process context, we can safely use msleep() instead. This patch changes the two occurrences of mdelay() to msleep(). Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/isl29028.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 92196732bebf3f15962e747e09dbac7590403ec2 Author: Derek Robson Date: Fri Feb 10 20:00:08 2017 +1300 Staging: iio: meter: meter.h - style fix Changed file permissions to octal. Found with checkpatch. Signed-off-by: Derek Robson Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/meter.h | 60 +++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit ae9a043b0c5b0d90dcd9fb8b3a2d27f34f0725fc Author: Chris Wilson Date: Tue Feb 7 10:23:19 2017 +0000 drm/i915: Rename conditional GEM execution macros After a brief discussion, we settled on a naming convention for the conditional GEM debugging data that should be clearer to the casual user: GEM_DEBUG Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170207102319.10910-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.h | 12 ++++++------ drivers/gpu/drm/i915/intel_lrc.c | 8 ++++---- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.h | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) commit 8c12d121590ebe5a43bf9a0aedbbeb192f257846 Author: Chris Wilson Date: Fri Feb 10 18:52:14 2017 +0000 drm/i915: Move the irq_barrier for reset earlier into reset_prepare When updating the bookkeeping following the reset, we need the seqno to be coherent on the CPU prior to trusting its result for deciding whether any request is completed. We need the irq_barrier before we start making these decisions, i.e. in reset_prepare. References: https://bugs.freedesktop.org/show_bug.cgi?id=99733 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170210185214.23463-1-chris@chris-wilson.co.uk Reviewed-by: Michel Thierry drivers/gpu/drm/i915/i915_gem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c4d4c1c66be58e1e91a2eeada02c0cbdeb5fb350 Author: Chris Wilson Date: Fri Feb 10 16:35:23 2017 +0000 drm/i915: Flush the freed object queue on device release As dmabufs may live beyond the PCI device removal, we need to flush the freed object worker on device release, and include a warning in case there is a leak. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170210163523.17533-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 2 ++ 1 file changed, 2 insertions(+) commit 94d4a2a9aeec18d9a67f3353bfb9861402719fbd Author: Chris Wilson Date: Fri Feb 10 16:35:22 2017 +0000 drm/i915: Unbind any residual objects/vma from the Global GTT on shutdown We may unload the PCI device before all users (such as dma-buf) are completely shutdown. This may leave VMA in the global GTT which we want to revoke, whilst keeping the objects themselves around to service the dma-buf. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170210163523.17533-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit cad3688ff00656face6c78a1028fd02288b4a960 Author: Chris Wilson Date: Fri Feb 10 16:35:21 2017 +0000 drm/i915: Split device release from unload We may need to keep our memory management alive after we have unloaded the physical pci device. For example, if we have exported an object via dmabuf, that will keep the device around but the pci device may be removed before the dmabuf itself is released, use of the pci hardware will be revoked, but the memory and object management needs to persist for the dmabuf. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170210163523.17533-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 317eaa95081bfa081a5bf147e175b4e007e5a105 Author: Lyude Date: Fri Feb 3 21:18:25 2017 -0500 drm/i915/debugfs: Add i915_hpd_storm_ctl This adds a file in i915's debugfs directory that allows userspace to manually control HPD storm detection. This is mainly for hotplugging tests, where we might want to test HPD storm functionality or disable storm detection to speed up hotplugging tests without breaking anything. Changes since v1: - Make HPD storm interval configurable - Misc code cleanup Signed-off-by: Lyude Acked-by: Jani Nikula Cc: Tomeu Vizoso drivers/gpu/drm/i915/i915_debugfs.c | 78 +++++++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 4 ++ drivers/gpu/drm/i915/i915_irq.c | 2 + drivers/gpu/drm/i915/intel_hotplug.c | 15 ++++--- 5 files changed, 94 insertions(+), 6 deletions(-) commit 6401c37dbd6264b045961868c1438bf03efdd104 Author: Ville Syrjälä Date: Wed Feb 8 19:53:28 2017 +0200 drm/i915: Simplify platform checks in intel_fb_pitch_limit() Replace the VLV/CHV check with a HAS_GMCH_DISPLAY check in intel_fb_pitch_limit(), because it's shorter. Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170208175328.11064-1-ville.syrjala@linux.intel.com Reviewed-by: Ander Conselvan de Oliveira drivers/gpu/drm/i915/intel_display.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d158694f452252d0fef335a775aeb3eb74fe7af0 Author: Ville Syrjälä Date: Wed Feb 8 19:52:54 2017 +0200 drm/i915: Avoid spurious WARNs about the wrong pipe in the PPS code Until recently vlv_steal_power_sequencer() wasn't being called for normal DP ports, and hence it could assert that it should only be called for pipe A and B (since pipe C doesn't support eDP). However that changed when we started to consider normal DP ports as well when choosing a PPS. So we will now get spurious warnings when vlv_steal_power_sequencer() does get called for pipe C. Avoid this by moving the WARN down into vlv_detach_power_sequencer() where this assertion should still hold. Cc: Imre Deak Cc: stable@vger.kernel.org Fixes: 9f2bdb006a7e ("drm/i915: Prevent PPS stealing from a normal DP port on VLV/CHV") References: https://bugs.freedesktop.org/show_bug.cgi?id=95287 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170208175254.10958-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak drivers/gpu/drm/i915/intel_dp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 51a831a7725b1273381cb4a9f3f0d619276e3521 Merge: 4f4631a 13f62f5 Author: Daniel Vetter Date: Fri Feb 10 16:27:24 2017 +0100 Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued Chris Wilson needs the new drm_driver->release callback to make sure the shiny new dma-buf testcases don't oops the driver on unload. Signed-off-by: Daniel Vetter commit 4f4631af8faf791a60264cf028a16d61804414c8 Author: Chris Wilson Date: Fri Feb 10 13:36:32 2017 +0000 drm/i915/byt: Take powerwell for reading PIPESTAT in debugfs [12493.693827] WARNING: CPU: 1 PID: 14860 at drivers/gpu/drm/i915/intel_uncore.c:795 __unclaimed_reg_debug+0x5d/0x80 [i915] [12493.693868] Unclaimed read from register 0x1f0024 [12493.693905] Modules linked in: vgem i915 drm_kms_helper drm intel_gtt i2c_algo_bit syscopyarea sysfillrect sysimgblt fb_sys_fops prime_numbers intel_powerclamp crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel cryptd lpc_ich i2c_i801 mfd_core video i2c_designware_platform i2c_designware_core i2c_core button autofs4 sd_mod ahci libahci libata scsi_mod [last unloaded: i915] [12493.694039] CPU: 1 PID: 14860 Comm: intel-gpu-overl Tainted: G U 4.10.0-rc7+ #11 [12493.694079] Hardware name: GIGABYTE GB-BXBT-1900/MZBAYAB-00, BIOS F8 03/02/2016 [12493.694121] Call Trace: [12493.694169] dump_stack+0x67/0x9d [12493.694235] __warn+0x117/0x140 [12493.694288] warn_slowpath_fmt+0x4f/0x60 [12493.694344] ? do_raw_spin_lock+0x116/0x180 [12493.694533] ? check_for_unclaimed_mmio+0x98/0xe0 [i915] [12493.694727] __unclaimed_reg_debug+0x5d/0x80 [i915] [12493.694923] fwtable_read32+0x2c5/0x330 [i915] [12493.695108] i915_interrupt_info+0xd52/0xf80 [i915] [12493.695302] ? gen6_write16+0x310/0x310 [i915] [12493.695357] seq_read+0x187/0x710 [12493.695412] full_proxy_read+0x75/0xc0 [12493.695472] __vfs_read+0x5a/0x220 [12493.695524] ? kmem_cache_free+0x6c/0x260 [12493.695577] ? putname+0x97/0xa0 [12493.695629] ? putname+0x97/0xa0 [12493.695682] ? rcu_read_lock_sched_held+0xb8/0xd0 [12493.695735] ? rw_verify_area+0x65/0x140 [12493.695787] vfs_read+0xd1/0x1f0 [12493.695840] SyS_read+0x62/0xc0 [12493.695893] entry_SYSCALL_64_fastpath+0x1c/0xb1 [12493.695943] RIP: 0033:0x7f82dca99ba0 [12493.695985] RSP: 002b:00007ffc0bdfd4f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [12493.696031] RAX: ffffffffffffffda RBX: 00007ffc0be005a0 RCX: 00007f82dca99ba0 [12493.696073] RDX: 0000000000001fff RSI: 00007ffc0bdfd500 RDI: 000000000000001a [12493.696115] RBP: ffffffff810fb639 R08: 302f6972642f6775 R09: 00007f82dca0999a [12493.696157] R10: 00007f82dcd62760 R11: 0000000000000246 R12: ffff880069a17f98 [12493.696199] R13: 00007ffc0bdfd428 R14: 0000000000000003 R15: 00007ffc0bdfd428 [12493.696250] ? trace_hardirqs_off_caller+0xd9/0x130 [12493.696300] ---[ end trace 52ccf4d39793cc59 ]--- Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99761 Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170210133632.16946-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_debugfs.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 72b72ae47324a0b9851e254bb525d1dc47995e4e Author: Chris Wilson Date: Fri Feb 10 10:14:22 2017 +0000 drm/i915: Always pin contexts into the high GGTT Now that we have fast top-down insertion into the drm_mm, we can use it for frequent runtime operations like insertion of the context object, whereas before we limited it to the one-off insertion of the pinned kernel context. Keeping the active context objects out of the mappable region of the global GTT (except under memory pressure) improves our ability to allocate mappable aperture region without triggering a GPU stall. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170210101422.1598-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_lrc.c | 4 +--- drivers/gpu/drm/i915/intel_ringbuffer.c | 12 +++--------- 2 files changed, 4 insertions(+), 12 deletions(-) commit 370a81fb89cbb1a7f3ef119f84b3bd6d0ffebcf6 Author: Ander Conselvan de Oliveira Date: Fri Jan 13 14:20:32 2017 +0200 drm/i915: Remove unused function intel_ddi_get_link_dpll() The function intel_ddi_get_link_dpll() was added in f169660ed4e5 ("drm/i915/dp: Add a standalone function to obtain shared dpll for HSW/BDW/SKL/BXT") to "allow for the implementation of a platform neutral upfront link training function", but such implementation never landed. So remove that function and clean up the exported shared DPLL interface. Fixes: f169660ed4e5 ("drm/i915/dp: Add a standalone function to obtain shared dpll for HSW/BDW/SKL/BXT") Cc: Durgadoss R Cc: Manasi Navare Cc: Jim Bride Cc: Rodrigo Vivi Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Ander Conselvan de Oliveira Acked-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1484310032-1863-1-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_ddi.c | 39 -------------------------- drivers/gpu/drm/i915/intel_dpll_mgr.c | 52 ++++++----------------------------- drivers/gpu/drm/i915/intel_dpll_mgr.h | 16 ----------- drivers/gpu/drm/i915/intel_drv.h | 2 -- 4 files changed, 8 insertions(+), 101 deletions(-) commit d8fc70b7367b86ca14e825f8508f91bbbf237f3c Author: Ander Conselvan de Oliveira Date: Thu Feb 9 11:31:21 2017 +0200 drm/i915: Make power domain masks 64 bit long There are currently 30 power domains, which puts us pretty close to the limit with 32 bit masks. Prepare for the future and increase the limit to 64 bit. v2: Rebase v3: s/unsigned long long/u64/ (Joonas) Allow the 64th bit of the mask to be used. (Joonas) Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Ville Syrjälä Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170209093121.24410-1-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_drv.h | 4 +- drivers/gpu/drm/i915/intel_display.c | 34 +-- drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 378 ++++++++++++++++---------------- 4 files changed, 209 insertions(+), 209 deletions(-) commit 949e8ab3a94befd514eb79f2535f6017d8b4488f Author: Chris Wilson Date: Thu Feb 9 14:40:36 2017 +0000 drm/i915: Use the size/type of address space to make decisions Once the address space has been created (using 3 or 4 levels of page tables), we should use that to program the appropriate type into the contexts. This gives us the flexibility to handle different types of address spaces at runtime. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Matthew Auld Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170209144036.23664-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem_context.c | 20 +++++++++++++------- drivers/gpu/drm/i915/i915_gem_gtt.h | 6 ++++++ drivers/gpu/drm/i915/i915_reg.h | 3 --- drivers/gpu/drm/i915/intel_lrc.c | 6 +++--- 4 files changed, 22 insertions(+), 13 deletions(-) commit 8d2b47dde8a097e6fef2ebb5042cbb267cc75adf Author: Maarten Lankhorst Date: Thu Feb 2 08:41:42 2017 +0100 drm/i915: Enable atomic support by default on supported platforms. i915 is pretty much feature complete. Support for atomic i915-specific connector properties is still missing; those properties can (for now) only be set through the legacy ioctl. ILK style watermarks and gen9+ watermarks are handled atomically, and nonblocking modesets work. FBC has also been made to work with atomic. gen4x- and vlv/chv watermarks still need to be fixed, so disable atomic by default there for now. Flip the switch!! Signed-off-by: Maarten Lankhorst Cc: Ander Conselvan de Oliveira Cc: Chris Wilson Cc: Daniel Vetter Cc: Lyude Cc: Matt Roper Cc: Paulo Zanoni Cc: Rodrigo Vivi Cc: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1486021302-24910-1-git-send-email-maarten.lankhorst@linux.intel.com [mlankhorst: Fix checkpatch warning about extra space in match_info] Acked-by: Daniel Stone Reviewed-by: Lyude drivers/gpu/drm/i915/i915_drv.c | 10 +++++++--- drivers/gpu/drm/i915/i915_params.c | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) commit 6d1f9fb3120c9865c28f56ceba8d706a9ecb4b56 Author: Joonas Lahtinen Date: Thu Feb 9 13:34:25 2017 +0200 drm/i915: Add __destroy_hw_context __create_hw_context can use a good counterpart. Signed-off-by: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1486640065-13695-1-git-send-email-joonas.lahtinen@linux.intel.com drivers/gpu/drm/i915/i915_gem_context.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit e1cc3db020c7ef864b7aa02d5e193a110f8f3450 Author: Chris Wilson Date: Thu Feb 9 11:19:33 2017 +0000 drm/i915: Assert that we never create a vma for the aliasing_ppgtt The aliasing_ppgtt is just a container for the HW context that mirrors the global gtt. It should never be used directly, so assert if we make the mistake of trying to allocate a VMA for it. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170209111933.12420-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_vma.c | 3 +++ 1 file changed, 3 insertions(+) commit 969bb72cbfd906d347cf76dc9b8c8dbaf83ba27a Author: Chris Wilson Date: Wed Feb 8 18:12:38 2017 +0000 drm/i915: Check for timeout completion when waiting for the rq to submitted We first wait for a request to be submitted to hw and assigned a seqno, before we can wait for the hw to signal completion (otherwise we don't know the hw id we need to wait upon). Whilst waiting for the request to be submitted, we may exceed the user's timeout and need to propagate the error back. v2: Make ETIME into an error from wait_for_execute for consistent exit handling. Reported-by: Tvrtko Ursulin Fixes: 4680816be336 ("drm/i915: Wait first for submission, before waiting for request completion") Testcase: igt/gem_wait/basic-await Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: # v4.10-rc1+ Cc: stable@vger.kernel.org Link: http://patchwork.freedesktop.org/patch/msgid/20170208181238.7232-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_request.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit e81ecb5e31db6c2a259d694738cf620d9fa70861 Author: Zhi Wang Date: Wed Feb 8 21:03:33 2017 +0800 drm/i915: A hotfix for making aliasing PPGTT work for GVT-g This patch makes PPGTT page table non-shrinkable when using aliasing PPGTT mode. It's just a temporary solution for making GVT-g work. Fixes: 2ce5179fe826 ("drm/i915/gtt: Free unused lower-level page tables") Cc: Tvrtko Ursulin Cc: Michal Winiarski Cc: Michel Thierry Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Daniel Vetter Cc: Zhenyu Wang Cc: Zhiyuan Lv Signed-off-by: Zhi Wang Link: http://patchwork.freedesktop.org/patch/msgid/1486559013-25251-2-git-send-email-zhi.a.wang@intel.com Reviewed-by: Chris Wilson Cc: # v4.10-rc1+ Cc: stable@vger.kernel.org Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem_gtt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b71953a16da6fd2df2cb73824064f885e9a582d0 Author: Ander Conselvan de Oliveira Date: Fri Feb 3 16:03:14 2017 +0200 drm/i915/dp: Move initialization of hpd_pin to a new function This shaves a few lines from intel_dp_init_connector() and will serve as a good place to add other port specific information in a follow up patch. While at it, convert BUG() to MISSING_CASE() in the default case. v2: s/BUG/MISSING_CASE. (Chris) Cc: Chris Wilson Cc: Jani Nikula Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170203140316.20792-2-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_dp.c | 48 ++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 20 deletions(-) commit ca4c38909fabb1bf18e2cb805569c9559d7a56dc Author: Ander Conselvan de Oliveira Date: Fri Feb 3 16:03:13 2017 +0200 drm/i915: Remove WA for swapped HPD pins in broxton A stepping Remove workaround for swapped HPD pins in broxton A stepping, which is pre-production hardware. Cc: Jani Nikula Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170203140316.20792-1-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_ddi.c | 9 +-------- drivers/gpu/drm/i915/intel_dp.c | 2 -- drivers/gpu/drm/i915/intel_hdmi.c | 9 +-------- 3 files changed, 2 insertions(+), 18 deletions(-) commit e5b8afbe34545f259fb4d15ccca34428f1c39792 Author: Shawn Guo Date: Tue Feb 7 17:16:35 2017 +0800 drm: zte: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. The functions are moved around to save forward declaration. Signed-off-by: Shawn Guo Reviewed-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-24-git-send-email-shawnguo@kernel.org drivers/gpu/drm/zte/zx_drm_drv.c | 2 -- drivers/gpu/drm/zte/zx_vou.c | 61 +++++++++++++++------------------------- drivers/gpu/drm/zte/zx_vou.h | 3 -- 3 files changed, 23 insertions(+), 43 deletions(-) commit 0d5f46fa4cbdc728433543b37fd19227c7a1fe1f Author: Shawn Guo Date: Tue Feb 7 17:16:34 2017 +0800 drm: vc4: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. Signed-off-by: Shawn Guo Cc: Eric Anholt Reviewed-by: Eric Anholt Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-23-git-send-email-shawnguo@kernel.org drivers/gpu/drm/vc4/vc4_crtc.c | 8 ++++---- drivers/gpu/drm/vc4/vc4_drv.c | 2 -- drivers/gpu/drm/vc4/vc4_drv.h | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) commit 55cbc4dfcd1d73d74a2686a60754edf4388c25a2 Author: Shawn Guo Date: Tue Feb 7 17:16:33 2017 +0800 drm: tilcdc: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. While at it, the 'return' of .disable_vblank is dropped to fix the following checkpatch warning. WARNING: void function return statements are not generally useful Signed-off-by: Shawn Guo Cc: Jyri Sarha Acked-by: Jyri Sarha Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-22-git-send-email-shawnguo@kernel.org drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 11 +++++++++++ drivers/gpu/drm/tilcdc/tilcdc_drv.c | 12 ------------ 2 files changed, 11 insertions(+), 12 deletions(-) commit 10437d9b475e9f41f0d7a679659f1d1eab8987bc Author: Shawn Guo Date: Tue Feb 7 17:16:32 2017 +0800 drm: tegra: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. As the result, the wrapper functions tegra_drm_xxx get killed completely, and tegra_dc_xxx are filled into struct drm_crtc_funcs as vblank hooks directly. Signed-off-by: Shawn Guo Cc: Thierry Reding Acked-by: Thierry Reding Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-21-git-send-email-shawnguo@kernel.org drivers/gpu/drm/tegra/dc.c | 15 ++++++++++++--- drivers/gpu/drm/tegra/drm.c | 38 -------------------------------------- drivers/gpu/drm/tegra/drm.h | 3 --- 3 files changed, 12 insertions(+), 44 deletions(-) commit 50480a78e282b5aa1b83e61c7de956a9bfc0c656 Author: Shawn Guo Date: Tue Feb 7 17:16:31 2017 +0800 drm: sun4i: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. Signed-off-by: Shawn Guo Cc: Maxime Ripard Acked-by: Maxime Ripard Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-20-git-send-email-shawnguo@kernel.org drivers/gpu/drm/sun4i/sun4i_crtc.c | 24 ++++++++++++++++++++++++ drivers/gpu/drm/sun4i/sun4i_drv.c | 27 --------------------------- 2 files changed, 24 insertions(+), 27 deletions(-) commit ee255863703a1b1b06f0f4f68a00119dc5f4ccf4 Author: Shawn Guo Date: Tue Feb 7 17:16:30 2017 +0800 drm: shmobile: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. As the result, shmob_drm_crtc_enable_vblank() becomes a static function, although it gets moved around a bit to save forward declaration. Signed-off-by: Shawn Guo Cc: Laurent Pinchart Reviewed-by: Laurent Pinchart Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-19-git-send-email-shawnguo@kernel.org drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 51 +++++++++++++++++++++---------- drivers/gpu/drm/shmobile/shmob_drm_crtc.h | 1 - drivers/gpu/drm/shmobile/shmob_drm_drv.c | 19 ------------ 3 files changed, 35 insertions(+), 36 deletions(-) commit c3605dfc1e8bf051de45bd4fafdea4ed06296cb5 Author: Shawn Guo Date: Tue Feb 7 17:16:29 2017 +0800 drm: rockchip: remove struct rockchip_crtc_funcs With the vblank hooks in struct drm_crtc_funcs, we do not need to maintain struct rockchip_crtc_funcs and the related registration functions. Remove them. Signed-off-by: Shawn Guo Cc: Mark Yao Reviewed-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-18-git-send-email-shawnguo@kernel.org drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 51 ----------------------------- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 14 -------- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 9 ++--- 3 files changed, 2 insertions(+), 72 deletions(-) commit 20c8a288a0abfc2aa929efd332116ae15a5add4c Author: Shawn Guo Date: Tue Feb 7 17:16:28 2017 +0800 drm: rcar-du: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. Signed-off-by: Shawn Guo Cc: Laurent Pinchart Reviewed-by: Laurent Pinchart Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-17-git-send-email-shawnguo@kernel.org drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 29 +++++++++++++++++++---------- drivers/gpu/drm/rcar-du/rcar_du_crtc.h | 1 - drivers/gpu/drm/rcar-du/rcar_du_drv.c | 19 ------------------- 3 files changed, 19 insertions(+), 30 deletions(-) commit 65686873938df3482e33d41e037aff4b06e87f69 Author: Shawn Guo Date: Tue Feb 7 17:16:26 2017 +0800 drm: meson: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. Signed-off-by: Shawn Guo Cc: Neil Armstrong Acked-by: Neil Armstrong Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-15-git-send-email-shawnguo@kernel.org drivers/gpu/drm/meson/meson_crtc.c | 22 ++++++++++++++++++++++ drivers/gpu/drm/meson/meson_drv.c | 20 -------------------- 2 files changed, 22 insertions(+), 20 deletions(-) commit 44b460cfe55483f4b14dd8beb4953f452be1a005 Author: Shawn Guo Date: Tue Feb 7 17:16:24 2017 +0800 drm: imx: remove struct imx_drm_crtc and imx_drm_crtc_helper_funcs With the vblank hooks in struct drm_crtc_funcs, we do not need to maintain the CRTC specific vblank callbacks with struct imx_drm_crtc_helper_funcs any more. By moving the stuff that we currently do in imx_drm_add_crtc(), like of_node setting and drm_crtc_helper_add()/drm_crtc_init_with_planes() invoking, we can kill things like struct imx_drm_crtc, imx_drm_crtc_helper_funcs and related functions completely. Functions ipu_enable_vblank() and ipu_disable_vblank() are moved around without changes, only for saving the forward declarations. Signed-off-by: Shawn Guo Cc: Philipp Zabel Acked-by: Philipp Zabel Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-13-git-send-email-shawnguo@kernel.org drivers/gpu/drm/imx/imx-drm-core.c | 101 ------------------------------------- drivers/gpu/drm/imx/imx-drm.h | 13 ----- drivers/gpu/drm/imx/ipuv3-crtc.c | 58 ++++++++------------- 3 files changed, 22 insertions(+), 150 deletions(-) commit 14de02cdb0b8c8f34fe9c490cf6e426d529663ef Author: Shawn Guo Date: Tue Feb 7 17:16:22 2017 +0800 drm: hibmc: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. Signed-off-by: Shawn Guo Cc: Xinliang Liu Reviewed-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-11-git-send-email-shawnguo@kernel.org drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 20 ++++++++++++++++++++ drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 22 ---------------------- 2 files changed, 20 insertions(+), 22 deletions(-) commit 0396162ab9c571ee31f01866cbf168066dbf395d Author: Tomi Valkeinen Date: Wed Feb 8 13:26:00 2017 +0200 drm/omap: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Vetter drivers/gpu/drm/omapdrm/omap_crtc.c | 2 ++ drivers/gpu/drm/omapdrm/omap_drv.c | 2 -- drivers/gpu/drm/omapdrm/omap_drv.h | 4 ++-- drivers/gpu/drm/omapdrm/omap_irq.c | 18 ++++++++++-------- 4 files changed, 14 insertions(+), 12 deletions(-) commit 1f7b847d72c3583df5048d83bd945d0c2c524c28 Author: Chris Wilson Date: Wed Feb 8 14:30:33 2017 +0000 drm/i915: Disable engine->irq_tasklet around resets When we restart the engines, and we have active requests, a request on the first engine may complete and queue a request to the second engine before we try to restart the second engine. That queueing of the request may race with the engine to restart, and so may corrupt the current state. Disabling the engine->irq_tasklet prevents the two paths from writing into ELSP simultaneously (and modifyin the execlists_port[] at the same time). Fixes: 821ed7df6e2a ("drm/i915: Update reset path to fix incomplete requests") Testcase: igt/gem_exec_fence/await-hang Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170208143033.11651-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit d80270931314a88d79d9bd5e0a5df93c12196375 Author: Chris Wilson Date: Wed Feb 8 14:30:32 2017 +0000 drm/i915: Split GEM resetting into 3 phases Currently we do a reset prepare/finish around the call to reset the GPU, but it looks like we need a later stage after the hw has been reinitialised to allow GEM to restart itself. Start by splitting the 2 GEM phases into 3: prepare - before the reset, check if GEM recovered, then stop GEM reset - after the reset, update GEM bookkeeping finish - after the re-initialisation following the reset, restart GEM Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170208143033.11651-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 3 ++- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem.c | 7 ++++++- 3 files changed, 9 insertions(+), 2 deletions(-) commit 20a8a74ad9473e498da47e3094fa73057f3246d1 Author: Chris Wilson Date: Wed Feb 8 14:30:31 2017 +0000 drm/i915: Move calling engine->init_hw() to its own function Just a simple refactor to move a loop and some support code out of i915_gem_init_hw(). This is in preparation for avoiding a race between the tasklet writing to ELSP whilst simultaneously being written by engine->init_hw() following a GPU reset. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170208143033.11651-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 519d52498156b07c4bc69ad28ab8f784cc124628 Author: Chris Wilson Date: Wed Feb 8 10:47:10 2017 +0000 drm/i915: i915_gem_shrink_all() needs an awake device Since to unbind an object, we may need a powered up device to access the GTT entries, we only shrink bound objects if awake. Callers to i915_gem_shrink_all() had to take this into account and take the rpm wakeref, but we can move this wakeref into the shrink_all itself for convenience and making the function live up to its name. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170208104710.18089-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 4 ---- drivers/gpu/drm/i915/i915_gem_shrinker.c | 5 +++-- 2 files changed, 3 insertions(+), 6 deletions(-) commit ceb993201cf270a178671611a15a3b2037434ef1 Author: Ville Syrjälä Date: Fri Jan 20 20:22:05 2017 +0200 drm/i915: Move ilk_pipe_pixel_rate() to intel_display.c Move ilk_pipe_pixel_rate() next to its only caller (intel_crtc_compute_pixel_rate()). Signed-off-by: Ville Syrjälä Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/20170120182205.8141-15-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 35 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 1 - drivers/gpu/drm/i915/intel_pm.c | 33 --------------------------------- 3 files changed, 35 insertions(+), 34 deletions(-) commit b0587e4d20dcf8af3e350b010b4d2a21f95f2702 Author: Ville Syrjälä Date: Thu Jan 26 21:52:01 2017 +0200 drm/i915: Replace the .modeset_commit_cdclk() hook with a more direct .set_cdclk() hook With the cdclk state, all the .modeset_commit_cdclk() hooks are now pointless wrappers. Let's replace them with just a .set_cdclk() function pointer. However let's wrap that in a small helper that does the state comparison and prints a unified debug message across all platforms. We didn't even have the debug print on all platforms previously. This reduces the clutter in intel_atomic_commit_tail() a little bit. v2: Wrap .set_cdclk() in intel_set_cdclk() v3: Add kernel-docs v4: Deal with IS_GEN9_BC() Signed-off-by: Ville Syrjälä Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/20170126195201.32638-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 3 +- drivers/gpu/drm/i915/intel_cdclk.c | 79 +++++++++++++++--------------------- drivers/gpu/drm/i915/intel_display.c | 5 +-- drivers/gpu/drm/i915/intel_drv.h | 2 + 4 files changed, 38 insertions(+), 51 deletions(-) commit 63ff30442519bb40307f940c5a89a95ca904723a Author: Ville Syrjälä Date: Fri Jan 20 20:22:03 2017 +0200 drm/i915: Nuke the VLV/CHV PFI programming power domain workaround The hack to grab the pipe A power domain around VLV/CHV cdclk programming has surely outlived its usefulness. We should be holding sufficient power domains during any modeset, so let's just nuke this hack. v2: Fix typo in commit message (Ander) Signed-off-by: Ville Syrjälä Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/20170120182205.8141-13-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_cdclk.c | 14 -------------- 1 file changed, 14 deletions(-) commit 1a5301a58e5fca15598a1b3e79706b522d763574 Author: Ville Syrjälä Date: Thu Jan 26 21:57:19 2017 +0200 drm/i915: Move PFI credit reprogramming into vlv/chv_set_cdclk() Move the vlv_program_pfi_credits() into vlv_set_cdclk() and chv_set_cdclk() so that we can neuter vlv_modeset_commit_cdclk(). v2: Do the PFI programming after cdclk readout since it currently depends on the readout to fill dev_priv->cdclk.hw Signed-off-by: Ville Syrjälä Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/20170126195719.309-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_cdclk.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 83c5fda74f98307a19189414889363341ede8067 Author: Ville Syrjälä Date: Fri Jan 20 20:22:01 2017 +0200 drm/i915: Pass the cdclk state to the set_cdclk() functions Rather than passing all the different parameters (cdclk,vco so far) sparately to the set_cdclk() functions, just pass the entire cdclk state. v2: Deal with churn v3: Drop the usless .ref assignment (Ander) Signed-off-by: Ville Syrjälä Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/20170120182205.8141-11-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_cdclk.c | 78 +++++++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 30 deletions(-) commit 3d5dbb10f34ad0521bfb7091bd5b47f6c984b9aa Author: Ville Syrjälä Date: Fri Jan 20 20:22:00 2017 +0200 drm/i915: Pass dev_priv to remainder of the cdclk functions Clean up the dev vs. dev_priv straggles that are making things look inconsistentt. v2: Deal with churn Signed-off-by: Ville Syrjälä Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/20170120182205.8141-10-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_cdclk.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit bb0f4aab0e7677e91cde443fecc18e71fbb85038 Author: Ville Syrjälä Date: Fri Jan 20 20:21:59 2017 +0200 drm/i915: Track full cdclk state for the logical and actual cdclk frequencies The current dev_cdclk vs. cdclk vs. atomic_cdclk_freq is quite a mess. So here I'm introducing the "actual" and "logical" naming for our cdclk state. "actual" is what we'll bash into the hardware and "logical" is what everyone should use for state computaion/checking and whatnot. We'll track both using the intel_cdclk_state as both will need other differing parameters than just the actual cdclk frequency. While doing that we can at the same time unify the appearance of the .modeset_calc_cdclk() implementations a little bit. v2: Commit dev_priv->cdclk.actual since that already has the new state by the time .modeset_commit_cdclk() is called. v3: s/locical/logical/ and improve the docs a bit Signed-off-by: Ville Syrjälä Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/20170120182205.8141-9-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 20 ++++-- drivers/gpu/drm/i915/intel_cdclk.c | 123 ++++++++++++++++++++++------------- drivers/gpu/drm/i915/intel_display.c | 39 ++++++----- drivers/gpu/drm/i915/intel_dp.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 24 ++++--- drivers/gpu/drm/i915/intel_pm.c | 4 +- 6 files changed, 128 insertions(+), 84 deletions(-) commit 49cd97a35d9041b53ecf39d447f6a0f8f2de75eb Author: Ville Syrjälä Date: Tue Feb 7 20:33:45 2017 +0200 drm/i915: Start moving the cdclk stuff into a distinct state structure Introduce intel_cdclk state which for now will track the cdclk frequency, the vco frequency and the reference frequency (not sure we want the last one, but I put it there anyway). We'll also make the .get_cdclk() function fill out this state structure rather than just returning the current cdclk frequency. One immediate benefit is that calling .get_cdclk() will no longer clobber state stored under dev_priv unless ex[plicitly told to do so. Previously it clobbered the vco and reference clocks stored there on some platforms. We'll expand the use of this structure to actually precomputing the state and whatnot later. v2: Constify intel_cdclk_state_compare() v3: Document intel_cdclk_state_compare() v4: Deal with i945gm_get_cdclk() Signed-off-by: Ville Syrjälä Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/20170207183345.19763-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 14 +- drivers/gpu/drm/i915/intel_audio.c | 2 +- drivers/gpu/drm/i915/intel_cdclk.c | 382 +++++++++++++++++++------------- drivers/gpu/drm/i915/intel_display.c | 18 +- drivers/gpu/drm/i915/intel_dp.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 3 + drivers/gpu/drm/i915/intel_fbc.c | 2 +- drivers/gpu/drm/i915/intel_panel.c | 4 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 5 +- 10 files changed, 258 insertions(+), 176 deletions(-) commit 8f0cfa4d2a628a53e469f98aff7988555d654bc6 Author: Ville Syrjälä Date: Fri Jan 20 20:21:57 2017 +0200 drm/i915: Pass computed vco to bxt_set_cdclk() Rather than compute the vco inside bxt_set_cdclk() let's precompute it outside and pass it in. A small step towards a fully precomputed cdclk state. Signed-off-by: Ville Syrjälä Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/20170120182205.8141-7-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_cdclk.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit 7ff89ca2135814db74d7a1706b9abfb1448b8bed Author: Ville Syrjälä Date: Tue Feb 7 20:33:05 2017 +0200 drm/i915: Move most cdclk/rawclk related code to intel_cdclk.c Let's try to shrink intel_display.c a bit by moving the cdclk/rawclk stuff to a new file. It's all reasonably self contained so we don't even have to add that many non-static symbols. We'll also take the opportunity to shuffle around the functions a bit to get things in a more consistent order based on the platform. v2: Add kernel-docs (Ander) v3: Deal with IS_GEN9_BC() v4: Deal with i945gm_get_cdclk() Signed-off-by: Ville Syrjälä Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/20170207183305.19656-1-ville.syrjala@linux.intel.com Documentation/gpu/i915.rst | 9 + drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/intel_cdclk.c | 1794 ++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_display.c | 2137 ++++------------------------------ drivers/gpu/drm/i915/intel_drv.h | 9 +- 5 files changed, 2036 insertions(+), 1914 deletions(-) commit 4717e8bb7341a00f44da3d1814ac53c5a2a1ce75 Author: Ville Syrjälä Date: Tue Feb 7 20:32:26 2017 +0200 drm/i915: Clean up the .get_cdclk() assignment if ladder Let's clean up the mess we have in the if ladder that assigns the .get_cdclk() hooks. The grouping of the platforms by the function results in a thing that's not really legible, so let's do it the other way around and order the if ladder by platform and duplicate whatever assignments we need. To further avoid confusion with the function names let's rename them to just fixed__get_cdclk(). The other option would be to duplicate the functions entirely but it seems quite pointless to do that since each one just returns a fixed value. v2: Deal with i945gm_get_cdclk() Signed-off-by: Ville Syrjälä Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/20170207183226.19537-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 39 ++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 17 deletions(-) commit c49a0d054a054cc07f9ef4982a72e55a710e87d0 Author: Ville Syrjälä Date: Tue Feb 7 20:31:46 2017 +0200 drm/i915: s/get_display_clock_speed/get_cdclk/ Rename the .get_display_clock_speed() hook to .get_cdclk(). .get_cdclk() is more specific (which clock) and it's much shorter. v2: Deal with IS_GEN9_BC() v3: Deal with i945gm_get_display_clock_speed() Signed-off-by: Ville Syrjälä Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/20170207183146.19420-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 98 +++++++++++++-------------------- drivers/gpu/drm/i915/intel_runtime_pm.c | 3 +- 3 files changed, 41 insertions(+), 62 deletions(-) commit 4e841ecd4e185af2c6353f6d4ef480fb1f533d8a Author: Ville Syrjälä Date: Fri Jan 20 20:21:53 2017 +0200 drm/i915: Nuke intel_mode_max_pixclk() ilk_max_pixel_rate() will now give the "correct" pixel rate for all platforms, so let's rename it to intel_max_pixel_rate() and kill off intel_mode_max_pixclk(). v2: Fix typo in commit message (Ander) Signed-off-by: Ville Syrjälä Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/20170120182205.8141-3-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 41 ++++++------------------------------ 1 file changed, 6 insertions(+), 35 deletions(-) commit a7d1b3f41a2d3246736816ed1b966e1904760f7f Author: Ville Syrjälä Date: Thu Jan 26 21:50:31 2017 +0200 drm/i915: Store the pipe pixel rate in the crtc state Rather than recomputing the pipe pixel rate on demand everywhere, let's just stick the precomputed value into the crtc state. v2: Rebase due to min_pixclk[] code movement Document the new pixel_rate struct member (Ander) Combine vlv/chv with bdw+ in intel_modeset_readout_hw_state() v3: Fix typos in commit message (David) Cc: Ander Conselvan De Oliveira Signed-off-by: Ville Syrjälä Reviewed-by: Ander Conselvan de Oliveira Link: http://patchwork.freedesktop.org/patch/msgid/20170126195031.32343-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 36 ++++++++++++++++++++++++++++-------- drivers/gpu/drm/i915/intel_drv.h | 6 ++++++ drivers/gpu/drm/i915/intel_fbc.c | 3 +-- drivers/gpu/drm/i915/intel_pm.c | 14 +++++++------- 4 files changed, 42 insertions(+), 17 deletions(-) commit fb51ff40956ddef8f7d9448265ad3edc67eb0b2b Author: Tvrtko Ursulin Date: Tue Feb 7 08:50:25 2017 +0000 drm/i915/guc: Log significant events at the info level Currently to establish whether GuC firmware has been loaded or submission enabled (default DRM log level), one has to detect the absence of the message saying that the load has been skipped and infer the opposite. It is better to log the fact GuC firmware has been loaded and/or submission enabled explicitly to avoid any guesswork when looking at the logs. v2: * Log message polish. (Chris) * Future proof by reporting found firmware version. (Michal) Signed-off-by: Tvrtko Ursulin Cc: Arkadiusz Hiler Cc: Chris Wilson Cc: Michal Wajdeczko Reviewed-by: Chris Wilson Reviewed-by: Michal Wajdeczko (v1) Link: http://patchwork.freedesktop.org/patch/msgid/1486457425-32548-1-git-send-email-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_guc_loader.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 8385c2ecd47941072bdb3900bc272553ceb957e3 Author: Joonas Lahtinen Date: Wed Feb 8 15:12:10 2017 +0200 drm/i915: Use for_each_power_domain() in i915_power_domain_info() Macro seems to do exactly the same thing. Signed-off-by: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1486559530-15141-1-git-send-email-joonas.lahtinen@linux.intel.com drivers/gpu/drm/i915/i915_debugfs.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 3c779a49bd7ce6c9ecc35a679f28f94fe3cfaeab Author: Joonas Lahtinen Date: Wed Feb 8 15:12:09 2017 +0200 drm/i915: Avoid BIT(max) - 1 and use GENMASK(max - 1, 0) "BIT(max) - 1" will overflow when max = 32, and GCC will complain. We already have GENMASK for generating the mask, use it! v2: Majestic off by one spotted (Chris) Signed-off-by: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_device_info.c | 2 +- drivers/gpu/drm/i915/intel_fbdev.c | 2 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 82d753567f6f3bb5059bd18e8fd8aa7915fcbe05 Author: Tomeu Vizoso Date: Thu Dec 8 14:11:56 2016 +0100 drm/edid: Don't print an error if the checksum of a CEA block is wrong It's common to share screens within CI labs, and it's also common for KVM switches to alter the contents of the CEA block but leave the checksum outdated. So in this case, print a debug message instead of an error. References: https://bugs.freedesktop.org/show_bug.cgi?id=98228 Cc: Chris Wilson Cc: Tomi Sarvela Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Tomeu Vizoso Tested-by: Jari Tahvanainen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1481202716-31317-1-git-send-email-tomeu.vizoso@collabora.com drivers/gpu/drm/drm_edid.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 2776b1c190dc410ba522249b902ec7d69f30f003 Author: Shawn Guo Date: Tue Feb 7 17:16:21 2017 +0800 drm: fsl-dcu: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. Signed-off-by: Shawn Guo Cc: Stefan Agner Acked-by: Stefan Agner Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-10-git-send-email-shawnguo@kernel.org drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 25 ------------------------- 2 files changed, 26 insertions(+), 25 deletions(-) commit 038c95a313e4ca954ee5ab8a0c7559a646b0f462 Author: Michał Winiarski Date: Tue Feb 7 20:55:59 2017 +0100 drm/i915: Always convert incoming exec offsets to non-canonical We're using non-canonical addresses in drm_mm, and we're making sure that userspace is using canonical addressing - both in case of softpin (verifying incoming offset) and when relocating (converting to canonical when updating offset returned to userspace). Unfortunately when considering the need for relocations, we're comparing offset from userspace (in canonical form) with drm_mm node (in non-canonical form), and as a result, we end up always relocating if our offsets are in the "problematic" range. Let's always convert the offsets to avoid the performance impact of relocations. Fixes: a5f0edf63bdf ("drm/i915: Avoid writing relocs with addresses in non-canonical form") Cc: Chris Wilson Cc: Michel Thierry Reported-by: Michał Pyrzowski Signed-off-by: Michał Winiarski Link: http://patchwork.freedesktop.org/patch/msgid/20170207195559.18798-1-michal.winiarski@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem_execbuffer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit fce6a7bc22114c69b071bcf6fbfea2d07de6273c Author: Colin Ian King Date: Fri Feb 3 19:56:24 2017 +0000 drm/vc4: simplify exit path of a failed allocation of dsi_connector If dsi_connector fails to allocate, the exit path via label 'fail' checks if connector is null, which it always is, so the cleanup that destroys connector is never going to be called. Hence the failure path can be more optimally performed by removing this and just returning ERR_PTR(-ENOMEM). This also removes the need to initialize connector to NULL, and we can also remove ret too. Detected by CoverityScan, CID#1399504 ("Logicall Dead Code") Signed-off-by: Colin Ian King Reviewed-by: Eric Anholt Reviewed-by: Gustavo Padovan Link: http://patchwork.freedesktop.org/patch/msgid/20170203195624.7189-1-colin.king@canonical.com drivers/gpu/drm/vc4/vc4_dsi.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit c0dcb203fb009678e5be9e7782329dcfbbf16439 Author: Chris Wilson Date: Tue Feb 7 15:24:37 2017 +0000 drm/i915: Restore context and pd for ringbuffer submission after reset Following a reset, the context and page directory registers are lost. However, the queue of requests that we resubmit after the reset may depend upon them - the registers are restored from a context image, but that restore may be inhibited and may simply be absent from the request if it was in the middle of a sequence using the same context. If we prime the CCID/PD registers with the first request in the queue (even for the hung request), we prevent invalid memory access for the following requests (and continually hung engines). v2: Magic BIT(8), reserved for future use but still appears unused. v3: Some commentary on handling innocent vs guilty requests v4: Add a wait for PD_BASE fetch. The reload appears to be instant on my Ivybridge, but this bit probably exists for a reason. Fixes: 821ed7df6e2a ("drm/i915: Update reset path to fix incomplete requests") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170207152437.4252-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 18 ++++------ drivers/gpu/drm/i915/i915_reg.h | 6 ++-- drivers/gpu/drm/i915/intel_lrc.c | 16 ++++++++- drivers/gpu/drm/i915/intel_ringbuffer.c | 58 +++++++++++++++++++++++++++++++-- 4 files changed, 81 insertions(+), 17 deletions(-) commit 64b0e1d6c6a14dcbf0bde8b98207fc6b3569ce50 Author: Shawn Guo Date: Tue Feb 7 17:16:20 2017 +0800 drm: exynos: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. As the result, exynos_drm_crtc_enable[disable]_vblank() become static functions. They are moved around a bit to save forward declaration though. Also while at it, we move one step further to kill exynos_drm_crtc_from_pipe() completely by updating hdmi_bind() a bit. Signed-off-by: Shawn Guo Cc: Inki Dae Reviewed-by: Andrzej Hajda Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-9-git-send-email-shawnguo@kernel.org drivers/gpu/drm/exynos/exynos_drm_crtc.c | 40 ++++++++++++++++---------------- drivers/gpu/drm/exynos/exynos_drm_crtc.h | 2 -- drivers/gpu/drm/exynos/exynos_drm_drv.c | 3 --- drivers/gpu/drm/exynos/exynos_drm_drv.h | 8 ------- drivers/gpu/drm/exynos/exynos_hdmi.c | 7 ++++-- 5 files changed, 25 insertions(+), 35 deletions(-) commit 82308e27a96de176f0ded76883d14f0fead47508 Author: Shawn Guo Date: Tue Feb 7 17:16:19 2017 +0800 drm: atmel: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. Signed-off-by: Shawn Guo Cc: Boris Brezillon Acked-by: Boris Brezillon Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-8-git-send-email-shawnguo@kernel.org drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 21 +++++++++++++++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 21 --------------------- 2 files changed, 21 insertions(+), 21 deletions(-) commit 5922a7d0753c1a364b753ed587cb3a7940e45b98 Author: Shawn Guo Date: Tue Feb 7 17:16:18 2017 +0800 drm: armada: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. As the result, functions armada_drm_crtc_enable[disable]_irq() can be static, although they are moved around a bit to save forward declaration. The armada_crtc pointer array in struct armada_private is still kept in there, because armada_debugfs.c still have reference to it. Signed-off-by: Shawn Guo Cc: Russell King Acked-by: Russell King Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-7-git-send-email-shawnguo@kernel.org drivers/gpu/drm/armada/armada_crtc.c | 56 ++++++++++++++++++++++++------------ drivers/gpu/drm/armada/armada_crtc.h | 2 -- drivers/gpu/drm/armada/armada_drv.c | 16 ----------- 3 files changed, 37 insertions(+), 37 deletions(-) commit d7ae94bee46ba0894ab4195ec0cf267fdfb20cf1 Author: Shawn Guo Date: Tue Feb 7 17:16:17 2017 +0800 drm: malidp: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. Signed-off-by: Shawn Guo Cc: Mali DP Maintainers Acked-by: Liviu Dudau Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-6-git-send-email-shawnguo@kernel.org drivers/gpu/drm/arm/malidp_crtc.c | 21 +++++++++++++++++++++ drivers/gpu/drm/arm/malidp_drv.c | 21 --------------------- 2 files changed, 21 insertions(+), 21 deletions(-) commit 1fe25980bb2ef491e8688ae1113b0bb40e3b36a7 Author: Shawn Guo Date: Tue Feb 7 17:16:16 2017 +0800 drm: hdlcd: use vblank hooks in struct drm_crtc_funcs The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. Signed-off-by: Shawn Guo Acked-by: Liviu Dudau Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-5-git-send-email-shawnguo@kernel.org drivers/gpu/drm/arm/hdlcd_crtc.c | 20 ++++++++++++++++++++ drivers/gpu/drm/arm/hdlcd_drv.c | 20 -------------------- 2 files changed, 20 insertions(+), 20 deletions(-) commit 5ac74757eef78d69cd3aabe503b29aff471fdd56 Author: Shawn Guo Date: Tue Feb 7 17:16:15 2017 +0800 drm: unexport function drm_vblank_no_hw_counter() The function drm_vblank_no_hw_counter() is now only used in core vblank wrapper code. Let's unexport it by making it a static function. Signed-off-by: Shawn Guo Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-4-git-send-email-shawnguo@kernel.org drivers/gpu/drm/drm_irq.c | 28 ++++++++++------------------ include/drm/drm_drv.h | 7 +++---- include/drm/drm_irq.h | 1 - 3 files changed, 13 insertions(+), 23 deletions(-) commit 967dd48417874dd25491a4e933648f394a64f70f Author: Shawn Guo Date: Tue Feb 7 17:16:14 2017 +0800 drm: remove drm_vblank_no_hw_counter assignment from driver code Core code already makes drm_driver.get_vblank_counter hook optional by letting drm_vblank_no_hw_counter be the default implementation for the function hook. So the drm_vblank_no_hw_counter assignment in the driver code becomes redundant and can be removed now. Signed-off-by: Shawn Guo Cc: Alexey Brodkin Cc: Liviu Dudau Cc: Mali DP Maintainers Cc: Russell King Cc: Boris Brezillon Cc: Inki Dae Cc: Stefan Agner Cc: Xinliang Liu Cc: Daniel Vetter Cc: Philipp Zabel Cc: CK Hu Cc: Neil Armstrong Cc: Rob Clark Cc: Marek Vasut Cc: Ben Skeggs Cc: Tomi Valkeinen Cc: Laurent Pinchart Cc: Mark Yao Cc: Benjamin Gaignard Cc: Maxime Ripard Cc: Jyri Sarha Cc: Eric Anholt Acked-by: Maxime Ripard Acked-by: Boris Brezillon Acked-by: Neil Armstrong Acked-by: Russell King Reviewed-by: Laurent Pinchart Acked-by: Alexey Brodkin Acked-by: Liviu Dudau Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-3-git-send-email-shawnguo@kernel.org drivers/gpu/drm/arc/arcpgu_drv.c | 1 - drivers/gpu/drm/arm/hdlcd_drv.c | 1 - drivers/gpu/drm/arm/malidp_drv.c | 1 - drivers/gpu/drm/armada/armada_drv.c | 1 - drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 1 - drivers/gpu/drm/exynos/exynos_drm_drv.c | 1 - drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 1 - drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 1 - drivers/gpu/drm/i915/i915_irq.c | 1 - drivers/gpu/drm/imx/imx-drm-core.c | 1 - drivers/gpu/drm/mediatek/mtk_drm_drv.c | 1 - drivers/gpu/drm/meson/meson_drv.c | 1 - drivers/gpu/drm/msm/msm_drv.c | 1 - drivers/gpu/drm/mxsfb/mxsfb_drv.c | 1 - drivers/gpu/drm/nouveau/nouveau_drm.c | 1 - drivers/gpu/drm/omapdrm/omap_drv.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_drv.c | 1 - drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 - drivers/gpu/drm/shmobile/shmob_drm_drv.c | 1 - drivers/gpu/drm/sti/sti_drv.c | 1 - drivers/gpu/drm/sun4i/sun4i_drv.c | 1 - drivers/gpu/drm/tilcdc/tilcdc_drv.c | 1 - drivers/gpu/drm/vc4/vc4_drv.c | 1 - drivers/gpu/drm/zte/zx_drm_drv.c | 1 - 25 files changed, 25 deletions(-) commit 84e354839b158d87318eb7fa9828d52baceb23c3 Author: Shawn Guo Date: Tue Feb 7 17:16:13 2017 +0800 drm: add vblank hooks to struct drm_crtc_funcs The vblank is mostly CRTC specific and implemented as part of CRTC driver. Let's keep the vblank hooks struct drm_driver for legacy drivers, and add corresponding hooks in struct drm_crtc_funcs. These hooks take struct drm_crtc pointer as argument, and will be called by core vblank handling code for DRIVER_MODESET drivers. The new hooks get plugged into core by adding wrapper functions for vblank handling code. The .get_vblank_counter hook is effectively optional, as we provide drm_vblank_no_hw_counter() as the default fallback in the wrapper function. Signed-off-by: Shawn Guo Reviewed-by: Andrzej Hajda Acked-by: Thierry Reding Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-2-git-send-email-shawnguo@kernel.org drivers/gpu/drm/drm_irq.c | 53 +++++++++++++++++++++++++++++++++++++++++------ include/drm/drm_crtc.h | 44 +++++++++++++++++++++++++++++++++++++++ include/drm/drm_drv.h | 9 ++++++++ 3 files changed, 100 insertions(+), 6 deletions(-) commit da7bdda2afdf1ae58546218b50771c2c646bb079 Author: Daniel Vetter Date: Tue Feb 7 17:16:03 2017 +0100 drm/fb-helper: Automatically clean up fb_info Noticed that everyone duplicates the same logic here and we could safe a few lines per driver. Yay for lots of drivers to make such tiny refactors worth-while! v2: Forgot to git add everything :( v3: Actually remove release_fbi (Sean, Emil, Chris) ... Cc: Chris Wilson Cc: Sean Paul Cc: Noralf Trønnes Cc: Emil Velikov Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170207161603.17611-1-daniel.vetter@ffwll.ch drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 11 +++---- drivers/gpu/drm/armada/armada_fbdev.c | 2 -- drivers/gpu/drm/ast/ast_fb.c | 9 ++---- drivers/gpu/drm/bochs/bochs_fbdev.c | 5 +-- drivers/gpu/drm/cirrus/cirrus_fbdev.c | 1 - drivers/gpu/drm/drm_fb_cma_helper.c | 3 +- drivers/gpu/drm/drm_fb_helper.c | 39 ++++++++--------------- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 -- drivers/gpu/drm/gma500/framebuffer.c | 9 ++---- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 2 -- drivers/gpu/drm/i915/intel_fbdev.c | 5 +-- drivers/gpu/drm/mgag200/mgag200_fb.c | 5 +-- drivers/gpu/drm/msm/msm_fbdev.c | 1 - drivers/gpu/drm/nouveau/nouveau_fbcon.c | 1 - drivers/gpu/drm/omapdrm/omap_fbdev.c | 4 --- drivers/gpu/drm/qxl/qxl_fb.c | 5 +-- drivers/gpu/drm/radeon/radeon_fb.c | 11 +++---- drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 9 ++---- drivers/gpu/drm/tegra/fb.c | 5 +-- drivers/gpu/drm/udl/udl_fb.c | 5 +-- drivers/gpu/drm/virtio/virtgpu_fb.c | 5 +-- include/drm/drm_fb_helper.h | 4 --- 22 files changed, 39 insertions(+), 104 deletions(-) commit ed84e2542d2278bf1eff14b6bbd60ba74c8a5602 Author: Daniel Vetter Date: Tue Feb 7 15:10:49 2017 +0100 drm/fb-helper: Explain unload sequence a bit better While reviewing Chris' patches to properly cancel our async workers I checked that this happens after the fbdev is already unregistered. That's the case, but I found a small gap in our docs, fill that in. Note that I don't explain what release_fbi does, because that function will disappear in the next patch ... Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170207141050.1129-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_fb_helper.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 0e70dad08393b218c08c4b741585d25e51b6f0c3 Author: Thierry Reding Date: Tue Feb 7 18:51:13 2017 +0100 drm/doc: Add TODO list This commit adds a TODO list to the GPU driver developer's guide. The content was taken from the DRMJanitors page on the X.Org wiki: https://www.x.org/wiki/DRMJanitors/ The goal is to track a list of refactorings that would be nice to see merged eventually. Sometimes these would be encountered during patch review on the mailing list, and at other times one can come across these while working in a specific area of code. Signed-off-by: Thierry Reding Acked-by: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170207175113.2793-1-thierry.reding@gmail.com Documentation/gpu/index.rst | 1 + Documentation/gpu/introduction.rst | 10 ++ Documentation/gpu/todo.rst | 298 +++++++++++++++++++++++++++++++++++++ 3 files changed, 309 insertions(+) commit 6248017ae5301ccb51cda92c4117b573b9aff6bb Author: Arthur Heymans Date: Wed Feb 1 00:50:26 2017 +0100 drm/i915: Get correct display clock on 945gm This is according to Mobile Intel® 945 Express Chipset Family datasheet. Signed-off-by: Arthur Heymans Link: http://patchwork.freedesktop.org/patch/msgid/20170131235026.26003-1-arthur@aheymans.xyz Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/i915_reg.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 27 +++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) commit e0ec3ec698851a6c97a12d696407b3ff77700c23 Author: Chris Wilson Date: Fri Feb 3 12:57:17 2017 +0000 drm/i915: Remove overzealous fence warn on runtime suspend The goal of the WARN was to catch when we are still actively using the fence as we go into the runtime suspend. However, the reg->pin_count is too coarse as it does not distinguish between exclusive ownership of the fence register from activity. I've not improved on the WARN, nor have we captured this WARN in an exact igt, but it is showing up regularly in the wild: [ 1915.935332] WARNING: CPU: 1 PID: 10861 at drivers/gpu/drm/i915/i915_gem.c:2022 i915_gem_runtime_suspend+0x116/0x130 [i915] [ 1915.935383] WARN_ON(reg->pin_count)[ 1915.935399] Modules linked in: snd_hda_intel i915 drm_kms_helper vgem netconsole scsi_transport_iscsi fuse vfat fat x86_pkg_temp_thermal coretemp intel_cstate intel_uncore snd_hda_codec_hdmi snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core snd_pcm snd_timer snd mei_me mei serio_raw intel_rapl_perf intel_pch_thermal soundcore wmi acpi_pad i2c_algo_bit syscopyarea sysfillrect sysimgblt fb_sys_fops drm r8169 mii video [last unloaded: drm_kms_helper] [ 1915.935785] CPU: 1 PID: 10861 Comm: kworker/1:0 Tainted: G U W 4.9.0-rc5+ #170 [ 1915.935799] Hardware name: LENOVO 80MX/Lenovo E31-80, BIOS DCCN34WW(V2.03) 12/01/2015 [ 1915.935822] Workqueue: pm pm_runtime_work [ 1915.935845] ffffc900044fbbf0 ffffffffac3220bc ffffc900044fbc40 0000000000000000 [ 1915.935890] ffffc900044fbc30 ffffffffac059bcb 000007e6044fbc60 ffff8801626e3198 [ 1915.935937] ffff8801626e0000 0000000000000002 ffffffffc05e5d4e 0000000000000000 [ 1915.935985] Call Trace: [ 1915.936013] [] dump_stack+0x4f/0x73 [ 1915.936038] [] __warn+0xcb/0xf0 [ 1915.936060] [] warn_slowpath_fmt+0x5f/0x80 [ 1915.936158] [] i915_gem_runtime_suspend+0x116/0x130 [i915] [ 1915.936251] [] intel_runtime_suspend+0x64/0x280 [i915] [ 1915.936277] [] ? dequeue_entity+0x241/0xbc0 [ 1915.936298] [] pci_pm_runtime_suspend+0x55/0x180 [ 1915.936317] [] ? pci_pm_runtime_resume+0xa0/0xa0 [ 1915.936339] [] __rpm_callback+0x32/0x70 [ 1915.936356] [] rpm_callback+0x24/0x80 [ 1915.936375] [] ? pci_pm_runtime_resume+0xa0/0xa0 [ 1915.936392] [] rpm_suspend+0x12d/0x680 [ 1915.936415] [] ? _raw_spin_unlock_irq+0x17/0x30 [ 1915.936435] [] ? finish_task_switch+0x88/0x220 [ 1915.936455] [] pm_runtime_work+0x6f/0xb0 [ 1915.936477] [] process_one_work+0x1f3/0x4d0 [ 1915.936501] [] worker_thread+0x48/0x4e0 [ 1915.936523] [] ? process_one_work+0x4d0/0x4d0 [ 1915.936542] [] ? process_one_work+0x4d0/0x4d0 [ 1915.936559] [] kthread+0xd9/0xf0 [ 1915.936580] [] ? kthread_park+0x60/0x60 [ 1915.936600] [] ret_from_fork+0x22/0x30 In the case the register is pinned, it should be present and we will need to invalidate them to be restored upon resume as we cannot expect the owner of the pin to call get_fence prior to use after resume. Fixes: 7c108fd8feac ("drm/i915: Move fence cancellation to runtime suspend") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98804 Reported-by: Lionel Landwerlin Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Imre Deak Cc: Jani Nikula Cc: # v4.10-rc1+ Link: http://patchwork.freedesktop.org/patch/msgid/20170203125717.8431-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_gem.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) commit 418e3cd8005121601facd46dfc452ef9e40894f6 Author: Chris Wilson Date: Mon Feb 6 21:36:08 2017 +0000 drm/i915: Show the current i915_params in debugfs/i915_capabilites Alongside the hw capabilities, it is useful to know which of those have been overridden by the user setting module parameters. v2: Use __always_inline and BUILD_BUG magic Signed-off-by: Chris Wilson Acked-by: Jani Nikula Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170206213608.31328-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 642c8a72533f26b1614d9f11361947f368fb3e57 Author: Chris Wilson Date: Mon Feb 6 21:36:07 2017 +0000 drm/i915: Capture module parameters for the GPU error state They include useful material such as what mode the VM address space is running in, what submission mode, extra quirks, etc. v2: Undef the right macro, use type specific pretty printers v3: Use strcmp(TYPENAME) rather than creating per-type pretty printers v4: Use __always_inline to force GCC to eliminate the calls to strcmp and generate the right call to seq_printf for each parameter. v5: With the strcmp elimination, we can now use BUILD_BUG to ensure there are no unhandled types, also use __builtin_strcmp to make it look even more magic. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Acked-by: Mika Kuoppala Acked-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170206213608.31328-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gpu_error.c | 42 +++++++++++++++++++++++++++++------ 2 files changed, 36 insertions(+), 7 deletions(-) commit 1a2010ca52f951b7a9e0cadb92d4bbcee643194c Author: Chris Wilson Date: Mon Feb 6 21:36:06 2017 +0000 drm/i915: Use bool i915_param.alpha_support The alpha_support module option can only take one of two values, so assign it to a boolean type. The only advantage is in pretty printing via /sys/module/i915/parameters/alpha_support and elsewhere. Signed-off-by: Chris Wilson Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Daniel Vetter Acked-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170206213608.31328-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_params.c | 2 +- drivers/gpu/drm/i915/i915_params.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b8cf691e28fa48f36f3a318385e1edc9a0a291fd Author: Chris Wilson Date: Mon Feb 6 21:36:05 2017 +0000 drm/i915: Generate i915_params {} using a macro I want to print the struct from the error state and so would like to use the existing struct definition as the template ala DEV_INFO* v2: Use MEMBER() rather than p(). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Acked-by: Jani Nikula Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170206213608.31328-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_params.h | 81 ++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 38 deletions(-) commit 2ffe80aa442461eb2fa3cd4c5dda81832e5dd291 Author: Chris Wilson Date: Mon Feb 6 17:05:02 2017 +0000 drm/i915: Avoid unguarded reads from the request pointer In commit 86aa7e760a67 ("drm/i915: Assert that the context-switch completion matches our context") I added a read to the irq tasklet handler that compared the on-chip status with that of our sw tracking, using an unguarded read of the request pointer to get the context and beyond. Whilst we hold a reference to the request, we do not hold anything on the context and if we are unlucky it may be reaped from a second thread retiring the request (since it may retire the request as soon as the breadcrumb is complete, even before we finish processing the context switch) as we try to read from the context pointer. Avoid the racy read from underneath the request by storing the expected result in the execlist_port[]. v2: Include commentary about port[].request being unprotected. Fixes: 86aa7e760a67 ("drm/i915: Assert that the context-switch completion matches our context") Reported-by: Mika Kuoppala Testcase: igt/gem_ctx_create Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170206170502.30944-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 24 +++++++++++++++++++++--- drivers/gpu/drm/i915/intel_ringbuffer.h | 1 + 2 files changed, 22 insertions(+), 3 deletions(-) commit eca56a35111c9e6663fbcd7dc37bcc572367efa3 Author: Chris Wilson Date: Mon Feb 6 17:05:01 2017 +0000 drm/i915: Mark the end of intel_ring_begin() and check in intel_ring_advance() It is required that the caller declare the exact number of dwords they wish to write into the ring. This is required for two reasons, we need to allocate sufficient space for the entire command packet and we need to be sure that the contents are completely written to avoid executing stale data. The current interface requires for any bug to be caught in review, the reader has to carefully count the number of intel_ring_emit() between intel_ring_begin() and intel_ring_advance(). If we record the end of the packet of each intel_ring_begin() we can also have CI check for us. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170206170502.30944-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.h | 9 +++++++++ drivers/gpu/drm/i915/intel_ringbuffer.c | 1 + drivers/gpu/drm/i915/intel_ringbuffer.h | 3 +++ 3 files changed, 13 insertions(+) commit bbba96931762bcad8a691dfbf8d1520b71831c3a Author: Chris Wilson Date: Sat Feb 4 11:19:13 2017 +0000 drm: Micro-optimise drm_mm_for_each_node_in_range() As we require valid start/end parameters, we can replace the initial potential NULL with a pointer to the drm_mm.head_node and so reduce the test on every iteration from a NULL + address comparison to just an address comparison. add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-26 (-26) function old new delta i915_gem_evict_for_node 719 693 -26 (No other users outside of the test harness.) Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170204111913.12416-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_mm.c | 2 +- drivers/gpu/drm/selftests/test-drm_mm.c | 10 ++++++---- include/drm/drm_mm.h | 5 ++++- 3 files changed, 11 insertions(+), 6 deletions(-) commit c5a828148f302c72a137af7f5487a4e52f19f4c9 Author: Wei Yongjun Date: Sun Feb 5 16:05:38 2017 +0000 drm: mxsfb: Make local symbol mxsfb_funcs static Fixes the following sparse warning: drivers/gpu/drm/mxsfb/mxsfb_drv.c:129:38: warning: symbol 'mxsfb_funcs' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170205160538.16594-1-weiyj.lk@gmail.com drivers/gpu/drm/mxsfb/mxsfb_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6cf7e9808a42e74abd80f10e7c8ed4107e0d99f Author: Wei Yongjun Date: Sun Feb 5 16:00:36 2017 +0000 drm: mxsfb: fix error return code in mxsfb_load() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170205160036.7364-1-weiyj.lk@gmail.com drivers/gpu/drm/mxsfb/mxsfb_drv.c | 1 + 1 file changed, 1 insertion(+) commit 04da811b3d821567e7a9a8a0baf48a6c1718b582 Author: Zhi Wang Date: Mon Feb 6 18:37:16 2017 +0800 drm/i915: Let execlist_update_context() cover !FULL_PPGTT mode. execlist_update_context() will try to update PDPs in a context before a ELSP submission only for full PPGTT mode, while PDPs was populated during context initialization. Now the latter code path is removed. Let execlist_update_context() also cover !FULL_PPGTT mode. Fixes: 34869776c76b ("drm/i915: check ppgtt validity when init reg state") Cc: Tvrtko Ursulin Cc: Michal Winiarski Cc: Michel Thierry Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Zhenyu Wang Cc: Zhiyuan Lv Signed-off-by: Zhi Wang Link: http://patchwork.freedesktop.org/patch/msgid/1486377436-15380-1-git-send-email-zhi.a.wang@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_lrc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1a56b1a2db2d0c6422973fd4145d05135d8fb97c Author: Imre Deak Date: Fri Jan 27 11:39:21 2017 +0200 drm/i915/gen5+, pch: Enable hotplug detection early To be consistent with the recent change to enable hotplug detection early on GEN9 platforms do the same on all non-GMCH platforms starting from GEN5. On GMCH platforms enabling detection without interrupts isn't trivial, since AUX and HPD have a shared interrupt line. It could be done there too by using a SW interrupt mask, but I punt on that for now. Cc: Shashank Sharma Cc: Jani Nikula Cc: Ville Syrjälä Cc: Daniel Vetter Signed-off-by: Imre Deak Reviewed-by: Shashank Sharma Link: http://patchwork.freedesktop.org/patch/msgid/1485509961-9010-5-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/i915_irq.c | 73 ++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 26 deletions(-) commit f123959594c000a43b267c75695bd3ffd0748eb1 Author: Imre Deak Date: Fri Jan 27 11:39:20 2017 +0200 drm/i915/lspcon: Remove DPCD compare based resume time workaround This effectively reverts commit 489375c866c111f16cea93b2467ebe59c9022cc7 Author: Imre Deak Date: Mon Oct 24 19:33:31 2016 +0300 drm/i915/lspcon: Add workaround for resuming in PCON mode The workaround was added without considering that HPD is low during the failed AUX transfers the WA fixed. Since the previous patch we wait for HPD to get asserted. My tests also show that this happens _after_ the DPCD reads start to return correct values. This suggests that we don't need this WA any more, let's try to remove it to reduce the clutter. Cc: Shashank Sharma Cc: Jani Nikula Cc: Ville Syrjälä Cc: Daniel Vetter Signed-off-by: Imre Deak Reviewed-by: Shashank Sharma Link: http://patchwork.freedesktop.org/patch/msgid/1485509961-9010-4-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_drv.h | 1 - drivers/gpu/drm/i915/intel_lspcon.c | 17 ++--------------- 2 files changed, 2 insertions(+), 16 deletions(-) commit 390b4e00241ce14ca3967c4698c8f6a158c5a674 Author: Imre Deak Date: Fri Jan 27 11:39:19 2017 +0200 drm/i915/lspcon: Fix resume time initialization due to unasserted HPD During system resume time initialization the HPD level on LSPCON ports can stay low for an extended amount of time, leading to failed AUX transfers and LSPCON initialization. Fix this by waiting for HPD to get asserted. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99178 Cc: Shashank Sharma Cc: Jani Nikula Cc: Ville Syrjälä Cc: Daniel Vetter Cc: # v4.9+ Signed-off-by: Imre Deak Reviewed-by: Shashank Sharma Link: http://patchwork.freedesktop.org/patch/msgid/1485509961-9010-3-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/intel_dp.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 2 ++ drivers/gpu/drm/i915/intel_lspcon.c | 5 ++++- 3 files changed, 8 insertions(+), 3 deletions(-) commit 7fff8126d9cc902b2636d05d5d34894a75174993 Author: Imre Deak Date: Fri Jan 27 11:39:18 2017 +0200 drm/i915/gen9+: Enable hotplug detection early For LSPCON resume time initialization we need to sample the corresponding pin's HPD level, but this is only available when HPD detection is enabled. Currently we enable detection only when enabling HPD interrupts which is too late, so bring the enabling of detection earlier. This is needed by the next patch. Cc: Shashank Sharma Cc: Jani Nikula Cc: Ville Syrjälä Cc: Daniel Vetter Cc: # v4.9+ Signed-off-by: Imre Deak Reviewed-by: Shashank Sharma Link: http://patchwork.freedesktop.org/patch/msgid/1485509961-9010-2-git-send-email-imre.deak@intel.com drivers/gpu/drm/i915/i915_irq.c | 69 +++++++++++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 19 deletions(-) commit a6508ded2a6601fea903185034adc3622d94da0b Author: Chris Wilson Date: Mon Feb 6 08:45:47 2017 +0000 drm/i915: Use page coloring to provide the guard page at the end of the GTT As we now mark the reserved hole (drm_mm.head_node) with the special UNEVICTABLE color, we can use the page coloring to avoid prefetching of the CS beyond the end of the GTT. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170206084547.27921-3-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/i915_gem_evict.c | 10 ++++++++-- drivers/gpu/drm/i915/i915_gem_gtt.c | 19 ++++++++++++------- 2 files changed, 20 insertions(+), 9 deletions(-) commit 47db922fa1c8498c61cbcae4e5faba84713cae70 Author: Chris Wilson Date: Mon Feb 6 08:45:46 2017 +0000 drm/i915: Assign I915_COLOR_UNEVICTABLE to the address space head_node The drm_mm range manager (within i915_address_space) uses a special drm_mm_node that excludes the unavailable range (beyond the end of the drm_mm). However, we play games with the global GTT to use the head_node to exclude the tail page but tell ourselves that the whole range is available. This causes an issue when we try to evict using the full range of the global GTT which is wider than the drm_mm, resulting in complete confusion and catastrophe. One way to resolve this would be to use a reserved node to exclude the guard page, or we can treat the drm_mm's head_node as our guard page and assign it the appropriate colour. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170206084547.27921-2-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++++ 1 file changed, 4 insertions(+) commit b196fbc719871e2746e71ac9e62cde2262555c9b Author: Chris Wilson Date: Mon Feb 6 08:45:45 2017 +0000 drm/i915: Manipulate the Global GTT size using I915_GTT_PAGE_SIZE I incorrectly converted the exclusion of the last 4096 bytes (that avoids any potential prefetching past the end of the GTT) to PAGE_SIZE and not to I915_GTT_PAGE_SIZE as it should be. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170206084547.27921-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 22cc440eae52d805ced3b9c3fcd42713d748140f Author: Chris Wilson Date: Sat Feb 4 11:05:19 2017 +0000 drm/i915: Print execlists restart after reset After resetting, show the requests that each engine restarts from in the debug log. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170204110519.7645-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_lrc.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit ba318c61a9719577b6f451c055f364e4116874b2 Author: Chris Wilson Date: Thu Feb 2 20:47:41 2017 +0000 drm/i915: Drain the freed state from the tail of the next commit If we have any residual freed atomic state from earlier commits, flush the freed list after performing the current modeset. This prevents the freed list from ever-growing if userspace manages to starve the kernel threads (i.e. we are never able to run our free state worker and eventually the system may even oom). Fixes: eb955eee27d9 ("drm/i915: Move atomic state free from out of fence release") Testcase: igt/kms_cursor/legacy/all-pipes-single-bo Reported-by: Maarten Lankhorst Signed-off-by: Chris Wilson Cc: Maarten Lankhorst Cc: Joonas Lahtinen Cc: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170202204741.18231-1-chris@chris-wilson.co.uk Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) commit 28b6def6ec6408e08970a0f1107b483961bfc7ae Author: Daniel Vetter Date: Mon Feb 6 10:23:13 2017 +0100 drm/i915: Update DRIVER_DATE to 20170206 Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ccfceda22cc018ce78c8523c102937c39272e543 Author: Daniele Ceraolo Spurio Date: Fri Feb 3 17:23:29 2017 -0800 drm/i915: refactor register fw read/write macros for recent GENs The only difference for the more recent of those macros is the version of the *_reg__fw_domains function. Passing the function prefix in allows us to re-use the same macro to generate functions for different GENs and will make it easier to add new accessors in the future Cc: Tvrtko Ursulin Signed-off-by: Daniele Ceraolo Spurio Link: http://patchwork.freedesktop.org/patch/msgid/1486171409-21542-1-git-send-email-daniele.ceraolospurio@intel.com Reviewed-by: Tvrtko Ursulin Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_uncore.c | 40 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 30 deletions(-) commit 7c5bc7e87cc43a45fd34987d0f48637ad4881eb0 Author: Manivannan Sadhasivam Date: Mon Jan 23 21:25:16 2017 +0530 iio:temperature:tmp007: Add irq and threshold events support This patch adds ALERT irq and limit threshold events support for TI TMP007 - 16 bit IR thermopile sensor with integrated math engine. Following threshold events are supported: 1. TObj high limit 2. TObj low limit 3. TDie high limit 4. TDie low limit Signed-off-by: Manivannan Sadhasivam Signed-off-by: Jonathan Cameron drivers/iio/temperature/tmp007.c | 277 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 265 insertions(+), 12 deletions(-) commit b3c590ce14b1f30f4535e4f4ab9f3b9a2c968aaf Author: Matt Ranostay Date: Sat Feb 4 02:22:51 2017 -0800 iio: health: add MAX30102 oximeter driver support MAX30102 is an heart rate and pulse oximeter sensor that works using two LEDS of different wavelengths, and detecting the light reflected back. This patchset adds support for both IR and RED LED channels which can be processed in userspace to determine heart rate and blood oxygen levels. The MAX30102 part isn't completely register and functional compatible with the existing MAX30100 driver. Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/health/Kconfig | 13 ++ drivers/iio/health/Makefile | 1 + drivers/iio/health/max30102.c | 485 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 499 insertions(+) commit 5247dd46cf1c2e3300545ea102b866a46aaddbc3 Author: Matt Ranostay Date: Sat Feb 4 02:22:50 2017 -0800 devicetree: add documentation for MAX30102 oximeter Acked-by: Rob Herring Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/health/max30102.txt | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 2eaf14277b02fb400b9a5baee5a7cb079cb6e63d Author: Artur Lorincz Date: Sat Feb 4 20:11:34 2017 +0100 iio: adc: ad7192: fixed symbolic permission references 'S_IRUGO | S_IWUSR' Replaced the symbolic permission references S_IRUGO and S_IWUSR with their octal counterparts. Signed-off-by: Artur Lorincz Signed-off-by: Jonathan Cameron drivers/staging/iio/adc/ad7192.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 640fa30a70972c057651dc01a9b7f30cc70dcbde Author: Michael S. Hansen Date: Sat Feb 4 18:30:41 2017 -0500 iio: addac: adt7136: Fix style to use octal file permissions. Signed-off-by: Michael S. Hansen Signed-off-by: Jonathan Cameron drivers/staging/iio/addac/adt7316.c | 108 ++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 54 deletions(-) commit c62360753e469a4cc5f4629c4ccb090985b33d6e Author: Eva Rachel Retuya Date: Tue Jan 31 15:12:56 2017 +0800 iio: accel: Add driver for the Analog Devices ADXL345 3-axis accelerometer Add basic IIO support for the Analog Devices ADXL345 3-axis accelerometer. The datasheet can be found here: http://www.analog.com/media/en/technical-documentation/data-sheets/ADXL345.pdf Signed-off-by: Eva Rachel Retuya Cc: Michael Hennerich Cc: Daniel Baluta Cc: Alison Schofield Signed-off-by: Jonathan Cameron drivers/iio/accel/Kconfig | 11 +++ drivers/iio/accel/Makefile | 1 + drivers/iio/accel/adxl345.c | 194 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 206 insertions(+) commit 48458b0c196c6d6224aac5e1178a561e89011724 Author: Gwendal Grignou Date: Mon Jan 30 18:07:53 2017 +0100 iio: cros_ec_light_prox: add ChromeOS EC Light and Proximity Sensors Handle Light and Proximity sensors presented by the ChromeOS EC Sensor hub. Creates an IIO device for each functions. Signed-off-by: Gwendal Grignou Signed-off-by: Guenter Roeck Signed-off-by: Enric Balletbo i Serra Signed-off-by: Jonathan Cameron drivers/iio/light/Kconfig | 10 ++ drivers/iio/light/Makefile | 1 + drivers/iio/light/cros_ec_light_prox.c | 289 +++++++++++++++++++++++++++++++++ 3 files changed, 300 insertions(+) commit 1bf707675fb84ad02dae751a14110c17a2736a81 Author: Lorenzo Bianconi Date: Sun Jan 29 11:49:28 2017 +0100 Documentation: dt: iio: imu: st_lsm6dsx: add lsm6ds3h sensor device binding Signed-off-by: Lorenzo Bianconi Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt | 1 + 1 file changed, 1 insertion(+) commit df47710a6e4a44bbc5f0c40e7d4058147bfc12ed Author: Lorenzo Bianconi Date: Sun Jan 29 11:49:27 2017 +0100 iio: imu: st_lsm6dsx: add support to lsm6ds3h Add support to STM LSM6DS3H 6-axis (acc + gyro) Mems sensor http://www.st.com/resource/en/datasheet/lsm6ds3h.pdf Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/Kconfig | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 ++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 9 +++++---- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 9 ++++++++- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 5 +++++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 5 +++++ 6 files changed, 26 insertions(+), 6 deletions(-) commit 3e9b1222ef06d336d771ae7279a147ee965071bd Author: Lorenzo Bianconi Date: Sun Jan 29 11:49:26 2017 +0100 Documentation: dt: iio: imu: st_lsm6dsx: add lsm6dsl sensor device binding Signed-off-by: Lorenzo Bianconi Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt | 1 + 1 file changed, 1 insertion(+) commit 0b2a3e5f17d6ba3f00aee1000718a84afb3d4d1f Author: Lorenzo Bianconi Date: Sun Jan 29 11:49:25 2017 +0100 iio: imu: st_lsm6dsx: add support to lsm6dsl Add support to STM LSM6DSL 6-axis (acc + gyro) Mems sensor http://www.st.com/resource/en/datasheet/lsm6dsl.pdf Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/Kconfig | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 ++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 4 ++-- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 5 +++-- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 5 +++++ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 5 +++++ 6 files changed, 18 insertions(+), 5 deletions(-) commit d068e4a0f9213074c5d893b8b80ca7bca444ed1d Author: Lorenzo Bianconi Date: Sun Jan 29 11:49:24 2017 +0100 iio: imu: st_lsm6dsx: add support to multiple devices with the same settings Add capability to support multiple devices with the same st_lsm6dsx_settings like LSM6DSM/LSM6DSL Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 3 ++- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 30 +++++++++++++++------------- 2 files changed, 18 insertions(+), 15 deletions(-) commit feda2840040fcf87d826b0aec945a98222e656ba Author: Andreas Klinger Date: Tue Jan 31 19:03:45 2017 +0100 iio: distance: add devantech us ranger srf04 This patch adds support for the ultrasonic ranger srf04 of devantech. This device is measuring the distance of objects in a range between 1 cm and 3 meters and a theoretical resolution of 3 mm. There are two GPIOs used: - trigger: set as output to the device when the measurement should start - echo: set by the device when the ultrasonic wave is sent out and reset when the echo is recognized; this needs to be an interrupt input The time between setting and resetting the echo pin is the time the waveform needed for one round trip. This time is recorded in the interrupt handler. The distance is calculated in the read function by using the ultrasonic speed at 20 degrees celsius which is about 343 m/s. Signed-off-by: Andreas Klinger Signed-off-by: Jonathan Cameron MAINTAINERS | 6 + drivers/iio/proximity/Kconfig | 11 ++ drivers/iio/proximity/Makefile | 1 + drivers/iio/proximity/srf04.c | 304 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 322 insertions(+) commit 2fb5904d92d42c88432cb29f567654d28f9d6411 Author: Andreas Klinger Date: Tue Jan 31 19:03:06 2017 +0100 iio: distance: add dt binding for devantech-srf04 This patch adds dt binding for devantech ultrasonic ranger srf04. The vendor "devantech" was already added to the vendor list with "[PATCH v4 1/3] iio: distance: srf08: add trivial DT binding" Signed-off-by: Andreas Klinger Acked-by: Rob Herring Signed-off-by: Jonathan Cameron .../bindings/iio/proximity/devantech-srf04.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 6144f61af6e304044918a3d7a9a2ada2a5c874a7 Author: Derek Robson Date: Sat Feb 4 14:45:41 2017 +1300 Staging: iio: resolver: ad2s1210.c - style fix Changed symbolic permissions to octal permissions. Found using checkpatch Signed-off-by: Derek Robson Signed-off-by: Jonathan Cameron drivers/staging/iio/resolver/ad2s1210.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 7c8e818f6e264f978f0f0d6c45daf209870e60fc Author: Matt Ranostay Date: Sat Feb 4 02:33:32 2017 -0800 mailmap: Change email to new Konsulko email Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron .mailmap | 1 + 1 file changed, 1 insertion(+) commit 4a04e371228937d104fd03d5219f8c25fda29757 Author: Daniele Ceraolo Spurio Date: Fri Feb 3 14:45:29 2017 -0800 drm/i915: fix pm refcounting on fence error in execbuf Fences are creted/checked before the pm ref is taken, so if we jump to pre_mutex_err we will uncorrectly call intel_runtime_pm_put. v2: Massage unwind error paths Fixes: fec0445caa27 (drm/i915: Support explicit fencing for execbuf) Testcase: igt/gem_exec_params Cc: Chris Wilson Signed-off-by: Daniele Ceraolo Spurio Link: http://patchwork.freedesktop.org/patch/msgid/1486161930-11764-1-git-send-email-daniele.ceraolospurio@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem_execbuffer.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 612fb5d9f41622ad86c94f897faa2343817abb1a Author: Andrey Grodzovsky Date: Thu Feb 2 16:56:30 2017 -0500 drm/nouveau/kms/nv50: Switch to using atomic helper for flip. v2: Update code after flip_flags moved from plane_state to crtc_state v5: Rename to pageflip_flags. Reviewed-by: Alex Deucher Signed-off-by: Andrey Grodzovsky Signed-off-by: Alex Deucher Link: http://patchwork.freedesktop.org/patch/msgid/1486072591-3893-3-git-send-email-Andrey.Grodzovsky@amd.com drivers/gpu/drm/nouveau/nv50_display.c | 84 ++++------------------------------ 1 file changed, 10 insertions(+), 74 deletions(-) commit 6cbe5c466d73360506a24d98a2e71e47ae02e3ef Author: Andrey Grodzovsky Date: Thu Feb 2 16:56:29 2017 -0500 drm/atomic: Save flip flags in drm_crtc_state Allows using atomic flip helpers for drivers using ASYNC flip. Remove ASYNC_FLIP restriction in helpers and caches the page flip flags in drm_crtc_state to be used in the low level drivers. v2: Resending the patch since the original was broken. v3: Save flag in crtc_state instead of plane_state v4: Reset the flag before using again. v5: Fix type in header. Rename the field to pageflip_flags. Remove unrelated hunk. Reviewed-by: Alex Deucher Signed-off-by: Andrey Grodzovsky Signed-off-by: Alex Deucher Link: http://patchwork.freedesktop.org/patch/msgid/1486072591-3893-2-git-send-email-Andrey.Grodzovsky@amd.com drivers/gpu/drm/drm_atomic_helper.c | 20 ++++++-------------- include/drm/drm_crtc.h | 9 ++++++++- 2 files changed, 14 insertions(+), 15 deletions(-) commit 955b8e9ca8b924f8c21d43797f8bf8f39908efd3 Author: Chris Wilson Date: Fri Feb 3 11:46:00 2017 +0000 drm/i915: Allow large objects to be tiled on gen2/3 We now have partial VMA support to break large objects into fence sized regions and no longer have to restrict tiling to small objects on gen2/3 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170203115036.24743-2-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_tiling.c | 8 -------- 1 file changed, 8 deletions(-) commit a3a1e5336c41ab3763c64152df5f868cb91d20bf Author: Chris Wilson Date: Fri Feb 3 11:50:35 2017 +0000 drm/i915: Tidy the tail of i915_tiling_ok() The current tail breaks the pattern of if (check) return false, which can catch the reader out. If we move the gen2/3 power-of-two test into the earlier gen2/3 branch, we can eliminate the contrary tail. Suggested-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170203115036.24743-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_tiling.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 52da22e7aba155be238faff4f6e97b2eb9de64f3 Author: Chris Wilson Date: Fri Feb 3 10:56:52 2017 +0000 drm/i915: Reject set-tiling-ioctl with stride==0 and a tiling mode In commit 957870f93412 ("drm/i915: Split out i915_gem_object_set_tiling()"), I swapped an alignment check for IS_ALIGNED and in the process removed the less-than check. That check turns out to be important as it was the only rejection for stride == 0. Tvrtko did spot it, but I was overconfident in the IS_ALIGNED() conversion. Fixes: 957870f93412 ("drm/i915: Split out i915_gem_object_set_tiling()") Testcase: igt/gem_tiling_max_stride Signed-off-by: Chris Wilson Cc: Chris Wilson Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170203105652.27819-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_tiling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0aab2c721d81590012a5021a516f00666646741f Author: Lee, Shawn C Date: Fri Feb 3 12:32:09 2017 +0800 drm/i915/bxt: Add MST support when do DPLL calculation Add the missing INTEL_OUTPUT_DP_MST case in bxt_get_dpll() to correctly initialize the crtc_state and port plls when link training a DP MST monitor on BXT/APL devices. Fixes: a277ca7dc01d ("drm/i915: Split bxt_ddi_pll_select()") Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=99572 Reviewed-by: Cooper Chiou Reviewed-by: Gary C Wang Reviewed-by: Ciobanu, Nathan D Reviewed-by: Herbert, Marc Reviewed-by: Bride, Jim Reviewed-by: Navare, Manasi D Cc: Jani Nikula Cc: # v4.9+ Signed-off-by: Lee, Shawn C Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1486096329-6255-1-git-send-email-shawn.c.lee@intel.com drivers/gpu/drm/i915/intel_dpll_mgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e32e836afe39691848270f1ac2a9d0e09ad173fd Author: Matthew Auld Date: Thu Feb 2 14:55:00 2017 +0000 drm/i915: remove 512GB allocation warning Now that we have selftests in place exercising truly huge allocations we will start to hit the 512GB warning, so now seems like a good time to remove this user-triggerable WARN. Cc: Joonas Lahtinen Cc: Chris Wilson Signed-off-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1486047300-13198-1-git-send-email-matthew.auld@intel.com Reviewed-by: Joonas Lahtinen Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ---- 1 file changed, 4 deletions(-) commit bb96dcf5830e5d81a1da2e2a14e6c0f7dfc64348 Author: Chris Wilson Date: Thu Feb 2 13:27:21 2017 +0000 drm/i915: Recreate internal objects with single page segments if dmar fails If we fail to dma-map the object, the most common cause is lack of space inside the SW-IOTLB due to fragmentation. If we recreate the_sg_table using segments of PAGE_SIZE (and single page allocations), we may succeed in remapping the scatterlist. First became a significant problem for the mock selftests after commit 5584f1b1d73e ("drm/i915: fix i915 running as dom0 under Xen") increased the max_order. Fixes: 920cf4194954 ("drm/i915: Introduce an internal allocator for disposable private objects") Fixes: 5584f1b1d73e ("drm/i915: fix i915 running as dom0 under Xen") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170202132721.12711-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin Cc: # v4.10-rc1+ drivers/gpu/drm/i915/i915_gem_internal.c | 37 ++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 14 deletions(-) commit 3aac4acb89710fe782c9e78e7b1febf76e112c6c Author: Jani Nikula Date: Wed Feb 1 15:46:09 2017 +0200 drm/i915: don't warn about Skylake CPU - KabyPoint PCH combo Apparently there are machines out there with Skylake CPU and KabyPoint PCH. Judging from our driver code, there doesn't seem to be any code paths that would do anything different between SunrisePoint and KabyPoint PCHs, so it would seem okay to accept the combo without warnings. Fixes: 22dea0be50b2 ("drm/i915: Introduce Kabypoint PCH for Kabylake H/DT.") References: https://lists.freedesktop.org/archives/intel-gfx/2017-February/118611.html Reported-by: Rainer Koenig Cc: Rainer Koenig Cc: Rodrigo Vivi Cc: # v4.8+ Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1485956769-26015-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 170b03c4a88298e71f3a76ab79f6895f6949f3a1 Author: Chris Wilson Date: Wed Jan 25 10:11:02 2017 +0000 drm/i915: Build DRM range manager selftests for CI Build the struct drm_mm selftests so that we can trivially run them within our CI. "Enable debug, become developer." - Joonas Lahtinen Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170125101102.9010-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) commit 5584f1b1d73e9cc95092734c316e467c6c4468f9 Author: Juergen Gross Date: Thu Feb 2 10:47:11 2017 +0100 drm/i915: fix i915 running as dom0 under Xen Commit 920cf4194954ec ("drm/i915: Introduce an internal allocator for disposable private objects") introduced a regression for the kernel running as Xen dom0: when switching to graphics mode a GPU HANG occurred. Reason seems to be a missing adaption similar to that done in commit 7453c549f5f648 ("swiotlb: Export swiotlb_max_segment to users") to i915_gem_object_get_pages_internal(). So limit the maximum page order to be used according to the maximum swiotlb segment size instead to the complete swiotlb size. Fixes: 920cf4194954 ("drm/i915: Introduce an internal allocator for disposable private objects") Signed-off-by: Juergen Gross Link: http://patchwork.freedesktop.org/patch/msgid/20170202094711.939-1-jgross@suse.com Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: # v4.10-rc1+ Reviewed-by: Tvrtko Ursulin Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem_internal.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 37255d8d3f4d0c88fc9f60f50bb4c3c30e6688cc Author: Maarten Lankhorst Date: Thu Dec 15 15:29:43 2016 +0100 drm/i915: Fix POWER_DOMAIN_AUDIO refcounting. If the crtc was brought up with audio before the driver loads, then crtc_disable will remove a refcount to audio that doesn't exist before. Fortunately we already set power domains on readout, so we can just add the power domain handling to get_crtc_power_domains, which will update the power domains correctly in all cases. This was found when testing module reload on CI with the crtc enabled, which resulted in the following warn after module reload + modeset: [ 24.197041] ------------[ cut here ]------------ [ 24.197075] WARNING: CPU: 0 PID: 99 at drivers/gpu/drm/i915/intel_runtime_pm.c:1790 intel_display_power_put+0x134/0x140 [i915] [ 24.197076] Use count on domain AUDIO is already zero [ 24.197098] CPU: 0 PID: 99 Comm: kworker/u8:2 Not tainted 4.9.0-CI-Trybot_393+ #1 [ 24.197099] Hardware name: /NUC6i5SYB, BIOS SYSKLi35.86A.0042.2016.0409.1246 04/09/2016 [ 24.197102] Workqueue: events_unbound async_run_entry_fn [ 24.197105] ffffc900003c7688 ffffffff81435b35 ffffc900003c76d8 0000000000000000 [ 24.197107] ffffc900003c76c8 ffffffff8107e4d6 000006fe5dc36f28 ffff88025dc30054 [ 24.197109] ffff88025dc36f28 ffff88025dc30000 ffff88025dc30000 0000000000000015 [ 24.197110] Call Trace: [ 24.197113] [] dump_stack+0x67/0x92 [ 24.197116] [] __warn+0xc6/0xe0 [ 24.197118] [] warn_slowpath_fmt+0x4a/0x50 [ 24.197149] [] intel_display_power_put+0x134/0x140 [i915] [ 24.197187] [] intel_disable_ddi+0x4d/0x80 [i915] [ 24.197223] [] intel_encoders_disable.isra.74+0x7f/0x90 [i915] [ 24.197257] [] haswell_crtc_disable+0x55/0x170 [i915] [ 24.197292] [] intel_atomic_commit_tail+0x108/0xfd0 [i915] [ 24.197295] [] ? __lock_is_held+0x66/0x90 [ 24.197330] [] intel_atomic_commit+0x429/0x560 [i915] [ 24.197332] [] ?drm_atomic_add_affected_connectors+0x56/0xf0 [ 24.197334] [] drm_atomic_commit+0x46/0x50 [ 24.197336] [] restore_fbdev_mode+0x147/0x270 [ 24.197337] [] drm_fb_helper_restore_fbdev_mode_unlocked+0x2e/0x70 [ 24.197339] [] drm_fb_helper_set_par+0x28/0x50 [ 24.197374] [] intel_fbdev_set_par+0x13/0x70 [i915] [ 24.197376] [] fbcon_init+0x57a/0x600 [ 24.197379] [] visual_init+0xd1/0x130 [ 24.197381] [] do_bind_con_driver+0x1bc/0x3a0 [ 24.197384] [] do_take_over_console+0x111/0x180 [ 24.197386] [] do_fbcon_takeover+0x52/0xb0 [ 24.197387] [] fbcon_event_notify+0x723/0x850 [ 24.197390] [] ?__blocking_notifier_call_chain+0x30/0x70 [ 24.197392] [] notifier_call_chain+0x34/0xa0 [ 24.197394] [] __blocking_notifier_call_chain+0x48/0x70 [ 24.197397] [] blocking_notifier_call_chain+0x11/0x20 [ 24.197398] [] fb_notifier_call_chain+0x16/0x20 [ 24.197400] [] register_framebuffer+0x24c/0x330 [ 24.197402] [] drm_fb_helper_initial_config+0x219/0x3c0 [ 24.197436] [] intel_fbdev_initial_config+0x13/0x30 [i915] [ 24.197438] [] async_run_entry_fn+0x34/0x140 [ 24.197440] [] process_one_work+0x1ec/0x6b0 [ 24.197442] [] ? process_one_work+0x166/0x6b0 [ 24.197445] [] worker_thread+0x49/0x490 [ 24.197447] [] ? process_one_work+0x6b0/0x6b0 [ 24.197448] [] kthread+0xeb/0x110 [ 24.197451] [] ? kthread_park+0x60/0x60 [ 24.197453] [] ret_from_fork+0x27/0x40 [ 24.197476] ---[ end trace bda64b683b8e8162 ]--- Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1481812185-19098-3-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_ddi.c | 14 ++------------ drivers/gpu/drm/i915/intel_display.c | 4 ++++ drivers/gpu/drm/i915/intel_dp_mst.c | 9 ++------- 3 files changed, 8 insertions(+), 19 deletions(-) commit a667fb402c1e856209bf9e77ba41fc1cf356b867 Author: Maarten Lankhorst Date: Thu Dec 15 15:29:44 2016 +0100 drm/i915: Disable all crtcs during driver unload, v2. We may keep the crtc's enabled when userspace unsets all framebuffers but keeps the crtc active. This exposes a WARN in fbc_global disable, and a lot of bugs in our hardware readout code. Solve this by disabling all crtc's for now. Changes since v1: - Use lock_all_ctx instead of lock_all. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1481812185-19098-4-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 453cfe21711f644e744e834d5c61042b2fac218d Author: Chris Wilson Date: Wed Feb 1 13:12:22 2017 +0000 drm/i915/execlists: Add interrupt-pending check to intel_execlists_idle() Primarily this serves as a sanity check that the bit has been cleared before we suspend (and hasn't reappeared after resume). Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170201131222.11882-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_lrc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit e2de845e0b84ebb7e910bb898febbf813b7df483 Author: Chris Wilson Date: Wed Feb 1 12:53:38 2017 +0000 drm/i915/execlists: Skip resetting RING_CONTEXT_STATUS_PTR As we now flag when the GPU signals a context-switch and do not read the status register before we see that signal, we do not have to ensure that it is cleared upon reset (and can leave it to the GPU to reset it from the power context). Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170201125338.12932-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_lrc.c | 2 -- 1 file changed, 2 deletions(-) commit 1881a4234ef03751daf55b62b17e6bb0dbf7792a Author: Uma Shankar Date: Wed Jan 25 19:43:23 2017 +0530 drm/i915: Add MIPI_IO WA and program DSI regulators Enable MIPI IO WA for BXT DSI as per bspec and program the DSI regulators. v2: Moved IO enable to pre-enable as per Mika's review comments. Also reused the existing register definition for BXT_P_CR_GT_DISP_PWRON. v3: Added Programming the DSI regulators as per disable/enable sequences. v4: Restricting regulator changes to BXT as suggested by Jani/Mika v5: Removed redundant read/modify for regulator register as per Jani's comment. Maintain enable/disable symmetry as per spec. Signed-off-by: Uma Shankar Signed-off-by: Vidya Srinivas Acked-by: Mika Kahola Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1485353603-11260-1-git-send-email-vidya.srinivas@intel.com drivers/gpu/drm/i915/i915_reg.h | 7 +++++++ drivers/gpu/drm/i915/intel_dsi.c | 24 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+) commit 69aeafeae9b30d797c439a30d1a4ccc8dc5b0eb0 Author: Chris Wilson Date: Mon Jan 9 11:19:32 2017 +0000 drm/i915: Flush untouched framebuffers before display on !llc On a non-llc system, the objects are created with .cache_level = CACHE_NONE and so the transition to uncached for scanout is a no-op. However, if the object was never written to, it will still be in the CPU domain (having been zeroed out by shmemfs). Those cachelines need to be flushed prior to display. Reported-and-tested-by: Vito Caputo Fixes: a6a7cc4b7db6 ("drm/i915: Always flush the dirty CPU cache when pinning the scanout") Signed-off-by: Chris Wilson Cc: # v4.10-rc1+ Link: http://patchwork.freedesktop.org/patch/msgid/20170109111932.6342-1-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e22af0be2cf654bb225f19750c6b9aab1627dc9e Author: Borislav Petkov Date: Tue Jan 31 18:53:34 2017 +0100 x86/boot: Fix pr_debug() API braindamage What looked like a straightforward conversion from printk(KERN_DEBUG, ...) to pr_debug() broke the boot log output: DMI: /M57SLI-S4, BIOS FF 01/24/2008 -e820: update [mem 0x00000000-0x00000fff] usable ==> reserved -e820: remove [mem 0x000a0000-0x000fffff] usable +usable ==> reserved +usable e820: last_pfn = 0x230000 max_arch_pfn = 0x400000000 ... x86/PAT: Configuration [0-7]: WB WC UC- UC WB WC UC- WT -e820: update [mem 0xd0000000-0xffffffff] usable ==> reserved +usable ==> reserved i.e. spurious (and nonsensical) kernel log entries were created... We need a pr_debug_and_I_mean_it() function which does nothing but printk(KERN_DEBUG... Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org [ Wrote changelog. ] Signed-off-by: Ingo Molnar arch/x86/kernel/e820.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7fd5cf0b25181effd952e0c3d279395e35e0e9b7 Author: Ingo Molnar Date: Mon Jan 30 10:01:20 2017 +0100 xen, x86/headers: Add dependency to The following patch (not upstream yet): "x86/boot/e820: Remove spurious asm/e820/api.h inclusions" Removed the (spurious) include line from to reduce header file dependencies - but a Xen header has (unintentionally) learned to rely on the indirect inclusion of . This resulted in the following (harmless) build warning: arch/x86/include/asm/xen/page.h:302:7: warning: 'struct device' declared inside parameter list Include explicitly. No change in functionality. Reported-by: kbuild test robot Acked-by: Juergen Gross Cc: Konrad Rzeszutek Wilk Cc: Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/xen/page.h | 1 + 1 file changed, 1 insertion(+) commit e2b06d71bd3f50ac7098b3f2492ea95470b713db Merge: 1692cd6 18566ac Author: Daniel Vetter Date: Wed Feb 1 10:58:11 2017 +0100 Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued Chris Wilson wants the new fence tracepoint added in commit 8c96c678011eeb1676da18f203e90dea7e0d69d2 Author: Chris Wilson Date: Tue Jan 24 11:57:58 2017 +0000 dma/fence: Export enable-signaling tracepoint for emission by drivers Signed-off-by: Daniel Vetter commit 1692cd60d999b00a0491692dab0286e6011abd36 Author: Chris Wilson Date: Mon Jan 30 13:47:21 2017 +0000 drm/i915: Sanity check the computed size and base of stolen memory Just do a quick check that the stolen memory address range doesn't overflow our chosen integer type. v2: Add add_overflows() to utils with the promise that gcc7 can do this better than C and then maybe it will have a proper definition in core. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170130134721.5159-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- drivers/gpu/drm/i915/i915_utils.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) commit c88473878d47131ccfc67a00ba688d4d7d0f4519 Author: Chris Wilson Date: Fri Jan 27 16:55:30 2017 +0000 drm/i915: Treat stolen memory as DMA addresses The conversion of stolen to use phys_addr_t (from essentially u32) sparked an interesting discussion. We treat stolen memory as only accessible from the GPU (the DMA device) - an attempt to use it from the CPU will generate a MCE on gen6 onwards, although it is in theory a physical address that can be dereferenced from the CPU as demonstrated by earlier generations. As such, using phys_addr_t has the wrong connotations and as we pass the address into the DMA device via dma_addr_t (through the scatterlists used to program the GTT entries), we should treat it as dma_addr_t throughout. Signed-off-by: Chris Wilson Cc: Paulo Zanoni Cc: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170127165531.28135-1-chris@chris-wilson.co.uk Reviewed-by: Paulo Zanoni drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem_stolen.c | 36 +++++++++++++++++----------------- 2 files changed, 19 insertions(+), 19 deletions(-) commit 4703b0472e126c715019a9671ea0fe38556114bb Author: Chris Wilson Date: Tue Jan 31 10:46:30 2017 +0000 drm/i915: Be defensive when cleaning up i915_gem_internal pages If we abort the i915_gem_internal get_pages, we mark the failing sg as the last. However, that means we iterate upto and including the failing sg element and results in us trying to free the unallocated sg_page(). Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170131104630.3074-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/i915_gem_internal.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 9b51b105f2a52a873107d7b28f0aca94e52ad7bd Author: Weinan Li Date: Thu Jan 26 13:23:48 2017 +0800 drm/i915: clean up unused vgpu_read/write Having converted the force_wake_get/_put routines for a vGPU to be no-op, we can use the common mmio accessors and remove our specialised routines that simply skipped the calls to control force_wake. Signed-off-by: Weinan Li Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1485408228-12932-1-git-send-email-weinan.z.li@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_uncore.c | 58 ------------------------------------- 1 file changed, 58 deletions(-) commit 517f188c6be5bcc71f92c049d91a26539482a6f8 Author: Weinan Li Date: Thu Jan 26 13:20:13 2017 +0800 drm/i915: noop forcewake get/put when vgpu activated For a virtualized GPU, the host maintains the forcewake state on the real device. As we don't control forcewake ourselves, we can simply set force_wake_get() and force_wake_put() to be no-ops. By setting the vfuncs, we adjust both the manual control of forcewake and around the mmio accessors (making our vgpu specific mmio routines redundant and to be removed in the next patch). Signed-off-by: Weinan Li Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1485408013-12780-1-git-send-email-weinan.z.li@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_uncore.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 4fa6053efdc7a30720fffddb9df353b0273ce17f Author: Chris Wilson Date: Sun Jan 29 09:24:33 2017 +0000 drm/i915: Record more information about the hanging contexts Include extra information such as the user_handle and hw_id so that userspace can identify which of their contexts hung, useful if they are performing self-diagnositics. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170129092433.10483-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_drv.h | 14 +++++-- drivers/gpu/drm/i915/i915_gpu_error.c | 77 ++++++++++++++++++++++------------- 2 files changed, 59 insertions(+), 32 deletions(-) commit 0102ba1fd8af8c2719436eaadc743f940ab525c2 Author: Chris Wilson Date: Mon Jan 30 10:44:58 2017 +0000 drm/i915: Add early BXT sdv to the list of preproduction machines Extend intel_detect_preproduction_hw() to include BXT A and B steppings. Signed-off-by: Chris Wilson Cc: "Zanoni, Paulo R" Cc: Rodrigo Vivi Cc: Jani Nikula Cc: Ville Syrjälä Cc: Matt Roper Link: http://patchwork.freedesktop.org/patch/msgid/20170130104458.2653-3-chris@chris-wilson.co.uk Acked-by: Jani Nikula Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 1 + 1 file changed, 1 insertion(+) commit 7c5ff4a2c588c89d00ab0e0dd61f44942233d63d Author: Chris Wilson Date: Mon Jan 30 10:44:57 2017 +0000 drm/i915: Mark the kernel as tainted if we fail the preproduction check Preproduction sdv are not supported beyond the release of production hardware, and continued use is ill-advised. Mark the kernel as tainted to reinforce the error. Signed-off-by: Chris Wilson Cc: "Zanoni, Paulo R" Cc: Rodrigo Vivi Cc: Jani Nikula Cc: Ville Syrjälä Cc: Matt Roper Acked-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170130104458.2653-2-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 248a124d6fc0fde44b8fafc695ca4a2c24eb0856 Author: Chris Wilson Date: Mon Jan 30 10:44:56 2017 +0000 drm/i915: Make intel_detect_preproduction_hw easier to extend As we add new generations, we should keep detecting new pre-production system development platforms that were temporarily enabled to facilitate initial development and now superseded by production systems. To make it easier to add more platforms, split the if into a series of logical operations. v2: s/sdv/pre/ - not all system development vehicles are for preproduction usage. Signed-off-by: Chris Wilson Cc: "Zanoni, Paulo R" Cc: Rodrigo Vivi Cc: Jani Nikula Cc: Ville Syrjälä Cc: Matt Roper Link: http://patchwork.freedesktop.org/patch/msgid/20170130104458.2653-1-chris@chris-wilson.co.uk Acked-by: Jani Nikula Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ce64645d86ac5550559f3dca07fd9ba42166e196 Author: Jani Nikula Date: Fri Jan 27 17:57:06 2017 +0200 drm/i915: use variadic macros and arrays to choose port/pipe based registers This allows the use of more than 3 ports/pipes/whatever without tricks, even if the register offsets are not evenly spaced. There's the risk of out of bounds access if we're not careful; currently that would "just" lead to the wrong register offset being used. It might be possible to add build bug ons for build time constant indexing. We already have ports defined up to E, not sure if we might have bugs related to them and the current _PORT3() macro. text data bss dec hex filename 1239868 46199 4096 1290163 13afb3 drivers/gpu/drm/i915/i915.ko 1238828 46199 4096 1289123 13aba3 drivers/gpu/drm/i915/i915.ko Cc: Chris Wilson Cc: Ville Syrjälä Cc: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Ville Syrjälä Acked-by: Daniel Vetter Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1485532626-20923-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/i915_reg.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 2355cf088d469f65d180618c24400ded38895b92 Author: Mika Kuoppala Date: Fri Jan 27 15:03:09 2017 +0200 drm/i915: Create context desc template when context is created Move the invariant parts of context desc setup from execlist init to context creation. This is advantageous when we need to create different templates based on the context parametrization, ie. for svm capable contexts. v2: s/create/default, remove engine->ctx_desc_template Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1485522189-31984-1-git-send-email-mika.kuoppala@intel.com drivers/gpu/drm/i915/i915_gem_context.c | 23 ++++++++++++++++++++-- drivers/gpu/drm/i915/i915_reg.h | 15 ++++++++++++++ drivers/gpu/drm/i915/intel_lrc.c | 35 ++------------------------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 1 - 4 files changed, 38 insertions(+), 36 deletions(-) commit 441ac2f33dd7860295cf1d225358ec01d38408b2 Author: Ingo Molnar Date: Mon Jan 30 09:24:39 2017 +0100 x86/boot/e820: Simplify e820__update_table() - Remove the now unnecessary __e820__update_table() wrappery - Move statics out from function scope, to make the logic clearer - Rename local variables to be more in line with the rest of 820.c - Remove unnecessary local variables: old_nr, *nr_entries No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/e820.c | 70 ++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 39 deletions(-) commit 9751bafc43d599262d9de7e6d988804dc5f5d4aa Author: Ander Conselvan de Oliveira Date: Fri Jan 27 11:02:30 2017 +0200 drm/i915/glk: Program pipe gamma and degamma tables The gamma tables in Geminilake were changed. There is no split-gamma mode. Instead, there is a dedicated degamma table that is enabled whenever pipe CSC is enabled. The dedicated gamma table has 16 bit precision but doesn't support separate channels. Since that doesn't match the per-channel format of the degamma LUT property, for now only a linear table is loaded and the property ignored. v2: Remove empty line. (Ville) Reuse broadwell code. (Ville) v3: Don't write PIPE_CSC_MODE. (Ville) Cc: Ville Syrjälä Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170127090230.20302-1-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 14 +++++++++ drivers/gpu/drm/i915/intel_color.c | 58 +++++++++++++++++++++++++++++++++++++- 3 files changed, 72 insertions(+), 1 deletion(-) commit 2fcb206654e8b3826424ffa7ef65bd74cc65ff16 Author: Ander Conselvan de Oliveira Date: Thu Jan 26 13:24:23 2017 +0200 drm/i915: Split broadwell_load_luts() into smaller functions Split the logic for progamming each LUT out of broadwell_load_luts(), so we can reuse part of it for geminilake. Cc: Ville Syrjälä Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1485429865-10687-4-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_color.c | 43 ++++++++++++++++++++++++++++---------- 2 files changed, 33 insertions(+), 11 deletions(-) commit 47f9ea8b9143890c9b98ad9e16e8ad793be2d9e3 Author: Ander Conselvan de Oliveira Date: Thu Jan 26 13:24:22 2017 +0200 drm/i915/glk: Plane color correction register changes In Geminilake, the bits for enabling pipe csc, pipe gamma and plane gamma moved to a new register. So update the plane update functions to set the right bits. Pipe CSC is kept disabled though, since enabling that also enables the dedicated degamma table, and that is not properly programmed yet, leading to a black screen. v2: Use plane_id. (Ville) Remove unnecessary variable. (Ville) Keep registers in offset order. (Ville) Don't set plane gamma disable twice. (Ander) Cc: Ville Syrjälä Signed-off-by: Ander Conselvan De Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1485429865-10687-3-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_reg.h | 19 ++++++++++++++++++- drivers/gpu/drm/i915/intel_display.c | 16 ++++++++++++---- drivers/gpu/drm/i915/intel_sprite.c | 17 ++++++++++++----- 3 files changed, 42 insertions(+), 10 deletions(-) commit bafbcc2fd148610e897ba49a4681f088a0eb58f9 Author: Ander Conselvan de Oliveira Date: Thu Jan 26 13:24:21 2017 +0200 drm/i915: Disable plane gamma in SKL+ sprite planes The plane gamma tables are never programmed, so just disable it, like it is done for the primary plane. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1485429865-10687-2-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_sprite.c | 1 + 1 file changed, 1 insertion(+) commit 9fb5026f857dc3145cf13eedabadb28ed028d093 Author: Ander Conselvan de Oliveira Date: Thu Jan 26 11:16:58 2017 +0200 drm/i915/glk: Turn on workarounds that apply to Geminilake too Apply workarounds to Geminilake, and annotate those that are applied unconditionally when they apply to GLK based on the workaround database. v2: Fix commit message typos. (David) v3: Rebase. Cc: David Weinehall Cc: Rodrigo Vivi Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: David Weinehall Link: http://patchwork.freedesktop.org/patch/msgid/1485422218-9102-1-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++-- drivers/gpu/drm/i915/intel_lrc.c | 6 +++--- drivers/gpu/drm/i915/intel_mocs.c | 2 +- drivers/gpu/drm/i915/intel_pm.c | 23 ++++++++++++++++---- drivers/gpu/drm/i915/intel_ringbuffer.c | 37 +++++++++++++++++++++++++-------- 5 files changed, 53 insertions(+), 19 deletions(-) commit 7410aa1ca377aa8c5ed340647b5228e7b5d0494a Author: Ingo Molnar Date: Sun Jan 29 12:56:13 2017 +0100 x86/boot/e820: Separate the E820 ABI structures from the in-kernel structures Linus pointed out that relying on the compiler to pack structures with enums is fragile not just for the kernel, but for external tooling as well which might rely on our UAPI headers. So separate the two from each other: introduce 'struct boot_e820_entry', which is the boot protocol entry format. This actually simplifies the code, as e820__update_table() is now never called directly with boot protocol table entries - we can rely on append_e820_table() and do a e820__update_table() call afterwards. ( This will allow further simplifications of __e820__update_table(), but that will be done in a separate patch. ) This change also has the side effect of not modifying the bootparams structure anymore - which might be useful for debugging. In theory we could even constify the boot_params structure - at least from the E820 code's point of view. Remove the uapi/asm/e820/types.h file, as it's not used anymore - all kernel side E820 types are defined in asm/e820/types.h. Reported-by: Linus Torvalds Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/boot/compressed/eboot.c | 16 +++++----- arch/x86/boot/compressed/kaslr.c | 2 +- arch/x86/boot/memory.c | 4 +-- arch/x86/include/asm/e820/types.h | 48 ++++++++++++++++++++++++++++- arch/x86/include/uapi/asm/bootparam.h | 18 +++++++++-- arch/x86/include/uapi/asm/e820/types.h | 55 ---------------------------------- arch/x86/kernel/e820.c | 20 ++++++------- 7 files changed, 83 insertions(+), 80 deletions(-) commit c5231a57eb406c70a96f8e515abc49daa0af697b Author: Ingo Molnar Date: Sun Jan 29 09:40:26 2017 +0100 x86/boot/e820: Fix and clean up e820_type switch() statements A test-build of e820.o with -Wswitch-enum shows the following warnings: arch/x86/kernel/e820.c: In function ‘e820_type_to_string’: arch/x86/kernel/e820.c:965:2: warning: enumeration value ‘E820_TYPE_RESERVED’ not handled in switch [-Wswitch-enum] switch (entry->type) { ^ arch/x86/kernel/e820.c: In function ‘e820_type_to_iomem_type’: arch/x86/kernel/e820.c:979:2: warning: enumeration value ‘E820_TYPE_RESERVED’ not handled in switch [-Wswitch-enum] switch (entry->type) { ^ arch/x86/kernel/e820.c: In function ‘e820_type_to_iores_desc’: arch/x86/kernel/e820.c:993:2: warning: enumeration value ‘E820_TYPE_RESERVED’ not handled in switch [-Wswitch-enum] switch (entry->type) { ^ arch/x86/kernel/e820.c: In function ‘do_mark_busy’: arch/x86/kernel/e820.c:1015:2: warning: enumeration value ‘E820_TYPE_RAM’ not handled in switch [-Wswitch-enum] switch (type) { ^ Here's the four warnings: - The one in e820_type_to_string() is a borderline bug, we should differentiate known-reserved E820 types from unknown types. Fix it by printing a separate message for unknown E820 types. - The ones in e820_type_to_iomem_type(), e820_type_to_iores_desc() and do_mark_busy() are worth documenting, at least to the extent of enumerating them explicitly. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/e820.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 0c6fc11ac343c82d4a2f8348fa6f829e07c12554 Author: Ingo Molnar Date: Sat Jan 28 22:52:16 2017 +0100 x86/boot/e820: Rename the remaining E820 APIs to the e820__*() prefix Three more renames left: e820_end_of_ram_pfn() => e820__end_of_ram_pfn() e820_end_of_low_ram_pfn() => e820__end_of_low_ram_pfn() e820_reallocate_tables() => e820__reallocate_tables() After this all E820 API calls are prefixed with "e820__", making it much easier to grep for E820 functionality in the kernel. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 6 +++--- arch/x86/kernel/e820.c | 8 ++++---- arch/x86/kernel/setup.c | 6 +++--- arch/x86/mm/init.c | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) commit dd618c7256121c753f3c7451e159f2ae53b73d3c Author: Ingo Molnar Date: Sat Jan 28 22:49:39 2017 +0100 x86/boot/e820: Remove unnecessary #include's A number of headers were included into e820.c unnecessarily - remove them. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/e820.c | 7 ------- 1 file changed, 7 deletions(-) commit 090d717164eec7d7bf7c0db396a123e1f9157dbf Author: Ingo Molnar Date: Sat Jan 28 22:44:12 2017 +0100 x86/boot/e820: Rename e820_mark_nosave_regions() to e820__register_nosave_regions() This function is a minor misnomer: it is talking about 'marking' regions as nosave - while the hibernation API is called register_nosave_region() and the e820_mark_nosave_regions() is a wrapper around that functionality. So name it to be in line with the API it is derived from. ( Rename e820_mark_nvs_memory() to e820__register_nvs_regions(), for similar reasons. ) No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 2 +- arch/x86/kernel/e820.c | 10 +++++----- arch/x86/kernel/setup.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit 1506c8dc947251bfd02f8186b5e81657a9635112 Author: Ingo Molnar Date: Sat Jan 28 22:41:14 2017 +0100 x86/boot/e820: Rename e820_reserve_resources*() to e820__reserve_resources*() Also do some minor cleanups. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 4 ++-- arch/x86/kernel/apic/apic.c | 2 +- arch/x86/kernel/e820.c | 16 +++++++++------- arch/x86/kernel/setup.c | 2 +- arch/x86/pci/i386.c | 2 +- 5 files changed, 14 insertions(+), 12 deletions(-) commit 81b3e090fa1f237d49c8feb2fa4afe2aabd3a4ff Author: Ingo Molnar Date: Sat Jan 28 22:34:55 2017 +0100 x86/boot/e820: Use bool in query APIs Change e820__mapped_any() and e820__mapped_all()'s return type and e820__range_remove()'s check_type parameter to bool. Propagate it into arch/x86/pci/mmconfig-shared.c as this change affects a function signature there too. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 6 +++--- arch/x86/kernel/e820.c | 10 +++++----- arch/x86/pci/mmconfig-shared.c | 14 +++++++------- 3 files changed, 15 insertions(+), 15 deletions(-) commit 1a1270349a0710162a160eef4f2e360845e0f47d Author: Ingo Molnar Date: Sat Jan 28 22:27:28 2017 +0100 x86/boot/e820: Document e820__reserve_setup_data() Also clean it up a bit. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 4 ++-- arch/x86/kernel/e820.c | 11 +++++++++-- arch/x86/kernel/setup.c | 3 +-- 3 files changed, 12 insertions(+), 6 deletions(-) commit 9a02fd0f1efbace5939bc34c4080a175e8112e8c Author: Ingo Molnar Date: Sat Jan 28 18:35:24 2017 +0100 x86/boot/e820: Clean up __e820__update_table() et al The __e820__update_table() function has various weirdly named variables, such as 'pbios', 'biosmap' and 'pnr_map' which are pretty confusing and actively misleading at times. This weird naming found its way into other functions as well, such as __append_e820_table() and append_e820_table(). Standardize the naming to make it all much easier to read: biosmap -> entries pbios -> entry nr_map -> nr_entries pnr_map -> nr_entries ... Also clean up the types used: entry indices routinely mixed u32 and int, standardize on u32 thoughout. Update the comments as well, while at it. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/e820.c | 120 +++++++++++++++++++++++++------------------------ 1 file changed, 61 insertions(+), 59 deletions(-) commit f9748fa045851041ba69a1d2899971746f29c9d5 Author: Ingo Molnar Date: Sat Jan 28 18:00:35 2017 +0100 x86/boot/e820: Simplify the e820__update_table() interface The e820__update_table() parameters are pretty complex: arch/x86/include/asm/e820/api.h:extern int e820__update_table(struct e820_entry *biosmap, int max_nr_map, u32 *pnr_map); But 90% of the usage is trivial: arch/x86/kernel/e820.c: if (e820__update_table(e820_table->entries, ARRAY_SIZE(e820_table->entries), &e820_table->nr_entries)) arch/x86/kernel/e820.c: e820__update_table(e820_table->entries, ARRAY_SIZE(e820_table->entries), &e820_table->nr_entries); arch/x86/kernel/e820.c: e820__update_table(e820_table->entries, ARRAY_SIZE(e820_table->entries), &e820_table->nr_entries); arch/x86/kernel/e820.c: if (e820__update_table(e820_table->entries, ARRAY_SIZE(e820_table->entries), &e820_table->nr_entries) < 0) arch/x86/kernel/e820.c: e820__update_table(boot_params.e820_table, ARRAY_SIZE(boot_params.e820_table), &new_nr); arch/x86/kernel/early-quirks.c: e820__update_table(e820_table->entries, ARRAY_SIZE(e820_table->entries), &e820_table->nr_entries); arch/x86/kernel/setup.c: e820__update_table(e820_table->entries, ARRAY_SIZE(e820_table->entries), &e820_table->nr_entries); arch/x86/kernel/setup.c: e820__update_table(e820_table->entries, ARRAY_SIZE(e820_table->entries), &e820_table->nr_entries); arch/x86/platform/efi/efi.c: e820__update_table(e820_table->entries, ARRAY_SIZE(e820_table->entries), &e820_table->nr_entries); arch/x86/xen/setup.c: e820__update_table(xen_e820_table.entries, ARRAY_SIZE(xen_e820_table.entries), arch/x86/xen/setup.c: e820__update_table(e820_table->entries, ARRAY_SIZE(e820_table->entries), &e820_table->nr_entries); arch/x86/xen/setup.c: e820__update_table(xen_e820_table.entries, ARRAY_SIZE(xen_e820_table.entries), as it only uses an exiting struct e820_table's entries array, its size and its current number of entries as input and output arguments. Only one use is non-trivial: arch/x86/kernel/e820.c: e820__update_table(boot_params.e820_table, ARRAY_SIZE(boot_params.e820_table), &new_nr); ... which call updates the E820 table in the zeropage in-situ, and the layout there does not match that of 'struct e820_table' (in particular nr_entries is at a different offset, hardcoded by the boot protocol). Simplify all this by introducing a low level __e820__update_table() API that the zeropage update call can use, and simplifying the main e820__update_table() call signature down to: int e820__update_table(struct e820_table *table); This visibly simplifies all the call sites: arch/x86/include/asm/e820/api.h:extern int e820__update_table(struct e820_table *table); arch/x86/include/asm/e820/types.h: * call to e820__update_table() to remove duplicates. The allowance arch/x86/kernel/e820.c: * The return value from e820__update_table() is zero if it arch/x86/kernel/e820.c:int __init e820__update_table(struct e820_table *table) arch/x86/kernel/e820.c: if (e820__update_table(e820_table)) arch/x86/kernel/e820.c: e820__update_table(e820_table_firmware); arch/x86/kernel/e820.c: e820__update_table(e820_table); arch/x86/kernel/e820.c: e820__update_table(e820_table); arch/x86/kernel/e820.c: if (e820__update_table(e820_table) < 0) arch/x86/kernel/early-quirks.c: e820__update_table(e820_table); arch/x86/kernel/setup.c: e820__update_table(e820_table); arch/x86/kernel/setup.c: e820__update_table(e820_table); arch/x86/platform/efi/efi.c: e820__update_table(e820_table); arch/x86/xen/setup.c: e820__update_table(&xen_e820_table); arch/x86/xen/setup.c: e820__update_table(e820_table); arch/x86/xen/setup.c: e820__update_table(&xen_e820_table); No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 2 +- arch/x86/kernel/e820.c | 19 ++++++++++++------- arch/x86/kernel/early-quirks.c | 2 +- arch/x86/kernel/setup.c | 4 ++-- arch/x86/platform/efi/efi.c | 2 +- arch/x86/xen/setup.c | 9 ++++----- 6 files changed, 21 insertions(+), 17 deletions(-) commit e7dbf7ad4172ef79bcfdb432f9463eda892951ca Author: Ingo Molnar Date: Sat Jan 28 18:19:01 2017 +0100 xen, x86/boot/e820: Simplify Xen's xen_e820_table construct The Xen guest memory setup code has: static struct e820_entry xen_e820_table[E820_MAX_ENTRIES] __initdata; static u32 xen_e820_table_entries __initdata; ... which is really a 'struct e820_table', open-coded. Convert the Xen code over to use a single struct e820_table, as this will allow the simplification of the e820__update_table() API. No intended change in functionality, but not runtime tested. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/xen/setup.c | 70 +++++++++++++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 37 deletions(-) commit d88961b5d4366c33d35d9ad309791ed9e4424f6c Author: Ingo Molnar Date: Sat Jan 28 17:48:08 2017 +0100 x86/boot/e820: Clean up and standardize sizeof() uses There's various sizeof() uses in e820.c - standardize on the shortest and least error prone one, along the pattern of: - memset(entry, 0, sizeof(struct e820_entry)); + memset(entry, 0, sizeof(*entry)); ... because with this pattern in most cases it's immediately clear that we have used the right type - and the pattern is robust against changing the type as well. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/e820.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 08b46d5dd869ea631d7c1c15535c930c8ea462e0 Author: Ingo Molnar Date: Sat Jan 28 17:29:08 2017 +0100 x86/boot/e820: Clean up the E820 table size define names We've got a number of defines related to the E820 table and its size: E820MAP E820NR E820_X_MAX E820MAX The first two denote byte offsets into the zeropage (struct boot_params), and can are not used in the kernel and can be removed. The E820_*_MAX values have an inconsistent structure and it's unclear in any case what they mean. 'X' presuably goes for extended - but it's not very expressive altogether. Change these over to: E820_MAX_ENTRIES_ZEROPAGE E820_MAX_ENTRIES ... which are self-explanatory names. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/types.h | 18 ++++++------------ arch/x86/include/uapi/asm/bootparam.h | 2 +- arch/x86/include/uapi/asm/e820/types.h | 7 +++++-- arch/x86/kernel/crash.c | 2 +- arch/x86/kernel/e820.c | 8 ++++---- arch/x86/kernel/kexec-bzimage64.c | 6 +++--- arch/x86/mm/init.c | 6 +++--- arch/x86/mm/kasan_init_64.c | 4 ++-- arch/x86/xen/setup.c | 2 +- include/xen/page.h | 2 +- 10 files changed, 27 insertions(+), 30 deletions(-) commit 09821ff1d50a1ecade182c2a68a90f835e257eef Author: Ingo Molnar Date: Sat Jan 28 17:09:33 2017 +0100 x86/boot/e820: Prefix the E820_* type names with "E820_TYPE_" So there's a number of constants that start with "E820" but which are not types - these create a confusing mixture when seen together with 'enum e820_type' values: E820MAP E820NR E820_X_MAX E820MAX To better differentiate the 'enum e820_type' values prefix them with E820_TYPE_. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/boot/compressed/eboot.c | 12 ++-- arch/x86/boot/compressed/kaslr.c | 2 +- arch/x86/include/asm/gart.h | 2 +- arch/x86/include/uapi/asm/e820/types.h | 16 ++--- arch/x86/kernel/acpi/boot.c | 2 +- arch/x86/kernel/aperture_64.c | 4 +- arch/x86/kernel/cpu/mtrr/cleanup.c | 2 +- arch/x86/kernel/crash.c | 10 ++-- arch/x86/kernel/e820.c | 104 ++++++++++++++++----------------- arch/x86/kernel/early-quirks.c | 2 +- arch/x86/kernel/kexec-bzimage64.c | 2 +- arch/x86/kernel/setup.c | 20 +++---- arch/x86/kernel/tboot.c | 8 +-- arch/x86/mm/init.c | 2 +- arch/x86/mm/init_64.c | 12 ++-- arch/x86/pci/mmconfig-shared.c | 2 +- arch/x86/platform/efi/efi.c | 14 ++--- arch/x86/platform/efi/quirks.c | 6 +- arch/x86/xen/setup.c | 22 +++---- tools/lguest/lguest.c | 2 +- 20 files changed, 123 insertions(+), 123 deletions(-) commit 6afc03b86470f602d118825d09addfeeaef535f0 Author: Ingo Molnar Date: Sat Jan 28 16:52:34 2017 +0100 x86/boot/e820: Use 'enum e820_type' when handling the e820 region type The E820 region type is put into four different types (!) when used in function parameters or local variables: unsigned type; int type; unsigned long current_type; u32 type; Use 'enum e820_type' in all these cases instead. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 10 +++++----- arch/x86/kernel/e820.c | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 16 deletions(-) commit 09c5151339caea3a5752e577c66521f6e7443fe5 Author: Ingo Molnar Date: Sat Jan 28 17:01:06 2017 +0100 x86/boot/e820: Use 'enum e820_type' in 'struct e820_entry' Use a stricter type for struct e820_entry. Add a build-time check to make sure the compiler won't ever pack the enum into a field smaller than 'int'. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/types.h | 31 ---------------------------- arch/x86/include/uapi/asm/e820/types.h | 37 +++++++++++++++++++++++++++++++--- arch/x86/kernel/e820.c | 3 +++ 3 files changed, 37 insertions(+), 34 deletions(-) commit 7ad1ed8abc50eb44dd628bda23313599503aee87 Author: Ingo Molnar Date: Sat Jan 28 16:42:39 2017 +0100 x86/boot/e820: Introduce 'enum e820_type' Use an enum instead of CPP #define. Also fix various small annoyances in the descriptions of the various E820 types. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/types.h | 57 +++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 26 deletions(-) commit c594761d1d956bd71f121501bfb68dfd422c53cc Author: Ingo Molnar Date: Sat Jan 28 14:33:48 2017 +0100 x86/boot/e820: Simplify e820_reserve_resources() Remove unnecessary duplications of "e820_table->entries[i]." via a local variable, plus pass in 'entry' to the type_to_*() functions which further improves the readability of the code - and other small tweaks. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/e820.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit 2504be78be28b3ad11a52f7dc0dab2de5e7eaee3 Author: Ingo Molnar Date: Sat Jan 28 14:28:09 2017 +0100 x86/boot/e820: Reorder the function prototypes in api.h Reorder the function prototypes in api.h a bit, to group related functions together. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit be0c3f0fcade7ad67f484fa5dc00310813de6d7d Author: Ingo Molnar Date: Sat Jan 28 14:24:02 2017 +0100 x86/boot/e820: Rename e820_print_map() to e820__print_table() All other table-level methods are already named 'table' in some way, to change this one over to the (now consistent) nomenclature. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 2 +- arch/x86/kernel/e820.c | 12 ++++++------ arch/x86/kernel/setup.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) commit ab6bc04cfdbd5da00a85909c054770a606e7c804 Author: Ingo Molnar Date: Sat Jan 28 14:19:36 2017 +0100 x86/boot/e820: Create coherent API function names for E820 range operations We have these three related functions: extern void e820_add_region(u64 start, u64 size, int type); extern u64 e820_update_range(u64 start, u64 size, unsigned old_type, unsigned new_type); extern u64 e820_remove_range(u64 start, u64 size, unsigned old_type, int checktype); But it's not clear from the naming that they are 3 operations based around the same 'memory range' concept. Rename them to better signal this, and move the prototypes next to each other: extern void e820__range_add (u64 start, u64 size, int type); extern u64 e820__range_update(u64 start, u64 size, unsigned old_type, unsigned new_type); extern u64 e820__range_remove(u64 start, u64 size, unsigned old_type, int checktype); Note that this improved organization of the functions shows another problem that was easy to miss before: sometimes the E820 entry type is 'int', sometimes 'unsigned int' - but this will be fixed in a separate patch. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 8 ++++--- arch/x86/kernel/acpi/boot.c | 2 +- arch/x86/kernel/aperture_64.c | 2 +- arch/x86/kernel/cpu/mtrr/cleanup.c | 2 +- arch/x86/kernel/e820.c | 48 +++++++++++++++++++------------------- arch/x86/kernel/early-quirks.c | 2 +- arch/x86/kernel/setup.c | 10 ++++---- arch/x86/lguest/boot.c | 2 +- arch/x86/platform/efi/efi.c | 2 +- arch/x86/xen/setup.c | 6 ++--- drivers/acpi/tables.c | 2 +- 11 files changed, 44 insertions(+), 42 deletions(-) commit 2df908baf52ccf8eaabe5576d1ecb2f972b1135f Author: Ingo Molnar Date: Sat Jan 28 14:16:38 2017 +0100 x86/boot/e820: Rename e820_setup_gap() to e820__setup_pci_gap() The e820_setup_gap() function name is unnecessarily silent about what kind of gap it sets up. Make it clear that it's about the PCI gap. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 2 +- arch/x86/kernel/e820.c | 2 +- arch/x86/kernel/setup.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 3bce64f019a801f526cc38523c77ffda4e846155 Author: Ingo Molnar Date: Sat Jan 28 14:14:25 2017 +0100 x86/boot/e820: Rename e820_any_mapped()/e820_all_mapped() to e820__mapped_any()/e820__mapped_all() The 'any' and 'all' are modified to the 'mapped' concept, so move them last in the name. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 4 ++-- arch/x86/include/asm/gart.h | 2 +- arch/x86/kernel/aperture_64.c | 2 +- arch/x86/kernel/e820.c | 6 +++--- arch/x86/kernel/setup.c | 2 +- arch/x86/kernel/tboot.c | 2 +- arch/x86/mm/init_64.c | 12 ++++++------ arch/x86/pci/mmconfig-shared.c | 4 ++-- arch/x86/platform/efi/quirks.c | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) commit f52355a99fc06f609ca6a61098d78e476d56f526 Author: Ingo Molnar Date: Sat Jan 28 14:09:20 2017 +0100 x86/boot/e820: Rename sanitize_e820_table() to e820__update_table() sanitize_e820_table() is a minor misnomer in that it suggests that the E820 table requires sanitizing - which implies that it will only do anything if the E820 table is irregular (not sane). That is wrong, because sanitize_e820_table() also does a very regular sorting of the E820 table, which is a necessity in the basic append-only flow of E820 updates the kernel is allowed to perform to it. So rename it to e820__update_table() to include that purpose as well. This also lines up all the table-update functions into a coherent naming family: int e820__update_table(struct e820_entry *biosmap, int max_nr_map, u32 *pnr_map); void e820__update_table_print(void); void e820__update_table_firmware(void); No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 2 +- arch/x86/include/asm/e820/types.h | 2 +- arch/x86/kernel/e820.c | 16 ++++++++-------- arch/x86/kernel/early-quirks.c | 2 +- arch/x86/kernel/setup.c | 4 ++-- arch/x86/platform/efi/efi.c | 2 +- arch/x86/xen/setup.c | 6 +++--- 7 files changed, 17 insertions(+), 17 deletions(-) commit 6464d294d251551223a2c359d8b74c6965b5740a Author: Ingo Molnar Date: Sat Jan 28 14:03:04 2017 +0100 x86/boot/e820: Rename update_e820() to e820__update_table() update_e820() should have 'e820' as a prefix as most of the other E820 functions have - but it's also a bit unclear about its purpose, as it's unclear what is updated - the whole table, or an entry? Also, the name does not express that it's a trivial wrapper around sanitize_e820_table() that also prints out the resulting table. So rename it to e820__update_table_print(). This also makes it harmonize with the e820__update_table_firmware() function which has a very similar purpose. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 2 +- arch/x86/kernel/acpi/boot.c | 2 +- arch/x86/kernel/aperture_64.c | 2 +- arch/x86/kernel/cpu/mtrr/cleanup.c | 2 +- arch/x86/kernel/e820.c | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) commit 5da217ca967b9d7a0bbbd8edd06749c99a4fe501 Author: Ingo Molnar Date: Sat Jan 28 13:46:28 2017 +0100 x86/boot/e820: Rename early_reserve_e820() to e820__memblock_alloc() and document it early_reserve_e820() is an early hack for kexec that does a limited fixup of the mptable and passes it to the kexec kernel as if it was the real thing. For this it needs to allocate memory - but no memory allocator is available yet beyond the memblock allocator, so early_reserve_e820() is really a wrapper around memblock_alloc() plus a hack to update the e820_table_firmware entries. The name 'reserve' is really a bit of a misnomer, as 'reserved' memory typically means memory completely inaccessible to the kernel - while here what we want to do is a special RAM allocation for our own purposes and insert that as RAM_RESERVED. Rename the function to e820__memblock_alloc_reserved() to better signal this dual purpose, plus document it better, which was omitted when it was merged. The barely comprehensible and cryptic comment: /* * pre allocated 4k and reserved it in memblock and e820_table_firmware */ u64 __init e820__memblock_alloc_reserved(u64 size, u64 align) ... does not count as documentation, replace it with: /* * Allocate the requested number of bytes with the requsted alignment * and return (the physical address) to the caller. Also register this * range in the 'firmware' E820 table. * * This allows kexec to fake a new mptable, as if it came from the real * system. */ u64 __init e820__memblock_alloc_reserved(u64 size, u64 align) No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 2 +- arch/x86/include/asm/mpspec.h | 4 ++-- arch/x86/kernel/e820.c | 11 ++++++++--- arch/x86/kernel/mpparse.c | 4 ++-- arch/x86/kernel/setup.c | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) commit 9641bdafd8571e2d86817935e4e7ffa6fa2c56b6 Author: Ingo Molnar Date: Sat Jan 28 13:37:17 2017 +0100 x86/boot/e820: Clarify the role of finish_e820_parsing() and rename it to e820__finish_early_params() finish_e820_parsing() is closely related to parse_early_params(), but the name does not tell us this clearly, so rename it to e820__finish_early_params(). Also add a few comments to explain what the function does. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 2 +- arch/x86/kernel/e820.c | 7 ++++++- arch/x86/kernel/setup.c | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) commit da92139bff5fb334981d56225d3d80e73125b51f Author: Ingo Molnar Date: Sat Jan 28 13:25:45 2017 +0100 x86/boot/e820: Move e820_reserve_setup_data() to e820.c The e820_reserve_setup_data() is local to arch/x86/kernel/setup.c, but it is E820 functionality - so move it to e820.c to better isolate E820 functionality. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 1 + arch/x86/kernel/e820.c | 22 ++++++++++++++++++++++ arch/x86/kernel/setup.c | 23 ----------------------- 3 files changed, 23 insertions(+), 23 deletions(-) commit 914053c08e95b2577d5834d51d5962c922ad0a72 Author: Ingo Molnar Date: Sat Jan 28 13:18:40 2017 +0100 x86/boot/e820: Rename parse_e820_ext() to e820__memory_setup_extended() parse_e820_ext() is very similar to e820__memory_setup_default(), both are taking bootloader provided data, add it to the E820 table and then pass it sanitize_e820_table(). Rename it to e820__memory_setup_extended() to better signal their similar role. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 2 +- arch/x86/kernel/e820.c | 2 +- arch/x86/kernel/setup.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 4270fd8b4c27f08b9cfd7e2fc342d1a31217ba6b Author: Ingo Molnar Date: Sat Jan 28 12:45:40 2017 +0100 x86/boot/e820: Move the memblock_find_dma_reserve() function and rename it to memblock_set_dma_reserve() We introduced memblock_find_dma_reserve() in this commit: 6f2a75369e75 x86, memblock: Use memblock_memory_size()/memblock_free_memory_size() to get correct dma_reserve But there's several problems with it: - The changelog is full of typos and is incomprehensible in general, and the comments in the code are not much better either. - The function was inexplicably placed into e820.c, while it has very little connection to the E820 table: when we call memblock_find_dma_reserve() then memblock is already set up and we are not using the E820 table anymore. - The function is a wrapper around set_dma_reserve(), but changed the 'set' name to 'find' - actively misleading about its primary purpose, which is still to set the DMA-reserve value. - The function is limited to 64-bit systems, but neither the changelog nor the comments explain why. The change would appear to be relevant to 32-bit systems as well, as the ISA DMA zone is the first 16 MB of RAM. So address some of these problems: - Move it into arch/x86/mm/init.c, next to the other zone setup related functions. - Clean up the code flow and names of local variables a bit. - Rename it to memblock_set_dma_reserve() - Improve the comments. No change in functionality. Enabling it for 32-bit systems is left for a separate patch. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 1 - arch/x86/include/asm/pgtable.h | 1 + arch/x86/kernel/e820.c | 31 --------------------------- arch/x86/mm/init.c | 47 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 32 deletions(-) commit 01259ef1e0901310aa4a87754ff07a1b2fe6a433 Author: Ingo Molnar Date: Sat Jan 28 12:27:45 2017 +0100 x86/boot/e820: Convert printk(KERN_* ...) to pr_*() No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/e820.c | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) commit e5540f8754042b376f117ea9ff5410c42936c7c2 Author: Ingo Molnar Date: Sat Jan 28 12:16:17 2017 +0100 x86/boot/e820: Consolidate 'struct e820_entry *entry' local variable names So the E820 code has a lot of cases of: struct e820_entry *ei; ... but the 'ei' name makes very little sense if you think about it, it's not an abbreviation of anything obviously related to E820 table entries. This results in weird looking lines such as: if (type && ei->type != type) where you might have to double check what 'ei' really means, plus weird looking secondary variable names, such as: u64 ei_end; The 'ei' name was introduced in a single function over a decade ago, and then mindlessly cargo-copied over into other functions - with usage growing to over 60 uses altogether (!). ( My best guess is that it might have been originally meant as abbreviation of 'entry interval'. ) Anyway, rename these to the much more obvious: struct e820_entry *entry; No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/e820.c | 110 ++++++++++++++++++++++++------------------------- 1 file changed, 55 insertions(+), 55 deletions(-) commit 4918e2286d0c023ee29c1f6d4e6d45e1aa420408 Author: Ingo Molnar Date: Sat Jan 28 11:37:42 2017 +0100 x86/boot/e820: Rename memblock_x86_fill() to e820__memblock_setup() and improve the explanations So memblock_x86_fill() is another E820 code misnomer: - nothing in its name tells us that it's part of the E820 subsystem ... - The 'fill' wording is ambiguous and doesn't tell us whether it's a single entry or some process - while the _real_ purpose of the function is hidden, which is to do a complete setup of the (platform independent) memblock regions. So rename it accordingly, to e820__memblock_setup(). Also translate this incomprehensible and misleading comment: /* * EFI may have more than 128 entries * We are safe to enable resizing, beause memblock_x86_fill() * is rather later for x86 */ memblock_allow_resize(); The worst aspect of this comment isn't even the sloppy typos, but that it casually mentions a '128' number with no explanation, which makes one lead to the assumption that this is related to the well-known limit of a maximum of 128 E820 entries passed via legacy bootloaders. But no, the _real_ meaning of 128 here is that of the memblock subsystem, which too happens to have a 128 entries limit for very early memblock regions (which is unrelated to E820), via INIT_MEMBLOCK_REGIONS ... So change the comment to a more comprehensible version: /* * The bootstrap memblock region count maximum is 128 entries * (INIT_MEMBLOCK_REGIONS), but EFI might pass us more E820 entries * than that - so allow memblock resizing. * * This is safe, because this call happens pretty late during x86 setup, * so we know about reserved memory regions already. (This is important * so that memblock resizing does no stomp over reserved areas.) */ memblock_allow_resize(); No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 2 +- arch/x86/kernel/e820.c | 14 +++++++++----- arch/x86/kernel/setup.c | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) commit 640e1b38b00550990cecd809021cd37716e45922 Author: Ingo Molnar Date: Sat Jan 28 11:13:08 2017 +0100 x86/boot/e820: Basic cleanup of e820.c Over the last decade or so e820.c has become an ureadable mess of tinkerware. Perform some very basic cleanups before doing more intricate cleanups, so that my eyes don't start bleeding when I look at it. Here's some of the excesses: - Total disregard of countless aspects of Documentation/CodingStyle. - Totally inconsistent hodge-podge of various coding styles and practices. - Gems like: (unsigned long long) e820_table->entries[i].addr ... which is a completely unnecessary type conversion of an u64 value. - Incomprehensible comments while there are major functions with absolutely no explanation - plus an armada of typos and grammar mistakes. - Mindless checkpatch artifacts such as: if (append_e820_table(boot_params.e820_table, boot_params.e820_entries) < 0) { for_each_free_mem_range(u, NUMA_NO_NODE, MEMBLOCK_NONE, &start, &end, NULL) { - Actively misleading comments: /* In case someone cares... */ return who; ( The usage site of the return value just a few lines further down makes it clear that we very much care about the return value, we use it to print out the e820 map... ) - Colorfully inconsistent capitalization and punctuation throughout. - etc. This patch fixes only the worst excesses - there's more to fix. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/e820.c | 447 +++++++++++++++++++++++-------------------------- 1 file changed, 207 insertions(+), 240 deletions(-) commit 544a0f47e7803443980496d6c9ae78b6c2b3dbcb Author: Ingo Molnar Date: Sat Jan 28 10:07:49 2017 +0100 x86/boot/e820: Rename e820_table_saved to e820_table_firmware and improve the description So the 'e820_table_saved' is a bit of a misnomer that hides its real purpose. At first sight the name suggests that it's some sort save/restore mechanism, as this is how we typically name such facilities in the kernel. But that is not so, e820_table_saved is the original firmware version of the e820 table, not modified by the kernel. This table is displayed in the /sys/firmware/memmap file, and it's also used by the hibernation code to calculate a physical memory layout MD5 fingerprint checksum which is invariant of the kernel. So rename it to 'e820_table_firmware' and update all the comments to better describe the main e820 data strutures. Also rename: 'initial_e820_table_saved' => 'e820_table_firmware_init' 'e820_update_range_saved' => 'e820_update_range_firmware' ... to better match the new nomenclature. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 3 +- arch/x86/kernel/e820.c | 78 ++++++++++++++++++++++++--------------- arch/x86/kernel/kexec-bzimage64.c | 4 +- arch/x86/kernel/setup.c | 4 +- arch/x86/power/hibernate_64.c | 4 +- 5 files changed, 56 insertions(+), 37 deletions(-) commit 103e206309639b615981e56008720806b4a102af Author: Ingo Molnar Date: Sat Jan 28 09:58:49 2017 +0100 x86/boot/e820: Rename default_machine_specific_memory_setup() to e820__memory_setup_default() The default_machine_specific_memory_setup() is a mouthful and despite the many words it doesn't actually tell us clearly what it does. The function is the x86 legacy memory layout setup code, based on E820-formatted memory layout information passed by the bootloader via the boot_params. Rename it to e820__memory_setup_default() to better signal its purpose. Also rename the related higher level function to be consistent with this new naming: setup_memory_map() => e820__memory_setup() No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 4 ++-- arch/x86/kernel/e820.c | 9 +++++++-- arch/x86/kernel/setup.c | 2 +- arch/x86/kernel/x86_init.c | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) commit bf495573fae84451a8a26215fafb5b62e387ddaf Author: Ingo Molnar Date: Fri Jan 27 14:06:21 2017 +0100 x86/boot/e820: Harmonize the 'struct e820_table' fields So the e820_table->map and e820_table->nr_map names are a bit confusing, because it's not clear what a 'map' really means (it could be a bitmap, or some other data structure), nor is it clear what nr_map means (is it a current index, or some other count). Rename the fields from: e820_table->map => e820_table->entries e820_table->nr_map => e820_table->nr_entries which makes it abundantly clear that these are entries of the table, and that the size of the table is ->nr_entries. Propagate the changes to all affected files. Where necessary, adjust local variable names to better reflect the new field names. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/types.h | 4 +- arch/x86/kernel/e820.c | 114 +++++++++++++++++++------------------- arch/x86/kernel/early-quirks.c | 2 +- arch/x86/kernel/kexec-bzimage64.c | 5 +- arch/x86/kernel/resource.c | 4 +- arch/x86/kernel/setup.c | 6 +- arch/x86/kernel/tboot.c | 8 +-- arch/x86/platform/efi/efi.c | 2 +- arch/x86/power/hibernate_64.c | 11 ++-- arch/x86/xen/setup.c | 2 +- 10 files changed, 77 insertions(+), 81 deletions(-) commit 61a50101638254d38e3f4281265b44de0f2cba4e Author: Ingo Molnar Date: Fri Jan 27 13:54:38 2017 +0100 x86/boot/e820: Rename everything to e820_table No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar Documentation/x86/zero-page.txt | 4 +- arch/x86/boot/compressed/eboot.c | 22 ++--- arch/x86/boot/compressed/kaslr.c | 2 +- arch/x86/boot/memory.c | 4 +- arch/x86/include/asm/e820/api.h | 6 +- arch/x86/include/asm/e820/types.h | 4 +- arch/x86/include/uapi/asm/bootparam.h | 2 +- arch/x86/kernel/crash.c | 2 +- arch/x86/kernel/e820.c | 152 +++++++++++++++++----------------- arch/x86/kernel/early-quirks.c | 2 +- arch/x86/kernel/kexec-bzimage64.c | 10 +-- arch/x86/kernel/resource.c | 4 +- arch/x86/kernel/setup.c | 10 +-- arch/x86/kernel/tboot.c | 8 +- arch/x86/lguest/boot.c | 6 +- arch/x86/platform/efi/efi.c | 2 +- arch/x86/power/hibernate_64.c | 8 +- arch/x86/xen/setup.c | 76 ++++++++--------- tools/lguest/lguest.c | 2 +- 19 files changed, 163 insertions(+), 163 deletions(-) commit acd4c048728814505fae8e224cf9074bd1ad291e Author: Ingo Molnar Date: Fri Jan 27 13:20:53 2017 +0100 x86/boot/e820: Rename 'e820_map' variables to 'e820_array' In line with the rename to 'struct e820_array', harmonize the naming of common e820 table variable names as well: e820 => e820_array e820_saved => e820_array_saved e820_map => e820_array initial_e820 => e820_array_init This makes the variable names more consistent and easier to grep for. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar Documentation/x86/zero-page.txt | 4 +- arch/x86/boot/compressed/eboot.c | 22 ++--- arch/x86/boot/compressed/kaslr.c | 2 +- arch/x86/boot/memory.c | 4 +- arch/x86/include/asm/e820/api.h | 6 +- arch/x86/include/asm/e820/types.h | 2 +- arch/x86/include/uapi/asm/bootparam.h | 2 +- arch/x86/kernel/crash.c | 2 +- arch/x86/kernel/e820.c | 148 +++++++++++++++++----------------- arch/x86/kernel/early-quirks.c | 2 +- arch/x86/kernel/kexec-bzimage64.c | 10 +-- arch/x86/kernel/resource.c | 4 +- arch/x86/kernel/setup.c | 10 +-- arch/x86/kernel/tboot.c | 8 +- arch/x86/lguest/boot.c | 6 +- arch/x86/platform/efi/efi.c | 2 +- arch/x86/power/hibernate_64.c | 4 +- arch/x86/xen/setup.c | 76 ++++++++--------- tools/lguest/lguest.c | 2 +- 19 files changed, 158 insertions(+), 158 deletions(-) commit e79d74d08547936a4c0ddf7711805dd2f8d82269 Author: Ingo Molnar Date: Fri Jan 27 13:12:51 2017 +0100 x86/boot/e820: Remove e820_mark_nosave_regions() definition uglies The e820_mark_nosave_regions definition has a number of ugly #ifdef conditions that unnecessarily uglify both the header and the e820.c file. Make this function unconditional: most distro kernels have hibernation enabled. If LTO functionality is added in the future it will be able to eliminate unused functions without uglifying the source code. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 5 ----- arch/x86/kernel/e820.c | 3 --- 2 files changed, 8 deletions(-) commit 9de94dbb90293fb1abfb4555685be3b080fe47b5 Author: Ingo Molnar Date: Fri Jan 27 13:08:42 2017 +0100 x86/boot/e820: Remove unnecessary #include from asm/e820/api.h There's a completely unnecessary inclusion of linux/ioport.h near the end of the asm/e820/api.h file. Remove it and fix up unrelated code that learned to rely on this spurious inclusion of a generic header. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 2 -- arch/x86/mm/ioremap.c | 1 + arch/x86/mm/pat.c | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) commit 8ec67d97bff592cc5b5325d1ee3646ebd7d635fc Author: Ingo Molnar Date: Fri Jan 27 12:54:38 2017 +0100 x86/boot/e820: Rename the basic e820 data types to 'struct e820_entry' and 'struct e820_array' The 'e820entry' and 'e820map' names have various annoyances: - the missing underscore departs from the usual kernel style and makes the code look weird, - in the past I kept confusing the 'map' with the 'entry', because a 'map' is ambiguous in that regard, - it's not really clear from the 'e820map' that this is a regular C array. Rename them to 'struct e820_entry' and 'struct e820_array' accordingly. ( Leave the legacy UAPI header alone but do the rename in the bootparam.h and e820/types.h file - outside tools relying on these defines should either adjust their code, or should use the legacy header, or should create their private copies for the definitions. ) No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar Documentation/x86/zero-page.txt | 2 +- arch/x86/boot/compressed/eboot.c | 12 +++---- arch/x86/boot/compressed/kaslr.c | 2 +- arch/x86/boot/memory.c | 4 +-- arch/x86/include/asm/e820/api.h | 6 ++-- arch/x86/include/asm/e820/types.h | 4 +-- arch/x86/include/uapi/asm/bootparam.h | 2 +- arch/x86/include/uapi/asm/e820/types.h | 2 +- arch/x86/kernel/crash.c | 8 ++--- arch/x86/kernel/e820.c | 64 +++++++++++++++++----------------- arch/x86/kernel/kexec-bzimage64.c | 2 +- arch/x86/kernel/resource.c | 2 +- arch/x86/kernel/setup.c | 2 +- arch/x86/power/hibernate_64.c | 6 ++-- arch/x86/xen/setup.c | 12 +++---- tools/lguest/lguest.c | 2 +- 16 files changed, 66 insertions(+), 66 deletions(-) commit 308bee698a902dac1d724277e636cd5f9be8cd3b Author: Ingo Molnar Date: Fri Jan 27 12:49:28 2017 +0100 x86/boot/e820: Move HIGH_MEMORY define to asm/e820/types.h The HIGH_MEMORY define was in the API header, while it conceptually belongs to the other physical memory ranges in the e820/types.h header. Move it there - and also convert the 1MB address to hexa, so that it lines up more nicely with the other memory address values. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 1 - arch/x86/include/asm/e820/types.h | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 993f4b77aa77eceda61e77c2d8645363181fa4ce Author: Ingo Molnar Date: Fri Jan 27 12:47:01 2017 +0100 x86/boot/e820: Remove unnecessary __ASSEMBLY__ guard asm/e820/api.h had a spurious __ASSEMBLY__ guard - but the API header is not included in any assembly files. Remove it. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 2 -- 1 file changed, 2 deletions(-) commit 0f856508ad599f0b34129cf5869700e6d7d641d3 Author: Ingo Molnar Date: Fri Jan 27 12:43:49 2017 +0100 x86/boot/e820: Clean up asm/e820/api.h Do a number of easy cleanups: - remove spurious linebreaks - remove spurious whitespace differences and inconsistent tabulation - remove unused and ugly 'struct setup_data;' pre-declaration - make all exported functionality 'extern' consistently - deobfuscate the (s,e) parameters of is_ISA_range(): (start, end) No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 46 ++++++++++++++++------------------------- 1 file changed, 18 insertions(+), 28 deletions(-) commit b0bd00d6feabdce70c89b298317309d2f12ceba4 Author: Ingo Molnar Date: Fri Jan 27 12:03:00 2017 +0100 x86/boot/e820: Remove assembly guard from asm/e820/types.h There's an assembly guard in asm/e820/types.h, and only a single .S file includes this header: arch/x86/boot/header.S, but it does not actually make use of any of the E820 defines. Remove the inclusion and remove the assembly guard as well. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/boot/header.S | 1 - arch/x86/include/asm/e820/types.h | 5 ----- 2 files changed, 6 deletions(-) commit 5520b7e7d2d20ae2ab6e07b46c42cd43df9d2799 Author: Ingo Molnar Date: Fri Jan 27 11:59:46 2017 +0100 x86/boot/e820: Remove spurious asm/e820/api.h inclusions A commonly used lowlevel x86 header, asm/pgtable.h, includes asm/e820/api.h spuriously, without making direct use of it. Removing it is not simple: over the years various .c code learned to rely on this indirect inclusion. Remove the unnecessary include - this should speed up the kernel build a bit, as a large header is not included anymore in totally unrelated code. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/boot/compressed/eboot.c | 2 ++ arch/x86/include/asm/pci_x86.h | 2 ++ arch/x86/include/asm/pgtable.h | 2 -- arch/x86/kernel/acpi/boot.c | 1 + arch/x86/kernel/apic/x2apic_uv_x.c | 1 + arch/x86/kernel/crash.c | 1 + arch/x86/kernel/kexec-bzimage64.c | 1 + arch/x86/mm/kasan_init_64.c | 1 + arch/x86/pci/pcbios.c | 2 ++ arch/x86/platform/efi/efi.c | 1 + arch/x86/platform/efi/quirks.c | 2 ++ arch/x86/power/hibernate_64.c | 1 + 12 files changed, 15 insertions(+), 2 deletions(-) commit 7b6e4ba3cb1ffdf84fc4d3775b922d64663ec6fc Author: Ingo Molnar Date: Fri Jan 27 11:46:14 2017 +0100 x86/boot/e820: Clean up the E820_X_MAX definition E820_X_MAX is defined in a somewhat messy fashion: - there's a pretty pointless looking #ifndef __KERNEL__ define that makes no sense in the non-UAPI header anymore, - part of it is defined in api.h, which is not for type definitions, - plus it's defined in two headers and the main explanation is in the header where we don't have the real definition. So move it into a single place in e820/types.h and get rid of the !__KERNEL__ case altogether. Drop the smaller comment - the larger one explains it just fine. Note that the zeropage does not use E820_X_MAX, it uses the legacy 128 entries definition. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/api.h | 9 --------- arch/x86/include/asm/e820/types.h | 13 +++++++------ 2 files changed, 7 insertions(+), 15 deletions(-) commit 99da1ffe0a85a727c368afa7fc21f7a740477aa4 Author: Ingo Molnar Date: Fri Jan 27 11:16:07 2017 +0100 x86/boot/e820: Split minimal UAPI types out into uapi/asm/e820/types.h bootparam.h, which defines the legacy 'zeropage' boot parameter area, requires a small amount of e280 defines in the UAPI space - provide them. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/acpi.h | 2 ++ arch/x86/include/asm/e820/types.h | 15 ++------------- arch/x86/include/uapi/asm/bootparam.h | 2 +- arch/x86/include/uapi/asm/e820/types.h | 21 +++++++++++++++++++++ 4 files changed, 26 insertions(+), 14 deletions(-) commit 66441bd3cfdcc03816b7009a296c284d70f629e1 Author: Ingo Molnar Date: Fri Jan 27 10:27:10 2017 +0100 x86/boot/e820: Move asm/e820.h to asm/e820/api.h In line with asm/e820/types.h, move the e820 API declarations to asm/e820/api.h and update all usage sites. This is just a mechanical, obviously correct move & replace patch, there will be subsequent changes to clean up the code and to make better use of the new header organization. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/boot/header.S | 2 +- arch/x86/include/asm/e820.h | 73 ----------------------------------- arch/x86/include/asm/e820/api.h | 73 +++++++++++++++++++++++++++++++++++ arch/x86/include/asm/gart.h | 2 +- arch/x86/include/asm/pgtable.h | 2 +- arch/x86/include/uapi/asm/bootparam.h | 2 +- arch/x86/kernel/aperture_64.c | 2 +- arch/x86/kernel/apic/apic_noop.c | 2 +- arch/x86/kernel/apic/probe_32.c | 2 +- arch/x86/kernel/cpu/centaur.c | 2 +- arch/x86/kernel/cpu/mtrr/cleanup.c | 2 +- arch/x86/kernel/cpu/mtrr/main.c | 2 +- arch/x86/kernel/e820.c | 2 +- arch/x86/kernel/head32.c | 2 +- arch/x86/kernel/head64.c | 2 +- arch/x86/kernel/mpparse.c | 2 +- arch/x86/kernel/probe_roms.c | 2 +- arch/x86/kernel/resource.c | 2 +- arch/x86/kernel/setup.c | 2 +- arch/x86/kernel/tboot.c | 2 +- arch/x86/kernel/x86_init.c | 2 +- arch/x86/lguest/boot.c | 2 +- arch/x86/lib/kaslr.c | 2 +- arch/x86/mm/amdtopology.c | 2 +- arch/x86/mm/init.c | 2 +- arch/x86/mm/init_32.c | 2 +- arch/x86/mm/init_64.c | 2 +- arch/x86/mm/ioremap.c | 2 +- arch/x86/mm/mmio-mod.c | 2 +- arch/x86/mm/numa.c | 2 +- arch/x86/mm/pageattr.c | 2 +- arch/x86/mm/pat.c | 2 +- arch/x86/mm/pgtable_32.c | 2 +- arch/x86/mm/srat.c | 2 +- arch/x86/pci/i386.c | 2 +- arch/x86/pci/mmconfig-shared.c | 2 +- arch/x86/pci/mmconfig_32.c | 2 +- arch/x86/pci/mmconfig_64.c | 2 +- arch/x86/platform/efi/efi_64.c | 2 +- arch/x86/xen/mmu.c | 2 +- arch/x86/xen/setup.c | 2 +- drivers/char/agp/amd64-agp.c | 2 +- 42 files changed, 113 insertions(+), 113 deletions(-) commit 7b80ba55aa2919d5b26021659f025905aaea44ed Author: Ingo Molnar Date: Fri Jan 27 10:22:23 2017 +0100 x86/boot/e820: Clean up and improve comments in asm/e820/types.h Do some common-sense cleanups: - standardize on the kernel coding style consistently - tabulate definitions consistently - extend and clarify various descriptions - fix speling - update the header guard name according to the new position - etc. No change in functionality. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820/types.h | 84 ++++++++++++++++++++++++--------------- 1 file changed, 53 insertions(+), 31 deletions(-) commit 70a9d8184ccecf7a38848531fb4767a85134f464 Author: Ingo Molnar Date: Fri Jan 27 09:58:02 2017 +0100 x86/boot/e820: Introduce arch/x86/include/asm/e820/types.h First baby steps towards saner e820 headers: create an exact copy of arch/x86/include/uapi/asm/e820.h and use it from the asm/e820.h file. No other changes - this is done to decouple the code from UAPI headers, plus to make sure that subsequent modifications to the file can be more clearly seen. The plan is to keep the old UAPI header in place but the kernel won't use it anymore - and after some time we'll try to remove it. (User-space tools better have local copies of headers anyway, instead of relying on kernel headers.) This gives the kernel the freedom to reorganize the e820 code. Cc: Alex Thorlton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dan Williams Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang, Ying Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Paul Jackson Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yinghai Lu Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/e820.h | 4 +- arch/x86/include/asm/e820/types.h | 81 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 2 deletions(-) commit fec0445caa273209d2809760ac7c63e743d6f512 Author: Chris Wilson Date: Fri Jan 27 09:40:08 2017 +0000 drm/i915: Support explicit fencing for execbuf Now that the user can opt-out of implicit fencing, we need to give them back control over the fencing. We employ sync_file to wrap our drm_i915_gem_request and provide an fd that userspace can merge with other sync_file fds and pass back to the kernel to wait upon before future execution. Testcase: igt/gem_exec_fence Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Acked-by: Chad Versace Link: http://patchwork.freedesktop.org/patch/msgid/20170127094008.27489-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Kconfig | 1 + drivers/gpu/drm/i915/i915_drv.c | 3 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 54 +++++++++++++++++++++++++++--- include/uapi/drm/i915_drm.h | 36 +++++++++++++++++++- 4 files changed, 87 insertions(+), 7 deletions(-) commit 77ae9957897df86e627089688265e0db029dd0df Author: Chris Wilson Date: Fri Jan 27 09:40:07 2017 +0000 drm/i915: Enable userspace to opt-out of implicit fencing Userspace is faced with a dilemma. The kernel requires implicit fencing to manage resource usage (we always must wait for the GPU to finish before releasing its PTE) and for third parties. However, userspace may wish to avoid this serialisation if it is either using explicit fencing between parties and wants more fine-grained access to buffers (e.g. it may partition the buffer between uses and track fences on ranges rather than the implicit fences tracking the whole object). It follows that userspace needs a mechanism to avoid the kernel's serialisation on its implicit fences before execbuf execution. The next question is whether this is an object, execbuf or context flag. Hybrid users (such as using explicit EGL_ANDROID_native_sync fencing on shared winsys buffers, but implicit fencing on internal surfaces) require a per-object level flag. Given that this flag need to be only set once for the lifetime of the object, this reduces the convenience of having an execbuf or context level flag (and avoids having multiple pieces of uABI controlling the same feature). Incorrect use of this flag will result in rendering corruption and GPU hangs - but will not result in use-after-free or similar resource tracking issues. Serious caveat: write ordering is not strictly correct after setting this flag on a render target on multiple engines. This affects all subsequent GEM operations (execbuf, set-domain, pread) and shared dma-buf operations. A fix is possible - but costly (both in terms of further ABI changes and runtime overhead). Testcase: igt/gem_exec_async Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Acked-by: Chad Versace Link: http://patchwork.freedesktop.org/patch/msgid/20170127094008.27489-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_gem_execbuffer.c | 3 +++ include/uapi/drm/i915_drm.h | 29 ++++++++++++++++++++++++++++- 3 files changed, 32 insertions(+), 1 deletion(-) commit 40f62bb75e354dddfd8d7b6d7b96c4ab93cb00f1 Author: Jani Nikula Date: Fri Jan 27 16:11:29 2017 +0200 Revert "drm/color: un-inline drm_color_lut_extract()" This reverts commit 2eebe4f2d5f4c91edc37801d828ba29edfbc7722, because I screwed up and applied it to the wrong branch. Signed-off-by: Jani Nikula drivers/gpu/drm/drm_color_mgmt.c | 24 ------------------------ include/drm/drm_color_mgmt.h | 27 +++++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 26 deletions(-) commit 05c41f926fcc7ef838c80a6a99d84f67b4e0b824 Author: Andrey Ryabinin Date: Thu Jan 26 17:32:11 2017 +0300 drm/i915: fix use-after-free in page_flip_completed() page_flip_completed() dereferences 'work' variable after executing queue_work(). This is not safe as the 'work' item might be already freed by queued work: BUG: KASAN: use-after-free in page_flip_completed+0x3ff/0x490 at addr ffff8803dc010f90 Call Trace: __asan_report_load8_noabort+0x59/0x80 page_flip_completed+0x3ff/0x490 intel_finish_page_flip_mmio+0xe3/0x130 intel_pipe_handle_vblank+0x2d/0x40 gen8_irq_handler+0x4a7/0xed0 __handle_irq_event_percpu+0xf6/0x860 handle_irq_event_percpu+0x6b/0x160 handle_irq_event+0xc7/0x1b0 handle_edge_irq+0x1f4/0xa50 handle_irq+0x41/0x70 do_IRQ+0x9a/0x200 common_interrupt+0x89/0x89 Freed: kfree+0x113/0x4d0 intel_unpin_work_fn+0x29a/0x3b0 process_one_work+0x79e/0x1b70 worker_thread+0x611/0x1460 kthread+0x241/0x3a0 ret_from_fork+0x27/0x40 Move queue_work() after trace_i915_flip_complete() to fix this. Fixes: e5510fac98a7 ("drm/i915: add tracepoints for flip requests & completions") Signed-off-by: Andrey Ryabinin Cc: # v2.6.36+ Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170126143211.24013-1-aryabinin@virtuozzo.com drivers/gpu/drm/i915/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 920bcd1820a6966b6224f62eadcb4e931bb72e8e Author: Paulo Zanoni Date: Thu Jan 26 18:19:07 2017 -0200 drm/i915: make i915_stolen_to_physical() return phys_addr_t The i915_stolen_to_physical() function has 'unsigned long' as its return type but it returns the 'base' variable, which is of type 'u32'. The only place where this function is called assigns the returned value to dev_priv->mm.stolen_base, which is of type 'phys_addr_t'. The return value is actually a physical address and everything else in the stolen memory code seems to be using phys_addr_t, so fix i915_stolen_to_physical() to use phys_addr_t. v2: Add missing blank lines after declarations (Chris, checkpatch.pl). Reviewed-by: Chris Wilson Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1485461947-16030-1-git-send-email-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/i915_gem_stolen.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 2eebe4f2d5f4c91edc37801d828ba29edfbc7722 Author: Jani Nikula Date: Mon Jan 23 11:42:59 2017 +0200 drm/color: un-inline drm_color_lut_extract() The function is not that big, but it's also not used for anything performance critical. Make it a normal function. As a side effect, this apparently makes sparse smarter about what it's doing, and gets rid of the warning: ./include/drm/drm_color_mgmt.h:53:28: warning: shift too big (4294967295) for type unsigned long ./include/drm/drm_color_mgmt.h:53:28: warning: cast truncates bits from constant value (8000000000000000 becomes 0) Cc: Lionel Landwerlin Reviewed-by: Daniel Vetter Reviewed-by: Lionel Landwerlin Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1485164579-16250-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/drm_color_mgmt.c | 24 ++++++++++++++++++++++++ include/drm/drm_color_mgmt.h | 27 ++------------------------- 2 files changed, 26 insertions(+), 25 deletions(-) commit bc384c77e3bb3df2b396f4fb246b452571896c5e Author: Paulo Zanoni Date: Tue Jan 24 16:47:22 2017 -0200 x86/gpu: GLK uses the same GMS values as SKL So don't forget to reserve its stolen memory bits. Cc: Ingo Molnar Cc: H. Peter Anvin Cc: Ander Conselvan de Oliveira Cc: x86@kernel.org Reviewed-by: Ander Conselvan de Oliveira Signed-off-by: Paulo Zanoni Acked-by: Ingo Molnar Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1485283642-14401-1-git-send-email-paulo.r.zanoni@intel.com arch/x86/kernel/early-quirks.c | 1 + 1 file changed, 1 insertion(+) commit ed576a5ca47fbe374cd762cb1fde4bdc41e233b4 Author: Chris Wilson Date: Wed Jan 25 13:48:08 2017 +0000 drm/i915: Also clear the punit's PDATA sideband register As the previous punit i/o may have failed, the contents of the PDATA are undefined. Always clear it to 0 prior to sending the command. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170125134808.6152-2-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_sideband.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9fcee2f77e88f1d7c3f72fca418cdae3e79a6e83 Author: Chris Wilson Date: Thu Jan 26 10:19:19 2017 +0000 drm/i915: Report the failure to write to the punit The write to the punit may fail, so propagate the error code back to its callers. Of particular interest are the RPS writes, so add appropriate user error codes and logging. v2: Add DEBUG for failed frequency changes during RPS. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170126101919.13211-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_debugfs.c | 6 +++-- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/i915_irq.c | 5 +++- drivers/gpu/drm/i915/i915_sysfs.c | 9 ++++--- drivers/gpu/drm/i915/intel_pm.c | 45 +++++++++++++++++++++++++---------- drivers/gpu/drm/i915/intel_sideband.c | 10 +++++--- 6 files changed, 53 insertions(+), 26 deletions(-) commit 611032bfa71a7634e801142016f2d41485f8638f Author: Manasi Navare Date: Tue Jan 24 08:21:49 2017 -0800 drm/i915: Add support for DP Video pattern compliance tests The intel_dp_autotest_video_pattern() function gets invoked through the compliance test handler on a HPD short pulse if the test type is set to DP_TEST_VIDEO_PATTERN. This performs the DPCD registers reads to read the requested test pattern, video pattern resolution, frame rate and bits per color value. The results of this analysis are handed off to userspace so that the userspace app can set the video pattern mode appropriately for the test result/response. When the test is requested with specific BPC value, we read the BPC value from the DPCD register. If this BPC value in intel_dp structure has a non-zero value and we're on a display port connector, then we use the value to calculate the bpp for the pipe. Also in this case if its a 18bpp video pattern request, then we force the dithering on pipe to be disabled since it causes CRC mismatches. The compliance_test_active flag is set at the end of the individual test handling functions. This is so that the kernel-side operations can be completed without the risk of interruption from the userspace app that is polling on that flag. v5: * Remove test_result variable * Populate the compliance test data at the end of the function (Jani Nikula) v4: *Return TEST_NAK on read failures and invalid values (Jani Nikula) * Address CRC mismatch errors v3: * Use the updated properly shifted bit definitions (Jani Nikula) * Force dithering to be disabled on 18bpp compliance test request (Manasi Navare) v2: * Updated the DPCD Register reads based on proper defines in header (Jani Nikula) * Squahsed the patch that forced the pipe bpp to compliance test bpp (Jani Nikula) Signed-off-by: Manasi Navare Cc: Jani Nikula Cc: Daniel Vetter Cc: Ville Syrjala Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1485274909-17470-1-git-send-email-manasi.d.navare@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 9 +++++ drivers/gpu/drm/i915/intel_display.c | 7 ++-- drivers/gpu/drm/i915/intel_dp.c | 68 ++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/intel_dp_mst.c | 7 +++- drivers/gpu/drm/i915/intel_drv.h | 11 ++++++ 5 files changed, 97 insertions(+), 5 deletions(-) commit 08b79f62a1a3f6774cf27db4d12f3f938486c4f9 Author: Manasi Navare Date: Fri Jan 20 19:09:29 2017 -0800 drm: Add definitions for DP compliance Video pattern tests v4: * Remove redundant single bit defs (Jani Nikula) v3: * Fix the conventions in bit definitions (Jani Nikula) v2: * Add all the other DP Complianec TEST register defs (Jani Nikula) Cc: dri-devel@lists.freedesktop.org Cc: Jani Nikula Cc: Daniel Vetter Cc: Ville Syrjala Signed-off-by: Manasi Navare Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1484968170-12467-4-git-send-email-manasi.d.navare@intel.com include/drm/drm_dp_helper.h | 57 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit b48a5ba9710f83d998f16917d57bfa622991e9d6 Author: Manasi Navare Date: Fri Jan 20 19:09:28 2017 -0800 drm/i915: Fixes to support DP Compliance EDID tests This patch addresses a few issues from the original patch for DP Compliance EDID test support submitted by Todd Previte Video Mode requested in the EDID test handler for the EDID Read test (CTS 4.2.2.3) should be set to PREFERRED as per the CTS spec. v2: * Added read debugfs data from test_data.edid if its EDID test (Jani NIkula) Signed-off-by: Manasi Navare Cc: Jani Nikula Cc: Daniel Vetter Cc: Ville Syrjala Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1484968170-12467-3-git-send-email-manasi.d.navare@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 5 ++++- drivers/gpu/drm/i915/intel_dp.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit da15f7cb1914aa6ca3efb874e04ae3d96038641a Author: Manasi Navare Date: Tue Jan 24 08:16:34 2017 -0800 drm/i915: Add support for DP link training compliance This patch adds support to handle automated DP compliance link training test requests. This patch has been tested with Unigraf DPR-120 DP Compliance device for testing Link Training Compliance. After we get a short pulse Compliance test request, test request values are read and hotplug uevent is sent in order to trigger another modeset during which the pipe is configured and link is retrained and enabled for link parameters requested by the test. v5: * Only modify the compliance structure after all validation is done (Jani Nikula) * Remove the variable test_result (Jani Nikula) v4: * Return TEST_NAK for read failures and invalid values (Jani Nikula) * Conver the test link BW to link rate before storing (Jani Nikula) v3: * Validate the test link rate and lane count as soon as the request comes (Jani Nikula) v2: * Validate the test lane count before using it in intel_dp_compute_config (Jani Nikula) Signed-off-by: Manasi Navare Cc: Jani Nikula Cc: Daniel Vetter Cc: Ville Syrjala Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1485274594-17361-1-git-send-email-manasi.d.navare@intel.com drivers/gpu/drm/i915/intel_dp.c | 65 ++++++++++++++++++++++++++++++++++++---- drivers/gpu/drm/i915/intel_drv.h | 2 ++ 2 files changed, 61 insertions(+), 6 deletions(-) commit 1c044f9bbc107313af5f3c6bfa21300a6d0a08cd Author: Chris Wilson Date: Wed Jan 25 17:26:01 2017 +0000 drm/i915: Remove early pre-production RPS workarounds for BXT Remove WaGsvDisableTurbo and WaRsUseTimeoutMode as these were only for pre-production Broxton devices, and this code is now defunct. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_pm.c | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) commit b976dc53ec43da887fb5731f2f7e1f770cec6074 Author: Rodrigo Vivi Date: Mon Jan 23 10:32:37 2017 -0800 drm/i915: Introduce IS_GEN9_BC for Skylake and Kabylake. Along with GLK it was introduced the .is_lp and IS_GEN9_LP. So, following the same simplification standard we can put Skylake and Kabylake under the same bucket for most of the things. So let's add the IS_GEN9_BC for "Big Core" (non Atom based platforms). The i915_drv.c was let out of this patch on purpose because that is really a decision per platform, just like other cases where IS_KABYLAKE is different from IS_SKYLAKE. v2: fix conflict with IS_LP and 3 new cases for this big core bucket: - intel_ddi.c: intel_ddi_get_link_dpll - intel_fbc.c: find_compression_threshold - i915_gem_gtt.c: gtt_write_workarounds Cc: Anusha Srivatsa Cc: Ander Conselvan de Oliveira Cc: Jani Nikula Signed-off-by: Rodrigo Vivi Reviewed-by: Ander Conselvan de Oliveira Acked-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1485196357-30599-2-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 17 +++++++---------- drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- drivers/gpu/drm/i915/intel_audio.c | 2 +- drivers/gpu/drm/i915/intel_color.c | 4 ++-- drivers/gpu/drm/i915/intel_ddi.c | 20 ++++++++++---------- drivers/gpu/drm/i915/intel_display.c | 12 ++++++------ drivers/gpu/drm/i915/intel_dp.c | 5 ++--- drivers/gpu/drm/i915/intel_dpll_mgr.c | 2 +- drivers/gpu/drm/i915/intel_fbc.c | 3 +-- drivers/gpu/drm/i915/intel_i2c.c | 4 ++-- drivers/gpu/drm/i915/intel_mocs.c | 2 +- drivers/gpu/drm/i915/intel_pm.c | 13 ++++++------- drivers/gpu/drm/i915/intel_runtime_pm.c | 10 +++++----- 14 files changed, 47 insertions(+), 52 deletions(-) commit 8da53efaa228f12f709b23d7cd08c5644af474c4 Author: Rodrigo Vivi Date: Mon Jan 23 10:32:36 2017 -0800 drm/i915/kbl: Apply WaIncreaseDefaultTLBEntries on KBL. According to wa_database this Wa persist on KBL as it was on SKL. Cc: Tim Gore Cc: Mika Kuoppala Cc: Tvrtko Ursulin Signed-off-by: Rodrigo Vivi Reviewed-by: Ander Conselvan de Oliveira Acked-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1485196357-30599-1-git-send-email-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eb955eee27d9dc176871540c43c9070ee4701642 Author: Chris Wilson Date: Mon Jan 23 21:29:39 2017 +0000 drm/i915: Move atomic state free from out of fence release Fences are required to support being released from under an atomic context. The drm_atomic_state struct may take a mutex when being released and so we cannot drop a reference to the drm_atomic_state from the fence release path directly, and so we need to defer that unreference to a worker. [ 326.576697] WARNING: CPU: 2 PID: 366 at kernel/sched/core.c:7737 __might_sleep+0x5d/0x80 [ 326.576816] do not call blocking ops when !TASK_RUNNING; state=1 set at [] intel_breadcrumbs_signaler+0x59/0x270 [i915] [ 326.576818] Modules linked in: rfcomm fuse snd_hda_codec_hdmi bnep snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device snd_timer input_leds led_class snd punit_atom_debug btusb btrtl btbcm btintel intel_rapl bluetooth i915 drm_kms_helper syscopyarea sysfillrect iwlwifi sysimgblt soundcore fb_sys_fops mei_txe cfg80211 drm pwm_lpss_platform pwm_lpss pinctrl_cherryview fjes acpi_pad parport_pc ppdev parport autofs4 [ 326.576899] CPU: 2 PID: 366 Comm: i915/signal:0 Tainted: G U 4.10.0-rc3-patser+ #5030 [ 326.576902] Hardware name: /NUC5PPYB, BIOS PYBSWCEL.86A.0031.2015.0601.1712 06/01/2015 [ 326.576905] Call Trace: [ 326.576920] dump_stack+0x4d/0x6d [ 326.576926] __warn+0xc0/0xe0 [ 326.576931] warn_slowpath_fmt+0x5a/0x80 [ 326.577004] ? intel_breadcrumbs_signaler+0x59/0x270 [i915] [ 326.577075] ? intel_breadcrumbs_signaler+0x59/0x270 [i915] [ 326.577079] __might_sleep+0x5d/0x80 [ 326.577087] mutex_lock+0x1b/0x40 [ 326.577133] drm_property_free_blob+0x1e/0x80 [drm] [ 326.577167] ? drm_property_destroy+0xe0/0xe0 [drm] [ 326.577200] drm_mode_object_unreference+0x5c/0x70 [drm] [ 326.577233] drm_property_unreference_blob+0xe/0x10 [drm] [ 326.577260] __drm_atomic_helper_crtc_destroy_state+0x14/0x40 [drm_kms_helper] [ 326.577278] drm_atomic_helper_crtc_destroy_state+0x10/0x20 [drm_kms_helper] [ 326.577352] intel_crtc_destroy_state+0x9/0x10 [i915] [ 326.577388] drm_atomic_state_default_clear+0xea/0x1d0 [drm] [ 326.577462] intel_atomic_state_clear+0xd/0x20 [i915] [ 326.577497] drm_atomic_state_clear+0x1a/0x30 [drm] [ 326.577532] __drm_atomic_state_free+0x13/0x60 [drm] [ 326.577607] intel_atomic_commit_ready+0x6f/0x78 [i915] [ 326.577670] i915_sw_fence_release+0x3a/0x50 [i915] [ 326.577733] dma_i915_sw_fence_wake+0x39/0x80 [i915] [ 326.577741] dma_fence_signal+0xda/0x120 [ 326.577812] ? intel_breadcrumbs_signaler+0x59/0x270 [i915] [ 326.577884] intel_breadcrumbs_signaler+0xb1/0x270 [i915] [ 326.577889] kthread+0x127/0x130 [ 326.577961] ? intel_engine_remove_wait+0x1a0/0x1a0 [i915] [ 326.577964] ? kthread_stop+0x120/0x120 [ 326.577970] ret_from_fork+0x22/0x30 Fixes: c004a90b7263 ("drm/i915: Restore nonblocking awaits for modesetting") Reported-by: Maarten Lankhorst Signed-off-by: Chris Wilson Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Maarten Lankhorst Cc: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170123212939.30345-1-chris@chris-wilson.co.uk Cc: # v4.10-rc1+ Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.h | 5 +++++ drivers/gpu/drm/i915/intel_display.c | 28 ++++++++++++++++++++++++++-- drivers/gpu/drm/i915/intel_drv.h | 2 ++ 3 files changed, 33 insertions(+), 2 deletions(-) commit 7c9e934ef8a09a1a42f15ce9f0f872fdfdb67b97 Author: Chris Wilson Date: Tue Jan 24 11:00:09 2017 +0000 drm/i915: Emit dma-fence (and execlists submit) first from signaler When introduced, I thought that reducing client latency from the signaler was the priority. Since its inception the signaler has become responsible for keeping the execlists full, via the dma-fence. As this is very important to minimise overall execution time, signal the dma-fence first and then signal any waiting clients. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170124110009.28947-8-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_breadcrumbs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 48ea2554f46e7c1771dba1529a17aa04792871b2 Author: Chris Wilson Date: Tue Jan 24 11:00:08 2017 +0000 drm/i915: Dequeue execlists on a new request if any port is available If the second ELSP port is available, schedule the execlists tasklet to see if the new request can occupy it. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170124110009.28947-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3833281adb0f01ca5b279664d14611d8ed1deb98 Author: Chris Wilson Date: Tue Jan 24 11:00:07 2017 +0000 drm/i915: Only attempt to pass the first request to execlists Only the first request added to the execlist queue can be submitted. If this request is not the first request on the queue, it means that there are already higher priority requests waiting upon the tasklet and kicking it will make no difference. This is more relevant for a later patch, where we more eagerly try and kick the tasklet to handle the submission of new requests. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170124110009.28947-6-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_lrc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a37951ac9f9642819e400814f6f30689db233c24 Author: Chris Wilson Date: Tue Jan 24 11:00:06 2017 +0000 drm/i915: Skip the execlists CSB scan and rewrite if the ring is untouched If the CSB head/tail pointers are unchanged, we can skip the update of the CSB register afterwards. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170124110009.28947-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f747026c2b350fdb3c2d6fad51b7ebed4851183e Author: Chris Wilson Date: Tue Jan 24 15:20:21 2017 +0000 drm/i915: Only run execlist context-switch handler after an interrupt Mark when we run the execlist tasklet following the interrupt, so we don't probe a potentially uninitialised register when submitting the contexts multiple times before the hardware responds. v2: Use a shared engine->irq_posted v3: Always use locked bitops to be sure of atomicity wrt to other bits in the mask. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170124152021.26587-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_irq.c | 7 +++++-- drivers/gpu/drm/i915/intel_lrc.c | 3 ++- drivers/gpu/drm/i915/intel_ringbuffer.h | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) commit 538b257dae83268cc3536fb4c4ab4f57901d449d Author: Chris Wilson Date: Tue Jan 24 15:18:05 2017 +0000 drm/i915: Move breadcrumbs irq_posted up a level to engine In the next patch, we will use the irq_posted technique for another engine interrupt, rather than use two members for the atomic updates, we can use two bits of one instead. First, we need to update the breadcrumbs to use the new common engine->irq_posted. v2: Use set_bit() rather than __set_bit() to ensure atomicity with respect to other bits in the mask Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170124151805.26146-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_irq.c | 2 +- drivers/gpu/drm/i915/intel_breadcrumbs.c | 9 ++++----- drivers/gpu/drm/i915/intel_ringbuffer.h | 4 +++- 4 files changed, 9 insertions(+), 8 deletions(-) commit 816ee798ec2b46b1f92aaebb1c7b5d2e1abdc43e Author: Chris Wilson Date: Tue Jan 24 11:00:03 2017 +0000 drm/i915: Only disable execlist preemption for the duration of the request We need to prevent resubmission of the context immediately following an initial resubmit (which does a lite-restore preemption). Currently we do this by disabling all submission whilst the context is still active, but we can improve this by limiting the restriction to only until we receive notification from the context-switch interrupt that the lite-restore preemption is complete. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170124110009.28947-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 18 ++++++++++++------ drivers/gpu/drm/i915/intel_lrc.c | 14 ++++---------- drivers/gpu/drm/i915/intel_ringbuffer.h | 1 - 3 files changed, 16 insertions(+), 17 deletions(-) commit c816e605ffb26ce1d3c06238c7de6662569ecb1e Author: Chris Wilson Date: Tue Jan 24 11:00:02 2017 +0000 drm/i915: Assert that we don't submit to execlists whilst a preempt is pending To complement the check in execlists_elsp_ready(), also assert that we don't submit the same context while it has a lite restore still pending. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170124110009.28947-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 1 + 1 file changed, 1 insertion(+) commit 5ec63bbdf527d26606c8ba9d3a841755d3887fbe Author: Jani Nikula Date: Fri Jan 20 19:04:06 2017 +0200 drm/i915/dp: do not proceed with autotests if we don't ACK them There is no point in setting intel_dp->compliance.test_type, and proceeding with the autotests, if we're about to NAK the request. Some drive-by cleanups while at it. v2: look at the ACK bit, as the result may also contain TEST_EDID_CHECKSUM_WRITE Cc: Manasi Navare Reviewed-by: Manasi Navare Tested-by: Manasi Navare Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1484931846-25390-1-git-send-email-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dp.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 241455172b8683f65a325490baf2d8dd683b3832 Author: Chris Wilson Date: Tue Jan 24 11:01:35 2017 +0000 drm/i915: Reset the gpu on takeover The GPU may be in an unknown state following resume and module load. The previous occupant may have left contexts loaded, or other dangerous state, which can cause an immediate GPU hang for us. The only save course of action is to reset the GPU prior to using it - similarly to how we reset the GPU prior to unload (before a second user may be affected by our leftover state). We need to reset the GPU very early in our load/resume sequence so that any stale HW pointers are revoked prior to any resource allocations we make (that may conflict). A reset should only be a couple of milliseconds on a slow device, a cost we should easily be able to absorb into our initialisation times. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170124110135.6418-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 3 +++ drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gem.c | 27 +++++++++++++++++++++++---- 3 files changed, 28 insertions(+), 4 deletions(-) commit bb8f0f5abdd7845175962a3fb99a5681290f9566 Author: Chris Wilson Date: Tue Jan 24 11:01:34 2017 +0000 drm/i915: Split intel_engine allocation and initialisation In order to reset the GPU early on in the module load sequence, we need to allocate the basic engine structs (to populate the mmio offsets etc). Currently, the engine initialisation allocates both the base struct and also allocate auxiliary objects, which depend upon state setup quite late in the load sequence. We split off the allocation callback for later and allow ourselves to allocate the engine structs themselves early. v2: Different paint for the unwind following error. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170124110135.6418-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 19 +++++++- drivers/gpu/drm/i915/i915_drv.h | 3 ++ drivers/gpu/drm/i915/intel_engine_cs.c | 80 ++++++++++++++++++++++++++-------- drivers/gpu/drm/i915/intel_lrc.h | 2 - 4 files changed, 81 insertions(+), 23 deletions(-) commit b403c8feaf4838ad54cb9c15d0ad8453aa90af50 Author: Chris Wilson Date: Mon Jan 23 13:06:00 2017 +0000 drm/i915: Remove BXT TDL state w/a This w/a (WaClearTdlStateAckDirtyBits) was only used for preproduction hw, which is no longer in use. Remove the workaround to simplify the code. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170123130601.2281-5-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_lrc.c | 19 ------------------- 1 file changed, 19 deletions(-) commit 68bee6157384017521e881c9436b3b6336cfac96 Author: Chris Wilson Date: Mon Jan 23 13:05:59 2017 +0000 drm/i915: Remove BXT disable pixel mask clamping w/a This w/a (WaSetDisablePixMaskCammingAndRhwoInCommonSliceChicken) was only used for preproduction hw, which is no longer in use. Remove the workaround to simplify the code. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170123130601.2281-4-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_lrc.c | 9 --------- 1 file changed, 9 deletions(-) commit 32ebc292119a92e3f753a287923d2d31846247f6 Author: Chris Wilson Date: Mon Jan 23 13:05:58 2017 +0000 drm/i915: Remove BXT restore arbitration around ctx switch This w/a (WaDisableCtxRestoreArbitration) was only used for preproduction hw, which is no longer in use. Remove the workaround to simplify the code. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170123130601.2281-3-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_lrc.c | 8 -------- 1 file changed, 8 deletions(-) commit f8dd2934c4ec03a56cfc1b7d23c0248aa6e4adf0 Author: Chris Wilson Date: Mon Jan 23 13:05:57 2017 +0000 drm/i915: Remove BXT incoherent seqno write workaround This w/a was only used for preproduction hw, which is no longer in use. Remove the workaround to simplify the code. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170123130601.2281-2-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_lrc.c | 17 ----------------- 1 file changed, 17 deletions(-) commit 70962fbe5c75e785d250c04db4d01c18b7316c13 Author: Chris Wilson Date: Mon Jan 23 13:05:56 2017 +0000 drm/i915: Remove disable_lite_restore_wa This w/a (WaEnableForceRestoreInCtxtDescForVCS) was only used for preproduction hw, which is no longer in use. Remove the workaround to simplify the code. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170123130601.2281-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_lrc.c | 11 +---------- drivers/gpu/drm/i915/intel_ringbuffer.h | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) commit 7c518460303353084ebcfca99bc4b67ce33745a1 Author: Chris Wilson Date: Mon Jan 23 14:52:45 2017 +0000 drm/i915: Pevent copying uninitialised garbage into vma->ggtt_view Since tweaking i915_vma_compare() we allowed constructors to skip clearing the ggtt_view believing that we didn't access the unused members. That, as it turns out, was not entirely true. In particular, i915_gem_fault() uses ret = remap_io_mapping(area, area->vm_start + (vma->ggtt_view.partial.offset << PAGE_SHIFT), (ggtt->mappable_base + vma->node.start) >> PAGE_SHIFT, min_t(u64, vma->size, area->vm_end - area->vm_start), &ggtt->mappable); i.e. the ggtt_view.partial for both normal and partial views. If we allowed garbage into the normal vma->ggtt_view and then try userspace tried to mmap it, we could explode in an unobvious fashion. Fixes: 7b92c047bae2 ("drm/i915: Eliminate superfluous i915_ggtt_view_rotated") Fixes: 3bf4d5751943 ("drm/i915: Stop clearing i915_ggtt_view") Reported-by: Matthew Auld Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/20170123145245.3972-1-chris@chris-wilson.co.uk Tested-by: Matthew Auld Reviewed-by: Matthew Auld drivers/gpu/drm/i915/i915_vma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c01ded5732d6533a2858fae30c197f734745062 Author: Maarten Lankhorst Date: Thu Dec 22 11:33:23 2016 +0100 drm/i915: Use atomic page flip for intel again. This reverts commit 527b6abe5fd2d2 (Revert "drm/i915: Use atomic commits for legacy page_flips") and reapplies commit ee042aa40b66d1. ("drm/i915: Use atomic commits for legacy page_flips") The reason for the revert was because legacy cursor updates were forced to wait for pending page flips and rendering after they were converted to atomic. Commit f79f26921ee12c6f (drm/i915: Add a cursor hack to allow converting legacy page flip to atomic, v3) adds a fastpath to cursor updates, which fixes the stuttering issues. With these changes I feel confident enough to re-enable cursor updates. Legacy cursor update won't block in the following cases: - Moving cursor - Changing cursor fb The legacy cursor update will still block in the following cases: - Showing/hiding cursor. - Cursor size or scaling changes. - cursor update while cursor is invisible (could be fixed, if it turns out to be important). - Cursor tiling changes (Not sure we support tiled cursors.) - Last update was a modeset. Cc: Steven Newbury Cc: Rafael Ristovski Cc: Chris Wilson Cc: Daniel Vetter Tested-by: Rafael Ristovski Testcase: igt/kms_cursor_legacy Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 86aa7e760a6709789a21bdf186bd0c3635da6b9a Author: Chris Wilson Date: Mon Jan 23 11:31:32 2017 +0000 drm/i915: Assert that the context-switch completion matches our context When execlists signals the context completion, it also provides the context id for the status event. Assert that id matches the one we expect. v2: The upper dword of the context status is a duplicate of the upper dword from elsp submission (i.e. includes the group id as well as the context id). Include this check as well. v3: Only check against lrc_desc (as this contains the hw_id check) Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Reviewed-by: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/20170123113132.18665-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5d12fcef4ef15d00ae3228cc1ed80d2d81bc2c06 Author: Chris Wilson Date: Mon Jan 23 11:31:31 2017 +0000 drm/i915: Assert that the kernel_context is hw-id 0 For easy recognisability, we want the kernel context to have id 0 and all user contexts to have non-zero ids. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/20170123113132.18665-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2f1ac9cc68e0ca569405bd854979aa7eb787f774 Author: Chris Wilson Date: Mon Jan 23 09:37:24 2017 +0000 drm/i915: Queue hangcheck when irqs are disabled Ensure that the hangcheck is queued even in the absence of interrupts. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/20170123093724.18592-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_breadcrumbs.c | 1 + 1 file changed, 1 insertion(+) commit e27414a04f1a571eeb0b214ebfc77e6dc9bb8a08 Author: Geliang Tang Date: Fri Jan 20 22:36:55 2017 +0800 drm/i915/error: use rb_entry() To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang Link: http://patchwork.freedesktop.org/patch/msgid/b08fd4be9d4c45d88c158a17b854c3fd628840ed.1484816339.git.geliangtang@gmail.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec78828ed60a9833582cbb582248bd1b0200f50e Author: Chris Wilson Date: Wed Jan 18 12:18:08 2017 +0000 drm/i915: Fix W=1 warning for csr_load_work_fn() drivers/gpu/drm/i915/intel_csr.c: In function ‘csr_load_work_fn’: drivers/gpu/drm/i915/intel_csr.c:399:6: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170118121808.27869-2-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_csr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 62fa0ce2bd590ef95b4557fca780441dc33ba427 Author: Chris Wilson Date: Sat Jan 21 18:22:33 2017 +0000 agp/intel: Move intel_fake_agp_sizes into #ifdef block Move the intel_fake_agp_sizes array into the same #ifdef block as it is used to avoid instantiation when not used, and so triggering a compiler warning drivers/char/agp/intel-gtt.c:335:42: warning: ‘intel_fake_agp_sizes’ defined but not used [-Wunused-const-variable=] Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170121182233.30852-1-chris@chris-wilson.co.uk Reviewed-by: Jani Nikula Reviewed-by: Joonas Lahtinen drivers/char/agp/intel-gtt.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 31bb2ef97ea9db343348f9b5ccaa9bb6f48fc655 Author: Ander Conselvan de Oliveira Date: Fri Jan 20 16:28:45 2017 +0200 drm/i915: Check for NULL atomic state in intel_crtc_disable_noatomic() In intel_crtc_disable_noatomic(), bail on a failure to allocate an atomic state to avoid a NULL pointer dereference. Fixes: 4a80655827af ("drm/i915: Pass atomic state to crtc enable/disable functions") Cc: Maarten Lankhorst Cc: Daniel Vetter Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: # v4.9+ Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1484922525-6131-4-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_display.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 46a1bd289507dfcc428fb9daf65421ed6be6af8b Author: Ander Conselvan de Oliveira Date: Fri Jan 20 16:28:44 2017 +0200 drm/i915: Fix calculation of rotated x and y offsets for planar formats Parameters tile_size, tile_width and tile_height were passed in the wrong order to _intel_adjust_tile_offset() when calculating the rotated offsets. This doesn't fix any user visible bug, since for packed formats new and old offset are the same and the rotated offsets are within a tile before they are fed to _intel_adjust_tile_offset(). In that case, the offsets are unchanged. That is not true for planar formats, but those are currently not supported. Fixes: 66a2d927cb0e ("drm/i915: Make intel_adjust_tile_offset() work for linear buffers") Cc: Ville Syrjälä Cc: Sivakumar Thulasimani Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: # v4.9+ Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1484922525-6131-3-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 04313b00b79405f86d815100f85c47a2ee5b8ca0 Author: Ander Conselvan de Oliveira Date: Fri Jan 20 16:28:43 2017 +0200 drm/i915: Don't init hpd polling for vlv and chv from runtime_suspend() An error in the condition for avoiding the call to intel_hpd_poll_init() for valleyview and cherryview from intel_runtime_suspend() caused it to be called unconditionally. Fix it. Fixes: 19625e85c6ec ("drm/i915: Enable polling when we don't have hpd") Cc: stable@vger.kernel.org Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Lyude Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: # v4.9+ Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1484922525-6131-2-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/i915_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c96b63a6a7ac4bd670ec2e663793a9a31418b790 Author: Ander Conselvan de Oliveira Date: Fri Jan 20 16:28:42 2017 +0200 drm/i915: Don't leak edid in intel_crt_detect_ddc() In the path where intel_crt_detect_ddc() detects a CRT, if would return true without freeing the edid. Fixes: a2bd1f541f19 ("drm/i915: check whether we actually received an edid in detect_ddc") Cc: Chris Wilson Cc: Daniel Vetter Cc: Daniel Vetter Cc: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Cc: # v3.6+ Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Reviewed-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1484922525-6131-1-git-send-email-ander.conselvan.de.oliveira@intel.com drivers/gpu/drm/i915/intel_crt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit fde42bfcd232fb1a46d844dbf486cb67cb910004 Author: Michal Marek Date: Tue Jan 3 14:55:24 2017 +0100 genksyms: Regenerate parser Regenerate the parser after d920f7c6628c ("genksyms: Fix segfault with invalid declarations"). Reported-and-tested-by: Borislav Petkov Signed-off-by: Michal Marek scripts/genksyms/parse.tab.c_shipped | 474 +++++++++++++++++------------------ 1 file changed, 234 insertions(+), 240 deletions(-) commit d920f7c6628c63a390009c237fb80a203c2e400a Author: Michal Marek Date: Tue Jan 3 14:40:44 2017 +0100 genksyms: Fix segfault with invalid declarations Do not try to recover too early and segfault when parsing invalid declarations such as echo 'int (int);' | scripts/genksyms/genksyms echo 'int a, (int);' | scripts/genksyms/genksyms echo 'extern void *__inline_memcpy((void *), (const void *), (__kernel_size_t));' | scripts/genksyms/genksyms The last one was a real-life bug with include/asm-generic/asm-prototypes.h on x86_64. Reported-and-tested-by: Borislav Petkov Signed-off-by: Michal Marek scripts/genksyms/parse.y | 2 -- 1 file changed, 2 deletions(-) commit 13c0f52beb6310b9c08804c0929901f70abd211a Author: Al Viro Date: Sat Dec 10 13:20:53 2016 -0500 make nr_pages calculation in default_file_splice_read() a bit less ugly It's an artifact of lousy calling conventions of iov_iter_get_pages_alloc(). Hopefully, we'll get something saner come next cycle; for now that'll do. Signed-off-by: Al Viro fs/splice.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 3d6ea290f337cc64cf44290482e36306fc8aaa31 Author: Al Viro Date: Sat Dec 10 13:17:32 2016 -0500 splice/tee/vmsplice: validate flags Long overdue... Signed-off-by: Al Viro fs/splice.c | 8 ++++++++ include/linux/splice.h | 2 ++ 2 files changed, 10 insertions(+) commit f81dc7d7d5a2528f98f26a0b9406e822d0b35011 Author: Al Viro Date: Mon Oct 31 16:47:15 2016 -0400 splice_pipe_desc: kill ->flags no users left Signed-off-by: Al Viro include/linux/splice.h | 1 - kernel/relay.c | 1 - kernel/trace/trace.c | 2 -- net/core/skbuff.c | 1 - 4 files changed, 5 deletions(-) commit 23c832b10ca9ab2685d7d3e0990800ffc846fc92 Author: Al Viro Date: Wed Oct 12 19:23:50 2016 -0400 remove spd_release_page() no users left Signed-off-by: Al Viro fs/splice.c | 5 ----- include/linux/splice.h | 1 - 2 files changed, 6 deletions(-) commit 351744aa0f0366f17118db58b011cd3b8678f923 Author: Arnd Bergmann Date: Mon Jul 11 23:49:20 2016 +0200 HID: logitech-hidpp: select CONFIG_POWER_SUPPLY A recent commit added barry support to this driver, but that causes a link failure when CONFIG_POWER_SUPPLY is not set: drivers/hid/built-in.o: In function `hidpp_battery_get_property': :(.text+0x1a834): undefined reference to `power_supply_get_drvdata' drivers/hid/built-in.o: In function `hidpp_raw_event': :(.text+0x1b10c): undefined reference to `power_supply_changed' drivers/hid/built-in.o: In function `hidpp_connect_event': :(.text+0x1bd88): undefined reference to `devm_power_supply_register' :(.text+0x1be30): undefined reference to `power_supply_powers' This adds a dependency, identically to the other HID drivers that need this. Signed-off-by: Arnd Bergmann Reviewed-by: Benjamin Tissoires Fixes: 5a2b190cddb9 ("HID: logitech-hidpp: add battery support for HID++ 2.0 devices") Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 6bd4e65d521f924b9f17c6a285b5e1ea7a2bd4d4 Author: Benjamin Tissoires Date: Wed Jun 29 19:28:02 2016 +1000 HID: logitech-hidpp: remove HIDPP_QUIRK_CONNECT_EVENTS Now that we can create battery power_supply sources, it's better to enable the connect_event callback unconditionally. Signed-off-by: Benjamin Tissoires Tested-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 5a2b190cddb9aa69b9037f5b1fd1c2cc8a1d68b9 Author: Peter Hutterer Date: Wed Jun 29 19:28:01 2016 +1000 HID: logitech-hidpp: add battery support for HID++ 2.0 devices If the 0x1000 Unified Battery Level Status feature exists, expose the battery level. The main drawback is that while a device is plugged in its battery level is 0. To avoid exposing that as 0% charge we make up a number based on the charging status. Signed-off-by: Peter Hutterer Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 238 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 237 insertions(+), 1 deletion(-)